From b80a5f27a904be30572742ec446feea335a20a28 Mon Sep 17 00:00:00 2001 From: Danny <66078599+mmdanny89@users.noreply.github.com> Date: Wed, 27 Mar 2024 12:41:58 -0400 Subject: [PATCH 0001/1614] fix: set default warehouse for pos invoice (cherry picked from commit b156937254a93dcd9fe5ff8ac598261526f8292e) --- erpnext/selling/page/point_of_sale/pos_controller.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/erpnext/selling/page/point_of_sale/pos_controller.js b/erpnext/selling/page/point_of_sale/pos_controller.js index 452019ebf4b..0d71932a1a9 100644 --- a/erpnext/selling/page/point_of_sale/pos_controller.js +++ b/erpnext/selling/page/point_of_sale/pos_controller.js @@ -547,6 +547,8 @@ erpnext.PointOfSale.Controller = class { async on_cart_update(args) { frappe.dom.freeze(); + if (this.frm.doc.set_warehouse != this.settings.warehouse) + this.frm.doc.set_warehouse = this.settings.warehouse; let item_row = undefined; try { let { field, value, item } = args; From 58125778545e8e1166e110a563eb896d9b2bde52 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Wed, 3 Jul 2024 05:06:09 +0000 Subject: [PATCH 0002/1614] chore(release): Bumped to Version 15.29.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # [15.29.0](https://github.com/frappe/erpnext/compare/v15.28.2...v15.29.0) (2024-07-03) ### Bug Fixes * add auto-update for overdue status ([#42105](https://github.com/frappe/erpnext/issues/42105)) ([317cc03](https://github.com/frappe/erpnext/commit/317cc0358c0e3cb07da0d72657dddeb9ef7ee546)) * add string for translation (backport [#41903](https://github.com/frappe/erpnext/issues/41903)) ([#41963](https://github.com/frappe/erpnext/issues/41963)) ([48dc24b](https://github.com/frappe/erpnext/commit/48dc24b9bf65e788bffc700f4002f66cef9bcfed)) * always post to tax account heads if LCV is booked ([706a6c1](https://github.com/frappe/erpnext/commit/706a6c1ad7c7850974d7dc7b6a0ff162ef4c1a28)) * batch picking in pick list based on Stock Settings (backport [#42021](https://github.com/frappe/erpnext/issues/42021)) ([#42134](https://github.com/frappe/erpnext/issues/42134)) ([a45f8ca](https://github.com/frappe/erpnext/commit/a45f8ca5fd7403e61f4c836dc28ea7742c24441e)) * batch reset while making SABB (backport [#42076](https://github.com/frappe/erpnext/issues/42076)) ([#42123](https://github.com/frappe/erpnext/issues/42123)) ([c3f5a49](https://github.com/frappe/erpnext/commit/c3f5a494f32a4fff787dbd04c5d36f006bac0865)) * decimal issue in pick list (backport [#41972](https://github.com/frappe/erpnext/issues/41972)) ([#41982](https://github.com/frappe/erpnext/issues/41982)) ([9945a90](https://github.com/frappe/erpnext/commit/9945a90b3fdfdbe95c7205c7228372d3b47e0ce6)) * **Delivery Note:** only show permitted actions ([cef6d0d](https://github.com/frappe/erpnext/commit/cef6d0d74d11067e29e58d080fa09a328a5f016a)) * do not show zero balance stock items in stock balance report (backport [#41958](https://github.com/frappe/erpnext/issues/41958)) ([#41961](https://github.com/frappe/erpnext/issues/41961)) ([c10b123](https://github.com/frappe/erpnext/commit/c10b123a817ba0e1285a607c8514b57747d0ebf5)) * expense account from item group not fetched (backport [#41957](https://github.com/frappe/erpnext/issues/41957)) ([#41962](https://github.com/frappe/erpnext/issues/41962)) ([760b2e2](https://github.com/frappe/erpnext/commit/760b2e24f27c1dfdc70eb685562e83afc9f35ae3)) * fixed asset value in Fixed Asset Register (backport [#41930](https://github.com/frappe/erpnext/issues/41930)) ([#42027](https://github.com/frappe/erpnext/issues/42027)) ([f2feeaf](https://github.com/frappe/erpnext/commit/f2feeaf264febdbb3b9489b9d363c1e2798dd5f9)) * handle none type object error ([b0aef9e](https://github.com/frappe/erpnext/commit/b0aef9e42b34dfe6b8b0002647b8ba966a735a9a)) * incorrect against_account upon reposting ([a41577a](https://github.com/frappe/erpnext/commit/a41577a1cd901f7c66256f9bb877af1ddc610913)) * incorrect Difference Amount (backport [#42008](https://github.com/frappe/erpnext/issues/42008)) ([#42013](https://github.com/frappe/erpnext/issues/42013)) ([838cc5b](https://github.com/frappe/erpnext/commit/838cc5b72aff39d53093c71a52fe2645c69fe1a8)) * incorrect discount on other item ([77f4199](https://github.com/frappe/erpnext/commit/77f4199e2ad4b1b7b2b4122a67affcc2d845a80b)) * incorrect dr/cr on Adv Payment against Journals ([4e74257](https://github.com/frappe/erpnext/commit/4e74257ba9bf520d0a92622adf979e77cd4d8222)) * incorrect time period in asset depreciation schedule (backport [#41805](https://github.com/frappe/erpnext/issues/41805)) ([#42043](https://github.com/frappe/erpnext/issues/42043)) ([cf4d4ba](https://github.com/frappe/erpnext/commit/cf4d4ba3e97094bbe5d61b2f119ab157d4ffac08)) * lead status filter (backport [#41816](https://github.com/frappe/erpnext/issues/41816)) ([#42046](https://github.com/frappe/erpnext/issues/42046)) ([3536a75](https://github.com/frappe/erpnext/commit/3536a754ff8dd778e72679dd906e7703f1ef7c0f)) * manufacturing date issue in the batch (backport [#42034](https://github.com/frappe/erpnext/issues/42034)) ([#42037](https://github.com/frappe/erpnext/issues/42037)) ([a981633](https://github.com/frappe/erpnext/commit/a981633d949fb43054bb22b78c77c5bde3296742)) * move condition for shipment ([2180239](https://github.com/frappe/erpnext/commit/21802396ce0659de9097074916b3144ce576171e)) * not able to make purchase return (backport [#42053](https://github.com/frappe/erpnext/issues/42053)) ([#42055](https://github.com/frappe/erpnext/issues/42055)) ([8a91bf3](https://github.com/frappe/erpnext/commit/8a91bf315491e6b3b54c1b0f681397bb5acd4a66)) * pricing rule with and without 'apply multiple' and priority ([f3aa885](https://github.com/frappe/erpnext/commit/f3aa8854880173dd89a911ca4198c9fc605e35f1)) * provisional entry for non stock items ([d61dab8](https://github.com/frappe/erpnext/commit/d61dab856942ff94092c90963dedef71fdf6dfed)) * Re-open allows SO's to be over credit limit ([7fcb0f5](https://github.com/frappe/erpnext/commit/7fcb0f578ae7456c71313f1240d3a6e855d8f86e)) * refactor Asset Repair and Stock Entry linkage to resolve amendme… (backport [#41919](https://github.com/frappe/erpnext/issues/41919)) ([#42058](https://github.com/frappe/erpnext/issues/42058)) ([97c49b9](https://github.com/frappe/erpnext/commit/97c49b93b673f5a9472d505cc981a12e5e4aa00b)) * reload asset when creating asset depreciation ([7b5d504](https://github.com/frappe/erpnext/commit/7b5d5043c5220189240c04f90abb7ffbe75d7cd3)) * reposting file attachment permission issue (backport [#42068](https://github.com/frappe/erpnext/issues/42068)) ([#42075](https://github.com/frappe/erpnext/issues/42075)) ([1f3374f](https://github.com/frappe/erpnext/commit/1f3374fcdf3e29a9fa6ad7d317db1b9c087bdbfb)) * resolve gl entries duplication in asset purchase workflow (backport [#41845](https://github.com/frappe/erpnext/issues/41845)) ([#42120](https://github.com/frappe/erpnext/issues/42120)) ([58e18e2](https://github.com/frappe/erpnext/commit/58e18e2b1fa7d8e9e6fb43282be777af711ac865)) * **Sales Order:** only show permitted actions ([a0011c5](https://github.com/frappe/erpnext/commit/a0011c5b529662d28a1e0fc623c96644fbb68c96)) * show zero stock items filter in the stock balance report (backport [#42147](https://github.com/frappe/erpnext/issues/42147)) ([#42152](https://github.com/frappe/erpnext/issues/42152)) ([11ebbf2](https://github.com/frappe/erpnext/commit/11ebbf2a9cfad99c1e2a6406f537f75a4526185b)) * stock qty validation in SCR (backport [#42124](https://github.com/frappe/erpnext/issues/42124)) ([#42133](https://github.com/frappe/erpnext/issues/42133)) ([d9e62fe](https://github.com/frappe/erpnext/commit/d9e62fef2121efb39f9a2ef220e92bae98bf848d)) * Stock Reservation Entry was not getting created (backport [#42033](https://github.com/frappe/erpnext/issues/42033)) ([#42035](https://github.com/frappe/erpnext/issues/42035)) ([e278fc6](https://github.com/frappe/erpnext/commit/e278fc683f9cad5d709c1719d2bae502193387a5)) * **test:** incorrect field for customer default billing currency ([3b15708](https://github.com/frappe/erpnext/commit/3b15708f18e695a93f740f03ddb8b1153abc6208)) * this.frm.events.update_cost is not a function (backport [#41960](https://github.com/frappe/erpnext/issues/41960)) ([#41965](https://github.com/frappe/erpnext/issues/41965)) ([3b4d397](https://github.com/frappe/erpnext/commit/3b4d39766f78492bd2ba92dc6c6c5b91263d3e6d)) * timeout error while submitting JV (backport [#42040](https://github.com/frappe/erpnext/issues/42040)) ([#42099](https://github.com/frappe/erpnext/issues/42099)) ([a0e06a4](https://github.com/frappe/erpnext/commit/a0e06a4ba5c5efc2cd69a8b561c5832dcd210761)) * timeout while cancelling LCV (backport [#42030](https://github.com/frappe/erpnext/issues/42030)) (backport [#42031](https://github.com/frappe/erpnext/issues/42031)) ([#42032](https://github.com/frappe/erpnext/issues/42032)) ([068de08](https://github.com/frappe/erpnext/commit/068de08bbbcbe885523b484ed964e73ef38c4fdc)) * unhide serial no field (backport [#42045](https://github.com/frappe/erpnext/issues/42045)) ([#42047](https://github.com/frappe/erpnext/issues/42047)) ([482832f](https://github.com/frappe/erpnext/commit/482832f3c2be1b7cd63e5ffea595a88abdd3869b)) * valuation rate for the legacy batches (backport [#42011](https://github.com/frappe/erpnext/issues/42011)) ([#42020](https://github.com/frappe/erpnext/issues/42020)) ([f6be19c](https://github.com/frappe/erpnext/commit/f6be19cb7c46e67dde6c8dc43afe08d57d87acc5)) * Wrong Delete Batch on Purchase Receipt (backport [#42007](https://github.com/frappe/erpnext/issues/42007)) ([#42012](https://github.com/frappe/erpnext/issues/42012)) ([68b318a](https://github.com/frappe/erpnext/commit/68b318a94b679fef505090fa1ebb4adecb3862a8)) ### Features * accounting dimension filters in gp report ([fe9dffb](https://github.com/frappe/erpnext/commit/fe9dffb271021e554331f048931fe793b05bbaf1)) * default account head for operating cost (backport [#41985](https://github.com/frappe/erpnext/issues/41985)) ([#41987](https://github.com/frappe/erpnext/issues/41987)) ([44c1671](https://github.com/frappe/erpnext/commit/44c16713ba9fdda293d612b10720d63f6a83b0c8)) * **gp:** group by cost center ([068ae87](https://github.com/frappe/erpnext/commit/068ae87b8d56cb1161a9fd42136b72da33f6313f)) * Turkish Chart Of Accounts (backport [#41756](https://github.com/frappe/erpnext/issues/41756)) ([#42028](https://github.com/frappe/erpnext/issues/42028)) ([63b26e6](https://github.com/frappe/erpnext/commit/63b26e679b05d8f2c334257ba4f8921ad72a48db)) ### Performance Improvements * code optimization to handle large asset creation (backport [#42018](https://github.com/frappe/erpnext/issues/42018)) ([#42025](https://github.com/frappe/erpnext/issues/42025)) ([c27f272](https://github.com/frappe/erpnext/commit/c27f272f061732e9fc58d35a95f5c34c52c0a4ab)) * dont run queries unnecessarily, improved filters ([#41993](https://github.com/frappe/erpnext/issues/41993)) ([b59c91a](https://github.com/frappe/erpnext/commit/b59c91a341d3f4265ae966a12e3a002c0a4dbc0b)) * Performance optmization for Purchase Invoice submission (backport [#40263](https://github.com/frappe/erpnext/issues/40263)) ([#41946](https://github.com/frappe/erpnext/issues/41946)) ([d396c18](https://github.com/frappe/erpnext/commit/d396c18689e530d3f11a791ef1064c2d9775466e)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 4a9236066cc..4ebd5ee55d8 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -3,7 +3,7 @@ import inspect import frappe -__version__ = "15.28.2" +__version__ = "15.29.0" def get_default_company(user=None): From 473aaf4e5baeccb1e2ed96a0ace637bb405c8692 Mon Sep 17 00:00:00 2001 From: "Nihantra C. Patel" <141945075+Nihantra-Patel@users.noreply.github.com> Date: Wed, 3 Jul 2024 13:12:00 +0530 Subject: [PATCH 0003/1614] fix: path of automatically updates the status of asset maintenance log (cherry picked from commit 909aa8f359c77cb92c3607cb46fea6a5292730dc) (cherry picked from commit 5317418a53815f421296d3861a7d10aa25d31136) --- erpnext/hooks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/hooks.py b/erpnext/hooks.py index a080af9a827..028acc9cb11 100644 --- a/erpnext/hooks.py +++ b/erpnext/hooks.py @@ -442,7 +442,7 @@ scheduler_events = { "erpnext.accounts.doctype.process_statement_of_accounts.process_statement_of_accounts.send_auto_email", "erpnext.accounts.utils.auto_create_exchange_rate_revaluation_daily", "erpnext.accounts.utils.run_ledger_health_checks", - "erpnext.assets.doctype.asset.asset_maintenance_log.update_asset_maintenance_log_status", + "erpnext.assets.doctype.asset_maintenance_log.asset_maintenance_log.update_asset_maintenance_log_status", ], "weekly": [ "erpnext.accounts.utils.auto_create_exchange_rate_revaluation_weekly", From 7568af67e90b2a7ee56e298c29ec2f53a31b590e Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Wed, 3 Jul 2024 14:56:03 +0000 Subject: [PATCH 0004/1614] chore(release): Bumped to Version 15.29.1 ## [15.29.1](https://github.com/frappe/erpnext/compare/v15.29.0...v15.29.1) (2024-07-03) ### Bug Fixes * path of automatically updates the status of asset maintenance log ([473aaf4](https://github.com/frappe/erpnext/commit/473aaf4e5baeccb1e2ed96a0ace637bb405c8692)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 4ebd5ee55d8..e82ecf1039a 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -3,7 +3,7 @@ import inspect import frappe -__version__ = "15.29.0" +__version__ = "15.29.1" def get_default_company(user=None): From 20d481de5e5b220db88191482e008ae9ad2a0778 Mon Sep 17 00:00:00 2001 From: "Nihantra C. Patel" <141945075+Nihantra-Patel@users.noreply.github.com> Date: Fri, 21 Jun 2024 15:49:40 +0530 Subject: [PATCH 0005/1614] fix: group by in item-wise purchase register (cherry picked from commit 3fab00135b1391c5f505fee599dac7234b0e1992) --- .../item_wise_purchase_register/item_wise_purchase_register.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py b/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py index 1cd9b872a9b..8bc05273092 100644 --- a/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py +++ b/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py @@ -309,7 +309,7 @@ def apply_conditions(query, pi, pii, filters): query = query.orderby(pi.posting_date, order=Order.desc) query = query.orderby(pii.item_group, order=Order.desc) else: - query = apply_group_by_conditions(filters, "Purchase Invoice") + query = apply_group_by_conditions(query, pi, pii, filters) return query From 8baef2454196cb57bd428f8b46f344b88a651b36 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Fri, 5 Jul 2024 07:43:13 +0530 Subject: [PATCH 0006/1614] fix: blank item-wise sales/purchase register reports on first load --- .../item_wise_purchase_register/item_wise_purchase_register.js | 2 +- .../report/item_wise_sales_register/item_wise_sales_register.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.js b/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.js index e05591e49df..836ec7b456c 100644 --- a/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.js +++ b/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.js @@ -52,7 +52,7 @@ frappe.query_reports["Item-wise Purchase Register"] = { label: __("Group By"), fieldname: "group_by", fieldtype: "Select", - options: ["Supplier", "Item Group", "Item", "Invoice"], + options: ["", "Supplier", "Item Group", "Item", "Invoice"], }, ], formatter: function (value, row, column, data, default_formatter) { diff --git a/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.js b/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.js index 16a97733393..6fb015f7b74 100644 --- a/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.js +++ b/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.js @@ -70,7 +70,7 @@ frappe.query_reports["Item-wise Sales Register"] = { label: __("Group By"), fieldname: "group_by", fieldtype: "Select", - options: ["Customer Group", "Customer", "Item Group", "Item", "Territory", "Invoice"], + options: ["", "Customer Group", "Customer", "Item Group", "Item", "Territory", "Invoice"], }, ], formatter: function (value, row, column, data, default_formatter) { From c9e3dee5b2650ebe98774bf330194ca83f63db5d Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Fri, 5 Jul 2024 02:47:13 +0000 Subject: [PATCH 0007/1614] chore(release): Bumped to Version 15.29.2 ## [15.29.2](https://github.com/frappe/erpnext/compare/v15.29.1...v15.29.2) (2024-07-05) ### Bug Fixes * blank item-wise sales/purchase register reports on first load ([8baef24](https://github.com/frappe/erpnext/commit/8baef2454196cb57bd428f8b46f344b88a651b36)) * group by in item-wise purchase register ([20d481d](https://github.com/frappe/erpnext/commit/20d481de5e5b220db88191482e008ae9ad2a0778)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index e82ecf1039a..9170c683912 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -3,7 +3,7 @@ import inspect import frappe -__version__ = "15.29.1" +__version__ = "15.29.2" def get_default_company(user=None): From f97533397030e81972dce301c7ed63e3e23f1559 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Wed, 10 Jul 2024 10:44:06 +0000 Subject: [PATCH 0008/1614] chore(release): Bumped to Version 15.29.3 ## [15.29.3](https://github.com/frappe/erpnext/compare/v15.29.2...v15.29.3) (2024-07-10) ### Bug Fixes * actual qty in sales order (backport [#42248](https://github.com/frappe/erpnext/issues/42248)) ([#42256](https://github.com/frappe/erpnext/issues/42256)) ([4866958](https://github.com/frappe/erpnext/commit/4866958a96bf99f69e842b6986ee339b885873ec)) * add missing german translations ([2f89461](https://github.com/frappe/erpnext/commit/2f89461ace6af52e17134cd2cb5ab535e3851985)) * added filter to show only submitted assets ([19ed6d1](https://github.com/frappe/erpnext/commit/19ed6d10815144c74e5221a3584c099022da5f11)) * auto serial and batch bundle not creating for Asset Capitalization (backport [#42231](https://github.com/frappe/erpnext/issues/42231)) ([#42242](https://github.com/frappe/erpnext/issues/42242)) ([7916d64](https://github.com/frappe/erpnext/commit/7916d6436f2152e90ec5d2f8de3416937c6de800)) * Billed Qty and Qty to Bill Calculation in Purchase Order Analysis (backport [#42100](https://github.com/frappe/erpnext/issues/42100)) ([#42249](https://github.com/frappe/erpnext/issues/42249)) ([43c7513](https://github.com/frappe/erpnext/commit/43c7513cfe20713e23627a77e0b6b23471073c0a)) * BOM Creator Recursion Error on duplicate save (backport [#41622](https://github.com/frappe/erpnext/issues/41622)) ([#42179](https://github.com/frappe/erpnext/issues/42179)) ([68a39df](https://github.com/frappe/erpnext/commit/68a39dfa331d7f2922f7961a243d303015e90008)) * changes as per review ([57896a8](https://github.com/frappe/erpnext/commit/57896a8f9936f4716d9282df04e890ab5201e44e)) * completed DC will not appear in a delivery trip ([0bab609](https://github.com/frappe/erpnext/commit/0bab609a6fd502740bb3e7f9f8dfa5bc50ea9e6a)) * completed DC will not appear in a delivery trip ([#41655](https://github.com/frappe/erpnext/issues/41655)) ([a3444a0](https://github.com/frappe/erpnext/commit/a3444a07b7f597f57b89ed2119be2a9da5273e2a)) * corrected mismatch in the Purchase Receipt Status [#15620](https://github.com/frappe/erpnext/issues/15620) (backport [#42138](https://github.com/frappe/erpnext/issues/42138)) ([#42252](https://github.com/frappe/erpnext/issues/42252)) ([e1b50ef](https://github.com/frappe/erpnext/commit/e1b50efeea222fd78eb68332638bbd17544a260e)) * correcting balance sheet calculation for zero liabilities and equity ([d48a2c9](https://github.com/frappe/erpnext/commit/d48a2c9f8e3c7bd47e253cb2c88ffc2c75290ed8)) * correcting balance sheet calculation for zero liabilities and equity ([#41497](https://github.com/frappe/erpnext/issues/41497)) ([2104d90](https://github.com/frappe/erpnext/commit/2104d903aa65a5a09b5ecfbb6b937fa181fc33af)) * custom delimiters ([43ad2fe](https://github.com/frappe/erpnext/commit/43ad2fed631a689cce9b88369f959f6e7049e8d7)) * download_import_log if rows are greater than 5000 ([4eb251b](https://github.com/frappe/erpnext/commit/4eb251b59ac5e26b06b0640a77bd6fe52f3e491b)) * empty item-wise sales/purchase register reports on initial load ([5ac3b34](https://github.com/frappe/erpnext/commit/5ac3b34a6fa85da41ec168037f520a503056df66)) * field position ([a04938d](https://github.com/frappe/erpnext/commit/a04938d5ae9f9312757568ee4e01e18c9f4df901)) * group by in item-wise purchase register ([a967d59](https://github.com/frappe/erpnext/commit/a967d5984434029ed47fd1807a23cf82592c43e0)) * **Holiday List:** sort holidays on save to avoid disorienting the user (backport [#42236](https://github.com/frappe/erpnext/issues/42236)) ([#42250](https://github.com/frappe/erpnext/issues/42250)) ([b555615](https://github.com/frappe/erpnext/commit/b5556156c18f218338deafb49e8581be73b6361e)) * import log preview ([62aac8b](https://github.com/frappe/erpnext/commit/62aac8bb85b3fc28d5db9074ccfc2a03a3d76fb9)) * import status ([71311ff](https://github.com/frappe/erpnext/commit/71311ffd624560994f7f558c3af73a66d4db38c6)) * **Inventory Dimension:** reduce perms for Stock User (backport [#42226](https://github.com/frappe/erpnext/issues/42226)) ([#42243](https://github.com/frappe/erpnext/issues/42243)) ([3cc59e4](https://github.com/frappe/erpnext/commit/3cc59e4a7a379b0dd22b95882ca26a07acdbbee2)) * manual pick allow to pick more than available stock (backport [#42155](https://github.com/frappe/erpnext/issues/42155)) ([#42159](https://github.com/frappe/erpnext/issues/42159)) ([a7b6530](https://github.com/frappe/erpnext/commit/a7b6530fde4ad7ae298f685d9917d9a701fcfd72)) * Multiple fixes for General Ledger Report ([ca57fd4](https://github.com/frappe/erpnext/commit/ca57fd42551dd3a4c6e8a2ffcd58ed75d89c532c)) * multiple free items on same Item Group ([9352863](https://github.com/frappe/erpnext/commit/93528631c3652edecfee3e712d94c4ace9d4b26a)) * path of automatically updates the status of asset maintenance log ([5317418](https://github.com/frappe/erpnext/commit/5317418a53815f421296d3861a7d10aa25d31136)) * Project Status should be Open again if `percent_complete` is not 100 ([90f5c78](https://github.com/frappe/erpnext/commit/90f5c78607656ed8b3a644f30de4efce2c127110)) * provision to enable do not use batch-wise valuation (backport [#42186](https://github.com/frappe/erpnext/issues/42186)) ([#42198](https://github.com/frappe/erpnext/issues/42198)) ([ec881ac](https://github.com/frappe/erpnext/commit/ec881ace76bd6c8b63dc6793cff29bde60b74795)) * **Putaway Rule:** reduce perms for Stock User (backport [#42227](https://github.com/frappe/erpnext/issues/42227)) ([#42244](https://github.com/frappe/erpnext/issues/42244)) ([b78a97d](https://github.com/frappe/erpnext/commit/b78a97df85c66ba0d3a8f4598d239be7df39c41d)) * remove deprecated field "statement_import_log" ([2f0b97d](https://github.com/frappe/erpnext/commit/2f0b97d91b6027126978642090f0e30686181ee6)) * removed max discount validation for sales return ([ab987e9](https://github.com/frappe/erpnext/commit/ab987e9a86ba143a6920609fb3818dd162a05bba)) * **Stock Entry Type:** reduce perms for Stock User (backport [#42225](https://github.com/frappe/erpnext/issues/42225)) ([#42245](https://github.com/frappe/erpnext/issues/42245)) ([954d9ab](https://github.com/frappe/erpnext/commit/954d9ab154ef824f3cdf847fbc7e8c02c55c6fb0)) * tax on stock_rbnb on repost of Purchase Receipt ([427439c](https://github.com/frappe/erpnext/commit/427439c3f19bfd1401628cf39a30ddd291dbfec7)) * **tds:** use doctype reference when mapping keys across multiple doctypes ([#42258](https://github.com/frappe/erpnext/issues/42258)) ([8264e3b](https://github.com/frappe/erpnext/commit/8264e3bc77dacc2ac62f46fac1bec83cf0ec93cb)) * updated logic for calculating tax_withholding_net_total in payment entry ([3fb5c7a](https://github.com/frappe/erpnext/commit/3fb5c7a3a629e60925709c136e735df73042e52d)) * use standard method to get `_doc_before_save` ([cfda5f6](https://github.com/frappe/erpnext/commit/cfda5f6d0b1b6f9757b6010c98c675c768e0cbb5)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 9170c683912..2fbbc6ac1d2 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -3,7 +3,7 @@ import inspect import frappe -__version__ = "15.29.2" +__version__ = "15.29.3" def get_default_company(user=None): From ce8b423ad6aefd2a0355a8efd3505c2d9e161cee Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 12 Jul 2024 20:47:27 +0530 Subject: [PATCH 0009/1614] chore: release v15 (#42308) * fix(Warehouse): add buttons only if the user can use them (cherry picked from commit 10ae5aaf520dbe5a2c3d38d227dd9a3103f356c3) * fix: missing discount on POS Credit Notes (cherry picked from commit 1049550951011c09fd705c4b01b925e02b6a84ee) * chore: rename test suite for payable report (cherry picked from commit 9474f727760da7592fec05331643b145e9f132f9) * refactor: test suite for item-wise sales register (cherry picked from commit 3aaa22e672ae5363ca6347d0ce280aa7fba062f0) * refactor(test): use each instance UOM for assertion (cherry picked from commit cf4fbfb60150e5af44641a2dd0811fb64d003774) * fix: slowness in reposting dependent vouchers. (backport #42282) (#42292) fix: slowness in reposting dependent vouchers. (#42282) (cherry picked from commit b17696a8ae7f0ea1128887d29336de4ef67a220f) Co-authored-by: rohitwaghchaure * refactor(test): clear old records * fix: keep status as In Progress for RIV for Timeout Error (backport #42274) (#42296) fix: keep status as In Progress for RIV for Timeout Error (#42274) (cherry picked from commit 10280d6140837ffe2fcebb70a57311780c160e25) Co-authored-by: rohitwaghchaure * fix: cost center filter by company (backport #42297) (#42299) fix: cost center filter by company (#42297) (cherry picked from commit 9838f7e6bad8c9e205ca8e8c67f77a8f156ba355) Co-authored-by: rohitwaghchaure * feat: configurable depreciation calculation via accounts settings (#42276) * feat: configurable depreciation calculation via accounts settings * refactor: code optimization * style: changes in description and label (cherry picked from commit b04da63aad0bcf13c15c49d578d291f4d6f8f25b) * fix: not able to submit LCV entry (backport #42303) (#42304) fix: not able to submit LCV entry (#42303) (cherry picked from commit 9cf92eaeab359cb0f5ca46b84d36ebed60a68f1b) Co-authored-by: rohitwaghchaure * fix: While submitting PCV ensure previous FY is closed (backport #42284) (#42300) fix: While submitting PCV ensure previous FY is closed (#42284) (cherry picked from commit d0bbc8ca705f42a0a3c8be2508919f49b67fbdad) Co-authored-by: Nabin Hait --------- Co-authored-by: barredterra <14891507+barredterra@users.noreply.github.com> Co-authored-by: ruthra kumar Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: rohitwaghchaure Co-authored-by: Khushi Rawat <142375893+khushi8112@users.noreply.github.com> --- .../accounts_settings/accounts_settings.json | 17 ++++- .../accounts_settings/accounts_settings.py | 1 + .../journal_entry/test_journal_entry.py | 37 +++++++++++ .../period_closing_voucher.py | 20 ++++-- .../doctype/sales_invoice/sales_invoice.js | 3 + erpnext/accounts/general_ledger.py | 12 ++++ .../accounts_payable/test_accounts_payable.py | 2 +- .../test_item_wise_sales_register.py | 65 +++++++++++++++++++ .../asset_depreciation_schedule.py | 51 +++++++++++++-- .../test_asset_depreciation_schedule.py | 62 ++++++++++++++++++ .../repost_item_valuation.py | 7 +- erpnext/stock/doctype/warehouse/warehouse.js | 48 ++++++++------ erpnext/stock/stock_ledger.py | 34 +++++++++- .../subcontracting_order.js | 16 +++++ .../subcontracting_receipt.js | 16 +++++ 15 files changed, 354 insertions(+), 37 deletions(-) create mode 100644 erpnext/accounts/report/item_wise_sales_register/test_item_wise_sales_register.py diff --git a/erpnext/accounts/doctype/accounts_settings/accounts_settings.json b/erpnext/accounts/doctype/accounts_settings/accounts_settings.json index 7bf3826e781..31991648158 100644 --- a/erpnext/accounts/doctype/accounts_settings/accounts_settings.json +++ b/erpnext/accounts/doctype/accounts_settings/accounts_settings.json @@ -55,6 +55,8 @@ "post_change_gl_entries", "assets_tab", "asset_settings_section", + "calculate_depr_using_total_days", + "column_break_gjcc", "book_asset_depreciation_entry_automatically", "closing_settings_tab", "period_closing_settings_section", @@ -462,6 +464,17 @@ "fieldname": "enable_immutable_ledger", "fieldtype": "Check", "label": "Enable Immutable Ledger" + }, + { + "fieldname": "column_break_gjcc", + "fieldtype": "Column Break" + }, + { + "default": "0", + "description": "Enable this option to calculate daily depreciation by considering the total number of days in the entire depreciation period, (including leap years) while using daily pro-rata based depreciation", + "fieldname": "calculate_depr_using_total_days", + "fieldtype": "Check", + "label": "Calculate daily depreciation using total days in depreciation period" } ], "icon": "icon-cog", @@ -469,7 +482,7 @@ "index_web_pages_for_search": 1, "issingle": 1, "links": [], - "modified": "2024-05-11 23:19:44.673975", + "modified": "2024-07-12 00:24:20.957726", "modified_by": "Administrator", "module": "Accounts", "name": "Accounts Settings", @@ -498,4 +511,4 @@ "sort_order": "ASC", "states": [], "track_changes": 1 -} +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/accounts_settings/accounts_settings.py b/erpnext/accounts/doctype/accounts_settings/accounts_settings.py index 34f0f24047b..93ff1e207c9 100644 --- a/erpnext/accounts/doctype/accounts_settings/accounts_settings.py +++ b/erpnext/accounts/doctype/accounts_settings/accounts_settings.py @@ -33,6 +33,7 @@ class AccountsSettings(Document): book_deferred_entries_based_on: DF.Literal["Days", "Months"] book_deferred_entries_via_journal_entry: DF.Check book_tax_discount_loss: DF.Check + calculate_depr_using_total_days: DF.Check check_supplier_invoice_uniqueness: DF.Check credit_controller: DF.Link | None delete_linked_ledger_entries: DF.Check diff --git a/erpnext/accounts/doctype/journal_entry/test_journal_entry.py b/erpnext/accounts/doctype/journal_entry/test_journal_entry.py index 5bfb65a3138..cf0aae96260 100644 --- a/erpnext/accounts/doctype/journal_entry/test_journal_entry.py +++ b/erpnext/accounts/doctype/journal_entry/test_journal_entry.py @@ -481,6 +481,43 @@ class TestJournalEntry(unittest.TestCase): for field in self.fields: self.assertEqual(self.expected_gle[i][field], gl_entries[i][field]) + def test_negative_debit_and_credit_with_same_account_head(self): + from erpnext.accounts.general_ledger import process_gl_map + + # Create JV with defaut cost center - _Test Cost Center + frappe.db.set_single_value("Accounts Settings", "merge_similar_account_heads", 0) + + jv = make_journal_entry("_Test Bank - _TC", "_Test Bank - _TC", 100 * -1, save=True) + jv.append( + "accounts", + { + "account": "_Test Cash - _TC", + "debit": 100 * -1, + "credit": 100 * -1, + "debit_in_account_currency": 100 * -1, + "credit_in_account_currency": 100 * -1, + "exchange_rate": 1, + }, + ) + jv.flags.ignore_validate = True + jv.save() + + self.assertEqual(len(jv.accounts), 3) + + gl_map = jv.build_gl_map() + + for row in gl_map: + if row.account == "_Test Cash - _TC": + self.assertEqual(row.debit_in_account_currency, 100 * -1) + self.assertEqual(row.credit_in_account_currency, 100 * -1) + + gl_map = process_gl_map(gl_map, False) + + for row in gl_map: + if row.account == "_Test Cash - _TC": + self.assertEqual(row.debit_in_account_currency, 100) + self.assertEqual(row.credit_in_account_currency, 100) + def make_journal_entry( account1, diff --git a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py index e75057c7a7f..9bc110d243e 100644 --- a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py +++ b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py @@ -136,18 +136,28 @@ class PeriodClosingVoucher(AccountsController): def check_if_previous_year_closed(self): last_year_closing = add_days(self.year_start_date, -1) - previous_fiscal_year = get_fiscal_year(last_year_closing, company=self.company, boolean=True) + if not previous_fiscal_year: + return - if previous_fiscal_year and not frappe.db.exists( + previous_fiscal_year_start_date = previous_fiscal_year[0][1] + if not frappe.db.exists( "GL Entry", - {"posting_date": ("<=", last_year_closing), "company": self.company, "is_cancelled": 0}, + { + "posting_date": ("between", [previous_fiscal_year_start_date, last_year_closing]), + "company": self.company, + "is_cancelled": 0, + }, ): return - if previous_fiscal_year and not frappe.db.exists( + if not frappe.db.exists( "Period Closing Voucher", - {"posting_date": ("<=", last_year_closing), "docstatus": 1, "company": self.company}, + { + "posting_date": ("between", [previous_fiscal_year_start_date, last_year_closing]), + "docstatus": 1, + "company": self.company, + }, ): frappe.throw(_("Previous Year is not closed, please close it first")) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js index c7505ce007d..1df21b7ebc4 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js @@ -505,6 +505,9 @@ erpnext.accounts.SalesInvoiceController = class SalesInvoiceController extends ( return this.frm.call({ doc: me.frm.doc, method: "set_missing_values", + args: { + for_validate: true, + }, callback: function (r) { if (!r.exc) { if (r.message && r.message.print_format) { diff --git a/erpnext/accounts/general_ledger.py b/erpnext/accounts/general_ledger.py index 2fd7b5d3c81..a4d128a5845 100644 --- a/erpnext/accounts/general_ledger.py +++ b/erpnext/accounts/general_ledger.py @@ -310,6 +310,18 @@ def check_if_in_list(gle, gl_map): def toggle_debit_credit_if_negative(gl_map): for entry in gl_map: # toggle debit, credit if negative entry + if flt(entry.debit) < 0 and flt(entry.credit) < 0 and flt(entry.debit) == flt(entry.credit): + entry.credit *= -1 + entry.debit *= -1 + + if ( + flt(entry.debit_in_account_currency) < 0 + and flt(entry.credit_in_account_currency) < 0 + and flt(entry.debit_in_account_currency) == flt(entry.credit_in_account_currency) + ): + entry.credit_in_account_currency *= -1 + entry.debit_in_account_currency *= -1 + if flt(entry.debit) < 0: entry.credit = flt(entry.credit) - flt(entry.debit) entry.debit = 0.0 diff --git a/erpnext/accounts/report/accounts_payable/test_accounts_payable.py b/erpnext/accounts/report/accounts_payable/test_accounts_payable.py index f5c9d16073e..43856bf569f 100644 --- a/erpnext/accounts/report/accounts_payable/test_accounts_payable.py +++ b/erpnext/accounts/report/accounts_payable/test_accounts_payable.py @@ -7,7 +7,7 @@ from erpnext.accounts.report.accounts_payable.accounts_payable import execute from erpnext.accounts.test.accounts_mixin import AccountsTestMixin -class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase): +class TestAccountsPayable(AccountsTestMixin, FrappeTestCase): def setUp(self): self.create_company() self.create_customer() diff --git a/erpnext/accounts/report/item_wise_sales_register/test_item_wise_sales_register.py b/erpnext/accounts/report/item_wise_sales_register/test_item_wise_sales_register.py new file mode 100644 index 00000000000..4dfdf3058e4 --- /dev/null +++ b/erpnext/accounts/report/item_wise_sales_register/test_item_wise_sales_register.py @@ -0,0 +1,65 @@ +import frappe +from frappe.tests.utils import FrappeTestCase +from frappe.utils import getdate, today + +from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice +from erpnext.accounts.report.item_wise_sales_register.item_wise_sales_register import execute +from erpnext.accounts.test.accounts_mixin import AccountsTestMixin + + +class TestItemWiseSalesRegister(AccountsTestMixin, FrappeTestCase): + def setUp(self): + self.create_company() + self.create_customer() + self.create_item() + self.clear_old_entries() + + def tearDown(self): + frappe.db.rollback() + + def create_sales_invoice(self, do_not_submit=False): + si = create_sales_invoice( + item=self.item, + company=self.company, + customer=self.customer, + debit_to=self.debit_to, + posting_date=today(), + parent_cost_center=self.cost_center, + cost_center=self.cost_center, + rate=100, + price_list_rate=100, + do_not_save=1, + ) + si = si.save() + if not do_not_submit: + si = si.submit() + return si + + def test_basic_report_output(self): + si = self.create_sales_invoice() + + filters = frappe._dict({"from_date": today(), "to_date": today(), "company": self.company}) + report = execute(filters) + + self.assertEqual(len(report[1]), 1) + + expected_result = { + "item_code": si.items[0].item_code, + "invoice": si.name, + "posting_date": getdate(), + "customer": si.customer, + "debit_to": si.debit_to, + "company": self.company, + "income_account": si.items[0].income_account, + "stock_qty": 1.0, + "stock_uom": si.items[0].stock_uom, + "rate": 100.0, + "amount": 100.0, + "total_tax": 0, + "total_other_charges": 0, + "total": 100.0, + "currency": "INR", + } + + report_output = {k: v for k, v in report[1][0].items() if k in expected_result} + self.assertDictEqual(report_output, expected_result) diff --git a/erpnext/assets/doctype/asset_depreciation_schedule/asset_depreciation_schedule.py b/erpnext/assets/doctype/asset_depreciation_schedule/asset_depreciation_schedule.py index bd67a173343..c533a634a5b 100644 --- a/erpnext/assets/doctype/asset_depreciation_schedule/asset_depreciation_schedule.py +++ b/erpnext/assets/doctype/asset_depreciation_schedule/asset_depreciation_schedule.py @@ -701,20 +701,57 @@ def get_straight_line_or_manual_depr_amount( def get_daily_prorata_based_straight_line_depr( asset, row, schedule_idx, number_of_pending_depreciations, amount ): - total_years = flt(number_of_pending_depreciations * row.frequency_of_depreciation) / 12 - every_year_depr = amount / total_years + daily_depr_amount = get_daily_depr_amount(asset, row, schedule_idx, amount) - year_start_date = add_years( - row.depreciation_start_date, (row.frequency_of_depreciation * schedule_idx) // 12 - ) - year_end_date = add_days(add_years(year_start_date, 1), -1) - daily_depr_amount = every_year_depr / (date_diff(year_end_date, year_start_date) + 1) from_date, total_depreciable_days = _get_total_days( row.depreciation_start_date, schedule_idx, row.frequency_of_depreciation ) return daily_depr_amount * total_depreciable_days +def get_daily_depr_amount(asset, row, schedule_idx, amount): + if cint(frappe.db.get_single_value("Accounts Settings", "calculate_depr_using_total_days")): + total_days = ( + date_diff( + get_last_day( + add_months( + row.depreciation_start_date, + flt( + row.total_number_of_depreciations + - asset.opening_number_of_booked_depreciations + - 1 + ) + * row.frequency_of_depreciation, + ) + ), + add_days( + get_last_day(add_months(row.depreciation_start_date, -1 * row.frequency_of_depreciation)), + 1, + ), + ) + + 1 + ) + + return amount / total_days + else: + total_years = ( + flt( + (row.total_number_of_depreciations - row.total_number_of_booked_depreciations) + * row.frequency_of_depreciation + ) + / 12 + ) + + every_year_depr = amount / total_years + + year_start_date = add_years( + row.depreciation_start_date, (row.frequency_of_depreciation * schedule_idx) // 12 + ) + year_end_date = add_days(add_years(year_start_date, 1), -1) + + return every_year_depr / (date_diff(year_end_date, year_start_date) + 1) + + def get_shift_depr_amount(asset_depr_schedule, asset, row, schedule_idx): if asset_depr_schedule.get("__islocal") and not asset.flags.shift_allocation: return ( diff --git a/erpnext/assets/doctype/asset_depreciation_schedule/test_asset_depreciation_schedule.py b/erpnext/assets/doctype/asset_depreciation_schedule/test_asset_depreciation_schedule.py index c359715571e..107d38057a2 100644 --- a/erpnext/assets/doctype/asset_depreciation_schedule/test_asset_depreciation_schedule.py +++ b/erpnext/assets/doctype/asset_depreciation_schedule/test_asset_depreciation_schedule.py @@ -75,6 +75,68 @@ class TestAssetDepreciationSchedule(FrappeTestCase): ] self.assertEqual(schedules, expected_schedules) + # Enable Checkbox to Calculate depreciation using total days in depreciation period + def test_daily_prorata_based_depr_after_enabling_configuration(self): + frappe.db.set_single_value("Accounts Settings", "calculate_depr_using_total_days", 1) + + asset = create_asset( + calculate_depreciation=1, + depreciation_method="Straight Line", + daily_prorata_based=1, + gross_purchase_amount=1096, + available_for_use_date="2020-01-15", + depreciation_start_date="2020-01-31", + frequency_of_depreciation=1, + total_number_of_depreciations=36, + ) + + expected_schedule = [ + ["2020-01-31", 17.0, 17.0], + ["2020-02-29", 29.0, 46.0], + ["2020-03-31", 31.0, 77.0], + ["2020-04-30", 30.0, 107.0], + ["2020-05-31", 31.0, 138.0], + ["2020-06-30", 30.0, 168.0], + ["2020-07-31", 31.0, 199.0], + ["2020-08-31", 31.0, 230.0], + ["2020-09-30", 30.0, 260.0], + ["2020-10-31", 31.0, 291.0], + ["2020-11-30", 30.0, 321.0], + ["2020-12-31", 31.0, 352.0], + ["2021-01-31", 31.0, 383.0], + ["2021-02-28", 28.0, 411.0], + ["2021-03-31", 31.0, 442.0], + ["2021-04-30", 30.0, 472.0], + ["2021-05-31", 31.0, 503.0], + ["2021-06-30", 30.0, 533.0], + ["2021-07-31", 31.0, 564.0], + ["2021-08-31", 31.0, 595.0], + ["2021-09-30", 30.0, 625.0], + ["2021-10-31", 31.0, 656.0], + ["2021-11-30", 30.0, 686.0], + ["2021-12-31", 31.0, 717.0], + ["2022-01-31", 31.0, 748.0], + ["2022-02-28", 28.0, 776.0], + ["2022-03-31", 31.0, 807.0], + ["2022-04-30", 30.0, 837.0], + ["2022-05-31", 31.0, 868.0], + ["2022-06-30", 30.0, 898.0], + ["2022-07-31", 31.0, 929.0], + ["2022-08-31", 31.0, 960.0], + ["2022-09-30", 30.0, 990.0], + ["2022-10-31", 31.0, 1021.0], + ["2022-11-30", 30.0, 1051.0], + ["2022-12-31", 31.0, 1082.0], + ["2023-01-15", 14.0, 1096.0], + ] + + schedules = [ + [cstr(d.schedule_date), d.depreciation_amount, d.accumulated_depreciation_amount] + for d in get_depr_schedule(asset.name, "Draft") + ] + self.assertEqual(schedules, expected_schedule) + frappe.db.set_single_value("Accounts Settings", "calculate_depr_using_total_days", 0) + # Test for Written Down Value Method # Frequency of deprciation = 3 def test_for_daily_prorata_based_depreciation_wdv_method_frequency_3_months(self): diff --git a/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py b/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py index 717b1c31026..c20eadeb78d 100644 --- a/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py +++ b/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py @@ -289,6 +289,11 @@ def repost(doc): if isinstance(message, dict): message = message.get("message") + status = "Failed" + # If failed because of timeout, set status to In Progress + if traceback and "timeout" in traceback.lower(): + status = "In Progress" + if traceback: message += "

" + "Traceback:
" + traceback @@ -297,7 +302,7 @@ def repost(doc): doc.name, { "error_log": message, - "status": "Failed", + "status": status, }, ) diff --git a/erpnext/stock/doctype/warehouse/warehouse.js b/erpnext/stock/doctype/warehouse/warehouse.js index 96cac9c06b2..6606a4f11a0 100644 --- a/erpnext/stock/doctype/warehouse/warehouse.js +++ b/erpnext/stock/doctype/warehouse/warehouse.js @@ -40,32 +40,40 @@ frappe.ui.form.on("Warehouse", { if (!frm.is_new()) { frappe.contacts.render_address_and_contact(frm); - let enable_toggle = frm.doc.disabled ? "Enable" : "Disable"; - frm.add_custom_button(__(enable_toggle), () => { - frm.set_value("disabled", 1 - frm.doc.disabled); - frm.save(); - }); - - frm.add_custom_button(__("Stock Balance"), function () { - frappe.set_route("query-report", "Stock Balance", { - warehouse: frm.doc.name, - company: frm.doc.company, + if (frm.has_perm("write")) { + let enable_toggle = frm.doc.disabled ? "Enable" : "Disable"; + frm.add_custom_button(__(enable_toggle), () => { + frm.set_value("disabled", 1 - frm.doc.disabled); + frm.save(); }); - }); - frm.add_custom_button( - frm.doc.is_group - ? __("Convert to Ledger", null, "Warehouse") - : __("Convert to Group", null, "Warehouse"), - function () { - convert_to_group_or_ledger(frm); - } - ); + frm.add_custom_button( + frm.doc.is_group + ? __("Convert to Ledger", null, "Warehouse") + : __("Convert to Group", null, "Warehouse"), + function () { + convert_to_group_or_ledger(frm); + } + ); + } + + if ("Stock Balance" in frappe.boot.user.all_reports) { + frm.add_custom_button(__("Stock Balance"), function () { + frappe.set_route("query-report", "Stock Balance", { + warehouse: frm.doc.name, + company: frm.doc.company, + }); + }); + } } else { frappe.contacts.clear_address_and_contact(frm); } - if (!frm.doc.is_group && frm.doc.__onload && frm.doc.__onload.account) { + if ( + !frm.doc.is_group && + frm.doc.__onload?.account && + "General Ledger" in frappe.boot.user.all_reports + ) { frm.add_custom_button(__("General Ledger", null, "Warehouse"), function () { frappe.route_options = { account: frm.doc.__onload.account, diff --git a/erpnext/stock/stock_ledger.py b/erpnext/stock/stock_ledger.py index ff4798515c3..e14b0f87501 100644 --- a/erpnext/stock/stock_ledger.py +++ b/erpnext/stock/stock_ledger.py @@ -267,6 +267,8 @@ def repost_future_sle( "posting_time": args[i].get("posting_time"), "creation": args[i].get("creation"), "distinct_item_warehouses": distinct_item_warehouses, + "items_to_be_repost": args, + "current_index": i, }, allow_negative_stock=allow_negative_stock, via_landed_cost_voucher=via_landed_cost_voucher, @@ -685,11 +687,20 @@ class update_entries_after: self.distinct_item_warehouses[key] = val self.new_items_found = True else: + # Check if the dependent voucher is reposted + # If not, then do not add it to the list + if not self.is_dependent_voucher_reposted(dependant_sle): + return + existing_sle_posting_date = self.distinct_item_warehouses[key].get("sle", {}).get("posting_date") dependent_voucher_detail_nos = self.get_dependent_voucher_detail_nos(key) - if getdate(dependant_sle.posting_date) < getdate(existing_sle_posting_date): + if dependent_voucher_detail_nos and dependant_sle.voucher_detail_no in set( + dependent_voucher_detail_nos + ): + return + val.sle_changed = True dependent_voucher_detail_nos.append(dependant_sle.voucher_detail_no) val.dependent_voucher_detail_nos = dependent_voucher_detail_nos @@ -703,6 +714,27 @@ class update_entries_after: val.dependent_voucher_detail_nos = dependent_voucher_detail_nos self.distinct_item_warehouses[key] = val + def is_dependent_voucher_reposted(self, dependant_sle) -> bool: + # Return False if the dependent voucher is not reposted + + if self.args.items_to_be_repost and self.args.current_index: + index = self.args.current_index + while index < len(self.args.items_to_be_repost): + if ( + self.args.items_to_be_repost[index].get("item_code") == dependant_sle.item_code + and self.args.items_to_be_repost[index].get("warehouse") == dependant_sle.warehouse + ): + if getdate(self.args.items_to_be_repost[index].get("posting_date")) > getdate( + dependant_sle.posting_date + ): + self.args.items_to_be_repost[index]["posting_date"] = dependant_sle.posting_date + + return False + + index += 1 + + return True + def get_dependent_voucher_detail_nos(self, key): if "dependent_voucher_detail_nos" not in self.distinct_item_warehouses[key]: self.distinct_item_warehouses[key].dependent_voucher_detail_nos = [] diff --git a/erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order.js b/erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order.js index 4ed73805314..c4eea3fda45 100644 --- a/erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order.js +++ b/erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order.js @@ -31,6 +31,22 @@ frappe.ui.form.on("Subcontracting Order", { }; }); + frm.set_query("cost_center", (doc) => { + return { + filters: { + company: doc.company, + }, + }; + }); + + frm.set_query("cost_center", "items", (doc) => { + return { + filters: { + company: doc.company, + }, + }; + }); + frm.set_query("set_warehouse", () => { return { filters: { diff --git a/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.js b/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.js index 8dfd9bd486d..b4a127702e0 100644 --- a/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.js +++ b/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.js @@ -174,6 +174,22 @@ frappe.ui.form.on("Subcontracting Receipt", { }; }); + frm.set_query("cost_center", (doc) => { + return { + filters: { + company: doc.company, + }, + }; + }); + + frm.set_query("cost_center", "items", (doc) => { + return { + filters: { + company: doc.company, + }, + }; + }); + frm.set_query("supplier_warehouse", () => { return { filters: { From 4b8b3ee46a88c5e478995cd4c88d4fd55e227f73 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Wed, 17 Jul 2024 05:19:44 +0000 Subject: [PATCH 0010/1614] chore(release): Bumped to Version 15.30.0 # [15.30.0](https://github.com/frappe/erpnext/compare/v15.29.4...v15.30.0) (2024-07-17) ### Bug Fixes * address and contact filters for SCO and SCR (backport [#42310](https://github.com/frappe/erpnext/issues/42310)) ([#42312](https://github.com/frappe/erpnext/issues/42312)) ([cb64c73](https://github.com/frappe/erpnext/commit/cb64c73c9e54dc6001a80fafb1f26faaa6352da9)) * bin deadlock issue (backport [#42342](https://github.com/frappe/erpnext/issues/42342)) ([#42357](https://github.com/frappe/erpnext/issues/42357)) ([29ee2d4](https://github.com/frappe/erpnext/commit/29ee2d46f0e493a3f22775a0cb7646555496c668)) * cost center filter by company (backport [#42297](https://github.com/frappe/erpnext/issues/42297)) ([#42299](https://github.com/frappe/erpnext/issues/42299)) ([4c9ce1b](https://github.com/frappe/erpnext/commit/4c9ce1b188672fe43f62735023b43694d71fa9f6)) * extra qty pick in pick list (backport [#42345](https://github.com/frappe/erpnext/issues/42345)) ([#42349](https://github.com/frappe/erpnext/issues/42349)) ([1754adf](https://github.com/frappe/erpnext/commit/1754adfcd64985866f0cf8d3aa5b2a6414ebc374)) * **gross profit:** incorrect valuation rate on different warehouses ([f161e59](https://github.com/frappe/erpnext/commit/f161e59cd7de888e6dc1975c736f480b0e4964ae)) * incoming rate zero for supplied items in returned SCR (backport [#42314](https://github.com/frappe/erpnext/issues/42314)) ([#42315](https://github.com/frappe/erpnext/issues/42315)) ([076bf17](https://github.com/frappe/erpnext/commit/076bf174396e045f8e87af165e40dbea718111cc)) * items not fetching in End Transit entry (backport [#42358](https://github.com/frappe/erpnext/issues/42358)) ([#42361](https://github.com/frappe/erpnext/issues/42361)) ([b5a2e5a](https://github.com/frappe/erpnext/commit/b5a2e5a375b39edf5f22a4d2276faeb3a4f85ced)) * keep status as In Progress for RIV for Timeout Error (backport [#42274](https://github.com/frappe/erpnext/issues/42274)) ([#42296](https://github.com/frappe/erpnext/issues/42296)) ([1de66e5](https://github.com/frappe/erpnext/commit/1de66e56eeb97d2f1c589298400e79ee9aaf1b02)) * missing discount on POS Credit Notes ([4055ef9](https://github.com/frappe/erpnext/commit/4055ef92b53e1528b2c286ff4028f3c501d1ea30)) * not able to cancel the inter transfer DN (backport [#42333](https://github.com/frappe/erpnext/issues/42333)) ([#42340](https://github.com/frappe/erpnext/issues/42340)) ([cf2651d](https://github.com/frappe/erpnext/commit/cf2651dd8597a4aacae9b6f89fea7d2ea138851d)) * not able to submit LCV entry (backport [#42303](https://github.com/frappe/erpnext/issues/42303)) ([#42304](https://github.com/frappe/erpnext/issues/42304)) ([6d098b7](https://github.com/frappe/erpnext/commit/6d098b7302f3409a7fa20e89611a6346f57d1463)) * remove doctype link from serial no ledger report (backport [#42327](https://github.com/frappe/erpnext/issues/42327)) ([#42348](https://github.com/frappe/erpnext/issues/42348)) ([b741b2a](https://github.com/frappe/erpnext/commit/b741b2a2858e0d106635c6be40ee2a6781af4d57)) * removed patch from patches.txt ([c45d11c](https://github.com/frappe/erpnext/commit/c45d11cd60d21064564d8266d70db6c08a25a91d)) * same posting date and time causing incorrect valuation rate (backport [#42351](https://github.com/frappe/erpnext/issues/42351)) ([#42356](https://github.com/frappe/erpnext/issues/42356)) ([62fc428](https://github.com/frappe/erpnext/commit/62fc42803f69a6e8a99b88f993276d0207a30792)) * service item capitalization ([#42188](https://github.com/frappe/erpnext/issues/42188)) ([2ffe7d5](https://github.com/frappe/erpnext/commit/2ffe7d5838464a222047cd26a045bc522da86edd)) * show total rows credit row in balance sheet ([0d2ef0d](https://github.com/frappe/erpnext/commit/0d2ef0df7dbc48d759fccd7516b5382eb4f45324)) * slowness in reposting dependent vouchers. (backport [#42282](https://github.com/frappe/erpnext/issues/42282)) ([#42292](https://github.com/frappe/erpnext/issues/42292)) ([ef16313](https://github.com/frappe/erpnext/commit/ef16313e0a4e09105dd1f0a3c004076675927b14)) * **Warehouse:** add buttons only if the user can use them ([a2b21c7](https://github.com/frappe/erpnext/commit/a2b21c757043cddd48fb67394d6c09a41bbfc65c)) * While submitting PCV ensure previous FY is closed (backport [#42284](https://github.com/frappe/erpnext/issues/42284)) ([#42300](https://github.com/frappe/erpnext/issues/42300)) ([e250dcc](https://github.com/frappe/erpnext/commit/e250dcc7c87e706055bfb92b72c7fa459d3208bc)) ### Features * configurable depreciation calculation via accounts settings ([#42276](https://github.com/frappe/erpnext/issues/42276)) ([ddd1ca7](https://github.com/frappe/erpnext/commit/ddd1ca7f7c2e2bdf5af2e535889d5ba714240079)) * create variant with/without image (backport [#41317](https://github.com/frappe/erpnext/issues/41317)) ([#42343](https://github.com/frappe/erpnext/issues/42343)) ([5f1d6ed](https://github.com/frappe/erpnext/commit/5f1d6ede31fd37454fd9de5f6500481ad3b4267a)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 2fbbc6ac1d2..63bf7fc9dc2 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -3,7 +3,7 @@ import inspect import frappe -__version__ = "15.29.3" +__version__ = "15.30.0" def get_default_company(user=None): From e28c1e9c4bc987ba38ffef4414738d6a14642ded Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Wed, 24 Jul 2024 07:28:24 +0000 Subject: [PATCH 0011/1614] chore(release): Bumped to Version 15.31.0 # [15.31.0](https://github.com/frappe/erpnext/compare/v15.30.0...v15.31.0) (2024-07-24) ### Bug Fixes * Consider adding warranty period to serial nos (backport [#42051](https://github.com/frappe/erpnext/issues/42051)) ([#42182](https://github.com/frappe/erpnext/issues/42182)) ([8da28dc](https://github.com/frappe/erpnext/commit/8da28dcfb29ad5f922bd9d24215fe95c2909feb9)) * correct validation for depreciation posting date ([ffacf42](https://github.com/frappe/erpnext/commit/ffacf4222b0401f19a3986ff9d29d513084a6e32)) * Don't allow negative amount on Payment Request [#41905](https://github.com/frappe/erpnext/issues/41905) ([aee2cc2](https://github.com/frappe/erpnext/commit/aee2cc2e033b429a98bda6a54562a652a4d17f9f)) * missing cr/dr notes on payment reconciliation ([0a41ccd](https://github.com/frappe/erpnext/commit/0a41ccda9935d5096c235d43111a9283d7287760)) * not able to save QC (backport [#42371](https://github.com/frappe/erpnext/issues/42371)) ([#42373](https://github.com/frappe/erpnext/issues/42373)) ([18500b8](https://github.com/frappe/erpnext/commit/18500b8e3a887649413294be9d7960b8981e01e9)) * provide initial value for `.reduce()` call ([72bc539](https://github.com/frappe/erpnext/commit/72bc539ffdca0594d2175ba967c1285b691c74ac)) * Purchase Order Analysis Report Data (backport [#42387](https://github.com/frappe/erpnext/issues/42387)) ([#42394](https://github.com/frappe/erpnext/issues/42394)) ([709be13](https://github.com/frappe/erpnext/commit/709be13e8288d12204fc30109273293fb4d44582)) * qty in the 'Serial No Ledger' report (backport [#42429](https://github.com/frappe/erpnext/issues/42429)) ([#42433](https://github.com/frappe/erpnext/issues/42433)) ([926fd41](https://github.com/frappe/erpnext/commit/926fd41a2b4b5b08883383f9dbe5e3df701b0e04)) * remove proprietorship and update it with individual ([527781a](https://github.com/frappe/erpnext/commit/527781a588a986223716cf838f6a6a4c1a1882c3)) * rounding issue causing incorrect quantity in SE (backport [#42380](https://github.com/frappe/erpnext/issues/42380)) ([#42395](https://github.com/frappe/erpnext/issues/42395)) ([54791e9](https://github.com/frappe/erpnext/commit/54791e938bd56eb81f7d8d923381a006998919fe)) * serial and batch bundle for POS Invoice (backport [#41491](https://github.com/frappe/erpnext/issues/41491)) ([#42396](https://github.com/frappe/erpnext/issues/42396)) ([555be2b](https://github.com/frappe/erpnext/commit/555be2be11623d8fd8018ab3a2807e07a1050cf6)) * set filter to show only submitted asset ([29fc975](https://github.com/frappe/erpnext/commit/29fc975fb8830f3ce0dbed5e5797bd100718de9b)) * Show the rows in AR/AP report where outstanding equals to 0.01 ([886256c](https://github.com/frappe/erpnext/commit/886256c86b94aaf2e91e4ca6c6652bd503bb2ca2)) ### Features * add make_regional_gl_entries override for Sales Invoice ([#42399](https://github.com/frappe/erpnext/issues/42399)) ([22b17de](https://github.com/frappe/erpnext/commit/22b17de2b4adfc2383e2ed3ba1377c2febd2b54c)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 63bf7fc9dc2..4de860c504e 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -3,7 +3,7 @@ import inspect import frappe -__version__ = "15.30.0" +__version__ = "15.31.0" def get_default_company(user=None): From 4bae4194abbf962d2f4b7fdfeaea0232fdaa6aa5 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 24 Jul 2024 19:29:40 +0530 Subject: [PATCH 0012/1614] fix: incorrect current qty for the batch in stock reco (backport #42434) (backport #42459) (#42463) fix: incorrect current qty for the batch in stock reco (backport #42434) (#42459) fix: incorrect current qty for the batch in stock reco (#42434) (cherry picked from commit 9cd33741014e2f84614df73090617a9f53294d01) Co-authored-by: rohitwaghchaure (cherry picked from commit 298a5699f138d795d69889b63ece45400328499b) Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- .../serial_and_batch_bundle.py | 15 +++ .../stock_reconciliation.py | 25 +++-- .../test_stock_reconciliation.py | 93 +++++++++++++++++++ 3 files changed, 124 insertions(+), 9 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 9b65e11f430..615d98a448d 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 @@ -2188,6 +2188,8 @@ def get_stock_ledgers_for_serial_nos(kwargs): def get_stock_ledgers_batches(kwargs): + from erpnext.stock.utils import get_combine_datetime + stock_ledger_entry = frappe.qb.DocType("Stock Ledger Entry") batch_table = frappe.qb.DocType("Batch") @@ -2214,6 +2216,19 @@ def get_stock_ledgers_batches(kwargs): else: query = query.where(stock_ledger_entry[field] == kwargs.get(field)) + if kwargs.get("posting_date"): + if kwargs.get("posting_time") is None: + kwargs.posting_time = nowtime() + + timestamp_condition = stock_ledger_entry.posting_datetime <= get_combine_datetime( + kwargs.posting_date, kwargs.posting_time + ) + + query = query.where(timestamp_condition) + + if kwargs.get("ignore_voucher_nos"): + query = query.where(stock_ledger_entry.voucher_no.notin(kwargs.get("ignore_voucher_nos"))) + if kwargs.based_on == "LIFO": query = query.orderby(batch_table.creation, order=frappe.qb.desc) elif kwargs.based_on == "Expiry": diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py index 674624e184b..93e3e69729b 100644 --- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py +++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py @@ -16,7 +16,7 @@ from erpnext.stock.doctype.serial_and_batch_bundle.serial_and_batch_bundle impor get_available_serial_nos, ) from erpnext.stock.doctype.serial_no.serial_no import get_serial_nos -from erpnext.stock.utils import get_stock_balance +from erpnext.stock.utils import get_incoming_rate, get_stock_balance class OpeningEntryAccountError(frappe.ValidationError): @@ -952,14 +952,21 @@ class StockReconciliation(StockController): precesion = row.precision("current_qty") if flt(current_qty, precesion) != flt(row.current_qty, precesion): if not row.serial_no: - val_rate = get_valuation_rate( - row.item_code, - row.warehouse, - self.doctype, - self.name, - company=self.company, - batch_no=row.batch_no, - serial_and_batch_bundle=row.current_serial_and_batch_bundle, + val_rate = get_incoming_rate( + frappe._dict( + { + "item_code": row.item_code, + "warehouse": row.warehouse, + "qty": current_qty * -1, + "serial_and_batch_bundle": row.current_serial_and_batch_bundle, + "batch_no": row.batch_no, + "voucher_type": self.doctype, + "voucher_no": self.name, + "company": self.company, + "posting_date": self.posting_date, + "posting_time": self.posting_time, + } + ) ) row.current_valuation_rate = val_rate diff --git a/erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.py b/erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.py index 48d67c2cf46..9bb6ba9ec90 100644 --- a/erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.py +++ b/erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.py @@ -4,6 +4,7 @@ # ERPNext - web based ERP (http://erpnext.com) # For license information, please see license.txt +import json import frappe from frappe.tests.utils import FrappeTestCase, change_settings @@ -1182,6 +1183,98 @@ class TestStockReconciliation(FrappeTestCase, StockTestMixin): self.assertAlmostEqual(row.incoming_rate, 1000.00) self.assertEqual(row.serial_no, serial_nos[row.idx - 1]) + def test_stock_reco_with_legacy_batch(self): + from erpnext.stock.doctype.batch.batch import get_batch_qty + + batch_item_code = self.make_item( + "Test Batch Item Legacy Batch 1", + { + "is_stock_item": 1, + "has_batch_no": 1, + "create_new_batch": 1, + "batch_number_series": "BH1-NRALL-S-.###", + }, + ).name + + warehouse = "_Test Warehouse - _TC" + + frappe.flags.ignore_serial_batch_bundle_validation = True + frappe.flags.use_serial_and_batch_fields = True + + batch_id = "BH1-NRALL-S-0001" + if not frappe.db.exists("Batch", batch_id): + batch_doc = frappe.get_doc( + { + "doctype": "Batch", + "batch_id": batch_id, + "item": batch_item_code, + "use_batchwise_valuation": 0, + } + ).insert(ignore_permissions=True) + + self.assertTrue(batch_doc.use_batchwise_valuation) + + stock_queue = [] + qty_after_transaction = 0 + balance_value = 0 + i = 0 + for qty, valuation in {10: 100, 20: 200}.items(): + i += 1 + stock_queue.append([qty, valuation]) + qty_after_transaction += qty + balance_value += qty_after_transaction * valuation + + doc = frappe.get_doc( + { + "doctype": "Stock Ledger Entry", + "posting_date": add_days(nowdate(), -2 * i), + "posting_time": nowtime(), + "batch_no": batch_id, + "incoming_rate": valuation, + "qty_after_transaction": qty_after_transaction, + "stock_value_difference": valuation * qty, + "balance_value": balance_value, + "valuation_rate": balance_value / qty_after_transaction, + "actual_qty": qty, + "item_code": batch_item_code, + "warehouse": "_Test Warehouse - _TC", + "stock_queue": json.dumps(stock_queue), + } + ) + + doc.flags.ignore_permissions = True + doc.flags.ignore_mandatory = True + doc.flags.ignore_links = True + doc.flags.ignore_validate = True + doc.submit() + doc.reload() + + frappe.flags.ignore_serial_batch_bundle_validation = False + frappe.flags.use_serial_and_batch_fields = False + + batch_doc = frappe.get_doc("Batch", batch_id) + + qty = get_batch_qty(batch_id, warehouse, batch_item_code) + self.assertEqual(qty, 30) + + sr = create_stock_reconciliation( + item_code=batch_item_code, + posting_date=add_days(nowdate(), -3), + posting_time=nowtime(), + warehouse=warehouse, + qty=100, + rate=1000, + reconcile_all_serial_batch=0, + batch_no=batch_id, + use_serial_batch_fields=1, + ) + + self.assertEqual(sr.items[0].current_qty, 20) + self.assertEqual(sr.items[0].qty, 100) + + qty = get_batch_qty(batch_id, warehouse, batch_item_code) + self.assertEqual(qty, 110) + def create_batch_item_with_batch(item_name, batch_id): batch_item_doc = create_item(item_name, is_stock_item=1) From 2de69e2b1267c62fd8568801e948a47a81bf8bdf Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Wed, 24 Jul 2024 14:00:57 +0000 Subject: [PATCH 0013/1614] chore(release): Bumped to Version 15.31.1 ## [15.31.1](https://github.com/frappe/erpnext/compare/v15.31.0...v15.31.1) (2024-07-24) ### Bug Fixes * incorrect current qty for the batch in stock reco (backport [#42434](https://github.com/frappe/erpnext/issues/42434)) (backport [#42459](https://github.com/frappe/erpnext/issues/42459)) ([#42463](https://github.com/frappe/erpnext/issues/42463)) ([4bae419](https://github.com/frappe/erpnext/commit/4bae4194abbf962d2f4b7fdfeaea0232fdaa6aa5)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 4de860c504e..62a018c0e6b 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -3,7 +3,7 @@ import inspect import frappe -__version__ = "15.31.0" +__version__ = "15.31.1" def get_default_company(user=None): From 334c4d06766b67a4e35b4ec4fe99a9d8dc07691a Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Sat, 27 Jul 2024 11:07:20 +0530 Subject: [PATCH 0014/1614] fix: dynamic condition in the pricing rule not working (backport #42467) (backport #42495) (#42496) fix: dynamic condition in the pricing rule not working (backport #42467) (#42495) fix: dynamic condition in the pricing rule not working (#42467) (cherry picked from commit 0e817f42ef96632df164fac6e5b2949a0d18e9f5) Co-authored-by: rohitwaghchaure (cherry picked from commit ac2ef218968e3855e015cc20cb2225f6d1f32c0c) Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- erpnext/public/js/controllers/transaction.js | 2 +- erpnext/stock/get_item_details.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index dfb0ded8139..3e9a286b4cf 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -1796,7 +1796,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe me.in_apply_price_list = true; return this.frm.call({ method: "erpnext.stock.get_item_details.apply_price_list", - args: { args: args }, + args: { args: args, doc: me.frm.doc }, callback: function(r) { if (!r.exc) { frappe.run_serially([ diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py index a7aa7dce452..fe4d3b8602c 100644 --- a/erpnext/stock/get_item_details.py +++ b/erpnext/stock/get_item_details.py @@ -1189,7 +1189,7 @@ def get_batch_qty(batch_no, warehouse, item_code): @frappe.whitelist() -def apply_price_list(args, as_doc=False): +def apply_price_list(args, as_doc=False, doc=None): """Apply pricelist on a document-like dict object and return as {'parent': dict, 'children': list} @@ -1228,7 +1228,7 @@ def apply_price_list(args, as_doc=False): for item in item_list: args_copy = frappe._dict(args.copy()) args_copy.update(item) - item_details = apply_price_list_on_item(args_copy) + item_details = apply_price_list_on_item(args_copy, doc=doc) children.append(item_details) if as_doc: @@ -1246,10 +1246,10 @@ def apply_price_list(args, as_doc=False): return {"parent": parent, "children": children} -def apply_price_list_on_item(args): +def apply_price_list_on_item(args, doc=None): item_doc = frappe.db.get_value("Item", args.item_code, ["name", "variant_of"], as_dict=1) item_details = get_price_list_rate(args, item_doc) - item_details.update(get_pricing_rule_for_item(args)) + item_details.update(get_pricing_rule_for_item(args, doc=doc)) return item_details From 4b66fcad64aa3f64aa3d4727d2d89e23d4f5b617 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Sat, 27 Jul 2024 05:38:30 +0000 Subject: [PATCH 0015/1614] chore(release): Bumped to Version 15.31.2 ## [15.31.2](https://github.com/frappe/erpnext/compare/v15.31.1...v15.31.2) (2024-07-27) ### Bug Fixes * dynamic condition in the pricing rule not working (backport [#42467](https://github.com/frappe/erpnext/issues/42467)) (backport [#42495](https://github.com/frappe/erpnext/issues/42495)) ([#42496](https://github.com/frappe/erpnext/issues/42496)) ([334c4d0](https://github.com/frappe/erpnext/commit/334c4d06766b67a4e35b4ec4fe99a9d8dc07691a)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 62a018c0e6b..496ee5fe286 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -3,7 +3,7 @@ import inspect import frappe -__version__ = "15.31.1" +__version__ = "15.31.2" def get_default_company(user=None): From da3eddeb26fa0bf2510c73b34ddeaba91bfa7938 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Wed, 31 Jul 2024 06:03:49 +0000 Subject: [PATCH 0016/1614] chore(release): Bumped to Version 15.31.3 ## [15.31.3](https://github.com/frappe/erpnext/compare/v15.31.2...v15.31.3) (2024-07-31) ### Bug Fixes * Adjust initial month's depreciation to end of depreciation period ([9d2ef4d](https://github.com/frappe/erpnext/commit/9d2ef4d3e8430f358e80a8d171816ef807d4d84d)) * builtins.KeyError: ('ABC', 'Store - CP') (backport [#42505](https://github.com/frappe/erpnext/issues/42505)) ([#42509](https://github.com/frappe/erpnext/issues/42509)) ([f25b38c](https://github.com/frappe/erpnext/commit/f25b38caf58ff5cb469c3c71a080a339c5eaef06)) * consider payment entries for checking if tds is deducted ([183ac41](https://github.com/frappe/erpnext/commit/183ac4155046dc5d18f9a28c560b7586c5f12b4b)) * dynamic condition in the pricing rule not working (backport [#42467](https://github.com/frappe/erpnext/issues/42467)) ([#42495](https://github.com/frappe/erpnext/issues/42495)) ([ac2ef21](https://github.com/frappe/erpnext/commit/ac2ef218968e3855e015cc20cb2225f6d1f32c0c)) * field_type is small text for v15 ([9e99eda](https://github.com/frappe/erpnext/commit/9e99eda3c3d2fa1ca409639fe559a5763b03b6d1)) * fields alteration related to subcontracting ([80d4dc2](https://github.com/frappe/erpnext/commit/80d4dc2016cd692b5e515b08e559324600b0ce43)) * Fields Modification for Subcontracting DocTypes ([#42383](https://github.com/frappe/erpnext/issues/42383)) ([422824b](https://github.com/frappe/erpnext/commit/422824b9e78963bb20fde2f3967950e20b78525e)) * ignore duplicates while creating default templates ([aea8271](https://github.com/frappe/erpnext/commit/aea8271f7e14ff6179e6f211d00175e086d90758)) * incorrect cost_center on AR/AP report ([0c2e948](https://github.com/frappe/erpnext/commit/0c2e9480cb8e4f42a2d90fd6b51e0479be20bb14)) * incorrect current qty for the batch in stock reco (backport [#42434](https://github.com/frappe/erpnext/issues/42434)) ([#42459](https://github.com/frappe/erpnext/issues/42459)) ([298a569](https://github.com/frappe/erpnext/commit/298a5699f138d795d69889b63ece45400328499b)) * keyerror posting_time (backport [#42452](https://github.com/frappe/erpnext/issues/42452)) ([#42460](https://github.com/frappe/erpnext/issues/42460)) ([2d2140a](https://github.com/frappe/erpnext/commit/2d2140aad0fb306d9f6a65402aea1fc2d8e13deb)) * not able to save BOM Creator ([#42540](https://github.com/frappe/erpnext/issues/42540)) ([61280e6](https://github.com/frappe/erpnext/commit/61280e607269bc4991ec863fe166895e55468afd)) * parenttype in item wise purchase and sales register ([322fbe9](https://github.com/frappe/erpnext/commit/322fbe92eed9d0fa6bd5d597d382443bcf819c7a)) * performance issue for the report Purchase Order Analysis report (backport [#42503](https://github.com/frappe/erpnext/issues/42503)) ([#42507](https://github.com/frappe/erpnext/issues/42507)) ([edf1fcb](https://github.com/frappe/erpnext/commit/edf1fcb7429eab23ca54c8c0c5c1d600e1d0dcd5)) * price_list_currency not found error (backport [#42534](https://github.com/frappe/erpnext/issues/42534)) ([#42539](https://github.com/frappe/erpnext/issues/42539)) ([5fa185d](https://github.com/frappe/erpnext/commit/5fa185d480000ead606e8c0dcfe93c303b6b2f82)) * purchase return from rejected warehouse (backport [#42531](https://github.com/frappe/erpnext/issues/42531)) ([#42535](https://github.com/frappe/erpnext/issues/42535)) ([b7d70ac](https://github.com/frappe/erpnext/commit/b7d70ac9286aad917bc73a903dc2557c59c8c64f)) * set pos data if not return doc ([25fe08e](https://github.com/frappe/erpnext/commit/25fe08eb740ebeb8e5a6c39189c1d92651f08a6b)) * **tests:** added tests for usecase ([1390c86](https://github.com/frappe/erpnext/commit/1390c86fc488e17d64fe6dc5b8bd22c03c08f9e7)) * warehouse filter in Product Bundle Balance (backport [#42532](https://github.com/frappe/erpnext/issues/42532)) ([#42537](https://github.com/frappe/erpnext/issues/42537)) ([826577c](https://github.com/frappe/erpnext/commit/826577c88f12dcb4b25a5a051c97b9158f4a6632)) * Warranty Expiry Date not set in the serial number (backport [#42513](https://github.com/frappe/erpnext/issues/42513)) ([#42515](https://github.com/frappe/erpnext/issues/42515)) ([fc0db19](https://github.com/frappe/erpnext/commit/fc0db1941a5915f7d2d3c9b79e27d7fce8e30b35)) ### Performance Improvements * huge number of serial no creation (backport [#42522](https://github.com/frappe/erpnext/issues/42522)) ([#42544](https://github.com/frappe/erpnext/issues/42544)) ([6840f6c](https://github.com/frappe/erpnext/commit/6840f6cb26054c89b8277bbbd4a06a96b39dcd68)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 496ee5fe286..29a6e351461 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -3,7 +3,7 @@ import inspect import frappe -__version__ = "15.31.2" +__version__ = "15.31.3" def get_default_company(user=None): From bf0e2b3b52d2bb0f5f0d4a07923c4ac23a7842df Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 1 Aug 2024 13:22:33 +0530 Subject: [PATCH 0017/1614] fix: inter transfer delivery note issue with batch (backport #42552) (#42556) fix: inter transfer delivery note issue with batch (#42552) (cherry picked from commit f620ef20aee3e74528d1c3916a77ff4adfeb0f08) Co-authored-by: rohitwaghchaure (cherry picked from commit 97cc3082e190e730c467c3db85dddb1f62a963cb) --- erpnext/controllers/selling_controller.py | 4 +- .../purchase_receipt/test_purchase_receipt.py | 116 ++++++++++++++++++ 2 files changed, 119 insertions(+), 1 deletion(-) diff --git a/erpnext/controllers/selling_controller.py b/erpnext/controllers/selling_controller.py index 7a85d2230f1..fd856194559 100644 --- a/erpnext/controllers/selling_controller.py +++ b/erpnext/controllers/selling_controller.py @@ -539,7 +539,9 @@ class SellingController(StockController): def get_sle_for_source_warehouse(self, item_row): serial_and_batch_bundle = ( - item_row.serial_and_batch_bundle if not self.is_internal_transfer() else None + item_row.serial_and_batch_bundle + if not self.is_internal_transfer() or self.docstatus == 1 + else None ) if serial_and_batch_bundle and self.is_internal_transfer() and self.is_return: if self.docstatus == 1: diff --git a/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py index 416a2db43c4..c239360d945 100644 --- a/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py +++ b/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py @@ -3476,6 +3476,122 @@ class TestPurchaseReceipt(FrappeTestCase): frappe.db.set_single_value("Stock Settings", "use_serial_batch_fields", 1) + def test_internal_transfer_for_batch_items_with_cancel_use_serial_batch_fields(self): + from erpnext.controllers.sales_and_purchase_return import make_return_doc + from erpnext.stock.doctype.delivery_note.delivery_note import make_inter_company_purchase_receipt + from erpnext.stock.doctype.delivery_note.test_delivery_note import create_delivery_note + + frappe.db.set_single_value("Stock Settings", "use_serial_batch_fields", 1) + frappe.db.set_single_value("Stock Settings", "auto_create_serial_and_batch_bundle_for_outward", 0) + + prepare_data_for_internal_transfer() + + customer = "_Test Internal Customer 2" + company = "_Test Company with perpetual inventory" + + batch_item_doc = make_item( + "_Test Batch Item For Stock Transfer Cancel Case 11", + {"has_batch_no": 1, "create_new_batch": 1, "batch_number_series": "USBF11-BT-CANBIFST-.####"}, + ) + + serial_item_doc = make_item( + "_Test Serial No Item For Stock Transfer Cancel Case 11", + {"has_serial_no": 1, "serial_no_series": "USBF11-BT-CANBIFST-.####"}, + ) + + inward_entry = make_purchase_receipt( + item_code=batch_item_doc.name, + qty=10, + rate=150, + warehouse="Stores - TCP1", + company="_Test Company with perpetual inventory", + use_serial_batch_fields=1, + do_not_submit=1, + ) + + inward_entry.append( + "items", + { + "item_code": serial_item_doc.name, + "qty": 15, + "rate": 250, + "item_name": serial_item_doc.item_name, + "conversion_factor": 1.0, + "uom": serial_item_doc.stock_uom, + "stock_uom": serial_item_doc.stock_uom, + "warehouse": "Stores - TCP1", + "use_serial_batch_fields": 1, + }, + ) + + inward_entry.submit() + inward_entry.reload() + + for row in inward_entry.items: + self.assertTrue(row.serial_and_batch_bundle) + + inter_transfer_dn = create_delivery_note( + item_code=inward_entry.items[0].item_code, + company=company, + customer=customer, + cost_center="Main - TCP1", + expense_account="Cost of Goods Sold - TCP1", + qty=10, + rate=500, + warehouse="Stores - TCP1", + target_warehouse="Work In Progress - TCP1", + batch_no=get_batch_from_bundle(inward_entry.items[0].serial_and_batch_bundle), + use_serial_batch_fields=1, + do_not_submit=1, + ) + + inter_transfer_dn.append( + "items", + { + "item_code": serial_item_doc.name, + "qty": 15, + "rate": 350, + "item_name": serial_item_doc.item_name, + "conversion_factor": 1.0, + "uom": serial_item_doc.stock_uom, + "stock_uom": serial_item_doc.stock_uom, + "warehouse": "Stores - TCP1", + "target_warehouse": "Work In Progress - TCP1", + "serial_no": "\n".join( + get_serial_nos_from_bundle(inward_entry.items[1].serial_and_batch_bundle) + ), + "use_serial_batch_fields": 1, + }, + ) + + inter_transfer_dn.submit() + inter_transfer_dn.reload() + for row in inter_transfer_dn.items: + if row.item_code == batch_item_doc.name: + self.assertEqual(row.rate, 150.0) + else: + self.assertEqual(row.rate, 250.0) + + self.assertTrue(row.serial_and_batch_bundle) + + inter_transfer_pr = make_inter_company_purchase_receipt(inter_transfer_dn.name) + for row in inter_transfer_pr.items: + row.from_warehouse = "Work In Progress - TCP1" + row.warehouse = "Stores - TCP1" + inter_transfer_pr.submit() + + for row in inter_transfer_pr.items: + if row.item_code == batch_item_doc.name: + self.assertEqual(row.rate, 150.0) + else: + self.assertEqual(row.rate, 250.0) + + self.assertTrue(row.serial_and_batch_bundle) + + inter_transfer_pr.cancel() + inter_transfer_dn.cancel() + frappe.db.set_single_value("Stock Settings", "auto_create_serial_and_batch_bundle_for_outward", 1) + def prepare_data_for_internal_transfer(): from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_internal_supplier From 703b9accb8b6ffa3666f6d9c7d34a9d248fd4b0a Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Thu, 1 Aug 2024 09:12:25 +0000 Subject: [PATCH 0018/1614] chore(release): Bumped to Version 15.31.4 ## [15.31.4](https://github.com/frappe/erpnext/compare/v15.31.3...v15.31.4) (2024-08-01) ### Bug Fixes * inter transfer delivery note issue with batch (backport [#42552](https://github.com/frappe/erpnext/issues/42552)) ([#42556](https://github.com/frappe/erpnext/issues/42556)) ([bf0e2b3](https://github.com/frappe/erpnext/commit/bf0e2b3b52d2bb0f5f0d4a07923c4ac23a7842df)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 29a6e351461..c6ee5697976 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -3,7 +3,7 @@ import inspect import frappe -__version__ = "15.31.3" +__version__ = "15.31.4" def get_default_company(user=None): From 02a31caa050556408fdae1e8ed5121e2783f4218 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Sat, 3 Aug 2024 09:27:16 +0530 Subject: [PATCH 0019/1614] fix: use get_last_day to get the correct date (backport #42564) (#42602) fix: use get_last_day to get the correct date (#42564) (cherry picked from commit 5d58eb67a6e025811ef0b2f1b96e3a5ccbded336) Co-authored-by: Khushi Rawat <142375893+khushi8112@users.noreply.github.com> --- .../asset_depreciation_schedule.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/erpnext/assets/doctype/asset_depreciation_schedule/asset_depreciation_schedule.py b/erpnext/assets/doctype/asset_depreciation_schedule/asset_depreciation_schedule.py index 02fcb8efb3d..e7b5a25cc73 100644 --- a/erpnext/assets/doctype/asset_depreciation_schedule/asset_depreciation_schedule.py +++ b/erpnext/assets/doctype/asset_depreciation_schedule/asset_depreciation_schedule.py @@ -729,10 +729,15 @@ def get_daily_depr_amount(asset, row, schedule_idx, amount): ) ), add_days( - add_months( - row.depreciation_start_date, - (row.frequency_of_depreciation * (asset.opening_number_of_booked_depreciations + 1)) - * -1, + get_last_day( + add_months( + row.depreciation_start_date, + ( + row.frequency_of_depreciation + * (asset.opening_number_of_booked_depreciations + 1) + ) + * -1, + ), ), 1, ), From d8080910c6a243b33e55409e42cb07ea56ca85c5 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Sat, 3 Aug 2024 03:58:31 +0000 Subject: [PATCH 0020/1614] chore(release): Bumped to Version 15.31.5 ## [15.31.5](https://github.com/frappe/erpnext/compare/v15.31.4...v15.31.5) (2024-08-03) ### Bug Fixes * use get_last_day to get the correct date (backport [#42564](https://github.com/frappe/erpnext/issues/42564)) ([#42602](https://github.com/frappe/erpnext/issues/42602)) ([02a31ca](https://github.com/frappe/erpnext/commit/02a31caa050556408fdae1e8ed5121e2783f4218)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index c6ee5697976..efe34d54580 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -3,7 +3,7 @@ import inspect import frappe -__version__ = "15.31.4" +__version__ = "15.31.5" def get_default_company(user=None): From 2c21df2ad96f4eb2fee044ecd9b4828a3dad0ee3 Mon Sep 17 00:00:00 2001 From: Abhishek Chougule Date: Sat, 3 Aug 2024 10:54:51 +0530 Subject: [PATCH 0021/1614] fix: correct garbage value on Razorpay Payments Page --- .../payment_request/payment_request.py | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/erpnext/accounts/doctype/payment_request/payment_request.py b/erpnext/accounts/doctype/payment_request/payment_request.py index 48bb6f2ae86..707cfc07533 100644 --- a/erpnext/accounts/doctype/payment_request/payment_request.py +++ b/erpnext/accounts/doctype/payment_request/payment_request.py @@ -258,19 +258,19 @@ class PaymentRequest(Document): if hasattr(controller, "validate_minimum_transaction_amount"): controller.validate_minimum_transaction_amount(self.currency, self.grand_total) - return controller.get_payment_url( - **{ - "amount": flt(self.grand_total, self.precision("grand_total")), - "title": data.company.encode("utf-8"), - "description": self.subject.encode("utf-8"), - "reference_doctype": "Payment Request", - "reference_docname": self.name, - "payer_email": self.email_to or frappe.session.user, - "payer_name": frappe.safe_encode(data.customer_name), - "order_id": self.name, - "currency": self.currency, - } - ) + return controller.get_payment_url( + **{ + "amount": flt(self.grand_total, self.precision("grand_total")), + "title": data.company, + "description": self.subject, + "reference_doctype": "Payment Request", + "reference_docname": self.name, + "payer_email": self.email_to or frappe.session.user, + "payer_name": data.customer_name, + "order_id": self.name, + "currency": self.currency, + } + ) def set_as_paid(self): if self.payment_channel == "Phone": From 2e3b2db03b902fbed0b3fec165f78d9b4a2110de Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Wed, 7 Aug 2024 09:30:48 +0000 Subject: [PATCH 0022/1614] chore(release): Bumped to Version 15.32.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # [15.32.0](https://github.com/frappe/erpnext/compare/v15.31.5...v15.32.0) (2024-08-07) ### Bug Fixes * 'undefined' in PL and BS report summary on Consolidated report ([3da7071](https://github.com/frappe/erpnext/commit/3da7071327810a0a6c10c1decc841cd2a2df5e4c)) * all warehouse filter for the stock report (backport [#42584](https://github.com/frappe/erpnext/issues/42584)) ([#42604](https://github.com/frappe/erpnext/issues/42604)) ([830b95b](https://github.com/frappe/erpnext/commit/830b95bdcbfb4e7cb513ef8f3dd21072538b3a07)) * company filter for filtring tax withheld vouchers ([3ad1f2d](https://github.com/frappe/erpnext/commit/3ad1f2d0d0ae299dddcb53010f276c54dc43fdad)) * disable primary action button only when there are no active capitalization ([2d644ac](https://github.com/frappe/erpnext/commit/2d644ac066746f4ce2e6335dcf49f2765aafc5d2)) * Discount and taxes in return document should follow the reference document (backport [#41911](https://github.com/frappe/erpnext/issues/41911)) ([#42574](https://github.com/frappe/erpnext/issues/42574)) ([9321408](https://github.com/frappe/erpnext/commit/93214081549295af170e838e6ebdf5bc8274c9c2)) * do not update item price and last purchase rate for inter transf… (backport [#42616](https://github.com/frappe/erpnext/issues/42616)) ([#42633](https://github.com/frappe/erpnext/issues/42633)) ([59b9b7d](https://github.com/frappe/erpnext/commit/59b9b7dc9185fee1814d5ef7d89d0875fead4bf7)) * german translations ([f27e9f3](https://github.com/frappe/erpnext/commit/f27e9f30890badb5b793e5523acc5fc2836ec2c8)) * inter transfer delivery note issue with batch (backport [#42552](https://github.com/frappe/erpnext/issues/42552)) ([#42556](https://github.com/frappe/erpnext/issues/42556)) ([97cc308](https://github.com/frappe/erpnext/commit/97cc3082e190e730c467c3db85dddb1f62a963cb)) * min height for rows in sales funnel ([2f81c99](https://github.com/frappe/erpnext/commit/2f81c991438a678ab163c0dc796124f447dc02cc)) * resolved conflict ([#42557](https://github.com/frappe/erpnext/issues/42557)) ([c3293d1](https://github.com/frappe/erpnext/commit/c3293d110c538c9f0888dd6c7dffe8ab36bf3632)) * reverse debit credit for party gl entry in payment entry based on negative amount ([#42367](https://github.com/frappe/erpnext/issues/42367)) ([14f9aef](https://github.com/frappe/erpnext/commit/14f9aef55cd2b48478f48b5f8b3a65534724c352)) * set currency on change of company considering customer default currency (backport [#42405](https://github.com/frappe/erpnext/issues/42405)) ([#42547](https://github.com/frappe/erpnext/issues/42547)) ([7c8d13c](https://github.com/frappe/erpnext/commit/7c8d13c51adc9be25264cfbba96321ef655970ee)) * set query filters for sales / purchase tax template on PE ([dc9cf74](https://github.com/frappe/erpnext/commit/dc9cf74be87c26ad8b0bf22c6bc145523953b28a)) * use get_last_day to get the correct date (backport [#42564](https://github.com/frappe/erpnext/issues/42564)) ([#42598](https://github.com/frappe/erpnext/issues/42598)) ([2de86eb](https://github.com/frappe/erpnext/commit/2de86eb0f45cbc287f238d7091ee2af99b8df5a7)) ### Features * expiry date column in Available Batch Report (backport [#42628](https://github.com/frappe/erpnext/issues/42628)) ([#42642](https://github.com/frappe/erpnext/issues/42642)) ([d8768c5](https://github.com/frappe/erpnext/commit/d8768c537733cf105761e9f95b523f44ec4cf5f7)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index efe34d54580..08765895684 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -3,7 +3,7 @@ import inspect import frappe -__version__ = "15.31.5" +__version__ = "15.32.0" def get_default_company(user=None): From 2aa90fdc14bbd59d5f7471865038430f049c9ed2 Mon Sep 17 00:00:00 2001 From: Lakshit Jain <108322669+ljain112@users.noreply.github.com> Date: Wed, 31 Jul 2024 13:19:54 +0530 Subject: [PATCH 0023/1614] fix: promotional scheme doctype fields in consitency with pricing rule (#42432) * fix: add "round_free_qty" check box in promotional scheme * fix: add `add_for_price_list` field * fix: set_query in setup for promotional scheme --------- (cherry picked from commit 8624aeca54eacf4b32e86b8d1d82245fcef65355) # Conflicts: # erpnext/accounts/doctype/promotional_scheme_price_discount/promotional_scheme_price_discount.json # erpnext/accounts/doctype/promotional_scheme_product_discount/promotional_scheme_product_discount.json (cherry picked from commit 87d8603d1d70c4a1d169322d99de3218a16ad5da) --- .../promotional_scheme/promotional_scheme.js | 12 ++++++++++++ .../promotional_scheme/promotional_scheme.py | 2 ++ .../promotional_scheme_price_discount.json | 12 ++++++++++++ .../promotional_scheme_price_discount.py | 1 + .../promotional_scheme_product_discount.json | 13 ++++++++++++- .../promotional_scheme_product_discount.py | 1 + 6 files changed, 40 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/promotional_scheme/promotional_scheme.js b/erpnext/accounts/doctype/promotional_scheme/promotional_scheme.js index 7a26c07d01f..43261e4080a 100644 --- a/erpnext/accounts/doctype/promotional_scheme/promotional_scheme.js +++ b/erpnext/accounts/doctype/promotional_scheme/promotional_scheme.js @@ -2,6 +2,18 @@ // For license information, please see license.txt frappe.ui.form.on("Promotional Scheme", { + setup: function (frm) { + frm.set_query("for_price_list", "price_discount_slabs", (doc) => { + return { + filters: { + selling: doc.selling, + buying: doc.buying, + currency: doc.currency, + }, + }; + }); + }, + refresh: function (frm) { frm.trigger("set_options_for_applicable_for"); frm.trigger("toggle_reqd_apply_on"); diff --git a/erpnext/accounts/doctype/promotional_scheme/promotional_scheme.py b/erpnext/accounts/doctype/promotional_scheme/promotional_scheme.py index 71fe156dd7a..86bd2135515 100644 --- a/erpnext/accounts/doctype/promotional_scheme/promotional_scheme.py +++ b/erpnext/accounts/doctype/promotional_scheme/promotional_scheme.py @@ -51,6 +51,7 @@ price_discount_fields = [ "discount_percentage", "validate_applied_rule", "apply_multiple_pricing_rules", + "for_price_list", ] product_discount_fields = [ @@ -63,6 +64,7 @@ product_discount_fields = [ "recurse_for", "apply_recursion_over", "apply_multiple_pricing_rules", + "round_free_qty", ] diff --git a/erpnext/accounts/doctype/promotional_scheme_price_discount/promotional_scheme_price_discount.json b/erpnext/accounts/doctype/promotional_scheme_price_discount/promotional_scheme_price_discount.json index aa3696d216d..fc7cd6e0921 100644 --- a/erpnext/accounts/doctype/promotional_scheme_price_discount/promotional_scheme_price_discount.json +++ b/erpnext/accounts/doctype/promotional_scheme_price_discount/promotional_scheme_price_discount.json @@ -21,6 +21,7 @@ "rate", "discount_amount", "discount_percentage", + "for_price_list", "section_break_11", "warehouse", "threshold_percentage", @@ -120,6 +121,13 @@ "fieldtype": "Float", "label": "Discount Percentage" }, + { + "depends_on": "eval:doc.rate_or_discount!=\"Rate\"", + "fieldname": "for_price_list", + "fieldtype": "Link", + "label": "For Price List", + "options": "Price List" + }, { "fieldname": "section_break_11", "fieldtype": "Section Break" @@ -169,7 +177,11 @@ "index_web_pages_for_search": 1, "istable": 1, "links": [], +<<<<<<< HEAD "modified": "2021-11-16 00:25:33.843996", +======= + "modified": "2024-07-23 12:33:46.574950", +>>>>>>> 8624aeca54 (fix: promotional scheme doctype fields in consitency with pricing rule (#42432)) "modified_by": "Administrator", "module": "Accounts", "name": "Promotional Scheme Price Discount", diff --git a/erpnext/accounts/doctype/promotional_scheme_price_discount/promotional_scheme_price_discount.py b/erpnext/accounts/doctype/promotional_scheme_price_discount/promotional_scheme_price_discount.py index 545c17dda89..3e07309dca5 100644 --- a/erpnext/accounts/doctype/promotional_scheme_price_discount/promotional_scheme_price_discount.py +++ b/erpnext/accounts/doctype/promotional_scheme_price_discount/promotional_scheme_price_discount.py @@ -19,6 +19,7 @@ class PromotionalSchemePriceDiscount(Document): disable: DF.Check discount_amount: DF.Currency discount_percentage: DF.Float + for_price_list: DF.Link | None max_amount: DF.Currency max_qty: DF.Float min_amount: DF.Currency diff --git a/erpnext/accounts/doctype/promotional_scheme_product_discount/promotional_scheme_product_discount.json b/erpnext/accounts/doctype/promotional_scheme_product_discount/promotional_scheme_product_discount.json index 4e61d04ad21..75bcad8c2c4 100644 --- a/erpnext/accounts/doctype/promotional_scheme_product_discount/promotional_scheme_product_discount.json +++ b/erpnext/accounts/doctype/promotional_scheme_product_discount/promotional_scheme_product_discount.json @@ -22,6 +22,7 @@ "column_break_9", "free_item_uom", "free_item_rate", + "round_free_qty", "section_break_12", "warehouse", "threshold_percentage", @@ -181,12 +182,22 @@ "fieldtype": "Float", "label": "Apply Recursion Over (As Per Transaction UOM)", "mandatory_depends_on": "is_recursive" + }, + { + "default": "0", + "fieldname": "round_free_qty", + "fieldtype": "Check", + "label": "Round Free Qty" } ], "index_web_pages_for_search": 1, "istable": 1, "links": [], +<<<<<<< HEAD "modified": "2024-03-12 12:53:58.199108", +======= + "modified": "2024-07-22 17:25:07.880984", +>>>>>>> 8624aeca54 (fix: promotional scheme doctype fields in consitency with pricing rule (#42432)) "modified_by": "Administrator", "module": "Accounts", "name": "Promotional Scheme Product Discount", @@ -195,4 +206,4 @@ "sort_field": "modified", "sort_order": "DESC", "states": [] -} \ No newline at end of file +} diff --git a/erpnext/accounts/doctype/promotional_scheme_product_discount/promotional_scheme_product_discount.py b/erpnext/accounts/doctype/promotional_scheme_product_discount/promotional_scheme_product_discount.py index 1463a7b93a4..b071d658cb4 100644 --- a/erpnext/accounts/doctype/promotional_scheme_product_discount/promotional_scheme_product_discount.py +++ b/erpnext/accounts/doctype/promotional_scheme_product_discount/promotional_scheme_product_discount.py @@ -53,6 +53,7 @@ class PromotionalSchemeProductDiscount(Document): "20", ] recurse_for: DF.Float + round_free_qty: DF.Check rule_description: DF.SmallText same_item: DF.Check threshold_percentage: DF.Percent From a983d65404f73ced665834dbfb06945217879d87 Mon Sep 17 00:00:00 2001 From: Lakshit Jain <108322669+ljain112@users.noreply.github.com> Date: Wed, 31 Jul 2024 13:38:38 +0530 Subject: [PATCH 0024/1614] chore: resolve conflicts (#42553) (cherry picked from commit 78eb4436149c5eeff71ee78f0d56cfa433f4f937) --- .../promotional_scheme_price_discount.json | 6 +----- .../promotional_scheme_product_discount.json | 4 ---- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/erpnext/accounts/doctype/promotional_scheme_price_discount/promotional_scheme_price_discount.json b/erpnext/accounts/doctype/promotional_scheme_price_discount/promotional_scheme_price_discount.json index fc7cd6e0921..32de0cec6fe 100644 --- a/erpnext/accounts/doctype/promotional_scheme_price_discount/promotional_scheme_price_discount.json +++ b/erpnext/accounts/doctype/promotional_scheme_price_discount/promotional_scheme_price_discount.json @@ -177,11 +177,7 @@ "index_web_pages_for_search": 1, "istable": 1, "links": [], -<<<<<<< HEAD - "modified": "2021-11-16 00:25:33.843996", -======= "modified": "2024-07-23 12:33:46.574950", ->>>>>>> 8624aeca54 (fix: promotional scheme doctype fields in consitency with pricing rule (#42432)) "modified_by": "Administrator", "module": "Accounts", "name": "Promotional Scheme Price Discount", @@ -189,4 +185,4 @@ "permissions": [], "sort_field": "modified", "sort_order": "DESC" -} \ No newline at end of file +} diff --git a/erpnext/accounts/doctype/promotional_scheme_product_discount/promotional_scheme_product_discount.json b/erpnext/accounts/doctype/promotional_scheme_product_discount/promotional_scheme_product_discount.json index 75bcad8c2c4..50d3ccb0dec 100644 --- a/erpnext/accounts/doctype/promotional_scheme_product_discount/promotional_scheme_product_discount.json +++ b/erpnext/accounts/doctype/promotional_scheme_product_discount/promotional_scheme_product_discount.json @@ -193,11 +193,7 @@ "index_web_pages_for_search": 1, "istable": 1, "links": [], -<<<<<<< HEAD - "modified": "2024-03-12 12:53:58.199108", -======= "modified": "2024-07-22 17:25:07.880984", ->>>>>>> 8624aeca54 (fix: promotional scheme doctype fields in consitency with pricing rule (#42432)) "modified_by": "Administrator", "module": "Accounts", "name": "Promotional Scheme Product Discount", From 6a4f06cf4a547b569b0bea79ff76f01b3b93783c Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Thu, 8 Aug 2024 07:06:38 +0000 Subject: [PATCH 0025/1614] chore(release): Bumped to Version 15.32.1 ## [15.32.1](https://github.com/frappe/erpnext/compare/v15.32.0...v15.32.1) (2024-08-08) ### Bug Fixes * promotional scheme doctype fields in consitency with pricing rule ([#42432](https://github.com/frappe/erpnext/issues/42432)) ([2aa90fd](https://github.com/frappe/erpnext/commit/2aa90fdc14bbd59d5f7471865038430f049c9ed2)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 08765895684..987a8717ce7 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -3,7 +3,7 @@ import inspect import frappe -__version__ = "15.32.0" +__version__ = "15.32.1" def get_default_company(user=None): From 73af5be1c3be9a1fab19de1b96d63f907dcde8a1 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Wed, 14 Aug 2024 08:02:34 +0000 Subject: [PATCH 0026/1614] chore(release): Bumped to Version 15.33.0 # [15.33.0](https://github.com/frappe/erpnext/compare/v15.32.1...v15.33.0) (2024-08-14) ### Bug Fixes * allow sale of asset for internal transfer ([97cadfe](https://github.com/frappe/erpnext/commit/97cadfe5d360128934aaaac9346537a47515cf75)) * cancel Journal Entry on cancellation of asset value adjustment ([a429f2f](https://github.com/frappe/erpnext/commit/a429f2f626fdae163b7661935dd28f42ed68ce24)) * currency changing while making PR from the PO (backport [#42718](https://github.com/frappe/erpnext/issues/42718)) ([#42721](https://github.com/frappe/erpnext/issues/42721)) ([50b1fa5](https://github.com/frappe/erpnext/commit/50b1fa5deb2a502782cac6884c4ed9f82b1cd335)) * delivery note creation issue (backport [#42696](https://github.com/frappe/erpnext/issues/42696)) ([#42697](https://github.com/frappe/erpnext/issues/42697)) ([6f16ae3](https://github.com/frappe/erpnext/commit/6f16ae3e00d276b95cf805318d70591aecadfb5e)) * dimensions in common party journal entry ([fd4143e](https://github.com/frappe/erpnext/commit/fd4143e6862b3caa38d3f579bb2402be83f313fc)) * duplicate labels in stock entry (backport [#42756](https://github.com/frappe/erpnext/issues/42756)) ([#42758](https://github.com/frappe/erpnext/issues/42758)) ([8624a0a](https://github.com/frappe/erpnext/commit/8624a0abce26576616783b7ce4d43f912bc80d68)) * error message in coa importer ([20c1bcd](https://github.com/frappe/erpnext/commit/20c1bcd654ea6e6e795546379355b17758bb86b5)) * **Exchange Rate Revaluation:** translatable strings ([da6eea7](https://github.com/frappe/erpnext/commit/da6eea77437cffce628a08ef2ce5e6da2afdf193)) * fetch months last date to avoid miscalculation ([765c110](https://github.com/frappe/erpnext/commit/765c1104c4c4a76a2e65914b6e9fbf58e32ecb09)) * force fetch updates for subcription ([582fffc](https://github.com/frappe/erpnext/commit/582fffca931eca7754e24eee61d52c1d68ef8a4c)) * german translation of exit ([a2df276](https://github.com/frappe/erpnext/commit/a2df2768802c54001286913ac17ebaf207e40351)) * german translations for incoterms ([9789648](https://github.com/frappe/erpnext/commit/9789648175e61ea64d9a326c2f4b274067eecbc0)) * ledger entries for pos return with update outstanding for self ([8cd1952](https://github.com/frappe/erpnext/commit/8cd1952da3d07dc741aff6f3608480f9101f1e15)) * Maintain same rate on qty change on Quotation to Sales Order ([7ed7c22](https://github.com/frappe/erpnext/commit/7ed7c22469ba8876476214240540237491097b45)) * patch to fix incorrect against_voucher references in ledger ([389227b](https://github.com/frappe/erpnext/commit/389227bce8e62d25e0dc97a51885df1674e56b54)) * pre-commit for better code formatting ([94f4c92](https://github.com/frappe/erpnext/commit/94f4c92a039ae4039df55eb32bec0739387c6a65)) * price list when invoice created from timesheet ([2926915](https://github.com/frappe/erpnext/commit/2926915a06b13e2a29b07cad589ad0f2677b54e2)) * price list when invoice created from timesheet ([536dc47](https://github.com/frappe/erpnext/commit/536dc47eb062f7d512b0909a920f09592e528e49)) * promotional scheme doctype fields in consitency with pricing rule ([#42432](https://github.com/frappe/erpnext/issues/42432)) ([87d8603](https://github.com/frappe/erpnext/commit/87d8603d1d70c4a1d169322d99de3218a16ad5da)) * resolved conflict ([defd554](https://github.com/frappe/erpnext/commit/defd5541b060dd901171fcb2ffc0029c75931b26)) * Sort lists before calling itertools.groupby ([d8939e0](https://github.com/frappe/erpnext/commit/d8939e0bb0136ed6947d0f542ae0c91873f57237)) * text color in sales funnel report based on theme ([a8de8ae](https://github.com/frappe/erpnext/commit/a8de8aecf5a2e85bab16ae9a52b7c2bfe7038a4a)) * typeerror on payment entry ([64e75a8](https://github.com/frappe/erpnext/commit/64e75a8e089c7b347f255c7c8083d4297c0ea069)) * update 'Paid Amount' on forex payment request ([c71f06b](https://github.com/frappe/erpnext/commit/c71f06be9e8ad793a3d57cef7598415220e67925)) * Update Rate as per Valuation Rate for Internal Transfers only if Setting is Enabled ([#42050](https://github.com/frappe/erpnext/issues/42050)) ([6e833cc](https://github.com/frappe/erpnext/commit/6e833cce6af9d9542c23e74bda7c0b0e029a683e)) * warning message for negative stock (backport [#42683](https://github.com/frappe/erpnext/issues/42683)) ([#42710](https://github.com/frappe/erpnext/issues/42710)) ([a990577](https://github.com/frappe/erpnext/commit/a99057754d436022555101230b6a53e417fe9e61)) ### Features * changes in opportunity.py to show contacts and addresses from referenced and opportunities ([3cac4a5](https://github.com/frappe/erpnext/commit/3cac4a598fdead4f35f4130a899950625f51f167)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 987a8717ce7..b7406969305 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -3,7 +3,7 @@ import inspect import frappe -__version__ = "15.32.1" +__version__ = "15.33.0" def get_default_company(user=None): From 9f970189feb9193fb80ac9564bb6d23bd3d05f66 Mon Sep 17 00:00:00 2001 From: Sanket322 Date: Wed, 24 Jul 2024 13:42:04 +0530 Subject: [PATCH 0027/1614] fix: set proper currency format (cherry picked from commit 2533808f1e457cc87e3bc41cd9c0c97ad1f0c771) --- erpnext/accounts/report/payment_ledger/payment_ledger.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/report/payment_ledger/payment_ledger.py b/erpnext/accounts/report/payment_ledger/payment_ledger.py index 9852c6e7ab9..41e34cff8b2 100644 --- a/erpnext/accounts/report/payment_ledger/payment_ledger.py +++ b/erpnext/accounts/report/payment_ledger/payment_ledger.py @@ -130,6 +130,7 @@ class PaymentLedger: ) def get_columns(self): + company_currency = frappe.get_cached_value("Company", self.filters.get("company"), "default_currency") options = None self.columns.append( dict( @@ -194,7 +195,7 @@ class PaymentLedger: label=_("Amount"), fieldname="amount", fieldtype="Currency", - options="Company:company:default_currency", + options=company_currency, width="100", ) ) From a3e3585e5054d254ebc198e34498738160e8569d Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 16 Aug 2024 11:47:53 +0530 Subject: [PATCH 0028/1614] fix: not able to create the batch (backport #42784) (backport #42785) (#42786) fix: not able to create the batch (backport #42784) (#42785) fix: not able to create the batch (#42784) (cherry picked from commit 32c4fab14f83dc5e2cec0c21395713e54d2537c9) Co-authored-by: rohitwaghchaure (cherry picked from commit 0f9849e6727b4fef3e3bf75048de553714b08298) Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- erpnext/stock/doctype/batch/batch.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/stock/doctype/batch/batch.js b/erpnext/stock/doctype/batch/batch.js index 4ed428421ca..77e4e560acf 100644 --- a/erpnext/stock/doctype/batch/batch.js +++ b/erpnext/stock/doctype/batch/batch.js @@ -3,7 +3,7 @@ frappe.ui.form.on("Batch", { setup: (frm) => { - frm.fields_dict["item"].get_query = function (doc, cdt, cdn) { + frm.set_query("item", () => { return { query: "erpnext.controllers.queries.item_query", filters: { @@ -11,7 +11,7 @@ frappe.ui.form.on("Batch", { has_batch_no: 1, }, }; - }; + }); }, refresh: (frm) => { if (!frm.is_new()) { From fbf1160357d4dd3c7970f8663c8cfa8a5bbc1f35 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Fri, 16 Aug 2024 06:19:07 +0000 Subject: [PATCH 0029/1614] chore(release): Bumped to Version 15.33.1 ## [15.33.1](https://github.com/frappe/erpnext/compare/v15.33.0...v15.33.1) (2024-08-16) ### Bug Fixes * not able to create the batch (backport [#42784](https://github.com/frappe/erpnext/issues/42784)) (backport [#42785](https://github.com/frappe/erpnext/issues/42785)) ([#42786](https://github.com/frappe/erpnext/issues/42786)) ([a3e3585](https://github.com/frappe/erpnext/commit/a3e3585e5054d254ebc198e34498738160e8569d)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index b7406969305..e28c96e466e 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -3,7 +3,7 @@ import inspect import frappe -__version__ = "15.33.0" +__version__ = "15.33.1" def get_default_company(user=None): From 4d9f522f22d1abaea2a61714151767002f322a45 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Fri, 16 Aug 2024 13:07:53 +0530 Subject: [PATCH 0030/1614] fix(patch): replace repost with direct sql to update 'against_voucher (cherry picked from commit 13bb48434fd6897dcef2a7d79333d5373bec0cdb) --- .../v14_0/update_pos_return_ledger_entries.py | 112 ++++++++++++++---- 1 file changed, 89 insertions(+), 23 deletions(-) diff --git a/erpnext/patches/v14_0/update_pos_return_ledger_entries.py b/erpnext/patches/v14_0/update_pos_return_ledger_entries.py index 60e867d1bcb..6a6d15e0b34 100644 --- a/erpnext/patches/v14_0/update_pos_return_ledger_entries.py +++ b/erpnext/patches/v14_0/update_pos_return_ledger_entries.py @@ -1,8 +1,64 @@ import frappe from frappe import qb +from erpnext.accounts.utils import update_voucher_outstanding -def execute(): + +def get_valid_against_voucher_ref(pos_returns): + sinv = qb.DocType("Sales Invoice") + res = ( + qb.from_(sinv) + .select(sinv.name, sinv.return_against) + .where(sinv.name.isin(pos_returns) & sinv.return_against.notnull()) + .orderby(sinv.name) + .run(as_dict=True) + ) + return res + + +def build_dict_of_valid_against_reference(pos_returns): + _against_ref_dict = frappe._dict() + res = get_valid_against_voucher_ref(pos_returns) + for x in res: + _against_ref_dict[x.name] = x.return_against + return _against_ref_dict + + +def fix_incorrect_against_voucher_ref(affected_pos_returns): + if affected_pos_returns: + valid_against_voucher_dict = build_dict_of_valid_against_reference(affected_pos_returns) + + gle = qb.DocType("GL Entry") + gles_with_invalid_against = ( + qb.from_(gle) + .select(gle.name, gle.voucher_no) + .where( + gle.voucher_no.isin(affected_pos_returns) + & gle.against_voucher.notnull() + & gle.against_voucher.eq(gle.voucher_no) + & gle.is_cancelled.eq(0) + ) + .run(as_dict=True) + ) + # Update GL + if gles_with_invalid_against: + for gl in gles_with_invalid_against: + frappe.db.set_value( + "GL Entry", + gl.name, + "against_voucher", + valid_against_voucher_dict[gl.voucher_no], + ) + + # Update Payment Ledger + ple = qb.DocType("Payment Ledger Entry") + for x in affected_pos_returns: + qb.update(ple).set(ple.against_voucher_no, valid_against_voucher_dict[x]).where( + ple.voucher_no.eq(x) & ple.delinked.eq(0) + ).run() + + +def get_pos_returns_with_invalid_against_ref(): sinv = qb.DocType("Sales Invoice") pos_returns_without_self = ( qb.from_(sinv) @@ -32,30 +88,40 @@ def execute(): .run() ) - _vouchers = list(set([x[0] for x in gl_against_references])) - invoice_return_against = ( + if gl_against_references: + _vouchers = list(set([x[0] for x in gl_against_references])) + invoice_return_against = ( + qb.from_(sinv) + .select(sinv.name, sinv.return_against) + .where(sinv.name.isin(_vouchers) & sinv.return_against.notnull()) + .orderby(sinv.name) + .run() + ) + + valid_references = set(invoice_return_against) + actual_references = set(gl_against_references) + + invalid_references = actual_references.difference(valid_references) + if invalid_references: + return [x[0] for x in invalid_references] + return None + + +def update_outstanding_for_affected(affected_pos_returns): + if affected_pos_returns: + sinv = qb.DocType("Sales Invoice") + pos_with_accounts = ( qb.from_(sinv) - .select(sinv.name, sinv.return_against) - .where(sinv.name.isin(_vouchers) & sinv.return_against.notnull()) - .orderby(sinv.name) - .run() + .select(sinv.return_against, sinv.debit_to, sinv.customer) + .where(sinv.name.isin(affected_pos_returns)) + .run(as_dict=True) ) - valid_references = set(invoice_return_against) - actual_references = set(gl_against_references) + for x in pos_with_accounts: + update_voucher_outstanding("Sales Invoice", x.return_against, x.debit_to, "Customer", x.customer) - invalid_references = actual_references.difference(valid_references) - if invalid_references: - # Repost Accounting Ledger - pos_for_reposting = ( - qb.from_(sinv) - .select(sinv.company, sinv.name) - .where(sinv.name.isin([x[0] for x in invalid_references])) - .run(as_dict=True) - ) - for x in pos_for_reposting: - ral = frappe.new_doc("Repost Accounting Ledger") - ral.company = x.company - ral.append("vouchers", {"voucher_type": "Sales Invoice", "voucher_no": x.name}) - ral.save().submit() +def execute(): + affected_pos_returns = get_pos_returns_with_invalid_against_ref() + fix_incorrect_against_voucher_ref(affected_pos_returns) + update_outstanding_for_affected(affected_pos_returns) From eb8213c4e7b47f0dd30b33fb16906486b34ddf7f Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Fri, 16 Aug 2024 14:32:53 +0530 Subject: [PATCH 0031/1614] chore: update patches.txt (cherry picked from commit 1721175a207fde5e06d3f8646a766e4eb3b325b5) --- erpnext/patches.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 797e8cebc80..208c9e58d4f 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -357,7 +357,7 @@ erpnext.patches.v14_0.create_accounting_dimensions_in_reconciliation_tool erpnext.patches.v15_0.allow_on_submit_dimensions_for_repostable_doctypes erpnext.patches.v14_0.update_flag_for_return_invoices #2024-03-22 erpnext.patches.v15_0.create_accounting_dimensions_in_payment_request -erpnext.patches.v14_0.update_pos_return_ledger_entries +erpnext.patches.v14_0.update_pos_return_ledger_entries #2024-08-16 # below migration patch should always run last erpnext.patches.v14_0.migrate_gl_to_payment_ledger erpnext.stock.doctype.delivery_note.patches.drop_unused_return_against_index # 2023-12-20 From 81b1cbd367298d4f7d6f7566e8d2620bcef2277b Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Fri, 16 Aug 2024 11:09:43 +0000 Subject: [PATCH 0032/1614] chore(release): Bumped to Version 15.33.2 ## [15.33.2](https://github.com/frappe/erpnext/compare/v15.33.1...v15.33.2) (2024-08-16) ### Bug Fixes * **patch:** replace repost with direct sql to update 'against_voucher ([4d9f522](https://github.com/frappe/erpnext/commit/4d9f522f22d1abaea2a61714151767002f322a45)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index e28c96e466e..c31f06dfa79 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -3,7 +3,7 @@ import inspect import frappe -__version__ = "15.33.1" +__version__ = "15.33.2" def get_default_company(user=None): From 28c9f2adab218368001e22f9edf66af19d8a8c70 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Wed, 21 Aug 2024 05:22:44 +0000 Subject: [PATCH 0033/1614] chore(release): Bumped to Version 15.33.3 ## [15.33.3](https://github.com/frappe/erpnext/compare/v15.33.2...v15.33.3) (2024-08-21) ### Bug Fixes * Auto Create Serial and Batch Bundle For Outward (backport [#42778](https://github.com/frappe/erpnext/issues/42778)) ([#42792](https://github.com/frappe/erpnext/issues/42792)) ([7cc7179](https://github.com/frappe/erpnext/commit/7cc7179b050edd87cda6519fd76c0e83a31aa909)) * backport german translations from develop ([9e9de4c](https://github.com/frappe/erpnext/commit/9e9de4c99e9f628469f93442c68a2fe8e69002fd)) * bank reconcilation tool cost center company filter adding ([cd59940](https://github.com/frappe/erpnext/commit/cd5994017c6960d6d357784e111e3e825a8cad18)) * Create Sales Order from Quotation for Prospect ([f547bef](https://github.com/frappe/erpnext/commit/f547befeb9f366311f2d9c874498193745d825c3)) * create SO from Quot for Prospect --conflicts ([ec0201c](https://github.com/frappe/erpnext/commit/ec0201cb85f0c46a92993c6082b51507091dffd9)) * create SO from Quot for Prospect --conflicts ([5d7fb1d](https://github.com/frappe/erpnext/commit/5d7fb1d9457c276d6bd91c66546f001f56fdb728)) * disable rename from warehouse ([3a1ad6e](https://github.com/frappe/erpnext/commit/3a1ad6e844e00f6ef12e56404c2efe1575add24b)) * disable rename from warehouse ([40abd82](https://github.com/frappe/erpnext/commit/40abd82e2dd8308a686484b77deec714cea0d05a)) * dropping index to improve performance (backport [#42820](https://github.com/frappe/erpnext/issues/42820)) ([#42821](https://github.com/frappe/erpnext/issues/42821)) ([b24de3e](https://github.com/frappe/erpnext/commit/b24de3e35b5a9eb34390c866fde35dc9b4ea1fe7)) * german translations ([751c209](https://github.com/frappe/erpnext/commit/751c20984f3e05944acdaa2ba73a7506e89badac)) * german translations of "HR" ([6f7fdbe](https://github.com/frappe/erpnext/commit/6f7fdbefac26b8098141880d3f3ea7e74a1b782c)) * ignore pricing rule while making DN from Pick List (backport [#42763](https://github.com/frappe/erpnext/issues/42763)) ([#42768](https://github.com/frappe/erpnext/issues/42768)) ([aba54ba](https://github.com/frappe/erpnext/commit/aba54ba18feadade01f9ff9d2150259c15bfc13e)) * not able to create the batch (backport [#42784](https://github.com/frappe/erpnext/issues/42784)) ([#42785](https://github.com/frappe/erpnext/issues/42785)) ([0f9849e](https://github.com/frappe/erpnext/commit/0f9849e6727b4fef3e3bf75048de553714b08298)) * **patch:** replace repost with direct sql to update 'against_voucher ([e420fa9](https://github.com/frappe/erpnext/commit/e420fa97799ad27a7ddb97c604319774b39e0aca)) * removed extra filter condition ([b84ca04](https://github.com/frappe/erpnext/commit/b84ca04975f5daf691c04870409d3c24dc1cc9d2)) * set up filters for dimensions ([abb8866](https://github.com/frappe/erpnext/commit/abb88662c1ac89dccc42aa3ff3d9825c062a3fa3)) * translatability of boldened text ([4914481](https://github.com/frappe/erpnext/commit/4914481105bba3a665b63784e4b48c03342e3270)) * update the testcase format ([33542cb](https://github.com/frappe/erpnext/commit/33542cb9097751492204d6ec3b0fe3573dbddf36)) * update the testcase format ([549dc28](https://github.com/frappe/erpnext/commit/549dc286d03a7ae267b5e2742704dd9f023ee363)) ### Performance Improvements * asset creation from purchase receipt ([1040198](https://github.com/frappe/erpnext/commit/1040198ce1a4077ec88d9f36adb7db792779e2ab)) * data import for stock entries (backport [#42711](https://github.com/frappe/erpnext/issues/42711)) ([#42819](https://github.com/frappe/erpnext/issues/42819)) ([0344442](https://github.com/frappe/erpnext/commit/0344442d42cbdbe8db2401f1c35d18f13674f786)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index c31f06dfa79..4a3021bda07 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -3,7 +3,7 @@ import inspect import frappe -__version__ = "15.33.2" +__version__ = "15.33.3" def get_default_company(user=None): From 9f4cb98de65bd050a3ed846c9c6c67b248202714 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 21 Aug 2024 16:37:00 +0530 Subject: [PATCH 0034/1614] fix: last purchase rate not updated from purchase invoice (backport #42847) (backport #42853) (#42855) fix: last purchase rate not updated from purchase invoice (backport #42847) (#42853) fix: last purchase rate not updated from purchase invoice (#42847) (cherry picked from commit 5b9309cf3410a4be0e94682ca6151bcc0b4ccb53) Co-authored-by: rohitwaghchaure (cherry picked from commit 2203ea9301eea01714809811ec8f774ebbc59b1e) Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- erpnext/controllers/buying_controller.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/erpnext/controllers/buying_controller.py b/erpnext/controllers/buying_controller.py index a55eded2a4c..f797374d64e 100644 --- a/erpnext/controllers/buying_controller.py +++ b/erpnext/controllers/buying_controller.py @@ -689,9 +689,11 @@ class BuyingController(SubcontractingController): if self.doctype in ["Purchase Receipt", "Purchase Invoice"]: self.process_fixed_asset() - if self.doctype in ["Purchase Order", "Purchase Receipt"] and not frappe.db.get_single_value( - "Buying Settings", "disable_last_purchase_rate" - ): + if self.doctype in [ + "Purchase Order", + "Purchase Receipt", + "Purchase Invoice", + ] and not frappe.db.get_single_value("Buying Settings", "disable_last_purchase_rate"): update_last_purchase_rate(self, is_submit=1) def on_cancel(self): From 8d8d84bae46ace28d05b79bee58a472360211dc9 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 21 Aug 2024 16:37:08 +0530 Subject: [PATCH 0035/1614] fix: incorrect Received Qty Amount in Purchase Order Analysis (backport #42852) (backport #42854) (#42856) fix: incorrect Received Qty Amount in Purchase Order Analysis (backport #42852) (#42854) fix: incorrect Received Qty Amount in Purchase Order Analysis (#42852) (cherry picked from commit fb846ffa125cbc67f775a35376d0b541b1f5d9d1) Co-authored-by: rohitwaghchaure (cherry picked from commit 72c16097d64384a4218e7646e2c4efcdc0790d82) Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- .../purchase_order_analysis/purchase_order_analysis.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.py b/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.py index da1c70d3179..084c3b5fc2b 100644 --- a/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.py +++ b/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.py @@ -40,6 +40,7 @@ def get_data(filters): po = frappe.qb.DocType("Purchase Order") po_item = frappe.qb.DocType("Purchase Order Item") pi_item = frappe.qb.DocType("Purchase Invoice Item") + pr_item = frappe.qb.DocType("Purchase Receipt Item") query = ( frappe.qb.from_(po) @@ -47,6 +48,8 @@ def get_data(filters): .on(po_item.parent == po.name) .left_join(pi_item) .on((pi_item.po_detail == po_item.name) & (pi_item.docstatus == 1)) + .left_join(pr_item) + .on((pr_item.purchase_order_item == po_item.name) & (pr_item.docstatus == 1)) .select( po.transaction_date.as_("date"), po_item.schedule_date.as_("required_date"), @@ -60,7 +63,7 @@ def get_data(filters): (po_item.qty - po_item.received_qty).as_("pending_qty"), Sum(IfNull(pi_item.qty, 0)).as_("billed_qty"), po_item.base_amount.as_("amount"), - (po_item.received_qty * po_item.base_rate).as_("received_qty_amount"), + (pr_item.base_amount).as_("received_qty_amount"), (po_item.billed_amt * IfNull(po.conversion_rate, 1)).as_("billed_amount"), (po_item.base_amount - (po_item.billed_amt * IfNull(po.conversion_rate, 1))).as_( "pending_amount" From 9ac665b4bdd4cde13b8b2a87198019b530adefab Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Wed, 21 Aug 2024 11:08:23 +0000 Subject: [PATCH 0036/1614] chore(release): Bumped to Version 15.33.4 ## [15.33.4](https://github.com/frappe/erpnext/compare/v15.33.3...v15.33.4) (2024-08-21) ### Bug Fixes * incorrect Received Qty Amount in Purchase Order Analysis (backport [#42852](https://github.com/frappe/erpnext/issues/42852)) (backport [#42854](https://github.com/frappe/erpnext/issues/42854)) ([#42856](https://github.com/frappe/erpnext/issues/42856)) ([8d8d84b](https://github.com/frappe/erpnext/commit/8d8d84bae46ace28d05b79bee58a472360211dc9)) * last purchase rate not updated from purchase invoice (backport [#42847](https://github.com/frappe/erpnext/issues/42847)) (backport [#42853](https://github.com/frappe/erpnext/issues/42853)) ([#42855](https://github.com/frappe/erpnext/issues/42855)) ([9f4cb98](https://github.com/frappe/erpnext/commit/9f4cb98de65bd050a3ed846c9c6c67b248202714)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 4a3021bda07..ecf8221f778 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -3,7 +3,7 @@ import inspect import frappe -__version__ = "15.33.3" +__version__ = "15.33.4" def get_default_company(user=None): From be736cf6415a18d0811095d389a378bb22854d58 Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Mon, 12 Aug 2024 17:45:11 +0530 Subject: [PATCH 0037/1614] fix: include erpnext in apps page (cherry picked from commit 1d52ef7afe34b229f33160d95b9acd463afb832f) --- erpnext/hooks.py | 10 ++++++++++ erpnext/public/images/erpnext-logo-blue.png | Bin 0 -> 4235 bytes 2 files changed, 10 insertions(+) create mode 100644 erpnext/public/images/erpnext-logo-blue.png diff --git a/erpnext/hooks.py b/erpnext/hooks.py index 527be6ab337..ee0b33e27db 100644 --- a/erpnext/hooks.py +++ b/erpnext/hooks.py @@ -10,6 +10,16 @@ source_link = "https://github.com/frappe/erpnext" app_logo_url = "/assets/erpnext/images/erpnext-logo.svg" +include_as_app = [ + { + "name": "erpnext", + "logo": "/assets/erpnext/images/erpnext-logo-blue.png", + "title": "ERPNext", + "route": "/app/home", + # "has_permission": "erpnext.api.permission.has_app_permission" + } +] + develop_version = "14.x.x-develop" app_include_js = "erpnext.bundle.js" diff --git a/erpnext/public/images/erpnext-logo-blue.png b/erpnext/public/images/erpnext-logo-blue.png new file mode 100644 index 0000000000000000000000000000000000000000..0134b3f0627c5bc95aee1682f7979f9590751b4e GIT binary patch literal 4235 zcmds5X;f3!7Cs50f>0}zp$e$27MUc15RF0{7=$nd1B5|>BA^i&gvcO}I8Z<)6&lb8 zC}T*%Ok^f;K-4f<3?LW~kXV8cQw&I$Ug%q^|K5+jAMIQ3$60sXefC}F+xy#hf9ISe zCkJaq`K|H*07aV<7R~@bxNBqMda0$P;q<)pAs2GOJq!SS)Y^a)nUPDSMo5^m^)XQ1 zr75B{wM%d>6?~L%L4H24jYT3m`KPpuk(_ZUo>0vu~xS9s%57AWw}c()pk4k zYSb6xVQ!>Y*?~x~S$Wl162aQozeB zGStK zj_lvbn=%L38wLE(0sZfZ%G=!%s-E{5(j2F925xSq>`uILdaEqfbXjLE`D-EKrb&$! z+5puQ4Bt{V9;>XwezoUnY_$XG8C{dRg7Ij--dhs}!CJaBpBs~$<&HPrLmRZ)PDKXl z%3_WE&ez*j=tX}bF!Obb0p+yic;i;I0jIfc47E>o0JghaJCx``j?X$oYf;>)1s7_q z1C$GvX$^aWF?rnWCf$n;N1*SSuD$W;bnU7_vLUToP<`rs7^($$6?om8eQf0YvC#{? z%!t#-;Ro*oFgrc-bfgLD397bq^^yhie&U;(6$N#rW*~*eQ}B%-PhcP$YqL5=hl``e|@OIbut`3dqBNOr1G zZLHb`F%L^xuo6GmTX%M`k68jboX&UjCm-lSu&7$$s}tVqK*#Y0i?FWKIog7?ukn}RHHEUDXo;e z8+TOJC+gF4PtjrjbEX+IUnLubuw>4~ z-^oNytkcwtgAJ(EooOrKy4~I-Es2&GR%*4`cYu*LUVI~>Iw;aS7IP(nqN6Nu0BnKH z&<&!*m)0^=H@yxpigW5!a8}nQ^9K*@dl_T{7>^KhMh;&0VixK&tPScy!rH$FeU^0h z^(*y=6ghkI(ns%}D3VNi&y%lm8jdO7)0a}Ibr}l!I1bI4%7!xOtfir*7=8jE5llvn zK7Y-?3!|lgamssT($%;D;+D!!o7j?}BwQ+y!1;~Cx@-^i=?x#7J3u*>VqQ92{Za;O z^Y5_VX(grT{yKK?*73rk*FSMR_lfr^gUUOC*V_)nIGYqfD<`e)yCyi&iZQ^Hm)I-l z%%JJ0fM~01*Wg@?eJSWMeo`B~T!^=oB_;oCNALf`v;N$R+QG(A_>3$FDXta$Y<6{n zHCKxTU;~O*pg4GGoH}6d*nVpMF_%hK&eUIqvI&pIYoddDHnh=V& z?cEwGVoD7>51r6|-`5b)1OX}KVO2Q+Xy%tqV7%c?*K9k+o(5oP(LIHd=Hb>Q2!Or0 ze3*`#uTkS7H|YYq5ASSR%X&Yy0Px(ct!cS#*_S3<4`4|s4(pdPIf%~>V)x^oCAbhf z74TCHk9S1J7DM!0`*1v5rpPtWT_Q`;na(V6t>*L)Rdw<2{@w5&f%n%^6e!#AIC;ccW5tdAq?Rb3eGu)p_tob8$TuWH zz=GO8mgBz`#D7%?YcvilHt|LC5aX~f?Q1ORud%qBnoiV&85_nK()4pDaDRJw{q@k_ z%KPXWveLiuH$T2}e)YS`kbHSx32*z4-b>cN>-7IOi+^V85mcQsj+@tF zjD4N|`CjoSy#Lg%)~fKp3d&-!gcOfh$s^sRjXfxr0oe}PL7prB!}tp=n3{kcuH|wu zx49Mu#6( z@hj-EF&H3;axR=Rq-jc}0(QI4{W!fJ7hbIdQiNZ26^$*O!h6dCSR*RI(X&4m00lHo z<3xA9#Hv|}EW9jP<~(8aX@EGwo)94e)cN%Xb0zSPte(ctBAXaxzz*SZRfhYDaNDJd z=M_u%wnd$5&3)+k7{cBd*MLZTR339uyHy^%k9KKJTo%0gHrj;7tRX?(TZ!L?-J)F` zSz@d_T2Q1P{@VOA{G6Q+a1pC|z@OuHI9){FP$;hHz|f}@k*0`JSH{nT?%iAFr7U=2zLypY?LPIN`#V%;G@;SBWKYD=A~(kS#JRwu_wV)+iPxm+v=wgPT=W{ zY{9lDy(bhq^U}GN*QeG?Hw%p7;R$28;&lA#R~nBDu$B`}{O{V)-4t_L{5V}Ytt~R- za!%Y)=H_d>o35uQ0=;pYFbx7y$)1@1tKX_Cad_z@QXXKvaVAGw)L#Dn6StLEu4S?C z6w1DYxQQD(+Hqv1a4^D&buJgF0I*uSsS#&b_g=naE@a?GD4iov8h`UY?c9}nn(Ufp)bRgJ}2 z#Lh`Xaynkb7{0i2Jw}s!9indSKC{fK&xn`gB}dYI8TwsbJa z5apCSk&Wp-L=~ELcRzh2&)$JD&B?8cK~IMDoYa1C7g~!Y zr>xID^W~U_DLzsK39mp!r=I^=oF<5BS&pA?R1SPruA}N>)m8l3t#fJ=;ZWHB_CD3S zFFjB$P(_HyQ1>}AJ(FZbSlWxQw_E-7a9`xsmX~}h!Y!r24F78v3EFR~DZPg}-Rhcz z^cni3>VUqVfI+bimgx7Vtqe2==d~gQ!`mtS76hf1np8+%7S`dzDul`$3P%<1^_1Qn O02@mOi}GVW*Zu`KlJAZH literal 0 HcmV?d00001 From 995773088a5c261b37c7900e827a28d78a22f4fb Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Mon, 12 Aug 2024 19:13:55 +0530 Subject: [PATCH 0038/1614] chore: renamed include_as_app to include_in_apps_screen (cherry picked from commit 528013242369d1dd6a32063e5011a91aff0550cd) --- erpnext/hooks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/hooks.py b/erpnext/hooks.py index ee0b33e27db..448d0d2a57b 100644 --- a/erpnext/hooks.py +++ b/erpnext/hooks.py @@ -10,7 +10,7 @@ source_link = "https://github.com/frappe/erpnext" app_logo_url = "/assets/erpnext/images/erpnext-logo.svg" -include_as_app = [ +add_to_apps_screen = [ { "name": "erpnext", "logo": "/assets/erpnext/images/erpnext-logo-blue.png", From eb7e063d5cad01cddfe0a442e4b4e73727aab152 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Fri, 23 Aug 2024 00:37:45 +0000 Subject: [PATCH 0039/1614] chore(release): Bumped to Version 15.33.5 ## [15.33.5](https://github.com/frappe/erpnext/compare/v15.33.4...v15.33.5) (2024-08-23) ### Bug Fixes * include erpnext in apps page ([be736cf](https://github.com/frappe/erpnext/commit/be736cf6415a18d0811095d389a378bb22854d58)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index ecf8221f778..5ff4bdbe8ce 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -3,7 +3,7 @@ import inspect import frappe -__version__ = "15.33.4" +__version__ = "15.33.5" def get_default_company(user=None): From da7b69109a4b3a5f5d8e1ac130008918e8a6763f Mon Sep 17 00:00:00 2001 From: Carlos9K Date: Sun, 18 Aug 2024 12:49:24 +0000 Subject: [PATCH 0040/1614] fix: getting scrap items from sub assemblies by fetching scrap items for parent BOM --- erpnext/manufacturing/doctype/bom/bom.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py index 009320c7a18..65e0fb609ca 100644 --- a/erpnext/manufacturing/doctype/bom/bom.py +++ b/erpnext/manufacturing/doctype/bom/bom.py @@ -1511,7 +1511,10 @@ def get_scrap_items_from_sub_assemblies(bom_no, company, qty, scrap_items=None): fields=["bom_no", "qty"], order_by="idx asc", ) - + # fetch Scrap Items for Parent Bom + items = get_bom_items_as_dict(bom_no, company, qty=qty, fetch_exploded=0, fetch_scrap_items=1) + scrap_items.update(items) + for row in bom_items: if not row.bom_no: continue From b62df307d38247a59122efbade3ed9aba0d02b45 Mon Sep 17 00:00:00 2001 From: KerollesFathy Date: Mon, 26 Aug 2024 18:09:09 +0300 Subject: [PATCH 0041/1614] style: format code --- erpnext/manufacturing/doctype/bom/bom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py index 65e0fb609ca..303670cee72 100644 --- a/erpnext/manufacturing/doctype/bom/bom.py +++ b/erpnext/manufacturing/doctype/bom/bom.py @@ -1514,7 +1514,7 @@ def get_scrap_items_from_sub_assemblies(bom_no, company, qty, scrap_items=None): # fetch Scrap Items for Parent Bom items = get_bom_items_as_dict(bom_no, company, qty=qty, fetch_exploded=0, fetch_scrap_items=1) scrap_items.update(items) - + for row in bom_items: if not row.bom_no: continue From cb2cb4447a1ede7052c5f929a1e91aea7ab6582d Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Wed, 28 Aug 2024 05:04:27 +0000 Subject: [PATCH 0042/1614] chore(release): Bumped to Version 15.34.0 # [15.34.0](https://github.com/frappe/erpnext/compare/v15.33.5...v15.34.0) (2024-08-28) ### Bug Fixes * calculation correction for annual depreciation ([fa85482](https://github.com/frappe/erpnext/commit/fa8548266290e543e77b8255b3b98645c7f0ed05)) * call 'process' directly instead of creating 'process_subscripti ([7582827](https://github.com/frappe/erpnext/commit/758282739ed6d7ab4f60c4e1fa4aaf752400a681)) * Cannot read properties of null (reading 'doctype') (backport [#42941](https://github.com/frappe/erpnext/issues/42941)) ([#42943](https://github.com/frappe/erpnext/issues/42943)) ([2c99075](https://github.com/frappe/erpnext/commit/2c990758992bc3f04be6f2606efb5450b8b89c52)) * Column 'valuation_rate' cannot be null (backport [#42909](https://github.com/frappe/erpnext/issues/42909)) ([#42913](https://github.com/frappe/erpnext/issues/42913)) ([8c350d4](https://github.com/frappe/erpnext/commit/8c350d43b26fe195824eedd73092bc9345668e3f)) * custom stock entry type issue (backport [#42835](https://github.com/frappe/erpnext/issues/42835)) ([#42846](https://github.com/frappe/erpnext/issues/42846)) ([831e2aa](https://github.com/frappe/erpnext/commit/831e2aaf1840a2350249eefecb10ea29e7567908)) * do not copy date fields in opportunity doctype ([7401dc4](https://github.com/frappe/erpnext/commit/7401dc4015fe15862faf59d0492e63a57cf13d73)) * get amount with taxes and charges from payment entry ([c54e97b](https://github.com/frappe/erpnext/commit/c54e97b89a09f6cecd7380cccca71ece07fed5f6)) * include erpnext in apps page ([7428df8](https://github.com/frappe/erpnext/commit/7428df8778ac770085bda24bdca21bc1959e298a)) * incorrect in and out qty in the Batch-Wise Balance History (backport [#42866](https://github.com/frappe/erpnext/issues/42866)) ([#42876](https://github.com/frappe/erpnext/issues/42876)) ([d9ca680](https://github.com/frappe/erpnext/commit/d9ca680a29eea5a4c8b90fd66309df346c248359)) * incorrect Received Qty Amount in Purchase Order Analysis (backport [#42852](https://github.com/frappe/erpnext/issues/42852)) ([#42854](https://github.com/frappe/erpnext/issues/42854)) ([72c1609](https://github.com/frappe/erpnext/commit/72c16097d64384a4218e7646e2c4efcdc0790d82)) * last purchase rate not updated from purchase invoice (backport [#42847](https://github.com/frappe/erpnext/issues/42847)) ([#42853](https://github.com/frappe/erpnext/issues/42853)) ([2203ea9](https://github.com/frappe/erpnext/commit/2203ea9301eea01714809811ec8f774ebbc59b1e)) * LCV based on purchase invoice amount with multi-currency (backport [#42890](https://github.com/frappe/erpnext/issues/42890)) ([#42894](https://github.com/frappe/erpnext/issues/42894)) ([ff868a9](https://github.com/frappe/erpnext/commit/ff868a9290f272b3dc6a47c5b9f890d392cc8c82)) * make party naming sequential when naming_by set as auto name ([0650c22](https://github.com/frappe/erpnext/commit/0650c22b53cfd801970f88aa3b0230869ace8a00)) * not able to make stock entry against MR (backport [#42874](https://github.com/frappe/erpnext/issues/42874)) ([#42875](https://github.com/frappe/erpnext/issues/42875)) ([08bed61](https://github.com/frappe/erpnext/commit/08bed618f611560635b17fc5d77b6934b31b7551)) * same posting date and time, creation causing incorrect balance qty (backport [#42904](https://github.com/frappe/erpnext/issues/42904)) ([#42920](https://github.com/frappe/erpnext/issues/42920)) ([2624892](https://github.com/frappe/erpnext/commit/26248924b651d466fc9cf7ffe071787d65159af0)) * spec mobile and email fields for notifications ([f56ee58](https://github.com/frappe/erpnext/commit/f56ee58e8161edd867fa19e9d0beeb8d87354985)) * timeout while submitting stock entry (backport [#42929](https://github.com/frappe/erpnext/issues/42929)) ([#42931](https://github.com/frappe/erpnext/issues/42931)) ([ec26c92](https://github.com/frappe/erpnext/commit/ec26c92263ba2c7acdd3941b2569f59af6a6bed9)) * unsupported operand type(s) for *: 'float' and 'NoneType' (backport [#42916](https://github.com/frappe/erpnext/issues/42916)) ([#42918](https://github.com/frappe/erpnext/issues/42918)) ([8d29dc6](https://github.com/frappe/erpnext/commit/8d29dc6a81e95703b1215b2278a7186f565eabe9)) * update dimesions in exchange_gain_loss jv based on base document ([caa6ca1](https://github.com/frappe/erpnext/commit/caa6ca1d0b300e30f08bd431186e31161f8ef0a2)) * Update get_amount to return currency precision grand total ([976abf7](https://github.com/frappe/erpnext/commit/976abf7b3c92cd6387275442f87c784d4adf16e1)) * use of incorrect attribute ([80244ba](https://github.com/frappe/erpnext/commit/80244bafa44bdd2198788453bd9bae0973dc16ec)) ### Features * added finance book filter in depreciation and balances report ([5bdd298](https://github.com/frappe/erpnext/commit/5bdd2989c67293ed0e5d786637f4373ef7bb7c97)) * Disassembly Order (backport [#42655](https://github.com/frappe/erpnext/issues/42655)) ([#42957](https://github.com/frappe/erpnext/issues/42957)) ([8d8dd0c](https://github.com/frappe/erpnext/commit/8d8dd0cd2bbb34e23832aa83055e78fa08be2245)) * report to identify incorrectly cleared cheques ([25193c5](https://github.com/frappe/erpnext/commit/25193c5e92f7423668c696bd5996150299f58288)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 5ff4bdbe8ce..c798ed0a02f 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -3,7 +3,7 @@ import inspect import frappe -__version__ = "15.33.5" +__version__ = "15.34.0" def get_default_company(user=None): From 5db66bd6dd2a6ab37f559f4d389e38f497f6649f Mon Sep 17 00:00:00 2001 From: KerollesFathy Date: Wed, 28 Aug 2024 12:59:18 +0300 Subject: [PATCH 0043/1614] test: get scrap items from sub assemblies consider the parent BOM --- erpnext/manufacturing/doctype/bom/test_bom.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/erpnext/manufacturing/doctype/bom/test_bom.py b/erpnext/manufacturing/doctype/bom/test_bom.py index d02b51ca6e7..e6ee59afb27 100644 --- a/erpnext/manufacturing/doctype/bom/test_bom.py +++ b/erpnext/manufacturing/doctype/bom/test_bom.py @@ -755,6 +755,19 @@ class TestBOM(FrappeTestCase): self.assertTrue("_Test RM Item 2 Fixed Asset Item" not in items) self.assertTrue("_Test RM Item 3 Manufacture Item" in items) + def test_get_scrap_items_from_sub_assemblies(self): + from erpnext.manufacturing.doctype.bom.bom import get_scrap_items_from_sub_assemblies + + bom = frappe.copy_doc(test_records[1]) + bom.insert(ignore_mandatory=True) + + bom_scraped_items = [i.get("item_code") for i in bom.get("scrap_items", [])] + + # get scrapted items for parent bom + scraped_items = get_scrap_items_from_sub_assemblies(bom.name, bom.company, 2, None) + for item_code in scraped_items.keys(): + self.assertIn(item_code, bom_scraped_items, f"Item {item_code} not found in BOM scrap items") + def get_default_bom(item_code="_Test FG Item 2"): return frappe.db.get_value("BOM", {"item": item_code, "is_active": 1, "is_default": 1}) From 56dad7d365a7debf98b8739352002adb3294bc79 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 5 Sep 2024 16:00:33 +0530 Subject: [PATCH 0044/1614] fix: disabled batches showing in the list (backport #43024) (#43069) fix: disabled batches showing in the list (#43024) (cherry picked from commit c13a147df1057db8a5fac86b1a81dfd970f570bc) Co-authored-by: rohitwaghchaure --- erpnext/controllers/queries.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/controllers/queries.py b/erpnext/controllers/queries.py index a07a00dd03e..919bbb477f4 100644 --- a/erpnext/controllers/queries.py +++ b/erpnext/controllers/queries.py @@ -366,7 +366,7 @@ def get_batch_no(doctype, txt, searchfield, start, page_len, filters): def get_empty_batches(filters, start, page_len, filtered_batches=None, txt=None): - query_filter = {"item": filters.get("item_code")} + query_filter = {"item": filters.get("item_code"), "disabled": 0} if txt: query_filter["name"] = ("like", f"%{txt}%") From d2b200266461b9eaafab2f8e349189f7e017022d Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 5 Sep 2024 16:00:47 +0530 Subject: [PATCH 0045/1614] fix: auto reorder material request mail issue (backport #43066) (#43068) fix: auto reorder material request mail issue (#43066) fix: auto reorder matreial request mail issue (cherry picked from commit a8055a6da975a4a59ce17052d31d7672f3b46ba7) Co-authored-by: rohitwaghchaure --- erpnext/stock/reorder_item.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/erpnext/stock/reorder_item.py b/erpnext/stock/reorder_item.py index 7bc8b71917c..ed87906731e 100644 --- a/erpnext/stock/reorder_item.py +++ b/erpnext/stock/reorder_item.py @@ -354,9 +354,14 @@ def get_email_list(company): def get_comapny_wise_users(company): + companies = [company] + + if parent_company := frappe.db.get_value("Company", company, "parent_company"): + companies.append(parent_company) + users = frappe.get_all( "User Permission", - filters={"allow": "Company", "for_value": company, "apply_to_all_doctypes": 1}, + filters={"allow": "Company", "for_value": ("in", companies), "apply_to_all_doctypes": 1}, fields=["user"], ) From 99828d945fe13540b1ccbfb68b86c623c9832940 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 5 Sep 2024 14:38:22 +0530 Subject: [PATCH 0046/1614] refactor: Handle Emp Advance as separate row in AP report (cherry picked from commit eedf22b07a86c0c8ff6763e94f7f541482714fa5) --- .../accounts_receivable.py | 48 ++++++++++++------- 1 file changed, 30 insertions(+), 18 deletions(-) diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py index f8511d2f497..59087a7c2d0 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py @@ -112,6 +112,26 @@ class ReceivablePayableReport: self.build_data() + def build_voucher_dict(self, ple): + return frappe._dict( + voucher_type=ple.voucher_type, + voucher_no=ple.voucher_no, + party=ple.party, + party_account=ple.account, + posting_date=ple.posting_date, + account_currency=ple.account_currency, + remarks=ple.remarks, + invoiced=0.0, + paid=0.0, + credit_note=0.0, + outstanding=0.0, + invoiced_in_account_currency=0.0, + paid_in_account_currency=0.0, + credit_note_in_account_currency=0.0, + outstanding_in_account_currency=0.0, + cost_center=ple.cost_center, + ) + def init_voucher_balance(self): # build all keys, since we want to exclude vouchers beyond the report date for ple in self.ple_entries: @@ -123,24 +143,8 @@ class ReceivablePayableReport: key = (ple.account, ple.voucher_type, ple.voucher_no, ple.party) if key not in self.voucher_balance: - self.voucher_balance[key] = frappe._dict( - voucher_type=ple.voucher_type, - voucher_no=ple.voucher_no, - party=ple.party, - party_account=ple.account, - posting_date=ple.posting_date, - account_currency=ple.account_currency, - remarks=ple.remarks, - invoiced=0.0, - paid=0.0, - credit_note=0.0, - outstanding=0.0, - invoiced_in_account_currency=0.0, - paid_in_account_currency=0.0, - credit_note_in_account_currency=0.0, - outstanding_in_account_currency=0.0, - cost_center=ple.cost_center, - ) + self.voucher_balance[key] = self.build_voucher_dict(ple) + self.get_invoices(ple) if self.filters.get("group_by_party"): @@ -208,6 +212,14 @@ class ReceivablePayableReport: row = self.voucher_balance.get(key) + # Build and use a separate row for Employee Advances. + # This allows Payments or Journals made against Emp Advance to be processed. + if not row and ple.against_voucher_type == "Employee Advance": + _d = self.build_voucher_dict(ple) + _d.voucher_type = ple.against_voucher_type + _d.voucher_no = ple.against_voucher_no + row = self.voucher_balance[key] = _d + if not row: # no invoice, this is an invoice / stand-alone payment / credit note if self.filters.get("ignore_accounts"): From efdc2173b233261d99fb8e7134158bd4805359a2 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 5 Sep 2024 16:12:52 +0530 Subject: [PATCH 0047/1614] refactor: filter to toggle employee advance scenario in AP (cherry picked from commit 257e13c2997a0d2fc7682ae9b7b5feca837a63dc) # Conflicts: # erpnext/accounts/report/accounts_payable/accounts_payable.js --- .../accounts/report/accounts_payable/accounts_payable.js | 5 +++++ .../report/accounts_receivable/accounts_receivable.py | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/report/accounts_payable/accounts_payable.js b/erpnext/accounts/report/accounts_payable/accounts_payable.js index 86463f1f1f2..ee37c1a2153 100644 --- a/erpnext/accounts/report/accounts_payable/accounts_payable.js +++ b/erpnext/accounts/report/accounts_payable/accounts_payable.js @@ -158,8 +158,13 @@ frappe.query_reports["Accounts Payable"] = { fieldtype: "Check", }, { +<<<<<<< HEAD fieldname: "in_party_currency", label: __("In Party Currency"), +======= + fieldname: "handle_employee_advances", + label: __("Handle Employee Advances"), +>>>>>>> 257e13c299 (refactor: filter to toggle employee advance scenario in AP) fieldtype: "Check", }, ], diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py index 59087a7c2d0..6303b317e78 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py @@ -214,7 +214,11 @@ class ReceivablePayableReport: # Build and use a separate row for Employee Advances. # This allows Payments or Journals made against Emp Advance to be processed. - if not row and ple.against_voucher_type == "Employee Advance": + if ( + not row + and ple.against_voucher_type == "Employee Advance" + and self.filters.handle_employee_advances + ): _d = self.build_voucher_dict(ple) _d.voucher_type = ple.against_voucher_type _d.voucher_no = ple.against_voucher_no From 7f261f34483aa3f8ebb38e55f480cc7d80d655c9 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Thu, 5 Sep 2024 11:44:28 +0000 Subject: [PATCH 0048/1614] chore(release): Bumped to Version 15.34.1 ## [15.34.1](https://github.com/frappe/erpnext/compare/v15.34.0...v15.34.1) (2024-09-05) ### Bug Fixes * add the company in payment request bcz delete company transactions (backport [#42664](https://github.com/frappe/erpnext/issues/42664)) ([#42982](https://github.com/frappe/erpnext/issues/42982)) ([42e7725](https://github.com/frappe/erpnext/commit/42e7725442c0c6d4ace34c84a9ca4ec8ae6d6e8f)) * added app permission check for apps page ([a35ce12](https://github.com/frappe/erpnext/commit/a35ce12d6000152feef4e87a15046d63a7b85d7e)) * adjust price insertion logic for internal suppliers/customers ([#42988](https://github.com/frappe/erpnext/issues/42988)) ([daa75ee](https://github.com/frappe/erpnext/commit/daa75eea00d46c565380c4303eba1e939fe3579a)) * auto reorder material request mail issue (backport [#43066](https://github.com/frappe/erpnext/issues/43066)) ([#43068](https://github.com/frappe/erpnext/issues/43068)) ([d2b2002](https://github.com/frappe/erpnext/commit/d2b200266461b9eaafab2f8e349189f7e017022d)) * **capitalization:** debit cwip account instead of fixed asset account ([#42857](https://github.com/frappe/erpnext/issues/42857)) ([f3c60ea](https://github.com/frappe/erpnext/commit/f3c60ea0a781d0aea185013bda4baa4ec3064525)) * company accounts setup_queries ([b99cdb5](https://github.com/frappe/erpnext/commit/b99cdb5be7be2d31acadc252404b792ba1d31561)) * disabled batches showing in the list (backport [#43024](https://github.com/frappe/erpnext/issues/43024)) ([#43069](https://github.com/frappe/erpnext/issues/43069)) ([56dad7d](https://github.com/frappe/erpnext/commit/56dad7d365a7debf98b8739352002adb3294bc79)) * don't allow capitalizing only service item for new composite asset ([a833010](https://github.com/frappe/erpnext/commit/a833010d2bb09c7c5798d7aefad9c5dc61394641)) * improve asset item matching logic ([3bb1867](https://github.com/frappe/erpnext/commit/3bb186736d8adbf83cdb1d75bb4f5f9db8af8532)) * indentation ([4d7c0c0](https://github.com/frappe/erpnext/commit/4d7c0c004a2677be6fad1154ff1ff80eadfe7482)) * link Purchase Invoice and Receipt Items to Asset ([1121c66](https://github.com/frappe/erpnext/commit/1121c6663f325502e867eea76a144dfe55c522b3)) * retain date filter when redirecting in Profit and Loss report ([f0e3fb4](https://github.com/frappe/erpnext/commit/f0e3fb466a7deeb438b0ff7d9e932dea2298951d)) * typeerror on Payment Entry ([6d51d14](https://github.com/frappe/erpnext/commit/6d51d14dfd3924e369073fc18e643fcdaaa26e6f)) * typerror on default_currency ([7d6984c](https://github.com/frappe/erpnext/commit/7d6984c87331d27705f9a92be13d84ed46afa946)) * update develop_version in hooks ([6c8e0fd](https://github.com/frappe/erpnext/commit/6c8e0fd1fbefca5e69be899ce317ecb10a6c10e7)) * validate component quantity according to BOM (backport [#43011](https://github.com/frappe/erpnext/issues/43011)) ([#43014](https://github.com/frappe/erpnext/issues/43014)) ([fee2255](https://github.com/frappe/erpnext/commit/fee2255661e6a930a627acca9faa271f7b30c112)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index eab2a96b941..e782ce5e145 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.34.0" +__version__ = "15.34.1" def get_default_company(user=None): From cb64f90d7d3a9e350b74773c9841b5dad39f1afe Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 5 Sep 2024 17:22:47 +0530 Subject: [PATCH 0049/1614] chore: resolve conflict --- .../accounts/report/accounts_payable/accounts_payable.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/report/accounts_payable/accounts_payable.js b/erpnext/accounts/report/accounts_payable/accounts_payable.js index ee37c1a2153..4f3ffd6b839 100644 --- a/erpnext/accounts/report/accounts_payable/accounts_payable.js +++ b/erpnext/accounts/report/accounts_payable/accounts_payable.js @@ -158,13 +158,13 @@ frappe.query_reports["Accounts Payable"] = { fieldtype: "Check", }, { -<<<<<<< HEAD fieldname: "in_party_currency", label: __("In Party Currency"), -======= + fieldtype: "Check", + }, + { fieldname: "handle_employee_advances", label: __("Handle Employee Advances"), ->>>>>>> 257e13c299 (refactor: filter to toggle employee advance scenario in AP) fieldtype: "Check", }, ], From 75cb29890d5f275dc172c4528fb1ecf41e02d8ea Mon Sep 17 00:00:00 2001 From: ljain112 Date: Tue, 27 Aug 2024 16:53:34 +0530 Subject: [PATCH 0050/1614] fix: `default_advance_account` field in Process Payment Reconciliation (cherry picked from commit 143209f91a201c58004408cd04812aefa49e9f94) # Conflicts: # erpnext/accounts/doctype/process_payment_reconciliation/process_payment_reconciliation.json --- .../process_payment_reconciliation.js | 20 ++++++++++++++++++- .../process_payment_reconciliation.json | 18 ++++++++++++++++- .../process_payment_reconciliation.py | 2 ++ 3 files changed, 38 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/process_payment_reconciliation/process_payment_reconciliation.js b/erpnext/accounts/doctype/process_payment_reconciliation/process_payment_reconciliation.js index 0f52a4d998e..9c0a14bd177 100644 --- a/erpnext/accounts/doctype/process_payment_reconciliation/process_payment_reconciliation.js +++ b/erpnext/accounts/doctype/process_payment_reconciliation/process_payment_reconciliation.js @@ -20,6 +20,17 @@ frappe.ui.form.on("Process Payment Reconciliation", { }, }; }); + + frm.set_query("default_advance_account", function (doc) { + return { + filters: { + company: doc.company, + is_group: 0, + account_type: doc.party_type == "Customer" ? "Receivable" : "Payable", + root_type: doc.party_type == "Customer" ? "Liability" : "Asset", + }, + }; + }); frm.set_query("cost_center", function (doc) { return { filters: { @@ -102,6 +113,7 @@ frappe.ui.form.on("Process Payment Reconciliation", { company(frm) { frm.set_value("party", ""); frm.set_value("receivable_payable_account", ""); + frm.set_value("default_advance_account", ""); }, party_type(frm) { frm.set_value("party", ""); @@ -109,6 +121,7 @@ frappe.ui.form.on("Process Payment Reconciliation", { party(frm) { frm.set_value("receivable_payable_account", ""); + frm.set_value("default_advance_account", ""); if (!frm.doc.receivable_payable_account && frm.doc.party_type && frm.doc.party) { return frappe.call({ method: "erpnext.accounts.party.get_party_account", @@ -119,7 +132,12 @@ frappe.ui.form.on("Process Payment Reconciliation", { }, callback: (r) => { if (!r.exc && r.message) { - frm.set_value("receivable_payable_account", r.message); + if (typeof r.message === "string") { + frm.set_value("receivable_payable_account", r.message); + } else if (Array.isArray(r.message)) { + frm.set_value("receivable_payable_account", r.message[0]); + frm.set_value("default_advance_account", r.message[1]); + } } frm.refresh(); }, diff --git a/erpnext/accounts/doctype/process_payment_reconciliation/process_payment_reconciliation.json b/erpnext/accounts/doctype/process_payment_reconciliation/process_payment_reconciliation.json index 1a1ab4d800e..b0584dd4c4d 100644 --- a/erpnext/accounts/doctype/process_payment_reconciliation/process_payment_reconciliation.json +++ b/erpnext/accounts/doctype/process_payment_reconciliation/process_payment_reconciliation.json @@ -13,6 +13,7 @@ "column_break_io6c", "party", "receivable_payable_account", + "default_advance_account", "filter_section", "from_invoice_date", "to_invoice_date", @@ -141,12 +142,27 @@ { "fieldname": "section_break_a8yx", "fieldtype": "Section Break" + }, + { + "depends_on": "eval:doc.party", + "description": "Only 'Payment Entries' made against this advance account are supported.", + "documentation_url": "https://docs.erpnext.com/docs/user/manual/en/advance-in-separate-party-account", + "fieldname": "default_advance_account", + "fieldtype": "Link", + "label": "Default Advance Account", + "mandatory_depends_on": "doc.party_type", + "options": "Account", + "reqd": 1 } ], "index_web_pages_for_search": 1, "is_submittable": 1, "links": [], +<<<<<<< HEAD "modified": "2023-08-11 10:56:51.699137", +======= + "modified": "2024-08-27 14:48:56.715320", +>>>>>>> 143209f91a (fix: `default_advance_account` field in Process Payment Reconciliation) "modified_by": "Administrator", "module": "Accounts", "name": "Process Payment Reconciliation", @@ -180,4 +196,4 @@ "sort_order": "DESC", "states": [], "title_field": "company" -} \ No newline at end of file +} diff --git a/erpnext/accounts/doctype/process_payment_reconciliation/process_payment_reconciliation.py b/erpnext/accounts/doctype/process_payment_reconciliation/process_payment_reconciliation.py index 5048fc5e25e..882a2c4ad1c 100644 --- a/erpnext/accounts/doctype/process_payment_reconciliation/process_payment_reconciliation.py +++ b/erpnext/accounts/doctype/process_payment_reconciliation/process_payment_reconciliation.py @@ -23,6 +23,7 @@ class ProcessPaymentReconciliation(Document): bank_cash_account: DF.Link | None company: DF.Link cost_center: DF.Link | None + default_advance_account: DF.Link error_log: DF.LongText | None from_invoice_date: DF.Date | None from_payment_date: DF.Date | None @@ -101,6 +102,7 @@ def get_pr_instance(doc: str): "party_type", "party", "receivable_payable_account", + "default_advance_account", "from_invoice_date", "to_invoice_date", "from_payment_date", From 84b0fa38d5b99b6c2b646852e0081dd8fee4f3d1 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 3 Sep 2024 17:27:50 +0530 Subject: [PATCH 0051/1614] refactor: fetch advance account on party seleection (cherry picked from commit c4ed04cb31a80e694a3c27ec92e4e574f2035d39) --- .../process_payment_reconciliation.js | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/accounts/doctype/process_payment_reconciliation/process_payment_reconciliation.js b/erpnext/accounts/doctype/process_payment_reconciliation/process_payment_reconciliation.js index 9c0a14bd177..d72c4724690 100644 --- a/erpnext/accounts/doctype/process_payment_reconciliation/process_payment_reconciliation.js +++ b/erpnext/accounts/doctype/process_payment_reconciliation/process_payment_reconciliation.js @@ -129,6 +129,7 @@ frappe.ui.form.on("Process Payment Reconciliation", { company: frm.doc.company, party_type: frm.doc.party_type, party: frm.doc.party, + include_advance: 1, }, callback: (r) => { if (!r.exc && r.message) { From 9bd3d7a020ad8ce4e90da1ffdfddfc71510aab74 Mon Sep 17 00:00:00 2001 From: venkat102 Date: Thu, 5 Sep 2024 19:13:31 +0530 Subject: [PATCH 0052/1614] fix: cancel common party advance jv while canceling the invoice (cherry picked from commit 6a928b92dfa90de8290a3e5829deb69a80c6ccdb) --- erpnext/accounts/utils.py | 40 ++++++++++++++++++++++ erpnext/controllers/accounts_controller.py | 3 ++ 2 files changed, 43 insertions(+) diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py index 0450221222d..e462f749b54 100644 --- a/erpnext/accounts/utils.py +++ b/erpnext/accounts/utils.py @@ -781,6 +781,46 @@ def cancel_exchange_gain_loss_journal( gain_loss_je.cancel() +def cancel_common_party_journal(self): + if self.doctype not in ["Sales Invoice", "Purchase Invoice"]: + return + + if not frappe.db.get_single_value("Accounts Settings", "enable_common_party_accounting"): + return + + party_link = self.get_common_party_link() + if not party_link: + return + + journal_entry = frappe.db.get_value( + "Journal Entry Account", + filters={ + "reference_type": self.doctype, + "reference_name": self.name, + "docstatus": 1, + }, + fieldname="parent", + ) + + if not journal_entry: + return + + common_party_journal = frappe.db.get_value( + "Journal Entry", + filters={ + "name": journal_entry, + "is_system_generated": True, + "docstatus": 1, + }, + ) + + if not common_party_journal: + return + + common_party_je = frappe.get_doc("Journal Entry", common_party_journal) + common_party_je.cancel() + + def update_accounting_ledgers_after_reference_removal( ref_type: str | None = None, ref_no: str | None = None, payment_name: str | None = None ): diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index ce5d813b801..fbd717db153 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -1580,6 +1580,7 @@ class AccountsController(TransactionBase): remove_from_bank_transaction, ) from erpnext.accounts.utils import ( + cancel_common_party_journal, cancel_exchange_gain_loss_journal, unlink_ref_doc_from_payment_entries, ) @@ -1591,6 +1592,7 @@ class AccountsController(TransactionBase): # Cancel Exchange Gain/Loss Journal before unlinking cancel_exchange_gain_loss_journal(self) + cancel_common_party_journal(self) if frappe.db.get_single_value("Accounts Settings", "unlink_payment_on_cancellation_of_invoice"): unlink_ref_doc_from_payment_entries(self) @@ -2424,6 +2426,7 @@ class AccountsController(TransactionBase): jv.posting_date = self.posting_date jv.company = self.company jv.remark = f"Adjustment for {self.doctype} {self.name}" + jv.is_system_generated = True reconcilation_entry = frappe._dict() advance_entry = frappe._dict() From 6c74180e1c2fae184ae3300d0bfb9b932e8b9a13 Mon Sep 17 00:00:00 2001 From: venkat102 Date: Thu, 5 Sep 2024 23:30:35 +0530 Subject: [PATCH 0053/1614] test: add unit test for canceling the common party advance jv created from sales invoice (cherry picked from commit 8c6e3f3c12164f30f044b3bf1fa0b71b66ff837d) --- .../sales_invoice/test_sales_invoice.py | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py index fef30bdfecd..ce8627be27f 100644 --- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py @@ -3162,6 +3162,50 @@ class TestSalesInvoice(FrappeTestCase): party_link.delete() frappe.db.set_single_value("Accounts Settings", "enable_common_party_accounting", 0) + def test_sales_invoice_cancel_with_common_party_advance_jv(self): + from erpnext.accounts.doctype.opening_invoice_creation_tool.test_opening_invoice_creation_tool import ( + make_customer, + ) + from erpnext.accounts.doctype.party_link.party_link import create_party_link + from erpnext.buying.doctype.supplier.test_supplier import create_supplier + + # create a customer + customer = make_customer(customer="_Test Common Supplier") + # create a supplier + supplier = create_supplier(supplier_name="_Test Common Supplier").name + + # create a party link between customer & supplier + party_link = create_party_link("Supplier", supplier, customer) + + # enable common party accounting + frappe.db.set_single_value("Accounts Settings", "enable_common_party_accounting", 1) + + # create a sales invoice + si = create_sales_invoice(customer=customer) + + # check creation of journal entry + jv = frappe.db.get_value( + "Journal Entry Account", + filters={ + "reference_type": si.doctype, + "reference_name": si.name, + "docstatus": 1, + }, + fieldname="parent", + ) + + self.assertTrue(jv) + + # cancel sales invoice + si.cancel() + + # check cancellation of journal entry + jv_status = frappe.db.get_value("Journal Entry", jv, "docstatus") + self.assertEqual(jv_status, 2) + + party_link.delete() + frappe.db.set_single_value("Accounts Settings", "enable_common_party_accounting", 0) + def test_payment_statuses(self): from erpnext.accounts.doctype.payment_entry.test_payment_entry import get_payment_entry From 6fde07da0e5a477f375429ace53067f1ab8eb0c8 Mon Sep 17 00:00:00 2001 From: Khushi Rawat <142375893+khushi8112@users.noreply.github.com> Date: Fri, 6 Sep 2024 23:46:29 +0530 Subject: [PATCH 0054/1614] fix(minor): reorder expected value validation (cherry picked from commit 0a6bf1559bd21f94b903b8304d90fd727382a91a) --- erpnext/assets/doctype/asset/asset.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/assets/doctype/asset/asset.py b/erpnext/assets/doctype/asset/asset.py index f6846ea3cee..abb615ff277 100644 --- a/erpnext/assets/doctype/asset/asset.py +++ b/erpnext/assets/doctype/asset/asset.py @@ -125,7 +125,6 @@ class Asset(AccountsController): self.validate_cost_center() self.set_missing_values() self.validate_gross_and_purchase_amount() - self.validate_expected_value_after_useful_life() self.validate_finance_books() if not self.split_from: @@ -146,6 +145,7 @@ class Asset(AccountsController): "Asset Depreciation Schedules created:
{0}

Please check, edit if needed, and submit the Asset." ).format(asset_depr_schedules_links) ) + self.validate_expected_value_after_useful_life() self.set_total_booked_depreciations() self.total_asset_cost = self.gross_purchase_amount self.status = self.get_status() From 8447bf34f07c230f3084a2fe66e0295db10a566f Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Sat, 7 Sep 2024 17:32:42 +0530 Subject: [PATCH 0055/1614] fix: incorrect qty after transaction in SLE (backport #43103) (#43105) fix: incorrect qty after transaction in SLE (#43103) (cherry picked from commit 5ff87edc85b6bf1a355a44650440055abbb75ef5) Co-authored-by: rohitwaghchaure --- erpnext/stock/stock_ledger.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/stock_ledger.py b/erpnext/stock/stock_ledger.py index 556aac09abd..49a3a3335d1 100644 --- a/erpnext/stock/stock_ledger.py +++ b/erpnext/stock/stock_ledger.py @@ -1527,7 +1527,7 @@ def get_previous_sle_of_current_voucher(args, operator="<", exclude_current_vouc voucher_no = args.get("voucher_no") voucher_condition = f"and voucher_no != '{voucher_no}'" - elif args.get("creation"): + elif args.get("creation") and args.get("sle_id"): creation = args.get("creation") operator = "<=" voucher_condition = f"and creation < '{creation}'" From 0bc947f30db9ae0f5d99d3f44bb85c6568fef472 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Sat, 7 Sep 2024 17:32:42 +0530 Subject: [PATCH 0056/1614] fix: incorrect qty after transaction in SLE (backport #43103) (#43105) fix: incorrect qty after transaction in SLE (#43103) (cherry picked from commit 5ff87edc85b6bf1a355a44650440055abbb75ef5) Co-authored-by: rohitwaghchaure (cherry picked from commit 8447bf34f07c230f3084a2fe66e0295db10a566f) --- erpnext/stock/stock_ledger.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/stock_ledger.py b/erpnext/stock/stock_ledger.py index 556aac09abd..49a3a3335d1 100644 --- a/erpnext/stock/stock_ledger.py +++ b/erpnext/stock/stock_ledger.py @@ -1527,7 +1527,7 @@ def get_previous_sle_of_current_voucher(args, operator="<", exclude_current_vouc voucher_no = args.get("voucher_no") voucher_condition = f"and voucher_no != '{voucher_no}'" - elif args.get("creation"): + elif args.get("creation") and args.get("sle_id"): creation = args.get("creation") operator = "<=" voucher_condition = f"and creation < '{creation}'" From 829660e7f39cb5895a0df54e4ed3c2f335a400cd Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Sat, 7 Sep 2024 12:40:39 +0000 Subject: [PATCH 0057/1614] chore(release): Bumped to Version 15.34.2 ## [15.34.2](https://github.com/frappe/erpnext/compare/v15.34.1...v15.34.2) (2024-09-07) ### Bug Fixes * incorrect qty after transaction in SLE (backport [#43103](https://github.com/frappe/erpnext/issues/43103)) ([#43105](https://github.com/frappe/erpnext/issues/43105)) ([0bc947f](https://github.com/frappe/erpnext/commit/0bc947f30db9ae0f5d99d3f44bb85c6568fef472)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index e782ce5e145..10c7018c9c1 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.34.1" +__version__ = "15.34.2" def get_default_company(user=None): From b832b60b28e9cd015f061b65f56e220551e42b08 Mon Sep 17 00:00:00 2001 From: Sanket322 <113279972+Sanket322@users.noreply.github.com> Date: Mon, 9 Sep 2024 06:40:17 +0530 Subject: [PATCH 0058/1614] refactor: age range in one field (#42736) * fix: age range in one field * fix: patch for custom reports * refactor: stock ageing and account payable report * fix: fixing the test cases * fix: common patch for reports with ageing * refactor: rename variable and minor refactor * fix: fixing the test case (cherry picked from commit 05de8994b09cf7e5c1364631316d6b5d8bd2cf2e) --- .../accounts_payable/accounts_payable.js | 30 +----- .../accounts_payable/test_accounts_payable.py | 5 +- .../accounts_payable_summary.js | 30 +----- .../accounts_receivable.js | 30 +----- .../accounts_receivable.py | 65 +++++-------- .../test_accounts_receivable.py | 95 ++++--------------- .../accounts_receivable_summary.js | 30 +----- .../accounts_receivable_summary.py | 54 ++++------- .../test_accounts_receivable_summary.py | 10 +- erpnext/accounts/test/test_reports.py | 4 +- erpnext/patches.txt | 1 + .../v14_0/update_reports_with_range.py | 36 +++++++ .../stock/report/stock_ageing/stock_ageing.js | 23 +---- .../stock/report/stock_ageing/stock_ageing.py | 41 ++++---- .../report/stock_ageing/test_stock_ageing.py | 4 +- erpnext/stock/report/test_reports.py | 2 +- 16 files changed, 142 insertions(+), 318 deletions(-) create mode 100644 erpnext/patches/v14_0/update_reports_with_range.py diff --git a/erpnext/accounts/report/accounts_payable/accounts_payable.js b/erpnext/accounts/report/accounts_payable/accounts_payable.js index 4f3ffd6b839..445e532183b 100644 --- a/erpnext/accounts/report/accounts_payable/accounts_payable.js +++ b/erpnext/accounts/report/accounts_payable/accounts_payable.js @@ -61,32 +61,10 @@ frappe.query_reports["Accounts Payable"] = { default: "Due Date", }, { - fieldname: "range1", - label: __("Ageing Range 1"), - fieldtype: "Int", - default: "30", - reqd: 1, - }, - { - fieldname: "range2", - label: __("Ageing Range 2"), - fieldtype: "Int", - default: "60", - reqd: 1, - }, - { - fieldname: "range3", - label: __("Ageing Range 3"), - fieldtype: "Int", - default: "90", - reqd: 1, - }, - { - fieldname: "range4", - label: __("Ageing Range 4"), - fieldtype: "Int", - default: "120", - reqd: 1, + fieldname: "range", + label: __("Ageing Range"), + fieldtype: "Data", + default: "30, 60, 90, 120", }, { fieldname: "payment_terms_template", diff --git a/erpnext/accounts/report/accounts_payable/test_accounts_payable.py b/erpnext/accounts/report/accounts_payable/test_accounts_payable.py index 43856bf569f..8971dc3d37b 100644 --- a/erpnext/accounts/report/accounts_payable/test_accounts_payable.py +++ b/erpnext/accounts/report/accounts_payable/test_accounts_payable.py @@ -30,10 +30,7 @@ class TestAccountsPayable(AccountsTestMixin, FrappeTestCase): "party_type": "Supplier", "party": [self.supplier], "report_date": today(), - "range1": 30, - "range2": 60, - "range3": 90, - "range4": 120, + "range": "30, 60, 90, 120", "in_party_currency": 1, } diff --git a/erpnext/accounts/report/accounts_payable_summary/accounts_payable_summary.js b/erpnext/accounts/report/accounts_payable_summary/accounts_payable_summary.js index 92ea9e8f598..cf7a62c6b69 100644 --- a/erpnext/accounts/report/accounts_payable_summary/accounts_payable_summary.js +++ b/erpnext/accounts/report/accounts_payable_summary/accounts_payable_summary.js @@ -24,32 +24,10 @@ frappe.query_reports["Accounts Payable Summary"] = { default: "Due Date", }, { - fieldname: "range1", - label: __("Ageing Range 1"), - fieldtype: "Int", - default: "30", - reqd: 1, - }, - { - fieldname: "range2", - label: __("Ageing Range 2"), - fieldtype: "Int", - default: "60", - reqd: 1, - }, - { - fieldname: "range3", - label: __("Ageing Range 3"), - fieldtype: "Int", - default: "90", - reqd: 1, - }, - { - fieldname: "range4", - label: __("Ageing Range 4"), - fieldtype: "Int", - default: "120", - reqd: 1, + fieldname: "range", + label: __("Ageing Range"), + fieldtype: "Data", + default: "30, 60, 90, 120", }, { fieldname: "finance_book", diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.js b/erpnext/accounts/report/accounts_receivable/accounts_receivable.js index 7e795fbe3c1..9f15bbc333d 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.js +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.js @@ -89,32 +89,10 @@ frappe.query_reports["Accounts Receivable"] = { default: "Due Date", }, { - fieldname: "range1", - label: __("Ageing Range 1"), - fieldtype: "Int", - default: "30", - reqd: 1, - }, - { - fieldname: "range2", - label: __("Ageing Range 2"), - fieldtype: "Int", - default: "60", - reqd: 1, - }, - { - fieldname: "range3", - label: __("Ageing Range 3"), - fieldtype: "Int", - default: "90", - reqd: 1, - }, - { - fieldname: "range4", - label: __("Ageing Range 4"), - fieldtype: "Int", - default: "120", - reqd: 1, + fieldname: "range", + label: __("Ageing Range"), + fieldtype: "Data", + default: "30, 60, 90, 120", }, { fieldname: "customer_group", diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py index 6303b317e78..1a7638aaae4 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py @@ -50,6 +50,11 @@ class ReceivablePayableReport: getdate(nowdate()) if self.filters.report_date > getdate(nowdate()) else self.filters.report_date ) + if not self.filters.range: + self.filters.range = "30, 60, 90, 120" + self.ranges = [num.strip() for num in self.filters.range.split(",") if num.strip().isdigit()] + self.range_numbers = [num for num in range(1, len(self.ranges) + 2)] + def run(self, args): self.filters.update(args) self.set_defaults() @@ -733,37 +738,22 @@ class ReceivablePayableReport: # ageing buckets should not have amounts if due date is not reached if getdate(entry_date) > getdate(self.filters.report_date): - row.range1 = row.range2 = row.range3 = row.range4 = row.range5 = 0.0 + [setattr(row, f"range{i}", 0.0) for i in self.range_numbers] - row.total_due = row.range1 + row.range2 + row.range3 + row.range4 + row.range5 + row.total_due = sum(row[f"range{i}"] for i in self.range_numbers) def get_ageing_data(self, entry_date, row): # [0-30, 30-60, 60-90, 90-120, 120-above] - row.range1 = row.range2 = row.range3 = row.range4 = row.range5 = 0.0 + [setattr(row, f"range{i}", 0.0) for i in self.range_numbers] if not (self.age_as_on and entry_date): return row.age = (getdate(self.age_as_on) - getdate(entry_date)).days or 0 - index = None - if not (self.filters.range1 and self.filters.range2 and self.filters.range3 and self.filters.range4): - self.filters.range1, self.filters.range2, self.filters.range3, self.filters.range4 = ( - 30, - 60, - 90, - 120, - ) - - for i, days in enumerate( - [self.filters.range1, self.filters.range2, self.filters.range3, self.filters.range4] - ): - if cint(row.age) <= cint(days): - index = i - break - - if index is None: - index = 4 + index = next( + (i for i, days in enumerate(self.ranges) if cint(row.age) <= cint(days)), len(self.ranges) + ) row["range" + str(index + 1)] = row.outstanding def get_ple_entries(self): @@ -1075,6 +1065,7 @@ class ReceivablePayableReport: self.add_column(_("Debit Note"), fieldname="credit_note") self.add_column(_("Outstanding Amount"), fieldname="outstanding") + self.add_column(label=_("Age (Days)"), fieldname="age", fieldtype="Int", width=80) self.setup_ageing_columns() self.add_column( @@ -1133,34 +1124,26 @@ class ReceivablePayableReport: def setup_ageing_columns(self): # for charts self.ageing_column_labels = [] - self.add_column(label=_("Age (Days)"), fieldname="age", fieldtype="Int", width=80) + ranges = [*self.ranges, "Above"] + + prev_range_value = 0 + for idx, curr_range_value in enumerate(ranges): + label = f"{prev_range_value}-{curr_range_value}" + self.add_column(label=label, fieldname="range" + str(idx + 1)) - for i, label in enumerate( - [ - "0-{range1}".format(range1=self.filters["range1"]), - "{range1}-{range2}".format( - range1=cint(self.filters["range1"]) + 1, range2=self.filters["range2"] - ), - "{range2}-{range3}".format( - range2=cint(self.filters["range2"]) + 1, range3=self.filters["range3"] - ), - "{range3}-{range4}".format( - range3=cint(self.filters["range3"]) + 1, range4=self.filters["range4"] - ), - _("{range4}-Above").format(range4=cint(self.filters["range4"]) + 1), - ] - ): - self.add_column(label=label, fieldname="range" + str(i + 1)) self.ageing_column_labels.append(label) + if curr_range_value.isdigit(): + prev_range_value = cint(curr_range_value) + 1 + def get_chart_data(self): + precision = cint(frappe.db.get_default("float_precision")) or 2 rows = [] for row in self.data: row = frappe._dict(row) if not cint(row.bold): - values = [row.range1, row.range2, row.range3, row.range4, row.range5] - precision = cint(frappe.db.get_default("float_precision")) or 2 - rows.append({"values": [flt(val, precision) for val in values]}) + values = [flt(row.get(f"range{i}", None), precision) for i in self.range_numbers] + rows.append({"values": values}) self.chart = { "data": {"labels": self.ageing_column_labels, "datasets": rows}, diff --git a/erpnext/accounts/report/accounts_receivable/test_accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/test_accounts_receivable.py index c4baa4e4842..39ca78153c3 100644 --- a/erpnext/accounts/report/accounts_receivable/test_accounts_receivable.py +++ b/erpnext/accounts/report/accounts_receivable/test_accounts_receivable.py @@ -83,10 +83,7 @@ class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase): "party": [self.customer], "report_date": add_days(today(), 2), "based_on_payment_terms": 0, - "range1": 30, - "range2": 60, - "range3": 90, - "range4": 120, + "range": "30, 60, 90, 120", "show_remarks": False, } @@ -116,10 +113,7 @@ class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase): "company": self.company, "based_on_payment_terms": 1, "report_date": today(), - "range1": 30, - "range2": 60, - "range3": 90, - "range4": 120, + "range": "30, 60, 90, 120", "show_remarks": True, } @@ -172,10 +166,7 @@ class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase): filters = { "company": self.company, "report_date": today(), - "range1": 30, - "range2": 60, - "range3": 90, - "range4": 120, + "range": "30, 60, 90, 120", "show_remarks": True, } @@ -266,10 +257,7 @@ class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase): "company": self.company, "based_on_payment_terms": 0, "report_date": today(), - "range1": 30, - "range2": 60, - "range3": 90, - "range4": 120, + "range": "30, 60, 90, 120", } report = execute(filters) @@ -328,10 +316,7 @@ class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase): filters = { "company": self.company, "report_date": today(), - "range1": 30, - "range2": 60, - "range3": 90, - "range4": 120, + "range": "30, 60, 90, 120", } report = execute(filters) @@ -397,10 +382,7 @@ class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase): filters = { "company": self.company, "report_date": today(), - "range1": 30, - "range2": 60, - "range3": 90, - "range4": 120, + "range": "30, 60, 90, 120", } report = execute(filters) self.assertEqual(report[1], []) @@ -416,10 +398,7 @@ class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase): filters = { "company": self.company, "report_date": today(), - "range1": 30, - "range2": 60, - "range3": 90, - "range4": 120, + "range": "30, 60, 90, 120", "group_by_party": True, } report = execute(filters)[1] @@ -493,10 +472,7 @@ class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase): filters = { "company": self.company, "report_date": today(), - "range1": 30, - "range2": 60, - "range3": 90, - "range4": 120, + "range": "30, 60, 90, 120", "show_future_payments": True, } report = execute(filters)[1] @@ -555,10 +531,7 @@ class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase): filters = { "company": self.company, "report_date": today(), - "range1": 30, - "range2": 60, - "range3": 90, - "range4": 120, + "range": "30, 60, 90, 120", "sales_person": sales_person.name, "show_sales_person": True, } @@ -575,10 +548,7 @@ class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase): filters = { "company": self.company, "report_date": today(), - "range1": 30, - "range2": 60, - "range3": 90, - "range4": 120, + "range": "30, 60, 90, 120", "cost_center": self.cost_center, } report = execute(filters)[1] @@ -593,10 +563,7 @@ class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase): filters = { "company": self.company, "report_date": today(), - "range1": 30, - "range2": 60, - "range3": 90, - "range4": 120, + "range": "30, 60, 90, 120", "customer_group": cus_group, } report = execute(filters)[1] @@ -618,10 +585,7 @@ class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase): filters = { "company": self.company, "report_date": today(), - "range1": 30, - "range2": 60, - "range3": 90, - "range4": 120, + "range": "30, 60, 90, 120", "customer_group": cus_groups_list, # Use the list of customer groups } report = execute(filters)[1] @@ -660,10 +624,7 @@ class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase): filters = { "company": self.company, "report_date": today(), - "range1": 30, - "range2": 60, - "range3": 90, - "range4": 120, + "range": "30, 60, 90, 120", "party_account": self.debit_to, } report = execute(filters)[1] @@ -711,10 +672,7 @@ class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase): "party_type": "Customer", "party": [self.customer], "report_date": today(), - "range1": 30, - "range2": 60, - "range3": 90, - "range4": 120, + "range": "30, 60, 90, 120", "in_party_currency": 1, } @@ -754,10 +712,7 @@ class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase): "party_type": "Customer", "party": [self.customer1, self.customer3], "report_date": today(), - "range1": 30, - "range2": 60, - "range3": 90, - "range4": 120, + "range": "30, 60, 90, 120", } si1 = self.create_sales_invoice(no_payment_schedule=True, do_not_submit=True) @@ -837,10 +792,7 @@ class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase): filters = { "company": self.company, "report_date": today(), - "range1": 30, - "range2": 60, - "range3": 90, - "range4": 120, + "range": "30, 60, 90, 120", } report_ouput = execute(filters)[1] @@ -903,10 +855,7 @@ class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase): { "company": self.company, "report_date": today(), - "range1": 30, - "range2": 60, - "range3": 90, - "range4": 120, + "range": "30, 60, 90, 120", "show_future_payments": True, "in_party_currency": False, } @@ -965,10 +914,7 @@ class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase): filters = { "company": self.company, "report_date": today(), - "range1": 30, - "range2": 60, - "range3": 90, - "range4": 120, + "range": "30, 60, 90, 120", } # check invoice grand total and invoiced column's value for 3 payment terms @@ -991,10 +937,7 @@ class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase): filters = { "company": self.company, "report_date": today(), - "range1": 30, - "range2": 60, - "range3": 90, - "range4": 120, + "range": "30, 60, 90, 120", } # check invoice grand total and invoiced column's value for 3 payment terms diff --git a/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.js b/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.js index 964abc23747..e36f40169b3 100644 --- a/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.js +++ b/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.js @@ -24,32 +24,10 @@ frappe.query_reports["Accounts Receivable Summary"] = { default: "Due Date", }, { - fieldname: "range1", - label: __("Ageing Range 1"), - fieldtype: "Int", - default: "30", - reqd: 1, - }, - { - fieldname: "range2", - label: __("Ageing Range 2"), - fieldtype: "Int", - default: "60", - reqd: 1, - }, - { - fieldname: "range3", - label: __("Ageing Range 3"), - fieldtype: "Int", - default: "90", - reqd: 1, - }, - { - fieldname: "range4", - label: __("Ageing Range 4"), - fieldtype: "Int", - default: "120", - reqd: 1, + fieldname: "range", + label: __("Ageing Range"), + fieldtype: "Data", + default: "30, 60, 90, 120", }, { fieldname: "finance_book", diff --git a/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.py b/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.py index 6a1b1057724..87fc7ea68be 100644 --- a/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.py +++ b/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.py @@ -104,25 +104,23 @@ class AccountsReceivableSummary(ReceivablePayableReport): self.set_party_details(d) def init_party_total(self, row): + default_dict = { + "invoiced": 0.0, + "paid": 0.0, + "credit_note": 0.0, + "outstanding": 0.0, + "total_due": 0.0, + "future_amount": 0.0, + "sales_person": [], + "party_type": row.party_type, + } + for i in self.range_numbers: + range_key = f"range{i}" + default_dict[range_key] = 0.0 + self.party_total.setdefault( row.party, - frappe._dict( - { - "invoiced": 0.0, - "paid": 0.0, - "credit_note": 0.0, - "outstanding": 0.0, - "range1": 0.0, - "range2": 0.0, - "range3": 0.0, - "range4": 0.0, - "range5": 0.0, - "total_due": 0.0, - "future_amount": 0.0, - "sales_person": [], - "party_type": row.party_type, - } - ), + frappe._dict(default_dict), ) def set_party_details(self, row): @@ -173,6 +171,7 @@ class AccountsReceivableSummary(ReceivablePayableReport): self.add_column(_("Difference"), fieldname="diff") self.setup_ageing_columns() + self.add_column(label="Total Amount Due", fieldname="total_due") if self.filters.show_future_payments: self.add_column(label=_("Future Payment Amount"), fieldname="future_amount") @@ -206,27 +205,6 @@ class AccountsReceivableSummary(ReceivablePayableReport): label=_("Currency"), fieldname="currency", fieldtype="Link", options="Currency", width=80 ) - def setup_ageing_columns(self): - for i, label in enumerate( - [ - "0-{range1}".format(range1=self.filters["range1"]), - "{range1}-{range2}".format( - range1=cint(self.filters["range1"]) + 1, range2=self.filters["range2"] - ), - "{range2}-{range3}".format( - range2=cint(self.filters["range2"]) + 1, range3=self.filters["range3"] - ), - "{range3}-{range4}".format( - range3=cint(self.filters["range3"]) + 1, range4=self.filters["range4"] - ), - "{range4}-{above}".format(range4=cint(self.filters["range4"]) + 1, above=_("Above")), - ] - ): - self.add_column(label=label, fieldname="range" + str(i + 1)) - - # Add column for total due amount - self.add_column(label="Total Amount Due", fieldname="total_due") - def get_gl_balance(report_date, company): return frappe._dict( diff --git a/erpnext/accounts/report/accounts_receivable_summary/test_accounts_receivable_summary.py b/erpnext/accounts/report/accounts_receivable_summary/test_accounts_receivable_summary.py index 4ef607bab28..a98cc6af7a3 100644 --- a/erpnext/accounts/report/accounts_receivable_summary/test_accounts_receivable_summary.py +++ b/erpnext/accounts/report/accounts_receivable_summary/test_accounts_receivable_summary.py @@ -27,10 +27,7 @@ class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase): "company": self.company, "customer": self.customer, "posting_date": today(), - "range1": 30, - "range2": 60, - "range3": 90, - "range4": 120, + "range": "30, 60, 90, 120", } si = create_sales_invoice( @@ -121,10 +118,7 @@ class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase): "company": self.company, "customer": self.customer, "posting_date": today(), - "range1": 30, - "range2": 60, - "range3": 90, - "range4": 120, + "range": "30, 60, 90, 120", } si = create_sales_invoice( diff --git a/erpnext/accounts/test/test_reports.py b/erpnext/accounts/test/test_reports.py index c2e10f8fd47..56b7832a32e 100644 --- a/erpnext/accounts/test/test_reports.py +++ b/erpnext/accounts/test/test_reports.py @@ -14,8 +14,8 @@ DEFAULT_FILTERS = { REPORT_FILTER_TEST_CASES: list[tuple[ReportName, ReportFilters]] = [ ("General Ledger", {"group_by": "Group by Voucher (Consolidated)"}), ("General Ledger", {"group_by": "Group by Voucher (Consolidated)", "include_dimensions": 1}), - ("Accounts Payable", {"range1": 30, "range2": 60, "range3": 90, "range4": 120}), - ("Accounts Receivable", {"range1": 30, "range2": 60, "range3": 90, "range4": 120}), + ("Accounts Payable", {"range": "30, 60, 90, 120"}), + ("Accounts Receivable", {"range": "30, 60, 90, 120"}), ("Consolidated Financial Statement", {"report": "Balance Sheet"}), ("Consolidated Financial Statement", {"report": "Profit and Loss Statement"}), ("Consolidated Financial Statement", {"report": "Cash Flow"}), diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 2a97061a6a2..7350fa77e1c 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -371,6 +371,7 @@ erpnext.patches.v15_0.update_warehouse_field_in_asset_repair_consumed_item_docty erpnext.patches.v15_0.update_asset_repair_field_in_stock_entry erpnext.patches.v15_0.update_total_number_of_booked_depreciations erpnext.patches.v15_0.do_not_use_batchwise_valuation +erpnext.patches.v14_0.update_reports_with_range erpnext.patches.v15_0.drop_index_posting_datetime_from_sle erpnext.patches.v15_0.add_disassembly_order_stock_entry_type #1 erpnext.patches.v15_0.set_standard_stock_entry_type diff --git a/erpnext/patches/v14_0/update_reports_with_range.py b/erpnext/patches/v14_0/update_reports_with_range.py new file mode 100644 index 00000000000..2bda265ca66 --- /dev/null +++ b/erpnext/patches/v14_0/update_reports_with_range.py @@ -0,0 +1,36 @@ +import json + +import frappe + +REFERENCE_REPORTS = [ + "Accounts Receivable", + "Accounts Receivable Summary", + "Accounts Payable", + "Accounts Payable Summary", + "Stock Ageing", +] + + +def execute(): + for report in REFERENCE_REPORTS: + update_reference_reports(report) + + +def update_reference_reports(reference_report): + reports = frappe.get_all( + "Report", filters={"reference_report": reference_report}, fields={"json", "name"} + ) + + for report in reports: + update_report_json(report) + update_reference_reports(report.name) + + +def update_report_json(report): + report_json = json.loads(report.json) + report_filter = report_json.get("filters") + + keys_to_pop = [key for key in report_filter if key.startswith("range")] + report_filter["range"] = ", ".join(str(report_filter.pop(key)) for key in keys_to_pop) + + frappe.db.set_value("Report", report.name, "json", json.dumps(report_json)) diff --git a/erpnext/stock/report/stock_ageing/stock_ageing.js b/erpnext/stock/report/stock_ageing/stock_ageing.js index 578869b6e93..a3ebf14571d 100644 --- a/erpnext/stock/report/stock_ageing/stock_ageing.js +++ b/erpnext/stock/report/stock_ageing/stock_ageing.js @@ -54,25 +54,10 @@ frappe.query_reports["Stock Ageing"] = { options: "Brand", }, { - fieldname: "range1", - label: __("Ageing Range 1"), - fieldtype: "Int", - default: "30", - reqd: 1, - }, - { - fieldname: "range2", - label: __("Ageing Range 2"), - fieldtype: "Int", - default: "60", - reqd: 1, - }, - { - fieldname: "range3", - label: __("Ageing Range 3"), - fieldtype: "Int", - default: "90", - reqd: 1, + fieldname: "range", + label: __("Ageing Range"), + fieldtype: "Data", + default: "30, 60, 90", }, { fieldname: "show_warehouse_wise_stock", diff --git a/erpnext/stock/report/stock_ageing/stock_ageing.py b/erpnext/stock/report/stock_ageing/stock_ageing.py index 09af3f224a3..c7e0af6cd38 100644 --- a/erpnext/stock/report/stock_ageing/stock_ageing.py +++ b/erpnext/stock/report/stock_ageing/stock_ageing.py @@ -16,6 +16,7 @@ Filters = frappe._dict def execute(filters: Filters = None) -> tuple: to_date = filters["to_date"] + filters.ranges = [num.strip() for num in filters.range.split(",") if num.strip().isdigit()] columns = get_columns(filters) item_details = FIFOSlots(filters).generate() @@ -48,7 +49,7 @@ def format_report_data(filters: Filters, item_details: dict, to_date: str) -> li average_age = get_average_age(fifo_queue, to_date) earliest_age = date_diff(to_date, fifo_queue[0][1]) latest_age = date_diff(to_date, fifo_queue[-1][1]) - range1, range2, range3, above_range3 = get_range_age(filters, fifo_queue, to_date, item_dict) + range_values = get_range_age(filters, fifo_queue, to_date, item_dict) row = [details.name, details.item_name, details.description, details.item_group, details.brand] @@ -59,10 +60,7 @@ def format_report_data(filters: Filters, item_details: dict, to_date: str) -> li [ flt(item_dict.get("total_qty"), precision), average_age, - range1, - range2, - range3, - above_range3, + *range_values, earliest_age, latest_age, details.stock_uom, @@ -89,25 +87,22 @@ def get_average_age(fifo_queue: list, to_date: str) -> float: return flt(age_qty / total_qty, 2) if total_qty else 0.0 -def get_range_age(filters: Filters, fifo_queue: list, to_date: str, item_dict: dict) -> tuple: +def get_range_age(filters: Filters, fifo_queue: list, to_date: str, item_dict: dict) -> list: precision = cint(frappe.db.get_single_value("System Settings", "float_precision", cache=True)) - - range1 = range2 = range3 = above_range3 = 0.0 + range_values = [0.0] * (len(filters.ranges) + 1) for item in fifo_queue: age = flt(date_diff(to_date, item[1])) qty = flt(item[0]) if not item_dict["has_serial_no"] else 1.0 - if age <= flt(filters.range1): - range1 = flt(range1 + qty, precision) - elif age <= flt(filters.range2): - range2 = flt(range2 + qty, precision) - elif age <= flt(filters.range3): - range3 = flt(range3 + qty, precision) + for i, age_limit in enumerate(filters.ranges): + if age <= flt(age_limit): + range_values[i] = flt(range_values[i] + qty, precision) + break else: - above_range3 = flt(above_range3 + qty, precision) + range_values[-1] = flt(range_values[-1] + qty, precision) - return range1, range2, range3, above_range3 + return range_values def get_columns(filters: Filters) -> list[dict]: @@ -193,12 +188,14 @@ def get_chart_data(data: list, filters: Filters) -> dict: def setup_ageing_columns(filters: Filters, range_columns: list): - ranges = [ - f"0 - {filters['range1']}", - f"{cint(filters['range1']) + 1} - {cint(filters['range2'])}", - f"{cint(filters['range2']) + 1} - {cint(filters['range3'])}", - _("{0} - Above").format(cint(filters["range3"]) + 1), - ] + prev_range_value = 0 + ranges = [] + for range in filters.ranges: + ranges.append(f"{prev_range_value} - {range}") + prev_range_value = cint(range) + 1 + + ranges.append(f"{prev_range_value} - Above") + for i, label in enumerate(ranges): fieldname = "range" + str(i + 1) add_column(range_columns, label=_("Age ({0})").format(label), fieldname=fieldname) diff --git a/erpnext/stock/report/stock_ageing/test_stock_ageing.py b/erpnext/stock/report/stock_ageing/test_stock_ageing.py index fb363606233..c0c007e5015 100644 --- a/erpnext/stock/report/stock_ageing/test_stock_ageing.py +++ b/erpnext/stock/report/stock_ageing/test_stock_ageing.py @@ -9,9 +9,7 @@ from erpnext.stock.report.stock_ageing.stock_ageing import FIFOSlots, format_rep class TestStockAgeing(FrappeTestCase): def setUp(self) -> None: - self.filters = frappe._dict( - company="_Test Company", to_date="2021-12-10", range1=30, range2=60, range3=90 - ) + self.filters = frappe._dict(company="_Test Company", to_date="2021-12-10", ranges=["30", "60", "90"]) def test_normal_inward_outward_queue(self): "Reference: Case 1 in stock_ageing_fifo_logic.md (same wh)" diff --git a/erpnext/stock/report/test_reports.py b/erpnext/stock/report/test_reports.py index 74c6afa204b..85337a3bf54 100644 --- a/erpnext/stock/report/test_reports.py +++ b/erpnext/stock/report/test_reports.py @@ -62,7 +62,7 @@ REPORT_FILTER_TEST_CASES: list[tuple[ReportName, ReportFilters]] = [ ("Item Prices", {"items": "Enabled Items only"}), ("Delayed Item Report", {"based_on": "Sales Invoice"}), ("Delayed Item Report", {"based_on": "Delivery Note"}), - ("Stock Ageing", {"range1": 30, "range2": 60, "range3": 90, "_optional": True}), + ("Stock Ageing", {"range": "30, 60, 90", "_optional": True}), ("Stock Ledger Invariant Check", {"warehouse": "_Test Warehouse - _TC", "item": "_Test Item"}), ("FIFO Queue vs Qty After Transaction Comparison", {"warehouse": "_Test Warehouse - _TC"}), ("FIFO Queue vs Qty After Transaction Comparison", {"item_group": "All Item Groups"}), From 39150184008bcf7accdbddae2d6b9276ed3fdf5b Mon Sep 17 00:00:00 2001 From: Smit Vora Date: Mon, 9 Sep 2024 07:00:32 +0530 Subject: [PATCH 0059/1614] chore: resolve conflicts with backport --- .../process_payment_reconciliation.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/erpnext/accounts/doctype/process_payment_reconciliation/process_payment_reconciliation.json b/erpnext/accounts/doctype/process_payment_reconciliation/process_payment_reconciliation.json index b0584dd4c4d..0511571d754 100644 --- a/erpnext/accounts/doctype/process_payment_reconciliation/process_payment_reconciliation.json +++ b/erpnext/accounts/doctype/process_payment_reconciliation/process_payment_reconciliation.json @@ -158,11 +158,7 @@ "index_web_pages_for_search": 1, "is_submittable": 1, "links": [], -<<<<<<< HEAD - "modified": "2023-08-11 10:56:51.699137", -======= "modified": "2024-08-27 14:48:56.715320", ->>>>>>> 143209f91a (fix: `default_advance_account` field in Process Payment Reconciliation) "modified_by": "Administrator", "module": "Accounts", "name": "Process Payment Reconciliation", From 2c1f72e44cac422f5f2ab94b7b2934a5b0979c83 Mon Sep 17 00:00:00 2001 From: Sagar Vora Date: Mon, 19 Aug 2024 08:16:11 +0530 Subject: [PATCH 0060/1614] fix: ensure `SellingController.onload` gets called for SO & DN (cherry picked from commit 8431e3c275cc8cad8406f8a27436ecf31140106d) --- erpnext/selling/doctype/sales_order/sales_order.py | 2 ++ erpnext/stock/doctype/delivery_note/delivery_note.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py index 570677aad78..2f2d840cce8 100755 --- a/erpnext/selling/doctype/sales_order/sales_order.py +++ b/erpnext/selling/doctype/sales_order/sales_order.py @@ -185,6 +185,8 @@ class SalesOrder(SellingController): super().__init__(*args, **kwargs) def onload(self) -> None: + super().onload() + if frappe.db.get_single_value("Stock Settings", "enable_stock_reservation"): if self.has_unreserved_stock(): self.set_onload("has_unreserved_stock", True) diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.py b/erpnext/stock/doctype/delivery_note/delivery_note.py index 8a096aca80c..847a57baa72 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note.py +++ b/erpnext/stock/doctype/delivery_note/delivery_note.py @@ -208,6 +208,8 @@ class DeliveryNote(SellingController): ) def onload(self): + super().onload() + if self.docstatus == 0: self.set_onload("has_unpacked_items", self.has_unpacked_items()) From f45b1db1a402d57b7a6312d39f6ca975098a6ae5 Mon Sep 17 00:00:00 2001 From: Smit Vora Date: Mon, 9 Sep 2024 07:23:44 +0530 Subject: [PATCH 0061/1614] fix: multiple fixes related to remarks for GL Report (#42753) * fix: show remarks in report only if it exists * fix: additional fixes to reduce redundancy in report print format * fix: revert changes for supplier invoice reference * fix: update remarks before submit to ensure all available details before submit are used * fix: patch to update invoice remarks where it's not set * fix: update remarks in payment ledger entry (cherry picked from commit e5a49f738bb3593a42180491114cc9f5424f8685) --- .../purchase_invoice/purchase_invoice.py | 13 +++-- .../doctype/sales_invoice/sales_invoice.py | 13 +++-- .../report/general_ledger/general_ledger.html | 5 +- erpnext/patches.txt | 1 + .../patches/v15_0/update_invoice_remarks.py | 51 +++++++++++++++++++ 5 files changed, 71 insertions(+), 12 deletions(-) create mode 100644 erpnext/patches/v15_0/update_invoice_remarks.py diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index de99c35e27e..623fb941b89 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -285,7 +285,6 @@ class PurchaseInvoice(BuyingController): self.set_against_expense_account() self.validate_write_off_account() self.validate_multiple_billing("Purchase Receipt", "pr_detail", "amount") - self.create_remarks() self.set_status() self.validate_purchase_receipt_if_update_stock() validate_inter_company_party( @@ -322,10 +321,11 @@ class PurchaseInvoice(BuyingController): def create_remarks(self): if not self.remarks: - if self.bill_no and self.bill_date: - self.remarks = _("Against Supplier Invoice {0} dated {1}").format( - self.bill_no, formatdate(self.bill_date) - ) + if self.bill_no: + self.remarks = _("Against Supplier Invoice {0}").format(self.bill_no) + if self.bill_date: + self.remarks += " " + _("dated {0}").format(formatdate(self.bill_date)) + else: self.remarks = _("No Remarks") @@ -747,6 +747,9 @@ class PurchaseInvoice(BuyingController): validate_docs_for_voucher_types(["Purchase Invoice"]) validate_docs_for_deferred_accounting([], [self.name]) + def before_submit(self): + self.create_remarks() + def on_submit(self): super().on_submit() diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 1966a78ef49..12e26623ad0 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -278,7 +278,6 @@ class SalesInvoice(SellingController): self.check_sales_order_on_hold_or_close("sales_order") self.validate_debit_to_acc() self.clear_unallocated_advances("Sales Invoice Advance", "advances") - self.add_remarks() self.validate_fixed_asset() self.set_income_account_for_fixed_assets() self.validate_item_cost_centers() @@ -422,6 +421,9 @@ class SalesInvoice(SellingController): self.set_account_for_mode_of_payment() self.set_paid_amount() + def before_submit(self): + self.add_remarks() + def on_submit(self): self.validate_pos_paid_amount() @@ -946,10 +948,11 @@ class SalesInvoice(SellingController): def add_remarks(self): if not self.remarks: - if self.po_no and self.po_date: - self.remarks = _("Against Customer Order {0} dated {1}").format( - self.po_no, formatdate(self.po_date) - ) + if self.po_no: + self.remarks = _("Against Customer Order {0}").format(self.po_no) + if self.po_date: + self.remarks += " " + _("dated {0}").format(formatdate(self.po_data)) + else: self.remarks = _("No Remarks") diff --git a/erpnext/accounts/report/general_ledger/general_ledger.html b/erpnext/accounts/report/general_ledger/general_ledger.html index 3c4e1a05c97..bdea568bdf4 100644 --- a/erpnext/accounts/report/general_ledger/general_ledger.html +++ b/erpnext/accounts/report/general_ledger/general_ledger.html @@ -48,8 +48,9 @@
{% } %} -
{%= __("Remarks") %}: {%= data[i].remarks %} - {% if(data[i].bill_no) { %} + {% if(data[i].remarks) { %} +
{%= __("Remarks") %}: {%= data[i].remarks %} + {% } else if(data[i].bill_no) { %}
{%= __("Supplier Invoice No") %}: {%= data[i].bill_no %} {% } %} diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 7350fa77e1c..5b1455ef723 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -371,6 +371,7 @@ erpnext.patches.v15_0.update_warehouse_field_in_asset_repair_consumed_item_docty erpnext.patches.v15_0.update_asset_repair_field_in_stock_entry erpnext.patches.v15_0.update_total_number_of_booked_depreciations erpnext.patches.v15_0.do_not_use_batchwise_valuation +erpnext.patches.v15_0.update_invoice_remarks erpnext.patches.v14_0.update_reports_with_range erpnext.patches.v15_0.drop_index_posting_datetime_from_sle erpnext.patches.v15_0.add_disassembly_order_stock_entry_type #1 diff --git a/erpnext/patches/v15_0/update_invoice_remarks.py b/erpnext/patches/v15_0/update_invoice_remarks.py new file mode 100644 index 00000000000..7060fe57e31 --- /dev/null +++ b/erpnext/patches/v15_0/update_invoice_remarks.py @@ -0,0 +1,51 @@ +import frappe +from frappe import _ + + +def execute(): + update_sales_invoice_remarks() + update_purchase_invoice_remarks() + + +def update_sales_invoice_remarks(): + si_list = frappe.db.get_all( + "Sales Invoice", + filters={ + "docstatus": 1, + "remarks": "No Remarks", + "po_no": ["!=", ""], + }, + fields=["name", "po_no"], + ) + + for doc in si_list: + remarks = _("Against Customer Order {0}").format(doc.po_no) + update_remarks("Sales Invoice", doc.name, remarks) + + +def update_purchase_invoice_remarks(): + pi_list = frappe.db.get_all( + "Purchase Invoice", + filters={ + "docstatus": 1, + "remarks": "No Remarks", + "bill_no": ["!=", ""], + }, + fields=["name", "bill_no"], + ) + + for doc in pi_list: + remarks = _("Against Supplier Invoice {0}").format(doc.bill_no) + update_remarks("Purchase Invoice", doc.name, remarks) + + +def update_remarks(doctype, docname, remarks): + filters = { + "voucher_type": doctype, + "remarks": "No Remarks", + "voucher_no": docname, + } + + frappe.db.set_value(doctype, docname, "remarks", remarks) + frappe.db.set_value("GL Entry", filters, "remarks", remarks) + frappe.db.set_value("Payment Ledger Entry", filters, "remarks", remarks) From 80b5c16a2e3183553c5ad95c0a70ecf94310aa12 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 9 Sep 2024 09:56:29 +0530 Subject: [PATCH 0062/1614] fix: Cannot read properties of null (reading 'doc') (backport #43071) (#43118) fix: Cannot read properties of null (reading 'doc') (cherry picked from commit 62c3389bd620f4d31eb8ee4df6fbf3dec03e3ae6) Co-authored-by: Rohit Waghchaure --- erpnext/public/js/controllers/transaction.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index d8bf4a5cf17..91b938acb50 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -1510,8 +1510,8 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe item_grid.set_column_disp(fname, me.frm.doc.currency != company_currency); }); - var show = (cint(cur_frm.doc.discount_amount)) || - ((cur_frm.doc.taxes || []).filter(function(d) {return d.included_in_print_rate===1}).length); + var show = (cint(this.frm.doc.discount_amount)) || + ((this.frm.doc.taxes || []).filter(function(d) {return d.included_in_print_rate===1}).length); $.each(["net_rate", "net_amount"], function(i, fname) { if(frappe.meta.get_docfield(item_grid.doctype, fname)) From d17baddb0d3c13212f8695967ffb971b55306224 Mon Sep 17 00:00:00 2001 From: venkat102 Date: Fri, 6 Sep 2024 19:53:40 +0530 Subject: [PATCH 0063/1614] fix: check multi-currency on jv for common party accounting with foreign currency (cherry picked from commit 00938bfd4d1243b570e83f13f5774029ad0df3a1) --- erpnext/controllers/accounts_controller.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index fbd717db153..49198be9b48 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -2420,6 +2420,8 @@ class AccountsController(TransactionBase): primary_account = get_party_account(primary_party_type, primary_party, self.company) secondary_account = get_party_account(secondary_party_type, secondary_party, self.company) + primary_account_currency = get_account_currency(primary_account) + secondary_account_currency = get_account_currency(secondary_account) jv = frappe.new_doc("Journal Entry") jv.voucher_type = "Journal Entry" @@ -2460,6 +2462,10 @@ class AccountsController(TransactionBase): advance_entry.credit_in_account_currency = self.outstanding_amount reconcilation_entry.debit_in_account_currency = self.outstanding_amount + default_currency = erpnext.get_company_currency(self.company) + if primary_account_currency != default_currency or secondary_account_currency != default_currency: + jv.multi_currency = 1 + jv.append("accounts", reconcilation_entry) jv.append("accounts", advance_entry) From 47b216373d55bc4b8a1517b32c538ef247306602 Mon Sep 17 00:00:00 2001 From: venkat102 Date: Fri, 6 Sep 2024 20:01:35 +0530 Subject: [PATCH 0064/1614] test: add unit test for common party with foreign currency (cherry picked from commit 740a04a70437422dac2b824d058b264026228b79) # Conflicts: # erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py --- .../sales_invoice/test_sales_invoice.py | 194 +++++++++++++++++- 1 file changed, 193 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py index ce8627be27f..5f9cf6f104b 100644 --- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py @@ -51,7 +51,7 @@ class TestSalesInvoice(FrappeTestCase): from erpnext.stock.doctype.stock_ledger_entry.test_stock_ledger_entry import create_items create_items(["_Test Internal Transfer Item"], uoms=[{"uom": "Box", "conversion_factor": 10}]) - create_internal_parties() + # create_internal_parties() setup_accounts() frappe.db.set_single_value("Accounts Settings", "acc_frozen_upto", None) @@ -3915,6 +3915,198 @@ class TestSalesInvoice(FrappeTestCase): self.assertEqual(len(res), 1) self.assertEqual(res[0][0], pos_return.return_against) +<<<<<<< HEAD +======= + def test_validation_on_opening_invoice_with_rounding(self): + si = create_sales_invoice(qty=1, rate=99.98, do_not_submit=True) + si.is_opening = "Yes" + si.items[0].income_account = "Temporary Opening - _TC" + si.save() + self.assertRaises(frappe.ValidationError, si.submit) + + def _create_opening_roundoff_account(self, company_name): + liability_root = frappe.db.get_all( + "Account", + filters={"company": company_name, "root_type": "Liability", "disabled": 0}, + order_by="lft", + limit=1, + )[0] + + # setup round off account + if acc := frappe.db.exists( + "Account", + { + "account_name": "Round Off for Opening", + "account_type": "Round Off for Opening", + "company": company_name, + }, + ): + frappe.db.set_value("Company", company_name, "round_off_for_opening", acc) + else: + acc = frappe.new_doc("Account") + acc.company = company_name + acc.parent_account = liability_root.name + acc.account_name = "Round Off for Opening" + acc.account_type = "Round Off for Opening" + acc.save() + frappe.db.set_value("Company", company_name, "round_off_for_opening", acc.name) + + def test_opening_invoice_with_rounding_adjustment(self): + si = create_sales_invoice(qty=1, rate=99.98, do_not_submit=True) + si.is_opening = "Yes" + si.items[0].income_account = "Temporary Opening - _TC" + si.save() + + self._create_opening_roundoff_account(si.company) + + si.reload() + si.submit() + res = frappe.db.get_all( + "GL Entry", + filters={"voucher_no": si.name, "is_opening": "Yes"}, + fields=["account", "debit", "credit", "is_opening"], + ) + self.assertEqual(len(res), 3) + + def _create_opening_invoice_with_inclusive_tax(self): + si = create_sales_invoice(qty=1, rate=90, do_not_submit=True) + si.is_opening = "Yes" + si.items[0].income_account = "Temporary Opening - _TC" + item_template = si.items[0].as_dict() + item_template.name = None + item_template.rate = 55 + si.append("items", item_template) + si.append( + "taxes", + { + "charge_type": "On Net Total", + "account_head": "_Test Account Service Tax - _TC", + "cost_center": "_Test Cost Center - _TC", + "description": "Testing...", + "rate": 5, + "included_in_print_rate": True, + }, + ) + # there will be 0.01 precision loss between Dr and Cr + # caused by 'included_in_print_tax' option + si.save() + return si + + def test_rounding_validation_for_opening_with_inclusive_tax(self): + si = self._create_opening_invoice_with_inclusive_tax() + # 'Round Off for Opening' not set in Company master + # Ledger level validation must be thrown + self.assertRaises(frappe.ValidationError, si.submit) + + def test_ledger_entries_on_opening_invoice_with_rounding_loss_by_inclusive_tax(self): + si = self._create_opening_invoice_with_inclusive_tax() + # 'Round Off for Opening' is set in Company master + self._create_opening_roundoff_account(si.company) + + si.submit() + actual = frappe.db.get_all( + "GL Entry", + filters={"voucher_no": si.name, "is_opening": "Yes", "is_cancelled": False}, + fields=["account", "debit", "credit", "is_opening"], + order_by="account,debit", + ) + expected = [ + {"account": "_Test Account Service Tax - _TC", "debit": 0.0, "credit": 6.9, "is_opening": "Yes"}, + {"account": "Debtors - _TC", "debit": 145.0, "credit": 0.0, "is_opening": "Yes"}, + {"account": "Round Off for Opening - _TC", "debit": 0.0, "credit": 0.01, "is_opening": "Yes"}, + {"account": "Temporary Opening - _TC", "debit": 0.0, "credit": 138.09, "is_opening": "Yes"}, + ] + self.assertEqual(len(actual), 4) + self.assertEqual(expected, actual) + + def test_common_party_with_foreign_currency_jv(self): + from erpnext.accounts.doctype.account.test_account import create_account + from erpnext.accounts.doctype.opening_invoice_creation_tool.test_opening_invoice_creation_tool import ( + make_customer, + ) + from erpnext.accounts.doctype.party_link.party_link import create_party_link + from erpnext.buying.doctype.supplier.test_supplier import create_supplier + from erpnext.setup.utils import get_exchange_rate + + creditors = create_account( + account_name="Creditors USD", + parent_account="Accounts Payable - _TC", + company="_Test Company", + account_currency="USD", + account_type="Payable", + ) + debtors = create_account( + account_name="Debtors USD", + parent_account="Accounts Receivable - _TC", + company="_Test Company", + account_currency="USD", + account_type="Receivable", + ) + + # create a customer + customer = make_customer(customer="_Test Common Party USD") + cust_doc = frappe.get_doc("Customer", customer) + cust_doc.default_currency = "USD" + test_account_details = { + "company": "_Test Company", + "account": debtors, + } + cust_doc.append("accounts", test_account_details) + cust_doc.save() + + # create a supplier + supplier = create_supplier(supplier_name="_Test Common Party USD").name + supp_doc = frappe.get_doc("Supplier", supplier) + supp_doc.default_currency = "USD" + test_account_details = { + "company": "_Test Company", + "account": creditors, + } + supp_doc.append("accounts", test_account_details) + supp_doc.save() + + # enable common party accounting + frappe.db.set_single_value("Accounts Settings", "enable_common_party_accounting", 1) + + # create a party link between customer & supplier + party_link = create_party_link("Supplier", supplier, customer) + + # create a sales invoice + si = create_sales_invoice( + customer=customer, + currency="USD", + conversion_rate=get_exchange_rate("USD", "INR"), + debit_to=debtors, + do_not_save=1, + ) + si.party_account_currency = "USD" + si.save() + si.submit() + + # check outstanding of sales invoice + si.reload() + self.assertEqual(si.status, "Paid") + self.assertEqual(flt(si.outstanding_amount), 0.0) + + # check creation of journal entry + jv = frappe.get_all( + "Journal Entry Account", + { + "account": si.debit_to, + "party_type": "Customer", + "party": si.customer, + "reference_type": si.doctype, + "reference_name": si.name, + }, + pluck="credit_in_account_currency", + ) + self.assertTrue(jv) + self.assertEqual(jv[0], si.grand_total) + + party_link.delete() + frappe.db.set_single_value("Accounts Settings", "enable_common_party_accounting", 0) + +>>>>>>> 740a04a704 (test: add unit test for common party with foreign currency) def set_advance_flag(company, flag, default_account): frappe.db.set_value( From 33174b1ba26e7002d3e3286816182dba2223954e Mon Sep 17 00:00:00 2001 From: venkat102 Date: Fri, 6 Sep 2024 20:03:56 +0530 Subject: [PATCH 0065/1614] fix: uncomment internal parties (cherry picked from commit 454e18ad5fef1ad81aab3efcca1d7886a0d80fbf) --- erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py index 5f9cf6f104b..58db5bc7059 100644 --- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py @@ -51,7 +51,7 @@ class TestSalesInvoice(FrappeTestCase): from erpnext.stock.doctype.stock_ledger_entry.test_stock_ledger_entry import create_items create_items(["_Test Internal Transfer Item"], uoms=[{"uom": "Box", "conversion_factor": 10}]) - # create_internal_parties() + create_internal_parties() setup_accounts() frappe.db.set_single_value("Accounts Settings", "acc_frozen_upto", None) From a9bd11f59ae5aa1115a440812d87734aeba55c81 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Sat, 7 Sep 2024 11:39:06 +0530 Subject: [PATCH 0066/1614] refactor(test): use change_settings decorator (cherry picked from commit ee94fb37c81a28e89aa2175b933d231a5a6601f7) # Conflicts: # erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py --- .../accounts/doctype/sales_invoice/test_sales_invoice.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py index 58db5bc7059..c5090815253 100644 --- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py @@ -4019,6 +4019,7 @@ class TestSalesInvoice(FrappeTestCase): self.assertEqual(len(actual), 4) self.assertEqual(expected, actual) + @change_settings("Accounts Settings", {"enable_common_party_accounting": True}) def test_common_party_with_foreign_currency_jv(self): from erpnext.accounts.doctype.account.test_account import create_account from erpnext.accounts.doctype.opening_invoice_creation_tool.test_opening_invoice_creation_tool import ( @@ -4065,11 +4066,8 @@ class TestSalesInvoice(FrappeTestCase): supp_doc.append("accounts", test_account_details) supp_doc.save() - # enable common party accounting - frappe.db.set_single_value("Accounts Settings", "enable_common_party_accounting", 1) - # create a party link between customer & supplier - party_link = create_party_link("Supplier", supplier, customer) + create_party_link("Supplier", supplier, customer) # create a sales invoice si = create_sales_invoice( @@ -4103,10 +4101,13 @@ class TestSalesInvoice(FrappeTestCase): self.assertTrue(jv) self.assertEqual(jv[0], si.grand_total) +<<<<<<< HEAD party_link.delete() frappe.db.set_single_value("Accounts Settings", "enable_common_party_accounting", 0) >>>>>>> 740a04a704 (test: add unit test for common party with foreign currency) +======= +>>>>>>> ee94fb37c8 (refactor(test): use change_settings decorator) def set_advance_flag(company, flag, default_account): frappe.db.set_value( From 354c34e4d8e423486e71161de2f64e4ae8de3fac Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 9 Sep 2024 10:51:45 +0530 Subject: [PATCH 0067/1614] chore: resolve conflict --- .../sales_invoice/test_sales_invoice.py | 111 ------------------ 1 file changed, 111 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py index c5090815253..beb347e07db 100644 --- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py @@ -3915,110 +3915,6 @@ class TestSalesInvoice(FrappeTestCase): self.assertEqual(len(res), 1) self.assertEqual(res[0][0], pos_return.return_against) -<<<<<<< HEAD -======= - def test_validation_on_opening_invoice_with_rounding(self): - si = create_sales_invoice(qty=1, rate=99.98, do_not_submit=True) - si.is_opening = "Yes" - si.items[0].income_account = "Temporary Opening - _TC" - si.save() - self.assertRaises(frappe.ValidationError, si.submit) - - def _create_opening_roundoff_account(self, company_name): - liability_root = frappe.db.get_all( - "Account", - filters={"company": company_name, "root_type": "Liability", "disabled": 0}, - order_by="lft", - limit=1, - )[0] - - # setup round off account - if acc := frappe.db.exists( - "Account", - { - "account_name": "Round Off for Opening", - "account_type": "Round Off for Opening", - "company": company_name, - }, - ): - frappe.db.set_value("Company", company_name, "round_off_for_opening", acc) - else: - acc = frappe.new_doc("Account") - acc.company = company_name - acc.parent_account = liability_root.name - acc.account_name = "Round Off for Opening" - acc.account_type = "Round Off for Opening" - acc.save() - frappe.db.set_value("Company", company_name, "round_off_for_opening", acc.name) - - def test_opening_invoice_with_rounding_adjustment(self): - si = create_sales_invoice(qty=1, rate=99.98, do_not_submit=True) - si.is_opening = "Yes" - si.items[0].income_account = "Temporary Opening - _TC" - si.save() - - self._create_opening_roundoff_account(si.company) - - si.reload() - si.submit() - res = frappe.db.get_all( - "GL Entry", - filters={"voucher_no": si.name, "is_opening": "Yes"}, - fields=["account", "debit", "credit", "is_opening"], - ) - self.assertEqual(len(res), 3) - - def _create_opening_invoice_with_inclusive_tax(self): - si = create_sales_invoice(qty=1, rate=90, do_not_submit=True) - si.is_opening = "Yes" - si.items[0].income_account = "Temporary Opening - _TC" - item_template = si.items[0].as_dict() - item_template.name = None - item_template.rate = 55 - si.append("items", item_template) - si.append( - "taxes", - { - "charge_type": "On Net Total", - "account_head": "_Test Account Service Tax - _TC", - "cost_center": "_Test Cost Center - _TC", - "description": "Testing...", - "rate": 5, - "included_in_print_rate": True, - }, - ) - # there will be 0.01 precision loss between Dr and Cr - # caused by 'included_in_print_tax' option - si.save() - return si - - def test_rounding_validation_for_opening_with_inclusive_tax(self): - si = self._create_opening_invoice_with_inclusive_tax() - # 'Round Off for Opening' not set in Company master - # Ledger level validation must be thrown - self.assertRaises(frappe.ValidationError, si.submit) - - def test_ledger_entries_on_opening_invoice_with_rounding_loss_by_inclusive_tax(self): - si = self._create_opening_invoice_with_inclusive_tax() - # 'Round Off for Opening' is set in Company master - self._create_opening_roundoff_account(si.company) - - si.submit() - actual = frappe.db.get_all( - "GL Entry", - filters={"voucher_no": si.name, "is_opening": "Yes", "is_cancelled": False}, - fields=["account", "debit", "credit", "is_opening"], - order_by="account,debit", - ) - expected = [ - {"account": "_Test Account Service Tax - _TC", "debit": 0.0, "credit": 6.9, "is_opening": "Yes"}, - {"account": "Debtors - _TC", "debit": 145.0, "credit": 0.0, "is_opening": "Yes"}, - {"account": "Round Off for Opening - _TC", "debit": 0.0, "credit": 0.01, "is_opening": "Yes"}, - {"account": "Temporary Opening - _TC", "debit": 0.0, "credit": 138.09, "is_opening": "Yes"}, - ] - self.assertEqual(len(actual), 4) - self.assertEqual(expected, actual) - @change_settings("Accounts Settings", {"enable_common_party_accounting": True}) def test_common_party_with_foreign_currency_jv(self): from erpnext.accounts.doctype.account.test_account import create_account @@ -4101,13 +3997,6 @@ class TestSalesInvoice(FrappeTestCase): self.assertTrue(jv) self.assertEqual(jv[0], si.grand_total) -<<<<<<< HEAD - party_link.delete() - frappe.db.set_single_value("Accounts Settings", "enable_common_party_accounting", 0) - ->>>>>>> 740a04a704 (test: add unit test for common party with foreign currency) -======= ->>>>>>> ee94fb37c8 (refactor(test): use change_settings decorator) def set_advance_flag(company, flag, default_account): frappe.db.set_value( From ea86bc2235acb0712ae7205cff97c3e14614c3c4 Mon Sep 17 00:00:00 2001 From: rahulgupta8848 <147691594+rahulgupta8848@users.noreply.github.com> Date: Mon, 9 Sep 2024 12:12:00 +0530 Subject: [PATCH 0068/1614] =?UTF-8?q?feat:=20added=20revaluation=20surplus?= =?UTF-8?q?=20and=20impairment=20acc=20in=20standard=20charts=E2=80=A6=20(?= =?UTF-8?q?#43022)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit feat: added revaluation surplus and impairment acc in standard charts of accounts Co-authored-by: “rahulgupta8848” <“rahul.gupta@8848digital.com”> (cherry picked from commit 8202f505cce9c938b43e6f238129f4641cb1d6e8) --- .../verified/in_standard_chart_of_accounts.json | 6 ++++-- .../verified/standard_chart_of_accounts.py | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/in_standard_chart_of_accounts.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/in_standard_chart_of_accounts.json index 2ec0b7f70c8..4d807b09c33 100644 --- a/erpnext/accounts/doctype/account/chart_of_accounts/verified/in_standard_chart_of_accounts.json +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/in_standard_chart_of_accounts.json @@ -109,7 +109,8 @@ "Utility Expenses": {}, "Write Off": {}, "Exchange Gain/Loss": {}, - "Gain/Loss on Asset Disposal": {} + "Gain/Loss on Asset Disposal": {}, + "Impairment": {} }, "root_type": "Expense" }, @@ -132,7 +133,8 @@ "Source of Funds (Liabilities)": { "Capital Account": { "Reserves and Surplus": {}, - "Shareholders Funds": {} + "Shareholders Funds": {}, + "Revaluation Surplus": {} }, "Current Liabilities": { "Accounts Payable": { diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/standard_chart_of_accounts.py b/erpnext/accounts/doctype/account/chart_of_accounts/verified/standard_chart_of_accounts.py index e30ad24a374..5a5e232db8d 100644 --- a/erpnext/accounts/doctype/account/chart_of_accounts/verified/standard_chart_of_accounts.py +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/standard_chart_of_accounts.py @@ -72,6 +72,7 @@ def get(): _("Write Off"): {}, _("Exchange Gain/Loss"): {}, _("Gain/Loss on Asset Disposal"): {}, + _("Impairment"): {}, }, "root_type": "Expense", }, @@ -104,6 +105,7 @@ def get(): _("Dividends Paid"): {"account_type": "Equity"}, _("Opening Balance Equity"): {"account_type": "Equity"}, _("Retained Earnings"): {"account_type": "Equity"}, + _("Revaluation Surplus"): {"account_type": "Equity"}, "root_type": "Equity", }, } From 03e3374a8b0e90a3d84c8a61070510edf1c25b2b Mon Sep 17 00:00:00 2001 From: "Nihantra C. Patel" <141945075+Nihantra-Patel@users.noreply.github.com> Date: Mon, 9 Sep 2024 11:27:59 +0530 Subject: [PATCH 0069/1614] fix: set today in 'On This Date' in Available Batch Report (cherry picked from commit 9fd55e4c83e4c0b715dd746c5032ac51217641d6) --- .../report/available_batch_report/available_batch_report.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/report/available_batch_report/available_batch_report.js b/erpnext/stock/report/available_batch_report/available_batch_report.js index 011f7e09ca2..a13e4ca82f7 100644 --- a/erpnext/stock/report/available_batch_report/available_batch_report.js +++ b/erpnext/stock/report/available_batch_report/available_batch_report.js @@ -17,7 +17,7 @@ frappe.query_reports["Available Batch Report"] = { fieldtype: "Date", width: "80", reqd: 1, - default: frappe.datetime.add_months(frappe.datetime.get_today(), -1), + default: frappe.datetime.get_today(), }, { fieldname: "item_code", From 8f4dc8048d86c2f103b3ded40074be80df0e5870 Mon Sep 17 00:00:00 2001 From: Bhavan23 Date: Sat, 31 Aug 2024 17:28:03 +0530 Subject: [PATCH 0070/1614] fix: validate the item code when updating the other item's price rule (cherry picked from commit 45de18069c5e69970115dbd04381c4cd296948d1) --- erpnext/public/js/controllers/transaction.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 91b938acb50..aa4a2ae85a0 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -1777,7 +1777,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe if (data && data.apply_rule_on_other_items && JSON.parse(data.apply_rule_on_other_items)) { me.frm.doc.items.forEach(d => { - if (in_list(JSON.parse(data.apply_rule_on_other_items), d[data.apply_rule_on])) { + if (in_list(JSON.parse(data.apply_rule_on_other_items), d[data.apply_rule_on]) && d.item_code === data.item_code) { for(var k in data) { if (data.pricing_rule_for == "Discount Percentage" && data.apply_rule_on_other_items && k == "discount_amount") { continue; From 2dddd7906bc0468bd8f8eb7b139e19af334b5f2e Mon Sep 17 00:00:00 2001 From: Prashant Kamble <99401472+pra17shant@users.noreply.github.com> Date: Wed, 4 Sep 2024 11:21:05 +0000 Subject: [PATCH 0071/1614] fix: unreconcile allocation child table redirect url voucher no issue (cherry picked from commit 5d6f6a2fb972e4678fe55f5d3970903501f10a10) --- erpnext/public/js/utils/unreconcile.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/public/js/utils/unreconcile.js b/erpnext/public/js/utils/unreconcile.js index 6864e2865d3..c6ee8a330c7 100644 --- a/erpnext/public/js/utils/unreconcile.js +++ b/erpnext/public/js/utils/unreconcile.js @@ -69,7 +69,7 @@ erpnext.accounts.unreconcile_payment = { { label: __("Voucher Type"), fieldname: "voucher_type", - fieldtype: "Dynamic Link", + fieldtype: "Link", options: "DocType", in_list_view: 1, read_only: 1, @@ -77,7 +77,7 @@ erpnext.accounts.unreconcile_payment = { { label: __("Voucher No"), fieldname: "voucher_no", - fieldtype: "Link", + fieldtype: "Dynamic Link", options: "voucher_type", in_list_view: 1, read_only: 1, From ea4f7365ea8e6dc48af50369c2239b2ba665ab5e Mon Sep 17 00:00:00 2001 From: barredterra <14891507+barredterra@users.noreply.github.com> Date: Sat, 17 Aug 2024 02:27:36 +0200 Subject: [PATCH 0072/1614] fix(Delivery Note): translatability of validation errors (cherry picked from commit 34df6e39dcca685b6b107c5f0631721d7156768c) --- .../doctype/delivery_note/delivery_note.py | 70 ++++++++----------- 1 file changed, 30 insertions(+), 40 deletions(-) diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.py b/erpnext/stock/doctype/delivery_note/delivery_note.py index 847a57baa72..d2d10cd9935 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note.py +++ b/erpnext/stock/doctype/delivery_note/delivery_note.py @@ -362,52 +362,42 @@ class DeliveryNote(SellingController): self.validate_sales_invoice_references() def validate_sales_order_references(self): - err_msg = "" + errors = [] for item in self.items: - if (item.against_sales_order and not item.so_detail) or ( - not item.against_sales_order and item.so_detail - ): - if not item.against_sales_order: - err_msg += ( - _("'Sales Order' reference ({1}) is missing in row {0}").format( - frappe.bold(item.idx), frappe.bold("against_sales_order") - ) - + "
" - ) - else: - err_msg += ( - _("'Sales Order Item' reference ({1}) is missing in row {0}").format( - frappe.bold(item.idx), frappe.bold("so_detail") - ) - + "
" - ) + missing_label = None + if item.against_sales_order and not item.so_detail: + missing_label = item.meta.get_label("so_detail") + elif item.so_detail and not item.against_sales_order: + missing_label = item.meta.get_label("against_sales_order") - if err_msg: - frappe.throw(err_msg, title=_("References to Sales Orders are Incomplete")) + if missing_label and missing_label != "No Label": + errors.append( + _("The field {0} in row {1} is not set").format( + frappe.bold(_(missing_label)), frappe.bold(item.idx) + ) + ) + + if errors: + frappe.throw("
".join(errors), title=_("References to Sales Orders are Incomplete")) def validate_sales_invoice_references(self): - err_msg = "" + errors = [] for item in self.items: - if (item.against_sales_invoice and not item.si_detail) or ( - not item.against_sales_invoice and item.si_detail - ): - if not item.against_sales_invoice: - err_msg += ( - _("'Sales Invoice' reference ({1}) is missing in row {0}").format( - frappe.bold(item.idx), frappe.bold("against_sales_invoice") - ) - + "
" - ) - else: - err_msg += ( - _("'Sales Invoice Item' reference ({1}) is missing in row {0}").format( - frappe.bold(item.idx), frappe.bold("si_detail") - ) - + "
" - ) + missing_label = None + if item.against_sales_invoice and not item.si_detail: + missing_label = item.meta.get_label("si_detail") + elif item.si_detail and not item.against_sales_invoice: + missing_label = item.meta.get_label("against_sales_invoice") - if err_msg: - frappe.throw(err_msg, title=_("References to Sales Invoices are Incomplete")) + if missing_label and missing_label != "No Label": + errors.append( + _("The field {0} in row {1} is not set").format( + frappe.bold(_(missing_label)), frappe.bold(item.idx) + ) + ) + + if errors: + frappe.throw("
".join(errors), title=_("References to Sales Invoices are Incomplete")) def validate_proj_cust(self): """check for does customer belong to same project as entered..""" From 0c0f103b836344cc6dbebfbc0fb1d8253a9cffc7 Mon Sep 17 00:00:00 2001 From: barredterra <14891507+barredterra@users.noreply.github.com> Date: Sat, 17 Aug 2024 02:36:16 +0200 Subject: [PATCH 0073/1614] refactor: extract common validation method (cherry picked from commit 08646b7ab7605aa76b1defe691c97070dc54c317) --- .../doctype/delivery_note/delivery_note.py | 35 +++++++------------ 1 file changed, 13 insertions(+), 22 deletions(-) diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.py b/erpnext/stock/doctype/delivery_note/delivery_note.py index d2d10cd9935..5d95e7b66d3 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note.py +++ b/erpnext/stock/doctype/delivery_note/delivery_note.py @@ -362,32 +362,23 @@ class DeliveryNote(SellingController): self.validate_sales_invoice_references() def validate_sales_order_references(self): - errors = [] - for item in self.items: - missing_label = None - if item.against_sales_order and not item.so_detail: - missing_label = item.meta.get_label("so_detail") - elif item.so_detail and not item.against_sales_order: - missing_label = item.meta.get_label("against_sales_order") - - if missing_label and missing_label != "No Label": - errors.append( - _("The field {0} in row {1} is not set").format( - frappe.bold(_(missing_label)), frappe.bold(item.idx) - ) - ) - - if errors: - frappe.throw("
".join(errors), title=_("References to Sales Orders are Incomplete")) + self._validate_dependent_item_fields( + "against_sales_order", "so_detail", _("References to Sales Orders are Incomplete") + ) def validate_sales_invoice_references(self): + self._validate_dependent_item_fields( + "against_sales_invoice", "si_detail", _("References to Sales Invoices are Incomplete") + ) + + def _validate_dependent_item_fields(self, field_a: str, field_b: str, error_title: str): errors = [] for item in self.items: missing_label = None - if item.against_sales_invoice and not item.si_detail: - missing_label = item.meta.get_label("si_detail") - elif item.si_detail and not item.against_sales_invoice: - missing_label = item.meta.get_label("against_sales_invoice") + if item.get(field_a) and not item.get(field_b): + missing_label = item.meta.get_label(field_b) + elif item.get(field_b) and not item.get(field_a): + missing_label = item.meta.get_label(field_a) if missing_label and missing_label != "No Label": errors.append( @@ -397,7 +388,7 @@ class DeliveryNote(SellingController): ) if errors: - frappe.throw("
".join(errors), title=_("References to Sales Invoices are Incomplete")) + frappe.throw("
".join(errors), title=error_title) def validate_proj_cust(self): """check for does customer belong to same project as entered..""" From 3fd9df0d2e6efeef83384e480a0e81dc8e4966c7 Mon Sep 17 00:00:00 2001 From: barredterra <14891507+barredterra@users.noreply.github.com> Date: Wed, 4 Sep 2024 18:05:02 +0200 Subject: [PATCH 0074/1614] fix(Opening Invoice Creation Tool): translatability of messages (cherry picked from commit f3c5803198174f46caf607d1e36f8cb367f72fc0) --- .../opening_invoice_creation_tool.js | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.js b/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.js index f1efba8a954..4938e6690e5 100644 --- a/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.js +++ b/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.js @@ -28,7 +28,12 @@ frappe.ui.form.on("Opening Invoice Creation Tool", { frm.refresh_fields(); frm.page.clear_indicator(); frm.dashboard.hide_progress(); - frappe.msgprint(__("Opening {0} Invoices created", [frm.doc.invoice_type])); + + if (frm.doc.invoice_type == "Sales") { + frappe.msgprint(__("Opening Sales Invoices have been created.")); + } else { + frappe.msgprint(__("Opening Purchase Invoices have been created.")); + } }, 1500, data.title @@ -48,12 +53,19 @@ frappe.ui.form.on("Opening Invoice Creation Tool", { !frm.doc.import_in_progress && frm.trigger("make_dashboard"); frm.page.set_primary_action(__("Create Invoices"), () => { let btn_primary = frm.page.btn_primary.get(0); + let freeze_message; + if (frm.doc.invoice_type == "Sales") { + freeze_message = __("Creating Sales Invoices ..."); + } else { + freeze_message = __("Creating Purchase Invoices ..."); + } + return frm.call({ doc: frm.doc, btn: $(btn_primary), method: "make_invoices", freeze: 1, - freeze_message: __("Creating {0} Invoice", [frm.doc.invoice_type]), + freeze_message: freeze_message, }); }); From 5110975c6dc13aa894a60caace1fc4ba33d178cf Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 9 Sep 2024 20:34:56 +0530 Subject: [PATCH 0075/1614] fix: incorrect actual cost in Procurement Tracker report (backport #43109) (#43138) fix: incorrect actual cost in Procurement Tracker report (#43109) (cherry picked from commit 80f101f92e2bd85927450b6adb073c575a327f42) Co-authored-by: rohitwaghchaure --- .../buying/report/procurement_tracker/procurement_tracker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/buying/report/procurement_tracker/procurement_tracker.py b/erpnext/buying/report/procurement_tracker/procurement_tracker.py index a7e03c08fac..bd0798236b3 100644 --- a/erpnext/buying/report/procurement_tracker/procurement_tracker.py +++ b/erpnext/buying/report/procurement_tracker/procurement_tracker.py @@ -175,7 +175,7 @@ def get_data(filters): "purchase_order": po.parent, "supplier": po.supplier, "estimated_cost": flt(mr_record.get("amount")), - "actual_cost": flt(pi_records.get(po.name)), + "actual_cost": flt(pi_records.get(po.name)) or flt(po.amount), "purchase_order_amt": flt(po.amount), "purchase_order_amt_in_company_currency": flt(po.base_amount), "expected_delivery_date": po.schedule_date, From 208bd2b8ff4d55dc9061f90f9b48027bf247a68e Mon Sep 17 00:00:00 2001 From: Khushi Rawat <142375893+khushi8112@users.noreply.github.com> Date: Sat, 7 Sep 2024 01:33:12 +0530 Subject: [PATCH 0076/1614] fix: unhide action button after form redirect (cherry picked from commit 5ce5b1b6a2a64cc5a8a19a478f95781886bfff72) --- erpnext/assets/doctype/asset/asset.js | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/assets/doctype/asset/asset.js b/erpnext/assets/doctype/asset/asset.js index 2477e443c4a..302fe816882 100644 --- a/erpnext/assets/doctype/asset/asset.js +++ b/erpnext/assets/doctype/asset/asset.js @@ -528,6 +528,7 @@ frappe.ui.form.on("Asset", { callback: function (r) { var doclist = frappe.model.sync(r.message); frappe.set_route("Form", doclist[0].doctype, doclist[0].name); + $(".primary-action").prop("hidden", false); }, }); }, From 9e72a844f702d0e3e032765777ec1780d8a6b6ed Mon Sep 17 00:00:00 2001 From: Khushi Rawat <142375893+khushi8112@users.noreply.github.com> Date: Sun, 8 Sep 2024 23:23:54 +0530 Subject: [PATCH 0077/1614] fix: pass company from asset to asset capitalization (cherry picked from commit f3445d645def648fdcd285125520dab13315beef) --- erpnext/assets/doctype/asset/asset.js | 2 ++ erpnext/assets/doctype/asset/asset.py | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/erpnext/assets/doctype/asset/asset.js b/erpnext/assets/doctype/asset/asset.js index 302fe816882..0a21516c177 100644 --- a/erpnext/assets/doctype/asset/asset.js +++ b/erpnext/assets/doctype/asset/asset.js @@ -506,6 +506,7 @@ frappe.ui.form.on("Asset", { create_asset_repair: function (frm) { frappe.call({ args: { + company: frm.doc.company, asset: frm.doc.name, asset_name: frm.doc.asset_name, }, @@ -520,6 +521,7 @@ frappe.ui.form.on("Asset", { create_asset_capitalization: function (frm) { frappe.call({ args: { + company: frm.doc.company, asset: frm.doc.name, asset_name: frm.doc.asset_name, item_code: frm.doc.item_code, diff --git a/erpnext/assets/doctype/asset/asset.py b/erpnext/assets/doctype/asset/asset.py index abb615ff277..58f813247f0 100644 --- a/erpnext/assets/doctype/asset/asset.py +++ b/erpnext/assets/doctype/asset/asset.py @@ -895,18 +895,19 @@ def create_asset_maintenance(asset, item_code, item_name, asset_category, compan @frappe.whitelist() -def create_asset_repair(asset, asset_name): +def create_asset_repair(company, asset, asset_name): asset_repair = frappe.new_doc("Asset Repair") - asset_repair.update({"asset": asset, "asset_name": asset_name}) + asset_repair.update({"company": company, "asset": asset, "asset_name": asset_name}) return asset_repair @frappe.whitelist() -def create_asset_capitalization(asset, asset_name, item_code): +def create_asset_capitalization(company, asset, asset_name, item_code): asset_capitalization = frappe.new_doc("Asset Capitalization") asset_capitalization.update( { "target_asset": asset, + "company": company, "capitalization_method": "Choose a WIP composite asset", "target_asset_name": asset_name, "target_item_code": item_code, From d2923bae8582f2c2bc7b126ff6a41746f2f61262 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 9 Sep 2024 19:26:38 +0200 Subject: [PATCH 0078/1614] fix: return type of `get_party_details` (backport #43131) (#43134) Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com> fix: return type of `get_party_details` (#43131) --- erpnext/accounts/party.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/party.py b/erpnext/accounts/party.py index e6015e081d6..06e285e4ada 100644 --- a/erpnext/accounts/party.py +++ b/erpnext/accounts/party.py @@ -68,7 +68,7 @@ def get_party_details( pos_profile=None, ): if not party: - return {} + return frappe._dict() if not frappe.db.exists(party_type, party): frappe.throw(_("{0}: {1} does not exists").format(party_type, party)) return _get_party_details( From 5929d50c72085a4a875b802b26f9364548342e49 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 9 Sep 2024 12:31:32 +0530 Subject: [PATCH 0079/1614] feat: utility report to identify invalid ledger entries (cherry picked from commit 832c4aaf82e6556a83429a3757efb3449b53de2a) --- .../report/invalid_ledger_entries/__init__.py | 0 .../invalid_ledger_entries.js | 13 +++++ .../invalid_ledger_entries.json | 23 +++++++++ .../invalid_ledger_entries.py | 48 +++++++++++++++++++ 4 files changed, 84 insertions(+) create mode 100644 erpnext/accounts/report/invalid_ledger_entries/__init__.py create mode 100644 erpnext/accounts/report/invalid_ledger_entries/invalid_ledger_entries.js create mode 100644 erpnext/accounts/report/invalid_ledger_entries/invalid_ledger_entries.json create mode 100644 erpnext/accounts/report/invalid_ledger_entries/invalid_ledger_entries.py diff --git a/erpnext/accounts/report/invalid_ledger_entries/__init__.py b/erpnext/accounts/report/invalid_ledger_entries/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/erpnext/accounts/report/invalid_ledger_entries/invalid_ledger_entries.js b/erpnext/accounts/report/invalid_ledger_entries/invalid_ledger_entries.js new file mode 100644 index 00000000000..548a6f7d951 --- /dev/null +++ b/erpnext/accounts/report/invalid_ledger_entries/invalid_ledger_entries.js @@ -0,0 +1,13 @@ +// Copyright (c) 2024, Frappe Technologies Pvt. Ltd. and contributors +// For license information, please see license.txt + +frappe.query_reports["Invalid Ledger Entries"] = { + filters: [ + // { + // "fieldname": "my_filter", + // "label": __("My Filter"), + // "fieldtype": "Data", + // "reqd": 1, + // }, + ], +}; diff --git a/erpnext/accounts/report/invalid_ledger_entries/invalid_ledger_entries.json b/erpnext/accounts/report/invalid_ledger_entries/invalid_ledger_entries.json new file mode 100644 index 00000000000..00dbbfc5056 --- /dev/null +++ b/erpnext/accounts/report/invalid_ledger_entries/invalid_ledger_entries.json @@ -0,0 +1,23 @@ +{ + "add_total_row": 0, + "columns": [], + "creation": "2024-09-09 12:31:25.295976", + "disabled": 0, + "docstatus": 0, + "doctype": "Report", + "filters": [], + "idx": 0, + "is_standard": "Yes", + "letterhead": null, + "modified": "2024-09-09 12:31:25.295976", + "modified_by": "Administrator", + "module": "Accounts", + "name": "Invalid Ledger Entries", + "owner": "Administrator", + "prepared_report": 0, + "ref_doctype": "GL Entry", + "report_name": "Invalid Ledger Entries", + "report_type": "Script Report", + "roles": [], + "timeout": 0 +} \ No newline at end of file diff --git a/erpnext/accounts/report/invalid_ledger_entries/invalid_ledger_entries.py b/erpnext/accounts/report/invalid_ledger_entries/invalid_ledger_entries.py new file mode 100644 index 00000000000..4f4b1835227 --- /dev/null +++ b/erpnext/accounts/report/invalid_ledger_entries/invalid_ledger_entries.py @@ -0,0 +1,48 @@ +# Copyright (c) 2024, Frappe Technologies Pvt. Ltd. and contributors +# For license information, please see license.txt + +# import frappe +from frappe import _ + + +def execute(filters: dict | None = None): + """Return columns and data for the report. + + This is the main entry point for the report. It accepts the filters as a + dictionary and should return columns and data. It is called by the framework + every time the report is refreshed or a filter is updated. + """ + columns = get_columns() + data = get_data() + + return columns, data + + +def get_columns() -> list[dict]: + """Return columns for the report. + + One field definition per column, just like a DocType field definition. + """ + return [ + { + "label": _("Column 1"), + "fieldname": "column_1", + "fieldtype": "Data", + }, + { + "label": _("Column 2"), + "fieldname": "column_2", + "fieldtype": "Int", + }, + ] + + +def get_data() -> list[list]: + """Return data for the report. + + The report data is a list of rows, with each row being a list of cell values. + """ + return [ + ["Row 1", 1], + ["Row 2", 2], + ] From 14e30d12b4d556ec6be3ea8cf70fbbd6afac8192 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 9 Sep 2024 13:55:10 +0530 Subject: [PATCH 0080/1614] refactor: standard filters (cherry picked from commit dccbc1f432a83f07ef46582ac36df8fd776d4a4d) --- .../invalid_ledger_entries.js | 55 ++++++++++++++++--- 1 file changed, 47 insertions(+), 8 deletions(-) diff --git a/erpnext/accounts/report/invalid_ledger_entries/invalid_ledger_entries.js b/erpnext/accounts/report/invalid_ledger_entries/invalid_ledger_entries.js index 548a6f7d951..ffaaf5d7cbf 100644 --- a/erpnext/accounts/report/invalid_ledger_entries/invalid_ledger_entries.js +++ b/erpnext/accounts/report/invalid_ledger_entries/invalid_ledger_entries.js @@ -1,13 +1,52 @@ // Copyright (c) 2024, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt +function get_filters() { + let filters = [ + { + fieldname: "company", + label: __("Company"), + fieldtype: "Link", + options: "Company", + default: frappe.defaults.get_user_default("Company"), + reqd: 1, + }, + { + fieldname: "from_date", + label: __("Start Date"), + fieldtype: "Date", + reqd: 1, + default: frappe.datetime.add_months(frappe.datetime.get_today(), -1), + }, + { + fieldname: "to_date", + label: __("End Date"), + fieldtype: "Date", + reqd: 1, + default: frappe.datetime.get_today(), + }, + { + fieldname: "account", + label: __("Account"), + fieldtype: "MultiSelectList", + options: "Account", + get_data: function (txt) { + return frappe.db.get_link_options("Account", txt, { + company: frappe.query_report.get_filter_value("company"), + account_type: ["in", ["Receivable", "Payable"]], + }); + }, + }, + { + fieldname: "voucher_no", + label: __("Voucher No"), + fieldtype: "Data", + width: 100, + }, + ]; + return filters; +} + frappe.query_reports["Invalid Ledger Entries"] = { - filters: [ - // { - // "fieldname": "my_filter", - // "label": __("My Filter"), - // "fieldtype": "Data", - // "reqd": 1, - // }, - ], + filters: get_filters(), }; From 710d30074d6d65e18b70cae80d197d81b54242be Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 9 Sep 2024 17:53:59 +0530 Subject: [PATCH 0081/1614] refactor: barebones methods with basic logic (cherry picked from commit b05b378ef0fcd4c08404fd541857921702751676) --- .../invalid_ledger_entries.py | 121 +++++++++++++++--- 1 file changed, 105 insertions(+), 16 deletions(-) diff --git a/erpnext/accounts/report/invalid_ledger_entries/invalid_ledger_entries.py b/erpnext/accounts/report/invalid_ledger_entries/invalid_ledger_entries.py index 4f4b1835227..e1599a6758e 100644 --- a/erpnext/accounts/report/invalid_ledger_entries/invalid_ledger_entries.py +++ b/erpnext/accounts/report/invalid_ledger_entries/invalid_ledger_entries.py @@ -1,8 +1,10 @@ # Copyright (c) 2024, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -# import frappe -from frappe import _ +import frappe +from frappe import _, qb +from frappe.query_builder import Criterion +from frappe.query_builder.custom import ConstantColumn def execute(filters: dict | None = None): @@ -12,8 +14,10 @@ def execute(filters: dict | None = None): dictionary and should return columns and data. It is called by the framework every time the report is refreshed or a filter is updated. """ + validate_filters(filters) + columns = get_columns() - data = get_data() + data = get_data(filters) return columns, data @@ -24,25 +28,110 @@ def get_columns() -> list[dict]: One field definition per column, just like a DocType field definition. """ return [ + {"label": _("Voucher Type"), "fieldname": "voucher_type", "fieldtype": "Link", "options": "DocType"}, { - "label": _("Column 1"), - "fieldname": "column_1", - "fieldtype": "Data", - }, - { - "label": _("Column 2"), - "fieldname": "column_2", - "fieldtype": "Int", + "label": _("Voucher No"), + "fieldname": "voucher_no", + "fieldtype": "Dynamic Link", + "options": "voucher_type", }, ] -def get_data() -> list[list]: +def get_data(filters) -> list[list]: """Return data for the report. The report data is a list of rows, with each row being a list of cell values. """ - return [ - ["Row 1", 1], - ["Row 2", 2], - ] + active_vouchers = get_active_vouchers_for_period(filters) + invalid_vouchers = identify_cancelled_vouchers(active_vouchers) + + return invalid_vouchers + + +def identify_cancelled_vouchers(active_vouchers: list[dict] | list | None = None) -> list[dict]: + cancelled_vouchers = [] + if active_vouchers: + # Group by voucher types and use single query to identify cancelled vouchers + vtypes = set([x.voucher_type for x in active_vouchers]) + + for _t in vtypes: + _names = [x.voucher_no for x in active_vouchers if x.voucher_type == _t] + dt = qb.DocType(_t) + non_active_vouchers = ( + qb.from_(dt) + .select(ConstantColumn(_t).as_("doctype"), dt.name) + .where(dt.docstatus.ne(1) & dt.name.isin(_names)) + .run() + ) + if non_active_vouchers: + cancelled_vouchers.extend(non_active_vouchers) + return cancelled_vouchers + + +def validate_filters(filters: dict | None = None): + if not filters: + frappe.throw(_("Filters missing")) + + if not filters.company: + frappe.throw(_("Company is mandatory")) + + if filters.from_date > filters.to_date: + frappe.throw(_("Start Date should be lower than End Date")) + + +def build_query_filters(filters: dict | None = None) -> list: + qb_filters = [] + if filters: + if filters.account: + qb_filters.append(qb.Field("account").isin(filters.account)) + + if filters.voucher_no: + qb_filters.append(qb.Field("voucher_no").eq(filters.voucher_no)) + + return qb_filters + + +def get_active_vouchers_for_period(filters: dict | None = None) -> list[dict]: + uniq_vouchers = [] + + if filters: + gle = qb.DocType("GL Entry") + ple = qb.DocType("Payment Ledger Entry") + + qb_filters = build_query_filters(filters) + + gl_vouchers = ( + qb.from_(gle) + .select(gle.voucher_type) + .distinct() + .select(gle.voucher_no) + .distinct() + .where( + gle.is_cancelled.eq(0) + & gle.company.eq(filters.company) + & gle.posting_date[filters.from_date : filters.to_date] + ) + .where(Criterion.all(qb_filters)) + .run(as_dict=True) + ) + + pl_vouchers = ( + qb.from_(ple) + .select(ple.voucher_type) + .distinct() + .select(ple.voucher_no) + .distinct() + .where( + ple.delinked.eq(0) + & ple.company.eq(filters.company) + & ple.posting_date[filters.from_date : filters.to_date] + ) + .where(Criterion.all(qb_filters)) + .run(as_dict=True) + ) + + uniq_vouchers.extend(gl_vouchers) + uniq_vouchers.extend(pl_vouchers) + + return uniq_vouchers From 5413372aebdab062c0433b3658ad92b7ba6df55e Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 10 Sep 2024 12:58:05 +0530 Subject: [PATCH 0082/1614] refactor: fetch as dictionary (cherry picked from commit 2126b10a92c38aa12a35bc78b577fc2212d5da6a) --- .../report/invalid_ledger_entries/invalid_ledger_entries.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/report/invalid_ledger_entries/invalid_ledger_entries.py b/erpnext/accounts/report/invalid_ledger_entries/invalid_ledger_entries.py index e1599a6758e..33fda705cf2 100644 --- a/erpnext/accounts/report/invalid_ledger_entries/invalid_ledger_entries.py +++ b/erpnext/accounts/report/invalid_ledger_entries/invalid_ledger_entries.py @@ -60,9 +60,9 @@ def identify_cancelled_vouchers(active_vouchers: list[dict] | list | None = None dt = qb.DocType(_t) non_active_vouchers = ( qb.from_(dt) - .select(ConstantColumn(_t).as_("doctype"), dt.name) + .select(ConstantColumn(_t).as_("voucher_type"), dt.name.as_("voucher_no")) .where(dt.docstatus.ne(1) & dt.name.isin(_names)) - .run() + .run(as_dict=True) ) if non_active_vouchers: cancelled_vouchers.extend(non_active_vouchers) From 9f09bf14cb4d2a0ab3a8de58e3cd0985f4b5ce73 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 10 Sep 2024 13:03:49 +0530 Subject: [PATCH 0083/1614] refactor: allow all accounts (cherry picked from commit 43198c946b498ab76ebbcd39de3d5cc031d897db) --- .../report/invalid_ledger_entries/invalid_ledger_entries.js | 1 - 1 file changed, 1 deletion(-) diff --git a/erpnext/accounts/report/invalid_ledger_entries/invalid_ledger_entries.js b/erpnext/accounts/report/invalid_ledger_entries/invalid_ledger_entries.js index ffaaf5d7cbf..47d478f2865 100644 --- a/erpnext/accounts/report/invalid_ledger_entries/invalid_ledger_entries.js +++ b/erpnext/accounts/report/invalid_ledger_entries/invalid_ledger_entries.js @@ -33,7 +33,6 @@ function get_filters() { get_data: function (txt) { return frappe.db.get_link_options("Account", txt, { company: frappe.query_report.get_filter_value("company"), - account_type: ["in", ["Receivable", "Payable"]], }); }, }, From a23e8b13bebf83e05363c9074c84e36f835e6d04 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 10 Sep 2024 14:29:13 +0530 Subject: [PATCH 0084/1614] fix: permission on guest PR creation (cherry picked from commit ea02e5f15ab58ad2f346e8f698ab5c63da5c5f1b) --- erpnext/accounts/doctype/payment_request/payment_request.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/erpnext/accounts/doctype/payment_request/payment_request.py b/erpnext/accounts/doctype/payment_request/payment_request.py index f368c2a9613..83b43a15987 100644 --- a/erpnext/accounts/doctype/payment_request/payment_request.py +++ b/erpnext/accounts/doctype/payment_request/payment_request.py @@ -516,6 +516,8 @@ def make_payment_request(**args): if frappe.db.get_single_value("Accounts Settings", "create_pr_in_draft_status", cache=True): pr.insert(ignore_permissions=True) if args.submit_doc: + if pr.get("__unsaved"): + pr.insert(ignore_permissions=True) pr.submit() if args.order_type == "Shopping Cart": From cd57e009dd3023e419e7d9114ac32e5408b48881 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 10 Sep 2024 17:01:53 +0530 Subject: [PATCH 0085/1614] fix: concurrency issue while picking materials (backport #43087) (#43152) fix: concurrency issue while picking materials (#43087) (cherry picked from commit 5c7dff0e846b3f28cd66a79ebec2d5cc18d68470) Co-authored-by: rohitwaghchaure --- erpnext/stock/doctype/pick_list/pick_list.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/erpnext/stock/doctype/pick_list/pick_list.py b/erpnext/stock/doctype/pick_list/pick_list.py index 0c93fd6c402..27a37ef1bab 100644 --- a/erpnext/stock/doctype/pick_list/pick_list.py +++ b/erpnext/stock/doctype/pick_list/pick_list.py @@ -650,6 +650,8 @@ class PickList(Document): if self.name: query = query.where(pi_item.parent != self.name) + query = query.for_update() + return query.run(as_dict=True) def _get_product_bundles(self) -> dict[str, str]: From c9f49caeccb7b04cc20f43768b72a8238122c893 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 10 Sep 2024 23:06:38 +0530 Subject: [PATCH 0086/1614] perf: timeout error (backport #43154) (#43158) perf: timeout error (#43154) (cherry picked from commit 1bf60248d9db816bb528e9500572a15c242f2025) Co-authored-by: rohitwaghchaure --- erpnext/public/js/controllers/transaction.js | 4 +++ .../serial_and_batch_bundle.py | 30 +++++++++++++++---- 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index aa4a2ae85a0..3dcd36b2cff 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -1879,6 +1879,10 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe const fields = ["discount_percentage", "discount_amount", "margin_rate_or_amount", "rate_with_margin"]; + if (!item) { + return; + } + if(item.remove_free_item) { let items = []; 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 ef4d475dca4..956eb08d9ff 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 @@ -1558,13 +1558,14 @@ def get_serial_nos_based_on_posting_date(kwargs, ignore_serial_nos): serial_nos = set() data = get_stock_ledgers_for_serial_nos(kwargs) + bundle_wise_serial_nos = get_bundle_wise_serial_nos(data) for d in data: if d.serial_and_batch_bundle: - sns = get_serial_nos_from_bundle(d.serial_and_batch_bundle, kwargs.get("serial_nos", [])) - if d.actual_qty > 0: - serial_nos.update(sns) - else: - serial_nos.difference_update(sns) + if sns := bundle_wise_serial_nos.get(d.serial_and_batch_bundle): + if d.actual_qty > 0: + serial_nos.update(sns) + else: + serial_nos.difference_update(sns) elif d.serial_no: sns = get_serial_nos(d.serial_no) @@ -1581,6 +1582,25 @@ def get_serial_nos_based_on_posting_date(kwargs, ignore_serial_nos): return serial_nos +def get_bundle_wise_serial_nos(data): + bundle_wise_serial_nos = defaultdict(list) + bundles = [d.serial_and_batch_bundle for d in data if d.serial_and_batch_bundle] + if not bundles: + return bundle_wise_serial_nos + + bundle_data = frappe.get_all( + "Serial and Batch Entry", + fields=["serial_no", "parent"], + filters={"parent": ("in", bundles), "docstatus": 1, "serial_no": ("is", "set")}, + ) + + for d in bundle_data: + if d.parent: + bundle_wise_serial_nos[d.parent].append(d.serial_no) + + return bundle_wise_serial_nos + + def get_reserved_serial_nos(kwargs) -> list: """Returns a list of `Serial No` reserved in POS Invoice and Stock Reservation Entry.""" From 8c8dc241e50ba72775c7651b0c19636d3f5a2182 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 10 Sep 2024 23:07:07 +0530 Subject: [PATCH 0087/1614] fix: bom cost update is not working (backport #43155) (#43157) fix: bom cost update is not working (#43155) (cherry picked from commit 05f9015c0bf341f25c340a69cfd95cebd7777115) Co-authored-by: rohitwaghchaure --- .../doctype/bom_update_log/bom_update_log.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/erpnext/manufacturing/doctype/bom_update_log/bom_update_log.py b/erpnext/manufacturing/doctype/bom_update_log/bom_update_log.py index 12d52ea51fd..34a3900015d 100644 --- a/erpnext/manufacturing/doctype/bom_update_log/bom_update_log.py +++ b/erpnext/manufacturing/doctype/bom_update_log/bom_update_log.py @@ -8,7 +8,7 @@ from frappe import _ from frappe.model.document import Document from frappe.query_builder import DocType, Interval from frappe.query_builder.functions import Now -from frappe.utils import cint, cstr +from frappe.utils import cint, cstr, date_diff, today from erpnext.manufacturing.doctype.bom_update_log.bom_updation_utils import ( get_leaf_boms, @@ -88,10 +88,12 @@ class BOMUpdateLog(Document): wip_log = frappe.get_all( "BOM Update Log", - {"update_type": "Update Cost", "status": ["in", ["Queued", "In Progress"]]}, + fields=["name", "modified"], + filters={"update_type": "Update Cost", "status": ["in", ["Queued", "In Progress"]]}, limit_page_length=1, ) - if wip_log: + + if wip_log and date_diff(today(), wip_log[0].modified) < 1: log_link = frappe.utils.get_link_to_form("BOM Update Log", wip_log[0].name) frappe.throw( _("BOM Updation already in progress. Please wait until {0} is complete.").format(log_link), From d9d86dae35f3b07a54c5fc2916fcd4d32daac990 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Wed, 11 Sep 2024 05:11:52 +0000 Subject: [PATCH 0088/1614] chore(release): Bumped to Version 15.35.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # [15.35.0](https://github.com/frappe/erpnext/compare/v15.34.2...v15.35.0) (2024-09-11) ### Bug Fixes * `default_advance_account` field in Process Payment Reconciliation ([75cb298](https://github.com/frappe/erpnext/commit/75cb29890d5f275dc172c4528fb1ecf41e02d8ea)) * bom cost update is not working (backport [#43155](https://github.com/frappe/erpnext/issues/43155)) ([#43157](https://github.com/frappe/erpnext/issues/43157)) ([8c8dc24](https://github.com/frappe/erpnext/commit/8c8dc241e50ba72775c7651b0c19636d3f5a2182)) * cancel common party advance jv while canceling the invoice ([9bd3d7a](https://github.com/frappe/erpnext/commit/9bd3d7a020ad8ce4e90da1ffdfddfc71510aab74)) * Cannot read properties of null (reading 'doc') (backport [#43071](https://github.com/frappe/erpnext/issues/43071)) ([#43118](https://github.com/frappe/erpnext/issues/43118)) ([80b5c16](https://github.com/frappe/erpnext/commit/80b5c16a2e3183553c5ad95c0a70ecf94310aa12)) * check multi-currency on jv for common party accounting with foreign currency ([d17badd](https://github.com/frappe/erpnext/commit/d17baddb0d3c13212f8695967ffb971b55306224)) * concurrency issue while picking materials (backport [#43087](https://github.com/frappe/erpnext/issues/43087)) ([#43152](https://github.com/frappe/erpnext/issues/43152)) ([cd57e00](https://github.com/frappe/erpnext/commit/cd57e009dd3023e419e7d9114ac32e5408b48881)) * **Delivery Note:** translatability of validation errors ([ea4f736](https://github.com/frappe/erpnext/commit/ea4f7365ea8e6dc48af50369c2239b2ba665ab5e)) * ensure `SellingController.onload` gets called for SO & DN ([2c1f72e](https://github.com/frappe/erpnext/commit/2c1f72e44cac422f5f2ab94b7b2934a5b0979c83)) * incorrect actual cost in Procurement Tracker report (backport [#43109](https://github.com/frappe/erpnext/issues/43109)) ([#43138](https://github.com/frappe/erpnext/issues/43138)) ([5110975](https://github.com/frappe/erpnext/commit/5110975c6dc13aa894a60caace1fc4ba33d178cf)) * incorrect qty after transaction in SLE (backport [#43103](https://github.com/frappe/erpnext/issues/43103)) ([#43105](https://github.com/frappe/erpnext/issues/43105)) ([8447bf3](https://github.com/frappe/erpnext/commit/8447bf34f07c230f3084a2fe66e0295db10a566f)) * **minor:** reorder expected value validation ([6fde07d](https://github.com/frappe/erpnext/commit/6fde07da0e5a477f375429ace53067f1ab8eb0c8)) * multiple fixes related to remarks for GL Report ([#42753](https://github.com/frappe/erpnext/issues/42753)) ([f45b1db](https://github.com/frappe/erpnext/commit/f45b1db1a402d57b7a6312d39f6ca975098a6ae5)) * **Opening Invoice Creation Tool:** translatability of messages ([3fd9df0](https://github.com/frappe/erpnext/commit/3fd9df0d2e6efeef83384e480a0e81dc8e4966c7)) * pass company from asset to asset capitalization ([9e72a84](https://github.com/frappe/erpnext/commit/9e72a844f702d0e3e032765777ec1780d8a6b6ed)) * permission on guest PR creation ([a23e8b1](https://github.com/frappe/erpnext/commit/a23e8b13bebf83e05363c9074c84e36f835e6d04)) * return type of `get_party_details` (backport [#43131](https://github.com/frappe/erpnext/issues/43131)) ([#43134](https://github.com/frappe/erpnext/issues/43134)) ([d2923ba](https://github.com/frappe/erpnext/commit/d2923bae8582f2c2bc7b126ff6a41746f2f61262)) * set today in 'On This Date' in Available Batch Report ([03e3374](https://github.com/frappe/erpnext/commit/03e3374a8b0e90a3d84c8a61070510edf1c25b2b)) * uncomment internal parties ([33174b1](https://github.com/frappe/erpnext/commit/33174b1ba26e7002d3e3286816182dba2223954e)) * unhide action button after form redirect ([208bd2b](https://github.com/frappe/erpnext/commit/208bd2b8ff4d55dc9061f90f9b48027bf247a68e)) * unreconcile allocation child table redirect url voucher no issue ([2dddd79](https://github.com/frappe/erpnext/commit/2dddd7906bc0468bd8f8eb7b139e19af334b5f2e)) * validate the item code when updating the other item's price rule ([8f4dc80](https://github.com/frappe/erpnext/commit/8f4dc8048d86c2f103b3ded40074be80df0e5870)) ### Features * added revaluation surplus and impairment acc in standard charts… ([#43022](https://github.com/frappe/erpnext/issues/43022)) ([ea86bc2](https://github.com/frappe/erpnext/commit/ea86bc2235acb0712ae7205cff97c3e14614c3c4)) * utility report to identify invalid ledger entries ([5929d50](https://github.com/frappe/erpnext/commit/5929d50c72085a4a875b802b26f9364548342e49)) ### Performance Improvements * timeout error (backport [#43154](https://github.com/frappe/erpnext/issues/43154)) ([#43158](https://github.com/frappe/erpnext/issues/43158)) ([c9f49ca](https://github.com/frappe/erpnext/commit/c9f49caeccb7b04cc20f43768b72a8238122c893)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 10c7018c9c1..32c572e92c3 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.34.2" +__version__ = "15.35.0" def get_default_company(user=None): From 0d9741fdd77be8621e5194f1391fc3d3d2c5a515 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Wed, 11 Sep 2024 12:59:46 +0530 Subject: [PATCH 0089/1614] refactor: enable no-copy on Purchase Invoice status --- .../accounts/doctype/purchase_invoice/purchase_invoice.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json index 3751c027c97..c2ee4166ed1 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json @@ -1271,6 +1271,7 @@ "fieldtype": "Select", "in_standard_filter": 1, "label": "Status", + "no_copy": 1, "options": "\nDraft\nReturn\nDebit Note Issued\nSubmitted\nPaid\nPartly Paid\nUnpaid\nOverdue\nCancelled\nInternal Transfer", "print_hide": 1 }, @@ -1630,7 +1631,7 @@ "idx": 204, "is_submittable": 1, "links": [], - "modified": "2024-07-25 19:42:36.931278", + "modified": "2024-09-11 12:59:19.130593", "modified_by": "Administrator", "module": "Accounts", "name": "Purchase Invoice", From 1657a83151fb002e0606c36923e722aa638cc6f2 Mon Sep 17 00:00:00 2001 From: Smit Vora Date: Thu, 12 Sep 2024 10:36:32 +0530 Subject: [PATCH 0090/1614] fix: typo with po_date when creating remarks (cherry picked from commit a55502e0f14133d8e6dfca9e0741c07d20056b08) --- .../accounts/doctype/sales_invoice/sales_invoice.py | 2 +- .../doctype/sales_invoice/test_sales_invoice.py | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 12e26623ad0..1214ddee8cd 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -951,7 +951,7 @@ class SalesInvoice(SellingController): if self.po_no: self.remarks = _("Against Customer Order {0}").format(self.po_no) if self.po_date: - self.remarks += " " + _("dated {0}").format(formatdate(self.po_data)) + self.remarks += " " + _("dated {0}").format(formatdate(self.po_date)) else: self.remarks = _("No Remarks") diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py index beb347e07db..7ac0d34e671 100644 --- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py @@ -8,7 +8,7 @@ import frappe from frappe import qb from frappe.model.dynamic_links import get_dynamic_link_map from frappe.tests.utils import FrappeTestCase, change_settings -from frappe.utils import add_days, flt, getdate, nowdate, today +from frappe.utils import add_days, flt, format_date, getdate, nowdate, today import erpnext from erpnext.accounts.doctype.account.test_account import create_account, get_inventory_account @@ -3997,6 +3997,14 @@ class TestSalesInvoice(FrappeTestCase): self.assertTrue(jv) self.assertEqual(jv[0], si.grand_total) + def test_invoice_remarks(self): + si = frappe.copy_doc(test_records[0]) + si.po_no = "Test PO" + si.po_date = nowdate() + si.save() + si.submit() + self.assertEqual(si.remarks, f"Against Customer Order Test PO dated {format_date(nowdate())}") + def set_advance_flag(company, flag, default_account): frappe.db.set_value( From 31e0bb477ecda7145771e53d642b4fa34a8d7f42 Mon Sep 17 00:00:00 2001 From: Smit Vora Date: Thu, 12 Sep 2024 10:36:32 +0530 Subject: [PATCH 0091/1614] fix: typo with po_date when creating remarks (cherry picked from commit a55502e0f14133d8e6dfca9e0741c07d20056b08) --- .../accounts/doctype/sales_invoice/sales_invoice.py | 2 +- .../doctype/sales_invoice/test_sales_invoice.py | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 12e26623ad0..1214ddee8cd 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -951,7 +951,7 @@ class SalesInvoice(SellingController): if self.po_no: self.remarks = _("Against Customer Order {0}").format(self.po_no) if self.po_date: - self.remarks += " " + _("dated {0}").format(formatdate(self.po_data)) + self.remarks += " " + _("dated {0}").format(formatdate(self.po_date)) else: self.remarks = _("No Remarks") diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py index beb347e07db..7ac0d34e671 100644 --- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py @@ -8,7 +8,7 @@ import frappe from frappe import qb from frappe.model.dynamic_links import get_dynamic_link_map from frappe.tests.utils import FrappeTestCase, change_settings -from frappe.utils import add_days, flt, getdate, nowdate, today +from frappe.utils import add_days, flt, format_date, getdate, nowdate, today import erpnext from erpnext.accounts.doctype.account.test_account import create_account, get_inventory_account @@ -3997,6 +3997,14 @@ class TestSalesInvoice(FrappeTestCase): self.assertTrue(jv) self.assertEqual(jv[0], si.grand_total) + def test_invoice_remarks(self): + si = frappe.copy_doc(test_records[0]) + si.po_no = "Test PO" + si.po_date = nowdate() + si.save() + si.submit() + self.assertEqual(si.remarks, f"Against Customer Order Test PO dated {format_date(nowdate())}") + def set_advance_flag(company, flag, default_account): frappe.db.set_value( From 7f95e42becfff89b31c8b6964fa237ba49445580 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Thu, 12 Sep 2024 06:11:04 +0000 Subject: [PATCH 0092/1614] chore(release): Bumped to Version 15.35.1 ## [15.35.1](https://github.com/frappe/erpnext/compare/v15.35.0...v15.35.1) (2024-09-12) ### Bug Fixes * typo with po_date when creating remarks ([31e0bb4](https://github.com/frappe/erpnext/commit/31e0bb477ecda7145771e53d642b4fa34a8d7f42)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 32c572e92c3..50acf5dd033 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.35.0" +__version__ = "15.35.1" def get_default_company(user=None): From 45ff8fa296b47c809ecb643a4b67fc775d9e9848 Mon Sep 17 00:00:00 2001 From: Vishakh Desai Date: Wed, 11 Sep 2024 14:21:48 +0530 Subject: [PATCH 0093/1614] fix: set party_type null when payment_type is changed to Internal Transfer (cherry picked from commit 502cf0eb8d8001925b5c00583083a8f29a2d2115) --- .../accounts/doctype/payment_entry/payment_entry.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.js b/erpnext/accounts/doctype/payment_entry/payment_entry.js index b50dcd217e7..f46c782112c 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.js +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.js @@ -385,7 +385,15 @@ frappe.ui.form.on("Payment Entry", { payment_type: function (frm) { if (frm.doc.payment_type == "Internal Transfer") { $.each( - ["party", "party_balance", "paid_from", "paid_to", "references", "total_allocated_amount"], + [ + "party", + "party_type", + "party_balance", + "paid_from", + "paid_to", + "references", + "total_allocated_amount", + ], function (i, field) { frm.set_value(field, null); } From 5789de25b94258c8e521885cde47c5706632cc98 Mon Sep 17 00:00:00 2001 From: Navin-S-R Date: Thu, 12 Sep 2024 15:25:54 +0530 Subject: [PATCH 0094/1614] fix: delete exchange gain loss journal entry while deleting payment entry (cherry picked from commit 9886cf0d46f68caec45467d5dbcd018084a65088) --- erpnext/accounts/utils.py | 98 +++++++++++++++------- erpnext/controllers/accounts_controller.py | 5 ++ 2 files changed, 71 insertions(+), 32 deletions(-) diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py index e462f749b54..32eeb1e07a6 100644 --- a/erpnext/accounts/utils.py +++ b/erpnext/accounts/utils.py @@ -745,40 +745,74 @@ def cancel_exchange_gain_loss_journal( Cancel Exchange Gain/Loss for Sales/Purchase Invoice, if they have any. """ if parent_doc.doctype in ["Sales Invoice", "Purchase Invoice", "Payment Entry", "Journal Entry"]: - journals = frappe.db.get_all( - "Journal Entry Account", - filters={ - "reference_type": parent_doc.doctype, - "reference_name": parent_doc.name, - "docstatus": 1, - }, - fields=["parent"], - as_list=1, + gain_loss_journals = get_linked_exchange_gain_loss_journal( + referenced_dt=parent_doc.doctype, referenced_dn=parent_doc.name, je_docstatus=1 ) - - if journals: - gain_loss_journals = frappe.db.get_all( - "Journal Entry", - filters={ - "name": ["in", [x[0] for x in journals]], - "voucher_type": "Exchange Gain Or Loss", - "docstatus": 1, - }, - as_list=1, - ) - for doc in gain_loss_journals: - gain_loss_je = frappe.get_doc("Journal Entry", doc[0]) - if referenced_dt and referenced_dn: - references = [(x.reference_type, x.reference_name) for x in gain_loss_je.accounts] - if ( - len(references) == 2 - and (referenced_dt, referenced_dn) in references - and (parent_doc.doctype, parent_doc.name) in references - ): - # only cancel JE generated against parent_doc and referenced_dn - gain_loss_je.cancel() - else: + for doc in gain_loss_journals: + gain_loss_je = frappe.get_doc("Journal Entry", doc) + if referenced_dt and referenced_dn: + references = [(x.reference_type, x.reference_name) for x in gain_loss_je.accounts] + if ( + len(references) == 2 + and (referenced_dt, referenced_dn) in references + and (parent_doc.doctype, parent_doc.name) in references + ): + # only cancel JE generated against parent_doc and referenced_dn gain_loss_je.cancel() + else: + gain_loss_je.cancel() + + +def delete_exchange_gain_loss_journal( + parent_doc: dict | object, referenced_dt: str | None = None, referenced_dn: str | None = None +) -> None: + """ + Delete Exchange Gain/Loss for Sales/Purchase Invoice, if they have any. + """ + if parent_doc.doctype in ["Sales Invoice", "Purchase Invoice", "Payment Entry", "Journal Entry"]: + gain_loss_journals = get_linked_exchange_gain_loss_journal( + referenced_dt=parent_doc.doctype, referenced_dn=parent_doc.name, je_docstatus=2 + ) + for doc in gain_loss_journals: + gain_loss_je = frappe.get_doc("Journal Entry", doc) + if referenced_dt and referenced_dn: + references = [(x.reference_type, x.reference_name) for x in gain_loss_je.accounts] + if ( + len(references) == 2 + and (referenced_dt, referenced_dn) in references + and (parent_doc.doctype, parent_doc.name) in references + ): + # only delete JE generated against parent_doc and referenced_dn + gain_loss_je.delete() + else: + gain_loss_je.delete() + + +def get_linked_exchange_gain_loss_journal(referenced_dt: str, referenced_dn: str, je_docstatus: int) -> list: + """ + Get all the linked exchange gain/loss journal entries for a given document. + """ + gain_loss_journals = [] + if journals := frappe.db.get_all( + "Journal Entry Account", + { + "reference_type": referenced_dt, + "reference_name": referenced_dn, + "docstatus": je_docstatus, + }, + pluck="parent", + ): + gain_loss_journals = frappe.db.get_all( + "Journal Entry", + { + "name": ["in", journals], + "voucher_type": "Exchange Gain Or Loss", + "is_system_generated": 1, + "docstatus": je_docstatus, + }, + pluck="name", + ) + return gain_loss_journals def cancel_common_party_journal(self): diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 49198be9b48..92efa5168f3 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -346,12 +346,17 @@ class AccountsController(TransactionBase): repost_doc.save(ignore_permissions=True) def on_trash(self): + from erpnext.accounts.utils import delete_exchange_gain_loss_journal + self._remove_references_in_repost_doctypes() self._remove_references_in_unreconcile() self.remove_serial_and_batch_bundle() # delete sl and gl entries on deletion of transaction if frappe.db.get_single_value("Accounts Settings", "delete_linked_ledger_entries"): + # delete linked exchange gain/loss journal + delete_exchange_gain_loss_journal(self) + ple = frappe.qb.DocType("Payment Ledger Entry") frappe.qb.from_(ple).delete().where( (ple.voucher_type == self.doctype) & (ple.voucher_no == self.name) From d618c9a481270515922a493867c68ea61354e9ac Mon Sep 17 00:00:00 2001 From: Navin-S-R Date: Thu, 12 Sep 2024 15:26:55 +0530 Subject: [PATCH 0095/1614] test: add unit test for deletion of gain loss jv while deleting payment entry (cherry picked from commit 7855d3034b1cc8f6385548643a8820293dfd33eb) --- .../payment_entry/test_payment_entry.py | 73 +++++++++++++++++++ 1 file changed, 73 insertions(+) diff --git a/erpnext/accounts/doctype/payment_entry/test_payment_entry.py b/erpnext/accounts/doctype/payment_entry/test_payment_entry.py index cc03dc260bb..771c91a462c 100644 --- a/erpnext/accounts/doctype/payment_entry/test_payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/test_payment_entry.py @@ -1791,6 +1791,79 @@ class TestPaymentEntry(FrappeTestCase): # 'Is Opening' should always be 'No' for normal advance payments self.assertEqual(gl_with_opening_set, []) + @change_settings("Accounts Settings", {"delete_linked_ledger_entries": 1}) + def test_delete_linked_exchange_gain_loss_journal(self): + from erpnext.accounts.doctype.account.test_account import create_account + from erpnext.accounts.doctype.opening_invoice_creation_tool.test_opening_invoice_creation_tool import ( + make_customer, + ) + + debtors = create_account( + account_name="Debtors USD", + parent_account="Accounts Receivable - _TC", + company="_Test Company", + account_currency="USD", + account_type="Receivable", + ) + + # create a customer + customer = make_customer(customer="_Test Party USD") + cust_doc = frappe.get_doc("Customer", customer) + cust_doc.default_currency = "USD" + test_account_details = { + "company": "_Test Company", + "account": debtors, + } + cust_doc.append("accounts", test_account_details) + cust_doc.save() + + # create a sales invoice + si = create_sales_invoice( + customer=customer, + currency="USD", + conversion_rate=83.970000000, + debit_to=debtors, + do_not_save=1, + ) + si.party_account_currency = "USD" + si.save() + si.submit() + + # create a payment entry for the invoice + pe = get_payment_entry("Sales Invoice", si.name) + pe.reference_no = "1" + pe.reference_date = frappe.utils.nowdate() + pe.paid_amount = 100 + pe.source_exchange_rate = 90 + pe.append( + "deductions", + { + "account": "_Test Exchange Gain/Loss - _TC", + "cost_center": "_Test Cost Center - _TC", + "amount": 2710, + }, + ) + pe.save() + pe.submit() + + # check creation of journal entry + jv = frappe.get_all( + "Journal Entry Account", + {"reference_type": pe.doctype, "reference_name": pe.name, "docstatus": 1}, + pluck="parent", + ) + self.assertTrue(jv) + + # check cancellation of payment entry and journal entry + pe.cancel() + self.assertTrue(pe.docstatus == 2) + self.assertTrue(frappe.db.get_value("Journal Entry", {"name": jv[0]}, "docstatus") == 2) + + # check deletion of payment entry and journal entry + pe.delete() + self.assertRaises(frappe.DoesNotExistError, frappe.get_doc, pe.doctype, pe.name) + self.assertRaises(frappe.DoesNotExistError, frappe.get_doc, "Journal Entry", jv[0]) + def create_payment_entry(**args): payment_entry = frappe.new_doc("Payment Entry") From 055e7820c85cc9aafb6dff38a22ecc76cef2eac8 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 12 Sep 2024 16:48:25 +0530 Subject: [PATCH 0096/1614] refactor(test): use test fixture on pricing rule test suite (cherry picked from commit 0ea1d6d9605e31b8af539ec37bc46b64c67ef5c9) --- erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py b/erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py index 235fddf3ab3..3fece4aeeab 100644 --- a/erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py +++ b/erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py @@ -5,6 +5,7 @@ import unittest import frappe +from frappe.tests.utils import FrappeTestCase, change_settings from erpnext.accounts.doctype.purchase_invoice.test_purchase_invoice import make_purchase_invoice from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice @@ -14,7 +15,7 @@ from erpnext.stock.doctype.item.test_item import make_item from erpnext.stock.get_item_details import get_item_details -class TestPricingRule(unittest.TestCase): +class TestPricingRule(FrappeTestCase): def setUp(self): delete_existing_pricing_rules() setup_pricing_rule_data() From c1a6c56217b326f4c948145c507c87bbc987bafc Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 13 Sep 2024 13:29:58 +0530 Subject: [PATCH 0097/1614] fix: item list view in website (backport #43165) (#43207) fix: item list view in website (#43165) (cherry picked from commit ce34bb97930ea97d4abe4ac9c3227654b5d00a62) Co-authored-by: rohitwaghchaure --- erpnext/stock/doctype/item/templates/item_row.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/item/templates/item_row.html b/erpnext/stock/doctype/item/templates/item_row.html index f81fc1d8743..809ac838ccb 100644 --- a/erpnext/stock/doctype/item/templates/item_row.html +++ b/erpnext/stock/doctype/item/templates/item_row.html @@ -1,4 +1,4 @@ From 61a42ea5d71b9f28c73d9954168bc3e9ba37a3cc Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 13 Sep 2024 13:30:12 +0530 Subject: [PATCH 0098/1614] fix: batch based item price not working (backport #43172) (#43206) * fix: batch based item price not working (#43172) (cherry picked from commit d9e4ed13cbbae7d318038554e486b67cf0b9ff7c) # Conflicts: # erpnext/stock/get_item_details.py * chore: fix conflicts --------- Co-authored-by: rohitwaghchaure --- erpnext/public/js/controllers/transaction.js | 25 ++++++++++++++++++++ erpnext/stock/get_item_details.py | 25 +++++++++++++++++--- 2 files changed, 47 insertions(+), 3 deletions(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 3dcd36b2cff..435ce26c5c1 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -1501,6 +1501,31 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe } } + batch_no(frm, cdt, cdn) { + let row = locals[cdt][cdn]; + if (row.use_serial_batch_fields && row.batch_no) { + var params = this._get_args(row); + params.batch_no = row.batch_no; + params.uom = row.uom; + + frappe.call({ + method: "erpnext.stock.get_item_details.get_batch_based_item_price", + args: { + params: params, + item_code: row.item_code, + }, + callback: function(r) { + if (!r.exc && r.message) { + row.price_list_rate = r.message; + row.rate = r.message; + refresh_field("rate", row.name, row.parentfield); + refresh_field("price_list_rate", row.name, row.parentfield); + } + } + }) + } + } + toggle_item_grid_columns(company_currency) { const me = this; // toggle columns diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py index 5cfa306066d..50db899433f 100644 --- a/erpnext/stock/get_item_details.py +++ b/erpnext/stock/get_item_details.py @@ -10,7 +10,7 @@ from frappe.model import child_table_fields, default_fields from frappe.model.meta import get_field_precision from frappe.model.utils import get_fetch_values from frappe.query_builder.functions import IfNull, Sum -from frappe.utils import add_days, add_months, cint, cstr, flt, getdate +from frappe.utils import add_days, add_months, cint, cstr, flt, getdate, parse_json from erpnext import get_company_currency from erpnext.accounts.doctype.pricing_rule.pricing_rule import ( @@ -889,7 +889,7 @@ def insert_item_price(args): ) -def get_item_price(args, item_code, ignore_party=False): +def get_item_price(args, item_code, ignore_party=False, force_batch_no=False) -> list[dict]: """ Get name, price_list_rate from Item Price based on conditions Check if the desired qty is within the increment of the packing list. @@ -906,13 +906,17 @@ def get_item_price(args, item_code, ignore_party=False): (ip.item_code == item_code) & (ip.price_list == args.get("price_list")) & (IfNull(ip.uom, "").isin(["", args.get("uom")])) - & (IfNull(ip.batch_no, "").isin(["", args.get("batch_no")])) ) .orderby(ip.valid_from, order=frappe.qb.desc) .orderby(IfNull(ip.batch_no, ""), order=frappe.qb.desc) .orderby(ip.uom, order=frappe.qb.desc) ) + if force_batch_no: + query = query.where(ip.batch_no == args.get("batch_no")) + else: + query = query.where(IfNull(ip.batch_no, "").isin(["", args.get("batch_no")])) + if not ignore_party: if args.get("customer"): query = query.where(ip.customer == args.get("customer")) @@ -930,6 +934,21 @@ def get_item_price(args, item_code, ignore_party=False): return query.run() +@frappe.whitelist() +def get_batch_based_item_price(params, item_code) -> float: + if isinstance(params, str): + params = parse_json(params) + + item_price = get_item_price(params, item_code, force_batch_no=True) + if not item_price: + item_price = get_item_price(params, item_code, ignore_party=True, force_batch_no=True) + + if item_price and item_price[0].uom == params.get("uom"): + return item_price[0].price_list_rate + + return 0.0 + + def get_price_list_rate_for(args, item_code): """ :param customer: link to Customer DocType From ef6b172616ee473c1b05324d2e6217510cec8cda Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 13 Sep 2024 13:30:36 +0530 Subject: [PATCH 0099/1614] fix: currency changing while making PO from Supplier Quotation (backport #43187) (#43205) fix: currency changing while making PO from Supplier Quotation (#43187) (cherry picked from commit 2b96e37c3486c5f4e1928cfcb5c3b9f0cad60f6b) Co-authored-by: rohitwaghchaure --- erpnext/public/js/controllers/transaction.js | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 435ce26c5c1..67c61118952 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -1258,6 +1258,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe "Purchase Receipt": ["purchase_order_item", "purchase_invoice_item", "purchase_receipt_item"], "Purchase Invoice": ["purchase_order_item", "pr_detail", "po_detail"], "Sales Order": ["prevdoc_docname", "quotation_item"], + "Purchase Order": ["supplier_quotation_item"], }; const mappped_fields = mapped_item_field_map[this.frm.doc.doctype] || []; From 2f56ba7f428488c8a94160941df9c4d309dee5eb Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 13 Sep 2024 13:30:36 +0530 Subject: [PATCH 0100/1614] fix: currency changing while making PO from Supplier Quotation (backport #43187) (#43205) fix: currency changing while making PO from Supplier Quotation (#43187) (cherry picked from commit 2b96e37c3486c5f4e1928cfcb5c3b9f0cad60f6b) Co-authored-by: rohitwaghchaure (cherry picked from commit ef6b172616ee473c1b05324d2e6217510cec8cda) --- erpnext/public/js/controllers/transaction.js | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 3dcd36b2cff..4b997b6d8fb 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -1258,6 +1258,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe "Purchase Receipt": ["purchase_order_item", "purchase_invoice_item", "purchase_receipt_item"], "Purchase Invoice": ["purchase_order_item", "pr_detail", "po_detail"], "Sales Order": ["prevdoc_docname", "quotation_item"], + "Purchase Order": ["supplier_quotation_item"], }; const mappped_fields = mapped_item_field_map[this.frm.doc.doctype] || []; From ad2d6a16258235a20d041174458e32bb6ebad8f7 Mon Sep 17 00:00:00 2001 From: sameer Chauhan Date: Fri, 13 Sep 2024 17:32:44 +0530 Subject: [PATCH 0101/1614] fix: Payment Ledger Report currency fieldtype fix --- erpnext/accounts/report/payment_ledger/payment_ledger.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/report/payment_ledger/payment_ledger.py b/erpnext/accounts/report/payment_ledger/payment_ledger.py index 9852c6e7ab9..d4f0f0a107d 100644 --- a/erpnext/accounts/report/payment_ledger/payment_ledger.py +++ b/erpnext/accounts/report/payment_ledger/payment_ledger.py @@ -210,7 +210,7 @@ class PaymentLedger: ) ) self.columns.append( - dict(label=_("Currency"), fieldname="currency", fieldtype="Currency", hidden=True) + dict(label=_("Currency"), fieldname="currency", fieldtype="Link", options="Currency", hidden=True) ) def run(self): From f101a1ce3b9e2e579ff200c80204a0231916eeec Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Sat, 14 Sep 2024 13:36:26 +0530 Subject: [PATCH 0102/1614] fix(holiday-list): use same date format for same holiday error message (backport #42606) (#43222) fix(holiday-list): use same date format for same holiday error message (#42606) * fix(holiday-list): use same date format for same holiday error message * chore: fix formatting --------- Co-authored-by: Rucha Mahabal (cherry picked from commit a43544153667f8b15d915fd774b46d737de912d2) Co-authored-by: Ananyobrata Pal <74728797+ananyo141@users.noreply.github.com> --- erpnext/setup/doctype/holiday_list/holiday_list.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/erpnext/setup/doctype/holiday_list/holiday_list.py b/erpnext/setup/doctype/holiday_list/holiday_list.py index 0216f75a628..b7920236ce1 100644 --- a/erpnext/setup/doctype/holiday_list/holiday_list.py +++ b/erpnext/setup/doctype/holiday_list/holiday_list.py @@ -149,7 +149,11 @@ class HolidayList(Document): unique_dates = [] for row in self.holidays: if row.holiday_date in unique_dates: - frappe.throw(_("Holiday Date {0} added multiple times").format(frappe.bold(row.holiday_date))) + frappe.throw( + _("Holiday Date {0} added multiple times").format( + frappe.bold(formatdate(row.holiday_date)) + ) + ) unique_dates.append(row.holiday_date) From f060534625b6a7dcb7b60fd783f041ba3e980650 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 12 Sep 2024 19:38:30 +0530 Subject: [PATCH 0103/1614] feat: API for crm integration (cherry picked from commit b7bf9f80f2554dc466a108cdcf2e6f929393ac19) --- erpnext/crm/frappe_crm_api.py | 135 ++++++++++++++++++ .../selling/doctype/quotation/quotation.js | 2 +- .../selling/doctype/quotation/quotation.py | 4 + 3 files changed, 140 insertions(+), 1 deletion(-) create mode 100644 erpnext/crm/frappe_crm_api.py diff --git a/erpnext/crm/frappe_crm_api.py b/erpnext/crm/frappe_crm_api.py new file mode 100644 index 00000000000..40c0ce8c9c1 --- /dev/null +++ b/erpnext/crm/frappe_crm_api.py @@ -0,0 +1,135 @@ +import json + +import frappe +from frappe import _ +from frappe.custom.doctype.custom_field.custom_field import create_custom_fields + + +@frappe.whitelist() +def create_custom_fields_for_frappe_crm(): + frappe.only_for("System Manager") + custom_fields = { + "Quotation": [ + { + "fieldname": "crm_deal", + "fieldtype": "Data", + "label": "Frappe CRM Deal", + "insert_after": "party_name", + } + ], + "Customer": [ + { + "fieldname": "crm_deal", + "fieldtype": "Data", + "label": "Frappe CRM Deal", + "insert_after": "prospect_name", + } + ], + } + create_custom_fields(custom_fields, ignore_validate=True) + + +@frappe.whitelist() +def create_prospect_against_crm_deal(): + frappe.only_for("System Manager") + doc = frappe.form_dict + prospect = frappe.get_doc( + { + "doctype": "Prospect", + "company_name": doc.organization or doc.lead_name, + "no_of_employees": doc.no_of_employees, + "prospect_owner": doc.deal_owner, + "company": doc.erpnext_company, + "crm_deal": doc.crm_deal, + "territory": doc.territory, + "industry": doc.industry, + "website": doc.website, + "annual_revenue": doc.annual_revenue, + } + ) + + try: + prospect_name = frappe.db.get_value("Prospect", {"company_name": prospect.company_name}) + if not prospect_name: + prospect.insert() + prospect_name = prospect.name + except Exception: + frappe.log_error( + frappe.get_traceback(), + f"Error while creating prospect against CRM Deal: {frappe.form_dict.get('crm_deal_id')}", + ) + pass + + create_contacts(json.loads(doc.contacts), prospect.company_name, "Prospect", prospect_name) + frappe.response["message"] = prospect_name + + +def create_contacts(contacts, organization=None, link_doctype=None, link_docname=None): + for c in contacts: + c = frappe._dict(c) + existing_contact = contact_exists(c.email, c.mobile_no) + if existing_contact: + contact = frappe.get_doc("Contact", existing_contact) + else: + contact = frappe.get_doc( + { + "doctype": "Contact", + "first_name": c.get("full_name"), + "gender": c.get("gender"), + "company_name": organization, + } + ) + + if c.get("email"): + contact.append("email_ids", {"email_id": c.get("email"), "is_primary": 1}) + + if c.get("mobile_no"): + contact.append("phone_nos", {"phone": c.get("mobile_no"), "is_primary_mobile_no": 1}) + + link_contact_to_prospect(contact, link_doctype, link_docname) + + contact.save(ignore_permissions=True) + + +def link_contact_to_prospect(contact, link_doctype, link_docname): + already_linked = any( + [(link.link_doctype == link_doctype and link.link_name == link_docname) for link in contact.links] + ) + if not already_linked: + contact.append( + "links", {"link_doctype": link_doctype, "link_name": link_docname, "link_title": link_docname} + ) + + +def contact_exists(email, mobile_no): + email_exist = frappe.db.exists("Contact Email", {"email_id": email}) + mobile_exist = frappe.db.exists("Contact Phone", {"phone": mobile_no}) + + doctype = "Contact Email" if email_exist else "Contact Phone" + name = email_exist or mobile_exist + + if name: + return frappe.db.get_value(doctype, name, "parent") + + return False + + +@frappe.whitelist() +def create_customer(customer_data=None): + frappe.only_for("System Manager") + if not customer_data: + customer_data = frappe.form_dict + + try: + customer_name = frappe.db.exists("Customer", {"customer_name": customer_data.get("customer_name")}) + if not customer_name: + customer = frappe.get_doc({"doctype": "Customer", **customer_data}).insert( + ignore_permissions=True + ) + customer_name = customer.name + + contacts = json.loads(customer_data.get("contacts")) + create_contacts(contacts, customer_name, "Customer", customer_name) + except Exception: + frappe.log_error(frappe.get_traceback(), "Error while creating customer against Frappe CRM Deal") + pass diff --git a/erpnext/selling/doctype/quotation/quotation.js b/erpnext/selling/doctype/quotation/quotation.js index 3044d865c0c..a4c70d7f50f 100644 --- a/erpnext/selling/doctype/quotation/quotation.js +++ b/erpnext/selling/doctype/quotation/quotation.js @@ -71,7 +71,7 @@ frappe.ui.form.on("Quotation", { frm.trigger("set_label"); frm.trigger("toggle_reqd_lead_customer"); frm.trigger("set_dynamic_field_label"); - frm.set_value("party_name", ""); + // frm.set_value("party_name", ""); // removed to set party_name from url for crm integration frm.set_value("customer_name", ""); }, diff --git a/erpnext/selling/doctype/quotation/quotation.py b/erpnext/selling/doctype/quotation/quotation.py index 2a4b04b9db5..7ebcb329193 100644 --- a/erpnext/selling/doctype/quotation/quotation.py +++ b/erpnext/selling/doctype/quotation/quotation.py @@ -220,6 +220,10 @@ class Quotation(SellingController): "Lead", self.party_name, ["lead_name", "company_name"] ) self.customer_name = company_name or lead_name + elif self.party_name and self.quotation_to == "Prospect": + self.customer_name = self.party_name + elif self.party_name and self.quotation_to == "CRM Deal": + self.customer_name = frappe.db.get_value("CRM Deal", self.party_name, "organization") def update_opportunity(self, status): for opportunity in set(d.prevdoc_docname for d in self.get("items")): From 984acb661d4314960bf2f1eb3542830b182441cc Mon Sep 17 00:00:00 2001 From: ljain112 Date: Fri, 13 Sep 2024 17:30:52 +0530 Subject: [PATCH 0104/1614] fix: prevent KeyError by checking `report_filter` existence (cherry picked from commit c1d2cc2c14da36508ef1cd72f0ae04c961c1edbf) --- erpnext/patches/v14_0/update_reports_with_range.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/patches/v14_0/update_reports_with_range.py b/erpnext/patches/v14_0/update_reports_with_range.py index 2bda265ca66..014fba883fc 100644 --- a/erpnext/patches/v14_0/update_reports_with_range.py +++ b/erpnext/patches/v14_0/update_reports_with_range.py @@ -30,6 +30,9 @@ def update_report_json(report): report_json = json.loads(report.json) report_filter = report_json.get("filters") + if not report_filter: + return + keys_to_pop = [key for key in report_filter if key.startswith("range")] report_filter["range"] = ", ".join(str(report_filter.pop(key)) for key in keys_to_pop) From d8d4cd23a518ec94b30f69dfc67dd042582fcbec Mon Sep 17 00:00:00 2001 From: venkat102 Date: Sat, 14 Sep 2024 16:00:53 +0530 Subject: [PATCH 0105/1614] fix(ux): set amount on foreign currency when foreign currency account is selected on last row of journal (cherry picked from commit 2b66842d3492fae20c87eb6969c1c39c33aa8b0e) --- .../doctype/journal_entry/journal_entry.js | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.js b/erpnext/accounts/doctype/journal_entry/journal_entry.js index d290d794df1..999db883e98 100644 --- a/erpnext/accounts/doctype/journal_entry/journal_entry.js +++ b/erpnext/accounts/doctype/journal_entry/journal_entry.js @@ -680,6 +680,7 @@ $.extend(erpnext.journal_entry, { callback: function (r) { if (r.message) { $.extend(d, r.message); + erpnext.journal_entry.set_amount_on_last_row(frm, dt, dn); erpnext.journal_entry.set_debit_credit_in_company_currency(frm, dt, dn); refresh_field("accounts"); } @@ -687,4 +688,26 @@ $.extend(erpnext.journal_entry, { }); } }, + set_amount_on_last_row: function (frm, dt, dn) { + let row = locals[dt][dn]; + let length = frm.doc.accounts.length; + if (row.idx != length) return; + + let difference = frm.doc.accounts.reduce((total, row) => { + if (row.idx == length) return total; + + return total + row.debit - row.credit; + }, 0); + + if (difference) { + if (difference > 0) { + row.credit_in_account_currency = difference / row.exchange_rate; + row.credit = difference; + } else { + row.debit_in_account_currency = -difference / row.exchange_rate; + row.debit = -difference; + } + } + refresh_field("accounts"); + }, }); From 2ad6d637ee9193253fbade6ab35769636906c8d1 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Tue, 20 Aug 2024 10:58:45 +0530 Subject: [PATCH 0106/1614] fix: revert 091c5496b20864577d133b0804e957ff8995606f (cherry picked from commit eeb6e75dcf4a79d8ea87c4538f3424348088117d) --- .../doctype/purchase_invoice/purchase_invoice.js | 2 +- .../doctype/purchase_invoice/purchase_invoice.py | 16 ---------------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js index 9c8c8cdfb03..54153b5c19f 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js @@ -652,7 +652,7 @@ frappe.ui.form.on("Purchase Invoice", { if (frm.doc.supplier) { frm.doc.apply_tds = frm.doc.__onload.supplier_tds ? 1 : 0; } - if (!frm.doc.__onload.enable_apply_tds) { + if (!frm.doc.__onload.supplier_tds) { frm.set_df_property("apply_tds", "read_only", 1); } } diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index 623fb941b89..c9f3b220cc6 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -346,22 +346,6 @@ class PurchaseInvoice(BuyingController): self.tax_withholding_category = tds_category self.set_onload("supplier_tds", tds_category) - # If Linked Purchase Order has TDS applied, enable 'apply_tds' checkbox - if purchase_orders := [x.purchase_order for x in self.items if x.purchase_order]: - po = qb.DocType("Purchase Order") - po_with_tds = ( - qb.from_(po) - .select(po.name) - .where( - po.docstatus.eq(1) - & (po.name.isin(purchase_orders)) - & (po.apply_tds.eq(1)) - & (po.tax_withholding_category.notnull()) - ) - .run() - ) - self.set_onload("enable_apply_tds", True if po_with_tds else False) - super().set_missing_values(for_validate) def validate_credit_to_acc(self): From 11359bd2353e7804e226ae000464093d8d5aa71c Mon Sep 17 00:00:00 2001 From: ljain112 Date: Fri, 23 Aug 2024 12:34:07 +0530 Subject: [PATCH 0107/1614] fix: tds workflow in purchase order (cherry picked from commit a7888b26a73ab61240adf22392bb2ef7b4f93927) --- .../doctype/purchase_order/purchase_order.js | 36 +++++++++++++++++++ .../doctype/purchase_order/purchase_order.py | 7 ++++ 2 files changed, 43 insertions(+) diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.js b/erpnext/buying/doctype/purchase_order/purchase_order.js index bd92ebef3d7..cab375ea557 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.js +++ b/erpnext/buying/doctype/purchase_order/purchase_order.js @@ -65,6 +65,33 @@ frappe.ui.form.on("Purchase Order", { } }, + supplier: function (frm) { + // Do not update if inter company reference is there as the details will already be updated + if (frm.updating_party_details || frm.doc.inter_company_invoice_reference) return; + + if (frm.doc.__onload && frm.doc.__onload.load_after_mapping) return; + + erpnext.utils.get_party_details( + frm, + "erpnext.accounts.party.get_party_details", + { + posting_date: frm.doc.transaction_date, + bill_date: frm.doc.bill_date, + party: frm.doc.supplier, + party_type: "Supplier", + account: frm.doc.credit_to, + price_list: frm.doc.buying_price_list, + fetch_payment_terms_template: cint(!frm.doc.ignore_default_payment_terms_template), + }, + function () { + frm.doc.apply_tds = frm.supplier_tds ? 1 : 0; + frm.doc.tax_withholding_category = frm.supplier_tds; + frm.set_df_property("apply_tds", "read_only", frm.supplier_tds ? 0 : 1); + frm.set_df_property("tax_withholding_category", "hidden", frm.supplier_tds ? 0 : 1); + } + ); + }, + get_materials_from_supplier: function (frm) { let po_details = []; @@ -108,6 +135,15 @@ frappe.ui.form.on("Purchase Order", { frm.set_value("transaction_date", frappe.datetime.get_today()); } + if (frm.doc.__onload && frm.is_new()) { + if (frm.doc.supplier) { + frm.doc.apply_tds = frm.doc.__onload.supplier_tds ? 1 : 0; + } + if (!frm.doc.__onload.supplier_tds) { + frm.set_df_property("apply_tds", "read_only", 1); + } + } + erpnext.queries.setup_queries(frm, "Warehouse", function () { return erpnext.queries.warehouse(frm.doc); }); diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.py b/erpnext/buying/doctype/purchase_order/purchase_order.py index 0508483a0fc..32968bc6a56 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.py +++ b/erpnext/buying/doctype/purchase_order/purchase_order.py @@ -648,6 +648,13 @@ class PurchaseOrder(BuyingController): if sco: update_sco_status(sco, "Closed" if self.status == "Closed" else None) + def set_missing_values(self, for_validate=False): + tds_category = frappe.db.get_value("Supplier", self.supplier, "tax_withholding_category") + if tds_category and not for_validate: + self.apply_tds = 1 + self.tax_withholding_category = tds_category + self.set_onload("supplier_tds", tds_category) + @frappe.request_cache def item_last_purchase_rate(name, conversion_rate, item_code, conversion_factor=1.0): From 5edebb28a5bcbeacc1084c9da3cb99e156d95b8d Mon Sep 17 00:00:00 2001 From: ljain112 Date: Tue, 3 Sep 2024 11:44:55 +0530 Subject: [PATCH 0108/1614] fix: do not check appy_tds in Purchase Order Automatically (cherry picked from commit be6c174b439c6a3729f89583c74723921e1fb9f5) --- erpnext/buying/doctype/purchase_order/purchase_order.js | 2 -- erpnext/buying/doctype/purchase_order/purchase_order.py | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.js b/erpnext/buying/doctype/purchase_order/purchase_order.js index cab375ea557..a40ef47afcf 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.js +++ b/erpnext/buying/doctype/purchase_order/purchase_order.js @@ -84,8 +84,6 @@ frappe.ui.form.on("Purchase Order", { fetch_payment_terms_template: cint(!frm.doc.ignore_default_payment_terms_template), }, function () { - frm.doc.apply_tds = frm.supplier_tds ? 1 : 0; - frm.doc.tax_withholding_category = frm.supplier_tds; frm.set_df_property("apply_tds", "read_only", frm.supplier_tds ? 0 : 1); frm.set_df_property("tax_withholding_category", "hidden", frm.supplier_tds ? 0 : 1); } diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.py b/erpnext/buying/doctype/purchase_order/purchase_order.py index 32968bc6a56..6c311953aea 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.py +++ b/erpnext/buying/doctype/purchase_order/purchase_order.py @@ -655,6 +655,8 @@ class PurchaseOrder(BuyingController): self.tax_withholding_category = tds_category self.set_onload("supplier_tds", tds_category) + super().set_missing_values(for_validate) + @frappe.request_cache def item_last_purchase_rate(name, conversion_rate, item_code, conversion_factor=1.0): From 01f30682ee9e15a51161a4f2a91681484e6ac8bf Mon Sep 17 00:00:00 2001 From: ljain112 Date: Tue, 3 Sep 2024 13:58:30 +0530 Subject: [PATCH 0109/1614] fix: consistent behaviour on refresh (cherry picked from commit b216d7127816a9b61c3ca20c645e5b78e9984be6) --- erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js | 4 ++-- erpnext/buying/doctype/purchase_order/purchase_order.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js index 54153b5c19f..2d5cbb9e6c3 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js @@ -648,8 +648,8 @@ frappe.ui.form.on("Purchase Invoice", { }, onload: function (frm) { - if (frm.doc.__onload && frm.is_new()) { - if (frm.doc.supplier) { + if (frm.doc.__onload && frm.doc.supplier) { + if (frm.is_new()) { frm.doc.apply_tds = frm.doc.__onload.supplier_tds ? 1 : 0; } if (!frm.doc.__onload.supplier_tds) { diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.js b/erpnext/buying/doctype/purchase_order/purchase_order.js index a40ef47afcf..ac2aa43f23d 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.js +++ b/erpnext/buying/doctype/purchase_order/purchase_order.js @@ -133,8 +133,8 @@ frappe.ui.form.on("Purchase Order", { frm.set_value("transaction_date", frappe.datetime.get_today()); } - if (frm.doc.__onload && frm.is_new()) { - if (frm.doc.supplier) { + if (frm.doc.__onload && frm.doc.supplier) { + if (frm.is_new()) { frm.doc.apply_tds = frm.doc.__onload.supplier_tds ? 1 : 0; } if (!frm.doc.__onload.supplier_tds) { From 7027be8fbcf51282ea470299e4edb3d9ce89dd6f Mon Sep 17 00:00:00 2001 From: ljain112 Date: Wed, 4 Sep 2024 13:57:03 +0530 Subject: [PATCH 0110/1614] fix: set tax_withholding_category from Purchase Order while creating pi form po (cherry picked from commit b9048ca6faad26837626f42a9cc475f96d4a4894) --- erpnext/buying/doctype/purchase_order/purchase_order.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.py b/erpnext/buying/doctype/purchase_order/purchase_order.py index 6c311953aea..afb43e30c7b 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.py +++ b/erpnext/buying/doctype/purchase_order/purchase_order.py @@ -769,6 +769,11 @@ def get_mapped_purchase_invoice(source_name, target_doc=None, ignore_permissions def postprocess(source, target): target.flags.ignore_permissions = ignore_permissions set_missing_values(source, target) + + # set tax_withholding_category from Purchase Order + if source.apply_tds and source.tax_withholding_category and target.apply_tds: + target.tax_withholding_category = source.tax_withholding_category + # Get the advance paid Journal Entries in Purchase Invoice Advance if target.get("allocate_advances_automatically"): target.set_advances() From 741c18b14468f29586cc9c19c293b6f6518249e1 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Tue, 10 Sep 2024 13:11:09 +0530 Subject: [PATCH 0111/1614] fix: do not auto apply tds in purchase order (cherry picked from commit 0b942a06144977a052b48d6b61daf9c61816c82d) --- erpnext/buying/doctype/purchase_order/purchase_order.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.py b/erpnext/buying/doctype/purchase_order/purchase_order.py index afb43e30c7b..14424dfdf4a 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.py +++ b/erpnext/buying/doctype/purchase_order/purchase_order.py @@ -651,8 +651,6 @@ class PurchaseOrder(BuyingController): def set_missing_values(self, for_validate=False): tds_category = frappe.db.get_value("Supplier", self.supplier, "tax_withholding_category") if tds_category and not for_validate: - self.apply_tds = 1 - self.tax_withholding_category = tds_category self.set_onload("supplier_tds", tds_category) super().set_missing_values(for_validate) From 42494db3c77db1ec590bf7e73bb89828cd06b029 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Wed, 11 Sep 2024 18:54:55 +0530 Subject: [PATCH 0112/1614] fix: hide and reset discount control on new POS order (cherry picked from commit 5b0053f8ddbb93e2f5e6921b72ea6cbccb265f5c) --- .../page/point_of_sale/pos_item_cart.js | 41 ++++++++----------- 1 file changed, 16 insertions(+), 25 deletions(-) diff --git a/erpnext/selling/page/point_of_sale/pos_item_cart.js b/erpnext/selling/page/point_of_sale/pos_item_cart.js index 694f70d4db5..b808b4f8828 100644 --- a/erpnext/selling/page/point_of_sale/pos_item_cart.js +++ b/erpnext/selling/page/point_of_sale/pos_item_cart.js @@ -389,28 +389,14 @@ erpnext.PointOfSale.ItemCart = class { placeholder: discount ? discount + "%" : __("Enter discount percentage."), input_class: "input-xs", onchange: function () { - if (flt(this.value) != 0) { - frappe.model.set_value( - frm.doc.doctype, - frm.doc.name, - "additional_discount_percentage", - flt(this.value) - ); - me.hide_discount_control(this.value); - } else { - frappe.model.set_value( - frm.doc.doctype, - frm.doc.name, - "additional_discount_percentage", - 0 - ); - me.$add_discount_elem.css({ - border: "1px dashed var(--gray-500)", - padding: "var(--padding-sm) var(--padding-md)", - }); - me.$add_discount_elem.html(`${me.get_discount_icon()} ${__("Add Discount")}`); - me.discount_field = undefined; - } + this.value = flt(this.value); + frappe.model.set_value( + frm.doc.doctype, + frm.doc.name, + "additional_discount_percentage", + flt(this.value) + ); + me.hide_discount_control(this.value); }, }, parent: this.$add_discount_elem.find(".add-discount-field"), @@ -421,9 +407,13 @@ erpnext.PointOfSale.ItemCart = class { } hide_discount_control(discount) { - if (!discount) { - this.$add_discount_elem.css({ padding: "0px", border: "none" }); - this.$add_discount_elem.html(`
`); + if (!flt(discount)) { + this.$add_discount_elem.css({ + border: "1px dashed var(--gray-500)", + padding: "var(--padding-sm) var(--padding-md)", + }); + this.$add_discount_elem.html(`${this.get_discount_icon()} ${__("Add Discount")}`); + this.discount_field = undefined; } else { this.$add_discount_elem.css({ border: "1px dashed var(--dark-green-500)", @@ -1051,6 +1041,7 @@ erpnext.PointOfSale.ItemCart = class { this.highlight_checkout_btn(false); } + this.hide_discount_control(frm.doc.additional_discount_percentage); this.update_totals_section(frm); if (frm.doc.docstatus === 1) { From d6a3d0d46835559dffb50c502bfec10d15492031 Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Mon, 16 Sep 2024 18:47:34 +0530 Subject: [PATCH 0113/1614] fix: create and link address while creating prospect & customer (cherry picked from commit 035c15794cd86407fffd2dcc89cc436ba3a3dd6a) --- erpnext/crm/frappe_crm_api.py | 43 +++++++++++++++++++++++++++++++---- 1 file changed, 39 insertions(+), 4 deletions(-) diff --git a/erpnext/crm/frappe_crm_api.py b/erpnext/crm/frappe_crm_api.py index 40c0ce8c9c1..53f58ed57eb 100644 --- a/erpnext/crm/frappe_crm_api.py +++ b/erpnext/crm/frappe_crm_api.py @@ -61,6 +61,7 @@ def create_prospect_against_crm_deal(): pass create_contacts(json.loads(doc.contacts), prospect.company_name, "Prospect", prospect_name) + create_address("Prospect", prospect_name, doc.address) frappe.response["message"] = prospect_name @@ -86,17 +87,49 @@ def create_contacts(contacts, organization=None, link_doctype=None, link_docname if c.get("mobile_no"): contact.append("phone_nos", {"phone": c.get("mobile_no"), "is_primary_mobile_no": 1}) - link_contact_to_prospect(contact, link_doctype, link_docname) + link_doc(contact, link_doctype, link_docname) contact.save(ignore_permissions=True) -def link_contact_to_prospect(contact, link_doctype, link_docname): +def create_address(doctype, docname, address): + if not address: + return + try: + _address = frappe.db.exists("Address", address.get("name")) + if not _address: + new_address_doc = frappe.new_doc("Address") + for field in [ + "address_title", + "address_type", + "address_line1", + "address_line2", + "city", + "state", + "pincode", + "country", + ]: + if address.get(field): + new_address_doc.set(field, address.get(field)) + + new_address_doc.append("links", {"link_doctype": doctype, "link_name": docname}) + new_address_doc.insert(ignore_mandatory=True) + return new_address_doc.name + else: + address = frappe.get_doc("Address", _address) + link_doc(address, doctype, docname) + address.save(ignore_permissions=True) + return address.name + except Exception: + frappe.log_error(frappe.get_traceback(), f"Error while creating address for {docname}") + + +def link_doc(doc, link_doctype, link_docname): already_linked = any( - [(link.link_doctype == link_doctype and link.link_name == link_docname) for link in contact.links] + [(link.link_doctype == link_doctype and link.link_name == link_docname) for link in doc.links] ) if not already_linked: - contact.append( + doc.append( "links", {"link_doctype": link_doctype, "link_name": link_docname, "link_title": link_docname} ) @@ -130,6 +163,8 @@ def create_customer(customer_data=None): contacts = json.loads(customer_data.get("contacts")) create_contacts(contacts, customer_name, "Customer", customer_name) + create_address("Customer", customer_name, customer_data.get("address")) + return customer_name except Exception: frappe.log_error(frappe.get_traceback(), "Error while creating customer against Frappe CRM Deal") pass From c5051561e4eb14374e85245c1068e807ef8b15a0 Mon Sep 17 00:00:00 2001 From: Khushi Rawat <142375893+khushi8112@users.noreply.github.com> Date: Mon, 16 Sep 2024 12:35:35 +0530 Subject: [PATCH 0114/1614] fix: do not validate purchase document for composite asset (cherry picked from commit 5fd058dde9c5afe1e8b3148ac22bcf5f28aa5023) --- erpnext/assets/doctype/asset/asset.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/assets/doctype/asset/asset.py b/erpnext/assets/doctype/asset/asset.py index 58f813247f0..6c77a1b9b0e 100644 --- a/erpnext/assets/doctype/asset/asset.py +++ b/erpnext/assets/doctype/asset/asset.py @@ -623,6 +623,9 @@ class Asset(AccountsController): return records def validate_make_gl_entry(self): + if self.is_composite_asset: + return True + purchase_document = self.get_purchase_document() if not purchase_document: return False From f7cedac5260d832aa6b95b9f0341c94d7ccd6203 Mon Sep 17 00:00:00 2001 From: Navin-S-R Date: Sat, 14 Sep 2024 17:39:50 +0530 Subject: [PATCH 0115/1614] fix(ux): set amount based on account currency while adding new row (cherry picked from commit 0ff04f774d5e54ce83e239896e7ab51d083021fe) --- erpnext/accounts/doctype/journal_entry/journal_entry.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.js b/erpnext/accounts/doctype/journal_entry/journal_entry.js index 999db883e98..faa38763b80 100644 --- a/erpnext/accounts/doctype/journal_entry/journal_entry.js +++ b/erpnext/accounts/doctype/journal_entry/journal_entry.js @@ -360,21 +360,23 @@ erpnext.accounts.JournalEntry = class JournalEntry extends frappe.ui.form.Contro accounts_add(doc, cdt, cdn) { var row = frappe.get_doc(cdt, cdn); + row.exchange_rate = 1; $.each(doc.accounts, function (i, d) { if (d.account && d.party && d.party_type) { row.account = d.account; row.party = d.party; row.party_type = d.party_type; + row.exchange_rate = d.exchange_rate; } }); // set difference if (doc.difference) { if (doc.difference > 0) { - row.credit_in_account_currency = doc.difference; + row.credit_in_account_currency = doc.difference / row.exchange_rate; row.credit = doc.difference; } else { - row.debit_in_account_currency = -doc.difference; + row.debit_in_account_currency = -doc.difference / row.exchange_rate; row.debit = -doc.difference; } } From dea735de4df2ca427fce8803d3d4f8acdc89c789 Mon Sep 17 00:00:00 2001 From: "lukas.brandhoff" Date: Wed, 28 Aug 2024 09:17:28 +0000 Subject: [PATCH 0116/1614] fix: A project without tasks should be able to complete (cherry picked from commit 268962c25f0571ded4c46c381906c870df6aab91) --- erpnext/projects/doctype/project/project.py | 7 +++++ .../projects/doctype/project/test_project.py | 28 +++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/erpnext/projects/doctype/project/project.py b/erpnext/projects/doctype/project/project.py index b09735e5644..7870a2ace73 100644 --- a/erpnext/projects/doctype/project/project.py +++ b/erpnext/projects/doctype/project/project.py @@ -213,6 +213,13 @@ class Project(Document): frappe.db.set_value("Sales Order", {"project": self.name}, "project", "") def update_percent_complete(self): + if self.status == "Completed": + if ( + len(frappe.get_all("Task", dict(project=self.name))) == 0 + ): # A project without tasks should be able to complete + self.percent_complete_method = "Manual" + self.percent_complete = 100 + if self.percent_complete_method == "Manual": if self.status == "Completed": self.percent_complete = 100 diff --git a/erpnext/projects/doctype/project/test_project.py b/erpnext/projects/doctype/project/test_project.py index 1b7460f7a2a..f7140c211e0 100644 --- a/erpnext/projects/doctype/project/test_project.py +++ b/erpnext/projects/doctype/project/test_project.py @@ -199,6 +199,34 @@ class TestProject(FrappeTestCase): if not pt.is_group: self.assertIsNotNone(pt.parent_task) + def test_project_having_no_tasks_complete(self): + project_name = "Test Project - No Tasks Completion" + frappe.db.sql(""" delete from tabTask where project = %s """, project_name) + frappe.delete_doc("Project", project_name) + + project = frappe.get_doc( + dict( + doctype="Project", + project_name=project_name, + status="Open", + expected_start_date=nowdate(), + company="_Test Company", + ) + ).insert() + + tasks = frappe.get_all( + "Task", + ["subject", "exp_end_date", "depends_on_tasks", "name", "parent_task"], + dict(project=project.name), + order_by="creation asc", + ) + + self.assertEqual(project.status, "Open") + self.assertEqual(len(tasks), 0) + project.status = "Completed" + project.save() + self.assertEqual(project.status, "Completed") + def get_project(name, template): project = frappe.get_doc( From c9b6b0d8683ef2328ba7892b295c3ca05256cd94 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 16 Sep 2024 11:14:54 +0530 Subject: [PATCH 0117/1614] refactor(test): fix linter (cherry picked from commit 4eeae8011ea51dc5621cef302255c2b54da1537a) --- erpnext/projects/doctype/project/test_project.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/erpnext/projects/doctype/project/test_project.py b/erpnext/projects/doctype/project/test_project.py index f7140c211e0..e5996c2da9d 100644 --- a/erpnext/projects/doctype/project/test_project.py +++ b/erpnext/projects/doctype/project/test_project.py @@ -205,13 +205,13 @@ class TestProject(FrappeTestCase): frappe.delete_doc("Project", project_name) project = frappe.get_doc( - dict( - doctype="Project", - project_name=project_name, - status="Open", - expected_start_date=nowdate(), - company="_Test Company", - ) + { + "doctype": "Project", + "project_name": project_name, + "status": "Open", + "expected_start_date": nowdate(), + "company": "_Test Company", + } ).insert() tasks = frappe.get_all( From 28f1f9355da9ad92733de78a141571c404755be1 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Tue, 17 Sep 2024 05:00:07 +0000 Subject: [PATCH 0118/1614] chore(release): Bumped to Version 15.35.2 ## [15.35.2](https://github.com/frappe/erpnext/compare/v15.35.1...v15.35.2) (2024-09-17) ### Bug Fixes * currency changing while making PO from Supplier Quotation (backport [#43187](https://github.com/frappe/erpnext/issues/43187)) ([#43205](https://github.com/frappe/erpnext/issues/43205)) ([2f56ba7](https://github.com/frappe/erpnext/commit/2f56ba7f428488c8a94160941df9c4d309dee5eb)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 50acf5dd033..8d6e2cc0d18 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.35.1" +__version__ = "15.35.2" def get_default_company(user=None): From 291f0a580be176a4c87c03e54372dd7a7cca9cb1 Mon Sep 17 00:00:00 2001 From: Dany Robert Date: Thu, 12 Sep 2024 09:18:19 +0000 Subject: [PATCH 0119/1614] fix: invalid gp calculation (cherry picked from commit c79851239cf3fa663dff2e10a5d5738e7bfa7abf) --- erpnext/controllers/selling_controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/controllers/selling_controller.py b/erpnext/controllers/selling_controller.py index 766e67be0f6..7ad12b54eff 100644 --- a/erpnext/controllers/selling_controller.py +++ b/erpnext/controllers/selling_controller.py @@ -640,7 +640,7 @@ class SellingController(StockController): if self.doctype in ["Sales Order", "Quotation"]: for item in self.items: item.gross_profit = flt( - ((item.base_rate - flt(item.valuation_rate)) * item.stock_qty), + ((flt(item.stock_uom_rate) - flt(item.valuation_rate)) * item.stock_qty), self.precision("amount", item), ) From 86e1818420a3152cf47ef65943216c6a9bd0d29e Mon Sep 17 00:00:00 2001 From: Navin-S-R Date: Sat, 14 Sep 2024 15:58:02 +0530 Subject: [PATCH 0120/1614] fix: map rows on journal entry by validating account, party, debit and credit value (cherry picked from commit b634aa9cfb60f78531da4a02efec458a3d294a78) --- erpnext/controllers/accounts_controller.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 92efa5168f3..b35be7950fd 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -3535,6 +3535,13 @@ def check_if_child_table_updated(child_table_before_update, child_table_after_up # Check if any field affecting accounting entry is altered for index, item in enumerate(child_table_before_update): + if item.parenttype == "Journal Entry" and any( + [ + child_table_after_update[index].get(i) != item.get(i) + for i in ["account", "party_type", "party", "debit", "credit"] + ] + ): + continue for field in fields_to_check: if child_table_after_update[index].get(field) != item.get(field): return True From 310b1314698710c1f82c820cdf6a78aaaebe5fdc Mon Sep 17 00:00:00 2001 From: Navin-S-R Date: Sat, 14 Sep 2024 17:31:53 +0530 Subject: [PATCH 0121/1614] test: reconcile payment jv from closed fiscal year (cherry picked from commit f47ea468066c25db8d6765205733e549c6dce190) --- .../test_payment_reconciliation.py | 162 +++++++++++++++++- 1 file changed, 161 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/payment_reconciliation/test_payment_reconciliation.py b/erpnext/accounts/doctype/payment_reconciliation/test_payment_reconciliation.py index 5aa411158a8..65d7d42ef3d 100644 --- a/erpnext/accounts/doctype/payment_reconciliation/test_payment_reconciliation.py +++ b/erpnext/accounts/doctype/payment_reconciliation/test_payment_reconciliation.py @@ -5,7 +5,7 @@ import frappe from frappe import qb from frappe.tests.utils import FrappeTestCase, change_settings -from frappe.utils import add_days, flt, nowdate +from frappe.utils import add_days, flt, getdate, nowdate, today from erpnext import get_default_cost_center from erpnext.accounts.doctype.payment_entry.payment_entry import get_payment_entry @@ -13,6 +13,7 @@ from erpnext.accounts.doctype.payment_entry.test_payment_entry import create_pay from erpnext.accounts.doctype.purchase_invoice.test_purchase_invoice import make_purchase_invoice from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice from erpnext.accounts.party import get_party_account +from erpnext.accounts.utils import get_fiscal_year from erpnext.buying.doctype.purchase_order.test_purchase_order import create_purchase_order from erpnext.stock.doctype.item.test_item import create_item @@ -1845,6 +1846,107 @@ class TestPaymentReconciliation(FrappeTestCase): self.assertEqual(len(pr.invoices), 1) self.assertEqual(len(pr.payments), 1) + def test_reconciliation_on_closed_period_payment(self): + from erpnext.accounts.doctype.account.test_account import create_account + + self.create_company() + self.create_cost_center() + + # create bank account + parent_account = frappe.db.get_value( + "Account", {"company": self.company, "account_name": "Bank Accounts", "is_group": 1}, "name" + ) + bank_account = create_account( + account_name="Bank Account", + account_type="Bank", + is_group=0, + company=self.company, + root_type="Asset", + report_type="Balance Sheet", + account_currency="INR", + parent_account=parent_account, + doctype="Account", + ) + + # create backdated fiscal year + create_fiscal_year(company=self.company, year_start_date="1990-04-01", year_end_date="1991-03-31") + + # make journal entry for previous year + je_1 = frappe.new_doc("Journal Entry") + je_1.posting_date = "1990-06-01" + je_1.company = self.company + je_1.user_remark = "test" + je_1.set( + "accounts", + [ + { + "account": self.debit_to, + "cost_center": self.cost_center, + "party_type": "Customer", + "party": self.customer, + "debit_in_account_currency": 0, + "credit_in_account_currency": 1000, + }, + { + "account": bank_account, + "cost_center": self.sub_cc, + "credit_in_account_currency": 0, + "debit_in_account_currency": 500, + }, + { + "account": "Cash - _PR", + "cost_center": self.sub_cc, + "credit_in_account_currency": 0, + "debit_in_account_currency": 500, + }, + ], + ) + je_1.save() + je_1.submit() + je_1.reload() + # check journal entry is submitted + self.assertTrue(je_1.docstatus == 1) + + # make period closing voucher + pcv = make_period_closing_voucher( + company=self.company, cost_center=self.cost_center, posting_date="1991-03-31" + ) + pcv.reload() + # check if period closing voucher is completed + self.assertEqual(pcv.gle_processing_status, "Completed") + + # make journal entry for active year + je_2 = self.create_journal_entry( + acc1=self.debit_to, acc2=self.income_account, amount=1000, posting_date=today() + ) + je_2.accounts[0].party_type = "Customer" + je_2.accounts[0].party = self.customer + je_2.save() + je_2.submit() + je_2.reload() + # check journal entry is submitted + self.assertTrue(je_2.docstatus == 1) + + # process reconciliation on closed period payment + pr = self.create_payment_reconciliation(party_is_customer=True) + pr.from_invoice_date = pr.to_invoice_date = pr.from_payment_date = pr.to_payment_date = None + pr.get_unreconciled_entries() + invoices = [invoice.as_dict() for invoice in pr.invoices] + payments = [payment.as_dict() for payment in pr.payments] + pr.allocate_entries(frappe._dict({"invoices": invoices, "payments": payments})) + pr.reconcile() + je_1.reload() + je_2.reload() + + # check whether the payment reconciliation is done on the closed period + self.assertEqual(pr.get("invoices"), []) + self.assertEqual(pr.get("payments"), []) + + # cancel created entires during test + pcv.cancel() + je_1.cancel() + je_2.cancel() + def make_customer(customer_name, currency=None): if not frappe.db.exists("Customer", customer_name): @@ -1872,3 +1974,61 @@ def make_supplier(supplier_name, currency=None): return supplier.name else: return supplier_name + + +def create_fiscal_year(company, year_start_date, year_end_date): + fy_docname = frappe.db.exists( + "Fiscal Year", {"year_start_date": year_start_date, "year_end_date": year_end_date} + ) + if not fy_docname: + fy_doc = frappe.get_doc( + { + "doctype": "Fiscal Year", + "year": f"{getdate(year_start_date).year}-{getdate(year_end_date).year}", + "year_start_date": year_start_date, + "year_end_date": year_end_date, + "companies": [{"company": company}], + } + ).save() + return fy_doc + else: + fy_doc = frappe.get_doc("Fiscal Year", fy_docname) + if not frappe.db.exists("Fiscal Year Company", {"parent": fy_docname, "company": company}): + fy_doc.append("companies", {"company": company}) + fy_doc.save() + return fy_doc + + +def make_period_closing_voucher(company, cost_center, posting_date=None, submit=True): + from erpnext.accounts.doctype.account.test_account import create_account + + parent_account = frappe.db.get_value( + "Account", {"company": company, "account_name": "Current Liabilities", "is_group": 1}, "name" + ) + surplus_account = create_account( + account_name="Reserve and Surplus", + is_group=0, + company=company, + root_type="Liability", + report_type="Balance Sheet", + account_currency="INR", + parent_account=parent_account, + doctype="Account", + ) + pcv = frappe.get_doc( + { + "doctype": "Period Closing Voucher", + "transaction_date": posting_date or today(), + "posting_date": posting_date or today(), + "company": company, + "fiscal_year": get_fiscal_year(today(), company=company)[0], + "cost_center": cost_center, + "closing_account_head": surplus_account, + "remarks": "test", + } + ) + pcv.insert() + if submit: + pcv.submit() + + return pcv From d91013a46707095f62a009a2fbdcf84bd1303c62 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 17 Sep 2024 14:38:26 +0530 Subject: [PATCH 0122/1614] fix: ignore repost logic on Payment Reconciliation (cherry picked from commit 75babd4c18fc555046750a2b640d0ac1f4f435bd) --- erpnext/accounts/doctype/journal_entry/journal_entry.py | 5 +++++ erpnext/accounts/utils.py | 2 ++ erpnext/controllers/accounts_controller.py | 7 ------- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.py b/erpnext/accounts/doctype/journal_entry/journal_entry.py index 6adc8be3f7d..593fa48e856 100644 --- a/erpnext/accounts/doctype/journal_entry/journal_entry.py +++ b/erpnext/accounts/doctype/journal_entry/journal_entry.py @@ -195,6 +195,11 @@ class JournalEntry(AccountsController): self.update_booked_depreciation() def on_update_after_submit(self): + # Flag will be set on Reconciliation + # Reconciliation tool will anyways repost ledger entries. So, no need to check and do implicit repost. + if self.flags.get("ignore_reposting_on_reconciliation"): + return + self.needs_repost = self.check_if_fields_updated(fields_to_check=[], child_tables={"accounts": []}) if self.needs_repost: self.validate_for_repost() diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py index 32eeb1e07a6..8e47ddc3652 100644 --- a/erpnext/accounts/utils.py +++ b/erpnext/accounts/utils.py @@ -665,6 +665,8 @@ def update_reference_in_journal_entry(d, journal_entry, do_not_save=False): # will work as update after submit journal_entry.flags.ignore_validate_update_after_submit = True + # Ledgers will be reposted by Reconciliation tool + journal_entry.flags.ignore_reposting_on_reconciliation = True if not do_not_save: journal_entry.save(ignore_permissions=True) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index b35be7950fd..92efa5168f3 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -3535,13 +3535,6 @@ def check_if_child_table_updated(child_table_before_update, child_table_after_up # Check if any field affecting accounting entry is altered for index, item in enumerate(child_table_before_update): - if item.parenttype == "Journal Entry" and any( - [ - child_table_after_update[index].get(i) != item.get(i) - for i in ["account", "party_type", "party", "debit", "credit"] - ] - ): - continue for field in fields_to_check: if child_table_after_update[index].get(field) != item.get(field): return True From 861edb438bb11e246c2eb9f8e1953a84bcdb0461 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 17 Sep 2024 16:49:03 +0530 Subject: [PATCH 0123/1614] refactor(test): make use existing test data and dynamic fy creation (cherry picked from commit f45638015f8bce4efe7cea3f0035c060d42a3426) --- .../test_payment_reconciliation.py | 51 +++++-------------- 1 file changed, 13 insertions(+), 38 deletions(-) diff --git a/erpnext/accounts/doctype/payment_reconciliation/test_payment_reconciliation.py b/erpnext/accounts/doctype/payment_reconciliation/test_payment_reconciliation.py index 65d7d42ef3d..b229c9c2c40 100644 --- a/erpnext/accounts/doctype/payment_reconciliation/test_payment_reconciliation.py +++ b/erpnext/accounts/doctype/payment_reconciliation/test_payment_reconciliation.py @@ -1849,31 +1849,19 @@ class TestPaymentReconciliation(FrappeTestCase): def test_reconciliation_on_closed_period_payment(self): from erpnext.accounts.doctype.account.test_account import create_account - self.create_company() - self.create_cost_center() - - # create bank account - parent_account = frappe.db.get_value( - "Account", {"company": self.company, "account_name": "Bank Accounts", "is_group": 1}, "name" - ) - bank_account = create_account( - account_name="Bank Account", - account_type="Bank", - is_group=0, - company=self.company, - root_type="Asset", - report_type="Balance Sheet", - account_currency="INR", - parent_account=parent_account, - doctype="Account", - ) + # Get current fiscal year + current_fy_start_date = get_fiscal_year(today())[1] # create backdated fiscal year - create_fiscal_year(company=self.company, year_start_date="1990-04-01", year_end_date="1991-03-31") + prev_fy_start_date = add_days(current_fy_start_date, -366) + prev_fy_end_date = add_days(current_fy_start_date, -1) + create_fiscal_year( + company=self.company, year_start_date=prev_fy_start_date, year_end_date=prev_fy_end_date + ) # make journal entry for previous year je_1 = frappe.new_doc("Journal Entry") - je_1.posting_date = "1990-06-01" + je_1.posting_date = add_days(prev_fy_start_date, 20) je_1.company = self.company je_1.user_remark = "test" je_1.set( @@ -1888,28 +1876,24 @@ class TestPaymentReconciliation(FrappeTestCase): "credit_in_account_currency": 1000, }, { - "account": bank_account, - "cost_center": self.sub_cc, + "account": self.bank, + "cost_center": self.sub_cc.name, "credit_in_account_currency": 0, "debit_in_account_currency": 500, }, { - "account": "Cash - _PR", - "cost_center": self.sub_cc, + "account": self.cash, + "cost_center": self.sub_cc.name, "credit_in_account_currency": 0, "debit_in_account_currency": 500, }, ], ) - je_1.save() je_1.submit() - je_1.reload() - # check journal entry is submitted - self.assertTrue(je_1.docstatus == 1) # make period closing voucher pcv = make_period_closing_voucher( - company=self.company, cost_center=self.cost_center, posting_date="1991-03-31" + company=self.company, cost_center=self.cost_center, posting_date=prev_fy_end_date ) pcv.reload() # check if period closing voucher is completed @@ -1921,11 +1905,7 @@ class TestPaymentReconciliation(FrappeTestCase): ) je_2.accounts[0].party_type = "Customer" je_2.accounts[0].party = self.customer - je_2.save() je_2.submit() - je_2.reload() - # check journal entry is submitted - self.assertTrue(je_2.docstatus == 1) # process reconciliation on closed period payment pr = self.create_payment_reconciliation(party_is_customer=True) @@ -1942,11 +1922,6 @@ class TestPaymentReconciliation(FrappeTestCase): self.assertEqual(pr.get("invoices"), []) self.assertEqual(pr.get("payments"), []) - # cancel created entires during test - pcv.cancel() - je_1.cancel() - je_2.cancel() - def make_customer(customer_name, currency=None): if not frappe.db.exists("Customer", customer_name): From edcdfdd194be8d84b5009c18f725868a7bb572d9 Mon Sep 17 00:00:00 2001 From: Navin-S-R Date: Tue, 17 Sep 2024 17:21:26 +0530 Subject: [PATCH 0124/1614] refactor: update formatting changes (cherry picked from commit 768bb0312aae3ad67191778f09fe75f4c914a019) --- .../payment_reconciliation/test_payment_reconciliation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/payment_reconciliation/test_payment_reconciliation.py b/erpnext/accounts/doctype/payment_reconciliation/test_payment_reconciliation.py index b229c9c2c40..f317f3399db 100644 --- a/erpnext/accounts/doctype/payment_reconciliation/test_payment_reconciliation.py +++ b/erpnext/accounts/doctype/payment_reconciliation/test_payment_reconciliation.py @@ -1996,7 +1996,7 @@ def make_period_closing_voucher(company, cost_center, posting_date=None, submit= "transaction_date": posting_date or today(), "posting_date": posting_date or today(), "company": company, - "fiscal_year": get_fiscal_year(today(), company=company)[0], + "fiscal_year": get_fiscal_year(posting_date or today(), company=company)[0], "cost_center": cost_center, "closing_account_head": surplus_account, "remarks": "test", From 78768f883c09ec91de2dfee101923808ccd6fa55 Mon Sep 17 00:00:00 2001 From: Navin-S-R Date: Tue, 17 Sep 2024 18:55:28 +0530 Subject: [PATCH 0125/1614] fix: create fiscal year without overlapping existing Fiscal Years (cherry picked from commit 720a330617c7cb5410bee715dbb4a4111af879f7) --- .../test_payment_reconciliation.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/erpnext/accounts/doctype/payment_reconciliation/test_payment_reconciliation.py b/erpnext/accounts/doctype/payment_reconciliation/test_payment_reconciliation.py index f317f3399db..883c638398c 100644 --- a/erpnext/accounts/doctype/payment_reconciliation/test_payment_reconciliation.py +++ b/erpnext/accounts/doctype/payment_reconciliation/test_payment_reconciliation.py @@ -5,7 +5,7 @@ import frappe from frappe import qb from frappe.tests.utils import FrappeTestCase, change_settings -from frappe.utils import add_days, flt, getdate, nowdate, today +from frappe.utils import add_days, add_years, flt, getdate, nowdate, today from erpnext import get_default_cost_center from erpnext.accounts.doctype.payment_entry.payment_entry import get_payment_entry @@ -1847,14 +1847,10 @@ class TestPaymentReconciliation(FrappeTestCase): self.assertEqual(len(pr.payments), 1) def test_reconciliation_on_closed_period_payment(self): - from erpnext.accounts.doctype.account.test_account import create_account - - # Get current fiscal year - current_fy_start_date = get_fiscal_year(today())[1] - # create backdated fiscal year - prev_fy_start_date = add_days(current_fy_start_date, -366) - prev_fy_end_date = add_days(current_fy_start_date, -1) + first_fy_start_date = frappe.db.get_value("Fiscal Year", {"disabled": 0}, "min(year_start_date)") + prev_fy_start_date = add_years(first_fy_start_date, -1) + prev_fy_end_date = add_days(first_fy_start_date, -1) create_fiscal_year( company=self.company, year_start_date=prev_fy_start_date, year_end_date=prev_fy_end_date ) From 78c68397d9a5147970f4b19435c5352ced2a6a44 Mon Sep 17 00:00:00 2001 From: Khushi Rawat <142375893+khushi8112@users.noreply.github.com> Date: Fri, 13 Sep 2024 13:26:21 +0530 Subject: [PATCH 0126/1614] fix: updated filtering in depreciation and balances report (cherry picked from commit 3a34eecdcfe394d336cd5abd1734ff701eac32b5) --- .../asset_depreciations_and_balances.py | 58 +++++++++++++++---- 1 file changed, 46 insertions(+), 12 deletions(-) diff --git a/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.py b/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.py index 34cced2ca17..caddaf91f82 100644 --- a/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.py +++ b/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.py @@ -232,9 +232,14 @@ def get_group_by_asset_data(filters): def get_assets_for_grouped_by_category(filters): condition = "" if filters.get("asset_category"): - condition = " and a.asset_category = '{}'".format(filters.get("asset_category")) + condition = f" and a.asset_category = '{filters.get('asset_category')}'" + finance_book_filter = "" + if filters.get("finance_book"): + finance_book_filter += " and ifnull(gle.finance_book, '')=%(finance_book)s" + condition += " and exists (select 1 from `tabAsset Depreciation Schedule` ads where ads.asset = a.name and ads.finance_book = %(finance_book)s)" + return frappe.db.sql( - """ + f""" SELECT results.asset_category, sum(results.accumulated_depreciation_as_on_from_date) as accumulated_depreciation_as_on_from_date, sum(results.depreciation_eliminated_during_the_period) as depreciation_eliminated_during_the_period, @@ -264,7 +269,14 @@ def get_assets_for_grouped_by_category(filters): aca.parent = a.asset_category and aca.company_name = %(company)s join `tabCompany` company on company.name = %(company)s - where a.docstatus=1 and a.company=%(company)s and a.purchase_date <= %(to_date)s and gle.debit != 0 and gle.is_cancelled = 0 and gle.account = ifnull(aca.depreciation_expense_account, company.depreciation_expense_account) {0} + where + a.docstatus=1 + and a.company=%(company)s + and a.purchase_date <= %(to_date)s + and gle.debit != 0 + and gle.is_cancelled = 0 + and gle.account = ifnull(aca.depreciation_expense_account, company.depreciation_expense_account) + {condition} {finance_book_filter} group by a.asset_category union SELECT a.asset_category, @@ -280,11 +292,16 @@ def get_assets_for_grouped_by_category(filters): end), 0) as depreciation_eliminated_during_the_period, 0 as depreciation_amount_during_the_period from `tabAsset` a - where a.docstatus=1 and a.company=%(company)s and a.purchase_date <= %(to_date)s {0} + where a.docstatus=1 and a.company=%(company)s and a.purchase_date <= %(to_date)s {condition} group by a.asset_category) as results group by results.asset_category - """.format(condition), - {"to_date": filters.to_date, "from_date": filters.from_date, "company": filters.company}, + """, + { + "to_date": filters.to_date, + "from_date": filters.from_date, + "company": filters.company, + "finance_book": filters.get("finance_book", ""), + }, as_dict=1, ) @@ -292,9 +309,14 @@ def get_assets_for_grouped_by_category(filters): def get_assets_for_grouped_by_asset(filters): condition = "" if filters.get("asset"): - condition = " and a.name = '{}'".format(filters.get("asset")) + condition = f" and a.name = '{filters.get('asset')}'" + finance_book_filter = "" + if filters.get("finance_book"): + finance_book_filter += " and ifnull(gle.finance_book, '')=%(finance_book)s" + condition += " and exists (select 1 from `tabAsset Depreciation Schedule` ads where ads.asset = a.name and ads.finance_book = %(finance_book)s)" + return frappe.db.sql( - """ + f""" SELECT results.name as asset, sum(results.accumulated_depreciation_as_on_from_date) as accumulated_depreciation_as_on_from_date, sum(results.depreciation_eliminated_during_the_period) as depreciation_eliminated_during_the_period, @@ -324,7 +346,14 @@ def get_assets_for_grouped_by_asset(filters): aca.parent = a.asset_category and aca.company_name = %(company)s join `tabCompany` company on company.name = %(company)s - where a.docstatus=1 and a.company=%(company)s and a.purchase_date <= %(to_date)s and gle.debit != 0 and gle.is_cancelled = 0 and gle.account = ifnull(aca.depreciation_expense_account, company.depreciation_expense_account) {0} + where + a.docstatus=1 + and a.company=%(company)s + and a.purchase_date <= %(to_date)s + and gle.debit != 0 + and gle.is_cancelled = 0 + and gle.account = ifnull(aca.depreciation_expense_account, company.depreciation_expense_account) + {finance_book_filter} {condition} group by a.name union SELECT a.name as name, @@ -340,11 +369,16 @@ def get_assets_for_grouped_by_asset(filters): end), 0) as depreciation_eliminated_during_the_period, 0 as depreciation_amount_during_the_period from `tabAsset` a - where a.docstatus=1 and a.company=%(company)s and a.purchase_date <= %(to_date)s {0} + where a.docstatus=1 and a.company=%(company)s and a.purchase_date <= %(to_date)s {condition} group by a.name) as results group by results.name - """.format(condition), - {"to_date": filters.to_date, "from_date": filters.from_date, "company": filters.company}, + """, + { + "to_date": filters.to_date, + "from_date": filters.from_date, + "company": filters.company, + "finance_book": filters.get("finance_book", ""), + }, as_dict=1, ) From 1e89c007ed8d6e38f8b3b9d8bcc2c1690599b25b Mon Sep 17 00:00:00 2001 From: Khushi Rawat <142375893+khushi8112@users.noreply.github.com> Date: Fri, 13 Sep 2024 14:45:29 +0530 Subject: [PATCH 0127/1614] chore: resolved linter check with #nosemgrep (cherry picked from commit 8c8e25214c3042346d8e31514b27f48089ce2948) --- .../asset_depreciations_and_balances.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.py b/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.py index caddaf91f82..2d80808a7e6 100644 --- a/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.py +++ b/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.py @@ -238,6 +238,7 @@ def get_assets_for_grouped_by_category(filters): finance_book_filter += " and ifnull(gle.finance_book, '')=%(finance_book)s" condition += " and exists (select 1 from `tabAsset Depreciation Schedule` ads where ads.asset = a.name and ads.finance_book = %(finance_book)s)" + # nosemgrep return frappe.db.sql( f""" SELECT results.asset_category, @@ -306,6 +307,7 @@ def get_assets_for_grouped_by_category(filters): ) +# nosemgrep def get_assets_for_grouped_by_asset(filters): condition = "" if filters.get("asset"): From 4ba37e49d8eee249b9f33255c82a5390625af158 Mon Sep 17 00:00:00 2001 From: Khushi Rawat <142375893+khushi8112@users.noreply.github.com> Date: Fri, 13 Sep 2024 14:49:01 +0530 Subject: [PATCH 0128/1614] chore: resolved failing check (cherry picked from commit af52f0e71fa992f89b55795eb14f12e125e56720) --- .../asset_depreciations_and_balances.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.py b/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.py index 2d80808a7e6..b288e8e5ac7 100644 --- a/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.py +++ b/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.py @@ -307,7 +307,6 @@ def get_assets_for_grouped_by_category(filters): ) -# nosemgrep def get_assets_for_grouped_by_asset(filters): condition = "" if filters.get("asset"): @@ -317,6 +316,7 @@ def get_assets_for_grouped_by_asset(filters): finance_book_filter += " and ifnull(gle.finance_book, '')=%(finance_book)s" condition += " and exists (select 1 from `tabAsset Depreciation Schedule` ads where ads.asset = a.name and ads.finance_book = %(finance_book)s)" + # nosemgrep return frappe.db.sql( f""" SELECT results.name as asset, From 0fe901a137c1b4d3ab5caee046ad4cc8911d7444 Mon Sep 17 00:00:00 2001 From: venkat102 Date: Fri, 13 Sep 2024 16:48:32 +0530 Subject: [PATCH 0129/1614] fix: fetch cost center allocation percentage only from the applicable allocation (cherry picked from commit 36e5945c667595811688bd9eeaa07af9ecc5ab08) --- erpnext/accounts/general_ledger.py | 63 ++++++++++++++++-------------- 1 file changed, 33 insertions(+), 30 deletions(-) diff --git a/erpnext/accounts/general_ledger.py b/erpnext/accounts/general_ledger.py index a4d128a5845..ad8cc97e101 100644 --- a/erpnext/accounts/general_ledger.py +++ b/erpnext/accounts/general_ledger.py @@ -179,50 +179,53 @@ def process_gl_map(gl_map, merge_entries=True, precision=None): def distribute_gl_based_on_cost_center_allocation(gl_map, precision=None): - cost_center_allocation = get_cost_center_allocation_data(gl_map[0]["company"], gl_map[0]["posting_date"]) - if not cost_center_allocation: - return gl_map - new_gl_map = [] for d in gl_map: cost_center = d.get("cost_center") # Validate budget against main cost center validate_expense_against_budget(d, expense_amount=flt(d.debit, precision) - flt(d.credit, precision)) - - if cost_center and cost_center_allocation.get(cost_center): - for sub_cost_center, percentage in cost_center_allocation.get(cost_center, {}).items(): - gle = copy.deepcopy(d) - gle.cost_center = sub_cost_center - for field in ("debit", "credit", "debit_in_account_currency", "credit_in_account_currency"): - gle[field] = flt(flt(d.get(field)) * percentage / 100, precision) - new_gl_map.append(gle) - else: + cost_center_allocation = get_cost_center_allocation_data( + gl_map[0]["company"], gl_map[0]["posting_date"], cost_center + ) + if not cost_center_allocation: new_gl_map.append(d) + continue + + for sub_cost_center, percentage in cost_center_allocation: + gle = copy.deepcopy(d) + gle.cost_center = sub_cost_center + for field in ("debit", "credit", "debit_in_account_currency", "credit_in_account_currency"): + gle[field] = flt(flt(d.get(field)) * percentage / 100, precision) + new_gl_map.append(gle) return new_gl_map -def get_cost_center_allocation_data(company, posting_date): - par = frappe.qb.DocType("Cost Center Allocation") - child = frappe.qb.DocType("Cost Center Allocation Percentage") +def get_cost_center_allocation_data(company, posting_date, cost_center): + cost_center_allocation = frappe.db.get_value( + "Cost Center Allocation", + { + "docstatus": 1, + "company": company, + "valid_from": ("<=", posting_date), + "main_cost_center": cost_center, + }, + pluck="name", + order_by="valid_from desc", + ) - records = ( - frappe.qb.from_(par) - .inner_join(child) - .on(par.name == child.parent) - .select(par.main_cost_center, child.cost_center, child.percentage) - .where(par.docstatus == 1) - .where(par.company == company) - .where(par.valid_from <= posting_date) - .orderby(par.valid_from, order=frappe.qb.desc) - ).run(as_dict=True) + if not cost_center_allocation: + return [] - cc_allocation = frappe._dict() - for d in records: - cc_allocation.setdefault(d.main_cost_center, frappe._dict()).setdefault(d.cost_center, d.percentage) + records = frappe.db.get_all( + "Cost Center Allocation Percentage", + {"parent": cost_center_allocation}, + ["cost_center", "percentage"], + as_list=True, + ) - return cc_allocation + return records def merge_similar_entries(gl_map, precision=None): From 52a161f076b26cbf46811fbf14eff18072657422 Mon Sep 17 00:00:00 2001 From: venkat102 Date: Fri, 13 Sep 2024 16:54:29 +0530 Subject: [PATCH 0130/1614] test: add unit test for validating multiple cost center allocation with different child cost center (cherry picked from commit 4d5d6150e134a3af99cbd4a9b5e3eb61c87dd636) --- .../test_cost_center_allocation.py | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/erpnext/accounts/doctype/cost_center_allocation/test_cost_center_allocation.py b/erpnext/accounts/doctype/cost_center_allocation/test_cost_center_allocation.py index 65784dbb6c7..c333bbbf130 100644 --- a/erpnext/accounts/doctype/cost_center_allocation/test_cost_center_allocation.py +++ b/erpnext/accounts/doctype/cost_center_allocation/test_cost_center_allocation.py @@ -24,6 +24,7 @@ class TestCostCenterAllocation(unittest.TestCase): "Main Cost Center 2", "Sub Cost Center 1", "Sub Cost Center 2", + "Sub Cost Center 3", ] for cc in cost_centers: create_cost_center(cost_center_name=cc, company="_Test Company") @@ -141,6 +142,49 @@ class TestCostCenterAllocation(unittest.TestCase): jv.cancel() + def test_multiple_cost_center_allocation_on_same_main_cost_center(self): + create_cost_center_allocation( + "_Test Company", + "Main Cost Center 1 - _TC", + {"Sub Cost Center 1 - _TC": 30, "Sub Cost Center 2 - _TC": 30, "Sub Cost Center 3 - _TC": 40}, + valid_from=add_days(today(), -5), + ) + + create_cost_center_allocation( + "_Test Company", + "Main Cost Center 1 - _TC", + {"Sub Cost Center 1 - _TC": 50, "Sub Cost Center 2 - _TC": 50}, + valid_from=add_days(today(), -1), + ) + + jv = make_journal_entry( + "Cash - _TC", + "Sales - _TC", + 100, + cost_center="Main Cost Center 1 - _TC", + posting_date=today(), + submit=True, + ) + + expected_values = {"Sub Cost Center 1 - _TC": 50, "Sub Cost Center 2 - _TC": 50} + + gle = frappe.qb.DocType("GL Entry") + gl_entries = ( + frappe.qb.from_(gle) + .select(gle.cost_center, gle.debit, gle.credit) + .where(gle.voucher_type == "Journal Entry") + .where(gle.voucher_no == jv.name) + .where(gle.account == "Sales - _TC") + .orderby(gle.cost_center) + ).run(as_dict=1) + + self.assertTrue(gl_entries) + + for gle in gl_entries: + self.assertTrue(gle.cost_center in expected_values) + self.assertEqual(gle.debit, 0) + self.assertEqual(gle.credit, expected_values[gle.cost_center]) + def create_cost_center_allocation( company, From 3d29007aeb053fad0b8040fa1753305def7a4948 Mon Sep 17 00:00:00 2001 From: venkat102 Date: Fri, 13 Sep 2024 18:46:10 +0530 Subject: [PATCH 0131/1614] fix: cancel cost center allocation and journal entry after test (cherry picked from commit 3c65b98b49d2e7760c4bc01fcc0221f77a529a2b) --- .../test_cost_center_allocation.py | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/erpnext/accounts/doctype/cost_center_allocation/test_cost_center_allocation.py b/erpnext/accounts/doctype/cost_center_allocation/test_cost_center_allocation.py index c333bbbf130..4abc82d8bec 100644 --- a/erpnext/accounts/doctype/cost_center_allocation/test_cost_center_allocation.py +++ b/erpnext/accounts/doctype/cost_center_allocation/test_cost_center_allocation.py @@ -22,6 +22,7 @@ class TestCostCenterAllocation(unittest.TestCase): cost_centers = [ "Main Cost Center 1", "Main Cost Center 2", + "Main Cost Center 3", "Sub Cost Center 1", "Sub Cost Center 2", "Sub Cost Center 3", @@ -37,7 +38,7 @@ class TestCostCenterAllocation(unittest.TestCase): ) jv = make_journal_entry( - "_Test Cash - _TC", "Sales - _TC", 100, cost_center="Main Cost Center 1 - _TC", submit=True + "Cash - _TC", "Sales - _TC", 100, cost_center="Main Cost Center 1 - _TC", submit=True ) expected_values = [["Sub Cost Center 1 - _TC", 0.0, 60], ["Sub Cost Center 2 - _TC", 0.0, 40]] @@ -121,7 +122,7 @@ class TestCostCenterAllocation(unittest.TestCase): def test_valid_from_based_on_existing_gle(self): # GLE posted against Sub Cost Center 1 on today jv = make_journal_entry( - "_Test Cash - _TC", + "Cash - _TC", "Sales - _TC", 100, cost_center="Main Cost Center 1 - _TC", @@ -143,16 +144,16 @@ class TestCostCenterAllocation(unittest.TestCase): jv.cancel() def test_multiple_cost_center_allocation_on_same_main_cost_center(self): - create_cost_center_allocation( + coa1 = create_cost_center_allocation( "_Test Company", - "Main Cost Center 1 - _TC", + "Main Cost Center 3 - _TC", {"Sub Cost Center 1 - _TC": 30, "Sub Cost Center 2 - _TC": 30, "Sub Cost Center 3 - _TC": 40}, valid_from=add_days(today(), -5), ) - create_cost_center_allocation( + coa2 = create_cost_center_allocation( "_Test Company", - "Main Cost Center 1 - _TC", + "Main Cost Center 3 - _TC", {"Sub Cost Center 1 - _TC": 50, "Sub Cost Center 2 - _TC": 50}, valid_from=add_days(today(), -1), ) @@ -161,7 +162,7 @@ class TestCostCenterAllocation(unittest.TestCase): "Cash - _TC", "Sales - _TC", 100, - cost_center="Main Cost Center 1 - _TC", + cost_center="Main Cost Center 3 - _TC", posting_date=today(), submit=True, ) @@ -185,6 +186,10 @@ class TestCostCenterAllocation(unittest.TestCase): self.assertEqual(gle.debit, 0) self.assertEqual(gle.credit, expected_values[gle.cost_center]) + coa1.cancel() + coa2.cancel() + jv.cancel() + def create_cost_center_allocation( company, From 782c9dda1a7af57d330294d3b5ef51fd3e3904ef Mon Sep 17 00:00:00 2001 From: krishna Date: Mon, 16 Sep 2024 18:44:58 +0530 Subject: [PATCH 0132/1614] fix: add currency in options for rate field in pricing rule (cherry picked from commit 636c0131fa7f43a2902e18e68663418e2bf625f5) # Conflicts: # erpnext/accounts/doctype/pricing_rule/pricing_rule.json --- erpnext/accounts/doctype/pricing_rule/pricing_rule.json | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/pricing_rule/pricing_rule.json b/erpnext/accounts/doctype/pricing_rule/pricing_rule.json index 6f191c106c9..ae76a7eebe1 100644 --- a/erpnext/accounts/doctype/pricing_rule/pricing_rule.json +++ b/erpnext/accounts/doctype/pricing_rule/pricing_rule.json @@ -419,7 +419,8 @@ "depends_on": "eval:doc.rate_or_discount==\"Rate\"", "fieldname": "rate", "fieldtype": "Currency", - "label": "Rate" + "label": "Rate", + "options": "currency" }, { "default": "0", @@ -647,7 +648,11 @@ "icon": "fa fa-gift", "idx": 1, "links": [], +<<<<<<< HEAD "modified": "2024-05-17 13:16:34.496704", +======= + "modified": "2024-09-16 18:14:51.314765", +>>>>>>> 636c0131fa (fix: add currency in options for rate field in pricing rule) "modified_by": "Administrator", "module": "Accounts", "name": "Pricing Rule", @@ -709,4 +714,4 @@ "sort_order": "DESC", "states": [], "title_field": "title" -} +} \ No newline at end of file From 82982e25c6758d2fdcf22c62bd61dcd065759fb4 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Wed, 18 Sep 2024 12:10:42 +0530 Subject: [PATCH 0133/1614] chore: resolve conflict --- erpnext/accounts/doctype/pricing_rule/pricing_rule.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/erpnext/accounts/doctype/pricing_rule/pricing_rule.json b/erpnext/accounts/doctype/pricing_rule/pricing_rule.json index ae76a7eebe1..ee9dd2be8c3 100644 --- a/erpnext/accounts/doctype/pricing_rule/pricing_rule.json +++ b/erpnext/accounts/doctype/pricing_rule/pricing_rule.json @@ -648,11 +648,7 @@ "icon": "fa fa-gift", "idx": 1, "links": [], -<<<<<<< HEAD - "modified": "2024-05-17 13:16:34.496704", -======= "modified": "2024-09-16 18:14:51.314765", ->>>>>>> 636c0131fa (fix: add currency in options for rate field in pricing rule) "modified_by": "Administrator", "module": "Accounts", "name": "Pricing Rule", From 479e8573c2f12b1022a3b6b1e318bcd6ea787d58 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Wed, 18 Sep 2024 07:32:30 +0000 Subject: [PATCH 0134/1614] chore(release): Bumped to Version 15.36.0 # [15.36.0](https://github.com/frappe/erpnext/compare/v15.35.2...v15.36.0) (2024-09-18) ### Bug Fixes * A project without tasks should be able to complete ([dea735d](https://github.com/frappe/erpnext/commit/dea735de4df2ca427fce8803d3d4f8acdc89c789)) * add currency in options for rate field in pricing rule ([782c9dd](https://github.com/frappe/erpnext/commit/782c9dda1a7af57d330294d3b5ef51fd3e3904ef)) * batch based item price not working (backport [#43172](https://github.com/frappe/erpnext/issues/43172)) ([#43206](https://github.com/frappe/erpnext/issues/43206)) ([61a42ea](https://github.com/frappe/erpnext/commit/61a42ea5d71b9f28c73d9954168bc3e9ba37a3cc)) * cancel cost center allocation and journal entry after test ([3d29007](https://github.com/frappe/erpnext/commit/3d29007aeb053fad0b8040fa1753305def7a4948)) * consistent behaviour on refresh ([01f3068](https://github.com/frappe/erpnext/commit/01f30682ee9e15a51161a4f2a91681484e6ac8bf)) * create and link address while creating prospect & customer ([d6a3d0d](https://github.com/frappe/erpnext/commit/d6a3d0d46835559dffb50c502bfec10d15492031)) * create fiscal year without overlapping existing Fiscal Years ([78768f8](https://github.com/frappe/erpnext/commit/78768f883c09ec91de2dfee101923808ccd6fa55)) * currency changing while making PO from Supplier Quotation (backport [#43187](https://github.com/frappe/erpnext/issues/43187)) ([#43205](https://github.com/frappe/erpnext/issues/43205)) ([ef6b172](https://github.com/frappe/erpnext/commit/ef6b172616ee473c1b05324d2e6217510cec8cda)) * delete exchange gain loss journal entry while deleting payment entry ([5789de2](https://github.com/frappe/erpnext/commit/5789de25b94258c8e521885cde47c5706632cc98)) * do not auto apply tds in purchase order ([741c18b](https://github.com/frappe/erpnext/commit/741c18b14468f29586cc9c19c293b6f6518249e1)) * do not check appy_tds in Purchase Order Automatically ([5edebb2](https://github.com/frappe/erpnext/commit/5edebb28a5bcbeacc1084c9da3cb99e156d95b8d)) * do not validate purchase document for composite asset ([c505156](https://github.com/frappe/erpnext/commit/c5051561e4eb14374e85245c1068e807ef8b15a0)) * fetch cost center allocation percentage only from the applicable allocation ([0fe901a](https://github.com/frappe/erpnext/commit/0fe901a137c1b4d3ab5caee046ad4cc8911d7444)) * hide and reset discount control on new POS order ([42494db](https://github.com/frappe/erpnext/commit/42494db3c77db1ec590bf7e73bb89828cd06b029)) * **holiday-list:** use same date format for same holiday error message (backport [#42606](https://github.com/frappe/erpnext/issues/42606)) ([#43222](https://github.com/frappe/erpnext/issues/43222)) ([f101a1c](https://github.com/frappe/erpnext/commit/f101a1ce3b9e2e579ff200c80204a0231916eeec)) * ignore repost logic on Payment Reconciliation ([d91013a](https://github.com/frappe/erpnext/commit/d91013a46707095f62a009a2fbdcf84bd1303c62)) * invalid gp calculation ([291f0a5](https://github.com/frappe/erpnext/commit/291f0a580be176a4c87c03e54372dd7a7cca9cb1)) * item list view in website (backport [#43165](https://github.com/frappe/erpnext/issues/43165)) ([#43207](https://github.com/frappe/erpnext/issues/43207)) ([c1a6c56](https://github.com/frappe/erpnext/commit/c1a6c56217b326f4c948145c507c87bbc987bafc)) * map rows on journal entry by validating account, party, debit and credit value ([86e1818](https://github.com/frappe/erpnext/commit/86e1818420a3152cf47ef65943216c6a9bd0d29e)) * prevent KeyError by checking `report_filter` existence ([984acb6](https://github.com/frappe/erpnext/commit/984acb661d4314960bf2f1eb3542830b182441cc)) * revert 091c5496b20864577d133b0804e957ff8995606f ([2ad6d63](https://github.com/frappe/erpnext/commit/2ad6d637ee9193253fbade6ab35769636906c8d1)) * set party_type null when payment_type is changed to Internal Transfer ([45ff8fa](https://github.com/frappe/erpnext/commit/45ff8fa296b47c809ecb643a4b67fc775d9e9848)) * set tax_withholding_category from Purchase Order while creating pi form po ([7027be8](https://github.com/frappe/erpnext/commit/7027be8fbcf51282ea470299e4edb3d9ce89dd6f)) * tds workflow in purchase order ([11359bd](https://github.com/frappe/erpnext/commit/11359bd2353e7804e226ae000464093d8d5aa71c)) * typo with po_date when creating remarks ([1657a83](https://github.com/frappe/erpnext/commit/1657a83151fb002e0606c36923e722aa638cc6f2)) * updated filtering in depreciation and balances report ([78c6839](https://github.com/frappe/erpnext/commit/78c68397d9a5147970f4b19435c5352ced2a6a44)) * **ux:** set amount based on account currency while adding new row ([f7cedac](https://github.com/frappe/erpnext/commit/f7cedac5260d832aa6b95b9f0341c94d7ccd6203)) * **ux:** set amount on foreign currency when foreign currency account is selected on last row of journal ([d8d4cd2](https://github.com/frappe/erpnext/commit/d8d4cd23a518ec94b30f69dfc67dd042582fcbec)) ### Features * API for crm integration ([f060534](https://github.com/frappe/erpnext/commit/f060534625b6a7dcb7b60fd783f041ba3e980650)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 8d6e2cc0d18..46129bf0b24 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.35.2" +__version__ = "15.36.0" def get_default_company(user=None): From 73d98addbcbdb236cda9da130ff9a59a1f942a37 Mon Sep 17 00:00:00 2001 From: "Nihantra C. Patel" <141945075+Nihantra-Patel@users.noreply.github.com> Date: Wed, 18 Sep 2024 21:36:02 +0530 Subject: [PATCH 0135/1614] fix: Translation for button SO to PO (cherry picked from commit a5275e9f28bb54c286cad7ae697ab37f9e5e8794) --- erpnext/selling/doctype/sales_order/sales_order.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/selling/doctype/sales_order/sales_order.js b/erpnext/selling/doctype/sales_order/sales_order.js index cdcd1047bd8..5387286c709 100644 --- a/erpnext/selling/doctype/sales_order/sales_order.js +++ b/erpnext/selling/doctype/sales_order/sales_order.js @@ -1251,7 +1251,7 @@ erpnext.selling.SalesOrderController = class SalesOrderController extends erpnex ], }, ], - primary_action_label: "Create Purchase Order", + primary_action_label: __("Create Purchase Order"), primary_action(args) { if (!args) return; From 557ef5d214abee8b7e7a7838a940a40e6f8d1477 Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Wed, 18 Sep 2024 21:53:27 +0530 Subject: [PATCH 0136/1614] fix: create_address is failing (cherry picked from commit acc1d52ac8e51a4fd87cdfcfc7f5c0639157fad9) --- erpnext/crm/frappe_crm_api.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/crm/frappe_crm_api.py b/erpnext/crm/frappe_crm_api.py index 53f58ed57eb..a00f0ba798d 100644 --- a/erpnext/crm/frappe_crm_api.py +++ b/erpnext/crm/frappe_crm_api.py @@ -95,6 +95,8 @@ def create_contacts(contacts, organization=None, link_doctype=None, link_docname def create_address(doctype, docname, address): if not address: return + if isinstance(address, str): + address = json.loads(address) try: _address = frappe.db.exists("Address", address.get("name")) if not _address: @@ -105,6 +107,7 @@ def create_address(doctype, docname, address): "address_line1", "address_line2", "city", + "county", "state", "pincode", "country", From 17ad40269555d6a9c559dc925a414e2b6cee273c Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Wed, 18 Sep 2024 21:53:27 +0530 Subject: [PATCH 0137/1614] fix: create_address is failing (cherry picked from commit acc1d52ac8e51a4fd87cdfcfc7f5c0639157fad9) --- erpnext/crm/frappe_crm_api.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/crm/frappe_crm_api.py b/erpnext/crm/frappe_crm_api.py index 53f58ed57eb..a00f0ba798d 100644 --- a/erpnext/crm/frappe_crm_api.py +++ b/erpnext/crm/frappe_crm_api.py @@ -95,6 +95,8 @@ def create_contacts(contacts, organization=None, link_doctype=None, link_docname def create_address(doctype, docname, address): if not address: return + if isinstance(address, str): + address = json.loads(address) try: _address = frappe.db.exists("Address", address.get("name")) if not _address: @@ -105,6 +107,7 @@ def create_address(doctype, docname, address): "address_line1", "address_line2", "city", + "county", "state", "pincode", "country", From 34ca0c3bb6a61949c66f4d2aee5c7f06e2766244 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Thu, 19 Sep 2024 01:43:11 +0000 Subject: [PATCH 0138/1614] chore(release): Bumped to Version 15.36.1 ## [15.36.1](https://github.com/frappe/erpnext/compare/v15.36.0...v15.36.1) (2024-09-19) ### Bug Fixes * create_address is failing ([17ad402](https://github.com/frappe/erpnext/commit/17ad40269555d6a9c559dc925a414e2b6cee273c)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 46129bf0b24..d5db7ca59a6 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.36.0" +__version__ = "15.36.1" def get_default_company(user=None): From 84e26e21abbbe0c8a8ab508d4d408e89e2e79467 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Do=C4=9Fancan?= <37839267+doancan@users.noreply.github.com> Date: Wed, 18 Sep 2024 17:06:07 +0300 Subject: [PATCH 0139/1614] fix: translate in js (cherry picked from commit 25faec5662b317a19e99ad41b589380067b9fa53) --- erpnext/assets/doctype/asset/asset.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/assets/doctype/asset/asset.js b/erpnext/assets/doctype/asset/asset.js index 0a21516c177..c6e76abb0b5 100644 --- a/erpnext/assets/doctype/asset/asset.js +++ b/erpnext/assets/doctype/asset/asset.js @@ -213,7 +213,7 @@ frappe.ui.form.on("Asset", {
- Failed to post depreciation entries + ${__("Failed to post depreciation entries")}
`; From f6725e2eed39c326bd031ebc969bd40adf6235e1 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 19 Sep 2024 09:35:54 +0530 Subject: [PATCH 0140/1614] fix: incorrect stock balance for inventory dimension (backport #43284) (#43290) fix: incorrect stock balance for inventory dimension (#43284) (cherry picked from commit 3e7a7a54bf0cda871e0814deb8776238270769b2) Co-authored-by: rohitwaghchaure --- erpnext/stock/report/stock_balance/stock_balance.js | 6 ++++++ erpnext/stock/report/stock_balance/stock_balance.py | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/erpnext/stock/report/stock_balance/stock_balance.js b/erpnext/stock/report/stock_balance/stock_balance.js index d80261895aa..1d86634fd95 100644 --- a/erpnext/stock/report/stock_balance/stock_balance.js +++ b/erpnext/stock/report/stock_balance/stock_balance.js @@ -107,6 +107,12 @@ frappe.query_reports["Stock Balance"] = { fieldtype: "Check", default: 0, }, + { + fieldname: "show_dimension_wise_stock", + label: __("Show Dimension Wise Stock"), + fieldtype: "Check", + default: 0, + }, ], formatter: function (value, row, column, data, default_formatter) { diff --git a/erpnext/stock/report/stock_balance/stock_balance.py b/erpnext/stock/report/stock_balance/stock_balance.py index 2694ba03c8b..8ea07338cf1 100644 --- a/erpnext/stock/report/stock_balance/stock_balance.py +++ b/erpnext/stock/report/stock_balance/stock_balance.py @@ -252,7 +252,10 @@ class StockBalanceReport: group_by_key = [row.company, row.item_code, row.warehouse] for fieldname in self.inventory_dimensions: - if self.filters.get(fieldname): + if not row.get(fieldname): + continue + + if self.filters.get(fieldname) or self.filters.get("show_dimension_wise_stock"): group_by_key.append(row.get(fieldname)) return tuple(group_by_key) From ef10c4ea4f969a0c6ef12f3733324ae43e689675 Mon Sep 17 00:00:00 2001 From: Nihantra Patel Date: Mon, 24 Jun 2024 15:54:01 +0530 Subject: [PATCH 0141/1614] fix: creation of contact, customer, opportunity, quotation and prospect from lead (cherry picked from commit 8304d19e8b4b4a16f674627ab64f27aa2b9b4915) # Conflicts: # erpnext/crm/doctype/lead/lead.js --- erpnext/crm/doctype/lead/lead.js | 117 ++++++++++++++++++++++++++++++- 1 file changed, 116 insertions(+), 1 deletion(-) diff --git a/erpnext/crm/doctype/lead/lead.js b/erpnext/crm/doctype/lead/lead.js index 609eab7f9a2..448aa858a4c 100644 --- a/erpnext/crm/doctype/lead/lead.js +++ b/erpnext/crm/doctype/lead/lead.js @@ -28,6 +28,7 @@ erpnext.LeadController = class LeadController extends frappe.ui.form.Controller erpnext.toggle_naming_series(); if (!this.frm.is_new() && doc.__onload && !doc.__onload.is_customer) { +<<<<<<< HEAD this.frm.add_custom_button(__("Customer"), this.make_customer, __("Create")); this.frm.add_custom_button( __("Opportunity"), @@ -37,8 +38,29 @@ erpnext.LeadController = class LeadController extends frappe.ui.form.Controller __("Create") ); this.frm.add_custom_button(__("Quotation"), this.make_quotation, __("Create")); +======= + this.frm.add_custom_button( + __("Customer"), + this.make_customer.bind(this), + __("Create") + ); + this.frm.add_custom_button( + __("Opportunity"), + this.make_opportunity.bind(this), + __("Create") + ); + this.frm.add_custom_button( + __("Quotation"), + this.make_quotation.bind(this), + __("Create") + ); +>>>>>>> 8304d19e8b (fix: creation of contact, customer, opportunity, quotation and prospect from lead) if (!doc.__onload.linked_prospects.length) { - this.frm.add_custom_button(__("Prospect"), this.make_prospect, __("Create")); + this.frm.add_custom_button( + __("Prospect"), + this.make_prospect.bind(this), + __("Create") + ); this.frm.add_custom_button(__("Add to Prospect"), this.add_lead_to_prospect, __("Action")); } } @@ -100,6 +122,99 @@ erpnext.LeadController = class LeadController extends frappe.ui.form.Controller }); } +<<<<<<< HEAD +======= + async make_opportunity() { + const frm = this.frm; + let existing_prospect = ( + await frappe.db.get_value( + "Prospect Lead", + { + lead: frm.doc.name, + }, + "name", + null, + "Prospect" + ) + ).message?.name; + + let fields = []; + if (!existing_prospect) { + fields.push( + { + label: "Create Prospect", + fieldname: "create_prospect", + fieldtype: "Check", + default: 1, + }, + { + label: "Prospect Name", + fieldname: "prospect_name", + fieldtype: "Data", + default: frm.doc.company_name, + reqd: 1, + depends_on: "create_prospect", + } + ); + } + + await frm.reload_doc(); + + let existing_contact = ( + await frappe.db.get_value( + "Contact", + { + first_name: frm.doc.first_name || frm.doc.lead_name, + last_name: frm.doc.last_name, + }, + "name" + ) + ).message?.name; + + if (!existing_contact) { + fields.push({ + label: "Create Contact", + fieldname: "create_contact", + fieldtype: "Check", + default: "1", + }); + } + + if (fields.length) { + const d = new frappe.ui.Dialog({ + title: __("Create Opportunity"), + fields: fields, + primary_action: function(data) { + frappe.call({ + method: "create_prospect_and_contact", + doc: frm.doc, + args: { + data: data, + }, + freeze: true, + callback: function(r) { + if (!r.exc) { + frappe.model.open_mapped_doc({ + method: "erpnext.crm.doctype.lead.lead.make_opportunity", + frm: frm, + }); + } + d.hide(); + }, + }); + }, + primary_action_label: __("Create"), + }); + d.show(); + } else { + frappe.model.open_mapped_doc({ + method: "erpnext.crm.doctype.lead.lead.make_opportunity", + frm: frm, + }); + } + } + +>>>>>>> 8304d19e8b (fix: creation of contact, customer, opportunity, quotation and prospect from lead) make_prospect() { frappe.model.with_doctype("Prospect", function () { let prospect = frappe.model.get_new_doc("Prospect"); From 5a2a404a50ebb40507abbd34dc6a1975db4940ca Mon Sep 17 00:00:00 2001 From: Nihantra Patel Date: Mon, 24 Jun 2024 16:03:39 +0530 Subject: [PATCH 0142/1614] fix: creation of contact, customer, opportunity, quotation and prospect from lead --prettier (cherry picked from commit 5844897c34df7a727c7b14cdb67a136d33a70a18) # Conflicts: # erpnext/crm/doctype/lead/lead.js --- erpnext/crm/doctype/lead/lead.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/erpnext/crm/doctype/lead/lead.js b/erpnext/crm/doctype/lead/lead.js index 448aa858a4c..f27187924af 100644 --- a/erpnext/crm/doctype/lead/lead.js +++ b/erpnext/crm/doctype/lead/lead.js @@ -28,6 +28,7 @@ erpnext.LeadController = class LeadController extends frappe.ui.form.Controller erpnext.toggle_naming_series(); if (!this.frm.is_new() && doc.__onload && !doc.__onload.is_customer) { +<<<<<<< HEAD <<<<<<< HEAD this.frm.add_custom_button(__("Customer"), this.make_customer, __("Create")); this.frm.add_custom_button( @@ -55,12 +56,13 @@ erpnext.LeadController = class LeadController extends frappe.ui.form.Controller __("Create") ); >>>>>>> 8304d19e8b (fix: creation of contact, customer, opportunity, quotation and prospect from lead) +======= + this.frm.add_custom_button(__("Customer"), this.make_customer.bind(this), __("Create")); + this.frm.add_custom_button(__("Opportunity"), this.make_opportunity.bind(this), __("Create")); + this.frm.add_custom_button(__("Quotation"), this.make_quotation.bind(this), __("Create")); +>>>>>>> 5844897c34 (fix: creation of contact, customer, opportunity, quotation and prospect from lead --prettier) if (!doc.__onload.linked_prospects.length) { - this.frm.add_custom_button( - __("Prospect"), - this.make_prospect.bind(this), - __("Create") - ); + this.frm.add_custom_button(__("Prospect"), this.make_prospect.bind(this), __("Create")); this.frm.add_custom_button(__("Add to Prospect"), this.add_lead_to_prospect, __("Action")); } } @@ -184,7 +186,7 @@ erpnext.LeadController = class LeadController extends frappe.ui.form.Controller const d = new frappe.ui.Dialog({ title: __("Create Opportunity"), fields: fields, - primary_action: function(data) { + primary_action: function (data) { frappe.call({ method: "create_prospect_and_contact", doc: frm.doc, @@ -192,7 +194,7 @@ erpnext.LeadController = class LeadController extends frappe.ui.form.Controller data: data, }, freeze: true, - callback: function(r) { + callback: function (r) { if (!r.exc) { frappe.model.open_mapped_doc({ method: "erpnext.crm.doctype.lead.lead.make_opportunity", From 86ae64457474108ba4575a93aad4bc1380b9d1e9 Mon Sep 17 00:00:00 2001 From: HENRY Florian Date: Sat, 21 Sep 2024 03:16:57 +0200 Subject: [PATCH 0143/1614] refactor: use common functionality to validate account number (#42842) feat: Allow unique Account number by root type (not unique for accros all Accounts) (cherry picked from commit 40d97f4fe9da3b16e8c67d0d06ccdb41bdc63c99) --- erpnext/accounts/doctype/account/account.py | 35 +++++++++++---------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/erpnext/accounts/doctype/account/account.py b/erpnext/accounts/doctype/account/account.py index 1a5ee36b95a..2c876e09725 100644 --- a/erpnext/accounts/doctype/account/account.py +++ b/erpnext/accounts/doctype/account/account.py @@ -103,14 +103,12 @@ class Account(NestedSet): self.name = get_autoname_with_number(self.account_number, self.account_name, self.company) def validate(self): - from erpnext.accounts.utils import validate_field_number - if frappe.local.flags.allow_unverified_charts: return self.validate_parent() self.validate_parent_child_account_type() self.validate_root_details() - validate_field_number("Account", self.name, self.account_number, self.company, "account_number") + self.validate_account_number() self.validate_group_or_ledger() self.set_root_and_report_type() self.validate_mandatory() @@ -311,6 +309,22 @@ class Account(NestedSet): if frappe.db.get_value("GL Entry", {"account": self.name}): frappe.throw(_("Currency can not be changed after making entries using some other currency")) + def validate_account_number(self, account_number=None): + if not account_number: + account_number = self.account_number + + if account_number: + account_with_same_number = frappe.db.get_value( + "Account", + {"account_number": account_number, "company": self.company, "name": ["!=", self.name]}, + ) + if account_with_same_number: + frappe.throw( + _("Account Number {0} already used in account {1}").format( + account_number, account_with_same_number + ) + ) + def create_account_for_child_company(self, parent_acc_name_map, descendants, parent_acc_name): for company in descendants: company_bold = frappe.bold(company) @@ -464,19 +478,6 @@ def get_account_autoname(account_number, account_name, company): return " - ".join(parts) -def validate_account_number(name, account_number, company): - if account_number: - account_with_same_number = frappe.db.get_value( - "Account", {"account_number": account_number, "company": company, "name": ["!=", name]} - ) - if account_with_same_number: - frappe.throw( - _("Account Number {0} already used in account {1}").format( - account_number, account_with_same_number - ) - ) - - @frappe.whitelist() def update_account_number(name, account_name, account_number=None, from_descendant=False): account = frappe.get_cached_doc("Account", name) @@ -517,7 +518,7 @@ def update_account_number(name, account_name, account_number=None, from_descenda frappe.throw(message, title=_("Rename Not Allowed")) - validate_account_number(name, account_number, account.company) + account.validate_account_number(account_number) if account_number: frappe.db.set_value("Account", name, "account_number", account_number.strip()) else: From 7e6d6f08a20a03ff5603d9b991d4ea69960780c5 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Sun, 22 Sep 2024 11:18:42 +0530 Subject: [PATCH 0144/1614] fix: ui clean-up (backport #43305) (#43312) * fix: ui clean-up (#43305) fix: ui cleanup (cherry picked from commit b127a0c8b7fd4e1dede7c23c3f59e0562c4945b2) # Conflicts: # erpnext/manufacturing/doctype/bom_creator/bom_creator.json # erpnext/manufacturing/doctype/plant_floor/plant_floor.json # erpnext/public/js/templates/visual_plant_floor_template.html * chore: fix conflicts * chore: fix conflicts * chore: fix conflicts --------- Co-authored-by: rohitwaghchaure --- .../doctype/bom_creator/bom_creator.json | 3 +- .../doctype/plant_floor/plant_floor.js | 21 ++++++++++ .../doctype/plant_floor/plant_floor.json | 5 ++- .../doctype/work_order/work_order.js | 2 +- .../bom_configurator.bundle.js | 12 +++++- .../visual_plant_floor_template.html | 20 +++++++-- erpnext/public/scss/erpnext.scss | 41 +++++++++++++++++++ 7 files changed, 95 insertions(+), 9 deletions(-) diff --git a/erpnext/manufacturing/doctype/bom_creator/bom_creator.json b/erpnext/manufacturing/doctype/bom_creator/bom_creator.json index 9d2384e31a0..65664be2bea 100644 --- a/erpnext/manufacturing/doctype/bom_creator/bom_creator.json +++ b/erpnext/manufacturing/doctype/bom_creator/bom_creator.json @@ -280,6 +280,7 @@ "read_only": 1 } ], + "hide_toolbar": 1, "icon": "fa fa-sitemap", "is_submittable": 1, "links": [ @@ -288,7 +289,7 @@ "link_fieldname": "bom_creator" } ], - "modified": "2024-04-02 16:30:59.779190", + "modified": "2024-09-21 09:05:52.945112", "modified_by": "Administrator", "module": "Manufacturing", "name": "BOM Creator", diff --git a/erpnext/manufacturing/doctype/plant_floor/plant_floor.js b/erpnext/manufacturing/doctype/plant_floor/plant_floor.js index becdbdb9c95..3d18900b70c 100644 --- a/erpnext/manufacturing/doctype/plant_floor/plant_floor.js +++ b/erpnext/manufacturing/doctype/plant_floor/plant_floor.js @@ -6,6 +6,22 @@ frappe.ui.form.on("Plant Floor", { frm.trigger("setup_queries"); }, + add_workstation(frm) { + frm.add_custom_button(__("Create Workstation"), () => { + var doc = frappe.model.get_new_doc("Workstation"); + doc.plant_floor = frm.doc.name; + doc.status = "Off"; + frappe.ui.form.make_quick_entry( + "Workstation", + () => { + frm.trigger("prepare_workstation_dashboard"); + }, + null, + doc + ); + }).addClass("btn-primary"); + }, + setup_queries(frm) { frm.set_query("warehouse", (doc) => { if (!doc.company) { @@ -24,6 +40,11 @@ frappe.ui.form.on("Plant Floor", { refresh(frm) { frm.trigger("prepare_stock_dashboard"); frm.trigger("prepare_workstation_dashboard"); + + if (!frm.is_new()) { + frm.trigger("add_workstation"); + frm.disable_save(); + } }, prepare_workstation_dashboard(frm) { diff --git a/erpnext/manufacturing/doctype/plant_floor/plant_floor.json b/erpnext/manufacturing/doctype/plant_floor/plant_floor.json index be0052c47bf..c1c167c395b 100644 --- a/erpnext/manufacturing/doctype/plant_floor/plant_floor.json +++ b/erpnext/manufacturing/doctype/plant_floor/plant_floor.json @@ -69,9 +69,10 @@ "options": "Company" } ], + "hide_toolbar": 1, "index_web_pages_for_search": 1, "links": [], - "modified": "2024-01-30 11:59:07.508535", + "modified": "2024-09-19 19:06:36.481625", "modified_by": "Administrator", "module": "Manufacturing", "name": "Plant Floor", @@ -94,4 +95,4 @@ "sort_field": "modified", "sort_order": "DESC", "states": [] -} \ No newline at end of file +} diff --git a/erpnext/manufacturing/doctype/work_order/work_order.js b/erpnext/manufacturing/doctype/work_order/work_order.js index ae888c79714..df72b1e6b51 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order.js +++ b/erpnext/manufacturing/doctype/work_order/work_order.js @@ -201,7 +201,7 @@ frappe.ui.form.on("Work Order", { frm.doc.produced_qty > 0 ) { frm.add_custom_button( - __("Disassembly Order"), + __("Disassemble Order"), () => { frm.trigger("make_disassembly_order"); }, diff --git a/erpnext/public/js/bom_configurator/bom_configurator.bundle.js b/erpnext/public/js/bom_configurator/bom_configurator.bundle.js index 5061be9d20a..21aa70fe7ae 100644 --- a/erpnext/public/js/bom_configurator/bom_configurator.bundle.js +++ b/erpnext/public/js/bom_configurator/bom_configurator.bundle.js @@ -25,6 +25,9 @@ class BOMConfigurator { }; frappe.views.trees["BOM Configurator"] = new frappe.views.TreeView(options); + let node = frappe.views.trees["BOM Configurator"].tree.root_node; + frappe.views.trees["BOM Configurator"].tree.show_toolbar(node); + frappe.views.trees["BOM Configurator"].tree.load_children(node, true); this.tree_view = frappe.views.trees["BOM Configurator"]; } @@ -137,7 +140,7 @@ class BOMConfigurator { btnClass: "hidden-xs", }, { - label: __("Expand All"), + label: __("Collapse All"), click: function (node) { let view = frappe.views.trees["BOM Configurator"]; @@ -283,6 +286,13 @@ class BOMConfigurator { fieldtype: "Float", reqd: 1, read_only: read_only, + change() { + this.layout.fields_dict.items.grid.data.forEach((row) => { + row.qty = flt(this.value); + }); + + this.layout.fields_dict.items.grid.refresh(); + }, }, { fieldtype: "Section Break" }, { diff --git a/erpnext/public/js/templates/visual_plant_floor_template.html b/erpnext/public/js/templates/visual_plant_floor_template.html index 2e67085c022..a1639f07370 100644 --- a/erpnext/public/js/templates/visual_plant_floor_template.html +++ b/erpnext/public/js/templates/visual_plant_floor_template.html @@ -1,5 +1,16 @@ {% $.each(workstations, (idx, row) => { %}
+
+ {% if(row.status == "Production") { %} +
+
+
+
+ {% } %} + + {{row.status}} + +
-
-

{{row.status}}

-
{{row.workstation_name}}
+
+ + {{row.workstation_name}} +
-{% }); %} \ No newline at end of file +{% }); %} diff --git a/erpnext/public/scss/erpnext.scss b/erpnext/public/scss/erpnext.scss index 03dd31104e1..29a2696470f 100644 --- a/erpnext/public/scss/erpnext.scss +++ b/erpnext/public/scss/erpnext.scss @@ -507,6 +507,47 @@ body[data-route="pos"] { position: relative; } +.ring-container { + position: relative; +} + +.circle { + width: 9px; + height: 9px; + background-color: #278f5e; + border-radius: 50%; + position: absolute; + left: 9px; + top: 8px; +} + +@keyframes pulsate { + 0% { + -webkit-transform: scale(0.1, 0.1); + opacity: 0; + } + 50% { + opacity: 1; + } + 100% { + -webkit-transform: scale(1.2, 1.2); + opacity: 0; + } +} + +.ringring { + border: 2px solid #62bd19; + -webkit-border-radius: 40px; + height: 15px; + width: 15px; + position: absolute; + left: 6px; + top: 5px; + -webkit-animation: pulsate 3s ease-out; + -webkit-animation-iteration-count: infinite; + opacity: 0; +} + .plant-floor { padding-bottom: 25px; } From 63d4fddb493e4ba1ec1b178464f5fd671da1fd8c Mon Sep 17 00:00:00 2001 From: venkat102 Date: Mon, 23 Sep 2024 12:37:40 +0530 Subject: [PATCH 0145/1614] fix: make to tax category on tax rule to filter with percent (cherry picked from commit 3aaa13cb2925cadae926ab7241559b80b0a9d0bd) --- erpnext/accounts/doctype/tax_rule/tax_rule.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/tax_rule/tax_rule.py b/erpnext/accounts/doctype/tax_rule/tax_rule.py index ed623c6635e..1c0c0a3c1d6 100644 --- a/erpnext/accounts/doctype/tax_rule/tax_rule.py +++ b/erpnext/accounts/doctype/tax_rule/tax_rule.py @@ -185,7 +185,7 @@ def get_tax_template(posting_date, args): conditions.append("(from_date is null) and (to_date is null)") conditions.append( - "ifnull(tax_category, '') = {}".format(frappe.db.escape(cstr(args.get("tax_category")))) + "ifnull(tax_category, '') = {}".format(frappe.db.escape(cstr(args.get("tax_category")), False)) ) if "tax_category" in args.keys(): del args["tax_category"] From 40459288f6c4bdcb88dc284c6874b1294a6b88a5 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Sat, 21 Sep 2024 15:02:40 +0530 Subject: [PATCH 0146/1614] fix: handle missing liability account scenario in `set_liability_account` (cherry picked from commit ee7ab4b065a2a76cbfa5e5f78ffd3c0b0275dacf) --- .../doctype/payment_entry/payment_entry.py | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index 13baff9e7a8..625608b5374 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -145,9 +145,21 @@ class PaymentEntry(AccountsController): self.is_opening = "No" return - liability_account = get_party_account( - self.party_type, self.party, self.company, include_advance=True - )[1] + accounts = get_party_account(self.party_type, self.party, self.company, include_advance=True) + + liability_account = accounts[1] if len(accounts) > 1 else None + fieldname = ( + "default_advance_received_account" + if self.party_type == "Customer" + else "default_advance_paid_account" + ) + + if not liability_account: + throw( + _("Please set default {0} in Company {1}").format( + frappe.bold(frappe.get_meta("Company").get_label(fieldname)), frappe.bold(self.company) + ) + ) self.set(self.party_account_field, liability_account) From a7ccc9420ba8fa30b7809b299a91ae3501d0b4fb Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 23 Sep 2024 14:37:12 +0530 Subject: [PATCH 0147/1614] fix: transaction exchange rate on GL's for Multi currency Journals (cherry picked from commit 8cd9ad53617f6e5bb7a35e8f05fa9fd0cb4d3330) --- erpnext/controllers/accounts_controller.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 92efa5168f3..44a9813c89e 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -1036,7 +1036,9 @@ class AccountsController(TransactionBase): gl_dict.update( { "transaction_currency": self.get("currency") or self.company_currency, - "transaction_exchange_rate": self.get("conversion_rate", 1), + "transaction_exchange_rate": item.get("exchange_rate", 1) + if self.doctype == "Journal Entry" and item + else self.get("conversion_rate", 1), "debit_in_transaction_currency": self.get_value_in_transaction_currency( account_currency, gl_dict, "debit" ), From 2d9142832ded129093f2418c7e3f6f7cf887f113 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 23 Sep 2024 17:12:31 +0530 Subject: [PATCH 0148/1614] test: transaction exchange rate on multi-currency journals (cherry picked from commit c524825d2d7f1a385defb679c2e0df978dade742) --- .../doctype/journal_entry/test_journal_entry.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/erpnext/accounts/doctype/journal_entry/test_journal_entry.py b/erpnext/accounts/doctype/journal_entry/test_journal_entry.py index c53faf9ff39..3d4b182d52d 100644 --- a/erpnext/accounts/doctype/journal_entry/test_journal_entry.py +++ b/erpnext/accounts/doctype/journal_entry/test_journal_entry.py @@ -515,6 +515,23 @@ class TestJournalEntry(unittest.TestCase): self.assertEqual(row.debit_in_account_currency, 100) self.assertEqual(row.credit_in_account_currency, 100) + def test_transaction_exchange_rate_on_journals(self): + jv = make_journal_entry("_Test Bank - _TC", "_Test Receivable USD - _TC", 100, save=False) + jv.accounts[0].update({"debit_in_account_currency": 8500, "exchange_rate": 1}) + jv.accounts[1].update({"party_type": "Customer", "party": "_Test Customer USD", "exchange_rate": 85}) + jv.submit() + actual = frappe.db.get_all( + "GL Entry", + filters={"voucher_no": jv.name, "is_cancelled": 0}, + fields=["account", "transaction_exchange_rate"], + order_by="account", + ) + expected = [ + {"account": "_Test Bank - _TC", "transaction_exchange_rate": 1.0}, + {"account": "_Test Receivable USD - _TC", "transaction_exchange_rate": 85.0}, + ] + self.assertEqual(expected, actual) + def make_journal_entry( account1, From f89a3dbb6562bed6fa22088a63cd363f612ffbfd Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Sat, 21 Sep 2024 12:27:53 +0530 Subject: [PATCH 0149/1614] fix: incorrect outstanding on non-pos invoice with write_off_account (cherry picked from commit d5e2906e5974117d91dd265319186a99b2835023) --- erpnext/accounts/doctype/sales_invoice/sales_invoice.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 1214ddee8cd..010d3b8bcd5 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -340,6 +340,7 @@ class SalesInvoice(SellingController): ): validate_loyalty_points(self, self.loyalty_points) + self.allow_write_off_only_on_pos() self.reset_default_field_value("set_warehouse", "items", "warehouse") def validate_accounts(self): @@ -1021,6 +1022,10 @@ class SalesInvoice(SellingController): raise_exception=1, ) + def allow_write_off_only_on_pos(self): + if not self.is_pos and self.write_off_account: + self.write_off_account = None + def validate_write_off_account(self): if flt(self.write_off_amount) and not self.write_off_account: self.write_off_account = frappe.get_cached_value("Company", self.company, "write_off_account") From e5ae828580693d0f4b370868f39d70b649de4a7c Mon Sep 17 00:00:00 2001 From: venkat102 Date: Fri, 20 Sep 2024 11:43:00 +0530 Subject: [PATCH 0150/1614] fix: show chart tool tip in report currency (cherry picked from commit 827b3f454241a6e2b9e4a0bcc8bb15bfb4e7ef3e) --- erpnext/accounts/report/balance_sheet/balance_sheet.py | 8 ++++++-- erpnext/accounts/report/cash_flow/cash_flow.py | 6 ++++-- .../profit_and_loss_statement.py | 8 +++++--- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/erpnext/accounts/report/balance_sheet/balance_sheet.py b/erpnext/accounts/report/balance_sheet/balance_sheet.py index e89a177a867..274c8a7a371 100644 --- a/erpnext/accounts/report/balance_sheet/balance_sheet.py +++ b/erpnext/accounts/report/balance_sheet/balance_sheet.py @@ -95,7 +95,7 @@ def execute(filters=None): filters.periodicity, period_list, filters.accumulated_values, company=filters.company ) - chart = get_chart_data(filters, columns, asset, liability, equity) + chart = get_chart_data(filters, columns, asset, liability, equity, currency) report_summary, primitive_summary = get_report_summary( period_list, asset, liability, equity, provisional_profit_loss, currency, filters @@ -221,7 +221,7 @@ def get_report_summary( ], (net_asset - net_liability + net_equity) -def get_chart_data(filters, columns, asset, liability, equity): +def get_chart_data(filters, columns, asset, liability, equity, currency): labels = [d.get("label") for d in columns[2:]] asset_data, liability_data, equity_data = [], [], [] @@ -249,4 +249,8 @@ def get_chart_data(filters, columns, asset, liability, equity): else: chart["type"] = "line" + chart["fieldtype"] = "Currency" + chart["options"] = "currency" + chart["currency"] = currency + return chart diff --git a/erpnext/accounts/report/cash_flow/cash_flow.py b/erpnext/accounts/report/cash_flow/cash_flow.py index c034f95ec00..9b441671415 100644 --- a/erpnext/accounts/report/cash_flow/cash_flow.py +++ b/erpnext/accounts/report/cash_flow/cash_flow.py @@ -111,7 +111,7 @@ def execute(filters=None): ) columns = get_columns(filters.periodicity, period_list, filters.accumulated_values, filters.company) - chart = get_chart_data(columns, data) + chart = get_chart_data(columns, data, company_currency) report_summary = get_report_summary(summary_data, company_currency) @@ -252,7 +252,7 @@ def get_report_summary(summary_data, currency): return report_summary -def get_chart_data(columns, data): +def get_chart_data(columns, data, currency): labels = [d.get("label") for d in columns[2:]] datasets = [ { @@ -267,5 +267,7 @@ def get_chart_data(columns, data): chart = {"data": {"labels": labels, "datasets": datasets}, "type": "bar"} chart["fieldtype"] = "Currency" + chart["options"] = "currency" + chart["currency"] = currency return chart diff --git a/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py b/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py index 58610b22a93..35453f2ec44 100644 --- a/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py +++ b/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py @@ -59,11 +59,11 @@ def execute(filters=None): columns = get_columns(filters.periodicity, period_list, filters.accumulated_values, filters.company) - chart = get_chart_data(filters, columns, income, expense, net_profit_loss) - currency = filters.presentation_currency or frappe.get_cached_value( "Company", filters.company, "default_currency" ) + chart = get_chart_data(filters, columns, income, expense, net_profit_loss, currency) + report_summary, primitive_summary = get_report_summary( period_list, filters.periodicity, income, expense, net_profit_loss, currency, filters ) @@ -152,7 +152,7 @@ def get_net_profit_loss(income, expense, period_list, company, currency=None, co return net_profit_loss -def get_chart_data(filters, columns, income, expense, net_profit_loss): +def get_chart_data(filters, columns, income, expense, net_profit_loss, currency): labels = [d.get("label") for d in columns[2:]] income_data, expense_data, net_profit = [], [], [] @@ -181,5 +181,7 @@ def get_chart_data(filters, columns, income, expense, net_profit_loss): chart["type"] = "line" chart["fieldtype"] = "Currency" + chart["options"] = "currency" + chart["currency"] = currency return chart From 927f80035d4796bb1f75cede6c7aba16035bb5b7 Mon Sep 17 00:00:00 2001 From: venkat102 Date: Fri, 20 Sep 2024 12:22:03 +0530 Subject: [PATCH 0151/1614] fix: add currency in financial statement (cherry picked from commit 91a27bda842cc6d86f65daa35bcc9d68921ab805) --- .../consolidated_financial_statement.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.py b/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.py index 2931b728a42..e6aa215924d 100644 --- a/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.py +++ b/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.py @@ -115,7 +115,7 @@ def get_balance_sheet_data(fiscal_year, companies, columns, filters): True, ) - chart = get_chart_data(filters, columns, asset, liability, equity) + chart = get_chart_data(filters, columns, asset, liability, equity, company_currency) return data, message, chart, report_summary @@ -173,7 +173,7 @@ def get_profit_loss_data(fiscal_year, companies, columns, filters): if net_profit_loss: data.append(net_profit_loss) - chart = get_pl_chart_data(filters, columns, income, expense, net_profit_loss) + chart = get_pl_chart_data(filters, columns, income, expense, net_profit_loss, company_currency) report_summary, primitive_summary = get_pl_summary( companies, "", income, expense, net_profit_loss, company_currency, filters, True From 05c92cce71152f944086c272199540a2d323703b Mon Sep 17 00:00:00 2001 From: venkat102 Date: Fri, 20 Sep 2024 10:53:45 +0530 Subject: [PATCH 0152/1614] fix: change dynamic link doctype fieldtype to data (cherry picked from commit 1e46f7344af08a89b8daf82c0dba394290b1bf7b) --- .../general_and_payment_ledger_comparison.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/report/general_and_payment_ledger_comparison/general_and_payment_ledger_comparison.py b/erpnext/accounts/report/general_and_payment_ledger_comparison/general_and_payment_ledger_comparison.py index 89cf7e504f0..9d079eb9ebd 100644 --- a/erpnext/accounts/report/general_and_payment_ledger_comparison/general_and_payment_ledger_comparison.py +++ b/erpnext/accounts/report/general_and_payment_ledger_comparison/general_and_payment_ledger_comparison.py @@ -199,8 +199,7 @@ class General_Payment_Ledger_Comparison: dict( label=_("Voucher Type"), fieldname="voucher_type", - fieldtype="Link", - options="DocType", + fieldtype="Data", width="100", ) ) @@ -219,8 +218,7 @@ class General_Payment_Ledger_Comparison: dict( label=_("Party Type"), fieldname="party_type", - fieldtype="Link", - options="DocType", + fieldtype="Data", width="100", ) ) From b99ca7d9e988a09e32a9f85848184c829b805648 Mon Sep 17 00:00:00 2001 From: "Nihantra C. Patel" <141945075+Nihantra-Patel@users.noreply.github.com> Date: Tue, 17 Sep 2024 14:51:26 +0530 Subject: [PATCH 0153/1614] fix: partial return on POS invoice (cherry picked from commit 76289fa8dcf3ee670d9c6976e4d53e7ce230cb6c) --- erpnext/accounts/doctype/pos_invoice/pos_invoice.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/pos_invoice/pos_invoice.py b/erpnext/accounts/doctype/pos_invoice/pos_invoice.py index d517c9d6da2..ce3da4ac7dd 100644 --- a/erpnext/accounts/doctype/pos_invoice/pos_invoice.py +++ b/erpnext/accounts/doctype/pos_invoice/pos_invoice.py @@ -452,8 +452,8 @@ class POSInvoice(SalesInvoice): if self.is_return: invoice_total = self.rounded_total or self.grand_total total_amount_in_payments = flt(total_amount_in_payments, self.precision("grand_total")) - if total_amount_in_payments and total_amount_in_payments < invoice_total: - frappe.throw(_("Total payments amount can't be greater than {}").format(-invoice_total)) + if total_amount_in_payments and total_amount_in_payments > invoice_total: + frappe.throw(_("Total payments amount can't be greater than {}").format(invoice_total)) def validate_company_with_pos_company(self): if self.company != frappe.db.get_value("POS Profile", self.pos_profile, "company"): From 998fef779bc2aba5ebd7e3b7d98189c1a8f388f3 Mon Sep 17 00:00:00 2001 From: "Nihantra C. Patel" <141945075+Nihantra-Patel@users.noreply.github.com> Date: Tue, 17 Sep 2024 15:35:07 +0530 Subject: [PATCH 0154/1614] fix: partial return on POS invoice (cherry picked from commit 18bdd06652ff3cc772214fa7c6ed620554eddbb7) --- erpnext/accounts/doctype/pos_invoice/pos_invoice.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/pos_invoice/pos_invoice.py b/erpnext/accounts/doctype/pos_invoice/pos_invoice.py index ce3da4ac7dd..17e777197cb 100644 --- a/erpnext/accounts/doctype/pos_invoice/pos_invoice.py +++ b/erpnext/accounts/doctype/pos_invoice/pos_invoice.py @@ -449,11 +449,11 @@ class POSInvoice(SalesInvoice): if self.is_return and entry.amount > 0: frappe.throw(_("Row #{0} (Payment Table): Amount must be negative").format(entry.idx)) - if self.is_return: + if self.is_return and self.docstatus != 0: invoice_total = self.rounded_total or self.grand_total total_amount_in_payments = flt(total_amount_in_payments, self.precision("grand_total")) - if total_amount_in_payments and total_amount_in_payments > invoice_total: - frappe.throw(_("Total payments amount can't be greater than {}").format(invoice_total)) + if total_amount_in_payments and total_amount_in_payments < invoice_total: + frappe.throw(_("Total payments amount can't be greater than {}").format(-invoice_total)) def validate_company_with_pos_company(self): if self.company != frappe.db.get_value("POS Profile", self.pos_profile, "company"): From e06a01fae5dd5b42f54fcccf9c8c38106087b37e Mon Sep 17 00:00:00 2001 From: barredterra <14891507+barredterra@users.noreply.github.com> Date: Thu, 19 Sep 2024 13:57:55 +0200 Subject: [PATCH 0155/1614] fix(Payment Reconciliation): German translations (cherry picked from commit 32d4f96e025875492fadfdd2c776f2230d5b93b3) --- erpnext/translations/de.csv | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/erpnext/translations/de.csv b/erpnext/translations/de.csv index b9d790d2428..ed05b8d6695 100644 --- a/erpnext/translations/de.csv +++ b/erpnext/translations/de.csv @@ -4480,10 +4480,23 @@ Payment Reconciliation,Zahlungsabgleich, Receivable / Payable Account,Forderungen-/Verbindlichkeiten-Konto, Bank / Cash Account,Bank / Geldkonto, From Invoice Date,Ab Rechnungsdatum, -To Invoice Date,Um Datum Rechnung, -Minimum Invoice Amount,Mindestabrechnung, +To Invoice Date,Bis Rechnungsdatum, +Invoice Limit,Max. Anzahl Rechnungen, +From Payment Date,Ab Zahlungsdatum, +To Payment Date,Bis Zahlungsdatum, +Payment Limit,Max. Anzahl Zahlungen, +Minimum Invoice Amount,Minimaler Rechnungsbetrag, Maximum Invoice Amount,Maximaler Rechnungsbetrag, -System will fetch all the entries if limit value is zero.,"Das System ruft alle Einträge ab, wenn der Grenzwert Null ist.", +Minimum Payment Amount,Minimaler Zahlungsbetrag, +Maximum Payment Amount,Maximaler Zahlungsbetrag, +Filter on Invoice,Filter auf Rechnungsnr., +Filter on Payment,Filter auf Zahlungsnr., +"If you need to reconcile particular transactions against each other, then please select accordingly. If not, all the transactions will be allocated in FIFO order.","Wenn Sie bestimmte Transaktionen gegeneinander abgleichen müssen, wählen Sie diese bitte entsprechend aus. Andernfalls werden alle Transaktionen in FIFO-Reihenfolge zugewiesen.", +System will fetch all the entries if limit value is zero.,"Das System ruft alle Einträge ab, wenn die max. Anzahl Null ist.", +This filter will be applied to Journal Entry.,Dieser Filter wird auf Buchungssätze angewendet., +Unreconciled Entries,Nicht zugeordnete Buchungen, +Allocated Entries,Zugewiesene Buchungen, +Accounting Dimensions Filter,Filetr nach Buchhaltungsdimensionen, Get Unreconciled Entries,Nicht zugeordnete Buchungen aufrufen, Unreconciled Payment Details,Nicht abgeglichene Zahlungen, Invoice/Journal Entry Details,Einzelheiten zu Rechnungs-/Journalbuchungen, From 085a4c61ac3ebef34b16f7e713d03809594fd455 Mon Sep 17 00:00:00 2001 From: barredterra <14891507+barredterra@users.noreply.github.com> Date: Wed, 18 Sep 2024 19:39:51 +0200 Subject: [PATCH 0156/1614] fix: shipping rule must match the company (cherry picked from commit df8f4086f6df9dcb3eed012c3b9865fef3388584) --- erpnext/public/js/utils/sales_common.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/public/js/utils/sales_common.js b/erpnext/public/js/utils/sales_common.js index 91a85aa02a5..e503fb3339c 100644 --- a/erpnext/public/js/utils/sales_common.js +++ b/erpnext/public/js/utils/sales_common.js @@ -15,10 +15,11 @@ erpnext.sales_common = { onload() { super.onload(); this.setup_queries(); - this.frm.set_query("shipping_rule", function () { + this.frm.set_query("shipping_rule", function (doc) { return { filters: { shipping_rule_type: "Selling", + company: doc.company, }, }; }); From 99e004b61962c4463ba8b18985835295d5711b03 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Tue, 17 Sep 2024 19:10:31 +0530 Subject: [PATCH 0157/1614] fix: item_query in pos_invoice (cherry picked from commit 7f82a06e657d71c7205189c197a46394e78fd8d0) --- .../doctype/pos_invoice/pos_invoice.js | 13 +++++++++ .../doctype/pos_invoice/pos_invoice.py | 28 +++++++++++++++++++ 2 files changed, 41 insertions(+) diff --git a/erpnext/accounts/doctype/pos_invoice/pos_invoice.js b/erpnext/accounts/doctype/pos_invoice/pos_invoice.js index a6e8bfa6286..8707ee88860 100644 --- a/erpnext/accounts/doctype/pos_invoice/pos_invoice.js +++ b/erpnext/accounts/doctype/pos_invoice/pos_invoice.js @@ -40,6 +40,19 @@ erpnext.selling.POSInvoiceController = class POSInvoiceController extends erpnex }; }); + this.frm.set_query("item_code", "items", function (doc) { + return { + query: "erpnext.accounts.doctype.pos_invoice.pos_invoice.item_query", + filters: { + has_variants: ["=", 0], + is_sales_item: ["=", 1], + disabled: ["=", 0], + is_fixed_asset: ["=", 0], + pos_profile: ["=", doc.pos_profile], + }, + }; + }); + erpnext.accounts.dimensions.setup_dimension_filters(this.frm, this.frm.doctype); } diff --git a/erpnext/accounts/doctype/pos_invoice/pos_invoice.py b/erpnext/accounts/doctype/pos_invoice/pos_invoice.py index 17e777197cb..742af7dd0fe 100644 --- a/erpnext/accounts/doctype/pos_invoice/pos_invoice.py +++ b/erpnext/accounts/doctype/pos_invoice/pos_invoice.py @@ -6,6 +6,7 @@ import frappe from frappe import _, bold from frappe.query_builder.functions import IfNull, Sum from frappe.utils import cint, flt, get_link_to_form, getdate, nowdate +from frappe.utils.nestedset import get_descendants_of from erpnext.accounts.doctype.loyalty_program.loyalty_program import validate_loyalty_points from erpnext.accounts.doctype.payment_request.payment_request import make_payment_request @@ -15,6 +16,7 @@ from erpnext.accounts.doctype.sales_invoice.sales_invoice import ( update_multi_mode_option, ) from erpnext.accounts.party import get_due_date, get_party_account +from erpnext.controllers.queries import item_query as _item_query from erpnext.stock.doctype.serial_no.serial_no import get_serial_nos @@ -837,3 +839,29 @@ def add_return_modes(doc, pos_profile): ]: payment_mode = get_mode_of_payment_info(mode_of_payment, doc.company) append_payment(payment_mode[0]) + + +@frappe.whitelist() +@frappe.validate_and_sanitize_search_inputs +def item_query(doctype, txt, searchfield, start, page_len, filters, as_dict=False): + if pos_profile := filters.get("pos_profile")[1]: + pos_profile = frappe.get_cached_doc("POS Profile", pos_profile) + if item_groups := get_item_group(pos_profile): + filters["item_group"] = ["in", tuple(item_groups)] + + del filters["pos_profile"] + + else: + filters.pop("pos_profile", None) + + return _item_query(doctype, txt, searchfield, start, page_len, filters, as_dict) + + +def get_item_group(pos_profile): + item_groups = [] + if pos_profile.get("item_groups"): + # Get items based on the item groups defined in the POS profile + for row in pos_profile.get("item_groups"): + item_groups.extend(get_descendants_of("Item Group", row.item_group)) + + return list(set(item_groups)) From 10ecdb99fe565d5f4ebedb034f5cbad1c246a865 Mon Sep 17 00:00:00 2001 From: Kavin <78342682+kavin0411@users.noreply.github.com> Date: Fri, 20 Sep 2024 14:29:10 +0530 Subject: [PATCH 0158/1614] fix: update clearance date in invoice payment table (cherry picked from commit 487c2a29a6bf265d59dc3331938c48b943adfd65) --- .../doctype/bank_clearance/bank_clearance.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/bank_clearance/bank_clearance.py b/erpnext/accounts/doctype/bank_clearance/bank_clearance.py index 85713c6c9a6..bdc2464da27 100644 --- a/erpnext/accounts/doctype/bank_clearance/bank_clearance.py +++ b/erpnext/accounts/doctype/bank_clearance/bank_clearance.py @@ -108,8 +108,17 @@ class BankClearance(Document): if not d.clearance_date: d.clearance_date = None - payment_entry = frappe.get_doc(d.payment_document, d.payment_entry) - payment_entry.db_set("clearance_date", d.clearance_date) + if d.payment_document == "Sales Invoice": + frappe.db.set_value( + "Sales Invoice Payment", + {"parent": d.payment_entry, "account": self.get("account"), "amount": [">", 0]}, + "clearance_date", + d.clearance_date, + ) + + else: + payment_entry = frappe.get_doc(d.payment_document, d.payment_entry) + payment_entry.db_set("clearance_date", d.clearance_date) clearance_date_updated = True From 9d2cbccff2d82456a86c91f86e78e290621035f6 Mon Sep 17 00:00:00 2001 From: Kavin <78342682+kavin0411@users.noreply.github.com> Date: Fri, 20 Sep 2024 14:33:03 +0530 Subject: [PATCH 0159/1614] test: add test case for updating clearance date on pos invoice (cherry picked from commit ce8600520f56960dffd50bbf04e471037f7ee13c) --- .../bank_clearance/test_bank_clearance.py | 81 ++++++++++++++++++- 1 file changed, 80 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/bank_clearance/test_bank_clearance.py b/erpnext/accounts/doctype/bank_clearance/test_bank_clearance.py index d785bfbfef2..658a69a4803 100644 --- a/erpnext/accounts/doctype/bank_clearance/test_bank_clearance.py +++ b/erpnext/accounts/doctype/bank_clearance/test_bank_clearance.py @@ -6,16 +6,29 @@ import unittest import frappe from frappe.utils import add_months, getdate +from erpnext.accounts.doctype.cost_center.test_cost_center import create_cost_center from erpnext.accounts.doctype.payment_entry.test_payment_entry import get_payment_entry from erpnext.accounts.doctype.purchase_invoice.test_purchase_invoice import make_purchase_invoice +from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice +from erpnext.stock.doctype.item.test_item import create_item +from erpnext.stock.doctype.warehouse.test_warehouse import create_warehouse from erpnext.tests.utils import if_lending_app_installed, if_lending_app_not_installed class TestBankClearance(unittest.TestCase): @classmethod def setUpClass(cls): + create_warehouse( + warehouse_name="_Test Warehouse", + properties={"parent_warehouse": "All Warehouses - _TC"}, + company="_Test Company", + ) + create_item("_Test Item") + create_cost_center(cost_center_name="_Test Cost Center", company="_Test Company") + clear_payment_entries() clear_loan_transactions() + clear_pos_sales_invoices() make_bank_account() add_transactions() @@ -83,11 +96,41 @@ class TestBankClearance(unittest.TestCase): bank_clearance.get_payment_entries() self.assertEqual(len(bank_clearance.payment_entries), 3) + def test_update_clearance_date_on_si(self): + sales_invoice = make_pos_sales_invoice() + + date = getdate() + bank_clearance = frappe.get_doc("Bank Clearance") + bank_clearance.account = "_Test Bank Clearance - _TC" + bank_clearance.from_date = add_months(date, -1) + bank_clearance.to_date = date + bank_clearance.include_pos_transactions = 1 + bank_clearance.get_payment_entries() + + self.assertNotEqual(len(bank_clearance.payment_entries), 0) + for payment in bank_clearance.payment_entries: + if payment.payment_entry == sales_invoice.name: + payment.clearance_date = date + + bank_clearance.update_clearance_date() + + si_clearance_date = frappe.db.get_value( + "Sales Invoice Payment", + {"parent": sales_invoice.name, "account": bank_clearance.account}, + "clearance_date", + ) + + self.assertEqual(si_clearance_date, date) + def clear_payment_entries(): frappe.db.delete("Payment Entry") +def clear_pos_sales_invoices(): + frappe.db.delete("Sales Invoice", {"is_pos": 1}) + + @if_lending_app_installed def clear_loan_transactions(): for dt in [ @@ -115,9 +158,45 @@ def add_transactions(): def make_payment_entry(): - pi = make_purchase_invoice(supplier="_Test Supplier", qty=1, rate=690) + from erpnext.buying.doctype.supplier.test_supplier import create_supplier + + supplier = create_supplier(supplier_name="_Test Supplier") + pi = make_purchase_invoice( + supplier=supplier, + supplier_warehouse="_Test Warehouse - _TC", + expense_account="Cost of Goods Sold - _TC", + uom="Nos", + qty=1, + rate=690, + ) pe = get_payment_entry("Purchase Invoice", pi.name, bank_account="_Test Bank Clearance - _TC") pe.reference_no = "Conrad Oct 18" pe.reference_date = "2018-10-24" pe.insert() pe.submit() + + +def make_pos_sales_invoice(): + from erpnext.accounts.doctype.opening_invoice_creation_tool.test_opening_invoice_creation_tool import ( + make_customer, + ) + + mode_of_payment = frappe.get_doc({"doctype": "Mode of Payment", "name": "Cash"}) + + if not frappe.db.get_value("Mode of Payment Account", {"company": "_Test Company", "parent": "Cash"}): + mode_of_payment.append( + "accounts", {"company": "_Test Company", "default_account": "_Test Bank Clearance - _TC"} + ) + mode_of_payment.save() + + customer = make_customer(customer="_Test Customer") + + si = create_sales_invoice(customer=customer, item="_Test Item", is_pos=1, qty=1, rate=1000, do_not_save=1) + si.set("payments", []) + si.append( + "payments", {"mode_of_payment": "Cash", "account": "_Test Bank Clearance - _TC", "amount": 1000} + ) + si.insert() + si.submit() + + return si From 8bc76bae9cfdf40e59acaa3e8b3bbe03699125ab Mon Sep 17 00:00:00 2001 From: Kavin <78342682+kavin0411@users.noreply.github.com> Date: Fri, 20 Sep 2024 18:24:00 +0530 Subject: [PATCH 0160/1614] refactor: update clearance date in payment entry (cherry picked from commit c218f7527f77e24236dee41091e0a47dbb826b6d) --- erpnext/accounts/doctype/bank_clearance/bank_clearance.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/bank_clearance/bank_clearance.py b/erpnext/accounts/doctype/bank_clearance/bank_clearance.py index bdc2464da27..92abb8cea89 100644 --- a/erpnext/accounts/doctype/bank_clearance/bank_clearance.py +++ b/erpnext/accounts/doctype/bank_clearance/bank_clearance.py @@ -117,8 +117,9 @@ class BankClearance(Document): ) else: - payment_entry = frappe.get_doc(d.payment_document, d.payment_entry) - payment_entry.db_set("clearance_date", d.clearance_date) + frappe.db.set_value( + d.payment_document, d.payment_entry, "clearance_date", d.clearance_date + ) clearance_date_updated = True From f36a68b42b70cf8a9905aeb090f8e54d827b9733 Mon Sep 17 00:00:00 2001 From: Smit Vora Date: Wed, 4 Sep 2024 13:13:57 +0530 Subject: [PATCH 0161/1614] Merge pull request #42925 from Ninad1306/mapping_docs_fix fix: Replace `add_if_empty` with `reset_value` flag --- erpnext/accounts/doctype/sales_invoice/sales_invoice.py | 2 +- erpnext/buying/doctype/purchase_order/purchase_order.py | 4 ++-- erpnext/selling/doctype/quotation/quotation.py | 4 ++-- erpnext/selling/doctype/sales_order/sales_order.py | 7 +++++-- erpnext/stock/doctype/delivery_note/delivery_note.py | 2 +- erpnext/stock/doctype/purchase_receipt/purchase_receipt.py | 2 +- 6 files changed, 12 insertions(+), 9 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 010d3b8bcd5..529086228de 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -2123,7 +2123,7 @@ def make_delivery_note(source_name, target_doc=None): "postprocess": update_item, "condition": lambda doc: doc.delivered_by_supplier != 1, }, - "Sales Taxes and Charges": {"doctype": "Sales Taxes and Charges", "add_if_empty": True}, + "Sales Taxes and Charges": {"doctype": "Sales Taxes and Charges", "reset_value": True}, "Sales Team": { "doctype": "Sales Team", "field_map": {"incentives": "incentives"}, diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.py b/erpnext/buying/doctype/purchase_order/purchase_order.py index 14424dfdf4a..0ae10e4b5cd 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.py +++ b/erpnext/buying/doctype/purchase_order/purchase_order.py @@ -738,7 +738,7 @@ def make_purchase_receipt(source_name, target_doc=None): "condition": lambda doc: abs(doc.received_qty) < abs(doc.qty) and doc.delivered_by_supplier != 1, }, - "Purchase Taxes and Charges": {"doctype": "Purchase Taxes and Charges", "add_if_empty": True}, + "Purchase Taxes and Charges": {"doctype": "Purchase Taxes and Charges", "reset_value": True}, }, target_doc, set_missing_values, @@ -819,7 +819,7 @@ def get_mapped_purchase_invoice(source_name, target_doc=None, ignore_permissions "postprocess": update_item, "condition": lambda doc: (doc.base_amount == 0 or abs(doc.billed_amt) < abs(doc.amount)), }, - "Purchase Taxes and Charges": {"doctype": "Purchase Taxes and Charges", "add_if_empty": True}, + "Purchase Taxes and Charges": {"doctype": "Purchase Taxes and Charges", "reset_value": True}, } doc = get_mapped_doc( diff --git a/erpnext/selling/doctype/quotation/quotation.py b/erpnext/selling/doctype/quotation/quotation.py index 7ebcb329193..2d7fef2d6e0 100644 --- a/erpnext/selling/doctype/quotation/quotation.py +++ b/erpnext/selling/doctype/quotation/quotation.py @@ -430,7 +430,7 @@ def _make_sales_order(source_name, target_doc=None, ignore_permissions=False): "postprocess": update_item, "condition": can_map_row, }, - "Sales Taxes and Charges": {"doctype": "Sales Taxes and Charges", "add_if_empty": True}, + "Sales Taxes and Charges": {"doctype": "Sales Taxes and Charges", "reset_value": True}, "Sales Team": {"doctype": "Sales Team", "add_if_empty": True}, "Payment Schedule": {"doctype": "Payment Schedule", "add_if_empty": True}, }, @@ -495,7 +495,7 @@ def _make_sales_invoice(source_name, target_doc=None, ignore_permissions=False): "postprocess": update_item, "condition": lambda row: not row.is_alternative, }, - "Sales Taxes and Charges": {"doctype": "Sales Taxes and Charges", "add_if_empty": True}, + "Sales Taxes and Charges": {"doctype": "Sales Taxes and Charges", "reset_value": True}, "Sales Team": {"doctype": "Sales Team", "add_if_empty": True}, }, target_doc, diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py index 2f2d840cce8..4804080be38 100755 --- a/erpnext/selling/doctype/sales_order/sales_order.py +++ b/erpnext/selling/doctype/sales_order/sales_order.py @@ -933,7 +933,7 @@ def make_delivery_note(source_name, target_doc=None, kwargs=None): mapper = { "Sales Order": {"doctype": "Delivery Note", "validation": {"docstatus": ["=", 1]}}, - "Sales Taxes and Charges": {"doctype": "Sales Taxes and Charges", "add_if_empty": True}, + "Sales Taxes and Charges": {"doctype": "Sales Taxes and Charges", "reset_value": True}, "Sales Team": {"doctype": "Sales Team", "add_if_empty": True}, } @@ -1125,7 +1125,10 @@ def make_sales_invoice(source_name, target_doc=None, ignore_permissions=False): "condition": lambda doc: doc.qty and (doc.base_amount == 0 or abs(doc.billed_amt) < abs(doc.amount)), }, - "Sales Taxes and Charges": {"doctype": "Sales Taxes and Charges", "add_if_empty": True}, + "Sales Taxes and Charges": { + "doctype": "Sales Taxes and Charges", + "reset_value": True, + }, "Sales Team": {"doctype": "Sales Team", "add_if_empty": True}, }, target_doc, diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.py b/erpnext/stock/doctype/delivery_note/delivery_note.py index 5d95e7b66d3..76323c0a7e6 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note.py +++ b/erpnext/stock/doctype/delivery_note/delivery_note.py @@ -1030,7 +1030,7 @@ def make_sales_invoice(source_name, target_doc=None, args=None): }, "Sales Taxes and Charges": { "doctype": "Sales Taxes and Charges", - "add_if_empty": True, + "reset_value": True, "ignore": args.get("merge_taxes") if args else 0, }, "Sales Team": { diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py index 42b70a08222..67ee01b0d8f 100644 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py @@ -1214,7 +1214,7 @@ def make_purchase_invoice(source_name, target_doc=None, args=None): }, "Purchase Taxes and Charges": { "doctype": "Purchase Taxes and Charges", - "add_if_empty": True, + "reset_value": True, "ignore": args.get("merge_taxes") if args else 0, }, }, From 4278b081479fec9056f3bc3991977ba427d90da0 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 5 Sep 2024 14:32:41 +0530 Subject: [PATCH 0162/1614] Merge pull request #43065 from Ninad1306/merge_taxes_fix fix: Reset Value Conditionally Based on Merge Taxes --- erpnext/stock/doctype/delivery_note/delivery_note.py | 2 +- erpnext/stock/doctype/purchase_receipt/purchase_receipt.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.py b/erpnext/stock/doctype/delivery_note/delivery_note.py index 76323c0a7e6..d203b979c61 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note.py +++ b/erpnext/stock/doctype/delivery_note/delivery_note.py @@ -1030,7 +1030,7 @@ def make_sales_invoice(source_name, target_doc=None, args=None): }, "Sales Taxes and Charges": { "doctype": "Sales Taxes and Charges", - "reset_value": True, + "reset_value": not (args and args.get("merge_taxes")), "ignore": args.get("merge_taxes") if args else 0, }, "Sales Team": { diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py index 67ee01b0d8f..8b046203eee 100644 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py @@ -1214,7 +1214,7 @@ def make_purchase_invoice(source_name, target_doc=None, args=None): }, "Purchase Taxes and Charges": { "doctype": "Purchase Taxes and Charges", - "reset_value": True, + "reset_value": not (args and args.get("merge_taxes")), "ignore": args.get("merge_taxes") if args else 0, }, }, From 0a70b3ffccf9367eb0a650b18e78fbc3cf793f90 Mon Sep 17 00:00:00 2001 From: Ninad1306 Date: Tue, 24 Sep 2024 11:24:31 +0530 Subject: [PATCH 0163/1614] fix: frappe dependency update --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index aaac05d7ed0..d891b186d89 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,7 +29,7 @@ requires = ["flit_core >=3.4,<4"] build-backend = "flit_core.buildapi" [tool.bench.frappe-dependencies] -frappe = ">=15.10.0,<16.0.0" +frappe = ">=15.40.4,<16.0.0" [tool.ruff] line-length = 110 From ec27077d9cd5f3d5e832e35a32451cee7f5e3e6d Mon Sep 17 00:00:00 2001 From: Vishakh Desai Date: Mon, 16 Sep 2024 15:40:49 +0530 Subject: [PATCH 0164/1614] fix: set group_by condition if empty and voucher_no is set (cherry picked from commit a6b0cb6cac78a415caebaa9fbfd913f123842f55) --- erpnext/accounts/report/general_ledger/general_ledger.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/accounts/report/general_ledger/general_ledger.py b/erpnext/accounts/report/general_ledger/general_ledger.py index 2564eb0800f..1c1d10c087b 100644 --- a/erpnext/accounts/report/general_ledger/general_ledger.py +++ b/erpnext/accounts/report/general_ledger/general_ledger.py @@ -35,6 +35,9 @@ def execute(filters=None): if filters.get("party"): filters.party = frappe.parse_json(filters.get("party")) + if filters.get("voucher_no") and not filters.get("group_by"): + filters.group_by = "Group by Voucher (Consolidated)" + validate_filters(filters, account_details) validate_party(filters) From 176feb20ad62e4a137e5babcd363968af59b160a Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 24 Sep 2024 15:25:42 +0530 Subject: [PATCH 0165/1614] fix: stock dashboard (backport #43347) (#43349) fix: stock dashboard (#43347) (cherry picked from commit 9e8be8db511cdddc48cfe13218e202f1e4c31d6d) Co-authored-by: rohitwaghchaure --- .../dashboard_chart/oldest_items/oldest_items.json | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/erpnext/stock/dashboard_chart/oldest_items/oldest_items.json b/erpnext/stock/dashboard_chart/oldest_items/oldest_items.json index 9c10a5346be..46ad308f230 100644 --- a/erpnext/stock/dashboard_chart/oldest_items/oldest_items.json +++ b/erpnext/stock/dashboard_chart/oldest_items/oldest_items.json @@ -1,22 +1,23 @@ { "chart_name": "Oldest Items", "chart_type": "Report", - "creation": "2020-07-20 21:01:04.336845", + "creation": "2022-03-30 00:58:02.041721", "custom_options": "{\"colors\": [\"#5e64ff\"]}", "docstatus": 0, "doctype": "Dashboard Chart", - "dynamic_filters_json": "{\"company\":\"frappe.defaults.get_user_default(\\\"Company\\\")\",\"to_date\":\"frappe.datetime.nowdate()\"}", - "filters_json": "{\"range1\":30,\"range2\":60,\"range3\":90,\"show_warehouse_wise_stock\":0}", + "dynamic_filters_json": "{\"company\":\"frappe.defaults.get_user_default(\\\"Company\\\")\",\"to_date\":\"frappe.datetime.nowdate()\",\"range1\":\"30\",\"range2\":\"60\",\"range3\":\"90\"}", + "filters_json": "{\"range\":\"30, 60, 90\",\"show_warehouse_wise_stock\":0}", "idx": 0, "is_public": 1, "is_standard": 1, - "modified": "2020-07-29 14:50:26.846482", + "modified": "2024-09-23 22:37:51.392999", "modified_by": "Administrator", "module": "Stock", "name": "Oldest Items", "number_of_groups": 0, - "owner": "Administrator", + "owner": "rohitw1991@gmail.com", "report_name": "Stock Ageing", + "roles": [], "timeseries": 0, "type": "Bar", "use_report_chart": 1, From 979d801de5e2213474690a860be04db28c102d7b Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 24 Sep 2024 12:13:43 +0530 Subject: [PATCH 0166/1614] fix: AR / AP report to ignore 0.0 outstanding (cherry picked from commit 6e2cf79e2cf047c89367a5b446f338e65a484ba6) --- .../report/accounts_receivable/accounts_receivable.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py index 1a7638aaae4..43100c81285 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py @@ -310,8 +310,8 @@ class ReceivablePayableReport: must_consider = False if self.filters.get("for_revaluation_journals"): - if (abs(row.outstanding) >= 0.0 / 10**self.currency_precision) or ( - abs(row.outstanding_in_account_currency) >= 0.0 / 10**self.currency_precision + if (abs(row.outstanding) >= 1.0 / 10**self.currency_precision) or ( + abs(row.outstanding_in_account_currency) >= 1.0 / 10**self.currency_precision ): must_consider = True else: From 0e1884539ebfddd67c10f83f515bae23074fccf6 Mon Sep 17 00:00:00 2001 From: Khushi Rawat <142375893+khushi8112@users.noreply.github.com> Date: Mon, 23 Sep 2024 23:47:48 +0530 Subject: [PATCH 0167/1614] fix: added date condition --- .../asset_depreciations_and_balances.py | 53 +++++++++++-------- 1 file changed, 31 insertions(+), 22 deletions(-) diff --git a/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.py b/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.py index b288e8e5ac7..686aa22d6f6 100644 --- a/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.py +++ b/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.py @@ -114,7 +114,11 @@ def get_asset_categories_for_grouped_by_category(filters): end), 0) as cost_of_scrapped_asset from `tabAsset` a where docstatus=1 and company=%(company)s and purchase_date <= %(to_date)s {condition} - and not exists(select name from `tabAsset Capitalization Asset Item` where asset = a.name) + and not exists( + select 1 from `tabAsset Capitalization Asset Item` acai join `tabAsset Capitalization` ac on acai.parent=ac.name + where acai.asset = a.name + and ac.posting_date between %(from_date)s AND %(to_date)s + ) group by a.asset_category """, { @@ -131,53 +135,58 @@ def get_asset_categories_for_grouped_by_category(filters): def get_asset_details_for_grouped_by_category(filters): condition = "" if filters.get("asset"): - condition += " and name = %(asset)s" + condition += " and a.name = %(asset)s" if filters.get("finance_book"): - condition += " and exists (select 1 from `tabAsset Depreciation Schedule` ads where ads.asset = `tabAsset`.name and ads.finance_book = %(finance_book)s)" + condition += " and exists (select 1 from `tabAsset Depreciation Schedule` ads where ads.asset = a.name and ads.finance_book = %(finance_book)s)" # nosemgrep return frappe.db.sql( f""" - SELECT name, - ifnull(sum(case when purchase_date < %(from_date)s then - case when ifnull(disposal_date, 0) = 0 or disposal_date >= %(from_date)s then - gross_purchase_amount + SELECT a.name, + ifnull(sum(case when a.purchase_date < %(from_date)s then + case when ifnull(a.disposal_date, 0) = 0 or a.disposal_date >= %(from_date)s then + a.gross_purchase_amount else 0 end else 0 end), 0) as cost_as_on_from_date, - ifnull(sum(case when purchase_date >= %(from_date)s then - gross_purchase_amount + ifnull(sum(case when a.purchase_date >= %(from_date)s then + a.gross_purchase_amount else 0 end), 0) as cost_of_new_purchase, - ifnull(sum(case when ifnull(disposal_date, 0) != 0 - and disposal_date >= %(from_date)s - and disposal_date <= %(to_date)s then - case when status = "Sold" then - gross_purchase_amount + ifnull(sum(case when ifnull(a.disposal_date, 0) != 0 + and a.disposal_date >= %(from_date)s + and a.disposal_date <= %(to_date)s then + case when a.status = "Sold" then + a.gross_purchase_amount else 0 end else 0 end), 0) as cost_of_sold_asset, - ifnull(sum(case when ifnull(disposal_date, 0) != 0 - and disposal_date >= %(from_date)s - and disposal_date <= %(to_date)s then - case when status = "Scrapped" then - gross_purchase_amount + ifnull(sum(case when ifnull(a.disposal_date, 0) != 0 + and a.disposal_date >= %(from_date)s + and a.disposal_date <= %(to_date)s then + case when a.status = "Scrapped" then + a.gross_purchase_amount else 0 end else 0 end), 0) as cost_of_scrapped_asset - from `tabAsset` - where docstatus=1 and company=%(company)s and purchase_date <= %(to_date)s {condition} - group by name + from `tabAsset` a + where a.docstatus=1 and a.company=%(company)s and a.purchase_date <= %(to_date)s {condition} + and not exists( + select 1 from `tabAsset Capitalization Asset Item` acai join `tabAsset Capitalization` ac on acai.parent=ac.name + where acai.asset = a.name + and ac.posting_date between %(from_date)s AND %(to_date)s + ) + group by a.name """, { "to_date": filters.to_date, From 1f423029970cb911c5a97d8b3ce92a02b151ea7e Mon Sep 17 00:00:00 2001 From: Khushi Rawat <142375893+khushi8112@users.noreply.github.com> Date: Tue, 24 Sep 2024 01:41:54 +0530 Subject: [PATCH 0168/1614] fix(minor): include condition to check docstatus --- .../asset_depreciations_and_balances.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.py b/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.py index 686aa22d6f6..5e399029e31 100644 --- a/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.py +++ b/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.py @@ -68,7 +68,7 @@ def get_group_by_asset_category_data(filters): def get_asset_categories_for_grouped_by_category(filters): condition = "" if filters.get("asset_category"): - condition += " and asset_category = %(asset_category)s" + condition += " and a.asset_category = %(asset_category)s" if filters.get("finance_book"): condition += " and exists (select 1 from `tabAsset Depreciation Schedule` ads where ads.asset = a.name and ads.finance_book = %(finance_book)s)" @@ -113,11 +113,12 @@ def get_asset_categories_for_grouped_by_category(filters): 0 end), 0) as cost_of_scrapped_asset from `tabAsset` a - where docstatus=1 and company=%(company)s and purchase_date <= %(to_date)s {condition} + where a.docstatus=1 and a.company=%(company)s and a.purchase_date <= %(to_date)s {condition} and not exists( select 1 from `tabAsset Capitalization Asset Item` acai join `tabAsset Capitalization` ac on acai.parent=ac.name where acai.asset = a.name - and ac.posting_date between %(from_date)s AND %(to_date)s + and ac.posting_date <= %(to_date)s + and ac.docstatus=1 ) group by a.asset_category """, @@ -184,7 +185,8 @@ def get_asset_details_for_grouped_by_category(filters): and not exists( select 1 from `tabAsset Capitalization Asset Item` acai join `tabAsset Capitalization` ac on acai.parent=ac.name where acai.asset = a.name - and ac.posting_date between %(from_date)s AND %(to_date)s + and ac.posting_date <= %(to_date)s + and ac.docstatus=1 ) group by a.name """, From 4e621b09ba48bf9aed11d5a5d2bbe0553eaf3eb6 Mon Sep 17 00:00:00 2001 From: Khushi Rawat <142375893+khushi8112@users.noreply.github.com> Date: Tue, 24 Sep 2024 17:40:33 +0530 Subject: [PATCH 0169/1614] style: added comment --- .../asset_depreciations_and_balances.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.py b/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.py index 5e399029e31..64e6a340464 100644 --- a/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.py +++ b/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.py @@ -37,7 +37,7 @@ def get_group_by_asset_category_data(filters): - flt(row.cost_of_sold_asset) - flt(row.cost_of_scrapped_asset) ) - + # Update row with corresponding asset data row.update( next( asset From cfea2de131fb5a32d3716d55a46cb1285266da2c Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 24 Sep 2024 16:20:50 +0200 Subject: [PATCH 0170/1614] fix(Bank Account): dashboard connections (backport #43365) (#43367) Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com> Co-authored-by: rohitwaghchaure fix(Bank Account): dashboard connections (#43365) --- .../doctype/bank_account/bank_account.json | 52 +++++++++++++++++-- .../bank_account/bank_account_dashboard.py | 20 ------- 2 files changed, 49 insertions(+), 23 deletions(-) delete mode 100644 erpnext/accounts/doctype/bank_account/bank_account_dashboard.py diff --git a/erpnext/accounts/doctype/bank_account/bank_account.json b/erpnext/accounts/doctype/bank_account/bank_account.json index 32f1c675d3b..a5a7691eb76 100644 --- a/erpnext/accounts/doctype/bank_account/bank_account.json +++ b/erpnext/accounts/doctype/bank_account/bank_account.json @@ -208,8 +208,54 @@ "label": "Disabled" } ], - "links": [], - "modified": "2023-09-22 21:31:34.763977", + "links": [ + { + "group": "Transactions", + "link_doctype": "Payment Request", + "link_fieldname": "bank_account" + }, + { + "group": "Transactions", + "link_doctype": "Payment Order", + "link_fieldname": "bank_account" + }, + { + "group": "Transactions", + "link_doctype": "Bank Guarantee", + "link_fieldname": "bank_account" + }, + { + "group": "Transactions", + "link_doctype": "Payroll Entry", + "link_fieldname": "bank_account" + }, + { + "group": "Transactions", + "link_doctype": "Bank Transaction", + "link_fieldname": "bank_account" + }, + { + "group": "Accounting", + "link_doctype": "Payment Entry", + "link_fieldname": "bank_account" + }, + { + "group": "Accounting", + "link_doctype": "Journal Entry", + "link_fieldname": "bank_account" + }, + { + "group": "Party", + "link_doctype": "Customer", + "link_fieldname": "default_bank_account" + }, + { + "group": "Party", + "link_doctype": "Supplier", + "link_fieldname": "default_bank_account" + } + ], + "modified": "2024-09-24 06:57:41.292970", "modified_by": "Administrator", "module": "Accounts", "name": "Bank Account", @@ -246,4 +292,4 @@ "sort_order": "DESC", "states": [], "track_changes": 1 -} \ No newline at end of file +} diff --git a/erpnext/accounts/doctype/bank_account/bank_account_dashboard.py b/erpnext/accounts/doctype/bank_account/bank_account_dashboard.py deleted file mode 100644 index 8bf8d8a5cd0..00000000000 --- a/erpnext/accounts/doctype/bank_account/bank_account_dashboard.py +++ /dev/null @@ -1,20 +0,0 @@ -from frappe import _ - - -def get_data(): - return { - "fieldname": "bank_account", - "non_standard_fieldnames": { - "Customer": "default_bank_account", - "Supplier": "default_bank_account", - }, - "transactions": [ - { - "label": _("Payments"), - "items": ["Payment Entry", "Payment Request", "Payment Order", "Payroll Entry"], - }, - {"label": _("Party"), "items": ["Customer", "Supplier"]}, - {"items": ["Bank Guarantee"]}, - {"items": ["Journal Entry"]}, - ], - } From 0722aa5a3f5c318110933fadd38303d690d0db32 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 24 Sep 2024 20:49:42 +0530 Subject: [PATCH 0171/1614] fix: closing amount reset to expected amount on save (backport #43358) (#43368) fix: closing amount reset to expected amount on save (#43358) (cherry picked from commit 9974b7c4ae53505e85019a29481693e492cc8b17) Co-authored-by: jabir-elat <44110258+jabir-elat@users.noreply.github.com> --- .../accounts/doctype/pos_closing_entry/pos_closing_entry.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.js b/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.js index 68a85f7ee96..c171713dc61 100644 --- a/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.js +++ b/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.js @@ -194,7 +194,9 @@ function refresh_payments(d, frm) { } if (payment) { payment.expected_amount += flt(p.amount); - payment.closing_amount = payment.expected_amount; + if (payment.closing_amount === 0) { + payment.closing_amount = payment.expected_amount; + } payment.difference = payment.closing_amount - payment.expected_amount; } else { frm.add_child("payment_reconciliation", { From 40fbb1d6ffaa75a612b64159506ed2409e2afe25 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 25 Sep 2024 00:02:24 +0530 Subject: [PATCH 0172/1614] fix: not able to cancel Quality Inspection (backport #43374) (#43375) fix: not able to cancel Quality Inspection (#43374) (cherry picked from commit 8c32ebee683bab44c4c94a604b33267ee77ee00c) Co-authored-by: rohitwaghchaure --- erpnext/stock/doctype/quality_inspection/quality_inspection.js | 2 +- erpnext/stock/doctype/quality_inspection/quality_inspection.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/quality_inspection/quality_inspection.js b/erpnext/stock/doctype/quality_inspection/quality_inspection.js index fc487514a2c..99e25bf5eb6 100644 --- a/erpnext/stock/doctype/quality_inspection/quality_inspection.js +++ b/erpnext/stock/doctype/quality_inspection/quality_inspection.js @@ -60,7 +60,7 @@ frappe.ui.form.on("Quality Inspection", { refresh: function (frm) { // Ignore cancellation of reference doctype on cancel all. - frm.ignore_doctypes_on_cancel_all = [frm.doc.reference_type]; + frm.ignore_doctypes_on_cancel_all = [frm.doc.reference_type, "Serial and Batch Bundle"]; }, item_code: function (frm) { diff --git a/erpnext/stock/doctype/quality_inspection/quality_inspection.py b/erpnext/stock/doctype/quality_inspection/quality_inspection.py index 60f048673fb..5dca440adbe 100644 --- a/erpnext/stock/doctype/quality_inspection/quality_inspection.py +++ b/erpnext/stock/doctype/quality_inspection/quality_inspection.py @@ -109,6 +109,8 @@ class QualityInspection(Document): self.update_qc_reference() def on_cancel(self): + self.ignore_linked_doctypes = "Serial and Batch Bundle" + self.update_qc_reference() def on_trash(self): From 47f06dc180ee434ce21eea9587fa43bb20079215 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 25 Sep 2024 10:09:17 +0530 Subject: [PATCH 0173/1614] fix: Cannot read properties of undefined (reading 'price_list_rate') (backport #43376) (#43377) fix: Cannot read properties of undefined (reading 'price_list_rate') (#43376) (cherry picked from commit a63dca098452e46239878eb90d18a8f4ffeb3d16) Co-authored-by: rohitwaghchaure --- erpnext/public/js/controllers/transaction.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 67c61118952..204c09299ad 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -1102,7 +1102,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe apply_discount_on_item(doc, cdt, cdn, field) { var item = frappe.get_doc(cdt, cdn); - if(!item.price_list_rate) { + if(!item?.price_list_rate) { item[field] = 0.0; } else { this.price_list_rate(doc, cdt, cdn); From 8d188dccd74f2fc442fc386541f4730d14849339 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Wed, 25 Sep 2024 04:40:17 +0000 Subject: [PATCH 0174/1614] chore(release): Bumped to Version 15.36.2 ## [15.36.2](https://github.com/frappe/erpnext/compare/v15.36.1...v15.36.2) (2024-09-25) ### Bug Fixes * add currency in financial statement ([927f800](https://github.com/frappe/erpnext/commit/927f80035d4796bb1f75cede6c7aba16035bb5b7)) * added date condition ([0e18845](https://github.com/frappe/erpnext/commit/0e1884539ebfddd67c10f83f515bae23074fccf6)) * AR / AP report to ignore 0.0 outstanding ([979d801](https://github.com/frappe/erpnext/commit/979d801de5e2213474690a860be04db28c102d7b)) * **Bank Account:** dashboard connections (backport [#43365](https://github.com/frappe/erpnext/issues/43365)) ([#43367](https://github.com/frappe/erpnext/issues/43367)) ([cfea2de](https://github.com/frappe/erpnext/commit/cfea2de131fb5a32d3716d55a46cb1285266da2c)) * change dynamic link doctype fieldtype to data ([05c92cc](https://github.com/frappe/erpnext/commit/05c92cce71152f944086c272199540a2d323703b)) * closing amount reset to expected amount on save (backport [#43358](https://github.com/frappe/erpnext/issues/43358)) ([#43368](https://github.com/frappe/erpnext/issues/43368)) ([0722aa5](https://github.com/frappe/erpnext/commit/0722aa5a3f5c318110933fadd38303d690d0db32)) * create_address is failing ([557ef5d](https://github.com/frappe/erpnext/commit/557ef5d214abee8b7e7a7838a940a40e6f8d1477)) * handle missing liability account scenario in `set_liability_account` ([4045928](https://github.com/frappe/erpnext/commit/40459288f6c4bdcb88dc284c6874b1294a6b88a5)) * incorrect outstanding on non-pos invoice with write_off_account ([f89a3db](https://github.com/frappe/erpnext/commit/f89a3dbb6562bed6fa22088a63cd363f612ffbfd)) * incorrect stock balance for inventory dimension (backport [#43284](https://github.com/frappe/erpnext/issues/43284)) ([#43290](https://github.com/frappe/erpnext/issues/43290)) ([f6725e2](https://github.com/frappe/erpnext/commit/f6725e2eed39c326bd031ebc969bd40adf6235e1)) * item_query in pos_invoice ([99e004b](https://github.com/frappe/erpnext/commit/99e004b61962c4463ba8b18985835295d5711b03)) * make to tax category on tax rule to filter with percent ([63d4fdd](https://github.com/frappe/erpnext/commit/63d4fddb493e4ba1ec1b178464f5fd671da1fd8c)) * **minor:** include condition to check docstatus ([1f42302](https://github.com/frappe/erpnext/commit/1f423029970cb911c5a97d8b3ce92a02b151ea7e)) * not able to cancel Quality Inspection (backport [#43374](https://github.com/frappe/erpnext/issues/43374)) ([#43375](https://github.com/frappe/erpnext/issues/43375)) ([40fbb1d](https://github.com/frappe/erpnext/commit/40fbb1d6ffaa75a612b64159506ed2409e2afe25)) * partial return on POS invoice ([998fef7](https://github.com/frappe/erpnext/commit/998fef779bc2aba5ebd7e3b7d98189c1a8f388f3)) * partial return on POS invoice ([b99ca7d](https://github.com/frappe/erpnext/commit/b99ca7d9e988a09e32a9f85848184c829b805648)) * Payment Ledger Report currency fieldtype fix ([ad2d6a1](https://github.com/frappe/erpnext/commit/ad2d6a16258235a20d041174458e32bb6ebad8f7)) * **Payment Reconciliation:** German translations ([e06a01f](https://github.com/frappe/erpnext/commit/e06a01fae5dd5b42f54fcccf9c8c38106087b37e)) * set group_by condition if empty and voucher_no is set ([ec27077](https://github.com/frappe/erpnext/commit/ec27077d9cd5f3d5e832e35a32451cee7f5e3e6d)) * shipping rule must match the company ([085a4c6](https://github.com/frappe/erpnext/commit/085a4c61ac3ebef34b16f7e713d03809594fd455)) * show chart tool tip in report currency ([e5ae828](https://github.com/frappe/erpnext/commit/e5ae828580693d0f4b370868f39d70b649de4a7c)) * stock dashboard (backport [#43347](https://github.com/frappe/erpnext/issues/43347)) ([#43349](https://github.com/frappe/erpnext/issues/43349)) ([176feb2](https://github.com/frappe/erpnext/commit/176feb20ad62e4a137e5babcd363968af59b160a)) * transaction exchange rate on GL's for Multi currency Journals ([a7ccc94](https://github.com/frappe/erpnext/commit/a7ccc9420ba8fa30b7809b299a91ae3501d0b4fb)) * translate in js ([84e26e2](https://github.com/frappe/erpnext/commit/84e26e21abbbe0c8a8ab508d4d408e89e2e79467)) * Translation for button SO to PO ([73d98ad](https://github.com/frappe/erpnext/commit/73d98addbcbdb236cda9da130ff9a59a1f942a37)) * ui clean-up (backport [#43305](https://github.com/frappe/erpnext/issues/43305)) ([#43312](https://github.com/frappe/erpnext/issues/43312)) ([7e6d6f0](https://github.com/frappe/erpnext/commit/7e6d6f08a20a03ff5603d9b991d4ea69960780c5)) * update clearance date in invoice payment table ([10ecdb9](https://github.com/frappe/erpnext/commit/10ecdb99fe565d5f4ebedb034f5cbad1c246a865)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index d5db7ca59a6..89f9ab1605e 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.36.1" +__version__ = "15.36.2" def get_default_company(user=None): From 74c880c232d6fa1cf4f0d53c5faad16f7e809c16 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 26 Sep 2024 12:06:27 +0530 Subject: [PATCH 0175/1614] fix: serial and batch no selector (backport #43387) (#43390) fix: serial and batch no selector (#43387) (cherry picked from commit e4e96d2a442b771ff0336be0b52afe359831b919) Co-authored-by: rohitwaghchaure --- erpnext/public/js/controllers/buying.js | 18 +- .../js/utils/serial_no_batch_selector.js | 164 +++++++++++------- .../serial_and_batch_bundle.py | 23 ++- 3 files changed, 132 insertions(+), 73 deletions(-) diff --git a/erpnext/public/js/controllers/buying.js b/erpnext/public/js/controllers/buying.js index b5a8b757706..1d0680de861 100644 --- a/erpnext/public/js/controllers/buying.js +++ b/erpnext/public/js/controllers/buying.js @@ -342,12 +342,15 @@ erpnext.buying = { add_serial_batch_bundle(doc, cdt, cdn) { let item = locals[cdt][cdn]; let me = this; + let fields = ["has_batch_no", "has_serial_no"]; - frappe.db.get_value("Item", item.item_code, ["has_batch_no", "has_serial_no"]) + frappe.db.get_value("Item", item.item_code, fields) .then((r) => { if (r.message && (r.message.has_batch_no || r.message.has_serial_no)) { - item.has_serial_no = r.message.has_serial_no; - item.has_batch_no = r.message.has_batch_no; + fields.forEach((field) => { + item[field] = r.message[field]; + }); + item.type_of_transaction = item.qty > 0 ? "Inward" : "Outward"; item.is_rejected = false; @@ -380,12 +383,15 @@ erpnext.buying = { add_serial_batch_for_rejected_qty(doc, cdt, cdn) { let item = locals[cdt][cdn]; let me = this; + let fields = ["has_batch_no", "has_serial_no"]; - frappe.db.get_value("Item", item.item_code, ["has_batch_no", "has_serial_no"]) + frappe.db.get_value("Item", item.item_code, fields) .then((r) => { if (r.message && (r.message.has_batch_no || r.message.has_serial_no)) { - item.has_serial_no = r.message.has_serial_no; - item.has_batch_no = r.message.has_batch_no; + fields.forEach((field) => { + item[field] = r.message[field]; + }); + item.type_of_transaction = item.rejected_qty > 0 ? "Inward" : "Outward"; item.is_rejected = true; diff --git a/erpnext/public/js/utils/serial_no_batch_selector.js b/erpnext/public/js/utils/serial_no_batch_selector.js index 2ddfc24adb1..46ff6366de8 100644 --- a/erpnext/public/js/utils/serial_no_batch_selector.js +++ b/erpnext/public/js/utils/serial_no_batch_selector.js @@ -16,7 +16,7 @@ erpnext.SerialBatchPackageSelector = class SerialNoBatchBundleUpdate { let label = this.item?.has_serial_no ? __("Serial Nos") : __("Batch Nos"); let primary_label = this.bundle ? __("Update") : __("Add"); - if (this.item?.has_serial_no && this.item?.batch_no) { + if (this.item?.has_serial_no && this.item?.has_batch_no) { label = __("Serial Nos / Batch Nos"); } @@ -24,6 +24,7 @@ erpnext.SerialBatchPackageSelector = class SerialNoBatchBundleUpdate { this.dialog = new frappe.ui.Dialog({ title: this.item?.title || primary_label, + size: "large", fields: this.get_dialog_fields(), primary_action_label: primary_label, primary_action: () => this.update_bundle_entries(), @@ -164,12 +165,14 @@ erpnext.SerialBatchPackageSelector = class SerialNoBatchBundleUpdate { fields.push({ fieldtype: "Section Break", + depends_on: "eval:doc.enter_manually !== 1 || doc.entries?.length > 0", }); fields.push({ fieldname: "entries", fieldtype: "Table", allow_bulk_edit: true, + depends_on: "eval:doc.enter_manually !== 1 || doc.entries?.length > 0", data: [], fields: this.get_dialog_table_fields(), }); @@ -178,6 +181,7 @@ erpnext.SerialBatchPackageSelector = class SerialNoBatchBundleUpdate { } get_attach_field() { + let me = this; let label = this.item?.has_serial_no ? __("Serial Nos") : __("Batch Nos"); let primary_label = this.bundle ? __("Update") : __("Add"); @@ -185,66 +189,41 @@ erpnext.SerialBatchPackageSelector = class SerialNoBatchBundleUpdate { label = __("Serial Nos / Batch Nos"); } - let fields = [ - { - fieldtype: "Section Break", - label: __("{0} {1} via CSV File", [primary_label, label]), - }, - ]; - - if (this.item?.has_serial_no) { - fields = [ - ...fields, - { - fieldtype: "Check", - label: __("Import Using CSV file"), - fieldname: "import_using_csv_file", - default: 0, + let fields = []; + if (this.item.has_serial_no) { + fields.push({ + fieldtype: "Check", + label: __("Enter Manually"), + fieldname: "enter_manually", + default: 1, + depends_on: "eval:doc.import_using_csv_file !== 1", + change() { + if (me.dialog.get_value("enter_manually")) { + me.dialog.set_value("import_using_csv_file", 0); + } }, - { - fieldtype: "Section Break", - label: __("{0} {1} Manually", [primary_label, label]), - depends_on: "eval:doc.import_using_csv_file === 0", - }, - { - fieldtype: "Data", - label: __("Enter Serial No Range"), - fieldname: "serial_no_range", - depends_on: "eval:doc.import_using_csv_file === 0", - description: __('Enter "ABC-001::100" for serial nos "ABC-001" to "ABC-100".'), - onchange: () => { - this.set_serial_nos_from_range(); - }, - }, - { - fieldtype: "Small Text", - label: __("Enter Serial Nos"), - fieldname: "upload_serial_nos", - depends_on: "eval:doc.import_using_csv_file === 0", - description: __("Enter each serial no in a new line"), - }, - { - fieldtype: "Column Break", - depends_on: "eval:doc.import_using_csv_file === 0", - }, - { - fieldtype: "Button", - fieldname: "make_serial_nos", - label: __("Create Serial Nos"), - depends_on: "eval:doc.import_using_csv_file === 0", - click: () => { - this.create_serial_nos(); - }, - }, - { - fieldtype: "Section Break", - depends_on: "eval:doc.import_using_csv_file === 1", - }, - ]; + }); } fields = [ ...fields, + { + fieldtype: "Check", + label: __("Import Using CSV file"), + fieldname: "import_using_csv_file", + depends_on: "eval:doc.enter_manually !== 1", + default: !this.item.has_serial_no ? 1 : 0, + change() { + if (me.dialog.get_value("import_using_csv_file")) { + me.dialog.set_value("enter_manually", 0); + } + }, + }, + { + fieldtype: "Section Break", + depends_on: "eval:doc.import_using_csv_file === 1", + label: __("{0} {1} via CSV File", [primary_label, label]), + }, { fieldtype: "Button", fieldname: "download_csv", @@ -262,9 +241,51 @@ erpnext.SerialBatchPackageSelector = class SerialNoBatchBundleUpdate { }, ]; + if (this.item?.has_serial_no) { + fields = [ + ...fields, + { + fieldtype: "Section Break", + label: __("{0} {1} Manually", [primary_label, label]), + depends_on: "eval:doc.enter_manually === 1", + }, + { + fieldtype: "Data", + label: __("Serial No Range"), + fieldname: "serial_no_range", + depends_on: "eval:doc.enter_manually === 1 && !doc.serial_no_series", + description: __('"SN-01::10" for "SN-01" to "SN-10"'), + onchange: () => { + this.set_serial_nos_from_range(); + }, + }, + ]; + } + + if (this.item?.has_serial_no) { + fields = [ + ...fields, + { + fieldtype: "Column Break", + depends_on: "eval:doc.enter_manually === 1", + }, + { + fieldtype: "Small Text", + label: __("Enter Serial Nos"), + fieldname: "upload_serial_nos", + depends_on: "eval:doc.enter_manually === 1", + description: __("Enter each serial no in a new line"), + }, + ]; + } + return fields; } + set_serial_nos_from_series() {} + + set_batch_nos_from_series() {} + set_serial_nos_from_range() { const serial_no_range = this.dialog.get_value("serial_no_range"); @@ -511,6 +532,8 @@ erpnext.SerialBatchPackageSelector = class SerialNoBatchBundleUpdate { scan_barcode_data() { const { scan_serial_no, scan_batch_no } = this.dialog.get_values(); + this.dialog.set_value("enter_manually", 0); + if (scan_serial_no || scan_batch_no) { frappe.call({ method: "erpnext.stock.doctype.serial_and_batch_bundle.serial_and_batch_bundle.is_serial_batch_no_exists", @@ -554,14 +577,13 @@ erpnext.SerialBatchPackageSelector = class SerialNoBatchBundleUpdate { serial_no: scan_serial_no, }, callback: (r) => { - if (r.message) { - this.dialog.fields_dict.entries.df.data.push({ - serial_no: scan_serial_no, - batch_no: r.message, - }); + this.dialog.fields_dict.entries.df.data.push({ + serial_no: scan_serial_no, + batch_no: r.message, + }); - this.dialog.fields_dict.scan_serial_no.set_value(""); - } + this.dialog.fields_dict.scan_serial_no.set_value(""); + this.dialog.fields_dict.entries.grid.refresh(); }, }); } @@ -590,6 +612,12 @@ erpnext.SerialBatchPackageSelector = class SerialNoBatchBundleUpdate { update_bundle_entries() { let entries = this.dialog.get_values().entries; let warehouse = this.dialog.get_value("warehouse"); + let upload_serial_nos = this.dialog.get_value("upload_serial_nos"); + + if (!entries?.length && upload_serial_nos) { + this.create_serial_nos(); + return; + } if ((entries && !entries.length) || !entries) { frappe.throw(__("Please add atleast one Serial No / Batch No")); @@ -610,9 +638,13 @@ erpnext.SerialBatchPackageSelector = class SerialNoBatchBundleUpdate { }, }) .then((r) => { - this.callback && this.callback(r.message); - this.frm.save(); - this.dialog.hide(); + frappe.run_serially([ + () => { + this.callback && this.callback(r.message); + }, + () => this.frm.save(), + () => this.dialog.hide(), + ]); }); } 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 956eb08d9ff..a1944732fb6 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 @@ -1329,6 +1329,15 @@ def create_serial_batch_no_ledgers( } ) + batch_no = None + + if ( + not entries[0].get("batch_no") + and entries[0].get("serial_no") + and frappe.get_cached_value("Item", child_row.item_code, "has_batch_no") + ): + batch_no = get_batch(child_row.item_code) + for row in entries: row = frappe._dict(row) doc.append( @@ -1336,7 +1345,7 @@ def create_serial_batch_no_ledgers( { "qty": (flt(row.qty) or 1.0) * (1 if type_of_transaction == "Inward" else -1), "warehouse": warehouse, - "batch_no": row.batch_no, + "batch_no": row.batch_no or batch_no, "serial_no": row.serial_no, }, ) @@ -1351,6 +1360,18 @@ def create_serial_batch_no_ledgers( return doc +def get_batch(item_code): + from erpnext.stock.doctype.batch.batch import make_batch + + return make_batch( + frappe._dict( + { + "item": item_code, + } + ) + ) + + def get_type_of_transaction(parent_doc, child_row): type_of_transaction = child_row.get("type_of_transaction") if parent_doc.get("doctype") == "Stock Entry": From ea69ba7cd8967af626d8efee1c4575d980533923 Mon Sep 17 00:00:00 2001 From: Abdeali Chharchhodawala <99460106+Abdeali099@users.noreply.github.com> Date: Sat, 21 Sep 2024 07:04:46 +0530 Subject: [PATCH 0176/1614] fix: multiple issues in Payment Request (#42427) * fix: multiple issues in Payment Request * chore: minor changes * fix: remove bug * fix: replace `round` with `flt` * fix: update `set_advance_payment_status()` logic * fix: removed bug of `set_advance_payment_status` * fix: changes as per review * refactor: replace sql query of `matched_payment_requests` to query builder * fix: replace `locals` with `get_doc` in set_query * fix: changes during review * fix: minor review changes * fix: remove unnecessary code for setting payment entry received amount * fix: logic for ser payment_request if PE made from transaction * fix: Use rounded total to make Payment Request from `Sales Invoice` or `Purchase Invoice` * refactor: enhance logic of `set_open_payment_requests_to_references` * fix: added one optional arg `created_from_payment_request` * fix: handle multiple allocation of PR at PE's reference * fix: logic for PR if outstanding docs fetch * fix: formatted Link field for `Payment Request` for PE's references * fix: replace `get_all()` with `get_list()` for getting Payment Request for Link field * fix: replace `get_all()` with `get_list()` for getting Payment Request for Link field * chore: format `payment_entry.js` file * style: Show preview popup of `Payment Request` * fix: remove minor bug * fix: add virtual field for Payment Term and Request `outstanding_amount` in PE's reference * fix: get outstanding amount in PE's reference on realtime * fix: move allocation of allocated_amount to server side (no change) * fix: some minor changes to allocation * fix: Split `Payment Request` if PE is created from PR and there are `Payment Terms` * fix: minor logic changes * fix: Allocation of allocated_amount if `paid_amount` is changes * fix: improve logic of allocation * fix: set matched payment request if unset * fix: minor changes * fix: Allocate single Payment Request if PE created from PR * fix: improve code logic * fix: Removed duplication code * fix: proper message title * refactor: Rename method of Allocation Amount to References * refactor: Changing `grand_total` description based on `party_type` * refactor: update Payment Request * fix: Remove virtual property of payment_term_oustanding from references * fix: fetch party account currency for creating payment request * fix: use transaction currency as base in payment request * fix: party amount for creating payment entry * fix: allow for proportional amount paid by bank * fix: Changed field order in Payment Request * fix: Minor refactor in Payment Entry Reference table data * test: Added test cases for allow Payment at `Partially Paid` status for PR * test: Update partial paid status test case * test: Update test case for same currency PR * refactor: Wider the `msgprint` dialog for after save PE * test: Update PR test cases * chore: Remove dirty lines * test: Checking `Advance Payment Status` * fix: formatting update * fix: Use `flt` where doing subtraction * test: PR test case with Payment Term for same currency * fix: remove redundant `flt` * test: Add test cases for PR --------- Co-authored-by: Sagar Vora --- .../doctype/payment_entry/payment_entry.js | 206 +++--- .../doctype/payment_entry/payment_entry.py | 599 +++++++++++++++++- .../payment_entry_reference.json | 28 +- .../payment_entry_reference.py | 12 +- .../payment_request/payment_request.js | 4 +- .../payment_request/payment_request.json | 50 +- .../payment_request/payment_request.py | 359 ++++++++--- .../payment_request/test_payment_request.py | 255 ++++++++ erpnext/controllers/accounts_controller.py | 33 +- 9 files changed, 1317 insertions(+), 229 deletions(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.js b/erpnext/accounts/doctype/payment_entry/payment_entry.js index f46c782112c..7ababfec81a 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.js +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.js @@ -174,6 +174,17 @@ frappe.ui.form.on("Payment Entry", { }; }); + frm.set_query("payment_request", "references", function (doc, cdt, cdn) { + const row = frappe.get_doc(cdt, cdn); + return { + query: "erpnext.accounts.doctype.payment_request.payment_request.get_open_payment_requests_query", + filters: { + reference_doctype: row.reference_doctype, + reference_name: row.reference_name, + }, + }; + }); + frm.set_query("sales_taxes_and_charges_template", function () { return { filters: { @@ -191,7 +202,15 @@ frappe.ui.form.on("Payment Entry", { }, }; }); + + frm.add_fetch( + "payment_request", + "outstanding_amount", + "payment_request_outstanding", + "Payment Entry Reference" + ); }, + refresh: function (frm) { erpnext.hide_company(frm); frm.events.hide_unhide_fields(frm); @@ -216,6 +235,7 @@ frappe.ui.form.on("Payment Entry", { ); } erpnext.accounts.unreconcile_payment.add_unreconcile_btn(frm); + frappe.flags.allocate_payment_amount = true; }, validate_company: (frm) => { @@ -797,7 +817,7 @@ frappe.ui.form.on("Payment Entry", { ); if (frm.doc.payment_type == "Pay") - frm.events.allocate_party_amount_against_ref_docs(frm, frm.doc.received_amount, 1); + frm.events.allocate_party_amount_against_ref_docs(frm, frm.doc.received_amount, true); else frm.events.set_unallocated_amount(frm); frm.set_paid_amount_based_on_received_amount = false; @@ -818,7 +838,7 @@ frappe.ui.form.on("Payment Entry", { } if (frm.doc.payment_type == "Receive") - frm.events.allocate_party_amount_against_ref_docs(frm, frm.doc.paid_amount, 1); + frm.events.allocate_party_amount_against_ref_docs(frm, frm.doc.paid_amount, true); else frm.events.set_unallocated_amount(frm); }, @@ -989,6 +1009,7 @@ frappe.ui.form.on("Payment Entry", { c.outstanding_amount = d.outstanding_amount; c.bill_no = d.bill_no; c.payment_term = d.payment_term; + c.payment_term_outstanding = d.payment_term_outstanding; c.allocated_amount = d.allocated_amount; c.account = d.account; @@ -1038,7 +1059,8 @@ frappe.ui.form.on("Payment Entry", { frm.events.allocate_party_amount_against_ref_docs( frm, - frm.doc.payment_type == "Receive" ? frm.doc.paid_amount : frm.doc.received_amount + frm.doc.payment_type == "Receive" ? frm.doc.paid_amount : frm.doc.received_amount, + false ); }, }); @@ -1052,93 +1074,13 @@ frappe.ui.form.on("Payment Entry", { return ["Sales Invoice", "Purchase Invoice"]; }, - allocate_party_amount_against_ref_docs: function (frm, paid_amount, paid_amount_change) { - var total_positive_outstanding_including_order = 0; - var total_negative_outstanding = 0; - var total_deductions = frappe.utils.sum( - $.map(frm.doc.deductions || [], function (d) { - return flt(d.amount); - }) - ); - - paid_amount -= total_deductions; - - $.each(frm.doc.references || [], function (i, row) { - if (flt(row.outstanding_amount) > 0) - total_positive_outstanding_including_order += flt(row.outstanding_amount); - else total_negative_outstanding += Math.abs(flt(row.outstanding_amount)); + allocate_party_amount_against_ref_docs: async function (frm, paid_amount, paid_amount_change) { + await frm.call("allocate_amount_to_references", { + paid_amount: paid_amount, + paid_amount_change: paid_amount_change, + allocate_payment_amount: frappe.flags.allocate_payment_amount ?? false, }); - var allocated_negative_outstanding = 0; - if ( - (frm.doc.payment_type == "Receive" && frm.doc.party_type == "Customer") || - (frm.doc.payment_type == "Pay" && frm.doc.party_type == "Supplier") || - (frm.doc.payment_type == "Pay" && frm.doc.party_type == "Employee") - ) { - if (total_positive_outstanding_including_order > paid_amount) { - var remaining_outstanding = total_positive_outstanding_including_order - paid_amount; - allocated_negative_outstanding = - total_negative_outstanding < remaining_outstanding - ? total_negative_outstanding - : remaining_outstanding; - } - - var allocated_positive_outstanding = paid_amount + allocated_negative_outstanding; - } else if (["Customer", "Supplier"].includes(frm.doc.party_type)) { - total_negative_outstanding = flt(total_negative_outstanding, precision("outstanding_amount")); - if (paid_amount > total_negative_outstanding) { - if (total_negative_outstanding == 0) { - frappe.msgprint( - __("Cannot {0} {1} {2} without any negative outstanding invoice", [ - frm.doc.payment_type, - frm.doc.party_type == "Customer" ? "to" : "from", - frm.doc.party_type, - ]) - ); - return false; - } else { - frappe.msgprint( - __("Paid Amount cannot be greater than total negative outstanding amount {0}", [ - total_negative_outstanding, - ]) - ); - return false; - } - } else { - allocated_positive_outstanding = total_negative_outstanding - paid_amount; - allocated_negative_outstanding = - paid_amount + - (total_positive_outstanding_including_order < allocated_positive_outstanding - ? total_positive_outstanding_including_order - : allocated_positive_outstanding); - } - } - - $.each(frm.doc.references || [], function (i, row) { - if (frappe.flags.allocate_payment_amount == 0) { - //If allocate payment amount checkbox is unchecked, set zero to allocate amount - row.allocated_amount = 0; - } else if ( - frappe.flags.allocate_payment_amount != 0 && - (!row.allocated_amount || paid_amount_change) - ) { - if (row.outstanding_amount > 0 && allocated_positive_outstanding >= 0) { - row.allocated_amount = - row.outstanding_amount >= allocated_positive_outstanding - ? allocated_positive_outstanding - : row.outstanding_amount; - allocated_positive_outstanding -= flt(row.allocated_amount); - } else if (row.outstanding_amount < 0 && allocated_negative_outstanding) { - row.allocated_amount = - Math.abs(row.outstanding_amount) >= allocated_negative_outstanding - ? -1 * allocated_negative_outstanding - : row.outstanding_amount; - allocated_negative_outstanding -= Math.abs(flt(row.allocated_amount)); - } - } - }); - - frm.refresh_fields(); frm.events.set_total_allocated_amount(frm); }, @@ -1686,6 +1628,62 @@ frappe.ui.form.on("Payment Entry", { return current_tax_amount; }, + + cost_center: function (frm) { + if (frm.doc.posting_date && (frm.doc.paid_from || frm.doc.paid_to)) { + return frappe.call({ + method: "erpnext.accounts.doctype.payment_entry.payment_entry.get_party_and_account_balance", + args: { + company: frm.doc.company, + date: frm.doc.posting_date, + paid_from: frm.doc.paid_from, + paid_to: frm.doc.paid_to, + ptype: frm.doc.party_type, + pty: frm.doc.party, + cost_center: frm.doc.cost_center, + }, + callback: function (r, rt) { + if (r.message) { + frappe.run_serially([ + () => { + frm.set_value( + "paid_from_account_balance", + r.message.paid_from_account_balance + ); + frm.set_value("paid_to_account_balance", r.message.paid_to_account_balance); + frm.set_value("party_balance", r.message.party_balance); + }, + ]); + } + }, + }); + } + }, + + after_save: function (frm) { + const { matched_payment_requests } = frappe.last_response; + if (!matched_payment_requests) return; + + const COLUMN_LABEL = [ + [__("Reference DocType"), __("Reference Name"), __("Allocated Amount"), __("Payment Request")], + ]; + + frappe.msgprint({ + title: __("Unset Matched Payment Request"), + message: COLUMN_LABEL.concat(matched_payment_requests), + as_table: true, + wide: true, + primary_action: { + label: __("Allocate Payment Request"), + action() { + frappe.hide_msgprint(); + frm.call("set_matched_payment_requests", { matched_payment_requests }, () => { + frm.dirty(); + }); + }, + }, + }); + }, }); frappe.ui.form.on("Payment Entry Reference", { @@ -1778,35 +1776,3 @@ frappe.ui.form.on("Payment Entry Deduction", { frm.events.set_unallocated_amount(frm); }, }); -frappe.ui.form.on("Payment Entry", { - cost_center: function (frm) { - if (frm.doc.posting_date && (frm.doc.paid_from || frm.doc.paid_to)) { - return frappe.call({ - method: "erpnext.accounts.doctype.payment_entry.payment_entry.get_party_and_account_balance", - args: { - company: frm.doc.company, - date: frm.doc.posting_date, - paid_from: frm.doc.paid_from, - paid_to: frm.doc.paid_to, - ptype: frm.doc.party_type, - pty: frm.doc.party, - cost_center: frm.doc.cost_center, - }, - callback: function (r, rt) { - if (r.message) { - frappe.run_serially([ - () => { - frm.set_value( - "paid_from_account_balance", - r.message.paid_from_account_balance - ); - frm.set_value("paid_to_account_balance", r.message.paid_to_account_balance); - frm.set_value("party_balance", r.message.party_balance); - }, - ]); - } - }, - }); - } - }, -}); diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index 625608b5374..9424d722cf5 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -7,8 +7,10 @@ from functools import reduce import frappe from frappe import ValidationError, _, qb, scrub, throw +from frappe.query_builder import Tuple +from frappe.query_builder.functions import Count from frappe.utils import cint, comma_or, flt, getdate, nowdate -from frappe.utils.data import comma_and, fmt_money +from frappe.utils.data import comma_and, fmt_money, get_link_to_form from pypika import Case from pypika.functions import Coalesce, Sum @@ -98,13 +100,17 @@ class PaymentEntry(AccountsController): self.set_status() self.set_total_in_words() + def before_save(self): + self.set_matched_unset_payment_requests_to_response() + def on_submit(self): if self.difference_amount: frappe.throw(_("Difference Amount must be zero")) self.make_gl_entries() self.update_outstanding_amounts() - self.update_advance_paid() self.update_payment_schedule() + self.update_payment_requests() + self.update_advance_paid() # advance_paid_status depends on the payment request amount self.set_status() def set_liability_account(self): @@ -188,30 +194,34 @@ class PaymentEntry(AccountsController): super().on_cancel() self.make_gl_entries(cancel=1) self.update_outstanding_amounts() - self.update_advance_paid() self.delink_advance_entry_references() self.update_payment_schedule(cancel=1) - self.set_payment_req_status() + self.update_payment_requests(cancel=True) + self.update_advance_paid() # advance_paid_status depends on the payment request amount self.set_status() - def set_payment_req_status(self): - from erpnext.accounts.doctype.payment_request.payment_request import update_payment_req_status + def update_payment_requests(self, cancel=False): + from erpnext.accounts.doctype.payment_request.payment_request import ( + update_payment_requests_as_per_pe_references, + ) - update_payment_req_status(self, None) + update_payment_requests_as_per_pe_references(self.references, cancel=cancel) def update_outstanding_amounts(self): self.set_missing_ref_details(force=True) def validate_duplicate_entry(self): - reference_names = [] + reference_names = set() for d in self.get("references"): - if (d.reference_doctype, d.reference_name, d.payment_term) in reference_names: + key = (d.reference_doctype, d.reference_name, d.payment_term, d.payment_request) + if key in reference_names: frappe.throw( _("Row #{0}: Duplicate entry in References {1} {2}").format( d.idx, d.reference_doctype, d.reference_name ) ) - reference_names.append((d.reference_doctype, d.reference_name, d.payment_term)) + + reference_names.add(key) def set_bank_account_data(self): if self.bank_account: @@ -237,6 +247,8 @@ class PaymentEntry(AccountsController): if self.payment_type == "Internal Transfer": return + self.validate_allocated_amount_as_per_payment_request() + if self.party_type in ("Customer", "Supplier"): self.validate_allocated_amount_with_latest_data() else: @@ -249,6 +261,27 @@ class PaymentEntry(AccountsController): if flt(d.allocated_amount) < 0 and flt(d.allocated_amount) < flt(d.outstanding_amount): frappe.throw(fail_message.format(d.idx)) + def validate_allocated_amount_as_per_payment_request(self): + """ + Allocated amount should not be greater than the outstanding amount of the Payment Request. + """ + if not self.references: + return + + pr_outstanding_amounts = get_payment_request_outstanding_set_in_references(self.references) + + if not pr_outstanding_amounts: + return + + for ref in self.references: + if ref.payment_request and ref.allocated_amount > pr_outstanding_amounts[ref.payment_request]: + frappe.throw( + msg=_( + "Row #{0}: Allocated Amount cannot be greater than Outstanding Amount of Payment Request {1}" + ).format(ref.idx, get_link_to_form("Payment Request", ref.payment_request)), + title=_("Invalid Allocated Amount"), + ) + def term_based_allocation_enabled_for_reference( self, reference_doctype: str, reference_name: str ) -> bool: @@ -1606,6 +1639,380 @@ class PaymentEntry(AccountsController): return current_tax_fraction + def set_matched_unset_payment_requests_to_response(self): + """ + Find matched Payment Requests for those references which have no Payment Request set.\n + And set to `frappe.response` to show in the frontend for allocation. + """ + if not self.references: + return + + matched_payment_requests = get_matched_payment_request_of_references( + [row for row in self.references if not row.payment_request] + ) + + if not matched_payment_requests: + return + + frappe.response["matched_payment_requests"] = matched_payment_requests + + @frappe.whitelist() + def allocate_amount_to_references(self, paid_amount, paid_amount_change, allocate_payment_amount): + """ + Allocate `Allocated Amount` and `Payment Request` against `Reference` based on `Paid Amount` and `Outstanding Amount`.\n + :param paid_amount: Paid Amount / Received Amount. + :param paid_amount_change: Flag to check if `Paid Amount` is changed or not. + :param allocate_payment_amount: Flag to allocate amount or not. (Payment Request is also dependent on this flag) + """ + if not self.references: + return + + if not allocate_payment_amount: + for ref in self.references: + ref.allocated_amount = 0 + return + + # calculating outstanding amounts + precision = self.precision("paid_amount") + total_positive_outstanding_including_order = 0 + total_negative_outstanding = 0 + paid_amount -= sum(flt(d.amount, precision) for d in self.deductions) + + for ref in self.references: + reference_outstanding_amount = ref.outstanding_amount + abs_outstanding_amount = abs(reference_outstanding_amount) + + if reference_outstanding_amount > 0: + total_positive_outstanding_including_order += abs_outstanding_amount + else: + total_negative_outstanding += abs_outstanding_amount + + # calculating allocated outstanding amounts + allocated_negative_outstanding = 0 + allocated_positive_outstanding = 0 + + # checking party type and payment type + if (self.payment_type == "Receive" and self.party_type == "Customer") or ( + self.payment_type == "Pay" and self.party_type in ("Supplier", "Employee") + ): + if total_positive_outstanding_including_order > paid_amount: + remaining_outstanding = flt( + total_positive_outstanding_including_order - paid_amount, precision + ) + allocated_negative_outstanding = min(remaining_outstanding, total_negative_outstanding) + + allocated_positive_outstanding = paid_amount + allocated_negative_outstanding + + elif self.party_type in ("Supplier", "Employee"): + if paid_amount > total_negative_outstanding: + if total_negative_outstanding == 0: + frappe.msgprint( + _("Cannot {0} from {2} without any negative outstanding invoice").format( + self.payment_type, + self.party_type, + ) + ) + else: + frappe.msgprint( + _("Paid Amount cannot be greater than total negative outstanding amount {0}").format( + total_negative_outstanding + ) + ) + + return + + else: + allocated_positive_outstanding = flt(total_negative_outstanding - paid_amount, precision) + allocated_negative_outstanding = paid_amount + min( + total_positive_outstanding_including_order, allocated_positive_outstanding + ) + + # inner function to set `allocated_amount` to those row which have no PR + def _allocation_to_unset_pr_row( + row, outstanding_amount, allocated_positive_outstanding, allocated_negative_outstanding + ): + if outstanding_amount > 0 and allocated_positive_outstanding >= 0: + row.allocated_amount = min(allocated_positive_outstanding, outstanding_amount) + allocated_positive_outstanding = flt( + allocated_positive_outstanding - row.allocated_amount, precision + ) + elif outstanding_amount < 0 and allocated_negative_outstanding: + row.allocated_amount = min(allocated_negative_outstanding, abs(outstanding_amount)) * -1 + allocated_negative_outstanding = flt( + allocated_negative_outstanding - abs(row.allocated_amount), precision + ) + return allocated_positive_outstanding, allocated_negative_outstanding + + # allocate amount based on `paid_amount` is changed or not + if not paid_amount_change: + for ref in self.references: + allocated_positive_outstanding, allocated_negative_outstanding = _allocation_to_unset_pr_row( + ref, + ref.outstanding_amount, + allocated_positive_outstanding, + allocated_negative_outstanding, + ) + + allocate_open_payment_requests_to_references(self.references, self.precision("paid_amount")) + + else: + payment_request_outstanding_amounts = ( + get_payment_request_outstanding_set_in_references(self.references) or {} + ) + references_outstanding_amounts = get_references_outstanding_amount(self.references) or {} + remaining_references_allocated_amounts = references_outstanding_amounts.copy() + + # Re allocate amount to those references which have PR set (Higher priority) + for ref in self.references: + if not ref.payment_request: + continue + + # fetch outstanding_amount of `Reference` (Payment Term) and `Payment Request` to allocate new amount + key = (ref.reference_doctype, ref.reference_name, ref.get("payment_term")) + reference_outstanding_amount = references_outstanding_amounts[key] + pr_outstanding_amount = payment_request_outstanding_amounts[ref.payment_request] + + if reference_outstanding_amount > 0 and allocated_positive_outstanding >= 0: + # allocate amount according to outstanding amounts + outstanding_amounts = ( + allocated_positive_outstanding, + reference_outstanding_amount, + pr_outstanding_amount, + ) + + ref.allocated_amount = min(outstanding_amounts) + + # update amounts to track allocation + allocated_amount = ref.allocated_amount + allocated_positive_outstanding = flt( + allocated_positive_outstanding - allocated_amount, precision + ) + remaining_references_allocated_amounts[key] = flt( + remaining_references_allocated_amounts[key] - allocated_amount, precision + ) + payment_request_outstanding_amounts[ref.payment_request] = flt( + payment_request_outstanding_amounts[ref.payment_request] - allocated_amount, precision + ) + + elif reference_outstanding_amount < 0 and allocated_negative_outstanding: + # allocate amount according to outstanding amounts + outstanding_amounts = ( + allocated_negative_outstanding, + abs(reference_outstanding_amount), + pr_outstanding_amount, + ) + + ref.allocated_amount = min(outstanding_amounts) * -1 + + # update amounts to track allocation + allocated_amount = abs(ref.allocated_amount) + allocated_negative_outstanding = flt( + allocated_negative_outstanding - allocated_amount, precision + ) + remaining_references_allocated_amounts[key] += allocated_amount # negative amount + payment_request_outstanding_amounts[ref.payment_request] = flt( + payment_request_outstanding_amounts[ref.payment_request] - allocated_amount, precision + ) + # Re allocate amount to those references which have no PR (Lower priority) + for ref in self.references: + if ref.payment_request: + continue + + key = (ref.reference_doctype, ref.reference_name, ref.get("payment_term")) + reference_outstanding_amount = remaining_references_allocated_amounts[key] + + allocated_positive_outstanding, allocated_negative_outstanding = _allocation_to_unset_pr_row( + ref, + reference_outstanding_amount, + allocated_positive_outstanding, + allocated_negative_outstanding, + ) + + @frappe.whitelist() + def set_matched_payment_requests(self, matched_payment_requests): + """ + Set `Payment Request` against `Reference` based on `matched_payment_requests`.\n + :param matched_payment_requests: List of tuple of matched Payment Requests. + + --- + Example: [(reference_doctype, reference_name, allocated_amount, payment_request), ...] + """ + if not self.references or not matched_payment_requests: + return + + if isinstance(matched_payment_requests, str): + matched_payment_requests = json.loads(matched_payment_requests) + + # modify matched_payment_requests + # like (reference_doctype, reference_name, allocated_amount): payment_request + payment_requests = {} + + for row in matched_payment_requests: + key = tuple(row[:3]) + payment_requests[key] = row[3] + + for ref in self.references: + if ref.payment_request: + continue + + key = (ref.reference_doctype, ref.reference_name, ref.allocated_amount) + + if key in payment_requests: + ref.payment_request = payment_requests[key] + del payment_requests[key] # to avoid duplicate allocation + + +def get_matched_payment_request_of_references(references=None): + """ + Get those `Payment Requests` which are matched with `References`.\n + - Amount must be same. + - Only single `Payment Request` available for this amount. + + Example: [(reference_doctype, reference_name, allocated_amount, payment_request), ...] + """ + if not references: + return + + # to fetch matched rows + refs = { + (row.reference_doctype, row.reference_name, row.allocated_amount) + for row in references + if row.reference_doctype and row.reference_name and row.allocated_amount + } + + if not refs: + return + + PR = frappe.qb.DocType("Payment Request") + + # query to group by reference_doctype, reference_name, outstanding_amount + subquery = ( + frappe.qb.from_(PR) + .select( + PR.reference_doctype, + PR.reference_name, + PR.outstanding_amount.as_("allocated_amount"), + PR.name.as_("payment_request"), + Count("*").as_("count"), + ) + .where(Tuple(PR.reference_doctype, PR.reference_name, PR.outstanding_amount).isin(refs)) + .where(PR.status != "Paid") + .where(PR.docstatus == 1) + .groupby(PR.reference_doctype, PR.reference_name, PR.outstanding_amount) + ) + + # query to fetch matched rows which are single + matched_prs = ( + frappe.qb.from_(subquery) + .select( + subquery.reference_doctype, + subquery.reference_name, + subquery.allocated_amount, + subquery.payment_request, + ) + .where(subquery.count == 1) + .run() + ) + + return matched_prs if matched_prs else None + + +def get_references_outstanding_amount(references=None): + """ + Fetch accurate outstanding amount of `References`.\n + - If `Payment Term` is set, then fetch outstanding amount from `Payment Schedule`. + - If `Payment Term` is not set, then fetch outstanding amount from `References` it self. + + Example: {(reference_doctype, reference_name, payment_term): outstanding_amount, ...} + """ + if not references: + return + + refs_with_payment_term = get_outstanding_of_references_with_payment_term(references) or {} + refs_without_payment_term = get_outstanding_of_references_with_no_payment_term(references) or {} + + return {**refs_with_payment_term, **refs_without_payment_term} + + +def get_outstanding_of_references_with_payment_term(references=None): + """ + Fetch outstanding amount of `References` which have `Payment Term` set.\n + Example: {(reference_doctype, reference_name, payment_term): outstanding_amount, ...} + """ + if not references: + return + + refs = { + (row.reference_doctype, row.reference_name, row.payment_term) + for row in references + if row.reference_doctype and row.reference_name and row.payment_term + } + + if not refs: + return + + PS = frappe.qb.DocType("Payment Schedule") + + response = ( + frappe.qb.from_(PS) + .select(PS.parenttype, PS.parent, PS.payment_term, PS.outstanding) + .where(Tuple(PS.parenttype, PS.parent, PS.payment_term).isin(refs)) + ).run(as_dict=True) + + if not response: + return + + return {(row.parenttype, row.parent, row.payment_term): row.outstanding for row in response} + + +def get_outstanding_of_references_with_no_payment_term(references): + """ + Fetch outstanding amount of `References` which have no `Payment Term` set.\n + - Fetch outstanding amount from `References` it self. + + Note: `None` is used for allocation of `Payment Request` + Example: {(reference_doctype, reference_name, None): outstanding_amount, ...} + """ + if not references: + return + + outstanding_amounts = {} + + for ref in references: + if ref.payment_term: + continue + + key = (ref.reference_doctype, ref.reference_name, None) + + if key not in outstanding_amounts: + outstanding_amounts[key] = ref.outstanding_amount + + return outstanding_amounts + + +def get_payment_request_outstanding_set_in_references(references=None): + """ + Fetch outstanding amount of `Payment Request` which are set in `References`.\n + Example: {payment_request: outstanding_amount, ...} + """ + if not references: + return + + referenced_payment_requests = {row.payment_request for row in references if row.payment_request} + + if not referenced_payment_requests: + return + + PR = frappe.qb.DocType("Payment Request") + + response = ( + frappe.qb.from_(PR) + .select(PR.name, PR.outstanding_amount) + .where(PR.name.isin(referenced_payment_requests)) + ).run() + + return dict(response) if response else None + def validate_inclusive_tax(tax, doc): def _on_previous_row_error(row_range): @@ -2236,6 +2643,8 @@ def get_payment_entry( party_type=None, payment_type=None, reference_date=None, + ignore_permissions=False, + created_from_payment_request=False, ): doc = frappe.get_doc(dt, dn) over_billing_allowance = frappe.db.get_single_value("Accounts Settings", "over_billing_allowance") @@ -2385,9 +2794,179 @@ def get_payment_entry( pe.set_difference_amount() + # If PE is created from PR directly, then no need to find open PRs for the references + if not created_from_payment_request: + allocate_open_payment_requests_to_references(pe.references, pe.precision("paid_amount")) + return pe +def get_open_payment_requests_for_references(references=None): + """ + Fetch all unpaid Payment Requests for the references. \n + - Each reference can have multiple Payment Requests. \n + + Example: {("Sales Invoice", "SINV-00001"): {"PREQ-00001": 1000, "PREQ-00002": 2000}} + """ + if not references: + return + + refs = { + (row.reference_doctype, row.reference_name) + for row in references + if row.reference_doctype and row.reference_name and row.allocated_amount + } + + if not refs: + return + + PR = frappe.qb.DocType("Payment Request") + + response = ( + frappe.qb.from_(PR) + .select(PR.name, PR.reference_doctype, PR.reference_name, PR.outstanding_amount) + .where(Tuple(PR.reference_doctype, PR.reference_name).isin(list(refs))) + .where(PR.status != "Paid") + .where(PR.docstatus == 1) + .orderby(Coalesce(PR.transaction_date, PR.creation), order=frappe.qb.asc) + ).run(as_dict=True) + + if not response: + return + + reference_payment_requests = {} + + for row in response: + key = (row.reference_doctype, row.reference_name) + + if key not in reference_payment_requests: + reference_payment_requests[key] = {row.name: row.outstanding_amount} + else: + reference_payment_requests[key][row.name] = row.outstanding_amount + + return reference_payment_requests + + +def allocate_open_payment_requests_to_references(references=None, precision=None): + """ + Allocate unpaid Payment Requests to the references. \n + --- + - Allocation based on below factors + - Reference Allocated Amount + - Reference Outstanding Amount (With Payment Terms or without Payment Terms) + - Reference Payment Request's outstanding amount + --- + - Allocation based on below scenarios + - Reference's Allocated Amount == Payment Request's Outstanding Amount + - Allocate the Payment Request to the reference + - This PR will not be allocated further + - Reference's Allocated Amount < Payment Request's Outstanding Amount + - Allocate the Payment Request to the reference + - Reduce the PR's outstanding amount by the allocated amount + - This PR can be allocated further + - Reference's Allocated Amount > Payment Request's Outstanding Amount + - Allocate the Payment Request to the reference + - Reduce Allocated Amount of the reference by the PR's outstanding amount + - Create a new row for the remaining amount until the Allocated Amount is 0 + - Allocate PR if available + --- + - Note: + - Priority is given to the first Payment Request of respective references. + - Single Reference can have multiple rows. + - With Payment Terms or without Payment Terms + - With Payment Request or without Payment Request + """ + if not references: + return + + # get all unpaid payment requests for the references + references_open_payment_requests = get_open_payment_requests_for_references(references) + + if not references_open_payment_requests: + return + + if not precision: + precision = references[0].precision("allocated_amount") + + # to manage new rows + row_number = 1 + MOVE_TO_NEXT_ROW = 1 + TO_SKIP_NEW_ROW = 2 + + while row_number <= len(references): + row = references[row_number - 1] + reference_key = (row.reference_doctype, row.reference_name) + + # update the idx to maintain the order + row.idx = row_number + + # unpaid payment requests for the reference + reference_payment_requests = references_open_payment_requests.get(reference_key) + + if not reference_payment_requests: + row_number += MOVE_TO_NEXT_ROW # to move to next reference row + continue + + # get the first payment request and its outstanding amount + payment_request, pr_outstanding_amount = next(iter(reference_payment_requests.items())) + allocated_amount = row.allocated_amount + + # allocate the payment request to the reference and PR's outstanding amount + row.payment_request = payment_request + + if pr_outstanding_amount == allocated_amount: + del reference_payment_requests[payment_request] + row_number += MOVE_TO_NEXT_ROW + + elif pr_outstanding_amount > allocated_amount: + # reduce the outstanding amount of the payment request + reference_payment_requests[payment_request] -= allocated_amount + row_number += MOVE_TO_NEXT_ROW + + else: + # split the reference row to allocate the remaining amount + del reference_payment_requests[payment_request] + row.allocated_amount = pr_outstanding_amount + allocated_amount = flt(allocated_amount - pr_outstanding_amount, precision) + + # set the remaining amount to the next row + while allocated_amount: + # create a new row for the remaining amount + new_row = frappe.copy_doc(row) + references.insert(row_number, new_row) + + # get the first payment request and its outstanding amount + payment_request, pr_outstanding_amount = next( + iter(reference_payment_requests.items()), (None, None) + ) + + # update new row + new_row.idx = row_number + 1 + new_row.payment_request = payment_request + new_row.allocated_amount = min( + pr_outstanding_amount if pr_outstanding_amount else allocated_amount, allocated_amount + ) + + if not payment_request or not pr_outstanding_amount: + row_number += TO_SKIP_NEW_ROW + break + + elif pr_outstanding_amount == allocated_amount: + del reference_payment_requests[payment_request] + row_number += TO_SKIP_NEW_ROW + break + + elif pr_outstanding_amount > allocated_amount: + reference_payment_requests[payment_request] -= allocated_amount + row_number += TO_SKIP_NEW_ROW + break + + else: + allocated_amount = flt(allocated_amount - pr_outstanding_amount, precision) + del reference_payment_requests[payment_request] + row_number += MOVE_TO_NEXT_ROW + + def update_accounting_dimensions(pe, doc): """ Updates accounting dimensions in Payment Entry based on the accounting dimensions in the reference document diff --git a/erpnext/accounts/doctype/payment_entry_reference/payment_entry_reference.json b/erpnext/accounts/doctype/payment_entry_reference/payment_entry_reference.json index 23ed8252333..361f516b830 100644 --- a/erpnext/accounts/doctype/payment_entry_reference/payment_entry_reference.json +++ b/erpnext/accounts/doctype/payment_entry_reference/payment_entry_reference.json @@ -10,6 +10,7 @@ "due_date", "bill_no", "payment_term", + "payment_term_outstanding", "account_type", "payment_type", "column_break_4", @@ -18,7 +19,9 @@ "allocated_amount", "exchange_rate", "exchange_gain_loss", - "account" + "account", + "payment_request", + "payment_request_outstanding" ], "fields": [ { @@ -120,12 +123,33 @@ "fieldname": "payment_type", "fieldtype": "Data", "label": "Payment Type" + }, + { + "fieldname": "payment_request", + "fieldtype": "Link", + "label": "Payment Request", + "options": "Payment Request" + }, + { + "depends_on": "eval: doc.payment_term", + "fieldname": "payment_term_outstanding", + "fieldtype": "Float", + "label": "Payment Term Outstanding", + "read_only": 1 + }, + { + "depends_on": "eval: doc.payment_request && doc.payment_request_outstanding", + "fieldname": "payment_request_outstanding", + "fieldtype": "Float", + "is_virtual": 1, + "label": "Payment Request Outstanding", + "read_only": 1 } ], "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2024-04-05 09:44:08.310593", + "modified": "2024-09-16 18:11:50.019343", "modified_by": "Administrator", "module": "Accounts", "name": "Payment Entry Reference", diff --git a/erpnext/accounts/doctype/payment_entry_reference/payment_entry_reference.py b/erpnext/accounts/doctype/payment_entry_reference/payment_entry_reference.py index 4a027b4ee32..2ac92ba4a84 100644 --- a/erpnext/accounts/doctype/payment_entry_reference/payment_entry_reference.py +++ b/erpnext/accounts/doctype/payment_entry_reference/payment_entry_reference.py @@ -1,7 +1,7 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt - +import frappe from frappe.model.document import Document @@ -25,11 +25,19 @@ class PaymentEntryReference(Document): parent: DF.Data parentfield: DF.Data parenttype: DF.Data + payment_request: DF.Link | None + payment_request_outstanding: DF.Float payment_term: DF.Link | None + payment_term_outstanding: DF.Float payment_type: DF.Data | None reference_doctype: DF.Link reference_name: DF.DynamicLink total_amount: DF.Float # end: auto-generated types - pass + @property + def payment_request_outstanding(self): + if not self.payment_request: + return + + return frappe.db.get_value("Payment Request", self.payment_request, "outstanding_amount") diff --git a/erpnext/accounts/doctype/payment_request/payment_request.js b/erpnext/accounts/doctype/payment_request/payment_request.js index e45aa512fe8..50f96a4e2b6 100644 --- a/erpnext/accounts/doctype/payment_request/payment_request.js +++ b/erpnext/accounts/doctype/payment_request/payment_request.js @@ -48,8 +48,8 @@ frappe.ui.form.on("Payment Request", "refresh", function (frm) { } if ( - (!frm.doc.payment_gateway_account || frm.doc.payment_request_type == "Outward") && - frm.doc.status == "Initiated" + frm.doc.payment_request_type == "Outward" && + ["Initiated", "Partially Paid"].includes(frm.doc.status) ) { frm.add_custom_button(__("Create Payment Entry"), function () { frappe.call({ diff --git a/erpnext/accounts/doctype/payment_request/payment_request.json b/erpnext/accounts/doctype/payment_request/payment_request.json index d0651f74bdf..7806bc682b0 100644 --- a/erpnext/accounts/doctype/payment_request/payment_request.json +++ b/erpnext/accounts/doctype/payment_request/payment_request.json @@ -19,9 +19,11 @@ "reference_name", "transaction_details", "grand_total", + "currency", "is_a_subscription", "column_break_18", - "currency", + "outstanding_amount", + "party_account_currency", "subscription_section", "subscription_plans", "bank_account_details", @@ -69,6 +71,7 @@ { "fieldname": "transaction_date", "fieldtype": "Date", + "in_preview": 1, "label": "Transaction Date" }, { @@ -133,7 +136,8 @@ "no_copy": 1, "options": "reference_doctype", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "search_index": 1 }, { "fieldname": "transaction_details", @@ -141,12 +145,14 @@ "label": "Transaction Details" }, { - "description": "Amount in customer's currency", + "description": "Amount in transaction currency", "fieldname": "grand_total", "fieldtype": "Currency", + "in_preview": 1, "label": "Amount", "non_negative": 1, - "options": "currency" + "options": "currency", + "reqd": 1 }, { "default": "0", @@ -392,19 +398,50 @@ "print_hide": 1, "read_only": 1 }, + { + "fieldname": "failed_reason", + "fieldtype": "Data", + "hidden": 1, + "label": "Reason for Failure", + "no_copy": 1, + "print_hide": 1, + "read_only": 1 + }, + { + "depends_on": "eval: doc.docstatus === 1", + "description": "Amount in party's bank account currency", + "fieldname": "outstanding_amount", + "fieldtype": "Currency", + "in_preview": 1, + "label": "Outstanding Amount", + "non_negative": 1, + "options": "party_account_currency", + "read_only": 1 + }, { "fieldname": "company", "fieldtype": "Link", "label": "Company", "options": "Company", "read_only": 1 + }, + { + "fieldname": "column_break_pnyv", + "fieldtype": "Column Break" + }, + { + "fieldname": "party_account_currency", + "fieldtype": "Link", + "label": "Party Account Currency", + "options": "Currency", + "read_only": 1 } ], "in_create": 1, "index_web_pages_for_search": 1, "is_submittable": 1, "links": [], - "modified": "2024-08-07 16:39:54.288002", + "modified": "2024-09-16 17:50:54.440090", "modified_by": "Administrator", "module": "Accounts", "name": "Payment Request", @@ -439,7 +476,8 @@ "write": 1 } ], + "show_preview_popup": 1, "sort_field": "modified", "sort_order": "DESC", "states": [] -} +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/payment_request/payment_request.py b/erpnext/accounts/doctype/payment_request/payment_request.py index 83b43a15987..0dab9d905be 100644 --- a/erpnext/accounts/doctype/payment_request/payment_request.py +++ b/erpnext/accounts/doctype/payment_request/payment_request.py @@ -3,9 +3,11 @@ import json import frappe from frappe import _ from frappe.model.document import Document +from frappe.query_builder.functions import Sum from frappe.utils import flt, nowdate from frappe.utils.background_jobs import enqueue +from erpnext import get_company_currency from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import ( get_accounting_dimensions, ) @@ -45,9 +47,11 @@ class PaymentRequest(Document): bank_account: DF.Link | None bank_account_no: DF.ReadOnly | None branch_code: DF.ReadOnly | None + company: DF.Link | None cost_center: DF.Link | None currency: DF.Link | None email_to: DF.Data | None + failed_reason: DF.Data | None grand_total: DF.Currency iban: DF.ReadOnly | None is_a_subscription: DF.Check @@ -56,16 +60,18 @@ class PaymentRequest(Document): mode_of_payment: DF.Link | None mute_email: DF.Check naming_series: DF.Literal["ACC-PRQ-.YYYY.-"] + outstanding_amount: DF.Currency party: DF.DynamicLink | None + party_account_currency: DF.Link | None party_type: DF.Link | None payment_account: DF.ReadOnly | None - payment_channel: DF.Literal["", "Email", "Phone"] + payment_channel: DF.Literal["", "Email", "Phone", "Other"] payment_gateway: DF.ReadOnly | None payment_gateway_account: DF.Link | None payment_order: DF.Link | None payment_request_type: DF.Literal["Outward", "Inward"] payment_url: DF.Data | None - print_format: DF.Literal + print_format: DF.Literal[None] project: DF.Link | None reference_doctype: DF.Link | None reference_name: DF.DynamicLink | None @@ -84,7 +90,6 @@ class PaymentRequest(Document): subscription_plans: DF.Table[SubscriptionPlanDetail] swift_number: DF.ReadOnly | None transaction_date: DF.Date | None - company: DF.Link | None # end: auto-generated types def validate(self): @@ -100,6 +105,12 @@ class PaymentRequest(Document): frappe.throw(_("To create a Payment Request reference document is required")) def validate_payment_request_amount(self): + if self.grand_total == 0: + frappe.throw( + _("{0} cannot be zero").format(self.get_label_from_fieldname("grand_total")), + title=_("Invalid Amount"), + ) + existing_payment_request_amount = flt( get_existing_payment_request_amount(self.reference_doctype, self.reference_name) ) @@ -147,28 +158,44 @@ class PaymentRequest(Document): ).format(self.grand_total, amount) ) - def on_submit(self): - if self.payment_request_type == "Outward": - self.db_set("status", "Initiated") - return - elif self.payment_request_type == "Inward": - self.db_set("status", "Requested") - - send_mail = self.payment_gateway_validation() if self.payment_gateway else None - ref_doc = frappe.get_doc(self.reference_doctype, self.reference_name) - + def before_submit(self): if ( - hasattr(ref_doc, "order_type") and ref_doc.order_type == "Shopping Cart" - ) or self.flags.mute_email: - send_mail = False + self.currency != self.party_account_currency + and self.party_account_currency == get_company_currency(self.company) + ): + # set outstanding amount in party account currency + invoice = frappe.get_value( + self.reference_doctype, + self.reference_name, + ["rounded_total", "grand_total", "base_rounded_total", "base_grand_total"], + as_dict=1, + ) + grand_total = invoice.get("rounded_total") or invoice.get("grand_total") + base_grand_total = invoice.get("base_rounded_total") or invoice.get("base_grand_total") + self.outstanding_amount = flt( + self.grand_total / grand_total * base_grand_total, + self.precision("outstanding_amount"), + ) - if send_mail and self.payment_channel != "Phone": - self.set_payment_request_url() - self.send_email() - self.make_communication_entry() + else: + self.outstanding_amount = self.grand_total - elif self.payment_channel == "Phone": - self.request_phone_payment() + if self.payment_request_type == "Outward": + self.status = "Initiated" + elif self.payment_request_type == "Inward": + self.status = "Requested" + + if self.payment_request_type == "Inward": + if self.payment_channel == "Phone": + self.request_phone_payment() + else: + self.set_payment_request_url() + if not (self.mute_email or self.flags.mute_email): + self.send_email() + self.make_communication_entry() + + def on_submit(self): + self.update_reference_advance_payment_status() def request_phone_payment(self): controller = _get_payment_gateway_controller(self.payment_gateway) @@ -207,6 +234,7 @@ class PaymentRequest(Document): def on_cancel(self): self.check_if_payment_entry_exists() self.set_as_cancelled() + self.update_reference_advance_payment_status() def make_invoice(self): ref_doc = frappe.get_doc(self.reference_doctype, self.reference_name) @@ -275,7 +303,7 @@ class PaymentRequest(Document): def set_as_paid(self): if self.payment_channel == "Phone": - self.db_set("status", "Paid") + self.db_set({"status": "Paid", "outstanding_amount": 0}) else: payment_entry = self.create_payment_entry() @@ -296,26 +324,32 @@ class PaymentRequest(Document): else: party_account = get_party_account("Customer", ref_doc.get("customer"), ref_doc.company) - party_account_currency = ref_doc.get("party_account_currency") or get_account_currency(party_account) + party_account_currency = ( + self.get("party_account_currency") + or ref_doc.get("party_account_currency") + or get_account_currency(party_account) + ) + + party_amount = bank_amount = self.outstanding_amount - bank_amount = self.grand_total if party_account_currency == ref_doc.company_currency and party_account_currency != self.currency: - party_amount = ref_doc.get("base_rounded_total") or ref_doc.get("base_grand_total") - else: - party_amount = self.grand_total + exchange_rate = ref_doc.get("conversion_rate") + bank_amount = flt(self.outstanding_amount / exchange_rate, self.precision("grand_total")) + # outstanding amount is already in Part's account currency payment_entry = get_payment_entry( self.reference_doctype, self.reference_name, party_amount=party_amount, bank_account=self.payment_account, bank_amount=bank_amount, + created_from_payment_request=True, ) payment_entry.update( { "mode_of_payment": self.mode_of_payment, - "reference_no": self.name, + "reference_no": self.name, # to prevent validation error "reference_date": nowdate(), "remarks": "Payment Entry against {} {} via Payment Request {}".format( self.reference_doctype, self.reference_name, self.name @@ -323,6 +357,9 @@ class PaymentRequest(Document): } ) + # Allocate payment_request for each reference in payment_entry (Payment Term can splits the row) + self._allocate_payment_request_to_pe_references(references=payment_entry.references) + # Update dimensions payment_entry.update( { @@ -331,14 +368,6 @@ class PaymentRequest(Document): } ) - if party_account_currency == ref_doc.company_currency and party_account_currency != self.currency: - amount = payment_entry.base_paid_amount - else: - amount = self.grand_total - - payment_entry.received_amount = amount - payment_entry.get("references")[0].allocated_amount = amount - # Update 'Paid Amount' on Forex transactions if self.currency != ref_doc.company_currency: if ( @@ -429,6 +458,70 @@ class PaymentRequest(Document): return create_stripe_subscription(gateway_controller, data) + def update_reference_advance_payment_status(self): + advance_payment_doctypes = frappe.get_hooks("advance_payment_receivable_doctypes") + frappe.get_hooks( + "advance_payment_payable_doctypes" + ) + if self.reference_doctype in advance_payment_doctypes: + ref_doc = frappe.get_doc(self.reference_doctype, self.reference_name) + ref_doc.set_advance_payment_status() + + def _allocate_payment_request_to_pe_references(self, references): + """ + Allocate the Payment Request to the Payment Entry references based on\n + - Allocated Amount. + - Outstanding Amount of Payment Request.\n + Payment Request is doc itself and references are the rows of Payment Entry. + """ + if len(references) == 1: + references[0].payment_request = self.name + return + + precision = references[0].precision("allocated_amount") + outstanding_amount = self.outstanding_amount + + # to manage rows + row_number = 1 + MOVE_TO_NEXT_ROW = 1 + TO_SKIP_NEW_ROW = 2 + NEW_ROW_ADDED = False + + while row_number <= len(references): + row = references[row_number - 1] + + # update the idx to maintain the order + row.idx = row_number + + if outstanding_amount == 0: + if not NEW_ROW_ADDED: + break + + row_number += MOVE_TO_NEXT_ROW + continue + + # allocate the payment request to the row + row.payment_request = self.name + + if row.allocated_amount <= outstanding_amount: + outstanding_amount = flt(outstanding_amount - row.allocated_amount, precision) + row_number += MOVE_TO_NEXT_ROW + else: + remaining_allocated_amount = flt(row.allocated_amount - outstanding_amount, precision) + row.allocated_amount = outstanding_amount + outstanding_amount = 0 + + # create a new row without PR for remaining unallocated amount + new_row = frappe.copy_doc(row) + references.insert(row_number, new_row) + + # update new row + new_row.idx = row_number + 1 + new_row.payment_request = None + new_row.allocated_amount = remaining_allocated_amount + + NEW_ROW_ADDED = True + row_number += TO_SKIP_NEW_ROW + @frappe.whitelist(allow_guest=True) def make_payment_request(**args): @@ -459,11 +552,15 @@ def make_payment_request(**args): {"reference_doctype": args.dt, "reference_name": args.dn, "docstatus": 0}, ) - existing_payment_request_amount = get_existing_payment_request_amount(args.dt, args.dn) + # fetches existing payment request `grand_total` amount + existing_payment_request_amount = get_existing_payment_request_amount(ref_doc.doctype, ref_doc.name) if existing_payment_request_amount: grand_total -= existing_payment_request_amount + if not grand_total: + frappe.throw(_("Payment Request is already created")) + if draft_payment_request: frappe.db.set_value( "Payment Request", draft_payment_request, "grand_total", grand_total, update_modified=False @@ -477,6 +574,13 @@ def make_payment_request(**args): "Outward" if args.get("dt") in ["Purchase Order", "Purchase Invoice"] else "Inward" ) + party_type = args.get("party_type") or "Customer" + party_account_currency = ref_doc.party_account_currency + + if not party_account_currency: + party_account = get_party_account(party_type, ref_doc.get(party_type.lower()), ref_doc.company) + party_account_currency = get_account_currency(party_account) + pr.update( { "payment_gateway_account": gateway_account.get("name"), @@ -485,6 +589,7 @@ def make_payment_request(**args): "payment_channel": gateway_account.get("payment_channel"), "payment_request_type": args.get("payment_request_type"), "currency": ref_doc.currency, + "party_account_currency": party_account_currency, "grand_total": grand_total, "mode_of_payment": args.mode_of_payment, "email_to": args.recipient_id or ref_doc.owner, @@ -493,7 +598,7 @@ def make_payment_request(**args): "reference_doctype": args.dt, "reference_name": args.dn, "company": ref_doc.get("company"), - "party_type": args.get("party_type") or "Customer", + "party_type": party_type, "party": args.get("party") or ref_doc.get("customer"), "bank_account": bank_account, } @@ -539,9 +644,11 @@ def get_amount(ref_doc, payment_account=None): elif dt in ["Sales Invoice", "Purchase Invoice"]: if not ref_doc.get("is_pos"): if ref_doc.party_account_currency == ref_doc.currency: - grand_total = flt(ref_doc.grand_total) + grand_total = flt(ref_doc.rounded_total or ref_doc.grand_total) else: - grand_total = flt(ref_doc.base_grand_total) / ref_doc.conversion_rate + grand_total = flt( + flt(ref_doc.base_rounded_total or ref_doc.base_grand_total) / ref_doc.conversion_rate + ) elif dt == "Sales Invoice": for pay in ref_doc.payments: if pay.type == "Phone" and pay.account == payment_account: @@ -563,24 +670,20 @@ def get_amount(ref_doc, payment_account=None): def get_existing_payment_request_amount(ref_dt, ref_dn): """ - Get the existing payment request which are unpaid or partially paid for payment channel other than Phone - and get the summation of existing paid payment request for Phone payment channel. + Return the total amount of Payment Requests against a reference document. """ - existing_payment_request_amount = frappe.db.sql( - """ - select sum(grand_total) - from `tabPayment Request` - where - reference_doctype = %s - and reference_name = %s - and docstatus = 1 - and (status != 'Paid' - or (payment_channel = 'Phone' - and status = 'Paid')) - """, - (ref_dt, ref_dn), + PR = frappe.qb.DocType("Payment Request") + + response = ( + frappe.qb.from_(PR) + .select(Sum(PR.grand_total)) + .where(PR.reference_doctype == ref_dt) + .where(PR.reference_name == ref_dn) + .where(PR.docstatus == 1) + .run() ) - return flt(existing_payment_request_amount[0][0]) if existing_payment_request_amount else 0 + + return response[0][0] if response[0] else 0 def get_gateway_details(args): # nosemgrep @@ -627,41 +730,66 @@ def make_payment_entry(docname): return doc.create_payment_entry(submit=False).as_dict() -def update_payment_req_status(doc, method): - from erpnext.accounts.doctype.payment_entry.payment_entry import get_reference_details +def update_payment_requests_as_per_pe_references(references=None, cancel=False): + """ + Update Payment Request's `Status` and `Outstanding Amount` based on Payment Entry Reference's `Allocated Amount`. + """ + if not references: + return - for ref in doc.references: - payment_request_name = frappe.db.get_value( - "Payment Request", - { - "reference_doctype": ref.reference_doctype, - "reference_name": ref.reference_name, - "docstatus": 1, - }, + precision = references[0].precision("allocated_amount") + + referenced_payment_requests = frappe.get_all( + "Payment Request", + filters={"name": ["in", {row.payment_request for row in references if row.payment_request}]}, + fields=[ + "name", + "grand_total", + "outstanding_amount", + "payment_request_type", + ], + ) + + referenced_payment_requests = {pr.name: pr for pr in referenced_payment_requests} + + for ref in references: + if not ref.payment_request: + continue + + payment_request = referenced_payment_requests[ref.payment_request] + pr_outstanding = payment_request["outstanding_amount"] + + # update outstanding amount + new_outstanding_amount = flt( + pr_outstanding + ref.allocated_amount if cancel else pr_outstanding - ref.allocated_amount, + precision, ) - if payment_request_name: - ref_details = get_reference_details( - ref.reference_doctype, - ref.reference_name, - doc.party_account_currency, - doc.party_type, - doc.party, + # to handle same payment request for the multiple allocations + payment_request["outstanding_amount"] = new_outstanding_amount + + if not cancel and new_outstanding_amount < 0: + frappe.throw( + msg=_( + "The allocated amount is greater than the outstanding amount of Payment Request {0}" + ).format(ref.payment_request), + title=_("Invalid Allocated Amount"), ) - pay_req_doc = frappe.get_doc("Payment Request", payment_request_name) - status = pay_req_doc.status - if status != "Paid" and not ref_details.outstanding_amount: - status = "Paid" - elif status != "Partially Paid" and ref_details.outstanding_amount != ref_details.total_amount: - status = "Partially Paid" - elif ref_details.outstanding_amount == ref_details.total_amount: - if pay_req_doc.payment_request_type == "Outward": - status = "Initiated" - elif pay_req_doc.payment_request_type == "Inward": - status = "Requested" + # update status + if new_outstanding_amount == payment_request["grand_total"]: + status = "Initiated" if payment_request["payment_request_type"] == "Outward" else "Requested" + elif new_outstanding_amount == 0: + status = "Paid" + elif new_outstanding_amount > 0: + status = "Partially Paid" - pay_req_doc.db_set("status", status) + # update database + frappe.db.set_value( + "Payment Request", + ref.payment_request, + {"outstanding_amount": new_outstanding_amount, "status": status}, + ) def get_dummy_message(doc): @@ -745,3 +873,62 @@ def validate_payment(doc, method=None): doc.reference_docname ) ) + + +def get_paid_amount_against_order(dt, dn): + pe_ref = frappe.qb.DocType("Payment Entry Reference") + if dt == "Sales Order": + inv_dt, inv_field = "Sales Invoice Item", "sales_order" + else: + inv_dt, inv_field = "Purchase Invoice Item", "purchase_order" + inv_item = frappe.qb.DocType(inv_dt) + return ( + frappe.qb.from_(pe_ref) + .select( + Sum(pe_ref.allocated_amount), + ) + .where( + (pe_ref.docstatus == 1) + & ( + (pe_ref.reference_name == dn) + | pe_ref.reference_name.isin( + frappe.qb.from_(inv_item) + .select(inv_item.parent) + .where(inv_item[inv_field] == dn) + .distinct() + ) + ) + ) + ).run()[0][0] or 0 + + +@frappe.whitelist() +def get_open_payment_requests_query(doctype, txt, searchfield, start, page_len, filters): + # permission checks in `get_list()` + reference_doctype = filters.get("reference_doctype") + reference_name = filters.get("reference_doctype") + + if not reference_doctype or not reference_name: + return [] + + open_payment_requests = frappe.get_list( + "Payment Request", + filters={ + "reference_doctype": filters["reference_doctype"], + "reference_name": filters["reference_name"], + "status": ["!=", "Paid"], + "outstanding_amount": ["!=", 0], # for compatibility with old data + "docstatus": 1, + }, + fields=["name", "grand_total", "outstanding_amount"], + order_by="transaction_date ASC,creation ASC", + ) + + return [ + ( + pr.name, + _("Grand Total: {0}").format(pr.grand_total), + _("Outstanding Amount: {0}").format(pr.outstanding_amount), + ) + for pr in open_payment_requests + ] diff --git a/erpnext/accounts/doctype/payment_request/test_payment_request.py b/erpnext/accounts/doctype/payment_request/test_payment_request.py index 6d15f84d7cf..4caffdb431a 100644 --- a/erpnext/accounts/doctype/payment_request/test_payment_request.py +++ b/erpnext/accounts/doctype/payment_request/test_payment_request.py @@ -1,11 +1,13 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt +import re import unittest import frappe from frappe.tests.utils import FrappeTestCase +from erpnext.accounts.doctype.payment_entry.test_payment_entry import create_payment_terms_template from erpnext.accounts.doctype.payment_request.payment_request import make_payment_request from erpnext.accounts.doctype.purchase_invoice.test_purchase_invoice import make_purchase_invoice from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice @@ -278,3 +280,256 @@ class TestPaymentRequest(FrappeTestCase): self.assertEqual(pe.paid_amount, 800) self.assertEqual(pe.base_received_amount, 800) self.assertEqual(pe.received_amount, 10) + + def test_multiple_payment_if_partially_paid_for_same_currency(self): + so = make_sales_order(currency="INR", qty=1, rate=1000) + + self.assertEqual(so.advance_payment_status, "Not Requested") + + pr = make_payment_request( + dt="Sales Order", + dn=so.name, + mute_email=1, + submit_doc=1, + return_doc=1, + ) + + self.assertEqual(pr.grand_total, 1000) + self.assertEqual(pr.outstanding_amount, pr.grand_total) + self.assertEqual(pr.party_account_currency, pr.currency) # INR + self.assertEqual(pr.status, "Requested") + + so.load_from_db() + self.assertEqual(so.advance_payment_status, "Requested") + + # to make partial payment + pe = pr.create_payment_entry(submit=False) + pe.paid_amount = 200 + pe.references[0].allocated_amount = 200 + pe.submit() + + self.assertEqual(pe.references[0].payment_request, pr.name) + + so.load_from_db() + self.assertEqual(so.advance_payment_status, "Partially Paid") + + pr.load_from_db() + self.assertEqual(pr.status, "Partially Paid") + self.assertEqual(pr.outstanding_amount, 800) + self.assertEqual(pr.grand_total, 1000) + + # complete payment + pe = pr.create_payment_entry() + + self.assertEqual(pe.paid_amount, 800) # paid amount set from pr's outstanding amount + self.assertEqual(pe.references[0].allocated_amount, 800) + self.assertEqual(pe.references[0].outstanding_amount, 800) # for Orders it is not zero + self.assertEqual(pe.references[0].payment_request, pr.name) + + so.load_from_db() + self.assertEqual(so.advance_payment_status, "Fully Paid") + + pr.load_from_db() + self.assertEqual(pr.status, "Paid") + self.assertEqual(pr.outstanding_amount, 0) + self.assertEqual(pr.grand_total, 1000) + + # creating a more payment Request must not allowed + self.assertRaisesRegex( + frappe.exceptions.ValidationError, + re.compile(r"Payment Request is already created"), + make_payment_request, + dt="Sales Order", + dn=so.name, + mute_email=1, + submit_doc=1, + return_doc=1, + ) + + def test_multiple_payment_if_partially_paid_for_multi_currency(self): + pi = make_purchase_invoice(currency="USD", conversion_rate=50, qty=1, rate=100) + + pr = make_payment_request( + dt="Purchase Invoice", + dn=pi.name, + mute_email=1, + submit_doc=1, + return_doc=1, + ) + + # 100 USD -> 5000 INR + self.assertEqual(pr.grand_total, 100) + self.assertEqual(pr.outstanding_amount, 5000) + self.assertEqual(pr.currency, "USD") + self.assertEqual(pr.party_account_currency, "INR") + self.assertEqual(pr.status, "Initiated") + + # to make partial payment + pe = pr.create_payment_entry(submit=False) + pe.paid_amount = 2000 + pe.references[0].allocated_amount = 2000 + pe.submit() + + self.assertEqual(pe.references[0].payment_request, pr.name) + + pr.load_from_db() + self.assertEqual(pr.status, "Partially Paid") + self.assertEqual(pr.outstanding_amount, 3000) + self.assertEqual(pr.grand_total, 100) + + # complete payment + pe = pr.create_payment_entry() + self.assertEqual(pe.paid_amount, 3000) # paid amount set from pr's outstanding amount + self.assertEqual(pe.references[0].allocated_amount, 3000) + self.assertEqual(pe.references[0].outstanding_amount, 0) # for Invoices it will zero + self.assertEqual(pe.references[0].payment_request, pr.name) + + pr.load_from_db() + self.assertEqual(pr.status, "Paid") + self.assertEqual(pr.outstanding_amount, 0) + self.assertEqual(pr.grand_total, 100) + + # creating a more payment Request must not allowed + self.assertRaisesRegex( + frappe.exceptions.ValidationError, + re.compile(r"Payment Request is already created"), + make_payment_request, + dt="Purchase Invoice", + dn=pi.name, + mute_email=1, + submit_doc=1, + return_doc=1, + ) + + def test_single_payment_with_payment_term_for_same_currency(self): + create_payment_terms_template() + + po = create_purchase_order(do_not_save=1, currency="INR", qty=1, rate=20000) + po.payment_terms_template = "Test Receivable Template" # 84.746 and 15.254 + po.save() + po.submit() + + self.assertEqual(po.advance_payment_status, "Not Initiated") + + pr = make_payment_request( + dt="Purchase Order", + dn=po.name, + mute_email=1, + submit_doc=1, + return_doc=1, + ) + + self.assertEqual(pr.grand_total, 20000) + self.assertEqual(pr.outstanding_amount, pr.grand_total) + self.assertEqual(pr.party_account_currency, pr.currency) # INR + self.assertEqual(pr.status, "Initiated") + + po.load_from_db() + self.assertEqual(po.advance_payment_status, "Initiated") + + pe = pr.create_payment_entry() + + self.assertEqual(len(pe.references), 2) + self.assertEqual(pe.paid_amount, 20000) + + # check 1st payment term + self.assertEqual(pe.references[0].allocated_amount, 16949.2) + self.assertEqual(pe.references[0].payment_request, pr.name) + + # check 2nd payment term + self.assertEqual(pe.references[1].allocated_amount, 3050.8) + self.assertEqual(pe.references[1].payment_request, pr.name) + + po.load_from_db() + self.assertEqual(po.advance_payment_status, "Fully Paid") + + pr.load_from_db() + self.assertEqual(pr.status, "Paid") + self.assertEqual(pr.outstanding_amount, 0) + self.assertEqual(pr.grand_total, 20000) + + def test_single_payment_with_payment_term_for_multi_currency(self): + create_payment_terms_template() + + si = create_sales_invoice(do_not_save=1, currency="USD", qty=1, rate=200, conversion_rate=50) + si.payment_terms_template = "Test Receivable Template" # 84.746 and 15.254 + si.save() + si.submit() + + pr = make_payment_request( + dt="Sales Invoice", + dn=si.name, + mute_email=1, + submit_doc=1, + return_doc=1, + ) + + # 200 USD -> 10000 INR + self.assertEqual(pr.grand_total, 200) + self.assertEqual(pr.outstanding_amount, 10000) + self.assertEqual(pr.currency, "USD") + self.assertEqual(pr.party_account_currency, "INR") + self.assertEqual(pr.status, "Requested") + + pe = pr.create_payment_entry() + self.assertEqual(len(pe.references), 2) + self.assertEqual(pe.paid_amount, 10000) + + # check 1st payment term + # convert it via dollar and conversion_rate + self.assertEqual(pe.references[0].allocated_amount, 8474.5) # multi currency conversion + self.assertEqual(pe.references[0].payment_request, pr.name) + + # check 2nd payment term + self.assertEqual(pe.references[1].allocated_amount, 1525.5) # multi currency conversion + self.assertEqual(pe.references[1].payment_request, pr.name) + + pr.load_from_db() + self.assertEqual(pr.status, "Paid") + self.assertEqual(pr.outstanding_amount, 0) + self.assertEqual(pr.grand_total, 200) + + def test_payment_cancel_process(self): + so = make_sales_order(currency="INR", qty=1, rate=1000) + self.assertEqual(so.advance_payment_status, "Not Requested") + + pr = make_payment_request( + dt="Sales Order", + dn=so.name, + mute_email=1, + submit_doc=1, + return_doc=1, + ) + + self.assertEqual(pr.status, "Requested") + self.assertEqual(pr.grand_total, 1000) + self.assertEqual(pr.outstanding_amount, pr.grand_total) + + so.load_from_db() + self.assertEqual(so.advance_payment_status, "Requested") + + pe = pr.create_payment_entry(submit=False) + pe.paid_amount = 800 + pe.references[0].allocated_amount = 800 + pe.submit() + + self.assertEqual(pe.references[0].payment_request, pr.name) + + so.load_from_db() + self.assertEqual(so.advance_payment_status, "Partially Paid") + + pr.load_from_db() + self.assertEqual(pr.status, "Partially Paid") + self.assertEqual(pr.outstanding_amount, 200) + self.assertEqual(pr.grand_total, 1000) + + # cancelling PE + pe.cancel() + + pr.load_from_db() + self.assertEqual(pr.status, "Requested") + self.assertEqual(pr.outstanding_amount, 1000) + self.assertEqual(pr.grand_total, 1000) + + so.load_from_db() + self.assertEqual(so.advance_payment_status, "Requested") diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 44a9813c89e..b248d9f5aba 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -1966,7 +1966,38 @@ class AccountsController(TransactionBase): ).format(formatted_advance_paid, self.name, formatted_order_total) ) - frappe.db.set_value(self.doctype, self.name, "advance_paid", advance_paid) + self.db_set("advance_paid", advance_paid) + + self.set_advance_payment_status() + + def set_advance_payment_status(self): + new_status = None + + paid_amount = frappe.get_value( + doctype="Payment Request", + filters={ + "reference_doctype": self.doctype, + "reference_name": self.name, + "docstatus": 1, + }, + fieldname="sum(grand_total - outstanding_amount)", + ) + + if not paid_amount: + if self.doctype in frappe.get_hooks("advance_payment_receivable_doctypes"): + new_status = "Not Requested" if paid_amount is None else "Requested" + elif self.doctype in frappe.get_hooks("advance_payment_payable_doctypes"): + new_status = "Not Initiated" if paid_amount is None else "Initiated" + else: + total_amount = self.get("rounded_total") or self.get("grand_total") + new_status = "Fully Paid" if paid_amount == total_amount else "Partially Paid" + + if new_status == self.advance_payment_status: + return + + self.db_set("advance_payment_status", new_status, update_modified=False) + self.set_status(update=True) + self.notify_update() @property def company_abbr(self): From 1d6f97ad945f8d0225533fb03e6866561316481b Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Fri, 27 Sep 2024 23:29:39 +0530 Subject: [PATCH 0177/1614] fix: Ignore transaction deletion check on ledger entry insertion (cherry picked from commit 998f6a92a48b57dbde1d76e848378bd743d0fa03) --- .../transaction_deletion_record.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/erpnext/setup/doctype/transaction_deletion_record/transaction_deletion_record.py b/erpnext/setup/doctype/transaction_deletion_record/transaction_deletion_record.py index c9c3c837ceb..ce3f918f7eb 100644 --- a/erpnext/setup/doctype/transaction_deletion_record/transaction_deletion_record.py +++ b/erpnext/setup/doctype/transaction_deletion_record/transaction_deletion_record.py @@ -485,8 +485,14 @@ def is_deletion_doc_running(company: str | None = None, err_msg: str | None = No def check_for_running_deletion_job(doc, method=None): # Check if DocType has 'company' field - df = qb.DocType("DocField") - if qb.from_(df).select(df.parent).where((df.fieldname == "company") & (df.parent == doc.doctype)).run(): - is_deletion_doc_running( - doc.company, _("Cannot make any transactions until the deletion job is completed") - ) + if doc.doctype not in ("GL Entry", "Payment Ledger Entry", "Stock Ledger Entry"): + df = qb.DocType("DocField") + if ( + qb.from_(df) + .select(df.parent) + .where((df.fieldname == "company") & (df.parent == doc.doctype)) + .run() + ): + is_deletion_doc_running( + doc.company, _("Cannot make any transactions until the deletion job is completed") + ) From 27cd51e267b3a11ab474ca085b5a0dc6cef87fad Mon Sep 17 00:00:00 2001 From: Khushi Rawat <142375893+khushi8112@users.noreply.github.com> Date: Thu, 26 Sep 2024 16:49:01 +0530 Subject: [PATCH 0178/1614] feat: added 'cost of new capitalized asset' column (cherry picked from commit 1eb9cc33fc298c90ef5a04e5de2ee4dec67f941a) --- .../asset_depreciations_and_balances.py | 40 ++++++++++++++++--- 1 file changed, 35 insertions(+), 5 deletions(-) diff --git a/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.py b/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.py index 64e6a340464..cdd5baf3240 100644 --- a/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.py +++ b/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.py @@ -36,8 +36,9 @@ def get_group_by_asset_category_data(filters): + flt(row.cost_of_new_purchase) - flt(row.cost_of_sold_asset) - flt(row.cost_of_scrapped_asset) + - flt(row.cost_of_capitalized_asset) ) - # Update row with corresponding asset data + row.update( next( asset @@ -111,13 +112,24 @@ def get_asset_categories_for_grouped_by_category(filters): end else 0 - end), 0) as cost_of_scrapped_asset + end), 0) as cost_of_scrapped_asset, + ifnull(sum(case when ifnull(a.disposal_date, 0) != 0 + and a.disposal_date >= %(from_date)s + and a.disposal_date <= %(to_date)s then + case when a.status = "Capitalized" then + a.gross_purchase_amount + else + 0 + end + else + 0 + end), 0) as cost_of_capitalized_asset from `tabAsset` a where a.docstatus=1 and a.company=%(company)s and a.purchase_date <= %(to_date)s {condition} and not exists( select 1 from `tabAsset Capitalization Asset Item` acai join `tabAsset Capitalization` ac on acai.parent=ac.name where acai.asset = a.name - and ac.posting_date <= %(to_date)s + and ac.posting_date < %(from_date)s and ac.docstatus=1 ) group by a.asset_category @@ -179,13 +191,24 @@ def get_asset_details_for_grouped_by_category(filters): end else 0 - end), 0) as cost_of_scrapped_asset + end), 0) as cost_of_scrapped_asset, + ifnull(sum(case when ifnull(a.disposal_date, 0) != 0 + and a.disposal_date >= %(from_date)s + and a.disposal_date <= %(to_date)s then + case when a.status = "Capitalized" then + a.gross_purchase_amount + else + 0 + end + else + 0 + end), 0) as cost_of_capitalized_asset from `tabAsset` a where a.docstatus=1 and a.company=%(company)s and a.purchase_date <= %(to_date)s {condition} and not exists( select 1 from `tabAsset Capitalization Asset Item` acai join `tabAsset Capitalization` ac on acai.parent=ac.name where acai.asset = a.name - and ac.posting_date <= %(to_date)s + and ac.posting_date < %(from_date)s and ac.docstatus=1 ) group by a.name @@ -217,6 +240,7 @@ def get_group_by_asset_data(filters): + flt(row.cost_of_new_purchase) - flt(row.cost_of_sold_asset) - flt(row.cost_of_scrapped_asset) + - flt(row.cost_of_capitalized_asset) ) row.update(next(asset for asset in assets if asset["asset"] == asset_detail.get("name", ""))) @@ -445,6 +469,12 @@ def get_columns(filters): "fieldtype": "Currency", "width": 140, }, + { + "label": _("Cost of New Capitalized Asset"), + "fieldname": "cost_of_capitalized_asset", + "fieldtype": "Currency", + "width": 140, + }, { "label": _("Cost as on") + " " + formatdate(filters.to_date), "fieldname": "cost_as_on_to_date", From c1f14f2991371006c9b8c942b3797fbf728ca54c Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Fri, 27 Sep 2024 23:29:39 +0530 Subject: [PATCH 0179/1614] fix: Ignore transaction deletion check on ledger entry insertion (cherry picked from commit 998f6a92a48b57dbde1d76e848378bd743d0fa03) (cherry picked from commit 1d6f97ad945f8d0225533fb03e6866561316481b) --- .../transaction_deletion_record.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/erpnext/setup/doctype/transaction_deletion_record/transaction_deletion_record.py b/erpnext/setup/doctype/transaction_deletion_record/transaction_deletion_record.py index c9c3c837ceb..ce3f918f7eb 100644 --- a/erpnext/setup/doctype/transaction_deletion_record/transaction_deletion_record.py +++ b/erpnext/setup/doctype/transaction_deletion_record/transaction_deletion_record.py @@ -485,8 +485,14 @@ def is_deletion_doc_running(company: str | None = None, err_msg: str | None = No def check_for_running_deletion_job(doc, method=None): # Check if DocType has 'company' field - df = qb.DocType("DocField") - if qb.from_(df).select(df.parent).where((df.fieldname == "company") & (df.parent == doc.doctype)).run(): - is_deletion_doc_running( - doc.company, _("Cannot make any transactions until the deletion job is completed") - ) + if doc.doctype not in ("GL Entry", "Payment Ledger Entry", "Stock Ledger Entry"): + df = qb.DocType("DocField") + if ( + qb.from_(df) + .select(df.parent) + .where((df.fieldname == "company") & (df.parent == doc.doctype)) + .run() + ): + is_deletion_doc_running( + doc.company, _("Cannot make any transactions until the deletion job is completed") + ) From e706aa692a988a51b6f8791cd2d55951dd2f4c46 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Fri, 27 Sep 2024 18:30:37 +0000 Subject: [PATCH 0180/1614] chore(release): Bumped to Version 15.36.3 ## [15.36.3](https://github.com/frappe/erpnext/compare/v15.36.2...v15.36.3) (2024-09-27) ### Bug Fixes * Ignore transaction deletion check on ledger entry insertion ([c1f14f2](https://github.com/frappe/erpnext/commit/c1f14f2991371006c9b8c942b3797fbf728ca54c)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 89f9ab1605e..34d07c1e23b 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.36.2" +__version__ = "15.36.3" def get_default_company(user=None): From 907e3af1b0f5a08617f637573f3abc3e3eb56253 Mon Sep 17 00:00:00 2001 From: Abdeali Chharchhoda Date: Sat, 28 Sep 2024 12:09:33 +0530 Subject: [PATCH 0181/1614] fix: Remove `advance_payment_status` uses --- .../payment_request/payment_request.py | 11 ------- .../payment_request/test_payment_request.py | 13 -------- erpnext/controllers/accounts_controller.py | 31 ------------------- erpnext/hooks.py | 1 - 4 files changed, 56 deletions(-) diff --git a/erpnext/accounts/doctype/payment_request/payment_request.py b/erpnext/accounts/doctype/payment_request/payment_request.py index 0dab9d905be..9fbc73afea7 100644 --- a/erpnext/accounts/doctype/payment_request/payment_request.py +++ b/erpnext/accounts/doctype/payment_request/payment_request.py @@ -194,9 +194,6 @@ class PaymentRequest(Document): self.send_email() self.make_communication_entry() - def on_submit(self): - self.update_reference_advance_payment_status() - def request_phone_payment(self): controller = _get_payment_gateway_controller(self.payment_gateway) request_amount = self.get_request_amount() @@ -458,14 +455,6 @@ class PaymentRequest(Document): return create_stripe_subscription(gateway_controller, data) - def update_reference_advance_payment_status(self): - advance_payment_doctypes = frappe.get_hooks("advance_payment_receivable_doctypes") + frappe.get_hooks( - "advance_payment_payable_doctypes" - ) - if self.reference_doctype in advance_payment_doctypes: - ref_doc = frappe.get_doc(self.reference_doctype, self.reference_name) - ref_doc.set_advance_payment_status() - def _allocate_payment_request_to_pe_references(self, references): """ Allocate the Payment Request to the Payment Entry references based on\n diff --git a/erpnext/accounts/doctype/payment_request/test_payment_request.py b/erpnext/accounts/doctype/payment_request/test_payment_request.py index 4caffdb431a..053863babdc 100644 --- a/erpnext/accounts/doctype/payment_request/test_payment_request.py +++ b/erpnext/accounts/doctype/payment_request/test_payment_request.py @@ -284,8 +284,6 @@ class TestPaymentRequest(FrappeTestCase): def test_multiple_payment_if_partially_paid_for_same_currency(self): so = make_sales_order(currency="INR", qty=1, rate=1000) - self.assertEqual(so.advance_payment_status, "Not Requested") - pr = make_payment_request( dt="Sales Order", dn=so.name, @@ -300,7 +298,6 @@ class TestPaymentRequest(FrappeTestCase): self.assertEqual(pr.status, "Requested") so.load_from_db() - self.assertEqual(so.advance_payment_status, "Requested") # to make partial payment pe = pr.create_payment_entry(submit=False) @@ -311,7 +308,6 @@ class TestPaymentRequest(FrappeTestCase): self.assertEqual(pe.references[0].payment_request, pr.name) so.load_from_db() - self.assertEqual(so.advance_payment_status, "Partially Paid") pr.load_from_db() self.assertEqual(pr.status, "Partially Paid") @@ -327,7 +323,6 @@ class TestPaymentRequest(FrappeTestCase): self.assertEqual(pe.references[0].payment_request, pr.name) so.load_from_db() - self.assertEqual(so.advance_payment_status, "Fully Paid") pr.load_from_db() self.assertEqual(pr.status, "Paid") @@ -409,8 +404,6 @@ class TestPaymentRequest(FrappeTestCase): po.save() po.submit() - self.assertEqual(po.advance_payment_status, "Not Initiated") - pr = make_payment_request( dt="Purchase Order", dn=po.name, @@ -425,7 +418,6 @@ class TestPaymentRequest(FrappeTestCase): self.assertEqual(pr.status, "Initiated") po.load_from_db() - self.assertEqual(po.advance_payment_status, "Initiated") pe = pr.create_payment_entry() @@ -441,7 +433,6 @@ class TestPaymentRequest(FrappeTestCase): self.assertEqual(pe.references[1].payment_request, pr.name) po.load_from_db() - self.assertEqual(po.advance_payment_status, "Fully Paid") pr.load_from_db() self.assertEqual(pr.status, "Paid") @@ -491,7 +482,6 @@ class TestPaymentRequest(FrappeTestCase): def test_payment_cancel_process(self): so = make_sales_order(currency="INR", qty=1, rate=1000) - self.assertEqual(so.advance_payment_status, "Not Requested") pr = make_payment_request( dt="Sales Order", @@ -506,7 +496,6 @@ class TestPaymentRequest(FrappeTestCase): self.assertEqual(pr.outstanding_amount, pr.grand_total) so.load_from_db() - self.assertEqual(so.advance_payment_status, "Requested") pe = pr.create_payment_entry(submit=False) pe.paid_amount = 800 @@ -516,7 +505,6 @@ class TestPaymentRequest(FrappeTestCase): self.assertEqual(pe.references[0].payment_request, pr.name) so.load_from_db() - self.assertEqual(so.advance_payment_status, "Partially Paid") pr.load_from_db() self.assertEqual(pr.status, "Partially Paid") @@ -532,4 +520,3 @@ class TestPaymentRequest(FrappeTestCase): self.assertEqual(pr.grand_total, 1000) so.load_from_db() - self.assertEqual(so.advance_payment_status, "Requested") diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index b248d9f5aba..1e0745b7861 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -1968,37 +1968,6 @@ class AccountsController(TransactionBase): self.db_set("advance_paid", advance_paid) - self.set_advance_payment_status() - - def set_advance_payment_status(self): - new_status = None - - paid_amount = frappe.get_value( - doctype="Payment Request", - filters={ - "reference_doctype": self.doctype, - "reference_name": self.name, - "docstatus": 1, - }, - fieldname="sum(grand_total - outstanding_amount)", - ) - - if not paid_amount: - if self.doctype in frappe.get_hooks("advance_payment_receivable_doctypes"): - new_status = "Not Requested" if paid_amount is None else "Requested" - elif self.doctype in frappe.get_hooks("advance_payment_payable_doctypes"): - new_status = "Not Initiated" if paid_amount is None else "Initiated" - else: - total_amount = self.get("rounded_total") or self.get("grand_total") - new_status = "Fully Paid" if paid_amount == total_amount else "Partially Paid" - - if new_status == self.advance_payment_status: - return - - self.db_set("advance_payment_status", new_status, update_modified=False) - self.set_status(update=True) - self.notify_update() - @property def company_abbr(self): if not hasattr(self, "_abbr"): diff --git a/erpnext/hooks.py b/erpnext/hooks.py index bd367d6d95e..30121e5f2cb 100644 --- a/erpnext/hooks.py +++ b/erpnext/hooks.py @@ -365,7 +365,6 @@ doc_events = { "Payment Entry": { "on_submit": [ "erpnext.regional.create_transaction_log", - "erpnext.accounts.doctype.payment_request.payment_request.update_payment_req_status", "erpnext.accounts.doctype.dunning.dunning.resolve_dunning", ], "on_cancel": ["erpnext.accounts.doctype.dunning.dunning.resolve_dunning"], From 770bc1c293b106c1bb3ec5077ce73c068973d179 Mon Sep 17 00:00:00 2001 From: Abdeali Chharchhoda Date: Sat, 28 Sep 2024 12:29:34 +0530 Subject: [PATCH 0182/1614] fix: Remove unreference method --- erpnext/accounts/doctype/payment_request/payment_request.py | 1 - 1 file changed, 1 deletion(-) diff --git a/erpnext/accounts/doctype/payment_request/payment_request.py b/erpnext/accounts/doctype/payment_request/payment_request.py index 9fbc73afea7..6d1d279c244 100644 --- a/erpnext/accounts/doctype/payment_request/payment_request.py +++ b/erpnext/accounts/doctype/payment_request/payment_request.py @@ -231,7 +231,6 @@ class PaymentRequest(Document): def on_cancel(self): self.check_if_payment_entry_exists() self.set_as_cancelled() - self.update_reference_advance_payment_status() def make_invoice(self): ref_doc = frappe.get_doc(self.reference_doctype, self.reference_name) From a1b6628c41ef965d855cd6890f0919871b4ca58d Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Sun, 29 Sep 2024 09:46:14 +0530 Subject: [PATCH 0183/1614] fix: quality inspection creation (backport #43416) (#43417) fix: quality inspection creation (#43416) (cherry picked from commit a594c05296cae58ea546933f834dd3f5b651fd09) Co-authored-by: rohitwaghchaure --- erpnext/stock/doctype/quality_inspection/quality_inspection.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/stock/doctype/quality_inspection/quality_inspection.py b/erpnext/stock/doctype/quality_inspection/quality_inspection.py index 5dca440adbe..43efcbc8ca6 100644 --- a/erpnext/stock/doctype/quality_inspection/quality_inspection.py +++ b/erpnext/stock/doctype/quality_inspection/quality_inspection.py @@ -245,6 +245,7 @@ class QualityInspection(Document): for i in range(1, 11): field = "reading_" + str(i) if reading.get(field) is None: + data[field] = 0.0 continue data[field] = parse_float(reading.get(field)) From d495d93840c809bfdf7a7109e6fe883eae0e5193 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Sun, 29 Sep 2024 11:09:32 +0530 Subject: [PATCH 0184/1614] fix: use serial and batch fields (backport #43421) (#43423) fix: use serial and batch fields (#43421) (cherry picked from commit ca16089d9ddb692953ae6e493fff1019e9ab70f2) Co-authored-by: rohitwaghchaure --- erpnext/public/js/controllers/transaction.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 204c09299ad..851bd64f3b4 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -573,6 +573,15 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe callback: function(r) { if(!r.exc) { frappe.run_serially([ + () => { + if (item.docstatus === 0 + && frappe.meta.has_field(item.doctype, "use_serial_batch_fields") + && !item.use_serial_batch_fields + && cint(frappe.user_defaults?.use_serial_batch_fields) === 1 + ) { + item["use_serial_batch_fields"] = 1; + } + }, () => { var d = locals[cdt][cdn]; me.add_taxes_from_item_tax_template(d.item_tax_rate); From 4b3f143f8366881d8cc427d56a14d6c38403d688 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Sun, 29 Sep 2024 21:18:25 +0530 Subject: [PATCH 0185/1614] fix: Data missing in table: None, MandatoryError (backport #43422) (#43429) fix: Data missing in table: None, MandatoryError (#43422) (cherry picked from commit 8e33e0e1d2df18d8401919e518cdf75e469d87a7) Co-authored-by: rohitwaghchaure --- erpnext/stock/doctype/stock_entry/stock_entry.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index 4ee4c6b2930..627ad78be58 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -3148,11 +3148,13 @@ def get_available_materials(work_order) -> dict: if row.serial_no: for serial_no in get_serial_nos(row.serial_no): - item_data.serial_nos.remove(serial_no) + if serial_no in item_data.serial_nos: + item_data.serial_nos.remove(serial_no) elif row.serial_nos: for serial_no in get_serial_nos(row.serial_nos): - item_data.serial_nos.remove(serial_no) + if serial_no in item_data.serial_nos: + item_data.serial_nos.remove(serial_no) return available_materials @@ -3270,6 +3272,9 @@ def create_serial_and_batch_bundle(parent_doc, row, child, type_of_transaction=N for batch_no, qty in row.batches_to_be_consume.items(): doc.append("entries", {"batch_no": batch_no, "warehouse": row.warehouse, "qty": qty * -1}) + if not doc.entries: + return None + return doc.insert(ignore_permissions=True).name From 2c4610c021dcbc53af5f7f40a0682ab3d2590711 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Sun, 29 Sep 2024 21:18:25 +0530 Subject: [PATCH 0186/1614] fix: Data missing in table: None, MandatoryError (backport #43422) (#43429) fix: Data missing in table: None, MandatoryError (#43422) (cherry picked from commit 8e33e0e1d2df18d8401919e518cdf75e469d87a7) Co-authored-by: rohitwaghchaure (cherry picked from commit 4b3f143f8366881d8cc427d56a14d6c38403d688) --- erpnext/stock/doctype/stock_entry/stock_entry.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index 4ee4c6b2930..627ad78be58 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -3148,11 +3148,13 @@ def get_available_materials(work_order) -> dict: if row.serial_no: for serial_no in get_serial_nos(row.serial_no): - item_data.serial_nos.remove(serial_no) + if serial_no in item_data.serial_nos: + item_data.serial_nos.remove(serial_no) elif row.serial_nos: for serial_no in get_serial_nos(row.serial_nos): - item_data.serial_nos.remove(serial_no) + if serial_no in item_data.serial_nos: + item_data.serial_nos.remove(serial_no) return available_materials @@ -3270,6 +3272,9 @@ def create_serial_and_batch_bundle(parent_doc, row, child, type_of_transaction=N for batch_no, qty in row.batches_to_be_consume.items(): doc.append("entries", {"batch_no": batch_no, "warehouse": row.warehouse, "qty": qty * -1}) + if not doc.entries: + return None + return doc.insert(ignore_permissions=True).name From 86b10ce9bbfbf4279d52df9b17c660e6baeda934 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Sun, 29 Sep 2024 22:06:50 +0530 Subject: [PATCH 0187/1614] fix: tests for work order consumption (backport #41814) (#43430) fix: tests for work order consumption (#41814) * fix: tests for work order automatic SABB creation * fix: qty * chore: show created sabb * chore: fix syntax * fix: check SABB qty * fix: add batched consumable to manufacture * fix: missing fg qty field * fix: improve test debug * chore: linting * chore: removed extra hash icons --------- Co-authored-by: Rohit Waghchaure (cherry picked from commit ca3c6809098e4383db4f6ac2e3243c13da2970cf) Co-authored-by: Richard Case <110036763+casesolved-co-uk@users.noreply.github.com> --- .../doctype/work_order/test_work_order.py | 214 ++++++++++++++++++ 1 file changed, 214 insertions(+) diff --git a/erpnext/manufacturing/doctype/work_order/test_work_order.py b/erpnext/manufacturing/doctype/work_order/test_work_order.py index ebc400979b6..6ee3f73eb08 100644 --- a/erpnext/manufacturing/doctype/work_order/test_work_order.py +++ b/erpnext/manufacturing/doctype/work_order/test_work_order.py @@ -1531,6 +1531,197 @@ class TestWorkOrder(FrappeTestCase): self.assertFalse(serial_nos) + def test_backflushed_batch_raw_materials_based_on_transferred_autosabb(self): + frappe.db.set_single_value( + "Manufacturing Settings", + "backflush_raw_materials_based_on", + "Material Transferred for Manufacture", + ) + + batch_item = "Test Batch MCC Keyboard" + fg_item = "Test FG Item with Batch Raw Materials" + + ste_doc = test_stock_entry.make_stock_entry( + item_code=batch_item, target="Stores - _TC", qty=8, basic_rate=100, do_not_save=True + ) + + # Inward raw materials in Stores warehouse + ste_doc.submit() + ste_doc.reload() + + batch_no = get_batch_from_bundle(ste_doc.items[0].serial_and_batch_bundle) + + wo_doc = make_wo_order_test_record(production_item=fg_item, qty=4) + # action taken upon Start button: + transferred_ste_doc = frappe.get_doc( + make_stock_entry(wo_doc.name, "Material Transfer for Manufacture", 4) + ) + + transferred_ste_doc.submit() + transferred_ste_doc.reload() + + self.assertTrue(transferred_ste_doc.items[0].serial_and_batch_bundle) + self.assertEqual( + get_batch_from_bundle(transferred_ste_doc.items[0].serial_and_batch_bundle), batch_no + ) + self.assertEqual(transferred_ste_doc.items[0].qty, 4.0) + + # Make additional consumption and link to WO + test_stock_entry.make_stock_entry( + item_code="Test Batch Battery Consumable", + target="Stores - _TC", + qty=8, + basic_rate=2.33, + ) + consume_use_doc = test_stock_entry.make_stock_entry( + item_code="Test Batch Battery Consumable", # consumable not linked to BOM + source="Stores - _TC", + qty=4, + purpose="Material Consumption for Manufacture", + do_not_save=True, + ) + consume_use_doc.work_order = wo_doc.name + consume_use_doc.fg_completed_qty = 4 + consume_use_doc.submit() + consume_use_doc.reload() + + manufacture_ste_doc = frappe.get_doc(make_stock_entry(wo_doc.name, "Manufacture", 4)) + mfr_items = [i.as_dict() for i in manufacture_ste_doc.items] + manufacture_ste_doc.submit() + manufacture_ste_doc.reload() + + self.assertTrue(len(mfr_items), 2) + self.assertTrue(manufacture_ste_doc.items[0].serial_and_batch_bundle) + self.assertEqual( + get_batch_from_bundle(manufacture_ste_doc.items[0].serial_and_batch_bundle), batch_no + ) + self.assertEqual(manufacture_ste_doc.items[0].qty, 4.0) + + def test_backflushed_serial_no_raw_materials_based_on_transferred_autosabb(self): + frappe.db.set_single_value( + "Manufacturing Settings", + "backflush_raw_materials_based_on", + "Material Transferred for Manufacture", + ) + + sn_item = "Test Serial No BTT Headphone" + fg_item = "Test FG Item with Serial No Raw Materials" + + ste_doc = test_stock_entry.make_stock_entry( + item_code=sn_item, target="Stores - _TC", qty=4, basic_rate=100, do_not_save=True + ) + + # Inward raw materials in Stores warehouse + ste_doc.submit() + ste_doc.reload() + + serial_nos_list = sorted(get_serial_nos_from_bundle(ste_doc.items[0].serial_and_batch_bundle)) + + wo_doc = make_wo_order_test_record(production_item=fg_item, qty=4) + transferred_ste_doc = frappe.get_doc( + make_stock_entry(wo_doc.name, "Material Transfer for Manufacture", 4) + ) + + transferred_ste_doc.submit() + transferred_ste_doc.reload() + + self.assertTrue(transferred_ste_doc.items[0].serial_and_batch_bundle) + self.assertEqual( + sorted(get_serial_nos_from_bundle(transferred_ste_doc.items[0].serial_and_batch_bundle)), + serial_nos_list, + ) + self.assertEqual(transferred_ste_doc.items[0].qty, 4.0) + + # Make additional consumption and link to WO + test_stock_entry.make_stock_entry( + item_code="Test Serial Battery Consumable", + target="Stores - _TC", + qty=8, + basic_rate=3.33, + ) + consume_use_doc = test_stock_entry.make_stock_entry( + item_code="Test Serial Battery Consumable", # consumable not linked to BOM + source="Stores - _TC", + qty=4, + purpose="Material Consumption for Manufacture", + do_not_save=True, + ) + consume_use_doc.work_order = wo_doc.name + consume_use_doc.fg_completed_qty = 4 + consume_use_doc.submit() + consume_use_doc.reload() + + manufacture_ste_doc = frappe.get_doc(make_stock_entry(wo_doc.name, "Manufacture", 4)) + mfr_items = [i.as_dict() for i in manufacture_ste_doc.items] + manufacture_ste_doc.submit() + manufacture_ste_doc.reload() + + self.assertTrue(len(mfr_items), 2) + self.assertTrue(manufacture_ste_doc.items[0].serial_and_batch_bundle) + self.assertEqual( + sorted(get_serial_nos_from_bundle(manufacture_ste_doc.items[0].serial_and_batch_bundle)), + serial_nos_list, + ) + self.assertEqual(manufacture_ste_doc.items[0].qty, 4.0) + + def test_backflushed_serial_no_batch_raw_materials_based_on_transferred_autosabb(self): + frappe.db.set_single_value( + "Manufacturing Settings", + "backflush_raw_materials_based_on", + "Material Transferred for Manufacture", + ) + + sn_batch_item = "Test Batch Serial No WebCam" + fg_item = "Test FG Item with Serial & Batch No Raw Materials" + + ste_doc = test_stock_entry.make_stock_entry( + item_code=sn_batch_item, target="Stores - _TC", qty=4, basic_rate=100, do_not_save=True + ) + + ste_doc.submit() + ste_doc.reload() + + serial_nos_list = sorted(get_serial_nos_from_bundle(ste_doc.items[0].serial_and_batch_bundle)) + batch_no = get_batch_from_bundle(ste_doc.items[0].serial_and_batch_bundle) + + wo_doc = make_wo_order_test_record(production_item=fg_item, qty=4) + transferred_ste_doc = frappe.get_doc( + make_stock_entry(wo_doc.name, "Material Transfer for Manufacture", 4) + ) + + transferred_ste_doc.submit() + transferred_ste_doc.reload() + + self.assertTrue(transferred_ste_doc.items[0].serial_and_batch_bundle) + self.assertEqual( + sorted(get_serial_nos_from_bundle(transferred_ste_doc.items[0].serial_and_batch_bundle)), + serial_nos_list, + ) + self.assertEqual( + get_batch_from_bundle(transferred_ste_doc.items[0].serial_and_batch_bundle), batch_no + ) + self.assertEqual(transferred_ste_doc.items[0].qty, 4.0) + + manufacture_ste_doc = frappe.get_doc(make_stock_entry(wo_doc.name, "Manufacture", 4)) + manufacture_ste_doc.submit() + manufacture_ste_doc.reload() + + self.assertTrue(manufacture_ste_doc.items[0].serial_and_batch_bundle) + self.assertEqual( + sorted(get_serial_nos_from_bundle(manufacture_ste_doc.items[0].serial_and_batch_bundle)), + serial_nos_list, + ) + self.assertEqual( + get_batch_from_bundle(manufacture_ste_doc.items[0].serial_and_batch_bundle), batch_no + ) + self.assertEqual(manufacture_ste_doc.items[0].qty, 4.0) + + bundle = manufacture_ste_doc.items[0].serial_and_batch_bundle + bundle_doc = frappe.get_doc("Serial and Batch Bundle", bundle) + qty = sum(e.qty for e in bundle_doc.entries) + self.assertEqual(qty, -4.0) + + ### def test_non_consumed_material_return_against_work_order(self): frappe.db.set_single_value( "Manufacturing Settings", @@ -2335,6 +2526,29 @@ def prepare_data_for_backflush_based_on_materials_transferred(): make_bom(item=item.name, source_warehouse="Stores - _TC", raw_materials=[batch_item_doc.name]) + # Make additional items not attached to a BOM + make_item( + "Test Batch Battery Consumable", + { + "is_stock_item": 1, + "has_batch_no": 1, + "create_new_batch": 1, + "batch_number_series": "TBMK.#####", + "valuation_rate": 2.33, + "stock_uom": "Nos", + }, + ) + make_item( + "Test Serial Battery Consumable", + { + "is_stock_item": 1, + "has_serial_no": 1, + "serial_no_series": "TSBH.#####", + "valuation_rate": 3.33, + "stock_uom": "Nos", + }, + ) + sn_item_doc = make_item( "Test Serial No BTT Headphone", { From 2d09ef250936bac9b46dc7b5050da9534a73b103 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Sun, 29 Sep 2024 16:38:13 +0000 Subject: [PATCH 0188/1614] chore(release): Bumped to Version 15.36.4 ## [15.36.4](https://github.com/frappe/erpnext/compare/v15.36.3...v15.36.4) (2024-09-29) ### Bug Fixes * Data missing in table: None, MandatoryError (backport [#43422](https://github.com/frappe/erpnext/issues/43422)) ([#43429](https://github.com/frappe/erpnext/issues/43429)) ([2c4610c](https://github.com/frappe/erpnext/commit/2c4610c021dcbc53af5f7f40a0682ab3d2590711)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 34d07c1e23b..aab2aa1480a 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.36.3" +__version__ = "15.36.4" def get_default_company(user=None): From 2984bad2c09061c949a55d8d62f0fa39bbbbdfd2 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Sun, 29 Sep 2024 09:18:52 +0530 Subject: [PATCH 0189/1614] fix: Stock Ledger Invariant Check report (cherry picked from commit d7daedc5b21a952c0bfa46079595f016179bcca0) --- .../stock_ledger_invariant_check.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/report/stock_ledger_invariant_check/stock_ledger_invariant_check.py b/erpnext/stock/report/stock_ledger_invariant_check/stock_ledger_invariant_check.py index fb392f7e36a..6fc109f1c6e 100644 --- a/erpnext/stock/report/stock_ledger_invariant_check/stock_ledger_invariant_check.py +++ b/erpnext/stock/report/stock_ledger_invariant_check/stock_ledger_invariant_check.py @@ -52,7 +52,7 @@ def add_invariant_check_fields(sles): balance_qty = 0.0 balance_stock_value = 0.0 for idx, sle in enumerate(sles): - queue = json.loads(sle.stock_queue) + queue = json.loads(sle.stock_queue) if sle.stock_queue else [] fifo_qty = 0.0 fifo_value = 0.0 From 50e47e796dc4a91fb4b3e653fb5cc679c58916cf Mon Sep 17 00:00:00 2001 From: Kitti U Date: Fri, 6 Sep 2024 12:53:47 +0700 Subject: [PATCH 0190/1614] feat: provide hook point for bulk transaction tasks (cherry picked from commit d4dd01d8d142f10068aa76a3fe2aedb84820a151) --- erpnext/utilities/bulk_transaction.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/erpnext/utilities/bulk_transaction.py b/erpnext/utilities/bulk_transaction.py index 4319fa7d6ea..7ba687941c9 100644 --- a/erpnext/utilities/bulk_transaction.py +++ b/erpnext/utilities/bulk_transaction.py @@ -137,6 +137,11 @@ def task(doc_name, from_doctype, to_doctype): }, "Purchase Receipt": {"Purchase Invoice": purchase_receipt.make_purchase_invoice}, } + + hooks = frappe.get_hooks("bulk_transaction_task_mapper") + for hook in hooks: + mapper.update(frappe.get_attr(hook)()) + frappe.flags.bulk_transaction = True if to_doctype in ["Payment Entry"]: obj = mapper[from_doctype][to_doctype](from_doctype, doc_name) From 21a01575b66aa5f620974f171fbbdd7c1d335fe0 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Mon, 30 Sep 2024 12:05:17 +0530 Subject: [PATCH 0191/1614] fix: 'NoneType' object has no attribute 'has_serial_no' (cherry picked from commit 28f9fd2507861ea72afd0853312ea04a7e42e3f8) --- erpnext/controllers/stock_controller.py | 12 ++++++++++++ .../stock_reconciliation/stock_reconciliation.py | 7 +++++++ 2 files changed, 19 insertions(+) diff --git a/erpnext/controllers/stock_controller.py b/erpnext/controllers/stock_controller.py index 1620fa3bfff..9fb0cc88cfb 100644 --- a/erpnext/controllers/stock_controller.py +++ b/erpnext/controllers/stock_controller.py @@ -64,6 +64,18 @@ class StockController(AccountsController): self.validate_internal_transfer() self.validate_putaway_capacity() + def validate_items_exist(self): + if not self.get("items"): + return + + items = [d.item_code for d in self.get("items")] + + exists_items = frappe.get_all("Item", filters={"name": ("in", items)}, pluck="name") + non_exists_items = set(items) - set(exists_items) + + if non_exists_items: + frappe.throw(_("Items {0} do not exist in the Item master.").format(", ".join(non_exists_items))) + def validate_duplicate_serial_and_batch_bundle(self, table_name): if not self.get(table_name): return diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py index 93e3e69729b..00f5bcf30f1 100644 --- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py +++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py @@ -61,6 +61,7 @@ class StockReconciliation(StockController): self.head_row = ["Item Code", "Warehouse", "Quantity", "Valuation Rate"] def validate(self): + self.validate_items_exist() if not self.expense_account: self.expense_account = frappe.get_cached_value( "Company", self.company, "stock_adjustment_account" @@ -162,6 +163,9 @@ class StockReconciliation(StockController): def set_current_serial_and_batch_bundle(self, voucher_detail_no=None, save=False) -> None: """Set Serial and Batch Bundle for each item""" for item in self.items: + if not frappe.db.exists("Item", item.item_code): + frappe.throw(_("Item {0} does not exist").format(item.item_code)) + if not item.reconcile_all_serial_batch and item.serial_and_batch_bundle: bundle = self.get_bundle_for_specific_serial_batch(item) item.current_serial_and_batch_bundle = bundle.name @@ -357,6 +361,9 @@ class StockReconciliation(StockController): def set_new_serial_and_batch_bundle(self): for item in self.items: + if not item.item_code: + continue + if item.use_serial_batch_fields: continue From c551c2714c97da39541d3d47f8a9d0f9ecaa20e3 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Mon, 30 Sep 2024 13:38:54 +0530 Subject: [PATCH 0192/1614] fix: adjustmen entry for stock reco (cherry picked from commit 4e463b7d6deffc33bdd793322cfaf82c0e86fb63) --- .../stock/doctype/stock_reconciliation/stock_reconciliation.py | 2 +- erpnext/stock/stock_ledger.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py index 00f5bcf30f1..8ee3d9b3901 100644 --- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py +++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py @@ -691,7 +691,7 @@ class StockReconciliation(StockController): from erpnext.stock.stock_ledger import get_stock_value_difference difference_amount = get_stock_value_difference( - row.item_code, row.warehouse, self.posting_date, self.posting_time + row.item_code, row.warehouse, self.posting_date, self.posting_time, self.name ) if not difference_amount: diff --git a/erpnext/stock/stock_ledger.py b/erpnext/stock/stock_ledger.py index 49a3a3335d1..b167ccf6df8 100644 --- a/erpnext/stock/stock_ledger.py +++ b/erpnext/stock/stock_ledger.py @@ -865,7 +865,7 @@ class update_entries_after: sle.stock_value = self.wh_data.stock_value sle.stock_queue = json.dumps(self.wh_data.stock_queue) - if not sle.is_adjustment_entry or not self.args.get("sle_id"): + if not sle.is_adjustment_entry: sle.stock_value_difference = stock_value_difference sle.doctype = "Stock Ledger Entry" From 30fd11f138ce468f5c01f3c5a265eca071293b30 Mon Sep 17 00:00:00 2001 From: Abdeali Chharchhoda Date: Mon, 30 Sep 2024 17:20:42 +0530 Subject: [PATCH 0193/1614] fix: Add removed test code `https://github.com/frappe/erpnext/commit/b41f10c1b98b01a181a6f9dbdf2531b108dc3bae` --- .../payment_request/test_payment_request.py | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/erpnext/accounts/doctype/payment_request/test_payment_request.py b/erpnext/accounts/doctype/payment_request/test_payment_request.py index 053863babdc..6644254ae7e 100644 --- a/erpnext/accounts/doctype/payment_request/test_payment_request.py +++ b/erpnext/accounts/doctype/payment_request/test_payment_request.py @@ -3,6 +3,7 @@ import re import unittest +from unittest.mock import patch import frappe from frappe.tests.utils import FrappeTestCase @@ -17,6 +18,8 @@ from erpnext.setup.utils import get_exchange_rate test_dependencies = ["Currency Exchange", "Journal Entry", "Contact", "Address"] +PAYMENT_URL = "https://example.com/payment" + payment_gateway = {"doctype": "Payment Gateway", "gateway": "_Test Gateway"} payment_method = [ @@ -49,6 +52,28 @@ class TestPaymentRequest(FrappeTestCase): ): frappe.get_doc(method).insert(ignore_permissions=True) + send_email = patch( + "erpnext.accounts.doctype.payment_request.payment_request.PaymentRequest.send_email", + return_value=None, + ) + self.send_email = send_email.start() + self.addCleanup(send_email.stop) + get_payment_url = patch( + # this also shadows one (1) call to _get_payment_gateway_controller + "erpnext.accounts.doctype.payment_request.payment_request.PaymentRequest.get_payment_url", + return_value=PAYMENT_URL, + ) + self.get_payment_url = get_payment_url.start() + self.addCleanup(get_payment_url.stop) + _get_payment_gateway_controller = patch( + "erpnext.accounts.doctype.payment_request.payment_request._get_payment_gateway_controller", + ) + self._get_payment_gateway_controller = _get_payment_gateway_controller.start() + self.addCleanup(_get_payment_gateway_controller.stop) + + def tearDown(self): + frappe.db.rollback() + def test_payment_request_linkings(self): so_inr = make_sales_order(currency="INR", do_not_save=True) so_inr.disable_rounded_total = 1 From e730b8c6e4e38d241f522108519767e4db4cc048 Mon Sep 17 00:00:00 2001 From: David Date: Mon, 25 Mar 2024 16:11:10 +0100 Subject: [PATCH 0194/1614] fix(return): set default return warehouse This captures the case of manual modifications to the return and ensures that by default, the correct return warehouse will be set (cherry picked from commit fa65291e9877464aa650371c21c9a355f91483c3) --- erpnext/controllers/sales_and_purchase_return.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/controllers/sales_and_purchase_return.py b/erpnext/controllers/sales_and_purchase_return.py index 3755506b6f5..8e80b15e972 100644 --- a/erpnext/controllers/sales_and_purchase_return.py +++ b/erpnext/controllers/sales_and_purchase_return.py @@ -335,6 +335,9 @@ def make_return_doc(doctype: str, source_name: str, target_doc=None, return_agai doc.select_print_heading = frappe.get_cached_value("Print Heading", _("Debit Note")) if source.tax_withholding_category: doc.set_onload("supplier_tds", source.tax_withholding_category) + elif doctype == "Delivery Note": + # manual additions to the return should hit the return warehous, too + doc.set_warehouse = default_warehouse_for_sales_return for tax in doc.get("taxes") or []: if tax.charge_type == "Actual": From 67bd540135c246a658e0f081db62e01eb4eacc7f Mon Sep 17 00:00:00 2001 From: Abdeali Chharchhoda Date: Mon, 30 Sep 2024 18:21:59 +0530 Subject: [PATCH 0195/1614] test: Removed initial PR status `assertion` --- .../accounts/doctype/payment_request/test_payment_request.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/erpnext/accounts/doctype/payment_request/test_payment_request.py b/erpnext/accounts/doctype/payment_request/test_payment_request.py index 6644254ae7e..e9f8f25ff2d 100644 --- a/erpnext/accounts/doctype/payment_request/test_payment_request.py +++ b/erpnext/accounts/doctype/payment_request/test_payment_request.py @@ -320,7 +320,6 @@ class TestPaymentRequest(FrappeTestCase): self.assertEqual(pr.grand_total, 1000) self.assertEqual(pr.outstanding_amount, pr.grand_total) self.assertEqual(pr.party_account_currency, pr.currency) # INR - self.assertEqual(pr.status, "Requested") so.load_from_db() @@ -485,7 +484,6 @@ class TestPaymentRequest(FrappeTestCase): self.assertEqual(pr.outstanding_amount, 10000) self.assertEqual(pr.currency, "USD") self.assertEqual(pr.party_account_currency, "INR") - self.assertEqual(pr.status, "Requested") pe = pr.create_payment_entry() self.assertEqual(len(pe.references), 2) @@ -516,7 +514,6 @@ class TestPaymentRequest(FrappeTestCase): return_doc=1, ) - self.assertEqual(pr.status, "Requested") self.assertEqual(pr.grand_total, 1000) self.assertEqual(pr.outstanding_amount, pr.grand_total) From 96d8b5242dd0bfa8ac48450501c32348ab4154c7 Mon Sep 17 00:00:00 2001 From: Khushi Rawat <142375893+khushi8112@users.noreply.github.com> Date: Thu, 26 Sep 2024 16:49:01 +0530 Subject: [PATCH 0196/1614] feat: added 'cost of new capitalized asset' column (cherry picked from commit 1eb9cc33fc298c90ef5a04e5de2ee4dec67f941a) (cherry picked from commit 27cd51e267b3a11ab474ca085b5a0dc6cef87fad) --- .../asset_depreciations_and_balances.py | 40 ++++++++++++++++--- 1 file changed, 35 insertions(+), 5 deletions(-) diff --git a/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.py b/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.py index 64e6a340464..cdd5baf3240 100644 --- a/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.py +++ b/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.py @@ -36,8 +36,9 @@ def get_group_by_asset_category_data(filters): + flt(row.cost_of_new_purchase) - flt(row.cost_of_sold_asset) - flt(row.cost_of_scrapped_asset) + - flt(row.cost_of_capitalized_asset) ) - # Update row with corresponding asset data + row.update( next( asset @@ -111,13 +112,24 @@ def get_asset_categories_for_grouped_by_category(filters): end else 0 - end), 0) as cost_of_scrapped_asset + end), 0) as cost_of_scrapped_asset, + ifnull(sum(case when ifnull(a.disposal_date, 0) != 0 + and a.disposal_date >= %(from_date)s + and a.disposal_date <= %(to_date)s then + case when a.status = "Capitalized" then + a.gross_purchase_amount + else + 0 + end + else + 0 + end), 0) as cost_of_capitalized_asset from `tabAsset` a where a.docstatus=1 and a.company=%(company)s and a.purchase_date <= %(to_date)s {condition} and not exists( select 1 from `tabAsset Capitalization Asset Item` acai join `tabAsset Capitalization` ac on acai.parent=ac.name where acai.asset = a.name - and ac.posting_date <= %(to_date)s + and ac.posting_date < %(from_date)s and ac.docstatus=1 ) group by a.asset_category @@ -179,13 +191,24 @@ def get_asset_details_for_grouped_by_category(filters): end else 0 - end), 0) as cost_of_scrapped_asset + end), 0) as cost_of_scrapped_asset, + ifnull(sum(case when ifnull(a.disposal_date, 0) != 0 + and a.disposal_date >= %(from_date)s + and a.disposal_date <= %(to_date)s then + case when a.status = "Capitalized" then + a.gross_purchase_amount + else + 0 + end + else + 0 + end), 0) as cost_of_capitalized_asset from `tabAsset` a where a.docstatus=1 and a.company=%(company)s and a.purchase_date <= %(to_date)s {condition} and not exists( select 1 from `tabAsset Capitalization Asset Item` acai join `tabAsset Capitalization` ac on acai.parent=ac.name where acai.asset = a.name - and ac.posting_date <= %(to_date)s + and ac.posting_date < %(from_date)s and ac.docstatus=1 ) group by a.name @@ -217,6 +240,7 @@ def get_group_by_asset_data(filters): + flt(row.cost_of_new_purchase) - flt(row.cost_of_sold_asset) - flt(row.cost_of_scrapped_asset) + - flt(row.cost_of_capitalized_asset) ) row.update(next(asset for asset in assets if asset["asset"] == asset_detail.get("name", ""))) @@ -445,6 +469,12 @@ def get_columns(filters): "fieldtype": "Currency", "width": 140, }, + { + "label": _("Cost of New Capitalized Asset"), + "fieldname": "cost_of_capitalized_asset", + "fieldtype": "Currency", + "width": 140, + }, { "label": _("Cost as on") + " " + formatdate(filters.to_date), "fieldname": "cost_as_on_to_date", From 01f9139ebdfd8c1a88dbfb292ec225ef9524e3b2 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Mon, 30 Sep 2024 17:21:09 +0000 Subject: [PATCH 0197/1614] chore(release): Bumped to Version 15.37.0 # [15.37.0](https://github.com/frappe/erpnext/compare/v15.36.4...v15.37.0) (2024-09-30) ### Features * added 'cost of new capitalized asset' column ([96d8b52](https://github.com/frappe/erpnext/commit/96d8b5242dd0bfa8ac48450501c32348ab4154c7)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index aab2aa1480a..c240944687b 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.36.4" +__version__ = "15.37.0" def get_default_company(user=None): From 5fc59349421e739cea28aab29b437678808a4224 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 30 Sep 2024 22:18:49 +0200 Subject: [PATCH 0198/1614] fix(Item): error message on tax rate (backport #42955) (#42956) Co-authored-by: barredterra <14891507+barredterra@users.noreply.github.com> --- erpnext/stock/doctype/item/item.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/item/item.py b/erpnext/stock/doctype/item/item.py index 1ceb949d691..751a37e3164 100644 --- a/erpnext/stock/doctype/item/item.py +++ b/erpnext/stock/doctype/item/item.py @@ -345,7 +345,13 @@ class Item(Document): def validate_item_tax_net_rate_range(self): for tax in self.get("taxes"): if flt(tax.maximum_net_rate) < flt(tax.minimum_net_rate): - frappe.throw(_("Row #{0}: Maximum Net Rate cannot be greater than Minimum Net Rate")) + frappe.throw( + _("Taxes row #{0}: {1} cannot be smaller than {2}").format( + tax.idx, + bold(_(tax.meta.get_label("maximum_net_rate"))), + bold(_(tax.meta.get_label("minimum_net_rate"))), + ) + ) def update_template_tables(self): template = frappe.get_cached_doc("Item", self.variant_of) From 7bf6251c21a5249c1c3ade63b29b25d1cb597433 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 1 Oct 2024 10:34:48 +0530 Subject: [PATCH 0199/1614] fix: negative stock error for batch (backport #43450) (#43454) fix: negative stock error for batch (#43450) (cherry picked from commit 912ba7789c9178c596cc38e253e316f3bd6cd9ce) Co-authored-by: rohitwaghchaure --- .../serial_and_batch_bundle.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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 a1944732fb6..62f95f5b2e8 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 @@ -280,7 +280,7 @@ class SerialandBatchBundle(Document): ) def validate_negative_batch(self, batch_no, available_qty): - if available_qty < 0: + if available_qty < 0 and not self.is_stock_reco_for_valuation_adjustment(available_qty): msg = f"""Batch No {bold(batch_no)} of an Item {bold(self.item_code)} has negative stock of quantity {bold(available_qty)} in the @@ -288,6 +288,18 @@ class SerialandBatchBundle(Document): frappe.throw(_(msg), BatchNegativeStockError) + def is_stock_reco_for_valuation_adjustment(self, available_qty): + if ( + self.voucher_type == "Stock Reconciliation" + and self.type_of_transaction == "Outward" + and self.voucher_detail_no + and abs(frappe.db.get_value("Stock Reconciliation Item", self.voucher_detail_no, "qty")) + == abs(available_qty) + ): + return True + + return False + def get_sle_for_outward_transaction(self): sle = frappe._dict( { From 4fc6d3ef64df33303078b624cba6ca09cea03845 Mon Sep 17 00:00:00 2001 From: Nihantra Patel Date: Tue, 1 Oct 2024 10:50:43 +0530 Subject: [PATCH 0200/1614] fix: add company filter in Warehouse wise Item Balance Age and Value (cherry picked from commit 75950f86cff9e456693947b530ce257d354648bd) --- .../warehouse_wise_item_balance_age_and_value.js | 15 +++++++++++++++ .../warehouse_wise_item_balance_age_and_value.py | 2 -- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/erpnext/stock/report/warehouse_wise_item_balance_age_and_value/warehouse_wise_item_balance_age_and_value.js b/erpnext/stock/report/warehouse_wise_item_balance_age_and_value/warehouse_wise_item_balance_age_and_value.js index 137c786e44b..ac1ecfff530 100644 --- a/erpnext/stock/report/warehouse_wise_item_balance_age_and_value/warehouse_wise_item_balance_age_and_value.js +++ b/erpnext/stock/report/warehouse_wise_item_balance_age_and_value/warehouse_wise_item_balance_age_and_value.js @@ -3,6 +3,15 @@ frappe.query_reports["Warehouse wise Item Balance Age and Value"] = { filters: [ + { + fieldname: "company", + label: __("Company"), + fieldtype: "Link", + width: "80", + options: "Company", + reqd: 1, + default: frappe.defaults.get_user_default("Company"), + }, { fieldname: "from_date", label: __("From Date"), @@ -39,6 +48,12 @@ frappe.query_reports["Warehouse wise Item Balance Age and Value"] = { fieldtype: "Link", width: "80", options: "Warehouse", + get_query: function () { + const company = frappe.query_report.get_filter_value("company"); + return { + filters: { company: company }, + }; + }, }, { fieldname: "filter_total_zero_qty", diff --git a/erpnext/stock/report/warehouse_wise_item_balance_age_and_value/warehouse_wise_item_balance_age_and_value.py b/erpnext/stock/report/warehouse_wise_item_balance_age_and_value/warehouse_wise_item_balance_age_and_value.py index 0df8b6ddb48..68caff40356 100644 --- a/erpnext/stock/report/warehouse_wise_item_balance_age_and_value/warehouse_wise_item_balance_age_and_value.py +++ b/erpnext/stock/report/warehouse_wise_item_balance_age_and_value/warehouse_wise_item_balance_age_and_value.py @@ -109,8 +109,6 @@ def validate_filters(filters): sle_count = flt(frappe.qb.from_("Stock Ledger Entry").select(Count("name")).run()[0][0]) if sle_count > 500000: frappe.throw(_("Please set filter based on Item or Warehouse")) - if not filters.get("company"): - filters["company"] = frappe.defaults.get_user_default("Company") def get_warehouse_list(filters): From ee2c8c869ad19a5d5e629b5598f508a9cc4927e9 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 1 Oct 2024 12:54:26 +0530 Subject: [PATCH 0201/1614] fix: last purchase rate for purchase invoice (backport #43448) (#43452) * fix: last purchase rate for purchase invoice (cherry picked from commit fb9d10663388431644ac1798ba1f9363d9db2775) # Conflicts: # erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py * chore: fix conflicts --------- Co-authored-by: Rohit Waghchaure --- .../purchase_invoice/test_purchase_invoice.py | 18 +++++ erpnext/controllers/buying_controller.py | 8 ++- erpnext/public/js/controllers/transaction.js | 4 ++ erpnext/stock/doctype/item/item.py | 71 ++++++++++++------- 4 files changed, 71 insertions(+), 30 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py index 31143fb72b8..cf5bfedaebd 100644 --- a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py @@ -2292,6 +2292,24 @@ class TestPurchaseInvoice(FrappeTestCase, StockTestMixin): frappe.db.set_single_value("Buying Settings", "maintain_same_rate", 1) + def test_last_purchase_rate(self): + item = create_item("_Test Item For Last Purchase Rate from PI", is_stock_item=1) + pi1 = make_purchase_invoice(item_code=item.item_code, qty=10, rate=100) + item.reload() + self.assertEqual(item.last_purchase_rate, 100) + + pi2 = make_purchase_invoice(item_code=item.item_code, qty=10, rate=200) + item.reload() + self.assertEqual(item.last_purchase_rate, 200) + + pi2.cancel() + item.reload() + self.assertEqual(item.last_purchase_rate, 100) + + pi1.cancel() + item.reload() + self.assertEqual(item.last_purchase_rate, 0) + def set_advance_flag(company, flag, default_account): frappe.db.set_value( diff --git a/erpnext/controllers/buying_controller.py b/erpnext/controllers/buying_controller.py index 31b6f391ba4..e9e7ef62670 100644 --- a/erpnext/controllers/buying_controller.py +++ b/erpnext/controllers/buying_controller.py @@ -702,9 +702,11 @@ class BuyingController(SubcontractingController): if self.get("is_return"): return - if self.doctype in ["Purchase Order", "Purchase Receipt"] and not frappe.db.get_single_value( - "Buying Settings", "disable_last_purchase_rate" - ): + if self.doctype in [ + "Purchase Order", + "Purchase Receipt", + "Purchase Invoice", + ] and not frappe.db.get_single_value("Buying Settings", "disable_last_purchase_rate"): update_last_purchase_rate(self, is_submit=0) if self.doctype in ["Purchase Receipt", "Purchase Invoice"]: diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 851bd64f3b4..92e9e559ada 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -1277,6 +1277,10 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe .filter(Boolean).length > 0; } else if (this.frm.doc?.items) { let first_row = this.frm.doc.items[0]; + if (!first_row) { + return false + }; + let mapped_rows = mappped_fields.filter(d => first_row[d]) return mapped_rows?.length > 0; diff --git a/erpnext/stock/doctype/item/item.py b/erpnext/stock/doctype/item/item.py index 751a37e3164..e40b3822af6 100644 --- a/erpnext/stock/doctype/item/item.py +++ b/erpnext/stock/doctype/item/item.py @@ -22,6 +22,7 @@ from frappe.utils import ( strip_html, ) from frappe.utils.html_utils import clean_html +from pypika import Order import erpnext from erpnext.controllers.item_variant import ( @@ -1139,34 +1140,10 @@ def get_last_purchase_details(item_code, doc_name=None, conversion_rate=1.0): """returns last purchase details in stock uom""" # get last purchase order item details - last_purchase_order = frappe.db.sql( - """\ - select po.name, po.transaction_date, po.conversion_rate, - po_item.conversion_factor, po_item.base_price_list_rate, - po_item.discount_percentage, po_item.base_rate, po_item.base_net_rate - from `tabPurchase Order` po, `tabPurchase Order Item` po_item - where po.docstatus = 1 and po_item.item_code = %s and po.name != %s and - po.name = po_item.parent - order by po.transaction_date desc, po.name desc - limit 1""", - (item_code, cstr(doc_name)), - as_dict=1, - ) + last_purchase_order = get_purchase_voucher_details("Purchase Order", item_code, doc_name) # get last purchase receipt item details - last_purchase_receipt = frappe.db.sql( - """\ - select pr.name, pr.posting_date, pr.posting_time, pr.conversion_rate, - pr_item.conversion_factor, pr_item.base_price_list_rate, pr_item.discount_percentage, - pr_item.base_rate, pr_item.base_net_rate - from `tabPurchase Receipt` pr, `tabPurchase Receipt Item` pr_item - where pr.docstatus = 1 and pr_item.item_code = %s and pr.name != %s and - pr.name = pr_item.parent - order by pr.posting_date desc, pr.posting_time desc, pr.name desc - limit 1""", - (item_code, cstr(doc_name)), - as_dict=1, - ) + last_purchase_receipt = get_purchase_voucher_details("Purchase Receipt", item_code, doc_name) purchase_order_date = getdate( last_purchase_order and last_purchase_order[0].transaction_date or "1900-01-01" @@ -1187,7 +1164,13 @@ def get_last_purchase_details(item_code, doc_name=None, conversion_rate=1.0): purchase_date = purchase_receipt_date else: - return frappe._dict() + last_purchase_invoice = get_purchase_voucher_details("Purchase Invoice", item_code, doc_name) + + if last_purchase_invoice: + last_purchase = last_purchase_invoice[0] + purchase_date = getdate(last_purchase.posting_date) + else: + return frappe._dict() conversion_factor = flt(last_purchase.conversion_factor) out = frappe._dict( @@ -1213,6 +1196,40 @@ def get_last_purchase_details(item_code, doc_name=None, conversion_rate=1.0): return out +def get_purchase_voucher_details(doctype, item_code, document_name): + parent_doc = frappe.qb.DocType(doctype) + child_doc = frappe.qb.DocType(doctype + " Item") + + query = ( + frappe.qb.from_(parent_doc) + .inner_join(child_doc) + .on(parent_doc.name == child_doc.parent) + .select( + parent_doc.name, + parent_doc.conversion_rate, + child_doc.conversion_factor, + child_doc.base_price_list_rate, + child_doc.discount_percentage, + child_doc.base_rate, + child_doc.base_net_rate, + ) + .where(parent_doc.docstatus == 1) + .where(child_doc.item_code == item_code) + .where(parent_doc.name != document_name) + ) + + if doctype in ("Purchase Receipt", "Purchase Invoice"): + query = query.select(parent_doc.posting_date, parent_doc.posting_time) + query = query.orderby( + parent_doc.posting_date, parent_doc.posting_time, parent_doc.name, order=Order.desc + ) + else: + query = query.select(parent_doc.transaction_date) + query = query.orderby(parent_doc.transaction_date, parent_doc.name, order=Order.desc) + + return query.run(as_dict=1) + + def check_stock_uom_with_bin(item, stock_uom): if stock_uom == frappe.db.get_value("Item", item, "stock_uom"): return From 9c0a17e4d5dceff6e4ef0a90e1d36de762f8d3af Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 1 Oct 2024 14:26:38 +0530 Subject: [PATCH 0202/1614] fix: removed validation for materials return (backport #43461) (#43463) fix: removed validation for materials return (#43461) (cherry picked from commit 1c7154c7ca3df8b53be00e60b977e48ec9dd2ae3) Co-authored-by: rohitwaghchaure --- erpnext/stock/doctype/stock_entry/stock_entry.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index 627ad78be58..ae6ca4e25d0 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -1594,10 +1594,6 @@ class StockEntry(StockController): if pro_doc.status == "Stopped": msg = f"Transaction not allowed against stopped Work Order {self.work_order}" - if self.is_return and pro_doc.status not in ["Completed", "Closed"]: - title = _("Stock Return") - msg = f"Work Order {self.work_order} must be completed or closed" - if msg: frappe.throw(_(msg), title=title) From 96c4d1af63e6f47a6fe4f27b085b7e09a889acbe Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 1 Oct 2024 14:27:27 +0530 Subject: [PATCH 0203/1614] Serial no report (backport #43444) (#43464) Serial no report (#43444) * chore: remove the field that which is not exiting in serial no * chore: remove the field that which is not exiting in serial no * chore: remove the field that which is not exiting in serial no (cherry picked from commit 661efadf410daa15eb4cdea7652aa6018b30633a) Co-authored-by: Vishv-silveroak <108357657+Vishv-024@users.noreply.github.com> --- .../serial_no_service_contract_expiry.json | 43 ++++++++++--------- .../serial_no_status/serial_no_status.json | 43 ++++++++++--------- .../serial_no_warranty_expiry.json | 43 ++++++++++--------- 3 files changed, 69 insertions(+), 60 deletions(-) diff --git a/erpnext/stock/report/serial_no_service_contract_expiry/serial_no_service_contract_expiry.json b/erpnext/stock/report/serial_no_service_contract_expiry/serial_no_service_contract_expiry.json index 6d20719f8eb..75e2fac98fd 100644 --- a/erpnext/stock/report/serial_no_service_contract_expiry/serial_no_service_contract_expiry.json +++ b/erpnext/stock/report/serial_no_service_contract_expiry/serial_no_service_contract_expiry.json @@ -1,30 +1,33 @@ { - "add_total_row": 0, - "apply_user_permissions": 1, - "creation": "2013-01-14 10:52:58", - "disabled": 0, - "docstatus": 0, - "doctype": "Report", - "idx": 3, - "is_standard": "Yes", - "json": "{\"add_total_row\": 0, \"sort_by\": \"Serial No.modified\", \"sort_order\": \"desc\", \"sort_by_next\": null, \"filters\": [[\"Serial No\", \"delivery_document_type\", \"in\", [\"Delivery Note\", \"Sales Invoice\"]], [\"Serial No\", \"warehouse\", \"=\", \"\"]], \"sort_order_next\": \"desc\", \"columns\": [[\"name\", \"Serial No\"], [\"item_code\", \"Serial No\"], [\"amc_expiry_date\", \"Serial No\"], [\"maintenance_status\", \"Serial No\"], [\"delivery_document_no\", \"Serial No\"], [\"customer\", \"Serial No\"], [\"customer_name\", \"Serial No\"], [\"item_name\", \"Serial No\"], [\"description\", \"Serial No\"], [\"item_group\", \"Serial No\"], [\"brand\", \"Serial No\"]]}", - "modified": "2017-02-24 20:02:00.706889", - "modified_by": "Administrator", - "module": "Stock", - "name": "Serial No Service Contract Expiry", - "owner": "Administrator", - "ref_doctype": "Serial No", - "report_name": "Serial No Service Contract Expiry", - "report_type": "Report Builder", + "add_total_row": 0, + "columns": [], + "creation": "2013-01-14 10:52:58", + "disabled": 0, + "docstatus": 0, + "doctype": "Report", + "filters": [], + "idx": 3, + "is_standard": "Yes", + "json": "{\"add_total_row\": 0, \"sort_by\": \"Serial No.modified\", \"sort_order\": \"desc\", \"sort_by_next\": null, \"filters\": [[\"Serial No\", \"warehouse\", \"=\", \"\"]], \"sort_order_next\": \"desc\", \"columns\": [[\"name\", \"Serial No\"], [\"item_code\", \"Serial No\"], [\"amc_expiry_date\", \"Serial No\"], [\"maintenance_status\", \"Serial No\"],[\"item_name\", \"Serial No\"], [\"description\", \"Serial No\"], [\"item_group\", \"Serial No\"], [\"brand\", \"Serial No\"]]}", + "letterhead": null, + "modified": "2024-09-26 13:07:23.451182", + "modified_by": "Administrator", + "module": "Stock", + "name": "Serial No Service Contract Expiry", + "owner": "Administrator", + "prepared_report": 0, + "ref_doctype": "Serial No", + "report_name": "Serial No Service Contract Expiry", + "report_type": "Report Builder", "roles": [ { "role": "Item Manager" - }, + }, { "role": "Stock Manager" - }, + }, { "role": "Stock User" } ] -} \ No newline at end of file +} diff --git a/erpnext/stock/report/serial_no_status/serial_no_status.json b/erpnext/stock/report/serial_no_status/serial_no_status.json index 8f03567c852..d74c2087f72 100644 --- a/erpnext/stock/report/serial_no_status/serial_no_status.json +++ b/erpnext/stock/report/serial_no_status/serial_no_status.json @@ -1,30 +1,33 @@ { - "add_total_row": 0, - "apply_user_permissions": 1, - "creation": "2013-01-14 10:52:58", - "disabled": 0, - "docstatus": 0, - "doctype": "Report", - "idx": 4, - "is_standard": "Yes", - "json": "{\"add_total_row\": 0, \"sort_by\": \"Serial No.name\", \"sort_order\": \"desc\", \"sort_by_next\": null, \"filters\": [], \"sort_order_next\": \"desc\", \"columns\": [[\"name\", \"Serial No\"], [\"item_code\", \"Serial No\"], [\"warehouse\", \"Serial No\"], [\"item_name\", \"Serial No\"], [\"description\", \"Serial No\"], [\"item_group\", \"Serial No\"], [\"brand\", \"Serial No\"], [\"purchase_document_type\", \"Serial No\"], [\"purchase_document_no\", \"Serial No\"], [\"purchase_date\", \"Serial No\"], [\"customer\", \"Serial No\"], [\"customer_name\", \"Serial No\"], [\"purchase_rate\", \"Serial No\"], [\"delivery_document_type\", \"Serial No\"], [\"delivery_document_no\", \"Serial No\"], [\"delivery_date\", \"Serial No\"], [\"supplier\", \"Serial No\"], [\"supplier_name\", \"Serial No\"]]}", - "modified": "2017-02-24 19:54:21.392265", - "modified_by": "Administrator", - "module": "Stock", - "name": "Serial No Status", - "owner": "Administrator", - "ref_doctype": "Serial No", - "report_name": "Serial No Status", - "report_type": "Report Builder", + "add_total_row": 0, + "columns": [], + "creation": "2013-01-14 10:52:58", + "disabled": 0, + "docstatus": 0, + "doctype": "Report", + "filters": [], + "idx": 4, + "is_standard": "Yes", + "json": "{\"add_total_row\": 0, \"sort_by\": \"Serial No.name\", \"sort_order\": \"desc\", \"sort_by_next\": null, \"filters\": [], \"sort_order_next\": \"desc\", \"columns\": [[\"name\", \"Serial No\"], [\"item_code\", \"Serial No\"], [\"warehouse\", \"Serial No\"], [\"item_name\", \"Serial No\"], [\"description\", \"Serial No\"], [\"item_group\", \"Serial No\"], [\"brand\", \"Serial No\"],[\"purchase_document_no\", \"Serial No\"]]}", + "letterhead": null, + "modified": "2024-09-26 13:10:52.693648", + "modified_by": "Administrator", + "module": "Stock", + "name": "Serial No Status", + "owner": "Administrator", + "prepared_report": 0, + "ref_doctype": "Serial No", + "report_name": "Serial No Status", + "report_type": "Report Builder", "roles": [ { "role": "Item Manager" - }, + }, { "role": "Stock Manager" - }, + }, { "role": "Stock User" } ] -} \ No newline at end of file +} diff --git a/erpnext/stock/report/serial_no_warranty_expiry/serial_no_warranty_expiry.json b/erpnext/stock/report/serial_no_warranty_expiry/serial_no_warranty_expiry.json index ef345f45216..75e2fac98fd 100644 --- a/erpnext/stock/report/serial_no_warranty_expiry/serial_no_warranty_expiry.json +++ b/erpnext/stock/report/serial_no_warranty_expiry/serial_no_warranty_expiry.json @@ -1,30 +1,33 @@ { - "add_total_row": 0, - "apply_user_permissions": 1, - "creation": "2013-01-14 10:52:58", - "disabled": 0, - "docstatus": 0, - "doctype": "Report", - "idx": 3, - "is_standard": "Yes", - "json": "{\"add_total_row\": 0, \"sort_by\": \"Serial No.modified\", \"sort_order\": \"desc\", \"sort_by_next\": null, \"filters\": [[\"Serial No\", \"delivery_document_type\", \"in\", [\"Delivery Note\", \"Sales Invoice\"]], [\"Serial No\", \"warehouse\", \"=\", \"\"]], \"sort_order_next\": \"desc\", \"columns\": [[\"name\", \"Serial No\"], [\"item_code\", \"Serial No\"], [\"warranty_expiry_date\", \"Serial No\"], [\"warranty_period\", \"Serial No\"], [\"maintenance_status\", \"Serial No\"], [\"purchase_document_no\", \"Serial No\"], [\"purchase_date\", \"Serial No\"], [\"supplier\", \"Serial No\"], [\"supplier_name\", \"Serial No\"], [\"delivery_document_no\", \"Serial No\"], [\"delivery_date\", \"Serial No\"], [\"customer\", \"Serial No\"], [\"customer_name\", \"Serial No\"], [\"item_name\", \"Serial No\"], [\"description\", \"Serial No\"], [\"item_group\", \"Serial No\"], [\"brand\", \"Serial No\"]]}", - "modified": "2017-02-24 20:01:53.097456", - "modified_by": "Administrator", - "module": "Stock", - "name": "Serial No Warranty Expiry", - "owner": "Administrator", - "ref_doctype": "Serial No", - "report_name": "Serial No Warranty Expiry", - "report_type": "Report Builder", + "add_total_row": 0, + "columns": [], + "creation": "2013-01-14 10:52:58", + "disabled": 0, + "docstatus": 0, + "doctype": "Report", + "filters": [], + "idx": 3, + "is_standard": "Yes", + "json": "{\"add_total_row\": 0, \"sort_by\": \"Serial No.modified\", \"sort_order\": \"desc\", \"sort_by_next\": null, \"filters\": [[\"Serial No\", \"warehouse\", \"=\", \"\"]], \"sort_order_next\": \"desc\", \"columns\": [[\"name\", \"Serial No\"], [\"item_code\", \"Serial No\"], [\"amc_expiry_date\", \"Serial No\"], [\"maintenance_status\", \"Serial No\"],[\"item_name\", \"Serial No\"], [\"description\", \"Serial No\"], [\"item_group\", \"Serial No\"], [\"brand\", \"Serial No\"]]}", + "letterhead": null, + "modified": "2024-09-26 13:07:23.451182", + "modified_by": "Administrator", + "module": "Stock", + "name": "Serial No Service Contract Expiry", + "owner": "Administrator", + "prepared_report": 0, + "ref_doctype": "Serial No", + "report_name": "Serial No Service Contract Expiry", + "report_type": "Report Builder", "roles": [ { "role": "Item Manager" - }, + }, { "role": "Stock Manager" - }, + }, { "role": "Stock User" } ] -} \ No newline at end of file +} From d96cee8779a8143b54231968888a1016dd00b42a Mon Sep 17 00:00:00 2001 From: Corentin Forler Date: Wed, 2 Oct 2024 10:06:44 +0200 Subject: [PATCH 0204/1614] fix: Fix API endpoint for Frankfurter (cherry picked from commit 33e72111c7d7f60dbe041282026f607230624f52) --- .../currency_exchange_settings/currency_exchange_settings.py | 2 +- erpnext/setup/install.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/currency_exchange_settings/currency_exchange_settings.py b/erpnext/accounts/doctype/currency_exchange_settings/currency_exchange_settings.py index 8cbb99e9252..160e791978e 100644 --- a/erpnext/accounts/doctype/currency_exchange_settings/currency_exchange_settings.py +++ b/erpnext/accounts/doctype/currency_exchange_settings/currency_exchange_settings.py @@ -109,7 +109,7 @@ def get_api_endpoint(service_provider: str | None = None, use_http: bool = False if service_provider == "exchangerate.host": api = "api.exchangerate.host/convert" elif service_provider == "frankfurter.app": - api = "frankfurter.app/{transaction_date}" + api = "api.frankfurter.app/{transaction_date}" protocol = "https://" if use_http: diff --git a/erpnext/setup/install.py b/erpnext/setup/install.py index bba9e79a348..97ec418d955 100644 --- a/erpnext/setup/install.py +++ b/erpnext/setup/install.py @@ -98,7 +98,7 @@ def setup_currency_exchange(): ces.set("result_key", []) ces.set("req_params", []) - ces.api_endpoint = "https://frankfurter.app/{transaction_date}" + ces.api_endpoint = "https://api.frankfurter.app/{transaction_date}" ces.append("result_key", {"key": "rates"}) ces.append("result_key", {"key": "{to_currency}"}) ces.append("req_params", {"key": "base", "value": "{from_currency}"}) From 8e7d8936692c28ac9830a3d64697a15b9e4d3ea8 Mon Sep 17 00:00:00 2001 From: Sagar Vora Date: Wed, 2 Oct 2024 14:28:54 +0530 Subject: [PATCH 0205/1614] test: update test for API change (cherry picked from commit c444de017aee1cfa6e4e214dbddbc2543dccd966) --- .../setup/doctype/currency_exchange/test_currency_exchange.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/setup/doctype/currency_exchange/test_currency_exchange.py b/erpnext/setup/doctype/currency_exchange/test_currency_exchange.py index 3249c93ef87..d28b1e65b7b 100644 --- a/erpnext/setup/doctype/currency_exchange/test_currency_exchange.py +++ b/erpnext/setup/doctype/currency_exchange/test_currency_exchange.py @@ -68,9 +68,9 @@ def patched_requests_get(*args, **kwargs): if kwargs["params"].get("date") and kwargs["params"].get("from") and kwargs["params"].get("to"): if test_exchange_values.get(kwargs["params"]["date"]): return PatchResponse({"result": test_exchange_values[kwargs["params"]["date"]]}, 200) - elif args[0].startswith("https://frankfurter.app") and kwargs.get("params"): + elif args[0].startswith("https://api.frankfurter.app") and kwargs.get("params"): if kwargs["params"].get("base") and kwargs["params"].get("symbols"): - date = args[0].replace("https://frankfurter.app/", "") + date = args[0].replace("https://api.frankfurter.app/", "") if test_exchange_values.get(date): return PatchResponse( {"rates": {kwargs["params"].get("symbols"): test_exchange_values.get(date)}}, 200 From 35a08f88301b8c80e752a5bd236de97a3546245e Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 2 Oct 2024 15:15:48 +0530 Subject: [PATCH 0206/1614] fix: patch to update Currency Exchange Settings for `frankfurter.app` (backport #43481) (#43483) Co-authored-by: Sagar Vora --- erpnext/patches.txt | 1 + ...date_currency_exchange_settings_for_frankfurter.py | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 erpnext/patches/v14_0/update_currency_exchange_settings_for_frankfurter.py diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 5b1455ef723..333fca1d1da 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -377,3 +377,4 @@ erpnext.patches.v15_0.drop_index_posting_datetime_from_sle erpnext.patches.v15_0.add_disassembly_order_stock_entry_type #1 erpnext.patches.v15_0.set_standard_stock_entry_type erpnext.patches.v15_0.link_purchase_item_to_asset_doc +erpnext.patches.v14_0.update_currency_exchange_settings_for_frankfurter diff --git a/erpnext/patches/v14_0/update_currency_exchange_settings_for_frankfurter.py b/erpnext/patches/v14_0/update_currency_exchange_settings_for_frankfurter.py new file mode 100644 index 00000000000..a67c5a26237 --- /dev/null +++ b/erpnext/patches/v14_0/update_currency_exchange_settings_for_frankfurter.py @@ -0,0 +1,11 @@ +import frappe + + +def execute(): + settings = frappe.get_doc("Currency Exchange Settings") + if settings.service_provider != "frankfurter.app": + return + + settings.set_parameters_and_result() + settings.flags.ignore_validate = True + settings.save() From 6516e68fa0c296507e12ff6944d797e09da1d0cc Mon Sep 17 00:00:00 2001 From: Sagar Vora Date: Wed, 2 Oct 2024 13:11:13 +0530 Subject: [PATCH 0207/1614] fix: set margin fields for purchase documents when updating items (cherry picked from commit 7be4d56be2714446525b93acce961f04ca1bd2d6) --- erpnext/controllers/accounts_controller.py | 23 +++++++++------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 44a9813c89e..77f54818040 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -3309,7 +3309,6 @@ def update_child_qty_rate(parent_doctype, trans_items, parent_doctype_name, chil items_added_or_removed = False # updated to true if any new item is added or removed any_conversion_factor_changed = False - sales_doctypes = ["Sales Order", "Sales Invoice", "Delivery Note", "Quotation"] parent = frappe.get_doc(parent_doctype, parent_doctype_name) check_doc_permissions(parent, "write") @@ -3425,25 +3424,21 @@ def update_child_qty_rate(parent_doctype, trans_items, parent_doctype_name, chil # if rate is greater than price_list_rate, set margin # or set discount child_item.discount_percentage = 0 - - if parent_doctype in sales_doctypes: - child_item.margin_type = "Amount" - child_item.margin_rate_or_amount = flt( - child_item.rate - child_item.price_list_rate, - child_item.precision("margin_rate_or_amount"), - ) - child_item.rate_with_margin = child_item.rate + child_item.margin_type = "Amount" + child_item.margin_rate_or_amount = flt( + child_item.rate - child_item.price_list_rate, + child_item.precision("margin_rate_or_amount"), + ) + child_item.rate_with_margin = child_item.rate else: child_item.discount_percentage = flt( (1 - flt(child_item.rate) / flt(child_item.price_list_rate)) * 100.0, child_item.precision("discount_percentage"), ) child_item.discount_amount = flt(child_item.price_list_rate) - flt(child_item.rate) - - if parent_doctype in sales_doctypes: - child_item.margin_type = "" - child_item.margin_rate_or_amount = 0 - child_item.rate_with_margin = 0 + child_item.margin_type = "" + child_item.margin_rate_or_amount = 0 + child_item.rate_with_margin = 0 child_item.flags.ignore_validate_update_after_submit = True if new_child_flag: From f2a72e5f82feec1683b858d72a2ca315892a97e2 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 2 Oct 2024 18:46:01 +0530 Subject: [PATCH 0208/1614] fix: Stock UOM not fetched when Stock Entry create from Item Dashboard (backport #43457) (#43465) fix: Stock UOM not fetched when Stock Entry create from Item Dashboard (#43457) (cherry picked from commit 895b072bad6caaca384609a842719349eaa371f4) Co-authored-by: rohitwaghchaure --- erpnext/stock/dashboard/item_dashboard.js | 9 ++++++--- erpnext/stock/dashboard/item_dashboard.py | 1 + erpnext/stock/dashboard/item_dashboard_list.html | 2 ++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/erpnext/stock/dashboard/item_dashboard.js b/erpnext/stock/dashboard/item_dashboard.js index 36a51056bb4..6fc9e6666a2 100644 --- a/erpnext/stock/dashboard/item_dashboard.js +++ b/erpnext/stock/dashboard/item_dashboard.js @@ -48,17 +48,18 @@ erpnext.stock.ItemDashboard = class ItemDashboard { let actual_qty = unescape(element.attr("data-actual_qty")); let disable_quick_entry = Number(unescape(element.attr("data-disable_quick_entry"))); let entry_type = action === "Move" ? "Material Transfer" : "Material Receipt"; + let stock_uom = unescape(element.attr("data-stock-uom")); if (disable_quick_entry) { open_stock_entry(item, warehouse, entry_type); } else { if (action === "Add") { let rate = unescape($(this).attr("data-rate")); - erpnext.stock.move_item(item, null, warehouse, actual_qty, rate, function () { + erpnext.stock.move_item(item, null, warehouse, actual_qty, rate, stock_uom, function () { me.refresh(); }); } else { - erpnext.stock.move_item(item, warehouse, null, actual_qty, null, function () { + erpnext.stock.move_item(item, warehouse, null, actual_qty, null, stock_uom, function () { me.refresh(); }); } @@ -207,7 +208,7 @@ erpnext.stock.ItemDashboard = class ItemDashboard { } }; -erpnext.stock.move_item = function (item, source, target, actual_qty, rate, callback) { +erpnext.stock.move_item = function (item, source, target, actual_qty, rate, stock_uom, callback) { var dialog = new frappe.ui.Dialog({ title: target ? __("Add Item") : __("Move Item"), fields: [ @@ -295,6 +296,8 @@ erpnext.stock.move_item = function (item, source, target, actual_qty, rate, call let row = frappe.model.add_child(doc, "items"); row.item_code = dialog.get_value("item_code"); row.s_warehouse = dialog.get_value("source"); + row.stock_uom = stock_uom; + row.uom = stock_uom; row.t_warehouse = dialog.get_value("target"); row.qty = dialog.get_value("qty"); row.conversion_factor = 1; diff --git a/erpnext/stock/dashboard/item_dashboard.py b/erpnext/stock/dashboard/item_dashboard.py index e6382688669..3d7c21639e0 100644 --- a/erpnext/stock/dashboard/item_dashboard.py +++ b/erpnext/stock/dashboard/item_dashboard.py @@ -71,6 +71,7 @@ def get_data( item.update( { "item_name": frappe.get_cached_value("Item", item.item_code, "item_name"), + "stock_uom": frappe.get_cached_value("Item", item.item_code, "stock_uom"), "disable_quick_entry": frappe.get_cached_value("Item", item.item_code, "has_batch_no") or frappe.get_cached_value("Item", item.item_code, "has_serial_no"), "projected_qty": flt(item.projected_qty, precision), diff --git a/erpnext/stock/dashboard/item_dashboard_list.html b/erpnext/stock/dashboard/item_dashboard_list.html index 3b2619133bf..ae90ff80686 100644 --- a/erpnext/stock/dashboard/item_dashboard_list.html +++ b/erpnext/stock/dashboard/item_dashboard_list.html @@ -49,12 +49,14 @@ data-disable_quick_entry="{{ d.disable_quick_entry }}" data-warehouse="{{ d.warehouse }}" data-actual_qty="{{ d.actual_qty }}" + data-stock-uom="{{ d.stock_uom }}" data-item="{{ escape(d.item_code) }}">{{ __("Move") }} {% endif %}
From 1b28a4e9285f5131504f20b36172b9716404dccb Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 3 Oct 2024 20:28:53 +0100 Subject: [PATCH 0209/1614] fix(Dunning): logic for fetching text (backport #43160) (#43490) Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com> fix(Dunning): logic for fetching text (#43160) --- erpnext/accounts/doctype/dunning/dunning.py | 38 ++++++++++++++------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/erpnext/accounts/doctype/dunning/dunning.py b/erpnext/accounts/doctype/dunning/dunning.py index ad58761e1bf..d63db3a09a1 100644 --- a/erpnext/accounts/doctype/dunning/dunning.py +++ b/erpnext/accounts/doctype/dunning/dunning.py @@ -210,19 +210,31 @@ def get_linked_dunnings_as_per_state(sales_invoice, state): @frappe.whitelist() -def get_dunning_letter_text(dunning_type, doc, language=None): +def get_dunning_letter_text(dunning_type: str, doc: str | dict, language: str | None = None) -> dict: + DOCTYPE = "Dunning Letter Text" + FIELDS = ["body_text", "closing_text", "language"] + if isinstance(doc, str): doc = json.loads(doc) + + if not language: + language = doc.get("language") + if language: - filters = {"parent": dunning_type, "language": language} - else: - filters = {"parent": dunning_type, "is_default_language": 1} - letter_text = frappe.db.get_value( - "Dunning Letter Text", filters, ["body_text", "closing_text", "language"], as_dict=1 - ) - if letter_text: - return { - "body_text": frappe.render_template(letter_text.body_text, doc), - "closing_text": frappe.render_template(letter_text.closing_text, doc), - "language": letter_text.language, - } + letter_text = frappe.db.get_value( + DOCTYPE, {"parent": dunning_type, "language": language}, FIELDS, as_dict=1 + ) + + if not letter_text: + letter_text = frappe.db.get_value( + DOCTYPE, {"parent": dunning_type, "is_default_language": 1}, FIELDS, as_dict=1 + ) + + if not letter_text: + return {} + + return { + "body_text": frappe.render_template(letter_text.body_text, doc), + "closing_text": frappe.render_template(letter_text.closing_text, doc), + "language": letter_text.language, + } From 4fa513159088aeb393d1365cac55af7628d02355 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 4 Oct 2024 01:23:59 +0100 Subject: [PATCH 0210/1614] fix(Quotation): calculate row values for alternative items (backport #43054) (#43495) Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com> fix(Quotation): calculate row values for alternative items (#43054) --- erpnext/controllers/taxes_and_totals.py | 8 ++-- .../public/js/controllers/taxes_and_totals.js | 6 +-- .../doctype/quotation/test_quotation.py | 42 ++++++++++++++++++- 3 files changed, 47 insertions(+), 9 deletions(-) diff --git a/erpnext/controllers/taxes_and_totals.py b/erpnext/controllers/taxes_and_totals.py index 2d3b224b76f..fc0ba56d1f4 100644 --- a/erpnext/controllers/taxes_and_totals.py +++ b/erpnext/controllers/taxes_and_totals.py @@ -40,7 +40,7 @@ class calculate_taxes_and_totals: return items def calculate(self): - if not len(self._items): + if not len(self.doc.items): return self.discount_amount_applied = False @@ -95,7 +95,7 @@ class calculate_taxes_and_totals: if self.doc.get("is_return") and self.doc.get("return_against"): return - for item in self._items: + for item in self.doc.items: if item.item_code and item.get("item_tax_template"): item_doc = frappe.get_cached_doc("Item", item.item_code) args = { @@ -154,7 +154,7 @@ class calculate_taxes_and_totals: return if not self.discount_amount_applied: - for item in self._items: + for item in self.doc.items: self.doc.round_floats_in(item) if item.discount_percentage == 100: @@ -258,7 +258,7 @@ class calculate_taxes_and_totals: if not any(cint(tax.included_in_print_rate) for tax in self.doc.get("taxes")): return - for item in self._items: + for item in self.doc.items: item_tax_map = self._load_item_tax_rate(item.item_tax_rate) cumulated_tax_fraction = 0 total_inclusive_tax_amount_per_qty = 0 diff --git a/erpnext/public/js/controllers/taxes_and_totals.js b/erpnext/public/js/controllers/taxes_and_totals.js index adf05ffb154..dc7a5a8eef1 100644 --- a/erpnext/public/js/controllers/taxes_and_totals.js +++ b/erpnext/public/js/controllers/taxes_and_totals.js @@ -128,7 +128,7 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments { calculate_item_values() { var me = this; if (!this.discount_amount_applied) { - for (const item of this.frm._items || []) { + for (const item of this.frm.doc.items || []) { frappe.model.round_floats_in(item); item.net_rate = item.rate; item.qty = item.qty === undefined ? (me.frm.doc.is_return ? -1 : 1) : item.qty; @@ -227,7 +227,7 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments { }); if(has_inclusive_tax==false) return; - $.each(me.frm._items || [], function(n, item) { + $.each(this.frm.doc.items || [], function(n, item) { var item_tax_map = me._load_item_tax_rate(item.item_tax_rate); var cumulated_tax_fraction = 0.0; var total_inclusive_tax_amount_per_qty = 0; @@ -630,7 +630,7 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments { _cleanup() { this.frm.doc.base_in_words = this.frm.doc.in_words = ""; - let items = this.frm._items; + let items = this.frm.doc.items; if(items && items.length) { if(!frappe.meta.get_docfield(items[0].doctype, "item_tax_amount", this.frm.doctype)) { diff --git a/erpnext/selling/doctype/quotation/test_quotation.py b/erpnext/selling/doctype/quotation/test_quotation.py index 7b66b7a251a..9a31e335a05 100644 --- a/erpnext/selling/doctype/quotation/test_quotation.py +++ b/erpnext/selling/doctype/quotation/test_quotation.py @@ -561,12 +561,50 @@ class TestQuotation(FrappeTestCase): "description": "VAT", "doctype": "Sales Taxes and Charges", "rate": 10, + "included_in_print_rate": 1, }, ) quotation.submit() - self.assertEqual(quotation.net_total, 290) - self.assertEqual(quotation.grand_total, 319) + self.assertEqual(round(quotation.items[1].net_rate, 2), 136.36) + self.assertEqual(round(quotation.items[1].amount, 2), 150) + + self.assertEqual(round(quotation.items[2].net_rate, 2), 163.64) + self.assertEqual(round(quotation.items[2].amount, 2), 180) + + self.assertEqual(round(quotation.net_total, 2), 263.64) + self.assertEqual(round(quotation.total_taxes_and_charges, 2), 26.36) + self.assertEqual(quotation.grand_total, 290) + + def test_amount_calculation_for_alternative_items(self): + """Make sure that the amount is calculated correctly for alternative items when the qty is changed.""" + from erpnext.stock.doctype.item.test_item import make_item + + item_list = [] + stock_items = { + "_Test Simple Item 1": 100, + "_Test Alt 1": 120, + } + + for item, rate in stock_items.items(): + make_item(item, {"is_stock_item": 0}) + item_list.append( + { + "item_code": item, + "qty": 1, + "rate": rate, + "is_alternative": "Alt" in item, + } + ) + + quotation = make_quotation(item_list=item_list, do_not_submit=1) + + self.assertEqual(quotation.items[1].amount, 120) + + quotation.items[1].qty = 2 + quotation.save() + + self.assertEqual(quotation.items[1].amount, 240) def test_alternative_items_sales_order_mapping_with_stock_items(self): from erpnext.selling.doctype.quotation.quotation import make_sales_order From edfa6e41e1fe296332997c92c610f536ca76cda3 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Fri, 4 Oct 2024 03:07:05 +0000 Subject: [PATCH 0211/1614] chore(release): Bumped to Version 15.38.0 # [15.38.0](https://github.com/frappe/erpnext/compare/v15.37.0...v15.38.0) (2024-10-04) ### Bug Fixes * 'NoneType' object has no attribute 'has_serial_no' ([21a0157](https://github.com/frappe/erpnext/commit/21a01575b66aa5f620974f171fbbdd7c1d335fe0)) * add company filter in Warehouse wise Item Balance Age and Value ([4fc6d3e](https://github.com/frappe/erpnext/commit/4fc6d3ef64df33303078b624cba6ca09cea03845)) * adjustmen entry for stock reco ([c551c27](https://github.com/frappe/erpnext/commit/c551c2714c97da39541d3d47f8a9d0f9ecaa20e3)) * Cannot read properties of undefined (reading 'price_list_rate') (backport [#43376](https://github.com/frappe/erpnext/issues/43376)) ([#43377](https://github.com/frappe/erpnext/issues/43377)) ([47f06dc](https://github.com/frappe/erpnext/commit/47f06dc180ee434ce21eea9587fa43bb20079215)) * Data missing in table: None, MandatoryError (backport [#43422](https://github.com/frappe/erpnext/issues/43422)) ([#43429](https://github.com/frappe/erpnext/issues/43429)) ([4b3f143](https://github.com/frappe/erpnext/commit/4b3f143f8366881d8cc427d56a14d6c38403d688)) * **Dunning:** logic for fetching text (backport [#43160](https://github.com/frappe/erpnext/issues/43160)) ([#43490](https://github.com/frappe/erpnext/issues/43490)) ([1b28a4e](https://github.com/frappe/erpnext/commit/1b28a4e9285f5131504f20b36172b9716404dccb)) * Fix API endpoint for Frankfurter ([d96cee8](https://github.com/frappe/erpnext/commit/d96cee8779a8143b54231968888a1016dd00b42a)) * Ignore transaction deletion check on ledger entry insertion ([1d6f97a](https://github.com/frappe/erpnext/commit/1d6f97ad945f8d0225533fb03e6866561316481b)) * **Item:** error message on tax rate (backport [#42955](https://github.com/frappe/erpnext/issues/42955)) ([#42956](https://github.com/frappe/erpnext/issues/42956)) ([5fc5934](https://github.com/frappe/erpnext/commit/5fc59349421e739cea28aab29b437678808a4224)) * last purchase rate for purchase invoice (backport [#43448](https://github.com/frappe/erpnext/issues/43448)) ([#43452](https://github.com/frappe/erpnext/issues/43452)) ([ee2c8c8](https://github.com/frappe/erpnext/commit/ee2c8c869ad19a5d5e629b5598f508a9cc4927e9)) * negative stock error for batch (backport [#43450](https://github.com/frappe/erpnext/issues/43450)) ([#43454](https://github.com/frappe/erpnext/issues/43454)) ([7bf6251](https://github.com/frappe/erpnext/commit/7bf6251c21a5249c1c3ade63b29b25d1cb597433)) * patch to update Currency Exchange Settings for `frankfurter.app` (backport [#43481](https://github.com/frappe/erpnext/issues/43481)) ([#43483](https://github.com/frappe/erpnext/issues/43483)) ([35a08f8](https://github.com/frappe/erpnext/commit/35a08f88301b8c80e752a5bd236de97a3546245e)) * quality inspection creation (backport [#43416](https://github.com/frappe/erpnext/issues/43416)) ([#43417](https://github.com/frappe/erpnext/issues/43417)) ([a1b6628](https://github.com/frappe/erpnext/commit/a1b6628c41ef965d855cd6890f0919871b4ca58d)) * **Quotation:** calculate row values for alternative items (backport [#43054](https://github.com/frappe/erpnext/issues/43054)) ([#43495](https://github.com/frappe/erpnext/issues/43495)) ([4fa5131](https://github.com/frappe/erpnext/commit/4fa513159088aeb393d1365cac55af7628d02355)) * removed validation for materials return (backport [#43461](https://github.com/frappe/erpnext/issues/43461)) ([#43463](https://github.com/frappe/erpnext/issues/43463)) ([9c0a17e](https://github.com/frappe/erpnext/commit/9c0a17e4d5dceff6e4ef0a90e1d36de762f8d3af)) * serial and batch no selector (backport [#43387](https://github.com/frappe/erpnext/issues/43387)) ([#43390](https://github.com/frappe/erpnext/issues/43390)) ([74c880c](https://github.com/frappe/erpnext/commit/74c880c232d6fa1cf4f0d53c5faad16f7e809c16)) * set margin fields for purchase documents when updating items ([6516e68](https://github.com/frappe/erpnext/commit/6516e68fa0c296507e12ff6944d797e09da1d0cc)) * Stock Ledger Invariant Check report ([2984bad](https://github.com/frappe/erpnext/commit/2984bad2c09061c949a55d8d62f0fa39bbbbdfd2)) * Stock UOM not fetched when Stock Entry create from Item Dashboard (backport [#43457](https://github.com/frappe/erpnext/issues/43457)) ([#43465](https://github.com/frappe/erpnext/issues/43465)) ([f2a72e5](https://github.com/frappe/erpnext/commit/f2a72e5f82feec1683b858d72a2ca315892a97e2)) * tests for work order consumption (backport [#41814](https://github.com/frappe/erpnext/issues/41814)) ([#43430](https://github.com/frappe/erpnext/issues/43430)) ([86b10ce](https://github.com/frappe/erpnext/commit/86b10ce9bbfbf4279d52df9b17c660e6baeda934)) * use serial and batch fields (backport [#43421](https://github.com/frappe/erpnext/issues/43421)) ([#43423](https://github.com/frappe/erpnext/issues/43423)) ([d495d93](https://github.com/frappe/erpnext/commit/d495d93840c809bfdf7a7109e6fe883eae0e5193)) ### Features * added 'cost of new capitalized asset' column ([27cd51e](https://github.com/frappe/erpnext/commit/27cd51e267b3a11ab474ca085b5a0dc6cef87fad)) * provide hook point for bulk transaction tasks ([50e47e7](https://github.com/frappe/erpnext/commit/50e47e796dc4a91fb4b3e653fb5cc679c58916cf)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index c240944687b..bbb02e2ed0d 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.37.0" +__version__ = "15.38.0" def get_default_company(user=None): From e785928c0fcb5e2549302ea77217fe88f9797717 Mon Sep 17 00:00:00 2001 From: Abdeali Chharchhoda Date: Mon, 7 Oct 2024 12:08:02 +0530 Subject: [PATCH 0212/1614] fix: Remove unused field --- .../doctype/payment_request/payment_request.json | 11 +---------- .../doctype/payment_request/payment_request.py | 1 - 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/erpnext/accounts/doctype/payment_request/payment_request.json b/erpnext/accounts/doctype/payment_request/payment_request.json index 7806bc682b0..67d540701c1 100644 --- a/erpnext/accounts/doctype/payment_request/payment_request.json +++ b/erpnext/accounts/doctype/payment_request/payment_request.json @@ -398,15 +398,6 @@ "print_hide": 1, "read_only": 1 }, - { - "fieldname": "failed_reason", - "fieldtype": "Data", - "hidden": 1, - "label": "Reason for Failure", - "no_copy": 1, - "print_hide": 1, - "read_only": 1 - }, { "depends_on": "eval: doc.docstatus === 1", "description": "Amount in party's bank account currency", @@ -480,4 +471,4 @@ "sort_field": "modified", "sort_order": "DESC", "states": [] -} \ No newline at end of file +} diff --git a/erpnext/accounts/doctype/payment_request/payment_request.py b/erpnext/accounts/doctype/payment_request/payment_request.py index 6d1d279c244..a12cfb4eb92 100644 --- a/erpnext/accounts/doctype/payment_request/payment_request.py +++ b/erpnext/accounts/doctype/payment_request/payment_request.py @@ -51,7 +51,6 @@ class PaymentRequest(Document): cost_center: DF.Link | None currency: DF.Link | None email_to: DF.Data | None - failed_reason: DF.Data | None grand_total: DF.Currency iban: DF.ReadOnly | None is_a_subscription: DF.Check From 75916629c857465a1a6efadd2fd0c77624c93cf5 Mon Sep 17 00:00:00 2001 From: Abdeali Chharchhoda Date: Mon, 7 Oct 2024 12:10:51 +0530 Subject: [PATCH 0213/1614] fix: Remove unused function `get_paid_amount_against_order` --- .../payment_request/payment_request.py | 27 ------------------- 1 file changed, 27 deletions(-) diff --git a/erpnext/accounts/doctype/payment_request/payment_request.py b/erpnext/accounts/doctype/payment_request/payment_request.py index a12cfb4eb92..abed1610119 100644 --- a/erpnext/accounts/doctype/payment_request/payment_request.py +++ b/erpnext/accounts/doctype/payment_request/payment_request.py @@ -862,33 +862,6 @@ def validate_payment(doc, method=None): ) -def get_paid_amount_against_order(dt, dn): - pe_ref = frappe.qb.DocType("Payment Entry Reference") - if dt == "Sales Order": - inv_dt, inv_field = "Sales Invoice Item", "sales_order" - else: - inv_dt, inv_field = "Purchase Invoice Item", "purchase_order" - inv_item = frappe.qb.DocType(inv_dt) - return ( - frappe.qb.from_(pe_ref) - .select( - Sum(pe_ref.allocated_amount), - ) - .where( - (pe_ref.docstatus == 1) - & ( - (pe_ref.reference_name == dn) - | pe_ref.reference_name.isin( - frappe.qb.from_(inv_item) - .select(inv_item.parent) - .where(inv_item[inv_field] == dn) - .distinct() - ) - ) - ) - ).run()[0][0] or 0 - - @frappe.whitelist() def get_open_payment_requests_query(doctype, txt, searchfield, start, page_len, filters): # permission checks in `get_list()` From 6770610c6d62a2dcddf95221ed85ee37c5a56625 Mon Sep 17 00:00:00 2001 From: Ninad Parikh <109862100+Ninad1306@users.noreply.github.com> Date: Sun, 6 Oct 2024 08:52:58 +0530 Subject: [PATCH 0214/1614] fix: Update Values before `after_mapping` hook is called (#42682) * fix: update values before after_mapping hook is called * fix: appropriate function name --- .../doctype/purchase_order/purchase_order.py | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.py b/erpnext/buying/doctype/purchase_order/purchase_order.py index 14424dfdf4a..64c9ba36794 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.py +++ b/erpnext/buying/doctype/purchase_order/purchase_order.py @@ -889,6 +889,20 @@ def make_subcontracting_order(source_name, target_doc=None, save=False, submit=F def get_mapped_subcontracting_order(source_name, target_doc=None): + def post_process(source_doc, target_doc): + target_doc.populate_items_table() + + if target_doc.set_warehouse: + for item in target_doc.items: + item.warehouse = target_doc.set_warehouse + else: + if source_doc.set_warehouse: + for item in target_doc.items: + item.warehouse = source_doc.set_warehouse + else: + for idx, item in enumerate(target_doc.items): + item.warehouse = source_doc.items[idx].warehouse + if target_doc and isinstance(target_doc, str): target_doc = json.loads(target_doc) for key in ["service_items", "items", "supplied_items"]: @@ -919,22 +933,9 @@ def get_mapped_subcontracting_order(source_name, target_doc=None): }, }, target_doc, + post_process, ) - target_doc.populate_items_table() - source_doc = frappe.get_doc("Purchase Order", source_name) - - if target_doc.set_warehouse: - for item in target_doc.items: - item.warehouse = target_doc.set_warehouse - else: - if source_doc.set_warehouse: - for item in target_doc.items: - item.warehouse = source_doc.set_warehouse - else: - for idx, item in enumerate(target_doc.items): - item.warehouse = source_doc.items[idx].warehouse - return target_doc From dbd7b83204d1e36790d838a5c96c55d4d93464bd Mon Sep 17 00:00:00 2001 From: Abdeali Chharchhoda Date: Mon, 7 Oct 2024 12:33:42 +0530 Subject: [PATCH 0215/1614] fix: Separate `on_submit` and `before_submit` of PR --- .../payment_request/payment_request.py | 29 ++++++++++++------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/erpnext/accounts/doctype/payment_request/payment_request.py b/erpnext/accounts/doctype/payment_request/payment_request.py index abed1610119..8c370ba9d8c 100644 --- a/erpnext/accounts/doctype/payment_request/payment_request.py +++ b/erpnext/accounts/doctype/payment_request/payment_request.py @@ -179,19 +179,28 @@ class PaymentRequest(Document): else: self.outstanding_amount = self.grand_total + def on_submit(self): if self.payment_request_type == "Outward": - self.status = "Initiated" + self.db_set("status", "Initiated") + return elif self.payment_request_type == "Inward": - self.status = "Requested" + self.db_set("status", "Requested") - if self.payment_request_type == "Inward": - if self.payment_channel == "Phone": - self.request_phone_payment() - else: - self.set_payment_request_url() - if not (self.mute_email or self.flags.mute_email): - self.send_email() - self.make_communication_entry() + send_mail = self.payment_gateway_validation() if self.payment_gateway else None + ref_doc = frappe.get_doc(self.reference_doctype, self.reference_name) + + if ( + hasattr(ref_doc, "order_type") and ref_doc.order_type == "Shopping Cart" + ) or self.flags.mute_email: + send_mail = False + + if send_mail and self.payment_channel != "Phone": + self.set_payment_request_url() + self.send_email() + self.make_communication_entry() + + elif self.payment_channel == "Phone": + self.request_phone_payment() def request_phone_payment(self): controller = _get_payment_gateway_controller(self.payment_gateway) From 3d9d56ab504ef2fd321fe4cbdd38414a1700ccfa Mon Sep 17 00:00:00 2001 From: Abdeali Chharchhoda Date: Mon, 7 Oct 2024 12:42:59 +0530 Subject: [PATCH 0216/1614] test: Remove `Payment Gateway` settings from test --- .../payment_request/test_payment_request.py | 24 ------------------- 1 file changed, 24 deletions(-) diff --git a/erpnext/accounts/doctype/payment_request/test_payment_request.py b/erpnext/accounts/doctype/payment_request/test_payment_request.py index e9f8f25ff2d..34b3b7bb5fa 100644 --- a/erpnext/accounts/doctype/payment_request/test_payment_request.py +++ b/erpnext/accounts/doctype/payment_request/test_payment_request.py @@ -3,7 +3,6 @@ import re import unittest -from unittest.mock import patch import frappe from frappe.tests.utils import FrappeTestCase @@ -18,7 +17,6 @@ from erpnext.setup.utils import get_exchange_rate test_dependencies = ["Currency Exchange", "Journal Entry", "Contact", "Address"] -PAYMENT_URL = "https://example.com/payment" payment_gateway = {"doctype": "Payment Gateway", "gateway": "_Test Gateway"} @@ -52,28 +50,6 @@ class TestPaymentRequest(FrappeTestCase): ): frappe.get_doc(method).insert(ignore_permissions=True) - send_email = patch( - "erpnext.accounts.doctype.payment_request.payment_request.PaymentRequest.send_email", - return_value=None, - ) - self.send_email = send_email.start() - self.addCleanup(send_email.stop) - get_payment_url = patch( - # this also shadows one (1) call to _get_payment_gateway_controller - "erpnext.accounts.doctype.payment_request.payment_request.PaymentRequest.get_payment_url", - return_value=PAYMENT_URL, - ) - self.get_payment_url = get_payment_url.start() - self.addCleanup(get_payment_url.stop) - _get_payment_gateway_controller = patch( - "erpnext.accounts.doctype.payment_request.payment_request._get_payment_gateway_controller", - ) - self._get_payment_gateway_controller = _get_payment_gateway_controller.start() - self.addCleanup(_get_payment_gateway_controller.stop) - - def tearDown(self): - frappe.db.rollback() - def test_payment_request_linkings(self): so_inr = make_sales_order(currency="INR", do_not_save=True) so_inr.disable_rounded_total = 1 From d69a974a4de50e0208127ea3b078acbd0fa0364d Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 13:57:56 +0530 Subject: [PATCH 0217/1614] fix: read only filters in multidialog fields (backport #43503) (#43513) fix: read only filters in multidialog fields (#43503) (cherry picked from commit 13eb3c5c147cc2978f673dd6c7027e690e8767ac) Co-authored-by: rohitwaghchaure --- erpnext/public/js/utils.js | 1 + erpnext/stock/doctype/stock_entry/stock_entry.js | 2 ++ 2 files changed, 3 insertions(+) diff --git a/erpnext/public/js/utils.js b/erpnext/public/js/utils.js index a7d88edcafa..7c02fefc0f9 100755 --- a/erpnext/public/js/utils.js +++ b/erpnext/public/js/utils.js @@ -920,6 +920,7 @@ erpnext.utils.map_current_doc = function (opts) { target: opts.target, date_field: opts.date_field || undefined, setters: opts.setters, + read_only_setters: opts.read_only_setters, data_fields: data_fields, get_query: opts.get_query, add_filters_group: 1, diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.js b/erpnext/stock/doctype/stock_entry/stock_entry.js index c54876713c3..cb442f6666d 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.js +++ b/erpnext/stock/doctype/stock_entry/stock_entry.js @@ -447,9 +447,11 @@ frappe.ui.form.on("Stock Entry", { source_doctype: "Stock Entry", target: frm, date_field: "posting_date", + read_only_setters: ["stock_entry_type", "purpose", "add_to_transit"], setters: { stock_entry_type: "Material Transfer", purpose: "Material Transfer", + add_to_transit: 1, }, get_query_filters: { docstatus: 1, From 85d74050e1b35126e4c9b2d4a7cb1bc3c27ae835 Mon Sep 17 00:00:00 2001 From: "Nihantra C. Patel" <141945075+Nihantra-Patel@users.noreply.github.com> Date: Mon, 7 Oct 2024 14:51:04 +0530 Subject: [PATCH 0218/1614] fix: #42014 --resolve conflicts --- erpnext/crm/doctype/lead/lead.js | 160 +++++-------------------------- 1 file changed, 23 insertions(+), 137 deletions(-) diff --git a/erpnext/crm/doctype/lead/lead.js b/erpnext/crm/doctype/lead/lead.js index f27187924af..e50cf9e4dd0 100644 --- a/erpnext/crm/doctype/lead/lead.js +++ b/erpnext/crm/doctype/lead/lead.js @@ -28,42 +28,18 @@ erpnext.LeadController = class LeadController extends frappe.ui.form.Controller erpnext.toggle_naming_series(); if (!this.frm.is_new() && doc.__onload && !doc.__onload.is_customer) { -<<<<<<< HEAD -<<<<<<< HEAD - this.frm.add_custom_button(__("Customer"), this.make_customer, __("Create")); - this.frm.add_custom_button( - __("Opportunity"), - function () { - me.frm.trigger("make_opportunity"); - }, - __("Create") - ); - this.frm.add_custom_button(__("Quotation"), this.make_quotation, __("Create")); -======= - this.frm.add_custom_button( - __("Customer"), - this.make_customer.bind(this), - __("Create") - ); - this.frm.add_custom_button( - __("Opportunity"), - this.make_opportunity.bind(this), - __("Create") - ); - this.frm.add_custom_button( - __("Quotation"), - this.make_quotation.bind(this), - __("Create") - ); ->>>>>>> 8304d19e8b (fix: creation of contact, customer, opportunity, quotation and prospect from lead) -======= this.frm.add_custom_button(__("Customer"), this.make_customer.bind(this), __("Create")); this.frm.add_custom_button(__("Opportunity"), this.make_opportunity.bind(this), __("Create")); this.frm.add_custom_button(__("Quotation"), this.make_quotation.bind(this), __("Create")); ->>>>>>> 5844897c34 (fix: creation of contact, customer, opportunity, quotation and prospect from lead --prettier) if (!doc.__onload.linked_prospects.length) { this.frm.add_custom_button(__("Prospect"), this.make_prospect.bind(this), __("Create")); - this.frm.add_custom_button(__("Add to Prospect"), this.add_lead_to_prospect, __("Action")); + this.frm.add_custom_button( + __("Add to Prospect"), + () => { + this.add_lead_to_prospect(this.frm); + }, + __("Action") + ); } } @@ -77,8 +53,7 @@ erpnext.LeadController = class LeadController extends frappe.ui.form.Controller this.show_activities(); } - add_lead_to_prospect() { - let me = this; + add_lead_to_prospect(frm) { frappe.prompt( [ { @@ -93,12 +68,12 @@ erpnext.LeadController = class LeadController extends frappe.ui.form.Controller frappe.call({ method: "erpnext.crm.doctype.lead.lead.add_lead_to_prospect", args: { - lead: me.frm.doc.name, + lead: frm.doc.name, prospect: data.prospect, }, callback: function (r) { if (!r.exc) { - me.frm.reload_doc(); + frm.reload_doc(); } }, freeze: true, @@ -113,19 +88,17 @@ erpnext.LeadController = class LeadController extends frappe.ui.form.Controller make_customer() { frappe.model.open_mapped_doc({ method: "erpnext.crm.doctype.lead.lead.make_customer", - frm: cur_frm, + frm: this.frm, }); } make_quotation() { frappe.model.open_mapped_doc({ method: "erpnext.crm.doctype.lead.lead.make_quotation", - frm: cur_frm, + frm: this.frm, }); } -<<<<<<< HEAD -======= async make_opportunity() { const frm = this.frm; let existing_prospect = ( @@ -216,22 +189,22 @@ erpnext.LeadController = class LeadController extends frappe.ui.form.Controller } } ->>>>>>> 8304d19e8b (fix: creation of contact, customer, opportunity, quotation and prospect from lead) make_prospect() { + const me = this; frappe.model.with_doctype("Prospect", function () { let prospect = frappe.model.get_new_doc("Prospect"); - prospect.company_name = cur_frm.doc.company_name; - prospect.no_of_employees = cur_frm.doc.no_of_employees; - prospect.industry = cur_frm.doc.industry; - prospect.market_segment = cur_frm.doc.market_segment; - prospect.territory = cur_frm.doc.territory; - prospect.fax = cur_frm.doc.fax; - prospect.website = cur_frm.doc.website; - prospect.prospect_owner = cur_frm.doc.lead_owner; - prospect.notes = cur_frm.doc.notes; + prospect.company_name = me.frm.doc.company_name; + prospect.no_of_employees = me.frm.doc.no_of_employees; + prospect.industry = me.frm.doc.industry; + prospect.market_segment = me.frm.doc.market_segment; + prospect.territory = me.frm.doc.territory; + prospect.fax = me.frm.doc.fax; + prospect.website = me.frm.doc.website; + prospect.prospect_owner = me.frm.doc.lead_owner; + prospect.notes = me.frm.doc.notes; let leads_row = frappe.model.add_child(prospect, "leads"); - leads_row.lead = cur_frm.doc.name; + leads_row.lead = me.frm.doc.name; frappe.set_route("Form", "Prospect", prospect.name); }); @@ -267,90 +240,3 @@ erpnext.LeadController = class LeadController extends frappe.ui.form.Controller }; extend_cscript(cur_frm.cscript, new erpnext.LeadController({ frm: cur_frm })); - -frappe.ui.form.on("Lead", { - make_opportunity: async function (frm) { - let existing_prospect = ( - await frappe.db.get_value( - "Prospect Lead", - { - lead: frm.doc.name, - }, - "name", - null, - "Prospect" - ) - ).message.name; - - if (!existing_prospect) { - var fields = [ - { - label: "Create Prospect", - fieldname: "create_prospect", - fieldtype: "Check", - default: 1, - }, - { - label: "Prospect Name", - fieldname: "prospect_name", - fieldtype: "Data", - default: frm.doc.company_name, - depends_on: "create_prospect", - }, - ]; - } - let existing_contact = ( - await frappe.db.get_value( - "Contact", - { - first_name: frm.doc.first_name || frm.doc.lead_name, - last_name: frm.doc.last_name, - }, - "name" - ) - ).message.name; - - if (!existing_contact) { - fields.push({ - label: "Create Contact", - fieldname: "create_contact", - fieldtype: "Check", - default: "1", - }); - } - - if (fields) { - var d = new frappe.ui.Dialog({ - title: __("Create Opportunity"), - fields: fields, - primary_action: function () { - var data = d.get_values(); - frappe.call({ - method: "create_prospect_and_contact", - doc: frm.doc, - args: { - data: data, - }, - freeze: true, - callback: function (r) { - if (!r.exc) { - frappe.model.open_mapped_doc({ - method: "erpnext.crm.doctype.lead.lead.make_opportunity", - frm: frm, - }); - } - d.hide(); - }, - }); - }, - primary_action_label: __("Create"), - }); - d.show(); - } else { - frappe.model.open_mapped_doc({ - method: "erpnext.crm.doctype.lead.lead.make_opportunity", - frm: frm, - }); - } - }, -}); From 62cc86114b3f2bca31d66975fb4182e165ce2c90 Mon Sep 17 00:00:00 2001 From: Abdeali Chharchhoda Date: Mon, 7 Oct 2024 16:00:06 +0530 Subject: [PATCH 0219/1614] test: Change `Accounts Settings` for multi currency (https://github.com/frappe/erpnext/pull/42427#discussion_r1789859737) --- .../doctype/payment_request/test_payment_request.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/payment_request/test_payment_request.py b/erpnext/accounts/doctype/payment_request/test_payment_request.py index 34b3b7bb5fa..b0c3dbf4d5b 100644 --- a/erpnext/accounts/doctype/payment_request/test_payment_request.py +++ b/erpnext/accounts/doctype/payment_request/test_payment_request.py @@ -5,7 +5,7 @@ import re import unittest import frappe -from frappe.tests.utils import FrappeTestCase +from frappe.tests.utils import FrappeTestCase, change_settings from erpnext.accounts.doctype.payment_entry.test_payment_entry import create_payment_terms_template from erpnext.accounts.doctype.payment_request.payment_request import make_payment_request @@ -341,8 +341,11 @@ class TestPaymentRequest(FrappeTestCase): return_doc=1, ) + @change_settings("Accounts Settings", {"allow_multi_currency_invoices_against_single_party_account": 1}) def test_multiple_payment_if_partially_paid_for_multi_currency(self): - pi = make_purchase_invoice(currency="USD", conversion_rate=50, qty=1, rate=100) + pi = make_purchase_invoice(currency="USD", conversion_rate=50, qty=1, rate=100, do_not_save=1) + pi.credit_to = "Creditors - _TC" + pi.submit() pr = make_payment_request( dt="Purchase Invoice", @@ -439,10 +442,13 @@ class TestPaymentRequest(FrappeTestCase): self.assertEqual(pr.outstanding_amount, 0) self.assertEqual(pr.grand_total, 20000) + @change_settings("Accounts Settings", {"allow_multi_currency_invoices_against_single_party_account": 1}) def test_single_payment_with_payment_term_for_multi_currency(self): create_payment_terms_template() - si = create_sales_invoice(do_not_save=1, currency="USD", qty=1, rate=200, conversion_rate=50) + si = create_sales_invoice( + do_not_save=1, currency="USD", debit_to="Debtors - _TC", qty=1, rate=200, conversion_rate=50 + ) si.payment_terms_template = "Test Receivable Template" # 84.746 and 15.254 si.save() si.submit() From eb1f1255ebb7f1424e982864bd2b08ceb54e86a2 Mon Sep 17 00:00:00 2001 From: Syed Mujeer Hashmi Date: Mon, 7 Oct 2024 14:12:43 +0000 Subject: [PATCH 0220/1614] fix: Link opportunity from RFQ to supplier quotation --- .../doctype/request_for_quotation/request_for_quotation.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py index c8ef833e0e9..e123822f386 100644 --- a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py +++ b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py @@ -390,6 +390,7 @@ def make_supplier_quotation_from_rfq(source_name, target_doc=None, for_supplier= "Request for Quotation": { "doctype": "Supplier Quotation", "validation": {"docstatus": ["=", 1]}, + "field_map": {"opportunity": "opportunity"}, }, "Request for Quotation Item": { "doctype": "Supplier Quotation Item", From 0c599c2b6d171161de4c697ae7e6c691e70cc2f4 Mon Sep 17 00:00:00 2001 From: Smit Vora Date: Mon, 7 Oct 2024 20:36:53 +0530 Subject: [PATCH 0221/1614] chore: remove unused filed --- erpnext/accounts/doctype/payment_request/payment_request.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/erpnext/accounts/doctype/payment_request/payment_request.json b/erpnext/accounts/doctype/payment_request/payment_request.json index 67d540701c1..b7af8412810 100644 --- a/erpnext/accounts/doctype/payment_request/payment_request.json +++ b/erpnext/accounts/doctype/payment_request/payment_request.json @@ -416,10 +416,6 @@ "options": "Company", "read_only": 1 }, - { - "fieldname": "column_break_pnyv", - "fieldtype": "Column Break" - }, { "fieldname": "party_account_currency", "fieldtype": "Link", From 55464c79c4a068146b7254f57c9575b44c3966ac Mon Sep 17 00:00:00 2001 From: ljain112 Date: Wed, 25 Sep 2024 18:24:42 +0530 Subject: [PATCH 0222/1614] fix: include parent item group in query (cherry picked from commit ad0090068dc9dc0325dea180ff38e2c2cc86a4a6) --- erpnext/accounts/doctype/pos_invoice/pos_invoice.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/accounts/doctype/pos_invoice/pos_invoice.py b/erpnext/accounts/doctype/pos_invoice/pos_invoice.py index 742af7dd0fe..20316e3394b 100644 --- a/erpnext/accounts/doctype/pos_invoice/pos_invoice.py +++ b/erpnext/accounts/doctype/pos_invoice/pos_invoice.py @@ -862,6 +862,7 @@ def get_item_group(pos_profile): if pos_profile.get("item_groups"): # Get items based on the item groups defined in the POS profile for row in pos_profile.get("item_groups"): + item_groups.append(row.item_group) item_groups.extend(get_descendants_of("Item Group", row.item_group)) return list(set(item_groups)) From 8ce81a058a074ecf11c95137e3c14e30480f241e Mon Sep 17 00:00:00 2001 From: ljain112 Date: Wed, 25 Sep 2024 18:26:10 +0530 Subject: [PATCH 0223/1614] fix: add parenttype condition for item table in Purchase Register Report (cherry picked from commit 28abf191fcc0b74e60610eb7af29160d8fd2c6ad) --- .../accounts/report/purchase_register/purchase_register.py | 5 +++-- erpnext/accounts/report/utils.py | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/report/purchase_register/purchase_register.py b/erpnext/accounts/report/purchase_register/purchase_register.py index 504c74babcb..48364cc2c91 100644 --- a/erpnext/accounts/report/purchase_register/purchase_register.py +++ b/erpnext/accounts/report/purchase_register/purchase_register.py @@ -311,6 +311,7 @@ def get_account_columns(invoice_list, include_payments): """select distinct expense_account from `tabPurchase Invoice Item` where docstatus = 1 and (expense_account is not null and expense_account != '') + and parenttype='Purchase Invoice' and parent in (%s) order by expense_account""" % ", ".join(["%s"] * len(invoice_list)), tuple([inv.name for inv in invoice_list]), @@ -451,7 +452,7 @@ def get_invoice_expense_map(invoice_list): """ select parent, expense_account, sum(base_net_amount) as amount from `tabPurchase Invoice Item` - where parent in (%s) + where parent in (%s) and parenttype='Purchase Invoice' group by parent, expense_account """ % ", ".join(["%s"] * len(invoice_list)), @@ -522,7 +523,7 @@ def get_invoice_po_pr_map(invoice_list): """ select parent, purchase_order, purchase_receipt, po_detail, project from `tabPurchase Invoice Item` - where parent in (%s) + where parent in (%s) and parenttype='Purchase Invoice' """ % ", ".join(["%s"] * len(invoice_list)), tuple(inv.name for inv in invoice_list), diff --git a/erpnext/accounts/report/utils.py b/erpnext/accounts/report/utils.py index bd1b35559ea..d6c1b95cf7c 100644 --- a/erpnext/accounts/report/utils.py +++ b/erpnext/accounts/report/utils.py @@ -326,6 +326,7 @@ def apply_common_conditions(filters, query, doctype, child_doctype=None, payment if join_required: query = query.inner_join(child_doc).on(parent_doc.name == child_doc.parent) + query = query.where(child_doc.parenttype == doctype) query = query.distinct() if parent_doc.get_table_name() != "tabJournal Entry": From d6f70f533acd24ddb1440cbced74336f59e109e5 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Thu, 26 Sep 2024 13:41:16 +0530 Subject: [PATCH 0224/1614] fix: create Account Closing Balance even though there are no transaction in period (cherry picked from commit 43deaea96b178592a4e18d9e01b33823a9cab8bd) --- .../doctype/period_closing_voucher/period_closing_voucher.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py index 9bc110d243e..c68cd292523 100644 --- a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py +++ b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py @@ -392,8 +392,7 @@ def process_closing_entries(gl_entries, closing_entries, voucher_name, company, ) try: - if gl_entries + closing_entries: - make_closing_entries(gl_entries + closing_entries, voucher_name, company, closing_date) + make_closing_entries(gl_entries + closing_entries, voucher_name, company, closing_date) except Exception as e: frappe.db.rollback() frappe.log_error(e) From bcd0105915ddd7fc433f8de5f743a16023d99748 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 8 Oct 2024 09:01:25 +0530 Subject: [PATCH 0225/1614] chore: Allow apps to extend voucher subtypes (#43528) * chore: Allow apps to extend voucher subtypes (cherry picked from commit a1525d9b8e45c6b71f1a9e490af82e2e84b09c25) * chore: Allow apps to extend voucher subtypes (cherry picked from commit 8a1e38a43b8f47ef388a5d7f57b8e84212bbe2b3) * chore: Allow apps to extend voucher subtypes (cherry picked from commit ca8820b5660f371ec9bd05ac6afe104c55168b18) --------- Co-authored-by: Deepesh Garg --- erpnext/controllers/accounts_controller.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 9a590ef2e40..73923464ed9 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -1063,6 +1063,13 @@ class AccountsController(TransactionBase): "Stock Entry": "stock_entry_type", "Asset Capitalization": "entry_type", } + + for method_name in frappe.get_hooks("voucher_subtypes"): + voucher_subtype = frappe.get_attr(method_name)(self) + + if voucher_subtype: + return voucher_subtype + if self.doctype in voucher_subtypes: return self.get(voucher_subtypes[self.doctype]) elif self.doctype == "Purchase Receipt" and self.is_return: @@ -1073,6 +1080,7 @@ class AccountsController(TransactionBase): return "Credit Note" elif (self.doctype == "Purchase Invoice" and self.is_return) or self.doctype == "Sales Invoice": return "Debit Note" + return self.doctype def get_value_in_transaction_currency(self, account_currency, gl_dict, field): From 05db28c64f74bf95a1cd8a9d6a3e6ee782034d49 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 8 Oct 2024 09:20:34 +0530 Subject: [PATCH 0226/1614] chore: Allow apps to extend voucher subtypes (backport #43528) (backport #43550) (#43551) chore: Allow apps to extend voucher subtypes (#43528) * chore: Allow apps to extend voucher subtypes (cherry picked from commit a1525d9b8e45c6b71f1a9e490af82e2e84b09c25) * chore: Allow apps to extend voucher subtypes (cherry picked from commit 8a1e38a43b8f47ef388a5d7f57b8e84212bbe2b3) * chore: Allow apps to extend voucher subtypes (cherry picked from commit ca8820b5660f371ec9bd05ac6afe104c55168b18) --------- Co-authored-by: Deepesh Garg (cherry picked from commit bcd0105915ddd7fc433f8de5f743a16023d99748) Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- erpnext/controllers/accounts_controller.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 77f54818040..3c1fb8bae44 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -1063,6 +1063,13 @@ class AccountsController(TransactionBase): "Stock Entry": "stock_entry_type", "Asset Capitalization": "entry_type", } + + for method_name in frappe.get_hooks("voucher_subtypes"): + voucher_subtype = frappe.get_attr(method_name)(self) + + if voucher_subtype: + return voucher_subtype + if self.doctype in voucher_subtypes: return self.get(voucher_subtypes[self.doctype]) elif self.doctype == "Purchase Receipt" and self.is_return: @@ -1073,6 +1080,7 @@ class AccountsController(TransactionBase): return "Credit Note" elif (self.doctype == "Purchase Invoice" and self.is_return) or self.doctype == "Sales Invoice": return "Debit Note" + return self.doctype def get_value_in_transaction_currency(self, account_currency, gl_dict, field): From ee8485a54ac0439e9cf3a6c8b9b7e0a02f3ae53f Mon Sep 17 00:00:00 2001 From: ljain112 Date: Thu, 26 Sep 2024 19:52:57 +0530 Subject: [PATCH 0227/1614] fix: do not include advances for tds vouchers (cherry picked from commit 7ef918421e18187e9662d57a828923a74934b190) --- .../tax_withholding_category/tax_withholding_category.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py index 9fd78da2d07..d9a569e2269 100644 --- a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py +++ b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py @@ -414,6 +414,9 @@ def get_advance_vouchers(parties, company=None, from_date=None, to_date=None, pa Use Payment Ledger to fetch unallocated Advance Payments """ + if party_type == "Supplier": + return [] + ple = qb.DocType("Payment Ledger Entry") conditions = [] From 6decb7cc34a02c1bf8d33e019ead5cafc3f65363 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Wed, 18 Sep 2024 13:08:38 +0530 Subject: [PATCH 0228/1614] fix: deduct advances adjusted for threshold check for tcs (cherry picked from commit 767c8f92bef52aa8f1855b6ac3388f0922eb7249) --- .../tax_withholding_category.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py index d9a569e2269..67a33faf9bf 100644 --- a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py +++ b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py @@ -327,7 +327,7 @@ def get_tax_amount(party_type, parties, inv, tax_details, posting_date, pan_no=N tax_amount = 0 else: # if no TCS has been charged in FY, - # then chargeable value is "prev invoices + advances" value which cross the threshold + # then chargeable value is "prev invoices + advances - advance_adjusted" value which cross the threshold tax_amount = get_tcs_amount(parties, inv, tax_details, vouchers, advance_vouchers) if cint(tax_details.round_off_tax_amount): @@ -634,9 +634,12 @@ def get_tcs_amount(parties, inv, tax_details, vouchers, adv_vouchers): ) cumulative_threshold = tax_details.get("cumulative_threshold", 0) + advance_adjusted = get_advance_adjusted_in_invoice(inv) current_invoice_total = get_invoice_total_without_tcs(inv, tax_details) - total_invoiced_amt = current_invoice_total + invoiced_amt + advance_amt - credit_note_amt + total_invoiced_amt = ( + current_invoice_total + invoiced_amt + advance_amt - credit_note_amt - advance_adjusted + ) if cumulative_threshold and total_invoiced_amt >= cumulative_threshold: chargeable_amt = total_invoiced_amt - cumulative_threshold @@ -645,6 +648,14 @@ def get_tcs_amount(parties, inv, tax_details, vouchers, adv_vouchers): return tcs_amount +def get_advance_adjusted_in_invoice(inv): + advances_adjusted = 0 + for row in inv.get("advances", []): + advances_adjusted += row.allocated_amount + + return advances_adjusted + + def get_invoice_total_without_tcs(inv, tax_details): tcs_tax_row = [d for d in inv.taxes if d.account_head == tax_details.account_head] tcs_tax_row_amount = tcs_tax_row[0].base_tax_amount if tcs_tax_row else 0 From 2b4cd0a9bb7696234c4c40425cb9ee5669f61297 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Tue, 8 Oct 2024 11:24:44 +0530 Subject: [PATCH 0229/1614] test: added test cases for the tcs deduction for advances adjusted. (cherry picked from commit efe238cefd627125d1c293297024e9ad5290d6dd) --- .../test_tax_withholding_category.py | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py b/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py index 1e3939d98a4..24c9265eecd 100644 --- a/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py +++ b/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py @@ -210,6 +210,46 @@ class TestTaxWithholdingCategory(FrappeTestCase): d.reload() d.cancel() + def test_tcs_on_allocated_advance_payments(self): + frappe.db.set_value( + "Customer", "Test TCS Customer", "tax_withholding_category", "Cumulative Threshold TCS" + ) + + vouchers = [] + + # create advance payment + pe = create_payment_entry( + payment_type="Receive", party_type="Customer", party="Test TCS Customer", paid_amount=30000 + ) + pe.paid_from = "Debtors - _TC" + pe.paid_to = "Cash - _TC" + pe.submit() + vouchers.append(pe) + + si = create_sales_invoice(customer="Test TCS Customer", rate=50000) + advances = si.get_advance_entries() + si.append( + "advances", + { + "reference_type": advances[0].reference_type, + "reference_name": advances[0].reference_name, + "advance_amount": advances[0].amount, + "allocated_amount": 30000, + }, + ) + si.submit() + vouchers.append(si) + + # assert tax collection on total invoice ,advance payment adjusted should be excluded. + tcs_charged = sum([d.base_tax_amount for d in si.taxes if d.account_head == "TCS - _TC"]) + # tcs = (inv amt)50000+(adv amt)30000-(adv adj) 30000 - threshold(30000) * rate 10% + self.assertEqual(tcs_charged, 2000) + + # cancel invoice and payments to avoid clashing + for d in reversed(vouchers): + d.reload() + d.cancel() + def test_tds_calculation_on_net_total(self): frappe.db.set_value( "Supplier", "Test TDS Supplier4", "tax_withholding_category", "Cumulative Threshold TDS" From fc9a3c0c92cf2537e0b871c8a59a927517150d7f Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 8 Oct 2024 17:40:22 +0530 Subject: [PATCH 0230/1614] fix: Unknown column 'serial_no' in 'field list' (backport #43515) (#43569) fix: Unknown column 'serial_no' in 'field list' (#43515) (cherry picked from commit 69127e8609c701d1d733f113af59f12076368905) Co-authored-by: rohitwaghchaure --- erpnext/manufacturing/doctype/work_order/work_order.py | 1 - 1 file changed, 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/work_order/work_order.py b/erpnext/manufacturing/doctype/work_order/work_order.py index 057c49949ec..218ab2f2bf8 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order.py +++ b/erpnext/manufacturing/doctype/work_order/work_order.py @@ -520,7 +520,6 @@ class WorkOrder(Document): def delete_auto_created_batch_and_serial_no(self): for row in frappe.get_all("Serial No", filters={"work_order": self.name}): frappe.delete_doc("Serial No", row.name) - self.db_set("serial_no", "") for row in frappe.get_all("Batch", filters={"reference_name": self.name}): frappe.delete_doc("Batch", row.name) From cf0fa0db7b7c2a9a5dbd3802ddec1db757afeb24 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 8 Oct 2024 17:40:52 +0530 Subject: [PATCH 0231/1614] fix: validation for corrective job card (backport #43555) (#43558) * fix: validation for corrective job card (#43555) (cherry picked from commit 7a0a893d08217b3131f2a1d38db7c0be51aed82b) # Conflicts: # erpnext/manufacturing/doctype/job_card/job_card.py * chore: fix conflicts * chore: fix linters issue --------- Co-authored-by: rohitwaghchaure --- erpnext/manufacturing/doctype/job_card/job_card.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/job_card/job_card.py b/erpnext/manufacturing/doctype/job_card/job_card.py index abea4c86279..de8116b296c 100644 --- a/erpnext/manufacturing/doctype/job_card/job_card.py +++ b/erpnext/manufacturing/doctype/job_card/job_card.py @@ -669,7 +669,7 @@ class JobCard(Document): self.set_transferred_qty() def validate_transfer_qty(self): - if self.items and self.transferred_qty < self.for_quantity: + if not self.is_corrective_job_card and self.items and self.transferred_qty < self.for_quantity: frappe.throw( _( "Materials needs to be transferred to the work in progress warehouse for the job card {0}" From 5660e8b26dc5cba40b18bbd532638ac52f84451a Mon Sep 17 00:00:00 2001 From: Nihantra Patel Date: Tue, 8 Oct 2024 18:48:11 +0530 Subject: [PATCH 0232/1614] fix: add include closed orders option in so/po trends report v15 --- .../report/purchase_order_trends/purchase_order_trends.js | 7 +++++++ erpnext/controllers/trends.py | 6 ++++-- .../report/sales_order_trends/sales_order_trends.js | 7 +++++++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/erpnext/buying/report/purchase_order_trends/purchase_order_trends.js b/erpnext/buying/report/purchase_order_trends/purchase_order_trends.js index 56684a8659b..9b193a34d83 100644 --- a/erpnext/buying/report/purchase_order_trends/purchase_order_trends.js +++ b/erpnext/buying/report/purchase_order_trends/purchase_order_trends.js @@ -2,3 +2,10 @@ // License: GNU General Public License v3. See license.txt frappe.query_reports["Purchase Order Trends"] = $.extend({}, erpnext.purchase_trends_filters); + +frappe.query_reports["Purchase Order Trends"]["filters"].push({ + fieldname: "include_closed_orders", + label: __("Include Closed Orders"), + fieldtype: "Check", + default: 0, +}); diff --git a/erpnext/controllers/trends.py b/erpnext/controllers/trends.py index 18fe7767c5d..7f07466b3bc 100644 --- a/erpnext/controllers/trends.py +++ b/erpnext/controllers/trends.py @@ -74,8 +74,10 @@ def get_data(filters, conditions): if conditions["based_on_select"] in ["t1.project,", "t2.project,"]: cond = " and " + conditions["based_on_select"][:-1] + " IS Not NULL" - if conditions.get("trans") in ["Sales Order", "Purchase Order"]: - cond += " and t1.status != 'Closed'" + + if not filters.get("include_closed_orders"): + if conditions.get("trans") in ["Sales Order", "Purchase Order"]: + cond += " and t1.status != 'Closed'" if conditions.get("trans") == "Quotation" and filters.get("group_by") == "Customer": cond += " and t1.quotation_to = 'Customer'" diff --git a/erpnext/selling/report/sales_order_trends/sales_order_trends.js b/erpnext/selling/report/sales_order_trends/sales_order_trends.js index 28bd5504930..a44353cf54b 100644 --- a/erpnext/selling/report/sales_order_trends/sales_order_trends.js +++ b/erpnext/selling/report/sales_order_trends/sales_order_trends.js @@ -2,3 +2,10 @@ // License: GNU General Public License v3. See license.txt frappe.query_reports["Sales Order Trends"] = $.extend({}, erpnext.sales_trends_filters); + +frappe.query_reports["Sales Order Trends"]["filters"].push({ + fieldname: "include_closed_orders", + label: __("Include Closed Orders"), + fieldtype: "Check", + default: 0, +}); From 60508a97061ad910d7c9324ee1da7be64d326884 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 9 Oct 2024 09:06:20 +0530 Subject: [PATCH 0233/1614] fix: 'NoneType' object has no attribute 'has_serial_no' (backport #43514) (#43574) fix: 'NoneType' object has no attribute 'has_serial_no' (#43514) (cherry picked from commit 6ddda6c949c582cd6f991637620f7082878f0495) Co-authored-by: rohitwaghchaure --- erpnext/controllers/stock_controller.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/controllers/stock_controller.py b/erpnext/controllers/stock_controller.py index 9fb0cc88cfb..537b37facf4 100644 --- a/erpnext/controllers/stock_controller.py +++ b/erpnext/controllers/stock_controller.py @@ -357,6 +357,9 @@ class StockController(AccountsController): @frappe.request_cache def is_serial_batch_item(self, item_code) -> bool: + if not frappe.db.exists("Item", item_code): + frappe.throw(_("Item {0} does not exist.").format(bold(item_code))) + item_details = frappe.db.get_value("Item", item_code, ["has_serial_no", "has_batch_no"], as_dict=1) if item_details.has_serial_no or item_details.has_batch_no: From 83ce3dd91598b8c2aad65e7f934c16131a9dbdc7 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 9 Oct 2024 09:06:34 +0530 Subject: [PATCH 0234/1614] fix: Accepted and Rejected warehouse cannot be same (backport #43568) (#43573) fix: Accepted and Rejected warehouse cannot be same (#43568) (cherry picked from commit 5130f7d411a8f27c1b51064611b739aaf8e09869) Co-authored-by: rohitwaghchaure --- erpnext/public/js/controllers/buying.js | 4 +-- .../js/utils/serial_no_batch_selector.js | 25 ++++++++++++++----- .../serial_and_batch_bundle.py | 12 ++++++--- 3 files changed, 29 insertions(+), 12 deletions(-) diff --git a/erpnext/public/js/controllers/buying.js b/erpnext/public/js/controllers/buying.js index 1d0680de861..202efe157f0 100644 --- a/erpnext/public/js/controllers/buying.js +++ b/erpnext/public/js/controllers/buying.js @@ -392,7 +392,7 @@ erpnext.buying = { item[field] = r.message[field]; }); - item.type_of_transaction = item.rejected_qty > 0 ? "Inward" : "Outward"; + item.type_of_transaction = !doc.is_return > 0 ? "Inward" : "Outward"; item.is_rejected = true; new erpnext.SerialBatchPackageSelector( @@ -404,7 +404,7 @@ erpnext.buying = { } let update_values = { - "serial_and_batch_bundle": r.name, + "rejected_serial_and_batch_bundle": r.name, "use_serial_batch_fields": 0, "rejected_qty": qty / flt(item.conversion_factor || 1, precision("conversion_factor", item)) } diff --git a/erpnext/public/js/utils/serial_no_batch_selector.js b/erpnext/public/js/utils/serial_no_batch_selector.js index 46ff6366de8..1045965e43d 100644 --- a/erpnext/public/js/utils/serial_no_batch_selector.js +++ b/erpnext/public/js/utils/serial_no_batch_selector.js @@ -96,7 +96,12 @@ erpnext.SerialBatchPackageSelector = class SerialNoBatchBundleUpdate { options: "Warehouse", default: this.get_warehouse(), onchange: () => { - this.item.warehouse = this.dialog.get_value("warehouse"); + if (this.item?.is_rejected) { + this.item.rejected_warehouse = this.dialog.get_value("warehouse"); + } else { + this.item.warehouse = this.dialog.get_value("warehouse"); + } + this.get_auto_data(); }, get_query: () => { @@ -282,10 +287,6 @@ erpnext.SerialBatchPackageSelector = class SerialNoBatchBundleUpdate { return fields; } - set_serial_nos_from_series() {} - - set_batch_nos_from_series() {} - set_serial_nos_from_range() { const serial_no_range = this.dialog.get_value("serial_no_range"); @@ -508,12 +509,17 @@ erpnext.SerialBatchPackageSelector = class SerialNoBatchBundleUpdate { based_on = "FIFO"; } + let warehouse = this.item.warehouse || this.item.s_warehouse; + if (this.item?.is_rejected) { + warehouse = this.item.rejected_warehouse; + } + if (qty) { frappe.call({ method: "erpnext.stock.doctype.serial_and_batch_bundle.serial_and_batch_bundle.get_auto_data", args: { item_code: this.item.item_code, - warehouse: this.item.warehouse || this.item.s_warehouse, + warehouse: warehouse, has_serial_no: this.item.has_serial_no, has_batch_no: this.item.has_batch_no, qty: qty, @@ -627,6 +633,10 @@ erpnext.SerialBatchPackageSelector = class SerialNoBatchBundleUpdate { frappe.throw(__("Please select a Warehouse")); } + if (this.item?.is_rejected && this.item.rejected_warehouse === this.item.warehouse) { + frappe.throw(__("Rejected Warehouse and Accepted Warehouse cannot be same.")); + } + frappe .call({ method: "erpnext.stock.doctype.serial_and_batch_bundle.serial_and_batch_bundle.add_serial_batch_ledgers", @@ -701,5 +711,8 @@ erpnext.SerialBatchPackageSelector = class SerialNoBatchBundleUpdate { }); this.dialog.fields_dict.entries.grid.refresh(); + if (this.dialog.fields_dict.entries.df.data?.length) { + this.dialog.set_value("enter_manually", 0); + } } }; 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 62f95f5b2e8..94ec8675db8 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 @@ -1308,8 +1308,12 @@ def add_serial_batch_ledgers(entries, child_row, doc, warehouse, do_not_save=Fal 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): - sb_doc = update_serial_batch_no_ledgers(entries, child_row, parent_doc, warehouse) + bundle = child_row.serial_and_batch_bundle + if child_row.get("is_rejected"): + bundle = child_row.rejected_serial_and_batch_bundle + + if frappe.db.exists("Serial and Batch Bundle", bundle): + sb_doc = update_serial_batch_no_ledgers(bundle, entries, child_row, parent_doc, warehouse) else: sb_doc = create_serial_batch_no_ledgers( entries, child_row, parent_doc, warehouse, do_not_save=do_not_save @@ -1412,8 +1416,8 @@ def get_type_of_transaction(parent_doc, child_row): return type_of_transaction -def update_serial_batch_no_ledgers(entries, child_row, parent_doc, warehouse=None) -> object: - doc = frappe.get_doc("Serial and Batch Bundle", child_row.serial_and_batch_bundle) +def update_serial_batch_no_ledgers(bundle, entries, child_row, parent_doc, warehouse=None) -> object: + doc = frappe.get_doc("Serial and Batch Bundle", bundle) doc.voucher_detail_no = child_row.name doc.posting_date = parent_doc.posting_date doc.posting_time = parent_doc.posting_time From 355ba2f6324c14de3adfdae398089d7c11903347 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 9 Oct 2024 13:38:43 +0530 Subject: [PATCH 0235/1614] fix: the purchase receipt trends and delivery note trends report (backport #43585) (#43587) * fix: fix the purchase receipt trends and delivery note trends report (cherry picked from commit 2e9dda1588533d425ec3b22b089fcafebb17856d) * fix: trends date filter issue --formatter (cherry picked from commit b3e4463a4f53c8949b165374d2d70e135c07b1e5) --------- Co-authored-by: Vishv-silveroak <108357657+Vishv-024@users.noreply.github.com> Co-authored-by: Nihantra C. Patel <141945075+Nihantra-Patel@users.noreply.github.com> --- erpnext/controllers/trends.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/controllers/trends.py b/erpnext/controllers/trends.py index 7f07466b3bc..24d11e6050a 100644 --- a/erpnext/controllers/trends.py +++ b/erpnext/controllers/trends.py @@ -69,7 +69,7 @@ def get_data(filters, conditions): "Delivery Note", ]: posting_date = "t1.posting_date" - if filters.period_based_on: + if filters.period_based_on and conditions.get("trans") in ["Sales Invoice", "Purchase Invoice"]: posting_date = "t1." + filters.period_based_on if conditions["based_on_select"] in ["t1.project,", "t2.project,"]: @@ -224,7 +224,7 @@ def period_wise_columns_query(filters, trans): if trans in ["Purchase Receipt", "Delivery Note", "Purchase Invoice", "Sales Invoice"]: trans_date = "posting_date" - if filters.period_based_on: + if filters.period_based_on and trans in ["Purchase Invoice", "Sales Invoice"]: trans_date = filters.period_based_on else: trans_date = "transaction_date" From 9e109acec79823fa9bda46b4aeaf2909b941883c Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 9 Oct 2024 13:43:02 +0530 Subject: [PATCH 0236/1614] fix: allow to change the batch in the subcontracting receipt (backport #43584) (#43588) fix: allow to change the batch in the subcontracting receipt (#43584) (cherry picked from commit fc67867a60db9d89752f395301b55322c25d8eaa) Co-authored-by: rohitwaghchaure --- .../controllers/subcontracting_controller.py | 64 +++++++++++++------ .../subcontracting_receipt.js | 12 ++-- .../subcontracting_receipt.py | 9 ++- .../test_subcontracting_receipt.py | 60 +++++++++++++++++ 4 files changed, 120 insertions(+), 25 deletions(-) diff --git a/erpnext/controllers/subcontracting_controller.py b/erpnext/controllers/subcontracting_controller.py index a6727ef8826..f6f6742cc87 100644 --- a/erpnext/controllers/subcontracting_controller.py +++ b/erpnext/controllers/subcontracting_controller.py @@ -576,30 +576,56 @@ class SubcontractingController(StockController): self.__set_batch_nos(bom_item, item_row, rm_obj, qty) if self.doctype == "Subcontracting Receipt" and not use_serial_batch_fields: - args = frappe._dict( - { - "item_code": rm_obj.rm_item_code, - "warehouse": self.supplier_warehouse, - "posting_date": self.posting_date, - "posting_time": self.posting_time, - "qty": -1 * flt(rm_obj.consumed_qty), - "actual_qty": -1 * flt(rm_obj.consumed_qty), - "voucher_type": self.doctype, - "voucher_no": self.name, - "voucher_detail_no": item_row.name, - "company": self.company, - "allow_zero_valuation": 1, - } - ) - rm_obj.serial_and_batch_bundle = self.__set_serial_and_batch_bundle( item_row, rm_obj, rm_obj.consumed_qty ) - if rm_obj.serial_and_batch_bundle: - args["serial_and_batch_bundle"] = rm_obj.serial_and_batch_bundle + self.set_rate_for_supplied_items(rm_obj, item_row) - rm_obj.rate = get_incoming_rate(args) + def update_rate_for_supplied_items(self): + if self.doctype != "Subcontracting Receipt": + return + + for row in self.supplied_items: + item_row = None + if row.reference_name: + item_row = self.get_item_row(row.reference_name) + + if not item_row: + continue + + self.set_rate_for_supplied_items(row, item_row) + + def get_item_row(self, reference_name): + for item in self.items: + if item.name == reference_name: + return item + + def set_rate_for_supplied_items(self, rm_obj, item_row): + args = frappe._dict( + { + "item_code": rm_obj.rm_item_code, + "warehouse": self.supplier_warehouse, + "posting_date": self.posting_date, + "posting_time": self.posting_time, + "qty": -1 * flt(rm_obj.consumed_qty), + "actual_qty": -1 * flt(rm_obj.consumed_qty), + "voucher_type": self.doctype, + "voucher_no": self.name, + "voucher_detail_no": item_row.name, + "company": self.company, + "allow_zero_valuation": 1, + } + ) + + if rm_obj.serial_and_batch_bundle: + args["serial_and_batch_bundle"] = rm_obj.serial_and_batch_bundle + + if rm_obj.use_serial_batch_fields: + args["batch_no"] = rm_obj.batch_no + args["serial_no"] = rm_obj.serial_no + + rm_obj.rate = get_incoming_rate(args) def __set_batch_nos(self, bom_item, item_row, rm_obj, qty): key = (rm_obj.rm_item_code, item_row.item_code, item_row.get(self.subcontract_data.order_field)) diff --git a/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.js b/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.js index 83113a223c2..2aaf8a8adcd 100644 --- a/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.js +++ b/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.js @@ -249,11 +249,15 @@ frappe.ui.form.on("Subcontracting Receipt", { }); frm.set_query("batch_no", "supplied_items", (doc, cdt, cdn) => { - var row = locals[cdt][cdn]; + let row = locals[cdt][cdn]; + let filters = { + item_code: row.rm_item_code, + warehouse: doc.supplier_warehouse, + }; + return { - filters: { - item: row.rm_item_code, - }, + query: "erpnext.controllers.queries.get_batch_no", + filters: filters, }; }); diff --git a/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.py b/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.py index 48203167187..db912514988 100644 --- a/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.py +++ b/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.py @@ -237,9 +237,14 @@ class SubcontractingReceipt(SubcontractingController): frappe.db.get_single_value("Buying Settings", "backflush_raw_materials_of_subcontract_based_on") == "BOM" and self.supplied_items - and not any(item.serial_and_batch_bundle for item in self.supplied_items) ): - self.supplied_items = [] + if not any( + item.serial_and_batch_bundle or item.batch_no or item.serial_no + for item in self.supplied_items + ): + self.supplied_items = [] + else: + self.update_rate_for_supplied_items() @frappe.whitelist() def get_scrap_items(self, recalculate_rate=False): diff --git a/erpnext/subcontracting/doctype/subcontracting_receipt/test_subcontracting_receipt.py b/erpnext/subcontracting/doctype/subcontracting_receipt/test_subcontracting_receipt.py index 8ff5c8f27b0..27ad7dbebdf 100644 --- a/erpnext/subcontracting/doctype/subcontracting_receipt/test_subcontracting_receipt.py +++ b/erpnext/subcontracting/doctype/subcontracting_receipt/test_subcontracting_receipt.py @@ -1361,6 +1361,66 @@ class TestSubcontractingReceipt(FrappeTestCase): frappe.db.set_single_value("Stock Settings", "use_serial_batch_fields", 1) + def test_change_batch_for_raw_materials(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 + + bom = make_bom(item=fg_item, raw_materials=[rm_item1]) + second_batch_no = None + for row in bom.items: + se = make_stock_entry( + item_code=row.item_code, + qty=1, + target="_Test Warehouse 1 - _TC", + rate=300, + ) + + se.reload() + se1 = make_stock_entry( + item_code=row.item_code, + qty=1, + target="_Test Warehouse 1 - _TC", + rate=300, + ) + + se1.reload() + + second_batch_no = get_batch_from_bundle(se1.items[0].serial_and_batch_bundle) + + 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) + scr = make_subcontracting_receipt(sco.name) + scr.save() + scr.reload() + + scr.supplied_items[0].batch_no = second_batch_no + scr.supplied_items[0].use_serial_batch_fields = 1 + scr.submit() + scr.reload() + + batch_no = get_batch_from_bundle(scr.supplied_items[0].serial_and_batch_bundle) + self.assertEqual(batch_no, second_batch_no) + self.assertEqual(scr.items[0].rm_cost_per_qty, 300) + self.assertEqual(scr.items[0].service_cost_per_qty, 100) + def make_return_subcontracting_receipt(**args): args = frappe._dict(args) From 029021f035b31768acfb94386219e6602cbcbc46 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 9 Oct 2024 15:41:21 +0530 Subject: [PATCH 0237/1614] fix: production plan bom error (backport #43591) (#43594) fix: production plan bom error (#43591) (cherry picked from commit ab171326f337887ce323ad073e0a1882ed19c32d) Co-authored-by: rohitwaghchaure --- .../production_plan/production_plan.js | 2 +- .../production_plan/production_plan.py | 41 ++++++++++++++++--- 2 files changed, 36 insertions(+), 7 deletions(-) diff --git a/erpnext/manufacturing/doctype/production_plan/production_plan.js b/erpnext/manufacturing/doctype/production_plan/production_plan.js index 5b4ef233926..aba213ebca4 100644 --- a/erpnext/manufacturing/doctype/production_plan/production_plan.js +++ b/erpnext/manufacturing/doctype/production_plan/production_plan.js @@ -277,7 +277,7 @@ frappe.ui.form.on("Production Plan", { frm.clear_table("prod_plan_references"); frappe.call({ - method: "get_items", + method: "combine_so_items", freeze: true, doc: frm.doc, callback: function () { diff --git a/erpnext/manufacturing/doctype/production_plan/production_plan.py b/erpnext/manufacturing/doctype/production_plan/production_plan.py index 7d3aa000c87..3f82a75d302 100644 --- a/erpnext/manufacturing/doctype/production_plan/production_plan.py +++ b/erpnext/manufacturing/doctype/production_plan/production_plan.py @@ -269,6 +269,31 @@ class ProductionPlan(Document): {"material_request": data.name, "material_request_date": data.transaction_date}, ) + @frappe.whitelist() + def combine_so_items(self): + if self.combine_items and self.po_items and len(self.po_items) > 0: + items = [] + for row in self.po_items: + items.append( + frappe._dict( + { + "parent": row.sales_order, + "item_code": row.item_code, + "warehouse": row.warehouse, + "qty": row.pending_qty, + "pending_qty": row.pending_qty, + "conversion_factor": 1.0, + "description": row.description, + "bom_no": row.bom_no, + } + ) + ) + + self.set("po_items", []) + self.add_items(items) + else: + self.get_items() + @frappe.whitelist() def get_items(self): self.set("po_items", []) @@ -435,24 +460,28 @@ class ProductionPlan(Document): item_details = get_item_details(data.item_code, throw=False) if self.combine_items: - if item_details.bom_no in refs: - refs[item_details.bom_no]["so_details"].append( + bom_no = item_details.bom_no + if data.get("bom_no"): + bom_no = data.get("bom_no") + + if bom_no in refs: + refs[bom_no]["so_details"].append( {"sales_order": data.parent, "sales_order_item": data.name, "qty": data.pending_qty} ) - refs[item_details.bom_no]["qty"] += data.pending_qty + refs[bom_no]["qty"] += data.pending_qty continue else: - refs[item_details.bom_no] = { + refs[bom_no] = { "qty": data.pending_qty, "po_item_ref": data.name, "so_details": [], } - refs[item_details.bom_no]["so_details"].append( + refs[bom_no]["so_details"].append( {"sales_order": data.parent, "sales_order_item": data.name, "qty": data.pending_qty} ) - bom_no = data.bom_no or item_details and item_details.bom_no or "" + bom_no = data.bom_no or item_details and item_details.get("bom_no") or "" if not bom_no: continue From 120b481c4a9038c832d090f3a03a1fd7d5e2a1c3 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 9 Oct 2024 15:41:38 +0530 Subject: [PATCH 0238/1614] fix: make LCV button not working for PI and PR (backport #43592) (#43593) fix: make LCV button not working for PI and PR (#43592) (cherry picked from commit 48a12e72139e12af4bf80c3c8dce0fef8069fda0) Co-authored-by: rohitwaghchaure --- .../purchase_invoice/purchase_invoice.js | 47 ++++++++++++------- .../purchase_receipt/purchase_receipt.js | 43 ++++++++++------- .../purchase_receipt/purchase_receipt.py | 23 +++++++++ 3 files changed, 80 insertions(+), 33 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js index 2d5cbb9e6c3..c78db5b86d6 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js @@ -561,11 +561,12 @@ frappe.ui.form.on("Purchase Invoice", { frm.custom_make_buttons = { "Purchase Invoice": "Return / Debit Note", "Payment Entry": "Payment", - "Landed Cost Voucher": function () { - frm.trigger("create_landed_cost_voucher"); - }, }; + if (frm.doc.update_stock) { + frm.custom_make_buttons["Landed Cost Voucher"] = "Landed Cost Voucher"; + } + frm.set_query("additional_discount_account", function () { return { filters: { @@ -607,20 +608,6 @@ frappe.ui.form.on("Purchase Invoice", { }); }, - create_landed_cost_voucher: function (frm) { - let lcv = frappe.model.get_new_doc("Landed Cost Voucher"); - lcv.company = frm.doc.company; - - let lcv_receipt = frappe.model.get_new_doc("Landed Cost Purchase Invoice"); - lcv_receipt.receipt_document_type = "Purchase Invoice"; - lcv_receipt.receipt_document = frm.doc.name; - lcv_receipt.supplier = frm.doc.supplier; - lcv_receipt.grand_total = frm.doc.grand_total; - lcv.purchase_receipts = [lcv_receipt]; - - frappe.set_route("Form", lcv.doctype, lcv.name); - }, - add_custom_buttons: function (frm) { if (frm.doc.docstatus == 1 && frm.doc.per_received < 100) { frm.add_custom_button( @@ -645,6 +632,32 @@ frappe.ui.form.on("Purchase Invoice", { __("View") ); } + + if (frm.doc.docstatus === 1 && frm.doc.update_stock) { + frm.add_custom_button( + __("Landed Cost Voucher"), + () => { + frm.events.make_lcv(frm); + }, + __("Create") + ); + } + }, + + make_lcv(frm) { + frappe.call({ + method: "erpnext.stock.doctype.purchase_receipt.purchase_receipt.make_lcv", + args: { + doctype: frm.doc.doctype, + docname: frm.doc.name, + }, + callback: (r) => { + if (r.message) { + var doc = frappe.model.sync(r.message); + frappe.set_route("Form", doc[0].doctype, doc[0].name); + } + }, + }); }, onload: function (frm) { diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js index bfac4381a06..bcecf8be14d 100644 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js @@ -11,25 +11,10 @@ erpnext.buying.setup_buying_controller(); frappe.ui.form.on("Purchase Receipt", { setup: (frm) => { - frm.make_methods = { - "Landed Cost Voucher": () => { - let lcv = frappe.model.get_new_doc("Landed Cost Voucher"); - lcv.company = frm.doc.company; - - let lcv_receipt = frappe.model.get_new_doc("Landed Cost Purchase Receipt"); - lcv_receipt.receipt_document_type = "Purchase Receipt"; - lcv_receipt.receipt_document = frm.doc.name; - lcv_receipt.supplier = frm.doc.supplier; - lcv_receipt.grand_total = frm.doc.grand_total; - lcv.purchase_receipts = [lcv_receipt]; - - frappe.set_route("Form", lcv.doctype, lcv.name); - }, - }; - frm.custom_make_buttons = { "Stock Entry": "Return", "Purchase Invoice": "Purchase Invoice", + "Landed Cost Voucher": "Landed Cost Voucher", }; frm.set_query("expense_account", "items", function () { @@ -114,9 +99,35 @@ frappe.ui.form.on("Purchase Receipt", { } } + if (frm.doc.docstatus === 1) { + frm.add_custom_button( + __("Landed Cost Voucher"), + () => { + frm.events.make_lcv(frm); + }, + __("Create") + ); + } + frm.events.add_custom_buttons(frm); }, + make_lcv(frm) { + frappe.call({ + method: "erpnext.stock.doctype.purchase_receipt.purchase_receipt.make_lcv", + args: { + doctype: frm.doc.doctype, + docname: frm.doc.name, + }, + callback: (r) => { + if (r.message) { + var doc = frappe.model.sync(r.message); + frappe.set_route("Form", doc[0].doctype, doc[0].name); + } + }, + }); + }, + add_custom_buttons: function (frm) { if (frm.doc.docstatus == 0) { frm.add_custom_button( diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py index 8b046203eee..228bc35693b 100644 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py @@ -1370,3 +1370,26 @@ def get_item_account_wise_additional_cost(purchase_document): @erpnext.allow_regional def update_regional_gl_entries(gl_list, doc): return + + +@frappe.whitelist() +def make_lcv(doctype, docname): + landed_cost_voucher = frappe.new_doc("Landed Cost Voucher") + + details = frappe.db.get_value(doctype, docname, ["supplier", "company", "base_grand_total"], as_dict=1) + + landed_cost_voucher.company = details.company + + landed_cost_voucher.append( + "purchase_receipts", + { + "receipt_document_type": doctype, + "receipt_document": docname, + "grand_total": details.base_grand_total, + "supplier": details.supplier, + }, + ) + + landed_cost_voucher.get_items_from_purchase_receipts() + + return landed_cost_voucher.as_dict() From d46cf46375e48d41cc10284305b9ca1b43a6c828 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Wed, 9 Oct 2024 12:02:42 +0000 Subject: [PATCH 0239/1614] chore(release): Bumped to Version 15.38.1 ## [15.38.1](https://github.com/frappe/erpnext/compare/v15.38.0...v15.38.1) (2024-10-09) ### Bug Fixes * 'NoneType' object has no attribute 'has_serial_no' (backport [#43514](https://github.com/frappe/erpnext/issues/43514)) ([#43574](https://github.com/frappe/erpnext/issues/43574)) ([60508a9](https://github.com/frappe/erpnext/commit/60508a97061ad910d7c9324ee1da7be64d326884)) * [#42014](https://github.com/frappe/erpnext/issues/42014) --resolve conflicts ([85d7405](https://github.com/frappe/erpnext/commit/85d74050e1b35126e4c9b2d4a7cb1bc3c27ae835)) * Accepted and Rejected warehouse cannot be same (backport [#43568](https://github.com/frappe/erpnext/issues/43568)) ([#43573](https://github.com/frappe/erpnext/issues/43573)) ([83ce3dd](https://github.com/frappe/erpnext/commit/83ce3dd91598b8c2aad65e7f934c16131a9dbdc7)) * add include closed orders option in so/po trends report v15 ([5660e8b](https://github.com/frappe/erpnext/commit/5660e8b26dc5cba40b18bbd532638ac52f84451a)) * add parenttype condition for item table in Purchase Register Report ([8ce81a0](https://github.com/frappe/erpnext/commit/8ce81a058a074ecf11c95137e3c14e30480f241e)) * Add removed test code `https://github.com/frappe/erpnext/commit/b41f10c1b98b01a181a6f9dbdf2531b108dc3bae` ([30fd11f](https://github.com/frappe/erpnext/commit/30fd11f138ce468f5c01f3c5a265eca071293b30)) * allow to change the batch in the subcontracting receipt (backport [#43584](https://github.com/frappe/erpnext/issues/43584)) ([#43588](https://github.com/frappe/erpnext/issues/43588)) ([9e109ac](https://github.com/frappe/erpnext/commit/9e109acec79823fa9bda46b4aeaf2909b941883c)) * create Account Closing Balance even though there are no transaction in period ([d6f70f5](https://github.com/frappe/erpnext/commit/d6f70f533acd24ddb1440cbced74336f59e109e5)) * creation of contact, customer, opportunity, quotation and prospect from lead ([ef10c4e](https://github.com/frappe/erpnext/commit/ef10c4ea4f969a0c6ef12f3733324ae43e689675)) * creation of contact, customer, opportunity, quotation and prospect from lead --prettier ([5a2a404](https://github.com/frappe/erpnext/commit/5a2a404a50ebb40507abbd34dc6a1975db4940ca)) * deduct advances adjusted for threshold check for tcs ([6decb7c](https://github.com/frappe/erpnext/commit/6decb7cc34a02c1bf8d33e019ead5cafc3f65363)) * do not include advances for tds vouchers ([ee8485a](https://github.com/frappe/erpnext/commit/ee8485a54ac0439e9cf3a6c8b9b7e0a02f3ae53f)) * frappe dependency update ([0a70b3f](https://github.com/frappe/erpnext/commit/0a70b3ffccf9367eb0a650b18e78fbc3cf793f90)) * include parent item group in query ([55464c7](https://github.com/frappe/erpnext/commit/55464c79c4a068146b7254f57c9575b44c3966ac)) * make LCV button not working for PI and PR (backport [#43592](https://github.com/frappe/erpnext/issues/43592)) ([#43593](https://github.com/frappe/erpnext/issues/43593)) ([120b481](https://github.com/frappe/erpnext/commit/120b481c4a9038c832d090f3a03a1fd7d5e2a1c3)) * multiple issues in Payment Request ([#42427](https://github.com/frappe/erpnext/issues/42427)) ([ea69ba7](https://github.com/frappe/erpnext/commit/ea69ba7cd8967af626d8efee1c4575d980533923)) * production plan bom error (backport [#43591](https://github.com/frappe/erpnext/issues/43591)) ([#43594](https://github.com/frappe/erpnext/issues/43594)) ([029021f](https://github.com/frappe/erpnext/commit/029021f035b31768acfb94386219e6602cbcbc46)) * read only filters in multidialog fields (backport [#43503](https://github.com/frappe/erpnext/issues/43503)) ([#43513](https://github.com/frappe/erpnext/issues/43513)) ([d69a974](https://github.com/frappe/erpnext/commit/d69a974a4de50e0208127ea3b078acbd0fa0364d)) * Remove `advance_payment_status` uses ([907e3af](https://github.com/frappe/erpnext/commit/907e3af1b0f5a08617f637573f3abc3e3eb56253)) * Remove unreference method ([770bc1c](https://github.com/frappe/erpnext/commit/770bc1c293b106c1bb3ec5077ce73c068973d179)) * Remove unused field ([e785928](https://github.com/frappe/erpnext/commit/e785928c0fcb5e2549302ea77217fe88f9797717)) * Remove unused function `get_paid_amount_against_order` ([7591662](https://github.com/frappe/erpnext/commit/75916629c857465a1a6efadd2fd0c77624c93cf5)) * Separate `on_submit` and `before_submit` of PR ([dbd7b83](https://github.com/frappe/erpnext/commit/dbd7b83204d1e36790d838a5c96c55d4d93464bd)) * the purchase receipt trends and delivery note trends report (backport [#43585](https://github.com/frappe/erpnext/issues/43585)) ([#43587](https://github.com/frappe/erpnext/issues/43587)) ([355ba2f](https://github.com/frappe/erpnext/commit/355ba2f6324c14de3adfdae398089d7c11903347)) * Unknown column 'serial_no' in 'field list' (backport [#43515](https://github.com/frappe/erpnext/issues/43515)) ([#43569](https://github.com/frappe/erpnext/issues/43569)) ([fc9a3c0](https://github.com/frappe/erpnext/commit/fc9a3c0c92cf2537e0b871c8a59a927517150d7f)) * Update Values before `after_mapping` hook is called ([#42682](https://github.com/frappe/erpnext/issues/42682)) ([6770610](https://github.com/frappe/erpnext/commit/6770610c6d62a2dcddf95221ed85ee37c5a56625)) * validation for corrective job card (backport [#43555](https://github.com/frappe/erpnext/issues/43555)) ([#43558](https://github.com/frappe/erpnext/issues/43558)) ([cf0fa0d](https://github.com/frappe/erpnext/commit/cf0fa0db7b7c2a9a5dbd3802ddec1db757afeb24)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index bbb02e2ed0d..784ac134a56 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.38.0" +__version__ = "15.38.1" def get_default_company(user=None): From d604b12d5111e9dd5e0fcd3bc35f06c87284c349 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 11 Oct 2024 16:22:22 +0530 Subject: [PATCH 0240/1614] fix: show incorrect entries filter in Stock Ledger Invariant Check report (backport #43619) (#43622) fix: show incorrect entries filter in Stock Ledger Invariant Check report (#43619) fix: show incorrect entry filter in Stock Ledger Invariant Check report (cherry picked from commit 8beee1982f7e04cba7a4887d74ac77469a9648cb) Co-authored-by: rohitwaghchaure --- .../stock_ledger_invariant_check.js | 6 ++++ .../stock_ledger_invariant_check.py | 29 +++++++++++++++++-- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/erpnext/stock/report/stock_ledger_invariant_check/stock_ledger_invariant_check.js b/erpnext/stock/report/stock_ledger_invariant_check/stock_ledger_invariant_check.js index 1b05d3a65e4..df65654e36b 100644 --- a/erpnext/stock/report/stock_ledger_invariant_check/stock_ledger_invariant_check.js +++ b/erpnext/stock/report/stock_ledger_invariant_check/stock_ledger_invariant_check.js @@ -32,6 +32,12 @@ frappe.query_reports["Stock Ledger Invariant Check"] = { mandatory: 1, options: "Warehouse", }, + { + fieldname: "show_incorrect_entries", + fieldtype: "Check", + label: "Show Incorrect Entries", + default: 0, + }, ], formatter(value, row, column, data, default_formatter) { diff --git a/erpnext/stock/report/stock_ledger_invariant_check/stock_ledger_invariant_check.py b/erpnext/stock/report/stock_ledger_invariant_check/stock_ledger_invariant_check.py index 6fc109f1c6e..5cf653e3851 100644 --- a/erpnext/stock/report/stock_ledger_invariant_check/stock_ledger_invariant_check.py +++ b/erpnext/stock/report/stock_ledger_invariant_check/stock_ledger_invariant_check.py @@ -5,7 +5,7 @@ import json import frappe from frappe import _ -from frappe.utils import get_link_to_form, parse_json +from frappe.utils import cint, flt, get_link_to_form, parse_json SLE_FIELDS = ( "name", @@ -36,7 +36,7 @@ def execute(filters=None): def get_data(filters): sles = get_stock_ledger_entries(filters) - return add_invariant_check_fields(sles) + return add_invariant_check_fields(sles, filters) def get_stock_ledger_entries(filters): @@ -48,9 +48,12 @@ def get_stock_ledger_entries(filters): ) -def add_invariant_check_fields(sles): +def add_invariant_check_fields(sles, filters): balance_qty = 0.0 balance_stock_value = 0.0 + + incorrect_idx = 0 + precision = frappe.get_precision("Stock Ledger Entry", "actual_qty") for idx, sle in enumerate(sles): queue = json.loads(sle.stock_queue) if sle.stock_queue else [] @@ -95,6 +98,12 @@ def add_invariant_check_fields(sles): ) sle.diff_value_diff = sle.stock_value_from_diff - sle.stock_value + if not incorrect_idx and filters.get("show_incorrect_entries"): + if is_sle_has_correct_data(sle, precision): + continue + else: + incorrect_idx = idx + if idx > 0: sle.fifo_stock_diff = sle.fifo_stock_value - sles[idx - 1].fifo_stock_value sle.fifo_difference_diff = sle.fifo_stock_diff - sle.stock_value_difference @@ -104,9 +113,23 @@ def add_invariant_check_fields(sles): "Batch", sle.batch_no, "use_batchwise_valuation", cache=True ) + if filters.get("show_incorrect_entries"): + if incorrect_idx > 0: + sles = sles[cint(incorrect_idx) - 1 :] + + return [] + return sles +def is_sle_has_correct_data(sle, precision): + if flt(sle.difference_in_qty, precision) != 0.0 or flt(sle.diff_value_diff, precision) != 0: + print(flt(sle.difference_in_qty, precision), flt(sle.diff_value_diff, precision)) + return False + + return True + + def get_columns(): return [ { From b72906a7a1de57d9344384226cf8e9061ab47cfa Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Sat, 12 Oct 2024 14:52:35 +0530 Subject: [PATCH 0241/1614] fix: don't update reference to SI / PI on advances (cherry picked from commit b409f7462070f301469e958be1764b90352298b6) --- .../doctype/payment_entry/payment_entry.py | 16 ++++++++++++++-- erpnext/accounts/utils.py | 11 +++++++++-- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index 9424d722cf5..34179b0b104 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -1211,11 +1211,23 @@ class PaymentEntry(AccountsController): { dr_or_cr: allocated_amount_in_company_currency, dr_or_cr + "_in_account_currency": d.allocated_amount, - "against_voucher_type": d.reference_doctype, - "against_voucher": d.reference_name, "cost_center": cost_center, } ) + + if self.book_advance_payments_in_separate_party_account and d.reference_doctype in [ + "Sales Order", + "Purchase Order", + ]: + gle.update( + { + "against_voucher_type": d.reference_doctype, + "against_voucher": d.reference_name, + } + ) + else: + gle.update({"against_voucher_type": self.doctype, "against_voucher": self.name}) + gl_entries.append(gle) if self.unallocated_amount: diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py index 8e47ddc3652..cf25b201129 100644 --- a/erpnext/accounts/utils.py +++ b/erpnext/accounts/utils.py @@ -476,8 +476,12 @@ def reconcile_against_document( # For payments with `Advance` in separate account feature enabled, only new ledger entries are posted for each reference. # No need to cancel/delete payment ledger entries + repost_whole_ledger = any([x.voucher_detail_no for x in entries]) if voucher_type == "Payment Entry" and doc.book_advance_payments_in_separate_party_account: - doc.make_advance_gl_entries(cancel=1) + if repost_whole_ledger: + doc.make_gl_entries(cancel=1) + else: + doc.make_advance_gl_entries(cancel=1) else: _delete_pl_entries(voucher_type, voucher_no) @@ -513,7 +517,10 @@ def reconcile_against_document( if voucher_type == "Payment Entry" and doc.book_advance_payments_in_separate_party_account: # both ledgers must be posted to for `Advance` in separate account feature # TODO: find a more efficient way post only for the new linked vouchers - doc.make_advance_gl_entries() + if repost_whole_ledger: + doc.make_gl_entries() + else: + doc.make_advance_gl_entries() else: gl_map = doc.build_gl_map() # Make sure there is no overallocation From ca0a962870c2be7007d6453f851b5eee571f4e73 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Sat, 12 Oct 2024 15:29:48 +0530 Subject: [PATCH 0242/1614] refactor: reference update logic in advance (cherry picked from commit a112581acd77b41f9140b0cee082db3b00cd1e22) --- .../doctype/payment_entry/payment_entry.py | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index 34179b0b104..f031bda045e 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -1215,18 +1215,26 @@ class PaymentEntry(AccountsController): } ) - if self.book_advance_payments_in_separate_party_account and d.reference_doctype in [ - "Sales Order", - "Purchase Order", - ]: + if self.book_advance_payments_in_separate_party_account: + if d.reference_doctype in [ + "Sales Order", + "Purchase Order", + ]: + gle.update( + { + "against_voucher_type": d.reference_doctype, + "against_voucher": d.reference_name, + } + ) + else: + gle.update({"against_voucher_type": self.doctype, "against_voucher": self.name}) + else: gle.update( { "against_voucher_type": d.reference_doctype, "against_voucher": d.reference_name, } ) - else: - gle.update({"against_voucher_type": self.doctype, "against_voucher": self.name}) gl_entries.append(gle) From 5ce2d73692f09b70784da47db52e02c7eb773c79 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Sat, 12 Oct 2024 15:54:21 +0530 Subject: [PATCH 0243/1614] refactor: use hooks to identify advance doctypes (cherry picked from commit e7bb960bb557a0cc05570b248962ba519a3278db) --- erpnext/accounts/doctype/payment_entry/payment_entry.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index f031bda045e..eddcdf56fb2 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -1166,6 +1166,10 @@ class PaymentEntry(AccountsController): if not self.party_account: return + advance_payment_doctypes = frappe.get_hooks("advance_payment_receivable_doctypes") + frappe.get_hooks( + "advance_payment_payable_doctypes" + ) + if self.payment_type == "Receive": against_account = self.paid_to else: @@ -1216,10 +1220,7 @@ class PaymentEntry(AccountsController): ) if self.book_advance_payments_in_separate_party_account: - if d.reference_doctype in [ - "Sales Order", - "Purchase Order", - ]: + if d.reference_doctype in advance_payment_doctypes: gle.update( { "against_voucher_type": d.reference_doctype, From 9c26093a51effc459a7f5f7520ec176423b028c5 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Sat, 12 Oct 2024 15:55:51 +0530 Subject: [PATCH 0244/1614] refactor(test): utility methods for enabling advance in separate acc (cherry picked from commit a21a406d0409c28c0880b91577343f24db6e510a) # Conflicts: # erpnext/accounts/test/accounts_mixin.py --- erpnext/accounts/test/accounts_mixin.py | 41 +++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/erpnext/accounts/test/accounts_mixin.py b/erpnext/accounts/test/accounts_mixin.py index d503f7bc4af..b67e190f431 100644 --- a/erpnext/accounts/test/accounts_mixin.py +++ b/erpnext/accounts/test/accounts_mixin.py @@ -87,6 +87,22 @@ class AccountsTestMixin: "parent_account": "Bank Accounts - " + abbr, } ), + frappe._dict( + { + "attribute_name": "advance_received", + "account_name": "Advance Received", + "parent_account": "Current Liabilities - " + abbr, + "account_type": "Receivable", + } + ), + frappe._dict( + { + "attribute_name": "advance_paid", + "account_name": "Advance Paid", + "parent_account": "Current Assets - " + abbr, + "account_type": "Payable", + } + ), ] for acc in other_accounts: acc_name = acc.account_name + " - " + abbr @@ -101,9 +117,34 @@ class AccountsTestMixin: "company": self.company, } ) + new_acc.account_type = acc.get("account_type", None) new_acc.save() setattr(self, acc.attribute_name, new_acc.name) +<<<<<<< HEAD +======= + self.identify_default_warehouses() + + def enable_advance_as_liability(self): + company = frappe.get_doc("Company", self.company) + company.book_advance_payments_in_separate_party_account = True + company.default_advance_received_account = self.advance_received + company.default_advance_paid_account = self.advance_paid + company.save() + + def disable_advance_as_liability(self): + company = frappe.get_doc("Company", self.company) + company.book_advance_payments_in_separate_party_account = False + company.default_advance_paid_account = company.default_advance_received_account = None + company.save() + + def identify_default_warehouses(self): + for w in frappe.db.get_all( + "Warehouse", filters={"company": self.company}, fields=["name", "warehouse_name"] + ): + setattr(self, "warehouse_" + w.warehouse_name.lower().strip().replace(" ", "_"), w.name) + +>>>>>>> a21a406d04 (refactor(test): utility methods for enabling advance in separate acc) def create_usd_receivable_account(self): account_name = "Debtors USD" if not frappe.db.get_value( From e37a88fdb647afc11e54bd00692ab87027a84c3e Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Sat, 12 Oct 2024 15:56:53 +0530 Subject: [PATCH 0245/1614] test: unreconciliation of individual SO from Advance Payment (cherry picked from commit 8a6978e55000efda874931dcf4a11403bf795e84) --- .../test_unreconcile_payment.py | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/erpnext/accounts/doctype/unreconcile_payment/test_unreconcile_payment.py b/erpnext/accounts/doctype/unreconcile_payment/test_unreconcile_payment.py index 43dfbfaef60..eb5530706b6 100644 --- a/erpnext/accounts/doctype/unreconcile_payment/test_unreconcile_payment.py +++ b/erpnext/accounts/doctype/unreconcile_payment/test_unreconcile_payment.py @@ -363,3 +363,54 @@ class TestUnreconcilePayment(AccountsTestMixin, FrappeTestCase): self.assertEqual(so.advance_paid, 0) self.assertEqual(len(pe.references), 0) self.assertEqual(pe.unallocated_amount, 100) + + def test_06_unreconcile_advance_from_payment_entry(self): + self.enable_advance_as_liability() + so1 = self.create_sales_order() + so2 = self.create_sales_order() + + pe = self.create_payment_entry() + # Allocation payment against Sales Order + pe.paid_amount = 260 + pe.append( + "references", + {"reference_doctype": so1.doctype, "reference_name": so1.name, "allocated_amount": 150}, + ) + pe.append( + "references", + {"reference_doctype": so2.doctype, "reference_name": so2.name, "allocated_amount": 110}, + ) + pe.save().submit() + + # Assert 'Advance Paid' + so1.reload() + self.assertEqual(so1.advance_paid, 150) + so2.reload() + self.assertEqual(so2.advance_paid, 110) + + unreconcile = frappe.get_doc( + { + "doctype": "Unreconcile Payment", + "company": self.company, + "voucher_type": pe.doctype, + "voucher_no": pe.name, + } + ) + unreconcile.add_references() + self.assertEqual(len(unreconcile.allocations), 2) + allocations = [(x.reference_name, x.allocated_amount) for x in unreconcile.allocations] + self.assertListEqual(allocations, [(so1.name, 150), (so2.name, 110)]) + # unreconcile so2 + unreconcile.remove(unreconcile.allocations[0]) + unreconcile.save().submit() + + # Assert 'Advance Paid' + so1.reload() + so2.reload() + pe.reload() + self.assertEqual(so1.advance_paid, 150) + self.assertEqual(so2.advance_paid, 0) + self.assertEqual(len(pe.references), 1) + self.assertEqual(pe.unallocated_amount, 110) + + self.disable_advance_as_liability() From 2c2ca22d1288d2a771e292d5d1fa84dd99194b93 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Sat, 12 Oct 2024 18:12:03 +0530 Subject: [PATCH 0246/1614] test: reconciled Invoice should not showup in tool Scenario should be tested on 'Advance in separate party account' (cherry picked from commit f1ec61c19ec8275804958e4eaf131906a2cffc90) --- .../test_unreconcile_payment.py | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/erpnext/accounts/doctype/unreconcile_payment/test_unreconcile_payment.py b/erpnext/accounts/doctype/unreconcile_payment/test_unreconcile_payment.py index eb5530706b6..13e5294aa78 100644 --- a/erpnext/accounts/doctype/unreconcile_payment/test_unreconcile_payment.py +++ b/erpnext/accounts/doctype/unreconcile_payment/test_unreconcile_payment.py @@ -7,7 +7,9 @@ from frappe.utils import today from erpnext.accounts.doctype.payment_entry.test_payment_entry import create_payment_entry from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice +from erpnext.accounts.party import get_party_account from erpnext.accounts.test.accounts_mixin import AccountsTestMixin +from erpnext.selling.doctype.sales_order.sales_order import make_sales_invoice from erpnext.selling.doctype.sales_order.test_sales_order import make_sales_order @@ -414,3 +416,49 @@ class TestUnreconcilePayment(AccountsTestMixin, FrappeTestCase): self.assertEqual(pe.unallocated_amount, 110) self.disable_advance_as_liability() + + def test_07_adv_from_so_to_invoice(self): + self.enable_advance_as_liability() + so = self.create_sales_order() + pe = self.create_payment_entry() + pe.paid_amount = 1000 + pe.append( + "references", + {"reference_doctype": so.doctype, "reference_name": so.name, "allocated_amount": 1000}, + ) + pe.save().submit() + + # Assert 'Advance Paid' + so.reload() + self.assertEqual(so.advance_paid, 1000) + + si = make_sales_invoice(so.name) + si.insert().submit() + + pr = frappe.get_doc( + { + "doctype": "Payment Reconciliation", + "company": self.company, + "party_type": "Customer", + "party": so.customer, + } + ) + accounts = get_party_account("Customer", so.customer, so.company, True) + pr.receivable_payable_account = accounts[0] + pr.default_advance_account = accounts[1] + pr.get_unreconciled_entries() + self.assertEqual(len(pr.get("invoices")), 1) + self.assertEqual(len(pr.get("payments")), 1) + invoices = [x.as_dict() for x in pr.get("invoices")] + payments = [x.as_dict() for x in pr.get("payments")] + pr.allocate_entries(frappe._dict({"invoices": invoices, "payments": payments})) + pr.reconcile() + + self.assertEqual(len(pr.get("invoices")), 0) + self.assertEqual(len(pr.get("payments")), 0) + + # Assert 'Advance Paid' + so.reload() + self.assertEqual(so.advance_paid, 0) + + self.disable_advance_as_liability() From ae73d9c6216c19db829f32d45cee73ce689813d7 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Sun, 13 Oct 2024 08:08:54 +0530 Subject: [PATCH 0247/1614] chore: better comments for context (cherry picked from commit e7505e92c9b4200d52214d2dc97f7052b2333095) --- .../accounts/doctype/payment_entry/payment_entry.py | 2 ++ erpnext/accounts/utils.py | 10 ++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index eddcdf56fb2..7e3aa25f358 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -1221,6 +1221,7 @@ class PaymentEntry(AccountsController): if self.book_advance_payments_in_separate_party_account: if d.reference_doctype in advance_payment_doctypes: + # Upon reconciliation, whole ledger will be reposted. So, reference to SO/PO is fine gle.update( { "against_voucher_type": d.reference_doctype, @@ -1228,6 +1229,7 @@ class PaymentEntry(AccountsController): } ) else: + # Do not reference Invoices while Advance is in separate party account gle.update({"against_voucher_type": self.doctype, "against_voucher": self.name}) else: gle.update( diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py index cf25b201129..1d75fafc1a9 100644 --- a/erpnext/accounts/utils.py +++ b/erpnext/accounts/utils.py @@ -474,8 +474,8 @@ def reconcile_against_document( doc = frappe.get_doc(voucher_type, voucher_no) frappe.flags.ignore_party_validation = True - # For payments with `Advance` in separate account feature enabled, only new ledger entries are posted for each reference. - # No need to cancel/delete payment ledger entries + # When Advance is allocated from an Order to an Invoice + # whole ledger must be reposted repost_whole_ledger = any([x.voucher_detail_no for x in entries]) if voucher_type == "Payment Entry" and doc.book_advance_payments_in_separate_party_account: if repost_whole_ledger: @@ -515,11 +515,13 @@ def reconcile_against_document( doc = frappe.get_doc(entry.voucher_type, entry.voucher_no) if voucher_type == "Payment Entry" and doc.book_advance_payments_in_separate_party_account: - # both ledgers must be posted to for `Advance` in separate account feature - # TODO: find a more efficient way post only for the new linked vouchers + # When Advance is allocated from an Order to an Invoice + # whole ledger must be reposted if repost_whole_ledger: doc.make_gl_entries() else: + # both ledgers must be posted to for `Advance` in separate account feature + # TODO: find a more efficient way post only for the new linked vouchers doc.make_advance_gl_entries() else: gl_map = doc.build_gl_map() From 361836e7350ec5210979f6cbc9434f69aa0583bc Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Sun, 13 Oct 2024 08:45:15 +0530 Subject: [PATCH 0248/1614] chore: resolve conflict --- erpnext/accounts/test/accounts_mixin.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/erpnext/accounts/test/accounts_mixin.py b/erpnext/accounts/test/accounts_mixin.py index b67e190f431..e526e07c734 100644 --- a/erpnext/accounts/test/accounts_mixin.py +++ b/erpnext/accounts/test/accounts_mixin.py @@ -121,8 +121,6 @@ class AccountsTestMixin: new_acc.save() setattr(self, acc.attribute_name, new_acc.name) -<<<<<<< HEAD -======= self.identify_default_warehouses() def enable_advance_as_liability(self): @@ -144,7 +142,6 @@ class AccountsTestMixin: ): setattr(self, "warehouse_" + w.warehouse_name.lower().strip().replace(" ", "_"), w.name) ->>>>>>> a21a406d04 (refactor(test): utility methods for enabling advance in separate acc) def create_usd_receivable_account(self): account_name = "Debtors USD" if not frappe.db.get_value( From 6265582e53d1cec3b22a6fbb5444ac596d03c88e Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Sun, 13 Oct 2024 09:50:41 +0530 Subject: [PATCH 0249/1614] refactor: use correct hook for identifying advance doctypes --- erpnext/accounts/doctype/payment_entry/payment_entry.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index 7e3aa25f358..7885d825129 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -1166,9 +1166,7 @@ class PaymentEntry(AccountsController): if not self.party_account: return - advance_payment_doctypes = frappe.get_hooks("advance_payment_receivable_doctypes") + frappe.get_hooks( - "advance_payment_payable_doctypes" - ) + advance_payment_doctypes = frappe.get_hooks("advance_payment_doctypes") if self.payment_type == "Receive": against_account = self.paid_to From 8bf8bcf7390296f79432d7a257fa85e095cc6277 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Sat, 12 Oct 2024 14:52:35 +0530 Subject: [PATCH 0250/1614] fix: don't update reference to SI / PI on advances (cherry picked from commit b409f7462070f301469e958be1764b90352298b6) --- .../doctype/payment_entry/payment_entry.py | 16 ++++++++++++++-- erpnext/accounts/utils.py | 11 +++++++++-- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index 9424d722cf5..34179b0b104 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -1211,11 +1211,23 @@ class PaymentEntry(AccountsController): { dr_or_cr: allocated_amount_in_company_currency, dr_or_cr + "_in_account_currency": d.allocated_amount, - "against_voucher_type": d.reference_doctype, - "against_voucher": d.reference_name, "cost_center": cost_center, } ) + + if self.book_advance_payments_in_separate_party_account and d.reference_doctype in [ + "Sales Order", + "Purchase Order", + ]: + gle.update( + { + "against_voucher_type": d.reference_doctype, + "against_voucher": d.reference_name, + } + ) + else: + gle.update({"against_voucher_type": self.doctype, "against_voucher": self.name}) + gl_entries.append(gle) if self.unallocated_amount: diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py index 8e47ddc3652..cf25b201129 100644 --- a/erpnext/accounts/utils.py +++ b/erpnext/accounts/utils.py @@ -476,8 +476,12 @@ def reconcile_against_document( # For payments with `Advance` in separate account feature enabled, only new ledger entries are posted for each reference. # No need to cancel/delete payment ledger entries + repost_whole_ledger = any([x.voucher_detail_no for x in entries]) if voucher_type == "Payment Entry" and doc.book_advance_payments_in_separate_party_account: - doc.make_advance_gl_entries(cancel=1) + if repost_whole_ledger: + doc.make_gl_entries(cancel=1) + else: + doc.make_advance_gl_entries(cancel=1) else: _delete_pl_entries(voucher_type, voucher_no) @@ -513,7 +517,10 @@ def reconcile_against_document( if voucher_type == "Payment Entry" and doc.book_advance_payments_in_separate_party_account: # both ledgers must be posted to for `Advance` in separate account feature # TODO: find a more efficient way post only for the new linked vouchers - doc.make_advance_gl_entries() + if repost_whole_ledger: + doc.make_gl_entries() + else: + doc.make_advance_gl_entries() else: gl_map = doc.build_gl_map() # Make sure there is no overallocation From 6267ab994c79b3ab8828069c760e81538ff73887 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Sat, 12 Oct 2024 15:29:48 +0530 Subject: [PATCH 0251/1614] refactor: reference update logic in advance (cherry picked from commit a112581acd77b41f9140b0cee082db3b00cd1e22) --- .../doctype/payment_entry/payment_entry.py | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index 34179b0b104..f031bda045e 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -1215,18 +1215,26 @@ class PaymentEntry(AccountsController): } ) - if self.book_advance_payments_in_separate_party_account and d.reference_doctype in [ - "Sales Order", - "Purchase Order", - ]: + if self.book_advance_payments_in_separate_party_account: + if d.reference_doctype in [ + "Sales Order", + "Purchase Order", + ]: + gle.update( + { + "against_voucher_type": d.reference_doctype, + "against_voucher": d.reference_name, + } + ) + else: + gle.update({"against_voucher_type": self.doctype, "against_voucher": self.name}) + else: gle.update( { "against_voucher_type": d.reference_doctype, "against_voucher": d.reference_name, } ) - else: - gle.update({"against_voucher_type": self.doctype, "against_voucher": self.name}) gl_entries.append(gle) From 8c115e146b65cebbbf09b3c34090ef37a93ce530 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Sat, 12 Oct 2024 15:54:21 +0530 Subject: [PATCH 0252/1614] refactor: use hooks to identify advance doctypes (cherry picked from commit e7bb960bb557a0cc05570b248962ba519a3278db) --- erpnext/accounts/doctype/payment_entry/payment_entry.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index f031bda045e..eddcdf56fb2 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -1166,6 +1166,10 @@ class PaymentEntry(AccountsController): if not self.party_account: return + advance_payment_doctypes = frappe.get_hooks("advance_payment_receivable_doctypes") + frappe.get_hooks( + "advance_payment_payable_doctypes" + ) + if self.payment_type == "Receive": against_account = self.paid_to else: @@ -1216,10 +1220,7 @@ class PaymentEntry(AccountsController): ) if self.book_advance_payments_in_separate_party_account: - if d.reference_doctype in [ - "Sales Order", - "Purchase Order", - ]: + if d.reference_doctype in advance_payment_doctypes: gle.update( { "against_voucher_type": d.reference_doctype, From e0477cf59f7612276e3d9549522c8fafa53557a1 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Sat, 12 Oct 2024 15:55:51 +0530 Subject: [PATCH 0253/1614] refactor(test): utility methods for enabling advance in separate acc (cherry picked from commit a21a406d0409c28c0880b91577343f24db6e510a) # Conflicts: # erpnext/accounts/test/accounts_mixin.py --- erpnext/accounts/test/accounts_mixin.py | 41 +++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/erpnext/accounts/test/accounts_mixin.py b/erpnext/accounts/test/accounts_mixin.py index d503f7bc4af..b67e190f431 100644 --- a/erpnext/accounts/test/accounts_mixin.py +++ b/erpnext/accounts/test/accounts_mixin.py @@ -87,6 +87,22 @@ class AccountsTestMixin: "parent_account": "Bank Accounts - " + abbr, } ), + frappe._dict( + { + "attribute_name": "advance_received", + "account_name": "Advance Received", + "parent_account": "Current Liabilities - " + abbr, + "account_type": "Receivable", + } + ), + frappe._dict( + { + "attribute_name": "advance_paid", + "account_name": "Advance Paid", + "parent_account": "Current Assets - " + abbr, + "account_type": "Payable", + } + ), ] for acc in other_accounts: acc_name = acc.account_name + " - " + abbr @@ -101,9 +117,34 @@ class AccountsTestMixin: "company": self.company, } ) + new_acc.account_type = acc.get("account_type", None) new_acc.save() setattr(self, acc.attribute_name, new_acc.name) +<<<<<<< HEAD +======= + self.identify_default_warehouses() + + def enable_advance_as_liability(self): + company = frappe.get_doc("Company", self.company) + company.book_advance_payments_in_separate_party_account = True + company.default_advance_received_account = self.advance_received + company.default_advance_paid_account = self.advance_paid + company.save() + + def disable_advance_as_liability(self): + company = frappe.get_doc("Company", self.company) + company.book_advance_payments_in_separate_party_account = False + company.default_advance_paid_account = company.default_advance_received_account = None + company.save() + + def identify_default_warehouses(self): + for w in frappe.db.get_all( + "Warehouse", filters={"company": self.company}, fields=["name", "warehouse_name"] + ): + setattr(self, "warehouse_" + w.warehouse_name.lower().strip().replace(" ", "_"), w.name) + +>>>>>>> a21a406d04 (refactor(test): utility methods for enabling advance in separate acc) def create_usd_receivable_account(self): account_name = "Debtors USD" if not frappe.db.get_value( From e56dd8268b6aa05fc9c6d52924baa0be1747adab Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Sat, 12 Oct 2024 15:56:53 +0530 Subject: [PATCH 0254/1614] test: unreconciliation of individual SO from Advance Payment (cherry picked from commit 8a6978e55000efda874931dcf4a11403bf795e84) --- .../test_unreconcile_payment.py | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/erpnext/accounts/doctype/unreconcile_payment/test_unreconcile_payment.py b/erpnext/accounts/doctype/unreconcile_payment/test_unreconcile_payment.py index 43dfbfaef60..eb5530706b6 100644 --- a/erpnext/accounts/doctype/unreconcile_payment/test_unreconcile_payment.py +++ b/erpnext/accounts/doctype/unreconcile_payment/test_unreconcile_payment.py @@ -363,3 +363,54 @@ class TestUnreconcilePayment(AccountsTestMixin, FrappeTestCase): self.assertEqual(so.advance_paid, 0) self.assertEqual(len(pe.references), 0) self.assertEqual(pe.unallocated_amount, 100) + + def test_06_unreconcile_advance_from_payment_entry(self): + self.enable_advance_as_liability() + so1 = self.create_sales_order() + so2 = self.create_sales_order() + + pe = self.create_payment_entry() + # Allocation payment against Sales Order + pe.paid_amount = 260 + pe.append( + "references", + {"reference_doctype": so1.doctype, "reference_name": so1.name, "allocated_amount": 150}, + ) + pe.append( + "references", + {"reference_doctype": so2.doctype, "reference_name": so2.name, "allocated_amount": 110}, + ) + pe.save().submit() + + # Assert 'Advance Paid' + so1.reload() + self.assertEqual(so1.advance_paid, 150) + so2.reload() + self.assertEqual(so2.advance_paid, 110) + + unreconcile = frappe.get_doc( + { + "doctype": "Unreconcile Payment", + "company": self.company, + "voucher_type": pe.doctype, + "voucher_no": pe.name, + } + ) + unreconcile.add_references() + self.assertEqual(len(unreconcile.allocations), 2) + allocations = [(x.reference_name, x.allocated_amount) for x in unreconcile.allocations] + self.assertListEqual(allocations, [(so1.name, 150), (so2.name, 110)]) + # unreconcile so2 + unreconcile.remove(unreconcile.allocations[0]) + unreconcile.save().submit() + + # Assert 'Advance Paid' + so1.reload() + so2.reload() + pe.reload() + self.assertEqual(so1.advance_paid, 150) + self.assertEqual(so2.advance_paid, 0) + self.assertEqual(len(pe.references), 1) + self.assertEqual(pe.unallocated_amount, 110) + + self.disable_advance_as_liability() From 4752ed2483d7697129c2af245222977bdcb1b750 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Sat, 12 Oct 2024 18:12:03 +0530 Subject: [PATCH 0255/1614] test: reconciled Invoice should not showup in tool Scenario should be tested on 'Advance in separate party account' (cherry picked from commit f1ec61c19ec8275804958e4eaf131906a2cffc90) --- .../test_unreconcile_payment.py | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/erpnext/accounts/doctype/unreconcile_payment/test_unreconcile_payment.py b/erpnext/accounts/doctype/unreconcile_payment/test_unreconcile_payment.py index eb5530706b6..13e5294aa78 100644 --- a/erpnext/accounts/doctype/unreconcile_payment/test_unreconcile_payment.py +++ b/erpnext/accounts/doctype/unreconcile_payment/test_unreconcile_payment.py @@ -7,7 +7,9 @@ from frappe.utils import today from erpnext.accounts.doctype.payment_entry.test_payment_entry import create_payment_entry from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice +from erpnext.accounts.party import get_party_account from erpnext.accounts.test.accounts_mixin import AccountsTestMixin +from erpnext.selling.doctype.sales_order.sales_order import make_sales_invoice from erpnext.selling.doctype.sales_order.test_sales_order import make_sales_order @@ -414,3 +416,49 @@ class TestUnreconcilePayment(AccountsTestMixin, FrappeTestCase): self.assertEqual(pe.unallocated_amount, 110) self.disable_advance_as_liability() + + def test_07_adv_from_so_to_invoice(self): + self.enable_advance_as_liability() + so = self.create_sales_order() + pe = self.create_payment_entry() + pe.paid_amount = 1000 + pe.append( + "references", + {"reference_doctype": so.doctype, "reference_name": so.name, "allocated_amount": 1000}, + ) + pe.save().submit() + + # Assert 'Advance Paid' + so.reload() + self.assertEqual(so.advance_paid, 1000) + + si = make_sales_invoice(so.name) + si.insert().submit() + + pr = frappe.get_doc( + { + "doctype": "Payment Reconciliation", + "company": self.company, + "party_type": "Customer", + "party": so.customer, + } + ) + accounts = get_party_account("Customer", so.customer, so.company, True) + pr.receivable_payable_account = accounts[0] + pr.default_advance_account = accounts[1] + pr.get_unreconciled_entries() + self.assertEqual(len(pr.get("invoices")), 1) + self.assertEqual(len(pr.get("payments")), 1) + invoices = [x.as_dict() for x in pr.get("invoices")] + payments = [x.as_dict() for x in pr.get("payments")] + pr.allocate_entries(frappe._dict({"invoices": invoices, "payments": payments})) + pr.reconcile() + + self.assertEqual(len(pr.get("invoices")), 0) + self.assertEqual(len(pr.get("payments")), 0) + + # Assert 'Advance Paid' + so.reload() + self.assertEqual(so.advance_paid, 0) + + self.disable_advance_as_liability() From 4c78a682ad38121bd3b9135db9acca68f30028a9 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Sun, 13 Oct 2024 08:08:54 +0530 Subject: [PATCH 0256/1614] chore: better comments for context (cherry picked from commit e7505e92c9b4200d52214d2dc97f7052b2333095) --- .../accounts/doctype/payment_entry/payment_entry.py | 2 ++ erpnext/accounts/utils.py | 10 ++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index eddcdf56fb2..7e3aa25f358 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -1221,6 +1221,7 @@ class PaymentEntry(AccountsController): if self.book_advance_payments_in_separate_party_account: if d.reference_doctype in advance_payment_doctypes: + # Upon reconciliation, whole ledger will be reposted. So, reference to SO/PO is fine gle.update( { "against_voucher_type": d.reference_doctype, @@ -1228,6 +1229,7 @@ class PaymentEntry(AccountsController): } ) else: + # Do not reference Invoices while Advance is in separate party account gle.update({"against_voucher_type": self.doctype, "against_voucher": self.name}) else: gle.update( diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py index cf25b201129..1d75fafc1a9 100644 --- a/erpnext/accounts/utils.py +++ b/erpnext/accounts/utils.py @@ -474,8 +474,8 @@ def reconcile_against_document( doc = frappe.get_doc(voucher_type, voucher_no) frappe.flags.ignore_party_validation = True - # For payments with `Advance` in separate account feature enabled, only new ledger entries are posted for each reference. - # No need to cancel/delete payment ledger entries + # When Advance is allocated from an Order to an Invoice + # whole ledger must be reposted repost_whole_ledger = any([x.voucher_detail_no for x in entries]) if voucher_type == "Payment Entry" and doc.book_advance_payments_in_separate_party_account: if repost_whole_ledger: @@ -515,11 +515,13 @@ def reconcile_against_document( doc = frappe.get_doc(entry.voucher_type, entry.voucher_no) if voucher_type == "Payment Entry" and doc.book_advance_payments_in_separate_party_account: - # both ledgers must be posted to for `Advance` in separate account feature - # TODO: find a more efficient way post only for the new linked vouchers + # When Advance is allocated from an Order to an Invoice + # whole ledger must be reposted if repost_whole_ledger: doc.make_gl_entries() else: + # both ledgers must be posted to for `Advance` in separate account feature + # TODO: find a more efficient way post only for the new linked vouchers doc.make_advance_gl_entries() else: gl_map = doc.build_gl_map() From cf1eabe049c4ee3b7c8f6e978fd7788b4bc7e566 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Sun, 13 Oct 2024 10:35:14 +0530 Subject: [PATCH 0257/1614] chore: resolve conflict --- erpnext/accounts/test/accounts_mixin.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/erpnext/accounts/test/accounts_mixin.py b/erpnext/accounts/test/accounts_mixin.py index b67e190f431..e526e07c734 100644 --- a/erpnext/accounts/test/accounts_mixin.py +++ b/erpnext/accounts/test/accounts_mixin.py @@ -121,8 +121,6 @@ class AccountsTestMixin: new_acc.save() setattr(self, acc.attribute_name, new_acc.name) -<<<<<<< HEAD -======= self.identify_default_warehouses() def enable_advance_as_liability(self): @@ -144,7 +142,6 @@ class AccountsTestMixin: ): setattr(self, "warehouse_" + w.warehouse_name.lower().strip().replace(" ", "_"), w.name) ->>>>>>> a21a406d04 (refactor(test): utility methods for enabling advance in separate acc) def create_usd_receivable_account(self): account_name = "Debtors USD" if not frappe.db.get_value( From a329003f7fc49ad1e534bcff6ce0bfa0fc76bbfe Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Sun, 13 Oct 2024 10:35:48 +0530 Subject: [PATCH 0258/1614] chore: use correct hook for advance payment doctypes --- erpnext/accounts/doctype/payment_entry/payment_entry.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index 7e3aa25f358..7885d825129 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -1166,9 +1166,7 @@ class PaymentEntry(AccountsController): if not self.party_account: return - advance_payment_doctypes = frappe.get_hooks("advance_payment_receivable_doctypes") + frappe.get_hooks( - "advance_payment_payable_doctypes" - ) + advance_payment_doctypes = frappe.get_hooks("advance_payment_doctypes") if self.payment_type == "Receive": against_account = self.paid_to From ef1e121bd409462da781360fca7eda5ae7495f9c Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Sun, 13 Oct 2024 05:23:41 +0000 Subject: [PATCH 0259/1614] chore(release): Bumped to Version 15.38.2 ## [15.38.2](https://github.com/frappe/erpnext/compare/v15.38.1...v15.38.2) (2024-10-13) ### Bug Fixes * don't update reference to SI / PI on advances ([8bf8bcf](https://github.com/frappe/erpnext/commit/8bf8bcf7390296f79432d7a257fa85e095cc6277)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 784ac134a56..076eaeada9b 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.38.1" +__version__ = "15.38.2" def get_default_company(user=None): From 928b6b1510b13fbf15e7d3a76fe204a3bcd12f30 Mon Sep 17 00:00:00 2001 From: Abdeali Chharchhoda Date: Sun, 13 Oct 2024 19:58:20 +0530 Subject: [PATCH 0260/1614] fix: Use `ref_doc.get()` for `party_account_currency` (cherry picked from commit b79549422aff1c9b404e759a0f14efc01823c1b5) --- erpnext/accounts/doctype/payment_request/payment_request.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/payment_request/payment_request.py b/erpnext/accounts/doctype/payment_request/payment_request.py index 8c370ba9d8c..fd07551897a 100644 --- a/erpnext/accounts/doctype/payment_request/payment_request.py +++ b/erpnext/accounts/doctype/payment_request/payment_request.py @@ -571,7 +571,7 @@ def make_payment_request(**args): ) party_type = args.get("party_type") or "Customer" - party_account_currency = ref_doc.party_account_currency + party_account_currency = ref_doc.get("party_account_currency") if not party_account_currency: party_account = get_party_account(party_type, ref_doc.get(party_type.lower()), ref_doc.company) From f3ceb4ac7d50969d2dcece661078e1ab0af575ac Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 14 Oct 2024 15:03:35 +0530 Subject: [PATCH 0261/1614] fix: quotation to so frappe crm (backport #43644) (#43646) fix: quotation to so frappe crm (#43644) (cherry picked from commit d57624b18242f2a3da0d6ee4d1fdfba4a157e8b2) Co-authored-by: Nihantra C. Patel <141945075+Nihantra-Patel@users.noreply.github.com> --- .../selling/doctype/quotation/quotation.py | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/erpnext/selling/doctype/quotation/quotation.py b/erpnext/selling/doctype/quotation/quotation.py index 2d7fef2d6e0..a5994756c46 100644 --- a/erpnext/selling/doctype/quotation/quotation.py +++ b/erpnext/selling/doctype/quotation/quotation.py @@ -369,24 +369,25 @@ def _make_sales_order(source_name, target_doc=None, ignore_permissions=False): if customer: target.customer = customer.name target.customer_name = customer.customer_name + + # sales team + if not target.get("sales_team"): + for d in customer.get("sales_team") or []: + target.append( + "sales_team", + { + "sales_person": d.sales_person, + "allocated_percentage": d.allocated_percentage or None, + "commission_rate": d.commission_rate, + }, + ) + if source.referral_sales_partner: target.sales_partner = source.referral_sales_partner target.commission_rate = frappe.get_value( "Sales Partner", source.referral_sales_partner, "commission_rate" ) - # sales team - if not target.get("sales_team"): - for d in customer.get("sales_team") or []: - target.append( - "sales_team", - { - "sales_person": d.sales_person, - "allocated_percentage": d.allocated_percentage or None, - "commission_rate": d.commission_rate, - }, - ) - target.flags.ignore_permissions = ignore_permissions target.run_method("set_missing_values") target.run_method("calculate_taxes_and_totals") From e5aaa5b6e5ebdb340666123e86e3c3b78b57d6ce Mon Sep 17 00:00:00 2001 From: Ninad1306 Date: Fri, 11 Oct 2024 11:33:27 +0530 Subject: [PATCH 0262/1614] fix: ignore free item when qty is zero (cherry picked from commit 7ae98f77eeee9b44d0afb9899c826a5acd4eb126) --- erpnext/accounts/doctype/pricing_rule/utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/accounts/doctype/pricing_rule/utils.py b/erpnext/accounts/doctype/pricing_rule/utils.py index b848fde08d8..a74dfea2cca 100644 --- a/erpnext/accounts/doctype/pricing_rule/utils.py +++ b/erpnext/accounts/doctype/pricing_rule/utils.py @@ -657,6 +657,9 @@ def get_product_discount_rule(pricing_rule, item_details, args=None, doc=None): if pricing_rule.round_free_qty: qty = math.floor(qty) + if not qty: + return + free_item_data_args = { "item_code": free_item, "qty": qty, From 389ee909a52280f84a88509e0596cdd1a72afaf0 Mon Sep 17 00:00:00 2001 From: Ninad1306 Date: Fri, 11 Oct 2024 14:02:50 +0530 Subject: [PATCH 0263/1614] test: test case to validate free item is ignored when qty is zero (cherry picked from commit a2b41a0c16c9d95c6ca609e1be100d8924d8028b) --- erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py b/erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py index 3fece4aeeab..b4c47a26eb1 100644 --- a/erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py +++ b/erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py @@ -1131,6 +1131,12 @@ class TestPricingRule(FrappeTestCase): self.assertEqual(so.items[1].item_code, "_Test Item") self.assertEqual(so.items[1].qty, 3) + so = make_sales_order(item_code="_Test Item", qty=5, do_not_submit=1) + so.items[0].qty = 1 + del so.items[-1] + so.save() + self.assertEqual(len(so.items), 1) + def test_apply_multiple_pricing_rules_for_discount_percentage_and_amount(self): frappe.delete_doc_if_exists("Pricing Rule", "_Test Pricing Rule 1") frappe.delete_doc_if_exists("Pricing Rule", "_Test Pricing Rule 2") From 9d05a6ebc04a38d985b0626aa4af26d3638f9cc4 Mon Sep 17 00:00:00 2001 From: venkat102 Date: Thu, 10 Oct 2024 12:33:12 +0530 Subject: [PATCH 0264/1614] refactor: remove 'format:' based naming (cherry picked from commit e8e1ec0e851496a8096184a2dddebea8efcd6551) # Conflicts: # erpnext/accounts/doctype/unreconcile_payment/unreconcile_payment.json --- .../doctype/unreconcile_payment/unreconcile_payment.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/unreconcile_payment/unreconcile_payment.json b/erpnext/accounts/doctype/unreconcile_payment/unreconcile_payment.json index f906dc6cec6..8ba79581d50 100644 --- a/erpnext/accounts/doctype/unreconcile_payment/unreconcile_payment.json +++ b/erpnext/accounts/doctype/unreconcile_payment/unreconcile_payment.json @@ -1,7 +1,5 @@ { "actions": [], - "allow_rename": 1, - "autoname": "format:UNREC-{#####}", "creation": "2023-08-22 10:26:34.421423", "default_view": "List", "doctype": "DocType", @@ -58,11 +56,14 @@ "index_web_pages_for_search": 1, "is_submittable": 1, "links": [], +<<<<<<< HEAD "modified": "2023-08-28 17:42:50.261377", +======= + "modified": "2024-10-10 12:03:50.022444", +>>>>>>> e8e1ec0e85 (refactor: remove 'format:' based naming) "modified_by": "Administrator", "module": "Accounts", "name": "Unreconcile Payment", - "naming_rule": "Expression", "owner": "Administrator", "permissions": [ { From 1fac17b36f536d3b2995a983774e035c4acae4be Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 15 Oct 2024 06:00:12 +0530 Subject: [PATCH 0265/1614] chore: resolve conflict --- .../doctype/unreconcile_payment/unreconcile_payment.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/erpnext/accounts/doctype/unreconcile_payment/unreconcile_payment.json b/erpnext/accounts/doctype/unreconcile_payment/unreconcile_payment.json index 8ba79581d50..f2c2f380fe9 100644 --- a/erpnext/accounts/doctype/unreconcile_payment/unreconcile_payment.json +++ b/erpnext/accounts/doctype/unreconcile_payment/unreconcile_payment.json @@ -56,11 +56,7 @@ "index_web_pages_for_search": 1, "is_submittable": 1, "links": [], -<<<<<<< HEAD - "modified": "2023-08-28 17:42:50.261377", -======= "modified": "2024-10-10 12:03:50.022444", ->>>>>>> e8e1ec0e85 (refactor: remove 'format:' based naming) "modified_by": "Administrator", "module": "Accounts", "name": "Unreconcile Payment", From 930e79c3510ea7e92edf669f864024c02dbaf058 Mon Sep 17 00:00:00 2001 From: Bhavan23 Date: Tue, 8 Oct 2024 16:18:31 +0530 Subject: [PATCH 0266/1614] fix: update item details with actual quantity. (cherry picked from commit 9dbdfec9b7a4bcc38399a4d849dcc32b54bf9d4a) --- erpnext/selling/doctype/sales_order/sales_order.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py index 4804080be38..53663de1981 100755 --- a/erpnext/selling/doctype/sales_order/sales_order.py +++ b/erpnext/selling/doctype/sales_order/sales_order.py @@ -14,6 +14,7 @@ from frappe.model.mapper import get_mapped_doc from frappe.model.utils import get_fetch_values from frappe.query_builder.functions import Sum from frappe.utils import add_days, cint, cstr, flt, get_link_to_form, getdate, nowdate, strip_html +from erpnext.stock.get_item_details import get_bin_details from erpnext.accounts.doctype.sales_invoice.sales_invoice import ( unlink_inter_company_doc, @@ -838,6 +839,7 @@ def make_material_request(source_name, target_doc=None): target.project = source_parent.project target.qty = get_remaining_qty(source) target.stock_qty = flt(target.qty) * flt(target.conversion_factor) + target.actual_qty = get_bin_details(target.item_code, target.warehouse, source_parent.company, True).get("actual_qty", 0) args = target.as_dict().copy() args.update( From 86017b223ac8b75802c83c12a964a81258dd6391 Mon Sep 17 00:00:00 2001 From: Bhavan23 Date: Tue, 8 Oct 2024 16:24:28 +0530 Subject: [PATCH 0267/1614] test: Validate the actual quantity when creating a material request from the sales order (cherry picked from commit 17fdd426455aa3daab828444a2ecde837936faa2) --- erpnext/selling/doctype/sales_order/test_sales_order.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/erpnext/selling/doctype/sales_order/test_sales_order.py b/erpnext/selling/doctype/sales_order/test_sales_order.py index 53c629a90b4..0e031cc7b51 100644 --- a/erpnext/selling/doctype/sales_order/test_sales_order.py +++ b/erpnext/selling/doctype/sales_order/test_sales_order.py @@ -8,6 +8,8 @@ import frappe.permissions from frappe.core.doctype.user_permission.test_user_permission import create_user from frappe.tests.utils import FrappeTestCase, change_settings from frappe.utils import add_days, flt, getdate, nowdate, today +from erpnext.stock.get_item_details import get_bin_details + from erpnext.accounts.test.accounts_mixin import AccountsTestMixin from erpnext.controllers.accounts_controller import update_child_qty_rate @@ -96,6 +98,10 @@ class TestSalesOrder(AccountsTestMixin, FrappeTestCase): self.assertEqual(mr.material_request_type, "Purchase") self.assertEqual(len(mr.get("items")), len(so.get("items"))) + for item in mr.get("items"): + actual_qty = get_bin_details(item.item_code, item.warehouse, mr.company, True).get("actual_qty", 0) + self.assertEqual(flt(item.actual_qty), actual_qty) + def test_make_delivery_note(self): so = make_sales_order(do_not_submit=True) From a70181e0258ae209eb7012a507ce513def51f311 Mon Sep 17 00:00:00 2001 From: Bhavan23 Date: Tue, 8 Oct 2024 17:49:12 +0530 Subject: [PATCH 0268/1614] fix: update formatings (cherry picked from commit 5f4a523340209b29ebd9932228b0715eb1035103) --- erpnext/selling/doctype/sales_order/sales_order.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py index 53663de1981..a87c1352471 100755 --- a/erpnext/selling/doctype/sales_order/sales_order.py +++ b/erpnext/selling/doctype/sales_order/sales_order.py @@ -14,7 +14,6 @@ from frappe.model.mapper import get_mapped_doc from frappe.model.utils import get_fetch_values from frappe.query_builder.functions import Sum from frappe.utils import add_days, cint, cstr, flt, get_link_to_form, getdate, nowdate, strip_html -from erpnext.stock.get_item_details import get_bin_details from erpnext.accounts.doctype.sales_invoice.sales_invoice import ( unlink_inter_company_doc, @@ -36,7 +35,7 @@ from erpnext.stock.doctype.stock_reservation_entry.stock_reservation_entry impor get_sre_reserved_qty_details_for_voucher, has_reserved_stock, ) -from erpnext.stock.get_item_details import get_default_bom, get_price_list_rate +from erpnext.stock.get_item_details import get_bin_details, get_default_bom, get_price_list_rate from erpnext.stock.stock_balance import get_reserved_qty, update_bin_qty form_grid_templates = {"items": "templates/form_grid/item_grid.html"} @@ -839,7 +838,9 @@ def make_material_request(source_name, target_doc=None): target.project = source_parent.project target.qty = get_remaining_qty(source) target.stock_qty = flt(target.qty) * flt(target.conversion_factor) - target.actual_qty = get_bin_details(target.item_code, target.warehouse, source_parent.company, True).get("actual_qty", 0) + target.actual_qty = get_bin_details( + target.item_code, target.warehouse, source_parent.company, True + ).get("actual_qty", 0) args = target.as_dict().copy() args.update( From c2c6d27625a82fe836668773d0b8fe41426c5161 Mon Sep 17 00:00:00 2001 From: Bhavan23 Date: Tue, 8 Oct 2024 18:14:00 +0530 Subject: [PATCH 0269/1614] fix: update formatings (cherry picked from commit 50442973219cd246f07d6178ca3465c59778808b) --- erpnext/selling/doctype/sales_order/test_sales_order.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/erpnext/selling/doctype/sales_order/test_sales_order.py b/erpnext/selling/doctype/sales_order/test_sales_order.py index 0e031cc7b51..244a6b1ddad 100644 --- a/erpnext/selling/doctype/sales_order/test_sales_order.py +++ b/erpnext/selling/doctype/sales_order/test_sales_order.py @@ -8,8 +8,6 @@ import frappe.permissions from frappe.core.doctype.user_permission.test_user_permission import create_user from frappe.tests.utils import FrappeTestCase, change_settings from frappe.utils import add_days, flt, getdate, nowdate, today -from erpnext.stock.get_item_details import get_bin_details - from erpnext.accounts.test.accounts_mixin import AccountsTestMixin from erpnext.controllers.accounts_controller import update_child_qty_rate @@ -32,6 +30,7 @@ from erpnext.selling.doctype.sales_order.sales_order import ( ) from erpnext.stock.doctype.item.test_item import make_item from erpnext.stock.doctype.stock_entry.stock_entry_utils import make_stock_entry +from erpnext.stock.get_item_details import get_bin_details class TestSalesOrder(AccountsTestMixin, FrappeTestCase): @@ -99,7 +98,9 @@ class TestSalesOrder(AccountsTestMixin, FrappeTestCase): self.assertEqual(len(mr.get("items")), len(so.get("items"))) for item in mr.get("items"): - actual_qty = get_bin_details(item.item_code, item.warehouse, mr.company, True).get("actual_qty", 0) + actual_qty = get_bin_details(item.item_code, item.warehouse, mr.company, True).get( + "actual_qty", 0 + ) self.assertEqual(flt(item.actual_qty), actual_qty) def test_make_delivery_note(self): From 85088e4aff41306bb132a1f4e22e7e4c85eb70b4 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Tue, 15 Oct 2024 11:57:02 +0530 Subject: [PATCH 0270/1614] fix: zero incoming rate for delivery note return (#43642) (cherry picked from commit 6087a57b0c84b4a35a4e0797a321f13f07fa8d43) --- erpnext/controllers/selling_controller.py | 10 +++++ .../delivery_note/test_delivery_note.py | 41 +++++++++++++++++++ erpnext/stock/stock_ledger.py | 9 ++++ 3 files changed, 60 insertions(+) diff --git a/erpnext/controllers/selling_controller.py b/erpnext/controllers/selling_controller.py index 7ad12b54eff..49710de06f6 100644 --- a/erpnext/controllers/selling_controller.py +++ b/erpnext/controllers/selling_controller.py @@ -473,6 +473,16 @@ class SellingController(StockController): raise_error_if_no_rate=False, ) + if ( + not d.incoming_rate + and self.get("return_against") + and self.get("is_return") + and get_valuation_method(d.item_code) == "Moving Average" + ): + d.incoming_rate = get_rate_for_return( + self.doctype, self.name, d.item_code, self.return_against, item_row=d + ) + # For internal transfers use incoming rate as the valuation rate if self.is_internal_transfer(): if self.doctype == "Delivery Note" or self.get("update_stock"): diff --git a/erpnext/stock/doctype/delivery_note/test_delivery_note.py b/erpnext/stock/doctype/delivery_note/test_delivery_note.py index cfe550f2f27..0cfb427c670 100644 --- a/erpnext/stock/doctype/delivery_note/test_delivery_note.py +++ b/erpnext/stock/doctype/delivery_note/test_delivery_note.py @@ -2039,6 +2039,47 @@ class TestDeliveryNote(FrappeTestCase): self.assertEqual(sn.status, "Delivered") self.assertEqual(sn.warranty_period, 100) + def test_batch_return_dn(self): + from erpnext.stock.doctype.delivery_note.delivery_note import make_sales_return + + item_code = make_item( + "Test Batch Return DN Item 1", + properties={ + "has_batch_no": 1, + "valuation_method": "Moving Average", + "create_new_batch": 1, + "batch_number_series": "TBRDN1-.#####", + "is_stock_item": 1, + }, + ).name + + se = make_stock_entry(item_code=item_code, target="_Test Warehouse - _TC", qty=5, basic_rate=100) + + batch_no = get_batch_from_bundle(se.items[0].serial_and_batch_bundle) + dn = create_delivery_note( + item_code=item_code, + qty=5, + rate=500, + use_serial_batch_fields=1, + batch_no=batch_no, + ) + + dn_return = make_sales_return(dn.name) + dn_return.save().submit() + + self.assertEqual(dn_return.items[0].qty, 5 * -1) + + returned_batch_no = get_batch_from_bundle(dn_return.items[0].serial_and_batch_bundle) + self.assertEqual(batch_no, returned_batch_no) + + stock_value_difference = frappe.db.get_value( + "Stock Ledger Entry", + {"voucher_no": dn_return.name, "voucher_type": "Delivery Note"}, + "stock_value_difference", + ) + + self.assertEqual(stock_value_difference, 100.0 * 5) + def create_delivery_note(**args): dn = frappe.new_doc("Delivery Note") diff --git a/erpnext/stock/stock_ledger.py b/erpnext/stock/stock_ledger.py index b167ccf6df8..dfa60cad96e 100644 --- a/erpnext/stock/stock_ledger.py +++ b/erpnext/stock/stock_ledger.py @@ -1074,6 +1074,15 @@ class update_entries_after: } ) + if not rate and sle.voucher_type in ["Delivery Note", "Sales Invoice"]: + rate = get_rate_for_return( + sle.voucher_type, + sle.voucher_no, + sle.item_code, + voucher_detail_no=sle.voucher_detail_no, + sle=sle, + ) + else: rate = get_rate_for_return( sle.voucher_type, From 8668ae92d830a2eb1168739f9a8bd55281f5c451 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Tue, 15 Oct 2024 11:52:44 +0530 Subject: [PATCH 0271/1614] fix: removed unused query (cherry picked from commit 5f590ddfa2901d483e0ee73fa5e35ff7dd369b1e) # Conflicts: # erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py --- .../tax_withholding_category/tax_withholding_category.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py index 67a33faf9bf..3f9bdea5faf 100644 --- a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py +++ b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py @@ -610,8 +610,11 @@ def get_tcs_amount(parties, inv, tax_details, vouchers, adv_vouchers): conditions.append(ple.voucher_no == ple.against_voucher_no) conditions.append(ple.company == inv.company) +<<<<<<< HEAD (qb.from_(ple).select(Abs(Sum(ple.amount))).where(Criterion.all(conditions)).run(as_list=1)) +======= +>>>>>>> 5f590ddfa2 (fix: removed unused query) advance_amt = ( qb.from_(ple).select(Abs(Sum(ple.amount))).where(Criterion.all(conditions)).run()[0][0] or 0.0 ) From 105f9ec2e1d73671cea1ccb8b2e9ab40439a5eb4 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 15 Oct 2024 13:32:29 +0530 Subject: [PATCH 0272/1614] chore: resolve conflict --- .../tax_withholding_category/tax_withholding_category.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py index 3f9bdea5faf..a56a7f045c8 100644 --- a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py +++ b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py @@ -610,11 +610,6 @@ def get_tcs_amount(parties, inv, tax_details, vouchers, adv_vouchers): conditions.append(ple.voucher_no == ple.against_voucher_no) conditions.append(ple.company == inv.company) -<<<<<<< HEAD - (qb.from_(ple).select(Abs(Sum(ple.amount))).where(Criterion.all(conditions)).run(as_list=1)) - -======= ->>>>>>> 5f590ddfa2 (fix: removed unused query) advance_amt = ( qb.from_(ple).select(Abs(Sum(ple.amount))).where(Criterion.all(conditions)).run()[0][0] or 0.0 ) From 5d6fc71556ba70adec566c0711a401cfadbaf432 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Tue, 8 Oct 2024 12:54:28 +0530 Subject: [PATCH 0273/1614] fix: delete invalid pricing rule on change of applicable_for (cherry picked from commit 42746fc630eb3b4707ee62f16bf73268799deb2b) --- .../promotional_scheme/promotional_scheme.py | 52 +++++++++++++++---- 1 file changed, 41 insertions(+), 11 deletions(-) diff --git a/erpnext/accounts/doctype/promotional_scheme/promotional_scheme.py b/erpnext/accounts/doctype/promotional_scheme/promotional_scheme.py index 86bd2135515..4cc87394b4f 100644 --- a/erpnext/accounts/doctype/promotional_scheme/promotional_scheme.py +++ b/erpnext/accounts/doctype/promotional_scheme/promotional_scheme.py @@ -5,6 +5,8 @@ import frappe from frappe import _ from frappe.model.document import Document +from frappe.query_builder import Criterion +from frappe.query_builder.functions import IfNull pricing_rule_fields = [ "apply_on", @@ -162,22 +164,50 @@ class PromotionalScheme(Document): if self.is_new(): return - transaction_exists = False - docnames = [] + invalid_pricing_rule = self.get_invalid_pricing_rules() - # If user has changed applicable for - if self.get_doc_before_save() and self.get_doc_before_save().applicable_for == self.applicable_for: + if not invalid_pricing_rule: return - docnames = frappe.get_all("Pricing Rule", filters={"promotional_scheme": self.name}) + if frappe.db.exists( + "Pricing Rule Detail", + { + "pricing_rule": ["in", invalid_pricing_rule], + "docstatus": ["<", 2], + }, + ): + raise_for_transaction_exists(self.name) - for docname in docnames: - if frappe.db.exists("Pricing Rule Detail", {"pricing_rule": docname.name, "docstatus": ("<", 2)}): - raise_for_transaction_exists(self.name) + for doc in invalid_pricing_rule: + frappe.delete_doc("Pricing Rule", doc) - if docnames and not transaction_exists: - for docname in docnames: - frappe.delete_doc("Pricing Rule", docname.name) + frappe.msgprint( + _("The following invalid Pricing Rules are deleted:") + + "

  • " + + "
  • ".join(invalid_pricing_rule) + + "
" + ) + + def get_invalid_pricing_rules(self): + pr = frappe.qb.DocType("Pricing Rule") + conditions = [] + conditions.append(pr.promotional_scheme == self.name) + + if self.applicable_for: + applicable_for = frappe.scrub(self.applicable_for) + applicable_for_list = [d.get(applicable_for) for d in self.get(applicable_for)] + + conditions.append( + (IfNull(pr.applicable_for, "") != self.applicable_for) + | ( + (IfNull(pr.applicable_for, "") == self.applicable_for) + & IfNull(pr[applicable_for], "").notin(applicable_for_list) + ) + ) + else: + conditions.append(IfNull(pr.applicable_for, "") != "") + + return frappe.qb.from_(pr).select(pr.name).where(Criterion.all(conditions)).run(pluck=True) def on_update(self): self.validate() From 4dbee00b82b5eed04e350281b54251801686ba30 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Tue, 8 Oct 2024 17:06:05 +0530 Subject: [PATCH 0274/1614] test: added test for change in applicable_for_value in promotional scheme (cherry picked from commit 2613bdd868ac22bb2165dda439a3d9d0d0a29cea) --- .../test_promotional_scheme.py | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/erpnext/accounts/doctype/promotional_scheme/test_promotional_scheme.py b/erpnext/accounts/doctype/promotional_scheme/test_promotional_scheme.py index 74ba6cf923c..a4ea81f0d9f 100644 --- a/erpnext/accounts/doctype/promotional_scheme/test_promotional_scheme.py +++ b/erpnext/accounts/doctype/promotional_scheme/test_promotional_scheme.py @@ -90,6 +90,31 @@ class TestPromotionalScheme(unittest.TestCase): price_rules = frappe.get_all("Pricing Rule", filters={"promotional_scheme": ps.name}) self.assertEqual(price_rules, []) + def test_change_applicable_for_values_in_promotional_scheme(self): + ps = make_promotional_scheme(applicable_for="Customer", customer="_Test Customer") + ps.append("customer", {"customer": "_Test Customer 2"}) + ps.save() + + price_rules = frappe.get_all( + "Pricing Rule", filters={"promotional_scheme": ps.name, "applicable_for": "Customer"} + ) + self.assertTrue(len(price_rules), 2) + + ps.set("customer", []) + ps.append("customer", {"customer": "_Test Customer 2"}) + ps.save() + + price_rules = frappe.get_all( + "Pricing Rule", + filters={ + "promotional_scheme": ps.name, + "applicable_for": "Customer", + "customer": "_Test Customer", + }, + ) + self.assertEqual(price_rules, []) + frappe.delete_doc("Promotional Scheme", ps.name) + def test_min_max_amount_configuration(self): ps = make_promotional_scheme() ps.price_discount_slabs[0].min_amount = 10 From c490a6654090b30de9e2aa9398859fbb6d2bd9da Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 15 Oct 2024 16:04:36 +0530 Subject: [PATCH 0275/1614] fix: incorrect warehouse in the serial no selector for rejection (backport #43671) (#43673) fix: incorrect warehouse in the serial no selector for rejection (#43671) (cherry picked from commit 29ff682ecaddad9450a735e02f7a631f555b145e) Co-authored-by: rohitwaghchaure --- erpnext/public/js/utils/serial_no_batch_selector.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/erpnext/public/js/utils/serial_no_batch_selector.js b/erpnext/public/js/utils/serial_no_batch_selector.js index 1045965e43d..8329e5c9d55 100644 --- a/erpnext/public/js/utils/serial_no_batch_selector.js +++ b/erpnext/public/js/utils/serial_no_batch_selector.js @@ -678,6 +678,10 @@ erpnext.SerialBatchPackageSelector = class SerialNoBatchBundleUpdate { } get_warehouse() { + if (this.item?.is_rejected) { + return this.item.rejected_warehouse; + } + return this.item?.type_of_transaction === "Outward" ? this.item.warehouse || this.item.s_warehouse : this.item.warehouse || this.item.t_warehouse; From b2deb8982646deccd4a4b0bef4c67796a64c09d8 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 15 Oct 2024 16:04:48 +0530 Subject: [PATCH 0276/1614] fix: conversion factor issue (backport #43645) (#43674) fix: conversion factor issue (#43645) (cherry picked from commit a52756f1d471ff313b0c932aeb5d0634be2113d4) Co-authored-by: rohitwaghchaure --- .../request_for_quotation.py | 1 + erpnext/controllers/stock_controller.py | 15 +++++++++++++++ .../purchase_receipt/test_purchase_receipt.py | 15 +++++++++++++++ 3 files changed, 31 insertions(+) diff --git a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py index e123822f386..3a71733a003 100644 --- a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py +++ b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py @@ -456,6 +456,7 @@ def create_rfq_items(sq_doc, supplier, data): "material_request", "material_request_item", "stock_qty", + "uom", ]: args[field] = data.get(field) diff --git a/erpnext/controllers/stock_controller.py b/erpnext/controllers/stock_controller.py index 537b37facf4..0714bdd3a63 100644 --- a/erpnext/controllers/stock_controller.py +++ b/erpnext/controllers/stock_controller.py @@ -63,6 +63,21 @@ class StockController(AccountsController): self.set_rate_of_stock_uom() self.validate_internal_transfer() self.validate_putaway_capacity() + self.reset_conversion_factor() + + def reset_conversion_factor(self): + for row in self.get("items"): + if row.uom != row.stock_uom: + continue + + if row.conversion_factor != 1.0: + row.conversion_factor = 1.0 + frappe.msgprint( + _( + "Conversion factor for item {0} has been reset to 1.0 as the uom {1} is same as stock uom {2}." + ).format(bold(row.item_code), bold(row.uom), bold(row.stock_uom)), + alert=True, + ) def validate_items_exist(self): if not self.get("items"): diff --git a/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py index 4cb53e753e7..6d0fe27033f 100644 --- a/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py +++ b/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py @@ -3657,6 +3657,21 @@ class TestPurchaseReceipt(FrappeTestCase): self.assertEqual(data[0].get("bal_qty"), 50.0) + def test_same_stock_and_transaction_uom_conversion_factor(self): + item_code = "Test Item for Same Stock and Transaction UOM Conversion Factor" + create_item(item_code) + + pr = make_purchase_receipt( + item_code=item_code, + qty=10, + rate=100, + stock_uom="Nos", + transaction_uom="Nos", + conversion_factor=10, + ) + + self.assertEqual(pr.items[0].conversion_factor, 1.0) + def prepare_data_for_internal_transfer(): from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_internal_supplier From e10a58074f2f58c1fbcca7a85a41deca1f6db076 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Thu, 10 Oct 2024 11:27:26 +0530 Subject: [PATCH 0277/1614] fix: added string for translation in bank reconciliation statement (cherry picked from commit c99d9f70373d3c833229e828eb9596f93140c3b2) --- .../bank_reconciliation_statement.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.js b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.js index 9335a8cd65a..2684c87a22a 100644 --- a/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.js +++ b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.js @@ -47,7 +47,7 @@ frappe.query_reports["Bank Reconciliation Statement"] = { }, ], formatter: function (value, row, column, data, default_formatter, filter) { - if (column.fieldname == "payment_entry" && value == "Cheques and Deposits incorrectly cleared") { + if (column.fieldname == "payment_entry" && value == __("Cheques and Deposits incorrectly cleared")) { column.link_onclick = "frappe.query_reports['Bank Reconciliation Statement'].open_utility_report()"; } From 21a7dd43a9f1fee1871e7962924330c03d7949fa Mon Sep 17 00:00:00 2001 From: ljain112 Date: Fri, 11 Oct 2024 11:07:19 +0530 Subject: [PATCH 0278/1614] fix: added parentheses for correct query formation for logical OR condition (cherry picked from commit c0da8f11f77c6d3bcd543e70aea6a9754427538e) --- .../period_closing_voucher/period_closing_voucher.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py index c68cd292523..f5619f8088f 100644 --- a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py +++ b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py @@ -353,9 +353,10 @@ class PeriodClosingVoucher(AccountsController): if get_opening_entries: query = query.where( - gl_entry.posting_date.between(self.get("year_start_date"), self.posting_date) - | gl_entry.is_opening - == "Yes" + ( # noqa: UP034 + (gl_entry.posting_date.between(self.get("year_start_date"), self.posting_date)) + | (gl_entry.is_opening == "Yes") + ) ) else: query = query.where( From 492ba539e803b2b13abaf41443812d8ac172f858 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 15 Oct 2024 16:47:40 +0530 Subject: [PATCH 0279/1614] =?UTF-8?q?fix:=20refetch=20items=20from=20BOM?= =?UTF-8?q?=20if=20'Use=20Multi-Level=20BOM'=20has=20changed=20usin?= =?UTF-8?q?=E2=80=A6=20(backport=20#43672)=20(#43676)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix: refetch items from BOM if 'Use Multi-Level BOM' has changed usin… (#43672) fix: refetch items from BOM if 'Use Multi-Level BOM' has changed using api (cherry picked from commit 05915415de3b13545cab4e2d89c33b526ae7db39) Co-authored-by: rohitwaghchaure --- erpnext/manufacturing/doctype/work_order/work_order.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/erpnext/manufacturing/doctype/work_order/work_order.py b/erpnext/manufacturing/doctype/work_order/work_order.py index 218ab2f2bf8..d13cd27a095 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order.py +++ b/erpnext/manufacturing/doctype/work_order/work_order.py @@ -158,11 +158,20 @@ class WorkOrder(Document): self.validate_operation_time() self.status = self.get_status() self.validate_workstation_type() + self.reset_use_multi_level_bom() validate_uom_is_integer(self, "stock_uom", ["qty", "produced_qty"]) self.set_required_items(reset_only_qty=len(self.get("required_items"))) + def reset_use_multi_level_bom(self): + if self.is_new(): + return + + before_save_obj = self.get_doc_before_save() + if before_save_obj.use_multi_level_bom != self.use_multi_level_bom: + self.get_items_and_operations_from_bom() + def validate_workstation_type(self): for row in self.operations: if not row.workstation and not row.workstation_type: From ea12897ce96b8ba36f1a8db8ddbb192526f78141 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Tue, 15 Oct 2024 12:42:48 +0530 Subject: [PATCH 0280/1614] fix: run gl_entries and closing voucher processes in same function (cherry picked from commit af4daa5b0f68338fee20ac15c35b6f721d78a459) --- .../period_closing_voucher.py | 54 +++++++------------ 1 file changed, 20 insertions(+), 34 deletions(-) diff --git a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py index f5619f8088f..dd8a5ff16c3 100644 --- a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py +++ b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py @@ -60,7 +60,7 @@ class PeriodClosingVoucher(AccountsController): ) if gle_count > 5000: frappe.enqueue( - make_reverse_gl_entries, + process_cancellation, voucher_type="Period Closing Voucher", voucher_no=self.name, queue="long", @@ -71,9 +71,7 @@ class PeriodClosingVoucher(AccountsController): alert=True, ) else: - make_reverse_gl_entries(voucher_type="Period Closing Voucher", voucher_no=self.name) - - self.delete_closing_entries() + process_cancellation(voucher_type="Period Closing Voucher", voucher_no=self.name) def validate_future_closing_vouchers(self): if frappe.db.exists( @@ -86,12 +84,6 @@ class PeriodClosingVoucher(AccountsController): ) ) - def delete_closing_entries(self): - closing_balance = frappe.qb.DocType("Account Closing Balance") - frappe.qb.from_(closing_balance).delete().where( - closing_balance.period_closing_voucher == self.name - ).run() - def validate_account_head(self): closing_account_type = frappe.get_cached_value("Account", self.closing_account_head, "root_type") @@ -166,14 +158,7 @@ class PeriodClosingVoucher(AccountsController): closing_entries = self.get_grouped_gl_entries(get_opening_entries=get_opening_entries) if len(gl_entries + closing_entries) > 3000: frappe.enqueue( - process_gl_entries, - gl_entries=gl_entries, - voucher_name=self.name, - timeout=3000, - ) - - frappe.enqueue( - process_closing_entries, + process_gl_and_closing_entries, gl_entries=gl_entries, closing_entries=closing_entries, voucher_name=self.name, @@ -187,8 +172,9 @@ class PeriodClosingVoucher(AccountsController): alert=True, ) else: - process_gl_entries(gl_entries, self.name) - process_closing_entries(gl_entries, closing_entries, self.name, self.company, self.posting_date) + process_gl_and_closing_entries( + gl_entries, closing_entries, self.name, self.company, self.posting_date + ) def get_grouped_gl_entries(self, get_opening_entries=False): closing_entries = [] @@ -374,12 +360,16 @@ class PeriodClosingVoucher(AccountsController): return query.run(as_dict=1) -def process_gl_entries(gl_entries, voucher_name): +def process_gl_and_closing_entries(gl_entries, closing_entries, voucher_name, company, closing_date): + from erpnext.accounts.doctype.account_closing_balance.account_closing_balance import ( + make_closing_entries, + ) from erpnext.accounts.general_ledger import make_gl_entries try: if gl_entries: make_gl_entries(gl_entries, merge_entries=False) + make_closing_entries(gl_entries + closing_entries, voucher_name, company, closing_date) frappe.db.set_value("Period Closing Voucher", voucher_name, "gle_processing_status", "Completed") except Exception as e: frappe.db.rollback() @@ -387,25 +377,21 @@ def process_gl_entries(gl_entries, voucher_name): frappe.db.set_value("Period Closing Voucher", voucher_name, "gle_processing_status", "Failed") -def process_closing_entries(gl_entries, closing_entries, voucher_name, company, closing_date): - from erpnext.accounts.doctype.account_closing_balance.account_closing_balance import ( - make_closing_entries, - ) - - try: - make_closing_entries(gl_entries + closing_entries, voucher_name, company, closing_date) - except Exception as e: - frappe.db.rollback() - frappe.log_error(e) - - -def make_reverse_gl_entries(voucher_type, voucher_no): +def process_cancellation(voucher_type, voucher_no): from erpnext.accounts.general_ledger import make_reverse_gl_entries try: make_reverse_gl_entries(voucher_type=voucher_type, voucher_no=voucher_no) + delete_closing_entries(voucher_no) frappe.db.set_value("Period Closing Voucher", voucher_no, "gle_processing_status", "Completed") except Exception as e: frappe.db.rollback() frappe.log_error(e) frappe.db.set_value("Period Closing Voucher", voucher_no, "gle_processing_status", "Failed") + + +def delete_closing_entries(voucher_no): + closing_balance = frappe.qb.DocType("Account Closing Balance") + frappe.qb.from_(closing_balance).delete().where( + closing_balance.period_closing_voucher == voucher_no + ).run() From 4db12fe2da4a3bdacf786c8a6c2ab47711ffecef Mon Sep 17 00:00:00 2001 From: ljain112 Date: Tue, 15 Oct 2024 11:41:00 +0530 Subject: [PATCH 0281/1614] fix: missing child company accounts in consolidated balance sheet (cherry picked from commit 7fae9d57d24de1a075a4c6bcca73ed95888603d9) --- .../consolidated_financial_statement.py | 72 +++++++++---------- 1 file changed, 35 insertions(+), 37 deletions(-) diff --git a/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.py b/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.py index e6aa215924d..d287b30bf0b 100644 --- a/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.py +++ b/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.py @@ -469,10 +469,13 @@ def update_parent_account_names(accounts): for d in accounts: if d.account_number: - account_name = d.account_number + " - " + d.account_name + account_key = d.account_number + " - " + d.account_name else: - account_name = d.account_name - name_to_account_map[d.name] = account_name + account_key = d.account_name + + d.account_key = account_key + + name_to_account_map[d.name] = account_key for account in accounts: if account.parent_account: @@ -505,33 +508,26 @@ def get_subsidiary_companies(company): def get_accounts(root_type, companies): accounts = [] - added_accounts = [] for company in companies: - for account in frappe.get_all( - "Account", - fields=[ - "name", - "is_group", - "company", - "parent_account", - "lft", - "rgt", - "root_type", - "report_type", - "account_name", - "account_number", - ], - filters={"company": company, "root_type": root_type}, - ): - if account.account_number: - account_key = account.account_number + "-" + account.account_name - else: - account_key = account.account_name - - if account_key not in added_accounts: - accounts.append(account) - added_accounts.append(account_key) + accounts.extend( + frappe.get_all( + "Account", + fields=[ + "name", + "is_group", + "company", + "parent_account", + "lft", + "rgt", + "root_type", + "report_type", + "account_name", + "account_number", + ], + filters={"company": company, "root_type": root_type}, + ) + ) return accounts @@ -770,15 +766,17 @@ def add_total_row(out, root_type, balance_must_be, companies, company_currency): def filter_accounts(accounts, depth=10): parent_children_map = {} accounts_by_name = {} - for d in accounts: - if d.account_number: - account_name = d.account_number + " - " + d.account_name - else: - account_name = d.account_name - d["company_wise_opening_bal"] = defaultdict(float) - accounts_by_name[account_name] = d + added_accounts = [] - parent_children_map.setdefault(d.parent_account or None, []).append(d) + for d in accounts: + if d.account_key in added_accounts: + continue + + added_accounts.append(d.account_key) + d["company_wise_opening_bal"] = defaultdict(float) + accounts_by_name[d.account_key] = d + + parent_children_map.setdefault(d.parent_account_name or None, []).append(d) filtered_accounts = [] @@ -790,7 +788,7 @@ def filter_accounts(accounts, depth=10): for child in children: child.indent = level filtered_accounts.append(child) - add_to_list(child.name, level + 1) + add_to_list(child.account_key, level + 1) add_to_list(None, 0) From cd9f949b1288708876dd908403616ce0c2e7b6b8 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 15 Oct 2024 17:45:35 +0530 Subject: [PATCH 0282/1614] fix(stock): Grab posting date/time from SABB (backport #43493) (#43502) fix(stock): Grab posting date/time from SABB (#43493) (cherry picked from commit ade121dac614612405f976014707045ed97181a9) Co-authored-by: Corentin Forler <10946971+cogk@users.noreply.github.com> --- erpnext/stock/stock_ledger.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/erpnext/stock/stock_ledger.py b/erpnext/stock/stock_ledger.py index dfa60cad96e..0f058d0a64b 100644 --- a/erpnext/stock/stock_ledger.py +++ b/erpnext/stock/stock_ledger.py @@ -1740,6 +1740,9 @@ def get_valuation_rate( # Get moving average rate of a specific batch number if warehouse and serial_and_batch_bundle: + sabb = frappe.db.get_value( + "Serial and Batch Bundle", serial_and_batch_bundle, ["posting_date", "posting_time"], as_dict=True + ) batch_obj = BatchNoValuation( sle=frappe._dict( { @@ -1747,6 +1750,8 @@ def get_valuation_rate( "warehouse": warehouse, "actual_qty": -1, "serial_and_batch_bundle": serial_and_batch_bundle, + "posting_date": sabb.posting_date, + "posting_time": sabb.posting_time, } ) ) From 99ead94ffeecd1976604c64da1c2cbbb26e63fb9 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Wed, 16 Oct 2024 05:01:44 +0000 Subject: [PATCH 0283/1614] chore(release): Bumped to Version 15.38.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## [15.38.3](https://github.com/frappe/erpnext/compare/v15.38.2...v15.38.3) (2024-10-16) ### Bug Fixes * added parentheses for correct query formation for logical OR condition ([21a7dd4](https://github.com/frappe/erpnext/commit/21a7dd43a9f1fee1871e7962924330c03d7949fa)) * added string for translation in bank reconciliation statement ([e10a580](https://github.com/frappe/erpnext/commit/e10a58074f2f58c1fbcca7a85a41deca1f6db076)) * conversion factor issue (backport [#43645](https://github.com/frappe/erpnext/issues/43645)) ([#43674](https://github.com/frappe/erpnext/issues/43674)) ([b2deb89](https://github.com/frappe/erpnext/commit/b2deb8982646deccd4a4b0bef4c67796a64c09d8)) * delete invalid pricing rule on change of applicable_for ([5d6fc71](https://github.com/frappe/erpnext/commit/5d6fc71556ba70adec566c0711a401cfadbaf432)) * don't update reference to SI / PI on advances ([b72906a](https://github.com/frappe/erpnext/commit/b72906a7a1de57d9344384226cf8e9061ab47cfa)) * ignore free item when qty is zero ([e5aaa5b](https://github.com/frappe/erpnext/commit/e5aaa5b6e5ebdb340666123e86e3c3b78b57d6ce)) * incorrect warehouse in the serial no selector for rejection (backport [#43671](https://github.com/frappe/erpnext/issues/43671)) ([#43673](https://github.com/frappe/erpnext/issues/43673)) ([c490a66](https://github.com/frappe/erpnext/commit/c490a6654090b30de9e2aa9398859fbb6d2bd9da)) * Link opportunity from RFQ to supplier quotation ([eb1f125](https://github.com/frappe/erpnext/commit/eb1f1255ebb7f1424e982864bd2b08ceb54e86a2)) * missing child company accounts in consolidated balance sheet ([4db12fe](https://github.com/frappe/erpnext/commit/4db12fe2da4a3bdacf786c8a6c2ab47711ffecef)) * quotation to so frappe crm (backport [#43644](https://github.com/frappe/erpnext/issues/43644)) ([#43646](https://github.com/frappe/erpnext/issues/43646)) ([f3ceb4a](https://github.com/frappe/erpnext/commit/f3ceb4ac7d50969d2dcece661078e1ab0af575ac)) * refetch items from BOM if 'Use Multi-Level BOM' has changed usin… (backport [#43672](https://github.com/frappe/erpnext/issues/43672)) ([#43676](https://github.com/frappe/erpnext/issues/43676)) ([492ba53](https://github.com/frappe/erpnext/commit/492ba539e803b2b13abaf41443812d8ac172f858)) * removed unused query ([8668ae9](https://github.com/frappe/erpnext/commit/8668ae92d830a2eb1168739f9a8bd55281f5c451)) * run gl_entries and closing voucher processes in same function ([ea12897](https://github.com/frappe/erpnext/commit/ea12897ce96b8ba36f1a8db8ddbb192526f78141)) * show incorrect entries filter in Stock Ledger Invariant Check report (backport [#43619](https://github.com/frappe/erpnext/issues/43619)) ([#43622](https://github.com/frappe/erpnext/issues/43622)) ([d604b12](https://github.com/frappe/erpnext/commit/d604b12d5111e9dd5e0fcd3bc35f06c87284c349)) * **stock:** Grab posting date/time from SABB (backport [#43493](https://github.com/frappe/erpnext/issues/43493)) ([#43502](https://github.com/frappe/erpnext/issues/43502)) ([cd9f949](https://github.com/frappe/erpnext/commit/cd9f949b1288708876dd908403616ce0c2e7b6b8)) * update formatings ([c2c6d27](https://github.com/frappe/erpnext/commit/c2c6d27625a82fe836668773d0b8fe41426c5161)) * update formatings ([a70181e](https://github.com/frappe/erpnext/commit/a70181e0258ae209eb7012a507ce513def51f311)) * update item details with actual quantity. ([930e79c](https://github.com/frappe/erpnext/commit/930e79c3510ea7e92edf669f864024c02dbaf058)) * Use `ref_doc.get()` for `party_account_currency` ([928b6b1](https://github.com/frappe/erpnext/commit/928b6b1510b13fbf15e7d3a76fe204a3bcd12f30)) * zero incoming rate for delivery note return ([#43642](https://github.com/frappe/erpnext/issues/43642)) ([85088e4](https://github.com/frappe/erpnext/commit/85088e4aff41306bb132a1f4e22e7e4c85eb70b4)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 076eaeada9b..df1511b8847 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.38.2" +__version__ = "15.38.3" def get_default_company(user=None): From a33d5535a7c88de749bfd47855717ac1410b65fb Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 16 Oct 2024 14:57:57 +0530 Subject: [PATCH 0284/1614] fix: list view and form status not same for purchase order (backport #43690) (#43692) * fix: list view and form status not same for purchase order (#43690) (cherry picked from commit a671fe13d432de3a1b76f79284855172b36dcde8) # Conflicts: # erpnext/buying/doctype/purchase_order/purchase_order.js # erpnext/buying/doctype/purchase_order/purchase_order_list.js * chore: fix conflicts * chore: fix conflicts --------- Co-authored-by: rohitwaghchaure --- .../doctype/purchase_order/purchase_order.js | 4 ++-- .../purchase_order/purchase_order_list.js | 17 +++++------------ 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.js b/erpnext/buying/doctype/purchase_order/purchase_order.js index ac2aa43f23d..de335bd6292 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.js +++ b/erpnext/buying/doctype/purchase_order/purchase_order.js @@ -382,7 +382,7 @@ erpnext.buying.PurchaseOrderController = class PurchaseOrderController extends ( } if (doc.status != "Closed") { if (doc.status != "On Hold") { - if (flt(doc.per_received, 2) < 100 && allow_receipt) { + if (flt(doc.per_received) < 100 && allow_receipt) { cur_frm.add_custom_button( __("Purchase Receipt"), this.make_purchase_receipt, @@ -408,7 +408,7 @@ erpnext.buying.PurchaseOrderController = class PurchaseOrderController extends ( } } } - if (flt(doc.per_billed, 2) < 100) + if (flt(doc.per_billed) < 100) cur_frm.add_custom_button( __("Purchase Invoice"), this.make_purchase_invoice, diff --git a/erpnext/buying/doctype/purchase_order/purchase_order_list.js b/erpnext/buying/doctype/purchase_order/purchase_order_list.js index c1bf1f3b8d9..7b37987b926 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order_list.js +++ b/erpnext/buying/doctype/purchase_order/purchase_order_list.js @@ -10,14 +10,15 @@ frappe.listview_settings["Purchase Order"] = { "status", ], get_indicator: function (doc) { + // Please do not add precision in the flt function if (doc.status === "Closed") { return [__("Closed"), "green", "status,=,Closed"]; } else if (doc.status === "On Hold") { return [__("On Hold"), "orange", "status,=,On Hold"]; } else if (doc.status === "Delivered") { return [__("Delivered"), "green", "status,=,Closed"]; - } else if (flt(doc.per_received, 2) < 100 && doc.status !== "Closed") { - if (flt(doc.per_billed, 2) < 100) { + } else if (flt(doc.per_received) < 100 && doc.status !== "Closed") { + if (flt(doc.per_billed) < 100) { return [ __("To Receive and Bill"), "orange", @@ -26,17 +27,9 @@ frappe.listview_settings["Purchase Order"] = { } else { return [__("To Receive"), "orange", "per_received,<,100|per_billed,=,100|status,!=,Closed"]; } - } else if ( - flt(doc.per_received, 2) >= 100 && - flt(doc.per_billed, 2) < 100 && - doc.status !== "Closed" - ) { + } else if (flt(doc.per_received) >= 100 && flt(doc.per_billed) < 100 && doc.status !== "Closed") { return [__("To Bill"), "orange", "per_received,=,100|per_billed,<,100|status,!=,Closed"]; - } else if ( - flt(doc.per_received, 2) >= 100 && - flt(doc.per_billed, 2) == 100 && - doc.status !== "Closed" - ) { + } else if (flt(doc.per_received) >= 100 && flt(doc.per_billed) == 100 && doc.status !== "Closed") { return [__("Completed"), "green", "per_received,=,100|per_billed,=,100|status,!=,Closed"]; } }, From 752d175d22db3bb3c38b0ee68622640d1597bc29 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 16 Oct 2024 14:57:57 +0530 Subject: [PATCH 0285/1614] fix: list view and form status not same for purchase order (backport #43690) (#43692) * fix: list view and form status not same for purchase order (#43690) (cherry picked from commit a671fe13d432de3a1b76f79284855172b36dcde8) # Conflicts: # erpnext/buying/doctype/purchase_order/purchase_order.js # erpnext/buying/doctype/purchase_order/purchase_order_list.js * chore: fix conflicts * chore: fix conflicts --------- Co-authored-by: rohitwaghchaure (cherry picked from commit a33d5535a7c88de749bfd47855717ac1410b65fb) --- .../doctype/purchase_order/purchase_order.js | 4 ++-- .../purchase_order/purchase_order_list.js | 17 +++++------------ 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.js b/erpnext/buying/doctype/purchase_order/purchase_order.js index ac2aa43f23d..de335bd6292 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.js +++ b/erpnext/buying/doctype/purchase_order/purchase_order.js @@ -382,7 +382,7 @@ erpnext.buying.PurchaseOrderController = class PurchaseOrderController extends ( } if (doc.status != "Closed") { if (doc.status != "On Hold") { - if (flt(doc.per_received, 2) < 100 && allow_receipt) { + if (flt(doc.per_received) < 100 && allow_receipt) { cur_frm.add_custom_button( __("Purchase Receipt"), this.make_purchase_receipt, @@ -408,7 +408,7 @@ erpnext.buying.PurchaseOrderController = class PurchaseOrderController extends ( } } } - if (flt(doc.per_billed, 2) < 100) + if (flt(doc.per_billed) < 100) cur_frm.add_custom_button( __("Purchase Invoice"), this.make_purchase_invoice, diff --git a/erpnext/buying/doctype/purchase_order/purchase_order_list.js b/erpnext/buying/doctype/purchase_order/purchase_order_list.js index c1bf1f3b8d9..7b37987b926 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order_list.js +++ b/erpnext/buying/doctype/purchase_order/purchase_order_list.js @@ -10,14 +10,15 @@ frappe.listview_settings["Purchase Order"] = { "status", ], get_indicator: function (doc) { + // Please do not add precision in the flt function if (doc.status === "Closed") { return [__("Closed"), "green", "status,=,Closed"]; } else if (doc.status === "On Hold") { return [__("On Hold"), "orange", "status,=,On Hold"]; } else if (doc.status === "Delivered") { return [__("Delivered"), "green", "status,=,Closed"]; - } else if (flt(doc.per_received, 2) < 100 && doc.status !== "Closed") { - if (flt(doc.per_billed, 2) < 100) { + } else if (flt(doc.per_received) < 100 && doc.status !== "Closed") { + if (flt(doc.per_billed) < 100) { return [ __("To Receive and Bill"), "orange", @@ -26,17 +27,9 @@ frappe.listview_settings["Purchase Order"] = { } else { return [__("To Receive"), "orange", "per_received,<,100|per_billed,=,100|status,!=,Closed"]; } - } else if ( - flt(doc.per_received, 2) >= 100 && - flt(doc.per_billed, 2) < 100 && - doc.status !== "Closed" - ) { + } else if (flt(doc.per_received) >= 100 && flt(doc.per_billed) < 100 && doc.status !== "Closed") { return [__("To Bill"), "orange", "per_received,=,100|per_billed,<,100|status,!=,Closed"]; - } else if ( - flt(doc.per_received, 2) >= 100 && - flt(doc.per_billed, 2) == 100 && - doc.status !== "Closed" - ) { + } else if (flt(doc.per_received) >= 100 && flt(doc.per_billed) == 100 && doc.status !== "Closed") { return [__("Completed"), "green", "per_received,=,100|per_billed,=,100|status,!=,Closed"]; } }, From ab20344141e60c43464263454a7c531cc0fd2b5e Mon Sep 17 00:00:00 2001 From: venkat102 Date: Thu, 17 Oct 2024 12:13:15 +0530 Subject: [PATCH 0286/1614] fix: show total amount on report summary --- .../accounts/report/balance_sheet/balance_sheet.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/erpnext/accounts/report/balance_sheet/balance_sheet.py b/erpnext/accounts/report/balance_sheet/balance_sheet.py index 274c8a7a371..ab2f45d4f8b 100644 --- a/erpnext/accounts/report/balance_sheet/balance_sheet.py +++ b/erpnext/accounts/report/balance_sheet/balance_sheet.py @@ -122,13 +122,13 @@ def get_provisional_profit_loss( for period in period_list: key = period if consolidated else period.key - total_assets = flt(asset[0].get(key)) + total_assets = flt(asset[-2].get(key)) effective_liability = 0.00 - if liability: - effective_liability += flt(liability[0].get(key)) - if equity: - effective_liability += flt(equity[0].get(key)) + if liability and liability[-1] == {}: + effective_liability += flt(liability[-2].get(key)) + if equity and equity[-1] == {}: + effective_liability += flt(equity[-2].get(key)) provisional_profit_loss[key] = total_assets - effective_liability total_row[key] = provisional_profit_loss[key] + effective_liability @@ -195,9 +195,9 @@ def get_report_summary( key = period if consolidated else period.key if asset: net_asset += asset[-2].get(key) - if liability: + if liability and liability[-1] == {}: net_liability += liability[-2].get(key) - if equity: + if equity and equity[-1] == {}: net_equity += equity[-2].get(key) if provisional_profit_loss: net_provisional_profit_loss += provisional_profit_loss.get(key) From 60ffcd0574bebbfa3e91fe82744c14792f9d8ad2 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 17 Oct 2024 21:34:54 +0530 Subject: [PATCH 0287/1614] fix: added validation for UOM must be whole number (backport #43710) (#43712) fix: added validation for UOM must be whole number (#43710) (cherry picked from commit 4fd4a37dc931b48526a5e00b0a905a735b435778) Co-authored-by: rohitwaghchaure --- erpnext/controllers/accounts_controller.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 73923464ed9..ff178fab59e 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -3521,6 +3521,9 @@ def update_child_qty_rate(parent_doctype, trans_items, parent_doctype_name, chil parent.update_billing_percentage() parent.set_status() + parent.validate_uom_is_integer("uom", "qty") + parent.validate_uom_is_integer("stock_uom", "stock_qty") + # Cancel and Recreate Stock Reservation Entries. if parent_doctype == "Sales Order": from erpnext.stock.doctype.stock_reservation_entry.stock_reservation_entry import ( From 08cabd1717a0a08875edc94e9c48e104465336c9 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Thu, 17 Oct 2024 16:05:56 +0000 Subject: [PATCH 0288/1614] chore(release): Bumped to Version 15.38.4 ## [15.38.4](https://github.com/frappe/erpnext/compare/v15.38.3...v15.38.4) (2024-10-17) ### Bug Fixes * list view and form status not same for purchase order (backport [#43690](https://github.com/frappe/erpnext/issues/43690)) ([#43692](https://github.com/frappe/erpnext/issues/43692)) ([752d175](https://github.com/frappe/erpnext/commit/752d175d22db3bb3c38b0ee68622640d1597bc29)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index df1511b8847..e28b6e9bb91 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.38.3" +__version__ = "15.38.4" def get_default_company(user=None): From 52be45c5dff5f0fcfb3573ba94f177816c3fa67b Mon Sep 17 00:00:00 2001 From: NIYAZ RAZAK <76736615+niyazrazak@users.noreply.github.com> Date: Sat, 24 Aug 2024 12:56:33 +0300 Subject: [PATCH 0289/1614] fix: incorrect amount in bank clearance (cherry picked from commit 9a11df59fc3b415d4b15a71d10df4656a0b339d8) --- erpnext/accounts/doctype/bank_clearance/bank_clearance.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/bank_clearance/bank_clearance.py b/erpnext/accounts/doctype/bank_clearance/bank_clearance.py index 92abb8cea89..ac7883fce13 100644 --- a/erpnext/accounts/doctype/bank_clearance/bank_clearance.py +++ b/erpnext/accounts/doctype/bank_clearance/bank_clearance.py @@ -168,7 +168,7 @@ def get_payment_entries_for_bank_clearance( "Payment Entry" as payment_document, name as payment_entry, reference_no as cheque_number, reference_date as cheque_date, if(paid_from=%(account)s, paid_amount + total_taxes_and_charges, 0) as credit, - if(paid_from=%(account)s, 0, received_amount) as debit, + if(paid_from=%(account)s, 0, received_amount + total_taxes_and_charges) as debit, posting_date, ifnull(party,if(paid_from=%(account)s,paid_to,paid_from)) as against_account, clearance_date, if(paid_to=%(account)s, paid_to_account_currency, paid_from_account_currency) as account_currency from `tabPayment Entry` From 1281d9d21dd2628fe755881b6d7189c0c5848ee7 Mon Sep 17 00:00:00 2001 From: devdiogenes Date: Wed, 11 Sep 2024 20:42:45 +0000 Subject: [PATCH 0290/1614] fix: Call super onload_post_render inside pos_invoice.js (cherry picked from commit 4a3eca963c32b6a46dfe713339e34661ac0eb27e) --- erpnext/accounts/doctype/pos_invoice/pos_invoice.js | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/accounts/doctype/pos_invoice/pos_invoice.js b/erpnext/accounts/doctype/pos_invoice/pos_invoice.js index 8707ee88860..deb8bd7529d 100644 --- a/erpnext/accounts/doctype/pos_invoice/pos_invoice.js +++ b/erpnext/accounts/doctype/pos_invoice/pos_invoice.js @@ -57,6 +57,7 @@ erpnext.selling.POSInvoiceController = class POSInvoiceController extends erpnex } onload_post_render(frm) { + super.onload_post_render(); this.pos_profile(frm); } From f70506fc92a3b149d71ede3abd879d7ee6ce6535 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Do=C4=9Fancan?= <37839267+doancan@users.noreply.github.com> Date: Thu, 19 Sep 2024 08:04:39 +0300 Subject: [PATCH 0291/1614] refactor: update default_success_action.py The _(doctype) inside get_message is removed from the .format() method. The reason is that _(doctype) would attempt to translate the doctype itself, which is generally not required since the doctypes in doctype_list are system-level terms. The main string "{0} has been submitted successfully" should be translated, and then it should receive the doctype name as an argument. (cherry picked from commit 804558e5bf6ecb6cad54c22233728b50bc5f2fb7) --- erpnext/setup/default_success_action.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/erpnext/setup/default_success_action.py b/erpnext/setup/default_success_action.py index 2b9e75c3265..dba20548184 100644 --- a/erpnext/setup/default_success_action.py +++ b/erpnext/setup/default_success_action.py @@ -11,14 +11,17 @@ doctype_list = [ def get_message(doctype): - return _("{0} has been submitted successfully").format(_(doctype)) + # Properly format the string with translated doctype + return _("{0} has been submitted successfully").format(doctype) def get_first_success_message(doctype): + # Reuse the get_message function for consistency return get_message(doctype) def get_default_success_action(): + # Loop through each doctype in the list and return formatted actions return [ { "doctype": "Success Action", From ddb38db5c46fb20cecd1fd6dcca2ef2168d8a9f9 Mon Sep 17 00:00:00 2001 From: Khushi Rawat <142375893+khushi8112@users.noreply.github.com> Date: Fri, 18 Oct 2024 16:47:57 +0530 Subject: [PATCH 0292/1614] fix: do not make new depreciation for fully depreciated asset (cherry picked from commit 25de412371d6fe9787bcec34546e142b27970b2c) --- .../doctype/sales_invoice/sales_invoice.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 529086228de..c680bd46130 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -1359,14 +1359,15 @@ class SalesInvoice(SellingController): else: if asset.calculate_depreciation: - notes = _( - "This schedule was created when Asset {0} was sold through Sales Invoice {1}." - ).format( - get_link_to_form(asset.doctype, asset.name), - get_link_to_form(self.doctype, self.get("name")), - ) - depreciate_asset(asset, self.posting_date, notes) - asset.reload() + if not asset.status == "Fully Depreciated": + notes = _( + "This schedule was created when Asset {0} was sold through Sales Invoice {1}." + ).format( + get_link_to_form(asset.doctype, asset.name), + get_link_to_form(self.doctype, self.get("name")), + ) + depreciate_asset(asset, self.posting_date, notes) + asset.reload() fixed_asset_gl_entries = get_gl_entries_on_asset_disposal( asset, From b673377b70210f2004df0cbc9eab29f86e17d778 Mon Sep 17 00:00:00 2001 From: venkat102 Date: Fri, 18 Oct 2024 18:42:45 +0530 Subject: [PATCH 0293/1614] fix: get party advance amount based on account (cherry picked from commit d7fa95dd2fd9d682736d0dc7b1b67d0d9eddf4d2) --- erpnext/accounts/party.py | 44 ++++++++++++++++++++++++++++++--------- 1 file changed, 34 insertions(+), 10 deletions(-) diff --git a/erpnext/accounts/party.py b/erpnext/accounts/party.py index 06e285e4ada..65054aec53f 100644 --- a/erpnext/accounts/party.py +++ b/erpnext/accounts/party.py @@ -881,16 +881,17 @@ def get_party_shipping_address(doctype: str, name: str) -> str | None: def get_partywise_advanced_payment_amount( party_type, posting_date=None, future_payment=0, company=None, party=None ): + account_type = frappe.get_cached_value("Party Type", party_type, "account_type") + ple = frappe.qb.DocType("Payment Ledger Entry") + acc = frappe.qb.DocType("Account") + query = ( frappe.qb.from_(ple) - .select(ple.party, Abs(Sum(ple.amount).as_("amount"))) - .where( - (ple.party_type.isin(party_type)) - & (ple.amount < 0) - & (ple.against_voucher_no == ple.voucher_no) - & (ple.delinked == 0) - ) + .inner_join(acc) + .on(ple.account == acc.name) + .select(ple.party) + .where((ple.party_type.isin(party_type)) & (acc.account_type == account_type) & (ple.delinked == 0)) .groupby(ple.party) ) @@ -909,9 +910,32 @@ def get_partywise_advanced_payment_amount( if invoice_doctypes := frappe.get_hooks("invoice_doctypes"): query = query.where(ple.voucher_type.notin(invoice_doctypes)) - data = query.run() - if data: - return frappe._dict(data) + # Get advance amount from Receivable / Payable Account + party_ledger = query.select(Abs(Sum(ple.amount).as_("amount"))) + party_ledger = party_ledger.where(ple.amount < 0) + party_ledger = party_ledger.where(ple.against_voucher_no == ple.voucher_no) + party_ledger = party_ledger.where( + acc.root_type == ("Liability" if account_type == "Payable" else "Asset") + ) + + data = party_ledger.run() + data = frappe._dict(data or {}) + + # Get advance amount from Advance Account + advance_ledger = query.select(Sum(ple.amount).as_("amount"), ple.account) + advance_ledger = advance_ledger.where( + acc.root_type == ("Asset" if account_type == "Payable" else "Liability") + ) + advance_ledger = advance_ledger.groupby(ple.account) + advance_ledger = advance_ledger.having(Sum(ple.amount) < 0) + + advance_data = advance_ledger.run() + + for row in advance_data: + data.setdefault(row[0], 0) + data[row[0]] += abs(row[1]) + + return data def get_default_contact(doctype: str, name: str) -> str | None: From f7717c91bc48869a03ba5d76b0ac1e8879dfc074 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Fri, 18 Oct 2024 18:02:25 +0530 Subject: [PATCH 0294/1614] fix: "show_remarks" checkbox in Process statement of accounts (cherry picked from commit f4600df1f718440698aa98d460178f3e1f9ab430) --- .../process_statement_of_accounts.json | 9 ++++++++- .../process_statement_of_accounts.py | 2 ++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.json b/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.json index 22be5299280..763607c22a1 100644 --- a/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.json +++ b/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.json @@ -25,6 +25,7 @@ "payment_terms_template", "sales_partner", "sales_person", + "show_remarks", "based_on_payment_terms", "section_break_3", "customer_collection", @@ -390,10 +391,16 @@ "fieldname": "ignore_cr_dr_notes", "fieldtype": "Check", "label": "Ignore System Generated Credit / Debit Notes" + }, + { + "default": "0", + "fieldname": "show_remarks", + "fieldtype": "Check", + "label": "Show Remarks" } ], "links": [], - "modified": "2024-08-13 10:41:18.381165", + "modified": "2024-10-18 17:51:39.108481", "modified_by": "Administrator", "module": "Accounts", "name": "Process Statement Of Accounts", diff --git a/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.py b/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.py index 509199ccae6..bc3ba26beb7 100644 --- a/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.py +++ b/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.py @@ -70,6 +70,7 @@ class ProcessStatementOfAccounts(Document): sales_person: DF.Link | None sender: DF.Link | None show_net_values_in_party_account: DF.Check + show_remarks: DF.Check start_date: DF.Date | None subject: DF.Data | None terms_and_conditions: DF.Link | None @@ -187,6 +188,7 @@ def get_common_filters(doc): "finance_book": doc.finance_book if doc.finance_book else None, "account": [doc.account] if doc.account else None, "cost_center": [cc.cost_center_name for cc in doc.cost_center], + "show_remarks": doc.show_remarks, } ) From 148d7e798bbe66cee8c8f3e5e0ed1db7dca8d734 Mon Sep 17 00:00:00 2001 From: venkat102 Date: Fri, 18 Oct 2024 18:00:40 +0530 Subject: [PATCH 0295/1614] fix: get period estimate till service end date (cherry picked from commit a7ba7e9c28e3946ba771516c8ef3ce397d6b0e2e) --- .../deferred_revenue_and_expense.py | 33 ++++++++++--------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/erpnext/accounts/report/deferred_revenue_and_expense/deferred_revenue_and_expense.py b/erpnext/accounts/report/deferred_revenue_and_expense/deferred_revenue_and_expense.py index c6d9eac5966..377777ab2a3 100644 --- a/erpnext/accounts/report/deferred_revenue_and_expense/deferred_revenue_and_expense.py +++ b/erpnext/accounts/report/deferred_revenue_and_expense/deferred_revenue_and_expense.py @@ -122,21 +122,24 @@ class Deferred_Item: """ simulate future posting by creating dummy gl entries. starts from the last posting date. """ - if self.service_start_date != self.service_end_date: - if add_days(self.last_entry_date, 1) < self.period_list[-1].to_date: - self.estimate_for_period_list = get_period_list( - self.filters.from_fiscal_year, - self.filters.to_fiscal_year, - add_days(self.last_entry_date, 1), - self.period_list[-1].to_date, - "Date Range", - "Monthly", - company=self.filters.company, - ) - for period in self.estimate_for_period_list: - amount = self.calculate_amount(period.from_date, period.to_date) - gle = self.make_dummy_gle(period.key, period.to_date, amount) - self.gle_entries.append(gle) + if ( + self.service_start_date != self.service_end_date + and add_days(self.last_entry_date, 1) < self.service_end_date + ): + self.estimate_for_period_list = get_period_list( + self.filters.from_fiscal_year, + self.filters.to_fiscal_year, + add_days(self.last_entry_date, 1), + self.service_end_date, + "Date Range", + "Monthly", + company=self.filters.company, + ) + + for period in self.estimate_for_period_list: + amount = self.calculate_amount(period.from_date, period.to_date) + gle = self.make_dummy_gle(period.key, period.to_date, amount) + self.gle_entries.append(gle) def calculate_item_revenue_expense_for_period(self): """ From 04fbcc64ff661689e5b8e7a62569ef54674b64f1 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Fri, 18 Oct 2024 13:28:46 +0530 Subject: [PATCH 0296/1614] fix: party_balance based on company in payment entry (cherry picked from commit 97c9adf06b04df4a76e71e7cdc6b0331e6c84847) --- erpnext/accounts/doctype/payment_entry/payment_entry.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index 7885d825129..b645d92cb64 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -2486,7 +2486,9 @@ def get_party_details(company, party_type, party, date, cost_center=None): account_balance = get_balance_on(party_account, date, cost_center=cost_center) _party_name = "title" if party_type == "Shareholder" else party_type.lower() + "_name" party_name = frappe.db.get_value(party_type, party, _party_name) - party_balance = get_balance_on(party_type=party_type, party=party, cost_center=cost_center) + party_balance = get_balance_on( + party_type=party_type, party=party, company=company, cost_center=cost_center + ) if party_type in ["Customer", "Supplier"]: party_bank_account = get_party_bank_account(party_type, party) bank_account = get_default_company_bank_account(company, party_type, party) From f343d5a24dbcc38b63b9c94182d69cdea701b6db Mon Sep 17 00:00:00 2001 From: HarryPaulo Date: Wed, 24 Jul 2024 08:57:27 -0300 Subject: [PATCH 0297/1614] fix: Freeze Screen on load invoices on POS Closing Entry (cherry picked from commit 486d396174216c83c00f0218dda94aff803b8693) --- erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.js b/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.js index c171713dc61..5711b27da04 100644 --- a/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.js +++ b/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.js @@ -80,8 +80,10 @@ frappe.ui.form.on("POS Closing Entry", { ) { reset_values(frm); frappe.run_serially([ + () => frappe.dom.freeze(__("Loading Invoices! Please Wait...")), () => frm.trigger("set_opening_amounts"), () => frm.trigger("get_pos_invoices"), + () => frappe.dom.unfreeze(), ]); } }, From 1fa9030aee13c39c6aade9779145d86ff976ce90 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 21 Oct 2024 17:15:34 +0530 Subject: [PATCH 0298/1614] fix: Workspace link for Work Order Consumed Materials report (backport #43753) (#43754) fix: Workspace link for Work Order Consumed Materials report (#43753) (cherry picked from commit e94ffb87cd463aa23cda78c55f60e62001954129) Co-authored-by: Nabin Hait --- .../manufacturing/manufacturing.json | 157 +++++++++--------- 1 file changed, 80 insertions(+), 77 deletions(-) diff --git a/erpnext/manufacturing/workspace/manufacturing/manufacturing.json b/erpnext/manufacturing/workspace/manufacturing/manufacturing.json index d2520d6b7eb..06b9f1b0759 100644 --- a/erpnext/manufacturing/workspace/manufacturing/manufacturing.json +++ b/erpnext/manufacturing/workspace/manufacturing/manufacturing.json @@ -1,4 +1,5 @@ { + "app": "erpnext", "charts": [], "content": "[{\"id\":\"csBCiDglCE\",\"type\":\"header\",\"data\":{\"text\":\"Your Shortcuts\",\"col\":12}},{\"id\":\"YHCQG3wAGv\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"BOM Creator\",\"col\":3}},{\"id\":\"xit0dg7KvY\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"BOM\",\"col\":3}},{\"id\":\"LRhGV9GAov\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Production Plan\",\"col\":3}},{\"id\":\"69KKosI6Hg\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Work Order\",\"col\":3}},{\"id\":\"PwndxuIpB3\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Job Card\",\"col\":3}},{\"id\":\"Ubj6zXcmIQ\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Plant Floor\",\"col\":3}},{\"id\":\"OtMcArFRa5\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"BOM Stock Report\",\"col\":3}},{\"id\":\"76yYsI5imF\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Production Planning Report\",\"col\":3}},{\"id\":\"PIQJYZOMnD\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Learn Manufacturing\",\"col\":3}},{\"id\":\"OaiDqTT03Y\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Forecasting\",\"col\":3}},{\"id\":\"bN_6tHS-Ct\",\"type\":\"spacer\",\"data\":{\"col\":12}},{\"id\":\"yVEFZMqVwd\",\"type\":\"header\",\"data\":{\"text\":\"Reports & Masters\",\"col\":12}},{\"id\":\"rwrmsTI58-\",\"type\":\"card\",\"data\":{\"card_name\":\"Production\",\"col\":4}},{\"id\":\"6dnsyX-siZ\",\"type\":\"card\",\"data\":{\"card_name\":\"Bill of Materials\",\"col\":4}},{\"id\":\"CIq-v5f5KC\",\"type\":\"card\",\"data\":{\"card_name\":\"Reports\",\"col\":4}},{\"id\":\"8RRiQeYr0G\",\"type\":\"card\",\"data\":{\"card_name\":\"Tools\",\"col\":4}},{\"id\":\"Pu8z7-82rT\",\"type\":\"card\",\"data\":{\"card_name\":\"Settings\",\"col\":4}}]", "creation": "2020-03-02 17:11:37.032604", @@ -124,11 +125,86 @@ "onboard": 0, "type": "Link" }, + { + "hidden": 0, + "is_query_report": 0, + "label": "Bill of Materials", + "link_count": 6, + "onboard": 0, + "type": "Card Break" + }, + { + "dependencies": "", + "hidden": 0, + "is_query_report": 0, + "label": "Item", + "link_count": 0, + "link_to": "Item", + "link_type": "DocType", + "onboard": 1, + "type": "Link" + }, + { + "dependencies": "Item", + "hidden": 0, + "is_query_report": 0, + "label": "Bill of Materials", + "link_count": 0, + "link_to": "BOM", + "link_type": "DocType", + "onboard": 1, + "type": "Link" + }, + { + "dependencies": "", + "hidden": 0, + "is_query_report": 0, + "label": "Workstation Type", + "link_count": 0, + "link_to": "Workstation Type", + "link_type": "DocType", + "onboard": 0, + "type": "Link" + }, + { + "dependencies": "", + "hidden": 0, + "is_query_report": 0, + "label": "Workstation", + "link_count": 0, + "link_to": "Workstation", + "link_type": "DocType", + "onboard": 0, + "type": "Link" + }, + { + "dependencies": "", + "hidden": 0, + "is_query_report": 0, + "label": "Operation", + "link_count": 0, + "link_to": "Operation", + "link_type": "DocType", + "onboard": 0, + "type": "Link" + }, + { + "dependencies": "Work Order", + "hidden": 0, + "is_query_report": 1, + "label": "Routing", + "link_count": 0, + "link_to": "Routing", + "link_type": "DocType", + "onboard": 0, + "type": "Link" + }, { "hidden": 0, "is_query_report": 0, "label": "Reports", "link_count": 10, + "link_type": "DocType", "onboard": 0, "type": "Card Break" }, @@ -233,90 +309,16 @@ }, { "hidden": 0, - "is_query_report": 0, + "is_query_report": 1, "label": "Work Order Consumed Materials", "link_count": 0, "link_to": "Work Order Consumed Materials", "link_type": "Report", "onboard": 0, "type": "Link" - }, - { - "hidden": 0, - "is_query_report": 0, - "label": "Bill of Materials", - "link_count": 6, - "onboard": 0, - "type": "Card Break" - }, - { - "dependencies": "", - "hidden": 0, - "is_query_report": 0, - "label": "Item", - "link_count": 0, - "link_to": "Item", - "link_type": "DocType", - "onboard": 1, - "type": "Link" - }, - { - "dependencies": "Item", - "hidden": 0, - "is_query_report": 0, - "label": "Bill of Materials", - "link_count": 0, - "link_to": "BOM", - "link_type": "DocType", - "onboard": 1, - "type": "Link" - }, - { - "dependencies": "", - "hidden": 0, - "is_query_report": 0, - "label": "Workstation Type", - "link_count": 0, - "link_to": "Workstation Type", - "link_type": "DocType", - "onboard": 0, - "type": "Link" - }, - { - "dependencies": "", - "hidden": 0, - "is_query_report": 0, - "label": "Workstation", - "link_count": 0, - "link_to": "Workstation", - "link_type": "DocType", - "onboard": 0, - "type": "Link" - }, - { - "dependencies": "", - "hidden": 0, - "is_query_report": 0, - "label": "Operation", - "link_count": 0, - "link_to": "Operation", - "link_type": "DocType", - "onboard": 0, - "type": "Link" - }, - { - "dependencies": "Work Order", - "hidden": 0, - "is_query_report": 1, - "label": "Routing", - "link_count": 0, - "link_to": "Routing", - "link_type": "DocType", - "onboard": 0, - "type": "Link" } ], - "modified": "2024-01-30 21:49:58.577218", + "modified": "2024-10-21 14:13:38.777556", "modified_by": "Administrator", "module": "Manufacturing", "name": "Manufacturing", @@ -398,5 +400,6 @@ "type": "Report" } ], - "title": "Manufacturing" + "title": "Manufacturing", + "type": "Workspace" } \ No newline at end of file From 9e56f213a3c7149a2067944f4adb274af69598f6 Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Mon, 21 Oct 2024 20:16:35 +0530 Subject: [PATCH 0299/1614] fix: lead create opp from connection not working (cherry picked from commit 0dc518b1c3ad6e3539bfbc8486eea5a6fc6a9812) --- erpnext/crm/doctype/lead/lead.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/crm/doctype/lead/lead.js b/erpnext/crm/doctype/lead/lead.js index e50cf9e4dd0..022d1906e84 100644 --- a/erpnext/crm/doctype/lead/lead.js +++ b/erpnext/crm/doctype/lead/lead.js @@ -7,9 +7,9 @@ cur_frm.email_field = "email_id"; erpnext.LeadController = class LeadController extends frappe.ui.form.Controller { setup() { this.frm.make_methods = { - Customer: this.make_customer, - Quotation: this.make_quotation, - Opportunity: this.make_opportunity, + Customer: this.make_customer.bind(this), + Quotation: this.make_quotation.bind(this), + Opportunity: this.make_opportunity.bind(this), }; // For avoiding integration issues. From a3b8f9759d79d9ad45173248ab4bf3bb343aafc6 Mon Sep 17 00:00:00 2001 From: Khushi Rawat <142375893+khushi8112@users.noreply.github.com> Date: Tue, 24 Sep 2024 17:43:04 +0530 Subject: [PATCH 0300/1614] feat: added assignee email field in asset maintenance log (cherry picked from commit 5911934dc75eb77f11fce49cd6621f9f554217f5) # Conflicts: # erpnext/assets/doctype/asset_maintenance_log/asset_maintenance_log.json # erpnext/patches.txt --- .../asset_maintenance/asset_maintenance.py | 1 + .../asset_maintenance_log.json | 12 ++++++++++++ .../asset_maintenance_log.py | 1 + erpnext/patches.txt | 5 +++++ ...nee_email_field_in_asset_maintenance_log.py | 18 ++++++++++++++++++ 5 files changed, 37 insertions(+) create mode 100644 erpnext/patches/v15_0/update_task_assignee_email_field_in_asset_maintenance_log.py diff --git a/erpnext/assets/doctype/asset_maintenance/asset_maintenance.py b/erpnext/assets/doctype/asset_maintenance/asset_maintenance.py index b44164f2dae..70ab7fdc8e8 100644 --- a/erpnext/assets/doctype/asset_maintenance/asset_maintenance.py +++ b/erpnext/assets/doctype/asset_maintenance/asset_maintenance.py @@ -144,6 +144,7 @@ def update_maintenance_log(asset_maintenance, item_code, item_name, task): "has_certificate": task.certificate_required, "description": task.description, "assign_to_name": task.assign_to_name, + "task_assignee_email": task.assign_to, "periodicity": str(task.periodicity), "maintenance_type": task.maintenance_type, "due_date": task.next_due_date, diff --git a/erpnext/assets/doctype/asset_maintenance_log/asset_maintenance_log.json b/erpnext/assets/doctype/asset_maintenance_log/asset_maintenance_log.json index 7d33176e2f3..cf6d94ee567 100644 --- a/erpnext/assets/doctype/asset_maintenance_log/asset_maintenance_log.json +++ b/erpnext/assets/doctype/asset_maintenance_log/asset_maintenance_log.json @@ -23,6 +23,7 @@ "column_break_6", "maintenance_status", "assign_to_name", + "task_assignee_email", "due_date", "completion_date", "description", @@ -168,15 +169,26 @@ "in_preview": 1, "label": "Task Name", "read_only": 1 + }, + { + "fieldname": "task_assignee_email", + "fieldtype": "Data", + "label": "Task Assignee Email", + "read_only": 1 } ], "index_web_pages_for_search": 1, "is_submittable": 1, "links": [], +<<<<<<< HEAD "modified": "2021-01-22 12:33:45.888124", +======= + "modified": "2024-09-24 15:12:37.497853", +>>>>>>> 5911934dc7 (feat: added assignee email field in asset maintenance log) "modified_by": "Administrator", "module": "Assets", "name": "Asset Maintenance Log", + "naming_rule": "By \"Naming Series\" field", "owner": "Administrator", "permissions": [ { diff --git a/erpnext/assets/doctype/asset_maintenance_log/asset_maintenance_log.py b/erpnext/assets/doctype/asset_maintenance_log/asset_maintenance_log.py index 95d02714c5b..140eb1af27e 100644 --- a/erpnext/assets/doctype/asset_maintenance_log/asset_maintenance_log.py +++ b/erpnext/assets/doctype/asset_maintenance_log/asset_maintenance_log.py @@ -37,6 +37,7 @@ class AssetMaintenanceLog(Document): naming_series: DF.Literal["ACC-AML-.YYYY.-"] periodicity: DF.Data | None task: DF.Link | None + task_assignee_email: DF.Data | None task_name: DF.Data | None # end: auto-generated types diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 333fca1d1da..32e56be77ea 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -377,4 +377,9 @@ erpnext.patches.v15_0.drop_index_posting_datetime_from_sle erpnext.patches.v15_0.add_disassembly_order_stock_entry_type #1 erpnext.patches.v15_0.set_standard_stock_entry_type erpnext.patches.v15_0.link_purchase_item_to_asset_doc +<<<<<<< HEAD erpnext.patches.v14_0.update_currency_exchange_settings_for_frankfurter +======= +erpnext.patches.v15_0.migrate_to_utm_analytics +erpnext.patches.v15_0.update_task_assignee_email_field_in_asset_maintenance_log +>>>>>>> 5911934dc7 (feat: added assignee email field in asset maintenance log) diff --git a/erpnext/patches/v15_0/update_task_assignee_email_field_in_asset_maintenance_log.py b/erpnext/patches/v15_0/update_task_assignee_email_field_in_asset_maintenance_log.py new file mode 100644 index 00000000000..a6eda9c2e17 --- /dev/null +++ b/erpnext/patches/v15_0/update_task_assignee_email_field_in_asset_maintenance_log.py @@ -0,0 +1,18 @@ +import frappe +from frappe.query_builder import DocType + + +def execute(): + if frappe.db.has_column("Asset Maintenance Log", "task_assignee_email"): + asset_maintenance_log = DocType("Asset Maintenance Log") + asset_maintenance_task = DocType("Asset Maintenance Task") + try: + ( + frappe.qb.update(asset_maintenance_log) + .set(asset_maintenance_log.task_assignee_email, asset_maintenance_task.assign_to) + .join(asset_maintenance_task) + .on(asset_maintenance_log.task == asset_maintenance_task.name) + .run() + ) + except Exception: + frappe.log_error("Failed to update Task Assignee Email Field.") From 0a030761484946a567dfa23b72cfc8833680dbc6 Mon Sep 17 00:00:00 2001 From: Khushi Rawat <142375893+khushi8112@users.noreply.github.com> Date: Tue, 22 Oct 2024 01:17:33 +0530 Subject: [PATCH 0301/1614] chore: resolved conflicts --- .../asset_maintenance_log/asset_maintenance_log.json | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/erpnext/assets/doctype/asset_maintenance_log/asset_maintenance_log.json b/erpnext/assets/doctype/asset_maintenance_log/asset_maintenance_log.json index cf6d94ee567..c948630869b 100644 --- a/erpnext/assets/doctype/asset_maintenance_log/asset_maintenance_log.json +++ b/erpnext/assets/doctype/asset_maintenance_log/asset_maintenance_log.json @@ -180,11 +180,7 @@ "index_web_pages_for_search": 1, "is_submittable": 1, "links": [], -<<<<<<< HEAD - "modified": "2021-01-22 12:33:45.888124", -======= "modified": "2024-09-24 15:12:37.497853", ->>>>>>> 5911934dc7 (feat: added assignee email field in asset maintenance log) "modified_by": "Administrator", "module": "Assets", "name": "Asset Maintenance Log", @@ -211,4 +207,4 @@ "sort_order": "DESC", "track_changes": 1, "track_seen": 1 -} \ No newline at end of file +} From 1d5345abc16b228d89a2c8c8c264a10e7c969d6f Mon Sep 17 00:00:00 2001 From: Khushi Rawat <142375893+khushi8112@users.noreply.github.com> Date: Tue, 22 Oct 2024 01:23:49 +0530 Subject: [PATCH 0302/1614] chore: resolved conflicts --- erpnext/patches.txt | 3 --- 1 file changed, 3 deletions(-) diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 32e56be77ea..3013c3c9750 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -377,9 +377,6 @@ erpnext.patches.v15_0.drop_index_posting_datetime_from_sle erpnext.patches.v15_0.add_disassembly_order_stock_entry_type #1 erpnext.patches.v15_0.set_standard_stock_entry_type erpnext.patches.v15_0.link_purchase_item_to_asset_doc -<<<<<<< HEAD erpnext.patches.v14_0.update_currency_exchange_settings_for_frankfurter -======= erpnext.patches.v15_0.migrate_to_utm_analytics erpnext.patches.v15_0.update_task_assignee_email_field_in_asset_maintenance_log ->>>>>>> 5911934dc7 (feat: added assignee email field in asset maintenance log) From 2e0cf36901b52369cd95c73a331269d123f94612 Mon Sep 17 00:00:00 2001 From: Khushi Rawat <142375893+khushi8112@users.noreply.github.com> Date: Tue, 22 Oct 2024 02:06:41 +0530 Subject: [PATCH 0303/1614] fix: removed unmerged patches --- erpnext/patches.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 3013c3c9750..e59938909c7 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -378,5 +378,4 @@ erpnext.patches.v15_0.add_disassembly_order_stock_entry_type #1 erpnext.patches.v15_0.set_standard_stock_entry_type erpnext.patches.v15_0.link_purchase_item_to_asset_doc erpnext.patches.v14_0.update_currency_exchange_settings_for_frankfurter -erpnext.patches.v15_0.migrate_to_utm_analytics erpnext.patches.v15_0.update_task_assignee_email_field_in_asset_maintenance_log From aeaadb1e300b622abf54d35364a471463b504a2e Mon Sep 17 00:00:00 2001 From: "bhaveshkumar.j" Date: Mon, 21 Oct 2024 18:22:30 +0000 Subject: [PATCH 0304/1614] fix: coupon code validation logic (cherry picked from commit d04257a32dd705868cc662399dcc893003a5b59c) # Conflicts: # erpnext/accounts/doctype/pricing_rule/utils.py --- erpnext/accounts/doctype/pricing_rule/utils.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/erpnext/accounts/doctype/pricing_rule/utils.py b/erpnext/accounts/doctype/pricing_rule/utils.py index a74dfea2cca..4093462d645 100644 --- a/erpnext/accounts/doctype/pricing_rule/utils.py +++ b/erpnext/accounts/doctype/pricing_rule/utils.py @@ -728,6 +728,7 @@ def get_pricing_rule_items(pr_doc, other_items=False) -> list: def validate_coupon_code(coupon_name): coupon = frappe.get_doc("Coupon Code", coupon_name) +<<<<<<< HEAD if coupon.valid_from: if coupon.valid_from > getdate(today()): @@ -736,9 +737,17 @@ def validate_coupon_code(coupon_name): if coupon.valid_upto < getdate(today()): frappe.throw(_("Sorry, this coupon code's validity has expired")) elif coupon.used >= coupon.maximum_use: +======= + if coupon.valid_from and coupon.valid_from > getdate(today()): + frappe.throw(_("Sorry, this coupon code's validity has not started")) + elif coupon.valid_upto and coupon.valid_upto < getdate(today()): + frappe.throw(_("Sorry, this coupon code's validity has expired")) + elif coupon.maximum_use and coupon.used >= coupon.maximum_use: +>>>>>>> d04257a32d (fix: coupon code validation logic) frappe.throw(_("Sorry, this coupon code is no longer valid")) + def update_coupon_code_count(coupon_name, transaction_type): coupon = frappe.get_doc("Coupon Code", coupon_name) if coupon: From 50dd8d9df756fa1bf64fa0d86b719b6aeffd0228 Mon Sep 17 00:00:00 2001 From: "bhaveshkumar.j" Date: Mon, 21 Oct 2024 18:23:39 +0000 Subject: [PATCH 0305/1614] fix: remove extra space (cherry picked from commit 1561a9e1bf6b179dddae2861160d224b6983ced1) --- erpnext/accounts/doctype/pricing_rule/utils.py | 1 - 1 file changed, 1 deletion(-) diff --git a/erpnext/accounts/doctype/pricing_rule/utils.py b/erpnext/accounts/doctype/pricing_rule/utils.py index 4093462d645..98ef8910143 100644 --- a/erpnext/accounts/doctype/pricing_rule/utils.py +++ b/erpnext/accounts/doctype/pricing_rule/utils.py @@ -747,7 +747,6 @@ def validate_coupon_code(coupon_name): frappe.throw(_("Sorry, this coupon code is no longer valid")) - def update_coupon_code_count(coupon_name, transaction_type): coupon = frappe.get_doc("Coupon Code", coupon_name) if coupon: From 853ca1fcee8a5176fa700599c0bb34813858d177 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 22 Oct 2024 10:15:28 +0530 Subject: [PATCH 0306/1614] chore: resolve conflict --- erpnext/accounts/doctype/pricing_rule/utils.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/erpnext/accounts/doctype/pricing_rule/utils.py b/erpnext/accounts/doctype/pricing_rule/utils.py index 98ef8910143..572529580e8 100644 --- a/erpnext/accounts/doctype/pricing_rule/utils.py +++ b/erpnext/accounts/doctype/pricing_rule/utils.py @@ -728,22 +728,11 @@ def get_pricing_rule_items(pr_doc, other_items=False) -> list: def validate_coupon_code(coupon_name): coupon = frappe.get_doc("Coupon Code", coupon_name) -<<<<<<< HEAD - - if coupon.valid_from: - if coupon.valid_from > getdate(today()): - frappe.throw(_("Sorry, this coupon code's validity has not started")) - elif coupon.valid_upto: - if coupon.valid_upto < getdate(today()): - frappe.throw(_("Sorry, this coupon code's validity has expired")) - elif coupon.used >= coupon.maximum_use: -======= if coupon.valid_from and coupon.valid_from > getdate(today()): frappe.throw(_("Sorry, this coupon code's validity has not started")) elif coupon.valid_upto and coupon.valid_upto < getdate(today()): frappe.throw(_("Sorry, this coupon code's validity has expired")) elif coupon.maximum_use and coupon.used >= coupon.maximum_use: ->>>>>>> d04257a32d (fix: coupon code validation logic) frappe.throw(_("Sorry, this coupon code is no longer valid")) From 88f5e3f160cacf2c86b393a2036d109647cb6506 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 22 Oct 2024 11:59:57 +0530 Subject: [PATCH 0307/1614] refactor: allow unreconcile on bank and cash entry type journals (cherry picked from commit 2c4f37f488031d98c9b8297758295422520a9eea) --- erpnext/public/js/utils/unreconcile.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/public/js/utils/unreconcile.js b/erpnext/public/js/utils/unreconcile.js index c6ee8a330c7..de20f468ccb 100644 --- a/erpnext/public/js/utils/unreconcile.js +++ b/erpnext/public/js/utils/unreconcile.js @@ -4,7 +4,8 @@ erpnext.accounts.unreconcile_payment = { add_unreconcile_btn(frm) { if (frm.doc.docstatus == 1) { if ( - (frm.doc.doctype == "Journal Entry" && frm.doc.voucher_type != "Journal Entry") || + (frm.doc.doctype == "Journal Entry" && + !["Journal Entry", "Bank Entry", "Cash Entry"].includes(frm.doc.voucher_type)) || !["Purchase Invoice", "Sales Invoice", "Journal Entry", "Payment Entry"].includes( frm.doc.doctype ) From fac27d9dff8fbd6babcbf92ede6a94d51484e36f Mon Sep 17 00:00:00 2001 From: Corentin Forler Date: Wed, 9 Oct 2024 09:56:17 +0200 Subject: [PATCH 0308/1614] fix(deferred_revenue): Escape account in query (cherry picked from commit c7b3ae41d4a0b1506ef50d470a9eed3f76f85a22) --- erpnext/accounts/deferred_revenue.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/deferred_revenue.py b/erpnext/accounts/deferred_revenue.py index a48ce9b4c63..cd34bf7f850 100644 --- a/erpnext/accounts/deferred_revenue.py +++ b/erpnext/accounts/deferred_revenue.py @@ -58,7 +58,7 @@ def build_conditions(process_type, account, company): ) if account: - conditions += f"AND {deferred_account}='{account}'" + conditions += f"AND {deferred_account}='{frappe.db.escape(account)}'" elif company: conditions += f"AND p.company = {frappe.db.escape(company)}" From 8d9796666247c089a3799445b9520c491d782c26 Mon Sep 17 00:00:00 2001 From: Raffael Meyer <14891507+barredterra@users.noreply.github.com> Date: Tue, 22 Oct 2024 13:44:28 +0200 Subject: [PATCH 0309/1614] refactor: validate_return_against_account (#43778) (cherry picked from commit c4faa0e101f5c9e3c885eedc08c7ae318b555717) --- erpnext/controllers/accounts_controller.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index ff178fab59e..21adab8bc1e 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -393,12 +393,17 @@ class AccountsController(TransactionBase): def validate_return_against_account(self): if self.doctype in ["Sales Invoice", "Purchase Invoice"] and self.is_return and self.return_against: cr_dr_account_field = "debit_to" if self.doctype == "Sales Invoice" else "credit_to" - cr_dr_account_label = "Debit To" if self.doctype == "Sales Invoice" else "Credit To" + cr_dr_account_label = self.meta.get_label(cr_dr_account_field) cr_dr_account = self.get(cr_dr_account_field) - if frappe.get_value(self.doctype, self.return_against, cr_dr_account_field) != cr_dr_account: + original_account = frappe.get_value(self.doctype, self.return_against, cr_dr_account_field) + if original_account != cr_dr_account: frappe.throw( - _("'{0}' account: '{1}' should match the Return Against Invoice").format( - frappe.bold(cr_dr_account_label), frappe.bold(cr_dr_account) + _( + "Please set {0} to {1}, the same account that was used in the original invoice {2}." + ).format( + frappe.bold(_(cr_dr_account_label, context=self.doctype)), + frappe.bold(cr_dr_account), + frappe.bold(self.return_against), ) ) From 2205ae8e54126a868825bb6cb6fa54d01498b298 Mon Sep 17 00:00:00 2001 From: Ninad Parikh <109862100+Ninad1306@users.noreply.github.com> Date: Tue, 22 Oct 2024 19:28:02 +0530 Subject: [PATCH 0310/1614] fix: Required Changes to Support e-Waybill Generation for Material Transfer Return (#43061) (cherry picked from commit 004c4e21d4732fd64fe0d6b24908baf385d4e685) --- .../controllers/subcontracting_controller.py | 18 ++++++++++++------ .../stock/doctype/stock_entry/stock_entry.js | 6 +++++- .../stock/doctype/stock_entry/stock_entry.json | 12 ++++++------ 3 files changed, 23 insertions(+), 13 deletions(-) diff --git a/erpnext/controllers/subcontracting_controller.py b/erpnext/controllers/subcontracting_controller.py index f6f6742cc87..3c7f8b0ccca 100644 --- a/erpnext/controllers/subcontracting_controller.py +++ b/erpnext/controllers/subcontracting_controller.py @@ -1235,6 +1235,17 @@ def add_items_in_ste(ste_doc, row, qty, rm_details, rm_detail_field="sco_rm_deta def make_return_stock_entry_for_subcontract( available_materials, order_doc, rm_details, order_doctype="Subcontracting Order" ): + def post_process(source_doc, target_doc): + target_doc.purpose = "Material Transfer" + + if source_doc.doctype == "Purchase Order": + target_doc.purchase_order = source_doc.name + else: + target_doc.subcontracting_order = source_doc.name + + target_doc.company = source_doc.company + target_doc.is_return = 1 + ste_doc = get_mapped_doc( order_doctype, order_doc.name, @@ -1245,18 +1256,13 @@ def make_return_stock_entry_for_subcontract( }, }, ignore_child_tables=True, + postprocess=post_process, ) - ste_doc.purpose = "Material Transfer" - if order_doctype == "Purchase Order": - ste_doc.purchase_order = order_doc.name rm_detail_field = "po_detail" else: - ste_doc.subcontracting_order = order_doc.name rm_detail_field = "sco_rm_detail" - ste_doc.company = order_doc.company - ste_doc.is_return = 1 for _key, value in available_materials.items(): if not value.qty: diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.js b/erpnext/stock/doctype/stock_entry/stock_entry.js index cb442f6666d..3e82ef51653 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.js +++ b/erpnext/stock/doctype/stock_entry/stock_entry.js @@ -1298,7 +1298,7 @@ erpnext.stock.StockEntry = class StockEntry extends erpnext.stock.StockControlle this.frm.cscript.toggle_enable_bom(); - if (doc.purpose == "Send to Subcontractor") { + if (erpnext.stock.is_subcontracting_or_return_transfer(doc)) { doc.customer = doc.customer_name = doc.customer_address = @@ -1364,6 +1364,10 @@ erpnext.stock.select_batch_and_serial_no = (frm, item) => { }); }; +erpnext.stock.is_subcontracting_or_return_transfer = (doc) => { + return doc.purpose == "Send to Subcontractor" || (doc.purpose == "Material Transfer" && doc.is_return); +}; + function attach_bom_items(bom_no) { if (!bom_no) { return; diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.json b/erpnext/stock/doctype/stock_entry/stock_entry.json index 5ba9f2973a1..f5fdfafe778 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.json +++ b/erpnext/stock/doctype/stock_entry/stock_entry.json @@ -154,14 +154,14 @@ "search_index": 1 }, { - "depends_on": "eval:doc.purpose==\"Send to Subcontractor\"", + "depends_on": "eval: erpnext.stock.is_subcontracting_or_return_transfer(doc)", "fieldname": "purchase_order", "fieldtype": "Link", "label": "Purchase Order", "options": "Purchase Order" }, { - "depends_on": "eval:doc.purpose==\"Send to Subcontractor\"", + "depends_on": "eval: erpnext.stock.is_subcontracting_or_return_transfer(doc)", "fieldname": "subcontracting_order", "fieldtype": "Link", "label": "Subcontracting Order", @@ -427,13 +427,13 @@ }, { "collapsible": 1, - "depends_on": "eval:doc.purpose === \"Send to Subcontractor\"", + "depends_on": "eval: erpnext.stock.is_subcontracting_or_return_transfer(doc)", "fieldname": "contact_section", "fieldtype": "Section Break", "label": "Supplier Details" }, { - "depends_on": "eval:doc.purpose === \"Send to Subcontractor\"", + "depends_on": "eval: erpnext.stock.is_subcontracting_or_return_transfer(doc)", "fieldname": "supplier", "fieldtype": "Link", "label": "Supplier", @@ -445,7 +445,7 @@ }, { "bold": 1, - "depends_on": "eval:doc.purpose === \"Send to Subcontractor\"", + "depends_on": "eval: erpnext.stock.is_subcontracting_or_return_transfer(doc)", "fieldname": "supplier_name", "fieldtype": "Data", "label": "Supplier Name", @@ -455,7 +455,7 @@ "read_only": 1 }, { - "depends_on": "eval:doc.purpose === \"Send to Subcontractor\"", + "depends_on": "eval: erpnext.stock.is_subcontracting_or_return_transfer(doc)", "fieldname": "supplier_address", "fieldtype": "Link", "label": "Supplier Address", From 39387e9f54ddd27f77ddfb268a7d92e0c3e66f7b Mon Sep 17 00:00:00 2001 From: Vishakh Desai Date: Tue, 1 Oct 2024 12:25:04 +0530 Subject: [PATCH 0311/1614] fix: get stock accounts from the doc instead of db in validate_stock_accounts (cherry picked from commit 30954586d8d8f63869cce9446b93ba6089ad4899) --- erpnext/accounts/doctype/journal_entry/journal_entry.py | 2 +- erpnext/accounts/utils.py | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.py b/erpnext/accounts/doctype/journal_entry/journal_entry.py index 593fa48e856..47626492e84 100644 --- a/erpnext/accounts/doctype/journal_entry/journal_entry.py +++ b/erpnext/accounts/doctype/journal_entry/journal_entry.py @@ -259,7 +259,7 @@ class JournalEntry(AccountsController): frappe.throw(_("Journal Entry type should be set as Depreciation Entry for asset depreciation")) def validate_stock_accounts(self): - stock_accounts = get_stock_accounts(self.company, self.doctype, self.name) + stock_accounts = get_stock_accounts(self.company, accounts=self.accounts) for account in stock_accounts: account_bal, stock_bal, warehouse_list = get_stock_and_account_balance( account, self.posting_date, self.company diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py index 1d75fafc1a9..91904059824 100644 --- a/erpnext/accounts/utils.py +++ b/erpnext/accounts/utils.py @@ -1547,12 +1547,16 @@ def compare_existing_and_expected_gle(existing_gle, expected_gle, precision): return matched -def get_stock_accounts(company, voucher_type=None, voucher_no=None): +def get_stock_accounts(company, voucher_type=None, voucher_no=None, accounts=None): stock_accounts = [ d.name for d in frappe.db.get_all("Account", {"account_type": "Stock", "company": company, "is_group": 0}) ] - if voucher_type and voucher_no: + + if accounts: + stock_accounts = [row.account for row in accounts if row.account in stock_accounts] + + elif voucher_type and voucher_no: if voucher_type == "Journal Entry": stock_accounts = [ d.account From d2e5b2aa1d22cdcaccc62b412732b8d12f9b1aa3 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Tue, 22 Oct 2024 19:49:37 +0530 Subject: [PATCH 0312/1614] fix: only show pay button for specific doctype in portal --- .../doctype/payment_request/payment_request.py | 12 ++++++++++++ erpnext/templates/pages/order.py | 10 ++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/payment_request/payment_request.py b/erpnext/accounts/doctype/payment_request/payment_request.py index fd07551897a..462cae95ba5 100644 --- a/erpnext/accounts/doctype/payment_request/payment_request.py +++ b/erpnext/accounts/doctype/payment_request/payment_request.py @@ -20,6 +20,15 @@ from erpnext.accounts.party import get_party_account, get_party_bank_account from erpnext.accounts.utils import get_account_currency, get_currency_precision from erpnext.utilities import payment_app_import_guard +ALLOWED_DOCTYPES_FOR_PAYMENT_REQUEST = [ + "Sales Order", + "Purchase Order", + "Sales Invoice", + "Purchase Invoice", + "POS Invoice", + "Fees", +] + def _get_payment_gateway_controller(*args, **kwargs): with payment_app_import_guard(): @@ -525,6 +534,9 @@ def make_payment_request(**args): args = frappe._dict(args) + if args.dt not in ALLOWED_DOCTYPES_FOR_PAYMENT_REQUEST: + frappe.throw(_("Payment Requests cannot be created against: {0}").format(frappe.bold(args.dt))) + ref_doc = frappe.get_doc(args.dt, args.dn) gateway_account = get_gateway_details(args) or frappe._dict() diff --git a/erpnext/templates/pages/order.py b/erpnext/templates/pages/order.py index 505399f4a5b..dca5a0c7497 100644 --- a/erpnext/templates/pages/order.py +++ b/erpnext/templates/pages/order.py @@ -4,6 +4,10 @@ import frappe from frappe import _ +from erpnext.accounts.doctype.payment_request.payment_request import ( + ALLOWED_DOCTYPES_FOR_PAYMENT_REQUEST, +) + def get_context(context): context.no_cache = 1 @@ -46,8 +50,10 @@ def get_context(context): ) context.available_loyalty_points = int(loyalty_program_details.get("loyalty_points")) - context.show_pay_button = "payments" in frappe.get_installed_apps() and frappe.db.get_single_value( - "Buying Settings", "show_pay_button" + context.show_pay_button = ( + "payments" in frappe.get_installed_apps() + and frappe.db.get_single_value("Buying Settings", "show_pay_button") + and context.doc.doctype in ALLOWED_DOCTYPES_FOR_PAYMENT_REQUEST ) context.show_make_pi_button = False if context.doc.get("supplier"): From 58a3ef7aa6b5d446460bb25ba7cb0188cbdab66b Mon Sep 17 00:00:00 2001 From: Ninad1306 Date: Tue, 22 Oct 2024 12:16:59 +0530 Subject: [PATCH 0313/1614] fix: map doc from purchase order (cherry picked from commit 60ceb91ace8fbb8ddd127a00e7eadd431d4e250c) --- .../subcontracting_receipt.py | 144 +++++++++--------- 1 file changed, 71 insertions(+), 73 deletions(-) diff --git a/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.py b/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.py index db912514988..13010d8448c 100644 --- a/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.py +++ b/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.py @@ -687,86 +687,84 @@ def make_purchase_receipt(source_name, target_doc=None, save=False, submit=False else: source_doc = source_name - if not source_doc.is_return: - if not target_doc: - target_doc = frappe.new_doc("Purchase Receipt") - target_doc.is_subcontracted = 1 - target_doc.is_old_subcontracting_flow = 0 + if source_doc.is_return: + return - target_doc = get_mapped_doc( - "Subcontracting Receipt", - source_doc.name, - { - "Subcontracting Receipt": { - "doctype": "Purchase Receipt", - "field_map": { - "posting_date": "posting_date", - "posting_time": "posting_time", - "name": "subcontracting_receipt", - "supplier_warehouse": "supplier_warehouse", - }, - "field_no_map": ["total_qty", "total"], + po_doc = frappe.get_doc("Purchase Order", source_doc.items[0].purchase_order) + target_doc = get_mapped_doc( + "Purchase Order", + po_doc.name, + { + "Purchase Order": { + "doctype": "Purchase Receipt", + "validation": { + "docstatus": ["=", 1], }, + "field_no_map": ["items"], }, - target_doc, - ignore_child_tables=True, + "Purchase Taxes and Charges": {"doctype": "Purchase Taxes and Charges", "reset_value": True}, + }, + ) + + target_doc.update( + { + "posting_date": source_doc.posting_date, + "posting_time": source_doc.posting_time, + "subcontracting_receipt": source_doc.name, + "supplier_warehouse": source_doc.supplier_warehouse, + "is_subcontracted": 1, + "is_old_subcontracting_flow": 0, + "currency": frappe.get_cached_value("Company", target_doc.company, "default_currency"), + } + ) + + po_items_details = {po_item.name: po_item for po_item in po_doc.items} + + for item in source_doc.items: + if po_item := po_items_details.get(item.purchase_order_item): + conversion_factor = flt(po_item.qty) / flt(po_item.fg_item_qty) + item_row = { + "item_code": po_item.item_code, + "item_name": po_item.item_name, + "conversion_factor": conversion_factor, + "qty": flt(item.qty) * conversion_factor, + "rejected_qty": flt(item.rejected_qty) * conversion_factor, + "uom": po_item.uom, + "rate": po_item.rate, + "warehouse": item.warehouse, + "rejected_warehouse": item.rejected_warehouse, + "purchase_order": po_doc.name, + "purchase_order_item": item.purchase_order_item, + "subcontracting_receipt_item": item.name, + "project": po_item.project, + } + target_doc.append("items", item_row) + + if not target_doc.items: + frappe.throw( + _("Purchase Order Item reference is missing in Subcontracting Receipt {0}").format( + source_doc.name + ) ) - target_doc.currency = frappe.get_cached_value("Company", target_doc.company, "default_currency") + target_doc.set_missing_values() - po_items_details = {} - for item in source_doc.items: - if item.purchase_order and item.purchase_order_item: - if item.purchase_order not in po_items_details: - po_doc = frappe.get_doc("Purchase Order", item.purchase_order) - po_items_details[item.purchase_order] = { - po_item.name: po_item for po_item in po_doc.items - } + if (save or submit) and frappe.has_permission(target_doc.doctype, "create"): + target_doc.save() - if po_item := po_items_details[item.purchase_order].get(item.purchase_order_item): - conversion_factor = flt(po_item.qty) / flt(po_item.fg_item_qty) - item_row = { - "item_code": po_item.item_code, - "item_name": po_item.item_name, - "conversion_factor": conversion_factor, - "qty": flt(item.qty) * conversion_factor, - "rejected_qty": flt(item.rejected_qty) * conversion_factor, - "uom": po_item.uom, - "rate": po_item.rate, - "warehouse": item.warehouse, - "rejected_warehouse": item.rejected_warehouse, - "purchase_order": item.purchase_order, - "purchase_order_item": item.purchase_order_item, - "subcontracting_receipt_item": item.name, - "project": po_item.project, - } - target_doc.append("items", item_row) + if submit and frappe.has_permission(target_doc.doctype, "submit", target_doc): + try: + target_doc.submit() + except Exception as e: + target_doc.add_comment("Comment", _("Submit Action Failed") + "

" + str(e)) - if not target_doc.items: - frappe.throw( - _("Purchase Order Item reference is missing in Subcontracting Receipt {0}").format( - source_doc.name - ) + if notify: + frappe.msgprint( + _("Purchase Receipt {0} created.").format( + get_link_to_form(target_doc.doctype, target_doc.name) + ), + indicator="green", + alert=True, ) - target_doc.set_missing_values() - - if (save or submit) and frappe.has_permission(target_doc.doctype, "create"): - target_doc.save() - - if submit and frappe.has_permission(target_doc.doctype, "submit", target_doc): - try: - target_doc.submit() - except Exception as e: - target_doc.add_comment("Comment", _("Submit Action Failed") + "

" + str(e)) - - if notify: - frappe.msgprint( - _("Purchase Receipt {0} created.").format( - get_link_to_form(target_doc.doctype, target_doc.name) - ), - indicator="green", - alert=True, - ) - - return target_doc + return target_doc From 40927c7413985e9b2880f9b657b5efb2d5738238 Mon Sep 17 00:00:00 2001 From: Ninad1306 Date: Tue, 22 Oct 2024 17:00:11 +0530 Subject: [PATCH 0314/1614] test: auto create purchase receipt (cherry picked from commit 59887bbc13c223739750eb27599be5e251bca91e) --- .../test_subcontracting_receipt.py | 43 +++++++++++++++++-- 1 file changed, 40 insertions(+), 3 deletions(-) diff --git a/erpnext/subcontracting/doctype/subcontracting_receipt/test_subcontracting_receipt.py b/erpnext/subcontracting/doctype/subcontracting_receipt/test_subcontracting_receipt.py index 27ad7dbebdf..e0fa7923ef9 100644 --- a/erpnext/subcontracting/doctype/subcontracting_receipt/test_subcontracting_receipt.py +++ b/erpnext/subcontracting/doctype/subcontracting_receipt/test_subcontracting_receipt.py @@ -1075,18 +1075,42 @@ class TestSubcontractingReceipt(FrappeTestCase): @change_settings("Buying Settings", {"auto_create_purchase_receipt": 1}) def test_auto_create_purchase_receipt(self): + from erpnext.buying.doctype.purchase_order.test_purchase_order import create_purchase_order + fg_item = "Subcontracted Item SA1" service_items = [ { "warehouse": "_Test Warehouse - _TC", "item_code": "Subcontracted Service Item 1", - "qty": 5, + "qty": 10, "rate": 100, "fg_item": fg_item, "fg_item_qty": 5, }, ] - sco = get_subcontracting_order(service_items=service_items) + + po = create_purchase_order( + rm_items=service_items, + is_subcontracted=1, + supplier_warehouse="_Test Warehouse 1 - _TC", + do_not_submit=True, + ) + po.append( + "taxes", + { + "account_head": "_Test Account Excise Duty - _TC", + "charge_type": "On Net Total", + "cost_center": "_Test Cost Center - _TC", + "description": "Excise Duty", + "doctype": "Purchase Taxes and Charges", + "rate": 10, + }, + ) + po.save() + po.submit() + + sco = get_subcontracting_order(po_name=po.name) + rm_items = get_rm_items(sco.supplied_items) itemwise_details = make_stock_in_entry(rm_items=rm_items) make_stock_transfer_entry( @@ -1094,11 +1118,24 @@ class TestSubcontractingReceipt(FrappeTestCase): rm_items=rm_items, itemwise_details=copy.deepcopy(itemwise_details), ) + scr = make_subcontracting_receipt(sco.name) + scr.items[0].qty = 3 scr.save() scr.submit() - self.assertTrue(frappe.db.get_value("Purchase Receipt", {"subcontracting_receipt": scr.name})) + pr_details = frappe.get_all( + "Purchase Receipt", + filters={"subcontracting_receipt": scr.name}, + fields=["name", "total_taxes_and_charges"], + ) + + self.assertTrue(pr_details) + + pr_qty = frappe.db.get_value("Purchase Receipt Item", {"parent": pr_details[0]["name"]}, "qty") + self.assertEqual(pr_qty, 6) + + self.assertEqual(pr_details[0]["total_taxes_and_charges"], 60) def test_use_serial_batch_fields_for_subcontracting_receipt(self): fg_item = make_item( From 41db040a60c88afb8d61b52327227ad282488c3b Mon Sep 17 00:00:00 2001 From: Ninad1306 Date: Tue, 22 Oct 2024 17:24:46 +0530 Subject: [PATCH 0315/1614] fix: better implementation, handle missing purchase order (cherry picked from commit 66211dafd69ecbdc56a52d8391b6fdcf02c3154a) --- .../subcontracting_receipt.py | 119 ++++++++++-------- 1 file changed, 69 insertions(+), 50 deletions(-) diff --git a/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.py b/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.py index 13010d8448c..50ce270c166 100644 --- a/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.py +++ b/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.py @@ -690,64 +690,83 @@ def make_purchase_receipt(source_name, target_doc=None, save=False, submit=False if source_doc.is_return: return - po_doc = frappe.get_doc("Purchase Order", source_doc.items[0].purchase_order) - target_doc = get_mapped_doc( - "Purchase Order", - po_doc.name, - { - "Purchase Order": { - "doctype": "Purchase Receipt", - "validation": { - "docstatus": ["=", 1], - }, - "field_no_map": ["items"], - }, - "Purchase Taxes and Charges": {"doctype": "Purchase Taxes and Charges", "reset_value": True}, - }, - ) - - target_doc.update( - { - "posting_date": source_doc.posting_date, - "posting_time": source_doc.posting_time, - "subcontracting_receipt": source_doc.name, - "supplier_warehouse": source_doc.supplier_warehouse, - "is_subcontracted": 1, - "is_old_subcontracting_flow": 0, - "currency": frappe.get_cached_value("Company", target_doc.company, "default_currency"), - } - ) - - po_items_details = {po_item.name: po_item for po_item in po_doc.items} - + po_sr_item_dict = {} + po_name = None for item in source_doc.items: - if po_item := po_items_details.get(item.purchase_order_item): - conversion_factor = flt(po_item.qty) / flt(po_item.fg_item_qty) - item_row = { - "item_code": po_item.item_code, - "item_name": po_item.item_name, - "conversion_factor": conversion_factor, - "qty": flt(item.qty) * conversion_factor, - "rejected_qty": flt(item.rejected_qty) * conversion_factor, - "uom": po_item.uom, - "rate": po_item.rate, - "warehouse": item.warehouse, - "rejected_warehouse": item.rejected_warehouse, - "purchase_order": po_doc.name, - "purchase_order_item": item.purchase_order_item, - "subcontracting_receipt_item": item.name, - "project": po_item.project, - } - target_doc.append("items", item_row) + if not item.purchase_order: + continue - if not target_doc.items: + if not po_name: + po_name = item.purchase_order + + po_sr_item_dict[item.purchase_order_item] = { + "qty": flt(item.qty), + "rejected_qty": flt(item.rejected_qty), + "warehouse": item.warehouse, + "rejected_warehouse": item.rejected_warehouse, + "subcontracting_receipt_item": item.name, + } + + if not po_name: frappe.throw( _("Purchase Order Item reference is missing in Subcontracting Receipt {0}").format( source_doc.name ) ) - target_doc.set_missing_values() + def update_item(obj, target, source_parent): + sr_item_details = po_sr_item_dict.get(obj.name) + ratio = flt(obj.qty) / flt(obj.fg_item_qty) + + target.update( + { + "qty": ratio * sr_item_details["qty"], + "rejected_qty": ratio * sr_item_details["rejected_qty"], + "warehouse": sr_item_details["warehouse"], + "rejected_warehouse": sr_item_details["rejected_warehouse"], + "subcontracting_receipt_item": sr_item_details["subcontracting_receipt_item"], + } + ) + + def post_process(source, target): + target.set_missing_values() + target.update( + { + "posting_date": source_doc.posting_date, + "posting_time": source_doc.posting_time, + "subcontracting_receipt": source_doc.name, + "supplier_warehouse": source_doc.supplier_warehouse, + "is_subcontracted": 1, + "is_old_subcontracting_flow": 0, + "currency": frappe.get_cached_value("Company", target.company, "default_currency"), + } + ) + + target_doc = get_mapped_doc( + "Purchase Order", + po_name, + { + "Purchase Order": { + "doctype": "Purchase Receipt", + "field_map": {"supplier_warehouse": "supplier_warehouse"}, + "validation": { + "docstatus": ["=", 1], + }, + }, + "Purchase Order Item": { + "doctype": "Purchase Receipt Item", + "field_map": { + "name": "purchase_order_item", + "parent": "purchase_order", + "bom": "bom", + }, + "postprocess": update_item, + "condition": lambda doc: doc.name in po_sr_item_dict, + }, + "Purchase Taxes and Charges": {"doctype": "Purchase Taxes and Charges", "reset_value": True}, + }, + postprocess=post_process, + ) if (save or submit) and frappe.has_permission(target_doc.doctype, "create"): target_doc.save() From 879b2b778a6421c62b977cac82f9568da172ed04 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 22 Oct 2024 19:43:16 +0200 Subject: [PATCH 0316/1614] fix: use correct variable in error message (backport #43790) (#43792) Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com> fix: use correct variable in error message (#43790) --- erpnext/controllers/accounts_controller.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 21adab8bc1e..188cbf0587c 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -393,16 +393,14 @@ class AccountsController(TransactionBase): def validate_return_against_account(self): if self.doctype in ["Sales Invoice", "Purchase Invoice"] and self.is_return and self.return_against: cr_dr_account_field = "debit_to" if self.doctype == "Sales Invoice" else "credit_to" - cr_dr_account_label = self.meta.get_label(cr_dr_account_field) - cr_dr_account = self.get(cr_dr_account_field) original_account = frappe.get_value(self.doctype, self.return_against, cr_dr_account_field) - if original_account != cr_dr_account: + if original_account != self.get(cr_dr_account_field): frappe.throw( _( "Please set {0} to {1}, the same account that was used in the original invoice {2}." ).format( - frappe.bold(_(cr_dr_account_label, context=self.doctype)), - frappe.bold(cr_dr_account), + frappe.bold(_(self.meta.get_label(cr_dr_account_field), context=self.doctype)), + frappe.bold(original_account), frappe.bold(self.return_against), ) ) From e0a45a5a5481f6c5328bed01a449994279a376e2 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Wed, 23 Oct 2024 04:48:23 +0000 Subject: [PATCH 0317/1614] chore(release): Bumped to Version 15.39.0 # [15.39.0](https://github.com/frappe/erpnext/compare/v15.38.4...v15.39.0) (2024-10-23) ### Bug Fixes * "show_remarks" checkbox in Process statement of accounts ([f7717c9](https://github.com/frappe/erpnext/commit/f7717c91bc48869a03ba5d76b0ac1e8879dfc074)) * added validation for UOM must be whole number (backport [#43710](https://github.com/frappe/erpnext/issues/43710)) ([#43712](https://github.com/frappe/erpnext/issues/43712)) ([60ffcd0](https://github.com/frappe/erpnext/commit/60ffcd0574bebbfa3e91fe82744c14792f9d8ad2)) * Call super onload_post_render inside pos_invoice.js ([1281d9d](https://github.com/frappe/erpnext/commit/1281d9d21dd2628fe755881b6d7189c0c5848ee7)) * coupon code validation logic ([aeaadb1](https://github.com/frappe/erpnext/commit/aeaadb1e300b622abf54d35364a471463b504a2e)) * **deferred_revenue:** Escape account in query ([fac27d9](https://github.com/frappe/erpnext/commit/fac27d9dff8fbd6babcbf92ede6a94d51484e36f)) * do not make new depreciation for fully depreciated asset ([ddb38db](https://github.com/frappe/erpnext/commit/ddb38db5c46fb20cecd1fd6dcca2ef2168d8a9f9)) * Freeze Screen on load invoices on POS Closing Entry ([f343d5a](https://github.com/frappe/erpnext/commit/f343d5a24dbcc38b63b9c94182d69cdea701b6db)) * get party advance amount based on account ([b673377](https://github.com/frappe/erpnext/commit/b673377b70210f2004df0cbc9eab29f86e17d778)) * get period estimate till service end date ([148d7e7](https://github.com/frappe/erpnext/commit/148d7e798bbe66cee8c8f3e5e0ed1db7dca8d734)) * get stock accounts from the doc instead of db in validate_stock_accounts ([39387e9](https://github.com/frappe/erpnext/commit/39387e9f54ddd27f77ddfb268a7d92e0c3e66f7b)) * incorrect amount in bank clearance ([52be45c](https://github.com/frappe/erpnext/commit/52be45c5dff5f0fcfb3573ba94f177816c3fa67b)) * lead create opp from connection not working ([9e56f21](https://github.com/frappe/erpnext/commit/9e56f213a3c7149a2067944f4adb274af69598f6)) * list view and form status not same for purchase order (backport [#43690](https://github.com/frappe/erpnext/issues/43690)) ([#43692](https://github.com/frappe/erpnext/issues/43692)) ([a33d553](https://github.com/frappe/erpnext/commit/a33d5535a7c88de749bfd47855717ac1410b65fb)) * only show pay button for specific doctype in portal ([d2e5b2a](https://github.com/frappe/erpnext/commit/d2e5b2aa1d22cdcaccc62b412732b8d12f9b1aa3)) * party_balance based on company in payment entry ([04fbcc6](https://github.com/frappe/erpnext/commit/04fbcc64ff661689e5b8e7a62569ef54674b64f1)) * remove extra space ([50dd8d9](https://github.com/frappe/erpnext/commit/50dd8d9df756fa1bf64fa0d86b719b6aeffd0228)) * removed unmerged patches ([2e0cf36](https://github.com/frappe/erpnext/commit/2e0cf36901b52369cd95c73a331269d123f94612)) * Required Changes to Support e-Waybill Generation for Material Transfer Return ([#43061](https://github.com/frappe/erpnext/issues/43061)) ([2205ae8](https://github.com/frappe/erpnext/commit/2205ae8e54126a868825bb6cb6fa54d01498b298)) * show total amount on report summary ([ab20344](https://github.com/frappe/erpnext/commit/ab20344141e60c43464263454a7c531cc0fd2b5e)) * use correct variable in error message (backport [#43790](https://github.com/frappe/erpnext/issues/43790)) ([#43792](https://github.com/frappe/erpnext/issues/43792)) ([879b2b7](https://github.com/frappe/erpnext/commit/879b2b778a6421c62b977cac82f9568da172ed04)) * Workspace link for Work Order Consumed Materials report (backport [#43753](https://github.com/frappe/erpnext/issues/43753)) ([#43754](https://github.com/frappe/erpnext/issues/43754)) ([1fa9030](https://github.com/frappe/erpnext/commit/1fa9030aee13c39c6aade9779145d86ff976ce90)) ### Features * added assignee email field in asset maintenance log ([a3b8f97](https://github.com/frappe/erpnext/commit/a3b8f9759d79d9ad45173248ab4bf3bb343aafc6)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index e28b6e9bb91..a5b8609d1d9 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.38.4" +__version__ = "15.39.0" def get_default_company(user=None): From ced76ca5c0b2e66e13781353ed71f1d95368bf87 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 23 Oct 2024 13:07:16 +0530 Subject: [PATCH 0318/1614] perf: performance optimizations for accounting reports by refactoring account closing balance and period closing voucher (#43798) * fix: Gl Entry form cleanup * fix: Added indexes in gl entry table * perf: Refactored period closing voucher to handle large volume of gle * fix: fixes as per new period start and end date fields in PCV * perf: performance optimization for accounting reports * perf: performance optimizations for account closing balance patch * fix: test cases * fix: lenter issues - direct use of sql query * fix: test cases * fix: test cases * fix: test cases * fix: wrong fieldname * fix: test cases --- .../account_closing_balance.py | 4 +- .../accounting_period/accounting_period.py | 2 + .../accounts/doctype/gl_entry/gl_entry.json | 106 ++- erpnext/accounts/doctype/gl_entry/gl_entry.py | 3 +- .../test_payment_reconciliation.py | 6 +- .../period_closing_voucher.js | 18 + .../period_closing_voucher.json | 38 +- .../period_closing_voucher.py | 721 ++++++++++-------- .../test_period_closing_voucher.py | 8 +- .../repost_accounting_ledger.py | 4 +- .../test_repost_accounting_ledger.py | 6 +- erpnext/accounts/general_ledger.py | 34 +- .../accounts_receivable.py | 29 +- .../accounts/report/financial_statements.py | 143 ++-- .../report/trial_balance/trial_balance.py | 20 +- erpnext/patches.txt | 1 + .../fix_additional_cost_in_mfg_stock_entry.py | 2 +- .../v14_0/set_period_start_end_date_in_pcv.py | 17 + .../patches/v14_0/single_to_multi_dunning.py | 2 +- .../patches/v14_0/update_closing_balances.py | 105 +-- .../doctype/delivery_note/delivery_note.py | 25 +- .../repost_item_valuation.py | 2 +- .../stock/doctype/stock_entry/stock_entry.py | 8 +- erpnext/stock/report/test_reports.py | 3 +- erpnext/tests/test_perf.py | 2 +- 25 files changed, 772 insertions(+), 537 deletions(-) create mode 100644 erpnext/patches/v14_0/set_period_start_end_date_in_pcv.py diff --git a/erpnext/accounts/doctype/account_closing_balance/account_closing_balance.py b/erpnext/accounts/doctype/account_closing_balance/account_closing_balance.py index 82821e140ea..6d5e023f039 100644 --- a/erpnext/accounts/doctype/account_closing_balance/account_closing_balance.py +++ b/erpnext/accounts/doctype/account_closing_balance/account_closing_balance.py @@ -113,9 +113,9 @@ def get_previous_closing_entries(company, closing_date, accounting_dimensions): entries = [] last_period_closing_voucher = frappe.db.get_all( "Period Closing Voucher", - filters={"docstatus": 1, "company": company, "posting_date": ("<", closing_date)}, + filters={"docstatus": 1, "company": company, "period_end_date": ("<", closing_date)}, fields=["name"], - order_by="posting_date desc", + order_by="period_end_date desc", limit=1, ) diff --git a/erpnext/accounts/doctype/accounting_period/accounting_period.py b/erpnext/accounts/doctype/accounting_period/accounting_period.py index 172ef93f14d..300d216618e 100644 --- a/erpnext/accounts/doctype/accounting_period/accounting_period.py +++ b/erpnext/accounts/doctype/accounting_period/accounting_period.py @@ -101,6 +101,8 @@ def validate_accounting_period_on_doc_save(doc, method=None): date = doc.available_for_use_date elif doc.doctype == "Asset Repair": date = doc.completion_date + elif doc.doctype == "Period Closing Voucher": + date = doc.period_end_date else: date = doc.posting_date diff --git a/erpnext/accounts/doctype/gl_entry/gl_entry.json b/erpnext/accounts/doctype/gl_entry/gl_entry.json index 2d106ad8cee..c285a33f73e 100644 --- a/erpnext/accounts/doctype/gl_entry/gl_entry.json +++ b/erpnext/accounts/doctype/gl_entry/gl_entry.json @@ -6,38 +6,50 @@ "document_type": "Document", "engine": "InnoDB", "field_order": [ + "dates_section", "posting_date", "transaction_date", + "column_break_avko", + "fiscal_year", + "due_date", + "account_details_section", "account", + "account_currency", + "column_break_ifvf", + "against", "party_type", "party", - "cost_center", - "debit", - "credit", - "account_currency", - "debit_in_account_currency", - "credit_in_account_currency", - "against", + "transaction_details_section", + "voucher_type", + "voucher_no", + "voucher_subtype", + "transaction_currency", + "column_break_dpsx", "against_voucher_type", "against_voucher", - "voucher_type", - "voucher_subtype", - "voucher_no", "voucher_detail_no", + "transaction_exchange_rate", + "amounts_section", + "debit_in_account_currency", + "debit", + "debit_in_transaction_currency", + "column_break_bm1w", + "credit_in_account_currency", + "credit", + "credit_in_transaction_currency", + "dimensions_section", + "cost_center", + "column_break_lmnm", "project", - "remarks", + "more_info_section", + "finance_book", + "company", "is_opening", "is_advance", - "fiscal_year", - "company", - "finance_book", + "column_break_8abq", "to_rename", - "due_date", "is_cancelled", - "transaction_currency", - "debit_in_transaction_currency", - "credit_in_transaction_currency", - "transaction_exchange_rate" + "remarks" ], "fields": [ { @@ -285,13 +297,67 @@ "fieldname": "voucher_subtype", "fieldtype": "Small Text", "label": "Voucher Subtype" + }, + { + "fieldname": "dates_section", + "fieldtype": "Section Break", + "label": "Dates" + }, + { + "fieldname": "column_break_avko", + "fieldtype": "Column Break" + }, + { + "fieldname": "account_details_section", + "fieldtype": "Section Break", + "label": "Account Details" + }, + { + "fieldname": "column_break_ifvf", + "fieldtype": "Column Break" + }, + { + "fieldname": "transaction_details_section", + "fieldtype": "Section Break", + "label": "Transaction Details" + }, + { + "fieldname": "amounts_section", + "fieldtype": "Section Break", + "label": "Amounts" + }, + { + "fieldname": "column_break_dpsx", + "fieldtype": "Column Break" + }, + { + "fieldname": "more_info_section", + "fieldtype": "Section Break", + "label": "More Info" + }, + { + "fieldname": "column_break_bm1w", + "fieldtype": "Column Break" + }, + { + "fieldname": "dimensions_section", + "fieldtype": "Section Break", + "label": "Dimensions" + }, + { + "fieldname": "column_break_lmnm", + "fieldtype": "Column Break" + }, + { + "fieldname": "column_break_8abq", + "fieldtype": "Column Break" } ], "icon": "fa fa-list", "idx": 1, "in_create": 1, "links": [], - "modified": "2024-07-02 14:31:51.496466", + "modified": "2024-08-22 13:03:39.997475", "modified_by": "Administrator", "module": "Accounts", "name": "GL Entry", diff --git a/erpnext/accounts/doctype/gl_entry/gl_entry.py b/erpnext/accounts/doctype/gl_entry/gl_entry.py index d74224c4aa2..a7e7edb098d 100644 --- a/erpnext/accounts/doctype/gl_entry/gl_entry.py +++ b/erpnext/accounts/doctype/gl_entry/gl_entry.py @@ -430,8 +430,9 @@ def update_against_account(voucher_type, voucher_no): def on_doctype_update(): - frappe.db.add_index("GL Entry", ["against_voucher_type", "against_voucher"]) frappe.db.add_index("GL Entry", ["voucher_type", "voucher_no"]) + frappe.db.add_index("GL Entry", ["posting_date", "company"]) + frappe.db.add_index("GL Entry", ["party_type", "party"]) def rename_gle_sle_docs(): diff --git a/erpnext/accounts/doctype/payment_reconciliation/test_payment_reconciliation.py b/erpnext/accounts/doctype/payment_reconciliation/test_payment_reconciliation.py index 883c638398c..1b19949bb7e 100644 --- a/erpnext/accounts/doctype/payment_reconciliation/test_payment_reconciliation.py +++ b/erpnext/accounts/doctype/payment_reconciliation/test_payment_reconciliation.py @@ -1986,13 +1986,15 @@ def make_period_closing_voucher(company, cost_center, posting_date=None, submit= parent_account=parent_account, doctype="Account", ) + fy = get_fiscal_year(posting_date, company=company) pcv = frappe.get_doc( { "doctype": "Period Closing Voucher", "transaction_date": posting_date or today(), - "posting_date": posting_date or today(), + "period_start_date": fy[1], + "period_end_date": fy[2], "company": company, - "fiscal_year": get_fiscal_year(posting_date or today(), company=company)[0], + "fiscal_year": fy[0], "cost_center": cost_center, "closing_account_head": surplus_account, "remarks": "test", diff --git a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.js b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.js index 82d8cb37fe7..095310c7e70 100644 --- a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.js +++ b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.js @@ -19,6 +19,24 @@ frappe.ui.form.on("Period Closing Voucher", { }); }, + fiscal_year: function (frm) { + if (frm.doc.fiscal_year) { + frappe.call({ + method: "erpnext.accounts.doctype.period_closing_voucher.period_closing_voucher.get_period_start_end_date", + args: { + fiscal_year: frm.doc.fiscal_year, + company: frm.doc.company, + }, + callback: function (r) { + if (r.message) { + frm.set_value("period_start_date", r.message[0]); + frm.set_value("period_end_date", r.message[1]); + } + }, + }); + } + }, + refresh: function (frm) { if (frm.doc.docstatus > 0) { frm.add_custom_button( diff --git a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.json b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.json index 624b5f82f64..f41cff0e0d8 100644 --- a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.json +++ b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.json @@ -6,39 +6,32 @@ "engine": "InnoDB", "field_order": [ "transaction_date", - "posting_date", - "fiscal_year", - "year_start_date", - "amended_from", "company", + "fiscal_year", + "period_start_date", + "period_end_date", + "amended_from", "column_break1", "closing_account_head", - "remarks", "gle_processing_status", + "remarks", "error_message" ], "fields": [ { + "default": "Today", "fieldname": "transaction_date", "fieldtype": "Date", "label": "Transaction Date", "oldfieldname": "transaction_date", "oldfieldtype": "Date" }, - { - "fieldname": "posting_date", - "fieldtype": "Date", - "label": "Posting Date", - "oldfieldname": "posting_date", - "oldfieldtype": "Date", - "reqd": 1 - }, { "fieldname": "fiscal_year", "fieldtype": "Link", "in_list_view": 1, "in_standard_filter": 1, - "label": "Closing Fiscal Year", + "label": "Fiscal Year", "oldfieldname": "fiscal_year", "oldfieldtype": "Select", "options": "Fiscal Year", @@ -103,16 +96,25 @@ "read_only": 1 }, { - "fieldname": "year_start_date", + "fieldname": "period_end_date", "fieldtype": "Date", - "label": "Year Start Date" + "label": "Period End Date", + "reqd": 1 + }, + { + "fieldname": "period_start_date", + "fieldtype": "Date", + "label": "Period Start Date", + "oldfieldname": "posting_date", + "oldfieldtype": "Date", + "reqd": 1 } ], "icon": "fa fa-file-text", "idx": 1, "is_submittable": 1, "links": [], - "modified": "2023-09-11 20:19:11.810533", + "modified": "2024-09-15 17:22:45.291628", "modified_by": "Administrator", "module": "Accounts", "name": "Period Closing Voucher", @@ -148,7 +150,7 @@ "write": 1 } ], - "search_fields": "posting_date, fiscal_year", + "search_fields": "fiscal_year, period_start_date, period_end_date", "sort_field": "modified", "sort_order": "DESC", "states": [], diff --git a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py index dd8a5ff16c3..d6bd217650b 100644 --- a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py +++ b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py @@ -2,15 +2,20 @@ # License: GNU General Public License v3. See license.txt +import copy + import frappe from frappe import _ from frappe.query_builder.functions import Sum -from frappe.utils import add_days, flt +from frappe.utils import add_days, flt, formatdate, getdate +from erpnext.accounts.doctype.account_closing_balance.account_closing_balance import ( + make_closing_entries, +) from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import ( get_accounting_dimensions, ) -from erpnext.accounts.utils import get_account_currency, get_fiscal_year, validate_fiscal_year +from erpnext.accounts.utils import get_account_currency, get_fiscal_year from erpnext.controllers.accounts_controller import AccountsController @@ -29,36 +34,386 @@ class PeriodClosingVoucher(AccountsController): error_message: DF.Text | None fiscal_year: DF.Link gle_processing_status: DF.Literal["In Progress", "Completed", "Failed"] - posting_date: DF.Date + period_end_date: DF.Date + period_start_date: DF.Date remarks: DF.SmallText transaction_date: DF.Date | None - year_start_date: DF.Date | None # end: auto-generated types def validate(self): - self.validate_account_head() - self.validate_posting_date() + self.validate_start_and_end_date() + self.check_if_previous_year_closed() + self.block_if_future_closing_voucher_exists() + self.check_closing_account_type() + self.check_closing_account_currency() + + def validate_start_and_end_date(self): + self.fy_start_date, self.fy_end_date = frappe.db.get_value( + "Fiscal Year", self.fiscal_year, ["year_start_date", "year_end_date"] + ) + + prev_closed_period_end_date = get_previous_closed_period_in_current_year( + self.fiscal_year, self.company + ) + valid_start_date = ( + add_days(prev_closed_period_end_date, 1) if prev_closed_period_end_date else self.fy_start_date + ) + + if getdate(self.period_start_date) != getdate(valid_start_date): + frappe.throw(_("Period Start Date must be {0}").format(formatdate(valid_start_date))) + + if getdate(self.period_start_date) > getdate(self.period_end_date): + frappe.throw(_("Period Start Date cannot be greater than Period End Date")) + + if getdate(self.period_end_date) > getdate(self.fy_end_date): + frappe.throw(_("Period End Date cannot be greater than Fiscal Year End Date")) + + def check_if_previous_year_closed(self): + last_year_closing = add_days(self.fy_start_date, -1) + previous_fiscal_year = get_fiscal_year(last_year_closing, company=self.company, boolean=True) + if not previous_fiscal_year: + return + + previous_fiscal_year_start_date = previous_fiscal_year[0][1] + gle_exists_in_previous_year = frappe.db.exists( + "GL Entry", + { + "posting_date": ("between", [previous_fiscal_year_start_date, last_year_closing]), + "company": self.company, + "is_cancelled": 0, + }, + ) + if not gle_exists_in_previous_year: + return + + previous_fiscal_year_closed = frappe.db.exists( + "Period Closing Voucher", + { + "period_end_date": ("between", [previous_fiscal_year_start_date, last_year_closing]), + "docstatus": 1, + "company": self.company, + }, + ) + if not previous_fiscal_year_closed: + frappe.throw(_("Previous Year is not closed, please close it first")) + + def block_if_future_closing_voucher_exists(self): + future_closing_voucher = self.get_future_closing_voucher() + if future_closing_voucher and future_closing_voucher[0][0]: + action = "cancel" if self.docstatus == 2 else "create" + frappe.throw( + _( + "You cannot {0} this document because another Period Closing Entry {1} exists after {2}" + ).format(action, future_closing_voucher[0][0], self.period_end_date) + ) + + def get_future_closing_voucher(self): + return frappe.db.get_value( + "Period Closing Voucher", + {"period_end_date": (">", self.period_end_date), "docstatus": 1, "company": self.company}, + "name", + ) + + def check_closing_account_type(self): + closing_account_type = frappe.get_cached_value("Account", self.closing_account_head, "root_type") + + if closing_account_type not in ["Liability", "Equity"]: + frappe.throw( + _("Closing Account {0} must be of type Liability / Equity").format(self.closing_account_head) + ) + + def check_closing_account_currency(self): + account_currency = get_account_currency(self.closing_account_head) + company_currency = frappe.get_cached_value("Company", self.company, "default_currency") + if account_currency != company_currency: + frappe.throw(_("Currency of the Closing Account must be {0}").format(company_currency)) def on_submit(self): self.db_set("gle_processing_status", "In Progress") - get_opening_entries = False - - if not frappe.db.exists( - "Period Closing Voucher", {"company": self.company, "docstatus": 1, "name": ("!=", self.name)} - ): - get_opening_entries = True - - self.make_gl_entries(get_opening_entries=get_opening_entries) + self.make_gl_entries() def on_cancel(self): - self.validate_future_closing_vouchers() - self.db_set("gle_processing_status", "In Progress") self.ignore_linked_doctypes = ("GL Entry", "Stock Ledger Entry", "Payment Ledger Entry") - gle_count = frappe.db.count( + self.block_if_future_closing_voucher_exists() + self.db_set("gle_processing_status", "In Progress") + self.cancel_gl_entries() + + def make_gl_entries(self): + if self.get_gle_count_in_selected_period() > 5000: + frappe.enqueue( + process_gl_and_closing_entries, + doc=self, + timeout=1800, + ) + frappe.msgprint( + _( + "The GL Entries and closing balances will be processed in the background, it can take a few minutes." + ), + alert=True, + ) + else: + process_gl_and_closing_entries(self) + + def get_gle_count_in_selected_period(self): + return frappe.db.count( "GL Entry", - {"voucher_type": "Period Closing Voucher", "voucher_no": self.name, "is_cancelled": 0}, + { + "posting_date": ["between", [self.period_start_date, self.period_end_date]], + "company": self.company, + "is_cancelled": 0, + }, ) - if gle_count > 5000: + + def get_pcv_gl_entries(self): + self.pl_accounts_reverse_gle = [] + self.closing_account_gle = [] + + pl_account_balances = self.get_account_balances_based_on_dimensions(report_type="Profit and Loss") + for dimensions, account_balances in pl_account_balances.items(): + for acc, balances in account_balances.items(): + balance_in_company_currency = flt(balances.debit_in_account_currency) - flt( + balances.credit_in_account_currency + ) + if balance_in_company_currency and acc != "balances": + self.pl_accounts_reverse_gle.append( + self.get_gle_for_pl_account(acc, balances, dimensions) + ) + + # closing liability account + self.closing_account_gle.append( + self.get_gle_for_closing_account(account_balances["balances"], dimensions) + ) + + return self.pl_accounts_reverse_gle + self.closing_account_gle + + def get_gle_for_pl_account(self, acc, balances, dimensions): + balance_in_account_currency = flt(balances.debit_in_account_currency) - flt( + balances.credit_in_account_currency + ) + balance_in_company_currency = flt(balances.debit) - flt(balances.credit) + gl_entry = frappe._dict( + { + "company": self.company, + "posting_date": self.period_end_date, + "account": acc, + "account_currency": balances.account_currency, + "debit_in_account_currency": abs(balance_in_account_currency) + if balance_in_account_currency < 0 + else 0, + "debit": abs(balance_in_company_currency) if balance_in_company_currency < 0 else 0, + "credit_in_account_currency": abs(balance_in_account_currency) + if balance_in_account_currency > 0 + else 0, + "credit": abs(balance_in_company_currency) if balance_in_company_currency > 0 else 0, + "is_period_closing_voucher_entry": 1, + "voucher_type": "Period Closing Voucher", + "voucher_no": self.name, + "fiscal_year": self.fiscal_year, + "remarks": self.remarks, + "is_opening": "No", + } + ) + self.update_default_dimensions(gl_entry, dimensions) + return gl_entry + + def get_gle_for_closing_account(self, dimension_balance, dimensions): + balance_in_account_currency = flt(dimension_balance.balance_in_account_currency) + balance_in_company_currency = flt(dimension_balance.balance_in_company_currency) + gl_entry = frappe._dict( + { + "company": self.company, + "posting_date": self.period_end_date, + "account": self.closing_account_head, + "account_currency": frappe.db.get_value( + "Account", self.closing_account_head, "account_currency" + ), + "debit_in_account_currency": balance_in_account_currency + if balance_in_account_currency > 0 + else 0, + "debit": balance_in_company_currency if balance_in_company_currency > 0 else 0, + "credit_in_account_currency": abs(balance_in_account_currency) + if balance_in_account_currency < 0 + else 0, + "credit": abs(balance_in_company_currency) if balance_in_company_currency < 0 else 0, + "is_period_closing_voucher_entry": 1, + "voucher_type": "Period Closing Voucher", + "voucher_no": self.name, + "fiscal_year": self.fiscal_year, + "remarks": self.remarks, + "is_opening": "No", + } + ) + self.update_default_dimensions(gl_entry, dimensions) + return gl_entry + + def update_default_dimensions(self, gl_entry, dimensions): + for i, dimension in enumerate(self.accounting_dimension_fields): + gl_entry[dimension] = dimensions[i] + + def get_account_balances_based_on_dimensions(self, report_type): + """Get balance for dimension-wise pl accounts""" + self.get_accounting_dimension_fields() + acc_bal_dict = frappe._dict() + gl_entries = [] + + with frappe.db.unbuffered_cursor(): + gl_entries = self.get_gl_entries_for_current_period(report_type, as_iterator=True) + for gle in gl_entries: + acc_bal_dict = self.set_account_balance_dict(gle, acc_bal_dict) + + if report_type == "Balance Sheet" and self.is_first_period_closing_voucher(): + opening_entries = self.get_gl_entries_for_current_period(report_type, only_opening_entries=True) + for gle in opening_entries: + acc_bal_dict = self.set_account_balance_dict(gle, acc_bal_dict) + + return acc_bal_dict + + def get_accounting_dimension_fields(self): + default_dimensions = ["cost_center", "finance_book", "project"] + self.accounting_dimension_fields = default_dimensions + get_accounting_dimensions() + + def get_gl_entries_for_current_period(self, report_type, only_opening_entries=False, as_iterator=False): + date_condition = "" + if only_opening_entries: + date_condition = "is_opening = 'Yes'" + else: + date_condition = f"posting_date BETWEEN '{self.period_start_date}' AND '{self.period_end_date}' and is_opening = 'No'" + + # nosemgrep + return frappe.db.sql( + """ + SELECT + name, + posting_date, + account, + account_currency, + debit_in_account_currency, + credit_in_account_currency, + debit, + credit, + {} + FROM `tabGL Entry` + WHERE + {} + AND company = %s + AND voucher_type != 'Period Closing Voucher' + AND EXISTS(SELECT name FROM `tabAccount` WHERE name = account AND report_type = %s) + AND is_cancelled = 0 + """.format( + ", ".join(self.accounting_dimension_fields), + date_condition, + ), + (self.company, report_type), + as_dict=1, + as_iterator=as_iterator, + ) + + def set_account_balance_dict(self, gle, acc_bal_dict): + key = self.get_key(gle) + + acc_bal_dict.setdefault(key, frappe._dict()).setdefault( + gle.account, + frappe._dict( + { + "debit_in_account_currency": 0, + "credit_in_account_currency": 0, + "debit": 0, + "credit": 0, + "account_currency": gle.account_currency, + } + ), + ) + + acc_bal_dict[key][gle.account].debit_in_account_currency += flt(gle.debit_in_account_currency) + acc_bal_dict[key][gle.account].credit_in_account_currency += flt(gle.credit_in_account_currency) + acc_bal_dict[key][gle.account].debit += flt(gle.debit) + acc_bal_dict[key][gle.account].credit += flt(gle.credit) + + # dimension-wise total balances + acc_bal_dict[key].setdefault( + "balances", + frappe._dict( + { + "balance_in_account_currency": 0, + "balance_in_company_currency": 0, + } + ), + ) + + balance_in_account_currency = flt(gle.debit_in_account_currency) - flt(gle.credit_in_account_currency) + balance_in_company_currency = flt(gle.debit) - flt(gle.credit) + + acc_bal_dict[key]["balances"].balance_in_account_currency += balance_in_account_currency + acc_bal_dict[key]["balances"].balance_in_company_currency += balance_in_company_currency + + return acc_bal_dict + + def get_key(self, gle): + return tuple([gle.get(dimension) for dimension in self.accounting_dimension_fields]) + + def get_account_closing_balances(self): + pl_closing_entries = self.get_closing_entries_for_pl_accounts() + bs_closing_entries = self.get_closing_entries_for_balance_sheet_accounts() + closing_entries = pl_closing_entries + bs_closing_entries + return closing_entries + + def get_closing_entries_for_pl_accounts(self): + closing_entries = copy.deepcopy(self.pl_accounts_reverse_gle) + for d in self.pl_accounts_reverse_gle: + # reverse debit and credit + gle_copy = copy.deepcopy(d) + gle_copy.debit = d.credit + gle_copy.credit = d.debit + gle_copy.debit_in_account_currency = d.credit_in_account_currency + gle_copy.credit_in_account_currency = d.debit_in_account_currency + gle_copy.is_period_closing_voucher_entry = 0 + gle_copy.period_closing_voucher = self.name + closing_entries.append(gle_copy) + + return closing_entries + + def get_closing_entries_for_balance_sheet_accounts(self): + closing_entries = [] + balance_sheet_account_balances = self.get_account_balances_based_on_dimensions( + report_type="Balance Sheet" + ) + + for dimensions, account_balances in balance_sheet_account_balances.items(): + for acc, balances in account_balances.items(): + balance_in_company_currency = flt(balances.debit_in_account_currency) - flt( + balances.credit_in_account_currency + ) + if acc != "balances" and balance_in_company_currency: + closing_entries.append(self.get_closing_entry(acc, balances, dimensions)) + + return closing_entries + + def get_closing_entry(self, account, balances, dimensions): + closing_entry = frappe._dict( + { + "company": self.company, + "closing_date": self.period_end_date, + "period_closing_voucher": self.name, + "account": account, + "account_currency": balances.account_currency, + "debit_in_account_currency": flt(balances.debit_in_account_currency), + "debit": flt(balances.debit), + "credit_in_account_currency": flt(balances.credit_in_account_currency), + "credit": flt(balances.credit), + "is_period_closing_voucher_entry": 0, + } + ) + self.update_default_dimensions(closing_entry, dimensions) + return closing_entry + + def is_first_period_closing_voucher(self): + return not frappe.db.exists( + "Period Closing Voucher", + {"company": self.company, "docstatus": 1, "name": ("!=", self.name)}, + ) + + def cancel_gl_entries(self): + if self.get_gle_count_against_current_pcv() > 5000: frappe.enqueue( process_cancellation, voucher_type="Period Closing Voucher", @@ -73,308 +428,30 @@ class PeriodClosingVoucher(AccountsController): else: process_cancellation(voucher_type="Period Closing Voucher", voucher_no=self.name) - def validate_future_closing_vouchers(self): - if frappe.db.exists( - "Period Closing Voucher", - {"posting_date": (">", self.posting_date), "docstatus": 1, "company": self.company}, - ): - frappe.throw( - _( - "You can not cancel this Period Closing Voucher, please cancel the future Period Closing Vouchers first" - ) - ) - - def validate_account_head(self): - closing_account_type = frappe.get_cached_value("Account", self.closing_account_head, "root_type") - - if closing_account_type not in ["Liability", "Equity"]: - frappe.throw( - _("Closing Account {0} must be of type Liability / Equity").format(self.closing_account_head) - ) - - account_currency = get_account_currency(self.closing_account_head) - company_currency = frappe.get_cached_value("Company", self.company, "default_currency") - if account_currency != company_currency: - frappe.throw(_("Currency of the Closing Account must be {0}").format(company_currency)) - - def validate_posting_date(self): - validate_fiscal_year( - self.posting_date, self.fiscal_year, self.company, label=_("Posting Date"), doc=self - ) - - self.year_start_date = get_fiscal_year(self.posting_date, self.fiscal_year, company=self.company)[1] - - self.check_if_previous_year_closed() - - pcv = frappe.qb.DocType("Period Closing Voucher") - existing_entry = ( - frappe.qb.from_(pcv) - .select(pcv.name) - .where( - (pcv.posting_date >= self.posting_date) - & (pcv.fiscal_year == self.fiscal_year) - & (pcv.docstatus == 1) - & (pcv.company == self.company) - ) - .run() - ) - - if existing_entry and existing_entry[0][0]: - frappe.throw( - _("Another Period Closing Entry {0} has been made after {1}").format( - existing_entry[0][0], self.posting_date - ) - ) - - def check_if_previous_year_closed(self): - last_year_closing = add_days(self.year_start_date, -1) - previous_fiscal_year = get_fiscal_year(last_year_closing, company=self.company, boolean=True) - if not previous_fiscal_year: - return - - previous_fiscal_year_start_date = previous_fiscal_year[0][1] - if not frappe.db.exists( + def get_gle_count_against_current_pcv(self): + return frappe.db.count( "GL Entry", - { - "posting_date": ("between", [previous_fiscal_year_start_date, last_year_closing]), - "company": self.company, - "is_cancelled": 0, - }, - ): - return - - if not frappe.db.exists( - "Period Closing Voucher", - { - "posting_date": ("between", [previous_fiscal_year_start_date, last_year_closing]), - "docstatus": 1, - "company": self.company, - }, - ): - frappe.throw(_("Previous Year is not closed, please close it first")) - - def make_gl_entries(self, get_opening_entries=False): - gl_entries = self.get_gl_entries() - closing_entries = self.get_grouped_gl_entries(get_opening_entries=get_opening_entries) - if len(gl_entries + closing_entries) > 3000: - frappe.enqueue( - process_gl_and_closing_entries, - gl_entries=gl_entries, - closing_entries=closing_entries, - voucher_name=self.name, - company=self.company, - closing_date=self.posting_date, - timeout=3000, - ) - - frappe.msgprint( - _("The GL Entries will be processed in the background, it can take a few minutes."), - alert=True, - ) - else: - process_gl_and_closing_entries( - gl_entries, closing_entries, self.name, self.company, self.posting_date - ) - - def get_grouped_gl_entries(self, get_opening_entries=False): - closing_entries = [] - for acc in self.get_balances_based_on_dimensions( - group_by_account=True, for_aggregation=True, get_opening_entries=get_opening_entries - ): - closing_entries.append(self.get_closing_entries(acc)) - - return closing_entries - - def get_gl_entries(self): - gl_entries = [] - - # pl account - for acc in self.get_balances_based_on_dimensions( - group_by_account=True, report_type="Profit and Loss" - ): - if flt(acc.bal_in_company_currency): - gl_entries.append(self.get_gle_for_pl_account(acc)) - - # closing liability account - for acc in self.get_balances_based_on_dimensions( - group_by_account=False, report_type="Profit and Loss" - ): - if flt(acc.bal_in_company_currency): - gl_entries.append(self.get_gle_for_closing_account(acc)) - - return gl_entries - - def get_gle_for_pl_account(self, acc): - gl_entry = self.get_gl_dict( - { - "company": self.company, - "closing_date": self.posting_date, - "account": acc.account, - "cost_center": acc.cost_center, - "finance_book": acc.finance_book, - "account_currency": acc.account_currency, - "debit_in_account_currency": abs(flt(acc.bal_in_account_currency)) - if flt(acc.bal_in_account_currency) < 0 - else 0, - "debit": abs(flt(acc.bal_in_company_currency)) if flt(acc.bal_in_company_currency) < 0 else 0, - "credit_in_account_currency": abs(flt(acc.bal_in_account_currency)) - if flt(acc.bal_in_account_currency) > 0 - else 0, - "credit": abs(flt(acc.bal_in_company_currency)) - if flt(acc.bal_in_company_currency) > 0 - else 0, - "is_period_closing_voucher_entry": 1, - }, - item=acc, - ) - self.update_default_dimensions(gl_entry, acc) - return gl_entry - - def get_gle_for_closing_account(self, acc): - gl_entry = self.get_gl_dict( - { - "company": self.company, - "closing_date": self.posting_date, - "account": self.closing_account_head, - "cost_center": acc.cost_center, - "finance_book": acc.finance_book, - "account_currency": acc.account_currency, - "debit_in_account_currency": abs(flt(acc.bal_in_account_currency)) - if flt(acc.bal_in_account_currency) > 0 - else 0, - "debit": abs(flt(acc.bal_in_company_currency)) if flt(acc.bal_in_company_currency) > 0 else 0, - "credit_in_account_currency": abs(flt(acc.bal_in_account_currency)) - if flt(acc.bal_in_account_currency) < 0 - else 0, - "credit": abs(flt(acc.bal_in_company_currency)) - if flt(acc.bal_in_company_currency) < 0 - else 0, - "is_period_closing_voucher_entry": 1, - }, - item=acc, - ) - self.update_default_dimensions(gl_entry, acc) - return gl_entry - - def get_closing_entries(self, acc): - closing_entry = self.get_gl_dict( - { - "company": self.company, - "closing_date": self.posting_date, - "period_closing_voucher": self.name, - "account": acc.account, - "cost_center": acc.cost_center, - "finance_book": acc.finance_book, - "account_currency": acc.account_currency, - "debit_in_account_currency": flt(acc.debit_in_account_currency), - "debit": flt(acc.debit), - "credit_in_account_currency": flt(acc.credit_in_account_currency), - "credit": flt(acc.credit), - }, - item=acc, + {"voucher_type": "Period Closing Voucher", "voucher_no": self.name, "is_cancelled": 0}, ) - for dimension in self.accounting_dimensions: - closing_entry.update({dimension: acc.get(dimension)}) - return closing_entry - - def update_default_dimensions(self, gl_entry, acc): - if not self.accounting_dimensions: - self.accounting_dimensions = get_accounting_dimensions() - - for dimension in self.accounting_dimensions: - gl_entry.update({dimension: acc.get(dimension)}) - - def get_balances_based_on_dimensions( - self, group_by_account=False, report_type=None, for_aggregation=False, get_opening_entries=False - ): - """Get balance for dimension-wise pl accounts""" - - qb_dimension_fields = ["cost_center", "finance_book", "project"] - - self.accounting_dimensions = get_accounting_dimensions() - for dimension in self.accounting_dimensions: - qb_dimension_fields.append(dimension) - - if group_by_account: - qb_dimension_fields.append("account") - - account_filters = { - "company": self.company, - "is_group": 0, - } - - if report_type: - account_filters.update({"report_type": report_type}) - - accounts = frappe.get_all("Account", filters=account_filters, pluck="name") - - gl_entry = frappe.qb.DocType("GL Entry") - query = frappe.qb.from_(gl_entry).select(gl_entry.account, gl_entry.account_currency) - - if not for_aggregation: - query = query.select( - (Sum(gl_entry.debit_in_account_currency) - Sum(gl_entry.credit_in_account_currency)).as_( - "bal_in_account_currency" - ), - (Sum(gl_entry.debit) - Sum(gl_entry.credit)).as_("bal_in_company_currency"), - ) - else: - query = query.select( - (Sum(gl_entry.debit_in_account_currency)).as_("debit_in_account_currency"), - (Sum(gl_entry.credit_in_account_currency)).as_("credit_in_account_currency"), - (Sum(gl_entry.debit)).as_("debit"), - (Sum(gl_entry.credit)).as_("credit"), - ) - - for dimension in qb_dimension_fields: - query = query.select(gl_entry[dimension]) - - query = query.where( - (gl_entry.company == self.company) - & (gl_entry.is_cancelled == 0) - & (gl_entry.account.isin(accounts)) - ) - - if get_opening_entries: - query = query.where( - ( # noqa: UP034 - (gl_entry.posting_date.between(self.get("year_start_date"), self.posting_date)) - | (gl_entry.is_opening == "Yes") - ) - ) - else: - query = query.where( - gl_entry.posting_date.between(self.get("year_start_date"), self.posting_date) - & gl_entry.is_opening - == "No" - ) - - if for_aggregation: - query = query.where(gl_entry.voucher_type != "Period Closing Voucher") - - for dimension in qb_dimension_fields: - query = query.groupby(gl_entry[dimension]) - - return query.run(as_dict=1) - - -def process_gl_and_closing_entries(gl_entries, closing_entries, voucher_name, company, closing_date): - from erpnext.accounts.doctype.account_closing_balance.account_closing_balance import ( - make_closing_entries, - ) +def process_gl_and_closing_entries(doc): from erpnext.accounts.general_ledger import make_gl_entries try: + gl_entries = doc.get_pcv_gl_entries() if gl_entries: make_gl_entries(gl_entries, merge_entries=False) - make_closing_entries(gl_entries + closing_entries, voucher_name, company, closing_date) - frappe.db.set_value("Period Closing Voucher", voucher_name, "gle_processing_status", "Completed") + + closing_entries = doc.get_account_closing_balances() + if closing_entries: + make_closing_entries(closing_entries, doc.name, doc.company, doc.period_end_date) + + frappe.db.set_value(doc.doctype, doc.name, "gle_processing_status", "Completed") except Exception as e: frappe.db.rollback() frappe.log_error(e) - frappe.db.set_value("Period Closing Voucher", voucher_name, "gle_processing_status", "Failed") + frappe.db.set_value(doc.doctype, doc.name, "gle_processing_status", "Failed") def process_cancellation(voucher_type, voucher_no): @@ -395,3 +472,29 @@ def delete_closing_entries(voucher_no): frappe.qb.from_(closing_balance).delete().where( closing_balance.period_closing_voucher == voucher_no ).run() + + +@frappe.whitelist() +def get_period_start_end_date(fiscal_year, company): + fy_start_date, fy_end_date = frappe.db.get_value( + "Fiscal Year", fiscal_year, ["year_start_date", "year_end_date"] + ) + prev_closed_period_end_date = get_previous_closed_period_in_current_year(fiscal_year, company) + period_start_date = ( + add_days(prev_closed_period_end_date, 1) if prev_closed_period_end_date else fy_start_date + ) + return period_start_date, fy_end_date + + +def get_previous_closed_period_in_current_year(fiscal_year, company): + prev_closed_period_end_date = frappe.db.get_value( + "Period Closing Voucher", + filters={ + "company": company, + "fiscal_year": fiscal_year, + "docstatus": 1, + }, + fieldname=["period_end_date"], + order_by="period_end_date desc", + ) + return prev_closed_period_end_date diff --git a/erpnext/accounts/doctype/period_closing_voucher/test_period_closing_voucher.py b/erpnext/accounts/doctype/period_closing_voucher/test_period_closing_voucher.py index 1bd565e1b36..e9d65f7f856 100644 --- a/erpnext/accounts/doctype/period_closing_voucher/test_period_closing_voucher.py +++ b/erpnext/accounts/doctype/period_closing_voucher/test_period_closing_voucher.py @@ -317,16 +317,18 @@ class TestPeriodClosingVoucher(unittest.TestCase): repost_doc.posting_date = today() repost_doc.save() - def make_period_closing_voucher(self, posting_date=None, submit=True): + def make_period_closing_voucher(self, posting_date, submit=True): surplus_account = create_account() cost_center = create_cost_center("Test Cost Center 1") + fy = get_fiscal_year(posting_date, company="Test PCV Company") pcv = frappe.get_doc( { "doctype": "Period Closing Voucher", "transaction_date": posting_date or today(), - "posting_date": posting_date or today(), + "period_start_date": fy[1], + "period_end_date": fy[2], "company": "Test PCV Company", - "fiscal_year": get_fiscal_year(today(), company="Test PCV Company")[0], + "fiscal_year": fy[0], "cost_center": cost_center, "closing_account_head": surplus_account, "remarks": "test", diff --git a/erpnext/accounts/doctype/repost_accounting_ledger/repost_accounting_ledger.py b/erpnext/accounts/doctype/repost_accounting_ledger/repost_accounting_ledger.py index 8c8ba633df0..f37e542dd89 100644 --- a/erpnext/accounts/doctype/repost_accounting_ledger/repost_accounting_ledger.py +++ b/erpnext/accounts/doctype/repost_accounting_ledger/repost_accounting_ledger.py @@ -46,8 +46,8 @@ class RepostAccountingLedger(Document): frappe.db.get_all( "Period Closing Voucher", filters={"company": self.company}, - order_by="posting_date desc", - pluck="posting_date", + order_by="period_end_date desc", + pluck="period_end_date", limit=1, ) or None diff --git a/erpnext/accounts/doctype/repost_accounting_ledger/test_repost_accounting_ledger.py b/erpnext/accounts/doctype/repost_accounting_ledger/test_repost_accounting_ledger.py index f631ef437d6..9f906bb7647 100644 --- a/erpnext/accounts/doctype/repost_accounting_ledger/test_repost_accounting_ledger.py +++ b/erpnext/accounts/doctype/repost_accounting_ledger/test_repost_accounting_ledger.py @@ -129,13 +129,15 @@ class TestRepostAccountingLedger(AccountsTestMixin, FrappeTestCase): cost_center=self.cost_center, rate=100, ) + fy = get_fiscal_year(today(), company=self.company) pcv = frappe.get_doc( { "doctype": "Period Closing Voucher", "transaction_date": today(), - "posting_date": today(), + "period_start_date": fy[1], + "period_end_date": today(), "company": self.company, - "fiscal_year": get_fiscal_year(today(), company=self.company)[0], + "fiscal_year": fy[0], "cost_center": self.cost_center, "closing_account_head": self.retained_earnings, "remarks": "test", diff --git a/erpnext/accounts/general_ledger.py b/erpnext/accounts/general_ledger.py index ad8cc97e101..856e2b96af0 100644 --- a/erpnext/accounts/general_ledger.py +++ b/erpnext/accounts/general_ledger.py @@ -37,13 +37,14 @@ def make_gl_entries( validate_disabled_accounts(gl_map) gl_map = process_gl_map(gl_map, merge_entries) if gl_map and len(gl_map) > 1: - create_payment_ledger_entry( - gl_map, - cancel=0, - adv_adj=adv_adj, - update_outstanding=update_outstanding, - from_repost=from_repost, - ) + if gl_map[0].voucher_type != "Period Closing Voucher": + create_payment_ledger_entry( + gl_map, + cancel=0, + adv_adj=adv_adj, + update_outstanding=update_outstanding, + from_repost=from_repost, + ) save_entries(gl_map, adv_adj, update_outstanding, from_repost) # Post GL Map proccess there may no be any GL Entries elif gl_map: @@ -116,17 +117,16 @@ def get_accounting_dimensions_for_offsetting_entry(gl_map, company): def validate_disabled_accounts(gl_map): accounts = [d.account for d in gl_map if d.account] - Account = frappe.qb.DocType("Account") + disabled_accounts = frappe.get_all( + "Account", + filters={"disabled": 1, "is_group": 0, "company": gl_map[0].company}, + fields=["name"], + ) - disabled_accounts = ( - frappe.qb.from_(Account) - .where(Account.name.isin(accounts) & Account.disabled == 1) - .select(Account.name, Account.disabled) - ).run(as_dict=True) - - if disabled_accounts: + used_disabled_accounts = set(accounts).intersection(set([d.name for d in disabled_accounts])) + if used_disabled_accounts: account_list = "
" - account_list += ", ".join([frappe.bold(d.name) for d in disabled_accounts]) + account_list += ", ".join([frappe.bold(d) for d in used_disabled_accounts]) frappe.throw( _("Cannot create accounting entries against disabled accounts: {0}").format(account_list), title=_("Disabled Account Selected"), @@ -708,7 +708,7 @@ def validate_against_pcv(is_opening, posting_date, company): ) last_pcv_date = frappe.db.get_value( - "Period Closing Voucher", {"docstatus": 1, "company": company}, "max(posting_date)" + "Period Closing Voucher", {"docstatus": 1, "company": company}, "max(period_end_date)" ) if last_pcv_date and getdate(posting_date) <= getdate(last_pcv_date): diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py index 43100c81285..8d4a8579ae3 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py @@ -385,6 +385,7 @@ class ReceivablePayableReport: self.delivery_notes = frappe._dict() # delivery note link inside sales invoice + # nosemgrep si_against_dn = frappe.db.sql( """ select parent, delivery_note @@ -400,6 +401,7 @@ class ReceivablePayableReport: if d.delivery_note: self.delivery_notes.setdefault(d.parent, set()).add(d.delivery_note) + # nosemgrep dn_against_si = frappe.db.sql( """ select distinct parent, against_sales_invoice @@ -417,13 +419,16 @@ class ReceivablePayableReport: def get_invoice_details(self): self.invoice_details = frappe._dict() if self.account_type == "Receivable": + # nosemgrep si_list = frappe.db.sql( """ select name, due_date, po_no from `tabSales Invoice` where posting_date <= %s + and company = %s + and docstatus = 1 """, - self.filters.report_date, + (self.filters.report_date, self.filters.company), as_dict=1, ) for d in si_list: @@ -431,6 +436,7 @@ class ReceivablePayableReport: # Get Sales Team if self.filters.show_sales_person: + # nosemgrep sales_team = frappe.db.sql( """ select parent, sales_person @@ -445,25 +451,33 @@ class ReceivablePayableReport: ) if self.account_type == "Payable": + # nosemgrep for pi in frappe.db.sql( """ select name, due_date, bill_no, bill_date from `tabPurchase Invoice` - where posting_date <= %s + where + posting_date <= %s + and company = %s + and docstatus = 1 """, - self.filters.report_date, + (self.filters.report_date, self.filters.company), as_dict=1, ): self.invoice_details.setdefault(pi.name, pi) # Invoices booked via Journal Entries + # nosemgrep journal_entries = frappe.db.sql( """ select name, due_date, bill_no, bill_date from `tabJournal Entry` - where posting_date <= %s + where + posting_date <= %s + and company = %s + and docstatus = 1 """, - self.filters.report_date, + (self.filters.report_date, self.filters.company), as_dict=1, ) @@ -472,6 +486,8 @@ class ReceivablePayableReport: self.invoice_details.setdefault(je.name, je) def set_party_details(self, row): + if not row.party: + return # customer / supplier name party_details = self.get_party_details(row.party) or {} row.update(party_details) @@ -496,6 +512,7 @@ class ReceivablePayableReport: def get_payment_terms(self, row): # build payment_terms for row + # nosemgrep payment_terms_details = frappe.db.sql( f""" select @@ -708,6 +725,7 @@ class ReceivablePayableReport: def get_return_entries(self): doctype = "Sales Invoice" if self.account_type == "Receivable" else "Purchase Invoice" filters = { + "posting_date": ("<=", self.filters.report_date), "is_return": 1, "docstatus": 1, "company": self.filters.company, @@ -815,6 +833,7 @@ class ReceivablePayableReport: if self.filters.get("sales_person"): lft, rgt = frappe.db.get_value("Sales Person", self.filters.get("sales_person"), ["lft", "rgt"]) + # nosemgrep records = frappe.db.sql( """ select distinct parent, parenttype diff --git a/erpnext/accounts/report/financial_statements.py b/erpnext/accounts/report/financial_statements.py index 6d7635979bb..c233f3c7e2b 100644 --- a/erpnext/accounts/report/financial_statements.py +++ b/erpnext/accounts/report/financial_statements.py @@ -9,6 +9,7 @@ import re import frappe from frappe import _ from frappe.utils import add_days, add_months, cint, cstr, flt, formatdate, get_first_day, getdate +from pypika.terms import ExistsCriterion from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import ( get_accounting_dimensions, @@ -181,12 +182,12 @@ def get_data( company, period_list[0]["year_start_date"] if only_current_fiscal_year else None, period_list[-1]["to_date"], - root.lft, - root.rgt, filters, gl_entries_by_account, - ignore_closing_entries=ignore_closing_entries, + root.lft, + root.rgt, root_type=root_type, + ignore_closing_entries=ignore_closing_entries, ) calculate_values( @@ -419,93 +420,78 @@ def set_gl_entries_by_account( company, from_date, to_date, - root_lft, - root_rgt, filters, gl_entries_by_account, + root_lft=None, + root_rgt=None, + root_type=None, ignore_closing_entries=False, ignore_opening_entries=False, - root_type=None, ): """Returns a dict like { "account": [gl entries], ... }""" gl_entries = [] - account_filters = { - "company": company, - "is_group": 0, - "lft": (">=", root_lft), - "rgt": ("<=", root_rgt), - } - - if root_type: - account_filters.update( - { - "root_type": root_type, - } + # For balance sheet + ignore_closing_balances = frappe.db.get_single_value( + "Accounts Settings", "ignore_account_closing_balance" + ) + if not from_date and not ignore_closing_balances: + last_period_closing_voucher = frappe.db.get_all( + "Period Closing Voucher", + filters={ + "docstatus": 1, + "company": filters.company, + "period_end_date": ("<", filters["period_start_date"]), + }, + fields=["period_end_date", "name"], + order_by="period_end_date desc", + limit=1, ) + if last_period_closing_voucher: + gl_entries += get_accounting_entries( + "Account Closing Balance", + from_date, + to_date, + filters, + root_lft, + root_rgt, + root_type, + ignore_closing_entries, + last_period_closing_voucher[0].name, + ) + from_date = add_days(last_period_closing_voucher[0].period_end_date, 1) + ignore_opening_entries = True - accounts_list = frappe.db.get_all( - "Account", - filters=account_filters, - pluck="name", + gl_entries += get_accounting_entries( + "GL Entry", + from_date, + to_date, + filters, + root_lft, + root_rgt, + root_type, + ignore_closing_entries, + ignore_opening_entries=ignore_opening_entries, ) - if accounts_list: - # For balance sheet - ignore_closing_balances = frappe.db.get_single_value( - "Accounts Settings", "ignore_account_closing_balance" - ) - if not from_date and not ignore_closing_balances: - last_period_closing_voucher = frappe.db.get_all( - "Period Closing Voucher", - filters={ - "docstatus": 1, - "company": filters.company, - "posting_date": ("<", filters["period_start_date"]), - }, - fields=["posting_date", "name"], - order_by="posting_date desc", - limit=1, - ) - if last_period_closing_voucher: - gl_entries += get_accounting_entries( - "Account Closing Balance", - from_date, - to_date, - accounts_list, - filters, - ignore_closing_entries, - last_period_closing_voucher[0].name, - ) - from_date = add_days(last_period_closing_voucher[0].posting_date, 1) - ignore_opening_entries = True + if filters and filters.get("presentation_currency"): + convert_to_presentation_currency(gl_entries, get_currency(filters)) - gl_entries += get_accounting_entries( - "GL Entry", - from_date, - to_date, - accounts_list, - filters, - ignore_closing_entries, - ignore_opening_entries=ignore_opening_entries, - ) + for entry in gl_entries: + gl_entries_by_account.setdefault(entry.account, []).append(entry) - if filters and filters.get("presentation_currency"): - convert_to_presentation_currency(gl_entries, get_currency(filters)) - - for entry in gl_entries: - gl_entries_by_account.setdefault(entry.account, []).append(entry) - - return gl_entries_by_account + return gl_entries_by_account def get_accounting_entries( doctype, from_date, to_date, - accounts, filters, - ignore_closing_entries, + root_lft=None, + root_rgt=None, + root_type=None, + ignore_closing_entries=None, period_closing_voucher=None, ignore_opening_entries=False, ): @@ -535,13 +521,30 @@ def get_accounting_entries( query = query.where(gl_entry.period_closing_voucher == period_closing_voucher) query = apply_additional_conditions(doctype, query, from_date, ignore_closing_entries, filters) - query = query.where(gl_entry.account.isin(accounts)) + + if (root_lft and root_rgt) or root_type: + account_filter_query = get_account_filter_query(root_lft, root_rgt, root_type, gl_entry) + query = query.where(ExistsCriterion(account_filter_query)) entries = query.run(as_dict=True) return entries +def get_account_filter_query(root_lft, root_rgt, root_type, gl_entry): + acc = frappe.qb.DocType("Account") + exists_query = ( + frappe.qb.from_(acc).select(acc.name).where(acc.name == gl_entry.account).where(acc.is_group == 0) + ) + if root_lft and root_rgt: + exists_query = exists_query.where(acc.lft >= root_lft).where(acc.rgt <= root_rgt) + + if root_type: + exists_query = exists_query.where(acc.root_type == root_type) + + return exists_query + + def apply_additional_conditions(doctype, query, from_date, ignore_closing_entries, filters): gl_entry = frappe.qb.DocType(doctype) accounting_dimensions = get_accounting_dimensions(as_list=False) diff --git a/erpnext/accounts/report/trial_balance/trial_balance.py b/erpnext/accounts/report/trial_balance/trial_balance.py index f216ecea15a..8ca850f301e 100644 --- a/erpnext/accounts/report/trial_balance/trial_balance.py +++ b/erpnext/accounts/report/trial_balance/trial_balance.py @@ -94,12 +94,6 @@ def get_data(filters): accounts, accounts_by_name, parent_children_map = filter_accounts(accounts) - min_lft, max_rgt = frappe.db.sql( - """select min(lft), max(rgt) from `tabAccount` - where company=%s""", - (filters.company,), - )[0] - gl_entries_by_account = {} opening_balances = get_opening_balances(filters) @@ -112,10 +106,10 @@ def get_data(filters): filters.company, filters.from_date, filters.to_date, - min_lft, - max_rgt, filters, gl_entries_by_account, + root_lft=None, + root_rgt=None, ignore_closing_entries=not flt(filters.with_period_closing_entry_for_current_period), ignore_opening_entries=True, ) @@ -150,9 +144,9 @@ def get_rootwise_opening_balances(filters, report_type): if not ignore_closing_balances: last_period_closing_voucher = frappe.db.get_all( "Period Closing Voucher", - filters={"docstatus": 1, "company": filters.company, "posting_date": ("<", filters.from_date)}, - fields=["posting_date", "name"], - order_by="posting_date desc", + filters={"docstatus": 1, "company": filters.company, "period_end_date": ("<", filters.from_date)}, + fields=["period_end_date", "name"], + order_by="period_end_date desc", limit=1, ) @@ -168,8 +162,8 @@ def get_rootwise_opening_balances(filters, report_type): ) # Report getting generate from the mid of a fiscal year - if getdate(last_period_closing_voucher[0].posting_date) < getdate(add_days(filters.from_date, -1)): - start_date = add_days(last_period_closing_voucher[0].posting_date, 1) + if getdate(last_period_closing_voucher[0].period_end_date) < getdate(add_days(filters.from_date, -1)): + start_date = add_days(last_period_closing_voucher[0].period_end_date, 1) gle += get_opening_balance( "GL Entry", filters, report_type, accounting_dimensions, start_date=start_date ) diff --git a/erpnext/patches.txt b/erpnext/patches.txt index e59938909c7..515a299504a 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -314,6 +314,7 @@ erpnext.patches.v13_0.update_docs_link erpnext.patches.v15_0.update_asset_value_for_manual_depr_entries erpnext.patches.v15_0.update_gpa_and_ndb_for_assdeprsch erpnext.patches.v14_0.create_accounting_dimensions_for_closing_balance +erpnext.patches.v14_0.set_period_start_end_date_in_pcv erpnext.patches.v14_0.update_closing_balances #14-07-2023 execute:frappe.db.set_single_value("Accounts Settings", "merge_similar_account_heads", 0) erpnext.patches.v14_0.update_reference_type_in_journal_entry_accounts diff --git a/erpnext/patches/v13_0/fix_additional_cost_in_mfg_stock_entry.py b/erpnext/patches/v13_0/fix_additional_cost_in_mfg_stock_entry.py index e305b375c7f..5609b6bb895 100644 --- a/erpnext/patches/v13_0/fix_additional_cost_in_mfg_stock_entry.py +++ b/erpnext/patches/v13_0/fix_additional_cost_in_mfg_stock_entry.py @@ -15,7 +15,7 @@ def execute(): def find_broken_stock_entries() -> list[StockEntryCode]: period_closing_date = frappe.db.get_value( - "Period Closing Voucher", {"docstatus": 1}, "posting_date", order_by="posting_date desc" + "Period Closing Voucher", {"docstatus": 1}, "period_end_date", order_by="period_end_date desc" ) stock_entries_to_patch = frappe.db.sql( diff --git a/erpnext/patches/v14_0/set_period_start_end_date_in_pcv.py b/erpnext/patches/v14_0/set_period_start_end_date_in_pcv.py new file mode 100644 index 00000000000..8020a286f69 --- /dev/null +++ b/erpnext/patches/v14_0/set_period_start_end_date_in_pcv.py @@ -0,0 +1,17 @@ +# Copyright (c) 2023, Frappe Technologies Pvt. Ltd. and Contributors +# License: MIT. See LICENSE + + +import frappe + + +def execute(): + # nosemgrep + frappe.db.sql( + """ + UPDATE `tabPeriod Closing Voucher` + SET + period_start_date = (select year_start_date from `tabFiscal Year` where name = fiscal_year), + period_end_date = posting_date + """ + ) diff --git a/erpnext/patches/v14_0/single_to_multi_dunning.py b/erpnext/patches/v14_0/single_to_multi_dunning.py index 3b01871d437..98be0204518 100644 --- a/erpnext/patches/v14_0/single_to_multi_dunning.py +++ b/erpnext/patches/v14_0/single_to_multi_dunning.py @@ -66,7 +66,7 @@ def get_accounts_closing_date(): ) # always returns datetime.date period_closing_date = frappe.db.get_value( - "Period Closing Voucher", {"docstatus": 1}, "posting_date", order_by="posting_date desc" + "Period Closing Voucher", {"docstatus": 1}, "period_end_date", order_by="period_end_date desc" ) # Set most recent frozen/closing date as filter diff --git a/erpnext/patches/v14_0/update_closing_balances.py b/erpnext/patches/v14_0/update_closing_balances.py index cfc29c87fa1..a2670717ee9 100644 --- a/erpnext/patches/v14_0/update_closing_balances.py +++ b/erpnext/patches/v14_0/update_closing_balances.py @@ -7,67 +7,68 @@ import frappe from erpnext.accounts.doctype.account_closing_balance.account_closing_balance import ( make_closing_entries, ) +from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import ( + get_accounting_dimensions, +) from erpnext.accounts.utils import get_fiscal_year def execute(): frappe.db.truncate("Account Closing Balance") + gle_fields = get_gle_fields() + for company in frappe.get_all("Company", pluck="name"): i = 0 company_wise_order = {} - for pcv in frappe.db.get_all( - "Period Closing Voucher", - fields=["company", "posting_date", "name"], - filters={"docstatus": 1, "company": company}, - order_by="posting_date", - ): + for pcv in get_period_closing_vouchers(company): company_wise_order.setdefault(pcv.company, []) - if pcv.posting_date not in company_wise_order[pcv.company]: - pcv_doc = frappe.get_doc("Period Closing Voucher", pcv.name) - pcv_doc.year_start_date = get_fiscal_year( - pcv.posting_date, pcv.fiscal_year, company=pcv.company - )[1] + if pcv.period_end_date not in company_wise_order[pcv.company]: + pcv.pl_accounts_reverse_gle = get_pcv_gl_entries(pcv, gle_fields) + closing_entries = pcv.get_account_closing_balances() + if closing_entries: + make_closing_entries(closing_entries, pcv.name, pcv.company, pcv.period_end_date) - # get gl entries against pcv - gl_entries = frappe.db.get_all( - "GL Entry", filters={"voucher_no": pcv.name, "is_cancelled": 0}, fields=["*"] - ) - for entry in gl_entries: - entry["is_period_closing_voucher_entry"] = 1 - entry["closing_date"] = pcv_doc.posting_date - entry["period_closing_voucher"] = pcv_doc.name - - closing_entries = [] - - if pcv.posting_date not in company_wise_order[pcv.company]: - # get all gl entries for the year - closing_entries = frappe.db.get_all( - "GL Entry", - filters={ - "is_cancelled": 0, - "voucher_no": ["!=", pcv.name], - "posting_date": ["between", [pcv_doc.year_start_date, pcv.posting_date]], - "is_opening": "No", - "company": company, - }, - fields=["*"], - ) - - if i == 0: - # add opening entries only for the first pcv - closing_entries += frappe.db.get_all( - "GL Entry", - filters={"is_cancelled": 0, "is_opening": "Yes", "company": company}, - fields=["*"], - ) - - for entry in closing_entries: - entry["closing_date"] = pcv_doc.posting_date - entry["period_closing_voucher"] = pcv_doc.name - - entries = gl_entries + closing_entries - - make_closing_entries(entries, pcv.name, pcv.company, pcv.posting_date) - company_wise_order[pcv.company].append(pcv.posting_date) + company_wise_order[pcv.company].append(pcv.period_end_date) i += 1 + + +def get_gle_fields(): + default_diemnsion_fields = ["cost_center", "finance_book", "project"] + accounting_dimension_fields = get_accounting_dimensions() + gle_fields = [ + "name", + "posting_date", + "account", + "account_currency", + "debit", + "credit", + "debit_in_account_currency", + "credit_in_account_currency", + *default_diemnsion_fields, + *accounting_dimension_fields, + ] + + return gle_fields + + +def get_period_closing_vouchers(company): + return frappe.db.get_all( + "Period Closing Voucher", + fields=["name", "closing_account_head", "period_start_date", "period_end_date", "company"], + filters={"docstatus": 1, "company": company}, + order_by="period_end_date", + ) + + +def get_pcv_gl_entries(pcv, gle_fields): + gl_entries = frappe.db.get_all( + "GL Entry", + filters={"voucher_no": pcv.name, "account": ["!=", pcv.closing_account_head], "is_cancelled": 0}, + fields=gle_fields, + ) + for entry in gl_entries: + entry["is_period_closing_voucher_entry"] = 1 + entry["closing_date"] = pcv.period_end_date + entry["period_closing_voucher"] = pcv.name + return gl_entries diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.py b/erpnext/stock/doctype/delivery_note/delivery_note.py index d203b979c61..cb006bb3e99 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note.py +++ b/erpnext/stock/doctype/delivery_note/delivery_note.py @@ -1188,18 +1188,19 @@ def make_shipment(source_name, target_doc=None): # As we are using session user details in the pickup_contact then pickup_contact_person will be session user target.pickup_contact_person = frappe.session.user - contact = frappe.db.get_value( - "Contact", source.contact_person, ["email_id", "phone", "mobile_no"], as_dict=1 - ) - delivery_contact_display = f"{source.contact_display}" - if contact: - if contact.email_id: - delivery_contact_display += "
" + contact.email_id - if contact.phone: - delivery_contact_display += "
" + contact.phone - if contact.mobile_no and not contact.phone: - delivery_contact_display += "
" + contact.mobile_no - target.delivery_contact = delivery_contact_display + if source.contact_person: + contact = frappe.db.get_value( + "Contact", source.contact_person, ["email_id", "phone", "mobile_no"], as_dict=1 + ) + delivery_contact_display = f"{source.contact_display}" + if contact: + if contact.email_id: + delivery_contact_display += "
" + contact.email_id + if contact.phone: + delivery_contact_display += "
" + contact.phone + if contact.mobile_no and not contact.phone: + delivery_contact_display += "
" + contact.mobile_no + target.delivery_contact = delivery_contact_display if source.shipping_address_name: target.delivery_address_name = source.shipping_address_name diff --git a/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py b/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py index c20eadeb78d..0c81a296d5e 100644 --- a/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py +++ b/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py @@ -125,7 +125,7 @@ class RepostItemValuation(Document): query = ( frappe.qb.from_(table) - .select(Max(table.posting_date)) + .select(Max(table.period_end_date)) .where((table.company == company) & (table.docstatus == 1)) ).run() diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index ae6ca4e25d0..5993580032f 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -1309,10 +1309,10 @@ class StockEntry(StockController): 3. Check FG Item and Qty against WO if present (mfg) """ production_item, wo_qty, finished_items = None, 0, [] - - wo_details = frappe.db.get_value("Work Order", self.work_order, ["production_item", "qty"]) - if wo_details: - production_item, wo_qty = wo_details + if self.work_order: + wo_details = frappe.db.get_value("Work Order", self.work_order, ["production_item", "qty"]) + if wo_details: + production_item, wo_qty = wo_details for d in self.get("items"): if d.is_finished_item: diff --git a/erpnext/stock/report/test_reports.py b/erpnext/stock/report/test_reports.py index 85337a3bf54..ad2b46b393f 100644 --- a/erpnext/stock/report/test_reports.py +++ b/erpnext/stock/report/test_reports.py @@ -1,6 +1,7 @@ import unittest import frappe +from frappe.utils.make_random import get_random from erpnext.tests.utils import ReportFilters, ReportName, execute_script_report @@ -11,7 +12,7 @@ DEFAULT_FILTERS = { } -batch = frappe.db.get_value("Batch", fieldname=["name"], as_dict=True, order_by="creation desc") +batch = get_random("Batch") REPORT_FILTER_TEST_CASES: list[tuple[ReportName, ReportFilters]] = [ ("Stock Ledger", {"_optional": True}), diff --git a/erpnext/tests/test_perf.py b/erpnext/tests/test_perf.py index fc17b1dcbda..db54ca97395 100644 --- a/erpnext/tests/test_perf.py +++ b/erpnext/tests/test_perf.py @@ -3,7 +3,7 @@ from frappe.tests.utils import FrappeTestCase INDEXED_FIELDS = { "Bin": ["item_code"], - "GL Entry": ["voucher_type", "against_voucher_type"], + "GL Entry": ["voucher_no", "posting_date", "company", "party"], "Purchase Order Item": ["item_code"], "Stock Ledger Entry": ["warehouse"], } From d392660d455f0be92cc423eca611e40f96100c07 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 23 Oct 2024 14:27:10 +0530 Subject: [PATCH 0319/1614] chore: release version 15.39.1 (#43800) * fix: map doc from purchase order (cherry picked from commit 60ceb91ace8fbb8ddd127a00e7eadd431d4e250c) * test: auto create purchase receipt (cherry picked from commit 59887bbc13c223739750eb27599be5e251bca91e) * fix: better implementation, handle missing purchase order (cherry picked from commit 66211dafd69ecbdc56a52d8391b6fdcf02c3154a) * perf: performance optimizations for accounting reports by refactoring account closing balance and period closing voucher (#43798) * fix: Gl Entry form cleanup * fix: Added indexes in gl entry table * perf: Refactored period closing voucher to handle large volume of gle * fix: fixes as per new period start and end date fields in PCV * perf: performance optimization for accounting reports * perf: performance optimizations for account closing balance patch * fix: test cases * fix: lenter issues - direct use of sql query * fix: test cases * fix: test cases * fix: test cases * fix: wrong fieldname * fix: test cases --------- Co-authored-by: Ninad1306 Co-authored-by: Smit Vora --- .../account_closing_balance.py | 4 +- .../accounting_period/accounting_period.py | 2 + .../accounts/doctype/gl_entry/gl_entry.json | 106 ++- erpnext/accounts/doctype/gl_entry/gl_entry.py | 3 +- .../test_payment_reconciliation.py | 6 +- .../period_closing_voucher.js | 18 + .../period_closing_voucher.json | 38 +- .../period_closing_voucher.py | 721 ++++++++++-------- .../test_period_closing_voucher.py | 8 +- .../repost_accounting_ledger.py | 4 +- .../test_repost_accounting_ledger.py | 6 +- erpnext/accounts/general_ledger.py | 34 +- .../accounts_receivable.py | 29 +- .../accounts/report/financial_statements.py | 143 ++-- .../report/trial_balance/trial_balance.py | 20 +- erpnext/patches.txt | 1 + .../fix_additional_cost_in_mfg_stock_entry.py | 2 +- .../v14_0/set_period_start_end_date_in_pcv.py | 17 + .../patches/v14_0/single_to_multi_dunning.py | 2 +- .../patches/v14_0/update_closing_balances.py | 105 +-- .../doctype/delivery_note/delivery_note.py | 25 +- .../repost_item_valuation.py | 2 +- .../stock/doctype/stock_entry/stock_entry.py | 8 +- erpnext/stock/report/test_reports.py | 3 +- .../subcontracting_receipt.py | 167 ++-- .../test_subcontracting_receipt.py | 43 +- erpnext/tests/test_perf.py | 2 +- 27 files changed, 904 insertions(+), 615 deletions(-) create mode 100644 erpnext/patches/v14_0/set_period_start_end_date_in_pcv.py diff --git a/erpnext/accounts/doctype/account_closing_balance/account_closing_balance.py b/erpnext/accounts/doctype/account_closing_balance/account_closing_balance.py index 82821e140ea..6d5e023f039 100644 --- a/erpnext/accounts/doctype/account_closing_balance/account_closing_balance.py +++ b/erpnext/accounts/doctype/account_closing_balance/account_closing_balance.py @@ -113,9 +113,9 @@ def get_previous_closing_entries(company, closing_date, accounting_dimensions): entries = [] last_period_closing_voucher = frappe.db.get_all( "Period Closing Voucher", - filters={"docstatus": 1, "company": company, "posting_date": ("<", closing_date)}, + filters={"docstatus": 1, "company": company, "period_end_date": ("<", closing_date)}, fields=["name"], - order_by="posting_date desc", + order_by="period_end_date desc", limit=1, ) diff --git a/erpnext/accounts/doctype/accounting_period/accounting_period.py b/erpnext/accounts/doctype/accounting_period/accounting_period.py index 172ef93f14d..300d216618e 100644 --- a/erpnext/accounts/doctype/accounting_period/accounting_period.py +++ b/erpnext/accounts/doctype/accounting_period/accounting_period.py @@ -101,6 +101,8 @@ def validate_accounting_period_on_doc_save(doc, method=None): date = doc.available_for_use_date elif doc.doctype == "Asset Repair": date = doc.completion_date + elif doc.doctype == "Period Closing Voucher": + date = doc.period_end_date else: date = doc.posting_date diff --git a/erpnext/accounts/doctype/gl_entry/gl_entry.json b/erpnext/accounts/doctype/gl_entry/gl_entry.json index 2d106ad8cee..c285a33f73e 100644 --- a/erpnext/accounts/doctype/gl_entry/gl_entry.json +++ b/erpnext/accounts/doctype/gl_entry/gl_entry.json @@ -6,38 +6,50 @@ "document_type": "Document", "engine": "InnoDB", "field_order": [ + "dates_section", "posting_date", "transaction_date", + "column_break_avko", + "fiscal_year", + "due_date", + "account_details_section", "account", + "account_currency", + "column_break_ifvf", + "against", "party_type", "party", - "cost_center", - "debit", - "credit", - "account_currency", - "debit_in_account_currency", - "credit_in_account_currency", - "against", + "transaction_details_section", + "voucher_type", + "voucher_no", + "voucher_subtype", + "transaction_currency", + "column_break_dpsx", "against_voucher_type", "against_voucher", - "voucher_type", - "voucher_subtype", - "voucher_no", "voucher_detail_no", + "transaction_exchange_rate", + "amounts_section", + "debit_in_account_currency", + "debit", + "debit_in_transaction_currency", + "column_break_bm1w", + "credit_in_account_currency", + "credit", + "credit_in_transaction_currency", + "dimensions_section", + "cost_center", + "column_break_lmnm", "project", - "remarks", + "more_info_section", + "finance_book", + "company", "is_opening", "is_advance", - "fiscal_year", - "company", - "finance_book", + "column_break_8abq", "to_rename", - "due_date", "is_cancelled", - "transaction_currency", - "debit_in_transaction_currency", - "credit_in_transaction_currency", - "transaction_exchange_rate" + "remarks" ], "fields": [ { @@ -285,13 +297,67 @@ "fieldname": "voucher_subtype", "fieldtype": "Small Text", "label": "Voucher Subtype" + }, + { + "fieldname": "dates_section", + "fieldtype": "Section Break", + "label": "Dates" + }, + { + "fieldname": "column_break_avko", + "fieldtype": "Column Break" + }, + { + "fieldname": "account_details_section", + "fieldtype": "Section Break", + "label": "Account Details" + }, + { + "fieldname": "column_break_ifvf", + "fieldtype": "Column Break" + }, + { + "fieldname": "transaction_details_section", + "fieldtype": "Section Break", + "label": "Transaction Details" + }, + { + "fieldname": "amounts_section", + "fieldtype": "Section Break", + "label": "Amounts" + }, + { + "fieldname": "column_break_dpsx", + "fieldtype": "Column Break" + }, + { + "fieldname": "more_info_section", + "fieldtype": "Section Break", + "label": "More Info" + }, + { + "fieldname": "column_break_bm1w", + "fieldtype": "Column Break" + }, + { + "fieldname": "dimensions_section", + "fieldtype": "Section Break", + "label": "Dimensions" + }, + { + "fieldname": "column_break_lmnm", + "fieldtype": "Column Break" + }, + { + "fieldname": "column_break_8abq", + "fieldtype": "Column Break" } ], "icon": "fa fa-list", "idx": 1, "in_create": 1, "links": [], - "modified": "2024-07-02 14:31:51.496466", + "modified": "2024-08-22 13:03:39.997475", "modified_by": "Administrator", "module": "Accounts", "name": "GL Entry", diff --git a/erpnext/accounts/doctype/gl_entry/gl_entry.py b/erpnext/accounts/doctype/gl_entry/gl_entry.py index d74224c4aa2..a7e7edb098d 100644 --- a/erpnext/accounts/doctype/gl_entry/gl_entry.py +++ b/erpnext/accounts/doctype/gl_entry/gl_entry.py @@ -430,8 +430,9 @@ def update_against_account(voucher_type, voucher_no): def on_doctype_update(): - frappe.db.add_index("GL Entry", ["against_voucher_type", "against_voucher"]) frappe.db.add_index("GL Entry", ["voucher_type", "voucher_no"]) + frappe.db.add_index("GL Entry", ["posting_date", "company"]) + frappe.db.add_index("GL Entry", ["party_type", "party"]) def rename_gle_sle_docs(): diff --git a/erpnext/accounts/doctype/payment_reconciliation/test_payment_reconciliation.py b/erpnext/accounts/doctype/payment_reconciliation/test_payment_reconciliation.py index 883c638398c..1b19949bb7e 100644 --- a/erpnext/accounts/doctype/payment_reconciliation/test_payment_reconciliation.py +++ b/erpnext/accounts/doctype/payment_reconciliation/test_payment_reconciliation.py @@ -1986,13 +1986,15 @@ def make_period_closing_voucher(company, cost_center, posting_date=None, submit= parent_account=parent_account, doctype="Account", ) + fy = get_fiscal_year(posting_date, company=company) pcv = frappe.get_doc( { "doctype": "Period Closing Voucher", "transaction_date": posting_date or today(), - "posting_date": posting_date or today(), + "period_start_date": fy[1], + "period_end_date": fy[2], "company": company, - "fiscal_year": get_fiscal_year(posting_date or today(), company=company)[0], + "fiscal_year": fy[0], "cost_center": cost_center, "closing_account_head": surplus_account, "remarks": "test", diff --git a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.js b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.js index 82d8cb37fe7..095310c7e70 100644 --- a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.js +++ b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.js @@ -19,6 +19,24 @@ frappe.ui.form.on("Period Closing Voucher", { }); }, + fiscal_year: function (frm) { + if (frm.doc.fiscal_year) { + frappe.call({ + method: "erpnext.accounts.doctype.period_closing_voucher.period_closing_voucher.get_period_start_end_date", + args: { + fiscal_year: frm.doc.fiscal_year, + company: frm.doc.company, + }, + callback: function (r) { + if (r.message) { + frm.set_value("period_start_date", r.message[0]); + frm.set_value("period_end_date", r.message[1]); + } + }, + }); + } + }, + refresh: function (frm) { if (frm.doc.docstatus > 0) { frm.add_custom_button( diff --git a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.json b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.json index 624b5f82f64..f41cff0e0d8 100644 --- a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.json +++ b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.json @@ -6,39 +6,32 @@ "engine": "InnoDB", "field_order": [ "transaction_date", - "posting_date", - "fiscal_year", - "year_start_date", - "amended_from", "company", + "fiscal_year", + "period_start_date", + "period_end_date", + "amended_from", "column_break1", "closing_account_head", - "remarks", "gle_processing_status", + "remarks", "error_message" ], "fields": [ { + "default": "Today", "fieldname": "transaction_date", "fieldtype": "Date", "label": "Transaction Date", "oldfieldname": "transaction_date", "oldfieldtype": "Date" }, - { - "fieldname": "posting_date", - "fieldtype": "Date", - "label": "Posting Date", - "oldfieldname": "posting_date", - "oldfieldtype": "Date", - "reqd": 1 - }, { "fieldname": "fiscal_year", "fieldtype": "Link", "in_list_view": 1, "in_standard_filter": 1, - "label": "Closing Fiscal Year", + "label": "Fiscal Year", "oldfieldname": "fiscal_year", "oldfieldtype": "Select", "options": "Fiscal Year", @@ -103,16 +96,25 @@ "read_only": 1 }, { - "fieldname": "year_start_date", + "fieldname": "period_end_date", "fieldtype": "Date", - "label": "Year Start Date" + "label": "Period End Date", + "reqd": 1 + }, + { + "fieldname": "period_start_date", + "fieldtype": "Date", + "label": "Period Start Date", + "oldfieldname": "posting_date", + "oldfieldtype": "Date", + "reqd": 1 } ], "icon": "fa fa-file-text", "idx": 1, "is_submittable": 1, "links": [], - "modified": "2023-09-11 20:19:11.810533", + "modified": "2024-09-15 17:22:45.291628", "modified_by": "Administrator", "module": "Accounts", "name": "Period Closing Voucher", @@ -148,7 +150,7 @@ "write": 1 } ], - "search_fields": "posting_date, fiscal_year", + "search_fields": "fiscal_year, period_start_date, period_end_date", "sort_field": "modified", "sort_order": "DESC", "states": [], diff --git a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py index dd8a5ff16c3..d6bd217650b 100644 --- a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py +++ b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py @@ -2,15 +2,20 @@ # License: GNU General Public License v3. See license.txt +import copy + import frappe from frappe import _ from frappe.query_builder.functions import Sum -from frappe.utils import add_days, flt +from frappe.utils import add_days, flt, formatdate, getdate +from erpnext.accounts.doctype.account_closing_balance.account_closing_balance import ( + make_closing_entries, +) from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import ( get_accounting_dimensions, ) -from erpnext.accounts.utils import get_account_currency, get_fiscal_year, validate_fiscal_year +from erpnext.accounts.utils import get_account_currency, get_fiscal_year from erpnext.controllers.accounts_controller import AccountsController @@ -29,36 +34,386 @@ class PeriodClosingVoucher(AccountsController): error_message: DF.Text | None fiscal_year: DF.Link gle_processing_status: DF.Literal["In Progress", "Completed", "Failed"] - posting_date: DF.Date + period_end_date: DF.Date + period_start_date: DF.Date remarks: DF.SmallText transaction_date: DF.Date | None - year_start_date: DF.Date | None # end: auto-generated types def validate(self): - self.validate_account_head() - self.validate_posting_date() + self.validate_start_and_end_date() + self.check_if_previous_year_closed() + self.block_if_future_closing_voucher_exists() + self.check_closing_account_type() + self.check_closing_account_currency() + + def validate_start_and_end_date(self): + self.fy_start_date, self.fy_end_date = frappe.db.get_value( + "Fiscal Year", self.fiscal_year, ["year_start_date", "year_end_date"] + ) + + prev_closed_period_end_date = get_previous_closed_period_in_current_year( + self.fiscal_year, self.company + ) + valid_start_date = ( + add_days(prev_closed_period_end_date, 1) if prev_closed_period_end_date else self.fy_start_date + ) + + if getdate(self.period_start_date) != getdate(valid_start_date): + frappe.throw(_("Period Start Date must be {0}").format(formatdate(valid_start_date))) + + if getdate(self.period_start_date) > getdate(self.period_end_date): + frappe.throw(_("Period Start Date cannot be greater than Period End Date")) + + if getdate(self.period_end_date) > getdate(self.fy_end_date): + frappe.throw(_("Period End Date cannot be greater than Fiscal Year End Date")) + + def check_if_previous_year_closed(self): + last_year_closing = add_days(self.fy_start_date, -1) + previous_fiscal_year = get_fiscal_year(last_year_closing, company=self.company, boolean=True) + if not previous_fiscal_year: + return + + previous_fiscal_year_start_date = previous_fiscal_year[0][1] + gle_exists_in_previous_year = frappe.db.exists( + "GL Entry", + { + "posting_date": ("between", [previous_fiscal_year_start_date, last_year_closing]), + "company": self.company, + "is_cancelled": 0, + }, + ) + if not gle_exists_in_previous_year: + return + + previous_fiscal_year_closed = frappe.db.exists( + "Period Closing Voucher", + { + "period_end_date": ("between", [previous_fiscal_year_start_date, last_year_closing]), + "docstatus": 1, + "company": self.company, + }, + ) + if not previous_fiscal_year_closed: + frappe.throw(_("Previous Year is not closed, please close it first")) + + def block_if_future_closing_voucher_exists(self): + future_closing_voucher = self.get_future_closing_voucher() + if future_closing_voucher and future_closing_voucher[0][0]: + action = "cancel" if self.docstatus == 2 else "create" + frappe.throw( + _( + "You cannot {0} this document because another Period Closing Entry {1} exists after {2}" + ).format(action, future_closing_voucher[0][0], self.period_end_date) + ) + + def get_future_closing_voucher(self): + return frappe.db.get_value( + "Period Closing Voucher", + {"period_end_date": (">", self.period_end_date), "docstatus": 1, "company": self.company}, + "name", + ) + + def check_closing_account_type(self): + closing_account_type = frappe.get_cached_value("Account", self.closing_account_head, "root_type") + + if closing_account_type not in ["Liability", "Equity"]: + frappe.throw( + _("Closing Account {0} must be of type Liability / Equity").format(self.closing_account_head) + ) + + def check_closing_account_currency(self): + account_currency = get_account_currency(self.closing_account_head) + company_currency = frappe.get_cached_value("Company", self.company, "default_currency") + if account_currency != company_currency: + frappe.throw(_("Currency of the Closing Account must be {0}").format(company_currency)) def on_submit(self): self.db_set("gle_processing_status", "In Progress") - get_opening_entries = False - - if not frappe.db.exists( - "Period Closing Voucher", {"company": self.company, "docstatus": 1, "name": ("!=", self.name)} - ): - get_opening_entries = True - - self.make_gl_entries(get_opening_entries=get_opening_entries) + self.make_gl_entries() def on_cancel(self): - self.validate_future_closing_vouchers() - self.db_set("gle_processing_status", "In Progress") self.ignore_linked_doctypes = ("GL Entry", "Stock Ledger Entry", "Payment Ledger Entry") - gle_count = frappe.db.count( + self.block_if_future_closing_voucher_exists() + self.db_set("gle_processing_status", "In Progress") + self.cancel_gl_entries() + + def make_gl_entries(self): + if self.get_gle_count_in_selected_period() > 5000: + frappe.enqueue( + process_gl_and_closing_entries, + doc=self, + timeout=1800, + ) + frappe.msgprint( + _( + "The GL Entries and closing balances will be processed in the background, it can take a few minutes." + ), + alert=True, + ) + else: + process_gl_and_closing_entries(self) + + def get_gle_count_in_selected_period(self): + return frappe.db.count( "GL Entry", - {"voucher_type": "Period Closing Voucher", "voucher_no": self.name, "is_cancelled": 0}, + { + "posting_date": ["between", [self.period_start_date, self.period_end_date]], + "company": self.company, + "is_cancelled": 0, + }, ) - if gle_count > 5000: + + def get_pcv_gl_entries(self): + self.pl_accounts_reverse_gle = [] + self.closing_account_gle = [] + + pl_account_balances = self.get_account_balances_based_on_dimensions(report_type="Profit and Loss") + for dimensions, account_balances in pl_account_balances.items(): + for acc, balances in account_balances.items(): + balance_in_company_currency = flt(balances.debit_in_account_currency) - flt( + balances.credit_in_account_currency + ) + if balance_in_company_currency and acc != "balances": + self.pl_accounts_reverse_gle.append( + self.get_gle_for_pl_account(acc, balances, dimensions) + ) + + # closing liability account + self.closing_account_gle.append( + self.get_gle_for_closing_account(account_balances["balances"], dimensions) + ) + + return self.pl_accounts_reverse_gle + self.closing_account_gle + + def get_gle_for_pl_account(self, acc, balances, dimensions): + balance_in_account_currency = flt(balances.debit_in_account_currency) - flt( + balances.credit_in_account_currency + ) + balance_in_company_currency = flt(balances.debit) - flt(balances.credit) + gl_entry = frappe._dict( + { + "company": self.company, + "posting_date": self.period_end_date, + "account": acc, + "account_currency": balances.account_currency, + "debit_in_account_currency": abs(balance_in_account_currency) + if balance_in_account_currency < 0 + else 0, + "debit": abs(balance_in_company_currency) if balance_in_company_currency < 0 else 0, + "credit_in_account_currency": abs(balance_in_account_currency) + if balance_in_account_currency > 0 + else 0, + "credit": abs(balance_in_company_currency) if balance_in_company_currency > 0 else 0, + "is_period_closing_voucher_entry": 1, + "voucher_type": "Period Closing Voucher", + "voucher_no": self.name, + "fiscal_year": self.fiscal_year, + "remarks": self.remarks, + "is_opening": "No", + } + ) + self.update_default_dimensions(gl_entry, dimensions) + return gl_entry + + def get_gle_for_closing_account(self, dimension_balance, dimensions): + balance_in_account_currency = flt(dimension_balance.balance_in_account_currency) + balance_in_company_currency = flt(dimension_balance.balance_in_company_currency) + gl_entry = frappe._dict( + { + "company": self.company, + "posting_date": self.period_end_date, + "account": self.closing_account_head, + "account_currency": frappe.db.get_value( + "Account", self.closing_account_head, "account_currency" + ), + "debit_in_account_currency": balance_in_account_currency + if balance_in_account_currency > 0 + else 0, + "debit": balance_in_company_currency if balance_in_company_currency > 0 else 0, + "credit_in_account_currency": abs(balance_in_account_currency) + if balance_in_account_currency < 0 + else 0, + "credit": abs(balance_in_company_currency) if balance_in_company_currency < 0 else 0, + "is_period_closing_voucher_entry": 1, + "voucher_type": "Period Closing Voucher", + "voucher_no": self.name, + "fiscal_year": self.fiscal_year, + "remarks": self.remarks, + "is_opening": "No", + } + ) + self.update_default_dimensions(gl_entry, dimensions) + return gl_entry + + def update_default_dimensions(self, gl_entry, dimensions): + for i, dimension in enumerate(self.accounting_dimension_fields): + gl_entry[dimension] = dimensions[i] + + def get_account_balances_based_on_dimensions(self, report_type): + """Get balance for dimension-wise pl accounts""" + self.get_accounting_dimension_fields() + acc_bal_dict = frappe._dict() + gl_entries = [] + + with frappe.db.unbuffered_cursor(): + gl_entries = self.get_gl_entries_for_current_period(report_type, as_iterator=True) + for gle in gl_entries: + acc_bal_dict = self.set_account_balance_dict(gle, acc_bal_dict) + + if report_type == "Balance Sheet" and self.is_first_period_closing_voucher(): + opening_entries = self.get_gl_entries_for_current_period(report_type, only_opening_entries=True) + for gle in opening_entries: + acc_bal_dict = self.set_account_balance_dict(gle, acc_bal_dict) + + return acc_bal_dict + + def get_accounting_dimension_fields(self): + default_dimensions = ["cost_center", "finance_book", "project"] + self.accounting_dimension_fields = default_dimensions + get_accounting_dimensions() + + def get_gl_entries_for_current_period(self, report_type, only_opening_entries=False, as_iterator=False): + date_condition = "" + if only_opening_entries: + date_condition = "is_opening = 'Yes'" + else: + date_condition = f"posting_date BETWEEN '{self.period_start_date}' AND '{self.period_end_date}' and is_opening = 'No'" + + # nosemgrep + return frappe.db.sql( + """ + SELECT + name, + posting_date, + account, + account_currency, + debit_in_account_currency, + credit_in_account_currency, + debit, + credit, + {} + FROM `tabGL Entry` + WHERE + {} + AND company = %s + AND voucher_type != 'Period Closing Voucher' + AND EXISTS(SELECT name FROM `tabAccount` WHERE name = account AND report_type = %s) + AND is_cancelled = 0 + """.format( + ", ".join(self.accounting_dimension_fields), + date_condition, + ), + (self.company, report_type), + as_dict=1, + as_iterator=as_iterator, + ) + + def set_account_balance_dict(self, gle, acc_bal_dict): + key = self.get_key(gle) + + acc_bal_dict.setdefault(key, frappe._dict()).setdefault( + gle.account, + frappe._dict( + { + "debit_in_account_currency": 0, + "credit_in_account_currency": 0, + "debit": 0, + "credit": 0, + "account_currency": gle.account_currency, + } + ), + ) + + acc_bal_dict[key][gle.account].debit_in_account_currency += flt(gle.debit_in_account_currency) + acc_bal_dict[key][gle.account].credit_in_account_currency += flt(gle.credit_in_account_currency) + acc_bal_dict[key][gle.account].debit += flt(gle.debit) + acc_bal_dict[key][gle.account].credit += flt(gle.credit) + + # dimension-wise total balances + acc_bal_dict[key].setdefault( + "balances", + frappe._dict( + { + "balance_in_account_currency": 0, + "balance_in_company_currency": 0, + } + ), + ) + + balance_in_account_currency = flt(gle.debit_in_account_currency) - flt(gle.credit_in_account_currency) + balance_in_company_currency = flt(gle.debit) - flt(gle.credit) + + acc_bal_dict[key]["balances"].balance_in_account_currency += balance_in_account_currency + acc_bal_dict[key]["balances"].balance_in_company_currency += balance_in_company_currency + + return acc_bal_dict + + def get_key(self, gle): + return tuple([gle.get(dimension) for dimension in self.accounting_dimension_fields]) + + def get_account_closing_balances(self): + pl_closing_entries = self.get_closing_entries_for_pl_accounts() + bs_closing_entries = self.get_closing_entries_for_balance_sheet_accounts() + closing_entries = pl_closing_entries + bs_closing_entries + return closing_entries + + def get_closing_entries_for_pl_accounts(self): + closing_entries = copy.deepcopy(self.pl_accounts_reverse_gle) + for d in self.pl_accounts_reverse_gle: + # reverse debit and credit + gle_copy = copy.deepcopy(d) + gle_copy.debit = d.credit + gle_copy.credit = d.debit + gle_copy.debit_in_account_currency = d.credit_in_account_currency + gle_copy.credit_in_account_currency = d.debit_in_account_currency + gle_copy.is_period_closing_voucher_entry = 0 + gle_copy.period_closing_voucher = self.name + closing_entries.append(gle_copy) + + return closing_entries + + def get_closing_entries_for_balance_sheet_accounts(self): + closing_entries = [] + balance_sheet_account_balances = self.get_account_balances_based_on_dimensions( + report_type="Balance Sheet" + ) + + for dimensions, account_balances in balance_sheet_account_balances.items(): + for acc, balances in account_balances.items(): + balance_in_company_currency = flt(balances.debit_in_account_currency) - flt( + balances.credit_in_account_currency + ) + if acc != "balances" and balance_in_company_currency: + closing_entries.append(self.get_closing_entry(acc, balances, dimensions)) + + return closing_entries + + def get_closing_entry(self, account, balances, dimensions): + closing_entry = frappe._dict( + { + "company": self.company, + "closing_date": self.period_end_date, + "period_closing_voucher": self.name, + "account": account, + "account_currency": balances.account_currency, + "debit_in_account_currency": flt(balances.debit_in_account_currency), + "debit": flt(balances.debit), + "credit_in_account_currency": flt(balances.credit_in_account_currency), + "credit": flt(balances.credit), + "is_period_closing_voucher_entry": 0, + } + ) + self.update_default_dimensions(closing_entry, dimensions) + return closing_entry + + def is_first_period_closing_voucher(self): + return not frappe.db.exists( + "Period Closing Voucher", + {"company": self.company, "docstatus": 1, "name": ("!=", self.name)}, + ) + + def cancel_gl_entries(self): + if self.get_gle_count_against_current_pcv() > 5000: frappe.enqueue( process_cancellation, voucher_type="Period Closing Voucher", @@ -73,308 +428,30 @@ class PeriodClosingVoucher(AccountsController): else: process_cancellation(voucher_type="Period Closing Voucher", voucher_no=self.name) - def validate_future_closing_vouchers(self): - if frappe.db.exists( - "Period Closing Voucher", - {"posting_date": (">", self.posting_date), "docstatus": 1, "company": self.company}, - ): - frappe.throw( - _( - "You can not cancel this Period Closing Voucher, please cancel the future Period Closing Vouchers first" - ) - ) - - def validate_account_head(self): - closing_account_type = frappe.get_cached_value("Account", self.closing_account_head, "root_type") - - if closing_account_type not in ["Liability", "Equity"]: - frappe.throw( - _("Closing Account {0} must be of type Liability / Equity").format(self.closing_account_head) - ) - - account_currency = get_account_currency(self.closing_account_head) - company_currency = frappe.get_cached_value("Company", self.company, "default_currency") - if account_currency != company_currency: - frappe.throw(_("Currency of the Closing Account must be {0}").format(company_currency)) - - def validate_posting_date(self): - validate_fiscal_year( - self.posting_date, self.fiscal_year, self.company, label=_("Posting Date"), doc=self - ) - - self.year_start_date = get_fiscal_year(self.posting_date, self.fiscal_year, company=self.company)[1] - - self.check_if_previous_year_closed() - - pcv = frappe.qb.DocType("Period Closing Voucher") - existing_entry = ( - frappe.qb.from_(pcv) - .select(pcv.name) - .where( - (pcv.posting_date >= self.posting_date) - & (pcv.fiscal_year == self.fiscal_year) - & (pcv.docstatus == 1) - & (pcv.company == self.company) - ) - .run() - ) - - if existing_entry and existing_entry[0][0]: - frappe.throw( - _("Another Period Closing Entry {0} has been made after {1}").format( - existing_entry[0][0], self.posting_date - ) - ) - - def check_if_previous_year_closed(self): - last_year_closing = add_days(self.year_start_date, -1) - previous_fiscal_year = get_fiscal_year(last_year_closing, company=self.company, boolean=True) - if not previous_fiscal_year: - return - - previous_fiscal_year_start_date = previous_fiscal_year[0][1] - if not frappe.db.exists( + def get_gle_count_against_current_pcv(self): + return frappe.db.count( "GL Entry", - { - "posting_date": ("between", [previous_fiscal_year_start_date, last_year_closing]), - "company": self.company, - "is_cancelled": 0, - }, - ): - return - - if not frappe.db.exists( - "Period Closing Voucher", - { - "posting_date": ("between", [previous_fiscal_year_start_date, last_year_closing]), - "docstatus": 1, - "company": self.company, - }, - ): - frappe.throw(_("Previous Year is not closed, please close it first")) - - def make_gl_entries(self, get_opening_entries=False): - gl_entries = self.get_gl_entries() - closing_entries = self.get_grouped_gl_entries(get_opening_entries=get_opening_entries) - if len(gl_entries + closing_entries) > 3000: - frappe.enqueue( - process_gl_and_closing_entries, - gl_entries=gl_entries, - closing_entries=closing_entries, - voucher_name=self.name, - company=self.company, - closing_date=self.posting_date, - timeout=3000, - ) - - frappe.msgprint( - _("The GL Entries will be processed in the background, it can take a few minutes."), - alert=True, - ) - else: - process_gl_and_closing_entries( - gl_entries, closing_entries, self.name, self.company, self.posting_date - ) - - def get_grouped_gl_entries(self, get_opening_entries=False): - closing_entries = [] - for acc in self.get_balances_based_on_dimensions( - group_by_account=True, for_aggregation=True, get_opening_entries=get_opening_entries - ): - closing_entries.append(self.get_closing_entries(acc)) - - return closing_entries - - def get_gl_entries(self): - gl_entries = [] - - # pl account - for acc in self.get_balances_based_on_dimensions( - group_by_account=True, report_type="Profit and Loss" - ): - if flt(acc.bal_in_company_currency): - gl_entries.append(self.get_gle_for_pl_account(acc)) - - # closing liability account - for acc in self.get_balances_based_on_dimensions( - group_by_account=False, report_type="Profit and Loss" - ): - if flt(acc.bal_in_company_currency): - gl_entries.append(self.get_gle_for_closing_account(acc)) - - return gl_entries - - def get_gle_for_pl_account(self, acc): - gl_entry = self.get_gl_dict( - { - "company": self.company, - "closing_date": self.posting_date, - "account": acc.account, - "cost_center": acc.cost_center, - "finance_book": acc.finance_book, - "account_currency": acc.account_currency, - "debit_in_account_currency": abs(flt(acc.bal_in_account_currency)) - if flt(acc.bal_in_account_currency) < 0 - else 0, - "debit": abs(flt(acc.bal_in_company_currency)) if flt(acc.bal_in_company_currency) < 0 else 0, - "credit_in_account_currency": abs(flt(acc.bal_in_account_currency)) - if flt(acc.bal_in_account_currency) > 0 - else 0, - "credit": abs(flt(acc.bal_in_company_currency)) - if flt(acc.bal_in_company_currency) > 0 - else 0, - "is_period_closing_voucher_entry": 1, - }, - item=acc, - ) - self.update_default_dimensions(gl_entry, acc) - return gl_entry - - def get_gle_for_closing_account(self, acc): - gl_entry = self.get_gl_dict( - { - "company": self.company, - "closing_date": self.posting_date, - "account": self.closing_account_head, - "cost_center": acc.cost_center, - "finance_book": acc.finance_book, - "account_currency": acc.account_currency, - "debit_in_account_currency": abs(flt(acc.bal_in_account_currency)) - if flt(acc.bal_in_account_currency) > 0 - else 0, - "debit": abs(flt(acc.bal_in_company_currency)) if flt(acc.bal_in_company_currency) > 0 else 0, - "credit_in_account_currency": abs(flt(acc.bal_in_account_currency)) - if flt(acc.bal_in_account_currency) < 0 - else 0, - "credit": abs(flt(acc.bal_in_company_currency)) - if flt(acc.bal_in_company_currency) < 0 - else 0, - "is_period_closing_voucher_entry": 1, - }, - item=acc, - ) - self.update_default_dimensions(gl_entry, acc) - return gl_entry - - def get_closing_entries(self, acc): - closing_entry = self.get_gl_dict( - { - "company": self.company, - "closing_date": self.posting_date, - "period_closing_voucher": self.name, - "account": acc.account, - "cost_center": acc.cost_center, - "finance_book": acc.finance_book, - "account_currency": acc.account_currency, - "debit_in_account_currency": flt(acc.debit_in_account_currency), - "debit": flt(acc.debit), - "credit_in_account_currency": flt(acc.credit_in_account_currency), - "credit": flt(acc.credit), - }, - item=acc, + {"voucher_type": "Period Closing Voucher", "voucher_no": self.name, "is_cancelled": 0}, ) - for dimension in self.accounting_dimensions: - closing_entry.update({dimension: acc.get(dimension)}) - return closing_entry - - def update_default_dimensions(self, gl_entry, acc): - if not self.accounting_dimensions: - self.accounting_dimensions = get_accounting_dimensions() - - for dimension in self.accounting_dimensions: - gl_entry.update({dimension: acc.get(dimension)}) - - def get_balances_based_on_dimensions( - self, group_by_account=False, report_type=None, for_aggregation=False, get_opening_entries=False - ): - """Get balance for dimension-wise pl accounts""" - - qb_dimension_fields = ["cost_center", "finance_book", "project"] - - self.accounting_dimensions = get_accounting_dimensions() - for dimension in self.accounting_dimensions: - qb_dimension_fields.append(dimension) - - if group_by_account: - qb_dimension_fields.append("account") - - account_filters = { - "company": self.company, - "is_group": 0, - } - - if report_type: - account_filters.update({"report_type": report_type}) - - accounts = frappe.get_all("Account", filters=account_filters, pluck="name") - - gl_entry = frappe.qb.DocType("GL Entry") - query = frappe.qb.from_(gl_entry).select(gl_entry.account, gl_entry.account_currency) - - if not for_aggregation: - query = query.select( - (Sum(gl_entry.debit_in_account_currency) - Sum(gl_entry.credit_in_account_currency)).as_( - "bal_in_account_currency" - ), - (Sum(gl_entry.debit) - Sum(gl_entry.credit)).as_("bal_in_company_currency"), - ) - else: - query = query.select( - (Sum(gl_entry.debit_in_account_currency)).as_("debit_in_account_currency"), - (Sum(gl_entry.credit_in_account_currency)).as_("credit_in_account_currency"), - (Sum(gl_entry.debit)).as_("debit"), - (Sum(gl_entry.credit)).as_("credit"), - ) - - for dimension in qb_dimension_fields: - query = query.select(gl_entry[dimension]) - - query = query.where( - (gl_entry.company == self.company) - & (gl_entry.is_cancelled == 0) - & (gl_entry.account.isin(accounts)) - ) - - if get_opening_entries: - query = query.where( - ( # noqa: UP034 - (gl_entry.posting_date.between(self.get("year_start_date"), self.posting_date)) - | (gl_entry.is_opening == "Yes") - ) - ) - else: - query = query.where( - gl_entry.posting_date.between(self.get("year_start_date"), self.posting_date) - & gl_entry.is_opening - == "No" - ) - - if for_aggregation: - query = query.where(gl_entry.voucher_type != "Period Closing Voucher") - - for dimension in qb_dimension_fields: - query = query.groupby(gl_entry[dimension]) - - return query.run(as_dict=1) - - -def process_gl_and_closing_entries(gl_entries, closing_entries, voucher_name, company, closing_date): - from erpnext.accounts.doctype.account_closing_balance.account_closing_balance import ( - make_closing_entries, - ) +def process_gl_and_closing_entries(doc): from erpnext.accounts.general_ledger import make_gl_entries try: + gl_entries = doc.get_pcv_gl_entries() if gl_entries: make_gl_entries(gl_entries, merge_entries=False) - make_closing_entries(gl_entries + closing_entries, voucher_name, company, closing_date) - frappe.db.set_value("Period Closing Voucher", voucher_name, "gle_processing_status", "Completed") + + closing_entries = doc.get_account_closing_balances() + if closing_entries: + make_closing_entries(closing_entries, doc.name, doc.company, doc.period_end_date) + + frappe.db.set_value(doc.doctype, doc.name, "gle_processing_status", "Completed") except Exception as e: frappe.db.rollback() frappe.log_error(e) - frappe.db.set_value("Period Closing Voucher", voucher_name, "gle_processing_status", "Failed") + frappe.db.set_value(doc.doctype, doc.name, "gle_processing_status", "Failed") def process_cancellation(voucher_type, voucher_no): @@ -395,3 +472,29 @@ def delete_closing_entries(voucher_no): frappe.qb.from_(closing_balance).delete().where( closing_balance.period_closing_voucher == voucher_no ).run() + + +@frappe.whitelist() +def get_period_start_end_date(fiscal_year, company): + fy_start_date, fy_end_date = frappe.db.get_value( + "Fiscal Year", fiscal_year, ["year_start_date", "year_end_date"] + ) + prev_closed_period_end_date = get_previous_closed_period_in_current_year(fiscal_year, company) + period_start_date = ( + add_days(prev_closed_period_end_date, 1) if prev_closed_period_end_date else fy_start_date + ) + return period_start_date, fy_end_date + + +def get_previous_closed_period_in_current_year(fiscal_year, company): + prev_closed_period_end_date = frappe.db.get_value( + "Period Closing Voucher", + filters={ + "company": company, + "fiscal_year": fiscal_year, + "docstatus": 1, + }, + fieldname=["period_end_date"], + order_by="period_end_date desc", + ) + return prev_closed_period_end_date diff --git a/erpnext/accounts/doctype/period_closing_voucher/test_period_closing_voucher.py b/erpnext/accounts/doctype/period_closing_voucher/test_period_closing_voucher.py index 1bd565e1b36..e9d65f7f856 100644 --- a/erpnext/accounts/doctype/period_closing_voucher/test_period_closing_voucher.py +++ b/erpnext/accounts/doctype/period_closing_voucher/test_period_closing_voucher.py @@ -317,16 +317,18 @@ class TestPeriodClosingVoucher(unittest.TestCase): repost_doc.posting_date = today() repost_doc.save() - def make_period_closing_voucher(self, posting_date=None, submit=True): + def make_period_closing_voucher(self, posting_date, submit=True): surplus_account = create_account() cost_center = create_cost_center("Test Cost Center 1") + fy = get_fiscal_year(posting_date, company="Test PCV Company") pcv = frappe.get_doc( { "doctype": "Period Closing Voucher", "transaction_date": posting_date or today(), - "posting_date": posting_date or today(), + "period_start_date": fy[1], + "period_end_date": fy[2], "company": "Test PCV Company", - "fiscal_year": get_fiscal_year(today(), company="Test PCV Company")[0], + "fiscal_year": fy[0], "cost_center": cost_center, "closing_account_head": surplus_account, "remarks": "test", diff --git a/erpnext/accounts/doctype/repost_accounting_ledger/repost_accounting_ledger.py b/erpnext/accounts/doctype/repost_accounting_ledger/repost_accounting_ledger.py index 8c8ba633df0..f37e542dd89 100644 --- a/erpnext/accounts/doctype/repost_accounting_ledger/repost_accounting_ledger.py +++ b/erpnext/accounts/doctype/repost_accounting_ledger/repost_accounting_ledger.py @@ -46,8 +46,8 @@ class RepostAccountingLedger(Document): frappe.db.get_all( "Period Closing Voucher", filters={"company": self.company}, - order_by="posting_date desc", - pluck="posting_date", + order_by="period_end_date desc", + pluck="period_end_date", limit=1, ) or None diff --git a/erpnext/accounts/doctype/repost_accounting_ledger/test_repost_accounting_ledger.py b/erpnext/accounts/doctype/repost_accounting_ledger/test_repost_accounting_ledger.py index f631ef437d6..9f906bb7647 100644 --- a/erpnext/accounts/doctype/repost_accounting_ledger/test_repost_accounting_ledger.py +++ b/erpnext/accounts/doctype/repost_accounting_ledger/test_repost_accounting_ledger.py @@ -129,13 +129,15 @@ class TestRepostAccountingLedger(AccountsTestMixin, FrappeTestCase): cost_center=self.cost_center, rate=100, ) + fy = get_fiscal_year(today(), company=self.company) pcv = frappe.get_doc( { "doctype": "Period Closing Voucher", "transaction_date": today(), - "posting_date": today(), + "period_start_date": fy[1], + "period_end_date": today(), "company": self.company, - "fiscal_year": get_fiscal_year(today(), company=self.company)[0], + "fiscal_year": fy[0], "cost_center": self.cost_center, "closing_account_head": self.retained_earnings, "remarks": "test", diff --git a/erpnext/accounts/general_ledger.py b/erpnext/accounts/general_ledger.py index ad8cc97e101..856e2b96af0 100644 --- a/erpnext/accounts/general_ledger.py +++ b/erpnext/accounts/general_ledger.py @@ -37,13 +37,14 @@ def make_gl_entries( validate_disabled_accounts(gl_map) gl_map = process_gl_map(gl_map, merge_entries) if gl_map and len(gl_map) > 1: - create_payment_ledger_entry( - gl_map, - cancel=0, - adv_adj=adv_adj, - update_outstanding=update_outstanding, - from_repost=from_repost, - ) + if gl_map[0].voucher_type != "Period Closing Voucher": + create_payment_ledger_entry( + gl_map, + cancel=0, + adv_adj=adv_adj, + update_outstanding=update_outstanding, + from_repost=from_repost, + ) save_entries(gl_map, adv_adj, update_outstanding, from_repost) # Post GL Map proccess there may no be any GL Entries elif gl_map: @@ -116,17 +117,16 @@ def get_accounting_dimensions_for_offsetting_entry(gl_map, company): def validate_disabled_accounts(gl_map): accounts = [d.account for d in gl_map if d.account] - Account = frappe.qb.DocType("Account") + disabled_accounts = frappe.get_all( + "Account", + filters={"disabled": 1, "is_group": 0, "company": gl_map[0].company}, + fields=["name"], + ) - disabled_accounts = ( - frappe.qb.from_(Account) - .where(Account.name.isin(accounts) & Account.disabled == 1) - .select(Account.name, Account.disabled) - ).run(as_dict=True) - - if disabled_accounts: + used_disabled_accounts = set(accounts).intersection(set([d.name for d in disabled_accounts])) + if used_disabled_accounts: account_list = "
" - account_list += ", ".join([frappe.bold(d.name) for d in disabled_accounts]) + account_list += ", ".join([frappe.bold(d) for d in used_disabled_accounts]) frappe.throw( _("Cannot create accounting entries against disabled accounts: {0}").format(account_list), title=_("Disabled Account Selected"), @@ -708,7 +708,7 @@ def validate_against_pcv(is_opening, posting_date, company): ) last_pcv_date = frappe.db.get_value( - "Period Closing Voucher", {"docstatus": 1, "company": company}, "max(posting_date)" + "Period Closing Voucher", {"docstatus": 1, "company": company}, "max(period_end_date)" ) if last_pcv_date and getdate(posting_date) <= getdate(last_pcv_date): diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py index 43100c81285..8d4a8579ae3 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py @@ -385,6 +385,7 @@ class ReceivablePayableReport: self.delivery_notes = frappe._dict() # delivery note link inside sales invoice + # nosemgrep si_against_dn = frappe.db.sql( """ select parent, delivery_note @@ -400,6 +401,7 @@ class ReceivablePayableReport: if d.delivery_note: self.delivery_notes.setdefault(d.parent, set()).add(d.delivery_note) + # nosemgrep dn_against_si = frappe.db.sql( """ select distinct parent, against_sales_invoice @@ -417,13 +419,16 @@ class ReceivablePayableReport: def get_invoice_details(self): self.invoice_details = frappe._dict() if self.account_type == "Receivable": + # nosemgrep si_list = frappe.db.sql( """ select name, due_date, po_no from `tabSales Invoice` where posting_date <= %s + and company = %s + and docstatus = 1 """, - self.filters.report_date, + (self.filters.report_date, self.filters.company), as_dict=1, ) for d in si_list: @@ -431,6 +436,7 @@ class ReceivablePayableReport: # Get Sales Team if self.filters.show_sales_person: + # nosemgrep sales_team = frappe.db.sql( """ select parent, sales_person @@ -445,25 +451,33 @@ class ReceivablePayableReport: ) if self.account_type == "Payable": + # nosemgrep for pi in frappe.db.sql( """ select name, due_date, bill_no, bill_date from `tabPurchase Invoice` - where posting_date <= %s + where + posting_date <= %s + and company = %s + and docstatus = 1 """, - self.filters.report_date, + (self.filters.report_date, self.filters.company), as_dict=1, ): self.invoice_details.setdefault(pi.name, pi) # Invoices booked via Journal Entries + # nosemgrep journal_entries = frappe.db.sql( """ select name, due_date, bill_no, bill_date from `tabJournal Entry` - where posting_date <= %s + where + posting_date <= %s + and company = %s + and docstatus = 1 """, - self.filters.report_date, + (self.filters.report_date, self.filters.company), as_dict=1, ) @@ -472,6 +486,8 @@ class ReceivablePayableReport: self.invoice_details.setdefault(je.name, je) def set_party_details(self, row): + if not row.party: + return # customer / supplier name party_details = self.get_party_details(row.party) or {} row.update(party_details) @@ -496,6 +512,7 @@ class ReceivablePayableReport: def get_payment_terms(self, row): # build payment_terms for row + # nosemgrep payment_terms_details = frappe.db.sql( f""" select @@ -708,6 +725,7 @@ class ReceivablePayableReport: def get_return_entries(self): doctype = "Sales Invoice" if self.account_type == "Receivable" else "Purchase Invoice" filters = { + "posting_date": ("<=", self.filters.report_date), "is_return": 1, "docstatus": 1, "company": self.filters.company, @@ -815,6 +833,7 @@ class ReceivablePayableReport: if self.filters.get("sales_person"): lft, rgt = frappe.db.get_value("Sales Person", self.filters.get("sales_person"), ["lft", "rgt"]) + # nosemgrep records = frappe.db.sql( """ select distinct parent, parenttype diff --git a/erpnext/accounts/report/financial_statements.py b/erpnext/accounts/report/financial_statements.py index 6d7635979bb..c233f3c7e2b 100644 --- a/erpnext/accounts/report/financial_statements.py +++ b/erpnext/accounts/report/financial_statements.py @@ -9,6 +9,7 @@ import re import frappe from frappe import _ from frappe.utils import add_days, add_months, cint, cstr, flt, formatdate, get_first_day, getdate +from pypika.terms import ExistsCriterion from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import ( get_accounting_dimensions, @@ -181,12 +182,12 @@ def get_data( company, period_list[0]["year_start_date"] if only_current_fiscal_year else None, period_list[-1]["to_date"], - root.lft, - root.rgt, filters, gl_entries_by_account, - ignore_closing_entries=ignore_closing_entries, + root.lft, + root.rgt, root_type=root_type, + ignore_closing_entries=ignore_closing_entries, ) calculate_values( @@ -419,93 +420,78 @@ def set_gl_entries_by_account( company, from_date, to_date, - root_lft, - root_rgt, filters, gl_entries_by_account, + root_lft=None, + root_rgt=None, + root_type=None, ignore_closing_entries=False, ignore_opening_entries=False, - root_type=None, ): """Returns a dict like { "account": [gl entries], ... }""" gl_entries = [] - account_filters = { - "company": company, - "is_group": 0, - "lft": (">=", root_lft), - "rgt": ("<=", root_rgt), - } - - if root_type: - account_filters.update( - { - "root_type": root_type, - } + # For balance sheet + ignore_closing_balances = frappe.db.get_single_value( + "Accounts Settings", "ignore_account_closing_balance" + ) + if not from_date and not ignore_closing_balances: + last_period_closing_voucher = frappe.db.get_all( + "Period Closing Voucher", + filters={ + "docstatus": 1, + "company": filters.company, + "period_end_date": ("<", filters["period_start_date"]), + }, + fields=["period_end_date", "name"], + order_by="period_end_date desc", + limit=1, ) + if last_period_closing_voucher: + gl_entries += get_accounting_entries( + "Account Closing Balance", + from_date, + to_date, + filters, + root_lft, + root_rgt, + root_type, + ignore_closing_entries, + last_period_closing_voucher[0].name, + ) + from_date = add_days(last_period_closing_voucher[0].period_end_date, 1) + ignore_opening_entries = True - accounts_list = frappe.db.get_all( - "Account", - filters=account_filters, - pluck="name", + gl_entries += get_accounting_entries( + "GL Entry", + from_date, + to_date, + filters, + root_lft, + root_rgt, + root_type, + ignore_closing_entries, + ignore_opening_entries=ignore_opening_entries, ) - if accounts_list: - # For balance sheet - ignore_closing_balances = frappe.db.get_single_value( - "Accounts Settings", "ignore_account_closing_balance" - ) - if not from_date and not ignore_closing_balances: - last_period_closing_voucher = frappe.db.get_all( - "Period Closing Voucher", - filters={ - "docstatus": 1, - "company": filters.company, - "posting_date": ("<", filters["period_start_date"]), - }, - fields=["posting_date", "name"], - order_by="posting_date desc", - limit=1, - ) - if last_period_closing_voucher: - gl_entries += get_accounting_entries( - "Account Closing Balance", - from_date, - to_date, - accounts_list, - filters, - ignore_closing_entries, - last_period_closing_voucher[0].name, - ) - from_date = add_days(last_period_closing_voucher[0].posting_date, 1) - ignore_opening_entries = True + if filters and filters.get("presentation_currency"): + convert_to_presentation_currency(gl_entries, get_currency(filters)) - gl_entries += get_accounting_entries( - "GL Entry", - from_date, - to_date, - accounts_list, - filters, - ignore_closing_entries, - ignore_opening_entries=ignore_opening_entries, - ) + for entry in gl_entries: + gl_entries_by_account.setdefault(entry.account, []).append(entry) - if filters and filters.get("presentation_currency"): - convert_to_presentation_currency(gl_entries, get_currency(filters)) - - for entry in gl_entries: - gl_entries_by_account.setdefault(entry.account, []).append(entry) - - return gl_entries_by_account + return gl_entries_by_account def get_accounting_entries( doctype, from_date, to_date, - accounts, filters, - ignore_closing_entries, + root_lft=None, + root_rgt=None, + root_type=None, + ignore_closing_entries=None, period_closing_voucher=None, ignore_opening_entries=False, ): @@ -535,13 +521,30 @@ def get_accounting_entries( query = query.where(gl_entry.period_closing_voucher == period_closing_voucher) query = apply_additional_conditions(doctype, query, from_date, ignore_closing_entries, filters) - query = query.where(gl_entry.account.isin(accounts)) + + if (root_lft and root_rgt) or root_type: + account_filter_query = get_account_filter_query(root_lft, root_rgt, root_type, gl_entry) + query = query.where(ExistsCriterion(account_filter_query)) entries = query.run(as_dict=True) return entries +def get_account_filter_query(root_lft, root_rgt, root_type, gl_entry): + acc = frappe.qb.DocType("Account") + exists_query = ( + frappe.qb.from_(acc).select(acc.name).where(acc.name == gl_entry.account).where(acc.is_group == 0) + ) + if root_lft and root_rgt: + exists_query = exists_query.where(acc.lft >= root_lft).where(acc.rgt <= root_rgt) + + if root_type: + exists_query = exists_query.where(acc.root_type == root_type) + + return exists_query + + def apply_additional_conditions(doctype, query, from_date, ignore_closing_entries, filters): gl_entry = frappe.qb.DocType(doctype) accounting_dimensions = get_accounting_dimensions(as_list=False) diff --git a/erpnext/accounts/report/trial_balance/trial_balance.py b/erpnext/accounts/report/trial_balance/trial_balance.py index f216ecea15a..8ca850f301e 100644 --- a/erpnext/accounts/report/trial_balance/trial_balance.py +++ b/erpnext/accounts/report/trial_balance/trial_balance.py @@ -94,12 +94,6 @@ def get_data(filters): accounts, accounts_by_name, parent_children_map = filter_accounts(accounts) - min_lft, max_rgt = frappe.db.sql( - """select min(lft), max(rgt) from `tabAccount` - where company=%s""", - (filters.company,), - )[0] - gl_entries_by_account = {} opening_balances = get_opening_balances(filters) @@ -112,10 +106,10 @@ def get_data(filters): filters.company, filters.from_date, filters.to_date, - min_lft, - max_rgt, filters, gl_entries_by_account, + root_lft=None, + root_rgt=None, ignore_closing_entries=not flt(filters.with_period_closing_entry_for_current_period), ignore_opening_entries=True, ) @@ -150,9 +144,9 @@ def get_rootwise_opening_balances(filters, report_type): if not ignore_closing_balances: last_period_closing_voucher = frappe.db.get_all( "Period Closing Voucher", - filters={"docstatus": 1, "company": filters.company, "posting_date": ("<", filters.from_date)}, - fields=["posting_date", "name"], - order_by="posting_date desc", + filters={"docstatus": 1, "company": filters.company, "period_end_date": ("<", filters.from_date)}, + fields=["period_end_date", "name"], + order_by="period_end_date desc", limit=1, ) @@ -168,8 +162,8 @@ def get_rootwise_opening_balances(filters, report_type): ) # Report getting generate from the mid of a fiscal year - if getdate(last_period_closing_voucher[0].posting_date) < getdate(add_days(filters.from_date, -1)): - start_date = add_days(last_period_closing_voucher[0].posting_date, 1) + if getdate(last_period_closing_voucher[0].period_end_date) < getdate(add_days(filters.from_date, -1)): + start_date = add_days(last_period_closing_voucher[0].period_end_date, 1) gle += get_opening_balance( "GL Entry", filters, report_type, accounting_dimensions, start_date=start_date ) diff --git a/erpnext/patches.txt b/erpnext/patches.txt index e59938909c7..515a299504a 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -314,6 +314,7 @@ erpnext.patches.v13_0.update_docs_link erpnext.patches.v15_0.update_asset_value_for_manual_depr_entries erpnext.patches.v15_0.update_gpa_and_ndb_for_assdeprsch erpnext.patches.v14_0.create_accounting_dimensions_for_closing_balance +erpnext.patches.v14_0.set_period_start_end_date_in_pcv erpnext.patches.v14_0.update_closing_balances #14-07-2023 execute:frappe.db.set_single_value("Accounts Settings", "merge_similar_account_heads", 0) erpnext.patches.v14_0.update_reference_type_in_journal_entry_accounts diff --git a/erpnext/patches/v13_0/fix_additional_cost_in_mfg_stock_entry.py b/erpnext/patches/v13_0/fix_additional_cost_in_mfg_stock_entry.py index e305b375c7f..5609b6bb895 100644 --- a/erpnext/patches/v13_0/fix_additional_cost_in_mfg_stock_entry.py +++ b/erpnext/patches/v13_0/fix_additional_cost_in_mfg_stock_entry.py @@ -15,7 +15,7 @@ def execute(): def find_broken_stock_entries() -> list[StockEntryCode]: period_closing_date = frappe.db.get_value( - "Period Closing Voucher", {"docstatus": 1}, "posting_date", order_by="posting_date desc" + "Period Closing Voucher", {"docstatus": 1}, "period_end_date", order_by="period_end_date desc" ) stock_entries_to_patch = frappe.db.sql( diff --git a/erpnext/patches/v14_0/set_period_start_end_date_in_pcv.py b/erpnext/patches/v14_0/set_period_start_end_date_in_pcv.py new file mode 100644 index 00000000000..8020a286f69 --- /dev/null +++ b/erpnext/patches/v14_0/set_period_start_end_date_in_pcv.py @@ -0,0 +1,17 @@ +# Copyright (c) 2023, Frappe Technologies Pvt. Ltd. and Contributors +# License: MIT. See LICENSE + + +import frappe + + +def execute(): + # nosemgrep + frappe.db.sql( + """ + UPDATE `tabPeriod Closing Voucher` + SET + period_start_date = (select year_start_date from `tabFiscal Year` where name = fiscal_year), + period_end_date = posting_date + """ + ) diff --git a/erpnext/patches/v14_0/single_to_multi_dunning.py b/erpnext/patches/v14_0/single_to_multi_dunning.py index 3b01871d437..98be0204518 100644 --- a/erpnext/patches/v14_0/single_to_multi_dunning.py +++ b/erpnext/patches/v14_0/single_to_multi_dunning.py @@ -66,7 +66,7 @@ def get_accounts_closing_date(): ) # always returns datetime.date period_closing_date = frappe.db.get_value( - "Period Closing Voucher", {"docstatus": 1}, "posting_date", order_by="posting_date desc" + "Period Closing Voucher", {"docstatus": 1}, "period_end_date", order_by="period_end_date desc" ) # Set most recent frozen/closing date as filter diff --git a/erpnext/patches/v14_0/update_closing_balances.py b/erpnext/patches/v14_0/update_closing_balances.py index cfc29c87fa1..a2670717ee9 100644 --- a/erpnext/patches/v14_0/update_closing_balances.py +++ b/erpnext/patches/v14_0/update_closing_balances.py @@ -7,67 +7,68 @@ import frappe from erpnext.accounts.doctype.account_closing_balance.account_closing_balance import ( make_closing_entries, ) +from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import ( + get_accounting_dimensions, +) from erpnext.accounts.utils import get_fiscal_year def execute(): frappe.db.truncate("Account Closing Balance") + gle_fields = get_gle_fields() + for company in frappe.get_all("Company", pluck="name"): i = 0 company_wise_order = {} - for pcv in frappe.db.get_all( - "Period Closing Voucher", - fields=["company", "posting_date", "name"], - filters={"docstatus": 1, "company": company}, - order_by="posting_date", - ): + for pcv in get_period_closing_vouchers(company): company_wise_order.setdefault(pcv.company, []) - if pcv.posting_date not in company_wise_order[pcv.company]: - pcv_doc = frappe.get_doc("Period Closing Voucher", pcv.name) - pcv_doc.year_start_date = get_fiscal_year( - pcv.posting_date, pcv.fiscal_year, company=pcv.company - )[1] + if pcv.period_end_date not in company_wise_order[pcv.company]: + pcv.pl_accounts_reverse_gle = get_pcv_gl_entries(pcv, gle_fields) + closing_entries = pcv.get_account_closing_balances() + if closing_entries: + make_closing_entries(closing_entries, pcv.name, pcv.company, pcv.period_end_date) - # get gl entries against pcv - gl_entries = frappe.db.get_all( - "GL Entry", filters={"voucher_no": pcv.name, "is_cancelled": 0}, fields=["*"] - ) - for entry in gl_entries: - entry["is_period_closing_voucher_entry"] = 1 - entry["closing_date"] = pcv_doc.posting_date - entry["period_closing_voucher"] = pcv_doc.name - - closing_entries = [] - - if pcv.posting_date not in company_wise_order[pcv.company]: - # get all gl entries for the year - closing_entries = frappe.db.get_all( - "GL Entry", - filters={ - "is_cancelled": 0, - "voucher_no": ["!=", pcv.name], - "posting_date": ["between", [pcv_doc.year_start_date, pcv.posting_date]], - "is_opening": "No", - "company": company, - }, - fields=["*"], - ) - - if i == 0: - # add opening entries only for the first pcv - closing_entries += frappe.db.get_all( - "GL Entry", - filters={"is_cancelled": 0, "is_opening": "Yes", "company": company}, - fields=["*"], - ) - - for entry in closing_entries: - entry["closing_date"] = pcv_doc.posting_date - entry["period_closing_voucher"] = pcv_doc.name - - entries = gl_entries + closing_entries - - make_closing_entries(entries, pcv.name, pcv.company, pcv.posting_date) - company_wise_order[pcv.company].append(pcv.posting_date) + company_wise_order[pcv.company].append(pcv.period_end_date) i += 1 + + +def get_gle_fields(): + default_diemnsion_fields = ["cost_center", "finance_book", "project"] + accounting_dimension_fields = get_accounting_dimensions() + gle_fields = [ + "name", + "posting_date", + "account", + "account_currency", + "debit", + "credit", + "debit_in_account_currency", + "credit_in_account_currency", + *default_diemnsion_fields, + *accounting_dimension_fields, + ] + + return gle_fields + + +def get_period_closing_vouchers(company): + return frappe.db.get_all( + "Period Closing Voucher", + fields=["name", "closing_account_head", "period_start_date", "period_end_date", "company"], + filters={"docstatus": 1, "company": company}, + order_by="period_end_date", + ) + + +def get_pcv_gl_entries(pcv, gle_fields): + gl_entries = frappe.db.get_all( + "GL Entry", + filters={"voucher_no": pcv.name, "account": ["!=", pcv.closing_account_head], "is_cancelled": 0}, + fields=gle_fields, + ) + for entry in gl_entries: + entry["is_period_closing_voucher_entry"] = 1 + entry["closing_date"] = pcv.period_end_date + entry["period_closing_voucher"] = pcv.name + return gl_entries diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.py b/erpnext/stock/doctype/delivery_note/delivery_note.py index d203b979c61..cb006bb3e99 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note.py +++ b/erpnext/stock/doctype/delivery_note/delivery_note.py @@ -1188,18 +1188,19 @@ def make_shipment(source_name, target_doc=None): # As we are using session user details in the pickup_contact then pickup_contact_person will be session user target.pickup_contact_person = frappe.session.user - contact = frappe.db.get_value( - "Contact", source.contact_person, ["email_id", "phone", "mobile_no"], as_dict=1 - ) - delivery_contact_display = f"{source.contact_display}" - if contact: - if contact.email_id: - delivery_contact_display += "
" + contact.email_id - if contact.phone: - delivery_contact_display += "
" + contact.phone - if contact.mobile_no and not contact.phone: - delivery_contact_display += "
" + contact.mobile_no - target.delivery_contact = delivery_contact_display + if source.contact_person: + contact = frappe.db.get_value( + "Contact", source.contact_person, ["email_id", "phone", "mobile_no"], as_dict=1 + ) + delivery_contact_display = f"{source.contact_display}" + if contact: + if contact.email_id: + delivery_contact_display += "
" + contact.email_id + if contact.phone: + delivery_contact_display += "
" + contact.phone + if contact.mobile_no and not contact.phone: + delivery_contact_display += "
" + contact.mobile_no + target.delivery_contact = delivery_contact_display if source.shipping_address_name: target.delivery_address_name = source.shipping_address_name diff --git a/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py b/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py index c20eadeb78d..0c81a296d5e 100644 --- a/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py +++ b/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py @@ -125,7 +125,7 @@ class RepostItemValuation(Document): query = ( frappe.qb.from_(table) - .select(Max(table.posting_date)) + .select(Max(table.period_end_date)) .where((table.company == company) & (table.docstatus == 1)) ).run() diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index ae6ca4e25d0..5993580032f 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -1309,10 +1309,10 @@ class StockEntry(StockController): 3. Check FG Item and Qty against WO if present (mfg) """ production_item, wo_qty, finished_items = None, 0, [] - - wo_details = frappe.db.get_value("Work Order", self.work_order, ["production_item", "qty"]) - if wo_details: - production_item, wo_qty = wo_details + if self.work_order: + wo_details = frappe.db.get_value("Work Order", self.work_order, ["production_item", "qty"]) + if wo_details: + production_item, wo_qty = wo_details for d in self.get("items"): if d.is_finished_item: diff --git a/erpnext/stock/report/test_reports.py b/erpnext/stock/report/test_reports.py index 85337a3bf54..ad2b46b393f 100644 --- a/erpnext/stock/report/test_reports.py +++ b/erpnext/stock/report/test_reports.py @@ -1,6 +1,7 @@ import unittest import frappe +from frappe.utils.make_random import get_random from erpnext.tests.utils import ReportFilters, ReportName, execute_script_report @@ -11,7 +12,7 @@ DEFAULT_FILTERS = { } -batch = frappe.db.get_value("Batch", fieldname=["name"], as_dict=True, order_by="creation desc") +batch = get_random("Batch") REPORT_FILTER_TEST_CASES: list[tuple[ReportName, ReportFilters]] = [ ("Stock Ledger", {"_optional": True}), diff --git a/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.py b/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.py index db912514988..50ce270c166 100644 --- a/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.py +++ b/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.py @@ -687,86 +687,103 @@ def make_purchase_receipt(source_name, target_doc=None, save=False, submit=False else: source_doc = source_name - if not source_doc.is_return: - if not target_doc: - target_doc = frappe.new_doc("Purchase Receipt") - target_doc.is_subcontracted = 1 - target_doc.is_old_subcontracting_flow = 0 + if source_doc.is_return: + return - target_doc = get_mapped_doc( - "Subcontracting Receipt", - source_doc.name, - { - "Subcontracting Receipt": { - "doctype": "Purchase Receipt", - "field_map": { - "posting_date": "posting_date", - "posting_time": "posting_time", - "name": "subcontracting_receipt", - "supplier_warehouse": "supplier_warehouse", - }, - "field_no_map": ["total_qty", "total"], - }, - }, - target_doc, - ignore_child_tables=True, + po_sr_item_dict = {} + po_name = None + for item in source_doc.items: + if not item.purchase_order: + continue + + if not po_name: + po_name = item.purchase_order + + po_sr_item_dict[item.purchase_order_item] = { + "qty": flt(item.qty), + "rejected_qty": flt(item.rejected_qty), + "warehouse": item.warehouse, + "rejected_warehouse": item.rejected_warehouse, + "subcontracting_receipt_item": item.name, + } + + if not po_name: + frappe.throw( + _("Purchase Order Item reference is missing in Subcontracting Receipt {0}").format( + source_doc.name + ) ) - target_doc.currency = frappe.get_cached_value("Company", target_doc.company, "default_currency") + def update_item(obj, target, source_parent): + sr_item_details = po_sr_item_dict.get(obj.name) + ratio = flt(obj.qty) / flt(obj.fg_item_qty) - po_items_details = {} - for item in source_doc.items: - if item.purchase_order and item.purchase_order_item: - if item.purchase_order not in po_items_details: - po_doc = frappe.get_doc("Purchase Order", item.purchase_order) - po_items_details[item.purchase_order] = { - po_item.name: po_item for po_item in po_doc.items - } + target.update( + { + "qty": ratio * sr_item_details["qty"], + "rejected_qty": ratio * sr_item_details["rejected_qty"], + "warehouse": sr_item_details["warehouse"], + "rejected_warehouse": sr_item_details["rejected_warehouse"], + "subcontracting_receipt_item": sr_item_details["subcontracting_receipt_item"], + } + ) - if po_item := po_items_details[item.purchase_order].get(item.purchase_order_item): - conversion_factor = flt(po_item.qty) / flt(po_item.fg_item_qty) - item_row = { - "item_code": po_item.item_code, - "item_name": po_item.item_name, - "conversion_factor": conversion_factor, - "qty": flt(item.qty) * conversion_factor, - "rejected_qty": flt(item.rejected_qty) * conversion_factor, - "uom": po_item.uom, - "rate": po_item.rate, - "warehouse": item.warehouse, - "rejected_warehouse": item.rejected_warehouse, - "purchase_order": item.purchase_order, - "purchase_order_item": item.purchase_order_item, - "subcontracting_receipt_item": item.name, - "project": po_item.project, - } - target_doc.append("items", item_row) + def post_process(source, target): + target.set_missing_values() + target.update( + { + "posting_date": source_doc.posting_date, + "posting_time": source_doc.posting_time, + "subcontracting_receipt": source_doc.name, + "supplier_warehouse": source_doc.supplier_warehouse, + "is_subcontracted": 1, + "is_old_subcontracting_flow": 0, + "currency": frappe.get_cached_value("Company", target.company, "default_currency"), + } + ) - if not target_doc.items: - frappe.throw( - _("Purchase Order Item reference is missing in Subcontracting Receipt {0}").format( - source_doc.name - ) + target_doc = get_mapped_doc( + "Purchase Order", + po_name, + { + "Purchase Order": { + "doctype": "Purchase Receipt", + "field_map": {"supplier_warehouse": "supplier_warehouse"}, + "validation": { + "docstatus": ["=", 1], + }, + }, + "Purchase Order Item": { + "doctype": "Purchase Receipt Item", + "field_map": { + "name": "purchase_order_item", + "parent": "purchase_order", + "bom": "bom", + }, + "postprocess": update_item, + "condition": lambda doc: doc.name in po_sr_item_dict, + }, + "Purchase Taxes and Charges": {"doctype": "Purchase Taxes and Charges", "reset_value": True}, + }, + postprocess=post_process, + ) + + if (save or submit) and frappe.has_permission(target_doc.doctype, "create"): + target_doc.save() + + if submit and frappe.has_permission(target_doc.doctype, "submit", target_doc): + try: + target_doc.submit() + except Exception as e: + target_doc.add_comment("Comment", _("Submit Action Failed") + "

" + str(e)) + + if notify: + frappe.msgprint( + _("Purchase Receipt {0} created.").format( + get_link_to_form(target_doc.doctype, target_doc.name) + ), + indicator="green", + alert=True, ) - target_doc.set_missing_values() - - if (save or submit) and frappe.has_permission(target_doc.doctype, "create"): - target_doc.save() - - if submit and frappe.has_permission(target_doc.doctype, "submit", target_doc): - try: - target_doc.submit() - except Exception as e: - target_doc.add_comment("Comment", _("Submit Action Failed") + "

" + str(e)) - - if notify: - frappe.msgprint( - _("Purchase Receipt {0} created.").format( - get_link_to_form(target_doc.doctype, target_doc.name) - ), - indicator="green", - alert=True, - ) - - return target_doc + return target_doc diff --git a/erpnext/subcontracting/doctype/subcontracting_receipt/test_subcontracting_receipt.py b/erpnext/subcontracting/doctype/subcontracting_receipt/test_subcontracting_receipt.py index 27ad7dbebdf..e0fa7923ef9 100644 --- a/erpnext/subcontracting/doctype/subcontracting_receipt/test_subcontracting_receipt.py +++ b/erpnext/subcontracting/doctype/subcontracting_receipt/test_subcontracting_receipt.py @@ -1075,18 +1075,42 @@ class TestSubcontractingReceipt(FrappeTestCase): @change_settings("Buying Settings", {"auto_create_purchase_receipt": 1}) def test_auto_create_purchase_receipt(self): + from erpnext.buying.doctype.purchase_order.test_purchase_order import create_purchase_order + fg_item = "Subcontracted Item SA1" service_items = [ { "warehouse": "_Test Warehouse - _TC", "item_code": "Subcontracted Service Item 1", - "qty": 5, + "qty": 10, "rate": 100, "fg_item": fg_item, "fg_item_qty": 5, }, ] - sco = get_subcontracting_order(service_items=service_items) + + po = create_purchase_order( + rm_items=service_items, + is_subcontracted=1, + supplier_warehouse="_Test Warehouse 1 - _TC", + do_not_submit=True, + ) + po.append( + "taxes", + { + "account_head": "_Test Account Excise Duty - _TC", + "charge_type": "On Net Total", + "cost_center": "_Test Cost Center - _TC", + "description": "Excise Duty", + "doctype": "Purchase Taxes and Charges", + "rate": 10, + }, + ) + po.save() + po.submit() + + sco = get_subcontracting_order(po_name=po.name) + rm_items = get_rm_items(sco.supplied_items) itemwise_details = make_stock_in_entry(rm_items=rm_items) make_stock_transfer_entry( @@ -1094,11 +1118,24 @@ class TestSubcontractingReceipt(FrappeTestCase): rm_items=rm_items, itemwise_details=copy.deepcopy(itemwise_details), ) + scr = make_subcontracting_receipt(sco.name) + scr.items[0].qty = 3 scr.save() scr.submit() - self.assertTrue(frappe.db.get_value("Purchase Receipt", {"subcontracting_receipt": scr.name})) + pr_details = frappe.get_all( + "Purchase Receipt", + filters={"subcontracting_receipt": scr.name}, + fields=["name", "total_taxes_and_charges"], + ) + + self.assertTrue(pr_details) + + pr_qty = frappe.db.get_value("Purchase Receipt Item", {"parent": pr_details[0]["name"]}, "qty") + self.assertEqual(pr_qty, 6) + + self.assertEqual(pr_details[0]["total_taxes_and_charges"], 60) def test_use_serial_batch_fields_for_subcontracting_receipt(self): fg_item = make_item( diff --git a/erpnext/tests/test_perf.py b/erpnext/tests/test_perf.py index fc17b1dcbda..db54ca97395 100644 --- a/erpnext/tests/test_perf.py +++ b/erpnext/tests/test_perf.py @@ -3,7 +3,7 @@ from frappe.tests.utils import FrappeTestCase INDEXED_FIELDS = { "Bin": ["item_code"], - "GL Entry": ["voucher_type", "against_voucher_type"], + "GL Entry": ["voucher_no", "posting_date", "company", "party"], "Purchase Order Item": ["item_code"], "Stock Ledger Entry": ["warehouse"], } From 33fa1e45ad27e41654335e65ca579a3099c5519d Mon Sep 17 00:00:00 2001 From: IamSaiyyamChhetri Date: Mon, 21 Oct 2024 12:28:27 +0530 Subject: [PATCH 0320/1614] fix: add company filter for project - In Project dt Sales Order field - In Sales Order dt Project field (cherry picked from commit 9909d760a529192e0fe26eeae03ed6c7e1b5375b) --- erpnext/projects/doctype/project/project.js | 1 + erpnext/public/js/utils/sales_common.js | 1 + 2 files changed, 2 insertions(+) diff --git a/erpnext/projects/doctype/project/project.js b/erpnext/projects/doctype/project/project.js index d03ab786cc1..643e3b21782 100644 --- a/erpnext/projects/doctype/project/project.js +++ b/erpnext/projects/doctype/project/project.js @@ -45,6 +45,7 @@ frappe.ui.form.on("Project", { frm.set_query("sales_order", function () { var filters = { project: ["in", frm.doc.__islocal ? [""] : [frm.doc.name, ""]], + company: frm.doc.company, }; if (frm.doc.customer) { diff --git a/erpnext/public/js/utils/sales_common.js b/erpnext/public/js/utils/sales_common.js index e503fb3339c..ac4ecf52e63 100644 --- a/erpnext/public/js/utils/sales_common.js +++ b/erpnext/public/js/utils/sales_common.js @@ -29,6 +29,7 @@ erpnext.sales_common = { query: "erpnext.controllers.queries.get_project_name", filters: { customer: doc.customer, + company: doc.company, }, }; }); From 2fb441763a74bd4c5233e77f39611ee0c95b7efa Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 23 Oct 2024 17:08:52 +0530 Subject: [PATCH 0321/1614] fix: consider gle based on balances in company currency (#43805) --- .../doctype/period_closing_voucher/period_closing_voucher.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py index d6bd217650b..99b42089501 100644 --- a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py +++ b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py @@ -380,9 +380,7 @@ class PeriodClosingVoucher(AccountsController): for dimensions, account_balances in balance_sheet_account_balances.items(): for acc, balances in account_balances.items(): - balance_in_company_currency = flt(balances.debit_in_account_currency) - flt( - balances.credit_in_account_currency - ) + balance_in_company_currency = flt(balances.debit) - flt(balances.credit) if acc != "balances" and balance_in_company_currency: closing_entries.append(self.get_closing_entry(acc, balances, dimensions)) From 1c4eef2ef6fc34c3e2cf95306e15f2073d228bb6 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 23 Oct 2024 17:41:41 +0530 Subject: [PATCH 0322/1614] fix: consider gle based on balances in company currency (copy #43805) (#43809) fix: consider gle based on balances in company currency (#43805) (cherry picked from commit 2fb441763a74bd4c5233e77f39611ee0c95b7efa) Co-authored-by: Nabin Hait --- .../doctype/period_closing_voucher/period_closing_voucher.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py index d6bd217650b..99b42089501 100644 --- a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py +++ b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py @@ -380,9 +380,7 @@ class PeriodClosingVoucher(AccountsController): for dimensions, account_balances in balance_sheet_account_balances.items(): for acc, balances in account_balances.items(): - balance_in_company_currency = flt(balances.debit_in_account_currency) - flt( - balances.credit_in_account_currency - ) + balance_in_company_currency = flt(balances.debit) - flt(balances.credit) if acc != "balances" and balance_in_company_currency: closing_entries.append(self.get_closing_entry(acc, balances, dimensions)) From 188645bfd6cadfc05d506667e9a256245450e696 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Wed, 23 Oct 2024 12:12:56 +0000 Subject: [PATCH 0323/1614] chore(release): Bumped to Version 15.39.2 ## [15.39.2](https://github.com/frappe/erpnext/compare/v15.39.1...v15.39.2) (2024-10-23) ### Bug Fixes * consider gle based on balances in company currency (copy [#43805](https://github.com/frappe/erpnext/issues/43805)) ([#43809](https://github.com/frappe/erpnext/issues/43809)) ([1c4eef2](https://github.com/frappe/erpnext/commit/1c4eef2ef6fc34c3e2cf95306e15f2073d228bb6)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index a5b8609d1d9..fea98a77374 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.39.0" +__version__ = "15.39.2" def get_default_company(user=None): From cf25f4c579295c6e0d28226a125e5681a86ecfa9 Mon Sep 17 00:00:00 2001 From: Raffael Meyer <14891507+barredterra@users.noreply.github.com> Date: Thu, 24 Oct 2024 00:52:42 +0200 Subject: [PATCH 0324/1614] chore(Timesheet): add type hints (#43793) (cherry picked from commit fe1e1b12c3e5ceb8389408f88ee25dcd9c91d0e6) --- .../projects/doctype/timesheet/timesheet.py | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/erpnext/projects/doctype/timesheet/timesheet.py b/erpnext/projects/doctype/timesheet/timesheet.py index fb15b507efb..70494e9e966 100644 --- a/erpnext/projects/doctype/timesheet/timesheet.py +++ b/erpnext/projects/doctype/timesheet/timesheet.py @@ -22,6 +22,46 @@ class OverWorkLoggedError(frappe.ValidationError): class Timesheet(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.projects.doctype.timesheet_detail.timesheet_detail import TimesheetDetail + + amended_from: DF.Link | None + base_total_billable_amount: DF.Currency + base_total_billed_amount: DF.Currency + base_total_costing_amount: DF.Currency + company: DF.Link | None + currency: DF.Link | None + customer: DF.Link | None + department: DF.Link | None + employee: DF.Link | None + employee_name: DF.Data | None + end_date: DF.Date | None + exchange_rate: DF.Float + naming_series: DF.Literal["TS-.YYYY.-"] + note: DF.TextEditor | None + parent_project: DF.Link | None + per_billed: DF.Percent + sales_invoice: DF.Link | None + start_date: DF.Date | None + status: DF.Literal["Draft", "Submitted", "Billed", "Payslip", "Completed", "Cancelled"] + time_logs: DF.Table[TimesheetDetail] + title: DF.Data | None + total_billable_amount: DF.Currency + total_billable_hours: DF.Float + total_billed_amount: DF.Currency + total_billed_hours: DF.Float + total_costing_amount: DF.Currency + total_hours: DF.Float + user: DF.Link | None + # end: auto-generated types + def validate(self): self.set_status() self.validate_dates() From bf4fb53575be594e2e13e0c53cd4218fe4215ac5 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 24 Oct 2024 13:37:57 +0530 Subject: [PATCH 0325/1614] fix: Unnecessary validation for non deferred sales invoices (#43816) fix: Unnecessary validation for non deferred sales invoices (#43816) (cherry picked from commit af472054f6a8f77aca8811e3f575893ba7ea1c00) Co-authored-by: Deepesh Garg --- erpnext/accounts/doctype/sales_invoice/sales_invoice.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index c680bd46130..ebdbb01fdc2 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -297,8 +297,11 @@ class SalesInvoice(SellingController): self.update_current_stock() self.validate_delivery_note() + is_deferred_invoice = any(d.get("enable_deferred_revenue") for d in self.get("items")) + # validate service stop date to lie in between start and end date - validate_service_stop_date(self) + if is_deferred_invoice: + validate_service_stop_date(self) if not self.is_opening: self.is_opening = "No" From a79bc4d35abbfb7597d7c01dbdb4f4cb798eeff6 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 24 Oct 2024 13:37:57 +0530 Subject: [PATCH 0326/1614] fix: Unnecessary validation for non deferred sales invoices (#43816) fix: Unnecessary validation for non deferred sales invoices (#43816) (cherry picked from commit af472054f6a8f77aca8811e3f575893ba7ea1c00) Co-authored-by: Deepesh Garg (cherry picked from commit bf4fb53575be594e2e13e0c53cd4218fe4215ac5) --- erpnext/accounts/doctype/sales_invoice/sales_invoice.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index c680bd46130..ebdbb01fdc2 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -297,8 +297,11 @@ class SalesInvoice(SellingController): self.update_current_stock() self.validate_delivery_note() + is_deferred_invoice = any(d.get("enable_deferred_revenue") for d in self.get("items")) + # validate service stop date to lie in between start and end date - validate_service_stop_date(self) + if is_deferred_invoice: + validate_service_stop_date(self) if not self.is_opening: self.is_opening = "No" From f48ce906582cee31272300414b4387da56d47307 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Thu, 24 Oct 2024 08:22:31 +0000 Subject: [PATCH 0327/1614] chore(release): Bumped to Version 15.39.3 ## [15.39.3](https://github.com/frappe/erpnext/compare/v15.39.2...v15.39.3) (2024-10-24) ### Bug Fixes * Unnecessary validation for non deferred sales invoices ([#43816](https://github.com/frappe/erpnext/issues/43816)) ([a79bc4d](https://github.com/frappe/erpnext/commit/a79bc4d35abbfb7597d7c01dbdb4f4cb798eeff6)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index fea98a77374..645337290fb 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.39.2" +__version__ = "15.39.3" def get_default_company(user=None): From 81297ce1683ec413a8f9b2fe153124452b7d1883 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Fri, 25 Oct 2024 13:30:28 +0530 Subject: [PATCH 0328/1614] fix: set bill_no before `against_voucher` gets concatenated (cherry picked from commit 7bade7f1fe08370d655e12929b2376814dac018a) --- .../accounts/report/general_ledger/general_ledger.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/report/general_ledger/general_ledger.py b/erpnext/accounts/report/general_ledger/general_ledger.py index 1c1d10c087b..04df22c9c9c 100644 --- a/erpnext/accounts/report/general_ledger/general_ledger.py +++ b/erpnext/accounts/report/general_ledger/general_ledger.py @@ -348,10 +348,18 @@ def get_accounts_with_children(accounts): return frappe.qb.from_(doctype).select(doctype.name).where(Criterion.any(conditions)).run(pluck=True) +def set_bill_no(gl_entries): + inv_details = get_supplier_invoice_details() + for gl in gl_entries: + gl["bill_no"] = inv_details.get(gl.get("against_voucher"), "") + + def get_data_with_opening_closing(filters, account_details, accounting_dimensions, gl_entries): data = [] totals_dict = get_totals_dict() + set_bill_no(gl_entries) + gle_map = initialize_gle_map(gl_entries, filters, totals_dict) totals, entries = get_accountwise_gle(filters, accounting_dimensions, gl_entries, gle_map, totals_dict) @@ -539,7 +547,6 @@ def get_account_type_map(company): def get_result_as_list(data, filters): balance, _balance_in_account_currency = 0, 0 - inv_details = get_supplier_invoice_details() for d in data: if not d.get("posting_date"): @@ -549,7 +556,6 @@ def get_result_as_list(data, filters): d["balance"] = balance d["account_currency"] = filters.account_currency - d["bill_no"] = inv_details.get(d.get("against_voucher"), "") return data From 20478b632f82bd9d44bed28e37359b2dd2c7d989 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 25 Oct 2024 20:21:01 +0530 Subject: [PATCH 0329/1614] fix: basic rate not editable in Stock Entry Detail (backport #43837) (#43838) fix: basic rate not editable in Stock Entry Detail (#43837) (cherry picked from commit 5a967bc868566eae06ce44df894cbb33bc98f869) Co-authored-by: rohitwaghchaure --- erpnext/stock/doctype/stock_entry/stock_entry.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.js b/erpnext/stock/doctype/stock_entry/stock_entry.js index 3e82ef51653..ea47ffd79ea 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.js +++ b/erpnext/stock/doctype/stock_entry/stock_entry.js @@ -830,6 +830,15 @@ frappe.ui.form.on("Stock Entry", { }); frappe.ui.form.on("Stock Entry Detail", { + set_basic_rate_manually(frm, cdt, cdn) { + let row = locals[cdt][cdn]; + frm.fields_dict.items.grid.update_docfield_property( + "basic_rate", + "read_only", + row?.set_basic_rate_manually ? 0 : 1 + ); + }, + qty(frm, cdt, cdn) { frm.events.set_basic_rate(frm, cdt, cdn); }, From 07aaef2af2413ff6c39b85514659d572096a6c73 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Sat, 26 Oct 2024 19:43:23 +0200 Subject: [PATCH 0330/1614] fix(RFQ): make strings translatable (backport #43843) (#43848) Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com> fix(RFQ): make strings translatable (#43843) --- .../request_for_quotation/request_for_quotation.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.js b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.js index b8689d29a56..d7c2c3f24b1 100644 --- a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.js +++ b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.js @@ -146,8 +146,8 @@ frappe.ui.form.on("Request for Quotation", { return; } }, - "Download PDF for Supplier", - "Download" + __("Download PDF for Supplier"), + __("Download") ); }, __("Tools") @@ -272,9 +272,10 @@ frappe.ui.form.on("Request for Quotation", { }); }; - dialog.fields_dict.note.$wrapper - .append(`

This is a preview of the email to be sent. A PDF of the document will - automatically be attached with the email.

`); + const msg = __( + "This is a preview of the email to be sent. A PDF of the document will automatically be attached with the email." + ); + dialog.fields_dict.note.$wrapper.append(`

${msg}

`); dialog.show(); }, From 11dd1968c78ea1608edd8850854f7dcd4f998648 Mon Sep 17 00:00:00 2001 From: Raffael Meyer <14891507+barredterra@users.noreply.github.com> Date: Sat, 26 Oct 2024 20:25:30 +0200 Subject: [PATCH 0331/1614] fix: backport translations from develop (#43849) --- erpnext/translations/de.csv | 182 +++ erpnext/translations/es.csv | 2525 ++++++++++++++++++++++++++++ erpnext/translations/fa.csv | 2532 ++++++++++++++++++++++++++++ erpnext/translations/sv.csv | 3083 +++++++++++++++++++++++++++++++++++ 4 files changed, 8322 insertions(+) diff --git a/erpnext/translations/de.csv b/erpnext/translations/de.csv index ed05b8d6695..9ef1d4bc63a 100644 --- a/erpnext/translations/de.csv +++ b/erpnext/translations/de.csv @@ -11929,3 +11929,185 @@ Website Theme,Webseiten-Thema, Workflow Action,Workflow-Aktion, Workflow State,Workflow-Status, {0} is not running. Cannot trigger events for this Document,{0} läuft nicht. Ereignisse für dieses Dokument können nicht ausgelöst werden, +"""SN-01::10"" for ""SN-01"" to ""SN-10""","""SN-01::10"" für ""SN-01"" bis ""SN-10""", +"Masters & Reports","Stammdaten & Berichte", +"Quick Access","Schnellzugriff", +"Reports & Masters","Berichte & Stammdaten", +"Reports & Masters","Berichte & Stammdaten", +"Settings","Einstellungen", +"Shortcuts","Verknüpfungen", +"Your Shortcuts + + + + + + ","Ihre Verknüpfungen + + + + + + ", +"Your Shortcuts","Ihre Verknüpfungen", +Grand Total: {0},Gesamtsumme:{0}, +Outstanding Amount: {0},Ausstehender Betrag: {0}, +Against Customer Order {0},Gegen Kundenauftrag {0}, +Against Supplier Invoice {0},Gegen Lieferantenrechnung {0}, +Ageing Range,Alterungsbereich, +Allocate Payment Request,Zahlungsanfrage zuweisen, +Amount in party's bank account currency,Betrag in der Währung des Bankkontos des Beteiligten, +Amount in transaction currency,Betrag in Transaktionswährung, +BIN Qty,BIN Menge, +BOM and Production,Stückliste und Produktion, +Balance Stock Value,Bestandswert, +Base Cost Per Unit,Grundkosten pro Einheit, +Base Rate,Basispreis, +Base Tax Withholding Net Total,Basis-Steuereinbehalt-Nettosumme, +Base Total,Basis-Summe, +Base Total Billable Amount,Basis Gesamter abrechenbarer Betrag, +Batch Expiry Date,Ablaufdatum der Charge, +Bill for Rejected Quantity in Purchase Invoice,Rechnung für abgelehnte Menge in der Eingangsrechnung, +Calculate daily depreciation using total days in depreciation period,Tägliche Abschreibung anhand der Gesamttage im Abschreibungszeitraum berechnen, +Call Schedule Row {0}: To time slot should always be ahead of From time slot.,Anrufplanzeile {0}: Das Zeitfenster Bis sollte immer vor dem Zeitfenster Von liegen., +Cannot find a default warehouse for item {0}. Please set one in the Item Master or in Stock Settings.,Es wurde kein Standardlager für den Artikel {0} gefunden. Bitte legen Sie eines im Artikelstamm oder in den Lagereinstellungen fest., +Cannot {0} from {2} without any negative outstanding invoice,Kann nicht {0} von {2} ohne negative ausstehende Rechnung, +Cheques and Deposits Incorrectly cleared,Falsch verrechnete Schecks und Einzahlungen, +Columns are not according to template. Please compare the uploaded file with standard template,Die Spalten stimmen nicht mit der Vorlage überein. Bitte vergleichen Sie die hochgeladene Datei mit der Standardvorlage, +Company is mandatory,Unternehmen ist obligatorisch, +Completion Date can not be before Failure Date. Please adjust the dates accordingly.,Das Fertigstellungsdatum kann nicht vor dem Ausfalldatum liegen. Bitte passen Sie die Daten entsprechend an., +Consumed Stock Items or Consumed Asset Items are mandatory for creating new composite asset,Verbrauchte Lagerartikel oder verbrauchte Vermögensgegenstand-Artikel sind für die Erstellung obligatorisch, +Convert to Item Based Reposting,Umstellung auf artikelbasiertes Umbuchen, +Create Workstation,Arbeitsplatz erstellen, +Creating Journal Entries...,Journaleinträge erstellen..., +Creating Purchase Invoices ...,Eingangsrechnungen erstellen ..., +Creating Sales Invoices ...,Ausgangsrechnungen erstellen ..., +Currency Exchange Settings Result,Währungsumtauscheinstellungen Ergebnis, +Deal Owner,Besitzer des Deals, +Decapitalized,Dekapitalisiert, +Dependant SLE Voucher Detail No,Unterhaltsberechtigter SLE Beleg Detail Nr., +Disassemble,Demontage, +Documents: {0} have deferred revenue/expense enabled for them. Cannot repost.,Dokumente: {0} hat vertagte Einnahmen/Ausgaben aktiviert. Kann nicht erneut posten., +Don't Reserve Sales Order Qty on Sales Return,Menge des Auftrags nicht bei der Rücksendung reservieren, +Enter Manually,Manuell eingeben, +Failed to post depreciation entries,Abschreibungsbuchungen fehlgeschlagen, +Filters missing,Filter fehlen, +"For Return Invoices with Stock effect, '0' qty Items are not allowed. Following rows are affected: {0}",Bei Retourenrechnungen mit Lagereffekt sind Artikel mit einer Menge von '0' nicht zulässig. Folgende Zeilen sind betroffen: {0}, +"For the item {0}, the quantity should be {1} according to the BOM {2}.",Für den Artikel {0} sollte die Menge gemäß Stückliste {2} {1} betragen., +"For the {0}, no stock is available for the return in the warehouse {1}.",Für {0} ist im Lager {1} kein Bestand für die Retoure verfügbar., +Force-Fetch Subscription Updates,Abonnement-Updates erzwingen, +From Date is mandatory,Von-Datum ist obligatorisch, +From Prospect,Von Interessenten, +Gross Purchase Amount Too Low: {0} cannot be depreciated over {1} cycles with a frequency of {2} depreciations.,Bruttokaufbetrag zu niedrig: {0} kann nicht über {1} Zyklen mit einer Häufigkeit von {2} Abschreibungen abgeschrieben werden., +If enabled then system won't apply the pricing rule on the delivery note which will be create from the pick list,"Falls aktiviert, wird das System die Preisregel nicht auf den Lieferschein anwenden, der aus der Pickliste erstellt wird", +Impairment,Wertminderung, +Include Closed Orders,Geschlossene Aufträge/Bestellungen einbeziehen, +Invalid Allocated Amount,Ungültiger zugewiesener Betrag, +Invalid Amount,Ungültiger Betrag, +Is Standard,Ist Standard, +Item {0} does not exist.,Artikel {0} existiert nicht., +Items {0} do not exist in the Item master.,Artikel {0} sind nicht im Artikelstamm vorhanden., +Journal entries have been created,Journaleinträge wurden erstellt, +Net total calculation precision loss,Präzisionsverlust bei Berechnung der Nettosumme, +Only Deduct Tax On Excess Amount ,Nur den überschüssigen Betrag versteuern , +Payment Ledger Entry,Zahlungsbucheintrag, +Payment Requests cannot be created against: {0},Zahlungsanforderungen können nicht erstellt werden für: {0}, +Period Closing Entry For Current Period,Periodenabschlussbuchung für aktuelle Periode, +Provisional Account,Vorläufiges Konto, +Rate of Stock UOM,Einzelpreis der Lager-ME, +Raw Materials Consumption ,Rohstoffverbrauch , +Recalculating Purchase Cost against this Project...,Neuberechnung der Anschaffungskosten für dieses Projekt..., +Reference DocType,Referenz DocType, +Round Tax Amount Row-wise,Steuerbetrag zeilenweise runden, +Rounding gain/loss Entry for Stock Transfer,Rundungsgewinn/-verlustbuchung für Umlagerung, +Row #{0}: Only {1} available to reserve for the Item {2},Zeile #{0}: Nur {1} zur Reservierung für den Artikel {2} verfügbar, +Row #{}: The original Invoice {} of return invoice {} is not consolidated.,Zeile #{}: Die ursprüngliche Rechnung {} der Rechnungskorrektur {} ist nicht konsolidiert., +Row {0}: Item {1} must be a subcontracted item.,Zeile {0}: Artikel {1} muss ein an Dritte vergebener Artikel sein., +Row {0}: Please provide a valid Delivery Note Item or Packed Item reference.,Zeile {0}: Bitte geben Sie einen gültigen Lieferschein Artikel oder verpackten Artikel an., +Row {0}: Target Warehouse is mandatory for internal transfers,Zeile {0}: Ziellager ist für interne Transfers obligatorisch, +Row({0}): Outstanding Amount cannot be greater than actual Outstanding Amount {1} in {2},Zeile({0}): Ausstehender Betrag kann nicht größer sein als der tatsächliche ausstehende Betrag {1} in {2}, +Rows with Same Account heads will be merged on Ledger,Zeilen mit denselben Konten werden im Hauptbuch zusammengefasst, +Select Warehouses to get Stock for Materials Planning,"Wählen Sie Lager aus, um Bestände für die Materialplanung zu erhalten", +Select an invoice to load summary data,"Wählen Sie eine Rechnung aus, um die Zusammenfassung zu laden", +Serial / Batch Bundle,Serien- / Chargenbündel, +Serial / Batch Bundle Missing,Serien- / Chargenbündel fehlt, +Serial No Range,Seriennummernbereich, +Serial and Batch Details,Serien- und Chargendetails, +Sets 'Accepted Warehouse' in each row of the Items table.,Legt in jeder Zeile der Artikeltabelle das Annahmelager fest., +Sets 'Rejected Warehouse' in each row of the Items table.,Legt in jeder Zeile der Artikeltabelle das „Ausschusslager“ fest., +Shelf Life in Days,Haltbarkeitsdauer in Tagen, +Show Disabled Warehouses,Deaktivierte Lager anzeigen, +Show GL Balance,Hauptbuchsaldo anzeigen, +Show Pay Button in Purchase Order Portal,Schaltfläche „Bezahlen“ im Bestellportal anzeigen, +Show Taxes as Table in Print,Steuern als Tabelle im Druck anzeigen, +Show net values in opening and closing columns,Nettowerte in Eröffnungs- und Abschlussspalten anzeigen, +Show with upcoming revenue/expense,Mit kommenden Einnahmen/Ausgaben anzeigen, +Something went wrong please try again,"Etwas ist schief gelaufen, bitte versuchen Sie es erneut", +South Africa VAT Account,Südafrika Mehrwertsteuer-Konto, +South Africa VAT Settings,Südafrika Mehrwertsteuer-Einstellungen, +Start Date should be lower than End Date,Das Startdatum muss vor dem Enddatum liegen, +Start Deletion,Löschen starten, +Start Time can't be greater than or equal to End Time for {0}.,Die Startzeit kann nicht größer oder gleich der Endzeit für {0} sein., +Started a background job to create {1} {0},Hintergrundjob zum Erstellen von {1} {0} gestartet, +Status set to rejected as there are one or more rejected readings.,"Der Status wurde auf abgelehnt gesetzt, da es einen oder mehrere abgelehnte Messwerte gibt.", +Stock Consumed During Repair,Während der Reparatur verbrauchter Bestand, +Stock Consumption Details,Details zum Lagerverbrauch, +Stock Planning,Bestandsplanung, +Stock Reservation,Bestandsreservierung, +Stock Reservation Entries Cancelled,Bestandsreservierungen storniert, +Stock Reservation Entries Created,Bestandsreservierungen erstellt, +Stock Reservation Entry,Bestandsreservierungseintrag, +Stock Reservation Entry cannot be updated as it has been delivered.,"Der Bestandsreservierungseintrag kann nicht aktualisiert werden, da er bereits geliefert wurde.", +"Stock Reservation Entry created against a Pick List cannot be updated. If you need to make changes, we recommend canceling the existing entry and creating a new one.","Ein anhand einer Kommissionierliste erstellter Bestandsreservierungseintrag kann nicht aktualisiert werden. Wenn Sie Änderungen vornehmen müssen, empfehlen wir, den vorhandenen Eintrag zu stornieren und einen neuen zu erstellen.", +Stock Reservation can only be created against {0}.,Bestandsreservierungen können nur gegen {0} erstellt werden., +Stock Reserved Qty (in Stock UOM),Reservierter Bestand (in Lager-ME), +Stock Unreservation,Aufhebung der Bestandsreservierung, +Stock/Accounts can not be frozen as processing of backdated entries is going on. Please try again later.,"Lagerbestände/Konten können nicht eingefroren werden, da die Verarbeitung rückwirkender Einträge noch läuft. Bitte versuchen Sie es später erneut.", +Supplied Item,Gelieferter Artikel, +Supplies subject to the reverse charge provision,"Lieferungen, die der Reverse-Charge-Regelung unterliegen", +Task {0} depends on Task {1}. Please add Task {1} to the Tasks list.,Aufgabe {0} hängt von Aufgabe {1} ab. Bitte fügen Sie Aufgabe {1} zur Aufgabenliste hinzu., +Tax Amount will be rounded on a row(items) level,Der Steuerbetrag wird auf (Artikel-)Zeilenebene gerundet, +Tax Refunds provided to Tourists under the Tax Refunds for Tourists Scheme,Steuererstattungen für Touristen im Rahmen der Steuererstattungsregelung für Touristen, +"Tax detail table fetched from item master as a string and stored in this field. +Used for Taxes and Charges","Steuerdetailtabelle, die aus dem Artikelstamm als Zeichenfolge abgerufen und in diesem Feld gespeichert wird. +Wird für Steuern und Gebühren verwendet", +"The Payment Request {0} is already paid, cannot process payment twice","Die Auszahlungsanforderung {0} ist bereits bezahlt, die Zahlung kann nicht zweimal verarbeitet werden", +The Serial No at Row #{0}: {1} is not available in warehouse {2}.,Die Seriennummer in Zeile #{0}: {1} ist im Lager {2} nicht verfügbar., +The Work Order is mandatory for Disassembly Order,Der Arbeitsauftrag ist obligatorisch für den Demontageauftrag, +The allocated amount is greater than the outstanding amount of Payment Request {0},Der zugewiesene Betrag ist größer als der ausstehende Betrag der Zahlungsanforderung {0}, +The field {0} in row {1} is not set,Das Feld {0} in der Zeile {1} ist nicht gesetzt, +The following invalid Pricing Rules are deleted:,Die folgenden ungültigen Preisregeln werden gelöscht:, +The original invoice should be consolidated before or along with the return invoice.,Die Originalrechnung sollte vor oder zusammen mit der Erstattungsrechnung konsolidiert werden., +"The sync has started in the background, please check the {0} list for new records.",Die Synchronisierung wurde im Hintergrund gestartet. Bitte überprüfen Sie die Liste {0} auf neue Datensätze., +"The users with this Role are allowed to create/modify a stock transaction, even though the transaction is frozen.","Die Benutzer mit dieser Rolle dürfen eine Lagerbewegungen erstellen/ändern, auch wenn die Transaktion eingefroren ist.", +There are no active Fiscal Years for which Demo Data can be generated.,"Es gibt keine aktiven Geschäftsjahre, für die Demodaten erstellt werden können.", +There were issues unlinking payment entry {0}.,Es gab Probleme bei der Aufhebung der Verknüpfung der Zahlung {0}., +"This is enabled by default. If you want to plan materials for sub-assemblies of the Item you're manufacturing leave this enabled. If you plan and manufacture the sub-assemblies separately, you can disable this checkbox.","Diese Option ist standardmäßig aktiviert. Wenn Sie Materialien für Unterbaugruppen des Artikels, den Sie herstellen, planen möchten, lassen Sie diese Option aktiviert. Wenn Sie die Unterbaugruppen separat planen und herstellen, können Sie dieses Kontrollkästchen deaktivieren.", +To Date is mandatory,Bis Datum ist obligatorisch, +To Delivery Date,Bis Liefertermin, +To Due Date,Bis Fälligkeitsdatum, +To Reference Date,Bis Stichtag, +To cancel a {} you need to cancel the POS Closing Entry {}.,"Um einen {} zu stornieren, müssen Sie die POS-Abschlussbuchung {} stornieren.", +Total Incoming Value (Receipt),Gesamter eingehender Wert (Empfang), +Total Number of Booked Depreciations ,Gesamtzahl der gebuchten Abschreibungen , +Total Operation Time,Gesamtbetriebszeit, +Total Other Charges,Sonstige Kosten insgesamt, +Total Purchase Amount,Gesamtkaufbetrag, +Total Purchase Cost has been updated,Die Gesamteinkaufskosten wurden aktualisiert, +UnReconcile,Zuordnung aufheben, +Unrealized Profit / Loss account for intra-company transfers,Konto für nicht realisierte Gewinne/Verluste aus konzerninternen Transfers, +Unrealized Profit/Loss account for intra-company transfers,Konto für nicht realisierte Gewinne/Verluste aus konzerninternen Transfers, +Validate Components Quantities Per BOM,Anzahl der Komponenten pro Stückliste überprüfen, +Validate Pricing Rule,Preisregel validieren, +Validate Stock on Save,Lagerbestand beim Speichern validieren, +Warning on Negative Stock,Warnung vor negativem Bestand, +You cannot create a {0} within the closed Accounting Period {1},Sie können innerhalb der abgeschlossenen Abrechnungsperiode {1} kein(e) {0} erstellen, +dated {0},von {0}, +must be between 0 and 100,muss zwischen 0 und 100 liegen, +or its descendants,oder seine Nachkommen, +subscription is already cancelled.,abonnement ist bereits storniert., +{0} Account not found against Customer {1}.,{0} Konto für Kunde {1} nicht gefunden., +{0} Transaction(s) Reconciled,{0} Transaktion(en) Abgestimmt, +{0} cannot be zero,{0} kann nicht Null sein, +{0} is already running for {1},{0} läuft bereits für {1}, +{0} units of Item {1} is not available in any of the warehouses.,{0} Einheiten des Artikels {1} sind in keinem der Lager verfügbar., diff --git a/erpnext/translations/es.csv b/erpnext/translations/es.csv index 1b0468d2077..dcb95fe5466 100644 --- a/erpnext/translations/es.csv +++ b/erpnext/translations/es.csv @@ -8743,3 +8743,2528 @@ WhatsApp,WhatsApp, Make a call,Haz una llamada, Approve,Aprobar, Reject,Rechazar, + Address, Dirección, + Amount, Importe, + Is Child Table, Es una tabla secundaria, + Name, Nombre, + Rate, Precio, + Summary, Resumen, +"""SN-01::10"" for ""SN-01"" to ""SN-10""","""SN-01::10"" para ""SN-01"" a ""SN-10""", +# In Stock,# En stock, +# Req'd Items,# Artículos Requeridos, +% Finished Item Quantity,% Cantidad de Artículos Terminados, +% Occupied,% Ocupado, +% Picked,% Seleccionado, +% Process Loss,% Pérdida por Proceso, +% Returned,% Devuelto, +'Account' in the Accounting section of Customer {0},'Cuenta' en la sección Contabilidad de Cliente {0}, +'Allow Multiple Sales Orders Against a Customer's Purchase Order','Permitir múltiples órdenes de venta contra la orden de compra de un cliente', +'Default {0} Account' in Company {1},'Cuenta {0} Predeterminada' en la Compañía {1}, +'To Package No.' cannot be less than 'From Package No.','Al paquete n.°' no puede ser menor que 'Desde el paquete n.°', +'{0}' account is already used by {1}. Use another account.,La cuenta de '{0}' ya está siendo utilizada por {1}. Utilice otra cuenta., +'{0}' should be in company currency {1}.,'{0}' debe estar en la moneda de la empresa {1}., +(A) Qty After Transaction,(A) Cant. después de la transacción, +(B) Expected Qty After Transaction,(B) Cant. esperada después de la transacción, +(C) Total Qty in Queue,(C) Cant. total en cola, +(C) Total qty in queue,(C) Cant. total en cola, +(D) Balance Stock Value,(D) Valor del balance de las existencias, +(E) Balance Stock Value in Queue,(E) Valor del balance de las existencias en cola, +(F) Change in Stock Value,(F) Cambio en el Valor de Stock, +(G) Sum of Change in Stock Value,(G) Suma del Cambio en el Valor de Stock, +(H) Change in Stock Value (FIFO Queue),(H) Cambio en Valor de Stock (Cola FIFO), +(H) Valuation Rate,(H) Tasa de valoración, +(I) Valuation Rate,(I) Tasa de valoración, +(J) Valuation Rate as per FIFO,(J) Tasa de valoración según FIFO, +(K) Valuation = Value (D) ÷ Qty (A),(K) Valoración = Valor (D) ÷ Cant. (A), +", with the inventory {0}: {1}",", con el inventario {0}: {1}", +0-30 Days,0-30 días, +1000+,más de 1.000, +11-50,11 a 50, +3 Yearly,3 Anual, +30-60 Days,30-60 días, +60-90 Days,60-90 días, +90 Above,Superior a 90, +"
+

Note

+
    +
  • +You can use Jinja tags in Subject and Body fields for dynamic values. +
  • + All fields in this doctype are available under the doc object and all fields for the customer to whom the mail will go to is available under the customer object. +
+

Examples

+ +
    +
  • Subject:

    Statement Of Accounts for {{ customer.customer_name }}

  • +
  • Body:

    +
    Hello {{ customer.customer_name }},
    PFA your Statement Of Accounts from {{ doc.from_date }} to {{ doc.to_date }}.
  • +
+","
+

Nota

+
    +
  • +Puede usar las etiquetas Jinja en los campos Asunto y Cuerpo para valores dinámicos. +
  • + Todos los campos de este doctype están disponibles en el objeto doc y todos los campos del cliente al que se enviará el correo están disponibles en el objeto customer . +
+

Ejemplos

+ +
    +
  • Asunto:

    Estado de Cuentas para {{ customer.customer_name }}

  • +
  • Cuerpo:

    +
    Hola {{ customer.customer_name }},
    PFA tu Estado de Cuenta del {{ doc.from_date }} al {{ doc.to_date }}.
  • +
+", +"
Other Details
","
Otros detalles
", +"
No Matching Bank Transactions Found
","
No se han encontrado transacciones bancarias coincidentes
", +"
+

All dimensions in centimeter only

+
","
+

Todas las dimensiones solo en centímetros

+
", +"

About Product Bundle

+ +

Aggregate group of Items into another Item. This is useful if you are bundling a certain Items into a package and you maintain stock of the packed Items and not the aggregate Item.

+

The package Item will have Is Stock Item as No and Is Sales Item as Yes.

+

Example:

+

If you are selling Laptops and Backpacks separately and have a special price if the customer buys both, then the Laptop + Backpack will be a new Product Bundle Item.

","

Acerca de la agrupación de productos

+ +

Agregue un grupo de Artículos en otro Artículo. Esto es útil si está agrupando ciertos Artículos en un paquete y mantiene existencias de los Artículos empaquetados y no del Artículo agregado.

+

El Artículo del paquete tendrá Es Artículo de Stock como No y Es Artículo de Venta como .

+

Ejemplo:

+

Si está vendiendo Portátiles y Mochilas por separado y tiene un precio especial si el cliente compra ambos, entonces el Portátil + Mochila será un nuevo Artículo de Paquete de Productos.

", +"

Currency Exchange Settings Help

+

There are 3 variables that could be used within the endpoint, result key and in values of the parameter.

+

Exchange rate between {from_currency} and {to_currency} on {transaction_date} is fetched by the API.

+

Example: If your endpoint is exchange.com/2021-08-01, then, you will have to input exchange.com/{transaction_date}

","

Ayuda para la configuración del cambio de divisas

+

Hay 3 variables que se pueden utilizar dentro del endpoint, clave de resultado y en valores del parámetro.

+

El tipo de cambio entre {from_currency} y {to_currency} en {transaction_date} es obtenido por la API.

+

Ejemplo: Si su endpoint es exchange.com/2021-08-01, entonces, tendrá que introducir exchange.com/{transaction_date}

", +"

Body Text and Closing Text Example

+ +
We have noticed that you have not yet paid invoice {{sales_invoice}} for {{frappe.db.get_value(""Currency"", currency, ""symbol"")}} {{outstanding_amount}}. This is a friendly reminder that the invoice was due on {{due_date}}. Please pay the amount due immediately to avoid any further dunning cost.
+ +

How to get fieldnames

+ +

The fieldnames you can use in your template are the fields in the document. You can find out the fields of any documents via Setup > Customize Form View and selecting the document type (e.g. Sales Invoice)

+ +

Templating

+ +

Templates are compiled using the Jinja Templating Language. To learn more about Jinja, read this documentation.

","

Ejemplo de cuerpo de texto y texto de cierre

+ +
Hemos observado que aún no ha pagado la factura {{sales_invoice}} correspondiente a {{frappe.db.get_value(""Currency"", currency, ""symbol"")}} {{outstanding_amount}}. Este es un recordatorio amistoso de que la factura vencía el {{due_date}}. Le rogamos que abone inmediatamente el importe adeudado para evitar posibles gastos de reclamación.
+ +

Cómo obtener nombres de campo

+ +

Los nombres de campo que puede utilizar en su plantilla son los campos del documento. Puede averiguar los campos de cualquier documento a través de Configuración > Personalizar vista de formulario y seleccionando el tipo de documento (por ejemplo, Factura de venta)

+ +

Plantillas

+ +

Las plantillas se compilan utilizando el lenguaje de plantillas Jinja. Para saber más sobre Jinja, lea esta documentación.

", +"

Contract Template Example

+ +
Contract for Customer {{ party_name }}
+
+-Valid From : {{ start_date }} 
+-Valid To : {{ end_date }}
+
+ +

How to get fieldnames

+ +

The field names you can use in your Contract Template are the fields in the Contract for which you are creating the template. You can find out the fields of any documents via Setup > Customize Form View and selecting the document type (e.g. Contract)

+ +

Templating

+ +

Templates are compiled using the Jinja Templating Language. To learn more about Jinja, read this documentation.

","

Ejemplo de plantilla de contrato

+ +
Contrato para cliente {{ party_name }}
+
+-Válido desde : {{ start_date }} 
+-Válido hasta : {{ end_date }}
+
+ +

Cómo obtener los nombres de campo

+ +

Los nombres de campo que puede utilizar en su Plantilla de Contrato son los campos del Contrato para el que está creando la plantilla. Puede averiguar los campos de cualquier documento a través de Configuración > Personalizar vista de formulario y seleccionando el tipo de documento (por ejemplo, Contrato)

+ +

Creación de plantillas

+ +

Las plantillas se compilan utilizando el lenguaje de plantillas Jinja. Para saber más sobre Jinja, lea esta documentación.

", +"

Standard Terms and Conditions Example

+ +
Delivery Terms for Order number {{ name }}
+
+-Order Date : {{ transaction_date }} 
+-Expected Delivery Date : {{ delivery_date }}
+
+ +

How to get fieldnames

+ +

The fieldnames you can use in your email template are the fields in the document from which you are sending the email. You can find out the fields of any documents via Setup > Customize Form View and selecting the document type (e.g. Sales Invoice)

+ +

Templating

+ +

Templates are compiled using the Jinja Templating Language. To learn more about Jinja, read this documentation.

","

Ejemplo de condiciones generales

+ +
Condiciones de entrega para el número de pedido {{ name }}
+
+-Fecha de pedido : {{ transaction_date }} 
+-Fecha de entrega prevista : {{ delivery_date }}
+
+ +

Cómo obtener los nombres de campo

+ +

Los nombres de campo que puede utilizar en su plantilla de correo electrónico son los campos del documento desde el que está enviando el correo electrónico. Puede averiguar los campos de cualquier documento a través de Configuración > Personalizar vista de formulario y seleccionando el tipo de documento (por ejemplo, Factura de venta)

+ +

Plantillas

+ +

Las plantillas se compilan utilizando el lenguaje de plantillas Jinja. Para saber más sobre Jinja, lea esta documentación.

", +"
Or
","
O
", +"","", +"","", +"","", +"

In your Email Template, you can use the following special variables: +

+
    +
  • + {{ update_password_link }}: A link where your supplier can set a new password to log into your portal. +
  • +
  • + {{ portal_link }}: A link to this RFQ in your supplier portal. +
  • +
  • + {{ supplier_name }}: The company name of your supplier. +
  • +
  • + {{ contact.salutation }} {{ contact.last_name }}: The contact person of your supplier. +
  • + {{ user_fullname }}: Your full name. +
  • +
+

+

Apart from these, you can access all values in this RFQ, like {{ message_for_supplier }} or {{ terms }}.

","

En su plantilla de correo electrónico, puede utilizar las siguientes variables especiales: +

+
    +
  • + {{ update_password_link }}: Un enlace donde su proveedor puede establecer una nueva contraseña para acceder a su portal. +
  • +
  • + {{ portal_link }}: Un enlace a esta petición de oferta en su portal de proveedores. +
  • +
  • + {{ supplier_name }}: El nombre de la empresa de su proveedor. +
  • +
  • + {{ contact.salutation }} {{ contact.last_name }}: La persona de contacto de su proveedor. +
  • + {{ user_fullname }}: Su nombre completo. +
  • +
+

+

Aparte de éstos, puede acceder a todos los valores de esta petición de oferta, como {{ message_for_supplier }} o {{ terms }}.

", +"
Message Example
+ +<p> Thank You for being a part of {{ doc.company }}! We hope you are enjoying the service.</p> + +<p> Please find enclosed the E Bill statement. The outstanding amount is {{ doc.grand_total }}.</p> + +<p> We don't want you to be spending time running around in order to pay for your Bill.
After all, life is beautiful and the time you have in hand should be spent to enjoy it!
So here are our little ways to help you get more time for life! </p> + +<a href=""{{ payment_url }}""> click here to pay </a> + +
+","
Ejemplo de mensaje
+ +<p> ¡Gracias por formar parte de {{ doc.company }}! Esperamos que esté disfrutando del servicio.</p> + +<p> Le adjuntamos el extracto de la factura E. El importe pendiente es de {{ doc.grand_total }}.</p> + +<p> No queremos que pierda tiempo dando vueltas para pagar su Factura.
¡Después de todo, la vida es bella y el tiempo de que dispone debe emplearlo en disfrutarla!
¡Así que aquí tiene nuestras pequeñas maneras de ayudarle a tener más tiempo para la vida! </p> + +<a href=""{{ payment_url }}""> pulse aquí para pagar </a> + +
+", +"
Message Example
+ +<p>Dear {{ doc.contact_person }},</p> + +<p>Requesting payment for {{ doc.doctype }}, {{ doc.name }} for {{ doc.grand_total }}.</p> + +<a href=""{{ payment_url }}""> click here to pay </a> + +
+","
Ejemplo de mensaje
+ +<p>Estimado {{ doc.contact_person }},</p> + +<p>Solicitando pago por {{ doc.doctype }}, {{ doc.name }} por {{ doc.grand_total }}.</p> + +<a href=""{{ payment_url }}""> Haga clic aquí para pagar </a> + +
+", +"Masters & Reports","Datos Maestros & Informes", +"Quick Access","Acceso rápido", +"Reports & Masters","Informes y Datos Maestros", +"Reports & Masters","Informes & Datos Maestros", +"Settings","Configuración", +"Shortcuts","Accesos directos", +"Your Shortcuts + + + + + + ","Tus accesos directos + + + + + + ", +"Your Shortcuts","Tus accesos directos", +Grand Total: {0},Total general: {0}, +Outstanding Amount: {0},Importe pendiente: {0}, +" + + + + + + + + + + + + + + + + + +
Child DocumentNon Child Document
+

To access parent document field use parent.fieldname and to access child table document field use doc.fieldname

+ +
+

To access document field use doc.fieldname

+
+

Example: parent.doctype == ""Stock Entry"" and doc.item_code == ""Test""

+ +
+

Example: doc.doctype == ""Stock Entry"" and doc.purpose == ""Manufacture""

+
+ + + + + + +"," + + + + + + + + + + + + + + + + + +
Documento secundarioDocumento no secundario
+

Para acceder al campo del documento principal, utilice parent.fieldname y para acceder al campo del documento de la tabla secundaria, utilice doc.fieldname

+ +
+

Para acceder al campo del documento, utilice doc.fieldname

+
+

Ejemplo: parent.doctype == ""Entrada de stock"" y doc.item_code == ""Prueba""

+ +
+

Ejemplo: doc.doctype == ""Entrada de stock"" y doc.purpose == ""Fabricación""

+
+ + + + + + +", +A - B,A-B, +A - C,A-C, +A Holiday List can be added to exclude counting these days for the Workstation.,Se puede añadir una lista de días festivos para excluir el cómputo de estos días para el puesto de trabajo., +A Packing Slip can only be created for Draft Delivery Note.,Solo se puede crear un albarán para un borrador de nota de entrega., +"A Price List is a collection of Item Prices either Selling, Buying, or both","Una lista de precios es una colección de Precios de Productos, ya sea de Venta, de Compra o ambos", +A Reconciliation Job {0} is running for the same filters. Cannot reconcile now,Se está ejecutando un trabajo de reconciliación {0} para los mismos filtros. No se puede reconciliar ahora., +A Transaction Deletion Document: {0} is triggered for {0},Un documento de borrado de transacciones: {0} se activa para {0}, +A customer must have primary contact email.,Un cliente debe tener un correo electrónico de contacto principal., +A driver must be set to submit.,Debe seleccionar un conductor antes de confirmar., +A template with tax category {0} already exists. Only one template is allowed with each tax category,Ya existe una plantilla con categoría de impuestos {0}. Sólo se permite una plantilla con cada categoría de impuestos, +API Details,Detalles de la API, +AWB Number,Número AWB, +Abbreviation: {0} must appear only once,Abreviación: {0} debe aparecer sólo una vez, +About Us Settings,Configuración de información de la compañía, +About {0} minute remaining,Quedan aproximadamente {0} minutos, +About {0} minutes remaining,Quedan aproximadamente {0} minutos, +About {0} seconds remaining,Quedan aproximadamente {0} segundos, +Acceptance Criteria Formula,Fórmula de Criterio de Aceptación, +Acceptance Criteria Value,Valor de los Criterios de Aceptación, +Accepted Qty in Stock UOM,Cantidad Aceptada en UdM de Stock, +Access Key,Clave de Acceso, +Access Key is required for Service Provider: {0},Se requiere clave de acceso para el proveedor de servicios: {0}, +Account Balance (From),Saldo de cuenta (Desde), +Account Balance (To),Saldo de cuenta (Para), +Account Closing Balance,Balance de Cierre de Cuenta, +Account Currency (From),Moneda de la Cuenta (De), +Account Currency (To),Divisa de la Cuenta (De), +Account Opening Balance,Saldo de Apertura de Cuenta, +Account not Found,Cuenta no encontrada, +Account {0} added multiple times,Cuenta {0} agregada varias veces, +Accounting Dimension Filter,Filtro de dimensión contable, +Accounting Dimensions Filter,Filtro de dimensiones contables, +Accounting Entry for {0},Entrada contable para {0}, +Accounts Closing,Cierre de Cuentas, +Accounts Missing Error,Error de Cuentas Faltantes, +Accounts Receivable/Payable,Cuentas por Cobrar/Pagar, +Accounts to Merge,Cuentas a fusionar, +Action If Quality Inspection Is Rejected,Acción si se rechaza la inspección de calidad, +Action If Same Rate is Not Maintained,Acción si no se mantiene la misma tasa, +Action if Same Rate is Not Maintained Throughout Sales Cycle,Si no se mantiene la misma tarifa durante todo el ciclo de ventas, +Active Status,Estado activo, +Actual Balance Qty,Cantidad de Saldo Actual, +Actual Expense,Gasto actual, +Actual Posting,Asiento Actual, +Actual Qty in Warehouse,Cantidad real en Almacén, +Actual Time,Tiempo actual, +Add Columns in Transaction Currency,Añadir Columnas en Moneda de Transacción, +Add Corrective Operation Cost in Finished Good Valuation,Añadir Costo de Operación Correctiva en la Valoración de Productos Terminados, +Add Discount,Agregar descuento, +Add Items in the Purpose Table,Añadir Elementos en la Tabla de Propósitos, +Add Lead to Prospect,Añadir cliente potencial a prospecto, +Add Local Holidays,Agregar días festivos locales, +Add Manually,Añadir manualmente, +Add Or Deduct,Añadir o deducir, +Add Serial / Batch Bundle,Añadir Nro. Serie/Lote, +Add Serial / Batch No,Añadir Nro Serie/Lote, +Add Serial / Batch No (Rejected Qty),Añadir Nro Serie/Lote (Cant Rechazada), +Add Stock,Añadir Inventario, +Add Sub Assembly,Añadir sub ensamblaje, +Add Template,Añadir plantilla, +Add a Note,Añadir Nota, +Add details,Añadir detalles, +Add to Prospect,Añadir a prospectos, +Added By,Añadido por, +Added On,Añadido el, +Added Supplier Role to User {0}.,Añadido el Rol de Proveedor al Usuario {0}., +Added {1} Role to User {0}.,Se agregó el Rol {1} al Usuario {0}., +Adding Lead to Prospect...,Agregando cliente potencial a prospecto..., +Additional,Adicional, +Additional Asset Cost,Costo Adicional del Activo, +Additional Cost Per Qty,Costo adicional por cantidad, +Additional Info,Información Adicional, +Address And Contacts,Dirección y Contactos, +Adjust Asset Value,Ajustar el valor del activo, +Adjustment Against,Ajuste contra, +Adjustment based on Purchase Invoice rate,Ajuste basado en la tarifa de la Factura de Compra, +Advance Account: {0} must be in either customer billing currency: {1} or Company default currency: {2},La cuenta de anticipo: {0} debe estar en la moneda de facturación del cliente: {1} o en la moneda predeterminada de la empresa: {2}, +Advance Payment,Pago adelantado, +Advance Tax,Impuesto anticipado, +Advance Taxes and Charges,Impuestos y Cargos anticipados, +Advance paid against {0} {1} cannot be greater than Grand Total {2},El anticipo pagado contra {0} {1} no puede ser mayor que el total general {2}., +Advance payments allocated against orders will only be fetched,Los pagos anticipados asignados a pedidos solo se recuperarán., +Affected Transactions,Transacciones Afectadas, +Against Customer Order {0},Contra pedido del cliente {0}, +Against Supplier Invoice {0},Contra factura del proveedor {0}, +Against Voucher No,Contra el Número de Comprobante, +Age ({0}),Edad ({0}), +Ageing Range,Rango de antigüedad, +Agent Busy Message,Mensaje de agente ocupado, +Agent Group,Grupo de agentes, +Agent Unavailable Message,Mensaje de agente no disponible, +Aggregate a group of Items into another Item. This is useful if you are maintaining the stock of the packed items and not the bundled item,Agregue un grupo de Artículos en otro Artículo. Esto es útil si está manteniendo el stock de los artículos empaquetados y no del artículo agrupado, +Algorithm,Algoritmo, +All Activities,Todas las Actividades, +All Activities HTML,Todas las actividades HTML, +All Items,Todos los Productos, +All Sales Transactions can be tagged against multiple Sales Persons so that you can set and monitor targets.,Todas las transacciones de ventas se pueden etiquetar contra varias personas de ventas para que pueda establecer y supervisar los objetivos., +All allocations have been successfully reconciled,Todas las asignaciones se han reconciliado con éxito., +All items have already been received,Todos los artículos ya han sido recibidos, +All items in this document already have a linked Quality Inspection.,Todos los artículos de este documento ya tienen una Inspección de Calidad vinculada., +All the Comments and Emails will be copied from one document to another newly created document(Lead -> Opportunity -> Quotation) throughout the CRM documents.,Todos los comentarios y correos electrónicos se copiarán de un documento a otro recién creado (Cliente potencial -> Oportunidad -> Oferta) en todos los documentos del CRM., +"All the required items (raw materials) will be fetched from BOM and populated in this table. Here you can also change the Source Warehouse for any item. And during the production, you can track transferred raw materials from this table.","Todos los artículos necesarios (materias primas) se obtendrán de la lista de materiales y se rellenarán en esta tabla. Aquí también puede cambiar el Almacén de Origen para cualquier artículo. Y durante la producción, puede hacer un seguimiento de las materias primas transferidas desde esta tabla.", +Allocate Payment Request,Asignar solicitud de pago, +Allocated Entries,Entradas Asignadas, +Allocated To:,Asignado a:, +Allocations,Asignaciones, +Allow,Permitir, +Allow Alternative Item must be checked on Item {},Permitir elemento alternativo debe estar marcado en Elemento {}, +Allow Continuous Material Consumption,Permitir el consumo continuo de material, +Allow Excess Material Transfer,Permitir la transferencia de material sobrante, +Allow Internal Transfers at Arm's Length Price,Permitir Transferencias Internas a Precio de Mercado, +Allow Item to be Added Multiple Times in a Transaction,Permitir que un artículo se añada varias veces en una transacción, +Allow Lead Duplication based on Emails,Permitir la duplicación de clientes potenciales basada en correos electrónicos, +Allow Negative rates for Items,Permitir tarifas negativas para Productos, +Allow Or Restrict Dimension,Permitir o Restringir dimensión, +Allow Partial Reservation,Permitir reserva parcial, +Allow Purchase,Permitir Compra, +Allow Sales,Permitir Ventas, +Allow Sales Order Creation For Expired Quotation,Permitir la creación de Órdenes de Venta para Cotizaciones vencidas, +Allow User to Edit Discount,Permitir al usuario editar el descuento, +Allow User to Edit Rate,Permitir al usuario editar la tarifa, +Allow Zero Rate,Permitir Tarifa Cero, +Allow material consumptions without immediately manufacturing finished goods against a Work Order,Permitir consumos de material sin fabricar inmediatamente productos acabados contra una Orden de Trabajo, +Allow multi-currency invoices against single party account ,Permitir facturas en múltiples monedas contra una cuenta de una sola parte., +Allow to Edit Stock UOM Qty for Purchase Documents,Permitir editar la cantidad de UdM de stock para documentos de compras, +Allow to Edit Stock UOM Qty for Sales Documents,Permitir editar la cantidad de UdM de stock para documentos de ventas, +Allow transferring raw materials even after the Required Quantity is fulfilled,Permitir la transferencia de materias primas incluso después de cumplir la cantidad requerida, +Allowed,Permitido, +Allowed Dimension,Dimensión permitida, +Allowed Doctypes,Doctypes permitidos, +Allowed Items,Productos Permitidos, +Allowed primary roles are 'Customer' and 'Supplier'. Please select one of these roles only.,"Los roles principales permitidos son 'Cliente' y 'Proveedor'. Por favor, seleccione sólo uno de estos roles.", +Allows to keep aside a specific quantity of inventory for a particular order.,Permite reservar una cantidad específica de existencias para un pedido concreto., +Already Picked,Ya ha sido seleccionado, +Alternative Items,Ítems Alternativos, +"Alternatively, you can download the template and fill your data in.",También puede descargar la plantilla y rellenar sus datos., +Amount (AED),Importe del impuesto (AED), +Amount Eligible for Commission,Importe elegible para la comisión, +Amount in Account Currency,Importe en Moneda de la Cuenta, +Amount in party's bank account currency,Importe en la divisa de la cuenta bancaria., +Amount in transaction currency,Importe en la divisa de la transacción, +An Item Group is a way to classify items based on types.,Un Grupo de Producto es una forma de clasificar Productos según sus tipos., +An error has been appeared while reposting item valuation via {0},Se ha producido un error al volver a publicar la valoración del artículo a través de {0}, +An error has occurred during {0}. Check {1} for more details,Se ha producido un error durante {0}. Consulte {1} para obtener más detalles.,Error Log +Annual Revenue,Ingresos Anuales, +"Another Cost Center Allocation record {0} applicable from {1}, hence this allocation will be applicable upto {2}","Otro registro de Asignación de Centro de Coste {0} aplicable desde {1}, por lo tanto esta asignación será aplicable hasta {2}", +"Any one of following filters required: warehouse, Item Code, Item Group","Se requiere cualquiera de los siguientes filtros: almacén, código de artículo, grupo de artículos", +Applicable Dimension,Dimensión aplicable, +Applicable On Account,Aplicable en Cuenta, +Applied on each reading.,Se aplica en cada lectura., +Applied putaway rules.,Reglas de almacenamiento aplicadas., +Apply Putaway Rule,Aplicar la regla de almacenamiento, +Apply Recursion Over (As Per Transaction UOM),Aplicar recursión sobre (según UdM de transacción), +Apply SLA for Resolution Time,Aplicar SLA para el tiempo de resolución, +Apply TDS,Aplicar a, +Apply Tax Withholding Amount ,Aplicar Monto de Retención de Impuestos , +Apply restriction on dimension values,Aplicar restricción a los valores de dimensión, +Apply to All Inventory Documents,Aplicar a todos los documentos de inventario, +Apply to Document,Aplicar al documento, +Appointment Created Successfully,Cita creada exitosamente, +Appointment Scheduling Disabled,Programación de citas deshabilitada, +Appointment Scheduling has been disabled for this site,La programación de citas ha sido desactivada para este sitio, +Appointment was created. But no lead was found. Please check the email to confirm,"Se creó la cita, pero no se encontró ningún cliente potencial. Por favor, revise el correo electrónico para confirmar.", +Approximately match the description/party name against parties,Comparar aproximadamente la descripción/nombre de la parte con las partes., +Are you sure you want to clear all demo data?,¿Está seguro de que desea borrar todos los datos de la demostración?, +Are you sure you want to delete this Item?,¿Está seguro de que desea borrar este elemento?, +Are you sure you want to restart this subscription?,¿Está seguro de que desea reiniciar esta suscripción?, +As on Date,A fecha, +"As there are existing submitted transactions against item {0}, you can not change the value of {1}.","Como ya existen transacciones validadas contra el artículo {0}, no puede cambiar el valor de {1}.", +"As there are negative stock, you can not enable {0}.","Como hay existencias negativas, no puede habilitar {0}.", +"As there are reserved stock, you cannot disable {0}.","Como hay stock reservado, no puedes desactivar {0}.", +"As there are sufficient Sub Assembly Items, Work Order is not required for Warehouse {0}.","Dado que hay suficientes artículos de sub ensamblaje, no se requiere una orden de trabajo para el almacén {0}.", +"As {0} is enabled, you can not enable {1}.","Como {0} está habilitado, no puedes habilitar {1}.", +Assembly Items,Artículos de montaje, +Asset Activity,Actividad de Activos, +Asset Capitalization,Capitalización de Activos, +Asset Capitalization Asset Item,Elemento de Capitalización de Activos, +Asset Capitalization Service Item,Elemento de servicio de capitalización de activos, +Asset Capitalization Stock Item,Elemento de stock de capitalización de activos, +Asset Depreciation Details,Detalles de depreciación de activos, +Asset Depreciation Schedule,Calendario de depreciación de activos, +Asset Depreciation Schedule for Asset {0} and Finance Book {1} is not using shift based depreciation,Calendario de depreciación de activos para el activo {0} y el libro de finanzas {1} no está utilizando la depreciación por turnos, +Asset Depreciation Schedule not found for Asset {0} and Finance Book {1},El Calendario de amortización de activos no encontrado para el activo {0} y el libro de finanzas {1}, +Asset Depreciation Schedule {0} for Asset {1} already exists.,El Calendario de amortización de activos {0} para el activo {1} ya existe., +Asset Depreciation Schedule {0} for Asset {1} and Finance Book {2} already exists.,El Calendario de Depreciación de Activos {0} para el Activo {1} y el Libro Financiero {2} ya existe., +"Asset Depreciation Schedules created:
{0}

Please check, edit if needed, and submit the Asset.","Programas de depreciación de activos creados:
{0}

Verifique, edite si es necesario y valide el activo.", +Asset ID,Id de Activo, +Asset Quantity,Cantidad de Activos, +Asset Repair Consumed Item,Artículo Consumido en Reparación de Activos, +Asset Settings,Configuración de Activos, +Asset Shift Allocation,Asignación de Turnos de Activos, +Asset Shift Factor,Factor de cambio de activos, +Asset Shift Factor {0} is set as default currently. Please change it first.,El factor de cambio de activos {0} está configurado como predeterminado actualmente. Cámbielo primero., +Asset cancelled,Activo cancelado, +Asset capitalized after Asset Capitalization {0} was submitted,El Activo capitalizado fue validado después de la Capitalización de Activos {0}, +Asset created,Activo creado, +Asset created after Asset Capitalization {0} was submitted,El Activo creado fue validado después del la Capitalización de Activos {0}, +Asset created after being split from Asset {0},Activo creado después de ser separado del Activo {0}, +Asset decapitalized after Asset Capitalization {0} was submitted,El Activo descapitalizado fue validado después de la Capitalización de Activos {0}, +Asset deleted,Activo eliminado, +Asset issued to Employee {0},Activo emitido al empleado {0}, +Asset out of order due to Asset Repair {0},Activo fuera de servicio debido a la reparación del activo {0}, +Asset received at Location {0} and issued to Employee {1},Activo recibido en el lugar {0} y entregado al empleado {1}, +Asset restored,Activo restituido, +Asset restored after Asset Capitalization {0} was cancelled,Activo restituido después de la Capitalización de Activos {0} fue cancelada, +Asset returned,Activo devuelto, +Asset scrapped,Activo desechado, +Asset sold,Activo vendido, +Asset submitted,Activo validado, +Asset transferred to Location {0},Activo transferido a la ubicación {0}, +Asset updated after being split into Asset {0},Activo actualizado tras ser dividido en Activo {0}, +Asset updated after cancellation of Asset Repair {0},Activo actualizado tras la anulación de la reparación de activos {0}, +Asset updated after completion of Asset Repair {0},Activo actualizado tras la finalización de la reparación del activo {0}, +Asset {0} cannot be received at a location and given to an employee in a single movement,El activo {0} no puede recibirse en un lugar y entregarse a un empleado en un solo movimiento, +Asset {0} does not belong to Item {1},Activo {0} no pertenece al Producto {1}, +Asset {0} does not exist,Activo {0} no existe, +Asset {0} has been created. Please set the depreciation details if any and submit it.,"Se ha creado el activo {0}. Por favor, establezca los detalles de depreciación si los hay y valídelo.", +Asset {0} has been updated. Please set the depreciation details if any and submit it.,"El activo {0} ha sido actualizado. Por favor, establezca los detalles de depreciación si los hay y valídelo.", +Asset's depreciation schedule updated after Asset Shift Allocation {0},Calendario de amortización del activo actualizado tras la asignación del cambio de activo {0}, +Asset's value adjusted after cancellation of Asset Value Adjustment {0},Valor del activo ajustado tras la cancelación del ajuste del valor del activo {0}, +Asset's value adjusted after submission of Asset Value Adjustment {0},Valor del activo ajustado tras la presentación del ajuste del valor del activo {0}, +Assign Job to Employee,Asignar trabajo a un empleado, +Assignment,Asignación, +Assignment Conditions,Condiciones de asignación, +At Row #{0}: The picked quantity {1} for the item {2} is greater than available stock {3} for the batch {4} in the warehouse {5}.,En la fila #{0}: La cantidad seleccionada {1} para el artículo {2} es mayor que el stock disponible {3} para el lote {4} en el almacén {5}., +At Row #{0}: The picked quantity {1} for the item {2} is greater than available stock {3} in the warehouse {4}.,En la fila #{0}: La cantidad seleccionada {1} para el artículo {2} es mayor que el stock disponible {3} en el almacén {4}., +At row {0}: Batch No is mandatory for Item {1},En la fila {0}: el Núm. de Lote es obligatorio para el Producto {1}, +At row {0}: Parent Row No cannot be set for item {1},En la fila {0}: No se puede establecer el nº de fila padre para el artículo {1}, +At row {0}: Qty is mandatory for the batch {1},En la fila {0}: La cant. es obligatoria para el lote {1}, +At row {0}: Serial No is mandatory for Item {1},En la fila {0}: el Núm. Serial es obligatorio para el Producto {1}, +At row {0}: Serial and Batch Bundle {1} has already created. Please remove the values from the serial no or batch no fields.,"En la fila {0}: El paquete de serie y lote {1} ya está creado. Por favor, elimine los valores de los campos nº de serie o nº de lote.", +At row {0}: set Parent Row No for item {1},En la fila {0}: establezca el nº de fila padre para el artículo {1}, +Attach CSV File,Adjuntar archivo CSV, +Attendance & Leaves,Asistencia y Salidas, +Attribute value: {0} must appear only once,Valor del atributo: {0} debe aparecer sólo una vez, +Auto Create Exchange Rate Revaluation,Creación automática de la revalorización del Tipo de Cambio, +Auto Create Purchase Receipt,Creación automática de Recibo de Compra, +Auto Create Serial and Batch Bundle For Outward,Crear Automáticamente Lote y Serie para Salida, +Auto Create Subcontracting Order,Crear orden de subcontratación automáticamente, +Auto Created Serial and Batch Bundle,Creación automática de series y lotes, +Auto Creation of Contact,Creación automática de Contacto, +Auto Email Report,Reporte de Correo Electrónico Automático, +Auto Insert Item Price If Missing,Insertar automáticamente el precio del artículo si falta, +Auto Name,Nombre Automático, +Auto Reconcile,Reconciliación Automática, +Auto Reconcile Payments,Reconciliación Automática de Pagos, +Auto Reconciliation,Reconciliación Automática, +Auto Reconciliation of Payments has been disabled. Enable it through {0},Reconciliación automática de pagos ha sido desactivada. Habilítelo a través de {0}, +Auto Reserve Serial and Batch Nos,Reserva automática de números de serie y de lote, +Auto Reserve Stock for Sales Order on Purchase,Reserva automática de stock para órdenes de venta en el momento de la compra, +Auto close Opportunity Replied after the no. of days mentioned above,Cierre automático Oportunidad Respondida después del número de días mencionado anteriormente, +Auto match and set the Party in Bank Transactions,Coincidencia automática y fijación de la entidad en las Transacciones Bancarias, +Auto write off precision loss while consolidation,Cancelación automática de la pérdida de precisión durante la consolidación, +Automatically Add Filtered Item To Cart,Añadir automáticamente el artículo filtrado a la cesta, +Automatically Fetch Payment Terms from Order,Obtenga automáticamente las condiciones de pago del pedido, +Automatically post balancing accounting entry,Registrar automáticamente el asiento contable de balance, +Available Batch Report,Informe de lotes disponibles, +Available Qty For Consumption,Cantidad disponible para consumo, +Available Qty at Company,Cant. disponible en Compañía, +Available Qty at Target Warehouse,Cantidad disponible en Almacén de destino, +Available Qty to Reserve,Cantidad disponible para reservar, +Average Completion,Promedio de completado, +Avg Rate,Tasa promedio, +Avg Rate (Balance Stock),Tasa media (Balance Stock), +BFS,BFS (Búsqueda en Amplitud), +BIN Qty,Cant. BIN, +BOM Created,LdM Creado, +BOM Creator,Creador LdM, +BOM Creator Item,Creador de elementos de lista de materiales, +BOM Info,Información de LdM, +BOM Level,Nivel de lista de materiales, +BOM Tree,Árbol LdM, +BOM UoM,LdM UdM, +BOM Update Batch,Lote de actualización de lista de materiales, +BOM Update Initiated,Actualización de lista de materiales iniciada, +BOM Update Log,Registro de actualización de lista de materiales, +BOM Update Tool Log with job status maintained,Registro de la herramienta de actualización de lista de materiales con el estado del trabajo mantenido, +BOM Updation already in progress. Please wait until {0} is complete.,La actualización de la lista de materiales ya está en curso. Espere hasta que se complete {0} ., +BOM Updation is queued and may take a few minutes. Check {0} for progress.,La actualización de la lista de materiales está en cola y puede tardar unos minutos. Verifique {0} para ver el progreso., +BOM and Production,Lista de materiales y producción, +BOM recursion: {1} cannot be parent or child of {0},Recursión de la lista de materiales: {1} no puede ser padre o hijo de {0}, +BOMs Updated,Listas de materiales actualizadas, +BOMs created successfully,Listas de materiales creadas con éxito, +BOMs creation failed,La creación de listas de materiales falló, +"BOMs creation has been enqueued, kindly check the status after some time","La creación de listas de materiales se ha puesto en cola, compruebe el estado después de algún tiempo", +Balance Qty (Stock),Cantidad (stock), +Balance Sheet Summary,Resumen del balance general, +Balance Stock Value,Valor de stock, +Bank Reconciliation Tool,Herramienta de Reconciliación Bancaria, +Bank Statement Import,Importación de extractos bancarios, +Bank Transaction {0} Matched,Transacción bancaria {0} Cotejada, +Bank Transaction {0} added as Journal Entry,Transacción bancaria {0} añadida como asiento, +Bank Transaction {0} added as Payment Entry,Transacción bancaria {0} añadida como asiento de pago, +Bank Transaction {0} is already fully reconciled,Transacción bancaria {0} ya está totalmente conciliada, +Bank Transaction {0} updated,Transacción bancaria {0} actualizada, +Bank/Cash Account,Cuenta Banco/Efectivo, +Bank/Cash Account {0} doesn't belong to company {1},La Cuenta Banco/Efectivo {0} no pertenece a la compañía {1}, +Base Amount,Importe base, +Base Cost Per Unit,Coste base por unidad, +Base Rate,Tarifa base, +Base Tax Withholding Net Total,Base Imponible Retención Neta Total, +Base Total,Total base, +Base Total Billable Amount,Base Importe total facturable, +Base Total Billed Amount,Base Importe total facturado, +Base Total Costing Amount,Base Importe total del cálculo de costes, +Based On Value,Basado en el Valor, +"Based on your HR Policy, select your leave allocation period's end date","Basándose en su política de RRHH, seleccione la fecha de finalización del período de asignación de vacaciones", +"Based on your HR Policy, select your leave allocation period's start date","Basándose en su política de RRHH, seleccione la fecha de inicio de su período de asignación de vacaciones", +Batch Expiry Date,Fecha de caducidad del lote, +Batch No is mandatory,El número de lote es obligatorio, +Batch No {0} does not exists,Lote núm. {0} no existe, +Batch No {0} is linked with Item {1} which has serial no. Please scan serial no instead.,"El lote nº {0} está vinculado con el artículo {1} que tiene nº de serie. Por favor, escanee el nº de serie en su lugar.", +Batch No.,Nº de Lote, +Batch Nos,Números de Lote, +Batch Nos are created successfully,Los Núm. de Lote se crearon correctamente, +Batch Not Available for Return,Lote no disponible para devolución, +Batch Qty,Cantidad de lote, +Batch and Serial No,Núm. de Lote y Serie, +Batch not created for item {} since it does not have a batch series.,"Lote no creado para el artículo {}, ya que no tiene serie de lote.", +Batch {0} and Warehouse,Lote {0} y almacén, +Batch {0} is not available in warehouse {1},El lote {0} no está disponible en el almacén {1}, +Batchwise Valuation,Valoración por lotes, +Beginning of the current subscription period,Inicio del periodo de suscripción actual, +Below Subscription Plans are of different currency to the party default billing currency/Company currency: {0},Los siguientes planes de suscripción tienen una moneda diferente a la moneda de facturación predeterminada de la parte/moneda de la empresa: {0}, +Bill for Rejected Quantity in Purchase Invoice,Facturación de la cantidad rechazada en la factura de compra, +Billed Items To Be Received,Artículos facturados por recibir, +"Billed, Received & Returned","Facturado, Recibido y Devuelto", +Billing Address Details,Detalles de la dirección de facturación, +Billing Interval in Subscription Plan must be Month to follow calendar months,El intervalo de facturación en el plan de suscripción debe ser Mes para seguir los meses naturales, +Bisect Accounting Statements,Estados contables divididos, +Bisect Left,Dividir a la izquierda, +Bisect Nodes,Dividir nodos, +Bisect Right,Dividir a la derecha, +Bisecting From,Dividir desde, +Bisecting Left ...,Dividir a la izquierda..., +Bisecting Right ...,Dividir a la derecha..., +Bisecting To,Dividir a, +Blanket Order Allowance (%),Asignación de pedidos generales (%), +Bom No,Lista de materiales Nº, +Book Advance Payments as Liability option is chosen. Paid From account changed from {0} to {1}.,Se eligió la opción de Reservar pagos por adelantado como pasivo. La cuenta Pagado desde cambió de {0} a {1}., +Book Advance Payments in Separate Party Account,Contabilizar los pagos anticipados en una cuenta separada, +Book Tax Loss on Early Payment Discount,Pérdida de impuestos sobre descuentos de pago anticipado, +Book an appointment,Concierte una cita, +Booking stock value across multiple accounts will make it harder to track stock and account value.,Registrar el valor de las existencias en varias cuentas hará que sea más difícil realizar un seguimiento del valor de las existencias y de las cuentas., +Books have been closed till the period ending on {0},Los libros estarán cerrados hasta el período que finaliza el {0}, +Both Payable Account: {0} and Advance Account: {1} must be of same currency for company: {2},Tanto la Cuenta de Acreedores: {0} como la Cuenta de Anticipos: {1} deben ser de la misma moneda para la empresa: {2}, +Both Receivable Account: {0} and Advance Account: {1} must be of same currency for company: {2},Tanto la cuenta de deudores: {0} como la cuenta de anticipos: {1} deben ser de la misma moneda para la empresa: {2}, +Both {0} Account: {1} and Advance Account: {2} must be of same currency for company: {3},Tanto la cuenta {0} : {1} como la cuenta de anticipos: {2} deben ser de la misma moneda para la empresa: {3}, +Budget Exceeded,Presupuesto excedido, +Build All?,¿Construir todo?, +Build Tree,Construir árbol, +Buildable Qty,Cantidad fabricable, +Bulk Transaction Log,Registro de transacciones masivas, +Bulk Transaction Log Detail,Detalle del registro de transacciones masivas, +Bulk Update,Actualización masiva, +Bundle Items,Conjunto de Productos, +Buying & Selling Settings,Configuración de Compra y Venta, +Buying and Selling,Compra y Venta, +"By default, the Supplier Name is set as per the Supplier Name entered. If you want Suppliers to be named by a Naming Series choose the 'Naming Series' option.","Por defecto, el Nombre del Proveedor se establece según el Nombre del Proveedor introducido. Si desea que los Proveedores sean nombrados por una Serie de Nombres elija la opción 'Serie de Nombres'.", +Bypass credit check at Sales Order,Omitir verificación de crédito en Orden de Venta, +COGS By Item Group,CMV grupo de artículos, +COGS Debit,Débito CMV, +CRM Note,Nota CRM, +CRM Settings,Configuración CRM, +Calculate Product Bundle Price based on Child Items' Rates,Calcular el precio del paquete de productos en función de las tarifas de los artículos secundarios, +Calculate daily depreciation using total days in depreciation period,Calcular la depreciación diaria utilizando el total de días del período de depreciación, +Call Again,Volver a llamar, +Call Ended,Llamada finalizada, +Call Handling Schedule,Horario de atención de llamadas, +Call Received By,Llamada recibida por, +Call Receiving Device,Dispositivo receptor de llamadas, +Call Routing,Enrutamiento de llamadas, +Call Schedule Row {0}: To time slot should always be ahead of From time slot.,Horario de llamadas Fila {0}: La franja horaria A debe estar siempre por delante de la franja horaria Desde., +Call Type,Tipo de llamada, +Callback,Devolver Llamada, +Campaign Item,Artículos de campaña, +Can not close Work Order. Since {0} Job Cards are in Work In Progress state.,No se puede cerrar la Orden de Trabajo. Ya que {0} Las fichas de trabajo están en estado Trabajo en curso., +"Can not filter based on Child Account, if grouped by Account",No se puede filtrar basado en la cuenta secundaria si está agrupada por cuenta, +"Can't change the valuation method, as there are transactions against some items which do not have its own valuation method","No se puede cambiar el método de valoración, ya que hay transacciones contra algunos artículos que no tienen su propio método de valoración.", +Can't disable batch wise valuation for active batches.,No se puede deshabilitar la valoración por lotes para lotes activos., +Can't disable batch wise valuation for items with FIFO valuation method.,No se puede desactivar la valoración por lotes para artículos con método de valoración FIFO., +Cannot Merge,No se puede fusionar, +Cannot Resubmit Ledger entries for vouchers in Closed fiscal year.,No se pueden volver a validar entradas del libro mayor para comprobantes en un año fiscal cerrado., +"Cannot amend {0} {1}, please create a new one instead.","No se puede modificar {0} {1}; en su lugar, cree uno nuevo.", +Cannot apply TDS against multiple parties in one entry,No se puede aplicar Retención de impuestos en origen contra varias partes en una sola entrada, +Cannot cancel as processing of cancelled documents is pending.,No se puede cancelar porque el procesamiento de los documentos cancelados está pendiente., +Cannot cancel the transaction. Reposting of item valuation on submission is not completed yet.,"No se puede cancelar la transacción. La validación del traspaso de la valoración del artículo, aún no se ha completado.", +Cannot change Reference Document Type.,No se puede cambiar el tipo de documento de referencia., +Cannot complete task {0} as its dependant task {1} are not completed / cancelled.,No se puede completar la tarea {0} porque su tarea dependiente {1} no está completada / cancelada., +Cannot convert Task to non-group because the following child Tasks exist: {0}.,No se puede convertir una tarea a una no grupal porque existen las siguientes tareas secundarias: {0}., +Cannot convert to Group because Account Type is selected.,No se puede convertir a Grupo porque Tipo de Cuenta está seleccionado., +Cannot create Stock Reservation Entries for future dated Purchase Receipts.,No se pueden crear entradas de reserva de stock para recibos de compra con fecha futura., +Cannot create a pick list for Sales Order {0} because it has reserved stock. Please unreserve the stock in order to create a pick list.,No se puede crear una lista de selección para la orden de venta {0} porque tiene stock reservado. Anule la reserva del stock para crear una lista de selección., +Cannot create accounting entries against disabled accounts: {0},No se pueden crear asientos contables contra cuentas desactivadas: {0}, +Cannot disable batch wise valuation for FIFO valuation method.,No se puede desactivar la valoración por lotes para el método de valoración FIFO., +Cannot enqueue multi docs for one company. {0} is already queued/running for company: {1},No se pueden poner en cola varios documentos para una empresa. {0} ya está en cola/en ejecución para la empresa: {1}, +Cannot find a default warehouse for item {0}. Please set one in the Item Master or in Stock Settings.,No se puede encontrar un almacén predeterminado para el artículo {0}. Establezca uno en el Maestro de artículos o en la Configuración de existencias., +Cannot make any transactions until the deletion job is completed,No se puede realizar ninguna transacción hasta que se complete el trabajo de eliminación., +Cannot produce more item for {0},No se puede producir más productos por {0}, +Cannot produce more than {0} items for {1},No se pueden producir más de {0} productos por {1}, +Cannot receive from customer against negative outstanding,No se puede recibir del cliente contra saldos pendientes negativos, +Cannot retrieve link token for update. Check Error Log for more information,No se puede recuperar el token de enlace para la actualización. Consulte el registro de errores para obtener más información, +Cannot retrieve link token. Check Error Log for more information,No se puede recuperar el token de enlace. Compruebe el registro de errores para obtener más información, +Cannot {0} from {2} without any negative outstanding invoice,No se puede {0} desde {2} sin ninguna factura pendiente negativa, +Capacity (Stock UOM),Capacidad (Stock UdM), +Capacity in Stock UOM,Capacidad en stock UdM, +Capacity must be greater than 0,La capacidad debe ser superior a 0, +Capitalization,Capitalización, +Capitalization Method,Método de Capitalización, +Capitalize Asset,Capitalizar Activo, +Capitalize Repair Cost,Capitalizar el coste de reparación, +Capitalized,Capitalizado, +Carrier,Operador, +Carrier Service,Servicio de Operador, +Carry Forward Communication and Comments,Llevar adelante la comunicación y los comentarios, +Category Details,Detalles de la categoría, +Caution: This might alter frozen accounts.,Precaución: Esto podría alterar las cuentas congeladas., +Change in Stock Value,Cambio en el Valor de Stock, +Changed customer name to '{}' as '{}' already exists.,Se cambió el nombre del Cliente a '{}' porque '{}' ya existe., +Changes,Cambio, +Charge of type 'Actual' in row {0} cannot be included in Item Rate or Paid Amount,El cargo de tipo 'Real' en la fila {0} no puede incluirse en la Tarifa del artículo o en el Importe pagado, +Chart Of Accounts,Plan de Cuentas, +Checked On,Comprobado el, +Checking this will round off the tax amount to the nearest integer,Al marcar esta casilla se redondeará el importe del impuesto al número entero más próximo, +Cheques and Deposits Incorrectly cleared,Cheques y depósitos compensados incorrectamente, +Choose a WIP composite asset,Elija un activo compuesto WIP, +Clear Demo Data,Borrar datos de demostración, +Clear Notifications,Borrar Notificaciones, +Clearing Demo Data...,Borrando datos de demostración..., +Click on 'Get Finished Goods for Manufacture' to fetch the items from the above Sales Orders. Items only for which a BOM is present will be fetched.,"Haga clic en ""Obtener Productos Terminados para Fabricación"" para obtener los artículos de los Pedidos de Ventas anteriores. Sólo se obtendrán los artículos para los que exista una lista de materiales.", +Click on Add to Holidays. This will populate the holidays table with all the dates that fall on the selected weekly off. Repeat the process for populating the dates for all your weekly holidays,Haga clic en Añadir a vacaciones. Esto rellenará la tabla de días festivos con todas las fechas que caen en el día festivo semanal seleccionado. Repita el proceso para rellenar las fechas de todas sus vacaciones semanales, +Click on Get Sales Orders to fetch sales orders based on the above filters.,Haga clic en Obtener pedidos de venta para obtener los pedidos de venta basados en los filtros anteriores., +Click to add email / phone,Clic para añadir correo / teléfono, +Close Replied Opportunity After Days,Cerrar oportunidad respondida después de días, +Closed Work Order can not be stopped or Re-opened,La orden de trabajo cerrada no puede detenerse ni reabrirse, +Closing,Cierre, +Closing Balance as per Bank Statement,Saldo de cierre según extracto bancario, +Closing Balance as per ERP,Saldo de cierre según ERP, +Closing Stock Balance,Saldo de stock de cierre, +Columns are not according to template. Please compare the uploaded file with standard template,"Las columnas no se ajustan a la plantilla. Por favor, compare el archivo subido con la plantilla estándar", +Communication Channel,Canal de comunicación, +Company Address Display,Mostrar dirección de la empresa, +Company Billing Address,Dirección de Facturación de la Compañía, +Company Details,Detalles de la Compañía, +Company Shipping Address,Dirección de envío de la compañía, +Company Tax ID,Número de Identificación Fiscal de la Compañía, +Company and Posting Date is mandatory,La Empresa y la Fecha de Publicación son obligatorias, +Company is mandatory,La empresa es obligatoria, +Company is mandatory for generating an invoice. Please set a default company in Global Defaults.,La empresa es obligatoria para generar una factura. Establezca una empresa predeterminada en Valores predeterminados globales., +Company which internal customer represents,Compañía a la que representa el Cliente Interno, +Company which internal customer represents.,Compañía a la que representa el Cliente Interno., +Company which internal supplier represents,Empresa a la que representa el proveedor interno, +Company {0} is added more than once,La empresa {0} se agrega más de una vez, +Company {} does not exist yet. Taxes setup aborted.,La empresa {} aún no existe. Configuración de impuestos abortada., +Company {} does not match with POS Profile Company {},La empresa {} no coincide con el perfil de POS {}, +Competitor,Competidor, +Competitor Detail,Detalle del Competidor, +Competitor Name,Nombre del Competidor, +Competitors,Competidores, +Complete Job,Trabajo completo, +Complete Order,Pedido completo, +Completed On,Completado el, +Completed On cannot be greater than Today,Completado el no puede ser después de hoy, +Completed Tasks,Tareas Completadas, +Completed Time,Tiempo completado, +Completion Date can not be before Failure Date. Please adjust the dates accordingly.,La fecha de finalización no puede ser anterior a la fecha de falla. Ajuste las fechas según corresponda., +Conditional Rule,Regla condicional, +Conditional Rule Examples,Ejemplos de reglas condicionales, +Configure Product Assembly,Configurar el ensamblaje del producto, +Configure the action to stop the transaction or just warn if the same rate is not maintained.,Configure la acción para detener la transacción o simplemente avisar si no se mantiene la misma tasa., +Connections,Conexiones, +Consider Entire Party Ledger Amount,Considerar el importe total del Libro Mayor de Partes, +Consider Minimum Order Qty,Considerar la cantidad mínima de pedido, +Consider Rejected Warehouses,Considerar los almacenes rechazados, +Considered In Paid Amount,Considerado en el importe pagado, +Consolidate Sales Order Items,Consolidar posiciones de pedido de cliente, +Consolidate Sub Assembly Items,Consolidar elementos de subensamblado, +Consumed Asset Items is mandatory for Decapitalization,Los elementos de activos consumidos son obligatorios para la descapitalización, +Consumed Asset Total Value,Valor total de los activos consumidos, +Consumed Assets,Activos consumidos, +Consumed Quantity,Calidad consumida, +Consumed Stock Items,Artículos de stock consumidos, +Consumed Stock Items or Consumed Asset Items are mandatory for creating new composite asset,Los artículos de stock consumidos o los artículos de activos consumidos son obligatorios para crear un nuevo activo compuesto., +"Consumed Stock Items, Consumed Asset Items or Consumed Service Items is mandatory for Capitalization","Los artículos de stock consumidos, los artículos de activos consumidos o los artículos de servicios consumidos son obligatorios para la capitalización", +Consumed Stock Total Value,Valor total del stock consumido, +Consumption Rate,Tasa de consumo, +Contact Details,Detalles de contacto, +Contact Mobile,Contacto Móvil, +Contact Us Settings,Configuración de contácto, +Contacts,Contactos, +Contract Template Help,Ayuda con la plantilla de contrato, +Contribution Qty,Contribución Cantidad, +Control Historical Stock Transactions,Control de las transacciones históricas de existencias, +Conversion factor for item {0} has been reset to 1.0 as the uom {1} is same as stock uom {2}.,El factor de conversión para el artículo {0} se ha restablecido a 1.0 ya que la unidad de medida {1} es la misma que la unidad de medida de stock {2}., +Convert Item Description to Clean HTML in Transactions,Convertir la descripción del artículo a HTML limpio en las transacciones, +Convert to Group,Convertir a grupo,Warehouse +Convert to Item Based Reposting,Convertir a reenvío basado en artículos, +Convert to Ledger,Convertir a libro mayor,Warehouse +Core,Núcleo, +Corrective Job Card,Ficha de trabajo correctivo, +Corrective Operation,Operación correctiva, +Corrective Operation Cost,Coste de la operación correctiva, +Cost Center Allocation,Asignación de centros de costes, +Cost Center Allocation Percentage,Porcentaje de Asignación del Centro de Costos, +Cost Center Allocation Percentages,Porcentajes de Asignación del Centro de Costo, +Cost Center For Item with Item Code {0} has been Changed to {1},El centro de costes para el artículo con código de artículo {0} se ha cambiado a {1}, +"Cost Center is a part of Cost Center Allocation, hence cannot be converted to a group","El centro de costes forma parte de la asignación de centros de costes, por lo que no puede convertirse en un grupo", +Cost Center with Allocation records can not be converted to a group,El centro de costes con registros de asignación no puede convertirse en un grupo, +Cost Center {0} cannot be used for allocation as it is used as main cost center in other allocation record.,"El centro de costes {0} no puede utilizarse para la asignación, ya que se utiliza como centro de costes principal en otro registro de asignación.", +Cost Center {} doesn't belong to Company {},Centro de costos {} no pertenece a la empresa {}, +Cost Center {} is a group cost center and group cost centers cannot be used in transactions,El centro de costes {} es un centro de costes de grupo y los centros de costes de grupo no pueden utilizarse en las transacciones, +Cost Configuration,Configuración de costes, +Cost Per Unit,Coste por unidad, +Cost of New Capitalized Asset,Coste del nuevo activo capitalizado, +Cost of Poor Quality Report,Informe sobre el coste de la mala calidad, +Cost to Company (CTC),Coste para la empresa (CTE), +Costing Details,Detalles de costos, +Could Not Delete Demo Data,No se pueden borrar los datos de la demostración, +Could not auto update shifts. Shift with shift factor {0} needed.,No se pudieron actualizar automáticamente los turnos. Se necesita un turno con un factor de turno {0} ., +Could not detect the Company for updating Bank Accounts,No se ha podido detectar la empresa para actualizar las cuentas bancarias, +Could not find path for ,No se pudo encontrar la ruta para , +Count,Contar, +Create Depreciation Entry,Crear asiento de amortización, +Create Employee records.,Crear registros de empleados., +Create Grouped Asset,Crear activos agrupados, +Create Job Card based on Batch Size,Crear tarjeta de trabajo en función del tamaño del lote, +Create Journal Entries,Crear asientos, +Create Ledger Entries for Change Amount,Crear entradas en el libro mayor para el importe de modificación, +Create Link,Crear enlace, +Create Multi-level BOM,Crear lista de materiales Multi-Nivel, +Create New Customer,Crear Nuevo Cliente, +Create Opportunity,Crear Oportunidad, +Create Prospect,Crear prospecto, +Create Reposting Entries,Crear entradas de reenvío, +Create Reposting Entry,Crear entrada de reenvío, +Create Stock Entry,Crear entrada de stock, +Create Workstation,Crear estación de trabajo, +Create a new composite asset,Crear un nuevo activo compuesto, +Create a variant with the template image.,Cree una variante con la imagen de la plantilla., +Create in Draft Status,Crear en estado Borrador, +Create {0} {1} ?,¿Crear {0} {1} ?, +Created On,Creado el, +Created {0} scorecards for {1} between:,Se crearon {0} tarjetas de puntos para {1} entre:, +Creating Delivery Note ...,Creando Nota de Entrega..., +Creating Journal Entries...,Creación de asientos de diario..., +Creating Packing Slip ...,Creando albarán..., +Creating Purchase Invoices ...,Creando facturas de compra..., +Creating Purchase Receipt ...,Creando Recibo de Compra..., +Creating Sales Invoices ...,Creando facturas de venta..., +Creating Stock Entry,Creando Entrada de Inventario, +Creating Subcontracting Order ...,Creando Orden de Subcontratación..., +Creating Subcontracting Receipt ...,Creando Recibo de Subcontratación..., +Creating User...,Creando usuario..., +Creation,Creación, +Creation of {1}(s) successful,Creación de {1}(s) exitosa, +"Creation of {0} failed. + Check Bulk Transaction Log","La creación de {0} falló. + Verificar Registro de transacciones masivas", +"Creation of {0} partially successful. + Check Bulk Transaction Log","Creación de {0} parcialmente satisfactoria. + Compruebe Registro de transacciones masivas", +Credit (Transaction),Crédito (Transacción), +Credit Amount in Transaction Currency,Importe del crédito en la moneda de la transacción, +Credit Limit Crossed,Límite de crédito sobrepasado, +Credit Limit Settings,Configuración del límite de crédito, +"Credit Note will update it's own outstanding amount, even if ""Return Against"" is specified.","La nota de crédito actualizará su propio importe pendiente, incluso si se especifica ""Devolución contra"".", +Currency Exchange Settings Details,Detalles de la configuración del cambio de divisas, +Currency Exchange Settings Result,Resultado de la configuración de cambio de moneda, +Current Asset,Activo corriente, +Current Index,Índice actual, +Current Level,Nivel actual, +Current Liability,Pasivo corriente, +Current Node,Nodo actual, +Current Serial / Batch Bundle,Paquete de serie / lote actual, +Custom,Personalizar, +Custom delimiters,Delimitador personalizado, +Customer ,Cliente , +Customer / Item / Item Group,Cliente / Producto / Grupo de Productos, +Customer Defaults,Valores predeterminados del cliente, +Customer Group Item,Artículo del grupo de clientes, +Customer Group: {0} does not exist,Grupo de Clientes: {0} no existe, +Customer Item,Artículo del cliente, +Customer Name: ,Nombre del cliente: , +Customer Portal Users,Usuarios del Portal del Cliente, +Customer: ,Cliente: , +Daily Time to send,Tiempo diario para enviar, +Dashboard,Tablero, +Data Based On,Datos basados en, +Date ,Fecha , +Date must be between {0} and {1},La fecha debe estar entre {0} y {1}, +Days before the current subscription period,Días antes del período de suscripción actual, +DeLinked,Desvinculado, +Deal Owner,Propietario de la Oferta, +Debit (Transaction),Débito (Transacción), +Debit Amount in Transaction Currency,Importe del débito en la moneda de la transacción, +"Debit Note will update it's own outstanding amount, even if ""Return Against"" is specified.","La nota de débito actualizará su propio monto pendiente, incluso si se especifica ""Devolver contra"".", +Debit-Credit Mismatch,Desajuste débito-crédito, +Debit-Credit mismatch,Desajuste débito-crédito, +Decapitalization,Descapitalización, +Decapitalized,Descapitalizado, +Default Advance Account,Cuenta de anticipos por defecto, +Default Advance Paid Account,Cuenta de anticipos por defecto, +Default Advance Received Account,Cuenta de anticipos recibidos por defecto, +Default BOM not found for FG Item {0},Lista de materiales por defecto no encontrada para el artículo FG {0}, +Default Discount Account,Cuenta de descuento predeterminada, +Default In-Transit Warehouse,Almacén en tránsito predeterminado, +Default Operating Cost Account,Cuenta de costos operativos por defecto, +Default Payment Discount Account,Cuenta de descuento por pago predeterminado, +Default Provisional Account,Cuenta provisional predeterminada, +Default Service Level Agreement for {0} already exists.,Ya existe un acuerdo de nivel de servicio predeterminado para {0} ., +Default Unit of Measure for Item {0} cannot be changed directly because you have already made some transaction(s) with another UOM. You need to either cancel the linked documents or create a new Item.,La unidad de medida predeterminada para el artículo {0} no se puede cambiar directamente porque ya ha realizado alguna transacción con otra unidad de medida. Debe cancelar los documentos vinculados o crear un artículo nuevo., +Default settings for your stock-related transactions,Configuración predeterminada para sus transacciones relacionadas con acciones, +"Default tax templates for sales, purchase and items are created.","Se crean plantillas de impuestos por defecto para ventas, compras y artículos.", +Deferred Accounting,Contabilidad diferida, +Deferred Accounting Defaults,Contabilidad diferida predeterminada, +Deferred Revenue and Expense,Ingresos y gastos diferidos, +Deferred accounting failed for some invoices:,La contabilidad diferida falló para algunas facturas:, +Delay (In Days),Retraso (en días), +Delayed,Retrasado, +Delayed Tasks Summary,Resumen de tareas retrasadas, +Delete Accounting and Stock Ledger Entries on deletion of Transaction,Borrar asientos del libro de contabilidad y de existencias al borrar una transacción, +Delete Bins,Eliminar contenedores, +Delete Cancelled Ledger Entries,Eliminar entradas contables canceladas, +Delete Dimension,Eliminar Dimensión, +Delete Leads and Addresses,Eliminar clientes potenciales y direcciones, +Delete Transactions,Eliminar transacciones, +Deleted Documents,Documentos Eliminados, +Deletion in Progress!,¡Eliminación en progreso!, +Delimiter options,Opciones de delimitador, +Delivery Manager,Gerente de Envío, +Delivery Note Packed Item,Albarán de entrega Artículo embalado, +Delivery Note(s) created for the Pick List,Nota(s) de entrega creada(s) para la lista de selección, +Delivery User,Usuario de Envío, +Delivery to,Entregar a, +Demo Company,Empresa de Demostración, +Demo data cleared,Datos de demostración borrados, +Dependant SLE Voucher Detail No,Detalle del comprobante SLE dependiente N.º, +Dependent Task {0} is not a Template Task,La tarea dependiente {0} no es una tarea plantilla, +Deposit,Depósito, +Depreciate based on daily pro-rata,Depreciación basada en el prorrateo diario, +Depreciate based on shifts,Depreciar según turnos, +Depreciation Details,Detalles de la depreciación, +Depreciation Entry Posting Status,Estado de contabilización del asiento de amortización, +Depreciation Expense Account should be an Income or Expense Account.,La cuenta de gastos de depreciación debe ser una cuenta de ingresos o de gastos., +Depreciation Posting Date cannot be before Available-for-use Date,La fecha de contabilización de la depreciación no puede ser anterior a la fecha de disponibilidad para uso, +Depreciation Row {0}: Depreciation Posting Date cannot be before Available-for-use Date,Fila de depreciación {0}: La fecha de contabilización de la depreciación no puede ser anterior a la fecha de disponibilidad para uso, +Depreciation Schedule View,Vista del calendario de amortización, +Depreciation cannot be calculated for fully depreciated assets,La amortización no puede calcularse para los activos totalmente amortizados, +Description of Content,Descripción del contenido, +Desk User,Usuario de Escritorio, +Difference In,Diferencia en, +Difference Posting Date,Fecha de publicación de la diferencia, +Difference Qty,Diferencia Cant., +Different 'Source Warehouse' and 'Target Warehouse' can be set for each row.,Se pueden configurar diferentes 'Almacén de origen' y 'Almacén de destino' para cada fila., +Dimension Details,Detalles de la dimensión, +Dimension Filter Help,Ayuda del filtro de dimensiones, +Dimension-wise Accounts Balance Report,Informe de balance de cuentas por dimensiones, +Direct Expense,Gastos Directos, +Disable Last Purchase Rate,Desactivar última tasa de compra, +Disable Serial No And Batch Selector,Desactivar selección de Nún. de Serie y Lote, +Disabled Account Selected,Cuenta deshabilitada seleccionada, +Disabled Warehouse {0} cannot be used for this transaction.,El almacén deshabilitado {0} no se puede utilizar para esta transacción., +Disabled pricing rules since this {} is an internal transfer,Deshabilitado las reglas de precios ya que esta {} es una transferencia interna, +Disabled tax included prices since this {} is an internal transfer,"Precios con impuestos incluidos, ya que este {} es un traslado interno", +Disables auto-fetching of existing quantity,Desactiva la obtención automática de la cantidad existente, +Disassemble,Desmontar, +Disassemble Order,Orden de desmontaje, +Discount Account,Cuenta de Descuento, +Discount Date,Fecha de descuento, +Discount Settings,Configuración de Descuento, +Discount Validity,Validez del descuento, +Discount Validity Based On,Validez del descuento basado en, +Discount of {} applied as per Payment Term,Descuento de {} aplicado según la Condición de Pago, +Discounted Amount,Importe descontado, +"Discounts to be applied in sequential ranges like buy 1 get 1, buy 2 get 2, buy 3 get 3 and so on","Descuentos a aplicar en rangos secuenciales como compra 1 consigue 1, compra 2 consigue 2, compra 3 consigue 3 y así sucesivamente", +Discrepancy between General and Payment Ledger,Discrepancia entre el Libro Mayor y el Libro de Pagos, +Dispatch Address,Dirección de Despacho, +Dispatch Address Name,Nombre de Dirección de Despacho, +Distinct Item and Warehouse,Distinto artículo y almacén, +Distribute Additional Costs Based On ,Distribuir los costes adicionales en función de , +Distribute Manually,Distribuir manualmente, +Do Not Explode,No desglosar, +Do Not Update Serial / Batch on Creation of Auto Bundle,No actualizar el número de serie o lote al crear un paquete automático, +Do Not Use Batch-wise Valuation,No utilice la valoración por lotes, +Do reposting for each Stock Transaction,Realice el traspaso para cada transacción bursátil, +Do you still want to enable negative inventory?,¿Aún desea activar el inventario negativo?, +DocTypes should not be added manually to the 'Excluded DocTypes' table. You are only allowed to remove entries from it.,Los DocTypes no deben añadirse manualmente a la tabla 'DocTypes excluidos'. Solamente se le permite eliminar entradas de la misma., +Document Type already used as a dimension,Tipo de documento ya utilizado como dimensión, +Documents,Documentos, +Documents: {0} have deferred revenue/expense enabled for them. Cannot repost.,Documentos: {0} tienen habilitados ingresos/gastos diferidos. No se pueden volver a publicar., +Domain Settings,Configuraciones de Dominio, +Don't Reserve Sales Order Qty on Sales Return,No reserve la cantidad de la orden de venta en la devolución de ventas, +Don't Send Emails,No envíe correos electrónicos, +Dont Recompute tax,No recalcular impuestos, +Download Backups,Descargar Backups, +Download CSV Template,Descargar la plantilla CSV, +Download Materials Request Plan,Descargar Plan de Solicitud de Materiales, +Download Materials Request Plan Section,Descargar Sección de Solicitud de Planos de Materiales, +Dunning Amount (Company Currency),Importe de la reclamación (moneda de la empresa), +Dunning Level,Nivel de reclamación, +Duplicate Closing Stock Balance,Saldo de stock de cierre duplicado, +Duplicate Customer Group,Grupo de clientes duplicados, +Duplicate Finance Book,Duplicado del Libro de Finanzas, +Duplicate Item Group,Grupo de Productos duplicado, +Duplicate POS Invoices found,Se encontraron facturas PV duplicadas, +Dynamic Condition,Condición Dinámica, +Edit Capacity,Editar capacidad, +Edit Cart,Editar carrito, +Edit Full Form,Editar formulario completo, +Edit Note,Editar Nota, +Editing {0} is not allowed as per POS Profile settings,La edición de {0} no está permitida según la configuración del perfil del PV, +Either 'Selling' or 'Buying' must be selected,"Debe seleccionar ""Vender"" o ""Comprar"".", +Email / Notifications,Correo / Notificaciones, +Email Address (required),Dirección de correo electrónico (obligatorio), +"Email Address must be unique, it is already used in {0}","La dirección de correo electrónico debe ser única, ya se utiliza en {0}", +Email Digest Recipient,Destinatario del resumen de correo electrónico, +Email Digest: {0},Resumen de correo: {0}, +Email Domain,Dominio de Correo Electrónico, +Email or Phone/Mobile of the Contact are mandatory to continue.,El correo electrónico o el teléfono/móvil del contacto son obligatorios para continuar., +Email verification failed.,Error en la verificación del correo electrónico., +Employee User Id,Id. de usuario del empleado, +Enable Allow Partial Reservation in the Stock Settings to reserve partial stock.,Habilite Permitir reserva parcial en la configuración de stock para reservar stock parcial., +Enable Automatic Party Matching,Habilitar la coincidencia automática de partes, +Enable Common Party Accounting,Habilitar la contabilidad de partes comunes, +Enable Discount Accounting for Selling,Habilitar la contabilidad de descuentos para las ventas, +Enable Fuzzy Matching,Habilitar coincidencia difusa, +Enable Health Monitor,Habilitar monitor de salud, +Enable Immutable Ledger,Habilitar libro mayor inmutable, +Enable Provisional Accounting For Non Stock Items,Habilitar contabilidad provisional para artículos que no están en stock, +Enable Stock Reservation,Habilitar reserva de existencias, +Enable it if users want to consider rejected materials to dispatch.,Habilítelo si los usuarios desean considerar los materiales rechazados para enviarlos., +Enable this checkbox even if you want to set the zero priority,Active esta casilla incluso si desea establecer la prioridad cero, +"Enable this option to calculate daily depreciation by considering the total number of days in the entire depreciation period, (including leap years) while using daily pro-rata based depreciation","Active esta opción para calcular la amortización diaria teniendo en cuenta el número total de días de todo el período de amortización, (incluidos los años bisiestos) al utilizar la amortización diaria prorrateada.", +Enable to apply SLA on every {0},Habilitar para aplicar SLA en cada {0}, +Enabling this ensures each Purchase Invoice has a unique value in Supplier Invoice No. field within a particular fiscal year,Habilitar esta opción garantiza que cada factura de compra tenga un valor único en el campo Nº de factura del proveedor dentro de un ejercicio fiscal determinado, +Enabling this option will allow you to record -

1. Advances Received in a Liability Account instead of the Asset Account

2. Advances Paid in an Asset Account instead of the Liability Account,Activar esta opción le permitirá registrar -

1. Anticipos Recibidos en una Cuenta de Pasivo en lugar de la Cuenta de Activo

2. Anticipos Pagados en una Cuenta de Activo en lugar de la Cuenta de Pasivo, +Enabling this will allow creation of multi-currency invoices against single party account in company currency,Habilitar esta opción permitirá la creación de facturas multidivisa contra la cuenta de una sola parte en la divisa de la empresa, +Enabling this will change the way how cancelled transactions are handled.,Al activar esta opción cambiará la forma en que se gestionan las transacciones canceladas., +End Transit,Fin del tránsito, +End of the current subscription period,Fin del periodo de suscripción actual, +"Enter First and Last name of Employee, based on Which Full Name will be updated. IN transactions, it will be Full Name which will be fetched.","Introduzca el Nombre y Apellidos del Empleado, en base a los cuales se actualizará el Nombre Completo. EN las transacciones, será el Nombre Completo el que se obtendrá.", +Enter Manually,Introducir manualmente, +Enter Serial Nos,Ingrese Serial Nro., +Enter Visit Details,Introduzca los datos de la visita, +Enter a name for Routing.,Introduzca un nombre para el Enrutamiento., +"Enter a name for the Operation, for example, Cutting.","Introduzca un nombre para la Operación, por ejemplo, Corte.", +Enter a name for this Holiday List.,Introduzca un nombre para esta Lista de vacaciones., +"Enter an Item Code, the name will be auto-filled the same as Item Code on clicking inside the Item Name field.","Introduzca un Código de Artículo, el nombre se autocompletará igual que Código de Artículo al pulsar dentro del campo Nombre de Artículo.", +Enter each serial no in a new line,Introduzca cada nº de serie en una nueva línea, +"Enter the Operation, the table will fetch the Operation details like Hourly Rate, Workstation automatically. + + After that, set the Operation Time in minutes and the table will calculate the Operation Costs based on the Hourly Rate and Operation Time.","Introduzca la Operación, la tabla obtendrá los detalles de la Operación como la Tasa Horaria, la Estación de Trabajo automáticamente. + + Después, fije el Tiempo de Operación en minutos y la tabla calculará los Costes de Operación basándose en la Tarifa Horaria y el Tiempo de Operación.", +Enter the opening stock units.,Introduzca las unidades de existencias iniciales., +Enter the quantity of the Item that will be manufactured from this Bill of Materials.,Introduzca la cantidad del Artículo que se fabricará a partir de esta Lista de Materiales., +Enter the quantity to manufacture. Raw material Items will be fetched only when this is set.,Introduzca la cantidad a fabricar. Los artículos de materia prima sólo se obtendrán cuando se haya configurado esta opción., +Error during caller information update,Error al actualizar la información de llamada, +Error while posting depreciation entries,Error al contabilizar asientos de amortización, +Error while processing deferred accounting for {0},Error al procesar la contabilidad diferida para {0}, +Error while reposting item valuation,Error al volver a publicar la valoración del artículo, +"Error: This asset already has {0} depreciation periods booked. + The `depreciation start` date must be at least {1} periods after the `available for use` date. + Please correct the dates accordingly.","Error: Este activo ya tiene contabilizados {0} periodos de amortización. + La fecha de `inicio de la amortización` debe ser al menos {1} periodos después de la fecha de `disponible para su uso`. + Por favor, corrija las fechas en consecuencia.", +Errors Notification,Notificación de errores, +Even invoices with apply tax withholding unchecked will be considered for checking cumulative threshold breach,Incluso las facturas que no tengan marcada la opción de aplicar la retención de impuestos se tendrán en cuenta para comprobar el incumplimiento del umbral acumulativo., +Example URL,URL de ejemplo, +Example of a linked document: {0},Ejemplo de documento vinculado: {0}, +"Example: ABCD.##### +If series is set and Serial No is not mentioned in transactions, then automatic serial number will be created based on this series. If you always want to explicitly mention Serial Nos for this item. leave this blank.","Ejemplo: ABCD. #####. Si se establece una serie y no se menciona el No de lote en las transacciones, se creará un número de lote automático basado en esta serie. Si siempre quiere mencionar explícitamente el No de lote para este artículo, déjelo en blanco. Nota: esta configuración tendrá prioridad sobre el Prefijo de denominación de serie en Configuración de stock.", +Example: Serial No {0} reserved in {1}.,Ejemplo: Número de serie {0} reservado en {1}., +Excess Materials Consumed,Exceso de materiales consumidos, +Excess Transfer,Exceso de transferencia, +Exchange Gain Or Loss,Ganancias o pérdidas por cambio de divisas, +Exchange Gain/Loss amount has been booked through {0},El importe de las ganancias/pérdidas de cambio se ha contabilizado a través de {0}., +Exchange Rate Revaluation Settings,Configuración de revaluación del tipo de cambio, +Excluded DocTypes,DocTipes excluidos, +Exempt Supplies,Suministros exentos, +Expected,Esperado, +Expected Balance Qty,Balance esperado, +Expected End Date should be less than or equal to parent task's Expected End Date {0}.,La fecha de finalización esperada debe ser menor o igual a la fecha de finalización esperada de la tarea principal {0}., +Expected Stock Value,Valor esperado de stock, +Expected Time Required (In Mins),Tiempo previsto necesario (en minutos), +Expiry,Expiración, +Export Data,Exportar Datos, +Export Errored Rows,Exportar filas con errores, +Export Import Log,Exportar registro de importación, +Extra Consumed Qty,Cantidad extra consumida, +Extra Job Card Quantity,Cantidad de tarjetas de trabajo adicionales, +FIFO Queue vs Qty After Transaction Comparison,Comparación entre cola FIFO y cantidad después de la transacción, +"FIFO Stock Queue (qty, rate)","Cola de existencias FIFO (cantidad, tasa)", +FIFO/LIFO Queue,Cola FIFO/LIFO, +Failed Entries,Entradas fallidas, +"Failed to erase demo data, please delete the demo company manually.","Fallo al borrar los datos de demostración, por favor borre la empresa de demostración manualmente.", +Failed to post depreciation entries,Fallo al contabilizar las entradas de depreciación, +Failed to setup defaults for country {0}. Please contact support.,Fallo al configurar los valores predeterminados para el país {0}. Póngase en contacto con el servicio de asistencia., +Failure,Fracaso, +Failure Description,Descripción del fallo, +Fetch Based On,Obtener Basado en, +Fetch Overdue Payments,Recuperar pagos atrasados, +Fetch Timesheet,Obtener Hoja de Tiempo, +Fetch Value From,Obtener valor de, +Fetching exchange rates ...,Obteniendo tipos de cambio..., +Filter by Reference Date,Filtrar por Fecha de Referencia, +Filter on Invoice,Filtrar en factura, +Filter on Payment,Filtrar en el pago, +Filters missing,Faltan filtros, +Final Product,Producto final, +Financial Ratios,Índices financieros, +Financial Reports,Informes Financieros, +Financial Year Begins On,El año fiscal comienza el, +Financial reports will be generated using GL Entry doctypes (should be enabled if Period Closing Voucher is not posted for all years sequentially or missing) ,Los informes financieros se generarán utilizando los doctypes de entrada GL (debe activarse si el Comprobante de Cierre de Período no se contabiliza para todos los años secuencialmente o faltantes) , +Finished Good BOM,Lista de materiales de productos terminados, +Finished Good Item,Artículo de Producto Terminado, +Finished Good Item Qty,Producto acabado Cantidad, +Finished Good Item Quantity,Producto acabado Cantidad, +Finished Good Item is not specified for service item {0},Artículo de producto terminado no especificado para artículo de servicio {0}, +Finished Good Item {0} Qty can not be zero,Producto terminado Artículo {0} La cantidad no puede ser cero, +Finished Good Item {0} must be a sub-contracted item,El artículo terminado {0} debe ser un artículo subcontratado, +Finished Good Qty,Cantidad de producto acabado, +Finished Good Quantity ,Cantidad de producto acabado , +Finished Good UOM,Producto acabado UdM, +Finished Good {0} does not have a default BOM.,El Producto acabado {0} no tiene una lista de materiales predeterminada., +Finished Good {0} is disabled.,El Producto acabado {0} está deshabilitado., +Finished Good {0} must be a stock item.,El Producto acabado {0} debe ser un artículo de stock., +Finished Good {0} must be a sub-contracted item.,El producto terminado {0} debe ser un artículo subcontratado., +Finished Goods Based Operating Cost,Coste de explotación basado en los productos acabados, +Finished Goods Item,Producto acabado, +Finished Goods Reference,Productos acabados Referencia, +Finished Goods Value,Valor de los productos acabados, +Finished Goods based Operating Cost,Coste de explotación basado en los productos acabados, +Finished Item {0} does not match with Work Order {1},Artículo terminado {0} no coincide con la orden de trabajo {1}, +First Response Due,Primera respuesta pendiente, +First Response SLA Failed by {},El primer acuerdo de nivel de servicio de respuesta falló por {}, +Fixed Asset Defaults,Cuenta de activo fijo predeterminada, +Fixed Time,Tiempo fijo, +Floor,Piso, +Floor Name,Nombre del Piso, +For Item,Para artículo, +For Item {0} cannot be received more than {1} qty against the {2} {3},Para el artículo {0} no se puede recibir más de {1} cantidad contra {2} {3}, +For Job Card,Para tarjeta de trabajo, +For Operation,Para operaciones, +"For Return Invoices with Stock effect, '0' qty Items are not allowed. Following rows are affected: {0}","Para las Facturas de Devolución con efecto de Stock, no se permiten artículos de cant. '0'. Se ven afectadas las siguientes líneas: {0}", +For Work Order,Para Orden de Trabajo, +For dunning fee and interest,Por gastos de reclamación e intereses, +"For item {0}, rate must be a positive number. To Allow negative rates, enable {1} in {2}","Para el producto {0}, el precio debe ser un número positivo. Para permitir precios negativos, habilite {1} en {2}", +For quantity {0} should not be greater than allowed quantity {1},Para la cantidad {0} no debe ser mayor que la cantidad permitida {1}, +"For the item {0}, the quantity should be {1} according to the BOM {2}.","Para el artículo {0}, la cantidad debe ser {1} según la lista de materiales {2}.", +"For the {0}, no stock is available for the return in the warehouse {1}.","Para la {0}, no hay existencias disponibles para la devolución en el almacén {1}.", +"For the {0}, the quantity is required to make the return entry","Para el {0}, se requiere la cantidad para realizar la entrada de devolución", +Force-Fetch Subscription Updates,Actualizaciones forzadas de suscripciones, +Forecasting,Previsión, +Formula Based Criteria,Criterios basados en fórmulas, +Free Item Rate,Tarifa de artículo libre, +From Corrective Job Card,De la ficha de trabajo correctiva, +From Date and To Date are mandatory,Desde la fecha y hasta la fecha son obligatorios, +From Date is mandatory,Desde Fecha es obligatorio, +From Date: {0} cannot be greater than To date: {1},Desde la fecha: {0} no puede ser mayor que Hasta la fecha: {1}, +From Delivery Date,Desde la fecha de entrega, +From Doctype,Desde DocType, +From Due Date,Desde la fecha de vencimiento, +From Opportunity,Desde Oportunidad, +From Payment Date,Desde la fecha de pago, +From Prospect,Desde Prospecto, +From Reference Date,Desde la fecha de referencia, +From Voucher Detail No,Desde el número de detalle del comprobante, +From Voucher No,Del número de comprobante, +From Voucher Type,Desde el tipo de comprobante, +From and To dates are required,Las fechas desde y hasta son obligatorias, +Full and Final Statement,Declaración completa y definitiva, +GL Balance,Balance GL, +GL Entry Processing Status,Estado de procesamiento de la entrada GL, +GL reposting index,Índice de traspaso GL, +Gain/Loss accumulated in foreign currency account. Accounts with '0' balance in either Base or Account currency,Ganancia/pérdida acumulada en cuenta en moneda extranjera. Cuentas con saldo “0” en moneda base o de cuenta, +Gain/Loss already booked,Ganancias/pérdidas ya contabilizadas, +Gain/Loss from Revaluation,Ganancias/pérdidas por revalorización, +General Ledger,Balance general,Warehouse +General and Payment Ledger Comparison,Comparación de los libros mayor y de pagos, +General and Payment Ledger mismatch,Desajuste entre el Libro Mayor y el Libro de Pagos, +Generate Closing Stock Balance,Generar balance de cierre de stock, +Generate Demo Data for Exploration,Generar datos de demostración para la exploración, +Generate E-Invoice,Generar E-Factura, +Generate Invoice At,Generar factura el, +Generated,Generado, +Generating Preview,Generando vista previa, +Get Allocations,Obtener Asignaciones, +Get Customer Group Details,Obtener Detalles del Grupo de Clientes, +Get Finished Goods for Manufacture,Obtener productos acabados para su fabricación, +Get Outstanding Orders,Obtener pedidos pendientes, +Get Raw Materials Cost from Consumption Entry,Obtenga el coste de las materias primas a partir de la entrada de consumo, +Get Raw Materials for Purchase,Obtener materias primas para comprar, +Get Raw Materials for Transfer,Obtener materias primas para el traslado, +Get Scrap Items,Obtener artículos de desecho, +Get Stock,Obtener existencias, +Get Sub Assembly Items,Obtener artículos de subensamblaje, +Get Supplier Group Details,Obtener detalles del grupo de proveedores, +Get Timesheets,Obtener Hojas de Tiempo, +Get stops from,Obtener paradas de, +Getting Scrap Items,Obtener artículos de desecho, +Give free item for every N quantity,Regale un artículo gratis por cada cantidad N, +Go back,Volver, +Go to {0} List,Ir a la lista {0}, +Goals,Objetivos, +Goods,Mercancías, +Grant Commission,Conceder Comisión, +Greeting Message,Mensaje de saludo, +Gross Profit Percent,Porcentaje de beneficio bruto, +Gross Purchase Amount Too Low: {0} cannot be depreciated over {1} cycles with a frequency of {2} depreciations.,Importe bruto de compra demasiado bajo: {0} no puede amortizarse a lo largo de {1} ciclos con una frecuencia de {2} amortizaciones., +Gross Purchase Amount should be equal to purchase amount of one single Asset.,El monto bruto de compra debe ser igual a al monto de compra de un solo activo., +Group Same Items,Agrupar mismos artículos, +Growth View,Vista de Crecimiento, +Half-yearly,Medio año, +Handle Employee Advances,Gestionar los anticipos de los empleados, +Has Alternative Item,Tiene Ítem Alternativo, +Has Item Scanned,Tiene artículos escaneados, +Has Priority,Tiene prioridad, +Have Default Naming Series for Batch ID?,¿Dispone de series de nombres por defecto para el ID de lote?, +Heatmap,Mapa de calor, +Height (cm),Altura (cm), +"Hello,","Hola,", +Helps you distribute the Budget/Target across months if you have seasonality in your business.,Le ayuda a distribuir el Presupuesto/Objetivo a lo largo de los meses si tiene estacionalidad en su negocio., +Here are the error logs for the aforementioned failed depreciation entries: {0},A continuación se muestran los registros de errores de las entradas de depreciación fallidas mencionadas anteriormente: {0}, +Here are the options to proceed:,Estas son las opciones para proceder:, +"Here, you can select a senior of this Employee. Based on this, Organization Chart will be populated.","Aquí puede seleccionar un superior de este Empleado. Basándose en esto, se rellenará el Organigrama.", +"Here, your weekly offs are pre-populated based on the previous selections. You can add more rows to also add public and national holidays individually.","Aquí, los días libres semanales se rellenan previamente en función de las selecciones anteriores. Puede agregar más filas para agregar también días festivos públicos y nacionales de forma individual.", +"Hi,","Hola,", +Hide Images,Ocultar Imágenes, +Holiday Date {0} added multiple times,Fecha de vacaciones {0} añadida varias veces, +Hours Spent,Horas Dedicadas, +How often should Project be updated of Total Purchase Cost ?,¿Con qué frecuencia debe actualizarse el proyecto del coste total de compra?, +Idle,Inactivo, +"If Enabled - Reconciliation happens on the Advance Payment posting date
+If Disabled - Reconciliation happens on oldest of 2 Dates: Invoice Date or the Advance Payment posting date
+","Si está habilitado : la conciliación se realiza en la fecha de contabilización del pago por adelantado
+Si está deshabilitado : la conciliación se realiza en la fecha más antigua de las 2 fechas: fecha de factura o la fecha de contabilización del pago por adelantado
+", +"If an operation is divided into sub operations, they can be added here.","Si una operación se divide en suboperaciones, éstas pueden añadirse aquí.", +"If checked, Rejected Quantity will be included while making Purchase Invoice from Purchase Receipt.","Si se marca, la Cantidad Rechazada se incluirá al hacer la Factura de Compra a partir del Recibo de Compra.", +"If checked, Stock will be reserved on Submit","Si está marcado, se reservarán las existencias al Validar", +"If checked, picked qty won't automatically be fulfilled on submit of pick list.","Si se marca, la cantidad seleccionada no se completará automáticamente al validar la lista de selección.", +"If checked, the tax amount will be considered as already included in the Paid Amount in Payment Entry","Si está marcada, el importe del impuesto se considerará ya incluido en el Importe pagado en la Entrada de pago", +"If checked, we will create demo data for you to explore the system. This demo data can be erased later.","Si está marcada, crearemos datos de demostración para que explore el sistema. Estos datos de demostración pueden borrarse posteriormente.", +If enabled then system will manufacture Sub-assembly against the Job Card (operation).,"Si se activa, el sistema fabricará el subconjunto según la tarjeta de trabajo (operación).", +If enabled then system won't apply the pricing rule on the delivery note which will be create from the pick list,"Si se activa, el sistema no aplicará la regla de precios en el albarán que se creará a partir de la lista de selección.", +If enabled then system won't override the picked qty / batches / serial numbers.,"Si se activa, el sistema no anulará las cantidades / lotes / números de serie elegidos.", +"If enabled, a print of this document will be attached to each email","Si está habilitado, se adjuntará una impresión de este documento a cada correo electrónico", +"If enabled, additional ledger entries will be made for discounts in a separate Discount Account","Si está habilitado, se realizarán entradas contables adicionales para descuentos en una cuenta de descuento separada", +"If enabled, all files attached to this document will be attached to each email","Si está habilitado, todos los archivos adjuntos a este documento se adjuntarán a cada correo electrónico.", +"If enabled, do not update serial / batch values in the stock transactions on creation of auto Serial + / Batch Bundle. ","Si está habilitado, no actualice los valores de serie/lote en las transacciones de stock al crear automáticamente el paquete de serie + /lote. ", +"If enabled, ledger entries will be posted for change amount in POS transactions","Si se activa, se contabilizarán las entradas en el libro mayor para el importe de cambio en las transacciones de TPV", +"If enabled, the consolidated invoices will have rounded total disabled","Si se activa, las facturas consolidadas tendrán el total redondeado desactivado", +"If enabled, the item rate won't adjust to the valuation rate during internal transfers, but accounting will still use the valuation rate.","Si está activada, la tasa del artículo no se ajustará a la tasa de valoración durante las transferencias internas, pero la contabilidad seguirá utilizando la tasa de valoración.", +"If enabled, the system will create material requests even if the stock exists in the 'Raw Materials Warehouse'.","Si se activa, el sistema creará solicitudes de material aunque haya existencias en el ""Almacén de materias primas"".", +"If enabled, the system will use the moving average valuation method to calculate the valuation rate for the batched items and will not consider the individual batch-wise incoming rate.","Si se activa, el sistema utilizará el método de valoración media móvil para calcular la tasa de valoración de los artículos por lotes y no tendrá en cuenta la tasa de entrada individual por lotes.", +"If enabled, then system will only validate the pricing rule and not apply automatically. User has to manually set the discount percentage / margin / free items to validate the pricing rule","Si está activada, el sistema sólo validará la regla de precios y no la aplicará automáticamente. El usuario debe establecer manualmente el porcentaje de descuento / margen / artículos gratuitos para validar la regla de precios.", +"If mentioned, the system will allow only the users with this Role to create or modify any stock transaction earlier than the latest stock transaction for a specific item and warehouse. If set as blank, it allows all users to create/edit back-dated transactions.","Si se menciona, el sistema permitirá sólo a los usuarios con este Rol crear o modificar cualquier transacción de existencias anterior a la última transacción de existencias para un artículo y almacén específicos. Si se establece en blanco, permite a todos los usuarios crear/editar transacciones con fecha anterior.", +"If not, you can Cancel / Submit this entry","En caso contrario, puedes Cancelar/Validar esta entrada", +"If rate is zero then item will be treated as ""Free Item""","Si la tarifa es cero, el artículo se tratará como ""Artículo gratuito"".", +"If the BOM results in Scrap material, the Scrap Warehouse needs to be selected.","Si la lista de materiales arroja como resultado material de desecho, se debe seleccionar el almacén de desecho.", +"If the selected BOM has Operations mentioned in it, the system will fetch all Operations from BOM, these values can be changed.","Si la lista de materiales seleccionada tiene Operaciones mencionadas en ella, el sistema obtendrá todas las Operaciones de la lista de materiales, estos valores pueden modificarse.", +"If this checkbox is enabled, then the system won’t run the MRP for the available sub-assembly items.","Si esta casilla de verificación está activada, el sistema no ejecutará la planificación de necesidades para los artículos de subensamblaje disponibles.", +If this is undesirable please cancel the corresponding Payment Entry.,"Si no lo desea, anule el asiento de pago correspondiente.", +"If yes, then this warehouse will be used to store rejected materials","En caso afirmativo, este almacén se utilizará para almacenar los materiales rechazados", +"If you are maintaining stock of this Item in your Inventory, ERPNext will make a stock ledger entry for each transaction of this item.","Si mantiene existencias de este artículo en su inventario, ERPNext realizará una entrada en el libro de existencias para cada transacción de este artículo.", +"If you need to reconcile particular transactions against each other, then please select accordingly. If not, all the transactions will be allocated in FIFO order.","Si necesita conciliar transacciones específicas entre sí, seleccione la opción correspondiente. De lo contrario, todas las transacciones se asignarán en orden FIFO.", +"If you still want to proceed, please disable 'Skip Available Sub Assembly Items' checkbox.","Si aún así desea continuar, desactive la casilla 'Omitir elementos de subensamblaje disponibles'.", +"If you still want to proceed, please enable {0}.","Si aún desea continuar, habilite {0}.", +"If your CSV uses a different delimiter, add that character here, ensuring no spaces or additional characters are included.","Si su CSV utiliza un delimitador diferente, añada ese carácter aquí, asegurándose de no incluir espacios ni caracteres adicionales.", +Ignore Account Closing Balance,Ignorar el saldo de cierre de la cuenta, +Ignore Available Stock,Ignorar stock disponible, +Ignore Closing Balance,Ignorar el saldo de cierre, +Ignore Default Payment Terms Template,Ignorar Plantilla de Términos de Pago Predeterminado, +Ignore Empty Stock,Ignorar Stock Vacío, +Ignore Exchange Rate Revaluation Journals,Ignorar los Diarios de Revaluación del Tipo de Cambio, +Ignore Pricing Rule is enabled. Cannot apply coupon code.,La opción Ignorar regla de precios está habilitada. No se puede aplicar el código de cupón., +Ignore System Generated Credit / Debit Notes,Ignorar las notas de crédito / débito generadas por el sistema, +Ignore Voucher Type filter and Select Vouchers Manually,Ignorar el filtro de tipo de cupón y seleccionar cupones manualmente, +Impairment,Deteriorado, +Import File,Importar archivo, +Import File Errors and Warnings,Importar errores y advertencias de archivos, +Import Log Preview,Vista previa de registro de importación, +Import Preview,Vista previa de importación, +Import Progress,Progreso de importación, +Import Type,Tipo de importación, +Import Using CSV file,Importación mediante archivo CSV, +Import Warnings,Advertencias de importación, +Import from Google Sheets,Importar desde Google Sheets, +"Importing {0} of {1}, {2}","Importar {0} de {1}, {2}", +In House,En casa, +In Minutes,En Minutos, +In Party Currency,En moneda del individuo, +In Transit Transfer,Transferencia en tránsito, +In Transit Warehouse,Almacén en Tránsito, +In mins,En minutos, +"In row {0} of Appointment Booking Slots: ""To Time"" must be later than ""From Time"".","En la fila {0} de las franjas horarias de reserva de citas: ""Hora de llegada"" debe ser posterior a ""Hora de salida"".", +"In the case of 'Use Multi-Level BOM' in a work order, if the user wishes to add sub-assembly costs to Finished Goods items without using a job card as well the scrap items, then this option needs to be enable.","En el caso de ""Utilizar lista de materiales multi-nivel"" en una orden de trabajo, si el usuario desea añadir costes de subconjuntos a los artículos de productos acabados sin utilizar una ficha de trabajo, así como a los artículos de desecho, deberá activar esta opción.", +"In this section, you can define Company-wide transaction-related defaults for this Item. Eg. Default Warehouse, Default Price List, Supplier, etc.","En esta sección, puede definir los valores predeterminados relacionados con las transacciones de toda la empresa para este Artículo. Por ejemplo, Almacén por defecto, Lista de precios por defecto, Proveedor, etc.", +Inactive Status,Estado inactivo, +Include Account Currency,Incluir la divisa de la cuenta, +Include Closed Orders,Incluye Pedidos Cerrados, +Include Default FB Assets,Incluir activos FB por defecto, +Include Disabled,Incluye Deshabilitado, +Include Expired Batches,Incluir lotes caducados, +Include Safety Stock in Required Qty Calculation,Incluir stock de seguridad en el cálculo de cantidad requerida, +Include Timesheets in Draft Status,Incluir hojas de horas en estado borrador, +Include Zero Stock Items,Incluir Productos sin existencias, +Incoming Call Handling Schedule,Programa de gestión de llamadas entrantes, +Incoming Call Settings,Configuración de llamadas entrantes, +Incoming Rate (Costing),Tarifa de entrada (costo), +Incorrect Balance Qty After Transaction,Cantidad de saldo incorrecta tras la transacción, +Incorrect Batch Consumed,Lote incorrecto consumido, +Incorrect Check in (group) Warehouse for Reorder,Comprobación incorrecta en (grupo) Almacén para Reordenar, +Incorrect Component Quantity,Cantidad incorrecta de componentes, +Incorrect Invoice,Factura incorrecta, +Incorrect Movement Purpose,Movimiento incorrecto Propósito, +Incorrect Payment Type,Tipo de pago incorrecto, +Incorrect Reference Document (Purchase Receipt Item),Documento de referencia incorrecto (partida de recibo de compra), +Incorrect Serial No Valuation,Valoración incorrecta del número de serie, +Incorrect Serial Number Consumed,Número de serie incorrecto Consumido, +Incorrect Stock Value Report,Informe incorrecto sobre el valor de las existencias, +Incorrect Type of Transaction,Tipo de transacción incorrecto, +Increase In Asset Life(Months),Aumento de la vida útil del activo (meses), +Indent,Sangría, +Indirect Expense,Gastos Indirectos, +Individual GL Entry cannot be cancelled.,La inscripción GL individual no puede cancelarse., +Individual Stock Ledger Entry cannot be cancelled.,La entrada individual en el Libro Mayor no puede cancelarse., +Initialize Summary Table,Inicializar tabla resumen, +Insert New Records,Insertar nuevos registros, +Inspection Rejected,Inspección Rechazada, +Inspection Submission,Presentación de la inspección, +Instruction,Instrucción, +Insufficient Capacity,Capacidad Insuficiente, +Insufficient Stock for Batch,Stock insuficiente para el lote, +Inter Transfer Reference,Referencia de inter transferencia, +Interest and/or dunning fee,Intereses y/o gastos de reclamación, +Internal,Interno, +Internal Customer,Cliente Interno, +Internal Customer for company {0} already exists,Cliente Interno para empresa {0} ya existe, +Internal Sale or Delivery Reference missing.,Falta referencia de venta o entrega interna., +Internal Sales Reference Missing,Falta la referencia de ventas internas, +Internal Supplier,Proveedor Interno, +Internal Supplier for company {0} already exists,El Proveedor Interno de la compañía {0} ya existe, +Internal Transfer Reference Missing,Falta referencia de transferencia interna, +Internal Transfers,Transferencias Internas, +Internal transfers can only be done in company's default currency,Las transferencias internas solo se pueden realizar en la moneda predeterminada de la empresa., +Invalid,Inválido, +Invalid Allocated Amount,Importe asignado no válido, +Invalid Amount,Importe no válido, +Invalid Auto Repeat Date,Fecha de repetición automática inválida, +Invalid Cost Center,Centro de Costo Inválido, +Invalid Delivery Date,Fecha de Entrega Inválida, +Invalid Document,Documento inválido, +Invalid Document Type,Tipo de Documento Inválido, +Invalid Formula,Fórmula Inválida, +Invalid Group By,Agrupar por no válido, +Invalid Item Defaults,Artículos por defecto no válidos, +Invalid Ledger Entries,Entradas no válidas en el libro mayor, +Invalid Primary Role,Función principal no válida, +Invalid Priority,Prioridad inválida, +Invalid Process Loss Configuration,Configuración de pérdida de proceso no válida, +Invalid Purchase Invoice,Factura de Compra no válida, +Invalid Qty,Cant. inválida, +Invalid Schedule,Programación no válida, +Invalid Serial and Batch Bundle,Paquete de serie y lote no válidos, +Invalid Warehouse,Almacén inválido, +Invalid result key. Response:,Clave de resultado no válida. Respuesta:, +Invalid value {0} for {1} against account {2},Valor no válido {0} para {1} contra la cuenta {2}, +Inventory Dimension,Dimensión del inventario, +Inventory Dimension Negative Stock,Dimensión del inventario Existencias negativas, +Inventory Settings,Configuración de Inventario, +Invoice Cancellation,Cancelación de facturas, +Invoice Limit,Límite de facturación, +Invoice Portion (%),Porción de Factura (%), +Invoice and Billing,Factura y facturación, +Invoiced Qty,Cant. Facturada, +Invoices and Payments have been Fetched and Allocated,Se han obtenido y asignado facturas y pagos, +Invoicing Features,Características de Facturación, +Is Adjustment Entry,Es entrada de ajuste, +Is Alternative,Es Alternativo, +Is Cash or Non Trade Discount,Es Efectivo o Descuento no Comercial, +Is Composite Asset,Es Activo compuesto, +Is Corrective Job Card,Es Tarjeta de Trabajo Correctiva, +Is Corrective Operation,Es Operación Correctiva, +Is Expandable,Es expansible, +Is Finished Item,Es un artículo acabado, +Is Fully Depreciated,Está completamente Depreciado, +Is Group Warehouse,Es Almacén de Grupo, +Is Old Subcontracting Flow,Es un antiguo flujo de subcontratación, +Is Outward,Es hacia afuera, +Is Period Closing Voucher Entry,Es la entrada de comprobante de cierre de período, +Is Rate Adjustment Entry (Debit Note),Es Entrada de Ajuste de Tarifa (Nota de Débito), +Is Recursive,Es recursivo, +Is Rejected,Rechazado, +Is Rejected Warehouse,Es Almacén de Rechazados, +Is Scrap Item,Es artículo de desecho, +Is Short Year,Es Año corto, +Is Standard,Es estándar, +Is Stock Item,Es artículo de stock, +Is System Generated,Es generado por el sistema, +Is Tax Withholding Account,Es una cuenta de retención de impuestos, +Is Template,Es Plantilla, +Issue Analytics,Análisis de Incidencias, +Issue Summary,Resumen de Incidencias, +Issue a debit note with 0 qty against an existing Sales Invoice,Emitir una Nota de Débito con cantidad 0 contra una Factura de Venta existente, +Issuing cannot be done to a location. Please enter employee to issue the Asset {0} to,No se puede emitir a una ubicación. Ingrese el empleado al que se emitirá el activo {0}, +It can take upto few hours for accurate stock values to be visible after merging items.,Pueden pasar algunas horas hasta que los valores de stock precisos sean visibles después de fusionar los elementos., +"It's not possible to distribute charges equally when total amount is zero, please set 'Distribute Charges Based On' as 'Quantity'","No es posible distribuir los cargos equitativamente cuando el importe total es cero, por favor configure 'Distribuir cargos en base a' como 'Cantidad'.", +Item Code (Final Product),Código de artículo (producto final), +Item Group wise Discount,Descuento por grupo de artículos, +Item Price Settings,Configuración del precio del artículo, +"Item Price appears multiple times based on Price List, Supplier/Customer, Currency, Item, Batch, UOM, Qty, and Dates.","El precio del producto aparece varias veces según la lista de precios, proveedor/cliente, moneda, producto, lote, unidad de medida, cantidad y fechas.", +Item Reference,Referencia del artículo, +Item Warehouse based reposting has been enabled.,Se ha habilitado el traspaso basado en el almacén de artículos., +Item and Warehouse,Producto y Almacén, +Item is removed since no serial / batch no selected.,El artículo se elimina al no haberse seleccionado ningún número de serie / lote., +Item qty can not be updated as raw materials are already processed.,La cantidad de artículos no puede actualizarse porque las materias primas ya están procesadas., +Item rate has been updated to zero as Allow Zero Valuation Rate is checked for item {0},La tasa del artículo se ha actualizado a cero ya que la opción Permitir tasa de valoración cero está marcada para el artículo {0}, +Item valuation reposting in progress. Report might show incorrect item valuation.,Traspaso de valoración de artículos en curso. El informe podría mostrar una valoración de artículos incorrecta., +Item {0} cannot be added as a sub-assembly of itself,El artículo {0} no puede añadirse como subconjunto de sí mismo, +Item {0} cannot be ordered more than {1} against Blanket Order {2}.,El artículo {0} no se puede pedir más de {1} contra el pedido general {2}., +Item {0} does not exist.,El artículo {0} no existe., +Item {0} entered multiple times.,Producto {0} ingresado varias veces., +Item {0} is already reserved/delivered against Sales Order {1}.,El artículo {0} ya está reservado/entregado contra el pedido de venta {1}., +Item {0} must be a Non-Stock Item,El artículo {0} debe ser un artículo que no se encuentra en stock, +Item {0} not found in 'Raw Materials Supplied' table in {1} {2},El artículo {0} no se encontró en la tabla 'Materias primas suministradas' en {1} {2}, +Item {0} not found.,Artículo {0} no encontrado., +Item {} does not exist.,Producto {0} no existe., +Items & Pricing,Productos y Precios, +Items Catalogue,Catálogo de Productos, +Items cannot be updated as Subcontracting Order is created against the Purchase Order {0}.,Los artículos no se pueden actualizar ya que la orden de subcontratación se crea contra la orden de compra {0}., +Items rate has been updated to zero as Allow Zero Valuation Rate is checked for the following items: {0},"La tasa de artículos se ha actualizado a cero, ya que la opción Permitir tasa de valoración cero está marcada para los siguientes artículos: {0}", +Items to Be Repost,Artículos a reenviar, +Items to Order and Receive,Productos para Ordenar y Recibir, +Items to Reserve,Artículos para reservar, +Items {0} do not exist in the Item master.,Los artículos {0} no existen en el maestro de artículos., +Job Capacity,Capacidad de Trabajo, +Job Card Operation,Ficha de trabajo Operación, +Job Card Scheduled Time,Ficha de trabajo Hora programada, +Job Card Scrap Item,Ficha de trabajo Artículo de desecho, +Job Card and Capacity Planning,Tarjeta de trabajo y planificación de capacidad, +Job Cards,Tarjetas de Trabajo, +Job Paused,Trabajo en pausa, +Job Worker,Trabajador, +Job Worker Address,Dirección del trabajador, +Job Worker Address Details,Datos de la dirección del trabajador, +Job Worker Contact,Contacto del trabajador, +Job Worker Delivery Note,Albarán del trabajador, +Job Worker Name,Nombre del trabajador, +Job Worker Warehouse,Trabajador de almacén, +Job: {0} has been triggered for processing failed transactions,Trabajo: {0} se ha activado para procesar transacciones fallidas, +Joining,Uniéndose, +Journal Entries,Entradas de diario, +Journal Entry for Asset scrapping cannot be cancelled. Please restore the Asset.,No se puede cancelar la entrada del diario correspondiente al desguace de activos. Restaure el activo., +Journal Entry type should be set as Depreciation Entry for asset depreciation,El tipo de entrada de diario debe configurarse como Entrada de depreciación para la depreciación de activos., +Journal entries have been created,Se han creado entradas de diario, +Journals,Diarios, +Key,Clave, +Kindly cancel the Manufacturing Entries first against the work order {0}.,Por favor cancele primero las entradas de fabricación contra la orden de trabajo {0}., +"Last Name, Email or Phone/Mobile of the user are mandatory to continue.","Apellido, Email o Teléfono/Móvil del usuario son obligatorios para continuar.", +Lead -> Prospect,Cliente potencial -> Prospecto, +Lead Conversion Time,Tiempo de conversión de clientes potenciales, +Lead Owner cannot be same as the Lead Email Address,El propietario del cliente potencial no puede ser el mismo que la dirección de correo electrónico del cliente potencial, +Lead {0} has been added to prospect {1}.,El cliente potencial {0} se ha agregado al prospecto {1}., +Leaderboard,Tabla de líderes, +Leads,Clientes potenciales, +Learn Accounting,Aprender Contabilidad, +Learn Inventory Management,Aprende la Gestión del Inventario, +Learn Manufacturing,Aprender Manufactura, +Learn Procurement,Aprender Compras, +Learn Project Management,Aprender Gestión de Proyecto, +Learn Sales Management,Aprender Gestión de Ventas, +"Learn about Common Party","Conozca más sobre Partes comúnes", +"Leave blank for home. +This is relative to site URL, for example ""about"" will redirect to ""https://yoursitename.com/about""","Déjelo en blanco para la página de inicio. +Esto es relativo a la URL del sitio, por ejemplo ""acerca de"" redirigirá a ""https://yoursitename.com/about""", +Ledger Health,Estado del libro mayor, +Ledger Health Monitor,Monitor de estado del libro mayor, +Ledger Health Monitor Company,Monitor de estado del libro mayor Empresa, +Ledger Merge,Fusión de libro mayor, +Ledger Merge Accounts,Cuentas de fusión de libro mayor, +Ledgers,Libros mayores, +Left Child,Secundario izquierdo, +Legend,Leyenda, +Length,Largo, +Length (cm),Longitud (cm), +Less than 12 months.,Menos de 12 meses., +Level (BOM),Nivel (lista de materiales), +Limit timeslot for Stock Reposting,Limitar el tiempo disponible para la reubicación de existencias, +Limits don't apply on,Los límites no se aplican en, +Link a new bank account,Vincular una nueva cuenta bancaria, +Link with Customer,Enlace con el cliente, +Link with Supplier,Enlace con el proveedor, +Linked with submitted documents,Vinculado con los documentos validados, +Linking Failed,Enlace fallido, +Linking to Customer Failed. Please try again.,Error al vincular al cliente. Inténtalo de nuevo., +Linking to Supplier Failed. Please try again.,Error al vincular al proveedor. Inténtalo nuevamente., +Links,Enlaces, +Loading import file...,Cargando archivo de importación..., +Locked,Bloqueado, +Log Entries,Entradas de registro, +Log the selling and buying rate of an Item,Registra la tasa de venta y compra de un artículo, +Lost Quotations,Cotizaciones perdidas, +Lost Quotations %,Cotizaciones perdidas %, +Lost Reasons are required in case opportunity is Lost.,Se requieren motivos de pérdida en caso de que se pierda la oportunidad., +Lost Value,Valor perdido, +Lost Value %,% de valor perdido, +Machine Type,Tipo de Máquina, +Main Cost Center,Centro de Costo principal, +Main Cost Center {0} cannot be entered in the child table,El centro de costo principal {0} no se puede ingresar en la tabla secundaria, +Maintain Asset,Mantener activos, +Maintenance Details,Detalles de mantenimiento, +Make ,Crear , +Make Asset Movement,Realizar movimiento de activos, +Make Quotation,Hacer Cotización, +Make Return Entry,Hacer Entrada de Devolución, +Make Serial No / Batch from Work Order,Crear número de serie/lote a partir de la orden de trabajo, +Make {0} Variant,Hacer {0} variante, +Make {0} Variants,Hacer {0} variantes, +Making Journal Entries against advance accounts: {0} is not recommended. These Journals won't be available for Reconciliation.,No se recomienda realizar asientos contables contra cuentas anticipadas: {0} . Estos asientos contables no estarán disponibles para la conciliación., +Manage,Gestionar, +Mandatory Accounting Dimension,Dimensión contable obligatoria, +Mandatory Depends On,Obligatorio depende de, +Mandatory Field,Campo obligatorio, +Mandatory Section,Sección obligatoria, +Manual Inspection,Inspección Manual, +Manufacture Sub-assembly in Operation,Subensamblaje de Manufactura en Operación, +Manufacturing Type,Tipo de fabricación, +Mapping Purchase Receipt ...,Mapeando Recibo de Compra..., +Mapping Subcontracting Order ...,Mapeando órdenes de subcontratación..., +Mapping {0} ...,Mapeando {0} ..., +Margin View,Vista de Margen, +Mark As Closed,Marcar como cerrado, +Material Returned from WIP,Material devuelto de WIP, +Material Transfer (In Transit),Transferencia de material (en tránsito), +Materials are already received against the {0} {1},Los materiales ya se recibieron contra el {0} {1}, +Materials needs to be transferred to the work in progress warehouse for the job card {0},Es necesario transferir los materiales al almacén de trabajos en curso para la ficha de trabajo {0}, +Max Qty (As Per Stock UOM),Cantidad máxima (según unidad de medida en existencia), +Maximum Net Rate,Tasa Neta Máxima, +Maximum Payment Amount,Importe máximo del pago, +Maximum Value,Valor Máximo, +Maximum quantity scanned for item {0}.,Cantidad máxima escaneada para el artículo {0}., +Meeting,Reunión, +Mention if non-standard Receivable account,Indique si no es Cuenta por Cobrar estándar, +Merge Invoices Based On,Fusionar facturas en función de, +Merge Progress,Progreso de fusión, +Merge Similar Account Heads,Fusionar cuentas similares, +Merge taxes from multiple documents,Fusionar impuestos de varios documentos, +Merged,Combinado, +"Merging is only possible if following properties are same in both records. Is Group, Root Type, Company and Account Currency","La fusión solo es posible si las siguientes propiedades son las mismas en ambos registros: grupo, tipo de raíz, empresa y moneda de la cuenta.", +Merging {0} of {1},Fusionando {0} de {1}, +Min Qty (As Per Stock UOM),Cant. mín. (según UdM en almacén), +Min Qty should be greater than Recurse Over Qty,La cantidad mínima debe ser mayor que la cantidad recursiva, +Minimum Net Rate,Tasa Neta Mínima, +Minimum Payment Amount,Importe mínimo de pago, +Minimum Value,Valor mínimo, +Mismatch,Desajuste, +Missing,Faltante, +Missing Asset,Activo faltante, +Missing Cost Center,Centro de costos faltante, +Missing Finance Book,Falta el libro de finanzas, +Missing Finished Good,Falta Acabado Bueno, +Missing Formula,Falta fórmula, +Missing Items,Faltan artículos, +Missing Payments App,Aplicación de pagos faltantes, +Missing Serial No Bundle,Falta el número de serie del paquete, +Missing value,Valor faltante, +Modified By,Modificado por, +Modified On,Modificado el, +Module Settings,Configuración de Módulos, +Monitor for Last 'X' days,"Monitorización de los últimos ""X"" días", +Move Stock,Mover Stock, +Move to Cart,Mover al carrito, +Movement,Movimiento, +Moving up in tree ...,Subiendo en árbol ..., +Multi-level BOM Creator,Creador de listas de materiales multinivel, +Multiple Loyalty Programs found for Customer {}. Please select manually.,Se encontraron varios programas de fidelización para el cliente {}. Seleccione manualmente., +Multiple Warehouse Accounts,Múltiples cuentas de almacén, +Multiple items cannot be marked as finished item,No se pueden marcar varios artículos como artículo terminado, +Must be a publicly accessible Google Sheets URL and adding Bank Account column is necessary for importing via Google Sheets,Debe ser una URL de Hojas de cálculo de Google de acceso público y es necesario agregar la columna Cuenta bancaria para importar a través de Hojas de cálculo de Google., +Named Place,Lugar nombrado, +Naming Series and Price Defaults,Series de Nombres y Precios por Defecto, +Net total calculation precision loss,Pérdida neta total de precisión de cálculo, +New Balance In Account Currency,Nuevo saldo en la moneda de la cuenta, +New Event,Nuevo Evento, +New Note,Nueva Nota, +New Task,Nueva Tarea, +New Version,Nueva versión, +Newsletter,Boletín de noticias, +No Answer,Sin respuesta, +No Customers found with selected options.,No se encontraron clientes con las opciones seleccionadas., +No Items selected for transfer.,No hay artículos seleccionados para transferir., +No Matching Bank Transactions Found,No se han encontrado transacciones bancarias coincidentes, +No Notes,Sin notas, +No Outstanding Invoices found for this party,No se encontraron facturas pendientes para esta parte, +No POS Profile found. Please create a New POS Profile first,"No se ha encontrado ningún Perfil de PV. Por favor, cree primero un Nuevo Perfil PV", +No Records for these settings.,No hay registros para estas configuraciones., +No Serial / Batches are available for return,No hay números de serie ni lotes disponibles para devolución, +No Stock Available Currently,No hay existencias disponibles actualmente, +No Summary,Sin resumen, +No Tax Withholding data found for the current posting date.,No se han encontrado datos de retenciones fiscales para la fecha de contabilización actual., +No Terms,Sin términos, +No Unreconciled Invoices and Payments found for this party and account,No se encontraron facturas ni pagos sin conciliar para esta parte y cuenta, +No Unreconciled Payments found for this party,No se encontraron pagos no conciliados para esta parte, +No Work Orders were created,No se crearon órdenes de trabajo, +No additional fields available,No hay campos adicionales disponibles, +No billing email found for customer: {0},No se encontró ningún correo electrónico de facturación para el cliente: {0}, +No data found. Seems like you uploaded a blank file,No se encontraron datos. Parece que has subido un archivo en blanco., +No employee was scheduled for call popup,No se programó ningún empleado para la ventana emergente de llamada, +No failed logs,No hay registros fallidos, +No item available for transfer.,No hay ningún artículo disponible para transferencia., +No items are available in sales orders {0} for production,No hay artículos disponibles en los pedidos de venta {0} para producción, +No items are available in the sales order {0} for production,No hay artículos disponibles en la orden de venta {0} para producción, +No items in cart,No hay artículos en el carrito, +No matches occurred via auto reconciliation,No se produjeron coincidencias mediante la conciliación automática, +No more children on Left,No más secundarios en la izquierda, +No more children on Right,No más secundarios en la derecha, +No of Docs,Nº de documentos, +No of Employees,Núm. de Empleados, +No of Months (Expense),Nº de meses (gastos), +No of Months (Revenue),Nº de meses (Ingresos), +No open event,Ningún evento abierto, +No open task,Sin tareas abiertas, +No outstanding {0} found for the {1} {2} which qualify the filters you have specified.,No se encontraron {0} pendientes para los {1} {2} que califican para los filtros que ha especificado., +No primary email found for customer: {0},No se encontró ningún correo electrónico principal para el cliente: {0}, +No records found in Allocation table,No se encontraron registros en la tabla de asignación, +No records found in the Invoices table,No se encontraron registros en la tabla Facturas, +No records found in the Payments table,No se encontraron registros en la tabla Pagos, +No stock transactions can be created or modified before this date.,No se podrán crear ni modificar transacciones de stock antes de esta fecha., +No {0} Accounts found for this company.,No se han encontrado cuentas en {0} para esta empresa., +No.,Nº, +No. of Employees,Núm. de Empleados, +No. of parallel job cards which can be allowed on this workstation. Example: 2 would mean this workstation can process production for two Work Orders at a time.,Nº de tarjetas de trabajo paralelas que se pueden permitir en esta estación de trabajo. Ejemplo: 2 significaría que esta estación de trabajo puede procesar la producción de dos Órdenes de Trabajo a la vez., +Note: Automatic log deletion only applies to logs of type Update Cost,Nota: El borrado automático de registros sólo se aplica a los registros de tipo Coste de actualización, +"Note: To merge the items, create a separate Stock Reconciliation for the old item {0}","Nota: Para fusionar los artículos, cree una reconciliación de existencias separada para el antiguo artículo {0}.", +Notes HTML,Notas HTML, +Notification,Notificación, +Notification Settings,Configuración de las notificaciones, +Notify Reposting Error to Role,Notificar error de reenvío al rol, +Number of Days,Número de días, +Numeric,Numérico, +Numeric Inspection,Inspección numérica, +Off,Apagado, +Offsetting Account,Cuenta de compensación, +Offsetting for Accounting Dimension,Compensación de la dimensión contable, +On Paid Amount,Sobre el importe pagado, +On This Date,En esta fecha, +On Track,En marcha, +On enabling this cancellation entries will be posted on the actual cancellation date and reports will consider cancelled entries as well,Al habilitar esta cancelación las entradas se contabilizarán en la fecha real de cancelación y los informes también tendrán en cuenta las entradas canceladas, +"On expanding a row in the Items to Manufacture table, you'll see an option to 'Include Exploded Items'. Ticking this includes raw materials of the sub-assembly items in the production process.","Al expandir una fila en la tabla de Artículos para fabricar, verá una opción para ""Incluir artículos despiezados"". Al marcar esta opción, se incluyen las materias primas de los artículos del subconjunto en el proceso de producción.", +"On submission of the stock transaction, system will auto create the Serial and Batch Bundle based on the Serial No / Batch fields.","En la validación la transacción de existencias, el sistema creará automáticamente el lote de series y lotes basándose en los campos Número de serie / Lote.", +Once the Work Order is Closed. It can't be resumed.,Una vez cerrada la Orden de Trabajo. No se puede reanudar., +Only 'Payment Entries' made against this advance account are supported.,Sólo se admiten 'Entradas de pago' realizadas contra esta cuenta de anticipo., +Only CSV and Excel files can be used to for importing data. Please check the file format you are trying to upload,Solo se pueden utilizar archivos CSV y Excel para importar datos. Verifique el formato del archivo que intenta cargar, +Only Deduct Tax On Excess Amount ,Deducir impuestos solo sobre el importe excedente , +Only Include Allocated Payments,Incluir sólo los pagos asignados, +Only Parent can be of type {0},Sólo el principal puede ser del tipo {0}, +Only existing assets,Solo activos existentes, +"Only one Subcontracting Order can be created against a Purchase Order, cancel the existing Subcontracting Order to create a new one.",Solo se puede crear una orden de subcontratación contra una orden de compra; cancele la orden de subcontratación existente para crear una nueva., +Only one {0} entry can be created against the Work Order {1},Solo se puede crear una entrada {0} contra la orden de trabajo {1}, +"Only values between [0,1) are allowed. Like {0.00, 0.04, 0.09, ...} +Ex: If allowance is set at 0.07, accounts that have balance of 0.07 in either of the currencies will be considered as zero balance account","Solo se permiten valores entre [0,1). Como {0,00, 0,04, 0,09, ...} +Ejemplo: si la asignación se establece en 0,07, las cuentas que tengan un saldo de 0,07 en cualquiera de las monedas se considerarán cuentas con saldo cero.", +Only {0} are supported,Solo se admiten {0}, +Open Activities HTML,Abrir actividades HTML, +Open Call Log,Abrir registro de llamadas, +Open Event,Abrir Evento, +Open Events,Eventos abiertos, +Open Sales Orders,Órdenes de venta abiertas, +Open Task,Abrir tarea, +Open Tasks,Tareas abiertas, +Open Work Order {0},Orden de trabajo abierta {0}, +Opening & Closing,Apertura y cierre, +Opening Accumulated Depreciation must be less than or equal to {0},La depreciación acumulada de apertura debe ser inferior o igual a {0}., +Opening Entry can not be created after Period Closing Voucher is created.,El asiento de apertura no puede crearse después de haber creado el comprobante de cierre del período., +Opening Number of Booked Depreciations,Número de apertura de depreciaciones registradas, +Opening Purchase Invoices have been created.,Se han creado facturas de compra de apertura., +Opening Sales Invoices have been created.,Se han creado facturas de venta de apertura., +Operating Cost Per BOM Quantity,Coste operativo por cantidad de la lista de materiales, +Operation time does not depend on quantity to produce,El tiempo de operación no depende de la cantidad a producir, +Opportunity Amount (Company Currency),Valor de la oportunidad (moneda de la empresa), +Opportunity Owner,Propietario de oportunidad, +Opportunity Source,Fuente de oportunidad, +Opportunity Summary by Sales Stage,Resumen de oportunidades por etapa de venta, +Opportunity Summary by Sales Stage ,Resumen de oportunidades por etapa de venta , +Opportunity Value,Valor de oportunidad, +Order Status,Estado del Pedido, +Other Info,Información adicional, +Out of stock,Agotado, +Over Picking Allowance,Tolerancia por exceso de recogida, +Over Receipt,Sobre recibo, +Over Receipt/Delivery of {0} {1} ignored for item {2} because you have {3} role.,Se ignora la recepción/entrega excesiva de {0} {1} para el artículo {2} porque tiene el rol {3} ., +Over Transfer Allowance,Exceso de asignación por transferencia, +Overbilling of {0} {1} ignored for item {2} because you have {3} role.,Sobrefacturación de {0} {1} ignorada para el artículo {2} porque tiene el rol {3} ., +Overbilling of {} ignored because you have {} role.,Se ignora la sobrefacturación de {} porque tiene el rol {}., +Overdue Payment,Pago vencido, +Overdue Payments,Pagos vencidos, +Overdue Tasks,Tareas atrasadas, +Overview,Visión general, +PDF Name,Nombre del PDF, +POS Closing Failed,Cierre de TPV fallido, +POS Closing failed while running in a background process. You can resolve the {0} and retry the process again.,El Cierre del TPV falló mientras se ejecutaba un proceso en segundo plano. Puede resolver el {0} y reintentar el proceso de nuevo., +POS Invoice is already consolidated,La factura del TPV ya está consolidada, +POS Invoice is not submitted,La factura del TPV no se presenta, +POS Invoice should have the field {0} checked.,La factura del TPV debe tener el campo {} marcado., +POS Invoices will be consolidated in a background process,Las facturas de TPV se consolidarán en un proceso en segundo plano, +POS Invoices will be unconsolidated in a background process,Las facturas de TPV no se consolidarán en un proceso en segundo plano, +POS Profile doesn't match {},El perfil de TPV no coincide con {}, +POS Profile {} contains Mode of Payment {}. Please remove them to disable this mode.,"El Perfil de TPV {} contiene el Modo de Pago {}. Por favor, elimínelos para desactivar este modo.", +POS Search Fields,Campos de búsqueda en el TPV, +POS Setting,Ajuste del TPV, +Package No(s) already in use. Try from Package No {0},Los números de paquete ya están en uso. Pruebe desde el número de paquete {0}, +Packaging Slip From Delivery Note,Recibo de embalaje de la nota de entrega, +Packed Items cannot be transferred internally,Los artículos empaquetados no se pueden transferir internamente, +Packed Qty,Cantidad empaquetada, +Page Break After Each SoA,Salto de página después de cada SoA, +Paid Amount After Tax,Importe pagado después de impuestos, +Paid Amount After Tax (Company Currency),Importe pagado después de impuestos (moneda de la empresa), +Paid From Account Type,Pagado desde tipo de cuenta, +Paid To Account Type,Tipo de cuenta pagada, +Pallets,Palés, +Parameter Group,Grupo de parámetros, +Parameter Group Name,Nombre del grupo de parámetros, +Parcel Template,Plantilla de paquete, +Parcel Template Name,Nombre de la plantilla de parcela, +Parcel weight cannot be 0,El peso del paquete no puede ser 0, +Parcels,Paquetes, +Parent Account Missing,Falta la cuenta principal, +Parent Document,Documento Principal, +Parent Item {0} must not be a Fixed Asset,El artículo principal {0} no debe ser un activo fijo, +Parent Row No,Número de fila principal, +Parent Task {0} is not a Template Task,La tarea principal {0} no es una tarea de plantilla, +Partial Material Transferred,Material parcial transferido, +Partial Stock Reservation,Reserva parcial de stock, +Partial Success,Éxito Parcial, +"Partial stock can be reserved. For example, If you have a Sales Order of 100 units and the Available Stock is 90 units then a Stock Reservation Entry will be created for 90 units. ","Se puede reservar un stock parcial. Por ejemplo, si tiene un pedido de venta de 100 unidades y el stock disponible es de 90 unidades, se creará una entrada de reserva de stock para 90 unidades. ", +Partially Delivered,Entregado parcialmente, +Partially Reconciled,Parcialmente reconciliado, +Partially Reserved,Parcialmente reservado, +Partly Paid,Pagado parcialmente, +Partly Paid and Discounted,Parcialmente pagado y descontado, +Partnership,Asociación, +Party Account No. (Bank Statement),Número de cuenta de la Entidad(extracto bancario), +Party Account {0} currency ({1}) and document currency ({2}) should be same,La moneda de la cuenta de la Entidad {0} ({1}) y la moneda del documento ({2}) deben ser las mismas, +Party IBAN (Bank Statement),IBAN del destinatario (extracto bancario), +Party Item Code,Código de artículo de la Entidad, +Party Link,Enlace de la Entidad, +Party Name/Account Holder (Bank Statement),Nombre de la Entidad/titular de la cuenta (extracto bancario), +Party Specific Item,Producto específico de la Parte, +Party Type and Party is required for Receivable / Payable account {0},Se requiere el tipo de Entidad y la Entidad para la cuenta por cobrar/pagar {0}, +Party can only be one of {0},La Entidad solo puede ser una de {0}, +Passport Details,Datos del pasaporte, +Pause Job,Pausar trabajo, +Paused,Pausado, +Payment Amount (Company Currency),Importe del pago (moneda de la empresa), +"Payment Entry {0} is linked against Order {1}, check if it should be pulled as advance in this invoice.","La entrada de pago {0} está vinculada al pedido {1}, verifique si debe extraerse como anticipo en esta factura.", +Payment Ledger,Libro de pagos, +Payment Ledger Balance,Saldo del libro mayor de pagos, +Payment Ledger Entry,Entrada de libro mayor de pagos, +Payment Limit,Límite de pago, +Payment Reconciliation Allocation,Asignación de conciliación de pagos, +Payment Reconciliation Job: {0} is running for this party. Can't reconcile now.,Trabajo de conciliación de pagos: {0} se está ejecutando para esta parte. No se puede conciliar ahora., +Payment Reconciliations,Conciliaciones de pagos, +Payment Request Outstanding,Solicitud de pago pendiente, +Payment Request created from Sales Order or Purchase Order will be in Draft status. When disabled document will be in unsaved state.,"La solicitud de pago creada a partir de una orden de venta o una orden de compra estará en estado de borrador. Si está deshabilitada, el documento estará en estado de no guardado.", +Payment Request is already created,La solicitud de pago ya está creada, +Payment Request took too long to respond. Please try requesting for payment again.,La solicitud de pago tardó demasiado en responder. Intente solicitar el pago nuevamente., +Payment Requests cannot be created against: {0},No se pueden crear solicitudes de pago contra: {0}, +Payment Term Outstanding,Plazo de pago pendiente, +Payment Terms Status for Sales Order,Estado de las condiciones de pago de la orden de venta, +Payment Terms from orders will be fetched into the invoices as is,Las condiciones de pago de los pedidos se reflejarán en las facturas tal como están., +Payment Unlink Error,Error al desvincular el pago, +Payment of {0} received successfully.,Pago de {0} recibido exitosamente., +Payment of {0} received successfully. Waiting for other requests to complete...,Pago de {0} recibido con éxito. Esperando que se completen otras solicitudes..., +Payment request failed,Solicitud de pago fallida, +Payment term {0} not used in {1},Término de pago {0} no utilizado en {1}, +Pending processing,Pendiente de procesamiento, +Per Received,Por recibido, +Percentage (%),Porcentaje (%), +Percentage you are allowed to order beyond the Blanket Order quantity.,Porcentaje que se le permite pedir más allá de la cantidad del pedido general., +Percentage you are allowed to sell beyond the Blanket Order quantity.,Porcentaje que se le permite vender más allá de la cantidad del pedido general., +Period Closed,Período cerrado, +Period Closing Entry For Current Period,Asiento de cierre de período para el período actual, +Period Closing Settings,Configuración de cierre de período, +Period Details,Detalles del periodo, +Period To Date,Período hasta la fecha, +Period_from_date,Periodo_desde_fecha, +Phone Ext.,Extensión telefónica, +Pick List Incomplete,Lista de selección incompleta, +Pick Manually,Seleccionar manualmente, +Pick Serial / Batch Based On,Selección de serie / lote basada en, +Pick Serial / Batch No,Seleccione el número de serie/lote, +Picked Qty (in Stock UOM),Cantidad seleccionada (en stock UdM), +Pickup,Recogida, +Pickup Contact Person,Persona de contacto para la recogida, +Pickup Date,Fecha de recogida, +Pickup Date cannot be before this day,La fecha de recogida no puede ser anterior a este día., +Pickup From,Recoger de, +Pickup To time should be greater than Pickup From time,La hora de recogida hasta debe ser mayor que la hora de recogida desde, +Pickup Type,Tipo de recogida, +Pickup from,Recoger de, +Pickup to,Recogida a, +Pipeline By,Fuente de información por, +Plaid Link Failed,Vinculación a Plaid fallido, +Plaid Link Refresh Required,Se requiere actualización de la vinculación con Plaid, +Plaid Link Updated,Enlace de Plaid actualizado, +Plan to Request Qty,Plan para solicitar cantidad, +Plant Dashboard,Panel de control de la planta, +Plant Floor,Planta, +Please Set Priority,"Por favor, establezca la prioridad", +Please Specify Account,Por favor especifique la cuenta, +Please add 'Supplier' role to user {0}.,"Por favor, añada el rol 'Proveedor' al usuario {0}.", +Please add Request for Quotation to the sidebar in Portal Settings.,"Por favor, añada la Solicitud de Presupuesto a la barra lateral en los Ajustes del Portal.", +Please add Root Account for - {0},"Por favor, añada una cuenta raíz para - {0}", +Please add atleast one Serial No / Batch No,"Por favor, añada al menos un nº de serie / nº de lote", +Please add the Bank Account column,"Por favor, añada la columna Cuenta bancaria", +Please add the account to root level Company - {0},"Por favor, añada la cuenta al nivel raíz Empresa - {0}", +Please add {1} role to user {0}.,"Por favor, añada el rol {1} al usuario {0}.", +Please adjust the qty or edit {0} to proceed.,Ajuste la cantidad o edite {0} para continuar., +Please attach CSV file,Adjunte el archivo CSV, +Please cancel and amend the Payment Entry,"Por favor, cancele y modifique la Entrada de Pago", +Please cancel payment entry manually first,"Por favor, cancele primero la entrada del pago manualmente", +Please cancel related transaction.,"Por favor, cancele la transacción relacionada.", +Please check Process Deferred Accounting {0} and submit manually after resolving errors.,"Por favor, marque Procesar contabilidad diferida {0} y valídelo manualmente después de resolver los errores.", +Please check either with operations or FG Based Operating Cost.,Consulte con operaciones o con el costo operativo basado en FG., +Please check the error message and take necessary actions to fix the error and then restart the reposting again.,"Por favor, compruebe el mensaje de error y tome las medidas necesarias para solucionar el error y luego reinicie el reenvío de nuevo.", +Please check your email to confirm the appointment,"Por favor, compruebe su correo electrónico para confirmar la cita", +Please contact any of the following users to extend the credit limits for {0}: {1},Comuníquese con cualquiera de los siguientes usuarios para ampliar los límites de crédito para {0}: {1}, +Please contact any of the following users to {} this transaction.,"Por favor, póngase en contacto con cualquiera de los siguientes usuarios para {} esta transacción.", +Please contact your administrator to extend the credit limits for {0}.,Póngase en contacto con su administrador para ampliar los límites de crédito de {0}., +Please create Landed Cost Vouchers against Invoices that have 'Update Stock' enabled.,"Cree comprobantes de costo de destino contra facturas que tengan habilitada la opción ""Actualizar stock"".", +Please create a new Accounting Dimension if required.,"Por favor, cree una nueva Dimensión Contable si es necesario.", +Please create purchase from internal sale or delivery document itself,"Por favor, cree la compra a partir de la venta interna o del propio documento de entrega", +"Please delete Product Bundle {0}, before merging {1} into {2}","Por favor, elimine el paquete de productos {0}, antes de fusionar {1} en {2}", +Please do not book expense of multiple assets against one single Asset.,"Por favor, no contabilice gastos de múltiples activos contra un único Activo.", +Please enable Use Old Serial / Batch Fields to make_bundle,"Por favor, active Usar campos de serie / lote antiguos en make_bundle", +Please enable only if the understand the effects of enabling this.,Habilítelo solo si comprende los efectos de habilitar esto., +Please enable {0} in the {1}.,"Por favor, habilite {0} en la página {1}.", +Please enable {} in {} to allow same item in multiple rows,"Por favor, active {} en {} para permitir el mismo elemento en varias filas", +Please ensure that the {0} account is a Balance Sheet account. You can change the parent account to a Balance Sheet account or select a different account.,Asegúrese de que la cuenta {0} es una cuenta de Balance. Puede cambiar la cuenta padre a una cuenta de Balance o seleccionar una cuenta diferente., +Please ensure that the {0} account {1} is a Payable account. You can change the account type to Payable or select a different account.,Asegúrese de que la cuenta {0} {1} sea una cuenta de pago. Puede cambiar el tipo de cuenta a pago o seleccionar una cuenta diferente., +Please ensure {} account is a Balance Sheet account.,Asegúrese de que la cuenta {} sea una cuenta de balance general., +Please ensure {} account {} is a Receivable account.,Asegúrese de que {} cuenta {} sea una cuenta por cobrar., +Please enter Root Type for account- {0},"Por favor, introduzca el tipo de cuenta- {0}", +Please enter Serial Nos,"Por favor, introduzca Serial Nos", +Please enter Shipment Parcel information,"Por favor, introduzca la información del paquete de envío", +Please enter Stock Items consumed during the Repair.,Ingrese los artículos en stock consumidos durante la reparación., +Please enter mobile number first.,"Por favor, introduzca primero el número de móvil.", +Please enter quantity for item {0},Ingrese la cantidad del artículo {0}, +Please enter serial nos,"Por favor, introduzca los números de serie", +"Please first set Last Name, Email and Phone for the user","Primero configure el apellido, el correo electrónico y el teléfono del usuario.", +Please fix overlapping time slots for {0},"Por favor, arreglen los espacios de tiempo superpuestos para {0}", +Please fix overlapping time slots for {0}.,"Por favor, arregle los espacios de tiempo superpuestos para {0}.", +Please import accounts against parent company or enable {} in company master.,"Por favor, importe las cuentas contra la empresa principal o habilite {} en el maestro de empresas.", +"Please keep one Applicable Charges, when 'Distribute Charges Based On' is 'Distribute Manually'. For more charges, please create another Landed Cost Voucher.","Conserve un solo Cargo aplicable cuando la opción ""Distribuir cargos según"" esté configurada como ""Distribuir manualmente"". Para más cargos, cree otro Comprobante de costo de destino.", +Please make sure the file you are using has 'Parent Account' column present in the header.,Asegúrese de que el archivo que está utilizando tenga la columna 'Cuenta principal' presente en el encabezado., +Please mention 'Weight UOM' along with Weight.,Mencione 'Peso UdM' junto con el Peso., +Please mention the Current and New BOM for replacement.,"Por favor, mencione la lista de materiales actual y la nueva para la sustitución.", +Please rectify and try again.,"Por favor, corrija y vuelva a intentarlo.", +Please refresh or reset the Plaid linking of the Bank {}.,"Por favor, actualice o reinicie la vinculación del Banco con Plaid {}.", +Please save before proceeding.,"Por favor, guarde antes de continuar.", +Please select Bank Account,"Por favor, seleccione Cuenta Bancaria", +Please select Finished Good Item for Service Item {0},"Por favor, seleccione Artículo de producto terminado para el artículo de servicio {0}", +Please select Serial/Batch Nos to reserve or change Reservation Based On to Qty.,Seleccione los números de serie/lote para reservar o cambie Reserva basada en a Cantidad., +Please select Subcontracting Order instead of Purchase Order {0},Por favor seleccione Orden de Subcontratación en lugar de Orden de Compra {0}, +Please select Unrealized Profit / Loss account or add default Unrealized Profit / Loss account account for company {0},Seleccione la cuenta de ganancias/pérdidas no realizadas o agregue la cuenta de ganancias/pérdidas no realizadas predeterminada para la empresa {0}, +Please select a Subcontracting Purchase Order.,Seleccione una orden de compra de subcontratación., +Please select a Warehouse,Por favor seleccione un almacén, +Please select a Work Order first.,Seleccione primero una orden de trabajo., +Please select a country,"Por favor, selecciona un país", +Please select a customer for fetching payments.,Seleccione un cliente para obtener los pagos., +Please select a date,"Por favor, seleccione una fecha", +Please select a date and time,Por favor seleccione una fecha y hora, +Please select a row to create a Reposting Entry,Seleccione una fila para crear una entrada de reenvío, +Please select a supplier for fetching payments.,"Por favor, seleccione un proveedor para obtener los pagos.", +Please select a valid Purchase Order that has Service Items.,"Por favor, seleccione una Orden de Compra válida que tenga Artículos de Servicio.", +Please select a valid Purchase Order that is configured for Subcontracting.,"Por favor, seleccione un Pedido válido que esté configurado para Subcontratación.", +Please select an item code before setting the warehouse.,Seleccione un código de artículo antes de configurar el almacén., +Please select either the Item or Warehouse or Warehouse Type filter to generate the report.,Seleccione el filtro Artículo o Almacén o Tipo de almacén para generar el informe., +Please select items,Por favor seleccione artículos, +Please select items to reserve.,Por favor seleccione los artículos que desea reservar., +Please select items to unreserve.,Seleccione los artículos que desea cancelar la reserva., +Please select only one row to create a Reposting Entry,Seleccione solo una fila para crear una entrada de reenvío, +Please select rows to create Reposting Entries,Seleccione filas para crear entradas de reenvío, +Please select the required filters,Por favor seleccione los filtros requeridos, +Please select valid document type.,Seleccione un tipo de documento válido., +Please set Account,"Por favor, establezca una cuenta", +Please set Accounting Dimension {} in {},"Por favor, establezca la dimensión contable {} en {}", +Please set Email/Phone for the contact,"Por favor, establezca Email/Teléfono para el contacto", +Please set Fiscal Code for the customer '%s',"Por favor, establezca el código fiscal para el cliente '%s'", +Please set Fiscal Code for the public administration '%s',"Por favor, establezca el código fiscal para la administración pública '%s'", +Please set Fixed Asset Account in {} against {}.,Establezca la cuenta de activos fijos en {} frente a {}., +Please set Opening Number of Booked Depreciations,"Por favor, establezca el número de apertura de las depreciaciones registradas", +Please set Parent Row No for item {0},Establezca el número de fila principal para el artículo {0}, +Please set Root Type,"Por favor, configure el tipo de raíz", +Please set Tax ID for the customer '%s',"Por favor, establezca el número de identificación fiscal para el cliente '%s'", +Please set VAT Accounts in {0},Establezca las cuentas de IVA en {0}, +"Please set Vat Accounts for Company: ""{0}"" in UAE VAT Settings","Establezca las cuentas de IVA para la empresa: ""{0}"" en la configuración de IVA de los EAU", +Please set a Cost Center for the Asset or set an Asset Depreciation Cost Center for the Company {},Establezca un centro de costo para el activo o establezca un centro de costo de depreciación de activos para la empresa {}, +Please set a default Holiday List for Company {0},Establezca una lista de días festivos predeterminada para la empresa {0}, +Please set an Address on the Company '%s',"Por favor, establezca una dirección en la empresa '%s'", +Please set an Expense Account in the Items table,Establezca una cuenta de gastos en la tabla de artículos, +Please set default Exchange Gain/Loss Account in Company {},Establezca la cuenta de ganancias/pérdidas de cambio predeterminada en la empresa {}, +Please set default Expense Account in Company {0},Establezca la cuenta de gastos predeterminada en la empresa {0}, +Please set default cost of goods sold account in company {0} for booking rounding gain and loss during stock transfer,Establezca la cuenta de costo de bienes vendidos predeterminada en la empresa {0} para registrar las ganancias y pérdidas por redondeo durante la transferencia de existencias, +Please set either the Tax ID or Fiscal Code on Company '%s',Establezca el ID fiscal o el código fiscal en la empresa '%s', +Please set filters,"Por favor, defina los filtros", +Please set one of the following:,Establezca una de las siguientes opciones:, +Please set the cost center field in {0} or setup a default Cost Center for the Company.,Establezca el campo del centro de costo en {0} o configure un centro de costo predeterminado para la empresa., +Please set {0} in BOM Creator {1},Establezca {0} en LdM Creator {1}, +Please setup and enable a group account with the Account Type - {0} for the company {1},"Por favor, configura y habilita una cuenta de grupo con el tipo de cuenta - {0} para la empresa {1}.", +Please share this email with your support team so that they can find and fix the issue.,Comparta este correo electrónico con su equipo de soporte para que puedan encontrar y solucionar el problema., +Please specify a {0},Por favor especifique un {0}, +Please try again in an hour.,Vuelve a intentarlo en 1 hora., +Please update Repair Status.,"Por favor, actualice el estado de la reparación.", +Portal User,Usuario del portal, +Portal Users,Usuario del Portal, +Posting Datetime,Fecha y hora de publicación, +Powered by {0},Desarrollado por {0}, +"Previous Year is not closed, please close it first","El año anterior no está cerrado, por favor ciérrelo primero", +Price ({0}),Precio ({0}), +Price List Defaults,Lista de precios por defecto, +Price Per Unit ({0}),Precio por Unidad ({0}), +Primary Address and Contact,Dirección principal y Contacto, +Primary Contact,Contacto Principal, +Primary Party,Entidad Primaria, +Primary Role,Rol principal, +Print Format Builder,Diseñador de formatos de impresión, +Print Style,Estilo de Impresión, +Printing,Impresión, +Priority cannot be lesser than 1.,La prioridad no puede ser menor a 1., +Priority is mandatory,La prioridad es obligatoria, +Probability,Probabilidad, +Process Loss,Pérdida por Proceso, +Process Loss Percentage cannot be greater than 100,El porcentaje de pérdida de proceso no puede ser mayor que 100, +Process Loss Qty,Cantidad de pérdida de proceso, +Process Loss Report,Informe de pérdidas de proceso, +Process Loss Value,Valor de pérdida del proceso, +Process Payment Reconciliation,Proceso de conciliación de pagos, +Process Payment Reconciliation Log,Registro de conciliación de procesos de pago, +Process Payment Reconciliation Log Allocations,Asignaciones del registro de conciliación de pagos del proceso, +Process Subscription,Proceso de suscripción, +Process in Single Transaction,Proceso en Transacción Única, +Processed BOMs,Listas de materiales procesadas, +Processing Sales! Please Wait...,¡Procesando ventas! Por favor espere..., +Produced / Received Qty,Cantidad producida/recibida, +Product Price ID,ID del Precio del producto, +Production Plan Already Submitted,Plan de producción ya validado, +Production Plan Item Reference,Plan de producción Articulo de referencia, +Production Plan Qty,Plan de producción Cantidad, +Production Plan Sub Assembly Item,Plan de producción Elemento de subensamblaje, +Production Plan Sub-assembly Item,Plan de producción Subconjunto Artículo, +Production Plan Summary,Resumen del plan de producción, +Profile,Perfil, +Profit and Loss Summary,Resumen de pérdidas y ganancias, +Progress,Progreso, +Progress (%),Progreso (%), +Project Progress:,Progreso del proyecto:, +Prompt Qty,Cantidad inmediata, +Prospect,Prospecto, +Prospect Lead,Prospecto de cliente potencial, +Prospect Opportunity,Oportunidad prospecto, +Prospect Owner,Propietario del prospecto, +Prospect {0} already exists,El prospecto {0} ya existe, +Provisional Account,Cuenta provisional, +Provisional Expense Account,Cuenta de Gastos Provisionales, +Purchase Order Item reference is missing in Subcontracting Receipt {0},Falta la referencia del artículo de la orden de compra en el recibo de subcontratación {0}, +Purchase Orders {0} are un-linked,Las órdenes de compra {0} no están vinculadas, +Purchase Receipt (Draft) will be auto-created on submission of Subcontracting Receipt.,El recibo de compra (borrador) se creará automáticamente al validar el recibo de subcontratación., +Purchase Receipt {0} created.,Recibo de compra {0} creado., +Purchase Value,Valor de compra, +Purchases,Compras, +Purposes Required,Propósitos requeridos, +Putaway Rule,Regla de almacenamiento, +Putaway Rule already exists for Item {0} in Warehouse {1}.,La regla de almacenamiento ya existe para el artículo {0} en el almacén {1}., +Qty ,Cant. , +Qty After Transaction,Cantidad después de la transacción, +Qty As Per BOM,Cantidad según lista de materiales, +Qty Change,Cantidad Cambio, +Qty In Stock,Cant en existencia, +Qty Per Unit,Cantidad por unidad, +"Qty To Manufacture ({0}) cannot be a fraction for the UOM {2}. To allow this, disable '{1}' in the UOM {2}.","La cantidad a fabricar ({0}) no puede ser una fracción para la unidad de medida {2}. Para permitir esto, deshabilite '{1}' en la unidad de medida {2}.", +Qty To Produce,Cantidad a producir, +Qty and Rate,Cantidad y Tarifa, +Qty as Per Stock UOM,Cantidad según stock UdM, +Qty for which recursion isn't applicable.,Cantidad para la que no es aplicable la recursividad., +Qty in Stock UOM,Cantidad en stock UdM, +Qty of Finished Goods Item should be greater than 0.,La cantidad de productos acabados debe ser superior a 0., +Qty to Be Consumed,Cantidad para ser consumida, +Qty to Build,Cantidad a construir, +Qty to Fetch,Cantidad a buscar, +Qty to Produce,Cantidad a producir, +Qualification Status,Estado de la cualificación, +Qualified,Cualificado, +Qualified By,Calificado por, +Qualified on,Calificado el, +Quality Inspection Parameter,Parámetros de inspección de calidad, +Quality Inspection Parameter Group,Grupo de parámetros de inspección de calidad, +Quality Inspection Settings,Configuración de inspección de calidad, +Quality Inspection(s),Inspección(es) de calidad, +Quantity is required,Se requiere cantidad, +"Quantity must be greater than zero, and less or equal to {0}",La cantidad debe ser mayor que cero y menor o igual a {0}, +Quantity to Produce should be greater than zero.,La cantidad a producir debe ser mayor que cero., +Quantity to Scan,Cantidad a escanear, +Quarter {0} {1},Cuatrimestre {0} {1}, +Quotation Number,Número de Cotización, +Quoted Amount,Importe Cotizado, +Rate Difference with Purchase Invoice,Diferencia de tarifa con la factura de compra, +Rate Section,Sección de tarifas, +Rate of Stock UOM,Tasa de stock UdM, +Raw Material Cost Per Qty,Coste de la materia prima por cant., +Raw Material Item,Artículo de materia prima, +Raw Material Value,Valor de la materia prima, +Raw Materials Actions,Acciones de Materias Primas, +Raw Materials Consumption ,Consumo de materias primas , +Raw Materials Warehouse,Almacén de materias primas, +Reached Root,Raíz alcanzada, +Reading Value,Valor de lectura, +Reason for hold:,Motivo de la retención:, +Rebuild Tree,Reconstruir el árbol, +Rebuilding BTree for period ...,Reconstruyendo BTree para el período..., +Recalculate Incoming/Outgoing Rate,Recalcular la tasa de entrada/salida, +Recalculating Purchase Cost against this Project...,Recalcular el coste de compra contra este proyecto..., +Receivable/Payable Account,Cuenta por cobrar/por pagar, +Receivable/Payable Account: {0} doesn't belong to company {1},Cuenta por cobrar/por pagar: {0} no pertenece a la empresa {1}, +Received Amount After Tax,Importe recibido después de impuestos, +Received Amount After Tax (Company Currency),Importe recibido después de impuestos (moneda de la empresa), +Received Amount cannot be greater than Paid Amount,El importe recibido no puede ser mayor que el importe pagado, +Received Qty in Stock UOM,Cantidad recibida en stock UdM, +Recent Orders,Pedidos recientes, +Recent Transactions,Transacciones recientes, +Reconcile All Serial Nos / Batches,Concilie todos los números de serie / lotes, +Reconcile on Advance Payment Date,Conciliar en fecha de pago anticipado, +Reconcile the Bank Transaction,Conciliar la transacción bancaria, +Reconciled Entries,Entradas conciliadas, +Reconciliation Error Log,Registro de errores de conciliación, +Reconciliation Logs,Registros de conciliación, +Reconciliation Progress,Progreso de la reconciliación, +Recording HTML,Grabación HTML, +Recoverable Standard Rated expenses should not be set when Reverse Charge Applicable is Y,Los gastos recuperables con tasa estándar no se deben establecer cuando la inversión de cargo aplicable es Y, +Recurse Every (As Per Transaction UOM),Recursiva cada (según la unidad de medida de la transacción), +Recurse Over Qty cannot be less than 0,El recursivo sobre cantidad no puede ser menor que 0, +Recursive Discounts with Mixed condition is not supported by the system,El sistema no admite descuentos recursivos con condiciones mixtas, +Reference Date for Early Payment Discount,Fecha de referencia para el descuento por pronto pago, +Reference Detail,Detalle de referencia, +Reference DocType,DocType de referencia, +Reference Exchange Rate,Tipo de cambio de referencia, +Reference No,Nº de referencia, +Reference number of the invoice from the previous system,Número de referencia de la factura del sistema anterior, +References to Sales Invoices are Incomplete,Las referencias a las facturas de venta están incompletas, +References to Sales Orders are Incomplete,Las referencias a los pedidos de venta están incompletas, +References {0} of type {1} had no outstanding amount left before submitting the Payment Entry. Now they have a negative outstanding amount.,Las referencias {0} del tipo {1} no tenían ningún importe pendiente antes de enviar la Entrada de pago. Ahora tienen un importe pendiente negativo., +Refresh Google Sheet,Actualizar hoja de Google, +Refresh Plaid Link,Actualizar enlace de Plaid, +Regenerate Closing Stock Balance,Regenerar saldo de stock de cierre, +Rejected Serial and Batch Bundle,Lote y serie rechazados, +Rejected Warehouse and Accepted Warehouse cannot be same.,Almacén Rechazado y Almacén Aceptado no pueden ser el mismo., +Remarks Column Length,Observaciones Longitud de la columna, +Remove Parent Row No in Items Table,Eliminar el número de fila principal en la tabla de elementos, +Repair,Reparar, +Repair Asset,Reparar activos, +Repair Details,Detalles de la reparación, +"Replace a particular BOM in all other BOMs where it is used. It will replace the old BOM link, update cost and regenerate ""BOM Explosion Item"" table as per new BOM. +It also updates latest price in all the BOMs.","Sustituye una determinada lista de materiales en todas las demás listas de materiales en las que se utilice. Reemplazará el enlace de la lista de materiales antigua, actualizará el coste y regenerará la tabla ""Elemento de explosión de la lista de materiales"" según la nueva lista de materiales. +También actualiza el último precio en todas las listas de materiales.", +Report Error,Reportar Error, +Report Filters,Filtros de informe, +Report View,Vista de Reporte, +Repost Accounting Ledger,Traspaso libro de contabilidad, +Repost Accounting Ledger Items,Traspaso de partidas del libro mayor de contabilidad, +Repost Accounting Ledger Settings,Traspasar configuración del libro mayor de contabilidad, +Repost Allowed Types,Tipos de Traspasos permitidos, +Repost Error Log,Traspaso registro de errores, +Repost Item Valuation,Traspaso Valoración de artículos, +Repost Payment Ledger,Traspaso del Libro de Pagos, +Repost Payment Ledger Items,Traspaso de partidas del libro de pagos, +Repost Status,Estado del Traspaso, +Repost has started in the background,El traspaso ha comenzado en segundo plano., +Repost in background,Traspasar en segundo plano, +Repost started in the background,Traspaso iniciado en segundo plano, +Reposting Completed {0}%,Traspaso completado {0}%, +Reposting Data File,Traspaso del archivo de datos, +Reposting Info,Información de Traspaso , +Reposting Progress,Traspasar el progreso, +Reposting entries created: {0},Traspaso de entradas creadas: {0}, +Reposting has been started in the background.,Se ha iniciado un traspaso en segundo plano., +Reposting in the background.,Traspasando en segundo plano., +Represents a Financial Year. All accounting entries and other major transactions are tracked against the Fiscal Year.,Representa un año fiscal. Todos los asientos contables y otras transacciones importantes se registran en relación con el año fiscal., +Request Parameters,Parámetros de la solicitud, +Request Timeout,Tiempo de espera superado, +Reservation Based On,Reserva basada en, +Reserve,Reservar, +Reserve Stock,Reservar stock, +"Reserved Qty ({0}) cannot be a fraction. To allow this, disable '{1}' in UOM {3}.","La cantidad reservada ({0}) no puede ser una fracción. Para permitirlo, deshabilite '{1}' en la unidad de medida {3}.", +Reserved Qty for Production Plan,Cantidad reservada para el plan de producción, +Reserved Qty for Subcontract,Cantidad reservada para subcontrato, +Reserved Qty should be greater than Delivered Qty.,La cantidad reservada debe ser mayor que la cantidad entregada., +Reserved Serial No.,Número de serie reservado., +Reserved Stock,Existencias Reservadas, +Reserved Stock for Batch,Stock reservado para lote, +Reserved for POS Transactions,Reservado para transacciones TPV, +Reserved for Production,Reservado para producción, +Reserved for Production Plan,Reservado para el plan de producción, +Reserved for Sub Contracting,Reservado para subcontratación, +Reserving Stock...,Reservando de stock..., +Reset Company Default Values,Restablecer valores predeterminados de la empresa, +Reset Plaid Link,Restablecer vinculación con Plaid, +Reset Raw Materials Table,Restablecer tabla de materias primas, +Resolution Due,Resolución pendiente, +Response and Resolution,Respuesta y resolución, +Restart,Reiniciar, +Restore Asset,Restaurar activo, +Restrict,Restringir, +Restrict Items Based On,Restringir Pruductos según, +Result Key,Clave de resultados, +Resume Job,Reanudar Trabajo, +Retried,Reintentado, +Retry,Reintentar, +Retry Failed Transactions,Reintentar transacciones fallidas, +Return Against,Devolución contra, +Return Against Subcontracting Receipt,Devolución contra recibo de subcontratación, +Return Components,Componentes de retorno, +Return Issued,Devolución emitida, +Return Qty,Cantidad devuelta, +Return Qty from Rejected Warehouse,Cantidad devuelta del almacén rechazado, +Return of Components,Devolución de componentes, +Returned,Devuelto, +Returned Against,Devuelto contra, +Returned Qty ,Cant devuelta , +Returned Qty in Stock UOM,Cantidad devuelta en stock UdM, +Returned exchange rate is neither integer not float.,El tipo de cambio devuelto no es ni entero ni flotante., +Revaluation Journals,Diarios de revalorización, +Revaluation Surplus,Superávit de revalorización, +Revenue,Ganancia, +Reversal Of,Reversión de, +Right Child,Secundario correcto, +Role Allowed to Create/Edit Back-dated Transactions,Rol permitido para crear o editar transacciones retroactivas, +Role Allowed to Over Bill ,Rol Permitido para Facturar en Exceso , +Role Allowed to Over Deliver/Receive,Rol que permite entregar/recibir más de lo debido, +Role Allowed to Override Stop Action,Rol autorizado para anular la acción de parada, +Role allowed to bypass Credit Limit,Rol permitido para eludir el límite de crédito, +Root,Raíz, +"Root Type for {0} must be one of the Asset, Liability, Income, Expense and Equity","El tipo de raíz para {0} debe ser uno de los siguientes: Activo, Pasivo, Ingreso, Gasto y Patrimonio", +Round Free Qty,Redondear cantidad gratis, +Round Off Tax Amount,Redondear el importe del impuesto, +Round Tax Amount Row-wise,Redondear el importe del impuesto por filas, +Rounding Loss Allowance,Redondeo de la indemnización por pérdidas, +Rounding Loss Allowance should be between 0 and 1,El margen de pérdida por redondeo debe estar entre 0 y 1, +Rounding gain/loss Entry for Stock Transfer,Redondeo de ganancias/pérdidas Entrada para traslado de existencias, +Row #,Fila #, +Row # {0}:,Fila # {0}:, +Row #{0}: A reorder entry already exists for warehouse {1} with reorder type {2}.,Fila #{0}: Ya existe una entrada de reorden para el almacén {1} con el tipo de reorden {2}., +Row #{0}: Acceptance Criteria Formula is incorrect.,Fila #{0}: La fórmula de los criterios de aceptación es incorrecta., +Row #{0}: Acceptance Criteria Formula is required.,Fila #{0}: Se requiere la fórmula de criterios de aceptación., +Row #{0}: Accepted Warehouse and Rejected Warehouse cannot be same,Fila #{0}: Almacén Aceptado y Almacén Rechazado no puede ser el mismo, +Row #{0}: Accepted Warehouse is mandatory for the accepted Item {1},Fila #{0}: El almacén aceptado es obligatorio para el artículo aceptado {1}, +Row #{0}: Allocated Amount cannot be greater than Outstanding Amount of Payment Request {1},Fila #{0}: El Importe Asignado no puede ser mayor que el Importe Pendiente de la Solicitud de Pago {1}, +Row #{0}: Allocated amount:{1} is greater than outstanding amount:{2} for Payment Term {3},Fila #{0}: Importe asignado:{1} es superior al importe pendiente:{2} para el plazo de pago {3}, +Row #{0}: Amount must be a positive number,Fila #{0}: El importe debe ser un número positivo, +Row #{0}: BOM is not specified for subcontracting item {0},Fila #{0}: La lista de materiales no está especificada para el artículo de subcontratación {0}, +Row #{0}: Batch No {1} is already selected.,Fila #{0}: El lote nº {1} ya está seleccionado., +Row #{0}: Cannot allocate more than {1} against payment term {2},Fila #{0}: No se puede asignar más de {1} contra la condición de pago {2}, +Row #{0}: Cannot transfer more than Required Qty {1} for Item {2} against Job Card {3},Fila #{0}: No se puede transferir más de la cantidad requerida {1} para el artículo {2} contra la tarjeta de trabajo {3}, +Row #{0}: Consumed Asset {1} cannot be Draft,Fila #{0}: El activo consumido {1} no puede ser borrador, +Row #{0}: Consumed Asset {1} cannot be cancelled,Fila #{0}: El activo consumido {1} no puede estar cancelado, +Row #{0}: Consumed Asset {1} cannot be the same as the Target Asset,Fila #{0}: El activo consumido {1} no puede ser el mismo que el activo de destino, +Row #{0}: Consumed Asset {1} cannot be {2},Fila #{0}: El activo consumido {1} no puede ser {2}, +Row #{0}: Consumed Asset {1} does not belong to company {2},Fila #{0}: El activo consumido {1} no pertenece a la empresa {2}, +Row #{0}: Cumulative threshold cannot be less than Single Transaction threshold,Fila #{0}: El umbral acumulativo no puede ser menor que el umbral de transacción única, +Row #{0}: Dates overlapping with other row,Fila #{0}: Fechas superpuestas con otras filas, +Row #{0}: Default BOM not found for FG Item {1},Fila #{0}: No se encontró la lista de materiales predeterminada para el artículo FG {1}, +Row #{0}: Expense Account not set for the Item {1}. {2},Fila #{0}: Cuenta de gastos no configurada para el artículo {1}. {2}, +Row #{0}: Finished Good Item Qty can not be zero,Fila #{0}: La cantidad de artículos terminados no puede ser cero, +Row #{0}: Finished Good Item is not specified for service item {1},Fila #{0}: No se especifica el artículo bueno acabado para el artículo de servicio {1}, +Row #{0}: Finished Good Item {1} must be a sub-contracted item,Fila #{0}: Artículo terminado. El artículo {1} debe ser un artículo subcontratado., +Row #{0}: Finished Good reference is mandatory for Scrap Item {1}.,Fila #{0}: La referencia de producto terminado es obligatoria para el artículo de desecho {1}., +Row #{0}: For {1} Clearance date {2} cannot be before Cheque Date {3},Fila #{0}: Para {1} La fecha de liquidación {2} no puede ser anterior a la fecha del cheque {3}, +"Row #{0}: For {1}, you can select reference document only if account gets credited","Fila #{0}: Para {1}, puede seleccionar el documento de referencia solo si se acredita la cuenta", +"Row #{0}: For {1}, you can select reference document only if account gets debited","Fila #{0}: Para {1}, puede seleccionar el documento de referencia solo si se debita la cuenta", +Row #{0}: From Date cannot be before To Date,Fila #{0}: La fecha de inicio no puede ser anterior a la fecha de finalización, +Row #{0}: Item {1} does not exist,Fila #{0}: El artículo {1} no existe, +"Row #{0}: Item {1} has been picked, please reserve stock from the Pick List.","Fila #{0}: El artículo {1} ha sido recogido, por favor reserve existencias de la Lista de Recogida.", +Row #{0}: Item {1} is not a service item,Fila #{0}: El artículo {1} no es un artículo de servicio, +Row #{0}: Item {1} is not a stock item,Fila #{0}: El artículo {1} no es un artículo de stock, +Row #{0}: Only {1} available to reserve for the Item {2},Fila #{0}: Solo {1} disponible para reservar para el artículo {2}, +Row #{0}: Please select Item Code in Assembly Items,"Fila #{0}: Por favor, seleccione el código del artículo en Artículos de ensamblaje", +Row #{0}: Please select the BOM No in Assembly Items,"Fila #{0}: Por favor, seleccione el nº de lista de materiales en Artículos de ensamblaje", +Row #{0}: Please select the Sub Assembly Warehouse,"Fila #{0}: Por favor, seleccione el Almacén de Sub-montaje", +Row #{0}: Please update deferred revenue/expense account in item row or default account in company master,"Fila #{0}: Por favor, actualice la cuenta de ingresos/gastos diferidos en la fila de artículos o la cuenta por defecto en el maestro de empresas", +Row #{0}: Qty increased by {1},Fila #{0}: Cantidad aumentada en {1}, +Row #{0}: Qty must be a positive number,Fila #{0}: La cantidad debe ser un número positivo, +Row #{0}: Qty should be less than or equal to Available Qty to Reserve (Actual Qty - Reserved Qty) {1} for Iem {2} against Batch {3} in Warehouse {4}.,Fila #{0}: La cantidad debe ser menor o igual a la cantidad disponible para reservar (cantidad real - cantidad reservada) {1} para Artículo {2} contra el lote {3} en el almacén {4}., +Row #{0}: Quantity to reserve for the Item {1} should be greater than 0.,Fila #{0}: La cantidad a reservar para el artículo {1} debe ser superior a 0., +Row #{0}: Rate must be same as {1}: {2} ({3} / {4}),Fila #{0}: La tasa debe ser la misma que {1}: {2} ({3} / {4}), +Row #{0}: Received Qty must be equal to Accepted + Rejected Qty for Item {1},Fila #{0}: La cantidad recibida debe ser igual a la cantidad aceptada + rechazada para el artículo {1}, +Row #{0}: Rejected Qty cannot be set for Scrap Item {1}.,Fila #{0}: No se puede establecer la cantidad rechazada para el artículo de rechazo {1}., +Row #{0}: Rejected Warehouse is mandatory for the rejected Item {1},Fila #{0}: El almacén rechazado es obligatorio para el artículo rechazado {1}, +Row #{0}: Scrap Item Qty cannot be zero,Fila #{0}: La cantidad de artículos desechados no puede ser cero, +"Row #{0}: Selling rate for item {1} is lower than its {2}. + Selling {3} should be atleast {4}.

Alternatively, + you can disable selling price validation in {5} to bypass + this validation.","Fila #{0}: El precio de venta del artículo {1} es inferior a su {2}. + Venta {3} debe ser al menos {4}.

Alternativamente, + puede desactivar la validación del precio de venta en {5} para saltarse + esta validación.", +Row #{0}: Serial No {1} for Item {2} is not available in {3} {4} or might be reserved in another {5}.,Fila #{0}: El número de serie {1} del artículo {2} no está disponible en {3} {4} o podría estar reservado en otro {5}., +Row #{0}: Serial No {1} is already selected.,Fila #{0}: El número de serie {1} ya está seleccionado., +Row #{0}: Start Time and End Time are required,Fila #{0}: Se requiere hora de inicio y hora de fin, +Row #{0}: Start Time must be before End Time,Fila #{0}: La hora de inicio debe ser antes del fin, +Row #{0}: Status is mandatory,Fila #{0}: El estado es obligatorio, +Row #{0}: Stock cannot be reserved for Item {1} against a disabled Batch {2}.,Fila #{0}: No se puede reservar stock para el artículo {1} contra un lote deshabilitado {2}., +Row #{0}: Stock cannot be reserved for a non-stock Item {1},Fila #{0}: No se puede reservar stock para un artículo que no es de stock {1}, +Row #{0}: Stock cannot be reserved in group warehouse {1}.,Fila #{0}: No se pueden reservar existencias en el almacén de grupo {1}., +Row #{0}: Stock is already reserved for the Item {1}.,Fila #{0}: Ya hay stock reservado para el artículo {1}., +Row #{0}: Stock is reserved for item {1} in warehouse {2}.,Fila #{0}: Hay stock reservado para el artículo {1} en el almacén {2}., +Row #{0}: Stock not available to reserve for Item {1} against Batch {2} in Warehouse {3}.,Fila #{0}: Stock no disponible para reservar para el artículo {1} contra el lote {2} en el almacén {3}., +Row #{0}: Stock not available to reserve for the Item {1} in Warehouse {2}.,Fila #{0}: Stock no disponible para reservar para el artículo {1} en el almacén {2}., +Row #{0}: The warehouse {1} is not a child warehouse of a group warehouse {2},Fila #{0}: El almacén {1} no es un almacén secundario de un almacén de grupo {2}, +Row #{0}: You cannot use the inventory dimension '{1}' in Stock Reconciliation to modify the quantity or valuation rate. Stock reconciliation with inventory dimensions is intended solely for performing opening entries.,Fila #{0}: No se puede utilizar la dimensión de inventario '{1}' en la conciliación de stock para modificar la cantidad o la tasa de valoración. La conciliación de stock con las dimensiones de inventario está destinada únicamente a realizar asientos de apertura., +Row #{0}: You must select an Asset for Item {1}.,Fila #{0}: Debe seleccionar un activo para el artículo {1}., +Row #{0}: {1} is not a valid reading field. Please refer to the field description.,Fila #{0}: {1} no es un campo de lectura válido. Consulte la descripción del campo., +Row #{0}: {1} of {2} should be {3}. Please update the {1} or select a different account.,"Fila #{0}: {1} de {2} debería ser {3}. Por favor, actualice {1} o seleccione una cuenta diferente.", +Row #{1}: Warehouse is mandatory for stock Item {0},Fila #{1}: El Almacén es obligatorio para el producto en stock {0}, +Row #{}: Finance Book should not be empty since you're using multiple.,"Fila #{}: Libro de Finanzas no debe estar vacío, ya que está utilizando múltiples.", +Row #{}: Please use a different Finance Book.,"Fila #{}: Por favor, utilice un Libro de Finanzas diferente.", +Row #{}: The original Invoice {} of return invoice {} is not consolidated.,Fila #{}: La factura original {} de la factura de devolución {} no está consolidada., +Row #{}: item {} has been picked already.,Fila #{}: el artículo {} ya ha sido seleccionado., +Row #{}: {} {} doesn't belong to Company {}. Please select valid {}.,"Fila #{}: {} {} no pertenece a la empresa {}. Por favor, seleccione una {} válida.", +Row No {0}: Warehouse is required. Please set a Default Warehouse for Item {1} and Company {2},Fila n.° {0}: Se requiere almacén. Establezca un almacén predeterminado para el artículo {1} y la empresa {2}, +Row Number,Número de fila, +Row {0},Fila {0}, +"Row {0} picked quantity is less than the required quantity, additional {1} {2} required.","Fila {0} la cantidad recogida es inferior a la requerida, se requiere {1} {2} adicional.", +Row {0}# Item {1} cannot be transferred more than {2} against {3} {4},Fila {0}# El artículo {1} no puede transferirse más que {2} contra {3} {4}, +Row {0}# Item {1} not found in 'Raw Materials Supplied' table in {2} {3},Fila {0}# El artículo {1} no se encontró en la tabla 'Materias primas suministradas' en {2} {3}, +Row {0}: Accepted Qty and Rejected Qty can't be zero at the same time.,Fila {0}: La cantidad aceptada y la cantidad rechazada no pueden ser cero al mismo tiempo., +Row {0}: Account {1} and Party Type {2} have different account types,Fila {0}: La cuenta {1} y el tipo de entidad {2} tienen diferentes tipos de cuenta, +Row {0}: Allocated amount {1} must be less than or equal to invoice outstanding amount {2},Fila {0}: El importe asignado {1} debe ser inferior o igual al importe pendiente de la factura {2}, +Row {0}: Allocated amount {1} must be less than or equal to remaining payment amount {2},Fila {0}: El importe asignado {1} debe ser inferior o igual al importe de pago restante {2}, +"Row {0}: As {1} is enabled, raw materials cannot be added to {2} entry. Use {3} entry to consume raw materials.","Fila {0}: Como {1} está activada, no se pueden añadir materias primas a la entrada {2} . Utilice la entrada {3} para consumir materias primas.", +Row {0}: Both Debit and Credit values cannot be zero,Fila {0}: Tanto el Debe como el Haber no pueden ser cero, +Row {0}: Cost Center {1} does not belong to Company {2},Fila {0}: El centro de costes {1} no pertenece a la empresa {2}, +Row {0}: Either Delivery Note Item or Packed Item reference is mandatory.,Fila {0}: La referencia del artículo de la nota de entrega o del artículo empaquetado es obligatoria., +Row {0}: Expense Head changed to {1} as no Purchase Receipt is created against Item {2}.,Fila {0}: el encabezado de gasto cambió a {1} ya que no se crea ningún recibo de compra para el artículo {2}., +Row {0}: Expense Head changed to {1} because account {2} is not linked to warehouse {3} or it is not the default inventory account,Fila {0}: Cabecera de Gasto cambiada a {1} porque la cuenta {2} no está vinculada al almacén {3} o no es la cuenta de inventario por defecto, +Row {0}: Expense Head changed to {1} because expense is booked against this account in Purchase Receipt {2},Fila {0}: Cabecera de Gasto cambiada a {1} porque el gasto se contabiliza contra esta cuenta en el Recibo de Compra {2}, +Row {0}: From Warehouse is mandatory for internal transfers,Fila {0}: Desde el almacén es obligatorio para transferencias internas, +Row {0}: Item Tax template updated as per validity and rate applied,Fila {0}: Plantilla de impuesto del artículo actualizada según la validez y la tasa aplicada, +Row {0}: Item rate has been updated as per valuation rate since its an internal stock transfer,"Fila {0}: La tarifa del artículo se ha actualizado según la tarifa de valoración, ya que se trata de una transferencia de stock interna", +Row {0}: Item {1} must be a stock item.,Fila {0}: El artículo {1} debe ser un artículo de stock., +Row {0}: Item {1} must be a subcontracted item.,Fila {0}: El artículo {1} debe ser un artículo subcontratado., +Row {0}: Packed Qty must be equal to {1} Qty.,Fila {0}: La cantidad embalada debe ser igual a la cantidad {1} ., +Row {0}: Packing Slip is already created for Item {1}.,Fila {0}: Ya se creó el albarán para el artículo {1}., +Row {0}: Payment Term is mandatory,Fila {0}: El plazo de pago es obligatorio, +Row {0}: Please provide a valid Delivery Note Item or Packed Item reference.,Fila {0}: proporcione una referencia de artículo de nota de entrega o artículo empaquetado válida., +Row {0}: Please select a BOM for Item {1}.,"Fila {0}: Por favor, seleccione una lista de materiales para el artículo {1}.", +Row {0}: Please select an active BOM for Item {1}.,"Fila {0}: Por favor, seleccione una lista de materiales activa para el artículo {1}.", +Row {0}: Please select an valid BOM for Item {1}.,"Fila {0}: Por favor, seleccione una lista de materiales válida para el artículo {1}.", +Row {0}: Project must be same as the one set in the Timesheet: {1}.,Fila {0}: El proyecto debe ser el mismo que el establecido en la hoja de horas: {1}., +Row {0}: Purchase Invoice {1} has no stock impact.,Fila {0}: La factura de compra {1} no tiene impacto en el stock., +Row {0}: Qty cannot be greater than {1} for the Item {2}.,Fila {0}: La cantidad no puede ser mayor que {1} para el artículo {2}., +Row {0}: Qty in Stock UOM can not be zero.,Fila {0}: La UdM de cantidad en stock no puede ser cero., +Row {0}: Qty must be greater than 0.,Fila {0}: La cantidad debe ser mayor que 0., +Row {0}: Shift cannot be changed since the depreciation has already been processed,Fila {0}: No se puede cambiar el turno porque ya se ha procesado la amortización, +Row {0}: Target Warehouse is mandatory for internal transfers,Fila {0}: El almacén de destino es obligatorio para las transferencias internas, +"Row {0}: To set {1} periodicity, difference between from and to date must be greater than or equal to {2}","Fila {0}: Para establecer la periodicidad {1} , la diferencia entre la fecha de inicio y la de finalización debe ser mayor o igual a {2}", +Row {0}: Total Number of Depreciations cannot be less than or equal to Opening Number of Booked Depreciations,Fila {0}: El número total de amortizaciones no puede ser inferior o igual al número inicial de amortizaciones contabilizadas, +Row {0}: {1} account already applied for Accounting Dimension {2},Fila {0}: {1} cuenta ya aplicada para la Dimensión Contable {2}, +Row {0}: {1} {2} cannot be same as {3} (Party Account) {4},Fila {0}: {1} {2} no puede ser la misma que {3} (Cuenta de la Entidad) {4}, +Row {0}: {2} Item {1} does not exist in {2} {3},Fila {0}: {2} El elemento {1} no existe en {2} {3}, +Row({0}): Outstanding Amount cannot be greater than actual Outstanding Amount {1} in {2},Fila({0}): El importe pendiente no puede ser mayor que el importe pendiente real {1} en {2}, +Rows with Same Account heads will be merged on Ledger,Las líneas con los mismos encabezamientos de cuenta se fusionarán en el Libro Mayor, +Rows: {0} have 'Payment Entry' as reference_type. This should not be set manually.,Filas: {0} tienen 'Entrada de pago' como reference_type. No debe establecerse manualmente., +Rows: {0} in {1} section are Invalid. Reference Name should point to a valid Payment Entry or Journal Entry.,Las filas {0} en la sección {1} no son válidas. El nombre de referencia debe apuntar a una entrada de pago o de diario válida., +Run parallel job cards in a workstation,Ejecutar tarjetas de trabajo en paralelo en una estación de trabajo, +Running,Ejecutando, +SCO Supplied Item,Artículo suministrado por SCO, +SLA Fulfilled On,SLA completado el, +SLA Fulfilled On Status,SLA cumplido en estado, +SLA Paused On,SLA en pausa, +SLA will be applied if {1} is set as {2}{3},SLA se aplicará si {1} se establece como {2}{3}, +SLA will be applied on every {0},El SLA se aplicará en cada {0}, +SMS Settings,Ajustes de SMS, +SO Total Qty,SO Cantidad total, +Salary Currency,Divisa de salario, +Sales Incoming Rate,Tasa de entrada de ventas, +Sales Invoice {0} must be deleted before cancelling this Sales Order,La factura de venta {0} debe eliminarse antes de cancelar esta orden de venta, +Sales Order Packed Item,Artículo empaquetado de la orden de venta, +Sales Order Reference,Referencia del pedido de venta, +Sales Order Status,Estado del pedido de venta, +"Sales Order {0} already exists against Customer's Purchase Order {1}. To allow multiple Sales Orders, Enable {2} in {3}","El Pedido de Venta {0} ya existe contra el Pedido de Compra del Cliente {1}. Para permitir múltiples Pedidos de Venta, habilite {2} en {3}.", +Sales Partner ,Socio de ventas , +Sales Partner Item,Artículo de socio de ventas, +Sales Partner Target Variance Based On Item Group,Variación de objetivos del socio de ventas según el grupo de artículos, +Sales Pipeline Analytics,Análisis del flujo de ventas, +Sales Update Frequency in Company and Project,Frecuencia de actualización de ventas en empresa y proyecto, +Sales Value,Valor de las ventas, +Salvage Value Percentage,Porcentaje de Valor de Recuperación, +Same item and warehouse combination already entered.,Ya se ha introducido la misma combinación de artículo y almacén., +Savings,Ahorros, +Scan Batch No,Escanear Lote No, +Scan Mode,Modo de escaneo, +Scan Serial No,Escanear número de serie, +Scan barcode for item {0},Escanee el código de barras del artículo {0}, +"Scan mode enabled, existing quantity will not be fetched.","Modo de escaneo habilitado, la cantidad existente no se obtendrá.", +Scanned Quantity,Cantidad escaneada, +Scheduled Time Logs,Registros de tiempo programado, +Scheduler is Inactive. Can't trigger job now.,El planificador está inactivo. No se puede activar el trabajo ahora., +Scheduler is Inactive. Can't trigger jobs now.,El planificador está inactivo. No se pueden activar los trabajos ahora., +Scheduler is inactive. Cannot enqueue job.,El planificador está inactivo. No se puede poner en cola el trabajo., +Scheduler is inactive. Cannot merge accounts.,El planificador está inactivo. No se pueden combinar cuentas., +Scheduling,Planificación, +Select Alternative Items for Sales Order,Seleccionar ítems alternativos para Orden de Venta, +Select View,Seleccione Vista, +Select an item from each set to be used in the Sales Order.,Seleccione un ítem de cada conjunto para usarlo en la Orden de Venta., +Send Attached Files,Enviar Archivos Adjuntos, +Send Document Print,Enviar Impresión de Documento, +Service Expenses,Gastos de servicio, +Service Item,Artículo de servicio, +Set Default Supplier,Establecer Proveedor Predeterminado, +Set Quantity,Establecer cantidad, +Set Warehouse,Establecer Almacén, +Shipment,Envío, +Shipment Amount,Monto del envío, +Shipment Delivery Note,Nota de Entrega de envío, +Shipment ID,ID de Envío, +Shipment Information,Información del Envío, +Shipment Type,Tipo de Envío, +Shipment details,Detalles del envío, +Show Failed Logs,Mostrar registros fallidos, +Show Preview,Mostrar Vista Previa, +Show Remarks,Mostrar Observaciones, +Skipped,Omitido, +"Skipping {0} of {1}, {2}","Saltando {0} de {1}, {2}", +Sold by,Vendido por, +Spacer,Espaciador, +Start Deletion,Iniciar eliminación, +Start Import,Comience a Importar, +Sub Operation,Sub operación, +Sub Operations,Sub operaciones, +Subcontracting Settings,Configuración de Subcontratación, +Subdivision,Subdivisión, +Submit After Import,Validar después de la importación, +Successfully imported {0} record.,Importado correctamente {0} registro., +Successfully imported {0} records.,Importado correctamente {0} registros., +Successfully linked to Customer,Vinculado exitosamente al Cliente, +Successfully linked to Supplier,Vinculado exitosamente al Proveedor, +Successfully merged {0} out of {1}.,Fusionado satisfactoriamente {0} de {1}., +Successfully updated {0},Actualizado exitosamente {0}, +"Successfully updated {0} record out of {1}. Click on Export Errored Rows, fix the errors and import again.","Registro {0} actualizado correctamente de {1}. Haga clic en Exportar filas con errores, corrija los errores e importe nuevamente.", +Successfully updated {0} record.,Registro {0} actualizado correctamente., +"Successfully updated {0} records out of {1}. Click on Export Errored Rows, fix the errors and import again.","Actualizado correctamente los registros {0} de {1}. Haga clic en Exportar filas Erroradas, corrija los errores e importe de nuevo.", +Successfully updated {0} records.,Registros {0} actualizados correctamente., +Supplied Item,Producto suministrado, +Supplier Address Details,Detalles de Dirección del Proveedor, +Supplier Info,Info. Proveedor, +Supplier Invoice,Factura de Proveedor, +Supplier Item,Producto del Proveedor, +Supplier Portal Users,Usuarios del Portal del Proveedor, +Supplier Primary Address,Dirección principal del Proveedor, +Supplier Primary Contact,Contacto principal del Proveedor, +Sync Now,Sincronizar ahora, +Sync Started,Sincronización Iniciada, +System Settings,Configuración del Sistema, +Tax Amount,Importe de Impuestos, +Tax Masters,Maestros Fiscales, +Tax Settings,Configuración de Impuestos, +Team,Equipo, +Template Options,Opciones de plantilla, +Template Warnings,Advertencias de plantilla, +Terms & Conditions,Términos y Condiciones, +Terms Template,Plantilla de Términos, +Territory Wise Sales,Ventas por territorios, +The Condition '{0}' is invalid,La Condición '{0}' no es válida, +"The sync has started in the background, please check the {0} list for new records.","La sincronización se ha iniciado en segundo plano, por favor compruebe en la lista {0} si hay nuevos registros.", +The task has been enqueued as a background job.,La tarea se ha puesto en cola como trabajo en segundo plano., +There was an error creating Bank Account while linking with Plaid.,Se ha producido un error al crear la cuenta bancaria mientras se vinculaba con Plaid., +There was an error syncing transactions.,Se ha producido un error al sincronizar las transacciones., +There was an error updating Bank Account {} while linking with Plaid.,Se ha producido un error al actualizar la cuenta bancaria {} mientras se vinculaba con Plaid., +There was an issue connecting to Plaid's authentication server. Check browser console for more information,Se ha producido un problema al conectar con el servidor de autenticación de Plaid. Compruebe la consola del navegador para obtener más información, +Time in mins,Tiempo en min, +Time in mins.,Tiempo en minutos., +Time slot is not available,La franja horaria no está disponible, +To Doctype,A Doctype, +Total Incoming Value (Receipt),Valor Total Entrante (Recepción), +Total Issues,Total de Incidencias, +Total Outgoing Value (Consumption),Valor Total Saliente (Consumo), +Total Supplied Qty,Cant. Total suministrada, +Total Time (in Mins),Tiempo total (en minutos), +Total Value,Valor Total, +Total Value Difference (Incoming - Outgoing),Diferencia de valor total (entrante - saliente), +Total Views,Total de visualizaciones, +Total Warehouses,Total Almacenes, +Tracking Status,Estado de seguimiento, +Tracking Status Info,Información de estado de seguimiento, +Tracking URL,URL de Seguimiento, +Transaction Settings,Configuración de Transacciones, +Transaction currency: {0} cannot be different from Bank Account({1}) currency: {2},Moneda de la transacción: {0} no puede ser diferente de la moneda de la cuenta bancaria ({1}): {2}, +Transit,Tránsito, +Transit Entry,Entrada de Tránsito, +Type of Transaction,Tipo de Transacción, +UAE VAT 201,IVA EAU 201, +Unable to find variable:,No se puede encontrar la variable:, +Unassigned Qty,Cant. Sin asignar, +Unit of Measure (UOM),Unidad de Medida (UdM), +Unlinked,Desvincular, +Unqualified,No calificada, +Unrealized Profit / Loss Account,Cuenta de Pérdidas/Ganancias no realizada, +Up,Arriba, +Update Existing Records,Actualizar registros existentes, +Update Rate as per Last Purchase,Actualizar tasa según la última compra, +Update Total Purchase Cost,Actualizar Costo Total de Compra, +Updating Work Order status,Actualizando estado de la Orden de Trabajo, +"Updating {0} of {1}, {2}","Actualización {0} de {1}, {2}", +Upload Bank Statement,Cargar extracto bancario, +Use Company Default Round Off Cost Center,Utilizar el Centro de Costes de redondeo por defecto de la Compañía, +Use Company default Cost Center for Round off,Utilizar el Centro de Costos por defecto de la compañía para el redondeo, +Use HTTP Protocol,Usar protocolo HTTP, +Use Transaction Date Exchange Rate,Usar el tipo de cambio de fecha de la transacción, +User {0}: Removed Employee Self Service role as there is no mapped employee.,"Usuario {0}: Eliminado el rol de Autoservicio del Empleado, ya que no hay ningún empleado mapeado.", +User {0}: Removed Employee role as there is no mapped employee.,"Usuario {0}: Se eliminó el rol de Empleado, ya que no hay ningún empleado asignado.", +VAT Accounts,Cuentas de IVA, +VAT Amount (AED),Importe del IVA (AED), +VAT Audit Report,Informe de auditoría del IVA, +Valuation Rate (In / Out),Tasa de Valoración (Entrada/Salida), +Value Change,Cambio de Valor, +Voucher,Comprobante, +"WARNING: Exotel app has been separated from ERPNext, please install the app to continue using Exotel integration.",ADVERTENCIA: La aplicación Exotel se ha separado de ERPNext; instale la aplicación para continuar usando la integración de Exotel., +Waiting for payment...,Esperando Pago..., +Warehouse Capacity for Item '{0}' must be greater than the existing stock level of {1} {2}.,Capacidad del Almacén para el Producto '{0}' debe ser mayor que el nivel de stock existente de {1} {2}., +Warehouse Details,Detalle del Almacén, +Warehouse Disabled?,¿Almacén deshabilitado?, +Warehouse Settings,Configuración del Almacén, +Warehouse Wise Stock Balance,Saldo de existencias en almacén, +Warehouse wise Stock Value,Valor de las existencias en función del almacén, +Warehouse {0} does not belong to Company {1}.,Almacén {0} no pertenece a la Compañía {1}., +Warning!,¡Advertencia!, +Watch Video,Ver video, +Website Script,Script del Sitio Web, +Website Theme,Tema del Sitio Web, +Week {0} {1},Semana {0} {1}, +Weight (kg),Peso (kg), +Width (cm),Ancho (cm), +Workflow,Flujos de Trabajo, +Workflow Action,Acciones de flujos de trabajo, +Workflow State,Estados de flujos de trabajo, +Workstation Status,Estado de la estación de trabajo, +Workstation Type,Tipo de estación de trabajo, +Workstations,Estación de trabajo, +Wrong Company,Compañía incorrecta, +You haven't created a {0} yet,Aún no ha creado un {0}, +Your Name (required),Su nombre (requerido), +`Allow Negative rates for Items`,`Permitir precios Negativos para los Productos`, +description,descripción, +fieldname,nombre del campo, +variance,variación, +{0} and {1},{0} y {1}, +{0} is already running for {1},{0} ya se está ejecutando por {1}, +{0} {1} Manually,{0} {1} Manualmente, +{0} {1} Partially Reconciled,{0} {1} Parcialmente reconciliado, +{0} {1}: Account {2} is a Group Account and group accounts cannot be used in transactions,{0} {1}: La cuenta {2} es una Cuenta de Grupo y las Cuentas de Grupo no pueden utilizarse en transacciones, +{0} {1}: Cost Center {2} is a group cost center and group cost centers cannot be used in transactions,{0} {1}: El Centro de Costos {2} es un Centro de Costos de Grupo y los Centros de Costos de Grupo no pueden utilizarse en transacciones, +{0}% of total invoice value will be given as discount.,{0}% del valor total de la factura se otorgará como descuento., +{} Available,{} Disponible, +{} Assigned,{} Asignado, +{} Available,{} Disponible, +{} Open,{} Abierto, +{} {} is already linked with another {},{} {} ya está vinculado con otro {}, +{} {} is already linked with {} {},{} {} ya está vinculado con {} {}, diff --git a/erpnext/translations/fa.csv b/erpnext/translations/fa.csv index 7c2e8544c9c..f65226bf761 100644 --- a/erpnext/translations/fa.csv +++ b/erpnext/translations/fa.csv @@ -8743,3 +8743,2535 @@ WhatsApp,واتس اپ, Make a call,تماس بگیر, Approve,تایید, Reject,رد کردن, + Address, آدرس, + Amount, میزان, + Is Child Table, جدول فرزند است, + Name, نام, + Rate, نرخ, + Summary, خلاصه, +"""SN-01::10"" for ""SN-01"" to ""SN-10""","""SN-01::10"" برای ""SN-01"" تا ""SN-10""", +# In Stock,# در موجودی, +# Req'd Items,# آیتم‌های درخواست شده, +% Finished Item Quantity,% مقدار آیتم تمام شده, +% Occupied,٪ مشغول, +% Picked,% انتخاب شده, +% Process Loss,% از دست دادن فرآیند, +% Returned,% برگردانده شده, +'Account' in the Accounting section of Customer {0},حساب در بخش حسابداری مشتری {0}, +'Allow Multiple Sales Orders Against a Customer's Purchase Order',اجازه دادن سفارش‌های فروش چندگانه در برابر سفارش خرید مشتری, +'Default {0} Account' in Company {1},«حساب پیش‌فرض {0}» در شرکت {1}, +'To Package No.' cannot be less than 'From Package No.',"'به شماره بسته.' نمی تواند کمتر از ""از شماره بسته"" باشد.", +'{0}' account is already used by {1}. Use another account.,حساب '{0}' قبلاً توسط {1} استفاده شده است. از حساب دیگری استفاده کنید., +'{0}' should be in company currency {1}.,"""{0}"" باید به ارز شرکت {1} باشد.", +(A) Qty After Transaction,(A) تعداد پس از تراکنش, +(B) Expected Qty After Transaction,(ب) تعداد مورد انتظار پس از تراکنش, +(C) Total Qty in Queue,(C) تعداد کل در صف, +(C) Total qty in queue,(C) تعداد کل در صف, +(D) Balance Stock Value,(D) ارزش موجودی, +(E) Balance Stock Value in Queue,(E) موجودی ارزش موجودی در صف, +(F) Change in Stock Value,(F) تغییر در ارزش موجودی, +(G) Sum of Change in Stock Value,(ز) مجموع تغییر در ارزش موجودی, +(H) Change in Stock Value (FIFO Queue),(H) تغییر در ارزش موجودی (صف FIFO), +(H) Valuation Rate,(H) نرخ ارزش گذاری, +(I) Valuation Rate,(I) نرخ ارزش گذاری, +(J) Valuation Rate as per FIFO,(J) نرخ ارزیابی مطابق با FIFO, +(K) Valuation = Value (D) ÷ Qty (A),(K) ارزش = ارزش (D) ÷ تعداد (A), +", with the inventory {0}: {1}",، با موجودی {0}: {1}, +0-30 Days,0-30 روز, +3 Yearly,3 سالانه, +30-60 Days,30-60 روز, +60-90 Days,60-90 روز, +90 Above,90 بالا, +"
Other Details
","
جزئیات دیگر
", +"
No Matching Bank Transactions Found
","
هیچ تراکنش بانکی منطبقی پیدا نشد
", +"
+

All dimensions in centimeter only

+
","
+

همه ابعاد فقط به سانتی‌متر

+
", +"

About Product Bundle

+ +

Aggregate group of Items into another Item. This is useful if you are bundling a certain Items into a package and you maintain stock of the packed Items and not the aggregate Item.

+

The package Item will have Is Stock Item as No and Is Sales Item as Yes.

+

Example:

+

If you are selling Laptops and Backpacks separately and have a special price if the customer buys both, then the Laptop + Backpack will be a new Product Bundle Item.

","

درباره باندل محصول

+ +

گروهی از آیتم‌ها را در آیتم دیگری جمع آوری کنید. اگر آیتم‌های خاصی را در یک باندل قرار دهید و موجودی آیتم‌های بسته بندی شده را حفظ کنید و نه آیتم‌های جمع آوری شده، مفید است.

+

بسته آیتم دارای آیتم موجودی است به عنوان خیر و آیتم فروش است به عنوان بله خواهد بود. .

+

مثال:

+

اگر لپ‌تاپ و کوله‌پشتی را جداگانه می‌فروشید و اگر مشتری هر دو را بخرد، قیمت ویژه‌ای دارید، لپ‌تاپ + کوله‌پشتی یک کالای باندل محصول جدید خواهد بود.

", +"
Or
","
یا
", +"","", +"","", +"","", +"Masters & Reports","مستندات و گزارش ها", +"Quick Access","دسترسی سریع", +"Reports & Masters","گزارش ها و مستندات", +"Reports & Masters","گزارش ها و مستندات", +"Settings","تنظیمات", +"Shortcuts","میانبرها", +"Your Shortcuts + + + + + + ","میانبرهای شما + + + + + + ", +"Your Shortcuts","میانبرهای شما", +Grand Total: {0},جمع کل: {0}, +Outstanding Amount: {0},مبلغ معوق: {0}, +A - B,الف - ب, +A - C,الف - ج, +A Holiday List can be added to exclude counting these days for the Workstation.,فهرست تعطیلات را می توان اضافه کرد تا شمارش این روزها برای ایستگاه کاری حذف شود., +A Packing Slip can only be created for Draft Delivery Note.,یک برگه بسته بندی فقط می تواند برای پیش نویس یادداشت تحویل ایجاد شود., +"A Price List is a collection of Item Prices either Selling, Buying, or both",لیست قیمت مجموعه ای از قیمت های آیتم‌های فروش، خرید یا هر دو است, +A Reconciliation Job {0} is running for the same filters. Cannot reconcile now,یک کار تطبیق {0} برای همین فیلترها در حال اجرا است. الان نمیشه تطبیق کرد, +A Transaction Deletion Document: {0} is triggered for {0},یک سند حذف تراکنش: {0} برای {0} فعال می شود, +A customer must have primary contact email.,مشتری باید ایمیل تماس اصلی داشته باشد., +A driver must be set to submit.,یک راننده باید برای ارسال تنظیم شود., +A template with tax category {0} already exists. Only one template is allowed with each tax category,الگویی با دسته مالیاتی {0} از قبل وجود دارد. فقط یک الگو با هر دسته مالیات مجاز است, +API Details,جزئیات API, +AWB Number,شماره AWB, +Abbreviation: {0} must appear only once,مخفف: {0} باید فقط یک بار ظاهر شود, +About Us Settings,تنظیمات درباره ما, +About {0} minute remaining,حدود {0} دقیقه باقی مانده است, +About {0} minutes remaining,حدود {0} دقیقه باقی مانده است, +About {0} seconds remaining,حدود {0} ثانیه باقی مانده است, +Acceptance Criteria Formula,فرمول معیارهای پذیرش, +Acceptance Criteria Value,مقدار معیارهای پذیرش, +Accepted Qty in Stock UOM,تعداد پذیرفته شده در انبار UOM, +Access Key,کلید دسترسی, +Access Key is required for Service Provider: {0},کلید دسترسی برای ارائه‌دهنده خدمات لازم است: {0}, +Account Balance (From),تراز حساب (از), +Account Balance (To),تراز حساب (به), +Account Closing Balance,تراز اختتامیه حساب, +Account Currency (From),ارز حساب (از), +Account Currency (To),ارز حساب (به), +Account Opening Balance,تراز افتتاحیه حساب, +Account not Found,حساب پیدا نشد, +Account {0} added multiple times,حساب {0} چندین بار اضافه شد, +Accounting Dimension Filter,فیلتر ابعاد حسابداری, +Accounting Dimensions Filter,فیلتر ابعاد حسابداری, +Accounting Entry for {0},ثبت حسابداری برای {0}, +Accounts Closing,بسته شدن حساب ها, +Accounts Missing Error,خطای گم شدن حساب ها, +Accounts Receivable/Payable,حساب های دریافتنی / پرداختنی, +Accounts to Merge,حساب ها برای ادغام, +Action If Quality Inspection Is Rejected,اقدام اگر بازرسی کیفیت رد شود, +Action If Same Rate is Not Maintained,اگر همان نرخ حفظ نشود، اقدام کنید, +Action if Same Rate is Not Maintained Throughout Sales Cycle,اگر نرخ یکسانی در طول چرخه فروش حفظ نشود، اقدام کنید, +Active Status,وضعیت فعال, +Actual Balance Qty,مقدار تراز واقعی, +Actual Expense,هزینه واقعی, +Actual Posting,ارسال واقعی, +Actual Qty in Warehouse,مقدار واقعی در انبار, +Actual Time,زمان واقعی, +Add Columns in Transaction Currency,اضافه کردن ستون به ارز تراکنش, +Add Corrective Operation Cost in Finished Good Valuation,اضافه کردن هزینه عملیات اصلاحی در ارزش گذاری کالای تمام شده, +Add Discount,افزودن تخفیف, +Add Items in the Purpose Table,افزودن آیتم‌ها در جدول هدف, +Add Lead to Prospect,لید را به Prospect اضافه کنید, +Add Local Holidays,تعطیلات محلی را اضافه کنید, +Add Manually,افزودن دستی, +Add Or Deduct,افزودن یا کسر, +Add Serial / Batch Bundle,افزودن باندل سریال / دسته, +Add Serial / Batch No,اضافه کردن سریال / شماره دسته, +Add Serial / Batch No (Rejected Qty),اضافه کردن سریال / شماره دسته (تعداد رد شده), +Add Stock,افزودن موجودی, +Add Sub Assembly,افزودن زیر مونتاژ, +Add Template,اضافه کردن الگو, +Add a Note,یک یادداشت اضافه کنید, +Add details,جزئیات را اضافه کنید, +Add to Prospect,به Prospect اضافه کنید, +Added By,اضافه شده توسط, +Added On,اضافه شده در, +Added Supplier Role to User {0}.,نقش تامین کننده به کاربر {0} اضافه شد., +Added {1} Role to User {0}.,نقش {1} به کاربر {0} اضافه شد., +Adding Lead to Prospect...,افزودن سرنخ به مشتری بالقوه..., +Additional,اضافی, +Additional Asset Cost,هزینه دارایی اضافی, +Additional Cost Per Qty,هزینه اضافی در هر تعداد, +Additional Info,اطلاعات اضافی, +Address And Contacts,آدرس و مخاطبین, +Adjust Asset Value,ارزش دارایی را تنظیم کنید, +Adjustment Against,تعدیل در مقابل, +Adjustment based on Purchase Invoice rate,تعدیل بر اساس نرخ فاکتور خرید, +Advance Payment,پیش پرداخت, +Advance Tax,پیش پرداخت مالیات, +Advance Taxes and Charges,پیش پرداخت مالیات و هزینه ها, +Advance paid against {0} {1} cannot be greater than Grand Total {2},پیش پرداخت در مقابل {0} {1} نمی تواند بیشتر از کل کل {2} باشد, +Advance payments allocated against orders will only be fetched,پیش پرداخت های تخصیص یافته در برابر سفارش ها فقط واکشی می شود, +Affected Transactions,معاملات تحت تأثیر, +Against Customer Order {0},در مقابل سفارش مشتری {0}, +Against Supplier Invoice {0},در مقابل فاکتور تامین کننده {0}, +Against Voucher No,در مقابل کوپن شماره, +Age ({0}),سن ({0}), +Ageing Range,محدوده سالخوردگی, +Agent Busy Message,پیام مامور مشغول, +Agent Group,گروه عامل, +Agent Unavailable Message,پیام عامل در دسترس نیست, +Aggregate a group of Items into another Item. This is useful if you are maintaining the stock of the packed items and not the bundled item,گروهی از آیتم‌ها را در یک آیتم دیگر جمع کنید. اگر موجودی آیتم‌های بسته بندی شده را نگهداری می کنید و نه آیتم باندل شده، مفید است, +Algorithm,الگوریتم, +All Activities,تمام فعالیت ها, +All Activities HTML,تمام فعالیت ها HTML, +All Items,همه آیتم ها, +All allocations have been successfully reconciled,همه تخصیص ها با موفقیت تطبیق داده شده است, +All items have already been received,همه آیتم‌ها قبلاً دریافت شده است, +All items in this document already have a linked Quality Inspection.,همه آیتم‌ها در این سند قبلاً دارای یک بازرسی کیفیت مرتبط هستند., +All the Comments and Emails will be copied from one document to another newly created document(Lead -> Opportunity -> Quotation) throughout the CRM documents.,تمام نظرات و ایمیل ها از یک سند به سند جدید ایجاد شده دیگر (سرنخ -> فرصت -> پیش فاکتور) در سراسر اسناد CRM کپی می شوند., +"All the required items (raw materials) will be fetched from BOM and populated in this table. Here you can also change the Source Warehouse for any item. And during the production, you can track transferred raw materials from this table.",تمام آیتم‌های مورد نیاز (مواد اولیه) از BOM واکشی شده و در این جدول پر می شود. در اینجا شما همچنین می توانید انبار منبع را برای هر آیتم تغییر دهید. و در حین تولید می توانید مواد اولیه انتقال یافته را از این جدول ردیابی کنید., +Allocate Payment Request,تخصیص درخواست پرداخت, +Allocated Entries,ورودی های اختصاص داده شده, +Allocated To:,اختصاص داده شده به:, +Allocations,تخصیص ها, +Allow,اجازه, +Allow Alternative Item must be checked on Item {},آیتم جایگزین مجاز است باید برای آیتم {} علامت زده شود, +Allow Continuous Material Consumption,اجازه مصرف مداوم مواد, +Allow Excess Material Transfer,اجازه انتقال مواد اضافی را بدهید, +Allow Item to be Added Multiple Times in a Transaction,اجازه دهید آیتم چندین بار در یک تراکنش اضافه شود, +Allow Lead Duplication based on Emails,اجازه تکرار سرنخ بر اساس ایمیل, +Allow Negative rates for Items,نرخ های منفی برای آیتم‌ها مجاز است, +Allow Or Restrict Dimension,اجازه یا محدود کردن ابعاد, +Allow Partial Reservation,اجازه رزرو جزئی, +Allow Purchase,اجازه خرید, +Allow Sales,اجازه فروش, +Allow Sales Order Creation For Expired Quotation,اجازه ایجاد سفارش فروش برای قیمت منقضی شده, +Allow User to Edit Discount,به کاربر اجازه ویرایش تخفیف را بدهید, +Allow User to Edit Rate,به کاربر اجازه ویرایش نرخ بدهید, +Allow Zero Rate,اجازه نرخ صفر, +Allow material consumptions without immediately manufacturing finished goods against a Work Order,اجازه مصرف مواد را بدون تولید فوری کالاهای تمام شده در برابر دستور کار بدهید, +Allow multi-currency invoices against single party account , صورتحساب‌های چند ارزی را در برابر حساب یک طرف مجاز کنید, +Allow to Edit Stock UOM Qty for Purchase Documents,اجازه ویرایش موجودی UOM Qty برای اسناد خرید, +Allow to Edit Stock UOM Qty for Sales Documents,امکان ویرایش موجودی UOM Qty برای اسناد فروش, +Allow transferring raw materials even after the Required Quantity is fulfilled,امکان انتقال مواد خام حتی پس از برآورده شدن مقدار مورد نیاز, +Allowed,مجاز, +Allowed Dimension,ابعاد مجاز, +Allowed Doctypes,Doctypes مجاز, +Allowed Items,آیتم‌های مجاز, +Allowed primary roles are 'Customer' and 'Supplier'. Please select one of these roles only.,نقش‌های اصلی مجاز عبارتند از «مشتری» و «تامین‌کننده». لطفا فقط یکی از این نقش ها را انتخاب کنید., +Allows to keep aside a specific quantity of inventory for a particular order.,اجازه می دهد تا مقدار مشخصی از موجودی را برای یک سفارش خاص کنار بگذارید., +Already Picked,قبلاً انتخاب شده است, +Alternative Items,آیتم‌های جایگزین, +"Alternatively, you can download the template and fill your data in.",همچنین می توانید الگو را دانلود کرده و داده های خود را پر کنید., +Amount (AED),مقدار (AED), +Amount Eligible for Commission,مبلغ واجد شرایط برای کمیسیون, +Amount in Account Currency,مبلغ به ارز حساب, +Amount in party's bank account currency,مبلغ به ارز حساب بانکی طرف, +Amount in transaction currency,مبلغ به ارز تراکنش, +An Item Group is a way to classify items based on types.,گروه آیتم راهی برای دسته بندی آیتم‌ها بر اساس انواع است., +An error has been appeared while reposting item valuation via {0},هنگام ارسال مجدد ارزیابی مورد از طریق {0} خطایی ظاهر شد, +An error has occurred during {0}. Check {1} for more details,خطایی در طول {0} رخ داده است. برای جزئیات بیشتر {1} را بررسی کنید,Error Log +Annual Revenue,درآمد سالانه, +"Another Cost Center Allocation record {0} applicable from {1}, hence this allocation will be applicable upto {2}",یکی دیگر از رکوردهای تخصیص مرکز هزینه {0} قابل اعمال از {1}، بنابراین این تخصیص تا {2} قابل اعمال خواهد بود., +"Any one of following filters required: warehouse, Item Code, Item Group",هر یک از فیلترهای زیر مورد نیاز است: انبار، کد آیتم، گروه آیتم, +Applicable Dimension,ابعاد قابل اجرا, +Applicable On Account,قابل اجرا در حساب, +Applied on each reading.,در هر خواندن اعمال می شود., +Applied putaway rules.,اعمال قوانین حذف, +Apply Putaway Rule,اعمال قانون Putaway, +Apply Recursion Over (As Per Transaction UOM),اعمال بازگشت بیش از (بر اساس UOM تراکنش), +Apply SLA for Resolution Time,اعمال SLA برای زمان حل و فصل, +Apply TDS,TDS را اعمال کنید, +Apply Tax Withholding Amount , اعمال مبلغ کسر مالیات, +Apply restriction on dimension values,اعمال محدودیت در مقادیر ابعاد, +Apply to All Inventory Documents,برای همه اسناد موجودی اعمال شود, +Apply to Document,درخواست برای سند, +Appointment Created Successfully,قرار ملاقات با موفقیت ایجاد شد, +Appointment Scheduling Disabled,زمان‌بندی قرار غیرفعال است, +Appointment Scheduling has been disabled for this site,زمان‌بندی قرار برای این سایت غیرفعال شده است, +Appointment was created. But no lead was found. Please check the email to confirm,قرار ملاقات ایجاد شد. اما سرنخی پیدا نشد. لطفا برای تایید ایمیل را بررسی کنید, +Approximately match the description/party name against parties,تقریباً توصیف/نام طرف را با طرف‌ها مطابقت دهید, +Are you sure you want to clear all demo data?,آیا مطمئن هستید که می خواهید تمام داده های نمایشی را پاک کنید؟, +Are you sure you want to delete this Item?,آیا مطمئن هستید که میخواهید این آیتم را حذف کنید؟, +Are you sure you want to restart this subscription?,آیا مطمئن هستید که می خواهید این اشتراک را مجدداً راه‌اندازی کنید؟, +As on Date,همانطور که در تاریخ, +"As there are existing submitted transactions against item {0}, you can not change the value of {1}.",از آنجایی که تراکنش‌های ارسالی موجود در مقابل آیتم {0} وجود دارد، نمی‌توانید مقدار {1} را تغییر دهید., +"As there are negative stock, you can not enable {0}.",از آنجایی که موجودی منفی وجود دارد، نمی توانید {0} را فعال کنید., +"As there are reserved stock, you cannot disable {0}.",از آنجایی که موجودی رزرو شده وجود دارد، نمی توانید {0} را غیرفعال کنید., +"As there are sufficient Sub Assembly Items, Work Order is not required for Warehouse {0}.",از آنجایی که آیتم‌های زیر مونتاژ کافی وجود دارد، برای انبار {0} نیازی به دستور کار نیست., +"As {0} is enabled, you can not enable {1}.",از آنجایی که {0} فعال است، نمی توانید {1} را فعال کنید., +Assembly Items,آیتم‌های مونتاژ, +Asset Activity,فعالیت دارایی, +Asset Capitalization,سرمایه گذاری دارایی ها, +Asset Capitalization Asset Item,دارایی دارایی با سرمایه, +Asset Capitalization Service Item,آیتم خدمات سرمایه گذاری دارایی, +Asset Capitalization Stock Item,آیتم موجودی سرمایه گذاری دارایی, +Asset Depreciation Details,جزئیات استهلاک دارایی, +Asset Depreciation Schedule,جدول استهلاک دارایی ها, +Asset Depreciation Schedule for Asset {0} and Finance Book {1} is not using shift based depreciation,برنامه استهلاک دارایی برای دارایی {0} و کتاب مالی {1} از استهلاک مبتنی بر شیفت استفاده نمی کند, +Asset Depreciation Schedule not found for Asset {0} and Finance Book {1},برنامه استهلاک دارایی برای دارایی {0} و کتاب مالی {1} یافت نشد, +Asset Depreciation Schedule {0} for Asset {1} already exists.,برنامه استهلاک دارایی {0} برای دارایی {1} از قبل وجود دارد., +Asset Depreciation Schedule {0} for Asset {1} and Finance Book {2} already exists.,برنامه استهلاک دارایی {0} برای دارایی {1} و کتاب مالی {2} از قبل وجود دارد., +"Asset Depreciation Schedules created:
{0}

Please check, edit if needed, and submit the Asset.",برنامه‌های استهلاک دارایی ایجاد شده:
{0}

لطفاً بررسی کنید، در صورت نیاز ویرایش کنید و دارایی را ارسال کنید., +Asset ID,شناسه دارایی, +Asset Quantity,مقدار دارایی, +Asset Repair Consumed Item,کالای مصرفی تعمیر دارایی, +Asset Settings,تنظیمات دارایی, +Asset Shift Allocation,تخصیص تغییر دارایی, +Asset Shift Factor,عامل تغییر دارایی, +Asset Shift Factor {0} is set as default currently. Please change it first.,عامل تغییر دارایی {0} در حال حاضر به عنوان پیش فرض تنظیم شده است. لطفا ابتدا آن را تغییر دهید., +Asset cancelled,دارایی لغو شد, +Asset capitalized after Asset Capitalization {0} was submitted,پس از ارسال دارایی با حروف بزرگ {0} دارایی با حروف بزرگ نوشته شد, +Asset created,دارایی ایجاد شد, +Asset created after Asset Capitalization {0} was submitted,دارایی ایجاد شده پس از ارسال با حروف بزرگ دارایی {0}, +Asset created after being split from Asset {0},دارایی پس از جدا شدن از دارایی {0} ایجاد شد, +Asset decapitalized after Asset Capitalization {0} was submitted,پس از ارسال دارایی با سرمایه {0}، دارایی از سرمایه خارج شد, +Asset deleted,دارایی حذف شد, +Asset issued to Employee {0},دارایی برای کارمند {0} حواله شده, +Asset out of order due to Asset Repair {0},دارایی از کار افتاده به دلیل تعمیر دارایی {0}, +Asset received at Location {0} and issued to Employee {1},دارایی در مکان {0} دریافت و برای کارمند {1} حواله شد, +Asset restored,دارایی بازیابی شد, +Asset restored after Asset Capitalization {0} was cancelled,دارایی پس از لغو حروف بزرگ دارایی {0} بازیابی شد, +Asset returned,دارایی برگردانده شد, +Asset scrapped,دارایی از بین رفته است, +Asset sold,دارایی فروخته شده, +Asset submitted,دارایی ارسال شد, +Asset transferred to Location {0},دارایی به مکان {0} منتقل شد, +Asset updated after being split into Asset {0},دارایی پس از تقسیم به دارایی {0} به روز شد, +Asset updated after cancellation of Asset Repair {0},دارایی پس از لغو تعمیر دارایی {0} به روز شد, +Asset updated after completion of Asset Repair {0},دارایی پس از اتمام تعمیر دارایی به روز شد {0}, +Asset {0} cannot be received at a location and given to an employee in a single movement,دارایی {0} را نمی توان در یک مکان دریافت کرد و در یک حرکت به کارمند داد, +Asset {0} does not belong to Item {1},دارایی {0} به آیتم {1} تعلق ندارد, +Asset {0} does not exist,دارایی {0} وجود ندارد, +Asset {0} has been created. Please set the depreciation details if any and submit it.,دارایی {0} ایجاد شده است. لطفاً جزئیات استهلاک را در صورت وجود تنظیم و ارسال کنید., +Asset {0} has been updated. Please set the depreciation details if any and submit it.,دارایی {0} به روز شده است. لطفاً جزئیات استهلاک را در صورت وجود تنظیم و ارسال کنید., +Asset's depreciation schedule updated after Asset Shift Allocation {0},برنامه استهلاک دارایی پس از تخصیص تغییر دارایی {0} به روز شد, +Asset's value adjusted after cancellation of Asset Value Adjustment {0},ارزش دارایی پس از لغو تعدیل ارزش دارایی تنظیم شد {0}, +Asset's value adjusted after submission of Asset Value Adjustment {0},ارزش دارایی پس از ارسال تعدیل ارزش دارایی تنظیم شد {0}, +Assign Job to Employee,کار را به کارمند واگذار کنید, +Assignment,تخصیص, +Assignment Conditions,شرایط تخصیص, +At Row #{0}: The picked quantity {1} for the item {2} is greater than available stock {3} for the batch {4} in the warehouse {5}.,در ردیف #{0}: مقدار انتخاب شده {1} برای آیتم {2} بیشتر از موجودی در دسترس {3} برای دسته {4} در انبار {5} است., +At Row #{0}: The picked quantity {1} for the item {2} is greater than available stock {3} in the warehouse {4}.,در ردیف #{0}: مقدار انتخاب شده {1} برای آیتم {2} بیشتر از موجودی در دسترس {3} در انبار {4} است., +At row {0}: Batch No is mandatory for Item {1},در ردیف {0}: شماره دسته برای مورد {1} اجباری است, +At row {0}: Parent Row No cannot be set for item {1},در ردیف {0}: ردیف والد برای آیتم {1} قابل تنظیم نیست, +At row {0}: Qty is mandatory for the batch {1},در ردیف {0}: مقدار برای دسته {1} اجباری است, +At row {0}: Serial No is mandatory for Item {1},در ردیف {0}: شماره سریال برای آیتم {1} اجباری است, +At row {0}: Serial and Batch Bundle {1} has already created. Please remove the values from the serial no or batch no fields.,در ردیف {0}: باندل سریال و دسته {1} قبلا ایجاد شده است. لطفاً مقادیر را از فیلدهای شماره سریال یا شماره دسته حذف کنید., +At row {0}: set Parent Row No for item {1},در ردیف {0}: تنظیم شماره ردیف والد برای آیتم {1}, +Attach CSV File,پیوست فایل CSV, +Attendance & Leaves,حضور و غیاب و مرخصی, +Attribute value: {0} must appear only once,مقدار مشخصه: {0} باید فقط یک بار ظاهر شود, +Auto Create Exchange Rate Revaluation,ایجاد خودکار تجدید ارزیابی نرخ ارز, +Auto Create Purchase Receipt,ایجاد خودکار رسید خرید, +Auto Create Serial and Batch Bundle For Outward,ایجاد خودکار باندل سریال و دسته برای بیرون, +Auto Create Subcontracting Order,ایجاد خودکار سفارش قرارداد فرعی, +Auto Created Serial and Batch Bundle,باندل سریال و دسته ایجاد شده به صورت خودکار, +Auto Creation of Contact,ایجاد خودکار مخاطب, +Auto Email Report,گزارش خودکار ایمیل, +Auto Insert Item Price If Missing,درج خودکار قیمت آیتم در صورت فراموش شدن, +Auto Name,نام خودکار, +Auto Reconcile,تطبیق خودکار, +Auto Reconcile Payments,تطبیق خودکار پرداخت ها, +Auto Reconciliation,تطبیق خودکار, +Auto Reconciliation of Payments has been disabled. Enable it through {0},تطبیق خودکار پرداخت‌ها غیرفعال شده است. آن را از طریق {0} فعال کنید, +Auto Reserve Serial and Batch Nos,شماره سریال و دسته رزرو خودکار, +Auto Reserve Stock for Sales Order on Purchase,ذخیره خودکار موجودی برای سفارش فروش در هنگام خرید, +Auto close Opportunity Replied after the no. of days mentioned above,فرصت بسته شدن خودکار پس از خیر پاسخ داده شد. از روزهای ذکر شده در بالا, +Auto match and set the Party in Bank Transactions,مطابقت خودکار و تنظیم طرف در معاملات بانکی, +Auto write off precision loss while consolidation,حذف خودکار از دست دادن دقت در هنگام تلفیق, +Automatically Add Filtered Item To Cart,افزودن خودکار آیتم فیلتر شده به سبد خرید, +Automatically Fetch Payment Terms from Order,واکشی خودکار شرایط پرداخت از سفارش, +Automatically post balancing accounting entry,ثبت حسابداری تراز به طور خودکار, +Available Qty For Consumption,تعداد موجود برای مصرف, +Available Qty at Company,تعداد موجود در شرکت, +Available Qty at Target Warehouse,تعداد موجود در انبار هدف, +Available Qty to Reserve,تعداد برای رزرو موجود است, +Average Completion,میانگین تکمیل, +Avg Rate,میانگین نرخ, +Avg Rate (Balance Stock),میانگین نرخ (تراز موجودی), +BOM Created,BOM ایجاد شد, +BOM Creator,ایجاد کننده BOM, +BOM Creator Item,آیتم ایجاد کننده BOM, +BOM Info,اطلاعات BOM, +BOM Level,سطح BOM, +BOM Tree,درخت BOM, +BOM UoM,واحد اندازه گیری BOM, +BOM Update Batch,دسته به روز رسانی BOM, +BOM Update Initiated,به روز رسانی BOM آغاز شد, +BOM Update Log,لاگ به روز رسانی BOM, +BOM Updation already in progress. Please wait until {0} is complete.,به‌روزرسانی BOM در حال انجام است. لطفاً صبر کنید تا {0} کامل شود., +BOM Updation is queued and may take a few minutes. Check {0} for progress.,به روز رسانی BOM در صف است و ممکن است چند دقیقه طول بکشد. برای پیشرفت، {0} را بررسی کنید., +BOM and Production,BOM و تولید, +BOM recursion: {1} cannot be parent or child of {0},بازگشت BOM: {1} نمی تواند والد یا فرزند {0} باشد, +BOMs Updated,BOM ها به روز شدند, +BOMs created successfully,BOM با موفقیت ایجاد شد, +BOMs creation failed,ایجاد BOM ناموفق بود, +"BOMs creation has been enqueued, kindly check the status after some time",ایجاد BOM در نوبت قرار گرفته است، لطفاً وضعیت را پس از مدتی بررسی کنید, +Balance Qty (Stock),مقدار تراز (موجودی), +Balance Sheet Summary,خلاصه ترازنامه, +Balance Stock Value,تراز ارزش موجودی, +Bank Reconciliation Tool,ابزار تطبیق بانکی, +Bank Statement Import,درون‌بُرد صورتحساب بانکی, +Bank Transaction {0} Matched,تراکنش بانکی {0} مطابقت دارد, +Bank Transaction {0} added as Journal Entry,تراکنش بانکی {0} به عنوان ثبت دفتر روزنامه اضافه شد, +Bank Transaction {0} added as Payment Entry,تراکنش بانکی {0} به عنوان ثبت پرداخت اضافه شد, +Bank Transaction {0} is already fully reconciled,تراکنش بانکی {0} در حال حاضر به طور کامل تطبیق شده است, +Bank Transaction {0} updated,تراکنش بانکی {0} به روز شد, +Bank/Cash Account,بانک / حساب نقدی, +Bank/Cash Account {0} doesn't belong to company {1},حساب بانکی/نقدی {0} به شرکت {1} تعلق ندارد, +Base Amount,مقدار پایه, +Base Cost Per Unit,هزینه پایه به ازای هر واحد, +Base Rate,نرخ پایه, +Base Tax Withholding Net Total,کل خالص کسر مالیات پایه, +Base Total,مجموع پایه, +Base Total Billable Amount,مبنا کل مبلغ قابل پرداخت, +Base Total Billed Amount,مبنا کل مبلغ صورتحساب, +Base Total Costing Amount,مبنا کل بهای تمام شده, +Based On Value,بر اساس ارزش, +"Based on your HR Policy, select your leave allocation period's end date",بر اساس خط مشی منابع انسانی خود، تاریخ پایان دوره تخصیص مرخصی خود را انتخاب کنید, +"Based on your HR Policy, select your leave allocation period's start date",بر اساس خط مشی منابع انسانی خود، تاریخ شروع دوره تخصیص مرخصی خود را انتخاب کنید, +Batch No is mandatory,شماره دسته اجباری است, +Batch No {0} does not exists,شماره دسته {0} وجود ندارد, +Batch No {0} is linked with Item {1} which has serial no. Please scan serial no instead.,شماره دسته {0} با آیتم {1} که دارای شماره سریال است پیوند داده شده است. لطفاً شماره سریال را اسکن کنید., +Batch No.,شماره دسته, +Batch Nos,شماره های دسته, +Batch Nos are created successfully,شماره های دسته با موفقیت ایجاد شد, +Batch Qty,مقدار دسته, +Batch and Serial No,شماره دسته و سریال, +Batch not created for item {} since it does not have a batch series.,دسته ای برای آیتم {} ایجاد نشده است زیرا سری دسته ای ندارد., +Batch {0} and Warehouse,دسته {0} و انبار, +Batch {0} is not available in warehouse {1},دسته {0} در انبار {1} موجود نیست, +Batchwise Valuation,ارزش گذاری دسته ای, +Beginning of the current subscription period,شروع دوره اشتراک فعلی, +Bill for Rejected Quantity in Purchase Invoice,صورتحساب مقدار رد شده در فاکتور خرید, +Billed Items To Be Received,آیتم‌های صورتحساب شده برای دریافت, +"Billed, Received & Returned",صورتحساب، دریافت و برگردانده شد, +Billing Address Details,جزئیات آدرس صورتحساب, +Billing Interval in Subscription Plan must be Month to follow calendar months,فاصله صورتحساب در طرح اشتراک باید ماه باشد تا ماه‌های تقویمی را دنبال کنید, +Blanket Order Allowance (%),سفارش کلی مجاز (%), +Bom No,شماره BOM, +Book Advance Payments as Liability option is chosen. Paid From account changed from {0} to {1}.,گزینه رزرو پیش پرداخت به عنوان بدهی انتخاب شده است. حساب Paid From از {0} به {1} تغییر کرد., +Book Advance Payments in Separate Party Account,پیش پرداخت را در حساب طرف جداگانه رزرو کنید, +Book Tax Loss on Early Payment Discount,از دست دادن مالیات در تخفیف پرداخت زودهنگام رزرو کنید, +Book an appointment,یک قرار ملاقات رزرو کنید, +Booking stock value across multiple accounts will make it harder to track stock and account value.,رزرو ارزش موجودی در چندین حساب، ردیابی موجودی و ارزش حساب را دشوارتر می کند., +Books have been closed till the period ending on {0},کتاب‌ها تا پایان دوره {0} بسته شده‌اند, +Budget Exceeded,بودجه بیش از حد, +Build All?,ساخت همه؟, +Buildable Qty,تعداد قابل ساخت, +Bulk Transaction Log,لاگ تراکنش های انبوه, +Bulk Transaction Log Detail,جزئیات لاگ تراکنش های انبوه, +Bulk Update,به روز رسانی انبوه, +Bundle Items,آیتم‌های باندل, +Buying & Selling Settings,تنظیمات خرید و فروش, +Buying and Selling,خرید و فروش, +"By default, the Supplier Name is set as per the Supplier Name entered. If you want Suppliers to be named by a Naming Series choose the 'Naming Series' option.","به‌طور پیش‌فرض، نام تامین‌کننده مطابق با نام تامین‌کننده وارد شده تنظیم می‌شود. اگر می‌خواهید تامین‌کنندگان با سری نام‌گذاری نام‌گذاری شوند. گزینه ""Naming Series"" را انتخاب کنید.", +Bypass credit check at Sales Order,دور زدن بررسی اعتبار در سفارش فروش, +COGS By Item Group,COGS بر اساس گروه آیتم, +CRM Note,یادداشت CRM, +CRM Settings,تنظیمات CRM, +Calculate Product Bundle Price based on Child Items' Rates,قیمت باندل محصول را بر اساس نرخ آیتم‌های فرزند محاسبه کنید, +Call Again,دوباره تماس بگیر, +Call Ended,مکالمه تلفنی تمام شد, +Call Handling Schedule,برنامه رسیدگی به تماس ها, +Call Received By,تماس دریافت شده توسط, +Call Receiving Device,دستگاه دریافت تماس, +Call Routing,مسیریابی تماس, +Call Schedule Row {0}: To time slot should always be ahead of From time slot.,ردیف زمان‌بندی تماس {0}: بازه زمانی To همیشه باید جلوتر از بازه زمانی از زمان باشد., +Call Type,نوع تماس, +Callback,پاسخ به تماس, +Campaign Item,آیتم کمپین, +Can not close Work Order. Since {0} Job Cards are in Work In Progress state.,نمی توان دستور کار را بست. از آنجایی که کارت کارهای {0} در حالت کار در حال انجام هستند., +"Can not filter based on Child Account, if grouped by Account",اگر براساس حساب گروه‌بندی شود، نمی‌توان بر اساس حساب فرزند فیلتر کرد, +"Can't change the valuation method, as there are transactions against some items which do not have its own valuation method",نمی توان روش ارزش گذاری را تغییر داد، زیرا معاملاتی در برابر برخی اقلام وجود دارد که روش ارزش گذاری خاص خود را ندارند., +Cannot Merge,نمی توان ادغام کرد, +Cannot Resubmit Ledger entries for vouchers in Closed fiscal year.,نمی‌توان ورودی‌های دفتر کل را برای کوپن‌ها در سال مالی بسته دوباره ارسال کرد., +"Cannot amend {0} {1}, please create a new one instead.",نمی توان {0} {1} را اصلاح کرد، لطفاً در عوض یک مورد جدید ایجاد کنید., +Cannot apply TDS against multiple parties in one entry,نمی‌توان TDS را در یک ورودی در مقابل چندین طرف اعمال کرد, +Cannot cancel the transaction. Reposting of item valuation on submission is not completed yet.,نمی توان تراکنش را لغو کرد. ارسال مجدد ارزیابی اقلام هنگام ارسال هنوز تکمیل نشده است., +Cannot change Reference Document Type.,نمی توان نوع سند مرجع را تغییر داد., +Cannot complete task {0} as its dependant task {1} are not completed / cancelled.,نمی توان کار {0} را تکمیل کرد زیرا وظیفه وابسته آن {1} تکمیل نشده / لغو شد., +Cannot convert Task to non-group because the following child Tasks exist: {0}.,نمی توان وظیفه را به غیر گروهی تبدیل کرد زیرا وظایف فرزند زیر وجود دارد: {0}., +Cannot convert to Group because Account Type is selected.,نمی توان به گروه تبدیل کرد زیرا نوع حساب انتخاب شده است., +Cannot create Stock Reservation Entries for future dated Purchase Receipts.,نمی توان ورودی های رزرو موجودی را برای رسیدهای خرید با تاریخ آینده ایجاد کرد., +Cannot create a pick list for Sales Order {0} because it has reserved stock. Please unreserve the stock in order to create a pick list.,نمی‌توان فهرست انتخابی برای سفارش فروش {0} ایجاد کرد زیرا موجودی رزرو کرده است. لطفاً برای ایجاد لیست انتخاب، موجودی را لغو رزرو کنید., +Cannot create accounting entries against disabled accounts: {0},نمی توان ورودی های حسابداری را در برابر حساب های غیرفعال ایجاد کرد: {0}, +Cannot enqueue multi docs for one company. {0} is already queued/running for company: {1},نمی توان چند سند را برای یک شرکت در صف قرار داد. {0} قبلاً برای شرکت: {1} در صف/در حال اجراست, +Cannot find a default warehouse for item {0}. Please set one in the Item Master or in Stock Settings.,نمی توان یک انبار پیش فرض برای آیتم {0} پیدا کرد. لطفاً یکی را در مدیریت آیتم یا در تنظیمات سهام تنظیم کنید., +Cannot make any transactions until the deletion job is completed,تا زمانی که کار حذف کامل نشود، نمی توان هیچ تراکنشی انجام داد, +Cannot produce more item for {0},نمی توان مورد بیشتری برای {0} تولید کرد, +Cannot produce more than {0} items for {1},نمی توان بیش از {0} مورد برای {1} تولید کرد, +Cannot receive from customer against negative outstanding,نمی توان از مشتری در برابر معوقات منفی دریافت کرد, +Cannot retrieve link token for update. Check Error Log for more information,نمی توان توکن پیوند را برای به روز رسانی بازیابی کرد. برای اطلاعات بیشتر Log خطا را بررسی کنید, +Cannot retrieve link token. Check Error Log for more information,توکن پیوند بازیابی نمی شود. برای اطلاعات بیشتر Log خطا را بررسی کنید, +Capacity (Stock UOM),ظرفیت (Stock UOM), +Capacity in Stock UOM,ظرفیت موجود در انبار UOM, +Capacity must be greater than 0,ظرفیت باید بیشتر از 0 باشد, +Capitalization,حروف بزرگ, +Capitalization Method,روش حروف بزرگ, +Capitalize Asset,سرمایه گذاری دارایی, +Capitalize Repair Cost,سرمایه گذاری در هزینه تعمیر, +Capitalized,با حروف بزرگ, +Carrier,حامل, +Carrier Service,خدمات حامل, +Carry Forward Communication and Comments,انتقال ارتباطات و نظرات, +Category Details,جزئیات دسته, +Caution: This might alter frozen accounts.,احتیاط: این ممکن است حساب های مسدود شده را تغییر دهد., +Change in Stock Value,تغییر در ارزش موجودی, +Changed customer name to '{}' as '{}' already exists.,"نام مشتری به ""{}"" به عنوان ""{}"" تغییر کرده است.", +Changes,تغییرات, +Charge of type 'Actual' in row {0} cannot be included in Item Rate or Paid Amount,"هزینه از نوع ""واقعی"" در ردیف {0} نمی تواند در نرخ مورد یا مبلغ پرداختی لحاظ شود", +Chart Of Accounts,نمودار حساب, +Checking this will round off the tax amount to the nearest integer,بررسی این مقدار مالیات را به نزدیکترین عدد صحیح گرد می کند, +Choose a WIP composite asset,یک دارایی ترکیبی «کار در حال انجام» را انتخاب کنید, +Clear Demo Data,پاک کردن داده های نمایشی, +Clear Notifications,پاک کردن اعلان ها, +Clearing Demo Data...,در حال پاک کردن داده های نمایشی..., +Click on 'Get Finished Goods for Manufacture' to fetch the items from the above Sales Orders. Items only for which a BOM is present will be fetched.,"برای دریافت آیتم‌ها از سفارش‌های فروش فوق، روی ""دریافت کالاهای تمام شده برای ساخت"" کلیک کنید. فقط آیتم‌هایی که BOM برای آنها وجود دارد واکشی می شوند.", +Click on Add to Holidays. This will populate the holidays table with all the dates that fall on the selected weekly off. Repeat the process for populating the dates for all your weekly holidays,روی افزودن به تعطیلات کلیک کنید. با این کار جدول تعطیلات با تمام تاریخ هایی که در تعطیلات هفتگی انتخاب شده قرار می گیرند پر می کند. فرآیند پر کردن تاریخ ها را برای تمام تعطیلات هفتگی خود تکرار کنید, +Click on Get Sales Orders to fetch sales orders based on the above filters.,برای دریافت سفارش‌های فروش بر اساس فیلترهای بالا، روی دریافت سفارش‌های فروش کلیک کنید., +Click to add email / phone,برای افزودن ایمیل / تلفن کلیک کنید, +Close Replied Opportunity After Days,بستن فرصت پاسخ داده شده پس از چند روز, +Closed Work Order can not be stopped or Re-opened,دستور کار بسته را نمی توان متوقف کرد یا دوباره باز کرد, +Closing,بسته شدن, +Closing Balance as per Bank Statement,مانده پایانی طبق صورتحساب بانکی, +Closing Balance as per ERP,تراز پایانی طبق ERP, +Closing Stock Balance,تراز پایانی موجودی, +Communication Channel,کانال ارتباطی, +Company Address Display,نمایش آدرس شرکت, +Company Billing Address,آدرس صورتحساب شرکت, +Company Details,جزئیات شرکت, +Company Shipping Address,آدرس حمل و نقل شرکت, +Company Tax ID,شناسه مالیاتی شرکت, +Company and Posting Date is mandatory,شرکت و تاریخ ارسال الزامی است, +Company is mandatory,شرکت الزامی است, +Company is mandatory for generating an invoice. Please set a default company in Global Defaults.,شرکت برای تهیه فاکتور الزامی است. لطفاً یک شرکت پیش‌فرض را در پیش‌فرض‌های سراسری تنظیم کنید., +Company which internal customer represents,شرکتی که مشتری داخلی نماینده آن است, +Company which internal customer represents.,شرکتی که مشتری داخلی نماینده آن است., +Company which internal supplier represents,شرکتی که تامین کننده داخلی آن را نمایندگی می کند, +Company {0} is added more than once,شرکت {0} بیش از یک بار اضافه شده است, +Company {} does not exist yet. Taxes setup aborted.,شرکت {} هنوز وجود ندارد. تنظیم مالیات لغو شد., +Company {} does not match with POS Profile Company {},شرکت {} با نمایه POS شرکت {} مطابقت ندارد, +Competitor,رقیب, +Competitor Detail,جزئیات رقیب, +Competitor Name,نام رقیب, +Competitors,رقبا, +Complete Job,کار کامل, +Completed On,تکمیل شد, +Completed On cannot be greater than Today,تکمیل شده در تاریخ نمی تواند بزرگتر از امروز باشد, +Completed Tasks,وظایف تکمیل شده, +Completed Time,زمان تکمیل شده, +Conditional Rule,قانون مشروط, +Conditional Rule Examples,مثال های قانون شرطی, +Configure Product Assembly,پیکربندی اسمبلی محصول, +Configure the action to stop the transaction or just warn if the same rate is not maintained.,کنش را طوری پیکربندی کنید که تراکنش را متوقف کند یا در صورت عدم حفظ همان نرخ فقط هشدار دهد., +Connections,اتصالات, +Consider Entire Party Ledger Amount,کل مبلغ دفتر کل طرف را در نظر بگیرید, +Consider Minimum Order Qty,در نظر گرفتن حداقل تعداد سفارش, +Consider Rejected Warehouses,در نظر گرفتن انبارهای مرجوعی, +Considered In Paid Amount,به مبلغ پرداختی در نظر گرفته شده است, +Consolidate Sales Order Items,تلفیق آیتم‌های سفارش فروش, +Consolidate Sub Assembly Items,تلفیق آیتم‌های زیر مونتاز, +Consumed Asset Items is mandatory for Decapitalization,اقلام دارایی مصرف شده برای کاهش سرمایه اجباری است, +Consumed Asset Total Value,ارزش کل دارایی مصرف شده, +Consumed Assets,دارایی های مصرف شده, +Consumed Quantity,مقدار مصرف شده, +Consumed Stock Items,آیتم‌های موجودی مصرفی, +Consumed Stock Total Value,ارزش کل موجودی مصرف شده, +Consumption Rate,نرخ مصرف, +Contact Details,اطلاعات تماس, +Contact Mobile,موبایل مخاطب, +Contact Us Settings,تنظیمات تماس با ما, +Contacts,مخاطب, +Contract Template Help,راهنمای الگوی قرارداد, +Contribution Qty,مقدار مشارکت, +Control Historical Stock Transactions,معاملات تاریخی موجودی را کنترل کنید, +Convert Item Description to Clean HTML in Transactions,توضیحات مورد را به Clean HTML در Transactions تبدیل کنید, +Convert to Group,تبدیل به گروه,Warehouse +Convert to Item Based Reposting,تبدیل به ارسال مجدد بر اساس آیتم, +Convert to Ledger,تبدیل به دفتر کل,Warehouse +Core,هسته, +Corrective Job Card,کارت کار اصلاحی, +Corrective Operation,عملیات اصلاحی, +Corrective Operation Cost,هزینه عملیات اصلاحی, +Cost Center Allocation,تخصیص مرکز هزینه, +Cost Center Allocation Percentage,درصد تخصیص مرکز هزینه, +Cost Center Allocation Percentages,درصدهای تخصیص مرکز هزینه, +Cost Center For Item with Item Code {0} has been Changed to {1},مرکز هزینه برای مورد با کد مورد {0} به {1} تغییر کرده است, +"Cost Center is a part of Cost Center Allocation, hence cannot be converted to a group",مرکز هزینه بخشی از تخصیص مرکز هزینه است، بنابراین نمی توان آن را به یک گروه تبدیل کرد, +Cost Center with Allocation records can not be converted to a group,مرکز هزینه با رکوردهای تخصیص را نمی توان به گروه تبدیل کرد, +Cost Center {0} cannot be used for allocation as it is used as main cost center in other allocation record.,مرکز هزینه {0} را نمی توان برای تخصیص استفاده کرد زیرا به عنوان مرکز هزینه اصلی در سایر رکوردهای تخصیص استفاده می شود., +Cost Center {} doesn't belong to Company {},مرکز هزینه {} متعلق به شرکت {} نیست, +Cost Center {} is a group cost center and group cost centers cannot be used in transactions,مرکز هزینه {} یک مرکز هزینه گروهی است و مراکز هزینه گروهی را نمی توان در تراکنش ها استفاده کرد, +Cost Configuration,پیکربندی هزینه, +Cost Per Unit,هزینه هر واحد, +Cost of Poor Quality Report,گزارش هزینه کیفیت پایین, +Cost to Company (CTC),هزینه شرکت (CTC), +Costing Details,جزئیات هزینه, +Could Not Delete Demo Data,داده های نسخه ی نمایشی حذف نشد, +Could not auto update shifts. Shift with shift factor {0} needed.,به‌روزرسانی خودکار شیفت‌ها ممکن نیست. Shift با ضریب تغییر {0} مورد نیاز است., +Could not detect the Company for updating Bank Accounts,شرکت برای به‌روزرسانی حساب‌های بانکی شناسایی نشد, +Could not find path for , مسیری برای پیدا نشد, +Count,شمردن, +Create Depreciation Entry,ایجاد ثبت استهلاک, +Create Employee records.,ایجاد رکوردهای کارمندان., +Create Grouped Asset,ایجاد دارایی گروهی, +Create Job Card based on Batch Size,ایجاد کارت کار بر اساس اندازه دسته ای, +Create Ledger Entries for Change Amount,برای تغییر مقدار، ورودی های دفتر کل ایجاد کنید, +Create Link,ایجاد لینک, +Create Multi-level BOM,BOM چند سطحی ایجاد کنید, +Create New Customer,مشتری جدید ایجاد کنید, +Create Opportunity,ایجاد فرصت, +Create Prospect,ایجاد مشتری بالقوه, +Create Reposting Entries,ورودی های ارسال مجدد ایجاد کنید, +Create Reposting Entry,ایجاد ورودی ارسال مجدد, +Create Stock Entry,ایجاد ثبت موجودی, +Create a new composite asset,یک دارایی ترکیبی جدید ایجاد کنید, +Create {0} {1} ?,{0} {1} ایجاد شود؟, +Created On,ایجاد شد, +Created {0} scorecards for {1} between:,ایجاد {0} کارت امتیازی برای {1} بین:, +Creating Delivery Note ...,ایجاد یادداشت تحویل ..., +Creating Packing Slip ...,ایجاد برگه بسته بندی ..., +Creating Purchase Invoices ...,ایجاد فاکتورهای خرید ..., +Creating Purchase Receipt ...,ایجاد رسید خرید ..., +Creating Sales Invoices ...,ایجاد فاکتورهای فروش ..., +Creating Stock Entry,ایجاد ثبت موجودی, +Creating Subcontracting Order ...,ایجاد سفارش پیمانکاری فرعی ..., +Creating Subcontracting Receipt ...,ایجاد رسید پیمانکاری فرعی ..., +Creating User...,ایجاد کاربر..., +Creation,ایجاد, +Creation of {1}(s) successful,ایجاد {1}(ها) با موفقیت, +Credit (Transaction),اعتبار (تراکنش), +Credit Amount in Transaction Currency,مقدار اعتبار به ارز تراکنش, +Credit Limit Crossed,از حد اعتبار عبور کرد, +Credit Limit Settings,تنظیمات محدودیت اعتباری, +Currency Exchange Settings Details,جزئیات تنظیمات تبادل ارز, +Currency Exchange Settings Result,نتیجه تنظیمات تبادل ارز, +Current Asset,دارایی جاری, +Current Index,شاخص فعلی, +Current Level,سطح فعلی, +Current Liability,بدهی جاری, +Current Serial / Batch Bundle,باندل سریال / دسته فعلی, +Custom,سفارشی, +Customer , مشتری, +Customer / Item / Item Group,مشتری / آیتم / گروه آیتم, +Customer Defaults,پیش فرض های مشتری, +Customer Group Item,مورد گروه مشتری, +Customer Group: {0} does not exist,گروه مشتری: {0} وجود ندارد, +Customer Item,مورد مشتری, +Customer Name: , نام مشتری:, +Customer Portal Users,کاربران پورتال مشتری, +Customer: , مشتری:, +D - E,د - ای, +Daily Time to send,زمان ارسال روزانه, +Dashboard,داشبورد, +Data Based On,داده ها بر اساس, +Date , تاریخ, +Date must be between {0} and {1},تاریخ باید بین {0} و {1} باشد, +Days before the current subscription period,چند روز قبل از دوره اشتراک فعلی, +Deal Owner,صاحب معامله, +Debit (Transaction),بدهی (تراکنش), +Debit Amount in Transaction Currency,مبلغ بدهی به ارز تراکنش, +Decapitalization,سرمایه زدایی, +Decapitalized,بدون سرمایه, +Default Advance Account,حساب پیش فرض پیش فرض, +Default Advance Paid Account,حساب پیش فرض پیش پرداخت, +Default Advance Received Account,پیش فرض پیش فرض حساب دریافت شده, +Default BOM not found for FG Item {0},BOM پیش فرض برای آیتم کالای تمام شده {0} یافت نشد, +Default Discount Account,حساب تخفیف پیش فرض, +Default In-Transit Warehouse,انبار پیش فرض در حمل و نقل, +Default Payment Discount Account,حساب تخفیف پیش‌فرض پرداخت, +Default Provisional Account,حساب موقت پیش فرض, +Default Service Level Agreement for {0} already exists.,توافقنامه سطح سرویس پیش فرض برای {0} از قبل وجود دارد., +Default Unit of Measure for Item {0} cannot be changed directly because you have already made some transaction(s) with another UOM. You need to either cancel the linked documents or create a new Item.,واحد اندازه گیری پیش فرض برای مورد {0} را نمی توان مستقیماً تغییر داد زیرا قبلاً تراکنش(هایی) را با UOM دیگری انجام داده اید. شما باید اسناد پیوند داده شده را لغو کنید یا یک مورد جدید ایجاد کنید., +Default settings for your stock-related transactions,تنظیمات پیش‌فرض برای تراکنش‌های مربوط به موجودی شما, +"Default tax templates for sales, purchase and items are created.",الگوهای مالیاتی پیش فرض برای فروش، خرید و اقلام ایجاد می شود., +Deferred Accounting,حسابداری معوق, +Deferred Accounting Defaults,پیش‌فرض‌های حسابداری معوق, +Deferred Revenue and Expense,درآمد و هزینه معوق, +Deferred accounting failed for some invoices:,حسابداری معوق برای برخی از فاکتورها ناموفق بود:, +Delay (In Days),تاخیر (در چند روز), +Delayed,با تاخیر, +Delayed Tasks Summary,خلاصه وظایف تاخیری, +Delete Accounting and Stock Ledger Entries on deletion of Transaction,حذف ورودی های حسابداری و دفتر کل موجودی در حذف تراکنش, +Delete Cancelled Ledger Entries,ورودی های لغو شده در دفتر کل را حذف کنید, +Delete Dimension,حذف ابعاد, +Delete Leads and Addresses,سرنخ ها و آدرس ها را حذف کنید, +Delete Transactions,حذف تراکنش ها, +Deleted Documents,اسناد حذف شده, +Deletion in Progress!,حذف در حال انجام است!, +Delimiter options,گزینه های جداکننده, +Delivery Manager,مدیر تحویل, +Delivery Note Packed Item,کالای بسته بندی شده یادداشت تحویل, +Delivery Note(s) created for the Pick List,یادداشت(های) تحویل برای لیست انتخاب ایجاد شده است, +Delivery User,کاربر تحویل, +Delivery to,تحویل به, +Demo Company,شرکت دمو, +Demo data cleared,داده‌های نمایشی پاک شد, +Dependant SLE Voucher Detail No,شماره جزئیات کوپن SLE وابسته, +Dependent Task {0} is not a Template Task,وظیفه وابسته {0} یک کار الگو نیست, +Deposit,سپرده, +Depreciate based on daily pro-rata,استهلاک بر اساس تناسب روزانه, +Depreciate based on shifts,استهلاک بر اساس نوبت, +Depreciation Details,جزئیات استهلاک, +Depreciation Entry Posting Status,وضعیت ثبت استهلاک, +Depreciation Expense Account should be an Income or Expense Account.,حساب هزینه استهلاک باید یک حساب درآمد یا هزینه باشد., +Depreciation Schedule View,مشاهده برنامه زمانبندی استهلاک, +Depreciation cannot be calculated for fully depreciated assets,استهلاک برای دارایی های کاملا مستهلک شده قابل محاسبه نیست, +Description of Content,شرح مطالب, +Desk User,کاربر میز, +Difference In,تفاوت در, +Difference Posting Date,تفاوت تاریخ ارسال, +Difference Qty,تفاوت تعداد, +Different 'Source Warehouse' and 'Target Warehouse' can be set for each row.,برای هر ردیف می توان «انبار منبع» و «انبار هدف» متفاوتی را تنظیم کرد., +Dimension Details,جزئیات ابعاد, +Dimension Filter Help,راهنمای فیلتر ابعاد, +Dimension-wise Accounts Balance Report,گزارش تراز حسابها از نظر ابعاد, +Direct Expense,هزینه مستقیم, +Disable Last Purchase Rate,نرخ آخرین خرید را غیرفعال کنید, +Disable Serial No And Batch Selector,غیرفعال کردن سریال No And Batch Selector, +Disabled Account Selected,حساب غیرفعال انتخاب شد, +Disabled Warehouse {0} cannot be used for this transaction.,از انبار غیرفعال شده {0} نمی توان برای این تراکنش استفاده کرد., +Disabled pricing rules since this {} is an internal transfer,قوانین قیمت گذاری غیرفعال شده است زیرا این {} یک انتقال داخلی است, +Disabled tax included prices since this {} is an internal transfer,مالیات غیرفعال شامل قیمت‌ها می‌شود زیرا این {} یک انتقال داخلی است, +Disables auto-fetching of existing quantity,واکشی خودکار مقدار موجود را غیرفعال می کند, +Disassemble,مجزا کردن (دیس اسمبل), +Discount Account,حساب تخفیف, +Discount Date,تاریخ تخفیف, +Discount Settings,تنظیمات تخفیف, +Discount Validity,اعتبار تخفیف, +Discount Validity Based On,اعتبار تخفیف بر اساس, +Discount of {} applied as per Payment Term,تخفیف {} طبق شرایط پرداخت اعمال شد, +Discounted Amount,مبلغ با تخفیف, +"Discounts to be applied in sequential ranges like buy 1 get 1, buy 2 get 2, buy 3 get 3 and so on",تخفیف هایی که در محدوده های متوالی اعمال می شوند مانند خرید 1 دریافت 1، خرید 2 دریافت 2، خرید 3 دریافت 3 و غیره, +Discrepancy between General and Payment Ledger,اختلاف بین دفتر کل و دفتر پرداخت, +Dispatch Address,آدرس اعزام, +Dispatch Address Name,نام آدرس اعزام, +Distinct Item and Warehouse,کالا و انبار متمایز, +Distribute Additional Costs Based On , توزیع هزینه های اضافی بر اساس, +Distribute Manually,توزیع دستی, +Do Not Explode,گسترده نکنید, +DocTypes should not be added manually to the 'Excluded DocTypes' table. You are only allowed to remove entries from it.,DocTypes نباید به صورت دستی به جدول 'Excluded DocTypes' اضافه شود. شما فقط مجاز به حذف ورودی ها از آن هستید., +Document Type already used as a dimension,نوع سند قبلاً به عنوان بعد استفاده شده است, +Documents,اسناد, +Documents: {0} have deferred revenue/expense enabled for them. Cannot repost.,اسناد: {0} درآمد/هزینه معوق را برای آنها فعال کرده است. امکان ارسال مجدد وجود ندارد., +Domain Settings,تنظیمات دامنه, +Don't Reserve Sales Order Qty on Sales Return,تعداد سفارش فروش را در بازگشت فروش رزرو نکنید, +Don't Send Emails,ایمیل ارسال نکنید, +Dont Recompute tax,مالیات را دوباره محاسبه نکنید, +Download Backups,دانلود نسخه پشتیبان, +Download CSV Template,دانلود قالب CSV, +Download Materials Request Plan,دانلود طرح درخواست مواد, +Download Materials Request Plan Section,دانلود بخش طرح درخواست مواد, +Dunning Amount (Company Currency),مقدار Dunning (ارز شرکت), +Dunning Level,سطح دانینگ, +Duplicate Closing Stock Balance,تکرار کردن تراز موجودی اختتامیه, +Duplicate Customer Group,گروه مشتریان تکراری, +Duplicate Finance Book,کتاب مالی تکراری, +Duplicate Item Group,گروه آیتم تکراری, +Duplicate POS Invoices found,فاکتورهای POS تکراری پیدا شد, +Edit Capacity,ویرایش ظرفیت, +Edit Full Form,ویرایش فرم کامل, +Edit Note,ویرایش یادداشت, +Editing {0} is not allowed as per POS Profile settings,ویرایش {0} طبق تنظیمات نمایه POS مجاز نیست, +Either 'Selling' or 'Buying' must be selected,«فروش» یا «خرید» باید انتخاب شود, +Email / Notifications,ایمیل / اعلان ها, +Email Address (required),آدرس ایمیل (الزامی), +"Email Address must be unique, it is already used in {0}",آدرس ایمیل باید منحصر به فرد باشد، از قبل در {0} استفاده شده است, +Email Digest Recipient,دریافت کننده خلاصه ایمیل, +Email Digest: {0},خلاصه ایمیل: {0}, +Email Domain,دامنه ایمیل, +Email or Phone/Mobile of the Contact are mandatory to continue.,برای ادامه ایمیل یا تلفن/موبایل مخاطب الزامی است., +Email verification failed.,تأیید ایمیل انجام نشد., +Employee User Id,شناسه کاربر کارمند, +Enable Allow Partial Reservation in the Stock Settings to reserve partial stock.,برای رزرو موجودی جزئی، Allow Partial Reservation را در تنظیمات موجودی فعال کنید., +Enable Automatic Party Matching,تنظیم خودکار طرف را فعال کنید, +Enable Common Party Accounting,حسابداری طرف مشترک را فعال کنید, +Enable Discount Accounting for Selling,فعال کردن حسابداری تخفیف برای فروش, +Enable Fuzzy Matching,Fuzzy Matching را فعال کنید, +Enable Provisional Accounting For Non Stock Items,فعال کردن حسابداری موقت برای آیتم‌ها غیر موجودی, +Enable Stock Reservation,فعال کردن رزرو موجودی, +Enable it if users want to consider rejected materials to dispatch.,اگر کاربران می خواهند مواد رد شده را برای ارسال در نظر بگیرند، آن را فعال کنید., +Enable to apply SLA on every {0},فعال کردن اعمال SLA در هر {0}, +Enabling this option will allow you to record -

1. Advances Received in a Liability Account instead of the Asset Account

2. Advances Paid in an Asset Account instead of the Liability Account,فعال کردن این گزینه به شما امکان می دهد ثبت کنید -

1. پیش پرداخت های دریافت شده در حساب بدهی به جای حساب دارایی

2. پیش پرداخت های پرداخت شده در حساب دارایی به جای حساب بدهی, +Enabling this will allow creation of multi-currency invoices against single party account in company currency,فعال کردن این امکان ایجاد صورتحساب‌های چند ارزی را در برابر حساب یک طرف به واحد پول شرکت فراهم می‌کند, +End Transit,پایان حمل و نقل, +End of the current subscription period,پایان دوره اشتراک فعلی, +"Enter First and Last name of Employee, based on Which Full Name will be updated. IN transactions, it will be Full Name which will be fetched.",نام و نام خانوادگی کارمند را که بر اساس نام کامل به روز می شود وارد کنید. در معاملات، نام کامل خواهد بود که واکشی می شود., +Enter Manually,ورود دستی, +Enter Serial Nos,شماره های سریال را وارد کنید, +Enter Visit Details,جزئیات بازدید را وارد کنید, +Enter a name for Routing.,یک نام برای مسیریابی وارد کنید., +"Enter a name for the Operation, for example, Cutting.",یک نام برای عملیات وارد کنید، به عنوان مثال، برش., +Enter a name for this Holiday List.,یک نام برای این لیست تعطیلات وارد کنید., +"Enter an Item Code, the name will be auto-filled the same as Item Code on clicking inside the Item Name field.",یک کد مورد را وارد کنید، نام با کلیک کردن در داخل قسمت نام مورد، به طور خودکار مانند کد مورد پر می شود., +Enter each serial no in a new line,هر شماره سریال را در یک خط جدید وارد کنید, +Enter the opening stock units.,واحدهای موجودی افتتاحی را وارد کنید., +Enter the quantity of the Item that will be manufactured from this Bill of Materials.,مقدار آیتمی را که از این صورتحساب مواد تولید می شود وارد کنید., +Enter the quantity to manufacture. Raw material Items will be fetched only when this is set.,مقدار تولید را وارد کنید. آیتم‌های مواد خام فقط زمانی واکشی می شوند که این تنظیم شود., +Error during caller information update,خطا در حین به روز رسانی اطلاعات تماس گیرنده, +Error while posting depreciation entries,خطا هنگام ارسال ورودی های استهلاک, +Error while processing deferred accounting for {0},خطا هنگام پردازش حسابداری معوق برای {0}, +Error while reposting item valuation,خطا هنگام ارسال مجدد ارزیابی مورد, +Errors Notification,اعلان خطاها, +Even invoices with apply tax withholding unchecked will be considered for checking cumulative threshold breach,حتی فاکتورهایی با اعمال کسر مالیات بدون بررسی برای بررسی نقض آستانه تجمعی در نظر گرفته می‌شوند., +Example URL,URL مثال, +Example of a linked document: {0},نمونه ای از یک سند پیوندی: {0}, +Example: Serial No {0} reserved in {1}.,مثال: شماره سریال {0} در {1} رزرو شده است., +Excess Materials Consumed,مواد اضافی مصرف شده, +Excess Transfer,انتقال مازاد, +Exchange Gain Or Loss,سود یا ضرر مبادله, +Exchange Gain/Loss amount has been booked through {0},مبلغ سود/زیان مبادله از طریق {0} رزرو شده است, +Exchange Rate Revaluation Settings,تنظیمات تجدید ارزیابی نرخ ارز, +Excluded DocTypes,DocType های حذف شده, +Exempt Supplies,لوازم معاف, +Expected,انتظار می رود, +Expected Balance Qty,مقدار تراز مورد انتظار, +Expected End Date should be less than or equal to parent task's Expected End Date {0}.,تاریخ پایان مورد انتظار باید کمتر یا مساوی با تاریخ پایان مورد انتظار وظیفه والد {0} باشد., +Expected Stock Value,ارزش موجودی مورد انتظار, +Expected Time Required (In Mins),زمان مورد نیاز مورد انتظار (به دقیقه), +Expiry,انقضا, +Export Data,برون‌بُرد داده ها, +Export Errored Rows,صادر کردن ردیف های خطا, +Export Import Log,لاگ درون‌بُرد برون‌بُرد, +Extra Consumed Qty,مقدار مصرف اضافی, +Extra Job Card Quantity,مقدار کارت کار اضافی, +FIFO Queue vs Qty After Transaction Comparison,صف FIFO در مقابل تعداد پس از مقایسه تراکنش, +"FIFO Stock Queue (qty, rate)",صف موجودی FIFO (تعداد، نرخ), +FIFO/LIFO Queue,صف FIFO/LIFO, +Failed Entries,ورودی های ناموفق, +"Failed to erase demo data, please delete the demo company manually.",داده‌های نمایشی پاک نشد، لطفاً شرکت نمایشی را به صورت دستی حذف کنید., +Failed to setup defaults for country {0}. Please contact support.,تنظیم پیش فرض های کشور {0} انجام نشد. لطفا با پشتیبانی تماس بگیرید., +Failure,شکست, +Failure Description,شرح شکست, +Fetch Based On,واکشی بر اساس, +Fetch Overdue Payments,واکشی پرداخت های معوق, +Fetch Timesheet,واکشی جدول زمانی, +Fetch Value From,واکشی ارزش از, +Fetching exchange rates ...,واکشی نرخ ارز ..., +Filter by Reference Date,فیلتر بر اساس تاریخ مرجع, +Filter on Invoice,فیلتر روی فاکتور, +Filter on Payment,فیلتر در پرداخت, +Filters missing,فیلترها یافت نشدند, +Final Product,محصول نهایی, +Financial Ratios,نسبت های مالی, +Financial Reports,گزارشهای مالی, +Financial Year Begins On,سال مالی شروع می شود, +Financial reports will be generated using GL Entry doctypes (should be enabled if Period Closing Voucher is not posted for all years sequentially or missing) ,گزارش‌های مالی با استفاده از اسناد ثبت دفتر کل ایجاد می‌شوند (اگر کوپن پایان دوره برای همه سال‌ها به‌طور متوالی پست نشده باشد یا مفقود شده باشد، باید فعال شود) , +Finished Good BOM,BOM کالای تمام شده, +Finished Good Item,آیتم کالای تمام شده, +Finished Good Item Qty,تعداد آیتم کالای تمام شده, +Finished Good Item Quantity,تعداد آیتم کالای تمام شده, +Finished Good Item is not specified for service item {0},آیتم کالای تمام شده برای آیتم سرویس مشخص نشده است {0}, +Finished Good Item {0} Qty can not be zero,مقدار آیتم کالای تمام شده {0} تعداد نمی تواند صفر باشد, +Finished Good Item {0} must be a sub-contracted item,آیتم کالای تمام شده {0} باید یک آیتم قرارداد فرعی باشد, +Finished Good Qty,مقدار کالای تمام شده, +Finished Good Quantity ,مقدار کالای تمام شده , +Finished Good UOM,UOM خوب به پایان رسید, +Finished Good {0} does not have a default BOM.,Finished Good {0} BOM پیش فرض ندارد., +Finished Good {0} is disabled.,Finished Good {0} غیرفعال است., +Finished Good {0} must be a stock item.,کالای تمام شده {0} باید یک آیتم موجودی باشد., +Finished Good {0} must be a sub-contracted item.,کالای تمام شده {0} باید یک آیتم قرارداد فرعی باشد., +Finished Goods Based Operating Cost,هزینه عملیاتی بر اساس کالاهای تمام شده, +Finished Goods Item,آیتم کالاهای تمام شده, +Finished Goods Reference,مرجع کالاهای تمام شده, +Finished Goods Value,ارزش کالاهای تمام شده, +Finished Goods based Operating Cost,هزینه عملیاتی بر اساس کالاهای تمام شده, +Finished Item {0} does not match with Work Order {1},مورد تمام شده {0} با دستور کار {1} مطابقت ندارد, +First Response Due,اولین پاسخ به علت, +First Response SLA Failed by {},اولین پاسخ SLA توسط {} انجام نشد, +Fixed Asset Defaults,پیش فرض دارایی های ثابت, +Fixed Time,زمان ثابت, +For Item,برای آیتم, +For Job Card,برای کارت کار, +For Operation,برای عملیات, +For Work Order,برای دستور کار, +For dunning fee and interest,برای هزینه و سود, +"For item {0}, rate must be a positive number. To Allow negative rates, enable {1} in {2}",برای مورد {0}، نرخ باید یک عدد مثبت باشد. برای مجاز کردن نرخ‌های منفی، {1} را در {2} فعال کنید, +For quantity {0} should not be greater than allowed quantity {1},برای مقدار {0} نباید بیشتر از مقدار مجاز {1} باشد, +Forecasting,پیش بینی, +Formula Based Criteria,معیارهای مبتنی بر فرمول, +Free Item Rate,نرخ آیتم رایگان, +From Corrective Job Card,از کارت کار اصلاحی, +From Date and To Date are mandatory,از تاریخ و تا تاریخ اجباری است, +From Delivery Date,از تاریخ تحویل, +From Doctype,از Doctype, +From Due Date,از تاریخ سررسید, +From Opportunity,از فرصت, +From Payment Date,از تاریخ پرداخت, +From Reference Date,از تاریخ مرجع, +From Voucher Detail No,از جزئیات کوپن شماره, +From Voucher No,از کوپن شماره, +From Voucher Type,از نوع کوپن, +From and To dates are required,تاریخ های از و تا تاریخ لازم است, +Full and Final Statement,صورت کامل و نهایی, +GL Balance,تراز دفتر کل, +GL Entry Processing Status,وضعیت پردازش ثبت دفتر کل, +GL reposting index,فهرست ارسال مجدد دفتر کل, +Gain/Loss accumulated in foreign currency account. Accounts with '0' balance in either Base or Account currency,سود/زیان انباشته شده در حساب ارزی. حساب‌هایی با موجودی «0» به ارز پایه یا حساب, +Gain/Loss already booked,سود/باخت قبلا رزرو شده است, +Gain/Loss from Revaluation,سود/زیان ناشی از تجدید ارزیابی, +General Ledger,دفتر کل مرکزی,Warehouse +General and Payment Ledger Comparison,مقایسه دفتر کل مرکزی و پرداخت, +General and Payment Ledger mismatch,عدم تطابق دفتر کل و دفتر پرداخت, +Generate Closing Stock Balance,ایجاد تراز موجودی اختتامیه, +Generate Demo Data for Exploration,داده های نسخه ی نمایشی را برای کاوش ایجاد کنید, +Generate E-Invoice,ایجاد فاکتور الکترونیکی, +Generate Invoice At,ایجاد فاکتور در, +Generating Preview,ایجاد پیش نمایش, +Get Allocations,تخصیص ها را دریافت کنید, +Get Customer Group Details,دریافت جزئیات گروه مشتری, +Get Finished Goods for Manufacture,دریافت کالاهای تمام شده برای تولید, +Get Outstanding Orders,دریافت سفارش‌های معوق, +Get Raw Materials for Purchase,دریافت مواد اولیه برای خرید, +Get Raw Materials for Transfer,دریافت مواد اولیه برای انتقال, +Get Scrap Items,آیتم‌های ضایعات را دریافت کنید, +Get Stock,موجودی دریافت کنید, +Get Sub Assembly Items,دریافت آیتم‌های زیر مونتاژ, +Get Supplier Group Details,جزئیات گروه تامین کننده را دریافت کنید, +Get Timesheets,برگه های زمانی را دریافت کنید, +Get stops from,توقف از, +Getting Scrap Items,دریافت آیتم‌های ضایعات, +Give free item for every N quantity,برای هر N مقدار آیتم رایگان بدهید, +Go back,برگرد, +Go to {0} List,به فهرست {0} بروید, +Goals,اهداف, +Goods,کالاها, +Grant Commission,اعطاء کمیسیون, +Greeting Message,پیام تبریک, +Gross Profit Percent,درصد سود ناخالص, +Gross Purchase Amount should be equal to purchase amount of one single Asset.,مقدار خرید ناخالص باید برابر برای خرید یک دارایی واحد باشد., +Group Same Items,گروه بندی آیتم‌های مشابه, +Growth View,نمای رشد, +Half-yearly,نیم سال, +Has Alternative Item,دارای آیتم جایگزین, +Has Item Scanned,آیتم اسکن شده است, +Have Default Naming Series for Batch ID?,آیا سری نام‌گذاری پیش‌فرض برای Batch ID دارید؟, +Heatmap,نقشه حرارت, +Height (cm),ارتفاع (سانتی متر), +"Hello,",سلام،, +Here are the error logs for the aforementioned failed depreciation entries: {0},در اینجا گزارش های خطا برای ورودی های استهلاک ناموفق فوق الذکر آمده است: {0}, +Here are the options to proceed:,در اینجا گزینه هایی برای ادامه وجود دارد:, +"Here, you can select a senior of this Employee. Based on this, Organization Chart will be populated.",در اینجا، می توانید یک ارشد این کارمند را انتخاب کنید. بر این اساس نمودار سازمانی پر می شود., +"Here, your weekly offs are pre-populated based on the previous selections. You can add more rows to also add public and national holidays individually.",در اینجا، تخفیف‌های هفتگی شما بر اساس انتخاب‌های قبلی از قبل پر شده است. می‌توانید ردیف‌های بیشتری اضافه کنید تا تعطیلات عمومی و ملی را به‌صورت جداگانه اضافه کنید., +"Hi,",سلام،, +Hide Images,مخفی کردن تصاویر, +Holiday Date {0} added multiple times,تاریخ تعطیلات {0} چندین بار اضافه شد, +Hours Spent,ساعت های صرف شده, +How often should Project be updated of Total Purchase Cost ?,هر چند وقت یکبار پروژه باید از هزینه کل خرید به روز شود؟, +I - J,من - جی, +I - K,من - ک, +Idle,بیکار (Idle), +"If an operation is divided into sub operations, they can be added here.",اگر یک عملیات به عملیات فرعی تقسیم شود، می توان آنها را در اینجا اضافه کرد., +"If checked, Rejected Quantity will be included while making Purchase Invoice from Purchase Receipt.",در صورت علامت زدن، مقدار رد شده هنگام تهیه فاکتور خرید از رسید خرید لحاظ می شود., +"If checked, Stock will be reserved on Submit",در صورت علامت زدن، موجودی در ارسال رزرو خواهد شد, +"If checked, picked qty won't automatically be fulfilled on submit of pick list.",اگر علامت زده شود، تعداد انتخاب شده به طور خودکار در ارسال لیست انتخاب انجام نمی شود., +"If checked, the tax amount will be considered as already included in the Paid Amount in Payment Entry",در صورت بررسی، مبلغ مالیات به عنوان مبلغ پرداخت شده در ثبت پرداخت در نظر گرفته می شود, +"If checked, we will create demo data for you to explore the system. This demo data can be erased later.",در صورت علامت زدن، داده‌های نمایشی را برای شما ایجاد می‌کنیم تا سیستم را کاوش کنید. این داده های نمایشی را می توان بعداً پاک کرد., +If enabled then system won't override the picked qty / batches / serial numbers.,اگر فعال باشد، سیستم تعداد / دسته / شماره سریال انتخاب شده را بازنویسی نمی کند., +"If enabled, a print of this document will be attached to each email",در صورت فعال بودن، چاپی از این سند به هر ایمیل پیوست می شود, +"If enabled, additional ledger entries will be made for discounts in a separate Discount Account",در صورت فعال بودن، ورودی های دفتر کل اضافی برای تخفیف در یک حساب تخفیف جداگانه ایجاد می شود, +"If enabled, all files attached to this document will be attached to each email",در صورت فعال بودن، تمام فایل های پیوست شده به این سند به هر ایمیل پیوست می شود, +"If enabled, ledger entries will be posted for change amount in POS transactions",در صورت فعال بودن، ورودی‌های دفتر کل برای مبلغ تغییر در تراکنش‌های POS پست می‌شوند, +"If enabled, the consolidated invoices will have rounded total disabled",در صورت فعال بودن، صورتحساب‌های تلفیقی، کل غیرفعال می‌شوند, +"If enabled, the system will create material requests even if the stock exists in the 'Raw Materials Warehouse'.","اگر فعال باشد، سیستم حتی اگر موجودی در ""انبار مواد خام"" وجود داشته باشد، درخواست های مواد ایجاد می کند.", +"If mentioned, the system will allow only the users with this Role to create or modify any stock transaction earlier than the latest stock transaction for a specific item and warehouse. If set as blank, it allows all users to create/edit back-dated transactions.",در صورت ذکر شده، این سیستم فقط به کاربران دارای این نقش اجازه می‌دهد تا هر تراکنش موجودی را زودتر از آخرین تراکنش موجودی برای یک کالا و انبار خاص ایجاد یا اصلاح کنند. اگر به صورت خالی تنظیم شود، به همه کاربران اجازه می دهد تا تراکنش های قدیمی را ایجاد/ویرایش کنند., +"If not, you can Cancel / Submit this entry",اگر نه، می توانید این ثبت را لغو / ارسال کنید, +"If rate is zero then item will be treated as ""Free Item""","اگر نرخ صفر باشد، آیتم به عنوان ""آیتم رایگان"" تلقی می شود", +"If the BOM results in Scrap material, the Scrap Warehouse needs to be selected.",اگر BOM منجر به مواد قراضه شود، انبار ضایعات باید انتخاب شود., +"If the selected BOM has Operations mentioned in it, the system will fetch all Operations from BOM, these values can be changed.",اگر BOM انتخاب شده دارای عملیات ذکر شده در آن باشد، سیستم تمام عملیات را از BOM واکشی می کند، این مقادیر را می توان تغییر داد., +"If this checkbox is enabled, then the system won’t run the MRP for the available sub-assembly items.",اگر این چک باکس فعال باشد، سیستم MRP را برای آیتم‌های زیر مونتاژ موجود اجرا نمی کند., +If this is undesirable please cancel the corresponding Payment Entry.,اگر این امر نامطلوب است، لطفاً ثبت پرداخت مربوطه را لغو کنید., +"If yes, then this warehouse will be used to store rejected materials",اگر بله، پس از این انبار برای نگهداری مواد رد شده استفاده می شود, +"If you are maintaining stock of this Item in your Inventory, ERPNext will make a stock ledger entry for each transaction of this item.",اگر موجودی این کالا را در موجودی خود نگهداری می کنید، ERPNext برای هر تراکنش این کالا یک ثبت در دفتر کل موجودی ایجاد می کند., +"If you need to reconcile particular transactions against each other, then please select accordingly. If not, all the transactions will be allocated in FIFO order.",اگر نیاز به تطبیق معاملات خاصی با یکدیگر دارید، لطفاً مطابق آن را انتخاب کنید. در غیر این صورت، تمام تراکنش ها به ترتیب FIFO تخصیص می یابد., +"If you still want to proceed, please disable 'Skip Available Sub Assembly Items' checkbox.",اگر همچنان می‌خواهید ادامه دهید، لطفاً کادر انتخاب «صرف نظر از آیتم‌های زیر مونتاژ موجود» را غیرفعال کنید., +"If you still want to proceed, please enable {0}.",اگر همچنان می‌خواهید ادامه دهید، لطفاً {0} را فعال کنید., +"If your CSV uses a different delimiter, add that character here, ensuring no spaces or additional characters are included.",اگر CSV شما از جداکننده دیگری استفاده می‌کند، آن کاراکتر را در اینجا اضافه کنید، مطمئن شوید که هیچ فاصله یا نویسه اضافی در آن وجود ندارد., +Ignore Account Closing Balance,نادیده گرفتن موجودی بسته شدن حساب, +Ignore Available Stock,نادیده گرفتن موجودی در دسترس, +Ignore Closing Balance,نادیده گرفتن تراز اختتامیه, +Ignore Default Payment Terms Template,الگوی شرایط پرداخت پیش‌فرض را نادیده بگیرید, +Ignore Empty Stock,موجودی خالی را نادیده بگیرید, +Ignore Exchange Rate Revaluation Journals,دفتر روزنامه های تجدید ارزیابی نرخ ارز را نادیده بگیرید, +Ignore Pricing Rule is enabled. Cannot apply coupon code.,نادیده گرفتن قانون قیمت گذاری فعال است. نمی توان کد تخفیف را اعمال کرد., +Ignore Voucher Type filter and Select Vouchers Manually,فیلتر نوع کوپن را نادیده بگیرید و کوپن ها را به صورت دستی انتخاب کنید, +Import File,درون‌بُرد فایل, +Import File Errors and Warnings,خطاها و هشدارهای درون‌بُرد فایل, +Import Log Preview,پیش نمایش لاگ درون‌بُرد, +Import Preview,پیش نمایش درون‌بُرد, +Import Progress,پیشرفت درون‌بُرد, +Import Type,نوع درون‌بُرد, +Import Using CSV file,درون‌بُرد با استفاده از فایل CSV, +Import Warnings,هشدارهای درون‌بُرد, +Import from Google Sheets,درون‌بُرد از Google Sheets, +"Importing {0} of {1}, {2}",در حال درون‌بُرد {0} از {1}، {2}, +In House,در خانه, +In Minutes,به دقیقه, +In Party Currency,به ارز طرف, +In Transit Transfer,در انتقال ترانزیت, +In Transit Warehouse,در انبار ترانزیت, +In mins,به دقیقه, +"In row {0} of Appointment Booking Slots: ""To Time"" must be later than ""From Time"".",در ردیف {0} قسمت‌های رزرو قرار ملاقات: «تا زمان» باید دیرتر از «از زمان» باشد., +"In the case of 'Use Multi-Level BOM' in a work order, if the user wishes to add sub-assembly costs to Finished Goods items without using a job card as well the scrap items, then this option needs to be enable.",در مورد «استفاده از BOM چند سطحی» در یک دستور کار، اگر کاربر بخواهد هزینه‌های زیر مونتاژ را بدون استفاده از کارت کار و همچنین آیتم‌های ضایعات به کالاهای نهایی اضافه کند، این گزینه باید فعال شود., +"In this section, you can define Company-wide transaction-related defaults for this Item. Eg. Default Warehouse, Default Price List, Supplier, etc.",در این بخش می‌توانید پیش‌فرض‌های مربوط به تراکنش‌های کل شرکت را برای این آیتم تعریف کنید. به عنوان مثال. انبار پیش فرض، لیست قیمت پیش فرض، تامین کننده و غیره, +Inactive Status,وضعیت غیر فعال, +Include Account Currency,شامل ارز حساب, +Include Default FB Assets,دارایی های پیش فرض FB را شامل شود, +Include Disabled,شامل افراد غیر فعال, +Include Safety Stock in Required Qty Calculation,لحاظ کردن موجودی ایمنی در محاسبه مقدار مورد نیاز, +Include Timesheets in Draft Status,شامل جدول زمانی در وضعیت پیش نویس, +Include Zero Stock Items,شامل آیتم‌های موجودی صفر, +Incoming Call Handling Schedule,برنامه رسیدگی به تماس های ورودی, +Incoming Call Settings,تنظیمات تماس ورودی, +Incoming Rate (Costing),نرخ ورودی (هزینه‌یابی), +Incorrect Balance Qty After Transaction,تعداد موجودی نادرست پس از تراکنش, +Incorrect Batch Consumed,دسته نادرست مصرف شده است, +Incorrect Invoice,فاکتور نادرست, +Incorrect Movement Purpose,هدف جابجایی نادرست, +Incorrect Payment Type,نوع پرداخت نادرست, +Incorrect Serial No Valuation,ارزش گذاری شماره سریال نادرست است, +Incorrect Serial Number Consumed,شماره سریال نادرست مصرف شده است, +Incorrect Stock Value Report,گزارش ارزش موجودی نادرست است, +Incorrect Type of Transaction,نوع تراکنش نادرست, +Incoterm,اینکوترم, +Increase In Asset Life(Months),افزایش عمر دارایی (ماه), +Indent,تورفتگی, +Indirect Expense,هزینه غیر مستقیم, +Individual GL Entry cannot be cancelled.,ثبت انفرادی دفتر کل را نمی توان لغو کرد., +Individual Stock Ledger Entry cannot be cancelled.,ورود فردی به دفتر موجودی را نمی توان لغو کرد., +Insert New Records,درج رکوردهای جدید, +Inspection Rejected,بازرسی رد شد, +Inspection Submission,ارسال بازرسی, +Instruction,دستورالعمل, +Insufficient Capacity,ظرفیت ناکافی, +Insufficient Stock for Batch,موجودی ناکافی برای دسته, +Inter Transfer Reference,مرجع انتقال داخلی, +Interest and/or dunning fee,بهره و/یا هزینه اجناس, +Internal,درونی؛ داخلی, +Internal Customer,مشتری داخلی, +Internal Customer for company {0} already exists,مشتری داخلی برای شرکت {0} از قبل وجود دارد, +Internal Sale or Delivery Reference missing.,مرجع فروش داخلی یا تحویل موجود نیست., +Internal Sales Reference Missing,مرجع فروش داخلی وجود ندارد, +Internal Supplier,تامین کننده داخلی, +Internal Supplier for company {0} already exists,تامین کننده داخلی برای شرکت {0} از قبل وجود دارد, +Internal Transfer Reference Missing,مرجع انتقال داخلی وجود ندارد, +Internal Transfers,نقل و انتقالات داخلی, +Internal transfers can only be done in company's default currency,نقل و انتقالات داخلی فقط با ارز پیش فرض شرکت قابل انجام است, +Invalid,بی اعتبار, +Invalid Auto Repeat Date,تاریخ تکرار خودکار نامعتبر است, +Invalid Cost Center,مرکز هزینه نامعتبر است, +Invalid Delivery Date,تاریخ تحویل نامعتبر است, +Invalid Document,سند نامعتبر, +Invalid Document Type,نوع سند نامعتبر است, +Invalid Formula,فرمول نامعتبر است, +Invalid Group By,گروه نامعتبر توسط, +Invalid Item Defaults,پیش فرض های آیتم نامعتبر, +Invalid Ledger Entries,ورودی های دفتر نامعتبر, +Invalid Primary Role,نقش اصلی نامعتبر است, +Invalid Priority,اولویت نامعتبر است, +Invalid Process Loss Configuration,پیکربندی از دست دادن فرآیند نامعتبر است, +Invalid Purchase Invoice,فاکتور خرید نامعتبر, +Invalid Qty,تعداد نامعتبر است, +Invalid Schedule,زمانبندی نامعتبر است, +Invalid Warehouse,انبار نامعتبر, +Invalid result key. Response:,کلید نتیجه نامعتبر است. واکنش:, +Invalid value {0} for {1} against account {2},مقدار {0} برای {1} در برابر حساب {2} نامعتبر است, +Inventory Dimension,ابعاد موجودی, +Inventory Dimension Negative Stock,ابعاد موجودی منفی, +Inventory Settings,تنظیمات موجودی, +Invoice Cancellation,لغو فاکتور, +Invoice Limit,حد فاکتور, +Invoice Portion (%),سهم فاکتور (%), +Invoice and Billing,فاکتور و صورتحساب, +Invoiced Qty,تعداد فاکتور, +Invoices and Payments have been Fetched and Allocated,فاکتورها و پرداخت ها واکشی و تخصیص داده شده است, +Invoicing Features,ویژگی های صورتحساب, +Is Adjustment Entry,ثبت تعدیل است, +Is Alternative,جایگزین است, +Is Cash or Non Trade Discount,تخفیف نقدی یا غیرتجاری است, +Is Composite Asset,دارایی مرکب است, +Is Corrective Job Card,کارت کار اصلاحی است, +Is Corrective Operation,عملیات اصلاحی است, +Is Expandable,قابل گسترش است, +Is Finished Item,مورد تمام شده است, +Is Fully Depreciated,کاملا مستهلک شده, +Is Group Warehouse,انبار گروه است, +Is Old Subcontracting Flow,جریان پیمانکاری فرعی قدیمی است, +Is Outward,بیرونی است, +Is Period Closing Voucher Entry,ثبت کوپن پایان دوره است, +Is Rate Adjustment Entry (Debit Note),ثبت تعدیل نرخ است (یادداشت بدهی), +Is Recursive,بازگشتی است, +Is Rejected,رد شده است, +Is Rejected Warehouse,انبار مرجوعی است, +Is Scrap Item,آیتم ضایعات است, +Is Short Year,سال کوتاه است, +Is Standard,استاندارد است, +Is Stock Item,آیتم موجودی است, +Is System Generated,سیستم تولید شده است, +Is Template,قالب است, +Issue Analytics,تجزیه و تحلیل مشکل, +Issue Summary,خلاصه مشکل, +Issue a debit note with 0 qty against an existing Sales Invoice,در مقابل فاکتور فروش موجود، یک برگه بدهی با مقدار 0 صادر کنید, +Issuing cannot be done to a location. Please enter employee to issue the Asset {0} to,صدور را نمی توان به یک مکان انجام داد. لطفاً کارمند را وارد کنید تا دارایی {0} را صادر کند, +It can take upto few hours for accurate stock values to be visible after merging items.,ممکن است چند ساعت طول بکشد تا ارزش موجودی دقیق پس از ادغام اقلام قابل مشاهده باشد., +"It's not possible to distribute charges equally when total amount is zero, please set 'Distribute Charges Based On' as 'Quantity'",وقتی مبلغ کل صفر است، نمی توان هزینه ها را به طور مساوی تقسیم کرد، لطفاً «توزیع هزینه ها بر اساس» را به عنوان «مقدار» تنظیم کنید, +Item Code (Final Product),کد آیتم (محصول نهایی), +Item Group wise Discount,تخفیف بر اساس گروه آیتم, +Item Price Settings,تنظیمات قیمت آیتم, +"Item Price appears multiple times based on Price List, Supplier/Customer, Currency, Item, Batch, UOM, Qty, and Dates.",قیمت آیتم چندین بار بر اساس لیست قیمت، تامین کننده/مشتری، ارز، آیتم، دسته، UOM، مقدار و تاریخ ها ظاهر می شود., +Item Reference,مرجع آیتم, +Item Warehouse based reposting has been enabled.,ارسال مجدد بر اساس انبار مورد فعال شده است., +Item and Warehouse,آیتم و انبار, +Item is removed since no serial / batch no selected.,مورد حذف شده است زیرا هیچ سریال / دسته ای انتخاب نشده است., +Item qty can not be updated as raw materials are already processed.,تعداد مورد را نمی توان به روز کرد زیرا مواد خام قبلاً پردازش شده است., +Item rate has been updated to zero as Allow Zero Valuation Rate is checked for item {0},نرخ مورد به صفر به‌روزرسانی شده است زیرا نرخ ارزش گذاری مجاز صفر برای مورد {0} بررسی می‌شود, +Item valuation reposting in progress. Report might show incorrect item valuation.,ارسال مجدد ارزیابی آیتم در حال انجام است. گزارش ممکن است ارزش گذاری اقلام نادرست را نشان دهد., +Item {0} cannot be added as a sub-assembly of itself,آیتم {0} را نمی توان به عنوان یک زیر مونتاژ از خودش اضافه کرد, +Item {0} cannot be ordered more than {1} against Blanket Order {2}.,مورد {0} را نمی توان بیش از {1} در مقابل سفارش بلانکت {2} سفارش داد., +Item {0} does not exist.,آیتم {0} وجود ندارد., +Item {0} entered multiple times.,آیتم {0} چندین بار وارد شده است., +Item {0} is already reserved/delivered against Sales Order {1}.,مورد {0} قبلاً در برابر سفارش فروش {1} رزرو شده/تحویل شده است., +Item {0} must be a Non-Stock Item,مورد {0} باید یک کالای غیر موجودی باشد, +Item {0} not found in 'Raw Materials Supplied' table in {1} {2},"مورد {0} در جدول ""مواد خام تامین شده"" در {1} {2} یافت نشد", +Item {0} not found.,مورد {0} یافت نشد., +Item {} does not exist.,مورد {} وجود ندارد., +Items & Pricing,آیتم‌ها و قیمت, +Items Catalogue,کاتالوگ آیتم‌ها, +Items cannot be updated as Subcontracting Order is created against the Purchase Order {0}.,موارد را نمی توان به روز کرد زیرا سفارش قرارداد فرعی در برابر سفارش خرید {0} ایجاد شده است., +Items rate has been updated to zero as Allow Zero Valuation Rate is checked for the following items: {0},نرخ اقلام به صفر به‌روزرسانی شده است زیرا نرخ ارزش گذاری مجاز صفر برای موارد زیر بررسی می‌شود: {0}, +Items to Be Repost,مواردی که باید بازنشر شوند, +Items to Order and Receive,آیتم‌های قابل سفارش و دریافت, +Items to Reserve,موارد برای رزرو, +Job Capacity,ظرفیت کاری, +Job Card Operation,عملیات کارت کار, +Job Card Scheduled Time,زمان برنامه ریزی شده کارت کار, +Job Card Scrap Item,آیتم ضایعات کارت کار, +Job Card and Capacity Planning,برنامه ریزی کارت کار و ظرفیت, +Job Paused,کار متوقف شد, +Job: {0} has been triggered for processing failed transactions,شغل: {0} برای پردازش تراکنش های ناموفق فعال شده است, +Joining,پیوستن, +Journal Entries,ورودی های دفتر روزنامه, +Journal Entry for Asset scrapping cannot be cancelled. Please restore the Asset.,ثبت دفتر روزنامه برای حذف دارایی را نمی توان لغو کرد. لطفا دارایی را بازیابی کنید., +Journal Entry type should be set as Depreciation Entry for asset depreciation,نوع ثبت دفتر روزنامه باید به عنوان ورودی استهلاک برای استهلاک دارایی تنظیم شود, +Journals,دفترهای روزنامه, +Key,کلید, +Kindly cancel the Manufacturing Entries first against the work order {0}.,لطفاً ابتدا ورودی‌های تولید را در برابر دستور کار {0} لغو کنید., +"Last Name, Email or Phone/Mobile of the user are mandatory to continue.",نام خانوادگی، ایمیل یا تلفن / تلفن همراه کاربر برای ادامه اجباری است., +Lead -> Prospect,سرنخ -> مشتری بالقوه, +Lead Conversion Time,زمان تبدیل سرنخ, +Lead Owner cannot be same as the Lead Email Address,مالک اصلی نمی تواند با آدرس ایمیل اصلی یکسان باشد, +Lead {0} has been added to prospect {1}.,سرنخ {0} به مشتری بالقوه {1} اضافه شده است., +Leaderboard,تابلوی امتیازات, +Leads,سرنخ ها, +Learn Accounting,حسابداری یاد بگیرید, +Learn Inventory Management,مدیریت لیست موجودی را یاد بگیرید, +Learn Manufacturing,یادگیری تولید, +Learn Procurement,تدارکات را بیاموزید, +Learn Project Management,مدیریت پروژه را یاد بگیرید, +Learn Sales Management,مدیریت فروش را یاد بگیرید, +Ledger Merge,ادغام دفتر کل, +Ledger Merge Accounts,حساب های ادغام دفتر کل, +Ledgers,دفتر کل, +Legend,افسانه, +Length,طول, +Length (cm),طول (سانتی متر), +Less than 12 months.,کمتر از 12 ماه., +Level (BOM),سطح (BOM), +Limit timeslot for Stock Reposting,محدودیت زمانی برای ارسال مجدد موجودی, +Limits don't apply on,محدودیت ها اعمال نمی شود, +Link a new bank account,پیوند یک حساب بانکی جدید, +Link with Customer,پیوند با مشتری, +Link with Supplier,پیوند با تامین کننده, +Linked with submitted documents,مرتبط با اسناد ارسالی, +Linking Failed,پیوند ناموفق بود, +Linking to Customer Failed. Please try again.,پیوند به مشتری انجام نشد. لطفا دوباره تلاش کنید., +Linking to Supplier Failed. Please try again.,پیوند به تامین کننده انجام نشد. لطفا دوباره تلاش کنید., +Links,پیوندها, +Loading import file...,در حال بارگیری فایل درون‌بُرد..., +Locked,قفل شده است, +Log Entries,ورودی های لاگ, +Lost Quotations,پیش فاکتور های از دست رفته, +Lost Quotations %,% پیش فاکتور های از دست رفته, +Lost Reasons are required in case opportunity is Lost.,در صورت از دست رفتن فرصت، دلایل از دست رفتن مورد نیاز است., +Lost Value,ارزش از دست رفته, +Lost Value %,مقدار از دست رفته %, +Machine Type,نوع ماشین, +Main Cost Center,مرکز هزینه اصلی, +Main Cost Center {0} cannot be entered in the child table,مرکز هزینه اصلی {0} را نمی توان در جدول فرزند وارد کرد, +Maintain Asset,حفظ دارایی, +Maintenance Details,جزئیات تعمیر و نگهداری, +Make , بسازید, +Make Asset Movement,جابجایی دارایی را ایجاد کنید, +Make Quotation,پیش فاکتور ایجاد کنید, +Make Return Entry,ایجاد ثبت بازگشت, +Make Serial No / Batch from Work Order,شماره سریال / دسته از دستور کار را بسازید, +Make {0} Variant,ایجاد {0} گونه, +Make {0} Variants,ایجاد {0} گونه, +Manage,مدیریت, +Mandatory Accounting Dimension,بعد حسابداری اجباری, +Mandatory Depends On,اجباری بستگی دارد, +Mandatory Field,فیلد اجباری, +Mandatory Section,بخش اجباری, +Manual Inspection,بازرسی دستی, +Manufacture Sub-assembly in Operation,تولید زیر مونتاژ در عملیات, +Manufacturing Type,نوع تولید, +Mapping Purchase Receipt ...,نگاشت رسید خرید ..., +Mapping Subcontracting Order ...,نگاشت سفارش پیمانکاری فرعی ..., +Mapping {0} ...,نگاشت {0}..., +Mark As Closed,علامت گذاری به عنوان بسته شده, +Material Returned from WIP,مواد برگردانده شده از «کار در حال انجام», +Material Transfer (In Transit),انتقال مواد (در حال حمل و نقل), +Materials are already received against the {0} {1},مواد قبلاً در مقابل {0} {1} دریافت شده است, +Materials needs to be transferred to the work in progress warehouse for the job card {0},برای کارت کار باید مواد به انبار کار در حال انجام انتقال داده شود {0}, +Max Qty (As Per Stock UOM),حداکثر تعداد (بر اساس موجودی UOM), +Maximum Net Rate,حداکثر نرخ خالص, +Maximum Payment Amount,حداکثر مبلغ پرداختی, +Maximum Value,حداکثر ارزش, +Maximum quantity scanned for item {0}.,حداکثر مقدار اسکن شده برای مورد {0}., +Meeting,ملاقات, +Mention if non-standard Receivable account,اگر حساب دریافتنی غیر استاندارد است را ذکر کنید, +Merge Invoices Based On,ادغام فاکتورها بر اساس, +Merge Progress,ادغام پیشرفت, +Merge Similar Account Heads,ادغام سران حساب های مشابه, +Merge taxes from multiple documents,ادغام مالیات از اسناد متعدد, +Merged,ادغام شد, +"Merging is only possible if following properties are same in both records. Is Group, Root Type, Company and Account Currency",ادغام تنها در صورتی امکان پذیر است که ویژگی های زیر در هر دو رکورد یکسان باشند. گروه، نوع ریشه، شرکت و ارز حساب است, +Merging {0} of {1},ادغام {0} از {1}, +Min Qty (As Per Stock UOM),حداقل تعداد (بر اساس موجودی UOM), +Min Qty should be greater than Recurse Over Qty,Min Qty باید بیشتر از Recurse Over Qty باشد, +Minimum Net Rate,حداقل نرخ خالص, +Minimum Payment Amount,حداقل مبلغ پرداختی, +Minimum Value,حداقل ارزش, +Mismatch,عدم تطابق, +Missing,جا افتاده, +Missing Asset,دارایی گمشده, +Missing Cost Center,مرکز هزینه جا افتاده, +Missing Finance Book,کتاب مالی جا افتاده, +Missing Finished Good,از دست رفته به پایان رسید, +Missing Formula,فرمول جا افتاده, +Missing Items,آیتم‌های جا افتاده, +Missing Payments App,برنامه پرداخت وجود ندارد, +Missing Serial No Bundle,باندل شماره سریال جا افتاده, +Missing value,مقدار از دست رفته, +Modified By,تغییر داده شده توسط, +Modified On,اصلاح شده در, +Module Settings,تنظیمات ماژول, +Move Stock,انتقال موجودی, +Move to Cart,جابجایی به سبد خرید, +Movement,جابجایی, +Moving up in tree ...,بالا رفتن در درخت..., +Multi-level BOM Creator,ایجاد کننده BOM چند سطحی, +Multiple Loyalty Programs found for Customer {}. Please select manually.,چندین برنامه وفاداری برای مشتری {} پیدا شد. لطفا به صورت دستی انتخاب کنید, +Multiple Warehouse Accounts,چندین حساب انبار, +Multiple items cannot be marked as finished item,چند مورد را نمی توان به عنوان مورد تمام شده علامت گذاری کرد, +Must be a publicly accessible Google Sheets URL and adding Bank Account column is necessary for importing via Google Sheets,باید یک URL کاربرگ‌نگار Google برای عموم قابل دسترسی باشد و افزودن ستون حساب بانکی برای درون‌بُرد از طریق Google Sheets ضروری است., +Named Place,مکان نامگذاری شده, +Naming Series and Price Defaults,نام گذاری سری ها و پیش فرض های قیمت, +Net total calculation precision loss,خالص از دست دادن دقت محاسبه کل, +New Balance In Account Currency,تراز جدید به ارز حساب, +New Event,رویداد جدید, +New Note,یادداشت جدید, +New Task,وظیفه جدید, +New Version,نسخه جدید, +Newsletter,خبرنامه, +No Answer,بدون پاسخ, +No Customers found with selected options.,هیچ مشتری با گزینه های انتخاب شده یافت نشد., +No Items selected for transfer.,هیچ موردی برای انتقال انتخاب نشده است., +No Matching Bank Transactions Found,هیچ تراکنش بانکی منطبقی یافت نشد, +No Notes,بدون یادداشت, +No Outstanding Invoices found for this party,هیچ صورتحساب معوقی برای این طرف یافت نشد, +No POS Profile found. Please create a New POS Profile first,هیچ نمایه POS یافت نشد. لطفا ابتدا یک نمایه POS جدید ایجاد کنید, +No Records for these settings.,هیچ رکوردی برای این تنظیمات وجود ندارد., +No Stock Available Currently,موجودی در حال حاضر موجود نیست, +No Summary,بدون خلاصه, +No Tax Withholding data found for the current posting date.,هیچ داده کسر مالیات برای تاریخ ارسال فعلی یافت نشد., +No Terms,بدون شرایط, +No Unreconciled Invoices and Payments found for this party and account,هیچ فاکتور و پرداخت ناسازگاری برای این طرف و حساب پیدا نشد, +No Unreconciled Payments found for this party,هیچ پرداخت ناسازگاری برای این طرف یافت نشد, +No Work Orders were created,هیچ دستور کار ایجاد نشد, +No additional fields available,هیچ فیلد اضافی در دسترس نیست, +No billing email found for customer: {0},هیچ ایمیل صورتحساب برای مشتری پیدا نشد: {0}, +No data found. Seems like you uploaded a blank file,داده ای یافت نشد. به نظر می رسد شما یک فایل خالی آپلود کرده اید, +No employee was scheduled for call popup,هیچ کارمندی برای فراخوانی برنامه ریزی نشده بود, +No failed logs,هیچ لاگ ناموفقی نیست, +No item available for transfer.,هیچ آیتمی برای انتقال موجود نیست., +No items are available in sales orders {0} for production,هیچ موردی در سفار‌ش‌های فروش {0} برای تولید موجود نیست, +No items are available in the sales order {0} for production,هیچ موردی در سفارش فروش {0} برای تولید موجود نیست, +No matches occurred via auto reconciliation,هیچ همخوانی ای از طریق تطبیق خودکار رخ نداد, +No more children on Left,دیگر هیچ فرزندی در سمت چپ وجود ندارد, +No more children on Right,دیگر هیچ فرزندی در سمت راست وجود ندارد, +No of Docs,شماره اسناد, +No of Employees,تعداد کارمندان, +No of Months (Expense),تعداد ماه ها (هزینه), +No of Months (Revenue),تعداد ماه ها (درآمد), +No open event,رویداد باز وجود ندارد, +No open task,هیچ وظیفه بازی نیست, +No outstanding {0} found for the {1} {2} which qualify the filters you have specified.,هیچ {0} معوقاتی برای {1} {2} که واجد شرایط فیلترهایی است که شما مشخص کرده اید، یافت نشد., +No primary email found for customer: {0},ایمیل اصلی برای مشتری پیدا نشد: {0}, +No records found in Allocation table,هیچ رکوردی در جدول تخصیص یافت نشد, +No records found in the Invoices table,هیچ رکوردی در جدول فاکتورها یافت نشد, +No records found in the Payments table,هیچ رکوردی در جدول پرداخت ها یافت نشد, +No stock transactions can be created or modified before this date.,هیچ تراکنش موجودیی را نمی توان قبل از این تاریخ ایجاد یا تغییر داد., +No {0} Accounts found for this company.,هیچ حساب {0} برای این شرکت یافت نشد., +No.,شماره, +No. of Employees,تعداد کارمندان, +No. of parallel job cards which can be allowed on this workstation. Example: 2 would mean this workstation can process production for two Work Orders at a time.,تعداد کارت کارهای موازی که می توانند در این ایستگاه کاری مجاز باشند. مثال: 2 به این معنی است که این ایستگاه کاری می تواند تولید را برای دو دستور کار در یک زمان پردازش کند., +Note: Automatic log deletion only applies to logs of type Update Cost,توجه: حذف خودکار لاگ فقط برای گزارش‌هایی از نوع به‌روزرسانی هزینه اعمال می‌شود, +"Note: To merge the items, create a separate Stock Reconciliation for the old item {0}",توجه: برای ادغام آیتم‌ها، یک تطبیق موجودی جداگانه برای آیتم قدیمی {0} ایجاد کنید, +Notes HTML,یادداشت های HTML, +Notification,اعلان, +Notification Settings,تنظیمات اعلان, +Notify Reposting Error to Role,خطای ارسال مجدد به نقش را اطلاع دهید, +Number of Days,تعداد روزها, +Numeric,عددی, +Numeric Inspection,بازرسی عددی, +Off,خاموش, +Offsetting Account,تسویه حساب, +Offsetting for Accounting Dimension,جبران برای بعد حسابداری, +On Paid Amount,با مبلغ پرداخت شده, +On This Date,در این تاریخ, +On Track,در مسیر, +"On expanding a row in the Items to Manufacture table, you'll see an option to 'Include Exploded Items'. Ticking this includes raw materials of the sub-assembly items in the production process.","با گسترش یک ردیف در جدول Items to Manufacture، گزینه ای برای ""شامل آیتم‌های گسترده شده"" را مشاهده خواهید کرد. تیک زدن این شامل مواد اولیه آیتم‌های زیر مونتاژ در فرآیند تولید می شود.", +Once the Work Order is Closed. It can't be resumed.,هنگامی که دستور کار بسته شد. نمی توان آن را از سر گرفت., +Only CSV and Excel files can be used to for importing data. Please check the file format you are trying to upload,برای درون‌بُرد داده ها فقط می توان از فایل های CSV و Excel استفاده کرد. لطفاً فرمت فایلی را که می‌خواهید آپلود کنید بررسی کنید, +Only Deduct Tax On Excess Amount , فقط از مقدار مازاد مالیات کسر کنید, +Only Include Allocated Payments,فقط شامل پرداخت های اختصاص داده شده است, +Only Parent can be of type {0},فقط والد می توانند از نوع {0} باشند, +Only existing assets,فقط دارایی های موجود, +"Only one Subcontracting Order can be created against a Purchase Order, cancel the existing Subcontracting Order to create a new one.",فقط یک سفارش پیمانکاری فرعی را می توان در مقابل یک سفارش خرید ایجاد کرد، برای ایجاد یک سفارش جدید، سفارش پیمانکاری فرعی موجود را لغو کنید., +Only {0} are supported,فقط {0} پشتیبانی می شود, +Open Activities HTML,Activity HTML را باز کنید, +Open Call Log,لاگ تماس را باز کنید, +Open Events,رویدادهای باز, +Open Sales Orders,باز کردن سفارش‌های فروش, +Open Task,وظیفه باز, +Open Tasks,وظایف باز, +Opening & Closing,افتتاحیه و اختتامیه, +Opening Accumulated Depreciation must be less than or equal to {0},استهلاک انباشته افتتاحیه باید کمتر یا مساوی با {0} باشد., +Opening Entry can not be created after Period Closing Voucher is created.,پس از ایجاد کوپن بسته شدن دوره، ورودی باز نمی تواند ایجاد شود., +Opening Purchase Invoices have been created.,فاکتورهای خرید افتتاحیه ایجاد شده است., +Opening Sales Invoices have been created.,فاکتورهای فروش افتتاحیه ایجاد شده است., +Operating Cost Per BOM Quantity,هزینه عملیاتی به ازای هر مقدار BOM, +Operation time does not depend on quantity to produce,زمان عملیات به مقدار تولید بستگی ندارد, +Opportunity Amount (Company Currency),مقدار فرصت (ارز شرکت), +Opportunity Owner,صاحب فرصت, +Opportunity Source,منبع فرصت, +Opportunity Summary by Sales Stage,خلاصه فرصت بر اساس مرحله فروش, +Opportunity Summary by Sales Stage ,خلاصه فرصت بر اساس مرحله فروش , +Opportunity Value,ارزش فرصت, +Order Status,وضعیت سفارش, +Other Info,سایر اطلاعات, +Out of stock,تمام شده, +Over Receipt,بیش از رسید, +Over Receipt/Delivery of {0} {1} ignored for item {2} because you have {3} role.,بیش از رسید/تحویل {0} {1} برای مورد {2} نادیده گرفته شد زیرا شما نقش {3} را دارید., +Over Transfer Allowance,بیش از کمک هزینه انتقال, +Overbilling of {0} {1} ignored for item {2} because you have {3} role.,اضافه صورتحساب {0} {1} برای مورد {2} نادیده گرفته شد زیرا شما نقش {3} را دارید., +Overbilling of {} ignored because you have {} role.,پرداخت بیش از حد {} نادیده گرفته شد زیرا شما نقش {} را دارید., +Overdue Payment,پرداخت معوقه, +Overdue Payments,پرداخت های معوق, +Overdue Tasks,وظایف عقب افتاده, +Overview,بررسی اجمالی, +PDF Name,نام PDF, +POS Closing Failed,بسته شدن POS ناموفق بود, +POS Closing failed while running in a background process. You can resolve the {0} and retry the process again.,بسته شدن POS هنگام اجرا در یک فرآیند پس‌زمینه انجام نشد. می توانید {0} را حل کنید و دوباره این فرآیند را امتحان کنید., +POS Invoices will be consolidated in a background process,فاکتورهای POS در یک فرآیند پس زمینه تلفیق می شوند, +POS Invoices will be unconsolidated in a background process,فاکتورهای POS در یک فرآیند پس زمینه تجمیع نمی شوند, +POS Profile {} contains Mode of Payment {}. Please remove them to disable this mode.,نمایه POS {} شامل حالت پرداخت {} است. لطفاً آنها را حذف کنید تا این حالت غیرفعال شود., +POS Search Fields,فیلدهای جستجوی POS, +POS Setting,تنظیمات POS, +Package No(s) already in use. Try from Package No {0},شماره (های) بسته در حال حاضر در حال استفاده است. از بسته شماره {0} امتحان کنید, +Packaging Slip From Delivery Note,برگه بسته بندی از یادداشت تحویل, +Packed Items cannot be transferred internally,اقلام بسته بندی شده را نمی توان به صورت داخلی منتقل کرد, +Packed Qty,تعداد بسته بندی شده, +Page Break After Each SoA,شکست صفحه پس از هر SoA, +Paid Amount After Tax,مبلغ پرداختی پس از کسر مالیات, +Paid Amount After Tax (Company Currency),مبلغ پرداختی پس از مالیات (ارز شرکت), +Paid From Account Type,پرداخت از نوع حساب, +Paid To Account Type,پرداخت به نوع حساب, +Pallets,پالت, +Parameter Group,گروه پارامتر, +Parameter Group Name,نام گروه پارامتر, +Parcel Template,قالب بسته, +Parcel Template Name,نام قالب بسته, +Parcel weight cannot be 0,وزن بسته نمی تواند 0 باشد, +Parcels,بسته ها, +Parent Account Missing,حساب والدین جا افتاده است, +Parent Document,سند والد, +Parent Item {0} must not be a Fixed Asset,مورد اصلی {0} نباید دارایی ثابت باشد, +Parent Row No,شماره ردیف والد, +Parent Task {0} is not a Template Task,وظیفه والد {0} یک وظیفه الگو نیست, +Partial Material Transferred,مواد جزئی منتقل شد, +Partial Stock Reservation,رزرو جزئی موجودی, +Partial Success,موفقیت جزئی, +"Partial stock can be reserved. For example, If you have a Sales Order of 100 units and the Available Stock is 90 units then a Stock Reservation Entry will be created for 90 units. ",موجودی جزئی قابل رزرو است. به عنوان مثال، اگر شما یک سفارش فروش 100 واحدی دارید و موجودی در دسترس 90 واحد است، یک ورودی رزرو موجودی برای 90 واحد ایجاد می شود. , +Partially Delivered,تا حدی تحویل شد, +Partially Reconciled,تا حدی تطبیق کرد, +Partially Reserved,تا حدی رزرو شده است, +Partly Paid,تا حدی پرداخت شده, +Partly Paid and Discounted,تا حدودی پرداخت شده و با تخفیف, +Partnership,شراکت, +Party Account No. (Bank Statement),شماره حساب طرف (صورتحساب بانکی), +Party Account {0} currency ({1}) and document currency ({2}) should be same,واحد پول حساب طرف {0} ({1}) و واحد پول سند ({2}) باید یکسان باشند, +Party IBAN (Bank Statement),طرف IBAN (صورتحساب بانکی), +Party Item Code,کد آیتم طرف, +Party Link,لینک طرف, +Party Name/Account Holder (Bank Statement),نام طرف / دارنده حساب (صورتحساب بانکی), +Party Specific Item,مورد خاص طرف, +Party Type and Party is required for Receivable / Payable account {0},نوع طرف و طرف برای حساب دریافتنی / پرداختنی {0} لازم است, +Party can only be one of {0},طرف فقط می تواند یکی از {0} باشد, +Passport Details,مشخصات پاسپورت, +Pause Job,مکث کار, +Paused,مکث کرد, +Payment Amount (Company Currency),مبلغ پرداختی (ارز شرکت), +"Payment Entry {0} is linked against Order {1}, check if it should be pulled as advance in this invoice.",ثبت پرداخت {0} با سفارش {1} مرتبط است، بررسی کنید که آیا باید به عنوان پیش پرداخت در این فاکتور آورده شود., +Payment Ledger,دفتر کل پرداخت, +Payment Ledger Balance,تراز دفتر کل پرداخت, +Payment Ledger Entry,ثبت دفتر پرداخت, +Payment Limit,محدودیت پرداخت, +Payment Reconciliation Allocation,تخصیص تطبیق پرداخت, +Payment Reconciliation Job: {0} is running for this party. Can't reconcile now.,کار تطبیق پرداخت: {0} برای این طرف اجرا می شود. الان نمیشه تطبیق کرد, +Payment Reconciliations,تطبیق های پرداخت, +Payment Request took too long to respond. Please try requesting for payment again.,پاسخ درخواست پرداخت خیلی طول کشید. لطفاً دوباره درخواست پرداخت کنید., +Payment Requests cannot be created against: {0},درخواست های پرداخت را نمی توان در مقابل: {0} ایجاد کرد, +Payment Terms Status for Sales Order,وضعیت شرایط پرداخت برای سفارش فروش, +Payment Terms from orders will be fetched into the invoices as is,شرایط پرداخت از سفارش‌ها همانطور که هست در فاکتورها آورده می شود, +Payment Unlink Error,خطای لغو پیوند پرداخت, +Payment of {0} received successfully.,پرداخت {0} با موفقیت دریافت شد., +Payment of {0} received successfully. Waiting for other requests to complete...,پرداخت {0} با موفقیت دریافت شد. در انتظار تکمیل درخواست های دیگر..., +Payment request failed,درخواست پرداخت انجام نشد, +Payment term {0} not used in {1},مدت پرداخت {0} در {1} استفاده نشده است, +Pending processing,در انتظار پردازش, +Per Received,هر دریافت شده, +Percentage (%),درصد (%), +Percentage you are allowed to order beyond the Blanket Order quantity.,درصدی که مجاز به سفارش آن هستید فراتر از مقدار سفارش کلی., +Percentage you are allowed to sell beyond the Blanket Order quantity.,درصدی که مجاز به فروش آن هستید فراتر از مقدار سفارش کلی., +Period Closed,دوره بسته است, +Period Closing Settings,تنظیمات اختتامیه دوره, +Period Details,جزئیات دوره, +Phone Ext.,تلفن خارجی, +Pick List Incomplete,فهرست انتخابی ناقص است, +Pick Manually,انتخاب دستی, +Pick Serial / Batch Based On,انتخاب سریال / دسته بر اساس, +Pick Serial / Batch No,انتخاب سریال / شماره دسته, +Picked Qty (in Stock UOM),تعداد انتخاب شده (در انبار UOM), +Pickup,سوار کردن, +Pickup Contact Person,شخص تماس وانت, +Pickup Date,تاریخ تحویل, +Pickup Date cannot be before this day,تاریخ تحویل نمی‌تواند قبل از این روز باشد, +Pickup From,وانت از, +Pickup To time should be greater than Pickup From time,Pickup To time باید بیشتر از Pickup From Time باشد, +Pickup Type,نوع پیکاپ, +Pickup from,وانت از, +Pickup to,وانت به, +Pipeline By,خط لوله توسط, +Plaid Link Failed,پیوند Plaid ناموفق بود, +Plaid Link Refresh Required,بازخوانی پیوند شطرنجی مورد نیاز است, +Plaid Link Updated,پیوند شطرنجی به روز شد, +Plan to Request Qty,برنامه ریزی برای مقدار درخواست, +Please Set Priority,لطفا اولویت را تعیین کنید, +Please Specify Account,لطفا حساب را مشخص کنید, +Please add 'Supplier' role to user {0}.,"لطفا نقش ""تامین کننده"" را به کاربر {0} اضافه کنید.", +Please add Request for Quotation to the sidebar in Portal Settings.,لطفاً درخواست برای پیش فاکتور را به نوار کناری در تنظیمات پورتال اضافه کنید., +Please add Root Account for - {0},لطفاً حساب ریشه برای - {0} اضافه کنید, +Please add atleast one Serial No / Batch No,لطفاً حداقل یک شماره سریال / شماره دسته اضافه کنید, +Please add the Bank Account column,لطفا ستون حساب بانکی را اضافه کنید, +Please add the account to root level Company - {0},لطفاً حساب را به شرکت سطح ریشه اضافه کنید - {0}, +Please add {1} role to user {0}.,لطفاً نقش {1} را به کاربر {0} اضافه کنید., +Please adjust the qty or edit {0} to proceed.,لطفاً تعداد را تنظیم کنید یا برای ادامه {0} را ویرایش کنید., +Please attach CSV file,لطفا فایل CSV را پیوست کنید, +Please cancel and amend the Payment Entry,لطفاً ثبت پرداخت را لغو و اصلاح کنید, +Please cancel payment entry manually first,لطفاً ابتدا ثبت پرداخت را به صورت دستی لغو کنید, +Please cancel related transaction.,لطفا تراکنش مربوطه را لغو کنید., +Please check Process Deferred Accounting {0} and submit manually after resolving errors.,لطفاً Process Deferred Accounting {0} را بررسی کنید و پس از رفع خطاها را به صورت دستی ارسال کنید., +Please check either with operations or FG Based Operating Cost.,لطفاً با عملیات یا هزینه عملیاتی مبتنی بر FG بررسی کنید., +Please check the error message and take necessary actions to fix the error and then restart the reposting again.,لطفاً پیام خطا را بررسی کنید و اقدامات لازم را برای رفع خطا انجام دهید و سپس ارسال مجدد را مجدداً راه‌اندازی کنید., +Please check your email to confirm the appointment,لطفا ایمیل خود را برای تایید قرار ملاقات بررسی کنید, +Please contact any of the following users to extend the credit limits for {0}: {1},لطفاً برای تمدید محدودیت اعتبار برای {0} با هر یک از کاربران زیر تماس بگیرید: {1}, +Please contact any of the following users to {} this transaction.,لطفاً با هر یک از کاربران زیر برای {} این تراکنش تماس بگیرید., +Please contact your administrator to extend the credit limits for {0}.,لطفاً برای تمدید محدودیت اعتبار برای {0} با سرپرست خود تماس بگیرید., +Please create Landed Cost Vouchers against Invoices that have 'Update Stock' enabled.,لطفاً در برابر فاکتورهایی که «به‌روزرسانی موجودی» را فعال کرده‌اند، کوپن‌های هزینه تمام شده تا درب انبار ایجاد کنید., +Please create a new Accounting Dimension if required.,لطفاً در صورت نیاز یک بعد حسابداری جدید ایجاد کنید., +Please create purchase from internal sale or delivery document itself,لطفا خرید را از فروش داخلی یا سند تحویل خود ایجاد کنید, +"Please delete Product Bundle {0}, before merging {1} into {2}",لطفاً قبل از ادغام {1} در {2}، باندل محصول {0} را حذف کنید, +Please do not book expense of multiple assets against one single Asset.,لطفا هزینه چند دارایی را در مقابل یک دارایی ثبت نکنید., +Please enable only if the understand the effects of enabling this.,لطفاً فقط در صورتی فعال کنید که تأثیرات فعال کردن آن را درک کنید., +Please enable {0} in the {1}.,لطفاً {0} را در {1} فعال کنید., +Please enable {} in {} to allow same item in multiple rows,لطفاً {} را در {} فعال کنید تا یک مورد در چندین ردیف مجاز باشد, +Please ensure {} account is a Balance Sheet account.,لطفاً مطمئن شوید که حساب {} یک حساب ترازنامه است., +Please ensure {} account {} is a Receivable account.,لطفاً مطمئن شوید که {} حساب {} یک حساب دریافتنی است., +Please enter Root Type for account- {0},لطفاً نوع ریشه را برای حساب وارد کنید- {0}, +Please enter Serial Nos,لطفا شماره های سریال را وارد کنید, +Please enter Shipment Parcel information,لطفا اطلاعات بسته حمل و نقل را وارد کنید, +Please enter Stock Items consumed during the Repair.,لطفاً آیتم‌های موجودی مصرف شده در طول تعمیر را وارد کنید., +Please enter mobile number first.,لطفا ابتدا شماره موبایل را وارد کنید, +Please enter quantity for item {0},لطفاً مقدار مورد {0} را وارد کنید, +Please enter serial nos,لطفا شماره سریال را وارد کنید, +"Please first set Last Name, Email and Phone for the user",لطفا ابتدا نام خانوادگی، ایمیل و تلفن را برای کاربر تنظیم کنید, +Please fix overlapping time slots for {0},لطفاً بازه های زمانی همپوشانی را برای {0} اصلاح کنید, +Please fix overlapping time slots for {0}.,لطفاً بازه های زمانی همپوشانی را برای {0} برطرف کنید., +Please import accounts against parent company or enable {} in company master.,لطفاً حساب‌ها را در مقابل شرکت مادر وارد کنید یا {} را در شرکت اصلی فعال کنید., +Please make sure the file you are using has 'Parent Account' column present in the header.,لطفاً مطمئن شوید که فایلی که استفاده می‌کنید دارای ستون «حساب والد» در سرصفحه باشد., +Please mention 'Weight UOM' along with Weight.,"لطفا ""وزن UOM"" را همراه با وزن ذکر کنید.", +Please mention the Current and New BOM for replacement.,لطفاً BOM فعلی و جدید را برای جایگزینی ذکر کنید., +Please rectify and try again.,لطفاً اصلاح کنید و دوباره امتحان کنید., +Please refresh or reset the Plaid linking of the Bank {}.,لطفاً پیوند Plaid بانک {} را بازخوانی یا بازنشانی کنید., +Please save before proceeding.,لطفا قبل از ادامه ذخیره کنید., +Please select Bank Account,لطفا حساب بانکی را انتخاب کنید, +Please select Finished Good Item for Service Item {0},لطفاً آیتم کالای تمام شده را برای آیتم سرویس {0} انتخاب کنید, +Please select Serial/Batch Nos to reserve or change Reservation Based On to Qty.,لطفاً شماره‌های سریال/دسته را برای رزرو انتخاب کنید یا رزرو براساس تعداد را تغییر دهید., +Please select Subcontracting Order instead of Purchase Order {0},لطفاً به جای سفارش خرید، سفارش قرارداد فرعی را انتخاب کنید {0}, +Please select Unrealized Profit / Loss account or add default Unrealized Profit / Loss account account for company {0},لطفاً حساب سود / زیان تحقق نیافته را انتخاب کنید یا حساب سود / زیان پیش فرض را برای شرکت اضافه کنید {0}, +Please select a Subcontracting Purchase Order.,لطفاً سفارش خرید پیمانکاری فرعی را انتخاب کنید., +Please select a Warehouse,لطفاً یک انبار انتخاب کنید, +Please select a Work Order first.,لطفاً ابتدا یک دستور کار را انتخاب کنید., +Please select a country,لطفا یک کشور را انتخاب کنید, +Please select a customer for fetching payments.,لطفاً یک مشتری را برای واکشی پرداخت ها انتخاب کنید., +Please select a date,لطفا تاریخ را انتخاب کنید, +Please select a date and time,لطفا تاریخ و زمان را انتخاب کنید, +Please select a row to create a Reposting Entry,لطفاً یک ردیف برای ایجاد یک ورودی ارسال مجدد انتخاب کنید, +Please select a supplier for fetching payments.,لطفاً یک تامین کننده برای واکشی پرداخت ها انتخاب کنید., +Please select a valid Purchase Order that has Service Items.,لطفاً یک سفارش خرید معتبر که دارای آیتم‌های خدماتی است انتخاب کنید., +Please select a valid Purchase Order that is configured for Subcontracting.,لطفاً یک سفارش خرید معتبر که برای قرارداد فرعی پیکربندی شده است، انتخاب کنید., +Please select an item code before setting the warehouse.,لطفاً قبل از تنظیم انبار یک کد آیتم را انتخاب کنید., +Please select items,لطفا آیتم‌ها را انتخاب کنید, +Please select items to unreserve.,لطفا آیتم‌ها را برای لغو رزرو انتخاب کنید., +Please select only one row to create a Reposting Entry,لطفاً فقط یک ردیف را برای ایجاد یک ورودی ارسال مجدد انتخاب کنید, +Please select rows to create Reposting Entries,لطفاً ردیف‌هایی را برای ایجاد ورودی‌های ارسال مجدد انتخاب کنید, +Please select the required filters,لطفا فیلترهای مورد نیاز را انتخاب کنید, +Please select valid document type.,لطفا نوع سند معتبر را انتخاب کنید., +Please set Account,لطفا حساب را تنظیم کنید, +Please set Accounting Dimension {} in {},لطفاً بعد حسابداری {} را در {} تنظیم کنید, +Please set Email/Phone for the contact,لطفا ایمیل/تلفن را برای مخاطب تنظیم کنید, +Please set Fiscal Code for the customer '%s',"لطفاً کد مالی را برای مشتری ""%s"" تنظیم کنید", +Please set Fixed Asset Account in {} against {}.,لطفاً حساب دارایی ثابت را در {} در مقابل {} تنظیم کنید., +Please set Parent Row No for item {0},لطفاً شماره ردیف والد را برای آیتم {0} تنظیم کنید, +Please set Root Type,لطفا Root Type را تنظیم کنید, +Please set Tax ID for the customer '%s',"لطفاً شناسه مالیاتی را برای مشتری ""%s"" تنظیم کنید", +Please set VAT Accounts in {0},لطفاً حساب‌های VAT را در {0} تنظیم کنید, +"Please set Vat Accounts for Company: ""{0}"" in UAE VAT Settings","لطفاً حساب‌های مالیات بر ارزش افزوده را برای شرکت تنظیم کنید: ""{0}"" در تنظیمات مالیات بر ارزش افزوده امارات", +Please set a Cost Center for the Asset or set an Asset Depreciation Cost Center for the Company {},لطفاً یک مرکز هزینه برای دارایی یا یک مرکز هزینه استهلاک دارایی برای شرکت تنظیم کنید {}, +Please set a default Holiday List for Company {0},لطفاً یک فهرست تعطیلات پیش‌فرض برای شرکت {0} تنظیم کنید, +Please set an Address on the Company '%s',"لطفاً یک آدرس در شرکت ""%s"" تنظیم کنید", +Please set an Expense Account in the Items table,لطفاً یک حساب هزینه در جدول آیتم‌ها تنظیم کنید, +Please set default Exchange Gain/Loss Account in Company {},لطفاً حساب سود/زیان مبادله پیش‌فرض را در شرکت تنظیم کنید {}, +Please set default Expense Account in Company {0},لطفاً حساب هزینه پیش‌فرض را در شرکت {0} تنظیم کنید, +Please set default cost of goods sold account in company {0} for booking rounding gain and loss during stock transfer,لطفاً حساب هزینه پیش‌فرض کالاهای فروخته‌شده در شرکت {0} را برای رزرو سود و زیان در حین انتقال موجودی تنظیم کنید, +Please set filters,لطفا فیلترها را تنظیم کنید, +Please set one of the following:,لطفا یکی از موارد زیر را تنظیم کنید:, +Please set the cost center field in {0} or setup a default Cost Center for the Company.,لطفاً فیلد مرکز هزینه را در {0} تنظیم کنید یا یک مرکز هزینه پیش‌فرض برای شرکت تنظیم کنید., +Please set {0} in BOM Creator {1},لطفاً {0} را در BOM Creator {1} تنظیم کنید, +Please share this email with your support team so that they can find and fix the issue.,لطفاً این ایمیل را با تیم پشتیبانی خود به اشتراک بگذارید تا آنها بتوانند مشکل را پیدا کرده و برطرف کنند., +Please specify a {0},لطفاً یک {0} را مشخص کنید, +Please try again in an hour.,لطفا یک ساعت دیگر دوباره امتحان کنید., +Please update Repair Status.,لطفاً وضعیت تعمیر را به روز کنید., +Portal User,کاربر پورتال, +Portal Users,کاربران پورتال, +"Previous Year is not closed, please close it first",سال قبل تعطیل نیست، لطفا اول آن را ببندید, +Price ({0}),قیمت ({0}), +Price List Defaults,لیست قیمت پیش فرض, +Price Per Unit ({0}),قیمت هر واحد ({0}), +Primary Address and Contact,آدرس و مخاطب اصلی, +Primary Contact,مخاطب اصلی, +Primary Party,طرف اصلی, +Primary Role,نقش اصلی, +Print Format Builder,فرمت ساز چاپ, +Print Style,سبک چاپ, +Printing,چاپ, +Priority cannot be lesser than 1.,اولویت نمی تواند کمتر از 1 باشد., +Priority is mandatory,اولویت الزامی است, +Probability,احتمال, +Process Loss,از دست دادن فرآیند, +Process Loss Percentage cannot be greater than 100,درصد ضرر فرآیند نمی تواند بیشتر از 100 باشد, +Process Loss Qty,تعداد از دست دادن فرآیند, +Process Loss Report,گزارش از دست دادن فرآیند, +Process Loss Value,ارزش از دست دادن فرآیند, +Process Payment Reconciliation,فرآیند تطبیق پرداخت, +Process Payment Reconciliation Log,گزارش تطبیق پرداخت فرآیند, +Process Payment Reconciliation Log Allocations,تخصیص گزارش تطبیق پرداخت فرآیند, +Process Subscription,فرآیند اشتراک, +Processed BOMs,BOM های پردازش شده, +Processing Sales! Please Wait...,در حال پردازش فروش! لطفا صبر کنید..., +Produced / Received Qty,تعداد تولید / دریافت شده, +Product Price ID,شناسه قیمت محصول, +Production Plan Already Submitted,طرح تولید قبلا ارسال شده است, +Production Plan Item Reference,مرجع آیتم طرح تولید, +Production Plan Qty,مقدار برنامه تولید, +Production Plan Sub Assembly Item,آیتم زیر مونتاژ برنامه تولید, +Production Plan Sub-assembly Item,آیتم زیر مونتاژ برنامه تولید, +Production Plan Summary,خلاصه برنامه تولید, +Profile,مشخصات, +Profit and Loss Summary,خلاصه سود و زیان, +Progress,پیشرفت, +Progress (%),پیشرفت (%), +Project Progress:,پیشرفت پروژه:, +Prompt Qty,تعداد را اعلان کنید, +Prospect,مشتری بالقوه, +Prospect Lead,سرنخ مشتری بالقوه, +Prospect Opportunity,فرصت مشتری بالقوه, +Prospect Owner,مالک مشتری بالقوه, +Prospect {0} already exists,مشتری بالقوه {0} از قبل وجود دارد, +Provisional Expense Account,حساب هزینه موقت, +Purchase Order Item reference is missing in Subcontracting Receipt {0},مرجع آیتم سفارش خرید در رسید پیمانکاری فرعی وجود ندارد {0}, +Purchase Orders {0} are un-linked,سفارش‌های خرید {0} لغو پیوند هستند, +Purchase Receipt (Draft) will be auto-created on submission of Subcontracting Receipt.,رسید خرید (پیش نویس) به صورت خودکار با ارائه رسید پیمانکاری فرعی ایجاد می شود., +Purchase Receipt {0} created.,رسید خرید {0} ایجاد شد., +Purchase Value,ارزش خرید, +Purchases,خریدها, +Purposes Required,اهداف مورد نیاز, +Putaway Rule,قانون Putaway, +Putaway Rule already exists for Item {0} in Warehouse {1}.,قانون Putaway از قبل برای مورد {0} در انبار {1} وجود دارد., +Qty , تعداد, +Qty After Transaction,تعداد بعد از تراکنش, +Qty As Per BOM,مقدار طبق BOM, +Qty Change,تغییر تعداد, +Qty In Stock,تعداد موجود در انبار, +Qty Per Unit,تعداد در هر واحد, +Qty To Produce,تعداد برای تولید, +Qty and Rate,تعداد و نرخ, +Qty as Per Stock UOM,تعداد به ازای موجودی UOM, +Qty for which recursion isn't applicable.,تعداد که بازگشت برای آنها قابل اعمال نیست., +Qty in Stock UOM,تعداد موجود در انبار UOM, +Qty of Finished Goods Item should be greater than 0.,تعداد کالاهای تمام شده باید بیشتر از 0 باشد., +Qty to Be Consumed,مقدار قابل مصرف, +Qty to Build,تعداد برای ساخت, +Qty to Fetch,تعداد برای واکشی, +Qty to Produce,تعداد برای تولید, +Qualification Status,وضعیت صلاحیت, +Qualified,واجد شرایط, +Qualified By,واجد شرایط توسط, +Qualified on,واجد شرایط, +Quality Inspection Parameter,پارامتر بازرسی کیفیت, +Quality Inspection Parameter Group,گروه پارامترهای بازرسی کیفیت, +Quality Inspection Settings,تنظیمات بازرسی کیفیت, +Quality Inspection(s),بازرسی(های) کیفیت, +Quantity is required,مقدار مورد نیاز است, +"Quantity must be greater than zero, and less or equal to {0}",مقدار باید بزرگتر از صفر و کمتر یا مساوی با {0} باشد., +Quantity to Produce should be greater than zero.,مقدار تولید باید بیشتر از صفر باشد., +Quantity to Scan,مقدار برای اسکن, +Quarter {0} {1},سه ماهه {0} {1}, +Quotation Number,شماره پیش فاکتور, +Quoted Amount,مبلغ نقل شده, +Rate Difference with Purchase Invoice,تفاوت نرخ با فاکتور خرید, +Rate Section,بخش امتیاز دهی, +Rate of Stock UOM,نرخ موجودی UOM, +Ratios,نسبت ها, +Raw Material Cost Per Qty,هزینه مواد خام به ازای هر تعداد, +Raw Material Item,مورد مواد خام, +Raw Material Value,ارزش مواد خام, +Raw Materials Consumption ,مصرف مواد اولیه , +Raw Materials Warehouse,انبار مواد اولیه, +Reading Value,مقدار خواندن, +Reason for hold:,دلیل نگه داشتن:, +Rebuild Tree,درخت را بازسازی کنید, +Recalculate Incoming/Outgoing Rate,محاسبه مجدد نرخ ورودی/خروجی, +Recalculating Purchase Cost against this Project...,محاسبه مجدد هزینه خرید در مقابل این پروژه..., +Receivable/Payable Account,حساب دریافتنی/پرداختنی, +Receivable/Payable Account: {0} doesn't belong to company {1},حساب دریافتنی/پرداختنی: {0} به شرکت {1} تعلق ندارد, +Received Amount After Tax,مبلغ دریافتی پس از کسر مالیات, +Received Amount After Tax (Company Currency),مبلغ دریافتی پس از کسر مالیات (ارز شرکت), +Received Amount cannot be greater than Paid Amount,مبلغ دریافتی نمی تواند بیشتر از مبلغ پرداختی باشد, +Received Qty in Stock UOM,تعداد در انبار UOM دریافت شد, +Recent Orders,سفارش‌های اخیر, +Reconcile the Bank Transaction,تراکنش بانکی را تطبیق دهید, +Reconciled Entries,ثبت های تطبیق شده, +Reconciliation Error Log,لاگ خطای تطبیق, +Reconciliation Logs,لاگ‌های مربوط به تطبیق, +Reconciliation Progress,پیشرفت تطبیق, +Recording HTML,ضبط HTML, +Recoverable Standard Rated expenses should not be set when Reverse Charge Applicable is Y,زمانی که شارژ معکوس قابل اعمال Y است، هزینه‌های استاندارد قابل بازیافت نباید تنظیم شوند, +Recurse Every (As Per Transaction UOM),تکرار هر (بر اساس UOM تراکنش), +Recurse Over Qty cannot be less than 0,Recurse Over Qty نمی تواند کمتر از 0 باشد, +Reference Date for Early Payment Discount,تاریخ مرجع برای تخفیف پرداخت زودهنگام, +Reference Detail,جزئیات مرجع, +Reference DocType,مرجع DocType, +Reference Exchange Rate,نرخ ارز مرجع, +Reference No,شماره مرجع, +Reference number of the invoice from the previous system,شماره مرجع فاکتور از سیستم قبلی, +References {0} of type {1} had no outstanding amount left before submitting the Payment Entry. Now they have a negative outstanding amount.,مراجع {0} از نوع {1} قبل از ارسال ثبت پرداخت، مبلغ معوقه ای باقی نمانده بود. اکنون آنها یک مبلغ معوقه منفی دارند., +Refresh Google Sheet,برگه Google را بازخوانی کنید, +Refresh Plaid Link,پیوند شطرنجی را تازه کنید, +Regenerate Closing Stock Balance,بازسازی تراز موجودی اختتامیه, +Rejected Serial and Batch Bundle,باندل سریال و دسته رد شده, +Remarks Column Length,طول ستون اظهارات, +Repair,تعمیر, +Repair Asset,دارایی تعمیر, +Repair Details,جزئیات تعمیر, +Report Error,گزارش خطا, +Report Filters,گزارش فیلترها, +Report View,نمای گزارش, +Repost Accounting Ledger,بازنشر دفتر کل حسابداری, +Repost Accounting Ledger Items,بازنشر اقلام دفتر کل حسابداری, +Repost Accounting Ledger Settings,بازنشر تنظیمات دفتر کل حسابداری, +Repost Allowed Types,بازنشر انواع مجاز, +Repost Error Log,لاگ خطای ارسال مجدد, +Repost Item Valuation,ارسال مجدد ارزش گذاری مورد, +Repost Payment Ledger,ارسال مجدد دفتر کل پرداخت, +Repost Payment Ledger Items,ارسال مجدد اقلام دفتر کل پرداخت, +Repost Status,وضعیت بازنشر, +Repost has started in the background,ارسال مجدد در پس زمینه شروع شده است, +Repost in background,بازنشر در پس زمینه, +Repost started in the background,بازنشر در پس‌زمینه شروع شد, +Reposting Data File,ارسال مجدد فایل داده, +Reposting Info,بازنشر اطلاعات, +Reposting Progress,بازنشر پیشرفت, +Reposting entries created: {0},ارسال مجدد ورودی های ایجاد شده: {0}, +Reposting has been started in the background.,ارسال مجدد در پس‌زمینه آغاز شده است., +Reposting in the background.,بازنشر در پس زمینه, +Represents a Financial Year. All accounting entries and other major transactions are tracked against the Fiscal Year.,نشان دهنده یک سال مالی است. کلیه ثبت‌های حسابداری و سایر تراکنش‌های عمده در برابر سال مالی ردیابی می شوند., +Request Parameters,پارامترهای درخواست, +Request Timeout,درخواست مهلت زمانی, +Reservation Based On,رزرو بر اساس, +Reserve,ذخیره, +Reserve Stock,ذخیره موجودی, +"Reserved Qty ({0}) cannot be a fraction. To allow this, disable '{1}' in UOM {3}.","تعداد رزرو شده ({0}) نمی تواند کسری باشد. برای اجازه دادن به این کار، ""{1}"" را در UOM {3} غیرفعال کنید.", +Reserved Qty for Production Plan,تعداد رزرو شده برای طرح تولید, +Reserved Qty for Subcontract,مقدار رزرو شده برای قرارداد فرعی, +Reserved Qty should be greater than Delivered Qty.,تعداد رزرو شده باید بیشتر از تعداد تحویل شده باشد., +Reserved Serial No.,شماره سریال رزرو شده, +Reserved Stock,موجودی رزرو شده, +Reserved Stock for Batch,موجودی رزرو شده برای دسته, +Reserved for POS Transactions,برای معاملات POS رزرو شده است, +Reserved for Production,برای تولید محفوظ است, +Reserved for Production Plan,برای طرح تولید محفوظ است, +Reserved for Sub Contracting,برای پیمانکاری فرعی محفوظ است, +Reserving Stock...,رزرو موجودی..., +Reset Company Default Values,بازنشانی مقادیر پیش فرض شرکت, +Reset Plaid Link,بازنشانی پیوند Plaid, +Resolution Due,سررسید حل و فصل, +Response and Resolution,پاسخ و حل و فصل, +Restart,راه‌اندازی مجدد, +Restore Asset,بازیابی دارایی, +Restrict,محدود کردن, +Restrict Items Based On,موارد را بر اساس محدود کنید, +Result Key,کلید نتیجه, +Resume Job,رزومه کاری, +Retried,دوباره امتحان شد, +Retry,دوباره امتحان کنید, +Retry Failed Transactions,تراکنش های ناموفق را دوباره امتحان کنید, +Return Against,بازگشت در مقابل, +Return Against Subcontracting Receipt,استرداد در مقابل رسید پیمانکاری فرعی, +Return Components,برگرداندن اجزاء, +Return Issued,حواله بازگشت صادر شد, +Return Qty,تعداد برگشت, +Return Qty from Rejected Warehouse,تعداد بازگرداندن از انبار مرجوعی, +Return of Components,بازگشت اجزاء, +Returned,بازگشت, +Returned Against,بازگشت در برابر, +Returned Qty ,مقدار برگردانده شده , +Returned Qty in Stock UOM,تعداد برگردانده شده در انبار UOM, +Returned exchange rate is neither integer not float.,نرخ ارز برگشتی نه عدد صحیح است و نه شناور., +Revaluation Journals,دفترهای روزنامه تجدید ارزیابی, +Revaluation Surplus,مازاد تجدید ارزیابی, +Revenue,درآمد, +Reversal Of,معکوس شدن, +Role Allowed to Create/Edit Back-dated Transactions,نقش مجاز برای ایجاد/ویرایش تراکنش های قدیمی, +Role Allowed to Over Bill , نقش مجاز به Over Bill, +Role Allowed to Over Deliver/Receive,نقش مجاز به تحویل/دریافت بیش از حد, +Role Allowed to Override Stop Action,نقش مجاز برای لغو عمل توقف, +Role allowed to bypass Credit Limit,نقش مجاز برای دور زدن محدودیت اعتبار, +"Root Type for {0} must be one of the Asset, Liability, Income, Expense and Equity",نوع ریشه برای {0} باید یکی از دارایی، بدهی، درآمد، هزینه و حقوق صاحبان موجودی باشد., +Round Free Qty,دور تعداد رایگان, +Round Off Tax Amount,دور کردن مبلغ مالیات, +Round Tax Amount Row-wise,گرد کردن مقدار مالیات مبتنی بر ردیف, +Rounding Loss Allowance,زیان گرد کردن مجاز, +Rounding Loss Allowance should be between 0 and 1,زیان گرد کردن مجاز باید بین 0 و 1 باشد, +Rounding gain/loss Entry for Stock Transfer,گرد کردن ثبت سود/زیان برای انتقال موجودی, +Row #,ردیف #, +Row # {0}:,ردیف شماره {0}:, +Row #{0}: A reorder entry already exists for warehouse {1} with reorder type {2}.,ردیف #{0}: یک ورودی سفارش مجدد از قبل برای انبار {1} با نوع سفارش مجدد {2} وجود دارد., +Row #{0}: Acceptance Criteria Formula is incorrect.,ردیف #{0}: فرمول معیارهای پذیرش نادرست است., +Row #{0}: Acceptance Criteria Formula is required.,ردیف #{0}: فرمول معیارهای پذیرش الزامی است., +Row #{0}: Accepted Warehouse and Rejected Warehouse cannot be same,ردیف #{0}: انبار پذیرفته شده و انبار مرجوعی نمی توانند یکسان باشند, +Row #{0}: Accepted Warehouse is mandatory for the accepted Item {1},ردیف #{0}: انبار پذیرفته شده برای مورد پذیرفته شده اجباری است {1}, +Row #{0}: Allocated amount:{1} is greater than outstanding amount:{2} for Payment Term {3},ردیف #{0}: مبلغ تخصیص یافته:{1} بیشتر از مبلغ معوق است:{2} برای مدت پرداخت {3}, +Row #{0}: Amount must be a positive number,ردیف #{0}: مقدار باید یک عدد مثبت باشد, +Row #{0}: BOM is not specified for subcontracting item {0},ردیف #{0}: BOM برای قرارداد فرعی مورد {0} مشخص نشده است, +Row #{0}: Batch No {1} is already selected.,ردیف #{0}: شماره دسته {1} قبلاً انتخاب شده است., +Row #{0}: Cannot allocate more than {1} against payment term {2},ردیف #{0}: نمی توان بیش از {1} را در مقابل مدت پرداخت {2} تخصیص داد, +Row #{0}: Cannot transfer more than Required Qty {1} for Item {2} against Job Card {3},ردیف #{0}: نمی توان بیش از مقدار لازم {1} برای مورد {2} در مقابل کارت کار {3} انتقال داد, +Row #{0}: Consumed Asset {1} cannot be Draft,ردیف #{0}: دارایی مصرف شده {1} نمی تواند پیش نویس باشد, +Row #{0}: Consumed Asset {1} cannot be cancelled,ردیف #{0}: دارایی مصرف شده {1} قابل لغو نیست, +Row #{0}: Consumed Asset {1} cannot be the same as the Target Asset,ردیف #{0}: دارایی مصرف شده {1} نمی تواند با دارایی هدف یکسان باشد, +Row #{0}: Consumed Asset {1} cannot be {2},ردیف #{0}: دارایی مصرف شده {1} نمی تواند {2} باشد, +Row #{0}: Consumed Asset {1} does not belong to company {2},ردیف #{0}: دارایی مصرف شده {1} به شرکت {2} تعلق ندارد, +Row #{0}: Cumulative threshold cannot be less than Single Transaction threshold,ردیف #{0}: آستانه تجمعی نمی‌تواند کمتر از آستانه یک تراکنش باشد, +Row #{0}: Dates overlapping with other row,ردیف #{0}: تاریخ ها با ردیف دیگر همپوشانی دارند, +Row #{0}: Default BOM not found for FG Item {1},ردیف #{0}: BOM پیش‌فرض برای آیتم کالای تمام شده {1} یافت نشد, +Row #{0}: Expense Account not set for the Item {1}. {2},ردیف #{0}: حساب هزینه برای مورد {1} تنظیم نشده است. {2}, +Row #{0}: Finished Good Item Qty can not be zero,ردیف #{0}: مقدار آیتم کالای تمام شده نمی تواند صفر باشد, +Row #{0}: Finished Good Item is not specified for service item {1},ردیف #{0}: آیتم کالای تمام شده برای مورد خدماتی {1} مشخص نشده است, +Row #{0}: Finished Good Item {1} must be a sub-contracted item,ردیف #{0}: آیتم کالای تمام شده {1} باید یک آیتم قرارداد فرعی باشد, +Row #{0}: Finished Good reference is mandatory for Scrap Item {1}.,ردیف #{0}: مرجع کالای تمام شده برای ضایعات {1} اجباری است., +"Row #{0}: For {1}, you can select reference document only if account gets credited",ردیف #{0}: برای {1}، فقط در صورتی می‌توانید سند مرجع را انتخاب کنید که حساب اعتبار شود, +"Row #{0}: For {1}, you can select reference document only if account gets debited",ردیف #{0}: برای {1}، فقط در صورتی می‌توانید سند مرجع را انتخاب کنید که حساب بدهکار شود, +Row #{0}: From Date cannot be before To Date,ردیف #{0}: From Date نمی تواند قبل از To Date باشد, +Row #{0}: Item {1} does not exist,ردیف #{0}: مورد {1} وجود ندارد, +"Row #{0}: Item {1} has been picked, please reserve stock from the Pick List.",ردیف #{0}: مورد {1} انتخاب شده است، لطفاً موجودی را از فهرست انتخاب رزرو کنید., +Row #{0}: Item {1} is not a service item,ردیف #{0}: مورد {1} یک مورد خدماتی نیست, +Row #{0}: Item {1} is not a stock item,ردیف #{0}: مورد {1} یک کالای موجودی نیست, +Row #{0}: Only {1} available to reserve for the Item {2},ردیف #{0}: فقط {1} برای رزرو مورد {2} موجود است, +Row #{0}: Please select Item Code in Assembly Items,ردیف #{0}: لطفاً کد آیتم را در آیتم‌های اسمبلی انتخاب کنید, +Row #{0}: Please select the BOM No in Assembly Items,ردیف #{0}: لطفاً شماره BOM را در آیتم‌های اسمبلی انتخاب کنید, +Row #{0}: Please select the Sub Assembly Warehouse,ردیف #{0}: لطفاً انبار زیر مونتاژ را انتخاب کنید, +Row #{0}: Please update deferred revenue/expense account in item row or default account in company master,ردیف #{0}: لطفاً حساب درآمد/هزینه معوق را در ردیف آیتم یا حساب پیش‌فرض در اصلی شرکت به‌روزرسانی کنید., +Row #{0}: Qty increased by {1},ردیف #{0}: تعداد با {1} افزایش یافت, +Row #{0}: Qty must be a positive number,ردیف #{0}: تعداد باید یک عدد مثبت باشد, +Row #{0}: Qty should be less than or equal to Available Qty to Reserve (Actual Qty - Reserved Qty) {1} for Iem {2} against Batch {3} in Warehouse {4}.,ردیف #{0}: تعداد باید کمتر یا برابر با تعداد موجود برای رزرو (تعداد واقعی - تعداد رزرو شده) {1} برای Iem {2} در مقابل دسته {3} در انبار {4} باشد., +Row #{0}: Quantity to reserve for the Item {1} should be greater than 0.,ردیف #{0}: مقدار قابل رزرو برای مورد {1} باید بیشتر از 0 باشد., +Row #{0}: Rate must be same as {1}: {2} ({3} / {4}),ردیف #{0}: نرخ باید مانند {1} باشد: {2} ({3} / {4}), +Row #{0}: Received Qty must be equal to Accepted + Rejected Qty for Item {1},ردیف #{0}: تعداد دریافتی باید برابر با تعداد پذیرفته شده + رد شده برای مورد {1} باشد., +Row #{0}: Rejected Qty cannot be set for Scrap Item {1}.,سطر #{0}: تعداد رد شده را نمی توان برای ضایعات {1} تنظیم کرد., +Row #{0}: Rejected Warehouse is mandatory for the rejected Item {1},ردیف #{0}: انبار مرجوعی برای مورد رد شده اجباری است {1}, +Row #{0}: Scrap Item Qty cannot be zero,ردیف #{0}: تعداد مورد ضایعات نمی تواند صفر باشد, +Row #{0}: Serial No {1} for Item {2} is not available in {3} {4} or might be reserved in another {5}.,ردیف #{0}: شماره سریال {1} برای آیتم {2} در {3} {4} موجود نیست یا ممکن است در {5} دیگری رزرو شده باشد., +Row #{0}: Serial No {1} is already selected.,ردیف #{0}: شماره سریال {1} قبلاً انتخاب شده است., +Row #{0}: Start Time and End Time are required,ردیف #{0}: زمان شروع و زمان پایان مورد نیاز است, +Row #{0}: Start Time must be before End Time,ردیف #{0}: زمان شروع باید قبل از زمان پایان باشد, +Row #{0}: Status is mandatory,ردیف #{0}: وضعیت اجباری است, +Row #{0}: Stock cannot be reserved for Item {1} against a disabled Batch {2}.,ردیف #{0}: موجودی را نمی توان برای آیتم {1} در مقابل دسته غیرفعال شده {2} رزرو کرد., +Row #{0}: Stock cannot be reserved for a non-stock Item {1},ردیف #{0}: موجودی را نمی توان برای یک کالای غیر موجودی رزرو کرد {1}, +Row #{0}: Stock cannot be reserved in group warehouse {1}.,ردیف #{0}: موجودی در انبار گروهی {1} قابل رزرو نیست., +Row #{0}: Stock is already reserved for the Item {1}.,ردیف #{0}: موجودی قبلاً برای مورد {1} رزرو شده است., +Row #{0}: Stock is reserved for item {1} in warehouse {2}.,ردیف #{0}: موجودی برای کالای {1} در انبار {2} رزرو شده است., +Row #{0}: Stock not available to reserve for Item {1} against Batch {2} in Warehouse {3}.,ردیف #{0}: موجودی برای رزرو مورد {1} در مقابل دسته {2} در انبار {3} موجود نیست., +Row #{0}: Stock not available to reserve for the Item {1} in Warehouse {2}.,ردیف #{0}: موجودی برای رزرو مورد {1} در انبار {2} موجود نیست., +Row #{0}: You cannot use the inventory dimension '{1}' in Stock Reconciliation to modify the quantity or valuation rate. Stock reconciliation with inventory dimensions is intended solely for performing opening entries.,ردیف #{0}: نمی‌توانید از بعد موجودی «{1}» در تطبیق موجودی برای تغییر مقدار یا نرخ ارزیابی استفاده کنید. تطبیق موجودی با ابعاد موجودی صرفاً برای انجام ورودی های افتتاحیه در نظر گرفته شده است., +Row #{0}: You must select an Asset for Item {1}.,ردیف #{0}: باید یک دارایی برای مورد {1} انتخاب کنید., +Row #{0}: {1} is not a valid reading field. Please refer to the field description.,ردیف #{0}: {1} یک فیلد خواندنی معتبر نیست. لطفا به توضیحات فیلد مراجعه کنید., +Row #{0}: {1} of {2} should be {3}. Please update the {1} or select a different account.,ردیف #{0}: {1} از {2} باید {3} باشد. لطفاً {1} را به روز کنید یا حساب دیگری را انتخاب کنید., +Row #{1}: Warehouse is mandatory for stock Item {0},ردیف #{1}: انبار برای کالای موجودی {0} اجباری است, +Row #{}: Finance Book should not be empty since you're using multiple.,ردیف #{}: کتاب مالی نباید خالی باشد زیرا از چندگانه استفاده می کنید., +Row #{}: Please use a different Finance Book.,ردیف #{}: لطفاً از کتاب مالی دیگری استفاده کنید., +Row #{}: item {} has been picked already.,ردیف #{}: مورد {} قبلاً انتخاب شده است., +Row #{}: {} {} doesn't belong to Company {}. Please select valid {}.,ردیف #{}: {} {} به شرکت {} تعلق ندارد. لطفاً {} معتبر را انتخاب کنید., +Row No {0}: Warehouse is required. Please set a Default Warehouse for Item {1} and Company {2},ردیف شماره {0}: انبار مورد نیاز است. لطفاً یک انبار پیش فرض برای مورد {1} و شرکت {2} تنظیم کنید, +Row Number,شماره ردیف, +Row {0},ردیف {0}, +"Row {0} picked quantity is less than the required quantity, additional {1} {2} required.",مقدار انتخابی ردیف {0} کمتر از مقدار مورد نیاز است، {1} {2} اضافی مورد نیاز است., +Row {0}# Item {1} cannot be transferred more than {2} against {3} {4},ردیف {0}# مورد {1} را نمی توان بیش از {2} در برابر {3} {4} منتقل کرد, +Row {0}# Item {1} not found in 'Raw Materials Supplied' table in {2} {3},ردیف {0}# مورد {1} در جدول «مواد خام عرضه شده» در {2} {3} یافت نشد, +Row {0}: Accepted Qty and Rejected Qty can't be zero at the same time.,ردیف {0}: تعداد پذیرفته شده و تعداد رد شده نمی توانند همزمان صفر باشند., +Row {0}: Account {1} and Party Type {2} have different account types,ردیف {0}: حساب {1} و نوع طرف {2} انواع مختلف حساب دارند, +Row {0}: Allocated amount {1} must be less than or equal to invoice outstanding amount {2},ردیف {0}: مبلغ تخصیص یافته {1} باید کمتر یا برابر با مبلغ معوق فاکتور {2} باشد., +Row {0}: Allocated amount {1} must be less than or equal to remaining payment amount {2},ردیف {0}: مبلغ تخصیص یافته {1} باید کمتر یا مساوی با مبلغ پرداخت باقی مانده باشد {2}, +Row {0}: Both Debit and Credit values cannot be zero,ردیف {0}: هر دو مقدار بدهی و اعتبار نمی توانند صفر باشند, +Row {0}: Cost Center {1} does not belong to Company {2},ردیف {0}: مرکز هزینه {1} به شرکت {2} تعلق ندارد, +Row {0}: Either Delivery Note Item or Packed Item reference is mandatory.,ردیف {0}: مرجع مورد یادداشت تحویل یا کالای بسته بندی شده اجباری است., +Row {0}: Expense Head changed to {1} as no Purchase Receipt is created against Item {2}.,ردیف {0}: سر هزینه به {1} تغییر کرد زیرا هیچ رسید خریدی در برابر مورد {2} ایجاد نشد., +Row {0}: Expense Head changed to {1} because account {2} is not linked to warehouse {3} or it is not the default inventory account,ردیف {0}: سر هزینه به {1} تغییر کرد زیرا حساب {2} به انبار {3} مرتبط نیست یا حساب موجودی پیش‌فرض نیست, +Row {0}: Expense Head changed to {1} because expense is booked against this account in Purchase Receipt {2},ردیف {0}: سر هزینه به {1} تغییر کرد زیرا هزینه در قبض خرید {2} در مقابل این حساب رزرو شده است., +Row {0}: From Warehouse is mandatory for internal transfers,ردیف {0}: از انبار برای نقل و انتقالات داخلی اجباری است, +Row {0}: Item Tax template updated as per validity and rate applied,ردیف {0}: الگوی مالیات آیتم بر اساس اعتبار و نرخ اعمال شده به روز شد, +Row {0}: Item rate has been updated as per valuation rate since its an internal stock transfer,ردیف {0}: نرخ اقلام براساس نرخ ارزیابی به‌روزرسانی شده است، زیرا یک انتقال داخلی موجودی است, +Row {0}: Item {1} must be a stock item.,ردیف {0}: مورد {1} باید یک کالای موجودی باشد., +Row {0}: Item {1} must be a subcontracted item.,ردیف {0}: مورد {1} باید یک آیتم قرارداد فرعی باشد., +Row {0}: Packed Qty must be equal to {1} Qty.,ردیف {0}: تعداد بسته بندی شده باید برابر با {1} تعداد باشد., +Row {0}: Packing Slip is already created for Item {1}.,ردیف {0}: برگه بسته بندی قبلاً برای مورد {1} ایجاد شده است., +Row {0}: Payment Term is mandatory,ردیف {0}: مدت پرداخت اجباری است, +Row {0}: Please provide a valid Delivery Note Item or Packed Item reference.,ردیف {0}: لطفاً یک مورد یادداشت تحویل معتبر یا مرجع کالای بسته بندی شده ارائه دهید., +Row {0}: Please select a BOM for Item {1}.,ردیف {0}: لطفاً یک BOM برای مورد {1} انتخاب کنید., +Row {0}: Please select an active BOM for Item {1}.,ردیف {0}: لطفاً یک BOM فعال برای مورد {1} انتخاب کنید., +Row {0}: Please select an valid BOM for Item {1}.,ردیف {0}: لطفاً یک BOM معتبر برای مورد {1} انتخاب کنید., +Row {0}: Project must be same as the one set in the Timesheet: {1}.,ردیف {0}: پروژه باید مانند آنچه در صفحه زمان تنظیم شده است: {1} باشد., +Row {0}: Purchase Invoice {1} has no stock impact.,ردیف {0}: فاکتور خرید {1} تأثیری بر موجودی ندارد., +Row {0}: Qty cannot be greater than {1} for the Item {2}.,ردیف {0}: تعداد نمی‌تواند بیشتر از {1} برای مورد {2} باشد., +Row {0}: Qty in Stock UOM can not be zero.,ردیف {0}: تعداد موجودی UOM در انبار نمی تواند صفر باشد., +Row {0}: Qty must be greater than 0.,ردیف {0}: تعداد باید بیشتر از 0 باشد., +Row {0}: Shift cannot be changed since the depreciation has already been processed,ردیف {0}: Shift را نمی توان تغییر داد زیرا استهلاک قبلاً پردازش شده است, +Row {0}: Target Warehouse is mandatory for internal transfers,ردیف {0}: انبار هدف برای نقل و انتقالات داخلی اجباری است, +"Row {0}: To set {1} periodicity, difference between from and to date must be greater than or equal to {2}",ردیف {0}: برای تنظیم تناوب {1}، تفاوت بین تاریخ و تاریخ باید بزرگتر یا مساوی با {2} باشد., +Row {0}: {1} account already applied for Accounting Dimension {2},ردیف {0}: حساب {1} قبلاً برای بعد حسابداری {2} اعمال شده است, +Row {0}: {1} {2} cannot be same as {3} (Party Account) {4},ردیف {0}: {1} {2} نمی‌تواند مانند {3} (حساب طرف) {4}, +Row({0}): Outstanding Amount cannot be greater than actual Outstanding Amount {1} in {2},ردیف ({0}): مبلغ معوق نمی تواند بیشتر از مبلغ معوقه واقعی {1} در {2} باشد., +Rows with Same Account heads will be merged on Ledger,ردیف هایی با سرهای حساب یکسان در دفتر کل ادغام می شوند, +Rows: {0} have 'Payment Entry' as reference_type. This should not be set manually.,"ردیف‌ها: {0} دارای ""ثبت پرداخت"" به عنوان reference_type هستند. این نباید به صورت دستی تنظیم شود.", +Rows: {0} in {1} section are Invalid. Reference Name should point to a valid Payment Entry or Journal Entry.,ردیف‌ها: {0} در بخش {1} نامعتبر است. نام مرجع باید به یک ثبت پرداخت معتبر یا ثبت دفتر روزنامه اشاره کند., +Run parallel job cards in a workstation,اجرای موازی کارت های در یک ایستگاه کاری, +Running,در حال اجرا, +SCO Supplied Item,مورد عرضه شده SCO, +SLA Fulfilled On,SLA تکمیل شد, +SLA Fulfilled On Status,SLA در وضعیت تکمیل شد, +SLA Paused On,SLA متوقف شد, +SLA will be applied if {1} is set as {2}{3},اگر {1} به عنوان {2}{3} تنظیم شود، SLA اعمال خواهد شد, +SLA will be applied on every {0},SLA در هر {0} اعمال خواهد شد, +SMS Settings,تنظیمات پیامک, +Salary Currency,ارز حقوق و دستمزد, +Sales Invoice {0} must be deleted before cancelling this Sales Order,فاکتور فروش {0} باید قبل از لغو این سفارش فروش حذف شود, +Sales Order Packed Item,سفارش فروش کالای بسته بندی شده, +Sales Order Reference,مرجع سفارش فروش, +Sales Order Status,وضعیت سفارش فروش, +"Sales Order {0} already exists against Customer's Purchase Order {1}. To allow multiple Sales Orders, Enable {2} in {3}",سفارش فروش {0} در مقابل سفارش خرید مشتری {1} وجود دارد. برای مجاز کردن چندین سفارش فروش، {2} را در {3} فعال کنید, +Sales Partner , شریک فروش, +Sales Partner Item,مورد شریک فروش, +Sales Pipeline Analytics,تجزیه و تحلیل خط لوله فروش, +Sales Update Frequency in Company and Project,فرکانس به روز رسانی فروش در شرکت و پروژه, +Sales Value,ارزش فروش, +Salvage Value Percentage,درصد ارزش نجات, +Same item and warehouse combination already entered.,همان کالا و ترکیب انبار قبلا وارد شده است., +Savings,پس انداز, +Scan Batch No,اسکن شماره دسته, +Scan Mode,حالت اسکن, +Scan Serial No,اسکن شماره سریال, +Scan barcode for item {0},اسکن بارکد برای مورد {0}, +"Scan mode enabled, existing quantity will not be fetched.",حالت اسکن فعال است، مقدار موجود واکشی نخواهد شد., +Scanned Quantity,مقدار اسکن شده, +Scheduled Time Logs,گزارش های زمان برنامه ریزی شده, +Scheduler is Inactive. Can't trigger job now.,زمان‌بند غیرفعال است. اکنون نمی توان کار را آغاز کرد., +Scheduler is Inactive. Can't trigger jobs now.,زمان‌بند غیرفعال است. اکنون نمی توان کارها را آغاز کرد., +Scheduler is inactive. Cannot enqueue job.,زمانبند غیرفعال است. نمی توان کار را در نوبت گذاشت., +Scheduler is inactive. Cannot merge accounts.,زمانبند غیرفعال است. نمی توان حساب ها را ادغام کرد., +Scheduling,برنامه ریزی, +Scrap & Process Loss,ضایعات و از دست دادن فرآیند, +Scrap Asset,دارایی قراضه, +Scrap Cost Per Qty,هزینه قراضه در هر تعداد, +Scrap Item Code,کد آیتم ضایعات, +Scrap Item Name,نام آیتم ضایعات, +"Search by item code, serial number or barcode",جستجو بر اساس کد آیتم، شماره سریال یا بارکد, +Secondary Party,طرف ثانویه, +Secondary Role,نقش ثانویه, +Segregate Serial / Batch Bundle,جداسازی باندل سریال / دسته, +Select Accounting Dimension.,بعد حسابداری را انتخاب کنید., +Select Alternative Items for Sales Order,آیتم‌های جایگزین را برای سفارش فروش انتخاب کنید, +Select Batch No,شماره دسته را انتخاب کنید, +Select Corrective Operation,عملیات اصلاحی را انتخاب کنید, +Select Date of Birth. This will validate Employees age and prevent hiring of under-age staff.,تاریخ تولد را انتخاب کنید. این امر سن کارکنان را تأیید می کند و از استخدام کارکنان زیر سن جلوگیری می کند., +"Select Date of joining. It will have impact on the first salary calculation, Leave allocation on pro-rata bases.",تاریخ عضویت را انتخاب کنید. در اولین محاسبه حقوق، تخصیص مرخصی به نسبت، تاثیر خواهد داشت., +Select Dimension,Dimension را انتخاب کنید, +Select Finished Good,Finished Good را انتخاب کنید, +Select Items for Quality Inspection,موارد را برای بازرسی کیفیت انتخاب کنید, +Select Serial No,شماره سریال را انتخاب کنید, +Select Serial and Batch,سریال و دسته را انتخاب کنید, +Select Time,زمان را انتخاب کنید, +Select Vouchers to Match,کوپن‌ها را برای مطابقت انتخاب کنید, +Select Warehouses to get Stock for Materials Planning,برای بدست آوردن انبار برای برنامه ریزی مواد، انبارها را انتخاب کنید, +Select a Company this Employee belongs to.,شرکتی را انتخاب کنید که این کارمند به آن تعلق دارد., +Select a Customer,یک مشتری انتخاب کنید, +Select an Item Group.,یک گروه آیتم را انتخاب کنید., +Select an item from each set to be used in the Sales Order.,از هر مجموعه یک مورد را برای استفاده در سفارش فروش انتخاب کنید., +Select the Default Workstation where the Operation will be performed. This will be fetched in BOMs and Work Orders.,ایستگاه کاری پیش‌فرض را که در آن عملیات انجام می‌شود، انتخاب کنید. این در BOM ها و دستور کارها واکشی می شود., +Select the Item to be manufactured.,موردی را که باید تولید شود انتخاب کنید., +"Select the Item to be manufactured. The Item name, UoM, Company, and Currency will be fetched automatically.",موردی را که باید تولید شود انتخاب کنید. نام مورد، UoM، شرکت و ارز به طور خودکار واکشی می شود., +Select the Warehouse,انبار را انتخاب کنید, +Select the date and your timezone,تاریخ و منطقه زمانی خود را انتخاب کنید, +Select the raw materials (Items) required to manufacture the Item,مواد خام (آیتم‌ها) مورد نیاز برای تولید آیتم را انتخاب کنید, +Select your weekly off day,روز تعطیل هفتگی خود را انتخاب کنید, +Selected Vouchers,کوپن های انتخاب شده, +Selected date is,تاریخ انتخاب شده است, +Selected document must be in submitted state,سند انتخاب شده باید در حالت ارسال شده باشد, +Self delivery,تحویل خود, +Sell Asset,فروش دارایی, +Send Attached Files,ارسال فایل های پیوست, +Send Document Print,ارسال سند چاپ, +Send Emails,ارسال ایمیل, +Sequential,متوالی, +Serial & Batch Item,آیتم سریال و دسته ای, +Serial & Batch Item Settings,تنظیمات آیتم سریال و دسته ای, +Serial / Batch Bundle,باندل سریال / دسته, +Serial / Batch Bundle Missing,باندل سریال / دسته جا افتاده, +Serial / Batch No,شماره سریال / دسته, +Serial / Batch Nos,شماره های سریال / دسته ای, +Serial No Ledger,دفتر کل شماره سریال, +Serial No Range,محدوده شماره سریال, +Serial No and Batch for Finished Good,شماره سریال و دسته ای برای Finished Good, +Serial No is mandatory,شماره سریال اجباری است, +Serial No {0} already exists,شماره سریال {0} از قبل وجود دارد, +Serial No {0} already scanned,شماره سریال {0} قبلاً اسکن شده است, +Serial No {0} does not exists,شماره سریال {0} وجود ندارد, +Serial No {0} is already added,شماره سریال {0} قبلاً اضافه شده است, +Serial Nos,شماره های سریال, +Serial Nos / Batch Nos,شماره های سریال / شماره های دسته ای, +Serial Nos Mismatch,عدم تطابق شماره های سریال, +Serial Nos are created successfully,شماره های سریال با موفقیت ایجاد شد, +"Serial Nos are reserved in Stock Reservation Entries, you need to unreserve them before proceeding.",شماره های سریال در ورودی های رزرو موجودی رزرو شده اند، قبل از ادامه باید آنها را لغو رزرو کنید., +Serial and Batch,سریال و دسته, +Serial and Batch Bundle,باندل سریال و دسته, +Serial and Batch Bundle created,باندل سریال و دسته ایجاد شد, +Serial and Batch Bundle updated,باندل سریال و دسته به روز شد, +Serial and Batch Details,جزئیات سریال و دسته, +Serial and Batch Entry,ثبت سریال و دسته, +Serial and Batch No,شماره سریال و دسته, +Serial and Batch Nos,شماره سریال و دسته, +Serial and Batch Nos will be auto-reserved based on Pick Serial / Batch Based On,شماره های سریال و دسته بر اساس انتخاب سریال / دسته بر اساس به صورت خودکار رزرو می شوند, +Serial and Batch Reservation,رزرو سریال و دسته, +Serial and Batch Summary,خلاصه سریال و دسته ای, +Service Cost Per Qty,هزینه خدمات در هر تعداد, +Service Expense Total Amount,هزینه خدمات کل مبلغ, +Service Expenses,هزینه های خدمات, +Service Item,آیتم خدمات, +Service Item Qty,تعداد مورد خدمات, +Service Item Qty / Finished Good Qty,تعداد آیتم خدمات / تعداد کالای تمام شده, +Service Item UOM,مورد خدمات UOM, +Service Item {0} is disabled.,مورد سرویس {0} غیرفعال است., +Service Item {0} must be a non-stock item.,مورد سرویس {0} باید یک کالای غیر موجودی باشد., +Service Items,آیتم‌های خدماتی, +Service Level Agreement for {0} {1} already exists.,قرارداد سطح سرویس برای {0} {1} از قبل وجود دارد., +Service Level Name,نام سطح خدمات, +Service Provider,ارائه دهنده خدمات, +Set Default Supplier,تامین کننده پیش فرض را تنظیم کنید, +Set From Warehouse,مجموعه از انبار, +Set Landed Cost Based on Purchase Invoice Rate,تنظیم هزینه تمام شده تا درب انبار بر اساس نرخ فاکتور خرید, +Set Loyalty Program,تنظیم برنامه وفاداری, +Set Operating Cost / Scrape Items From Sub-assemblies,تنظیم هزینه عملیاتی / آیتم‌های ضایعات از زیر مونتاژها, +Set Operating Cost Based On BOM Quantity,هزینه عملیاتی را بر اساس مقدار BOM تنظیم کنید, +Set Process Loss Item Quantity,مقدار مورد از دست دادن فرآیند را تنظیم کنید, +Set Project Status,تنظیم وضعیت پروژه, +Set Quantity,تنظیم مقدار, +Set Response Time for Priority {0} in row {1}.,زمان پاسخ را برای اولویت {0} در ردیف {1} تنظیم کنید., +Set Valuation Rate Based on Source Warehouse,نرخ ارزش گذاری را بر اساس انبار منبع تنظیم کنید, +Set Warehouse,مجموعه انبار, +Set default {0} account for non stock items,تنظیم حساب پیش‌فرض {0} را برای آیتم‌های غیر موجودی, +Set fieldname from which you want to fetch the data from the parent form.,نام فیلدی را که می‌خواهید داده‌ها را از فرم والد دریافت کنید، تنظیم کنید., +Set quantity of process loss item:,تنظیم مقدار مورد از دست دادن فرآیند:, +Set the Planned Start Date (an Estimated Date at which you want the Production to begin),تاریخ شروع برنامه ریزی شده را تنظیم کنید (تاریخ تخمینی که در آن می خواهید تولید شروع شود), +Set the status manually.,وضعیت را به صورت دستی تنظیم کنید., +Set {0} in asset category {1} for company {2},تنظیم {0} در دسته دارایی {1} برای شرکت {2}, +Sets 'Accepted Warehouse' in each row of the Items table.,انبار پذیرفته شده را در هر ردیف از جدول آیتم ها تنظیم می کند., +Sets 'Rejected Warehouse' in each row of the Items table.,انبار مرجوعی را در هر ردیف از جدول آیتم ها تنظیم می کند., +Sets 'Reserve Warehouse' in each row of the Supplied Items table.,انبار ذخیره را در هر ردیف از جدول اقلام عرضه شده تنظیم می کند., +Setting Item Locations...,تنظیم مکان مورد..., +Setting the account as a Company Account is necessary for Bank Reconciliation,تنظیم حساب به عنوان حساب شرکت برای تسویه حساب بانکی ضروری است, +Setting {} is required,تنظیم {} مورد نیاز است, +Setup your organization,سازمان خود را راه‌اندازی کنید, +Shift,تغییر مکان, +Shift Factor,ضریب تغییر, +Shift Name,نام شیفت, +Shipment,حمل و نقل, +Shipment Amount,مبلغ حمل و نقل, +Shipment Delivery Note,یادداشت تحویل حمل و نقل, +Shipment ID,شناسه حمل و نقل, +Shipment Information,اطلاعات حمل و نقل, +Shipment Parcel,بسته حمل و نقل, +Shipment Parcel Template,قالب بسته حمل و نقل, +Shipment Type,نوع حمل و نقل, +Shipment details,جزئیات حمل و نقل, +Shipping Address Details,جزئیات آدرس حمل و نقل, +Shipping Address Template,الگوی آدرس حمل و نقل, +Show Balances in Chart Of Accounts,نمایش موجودی در نمودار حساب, +Show Barcode Field in Stock Transactions,نمایش فیلد بارکد در معاملات موجودی, +Show Dimension Wise Stock,نمایش موجودی بر اساس ابعاد, +Show Disabled Warehouses,نمایش انبارهای غیرفعال, +Show Failed Logs,نمایش لاگ های ناموفق, +Show GL Balance,نمایش تراز دفتر کل, +Show Item Name,نمایش نام آیتم, +Show Ledger View,نمایش نمای دفتر کل, +Show Net Values in Party Account,نمایش ارزش خالص در حساب طرف, +Show Pay Button in Purchase Order Portal,نمایش دکمه پرداخت در پورتال سفارش خرید, +Show Preview,نمایش پیش نمایش, +Show Remarks,نمایش اظهارات, +Show Taxes as Table in Print,نمایش مالیات به عنوان جدول در چاپ, +Show net values in opening and closing columns,نمایش مقادیر خالص در ستون افتتاحیه و اختتامیه, +Show only the Immediate Upcoming Term,فقط عبارت فوری آینده را نشان دهید, +Show pending entries,نمایش ورودی های معلق, +Show with upcoming revenue/expense,نمایش با درآمد/هزینه آتی, +"Simple Python Expression, Example: doc.status == 'Open' and doc.issue_type == 'Bug'",عبارت ساده پایتون، مثال: doc.status == 'Open' و doc.issue_type == 'Bug', +Simultaneous,همزمان, +Skip Available Sub Assembly Items,صرف نظر از آیتم‌های زیر مونتاژ موجود, +Skipped,رد شد, +Skipping Tax Withholding Category {0} as there is no associated account set for Company {1} in it.,رد شدن از دسته مالیات کسر مالیات {0} زیرا هیچ حساب مرتبطی برای شرکت {1} در آن تنظیم نشده است., +"Skipping {0} of {1}, {2}",پرش از {0} از {1}، {2}, +Sold by,فروخته شده توسط, +Something went wrong please try again,اشتباهی رخ داده لطفا دوباره تلاش کنید, +Source Exchange Rate,نرخ مبادله منبع, +Source Fieldname,نام فیلد منبع, +South Africa VAT Account,حساب مالیات بر ارزش افزوده آفریقای جنوبی, +South Africa VAT Settings,تنظیمات مالیات بر ارزش افزوده آفریقای جنوبی, +Spacer,اسپیسر, +Split Asset,تقسیم دارایی, +Split Early Payment Discount Loss into Income and Tax Loss,زیان تخفیف پرداخت زودهنگام را به درآمد و ضرر مالیات تقسیم کنید, +Split From,تقسیم از, +Split Qty,تقسیم تعداد, +Split qty cannot be grater than or equal to asset qty,مقدار تقسیم نمی‌تواند بیشتر یا مساوی تعداد دارایی باشد, +Splitting {0} {1} into {2} rows as per Payment Terms,تقسیم {0} {1} به ردیف‌های {2} طبق شرایط پرداخت, +Stage,صحنه, +Stale Days should start from 1.,روزهای قدیمی باید از 1 شروع شود., +Standard Description,شرح استاندارد, +Standard Rated Expenses,هزینه های رتبه بندی استاندارد, +"Standard Terms and Conditions that can be added to Sales and Purchases. Examples: Validity of the offer, Payment Terms, Safety and Usage, etc.",شرایط و ضوابط استاندارد که می تواند به خرید و فروش اضافه شود. مثال: اعتبار پیشنهاد، شرایط پرداخت، ایمنی و استفاده و غیره., +Standard rated supplies in {0},منابع دارای رتبه استاندارد در {0}, +Start / Resume,شروع / از سرگیری, +Start Date should be lower than End Date,تاریخ شروع باید کمتر از تاریخ پایان باشد, +Start Deletion,شروع حذف, +Start Import,شروع درون‌بُرد, +Start Job,شروع کار, +Start Merge,ادغام را شروع کنید, +Start Reposting,بازنشر را شروع کنید, +Start Time can't be greater than or equal to End Time for {0}.,زمان شروع نمی تواند بزرگتر یا مساوی با زمان پایان برای {0} باشد., +Started a background job to create {1} {0},یک کار پس‌زمینه برای ایجاد {1} {0} شروع کرد, +Status Details,جزئیات وضعیت, +Status Illustration,مصور سازی وضعیت, +Status set to rejected as there are one or more rejected readings.,وضعیت رد شد زیرا یک یا چند قرائت رد شده وجود دارد., +Stock Closing,اختتامیه موجودی, +Stock Consumed During Repair,موجودی مصرف شده در حین تعمیر, +Stock Consumption Details,جزئیات مصرف موجودی, +Stock Entries already created for Work Order {0}: {1},ثبت های موجودی قبلاً برای دستور کار {0} ایجاد شده‌اند: {1}, +Stock Ledger Invariant Check,چک ثابت دفتر کل موجودی, +Stock Ledger Variance,واریانس دفتر کل موجودی, +Stock Movement,جابه‌جایی موجودی, +Stock Planning,برنامه ریزی موجودی, +Stock Reposting Settings,تنظیمات ارسال مجدد موجودی, +Stock Reservation,رزرو موجودی, +Stock Reservation Entries Cancelled,ورودی های رزرو موجودی لغو شد, +Stock Reservation Entries Created,نوشته های رزرو موجودی ایجاد شد, +Stock Reservation Entry,ثبت رزرو موجودی, +Stock Reservation Entry cannot be updated as it has been delivered.,ورودی رزرو موجودی را نمی توان به دلیل تحویل گرفتن به روز کرد., +"Stock Reservation Entry created against a Pick List cannot be updated. If you need to make changes, we recommend canceling the existing entry and creating a new one.",ثبت رزرو موجودی ایجاد شده در برابر فهرست انتخابی نمی تواند به روز شود. اگر نیاز به ایجاد تغییرات دارید، توصیه می کنیم ثبت موجود را لغو کنید و یک ثبت جدید ایجاد کنید., +Stock Reservation Warehouse Mismatch,عدم تطابق انبار رزرو انبار, +Stock Reservation can only be created against {0}.,رزرو موجودی فقط می تواند در مقابل {0} ایجاد شود., +Stock Reserved Qty (in Stock UOM),تعداد موجودی رزرو شده (در انبار UOM), +Stock Transactions Settings,تنظیمات معاملات موجودی, +Stock UOM Quantity,مقدار موجودی UOM, +Stock Unreservation,عدم رزرو موجودی, +Stock Validations,اعتبارسنجی موجودی, +Stock cannot be reserved in group warehouse {0}.,موجودی در انبار گروهی {0} قابل رزرو نیست., +Stock cannot be reserved in the group warehouse {0}.,موجودی در انبار گروهی {0} قابل رزرو نیست., +Stock not available for Item {0} in Warehouse {1}.,موجودی برای کالای {0} در انبار {1} موجود نیست., +Stock quantity not enough for Item Code: {0} under warehouse {1}. Available quantity {2} {3}.,مقدار موجودی برای کد مورد کافی نیست: {0} در انبار {1}. مقدار موجود {2} {3}., +Stock transactions that are older than the mentioned days cannot be modified.,معاملات موجودی با قدمت بیشتر از روزهای مذکور قابل تغییر نمی باشد., +Stock/Accounts can not be frozen as processing of backdated entries is going on. Please try again later.,موجودی/حساب‌ها را نمی‌توان مسدود کرد زیرا پردازش ورودی‌های به‌تاریخ در حال انجام است. لطفاً بعداً دوباره امتحان کنید., +Sub Assemblies & Raw Materials,زیر مونتاژها و مواد اولیه, +Sub Assembly Item,آیتم زیر مونتاژ, +Sub Assembly Item Code,کد آیتم‌های زیر مونتاژ, +Sub Assembly Items,آیتم‌های زیر مونتاژ, +Sub Assembly Warehouse,انبار زیر مونتاژ, +Sub Operation,عملیات فرعی, +Sub Operations,عملیات فرعی, +Subcontract BOM,قرارداد فرعی BOM, +Subcontract Order,سفارش قرارداد فرعی, +Subcontract Order Summary,خلاصه سفارش قرارداد فرعی, +Subcontract Return,بازگشت قرارداد فرعی, +Subcontracting BOM,پیمانکاری فرعی BOM, +Subcontracting Order,سفارش پیمانکاری فرعی, +Subcontracting Order (Draft) will be auto-created on submission of Purchase Order.,سفارش پیمانکاری فرعی (پیش نویس) با ارسال سفارش خرید به صورت خودکار ایجاد می شود., +Subcontracting Order Item,مورد سفارش پیمانکاری فرعی, +Subcontracting Order Service Item,آیتم خدمات سفارش قرارداد فرعی, +Subcontracting Order Supplied Item,اقلام عرضه شده سفارش پیمانکاری فرعی, +Subcontracting Order {0} created.,سفارش قرارداد فرعی {0} ایجاد شد., +Subcontracting Purchase Order,سفارش خرید پیمانکاری فرعی, +Subcontracting Receipt,رسید پیمانکاری فرعی, +Subcontracting Receipt Item,آیتم رسید پیمانکاری, +Subcontracting Receipt Supplied Item,آیتم عرضه شده رسید پیمانکاری فرعی, +Subcontracting Settings,تنظیمات پیمانکاری فرعی, +Subdivision,زیر مجموعه, +Submit Action Failed,اقدام ارسال نشد, +Submit After Import,ارسال پس از درون‌بُرد, +Submit ERR Journals?,دفترهای روزنامه ERR ارسال شود؟, +Submit Generated Invoices,فاکتورهای تولید شده را ارسال کنید, +Succeeded,موفق شد, +Succeeded Entries,ورودی های موفق, +"Successfully changed Stock UOM, please redefine conversion factors for new UOM.",UOM موجودی با موفقیت تغییر کرد، لطفاً فاکتورهای تبدیل را برای UOM جدید دوباره تعریف کنید., +Successfully imported {0},{0} با موفقیت درون‌بُرد شد, +"Successfully imported {0} record out of {1}. Click on Export Errored Rows, fix the errors and import again.",{0} رکورد از {1} با موفقیت درون‌بُرد شد. روی Export Errored Rows کلیک کنید، خطاها را برطرف کرده و دوباره وارد کنید., +Successfully imported {0} record.,{0} رکورد با موفقیت درون‌بُرد شد., +"Successfully imported {0} records out of {1}. Click on Export Errored Rows, fix the errors and import again.",{0} رکورد از {1} با موفقیت درون‌بُرد شد. روی Export Errored Rows کلیک کنید، خطاها را برطرف کرده و دوباره وارد کنید., +Successfully imported {0} records.,{0} رکورد با موفقیت درون‌بُرد شد., +Successfully linked to Customer,با موفقیت به مشتری پیوند داده شد, +Successfully linked to Supplier,با موفقیت به تامین کننده پیوند داده شد, +Successfully merged {0} out of {1}.,{0} از {1} با موفقیت ادغام شد., +Successfully updated {0},با موفقیت به روز شد {0}, +"Successfully updated {0} record out of {1}. Click on Export Errored Rows, fix the errors and import again.",{0} رکورد از {1} با موفقیت به روز شد. روی Export Errored Rows کلیک کنید، خطاها را برطرف کرده و دوباره وارد کنید., +Successfully updated {0} record.,رکورد {0} با موفقیت به روز شد., +"Successfully updated {0} records out of {1}. Click on Export Errored Rows, fix the errors and import again.",{0} رکورد از {1} با موفقیت به روز شد. روی Export Errored Rows کلیک کنید، خطاها را برطرف کرده و دوباره وارد کنید., +Successfully updated {0} records.,رکورد {0} با موفقیت به روز شد., +Sum of Repair Cost and Value of Consumed Stock Items.,مجموع هزینه تعمیر و ارزش آیتم‌های موجودی مصرف شده., +Supplied Item,مورد عرضه شده, +Supplier Address Details,جزئیات آدرس تامین کننده, +Supplier Contact,تماس با تامین کننده, +Supplier Group Item,مورد گروه تامین کننده, +Supplier Info,اطلاعات تامین کننده, +Supplier Invoice,فاکتور تامین کننده, +Supplier Item,مورد تامین کننده, +Supplier Portal Users,کاربران پورتال تامین کننده, +Supplier Primary Address,آدرس اصلی تامین کننده, +Supplier Primary Contact,تماس اصلی تامین کننده, +Supplier Warehouse mandatory for sub-contracted {0},انبار تامین کننده برای قراردادهای فرعی {0} اجباری است, +Supplies subject to the reverse charge provision,لوازم مشمول ارائه شارژ معکوس, +Sync Now,اکنون همگام سازی کنید, +Sync Started,همگام سازی شروع شد, +System Settings,تنظیمات سیستم, +System will automatically create the serial numbers / batch for the Finished Good on submission of work order,سیستم به طور خودکار شماره سریال / دسته ای را برای کالای تمام شده در هنگام ارسال سفارش ایجاد می کند, +System will not check over billing since amount for Item {0} in {1} is zero,سیستم صورتحساب را بررسی نمی‌کند زیرا مبلغ مورد {0} در {1} صفر است, +TDS Payable,TDS قابل پرداخت, +Target Asset,دارایی هدف, +Target Asset Location,مکان دارایی مورد نظر, +Target Asset {0} cannot be cancelled,دارایی هدف {0} قابل لغو نیست, +Target Asset {0} cannot be submitted,دارایی هدف {0} قابل ارسال نیست, +Target Asset {0} cannot be {1},دارایی هدف {0} نمی تواند {1} باشد, +Target Asset {0} does not belong to company {1},دارایی هدف {0} به شرکت {1} تعلق ندارد, +Target Asset {0} needs to be composite asset,دارایی هدف {0} باید دارایی ترکیبی باشد, +Target Batch No,شماره دسته هدف, +Target Exchange Rate,نرخ ارز هدف, +Target Fieldname (Stock Ledger Entry),نام فیلد هدف (ثبت دفتر کل موجودی), +Target Fixed Asset Account,حساب دارایی ثابت هدف, +Target Has Batch No,هدف دارای Batch No, +Target Has Serial No,هدف دارای شماره سریال, +Target Incoming Rate,نرخ ورودی هدف, +Target Is Fixed Asset,هدف دارایی ثابت است, +Target Item Code,کد آیتم هدف, +Target Item Name,نام آیتم هدف, +Target Item {0} is neither a Fixed Asset nor a Stock Item,مورد هدف {0} نه یک دارایی ثابت است و نه یک کالای موجودی, +Target Item {0} must be a Fixed Asset item,مورد هدف {0} باید یک مورد دارایی ثابت باشد, +Target Item {0} must be a Stock Item,مورد هدف {0} باید یک مورد موجودی باشد, +Target Qty must be a positive number,تعداد هدف باید یک عدد مثبت باشد, +Target Serial No,شماره سریال هدف, +Target Warehouse is mandatory for Decapitalization,انبار هدف برای کاهش سرمایه اجباری است, +Target Warehouse is set for some items but the customer is not an internal customer.,انبار هدف برای برخی آیتم‌ها تنظیم شده است اما مشتری، یک مشتری داخلی نیست., +Task {0} depends on Task {1}. Please add Task {1} to the Tasks list.,وظیفه {0} به وظیفه {1} بستگی دارد. لطفاً وظیفه {1} را به لیست وظایف اضافه کنید., +Tax Amount,مقدار مالیات, +Tax Amount will be rounded on a row(items) level,مقدار مالیات در سطح ردیف (آیتم‌ها) گرد می شود, +Tax Refunds provided to Tourists under the Tax Refunds for Tourists Scheme,بازپرداخت مالیات بر اساس طرح بازپرداخت مالیات برای گردشگران به گردشگران ارائه می شود, +Tax Settings,تنظیمات مالیاتی, +Tax Withheld Vouchers,کوپن های مالیاتی کسر شده, +Tax Withholding Category {} against Company {} for Customer {} should have Cumulative Threshold value.,رده مالیاتی {} در برابر شرکت {} برای مشتری {} باید مقدار آستانه تجمعی داشته باشد., +Tax Withholding Details,جزئیات کسر مالیات, +Tax Withholding Net Total,کل خالص کسر مالیات, +Tax will be withheld only for amount exceeding the cumulative threshold,مالیات فقط برای مبلغی که بیش از آستانه تجمعی باشد، کسر خواهد شد, +Team,تیم, +Telephony Call Type,نوع تماس تلفنی, +Template Item Selected,آیتم الگو انتخاب شد, +Template Options,گزینه های الگو, +Template Task,وظیفه الگو, +Template Warnings,هشدارهای الگو, +Terms & Conditions,شرایط و ضوابط, +Terms Template,الگوی شرایط, +Territory Item,قلمرو مورد, +Territory Wise Sales,فروش از نظر منطقه, +The Condition '{0}' is invalid,"شرط ""{0}"" نامعتبر است", +The Document Type {0} must have a Status field to configure Service Level Agreement,نوع سند {0} باید دارای یک فیلد وضعیت برای پیکربندی قرارداد سطح سرویس باشد, +"The GL Entries will be cancelled in the background, it can take a few minutes.",ورودی‌های دفتر کل در پس‌زمینه لغو می‌شوند، ممکن است چند دقیقه طول بکشد., +"The Payment Request {0} is already paid, cannot process payment twice",درخواست پرداخت {0} قبلاً پرداخت شده است، نمی‌توان پرداخت را دو بار پردازش کرد, +"The Pick List having Stock Reservation Entries cannot be updated. If you need to make changes, we recommend canceling the existing Stock Reservation Entries before updating the Pick List.",فهرست انتخابی دارای ورودی های رزرو موجودی نمی تواند به روز شود. اگر نیاز به ایجاد تغییرات دارید، توصیه می‌کنیم قبل از به‌روزرسانی فهرست انتخاب، ورودی‌های رزرو موجودی را لغو کنید., +The Process Loss Qty has reset as per job cards Process Loss Qty,Process Loss Qty مطابق با کارت کارهای Process Loss Ty بازنشانی شده است, +The currency of invoice {} ({}) is different from the currency of this dunning ({}).,واحد پول فاکتور {} ({}) با واحد پول این دونینگ ({}) متفاوت است., +The default BOM for that item will be fetched by the system. You can also change the BOM.,BOM پیش‌فرض برای آن مورد توسط سیستم واکشی می‌شود. شما همچنین می توانید BOM را تغییر دهید., +The field {0} in row {1} is not set,فیلد {0} در ردیف {1} تنظیم نشده است, +"The following Items, having Putaway Rules, could not be accomodated:",موارد زیر که دارای قوانین Putaway هستند، قابل استفاده نیستند:, +The following assets have failed to automatically post depreciation entries: {0},دارایی های زیر به طور خودکار ورودی های استهلاک را پست نکرده اند: {0}, +The items {0} and {1} are present in the following {2} :,موارد {0} و {1} در {2} زیر موجود هستند:, +The operation {0} can not add multiple times,عملیات {0} نمی تواند چندین بار اضافه کند, +The operation {0} can not be the sub operation,عملیات {0} نمی تواند عملیات فرعی باشد, +The reserved stock will be released when you update items. Are you certain you wish to proceed?,با به‌روزرسانی موارد، موجودی رزرو شده آزاد می‌شود. آیا مطمئن هستید که می خواهید ادامه دهید؟, +The reserved stock will be released. Are you certain you wish to proceed?,موجودی رزرو شده آزاد خواهد شد. آیا مطمئن هستید که می خواهید ادامه دهید؟, +The selected {0} does not contain the selected Asset Item.,{0} انتخاب شده حاوی مورد دارایی انتخابی نیست., +"The stock has been reserved for the following Items and Warehouses, un-reserve the same to {0} the Stock Reconciliation:

{1}",موجودی برای اقلام و انبارهای زیر رزرو شده است، همان را در {0} تطبیق موجودی لغو کنید:

{1}, +"The sync has started in the background, please check the {0} list for new records.",همگام سازی در پس زمینه شروع شده است، لطفاً لیست {0} را برای رکوردهای جدید بررسی کنید., +"The task has been enqueued as a background job. In case there is any issue on processing in background, the system will add a comment about the error on this Stock Reconciliation and revert to the Submitted stage",وظیفه به عنوان یک کار پس زمینه در نوبت قرار گرفته است. در صورت وجود هرگونه مشکل در پردازش در پس‌زمینه، سیستم نظری در مورد خطا در این تطبیق موجودی اضافه می‌کند و به مرحله ارسال باز می‌گردد., +The total Issue / Transfer quantity {0} in Material Request {1} cannot be greater than allowed requested quantity {2} for Item {3},مجموع مقدار حواله / انتقال {0} در درخواست مواد {1} نمی تواند بیشتر از مقدار مجاز درخواستی {2} برای آیتم {3} باشد, +The total Issue / Transfer quantity {0} in Material Request {1} cannot be greater than requested quantity {2} for Item {3},مجموع مقدار حواله / انتقال {0} در درخواست مواد {1} نمی تواند بیشتر از مقدار درخواستی {2} برای آیتم {3} باشد, +"The users with this Role are allowed to create/modify a stock transaction, even though the transaction is frozen.",کاربران دارای این نقش مجاز به ایجاد/تغییر تراکنش موجودی هستند، حتی اگر تراکنش مسدود شده باشد., +The warehouse where you store finished Items before they are shipped.,انباری که اقلام تمام شده را قبل از ارسال در آن ذخیره می کنید., +"The warehouse where you store your raw materials. Each required item can have a separate source warehouse. Group warehouse also can be selected as source warehouse. On submission of the Work Order, the raw materials will be reserved in these warehouses for production usage.",انباری که مواد اولیه خود را در آن نگهداری می کنید. هر کالای مورد نیاز می تواند یک انبار منبع جداگانه داشته باشد. انبار گروهی نیز می تواند به عنوان انبار منبع انتخاب شود. پس از ارسال دستور کار، مواد اولیه در این انبارها برای استفاده تولید رزرو می شود., +The warehouse where your Items will be transferred when you begin production. Group Warehouse can also be selected as a Work in Progress warehouse.,انباری که هنگام شروع تولید، اقلام شما در آن منتقل می شوند. انبار گروهی همچنین می تواند به عنوان انبار Work in Progress انتخاب شود., +The {0} {1} is used to calculate the valuation cost for the finished good {2}.,{0} {1} برای محاسبه هزینه ارزیابی کالای نهایی {2} استفاده می‌شود., +There are no Failed transactions,هیچ تراکنش ناموفقی وجود ندارد, +There are no slots available on this date,هیچ اسلاتی در این تاریخ موجود نیست, +There are only {0} asset created or linked to {1}. Please create or link {2} Assets with respective document.,فقط {0} دارایی ایجاد شده یا به {1} پیوند داده شده است. لطفاً {2} دارایی ها را با سند مربوطه ایجاد یا پیوند دهید., +"There are two options to maintain valuation of stock. FIFO (first in - first out) and Moving Average. To understand this topic in detail please visit Item Valuation, FIFO and Moving Average.",دو گزینه برای حفظ ارزش موجودی وجود دارد. FIFO (اولین ورود - اولین خروج) و میانگین متحرک. برای درک جزئیات این موضوع، لطفاً از هدف ارزش اقلام، FIFO و میانگین متحرک., +There aren't any item variants for the selected item,هیچ گونه آیتمی برای آیتم انتخابی وجود ندارد, +There is already a valid Lower Deduction Certificate {0} for Supplier {1} against category {2} for this time period.,در حال حاضر یک گواهی کسر کمتر معتبر {0} برای تامین کننده {1} در برابر دسته {2} برای این دوره زمانی وجود دارد., +There is already an active Subcontracting BOM {0} for the Finished Good {1}.,در حال حاضر یک BOM قرارداد فرعی فعال {0} برای کالای نهایی {1} وجود دارد., +There must be atleast 1 Finished Good in this Stock Entry,باید حداقل 1 کالای تمام شده در این ثبت موجودی وجود داشته باشد, +There was an error creating Bank Account while linking with Plaid.,هنگام پیوند با Plaid خطایی در ایجاد حساب بانکی روی داد., +There was an error syncing transactions.,هنگام همگام‌سازی تراکنش‌ها خطایی روی داد., +There was an error updating Bank Account {} while linking with Plaid.,هنگام به‌روزرسانی حساب بانکی {} هنگام پیوند با Plaid خطایی روی داد., +There was an issue connecting to Plaid's authentication server. Check browser console for more information,مشکلی در اتصال به سرور تأیید اعتبار Plaid وجود داشت. برای اطلاعات بیشتر کنسول مرورگر را بررسی کنید, +There were issues unlinking payment entry {0}.,مشکلاتی در قطع پیوند ثبت پرداخت {0} وجود داشت., +This Account has '0' balance in either Base Currency or Account Currency,این حساب دارای موجودی '0' به ارز پایه یا ارز حساب است, +This field is used to set the 'Customer'.,"این فیلد برای تنظیم ""مشتری"" استفاده می شود.", +This filter will be applied to Journal Entry.,این فیلتر برای ثبت دفتر روزنامه اعمال خواهد شد., +This is a Template BOM and will be used to make the work order for {0} of the item {1},این یک الگوی BOM است و برای ایجاد دستور کار برای {0} مورد {1} استفاده خواهد شد., +This is considered dangerous from accounting point of view.,این از نظر حسابداری خطرناک تلقی می شود., +"This is enabled by default. If you want to plan materials for sub-assemblies of the Item you're manufacturing leave this enabled. If you plan and manufacture the sub-assemblies separately, you can disable this checkbox.",این به طور پیش فرض فعال است. اگر می‌خواهید مواد را برای زیر مونتاژ های آیتمی که در حال تولید آن هستید برنامه‌ریزی کنید، این گزینه را فعال کنید. اگر زیر مونتاژ ها را جداگانه برنامه ریزی و تولید می کنید، می توانید این چک باکس را غیرفعال کنید., +"This is for raw material Items that'll be used to create finished goods. If the Item is an additional service like 'washing' that'll be used in the BOM, keep this unchecked.","این برای اقلام مواد خام است که برای ایجاد کالاهای نهایی استفاده می شود. اگر مورد یک سرویس اضافی مانند ""شستن"" است که در BOM استفاده می شود، این مورد را علامت نزنید.", +This item filter has already been applied for the {0},این فیلتر مورد قبلاً برای {0} اعمال شده است, +This option can be checked to edit the 'Posting Date' and 'Posting Time' fields.,این گزینه برای ویرایش فیلدهای «تاریخ ارسال» و «زمان ارسال» قابل بررسی است., +This schedule was created when Asset {0} was adjusted through Asset Value Adjustment {1}.,این برنامه زمانی ایجاد شد که دارایی {0} از طریق تعدیل ارزش دارایی {1} تنظیم شد., +This schedule was created when Asset {0} was consumed through Asset Capitalization {1}.,این برنامه زمانی ایجاد شد که دارایی {0} از طریق سرمایه گذاری دارایی {1} مصرف شد., +This schedule was created when Asset {0} was repaired through Asset Repair {1}.,این برنامه زمانی ایجاد شد که دارایی {0} از طریق تعمیر دارایی {1} تعمیر شد., +This schedule was created when Asset {0} was restored on Asset Capitalization {1}'s cancellation.,این برنامه زمانی ایجاد شد که دارایی {0} در لغو دارایی با حروف بزرگ {1} بازیابی شد., +This schedule was created when Asset {0} was restored.,این برنامه زمانی ایجاد شد که دارایی {0} بازیابی شد., +This schedule was created when Asset {0} was returned through Sales Invoice {1}.,این برنامه زمانی ایجاد شد که دارایی {0} از طریق فاکتور فروش {1} برگردانده شد., +This schedule was created when Asset {0} was scrapped.,این برنامه زمانی ایجاد شد که دارایی {0} لغو شد., +This schedule was created when Asset {0} was sold through Sales Invoice {1}.,این برنامه زمانی ایجاد شد که دارایی {0} از طریق فاکتور فروش {1} فروخته شد., +This schedule was created when Asset {0} was updated after being split into new Asset {1}.,این برنامه زمانی ایجاد شد که دارایی {0} پس از تقسیم به دارایی جدید {1} به روز شد., +This schedule was created when Asset {0}'s Asset Repair {1} was cancelled.,این برنامه زمانی ایجاد شد که تعمیر دارایی {0} {1} لغو شد., +This schedule was created when Asset {0}'s Asset Value Adjustment {1} was cancelled.,این برنامه زمانی ایجاد شد که تعدیل ارزش دارایی {0} {1} لغو شد., +This schedule was created when Asset {0}'s shifts were adjusted through Asset Shift Allocation {1}.,این برنامه زمانی ایجاد شد که تغییرات دارایی {0} از طریق تخصیص تغییر دارایی {1} تنظیم شد., +This schedule was created when new Asset {0} was split from Asset {1}.,این برنامه زمانی ایجاد شد که دارایی جدید {0} از دارایی {1} جدا شد., +"This table is used to set details about the 'Item', 'Qty', 'Basic Rate', etc.","این جدول برای تنظیم جزئیات مربوط به ""آیتم""، ""مقدار""، ""نرخ پایه"" و غیره استفاده می شود.", +This {} will be treated as material transfer.,این {} به عنوان انتقال مواد در نظر گرفته می شود., +Threshold for Suggestion (In Percentage),آستانه پیشنهاد (در درصد), +Time Taken to Deliver,زمان صرف شده برای تحویل, +Time in mins,زمان به دقیقه, +Time in mins.,زمان به دقیقه., +Time slot is not available,بازه زمانی در دسترس نیست, +To Delivery Date,تا تاریخ تحویل, +To Doctype,برای Doctype, +To Due Date,به تاریخ سررسید, +To Payment Date,به تاریخ پرداخت, +To Reference Date,به تاریخ مرجع, +To add Operations tick the 'With Operations' checkbox.,"برای افزودن عملیات، کادر ""با عملیات"" را علامت بزنید.", +To add subcontracted Item's raw materials if include exploded items is disabled.,افزودن مواد خام قراردادی فرعی در صورت وجود آیتم‌های گسترده شده غیرفعال است., +To apply condition on parent field use parent.field_name and to apply condition on child table use doc.field_name. Here field_name could be based on the actual column name of the respective field.,برای اعمال شرط در فیلد والد از parent.field_name و برای اعمال شرط در جدول فرزند از doc.field_name استفاده کنید. در اینجا field_name می تواند بر اساس نام ستون واقعی فیلد مربوطه باشد., +To be Delivered to Customer,برای تحویل به مشتری, +To cancel a {} you need to cancel the POS Closing Entry {}.,برای لغو یک {}، باید ثبت اختتامیه POS {} را لغو کنید., +"To enable Capital Work in Progress Accounting,",برای فعال کردن حسابداری کار سرمایه ای،, +To include non-stock items in the material request planning. i.e. Items for which 'Maintain Stock' checkbox is unticked.,"گنجاندن آیتم‌های غیر موجودی در برنامه ریزی درخواست مواد. به عنوان مثال آیتم‌هایی که چک باکس ""نگهداری موجودی"" برای آنها علامت گذاری نشده است.", +To submit the invoice without purchase order please set {0} as {1} in {2},برای ارسال فاکتور بدون سفارش خرید لطفاً {0} را به عنوان {1} در {2} تنظیم کنید, +To submit the invoice without purchase receipt please set {0} as {1} in {2},برای ارسال فاکتور بدون رسید خرید، لطفاً {0} را به عنوان {1} در {2} تنظیم کنید., +"To use a different finance book, please uncheck 'Include Default FB Assets'",برای استفاده از یک کتاب مالی متفاوت، لطفاً علامت «شامل دارایی‌های پیش‌فرض FB» را بردارید., +"To use a different finance book, please uncheck 'Include Default FB Entries'",برای استفاده از یک کتاب مالی متفاوت، لطفاً علامت «شامل ورودی‌های پیش‌فرض FB» را بردارید., +Total Active Items,مجموع آیتم‌های فعال, +Total Allocations,مجموع تخصیص ها, +Total Asset,کل دارایی, +Total Asset Cost,هزینه کل دارایی, +Total Billing Hours,کل ساعت صورتحساب, +Total Contribution Amount Against Invoices: {0},مجموع مبلغ مشارکت در برابر فاکتورها: {0}, +Total Contribution Amount Against Orders: {0},کل مبلغ مشارکت در برابر سفارش‌ها: {0}, +Total Equity,مجموع حقوق صاحبان موجودی, +Total Incoming Bills,مجموع صورتحساب های دریافتی, +Total Incoming Payment,کل پرداخت ورودی, +Total Incoming Value (Receipt),مجموع ارزش ورودی (رسید), +Total Interest,سود کل, +Total Issues,مجموع مشکلات, +Total Items,مجموع آیتم‌ها, +Total Liability,کل مسئولیت, +Total Operation Time,کل زمان عملیات, +Total Other Charges,مجموع سایر هزینه ها, +Total Outgoing Bills,مجموع صورتحساب خروجی, +Total Outgoing Payment,کل پرداخت خروجی, +Total Outgoing Value (Consumption),کل ارزش خروجی (مصرف), +Total Purchase Amount,کل مبلغ خرید, +Total Purchase Cost has been updated,کل هزینه خرید به روز شده است, +Total Repair Cost,کل هزینه تعمیر, +Total Reposting Count,تعداد کل بازنشر, +Total Sales Amount,کل مبلغ فروش, +Total Stock Value,ارزش کل موجودی, +Total Supplied Qty,تعداد کل عرضه شده, +Total Time (in Mins),زمان کل (به دقیقه), +Total Value,ارزش کل, +Total Value Difference (Incoming - Outgoing),تفاوت ارزش کل (ورودی - خروجی), +Total Views,کل بازدیدها, +Total Warehouses,کل انبارها, +Total percentage against cost centers should be 100,درصد کل در مقابل مراکز هزینه باید 100 باشد, +Tracking Status,وضعیت پیگیری, +Tracking Status Info,اطلاعات وضعیت ردیابی, +Tracking URL,URL پیگیری, +Transaction Deletion Document: {0} is running for this Company. {1},سند حذف تراکنش: {0} برای این شرکت در حال اجرا است. {1}, +Transaction Deletion Record,رکورد حذف تراکنش, +Transaction Deletion Record Item,مورد رکورد حذف تراکنش, +Transaction Exchange Rate,نرخ ارز معاملات, +Transaction Settings,تنظیمات تراکنش, +Transactions against the Company already exist! Chart of Accounts can only be imported for a Company with no transactions.,معاملات در مقابل شرکت در حال حاضر وجود دارد! نمودار حساب ها فقط برای شرکتی بدون تراکنش قابل درون‌بُرد است., +Transfer Asset,انتقال دارایی, +Transfer From Warehouses,انتقال از انبارها, +Transferring cannot be done to an Employee. Please enter location where Asset {0} has to be transferred,انتقال به کارمند امکان پذیر نیست. لطفاً مکانی را وارد کنید که دارایی {0} باید در آنجا منتقل شود, +Transit,ترانزیت, +Transit Entry,ورودی حمل و نقل, +Truncates 'Remarks' column to set character length,"ستون ""Remarks"" را برای تنظیم طول کاراکتر کوتاه می کند", +Type Of Call,نوع تماس, +Type of Transaction,نوع تراکنش, +UAE VAT 201,مالیات بر ارزش افزوده امارات متحده عربی 201, +UAE VAT Account,حساب مالیات بر ارزش افزوده امارات متحده عربی, +UAE VAT Accounts,حساب های مالیات بر ارزش افزوده امارات متحده عربی, +UAE VAT Settings,تنظیمات مالیات بر ارزش افزوده امارات متحده عربی, +UOM conversion factor required for UOM: {0} in Item: {1},ضریب تبدیل UOM مورد نیاز برای UOM: {0} در مورد: {1}, +UnReconcile,تطبیق نکردن, +Unable to find variable:,قادر به یافتن متغیر نیست:, +Unassigned Qty,تعداد تعیین نشده, +"Under Working Hours table, you can add start and end times for a Workstation. For example, a Workstation may be active from 9 am to 1 pm, then 2 pm to 5 pm. You can also specify the working hours based on shifts. While scheduling a Work Order, the system will check for the availability of the Workstation based on the working hours specified.",در جدول ساعات کاری، می توانید زمان شروع و پایان یک ایستگاه کاری را اضافه کنید. به عنوان مثال، یک ایستگاه کاری ممکن است از ساعت 9 صبح تا 1 بعد از ظهر و سپس از 2 بعد از ظهر تا 5 بعد از ظهر فعال باشد. همچنین می توانید ساعت کاری را بر اساس شیفت ها مشخص کنید. هنگام برنامه ریزی یک دستور کار، سیستم بر اساس ساعات کاری مشخص شده، در دسترس بودن ایستگاه کاری را بررسی می کند., +Unit of Measure (UOM),واحد اندازه گیری (UOM), +Unlinked,بدون پیوند, +Unqualified,فاقد صلاحیت, +Unrealized Profit / Loss Account,حساب سود / زیان تحقق نیافته, +Unrealized Profit / Loss account for intra-company transfers,حساب سود / زیان تحقق نیافته برای نقل و انتقالات درون شرکتی, +Unrealized Profit/Loss account for intra-company transfers,حساب سود/زیان تحقق نیافته برای نقل و انتقالات درون شرکتی, +Unreconcile Payment,پرداخت ناسازگار, +Unreconcile Payment Entries,ورودی های پرداخت ناسازگار, +Unreconcile Transaction,تراکنش ناسازگار, +Unreconciled Amount,مبلغ ناسازگار, +Unreconciled Entries,ورودی های تطبیق نگرفته, +Unreserve,لغو رزرو کنید, +Unreserve Stock,ذخیره موجودی, +Unreserving Stock...,عدم رزرو موجودی..., +Up,بالا, +Update Billed Amount in Delivery Note,مبلغ صورتحساب در یادداشت تحویل را به روز کنید, +Update Existing Price List Rate,به روز رسانی نرخ لیست قیمت موجود, +Update Existing Records,به روز رسانی رکوردهای موجود, +Update Rate as per Last Purchase,نرخ به روز رسانی بر اساس آخرین خرید, +Update Total Purchase Cost,به روز رسانی کل هزینه خرید, +Update frequency of Project,فرکانس به روز رسانی پروژه, +Update stock must be enabled for the purchase invoice {0},به‌روزرسانی موجودی باید برای فاکتور خرید فعال شود {0}, +Updated via 'Time Log' (In Minutes),"به روز شده از طریق ""Time Log"" (به دقیقه)", +Updating Work Order status,به روز رسانی وضعیت دستور کار, +"Updating {0} of {1}, {2}",در حال به روز رسانی {0} از {1}، {2}, +Upload Bank Statement,بارگذاری صورتحساب بانکی, +Use 'Repost in background' button to trigger background job. Job can only be triggered when document is in Queued or Failed status.,برای فعال کردن کار پس‌زمینه از دکمه «بازنشر در پس‌زمینه» استفاده کنید. کار فقط زمانی می تواند فعال شود که سند در وضعیت صف یا ناموفق باشد., +Use Batch-wise Valuation,استفاده از ارزش گذاری دسته ای, +Use Company Default Round Off Cost Center,از مرکز هزینه دور پیش فرض شرکت استفاده کنید, +Use Company default Cost Center for Round off,از مرکز هزینه پیش‌فرض شرکت برای دور کردن استفاده کنید, +Use HTTP Protocol,استفاده از پروتکل HTTP, +Use Item based reposting,از ارسال مجدد بر اساس آیتم استفاده کنید, +Use Serial No / Batch Fields,از فیلدهای شماره سریال / دسته استفاده کنید, +Use Transaction Date Exchange Rate,از نرخ مبادله تاریخ تراکنش استفاده کنید, +User {0}: Removed Employee Self Service role as there is no mapped employee.,کاربر {0}: نقش خود سرویس کارمند حذف شد زیرا کارمند نگاشت شده وجود ندارد., +User {0}: Removed Employee role as there is no mapped employee.,کاربر {0}: نقش کارمند حذف شد زیرا کارمند نگاشت شده وجود ندارد., +Users can enable the checkbox If they want to adjust the incoming rate (set using purchase receipt) based on the purchase invoice rate.,اگر کاربران بخواهند نرخ ورودی (تنظیم با استفاده از رسید خرید) را بر اساس نرخ فاکتور خرید تنظیم کنند، می توانند کادر انتخاب را فعال کنند., +Users with this role are allowed to over bill above the allowance percentage,کاربرانی که این نقش را دارند مجاز به اضافه صورتحساب بالاتر از درصد مجاز هستند, +Users with this role are allowed to over deliver/receive against orders above the allowance percentage,کاربرانی که این نقش را دارند مجاز به بیش تحویل/دریافت سفارش‌ها بالاتر از درصد مجاز هستند, +Using negative stock disables FIFO/Moving average valuation when inventory is negative.,استفاده از موجودی منفی، ارزش گذاری FIFO / میانگین متحرک را زمانی که موجودی کالا منفی است، غیرفعال می کند., +VAT Accounts,حساب های مالیات بر ارزش افزوده, +VAT Amount (AED),مقدار VAT (AED), +VAT Audit Report,گزارش حسابرسی مالیات بر ارزش افزوده, +VAT on Expenses and All Other Inputs,مالیات بر ارزش افزوده هزینه ها و سایر ورودی ها, +VAT on Sales and All Other Outputs,مالیات بر ارزش افزوده بر فروش و سایر خروجی ها, +Valid From must be after {0} as last GL Entry against the cost center {1} posted on this date,معتبر از باید بعد از {0} به عنوان آخرین ثبت دفتر کل در برابر مرکز هزینه {1} پست شده در این تاریخ باشد, +Validate Negative Stock,اعتبار موجودی منفی, +Validate Stock on Save,اعتبار موجودی در ذخیره, +Valuation Field Type,نوع فیلد ارزش گذاری, +Valuation Rate (In / Out),نرخ ارزش گذاری (ورودی/خروجی), +Valuation rate for customer provided items has been set to zero.,نرخ ارزش گذاری برای آیتم‌های ارائه شده توسط مشتری صفر تعیین شده است., +Value Based Inspection,بازرسی مبتنی بر ارزش, +Value Change,تغییر ارزش, +Value Details,جزئیات ارزش, +Value of Goods,ارزش کالاها, +Value of goods cannot be 0,ارزش کالا نمی تواند 0 باشد, +Verification failed please check the link,تأیید انجام نشد لطفاً پیوند را بررسی کنید, +Via Landed Cost Voucher,از طریق کوپن هزینه تمام شده تا درب انبار, +View BOM Update Log,مشاهده لاگ به‌روزرسانی BOM, +View Exchange Gain/Loss Journals,مشاهده دفترهای روزنامه سود/زیان تبادل, +View General Ledger,مشاهده دفتر کل مرکزی, +View Ledgers,مشاهده دفتر کل ها, +Visits,بازدیدها, +Voice Call Settings,تنظیمات تماس صوتی, +Voucher,کوپن, +Voucher Name,نام کوپن, +Voucher No is mandatory,شماره کوپن الزامی است, +Voucher Qty,مقدار کوپن, +Voucher Subtype,زیرنوع کوپن, +Voucher {0} is over-allocated by {1},کوپن {0} توسط {1} بیش از حد تخصیص داده شده است, +Voucher {0} value is broken: {1},ارزش کوپن {0} خراب است: {1}, +Voucher-wise Balance,تراز مبتنی بر کوپن, +"WARNING: Exotel app has been separated from ERPNext, please install the app to continue using Exotel integration.",هشدار: برنامه Exotel از ERPNext جدا شده است، لطفاً برای ادامه استفاده از Exotel یکپارچه سازی، برنامه را نصب کنید., +WIP Composite Asset,دارایی ترکیبی «کار در حال انجام», +Waiting for payment...,در انتظار پرداخت..., +Warehouse Capacity for Item '{0}' must be greater than the existing stock level of {1} {2}.,"ظرفیت انبار برای آیتم ""{0}"" باید بیشتر از سطح موجودی موجود در {1} {2} باشد.", +Warehouse Details,جزئیات انبار, +Warehouse Disabled?,انبار غیر فعال است؟, +Warehouse Settings,تنظیمات انبار, +Warehouse Wise Stock Balance,تراز موجودی مبتنی بر انبار, +Warehouse wise Stock Value,ارزش موجودی مبتنی بر انبار, +Warehouse {0} does not belong to Company {1}.,انبار {0} متعلق به شرکت {1} نیست., +"Warehouse {0} is not linked to any account, please mention the account in the warehouse record or set default inventory account in company {1}.",انبار {0} به هیچ حسابی مرتبط نیست، لطفاً حساب را در سابقه انبار ذکر کنید یا حساب موجودی پیش فرض را در شرکت {1} تنظیم کنید., +Warehouse's Stock Value has already been booked in the following accounts:,ارزش موجودی انبار قبلاً در حساب های زیر رزرو شده است:, +Warning - Row {0}: Billing Hours are more than Actual Hours,هشدار - ردیف {0}: ساعات صورتحساب بیشتر از ساعت‌های واقعی است, +Warning on Negative Stock,هشدار در مورد موجودی منفی, +Warning!,هشدار!, +Watch Video,تماشای ویدیو, +Website Script,اسکریپت وب سایت, +Website Theme,تم وب سایت, +Week {0} {1},هفته {0} {1}, +Weekly Time to send,زمان ارسال هفتگی, +Weight (kg),وزن (کیلوگرم), +"When a parent warehouse is chosen, the system conducts stock checks against the associated child warehouses",هنگامی که یک انبار اصلی انتخاب می شود، سیستم بررسی های موجودی را در مقابل انبارهای فرزند مرتبط انجام می دهد, +"When creating an Item, entering a value for this field will automatically create an Item Price at the backend.",هنگام ایجاد یک آیتم، با وارد کردن یک مقدار برای این فیلد، به طور خودکار قیمت آیتم در قسمت پشتیبان ایجاد می شود., +"While making Purchase Invoice from Purchase Order, use Exchange Rate on Invoice's transaction date rather than inheriting it from Purchase Order. Only applies for Purchase Invoice.",هنگام تهیه فاکتور خرید از سفارش خرید، به جای ارث بردن آن از سفارش خرید، از نرخ مبادله در تاریخ تراکنش فاکتور استفاده کنید. فقط برای فاکتور خرید اعمال می شود., +Width (cm),عرض (سانتی متر), +Withdrawal,برداشت از حساب, +Work Order / Subcontract PO,دستور کار / PO قرارداد فرعی, +Work Order Consumed Materials,مواد مصرفی دستور کار, +Workflow,جریان کار, +Workflow Action,عمل گردش کار, +Workflow State,وضعیت گردش کار, +Workstation Dashboard,داشبورد ایستگاه کاری, +Workstation Status,وضعیت ایستگاه کاری, +Workstation Type,نوع ایستگاه کاری, +Workstations,ایستگاه های کاری, +Write Off Limit,محدودیت نوشتن, +Wrong Company,شرکت اشتباه, +Wrong Template,الگوی اشتباه, +You are not authorized to make/edit Stock Transactions for Item {0} under warehouse {1} before this time.,شما مجاز به انجام/ویرایش معاملات موجودی برای کالای {0} در انبار {1} قبل از این زمان نیستید., +You are picking more than required quantity for the item {0}. Check if there is any other pick list created for the sales order {1}.,شما در حال انتخاب بیش از مقدار مورد نیاز برای مورد {0} هستید. بررسی کنید که آیا لیست انتخاب دیگری برای سفارش فروش {1} ایجاد شده است., +"You can set it as a machine name or operation type. For example, stiching machine 12",می توانید آن را به عنوان نام ماشین یا نوع عملیات تنظیم کنید. مثلا ماشین دوخت 12, +You can't make any changes to Job Card since Work Order is closed.,از آنجایی که دستور کار بسته شده است، نمی توانید هیچ تغییری در کارت کار ایجاد کنید., +You can't redeem Loyalty Points having more value than the Rounded Total.,نمی‌توانید امتیازهای وفاداری را که ارزش بیشتری از مجموع گرد شده دارند، پس‌خرید کنید., +You cannot change the rate if BOM is mentioned against any Item.,اگر BOM در برابر هر موردی ذکر شده باشد، نمی توانید نرخ را تغییر دهید., +You cannot create a {0} within the closed Accounting Period {1},شما نمی توانید یک {0} در دوره حسابداری بسته {1} ایجاد کنید, +You cannot create/amend any accounting entries till this date.,تا این تاریخ نمی توانید هیچ ورودی حسابداری ایجاد یا اصلاح کنید., +You cannot repost item valuation before {},شما نمی توانید ارزیابی مورد را قبل از {} دوباره ارسال کنید, +You have entered a duplicate Delivery Note on Row,شما یک یادداشت تحویل تکراری در ردیف وارد کرده اید, +You haven't created a {0} yet,شما هنوز یک {0} ایجاد نکرده اید, +You need to cancel POS Closing Entry {} to be able to cancel this document.,برای اینکه بتوانید این سند را لغو کنید، باید ثبت اختتامیه POS {} را لغو کنید., +Your Name (required),نام شما (الزامی), +Your email has been verified and your appointment has been scheduled,ایمیل شما تایید شده و قرار ملاقات شما تعیین شده است, +Zero Balance,تراز صفر, +Zero Rated,دارای امتیاز صفر, +Zero quantity,مقدار صفر, +`Allow Negative rates for Items`,«نرخ های منفی برای آیتم‌ها مجاز است», +as a percentage of finished item quantity,به عنوان درصدی از مقدار کالای تمام شده, +at,در, +description,شرح, +discount applied,تخفیف اعمال شد, +doc_type,نوع_doc, +exchangerate.host,مبادله.میزبان, +is already,است در حال حاضر, +must be between 0 and 100,باید بین 0 تا 100 باشد, +or its descendants,یا فرزندان آن, +out of 5,از 5, +payments app is not installed. Please install it from {0} or {1},برنامه پرداخت نصب نشده است لطفاً آن را از {0} یا {1} نصب کنید, +payments app is not installed. Please install it from {} or {},برنامه پرداخت نصب نشده است لطفاً آن را از {} یا {} نصب کنید, +performing either one below:,انجام هر یک از موارد زیر:, +product bundle item row's name in sales order. Also indicates that picked item is to be used for a product bundle,نام ردیف آیتم‌های باندل محصول در سفارش فروش. همچنین نشان می دهد که آیتم انتخاب شده قرار است برای یک باندل محصول استفاده شود, +ratings,رتبه بندی ها, +subscription is already cancelled.,اشتراک در حال حاضر لغو شده است., +temporary name,نام موقت, +to unallocate the amount of this Return Invoice before cancelling it.,برای تخصیص مبلغ این فاکتور برگشتی قبل از لغو آن., +variance,واریانس, +via BOM Update Tool,از طریق BOM Update Tool, +will be,خواهد بود, +{0} {1} has submitted Assets. Remove Item {2} from table to continue.,{0} {1} دارایی‌ها را ارسال کرده است. برای ادامه، آیتم {2} را از جدول حذف کنید., +{0} Account not found against Customer {1}.,{0} حساب در مقابل مشتری پیدا نشد {1}., +{0} Budget for Account {1} against {2} {3} is {4}. It {5} exceed by {6},{0} بودجه برای حساب {1} در برابر {2} {3} {4} است. {5} از {6} بیشتر است, +{0} Transaction(s) Reconciled,{0} تراکنش(های) تطبیق شد, +{0} account is not of type {1},حساب {0} از نوع {1} نیست, +{0} account not found while submitting purchase receipt,هنگام ارسال رسید خرید، حساب {0} پیدا نشد, +{0} and {1},{0} و {1}, +{0} cannot be used as a Main Cost Center because it has been used as child in Cost Center Allocation {1},{0} نمی‌تواند به‌عنوان مرکز هزینه اصلی استفاده شود زیرا به‌عنوان فرزند در تخصیص مرکز هزینه {1} استفاده شده است., +{0} cannot be zero,{0} نمی تواند صفر باشد, +{0} currency must be same as company's default currency. Please select another account.,ارز {0} باید با واحد پول پیش‌فرض شرکت یکسان باشد. لطفا حساب دیگری را انتخاب کنید., +{0} entered twice {1} in Item Taxes,{0} دو بار {1} در مالیات آیتم وارد شد, +{0} has Payment Term based allocation enabled. Select a Payment Term for Row #{1} in Payment References section,{0} تخصیص مبتنی بر مدت پرداخت را فعال کرده است. در بخش مراجع پرداخت، یک شرایط پرداخت برای ردیف #{1} انتخاب کنید, +{0} is a mandatory Accounting Dimension.
Please set a value for {0} in Accounting Dimensions section.,{0} یک بعد حسابداری اجباری است.
لطفاً یک مقدار برای {0} در بخش ابعاد حسابداری تنظیم کنید., +{0} is added multiple times on rows: {1},{0} چندین بار در ردیف ها اضافه می شود: {1}, +{0} is already running for {1},{0} در حال حاضر برای {1} در حال اجرا است, +{0} is mandatory for account {1},{0} برای حساب {1} اجباری است, +{0} qty of Item {1} is being received into Warehouse {2} with capacity {3}.,{0} تعداد مورد {1} در انبار {2} با ظرفیت {3} در حال دریافت است., +"{0} units are reserved for Item {1} in Warehouse {2}, please un-reserve the same to {3} the Stock Reconciliation.",{0} واحد برای مورد {1} در انبار {2} رزرو شده است، لطفاً همان را در {3} تطبیق موجودی لغو کنید., +{0} units of Item {1} is picked in another Pick List.,{0} واحد از مورد {1} در فهرست انتخاب دیگری انتخاب شده است., +"{0} units of {1} are required in {2}{3}, on {4} {5} for {6} to complete the transaction.",{0} واحد از {1} در {2}{3}، در {4} {5} برای {6} برای تکمیل تراکنش مورد نیاز است., +{0} units of {1} needed in {2} on {3} {4} to complete this transaction.,برای تکمیل این تراکنش به {0} واحد از {1} در {2} در {3} {4} نیاز است., +{0} will be given as discount.,{0} به عنوان تخفیف داده می شود., +{0} {1} Manually,{0} {1} به صورت دستی, +{0} {1} Partially Reconciled,{0} {1} تا حدی تطبیق کرد, +"{0} {1} cannot be updated. If you need to make changes, we recommend canceling the existing entry and creating a new one.",{0} {1} نمی تواند به روز شود. اگر نیاز به ایجاد تغییرات دارید، توصیه می کنیم ورودی موجود را لغو کنید و یک ورودی جدید ایجاد کنید., +{0} {1} has already been fully paid.,{0} {1} قبلاً به طور کامل پرداخت شده است., +{0} {1} has already been partly paid. Please use the 'Get Outstanding Invoice' or the 'Get Outstanding Orders' button to get the latest outstanding amounts.,{0} {1} قبلاً تا حدی پرداخت شده است. لطفاً از دکمه «دریافت صورتحساب معوق» یا «دریافت سفارش‌های معوق» برای دریافت آخرین مبالغ معوق استفاده کنید., +{0} {1} is allocated twice in this Bank Transaction,{0} {1} دو بار در این تراکنش بانکی تخصیص داده شده است, +{0} {1} is not in any active Fiscal Year,{0} {1} در هیچ سال مالی فعالی نیست, +{0} {1} is on hold,{0} {1} در انتظار است, +{0} {1} not allowed to be reposted. Modify {2} to enable reposting.,{0} {1} مجاز به ارسال مجدد نیست. برای فعال کردن ارسال مجدد، {2} را تغییر دهید., +{0} {1} via CSV File,{0} {1} از طریق فایل CSV, +{0} {1}: Account {2} is a Group Account and group accounts cannot be used in transactions,{0} {1}: حساب {2} یک حساب گروهی است و نمی توان از حساب های گروهی در تراکنش ها استفاده کرد, +{0} {1}: Cost Center is required for 'Profit and Loss' account {2}.,"{0} {1}: مرکز هزینه برای حساب ""سود و زیان"" {2} لازم است.", +{0} {1}: Cost Center {2} is a group cost center and group cost centers cannot be used in transactions,{0} {1}: مرکز هزینه {2} یک مرکز هزینه گروهی است و مراکز هزینه گروهی را نمی توان در تراکنش ها استفاده کرد, +{0}% of total invoice value will be given as discount.,{0}% از ارزش کل فاکتور به عنوان تخفیف داده می شود., +{0}'s {1} cannot be after {2}'s Expected End Date.,{1} {0} نمی تواند بعد از تاریخ پایان مورد انتظار {2} باشد., +{item_name}'s Sample Size ({sample_size}) cannot be greater than the Accepted Quantity ({accepted_quantity}),اندازه نمونه {item_name} ({sample_size}) نمی‌تواند بیشتر از مقدار مورد قبول ({accepted_quantity}) باشد., +{} Available,{} در دسترس, +{} To Deliver,{} برای تحویل, +{} To Receive,{} برای دریافت, +{} Assigned,{} اختصاص یافته, +{} Available,{} در دسترس, +{} Open,{} باز, +{} Pending,{} انتظار, +{} To Bill,{} برای صورتحساب, +{} is a child company.,{} یک شرکت فرزند است., +{} {} is already linked with another {},{} {} قبلاً با {} دیگری پیوند شده است, +{} {} is already linked with {} {},{} {} قبلاً با {} {} پیوند داده شده است, diff --git a/erpnext/translations/sv.csv b/erpnext/translations/sv.csv index 4a53c63fafa..ca0782fb728 100644 --- a/erpnext/translations/sv.csv +++ b/erpnext/translations/sv.csv @@ -8743,3 +8743,3086 @@ WhatsApp,WhatsApp, Make a call,Ringa ett samtal, Approve,Godkänna, Reject,Avvisa, + Address, Adress, + Amount,Belopp, + Is Child Table,Är Undertabell, + Name,Namn, + Rate,Moms %, + Summary,Översikt, +"""SN-01::10"" for ""SN-01"" to ""SN-10""","""SN-01::10"" för ""SN-01"" till ""SN-10""", +# In Stock,# I Lager, +# Req'd Items,# Erfodrade Artiklar, +% Finished Item Quantity,% Färdig Artikel Kvantitet, +% Occupied,% Upptagen, +% Picked,% Plockad, +% Process Loss,% Process Förlust, +% Returned,% Retur, +'Account' in the Accounting section of Customer {0},"""Konto"" i Bokföring Sektion för Kund {0}", +'Allow Multiple Sales Orders Against a Customer's Purchase Order',"""Tillåt flera Försäljning Order mot Kund Inköp Order""", +'Default {0} Account' in Company {1},"""Standard {0} Konto"" i Bolag {1}", +'To Package No.' cannot be less than 'From Package No.',"""Till Paket Nummer."" får inte vara lägre än ""Från Paket Nummer.""", +'{0}' account is already used by {1}. Use another account.,'{0}' konto används redan av {1}. Använd ett annat konto., +'{0}' should be in company currency {1}.,"""{0}"" ska vara i bolag valuta {1}.", +(A) Qty After Transaction,(A) Kvantitet Efter Transaktion, +(B) Expected Qty After Transaction,(B) Förväntad Kvantitet Efter Transaktion, +(C) Total Qty in Queue,(C) Totalt Kvantitet i Kö, +(C) Total qty in queue,(C) Totalt Kvantitet i Kö, +(D) Balance Stock Value,(D) Saldo Lager Värde, +(E) Balance Stock Value in Queue,(E) Saldo Lager Värde i Kö, +(F) Change in Stock Value,(F) Förändring i Lager Värde, +(G) Sum of Change in Stock Value,(G) Summan av Förändring i Lager Värde, +(H) Change in Stock Value (FIFO Queue),(H) Förändring av Lager Värde (FIFO), +(H) Valuation Rate,(H) Grund Pris, +(I) Valuation Rate,(I) Grund Pris, +(J) Valuation Rate as per FIFO,(J) Grund Pris enligt FIFO, +(K) Valuation = Value (D) ÷ Qty (A),(K) Värdering = Värde (D) ÷ Kvantitet (A), +", with the inventory {0}: {1}",", med inventering {0}: {1}", +0-30 Days,0-30 Dagar, +3 Yearly,Var Tredje År, +30-60 Days,30-60 Dagar, +60-90 Days,60 - 90 Dagar, +90 Above,90+ Dagar, +"
+

Note

+
    +
  • +You can use Jinja tags in Subject and Body fields for dynamic values. +
  • + All fields in this doctype are available under the doc object and all fields for the customer to whom the mail will go to is available under the customer object. +
+

Examples

+ +
    +
  • Subject:

    Statement Of Accounts for {{ customer.customer_name }}

  • +
  • Body:

    +
    Hello {{ customer.customer_name }},
    PFA your Statement Of Accounts from {{ doc.from_date }} to {{ doc.to_date }}.
  • +
+","
+

Observera

+
    +
  • +Du kan använda Jinja Taggar i Ämne och Huvudtext-fält för dynamiska värden. +
  • + Alla fält i denna doctype är tillgängliga under doc-objekt och alla fält för kund som e-post meddelande går till är tillgängliga under customer-objekt. +
+

Exempel

+ +
    +
  • Ämne:

    Konto besked för {{ customer.customer_name }}

  • +
  • Huvudtext:

    +
    Hej {{ customer.customer_name }},
    Kontoutdrag från {{ doc.from_date }} till {{ doc.to_date }}.
    +
+", +"
Other Details
","
Övriga Detaljer
", +"
No Matching Bank Transactions Found
","
Inga avstämda Bank Transaktioner hittades
", +"
+

All dimensions in centimeter only

+
","
+

Alla mått endast i centimeter

+
", +"

About Product Bundle

+ +

Aggregate group of Items into another Item. This is useful if you are bundling a certain Items into a package and you maintain stock of the packed Items and not the aggregate Item.

+

The package Item will have Is Stock Item as No and Is Sales Item as Yes.

+

Example:

+

If you are selling Laptops and Backpacks separately and have a special price if the customer buys both, then the Laptop + Backpack will be a new Product Bundle Item.

","

Om Artikel Paket

+ +

Paketera grupp av artiklar till annan Artikel. Det är användbart om man paketerar vissa Artiklar i paket och har lager av packade Artiklar och inte paketarad Artikel.Artikel kommer att ha Artikel. Är Lagerar Artikel som Nej och Är Försäljning Artikel som Ja.

+

Exempel:

+

Om man säljer bärbara datorer och ryggsäckar separat och har specialpris om kunder köper båda, så kommer det att vara bärbar dator + ryggsäck som paket artikel.", +"

Currency Exchange Settings Help

+

There are 3 variables that could be used within the endpoint, result key and in values of the parameter.

+

Exchange rate between {from_currency} and {to_currency} on {transaction_date} is fetched by the API.

+

Example: If your endpoint is exchange.com/2021-08-01, then, you will have to input exchange.com/{transaction_date}

","

Valutaväxling Inställningar Hjälp

+

Det finns 3 variabler som kan användas av slutpunkt, resultat nyckel och i parameter värde.

+

Växelkurs mellan {from_currency} och {to_currency} {transaction_date} hämtas av API.

+

Exempel: Om slutpunkt är exchange.com/2021-08-01 måste du ange exchange.com/{transaction_date}

", +"

Body Text and Closing Text Example

+ +
We have noticed that you have not yet paid invoice {{sales_invoice}} for {{frappe.db.get_value(""Currency"", currency, ""symbol"")}} {{outstanding_amount}}. This is a friendly reminder that the invoice was due on {{due_date}}. Please pay the amount due immediately to avoid any further dunning cost.
+ +

How to get fieldnames

+ +

The fieldnames you can use in your template are the fields in the document. You can find out the fields of any documents via Setup > Customize Form View and selecting the document type (e.g. Sales Invoice)

+ +

Templating

+ +

Templates are compiled using the Jinja Templating Language. To learn more about Jinja, read this documentation.

","

Huvudtext och exempel på Avslutande Text

+ +
Vi har märkt att ni ännu inte har betalat faktura {{sales_invoice}} för {{frappe.db.get_value(""Currency"", currency, ""symbol"")}} {{outstanding_amount}}. Detta är en vänlig påminnelse om att fakturan var förfallen {{due_date}}. Vänligen betala förfallen belopp omedelbart för att undvika ytterligare kostnader.
+ +

Hur får man fältnamn

+ +

Fältnamn man kan använda i mall är fält i dokument. Du kan ta reda på fält namn för alla dokument via Inställningar > Anpassa formulärvy och välj dokument typ (t.ex. Försäljning Faktura)

+ +

Mall

+ +

Mallar kompileras med Jinja Templating Language. Om du vill veta mer om Jinja läs denna dokumentation.

", +"

Contract Template Example

+ +
Contract for Customer {{ party_name }}
+
+-Valid From : {{ start_date }} 
+-Valid To : {{ end_date }}
+
+ +

How to get fieldnames

+ +

The field names you can use in your Contract Template are the fields in the Contract for which you are creating the template. You can find out the fields of any documents via Setup > Customize Form View and selecting the document type (e.g. Contract)

+ +

Templating

+ +

Templates are compiled using the Jinja Templating Language. To learn more about Jinja, read this documentation.

","

Exempel på Avtal Mall

+ +
Avtal för Kund {{ party_name }}
+
+-Giltigt från: {{ start_date }}
+-Gäller till: {{ end_date }}
+
+ +

Hur får man fältnamn

+ +

Fältnamn du kan använda i avtal mall är fält i avtal som du skapar mallen för. Du kan ta reda på fält namn för alla dokument via Inställningar > Anpassa formulärvy och välj dokument typ (t.ex. Avtal)

+ +

Mall

+ +

Mallar kompileras med Jinja Templating Language. Om du vill veta mer om Jinja läser du den här dokumentationen.

", +"

Standard Terms and Conditions Example

+ +
Delivery Terms for Order number {{ name }}
+
+-Order Date : {{ transaction_date }} 
+-Expected Delivery Date : {{ delivery_date }}
+
+ +

How to get fieldnames

+ +

The fieldnames you can use in your email template are the fields in the document from which you are sending the email. You can find out the fields of any documents via Setup > Customize Form View and selecting the document type (e.g. Sales Invoice)

+ +

Templating

+ +

Templates are compiled using the Jinja Templating Language. To learn more about Jinja, read this documentation.

","

Exempel på Standard Villkor

+ +
Leverans Villkor för Order Nummer {{ name }}
+
+-Order Datum: {{ transaction_date }}
+-Förväntat Leverans Datum: {{ delivery_date }}
+
+ +

Hur hämtas fältnamn

+ +

Fältnamn som kan användas i E-post Mall är fält i Dokument som man skickar E-post meddelande från. Man kan ta reda på fält namn för alla dokument via Inställning > Anpassa Formulär Vy och välja Dokument Typ (t.ex. Försäljning Faktura)

+ +

Skriva Mallar

+ +

Mallar kompileras med Jinja Mall Språk. Läs mer om Jinja dokumentation:

", +"
Or
","
Eller
", +"","", +"","", +"","", +"

In your Email Template, you can use the following special variables: +

+
    +
  • + {{ update_password_link }}: A link where your supplier can set a new password to log into your portal. +
  • +
  • + {{ portal_link }}: A link to this RFQ in your supplier portal. +
  • +
  • + {{ supplier_name }}: The company name of your supplier. +
  • +
  • + {{ contact.salutation }} {{ contact.last_name }}: The contact person of your supplier. +
  • + {{ user_fullname }}: Your full name. +
  • +
+

+

Apart from these, you can access all values in this RFQ, like {{ message_for_supplier }} or {{ terms }}.

","

I E-post Mall kan följande specialvariabler användas: +

+
    +
  • + {{ update_password_link }} : Länk där leverantör kan ange nytt lösenord för att logga in på leverantör portal. +
  • +
  • + {{ portal_link }}: Länk till offert begäran på leverantör portal. +
  • +
  • + {{ supplier_name }}: Leverantör namn. +
  • +
  • + {{ contact.salutation }} {{ contact.last_name }}: Kontakt person för leverantör. +
  • +
  • + {{ user_fullname } }: Användarens fullständiga namn. +
  • +
+

+

+

Förutom dessa kan man komma åt alla värden i offert begäran, som {{ message_for_supplier }} eller {{ terms }}.

", +"
Message Example
+ +<p> Thank You for being a part of {{ doc.company }}! We hope you are enjoying the service.</p> + +<p> Please find enclosed the E Bill statement. The outstanding amount is {{ doc.grand_total }}.</p> + +<p> We don't want you to be spending time running around in order to pay for your Bill.
After all, life is beautiful and the time you have in hand should be spent to enjoy it!
So here are our little ways to help you get more time for life! </p> + +<a href=""{{ payment_url }}""> click here to pay </a> + +
+","
Meddelande Exempel
+ +<p> Tack för att ni är en del av {{ doc.company }}! Vi hoppas att ni gillar tjänst.</p> + +<p> Vänligen se bifogat E-faktura. Utestående belopp är {{ doc.grand_total }}.</p> + +<p> Vi vill inte att ni ska spendera tid med att springa runt för att betala faktura.
Livet är trots allt vackert och den tid man har bör spenderas för att njuta av livet!
Så här är våra små sätt att hjälpa er att få mer tid för livet! < /p> + +<a href=""{{ payment_url }}""> klicka här för att betala </a> + +
+", +"
Message Example
+ +<p>Dear {{ doc.contact_person }},</p> + +<p>Requesting payment for {{ doc.doctype }}, {{ doc.name }} for {{ doc.grand_total }}.</p> + +<a href=""{{ payment_url }}""> click here to pay </a> + +
+","
Meddelande Exempel
+ +<p>Hej {{ doc.contact_person }},</p> + +<p>Begär betalning för {{ doc.doctype }}, {{ doc.name }} för {{ doc.grand_total }}.</p> + +<a href=""{{ payment_url }}""> klicka här för att betala </a> + +
+", +"Masters & Reports","Inställningar & Rapporter", +"Quick Access","Genvägar", +"Reports & Masters","Rapporter & Inställningar", +"Reports & Masters","Rapporter & Inställningar", +"Settings","Inställningar", +"Shortcuts","Genvägar", +"Your Shortcuts + + + + + + ","Genvägar + + + + + + ", +"Your Shortcuts","Genvägar", +Grand Total: {0},Totalt: {0}, +Outstanding Amount: {0},Utestående belopp: {0}, +" + + + + + + + + + + + + + + + + + +
Child DocumentNon Child Document
+

To access parent document field use parent.fieldname and to access child table document field use doc.fieldname

+ +
+

To access document field use doc.fieldname

+
+

Example: parent.doctype == ""Stock Entry"" and doc.item_code == ""Test""

+ +
+

Example: doc.doctype == ""Stock Entry"" and doc.purpose == ""Manufacture""

+
+ + + + + + +"," + + Underordnad Dokument + Överordnad Dokument + + + + + +

För att komma åt överordnad dokument fält använd parent.fieldname och för att komma åt underordnad dokument fält använd doc.fieldname

+ + + +

För att komma åt dokument fält använd doc.fieldname

+ + + + +

Exampel: parent.doctype == ""Stock Entry"" and doc.item_code == ""Test""

+ + + +

Exampel: doc.doctype == ""Stock Entry"" and doc.purpose == ""Produktion""

+ + + + + + + + + + + +", +A Holiday List can be added to exclude counting these days for the Workstation.,Helg Lista kan läggas till för att utesluta dessa dagar för Arbetsstation., +A Packing Slip can only be created for Draft Delivery Note.,Packsedel kan endast skapas för utkast till Försäljning Följesedel., +"A Price List is a collection of Item Prices either Selling, Buying, or both","Prislista är samling av artikel priser som antingen säljs, köpes eller båda", +A Reconciliation Job {0} is running for the same filters. Cannot reconcile now,Avstämning jobb {0} körs för samma filter. Kan inte stämma av nu, +A Transaction Deletion Document: {0} is triggered for {0},Transaktion Borttagning jobb utlöst för {0} , +A customer must have primary contact email.,Kund måste ha primär kontakt e-post adress., +A driver must be set to submit.,Förare måste anges för att godkänna., +A template with tax category {0} already exists. Only one template is allowed with each tax category,Mall med moms kategori {0} finns redan. Endast en mall är tillåten med varje moms kategori, +API Details,API Detaljer, +AWB Number,AWB Nummer, +Abbreviation: {0} must appear only once,Förkortning: {0} får endast visas en gång, +About Us Settings,Om Oss Inställningar, +About {0} minute remaining,Cirka {0} minut kvar, +About {0} minutes remaining,Cirka {0} minuter kvar, +About {0} seconds remaining,Cirka {0} sekunder kvar, +Acceptance Criteria Formula,Acceptans Kriterier Formel , +Acceptance Criteria Value,Acceptans Kriterier Värde, +Accepted Qty in Stock UOM,Godkänd Kvantitet (per Lager Enhet), +Access Key,Åtkomst Nyckel, +Access Key is required for Service Provider: {0},Åtkomst Nyckel erfordras för Tjänsteleverantör: {0}, +Account Balance (From),Konto Saldo (Från), +Account Balance (To),Konto Saldo (Till), +Account Closing Balance,Konto Stängning Saldo, +Account Currency (From),Konto Valuta (Från), +Account Currency (To),Konto Valuta (Till), +Account Opening Balance,Öppning Saldo, +Account not Found,Konto ej funnen, +Account {0} added multiple times,Konto {0} har lagts till flera gånger, +Accounting Dimension Filter,Bokföring Dimension Filter, +Accounting Dimensions Filter,Bokföring Dimension Filter, +Accounting Entry for {0},Bokföring Post för {0}, +Accounts Closing,Bokföring Låsning, +Accounts Missing Error,Konton Saknas Fel, +Accounts Receivable/Payable,Fordringar/Skulder, +Accounts to Merge,Konton som ska Slås Samman, +Action If Quality Inspection Is Rejected,Åtgärd om Kvalitet Kontroll är Avvisad, +Action If Same Rate is Not Maintained,Åtgärd om Marginal inte Bibehålls, +Action if Same Rate is Not Maintained Throughout Sales Cycle,Åtgärd om samma Pris inte bibehålls under Försäljning, +Active Status,Aktiv Status, +Actual Balance Qty,Faktiskt Saldo Kvantitet, +Actual Expense,Faktisk Kostnad, +Actual Posting,Faktisk Postning, +Actual Qty in Warehouse,Faktisk Kvantitet på Lager, +Actual Time,Verklig Tid, +Add Columns in Transaction Currency,Lägg till kolumner i Transaktion Valuta, +Add Corrective Operation Cost in Finished Good Valuation,Lägg till Korrigerande Driftkostnad i Färdig Artikel, +Add Discount,Lägg till Rabatt, +Add Items in the Purpose Table,Lägg till Artiklar i Syfte Tabell, +Add Lead to Prospect,Lägg till Potentiell Kund till Prospekt, +Add Local Holidays,Lägg till Lokal Helgdag, +Add Manually,Lägg till Manuellt, +Add Or Deduct,Lägg till eller Dra av, +Add Serial / Batch Bundle,Lägg till Serie / Parti Paket, +Add Serial / Batch No,Lägg till Serie/Parti Nummer, +Add Serial / Batch No (Rejected Qty),Lägg till Serie/Parti Nummer (Avvisad Kvantitet), +Add Stock,Lägg till Lager, +Add Sub Assembly,Lägg till Delmontering, +Add Template,Lägg till Mall, +Add a Note,Lägg till Notering, +Add details,Lägg till Detaljer, +Add to Prospect,Lägg till Prospekt, +Added By,Lagt till Av, +Added On,Tillagd, +Added Supplier Role to User {0}.,Lade till Leverantör Roll till Användare {0}., +Added {1} Role to User {0}.,Lade till {1} roll till användare {0}., +Adding Lead to Prospect...,Lägger till Potentiell Kund..., +Additional,Extra, +Additional Asset Cost,Extra Tillgång Kostnad, +Additional Cost Per Qty,Extra Kostnad per Kvantitet, +Additional Info,Extra Information, +Address And Contacts,Adress & Kontakter, +Adjust Asset Value,Justera Tillgång Värde, +Adjustment Against,Justering Mot, +Adjustment based on Purchase Invoice rate,Justering Baserad på Inköp Faktura Pris, +Advance Account: {0} must be in either customer billing currency: {1} or Company default currency: {2},Förskott Konto: {0} måste vara antingen i kundens fakturering valuta: {1} eller bolag standard valuta: {2}, +Advance Payment,Förskott Betalning, +Advance Tax,Förskott Moms, +Advance Taxes and Charges,Förskott Moms och Avgifter, +Advance paid against {0} {1} cannot be greater than Grand Total {2},Förskott Betalning mot {0} {1} kan inte vara större än Totalt Belopp {2}, +Advance payments allocated against orders will only be fetched,Förskott betalningar allokerade mot order kommer att hämtas, +Affected Transactions,Berörda Transaktioner, +Against Customer Order {0},Mot Kund Order {0}, +Against Supplier Invoice {0},Mot Leverantör Faktura {0}, +Against Voucher No,Mot Verifikat Nummer, +Age ({0}),Ålder ({0}), +Ageing Range,Åldring Intervall, +Agent Busy Message,Agent Upptaget Meddelande, +Agent Group,Agent Grupp, +Agent Unavailable Message,Agent Otillgänglig Meddelande, +Aggregate a group of Items into another Item. This is useful if you are maintaining the stock of the packed items and not the bundled item,Paketera flera Artiklar till ett annat Artikel. Användbart om lager baseras på packade artiklar och inte ingående artiklar, +Algorithm,Algoritm, +All Activities,Alla Aktivitet, +All Activities HTML,Alla Aktivitet HTML, +All Items,Alla Artiklar, +All Sales Transactions can be tagged against multiple Sales Persons so that you can set and monitor targets.,Alla försäljning transaktioner kan taggas mot flera säljare för att ange och övervaka mål., +All allocations have been successfully reconciled,Alla tilldelningar är avstämda, +All items have already been received,Alla Artiklar är redan mottagna, +All items in this document already have a linked Quality Inspection.,Alla Artiklar i detta dokument har redan länkad Kvalitet Kontroll., +All the Comments and Emails will be copied from one document to another newly created document(Lead -> Opportunity -> Quotation) throughout the CRM documents.,Alla kommentarer och E-post meddelande kommer att kopieras från ett dokument till ett annat nyskapad dokument (Potentiell Kund -> Möjlighet -> Försäljning Offert) genom hela Säljstöd process., +"All the required items (raw materials) will be fetched from BOM and populated in this table. Here you can also change the Source Warehouse for any item. And during the production, you can track transferred raw materials from this table.",Alla nödvändiga artiklar (råmaterial) kommer att hämtas från stycklista och läggs till denna tabell. Här kan du också ändra hämtlager för valfri artikel. Och under produktion kan du spåra överförd råmaterial från denna tabell., +Allocate Payment Request,Tilldela Betalning Begäran, +Allocated Entries,Tilldelade Poster, +Allocated To:,Tilldelad Till:, +Allocations,Tilldelningar, +Allow,Tillåt, +Allow Alternative Item must be checked on Item {},Tillåt Alternativ Artikel måste vara vald för Artikel {}, +Allow Continuous Material Consumption,Tillåt Kontinuerlig Material Förbrukning, +Allow Excess Material Transfer,Tillåt Överflödig Material Överföring, +Allow Internal Transfers at Arm's Length Price,Tillåt Interna Överföringar till Marknad Pris, +Allow Item to be Added Multiple Times in a Transaction,Tillåt att Artikel läggs till flera gånger i Transaktion, +Allow Lead Duplication based on Emails,Tillåt Potentiella Kunder Duplicering baserat på E-post Meddelande, +Allow Negative rates for Items,Tillåt Negativa Priser för Artiklar, +Allow Or Restrict Dimension,Tillåt eller Begränsa Dimension, +Allow Partial Reservation,Tillåt Partiell Reservation, +Allow Purchase,Tillåt Inköp, +Allow Sales,Tillåt Försäljning, +Allow Sales Order Creation For Expired Quotation,Tillåt att Försäljning Order skapas för Förfallen Försäljning Offert, +Allow User to Edit Discount,Tillåt Användare att Redigera Rabatt, +Allow User to Edit Rate,Tillåt Användare att Redigera Pris, +Allow Zero Rate,Tillåt Noll Pris, +Allow material consumptions without immediately manufacturing finished goods against a Work Order,Tillåt Material Förbrukning utan att omedelbart producera färdiga artiklar mot Arbetsorder, +Allow multi-currency invoices against single party account ,Tillåt Fler Valuta Fakturor mot Parti Konto, +Allow to Edit Stock UOM Qty for Purchase Documents,Tillåt att redigera Lager Enhet Kvantitet för Inköp Dokument, +Allow to Edit Stock UOM Qty for Sales Documents,Tillåt att redigera Lager Enhet Kvantitet för Försäljning Dokument, +Allow transferring raw materials even after the Required Quantity is fulfilled,Tillåt överföring av råmaterial även efter att Erfordrad Kvantitet är uppfylld, +Allowed,Tillåten, +Allowed Dimension,Tillåten Dimension, +Allowed Doctypes,Tillåtna Dokument, +Allowed Items,Tillåtna Artiklar, +Allowed primary roles are 'Customer' and 'Supplier'. Please select one of these roles only.,Tillåtna primära roller är 'Kund' och 'Leverantör'. Välj endast en av dessa roller., +Allows to keep aside a specific quantity of inventory for a particular order.,Tillåter reservation av specifierad artikel kvantitet för angiven order., +Already Picked,Redan Plockad, +Alternative Items,Alternativa Artiklar, +"Alternatively, you can download the template and fill your data in.",Alternativt kan du ladda ner mall och fylla i dina uppgifter., +Amount (AED),Belopp (AED), +Amount Eligible for Commission,Provision Belopp, +Amount in Account Currency,Belopp i Konto Valuta, +Amount in party's bank account currency,Belopp i partens Bank Konto Valuta, +Amount in transaction currency,Belopp i transaktion valuta, +An Item Group is a way to classify items based on types.,Artikel grupp är ett sätt att klassificera artiklar baserat på typer., +An error has been appeared while reposting item valuation via {0},Fel har uppstått vid ompostering av artikel värdering via {0}, +An error has occurred during {0}. Check {1} for more details,Fel har uppstått under {0}. Kontrollera {1} för mer information,Error Log +Annual Revenue,Årlig Omsätning, +"Another Cost Center Allocation record {0} applicable from {1}, hence this allocation will be applicable upto {2}","Annan Resultat Enhet Tilldelning Post {0} är tillämplig från {1}, därför kommer denna tilldelning att gälla upp till {2}", +"Any one of following filters required: warehouse, Item Code, Item Group","Något av följande filter erfordras: Lager, Artikelkod, Artikelgrupp", +Applicable Dimension,Tillämpad Dimension, +Applicable On Account,Tillämplig På Konto, +Applied on each reading.,Tillämpas vid varje läsning., +Applied putaway rules.,Tillämpad Läggundan Regler, +Apply Putaway Rule,Tillämpa Lägg Undan Regel, +Apply Recursion Over (As Per Transaction UOM),Tillämpa Rekursion Över (per Transaktion Enhet), +Apply SLA for Resolution Time,Tillämpa Service Nivå Avtal för Resolution Tid, +Apply TDS,Tillämpa TDS, +Apply Tax Withholding Amount ,Tillämpa Moms Avdrag Belopp, +Apply restriction on dimension values,Tillämpa begränsning på dimension värde, +Apply to All Inventory Documents,Tillämpa på Alla Lager Dokument, +Apply to Document,Tillämpa på Dokument, +Appointment Created Successfully,Möte Bokad!, +Appointment Scheduling Disabled,Bokning av Möten Inaktiverad, +Appointment Scheduling has been disabled for this site,Bokning av Möten är Inaktiverad för denna Webbplats, +Appointment was created. But no lead was found. Please check the email to confirm,Möte Skapad. Men inget Poteentiel Kund hittades. Kontrollera e-post meddelande för att bekräfta, +Approximately match the description/party name against parties,Ungefärlig avstämning av beskrivning/partinamn mot parti, +Are you sure you want to clear all demo data?,Är du säker på att du vill ta bort alla demodata?, +Are you sure you want to delete this Item?,Är du säker på att du vill ta bort detta Artikel?, +Are you sure you want to restart this subscription?,Är du säker på att du vill starta om denna prenumeration?, +As on Date,Som den, +"As there are existing submitted transactions against item {0}, you can not change the value of {1}.",Eftersom det finns befintliga godkäAda transaktioner mot artikel {0} kan man inte ändra värdet på {1}., +"As there are negative stock, you can not enable {0}.",Eftersom det finns negativ lager kan du inte aktivera {0}., +"As there are reserved stock, you cannot disable {0}.",Eftersom det finns reserverat lager kan du inte inaktivera {0}., +"As there are sufficient Sub Assembly Items, Work Order is not required for Warehouse {0}.",Eftersom det finns tillräckligt med Undermontering Artiklar erfordras inte Arbetsorder för Lager {0}., +"As {0} is enabled, you can not enable {1}.",Eftersom {0} är aktiverad kan du inte aktivera {1}., +Assembly Items,Montering Artiklar, +Asset Activity,Tillgång Aktivitet, +Asset Capitalization,Tillgång Bokning, +Asset Capitalization Asset Item,Tillgång Bokning Tillgång Post, +Asset Capitalization Service Item,Tillgång Bokning Service Post, +Asset Capitalization Stock Item,Tillgång Bokning Lager Post, +Asset Depreciation Details,Tillgång Avskrivning Detaljer, +Asset Depreciation Schedule,Tillgång Avskrivning Schema, +Asset Depreciation Schedule for Asset {0} and Finance Book {1} is not using shift based depreciation,Tillgång Avskrivning Schema för Tillgång {0} och Finans Register {1} använder inte skift baserad avskrivning, +Asset Depreciation Schedule not found for Asset {0} and Finance Book {1},Tillgång Avskrivning Schema finns inte för Tillgång {0} och Finans Register {1}, +Asset Depreciation Schedule {0} for Asset {1} already exists.,Tillgång Avskrivning Schema {0} för Tillgång {1} finns redan., +Asset Depreciation Schedule {0} for Asset {1} and Finance Book {2} already exists.,Tillgång Avskrivning Schema {0} för Tillgång {1} och Finans Register {2} finns redan., +"Asset Depreciation Schedules created:
{0}

Please check, edit if needed, and submit the Asset.",Tillgång Avskrivning Schema skapades:
{0}

Kontrollera och Godkänn Tillgång., +Asset ID,Tillgång ID, +Asset Quantity,Tillgång Antal, +Asset Repair Consumed Item,Tillgång Bokning Förbrukad Post, +Asset Settings,Tillgång Inställningar, +Asset Shift Allocation,Tillgång Skift Tilldelning, +Asset Shift Factor,Tillgång Förskjutning Faktor, +Asset Shift Factor {0} is set as default currently. Please change it first.,Tillgång Förskjutning Faktor {0} är för närvarande angiven som standard. Vänligen ändra det först., +Asset cancelled,Tillgång Annullerad, +Asset capitalized after Asset Capitalization {0} was submitted,Tillgång kapitaliserad efter att Tillgång Kapitalisering {0} godkändes , +Asset created,Tillgång Skapad, +Asset created after Asset Capitalization {0} was submitted,Tillgång skapad efter att Tillgång Kapitalisering {0} godkändes, +Asset created after being split from Asset {0},Tillgång skapad efter att ha delats från Tillgång {0}, +Asset decapitalized after Asset Capitalization {0} was submitted,Tillgång avkapitaliserad efter att Tillgång Kapitalisering {0} godkändes, +Asset deleted,Tillgång Borttagen, +Asset issued to Employee {0},Tillgång utfärdad till Personal {0}, +Asset out of order due to Asset Repair {0},Tillgång ur funktion på grund av reparation av Tillgång {0}, +Asset received at Location {0} and issued to Employee {1},Tillgång mottagen på plats {0} och utfärdad till Personal {1}, +Asset restored,Tillgång återställd, +Asset restored after Asset Capitalization {0} was cancelled,Tillgång återställd efter att Tillgång Kapitalisering {0} annullerats, +Asset returned,Tillgång återlämnad, +Asset scrapped,Tillgång skrotad, +Asset sold,Tillgång Såld, +Asset submitted,Tillgång Godkänd, +Asset transferred to Location {0},Tillgång överförd till Plats {0}, +Asset updated after being split into Asset {0},Tillgång uppdaterad efter att ha delats upp i Tillgång {0}, +Asset updated after cancellation of Asset Repair {0},Tillgång uppdaterad efter annullering av Tillgång Reparation {0}, +Asset updated after completion of Asset Repair {0},Tillgång uppdaterad efter slutförande av Tillgång Reparation {0}, +Asset {0} cannot be received at a location and given to an employee in a single movement,Tillgång {0} kan inte tas emot på plats och ges till Personal i en enda rörelse, +Asset {0} does not belong to Item {1},Tillgång {0} tillhör inte Post {1}, +Asset {0} does not exist,Tillgång {0} finns inte, +Asset {0} has been created. Please set the depreciation details if any and submit it.,Tillgång {0} skapad. Ange avskrivning detaljer och godkänn den., +Asset {0} has been updated. Please set the depreciation details if any and submit it.,Tillgång {0} uppdaterad. Ange avskrivning detaljer och godkänn den., +Asset's depreciation schedule updated after Asset Shift Allocation {0},Tillgång Avskrivning Schema uppdaterad efter Tillgång Förskjutning Tilldelning {0}, +Asset's value adjusted after cancellation of Asset Value Adjustment {0},Tillgång Värde Justerat efter annullering av Tillgång Värde Justering {0}, +Asset's value adjusted after submission of Asset Value Adjustment {0},Tillgångens Värde Justerat efter godkänade av Tillgång Värde Justering {0}, +Assign Job to Employee,Tilldela jobb till Personal, +Assignment,Tilldelning, +Assignment Conditions,Tilldelning Villkor, +At Row #{0}: The picked quantity {1} for the item {2} is greater than available stock {3} for the batch {4} in the warehouse {5}.,På rad #{0}: Plockad kvantitet {1} för artikel {2} är större än tillgänglig kvantitet {3} för parti {4} i lager {5}., +At Row #{0}: The picked quantity {1} for the item {2} is greater than available stock {3} in the warehouse {4}.,På rad #{0}: Plockad kvantitet {1} för artikel {2} är större än tillgänglig kvantitet {3} i lager {4}., +At row {0}: Batch No is mandatory for Item {1},Rad {0}: Parti Nummer erfordras för Artikel {1}, +At row {0}: Parent Row No cannot be set for item {1},Rad {0}: Överordnad rad nummer kan inte anges för artikel {1}, +At row {0}: Qty is mandatory for the batch {1},Rad {0}: Kvantitet erfordras för Artikel {1}, +At row {0}: Serial No is mandatory for Item {1},Rad {0}: Serie Nummer erfordras för Artikel {1}, +At row {0}: Serial and Batch Bundle {1} has already created. Please remove the values from the serial no or batch no fields.,Rad {0}: Serie och Parti Paket {1} år redan skapad. Ta bort värde från serienummer eller parti nummer fält., +At row {0}: set Parent Row No for item {1},Rad {0}: ange överordnad rad nummer för artikel {1}, +Attach CSV File,Bifoga CSV Fil, +Attendance & Leaves,Närvaro & Ledighet, +Attribute value: {0} must appear only once,Egenskap Värde: {0} får endast visas en gång, +Auto Create Exchange Rate Revaluation,Automatiskt Skapa Valuta Växling Kurs Omvärdering, +Auto Create Purchase Receipt,Automatiskt Skapa Inköp Följesedel, +Auto Create Serial and Batch Bundle For Outward,Automatiskt Skapa Serie Nummer och Parti Paket för Försäljning, +Auto Create Subcontracting Order, Automatiskt Skapa Underleverantör Order, +Auto Created Serial and Batch Bundle,Automatiskt Skapad Serie och Parti Paket, +Auto Creation of Contact,Automatiskt Skapa Kontakt, +Auto Email Report,Automatiskt E-post Rapport, +Auto Insert Item Price If Missing,Automatiskt Infoga Artikel Pris om det saknas, +Auto Name,Automatiskt, +Auto Reconcile,Automatiskt Avstämning, +Auto Reconcile Payments,Automatisk Betalning Avstämning, +Auto Reconciliation,Automatisk Avstämning, +Auto Reconciliation of Payments has been disabled. Enable it through {0},Automatisk Avstämning av Betalningar har inaktiverats. Aktivera genom {0}, +Auto Reserve Serial and Batch Nos,Automatisk Reservera Serie och Parti Nummer, +Auto Reserve Stock for Sales Order on Purchase,Automatisk Reservera Lager för Försäljning Order vid Inköp, +Auto close Opportunity Replied after the no. of days mentioned above,Automatiskt Stäng Besvarad Möjlighet efter ovan angivet antal dagar, +Auto match and set the Party in Bank Transactions,Automatiskt avstäm och ange Parti i Bank Transaktioner, +Auto write off precision loss while consolidation,Automatisk Avskrivning Precision av Förlust under Konsolidering, +Automatically Add Filtered Item To Cart,Automatiskt Lägg till Filtrerad Artikel till Kundkorg, +Automatically Fetch Payment Terms from Order,Automatikt Hämta Betalning Villkor från Order, +Automatically post balancing accounting entry,Automatiskt skapa balans bokföring post, +Available Batch Report,Tillgänglig Parti Rapport, +Available Qty For Consumption,Tillgänglig Kvantitet för Förbrukning, +Available Qty at Company,Tillgänglig Kvantitet, +Available Qty at Target Warehouse,Tillgänglig Kvantitet på Till Lager, +Available Qty to Reserve,Tillgängligt Kvantitet att Reservera, +Average Completion,Genomsnittlig Slutförande, +Avg Rate,Genomsnittlig Pris, +Avg Rate (Balance Stock),Genomsnittlig Pris (Lager Saldo), +BIN Qty,Lager Kvantitet, +BOM Created,Stycklista Skapad, +BOM Creator,Stycklista Generator, +BOM Creator Item,Stycklista Generator Post, +BOM Info,Stycklista Information, +BOM Level,Stycklista Nivå, +BOM Tree,Stycklista Träd, +BOM UoM,Stycklista Enhet, +BOM Update Batch,Stycklista Uppdatera Parti , +BOM Update Initiated,Stycklista Uppdatering Initierad, +BOM Update Log,Stycklista Uppdatering Logg, +BOM Update Tool Log with job status maintained,Stycklista Uppdatering Verktyg Logg med jobb status upprätthållen, +BOM Updation already in progress. Please wait until {0} is complete.,Stycklista Uppdatering pågår. Vänta tills {0} är klar., +BOM Updation is queued and may take a few minutes. Check {0} for progress.,Stycklista Uppdatering i kö och kan ta några minuter. Kontrollera {0} för framsteg., +BOM and Production,Stycklista & Produktion, +BOM recursion: {1} cannot be parent or child of {0},Stycklista Rekursion: {1} kan inte vara överordnad eller underordnad till {0}, +BOMs Updated,Stycklista Uppdaterad, +BOMs created successfully,Stycklista Skapad, +BOMs creation failed,Stycklista Skapande Misslyckades, +"BOMs creation has been enqueued, kindly check the status after some time",Skapandet av Stycklistor i Kö. Vänligen kontrollera status efter en tid, +Balance Qty (Stock),Saldo Kvantitet (Lager), +Balance Sheet Summary,Balans Rapport Översikt, +Balance Stock Value,Saldo Lager Värde, +Bank Reconciliation Tool,Bank Avstämning Verktyg, +Bank Statement Import,Bank Avstämning Import, +Bank Transaction {0} Matched,Bank Transaktion {0} avstämd, +Bank Transaction {0} added as Journal Entry,Bank Transaktion {0} har lagts till som Journal Post, +Bank Transaction {0} added as Payment Entry,Bank Transaktion {0} har lagts till som Betalning Post, +Bank Transaction {0} is already fully reconciled,Bank Transaktion {0} är redan helt avstämd, +Bank Transaction {0} updated,Bank Transaktion {0} uppdaterad, +Bank/Cash Account,Bank / Kassa Konto, +Bank/Cash Account {0} doesn't belong to company {1},Bank / Kassa Konto {0} tillhör inte bolag {1}, +Base Amount,Bas Belopp, +Base Cost Per Unit,Bas Kostnad per Enhet, +Base Rate,Bas Pris, +Base Tax Withholding Net Total,Bas Netto Totalt Ex Moms , +Base Total,Bas Totalt, +Base Total Billable Amount,Bas Totalt Fakturerbar Belopp, +Base Total Billed Amount,Bas Totalt Fakturerad Belopp, +Base Total Costing Amount,Bas Totalt Kostnad Belopp, +Based On Value,Baserad på Värde, +"Based on your HR Policy, select your leave allocation period's end date",Baserat på din Personal Princip välj slutdatum för din ledighet tilldelning, +"Based on your HR Policy, select your leave allocation period's start date",Baserat på din Personal Princip väljstart datum för ledighet period, +Batch Expiry Date,Parti Förfallodatum, +Batch No is mandatory,Parti Nummer erfordras, +Batch No {0} does not exists,Parti Nummer {0} finns inte, +Batch No {0} is linked with Item {1} which has serial no. Please scan serial no instead.,Parti Nummer {0} är länkat till Artikel {1} som har serie nummer. Skanna serie nummer istället., +Batch No.,Parti Nummer, +Batch Nos,Parti Nummer, +Batch Nos are created successfully,Parti Nummer Skapade, +Batch Not Available for Return,Parti Ej Tillgänglig för Retur, +Batch Qty,Parti Kvantitet, +Batch and Serial No,Parti och Serie Nummer, +Batch not created for item {} since it does not have a batch series.,Parti är inte skapad för Artikel {} eftersom den inte har Parti Nummer., +Batch {0} and Warehouse,Parti {0} och Lager, +Batch {0} is not available in warehouse {1},Parti {0} är inte tillgängligt i lager {1}, +Batchwise Valuation,Värdering per Parti, +Beginning of the current subscription period,Början av aktuell prenumeration period, +Below Subscription Plans are of different currency to the party default billing currency/Company currency: {0},Nedan Prenumeration Planer är i annan valuta än Parti standard valuta/bolag valuta: {0}, +Bill for Rejected Quantity in Purchase Invoice,Faktura för Avvisad Kvantitet i Inköp Faktura, +Billed Items To Be Received,Fakturerade Artiklar att Ta Emot, +"Billed, Received & Returned","Fakturerad,Mottagen & Returnerad", +Billing Address Details,Faktura Adress Detaljer, +Billing Interval in Subscription Plan must be Month to follow calendar months,Fakturering Intervall i Prenumeration Plan måste vara Månad för att följa kalender månader, +Bisect Accounting Statements,Halvera Bokföring Rapporter, +Bisect Left,Bisekt Vänster, +Bisect Nodes,Halvera Noder, +Bisect Right,Halvera Höger, +Bisecting From,Halvera Från, +Bisecting Left ...,Halverar Vänster..., +Bisecting Right ...,Halverar Höger..., +Bisecting To,Halverar Till, +Blanket Order Allowance (%),Blankoavtal Order Tillåtelse (%), +Bom No,Stycklista Nummer, +Book Advance Payments as Liability option is chosen. Paid From account changed from {0} to {1}.,Bokför Förskott Betalningar eftersom Skuld alternativ är vald. Betald från konto har ändrats från {0} till {1}., +Book Advance Payments in Separate Party Account,Bokför Förskott Betalningar på Separat Konto, +Book Tax Loss on Early Payment Discount,Bokför Moms Bortfall vid Tidig Betalning Rabatt, +Book an appointment,Boka Möte, +Booking stock value across multiple accounts will make it harder to track stock and account value.,Bokföring av Lager Värde på flera Konto gör det svårare att spåra lager och konto värde., +Books have been closed till the period ending on {0},Bokföring är låst till {0}, +Both Payable Account: {0} and Advance Account: {1} must be of same currency for company: {2},Både Skuld Konto: {0} och Förskott Konto: {1} måste vara i samma valuta för bolag: {2}, +Both Receivable Account: {0} and Advance Account: {1} must be of same currency for company: {2},Både Fordring Konto: {0} och Förskott Konto: {1} måste vara i samma valuta för bolag: {2}, +Both {0} Account: {1} and Advance Account: {2} must be of same currency for company: {3},Både {0} Konto: {1} och Förskott Konto: {2} måste vara i samma valuta för bolag: {3}, +Budget Exceeded,Budget Överskriden, +Buildable Qty,Producerbart Kvantitet, +Bulk Transaction Log,Mass Transaktion Logg, +Bulk Transaction Log Detail,Mass Transaktion Logg Detaljer, +Bulk Update,Mass Uppdatera, +Bundle Items,Paketera Artiklar, +Buying & Selling Settings,Inköp & Försäljning Inställningar, +Buying and Selling,Inköp & Försäljning, +"By default, the Supplier Name is set as per the Supplier Name entered. If you want Suppliers to be named by a Naming Series choose the 'Naming Series' option.","Som standard är leverantör namn satt enligt angiven Leverantörs Namn. Om man vill att leverantörer ska namnges av Nummer Serie Välj 'Nummer Serie'", +Bypass credit check at Sales Order,Ignorera Kredit Kontroll vid Försäljning Order, +COGS By Item Group,Kostnad för Sålda Artiklar Efter Artikel Grupp, +COGS Debit,Kostnad för Sålda Artiklar Debet, +CRM Note,Säljstöd Anteckning, +CRM Settings,Säljstöd Inställningar, +Calculate Product Bundle Price based on Child Items' Rates,Beräkna Artikel Paket Pris baserat på Underordnade Artiklar priser, +Calculate daily depreciation using total days in depreciation period,Beräkna daglig avskrivning med hjälp av totalt antal dagar i avskrivningsperiod, +Call Again,Ring Igen, +Call Ended,Samtal Avslutad, +Call Handling Schedule,Samtal Hantering Schema, +Call Received By,Samtal Mottagen Av, +Call Receiving Device,Samtal Mottagning Enhet, +Call Routing,Samtal Dirigering, +Call Schedule Row {0}: To time slot should always be ahead of From time slot.,Samtal Schema Rad {0}: Till tid bör alltid ligga före Från tid., +Call Type,Samtal Typ, +Callback,Återuppringning, +Campaign Item,Kampanj Artikel, +Can not close Work Order. Since {0} Job Cards are in Work In Progress state.,"Kan inte stänga Arbetsorder, eftersom {0} Jobbkort har Arbete pågår status.", +"Can not filter based on Child Account, if grouped by Account","Kan inte filtrera baserat på Underordnad Konto, om grupperat efter konto", +"Can't change the valuation method, as there are transactions against some items which do not have its own valuation method","Kan inte ändra värdering sätt, eftersom det finns transaktioner mot vissa artiklar som inte har egen värdering sätt", +Can't disable batch wise valuation for active batches.,Kan inte inaktivera partivis värdering för aktiva partier., +Can't disable batch wise valuation for items with FIFO valuation method.,Kan inte inaktivera partivis värdering för artiklar med FIFO värdering metod., +Cannot Merge,Kan inte Slå Samman, +Cannot Resubmit Ledger entries for vouchers in Closed fiscal year.,Kan inte godkänna om Register Poster för verifikationer under stängt Bokföringsår., +"Cannot amend {0} {1}, please create a new one instead.","Kan inte ändra {0} {1}, skapa ny istället.", +Cannot apply TDS against multiple parties in one entry,Kan inte tillämpa TDS mot flera parter i en post, +Cannot cancel as processing of cancelled documents is pending.,Kan inte avbryta eftersom behandling av annullerade dokument väntar., +Cannot cancel the transaction. Reposting of item valuation on submission is not completed yet.,Kan inte annullera transaktion. Ompostering av artikel värdering vid godkännande är inte klar ännu., +Cannot change Reference Document Type.,Kan inte ändra Referens Dokument Typ, +Cannot complete task {0} as its dependant task {1} are not completed / cancelled.,Kan inte slutföra uppgift {0} eftersom dess beroende uppgift {1} inte har slutförts/avbrutits., +Cannot convert Task to non-group because the following child Tasks exist: {0}.,Kan inte konvertera uppgift till ej grupp eftersom följande underordnade uppgifter finns: {0}., +Cannot convert to Group because Account Type is selected.,Kan inte konvertera till Grupp eftersom Konto Typ är vald., +Cannot create Stock Reservation Entries for future dated Purchase Receipts.,Kan inte skapa Lager Reservation Poster för framtid daterade Inköp Följesedlar., +Cannot create a pick list for Sales Order {0} because it has reserved stock. Please unreserve the stock in order to create a pick list.,Kan inte skapa plocklista för Försäljning Order {0} eftersom den har reserverad lager. Vänligen avboka lager för att skapa plocklista., +Cannot create accounting entries against disabled accounts: {0},Kan inte skapa bokföring poster mot inaktiverade konto: {0}, +Cannot disable batch wise valuation for FIFO valuation method.,Kan inte inaktivera partivis värdering för FIFO värdering metod., +Cannot enqueue multi docs for one company. {0} is already queued/running for company: {1},Kan inte ställa flera dokument i kö för ett bolag. {0} är redan i kö/körs för bolag: {1}, +Cannot find a default warehouse for item {0}. Please set one in the Item Master or in Stock Settings.,Kan inte hitta standardlager för artikel {0}. Ange det i Artikelinställningar eller i Lagerinställningar., +Cannot make any transactions until the deletion job is completed,Kan inte skapa transaktioner förrän borttagning jobb är slutfört, +Cannot produce more item for {0},Kan inte producera fler artiklar för {0}, +Cannot produce more than {0} items for {1},Kan inte producera mer än {0} artiklar för {1}, +Cannot receive from customer against negative outstanding,Kan inte ta emot från kund mot negativt utestående, +Cannot retrieve link token for update. Check Error Log for more information,Kan inte hämta länk token för uppdatering Kontrollera Fellogg för mer information, +Cannot retrieve link token. Check Error Log for more information,Kan inte hämta länk token. Se fellogg för mer information, +Cannot {0} from {2} without any negative outstanding invoice,Kan inte {0} från {2} utan någon negativ utestående faktura, +Capacity (Stock UOM),Kapacitet (Lager Enhet), +Capacity in Stock UOM,Kapacitet i Lager Enhet, +Capacity must be greater than 0,Kapacitet måste vara högre än 0, +Capitalization,Kapitalisering, +Capitalization Method,Kaptitalisering Sätt, +Capitalize Asset,Kapitalisera Tillgång, +Capitalize Repair Cost,Kapitalisera Reparation Kostnad, +Capitalized,Kapitaliserad, +Carrier,Transportör, +Carrier Service,Transportör Service, +Carry Forward Communication and Comments,Vidarebefordra E-post och Kommentarer, +Category Details,Kategori Detaljer, +Caution: This might alter frozen accounts.,Varning: Detta kan ändra låsta konto., +Change in Stock Value,Förändring i Lager Värde, +Changed customer name to '{}' as '{}' already exists.,Ändrade kund namn till '{}' eftersom '{}' redan finns., +Changes,Ändringar, +Charge of type 'Actual' in row {0} cannot be included in Item Rate or Paid Amount,"Debitering av typ ""Verklig"" i rad {0} kan inte inkluderas i Artikel Pris eller Betald Belopp", +Chart Of Accounts,Kontoplan, +Checked On,Kontrollerad, +Checking this will round off the tax amount to the nearest integer,Om vald avrundas moms belopp till närmaste heltal, +Cheques and Deposits Incorrectly cleared,Checkar och Depositioner felaktigt avstämda, +Choose a WIP composite asset,Välj pågående arbete Sammansatt Tillgång, +Clear Demo Data,Tar Bort Demo Data... , +Clear Notifications,Rensa Noteringar, +Clearing Demo Data...,Tar Bort Demo Data..., +Click on 'Get Finished Goods for Manufacture' to fetch the items from the above Sales Orders. Items only for which a BOM is present will be fetched.,"Klicka på ""Hämta Färdiga Artiklar för Produktion"" för att hämta artiklar från ovanstående Försäljning Ordrar. Endast artiklar för vilka det finns stycklista kommer att hämtas.", +Click on Add to Holidays. This will populate the holidays table with all the dates that fall on the selected weekly off. Repeat the process for populating the dates for all your weekly holidays,Klicka på 'Lägg till Helgdagar'. Detta kommer att fylla helg tabell med alla datum som infaller på valda veckovis ledighet. Upprepa processen för att fylla i datum för alla helgdagar, +Click on Get Sales Orders to fetch sales orders based on the above filters.,Klicka på 'Hämta Försäljning Order' för att hämta Försäljning Ordrar baserade på ovanstående filter., +Click to add email / phone,Klicka på att lägga till e-post / telefon, +Close Replied Opportunity After Days,Stäng Besvarad Möjlighet Efter Dagar, +Closed Work Order can not be stopped or Re-opened,Stängd Arbetsorder kan inte stoppas eller öppnas igen, +Closing,Stänger, +Closing Balance as per Bank Statement,Stängning Saldo enligt Bank, +Closing Balance as per ERP, Stängning Saldo enligt System, +Closing Stock Balance,Stängning Lager Saldo, +Columns are not according to template. Please compare the uploaded file with standard template,Kolumner är inte enligt mall. Jämför uppladdad fil med standardmall, +Communication Channel,Kommunikation Kanal, +Company Address Display,Bolag Adress Visning, +Company Billing Address,Bolag Faktura Adress, +Company Details,Bolag Detaljer, +Company Shipping Address,Bolag Leverans Adress, +Company Tax ID,Org.Nr., +Company and Posting Date is mandatory,Bolag och Bokföring Datum erfordras, +Company is mandatory,Bolag Erfordras, +Company is mandatory for generating an invoice. Please set a default company in Global Defaults.,Bolag erfordras för att skapa faktura. Ange standard bolag i Standard Inställningar., +Company which internal customer represents,Bolag som intern kund representerar, +Company which internal customer represents.,Bolag som intern kund representerar., +Company which internal supplier represents,Bolag som intern leverantör representerar, +Company {0} is added more than once,Bolag{0} har lagts till mer än en gång, +Company {} does not exist yet. Taxes setup aborted.,Bolag {} finns inte ännu. Moms inställning avbröts., +Company {} does not match with POS Profile Company {},Bolag {} stämmer inte med Kassa Profil Bolag {}, +Competitor,Konkurrent, +Competitor Detail,Konkurrent Detaljer, +Competitor Name,Konkurrent Namn, +Competitors,Konkurrenter, +Complete Job,Slutför Jobb, +Complete Order,Slutför Order, +Completed On,Slutförd, +Completed On cannot be greater than Today,Klar datum kan inte vara senare än idag, +Completed Tasks,Antal Klara Uppgifter, +Completed Time,Klar Tid, +Completion Date can not be before Failure Date. Please adjust the dates accordingly.,Slutförande datum kan inte vara före fel datum. Justera datum därefter., +Conditional Rule,Villkor Regel, +Conditional Rule Examples,Villkor Regel Exempel, +Configure Product Assembly,Konfigurera Artikel Produktion, +Configure the action to stop the transaction or just warn if the same rate is not maintained.,Konfigurera åtgärd att stoppa transaktion eller varna om Marginal inte bibehålls., +Connections,Anslutningar, +Consider Entire Party Ledger Amount,Inkludera Hela Partibok Belopp, +Consider Minimum Order Qty,Inkludera Minimum Order Kvantitet, +Consider Rejected Warehouses,Inkludera Avvisad Lager , +Considered In Paid Amount,Moms Inkluderad i Betald Belopp, +Consolidate Sales Order Items,Konsolidera Försäljning Order Artiklar, +Consolidate Sub Assembly Items,Konsolidera Delmontering Artiklar, +Consumed Asset Items is mandatory for Decapitalization,Förbrukade Tillgång Artiklar erfordras för Dekapitalisering, +Consumed Asset Total Value,Förbrukad Tillgång Totalt Värde, +Consumed Assets,Förbrukade Tillgångar, +Consumed Quantity,Förbrukad Kvantitet, +Consumed Stock Items,Förbrukade Lager Artiklar, +Consumed Stock Items or Consumed Asset Items are mandatory for creating new composite asset,Förbrukade Lager Artiklar eller Förbrukade Tillgång Artiklar erfordras för att skapa ny sammansatt tillgång, +"Consumed Stock Items, Consumed Asset Items or Consumed Service Items is mandatory for Capitalization","Förbrukade Lager Artiklar, Förbrukade Tillgång Artiklar eller Förbrukade Service Artiklar erfordras för Kapitalisering", +Consumed Stock Total Value,Förbrukad Lager Totalt Värde, +Consumption Rate,Förbrukning Värde, +Contact Details,Kontakt Uppgifter, +Contact Mobile,Kontakt Mobil, +Contact Us Settings,Kontakta Oss Inställningar, +Contacts,Kontakter, +Contract Template Help,Avtal Mall Hjälp, +Contribution Qty,Bidrag Kvantitet, +Control Historical Stock Transactions,Kontroll Tidigare Lager Transaktioner, +Conversion factor for item {0} has been reset to 1.0 as the uom {1} is same as stock uom {2}.,"Konvertering faktor för artikel {0} är återställd till 1,0 eftersom enhet {1} är samma som lager enhet {2}.", +Convert Item Description to Clean HTML in Transactions,Konvertera Artikel Beskrivning till ren HTML i Transaktioner, +Convert to Group,Konvertera till Grupp,Warehouse +Convert to Item Based Reposting,Konvertera till Artikel Baserad Ompostering, +Convert to Ledger,Konvertera till Register,Warehouse +Core,System, +Corrective Job Card,Korrigerande Jobbkort, +Corrective Operation,Korrigerande Åtgärd, +Corrective Operation Cost,Korrigerande Åtgärd Kostnad, +Cost Center Allocation,Resultat Enhet Tilldelning, +Cost Center Allocation Percentage,Resultat Enhet Procentuell Tilldelning , +Cost Center Allocation Percentages,Resultat Enhet Procentuell Tilldelning, +Cost Center For Item with Item Code {0} has been Changed to {1},Resultat Enhet för Artikel med Artikelkod {0} har ändrats till {1}, +"Cost Center is a part of Cost Center Allocation, hence cannot be converted to a group",Resultat Enhet är del av Resultat Enhet Tilldelning och kan därför inte konverteras till grupp, +Cost Center with Allocation records can not be converted to a group,Resultat Enhet med tilldelning poster kan inte konverteras till grupp, +Cost Center {0} cannot be used for allocation as it is used as main cost center in other allocation record.,Resultat Enhet {0} kan inte användas för tilldelning eftersom det används som Huvud Resultat Enhet i annan tilldelning post., +Cost Center {} doesn't belong to Company {},Resultat Enhet {} tillhör inte bolag {}, +Cost Center {} is a group cost center and group cost centers cannot be used in transactions,Resultat Enhet {} är Grupp Resultat Enhet och Grupp Resultat Enhet kan inte användas i transaktioner, +Cost Configuration,Kostnad Inställning, +Cost Per Unit,Kostnad Per Enhet, +Cost of New Capitalized Asset,Kostnad för ny Kapitaliserad Tillgång, +Cost of Poor Quality Report,Kostand för Dålig Kvalitet Rapport, +Cost to Company (CTC),Totalt Kostnad per År, +Costing Details,Kostnad Detaljer, +Could Not Delete Demo Data,Kunde inte ta bort demodata, +Could not auto update shifts. Shift with shift factor {0} needed.,Kunde inte uppdatera förskjutning automatiskt. Förskjutning med förskjutning faktor {0} behövs., +Could not detect the Company for updating Bank Accounts,Kunde inte identifiera bolag för uppdatering av Bank Konto, +Could not find path for ,Kunde inte hitta sökväg för, +Count,Antal, +Create Depreciation Entry,Skapa Avskrivning Post, +Create Employee records.,Skapa Personal Uppgifter, +Create Grouped Asset,Skapa Grupperad Tillgång, +Create Job Card based on Batch Size,Skapa Jobbkort baserad på Parti Storlek, +Create Journal Entries,Skapa Journal Poster, +Create Ledger Entries for Change Amount,Skapa Register Poster för Växel Belopp, +Create Link,Skapa Länk, +Create Multi-level BOM,Skapa Flernivå Stycklista, +Create New Customer,Skapa Ny Kund, +Create Opportunity,Skapa Möjlighet, +Create Prospect,Skapa Prospekt, +Create Reposting Entries,Skapa Ompostering Poster, +Create Reposting Entry,Skapa Ompostering Post, +Create Stock Entry,Skapa Lager Post, +Create Workstation,Skapa Arbetsplats, +Create a new composite asset,Skapa ny Sammansatt Tillgång, +Create a variant with the template image.,Skapa variant med Mall Bild., +Create in Draft Status,Skapa i Utkast Status, +Create {0} {1} ?,Skapa {0} {1} ?, +Created On,Skapad, +Created {0} scorecards for {1} between:,Skapade {0} Resultatkort för {1} mellan:, +Creating Delivery Note ...,Skapar Försäljning Följesedel ..., +Creating Journal Entries...,Skapar Journal Poster..., +Creating Packing Slip ...,Skapar Packsedel ..., +Creating Purchase Invoices ...,Skapar Inköp Ordrar ..., +Creating Purchase Receipt ...,Skapar Inköp Följesedel ..., +Creating Sales Invoices ...,Skapa Försäljning Fakturor ..., +Creating Stock Entry,Skapar Lager Post...., +Creating Subcontracting Order ...,Skapar Underleverantör Order ..., +Creating Subcontracting Receipt ...,Skapar Underleverantör Följesedel ..., +Creating User...,Skapar Användare..., +Creation,Skapande, +Creation of {1}(s) successful,Skapande av {1}(s) klar, +"Creation of {0} failed. + Check Bulk Transaction Log","Skapande av {0} misslyckad. + Kontrollera Mass Transaktion Logg", +"Creation of {0} partially successful. + Check Bulk Transaction Log","Skapande av {0} delvis klar. + Kontrollera Mass Transaktion Logg", +Credit (Transaction),Kredit (Transaktion), +Credit Amount in Transaction Currency,Kredit Belopp i Transaktion Valuta, +Credit Limit Crossed,Kredit Gräns Överskriden, +Credit Limit Settings,Kredit Gräns Inställningar, +"Credit Note will update it's own outstanding amount, even if ""Return Against"" is specified.","Kredit Nota kommer att uppdatera sitt eget utestående belopp, även om ""Retur Mot"" anges.", +Currency Exchange Settings Details,Valuta Växling Inställning Detaljer, +Currency Exchange Settings Result,Valuta Växling Inställning Resultat, +Current Asset,Aktuell Tillgång, +Current Index,Aktuellt Index, +Current Level,Aktuell Nivå, +Current Liability,Aktuell Skuld, +Current Node,Aktuell Nod, +Current Serial / Batch Bundle,Aktuell Serie / Parti Paket, +Custom,Anpassad, +Custom delimiters,Anpassade Avgränsare, +Customer ,Kund, +Customer / Item / Item Group,Kund / Artikel / Artikel Grupp, +Customer Defaults,Kund Standard, +Customer Group Item,Kund Grupp Artikel, +Customer Group: {0} does not exist,Kund Grupp: {0} finns inte, +Customer Item,Kund Artikel, +Customer Name: ,Kund Namn:, +Customer Portal Users,Portal  Användare, +Customer: ,Kund:, +Daily Time to send,Daglig Tid att Skicka, +Dashboard,Översikt Panel, +Data Based On,Data Baserad På, +Date ,Datum , +Date must be between {0} and {1},Datum måste vara mellan {0} och {1}, +Days before the current subscription period,Dagar före aktuell prenumeration period, +DeLinked,Bortkoppplad, +Deal Owner,Ansvarig, +Debit (Transaction),Debet (Transaktion), +Debit Amount in Transaction Currency,Debet Belopp i Transaktion Valuta, +"Debit Note will update it's own outstanding amount, even if ""Return Against"" is specified.","Debet Nota kommer att uppdatera sitt eget utestående belopp, även om ""Retur Mot"" anges.", +Debit-Credit Mismatch,Debet-Kredit överensstämmer ej, +Debit-Credit mismatch,Debet-Kredit överensstämmer ej, +Decapitalization,Dekapitalisering, +Decapitalized,Dekapitaliserad, +Default Advance Account,Standard Förskött Konto, +Default Advance Paid Account,Standard Förskött Skuld Konto, +Default Advance Received Account,Standard Förskött Intäkt Konto, +Default BOM not found for FG Item {0},Standard Stycklista hittades inte för Färdig Artikel {0}, +Default Discount Account,Standard Rabatt Konto, +Default In-Transit Warehouse,Standard I Transit Lager, +Default Operating Cost Account,Standard Driftskostnad Konto, +Default Payment Discount Account,Standard Rabatt Konto, +Default Provisional Account,Standard Provisorisk Konto, +Default Service Level Agreement for {0} already exists.,Standard Service Nivå Avtal för {0} finns redan., +Default Unit of Measure for Item {0} cannot be changed directly because you have already made some transaction(s) with another UOM. You need to either cancel the linked documents or create a new Item.,Standard Enhet för Artikel {0} kan inte ändras eftersom det finns några transaktion(er) med annan Enhet. Man måste antingen annullera länkade dokument eller skapa ny artikel., +Default settings for your stock-related transactions,Standard inställningar för lager relaterade transaktioner, +"Default tax templates for sales, purchase and items are created.","Standard Moms Mallar för Försäljning,Inköp och Artiklar är skapade. ", +Deferred Accounting,Uppskjuten Bokföring, +Deferred Accounting Defaults,Uppskjuten Bokföring Standard, +Deferred Revenue and Expense,Uppskjuten Intäkt och Kostnad, +Deferred accounting failed for some invoices:,Uppskjuten Bokföring misslyckades för vissa fakturor:, +Delay (In Days),Försening (I Dagar), +Delayed,Försenad, +Delayed Tasks Summary,Försenad Uppgifter Översikt, +Delete Accounting and Stock Ledger Entries on deletion of Transaction,Ta bort Bokföring och Lager Register Poster vid radering av Transaktion, +Delete Bins,Ta bort från Papperskorg, +Delete Cancelled Ledger Entries,Ta bort Annullerade Register Poster, +Delete Dimension,Ta bort Dimension, +Delete Leads and Addresses,Ta bort Prospekt och Adresser, +Delete Transactions,Ta bort Transaktioner, +Deleted Documents,Papperskorg, +Deletion in Progress!,Borttagning Pågår!, +Delimiter options,Avgränsning Alternativ, +Delivery Manager,Leverans Ansvarig, +Delivery Note Packed Item,Försäljning Följesedel Packad Artikel, +Delivery Note(s) created for the Pick List,Försäljning Följesedel skapad för Plocklista, +Delivery User,Leverans Användare, +Delivery to,Leverera Till, +Demo Company,Demo Bolag, +Demo data cleared,Demo Data Borttagen, +Dependant SLE Voucher Detail No,Beroende SLE Verifikat Detalj Nummer, +Dependent Task {0} is not a Template Task,Beroende Uppgift {0} är inte Mall Uppgift, +Deposit,Insättning, +Depreciate based on daily pro-rata,Skriv av baserat på dagliga proportioner, +Depreciate based on shifts,Skriv av baserat på förskjutningar, +Depreciation Details,Avskrivning Detaljer, +Depreciation Entry Posting Status,Avskrivning Post Bokföring Status, +Depreciation Expense Account should be an Income or Expense Account.,Kostnad Avskrivning Konto ska vara Intäkt eller Kostnad Konto., +Depreciation Posting Date cannot be before Available-for-use Date,Avskrivning Bokföring Datum kan inte vara före Tillgänglig för Användning Datum, +Depreciation Row {0}: Depreciation Posting Date cannot be before Available-for-use Date,Avskrivning Rad {0}: Avskrivning Bokföring Datum kan inte vara före Tillgänglig för Användning Datum, +Depreciation Schedule View,Avskrivning Schema Vy, +Depreciation cannot be calculated for fully depreciated assets,Avskrivning kan inte beräknas för fullt avskrivna tillgångar, +Description of Content,Beskrivning av Innehåll, +Desk User,Skrivbord Användare, +Difference In,Differens I, +Difference Posting Date,Differens Bokföring Datum, +Difference Qty,Differens Kvantitet, +Different 'Source Warehouse' and 'Target Warehouse' can be set for each row.,Olika 'Från Lager' och 'Till Lager' kan anges för varje rad., +Dimension Details,Dimension Detaljer, +Dimension Filter Help,Dimension Filter Hjälp, +Dimension-wise Accounts Balance Report,Bokföring Saldo Rapport per Dimension, +Direct Expense,Direkta Kostnader, +Disable Last Purchase Rate,Inaktivera Senaste Inköp Pris, +Disable Serial No And Batch Selector,Inaktivera Serie Nummer och Parti Väljare, +Disabled Account Selected,Inaktiverad Konto Vald, +Disabled Warehouse {0} cannot be used for this transaction.,Inaktiverad Lager {0} kan inte användas för denna transaktion., +Disabled pricing rules since this {} is an internal transfer,Inaktiverade Prissättning Regler eftersom detta {} är intern överföring, +Disabled tax included prices since this {} is an internal transfer,Inaktiverade Pris Inklusive Moms eftersom detta {} är intern överföring, +Disables auto-fetching of existing quantity,Inaktiverar automatisk hämtning av befintlig kvantitet, +Disassemble,Demontera, +Disassemble Order,Demontering Order, +Discount Account,Rabatt Konto, +Discount Date,Rabatt Datum, +Discount Settings,Rabatt Inställningar, +Discount Validity,Rabatt Giltighet , +Discount Validity Based On,Rabatt Giltighet Baserad På, +Discount of {} applied as per Payment Term,Rabatt på {} tillämpad enligt Betalning Villkor, +Discounted Amount,Rabatterad Belopp, +"Discounts to be applied in sequential ranges like buy 1 get 1, buy 2 get 2, buy 3 get 3 and so on","Rabatter som ska tillämpas i sekventiella intervall som köp 1 få 1, köp 2 få 2, köp 3 få 3 och så vidare", +Discrepancy between General and Payment Ledger,Avvikelse mellan Bökföring Register och Betalning Register, +Dispatch Address,Leverans Adress, +Dispatch Address Name,Leverans Adress Namn, +Distinct Item and Warehouse,Distinkt Artikel och Lager, +Distribute Additional Costs Based On ,Fördela Extra Kostnader Baserat På, +Distribute Manually,Fördela Manuellt, +Do Not Explode,Utvidga Ej, +Do Not Update Serial / Batch on Creation of Auto Bundle,Uppdatera inte Serie / Parti vid skapande av Automatiskt Paket, +Do Not Use Batch-wise Valuation,Använd inte partivis värdering, +Do reposting for each Stock Transaction,Skapa ompostering för varje Lager Transaktion, +Do you still want to enable negative inventory?,Vill du fortfarande aktivera negativ Lager?, +DocField,DocType Fält, +DocTypes should not be added manually to the 'Excluded DocTypes' table. You are only allowed to remove entries from it.,"DocTypes ska inte läggas till manuellt i ""Excluded DocTypes"" tabell . Man får bara ta bort poster från den.", +Document Type already used as a dimension,Dokument Typ används redan som dimension, +Documents,Dokument , +Documents: {0} have deferred revenue/expense enabled for them. Cannot repost.,Dokument: {0} har uppskjutna intäkter/kostnader aktiverat för dem. Kan inte posta om., +Domain Settings,Domän Inställningar, +Don't Reserve Sales Order Qty on Sales Return,Reservera inte Försäljning Order Kvantitet vid Försäljning Retur, +Don't Send Emails,Skicka inte E-post, +Dont Recompute tax,Räkna inte om Moms, +Download Backups,Säkerhetskopior, +Download CSV Template,Ladda ner CSV Mall, +Download Materials Request Plan,Ladda ner Material Begäran Plan, +Download Materials Request Plan Section,Ladda ner Material Begäran Plan Sektion, +Dunning Amount (Company Currency),Påminnelse Avgift (Bolag Valuta), +Dunning Level,Påminnelse Nivå, +Duplicate Closing Stock Balance,Kopiera Stängning Lager Saldo, +Duplicate Customer Group,Kopiera Kund Grupp, +Duplicate Finance Book,Kopiera Finans Register, +Duplicate Item Group,Kopiera Artikel Grupp, +Duplicate POS Invoices found,Kopiera Kassa Fakturor , +Dynamic Condition,Dynamiska Villkor, +Edit Capacity,Redigera Kapacitet, +Edit Cart,Ändra Kundkorg, +Edit Full Form,Öppna i Full Formulär, +Edit Note,Redigera Anteckning, +Editing {0} is not allowed as per POS Profile settings,Ej Tillåtet att Redigera {0} pga Kassa Profil Inställningar, +Either 'Selling' or 'Buying' must be selected,"""Inköp"" eller ""Försäljning"" måste väljas", +Email / Notifications,E-post / Aviseringar, +Email Address (required),E-post Adress (erfordras), +"Email Address must be unique, it is already used in {0}","E-post Adress måste vara unik, den används redan i {0}", +Email Digest Recipient,E-post Utskick Mottagare, +Email Digest: {0},E-post Utskick: {0}, +Email Domain,E-post Domän, +Email or Phone/Mobile of the Contact are mandatory to continue.,E-post eller Telefon / Mobil för Kontakt erfordras för att fortsätta., +Email verification failed.,E-post verifiering misslyckades., +Employee User Id,Användare ID, +Enable Allow Partial Reservation in the Stock Settings to reserve partial stock.,Aktivera Tillåt Partiell Reservation i Lager Inställningar för att reservera partiell lager., +Enable Automatic Party Matching,Aktivera Automatiskt Parti Avstämning, +Enable Common Party Accounting,Aktivera Gemensam Parti Bokföring, +Enable Discount Accounting for Selling,Aktivera Rabatt Bokföring för Försäljning, +Enable Fuzzy Matching,Aktivera Ungefärlig Avstämning, +Enable Health Monitor,Aktivera System Övervakning, +Enable Immutable Ledger,Aktivera Oförenderlig Bokföring, +Enable Provisional Accounting For Non Stock Items,Aktivera Provisorisk Bokföring för ej Lager Artiklar, +Enable Stock Reservation,Aktivera Lager Reservation, +Enable it if users want to consider rejected materials to dispatch.,Aktivera om användare vill inkludera att avvisat material ska skickas., +Enable this checkbox even if you want to set the zero priority,Aktivera denna kryssruta även om nollprioritet ska anges, +"Enable this option to calculate daily depreciation by considering the total number of days in the entire depreciation period, (including leap years) while using daily pro-rata based depreciation",Aktivera detta alternativ för att beräkna daglig avskrivning genom att använda totalt antal dagar i hela avskrivningsperiod (inklusive skottår) vid användning av proportionell baserad avskrivning, +Enable to apply SLA on every {0},Aktivera för att tillämpa Service Nivå Avtal på varje {0}, +Enabling this ensures each Purchase Invoice has a unique value in Supplier Invoice No. field within a particular fiscal year,Aktivera för att säkerställa att varje Inköp Faktura har unikt värde i fält Leverantör Faktura Nummer fält per bokföring år, +Enabling this option will allow you to record -

1. Advances Received in a Liability Account instead of the Asset Account

2. Advances Paid in an Asset Account instead of the Liability Account,Aktivera för att möjliggöra bokföring av:

1. Mottagna Förskott Betalningar bokförs på Skuld Konto istället för Tillgång Konto

2. Betalade Förskott Betalningar bokförs på Tillgång Konto istället för Skuld Konto, +Enabling this will allow creation of multi-currency invoices against single party account in company currency,Aktivera för att tillåta skapande av fakturor i flera valutor mot enskilt konto i bolag valuta, +Enabling this will change the way how cancelled transactions are handled.,Aktivering av detta ändrar hur avbrutna transaktioner hanteras., +End Transit,Avsluta Transit, +End of the current subscription period,Slut datum på aktuell prenumeration period, +"Enter First and Last name of Employee, based on Which Full Name will be updated. IN transactions, it will be Full Name which will be fetched.","Ange För och Efternamn på Personal, baserat på vilket Fullständigt namn kommer att uppdateras. Vid transaktioner kommer det att vara Fullständigt namn som kommer att hämtas.", +Enter Manually,Ange Manuellt, +Enter Serial Nos,Ange Serie Nummer, +Enter Visit Details,Ange Besök Detaljer, +Enter a name for Routing.,Ange namn för Åtgärd Följd., +"Enter a name for the Operation, for example, Cutting.","Ange namn för Åtgärd, till exempel Skärning.", +Enter a name for this Holiday List.,Ange namn för denna Helg Lista., +"Enter an Item Code, the name will be auto-filled the same as Item Code on clicking inside the Item Name field.","Ange Artikel Kod, namn kommer att automatiskt hämtas på samma sätt som Artikel Kod när man klickar i Artikel Namn fält .", +Enter each serial no in a new line,Ange varje Serie Nummer på ny rad, +"Enter the Operation, the table will fetch the Operation details like Hourly Rate, Workstation automatically. + + After that, set the Operation Time in minutes and the table will calculate the Operation Costs based on the Hourly Rate and Operation Time.","Ange Åtgärd, detaljer hämtas automatiskt som timpris, arbetsstation . + + Efteråt, anges Åtgärd tid i minuter och system beräknar Åtgärd Kostnad baserat på timpris och tid.", +Enter the opening stock units.,Ange Öppning Lager Enheter., +Enter the quantity of the Item that will be manufactured from this Bill of Materials.,Ange kvantitet för Artikel som ska produceras från denna Stycklista., +Enter the quantity to manufacture. Raw material Items will be fetched only when this is set.,Ange kvantitet som ska produceras. Råmaterial Artiklar hämtas endast när detta är angivet., +Error during caller information update,Fel uppstod under uppdatering av samtalsinformation, +Error while posting depreciation entries,Fel uppstod vid bokföring av avskrivning poster, +Error while processing deferred accounting for {0},Fel uppstod när uppskjuten bokföring för {0} bearbetades, +Error while reposting item valuation,Fel uppstod vid ombokning av artikel värdering , +"Error: This asset already has {0} depreciation periods booked. + The `depreciation start` date must be at least {1} periods after the `available for use` date. + Please correct the dates accordingly.","Fel: Denna tillgång har redan {0} avskrivning perioder bokade. + Start datum för ""avskrivning"" måste vara minst {1} perioder efter ""tillgänglig för användning"" datum. + Korrigera datum enligt detta.", +Errors Notification,Fel Avisering, +Even invoices with apply tax withholding unchecked will be considered for checking cumulative threshold breach,Även fakturor med tillämpa moms undanhållning omarkerad kommer att betraktas för att kontrollera kumulativ tröskel överträdelse, +Example URL,Exempel URL, +Example of a linked document: {0},Exempel på länkad dokument: {0}, +"Example: ABCD.##### +If series is set and Serial No is not mentioned in transactions, then automatic serial number will be created based on this series. If you always want to explicitly mention Serial Nos for this item. leave this blank.","Exempel:. ABCD ##### Om serie är angiven och Serie Nummer inte anges i transaktioner, skapas Serie Nummer automatiskt utifrån denna serie. Om man alltid vill ange serie nummer för denna artikel lämna det tomt.", +Example: Serial No {0} reserved in {1}.,Exempel: Serie Nummer {0} reserverad i {1}., +Excess Materials Consumed,Överskott Material Förbrukad, +Excess Transfer,Överskott Överföring, +Exchange Gain Or Loss,Valutaväxling Resultat, +Exchange Gain/Loss amount has been booked through {0},Valutaväxling Resultat Belopp har bokförts genom {0}, +Exchange Rate Revaluation Settings,Valutaväxling Kurs Omvärdering Inställningar, +Excluded DocTypes,Exkluderade DocTyper, +Exempt Supplies,Undantagna Leveranser, +Expected,Förväntad, +Expected Balance Qty,Förväntad Saldo Kvantitet, +Expected End Date should be less than or equal to parent task's Expected End Date {0}.,Förväntat Slut Datum ska vara tidigare än eller lika med Överordnade Uppgifters förväntade Slut Datum {0}., +Expected Stock Value,Förväntad Lager Värde, +Expected Time Required (In Mins),Förväntad Tid (I Minuter), +Expiry,BESTFÖRE, +Export Data,Data Export, +Export Errored Rows,Exportera Felaktiga Rader, +Export Import Log,Exportera Import Logg, +Extra Consumed Qty,Extra Förbrukad Kvantitet, +Extra Job Card Quantity,Extra Jobbkort Kvantitet, +FIFO Queue vs Qty After Transaction Comparison,FIFO Kö mot Kvantitet Efter Transaktion Jämförelse, +"FIFO Stock Queue (qty, rate)","FIFO Lager Kö (kvantitet, pris)", +FIFO/LIFO Queue,FIFO / LIFO Kö, +Failed Entries,Misslyckade Poster, +"Failed to erase demo data, please delete the demo company manually.","Misslyckades att ta bort demodata, vänligen radera demo bolag manuellt.", +Failed to post depreciation entries,Kunde inte bokföra avskrivning poster, +Failed to setup defaults for country {0}. Please contact support.,Misslyckades att ange standard inställningar för {0}. Kontakta support., +Failure,Fel, +Failure Description,Fel Beskrivning, +Fetch Based On,Hämta Baserad På, +Fetch Overdue Payments,Hämta Förfallna Fakturor, +Fetch Timesheet,Hämta Tidrapport, +Fetch Value From,Hämta Värde Från, +Fetching exchange rates ...,Hämtar växel kurs ..., +Filter by Reference Date,Filtrera efter Referens Datum, +Filter on Invoice,Filtrera Faktura, +Filter on Payment,Filtrera Betalning, +Filters missing,Filter saknas, +Final Product,Färdig Artikel, +Financial Ratios,Finansiell Nyckeltal, +Financial Reports,Rapporter, +Financial Year Begins On,Bokföringsår Start Datum, +Financial reports will be generated using GL Entry doctypes (should be enabled if Period Closing Voucher is not posted for all years sequentially or missing) ,Finansiella Rapporter kommer att genereras med hjälp av Bokföring Poster (ska vara aktiverat om Period Låsning Verifikat inte publiceras för alla år i följd eller saknas), +Finished Good BOM,Färdig Stycklista, +Finished Good Item,Färdig Artikel, +Finished Good Item Qty,Färdig Artikel Kvantitet, +Finished Good Item Quantity,Färdig Artikel Kvantitet, +Finished Good Item is not specified for service item {0},Färdig Artikel är inte specificerad för service artikel {0}, +Finished Good Item {0} Qty can not be zero,Färdig Artikel {0} kvantitet kan inte vara noll, +Finished Good Item {0} must be a sub-contracted item,Färdig Artikel {0} måste vara underleverantör artikel, +Finished Good Qty,Färdig Artikel Kvantitet, +Finished Good Quantity ,Färdig Artikel Kvantitet, +Finished Good UOM,Färdig Artikel Enhet, +Finished Good {0} does not have a default BOM.,Färdig Artikel {0} har ingen standard Stycklista., +Finished Good {0} is disabled.,Färdig Artikel {0} är inaktiverad., +Finished Good {0} must be a stock item.,Färdig Artikel {0} måste vara lager artikel., +Finished Good {0} must be a sub-contracted item.,Färdig Artikel {0} måste vara underleverantör artikel., +Finished Goods Based Operating Cost,Färdiga Artiklar Baserade Driftskostnader, +Finished Goods Item,Färdig Artikel Post, +Finished Goods Reference,Färdig Artikel Referens, +Finished Goods Value,Färdig Artikel Värde, +Finished Goods based Operating Cost,Färdiga Artiklar Baserade Driftskostnader, +Finished Item {0} does not match with Work Order {1},Färdig Artikel {0} stämmer inte med Arbetsorder {1}, +First Response Due,Första Respons, +First Response SLA Failed by {},Första Respons Service Nivå Avtal misslyckades efter {}, +Fixed Asset Defaults,Fasta Tillgångar, +Fixed Time,Fast Tid, +Floor,Yta, +Floor Name,Yta Namn, +For Item,För Artikel, +For Item {0} cannot be received more than {1} qty against the {2} {3},För Artikel {0} kan inte tas emot mer än {1} i kvantitet mot {2} {3}, +For Job Card,För Jobbkort, +For Operation,För Åtgärd, +"For Return Invoices with Stock effect, '0' qty Items are not allowed. Following rows are affected: {0}","För Retur Fakturor med Lager påverkan, '0' kvantitet artiklar är inte tillåtna. Följande rader påverkas: {0}", +For Work Order,För Arbetsorder, +For dunning fee and interest,För påminnelseavgift och ränta, +"For item {0}, rate must be a positive number. To Allow negative rates, enable {1} in {2}","För Artikel {0} pris måste vara positiv tal. Att tillåta negativa priser, aktivera {1} i {2}", +For quantity {0} should not be greater than allowed quantity {1},För Kvantitet {0} ska inte vara högre än tillåten kvantitet {1}, +"For the item {0}, the quantity should be {1} according to the BOM {2}.",För artikel {0} ska kvantitet vara {1} enligt stycklista {2}., +"For the {0}, no stock is available for the return in the warehouse {1}.",För {0} finns inget kvantitet tillgängligt för retur i lager {1}., +"For the {0}, the quantity is required to make the return entry",För {0} erfordras kvantitet för att skapa retur post, +Force-Fetch Subscription Updates,Hämta Prenumeration Uppdateringar, +Forecasting,Prognos, +Formula Based Criteria,Formel Baserade Kriterier, +Free Item Rate,Gratis Artikel Pris, +From Corrective Job Card,Från Korrigerande Jobbkort, +From Date and To Date are mandatory,Från Datum och Till Datum Erfodras, +From Date is mandatory,Från Datum Erfordras, +From Date: {0} cannot be greater than To date: {1},Från Datum: {0} kan inte vara senare än Till Datum: {1}, +From Delivery Date,Från Leverans Datum, +From Doctype,Från DocType, +From Due Date,Från Förfallo Datum, +From Opportunity,Från Möjlighet, +From Payment Date,Från Betalning Datum, +From Prospect,Från Prospekt, +From Reference Date,Från Referens Datum, +From Voucher Detail No,Från Verifikat Detalj Nummer, +From Voucher No,Från Verifikat Nummer, +From Voucher Type,Från Verifikat Typ, +From and To dates are required,Från och Till Datum Erfodras, +Full and Final Statement,Avgång Avtal, +GL Balance,Bokföring Register Saldo, +GL Entry Processing Status,Bokföring Register Bearbetning Status, +GL reposting index,Bokföring Register Ompostering Index, +Gain/Loss accumulated in foreign currency account. Accounts with '0' balance in either Base or Account currency,Resultat ackumulerad på konto i utländsk valuta. Konto med '0' saldo i antingen Bas eller Konto valuta, +Gain/Loss already booked,Resultat Bokförd, +Gain/Loss from Revaluation,Omvärdering Resultat, +General Ledger,Bokföring Register,Warehouse +General and Payment Ledger Comparison,Bokföring och Betalning Register Jämförelse, +General and Payment Ledger mismatch,Bokföring och Betalning Register Jämförelse , +Generate Closing Stock Balance,Skapa Stängning Lager Saldo, +Generate Demo Data for Exploration,Skapa Demo Data för att Utforska, +Generate E-Invoice,Skapa E-Faktura, +Generate Invoice At,Skapa Faktura , +Generated,Skapad, +Generating Preview,Skapar Förhandsvisning, +Get Allocations,Hämta Tilldelningar, +Get Customer Group Details,Hämta Kund Grupp Detaljer, +Get Finished Goods for Manufacture,Hämta Artiklar för Produktion, +Get Outstanding Orders,Hämta Utestående Ordrar, +Get Raw Materials Cost from Consumption Entry,Hämta Råmaterial Kostnad från Förbrukning Post, +Get Raw Materials for Purchase,Hämta Råmaterial för Inköp, +Get Raw Materials for Transfer,Hämta Råmaterial för Överföring, +Get Scrap Items,Hämta Rest Artiklar, +Get Stock,Hämta Lager, +Get Sub Assembly Items,Hämta Delmontering Artiklar, +Get Supplier Group Details,Hämta Leverantör Grupp Detaljer, +Get Timesheets,Hämta Tidrapporter, +Get stops from,Hämta Leverans Stopp från, +Getting Scrap Items,Hämta Rest Artiklar, +Give free item for every N quantity,Lämna gratis artikel för varje N kvantitet, +Go back,Tillbaka, +Go to {0} List,Till {0} Lista, +Goals,Mål, +Goods,Gods, +Grant Commission,Bevilja Provision, +Greeting Message,Hälsning Meddelande, +Gross Profit Percent,Brutto Resultat %, +Gross Purchase Amount Too Low: {0} cannot be depreciated over {1} cycles with a frequency of {2} depreciations.,Brutto Inköp Belopp för lågt: {0} kan inte skrivas av över {1} cykler med en frekvens på {2} avskrivningar., +Gross Purchase Amount should be equal to purchase amount of one single Asset.,Brutto Inköp Belopp ska vara lika med inköp belopp för enskild Tillgång., +Group Same Items,Sammanfoga lika Artikelrader, +Growth View,Tillväxt Vy, +Half-yearly,Halvår, +Handle Employee Advances,Hantera Personal Förskott, +Has Alternative Item,Har Alternativ Artikel, +Has Item Scanned,Har Artikel Skannad, +Has Priority,Har Prioritet, +Have Default Naming Series for Batch ID?,Har Standard Nummer Serie för Parti?, +Heatmap,Värme Karta, +Height (cm),Höjd (cm), +"Hello,","Hej,", +Helps you distribute the Budget/Target across months if you have seasonality in your business.,Hjälper vid fördelning av Budget/ Mål över månader om bolag har säsongsvariationer., +Here are the error logs for the aforementioned failed depreciation entries: {0},Här är felloggar för ovannämnda misslyckade avskrivning poster: {0}, +Here are the options to proceed:,Här är alternativ för att fortsätta:, +"Here, you can select a senior of this Employee. Based on this, Organization Chart will be populated.",Här kan du välja överordnad för Personal. Baserat på detta kommer organisation diagam att fyllas i., +"Here, your weekly offs are pre-populated based on the previous selections. You can add more rows to also add public and national holidays individually.",Här är veckovisa ledigheter angivna i förväg baserat på de tidigare val. Man kan lägga till fler rader för att även lägga till allmänna och nationella helgdagar individuellt., +"Hi,","Hej,", +Hide Images,Dölj Bilder, +Holiday Date {0} added multiple times,Helgdag {0} har lagts till flera gånger, +Hours Spent,Förbrukade Timmar, +How often should Project be updated of Total Purchase Cost ?,Hur ofta ska Projekt uppdateras baserat på Totalt Inköp Kostnad?, +Idle,Overksam, +"If Enabled - Reconciliation happens on the Advance Payment posting date
+If Disabled - Reconciliation happens on oldest of 2 Dates: Invoice Date or the Advance Payment posting date
+","Om Aktiverad - Avstämning sker på Förskott Betalning datum
+Om Inaktiverad - Avstämning sker på äldsta av 2 datum: Faktura datum eller Förskott Betalning datum
+", +"If an operation is divided into sub operations, they can be added here.",Om åtgärd är uppdelad i underåtgärder kan de läggas till här., +"If checked, Rejected Quantity will be included while making Purchase Invoice from Purchase Receipt.","Om vald, kommer avvisad kvantitet att inkluderas när Inköp Faktura skapas från Inköp Följesedel.", +"If checked, Stock will be reserved on Submit","Om vald, kommer Lager Reservation att skapas vid Godkänn", +"If checked, picked qty won't automatically be fulfilled on submit of pick list.","Om vald, kommer plockad kvantitet inte automatiskt att uppfyllas när plocklista godkänns.", +"If checked, the tax amount will be considered as already included in the Paid Amount in Payment Entry","Om vald, kommer moms belopp anses vara inkluderad i Betald Belopp i Betalning Post", +"If checked, we will create demo data for you to explore the system. This demo data can be erased later.","Om vald,kommer demo data skapas så att man kan utforska system. Dessa demo data kan raderas senare.", +If enabled then system will manufacture Sub-assembly against the Job Card (operation).,Om aktiverad kommer system att producera Underenheter mot Jobbkort (Åtgärd)., +If enabled then system won't apply the pricing rule on the delivery note which will be create from the pick list,Om aktiverat kommer systemet inte att tillämpa prisregel på följesedel som kommer att skapas från plocklista, +If enabled then system won't override the picked qty / batches / serial numbers.,Om aktiverad kommer system inte åsidosätta plockad kvantitet / partier / serie nummer., +"If enabled, a print of this document will be attached to each email","Om aktiverad, kommer utskrift av detta dokument att bifogas till varje e-post meddelande", +"If enabled, additional ledger entries will be made for discounts in a separate Discount Account","Om aktiverad, extra bokföring poster kommer att skapas för rabatter på separat rabatt konto", +"If enabled, all files attached to this document will be attached to each email","Om aktiverad, kommer alla filer som bifogas detta dokument att bifogas till varje e-post meddelande", +"If enabled, do not update serial / batch values in the stock transactions on creation of auto Serial + / Batch Bundle. ","Om aktiverad, uppdatera inte serie nummer /parti värde i lager transaktioner vid skapande av automatiskt Serie Nummer + / Parti Paket. ", +"If enabled, ledger entries will be posted for change amount in POS transactions","Om aktiverad,bokföring poster kommer att bokföras för Växel Belopp i Kassa Transaktioner", +"If enabled, the consolidated invoices will have rounded total disabled",Om aktiverad kommer Konsoliderad Faktura att ha avrundad totalt inaktiverad, +"If enabled, the item rate won't adjust to the valuation rate during internal transfers, but accounting will still use the valuation rate.","Om aktiverad, kommer artikel pris inte att sättas till grund pris vid interna överföringar, men bokföring kommer fortfarande att använda grund pris.", +"If enabled, the system will create material requests even if the stock exists in the 'Raw Materials Warehouse'.","Om aktiverad, kommer system att skapa material begäran även om det finns på 'Råmaterial Lager'.", +"If enabled, the system will use the moving average valuation method to calculate the valuation rate for the batched items and will not consider the individual batch-wise incoming rate.","aaOm aktiverad, kommer system att använda Ma värdering sätt för att beräkna värdering för artikel partier och kommer inte att beakta individuell per parti pris.", +"If enabled, then system will only validate the pricing rule and not apply automatically. User has to manually set the discount percentage / margin / free items to validate the pricing rule","Om aktiverad, kommer system bara att validera prissättning regel och inte tillämpas automatiskt. Användare måste manuellt ange rabatt procent / marginal / gratis artikel för att validera prissättning regel", +"If mentioned, the system will allow only the users with this Role to create or modify any stock transaction earlier than the latest stock transaction for a specific item and warehouse. If set as blank, it allows all users to create/edit back-dated transactions.","Om angiven kommer system att tillåta Användare med denna roll att skapa eller ändra lager transaktioner tidigare än senaste lager transaktion för specifik artikel och lager. Om angiven som tomt, tillåter det alla Användare att skapa/redigera backdaterade transaktioner.", +"If not, you can Cancel / Submit this entry",Om inte kan man Annullera/Godkänna denna post, +"If rate is zero then item will be treated as ""Free Item""","Om pris är noll kommer artikel att behandlas som ""Gratis Artikel""", +"If the BOM results in Scrap material, the Scrap Warehouse needs to be selected.",Om Stycklista har Rest Material måste Rest Lager väljas., +"If the selected BOM has Operations mentioned in it, the system will fetch all Operations from BOM, these values can be changed.","Om vald Stycklista har angivna Åtgärder kommer system att hämta alla Åtgärder från Stycklista, dessa värden kan ändras.", +"If this checkbox is enabled, then the system won’t run the MRP for the available sub-assembly items.",Om vald kommer systemet inte att köra Material Resurs Planering för tillgängliga undermontering artiklar., +If this is undesirable please cancel the corresponding Payment Entry.,Om detta inte är önskvärt annullera motsvarande betalning post., +"If yes, then this warehouse will be used to store rejected materials","Om ja, kommer detta lager att användas för att lagra avvisat material", +"If you are maintaining stock of this Item in your Inventory, ERPNext will make a stock ledger entry for each transaction of this item.","Om man har denna artikel i Lager, kommer System att lagerbokföra varje transaktion av denna artikel.", +"If you need to reconcile particular transactions against each other, then please select accordingly. If not, all the transactions will be allocated in FIFO order.","Om man behöver stämma av specifika transaktioner mot varandra, välj därefter. Om inte, kommer alla transaktioner att tilldelas i FIFO ordning.", +"If you still want to proceed, please disable 'Skip Available Sub Assembly Items' checkbox.","Om du fortfarande vill fortsätta, avmarkera ""Hoppa över tillgängliga undermontering artiklar"".", +"If you still want to proceed, please enable {0}.","För att fortsätta, aktivera {0}.", +"If your CSV uses a different delimiter, add that character here, ensuring no spaces or additional characters are included.","Om CSV använder en annan avgränsare, lägg till det tecknet här, se till att inga mellanslag eller ytterligare tecken inkluderas.", +Ignore Account Closing Balance,Ignorera Bokföring Stängning Saldo, +Ignore Available Stock,Ignorera Tillgängligt Lager, +Ignore Closing Balance,Ignorera Stängning Saldo, +Ignore Default Payment Terms Template,Ignorera Standard Betalning Villkor Mall , +Ignore Empty Stock,Ignorera Tom Lager, +Ignore Exchange Rate Revaluation Journals,Ignorera Växelkurs Omvärdering Journaler , +Ignore Pricing Rule is enabled. Cannot apply coupon code.,Ignorera att Prissättning Regel är aktiverad. Det går inte att använda kupong kod., +Ignore System Generated Credit / Debit Notes,Ignorera System Skapade Kredit / Debet Notor, +Ignore Voucher Type filter and Select Vouchers Manually,Ignorera Verifikat Typ filter och Välj Verifikat Manuellt, +Impairment,Nedskrivningar, +Import File,Importera Fil, +Import File Errors and Warnings,Importera Fil Fel och Varningar, +Import Log Preview,Importera Logg Förhandsvisning, +Import Preview,Importera Förhandsvisning, +Import Progress,Import Framsteg, +Import Type,Import Typ, +Import Using CSV file,Importera med hjälp av CSV fil, +Import Warnings,Import Varningar, +Import from Google Sheets,Importera från Google Sheets, +"Importing {0} of {1}, {2}","Importerar {0} av {1}, {2}", +In House,Intern, +In Minutes,I Minuter, +In Party Currency,I Parti Valuta, +In Transit Transfer,I Transit Överföring, +In Transit Warehouse,I Transit Lager, +In mins,I Minuter, +"In row {0} of Appointment Booking Slots: ""To Time"" must be later than ""From Time"".","På rad {0} av Möte Bokning Tider: ""Till Tid"" måste vara senare än ""Från Tid"".", +"In the case of 'Use Multi-Level BOM' in a work order, if the user wishes to add sub-assembly costs to Finished Goods items without using a job card as well the scrap items, then this option needs to be enable.","I fall att 'Använd Flernivå Stycklista' används i arbetsorder, om användare vill lägga till undermontering kostnader till färdiga artiklar utan att använda jobbkort samt rest artiklar, måste detta alternativ vara aktiverad.", +"In this section, you can define Company-wide transaction-related defaults for this Item. Eg. Default Warehouse, Default Price List, Supplier, etc.","I detta sektion kan man definiera bolagsomfattande transaktion relaterade standard inställningar för denna artikel. T.ex. Standard Lager, Standard Prislista, Leverantör, osv.", +Inactive Status,Inaktiv Status, +Include Account Currency,Inkludera Konto Valuta, +Include Closed Orders,Inkludera Stängda Ordrar, +Include Default FB Assets,Inkludera Standard Finans Register Tillgångar, +Include Disabled,Inkludera Inaktiverad, +Include Expired Batches,Inkludera Utgångna Partier, +Include Safety Stock in Required Qty Calculation,Inkludera Säkerhet Lager i Begärd Kvantitet Beräkning, +Include Timesheets in Draft Status,Inkludera Tidrapporter i Utkast Status, +Include Zero Stock Items,Inkludera artiklar ej tillgängliga i lager, +Incoming Call Handling Schedule,Inkommande Samtalshantering Schema, +Incoming Call Settings,Inkommande Samtal Inställningar, +Incoming Rate (Costing),Inköp Pris (Kostnad), +Incorrect Balance Qty After Transaction,Felaktig Saldo Kvantitet Efter Transaktion, +Incorrect Batch Consumed,Felaktig Parti Förbrukad, +Incorrect Check in (group) Warehouse for Reorder,Felaktig vald (grupp) Lager för Ombeställning, +Incorrect Component Quantity,Felaktig Komponent Kvantitet, +Incorrect Invoice,Felaktig Faktura, +Incorrect Movement Purpose,Felaktig Förflytning Syfte, +Incorrect Payment Type,Felaktig Betalning Typ, +Incorrect Reference Document (Purchase Receipt Item),Felaktig Referens Dokument (Inköp Följesedel Artikel), +Incorrect Serial No Valuation,Felaktig Serie Nummer Värdering, +Incorrect Serial Number Consumed,Felaktig Serie Nummer Förbrukad, +Incorrect Stock Value Report,Felaktig Lager Värde Rapport, +Incorrect Type of Transaction,Felaktig Typ av Transaktion, +Increase In Asset Life(Months),Utökning av Tillgång Livslängd (Månader), +Indent,Rekvisition, +Indirect Expense,Indirekt Kostnad, +Individual GL Entry cannot be cancelled.,Enskild Bokföring Post kan inte avbokas., +Individual Stock Ledger Entry cannot be cancelled.,Enskild Lager Register Post kan inte avbokas., +Initialize Summary Table,Initiera Översikt Tabell, +Insert New Records,Infoga Nya Poster, +Inspection Rejected,Kontroll Avvisad, +Inspection Submission,Kontroll Godkännande, +Instruction,Instruktion, +Insufficient Capacity,Otillräcklig Kapacitet, +Insufficient Stock for Batch,Otillräcklig Lager för Parti, +Inter Transfer Reference,Intern Överföring Referens, +Interest and/or dunning fee,Ränta och/eller Påminnelseavgift, +Internal,Intern, +Internal Customer,Intern Kund, +Internal Customer for company {0} already exists,Intern Kund för Bolag {0} finns redan, +Internal Sale or Delivery Reference missing.,Intern Försäljning eller Leverans Referens saknas., +Internal Sales Reference Missing,Intern Försäljning Referens saknas, +Internal Supplier,Intern Leverantör, +Internal Supplier for company {0} already exists,Intern Leverantör för Bolag {0} finns redan, +Internal Transfer Reference Missing,Intern Överföring Referens saknas, +Internal Transfers,Interna Överföringar, +Internal transfers can only be done in company's default currency,Interna Överföringar kan endast göras i bolag standard valuta, +Invalid,Ogiltig, +Invalid Allocated Amount,Ogiltig Tilldelad Belopp, +Invalid Amount,Ogiltig Belopp, +Invalid Auto Repeat Date,Ogiltig Återkommande Datum, +Invalid Cost Center,Ogiltig Resultat Enhet, +Invalid Delivery Date,Ogiltig Leverans Datum, +Invalid Document,Ogiltig Dokument, +Invalid Document Type,Ogiltig Dokument Typ, +Invalid Formula,Ogiltig Formel, +Invalid Group By,Ogiltig Gruppera Efter, +Invalid Item Defaults,Ogiltig Artikel Standard, +Invalid Ledger Entries,Ogiltiga Register Poster, +Invalid Primary Role,Ogiltig Primär Roll, +Invalid Priority,Ogiltig Prioritet, +Invalid Process Loss Configuration,Ogiltig Process Förlust Konfiguration, +Invalid Purchase Invoice,Ogiltig Inköp Faktura, +Invalid Qty,Ogiltig Kvantitet, +Invalid Schedule,Ogiltig Schema, +Invalid Serial and Batch Bundle,Felaktig Serie och Parti Paket, +Invalid Warehouse,Ogiltig Lager, +Invalid result key. Response:,Ogiltig resultat nyckel. Svar:, +Invalid value {0} for {1} against account {2},Ogiltigt värde {0} för {1} mot konto {2}, +Inventory Dimension,Lager Dimension, +Inventory Dimension Negative Stock,Lager Dimension Negativ Lager, +Inventory Settings,Lager Inställningar, +Invoice Cancellation,Faktura Annullering, +Invoice Limit,Faktura Gräns, +Invoice Portion (%),Faktura Andel (%), +Invoice and Billing,Faktura & Fakturering, +Invoiced Qty,Fakturerad Kvantitet, +Invoices and Payments have been Fetched and Allocated,Fakturor och Betalningar är Hämtade och Tilldelade, +Invoicing Features,Fakturering Funktioner, +Is Adjustment Entry,Är Justering Post, +Is Alternative,Är Alternativ, +Is Cash or Non Trade Discount,Är Kontant eller Ej Försäljning Rabatt, +Is Composite Asset,Är Sammansatt Tillgång, +Is Corrective Job Card,Är Korrigerande Jobbkort, +Is Corrective Operation,Är Korrigerande Åtgärd, +Is Expandable,Är Utvidningsbar, +Is Finished Item,Är Färdig Artikel, +Is Fully Depreciated,Är Helt Avskriven, +Is Group Warehouse,Är Grupp Lager, +Is Old Subcontracting Flow,Är Gammal Underleverantör Flöde, +Is Outward,Är Utgående, +Is Period Closing Voucher Entry,Är Period Stängning Verifikat Post, +Is Rate Adjustment Entry (Debit Note),Är Pris Justering Post (Debet Nota), +Is Recursive,Är Rekursiv, +Is Rejected,Är Avvisad, +Is Rejected Warehouse,Är Avvisad Lager, +Is Scrap Item,Är Rest Artikel, +Is Short Year, Är Kort År, +Is Standard,Är Standard, +Is Stock Item,Är Lager Artikel, +Is System Generated,Är System Skapad, +Is Tax Withholding Account,Är Moms Avdrag Konto, +Is Template,Är Mall, +Issue Analytics,Ärende Analys, +Issue Summary,Ärende Översikt, +Issue a debit note with 0 qty against an existing Sales Invoice,Utfärda Debet Nota med 0 i Kvantitet mot befintlig Försäljning Faktura, +Issuing cannot be done to a location. Please enter employee to issue the Asset {0} to,Utfärdande kan inte göras till plats. Ange personal att utfärda Tillgång {0} , +It can take upto few hours for accurate stock values to be visible after merging items.,Det kan ta upp till några timmar för korrekta lagervärden att vara synliga efter sammanslagning av artiklar., +"It's not possible to distribute charges equally when total amount is zero, please set 'Distribute Charges Based On' as 'Quantity'","Det är inte möjligt att fördela avgifter lika när det totala beloppet är noll, vänligen ange ""Distribuera Avgifter Baserat På"" som ""Kvantitet""", +Item Code (Final Product),Artikel Kod (Färdig Artikel), +Item Group wise Discount,Rabatt per Artikel Grupp, +Item Price Settings,Artikel Pris Inställningar, +"Item Price appears multiple times based on Price List, Supplier/Customer, Currency, Item, Batch, UOM, Qty, and Dates.","Artikel Pris visas flera gånger baserat på Prislista, Leverantör/Kund, Valuta, Artikel, Parti, Enhet, Kvantitet och Datum.", +Item Reference,Artikel Referens, +Item Warehouse based reposting has been enabled.,Artikel Lager baserad omläggning är aktiverad., +Item and Warehouse,Artikel och Lager, +Item is removed since no serial / batch no selected.,Artikel tas bort eftersom ingen serie nummer/parti nummer är vald., +Item qty can not be updated as raw materials are already processed.,Artikel kvantitet kan inte uppdateras eftersom råmaterial redan är bearbetad., +Item rate has been updated to zero as Allow Zero Valuation Rate is checked for item {0},Artikel pris har ändrats till noll eftersom Tillåt Noll Grund Pris är vald för artikel {0}, +Item valuation reposting in progress. Report might show incorrect item valuation.,Artikel värdering omläggning pågår. Rapport kan visa felaktig artikelvärde., +Item {0} cannot be added as a sub-assembly of itself,Artikel {0} kan inte läggas till som underenhet av sig själv, +Item {0} cannot be ordered more than {1} against Blanket Order {2}.,Artikel {0} kan inte skapas order för mer än {1} mot Blankoavtal Order {2}., +Item {0} does not exist.,Artikel {0} finns inte., +Item {0} entered multiple times.,Artikel {0} är angiven flera gånger., +Item {0} is already reserved/delivered against Sales Order {1}.,Artikel {0} är redan reserverad/levererad mot Försäljning Order {1}., +Item {0} must be a Non-Stock Item,Artikel {0} måste vara Ej Lager Artikel, +Item {0} not found in 'Raw Materials Supplied' table in {1} {2},"Artikel {0} hittades inte i ""Råmaterial Levererad"" tabell i {1} {2}", +Item {0} not found.,Artikel {0} hittades inte., +Item {} does not exist.,Artikel {} finns inte., +Items & Pricing,Artiklar & Priser, +Items Catalogue,Artikel Katalog, +Items cannot be updated as Subcontracting Order is created against the Purchase Order {0}.,Artiklar kan inte uppdateras eftersom underleverantör order är skapad mot Inköp Order {0}., +Items rate has been updated to zero as Allow Zero Valuation Rate is checked for the following items: {0},Artikel Pris har ändrats till noll eftersom Tillåt Noll Grund Pris är vald för följande artiklar: {0}, +Items to Be Repost,Artikel som ska Läggas om, +Items to Order and Receive,Inköp Artiklar, +Items to Reserve,Artiklar att Reservera, +Items {0} do not exist in the Item master.,Artikel {0} saknas i Artikel Register., +Job Capacity,Arbetskapacitet, +Job Card Operation,Jobbkort Åtgärd, +Job Card Scheduled Time,Jobbkort Schemalagd Tid, +Job Card Scrap Item,Jobbkort Rest Artikel, +Job Card and Capacity Planning,Jobbkort & Kapacitet Planering, +Job Cards,Jobbkort , +Job Paused,Jobb Pausad, +Job Worker,Jobb Ansvarig, +Job Worker Address,Jobb Ansvarig Adress, +Job Worker Address Details,Jobb Ansvarig Adress Detaljer, +Job Worker Contact,Jobb Ansvarig Kontakt, +Job Worker Delivery Note,Jobb Ansvarig Följesedel, +Job Worker Name,Jobb Ansvarig Namn, +Job Worker Warehouse,Jobb Ansvarig Lager, +Job: {0} has been triggered for processing failed transactions,Jobb: {0} är utlöst för bearbetning av misslyckade transaktioner, +Joining,Anställning, +Journal Entries,Journal Poster, +Journal Entry for Asset scrapping cannot be cancelled. Please restore the Asset.,Journal Post för Tillgång avskrivning kan inte annulleras. Vänligen återställ Tillgång., +Journal Entry type should be set as Depreciation Entry for asset depreciation,Journal Post Typ ska anges som Avskrivning Post för tillgång avskrivning, +Journal entries have been created,Journal Poster är skapade, +Journals,Journaler, +Key,Nyckel, +Kindly cancel the Manufacturing Entries first against the work order {0}.,Vänligen annullera Produktion Poster först mot Arbetsorder {0}., +"Last Name, Email or Phone/Mobile of the user are mandatory to continue.","Efternamn, E-post eller Telefon/Mobil erfodras för användare att fortsätta.", +Lead -> Prospect,Potentiell Kund -> Prospekt, +Lead Conversion Time,Potentiell Kund Samtal Tid, +Lead Owner cannot be same as the Lead Email Address,Potentiell Kund Ansvarig kan inte vara samma som Potentiell Kund E-post Adress, +Lead {0} has been added to prospect {1}.,Potentiell Kund {0} är lagd till Prospekt {1}., +Leaderboard,Topplista, +Leads,Potentiella Kunder, +Learn Accounting,Lär dig om Bokföring, +Learn Inventory Management,Lär dig om Lager Hantering, +Learn Manufacturing,Lär dig om Produktion, +Learn Procurement,Lär dig om Inköp, +Learn Project Management,Lär dig om Projekt Hantering, +Learn Sales Management,Lär dig om Försäljning, +"Learn about Common Party","Lär dig om Gemensam Parti", +"Leave blank for home. +This is relative to site URL, for example ""about"" will redirect to ""https://yoursitename.com/about""","Lämna tom för Hem. Detta är relativt till webbadress, till exempel 'Om' kommer att omdirigera till 'https://yoursitename.com/about'", +Ledger Health,Register Status, +Ledger Health Monitor,Register Status Övervakning, +Ledger Health Monitor Company,Register Status Övervakning Bolag, +Ledger Merge,Bokgöring Register Sammanslagning, +Ledger Merge Accounts,Register Sammanslagning Konton, +Ledgers,Register, +Left Child,Vänster Underordnad, +Legend,Förklaring, +Length,Längd, +Length (cm),Längd (cm), +Less than 12 months.,Kortare än tolv månader., +Level (BOM),Nivå (Stycklista), +Limit timeslot for Stock Reposting,Begränsa tid för Lager Omläggning, +Limits don't apply on,Gräns gäller inte, +Link a new bank account,Länka ny Bank Konto, +Link with Customer,Länka med Kund, +Link with Supplier,Länka med Leverantör, +Linked with submitted documents,Länkad med godkända dokument, +Linking Failed,Länkning Misslyckad, +Linking to Customer Failed. Please try again.,Länkning med Kund Misslyckades. Var god försök igen., +Linking to Supplier Failed. Please try again.,Länkning med Leverantör Misslyckades. Var god försök igen., +Links,Länkar, +Loading import file...,Laddar import fil..., +Locked,Låst, +Log Entries,Logg Poster, +Log the selling and buying rate of an Item,Logga försäljning och inköp pris för Artikel, +Lost Quotations,Förlorade Försäljning Offerter, +Lost Quotations %,Förlorade Försäljning Offerter (%), +Lost Reasons are required in case opportunity is Lost.,Förlorad Anledning erfordras om Möjlighet är Förlorad., +Lost Value,Förlorad Värde, +Lost Value %,Förlorad Värde %, +Machine Type,Maskin Typ, +Main Cost Center,Standard Resultat Enhet, +Main Cost Center {0} cannot be entered in the child table,Huvud Resultat Enhet {0} kan inte anges i underordnad tabell, +Maintain Asset,Underhåll Tillgång, +Maintenance Details,Service Detaljer, +Make ,Märke , +Make Asset Movement,Skapa Tillgång Förflyttning, +Make Quotation,Skapa Offert, +Make Return Entry,Skapa Retur Post, +Make Serial No / Batch from Work Order,Skapa Serie / Parti Nummer från Arbetsorder, +Make {0} Variant,Skapa {0} Variant, +Make {0} Variants,Skapa {0} Varianter, +Making Journal Entries against advance accounts: {0} is not recommended. These Journals won't be available for Reconciliation.,Skapa Journal Poster mot förskott konton: {0} rekommenderas inte. Dessa journaler kommer inte att vara tillgängliga för avstämning., +Manage,Hantera, +Mandatory Accounting Dimension,Erfodrad Bokföring Dimension, +Mandatory Depends On,Erfordrad Beroende Av, +Mandatory Field,Erfodrad Fält, +Mandatory Section,Erfodrad Sektion, +Manual Inspection,Manuell Kontroll, +Manufacture Sub-assembly in Operation,Producera Underenhet i Åtgärd, +Manufacturing Type,Produktion Typ, +Mapping Purchase Receipt ...,Mappar Inköp Följesedel..., +Mapping Subcontracting Order ...,Mappar Underleverantör Order ..., +Mapping {0} ...,Mappar {0} ..., +Margin View,Marginal Vy, +Mark As Closed,Ange som Stängd , +Material Returned from WIP,Material Retur från Arbete Pågår, +Material Transfer (In Transit),Material Överföring (I Transit), +Materials are already received against the {0} {1},Material mottagen mot {0} {1}, +Materials needs to be transferred to the work in progress warehouse for the job card {0},Material måste överföras till Arbete Pågår Lager för Jobbkort {0}, +Max Qty (As Per Stock UOM),Maximum Kvantitet (per Lager Enhet), +Maximum Net Rate,Maximum Netto Pris, +Maximum Payment Amount,Maximum Betalning Belopp, +Maximum Value,Maximum Värde, +Maximum quantity scanned for item {0}.,Maximum kvantitet skannad för artikel {0}., +Meeting,Möte, +Mention if non-standard Receivable account,Ange om ej Standard Fordring Konto, +Merge Invoices Based On,Slå Samman Faktura Baserad På, +Merge Progress,Sammanslagning Framsteg, +Merge Similar Account Heads,Slå Samman Liknande Konto Poster, +Merge taxes from multiple documents,Slå Samman Moms från flera dokument, +Merged,Sammanslagen, +"Merging is only possible if following properties are same in both records. Is Group, Root Type, Company and Account Currency","Sammanslagning är endast möjlig om följande egenskaper är lika i båda poster. Är Grupp, Konto Klass, Bolag och Konto Valuta", +Merging {0} of {1},Slår Samman {0} av {1}, +Min Qty (As Per Stock UOM),Minimum Kvantitet (per Lager Enhet), +Min Qty should be greater than Recurse Over Qty,Minimum Kvantitet ska vara högre än Rekurs över kvantitet, +Minimum Net Rate,Minimum Netto Pris, +Minimum Payment Amount,Minimum Betalning Belopp, +Minimum Value,Mimimum Värde, +Mismatch,Felavstämd, +Missing,Saknas, +Missing Asset,Tillgång Saknas, +Missing Cost Center,Resultat Enhet Saknas, +Missing Finance Book,Finans Register Saknas, +Missing Finished Good,Färdig Artikel Saknas, +Missing Formula,Formel Saknas, +Missing Items,Artiklar Saknas, +Missing Payments App,Betalning App Saknas, +Missing Serial No Bundle,Serie Nummer Paket Saknas, +Missing value,Värde Saknas, +Modified By,Modifierad Av, +Modified On,Modifierad, +Module Settings,Modul Inställningar, +Monitor for Last 'X' days,"Övervakning för senaste ""X"" dagar", +Move Stock,Flytta Lager, +Move to Cart,Flytta till Kundkorg, +Movement,Förflyttning, +Moving up in tree ...,Flytta upp i träd..., +Multi-level BOM Creator,Fler Nivå Stycklista Generator, +Multiple Loyalty Programs found for Customer {}. Please select manually.,Flera Lojalitet Program hittades för Kund {}. Välj manuellt., +Multiple Warehouse Accounts,Flera Lager Konton, +Multiple items cannot be marked as finished item,Flera artiklar kan inte väljas som färdiga artiklar, +Must be a publicly accessible Google Sheets URL and adding Bank Account column is necessary for importing via Google Sheets,Måste vara publik tillgänglig URL för Google Sheets och det är nödvändigt att lägga till Bank Konto Kolumn att importera via Google Sheets, +Named Place,Namngiven Plats, +Naming Series and Price Defaults,Nummer Serie & Pris Standard, +Net total calculation precision loss,Netto Total Beräkning Precision Förlust, +New Balance In Account Currency,Ny Saldo i Konto Valuta, +New Event,Ny Händelse, +New Note,Ny Anteckning, +New Task,Ny Uppgift, +New Version,Ny Version, +Newsletter,Nyhetsbrev, +No Answer,Ingen Svar, +No Customers found with selected options.,Inga Kunder hittades med valda alternativ., +No Items selected for transfer.,Inga Artiklar har valts för överföring., +No Matching Bank Transactions Found,Inga matchande banktransaktioner hittades, +No Notes,Inga Anteckningar, +No Outstanding Invoices found for this party,Inga Utestående Fakturor hittades för denna parti, +No POS Profile found. Please create a New POS Profile first,Ingen Kassa Profil hittad. Skapa ny Kassa Profil, +No Records for these settings.,Inga Poster för dessa inställningar., +No Serial / Batches are available for return,Inga Serie Nummer/Partier är tillgängliga för retur, +No Stock Available Currently,Ingen Lager Tillgänglig för närvarande, +No Summary,Ingen Översikt, +No Tax Withholding data found for the current posting date.,Ingen Moms Avdrag data hittades för aktuell bokföring datum., +No Terms,Inga Villkor, +No Unreconciled Invoices and Payments found for this party and account,Inga Oavstämda Fakturor och Betalningar hittades för denna parti och konto, +No Unreconciled Payments found for this party,Inga Oavstämda Betalningar hittades för denna parti, +No Work Orders were created,Inga Arbetsordrar skapades, +No additional fields available,Inga extra fält tillgängliga, +No billing email found for customer: {0},Ingen faktura e-post hittades för kund: {0}, +No data found. Seems like you uploaded a blank file,Ingen data hittades. Det verkar som om tom fil laddats upp, +No employee was scheduled for call popup,Ingen personal var schemalagd för oväntad samtal, +No failed logs,Inga Misslyckade Logg, +No item available for transfer.,Ingen artikel tillgänglig för överföring., +No items are available in sales orders {0} for production,Inga artiklar är tillgängliga i Försäljning Order {0} för produktion, +No items are available in the sales order {0} for production,Inga artiklar är tillgängliga i Försäljning Order {0} för produktion, +No items in cart,Antal Artiklar i Kundkorg, +No matches occurred via auto reconciliation,Inga avstämningar uppstod via automatisk avstämning, +No more children on Left,Inga fler underordnade till Vänster, +No more children on Right,Inga fler underordnade till Höger, +No of Docs,Antal Dokument , +No of Employees,Personal Antal, +No of Months (Expense),Antal Månader, +No of Months (Revenue),Antal Månader, +No open event,Inga öppna Händelse, +No open task,Inga öppna Uppgifter, +No outstanding {0} found for the {1} {2} which qualify the filters you have specified.,Inga utestående {0} hittades för {1} {2} som uppfyller angiven filter., +No primary email found for customer: {0},Ingen primär e-post adress hittades för kund: {0}, +No records found in Allocation table,Inga poster hittades i Tilldelning tabell, +No records found in the Invoices table,Inga poster hittades i Faktura Tabell, +No records found in the Payments table,Inga poster hittades i Betalning Tabell, +No stock transactions can be created or modified before this date.,Inga lager transaktioner kan skapas eller ändras före detta datum., +No {0} Accounts found for this company.,Inga {0} konto hittades för detta bolag., +No.,Nr., +No. of Employees,Personal Antal, +No. of parallel job cards which can be allowed on this workstation. Example: 2 would mean this workstation can process production for two Work Orders at a time.,Antal samtidiga Jobbkort som kan tillåtas på denna arbetsstation. Exempel: 2 skulle innebära att denna arbetsstation kan hantera två Arbetsordrar åt gången., +Note: Automatic log deletion only applies to logs of type Update Cost,Obs: Automatisk logg radering gäller endast loggar av typ Uppdatera Kostnad, +"Note: To merge the items, create a separate Stock Reconciliation for the old item {0}",Obs: För att slå samman artiklar skapar separat lager avstämning för gamla artikel {0}, +Notes HTML,Anteckningar HTML, +Notification,Aviseringar, +Notification Settings,Avisering Inställningar, +Notify Reposting Error to Role,Avisera omläggning fel till roll, +Number of Days,Antal Dagar, +Numeric,Numerisk, +Numeric Inspection,Numerisk Kontroll, +Off,Av, +Offsetting Account,Avräkning Konto, +Offsetting for Accounting Dimension,Avräkning för Bokföring Dimension, +On Paid Amount,På Betald Belopp, +On This Date,Datum, +On Track,På Bana, +On enabling this cancellation entries will be posted on the actual cancellation date and reports will consider cancelled entries as well,När du aktiverar denna annullering kommer poster att publiceras på faktisk annullering datum och rapporter kommer också att inkludera annullerade poster, +"On expanding a row in the Items to Manufacture table, you'll see an option to 'Include Exploded Items'. Ticking this includes raw materials of the sub-assembly items in the production process.","Vid utökning av rad i Artiklar att Producera Tabell,kommer du att se alternativ ""Inkludera Utvidgade Artiklar"". Genom att väljadetta ingår råvaror från delkomponenter i produktion process.", +"On submission of the stock transaction, system will auto create the Serial and Batch Bundle based on the Serial No / Batch fields.",Vid godkännade av lager transaktion kommer system att automatiskt skapa Serie och Parti Paket baserat på Serienummer / Parti fält., +Once the Work Order is Closed. It can't be resumed.,När Arbetsorder är Stängd kan den inte återupptas., +Only 'Payment Entries' made against this advance account are supported.,"Endast ""Betalning Poster"" som skapas mot detta förskott konto stöds.", +Only CSV and Excel files can be used to for importing data. Please check the file format you are trying to upload,Endast CSV och Excel filer kan användas för data import. Kontrollera filformat du försöker ladda upp, +Only Deduct Tax On Excess Amount ,Endast Dra av Skatt på Överskjutande Belopp, +Only Include Allocated Payments,Endast Inkludera allokerade betalningar, +Only Parent can be of type {0},Endast Överordnad kan vara av typ {0}, +Only existing assets,Endast Befintliga Tillgångar, +"Only one Subcontracting Order can be created against a Purchase Order, cancel the existing Subcontracting Order to create a new one.","Endast en Underleverantör Order kan skapas mot en Inköp Order, annullera befintlig Underleverantör Order för att skapa ny.", +Only one {0} entry can be created against the Work Order {1},Endast en {0} post kan skapas mot Arbetsorder {1}, +"Only values between [0,1) are allowed. Like {0.00, 0.04, 0.09, ...} +Ex: If allowance is set at 0.07, accounts that have balance of 0.07 in either of the currencies will be considered as zero balance account","Endast värden mellan [0,1) är tillåtna, t.ex.{0.00, 0.04, 0.09, ...} +Exempel: Om tillåtelse är angiven till 0,07, kommer konton som har saldo på 0,07 i någon av valutorna att betraktas som noll saldo konto.", +Only {0} are supported,Endast {0} stöds, +Open Activities HTML,Öppna Aktiviteter HTML, +Open Call Log,Öppna Samtal Logg, +Open Event,Öppna Händelse, +Open Events,Öppna Händelser, +Open Sales Orders,Öppna Försäljning Ordrar, +Open Task,Öppna Uppgift, +Open Tasks,Öppna Uppgifter, +Open Work Order {0},Öppna Arbetsorder {0}, +Opening & Closing,Öppning & Stängning, +Opening Accumulated Depreciation must be less than or equal to {0},Öppning Ackumulerad Avskrivning måste vara mindre än eller lika med {0}, +Opening Entry can not be created after Period Closing Voucher is created.,Öppning Post kan inte skapas efter att Period Stängning Verifikat är skapad., +Opening Number of Booked Depreciations,Öppning Nummer för Bokförda Avskrivningar, +Opening Purchase Invoices have been created.,Öppning Inköp Fakturor är skapade., +Opening Sales Invoices have been created.,Öppning Försäljning Fakturor är skapade., +Operating Cost Per BOM Quantity,Drift Kostnad per Stycklista Kvantitet, +Operation time does not depend on quantity to produce,Åtgärd Tid beror inte på kvantitet som ska produceras, +Opportunity Amount (Company Currency),Möjlighet Belopp (Bolag Valuta), +Opportunity Owner,Möjlighet Ansvarig, +Opportunity Source,Möjlighet Källa, +Opportunity Summary by Sales Stage,Möjlighet Översikt efter Försäljning Stadium, +Opportunity Summary by Sales Stage ,Möjlighet Översikt efter Försäljning Stadium, +Opportunity Value,Möjlighet Värde, +Other Info,Övrig Information, +Out of stock,Ej på Lager, +Over Picking Allowance,Över Plock Tillåtelse, +Over Receipt,Över Följesedel, +Over Receipt/Delivery of {0} {1} ignored for item {2} because you have {3} role.,Över Följesedel/Leverans av {0} {1} ignoreras för artikel {2} eftersom du har {3} roll., +Over Transfer Allowance,Över Överföring Tillåtelse, +Overbilling of {0} {1} ignored for item {2} because you have {3} role.,Överfakturering av {0} {1} ignoreras för artikel {2} eftersom du har {3} roll., +Overbilling of {} ignored because you have {} role.,Överfakturering av {} ignoreras eftersom du har {} roll., +Overdue Payment,Förfallna Fakturor, +Overdue Payments,Förfallna Fakturor, +Overdue Tasks,Försenade Uppgifter, +Overview,Recension , +PDF Name,PDF Namn, +POS Closing Failed,Kassa Stängning Misslyckad, +POS Closing failed while running in a background process. You can resolve the {0} and retry the process again.,Kassa Stängning misslyckades medan den kördes i bakgrund process. Du kan lösa {0} och försöka igen., +POS Invoice is already consolidated,Kassa Faktura är redan konsoliderad, +POS Invoice is not submitted,Kassa Faktura är inte godkänd, +POS Invoice should have the field {0} checked.,Kassa Faktura ska ha {} fält vald., +POS Invoices will be consolidated in a background process,Kassa Fakturor kommer att konsolideras i bakgrund process, +POS Invoices will be unconsolidated in a background process,Kassa Fakturor kommer att okonsolideras i bakgrund process, +POS Profile doesn't match {},Kassa Profil matchar inte {}, +POS Profile {} contains Mode of Payment {}. Please remove them to disable this mode.,Kassa Profil {} innehåller Betalning Sätt {}. Ta bort Betalning Sätt för att inaktivera detta läge., +POS Search Fields,Kassa Sök Fält, +POS Setting,Kassa Inställningar, +Package No(s) already in use. Try from Package No {0},Paket Nummer används redan. Prova från Paket Nummer {0} , +Packaging Slip From Delivery Note,Packsedel från Försäljning Följesedel, +Packed Items cannot be transferred internally,Packade artiklar kan inte överföras internt, +Packed Qty,Förpackad Kvantitet, +Page Break After Each SoA,Sidbrytning efter varje SoA, +Paid Amount After Tax,Betald Belopp efter Moms, +Paid Amount After Tax (Company Currency),Betald Belopp efter Moms (Bolag Valuta), +Paid From Account Type,Betald från Konto Typ, +Paid To Account Type,Betald till Konto Typ, +Pallets,Pall, +Parameter Group,Parameter Grupp, +Parameter Group Name,Parameter Grupp Namn, +Parcel Template,Leverans Paket Mall, +Parcel Template Name,Leverans Paket Mall Namn, +Parcel weight cannot be 0,Leverans Paket Vikt får inte vara 0, +Parcels,Paket, +Parent Account Missing,Överordnad Konto Saknas, +Parent Document,Överordnad Dokument, +Parent Item {0} must not be a Fixed Asset,Överordnad Artikel {0} får inte vara Tillgång, +Parent Row No,Överordnad Rad Nummer, +Parent Task {0} is not a Template Task,Överordnad Uppgift {0} är inte Mall Uppgift, +Partial Material Transferred,Delvis Material Överförd, +Partial Stock Reservation,Delvis Lager Reservation, +Partial Success,Delvis Klar, +"Partial stock can be reserved. For example, If you have a Sales Order of 100 units and the Available Stock is 90 units then a Stock Reservation Entry will be created for 90 units. ","Delvis Lager kan reserveras. Till exempel, om du har en försäljning order på 100 enheter och det tillgängliga lagret är 90 enheter kommer lager reservation post att skapas för 90", +Partially Delivered,Delvis Levererad, +Partially Reconciled,Delvis Avstämd, +Partially Reserved,Delvis Reserverad, +Partly Paid,Delvis Betald, +Partly Paid and Discounted,Delvis Betald och Rabatterad, +Partnership,Partner, +Party Account No. (Bank Statement),Parti Konto Nummer (Kontoutdrag), +Party Account {0} currency ({1}) and document currency ({2}) should be same,Parti Konto {0} valuta ({1}) och dokument valuta ({2}) ska vara samma, +Party IBAN (Bank Statement),Parti IBAN (Kontoutdrag), +Party Item Code,Parti Artikel Kod, +Party Link,Parti Länk, +Party Name/Account Holder (Bank Statement),Parti Namn/Kontoinnehavare (Kontoutdrag), +Party Specific Item,Parti Specifik Artikel, +Party Type and Party is required for Receivable / Payable account {0},Parti Typ och Parti erfodras för Fordring / Skuld konto {0}, +Party can only be one of {0},Parti kan endast vara en av {0}, +Passport Details,Passport Detaljer, +Pause Job,Pausa Jobb, +Paused,Pausad, +Payment Amount (Company Currency),Faktura Belopp (Bolag Valuta), +"Payment Entry {0} is linked against Order {1}, check if it should be pulled as advance in this invoice.","Betalning Post {0} är länkad till Order {1}, kontrollera om den ska hämtas som förskott på denna faktura.", +Payment Ledger,Betalning Register, +Payment Ledger Balance,Betalning Register Saldo, +Payment Ledger Entry,Betalning Register Post, +Payment Limit,Betalning Gräns, +Payment Reconciliation Allocation,Betalning Avstämning Tilldelning , +Payment Reconciliation Job: {0} is running for this party. Can't reconcile now.,Betalning Avstämning Jobb: {0} körs för denna parti. Kan inte avstämas nu., +Payment Reconciliations,Betalning Avstämningar, +Payment Request Outstanding,Betalning Begäran Utestående Belopp, +Payment Request created from Sales Order or Purchase Order will be in Draft status. When disabled document will be in unsaved state.,Betalning Begäran som skapas från Försäljning Order eller Inköp Order kommer att få Utkast status. När inaktiverad kommer dokument att vara i osparat tillstånd., +Payment Request is already created,Betalning Begäran är redan skapad, +Payment Request took too long to respond. Please try requesting for payment again.,Betalning Begäran tog för lång tid att svara. Försök att begära betalning igen., +Payment Requests cannot be created against: {0},Betalning Begäran kan inte skapas mot: {0}, +Payment Term Outstanding,Betalningsvillkor Utestående Belopp, +Payment Terms Status for Sales Order,Betalning Villkor Status för Försäljning Order, +Payment Terms from orders will be fetched into the invoices as is,Betalning Villkor från Order hämtas till Faktura som den är, +Payment Unlink Error,Betalning Bortkoppling Fel, +Payment of {0} received successfully.,Betalning på {0} mottagen., +Payment of {0} received successfully. Waiting for other requests to complete...,Betalning på {0} mottagen. Väntar på att andra begäran ska slutföras..., +Payment request failed,Betalning Begäran Misslyckades, +Payment term {0} not used in {1},Betalning Villkor {0} används inte i {1}, +Pending processing,Väntar på bearbetning, +Per Received,Per Mottagen, +Percentage (%),Procent (%), +Percentage you are allowed to order beyond the Blanket Order quantity.,Procentandel tillåten för order utöver Blankoavtal Order Kvantitet., +Percentage you are allowed to sell beyond the Blanket Order quantity.,Procentandel tillåten för försäljning utöver Blankoavtal Order Kvantitet., +Period Closed,Period Stängd, +Period Closing Entry For Current Period,Period Låsning Post för Aktuell Period, +Period Closing Settings,Period Låsning Inställningar, +Period Details,Period Detaljer, +Period To Date,Period Till Datum, +Period_from_date,Period Från Datum, +Phone Ext.,Telefon Anknytning, +Pick List Incomplete,Plocklista Ofullständig, +Pick Manually,Plocka Manuellt, +Pick Serial / Batch Based On,Välj Serie / Parti Baserad På, +Pick Serial / Batch No,Välj Serie / Parti Nummer, +Picked Qty (in Stock UOM),Plockad Kvantitet (Lager Enhet), +Pickup,Hämtning, +Pickup Contact Person,Hämtning Adress Kontakt Person, +Pickup Date,Hämtning Datum, +Pickup Date cannot be before this day,Hämtning Datum kan inte infalla före denna dag, +Pickup From,Hämtning Från, +Pickup To time should be greater than Pickup From time,Hämtning Till Tid ska vara senare än Hämtning Från Tid, +Pickup Type,Hämtning Typ, +Pickup from,Hämtning Från, +Pickup to,Hämtning Till, +Pipeline By,Tratt Efter, +Plaid Link Failed,Plaid Länk Misslyckades, +Plaid Link Refresh Required,Plaid Länk Uppdatering erfordras, +Plaid Link Updated,Plaid Länk Uppdaterad, +Plan to Request Qty,Planerad Kvantitet, +Plant Dashboard,Fabrik Översikt Panel, +Plant Floor,Produktion Yta, +Please Set Priority,Ange Prioritet, +Please Specify Account,Specificera Konto, +Please add 'Supplier' role to user {0}.,"Lägg till Roll ""Leverantör"" till användare {0}.", +Please add Request for Quotation to the sidebar in Portal Settings.,Lägg till Offert Förfråga i sidofält i Portal Inställningar., +Please add Root Account for - {0},Lägg till Överordnad Konto för - {0}, +Please add atleast one Serial No / Batch No,Lägg till minst en Serie Nr / Parti Nr, +Please add the Bank Account column,Lägg till Bank Konto kolumn, +Please add the account to root level Company - {0},Lägg till Konto till Överordnad Bolag - {0}, +Please add {1} role to user {0}.,Lägg till roll {1} till användare {0}., +Please adjust the qty or edit {0} to proceed.,Justera kvantitet eller redigera {0} för att fortsätta., +Please attach CSV file,Bifoga CSV Fil, +Please cancel and amend the Payment Entry,Annullera och ändra Betalning Post, +Please cancel payment entry manually first,Annullera Betalning Post manuellt, +Please cancel related transaction.,Annullera relaterad transaktion., +Please check Process Deferred Accounting {0} and submit manually after resolving errors.,Välj Bearbeta Uppskjuten Bokföring {0} och godkänn manuellt efter att ha löst fel., +Please check either with operations or FG Based Operating Cost.,Välj antingen Med Åtgärder eller Färdig Artikel Baserad Åtgärd Kostnad., +Please check the error message and take necessary actions to fix the error and then restart the reposting again.,Kontrollera felmeddelande och vidta nödvändiga åtgärder för att åtgärda fel och starta sedan ompostning igen., +Please check your email to confirm the appointment,Kontrollera din E-post för att bekräfta Möte, +Please contact any of the following users to extend the credit limits for {0}: {1},Kontakta någon av följande användare för att utöka kredit gränser för {0}: {1}, +Please contact any of the following users to {} this transaction.,Kontakta någon av följande användare för att {} denna transaktion., +Please contact your administrator to extend the credit limits for {0}.,Kontakta administratör för att utöka kredit gränser för {0}., +Please create Landed Cost Vouchers against Invoices that have 'Update Stock' enabled.,"Skapa Landad Kostnad Verifikat mot fakturor som har ""Uppdatera Lager"" aktiverad.", +Please create a new Accounting Dimension if required.,Skapa Bokföring Dimension vid behov., +Please create purchase from internal sale or delivery document itself,Skapa Inköp från intern Försäljning eller Följesedel, +"Please delete Product Bundle {0}, before merging {1} into {2}",Ta bort Artikel Paket {0} innan sammanslagning av {1} med {2}, +Please do not book expense of multiple assets against one single Asset.,Bokför inte kostnader för flera Tillgångar mot enskild Tillgång., +Please enable Use Old Serial / Batch Fields to make_bundle,Aktivera Använd gamla Serie / Parti Fält för att skapa paket, +Please enable only if the understand the effects of enabling this.,Aktivera endast om du förstår effekterna av att aktivera detta., +Please enable {0} in the {1}.,Aktivera {0} i {1}., +Please enable {} in {} to allow same item in multiple rows,Aktivera {} i {} för att tillåta samma Artikel i flera rader, +Please ensure that the {0} account is a Balance Sheet account. You can change the parent account to a Balance Sheet account or select a different account.,Kontrollera att {0} konto är Balans Rapport Konto. Ändra Överordnad Konto till Balans Rapport Konto eller välj annat konto., +Please ensure that the {0} account {1} is a Payable account. You can change the account type to Payable or select a different account.,Kontrollera att {0} konto {1} är Skuld Konto. Ändra Konto Typ till Skuld Konto Typ eller välj ett annat konto., +Please ensure {} account is a Balance Sheet account.,Kontrollera att {} konto är Balans Rapport konto., +Please ensure {} account {} is a Receivable account.,Kontrollera att {} konto {} är fordring konto., +Please enter Root Type for account- {0},Ange Konto Klass för konto {0}, +Please enter Serial Nos,Ange Serie Nummer, +Please enter Shipment Parcel information,Ange Leverans Paket information, +Please enter Stock Items consumed during the Repair.,Ange Artiklar förbrukade under reparation., +Please enter mobile number first.,Ange Mobil Nummer, +Please enter quantity for item {0},Ange Kvantitet för artikel {0}, +Please enter serial nos,Ange Serie Nummer, +"Please first set Last Name, Email and Phone for the user","Ange Efternamn, E-post och Telefon för användare", +Please fix overlapping time slots for {0},Åtgärda överlappande tider för {0}, +Please fix overlapping time slots for {0}.,Åtgärda överlappande tider för {0}, +Please import accounts against parent company or enable {} in company master.,Importera konton mot moderbolag eller aktivera {} i bolag inställningar., +"Please keep one Applicable Charges, when 'Distribute Charges Based On' is 'Distribute Manually'. For more charges, please create another Landed Cost Voucher.","Behåll en Tillämplig Avgift när ""Distribuera avgifter Baserat på"" är ""Distribuera Manuellt"". För fler avgifter, skapa annan Landad Kostnad Verifikat", +Please make sure the file you are using has 'Parent Account' column present in the header.,"Kontrollera att fil har kolumn ""Överordnad Konto"" i rubrik.", +Please mention 'Weight UOM' along with Weight.,"Ange ""Vikt Enhet"" tillsammans med Vikt.", +Please mention the Current and New BOM for replacement.,Ange Aktuell och Ny Stycklista för ersättning., +Please rectify and try again.,Rätta till och försök igen., +Please refresh or reset the Plaid linking of the Bank {}.,Uppdatera eller återställ Plaid Länk för Bank {}., +Please save before proceeding.,Spara innan du fortsätter., +Please select Bank Account,Välj Bank Konto, +Please select Finished Good Item for Service Item {0},Välj Färdig Artikel för Service Artikel {0}, +Please select Serial/Batch Nos to reserve or change Reservation Based On to Qty.,Välj Serie / Parti Nummer att reservera eller ändra Reservation Baserad På Kvantitet., +Please select Subcontracting Order instead of Purchase Order {0},Välj Underleverantör Order istället för Inköp Order {0}, +Please select Unrealized Profit / Loss account or add default Unrealized Profit / Loss account account for company {0},Välj Orealiserad Resultat Konto eller ange standard konto för Orealiserad Resultat Konto för Bolag {0}, +Please select a Subcontracting Purchase Order.,Välj Underleverantörer Inköp Order, +Please select a Warehouse,Välj Lager, +Please select a Work Order first.,Välj Arbetsorder, +Please select a country,Välj Land, +Please select a customer for fetching payments.,Välj Kund för att hämta betalningar., +Please select a date,Välj Datum, +Please select a date and time,Välj Tid och Datum, +Please select a row to create a Reposting Entry,Välj rad att skapa Ompostering Post, +Please select a supplier for fetching payments.,Välj Leverantör för att hämta betalningar., +Please select a valid Purchase Order that has Service Items.,Välj giltig Inköp Order med Service Artiklar., +Please select a valid Purchase Order that is configured for Subcontracting.,Välj giltig Inköp Order som är konfigurerad för Underleverantör., +Please select an item code before setting the warehouse.,Välj Artikel Kod innan du anger Lager., +Please select either the Item or Warehouse or Warehouse Type filter to generate the report.,"Välj antingen Artikel,Lager eller Lager Typ filter att skapa rapport.", +Please select items,Välj Artiklar, +Please select items to reserve.,Välj Artiklar att reservera, +Please select items to unreserve.,Välj Artiklar att reservera, +Please select only one row to create a Reposting Entry,Vänligen välj endast en rad för att skapa Ompostering Post, +Please select rows to create Reposting Entries,Välj rader för att skapa Ompostering Poster, +Please select the required filters,Välj de filter som krävs, +Please select valid document type.,Välj giltig dokument typ., +Please set Account,Ange Konto, +Please set Accounting Dimension {} in {},Ange Bokföring Dimension {} i {}, +Please set Email/Phone for the contact,Ange E-post/Telefon för Kontakt, +Please set Fiscal Code for the customer '%s',"Ange Org.Nr. för Kund ""%s""", +Please set Fiscal Code for the public administration '%s',"Ange Org.Nr. för Offentlig Förvaltning ""%s""", +Please set Fixed Asset Account in {} against {}.,Ange Tillgång Konto i {} mot {}., +Please set Opening Number of Booked Depreciations,Ange Öppning Nummer för Bokförda Avskrivningar, +Please set Parent Row No for item {0},Ange Överordnad Rad Nummer för artikel {0}, +Please set Root Type,Ange Konto Klass, +Please set Tax ID for the customer '%s',Ange Org.Nr. for Kund '%s', +Please set VAT Accounts in {0},Ange Moms Konton i {0}, +"Please set Vat Accounts for Company: ""{0}"" in UAE VAT Settings","Ange Moms Konton för Bolag: ""{0}"" i moms inställningarna i Förenade Arabemirater", +Please set a Cost Center for the Asset or set an Asset Depreciation Cost Center for the Company {},Ange Resultat Enhet för Tillgång eller ange Resultat Enhet för Tillgång Avskrivningar för Bolag {}, +Please set a default Holiday List for Company {0},Ange standard Helg Lista för Bolag {0}, +Please set an Address on the Company '%s',Ange adress för Bolag '%s', +Please set an Expense Account in the Items table,Ange Kostnad konto i Artikel tabell, +Please set default Exchange Gain/Loss Account in Company {},Ange Standard Valutaväxling Resultat Konto för Bolag {}, +Please set default Expense Account in Company {0},Ange Standard Konstnad Konto för Bolag {0}, +Please set default cost of goods sold account in company {0} for booking rounding gain and loss during stock transfer,Ange Standard Kostnad för sålda artiklar i bolag {0} för bokning av avrundning av vinst och förlust under lager överföring, +Please set either the Tax ID or Fiscal Code on Company '%s',"Ange antingen Skatt eller Moms Kod för Bolag ""%s""", +Please set filters,Ange Filter, +Please set one of the following:,Ange något av följande:, +Please set the cost center field in {0} or setup a default Cost Center for the Company.,Ange Resultat Enhet i {0} eller ange Standard Resultat Enhet för Bolag., +Please set {0} in BOM Creator {1},Ange {0} i Stycklista Generator {1}, +Please setup and enable a group account with the Account Type - {0} for the company {1},Konfigurera och aktivera Kontoplan Grupp med Kontoklass {0} för bolag {1}, +Please share this email with your support team so that they can find and fix the issue.,Dela detta e-post meddelande med support så att de kan hitta och åtgärda problem. , +Please specify a {0},Ange {0}, +Please try again in an hour.,Försök igen om en timme., +Please update Repair Status.,Uppdatera Reparation Status., +Portal User,Portal Användare, +Portal Users,Portal Användare, +Posting Datetime,Bokföring Datum och Tid, +Powered by {0},Tillhandahålls av {0}, +"Previous Year is not closed, please close it first","Föregående År är inte stängd, vänligen stäng det", +Price ({0}),Pris ({0}), +Price List Defaults,Prislista Standard, +Price Per Unit ({0}),Pris Per Enhet ({0}), +Primary Address and Contact,Primär Adress & Kontakt, +Primary Contact,Primär Kontakt, +Primary Party,Primär Parti, +Primary Role,Primär Roll, +Print Format Builder,Utskrift Format Redigerare, +Print Style,Utskrift Stil, +Printing,Utskrift, +Priority cannot be lesser than 1.,Prioritet får inte vara mindre än 1., +Priority is mandatory,Parti Erfodras , +Probability,Sannolikhet, +Process Loss,Process Förlust, +Process Loss Percentage cannot be greater than 100,Process Förlust i Procent får inte vara större än 100 , +Process Loss Qty,Process Förlust Kvantitet, +Process Loss Report,Process Förlust Rapport, +Process Loss Value,Process Förlust Värde, +Process Payment Reconciliation,Betalning Avstämning Bearbetning, +Process Payment Reconciliation Log,Betalning Avstämning Bearbetning Logg, +Process Payment Reconciliation Log Allocations,Betalning Avstämning Bearbetning Logg Tilldelningar, +Process Subscription,Behandla Prenumeration, +Process in Single Transaction,Process i Singel Transaktion, +Processed BOMs,Behandlade Stycklistor, +Processing Sales! Please Wait...,Behandlar Försäljning!Vänlige Vänta..., +Produced / Received Qty,Producerad / Mottagen Kvantitet, +Product Price ID,Artikel Pris, +Production Plan Already Submitted,Produktion Plan Redan Godkänd, +Production Plan Item Reference,Produktion Plan Post Referens, +Production Plan Qty,Produktion Plan Kvantitet, +Production Plan Sub Assembly Item,Produktion Plan Delmontering Artikel, +Production Plan Sub-assembly Item,Produktion Plan Delmontering Artikel, +Production Plan Summary,Produktion Plan Översikt, +Profile,Profil, +Profit and Loss Summary,Resultat Rapport Översikt, +Progress,Framsteg, +Progress (%),Framsteg(%), +Project Progress:,Projekt Framsteg:, +Prompt Qty,Fråga efter Kvantitet, +Prospect,Prospekt, +Prospect Lead,Prospekt Potentiell Kund, +Prospect Opportunity,Prospekt Möjlighet, +Prospect Owner,Prospekt Ansvarig, +Prospect {0} already exists,Prospekt {0} finns redan, +Provisional Account,Provisoriskt Konto, +Provisional Expense Account,Provisorisk Kostnad Konto, +Purchase Order Item reference is missing in Subcontracting Receipt {0},Inköp Order Artikel Referens saknas på Underleverantör Följesedel {0}, +Purchase Orders {0} are un-linked,Inköp Ordrar {0} är inte länkade, +Purchase Receipt (Draft) will be auto-created on submission of Subcontracting Receipt.,Inköp Följesedel (utkast) kommer att skapas automatiskt vid godkännande av Underleverantör Följesedel., +Purchase Receipt {0} created.,Inköp Följesedel {0} skapad, +Purchase Value,Inköp Värde, +Purchases,Inköp, +Purposes Required,Anledning Erfodras, +Putaway Rule,Lägg Undan Regel, +Putaway Rule already exists for Item {0} in Warehouse {1}.,Lägg Undan Regel finns redan för Artikel {0} i Lager {1}., +Qty ,Kvantitet, +Qty After Transaction,Kvantitet efter Transaktion, +Qty As Per BOM,Kvantitet per Stycklista, +Qty Change,Kvantitet Förändring, +Qty In Stock,Kvantitet i Lager, +Qty Per Unit,Kvantitet per Enhet, +"Qty To Manufacture ({0}) cannot be a fraction for the UOM {2}. To allow this, disable '{1}' in the UOM {2}.","Kvantitet att Producera ({0}) kan inte vara bråkdel för enhet {2}. För att tillåta detta, inaktivera '{1}' i enhet {2}.", +Qty To Produce,Kvantitet att Producera, +Qty and Rate,Kvantitet och Pris, +Qty as Per Stock UOM,Kvantitet per Lager Enhet, +Qty for which recursion isn't applicable.,Kvantitet för vilket rekursion inte är tillämplig., +Qty in Stock UOM,Kvantitet i Lager Enhet, +Qty of Finished Goods Item should be greater than 0.,Kvantitet Färdiga Artiklar ska vara högre än 0., +Qty to Be Consumed,Kvantitet att Förbruka, +Qty to Build,Kvantitet att Producera, +Qty to Fetch,Kvantitet att Hämta, +Qty to Produce,Kvantitet att Producera, +Qualification Status,Kvalificering Status, +Qualified,Kvalificerad, +Qualified By,Kvalificerad Av, +Qualified on,Kvalificerad(Datum), +Quality Inspection Parameter,Kvalitet Kontroll Parameter, +Quality Inspection Parameter Group,Kvalitet Kontroll Parametrar Grupp, +Quality Inspection Settings,Kvalitet Kontroll Inställningar, +Quality Inspection(s),Kvalitet Kontroll, +Quantity is required,Kvantitet erfodras, +"Quantity must be greater than zero, and less or equal to {0}",Kvantitet måste vara större än noll och mindre eller lika med {0}, +Quantity to Produce should be greater than zero.,Kvantitet att producera ska vara högre än noll., +Quantity to Scan,Kvantitet att Skanna, +Quarter {0} {1},Kvartal {0} {1}, +Quotation Number,Försäljning Offert Nummer, +Quoted Amount,Offererad Belopp, +Rate Difference with Purchase Invoice,Pris Differens mot Inköp Faktura, +Rate Section,Pris, +Rate of Stock UOM,Pris av Lager Enhet, +Ratios,Förhållanden, +Raw Material Cost Per Qty,Råmaterial Kostnad per Kvantitet, +Raw Material Item,Råmaterial Artikel, +Raw Material Value,Råmaterial Värde, +Raw Materials Actions,Råmaterial Åtgärder, +Raw Materials Consumption ,Råmaterial Förbrukning , +Raw Materials Warehouse,Råmaterial Lager, +Reached Root,Nått Rot, +Reading Value,Avläst Värde, +Reason for hold:,Anledning för Spärr:, +Rebuild Tree,Bygg om Träd, +Rebuilding BTree for period ...,Bygger om BTree för period ..., +Recalculate Incoming/Outgoing Rate,Räkna om In/Ut Pris, +Recalculating Purchase Cost against this Project...,Räkna om Inköp Kostnad mot detta Projekt..., +Receivable/Payable Account,Fordring / Skuld Konto, +Receivable/Payable Account: {0} doesn't belong to company {1},Fordring / Skuld Konto: {0} tillhör inte bolag {1}, +Received Amount After Tax,Mottaget Belopp Efter Moms, +Received Amount After Tax (Company Currency),Mottaget Belopp Efter Moms (Bolag Valuta), +Received Amount cannot be greater than Paid Amount,Mottaget Belopp kan inte vara högre än Betald Belopp, +Received Qty in Stock UOM,Mottagen Kvantitet (per Lager Enhet), +Recent Orders,Senaste Ordrar, +Recent Transactions,Senaste Transaktioner, +Reconcile All Serial Nos / Batches,Stäm av alla Serie Nummer / Partier, +Reconcile on Advance Payment Date,Stäm av på Förskott Betalning Datum, +Reconcile the Bank Transaction,Avstäm Bank Transaktion, +Reconciled Entries,Avstämda Poster, +Reconciliation Error Log,Avstämning Fel Logg, +Reconciliation Logs,Avstämning Logg, +Reconciliation Progress,Avstämning Framsteg, +Recording HTML,Inspelning HTML, +Recoverable Standard Rated expenses should not be set when Reverse Charge Applicable is Y,Återställbara Standard Klassade Kostnader ska inte anges när Omvänd Debitering är Ja, +Recurse Every (As Per Transaction UOM),Rekurs Varje (per Transaktion Enhet), +Recurse Over Qty cannot be less than 0,Rekurs Över Kvantitet får inte vara mindre än 0, +Recursive Discounts with Mixed condition is not supported by the system,Rekursiva Rabatter med Blandat Villkor stöds inte av system, +Reference Date for Early Payment Discount,Referens Datum för Tidig Betalning Rabatt, +Reference Detail,Referens Detalj, +Reference DocType,Referens DocType, +Reference Exchange Rate,Referens Växel Kurs, +Reference No,Referens Nummer. , +Reference number of the invoice from the previous system,Referens Nummer på Faktura från tidigare system, +References to Sales Invoices are Incomplete,Referenser till Försäljning Fakturor är ofullständiga, +References to Sales Orders are Incomplete,Referenser till Försäljning Ordrar är ofullständiga, +References {0} of type {1} had no outstanding amount left before submitting the Payment Entry. Now they have a negative outstanding amount.,Referenser {0} av typ {1} hade inget utestående belopp kvar innan godkännande av Betalning Post. Nu har de negativ utestående belopp., +Refresh Google Sheet,Uppdatera Google Sheet, +Refresh Plaid Link,Uppdatera Plaid Länk, +Regenerate Closing Stock Balance,Återskapa Stängning Lager Saldo, +Rejected Serial and Batch Bundle,Avvisad Serie och Parti Paket, +Rejected Warehouse and Accepted Warehouse cannot be same.,Avvisad lager och Accepterad lager kan inte vara samma., +Remarks Column Length,Anmärkningar Kolumn Bredd, +Remove Parent Row No in Items Table,Ta bort Överordnad Radnummer i Artikel Tabell, +Repair,Reparera, +Repair Asset,Reparera Tillgång, +Repair Details,Reparation Detaljer, +"Replace a particular BOM in all other BOMs where it is used. It will replace the old BOM link, update cost and regenerate ""BOM Explosion Item"" table as per new BOM. +It also updates latest price in all the BOMs.","Ersätt stycklista i alla andra stycklistor där den används. Den kommer att ersätta gamla stycklista länk, uppdatera kostnaden och regenerera tabell ""Stycklista Utvidgad Artikel"" enligt ny stycklista. +Den uppdaterar också senaste pris i alla stycklistor.", +Report Error,Rapport Fel, +Report Filters,Rapport Sortering, +Report View,Rapport Vy, +Repost Accounting Ledger,Posta om Bokföring Register, +Repost Accounting Ledger Items,Posta om Bokföring Register Poster, +Repost Accounting Ledger Settings,Posta om Bokföring Register Poster Inställningar, +Repost Allowed Types,Posta om Tillåtna Typer, +Repost Error Log,Posta om Fel Logg, +Repost Item Valuation,Posta om Artikel Värdering, +Repost Payment Ledger,Posta om Betalning Register, +Repost Payment Ledger Items,Posta om Betalning Register Poster, +Repost has started in the background,Repost startad i bakgrund, +Repost in background,Repost i bakgrund, +Repost started in the background,Repost startad i bakgrund, +Reposting Completed {0}%,Repostering Klar {0}%, +Reposting Data File,Repostering av Data Fil, +Reposting Info,Repostering Info, +Reposting Progress,Repostering Framsteg, +Reposting entries created: {0},Repostering Poster skapade: {0}, +Reposting has been started in the background.,Repostering startad i bakgrund, +Reposting in the background.,Repostering i bakgrund, +Represents a Financial Year. All accounting entries and other major transactions are tracked against the Fiscal Year.,Representerar ett bokföringsår. Alla bokföringsposter och andra större transaktioner spåras mot bokföringsår., +Request Parameters,Begäran Parametrar, +Request Timeout,Begäran Löpte Ut, +Reservation Based On,Reservation Baserad På, +Reserve,Reservera, +Reserve Stock,Reservera, +"Reserved Qty ({0}) cannot be a fraction. To allow this, disable '{1}' in UOM {3}.","Reserverat Kvantitet ({0}) kan inte vara bråkdel. För att tillåta detta, inaktivera '{1}' i Enhet {3}.", +Reserved Qty for Production Plan,Reserverad Kvantitet för Produktion Plan, +Reserved Qty for Subcontract,Reserverad Kvantitet för Underleverantör, +Reserved Qty should be greater than Delivered Qty.,Reserverad Kvantitet ska vara högre än Levererad Kvantitet., +Reserved Serial No.,Reserverad Serie Nummer, +Reserved Stock,Reserverad, +Reserved Stock for Batch,Reserverad för Parti, +Reserved for POS Transactions,Reserverad för Kassa, +Reserved for Production,Reserverad för Produktion, +Reserved for Production Plan,Reserverad för Produktion Plan, +Reserved for Sub Contracting,Reserverad för Underleverantör, +Reserving Stock...,Reserverar...., +Reset Company Default Values,Återställ Bolag Standard Värde, +Reset Plaid Link,Återställ Plaid Länk, +Reset Raw Materials Table,Återställ Råmaterial Tabell, +Resolution Due,Beslut om, +Response and Resolution,Svar och Lösning, +Restart,Starta om, +Restore Asset,Återställ Tillgång, +Restrict,Begränsa, +Restrict Items Based On,Begränsa Artiklar Baserat På, +Result Key,Resultat Nyckel, +Resume Job,Återuppta Jobb, +Retried,Försökte igen, +Retry,Försök igen, +Retry Failed Transactions,Försök igen med Misslyckade Transaktioner, +Return Against,Retur Mot, +Return Against Subcontracting Receipt,Retur mot Underleverantör Följesedel, +Return Components,Returnera Komponenter, +Return Issued,Retur Utfärdad, +Return Qty,Retur Kvantitet, +Return Qty from Rejected Warehouse,Retur Kvantitet från Avvisad Lager, +Return of Components,Retur av Komponenter, +Returned,Retur, +Returned Against,Returnerad Mot, +Returned Qty ,Retur Kvantitet, +Returned Qty in Stock UOM,Retur Kvantitet (per Lager Enhet), +Returned exchange rate is neither integer not float.,Returnerad växelkurs är varken heltal eller flyttal., +Revaluation Journals,Omvärdering Journaler, +Revaluation Surplus,Omvärdering Överskott, +Revenue,Intäkt, +Reversal Of,Återföring Av, +Right Child,Höger Underordnad, +Role Allowed to Create/Edit Back-dated Transactions,Roll Godkänd att Skapa/Redigera Bakdaterade Transaktioner, +Role Allowed to Over Bill ,Roll Godkänd att Överfakturera, +Role Allowed to Over Deliver/Receive,Roll Godkänd att Över Leverera/Ta Emot, +Role Allowed to Override Stop Action,Roll Godkänd att Åsidosätta Stopp Åtgärd, +Role allowed to bypass Credit Limit,Roll Godkänd att Åsidosätta Kredit Gräns, +Root,Klass, +"Root Type for {0} must be one of the Asset, Liability, Income, Expense and Equity","Konto Klass för {0} måste vara en av följande klasser: Tillgång, Skuld, Intäkt, Kostnad och Eget Kapital", +Round Free Qty,Avrunda Gratis Kvantitet, +Round Off Tax Amount,Avrunda Moms Belopp, +Round Tax Amount Row-wise,Avrunda Moms Belopp per Artikelrad, +Rounding Loss Allowance,Avrundning Förlust Tillåtelse, +Rounding Loss Allowance should be between 0 and 1,Avrundning Förlust Tillåtelse ska vara mellan 0 och 1, +Rounding gain/loss Entry for Stock Transfer,Avrundning Resultat Post för Lager Överföring, +Row #,Rad #, +Row # {0}:,Rad # {0}:, +Row #{0}: A reorder entry already exists for warehouse {1} with reorder type {2}.,Rad # {0}: Återbeställning Post finns redan för lager {1} med återbeställning typ {2}., +Row #{0}: Acceptance Criteria Formula is incorrect.,Rad # {0}: Godkännande Villkor Formel är felaktig., +Row #{0}: Acceptance Criteria Formula is required.,Rad # {0}: Godkännande Villkor Formel erfodras., +Row #{0}: Accepted Warehouse and Rejected Warehouse cannot be same,Rad # {0}: Godkänd Lager och Avvisat Lager kan inte vara samma, +Row #{0}: Accepted Warehouse is mandatory for the accepted Item {1},Rad # {0}: Godkänd Lager erfodras för godkänd Artikel {1}, +Row #{0}: Allocated Amount cannot be greater than Outstanding Amount of Payment Request {1},Rad #{0}: Tilldelad belopp kan inte vara högre än utestående belopp för betalning begäran {1}, +Row #{0}: Allocated amount:{1} is greater than outstanding amount:{2} for Payment Term {3},Rad # {0}: Tilldela belopp:{1} är högre än utestående belopp:{2} för Betalning Villkor {3}, +Row #{0}: Amount must be a positive number,Rad # {0}: Belopp måste vara positiv tal, +Row #{0}: BOM is not specified for subcontracting item {0},Rad # {0}: Stycklista är inte specificerad för Underleverantör Artikel {0}, +Row #{0}: Batch No {1} is already selected.,Rad # {0}: Parti Nummer {1} är redan vald., +Row #{0}: Cannot allocate more than {1} against payment term {2},Rad # {0}: Kan inte tilldela mer än {1} mot betalning villkor {2}, +Row #{0}: Cannot transfer more than Required Qty {1} for Item {2} against Job Card {3},Rad # {0}: Kan inte överföra mer än Erforderlig Kvantitet {1} för Artikel {2} mot Jobbkort {3}, +Row #{0}: Consumed Asset {1} cannot be Draft,Rad # {0}: Förbrukad Tillgång {1} kan inte vara Utkast, +Row #{0}: Consumed Asset {1} cannot be cancelled,Rad # {0}: Förbrukad tillgång {1} kan inte annulleras, +Row #{0}: Consumed Asset {1} cannot be the same as the Target Asset,Rad # {0}: Förbrukad Tillgång {1} kan inte vara samma som Mål Tillgång, +Row #{0}: Consumed Asset {1} cannot be {2},Rad # {0}: Förbrukad Tillgång {1} kan inte vara {2}, +Row #{0}: Consumed Asset {1} does not belong to company {2},Rad # {0}: Förbrukad Tillgång {1} tillhör inte Bolag {2}, +Row #{0}: Cumulative threshold cannot be less than Single Transaction threshold,Rad # {0}: Kumulativ tröskel får inte vara lägre än Enskild Transaktion tröskel, +Row #{0}: Dates overlapping with other row,Rad # {0}: Datum överlappar andra rad , +Row #{0}: Default BOM not found for FG Item {1},Rad # {0}: Standard Stycklista hittades inte för Färdig Artikel {1} , +Row #{0}: Expense Account not set for the Item {1}. {2},Rad # {0}: Kostnad Konto inte angiven för Artikel {1}. {2}, +Row #{0}: Finished Good Item Qty can not be zero,Rad # {0}: Färdig Artikel Kvantitet kan inte vara noll, +Row #{0}: Finished Good Item is not specified for service item {1},Rad # {0}: Färdig Artikel är inte specificerad för Service Artikel {1} , +Row #{0}: Finished Good Item {1} must be a sub-contracted item,Rad # {0}: Färdig Artikel {1} måste vara Underleverantör Artikel , +Row #{0}: Finished Good reference is mandatory for Scrap Item {1}.,Rad # {0}: Färdig Artikel referens erfodras för Rest Artikel {1}. , +Row #{0}: For {1} Clearance date {2} cannot be before Cheque Date {3},Rad #{0}: För {1} Avstämning datum {2} kan inte vara före Check Datum {3}, +"Row #{0}: For {1}, you can select reference document only if account gets credited",Rad # {0}: För {1} kan du välja referens dokument endast om konto krediteras, +"Row #{0}: For {1}, you can select reference document only if account gets debited",Rad # {0}: För {1} kan du välja referens dokument endast om konto debiteras, +Row #{0}: From Date cannot be before To Date,Rad # {0}: Från Datum kan inte vara före Till Datum, +Row #{0}: Item {1} does not exist,Rad # {0}: Artikel {1} finns inte, +"Row #{0}: Item {1} has been picked, please reserve stock from the Pick List.","Rad # {0}: Artikel {1} är plockad, reservera lager från Plocklista. ", +Row #{0}: Item {1} is not a service item,Rad # {0}: Artikel {1} är inte service artikel, +Row #{0}: Item {1} is not a stock item,Rad # {0}: Artikel {1} är inte service artikel, +Row #{0}: Only {1} available to reserve for the Item {2},Rad # {0}: Endast {1} tillgänglig att reservera för artikel {2} , +Row #{0}: Please select Item Code in Assembly Items,Rad # {0}: Välj Artikel Kod för Montering Artiklar, +Row #{0}: Please select the BOM No in Assembly Items,Rad # {0}: Välj Stycklista Nummer för Montering Artiklar, +Row #{0}: Please select the Sub Assembly Warehouse,Rad # {0}: Välj Undermontering Lager, +Row #{0}: Please update deferred revenue/expense account in item row or default account in company master,Rad # {0}: Uppdatera konto för uppskjutna intäkter/kostnader i artikel rad eller standard konto i bolag, +Row #{0}: Qty increased by {1},Rad # {0}: Kvantitet ökade med {1}, +Row #{0}: Qty must be a positive number,Rad # {0}: Kvantitet måste vara psitivt tal, +Row #{0}: Qty should be less than or equal to Available Qty to Reserve (Actual Qty - Reserved Qty) {1} for Iem {2} against Batch {3} in Warehouse {4}.,Rad # {0}: Kvantitet ska vara mindre än eller lika med tillgänglig kvantitet att reservera (verklig antal - reserverad antal) {1} för artikel {2} mot parti {3} i lager {4}., +Row #{0}: Quantity to reserve for the Item {1} should be greater than 0.,Rad # {0}: Kvantitet att reservera för Artikel {1} ska vara högre än 0., +Row #{0}: Rate must be same as {1}: {2} ({3} / {4}),Rad #{0}: Pris måste vara samma som {1}: {2} ({3} / {4}) , +Row #{0}: Received Qty must be equal to Accepted + Rejected Qty for Item {1},Rad #{0}: Mottaget Kvantitet måste vara lika med Godkänd + Avvisad Kvantitet för Artikel {1}, +Row #{0}: Rejected Qty cannot be set for Scrap Item {1}.,Rad # {0}: Avvisad Kvantitet kan inte anges för Rest Artikel {1}., +Row #{0}: Rejected Warehouse is mandatory for the rejected Item {1},Rad # {0}: Avvisad Lager erfodras för avvisad Artikel {1}, +Row #{0}: Scrap Item Qty cannot be zero,Rad # {0}: Rest Artikel Kvantitet kan inte vara noll, +"Row #{0}: Selling rate for item {1} is lower than its {2}. + Selling {3} should be atleast {4}.

Alternatively, + you can disable selling price validation in {5} to bypass + this validation.","Rad # {0}: Försäljning Pris för artikel {1} är lägre än {2}. + Försäljning Pris {3} ska vara minst {4}.

Alternativt, + kan man inaktivera validering av försäljning pris i {5} för att kringgå + denna validering.", +Row #{0}: Serial No {1} for Item {2} is not available in {3} {4} or might be reserved in another {5}.,Rad # {0}: Serie Nummer {1} för artikel {2} är inte tillgänglig i {3} {4} eller kan vara reserverad i annan {5}., +Row #{0}: Serial No {1} is already selected.,Rad # {0}: Serie Nummer {1} är redan vald., +Row #{0}: Start Time and End Time are required,Rad # {0}: Från Tid och till Tid erfodras. , +Row #{0}: Start Time must be before End Time,Rad # {0}: Från Tid måste vara före till Tid , +Row #{0}: Status is mandatory,Rad # {0}: Status erfodras, +Row #{0}: Stock cannot be reserved for Item {1} against a disabled Batch {2}.,Rad # {0}: Lager kan inte reserveras för artikel {1} mot inaktiverad Parti {2}., +Row #{0}: Stock cannot be reserved for a non-stock Item {1},Rad # {0}: Lager kan inte reserveras för artikel som inte finns i lager {1}, +Row #{0}: Stock cannot be reserved in group warehouse {1}.,Rad # {0}: Lager kan inte reserveras i Grupp Lager {1}., +Row #{0}: Stock is already reserved for the Item {1}.,Rad # {0}: Lager är redan reserverad för artikel {1}., +Row #{0}: Stock is reserved for item {1} in warehouse {2}.,Rad # {0}: Lager är reserverad för artikel {1} i lager {2}., +Row #{0}: Stock not available to reserve for Item {1} against Batch {2} in Warehouse {3}.,Rad # {0}: Lager är inte tillgänglig att reservera för artikel {1} mot Parti {2} i Lager {3}., +Row #{0}: Stock not available to reserve for the Item {1} in Warehouse {2}.,Rad # {0}: Kvantitet ej tillgänglig för reservation för Artikel {1} på {2} Lager., +Row #{0}: The warehouse {1} is not a child warehouse of a group warehouse {2},Rad # {0}: Lager {1} är inte underordnad till grupp lager {2}, +Row #{0}: You cannot use the inventory dimension '{1}' in Stock Reconciliation to modify the quantity or valuation rate. Stock reconciliation with inventory dimensions is intended solely for performing opening entries.,Rad # {0}: Man kan inte använda Lager Dimension '{1}' i Lager Avstämning för att ändra kvantitet eller Grund Pris. Lager Avstämning med Lager Dimensioner är endast avsedd för att utföra öppningsposter., +Row #{0}: You must select an Asset for Item {1}.,Rad # {0}: Du måste välja Tillgång för Artikel {1}., +Row #{0}: {1} is not a valid reading field. Please refer to the field description.,Rad #{0}: {1} är inte giltigt läsfält. Se fält beskrivning., +Row #{0}: {1} of {2} should be {3}. Please update the {1} or select a different account.,Rad # {0}: {1} av {2} ska vara {3}. Uppdatera {1} eller välj ett annat konto., +Row #{1}: Warehouse is mandatory for stock Item {0},Rad # {1}: Lager erfodras för lager artikel {0} , +Row #{}: Finance Book should not be empty since you're using multiple.,Rad # {}: Finans Register ska inte vara tom eftersom du använder flera., +Row #{}: Please use a different Finance Book.,Rad # {}: Använd annan Finans Register., +Row #{}: The original Invoice {} of return invoice {} is not consolidated.,Rad #{}: Ursprunglig Faktura {} för Retur Faktura {} är inte konsoliderad., +Row #{}: item {} has been picked already.,Rad # {}: Artikel {} är redan plockad., +Row #{}: {} {} doesn't belong to Company {}. Please select valid {}.,Rad # {}: {} {} tillhör inte bolag {}. Välj giltig {}., +Row No {0}: Warehouse is required. Please set a Default Warehouse for Item {1} and Company {2},Rad # {0}: Lager erfodras. Ange Standard Lager för Artikel {1} och Bolag {2}, +Row Number,Rad Nummer, +Row {0},Rad {0}, +"Row {0} picked quantity is less than the required quantity, additional {1} {2} required.","Rad # {0}: Plockad kvantitet är lägre än erfodrad kvantitet, ytterligare {1} {2} erfodras.", +Row {0}# Item {1} cannot be transferred more than {2} against {3} {4},Rad # {0}: Artikel {1} kan inte överföras mer än {2} mot {3} {4}, +Row {0}# Item {1} not found in 'Raw Materials Supplied' table in {2} {3},"Rad # {0}: Artikel {1} hittades inte i tabellen ""Råmaterial Levererad"" i {2} {3}", +Row {0}: Accepted Qty and Rejected Qty can't be zero at the same time.,Rad # {0}: Godkänd Kvantitet och Avvisad Kvantitet kan inte vara noll samtidigt., +Row {0}: Account {1} and Party Type {2} have different account types,Rad # {0}: Konto {1} och Parti Typ {2} har olika konto typer, +Row {0}: Allocated amount {1} must be less than or equal to invoice outstanding amount {2},Rad # {0}: Tilldelad belopp {1} måste vara lägre än eller lika med utestående faktura belopp {2}, +Row {0}: Allocated amount {1} must be less than or equal to remaining payment amount {2},Rad # {0}: Tilldelad belopp {1} måste vara lägre än eller lika med återstående betalning belopp {2}, +"Row {0}: As {1} is enabled, raw materials cannot be added to {2} entry. Use {3} entry to consume raw materials.",Rad {0}: Eftersom {1} är aktiverat kan råmaterial inte läggas till {2} post. Använd {3} post för att förbruka råmaterial., +Row {0}: Both Debit and Credit values cannot be zero,Rad # {0}: Både debet och kredit värdena kan inte vara noll, +Row {0}: Cost Center {1} does not belong to Company {2},Rad # {0}: Resultat Enhet {1} tillhör inte Bolag {2}, +Row {0}: Either Delivery Note Item or Packed Item reference is mandatory.,Rad # {0}: Antingen Följesedel eller Packad Artikel Referens erfordras, +Row {0}: Expense Head changed to {1} as no Purchase Receipt is created against Item {2}.,Rad # {0}: Kostnad har ändrats till {1} eftersom inget Inköp Följesedel är skapad mot Artikel {2}., +Row {0}: Expense Head changed to {1} because account {2} is not linked to warehouse {3} or it is not the default inventory account,Rad # {0}: Kostnad har ändrats till {1} eftersom konto {2} inte är länkat till lager {3} eller det inte är standard konto för lager, +Row {0}: Expense Head changed to {1} because expense is booked against this account in Purchase Receipt {2},Rad # {0}: Kostnad har ändrats till {1} eftersom kostnad bokförs mot detta konto i Inköp Följesedel {2}, +Row {0}: From Warehouse is mandatory for internal transfers,Rad # {0}: Från Lager erfodras för interna överföringar, +Row {0}: Item Tax template updated as per validity and rate applied,Rad # {0}: Artikel Moms Mall uppdaterad enligt giltighet och tillämpad moms sats, +Row {0}: Item rate has been updated as per valuation rate since its an internal stock transfer,Rad # {0}: Artikel Pris är uppdaterad enligt Grund Pris eftersom det är intern lager överföring, +Row {0}: Item {1} must be a stock item.,Rad # {0}: Artikel {1} måste vara lager artikel., +Row {0}: Item {1} must be a subcontracted item.,Rad # {0}: Artikel {1} måste vara Underleverantör Artikel., +Row {0}: Packed Qty must be equal to {1} Qty.,Rad # {0}: Packad Kvantitet måste vara lika med {1} Kvantitet., +Row {0}: Packing Slip is already created for Item {1}.,Rad # {0}: Packsedel är redan skapad för Artikel {1}., +Row {0}: Payment Term is mandatory,Rad # {0}: Betalning Villkor Erfodras, +Row {0}: Please provide a valid Delivery Note Item or Packed Item reference.,Rad # {0}: Ange giltig referens för Försäljning Följesedel eller Packsedel., +Row {0}: Please select a BOM for Item {1}.,Rad # {0}: Välj Stycklista för Artikel {1}., +Row {0}: Please select an active BOM for Item {1}.,Rad # {0}: Välj aktiv Stycklista för Artikel {1}., +Row {0}: Please select an valid BOM for Item {1}.,Rad # {0}: Välj giltig Stycklista för Artikel {1}, +Row {0}: Project must be same as the one set in the Timesheet: {1}.,Rad # {0}: Projekt måste vara samma som är angiven i tidrapport: {1}., +Row {0}: Purchase Invoice {1} has no stock impact.,Rad # {0}: Inköp Faktura {1} har ingen efekt på lager., +Row {0}: Qty cannot be greater than {1} for the Item {2}.,Rad # {0}: Kvantitet får inte vara högre än {1} för Artikel {2}., +Row {0}: Qty in Stock UOM can not be zero.,Rad # {0}: Kvantitet i Lager Enhet kan inte vara noll., +Row {0}: Qty must be greater than 0.,Rad # {0}: Kvantitet måste vara högre än 0., +Row {0}: Shift cannot be changed since the depreciation has already been processed,Rad # {0}: Förskjutning inte ändras eftersom avskrivning redan är behandlad, +Row {0}: Target Warehouse is mandatory for internal transfers,Rad # {0}: Till Lager erfodras för interna överföringar, +"Row {0}: To set {1} periodicity, difference between from and to date must be greater than or equal to {2}",Rad # {0}: För att ange periodicitet för {1} måste skillnaden mellan från och till datum vara större än eller lika med {2}, +Row {0}: Total Number of Depreciations cannot be less than or equal to Opening Number of Booked Depreciations,Rad # {0}: Totalt Antal Avskrivningar får inte vara mindre än eller lika med antal bokförda avskrivningar, +Row {0}: {1} account already applied for Accounting Dimension {2},Rad # {0}: {1} konto är redan tillämpad för Bokföring Dimension {2}, +Row {0}: {1} {2} cannot be same as {3} (Party Account) {4},Rad # {0}: {1} {2} kan inte vara samma som {3} (Parti Konto) {4}, +Row {0}: {2} Item {1} does not exist in {2} {3},Rad # {0}: {2} Artikel {1} finns inte i {2} {3}, +Row({0}): Outstanding Amount cannot be greater than actual Outstanding Amount {1} in {2},Rad # ({0}): Utestående belopp kan inte vara högre än verklig utestående belopp {1} i {2}, +Rows with Same Account heads will be merged on Ledger,Rader med samma Konto Poster kommer slås samman i Bokföring Register, +Rows: {0} have 'Payment Entry' as reference_type. This should not be set manually.,"Rader: {0} har ""Betalning Post"" som referens typ. Detta ska inte anges manuellt.", +Rows: {0} in {1} section are Invalid. Reference Name should point to a valid Payment Entry or Journal Entry.,Rader: {0} i sektion {1} är ogiltiga. Referens namn ska peka på giltig Betalning Post eller Journal Post, +Run parallel job cards in a workstation,Kör parallella jobbkort på arbetsplats, +Running,Behandlar, +SCO Supplied Item,Underleverantör Levererad Artikel, +SLA Fulfilled On,Service Nivå Avtal Uppfylld , +SLA Fulfilled On Status,Service Nivå Avtal Uppfylld Status, +SLA Paused On,Service Nivå Avtal Pausad, +SLA will be applied if {1} is set as {2}{3},"Service Nivå Avtal kommer att tillämpas om {1} är angiven som {2}{3} +​", +SLA will be applied on every {0},Service Nivå Avtal kommer att tillämpas varje {0}, +SMS Settings,SMS Inställningar, +SO Total Qty,Försäljning Order Totalt Kvantitet, +Salary Currency,Lön Valuta, +Sales Incoming Rate,Inkommande Försäljning Pris, +Sales Invoice {0} must be deleted before cancelling this Sales Order,Försäljning Faktura {0} måste annulleras innan annullering av denna Försäljning Order, +Sales Order Packed Item,Försäljning Order Packad Artikel, +Sales Order Reference,Försäljning Order Referens, +Sales Order Status,Försäljning Order Status, +"Sales Order {0} already exists against Customer's Purchase Order {1}. To allow multiple Sales Orders, Enable {2} in {3}","Försäljning Order {0} finns redan mot Kund Inköp Order {1}. För att tillåta flera Försäljning Ordrar, aktivera {2} i {3}", +Sales Partner ,Försäljning Partner, +Sales Partner Item,Försäljning Partner Artikel, +Sales Partner Target Variance Based On Item Group,Artikel Grupp Mål Avvikelse per Försäljning Partner, +Sales Pipeline Analytics,Försäljning Analys, +Sales Update Frequency in Company and Project,Försäljning Uppdatering Intervall, +Sales Value,Försäljning Värde, +Salvage Value Percentage,Procentuellt Rest Värde, +Same item and warehouse combination already entered.,Samma artikel och lager kombination är redan angivna., +Savings,Besparingar, +Scan Batch No,Skanna Parti Nummer, +Scan Mode,Skanning Läge, +Scan Serial No,Skanna Serie Nummer, +Scan barcode for item {0},Skanna Streckkod för artikel {0}, +"Scan mode enabled, existing quantity will not be fetched.","Skanning Läge aktiverad, befintlig kvantitet kommer inte att hämtas.", +Scanned Quantity,Skannad Kvantitet, +Scheduled Time Logs,Schemalagda Tidsloggar, +Scheduler is Inactive. Can't trigger job now.,Schemaläggare är inaktiv. Kan inte starta jobb nu., +Scheduler is Inactive. Can't trigger jobs now.,Schemaläggare är inaktiv. Kan inte starta jobb nu., +Scheduler is inactive. Cannot enqueue job.,Schemaläggare är inaktiv. Kan inte placera jobb i kö., +Scheduler is inactive. Cannot merge accounts.,Schemaläggare är inaktiv. Kan inte slå samman konton., +Scheduling,Schemaläggning, +"Scorecard variables can be used, as well as: +{total_score} (the total score from that period), +{period_number} (the number of periods to present day) +","Resultatkort variabler kan användas, såväl som: +{total_score} (totalt resultat från detta period), +{period_number} (antal intervall tills nu) +", +Scrap & Process Loss,Rest & Bearbetning Förlust, +Scrap Asset,Rest Tillgång, +Scrap Cost Per Qty,Rest Kostnad per Kvantitet, +Scrap Item Code,Rest Artikel Kod, +Scrap Item Name,Rest Artikel Namn, +"Search by item code, serial number or barcode","Sök efter Artikel Kod, Serie Nummer eller Streck/QR Kod", +Secondary Party,Sekundär Parti, +Secondary Role,Sekundär Roll, +Segregate Serial / Batch Bundle,Skilj Serie / Parti Paket, +Select Accounting Dimension.,Välj Bokföring Dimension, +Select Alternative Items for Sales Order,Välj Alternativ Artikel för Försäljning Order, +Select Batch No,Välj Parti Nummer, +Select Corrective Operation,Välj Korrigerande Åtgärd, +Select Date of Birth. This will validate Employees age and prevent hiring of under-age staff.,Välj Födelsedag. Detta kommer att validera personal ålder och förhindra anställning av minderårig personal., +"Select Date of joining. It will have impact on the first salary calculation, Leave allocation on pro-rata bases.","Välj Anställning Datum. Detta kommer att påverka första lön, Ledighet tilldelning på proportionell bas.", +Select Dimension,Välj Dimension, +Select Finished Good,Välj Färdig Artikel, +Select Items for Quality Inspection, Välj Artiklar för Kvalitet Kontroll, +Select Job Worker Address,Välj Jobb Ansvarig Adress, +Select Serial No,Välj Serie Nummer, +Select Serial and Batch,Välj Serie Nummer och Parti Nummer, +Select Time,Välj Tid, +Select View,Välj Vy, +Select Vouchers to Match,Välj Verifikat, +Select Warehouses to get Stock for Materials Planning,Välj Lager för att hämta Lager Kvantitet för Material Planering, +Select a Company this Employee belongs to.,Välj Bolag som detta Personal tillhör till, +Select a Customer,Välj Kund, +Select an Item Group.,Välj Artikel Grupp, +Select an invoice to load summary data,Välj faktura för att ladda översikt data, +Select an item from each set to be used in the Sales Order.,Välj artikel från varje uppsättning som ska användas i Försäljning Order., +Select the Default Workstation where the Operation will be performed. This will be fetched in BOMs and Work Orders.,Välj Standard Arbetsstation där Åtgärd ska utföras. Detta kommer att läggas till Stycklistor och Arbetsordrar., +Select the Item to be manufactured.,Välj Artikel som ska produceras., +"Select the Item to be manufactured. The Item name, UoM, Company, and Currency will be fetched automatically.","Välj Artikel som ska produceras. Artikel Namn, Enhet, Bolag och Valuta kommer att hämtas automatiskt.", +Select the Warehouse,Välj Lager, +Select the date and your timezone,Välj Datum och Tidzon, +Select the raw materials (Items) required to manufacture the Item,Välj Råmaterial (Artiklar) som erfodras för att producera artikel, +"Select whether to get items from a Sales Order or a Material Request. For now select Sales Order. + A Production Plan can also be created manually where you can select the Items to manufacture.","Välj att få artiklar från Försäljning Order eller Material Begäran. För Tillfället Välj Försäljning Order. + Produktion Plan kan också skapas manuellt där man kan välja vilka artiklar som ska produceras.", +Select your weekly off day,Välj ledig dag i veckan, +Selected Vouchers,Valda Verifikat, +Selected date is,Vald Datum, +Selected document must be in submitted state,Vald dokument måste ha godkänd status, +Self delivery,Egen Leverans, +Sell Asset,Sälj Tillgång, +Send Attached Files,Skicka Bifogade Filer, +Send Document Print,Skicka Utskrifter, +Send Emails,Skicka E-post, +Sequential,Sekventiell, +Serial & Batch Item,Serie Nummer & Parti, +Serial & Batch Item Settings,Serie Nummer & Parti Inställningar, +Serial / Batch Bundle,Serie / Parti Paket, +Serial / Batch Bundle Missing,Serie / Parti Paket Saknas, +Serial / Batch No,Serie / Parti Nummer, +Serial / Batch Nos,Serie / Parti Nummer, +Serial No Ledger,Serie Nummer Register, +Serial No Range,Serienummer Intervall, +Serial No and Batch Selector cannot be use when Use Serial / Batch Fields is enabled.,Serie Nummer och Parti Väljare kan inte användas när Använd Serie Nummer / Parti Fält är aktiverad., +Serial No and Batch for Finished Good,Serie Nummer och Parti för Färdig Artikel, +Serial No is mandatory,Serie Nummer erfodras, +Serial No {0} already exists,Serie Nummer {0} finns redan, +Serial No {0} already scanned,Serie Nummer {0} är redan skannad, +Serial No {0} does not exists,Serie Nummer {0} finns inte , +Serial No {0} is already added,Serie Nummer {0} har redan lagts till, +Serial Nos,Serie Nummer., +Serial Nos / Batch Nos,Serie Nummer. / Parti Nummer., +Serial Nos Mismatch,Serie Nummer stämmer inte, +Serial Nos are created successfully,Serie Nummer skapade, +"Serial Nos are reserved in Stock Reservation Entries, you need to unreserve them before proceeding.","Serie Nmmer är reserverade iLagerreservationsinlägg, du måste avboka dem innan du fortsätter.", +Serial and Batch,Serie Nummer och Parti , +Serial and Batch Bundle,Serie och Parti Paket, +Serial and Batch Bundle created,Serie och Parti Paket skapad, +Serial and Batch Bundle updated,Serie och Parti Paket uppdaterad, +Serial and Batch Bundle {0} is already used in {1} {2}.,Serie och Parti Paket {0} används redan i {1} {2}., +Serial and Batch Details,Serie och Parti Detaljer, +Serial and Batch Entry,Serie och Parti Post, +Serial and Batch No,Serie och Parti Nummer, +Serial and Batch Nos,Serie och Parti Nummer, +Serial and Batch Nos will be auto-reserved based on Pick Serial / Batch Based On,Serie och Parti Nummer kommer att reserveras automatiskt baserat på Välj Serie/Parti baserat på, +Serial and Batch Reservation,Serie Nummer och Parti Reservation, +Serial and Batch Summary,Serie- och batchnummer kommer att reserveras automatiskt baserat på Välj serie/batch baserat på, +Service Cost Per Qty,Service Kostnad Per Kvantitet, +Service Expense Total Amount,Service Kostnad Totalt Belopp, +Service Expenses,Service Kostnader, +Service Item,Service Artikel, +Service Item Qty,Service Artikel Kvantitet, +Service Item Qty / Finished Good Qty,Service Artikel Kvantitet / Färdig Artikel Kvantitet, +Service Item UOM,Service Artikel Enhet, +Service Item {0} is disabled.,Service Artikel är inaktiverad, +Service Item {0} must be a non-stock item.,Service Artikel {0} får inte vara Lager Artikel., +Service Items,Service Artikel, +Service Level Agreement for {0} {1} already exists.,Service Nivå Avtal för {0} {1} finns redan., +Service Level Name,Service Nivå Namn, +Service Provider,Service Leverantör, +Set Default Supplier,Ange Standard Leverantör, +Set From Warehouse,Ange Från Lager, +Set Landed Cost Based on Purchase Invoice Rate,Ange Landad Kostnad baserat på Inköp Faktura Pris, +Set Loyalty Program,Ange Bonus Program, +Set Operating Cost / Scrape Items From Sub-assemblies,Ange Driftskostnad / Rest Artiklar från Underenheter, +Set Operating Cost Based On BOM Quantity,Ange Åtgärd Kostnad baserad på Stycklista, +Set Parent Row No in Items Table,Ange Överordnad Radnummer i Artikel Tabell, +Set Process Loss Item Quantity,Ange Process Förlust Artikel Kvantitet, +Set Project Status,Ange Projekt Status, +Set Quantity,Ange Kvantitet, +Set Response Time for Priority {0} in row {1}.,Ange Svarstid för Prioritet {0} i rad {1}., +Set Valuation Rate Based on Source Warehouse,Ange Grund Pris Baserad på Från Lager, +Set Warehouse,Välj Lager, +Set default {0} account for non stock items,Ange Standard {0} konto för Ej Lager Artiklar, +Set fieldname from which you want to fetch the data from the parent form.,Ange fältnamn från vilket data ska hämtas från överordnad formulär., +Set quantity of process loss item:,Ange kvantitet för Process Förlust Artikel:, +Set the Planned Start Date (an Estimated Date at which you want the Production to begin),Ange Planerad Start Datum, +Set the status manually.,Ange status manuellt., +Set {0} in asset category {1} for company {2},Ange {0} i Tillgång Kategori {1} för Bolag {2}, +Sets 'Accepted Warehouse' in each row of the Items table.,Ange 'Godkänd Lager' i varje rad i Artiklar Tabell, +Sets 'Rejected Warehouse' in each row of the Items table.,Ange 'Avvisad Lager' i varje rad i Artikel Tabell, +Sets 'Reserve Warehouse' in each row of the Supplied Items table.,Anger 'Reserv Lager' i varje rad i Levererad Artikel Tabell., +Setting Item Locations...,Anger Artikelplatser..., +Setting the account as a Company Account is necessary for Bank Reconciliation,Ange konto som Bolag Konto för Bank Avstämmning, +Setting {} is required,Konfigurera {} erfodras, +Setup your organization,Bolag Inställningar, +Shelf Life in Days,Hållbarhet i Dagar, +Shift,Skift, +Shift Factor,Förskjutning Faktor, +Shift Name,Förskjutning Namn, +Shipment,Leverans, +Shipment Amount,Leverans Belopp, +Shipment Delivery Note,Leverans Försäljning Följesedel, +Shipment ID,Leverans ID, +Shipment Information,Leverans Information, +Shipment Parcel,Leverans Paket, +Shipment Parcel Template,Leverans Paket Mall, +Shipment Type,Leverans Typ, +Shipment details,Leverans Detaljer, +Shipping Address Details,Leverans Adress Detaljer, +Shipping Address Template,Leverans Adress Mall, +Show Balances in Chart Of Accounts,Visa Saldo i Kontoplan, +Show Barcode Field in Stock Transactions,Visa Streck/QR Kod Fält i Lager Transaktioner, +Show Dimension Wise Stock,Visa Lager per Dimension, +Show Disabled Warehouses,Visa Inaktiverade Lager, +Show Failed Logs,Visa Misslyckade Logg, +Show GL Balance,Visa Bokföring Register Saldo, +Show Item Name,Visa Artikel Namn, +Show Ledger View,Visa Register Vy, +Show Net Values in Party Account,Visa Nettovärde i Parti Konto, +Show Pay Button in Purchase Order Portal,Visa Betala Knapp i Portal, +Show Preview,Förhandsgranska, +Show Remarks,Visa Anmärkningar, +Show Taxes as Table in Print,Visa Moms Belopp som Kolumn, +Show net values in opening and closing columns,Visa Nettovärde i Öppning och Stängning kolumner, +Show only the Immediate Upcoming Term,Visa endast Omedelbart Kommande Villkor, +Show pending entries,Visa väntande poster, +Show with upcoming revenue/expense,Visa med kommande Intäkter/Kostnader, +"Simple Python Expression, Example: doc.status == 'Open' and doc.issue_type == 'Bug'","Enkelt Python uttryck, exempel: doc.status == 'Open' och doc.issue_type == 'Bug'", +"Simple Python formula applied on Reading fields.
Numeric eg. 1: reading_1 > 0.2 and reading_1 < 0.5
+Numeric eg. 2: mean > 3.5 (mean of populated fields)
+Value based eg.: reading_value in (""A"", ""B"", ""C"")","Enkel Python formel tillämpad på läsfält.
Numerisk t.ex. 1: reading_1 > 0.2 and reading_1 < 0.5
+Numerisk t.ex. 2: mean > 3.5 (mean of populated fields)
+Värde baserad t.ex.: reading_value in (""A"", ""B"", ""C"")", +Simultaneous,Samtidig, +Skip Available Sub Assembly Items,Hoppa över tillgängliga Delmontering Artiklar, +Skipped,Hoppade över, +Skipping Tax Withholding Category {0} as there is no associated account set for Company {1} in it.,Hoppar över Moms Undantag Kategori {0} eftersom det inte finns något konto associerat med Bolag {1}., +"Skipping {0} of {1}, {2}","Hoppa över {0} av {1}, {2}", +Sold by,Försäljare, +Something went wrong please try again,Något gick snett! Försök igen., +Source Exchange Rate,Käll Växelkurs, +Source Fieldname,Käll Fältnamn, +Source Warehouse Address Link,Från Lager Adress Länk, +South Africa VAT Account,Sydafrika Moms Konto, +South Africa VAT Settings,Sydafrika Moms Konto Inställningar, +Spacer,Mellanrum, +Split Asset,Dela Tillgång, +Split Early Payment Discount Loss into Income and Tax Loss,Dela Tidig Betalning Rabatt Bortfall i Intäkt och Moms Bortfall, +Split From,Dela Från, +Split Qty,Dela Kvantitet, +Split qty cannot be grater than or equal to asset qty,Delad kvantitet får inte vara större än eller lika med tillgång kvantitet, +Splitting {0} {1} into {2} rows as per Payment Terms,Delar {0} {1} i {2} rader enligt Betalning Villkor, +Stage,Stadie, +Stale Days should start from 1.,Inaktuella Dagar ska börja från 1., +Standard Description,Standard Beskrivning, +Standard Rated Expenses,Standard Klassade Kostnader, +"Standard Terms and Conditions that can be added to Sales and Purchases. Examples: Validity of the offer, Payment Terms, Safety and Usage, etc.","Standard Villkor som kan läggas till Försäljning och Inköp. Exempel: Erbjudande Giltighet, Betalningsvillkor, Säkerhet,Användning, etc.", +Standard rated supplies in {0},Standard Klassade Förbrukning Artiklar i {0}, +"Standard tax template that can be applied to all Purchase Transactions. This template can contain a list of tax heads and also other expense heads like ""Shipping"", ""Insurance"", ""Handling"", etc.","Standard Moms Mall som kan tillämpas på alla Inköp Transaktioner. Mallen kan innehålla lista över Moms Konto och även andra kostnad konto som ""Leverans"", ""Försäkring"", ""Hantering"" osv.", +"Standard tax template that can be applied to all Sales Transactions. This template can contain a list of tax heads and also other expense/income heads like ""Shipping"", ""Insurance"", ""Handling"" etc.","Standard Moms Mall som kan tillämpas på alla Försäljning Transaktioner. Mallen kan innehålla lista över Moms Konto och även andra kostnad konto som ""Leverans"", ""Försäkring"", ""Hantering"" osv.", +Start / Resume,Starta / Återuppta, +Start Date should be lower than End Date,Startdatum ska vara före Slutdatum, +Start Deletion,Starta Borttagning, +Start Import,Starta Import, +Start Job,Starta Jobb, +Start Merge,Starta Sammanslagning, +Start Reposting,Starta Ompostning, +Start Time can't be greater than or equal to End Time for {0}.,Start Tid får inte vara senare än eller lika med Slut Tid för {0}., +Started a background job to create {1} {0},Startade bakgrundsjobb för att skapa {1} {0}, +Status Details,Status Detaljer, +Status Illustration,Statusbild, +Status set to rejected as there are one or more rejected readings.,Status satt till avvisad eftersom det finns en eller flera avvisade avläsningar., +Stock Closing,Lager Låsning, +Stock Consumed During Repair,Lager Förbrukad under Reparation, +Stock Consumption Details,Lager Förbrukning Detaljer, +Stock Entries already created for Work Order {0}: {1},Lager Poster redan skapade för Arbetsorder {0}: {1}, +Stock Ledger Invariant Check,Lager Register Oföränderlig Kontroll, +Stock Ledger Variance,Lager Register Avvikelse, +Stock Movement,Lager Hantering, +Stock Planning,Lager Planering, +Stock Reposting Settings,Lager Ompostering Inställningar, +Stock Reservation,Lager Reservation, +Stock Reservation Entries Cancelled,Lager Reservation Poster Annullerade, +Stock Reservation Entries Created,Lager Reservation Poster Skapade, +Stock Reservation Entry,Lager Reservation Post, +Stock Reservation Entry cannot be updated as it has been delivered.,Lager Reservation Post kan inte uppdateras eftersom den är levererad. , +"Stock Reservation Entry created against a Pick List cannot be updated. If you need to make changes, we recommend canceling the existing entry and creating a new one.",Lager Reservation Post skapad mot Plocklista kan inte uppdateras. Om man behöver göra ändringar rekommenderas att man anullerar befintlig post och skapar ny. , +Stock Reservation Warehouse Mismatch,Lager Reservation för Lager stämmer inte, +Stock Reservation can only be created against {0}.,Lager Reservation kan endast skapas mot {0}., +Stock Reserved Qty (in Stock UOM),Lager Reserverad Kvantitet (Lager Enhet), +Stock Transactions Settings,Lager Transaktion Inställningar, +Stock UOM Quantity,Lager Kvantitet, +Stock Unreservation,Lager Reservation Annullering, +Stock Validations,Lager Validering, +Stock and Manufacturing,Lager & Produktion, +Stock cannot be reserved in group warehouse {0}.,Lager kan inte reserveras i grupp lager {0}., +Stock cannot be reserved in the group warehouse {0}.,Lager kan inte reserveras i grupp lager {0}., +Stock not available for Item {0} in Warehouse {1}.,Lager ej tillgängligt för Artikel {0} i Lager {1}., +Stock quantity not enough for Item Code: {0} under warehouse {1}. Available quantity {2} {3}.,Lager Kvantitet ej tillgänglig för Artikel Kod: {0} på lager {1}. Tillgänglig kvantitet {2} {3}., +Stock transactions that are older than the mentioned days cannot be modified.,Lager Transaktioner som är äldre än angiven antal dagar kan inte ändras., +Stock will be reserved on submission of Purchase Receipt created against Material Request for Sales Order.,Lager kommer att reserveras vid godkännade av Inköp Följesedel skapat mot Material Begäran för Försäljning Order., +Stock/Accounts can not be frozen as processing of backdated entries is going on. Please try again later.,Lager/Konton kan inte låsas eftersom bearbetning av bakdaterade poster pågår. Försök igen senare., +Sub Assemblies & Raw Materials,Delmonteringar & Råmaterial, +Sub Assembly Item,Delmontering Artikel, +Sub Assembly Item Code,Delmontering Artikel Kod, +Sub Assembly Items,Delmontering Artiklar, +Sub Assembly Warehouse,Delmontering Lager, +Sub Operation,Underåtgärd, +Sub Operations,Underåtgärder, +Subcontract BOM,Underleverantör Stycklista, +Subcontract Order,Underleverantör Order, +Subcontract Order Summary,Underleverantör Order Översikt, +Subcontract Return,Underleverantör Retur, +Subcontracting BOM,Underleverantör Stycklista, +Subcontracting Order,Underleverantör Order, +Subcontracting Order (Draft) will be auto-created on submission of Purchase Order.,Underleverantör Order (Utkast) kommer att skapas automatiskt vid godkännande av Inköp Order., +Subcontracting Order Item,Underleverantör Order Artikel, +Subcontracting Order Service Item,Underleverantör Order Service Artikel, +Subcontracting Order Supplied Item,Underleverantör Order Levererad Artikel, +Subcontracting Order {0} created.,Underleverantör Order {0} skapad, +Subcontracting Purchase Order,Underleverantör Inköp Order, +Subcontracting Receipt,Underleverantör Följesedel/Kvitto, +Subcontracting Receipt Item,Underleverantör Följesedel/Kvitto Artikel, +Subcontracting Receipt Supplied Item,Underleverantör Följesedel/Kvitto Levererad Artikel, +Subcontracting Settings,Underleverantör Inställningar, +Subdivision,Underavdelning, +Submit Action Failed,Godkännande Misslyckades, +Submit After Import,Godkänn efter Import, +Submit ERR Journals?,Godkänn ERR Journaler ?, +Submit Generated Invoices,Godkänn Skapade Fakturor, +Subscription for Future dates cannot be processed.,Prenumeration för framtida datum kan inte behandlas., +Succeeded,Klar, +Succeeded Entries,Klara Poster, +"Successfully changed Stock UOM, please redefine conversion factors for new UOM.","Lager Enhet ändrad, ändra konvertering faktor för ny enhet.", +Successfully imported {0},Importerade {0}, +"Successfully imported {0} record out of {1}. Click on Export Errored Rows, fix the errors and import again.","Importerade {0} post av {1}. Klicka på Exportera felaktiga rader, åtgärda fel och importera igen.", +Successfully imported {0} record.,Importerade {0} post., +"Successfully imported {0} records out of {1}. Click on Export Errored Rows, fix the errors and import again.","Importerade {0} poster av {1}. Klicka på Exportera felaktiga rader, åtgärda fel och importera igen.", +Successfully imported {0} records.,Importerade {0} poster., +Successfully linked to Customer,Länkad till Kund, +Successfully linked to Supplier,Länkad till Leverantör, +Successfully merged {0} out of {1}.,Slog samman {0} av {1}., +Successfully updated {0},Uppdaterade {0}, +"Successfully updated {0} record out of {1}. Click on Export Errored Rows, fix the errors and import again.","Uppdaterade {0} post av {1}. Klicka på Exportera felaktiga rader, åtgärda fel och importera igen.", +Successfully updated {0} record.,Uppdaterade {0} post., +"Successfully updated {0} records out of {1}. Click on Export Errored Rows, fix the errors and import again.","Uppdaterade {0} poster av {1}. Klicka på Exportera felaktiga rader, åtgärda fel och importera igen.", +Successfully updated {0} records.,Uppdaterade {0} poster., +Sum of Repair Cost and Value of Consumed Stock Items.,Summa för reparation kostnad och värde för förbrukade lager artiklar., +Supplied Item,Levererad Artikel, +Supplier Address Details,Leverantör Adress Detaljer, +Supplier Contact,Leverantör Kontakt, +Supplier Group Item,Leverantör Grupp Artikel, +Supplier Info,Leverantör Info, +Supplier Invoice,Leverantör Faktura, +Supplier Item,Leverantör Artikel, +Supplier Portal Users,Leverantör  Portal Användare, +Supplier Primary Address,Leverantör Primär Adress, +Supplier Primary Contact,Leverantör Primär Kontakt, +Supplier Warehouse mandatory for sub-contracted {0},Leverantör Lager erfodras för underleverantör {0}, +Supplies subject to the reverse charge provision,Leveranser som omfattas av omvänd betalning provision, +Sync Now,Synkronisera Nu, +Sync Started,Synkronisering Startad, +System Settings,System Inställningar, +System will automatically create the serial numbers / batch for the Finished Good on submission of work order,System kommer automatiskt att skapa serienummer/parti för färdig artikel vid godkännade av arbetsorder, +System will not check over billing since amount for Item {0} in {1} is zero,System kontrollerar inte överfakturering eftersom belopp för Artikel {0} i {1} är noll, +TCS Amount,TCS Belopp, +TCS Rate %,TDS Sats %, +TDS Amount,TDS Belopp, +TDS Payable,TDS Betalbar, +Target Asset,Tillgång, +Target Asset Location,Tillgång Plats, +Target Asset {0} cannot be cancelled,Tillgång {0} kan inte annulleras, +Target Asset {0} cannot be submitted,Tillgång {0} kan inte godkännas, +Target Asset {0} cannot be {1},Tillgång {0} kan inte bli {1}, +Target Asset {0} does not belong to company {1},Tillgång {0} tillhör inte bolag {1}, +Target Asset {0} needs to be composite asset,Tillgång {0} måste vara sammansatt tillgång, +Target Batch No,Parti Nummer, +Target Exchange Rate,Växelkurs, +Target Fieldname (Stock Ledger Entry),Fältnamn (Lager Register Post), +Target Fixed Asset Account,Tillgång Konto, +Target Has Batch No,Har Parti Nummer, +Target Has Serial No,Har Serie Nummer, +Target Incoming Rate,In Pris, +Target Is Fixed Asset,Är Tillgång, +Target Item Code,Artikel Kod, +Target Item Name,Artikel Namn, +Target Item {0} is neither a Fixed Asset nor a Stock Item,Artikel {0} är varken Tillgång eller Lager Artikel, +Target Item {0} must be a Fixed Asset item,Artikel {0} måste vara Tillgång, +Target Item {0} must be a Stock Item,Artikel {0} måste vara Lager Artikel, +Target Qty must be a positive number,Kvantitet måste vara positivt tal, +Target Serial No,Serie Nummer, +Target Warehouse Address Link,Till Lager Adress Länk, +Target Warehouse is mandatory for Decapitalization,Till Lager erfodras för Dekapitalisering, +Target Warehouse is set for some items but the customer is not an internal customer.,Till Lager angiven för vissa artiklar men kund är inte intern kund., +Task {0} depends on Task {1}. Please add Task {1} to the Tasks list.,Uppgift {0} beror på Uppgift {1}. Lägg till Uppgift {1} i Uppgift Lista., +Tax Amount,Momspliktig Belopp, +Tax Amount will be rounded on a row(items) level,Moms Belopp kommer att avrundas per Artikelrad, +Tax Masters,Moms Inställningar, +Tax Refunds provided to Tourists under the Tax Refunds for Tourists Scheme,Moms Återbäring till turister enligt momsåterbäring för turister, +Tax Settings,Moms Inställningar, +Tax Withheld Vouchers,Moms Avdrag Verifikat, +Tax Withholding,Moms Avdrag, +Tax Withholding Category {} against Company {} for Customer {} should have Cumulative Threshold value.,Moms Avdrag Kategori {} mot bolag {} för kund {} ska ha Kumulativ Tröskel Värde., +Tax Withholding Details,Moms Avdrag Kategori, +Tax Withholding Net Total,Moms Avdrag Netto Totalt, +"Tax detail table fetched from item master as a string and stored in this field. +Used for Taxes and Charges","Moms Tabell hämtad från Artikel Tabell som sträng och lagrad i detta fält. +Används för Moms och Avgifter", +Tax will be withheld only for amount exceeding the cumulative threshold,Moms kommer att dras av bara för belopp som överstiger kumulativ tröskel, +Taxes row #{0}: {1} cannot be smaller than {2},Momsrad #{0}: {1} kan inte vara lägre än {2}, +Telephony Call Type,Telefoni Typ, +Template Item Selected,Mall Artikel Vald, +Template Options,Mall Alternativ, +Template Task,Mall Upgift, +Template Warnings,Mall Varningar, +Terms & Conditions,Regler & Villkor, +Terms Template,Villkor Mall, +Territory Item,Distrikt Artikel, +Territory Wise Sales,Försäljning per Distrikt, +The Condition '{0}' is invalid,Villkor '{0}' är ogiltig, +The Document Type {0} must have a Status field to configure Service Level Agreement,Dokument Typ {0} måste ha Statusfält för att konfigurera Service Nivå Avtal, +"The GL Entries will be cancelled in the background, it can take a few minutes.","Bokföring Register Poster kommer att annulleras i bakgrunden, det kan ta några minuter.", +"The Payment Request {0} is already paid, cannot process payment twice","Betalning Begäran {0} är redan betald, kan inte behandla betalning två gånger", +"The Pick List having Stock Reservation Entries cannot be updated. If you need to make changes, we recommend canceling the existing Stock Reservation Entries before updating the Pick List.",Plocklista med Lager Reservation kan inte uppdateras. Om ändringar behöver göras rekommenderas annullering av befintlig Lager Reservation innan uppdatering av Plocklista., +The Process Loss Qty has reset as per job cards Process Loss Qty,Process Förlust Kvantitet är återställd enligt Jobbkort Process Förlust Kvantitet, +The Serial No at Row #{0}: {1} is not available in warehouse {2}.,Serie Nummer på rad #{0}: {1} är inte tillgänglig i lager {2}., +The Serial and Batch Bundle {0} is not valid for this transaction. The 'Type of Transaction' should be 'Outward' instead of 'Inward' in Serial and Batch Bundle {0},"Serie och Parti Paket {0} är inte giltigt för denna transaktion. ""Typ av Transaktion"" ska vara ""Utgående"" istället för ""Ingående"" i Serie och Parti Paket {0}", +The Work Order is mandatory for Disassembly Order,Arbetsorder erfordras för Demontering Order, +The allocated amount is greater than the outstanding amount of Payment Request {0},Tilldelad Belopp är högre än utestående belopp för Betalning Begäran {0}, +The currency of invoice {} ({}) is different from the currency of this dunning ({}).,Faktura valuta {} ({}) är annan än valuta för denna påminnelse ({})., +The default BOM for that item will be fetched by the system. You can also change the BOM.,Standard Stycklista för artikel kommer att hämtas av system. Man kan också ändra Stycklista., +The field {0} in row {1} is not set,Fält {0} i rad {1} är inte angiven, +"The following Items, having Putaway Rules, could not be accomodated:","Följande Artiklar, med Lägg undan regler, kunde inte tillgodoses:", +The following assets have failed to automatically post depreciation entries: {0},Följande tillgångar kunde inte bokföra avskrivning poster automatiskt: {0}, +The following invalid Pricing Rules are deleted:,Följande ogiltiga prissättningsregler tas bort:, +The items {0} and {1} are present in the following {2} :,Artiklar {0} och {1} finns i följande {2}:, +The operation {0} can not add multiple times,Åtgärd {0} kan inte läggas till flera gånger, +The operation {0} can not be the sub operation,Åtgärd {0} kan inte vara underåtgärd, +The original invoice should be consolidated before or along with the return invoice.,Original Faktura ska konsolideras före eller tillsammans med retur faktura., +The percentage you are allowed to pick more items in the pick list than the ordered quantity.,Procentandel artiklar du får plocka utöver artiklar i plocklista., +"The percentage you are allowed to transfer more against the quantity ordered. For example, if you have ordered 100 units, and your Allowance is 10%, then you are allowed transfer 110 units.","Procentandel man får överföra mer mot order kvantitet. Till exempel, om man har order på 100 enheter och tillåtelse är 10%, får man överföra upp till 110 enheter.", +The reserved stock will be released when you update items. Are you certain you wish to proceed?,Lager Reservation kommer att släppas när artiklar uppdaterats. Fortsätt?, +The reserved stock will be released. Are you certain you wish to proceed?,Lager Reservation kommer att släppas. Fortsätt?, +The selected {0} does not contain the selected Asset Item.,Vald {0} innehåller inte vald Tillgång Post., +"The stock for the item {0} in the {1} warehouse was negative on the {2}. You should create a positive entry {3} before the date {4} and time {5} to post the correct valuation rate. For more details, please read the documentation.","Lager för artikel {0} i {1} lager var negativt {2}. Skapa positiv post {3} före {4} och {5} för att bokföra rätt grund pris. För mer information, läs dokumentation .", +"The stock has been reserved for the following Items and Warehouses, un-reserve the same to {0} the Stock Reconciliation:

{1}","Lager är reserverad för följande Artiklar och Lager, ta bort reservation till {0} Lager Inventering :

{1}", +"The sync has started in the background, please check the {0} list for new records.",Synkronisering startad i bakgrunden. Kolla {0} lista för nya poster., +The task has been enqueued as a background job.,Uppgift är i kö som bakgrund jobb., +"The task has been enqueued as a background job. In case there is any issue on processing in background, the system will add a comment about the error on this Stock Reconciliation and revert to the Submitted stage",Uppgift är i kö som ett bakgrund jobb. Om det finns några problem med bearbetning i bakgrund kommer system att lägga till kommentar om fel på denna Lager Inventering och återgå till Godkänd status, +The total Issue / Transfer quantity {0} in Material Request {1} cannot be greater than allowed requested quantity {2} for Item {3},Totalt Utfärdad / Överföring Kvantitet {0} i Material Begäran {1} kan inte vara högre än tillåten begärd kvantitet {2} för artikel {3}, +The total Issue / Transfer quantity {0} in Material Request {1} cannot be greater than requested quantity {2} for Item {3},Totalt Utfärdad / Överföring Kvantitet {0} i Material Begäran {1} kan inte vara högre än begärd kvantitet {2} för artikel {3}, +"The users with this Role are allowed to create/modify a stock transaction, even though the transaction is frozen.","Användare med denna roll får skapa/ändra lager transaktion, även om transaktion är låst.", +The warehouse where you store finished Items before they are shipped.,Lager där färdiga artiklar lagras innan de levereras., +"The warehouse where you store your raw materials. Each required item can have a separate source warehouse. Group warehouse also can be selected as source warehouse. On submission of the Work Order, the raw materials will be reserved in these warehouses for production usage.",Lager där råmaterial lagras. Varje erfodrad artikel kan ha separat från lager. Grupp lager kan också väljas som från lager. Vid godkännade av arbetsorder kommer råmaterial att reserveras i dessa lager för produktion., +The warehouse where your Items will be transferred when you begin production. Group Warehouse can also be selected as a Work in Progress warehouse.,Lager där artiklar kommer att överföras när produktion påbörjas. Grupp Lager kan också väljas som Arbete Pågår lager., +The {0} {1} is used to calculate the valuation cost for the finished good {2}.,{0} {1} används för att beräkna grund kostnad för färdig artikel {2}., +There are ledger entries against this account. Changing {0} to non-{1} in live system will cause incorrect output in 'Accounts {2}' report,"Det finns bokföring register aposter mot detta konto. Om du ändrar {0} till icke-{1} i system kommer det att orsaka felaktig utdata i ""Konton {2}"" rapporten ", +There are no Failed transactions,Det finns inga misslyckade transaktioner, +There are no active Fiscal Years for which Demo Data can be generated.,Det finns inga aktiva bokföringsår för vilka demo data kan genereras., +There are no slots available on this date,Det finns inga lediga tider för detta datum, +There are only {0} asset created or linked to {1}. Please create or link {2} Assets with respective document.,Det finns bara {0} tillgångar skapade eller länkade till {1}. Skapa eller länka {2} Tillgångar med respektive dokument., +"There are two options to maintain valuation of stock. FIFO (first in - first out) and Moving Average. To understand this topic in detail please visit
Item Valuation, FIFO and Moving Average.","Det finns två alternativ för att upprätthålla Lager värdering. FIFO (först in - först ut) och Medelvärde. För att förstå detta ämne i detalj besök Artikelvärdering, FIFO och Medelvärde.", +There aren't any item variants for the selected item,Det finns inga artikelvarianter för vald artikel, +There is already a valid Lower Deduction Certificate {0} for Supplier {1} against category {2} for this time period.,Det finns redan giltigt Lägre Avdrag Certifikat {0} för Leverantör {1} mot kategori {2} för denna tidsperiod., +There is already an active Subcontracting BOM {0} for the Finished Good {1}.,Det finns redan aktiv Underleverantör Stycklista {0} för färdig artikel {1}., +There must be atleast 1 Finished Good in this Stock Entry,Det måste finnas minst en färdig artikel i denna Lager Post, +There was an error creating Bank Account while linking with Plaid.,Det uppstod fel när Bank Konto skulle skapas vid länkning med Plaid., +There was an error syncing transactions.,Det uppstod fel med synkronisering av transaktioner., +There was an error updating Bank Account {} while linking with Plaid.,Det uppstod fel när Bank Konto {} skulle uppdateras vid länkning med Plaid., +There was an issue connecting to Plaid's authentication server. Check browser console for more information,Det uppstod fel vid anslutning till Plaid autentisering server. Kontrollera webbläsare konsol för mer information, +There were issues unlinking payment entry {0}.,Det uppstod fel med borttagning av länk till Betalning Post {0}., +This Account has '0' balance in either Base Currency or Account Currency,"Konto har ""0"" Saldo i antingen Standard Valuta eller Konto Valuta", +This field is used to set the 'Customer'.,Detta fält används för att ange 'Kund'., +This filter will be applied to Journal Entry.,Detta filter kommer att tillämpas på Journal Post, +This is a Template BOM and will be used to make the work order for {0} of the item {1},Detta är Stycklista Mall och kommer att användas för att skapa arbetsorder för {0} av artikel {1}, +This is considered dangerous from accounting point of view.,Detta anses vara farligt ur bokföring synpunkt., +"This is enabled by default. If you want to plan materials for sub-assemblies of the Item you're manufacturing leave this enabled. If you plan and manufacture the sub-assemblies separately, you can disable this checkbox.","Detta är aktiverat som standard. Planeras material för underenheter för artikel som produceras, lämna detta aktiverat. Planeras och produceras underenheterna separat kan den inaktiveras.", +"This is for raw material Items that'll be used to create finished goods. If the Item is an additional service like 'washing' that'll be used in the BOM, keep this unchecked.","Detta är för råmaterial artiklar som kommer att användas för att skapa färdiga artiklar. Om artikel är tillägg service som ""tvätt"" som kommer att användas i stycklista, låt den vara inaktiverad", +This item filter has already been applied for the {0},Detta artikel filter har redan tillämpats för {0}, +This option can be checked to edit the 'Posting Date' and 'Posting Time' fields.,Detta alternativ kan väljas för att redigera fält 'Post Datum' och 'Post Tid'., +This schedule was created when Asset {0} was adjusted through Asset Value Adjustment {1}.,Detta schema skapades när Tillgång {0} justerades genom Tillgång Värde Justering {1}., +This schedule was created when Asset {0} was consumed through Asset Capitalization {1}.,Detta schema skapades när Tillgång {0} förbrukades genom Tillgång Kapitalisering {1}., +This schedule was created when Asset {0} was repaired through Asset Repair {1}.,Detta schema skapades när Tillgång {0} reparerades genom Tillgång Reparation {1}., +This schedule was created when Asset {0} was restored on Asset Capitalization {1}'s cancellation.,Detta schema skapades när Tillgång {0} återställdes vid annullering av Tillgång Kapitalisering {1}., +This schedule was created when Asset {0} was restored.,Detta schema skapades när Tillgång {0} återställdes., +This schedule was created when Asset {0} was returned through Sales Invoice {1}.,Detta schema skapades när Tillgång {0} returnerades via Försäljning Faktura {1}., +This schedule was created when Asset {0} was scrapped.,Detta schema skapades när Tillgång {0} skrevs av., +This schedule was created when Asset {0} was sold through Sales Invoice {1}.,Detta schema skapades när Tillgång {0} såldes via Försäljning Faktura {1}., +This schedule was created when Asset {0} was updated after being split into new Asset {1}.,Detta schema skapades när Tillgång {0} uppdaterades efter att ha delats upp i ny Tillgång {1}., +This schedule was created when Asset {0}'s Asset Repair {1} was cancelled.,Detta schema skapades när Tillgång Reparation {0} Tillgång Reparation {1} annullerades., +This schedule was created when Asset {0}'s Asset Value Adjustment {1} was cancelled.,Detta schema skapades när Tillgång {0} Tillgång Värde Justering {1} annullerades., +This schedule was created when Asset {0}'s shifts were adjusted through Asset Shift Allocation {1}.,Detta schema skapades när Tillgång {0} förskjutning justerades genom Tillgång Förskjutning Tilldelning {1}., +This schedule was created when new Asset {0} was split from Asset {1}.,Detta schema skapades när ny Tillgång {0} delades från Tillgång {1}., +"This table is used to set details about the 'Item', 'Qty', 'Basic Rate', etc.","Denna tabell används för att ange detaljer om 'Artikel', 'Kvantitet', 'Bas Pris', etc.", +This {} will be treated as material transfer.,Denna {} kommer att behandlas som material överföring., +Threshold for Suggestion (In Percentage),Tröskel för Förslag (%), +Time Taken to Deliver,Tid som tagits att Leverera, +Time in mins,Tid i minuter, +Time in mins.,Tid i minuter, +Time slot is not available,Tid är inte tillgänglig, +To Date is mandatory,Till Datum Erfordras, +To Delivery Date,Till Leverans Datum, +To Doctype,Till DocType, +To Due Date,Till Förfallo Datum, +To Payment Date,Till Betalning Datum, +To Reference Date,Till Referens Datum, +To add Operations tick the 'With Operations' checkbox.,Att lägga till Åtgärder kryssa i rutan 'Med Åtgärder'., +To add subcontracted Item's raw materials if include exploded items is disabled.,Att lägga till Underleverantör Artikel råmaterial om Inkludera Utvidgade Artiklar är inaktiverad., +To apply condition on parent field use parent.field_name and to apply condition on child table use doc.field_name. Here field_name could be based on the actual column name of the respective field.,"Att tillämpa villkor på överordnad fält, använd parent.field_name och för att tillämpa villkor på underordnad tabell använd doc.field_name. Här kan fältnamn baseras på verklig kolumn namn för respektive fält.", +To be Delivered to Customer,Levereras till Kund, +To cancel a {} you need to cancel the POS Closing Entry {}.,Att annullera {} måste du annullera Kassa Stängning Post {}., +"To enable Capital Work in Progress Accounting,",Att aktivera Pågående Kapitalarbete Bokföring, +To include non-stock items in the material request planning. i.e. Items for which 'Maintain Stock' checkbox is unticked.,Att inkludera ej lagerartiklar i material begäran planering. dvs Artiklar för vilka ruta 'Lager Hantera' är inaktiverad., +To submit the invoice without purchase order please set {0} as {1} in {2},"Att godkänna faktura utan inköp order, ange {0} som {1} i {2}", +To submit the invoice without purchase receipt please set {0} as {1} in {2},Att godkänna faktura utan inköp följesedel ange {0} som {1} i {2}, +"To use a different finance book, please uncheck 'Include Default FB Assets'","Att använda annan finans register, inaktivera ""Inkludera Standard Finans Register Tillgångar""", +"To use a different finance book, please uncheck 'Include Default FB Entries'","Att använda annan finans register, inaktivera ""Inkludera Standard Finans Register Tillgångar""", +Total Active Items,Totalt Aktiva Artiklar, +Total Allocations,Totala Tilldelningar, +Total Asset,Totalt Tillgång, +Total Asset Cost,Totalt Tillgång Kostnad, +Total Billing Hours,Totalt Fakturerbara Timmar, +Total Contribution Amount Against Invoices: {0},Totalt Bidrag Belopp Mot Fakturor: {0}, +Total Contribution Amount Against Orders: {0},Totalt Bidrag Belopp Mot Ordrar: {0}, +Total Equity,Totalt Eget Kapital, +Total Incoming Bills,Inkommande Fakturor, +Total Incoming Payment,Inkommande Betalningar, +Total Incoming Value (Receipt),Totalt Ingående Värde (Faktura), +Total Interest,Totalt Ränta, +Total Issues,Totalt Frågor, +Total Items,Totalt Artiklar, +Total Liability,Totalt Skuld, +Total Number of Booked Depreciations ,Totalt Antal Bokförda Avskrivningar , +Total Operation Time,Totalt Drift Tid, +Total Other Charges,Totalt Övriga Avgifter, +Total Outgoing Bills,Utgående Fakturor, +Total Outgoing Payment,Utgående Betalningar, +Total Outgoing Value (Consumption),Utgående Värde (Förbrukning), +Total Picked Quantity {0} is more than ordered qty {1}. You can set the Over Picking Allowance in Stock Settings.,Totalt plockad kvantitet {0} är mer än order kvantitet {1}. Du kan ange överplock tillåtelse i Lager Inställningar., +Total Purchase Amount,Totalt Inköp Belopp, +Total Purchase Cost has been updated,Totalt Inköp Kostnad uppdaterad, +Total Repair Cost,Totalt Reparation Kostnad, +Total Reposting Count,Totalt Ompostering Antal, +Total Sales Amount,Totalt Försäljning Belopp, +Total Stock Value,Totalt Lager Värde, +Total Supplied Qty,Totalt Levererad Kvantitet, +Total Time (in Mins),Totalt Tid i Minuter, +Total Value,Totalt Värde, +Total Value Difference (Incoming - Outgoing),Värde Differens (Inkommande - Utgående), +Total Views,Totalt Visningar, +Total Warehouses,Totalt Antal Lager, +Total percentage against cost centers should be 100,Totalt procentsats mot resultat enhet ska vara 100%, +Tracking Status,Spårning Status, +Tracking Status Info,Spårning Status Info, +Tracking URL,Spårning URL, +Transaction Deletion Document: {0} is running for this Company. {1},Transaktion Borttagning Dokument: {0} körs redan för {1}, +Transaction Deletion Record,Transaktion Borttagning Post, +Transaction Deletion Record Details,Transaktion Borttagning Post Detaljer, +Transaction Deletion Record Item,Transaktion Borttagning Post Artikel, +Transaction Exchange Rate,Transaktion Växelkurs, +Transaction Settings,Transaktion Inställningar, +Transaction currency: {0} cannot be different from Bank Account({1}) currency: {2},Transaktion valuta: {0} kan inte skilja sig från Bank Konto ({1}) valuta: {2}, +Transactions against the Company already exist! Chart of Accounts can only be imported for a Company with no transactions.,Transaktioner mot bolag finns redan! Kontoplan kan endast importeras för bolag utan transaktioner., +Transfer Asset,Överför Tillgång, +Transfer From Warehouses,Överföring Från Lager, +Transferring cannot be done to an Employee. Please enter location where Asset {0} has to be transferred,Överföring kan inte skapas för Personal. Ange plats där Tillgång {0} ska överföras, +Transit Entry,Transit Post, +Truncates 'Remarks' column to set character length,"Trunkerar kolumn ""Anmärkningar"" för att ange teckenlängd", +Type Of Call,Typ av Samtal, +Type of Transaction,Typ av Transaktion, +UAE VAT Account,UAE VAT Konto, +UAE VAT Accounts,UAE VAT Konton, +UAE VAT Settings,UAE VAT Inställningar, +UOM conversion factor required for UOM: {0} in Item: {1},Enhet Konvertering Faktor erfodras för Enhet: {0} för Artikel: {1}, +UnReconcile,Ångra, +Unable to find the time slot in the next {0} days for the operation {1}. Please increase the 'Capacity Planning For (Days)' in the {2}.,"Kunde inte att hitta tider under de kommande {0} dagarna för åtgärd {1}. Öka ""Kapacitet Planering för (Dagar)"" i {2}.", +Unable to find variable:,Kan inte hitta variabel:, +Unassigned Qty,Ej Tilldelat Kvantitet, +"Under Working Hours table, you can add start and end times for a Workstation. For example, a Workstation may be active from 9 am to 1 pm, then 2 pm to 5 pm. You can also specify the working hours based on shifts. While scheduling a Work Order, the system will check for the availability of the Workstation based on the working hours specified.","Under Arbetstid tabell kan man lägga till start och slut tider för arbetsstation. Till exempel kan arbetsstation vara aktiv från 9.00 till 12.00, sedan 1300 till 17.00. Du kan även ange arbetstid utifrån skift. Under schemaläggning av arbetsorder kommer system att kontrollera tillgänglighet för arbetsstation baserat på angiven arbetstid.", +Unit of Measure (UOM),Enhet, +Unlinked,Bortkopplad, +Unqualified,Okvalificerad, +Unrealized Profit / Loss Account,Orealiserad Resultat Konto, +Unrealized Profit / Loss account for intra-company transfers,Orealiserad Resultat konto för koncern överföringar, +Unrealized Profit/Loss account for intra-company transfers,Orealiserad Resultat konto för koncern överföringar, +Unreconcile Payment,Ångra Betalning Avstämning, +Unreconcile Payment Entries,Ångra Betalning Avstämning Post, +Unreconcile Transaction,Ångra Transaktion, +Unreconciled Amount,Ångrad Betalning Avstämning Belopp, +Unreconciled Entries,Ångrad Betalning Avstämning Post, +Unreserve,Ångra Reservation, +Unreserve Stock,Ångra Lager Reservation, +Unreserving Stock...,Ångrar Lager Reservation ..., +Unset Matched Payment Request,Ångra Avstämd Betalning Begäran, +Up,Upp, +Update Billed Amount in Delivery Note,Uppdatera Fakturerad Belopp i Försäljning Följesedel, +Update Billed Amount in Purchase Order,Uppdatera Fakturerad Belopp i Inköp Order, +Update Billed Amount in Purchase Receipt,Uppdatera Fakturerad Belopp i Inköp Följesedel, +Update Existing Price List Rate,Uppdatera Befintlig Prislista Pris, +Update Existing Records,Uppdatera Befintliga Poster, +Update Outstanding for Self,Uppdatera Utestående för sig själv, +Update Rate as per Last Purchase,Uppdatera Pris per Senaste Inköp, +Update Total Purchase Cost,Uppdatera Total Inköp Kostnad, +Update frequency of Project,Projekt Uppdatering Intervall, +Update stock must be enabled for the purchase invoice {0},Uppdatera Lager måste vara aktiverat för Inköp Faktura {0}, +Updated via 'Time Log' (In Minutes),Uppdaterad via 'Tid Logg' (i Minuter), +Updating Work Order status,Uppdaterar Arbetsorder status, +"Updating {0} of {1}, {2}","Uppdaterar {0} av {1}, {2}", +Upload Bank Statement,Importera Bank Avstämning, +Use 'Repost in background' button to trigger background job. Job can only be triggered when document is in Queued or Failed status.,"Använd knapp ""Posta om i Backgrund"" för att utlösa bakgrund jobb. Jobb kan bara utlösas när dokument har status 'I Kö' eller 'Misslyckad'.", +Use Batch-wise Valuation,Använd Värdering per Parti, +Use Company Default Round Off Cost Center,Använd Bolag Standard Avrundning Resultat Enhet, +Use Company default Cost Center for Round off,Använd Bolag standard Resultat Enhet för Avrundning, +Use HTTP Protocol,Använd HTTP Protokoll, +Use Item based reposting,Använd Artikel baserad Ompostering , +Use Serial / Batch Fields,Använd Serie / Parti Nummer Fält, +Use Serial No / Batch Fields,Använd Serie / Parti Nummer Fält, +Use Transaction Date Exchange Rate,Använd Transaktion Datum Växelkurs, +User {0}: Removed Employee Self Service role as there is no mapped employee.,Användare {0}: Borttagen Personal Självbetjäning roll eftersom det inte finns någon mappad personal., +User {0}: Removed Employee role as there is no mapped employee.,Användare {0}: Borttagen Personal roll eftersom det inte finns mappad personal., +Users can enable the checkbox If they want to adjust the incoming rate (set using purchase receipt) based on the purchase invoice rate.,Användare kan kryssa i rut Om de vill justera inköp pris (anges med inköp följesedel) baserat på inköp faktura pris., +Users with this role are allowed to over bill above the allowance percentage,Användare med denna roll tillåts att överfakturera över tillåten procentsats, +Users with this role are allowed to over deliver/receive against orders above the allowance percentage,Användare med denna roll tillåts att överleverera/ta emot ordrar över tillåten procentsats, +Using negative stock disables FIFO/Moving average valuation when inventory is negative.,Användning av negativ lager inaktiverar FIFO/MA värdering sätt när lager värde är negativ., +VAT Accounts,Moms Konton, +VAT Amount (AED),Moms Belopp (AED), +VAT Audit Report,Moms Revision Rapport, +VAT on Expenses and All Other Inputs,Moms på Utgifter och Alla Andra intäkter, +VAT on Sales and All Other Outputs,Moms på Försäljning och Alla Andra utgifter, +Valid From must be after {0} as last GL Entry against the cost center {1} posted on this date,Giltig Från Datum måste vara efter {0} eftersom senaste Bokföring Register Post mot resultat enhet {1} postad detta datum, +Validate Components Quantities Per BOM,Validera Komponent Kvantiteter per Stycklista, +Validate Negative Stock,Validera Negativ Lager, +Validate Pricing Rule,Validera Prissättning Regel, +Validate Stock on Save,Validera Lager på Spara, +Valuation Field Type,Värdering Fält Typ, +Valuation Rate (In / Out),Grund Pris (In/Ut), +Valuation rate for customer provided items has been set to zero.,Grund Pris för Kund Försedda Artiklar angavs till noll., +Valuation rate for the item as per Sales Invoice (Only for Internal Transfers),Grund Pris för artikel enligt Försäljning Faktura (endast för Interna Överföringar), +Value Based Inspection,Värde Baserad Kontroll, +Value Change,Värde Förändring, +Value Details,Värde Detaljer, +Value of Goods,Gods Värde, +Value of goods cannot be 0,Godsvärde kan inte vara 0, +Verification failed please check the link,"Verifiering misslyckades, kontrollera länk", +Via Landed Cost Voucher,Genom Landad Kostnad Verifikat, +View BOM Update Log,Visa Stycklista Uppdatering Logg, +View Exchange Gain/Loss Journals,Visa Växelkurs Resultat Journaler, +View General Ledger,Visa Bokföring Register, +View Ledgers,Visa Register, +Visits,Besök, +Voice Call Settings,Röst Samtal Inställningar, +Voucher,Verifikat, +Voucher Name,Verifikat Namn, +Voucher No is mandatory,Verifikat Nummer Erfodras, +Voucher Qty,Verifikat Kvantitet, +Voucher Subtype,Verifikat Undertyp, +Voucher {0} is over-allocated by {1},Verifikat {0} är övertilldelad av {1}, +Voucher {0} value is broken: {1},Verifikat {0} värde bruten: {1}, +Voucher-wise Balance,Saldo per Verifikat, +"WARNING: Exotel app has been separated from ERPNext, please install the app to continue using Exotel integration.","OBS: Exotel app har separerats från System, installera app för att fortsätta använda Exotelintegration.", +WIP Composite Asset,Pågående Arbete Sammansatt Tillgång, +Waiting for payment...,Väntar på betalning..., +Warehouse Capacity for Item '{0}' must be greater than the existing stock level of {1} {2}.,Lager Kapacitet för Artikel '{0}' måste vara högre än befintlig lager nivå på {1} {2}. , +Warehouse Details,Lager Detaljer, +Warehouse Disabled?,Lager Inaktiverad?, +Warehouse Settings,Lager Inställningar, +Warehouse Wise Stock Balance,Lager Saldo per Lager, +Warehouse wise Stock Value,Lager Värde per Lager, +Warehouse {0} does not belong to Company {1}.,Lager {0} tillhör inte Bolag {1}., +"Warehouse {0} is not linked to any account, please mention the account in the warehouse record or set default inventory account in company {1}.",Lager {0} är inte länkad till något konto. Ange konto i lager post eller ange standard konto för lager i bolag {1}., +Warehouse's Stock Value has already been booked in the following accounts:,Lagrets Lager Värde är redan bokförd på följande konton:, +Warning - Row {0}: Billing Hours are more than Actual Hours,Varning - Rad # {0}: Fakturerbara timmar är fler än verkliga timmar, +Warning on Negative Stock,Varna vid Negativt Lager, +Warning!,Varning!, +Watch Video,Visa Video, +"We can see {0} is made against {1}. If you want {1}'s outstanding to be updated, uncheck '{2}' checkbox.

Or you can use {3} tool to reconcile against {1} later.","Vi kan se att {0} skapades mot {1}. Om du vill att {1}s utestående ska uppdateras, avmarkera '{2}'kryssruta .

Eller så kan du använda {3} verktyg för att stämma av mot {1} senare.", +Website Script,Webbplats Skript, +Website Theme,Webbplats Tema, +Week {0} {1},Vecka {0} {1}, +Weekly Time to send,Veckotid att skicka, +Weight (kg),Vikt (kg), +"When a parent warehouse is chosen, the system conducts stock checks against the associated child warehouses",Näröverordnat lager valts utför system lagerkontroller mot tillhörande underordnade lager, +"When creating an Item, entering a value for this field will automatically create an Item Price at the backend.","Vid skapande av Artikel, om man anger värde för detta fält, skapas automatiskt artikelpris i bakgrund.", +"While making Purchase Invoice from Purchase Order, use Exchange Rate on Invoice's transaction date rather than inheriting it from Purchase Order. Only applies for Purchase Invoice.","Vid skapande av Inköp Faktura från Inköp Order, använd Inköp Faktura transaktion datum för växelkurs istället för att ärva den från Inköp Order. Gäller endast Inköp Faktura.", +Width (cm),Bredd (cm), +With Period Closing Entry For Opening Balances,Med PeriodStängning Post för Öppning Saldon, +Withdrawal,Uttag, +Work Order / Subcontract PO,Arbetsorder / Underleverantör Inköp Order, +Work Order Consumed Materials,Arbetsorder Förbrukat Material, +Workflow,Arbetsflöde, +Workflow Action,Arbetsflöde Åtgärd, +Workflow State,Arbetsflöde Tillstånd, +Workstation Dashboard,Arbetsplats Översikt Panel, +Workstation Status,Arbetsplats Status, +Workstation Type,Arbetsplats Typ, +Workstations,Arbetsplatser, +Write Off Limit,Avskrivning Gräns, +Wrong Company,Fel Bolag, +Wrong Template,Fel Mall, +You are not authorized to make/edit Stock Transactions for Item {0} under warehouse {1} before this time.,Du är inte behörig att skapa/redigera lager transaktioner för artikel {0} under lager {1} före denna tidpunkt., +You are picking more than required quantity for the item {0}. Check if there is any other pick list created for the sales order {1}.,Du väljer mer än vad som krävs för artikel {0}. Kontrollera om det finns någon annan plocklista skapad för försäljning order {1}., +You can add the original invoice {} manually to proceed.,Lägg till original faktura {} manuellt för att fortsätta., +"You can set it as a machine name or operation type. For example, stiching machine 12",Du kan ange den som maskin namn eller åtgärd typ. Till exempel sy maskin 12, +You can't make any changes to Job Card since Work Order is closed.,Du kan inte göra några ändringar i Jobbkort eftersom Arbetsorder är stängd., +You can't redeem Loyalty Points having more value than the Rounded Total.,Det går inte att lösa in Lojalitet Poäng som har mer värde än Avrundad Belopp., +You cannot change the rate if BOM is mentioned against any Item.,Du kan inte ändra pris om Stycklista är angiven mot någon artikel., +You cannot create a {0} within the closed Accounting Period {1},Du kan inte skapa {0} inom stängd bokföring period {1}, +You cannot create/amend any accounting entries till this date.,Du kan inte skapa/ändra några bokföring poster fram till detta datum., +You cannot repost item valuation before {},Du kan inte lägga om artikel värdering före {}, +You have entered a duplicate Delivery Note on Row,Du har angett dubblett Försäljning Följesedel på Rad, +You haven't created a {0} yet,Ingen {0} skapad än, +You need to cancel POS Closing Entry {} to be able to cancel this document.,Annullera Kassa Stängning Post {} för att annullera detta dokument., +Your Name (required),Ditt Namn, +Your email has been verified and your appointment has been scheduled,Din E-post är verifierad och ditt möte är bokad, +Zero Balance,Noll Saldo, +Zero Rated,Noll Pris, +Zero quantity,Noll Kvantitet, +`Allow Negative rates for Items`,"""Tillåt Negativa Priser för Artiklar"".", +as a percentage of finished item quantity,som procentsats av färdig artikel kvantitet, +at,kl., +dated {0},daterad {0}, +description,Beskrivning, +discount applied,Rabatt Tillämpad, +fieldname,Fält Namn , +is already,är redan, +must be between 0 and 100,måste vara mellan 0 och 100, +or its descendants,eller dess underordnad, +out of 5,av 5 möjliga, +payments app is not installed. Please install it from {0} or {1},payment app är inte installerad. Installera det från {0} eller {1}, +payments app is not installed. Please install it from {} or {},payment app är inte installerad. Installera det från {0} eller {1}, +performing either one below:,utför någon av dem nedan:, +product bundle item row's name in sales order. Also indicates that picked item is to be used for a product bundle,Artikel paket artikel rad namn i försäljning order. Indikerar också att plockad artikel ska användas för artikel paket, +quotation_item,Försäljning Offert Artikel, +ratings,Bedömningar, +subscription is already cancelled.,prenumeration är redan annullerad., +to unallocate the amount of this Return Invoice before cancelling it.,att ta bort belopp för denna Retur Faktura innan annullering., +variance,avvikelse, +via BOM Update Tool,via Ersätt Stycklista Verktyg, +will be,kommer vara, +{0} {1} has submitted Assets. Remove Item {2} from table to continue.,{0} {1} har godkänt tillgångar. Ta bort Artikel {2} från tabell för att fortsätta., +{0} Account not found against Customer {1}.,{0} Konto hittades inte mot Kund {1}., +{0} Account: {1} ({2}) must be in either customer billing currency: {3} or Company default currency: {4},{0} Konto: {1} ({2}) måste vara antingen i kundens faktura valuta: {3} eller bolag standard valuta: {4}, +{0} Budget for Account {1} against {2} {3} is {4}. It {5} exceed by {6},{0} Budget för Konto {1} mot {2} {3} är {4}. Det {5} överstiger med {6}, +{0} Transaction(s) Reconciled,{0} Transaktion(er) Avstämda, +{0} account is not of type {1},{0} konto är inte av typ {1}, +{0} account not found while submitting purchase receipt,{0} konto hittades inte när vid godkänande av Inköp Följesedel, +{0} and {1},{0} och {1}, +{0} cannot be used as a Main Cost Center because it has been used as child in Cost Center Allocation {1},{0} kan inte användas som Överordnad Resultat Enhet eftersom det har använts som underordnad i Resultat Enhet Tilldelning {1}, +{0} cannot be zero,{0} kan inte vara noll, +{0} currency must be same as company's default currency. Please select another account.,{0} valuta måste vara samma som bolag standard valuta. Välj ett annat konto., +{0} entered twice {1} in Item Taxes,{0} angiven två gånger {1} under Artikel Moms, +{0} has Payment Term based allocation enabled. Select a Payment Term for Row #{1} in Payment References section,{0} har Betalning Villkor baserad tilldelning aktiverad. Välj Betalning Villkor för Rad #{1} i Betalning Referenser, +{0} is a mandatory Accounting Dimension.
Please set a value for {0} in Accounting Dimensions section.,{0} är erfordrad Bokföring Dimension.
Ange värde för {0} Bokföring Dimensioner., +{0} is added multiple times on rows: {1},{0} läggs till flera gånger på rader: {1}, +{0} is already running for {1}, {0} körs redan för {1}, +{0} is mandatory for account {1},{0} är erfodrad för konto {1}, +{0} is not running. Cannot trigger events for this Document,{0} körs inte. Kan inte utlösa händelser för detta Dokument, +{0} qty of Item {1} is being received into Warehouse {2} with capacity {3}.,{0} kvantitet av artikel {1} tas emot i Lager {2} med kapacitet {3}., +"{0} units are reserved for Item {1} in Warehouse {2}, please un-reserve the same to {3} the Stock Reconciliation.","{0} enheter är reserverade för Artikel {1} i Lager {2}, ta bort reservation för {3} Lager Inventering.", +{0} units of Item {1} is not available in any of the warehouses.,{0} enheter av Artikel {1} är inte tillgängliga på Lager., +{0} units of Item {1} is picked in another Pick List.,{0} enheter av Artikel {1} är vald i en annan Plocklista., +"{0} units of {1} are required in {2}{3}, on {4} {5} for {6} to complete the transaction.","{0} enheter av {1} erfordras i {2}{3}, den {4} {5} för att {6} ska kunna slutföra transaktion.", +{0} units of {1} needed in {2} on {3} {4} to complete this transaction.,{0} enheter av {1} behövs i {2} den {3} {4} för att slutföra denna transaktion., +{0} will be given as discount.,{0} kommer att ges som rabatt., +{0} {1} Manually,{0} {1} Manuellt, +{0} {1} Partially Reconciled,{0} {1} Delvis Avstämd, +"{0} {1} cannot be updated. If you need to make changes, we recommend canceling the existing entry and creating a new one.",{0} {1} kan inte uppdateras. Om du behöver göra ändringar rekommenderar vi att du annullerar befintlig post och skapar ny., +{0} {1} has already been fully paid.,{0} {1} är redan betalad till fullo., +{0} {1} has already been partly paid. Please use the 'Get Outstanding Invoice' or the 'Get Outstanding Orders' button to get the latest outstanding amounts.,"{0} {1} är redan delvis betald. Använd knapp ""Hämta Utestående Faktura"" eller ""Hämta Utestående Ordrar"" knapp för att hämta senaste utestående belopp.", +{0} {1} is allocated twice in this Bank Transaction,{0} {1} är tilldelad två gånger i denna Bank Transaktion, +{0} {1} is not in any active Fiscal Year,{0} {1} är inte under något aktivt Bokföringsår, +{0} {1} is on hold,{0} {1} är parkerad, +{0} {1} not allowed to be reposted. Modify {2} to enable reposting.,{0} {1} får inte läggas upp igen. Ändra {2} för att aktivera omläggning., +{0} {1} via CSV File,{0} {1} via CSV fil, +{0} {1}: Account {2} is a Group Account and group accounts cannot be used in transactions,{0} {1}: Konto {2} är ett grupp konto och grupp konton kan inte användas i transaktioner, +{0} {1}: Cost Center is required for 'Profit and Loss' account {2}.,"{0} {1}: Resultat Enhet erfordras för ""Resultat"" konto {2}.", +{0} {1}: Cost Center {2} is a group cost center and group cost centers cannot be used in transactions,{0} {1}: Resultat Enhet {2} är grupp resultat enhet och grupp resultat enhet kan inte användas i transaktioner, +{0}'s {1} cannot be after {2}'s Expected End Date.,{0}s {1} kan inte vara efter förväntad slut datum för {2}, +{item_name}'s Sample Size ({sample_size}) cannot be greater than the Accepted Quantity ({accepted_quantity}),{item_name} Prov Kvantitet ({sample_size}) kan inte vara högre än accepterad kvantitete ({accepted_quantity}), +{} Available,{} Tillgängliga, +{} To Deliver,{} Att Leverera, +{} To Receive,{} Att Ta Emot, +{} Assigned,{} Tilldelade, +{} Available,{} Tillgängliga, +{} Open,{} Öppen, +{} Pending,{}Pågående, +{} To Bill,{} Att Fakturera, +{} is a child company.,{} är dotter bolag., +{} {} is already linked with another {},{} {} är redan länkad till annan {}, +{} {} is already linked with {} {},{} {} är redan länkad till {} {}, From 19db526fddf1661c8c68571f00b111e4c90ca476 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Fri, 25 Oct 2024 17:11:27 +0530 Subject: [PATCH 0332/1614] refactor: query for expense_account moved to setup hook in purchase invoice (cherry picked from commit a9ac0cc2238d420c518fdcbf69e8ed1defac7f2e) --- .../doctype/purchase_invoice/purchase_invoice.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js index c78db5b86d6..2bb02f2e041 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js @@ -31,6 +31,13 @@ erpnext.accounts.PurchaseInvoice = class PurchaseInvoice extends erpnext.buying. }, }; }); + + this.frm.set_query("expense_account", "items", function () { + return { + query: "erpnext.controllers.queries.get_expense_account", + filters: { company: doc.company }, + }; + }); } onload() { @@ -506,13 +513,6 @@ cur_frm.fields_dict["select_print_heading"].get_query = function (doc, cdt, cdn) }; }; -cur_frm.set_query("expense_account", "items", function (doc) { - return { - query: "erpnext.controllers.queries.get_expense_account", - filters: { company: doc.company }, - }; -}); - cur_frm.set_query("wip_composite_asset", "items", function () { return { filters: { is_composite_asset: 1, docstatus: 0 }, From 9a5604c5bb4f2c8d99fa59bdfb9bc16565aa6ffa Mon Sep 17 00:00:00 2001 From: ljain112 Date: Tue, 15 Oct 2024 18:38:42 +0530 Subject: [PATCH 0333/1614] fix: do not check for payment terms details for return invoices. (cherry picked from commit 6703b7d1aea159d02c4eae6f45e486b27138e29c) --- .../accounts/report/accounts_receivable/accounts_receivable.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py index 8d4a8579ae3..984d77dbad2 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py @@ -522,7 +522,8 @@ class ReceivablePayableReport: from `tab{row.voucher_type}` si, `tabPayment Schedule` ps where si.name = ps.parent and - si.name = %s + si.name = %s and + si.is_return = 0 order by ps.paid_amount desc, due_date """, row.voucher_no, From a826a894f4d9ef2be1c59c4e97f0ceb475b569b4 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Fri, 25 Oct 2024 18:09:01 +0530 Subject: [PATCH 0334/1614] fix: do not set payment terms for return invoices (cherry picked from commit 8b700eadc746698c02573f5af209a962d32be5d6) --- .../accounts/doctype/purchase_invoice/purchase_invoice.js | 4 +++- erpnext/accounts/doctype/sales_invoice/sales_invoice.js | 3 +++ erpnext/controllers/accounts_controller.py | 7 ++++++- erpnext/public/js/controllers/transaction.js | 2 +- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js index 2bb02f2e041..be429689b5a 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js @@ -342,7 +342,9 @@ erpnext.accounts.PurchaseInvoice = class PurchaseInvoice extends erpnext.buying. party_type: "Supplier", account: this.frm.doc.credit_to, price_list: this.frm.doc.buying_price_list, - fetch_payment_terms_template: cint(!this.frm.doc.ignore_default_payment_terms_template), + fetch_payment_terms_template: cint( + (this.frm.doc.is_return == 0) & !this.frm.doc.ignore_default_payment_terms_template + ), }, function () { me.apply_pricing_rule(); diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js index 87b71cd793f..5e248c8b235 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js @@ -339,6 +339,9 @@ erpnext.accounts.SalesInvoiceController = class SalesInvoiceController extends ( account: this.frm.doc.debit_to, price_list: this.frm.doc.selling_price_list, pos_profile: pos_profile, + fetch_payment_terms_template: cint( + (this.frm.doc.is_return == 0) & !this.frm.doc.ignore_default_payment_terms_template + ), }, function () { me.apply_pricing_rule(); diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 188cbf0587c..e6fb5d0d153 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -451,6 +451,11 @@ class AccountsController(TransactionBase): ) def validate_invoice_documents_schedule(self): + if self.is_return: + self.payment_terms_template = "" + self.payment_schedule = [] + return + self.validate_payment_schedule_dates() self.set_due_date() self.set_payment_schedule() @@ -465,7 +470,7 @@ class AccountsController(TransactionBase): self.validate_payment_schedule_amount() def validate_all_documents_schedule(self): - if self.doctype in ("Sales Invoice", "Purchase Invoice") and not self.is_return: + if self.doctype in ("Sales Invoice", "Purchase Invoice"): self.validate_invoice_documents_schedule() elif self.doctype in ("Quotation", "Purchase Order", "Sales Order"): self.validate_non_invoice_documents_schedule() diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 92e9e559ada..f9b78a3b8bc 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -2438,7 +2438,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe payment_terms_template() { var me = this; const doc = this.frm.doc; - if(doc.payment_terms_template && doc.doctype !== 'Delivery Note') { + if(doc.payment_terms_template && doc.doctype !== 'Delivery Note' && doc.is_return == 0) { var posting_date = doc.posting_date || doc.transaction_date; frappe.call({ method: "erpnext.controllers.accounts_controller.get_payment_terms", From 29aa5d64683d8af8864996c4f09214c17b58905d Mon Sep 17 00:00:00 2001 From: ljain112 Date: Fri, 25 Oct 2024 18:14:07 +0530 Subject: [PATCH 0335/1614] fix: hide payment terms for return and paid purchase invoices (cherry picked from commit 912e1e3f3d3a3e3d8b15fee9dfa1dda7c1922e37) # Conflicts: # erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json --- .../accounts/doctype/purchase_invoice/purchase_invoice.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json index c2ee4166ed1..b6205af0fdf 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json @@ -1134,12 +1134,14 @@ "label": "Payment Terms" }, { + "depends_on": "eval:(!doc.is_paid && !doc.is_return)", "fieldname": "payment_terms_template", "fieldtype": "Link", "label": "Payment Terms Template", "options": "Payment Terms Template" }, { + "depends_on": "eval:(!doc.is_paid && !doc.is_return)", "fieldname": "payment_schedule", "fieldtype": "Table", "label": "Payment Schedule", @@ -1631,7 +1633,11 @@ "idx": 204, "is_submittable": 1, "links": [], +<<<<<<< HEAD "modified": "2024-09-11 12:59:19.130593", +======= + "modified": "2024-10-25 18:13:01.944477", +>>>>>>> 912e1e3f3d (fix: hide payment terms for return and paid purchase invoices) "modified_by": "Administrator", "module": "Accounts", "name": "Purchase Invoice", From 27108874ea6969734286d1636762c129f5f7d10e Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 28 Oct 2024 11:50:55 +0530 Subject: [PATCH 0336/1614] chore: replace whitespace with tab --- .../payment_request/payment_request.py | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/erpnext/accounts/doctype/payment_request/payment_request.py b/erpnext/accounts/doctype/payment_request/payment_request.py index 5a206ee433c..7bbf422375a 100644 --- a/erpnext/accounts/doctype/payment_request/payment_request.py +++ b/erpnext/accounts/doctype/payment_request/payment_request.py @@ -300,19 +300,19 @@ class PaymentRequest(Document): if hasattr(controller, "validate_minimum_transaction_amount"): controller.validate_minimum_transaction_amount(self.currency, self.grand_total) - return controller.get_payment_url( - **{ - "amount": flt(self.grand_total, self.precision("grand_total")), - "title": data.company, - "description": self.subject, - "reference_doctype": "Payment Request", - "reference_docname": self.name, - "payer_email": self.email_to or frappe.session.user, - "payer_name": data.customer_name, - "order_id": self.name, - "currency": self.currency, - } - ) + return controller.get_payment_url( + **{ + "amount": flt(self.grand_total, self.precision("grand_total")), + "title": data.company, + "description": self.subject, + "reference_doctype": "Payment Request", + "reference_docname": self.name, + "payer_email": self.email_to or frappe.session.user, + "payer_name": data.customer_name, + "order_id": self.name, + "currency": self.currency, + } + ) def set_as_paid(self): if self.payment_channel == "Phone": From 303ae8321b271aef96f5de61d7bc0ff8b3ee6d80 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 28 Oct 2024 13:33:24 +0530 Subject: [PATCH 0337/1614] chore: resolve conflict --- .../accounts/doctype/purchase_invoice/purchase_invoice.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json index b6205af0fdf..6b21ec5b678 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json @@ -1633,11 +1633,7 @@ "idx": 204, "is_submittable": 1, "links": [], -<<<<<<< HEAD - "modified": "2024-09-11 12:59:19.130593", -======= "modified": "2024-10-25 18:13:01.944477", ->>>>>>> 912e1e3f3d (fix: hide payment terms for return and paid purchase invoices) "modified_by": "Administrator", "module": "Accounts", "name": "Purchase Invoice", From 935f2e11e859002548c26061319ab29678ef85ed Mon Sep 17 00:00:00 2001 From: RAVIBHARATHI P C <131471282+ravibharathi656@users.noreply.github.com> Date: Wed, 23 Oct 2024 14:27:13 +0530 Subject: [PATCH 0338/1614] feat: add party name in payment request (cherry picked from commit 0acb609d97286128f5521506e08e6e899f7feff3) # Conflicts: # erpnext/accounts/doctype/payment_request/payment_request.py --- .../doctype/payment_request/payment_request.json | 11 +++++++++-- .../doctype/payment_request/payment_request.py | 14 ++++++++++++++ erpnext/public/js/controllers/transaction.js | 3 ++- 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/payment_request/payment_request.json b/erpnext/accounts/doctype/payment_request/payment_request.json index b7af8412810..2eef429cd3a 100644 --- a/erpnext/accounts/doctype/payment_request/payment_request.json +++ b/erpnext/accounts/doctype/payment_request/payment_request.json @@ -14,6 +14,7 @@ "party_details", "party_type", "party", + "party_name", "column_break_4", "reference_doctype", "reference_name", @@ -422,13 +423,19 @@ "label": "Party Account Currency", "options": "Currency", "read_only": 1 + }, + { + "fieldname": "party_name", + "fieldtype": "Data", + "label": "Party Name", + "read_only": 1 } ], "in_create": 1, "index_web_pages_for_search": 1, "is_submittable": 1, "links": [], - "modified": "2024-09-16 17:50:54.440090", + "modified": "2024-10-23 12:23:40.117336", "modified_by": "Administrator", "module": "Accounts", "name": "Payment Request", @@ -467,4 +474,4 @@ "sort_field": "modified", "sort_order": "DESC", "states": [] -} +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/payment_request/payment_request.py b/erpnext/accounts/doctype/payment_request/payment_request.py index 7bbf422375a..e479b3c7a0c 100644 --- a/erpnext/accounts/doctype/payment_request/payment_request.py +++ b/erpnext/accounts/doctype/payment_request/payment_request.py @@ -71,6 +71,7 @@ class PaymentRequest(Document): outstanding_amount: DF.Currency party: DF.DynamicLink | None party_account_currency: DF.Link | None + party_name: DF.Data | None party_type: DF.Link | None payment_account: DF.ReadOnly | None payment_channel: DF.Literal["", "Email", "Phone", "Other"] @@ -609,6 +610,19 @@ def make_payment_request(**args): "party_type": party_type, "party": args.get("party") or ref_doc.get("customer"), "bank_account": bank_account, +<<<<<<< HEAD +======= + "party_name": args.get("party_name") or ref_doc.get("customer_name"), + "make_sales_invoice": ( + args.make_sales_invoice # new standard + or args.order_type == "Shopping Cart" # compat for webshop app + ), + "mute_email": ( + args.mute_email # new standard + or args.order_type == "Shopping Cart" # compat for webshop app + or gateway_account.get("payment_channel", "Email") != "Email" + ), +>>>>>>> 0acb609d97 (feat: add party name in payment request) } ) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index f9b78a3b8bc..adb72818fe8 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -375,7 +375,8 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe recipient_id: me.frm.doc.contact_email, payment_request_type: payment_request_type, party_type: payment_request_type == 'Outward' ? "Supplier" : "Customer", - party: payment_request_type == 'Outward' ? me.frm.doc.supplier : me.frm.doc.customer + party: payment_request_type == 'Outward' ? me.frm.doc.supplier : me.frm.doc.customer, + party_name:payment_request_type == 'Outward' ? me.frm.doc.supplier_name : me.frm.doc.customer_name }, callback: function(r) { if(!r.exc){ From a937e32989ab7dfddd31a99335ab2e232def3746 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 29 Oct 2024 11:55:50 +0530 Subject: [PATCH 0339/1614] chore: resolve conflict --- .../doctype/payment_request/payment_request.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/erpnext/accounts/doctype/payment_request/payment_request.py b/erpnext/accounts/doctype/payment_request/payment_request.py index e479b3c7a0c..2d4a64c317b 100644 --- a/erpnext/accounts/doctype/payment_request/payment_request.py +++ b/erpnext/accounts/doctype/payment_request/payment_request.py @@ -610,19 +610,7 @@ def make_payment_request(**args): "party_type": party_type, "party": args.get("party") or ref_doc.get("customer"), "bank_account": bank_account, -<<<<<<< HEAD -======= "party_name": args.get("party_name") or ref_doc.get("customer_name"), - "make_sales_invoice": ( - args.make_sales_invoice # new standard - or args.order_type == "Shopping Cart" # compat for webshop app - ), - "mute_email": ( - args.mute_email # new standard - or args.order_type == "Shopping Cart" # compat for webshop app - or gateway_account.get("payment_channel", "Email") != "Email" - ), ->>>>>>> 0acb609d97 (feat: add party name in payment request) } ) From 8bfc212e262654ee9397fc435e2f08ccd286a520 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 29 Oct 2024 12:08:24 +0530 Subject: [PATCH 0340/1614] =?UTF-8?q?fix:=20use=20period=20closing=20vouch?= =?UTF-8?q?er=20object=20to=20call=20get=5Faccount=5Fclosing=5Fba=E2=80=A6?= =?UTF-8?q?=20(backport=20#43880)=20(#43883)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix: use period closing voucher object to call get_account_closing_ba… (#43880) fix: use period closing voucher object to call get_account_closing_balances method (cherry picked from commit 99d1c5f34221d3f450aa74825339209c7595bcb9) Co-authored-by: Venkatesh <47534423+venkat102@users.noreply.github.com> --- erpnext/patches/v14_0/update_closing_balances.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/erpnext/patches/v14_0/update_closing_balances.py b/erpnext/patches/v14_0/update_closing_balances.py index a2670717ee9..73204b0d6c4 100644 --- a/erpnext/patches/v14_0/update_closing_balances.py +++ b/erpnext/patches/v14_0/update_closing_balances.py @@ -24,8 +24,9 @@ def execute(): for pcv in get_period_closing_vouchers(company): company_wise_order.setdefault(pcv.company, []) if pcv.period_end_date not in company_wise_order[pcv.company]: - pcv.pl_accounts_reverse_gle = get_pcv_gl_entries(pcv, gle_fields) - closing_entries = pcv.get_account_closing_balances() + pcv_doc = frappe.get_doc("Period Closing Voucher", pcv.name) + pcv_doc.pl_accounts_reverse_gle = get_pcv_gl_entries(pcv, gle_fields) + closing_entries = pcv_doc.get_account_closing_balances() if closing_entries: make_closing_entries(closing_entries, pcv.name, pcv.company, pcv.period_end_date) From c70282663c69955d49ce41c772056cfe02bae975 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Wed, 23 Oct 2024 18:13:42 +0530 Subject: [PATCH 0341/1614] fix: scrub "-" from fieldname in accounting dimension (cherry picked from commit 023b7b9a606483de52caf21bb9dad9f1d18c65bd) --- .../doctype/accounting_dimension/accounting_dimension.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.js b/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.js index 4e45dede1d5..6f4f9f8d782 100644 --- a/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.js +++ b/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.js @@ -58,7 +58,7 @@ frappe.ui.form.on("Accounting Dimension", { }, label: function (frm) { - frm.set_value("fieldname", frappe.model.scrub(frm.doc.label)); + frm.set_value("fieldname", frm.doc.label.replace(/ /g, "_").replace(/-/g, "_").toLowerCase()); }, document_type: function (frm) { From b21abf4d9056496f016c9aedf0182bb8dff7688d Mon Sep 17 00:00:00 2001 From: ljain112 Date: Wed, 23 Oct 2024 18:14:30 +0530 Subject: [PATCH 0342/1614] fix: validate fieldname (cherry picked from commit ca31a19eb7da1fa7fb9295911662fb55c14754a2) --- .../doctype/accounting_dimension/accounting_dimension.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.py b/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.py index db99bcd223b..8fc22dd7650 100644 --- a/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.py +++ b/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.py @@ -7,6 +7,7 @@ import json import frappe from frappe import _, scrub from frappe.custom.doctype.custom_field.custom_field import create_custom_field +from frappe.database.schema import validate_column_name from frappe.model import core_doctypes_list from frappe.model.document import Document from frappe.utils import cstr @@ -60,6 +61,7 @@ class AccountingDimension(Document): if not self.is_new(): self.validate_document_type_change() + validate_column_name(self.fieldname) self.validate_dimension_defaults() def validate_document_type_change(self): From 13557a2c1035c849dc76157691446641f3c288ce Mon Sep 17 00:00:00 2001 From: "lukas.brandhoff" Date: Wed, 16 Oct 2024 13:24:57 +0000 Subject: [PATCH 0343/1614] refactor: include 'Project Name' in Project summary report Keep name field for backwards compatibility (cherry picked from commit 736d1a1105009c272c6b2ba3cec6b6741c39b62d) --- .../projects/report/project_summary/project_summary.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/erpnext/projects/report/project_summary/project_summary.py b/erpnext/projects/report/project_summary/project_summary.py index 7a35fd236a0..261517f02c6 100644 --- a/erpnext/projects/report/project_summary/project_summary.py +++ b/erpnext/projects/report/project_summary/project_summary.py @@ -15,6 +15,7 @@ def execute(filters=None): filters=filters, fields=[ "name", + "project_name", "status", "percent_complete", "expected_start_date", @@ -48,6 +49,11 @@ def get_columns(): "options": "Project", "width": 200, }, + { + "fieldname": "project_name", + "label": _("Project Name"), + "width": 200, + }, { "fieldname": "project_type", "label": _("Type"), @@ -82,7 +88,7 @@ def get_chart_data(data): overdue = [] for project in data: - labels.append(project.name) + labels.append(project.project_name) total.append(project.total_tasks) completed.append(project.completed_tasks) overdue.append(project.overdue_tasks) From 603d2cf77dd8ca6bae612dc9b406a37416c3fb72 Mon Sep 17 00:00:00 2001 From: Imesha Sudasingha Date: Mon, 28 Oct 2024 03:43:56 +0000 Subject: [PATCH 0344/1614] fix: add parenttype clause to invoice tax query in sales_register report (cherry picked from commit e30ab141f4bc51b1378eb80d1bf3885453afbcfe) --- erpnext/accounts/report/sales_register/sales_register.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/report/sales_register/sales_register.py b/erpnext/accounts/report/sales_register/sales_register.py index 6c0bf91e3f8..34d53238f50 100644 --- a/erpnext/accounts/report/sales_register/sales_register.py +++ b/erpnext/accounts/report/sales_register/sales_register.py @@ -526,7 +526,8 @@ def get_invoice_tax_map(invoice_list, invoice_income_map, income_accounts, inclu tax_details = frappe.db.sql( """select parent, account_head, sum(base_tax_amount_after_discount_amount) as tax_amount - from `tabSales Taxes and Charges` where parent in (%s) group by parent, account_head""" + from `tabSales Taxes and Charges` where parent in (%s) and parenttype = 'Sales Invoice' + group by parent, account_head""" % ", ".join(["%s"] * len(invoice_list)), tuple(inv.name for inv in invoice_list), as_dict=1, From d06831ea9404852bcf730b6b17de6059ff5b1227 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 29 Oct 2024 15:48:40 +0530 Subject: [PATCH 0345/1614] fix: do not copy serial numbers from DN to SI (backport #43885) (#43893) fix: do not copy serial numbers from DN to SI (#43885) (cherry picked from commit 0c93bc31a5f3fdecfb2f9e053341eb8b90ce1851) Co-authored-by: rohitwaghchaure --- erpnext/stock/doctype/delivery_note/delivery_note.py | 1 - 1 file changed, 1 deletion(-) diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.py b/erpnext/stock/doctype/delivery_note/delivery_note.py index cb006bb3e99..68eb07d3a77 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note.py +++ b/erpnext/stock/doctype/delivery_note/delivery_note.py @@ -1020,7 +1020,6 @@ def make_sales_invoice(source_name, target_doc=None, args=None): "parent": "delivery_note", "so_detail": "so_detail", "against_sales_order": "sales_order", - "serial_no": "serial_no", "cost_center": "cost_center", }, "postprocess": update_item, From e22d0a3406932956598ac4e7024cdee68bf713d8 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 29 Oct 2024 17:25:40 +0530 Subject: [PATCH 0346/1614] fix: post account closing balance against pcv closing account (backport #43887) (#43898) fix: post account closing balance against pcv closing account (#43887) (cherry picked from commit 34295d0344573a296d5fb76e6cc2c819a93354b2) Co-authored-by: Nabin Hait --- .../period_closing_voucher.py | 13 ++++++++++--- erpnext/patches/v14_0/update_closing_balances.py | 3 +-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py index 99b42089501..6ffa6346702 100644 --- a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py +++ b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py @@ -354,7 +354,8 @@ class PeriodClosingVoucher(AccountsController): def get_account_closing_balances(self): pl_closing_entries = self.get_closing_entries_for_pl_accounts() bs_closing_entries = self.get_closing_entries_for_balance_sheet_accounts() - closing_entries = pl_closing_entries + bs_closing_entries + closing_entries_for_closing_account = self.get_closing_entries_for_closing_account() + closing_entries = pl_closing_entries + bs_closing_entries + closing_entries_for_closing_account return closing_entries def get_closing_entries_for_pl_accounts(self): @@ -404,6 +405,13 @@ class PeriodClosingVoucher(AccountsController): self.update_default_dimensions(closing_entry, dimensions) return closing_entry + def get_closing_entries_for_closing_account(self): + closing_entries = copy.deepcopy(self.closing_account_gle) + for d in closing_entries: + d.period_closing_voucher = self.name + + return closing_entries + def is_first_period_closing_voucher(self): return not frappe.db.exists( "Period Closing Voucher", @@ -442,8 +450,7 @@ def process_gl_and_closing_entries(doc): make_gl_entries(gl_entries, merge_entries=False) closing_entries = doc.get_account_closing_balances() - if closing_entries: - make_closing_entries(closing_entries, doc.name, doc.company, doc.period_end_date) + make_closing_entries(closing_entries, doc.name, doc.company, doc.period_end_date) frappe.db.set_value(doc.doctype, doc.name, "gle_processing_status", "Completed") except Exception as e: diff --git a/erpnext/patches/v14_0/update_closing_balances.py b/erpnext/patches/v14_0/update_closing_balances.py index 73204b0d6c4..f216f209d4f 100644 --- a/erpnext/patches/v14_0/update_closing_balances.py +++ b/erpnext/patches/v14_0/update_closing_balances.py @@ -27,8 +27,7 @@ def execute(): pcv_doc = frappe.get_doc("Period Closing Voucher", pcv.name) pcv_doc.pl_accounts_reverse_gle = get_pcv_gl_entries(pcv, gle_fields) closing_entries = pcv_doc.get_account_closing_balances() - if closing_entries: - make_closing_entries(closing_entries, pcv.name, pcv.company, pcv.period_end_date) + make_closing_entries(closing_entries, pcv.name, pcv.company, pcv.period_end_date) company_wise_order[pcv.company].append(pcv.period_end_date) i += 1 From cd4746ad2a1cac13c97a798a07bb4abee322f29f Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 29 Oct 2024 17:58:40 +0530 Subject: [PATCH 0347/1614] =?UTF-8?q?fix:=20incorrect=20value=20of=20avail?= =?UTF-8?q?able=5Fqty=5Ffor=5Fconsumption=20in=20subcontracti=E2=80=A6=20(?= =?UTF-8?q?backport=20#43836)=20(#43861)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix: incorrect value of available_qty_for_consumption in subcontracti… (#43836) fix: incorrect value of available_qty_for_consumption in subcontracting receipt (cherry picked from commit ad6ce09b865786d99daca38194bdeeea53aa11e6) Co-authored-by: rohitwaghchaure --- .../doctype/subcontracting_receipt/subcontracting_receipt.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.py b/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.py index 50ce270c166..a99f7ea1615 100644 --- a/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.py +++ b/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.py @@ -331,9 +331,12 @@ class SubcontractingReceipt(SubcontractingController): supplied_items_details[item.name] = {} for supplied_item in supplied_items: + if supplied_item.rm_item_code not in supplied_items_details[item.name]: + supplied_items_details[item.name][supplied_item.rm_item_code] = 0.0 + supplied_items_details[item.name][ supplied_item.rm_item_code - ] = supplied_item.available_qty + ] += supplied_item.available_qty else: for item in self.get("supplied_items"): item.available_qty_for_consumption = supplied_items_details.get(item.reference_name, {}).get( From 94a03c6e17f797dd4ffb533ce9ff0af2f3d5d6ff Mon Sep 17 00:00:00 2001 From: Venkatesh <47534423+venkat102@users.noreply.github.com> Date: Tue, 29 Oct 2024 11:47:40 +0530 Subject: [PATCH 0348/1614] =?UTF-8?q?fix:=20use=20period=20closing=20vouch?= =?UTF-8?q?er=20object=20to=20call=20get=5Faccount=5Fclosing=5Fba=E2=80=A6?= =?UTF-8?q?=20(#43880)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix: use period closing voucher object to call get_account_closing_balances method (cherry picked from commit 99d1c5f34221d3f450aa74825339209c7595bcb9) --- erpnext/patches/v14_0/update_closing_balances.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/erpnext/patches/v14_0/update_closing_balances.py b/erpnext/patches/v14_0/update_closing_balances.py index a2670717ee9..73204b0d6c4 100644 --- a/erpnext/patches/v14_0/update_closing_balances.py +++ b/erpnext/patches/v14_0/update_closing_balances.py @@ -24,8 +24,9 @@ def execute(): for pcv in get_period_closing_vouchers(company): company_wise_order.setdefault(pcv.company, []) if pcv.period_end_date not in company_wise_order[pcv.company]: - pcv.pl_accounts_reverse_gle = get_pcv_gl_entries(pcv, gle_fields) - closing_entries = pcv.get_account_closing_balances() + pcv_doc = frappe.get_doc("Period Closing Voucher", pcv.name) + pcv_doc.pl_accounts_reverse_gle = get_pcv_gl_entries(pcv, gle_fields) + closing_entries = pcv_doc.get_account_closing_balances() if closing_entries: make_closing_entries(closing_entries, pcv.name, pcv.company, pcv.period_end_date) From be6cd6adc3d00cf925f91db5c7cf31157af534fa Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Tue, 29 Oct 2024 15:34:46 +0000 Subject: [PATCH 0349/1614] chore(release): Bumped to Version 15.39.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## [15.39.4](https://github.com/frappe/erpnext/compare/v15.39.3...v15.39.4) (2024-10-29) ### Bug Fixes * use period closing voucher object to call get_account_closing_ba… ([#43880](https://github.com/frappe/erpnext/issues/43880)) ([94a03c6](https://github.com/frappe/erpnext/commit/94a03c6e17f797dd4ffb533ce9ff0af2f3d5d6ff)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 645337290fb..d8473c0d258 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.39.3" +__version__ = "15.39.4" def get_default_company(user=None): From becfd980b2f4219aa15ec9dc7b94f7ae037196d7 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 29 Oct 2024 16:53:11 +0530 Subject: [PATCH 0350/1614] fix: post account closing balance against pcv closing account (#43887) (cherry picked from commit 34295d0344573a296d5fb76e6cc2c819a93354b2) --- .../period_closing_voucher.py | 13 ++++++++++--- erpnext/patches/v14_0/update_closing_balances.py | 3 +-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py index 99b42089501..6ffa6346702 100644 --- a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py +++ b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py @@ -354,7 +354,8 @@ class PeriodClosingVoucher(AccountsController): def get_account_closing_balances(self): pl_closing_entries = self.get_closing_entries_for_pl_accounts() bs_closing_entries = self.get_closing_entries_for_balance_sheet_accounts() - closing_entries = pl_closing_entries + bs_closing_entries + closing_entries_for_closing_account = self.get_closing_entries_for_closing_account() + closing_entries = pl_closing_entries + bs_closing_entries + closing_entries_for_closing_account return closing_entries def get_closing_entries_for_pl_accounts(self): @@ -404,6 +405,13 @@ class PeriodClosingVoucher(AccountsController): self.update_default_dimensions(closing_entry, dimensions) return closing_entry + def get_closing_entries_for_closing_account(self): + closing_entries = copy.deepcopy(self.closing_account_gle) + for d in closing_entries: + d.period_closing_voucher = self.name + + return closing_entries + def is_first_period_closing_voucher(self): return not frappe.db.exists( "Period Closing Voucher", @@ -442,8 +450,7 @@ def process_gl_and_closing_entries(doc): make_gl_entries(gl_entries, merge_entries=False) closing_entries = doc.get_account_closing_balances() - if closing_entries: - make_closing_entries(closing_entries, doc.name, doc.company, doc.period_end_date) + make_closing_entries(closing_entries, doc.name, doc.company, doc.period_end_date) frappe.db.set_value(doc.doctype, doc.name, "gle_processing_status", "Completed") except Exception as e: diff --git a/erpnext/patches/v14_0/update_closing_balances.py b/erpnext/patches/v14_0/update_closing_balances.py index 73204b0d6c4..f216f209d4f 100644 --- a/erpnext/patches/v14_0/update_closing_balances.py +++ b/erpnext/patches/v14_0/update_closing_balances.py @@ -27,8 +27,7 @@ def execute(): pcv_doc = frappe.get_doc("Period Closing Voucher", pcv.name) pcv_doc.pl_accounts_reverse_gle = get_pcv_gl_entries(pcv, gle_fields) closing_entries = pcv_doc.get_account_closing_balances() - if closing_entries: - make_closing_entries(closing_entries, pcv.name, pcv.company, pcv.period_end_date) + make_closing_entries(closing_entries, pcv.name, pcv.company, pcv.period_end_date) company_wise_order[pcv.company].append(pcv.period_end_date) i += 1 From 50db0aca61c31b1f32b5d96baaff63ddc9c20e1c Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Tue, 29 Oct 2024 15:39:40 +0000 Subject: [PATCH 0351/1614] chore(release): Bumped to Version 15.39.5 ## [15.39.5](https://github.com/frappe/erpnext/compare/v15.39.4...v15.39.5) (2024-10-29) ### Bug Fixes * post account closing balance against pcv closing account ([#43887](https://github.com/frappe/erpnext/issues/43887)) ([becfd98](https://github.com/frappe/erpnext/commit/becfd980b2f4219aa15ec9dc7b94f7ae037196d7)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index d8473c0d258..3b36669ae7c 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.39.4" +__version__ = "15.39.5" def get_default_company(user=None): From 93d0db29100735cca01228ccf943a5abeb772bf9 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 29 Oct 2024 22:36:39 +0530 Subject: [PATCH 0352/1614] fix: Calculate gross margin on update of project costing from invoices (backport #43876) (#43900) * fix: Calculate gross margin on update of project costing from invoices (#43876) * fix: Calculate gross margin on update of project costing from invoices * chore: linter issues (cherry picked from commit 0bba6442c0f64bbf36f79d0df27bb922275d96af) # Conflicts: # erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json * fix: merge conflict --------- Co-authored-by: Nabin Hait --- .../purchase_invoice/purchase_invoice.py | 6 ++- .../purchase_invoice_item.json | 5 ++- .../doctype/sales_invoice/sales_invoice.py | 6 ++- .../sales_invoice_item.json | 5 ++- erpnext/projects/doctype/project/project.py | 42 +++++-------------- 5 files changed, 26 insertions(+), 38 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index c9f3b220cc6..b46fb9e9b30 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -1593,7 +1593,11 @@ class PurchaseInvoice(BuyingController): for proj, value in projects.items(): res = frappe.qb.from_(pj).select(pj.total_purchase_cost).where(pj.name == proj).for_update().run() current_purchase_cost = res and res[0][0] or 0 - frappe.db.set_value("Project", proj, "total_purchase_cost", current_purchase_cost + value) + # frappe.db.set_value("Project", proj, "total_purchase_cost", current_purchase_cost + value) + project_doc = frappe.get_doc("Project", proj) + project_doc.total_purchase_cost = current_purchase_cost + value + project_doc.calculate_gross_margin() + project_doc.db_update() def validate_supplier_invoice(self): if self.bill_date: diff --git a/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json b/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json index 8a2ba36cf62..258cc10d4ec 100644 --- a/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json +++ b/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json @@ -505,7 +505,8 @@ "fieldtype": "Link", "label": "Project", "options": "Project", - "print_hide": 1 + "print_hide": 1, + "search_index": 1 }, { "allow_on_submit": 1, @@ -974,7 +975,7 @@ "idx": 1, "istable": 1, "links": [], - "modified": "2024-07-19 12:12:42.449298", + "modified": "2024-10-28 15:06:19.246141", "modified_by": "Administrator", "module": "Accounts", "name": "Purchase Invoice Item", diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index ebdbb01fdc2..eb43de47a54 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -1734,9 +1734,11 @@ class SalesInvoice(SellingController): ) def update_project(self): - if self.project: - project = frappe.get_doc("Project", self.project) + unique_projects = list(set([d.project for d in self.get("items") if d.project])) + for p in unique_projects: + project = frappe.get_doc("Project", p) project.update_billed_amount() + project.calculate_gross_margin() project.db_update() def verify_payment_amount_is_positive(self): diff --git a/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json b/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json index 932bc8e49d4..8b93f56a4c2 100644 --- a/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json +++ b/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json @@ -812,7 +812,8 @@ "fieldname": "project", "fieldtype": "Link", "label": "Project", - "options": "Project" + "options": "Project", + "search_index": 1 }, { "depends_on": "eval:parent.update_stock == 1", @@ -927,7 +928,7 @@ "idx": 1, "istable": 1, "links": [], - "modified": "2024-05-23 16:36:18.970862", + "modified": "2024-10-28 15:06:40.980995", "modified_by": "Administrator", "module": "Accounts", "name": "Sales Invoice Item", diff --git a/erpnext/projects/doctype/project/project.py b/erpnext/projects/doctype/project/project.py index 7870a2ace73..f1512501e76 100644 --- a/erpnext/projects/doctype/project/project.py +++ b/erpnext/projects/doctype/project/project.py @@ -93,14 +93,14 @@ class Project(Document): def validate(self): if not self.is_new(): - self.copy_from_template() + self.copy_from_template() # nosemgrep self.send_welcome_email() self.update_costing() self.update_percent_complete() self.validate_from_to_dates("expected_start_date", "expected_end_date") self.validate_from_to_dates("actual_start_date", "actual_end_date") - def copy_from_template(self): + def copy_from_template(self): # nosemgrep """ Copy tasks from template """ @@ -205,7 +205,7 @@ class Project(Document): self.db_update() def after_insert(self): - self.copy_from_template() + self.copy_from_template() # nosemgrep if self.sales_order: frappe.db.set_value("Sales Order", self.sales_order, "project", self.name) @@ -324,9 +324,13 @@ class Project(Document): self.total_sales_amount = total_sales_amount and total_sales_amount[0][0] or 0 def update_billed_amount(self): + # nosemgrep total_billed_amount = frappe.db.sql( - """select sum(base_net_total) - from `tabSales Invoice` where project = %s and docstatus=1""", + """select sum(base_net_amount) + from `tabSales Invoice Item` si_item, `tabSales Invoice` si + where si_item.parent = si.name + and if(si_item.project, si_item.project, si.project) = %s + and si.docstatus=1""", self.name, ) @@ -676,31 +680,8 @@ def update_project_sales_billing(): return # Else simply fallback to Daily - exists_query = "(SELECT 1 from `tab{doctype}` where docstatus = 1 and project = `tabProject`.name)" - project_map = {} - for project_details in frappe.db.sql( - """ - SELECT name, 1 as order_exists, null as invoice_exists from `tabProject` where - exists {order_exists} - union - SELECT name, null as order_exists, 1 as invoice_exists from `tabProject` where - exists {invoice_exists} - """.format( - order_exists=exists_query.format(doctype="Sales Order"), - invoice_exists=exists_query.format(doctype="Sales Invoice"), - ), - as_dict=True, - ): - project = project_map.setdefault( - project_details.name, frappe.get_doc("Project", project_details.name) - ) - if project_details.order_exists: - project.update_sales_amount() - if project_details.invoice_exists: - project.update_billed_amount() - - for project in project_map.values(): - project.save() + for project in frappe.get_all("Project", filters={"status": ["!=", "Cancelled"]}): + frappe.get_doc("Project", project.name).save() @frappe.whitelist() @@ -751,7 +732,6 @@ def get_users_email(doc): def calculate_total_purchase_cost(project: str | None = None): if project: pitem = qb.DocType("Purchase Invoice Item") - frappe.qb.DocType("Purchase Invoice Item") total_purchase_cost = ( qb.from_(pitem) .select(Sum(pitem.base_net_amount)) From 7189daba193127350d74f5397147ab27a5525f60 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 29 Oct 2024 22:37:26 +0530 Subject: [PATCH 0353/1614] fix: work order finish button not showing (backport #43875) (backport #43877) (#43904) fix: work order finish button not showing (backport #43875) (#43877) * fix: work order finish button not showing (#43875) (cherry picked from commit 0a70be5b993895dcc888c7418bbd675224554d2b) # Conflicts: # erpnext/manufacturing/doctype/job_card/job_card.js # erpnext/manufacturing/doctype/job_card/job_card.py * chore: fix conflicts * chore: fix conflicts * chore: fix conflicts --------- Co-authored-by: rohitwaghchaure (cherry picked from commit 76530de786d9a220ca9e59720184b5d5b9328979) Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- .../doctype/job_card/job_card.py | 23 +++++++------------ 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/erpnext/manufacturing/doctype/job_card/job_card.py b/erpnext/manufacturing/doctype/job_card/job_card.py index de8116b296c..58637109077 100644 --- a/erpnext/manufacturing/doctype/job_card/job_card.py +++ b/erpnext/manufacturing/doctype/job_card/job_card.py @@ -941,26 +941,19 @@ class JobCard(Document): qty = 0 if self.work_order: - doc = frappe.get_doc("Work Order", self.work_order) if doc.transfer_material_against == "Job Card" and not doc.skip_transfer: - completed = True + min_qty = [] for d in doc.operations: - if d.status != "Completed": - completed = False + if d.completed_qty: + min_qty.append(d.completed_qty) + else: + min_qty = [] break - if completed: - job_cards = frappe.get_all( - "Job Card", - filters={"work_order": self.work_order, "docstatus": ("!=", 2)}, - fields="sum(transferred_qty) as qty", - group_by="operation_id", - ) + if min_qty: + qty = min(min_qty) - if job_cards: - qty = min(d.qty for d in job_cards) - - doc.db_set("material_transferred_for_manufacturing", qty) + doc.db_set("material_transferred_for_manufacturing", qty) self.set_status(update_status) From 8a72845ee6fa7f954e6915272ea722f487907171 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 29 Oct 2024 22:38:41 +0530 Subject: [PATCH 0354/1614] fix: Handle None value for item description in customer portal invoice view (backport #43823) (#43889) fix: Handle None value for item description in customer portal invoice view (cherry picked from commit ceb449c75b830c1c18adffd9a6e68557507b76c4) Co-authored-by: ljain112 --- erpnext/templates/pages/order.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/templates/pages/order.html b/erpnext/templates/pages/order.html index 6c59a9688dc..388feb9eba9 100644 --- a/erpnext/templates/pages/order.html +++ b/erpnext/templates/pages/order.html @@ -173,11 +173,11 @@
{{ d.item_code }}
- {{ html2text(d.description) | truncate(140) }} + {{ html2text(d.description or "") | truncate(140) }}
{{ _("Qty ") }}({{ d.get_formatted("qty") }})
-{% endmacro %} \ No newline at end of file +{% endmacro %} From c2eb771c4d228458a95db99dbbb2f96c4a00db02 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 29 Oct 2024 23:07:58 +0530 Subject: [PATCH 0355/1614] fix: Patch for reposting account closing balance (backport #43905) (#43909) fix: Patch for reposting account closing balance (#43905) (cherry picked from commit 3a0d27b393a6224e9213d23c022f9b45687d7508) Co-authored-by: Nabin Hait --- erpnext/patches.txt | 2 +- .../patches/v14_0/update_closing_balances.py | 21 ++++++++++++++++--- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 515a299504a..f48dc00fc8e 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -315,7 +315,7 @@ erpnext.patches.v15_0.update_asset_value_for_manual_depr_entries erpnext.patches.v15_0.update_gpa_and_ndb_for_assdeprsch erpnext.patches.v14_0.create_accounting_dimensions_for_closing_balance erpnext.patches.v14_0.set_period_start_end_date_in_pcv -erpnext.patches.v14_0.update_closing_balances #14-07-2023 +erpnext.patches.v14_0.update_closing_balances #29-10-2024 execute:frappe.db.set_single_value("Accounts Settings", "merge_similar_account_heads", 0) erpnext.patches.v14_0.update_reference_type_in_journal_entry_accounts erpnext.patches.v14_0.update_subscription_details diff --git a/erpnext/patches/v14_0/update_closing_balances.py b/erpnext/patches/v14_0/update_closing_balances.py index f216f209d4f..31c7e85d875 100644 --- a/erpnext/patches/v14_0/update_closing_balances.py +++ b/erpnext/patches/v14_0/update_closing_balances.py @@ -25,7 +25,8 @@ def execute(): company_wise_order.setdefault(pcv.company, []) if pcv.period_end_date not in company_wise_order[pcv.company]: pcv_doc = frappe.get_doc("Period Closing Voucher", pcv.name) - pcv_doc.pl_accounts_reverse_gle = get_pcv_gl_entries(pcv, gle_fields) + pcv_doc.pl_accounts_reverse_gle = get_pcv_gl_entries_for_pl_accounts(pcv, gle_fields) + pcv_doc.closing_account_gle = get_pcv_gl_entries_for_closing_accounts(pcv, gle_fields) closing_entries = pcv_doc.get_account_closing_balances() make_closing_entries(closing_entries, pcv.name, pcv.company, pcv.period_end_date) @@ -38,6 +39,7 @@ def get_gle_fields(): accounting_dimension_fields = get_accounting_dimensions() gle_fields = [ "name", + "company", "posting_date", "account", "account_currency", @@ -61,14 +63,27 @@ def get_period_closing_vouchers(company): ) -def get_pcv_gl_entries(pcv, gle_fields): +def get_pcv_gl_entries_for_pl_accounts(pcv, gle_fields): + return get_gl_entries(pcv, gle_fields, {"account": ["!=", pcv.closing_account_head]}) + + +def get_pcv_gl_entries_for_closing_accounts(pcv, gle_fields): + return get_gl_entries(pcv, gle_fields, {"account": pcv.closing_account_head}) + + +def get_gl_entries(pcv, gle_fields, accounts_filter=None): + filters = {"voucher_no": pcv.name, "is_cancelled": 0} + if accounts_filter: + filters.update(accounts_filter) + gl_entries = frappe.db.get_all( "GL Entry", - filters={"voucher_no": pcv.name, "account": ["!=", pcv.closing_account_head], "is_cancelled": 0}, + filters=filters, fields=gle_fields, ) for entry in gl_entries: entry["is_period_closing_voucher_entry"] = 1 entry["closing_date"] = pcv.period_end_date entry["period_closing_voucher"] = pcv.name + return gl_entries From d8e1a21bdc34d88c77c33b2f21d53561fe81b1b1 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Tue, 29 Oct 2024 17:39:33 +0000 Subject: [PATCH 0356/1614] chore(release): Bumped to Version 15.39.6 ## [15.39.6](https://github.com/frappe/erpnext/compare/v15.39.5...v15.39.6) (2024-10-29) ### Bug Fixes * Patch for reposting account closing balance (backport [#43905](https://github.com/frappe/erpnext/issues/43905)) ([#43909](https://github.com/frappe/erpnext/issues/43909)) ([c2eb771](https://github.com/frappe/erpnext/commit/c2eb771c4d228458a95db99dbbb2f96c4a00db02)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 3b36669ae7c..b05af8dad95 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.39.5" +__version__ = "15.39.6" def get_default_company(user=None): From ab162070a6dd08bc2a7217242dc5085d190b60ff Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 29 Oct 2024 23:22:29 +0530 Subject: [PATCH 0357/1614] fix: Patch for reposting account closing balance (backport #43905) (#43910) fix: Patch for reposting account closing balance (#43905) (cherry picked from commit 3a0d27b393a6224e9213d23c022f9b45687d7508) Co-authored-by: Nabin Hait --- erpnext/patches.txt | 2 +- .../patches/v14_0/update_closing_balances.py | 21 ++++++++++++++++--- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 515a299504a..f48dc00fc8e 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -315,7 +315,7 @@ erpnext.patches.v15_0.update_asset_value_for_manual_depr_entries erpnext.patches.v15_0.update_gpa_and_ndb_for_assdeprsch erpnext.patches.v14_0.create_accounting_dimensions_for_closing_balance erpnext.patches.v14_0.set_period_start_end_date_in_pcv -erpnext.patches.v14_0.update_closing_balances #14-07-2023 +erpnext.patches.v14_0.update_closing_balances #29-10-2024 execute:frappe.db.set_single_value("Accounts Settings", "merge_similar_account_heads", 0) erpnext.patches.v14_0.update_reference_type_in_journal_entry_accounts erpnext.patches.v14_0.update_subscription_details diff --git a/erpnext/patches/v14_0/update_closing_balances.py b/erpnext/patches/v14_0/update_closing_balances.py index f216f209d4f..31c7e85d875 100644 --- a/erpnext/patches/v14_0/update_closing_balances.py +++ b/erpnext/patches/v14_0/update_closing_balances.py @@ -25,7 +25,8 @@ def execute(): company_wise_order.setdefault(pcv.company, []) if pcv.period_end_date not in company_wise_order[pcv.company]: pcv_doc = frappe.get_doc("Period Closing Voucher", pcv.name) - pcv_doc.pl_accounts_reverse_gle = get_pcv_gl_entries(pcv, gle_fields) + pcv_doc.pl_accounts_reverse_gle = get_pcv_gl_entries_for_pl_accounts(pcv, gle_fields) + pcv_doc.closing_account_gle = get_pcv_gl_entries_for_closing_accounts(pcv, gle_fields) closing_entries = pcv_doc.get_account_closing_balances() make_closing_entries(closing_entries, pcv.name, pcv.company, pcv.period_end_date) @@ -38,6 +39,7 @@ def get_gle_fields(): accounting_dimension_fields = get_accounting_dimensions() gle_fields = [ "name", + "company", "posting_date", "account", "account_currency", @@ -61,14 +63,27 @@ def get_period_closing_vouchers(company): ) -def get_pcv_gl_entries(pcv, gle_fields): +def get_pcv_gl_entries_for_pl_accounts(pcv, gle_fields): + return get_gl_entries(pcv, gle_fields, {"account": ["!=", pcv.closing_account_head]}) + + +def get_pcv_gl_entries_for_closing_accounts(pcv, gle_fields): + return get_gl_entries(pcv, gle_fields, {"account": pcv.closing_account_head}) + + +def get_gl_entries(pcv, gle_fields, accounts_filter=None): + filters = {"voucher_no": pcv.name, "is_cancelled": 0} + if accounts_filter: + filters.update(accounts_filter) + gl_entries = frappe.db.get_all( "GL Entry", - filters={"voucher_no": pcv.name, "account": ["!=", pcv.closing_account_head], "is_cancelled": 0}, + filters=filters, fields=gle_fields, ) for entry in gl_entries: entry["is_period_closing_voucher_entry"] = 1 entry["closing_date"] = pcv.period_end_date entry["period_closing_voucher"] = pcv.name + return gl_entries From 1af2326a52e969013745a390d2dbbcc54733512f Mon Sep 17 00:00:00 2001 From: Khushi Rawat <142375893+khushi8112@users.noreply.github.com> Date: Tue, 29 Oct 2024 17:47:48 +0530 Subject: [PATCH 0358/1614] fix: consider opening asset values while calculating asset depreciation rate (cherry picked from commit 9d0fe7aa56e48cd53a41cb1d88bcb74ae741c8ec) --- erpnext/assets/doctype/asset/asset.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/erpnext/assets/doctype/asset/asset.py b/erpnext/assets/doctype/asset/asset.py index 6c77a1b9b0e..6bb3ff255cf 100644 --- a/erpnext/assets/doctype/asset/asset.py +++ b/erpnext/assets/doctype/asset/asset.py @@ -790,14 +790,19 @@ class Asset(AccountsController): args.get("value_after_depreciation") ) else: - value = flt(args.get("expected_value_after_useful_life")) / flt(self.gross_purchase_amount) + value = flt(args.get("expected_value_after_useful_life")) / ( + flt(self.gross_purchase_amount) - flt(self.opening_accumulated_depreciation) + ) depreciation_rate = math.pow( value, 1.0 / ( ( - flt(args.get("total_number_of_depreciations"), 2) + ( + flt(args.get("total_number_of_depreciations"), 2) + - flt(self.opening_number_of_booked_depreciations) + ) * flt(args.get("frequency_of_depreciation")) ) / 12 From 63668eb855252cd2b0c39356c21660871463eae5 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Tue, 29 Oct 2024 12:15:59 +0530 Subject: [PATCH 0359/1614] fix: recalculate outstanding after save on checkout for POS Invoice (cherry picked from commit 9ce2184c6628075116f7cb93df709a91680ed553) --- erpnext/selling/page/point_of_sale/pos_payment.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/erpnext/selling/page/point_of_sale/pos_payment.js b/erpnext/selling/page/point_of_sale/pos_payment.js index 232b6a02123..9f389dfa81f 100644 --- a/erpnext/selling/page/point_of_sale/pos_payment.js +++ b/erpnext/selling/page/point_of_sale/pos_payment.js @@ -350,6 +350,11 @@ erpnext.PointOfSale.Payment = class { } checkout() { + const frm = this.events.get_frm(); + frm.cscript.calculate_outstanding_amount(); + frm.refresh_field("outstanding_amount"); + frm.refresh_field("paid_amount"); + frm.refresh_field("base_paid_amount"); this.events.toggle_other_sections(true); this.toggle_component(true); From 870709079b0434d810b792d17c93863c9dc008fb Mon Sep 17 00:00:00 2001 From: Ahmed Shareef Date: Tue, 29 Oct 2024 11:07:58 +0400 Subject: [PATCH 0360/1614] fix: remarks field in payment reconciliation (cherry picked from commit 2d5b079949ce13a162686780c2b4cde5c7fb1071) # Conflicts: # erpnext/accounts/doctype/payment_reconciliation_payment/payment_reconciliation_payment.json --- .../payment_reconciliation.py | 1 + .../payment_reconciliation_payment.json | 18 +++++++++++------- .../payment_reconciliation_payment.py | 2 +- erpnext/accounts/utils.py | 2 ++ 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py index 8481fd8ffa4..35d268accac 100644 --- a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py +++ b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py @@ -323,6 +323,7 @@ class PaymentReconciliation(Document): "posting_date": inv.posting_date, "currency": inv.currency, "cost_center": inv.cost_center, + "remarks": inv.remarks, } ) ) diff --git a/erpnext/accounts/doctype/payment_reconciliation_payment/payment_reconciliation_payment.json b/erpnext/accounts/doctype/payment_reconciliation_payment/payment_reconciliation_payment.json index d199236ae99..8e3ff2288aa 100644 --- a/erpnext/accounts/doctype/payment_reconciliation_payment/payment_reconciliation_payment.json +++ b/erpnext/accounts/doctype/payment_reconciliation_payment/payment_reconciliation_payment.json @@ -14,7 +14,7 @@ "amount", "difference_amount", "sec_break1", - "remark", + "remarks", "currency", "exchange_rate", "cost_center" @@ -74,12 +74,6 @@ "fieldname": "sec_break1", "fieldtype": "Section Break" }, - { - "fieldname": "remark", - "fieldtype": "Small Text", - "label": "Remark", - "read_only": 1 - }, { "fieldname": "currency", "fieldtype": "Link", @@ -105,12 +99,22 @@ "fieldtype": "Link", "label": "Cost Center", "options": "Cost Center" + }, + { + "fieldname": "remarks", + "fieldtype": "Small Text", + "label": "Remarks", + "read_only": 1 } ], "is_virtual": 1, "istable": 1, "links": [], +<<<<<<< HEAD "modified": "2023-11-17 17:33:34.818530", +======= + "modified": "2024-10-29 16:24:43.021230", +>>>>>>> 2d5b079949 (fix: remarks field in payment reconciliation) "modified_by": "Administrator", "module": "Accounts", "name": "Payment Reconciliation Payment", diff --git a/erpnext/accounts/doctype/payment_reconciliation_payment/payment_reconciliation_payment.py b/erpnext/accounts/doctype/payment_reconciliation_payment/payment_reconciliation_payment.py index 4ab80ecaafe..49c17eae41b 100644 --- a/erpnext/accounts/doctype/payment_reconciliation_payment/payment_reconciliation_payment.py +++ b/erpnext/accounts/doctype/payment_reconciliation_payment/payment_reconciliation_payment.py @@ -27,7 +27,7 @@ class PaymentReconciliationPayment(Document): reference_name: DF.DynamicLink | None reference_row: DF.Data | None reference_type: DF.Link | None - remark: DF.SmallText | None + remarks: DF.SmallText | None # end: auto-generated types @staticmethod diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py index 91904059824..37dbaef51a8 100644 --- a/erpnext/accounts/utils.py +++ b/erpnext/accounts/utils.py @@ -1969,6 +1969,7 @@ class QueryPaymentLedger: ple.cost_center.as_("cost_center"), Sum(ple.amount).as_("amount"), Sum(ple.amount_in_account_currency).as_("amount_in_account_currency"), + ple.remarks, ) .where(ple.delinked == 0) .where(Criterion.all(filter_on_voucher_no)) @@ -2031,6 +2032,7 @@ class QueryPaymentLedger: Table("vouchers").due_date, Table("vouchers").currency, Table("vouchers").cost_center.as_("cost_center"), + Table("vouchers").remarks, ) .where(Criterion.all(filter_on_outstanding_amount)) ) From ac121dd4e3af3092c3fe86ae2205a6c24f91c127 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Wed, 30 Oct 2024 10:23:41 +0530 Subject: [PATCH 0361/1614] chore: resolve conflict --- .../payment_reconciliation_payment.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/erpnext/accounts/doctype/payment_reconciliation_payment/payment_reconciliation_payment.json b/erpnext/accounts/doctype/payment_reconciliation_payment/payment_reconciliation_payment.json index 8e3ff2288aa..010e93558cf 100644 --- a/erpnext/accounts/doctype/payment_reconciliation_payment/payment_reconciliation_payment.json +++ b/erpnext/accounts/doctype/payment_reconciliation_payment/payment_reconciliation_payment.json @@ -110,11 +110,7 @@ "is_virtual": 1, "istable": 1, "links": [], -<<<<<<< HEAD - "modified": "2023-11-17 17:33:34.818530", -======= "modified": "2024-10-29 16:24:43.021230", ->>>>>>> 2d5b079949 (fix: remarks field in payment reconciliation) "modified_by": "Administrator", "module": "Accounts", "name": "Payment Reconciliation Payment", From 8218ca990c1c1da4210935eefc7cd1138724d6bc Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 30 Oct 2024 00:25:18 +0530 Subject: [PATCH 0362/1614] fix: find first PCV to consider opening entries (cherry picked from commit 2201fc62a290f15c3570043c832663d63d4ec6de) --- .../period_closing_voucher/period_closing_voucher.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py index 6ffa6346702..2a9b624a47a 100644 --- a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py +++ b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py @@ -413,11 +413,16 @@ class PeriodClosingVoucher(AccountsController): return closing_entries def is_first_period_closing_voucher(self): - return not frappe.db.exists( + first_pcv = frappe.db.get_value( "Period Closing Voucher", - {"company": self.company, "docstatus": 1, "name": ("!=", self.name)}, + {"company": self.company, "docstatus": 1}, + "name", + order_by="period_end_date", ) + if not first_pcv or first_pcv == self.name: + return True + def cancel_gl_entries(self): if self.get_gle_count_against_current_pcv() > 5000: frappe.enqueue( From 9ac87bd3b1547ba1d0c70cbacf26addbd4a3f637 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 30 Oct 2024 11:25:08 +0530 Subject: [PATCH 0363/1614] fix: rounding issue of required qty in subcontracting order (#43908) * fix: rounding issue of required qty in subcontracting order * fix: uom issue in test case * fix: test case * fix: restored report tests for manufacturing --- .../controllers/subcontracting_controller.py | 12 +++++----- .../tests/test_subcontracting_controller.py | 3 +++ .../test_subcontracting_order.py | 23 +++++++++++++++++++ 3 files changed, 32 insertions(+), 6 deletions(-) diff --git a/erpnext/controllers/subcontracting_controller.py b/erpnext/controllers/subcontracting_controller.py index 3c7f8b0ccca..5fb1ee468cd 100644 --- a/erpnext/controllers/subcontracting_controller.py +++ b/erpnext/controllers/subcontracting_controller.py @@ -561,11 +561,11 @@ class SubcontractingController(StockController): use_serial_batch_fields = frappe.db.get_single_value("Stock Settings", "use_serial_batch_fields") if self.doctype == self.subcontract_data.order_doctype: - rm_obj.required_qty = qty - rm_obj.amount = rm_obj.required_qty * rm_obj.rate + rm_obj.required_qty = flt(qty, rm_obj.precision("required_qty")) + rm_obj.amount = flt(rm_obj.required_qty * rm_obj.rate, rm_obj.precision("amount")) else: - rm_obj.consumed_qty = qty - rm_obj.required_qty = bom_item.required_qty or qty + rm_obj.consumed_qty = flt(qty, rm_obj.precision("consumed_qty")) + rm_obj.required_qty = flt(bom_item.required_qty or qty, rm_obj.precision("required_qty")) rm_obj.serial_and_batch_bundle = None setattr( rm_obj, self.subcontract_data.order_field, item_row.get(self.subcontract_data.order_field) @@ -664,8 +664,8 @@ class SubcontractingController(StockController): self.__set_serial_nos(item_row, rm_obj) def __set_consumed_qty(self, rm_obj, consumed_qty, required_qty=0): - rm_obj.required_qty = required_qty - rm_obj.consumed_qty = consumed_qty + rm_obj.required_qty = flt(required_qty, rm_obj.precision("required_qty")) + rm_obj.consumed_qty = flt(consumed_qty, rm_obj.precision("consumed_qty")) def __set_serial_nos(self, item_row, rm_obj): key = (rm_obj.rm_item_code, item_row.item_code, item_row.get(self.subcontract_data.order_field)) diff --git a/erpnext/controllers/tests/test_subcontracting_controller.py b/erpnext/controllers/tests/test_subcontracting_controller.py index dfd4351dcad..84326bafef2 100644 --- a/erpnext/controllers/tests/test_subcontracting_controller.py +++ b/erpnext/controllers/tests/test_subcontracting_controller.py @@ -1234,6 +1234,7 @@ def make_subcontracted_items(): "Subcontracted Item SA6": {}, "Subcontracted Item SA7": {}, "Subcontracted Item SA8": {}, + "Subcontracted Item SA9": {"stock_uom": "Litre"}, } for item, properties in sub_contracted_items.items(): @@ -1254,6 +1255,7 @@ def make_raw_materials(): "Subcontracted SRM Item 4": {"has_serial_no": 1, "serial_no_series": "SRII.####"}, "Subcontracted SRM Item 5": {"has_serial_no": 1, "serial_no_series": "SRIID.####"}, "Subcontracted SRM Item 8": {}, + "Subcontracted SRM Item 9": {"stock_uom": "Litre"}, } for item, properties in raw_materials.items(): @@ -1280,6 +1282,7 @@ def make_service_items(): "Subcontracted Service Item 6": {}, "Subcontracted Service Item 7": {}, "Subcontracted Service Item 8": {}, + "Subcontracted Service Item 9": {}, } for item, properties in service_items.items(): diff --git a/erpnext/subcontracting/doctype/subcontracting_order/test_subcontracting_order.py b/erpnext/subcontracting/doctype/subcontracting_order/test_subcontracting_order.py index 0ae07993be8..ac87239e73e 100644 --- a/erpnext/subcontracting/doctype/subcontracting_order/test_subcontracting_order.py +++ b/erpnext/subcontracting/doctype/subcontracting_order/test_subcontracting_order.py @@ -25,6 +25,7 @@ from erpnext.controllers.tests.test_subcontracting_controller import ( make_subcontracted_items, set_backflush_based_on, ) +from erpnext.manufacturing.doctype.production_plan.test_production_plan import make_bom from erpnext.stock.doctype.item.test_item import make_item from erpnext.stock.doctype.stock_entry.test_stock_entry import make_stock_entry from erpnext.subcontracting.doctype.subcontracting_order.subcontracting_order import ( @@ -683,6 +684,28 @@ class TestSubcontractingOrder(FrappeTestCase): self.assertEqual(requested_qty, new_requested_qty) + def test_subcontracting_order_rm_required_items_for_precision(self): + item_code = "Subcontracted Item SA9" + raw_materials = ["Subcontracted SRM Item 9"] + if not frappe.db.exists("BOM", {"item": item_code}): + make_bom(item=item_code, raw_materials=raw_materials, rate=100, rm_qty=1.04) + + service_items = [ + { + "warehouse": "_Test Warehouse - _TC", + "item_code": "Subcontracted Service Item 9", + "qty": 1, # 202.0656, + "rate": 100, + "fg_item": "Subcontracted Item SA9", + "fg_item_qty": 202.0656, + }, + ] + + sco = get_subcontracting_order(service_items=service_items) + sco.reload() + + self.assertEqual(sco.supplied_items[0].required_qty, 210.149) + def create_subcontracting_order(**args): args = frappe._dict(args) From 9a526611e020a4bd1cbbbd56b1db67367d5b9fc6 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 30 Oct 2024 11:25:56 +0530 Subject: [PATCH 0364/1614] fix: calculate tds with net amount when invoice exceeds single threshold amount (backport #43869) (#43920) * fix: calculate tds with net amount when invoice exceeds single threshold amount (cherry picked from commit ef694a40a1945fb4bd1f56a962a9245a6e76706b) * test: add unit test to validate purchase invoice exceeding single threshold value (cherry picked from commit 94badb464db4e598fd6fec72d3ee4d914d02d87d) --------- Co-authored-by: venkat102 --- .../tax_withholding_category.py | 20 +++++----- .../test_tax_withholding_category.py | 40 +++++++++++++++++++ 2 files changed, 50 insertions(+), 10 deletions(-) diff --git a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py index a56a7f045c8..46a0916c79f 100644 --- a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py +++ b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py @@ -514,7 +514,7 @@ def get_tds_amount(ldc, parties, inv, tax_details, vouchers): payment_entry_filters.pop("apply_tax_withholding_amount", None) payment_entry_filters.pop("tax_withholding_category", None) - supp_credit_amt = frappe.db.get_value("Purchase Invoice", invoice_filters, field) or 0.0 + supp_inv_credit_amt = frappe.db.get_value("Purchase Invoice", invoice_filters, field) or 0.0 supp_jv_credit_amt = ( frappe.db.get_value( @@ -538,7 +538,7 @@ def get_tds_amount(ldc, parties, inv, tax_details, vouchers): group_by="payment_type", ) - supp_credit_amt += supp_jv_credit_amt + supp_credit_amt = supp_jv_credit_amt supp_credit_amt += inv.tax_withholding_net_total for type in payment_entry_amounts: @@ -556,18 +556,18 @@ def get_tds_amount(ldc, parties, inv, tax_details, vouchers): tax_withholding_net_total = inv.tax_withholding_net_total if (threshold and tax_withholding_net_total >= threshold) or ( - cumulative_threshold and supp_credit_amt >= cumulative_threshold + cumulative_threshold and (supp_credit_amt + supp_inv_credit_amt) >= cumulative_threshold ): + # Get net total again as TDS is calculated on net total + # Grand is used to just check for threshold breach + net_total = ( + frappe.db.get_value("Purchase Invoice", invoice_filters, "sum(tax_withholding_net_total)") or 0.0 + ) + supp_credit_amt += net_total + if (cumulative_threshold and supp_credit_amt >= cumulative_threshold) and cint( tax_details.tax_on_excess_amount ): - # Get net total again as TDS is calculated on net total - # Grand is used to just check for threshold breach - net_total = ( - frappe.db.get_value("Purchase Invoice", invoice_filters, "sum(tax_withholding_net_total)") - or 0.0 - ) - net_total += inv.tax_withholding_net_total supp_credit_amt = net_total - cumulative_threshold if ldc and is_valid_certificate(ldc, inv.get("posting_date") or inv.get("transaction_date"), 0): diff --git a/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py b/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py index 24c9265eecd..c8893a13e86 100644 --- a/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py +++ b/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py @@ -121,6 +121,46 @@ class TestTaxWithholdingCategory(FrappeTestCase): for d in reversed(invoices): d.cancel() + def test_cumulative_threshold_with_party_ledger_amount_on_net_total(self): + invoices = [] + frappe.db.set_value( + "Supplier", "Test TDS Supplier3", "tax_withholding_category", "Advance TDS Category" + ) + + # Invoice with tax and without exceeding single and cumulative thresholds + for _ in range(2): + pi = create_purchase_invoice(supplier="Test TDS Supplier3", rate=1000, do_not_save=True) + pi.apply_tds = 1 + pi.append( + "taxes", + { + "category": "Total", + "charge_type": "Actual", + "account_head": "_Test Account VAT - _TC", + "cost_center": "Main - _TC", + "tax_amount": 500, + "description": "Test", + "add_deduct_tax": "Add", + }, + ) + pi.save() + pi.submit() + invoices.append(pi) + + # Third Invoice exceeds single threshold and not exceeding cumulative threshold + pi1 = create_purchase_invoice(supplier="Test TDS Supplier3", rate=6000) + pi1.apply_tds = 1 + pi1.save() + pi1.submit() + invoices.append(pi1) + + # Cumulative threshold is 10,000 + # Threshold calculation should be only on the third invoice + self.assertEqual(pi1.taxes[0].tax_amount, 800) + + for d in reversed(invoices): + d.cancel() + def test_cumulative_threshold_tcs(self): frappe.db.set_value( "Customer", "Test TCS Customer", "tax_withholding_category", "Cumulative Threshold TCS" From db3be4195c3690e835355f0154bc29b602301ab8 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 30 Oct 2024 12:17:46 +0530 Subject: [PATCH 0365/1614] fix: purchase return validation issue (backport #43871) (backport #43874) (#43879) fix: purchase return validation issue (backport #43871) (#43874) fix: purchase return validation issue (#43871) (cherry picked from commit a7cc7b28c075388b22501d6f68faac3da5a1a20d) Co-authored-by: rohitwaghchaure (cherry picked from commit b4d4c4a736299b96d4ef2b1a9aad4c0fe9289d7a) Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- .../controllers/sales_and_purchase_return.py | 28 +++++++++++++++---- 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/erpnext/controllers/sales_and_purchase_return.py b/erpnext/controllers/sales_and_purchase_return.py index 3755506b6f5..6da23834b61 100644 --- a/erpnext/controllers/sales_and_purchase_return.py +++ b/erpnext/controllers/sales_and_purchase_return.py @@ -79,6 +79,9 @@ def validate_returned_items(doc): if doc.doctype in ["Purchase Invoice", "Purchase Receipt", "Subcontracting Receipt"]: select_fields += ",rejected_qty, received_qty" + if doc.doctype in ["Purchase Receipt", "Purchase Invoice"]: + select_fields += ",name" + for d in frappe.db.sql( f"""select {select_fields} from `tab{doc.doctype} Item` where parent = %s""", doc.return_against, @@ -104,15 +107,24 @@ def validate_returned_items(doc): items_returned = False for d in doc.get("items"): + key = d.item_code + raise_exception = False + if doc.doctype in ["Purchase Receipt", "Purchase Invoice"]: + field = frappe.scrub(doc.doctype) + "_item" + if d.get(field): + key = (d.item_code, d.get(field)) + raise_exception = True + if d.item_code and (flt(d.qty) < 0 or flt(d.get("received_qty")) < 0): - if d.item_code not in valid_items: - frappe.throw( + if key not in valid_items: + frappe.msgprint( _("Row # {0}: Returned Item {1} does not exist in {2} {3}").format( d.idx, d.item_code, doc.doctype, doc.return_against - ) + ), + raise_exception=raise_exception, ) else: - ref = valid_items.get(d.item_code, frappe._dict()) + ref = valid_items.get(key, frappe._dict()) validate_quantity(doc, d, ref, valid_items, already_returned_items) if ( @@ -193,8 +205,12 @@ def validate_quantity(doc, args, ref, valid_items, already_returned_items): def get_ref_item_dict(valid_items, ref_item_row): from erpnext.stock.doctype.serial_no.serial_no import get_serial_nos + key = ref_item_row.item_code + if ref_item_row.get("name"): + key = (ref_item_row.item_code, ref_item_row.name) + valid_items.setdefault( - ref_item_row.item_code, + key, frappe._dict( { "qty": 0, @@ -208,7 +224,7 @@ def get_ref_item_dict(valid_items, ref_item_row): } ), ) - item_dict = valid_items[ref_item_row.item_code] + item_dict = valid_items[key] item_dict["qty"] += ref_item_row.qty item_dict["stock_qty"] += ref_item_row.get("stock_qty", 0) if ref_item_row.get("rate", 0) > item_dict["rate"]: From 4dcaf42bc5a78c5a707c82161f80e05e9ad99369 Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Wed, 30 Oct 2024 12:04:17 +0530 Subject: [PATCH 0366/1614] fix: cannot create opp from lead without prospect (cherry picked from commit 603383bca7d017eca97a93c90a3dbd70bb69c9b2) --- erpnext/crm/doctype/lead/lead.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/crm/doctype/lead/lead.js b/erpnext/crm/doctype/lead/lead.js index 022d1906e84..325ee3d8d6e 100644 --- a/erpnext/crm/doctype/lead/lead.js +++ b/erpnext/crm/doctype/lead/lead.js @@ -127,8 +127,8 @@ erpnext.LeadController = class LeadController extends frappe.ui.form.Controller fieldname: "prospect_name", fieldtype: "Data", default: frm.doc.company_name, - reqd: 1, depends_on: "create_prospect", + mandatory_depends_on: "create_prospect", } ); } From 3648f3816f95b2aa4ac4425eea3cc51f63b2151d Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Wed, 30 Oct 2024 09:55:19 +0000 Subject: [PATCH 0367/1614] chore(release): Bumped to Version 15.40.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # [15.40.0](https://github.com/frappe/erpnext/compare/v15.39.6...v15.40.0) (2024-10-30) ### Bug Fixes * add company filter for project ([33fa1e4](https://github.com/frappe/erpnext/commit/33fa1e45ad27e41654335e65ca579a3099c5519d)) * add parenttype clause to invoice tax query in sales_register report ([603d2cf](https://github.com/frappe/erpnext/commit/603d2cf77dd8ca6bae612dc9b406a37416c3fb72)) * backport translations from develop ([#43849](https://github.com/frappe/erpnext/issues/43849)) ([11dd196](https://github.com/frappe/erpnext/commit/11dd1968c78ea1608edd8850854f7dcd4f998648)) * basic rate not editable in Stock Entry Detail (backport [#43837](https://github.com/frappe/erpnext/issues/43837)) ([#43838](https://github.com/frappe/erpnext/issues/43838)) ([20478b6](https://github.com/frappe/erpnext/commit/20478b632f82bd9d44bed28e37359b2dd2c7d989)) * better implementation, handle missing purchase order ([41db040](https://github.com/frappe/erpnext/commit/41db040a60c88afb8d61b52327227ad282488c3b)) * Calculate gross margin on update of project costing from invoices (backport [#43876](https://github.com/frappe/erpnext/issues/43876)) ([#43900](https://github.com/frappe/erpnext/issues/43900)) ([93d0db2](https://github.com/frappe/erpnext/commit/93d0db29100735cca01228ccf943a5abeb772bf9)) * calculate tds with net amount when invoice exceeds single threshold amount (backport [#43869](https://github.com/frappe/erpnext/issues/43869)) ([#43920](https://github.com/frappe/erpnext/issues/43920)) ([9a52661](https://github.com/frappe/erpnext/commit/9a526611e020a4bd1cbbbd56b1db67367d5b9fc6)) * cannot create opp from lead without prospect ([4dcaf42](https://github.com/frappe/erpnext/commit/4dcaf42bc5a78c5a707c82161f80e05e9ad99369)) * consider gle based on balances in company currency ([#43805](https://github.com/frappe/erpnext/issues/43805)) ([2fb4417](https://github.com/frappe/erpnext/commit/2fb441763a74bd4c5233e77f39611ee0c95b7efa)) * consider opening asset values while calculating asset depreciation rate ([1af2326](https://github.com/frappe/erpnext/commit/1af2326a52e969013745a390d2dbbcc54733512f)) * correct garbage value on Razorpay Payments Page ([2c21df2](https://github.com/frappe/erpnext/commit/2c21df2ad96f4eb2fee044ecd9b4828a3dad0ee3)) * do not check for payment terms details for return invoices. ([9a5604c](https://github.com/frappe/erpnext/commit/9a5604c5bb4f2c8d99fa59bdfb9bc16565aa6ffa)) * do not copy serial numbers from DN to SI (backport [#43885](https://github.com/frappe/erpnext/issues/43885)) ([#43893](https://github.com/frappe/erpnext/issues/43893)) ([d06831e](https://github.com/frappe/erpnext/commit/d06831ea9404852bcf730b6b17de6059ff5b1227)) * do not set payment terms for return invoices ([a826a89](https://github.com/frappe/erpnext/commit/a826a894f4d9ef2be1c59c4e97f0ceb475b569b4)) * find first PCV to consider opening entries ([8218ca9](https://github.com/frappe/erpnext/commit/8218ca990c1c1da4210935eefc7cd1138724d6bc)) * Handle None value for item description in customer portal invoice view (backport [#43823](https://github.com/frappe/erpnext/issues/43823)) ([#43889](https://github.com/frappe/erpnext/issues/43889)) ([8a72845](https://github.com/frappe/erpnext/commit/8a72845ee6fa7f954e6915272ea722f487907171)) * hide payment terms for return and paid purchase invoices ([29aa5d6](https://github.com/frappe/erpnext/commit/29aa5d64683d8af8864996c4f09214c17b58905d)) * incorrect value of available_qty_for_consumption in subcontracti… (backport [#43836](https://github.com/frappe/erpnext/issues/43836)) ([#43861](https://github.com/frappe/erpnext/issues/43861)) ([cd4746a](https://github.com/frappe/erpnext/commit/cd4746ad2a1cac13c97a798a07bb4abee322f29f)) * map doc from purchase order ([58a3ef7](https://github.com/frappe/erpnext/commit/58a3ef7aa6b5d446460bb25ba7cb0188cbdab66b)) * Patch for reposting account closing balance (backport [#43905](https://github.com/frappe/erpnext/issues/43905)) ([#43910](https://github.com/frappe/erpnext/issues/43910)) ([ab16207](https://github.com/frappe/erpnext/commit/ab162070a6dd08bc2a7217242dc5085d190b60ff)) * post account closing balance against pcv closing account (backport [#43887](https://github.com/frappe/erpnext/issues/43887)) ([#43898](https://github.com/frappe/erpnext/issues/43898)) ([e22d0a3](https://github.com/frappe/erpnext/commit/e22d0a3406932956598ac4e7024cdee68bf713d8)) * purchase return validation issue (backport [#43871](https://github.com/frappe/erpnext/issues/43871)) (backport [#43874](https://github.com/frappe/erpnext/issues/43874)) ([#43879](https://github.com/frappe/erpnext/issues/43879)) ([db3be41](https://github.com/frappe/erpnext/commit/db3be4195c3690e835355f0154bc29b602301ab8)) * recalculate outstanding after save on checkout for POS Invoice ([63668eb](https://github.com/frappe/erpnext/commit/63668eb855252cd2b0c39356c21660871463eae5)) * remarks field in payment reconciliation ([8707090](https://github.com/frappe/erpnext/commit/870709079b0434d810b792d17c93863c9dc008fb)) * **RFQ:** make strings translatable (backport [#43843](https://github.com/frappe/erpnext/issues/43843)) ([#43848](https://github.com/frappe/erpnext/issues/43848)) ([07aaef2](https://github.com/frappe/erpnext/commit/07aaef2af2413ff6c39b85514659d572096a6c73)) * rounding issue of required qty in subcontracting order ([#43908](https://github.com/frappe/erpnext/issues/43908)) ([9ac87bd](https://github.com/frappe/erpnext/commit/9ac87bd3b1547ba1d0c70cbacf26addbd4a3f637)) * scrub "-" from fieldname in accounting dimension ([c702826](https://github.com/frappe/erpnext/commit/c70282663c69955d49ce41c772056cfe02bae975)) * set bill_no before `against_voucher` gets concatenated ([81297ce](https://github.com/frappe/erpnext/commit/81297ce1683ec413a8f9b2fe153124452b7d1883)) * set default warehouse for pos invoice ([b80a5f2](https://github.com/frappe/erpnext/commit/b80a5f27a904be30572742ec446feea335a20a28)) * set proper currency format ([9f97018](https://github.com/frappe/erpnext/commit/9f970189feb9193fb80ac9564bb6d23bd3d05f66)) * Unnecessary validation for non deferred sales invoices ([#43816](https://github.com/frappe/erpnext/issues/43816)) ([bf4fb53](https://github.com/frappe/erpnext/commit/bf4fb53575be594e2e13e0c53cd4218fe4215ac5)) * use period closing voucher object to call get_account_closing_ba… (backport [#43880](https://github.com/frappe/erpnext/issues/43880)) ([#43883](https://github.com/frappe/erpnext/issues/43883)) ([8bfc212](https://github.com/frappe/erpnext/commit/8bfc212e262654ee9397fc435e2f08ccd286a520)) * validate fieldname ([b21abf4](https://github.com/frappe/erpnext/commit/b21abf4d9056496f016c9aedf0182bb8dff7688d)) * work order finish button not showing (backport [#43875](https://github.com/frappe/erpnext/issues/43875)) (backport [#43877](https://github.com/frappe/erpnext/issues/43877)) ([#43904](https://github.com/frappe/erpnext/issues/43904)) ([7189dab](https://github.com/frappe/erpnext/commit/7189daba193127350d74f5397147ab27a5525f60)) ### Features * add party name in payment request ([935f2e1](https://github.com/frappe/erpnext/commit/935f2e11e859002548c26061319ab29678ef85ed)) ### Performance Improvements * performance optimizations for accounting reports by refactoring account closing balance and period closing voucher ([#43798](https://github.com/frappe/erpnext/issues/43798)) ([ced76ca](https://github.com/frappe/erpnext/commit/ced76ca5c0b2e66e13781353ed71f1d95368bf87)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index b05af8dad95..1bf4cf4a827 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.39.6" +__version__ = "15.40.0" def get_default_company(user=None): From 4a749cec72c060f98662191f3dcaf801496d0ab9 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 30 Oct 2024 15:49:26 +0100 Subject: [PATCH 0368/1614] feat: remove Payroll Entry from Bank Account dashboard (backport #43931) (#43933) Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com> --- erpnext/accounts/doctype/bank_account/bank_account.json | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/erpnext/accounts/doctype/bank_account/bank_account.json b/erpnext/accounts/doctype/bank_account/bank_account.json index a5a7691eb76..962551b2417 100644 --- a/erpnext/accounts/doctype/bank_account/bank_account.json +++ b/erpnext/accounts/doctype/bank_account/bank_account.json @@ -224,11 +224,6 @@ "link_doctype": "Bank Guarantee", "link_fieldname": "bank_account" }, - { - "group": "Transactions", - "link_doctype": "Payroll Entry", - "link_fieldname": "bank_account" - }, { "group": "Transactions", "link_doctype": "Bank Transaction", @@ -255,7 +250,7 @@ "link_fieldname": "default_bank_account" } ], - "modified": "2024-09-24 06:57:41.292970", + "modified": "2024-10-30 09:41:14.113414", "modified_by": "Administrator", "module": "Accounts", "name": "Bank Account", From b343334f694b79a92faabbba03984dca086ca8c0 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Wed, 16 Oct 2024 17:01:47 +0530 Subject: [PATCH 0369/1614] feat: advance payment ledger doctype (cherry picked from commit 2d6efd7cc83e97186e07457567b1439b14b1fb57) --- .../advance_payment_ledger_entry/__init__.py | 0 .../advance_payment_ledger_entry.js | 8 ++ .../advance_payment_ledger_entry.json | 89 +++++++++++++++++++ .../advance_payment_ledger_entry.py | 27 ++++++ .../test_advance_payment_ledger_entry.py | 29 ++++++ 5 files changed, 153 insertions(+) create mode 100644 erpnext/accounts/doctype/advance_payment_ledger_entry/__init__.py create mode 100644 erpnext/accounts/doctype/advance_payment_ledger_entry/advance_payment_ledger_entry.js create mode 100644 erpnext/accounts/doctype/advance_payment_ledger_entry/advance_payment_ledger_entry.json create mode 100644 erpnext/accounts/doctype/advance_payment_ledger_entry/advance_payment_ledger_entry.py create mode 100644 erpnext/accounts/doctype/advance_payment_ledger_entry/test_advance_payment_ledger_entry.py diff --git a/erpnext/accounts/doctype/advance_payment_ledger_entry/__init__.py b/erpnext/accounts/doctype/advance_payment_ledger_entry/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/erpnext/accounts/doctype/advance_payment_ledger_entry/advance_payment_ledger_entry.js b/erpnext/accounts/doctype/advance_payment_ledger_entry/advance_payment_ledger_entry.js new file mode 100644 index 00000000000..1a0dc1e7272 --- /dev/null +++ b/erpnext/accounts/doctype/advance_payment_ledger_entry/advance_payment_ledger_entry.js @@ -0,0 +1,8 @@ +// Copyright (c) 2024, Frappe Technologies Pvt. Ltd. and contributors +// For license information, please see license.txt + +// frappe.ui.form.on("Advance Payment Ledger Entry", { +// refresh(frm) { + +// }, +// }); diff --git a/erpnext/accounts/doctype/advance_payment_ledger_entry/advance_payment_ledger_entry.json b/erpnext/accounts/doctype/advance_payment_ledger_entry/advance_payment_ledger_entry.json new file mode 100644 index 00000000000..6f4792543d8 --- /dev/null +++ b/erpnext/accounts/doctype/advance_payment_ledger_entry/advance_payment_ledger_entry.json @@ -0,0 +1,89 @@ +{ + "actions": [], + "allow_rename": 1, + "creation": "2024-10-16 16:57:12.085072", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "company", + "voucher_type", + "voucher_no", + "against_voucher_type", + "against_voucher_no", + "amount", + "currency", + "event" + ], + "fields": [ + { + "fieldname": "voucher_type", + "fieldtype": "Link", + "label": "Voucher Type", + "options": "DocType" + }, + { + "fieldname": "voucher_no", + "fieldtype": "Dynamic Link", + "label": "Voucher No", + "options": "voucher_type" + }, + { + "fieldname": "against_voucher_type", + "fieldtype": "Link", + "label": "Against Voucher Type", + "options": "DocType" + }, + { + "fieldname": "against_voucher_no", + "fieldtype": "Dynamic Link", + "label": "Against Voucher No", + "options": "against_voucher_type" + }, + { + "fieldname": "amount", + "fieldtype": "Currency", + "label": "Amount" + }, + { + "fieldname": "currency", + "fieldtype": "Link", + "label": "Currency", + "options": "Currency" + }, + { + "fieldname": "event", + "fieldtype": "Data", + "label": "Event" + }, + { + "fieldname": "company", + "fieldtype": "Link", + "label": "Company", + "options": "Company" + } + ], + "index_web_pages_for_search": 1, + "links": [], + "modified": "2024-10-16 17:08:09.334330", + "modified_by": "Administrator", + "module": "Accounts", + "name": "Advance Payment Ledger Entry", + "owner": "Administrator", + "permissions": [ + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, + "write": 1 + } + ], + "sort_field": "creation", + "sort_order": "DESC", + "states": [] +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/advance_payment_ledger_entry/advance_payment_ledger_entry.py b/erpnext/accounts/doctype/advance_payment_ledger_entry/advance_payment_ledger_entry.py new file mode 100644 index 00000000000..0ec2d411761 --- /dev/null +++ b/erpnext/accounts/doctype/advance_payment_ledger_entry/advance_payment_ledger_entry.py @@ -0,0 +1,27 @@ +# Copyright (c) 2024, Frappe Technologies Pvt. Ltd. and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + + +class AdvancePaymentLedgerEntry(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + against_voucher_no: DF.DynamicLink | None + against_voucher_type: DF.Link | None + amount: DF.Currency + company: DF.Link | None + currency: DF.Link | None + event: DF.Data | None + voucher_no: DF.DynamicLink | None + voucher_type: DF.Link | None + # end: auto-generated types + + pass diff --git a/erpnext/accounts/doctype/advance_payment_ledger_entry/test_advance_payment_ledger_entry.py b/erpnext/accounts/doctype/advance_payment_ledger_entry/test_advance_payment_ledger_entry.py new file mode 100644 index 00000000000..ef938062399 --- /dev/null +++ b/erpnext/accounts/doctype/advance_payment_ledger_entry/test_advance_payment_ledger_entry.py @@ -0,0 +1,29 @@ +# Copyright (c) 2024, Frappe Technologies Pvt. Ltd. and Contributors +# See license.txt + +# import frappe +from frappe.tests import IntegrationTestCase, UnitTestCase + +# On IntegrationTestCase, the doctype test records and all +# link-field test record depdendencies are recursively loaded +# Use these module variables to add/remove to/from that list +EXTRA_TEST_RECORD_DEPENDENCIES = [] # eg. ["User"] +IGNORE_TEST_RECORD_DEPENDENCIES = [] # eg. ["User"] + + +class TestAdvancePaymentLedgerEntry(UnitTestCase): + """ + Unit tests for AdvancePaymentLedgerEntry. + Use this class for testing individual functions and methods. + """ + + pass + + +class TestAdvancePaymentLedgerEntry(IntegrationTestCase): + """ + Integration tests for AdvancePaymentLedgerEntry. + Use this class for testing interactions between multiple components. + """ + + pass From 0d02f8b5d127b6f2dfcf8bf36a2bd6d1bb19aa0d Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Wed, 16 Oct 2024 17:11:50 +0530 Subject: [PATCH 0370/1614] refactor: make all fields readonly (cherry picked from commit f176a82198b894bfc289fcf8e506ce0d2c918573) --- .../advance_payment_ledger_entry.json | 26 ++++++++++++------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/erpnext/accounts/doctype/advance_payment_ledger_entry/advance_payment_ledger_entry.json b/erpnext/accounts/doctype/advance_payment_ledger_entry/advance_payment_ledger_entry.json index 6f4792543d8..1d0a5b42a31 100644 --- a/erpnext/accounts/doctype/advance_payment_ledger_entry/advance_payment_ledger_entry.json +++ b/erpnext/accounts/doctype/advance_payment_ledger_entry/advance_payment_ledger_entry.json @@ -19,52 +19,60 @@ "fieldname": "voucher_type", "fieldtype": "Link", "label": "Voucher Type", - "options": "DocType" + "options": "DocType", + "read_only": 1 }, { "fieldname": "voucher_no", "fieldtype": "Dynamic Link", "label": "Voucher No", - "options": "voucher_type" + "options": "voucher_type", + "read_only": 1 }, { "fieldname": "against_voucher_type", "fieldtype": "Link", "label": "Against Voucher Type", - "options": "DocType" + "options": "DocType", + "read_only": 1 }, { "fieldname": "against_voucher_no", "fieldtype": "Dynamic Link", "label": "Against Voucher No", - "options": "against_voucher_type" + "options": "against_voucher_type", + "read_only": 1 }, { "fieldname": "amount", "fieldtype": "Currency", - "label": "Amount" + "label": "Amount", + "read_only": 1 }, { "fieldname": "currency", "fieldtype": "Link", "label": "Currency", - "options": "Currency" + "options": "Currency", + "read_only": 1 }, { "fieldname": "event", "fieldtype": "Data", - "label": "Event" + "label": "Event", + "read_only": 1 }, { "fieldname": "company", "fieldtype": "Link", "label": "Company", - "options": "Company" + "options": "Company", + "read_only": 1 } ], "index_web_pages_for_search": 1, "links": [], - "modified": "2024-10-16 17:08:09.334330", + "modified": "2024-10-16 17:11:28.143979", "modified_by": "Administrator", "module": "Accounts", "name": "Advance Payment Ledger Entry", From bf0b74bcbdb396ac5d1438034b4beb11f796cf78 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Wed, 16 Oct 2024 17:16:31 +0530 Subject: [PATCH 0371/1614] refactor: create advance ledger entries on submit and cancel (cherry picked from commit 575ca5b90048ea96bbb59c4e0d968349a29211aa) --- .../doctype/payment_entry/payment_entry.py | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index b645d92cb64..28ad4454596 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -110,6 +110,7 @@ class PaymentEntry(AccountsController): self.update_outstanding_amounts() self.update_payment_schedule() self.update_payment_requests() + self.make_advance_payment_ledger_entries() self.update_advance_paid() # advance_paid_status depends on the payment request amount self.set_status() @@ -197,6 +198,7 @@ class PaymentEntry(AccountsController): self.delink_advance_entry_references() self.update_payment_schedule(cancel=1) self.update_payment_requests(cancel=True) + self.make_advance_payment_ledger_entries() self.update_advance_paid() # advance_paid_status depends on the payment request amount self.set_status() @@ -1849,6 +1851,26 @@ class PaymentEntry(AccountsController): allocated_negative_outstanding, ) + def make_advance_payment_ledger_entries(self): + if self.docstatus == 1 or self.docstatus == 2: + advance_payment_doctypes = frappe.get_hooks( + "advance_payment_receivable_doctypes" + ) + frappe.get_hooks("advance_payment_payable_doctypes") + + advance_doctype_references = [ + x for x in self.references if x.reference_doctype in advance_payment_doctypes + ] + for x in advance_doctype_references: + doc = frappe.new_doc("Advance Payment Ledger Entry") + doc.company = self.company + doc.voucher_type = self.doctype + doc.voucher_no = self.name + doc.against_voucher_type = x.reference_doctype + doc.against_voucher_no = x.reference_name + doc.amount = x.allocated_amount if self.docstatus == 1 else -1 * x.allocated_amount + doc.event = "Submit" if self.docstatus == 1 else "Cancel" + doc.save() + @frappe.whitelist() def set_matched_payment_requests(self, matched_payment_requests): """ From 54f758c327d4e852ae10fc20570ddc59671efeae Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Wed, 16 Oct 2024 17:21:56 +0530 Subject: [PATCH 0372/1614] refactor: calculate advance from advance ledger (cherry picked from commit 2b2360bf7bedb771ca90d0a0a99f90eae693e179) # Conflicts: # erpnext/controllers/accounts_controller.py --- erpnext/controllers/accounts_controller.py | 25 ++++++++++++++++------ 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index e6fb5d0d153..22d59f428f2 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -1935,22 +1935,33 @@ class AccountsController(TransactionBase): return stock_items +<<<<<<< HEAD def set_total_advance_paid(self): ple = frappe.qb.DocType("Payment Ledger Entry") party = self.customer if self.doctype == "Sales Order" else self.supplier +======= + def calculate_total_advance_from_ledger(self): + adv = frappe.qb.DocType("Advance Payment Ledger Entry") +>>>>>>> 2b2360bf7b (refactor: calculate advance from advance ledger) advance = ( - frappe.qb.from_(ple) - .select(ple.account_currency, Abs(Sum(ple.amount_in_account_currency)).as_("amount")) + frappe.qb.from_(adv) + .select(adv.currency, Abs(Sum(adv.amount)).as_("amount")) .where( - (ple.against_voucher_type == self.doctype) - & (ple.against_voucher_no == self.name) - & (ple.party == party) - & (ple.delinked == 0) - & (ple.company == self.company) + (adv.against_voucher_type == self.doctype) + & (adv.against_voucher_no == self.name) + & (adv.company == self.company) ) .run(as_dict=True) ) + return advance +<<<<<<< HEAD +======= + def set_total_advance_paid(self): + advance = self.calculate_total_advance_from_ledger() + advance_paid, order_total = None, None + +>>>>>>> 2b2360bf7b (refactor: calculate advance from advance ledger) if advance: advance = advance[0] From a6c26874c784b7ee5abea4916ee99f7344f15ab5 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Wed, 16 Oct 2024 17:26:20 +0530 Subject: [PATCH 0373/1614] refactor: remove advance payment ledgers on document deletion (cherry picked from commit 3c53b92f0561907ed71a41d82403ca77a088d3ed) --- erpnext/accounts/doctype/payment_entry/payment_entry.py | 1 + erpnext/controllers/accounts_controller.py | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index 28ad4454596..abd6ea37e6d 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -191,6 +191,7 @@ class PaymentEntry(AccountsController): "Repost Accounting Ledger Items", "Unreconcile Payment", "Unreconcile Payment Entries", + "Advance Payment Ledger Entry", ) super().on_cancel() self.make_gl_entries(cancel=1) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 22d59f428f2..ffe28119041 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -345,9 +345,14 @@ class AccountsController(TransactionBase): repost_doc.flags.ignore_links = True repost_doc.save(ignore_permissions=True) + def _remove_advance_payment_ledger_entries(self): + adv = qb.DocType("Advance Payment Ledger Entry") + qb.from_(adv).delete().where(adv.voucher_type.eq(self.doctype) & adv.voucher_no.eq(self.name)).run() + def on_trash(self): from erpnext.accounts.utils import delete_exchange_gain_loss_journal + self._remove_advance_payment_ledger_entries() self._remove_references_in_repost_doctypes() self._remove_references_in_unreconcile() self.remove_serial_and_batch_bundle() From df25d33735ad79dca49c17a0daae8b0cc6fe39e7 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 17 Oct 2024 13:49:46 +0530 Subject: [PATCH 0374/1614] chore: remove duplicate test class (cherry picked from commit e2891a60d5a48205c544585032a0dae78975ac45) --- .../test_advance_payment_ledger_entry.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/erpnext/accounts/doctype/advance_payment_ledger_entry/test_advance_payment_ledger_entry.py b/erpnext/accounts/doctype/advance_payment_ledger_entry/test_advance_payment_ledger_entry.py index ef938062399..750a658102d 100644 --- a/erpnext/accounts/doctype/advance_payment_ledger_entry/test_advance_payment_ledger_entry.py +++ b/erpnext/accounts/doctype/advance_payment_ledger_entry/test_advance_payment_ledger_entry.py @@ -11,15 +11,6 @@ EXTRA_TEST_RECORD_DEPENDENCIES = [] # eg. ["User"] IGNORE_TEST_RECORD_DEPENDENCIES = [] # eg. ["User"] -class TestAdvancePaymentLedgerEntry(UnitTestCase): - """ - Unit tests for AdvancePaymentLedgerEntry. - Use this class for testing individual functions and methods. - """ - - pass - - class TestAdvancePaymentLedgerEntry(IntegrationTestCase): """ Integration tests for AdvancePaymentLedgerEntry. From a12df122a96d0e0313a475bec2b503707767b106 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 17 Oct 2024 13:56:24 +0530 Subject: [PATCH 0375/1614] refactor(test): advance_paid stays after reconciliation (cherry picked from commit c4197c3f31336ebca8ec2b81ee882ff2a43baccf) --- erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py index 7ac0d34e671..d05da0dbf19 100644 --- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py @@ -1995,7 +1995,7 @@ class TestSalesInvoice(FrappeTestCase): # Check if SO is unlinked/replaced by SI in PE & if SO advance paid is 0 self.assertEqual(pe.references[0].reference_name, si.name) - self.assertEqual(sales_order.advance_paid, 0.0) + self.assertEqual(sales_order.advance_paid, 300.0) # check outstanding after advance allocation self.assertEqual( From d84a3c4f29df46156d94cef8ad195eaf59424e06 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 17 Oct 2024 14:31:18 +0530 Subject: [PATCH 0376/1614] fix: deleting SO/PO will remove its advance payment ledger entry (cherry picked from commit 14357bccba2c5a6e21091fc99239b91dcc7b647f) --- erpnext/controllers/accounts_controller.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index ffe28119041..23498ad6883 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -349,6 +349,14 @@ class AccountsController(TransactionBase): adv = qb.DocType("Advance Payment Ledger Entry") qb.from_(adv).delete().where(adv.voucher_type.eq(self.doctype) & adv.voucher_no.eq(self.name)).run() + advance_payment_doctypes = frappe.get_hooks("advance_payment_receivable_doctypes") + frappe.get_hooks( + "advance_payment_payable_doctypes" + ) + if self.doctype in advance_payment_doctypes: + qb.from_(adv).delete().where( + adv.against_voucher_type.eq(self.doctype) & adv.against_voucher_no.eq(self.name) + ).run() + def on_trash(self): from erpnext.accounts.utils import delete_exchange_gain_loss_journal From ffd426d43db54349cd4c969c66fee84e5ad54301 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 17 Oct 2024 16:51:16 +0530 Subject: [PATCH 0377/1614] refactor: link journal entry to advance payment ledger (cherry picked from commit fca5e952484af634f0f1268258dd0bf8c56bb73a) --- .../doctype/journal_entry/journal_entry.py | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.py b/erpnext/accounts/doctype/journal_entry/journal_entry.py index 47626492e84..d11cc27ccb7 100644 --- a/erpnext/accounts/doctype/journal_entry/journal_entry.py +++ b/erpnext/accounts/doctype/journal_entry/journal_entry.py @@ -188,6 +188,7 @@ class JournalEntry(AccountsController): self.validate_cheque_info() self.check_credit_limit() self.make_gl_entries() + self.make_advance_payment_ledger_entries() self.update_advance_paid() self.update_asset_value() self.update_inter_company_jv() @@ -220,6 +221,7 @@ class JournalEntry(AccountsController): "Unreconcile Payment Entries", ) self.make_gl_entries(1) + self.make_advance_payment_ledger_entries() self.update_advance_paid() self.unlink_advance_entry_reference() self.unlink_asset_reference() @@ -231,6 +233,32 @@ class JournalEntry(AccountsController): def get_title(self): return self.pay_to_recd_from or self.accounts[0].account + def make_advance_payment_ledger_entries(self): + if self.docstatus == 1 or self.docstatus == 2: + advance_payment_doctypes = frappe.get_hooks( + "advance_payment_receivable_doctypes" + ) + frappe.get_hooks("advance_payment_payable_doctypes") + + advance_doctype_references = [ + x for x in self.accounts if x.reference_type in advance_payment_doctypes + ] + + for x in advance_doctype_references: + # Looking for payments + dr_or_cr = "credit" if x.account_type == "Receivable" else "debit" + + amount = x.get(dr_or_cr) + if amount > 0: + doc = frappe.new_doc("Advance Payment Ledger Entry") + doc.company = self.company + doc.voucher_type = self.doctype + doc.voucher_no = self.name + doc.against_voucher_type = x.reference_type + doc.against_voucher_no = x.reference_name + doc.amount = amount if self.docstatus == 1 else -1 * amount + doc.event = "Submit" if self.docstatus == 1 else "Cancel" + doc.save() + def update_advance_paid(self): advance_paid = frappe._dict() for d in self.get("accounts"): From cb36dcb3823a3d50907e3084819db33271a52345 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Fri, 18 Oct 2024 13:32:28 +0530 Subject: [PATCH 0378/1614] refactor(test): reconciliation shouldn't affect advance paid (cherry picked from commit 35a8a187283efe4a9ce325017278d1e3b0bbdfbc) --- .../unreconcile_payment/test_unreconcile_payment.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/unreconcile_payment/test_unreconcile_payment.py b/erpnext/accounts/doctype/unreconcile_payment/test_unreconcile_payment.py index 13e5294aa78..3d222b22ff8 100644 --- a/erpnext/accounts/doctype/unreconcile_payment/test_unreconcile_payment.py +++ b/erpnext/accounts/doctype/unreconcile_payment/test_unreconcile_payment.py @@ -362,10 +362,14 @@ class TestUnreconcilePayment(AccountsTestMixin, FrappeTestCase): # Assert 'Advance Paid' so.reload() pe.reload() - self.assertEqual(so.advance_paid, 0) + self.assertEqual(so.advance_paid, 100) self.assertEqual(len(pe.references), 0) self.assertEqual(pe.unallocated_amount, 100) + pe.cancel() + so.reload() + self.assertEqual(so.advance_paid, 100) + def test_06_unreconcile_advance_from_payment_entry(self): self.enable_advance_as_liability() so1 = self.create_sales_order() @@ -411,7 +415,7 @@ class TestUnreconcilePayment(AccountsTestMixin, FrappeTestCase): so2.reload() pe.reload() self.assertEqual(so1.advance_paid, 150) - self.assertEqual(so2.advance_paid, 0) + self.assertEqual(so2.advance_paid, 110) self.assertEqual(len(pe.references), 1) self.assertEqual(pe.unallocated_amount, 110) @@ -459,6 +463,6 @@ class TestUnreconcilePayment(AccountsTestMixin, FrappeTestCase): # Assert 'Advance Paid' so.reload() - self.assertEqual(so.advance_paid, 0) + self.assertEqual(so.advance_paid, 1000) self.disable_advance_as_liability() From 085e0455d80a853dddb01fe34123f613b51b1693 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Fri, 18 Oct 2024 13:48:15 +0530 Subject: [PATCH 0379/1614] refactor: patch to migrating old SO / PO to advance ledger (cherry picked from commit b927f2f4a0744db8680dcd9d664ec4c9ab9453f0) --- .../create_advance_payment_ledger_records.py | 71 +++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 erpnext/patches/v15_0/create_advance_payment_ledger_records.py diff --git a/erpnext/patches/v15_0/create_advance_payment_ledger_records.py b/erpnext/patches/v15_0/create_advance_payment_ledger_records.py new file mode 100644 index 00000000000..64d8e3c0f3c --- /dev/null +++ b/erpnext/patches/v15_0/create_advance_payment_ledger_records.py @@ -0,0 +1,71 @@ +import frappe +from frappe import qb +from frappe.query_builder.custom import ConstantColumn + + +def get_advance_doctypes() -> list: + return frappe.get_hooks("advance_payment_receivable_doctypes") + frappe.get_hooks( + "advance_payment_payable_doctypes" + ) + + +def get_payments_with_so_po_reference() -> list: + advance_doctypes = get_advance_doctypes() + per = qb.DocType("Payment Entry Reference") + payments_with_reference = ( + qb.from_(per) + .select(per.parent) + .distinct() + .where(per.reference_doctype.isin(advance_doctypes) & per.docstatus.eq(1)) + .run() + ) + pe = qb.DocType("Payment Entry") + advance_payment_entries = ( + qb.from_(pe) + .select(ConstantColumn("Payment Entry").as_("doctype")) + .select(pe.name) + .where(pe.name.isin(payments_with_reference) & pe.docstatus.eq(1)) + .run(as_dict=True) + ) + + return advance_payment_entries + + +def get_journals_with_so_po_reference() -> list: + advance_doctypes = get_advance_doctypes() + jea = qb.DocType("Journal Entry Account") + journals_with_reference = ( + qb.from_(jea) + .select(jea.parent) + .distinct() + .where(jea.reference_type.isin(advance_doctypes) & jea.docstatus.eq(1)) + .run() + ) + je = qb.DocType("Journal Entry") + advance_payment_entries = ( + qb.from_(je) + .select(ConstantColumn("Journal Entry").as_("doctype")) + .select(je.name) + .where(je.name.isin(journals_with_reference) & je.docstatus.eq(1)) + .run(as_dict=True) + ) + + return advance_payment_entries + + +def make_advance_ledger_entries(vouchers: list): + for x in vouchers: + frappe.get_doc(x.doctype, x.name).make_advance_payment_ledger_entries() + + +def execute(): + """ + Description: + Create Advance Payment Ledger Entry for all Payments made against Sales / Purchase Orders + """ + frappe.db.truncate("Advance Payment Ledger Entry") + payment_entries = get_payments_with_so_po_reference() + make_advance_ledger_entries(payment_entries) + + journals = get_journals_with_so_po_reference() + make_advance_ledger_entries(journals) From c6bfdcf50319486ab7348420667b5d4060e666c8 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Fri, 18 Oct 2024 16:22:38 +0530 Subject: [PATCH 0380/1614] chore: update patchex.txt (cherry picked from commit 8ab7194b1d6112af4ddb8034fb34dd9d49cf623f) --- erpnext/patches.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/patches.txt b/erpnext/patches.txt index f48dc00fc8e..64c74f9d645 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -359,6 +359,7 @@ erpnext.patches.v15_0.allow_on_submit_dimensions_for_repostable_doctypes erpnext.patches.v14_0.update_flag_for_return_invoices #2024-03-22 erpnext.patches.v15_0.create_accounting_dimensions_in_payment_request erpnext.patches.v14_0.update_pos_return_ledger_entries #2024-08-16 +erpnext.patches.v15_0.create_advance_payment_ledger_records # below migration patch should always run last erpnext.patches.v14_0.migrate_gl_to_payment_ledger erpnext.stock.doctype.delivery_note.patches.drop_unused_return_against_index # 2023-12-20 From 063cef576cbebb8fb69b980a14d39b42caada964 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Fri, 18 Oct 2024 16:25:58 +0530 Subject: [PATCH 0381/1614] chore: update ignore_linked_doctypes for Journal Entry (cherry picked from commit 767ae6a372969ecbd03e7b66af3d9ede4202e9b0) --- erpnext/accounts/doctype/journal_entry/journal_entry.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.py b/erpnext/accounts/doctype/journal_entry/journal_entry.py index d11cc27ccb7..bd25b13e999 100644 --- a/erpnext/accounts/doctype/journal_entry/journal_entry.py +++ b/erpnext/accounts/doctype/journal_entry/journal_entry.py @@ -219,6 +219,7 @@ class JournalEntry(AccountsController): "Repost Accounting Ledger Items", "Unreconcile Payment", "Unreconcile Payment Entries", + "Advance Payment Ledger Entry", ) self.make_gl_entries(1) self.make_advance_payment_ledger_entries() From 164d7cc896138b1c7bbfbdf00efe39fdb71c9dbb Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 22 Oct 2024 16:07:14 +0530 Subject: [PATCH 0382/1614] refactor: handle 'no data' situation in patch (cherry picked from commit 8e3bf7dc09dfdbe51043179dd32c04ab1f61f23e) --- .../create_advance_payment_ledger_records.py | 38 ++++++++++--------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/erpnext/patches/v15_0/create_advance_payment_ledger_records.py b/erpnext/patches/v15_0/create_advance_payment_ledger_records.py index 64d8e3c0f3c..13b4d95c760 100644 --- a/erpnext/patches/v15_0/create_advance_payment_ledger_records.py +++ b/erpnext/patches/v15_0/create_advance_payment_ledger_records.py @@ -10,6 +10,7 @@ def get_advance_doctypes() -> list: def get_payments_with_so_po_reference() -> list: + advance_payment_entries = [] advance_doctypes = get_advance_doctypes() per = qb.DocType("Payment Entry Reference") payments_with_reference = ( @@ -19,19 +20,21 @@ def get_payments_with_so_po_reference() -> list: .where(per.reference_doctype.isin(advance_doctypes) & per.docstatus.eq(1)) .run() ) - pe = qb.DocType("Payment Entry") - advance_payment_entries = ( - qb.from_(pe) - .select(ConstantColumn("Payment Entry").as_("doctype")) - .select(pe.name) - .where(pe.name.isin(payments_with_reference) & pe.docstatus.eq(1)) - .run(as_dict=True) - ) + if payments_with_reference: + pe = qb.DocType("Payment Entry") + advance_payment_entries = ( + qb.from_(pe) + .select(ConstantColumn("Payment Entry").as_("doctype")) + .select(pe.name) + .where(pe.name.isin(payments_with_reference) & pe.docstatus.eq(1)) + .run(as_dict=True) + ) return advance_payment_entries def get_journals_with_so_po_reference() -> list: + advance_journal_entries = [] advance_doctypes = get_advance_doctypes() jea = qb.DocType("Journal Entry Account") journals_with_reference = ( @@ -41,16 +44,17 @@ def get_journals_with_so_po_reference() -> list: .where(jea.reference_type.isin(advance_doctypes) & jea.docstatus.eq(1)) .run() ) - je = qb.DocType("Journal Entry") - advance_payment_entries = ( - qb.from_(je) - .select(ConstantColumn("Journal Entry").as_("doctype")) - .select(je.name) - .where(je.name.isin(journals_with_reference) & je.docstatus.eq(1)) - .run(as_dict=True) - ) + if journals_with_reference: + je = qb.DocType("Journal Entry") + advance_journal_entries = ( + qb.from_(je) + .select(ConstantColumn("Journal Entry").as_("doctype")) + .select(je.name) + .where(je.name.isin(journals_with_reference) & je.docstatus.eq(1)) + .run(as_dict=True) + ) - return advance_payment_entries + return advance_journal_entries def make_advance_ledger_entries(vouchers: list): From 68a95c7dbc943933e65ee0d08d30fdf6a2cbd592 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 22 Oct 2024 17:04:35 +0530 Subject: [PATCH 0383/1614] refactor: move creation logic to controller (cherry picked from commit ad88bde448d96cf50ece9a65fb3110b8bd89257f) --- .../doctype/journal_entry/journal_entry.py | 26 ---------- .../doctype/payment_entry/payment_entry.py | 20 -------- erpnext/controllers/accounts_controller.py | 50 +++++++++++++++++++ 3 files changed, 50 insertions(+), 46 deletions(-) diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.py b/erpnext/accounts/doctype/journal_entry/journal_entry.py index bd25b13e999..fb5c563d790 100644 --- a/erpnext/accounts/doctype/journal_entry/journal_entry.py +++ b/erpnext/accounts/doctype/journal_entry/journal_entry.py @@ -234,32 +234,6 @@ class JournalEntry(AccountsController): def get_title(self): return self.pay_to_recd_from or self.accounts[0].account - def make_advance_payment_ledger_entries(self): - if self.docstatus == 1 or self.docstatus == 2: - advance_payment_doctypes = frappe.get_hooks( - "advance_payment_receivable_doctypes" - ) + frappe.get_hooks("advance_payment_payable_doctypes") - - advance_doctype_references = [ - x for x in self.accounts if x.reference_type in advance_payment_doctypes - ] - - for x in advance_doctype_references: - # Looking for payments - dr_or_cr = "credit" if x.account_type == "Receivable" else "debit" - - amount = x.get(dr_or_cr) - if amount > 0: - doc = frappe.new_doc("Advance Payment Ledger Entry") - doc.company = self.company - doc.voucher_type = self.doctype - doc.voucher_no = self.name - doc.against_voucher_type = x.reference_type - doc.against_voucher_no = x.reference_name - doc.amount = amount if self.docstatus == 1 else -1 * amount - doc.event = "Submit" if self.docstatus == 1 else "Cancel" - doc.save() - def update_advance_paid(self): advance_paid = frappe._dict() for d in self.get("accounts"): diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index abd6ea37e6d..8832b87eec7 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -1852,26 +1852,6 @@ class PaymentEntry(AccountsController): allocated_negative_outstanding, ) - def make_advance_payment_ledger_entries(self): - if self.docstatus == 1 or self.docstatus == 2: - advance_payment_doctypes = frappe.get_hooks( - "advance_payment_receivable_doctypes" - ) + frappe.get_hooks("advance_payment_payable_doctypes") - - advance_doctype_references = [ - x for x in self.references if x.reference_doctype in advance_payment_doctypes - ] - for x in advance_doctype_references: - doc = frappe.new_doc("Advance Payment Ledger Entry") - doc.company = self.company - doc.voucher_type = self.doctype - doc.voucher_no = self.name - doc.against_voucher_type = x.reference_doctype - doc.against_voucher_no = x.reference_name - doc.amount = x.allocated_amount if self.docstatus == 1 else -1 * x.allocated_amount - doc.event = "Submit" if self.docstatus == 1 else "Cancel" - doc.save() - @frappe.whitelist() def set_matched_payment_requests(self, matched_payment_requests): """ diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 23498ad6883..a7a36b7e643 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -2570,6 +2570,56 @@ class AccountsController(TransactionBase): repost_ledger.insert() repost_ledger.submit() + def get_advance_payment_doctypes(self) -> list: + return frappe.get_hooks("advance_payment_receivable_doctypes") + frappe.get_hooks( + "advance_payment_payable_doctypes" + ) + + def make_advance_payment_ledger_for_journal(self): + advance_payment_doctypes = self.get_advance_payment_doctypes() + advance_doctype_references = [ + x for x in self.accounts if x.reference_type in advance_payment_doctypes + ] + + for x in advance_doctype_references: + # Looking for payments + dr_or_cr = "credit" if x.account_type == "Receivable" else "debit" + + amount = x.get(dr_or_cr) + if amount > 0: + doc = frappe.new_doc("Advance Payment Ledger Entry") + doc.company = self.company + doc.voucher_type = self.doctype + doc.voucher_no = self.name + doc.against_voucher_type = x.reference_type + doc.against_voucher_no = x.reference_name + doc.amount = amount if self.docstatus == 1 else -1 * amount + doc.event = "Submit" if self.docstatus == 1 else "Cancel" + doc.save() + + def make_advance_payment_ledger_for_payment(self): + advance_payment_doctypes = self.get_advance_payment_doctypes() + advance_doctype_references = [ + x for x in self.references if x.reference_doctype in advance_payment_doctypes + ] + for x in advance_doctype_references: + doc = frappe.new_doc("Advance Payment Ledger Entry") + doc.company = self.company + doc.voucher_type = self.doctype + doc.voucher_no = self.name + doc.against_voucher_type = x.reference_doctype + doc.against_voucher_no = x.reference_name + doc.amount = x.allocated_amount if self.docstatus == 1 else -1 * x.allocated_amount + doc.event = "Submit" if self.docstatus == 1 else "Cancel" + doc.save() + + def make_advance_payment_ledger_entries(self): + if self.docstatus != 0: + if self.doctype == "Journal Entry": + self.make_advance_payment_ledger_for_journal() + elif self.doctype == "Payment Entry": + self.make_advance_payment_ledger_for_payment() + @frappe.whitelist() def get_tax_rate(account_head): From 07a394a1c509b0539041f5fc88f1d000ff749951 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Wed, 30 Oct 2024 10:16:47 +0530 Subject: [PATCH 0384/1614] refactor: handle currency on advance payment ledger (cherry picked from commit ae6a81cd07e5f78a4b6107028a1322ec82978ae9) --- erpnext/controllers/accounts_controller.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index a7a36b7e643..6870c06bf5d 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -1958,7 +1958,7 @@ class AccountsController(TransactionBase): >>>>>>> 2b2360bf7b (refactor: calculate advance from advance ledger) advance = ( frappe.qb.from_(adv) - .select(adv.currency, Abs(Sum(adv.amount)).as_("amount")) + .select(adv.currency.as_("account_currency"), Abs(Sum(adv.amount)).as_("amount")) .where( (adv.against_voucher_type == self.doctype) & (adv.against_voucher_no == self.name) @@ -2602,6 +2602,11 @@ class AccountsController(TransactionBase): advance_doctype_references = [ x for x in self.references if x.reference_doctype in advance_payment_doctypes ] + currency = ( + self.paid_from_account_currency + if self.payment_type == "Receive" + else self.paid_to_account_currency + ) for x in advance_doctype_references: doc = frappe.new_doc("Advance Payment Ledger Entry") doc.company = self.company @@ -2610,6 +2615,7 @@ class AccountsController(TransactionBase): doc.against_voucher_type = x.reference_doctype doc.against_voucher_no = x.reference_name doc.amount = x.allocated_amount if self.docstatus == 1 else -1 * x.allocated_amount + doc.currency = currency doc.event = "Submit" if self.docstatus == 1 else "Cancel" doc.save() From d830ce1d88f7377627f047458f8c07b11b6b3725 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Wed, 30 Oct 2024 12:21:41 +0530 Subject: [PATCH 0385/1614] test: USD Sales Order with advance payment (cherry picked from commit 6c731561f3afb7208a7d8489f25c6d2008d6fd71) --- .../doctype/sales_order/test_sales_order.py | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/erpnext/selling/doctype/sales_order/test_sales_order.py b/erpnext/selling/doctype/sales_order/test_sales_order.py index 244a6b1ddad..c2c587899d4 100644 --- a/erpnext/selling/doctype/sales_order/test_sales_order.py +++ b/erpnext/selling/doctype/sales_order/test_sales_order.py @@ -1327,6 +1327,64 @@ class TestSalesOrder(AccountsTestMixin, FrappeTestCase): so.reload() self.assertEqual(so.advance_paid, 0) + def create_foreign_currency_usd_account(self): + account_name = "Debtors USD" + if not frappe.db.get_value( + "Account", filters={"account_name": account_name, "company": "_Test Company"} + ): + acc = frappe.new_doc("Account") + acc.account_name = account_name + acc.parent_account = "Accounts Receivable - _TC" + acc.company = "_Test Company" + acc.account_currency = "USD" + acc.account_type = "Receivable" + acc.insert() + else: + name = frappe.db.get_value( + "Account", + filters={"account_name": account_name, "company": "_Test Company"}, + fieldname="name", + pluck=True, + ) + acc = frappe.get_doc("Account", name) + self.debtors_usd = acc.name + + def test_advance_paid_and_currency_with_payment(self): + from erpnext.accounts.doctype.payment_entry.test_payment_entry import get_payment_entry + + self.create_customer("_Test USD Customer", "USD") + self.create_foreign_currency_usd_account() + + so = make_sales_order(customer=self.customer, currency="USD", qty=1, rate=100, do_not_submit=True) + so.conversion_rate = 80 + so.submit() + + pe_exchange_rate = 85 + pe = get_payment_entry("Sales Order", so.name, bank_account="_Test Bank - _TC") + pe.reference_no = "1" + pe.reference_date = nowdate() + pe.paid_from = self.debtors_usd + pe.paid_from_account_currency = "USD" + pe.source_exchange_rate = pe_exchange_rate + pe.paid_amount = so.grand_total + pe.received_amount = pe_exchange_rate * pe.paid_amount + pe.references[0].outstanding_amount = 100 + pe.references[0].total_amount = 100 + pe.references[0].allocated_amount = 100 + pe.save().submit() + + so.reload() + self.assertEqual(so.advance_paid, 100) + self.assertEqual(so.party_account_currency, "USD") + + # cancel advance payment + pe.reload() + pe.cancel() + + so.reload() + self.assertEqual(so.advance_paid, 0) + self.assertEqual(so.party_account_currency, "USD") + def test_cancel_sales_order_after_cancel_payment_entry(self): from erpnext.accounts.doctype.payment_entry.test_payment_entry import get_payment_entry From c8be4f3f781119516128d113365da736a149ebc1 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Wed, 30 Oct 2024 12:58:29 +0530 Subject: [PATCH 0386/1614] refactor: use dr / cr account currency field for journals (cherry picked from commit 9c1a4e284c0cbc0f943920a5501a6503ce4c5fde) --- erpnext/controllers/accounts_controller.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 6870c06bf5d..03910516dea 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -2583,7 +2583,11 @@ class AccountsController(TransactionBase): for x in advance_doctype_references: # Looking for payments - dr_or_cr = "credit" if x.account_type == "Receivable" else "debit" + dr_or_cr = ( + "credit_in_account_currency" + if x.account_type == "Receivable" + else "debit_in_account_currency" + ) amount = x.get(dr_or_cr) if amount > 0: @@ -2595,6 +2599,7 @@ class AccountsController(TransactionBase): doc.against_voucher_no = x.reference_name doc.amount = amount if self.docstatus == 1 else -1 * amount doc.event = "Submit" if self.docstatus == 1 else "Cancel" + doc.currency = x.account_currency doc.save() def make_advance_payment_ledger_for_payment(self): From 7f9ae4e0447a2572a9909b88753e9311365ef464 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Wed, 30 Oct 2024 13:07:39 +0530 Subject: [PATCH 0387/1614] test: advance and currency from Journal (cherry picked from commit 18250825126be744b6bf4db3ce6bf23670d0a12a) --- .../doctype/sales_order/test_sales_order.py | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/erpnext/selling/doctype/sales_order/test_sales_order.py b/erpnext/selling/doctype/sales_order/test_sales_order.py index c2c587899d4..640669efbb7 100644 --- a/erpnext/selling/doctype/sales_order/test_sales_order.py +++ b/erpnext/selling/doctype/sales_order/test_sales_order.py @@ -1385,6 +1385,57 @@ class TestSalesOrder(AccountsTestMixin, FrappeTestCase): self.assertEqual(so.advance_paid, 0) self.assertEqual(so.party_account_currency, "USD") + def test_advance_paid_and_currency_with_journal(self): + from erpnext.accounts.doctype.payment_entry.test_payment_entry import get_payment_entry + + self.create_customer("_Test USD Customer", "USD") + self.create_foreign_currency_usd_account() + + so = make_sales_order(customer=self.customer, currency="USD", qty=1, rate=100, do_not_submit=True) + so.conversion_rate = 80 + so.submit() + + je_exchange_rate = 85 + je = frappe.get_doc( + { + "doctype": "Journal Entry", + "company": "_Test Company", + "voucher_type": "Journal Entry", + "posting_date": so.transaction_date, + "multi_currency": True, + "accounts": [ + { + "account": self.debtors_usd, + "party_type": "Customer", + "party": so.customer, + "credit": 8500, + "credit_in_account_currency": 100, + "is_advance": "Yes", + "reference_type": so.doctype, + "reference_name": so.name, + "exchange_rate": je_exchange_rate, + }, + { + "account": "_Test Bank - _TC", + "debit": 8500, + "debit_in_account_currency": 8500, + }, + ], + } + ) + je.save().submit() + so.reload() + self.assertEqual(so.advance_paid, 100) + self.assertEqual(so.party_account_currency, "USD") + + # cancel advance payment + je.reload() + je.cancel() + + so.reload() + self.assertEqual(so.advance_paid, 0) + self.assertEqual(so.party_account_currency, "USD") + def test_cancel_sales_order_after_cancel_payment_entry(self): from erpnext.accounts.doctype.payment_entry.test_payment_entry import get_payment_entry From 16c1fc75b5683cb75ab482ce63c07ab07e1cfb06 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 31 Oct 2024 10:08:41 +0530 Subject: [PATCH 0388/1614] chore: move tests to advance payment ledger doctype (cherry picked from commit 14cef3d4c4056bc4840c5a840c43b26fd803b388) --- .../test_advance_payment_ledger_entry.py | 116 +++++++++++++++++- .../doctype/sales_order/test_sales_order.py | 109 ---------------- 2 files changed, 113 insertions(+), 112 deletions(-) diff --git a/erpnext/accounts/doctype/advance_payment_ledger_entry/test_advance_payment_ledger_entry.py b/erpnext/accounts/doctype/advance_payment_ledger_entry/test_advance_payment_ledger_entry.py index 750a658102d..c953291ac6f 100644 --- a/erpnext/accounts/doctype/advance_payment_ledger_entry/test_advance_payment_ledger_entry.py +++ b/erpnext/accounts/doctype/advance_payment_ledger_entry/test_advance_payment_ledger_entry.py @@ -1,8 +1,13 @@ # Copyright (c) 2024, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -# import frappe +import frappe from frappe.tests import IntegrationTestCase, UnitTestCase +from frappe.utils import nowdate, today + +from erpnext.accounts.doctype.payment_entry.test_payment_entry import get_payment_entry +from erpnext.accounts.test.accounts_mixin import AccountsTestMixin +from erpnext.selling.doctype.sales_order.test_sales_order import make_sales_order # On IntegrationTestCase, the doctype test records and all # link-field test record depdendencies are recursively loaded @@ -11,10 +16,115 @@ EXTRA_TEST_RECORD_DEPENDENCIES = [] # eg. ["User"] IGNORE_TEST_RECORD_DEPENDENCIES = [] # eg. ["User"] -class TestAdvancePaymentLedgerEntry(IntegrationTestCase): +class TestAdvancePaymentLedgerEntry(AccountsTestMixin, IntegrationTestCase): """ Integration tests for AdvancePaymentLedgerEntry. Use this class for testing interactions between multiple components. """ - pass + def setUp(self): + self.create_company() + self.create_usd_receivable_account() + self.create_usd_payable_account() + self.create_item() + self.clear_old_entries() + + def tearDown(self): + frappe.db.rollback() + + def create_sales_order(self, qty=1, rate=100, currency="INR", do_not_submit=False): + """ + Helper method + """ + so = make_sales_order( + company=self.company, + customer=self.customer, + currency=currency, + item=self.item, + qty=qty, + rate=rate, + transaction_date=today(), + do_not_submit=do_not_submit, + ) + return so + + def test_so_advance_paid_and_currency_with_payment(self): + self.create_customer("_Test USD Customer", "USD") + + so = self.create_sales_order(currency="USD", do_not_submit=True) + so.conversion_rate = 80 + so.submit() + + pe_exchange_rate = 85 + pe = get_payment_entry(so.doctype, so.name, bank_account=self.cash) + pe.reference_no = "1" + pe.reference_date = nowdate() + pe.paid_from = self.debtors_usd + pe.paid_from_account_currency = "USD" + pe.source_exchange_rate = pe_exchange_rate + pe.paid_amount = so.grand_total + pe.received_amount = pe_exchange_rate * pe.paid_amount + pe.references[0].outstanding_amount = 100 + pe.references[0].total_amount = 100 + pe.references[0].allocated_amount = 100 + pe.save().submit() + + so.reload() + self.assertEqual(so.advance_paid, 100) + self.assertEqual(so.party_account_currency, "USD") + + # cancel advance payment + pe.reload() + pe.cancel() + + so.reload() + self.assertEqual(so.advance_paid, 0) + self.assertEqual(so.party_account_currency, "USD") + + def test_so_advance_paid_and_currency_with_journal(self): + self.create_customer("_Test USD Customer", "USD") + + so = self.create_sales_order(currency="USD", do_not_submit=True) + so.conversion_rate = 80 + so.submit() + + je_exchange_rate = 85 + je = frappe.get_doc( + { + "doctype": "Journal Entry", + "company": self.company, + "voucher_type": "Journal Entry", + "posting_date": so.transaction_date, + "multi_currency": True, + "accounts": [ + { + "account": self.debtors_usd, + "party_type": "Customer", + "party": so.customer, + "credit": 8500, + "credit_in_account_currency": 100, + "is_advance": "Yes", + "reference_type": so.doctype, + "reference_name": so.name, + "exchange_rate": je_exchange_rate, + }, + { + "account": self.cash, + "debit": 8500, + "debit_in_account_currency": 8500, + }, + ], + } + ) + je.save().submit() + so.reload() + self.assertEqual(so.advance_paid, 100) + self.assertEqual(so.party_account_currency, "USD") + + # cancel advance payment + je.reload() + je.cancel() + + so.reload() + self.assertEqual(so.advance_paid, 0) + self.assertEqual(so.party_account_currency, "USD") diff --git a/erpnext/selling/doctype/sales_order/test_sales_order.py b/erpnext/selling/doctype/sales_order/test_sales_order.py index 640669efbb7..244a6b1ddad 100644 --- a/erpnext/selling/doctype/sales_order/test_sales_order.py +++ b/erpnext/selling/doctype/sales_order/test_sales_order.py @@ -1327,115 +1327,6 @@ class TestSalesOrder(AccountsTestMixin, FrappeTestCase): so.reload() self.assertEqual(so.advance_paid, 0) - def create_foreign_currency_usd_account(self): - account_name = "Debtors USD" - if not frappe.db.get_value( - "Account", filters={"account_name": account_name, "company": "_Test Company"} - ): - acc = frappe.new_doc("Account") - acc.account_name = account_name - acc.parent_account = "Accounts Receivable - _TC" - acc.company = "_Test Company" - acc.account_currency = "USD" - acc.account_type = "Receivable" - acc.insert() - else: - name = frappe.db.get_value( - "Account", - filters={"account_name": account_name, "company": "_Test Company"}, - fieldname="name", - pluck=True, - ) - acc = frappe.get_doc("Account", name) - self.debtors_usd = acc.name - - def test_advance_paid_and_currency_with_payment(self): - from erpnext.accounts.doctype.payment_entry.test_payment_entry import get_payment_entry - - self.create_customer("_Test USD Customer", "USD") - self.create_foreign_currency_usd_account() - - so = make_sales_order(customer=self.customer, currency="USD", qty=1, rate=100, do_not_submit=True) - so.conversion_rate = 80 - so.submit() - - pe_exchange_rate = 85 - pe = get_payment_entry("Sales Order", so.name, bank_account="_Test Bank - _TC") - pe.reference_no = "1" - pe.reference_date = nowdate() - pe.paid_from = self.debtors_usd - pe.paid_from_account_currency = "USD" - pe.source_exchange_rate = pe_exchange_rate - pe.paid_amount = so.grand_total - pe.received_amount = pe_exchange_rate * pe.paid_amount - pe.references[0].outstanding_amount = 100 - pe.references[0].total_amount = 100 - pe.references[0].allocated_amount = 100 - pe.save().submit() - - so.reload() - self.assertEqual(so.advance_paid, 100) - self.assertEqual(so.party_account_currency, "USD") - - # cancel advance payment - pe.reload() - pe.cancel() - - so.reload() - self.assertEqual(so.advance_paid, 0) - self.assertEqual(so.party_account_currency, "USD") - - def test_advance_paid_and_currency_with_journal(self): - from erpnext.accounts.doctype.payment_entry.test_payment_entry import get_payment_entry - - self.create_customer("_Test USD Customer", "USD") - self.create_foreign_currency_usd_account() - - so = make_sales_order(customer=self.customer, currency="USD", qty=1, rate=100, do_not_submit=True) - so.conversion_rate = 80 - so.submit() - - je_exchange_rate = 85 - je = frappe.get_doc( - { - "doctype": "Journal Entry", - "company": "_Test Company", - "voucher_type": "Journal Entry", - "posting_date": so.transaction_date, - "multi_currency": True, - "accounts": [ - { - "account": self.debtors_usd, - "party_type": "Customer", - "party": so.customer, - "credit": 8500, - "credit_in_account_currency": 100, - "is_advance": "Yes", - "reference_type": so.doctype, - "reference_name": so.name, - "exchange_rate": je_exchange_rate, - }, - { - "account": "_Test Bank - _TC", - "debit": 8500, - "debit_in_account_currency": 8500, - }, - ], - } - ) - je.save().submit() - so.reload() - self.assertEqual(so.advance_paid, 100) - self.assertEqual(so.party_account_currency, "USD") - - # cancel advance payment - je.reload() - je.cancel() - - so.reload() - self.assertEqual(so.advance_paid, 0) - self.assertEqual(so.party_account_currency, "USD") - def test_cancel_sales_order_after_cancel_payment_entry(self): from erpnext.accounts.doctype.payment_entry.test_payment_entry import get_payment_entry From 91a276d4edbbd34ac40e63770fd9627791c76761 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 31 Oct 2024 10:24:20 +0530 Subject: [PATCH 0389/1614] test: PO 'Advance Paid' and curreny when using payment (cherry picked from commit ca85c75e3950d2dd1d7b5cba88ea61809b0e2f2a) --- .../test_advance_payment_ledger_entry.py | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/erpnext/accounts/doctype/advance_payment_ledger_entry/test_advance_payment_ledger_entry.py b/erpnext/accounts/doctype/advance_payment_ledger_entry/test_advance_payment_ledger_entry.py index c953291ac6f..4fe206a351b 100644 --- a/erpnext/accounts/doctype/advance_payment_ledger_entry/test_advance_payment_ledger_entry.py +++ b/erpnext/accounts/doctype/advance_payment_ledger_entry/test_advance_payment_ledger_entry.py @@ -7,6 +7,7 @@ from frappe.utils import nowdate, today from erpnext.accounts.doctype.payment_entry.test_payment_entry import get_payment_entry from erpnext.accounts.test.accounts_mixin import AccountsTestMixin +from erpnext.buying.doctype.purchase_order.test_purchase_order import create_purchase_order from erpnext.selling.doctype.sales_order.test_sales_order import make_sales_order # On IntegrationTestCase, the doctype test records and all @@ -48,6 +49,22 @@ class TestAdvancePaymentLedgerEntry(AccountsTestMixin, IntegrationTestCase): ) return so + def create_purchase_order(self, qty=1, rate=100, currency="INR", do_not_submit=False): + """ + Helper method + """ + po = create_purchase_order( + company=self.company, + customer=self.supplier, + currency=currency, + item=self.item, + qty=qty, + rate=rate, + transaction_date=today(), + do_not_submit=do_not_submit, + ) + return po + def test_so_advance_paid_and_currency_with_payment(self): self.create_customer("_Test USD Customer", "USD") @@ -128,3 +145,36 @@ class TestAdvancePaymentLedgerEntry(AccountsTestMixin, IntegrationTestCase): so.reload() self.assertEqual(so.advance_paid, 0) self.assertEqual(so.party_account_currency, "USD") + + def test_po_advance_paid_and_currency_with_payment(self): + self.create_supplier("_Test USD Supplier", "USD") + + po = self.create_purchase_order(currency="USD", do_not_submit=True) + po.conversion_rate = 80 + po.submit() + + pe_exchange_rate = 85 + pe = get_payment_entry(po.doctype, po.name, bank_account=self.cash) + pe.reference_no = "1" + pe.reference_date = nowdate() + pe.paid_to = self.creditors_usd + pe.paid_to_account_currency = "USD" + pe.target_exchange_rate = pe_exchange_rate + pe.received_amount = po.grand_total + pe.paid_amount = pe_exchange_rate * pe.received_amount + pe.references[0].outstanding_amount = 100 + pe.references[0].total_amount = 100 + pe.references[0].allocated_amount = 100 + pe.save().submit() + + po.reload() + self.assertEqual(po.advance_paid, 100) + self.assertEqual(po.party_account_currency, "USD") + + # cancel advance payment + pe.reload() + pe.cancel() + + po.reload() + self.assertEqual(po.advance_paid, 0) + self.assertEqual(po.party_account_currency, "USD") From d0a655d5ae15732781f3e1ca824a4374b3295ad9 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 31 Oct 2024 10:27:20 +0530 Subject: [PATCH 0390/1614] test: PO advance and currency from journal (cherry picked from commit cf7b8f1b41c4ff9e86b6cb2eef01e5bd1d49d95e) --- .../test_advance_payment_ledger_entry.py | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/erpnext/accounts/doctype/advance_payment_ledger_entry/test_advance_payment_ledger_entry.py b/erpnext/accounts/doctype/advance_payment_ledger_entry/test_advance_payment_ledger_entry.py index 4fe206a351b..f9ac59bfa80 100644 --- a/erpnext/accounts/doctype/advance_payment_ledger_entry/test_advance_payment_ledger_entry.py +++ b/erpnext/accounts/doctype/advance_payment_ledger_entry/test_advance_payment_ledger_entry.py @@ -178,3 +178,51 @@ class TestAdvancePaymentLedgerEntry(AccountsTestMixin, IntegrationTestCase): po.reload() self.assertEqual(po.advance_paid, 0) self.assertEqual(po.party_account_currency, "USD") + + def test_po_advance_paid_and_currency_with_journal(self): + self.create_supplier("_Test USD Supplier", "USD") + + po = self.create_purchase_order(currency="USD", do_not_submit=True) + po.conversion_rate = 80 + po.submit() + + je_exchange_rate = 85 + je = frappe.get_doc( + { + "doctype": "Journal Entry", + "company": self.company, + "voucher_type": "Journal Entry", + "posting_date": po.transaction_date, + "multi_currency": True, + "accounts": [ + { + "account": self.creditors_usd, + "party_type": "Supplier", + "party": po.supplier, + "debit": 8500, + "debit_in_account_currency": 100, + "is_advance": "Yes", + "reference_type": po.doctype, + "reference_name": po.name, + "exchange_rate": je_exchange_rate, + }, + { + "account": self.cash, + "credit": 8500, + "credit_in_account_currency": 8500, + }, + ], + } + ) + je.save().submit() + po.reload() + self.assertEqual(po.advance_paid, 100) + self.assertEqual(po.party_account_currency, "USD") + + # cancel advance payment + je.reload() + je.cancel() + + po.reload() + self.assertEqual(po.advance_paid, 0) + self.assertEqual(po.party_account_currency, "USD") From ba09ddcc3a0d02fc8cb318dd381e11e07afcccf5 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Fri, 1 Nov 2024 14:10:45 +0530 Subject: [PATCH 0391/1614] chore: resolve conflict --- erpnext/controllers/accounts_controller.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 03910516dea..d6016ef7d1d 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -1948,14 +1948,8 @@ class AccountsController(TransactionBase): return stock_items -<<<<<<< HEAD - def set_total_advance_paid(self): - ple = frappe.qb.DocType("Payment Ledger Entry") - party = self.customer if self.doctype == "Sales Order" else self.supplier -======= def calculate_total_advance_from_ledger(self): adv = frappe.qb.DocType("Advance Payment Ledger Entry") ->>>>>>> 2b2360bf7b (refactor: calculate advance from advance ledger) advance = ( frappe.qb.from_(adv) .select(adv.currency.as_("account_currency"), Abs(Sum(adv.amount)).as_("amount")) @@ -1968,13 +1962,10 @@ class AccountsController(TransactionBase): ) return advance -<<<<<<< HEAD -======= def set_total_advance_paid(self): advance = self.calculate_total_advance_from_ledger() advance_paid, order_total = None, None ->>>>>>> 2b2360bf7b (refactor: calculate advance from advance ledger) if advance: advance = advance[0] From 426010e21a3a02e2f2711a44f9b3e30bb209e6e2 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Fri, 1 Nov 2024 14:14:03 +0530 Subject: [PATCH 0392/1614] refactor: fetch correct hook variable --- erpnext/controllers/accounts_controller.py | 9 +++------ .../v15_0/create_advance_payment_ledger_records.py | 4 +--- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index d6016ef7d1d..1ae6b5256a5 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -349,9 +349,8 @@ class AccountsController(TransactionBase): adv = qb.DocType("Advance Payment Ledger Entry") qb.from_(adv).delete().where(adv.voucher_type.eq(self.doctype) & adv.voucher_no.eq(self.name)).run() - advance_payment_doctypes = frappe.get_hooks("advance_payment_receivable_doctypes") + frappe.get_hooks( - "advance_payment_payable_doctypes" - ) + advance_payment_doctypes = frappe.get_hooks("advance_payment_doctypes") + if self.doctype in advance_payment_doctypes: qb.from_(adv).delete().where( adv.against_voucher_type.eq(self.doctype) & adv.against_voucher_no.eq(self.name) @@ -2562,9 +2561,7 @@ class AccountsController(TransactionBase): repost_ledger.submit() def get_advance_payment_doctypes(self) -> list: - return frappe.get_hooks("advance_payment_receivable_doctypes") + frappe.get_hooks( - "advance_payment_payable_doctypes" - ) + return frappe.get_hooks("advance_payment_doctypes") def make_advance_payment_ledger_for_journal(self): advance_payment_doctypes = self.get_advance_payment_doctypes() diff --git a/erpnext/patches/v15_0/create_advance_payment_ledger_records.py b/erpnext/patches/v15_0/create_advance_payment_ledger_records.py index 13b4d95c760..8d247885cab 100644 --- a/erpnext/patches/v15_0/create_advance_payment_ledger_records.py +++ b/erpnext/patches/v15_0/create_advance_payment_ledger_records.py @@ -4,9 +4,7 @@ from frappe.query_builder.custom import ConstantColumn def get_advance_doctypes() -> list: - return frappe.get_hooks("advance_payment_receivable_doctypes") + frappe.get_hooks( - "advance_payment_payable_doctypes" - ) + return frappe.get_hooks("advance_payment_doctypes") def get_payments_with_so_po_reference() -> list: From 9bfcad31fd45d1585830d059bd8126853a1eef12 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Fri, 1 Nov 2024 20:08:07 +0530 Subject: [PATCH 0393/1614] refactor: replace non-existant IntegrationTestCase --- .../test_advance_payment_ledger_entry.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/erpnext/accounts/doctype/advance_payment_ledger_entry/test_advance_payment_ledger_entry.py b/erpnext/accounts/doctype/advance_payment_ledger_entry/test_advance_payment_ledger_entry.py index f9ac59bfa80..2f578aed172 100644 --- a/erpnext/accounts/doctype/advance_payment_ledger_entry/test_advance_payment_ledger_entry.py +++ b/erpnext/accounts/doctype/advance_payment_ledger_entry/test_advance_payment_ledger_entry.py @@ -2,7 +2,7 @@ # See license.txt import frappe -from frappe.tests import IntegrationTestCase, UnitTestCase +from frappe.tests.utils import FrappeTestCase from frappe.utils import nowdate, today from erpnext.accounts.doctype.payment_entry.test_payment_entry import get_payment_entry @@ -10,14 +10,8 @@ from erpnext.accounts.test.accounts_mixin import AccountsTestMixin from erpnext.buying.doctype.purchase_order.test_purchase_order import create_purchase_order from erpnext.selling.doctype.sales_order.test_sales_order import make_sales_order -# On IntegrationTestCase, the doctype test records and all -# link-field test record depdendencies are recursively loaded -# Use these module variables to add/remove to/from that list -EXTRA_TEST_RECORD_DEPENDENCIES = [] # eg. ["User"] -IGNORE_TEST_RECORD_DEPENDENCIES = [] # eg. ["User"] - -class TestAdvancePaymentLedgerEntry(AccountsTestMixin, IntegrationTestCase): +class TestAdvancePaymentLedgerEntry(AccountsTestMixin, FrappeTestCase): """ Integration tests for AdvancePaymentLedgerEntry. Use this class for testing interactions between multiple components. From a689830bff72e85c940e4fc3a897edaeaa2b2c38 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Sun, 3 Nov 2024 04:20:01 +0530 Subject: [PATCH 0394/1614] fix: validation trigger (backport #43926) (#43943) fix: validation trigger (#43926) (cherry picked from commit ba9fb4effc32f7e5454b8a0bab664195b6cb2108) Co-authored-by: rohitwaghchaure --- erpnext/manufacturing/doctype/bom/bom.py | 7 +++++++ erpnext/manufacturing/doctype/work_order/work_order.py | 10 ++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py index 009320c7a18..843528de706 100644 --- a/erpnext/manufacturing/doctype/bom/bom.py +++ b/erpnext/manufacturing/doctype/bom/bom.py @@ -968,6 +968,13 @@ class BOM(WebsiteGenerator): if not d.batch_size or d.batch_size <= 0: d.batch_size = 1 + if not d.workstation and not d.workstation_type: + frappe.throw( + _( + "Row {0}: Workstation or Workstation Type is mandatory for an operation {1}" + ).format(d.idx, d.operation) + ) + def get_tree_representation(self) -> BOMTree: """Get a complete tree representation preserving order of child items.""" return BOMTree(self.name) diff --git a/erpnext/manufacturing/doctype/work_order/work_order.py b/erpnext/manufacturing/doctype/work_order/work_order.py index d13cd27a095..1ebcde75366 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order.py +++ b/erpnext/manufacturing/doctype/work_order/work_order.py @@ -173,10 +173,16 @@ class WorkOrder(Document): self.get_items_and_operations_from_bom() def validate_workstation_type(self): + if not self.docstatus.is_submitted(): + return + for row in self.operations: if not row.workstation and not row.workstation_type: - msg = f"Row {row.idx}: Workstation or Workstation Type is mandatory for an operation {row.operation}" - frappe.throw(_(msg)) + frappe.throw( + _("Row {0}: Workstation or Workstation Type is mandatory for an operation {1}").format( + row.idx, row.operation + ) + ) def validate_sales_order(self): if self.sales_order: From ce42d847b3c98f29f82ecc165dfa7a371a916399 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Sun, 3 Nov 2024 04:20:20 +0530 Subject: [PATCH 0395/1614] fix: valuation rate for sales / purchase return for serial / batch nos (backport #43925) (#43942) fix: valuation rate for sales / purchase return for serial / batch nos (#43925) (cherry picked from commit 01bb1612da5e28a6b80640db4f0e77107ad00017) Co-authored-by: rohitwaghchaure --- .../controllers/sales_and_purchase_return.py | 37 ++- erpnext/controllers/stock_controller.py | 5 + .../delivery_note/test_delivery_note.py | 262 ++++++++++++++++++ .../purchase_receipt/test_purchase_receipt.py | 228 +++++++++++++++ .../serial_and_batch_bundle.py | 94 ++++++- erpnext/stock/serial_batch_bundle.py | 30 +- 6 files changed, 643 insertions(+), 13 deletions(-) diff --git a/erpnext/controllers/sales_and_purchase_return.py b/erpnext/controllers/sales_and_purchase_return.py index 6da23834b61..b1ba8e22c2e 100644 --- a/erpnext/controllers/sales_and_purchase_return.py +++ b/erpnext/controllers/sales_and_purchase_return.py @@ -597,6 +597,10 @@ def make_return_doc(doctype: str, source_name: str, target_doc=None, return_agai if default_warehouse_for_sales_return: target_doc.warehouse = default_warehouse_for_sales_return + if not source_doc.use_serial_batch_fields and source_doc.serial_and_batch_bundle: + target_doc.serial_no = None + target_doc.batch_no = None + if ( (source_doc.serial_no or source_doc.batch_no) and not source_doc.serial_and_batch_bundle @@ -899,6 +903,7 @@ def get_serial_batches_based_on_bundle(field, _bundle_ids): "`tabSerial and Batch Entry`.`serial_no`", "`tabSerial and Batch Entry`.`batch_no`", "`tabSerial and Batch Entry`.`qty`", + "`tabSerial and Batch Entry`.`incoming_rate`", "`tabSerial and Batch Bundle`.`voucher_detail_no`", "`tabSerial and Batch Bundle`.`voucher_type`", "`tabSerial and Batch Bundle`.`voucher_no`", @@ -920,15 +925,23 @@ def get_serial_batches_based_on_bundle(field, _bundle_ids): if key not in available_dict: available_dict[key] = frappe._dict( - {"qty": 0.0, "serial_nos": defaultdict(float), "batches": defaultdict(float)} + { + "qty": 0.0, + "serial_nos": defaultdict(float), + "batches": defaultdict(float), + "serial_nos_valuation": defaultdict(float), + "batches_valuation": defaultdict(float), + } ) available_dict[key]["qty"] += row.qty if row.serial_no: available_dict[key]["serial_nos"][row.serial_no] += row.qty + available_dict[key]["serial_nos_valuation"][row.serial_no] = row.incoming_rate elif row.batch_no: available_dict[key]["batches"][row.batch_no] += row.qty + available_dict[key]["batches_valuation"][row.batch_no] = row.incoming_rate return available_dict @@ -964,12 +977,13 @@ def get_serial_and_batch_bundle(field, doctype, reference_ids, is_rejected=False ) ) else: - fields = [ - "serial_and_batch_bundle", - ] + fields = ["serial_and_batch_bundle"] if is_rejected: - fields.extend(["rejected_serial_and_batch_bundle", "return_qty_from_rejected_warehouse"]) + fields.append("rejected_serial_and_batch_bundle") + + if doctype == "Purchase Receipt Item": + fields.append("return_qty_from_rejected_warehouse") del filters["rejected_serial_and_batch_bundle"] data = frappe.get_all( @@ -1003,7 +1017,14 @@ def filter_serial_batches(parent_doc, data, row, warehouse_field=None, qty_field warehouse = row.get(warehouse_field) qty = abs(row.get(qty_field)) - filterd_serial_batch = frappe._dict({"serial_nos": [], "batches": defaultdict(float)}) + filterd_serial_batch = frappe._dict( + { + "serial_nos": [], + "batches": defaultdict(float), + "serial_nos_valuation": data.get("serial_nos_valuation"), + "batches_valuation": data.get("batches_valuation"), + } + ) if data.serial_nos: available_serial_nos = [] @@ -1013,7 +1034,7 @@ def filter_serial_batches(parent_doc, data, row, warehouse_field=None, qty_field if available_serial_nos: if parent_doc.doctype in ["Purchase Invoice", "Purchase Reecipt"]: - available_serial_nos = get_available_serial_nos(available_serial_nos) + available_serial_nos = get_available_serial_nos(available_serial_nos, warehouse) if len(available_serial_nos) > qty: filterd_serial_batch["serial_nos"] = sorted(available_serial_nos[0 : cint(qty)]) @@ -1098,6 +1119,8 @@ def make_serial_batch_bundle_for_return(data, child_doc, parent_doc, warehouse_f "warehouse": warehouse, "serial_nos": data.get("serial_nos"), "batches": data.get("batches"), + "serial_nos_valuation": data.get("serial_nos_valuation"), + "batches_valuation": data.get("batches_valuation"), "posting_date": parent_doc.posting_date, "posting_time": parent_doc.posting_time, "voucher_type": parent_doc.doctype, diff --git a/erpnext/controllers/stock_controller.py b/erpnext/controllers/stock_controller.py index 0714bdd3a63..046a0c7da30 100644 --- a/erpnext/controllers/stock_controller.py +++ b/erpnext/controllers/stock_controller.py @@ -334,6 +334,11 @@ class StockController(AccountsController): } ) + if self.doctype in ["Sales Invoice", "Delivery Note"]: + row.db_set( + "incoming_rate", frappe.db.get_value("Serial and Batch Bundle", bundle, "avg_rate") + ) + def get_reference_ids(self, table_name, qty_field=None, bundle_field=None) -> tuple[str, list[str]]: field = { "Sales Invoice": "sales_invoice_item", diff --git a/erpnext/stock/doctype/delivery_note/test_delivery_note.py b/erpnext/stock/doctype/delivery_note/test_delivery_note.py index 0cfb427c670..9acdce8bebc 100644 --- a/erpnext/stock/doctype/delivery_note/test_delivery_note.py +++ b/erpnext/stock/doctype/delivery_note/test_delivery_note.py @@ -3,6 +3,7 @@ import json +from collections import defaultdict import frappe from frappe.tests.utils import FrappeTestCase @@ -2080,6 +2081,264 @@ class TestDeliveryNote(FrappeTestCase): self.assertEqual(stock_value_difference, 100.0 * 5) + def test_delivery_note_return_valuation_without_use_serial_batch_field(self): + from erpnext.stock.doctype.delivery_note.delivery_note import make_sales_return + + batch_item = make_item( + "_Test Delivery Note Return Valuation Batch Item", + properties={ + "has_batch_no": 1, + "create_new_batch": 1, + "is_stock_item": 1, + "batch_number_series": "BRTN-DNN-BI-.#####", + }, + ).name + + serial_item = make_item( + "_Test Delivery Note Return Valuation Serial Item", + properties={"has_serial_no": 1, "is_stock_item": 1, "serial_no_series": "SRTN-DNN-TP-.#####"}, + ).name + + batches = {} + serial_nos = [] + for qty, rate in {3: 300, 2: 100}.items(): + se = make_stock_entry( + item_code=batch_item, target="_Test Warehouse - _TC", qty=qty, basic_rate=rate + ) + batches[get_batch_from_bundle(se.items[0].serial_and_batch_bundle)] = qty + + for qty, rate in {2: 100, 1: 50}.items(): + make_stock_entry(item_code=serial_item, target="_Test Warehouse - _TC", qty=qty, basic_rate=rate) + serial_nos.extend(get_serial_nos_from_bundle(se.items[0].serial_and_batch_bundle)) + + dn = create_delivery_note( + item_code=batch_item, + qty=5, + rate=1000, + use_serial_batch_fields=0, + batches=batches, + do_not_submit=True, + ) + + bundle_id = make_serial_batch_bundle( + frappe._dict( + { + "item_code": serial_item, + "warehouse": dn.items[0].warehouse, + "qty": 3, + "voucher_type": "Delivery Note", + "serial_nos": serial_nos, + "posting_date": dn.posting_date, + "posting_time": dn.posting_time, + "type_of_transaction": "Outward", + "do_not_submit": True, + } + ) + ).name + + dn.append( + "items", + { + "item_code": serial_item, + "qty": 3, + "rate": 700, + "base_rate": 700, + "item_name": serial_item, + "uom": "Nos", + "stock_uom": "Nos", + "conversion_factor": 1, + "warehouse": dn.items[0].warehouse, + "use_serial_batch_fields": 0, + "serial_and_batch_bundle": bundle_id, + }, + ) + + dn.save() + dn.submit() + dn.reload() + + batch_no_valuation = defaultdict(float) + serial_no_valuation = defaultdict(float) + + for row in dn.items: + if row.serial_and_batch_bundle: + bundle_data = frappe.get_all( + "Serial and Batch Entry", + filters={"parent": row.serial_and_batch_bundle}, + fields=["incoming_rate", "serial_no", "batch_no"], + ) + + for d in bundle_data: + if d.batch_no: + batch_no_valuation[d.batch_no] = d.incoming_rate + elif d.serial_no: + serial_no_valuation[d.serial_no] = d.incoming_rate + + return_entry = make_sales_return(dn.name) + + return_entry.save() + return_entry.submit() + return_entry.reload() + + for row in return_entry.items: + if row.item_code == batch_item: + bundle_data = frappe.get_all( + "Serial and Batch Entry", + filters={"parent": row.serial_and_batch_bundle}, + fields=["incoming_rate", "batch_no"], + ) + + for d in bundle_data: + self.assertEqual(d.incoming_rate, batch_no_valuation[d.batch_no]) + else: + bundle_data = frappe.get_all( + "Serial and Batch Entry", + filters={"parent": row.serial_and_batch_bundle}, + fields=["incoming_rate", "serial_no"], + ) + + for d in bundle_data: + self.assertEqual(d.incoming_rate, serial_no_valuation[d.serial_no]) + + def test_delivery_note_return_valuation_with_use_serial_batch_field(self): + from erpnext.stock.doctype.delivery_note.delivery_note import make_sales_return + + batch_item = make_item( + "_Test Delivery Note Return Valuation WITH Batch Item", + properties={ + "has_batch_no": 1, + "create_new_batch": 1, + "is_stock_item": 1, + "batch_number_series": "BRTN-DNN-BIW-.#####", + }, + ).name + + serial_item = make_item( + "_Test Delivery Note Return Valuation WITH Serial Item", + properties={"has_serial_no": 1, "is_stock_item": 1, "serial_no_series": "SRTN-DNN-TPW-.#####"}, + ).name + + batches = [] + serial_nos = [] + for qty, rate in {3: 300, 2: 100}.items(): + se = make_stock_entry( + item_code=batch_item, target="_Test Warehouse - _TC", qty=qty, basic_rate=rate + ) + batches.append(get_batch_from_bundle(se.items[0].serial_and_batch_bundle)) + + for qty, rate in {2: 100, 1: 50}.items(): + se = make_stock_entry( + item_code=serial_item, target="_Test Warehouse - _TC", qty=qty, basic_rate=rate + ) + serial_nos.extend(get_serial_nos_from_bundle(se.items[0].serial_and_batch_bundle)) + + dn = create_delivery_note( + item_code=batch_item, + qty=3, + rate=1000, + use_serial_batch_fields=1, + batch_no=batches[0], + do_not_submit=True, + ) + + dn.append( + "items", + { + "item_code": batch_item, + "qty": 2, + "rate": 1000, + "base_rate": 1000, + "item_name": batch_item, + "uom": dn.items[0].uom, + "stock_uom": dn.items[0].uom, + "conversion_factor": 1, + "warehouse": dn.items[0].warehouse, + "use_serial_batch_fields": 1, + "batch_no": batches[1], + }, + ) + + dn.append( + "items", + { + "item_code": serial_item, + "qty": 2, + "rate": 700, + "base_rate": 700, + "item_name": serial_item, + "uom": "Nos", + "stock_uom": "Nos", + "conversion_factor": 1, + "warehouse": dn.items[0].warehouse, + "use_serial_batch_fields": 1, + "serial_no": "\n".join(serial_nos[0:2]), + }, + ) + + dn.append( + "items", + { + "item_code": serial_item, + "qty": 1, + "rate": 700, + "base_rate": 700, + "item_name": serial_item, + "uom": "Nos", + "stock_uom": "Nos", + "conversion_factor": 1, + "warehouse": dn.items[0].warehouse, + "use_serial_batch_fields": 1, + "serial_no": serial_nos[-1], + }, + ) + + dn.save() + dn.submit() + dn.reload() + + batch_no_valuation = defaultdict(float) + serial_no_valuation = defaultdict(float) + + for row in dn.items: + if row.serial_and_batch_bundle: + bundle_data = frappe.get_all( + "Serial and Batch Entry", + filters={"parent": row.serial_and_batch_bundle}, + fields=["incoming_rate", "serial_no", "batch_no"], + ) + + for d in bundle_data: + if d.batch_no: + batch_no_valuation[d.batch_no] = d.incoming_rate + elif d.serial_no: + serial_no_valuation[d.serial_no] = d.incoming_rate + + return_entry = make_sales_return(dn.name) + + return_entry.save() + return_entry.submit() + return_entry.reload() + + for row in return_entry.items: + if row.item_code == batch_item: + bundle_data = frappe.get_all( + "Serial and Batch Entry", + filters={"parent": row.serial_and_batch_bundle}, + fields=["incoming_rate", "batch_no"], + ) + + for d in bundle_data: + self.assertEqual(d.incoming_rate, batch_no_valuation[d.batch_no]) + else: + bundle_data = frappe.get_all( + "Serial and Batch Entry", + filters={"parent": row.serial_and_batch_bundle}, + fields=["incoming_rate", "serial_no"], + ) + + for d in bundle_data: + self.assertEqual(d.incoming_rate, serial_no_valuation[d.serial_no]) + def create_delivery_note(**args): dn = frappe.new_doc("Delivery Note") @@ -2107,6 +2366,9 @@ def create_delivery_note(**args): if args.get("batch_no"): batches = frappe._dict({args.batch_no: qty}) + if args.get("batches"): + batches = frappe._dict(args.batches) + bundle_id = make_serial_batch_bundle( frappe._dict( { diff --git a/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py index 6d0fe27033f..64c3d2c67b2 100644 --- a/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py +++ b/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py @@ -3672,6 +3672,234 @@ class TestPurchaseReceipt(FrappeTestCase): self.assertEqual(pr.items[0].conversion_factor, 1.0) + def test_purchase_receipt_return_valuation_without_use_serial_batch_field(self): + from erpnext.stock.doctype.purchase_receipt.purchase_receipt import make_purchase_return + + batch_item = make_item( + "_Test Purchase Receipt Return Valuation Batch Item", + properties={ + "has_batch_no": 1, + "create_new_batch": 1, + "is_stock_item": 1, + "batch_number_series": "BRTN-TPRBI-.#####", + }, + ).name + + serial_item = make_item( + "_Test Purchase Receipt Return Valuation Serial Item", + properties={"has_serial_no": 1, "is_stock_item": 1, "serial_no_series": "SRTN-TPRSI-.#####"}, + ).name + + rej_warehouse = create_warehouse("_Test Purchase Warehouse For Rejected Qty") + + pr = make_purchase_receipt( + item_code=batch_item, + received_qty=10, + qty=8, + rejected_qty=2, + rejected_warehouse=rej_warehouse, + rate=300, + do_not_submit=1, + use_serial_batch_fields=0, + ) + + pr.append( + "items", + { + "item_code": serial_item, + "qty": 2, + "rate": 100, + "base_rate": 100, + "item_name": serial_item, + "uom": "Nos", + "stock_uom": "Nos", + "conversion_factor": 1, + "rejected_qty": 1, + "warehouse": pr.items[0].warehouse, + "use_serial_batch_fields": 0, + "rejected_warehouse": rej_warehouse, + }, + ) + + pr.save() + pr.submit() + pr.reload() + + batch_no = get_batch_from_bundle(pr.items[0].serial_and_batch_bundle) + rejected_batch_no = get_batch_from_bundle(pr.items[0].rejected_serial_and_batch_bundle) + + self.assertEqual(batch_no, rejected_batch_no) + + return_entry = make_purchase_return(pr.name) + + return_entry.save() + return_entry.submit() + return_entry.reload() + + for row in return_entry.items: + if row.item_code == batch_item: + bundle_data = frappe.get_all( + "Serial and Batch Entry", + filters={"parent": row.serial_and_batch_bundle}, + pluck="incoming_rate", + ) + + for incoming_rate in bundle_data: + self.assertEqual(incoming_rate, 300.00) + else: + bundle_data = frappe.get_all( + "Serial and Batch Entry", + filters={"parent": row.serial_and_batch_bundle}, + pluck="incoming_rate", + ) + + for incoming_rate in bundle_data: + self.assertEqual(incoming_rate, 100.00) + + for row in return_entry.items: + if row.item_code == batch_item: + bundle_data = frappe.get_all( + "Serial and Batch Entry", + filters={"parent": row.rejected_serial_and_batch_bundle}, + pluck="incoming_rate", + ) + + for incoming_rate in bundle_data: + self.assertEqual(incoming_rate, 0) + else: + bundle_data = frappe.get_all( + "Serial and Batch Entry", + filters={"parent": row.rejected_serial_and_batch_bundle}, + pluck="incoming_rate", + ) + + for incoming_rate in bundle_data: + self.assertEqual(incoming_rate, 0) + + def test_purchase_receipt_return_valuation_with_use_serial_batch_field(self): + from erpnext.stock.doctype.purchase_receipt.purchase_receipt import make_purchase_return + + batch_item = make_item( + "_Test Purchase Receipt Return Valuation With Batch Item", + properties={"has_batch_no": 1, "create_new_batch": 1, "is_stock_item": 1}, + ).name + + serial_item = make_item( + "_Test Purchase Receipt Return Valuation With Serial Item", + properties={"has_serial_no": 1, "is_stock_item": 1}, + ).name + + rej_warehouse = create_warehouse("_Test Purchase Warehouse For Rejected Qty") + + batch_no = "BATCH-RTN-BNU-TPRBI-0001" + serial_nos = ["SNU-RTN-TPRSI-0001", "SNU-RTN-TPRSI-0002", "SNU-RTN-TPRSI-0003"] + + if not frappe.db.exists("Batch", batch_no): + frappe.get_doc( + { + "doctype": "Batch", + "batch_id": batch_no, + "item": batch_item, + } + ).insert() + + for serial_no in serial_nos: + if not frappe.db.exists("Serial No", serial_no): + frappe.get_doc( + { + "doctype": "Serial No", + "item_code": serial_item, + "serial_no": serial_no, + } + ).insert() + + pr = make_purchase_receipt( + item_code=batch_item, + received_qty=10, + qty=8, + rejected_qty=2, + rejected_warehouse=rej_warehouse, + batch_no=batch_no, + use_serial_batch_fields=1, + rate=300, + do_not_submit=1, + ) + + pr.append( + "items", + { + "item_code": serial_item, + "qty": 2, + "rate": 100, + "base_rate": 100, + "item_name": serial_item, + "uom": "Nos", + "stock_uom": "Nos", + "conversion_factor": 1, + "rejected_qty": 1, + "warehouse": pr.items[0].warehouse, + "use_serial_batch_fields": 1, + "rejected_warehouse": rej_warehouse, + "serial_no": "\n".join(serial_nos[:2]), + "rejected_serial_no": serial_nos[2], + }, + ) + + pr.save() + pr.submit() + pr.reload() + + batch_no = get_batch_from_bundle(pr.items[0].serial_and_batch_bundle) + rejected_batch_no = get_batch_from_bundle(pr.items[0].rejected_serial_and_batch_bundle) + + self.assertEqual(batch_no, rejected_batch_no) + + return_entry = make_purchase_return(pr.name) + + return_entry.save() + return_entry.submit() + return_entry.reload() + + for row in return_entry.items: + if row.item_code == batch_item: + bundle_data = frappe.get_all( + "Serial and Batch Entry", + filters={"parent": row.serial_and_batch_bundle}, + pluck="incoming_rate", + ) + + for incoming_rate in bundle_data: + self.assertEqual(incoming_rate, 300.00) + else: + bundle_data = frappe.get_all( + "Serial and Batch Entry", + filters={"parent": row.serial_and_batch_bundle}, + pluck="incoming_rate", + ) + + for incoming_rate in bundle_data: + self.assertEqual(incoming_rate, 100.00) + + for row in return_entry.items: + if row.item_code == batch_item: + bundle_data = frappe.get_all( + "Serial and Batch Entry", + filters={"parent": row.rejected_serial_and_batch_bundle}, + pluck="incoming_rate", + ) + + for incoming_rate in bundle_data: + self.assertEqual(incoming_rate, 0) + else: + bundle_data = frappe.get_all( + "Serial and Batch Entry", + filters={"parent": row.rejected_serial_and_batch_bundle}, + pluck="incoming_rate", + ) + + for incoming_rate in bundle_data: + self.assertEqual(incoming_rate, 0) + def prepare_data_for_internal_transfer(): from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_internal_supplier 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 94ec8675db8..ed6d5e155d7 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 @@ -197,7 +197,7 @@ class SerialandBatchBundle(Document): def throw_error_message(self, message, exception=frappe.ValidationError): frappe.throw(_(message), exception, title=_("Error")) - def set_incoming_rate(self, row=None, save=False, allow_negative_stock=False): + def set_incoming_rate(self, parent=None, row=None, save=False, allow_negative_stock=False): if self.type_of_transaction not in ["Inward", "Outward"] or self.voucher_type in [ "Installation Note", "Job Card", @@ -206,13 +206,70 @@ class SerialandBatchBundle(Document): ]: return - if self.type_of_transaction == "Outward": + if return_aginst := self.get_return_aginst(parent=parent): + self.set_valuation_rate_for_return_entry(return_aginst, save) + elif self.type_of_transaction == "Outward": self.set_incoming_rate_for_outward_transaction( row, save, allow_negative_stock=allow_negative_stock ) else: self.set_incoming_rate_for_inward_transaction(row, save) + def set_valuation_rate_for_return_entry(self, return_aginst, save=False): + if valuation_details := self.get_valuation_rate_for_return_entry(return_aginst): + for row in self.entries: + if row.serial_no: + valuation_rate = valuation_details["serial_nos"].get(row.serial_no) + else: + valuation_rate = valuation_details["batches"].get(row.batch_no) + + row.incoming_rate = valuation_rate + row.stock_value_difference = flt(row.qty) * flt(row.incoming_rate) + + if save: + row.db_set( + { + "incoming_rate": row.incoming_rate, + "stock_value_difference": row.stock_value_difference, + } + ) + + def get_valuation_rate_for_return_entry(self, return_aginst): + valuation_details = frappe._dict( + { + "serial_nos": defaultdict(float), + "batches": defaultdict(float), + } + ) + + bundle_data = frappe.get_all( + "Serial and Batch Bundle", + fields=[ + "`tabSerial and Batch Entry`.`serial_no`", + "`tabSerial and Batch Entry`.`batch_no`", + "`tabSerial and Batch Entry`.`incoming_rate`", + ], + filters=[ + ["Serial and Batch Bundle", "voucher_no", "=", return_aginst], + ["Serial and Batch Entry", "docstatus", "=", 1], + ["Serial and Batch Bundle", "is_cancelled", "=", 0], + ["Serial and Batch Bundle", "item_code", "=", self.item_code], + ["Serial and Batch Bundle", "warehouse", "=", self.warehouse], + ], + order_by="`tabSerial and Batch Bundle`.`creation`, `tabSerial and Batch Entry`.`idx`", + ) + + if not bundle_data: + return {} + + for row in bundle_data: + if row.serial_no: + valuation_details["serial_nos"][row.serial_no] = row.incoming_rate + else: + valuation_details["batches"][row.batch_no] = row.incoming_rate + + return valuation_details + def calculate_total_qty(self, save=True): self.total_qty = 0.0 for d in self.entries: @@ -327,6 +384,33 @@ class SerialandBatchBundle(Document): return sle + def get_return_aginst(self, parent=None): + return_aginst = None + + if parent and parent.get("is_return") and parent.get("return_against"): + return parent.get("return_against") + + if ( + self.voucher_type + in [ + "Delivery Note", + "Sales Invoice", + "Purchase Invoice", + "Purchase Receipt", + "POS Invoice", + "Subcontracting Receipt", + ] + and self.voucher_type + and self.voucher_no + ): + voucher_details = frappe.db.get_value( + self.voucher_type, self.voucher_no, ["is_return", "return_against"], as_dict=True + ) + if voucher_details and voucher_details.get("is_return") and voucher_details.get("return_against"): + return voucher_details.get("return_against") + + return return_aginst + def set_incoming_rate_for_inward_transaction(self, row=None, save=False): valuation_field = "valuation_rate" if self.voucher_type in ["Sales Invoice", "Delivery Note", "Quotation"]: @@ -354,7 +438,9 @@ class SerialandBatchBundle(Document): rate = frappe.db.get_value(child_table, self.voucher_detail_no, valuation_field) for d in self.entries: - if (d.incoming_rate == rate) and d.qty and d.stock_value_difference: + if self.is_rejected: + rate = 0.0 + elif (d.incoming_rate == rate) and d.qty and d.stock_value_difference: continue d.incoming_rate = flt(rate, precision) @@ -403,7 +489,7 @@ class SerialandBatchBundle(Document): # If user has changed the rate in the child table if self.docstatus == 0: - self.set_incoming_rate(save=True, row=row) + self.set_incoming_rate(parent=parent, row=row, save=True) if self.docstatus == 0 and parent.get("is_return") and parent.is_new(): self.reset_qty(row, qty_field=qty_field) diff --git a/erpnext/stock/serial_batch_bundle.py b/erpnext/stock/serial_batch_bundle.py index 46724be5927..47521475d0a 100644 --- a/erpnext/stock/serial_batch_bundle.py +++ b/erpnext/stock/serial_batch_bundle.py @@ -1088,6 +1088,8 @@ class SerialBatchCreation: frappe.db.bulk_insert("Serial No", fields=fields, values=set(serial_nos_details)) def set_serial_batch_entries(self, doc): + incoming_rate = self.get("incoming_rate") + if self.get("serial_nos"): serial_no_wise_batch = frappe._dict({}) if self.has_batch_no: @@ -1095,30 +1097,54 @@ class SerialBatchCreation: qty = -1 if self.type_of_transaction == "Outward" else 1 for serial_no in self.serial_nos: + if self.get("serial_nos_valuation"): + incoming_rate = self.get("serial_nos_valuation").get(serial_no) + doc.append( "entries", { "serial_no": serial_no, "qty": qty, "batch_no": serial_no_wise_batch.get(serial_no) or self.get("batch_no"), - "incoming_rate": self.get("incoming_rate"), + "incoming_rate": incoming_rate, }, ) elif self.get("batches"): for batch_no, batch_qty in self.batches.items(): + if self.get("batches_valuation"): + incoming_rate = self.get("batches_valuation").get(batch_no) + doc.append( "entries", { "batch_no": batch_no, "qty": batch_qty * (-1 if self.type_of_transaction == "Outward" else 1), - "incoming_rate": self.get("incoming_rate"), + "incoming_rate": incoming_rate, }, ) def create_batch(self): from erpnext.stock.doctype.batch.batch import make_batch + if self.is_rejected: + bundle = frappe.db.get_value( + "Serial and Batch Bundle", + { + "voucher_no": self.voucher_no, + "voucher_type": self.voucher_type, + "voucher_detail_no": self.voucher_detail_no, + "is_rejected": 0, + "docstatus": 1, + "is_cancelled": 0, + }, + "name", + ) + + if bundle: + if batch_no := frappe.db.get_value("Serial and Batch Entry", {"parent": bundle}, "batch_no"): + return batch_no + return make_batch( frappe._dict( { From 9a2b0a965d40e54ff5e26121d212e55ff4a483d4 Mon Sep 17 00:00:00 2001 From: hyaray Date: Fri, 25 Oct 2024 20:22:04 +0800 Subject: [PATCH 0396/1614] refactor: use year current year start date as default (cherry picked from commit d54283ded578264b3ce9556ad2b7f525f25bbf9c) --- erpnext/accounts/doctype/fiscal_year/fiscal_year.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/erpnext/accounts/doctype/fiscal_year/fiscal_year.js b/erpnext/accounts/doctype/fiscal_year/fiscal_year.js index a44b52f08f8..aeb9f982b4d 100644 --- a/erpnext/accounts/doctype/fiscal_year/fiscal_year.js +++ b/erpnext/accounts/doctype/fiscal_year/fiscal_year.js @@ -4,10 +4,7 @@ frappe.ui.form.on("Fiscal Year", { onload: function (frm) { if (frm.doc.__islocal) { - frm.set_value( - "year_start_date", - frappe.datetime.add_days(frappe.defaults.get_default("year_end_date"), 1) - ); + frm.set_value("year_start_date", frappe.datetime.year_start()); } }, year_start_date: function (frm) { From 10d8cc9d66054864afd232ac7377eed4c6f1272a Mon Sep 17 00:00:00 2001 From: ramyasusee Date: Wed, 30 Oct 2024 17:40:11 +0530 Subject: [PATCH 0397/1614] fix: map reference number while reversing journal (cherry picked from commit 77de783cd414eb2fa23c80668ae10efb87ccfd92) --- erpnext/accounts/doctype/journal_entry/journal_entry.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.py b/erpnext/accounts/doctype/journal_entry/journal_entry.py index fb5c563d790..aeaadae0b30 100644 --- a/erpnext/accounts/doctype/journal_entry/journal_entry.py +++ b/erpnext/accounts/doctype/journal_entry/journal_entry.py @@ -1671,6 +1671,8 @@ def make_reverse_journal_entry(source_name, target_doc=None): "debit": "credit", "credit_in_account_currency": "debit_in_account_currency", "credit": "debit", + "reference_type": "reference_type", + "reference_name": "reference_name", }, }, }, From 7ad664d89a3383f2005d938cefffb0a798b204a2 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 4 Nov 2024 13:23:44 +0530 Subject: [PATCH 0398/1614] perf: avoid reposting of entries created after stock reco (backport #43950) (#43961) perf: avoid reposting of entries created after stock reco (#43950) (cherry picked from commit 7cfe1c8d59360dd9887e83991077326b62a9d895) Co-authored-by: rohitwaghchaure --- .../test_stock_reconciliation.py | 54 +++++++++++++++++++ erpnext/stock/stock_ledger.py | 12 +++++ 2 files changed, 66 insertions(+) diff --git a/erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.py b/erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.py index 9bb6ba9ec90..9754443d4ac 100644 --- a/erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.py +++ b/erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.py @@ -1275,6 +1275,60 @@ class TestStockReconciliation(FrappeTestCase, StockTestMixin): qty = get_batch_qty(batch_id, warehouse, batch_item_code) self.assertEqual(qty, 110) + def test_skip_reposting_for_entries_after_stock_reco(self): + from erpnext.stock.doctype.stock_entry.test_stock_entry import make_stock_entry + + item_code = create_item("Test Item For Skip Reposting After Stock Reco", is_stock_item=1).name + + warehouse = "_Test Warehouse - _TC" + + make_stock_entry( + posting_date="2024-11-01", + posting_time="11:00", + item_code=item_code, + target=warehouse, + qty=10, + basic_rate=100, + ) + + create_stock_reconciliation( + posting_date="2024-11-02", + posting_time="11:00", + item_code=item_code, + warehouse=warehouse, + qty=20, + rate=100, + ) + + se = make_stock_entry( + posting_date="2024-11-03", + posting_time="11:00", + item_code=item_code, + source=warehouse, + qty=15, + ) + + stock_value_difference = frappe.db.get_value( + "Stock Ledger Entry", {"voucher_no": se.name, "is_cancelled": 0}, "stock_value_difference" + ) + + self.assertEqual(stock_value_difference, 1500.00 * -1) + + make_stock_entry( + posting_date="2024-10-29", + posting_time="11:00", + item_code=item_code, + target=warehouse, + qty=10, + basic_rate=100, + ) + + stock_value_difference = frappe.db.get_value( + "Stock Ledger Entry", {"voucher_no": se.name, "is_cancelled": 0}, "stock_value_difference" + ) + + self.assertEqual(stock_value_difference, 1500.00 * -1) + def create_batch_item_with_batch(item_name, batch_id): batch_item_doc = create_item(item_name, is_stock_item=1) diff --git a/erpnext/stock/stock_ledger.py b/erpnext/stock/stock_ledger.py index 0f058d0a64b..fa53e6b47a9 100644 --- a/erpnext/stock/stock_ledger.py +++ b/erpnext/stock/stock_ledger.py @@ -623,9 +623,21 @@ class update_entries_after: if sle.dependant_sle_voucher_detail_no: entries_to_fix = self.get_dependent_entries_to_fix(entries_to_fix, sle) + if self.has_stock_reco_with_serial_batch(sle): + break + if self.exceptions: self.raise_exceptions() + def has_stock_reco_with_serial_batch(self, sle): + if ( + sle.vocher_type == "Stock Reconciliation" + and frappe.db.get_value(sle.voucher_type, sle.voucher_no, "set_posting_time") == 1 + ): + return not (sle.batch_no or sle.serial_no or sle.serial_and_batch_bundle) + + return False + def process_sle_against_current_timestamp(self): sl_entries = self.get_sle_against_current_voucher() for sle in sl_entries: From 9f7afda4db26e9695c8ab45433d1c0885f076417 Mon Sep 17 00:00:00 2001 From: CaseSolved Date: Wed, 25 Sep 2024 19:09:05 +0100 Subject: [PATCH 0399/1614] fix: SO link on PO and add in missing dashboard references on both (cherry picked from commit 2017fd80d1bf930fd5185ddb3ddb427eb73841f8) --- .../purchase_order_dashboard.py | 21 +++++++++++++++---- .../sales_order/sales_order_dashboard.py | 4 +++- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/erpnext/buying/doctype/purchase_order/purchase_order_dashboard.py b/erpnext/buying/doctype/purchase_order/purchase_order_dashboard.py index 36fe079fc98..6ae50e71416 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order_dashboard.py +++ b/erpnext/buying/doctype/purchase_order/purchase_order_dashboard.py @@ -14,18 +14,31 @@ def get_data(): "Material Request": ["items", "material_request"], "Supplier Quotation": ["items", "supplier_quotation"], "Project": ["items", "project"], + "Sales Order": ["items", "sales_order"], + "BOM": ["items", "bom"], + "Production Plan": ["items", "production_plan"], + "Blanket Order": ["items", "blanket_order"], }, "transactions": [ - {"label": _("Related"), "items": ["Purchase Receipt", "Purchase Invoice"]}, - {"label": _("Payment"), "items": ["Payment Entry", "Journal Entry", "Payment Request"]}, + { + "label": _("Related"), + "items": ["Purchase Receipt", "Purchase Invoice", "Sales Order"] + }, + { + "label": _("Payment"), + "items": ["Payment Entry", "Journal Entry", "Payment Request"] + }, { "label": _("Reference"), - "items": ["Material Request", "Supplier Quotation", "Project", "Auto Repeat"], + "items": ["Supplier Quotation", "Project", "Auto Repeat"], + }, + { + "label": _("Manufacturing"), + "items": ["Material Request", "BOM", "Production Plan", "Blanket Order"], }, { "label": _("Sub-contracting"), "items": ["Subcontracting Order", "Subcontracting Receipt", "Stock Entry"], }, - {"label": _("Internal"), "items": ["Sales Order"]}, ], } diff --git a/erpnext/selling/doctype/sales_order/sales_order_dashboard.py b/erpnext/selling/doctype/sales_order/sales_order_dashboard.py index c84009725b8..7c1c0deb33f 100644 --- a/erpnext/selling/doctype/sales_order/sales_order_dashboard.py +++ b/erpnext/selling/doctype/sales_order/sales_order_dashboard.py @@ -15,6 +15,8 @@ def get_data(): }, "internal_links": { "Quotation": ["items", "prevdoc_docname"], + "BOM": ["items", "bom_no"], + "Blanket Order": ["items", "blanket_order"], }, "transactions": [ { @@ -23,7 +25,7 @@ def get_data(): }, {"label": _("Purchasing"), "items": ["Material Request", "Purchase Order"]}, {"label": _("Projects"), "items": ["Project"]}, - {"label": _("Manufacturing"), "items": ["Work Order"]}, + {"label": _("Manufacturing"), "items": ["Work Order", "BOM", "Blanket Order"]}, {"label": _("Reference"), "items": ["Quotation", "Auto Repeat", "Stock Reservation Entry"]}, {"label": _("Payment"), "items": ["Payment Entry", "Payment Request", "Journal Entry"]}, ], From 84a40c282bc0f5833cb7a063e8f69a023bdf4f51 Mon Sep 17 00:00:00 2001 From: CaseSolved Date: Wed, 25 Sep 2024 19:27:21 +0100 Subject: [PATCH 0400/1614] chore: linting (cherry picked from commit be6970c850d3c81f1b32ae00ede2e49c588ab2e9) --- .../doctype/purchase_order/purchase_order_dashboard.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/erpnext/buying/doctype/purchase_order/purchase_order_dashboard.py b/erpnext/buying/doctype/purchase_order/purchase_order_dashboard.py index 6ae50e71416..3fb8b30f139 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order_dashboard.py +++ b/erpnext/buying/doctype/purchase_order/purchase_order_dashboard.py @@ -20,14 +20,8 @@ def get_data(): "Blanket Order": ["items", "blanket_order"], }, "transactions": [ - { - "label": _("Related"), - "items": ["Purchase Receipt", "Purchase Invoice", "Sales Order"] - }, - { - "label": _("Payment"), - "items": ["Payment Entry", "Journal Entry", "Payment Request"] - }, + {"label": _("Related"), "items": ["Purchase Receipt", "Purchase Invoice", "Sales Order"]}, + {"label": _("Payment"), "items": ["Payment Entry", "Journal Entry", "Payment Request"]}, { "label": _("Reference"), "items": ["Supplier Quotation", "Project", "Auto Repeat"], From 1b8bd0e1f3b496682ce3bb3c1716889a5b805ade Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 5 Nov 2024 10:25:32 +0530 Subject: [PATCH 0401/1614] refactor: avoid permission issue for non-admin (cherry picked from commit c832d9fb9a7378a7a7186bf9bd9661e92dcfdf9b) --- erpnext/controllers/accounts_controller.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 1ae6b5256a5..e47e9917149 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -2588,6 +2588,7 @@ class AccountsController(TransactionBase): doc.amount = amount if self.docstatus == 1 else -1 * amount doc.event = "Submit" if self.docstatus == 1 else "Cancel" doc.currency = x.account_currency + doc.flags.ignore_permissions = 1 doc.save() def make_advance_payment_ledger_for_payment(self): @@ -2610,6 +2611,7 @@ class AccountsController(TransactionBase): doc.amount = x.allocated_amount if self.docstatus == 1 else -1 * x.allocated_amount doc.currency = currency doc.event = "Submit" if self.docstatus == 1 else "Cancel" + doc.flags.ignore_permissions = 1 doc.save() def make_advance_payment_ledger_entries(self): From eaf6d0d7d88c930fdb7cf42ac938f93a80b6e7db Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 5 Nov 2024 10:31:45 +0530 Subject: [PATCH 0402/1614] refactor: update advance ledger role requirement (cherry picked from commit e41560d30ba0fe72b53cf41cf5fd34bc3a8a541b) --- .../advance_payment_ledger_entry.json | 28 +++++++++++++++---- 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/erpnext/accounts/doctype/advance_payment_ledger_entry/advance_payment_ledger_entry.json b/erpnext/accounts/doctype/advance_payment_ledger_entry/advance_payment_ledger_entry.json index 1d0a5b42a31..290ed11c98e 100644 --- a/erpnext/accounts/doctype/advance_payment_ledger_entry/advance_payment_ledger_entry.json +++ b/erpnext/accounts/doctype/advance_payment_ledger_entry/advance_payment_ledger_entry.json @@ -70,25 +70,41 @@ "read_only": 1 } ], + "in_create": 1, "index_web_pages_for_search": 1, "links": [], - "modified": "2024-10-16 17:11:28.143979", + "modified": "2024-11-05 10:31:28.736671", "modified_by": "Administrator", "module": "Accounts", "name": "Advance Payment Ledger Entry", "owner": "Administrator", "permissions": [ { - "create": 1, - "delete": 1, "email": 1, "export": 1, "print": 1, "read": 1, "report": 1, - "role": "System Manager", - "share": 1, - "write": 1 + "role": "Accounts User", + "share": 1 + }, + { + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Accounts Manager", + "share": 1 + }, + { + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Auditor", + "share": 1 } ], "sort_field": "creation", From b665e4e24ad9105d82af30b7190a50e720c8636f Mon Sep 17 00:00:00 2001 From: Khushi Rawat <142375893+khushi8112@users.noreply.github.com> Date: Tue, 5 Nov 2024 23:36:26 +0530 Subject: [PATCH 0403/1614] fix: add precision validation (cherry picked from commit 7daadcf42037db5a5f2d387bb59c7b3936e4f0a3) --- erpnext/assets/doctype/asset/asset.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/erpnext/assets/doctype/asset/asset.py b/erpnext/assets/doctype/asset/asset.py index 6bb3ff255cf..c788d5265a7 100644 --- a/erpnext/assets/doctype/asset/asset.py +++ b/erpnext/assets/doctype/asset/asset.py @@ -119,6 +119,7 @@ class Asset(AccountsController): # end: auto-generated types def validate(self): + self.validate_precision() self.validate_asset_values() self.validate_asset_and_reference() self.validate_item() @@ -306,6 +307,15 @@ class Asset(AccountsController): title=_("Missing Finance Book"), ) + def validate_precision(self): + float_precision = cint(frappe.db.get_default("float_precision")) or 2 + if self.gross_purchase_amount: + self.gross_purchase_amount = flt(self.gross_purchase_amount, float_precision) + if self.opening_accumulated_depreciation: + self.opening_accumulated_depreciation = flt( + self.opening_accumulated_depreciation, float_precision + ) + def validate_asset_values(self): if not self.asset_category: self.asset_category = frappe.get_cached_value("Item", self.item_code, "asset_category") @@ -471,6 +481,9 @@ class Asset(AccountsController): def validate_expected_value_after_useful_life(self): for row in self.get("finance_books"): + row.expected_value_after_useful_life = flt( + row.expected_value_after_useful_life, self.precision("gross_purchase_amount") + ) depr_schedule = get_depr_schedule(self.name, "Draft", row.finance_book) if not depr_schedule: From a38819cbd5cef2cc8615cdbd34f5d735378d2dd1 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 6 Nov 2024 10:05:44 +0530 Subject: [PATCH 0404/1614] perf: too many writes error during reposting (backport #43978) (#43983) perf: too many writes error during reposting (#43978) perf: too many writes error (cherry picked from commit 134c24b9c5218161c239be39aaeec55d06028ea9) Co-authored-by: rohitwaghchaure --- erpnext/stock/stock_ledger.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/erpnext/stock/stock_ledger.py b/erpnext/stock/stock_ledger.py index fa53e6b47a9..ccf7c7643c8 100644 --- a/erpnext/stock/stock_ledger.py +++ b/erpnext/stock/stock_ledger.py @@ -1047,7 +1047,7 @@ class update_entries_after: rate = 0 # Material Transfer, Repack, Manufacturing if sle.voucher_type == "Stock Entry": - self.recalculate_amounts_in_stock_entry(sle.voucher_no) + self.recalculate_amounts_in_stock_entry(sle.voucher_no, sle.voucher_detail_no) rate = frappe.db.get_value("Stock Entry Detail", sle.voucher_detail_no, "valuation_rate") # Sales and Purchase Return elif sle.voucher_type in ( @@ -1176,14 +1176,15 @@ class update_entries_after: # Update outgoing item's rate, recalculate FG Item's rate and total incoming/outgoing amount if not sle.dependant_sle_voucher_detail_no: - self.recalculate_amounts_in_stock_entry(sle.voucher_no) + self.recalculate_amounts_in_stock_entry(sle.voucher_no, sle.voucher_detail_no) - def recalculate_amounts_in_stock_entry(self, voucher_no): + def recalculate_amounts_in_stock_entry(self, voucher_no, voucher_detail_no): stock_entry = frappe.get_doc("Stock Entry", voucher_no, for_update=True) stock_entry.calculate_rate_and_amount(reset_outgoing_rate=False, raise_error_if_no_rate=False) stock_entry.db_update() for d in stock_entry.items: - d.db_update() + if d.name == voucher_detail_no or (not d.s_warehouse and d.t_warehouse): + d.db_update() def update_rate_on_delivery_and_sales_return(self, sle, outgoing_rate): # Update item's incoming rate on transaction From ceccd8c2dcafb743169ce5b161aef3b822d007db Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 6 Nov 2024 10:30:06 +0530 Subject: [PATCH 0405/1614] chore: update serial_batch_bundle.py (backport #43981) (#43984) chore: update serial_batch_bundle.py (#43981) Avaliable -> Available (cherry picked from commit 30954ed645ed4174ff6ad08c3bb2d59c05df4a73) Co-authored-by: Ikko Eltociear Ashimine --- erpnext/stock/serial_batch_bundle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/serial_batch_bundle.py b/erpnext/stock/serial_batch_bundle.py index 47521475d0a..c1002095b62 100644 --- a/erpnext/stock/serial_batch_bundle.py +++ b/erpnext/stock/serial_batch_bundle.py @@ -984,7 +984,7 @@ class SerialBatchCreation: required_qty = flt(abs(self.actual_qty), precision) if required_qty - total_qty > 0: - msg = f"For the item {bold(doc.item_code)}, the Avaliable qty {bold(total_qty)} is less than the Required Qty {bold(required_qty)} in the warehouse {bold(doc.warehouse)}. Please add sufficient qty in the warehouse." + msg = f"For the item {bold(doc.item_code)}, the Available qty {bold(total_qty)} is less than the Required Qty {bold(required_qty)} in the warehouse {bold(doc.warehouse)}. Please add sufficient qty in the warehouse." frappe.throw(msg, title=_("Insufficient Stock")) def set_auto_serial_batch_entries_for_outward(self): From 9ccdb987d9deb844a1126fba1e33c55367484631 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Wed, 6 Nov 2024 05:21:49 +0000 Subject: [PATCH 0406/1614] chore(release): Bumped to Version 15.41.0 # [15.41.0](https://github.com/frappe/erpnext/compare/v15.40.0...v15.41.0) (2024-11-06) ### Bug Fixes * add precision validation ([b665e4e](https://github.com/frappe/erpnext/commit/b665e4e24ad9105d82af30b7190a50e720c8636f)) * deleting SO/PO will remove its advance payment ledger entry ([d84a3c4](https://github.com/frappe/erpnext/commit/d84a3c4f29df46156d94cef8ad195eaf59424e06)) * map reference number while reversing journal ([10d8cc9](https://github.com/frappe/erpnext/commit/10d8cc9d66054864afd232ac7377eed4c6f1272a)) * **return:** set default return warehouse ([e730b8c](https://github.com/frappe/erpnext/commit/e730b8c6e4e38d241f522108519767e4db4cc048)) * SO link on PO and add in missing dashboard references on both ([9f7afda](https://github.com/frappe/erpnext/commit/9f7afda4db26e9695c8ab45433d1c0885f076417)) * validation trigger (backport [#43926](https://github.com/frappe/erpnext/issues/43926)) ([#43943](https://github.com/frappe/erpnext/issues/43943)) ([a689830](https://github.com/frappe/erpnext/commit/a689830bff72e85c940e4fc3a897edaeaa2b2c38)) * valuation rate for sales / purchase return for serial / batch nos (backport [#43925](https://github.com/frappe/erpnext/issues/43925)) ([#43942](https://github.com/frappe/erpnext/issues/43942)) ([ce42d84](https://github.com/frappe/erpnext/commit/ce42d847b3c98f29f82ecc165dfa7a371a916399)) ### Features * advance payment ledger doctype ([b343334](https://github.com/frappe/erpnext/commit/b343334f694b79a92faabbba03984dca086ca8c0)) * remove Payroll Entry from Bank Account dashboard (backport [#43931](https://github.com/frappe/erpnext/issues/43931)) ([#43933](https://github.com/frappe/erpnext/issues/43933)) ([4a749ce](https://github.com/frappe/erpnext/commit/4a749cec72c060f98662191f3dcaf801496d0ab9)) ### Performance Improvements * avoid reposting of entries created after stock reco (backport [#43950](https://github.com/frappe/erpnext/issues/43950)) ([#43961](https://github.com/frappe/erpnext/issues/43961)) ([7ad664d](https://github.com/frappe/erpnext/commit/7ad664d89a3383f2005d938cefffb0a798b204a2)) * too many writes error during reposting (backport [#43978](https://github.com/frappe/erpnext/issues/43978)) ([#43983](https://github.com/frappe/erpnext/issues/43983)) ([a38819c](https://github.com/frappe/erpnext/commit/a38819cbd5cef2cc8615cdbd34f5d735378d2dd1)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 1bf4cf4a827..38ea1800995 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.40.0" +__version__ = "15.41.0" def get_default_company(user=None): From 20033eef9b53b96abefcaaeb5d967cc56d8aae1b Mon Sep 17 00:00:00 2001 From: "Nihantra C. Patel" <141945075+Nihantra-Patel@users.noreply.github.com> Date: Wed, 6 Nov 2024 12:02:29 +0530 Subject: [PATCH 0407/1614] fix: removed single quotes from deferred revenue (#43985) (cherry picked from commit 834d18840c0644140fe2d3af2883c44bd687550c) --- erpnext/accounts/deferred_revenue.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/deferred_revenue.py b/erpnext/accounts/deferred_revenue.py index cd34bf7f850..a88764cf1b2 100644 --- a/erpnext/accounts/deferred_revenue.py +++ b/erpnext/accounts/deferred_revenue.py @@ -58,7 +58,7 @@ def build_conditions(process_type, account, company): ) if account: - conditions += f"AND {deferred_account}='{frappe.db.escape(account)}'" + conditions += f"AND {deferred_account}={frappe.db.escape(account)}" elif company: conditions += f"AND p.company = {frappe.db.escape(company)}" From c3e61aebd27ad1afb3939b4ee6aa7b143a781432 Mon Sep 17 00:00:00 2001 From: Sagar Vora Date: Wed, 6 Nov 2024 13:21:19 +0530 Subject: [PATCH 0408/1614] fix: error when saving POS merge log (#43989) (cherry picked from commit c62596b323f81bcd2235e103765153e92802b43b) --- .../doctype/pos_invoice_merge_log/pos_invoice_merge_log.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py b/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py index aecdac0b3a1..c1d2f16e43c 100644 --- a/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py +++ b/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py @@ -438,7 +438,9 @@ def split_invoices(invoices): if not item.serial_no and not item.serial_and_batch_bundle: continue - return_against_is_added = any(d for d in _invoices if d.pos_invoice == pos_invoice.return_against) + return_against_is_added = any( + d for d in _invoices if d[0].pos_invoice == pos_invoice.return_against + ) if return_against_is_added: break From 633997b1b0c2c2bfa96ac7697093f18d3d5d56ae Mon Sep 17 00:00:00 2001 From: Sagar Vora Date: Wed, 6 Nov 2024 14:04:30 +0530 Subject: [PATCH 0409/1614] fix: ensure list has items (cherry picked from commit e13e688987755ed1456cf8d41666e50a906d439b) --- .../doctype/pos_invoice_merge_log/pos_invoice_merge_log.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py b/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py index c1d2f16e43c..5bb43b3fa72 100644 --- a/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py +++ b/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py @@ -439,7 +439,7 @@ def split_invoices(invoices): continue return_against_is_added = any( - d for d in _invoices if d[0].pos_invoice == pos_invoice.return_against + d for d in _invoices if d and d[0].pos_invoice == pos_invoice.return_against ) if return_against_is_added: break From 318830c57d0568bfea951aab7f43a7eafffca2a8 Mon Sep 17 00:00:00 2001 From: Abdeali Chharchhoda Date: Wed, 6 Nov 2024 19:16:01 +0530 Subject: [PATCH 0410/1614] fix: Update `dimension_filter_map` query --- .../accounting_dimension_filter.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/accounting_dimension_filter/accounting_dimension_filter.py b/erpnext/accounts/doctype/accounting_dimension_filter/accounting_dimension_filter.py index 1954b4b0efe..7c843cf552e 100644 --- a/erpnext/accounts/doctype/accounting_dimension_filter/accounting_dimension_filter.py +++ b/erpnext/accounts/doctype/accounting_dimension_filter/accounting_dimension_filter.py @@ -74,12 +74,12 @@ def get_dimension_filter_map(): a.applicable_on_account, d.dimension_value, p.accounting_dimension, p.allow_or_restrict, a.is_mandatory FROM - `tabApplicable On Account` a, `tabAllowed Dimension` d, + `tabApplicable On Account` a, `tabAccounting Dimension Filter` p + LEFT JOIN `tabAllowed Dimension` d ON d.parent = p.name WHERE p.name = a.parent AND p.disabled = 0 - AND p.name = d.parent """, as_dict=1, ) @@ -97,7 +97,6 @@ def get_dimension_filter_map(): f.allow_or_restrict, f.is_mandatory, ) - frappe.flags.dimension_filter_map = dimension_filter_map return frappe.flags.dimension_filter_map From 47a8fc28dfc670c5257d80e4f2ff10304adc7334 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 7 Nov 2024 12:49:27 +0530 Subject: [PATCH 0411/1614] fix: task showing limit in customer portal (backport #44003) (#44005) fix: task showing limit in customer portal (#44003) (cherry picked from commit 44832c3b5cd38223072842cf0937aa5615f93114) Co-authored-by: Nihantra C. Patel <141945075+Nihantra-Patel@users.noreply.github.com> --- erpnext/templates/pages/projects.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/templates/pages/projects.py b/erpnext/templates/pages/projects.py index e3e26fc82a6..787c7c0069b 100644 --- a/erpnext/templates/pages/projects.py +++ b/erpnext/templates/pages/projects.py @@ -51,7 +51,7 @@ def get_tasks(project, start=0, search=None, item_status=None): "parent_task", ], limit_start=start, - limit_page_length=10, + limit_page_length=100, ) task_nest = [] for task in tasks: From eeff0a1252b81738ae7cfb5bdc751c3563611b28 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Fri, 25 Oct 2024 17:53:47 +0530 Subject: [PATCH 0412/1614] refactor: cancel old PR and invalidate tokens (cherry picked from commit cda7800777371a34a99d9b8d55c809e03f8abfcf) --- .../payment_request/payment_request.py | 65 +++++++++++++++++-- 1 file changed, 59 insertions(+), 6 deletions(-) diff --git a/erpnext/accounts/doctype/payment_request/payment_request.py b/erpnext/accounts/doctype/payment_request/payment_request.py index 2d4a64c317b..107ed8db8e1 100644 --- a/erpnext/accounts/doctype/payment_request/payment_request.py +++ b/erpnext/accounts/doctype/payment_request/payment_request.py @@ -1,7 +1,7 @@ import json import frappe -from frappe import _ +from frappe import _, qb from frappe.model.document import Document from frappe.query_builder.functions import Sum from frappe.utils import flt, nowdate @@ -564,11 +564,24 @@ def make_payment_request(**args): # fetches existing payment request `grand_total` amount existing_payment_request_amount = get_existing_payment_request_amount(ref_doc.doctype, ref_doc.name) - if existing_payment_request_amount: + def validate_and_calculate_grand_total(grand_total, existing_payment_request_amount): grand_total -= existing_payment_request_amount - if not grand_total: frappe.throw(_("Payment Request is already created")) + return grand_total + + if existing_payment_request_amount: + if args.order_type == "Shopping Cart": + # If Payment Request is in an advanced stage, then create for remaining amount. + if get_existing_payment_request_amount( + ref_doc.doctype, ref_doc.name, ["Initiated", "Partially Paid", "Payment Ordered", "Paid"] + ): + grand_total = validate_and_calculate_grand_total(grand_total, existing_payment_request_amount) + else: + # If PR's are processed, cancel all of them. + cancel_old_payment_requests(ref_doc.doctype, ref_doc.name) + else: + grand_total = validate_and_calculate_grand_total(grand_total, existing_payment_request_amount) if draft_payment_request: frappe.db.set_value( @@ -678,21 +691,47 @@ def get_amount(ref_doc, payment_account=None): frappe.throw(_("Payment Entry is already created")) -def get_existing_payment_request_amount(ref_dt, ref_dn): +def cancel_old_payment_requests(ref_dt, ref_dn): + PR = frappe.qb.DocType("Payment Request") + + if res := ( + frappe.qb.from_(PR) + .select(PR.name) + .where(PR.reference_doctype == ref_dt) + .where(PR.reference_name == ref_dn) + .where(PR.docstatus == 1) + .where(PR.status.isin(["Draft", "Requested"])) + .run(as_dict=True) + ): + for x in res: + doc = frappe.get_doc("Payment Request", x.name) + doc.flags.ignore_permissions = True + doc.cancel() + + if ireqs := get_irequests_of_payment_request(doc.name): + for ireq in ireqs: + frappe.db.set_value("Integration Request", ireq.name, "status", "Cancelled") + + +def get_existing_payment_request_amount(ref_dt, ref_dn, statuses: list | None = None) -> list: """ Return the total amount of Payment Requests against a reference document. """ PR = frappe.qb.DocType("Payment Request") - response = ( + query = ( frappe.qb.from_(PR) .select(Sum(PR.grand_total)) .where(PR.reference_doctype == ref_dt) .where(PR.reference_name == ref_dn) .where(PR.docstatus == 1) - .run() ) + if statuses: + query = query.where(PR.status.isin(statuses)) + + response = query.run() + return response[0][0] if response[0] else 0 @@ -915,3 +954,17 @@ def get_open_payment_requests_query(doctype, txt, searchfield, start, page_len, ) for pr in open_payment_requests ] + + +def get_irequests_of_payment_request(doc: str | None = None) -> list: + res = [] + if doc: + res = frappe.db.get_all( + "Integration Request", + { + "reference_doctype": "Payment Request", + "reference_docname": doc, + "status": "Queued", + }, + ) + return res From ff4751c9e8e58e4cf3561a123fdb2d5735514d37 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Wed, 6 Nov 2024 17:58:22 +0530 Subject: [PATCH 0413/1614] refactor: handle PR's in advance stage (cherry picked from commit 18c13a2cff8594d177777afb5519a9a20b968e09) --- .../payment_request/payment_request.py | 32 +++++++++++++++---- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/erpnext/accounts/doctype/payment_request/payment_request.py b/erpnext/accounts/doctype/payment_request/payment_request.py index 107ed8db8e1..577a1ea2426 100644 --- a/erpnext/accounts/doctype/payment_request/payment_request.py +++ b/erpnext/accounts/doctype/payment_request/payment_request.py @@ -691,6 +691,21 @@ def get_amount(ref_doc, payment_account=None): frappe.throw(_("Payment Entry is already created")) +def get_irequest_status(payment_requests: None | list = None) -> list: + IR = frappe.qb.DocType("Integration Request") + res = [] + if payment_requests: + res = ( + frappe.qb.from_(IR) + .select(IR.name) + .where(IR.reference_doctype.eq("Payment Request")) + .where(IR.reference_docname.isin(payment_requests)) + .where(IR.status.isin(["Authorized", "Completed"])) + .run(as_dict=True) + ) + return res + + def cancel_old_payment_requests(ref_dt, ref_dn): PR = frappe.qb.DocType("Payment Request") @@ -703,14 +718,17 @@ def cancel_old_payment_requests(ref_dt, ref_dn): .where(PR.status.isin(["Draft", "Requested"])) .run(as_dict=True) ): - for x in res: - doc = frappe.get_doc("Payment Request", x.name) - doc.flags.ignore_permissions = True - doc.cancel() + if get_irequest_status([x.name for x in res]): + frappe.throw(_("Another Payment Request is already processed")) + else: + for x in res: + doc = frappe.get_doc("Payment Request", x.name) + doc.flags.ignore_permissions = True + doc.cancel() - if ireqs := get_irequests_of_payment_request(doc.name): - for ireq in ireqs: - frappe.db.set_value("Integration Request", ireq.name, "status", "Cancelled") + if ireqs := get_irequests_of_payment_request(doc.name): + for ireq in ireqs: + frappe.db.set_value("Integration Request", ireq.name, "status", "Cancelled") def get_existing_payment_request_amount(ref_dt, ref_dn, statuses: list | None = None) -> list: From 4819535a526d265f1a9da21dbf83fda7bb7bc6bc Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Thu, 7 Nov 2024 12:44:29 +0000 Subject: [PATCH 0414/1614] chore(release): Bumped to Version 15.41.1 ## [15.41.1](https://github.com/frappe/erpnext/compare/v15.41.0...v15.41.1) (2024-11-07) ### Bug Fixes * ensure list has items ([633997b](https://github.com/frappe/erpnext/commit/633997b1b0c2c2bfa96ac7697093f18d3d5d56ae)) * error when saving POS merge log ([#43989](https://github.com/frappe/erpnext/issues/43989)) ([c3e61ae](https://github.com/frappe/erpnext/commit/c3e61aebd27ad1afb3939b4ee6aa7b143a781432)) * removed single quotes from deferred revenue ([#43985](https://github.com/frappe/erpnext/issues/43985)) ([20033ee](https://github.com/frappe/erpnext/commit/20033eef9b53b96abefcaaeb5d967cc56d8aae1b)) * task showing limit in customer portal (backport [#44003](https://github.com/frappe/erpnext/issues/44003)) ([#44005](https://github.com/frappe/erpnext/issues/44005)) ([47a8fc2](https://github.com/frappe/erpnext/commit/47a8fc28dfc670c5257d80e4f2ff10304adc7334)) * Update `dimension_filter_map` query ([318830c](https://github.com/frappe/erpnext/commit/318830c57d0568bfea951aab7f43a7eafffca2a8)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 38ea1800995..94615249d02 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.41.0" +__version__ = "15.41.1" def get_default_company(user=None): From 58ca4a2b99a694ea891e1b3cfd949f799edacafb Mon Sep 17 00:00:00 2001 From: ljain112 Date: Wed, 18 Sep 2024 19:38:14 +0530 Subject: [PATCH 0415/1614] fix: improved the conditions for determining voucher subtypes (cherry picked from commit 00eee161904b5deb01ba80b6a3629bd7e2dd613f) --- erpnext/controllers/accounts_controller.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index e47e9917149..b14cf428c53 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -1096,9 +1096,11 @@ class AccountsController(TransactionBase): return "Purchase Return" elif self.doctype == "Delivery Note" and self.is_return: return "Sales Return" - elif (self.doctype == "Sales Invoice" and self.is_return) or self.doctype == "Purchase Invoice": + elif self.doctype == "Sales Invoice" and self.is_return: return "Credit Note" - elif (self.doctype == "Purchase Invoice" and self.is_return) or self.doctype == "Sales Invoice": + elif self.doctype == "Sales Invoice" and self.is_debit_note: + return "Debit Note" + elif self.doctype == "Purchase Invoice" and self.is_return: return "Debit Note" return self.doctype From 107d53b3582ccdac3f237745efba4eca5a14a328 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Mon, 30 Sep 2024 20:10:36 +0530 Subject: [PATCH 0416/1614] fix: patch (cherry picked from commit d76cc210860651377262371359b65e4f7ea9abb7) # Conflicts: # erpnext/patches.txt --- erpnext/patches.txt | 5 ++ .../update_sub_voucher_type_in_gl_entries.py | 57 +++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 erpnext/patches/v15_0/update_sub_voucher_type_in_gl_entries.py diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 64c74f9d645..01dc68d1d3a 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -379,5 +379,10 @@ erpnext.patches.v15_0.drop_index_posting_datetime_from_sle erpnext.patches.v15_0.add_disassembly_order_stock_entry_type #1 erpnext.patches.v15_0.set_standard_stock_entry_type erpnext.patches.v15_0.link_purchase_item_to_asset_doc +<<<<<<< HEAD erpnext.patches.v14_0.update_currency_exchange_settings_for_frankfurter erpnext.patches.v15_0.update_task_assignee_email_field_in_asset_maintenance_log +======= +erpnext.patches.v15_0.migrate_to_utm_analytics +erpnext.patches.v15_0.update_sub_voucher_type_in_gl_entries +>>>>>>> d76cc21086 (fix: patch) diff --git a/erpnext/patches/v15_0/update_sub_voucher_type_in_gl_entries.py b/erpnext/patches/v15_0/update_sub_voucher_type_in_gl_entries.py new file mode 100644 index 00000000000..7160a6ba87d --- /dev/null +++ b/erpnext/patches/v15_0/update_sub_voucher_type_in_gl_entries.py @@ -0,0 +1,57 @@ +import frappe + + +def execute(): + update_purchase_invoices() + update_sales_invoices() + update_sales_debit_notes() + + +def update_purchase_invoices(): + invoices = frappe.get_all( + "Purchase Invoice", + filters={"docstatus": 1, "is_return": 0}, + pluck="name", + ) + + if not invoices: + return + + update_gl_entry(doctype="Purchase Invoice", invoices=invoices, value="Purchase Invoice") + + +def update_sales_invoices(): + invoices = frappe.get_all( + "Sales Invoice", + filters={"docstatus": 1, "is_return": 0, "is_debit_note": 0}, + pluck="name", + ) + if not invoices: + return + + update_gl_entry(doctype="Sales Invoice", invoices=invoices, value="Sales Invoice") + + +def update_sales_debit_notes(): + invoices = frappe.get_all( + "Sales Invoice", + filters={"docstatus": 1, "is_debit_note": 1}, + pluck="name", + ) + + if not invoices: + return + + update_gl_entry(doctype="Sales Invoice", invoices=invoices, value="Debit Note") + + +def update_gl_entry(doctype, invoices, value): + gl_entry = frappe.qb.DocType("GL Entry") + ( + frappe.qb.update(gl_entry) + .set("voucher_subtype", value) + .where(gl_entry.voucher_subtype.isnotnull()) + .where(gl_entry.voucher_no.isin(invoices)) + .where(gl_entry.voucher_type == doctype) + .run() + ) From d7f91824c0e7b5a36ac5aa28f9d6d23580ed192e Mon Sep 17 00:00:00 2001 From: Smit Vora Date: Thu, 7 Nov 2024 13:35:54 +0530 Subject: [PATCH 0417/1614] test: test voucher subtype for sales invoice (cherry picked from commit ad6cc352f189449484e8560dc4a4c87ff8c0f894) --- .../sales_invoice/test_sales_invoice.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py index d05da0dbf19..db6fd41e439 100644 --- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py @@ -4005,6 +4005,25 @@ class TestSalesInvoice(FrappeTestCase): si.submit() self.assertEqual(si.remarks, f"Against Customer Order Test PO dated {format_date(nowdate())}") + def test_gl_voucher_subtype(self): + si = create_sales_invoice() + gl_entries = frappe.get_all( + "GL Entry", + filters={"voucher_type": "Sales Invoice", "voucher_no": si.name}, + pluck="voucher_subtype", + ) + + self.assertTrue(all([x == "Sales Invoice" for x in gl_entries])) + + si = create_sales_invoice(is_return=1, qty=-1) + gl_entries = frappe.get_all( + "GL Entry", + filters={"voucher_type": "Sales Invoice", "voucher_no": si.name}, + pluck="voucher_subtype", + ) + + self.assertTrue(all([x == "Credit Note" for x in gl_entries])) + def set_advance_flag(company, flag, default_account): frappe.db.set_value( From 6649d17b068fcacf7c8b24b1b1cdc5891c4735dd Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Fri, 8 Nov 2024 10:33:56 +0530 Subject: [PATCH 0418/1614] chore: resolve conflict --- erpnext/patches.txt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 01dc68d1d3a..1f1c2edc917 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -379,10 +379,6 @@ erpnext.patches.v15_0.drop_index_posting_datetime_from_sle erpnext.patches.v15_0.add_disassembly_order_stock_entry_type #1 erpnext.patches.v15_0.set_standard_stock_entry_type erpnext.patches.v15_0.link_purchase_item_to_asset_doc -<<<<<<< HEAD erpnext.patches.v14_0.update_currency_exchange_settings_for_frankfurter erpnext.patches.v15_0.update_task_assignee_email_field_in_asset_maintenance_log -======= -erpnext.patches.v15_0.migrate_to_utm_analytics erpnext.patches.v15_0.update_sub_voucher_type_in_gl_entries ->>>>>>> d76cc21086 (fix: patch) From 978a0078d8f2e93878b883643c94d327deb5fd06 Mon Sep 17 00:00:00 2001 From: "bhaveshkumar.j" Date: Mon, 21 Oct 2024 18:47:20 +0000 Subject: [PATCH 0419/1614] fix: NoneType while updating ordered_qty in SO for removed items (cherry picked from commit 442cdd7ce49ccbaff855bfac71f3222bc83b7d49) --- erpnext/buying/doctype/purchase_order/purchase_order.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.py b/erpnext/buying/doctype/purchase_order/purchase_order.py index c03c896c29f..f4e1984332f 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.py +++ b/erpnext/buying/doctype/purchase_order/purchase_order.py @@ -625,9 +625,11 @@ class PurchaseOrder(BuyingController): if not self.is_against_so(): return for item in removed_items: - prev_ordered_qty = frappe.get_cached_value( - "Sales Order Item", item.get("sales_order_item"), "ordered_qty" + prev_ordered_qty = ( + frappe.get_cached_value("Sales Order Item", item.get("sales_order_item"), "ordered_qty") + or 0.0 ) + frappe.db.set_value( "Sales Order Item", item.get("sales_order_item"), "ordered_qty", prev_ordered_qty - item.qty ) From 487b5776e62afc0f8b256e5028bbe5cac288ab4b Mon Sep 17 00:00:00 2001 From: Ravindu Nethmina <117300601+NethminaHiker360@users.noreply.github.com> Date: Mon, 28 Oct 2024 08:08:32 +0000 Subject: [PATCH 0420/1614] refactor: add "margin_type" and "margin_rate_or_amount" to no copy (cherry picked from commit 70f090c1ec3be1b904b19801b47dac16ed4a8775) --- erpnext/selling/doctype/sales_order/sales_order.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py index a87c1352471..a15e8adb57c 100755 --- a/erpnext/selling/doctype/sales_order/sales_order.py +++ b/erpnext/selling/doctype/sales_order/sales_order.py @@ -1347,6 +1347,8 @@ def make_purchase_order_for_default_supplier(source_name, selected_items=None, t "discount_percentage", "discount_amount", "pricing_rules", + "margin_type", + "margin_rate_or_amount", ], "postprocess": update_item, "condition": lambda doc: doc.ordered_qty < doc.stock_qty From 6dcd015a39be3d5985482f8899da7dc670c52576 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 8 Nov 2024 12:23:50 +0530 Subject: [PATCH 0421/1614] fix: item not set in the batch quick entry form (backport #44028) (#44031) fix: item not set in the batch quick entry form (#44028) (cherry picked from commit 0399ccc51ea9d0f48f1221dda0761603d1cea22d) Co-authored-by: rohitwaghchaure --- erpnext/public/js/controllers/transaction.js | 51 +++++++++++--------- 1 file changed, 29 insertions(+), 22 deletions(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index adb72818fe8..1773586ac48 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -289,28 +289,6 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe } ]); } - - if(this.frm.fields_dict['items'].grid.get_field('serial_and_batch_bundle')) { - let sbb_field = this.frm.get_docfield('items', 'serial_and_batch_bundle'); - if (sbb_field) { - sbb_field.get_route_options_for_new_doc = (row) => { - return { - 'item_code': row.doc.item_code, - } - }; - } - } - - if(this.frm.fields_dict['items'].grid.get_field('batch_no')) { - let batch_no_field = this.frm.get_docfield('items', 'batch_no'); - if (batch_no_field) { - batch_no_field.get_route_options_for_new_doc = function(row) { - return { - 'item': row.doc.item_code - } - }; - } - } } is_return() { @@ -409,6 +387,35 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe this.setup_quality_inspection(); this.validate_has_items(); erpnext.utils.view_serial_batch_nos(this.frm); + this.set_route_options_for_new_doc(); + } + + set_route_options_for_new_doc() { + // While creating the batch from the link field, copy item from line item to batch form + + if(this.frm.fields_dict['items'].grid.get_field('batch_no')) { + let batch_no_field = this.frm.get_docfield('items', 'batch_no'); + if (batch_no_field) { + batch_no_field.get_route_options_for_new_doc = function(row) { + return { + 'item': row.doc.item_code + } + }; + } + } + + // While creating the SABB from the link field, copy item, doctype from line item to SABB form + if(this.frm.fields_dict['items'].grid.get_field('serial_and_batch_bundle')) { + let sbb_field = this.frm.get_docfield('items', 'serial_and_batch_bundle'); + if (sbb_field) { + sbb_field.get_route_options_for_new_doc = (row) => { + return { + "item_code": row.doc.item_code, + "voucher_type": this.frm.doc.doctype, + } + }; + } + } } scan_barcode() { From 5958d0c2570aa7ae3e0e86e1afdbef89758318f1 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 8 Nov 2024 12:24:21 +0530 Subject: [PATCH 0422/1614] fix: calculate percentage received and delivered considering over-receipt and over-delivery (backport #43870) (#44030) fix: calculate percentage received and delivered considering over-receipt and over-delivery (#43870) (cherry picked from commit adba1168c1bf28911b9664934d2e84bbae906dec) Co-authored-by: Nabin Hait --- erpnext/buying/doctype/purchase_order/purchase_order.py | 2 +- erpnext/selling/doctype/sales_order/sales_order.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.py b/erpnext/buying/doctype/purchase_order/purchase_order.py index f4e1984332f..6ba9cb69f9f 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.py +++ b/erpnext/buying/doctype/purchase_order/purchase_order.py @@ -581,7 +581,7 @@ class PurchaseOrder(BuyingController): def update_receiving_percentage(self): total_qty, received_qty = 0.0, 0.0 for item in self.items: - received_qty += item.received_qty + received_qty += min(item.received_qty, item.qty) total_qty += item.qty if total_qty: self.db_set("per_received", flt(received_qty / total_qty) * 100, update_modified=False) diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py index a15e8adb57c..62262b41021 100755 --- a/erpnext/selling/doctype/sales_order/sales_order.py +++ b/erpnext/selling/doctype/sales_order/sales_order.py @@ -584,7 +584,7 @@ class SalesOrder(SellingController): item_delivered_qty = item_delivered_qty[0][0] if item_delivered_qty else 0 item.db_set("delivered_qty", flt(item_delivered_qty), update_modified=False) - delivered_qty += item.delivered_qty + delivered_qty += min(item.delivered_qty, item.qty) tot_qty += item.qty if tot_qty != 0: From 56f25ae0657e941f865fb3a224dea3767c8c3ecb Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 8 Nov 2024 12:34:47 +0530 Subject: [PATCH 0423/1614] fix: sort by ascending to get the first period closing voucher (backport #44029) (#44035) fix: sort by ascending to get the first period closing voucher (#44029) (cherry picked from commit 42dcdcde1a7a982f376f3ddd6969f825b42203e0) Co-authored-by: Venkatesh <47534423+venkat102@users.noreply.github.com> --- .../doctype/period_closing_voucher/period_closing_voucher.py | 2 +- erpnext/patches.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py index 2a9b624a47a..1d4ee25241e 100644 --- a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py +++ b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py @@ -417,7 +417,7 @@ class PeriodClosingVoucher(AccountsController): "Period Closing Voucher", {"company": self.company, "docstatus": 1}, "name", - order_by="period_end_date", + order_by="period_end_date asc", ) if not first_pcv or first_pcv == self.name: diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 1f1c2edc917..ab416d9d6c3 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -315,7 +315,7 @@ erpnext.patches.v15_0.update_asset_value_for_manual_depr_entries erpnext.patches.v15_0.update_gpa_and_ndb_for_assdeprsch erpnext.patches.v14_0.create_accounting_dimensions_for_closing_balance erpnext.patches.v14_0.set_period_start_end_date_in_pcv -erpnext.patches.v14_0.update_closing_balances #29-10-2024 +erpnext.patches.v14_0.update_closing_balances #08-11-2024 execute:frappe.db.set_single_value("Accounts Settings", "merge_similar_account_heads", 0) erpnext.patches.v14_0.update_reference_type_in_journal_entry_accounts erpnext.patches.v14_0.update_subscription_details From f5610e29bed1b1bcc456e0354ad3deabfd28f2e7 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 8 Nov 2024 13:02:23 +0530 Subject: [PATCH 0424/1614] Release v15.41.2 (#44037) * fix: improved the conditions for determining voucher subtypes (cherry picked from commit 00eee161904b5deb01ba80b6a3629bd7e2dd613f) * fix: patch (cherry picked from commit d76cc210860651377262371359b65e4f7ea9abb7) # Conflicts: # erpnext/patches.txt * test: test voucher subtype for sales invoice (cherry picked from commit ad6cc352f189449484e8560dc4a4c87ff8c0f894) * chore: resolve conflict * fix: NoneType while updating ordered_qty in SO for removed items (cherry picked from commit 442cdd7ce49ccbaff855bfac71f3222bc83b7d49) * refactor: add "margin_type" and "margin_rate_or_amount" to no copy (cherry picked from commit 70f090c1ec3be1b904b19801b47dac16ed4a8775) * fix: item not set in the batch quick entry form (backport #44028) (#44031) fix: item not set in the batch quick entry form (#44028) (cherry picked from commit 0399ccc51ea9d0f48f1221dda0761603d1cea22d) Co-authored-by: rohitwaghchaure * fix: calculate percentage received and delivered considering over-receipt and over-delivery (backport #43870) (#44030) fix: calculate percentage received and delivered considering over-receipt and over-delivery (#43870) (cherry picked from commit adba1168c1bf28911b9664934d2e84bbae906dec) Co-authored-by: Nabin Hait * fix: sort by ascending to get the first period closing voucher (backport #44029) (#44035) fix: sort by ascending to get the first period closing voucher (#44029) (cherry picked from commit 42dcdcde1a7a982f376f3ddd6969f825b42203e0) Co-authored-by: Venkatesh <47534423+venkat102@users.noreply.github.com> --------- Co-authored-by: ljain112 Co-authored-by: Smit Vora Co-authored-by: ruthra kumar Co-authored-by: bhaveshkumar.j Co-authored-by: Ravindu Nethmina <117300601+NethminaHiker360@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: rohitwaghchaure Co-authored-by: Venkatesh <47534423+venkat102@users.noreply.github.com> --- .../period_closing_voucher.py | 2 +- .../sales_invoice/test_sales_invoice.py | 19 +++++++ .../doctype/purchase_order/purchase_order.py | 8 ++- erpnext/controllers/accounts_controller.py | 6 +- erpnext/patches.txt | 3 +- .../update_sub_voucher_type_in_gl_entries.py | 57 +++++++++++++++++++ erpnext/public/js/controllers/transaction.js | 51 ++++++++++------- .../doctype/sales_order/sales_order.py | 4 +- 8 files changed, 120 insertions(+), 30 deletions(-) create mode 100644 erpnext/patches/v15_0/update_sub_voucher_type_in_gl_entries.py diff --git a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py index 2a9b624a47a..1d4ee25241e 100644 --- a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py +++ b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py @@ -417,7 +417,7 @@ class PeriodClosingVoucher(AccountsController): "Period Closing Voucher", {"company": self.company, "docstatus": 1}, "name", - order_by="period_end_date", + order_by="period_end_date asc", ) if not first_pcv or first_pcv == self.name: diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py index d05da0dbf19..db6fd41e439 100644 --- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py @@ -4005,6 +4005,25 @@ class TestSalesInvoice(FrappeTestCase): si.submit() self.assertEqual(si.remarks, f"Against Customer Order Test PO dated {format_date(nowdate())}") + def test_gl_voucher_subtype(self): + si = create_sales_invoice() + gl_entries = frappe.get_all( + "GL Entry", + filters={"voucher_type": "Sales Invoice", "voucher_no": si.name}, + pluck="voucher_subtype", + ) + + self.assertTrue(all([x == "Sales Invoice" for x in gl_entries])) + + si = create_sales_invoice(is_return=1, qty=-1) + gl_entries = frappe.get_all( + "GL Entry", + filters={"voucher_type": "Sales Invoice", "voucher_no": si.name}, + pluck="voucher_subtype", + ) + + self.assertTrue(all([x == "Credit Note" for x in gl_entries])) + def set_advance_flag(company, flag, default_account): frappe.db.set_value( diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.py b/erpnext/buying/doctype/purchase_order/purchase_order.py index c03c896c29f..6ba9cb69f9f 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.py +++ b/erpnext/buying/doctype/purchase_order/purchase_order.py @@ -581,7 +581,7 @@ class PurchaseOrder(BuyingController): def update_receiving_percentage(self): total_qty, received_qty = 0.0, 0.0 for item in self.items: - received_qty += item.received_qty + received_qty += min(item.received_qty, item.qty) total_qty += item.qty if total_qty: self.db_set("per_received", flt(received_qty / total_qty) * 100, update_modified=False) @@ -625,9 +625,11 @@ class PurchaseOrder(BuyingController): if not self.is_against_so(): return for item in removed_items: - prev_ordered_qty = frappe.get_cached_value( - "Sales Order Item", item.get("sales_order_item"), "ordered_qty" + prev_ordered_qty = ( + frappe.get_cached_value("Sales Order Item", item.get("sales_order_item"), "ordered_qty") + or 0.0 ) + frappe.db.set_value( "Sales Order Item", item.get("sales_order_item"), "ordered_qty", prev_ordered_qty - item.qty ) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index e47e9917149..b14cf428c53 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -1096,9 +1096,11 @@ class AccountsController(TransactionBase): return "Purchase Return" elif self.doctype == "Delivery Note" and self.is_return: return "Sales Return" - elif (self.doctype == "Sales Invoice" and self.is_return) or self.doctype == "Purchase Invoice": + elif self.doctype == "Sales Invoice" and self.is_return: return "Credit Note" - elif (self.doctype == "Purchase Invoice" and self.is_return) or self.doctype == "Sales Invoice": + elif self.doctype == "Sales Invoice" and self.is_debit_note: + return "Debit Note" + elif self.doctype == "Purchase Invoice" and self.is_return: return "Debit Note" return self.doctype diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 64c74f9d645..ab416d9d6c3 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -315,7 +315,7 @@ erpnext.patches.v15_0.update_asset_value_for_manual_depr_entries erpnext.patches.v15_0.update_gpa_and_ndb_for_assdeprsch erpnext.patches.v14_0.create_accounting_dimensions_for_closing_balance erpnext.patches.v14_0.set_period_start_end_date_in_pcv -erpnext.patches.v14_0.update_closing_balances #29-10-2024 +erpnext.patches.v14_0.update_closing_balances #08-11-2024 execute:frappe.db.set_single_value("Accounts Settings", "merge_similar_account_heads", 0) erpnext.patches.v14_0.update_reference_type_in_journal_entry_accounts erpnext.patches.v14_0.update_subscription_details @@ -381,3 +381,4 @@ erpnext.patches.v15_0.set_standard_stock_entry_type erpnext.patches.v15_0.link_purchase_item_to_asset_doc erpnext.patches.v14_0.update_currency_exchange_settings_for_frankfurter erpnext.patches.v15_0.update_task_assignee_email_field_in_asset_maintenance_log +erpnext.patches.v15_0.update_sub_voucher_type_in_gl_entries diff --git a/erpnext/patches/v15_0/update_sub_voucher_type_in_gl_entries.py b/erpnext/patches/v15_0/update_sub_voucher_type_in_gl_entries.py new file mode 100644 index 00000000000..7160a6ba87d --- /dev/null +++ b/erpnext/patches/v15_0/update_sub_voucher_type_in_gl_entries.py @@ -0,0 +1,57 @@ +import frappe + + +def execute(): + update_purchase_invoices() + update_sales_invoices() + update_sales_debit_notes() + + +def update_purchase_invoices(): + invoices = frappe.get_all( + "Purchase Invoice", + filters={"docstatus": 1, "is_return": 0}, + pluck="name", + ) + + if not invoices: + return + + update_gl_entry(doctype="Purchase Invoice", invoices=invoices, value="Purchase Invoice") + + +def update_sales_invoices(): + invoices = frappe.get_all( + "Sales Invoice", + filters={"docstatus": 1, "is_return": 0, "is_debit_note": 0}, + pluck="name", + ) + if not invoices: + return + + update_gl_entry(doctype="Sales Invoice", invoices=invoices, value="Sales Invoice") + + +def update_sales_debit_notes(): + invoices = frappe.get_all( + "Sales Invoice", + filters={"docstatus": 1, "is_debit_note": 1}, + pluck="name", + ) + + if not invoices: + return + + update_gl_entry(doctype="Sales Invoice", invoices=invoices, value="Debit Note") + + +def update_gl_entry(doctype, invoices, value): + gl_entry = frappe.qb.DocType("GL Entry") + ( + frappe.qb.update(gl_entry) + .set("voucher_subtype", value) + .where(gl_entry.voucher_subtype.isnotnull()) + .where(gl_entry.voucher_no.isin(invoices)) + .where(gl_entry.voucher_type == doctype) + .run() + ) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index adb72818fe8..1773586ac48 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -289,28 +289,6 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe } ]); } - - if(this.frm.fields_dict['items'].grid.get_field('serial_and_batch_bundle')) { - let sbb_field = this.frm.get_docfield('items', 'serial_and_batch_bundle'); - if (sbb_field) { - sbb_field.get_route_options_for_new_doc = (row) => { - return { - 'item_code': row.doc.item_code, - } - }; - } - } - - if(this.frm.fields_dict['items'].grid.get_field('batch_no')) { - let batch_no_field = this.frm.get_docfield('items', 'batch_no'); - if (batch_no_field) { - batch_no_field.get_route_options_for_new_doc = function(row) { - return { - 'item': row.doc.item_code - } - }; - } - } } is_return() { @@ -409,6 +387,35 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe this.setup_quality_inspection(); this.validate_has_items(); erpnext.utils.view_serial_batch_nos(this.frm); + this.set_route_options_for_new_doc(); + } + + set_route_options_for_new_doc() { + // While creating the batch from the link field, copy item from line item to batch form + + if(this.frm.fields_dict['items'].grid.get_field('batch_no')) { + let batch_no_field = this.frm.get_docfield('items', 'batch_no'); + if (batch_no_field) { + batch_no_field.get_route_options_for_new_doc = function(row) { + return { + 'item': row.doc.item_code + } + }; + } + } + + // While creating the SABB from the link field, copy item, doctype from line item to SABB form + if(this.frm.fields_dict['items'].grid.get_field('serial_and_batch_bundle')) { + let sbb_field = this.frm.get_docfield('items', 'serial_and_batch_bundle'); + if (sbb_field) { + sbb_field.get_route_options_for_new_doc = (row) => { + return { + "item_code": row.doc.item_code, + "voucher_type": this.frm.doc.doctype, + } + }; + } + } } scan_barcode() { diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py index a87c1352471..62262b41021 100755 --- a/erpnext/selling/doctype/sales_order/sales_order.py +++ b/erpnext/selling/doctype/sales_order/sales_order.py @@ -584,7 +584,7 @@ class SalesOrder(SellingController): item_delivered_qty = item_delivered_qty[0][0] if item_delivered_qty else 0 item.db_set("delivered_qty", flt(item_delivered_qty), update_modified=False) - delivered_qty += item.delivered_qty + delivered_qty += min(item.delivered_qty, item.qty) tot_qty += item.qty if tot_qty != 0: @@ -1347,6 +1347,8 @@ def make_purchase_order_for_default_supplier(source_name, selected_items=None, t "discount_percentage", "discount_amount", "pricing_rules", + "margin_type", + "margin_rate_or_amount", ], "postprocess": update_item, "condition": lambda doc: doc.ordered_qty < doc.stock_qty From 4cde77d8d8f4a6f833e4f28d7cd6f08ac0005474 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 8 Nov 2024 13:05:48 +0530 Subject: [PATCH 0425/1614] fix: duplicate items and outdated item price in POS (backport #42978) (#44038) fix: duplicate items and outdated item price in POS (#42978) * fix: duplicate items and outdated item price in POS * fix: duplicate items and outdated item price in POS --formatter (cherry picked from commit 4ea2071265d524e1e09280ec8fe70d8861d1bda6) Co-authored-by: Nihantra C. Patel <141945075+Nihantra-Patel@users.noreply.github.com> --- erpnext/selling/page/point_of_sale/point_of_sale.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/erpnext/selling/page/point_of_sale/point_of_sale.py b/erpnext/selling/page/point_of_sale/point_of_sale.py index 2bb61a6439c..fad184d152c 100644 --- a/erpnext/selling/page/point_of_sale/point_of_sale.py +++ b/erpnext/selling/page/point_of_sale/point_of_sale.py @@ -159,6 +159,8 @@ def get_items(start, page_length, price_list, item_group, pos_profile, search_te if not items_data: return result + current_date = frappe.utils.today() + for item in items_data: uoms = frappe.get_doc("Item", item.item_code).get("uoms", []) @@ -167,12 +169,16 @@ def get_items(start, page_length, price_list, item_group, pos_profile, search_te item_price = frappe.get_all( "Item Price", - fields=["price_list_rate", "currency", "uom", "batch_no"], + fields=["price_list_rate", "currency", "uom", "batch_no", "valid_from", "valid_upto"], filters={ "price_list": price_list, "item_code": item.item_code, "selling": True, + "valid_from": ["<=", current_date], + "valid_upto": ["in", [None, "", current_date]], }, + order_by="valid_from desc", + limit=1, ) if not item_price: From 50fa77276e72e5c32afc66a14871f284e78dccdc Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Fri, 8 Nov 2024 16:13:52 +0530 Subject: [PATCH 0426/1614] refactor: depracate old method and handle inclusive tax --- erpnext/controllers/taxes_and_totals.py | 24 ++++++++++++----- erpnext/public/js/controllers/accounts.js | 9 ++++--- .../public/js/controllers/taxes_and_totals.js | 27 +++++++++++++------ 3 files changed, 41 insertions(+), 19 deletions(-) diff --git a/erpnext/controllers/taxes_and_totals.py b/erpnext/controllers/taxes_and_totals.py index fc0ba56d1f4..bf5beab1a82 100644 --- a/erpnext/controllers/taxes_and_totals.py +++ b/erpnext/controllers/taxes_and_totals.py @@ -8,6 +8,7 @@ import frappe from frappe import _, scrub from frappe.model.document import Document from frappe.utils import cint, flt, round_based_on_smallest_currency_fraction +from frappe.utils.deprecations import deprecated import erpnext from erpnext.accounts.doctype.journal_entry.journal_entry import get_exchange_rate @@ -74,7 +75,7 @@ class calculate_taxes_and_totals: self.calculate_net_total() self.calculate_tax_withholding_net_total() self.calculate_taxes() - self.manipulate_grand_total_for_inclusive_tax() + self.adjust_grand_total_for_inclusive_tax() self.calculate_totals() self._cleanup() self.calculate_total_net_weight() @@ -286,7 +287,7 @@ class calculate_taxes_and_totals: ): amount = flt(item.amount) - total_inclusive_tax_amount_per_qty - item.net_amount = flt(amount / (1 + cumulated_tax_fraction)) + item.net_amount = flt(amount / (1 + cumulated_tax_fraction), item.precision("net_amount")) item.net_rate = flt(item.net_amount / item.qty, item.precision("net_rate")) item.discount_percentage = flt( item.discount_percentage, item.precision("discount_percentage") @@ -531,7 +532,12 @@ class calculate_taxes_and_totals: tax.base_tax_amount = round(tax.base_tax_amount, 0) tax.base_tax_amount_after_discount_amount = round(tax.base_tax_amount_after_discount_amount, 0) + @deprecated def manipulate_grand_total_for_inclusive_tax(self): + # for backward compatablility - if in case used by an external application + return self.adjust_grand_total_for_inclusive_tax() + + def adjust_grand_total_for_inclusive_tax(self): # if fully inclusive taxes and diff if self.doc.get("taxes") and any(cint(t.included_in_print_rate) for t in self.doc.get("taxes")): last_tax = self.doc.get("taxes")[-1] @@ -553,17 +559,21 @@ class calculate_taxes_and_totals: diff = flt(diff, self.doc.precision("rounding_adjustment")) if diff and abs(diff) <= (5.0 / 10 ** last_tax.precision("tax_amount")): - self.doc.rounding_adjustment = diff + self.doc.grand_total_diff = diff + else: + self.doc.grand_total_diff = 0 def calculate_totals(self): if self.doc.get("taxes"): - self.doc.grand_total = flt(self.doc.get("taxes")[-1].total) + flt(self.doc.rounding_adjustment) + self.doc.grand_total = flt(self.doc.get("taxes")[-1].total) + flt( + self.doc.get("grand_total_diff") + ) else: self.doc.grand_total = flt(self.doc.net_total) if self.doc.get("taxes"): self.doc.total_taxes_and_charges = flt( - self.doc.grand_total - self.doc.net_total - flt(self.doc.rounding_adjustment), + self.doc.grand_total - self.doc.net_total - flt(self.doc.get("grand_total_diff")), self.doc.precision("total_taxes_and_charges"), ) else: @@ -626,8 +636,8 @@ class calculate_taxes_and_totals: self.doc.grand_total, self.doc.currency, self.doc.precision("rounded_total") ) - # if print_in_rate is set, we would have already calculated rounding adjustment - self.doc.rounding_adjustment += flt( + # rounding adjustment should always be the difference vetween grand and rounded total + self.doc.rounding_adjustment = flt( self.doc.rounded_total - self.doc.grand_total, self.doc.precision("rounding_adjustment") ) diff --git a/erpnext/public/js/controllers/accounts.js b/erpnext/public/js/controllers/accounts.js index c39fb524264..c7b08f1dc15 100644 --- a/erpnext/public/js/controllers/accounts.js +++ b/erpnext/public/js/controllers/accounts.js @@ -160,7 +160,7 @@ erpnext.accounts.taxes = { let tax = frappe.get_doc(cdt, cdn); try { me.validate_taxes_and_charges(cdt, cdn); - me.validate_inclusive_tax(tax); + me.validate_inclusive_tax(tax, frm); } catch(e) { tax.included_in_print_rate = 0; refresh_field("included_in_print_rate", tax.name, tax.parentfield); @@ -170,7 +170,8 @@ erpnext.accounts.taxes = { }); }, - validate_inclusive_tax: function(tax) { + validate_inclusive_tax: function(tax, frm) { + this.frm = this.frm || frm; let actual_type_error = function() { var msg = __("Actual type tax cannot be included in Item rate in row {0}", [tax.idx]) frappe.throw(msg); @@ -186,12 +187,12 @@ erpnext.accounts.taxes = { if(tax.charge_type == "Actual") { // inclusive tax cannot be of type Actual actual_type_error(); - } else if(tax.charge_type == "On Previous Row Amount" && + } else if(tax.charge_type == "On Previous Row Amount" && this.frm && !cint(this.frm.doc["taxes"][tax.row_id - 1].included_in_print_rate) ) { // referred row should also be an inclusive tax on_previous_row_error(tax.row_id); - } else if(tax.charge_type == "On Previous Row Total") { + } else if(tax.charge_type == "On Previous Row Total" && this.frm) { var taxes_not_included = $.map(this.frm.doc["taxes"].slice(0, tax.row_id), function(t) { return cint(t.included_in_print_rate) ? null : t; }); if(taxes_not_included.length > 0) { diff --git a/erpnext/public/js/controllers/taxes_and_totals.js b/erpnext/public/js/controllers/taxes_and_totals.js index dc7a5a8eef1..8b2d7943772 100644 --- a/erpnext/public/js/controllers/taxes_and_totals.js +++ b/erpnext/public/js/controllers/taxes_and_totals.js @@ -103,7 +103,7 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments { this.determine_exclusive_rate(); this.calculate_net_total(); this.calculate_taxes(); - this.manipulate_grand_total_for_inclusive_tax(); + this.adjust_grand_total_for_inclusive_tax(); this.calculate_totals(); this._cleanup(); } @@ -185,7 +185,7 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments { if (!this.discount_amount_applied) { erpnext.accounts.taxes.validate_taxes_and_charges(tax.doctype, tax.name); - erpnext.accounts.taxes.validate_inclusive_tax(tax); + erpnext.accounts.taxes.validate_inclusive_tax(tax, this.frm); } frappe.model.round_floats_in(tax); }); @@ -250,7 +250,7 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments { if(!me.discount_amount_applied && item.qty && (total_inclusive_tax_amount_per_qty || cumulated_tax_fraction)) { var amount = flt(item.amount) - total_inclusive_tax_amount_per_qty; - item.net_amount = flt(amount / (1 + cumulated_tax_fraction)); + item.net_amount = flt(amount / (1 + cumulated_tax_fraction), precision("net_amount", item)); item.net_rate = item.qty ? flt(item.net_amount / item.qty, precision("net_rate", item)) : 0; me.set_in_company_currency(item, ["net_rate", "net_amount"]); @@ -305,6 +305,8 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments { me.frm.doc.net_total += item.net_amount; me.frm.doc.base_net_total += item.base_net_amount; }); + + frappe.model.round_floats_in(this.frm.doc, ["total", "base_total", "net_total", "base_net_total"]); } calculate_shipping_charges() { @@ -523,7 +525,15 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments { } } + /** + * @deprecated Use adjust_grand_total_for_inclusive_tax instead. + */ manipulate_grand_total_for_inclusive_tax() { + // for backward compatablility - if in case used by an external application + this.adjust_grand_total_for_inclusive_tax() + } + + adjust_grand_total_for_inclusive_tax() { var me = this; // if fully inclusive taxes and diff if (this.frm.doc["taxes"] && this.frm.doc["taxes"].length) { @@ -550,7 +560,9 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments { diff = flt(diff, precision("rounding_adjustment")); if ( diff && Math.abs(diff) <= (5.0 / Math.pow(10, precision("tax_amount", last_tax))) ) { - me.frm.doc.rounding_adjustment = diff; + me.frm.doc.grand_total_diff = diff; + } else { + me.frm.doc.grand_total_diff = 0; } } } @@ -561,7 +573,7 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments { var me = this; var tax_count = this.frm.doc["taxes"] ? this.frm.doc["taxes"].length : 0; this.frm.doc.grand_total = flt(tax_count - ? this.frm.doc["taxes"][tax_count - 1].total + flt(this.frm.doc.rounding_adjustment) + ? this.frm.doc["taxes"][tax_count - 1].total + flt(this.frm.doc.grand_total_diff) : this.frm.doc.net_total); if(["Quotation", "Sales Order", "Delivery Note", "Sales Invoice", "POS Invoice"].includes(this.frm.doc.doctype)) { @@ -621,7 +633,7 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments { if(frappe.meta.get_docfield(this.frm.doc.doctype, "rounded_total", this.frm.doc.name)) { this.frm.doc.rounded_total = round_based_on_smallest_currency_fraction(this.frm.doc.grand_total, this.frm.doc.currency, precision("rounded_total")); - this.frm.doc.rounding_adjustment += flt(this.frm.doc.rounded_total - this.frm.doc.grand_total, + this.frm.doc.rounding_adjustment = flt(this.frm.doc.rounded_total - this.frm.doc.grand_total, precision("rounding_adjustment")); this.set_in_company_currency(this.frm.doc, ["rounding_adjustment", "rounded_total"]); @@ -689,8 +701,7 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments { if (total_for_discount_amount) { $.each(this.frm._items || [], function(i, item) { distributed_amount = flt(me.frm.doc.discount_amount) * item.net_amount / total_for_discount_amount; - item.net_amount = flt(item.net_amount - distributed_amount, - precision("base_amount", item)); + item.net_amount = flt(item.net_amount - distributed_amount, precision("net_amount", item)); net_total += item.net_amount; // discount amount rounding loss adjustment if no taxes From 705a26a2fa5d1dc20c07dd4150771529c707e820 Mon Sep 17 00:00:00 2001 From: Smit Vora Date: Sat, 9 Nov 2024 15:14:21 +0530 Subject: [PATCH 0427/1614] fix: better gls for purchases with tax witholding (#42743) * fix: better gls for purchases with tax witholding * test: test case for purchase invoice gl entries with tax witholding * fix: use flag `_skip_merge` instead of skipping merge based on against account * test: fix test `test_single_threshold_tds` for newer implementation (cherry picked from commit e3cd6539c34891fae6aab3012b8c13145ccc84ec) --- .../purchase_invoice/purchase_invoice.py | 81 +++++++++++++------ .../purchase_invoice/test_purchase_invoice.py | 55 +++++++++++++ .../test_tax_withholding_category.py | 10 ++- erpnext/accounts/general_ledger.py | 4 + 4 files changed, 123 insertions(+), 27 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index b46fb9e9b30..b47e90eb77d 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -863,6 +863,7 @@ class PurchaseInvoice(BuyingController): self.make_tax_gl_entries(gl_entries) self.make_internal_transfer_gl_entries(gl_entries) + self.make_gl_entries_for_tax_withholding(gl_entries) gl_entries = make_regional_gl_entries(gl_entries, self) @@ -896,32 +897,37 @@ class PurchaseInvoice(BuyingController): ) if grand_total and not self.is_internal_transfer(): - against_voucher = self.name - if self.is_return and self.return_against and not self.update_outstanding_for_self: - against_voucher = self.return_against + self.add_supplier_gl_entry(gl_entries, base_grand_total, grand_total) - # Did not use base_grand_total to book rounding loss gle - gl_entries.append( - self.get_gl_dict( - { - "account": self.credit_to, - "party_type": "Supplier", - "party": self.supplier, - "due_date": self.due_date, - "against": self.against_expense_account, - "credit": base_grand_total, - "credit_in_account_currency": base_grand_total - if self.party_account_currency == self.company_currency - else grand_total, - "against_voucher": against_voucher, - "against_voucher_type": self.doctype, - "project": self.project, - "cost_center": self.cost_center, - }, - self.party_account_currency, - item=self, - ) - ) + def add_supplier_gl_entry( + self, gl_entries, base_grand_total, grand_total, against_account=None, remarks=None, skip_merge=False + ): + against_voucher = self.name + if self.is_return and self.return_against and not self.update_outstanding_for_self: + against_voucher = self.return_against + + # Did not use base_grand_total to book rounding loss gle + gl = { + "account": self.credit_to, + "party_type": "Supplier", + "party": self.supplier, + "due_date": self.due_date, + "against": against_account or self.against_expense_account, + "credit": base_grand_total, + "credit_in_account_currency": base_grand_total + if self.party_account_currency == self.company_currency + else grand_total, + "against_voucher": against_voucher, + "against_voucher_type": self.doctype, + "project": self.project, + "cost_center": self.cost_center, + "_skip_merge": skip_merge, + } + + if remarks: + gl["remarks"] = remarks + + gl_entries.append(self.get_gl_dict(gl, self.party_account_currency, item=self)) def make_item_gl_entries(self, gl_entries): # item gl entries @@ -1413,6 +1419,31 @@ class PurchaseInvoice(BuyingController): ) ) + def make_gl_entries_for_tax_withholding(self, gl_entries): + """ + Tax withholding amount is not part of supplier invoice. + Separate supplier GL Entry for correct reporting. + """ + if not self.apply_tds: + return + + for row in self.get("taxes"): + if not row.is_tax_withholding_account or not row.tax_amount: + continue + + base_tds_amount = row.base_tax_amount_after_discount_amount + tds_amount = row.tax_amount_after_discount_amount + + self.add_supplier_gl_entry(gl_entries, base_tds_amount, tds_amount) + self.add_supplier_gl_entry( + gl_entries, + -base_tds_amount, + -tds_amount, + against_account=row.account_head, + remarks=_("TDS Deducted"), + skip_merge=True, + ) + def make_payment_gl_entries(self, gl_entries): # Make Cash GL Entries if cint(self.is_paid) and self.cash_bank_account and self.paid_amount: diff --git a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py index cf5bfedaebd..f5835deb0d0 100644 --- a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py @@ -1544,6 +1544,61 @@ class TestPurchaseInvoice(FrappeTestCase, StockTestMixin): payment_entry.load_from_db() self.assertEqual(payment_entry.taxes[0].allocated_amount, 0) + def test_purchase_gl_with_tax_withholding_tax(self): + company = "_Test Company" + + tds_account_args = { + "doctype": "Account", + "account_name": "TDS Payable", + "account_type": "Tax", + "parent_account": frappe.db.get_value( + "Account", {"account_name": "Duties and Taxes", "company": company} + ), + "company": company, + } + + tds_account = create_account(**tds_account_args) + tax_withholding_category = "Test TDS - 194 - Dividends - Individual" + + # Update tax withholding category with current fiscal year and rate details + create_tax_witholding_category(tax_withholding_category, company, tds_account) + + # create a new supplier to test + supplier = create_supplier( + supplier_name="_Test TDS Advance Supplier", + tax_withholding_category=tax_withholding_category, + ) + + pi = make_purchase_invoice( + supplier=supplier.name, + rate=3000, + qty=1, + item="_Test Non Stock Item", + do_not_submit=1, + ) + pi.apply_tds = 1 + pi.tax_withholding_category = tax_withholding_category + pi.save() + pi.submit() + + self.assertEqual(pi.taxes[0].tax_amount, 300) + self.assertEqual(pi.taxes[0].account_head, tds_account) + + gl_entries = frappe.get_all( + "GL Entry", + filters={"voucher_no": pi.name, "voucher_type": "Purchase Invoice", "account": "Creditors - _TC"}, + fields=["account", "against", "debit", "credit"], + ) + + for gle in gl_entries: + if gle.debit: + # GL Entry with TDS Amount + self.assertEqual(gle.against, tds_account) + self.assertEqual(gle.debit, 300) + else: + # GL Entry with Purchase Invoice Amount + self.assertEqual(gle.credit, 3000) + def test_provisional_accounting_entry(self): setup_provisional_accounting() diff --git a/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py b/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py index c8893a13e86..2b7ae5fd689 100644 --- a/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py +++ b/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py @@ -74,11 +74,17 @@ class TestTaxWithholdingCategory(FrappeTestCase): self.assertEqual(pi.grand_total, 18000) # check gl entry for the purchase invoice - gl_entries = frappe.db.get_all("GL Entry", filters={"voucher_no": pi.name}, fields=["*"]) + gl_entries = frappe.db.get_all( + "GL Entry", + filters={"voucher_no": pi.name}, + fields=["account", "sum(debit) as debit", "sum(credit) as credit"], + group_by="account", + ) self.assertEqual(len(gl_entries), 3) for d in gl_entries: if d.account == pi.credit_to: - self.assertEqual(d.credit, 18000) + self.assertEqual(d.credit, 20000) + self.assertEqual(d.debit, 2000) elif d.account == pi.items[0].get("expense_account"): self.assertEqual(d.debit, 20000) elif d.account == pi.taxes[0].get("account_head"): diff --git a/erpnext/accounts/general_ledger.py b/erpnext/accounts/general_ledger.py index 856e2b96af0..f9b503675aa 100644 --- a/erpnext/accounts/general_ledger.py +++ b/erpnext/accounts/general_ledger.py @@ -234,6 +234,10 @@ def merge_similar_entries(gl_map, precision=None): merge_properties = get_merge_properties(accounting_dimensions) for entry in gl_map: + if entry._skip_merge: + merged_gl_map.append(entry) + continue + entry.merge_key = get_merge_key(entry, merge_properties) # if there is already an entry in this account then just add it # to that entry From e6894b949c9058ac0141d57dd4b6a5527c656f62 Mon Sep 17 00:00:00 2001 From: HENRY Florian Date: Mon, 11 Nov 2024 05:46:17 +0100 Subject: [PATCH 0428/1614] fix: when company is created with other company template Chart of Account the Create Taxe Template failed (#42755) fix: when company if create with other company template Created Template Taxe failed (cherry picked from commit 8383883977783d33f509cf3d34b40f388a2b32a7) --- erpnext/setup/setup_wizard/operations/taxes_setup.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/erpnext/setup/setup_wizard/operations/taxes_setup.py b/erpnext/setup/setup_wizard/operations/taxes_setup.py index 384673448b0..0faebb6ab4c 100644 --- a/erpnext/setup/setup_wizard/operations/taxes_setup.py +++ b/erpnext/setup/setup_wizard/operations/taxes_setup.py @@ -86,7 +86,10 @@ def simple_to_detailed(templates): def from_detailed_data(company_name, data): """Create Taxes and Charges Templates from detailed data.""" - coa_name = frappe.db.get_value("Company", company_name, "chart_of_accounts") + charts_company_name = company_name + if frappe.db.get_value("Company", company_name, "create_chart_of_accounts_based_on"): + charts_company_name = frappe.db.get_value("Company", company_name, "existing_company") + coa_name = frappe.db.get_value("Company", charts_company_name, "chart_of_accounts") coa_data = data.get("chart_of_accounts", {}) tax_templates = coa_data.get(coa_name) or coa_data.get("*", {}) tax_categories = data.get("tax_categories") From 865786e0b67fb35d2423b4cf281dd76cdca3bd51 Mon Sep 17 00:00:00 2001 From: HENRY Florian Date: Mon, 11 Nov 2024 05:47:51 +0100 Subject: [PATCH 0429/1614] feat: add template taxe for charts of account France - Plan Comptable General avec code (#42757) * feat: add template taxe for charts of account France - Plan Comptable General avec code * feat: add template taxe for charts of account France - Plan Comptable General avec code * feat: add template taxe for charts of account France - Plan Comptable General avec code * feat: add template taxe for charts of account France - Plan Comptable General avec code * feat: add template taxe for charts of account France - Plan Comptable General avec code (cherry picked from commit 1fe6efdeb9ef7a2d100a536a099b6de8b003e416) --- .../setup_wizard/data/country_wise_tax.json | 361 +++++++++++++++++- 1 file changed, 349 insertions(+), 12 deletions(-) diff --git a/erpnext/setup/setup_wizard/data/country_wise_tax.json b/erpnext/setup/setup_wizard/data/country_wise_tax.json index a746ebee7ed..efe1d705c51 100644 --- a/erpnext/setup/setup_wizard/data/country_wise_tax.json +++ b/erpnext/setup/setup_wizard/data/country_wise_tax.json @@ -449,18 +449,355 @@ }, "France": { - "France VAT 20%": { - "account_name": "VAT 20%", - "tax_rate": 20, - "default": 1 - }, - "France VAT 10%": { - "account_name": "VAT 10%", - "tax_rate": 10 - }, - "France VAT 5.5%": { - "account_name": "VAT 5.5%", - "tax_rate": 5.5 + "chart_of_accounts": { + "France - Plan Comptable General avec code": { + "sales_tax_templates": [ + { + "title": "TVA 20% Collectée", + "tax_category": "Vente Domestique", + "taxes": [ + { + "account_head": { + "account_name": "TVA 20% Collectée", + "account_number": "445720", + "root_type": "Liability", + "tax_rate": 20.0 + }, + "description": "TVA 20%", + "rate": 20 + } + ] + }, + { + "title": "TVA 10% Collectée", + "tax_category": "Vente Domestique", + "taxes": [ + { + "account_head": { + "account_name": "TVA 10% Collectée", + "account_number": "445710", + "root_type": "Liability", + "tax_rate": 10.0 + }, + "description": "TVA 10%", + "rate": 10 + } + ] + }, + { + "title": "TVA 5.5% Collectée", + "tax_category": "Vente Domestique", + "taxes": [ + { + "account_head": { + "account_name": "TVA 5.5% Collectée", + "account_number": "445755", + "root_type": "Liability", + "tax_rate": 5.5 + }, + "description": "TVA 5.5%", + "rate": 5.5 + } + ] + }, + { + "title": "TVA 2.1% Collectée", + "tax_category": "Vente Domestique", + "taxes": [ + { + "account_head": { + "account_name": "TVA 2.1% Collectée", + "account_number": "445721", + "root_type": "Liability", + "tax_rate": 2.10 + }, + "description": "TVA 2.1%", + "rate": 2.1 + } + ] + } + ], + "purchase_tax_templates": [ + { + "title": "TVA 20% Déductible", + "tax_category": "Achat Domestique", + "taxes": [ + { + "account_head": { + "account_name": "TVA 20% Déductible", + "account_number": "445620", + "root_type": "Asset", + "tax_rate": 20.0 + }, + "description": "TVA 20%", + "rate": 20 + } + ] + }, + { + "title": "TVA 10% Déductible", + "tax_category": "Achat Domestique", + "taxes": [ + { + "account_head": { + "account_name": "TVA 10% Déductible", + "account_number": "445610", + "root_type": "Asset", + "tax_rate": 10.0 + }, + "description": "TVA 10%", + "rate": 10 + } + ] + }, + { + "title": "TVA 5.5% Déductible", + "tax_category": "Achat Domestique", + "taxes": [ + { + "account_head": { + "account_name": "TVA 5.5% Déductible", + "account_number": "445655", + "root_type": "Asset", + "tax_rate": 5.5 + }, + "description": "TVA 5.5%", + "rate": 5.5 + } + ] + }, + { + "title": "TVA 2.1% Déductible", + "tax_category": "Achat Domestique", + "taxes": [ + { + "account_head": { + "account_name": "TVA 2.1% Déductible", + "account_number": "445621", + "root_type": "Asset", + "tax_rate": 2.1 + }, + "description": "TVA 2.1%", + "rate": 2.1 + } + ] + }, + { + "title": "TVA 20% Déductible - Incluse dans le prix", + "taxes": [ + { + "account_head": { + "account_name": "TVA 20% Déductible", + "account_number": "445620", + "root_type": "Asset", + "tax_rate": 20.0 + }, + "included_in_print_rate": 1, + "description": "TVA 20%", + "rate": 20 + } + ] + }, + { + "title": "TVA 10% Déductible - Incluse dans le prix", + "taxes": [ + { + "account_head": { + "account_name": "TVA 10% Déductible", + "account_number": "445610", + "root_type": "Asset", + "tax_rate": 10.0 + }, + "included_in_print_rate": 1, + "description": "TVA 10%", + "rate": 10 + } + ] + }, + { + "title": "TVA 5.5% Déductible - Incluse dans le prix", + "taxes": [ + { + "account_head": { + "account_name": "TVA 5.5% Déductible", + "account_number": "445655", + "root_type": "Asset", + "tax_rate": 5.5 + }, + "included_in_print_rate": 1, + "description": "TVA 5.5%", + "rate": 5.5 + } + ] + }, + { + "title": "TVA 2.1% Déductible - Incluse dans le prix", + "taxes": [ + { + "account_head": { + "account_name": "TVA 2.1% Déductible", + "account_number": "445621", + "root_type": "Asset", + "tax_rate": 2.1 + }, + "included_in_print_rate": 1, + "description": "TVA 2.1%", + "rate": 2.1 + } + ] + }, + { + "title": "TVA Intracommunautaire", + "tax_category": "Achat - EU", + "taxes": [ + { + "account_head": { + "account_name": "TVA déductible sur acquisition intracommunautaires", + "account_number": "445662", + "root_type": "Asset", + "tax_rate": 20.0, + "add_deduct_tax": "Add" + }, + "description": "TVA déductible sur acquisition intracommunautaires", + "rate": 20 + }, + { + "account_head": { + "account_name": "TVA due intracommunautaire", + "account_number": "445200", + "root_type": "Asset", + "tax_rate": 20.0, + "add_deduct_tax": "Deduct" + }, + "description": "TVA due intracommunautaire", + "rate": 20 + } + ] + } + ], + "item_tax_templates": [ + { + "title": "TVA 20% Déductible - Achat", + "taxes": [ + { + "tax_type": { + "account_name": "TVA 20% Déductible", + "account_number": "445620", + "root_type": "Asset", + "tax_rate": 20.0 + }, + "description": "TVA 20%", + "tax_rate": 20 + } + ] + }, + { + "title": "TVA 10% Déductible - Achat", + "taxes": [ + { + "tax_type": { + "account_name": "TVA 10% Déductible", + "account_number": "445610", + "root_type": "Asset", + "tax_rate": 10.0 + }, + "description": "TVA 10%", + "tax_rate": 10 + } + ] + }, + { + "title": "TVA 5.5% Déductible - Achat", + "taxes": [ + { + "tax_type": { + "account_name": "TVA 5.5% Déductible", + "account_number": "445655", + "root_type": "Asset", + "tax_rate": 5.5 + }, + "description": "TVA 5.5%", + "tax_rate": 5.5 + } + ] + }, + { + "title": "TVA 2.1% Déductible - Achat", + "taxes": [ + { + "tax_type": { + "account_name": "TVA 2.1% Déductible", + "account_number": "445621", + "root_type": "Asset", + "tax_rate": 2.1 + }, + "description": "TVA 2.1%", + "tax_rate": 2.1 + } + ] + }, + { + "title": "TVA 20% Collecté - Vente", + "taxes": [ + { + "tax_type": { + "account_name": "TVA 20% Collecté", + "account_number": "445720", + "root_type": "Liability", + "tax_rate": 20.0 + }, + "description": "TVA 20%", + "tax_rate": 20 + } + ] + }, + { + "title": "TVA 10% Collecté - Vente", + "taxes": [ + { + "tax_type": { + "account_name": "TVA 10% Collecté", + "account_number": "445710", + "root_type": "Liability", + "tax_rate": 10.0 + }, + "description": "TVA 10%", + "tax_rate": 10 + } + ] + }, + { + "title": "TVA 5.5% Collecté - Vente", + "taxes": [ + { + "tax_type": { + "account_name": "TVA 5.5% Collecté", + "account_number": "445755", + "root_type": "Liability", + "tax_rate": 5.5 + }, + "description": "TVA 5.5%", + "tax_rate": 5.5 + } + ] + }, + { + "title": "TVA 2.1% Collecté - Vente", + "taxes": [ + { + "tax_type": { + "account_name": "TVA 2.1% Collecté", + "account_number": "445721", + "root_type": "Liability", + "tax_rate": 2.1 + }, + "description": "TVA 2.1%", + "tax_rate": 2.1 + } + ] + } + ] + } } }, From 3e29ae85345fc8c3ec0851987804f3886852097f Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Mon, 11 Nov 2024 11:12:33 +0530 Subject: [PATCH 0430/1614] fix: slow reposting due to SABB update (cherry picked from commit 2447b3f424fb26d1a72676ac439c1b2c28cfeb11) --- erpnext/stock/doctype/stock_entry/stock_entry.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index 5993580032f..f362f9d3da9 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -795,9 +795,6 @@ class StockEntry(StockController): self.set_total_incoming_outgoing_value() self.set_total_amount() - if not reset_outgoing_rate: - self.set_serial_and_batch_bundle() - def set_basic_rate(self, reset_outgoing_rate=True, raise_error_if_no_rate=True): """ Set rate for outgoing, scrapped and finished items From 7d098328d0bc6e74aca03e505f3c31d845c38d9b Mon Sep 17 00:00:00 2001 From: vishnu Date: Sun, 10 Nov 2024 06:55:16 +0000 Subject: [PATCH 0431/1614] fix: tyeerror while saving pick list (cherry picked from commit 22de0ecbdcb34ffde91b0788c66e6bb8beb18a17) --- erpnext/stock/doctype/pick_list/pick_list.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/pick_list/pick_list.py b/erpnext/stock/doctype/pick_list/pick_list.py index 27a37ef1bab..ba1cc228bfa 100644 --- a/erpnext/stock/doctype/pick_list/pick_list.py +++ b/erpnext/stock/doctype/pick_list/pick_list.py @@ -109,7 +109,7 @@ class PickList(Document): "actual_qty", ) - if row.qty > bin_qty: + if row.qty > flt(bin_qty): frappe.throw( _( "At Row #{0}: The picked quantity {1} for the item {2} is greater than available stock {3} in the warehouse {4}." From 65ec7c56041612c17dce79def87ce31ee503f391 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 11 Nov 2024 12:27:26 +0530 Subject: [PATCH 0432/1614] fix: add default height to POS item card selector (backport #44071) (#44075) fix: add default height to POS item card selector (cherry picked from commit 5f5a514d6f7845be1a729427561e040b16ba4b5e) Co-authored-by: Kavin <78342682+kavin0411@users.noreply.github.com> --- erpnext/selling/page/point_of_sale/pos_item_selector.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/selling/page/point_of_sale/pos_item_selector.js b/erpnext/selling/page/point_of_sale/pos_item_selector.js index b5fa8849d60..862dfd54e5c 100644 --- a/erpnext/selling/page/point_of_sale/pos_item_selector.js +++ b/erpnext/selling/page/point_of_sale/pos_item_selector.js @@ -99,7 +99,7 @@ erpnext.PointOfSale.ItemSelector = class { return `
${qty_to_display}
-
+
Date: Mon, 11 Nov 2024 12:51:48 +0530 Subject: [PATCH 0433/1614] chore: update `CODEOWNERS` (backport #44074) (#44081) chore: update `CODEOWNERS` (#44074) (cherry picked from commit 9a758ea826c091dcd298b19d50d8684e0147beae) Co-authored-by: s-aga-r --- CODEOWNERS | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/CODEOWNERS b/CODEOWNERS index 9077c6783c7..4a19fc871b5 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -4,21 +4,21 @@ # the repo. Unless a later match takes precedence, erpnext/accounts/ @deepeshgarg007 @ruthra-kumar -erpnext/assets/ @anandbaburajan @deepeshgarg007 +erpnext/assets/ @khushi8112 @deepeshgarg007 erpnext/regional @deepeshgarg007 @ruthra-kumar erpnext/selling @deepeshgarg007 @ruthra-kumar erpnext/support/ @deepeshgarg007 pos* -erpnext/buying/ @rohitwaghchaure @s-aga-r -erpnext/maintenance/ @rohitwaghchaure @s-aga-r -erpnext/manufacturing/ @rohitwaghchaure @s-aga-r -erpnext/quality_management/ @rohitwaghchaure @s-aga-r -erpnext/stock/ @rohitwaghchaure @s-aga-r -erpnext/subcontracting @rohitwaghchaure @s-aga-r +erpnext/buying/ @rohitwaghchaure +erpnext/maintenance/ @rohitwaghchaure +erpnext/manufacturing/ @rohitwaghchaure +erpnext/quality_management/ @rohitwaghchaure +erpnext/stock/ @rohitwaghchaure +erpnext/subcontracting @rohitwaghchaure erpnext/controllers/ @deepeshgarg007 @rohitwaghchaure erpnext/patches/ @deepeshgarg007 .github/ @deepeshgarg007 -pyproject.toml @phot0n +pyproject.toml @akhilnarang From 34b5639d1c3a260f527ae02e2dc5ce05efd73e1c Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 11 Nov 2024 13:00:27 +0530 Subject: [PATCH 0434/1614] fix: task path (backport #44073) (#44078) fix: task path (#44073) (cherry picked from commit 8c99acb1b905d57515c42db3e24d480f96048aa1) Co-authored-by: Nihantra C. Patel <141945075+Nihantra-Patel@users.noreply.github.com> --- erpnext/projects/doctype/task/task.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/projects/doctype/task/task.py b/erpnext/projects/doctype/task/task.py index c03c99b25d5..5eae55d71c5 100755 --- a/erpnext/projects/doctype/task/task.py +++ b/erpnext/projects/doctype/task/task.py @@ -153,14 +153,14 @@ class Task(NestedSet): def validate_parent_template_task(self): if self.parent_task: if not frappe.db.get_value("Task", self.parent_task, "is_template"): - parent_task_format = f"""{self.parent_task}""" + parent_task_format = f"""{self.parent_task}""" frappe.throw(_("Parent Task {0} is not a Template Task").format(parent_task_format)) def validate_depends_on_tasks(self): if self.depends_on: for task in self.depends_on: if not frappe.db.get_value("Task", task.task, "is_template"): - dependent_task_format = f"""{task.task}""" + dependent_task_format = f"""{task.task}""" frappe.throw(_("Dependent Task {0} is not a Template Task").format(dependent_task_format)) def validate_completed_on(self): From 363f15124eaa857d112b04ae7429b11360015215 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 11 Nov 2024 13:12:30 +0530 Subject: [PATCH 0435/1614] fix: populate payment schedule from payment terms (backport #44082) (#44083) fix: populate payment schedule from payment terms (#44082) (cherry picked from commit c81eb6c824b04d8f174ece6900a5669b9a7c9461) Co-authored-by: Nihantra C. Patel <141945075+Nihantra-Patel@users.noreply.github.com> --- erpnext/public/js/controllers/transaction.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 1773586ac48..07ba90cd6d1 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -2446,7 +2446,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe payment_terms_template() { var me = this; const doc = this.frm.doc; - if(doc.payment_terms_template && doc.doctype !== 'Delivery Note' && doc.is_return == 0) { + if(doc.payment_terms_template && doc.doctype !== 'Delivery Note' && !doc.is_return) { var posting_date = doc.posting_date || doc.transaction_date; frappe.call({ method: "erpnext.controllers.accounts_controller.get_payment_terms", From be07421ab77b43681dffc7e038630b01ecc61984 Mon Sep 17 00:00:00 2001 From: Vishv-silveroak <108357657+Vishv-024@users.noreply.github.com> Date: Wed, 16 Oct 2024 18:03:40 +0530 Subject: [PATCH 0436/1614] fix: exception on register reports when filtered on cost center 1 (cherry picked from commit f01e1a8e20d6fa32e48ff22d850e737be5e32e2b) --- erpnext/accounts/report/utils.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/report/utils.py b/erpnext/accounts/report/utils.py index d6c1b95cf7c..2a72b10e4eb 100644 --- a/erpnext/accounts/report/utils.py +++ b/erpnext/accounts/report/utils.py @@ -255,7 +255,9 @@ def get_journal_entries(filters, args): ) .orderby(je.posting_date, je.name, order=Order.desc) ) - query = apply_common_conditions(filters, query, doctype="Journal Entry", payments=True) + query = apply_common_conditions( + filters, query, doctype="Journal Entry", child_doctype="Journal Entry Account", payments=True + ) journal_entries = query.run(as_dict=True) return journal_entries @@ -306,7 +308,9 @@ def apply_common_conditions(filters, query, doctype, child_doctype=None, payment query = query.where(parent_doc.posting_date <= filters.to_date) if payments: - if filters.get("cost_center"): + if doctype == "Journal Entry" and filters.get("cost_center"): + query = query.where(child_doc.cost_center == filters.cost_center) + elif filters.get("cost_center"): query = query.where(parent_doc.cost_center == filters.cost_center) else: if filters.get("cost_center"): From 2183b993300124df7652c2add8ffaa1504b66825 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Fri, 8 Nov 2024 12:08:05 +0530 Subject: [PATCH 0437/1614] test: basic report output (cherry picked from commit 657201b32485cc3471fc91fdb6b20c7d73abdf60) --- .../sales_register/test_sales_register.py | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 erpnext/accounts/report/sales_register/test_sales_register.py diff --git a/erpnext/accounts/report/sales_register/test_sales_register.py b/erpnext/accounts/report/sales_register/test_sales_register.py new file mode 100644 index 00000000000..6ed754fa837 --- /dev/null +++ b/erpnext/accounts/report/sales_register/test_sales_register.py @@ -0,0 +1,64 @@ +import frappe +from frappe.tests import IntegrationTestCase +from frappe.utils import getdate, today + +from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice +from erpnext.accounts.report.item_wise_sales_register.item_wise_sales_register import execute +from erpnext.accounts.test.accounts_mixin import AccountsTestMixin + + +class TestItemWiseSalesRegister(AccountsTestMixin, IntegrationTestCase): + def setUp(self): + self.create_company() + self.create_customer() + self.create_item() + + def tearDown(self): + frappe.db.rollback() + + def create_sales_invoice(self, rate=100, do_not_submit=False): + si = create_sales_invoice( + item=self.item, + company=self.company, + customer=self.customer, + debit_to=self.debit_to, + posting_date=today(), + parent_cost_center=self.cost_center, + cost_center=self.cost_center, + rate=rate, + price_list_rate=rate, + do_not_save=1, + ) + si = si.save() + if not do_not_submit: + si = si.submit() + return si + + def test_basic_report_output(self): + si = self.create_sales_invoice(rate=98) + + filters = frappe._dict({"from_date": today(), "to_date": today(), "company": self.company}) + report = execute(filters) + + self.assertEqual(len(report[1]), 1) + + expected_result = { + "item_code": si.items[0].item_code, + "invoice": si.name, + "posting_date": getdate(), + "customer": si.customer, + "debit_to": si.debit_to, + "company": self.company, + "income_account": si.items[0].income_account, + "stock_qty": 1.0, + "stock_uom": si.items[0].stock_uom, + "rate": 98.0, + "amount": 98.0, + "total_tax": 0, + "total_other_charges": 0, + "total": 98.0, + "currency": "INR", + } + + report_output = {k: v for k, v in report[1][0].items() if k in expected_result} + self.assertDictEqual(report_output, expected_result) From 2affa60ea9e606cc63c8328be836cc1302b7541a Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 11 Nov 2024 12:18:25 +0530 Subject: [PATCH 0438/1614] test: journals with cost center (cherry picked from commit c255f34eead1cba9210df609b22eb21e643f3d40) --- .../sales_register/test_sales_register.py | 121 +++++++++++++++++- 1 file changed, 120 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/report/sales_register/test_sales_register.py b/erpnext/accounts/report/sales_register/test_sales_register.py index 6ed754fa837..0bd67f39907 100644 --- a/erpnext/accounts/report/sales_register/test_sales_register.py +++ b/erpnext/accounts/report/sales_register/test_sales_register.py @@ -3,7 +3,7 @@ from frappe.tests import IntegrationTestCase from frappe.utils import getdate, today from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice -from erpnext.accounts.report.item_wise_sales_register.item_wise_sales_register import execute +from erpnext.accounts.report.sales_register.sales_register import execute from erpnext.accounts.test.accounts_mixin import AccountsTestMixin @@ -12,10 +12,27 @@ class TestItemWiseSalesRegister(AccountsTestMixin, IntegrationTestCase): self.create_company() self.create_customer() self.create_item() + self.create_child_cost_center() def tearDown(self): frappe.db.rollback() + def create_child_cost_center(self): + cc_name = "South Wing" + if frappe.db.exists("Cost Center", cc_name): + cc = frappe.get_doc("Cost Center", cc_name) + else: + cc = frappe.get_doc( + { + "doctype": "Cost Center", + "parent_cost_center": self.cost_center, + "company": self.company, + "is_group": False, + } + ) + cc = cc.save() + self.south_cc = cc.name + def create_sales_invoice(self, rate=100, do_not_submit=False): si = create_sales_invoice( item=self.item, @@ -62,3 +79,105 @@ class TestItemWiseSalesRegister(AccountsTestMixin, IntegrationTestCase): report_output = {k: v for k, v in report[1][0].items() if k in expected_result} self.assertDictEqual(report_output, expected_result) + + def test_journal_with_cost_center_filter(self): + je1 = frappe.get_doc( + { + "doctype": "Journal Entry", + "voucher_type": "Journal Entry", + "company": self.company, + "posting_date": getdate(), + "accounts": [ + { + "account": self.debit_to, + "party_type": "Customer", + "party": self.customer, + "credit_in_account_currency": 77, + "credit": 77, + "is_advance": "Yes", + "cost_center": self.south_cc, + }, + { + "account": self.cash, + "debit_in_account_currency": 77, + "debit": 77, + }, + ], + } + ) + je1.submit() + + je2 = frappe.get_doc( + { + "doctype": "Journal Entry", + "voucher_type": "Journal Entry", + "company": self.company, + "posting_date": getdate(), + "accounts": [ + { + "account": self.debit_to, + "party_type": "Customer", + "party": self.customer, + "credit_in_account_currency": 98, + "credit": 98, + "is_advance": "Yes", + "cost_center": self.cost_center, + }, + { + "account": self.cash, + "debit_in_account_currency": 98, + "debit": 98, + }, + ], + } + ) + je2.submit() + + filters = frappe._dict( + { + "from_date": today(), + "to_date": today(), + "company": self.company, + "include_payments": True, + "customer": self.customer, + "cost_center": self.cost_center, + } + ) + result = [x for x in execute(filters)[1] if x.voucher_no == je1.name] + expected_result = { + "voucher_type": je1.doctype, + "voucher_no": je1.name, + "posting_date": je1.posting_date, + "customer": self.customer, + "receivable_account": self.debit_to, + "net_total": 77, + "cost_center": self.south_cc, + "credit": 77, + } + result_output = {k: v for k, v in result.items() if k in expected_result} + self.assertDictEqual(result_output, expected_result) + + # Without cost center filter + filters = frappe._dict( + { + "from_date": today(), + "to_date": today(), + "company": self.company, + "include_payments": True, + "customer": self.customer, + "cost_center": self.south_cc, + } + ) + result = [x for x in execute(filters)[1] if x.voucher_no == je2.name] + expected_result = { + "voucher_type": je2.doctype, + "voucher_no": je2.name, + "posting_date": je2.posting_date, + "customer": self.customer, + "receivable_account": self.debit_to, + "net_total": 98, + "cost_center": self.south_cc, + "credit": 98, + } + result_output = {k: v for k, v in result.items() if k in expected_result} + self.assertDictEqual(result_output, expected_result) From 9724cefce8ee677865e2152ba6c4d867e0594692 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 11 Nov 2024 12:34:54 +0530 Subject: [PATCH 0439/1614] refactor(test): fix incorrect assertion (cherry picked from commit d6030e71121f5c9d7d25c4d11310f4e56cc46833) --- .../sales_register/test_sales_register.py | 26 +++++++------------ 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/erpnext/accounts/report/sales_register/test_sales_register.py b/erpnext/accounts/report/sales_register/test_sales_register.py index 0bd67f39907..dbb4cd89851 100644 --- a/erpnext/accounts/report/sales_register/test_sales_register.py +++ b/erpnext/accounts/report/sales_register/test_sales_register.py @@ -60,21 +60,14 @@ class TestItemWiseSalesRegister(AccountsTestMixin, IntegrationTestCase): self.assertEqual(len(report[1]), 1) expected_result = { - "item_code": si.items[0].item_code, - "invoice": si.name, - "posting_date": getdate(), - "customer": si.customer, - "debit_to": si.debit_to, - "company": self.company, - "income_account": si.items[0].income_account, - "stock_qty": 1.0, - "stock_uom": si.items[0].stock_uom, - "rate": 98.0, - "amount": 98.0, - "total_tax": 0, - "total_other_charges": 0, - "total": 98.0, - "currency": "INR", + "voucher_type": si.doctype, + "voucher_no": si.name, + "posting_date": si.posting_date, + "customer": self.customer, + "receivable_account": self.debit_to, + "net_total": 98, + "grand_total": 98, + "credit": 98, } report_output = {k: v for k, v in report[1][0].items() if k in expected_result} @@ -151,13 +144,12 @@ class TestItemWiseSalesRegister(AccountsTestMixin, IntegrationTestCase): "customer": self.customer, "receivable_account": self.debit_to, "net_total": 77, - "cost_center": self.south_cc, + "cost_center": self.cost_center, "credit": 77, } result_output = {k: v for k, v in result.items() if k in expected_result} self.assertDictEqual(result_output, expected_result) - # Without cost center filter filters = frappe._dict( { "from_date": today(), From d0e5568010969c01eae67ca9434f528c05185984 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 11 Nov 2024 13:06:09 +0530 Subject: [PATCH 0440/1614] refactor(test): pass all mandatory fields (cherry picked from commit c53e9637dd1ee39ebfeb713f39e0eaafb414e5c7) --- erpnext/accounts/report/sales_register/test_sales_register.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/accounts/report/sales_register/test_sales_register.py b/erpnext/accounts/report/sales_register/test_sales_register.py index dbb4cd89851..cb8f37a4f0f 100644 --- a/erpnext/accounts/report/sales_register/test_sales_register.py +++ b/erpnext/accounts/report/sales_register/test_sales_register.py @@ -28,6 +28,7 @@ class TestItemWiseSalesRegister(AccountsTestMixin, IntegrationTestCase): "parent_cost_center": self.cost_center, "company": self.company, "is_group": False, + "cost_center_name": cc_name, } ) cc = cc.save() From 2de9292ac0d93b1a904fdd46377631dead44c972 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 11 Nov 2024 14:16:49 +0530 Subject: [PATCH 0441/1614] refactor(test): assertion refactoring and exact decimals (cherry picked from commit 1d11131afeef9040ad98647c834daf2faafcb782) --- .../sales_register/test_sales_register.py | 39 ++++++++++--------- 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/erpnext/accounts/report/sales_register/test_sales_register.py b/erpnext/accounts/report/sales_register/test_sales_register.py index cb8f37a4f0f..50f12e52e33 100644 --- a/erpnext/accounts/report/sales_register/test_sales_register.py +++ b/erpnext/accounts/report/sales_register/test_sales_register.py @@ -22,12 +22,13 @@ class TestItemWiseSalesRegister(AccountsTestMixin, IntegrationTestCase): if frappe.db.exists("Cost Center", cc_name): cc = frappe.get_doc("Cost Center", cc_name) else: + parent = frappe.db.get_value("Cost Center", self.cost_center, "parent_cost_center") cc = frappe.get_doc( { "doctype": "Cost Center", - "parent_cost_center": self.cost_center, "company": self.company, "is_group": False, + "parent_cost_center": parent, "cost_center_name": cc_name, } ) @@ -63,12 +64,12 @@ class TestItemWiseSalesRegister(AccountsTestMixin, IntegrationTestCase): expected_result = { "voucher_type": si.doctype, "voucher_no": si.name, - "posting_date": si.posting_date, + "posting_date": getdate(), "customer": self.customer, "receivable_account": self.debit_to, - "net_total": 98, - "grand_total": 98, - "credit": 98, + "net_total": 98.0, + "grand_total": 98.0, + "debit": 98.0, } report_output = {k: v for k, v in report[1][0].items() if k in expected_result} @@ -89,7 +90,7 @@ class TestItemWiseSalesRegister(AccountsTestMixin, IntegrationTestCase): "credit_in_account_currency": 77, "credit": 77, "is_advance": "Yes", - "cost_center": self.south_cc, + "cost_center": self.cost_center, }, { "account": self.cash, @@ -115,7 +116,7 @@ class TestItemWiseSalesRegister(AccountsTestMixin, IntegrationTestCase): "credit_in_account_currency": 98, "credit": 98, "is_advance": "Yes", - "cost_center": self.cost_center, + "cost_center": self.south_cc, }, { "account": self.cash, @@ -137,19 +138,20 @@ class TestItemWiseSalesRegister(AccountsTestMixin, IntegrationTestCase): "cost_center": self.cost_center, } ) - result = [x for x in execute(filters)[1] if x.voucher_no == je1.name] + report_output = execute(filters)[1] + filtered_output = [x for x in report_output if x.get("voucher_no") == je1.name] + self.assertEqual(len(filtered_output), 1) expected_result = { "voucher_type": je1.doctype, "voucher_no": je1.name, "posting_date": je1.posting_date, "customer": self.customer, "receivable_account": self.debit_to, - "net_total": 77, - "cost_center": self.cost_center, - "credit": 77, + "net_total": 77.0, + "credit": 77.0, } - result_output = {k: v for k, v in result.items() if k in expected_result} - self.assertDictEqual(result_output, expected_result) + result_fields = {k: v for k, v in filtered_output[0].items() if k in expected_result} + self.assertDictEqual(result_fields, expected_result) filters = frappe._dict( { @@ -161,16 +163,17 @@ class TestItemWiseSalesRegister(AccountsTestMixin, IntegrationTestCase): "cost_center": self.south_cc, } ) - result = [x for x in execute(filters)[1] if x.voucher_no == je2.name] + report_output = execute(filters)[1] + filtered_output = [x for x in report_output if x.get("voucher_no") == je2.name] + self.assertEqual(len(filtered_output), 1) expected_result = { "voucher_type": je2.doctype, "voucher_no": je2.name, "posting_date": je2.posting_date, "customer": self.customer, "receivable_account": self.debit_to, - "net_total": 98, - "cost_center": self.south_cc, - "credit": 98, + "net_total": 98.0, + "credit": 98.0, } - result_output = {k: v for k, v in result.items() if k in expected_result} + result_output = {k: v for k, v in filtered_output[0].items() if k in expected_result} self.assertDictEqual(result_output, expected_result) From 2bce7353008573832c110050534ec9f5f6799a32 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 11 Nov 2024 15:06:55 +0530 Subject: [PATCH 0442/1614] chore: use FrappeTestCase --- erpnext/accounts/report/sales_register/test_sales_register.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/report/sales_register/test_sales_register.py b/erpnext/accounts/report/sales_register/test_sales_register.py index 50f12e52e33..693c33c0ca6 100644 --- a/erpnext/accounts/report/sales_register/test_sales_register.py +++ b/erpnext/accounts/report/sales_register/test_sales_register.py @@ -1,5 +1,5 @@ import frappe -from frappe.tests import IntegrationTestCase +from frappe.tests.utils import FrappeTestCase from frappe.utils import getdate, today from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice @@ -7,7 +7,7 @@ from erpnext.accounts.report.sales_register.sales_register import execute from erpnext.accounts.test.accounts_mixin import AccountsTestMixin -class TestItemWiseSalesRegister(AccountsTestMixin, IntegrationTestCase): +class TestItemWiseSalesRegister(AccountsTestMixin, FrappeTestCase): def setUp(self): self.create_company() self.create_customer() From 9ac54f694c27323baca073f6d790497d1c056507 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Mon, 11 Nov 2024 16:07:16 +0530 Subject: [PATCH 0443/1614] fix: item mapping from modal to batch form (#44090) (cherry picked from commit 9223ef2f3744fbd4f6962040b403b26a5925e67d) --- erpnext/public/js/utils/serial_no_batch_selector.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/erpnext/public/js/utils/serial_no_batch_selector.js b/erpnext/public/js/utils/serial_no_batch_selector.js index 8329e5c9d55..61b40d6fef0 100644 --- a/erpnext/public/js/utils/serial_no_batch_selector.js +++ b/erpnext/public/js/utils/serial_no_batch_selector.js @@ -437,6 +437,11 @@ erpnext.SerialBatchPackageSelector = class SerialNoBatchBundleUpdate { fieldname: "batch_no", label: __("Batch No"), in_list_view: 1, + get_route_options_for_new_doc: () => { + return { + item: this.item.item_code, + }; + }, change() { let doc = this.doc; if (!doc.qty && me.item.type_of_transaction === "Outward") { From f387a8fcebbd5958e50a010b05c0c53d9d98328d Mon Sep 17 00:00:00 2001 From: HarryPaulo Date: Mon, 11 Nov 2024 07:38:30 -0300 Subject: [PATCH 0444/1614] fix: add field conversion_factor when include_uom is settled (#43701) (cherry picked from commit cfe6af1f6815bc420d7b74e2122c3cb3d2fe6463) --- erpnext/stock/report/stock_projected_qty/stock_projected_qty.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/stock/report/stock_projected_qty/stock_projected_qty.py b/erpnext/stock/report/stock_projected_qty/stock_projected_qty.py index 743656c6472..9b4520064d6 100644 --- a/erpnext/stock/report/stock_projected_qty/stock_projected_qty.py +++ b/erpnext/stock/report/stock_projected_qty/stock_projected_qty.py @@ -297,6 +297,7 @@ def get_item_map(item_code, include_uom): if include_uom: ucd = frappe.qb.DocType("UOM Conversion Detail") + query = query.select(ucd.conversion_factor) query = query.left_join(ucd).on((ucd.parent == item.name) & (ucd.uom == include_uom)) items = query.run(as_dict=True) From b314f3839bfd19f81eac6d712a343d837fd4cb0f Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 11 Nov 2024 16:12:01 +0530 Subject: [PATCH 0445/1614] fix: Negative stock validation against inventory dimension (backport #43834) (#43846) fix: Negative stock validation against inventory dimension (#43834) (cherry picked from commit c330a292d2c473e5f0213ce5d5b15ed9928e65aa) Co-authored-by: Nabin Hait --- .../test_inventory_dimension.py | 21 ++++-- .../stock_ledger_entry/stock_ledger_entry.py | 70 +++++++++---------- 2 files changed, 51 insertions(+), 40 deletions(-) diff --git a/erpnext/stock/doctype/inventory_dimension/test_inventory_dimension.py b/erpnext/stock/doctype/inventory_dimension/test_inventory_dimension.py index 8ce954d55e6..918399a7f66 100644 --- a/erpnext/stock/doctype/inventory_dimension/test_inventory_dimension.py +++ b/erpnext/stock/doctype/inventory_dimension/test_inventory_dimension.py @@ -16,6 +16,7 @@ from erpnext.stock.doctype.inventory_dimension.inventory_dimension import ( from erpnext.stock.doctype.item.test_item import create_item from erpnext.stock.doctype.purchase_receipt.test_purchase_receipt import make_purchase_receipt from erpnext.stock.doctype.stock_entry.stock_entry_utils import make_stock_entry +from erpnext.stock.doctype.stock_ledger_entry.stock_ledger_entry import InventoryDimensionNegativeStockError from erpnext.stock.doctype.warehouse.test_warehouse import create_warehouse @@ -426,39 +427,49 @@ class TestInventoryDimension(FrappeTestCase): warehouse = create_warehouse("Negative Stock Warehouse") + # Try issuing 10 qty, more than available stock against inventory dimension doc = make_stock_entry(item_code=item_code, source=warehouse, qty=10, do_not_submit=True) doc.items[0].inv_site = "Site 1" - self.assertRaises(frappe.ValidationError, doc.submit) + self.assertRaises(InventoryDimensionNegativeStockError, doc.submit) + + # cancel the stock entry doc.reload() if doc.docstatus == 1: doc.cancel() + # Receive 10 qty against inventory dimension doc = make_stock_entry(item_code=item_code, target=warehouse, qty=10, do_not_submit=True) - doc.items[0].to_inv_site = "Site 1" doc.submit() + # check inventory dimension value in stock ledger entry site_name = frappe.get_all( "Stock Ledger Entry", filters={"voucher_no": doc.name, "is_cancelled": 0}, fields=["inv_site"] )[0].inv_site self.assertEqual(site_name, "Site 1") + # Receive another 100 qty without inventory dimension + doc = make_stock_entry(item_code=item_code, target=warehouse, qty=100) + + # Try issuing 100 qty, more than available stock against inventory dimension + # Note: total available qty for the item is 110, but against inventory dimension, only 10 qty is available doc = make_stock_entry(item_code=item_code, source=warehouse, qty=100, do_not_submit=True) - doc.items[0].inv_site = "Site 1" - self.assertRaises(frappe.ValidationError, doc.submit) + self.assertRaises(InventoryDimensionNegativeStockError, doc.submit) + # disable validate_negative_stock for inventory dimension inv_dimension.reload() inv_dimension.db_set("validate_negative_stock", 0) frappe.local.inventory_dimensions = {} + # Try issuing 100 qty, more than available stock against inventory dimension doc = make_stock_entry(item_code=item_code, source=warehouse, qty=100, do_not_submit=True) - doc.items[0].inv_site = "Site 1" doc.submit() self.assertEqual(doc.docstatus, 1) + # check inventory dimension value in stock ledger entry site_name = frappe.get_all( "Stock Ledger Entry", filters={"voucher_no": doc.name, "is_cancelled": 0}, fields=["inv_site"] )[0].inv_site diff --git a/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py b/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py index 319303dbbb0..5aeabeeec56 100644 --- a/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py +++ b/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py @@ -8,6 +8,7 @@ import frappe from frappe import _, bold from frappe.core.doctype.role.role import get_users from frappe.model.document import Document +from frappe.query_builder.functions import Sum from frappe.utils import add_days, cint, flt, formatdate, get_datetime, getdate from erpnext.accounts.utils import get_fiscal_year @@ -25,6 +26,10 @@ class BackDatedStockTransaction(frappe.ValidationError): pass +class InventoryDimensionNegativeStockError(frappe.ValidationError): + pass + + exclude_from_linked_with = True @@ -104,61 +109,56 @@ class StockLedgerEntry(Document): self.posting_datetime = get_combine_datetime(self.posting_date, self.posting_time) def validate_inventory_dimension_negative_stock(self): - if self.is_cancelled: + if self.is_cancelled or self.actual_qty >= 0: return - extra_cond = "" - kwargs = {} - dimensions = self._get_inventory_dimensions() if not dimensions: return - for dimension, values in dimensions.items(): - kwargs[dimension] = values.get("value") - extra_cond += f" and {dimension} = %({dimension})s" - - kwargs.update( - { - "item_code": self.item_code, - "warehouse": self.warehouse, - "posting_date": self.posting_date, - "posting_time": self.posting_time, - "company": self.company, - "sle": self.name, - } - ) - - sle = get_previous_sle(kwargs, extra_cond=extra_cond) - qty_after_transaction = 0.0 flt_precision = cint(frappe.db.get_default("float_precision")) or 2 - if sle: - qty_after_transaction = sle.qty_after_transaction + for dimension, values in dimensions.items(): + dimension_value = values.get("value") + available_qty = self.get_available_qty_after_prev_transaction(dimension, dimension_value) - diff = qty_after_transaction + flt(self.actual_qty) - diff = flt(diff, flt_precision) - if diff < 0 and abs(diff) > 0.0001: - self.throw_validation_error(diff, dimensions) + diff = flt(available_qty + flt(self.actual_qty), flt_precision) # qty after current transaction + if diff < 0 and abs(diff) > 0.0001: + self.throw_validation_error(diff, dimension, dimension_value) - def throw_validation_error(self, diff, dimensions): - dimension_msg = _(", with the inventory {0}: {1}").format( - "dimensions" if len(dimensions) > 1 else "dimension", - ", ".join(f"{bold(d.doctype)} ({d.value})" for k, d in dimensions.items()), - ) + def get_available_qty_after_prev_transaction(self, dimension, dimension_value): + sle = frappe.qb.DocType("Stock Ledger Entry") + available_qty = ( + frappe.qb.from_(sle) + .select(Sum(sle.actual_qty)) + .where( + (sle.item_code == self.item_code) + & (sle.warehouse == self.warehouse) + & (sle.posting_datetime < self.posting_datetime) + & (sle.company == self.company) + & (sle.is_cancelled == 0) + & (sle[dimension] == dimension_value) + ) + ).run() + return available_qty[0][0] or 0 + + def throw_validation_error(self, diff, dimension, dimension_value): msg = _( - "{0} units of {1} are required in {2}{3}, on {4} {5} for {6} to complete the transaction." + "{0} units of {1} are required in {2} with the inventory dimension: {3} ({4}) on {5} {6} for {7} to complete the transaction." ).format( abs(diff), frappe.get_desk_link("Item", self.item_code), frappe.get_desk_link("Warehouse", self.warehouse), - dimension_msg, + frappe.bold(dimension), + frappe.bold(dimension_value), self.posting_date, self.posting_time, frappe.get_desk_link(self.voucher_type, self.voucher_no), ) - frappe.throw(msg, title=_("Inventory Dimension Negative Stock")) + frappe.throw( + msg, title=_("Inventory Dimension Negative Stock"), exc=InventoryDimensionNegativeStockError + ) def _get_inventory_dimensions(self): inv_dimensions = get_inventory_dimensions() From 762f3bac65f05d66a1f2a09d1805686128221d6f Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 11 Nov 2024 15:59:40 +0530 Subject: [PATCH 0446/1614] chore: filter report output on document name --- erpnext/accounts/report/sales_register/test_sales_register.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/report/sales_register/test_sales_register.py b/erpnext/accounts/report/sales_register/test_sales_register.py index 693c33c0ca6..95aa5add24c 100644 --- a/erpnext/accounts/report/sales_register/test_sales_register.py +++ b/erpnext/accounts/report/sales_register/test_sales_register.py @@ -59,7 +59,7 @@ class TestItemWiseSalesRegister(AccountsTestMixin, FrappeTestCase): filters = frappe._dict({"from_date": today(), "to_date": today(), "company": self.company}) report = execute(filters) - self.assertEqual(len(report[1]), 1) + res = [x for x in report[1] if x.get("voucher_no") == si.name] expected_result = { "voucher_type": si.doctype, @@ -72,7 +72,7 @@ class TestItemWiseSalesRegister(AccountsTestMixin, FrappeTestCase): "debit": 98.0, } - report_output = {k: v for k, v in report[1][0].items() if k in expected_result} + report_output = {k: v for k, v in res[0].items() if k in expected_result} self.assertDictEqual(report_output, expected_result) def test_journal_with_cost_center_filter(self): From ba6e068abc2a158de251525758032ba18f7ae0d9 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Fri, 8 Nov 2024 17:16:52 +0530 Subject: [PATCH 0447/1614] refactor(test): update tests for new rounding logic --- .../doctype/pos_invoice/test_pos_invoice.py | 2 +- .../test_pos_invoice_merge_log.py | 2 +- .../sales_invoice/test_sales_invoice.py | 65 +++++++++++-------- 3 files changed, 39 insertions(+), 30 deletions(-) diff --git a/erpnext/accounts/doctype/pos_invoice/test_pos_invoice.py b/erpnext/accounts/doctype/pos_invoice/test_pos_invoice.py index f210a6434cf..1dbc630e62e 100644 --- a/erpnext/accounts/doctype/pos_invoice/test_pos_invoice.py +++ b/erpnext/accounts/doctype/pos_invoice/test_pos_invoice.py @@ -93,7 +93,7 @@ class TestPOSInvoice(unittest.TestCase): inv.save() - self.assertEqual(inv.net_total, 4298.25) + self.assertEqual(inv.net_total, 4298.24) self.assertEqual(inv.grand_total, 4900.00) def test_tax_calculation_with_multiple_items(self): diff --git a/erpnext/accounts/doctype/pos_invoice_merge_log/test_pos_invoice_merge_log.py b/erpnext/accounts/doctype/pos_invoice_merge_log/test_pos_invoice_merge_log.py index 20f6ddb5ba9..904d8e83b9c 100644 --- a/erpnext/accounts/doctype/pos_invoice_merge_log/test_pos_invoice_merge_log.py +++ b/erpnext/accounts/doctype/pos_invoice_merge_log/test_pos_invoice_merge_log.py @@ -343,7 +343,7 @@ class TestPOSInvoiceMergeLog(unittest.TestCase): inv.load_from_db() consolidated_invoice = frappe.get_doc("Sales Invoice", inv.consolidated_invoice) self.assertEqual(consolidated_invoice.status, "Return") - self.assertEqual(consolidated_invoice.rounding_adjustment, -0.001) + self.assertEqual(consolidated_invoice.rounding_adjustment, -0.002) finally: frappe.set_user("Administrator") diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py index db6fd41e439..56f90ae8cd4 100644 --- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py @@ -314,7 +314,8 @@ class TestSalesInvoice(FrappeTestCase): si.insert() # with inclusive tax - self.assertEqual(si.items[0].net_amount, 3947.368421052631) + self.assertEqual(si.items[0].net_amount, 3947.37) + self.assertEqual(si.net_total, si.base_net_total) self.assertEqual(si.net_total, 3947.37) self.assertEqual(si.grand_total, 5000) @@ -658,7 +659,7 @@ class TestSalesInvoice(FrappeTestCase): 62.5, 625.0, 50, - 499.97600115194473, + 499.98, ], "_Test Item Home Desktop 200": [ 190.66, @@ -669,7 +670,7 @@ class TestSalesInvoice(FrappeTestCase): 190.66, 953.3, 150, - 749.9968530500239, + 750, ], } @@ -682,20 +683,21 @@ class TestSalesInvoice(FrappeTestCase): self.assertEqual(d.get(k), expected_values[d.item_code][i]) # check net total - self.assertEqual(si.net_total, 1249.97) + self.assertEqual(si.base_net_total, si.net_total) + self.assertEqual(si.net_total, 1249.98) self.assertEqual(si.total, 1578.3) # check tax calculation expected_values = { "keys": ["tax_amount", "total"], - "_Test Account Excise Duty - _TC": [140, 1389.97], - "_Test Account Education Cess - _TC": [2.8, 1392.77], - "_Test Account S&H Education Cess - _TC": [1.4, 1394.17], - "_Test Account CST - _TC": [27.88, 1422.05], - "_Test Account VAT - _TC": [156.25, 1578.30], - "_Test Account Customs Duty - _TC": [125, 1703.30], - "_Test Account Shipping Charges - _TC": [100, 1803.30], - "_Test Account Discount - _TC": [-180.33, 1622.97], + "_Test Account Excise Duty - _TC": [140, 1389.98], + "_Test Account Education Cess - _TC": [2.8, 1392.78], + "_Test Account S&H Education Cess - _TC": [1.4, 1394.18], + "_Test Account CST - _TC": [27.88, 1422.06], + "_Test Account VAT - _TC": [156.25, 1578.31], + "_Test Account Customs Duty - _TC": [125, 1703.31], + "_Test Account Shipping Charges - _TC": [100, 1803.31], + "_Test Account Discount - _TC": [-180.33, 1622.98], } for d in si.get("taxes"): @@ -731,7 +733,7 @@ class TestSalesInvoice(FrappeTestCase): "base_rate": 2500, "base_amount": 25000, "net_rate": 40, - "net_amount": 399.9808009215558, + "net_amount": 399.98, "base_net_rate": 2000, "base_net_amount": 19999, }, @@ -745,7 +747,7 @@ class TestSalesInvoice(FrappeTestCase): "base_rate": 7500, "base_amount": 37500, "net_rate": 118.01, - "net_amount": 590.0531205155963, + "net_amount": 590.05, "base_net_rate": 5900.5, "base_net_amount": 29502.5, }, @@ -783,8 +785,13 @@ class TestSalesInvoice(FrappeTestCase): self.assertEqual(si.base_grand_total, 60795) self.assertEqual(si.grand_total, 1215.90) - self.assertEqual(si.rounding_adjustment, 0.01) - self.assertEqual(si.base_rounding_adjustment, 0.50) + # no rounding adjustment as the Smallest Currency Fraction Value of USD is 0.01 + if frappe.db.get_value("Currency", "USD", "smallest_currency_fraction_value") < 0.01: + self.assertEqual(si.rounding_adjustment, 0.10) + self.assertEqual(si.base_rounding_adjustment, 5.0) + else: + self.assertEqual(si.rounding_adjustment, 0.0) + self.assertEqual(si.base_rounding_adjustment, 0.0) def test_outstanding(self): w = self.make() @@ -2172,7 +2179,7 @@ class TestSalesInvoice(FrappeTestCase): def test_rounding_adjustment_2(self): si = create_sales_invoice(rate=400, do_not_save=True) - for rate in [400, 600, 100]: + for rate in [400.25, 600.30, 100.65]: si.append( "items", { @@ -2198,18 +2205,19 @@ class TestSalesInvoice(FrappeTestCase): ) si.save() si.submit() - self.assertEqual(si.net_total, 1271.19) - self.assertEqual(si.grand_total, 1500) - self.assertEqual(si.total_taxes_and_charges, 228.82) - self.assertEqual(si.rounding_adjustment, -0.01) + self.assertEqual(si.net_total, si.base_net_total) + self.assertEqual(si.net_total, 1272.20) + self.assertEqual(si.grand_total, 1501.20) + self.assertEqual(si.total_taxes_and_charges, 229) + self.assertEqual(si.rounding_adjustment, -0.20) round_off_account = frappe.get_cached_value("Company", "_Test Company", "round_off_account") expected_values = { - "_Test Account Service Tax - _TC": [0.0, 114.41], - "_Test Account VAT - _TC": [0.0, 114.41], - si.debit_to: [1500, 0.0], - round_off_account: [0.01, 0.01], - "Sales - _TC": [0.0, 1271.18], + "_Test Account Service Tax - _TC": [0.0, 114.50], + "_Test Account VAT - _TC": [0.0, 114.50], + si.debit_to: [1501, 0.0], + round_off_account: [0.20, 0.0], + "Sales - _TC": [0.0, 1272.20], } gl_entries = frappe.db.sql( @@ -2267,7 +2275,8 @@ class TestSalesInvoice(FrappeTestCase): si.save() si.submit() - self.assertEqual(si.net_total, 4007.16) + self.assertEqual(si.net_total, si.base_net_total) + self.assertEqual(si.net_total, 4007.15) self.assertEqual(si.grand_total, 4488.02) self.assertEqual(si.total_taxes_and_charges, 480.86) self.assertEqual(si.rounding_adjustment, -0.02) @@ -2280,7 +2289,7 @@ class TestSalesInvoice(FrappeTestCase): ["_Test Account Service Tax - _TC", 0.0, 240.43], ["_Test Account VAT - _TC", 0.0, 240.43], ["Sales - _TC", 0.0, 4007.15], - [round_off_account, 0.02, 0.01], + [round_off_account, 0.01, 0.0], ] ) From 3423d3c13d3da909cdb1e165d04107b9bccee5d6 Mon Sep 17 00:00:00 2001 From: Kavin <78342682+kavin0411@users.noreply.github.com> Date: Mon, 11 Nov 2024 11:56:56 +0530 Subject: [PATCH 0448/1614] fix: bind this object explicitly on callback event function (cherry picked from commit 5e790a0fcea2e1e2f714aa8e312e9b9870b646e3) --- erpnext/accounts/doctype/pos_invoice/pos_invoice.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/pos_invoice/pos_invoice.js b/erpnext/accounts/doctype/pos_invoice/pos_invoice.js index deb8bd7529d..6a537a2559a 100644 --- a/erpnext/accounts/doctype/pos_invoice/pos_invoice.js +++ b/erpnext/accounts/doctype/pos_invoice/pos_invoice.js @@ -65,7 +65,7 @@ erpnext.selling.POSInvoiceController = class POSInvoiceController extends erpnex super.refresh(); if (doc.docstatus == 1 && !doc.is_return) { - this.frm.add_custom_button(__("Return"), this.make_sales_return, __("Create")); + this.frm.add_custom_button(__("Return"), this.make_sales_return.bind(this), __("Create")); this.frm.page.set_inner_btn_group_as_primary(__("Create")); } From 61559be8a46f410370c199140fbf261a559ce17e Mon Sep 17 00:00:00 2001 From: Kavin <78342682+kavin0411@users.noreply.github.com> Date: Mon, 11 Nov 2024 11:21:48 +0530 Subject: [PATCH 0449/1614] fix: update payment amount for partial pos return (cherry picked from commit 53ef6336b62fab0dedc19b74dc1e5c293bf933c3) --- erpnext/public/js/controllers/taxes_and_totals.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/erpnext/public/js/controllers/taxes_and_totals.js b/erpnext/public/js/controllers/taxes_and_totals.js index 8b2d7943772..ee78e493db6 100644 --- a/erpnext/public/js/controllers/taxes_and_totals.js +++ b/erpnext/public/js/controllers/taxes_and_totals.js @@ -844,13 +844,13 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments { ); } - if(!this.frm.doc.is_return){ - this.frm.doc.payments.find(payment => { - if (payment.default) { - payment.amount = total_amount_to_pay; - } - }); - } + this.frm.doc.payments.find(payment => { + if (payment.default) { + payment.amount = total_amount_to_pay; + } else { + payment.amount = 0 + } + }); this.frm.refresh_fields(); } From 2754793ff9d5164b97607f4a977bda8a67313c61 Mon Sep 17 00:00:00 2001 From: Bhavan23 Date: Sat, 9 Nov 2024 19:54:50 +0530 Subject: [PATCH 0450/1614] feat: Add item group filtering for search results (cherry picked from commit 5e7cf3899bb6d841f4e96f12e8aa08db120b8ab0) --- .../selling/page/point_of_sale/point_of_sale.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/erpnext/selling/page/point_of_sale/point_of_sale.py b/erpnext/selling/page/point_of_sale/point_of_sale.py index fad184d152c..13430b0523d 100644 --- a/erpnext/selling/page/point_of_sale/point_of_sale.py +++ b/erpnext/selling/page/point_of_sale/point_of_sale.py @@ -92,6 +92,20 @@ def search_by_term(search_term, warehouse, price_list): return {"items": [item]} +def filter_result_items(result, pos_profile): + if result and result.get("items"): + pos_item_groups = frappe.db.get_all("POS Item Group", {"parent": pos_profile}, pluck="item_group") + for i, item in enumerate(result.get("items")): + item_group = frappe.db.get_value( + "Item Group", frappe.db.get_value("Item", item.get("item_code"), "item_group"), "name" + ) + if item_group in pos_item_groups: + continue + else: + if result.get("items"): + result.get("items").pop(i) + + @frappe.whitelist() def get_items(start, page_length, price_list, item_group, pos_profile, search_term=""): warehouse, hide_unavailable_items = frappe.db.get_value( @@ -102,6 +116,7 @@ def get_items(start, page_length, price_list, item_group, pos_profile, search_te if search_term: result = search_by_term(search_term, warehouse, price_list) or [] + filter_result_items(result, pos_profile) if result: return result From aca157704058337ef5d09bccc0e4eafd23086c42 Mon Sep 17 00:00:00 2001 From: Bhavan23 Date: Sat, 9 Nov 2024 19:55:50 +0530 Subject: [PATCH 0451/1614] refactor: Relocate doc variable for better scope management (cherry picked from commit 488b60fc278bd0093056df8ac0b699bd43b139db) --- erpnext/selling/page/point_of_sale/pos_item_selector.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/selling/page/point_of_sale/pos_item_selector.js b/erpnext/selling/page/point_of_sale/pos_item_selector.js index 862dfd54e5c..207a444218b 100644 --- a/erpnext/selling/page/point_of_sale/pos_item_selector.js +++ b/erpnext/selling/page/point_of_sale/pos_item_selector.js @@ -138,7 +138,6 @@ erpnext.PointOfSale.ItemSelector = class { make_search_bar() { const me = this; - const doc = me.events.get_frm().doc; this.$component.find(".search-field").html(""); this.$component.find(".item-group-field").html(""); @@ -163,6 +162,7 @@ erpnext.PointOfSale.ItemSelector = class { me.filter_items(); }, get_query: function () { + const doc = me.events.get_frm().doc; return { query: "erpnext.selling.page.point_of_sale.point_of_sale.item_group_query", filters: { From 55f7f63e6e12151d6ca383b6b2a5104282e32cfe Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 12 Nov 2024 11:39:30 +0530 Subject: [PATCH 0452/1614] refactor: simpler filtering (cherry picked from commit f072b1266e298b4717443a4b1ae6b17498bb7303) --- erpnext/selling/page/point_of_sale/point_of_sale.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/erpnext/selling/page/point_of_sale/point_of_sale.py b/erpnext/selling/page/point_of_sale/point_of_sale.py index 13430b0523d..28eadec9bc5 100644 --- a/erpnext/selling/page/point_of_sale/point_of_sale.py +++ b/erpnext/selling/page/point_of_sale/point_of_sale.py @@ -35,6 +35,7 @@ def search_by_term(search_term, warehouse, price_list): "description": item_doc.description, "is_stock_item": item_doc.is_stock_item, "item_code": item_doc.name, + "item_group": item_doc.item_group, "item_image": item_doc.image, "item_name": item_doc.item_name, "serial_no": serial_no, @@ -95,15 +96,7 @@ def search_by_term(search_term, warehouse, price_list): def filter_result_items(result, pos_profile): if result and result.get("items"): pos_item_groups = frappe.db.get_all("POS Item Group", {"parent": pos_profile}, pluck="item_group") - for i, item in enumerate(result.get("items")): - item_group = frappe.db.get_value( - "Item Group", frappe.db.get_value("Item", item.get("item_code"), "item_group"), "name" - ) - if item_group in pos_item_groups: - continue - else: - if result.get("items"): - result.get("items").pop(i) + result["items"] = [item for item in result.get("items") if item.get("item_group") in pos_item_groups] @frappe.whitelist() From e3d74684d53218d383f2338415f4493fa2a34263 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Tue, 12 Nov 2024 15:43:20 +0530 Subject: [PATCH 0453/1614] fix: purchase receipt creation from SCR (#44095) (cherry picked from commit 774845f886881592e80089161b658c70b352bd32) --- .../subcontracting_receipt/subcontracting_receipt.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.py b/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.py index a99f7ea1615..37cd43ac1f6 100644 --- a/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.py +++ b/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.py @@ -766,7 +766,11 @@ def make_purchase_receipt(source_name, target_doc=None, save=False, submit=False "postprocess": update_item, "condition": lambda doc: doc.name in po_sr_item_dict, }, - "Purchase Taxes and Charges": {"doctype": "Purchase Taxes and Charges", "reset_value": True}, + "Purchase Taxes and Charges": { + "doctype": "Purchase Taxes and Charges", + "reset_value": True, + "condition": lambda doc: not doc.is_tax_withholding_account, + }, }, postprocess=post_process, ) From 4ba07a40eb45f6d75c1d6e0775104b998f6cf537 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Tue, 12 Nov 2024 15:48:28 +0530 Subject: [PATCH 0454/1614] fix: not able to reconcile expired batches (#44012) (cherry picked from commit 8805e74784ee423c7e279138c1f0486ce6e0766e) --- erpnext/controllers/queries.py | 10 ++++++++-- erpnext/public/js/utils/serial_no_batch_selector.js | 11 +++++++++++ .../serial_and_batch_bundle.py | 3 +++ erpnext/stock/doctype/stock_entry/stock_entry.js | 4 ++++ .../stock_reconciliation/stock_reconciliation.py | 12 +++++++++++- erpnext/stock/serial_batch_bundle.py | 4 ++-- erpnext/stock/stock_ledger.py | 1 + 7 files changed, 40 insertions(+), 5 deletions(-) diff --git a/erpnext/controllers/queries.py b/erpnext/controllers/queries.py index 919bbb477f4..463cb859970 100644 --- a/erpnext/controllers/queries.py +++ b/erpnext/controllers/queries.py @@ -415,7 +415,6 @@ def get_batches_from_stock_ledger_entries(searchfields, txt, filters, start=0, p stock_ledger_entry.batch_no, Sum(stock_ledger_entry.actual_qty).as_("qty"), ) - .where((batch_table.expiry_date >= expiry_date) | (batch_table.expiry_date.isnull())) .where(stock_ledger_entry.is_cancelled == 0) .where( (stock_ledger_entry.item_code == filters.get("item_code")) @@ -428,6 +427,9 @@ def get_batches_from_stock_ledger_entries(searchfields, txt, filters, start=0, p .limit(page_len) ) + if not filters.get("include_expired_batches"): + query = query.where((batch_table.expiry_date >= expiry_date) | (batch_table.expiry_date.isnull())) + query = query.select( Concat("MFG-", batch_table.manufacturing_date).as_("manufacturing_date"), Concat("EXP-", batch_table.expiry_date).as_("expiry_date"), @@ -466,7 +468,6 @@ def get_batches_from_serial_and_batch_bundle(searchfields, txt, filters, start=0 bundle.batch_no, Sum(bundle.qty).as_("qty"), ) - .where((batch_table.expiry_date >= expiry_date) | (batch_table.expiry_date.isnull())) .where(stock_ledger_entry.is_cancelled == 0) .where( (stock_ledger_entry.item_code == filters.get("item_code")) @@ -479,6 +480,11 @@ def get_batches_from_serial_and_batch_bundle(searchfields, txt, filters, start=0 .limit(page_len) ) + if not filters.get("include_expired_batches"): + bundle_query = bundle_query.where( + (batch_table.expiry_date >= expiry_date) | (batch_table.expiry_date.isnull()) + ) + bundle_query = bundle_query.select( Concat("MFG-", batch_table.manufacturing_date), Concat("EXP-", batch_table.expiry_date), diff --git a/erpnext/public/js/utils/serial_no_batch_selector.js b/erpnext/public/js/utils/serial_no_batch_selector.js index 61b40d6fef0..de1faf36ef5 100644 --- a/erpnext/public/js/utils/serial_no_batch_selector.js +++ b/erpnext/public/js/utils/serial_no_batch_selector.js @@ -462,6 +462,8 @@ erpnext.SerialBatchPackageSelector = class SerialNoBatchBundleUpdate { is_inward = true; } + let include_expired_batches = me.include_expired_batches(); + return { query: "erpnext.controllers.queries.get_batch_no", filters: { @@ -469,6 +471,7 @@ erpnext.SerialBatchPackageSelector = class SerialNoBatchBundleUpdate { warehouse: this.item.s_warehouse || this.item.t_warehouse || this.item.warehouse, is_inward: is_inward, + include_expired_batches: include_expired_batches, }, }; }, @@ -497,6 +500,14 @@ erpnext.SerialBatchPackageSelector = class SerialNoBatchBundleUpdate { return fields; } + include_expired_batches() { + return ( + this.frm.doc.doctype === "Stock Reconciliation" || + (this.frm.doc.doctype === "Stock Entry" && + ["Material Receipt", "Material Transfer", "Material Issue"].includes(this.frm.doc.purpose)) + ); + } + get_auto_data() { let { qty, based_on } = this.dialog.get_values(); 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 ed6d5e155d7..08aa978aa99 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 @@ -689,6 +689,9 @@ class SerialandBatchBundle(Document): serial_batches = {} for row in self.entries: if not row.qty and row.batch_no and not row.serial_no: + if self.voucher_type == "Stock Reconciliation" and self.type_of_transaction == "Inward": + continue + frappe.throw( _("At row {0}: Qty is mandatory for the batch {1}").format( bold(row.idx), bold(row.batch_no) diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.js b/erpnext/stock/doctype/stock_entry/stock_entry.js index ea47ffd79ea..0e39c2a9756 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.js +++ b/erpnext/stock/doctype/stock_entry/stock_entry.js @@ -117,6 +117,10 @@ frappe.ui.form.on("Stock Entry", { filters["is_inward"] = 1; } + if (["Material Receipt", "Material Transfer", "Material Issue"].includes(doc.purpose)) { + filters["include_expired_batches"] = 1; + } + return { query: "erpnext.controllers.queries.get_batch_no", filters: filters, diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py index 8ee3d9b3901..f671c11712a 100644 --- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py +++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py @@ -324,6 +324,7 @@ class StockReconciliation(StockController): row.item_code, posting_date=self.posting_date, posting_time=self.posting_time, + for_stock_levels=True, ) total_current_qty += current_qty @@ -1322,7 +1323,16 @@ def get_stock_balance_for( qty, rate = data if item_dict.get("has_batch_no"): - qty = get_batch_qty(batch_no, warehouse, posting_date=posting_date, posting_time=posting_time) or 0 + qty = ( + get_batch_qty( + batch_no, + warehouse, + posting_date=posting_date, + posting_time=posting_time, + for_stock_levels=True, + ) + or 0 + ) return { "qty": qty, diff --git a/erpnext/stock/serial_batch_bundle.py b/erpnext/stock/serial_batch_bundle.py index c1002095b62..cb156aea119 100644 --- a/erpnext/stock/serial_batch_bundle.py +++ b/erpnext/stock/serial_batch_bundle.py @@ -124,7 +124,7 @@ class SerialBatchBundle: "Outward": self.sle.actual_qty < 0, }.get(sn_doc.type_of_transaction) - if not condition: + if not condition and self.sle.actual_qty: correct_type = "Inward" if sn_doc.type_of_transaction == "Inward": correct_type = "Outward" @@ -133,7 +133,7 @@ class SerialBatchBundle: frappe.throw(_(msg), title=_("Incorrect Type of Transaction")) precision = sn_doc.precision("total_qty") - if flt(sn_doc.total_qty, precision) != flt(self.sle.actual_qty, precision): + if self.sle.actual_qty and flt(sn_doc.total_qty, precision) != flt(self.sle.actual_qty, precision): msg = f"Total qty {flt(sn_doc.total_qty, precision)} of Serial and Batch Bundle {link} is not equal to Actual Qty {flt(self.sle.actual_qty, precision)} in the {self.sle.voucher_type} {self.sle.voucher_no}" frappe.throw(_(msg)) diff --git a/erpnext/stock/stock_ledger.py b/erpnext/stock/stock_ledger.py index ccf7c7643c8..26e7af150b9 100644 --- a/erpnext/stock/stock_ledger.py +++ b/erpnext/stock/stock_ledger.py @@ -1183,6 +1183,7 @@ class update_entries_after: stock_entry.calculate_rate_and_amount(reset_outgoing_rate=False, raise_error_if_no_rate=False) stock_entry.db_update() for d in stock_entry.items: + # Update only the row that matches the voucher_detail_no or the row containing the FG/Scrap Item. if d.name == voucher_detail_no or (not d.s_warehouse and d.t_warehouse): d.db_update() From 290bddea7777d73a3a31c18a255be8d8a39f3793 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 12 Nov 2024 18:12:13 +0530 Subject: [PATCH 0455/1614] fix: not able to cancel DN (backport #44108) (#44109) fix: not able to cancel DN (#44108) (cherry picked from commit e8882718c9d99db01f3dbc16c477c4e295b9becb) Co-authored-by: rohitwaghchaure --- erpnext/stock/serial_batch_bundle.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/erpnext/stock/serial_batch_bundle.py b/erpnext/stock/serial_batch_bundle.py index cb156aea119..3fed0195d69 100644 --- a/erpnext/stock/serial_batch_bundle.py +++ b/erpnext/stock/serial_batch_bundle.py @@ -288,7 +288,7 @@ class SerialBatchBundle: "Serial and Batch Bundle", self.sle.serial_and_batch_bundle, "docstatus" ) - if docstatus != 1: + if docstatus == 0: self.submit_serial_and_batch_bundle() if self.item_details.has_serial_no == 1: @@ -311,7 +311,9 @@ class SerialBatchBundle: if self.is_pos_transaction(): return - frappe.get_cached_doc("Serial and Batch Bundle", self.sle.serial_and_batch_bundle).cancel() + doc = frappe.get_cached_doc("Serial and Batch Bundle", self.sle.serial_and_batch_bundle) + if doc.docstatus == 1: + doc.cancel() def is_pos_transaction(self): if ( From 6e83fec5ca5286bd36b150e1b5660d0e71c3d270 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 12 Nov 2024 23:22:18 +0530 Subject: [PATCH 0456/1614] fix: consider service item cost in the RM cost of the BOM (backport #43962) (#44111) fix: consider service item cost in the RM cost of the BOM (#43962) (cherry picked from commit c0ffaa444cc870f1751468cdad8928515bbf26d6) Co-authored-by: rohitwaghchaure --- erpnext/manufacturing/doctype/bom/bom.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py index 843528de706..c3105b8e9ec 100644 --- a/erpnext/manufacturing/doctype/bom/bom.py +++ b/erpnext/manufacturing/doctype/bom/bom.py @@ -742,11 +742,8 @@ class BOM(WebsiteGenerator): base_total_rm_cost = 0 for d in self.get("items"): - if not d.is_stock_item and self.rm_cost_as_per == "Valuation Rate": - continue - old_rate = d.rate - if not self.bom_creator: + if not self.bom_creator and d.is_stock_item: d.rate = self.get_rm_rate( { "company": self.company, From a833dd67f35d12ea60ff5103eea89c5156975cea Mon Sep 17 00:00:00 2001 From: NaviN <118178330+Navin-S-R@users.noreply.github.com> Date: Wed, 13 Nov 2024 12:23:16 +0530 Subject: [PATCH 0457/1614] fix: update per_billed value in Purchase Receipt while creating Debit Note (#43977) * fix: update per_billed value in Purchase Receipt while creating Debit Note * test: add unit test for validating per_billed value for partial Debit Note (cherry picked from commit 494fd7ceeab3edd56f7f4975101a611e9e8ad391) --- .../purchase_receipt/purchase_receipt.py | 11 ++++- .../purchase_receipt/test_purchase_receipt.py | 48 +++++++++++++++++++ 2 files changed, 57 insertions(+), 2 deletions(-) diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py index 228bc35693b..efe1628d8e0 100644 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py @@ -1059,6 +1059,8 @@ def get_billed_amount_against_po(po_items): def update_billing_percentage(pr_doc, update_modified=True, adjust_incoming_rate=False): # Update Billing % based on pending accepted qty + buying_settings = frappe.get_single("Buying Settings") + total_amount, total_billed_amount = 0, 0 item_wise_returned_qty = get_item_wise_returned_qty(pr_doc) @@ -1066,10 +1068,15 @@ def update_billing_percentage(pr_doc, update_modified=True, adjust_incoming_rate returned_qty = flt(item_wise_returned_qty.get(item.name)) returned_amount = flt(returned_qty) * flt(item.rate) pending_amount = flt(item.amount) - returned_amount - total_billable_amount = pending_amount if item.billed_amt <= pending_amount else item.billed_amt + if buying_settings.bill_for_rejected_quantity_in_purchase_invoice: + pending_amount = flt(item.amount) + + total_billable_amount = abs(flt(item.amount)) + if pending_amount > 0: + total_billable_amount = pending_amount if item.billed_amt <= pending_amount else item.billed_amt total_amount += total_billable_amount - total_billed_amount += flt(item.billed_amt) + total_billed_amount += abs(flt(item.billed_amt)) if pr_doc.get("is_return") and not total_amount and total_billed_amount: total_amount = total_billed_amount diff --git a/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py index 64c3d2c67b2..4b8d5101f43 100644 --- a/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py +++ b/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py @@ -3900,6 +3900,54 @@ class TestPurchaseReceipt(FrappeTestCase): for incoming_rate in bundle_data: self.assertEqual(incoming_rate, 0) + def test_purchase_return_partial_debit_note(self): + pr = make_purchase_receipt( + company="_Test Company with perpetual inventory", + warehouse="Stores - TCP1", + supplier_warehouse="Work In Progress - TCP1", + ) + + return_pr = make_purchase_receipt( + company="_Test Company with perpetual inventory", + warehouse="Stores - TCP1", + supplier_warehouse="Work In Progress - TCP1", + is_return=1, + return_against=pr.name, + qty=-2, + do_not_submit=1, + ) + return_pr.items[0].purchase_receipt_item = pr.items[0].name + return_pr.submit() + + # because new_doc isn't considering is_return portion of status_updater + returned = frappe.get_doc("Purchase Receipt", return_pr.name) + returned.update_prevdoc_status() + pr.load_from_db() + + # Check if Original PR updated + self.assertEqual(pr.items[0].returned_qty, 2) + self.assertEqual(pr.per_returned, 40) + + # Create first partial debit_note + pi_1 = make_purchase_invoice(return_pr.name) + pi_1.items[0].qty = -1 + pi_1.submit() + + # Check if the first partial debit billing percentage got updated + return_pr.reload() + self.assertEqual(return_pr.per_billed, 50) + self.assertEqual(return_pr.status, "Partly Billed") + + # Create second partial debit_note to complete the debit note + pi_2 = make_purchase_invoice(return_pr.name) + pi_2.items[0].qty = -1 + pi_2.submit() + + # Check if the second partial debit note billing percentage got updated + return_pr.reload() + self.assertEqual(return_pr.per_billed, 100) + self.assertEqual(return_pr.status, "Completed") + def prepare_data_for_internal_transfer(): from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_internal_supplier From bce7acf9ccae317eafe2be77dc06440e3c44edd9 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 13 Nov 2024 12:31:31 +0530 Subject: [PATCH 0458/1614] fix: incorrect produced qty in Production Plan Summary (backport #44112) (#44113) fix: incorrect produced qty in Production Plan Summary (#44112) (cherry picked from commit 0828c74fe39fa4b77a48a7139fa9c07121cfa2d8) Co-authored-by: rohitwaghchaure --- .../production_plan/production_plan.js | 20 ++++---- .../production_plan_summary.py | 51 +++++++++++++------ 2 files changed, 45 insertions(+), 26 deletions(-) diff --git a/erpnext/manufacturing/doctype/production_plan/production_plan.js b/erpnext/manufacturing/doctype/production_plan/production_plan.js index aba213ebca4..e7ac7f7cc83 100644 --- a/erpnext/manufacturing/doctype/production_plan/production_plan.js +++ b/erpnext/manufacturing/doctype/production_plan/production_plan.js @@ -87,17 +87,17 @@ frappe.ui.form.on("Production Plan", { if (frm.doc.docstatus === 1) { frm.trigger("show_progress"); - if (frm.doc.status !== "Completed") { - frm.add_custom_button( - __("Production Plan Summary"), - () => { - frappe.set_route("query-report", "Production Plan Summary", { - production_plan: frm.doc.name, - }); - }, - __("View") - ); + frm.add_custom_button( + __("Production Plan Summary"), + () => { + frappe.set_route("query-report", "Production Plan Summary", { + production_plan: frm.doc.name, + }); + }, + __("View") + ); + if (frm.doc.status !== "Completed") { if (frm.doc.status === "Closed") { frm.add_custom_button( __("Re-open"), diff --git a/erpnext/manufacturing/report/production_plan_summary/production_plan_summary.py b/erpnext/manufacturing/report/production_plan_summary/production_plan_summary.py index 5bc9236c1d5..c62cab77d61 100644 --- a/erpnext/manufacturing/report/production_plan_summary/production_plan_summary.py +++ b/erpnext/manufacturing/report/production_plan_summary/production_plan_summary.py @@ -27,32 +27,51 @@ def get_data(filters): def get_production_plan_item_details(filters, data, order_details): - itemwise_indent = {} - production_plan_doc = frappe.get_cached_doc("Production Plan", filters.get("production_plan")) for row in production_plan_doc.po_items: - work_order = frappe.get_value( + work_orders = frappe.get_all( "Work Order", - {"production_plan_item": row.name, "bom_no": row.bom_no, "production_item": row.item_code}, - "name", + filters={ + "production_plan_item": row.name, + "bom_no": row.bom_no, + "production_item": row.item_code, + }, + pluck="name", ) - if row.item_code not in itemwise_indent: - itemwise_indent.setdefault(row.item_code, {}) + order_qty = row.planned_qty + total_produced_qty = 0.0 + pending_qty = 0.0 + for work_order in work_orders: + produced_qty = flt(order_details.get((work_order, row.item_code), {}).get("produced_qty", 0)) + pending_qty = flt(order_qty) - produced_qty + + total_produced_qty += produced_qty + + data.append( + { + "indent": 0, + "item_code": row.item_code, + "sales_order": row.get("sales_order"), + "item_name": frappe.get_cached_value("Item", row.item_code, "item_name"), + "qty": order_qty, + "document_type": "Work Order", + "document_name": work_order or "", + "bom_level": 0, + "produced_qty": produced_qty, + "pending_qty": pending_qty, + } + ) + + order_qty = pending_qty data.append( { - "indent": 0, "item_code": row.item_code, - "sales_order": row.get("sales_order"), - "item_name": frappe.get_cached_value("Item", row.item_code, "item_name"), + "indent": 0, "qty": row.planned_qty, - "document_type": "Work Order", - "document_name": work_order or "", - "bom_level": 0, - "produced_qty": order_details.get((work_order, row.item_code), {}).get("produced_qty", 0), - "pending_qty": flt(row.planned_qty) - - flt(order_details.get((work_order, row.item_code), {}).get("produced_qty", 0)), + "produced_qty": total_produced_qty, + "pending_qty": pending_qty, } ) From 8af005cef0c84a572fdb1e35928de5c228db610b Mon Sep 17 00:00:00 2001 From: Nihantra Patel Date: Wed, 13 Nov 2024 14:55:45 +0530 Subject: [PATCH 0459/1614] fix: Drop Shipping address based on customer shopping address (cherry picked from commit c7499f35285182837570e3aaa1d6b274783d2204) --- erpnext/public/js/controllers/transaction.js | 11 ++++++++--- erpnext/selling/doctype/sales_order/sales_order.py | 14 +++++++++++--- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 07ba90cd6d1..0efec214c0d 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -956,9 +956,14 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe if (frappe.meta.get_docfield(this.frm.doctype, "shipping_address") && ['Purchase Order', 'Purchase Receipt', 'Purchase Invoice'].includes(this.frm.doctype)) { - erpnext.utils.get_shipping_address(this.frm, function() { - set_party_account(set_pricing); - }); + let is_drop_ship = me.frm.doc.items.some(item => item.delivered_by_supplier); + + if (!is_drop_ship) { + console.log('get_shipping_address'); + erpnext.utils.get_shipping_address(this.frm, function() { + set_party_account(set_pricing); + }); + } } else { set_party_account(set_pricing); diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py index 62262b41021..88528d7178f 100755 --- a/erpnext/selling/doctype/sales_order/sales_order.py +++ b/erpnext/selling/doctype/sales_order/sales_order.py @@ -1402,9 +1402,17 @@ def make_purchase_order(source_name, selected_items=None, target_doc=None): target.payment_schedule = [] if is_drop_ship_order(target): - target.customer = source.customer - target.customer_name = source.customer_name - target.shipping_address = source.shipping_address_name + if source.shipping_address_name: + target.shipping_address = source.shipping_address_name + target.shipping_address_display = source.shipping_address + else: + target.shipping_address = source.customer_address + target.shipping_address_display = source.address_display + + target.customer_contact_person = source.contact_person + target.customer_contact_display = source.contact_display + target.customer_contact_mobile = source.contact_mobile + target.customer_contact_email = source.contact_email else: target.customer = target.customer_name = target.shipping_address = None From c1983a48469dc3c961c4653e3e20191ee73dee2d Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 13 Nov 2024 16:24:12 +0530 Subject: [PATCH 0460/1614] fix: Cannot read properties of undefined (reading 'work_order_closed') (backport #44117) (#44122) fix: Cannot read properties of undefined (reading 'work_order_closed') (#44117) (cherry picked from commit 13834014b50e46e8d432215a1ddf7c8895c8dda5) Co-authored-by: rohitwaghchaure --- erpnext/manufacturing/doctype/job_card/job_card.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/job_card/job_card.js b/erpnext/manufacturing/doctype/job_card/job_card.js index 4cc60a3b4a6..ad514efa55f 100644 --- a/erpnext/manufacturing/doctype/job_card/job_card.js +++ b/erpnext/manufacturing/doctype/job_card/job_card.js @@ -37,7 +37,7 @@ frappe.ui.form.on("Job Card", { frappe.flags.resume_job = 0; let has_items = frm.doc.items && frm.doc.items.length; - if (!frm.is_new() && frm.doc.__onload.work_order_closed) { + if (!frm.is_new() && frm.doc.__onload?.work_order_closed) { frm.disable_save(); return; } From b9ec43c354accd98bad6f08393664747ca49781a Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Wed, 13 Nov 2024 16:56:08 +0530 Subject: [PATCH 0461/1614] refactor: 'Partly Billed' status for Purchase Receipt (cherry picked from commit c58bbd25f2813ac4392877602ca89247127e3623) --- erpnext/stock/doctype/purchase_receipt/purchase_receipt.json | 4 ++-- erpnext/stock/doctype/purchase_receipt/purchase_receipt.py | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json index 61a180caba4..643f9e7a82f 100755 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json @@ -889,7 +889,7 @@ "no_copy": 1, "oldfieldname": "status", "oldfieldtype": "Select", - "options": "\nDraft\nTo Bill\nCompleted\nReturn Issued\nCancelled\nClosed", + "options": "\nDraft\nPartly Billed\nTo Bill\nCompleted\nReturn Issued\nCancelled\nClosed", "print_hide": 1, "print_width": "150px", "read_only": 1, @@ -1273,7 +1273,7 @@ "idx": 261, "is_submittable": 1, "links": [], - "modified": "2024-07-04 14:50:10.538472", + "modified": "2024-11-13 16:55:14.129055", "modified_by": "Administrator", "module": "Stock", "name": "Purchase Receipt", diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py index 228bc35693b..523acf51c5b 100644 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py @@ -112,7 +112,9 @@ class PurchaseReceipt(BuyingController): shipping_address: DF.Link | None shipping_address_display: DF.SmallText | None shipping_rule: DF.Link | None - status: DF.Literal["", "Draft", "To Bill", "Completed", "Return Issued", "Cancelled", "Closed"] + status: DF.Literal[ + "", "Draft", "Partly Billed", "To Bill", "Completed", "Return Issued", "Cancelled", "Closed" + ] subcontracting_receipt: DF.Link | None supplied_items: DF.Table[PurchaseReceiptItemSupplied] supplier: DF.Link From 7c78e0025d37e081fe809459803b307492a477d2 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Wed, 13 Nov 2024 15:02:57 +0000 Subject: [PATCH 0462/1614] chore(release): Bumped to Version 15.42.0 # [15.42.0](https://github.com/frappe/erpnext/compare/v15.41.2...v15.42.0) (2024-11-13) ### Bug Fixes * add default height to POS item card selector (backport [#44071](https://github.com/frappe/erpnext/issues/44071)) ([#44075](https://github.com/frappe/erpnext/issues/44075)) ([65ec7c5](https://github.com/frappe/erpnext/commit/65ec7c56041612c17dce79def87ce31ee503f391)) * add field conversion_factor when include_uom is settled ([#43701](https://github.com/frappe/erpnext/issues/43701)) ([f387a8f](https://github.com/frappe/erpnext/commit/f387a8fcebbd5958e50a010b05c0c53d9d98328d)) * better gls for purchases with tax witholding ([#42743](https://github.com/frappe/erpnext/issues/42743)) ([705a26a](https://github.com/frappe/erpnext/commit/705a26a2fa5d1dc20c07dd4150771529c707e820)) * bind this object explicitly on callback event function ([3423d3c](https://github.com/frappe/erpnext/commit/3423d3c13d3da909cdb1e165d04107b9bccee5d6)) * calculate percentage received and delivered considering over-receipt and over-delivery (backport [#43870](https://github.com/frappe/erpnext/issues/43870)) ([#44030](https://github.com/frappe/erpnext/issues/44030)) ([5958d0c](https://github.com/frappe/erpnext/commit/5958d0c2570aa7ae3e0e86e1afdbef89758318f1)) * Cannot read properties of undefined (reading 'work_order_closed') (backport [#44117](https://github.com/frappe/erpnext/issues/44117)) ([#44122](https://github.com/frappe/erpnext/issues/44122)) ([c1983a4](https://github.com/frappe/erpnext/commit/c1983a48469dc3c961c4653e3e20191ee73dee2d)) * consider service item cost in the RM cost of the BOM (backport [#43962](https://github.com/frappe/erpnext/issues/43962)) ([#44111](https://github.com/frappe/erpnext/issues/44111)) ([6e83fec](https://github.com/frappe/erpnext/commit/6e83fec5ca5286bd36b150e1b5660d0e71c3d270)) * Drop Shipping address based on customer shopping address ([8af005c](https://github.com/frappe/erpnext/commit/8af005cef0c84a572fdb1e35928de5c228db610b)) * duplicate items and outdated item price in POS (backport [#42978](https://github.com/frappe/erpnext/issues/42978)) ([#44038](https://github.com/frappe/erpnext/issues/44038)) ([4cde77d](https://github.com/frappe/erpnext/commit/4cde77d8d8f4a6f833e4f28d7cd6f08ac0005474)) * exception on register reports when filtered on cost center ([be07421](https://github.com/frappe/erpnext/commit/be07421ab77b43681dffc7e038630b01ecc61984)) * improved the conditions for determining voucher subtypes ([58ca4a2](https://github.com/frappe/erpnext/commit/58ca4a2b99a694ea891e1b3cfd949f799edacafb)) * incorrect produced qty in Production Plan Summary (backport [#44112](https://github.com/frappe/erpnext/issues/44112)) ([#44113](https://github.com/frappe/erpnext/issues/44113)) ([bce7acf](https://github.com/frappe/erpnext/commit/bce7acf9ccae317eafe2be77dc06440e3c44edd9)) * item mapping from modal to batch form ([#44090](https://github.com/frappe/erpnext/issues/44090)) ([9ac54f6](https://github.com/frappe/erpnext/commit/9ac54f694c27323baca073f6d790497d1c056507)) * item not set in the batch quick entry form (backport [#44028](https://github.com/frappe/erpnext/issues/44028)) ([#44031](https://github.com/frappe/erpnext/issues/44031)) ([6dcd015](https://github.com/frappe/erpnext/commit/6dcd015a39be3d5985482f8899da7dc670c52576)) * Negative stock validation against inventory dimension (backport [#43834](https://github.com/frappe/erpnext/issues/43834)) ([#43846](https://github.com/frappe/erpnext/issues/43846)) ([b314f38](https://github.com/frappe/erpnext/commit/b314f3839bfd19f81eac6d712a343d837fd4cb0f)) * NoneType while updating ordered_qty in SO for removed items ([978a007](https://github.com/frappe/erpnext/commit/978a0078d8f2e93878b883643c94d327deb5fd06)) * not able to cancel DN (backport [#44108](https://github.com/frappe/erpnext/issues/44108)) ([#44109](https://github.com/frappe/erpnext/issues/44109)) ([290bdde](https://github.com/frappe/erpnext/commit/290bddea7777d73a3a31c18a255be8d8a39f3793)) * not able to reconcile expired batches ([#44012](https://github.com/frappe/erpnext/issues/44012)) ([4ba07a4](https://github.com/frappe/erpnext/commit/4ba07a40eb45f6d75c1d6e0775104b998f6cf537)) * patch ([107d53b](https://github.com/frappe/erpnext/commit/107d53b3582ccdac3f237745efba4eca5a14a328)) * populate payment schedule from payment terms (backport [#44082](https://github.com/frappe/erpnext/issues/44082)) ([#44083](https://github.com/frappe/erpnext/issues/44083)) ([363f151](https://github.com/frappe/erpnext/commit/363f15124eaa857d112b04ae7429b11360015215)) * purchase receipt creation from SCR ([#44095](https://github.com/frappe/erpnext/issues/44095)) ([e3d7468](https://github.com/frappe/erpnext/commit/e3d74684d53218d383f2338415f4493fa2a34263)) * slow reposting due to SABB update ([3e29ae8](https://github.com/frappe/erpnext/commit/3e29ae85345fc8c3ec0851987804f3886852097f)) * sort by ascending to get the first period closing voucher (backport [#44029](https://github.com/frappe/erpnext/issues/44029)) ([#44035](https://github.com/frappe/erpnext/issues/44035)) ([56f25ae](https://github.com/frappe/erpnext/commit/56f25ae0657e941f865fb3a224dea3767c8c3ecb)) * task path (backport [#44073](https://github.com/frappe/erpnext/issues/44073)) ([#44078](https://github.com/frappe/erpnext/issues/44078)) ([34b5639](https://github.com/frappe/erpnext/commit/34b5639d1c3a260f527ae02e2dc5ce05efd73e1c)) * tyeerror while saving pick list ([7d09832](https://github.com/frappe/erpnext/commit/7d098328d0bc6e74aca03e505f3c31d845c38d9b)) * update payment amount for partial pos return ([61559be](https://github.com/frappe/erpnext/commit/61559be8a46f410370c199140fbf261a559ce17e)) * update per_billed value in Purchase Receipt while creating Debit Note ([#43977](https://github.com/frappe/erpnext/issues/43977)) ([a833dd6](https://github.com/frappe/erpnext/commit/a833dd67f35d12ea60ff5103eea89c5156975cea)) * when company is created with other company template Chart of Account the Create Taxe Template failed ([#42755](https://github.com/frappe/erpnext/issues/42755)) ([e6894b9](https://github.com/frappe/erpnext/commit/e6894b949c9058ac0141d57dd4b6a5527c656f62)) ### Features * Add item group filtering for search results ([2754793](https://github.com/frappe/erpnext/commit/2754793ff9d5164b97607f4a977bda8a67313c61)) * add template taxe for charts of account France - Plan Comptable General avec code ([#42757](https://github.com/frappe/erpnext/issues/42757)) ([865786e](https://github.com/frappe/erpnext/commit/865786e0b67fb35d2423b4cf281dd76cdca3bd51)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 94615249d02..83fb70c9e8f 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.41.1" +__version__ = "15.42.0" def get_default_company(user=None): From cc07402b5e5f2acdb5d4626a38108799cdd09f68 Mon Sep 17 00:00:00 2001 From: Varun Verma Date: Mon, 14 Oct 2024 11:09:26 +0000 Subject: [PATCH 0463/1614] fix: bulk update invoice remarks during site upgrade fixes issue #43634 --- .../patches/v15_0/update_invoice_remarks.py | 164 ++++++++++++++---- 1 file changed, 131 insertions(+), 33 deletions(-) diff --git a/erpnext/patches/v15_0/update_invoice_remarks.py b/erpnext/patches/v15_0/update_invoice_remarks.py index 7060fe57e31..9146713815f 100644 --- a/erpnext/patches/v15_0/update_invoice_remarks.py +++ b/erpnext/patches/v15_0/update_invoice_remarks.py @@ -8,44 +8,142 @@ def execute(): def update_sales_invoice_remarks(): - si_list = frappe.db.get_all( - "Sales Invoice", - filters={ - "docstatus": 1, - "remarks": "No Remarks", - "po_no": ["!=", ""], - }, - fields=["name", "po_no"], - ) + """ + Update remarks in Sales Invoice. + Some sites may have very large volume of sales invoices. + In such cases, updating documents one by one won't be successful, especially during site migration step. + Refer to the bug report: https://github.com/frappe/erpnext/issues/43634 + In this case, a bulk update must be done. - for doc in si_list: - remarks = _("Against Customer Order {0}").format(doc.po_no) - update_remarks("Sales Invoice", doc.name, remarks) + Step 1: Update remarks in GL Entries + Step 2: Update remarks in Payment Ledger Entries + Step 3: Update remarks in Sales Invoice - Should be last step + """ + + ### Step 1: Update remarks in GL Entries + update_sales_invoice_gle_remarks() + + ### Step 2: Update remarks in Payment Ledger Entries + update_sales_invoice_ple_remarks() + + ### Step 3: Update remarks in Sales Invoice + update_query = """ + UPDATE `tabSales Invoice` + SET remarks = concat('Against Customer Order ', po_no) + WHERE po_no <> '' AND docstatus = %(docstatus)s and remarks = %(remarks)s + """ + + # Data for update query + values = {"remarks": "No Remarks", "docstatus": 1} + + # Execute query + frappe.db.sql(update_query, values=values, as_dict=0) def update_purchase_invoice_remarks(): - pi_list = frappe.db.get_all( - "Purchase Invoice", - filters={ - "docstatus": 1, - "remarks": "No Remarks", - "bill_no": ["!=", ""], - }, - fields=["name", "bill_no"], - ) + """ + Update remarks in Purchase Invoice. + Some sites may have very large volume of purchase invoices. + In such cases, updating documents one by one wont be successful, especially during site migration step. + Refer to the bug report: https://github.com/frappe/erpnext/issues/43634 + In this case, a bulk update must be done. - for doc in pi_list: - remarks = _("Against Supplier Invoice {0}").format(doc.bill_no) - update_remarks("Purchase Invoice", doc.name, remarks) + Step 1: Update remarks in GL Entries + Step 2: Update remarks in Payment Ledger Entries + Step 3: Update remarks in Purchase Invoice - Should be last step + """ + + ### Step 1: Update remarks in GL Entries + update_purchase_invoice_gle_remarks() + + ### Step 2: Update remarks in Payment Ledger Entries + update_purchase_invoice_ple_remarks() + + ### Step 3: Update remarks in Purchase Invoice + update_query = """ + UPDATE `tabPurchase Invoice` + SET remarks = concat('Against Supplier Invoice ', bill_no) + WHERE bill_no <> '' AND docstatus = %(docstatus)s and remarks = %(remarks)s + """ + + # Data for update query + values = {"remarks": "No Remarks", "docstatus": 1} + + # Execute query + frappe.db.sql(update_query, values=values, as_dict=0) -def update_remarks(doctype, docname, remarks): - filters = { - "voucher_type": doctype, - "remarks": "No Remarks", - "voucher_no": docname, - } +def update_sales_invoice_gle_remarks(): + ## Update query to update GL Entry - Updates all entries which are for Sales Invoice with No Remarks + update_query = """ + UPDATE + `tabGL Entry` as gle + INNER JOIN `tabSales Invoice` as si + ON gle.voucher_type = 'Sales Invoice' AND gle.voucher_no = si.name AND gle.remarks = %(remarks)s + SET + gle.remarks = concat('Against Customer Order ', si.po_no) + WHERE si.po_no <> '' AND si.docstatus = %(docstatus)s and si.remarks = %(remarks)s + """ - frappe.db.set_value(doctype, docname, "remarks", remarks) - frappe.db.set_value("GL Entry", filters, "remarks", remarks) - frappe.db.set_value("Payment Ledger Entry", filters, "remarks", remarks) + # Data for update query + values = {"remarks": "No Remarks", "docstatus": 1} + + # Execute query + frappe.db.sql(update_query, values=values, as_dict=0) + + +def update_sales_invoice_ple_remarks(): + ## Update query to update Payment Ledger Entry - Updates all entries which are for Sales Invoice with No Remarks + update_query = """ + UPDATE + `tabPayment Ledger Entry` as ple + INNER JOIN `tabSales Invoice` as si + ON ple.voucher_type = 'Sales Invoice' AND ple.voucher_no = si.name AND ple.remarks = %(remarks)s + SET + ple.remarks = concat('Against Customer Order ', si.po_no) + WHERE si.po_no <> '' AND si.docstatus = %(docstatus)s and si.remarks = %(remarks)s + """ + + ### Data for update query + values = {"remarks": "No Remarks", "docstatus": 1} + + ### Execute query + frappe.db.sql(update_query, values=values, as_dict=0) + + +def update_purchase_invoice_gle_remarks(): + ### Query to update GL Entry - Updates all entries which are for Purchase Invoice with No Remarks + update_query = """ + UPDATE + `tabGL Entry` as gle + INNER JOIN `tabPurchase Invoice` as pi + ON gle.voucher_type = 'Purchase Invoice' AND gle.voucher_no = pi.name AND gle.remarks = %(remarks)s + SET + gle.remarks = concat('Against Supplier Invoice ', pi.bill_no) + WHERE pi.bill_no <> '' AND pi.docstatus = %(docstatus)s and pi.remarks = %(remarks)s + """ + + ### Data for update query + values = {"remarks": "No Remarks", "docstatus": 1} + + ### Execute query + frappe.db.sql(update_query, values=values, as_dict=0) + + +def update_purchase_invoice_ple_remarks(): + ### Query to update Payment Ledger Entry - Updates all entries which are for Purchase Invoice with No Remarks + update_query = """ + UPDATE + `tabPayment Ledger Entry` as ple + INNER JOIN `tabPurchase Invoice` as pi + ON ple.voucher_type = 'Purchase Invoice' AND ple.voucher_no = pi.name AND ple.remarks = %(remarks)s + SET + ple.remarks = concat('Against Supplier Invoice ', pi.bill_no) + WHERE pi.bill_no <> '' AND pi.docstatus = %(docstatus)s and pi.remarks = %(remarks)s + """ + + ### Data for update query + values = {"remarks": "No Remarks", "docstatus": 1} + + ### Execute query + frappe.db.sql(update_query, values=values, as_dict=0) From 8e6249d361bb36a4fd1ef0cfa7333265bb8933d5 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Fri, 2 Aug 2024 11:35:15 +0530 Subject: [PATCH 0464/1614] feat: round off for opening entries (cherry picked from commit a5b228549c0c03517a53db8609f34fb6ab308445) --- erpnext/setup/doctype/company/company.json | 9 ++++++++- erpnext/setup/doctype/company/company.py | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/erpnext/setup/doctype/company/company.json b/erpnext/setup/doctype/company/company.json index 284bd2b7f22..4b07037ad3e 100644 --- a/erpnext/setup/doctype/company/company.json +++ b/erpnext/setup/doctype/company/company.json @@ -49,6 +49,7 @@ "default_cash_account", "default_receivable_account", "round_off_account", + "round_off_for_opening", "round_off_cost_center", "write_off_account", "exchange_gain_loss_account", @@ -801,6 +802,12 @@ "fieldtype": "Link", "label": "Default Operating Cost Account", "options": "Account" + }, + { + "fieldname": "round_off_for_opening", + "fieldtype": "Link", + "label": "Round Off for Opening", + "options": "Account" } ], "icon": "fa fa-building", @@ -808,7 +815,7 @@ "image_field": "company_logo", "is_tree": 1, "links": [], - "modified": "2024-07-24 18:17:56.413971", + "modified": "2024-08-02 11:34:46.785377", "modified_by": "Administrator", "module": "Setup", "name": "Company", diff --git a/erpnext/setup/doctype/company/company.py b/erpnext/setup/doctype/company/company.py index 8028b8e6af4..d781288c8bd 100644 --- a/erpnext/setup/doctype/company/company.py +++ b/erpnext/setup/doctype/company/company.py @@ -91,6 +91,7 @@ class Company(NestedSet): rgt: DF.Int round_off_account: DF.Link | None round_off_cost_center: DF.Link | None + round_off_for_opening: DF.Link | None sales_monthly_history: DF.SmallText | None series_for_depreciation_entry: DF.Data | None stock_adjustment_account: DF.Link | None From 9a3e9c4c9a627cac552a95ff880469ef3888c56f Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Fri, 2 Aug 2024 11:49:50 +0530 Subject: [PATCH 0465/1614] refactor: use separate round off for opening entries (cherry picked from commit 88e68168e36624d9ec31993c8f7a9b29add8c1ce) # Conflicts: # erpnext/accounts/general_ledger.py --- erpnext/accounts/doctype/account/account.json | 4 +- erpnext/accounts/doctype/account/account.py | 1 + .../purchase_invoice/purchase_invoice.py | 6 ++- .../doctype/sales_invoice/sales_invoice.py | 6 ++- erpnext/accounts/general_ledger.py | 52 ++++++++++++++++--- erpnext/controllers/accounts_controller.py | 6 ++- erpnext/setup/doctype/company/company.js | 1 + 7 files changed, 63 insertions(+), 13 deletions(-) diff --git a/erpnext/accounts/doctype/account/account.json b/erpnext/accounts/doctype/account/account.json index e87b59ea9cb..7b56444e635 100644 --- a/erpnext/accounts/doctype/account/account.json +++ b/erpnext/accounts/doctype/account/account.json @@ -121,7 +121,7 @@ "label": "Account Type", "oldfieldname": "account_type", "oldfieldtype": "Select", - "options": "\nAccumulated Depreciation\nAsset Received But Not Billed\nBank\nCash\nChargeable\nCapital Work in Progress\nCost of Goods Sold\nCurrent Asset\nCurrent Liability\nDepreciation\nDirect Expense\nDirect Income\nEquity\nExpense Account\nExpenses Included In Asset Valuation\nExpenses Included In Valuation\nFixed Asset\nIncome Account\nIndirect Expense\nIndirect Income\nLiability\nPayable\nReceivable\nRound Off\nStock\nStock Adjustment\nStock Received But Not Billed\nService Received But Not Billed\nTax\nTemporary", + "options": "\nAccumulated Depreciation\nAsset Received But Not Billed\nBank\nCash\nChargeable\nCapital Work in Progress\nCost of Goods Sold\nCurrent Asset\nCurrent Liability\nDepreciation\nDirect Expense\nDirect Income\nEquity\nExpense Account\nExpenses Included In Asset Valuation\nExpenses Included In Valuation\nFixed Asset\nIncome Account\nIndirect Expense\nIndirect Income\nLiability\nPayable\nReceivable\nRound Off\nRound Off for Opening\nStock\nStock Adjustment\nStock Received But Not Billed\nService Received But Not Billed\nTax\nTemporary", "search_index": 1 }, { @@ -191,7 +191,7 @@ "idx": 1, "is_tree": 1, "links": [], - "modified": "2024-06-27 16:23:04.444354", + "modified": "2024-08-19 15:19:11.095045", "modified_by": "Administrator", "module": "Accounts", "name": "Account", diff --git a/erpnext/accounts/doctype/account/account.py b/erpnext/accounts/doctype/account/account.py index 2c876e09725..b510651e68f 100644 --- a/erpnext/accounts/doctype/account/account.py +++ b/erpnext/accounts/doctype/account/account.py @@ -60,6 +60,7 @@ class Account(NestedSet): "Payable", "Receivable", "Round Off", + "Round Off for Opening", "Stock", "Stock Adjustment", "Stock Received But Not Billed", diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index b47e90eb77d..dc4051eecf4 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -1537,7 +1537,11 @@ class PurchaseInvoice(BuyingController): # eg: rounding_adjustment = 0.01 and exchange rate = 0.05 and precision of base_rounding_adjustment is 2 # then base_rounding_adjustment becomes zero and error is thrown in GL Entry if not self.is_internal_transfer() and self.rounding_adjustment and self.base_rounding_adjustment: - round_off_account, round_off_cost_center = get_round_off_account_and_cost_center( + ( + round_off_account, + round_off_cost_center, + round_off_for_opening, + ) = get_round_off_account_and_cost_center( self.company, "Purchase Invoice", self.name, self.use_company_roundoff_cost_center ) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index eb43de47a54..d24717a614d 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -1633,7 +1633,11 @@ class SalesInvoice(SellingController): and self.base_rounding_adjustment and not self.is_internal_transfer() ): - round_off_account, round_off_cost_center = get_round_off_account_and_cost_center( + ( + round_off_account, + round_off_cost_center, + round_off_for_opening, + ) = get_round_off_account_and_cost_center( self.company, "Sales Invoice", self.name, self.use_company_roundoff_cost_center ) diff --git a/erpnext/accounts/general_ledger.py b/erpnext/accounts/general_ledger.py index f9b503675aa..b3d78284616 100644 --- a/erpnext/accounts/general_ledger.py +++ b/erpnext/accounts/general_ledger.py @@ -7,7 +7,12 @@ import copy import frappe from frappe import _ from frappe.model.meta import get_field_precision +<<<<<<< HEAD from frappe.utils import cint, flt, formatdate, getdate, now +======= +from frappe.utils import cint, flt, formatdate, get_link_to_form, getdate, now +from frappe.utils.dashboard import cache_source +>>>>>>> 88e68168e3 (refactor: use separate round off for opening entries) import erpnext from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import ( @@ -496,16 +501,36 @@ def raise_debit_credit_not_equal_error(debit_credit_diff, voucher_type, voucher_ ) +def has_opening_entries(gl_map: list) -> bool: + for x in gl_map: + if x.is_opening == "Yes": + return True + return False + + def make_round_off_gle(gl_map, debit_credit_diff, precision): - round_off_account, round_off_cost_center = get_round_off_account_and_cost_center( + round_off_account, round_off_cost_center, round_off_for_opening = get_round_off_account_and_cost_center( gl_map[0].company, gl_map[0].voucher_type, gl_map[0].voucher_no ) round_off_gle = frappe._dict() round_off_account_exists = False + has_opening_entry = has_opening_entries(gl_map) + + if has_opening_entry: + if not round_off_for_opening: + frappe.throw( + _("Please set '{0}' in Company: {1}").format( + frappe.bold("Round Off for Opening"), get_link_to_form("Company", gl_map[0].company) + ) + ) + + account = round_off_for_opening + else: + account = round_off_account if gl_map[0].voucher_type != "Period Closing Voucher": for d in gl_map: - if d.account == round_off_account: + if d.account == account: round_off_gle = d if d.debit: debit_credit_diff -= flt(d.debit) - flt(d.credit) @@ -523,7 +548,7 @@ def make_round_off_gle(gl_map, debit_credit_diff, precision): round_off_gle.update( { - "account": round_off_account, + "account": account, "debit_in_account_currency": abs(debit_credit_diff) if debit_credit_diff < 0 else 0, "credit_in_account_currency": debit_credit_diff if debit_credit_diff > 0 else 0, "debit": abs(debit_credit_diff) if debit_credit_diff < 0 else 0, @@ -537,6 +562,9 @@ def make_round_off_gle(gl_map, debit_credit_diff, precision): } ) + if has_opening_entry: + round_off_gle.update({"is_opening": "Yes"}) + update_accounting_dimensions(round_off_gle) if not round_off_account_exists: gl_map.append(round_off_gle) @@ -561,8 +589,8 @@ def update_accounting_dimensions(round_off_gle): def get_round_off_account_and_cost_center(company, voucher_type, voucher_no, use_company_default=False): - round_off_account, round_off_cost_center = frappe.get_cached_value( - "Company", company, ["round_off_account", "round_off_cost_center"] + round_off_account, round_off_cost_center, round_off_for_opening = frappe.get_cached_value( + "Company", company, ["round_off_account", "round_off_cost_center", "round_off_for_opening"] ) or [None, None] # Use expense account as fallback @@ -578,12 +606,20 @@ def get_round_off_account_and_cost_center(company, voucher_type, voucher_no, use round_off_cost_center = parent_cost_center if not round_off_account: - frappe.throw(_("Please mention Round Off Account in Company")) + frappe.throw( + _("Please mention '{0}' in Company: {1}").format( + frappe.bold("Round Off Account"), get_link_to_form("Company", company) + ) + ) if not round_off_cost_center: - frappe.throw(_("Please mention Round Off Cost Center in Company")) + frappe.throw( + _("Please mention '{0}' in Company: {1}").format( + frappe.bold("Round Off Cost Center"), get_link_to_form("Company", company) + ) + ) - return round_off_account, round_off_cost_center + return round_off_account, round_off_cost_center, round_off_for_opening def make_reverse_gl_entries( diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index b14cf428c53..b4b23dd5f4c 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -1298,7 +1298,11 @@ class AccountsController(TransactionBase): d.exchange_gain_loss = difference def make_precision_loss_gl_entry(self, gl_entries): - round_off_account, round_off_cost_center = get_round_off_account_and_cost_center( + ( + round_off_account, + round_off_cost_center, + round_off_for_opening, + ) = get_round_off_account_and_cost_center( self.company, "Purchase Invoice", self.name, self.use_company_roundoff_cost_center ) diff --git a/erpnext/setup/doctype/company/company.js b/erpnext/setup/doctype/company/company.js index f14057a272e..52ff21dc407 100644 --- a/erpnext/setup/doctype/company/company.js +++ b/erpnext/setup/doctype/company/company.js @@ -252,6 +252,7 @@ erpnext.company.setup_queries = function (frm) { ["default_expense_account", { root_type: "Expense" }], ["default_income_account", { root_type: "Income" }], ["round_off_account", { root_type: "Expense" }], + ["round_off_for_opening", { root_type: "Liability" }], ["write_off_account", { root_type: "Expense" }], ["default_deferred_expense_account", {}], ["default_deferred_revenue_account", {}], From b28ff25180ae95fc737708c50b4917f18f82cb1f Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 29 Aug 2024 17:37:32 +0530 Subject: [PATCH 0466/1614] chore: default should return 3 elements (cherry picked from commit fc46ebcd7c9a3628ddd7b7a1f284d2c2d9d6b7f9) --- erpnext/accounts/general_ledger.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/general_ledger.py b/erpnext/accounts/general_ledger.py index b3d78284616..c2fbdcc95f1 100644 --- a/erpnext/accounts/general_ledger.py +++ b/erpnext/accounts/general_ledger.py @@ -591,7 +591,7 @@ def update_accounting_dimensions(round_off_gle): def get_round_off_account_and_cost_center(company, voucher_type, voucher_no, use_company_default=False): round_off_account, round_off_cost_center, round_off_for_opening = frappe.get_cached_value( "Company", company, ["round_off_account", "round_off_cost_center", "round_off_for_opening"] - ) or [None, None] + ) or [None, None, None] # Use expense account as fallback if not round_off_account: From 186b646dee3038cb78311ec99e6f5f292c50a21d Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Fri, 30 Aug 2024 16:08:43 +0530 Subject: [PATCH 0467/1614] refactor: handle opening round off from sales invoice (cherry picked from commit 96e3c2ad1061af44b044fa64b0af16004d0d732e) --- .../doctype/sales_invoice/sales_invoice.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index d24717a614d..8baa36475da 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -1641,6 +1641,21 @@ class SalesInvoice(SellingController): self.company, "Sales Invoice", self.name, self.use_company_roundoff_cost_center ) + if self.is_opening == "Yes" and self.rounding_adjustment: + if not round_off_for_opening: + frappe.throw( + _( + "Opening Invoice has rounding adjustment of {0}.

'{1}' account is required to post these values. Please set it in Company: {2}.

Or, '{3}' can be enabled to not post any rounding adjustment." + ).format( + frappe.bold(self.rounding_adjustment), + frappe.bold("Round Off for Opening"), + get_link_to_form("Company", self.company), + frappe.bold("Disable Rounded Total"), + ) + ) + else: + round_off_account = round_off_for_opening + gl_entries.append( self.get_gl_dict( { From 820692f24647ca6f47370594160cb1e204c66aa7 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Fri, 30 Aug 2024 17:55:02 +0530 Subject: [PATCH 0468/1614] test: rounding adjustment validation and posting (cherry picked from commit 5021c7ca2c3bb5f758d00c65eab1dcfec692d2a4) # Conflicts: # erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py --- .../sales_invoice/test_sales_invoice.py | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py index 56f90ae8cd4..d9d7d5fa3ba 100644 --- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py @@ -3924,6 +3924,7 @@ class TestSalesInvoice(FrappeTestCase): self.assertEqual(len(res), 1) self.assertEqual(res[0][0], pos_return.return_against) +<<<<<<< HEAD @change_settings("Accounts Settings", {"enable_common_party_accounting": True}) def test_common_party_with_foreign_currency_jv(self): from erpnext.accounts.doctype.account.test_account import create_account @@ -4032,6 +4033,57 @@ class TestSalesInvoice(FrappeTestCase): ) self.assertTrue(all([x == "Credit Note" for x in gl_entries])) +======= + def test_validation_on_opening_invoice_with_rounding(self): + si = create_sales_invoice(qty=1, rate=99.98, do_not_submit=True) + si.is_opening = "Yes" + si.items[0].income_account = "Temporary Opening - _TC" + si.save() + self.assertRaises(frappe.ValidationError, si.submit) + + def test_opening_invoice_with_rounding_adjustment(self): + si = create_sales_invoice(qty=1, rate=99.98, do_not_submit=True) + si.is_opening = "Yes" + si.items[0].income_account = "Temporary Opening - _TC" + si.save() + + liability_root = frappe.db.get_all( + "Account", + filters={"company": si.company, "root_type": "Liability", "disabled": 0}, + order_by="lft", + limit=1, + )[0] + + # setup round off account + company = frappe.get_doc("Company", si.company) + if acc := frappe.db.exists( + "Account", + { + "account_name": "Round Off for Opening", + "account_type": "Round Off for Opening", + "company": si.company, + }, + ): + company.round_off_for_opening = acc + else: + acc = frappe.new_doc("Account") + acc.company = si.company + acc.parent_account = liability_root.name + acc.account_name = "Round Off for Opening" + acc.account_type = "Round Off for Opening" + acc.save() + company.round_off_for_opening = acc.name + company.save() + + si.reload() + si.submit() + res = frappe.db.get_all( + "GL Entry", + filters={"voucher_no": si.name, "is_opening": "Yes"}, + fields=["account", "debit", "credit", "is_opening"], + ) + self.assertEqual(len(res), 3) +>>>>>>> 5021c7ca2c (test: rounding adjustment validation and posting) def set_advance_flag(company, flag, default_account): From da2f6a045aa637514754bbd342bac48ce5847521 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 2 Sep 2024 16:33:55 +0530 Subject: [PATCH 0469/1614] test: opening round off with inclusive tax (cherry picked from commit 79267358d0fc95a10c9bcd03307ba1284e561526) --- .../sales_invoice/test_sales_invoice.py | 106 +++++++++++++----- 1 file changed, 79 insertions(+), 27 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py index d9d7d5fa3ba..15bc234fec1 100644 --- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py @@ -4041,39 +4041,40 @@ class TestSalesInvoice(FrappeTestCase): si.save() self.assertRaises(frappe.ValidationError, si.submit) + def _create_opening_roundoff_account(self, company_name): + liability_root = frappe.db.get_all( + "Account", + filters={"company": company_name, "root_type": "Liability", "disabled": 0}, + order_by="lft", + limit=1, + )[0] + + # setup round off account + if acc := frappe.db.exists( + "Account", + { + "account_name": "Round Off for Opening", + "account_type": "Round Off for Opening", + "company": company_name, + }, + ): + frappe.db.set_value("Company", company_name, "round_off_for_opening", acc) + else: + acc = frappe.new_doc("Account") + acc.company = company_name + acc.parent_account = liability_root.name + acc.account_name = "Round Off for Opening" + acc.account_type = "Round Off for Opening" + acc.save() + frappe.db.set_value("Company", company_name, "round_off_for_opening", acc.name) + def test_opening_invoice_with_rounding_adjustment(self): si = create_sales_invoice(qty=1, rate=99.98, do_not_submit=True) si.is_opening = "Yes" si.items[0].income_account = "Temporary Opening - _TC" si.save() - liability_root = frappe.db.get_all( - "Account", - filters={"company": si.company, "root_type": "Liability", "disabled": 0}, - order_by="lft", - limit=1, - )[0] - - # setup round off account - company = frappe.get_doc("Company", si.company) - if acc := frappe.db.exists( - "Account", - { - "account_name": "Round Off for Opening", - "account_type": "Round Off for Opening", - "company": si.company, - }, - ): - company.round_off_for_opening = acc - else: - acc = frappe.new_doc("Account") - acc.company = si.company - acc.parent_account = liability_root.name - acc.account_name = "Round Off for Opening" - acc.account_type = "Round Off for Opening" - acc.save() - company.round_off_for_opening = acc.name - company.save() + self._create_opening_roundoff_account(si.company) si.reload() si.submit() @@ -4085,6 +4086,57 @@ class TestSalesInvoice(FrappeTestCase): self.assertEqual(len(res), 3) >>>>>>> 5021c7ca2c (test: rounding adjustment validation and posting) + def _create_opening_invoice_with_inclusive_tax(self): + si = create_sales_invoice(qty=1, rate=90, do_not_submit=True) + si.is_opening = "Yes" + si.items[0].income_account = "Temporary Opening - _TC" + item_template = si.items[0].as_dict() + item_template.name = None + item_template.rate = 55 + si.append("items", item_template) + si.append( + "taxes", + { + "charge_type": "On Net Total", + "account_head": "_Test Account Service Tax - _TC", + "cost_center": "_Test Cost Center - _TC", + "description": "Testing...", + "rate": 5, + "included_in_print_rate": True, + }, + ) + # there will be 0.01 precision loss between Dr and Cr + # caused by 'included_in_print_tax' option + si.save() + return si + + def test_rounding_validation_for_opening_with_inclusive_tax(self): + si = self._create_opening_invoice_with_inclusive_tax() + # 'Round Off for Opening' not set in Company master + # Ledger level validation must be thrown + self.assertRaises(frappe.ValidationError, si.submit) + + def test_ledger_entries_on_opening_invoice_with_rounding_loss_by_inclusive_tax(self): + si = self._create_opening_invoice_with_inclusive_tax() + # 'Round Off for Opening' is set in Company master + self._create_opening_roundoff_account(si.company) + + si.submit() + actual = frappe.db.get_all( + "GL Entry", + filters={"voucher_no": si.name, "is_opening": "Yes"}, + fields=["account", "debit", "credit", "is_opening"], + order_by="account,debit", + ) + expected = [ + {"account": "_Test Account Service Tax - _TC", "debit": 0.0, "credit": 6.9, "is_opening": "Yes"}, + {"account": "Debtors - _TC", "debit": 145.0, "credit": 0.0, "is_opening": "Yes"}, + {"account": "Round Off for Opening - _TC", "debit": 0.0, "credit": 0.01, "is_opening": "Yes"}, + {"account": "Temporary Opening - _TC", "debit": 0.0, "credit": 138.09, "is_opening": "Yes"}, + ] + self.assertEqual(len(actual), 4) + self.assertEqual(expected, actual) + def set_advance_flag(company, flag, default_account): frappe.db.set_value( From 7eb4b422808e5df5353e169279a2356a454cd69f Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 2 Sep 2024 17:52:28 +0530 Subject: [PATCH 0470/1614] refactor: filter on account_type (cherry picked from commit 193ea9ad8f29358820fff45698772ea5adeffcfa) --- erpnext/setup/doctype/company/company.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/setup/doctype/company/company.js b/erpnext/setup/doctype/company/company.js index 52ff21dc407..72d28a705ad 100644 --- a/erpnext/setup/doctype/company/company.js +++ b/erpnext/setup/doctype/company/company.js @@ -252,7 +252,7 @@ erpnext.company.setup_queries = function (frm) { ["default_expense_account", { root_type: "Expense" }], ["default_income_account", { root_type: "Income" }], ["round_off_account", { root_type: "Expense" }], - ["round_off_for_opening", { root_type: "Liability" }], + ["round_off_for_opening", { root_type: "Liability", account_type: "Round Off for Opening" }], ["write_off_account", { root_type: "Expense" }], ["default_deferred_expense_account", {}], ["default_deferred_revenue_account", {}], From 8bec67cbcfb514dda6ba66f6bf0df07841bb8026 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 2 Sep 2024 17:53:02 +0530 Subject: [PATCH 0471/1614] refactor: handle opening round off on purchase invoice (cherry picked from commit a5d6a25a9654ebe7f91285b9266e9b7cd9797545) --- .../doctype/purchase_invoice/purchase_invoice.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index dc4051eecf4..ebc4efc08a0 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -1545,6 +1545,21 @@ class PurchaseInvoice(BuyingController): self.company, "Purchase Invoice", self.name, self.use_company_roundoff_cost_center ) + if self.is_opening == "Yes" and self.rounding_adjustment: + if not round_off_for_opening: + frappe.throw( + _( + "Opening Invoice has rounding adjustment of {0}.

'{1}' account is required to post these values. Please set it in Company: {2}.

Or, '{3}' can be enabled to not post any rounding adjustment." + ).format( + frappe.bold(self.rounding_adjustment), + frappe.bold("Round Off for Opening"), + get_link_to_form("Company", self.company), + frappe.bold("Disable Rounded Total"), + ) + ) + else: + round_off_account = round_off_for_opening + gl_entries.append( self.get_gl_dict( { From 9bfd5cdb2b8999fd5e2140c79338542f135f77ce Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 3 Sep 2024 11:04:26 +0530 Subject: [PATCH 0472/1614] test: opening purchase invoice with rounding adjustment (cherry picked from commit b7edc6dea908b887041998801a3d7724fc8777f1) # Conflicts: # erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py --- .../purchase_invoice/test_purchase_invoice.py | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py index f5835deb0d0..f234157d949 100644 --- a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py @@ -2347,6 +2347,7 @@ class TestPurchaseInvoice(FrappeTestCase, StockTestMixin): frappe.db.set_single_value("Buying Settings", "maintain_same_rate", 1) +<<<<<<< HEAD def test_last_purchase_rate(self): item = create_item("_Test Item For Last Purchase Rate from PI", is_stock_item=1) pi1 = make_purchase_invoice(item_code=item.item_code, qty=10, rate=100) @@ -2364,6 +2365,66 @@ class TestPurchaseInvoice(FrappeTestCase, StockTestMixin): pi1.cancel() item.reload() self.assertEqual(item.last_purchase_rate, 0) +======= + def test_opening_invoice_rounding_adjustment_validation(self): + pi = make_purchase_invoice(do_not_save=1) + pi.items[0].rate = 99.98 + pi.items[0].qty = 1 + pi.items[0].expense_account = "Temporary Opening - _TC" + pi.is_opening = "Yes" + pi.save() + self.assertRaises(frappe.ValidationError, pi.submit) + + def _create_opening_roundoff_account(self, company_name): + liability_root = frappe.db.get_all( + "Account", + filters={"company": company_name, "root_type": "Liability", "disabled": 0}, + order_by="lft", + limit=1, + )[0] + + # setup round off account + if acc := frappe.db.exists( + "Account", + { + "account_name": "Round Off for Opening", + "account_type": "Round Off for Opening", + "company": company_name, + }, + ): + frappe.db.set_value("Company", company_name, "round_off_for_opening", acc) + else: + acc = frappe.new_doc("Account") + acc.company = company_name + acc.parent_account = liability_root.name + acc.account_name = "Round Off for Opening" + acc.account_type = "Round Off for Opening" + acc.save() + frappe.db.set_value("Company", company_name, "round_off_for_opening", acc.name) + + def test_ledger_entries_of_opening_invoice_with_rounding_adjustment(self): + pi = make_purchase_invoice(do_not_save=1) + pi.items[0].rate = 99.98 + pi.items[0].qty = 1 + pi.items[0].expense_account = "Temporary Opening - _TC" + pi.is_opening = "Yes" + pi.save() + self._create_opening_roundoff_account(pi.company) + pi.submit() + actual = frappe.db.get_all( + "GL Entry", + filters={"voucher_no": pi.name, "is_opening": "Yes", "is_cancelled": False}, + fields=["account", "debit", "credit", "is_opening"], + order_by="account,debit", + ) + expected = [ + {"account": "Creditors - _TC", "debit": 0.0, "credit": 100.0, "is_opening": "Yes"}, + {"account": "Round Off for Opening - _TC", "debit": 0.02, "credit": 0.0, "is_opening": "Yes"}, + {"account": "Temporary Opening - _TC", "debit": 99.98, "credit": 0.0, "is_opening": "Yes"}, + ] + self.assertEqual(len(actual), 3) + self.assertEqual(expected, actual) +>>>>>>> b7edc6dea9 (test: opening purchase invoice with rounding adjustment) def set_advance_flag(company, flag, default_account): From ba79560c0c5f4b214c9b52061fac9762c3f6b363 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 3 Sep 2024 11:05:34 +0530 Subject: [PATCH 0473/1614] refactor(test): filter for active ledger entries (cherry picked from commit cf11ac87fb7a9bb15518204900d776e06af60aaf) --- erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py index 15bc234fec1..adbab43001b 100644 --- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py @@ -4124,7 +4124,7 @@ class TestSalesInvoice(FrappeTestCase): si.submit() actual = frappe.db.get_all( "GL Entry", - filters={"voucher_no": si.name, "is_opening": "Yes"}, + filters={"voucher_no": si.name, "is_opening": "Yes", "is_cancelled": False}, fields=["account", "debit", "credit", "is_opening"], order_by="account,debit", ) From 9598b1fc0fdf4c8be6145d0a1d4a9130635b595e Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 14 Nov 2024 12:35:41 +0530 Subject: [PATCH 0474/1614] chore: resolve conflicts --- .../doctype/purchase_invoice/test_purchase_invoice.py | 4 +--- erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py | 4 +--- erpnext/accounts/general_ledger.py | 5 ----- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py index f234157d949..f0b51c32c05 100644 --- a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py @@ -2347,7 +2347,6 @@ class TestPurchaseInvoice(FrappeTestCase, StockTestMixin): frappe.db.set_single_value("Buying Settings", "maintain_same_rate", 1) -<<<<<<< HEAD def test_last_purchase_rate(self): item = create_item("_Test Item For Last Purchase Rate from PI", is_stock_item=1) pi1 = make_purchase_invoice(item_code=item.item_code, qty=10, rate=100) @@ -2365,7 +2364,7 @@ class TestPurchaseInvoice(FrappeTestCase, StockTestMixin): pi1.cancel() item.reload() self.assertEqual(item.last_purchase_rate, 0) -======= + def test_opening_invoice_rounding_adjustment_validation(self): pi = make_purchase_invoice(do_not_save=1) pi.items[0].rate = 99.98 @@ -2424,7 +2423,6 @@ class TestPurchaseInvoice(FrappeTestCase, StockTestMixin): ] self.assertEqual(len(actual), 3) self.assertEqual(expected, actual) ->>>>>>> b7edc6dea9 (test: opening purchase invoice with rounding adjustment) def set_advance_flag(company, flag, default_account): diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py index adbab43001b..90bec018257 100644 --- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py @@ -3924,7 +3924,6 @@ class TestSalesInvoice(FrappeTestCase): self.assertEqual(len(res), 1) self.assertEqual(res[0][0], pos_return.return_against) -<<<<<<< HEAD @change_settings("Accounts Settings", {"enable_common_party_accounting": True}) def test_common_party_with_foreign_currency_jv(self): from erpnext.accounts.doctype.account.test_account import create_account @@ -4033,7 +4032,7 @@ class TestSalesInvoice(FrappeTestCase): ) self.assertTrue(all([x == "Credit Note" for x in gl_entries])) -======= + def test_validation_on_opening_invoice_with_rounding(self): si = create_sales_invoice(qty=1, rate=99.98, do_not_submit=True) si.is_opening = "Yes" @@ -4084,7 +4083,6 @@ class TestSalesInvoice(FrappeTestCase): fields=["account", "debit", "credit", "is_opening"], ) self.assertEqual(len(res), 3) ->>>>>>> 5021c7ca2c (test: rounding adjustment validation and posting) def _create_opening_invoice_with_inclusive_tax(self): si = create_sales_invoice(qty=1, rate=90, do_not_submit=True) diff --git a/erpnext/accounts/general_ledger.py b/erpnext/accounts/general_ledger.py index c2fbdcc95f1..7d7c6f49e12 100644 --- a/erpnext/accounts/general_ledger.py +++ b/erpnext/accounts/general_ledger.py @@ -7,12 +7,7 @@ import copy import frappe from frappe import _ from frappe.model.meta import get_field_precision -<<<<<<< HEAD -from frappe.utils import cint, flt, formatdate, getdate, now -======= from frappe.utils import cint, flt, formatdate, get_link_to_form, getdate, now -from frappe.utils.dashboard import cache_source ->>>>>>> 88e68168e3 (refactor: use separate round off for opening entries) import erpnext from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import ( From 5d6451fca7de3a9deba0df0a8568dc98f8c1936f Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 12 Sep 2024 15:25:32 +0530 Subject: [PATCH 0475/1614] fix: broken apply on other item pricing rule (cherry picked from commit e5119a749cb0132ac389c416b1b285d3763486b9) --- erpnext/accounts/doctype/pricing_rule/pricing_rule.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py index 1a1ff78a217..72ad0d096bc 100644 --- a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py +++ b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py @@ -446,7 +446,10 @@ def get_pricing_rule_for_item(args, doc=None, for_validate=False): if isinstance(pricing_rule, str): pricing_rule = frappe.get_cached_doc("Pricing Rule", pricing_rule) update_pricing_rule_uom(pricing_rule, args) - pricing_rule.apply_rule_on_other_items = get_pricing_rule_items(pricing_rule) or [] + fetch_other_item = True if pricing_rule.apply_rule_on_other else False + pricing_rule.apply_rule_on_other_items = ( + get_pricing_rule_items(pricing_rule, other_items=fetch_other_item) or [] + ) if pricing_rule.get("suggestion"): continue From c59a7785039cdedc62c3321706799a35892ee7b3 Mon Sep 17 00:00:00 2001 From: UmakanthKaspa Date: Thu, 14 Nov 2024 20:15:20 +0530 Subject: [PATCH 0476/1614] fix: correctly set 'cannot_add_rows' property on allocations table field (cherry picked from commit 13ca2700f83892dd2074f31907dc08c013fde837) --- erpnext/public/js/utils/unreconcile.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/erpnext/public/js/utils/unreconcile.js b/erpnext/public/js/utils/unreconcile.js index de20f468ccb..4854bf6b452 100644 --- a/erpnext/public/js/utils/unreconcile.js +++ b/erpnext/public/js/utils/unreconcile.js @@ -119,11 +119,18 @@ erpnext.accounts.unreconcile_payment = { return r.message; }; + const allocationsTableField = unreconcile_dialog_fields.find( + (field) => field.fieldname === "allocations" + ); + + if (allocationsTableField) { + allocationsTableField.cannot_add_rows = true; + } + let d = new frappe.ui.Dialog({ title: "UnReconcile Allocations", fields: unreconcile_dialog_fields, size: "large", - cannot_add_rows: true, primary_action_label: "UnReconcile", primary_action(values) { let selected_allocations = values.allocations.filter((x) => x.__checked); From 41c8cfac733104c69c1f30b921c667031c146024 Mon Sep 17 00:00:00 2001 From: UmakanthKaspa Date: Mon, 11 Nov 2024 09:18:09 +0000 Subject: [PATCH 0477/1614] fix: apply posting date sorting to invoices in Payment Reconciliation similar to payments (cherry picked from commit 0bd83d920d42f461ced04a1ca3a35307b9796d16) --- .../payment_reconciliation/payment_reconciliation.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py index 35d268accac..b08afc02c01 100644 --- a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py +++ b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py @@ -370,7 +370,11 @@ class PaymentReconciliation(Document): if self.invoice_limit: non_reconciled_invoices = non_reconciled_invoices[: self.invoice_limit] - + + non_reconciled_invoices = sorted( + non_reconciled_invoices, key=lambda k: k["posting_date"] or getdate(nowdate()) + ) + self.add_invoice_entries(non_reconciled_invoices) def add_invoice_entries(self, non_reconciled_invoices): From 5bd633b40f86d46ebc3bce68e0dc65c88489d81e Mon Sep 17 00:00:00 2001 From: UmakanthKaspa Date: Mon, 11 Nov 2024 18:06:53 +0530 Subject: [PATCH 0478/1614] fix: remove trailing whitespace (cherry picked from commit d6703eb88b08e358d66bf43a24225db318e1ddc7) --- .../doctype/payment_reconciliation/payment_reconciliation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py index b08afc02c01..bbbb3c978ff 100644 --- a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py +++ b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py @@ -370,11 +370,11 @@ class PaymentReconciliation(Document): if self.invoice_limit: non_reconciled_invoices = non_reconciled_invoices[: self.invoice_limit] - + non_reconciled_invoices = sorted( non_reconciled_invoices, key=lambda k: k["posting_date"] or getdate(nowdate()) ) - + self.add_invoice_entries(non_reconciled_invoices) def add_invoice_entries(self, non_reconciled_invoices): From f4603910e4d4c11ca7cc48d8a44af5a35c98395d Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Fri, 15 Nov 2024 11:05:01 +0530 Subject: [PATCH 0479/1614] fix: broken UI on currency exchange (cherry picked from commit e91b65e7bd5bc23788d6329798d3ab8e1b4ab187) --- .../currency_exchange/currency_exchange.js | 34 ++++++++++--------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/erpnext/setup/doctype/currency_exchange/currency_exchange.js b/erpnext/setup/doctype/currency_exchange/currency_exchange.js index 82f0e22ee61..d4501e5d0da 100644 --- a/erpnext/setup/doctype/currency_exchange/currency_exchange.js +++ b/erpnext/setup/doctype/currency_exchange/currency_exchange.js @@ -1,30 +1,32 @@ // Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors // License: GNU General Public License v3. See license.txt -extend_cscript(cur_frm.cscript, { - onload: function () { - if (cur_frm.doc.__islocal) { - cur_frm.set_value("to_currency", frappe.defaults.get_global_default("currency")); +frappe.ui.form.on("Currency Exchange", { + onload: function (frm) { + if (frm.doc.__islocal) { + frm.set_value("to_currency", frappe.defaults.get_global_default("currency")); } }, - refresh: function () { - cur_frm.cscript.set_exchange_rate_label(); + refresh: function (frm) { + // Don't trigger on Quick Entry form + if (typeof frm.is_dialog === "undefined") { + frm.trigger("set_exchange_rate_label"); + } }, - from_currency: function () { - cur_frm.cscript.set_exchange_rate_label(); + from_currency: function (frm) { + frm.trigger("set_exchange_rate_label"); }, - to_currency: function () { - cur_frm.cscript.set_exchange_rate_label(); + to_currency: function (frm) { + frm.trigger("set_exchange_rate_label"); }, - - set_exchange_rate_label: function () { - if (cur_frm.doc.from_currency && cur_frm.doc.to_currency) { - var default_label = __(frappe.meta.docfield_map[cur_frm.doctype]["exchange_rate"].label); - cur_frm.fields_dict.exchange_rate.set_label( - default_label + repl(" (1 %(from_currency)s = [?] %(to_currency)s)", cur_frm.doc) + set_exchange_rate_label: function (frm) { + if (frm.doc.from_currency && frm.doc.to_currency) { + var default_label = __(frappe.meta.docfield_map[frm.doctype]["exchange_rate"].label); + frm.fields_dict.exchange_rate.set_label( + default_label + repl(" (1 %(from_currency)s = [?] %(to_currency)s)", frm.doc) ); } }, From 1fe534290dcea0c689c48530b8a765c9111b71f6 Mon Sep 17 00:00:00 2001 From: Vishakh Desai Date: Sat, 28 Sep 2024 12:48:14 +0530 Subject: [PATCH 0480/1614] fix: Get Entries not showing accounts with no gain or loss in Exchange Rate Revaluation issue (cherry picked from commit 6de6f55b390c1e2180a4698ce25ceba920578b2c) --- .../exchange_rate_revaluation.py | 82 +++++++++++-------- 1 file changed, 48 insertions(+), 34 deletions(-) diff --git a/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.py b/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.py index 8607d1ed71f..cd344214736 100644 --- a/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.py +++ b/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.py @@ -74,6 +74,21 @@ class ExchangeRateRevaluation(Document): if not (self.company and self.posting_date): frappe.throw(_("Please select Company and Posting Date to getting entries")) + def on_submit(self): + self.remove_accounts_without_gain_loss() + + def remove_accounts_without_gain_loss(self): + self.accounts = [account for account in self.accounts if account.gain_loss] + + if not self.accounts: + frappe.throw(_("At least one account with exchange gain or loss is required")) + + frappe.msgprint( + _("Removing rows without exchange gain or loss"), + alert=True, + indicator="yellow", + ) + def on_cancel(self): self.ignore_linked_doctypes = "GL Entry" @@ -248,23 +263,23 @@ class ExchangeRateRevaluation(Document): new_exchange_rate = get_exchange_rate(d.account_currency, company_currency, posting_date) new_balance_in_base_currency = flt(d.balance_in_account_currency * new_exchange_rate) gain_loss = flt(new_balance_in_base_currency, precision) - flt(d.balance, precision) - if gain_loss: - accounts.append( - { - "account": d.account, - "party_type": d.party_type, - "party": d.party, - "account_currency": d.account_currency, - "balance_in_base_currency": d.balance, - "balance_in_account_currency": d.balance_in_account_currency, - "zero_balance": d.zero_balance, - "current_exchange_rate": current_exchange_rate, - "new_exchange_rate": new_exchange_rate, - "new_balance_in_base_currency": new_balance_in_base_currency, - "new_balance_in_account_currency": d.balance_in_account_currency, - "gain_loss": gain_loss, - } - ) + + accounts.append( + { + "account": d.account, + "party_type": d.party_type, + "party": d.party, + "account_currency": d.account_currency, + "balance_in_base_currency": d.balance, + "balance_in_account_currency": d.balance_in_account_currency, + "zero_balance": d.zero_balance, + "current_exchange_rate": current_exchange_rate, + "new_exchange_rate": new_exchange_rate, + "new_balance_in_base_currency": new_balance_in_base_currency, + "new_balance_in_account_currency": d.balance_in_account_currency, + "gain_loss": gain_loss, + } + ) # Handle Accounts with '0' balance in Account/Base Currency for d in [x for x in account_details if x.zero_balance]: @@ -288,23 +303,22 @@ class ExchangeRateRevaluation(Document): current_exchange_rate * d.balance_in_account_currency ) - if gain_loss: - accounts.append( - { - "account": d.account, - "party_type": d.party_type, - "party": d.party, - "account_currency": d.account_currency, - "balance_in_base_currency": d.balance, - "balance_in_account_currency": d.balance_in_account_currency, - "zero_balance": d.zero_balance, - "current_exchange_rate": current_exchange_rate, - "new_exchange_rate": new_exchange_rate, - "new_balance_in_base_currency": new_balance_in_base_currency, - "new_balance_in_account_currency": new_balance_in_account_currency, - "gain_loss": gain_loss, - } - ) + accounts.append( + { + "account": d.account, + "party_type": d.party_type, + "party": d.party, + "account_currency": d.account_currency, + "balance_in_base_currency": d.balance, + "balance_in_account_currency": d.balance_in_account_currency, + "zero_balance": d.zero_balance, + "current_exchange_rate": current_exchange_rate, + "new_exchange_rate": new_exchange_rate, + "new_balance_in_base_currency": new_balance_in_base_currency, + "new_balance_in_account_currency": new_balance_in_account_currency, + "gain_loss": gain_loss, + } + ) return accounts From 381101f55235e2aa49e2b8229b4250eb3ea2474a Mon Sep 17 00:00:00 2001 From: Vishakh Desai Date: Sat, 28 Sep 2024 12:53:43 +0530 Subject: [PATCH 0481/1614] fix: linters (cherry picked from commit 9cc22b4cacaf958dad6aadf7a8b9b663326f5a05) --- .../exchange_rate_revaluation/exchange_rate_revaluation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.py b/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.py index cd344214736..c08bd3878d5 100644 --- a/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.py +++ b/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.py @@ -74,7 +74,7 @@ class ExchangeRateRevaluation(Document): if not (self.company and self.posting_date): frappe.throw(_("Please select Company and Posting Date to getting entries")) - def on_submit(self): + def before_submit(self): self.remove_accounts_without_gain_loss() def remove_accounts_without_gain_loss(self): From b6fe1f5842671421de52e015c968d2740aaad79e Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 15 Nov 2024 15:04:48 +0530 Subject: [PATCH 0482/1614] fix: stock ledger variance report filter options (backport #44137) (#44150) fix: stock ledger variance report filter options (#44137) (cherry picked from commit e8bbf6492fc120d34eb8b36fd2c61ee1a9fdc5dc) Co-authored-by: rohitwaghchaure --- .../stock_ledger_variance.js | 18 +++++++++++++++++- .../stock_ledger_variance.py | 18 ++++++++++++------ 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/erpnext/stock/report/stock_ledger_variance/stock_ledger_variance.js b/erpnext/stock/report/stock_ledger_variance/stock_ledger_variance.js index 07e7b59b514..5dfb6627662 100644 --- a/erpnext/stock/report/stock_ledger_variance/stock_ledger_variance.js +++ b/erpnext/stock/report/stock_ledger_variance/stock_ledger_variance.js @@ -47,7 +47,23 @@ frappe.query_reports["Stock Ledger Variance"] = { fieldname: "difference_in", fieldtype: "Select", label: __("Difference In"), - options: ["", "Qty", "Value", "Valuation"], + options: [ + { + // Check "Stock Ledger Invariant Check" report with A - B column + label: __("Quantity (A - B)"), + value: "Qty", + }, + { + // Check "Stock Ledger Invariant Check" report with G - D column + label: __("Value (G - D)"), + value: "Value", + }, + { + // Check "Stock Ledger Invariant Check" report with I - K column + label: __("Valuation (I - K)"), + value: "Valuation", + }, + ], }, { fieldname: "include_disabled", diff --git a/erpnext/stock/report/stock_ledger_variance/stock_ledger_variance.py b/erpnext/stock/report/stock_ledger_variance/stock_ledger_variance.py index 0b7e551c86f..808afadd05a 100644 --- a/erpnext/stock/report/stock_ledger_variance/stock_ledger_variance.py +++ b/erpnext/stock/report/stock_ledger_variance/stock_ledger_variance.py @@ -1,6 +1,8 @@ # Copyright (c) 2023, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt +import json + import frappe from frappe import _ from frappe.utils import cint, flt @@ -270,12 +272,16 @@ def has_difference(row, precision, difference_in, valuation_method): value_diff = flt(row.diff_value_diff, precision) valuation_diff = flt(row.valuation_diff, precision) else: - qty_diff = flt(row.difference_in_qty, precision) or flt(row.fifo_qty_diff, precision) - value_diff = ( - flt(row.diff_value_diff, precision) - or flt(row.fifo_value_diff, precision) - or flt(row.fifo_difference_diff, precision) - ) + qty_diff = flt(row.difference_in_qty, precision) + value_diff = flt(row.diff_value_diff, precision) + + if row.stock_queue and json.loads(row.stock_queue): + value_diff = value_diff or ( + flt(row.fifo_value_diff, precision) or flt(row.fifo_difference_diff, precision) + ) + + qty_diff = qty_diff or flt(row.fifo_qty_diff, precision) + valuation_diff = flt(row.valuation_diff, precision) or flt(row.fifo_valuation_diff, precision) if difference_in == "Qty" and qty_diff: From 725d107288675867dd14571b84945f00d4def45e Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 15 Nov 2024 16:55:32 +0530 Subject: [PATCH 0483/1614] fix: validation for serial no (backport #44133) (#44151) * fix: validation for serial no (#44133) (cherry picked from commit 93c8b4c39af90f9b60da7476855281a22bca0ffc) # Conflicts: # erpnext/stock/doctype/stock_entry/test_stock_entry.py * chore: fix conflicts --------- Co-authored-by: rohitwaghchaure --- .../serial_and_batch_bundle.py | 4 -- .../doctype/stock_entry/test_stock_entry.py | 55 ------------------- 2 files changed, 59 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 08aa978aa99..68c47b0d577 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 @@ -749,10 +749,6 @@ class SerialandBatchBundle(Document): ) def validate_incorrect_serial_nos(self, serial_nos): - if self.voucher_type == "Stock Entry" and self.voucher_no: - if frappe.get_cached_value("Stock Entry", self.voucher_no, "purpose") == "Repack": - return - incorrect_serial_nos = frappe.get_all( "Serial No", filters={"name": ("in", serial_nos), "item_code": ("!=", self.item_code)}, diff --git a/erpnext/stock/doctype/stock_entry/test_stock_entry.py b/erpnext/stock/doctype/stock_entry/test_stock_entry.py index a9529cc2ede..469b865dd59 100644 --- a/erpnext/stock/doctype/stock_entry/test_stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/test_stock_entry.py @@ -970,61 +970,6 @@ class TestStockEntry(FrappeTestCase): self.assertRaises(frappe.ValidationError, ste.submit) - def test_same_serial_nos_in_repack_or_manufacture_entries(self): - s1 = make_serialized_item(target_warehouse="_Test Warehouse - _TC") - serial_nos = get_serial_nos_from_bundle(s1.get("items")[0].serial_and_batch_bundle) - - s2 = make_stock_entry( - item_code="_Test Serialized Item With Series", - source="_Test Warehouse - _TC", - qty=2, - basic_rate=100, - purpose="Repack", - serial_no=serial_nos, - do_not_save=True, - ) - - frappe.flags.use_serial_and_batch_fields = True - - cls_obj = SerialBatchCreation( - { - "type_of_transaction": "Inward", - "serial_and_batch_bundle": s2.items[0].serial_and_batch_bundle, - "item_code": "_Test Serialized Item", - "warehouse": "_Test Warehouse - _TC", - } - ) - - cls_obj.duplicate_package() - bundle_id = cls_obj.serial_and_batch_bundle - doc = frappe.get_doc("Serial and Batch Bundle", bundle_id) - doc.db_set( - { - "item_code": "_Test Serialized Item", - "warehouse": "_Test Warehouse - _TC", - } - ) - - doc.load_from_db() - - s2.append( - "items", - { - "item_code": "_Test Serialized Item", - "t_warehouse": "_Test Warehouse - _TC", - "qty": 2, - "basic_rate": 120, - "expense_account": "Stock Adjustment - _TC", - "conversion_factor": 1.0, - "cost_center": "_Test Cost Center - _TC", - "serial_and_batch_bundle": bundle_id, - }, - ) - - s2.submit() - s2.cancel() - frappe.flags.use_serial_and_batch_fields = False - def test_quality_check(self): item_code = "_Test Item For QC" if not frappe.db.exists("Item", item_code): From d61f696f85084bfec858a32c4d819f021e0a6bae Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 15 Nov 2024 17:28:41 +0530 Subject: [PATCH 0484/1614] feat: inventory dimension for rejected materials (backport #44156) (#44165) feat: inventory dimension for rejected materials (#44156) (cherry picked from commit 9bf16df41ed15f8ed57558262db5277c0d9f3ae4) Co-authored-by: rohitwaghchaure --- erpnext/controllers/stock_controller.py | 9 ++++++ .../inventory_dimension.py | 23 +++++++++++-- .../test_inventory_dimension.py | 32 +++++++++++++++++-- 3 files changed, 58 insertions(+), 6 deletions(-) diff --git a/erpnext/controllers/stock_controller.py b/erpnext/controllers/stock_controller.py index 046a0c7da30..4eb67b6f42e 100644 --- a/erpnext/controllers/stock_controller.py +++ b/erpnext/controllers/stock_controller.py @@ -839,6 +839,15 @@ class StockController(AccountsController): if not dimension: continue + if ( + self.doctype in ["Purchase Invoice", "Purchase Receipt"] + and row.get("rejected_warehouse") + and sl_dict.get("warehouse") == row.get("rejected_warehouse") + ): + fieldname = f"rejected_{dimension.source_fieldname}" + sl_dict[dimension.target_fieldname] = row.get(fieldname) + continue + if self.doctype in [ "Purchase Invoice", "Purchase Receipt", diff --git a/erpnext/stock/doctype/inventory_dimension/inventory_dimension.py b/erpnext/stock/doctype/inventory_dimension/inventory_dimension.py index 3bafa12983f..4f8a166932d 100644 --- a/erpnext/stock/doctype/inventory_dimension/inventory_dimension.py +++ b/erpnext/stock/doctype/inventory_dimension/inventory_dimension.py @@ -107,6 +107,7 @@ class InventoryDimension(Document): self.source_fieldname, f"to_{self.source_fieldname}", f"from_{self.source_fieldname}", + f"rejected_{self.source_fieldname}", ], ) } @@ -171,12 +172,12 @@ class InventoryDimension(Document): if label_start_with: label = f"{label_start_with} {self.dimension_name}" - return [ + dimension_fields = [ dict( fieldname="inventory_dimension", fieldtype="Section Break", insert_after=self.get_insert_after_fieldname(doctype), - label="Inventory Dimension", + label=_("Inventory Dimension"), collapsible=1, ), dict( @@ -184,13 +185,29 @@ class InventoryDimension(Document): fieldtype="Link", insert_after="inventory_dimension", options=self.reference_document, - label=label, + label=_(label), search_index=1, reqd=self.reqd, mandatory_depends_on=self.mandatory_depends_on, ), ] + if doctype in ["Purchase Invoice Item", "Purchase Receipt Item"]: + dimension_fields.append( + dict( + fieldname="rejected_" + self.source_fieldname, + fieldtype="Link", + insert_after=self.source_fieldname, + options=self.reference_document, + label=_("Rejected " + self.dimension_name), + search_index=1, + reqd=self.reqd, + mandatory_depends_on=self.mandatory_depends_on, + ) + ) + + return dimension_fields + def add_custom_fields(self): custom_fields = {} diff --git a/erpnext/stock/doctype/inventory_dimension/test_inventory_dimension.py b/erpnext/stock/doctype/inventory_dimension/test_inventory_dimension.py index 918399a7f66..f8128ce0033 100644 --- a/erpnext/stock/doctype/inventory_dimension/test_inventory_dimension.py +++ b/erpnext/stock/doctype/inventory_dimension/test_inventory_dimension.py @@ -269,21 +269,47 @@ class TestInventoryDimension(FrappeTestCase): item_code = "Test Inventory Dimension Item" create_item(item_code) warehouse = create_warehouse("Store Warehouse") + rj_warehouse = create_warehouse("RJ Warehouse") + + if not frappe.db.exists("Store", "Rejected Store"): + frappe.get_doc({"doctype": "Store", "store_name": "Rejected Store"}).insert( + ignore_permissions=True + ) # Purchase Receipt -> Inward in Store 1 pr_doc = make_purchase_receipt( - item_code=item_code, warehouse=warehouse, qty=10, rate=100, do_not_submit=True + item_code=item_code, + warehouse=warehouse, + qty=10, + rejected_qty=5, + rate=100, + rejected_warehouse=rj_warehouse, + do_not_submit=True, ) pr_doc.items[0].store = "Store 1" + pr_doc.items[0].rejected_store = "Rejected Store" pr_doc.save() pr_doc.submit() - entries = get_voucher_sl_entries(pr_doc.name, ["warehouse", "store", "incoming_rate"]) + entries = frappe.get_all( + "Stock Ledger Entry", + filters={"voucher_no": pr_doc.name, "warehouse": warehouse}, + fields=["store"], + order_by="creation", + ) - self.assertEqual(entries[0].warehouse, warehouse) self.assertEqual(entries[0].store, "Store 1") + entries = frappe.get_all( + "Stock Ledger Entry", + filters={"voucher_no": pr_doc.name, "warehouse": rj_warehouse}, + fields=["store"], + order_by="creation", + ) + + self.assertEqual(entries[0].store, "Rejected Store") + # Stock Entry -> Transfer from Store 1 to Store 2 se_doc = make_stock_entry( item_code=item_code, qty=10, from_warehouse=warehouse, to_warehouse=warehouse, do_not_save=True From 2a54cd50041f40bcb5e748232521cbab4eee8387 Mon Sep 17 00:00:00 2001 From: UmakanthKaspa Date: Fri, 15 Nov 2024 05:43:25 +0000 Subject: [PATCH 0485/1614] refactor: set 'cannot_add_rows' directly in the allocations table field (optimized approach) (cherry picked from commit 5dd8eafdfc7e077f40c330819bcbcbb132bd3f40) --- erpnext/public/js/utils/unreconcile.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/erpnext/public/js/utils/unreconcile.js b/erpnext/public/js/utils/unreconcile.js index 4854bf6b452..7dba4705e40 100644 --- a/erpnext/public/js/utils/unreconcile.js +++ b/erpnext/public/js/utils/unreconcile.js @@ -100,6 +100,7 @@ erpnext.accounts.unreconcile_payment = { fieldtype: "Table", read_only: 1, fields: child_table_fields, + cannot_add_rows: true, }, ]; @@ -119,14 +120,6 @@ erpnext.accounts.unreconcile_payment = { return r.message; }; - const allocationsTableField = unreconcile_dialog_fields.find( - (field) => field.fieldname === "allocations" - ); - - if (allocationsTableField) { - allocationsTableField.cannot_add_rows = true; - } - let d = new frappe.ui.Dialog({ title: "UnReconcile Allocations", fields: unreconcile_dialog_fields, From 5848de76ea3049cf3b25c88cc0a510f7712945c5 Mon Sep 17 00:00:00 2001 From: vishakhdesai Date: Thu, 14 Nov 2024 17:31:34 +0530 Subject: [PATCH 0486/1614] fix: set conversion factor before applying price list (cherry picked from commit 9749fe23cc82181f1fb58aa481b0c3c7d633699e) --- erpnext/public/js/controllers/transaction.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 0efec214c0d..ca1b1c8c590 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -1237,8 +1237,8 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe }, callback: function(r) { if(!r.exc) { - me.apply_price_list(item, true) frappe.model.set_value(cdt, cdn, 'conversion_factor', r.message.conversion_factor); + me.apply_price_list(item, true); } } }); From 08f6ceeb5001d5e9159c7a9c0134467121298da0 Mon Sep 17 00:00:00 2001 From: vishakhdesai Date: Wed, 13 Nov 2024 17:27:49 +0530 Subject: [PATCH 0487/1614] fix: set default party type in Payment Entry (cherry picked from commit 19222690d31e486ccd634d7530f2c85eda7cf4c0) --- .../doctype/payment_entry/payment_entry.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.js b/erpnext/accounts/doctype/payment_entry/payment_entry.js index 7ababfec81a..a377aa04db2 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.js +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.js @@ -26,6 +26,10 @@ frappe.ui.form.on("Payment Entry", { } erpnext.accounts.dimensions.setup_dimension_filters(frm, frm.doctype); + + if (frm.is_new()) { + set_default_party_type(frm); + } }, setup: function (frm) { @@ -403,6 +407,8 @@ frappe.ui.form.on("Payment Entry", { }, payment_type: function (frm) { + set_default_party_type(frm); + if (frm.doc.payment_type == "Internal Transfer") { $.each( [ @@ -1776,3 +1782,16 @@ frappe.ui.form.on("Payment Entry Deduction", { frm.events.set_unallocated_amount(frm); }, }); + +function set_default_party_type(frm) { + if (frm.doc.party) return; + + let party_type; + if (frm.doc.payment_type == "Receive") { + party_type = "Customer"; + } else if (frm.doc.payment_type == "Pay") { + party_type = "Supplier"; + } + + if (party_type) frm.set_value("party_type", party_type); +} From c98a0ccd1dc5007941544ca49e0c2ad68d050323 Mon Sep 17 00:00:00 2001 From: Ninad1306 Date: Fri, 8 Nov 2024 12:51:05 +0530 Subject: [PATCH 0488/1614] fix: added disable_rounded_total field (cherry picked from commit f8524d526b5922e8223e21409f2997f2e7cd2f5b) # Conflicts: # erpnext/selling/doctype/quotation/quotation.json --- .../selling/doctype/quotation/quotation.json | 47 +++++++++++++++++++ .../selling/doctype/quotation/quotation.py | 1 + 2 files changed, 48 insertions(+) diff --git a/erpnext/selling/doctype/quotation/quotation.json b/erpnext/selling/doctype/quotation/quotation.json index 982e7326775..8d6b96c8e67 100644 --- a/erpnext/selling/doctype/quotation/quotation.json +++ b/erpnext/selling/doctype/quotation/quotation.json @@ -65,6 +65,7 @@ "grand_total", "rounding_adjustment", "rounded_total", + "disable_rounded_total", "in_words", "section_break_44", "apply_discount_on", @@ -661,6 +662,7 @@ "width": "200px" }, { + "depends_on": "eval:!doc.disable_rounded_total", "fieldname": "base_rounding_adjustment", "fieldtype": "Currency", "label": "Rounding Adjustment (Company Currency)", @@ -709,6 +711,7 @@ "width": "200px" }, { + "depends_on": "eval:!doc.disable_rounded_total", "fieldname": "rounding_adjustment", "fieldtype": "Currency", "label": "Rounding Adjustment", @@ -1067,13 +1070,57 @@ "fieldname": "named_place", "fieldtype": "Data", "label": "Named Place" +<<<<<<< HEAD +======= + }, + { + "fieldname": "utm_campaign", + "fieldtype": "Link", + "label": "Campaign", + "oldfieldname": "campaign", + "oldfieldtype": "Link", + "options": "UTM Campaign", + "print_hide": 1 + }, + { + "fieldname": "utm_source", + "fieldtype": "Link", + "label": "Source", + "oldfieldname": "source", + "oldfieldtype": "Select", + "options": "UTM Source", + "print_hide": 1 + }, + { + "fieldname": "utm_medium", + "fieldtype": "Link", + "label": "Medium", + "options": "UTM Medium", + "print_hide": 1 + }, + { + "fieldname": "utm_content", + "fieldtype": "Data", + "label": "Content", + "print_hide": 1 + }, + { + "default": "0", + "fieldname": "disable_rounded_total", + "fieldtype": "Check", + "label": "Disable Rounded Total" +>>>>>>> f8524d526b (fix: added disable_rounded_total field) } ], "icon": "fa fa-shopping-cart", "idx": 82, "is_submittable": 1, "links": [], +<<<<<<< HEAD "modified": "2024-03-20 16:04:21.567847", +======= + "modified": "2024-11-07 18:37:11.715189", +>>>>>>> f8524d526b (fix: added disable_rounded_total field) "modified_by": "Administrator", "module": "Selling", "name": "Quotation", diff --git a/erpnext/selling/doctype/quotation/quotation.py b/erpnext/selling/doctype/quotation/quotation.py index a5994756c46..8e560b8d0ab 100644 --- a/erpnext/selling/doctype/quotation/quotation.py +++ b/erpnext/selling/doctype/quotation/quotation.py @@ -61,6 +61,7 @@ class Quotation(SellingController): customer_address: DF.Link | None customer_group: DF.Link | None customer_name: DF.Data | None + disable_rounded_total: DF.Check discount_amount: DF.Currency enq_det: DF.Text | None grand_total: DF.Currency From b6524946bc9a708b7d1dcc8c1c29b3d0feec7b4f Mon Sep 17 00:00:00 2001 From: Ninad1306 Date: Tue, 12 Nov 2024 15:25:14 +0530 Subject: [PATCH 0489/1614] test: test to validate rounded total (cherry picked from commit 5a6261d3b4b3084dc1f45bef6584c55043084336) --- .../selling/doctype/quotation/test_quotation.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/erpnext/selling/doctype/quotation/test_quotation.py b/erpnext/selling/doctype/quotation/test_quotation.py index 9a31e335a05..05f43f26559 100644 --- a/erpnext/selling/doctype/quotation/test_quotation.py +++ b/erpnext/selling/doctype/quotation/test_quotation.py @@ -715,6 +715,20 @@ class TestQuotation(FrappeTestCase): item_doc.taxes = [] item_doc.save() + def test_grand_total_and_rounded_total_values(self): + quotation = make_quotation(qty=6, rate=12.3, do_not_submit=1) + + self.assertEqual(quotation.grand_total, 73.8) + self.assertEqual(quotation.rounding_adjustment, 0.2) + self.assertEqual(quotation.rounded_total, 74) + + quotation.disable_rounded_total = 1 + quotation.save() + + self.assertEqual(quotation.grand_total, 73.8) + self.assertEqual(quotation.rounding_adjustment, 0) + self.assertEqual(quotation.rounded_total, 0) + test_records = frappe.get_test_records("Quotation") From c0d3f8cbbe347f7326b4acead396e28daec01fc0 Mon Sep 17 00:00:00 2001 From: sudarsan2001 Date: Thu, 14 Nov 2024 01:11:12 +0530 Subject: [PATCH 0490/1614] fix: set debit in transaction currency in GL Entry (cherry picked from commit 29a6eb21a3cf33cd5d7a76e476646bf9c5e63c24) --- .../doctype/payment_entry/payment_entry.py | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index 8832b87eec7..3efcb155781 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -1248,13 +1248,22 @@ class PaymentEntry(AccountsController): base_unallocated_amount = self.unallocated_amount * exchange_rate gle = party_gl_dict.copy() - gle.update( - { - dr_or_cr + "_in_account_currency": self.unallocated_amount, - dr_or_cr: base_unallocated_amount, - } - ) + gle.update( + self.get_gl_dict( + { + "account": self.party_account, + "party_type": self.party_type, + "party": self.party, + "against": against_account, + "account_currency": self.party_account_currency, + "cost_center": self.cost_center, + dr_or_cr + "_in_account_currency": self.unallocated_amount, + dr_or_cr: base_unallocated_amount, + }, + item=self, + ) + ) if self.book_advance_payments_in_separate_party_account: gle.update( { From c30a17cd7a2fd009127d802596b66e81394c712d Mon Sep 17 00:00:00 2001 From: sudarsan2001 Date: Thu, 14 Nov 2024 01:28:16 +0530 Subject: [PATCH 0491/1614] test: add unit test to validate gl values (cherry picked from commit e8b8a589be75a840d75a2e46cf55364c040158a1) --- .../payment_entry/test_payment_entry.py | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/erpnext/accounts/doctype/payment_entry/test_payment_entry.py b/erpnext/accounts/doctype/payment_entry/test_payment_entry.py index 771c91a462c..2dcd5d6076f 100644 --- a/erpnext/accounts/doctype/payment_entry/test_payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/test_payment_entry.py @@ -956,6 +956,51 @@ class TestPaymentEntry(FrappeTestCase): self.assertEqual(flt(expected_party_balance), party_balance) self.assertEqual(flt(expected_party_account_balance, 2), flt(party_account_balance, 2)) + def test_gl_of_multi_currency_payment_transaction(self): + from erpnext.setup.doctype.currency_exchange.test_currency_exchange import save_new_records + + save_new_records(self.globalTestRecords["Currency Exchange"]) + paid_from = create_account( + parent_account="Current Liabilities - _TC", + account_name="Cash USD", + company="_Test Company", + account_type="Cash", + account_currency="USD", + ) + payment_entry = create_payment_entry( + party="_Test Supplier USD", + paid_from=paid_from, + paid_to="_Test Payable USD - _TC", + paid_amount=100, + save=True, + ) + payment_entry.source_exchange_rate = 84.4 + payment_entry.target_exchange_rate = 84.4 + payment_entry.save() + payment_entry = payment_entry.submit() + gle = qb.DocType("GL Entry") + gl_entries = ( + qb.from_(gle) + .select( + gle.account, + gle.debit, + gle.credit, + gle.debit_in_account_currency, + gle.credit_in_account_currency, + gle.debit_in_transaction_currency, + gle.credit_in_transaction_currency, + ) + .orderby(gle.account) + .where(gle.voucher_no == payment_entry.name) + .run() + ) + expected_gl_entries = ( + ("_Test Payable USD - _TC", 8440.0, 0, 100.0, 0.0, 8440.0, 0.0), + (paid_from, 0, 8440.0, 0, 100.0, 0, 8440.0), + ) + + self.assertEqual(gl_entries, expected_gl_entries) + def test_multi_currency_payment_entry_with_taxes(self): payment_entry = create_payment_entry( party="_Test Supplier USD", paid_to="_Test Payable USD - _TC", save=True From 7cc31df58774d77ef185c0f327ae0623a156b675 Mon Sep 17 00:00:00 2001 From: sudarsan2001 Date: Thu, 14 Nov 2024 10:59:51 +0530 Subject: [PATCH 0492/1614] chore: change account name (cherry picked from commit 4a1cd5a8d6bf920b682fa731f1fc087e09ea94e5) --- .../accounts/doctype/payment_entry/test_payment_entry.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/doctype/payment_entry/test_payment_entry.py b/erpnext/accounts/doctype/payment_entry/test_payment_entry.py index 2dcd5d6076f..c61598b54a5 100644 --- a/erpnext/accounts/doctype/payment_entry/test_payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/test_payment_entry.py @@ -962,7 +962,7 @@ class TestPaymentEntry(FrappeTestCase): save_new_records(self.globalTestRecords["Currency Exchange"]) paid_from = create_account( parent_account="Current Liabilities - _TC", - account_name="Cash USD", + account_name="_Test Cash USD", company="_Test Company", account_type="Cash", account_currency="USD", @@ -995,10 +995,9 @@ class TestPaymentEntry(FrappeTestCase): .run() ) expected_gl_entries = ( - ("_Test Payable USD - _TC", 8440.0, 0, 100.0, 0.0, 8440.0, 0.0), - (paid_from, 0, 8440.0, 0, 100.0, 0, 8440.0), + (paid_from, 0.0, 8440.0, 0.0, 100.0, 0.0, 8440.0), + ("_Test Payable USD - _TC", 8440.0, 0.0, 100.0, 0.0, 8440.0, 0.0), ) - self.assertEqual(gl_entries, expected_gl_entries) def test_multi_currency_payment_entry_with_taxes(self): From d7deed6c450708e74a58469d852f909d9893a16a Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 18 Nov 2024 16:25:44 +0530 Subject: [PATCH 0493/1614] refactor: assume any of the foreign currency as transaction currency On a foreign currency payment entry, assume any one of the foreign currency as the transaction currency (cherry picked from commit 6681882bd8003cac1d8d4eda76141ec5a6b6b246) --- erpnext/accounts/doctype/payment_entry/payment_entry.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index 3efcb155781..b9fad5c9010 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -1146,6 +1146,12 @@ class PaymentEntry(AccountsController): if self.payment_type in ("Receive", "Pay") and not self.get("party_account_field"): self.setup_party_account_field() + company_currency = erpnext.get_company_currency(self.company) + if self.paid_from_account_currency != company_currency: + self.currency = self.paid_from_account_currency + elif self.paid_to_account_currency != company_currency: + self.currency = self.paid_to_account_currency + gl_entries = [] self.add_party_gl_entries(gl_entries) self.add_bank_gl_entries(gl_entries) From b130e2065b5998ef42b754442fda9c5bf4cf60d9 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 18 Nov 2024 21:08:21 +0100 Subject: [PATCH 0494/1614] feat: new DocTypes "Code List" and "Common Code" (backport #43425) (#44173) Co-authored-by: David Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com> --- erpnext/edi/__init__.py | 0 erpnext/edi/doctype/__init__.py | 0 erpnext/edi/doctype/code_list/__init__.py | 0 erpnext/edi/doctype/code_list/code_list.js | 51 ++++ erpnext/edi/doctype/code_list/code_list.json | 112 +++++++++ erpnext/edi/doctype/code_list/code_list.py | 125 ++++++++++ .../edi/doctype/code_list/code_list_import.js | 218 ++++++++++++++++++ .../edi/doctype/code_list/code_list_import.py | 140 +++++++++++ .../edi/doctype/code_list/code_list_list.js | 8 + .../edi/doctype/code_list/test_code_list.py | 9 + erpnext/edi/doctype/common_code/__init__.py | 0 .../edi/doctype/common_code/common_code.js | 8 + .../edi/doctype/common_code/common_code.json | 103 +++++++++ .../edi/doctype/common_code/common_code.py | 114 +++++++++ .../doctype/common_code/common_code_list.js | 8 + .../doctype/common_code/test_common_code.py | 9 + erpnext/hooks.py | 8 + erpnext/modules.txt | 1 + 18 files changed, 914 insertions(+) create mode 100644 erpnext/edi/__init__.py create mode 100644 erpnext/edi/doctype/__init__.py create mode 100644 erpnext/edi/doctype/code_list/__init__.py create mode 100644 erpnext/edi/doctype/code_list/code_list.js create mode 100644 erpnext/edi/doctype/code_list/code_list.json create mode 100644 erpnext/edi/doctype/code_list/code_list.py create mode 100644 erpnext/edi/doctype/code_list/code_list_import.js create mode 100644 erpnext/edi/doctype/code_list/code_list_import.py create mode 100644 erpnext/edi/doctype/code_list/code_list_list.js create mode 100644 erpnext/edi/doctype/code_list/test_code_list.py create mode 100644 erpnext/edi/doctype/common_code/__init__.py create mode 100644 erpnext/edi/doctype/common_code/common_code.js create mode 100644 erpnext/edi/doctype/common_code/common_code.json create mode 100644 erpnext/edi/doctype/common_code/common_code.py create mode 100644 erpnext/edi/doctype/common_code/common_code_list.js create mode 100644 erpnext/edi/doctype/common_code/test_common_code.py diff --git a/erpnext/edi/__init__.py b/erpnext/edi/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/erpnext/edi/doctype/__init__.py b/erpnext/edi/doctype/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/erpnext/edi/doctype/code_list/__init__.py b/erpnext/edi/doctype/code_list/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/erpnext/edi/doctype/code_list/code_list.js b/erpnext/edi/doctype/code_list/code_list.js new file mode 100644 index 00000000000..f8b9a2003fd --- /dev/null +++ b/erpnext/edi/doctype/code_list/code_list.js @@ -0,0 +1,51 @@ +// Copyright (c) 2024, Frappe Technologies Pvt. Ltd. and contributors +// For license information, please see license.txt + +frappe.ui.form.on("Code List", { + refresh: (frm) => { + if (!frm.doc.__islocal) { + frm.add_custom_button(__("Import Genericode File"), function () { + erpnext.edi.import_genericode(frm); + }); + } + }, + setup: (frm) => { + frm.savetrash = () => { + frm.validate_form_action("Delete"); + frappe.confirm( + __( + "Are you sure you want to delete {0}?

This action will also delete all associated Common Code documents.

", + [frm.docname.bold()] + ), + function () { + return frappe.call({ + method: "frappe.client.delete", + args: { + doctype: frm.doctype, + name: frm.docname, + }, + freeze: true, + freeze_message: __("Deleting {0} and all associated Common Code documents...", [ + frm.docname, + ]), + callback: function (r) { + if (!r.exc) { + frappe.utils.play_sound("delete"); + frappe.model.clear_doc(frm.doctype, frm.docname); + window.history.back(); + } + }, + }); + } + ); + }; + + frm.set_query("default_common_code", function (doc) { + return { + filters: { + code_list: doc.name, + }, + }; + }); + }, +}); diff --git a/erpnext/edi/doctype/code_list/code_list.json b/erpnext/edi/doctype/code_list/code_list.json new file mode 100644 index 00000000000..ffcc2f2b605 --- /dev/null +++ b/erpnext/edi/doctype/code_list/code_list.json @@ -0,0 +1,112 @@ +{ + "actions": [], + "allow_copy": 1, + "allow_rename": 1, + "autoname": "prompt", + "creation": "2024-09-29 06:55:03.920375", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "title", + "canonical_uri", + "url", + "default_common_code", + "column_break_nkls", + "version", + "publisher", + "publisher_id", + "section_break_npxp", + "description" + ], + "fields": [ + { + "fieldname": "title", + "fieldtype": "Data", + "label": "Title" + }, + { + "fieldname": "publisher", + "fieldtype": "Data", + "in_standard_filter": 1, + "label": "Publisher" + }, + { + "columns": 1, + "fieldname": "version", + "fieldtype": "Data", + "in_list_view": 1, + "label": "Version" + }, + { + "fieldname": "description", + "fieldtype": "Small Text", + "label": "Description" + }, + { + "fieldname": "canonical_uri", + "fieldtype": "Data", + "in_list_view": 1, + "label": "Canonical URI" + }, + { + "fieldname": "column_break_nkls", + "fieldtype": "Column Break" + }, + { + "fieldname": "section_break_npxp", + "fieldtype": "Section Break" + }, + { + "fieldname": "publisher_id", + "fieldtype": "Data", + "in_standard_filter": 1, + "label": "Publisher ID" + }, + { + "fieldname": "url", + "fieldtype": "Data", + "label": "URL", + "options": "URL" + }, + { + "description": "This value shall be used when no matching Common Code for a record is found.", + "fieldname": "default_common_code", + "fieldtype": "Link", + "label": "Default Common Code", + "options": "Common Code" + } + ], + "index_web_pages_for_search": 1, + "links": [ + { + "link_doctype": "Common Code", + "link_fieldname": "code_list" + } + ], + "modified": "2024-11-16 17:01:40.260293", + "modified_by": "Administrator", + "module": "EDI", + "name": "Code List", + "naming_rule": "Set by user", + "owner": "Administrator", + "permissions": [ + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, + "write": 1 + } + ], + "search_fields": "description", + "show_title_field_in_link": 1, + "sort_field": "creation", + "sort_order": "DESC", + "states": [], + "title_field": "title" +} \ No newline at end of file diff --git a/erpnext/edi/doctype/code_list/code_list.py b/erpnext/edi/doctype/code_list/code_list.py new file mode 100644 index 00000000000..8957c6565b9 --- /dev/null +++ b/erpnext/edi/doctype/code_list/code_list.py @@ -0,0 +1,125 @@ +# Copyright (c) 2024, Frappe Technologies Pvt. Ltd. and contributors +# For license information, please see license.txt + +from typing import TYPE_CHECKING + +import frappe +from frappe.model.document import Document + +if TYPE_CHECKING: + from lxml.etree import Element + + +class CodeList(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + canonical_uri: DF.Data | None + default_common_code: DF.Link | None + description: DF.SmallText | None + publisher: DF.Data | None + publisher_id: DF.Data | None + title: DF.Data | None + url: DF.Data | None + version: DF.Data | None + # end: auto-generated types + + def on_trash(self): + if not frappe.flags.in_bulk_delete: + self.__delete_linked_docs() + + def __delete_linked_docs(self): + self.db_set("default_common_code", None) + + linked_docs = frappe.get_all( + "Common Code", + filters={"code_list": self.name}, + fields=["name"], + ) + + for doc in linked_docs: + frappe.delete_doc("Common Code", doc.name) + + def get_codes_for(self, doctype: str, name: str) -> tuple[str]: + """Get the applicable codes for a doctype and name""" + return get_codes_for(self.name, doctype, name) + + def get_docnames_for(self, doctype: str, code: str) -> tuple[str]: + """Get the mapped docnames for a doctype and code""" + return get_docnames_for(self.name, doctype, code) + + def get_default_code(self) -> str | None: + """Get the default common code for this code list""" + return ( + frappe.db.get_value("Common Code", self.default_common_code, "common_code") + if self.default_common_code + else None + ) + + def from_genericode(self, root: "Element"): + """Extract Code List details from genericode XML""" + self.title = root.find(".//Identification/ShortName").text + self.version = root.find(".//Identification/Version").text + self.canonical_uri = root.find(".//CanonicalUri").text + # optionals + self.description = getattr(root.find(".//Identification/LongName"), "text", None) + self.publisher = getattr(root.find(".//Identification/Agency/ShortName"), "text", None) + if not self.publisher: + self.publisher = getattr(root.find(".//Identification/Agency/LongName"), "text", None) + self.publisher_id = getattr(root.find(".//Identification/Agency/Identifier"), "text", None) + self.url = getattr(root.find(".//Identification/LocationUri"), "text", None) + + +def get_codes_for(code_list: str, doctype: str, name: str) -> tuple[str]: + """Return the common code for a given record""" + CommonCode = frappe.qb.DocType("Common Code") + DynamicLink = frappe.qb.DocType("Dynamic Link") + + codes = ( + frappe.qb.from_(CommonCode) + .join(DynamicLink) + .on((CommonCode.name == DynamicLink.parent) & (DynamicLink.parenttype == "Common Code")) + .select(CommonCode.common_code) + .where( + (DynamicLink.link_doctype == doctype) + & (DynamicLink.link_name == name) + & (CommonCode.code_list == code_list) + ) + .distinct() + .orderby(CommonCode.common_code) + ).run() + + return tuple(c[0] for c in codes) if codes else () + + +def get_docnames_for(code_list: str, doctype: str, code: str) -> tuple[str]: + """Return the record name for a given common code""" + CommonCode = frappe.qb.DocType("Common Code") + DynamicLink = frappe.qb.DocType("Dynamic Link") + + docnames = ( + frappe.qb.from_(CommonCode) + .join(DynamicLink) + .on((CommonCode.name == DynamicLink.parent) & (DynamicLink.parenttype == "Common Code")) + .select(DynamicLink.link_name) + .where( + (DynamicLink.link_doctype == doctype) + & (CommonCode.common_code == code) + & (CommonCode.code_list == code_list) + ) + .distinct() + .orderby(DynamicLink.idx) + ).run() + + return tuple(d[0] for d in docnames) if docnames else () + + +def get_default_code(code_list: str) -> str | None: + """Return the default common code for a given code list""" + code_id = frappe.db.get_value("Code List", code_list, "default_common_code") + return frappe.db.get_value("Common Code", code_id, "common_code") if code_id else None diff --git a/erpnext/edi/doctype/code_list/code_list_import.js b/erpnext/edi/doctype/code_list/code_list_import.js new file mode 100644 index 00000000000..4a33f3e2fe6 --- /dev/null +++ b/erpnext/edi/doctype/code_list/code_list_import.js @@ -0,0 +1,218 @@ +frappe.provide("erpnext.edi"); + +erpnext.edi.import_genericode = function (listview_or_form) { + let doctype = "Code List"; + let docname = undefined; + if (listview_or_form.doc !== undefined) { + docname = listview_or_form.doc.name; + } + new frappe.ui.FileUploader({ + method: "erpnext.edi.doctype.code_list.code_list_import.import_genericode", + doctype: doctype, + docname: docname, + allow_toggle_private: false, + allow_take_photo: false, + on_success: function (_file_doc, r) { + listview_or_form.refresh(); + show_column_selection_dialog(r.message); + }, + }); +}; + +function show_column_selection_dialog(context) { + let title_description = __("If there is no title column, use the code column for the title."); + let default_title = get_default(context.columns, ["name", "Name", "code-name", "scheme-name"]); + let fields = [ + { + fieldtype: "HTML", + fieldname: "code_list_info", + options: `
${__( + "You are importing data for the code list:" + )} ${frappe.utils.get_form_link( + "Code List", + context.code_list, + true, + context.code_list_title + )}
`, + }, + { + fieldtype: "Section Break", + }, + { + fieldname: "import_column", + label: __("Import"), + fieldtype: "Column Break", + }, + { + fieldname: "title_column", + label: __("as Title"), + fieldtype: "Select", + reqd: 1, + options: context.columns, + default: default_title, + description: default_title ? null : title_description, + }, + { + fieldname: "code_column", + label: __("as Code"), + fieldtype: "Select", + options: context.columns, + reqd: 1, + default: get_default(context.columns, ["code", "Code", "value"]), + }, + { + fieldname: "filters_column", + label: __("Filter"), + fieldtype: "Column Break", + }, + ]; + + if (context.columns.length > 2) { + fields.splice(5, 0, { + fieldname: "description_column", + label: __("as Description"), + fieldtype: "Select", + options: [null].concat(context.columns), + default: get_default(context.columns, [ + "description", + "Description", + "remark", + __("description"), + __("Description"), + ]), + }); + } + + // Add filterable columns + for (let column in context.filterable_columns) { + fields.push({ + fieldname: `filter_${column}`, + label: __("by {}", [column]), + fieldtype: "Select", + options: [null].concat(context.filterable_columns[column]), + }); + } + + fields.push( + { + fieldname: "preview_section", + label: __("Preview"), + fieldtype: "Section Break", + }, + { + fieldname: "preview_html", + fieldtype: "HTML", + } + ); + + let d = new frappe.ui.Dialog({ + title: __("Select Columns and Filters"), + fields: fields, + primary_action_label: __("Import"), + size: "large", // This will make the modal wider + primary_action(values) { + let filters = {}; + for (let field in values) { + if (field.startsWith("filter_") && values[field]) { + filters[field.replace("filter_", "")] = values[field]; + } + } + frappe + .xcall("erpnext.edi.doctype.code_list.code_list_import.process_genericode_import", { + code_list_name: context.code_list, + file_name: context.file, + code_column: values.code_column, + title_column: values.title_column, + description_column: values.description_column, + filters: filters, + }) + .then((count) => { + frappe.msgprint(__("Import completed. {0} common codes created.", [count])); + }); + d.hide(); + }, + }); + + d.fields_dict.code_column.df.onchange = () => update_preview(d, context); + d.fields_dict.title_column.df.onchange = (e) => { + let field = d.fields_dict.title_column; + if (!e.target.value) { + field.df.description = title_description; + field.refresh(); + } else { + field.df.description = null; + field.refresh(); + } + update_preview(d, context); + }; + + // Add onchange events for filterable columns + for (let column in context.filterable_columns) { + d.fields_dict[`filter_${column}`].df.onchange = () => update_preview(d, context); + } + + d.show(); + update_preview(d, context); +} + +/** + * Return the first key from the keys array that is found in the columns array. + */ +function get_default(columns, keys) { + return keys.find((key) => columns.includes(key)); +} + +function update_preview(dialog, context) { + let code_column = dialog.get_value("code_column"); + let title_column = dialog.get_value("title_column"); + let description_column = dialog.get_value("description_column"); + + let html = ''; + if (title_column) html += ``; + if (code_column) html += ``; + if (description_column) html += ``; + + // Add headers for filterable columns + for (let column in context.filterable_columns) { + if (dialog.get_value(`filter_${column}`)) { + html += ``; + } + } + + html += ""; + + for (let i = 0; i < 3; i++) { + html += ""; + if (title_column) { + let title = context.example_values[title_column][i] || ""; + html += ``; + } + if (code_column) { + let code = context.example_values[code_column][i] || ""; + html += ``; + } + if (description_column) { + let description = context.example_values[description_column][i] || ""; + html += ``; + } + + // Add values for filterable columns + for (let column in context.filterable_columns) { + if (dialog.get_value(`filter_${column}`)) { + let value = context.example_values[column][i] || ""; + html += ``; + } + } + + html += ""; + } + + html += "
${__("Title")}${__("Code")}${__("Description")}${__(column)}
${truncate(title)}${truncate(code)}${truncate(description)}${truncate(value)}
"; + + dialog.fields_dict.preview_html.$wrapper.html(html); +} + +function truncate(value, maxLength = 40) { + if (typeof value !== "string") return ""; + return value.length > maxLength ? value.substring(0, maxLength - 3) + "..." : value; +} diff --git a/erpnext/edi/doctype/code_list/code_list_import.py b/erpnext/edi/doctype/code_list/code_list_import.py new file mode 100644 index 00000000000..50df3be471e --- /dev/null +++ b/erpnext/edi/doctype/code_list/code_list_import.py @@ -0,0 +1,140 @@ +import json + +import frappe +import requests +from frappe import _ +from lxml import etree + +URL_PREFIXES = ("http://", "https://") + + +@frappe.whitelist() +def import_genericode(): + doctype = "Code List" + docname = frappe.form_dict.docname + content = frappe.local.uploaded_file + + # recover the content, if it's a link + if (file_url := frappe.local.uploaded_file_url) and file_url.startswith(URL_PREFIXES): + try: + # If it's a URL, fetch the content and make it a local file (for durable audit) + response = requests.get(frappe.local.uploaded_file_url) + response.raise_for_status() + frappe.local.uploaded_file = content = response.content + frappe.local.uploaded_filename = frappe.local.uploaded_file_url.split("/")[-1] + frappe.local.uploaded_file_url = None + except Exception as e: + frappe.throw(f"
{e!s}
", title=_("Fetching Error")) + + if file_url := frappe.local.uploaded_file_url: + file_path = frappe.utils.file_manager.get_file_path(file_url) + with open(file_path.encode(), mode="rb") as f: + content = f.read() + + # Parse the xml content + parser = etree.XMLParser(remove_blank_text=True) + try: + root = etree.fromstring(content, parser=parser) + except Exception as e: + frappe.throw(f"
{e!s}
", title=_("Parsing Error")) + + # Extract the name (CanonicalVersionUri) from the parsed XML + name = root.find(".//CanonicalVersionUri").text + docname = docname or name + + if frappe.db.exists(doctype, docname): + code_list = frappe.get_doc(doctype, docname) + if code_list.name != name: + frappe.throw(_("The uploaded file does not match the selected Code List.")) + else: + # Create a new Code List document with the extracted name + code_list = frappe.new_doc(doctype) + code_list.name = name + + code_list.from_genericode(root) + code_list.save() + + # Attach the file and provide a recoverable identifier + file_doc = frappe.get_doc( + { + "doctype": "File", + "attached_to_doctype": "Code List", + "attached_to_name": code_list.name, + "folder": "Home/Attachments", + "file_name": frappe.local.uploaded_filename, + "file_url": frappe.local.uploaded_file_url, + "is_private": 1, + "content": content, + } + ).save() + + # Get available columns and example values + columns, example_values, filterable_columns = get_genericode_columns_and_examples(root) + + return { + "code_list": code_list.name, + "code_list_title": code_list.title, + "file": file_doc.name, + "columns": columns, + "example_values": example_values, + "filterable_columns": filterable_columns, + } + + +@frappe.whitelist() +def process_genericode_import( + code_list_name: str, + file_name: str, + code_column: str, + title_column: str | None = None, + description_column: str | None = None, + filters: str | None = None, +): + from erpnext.edi.doctype.common_code.common_code import import_genericode + + column_map = {"code": code_column, "title": title_column, "description": description_column} + + return import_genericode(code_list_name, file_name, column_map, json.loads(filters) if filters else None) + + +def get_genericode_columns_and_examples(root): + columns = [] + example_values = {} + filterable_columns = {} + + # Get column names + for column in root.findall(".//Column"): + column_id = column.get("Id") + columns.append(column_id) + example_values[column_id] = [] + filterable_columns[column_id] = set() + + # Get all values and count unique occurrences + for row in root.findall(".//SimpleCodeList/Row"): + for value in row.findall("Value"): + column_id = value.get("ColumnRef") + if column_id not in columns: + # Handle undeclared column + columns.append(column_id) + example_values[column_id] = [] + filterable_columns[column_id] = set() + + simple_value = value.find("./SimpleValue") + if simple_value is None: + continue + + filterable_columns[column_id].add(simple_value.text) + + # Get example values (up to 3) and filter columns with cardinality <= 5 + for row in root.findall(".//SimpleCodeList/Row")[:3]: + for value in row.findall("Value"): + column_id = value.get("ColumnRef") + simple_value = value.find("./SimpleValue") + if simple_value is None: + continue + + example_values[column_id].append(simple_value.text) + + filterable_columns = {k: list(v) for k, v in filterable_columns.items() if len(v) <= 5} + + return columns, example_values, filterable_columns diff --git a/erpnext/edi/doctype/code_list/code_list_list.js b/erpnext/edi/doctype/code_list/code_list_list.js new file mode 100644 index 00000000000..08125de2903 --- /dev/null +++ b/erpnext/edi/doctype/code_list/code_list_list.js @@ -0,0 +1,8 @@ +frappe.listview_settings["Code List"] = { + onload: function (listview) { + listview.page.add_inner_button(__("Import Genericode File"), function () { + erpnext.edi.import_genericode(listview); + }); + }, + hide_name_column: true, +}; diff --git a/erpnext/edi/doctype/code_list/test_code_list.py b/erpnext/edi/doctype/code_list/test_code_list.py new file mode 100644 index 00000000000..d37b1ee8f5a --- /dev/null +++ b/erpnext/edi/doctype/code_list/test_code_list.py @@ -0,0 +1,9 @@ +# Copyright (c) 2024, Frappe Technologies Pvt. Ltd. and Contributors +# See license.txt + +# import frappe +from frappe.tests.utils import FrappeTestCase + + +class TestCodeList(FrappeTestCase): + pass diff --git a/erpnext/edi/doctype/common_code/__init__.py b/erpnext/edi/doctype/common_code/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/erpnext/edi/doctype/common_code/common_code.js b/erpnext/edi/doctype/common_code/common_code.js new file mode 100644 index 00000000000..646d5c85b74 --- /dev/null +++ b/erpnext/edi/doctype/common_code/common_code.js @@ -0,0 +1,8 @@ +// Copyright (c) 2024, Frappe Technologies Pvt. Ltd. and contributors +// For license information, please see license.txt + +// frappe.ui.form.on("Common Code", { +// refresh(frm) { + +// }, +// }); diff --git a/erpnext/edi/doctype/common_code/common_code.json b/erpnext/edi/doctype/common_code/common_code.json new file mode 100644 index 00000000000..b2cb43fa575 --- /dev/null +++ b/erpnext/edi/doctype/common_code/common_code.json @@ -0,0 +1,103 @@ +{ + "actions": [], + "autoname": "hash", + "creation": "2024-09-29 07:01:18.133067", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "code_list", + "title", + "common_code", + "description", + "column_break_wxsw", + "additional_data", + "section_break_rhgh", + "applies_to" + ], + "fields": [ + { + "fieldname": "code_list", + "fieldtype": "Link", + "in_list_view": 1, + "in_standard_filter": 1, + "label": "Code List", + "options": "Code List", + "reqd": 1, + "search_index": 1 + }, + { + "fieldname": "title", + "fieldtype": "Data", + "in_list_view": 1, + "in_standard_filter": 1, + "label": "Title", + "length": 300, + "reqd": 1 + }, + { + "fieldname": "column_break_wxsw", + "fieldtype": "Column Break" + }, + { + "fieldname": "section_break_rhgh", + "fieldtype": "Section Break" + }, + { + "fieldname": "applies_to", + "fieldtype": "Table", + "label": "Applies To", + "options": "Dynamic Link" + }, + { + "fieldname": "common_code", + "fieldtype": "Data", + "in_list_view": 1, + "in_standard_filter": 1, + "label": "Common Code", + "length": 300, + "reqd": 1, + "search_index": 1 + }, + { + "fieldname": "additional_data", + "fieldtype": "Code", + "label": "Additional Data", + "max_height": "190px", + "read_only": 1 + }, + { + "fieldname": "description", + "fieldtype": "Small Text", + "in_list_view": 1, + "label": "Description", + "max_height": "60px" + } + ], + "links": [], + "modified": "2024-11-06 07:46:17.175687", + "modified_by": "Administrator", + "module": "EDI", + "name": "Common Code", + "naming_rule": "Random", + "owner": "Administrator", + "permissions": [ + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, + "write": 1 + } + ], + "search_fields": "common_code,description", + "show_title_field_in_link": 1, + "sort_field": "creation", + "sort_order": "DESC", + "states": [], + "title_field": "title" +} \ No newline at end of file diff --git a/erpnext/edi/doctype/common_code/common_code.py b/erpnext/edi/doctype/common_code/common_code.py new file mode 100644 index 00000000000..d558b2d282f --- /dev/null +++ b/erpnext/edi/doctype/common_code/common_code.py @@ -0,0 +1,114 @@ +# Copyright (c) 2024, Frappe Technologies Pvt. Ltd. and contributors +# For license information, please see license.txt + +import hashlib + +import frappe +from frappe import _ +from frappe.model.document import Document +from frappe.utils.data import get_link_to_form +from lxml import etree + + +class CommonCode(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.core.doctype.dynamic_link.dynamic_link import DynamicLink + from frappe.types import DF + + additional_data: DF.Code | None + applies_to: DF.Table[DynamicLink] + code_list: DF.Link + common_code: DF.Data + description: DF.SmallText | None + title: DF.Data + # end: auto-generated types + + def validate(self): + self.validate_distinct_references() + + def validate_distinct_references(self): + """Ensure no two Common Codes of the same Code List are linked to the same document.""" + for link in self.applies_to: + existing_links = frappe.get_all( + "Common Code", + filters=[ + ["name", "!=", self.name], + ["code_list", "=", self.code_list], + ["Dynamic Link", "link_doctype", "=", link.link_doctype], + ["Dynamic Link", "link_name", "=", link.link_name], + ], + fields=["name", "common_code"], + ) + + if existing_links: + existing_link = existing_links[0] + frappe.throw( + _("{0} {1} is already linked to Common Code {2}.").format( + link.link_doctype, + link.link_name, + get_link_to_form("Common Code", existing_link["name"], existing_link["common_code"]), + ) + ) + + def from_genericode(self, column_map: dict, xml_element: "etree.Element"): + """Populate the Common Code document from a genericode XML element + + Args: + column_map (dict): A mapping of column names to XML column references. Keys: code, title, description + code (etree.Element): The XML element representing a code in the genericode file + """ + title_column = column_map.get("title") + code_column = column_map["code"] + description_column = column_map.get("description") + + self.common_code = xml_element.find(f"./Value[@ColumnRef='{code_column}']/SimpleValue").text + + if title_column: + simple_value_title = xml_element.find(f"./Value[@ColumnRef='{title_column}']/SimpleValue") + self.title = simple_value_title.text if simple_value_title is not None else self.common_code + + if description_column: + simple_value_descr = xml_element.find(f"./Value[@ColumnRef='{description_column}']/SimpleValue") + self.description = simple_value_descr.text if simple_value_descr is not None else None + + self.additional_data = etree.tostring(xml_element, encoding="unicode", pretty_print=True) + + +def simple_hash(input_string, length=6): + return hashlib.blake2b(input_string.encode(), digest_size=length // 2).hexdigest() + + +def import_genericode(code_list: str, file_name: str, column_map: dict, filters: dict | None = None): + """Import genericode file and create Common Code entries""" + file_path = frappe.utils.file_manager.get_file_path(file_name) + parser = etree.XMLParser(remove_blank_text=True) + tree = etree.parse(file_path, parser=parser) + root = tree.getroot() + + # Construct the XPath expression + xpath_expr = ".//SimpleCodeList/Row" + filter_conditions = [ + f"Value[@ColumnRef='{column_ref}']/SimpleValue='{value}'" for column_ref, value in filters.items() + ] + if filter_conditions: + xpath_expr += "[" + " and ".join(filter_conditions) + "]" + + elements = root.xpath(xpath_expr) + total_elements = len(elements) + for i, xml_element in enumerate(elements, start=1): + common_code: "CommonCode" = frappe.new_doc("Common Code") + common_code.code_list = code_list + common_code.from_genericode(column_map, xml_element) + common_code.save() + frappe.publish_progress(i / total_elements * 100, title=_("Importing Common Codes")) + + return total_elements + + +def on_doctype_update(): + frappe.db.add_index("Common Code", ["code_list", "common_code"]) diff --git a/erpnext/edi/doctype/common_code/common_code_list.js b/erpnext/edi/doctype/common_code/common_code_list.js new file mode 100644 index 00000000000..de1b665b161 --- /dev/null +++ b/erpnext/edi/doctype/common_code/common_code_list.js @@ -0,0 +1,8 @@ +frappe.listview_settings["Common Code"] = { + onload: function (listview) { + listview.page.add_inner_button(__("Import Genericode File"), function () { + erpnext.edi.import_genericode(listview); + }); + }, + hide_name_column: true, +}; diff --git a/erpnext/edi/doctype/common_code/test_common_code.py b/erpnext/edi/doctype/common_code/test_common_code.py new file mode 100644 index 00000000000..e9c67b2cc82 --- /dev/null +++ b/erpnext/edi/doctype/common_code/test_common_code.py @@ -0,0 +1,9 @@ +# Copyright (c) 2024, Frappe Technologies Pvt. Ltd. and Contributors +# See license.txt + +# import frappe +from frappe.tests.utils import FrappeTestCase + + +class TestCommonCode(FrappeTestCase): + pass diff --git a/erpnext/hooks.py b/erpnext/hooks.py index 30121e5f2cb..882adec4d51 100644 --- a/erpnext/hooks.py +++ b/erpnext/hooks.py @@ -35,6 +35,14 @@ doctype_js = { "Newsletter": "public/js/newsletter.js", "Contact": "public/js/contact.js", } +doctype_list_js = { + "Code List": [ + "edi/doctype/code_list/code_list_import.js", + ], + "Common Code": [ + "edi/doctype/code_list/code_list_import.js", + ], +} override_doctype_class = {"Address": "erpnext.accounts.custom.address.ERPNextAddress"} diff --git a/erpnext/modules.txt b/erpnext/modules.txt index c53cdf467d2..b8b12e90fb0 100644 --- a/erpnext/modules.txt +++ b/erpnext/modules.txt @@ -18,3 +18,4 @@ Communication Telephony Bulk Transaction Subcontracting +EDI \ No newline at end of file From 8cc59e3be71f005e2c970eba8a654bbd11eb95d3 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 18 Nov 2024 16:39:06 +0530 Subject: [PATCH 0495/1614] refactor: update test case (cherry picked from commit 4aab6f55f5bb47719fad95e366516a42b7f859e3) --- .../doctype/payment_entry/test_payment_entry.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/doctype/payment_entry/test_payment_entry.py b/erpnext/accounts/doctype/payment_entry/test_payment_entry.py index c61598b54a5..8758110534f 100644 --- a/erpnext/accounts/doctype/payment_entry/test_payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/test_payment_entry.py @@ -957,9 +957,12 @@ class TestPaymentEntry(FrappeTestCase): self.assertEqual(flt(expected_party_account_balance, 2), flt(party_account_balance, 2)) def test_gl_of_multi_currency_payment_transaction(self): - from erpnext.setup.doctype.currency_exchange.test_currency_exchange import save_new_records + from erpnext.setup.doctype.currency_exchange.test_currency_exchange import ( + save_new_records, + test_records, + ) - save_new_records(self.globalTestRecords["Currency Exchange"]) + save_new_records(test_records) paid_from = create_account( parent_account="Current Liabilities - _TC", account_name="_Test Cash USD", @@ -995,8 +998,8 @@ class TestPaymentEntry(FrappeTestCase): .run() ) expected_gl_entries = ( - (paid_from, 0.0, 8440.0, 0.0, 100.0, 0.0, 8440.0), - ("_Test Payable USD - _TC", 8440.0, 0.0, 100.0, 0.0, 8440.0, 0.0), + (paid_from, 0.0, 8440.0, 0.0, 100.0, 0.0, 100.0), + ("_Test Payable USD - _TC", 8440.0, 0.0, 100.0, 0.0, 100.0, 0.0), ) self.assertEqual(gl_entries, expected_gl_entries) From 0ea6691189cff2141a914667adc023b3226ed23b Mon Sep 17 00:00:00 2001 From: Ismail Arif <38789073+ismxilxrif@users.noreply.github.com> Date: Tue, 19 Nov 2024 09:56:35 +0800 Subject: [PATCH 0496/1614] chore: update oldest_items.json, change owner back to administrator Signed-off-by: Ismail Arif <38789073+ismxilxrif@users.noreply.github.com> (cherry picked from commit 7ceb24fb4cbff39b3f0e1cf2dd2db8f965aefe7e) --- erpnext/stock/dashboard_chart/oldest_items/oldest_items.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/dashboard_chart/oldest_items/oldest_items.json b/erpnext/stock/dashboard_chart/oldest_items/oldest_items.json index 46ad308f230..a55fe7a6a6c 100644 --- a/erpnext/stock/dashboard_chart/oldest_items/oldest_items.json +++ b/erpnext/stock/dashboard_chart/oldest_items/oldest_items.json @@ -15,7 +15,7 @@ "module": "Stock", "name": "Oldest Items", "number_of_groups": 0, - "owner": "rohitw1991@gmail.com", + "owner": "Administrator", "report_name": "Stock Ageing", "roles": [], "timeseries": 0, From c2748e923e84713c9341aa1763129911bec65e9b Mon Sep 17 00:00:00 2001 From: ajiragroup <108009061+ajiragroup@users.noreply.github.com> Date: Thu, 14 Nov 2024 16:13:54 +0545 Subject: [PATCH 0497/1614] refactor: update label and description on short year checkbox Is short/long year. (cherry picked from commit 1d6b9b405f0fef99d59330c7e1bd601f9e72c0b9) --- erpnext/accounts/doctype/fiscal_year/fiscal_year.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/fiscal_year/fiscal_year.json b/erpnext/accounts/doctype/fiscal_year/fiscal_year.json index 66db37fe13b..de8f0337a3d 100644 --- a/erpnext/accounts/doctype/fiscal_year/fiscal_year.json +++ b/erpnext/accounts/doctype/fiscal_year/fiscal_year.json @@ -72,10 +72,10 @@ }, { "default": "0", - "description": "Less than 12 months.", + "description": "More/Less than 12 months.", "fieldname": "is_short_year", "fieldtype": "Check", - "label": "Is Short Year", + "label": "Is Short/Long Year", "set_only_once": 1 } ], From 608966158aa81a4e71d31afec019c8913f89926a Mon Sep 17 00:00:00 2001 From: Nikolas Beckel <15029707+nikolas-beckel@users.noreply.github.com> Date: Tue, 19 Nov 2024 12:40:55 +0100 Subject: [PATCH 0498/1614] fix: check if pricing rule matches with coupon code (#44104) * fix: check if pricing rule matches with coupon code * fix: correct linting error (cherry picked from commit 9d31bf7647882d5118617c86161f82429778c919) --- .../accounts/doctype/pricing_rule/pricing_rule.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py index 72ad0d096bc..73cb2483811 100644 --- a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py +++ b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py @@ -451,6 +451,16 @@ def get_pricing_rule_for_item(args, doc=None, for_validate=False): get_pricing_rule_items(pricing_rule, other_items=fetch_other_item) or [] ) + if pricing_rule.coupon_code_based == 1: + if not args.coupon_code: + return item_details + + coupon_code = frappe.db.get_value( + doctype="Coupon Code", filters={"pricing_rule": pricing_rule.name}, fieldname="name" + ) + if args.coupon_code != coupon_code: + continue + if pricing_rule.get("suggestion"): continue @@ -476,9 +486,6 @@ def get_pricing_rule_for_item(args, doc=None, for_validate=False): pricing_rule.apply_rule_on_other_items ) - if pricing_rule.coupon_code_based == 1 and args.coupon_code is None: - return item_details - if not pricing_rule.validate_applied_rule: if pricing_rule.price_or_product_discount == "Price": apply_price_discount_rule(pricing_rule, item_details, args) From 7abcfca1cb1ec5d71126f5e9c9fd93bb51f65f17 Mon Sep 17 00:00:00 2001 From: Corentin Forler Date: Sat, 16 Nov 2024 14:35:58 +0100 Subject: [PATCH 0499/1614] fix(setup): Fix typo in COA setup (cherry picked from commit a245cc6b07b08a00088f09f19159ba97370695a0) --- erpnext/setup/setup_wizard/operations/taxes_setup.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/erpnext/setup/setup_wizard/operations/taxes_setup.py b/erpnext/setup/setup_wizard/operations/taxes_setup.py index 0faebb6ab4c..6561f386c55 100644 --- a/erpnext/setup/setup_wizard/operations/taxes_setup.py +++ b/erpnext/setup/setup_wizard/operations/taxes_setup.py @@ -87,7 +87,10 @@ def simple_to_detailed(templates): def from_detailed_data(company_name, data): """Create Taxes and Charges Templates from detailed data.""" charts_company_name = company_name - if frappe.db.get_value("Company", company_name, "create_chart_of_accounts_based_on"): + if ( + frappe.db.get_value("Company", company_name, "create_chart_of_accounts_based_on") + == "Existing Company" + ): charts_company_name = frappe.db.get_value("Company", company_name, "existing_company") coa_name = frappe.db.get_value("Company", charts_company_name, "chart_of_accounts") coa_data = data.get("chart_of_accounts", {}) From 6bff9d39e312dc5a5f157def06cbfaa8b5a54fa6 Mon Sep 17 00:00:00 2001 From: RitvikSardana Date: Tue, 16 Apr 2024 12:20:16 +0530 Subject: [PATCH 0500/1614] fix: remove validate_name_in_customer function (cherry picked from commit 2b32d3644f909ba34a429c607335a0b7b54d7953) --- erpnext/setup/doctype/customer_group/customer_group.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/erpnext/setup/doctype/customer_group/customer_group.py b/erpnext/setup/doctype/customer_group/customer_group.py index 06f2f43374e..5dd0fd02011 100644 --- a/erpnext/setup/doctype/customer_group/customer_group.py +++ b/erpnext/setup/doctype/customer_group/customer_group.py @@ -71,14 +71,9 @@ class CustomerGroup(NestedSet): ) def on_update(self): - self.validate_name_with_customer() super().on_update() self.validate_one_root() - def validate_name_with_customer(self): - if frappe.db.exists("Customer", self.name): - frappe.msgprint(_("A customer with the same name already exists"), raise_exception=1) - def get_parent_customer_groups(customer_group): lft, rgt = frappe.db.get_value("Customer Group", customer_group, ["lft", "rgt"]) From ad0c65500a70c5dd13e245dd41037fdfa5ac34ea Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 19 Nov 2024 22:59:16 +0530 Subject: [PATCH 0501/1614] fix: update project cost from timesheet (backport #44211) (#44212) fix: update project cost from timesheet (#44211) (cherry picked from commit b21fb8f8b63aa517f6a0da8ec70e151213abc10b) Co-authored-by: rohitwaghchaure --- erpnext/projects/doctype/timesheet/timesheet.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/erpnext/projects/doctype/timesheet/timesheet.py b/erpnext/projects/doctype/timesheet/timesheet.py index 70494e9e966..7ab661c8822 100644 --- a/erpnext/projects/doctype/timesheet/timesheet.py +++ b/erpnext/projects/doctype/timesheet/timesheet.py @@ -169,10 +169,14 @@ class Timesheet(Document): task.save() tasks.append(data.task) - elif data.project and data.project not in projects: - frappe.get_doc("Project", data.project).update_project() + if data.project and data.project not in projects: projects.append(data.project) + for project in projects: + project_doc = frappe.get_doc("Project", project) + project_doc.update_project() + project_doc.save() + def validate_dates(self): for data in self.time_logs: if data.from_time and data.to_time and time_diff_in_hours(data.to_time, data.from_time) < 0: From f3c3f170a7d385aa971063d53de2650d6b3b6557 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Tue, 19 Nov 2024 14:32:43 +0530 Subject: [PATCH 0502/1614] fix: validate sales team to ensure all sales person are enabled (cherry picked from commit 548dbb33eb0ce911aef70efdf686338185575620) --- erpnext/controllers/selling_controller.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/erpnext/controllers/selling_controller.py b/erpnext/controllers/selling_controller.py index 49710de06f6..89a2111d50f 100644 --- a/erpnext/controllers/selling_controller.py +++ b/erpnext/controllers/selling_controller.py @@ -167,6 +167,9 @@ class SellingController(StockController): total = 0.0 sales_team = self.get("sales_team") + + self.validate_sales_team(sales_team) + for sales_person in sales_team: self.round_floats_in(sales_person) @@ -186,6 +189,20 @@ class SellingController(StockController): if sales_team and total != 100.0: throw(_("Total allocated percentage for sales team should be 100")) + def validate_sales_team(self, sales_team): + sales_persons = [d.sales_person for d in sales_team] + + if not sales_persons: + return + + sales_person_status = frappe.db.get_all( + "Sales Person", filters={"name": ["in", sales_persons]}, fields=["name", "enabled"] + ) + + for row in sales_person_status: + if not row.enabled: + frappe.throw(_("Sales Person {0} is disabled.").format(row.name)) + def validate_max_discount(self): for d in self.get("items"): if d.item_code: From 83b9680318700fab2f60f7f81f1e96125ad78f56 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Tue, 19 Nov 2024 12:38:34 +0530 Subject: [PATCH 0503/1614] fix: disable conversion to user tz for sales order calender (cherry picked from commit cdf098c1939b4811da003d663f475c0c1d4d4899) --- erpnext/selling/doctype/sales_order/sales_order.py | 5 ++++- erpnext/selling/doctype/sales_order/sales_order_calendar.js | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py index 88528d7178f..d8b3f3c6dcf 100755 --- a/erpnext/selling/doctype/sales_order/sales_order.py +++ b/erpnext/selling/doctype/sales_order/sales_order.py @@ -1230,7 +1230,10 @@ def get_events(start, end, filters=None): """, {"start": start, "end": end}, as_dict=True, - update={"allDay": 0}, + update={ + "allDay": 0, + "convertToUserTz": 0, + }, ) return data diff --git a/erpnext/selling/doctype/sales_order/sales_order_calendar.js b/erpnext/selling/doctype/sales_order/sales_order_calendar.js index f4c0e2ba72a..59a32bde7a3 100644 --- a/erpnext/selling/doctype/sales_order/sales_order_calendar.js +++ b/erpnext/selling/doctype/sales_order/sales_order_calendar.js @@ -8,6 +8,7 @@ frappe.views.calendar["Sales Order"] = { id: "name", title: "customer_name", allDay: "allDay", + convertToUserTz: "convertToUserTz", }, gantt: true, filters: [ From 514fe69b6520b5a041889473312754ad178f2a10 Mon Sep 17 00:00:00 2001 From: Abdeali Chharchhoda Date: Tue, 19 Nov 2024 18:00:35 +0530 Subject: [PATCH 0504/1614] refactor: Update `Payment Request` search query in PE's reference (cherry picked from commit 4ab3499a173753a7bf8e8863edbcc4394c1f2469) --- .../doctype/payment_request/payment_request.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/erpnext/accounts/doctype/payment_request/payment_request.py b/erpnext/accounts/doctype/payment_request/payment_request.py index 577a1ea2426..ae974a8cf0e 100644 --- a/erpnext/accounts/doctype/payment_request/payment_request.py +++ b/erpnext/accounts/doctype/payment_request/payment_request.py @@ -945,17 +945,18 @@ def validate_payment(doc, method=None): @frappe.whitelist() def get_open_payment_requests_query(doctype, txt, searchfield, start, page_len, filters): # permission checks in `get_list()` - reference_doctype = filters.get("reference_doctype") - reference_name = filters.get("reference_doctype") + filters = frappe._dict(filters) - if not reference_doctype or not reference_name: + if not filters.reference_doctype or not filters.reference_name: return [] + if txt: + filters.name = ["like", f"%{txt}%"] + open_payment_requests = frappe.get_list( "Payment Request", filters={ - "reference_doctype": filters["reference_doctype"], - "reference_name": filters["reference_name"], + **filters, "status": ["!=", "Paid"], "outstanding_amount": ["!=", 0], # for compatibility with old data "docstatus": 1, From 4335659905e3c430c221941a4657b9e60af36e60 Mon Sep 17 00:00:00 2001 From: "Nihantra C. Patel" <141945075+Nihantra-Patel@users.noreply.github.com> Date: Wed, 20 Nov 2024 12:00:41 +0530 Subject: [PATCH 0505/1614] fix: non group pos warehouse (cherry picked from commit d526be03946923004582fcbc9044c18734ca36f0) --- erpnext/selling/page/point_of_sale/pos_item_details.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/selling/page/point_of_sale/pos_item_details.js b/erpnext/selling/page/point_of_sale/pos_item_details.js index 4673eaa9858..ad4b4cd15be 100644 --- a/erpnext/selling/page/point_of_sale/pos_item_details.js +++ b/erpnext/selling/page/point_of_sale/pos_item_details.js @@ -272,7 +272,7 @@ erpnext.PointOfSale.ItemDetails = class { }; this.warehouse_control.df.get_query = () => { return { - filters: { company: this.events.get_frm().doc.company }, + filters: { company: this.events.get_frm().doc.company, is_group: 0 }, }; }; this.warehouse_control.refresh(); From 74838394183432a4aa2cf839e844aa1735727e35 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Mon, 18 Nov 2024 20:08:11 +0530 Subject: [PATCH 0506/1614] fix: payment reco for jv with negative dr or cr amount (cherry picked from commit fee79b944575f6797ae3846e7394158a1daaac2d) --- .../payment_reconciliation.py | 16 +++++++++------- erpnext/accounts/utils.py | 10 ++++++++++ 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py index bbbb3c978ff..68e9eef711a 100644 --- a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py +++ b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py @@ -211,12 +211,14 @@ class PaymentReconciliation(Document): if self.get("cost_center"): conditions.append(jea.cost_center == self.cost_center) - dr_or_cr = ( - "credit_in_account_currency" - if erpnext.get_party_account_type(self.party_type) == "Receivable" - else "debit_in_account_currency" - ) - conditions.append(jea[dr_or_cr].gt(0)) + account_type = erpnext.get_party_account_type(self.party_type) + + if account_type == "Receivable": + dr_or_cr = jea.credit_in_account_currency - jea.debit_in_account_currency + elif account_type == "Payable": + dr_or_cr = jea.debit_in_account_currency - jea.credit_in_account_currency + + conditions.append(dr_or_cr.gt(0)) if self.bank_cash_account: conditions.append(jea.against_account.like(f"%%{self.bank_cash_account}%%")) @@ -231,7 +233,7 @@ class PaymentReconciliation(Document): je.posting_date, je.remark.as_("remarks"), jea.name.as_("reference_row"), - jea[dr_or_cr].as_("amount"), + dr_or_cr.as_("amount"), jea.is_advance, jea.exchange_rate, jea.account_currency.as_("currency"), diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py index 37dbaef51a8..144039b794f 100644 --- a/erpnext/accounts/utils.py +++ b/erpnext/accounts/utils.py @@ -630,6 +630,16 @@ def update_reference_in_journal_entry(d, journal_entry, do_not_save=False): if jv_detail.get("reference_type") in ["Sales Order", "Purchase Order"]: update_advance_paid.append((jv_detail.reference_type, jv_detail.reference_name)) + rev_dr_or_cr = ( + "debit_in_account_currency" + if d["dr_or_cr"] == "credit_in_account_currency" + else "credit_in_account_currency" + ) + if jv_detail.get(rev_dr_or_cr): + d["dr_or_cr"] = rev_dr_or_cr + d["allocated_amount"] = d["allocated_amount"] * -1 + d["unadjusted_amount"] = d["unadjusted_amount"] * -1 + if flt(d["unadjusted_amount"]) - flt(d["allocated_amount"]) != 0: # adjust the unreconciled balance amount_in_account_currency = flt(d["unadjusted_amount"]) - flt(d["allocated_amount"]) From 234741f35f6575e8f61d3a22d00774b203254f8a Mon Sep 17 00:00:00 2001 From: ljain112 Date: Tue, 19 Nov 2024 12:17:35 +0530 Subject: [PATCH 0507/1614] fix: added test cases (cherry picked from commit 6f9ea6422d9b03dea918267f6272b7bd36f96375) --- .../test_payment_reconciliation.py | 130 ++++++++++++++++++ 1 file changed, 130 insertions(+) diff --git a/erpnext/accounts/doctype/payment_reconciliation/test_payment_reconciliation.py b/erpnext/accounts/doctype/payment_reconciliation/test_payment_reconciliation.py index 1b19949bb7e..3f0fb29d671 100644 --- a/erpnext/accounts/doctype/payment_reconciliation/test_payment_reconciliation.py +++ b/erpnext/accounts/doctype/payment_reconciliation/test_payment_reconciliation.py @@ -632,6 +632,42 @@ class TestPaymentReconciliation(FrappeTestCase): self.assertEqual(len(pr.get("invoices")), 0) self.assertEqual(len(pr.get("payments")), 0) + def test_negative_debit_or_credit_journal_against_invoice(self): + transaction_date = nowdate() + amount = 100 + si = self.create_sales_invoice(qty=1, rate=amount, posting_date=transaction_date) + + # credit debtors account to record a payment + je = self.create_journal_entry(self.bank, self.debit_to, amount, transaction_date) + je.accounts[1].party_type = "Customer" + je.accounts[1].party = self.customer + je.accounts[1].credit_in_account_currency = 0 + je.accounts[1].debit_in_account_currency = -1 * amount + je.save() + je.submit() + + pr = self.create_payment_reconciliation() + + pr.get_unreconciled_entries() + invoices = [x.as_dict() for x in pr.get("invoices")] + payments = [x.as_dict() for x in pr.get("payments")] + pr.allocate_entries(frappe._dict({"invoices": invoices, "payments": payments})) + + # Difference amount should not be calculated for base currency accounts + for row in pr.allocation: + self.assertEqual(flt(row.get("difference_amount")), 0.0) + + pr.reconcile() + + # assert outstanding + si.reload() + self.assertEqual(si.status, "Paid") + self.assertEqual(si.outstanding_amount, 0) + + # check PR tool output + self.assertEqual(len(pr.get("invoices")), 0) + self.assertEqual(len(pr.get("payments")), 0) + def test_journal_against_journal(self): transaction_date = nowdate() sales = "Sales - _PR" @@ -954,6 +990,100 @@ class TestPaymentReconciliation(FrappeTestCase): frappe.db.get_value("Journal Entry", jea_parent.parent, "voucher_type"), "Exchange Gain Or Loss" ) + def test_difference_amount_via_negative_debit_or_credit_journal_entry(self): + # Make Sale Invoice + si = self.create_sales_invoice( + qty=1, rate=100, posting_date=nowdate(), do_not_save=True, do_not_submit=True + ) + si.customer = self.customer4 + si.currency = "EUR" + si.conversion_rate = 85 + si.debit_to = self.debtors_eur + si.save().submit() + + # Make payment using Journal Entry + je1 = self.create_journal_entry("HDFC - _PR", self.debtors_eur, 100, nowdate()) + je1.multi_currency = 1 + je1.accounts[0].exchange_rate = 1 + je1.accounts[0].credit_in_account_currency = -8000 + je1.accounts[0].credit = -8000 + je1.accounts[0].debit_in_account_currency = 0 + je1.accounts[0].debit = 0 + je1.accounts[1].party_type = "Customer" + je1.accounts[1].party = self.customer4 + je1.accounts[1].exchange_rate = 80 + je1.accounts[1].credit_in_account_currency = 100 + je1.accounts[1].credit = 8000 + je1.accounts[1].debit_in_account_currency = 0 + je1.accounts[1].debit = 0 + je1.save() + je1.submit() + + je2 = self.create_journal_entry("HDFC - _PR", self.debtors_eur, 200, nowdate()) + je2.multi_currency = 1 + je2.accounts[0].exchange_rate = 1 + je2.accounts[0].credit_in_account_currency = -16000 + je2.accounts[0].credit = -16000 + je2.accounts[0].debit_in_account_currency = 0 + je2.accounts[0].debit = 0 + je2.accounts[1].party_type = "Customer" + je2.accounts[1].party = self.customer4 + je2.accounts[1].exchange_rate = 80 + je2.accounts[1].credit_in_account_currency = 200 + je1.accounts[1].credit = 16000 + je1.accounts[1].debit_in_account_currency = 0 + je1.accounts[1].debit = 0 + je2.save() + je2.submit() + + pr = self.create_payment_reconciliation() + pr.party = self.customer4 + pr.receivable_payable_account = self.debtors_eur + pr.get_unreconciled_entries() + + self.assertEqual(len(pr.invoices), 1) + self.assertEqual(len(pr.payments), 2) + + # Test exact payment allocation + invoices = [x.as_dict() for x in pr.invoices] + payments = [pr.payments[0].as_dict()] + pr.allocate_entries(frappe._dict({"invoices": invoices, "payments": payments})) + + self.assertEqual(pr.allocation[0].allocated_amount, 100) + self.assertEqual(pr.allocation[0].difference_amount, -500) + + # Test partial payment allocation (with excess payment entry) + pr.set("allocation", []) + pr.get_unreconciled_entries() + invoices = [x.as_dict() for x in pr.invoices] + payments = [pr.payments[1].as_dict()] + pr.allocate_entries(frappe._dict({"invoices": invoices, "payments": payments})) + pr.allocation[0].difference_account = "Exchange Gain/Loss - _PR" + + self.assertEqual(pr.allocation[0].allocated_amount, 100) + self.assertEqual(pr.allocation[0].difference_amount, -500) + + # Check if difference journal entry gets generated for difference amount after reconciliation + pr.reconcile() + total_credit_amount = frappe.db.get_all( + "Journal Entry Account", + {"account": self.debtors_eur, "docstatus": 1, "reference_name": si.name}, + "sum(credit) as amount", + group_by="reference_name", + )[0].amount + + # total credit includes the exchange gain/loss amount + self.assertEqual(flt(total_credit_amount, 2), 8500) + + jea_parent = frappe.db.get_all( + "Journal Entry Account", + filters={"account": self.debtors_eur, "docstatus": 1, "reference_name": si.name, "credit": 500}, + fields=["parent"], + )[0] + self.assertEqual( + frappe.db.get_value("Journal Entry", jea_parent.parent, "voucher_type"), "Exchange Gain Or Loss" + ) + def test_difference_amount_via_payment_entry(self): # Make Sale Invoice si = self.create_sales_invoice( From 80f0d5b5ec8d20d70ec091650dba8ece6f2851c6 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Wed, 20 Nov 2024 12:51:29 +0530 Subject: [PATCH 0508/1614] chore: resolve conflict --- .../selling/doctype/quotation/quotation.json | 38 ------------------- 1 file changed, 38 deletions(-) diff --git a/erpnext/selling/doctype/quotation/quotation.json b/erpnext/selling/doctype/quotation/quotation.json index 8d6b96c8e67..d6ee87b5dee 100644 --- a/erpnext/selling/doctype/quotation/quotation.json +++ b/erpnext/selling/doctype/quotation/quotation.json @@ -1070,57 +1070,19 @@ "fieldname": "named_place", "fieldtype": "Data", "label": "Named Place" -<<<<<<< HEAD -======= - }, - { - "fieldname": "utm_campaign", - "fieldtype": "Link", - "label": "Campaign", - "oldfieldname": "campaign", - "oldfieldtype": "Link", - "options": "UTM Campaign", - "print_hide": 1 - }, - { - "fieldname": "utm_source", - "fieldtype": "Link", - "label": "Source", - "oldfieldname": "source", - "oldfieldtype": "Select", - "options": "UTM Source", - "print_hide": 1 - }, - { - "fieldname": "utm_medium", - "fieldtype": "Link", - "label": "Medium", - "options": "UTM Medium", - "print_hide": 1 - }, - { - "fieldname": "utm_content", - "fieldtype": "Data", - "label": "Content", - "print_hide": 1 }, { "default": "0", "fieldname": "disable_rounded_total", "fieldtype": "Check", "label": "Disable Rounded Total" ->>>>>>> f8524d526b (fix: added disable_rounded_total field) } ], "icon": "fa fa-shopping-cart", "idx": 82, "is_submittable": 1, "links": [], -<<<<<<< HEAD - "modified": "2024-03-20 16:04:21.567847", -======= "modified": "2024-11-07 18:37:11.715189", ->>>>>>> f8524d526b (fix: added disable_rounded_total field) "modified_by": "Administrator", "module": "Selling", "name": "Quotation", From ccf99cf98524a37e6111818d1d3d32a30866d19a Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Wed, 20 Nov 2024 08:41:13 +0000 Subject: [PATCH 0509/1614] chore(release): Bumped to Version 15.43.0 # [15.43.0](https://github.com/frappe/erpnext/compare/v15.42.0...v15.43.0) (2024-11-20) ### Bug Fixes * added disable_rounded_total field ([c98a0cc](https://github.com/frappe/erpnext/commit/c98a0ccd1dc5007941544ca49e0c2ad68d050323)) * added test cases ([234741f](https://github.com/frappe/erpnext/commit/234741f35f6575e8f61d3a22d00774b203254f8a)) * apply posting date sorting to invoices in Payment Reconciliation similar to payments ([41c8cfa](https://github.com/frappe/erpnext/commit/41c8cfac733104c69c1f30b921c667031c146024)) * broken apply on other item pricing rule ([5d6451f](https://github.com/frappe/erpnext/commit/5d6451fca7de3a9deba0df0a8568dc98f8c1936f)) * broken UI on currency exchange ([f460391](https://github.com/frappe/erpnext/commit/f4603910e4d4c11ca7cc48d8a44af5a35c98395d)) * bulk update invoice remarks during site upgrade ([cc07402](https://github.com/frappe/erpnext/commit/cc07402b5e5f2acdb5d4626a38108799cdd09f68)), closes [#43634](https://github.com/frappe/erpnext/issues/43634) * check if pricing rule matches with coupon code ([#44104](https://github.com/frappe/erpnext/issues/44104)) ([6089661](https://github.com/frappe/erpnext/commit/608966158aa81a4e71d31afec019c8913f89926a)) * correctly set 'cannot_add_rows' property on allocations table field ([c59a778](https://github.com/frappe/erpnext/commit/c59a7785039cdedc62c3321706799a35892ee7b3)) * disable conversion to user tz for sales order calender ([83b9680](https://github.com/frappe/erpnext/commit/83b9680318700fab2f60f7f81f1e96125ad78f56)) * Get Entries not showing accounts with no gain or loss in Exchange Rate Revaluation issue ([1fe5342](https://github.com/frappe/erpnext/commit/1fe534290dcea0c689c48530b8a765c9111b71f6)) * linters ([381101f](https://github.com/frappe/erpnext/commit/381101f55235e2aa49e2b8229b4250eb3ea2474a)) * non group pos warehouse ([4335659](https://github.com/frappe/erpnext/commit/4335659905e3c430c221941a4657b9e60af36e60)) * payment reco for jv with negative dr or cr amount ([7483839](https://github.com/frappe/erpnext/commit/74838394183432a4aa2cf839e844aa1735727e35)) * remove trailing whitespace ([5bd633b](https://github.com/frappe/erpnext/commit/5bd633b40f86d46ebc3bce68e0dc65c88489d81e)) * remove validate_name_in_customer function ([6bff9d3](https://github.com/frappe/erpnext/commit/6bff9d39e312dc5a5f157def06cbfaa8b5a54fa6)) * set conversion factor before applying price list ([5848de7](https://github.com/frappe/erpnext/commit/5848de76ea3049cf3b25c88cc0a510f7712945c5)) * set debit in transaction currency in GL Entry ([c0d3f8c](https://github.com/frappe/erpnext/commit/c0d3f8cbbe347f7326b4acead396e28daec01fc0)) * set default party type in Payment Entry ([08f6cee](https://github.com/frappe/erpnext/commit/08f6ceeb5001d5e9159c7a9c0134467121298da0)) * **setup:** Fix typo in COA setup ([7abcfca](https://github.com/frappe/erpnext/commit/7abcfca1cb1ec5d71126f5e9c9fd93bb51f65f17)) * stock ledger variance report filter options (backport [#44137](https://github.com/frappe/erpnext/issues/44137)) ([#44150](https://github.com/frappe/erpnext/issues/44150)) ([b6fe1f5](https://github.com/frappe/erpnext/commit/b6fe1f5842671421de52e015c968d2740aaad79e)) * update project cost from timesheet (backport [#44211](https://github.com/frappe/erpnext/issues/44211)) ([#44212](https://github.com/frappe/erpnext/issues/44212)) ([ad0c655](https://github.com/frappe/erpnext/commit/ad0c65500a70c5dd13e245dd41037fdfa5ac34ea)) * validate sales team to ensure all sales person are enabled ([f3c3f17](https://github.com/frappe/erpnext/commit/f3c3f170a7d385aa971063d53de2650d6b3b6557)) * validation for serial no (backport [#44133](https://github.com/frappe/erpnext/issues/44133)) ([#44151](https://github.com/frappe/erpnext/issues/44151)) ([725d107](https://github.com/frappe/erpnext/commit/725d107288675867dd14571b84945f00d4def45e)) ### Features * inventory dimension for rejected materials (backport [#44156](https://github.com/frappe/erpnext/issues/44156)) ([#44165](https://github.com/frappe/erpnext/issues/44165)) ([d61f696](https://github.com/frappe/erpnext/commit/d61f696f85084bfec858a32c4d819f021e0a6bae)) * new DocTypes "Code List" and "Common Code" (backport [#43425](https://github.com/frappe/erpnext/issues/43425)) ([#44173](https://github.com/frappe/erpnext/issues/44173)) ([b130e20](https://github.com/frappe/erpnext/commit/b130e2065b5998ef42b754442fda9c5bf4cf60d9)) * round off for opening entries ([8e6249d](https://github.com/frappe/erpnext/commit/8e6249d361bb36a4fd1ef0cfa7333265bb8933d5)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 83fb70c9e8f..3ab0bf95207 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.42.0" +__version__ = "15.43.0" def get_default_company(user=None): From 8b15a965dd0ffea82c1d55a2893a79cf1fd243bb Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 21 Nov 2024 14:51:33 +0530 Subject: [PATCH 0510/1614] fix: no permission to read Doctype (backport #44256) (#44258) fix: no permission to read Doctype (#44256) (cherry picked from commit 57293aa18a2d34b66b35dc346ec84c259c6d6c11) Co-authored-by: rohitwaghchaure --- .../report/serial_and_batch_summary/serial_and_batch_summary.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/erpnext/stock/report/serial_and_batch_summary/serial_and_batch_summary.py b/erpnext/stock/report/serial_and_batch_summary/serial_and_batch_summary.py index 15d9a12bc65..486828af1cc 100644 --- a/erpnext/stock/report/serial_and_batch_summary/serial_and_batch_summary.py +++ b/erpnext/stock/report/serial_and_batch_summary/serial_and_batch_summary.py @@ -106,8 +106,6 @@ def get_columns(filters, data): { "label": _("Voucher Type"), "fieldname": "voucher_type", - "fieldtype": "Link", - "options": "DocType", "width": 120, }, { From d4f0512a10550914b2aad1795fe8692658aab67a Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 21 Nov 2024 14:52:37 +0530 Subject: [PATCH 0511/1614] fix: added Stock UOM field for RM in work order (backport #44185) (#44237) * fix: added Stock UOM field for RM in work order (#44185) fix: added UOM field for RM in work order (cherry picked from commit cc571aca8f56310b7f87244ebdbdb91fd6b57222) # Conflicts: # erpnext/manufacturing/doctype/work_order_item/work_order_item.json # erpnext/patches.txt * chore: fix conflicts * chore: fix conflicts --------- Co-authored-by: rohitwaghchaure --- .../doctype/work_order_item/work_order_item.json | 13 +++++++++++-- .../doctype/work_order_item/work_order_item.py | 2 ++ erpnext/patches.txt | 1 + .../v14_0/update_stock_uom_in_work_order_item.py | 15 +++++++++++++++ 4 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 erpnext/patches/v14_0/update_stock_uom_in_work_order_item.py diff --git a/erpnext/manufacturing/doctype/work_order_item/work_order_item.json b/erpnext/manufacturing/doctype/work_order_item/work_order_item.json index 0f4d693544e..580168180a7 100644 --- a/erpnext/manufacturing/doctype/work_order_item/work_order_item.json +++ b/erpnext/manufacturing/doctype/work_order_item/work_order_item.json @@ -15,6 +15,7 @@ "include_item_in_manufacturing", "qty_section", "required_qty", + "stock_uom", "rate", "amount", "column_break_11", @@ -138,11 +139,19 @@ "in_list_view": 1, "label": "Returned Qty ", "read_only": 1 + }, + { + "fetch_from": "item_code.stock_uom", + "fieldname": "stock_uom", + "fieldtype": "Link", + "label": "Stock UOM", + "options": "UOM", + "read_only": 1 } ], "istable": 1, "links": [], - "modified": "2024-02-11 15:45:32.318374", + "modified": "2024-11-19 15:48:16.823384", "modified_by": "Administrator", "module": "Manufacturing", "name": "Work Order Item", @@ -153,4 +162,4 @@ "sort_order": "DESC", "states": [], "track_changes": 1 -} \ No newline at end of file +} diff --git a/erpnext/manufacturing/doctype/work_order_item/work_order_item.py b/erpnext/manufacturing/doctype/work_order_item/work_order_item.py index 267ca5d21de..04f78eb1c3b 100644 --- a/erpnext/manufacturing/doctype/work_order_item/work_order_item.py +++ b/erpnext/manufacturing/doctype/work_order_item/work_order_item.py @@ -25,6 +25,7 @@ class WorkOrderItem(Document): item_code: DF.Link | None item_name: DF.Data | None operation: DF.Link | None + operation_row_id: DF.Int parent: DF.Data parentfield: DF.Data parenttype: DF.Data @@ -32,6 +33,7 @@ class WorkOrderItem(Document): required_qty: DF.Float returned_qty: DF.Float source_warehouse: DF.Link | None + stock_uom: DF.Link | None transferred_qty: DF.Float # end: auto-generated types diff --git a/erpnext/patches.txt b/erpnext/patches.txt index ab416d9d6c3..2716aa9883b 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -382,3 +382,4 @@ erpnext.patches.v15_0.link_purchase_item_to_asset_doc erpnext.patches.v14_0.update_currency_exchange_settings_for_frankfurter erpnext.patches.v15_0.update_task_assignee_email_field_in_asset_maintenance_log erpnext.patches.v15_0.update_sub_voucher_type_in_gl_entries +erpnext.patches.v14_0.update_stock_uom_in_work_order_item diff --git a/erpnext/patches/v14_0/update_stock_uom_in_work_order_item.py b/erpnext/patches/v14_0/update_stock_uom_in_work_order_item.py new file mode 100644 index 00000000000..d611065d8f1 --- /dev/null +++ b/erpnext/patches/v14_0/update_stock_uom_in_work_order_item.py @@ -0,0 +1,15 @@ +import frappe + + +def execute(): + frappe.db.sql( + """ + UPDATE + `tabWork Order Item`, `tabItem` + SET + `tabWork Order Item`.stock_uom = `tabItem`.stock_uom + WHERE + `tabWork Order Item`.item_code = `tabItem`.name + AND `tabWork Order Item`.docstatus = 1 + """ + ) From b047425a6f9d3d3827226acce488f87e413c2aad Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 21 Nov 2024 14:51:33 +0530 Subject: [PATCH 0512/1614] fix: no permission to read Doctype (backport #44256) (#44258) fix: no permission to read Doctype (#44256) (cherry picked from commit 57293aa18a2d34b66b35dc346ec84c259c6d6c11) Co-authored-by: rohitwaghchaure (cherry picked from commit 8b15a965dd0ffea82c1d55a2893a79cf1fd243bb) --- .../report/serial_and_batch_summary/serial_and_batch_summary.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/erpnext/stock/report/serial_and_batch_summary/serial_and_batch_summary.py b/erpnext/stock/report/serial_and_batch_summary/serial_and_batch_summary.py index 15d9a12bc65..486828af1cc 100644 --- a/erpnext/stock/report/serial_and_batch_summary/serial_and_batch_summary.py +++ b/erpnext/stock/report/serial_and_batch_summary/serial_and_batch_summary.py @@ -106,8 +106,6 @@ def get_columns(filters, data): { "label": _("Voucher Type"), "fieldname": "voucher_type", - "fieldtype": "Link", - "options": "DocType", "width": 120, }, { From e0060f8ffea85a694c782cfb14da9c0d6f5ab7bb Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Thu, 21 Nov 2024 09:44:42 +0000 Subject: [PATCH 0513/1614] chore(release): Bumped to Version 15.43.1 ## [15.43.1](https://github.com/frappe/erpnext/compare/v15.43.0...v15.43.1) (2024-11-21) ### Bug Fixes * no permission to read Doctype (backport [#44256](https://github.com/frappe/erpnext/issues/44256)) ([#44258](https://github.com/frappe/erpnext/issues/44258)) ([b047425](https://github.com/frappe/erpnext/commit/b047425a6f9d3d3827226acce488f87e413c2aad)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 3ab0bf95207..b2c3e75f87c 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.43.0" +__version__ = "15.43.1" def get_default_company(user=None): From 0ffeb9f6adbc581ecc9a0403c2680079213f9d93 Mon Sep 17 00:00:00 2001 From: venkat102 Date: Mon, 18 Nov 2024 15:42:01 +0530 Subject: [PATCH 0514/1614] fix: include current invoice amount when tax_on_excess_amount is checked (cherry picked from commit b74f2896cdfc0571d352930d5d84737d0211cff3) --- .../tax_withholding_category/tax_withholding_category.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py index 46a0916c79f..69c7eb1153c 100644 --- a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py +++ b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py @@ -568,7 +568,7 @@ def get_tds_amount(ldc, parties, inv, tax_details, vouchers): if (cumulative_threshold and supp_credit_amt >= cumulative_threshold) and cint( tax_details.tax_on_excess_amount ): - supp_credit_amt = net_total - cumulative_threshold + supp_credit_amt = net_total + tax_withholding_net_total - cumulative_threshold if ldc and is_valid_certificate(ldc, inv.get("posting_date") or inv.get("transaction_date"), 0): tds_amount = get_lower_deduction_amount( From 08b896fc2cee813170e477548e5cf6c194b8b8e8 Mon Sep 17 00:00:00 2001 From: venkat102 Date: Mon, 18 Nov 2024 15:48:39 +0530 Subject: [PATCH 0515/1614] test: add unit test for tax on excess amount (cherry picked from commit 4820273595be0f49f021685931f34972c39f1f70) --- .../test_tax_withholding_category.py | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py b/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py index 2b7ae5fd689..f9f34380d55 100644 --- a/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py +++ b/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py @@ -167,6 +167,45 @@ class TestTaxWithholdingCategory(FrappeTestCase): for d in reversed(invoices): d.cancel() + def test_cumulative_threshold_with_tax_on_excess_amount(self): + invoices = [] + frappe.db.set_value("Supplier", "Test TDS Supplier3", "tax_withholding_category", "New TDS Category") + + # Invoice with tax and without exceeding single and cumulative thresholds + for _ in range(2): + pi = create_purchase_invoice(supplier="Test TDS Supplier3", rate=10000, do_not_save=True) + pi.apply_tds = 1 + pi.append( + "taxes", + { + "category": "Total", + "charge_type": "Actual", + "account_head": "_Test Account VAT - _TC", + "cost_center": "Main - _TC", + "tax_amount": 500, + "description": "Test", + "add_deduct_tax": "Add", + }, + ) + pi.save() + pi.submit() + invoices.append(pi) + + # Third Invoice exceeds single threshold and not exceeding cumulative threshold + pi1 = create_purchase_invoice(supplier="Test TDS Supplier3", rate=20000) + pi1.apply_tds = 1 + pi1.save() + pi1.submit() + invoices.append(pi1) + + # Cumulative threshold is 10,000 + # Threshold calculation should be only on the third invoice + self.assertTrue(len(pi1.taxes) > 0) + self.assertEqual(pi1.taxes[0].tax_amount, 1000) + + for d in reversed(invoices): + d.cancel() + def test_cumulative_threshold_tcs(self): frappe.db.set_value( "Customer", "Test TCS Customer", "tax_withholding_category", "Cumulative Threshold TCS" From 52e1551c234b03d7fc4f7da65761ea4c1c2a2ed0 Mon Sep 17 00:00:00 2001 From: venkat102 Date: Mon, 18 Nov 2024 15:42:01 +0530 Subject: [PATCH 0516/1614] fix: include current invoice amount when tax_on_excess_amount is checked (cherry picked from commit b74f2896cdfc0571d352930d5d84737d0211cff3) --- .../tax_withholding_category/tax_withholding_category.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py index 46a0916c79f..69c7eb1153c 100644 --- a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py +++ b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py @@ -568,7 +568,7 @@ def get_tds_amount(ldc, parties, inv, tax_details, vouchers): if (cumulative_threshold and supp_credit_amt >= cumulative_threshold) and cint( tax_details.tax_on_excess_amount ): - supp_credit_amt = net_total - cumulative_threshold + supp_credit_amt = net_total + tax_withholding_net_total - cumulative_threshold if ldc and is_valid_certificate(ldc, inv.get("posting_date") or inv.get("transaction_date"), 0): tds_amount = get_lower_deduction_amount( From 2d284de4264b708c569ab2739f5ec5b06e87ebaa Mon Sep 17 00:00:00 2001 From: venkat102 Date: Mon, 18 Nov 2024 15:48:39 +0530 Subject: [PATCH 0517/1614] test: add unit test for tax on excess amount (cherry picked from commit 4820273595be0f49f021685931f34972c39f1f70) --- .../test_tax_withholding_category.py | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py b/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py index 2b7ae5fd689..f9f34380d55 100644 --- a/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py +++ b/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py @@ -167,6 +167,45 @@ class TestTaxWithholdingCategory(FrappeTestCase): for d in reversed(invoices): d.cancel() + def test_cumulative_threshold_with_tax_on_excess_amount(self): + invoices = [] + frappe.db.set_value("Supplier", "Test TDS Supplier3", "tax_withholding_category", "New TDS Category") + + # Invoice with tax and without exceeding single and cumulative thresholds + for _ in range(2): + pi = create_purchase_invoice(supplier="Test TDS Supplier3", rate=10000, do_not_save=True) + pi.apply_tds = 1 + pi.append( + "taxes", + { + "category": "Total", + "charge_type": "Actual", + "account_head": "_Test Account VAT - _TC", + "cost_center": "Main - _TC", + "tax_amount": 500, + "description": "Test", + "add_deduct_tax": "Add", + }, + ) + pi.save() + pi.submit() + invoices.append(pi) + + # Third Invoice exceeds single threshold and not exceeding cumulative threshold + pi1 = create_purchase_invoice(supplier="Test TDS Supplier3", rate=20000) + pi1.apply_tds = 1 + pi1.save() + pi1.submit() + invoices.append(pi1) + + # Cumulative threshold is 10,000 + # Threshold calculation should be only on the third invoice + self.assertTrue(len(pi1.taxes) > 0) + self.assertEqual(pi1.taxes[0].tax_amount, 1000) + + for d in reversed(invoices): + d.cancel() + def test_cumulative_threshold_tcs(self): frappe.db.set_value( "Customer", "Test TCS Customer", "tax_withholding_category", "Cumulative Threshold TCS" From 81f1f1f1bbc7c8947776981873dd8b8794aa4d1b Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Fri, 22 Nov 2024 06:00:44 +0000 Subject: [PATCH 0518/1614] chore(release): Bumped to Version 15.43.2 ## [15.43.2](https://github.com/frappe/erpnext/compare/v15.43.1...v15.43.2) (2024-11-22) ### Bug Fixes * include current invoice amount when tax_on_excess_amount is checked ([52e1551](https://github.com/frappe/erpnext/commit/52e1551c234b03d7fc4f7da65761ea4c1c2a2ed0)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index b2c3e75f87c..9c78c0a1e2c 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.43.1" +__version__ = "15.43.2" def get_default_company(user=None): From 8b02402f6295296e9465d813996c90e08ffa889e Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Mon, 18 Nov 2024 17:59:55 +0530 Subject: [PATCH 0519/1614] fix: patch (#44191) (cherry picked from commit 495528a758019ae2ba51d44649227c4d9cb889af) --- .../patches/v13_0/item_reposting_for_incorrect_sl_and_gl.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/patches/v13_0/item_reposting_for_incorrect_sl_and_gl.py b/erpnext/patches/v13_0/item_reposting_for_incorrect_sl_and_gl.py index c0d715063a8..2441075de30 100644 --- a/erpnext/patches/v13_0/item_reposting_for_incorrect_sl_and_gl.py +++ b/erpnext/patches/v13_0/item_reposting_for_incorrect_sl_and_gl.py @@ -38,7 +38,7 @@ def execute(): data = frappe.db.sql( """ SELECT - name, item_code, warehouse, voucher_type, voucher_no, posting_date, posting_time, company + name, item_code, warehouse, voucher_type, voucher_no, posting_date, posting_time, company, creation FROM `tabStock Ledger Entry` WHERE @@ -67,6 +67,7 @@ def execute(): "voucher_type": d.voucher_type, "voucher_no": d.voucher_no, "sle_id": d.name, + "creation": d.creation, }, allow_negative_stock=True, ) From 7f8334f29a83a6e85fe32dcc9a2247c90046acee Mon Sep 17 00:00:00 2001 From: Smit Vora Date: Thu, 21 Nov 2024 18:30:37 +0530 Subject: [PATCH 0520/1614] fix: toggle debit credit amounts for transaction currency too; minor refactor (cherry picked from commit 8e759c32c431834f8e77c1665cf8c36ba881582b) --- erpnext/accounts/general_ledger.py | 78 ++++++++++++------------------ 1 file changed, 30 insertions(+), 48 deletions(-) diff --git a/erpnext/accounts/general_ledger.py b/erpnext/accounts/general_ledger.py index 7d7c6f49e12..19da840f543 100644 --- a/erpnext/accounts/general_ledger.py +++ b/erpnext/accounts/general_ledger.py @@ -315,66 +315,48 @@ def check_if_in_list(gle, gl_map): def toggle_debit_credit_if_negative(gl_map): + debit_credit_field_map = { + "debit": "credit", + "debit_in_account_currency": "credit_in_account_currency", + "debit_in_transaction_currency": "credit_in_transaction_currency", + } + for entry in gl_map: # toggle debit, credit if negative entry - if flt(entry.debit) < 0 and flt(entry.credit) < 0 and flt(entry.debit) == flt(entry.credit): - entry.credit *= -1 - entry.debit *= -1 + for debit_field, credit_field in debit_credit_field_map.items(): + debit = flt(entry.get(debit_field)) + credit = flt(entry.get(credit_field)) - if ( - flt(entry.debit_in_account_currency) < 0 - and flt(entry.credit_in_account_currency) < 0 - and flt(entry.debit_in_account_currency) == flt(entry.credit_in_account_currency) - ): - entry.credit_in_account_currency *= -1 - entry.debit_in_account_currency *= -1 + if debit < 0 and credit < 0 and debit == credit: + debit *= -1 + credit *= -1 - if flt(entry.debit) < 0: - entry.credit = flt(entry.credit) - flt(entry.debit) - entry.debit = 0.0 + if debit < 0: + credit = credit - debit + debit = 0.0 - if flt(entry.debit_in_account_currency) < 0: - entry.credit_in_account_currency = flt(entry.credit_in_account_currency) - flt( - entry.debit_in_account_currency - ) - entry.debit_in_account_currency = 0.0 + if credit < 0: + debit = debit - credit + credit = 0.0 - if flt(entry.credit) < 0: - entry.debit = flt(entry.debit) - flt(entry.credit) - entry.credit = 0.0 + # update net values + # In some scenarios net value needs to be shown in the ledger + # This method updates net values as debit or credit + if entry.post_net_value and debit and credit: + if debit > credit: + debit = debit - credit + credit = 0.0 - if flt(entry.credit_in_account_currency) < 0: - entry.debit_in_account_currency = flt(entry.debit_in_account_currency) - flt( - entry.credit_in_account_currency - ) - entry.credit_in_account_currency = 0.0 + else: + credit = credit - debit + debit = 0.0 - update_net_values(entry) + entry[debit_field] = debit + entry[credit_field] = credit return gl_map -def update_net_values(entry): - # In some scenarios net value needs to be shown in the ledger - # This method updates net values as debit or credit - if entry.post_net_value and entry.debit and entry.credit: - if entry.debit > entry.credit: - entry.debit = entry.debit - entry.credit - entry.debit_in_account_currency = ( - entry.debit_in_account_currency - entry.credit_in_account_currency - ) - entry.credit = 0 - entry.credit_in_account_currency = 0 - else: - entry.credit = entry.credit - entry.debit - entry.credit_in_account_currency = ( - entry.credit_in_account_currency - entry.debit_in_account_currency - ) - - entry.debit = 0 - entry.debit_in_account_currency = 0 - - def save_entries(gl_map, adv_adj, update_outstanding, from_repost=False): if not from_repost: validate_cwip_accounts(gl_map) From 11deff98d9ad32e29c4eb35a414478d51260848f Mon Sep 17 00:00:00 2001 From: Smit Vora Date: Thu, 21 Nov 2024 19:44:02 +0530 Subject: [PATCH 0521/1614] test: test case for toggling debit and credit if negative (cherry picked from commit a10e175bc926219a6d534eb5a1e006e66bf7b8fd) --- .../journal_entry/test_journal_entry.py | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/erpnext/accounts/doctype/journal_entry/test_journal_entry.py b/erpnext/accounts/doctype/journal_entry/test_journal_entry.py index 3d4b182d52d..8f4c4e3ccda 100644 --- a/erpnext/accounts/doctype/journal_entry/test_journal_entry.py +++ b/erpnext/accounts/doctype/journal_entry/test_journal_entry.py @@ -515,6 +515,55 @@ class TestJournalEntry(unittest.TestCase): self.assertEqual(row.debit_in_account_currency, 100) self.assertEqual(row.credit_in_account_currency, 100) + def test_toggle_debit_credit_if_negative(self): + from erpnext.accounts.general_ledger import process_gl_map + + # Create JV with defaut cost center - _Test Cost Center + frappe.db.set_single_value("Accounts Settings", "merge_similar_account_heads", 0) + + jv = frappe.new_doc("Journal Entry") + jv.posting_date = nowdate() + jv.company = "_Test Company" + jv.user_remark = "test" + jv.extend( + "accounts", + [ + { + "account": "_Test Cash - _TC", + "debit": 100 * -1, + "debit_in_account_currency": 100 * -1, + "exchange_rate": 1, + }, + { + "account": "_Test Bank - _TC", + "credit": 100 * -1, + "credit_in_account_currency": 100 * -1, + "exchange_rate": 1, + }, + ], + ) + + jv.flags.ignore_validate = True + jv.save() + + self.assertEqual(len(jv.accounts), 2) + + gl_map = jv.build_gl_map() + + for row in gl_map: + if row.account == "_Test Cash - _TC": + self.assertEqual(row.debit, 100 * -1) + self.assertEqual(row.debit_in_account_currency, 100 * -1) + self.assertEqual(row.debit_in_transaction_currency, 100 * -1) + + gl_map = process_gl_map(gl_map, False) + + for row in gl_map: + if row.account == "_Test Cash - _TC": + self.assertEqual(row.credit, 100) + self.assertEqual(row.credit_in_account_currency, 100) + self.assertEqual(row.credit_in_transaction_currency, 100) + def test_transaction_exchange_rate_on_journals(self): jv = make_journal_entry("_Test Bank - _TC", "_Test Receivable USD - _TC", 100, save=False) jv.accounts[0].update({"debit_in_account_currency": 8500, "exchange_rate": 1}) From 5f752e29f9e07300c21a63c69024befb837da1fc Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Mon, 18 Nov 2024 17:59:55 +0530 Subject: [PATCH 0522/1614] fix: patch (#44191) (cherry picked from commit 495528a758019ae2ba51d44649227c4d9cb889af) (cherry picked from commit 8b02402f6295296e9465d813996c90e08ffa889e) --- .../patches/v13_0/item_reposting_for_incorrect_sl_and_gl.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/patches/v13_0/item_reposting_for_incorrect_sl_and_gl.py b/erpnext/patches/v13_0/item_reposting_for_incorrect_sl_and_gl.py index c0d715063a8..2441075de30 100644 --- a/erpnext/patches/v13_0/item_reposting_for_incorrect_sl_and_gl.py +++ b/erpnext/patches/v13_0/item_reposting_for_incorrect_sl_and_gl.py @@ -38,7 +38,7 @@ def execute(): data = frappe.db.sql( """ SELECT - name, item_code, warehouse, voucher_type, voucher_no, posting_date, posting_time, company + name, item_code, warehouse, voucher_type, voucher_no, posting_date, posting_time, company, creation FROM `tabStock Ledger Entry` WHERE @@ -67,6 +67,7 @@ def execute(): "voucher_type": d.voucher_type, "voucher_no": d.voucher_no, "sle_id": d.name, + "creation": d.creation, }, allow_negative_stock=True, ) From 17e00b397f3761e3d937d06cf1e05f927da123d1 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Fri, 22 Nov 2024 09:19:30 +0000 Subject: [PATCH 0523/1614] chore(release): Bumped to Version 15.43.3 ## [15.43.3](https://github.com/frappe/erpnext/compare/v15.43.2...v15.43.3) (2024-11-22) ### Bug Fixes * patch ([#44191](https://github.com/frappe/erpnext/issues/44191)) ([5f752e2](https://github.com/frappe/erpnext/commit/5f752e29f9e07300c21a63c69024befb837da1fc)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 9c78c0a1e2c..babb8246bdb 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.43.2" +__version__ = "15.43.3" def get_default_company(user=None): From a4398626f66bae98b520d75f72e9d00222789174 Mon Sep 17 00:00:00 2001 From: venkat102 Date: Fri, 22 Nov 2024 11:53:07 +0530 Subject: [PATCH 0524/1614] fix: filter with item group only if it is mentioned in pos profile (cherry picked from commit 09641073e3ff013fe49f22127e3164b22639c41e) --- erpnext/selling/page/point_of_sale/point_of_sale.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/erpnext/selling/page/point_of_sale/point_of_sale.py b/erpnext/selling/page/point_of_sale/point_of_sale.py index 28eadec9bc5..206e51bbc5a 100644 --- a/erpnext/selling/page/point_of_sale/point_of_sale.py +++ b/erpnext/selling/page/point_of_sale/point_of_sale.py @@ -96,6 +96,8 @@ def search_by_term(search_term, warehouse, price_list): def filter_result_items(result, pos_profile): if result and result.get("items"): pos_item_groups = frappe.db.get_all("POS Item Group", {"parent": pos_profile}, pluck="item_group") + if not pos_item_groups: + return result["items"] = [item for item in result.get("items") if item.get("item_group") in pos_item_groups] From 4856a9633e2e6cd46cf001799f01c7d290514b6a Mon Sep 17 00:00:00 2001 From: venkat102 Date: Thu, 21 Nov 2024 18:27:15 +0530 Subject: [PATCH 0525/1614] fix: make free qty round on large transaction qty (cherry picked from commit f9b816538584810aeb0721296899f7bb19dc1dd0) --- erpnext/accounts/doctype/pricing_rule/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/pricing_rule/utils.py b/erpnext/accounts/doctype/pricing_rule/utils.py index 572529580e8..087e2bffa4b 100644 --- a/erpnext/accounts/doctype/pricing_rule/utils.py +++ b/erpnext/accounts/doctype/pricing_rule/utils.py @@ -655,7 +655,7 @@ def get_product_discount_rule(pricing_rule, item_details, args=None, doc=None): if transaction_qty: qty = flt(transaction_qty) * qty / pricing_rule.recurse_for if pricing_rule.round_free_qty: - qty = math.floor(qty) + qty = (flt(transaction_qty) // pricing_rule.recurse_for) * (pricing_rule.free_qty or 1) if not qty: return From db1bc8a3db238d0729790c71226aef7136d2b230 Mon Sep 17 00:00:00 2001 From: venkat102 Date: Thu, 21 Nov 2024 18:37:14 +0530 Subject: [PATCH 0526/1614] test: add unit test to validate free qty round on large transaction qty (cherry picked from commit 013a6fc6ec2ae28720845f973276db3739fc8fd5) --- .../doctype/pricing_rule/test_pricing_rule.py | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py b/erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py index b4c47a26eb1..965e2b267a3 100644 --- a/erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py +++ b/erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py @@ -1137,6 +1137,45 @@ class TestPricingRule(FrappeTestCase): so.save() self.assertEqual(len(so.items), 1) + def test_pricing_rule_for_product_free_item_round_free_qty(self): + frappe.delete_doc_if_exists("Pricing Rule", "_Test Pricing Rule") + test_record = { + "doctype": "Pricing Rule", + "title": "_Test Pricing Rule", + "apply_on": "Item Code", + "currency": "USD", + "items": [ + { + "item_code": "_Test Item", + } + ], + "selling": 1, + "rate": 0, + "min_qty": 100, + "max_qty": 0, + "price_or_product_discount": "Product", + "same_item": 1, + "free_qty": 10, + "round_free_qty": 1, + "is_recursive": 1, + "recurse_for": 100, + "company": "_Test Company", + } + frappe.get_doc(test_record.copy()).insert() + + # With pricing rule + so = make_sales_order(item_code="_Test Item", qty=100) + so.load_from_db() + self.assertEqual(so.items[1].is_free_item, 1) + self.assertEqual(so.items[1].item_code, "_Test Item") + self.assertEqual(so.items[1].qty, 10) + + so = make_sales_order(item_code="_Test Item", qty=150) + so.load_from_db() + self.assertEqual(so.items[1].is_free_item, 1) + self.assertEqual(so.items[1].item_code, "_Test Item") + self.assertEqual(so.items[1].qty, 10) + def test_apply_multiple_pricing_rules_for_discount_percentage_and_amount(self): frappe.delete_doc_if_exists("Pricing Rule", "_Test Pricing Rule 1") frappe.delete_doc_if_exists("Pricing Rule", "_Test Pricing Rule 2") From af74a3c32fb5ec83439ed3417706aa3d1a0deefd Mon Sep 17 00:00:00 2001 From: vimalraj27 Date: Wed, 20 Nov 2024 13:27:21 +0530 Subject: [PATCH 0527/1614] fix: Get submitted documents in validate_for_closed_fiscal_year (cherry picked from commit c607e5f940d7032cc7c11d870d3bf99b30bcef4c) --- .../repost_accounting_ledger/repost_accounting_ledger.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/repost_accounting_ledger/repost_accounting_ledger.py b/erpnext/accounts/doctype/repost_accounting_ledger/repost_accounting_ledger.py index f37e542dd89..0bd9a2a0515 100644 --- a/erpnext/accounts/doctype/repost_accounting_ledger/repost_accounting_ledger.py +++ b/erpnext/accounts/doctype/repost_accounting_ledger/repost_accounting_ledger.py @@ -45,7 +45,7 @@ class RepostAccountingLedger(Document): latest_pcv = ( frappe.db.get_all( "Period Closing Voucher", - filters={"company": self.company}, + filters={"company": self.company, "docstatus": 1}, order_by="period_end_date desc", pluck="period_end_date", limit=1, From 97f2341b98ea0cdb84cbf7dbaebdd32b208824b6 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Sun, 24 Nov 2024 22:23:11 +0530 Subject: [PATCH 0528/1614] fix: not able to fetch batch item price --- erpnext/stock/get_item_details.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py index 50db899433f..d5d492a2c93 100644 --- a/erpnext/stock/get_item_details.py +++ b/erpnext/stock/get_item_details.py @@ -940,11 +940,12 @@ def get_batch_based_item_price(params, item_code) -> float: params = parse_json(params) item_price = get_item_price(params, item_code, force_batch_no=True) + if not item_price: item_price = get_item_price(params, item_code, ignore_party=True, force_batch_no=True) - if item_price and item_price[0].uom == params.get("uom"): - return item_price[0].price_list_rate + if item_price and item_price[0][2] == params.get("uom"): + return item_price[0][1] return 0.0 From 8928e062b18db3729b16f93cd2b2c5420c24ada3 Mon Sep 17 00:00:00 2001 From: Abdeali Chharchhoda Date: Fri, 22 Nov 2024 19:50:52 +0530 Subject: [PATCH 0529/1614] refactor: added translate function for some columns of report (cherry picked from commit e545c913b529b2d4e8ee4d3efc8f8cc87ee567a0) --- .../accounts_receivable/accounts_receivable.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py index 984d77dbad2..a58d4ab72ca 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py @@ -1013,15 +1013,15 @@ class ReceivablePayableReport: def get_columns(self): self.columns = [] - self.add_column("Posting Date", fieldtype="Date") + self.add_column(_("Posting Date"), fieldtype="Date") self.add_column( - label="Party Type", + label=_("Party Type"), fieldname="party_type", fieldtype="Data", width=100, ) self.add_column( - label="Party", + label=_("Party"), fieldname="party", fieldtype="Dynamic Link", options="party_type", @@ -1037,10 +1037,10 @@ class ReceivablePayableReport: if self.party_naming_by == "Naming Series": if self.account_type == "Payable": - label = "Supplier Name" + label = _("Supplier Name") fieldname = "supplier_name" else: - label = "Customer Name" + label = _("Customer Name") fieldname = "customer_name" self.add_column( label=label, @@ -1066,7 +1066,7 @@ class ReceivablePayableReport: width=180, ) - self.add_column(label="Due Date", fieldtype="Date") + self.add_column(label=_("Due Date"), fieldtype="Date") if self.account_type == "Payable": self.add_column(label=_("Bill No"), fieldname="bill_no", fieldtype="Data") From 0469b0d1ecca4b5d13232d3ba5a7f4275a582da4 Mon Sep 17 00:00:00 2001 From: l0gesh29 Date: Fri, 15 Nov 2024 12:54:04 +0530 Subject: [PATCH 0530/1614] feat: Show Aggregate Value from Subsidiary Companies (cherry picked from commit c23af6af41471b1d1e7b200d293ea4da95bbbb8e) # Conflicts: # erpnext/selling/report/sales_analytics/sales_analytics.js --- .../report/sales_analytics/sales_analytics.js | 21 ++++ .../report/sales_analytics/sales_analytics.py | 112 +++++++++++++----- 2 files changed, 101 insertions(+), 32 deletions(-) diff --git a/erpnext/selling/report/sales_analytics/sales_analytics.js b/erpnext/selling/report/sales_analytics/sales_analytics.js index a01103afb96..95b742ea584 100644 --- a/erpnext/selling/report/sales_analytics/sales_analytics.js +++ b/erpnext/selling/report/sales_analytics/sales_analytics.js @@ -73,6 +73,27 @@ frappe.query_reports["Sales Analytics"] = { default: "Monthly", reqd: 1, }, +<<<<<<< HEAD +======= + { + fieldname: "curves", + label: __("Curves"), + fieldtype: "Select", + options: [ + { value: "select", label: __("Select") }, + { value: "all", label: __("All") }, + { value: "non-zeros", label: __("Non-Zeros") }, + { value: "total", label: __("Total Only") }, + ], + default: "select", + reqd: 1, + }, + { + fieldname: "show_aggregate_value_from_subsidiary_companies", + label: __("Show Aggregate Value from Subsidiary Companies"), + fieldtype: "Check", + }, +>>>>>>> c23af6af41 (feat: Show Aggregate Value from Subsidiary Companies) ], get_datatable_options(options) { return Object.assign(options, { diff --git a/erpnext/selling/report/sales_analytics/sales_analytics.py b/erpnext/selling/report/sales_analytics/sales_analytics.py index 27d2e6e555e..262687ef19d 100644 --- a/erpnext/selling/report/sales_analytics/sales_analytics.py +++ b/erpnext/selling/report/sales_analytics/sales_analytics.py @@ -4,6 +4,8 @@ import frappe from frappe import _, scrub +from frappe.query_builder import DocType +from frappe.query_builder.functions import IfNull from frappe.utils import add_days, add_to_date, flt, getdate from erpnext.accounts.utils import get_fiscal_year @@ -37,7 +39,26 @@ class Analytics: ] self.get_period_date_ranges() + def update_company_list_for_parent_company(self): + company_list = [self.filters.get("company")] + + selected_company = self.filters.get("company") + if ( + selected_company + and self.filters.get("show_aggregate_value_from_subsidiary_companies") + and frappe.db.get_value("Company", selected_company, "is_group") + ): + lft, rgt = frappe.db.get_value("Company", selected_company, ["lft", "rgt"]) + child_companies = frappe.db.get_list( + "Company", filters={"lft": [">", lft], "rgt": ["<", rgt]}, pluck="name" + ) + + company_list.extend(child_companies) + + self.filters["company"] = company_list + def run(self): + self.update_company_list_for_parent_company() self.get_columns() self.get_data() self.get_chart_data() @@ -123,14 +144,23 @@ class Analytics: else: value_field = "total_qty" - self.entries = frappe.db.sql( - """ select s.order_type as entity, s.{value_field} as value_field, s.{date_field} - from `tab{doctype}` s where s.docstatus = 1 and s.company = %s and s.{date_field} between %s and %s - and ifnull(s.order_type, '') != '' order by s.order_type - """.format(date_field=self.date_field, value_field=value_field, doctype=self.filters.doc_type), - (self.filters.company, self.filters.from_date, self.filters.to_date), - as_dict=1, - ) + doctype = DocType(self.filters.doc_type) + + self.entries = ( + frappe.qb.from_(doctype) + .select( + doctype.order_type.as_("entity"), + doctype[self.date_field], + doctype[value_field].as_("value_field"), + ) + .where( + (doctype.docstatus == 1) + & (doctype.company.isin(self.filters.company)) + & (doctype[self.date_field].between(self.filters.from_date, self.filters.to_date)) + & (IfNull(doctype.order_type, "") != "") + ) + .orderby(doctype.order_type) + ).run(as_dict=True) self.get_teams() @@ -152,7 +182,7 @@ class Analytics: fields=[entity, entity_name, value_field, self.date_field], filters={ "docstatus": 1, - "company": self.filters.company, + "company": ["in", self.filters.company], self.date_field: ("between", [self.filters.from_date, self.filters.to_date]), }, ) @@ -167,16 +197,26 @@ class Analytics: else: value_field = "stock_qty" - self.entries = frappe.db.sql( - """ - select i.item_code as entity, i.item_name as entity_name, i.stock_uom, i.{value_field} as value_field, s.{date_field} - from `tab{doctype} Item` i , `tab{doctype}` s - where s.name = i.parent and i.docstatus = 1 and s.company = %s - and s.{date_field} between %s and %s - """.format(date_field=self.date_field, value_field=value_field, doctype=self.filters.doc_type), - (self.filters.company, self.filters.from_date, self.filters.to_date), - as_dict=1, - ) + doctype = DocType(self.filters.doc_type) + doctype_item = DocType(f"{self.filters.doc_type} Item") + + self.entries = ( + frappe.qb.from_(doctype_item) + .join(doctype) + .on(doctype.name == doctype_item.parent) + .select( + doctype_item.item_code.as_("entity"), + doctype_item.item_name.as_("entity_name"), + doctype_item.stock_uom, + doctype_item[value_field].as_("value_field"), + doctype[self.date_field], + ) + .where( + (doctype_item.docstatus == 1) + & (doctype.company.isin(self.filters.company)) + & (doctype[self.date_field].between(self.filters.from_date, self.filters.to_date)) + ) + ).run(as_dict=True) self.entity_names = {} for d in self.entries: @@ -201,7 +241,7 @@ class Analytics: fields=[entity_field, value_field, self.date_field], filters={ "docstatus": 1, - "company": self.filters.company, + "company": ["in", self.filters.company], self.date_field: ("between", [self.filters.from_date, self.filters.to_date]), }, ) @@ -213,16 +253,24 @@ class Analytics: else: value_field = "qty" - self.entries = frappe.db.sql( - f""" - select i.item_group as entity, i.{value_field} as value_field, s.{self.date_field} - from `tab{self.filters.doc_type} Item` i , `tab{self.filters.doc_type}` s - where s.name = i.parent and i.docstatus = 1 and s.company = %s - and s.{self.date_field} between %s and %s - """, - (self.filters.company, self.filters.from_date, self.filters.to_date), - as_dict=1, - ) + doctype = DocType(self.filters.doc_type) + doctype_item = DocType(f"{self.filters.doc_type} Item") + + self.entries = ( + frappe.qb.from_(doctype_item) + .join(doctype) + .on(doctype.name == doctype_item.parent) + .select( + doctype_item.item_group.as_("entity"), + doctype_item[value_field].as_("value_field"), + doctype[self.date_field], + ) + .where( + (doctype_item.docstatus == 1) + & (doctype.company.isin(self.filters.company)) + & (doctype[self.date_field].between(self.filters.from_date, self.filters.to_date)) + ) + ).run(as_dict=True) self.get_groups() @@ -239,7 +287,7 @@ class Analytics: fields=[entity, value_field, self.date_field], filters={ "docstatus": 1, - "company": self.filters.company, + "company": ["in", self.filters.company], "project": ["!=", ""], self.date_field: ("between", [self.filters.from_date, self.filters.to_date]), }, @@ -312,7 +360,7 @@ class Analytics: str(((posting_date.month - 1) // 3) + 1), str(posting_date.year) ) else: - year = get_fiscal_year(posting_date, company=self.filters.company) + year = get_fiscal_year(posting_date, company=self.filters.company[0]) period = str(year[0]) return period From 072c5b775377b9e9826215f3a1dbee2fdf728f44 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 25 Nov 2024 12:28:02 +0530 Subject: [PATCH 0531/1614] chore: resolve conflict --- .../report/sales_analytics/sales_analytics.js | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/erpnext/selling/report/sales_analytics/sales_analytics.js b/erpnext/selling/report/sales_analytics/sales_analytics.js index 95b742ea584..7c5d5436877 100644 --- a/erpnext/selling/report/sales_analytics/sales_analytics.js +++ b/erpnext/selling/report/sales_analytics/sales_analytics.js @@ -73,27 +73,11 @@ frappe.query_reports["Sales Analytics"] = { default: "Monthly", reqd: 1, }, -<<<<<<< HEAD -======= - { - fieldname: "curves", - label: __("Curves"), - fieldtype: "Select", - options: [ - { value: "select", label: __("Select") }, - { value: "all", label: __("All") }, - { value: "non-zeros", label: __("Non-Zeros") }, - { value: "total", label: __("Total Only") }, - ], - default: "select", - reqd: 1, - }, { fieldname: "show_aggregate_value_from_subsidiary_companies", label: __("Show Aggregate Value from Subsidiary Companies"), fieldtype: "Check", }, ->>>>>>> c23af6af41 (feat: Show Aggregate Value from Subsidiary Companies) ], get_datatable_options(options) { return Object.assign(options, { From 8cd455b050c9687bc1c5cb91dd6360035cea4f30 Mon Sep 17 00:00:00 2001 From: Sugesh393 Date: Fri, 22 Nov 2024 11:36:57 +0530 Subject: [PATCH 0532/1614] fix: set price_list_currency only if it exists (cherry picked from commit f0b9cb4019ff6a13fc2166f5023ecae9c4c65af3) --- erpnext/public/js/controllers/transaction.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index ca1b1c8c590..77db3292eb7 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -1904,8 +1904,14 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe callback: function(r) { if (!r.exc) { frappe.run_serially([ - () => me.frm.set_value("price_list_currency", r.message.parent.price_list_currency), - () => me.frm.set_value("plc_conversion_rate", r.message.parent.plc_conversion_rate), + () => { + if (r.message.parent.price_list_currency) + me.frm.set_value("price_list_currency", r.message.parent.price_list_currency); + }, + () => { + if (r.message.parent.plc_conversion_rate) + me.frm.set_value("plc_conversion_rate", r.message.parent.plc_conversion_rate); + }, () => { if(args.items.length) { me._set_values_for_item_list(r.message.children); From 20d0e95d7c3de85e0a0364dd9e7954f3aa6dbeee Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 25 Nov 2024 20:29:13 +0530 Subject: [PATCH 0533/1614] feat: available qty at company in sales transactions (backport #44260) (#44325) * feat: available qty at company in sales transactions (cherry picked from commit d8b9aef14f0a615555067258889bdb09cd6d117e) # Conflicts: # erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json # erpnext/selling/doctype/quotation_item/quotation_item.json # erpnext/selling/doctype/sales_order_item/sales_order_item.json # erpnext/stock/doctype/delivery_note_item/delivery_note_item.json * chore: fix conflicts * chore: fix conflicts * chore: fix conflicts * chore: fix conflicts --------- Co-authored-by: Rohit Waghchaure --- .../sales_invoice_item.json | 28 ++++++++++++++-- .../sales_invoice_item/sales_invoice_item.py | 1 + erpnext/controllers/selling_controller.py | 10 ++++-- .../quotation_item/quotation_item.json | 31 +++++++++++++++--- .../doctype/quotation_item/quotation_item.py | 1 + .../sales_order_item/sales_order_item.json | 29 ++++++++++++++--- .../sales_order_item/sales_order_item.py | 1 + .../delivery_note_item.json | 32 +++++++++++++++---- .../delivery_note_item/delivery_note_item.py | 1 + 9 files changed, 115 insertions(+), 19 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json b/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json index 8b93f56a4c2..dd370ef414f 100644 --- a/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json +++ b/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json @@ -89,11 +89,14 @@ "incoming_rate", "item_tax_rate", "actual_batch_qty", - "actual_qty", "section_break_eoec", "serial_no", "column_break_ytgd", "batch_no", + "available_quantity_section", + "actual_qty", + "column_break_ogff", + "company_total_stock", "edit_references", "sales_order", "so_detail", @@ -675,7 +678,8 @@ "allow_on_submit": 1, "fieldname": "actual_qty", "fieldtype": "Float", - "label": "Available Qty at Warehouse", + "label": "Qty (Warehouse)", + "no_copy": 1, "oldfieldname": "actual_qty", "oldfieldtype": "Currency", "print_hide": 1, @@ -923,12 +927,30 @@ { "fieldname": "column_break_ytgd", "fieldtype": "Column Break" + }, + { + "fieldname": "available_quantity_section", + "fieldtype": "Section Break", + "label": "Available Quantity" + }, + { + "fieldname": "column_break_ogff", + "fieldtype": "Column Break" + }, + { + "allow_on_submit": 1, + "fieldname": "company_total_stock", + "fieldtype": "Float", + "label": "Qty (Company)", + "no_copy": 1, + "print_hide": 1, + "read_only": 1 } ], "idx": 1, "istable": 1, "links": [], - "modified": "2024-10-28 15:06:40.980995", + "modified": "2024-11-25 16:27:33.287341", "modified_by": "Administrator", "module": "Accounts", "name": "Sales Invoice Item", diff --git a/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.py b/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.py index 9be1b42aab3..b7b0873c76b 100644 --- a/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.py +++ b/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.py @@ -28,6 +28,7 @@ class SalesInvoiceItem(Document): base_rate_with_margin: DF.Currency batch_no: DF.Link | None brand: DF.Data | None + company_total_stock: DF.Float conversion_factor: DF.Float cost_center: DF.Link customer_item_code: DF.Data | None diff --git a/erpnext/controllers/selling_controller.py b/erpnext/controllers/selling_controller.py index 89a2111d50f..bb59166d3f8 100644 --- a/erpnext/controllers/selling_controller.py +++ b/erpnext/controllers/selling_controller.py @@ -21,9 +21,15 @@ class SellingController(StockController): def onload(self): super().onload() - if self.doctype in ("Sales Order", "Delivery Note", "Sales Invoice"): + if self.doctype in ("Sales Order", "Delivery Note", "Sales Invoice", "Quotation"): for item in self.get("items") + (self.get("packed_items") or []): - item.update(get_bin_details(item.item_code, item.warehouse, include_child_warehouses=True)) + company = self.company + + item.update( + get_bin_details( + item.item_code, item.warehouse, company=company, include_child_warehouses=True + ) + ) def validate(self): super().validate() diff --git a/erpnext/selling/doctype/quotation_item/quotation_item.json b/erpnext/selling/doctype/quotation_item/quotation_item.json index 0e25313f76a..1ea19aaaf56 100644 --- a/erpnext/selling/doctype/quotation_item/quotation_item.json +++ b/erpnext/selling/doctype/quotation_item/quotation_item.json @@ -24,6 +24,10 @@ "uom", "conversion_factor", "stock_qty", + "available_quantity_section", + "actual_qty", + "column_break_ylrv", + "company_total_stock", "section_break_16", "price_list_rate", "base_price_list_rate", @@ -70,7 +74,6 @@ "prevdoc_docname", "item_balance", "projected_qty", - "actual_qty", "col_break4", "stock_balance", "item_tax_rate", @@ -460,9 +463,10 @@ "report_hide": 1 }, { + "allow_on_submit": 1, "fieldname": "actual_qty", "fieldtype": "Float", - "label": "Actual Qty", + "label": "Qty (Warehouse)", "no_copy": 1, "print_hide": 1, "read_only": 1, @@ -662,12 +666,31 @@ "label": "Has Alternative Item", "print_hide": 1, "read_only": 1 + }, + { + "fieldname": "available_quantity_section", + "fieldtype": "Section Break", + "label": "Available Quantity" + }, + { + "fieldname": "column_break_ylrv", + "fieldtype": "Column Break" + }, + { + "allow_on_submit": 1, + "fieldname": "company_total_stock", + "fieldtype": "Float", + "label": "Qty (Company)", + "no_copy": 1, + "print_hide": 1, + "read_only": 1, + "report_hide": 1 } ], "idx": 1, "istable": 1, "links": [], - "modified": "2023-11-14 18:24:24.619832", + "modified": "2024-11-24 15:18:43.952844", "modified_by": "Administrator", "module": "Selling", "name": "Quotation Item", @@ -677,4 +700,4 @@ "sort_order": "DESC", "states": [], "track_changes": 1 -} \ No newline at end of file +} diff --git a/erpnext/selling/doctype/quotation_item/quotation_item.py b/erpnext/selling/doctype/quotation_item/quotation_item.py index f209762c3ba..7d68eaf07ba 100644 --- a/erpnext/selling/doctype/quotation_item/quotation_item.py +++ b/erpnext/selling/doctype/quotation_item/quotation_item.py @@ -27,6 +27,7 @@ class QuotationItem(Document): blanket_order: DF.Link | None blanket_order_rate: DF.Currency brand: DF.Link | None + company_total_stock: DF.Float conversion_factor: DF.Float customer_item_code: DF.Data | None description: DF.TextEditor | None diff --git a/erpnext/selling/doctype/sales_order_item/sales_order_item.json b/erpnext/selling/doctype/sales_order_item/sales_order_item.json index d451768eaab..fb9e895ccb7 100644 --- a/erpnext/selling/doctype/sales_order_item/sales_order_item.json +++ b/erpnext/selling/doctype/sales_order_item/sales_order_item.json @@ -78,11 +78,14 @@ "against_blanket_order", "blanket_order", "blanket_order_rate", + "available_quantity_section", + "actual_qty", + "column_break_jpky", + "company_total_stock", "manufacturing_section_section", "bom_no", "planning_section", "projected_qty", - "actual_qty", "ordered_qty", "planned_qty", "production_plan_qty", @@ -636,7 +639,7 @@ "allow_on_submit": 1, "fieldname": "actual_qty", "fieldtype": "Float", - "label": "Actual Qty", + "label": "Qty (Warehouse)", "no_copy": 1, "print_hide": 1, "print_width": "70px", @@ -905,12 +908,30 @@ "label": "Is Stock Item", "print_hide": 1, "report_hide": 1 + }, + { + "allow_on_submit": 1, + "fieldname": "company_total_stock", + "fieldtype": "Float", + "label": "Qty (Company)", + "no_copy": 1, + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "column_break_jpky", + "fieldtype": "Column Break" + }, + { + "fieldname": "available_quantity_section", + "fieldtype": "Section Break", + "label": "Available Quantity" } ], "idx": 1, "istable": 1, "links": [], - "modified": "2024-03-21 18:15:56.625005", + "modified": "2024-11-21 14:21:29.743474", "modified_by": "Administrator", "module": "Selling", "name": "Sales Order Item", @@ -921,4 +942,4 @@ "sort_order": "DESC", "states": [], "track_changes": 1 -} \ No newline at end of file +} diff --git a/erpnext/selling/doctype/sales_order_item/sales_order_item.py b/erpnext/selling/doctype/sales_order_item/sales_order_item.py index fa7b9b968f3..888ea755e2e 100644 --- a/erpnext/selling/doctype/sales_order_item/sales_order_item.py +++ b/erpnext/selling/doctype/sales_order_item/sales_order_item.py @@ -30,6 +30,7 @@ class SalesOrderItem(Document): blanket_order_rate: DF.Currency bom_no: DF.Link | None brand: DF.Link | None + company_total_stock: DF.Float conversion_factor: DF.Float customer_item_code: DF.Data | None delivered_by_supplier: DF.Check diff --git a/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json b/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json index b8164b25753..56e5209da59 100644 --- a/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json +++ b/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json @@ -87,16 +87,19 @@ "column_break_rxvc", "batch_no", "available_qty_section", - "actual_batch_qty", "actual_qty", - "installed_qty", - "item_tax_rate", + "actual_batch_qty", "column_break_atna", + "company_total_stock", + "section_break_kejd", + "installed_qty", "packed_qty", + "column_break_fguf", "received_qty", "accounting_details_section", "expense_account", "column_break_71", + "item_tax_rate", "internal_transfer_section", "material_request", "purchase_order", @@ -519,7 +522,7 @@ "allow_on_submit": 1, "fieldname": "actual_qty", "fieldtype": "Float", - "label": "Available Qty at From Warehouse", + "label": "Qty (Warehouse)", "no_copy": 1, "oldfieldname": "actual_qty", "oldfieldtype": "Currency", @@ -907,13 +910,30 @@ { "fieldname": "column_break_rxvc", "fieldtype": "Column Break" + }, + { + "allow_on_submit": 1, + "fieldname": "company_total_stock", + "fieldtype": "Float", + "label": "Qty (Company)", + "no_copy": 1, + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "section_break_kejd", + "fieldtype": "Section Break" + }, + { + "fieldname": "column_break_fguf", + "fieldtype": "Column Break" } ], "idx": 1, "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2024-03-21 18:15:07.603672", + "modified": "2024-11-21 17:37:37.441498", "modified_by": "Administrator", "module": "Stock", "name": "Delivery Note Item", @@ -923,4 +943,4 @@ "sort_field": "modified", "sort_order": "DESC", "states": [] -} \ No newline at end of file +} diff --git a/erpnext/stock/doctype/delivery_note_item/delivery_note_item.py b/erpnext/stock/doctype/delivery_note_item/delivery_note_item.py index b76f7429728..716cd7d4856 100644 --- a/erpnext/stock/doctype/delivery_note_item/delivery_note_item.py +++ b/erpnext/stock/doctype/delivery_note_item/delivery_note_item.py @@ -30,6 +30,7 @@ class DeliveryNoteItem(Document): batch_no: DF.Link | None billed_amt: DF.Currency brand: DF.Link | None + company_total_stock: DF.Float conversion_factor: DF.Float cost_center: DF.Link | None customer_item_code: DF.Data | None From 0d3802873b62dae8c346a9e256ebaa04050acff6 Mon Sep 17 00:00:00 2001 From: Abdeali Chharchhoda Date: Mon, 25 Nov 2024 14:13:26 +0530 Subject: [PATCH 0534/1614] fix: Increase quantity by `1 UOM` when adding an item from the selector in POS (cherry picked from commit bbab850135efa852b3f2ee49ea644b0448f6dddf) --- erpnext/selling/page/point_of_sale/pos_controller.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/erpnext/selling/page/point_of_sale/pos_controller.js b/erpnext/selling/page/point_of_sale/pos_controller.js index c2dd591838d..3028e12d5a2 100644 --- a/erpnext/selling/page/point_of_sale/pos_controller.js +++ b/erpnext/selling/page/point_of_sale/pos_controller.js @@ -556,7 +556,9 @@ erpnext.PointOfSale.Controller = class { const item_row_exists = !$.isEmptyObject(item_row); const from_selector = field === "qty" && value === "+1"; - if (from_selector) value = flt(item_row.stock_qty) + flt(value); + if (from_selector) { + value = flt(item_row.qty) + 1; // increase qty by 1 UOM + } if (item_row_exists) { if (field === "qty") value = flt(value); From 49dad1a456bd22d154deafbfc5b27930721b2240 Mon Sep 17 00:00:00 2001 From: Abdeali Chharchhoda Date: Mon, 25 Nov 2024 14:48:41 +0530 Subject: [PATCH 0535/1614] fix: Show available stock qty in `stock_uom` instead of `uom` (cherry picked from commit 84dcbe6639f9d727a974aecd6ed7a932ca4bb7bc) --- erpnext/selling/page/point_of_sale/pos_controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/selling/page/point_of_sale/pos_controller.js b/erpnext/selling/page/point_of_sale/pos_controller.js index 3028e12d5a2..9684c9635d9 100644 --- a/erpnext/selling/page/point_of_sale/pos_controller.js +++ b/erpnext/selling/page/point_of_sale/pos_controller.js @@ -689,7 +689,7 @@ erpnext.PointOfSale.Controller = class { const is_stock_item = resp[1]; frappe.dom.unfreeze(); - const bold_uom = item_row.uom.bold(); + const bold_uom = item_row.stock_uom.bold(); const bold_item_code = item_row.item_code.bold(); const bold_warehouse = warehouse.bold(); const bold_available_qty = available_qty.toString().bold(); From b65e16a91b71ca7e674c04d08c2a01a8a0fb1079 Mon Sep 17 00:00:00 2001 From: Abdeali Chharchhoda Date: Mon, 25 Nov 2024 16:17:03 +0530 Subject: [PATCH 0536/1614] revert: use `+ flt(value)` instead of direct increment (cherry picked from commit 112b4c705bbad2bd07e6be80e4d4128d73c14d73) --- erpnext/selling/page/point_of_sale/pos_controller.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/erpnext/selling/page/point_of_sale/pos_controller.js b/erpnext/selling/page/point_of_sale/pos_controller.js index 9684c9635d9..de3259ae2b7 100644 --- a/erpnext/selling/page/point_of_sale/pos_controller.js +++ b/erpnext/selling/page/point_of_sale/pos_controller.js @@ -556,9 +556,7 @@ erpnext.PointOfSale.Controller = class { const item_row_exists = !$.isEmptyObject(item_row); const from_selector = field === "qty" && value === "+1"; - if (from_selector) { - value = flt(item_row.qty) + 1; // increase qty by 1 UOM - } + if (from_selector) value = flt(item_row.qty) + flt(value); if (item_row_exists) { if (field === "qty") value = flt(value); From db21def58b21938dd3b2fc51fd0d432a97202665 Mon Sep 17 00:00:00 2001 From: Sugesh393 Date: Thu, 21 Nov 2024 11:05:49 +0530 Subject: [PATCH 0537/1614] fix: add company dynamic filters in number cards (cherry picked from commit 4e7725de669d544909124301c172b8c7d18221a2) --- .../number_card/total_incoming_bills/total_incoming_bills.json | 3 ++- .../total_incoming_payment/total_incoming_payment.json | 1 + .../number_card/total_outgoing_bills/total_outgoing_bills.json | 1 + .../total_outgoing_payment/total_outgoing_payment.json | 1 + erpnext/assets/number_card/asset_value/asset_value.json | 1 + .../new_assets_(this_year)/new_assets_(this_year).json | 1 + erpnext/assets/number_card/total_assets/total_assets.json | 1 + .../buying/number_card/active_suppliers/active_suppliers.json | 1 + erpnext/crm/number_card/open_opportunity/open_opportunity.json | 2 +- .../monthly_completed_work_order.json | 1 + .../monthly_quality_inspection/monthly_quality_inspection.json | 1 + .../monthly_total_work_order/monthly_total_work_order.json | 1 + .../number_card/ongoing_job_card/ongoing_job_card.json | 1 + .../selling/number_card/active_customers/active_customers.json | 2 +- .../number_card/total_active_items/total_active_items.json | 1 + .../stock/number_card/total_stock_value/total_stock_value.json | 1 + .../stock/number_card/total_warehouses/total_warehouses.json | 1 + 17 files changed, 18 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/number_card/total_incoming_bills/total_incoming_bills.json b/erpnext/accounts/number_card/total_incoming_bills/total_incoming_bills.json index 283e187b542..88c7cae3f69 100644 --- a/erpnext/accounts/number_card/total_incoming_bills/total_incoming_bills.json +++ b/erpnext/accounts/number_card/total_incoming_bills/total_incoming_bills.json @@ -4,13 +4,14 @@ "docstatus": 0, "doctype": "Number Card", "document_type": "Purchase Invoice", + "dynamic_filters_json": "[[\"Purchase Invoice\",\"company\",\"=\",\" frappe.defaults.get_user_default(\\\"Company\\\")\"]]", "filters_json": "[[\"Purchase Invoice\",\"docstatus\",\"=\",\"1\",false],[\"Purchase Invoice\",\"posting_date\",\"Timespan\",\"this year\",false]]", "function": "Sum", "idx": 0, "is_public": 1, "is_standard": 1, "label": "Total Incoming Bills", - "modified": "2020-07-22 13:06:46.045344", + "modified": "2024-11-20 19:08:37.043777", "modified_by": "Administrator", "module": "Accounts", "name": "Total Incoming Bills", diff --git a/erpnext/accounts/number_card/total_incoming_payment/total_incoming_payment.json b/erpnext/accounts/number_card/total_incoming_payment/total_incoming_payment.json index bc23c15b6a9..a53b222ed7d 100644 --- a/erpnext/accounts/number_card/total_incoming_payment/total_incoming_payment.json +++ b/erpnext/accounts/number_card/total_incoming_payment/total_incoming_payment.json @@ -4,6 +4,7 @@ "docstatus": 0, "doctype": "Number Card", "document_type": "Payment Entry", + "dynamic_filters_json": "[[\"Payment Entry\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"]]", "filters_json": "[[\"Payment Entry\",\"docstatus\",\"=\",\"1\",false],[\"Payment Entry\",\"posting_date\",\"Timespan\",\"this year\",false],[\"Payment Entry\",\"payment_type\",\"=\",\"Receive\",false]]", "function": "Sum", "idx": 0, diff --git a/erpnext/accounts/number_card/total_outgoing_bills/total_outgoing_bills.json b/erpnext/accounts/number_card/total_outgoing_bills/total_outgoing_bills.json index fe916182102..092defd94bd 100644 --- a/erpnext/accounts/number_card/total_outgoing_bills/total_outgoing_bills.json +++ b/erpnext/accounts/number_card/total_outgoing_bills/total_outgoing_bills.json @@ -4,6 +4,7 @@ "docstatus": 0, "doctype": "Number Card", "document_type": "Sales Invoice", + "dynamic_filters_json": "[[\"Sales Invoice\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"]]", "filters_json": "[[\"Sales Invoice\",\"docstatus\",\"=\",\"1\",false],[\"Sales Invoice\",\"posting_date\",\"Timespan\",\"this year\",false]]", "function": "Sum", "idx": 0, diff --git a/erpnext/accounts/number_card/total_outgoing_payment/total_outgoing_payment.json b/erpnext/accounts/number_card/total_outgoing_payment/total_outgoing_payment.json index d27be883500..d60f30f7c9a 100644 --- a/erpnext/accounts/number_card/total_outgoing_payment/total_outgoing_payment.json +++ b/erpnext/accounts/number_card/total_outgoing_payment/total_outgoing_payment.json @@ -4,6 +4,7 @@ "docstatus": 0, "doctype": "Number Card", "document_type": "Payment Entry", + "dynamic_filters_json": "[[\"Payment Entry\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"]]", "filters_json": "[[\"Payment Entry\",\"docstatus\",\"=\",\"1\",false],[\"Payment Entry\",\"posting_date\",\"Timespan\",\"this year\",false],[\"Payment Entry\",\"payment_type\",\"=\",\"Pay\",false]]", "function": "Sum", "idx": 0, diff --git a/erpnext/assets/number_card/asset_value/asset_value.json b/erpnext/assets/number_card/asset_value/asset_value.json index 68e5f54c789..c437f4800f3 100644 --- a/erpnext/assets/number_card/asset_value/asset_value.json +++ b/erpnext/assets/number_card/asset_value/asset_value.json @@ -4,6 +4,7 @@ "docstatus": 0, "doctype": "Number Card", "document_type": "Asset", + "dynamic_filters_json": "[[\"Asset\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"]]", "filters_json": "[]", "function": "Sum", "idx": 0, diff --git a/erpnext/assets/number_card/new_assets_(this_year)/new_assets_(this_year).json b/erpnext/assets/number_card/new_assets_(this_year)/new_assets_(this_year).json index 6c8fb356575..cdf52d011d4 100644 --- a/erpnext/assets/number_card/new_assets_(this_year)/new_assets_(this_year).json +++ b/erpnext/assets/number_card/new_assets_(this_year)/new_assets_(this_year).json @@ -3,6 +3,7 @@ "docstatus": 0, "doctype": "Number Card", "document_type": "Asset", + "dynamic_filters_json": "[[\"Asset\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"]]", "filters_json": "[[\"Asset\",\"creation\",\"Timespan\",\"this year\",false]]", "function": "Count", "idx": 0, diff --git a/erpnext/assets/number_card/total_assets/total_assets.json b/erpnext/assets/number_card/total_assets/total_assets.json index d127de8f2c6..d8626da608c 100644 --- a/erpnext/assets/number_card/total_assets/total_assets.json +++ b/erpnext/assets/number_card/total_assets/total_assets.json @@ -3,6 +3,7 @@ "docstatus": 0, "doctype": "Number Card", "document_type": "Asset", + "dynamic_filters_json": "[[\"Asset\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"]]", "filters_json": "[]", "function": "Count", "idx": 0, diff --git a/erpnext/buying/number_card/active_suppliers/active_suppliers.json b/erpnext/buying/number_card/active_suppliers/active_suppliers.json index 91d5b13b06f..61d34c6261e 100644 --- a/erpnext/buying/number_card/active_suppliers/active_suppliers.json +++ b/erpnext/buying/number_card/active_suppliers/active_suppliers.json @@ -3,6 +3,7 @@ "docstatus": 0, "doctype": "Number Card", "document_type": "Supplier", + "dynamic_filters_json": "[[\"Supplier\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"]]", "filters_json": "[[\"Supplier\",\"disabled\",\"=\",\"0\"]]", "function": "Count", "idx": 0, diff --git a/erpnext/crm/number_card/open_opportunity/open_opportunity.json b/erpnext/crm/number_card/open_opportunity/open_opportunity.json index 6e06ed64da3..33a757feb14 100644 --- a/erpnext/crm/number_card/open_opportunity/open_opportunity.json +++ b/erpnext/crm/number_card/open_opportunity/open_opportunity.json @@ -3,7 +3,7 @@ "docstatus": 0, "doctype": "Number Card", "document_type": "Opportunity", - "dynamic_filters_json": "[[\"Opportunity\",\"status\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"]]", + "dynamic_filters_json": "[[\"Opportunity\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"]]", "filters_json": "[[\"Opportunity\",\"company\",\"=\",null,false]]", "function": "Count", "idx": 0, diff --git a/erpnext/manufacturing/number_card/monthly_completed_work_order/monthly_completed_work_order.json b/erpnext/manufacturing/number_card/monthly_completed_work_order/monthly_completed_work_order.json index 36c0b9ae75b..7381de707d7 100644 --- a/erpnext/manufacturing/number_card/monthly_completed_work_order/monthly_completed_work_order.json +++ b/erpnext/manufacturing/number_card/monthly_completed_work_order/monthly_completed_work_order.json @@ -3,6 +3,7 @@ "docstatus": 0, "doctype": "Number Card", "document_type": "Work Order", + "dynamic_filters_json": "[[\"Work Order\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"]]", "filters_json": "[[\"Work Order\",\"status\",\"=\",\"Completed\"],[\"Work Order\",\"docstatus\",\"=\",1],[\"Work Order\",\"creation\",\"between\",[\"2020-06-08\",\"2020-07-08\"]]]", "function": "Count", "idx": 0, diff --git a/erpnext/manufacturing/number_card/monthly_quality_inspection/monthly_quality_inspection.json b/erpnext/manufacturing/number_card/monthly_quality_inspection/monthly_quality_inspection.json index 91a45365c0d..e716493483d 100644 --- a/erpnext/manufacturing/number_card/monthly_quality_inspection/monthly_quality_inspection.json +++ b/erpnext/manufacturing/number_card/monthly_quality_inspection/monthly_quality_inspection.json @@ -3,6 +3,7 @@ "docstatus": 0, "doctype": "Number Card", "document_type": "Quality Inspection", + "dynamic_filters_json": "[[\"Quality Inspection\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"]]", "filters_json": "[[\"Quality Inspection\",\"docstatus\",\"=\",1],[\"Quality Inspection\",\"creation\",\"between\",[\"2020-06-08\",\"2020-07-08\"]]]", "function": "Count", "idx": 0, diff --git a/erpnext/manufacturing/number_card/monthly_total_work_order/monthly_total_work_order.json b/erpnext/manufacturing/number_card/monthly_total_work_order/monthly_total_work_order.json index 80d3b1520ae..e4b8c940454 100644 --- a/erpnext/manufacturing/number_card/monthly_total_work_order/monthly_total_work_order.json +++ b/erpnext/manufacturing/number_card/monthly_total_work_order/monthly_total_work_order.json @@ -3,6 +3,7 @@ "docstatus": 0, "doctype": "Number Card", "document_type": "Work Order", + "dynamic_filters_json": "[[\"Work Order\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"]]", "filters_json": "[[\"Work Order\",\"docstatus\",\"=\",1],[\"Work Order\",\"creation\",\"between\",[\"2020-06-08\",\"2020-07-08\"]]]", "function": "Count", "idx": 0, diff --git a/erpnext/manufacturing/number_card/ongoing_job_card/ongoing_job_card.json b/erpnext/manufacturing/number_card/ongoing_job_card/ongoing_job_card.json index ba23ff34531..0138af827a6 100644 --- a/erpnext/manufacturing/number_card/ongoing_job_card/ongoing_job_card.json +++ b/erpnext/manufacturing/number_card/ongoing_job_card/ongoing_job_card.json @@ -3,6 +3,7 @@ "docstatus": 0, "doctype": "Number Card", "document_type": "Job Card", + "dynamic_filters_json": "[[\"Job Card\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"]]", "filters_json": "[[\"Job Card\",\"status\",\"!=\",\"Completed\"],[\"Job Card\",\"docstatus\",\"=\",1]]", "function": "Count", "idx": 0, diff --git a/erpnext/selling/number_card/active_customers/active_customers.json b/erpnext/selling/number_card/active_customers/active_customers.json index 33776348477..8b027a14a0e 100644 --- a/erpnext/selling/number_card/active_customers/active_customers.json +++ b/erpnext/selling/number_card/active_customers/active_customers.json @@ -3,7 +3,7 @@ "docstatus": 0, "doctype": "Number Card", "document_type": "Customer", - "dynamic_filters_json": "", + "dynamic_filters_json": "[[\"Customer\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"]]", "filters_json": "[[\"Customer\",\"disabled\",\"=\",\"0\"]]", "function": "Count", "idx": 0, diff --git a/erpnext/stock/number_card/total_active_items/total_active_items.json b/erpnext/stock/number_card/total_active_items/total_active_items.json index f6863b96d7c..e2db153be0a 100644 --- a/erpnext/stock/number_card/total_active_items/total_active_items.json +++ b/erpnext/stock/number_card/total_active_items/total_active_items.json @@ -3,6 +3,7 @@ "docstatus": 0, "doctype": "Number Card", "document_type": "Item", + "dynamic_filters_json": "[[\"Item\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"]]", "filters_json": "[[\"Item\",\"disabled\",\"=\",0]]", "function": "Count", "idx": 0, diff --git a/erpnext/stock/number_card/total_stock_value/total_stock_value.json b/erpnext/stock/number_card/total_stock_value/total_stock_value.json index 8e480a6b3e6..001549ba4f5 100644 --- a/erpnext/stock/number_card/total_stock_value/total_stock_value.json +++ b/erpnext/stock/number_card/total_stock_value/total_stock_value.json @@ -4,6 +4,7 @@ "docstatus": 0, "doctype": "Number Card", "document_type": "Bin", + "dynamic_filters_json": "[[\"Bin\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"]]", "filters_json": "[]", "function": "Sum", "idx": 0, diff --git a/erpnext/stock/number_card/total_warehouses/total_warehouses.json b/erpnext/stock/number_card/total_warehouses/total_warehouses.json index ab0836a3afe..8eadfac48d1 100644 --- a/erpnext/stock/number_card/total_warehouses/total_warehouses.json +++ b/erpnext/stock/number_card/total_warehouses/total_warehouses.json @@ -3,6 +3,7 @@ "docstatus": 0, "doctype": "Number Card", "document_type": "Warehouse", + "dynamic_filters_json": "[[\"Warehouse\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"]]", "filters_json": "[[\"Warehouse\",\"disabled\",\"=\",0]]", "function": "Count", "idx": 0, From 7423d7d3372aecb0b6003e67313322061bdea673 Mon Sep 17 00:00:00 2001 From: Sugesh393 Date: Thu, 21 Nov 2024 12:09:24 +0530 Subject: [PATCH 0538/1614] fix: remove irrelavent filters (cherry picked from commit 29762c48265c21c62dfdb04f03736d076ef4ff68) --- .../buying/number_card/active_suppliers/active_suppliers.json | 1 - .../monthly_quality_inspection/monthly_quality_inspection.json | 1 - .../selling/number_card/active_customers/active_customers.json | 1 - .../stock/number_card/total_active_items/total_active_items.json | 1 - .../stock/number_card/total_stock_value/total_stock_value.json | 1 - 5 files changed, 5 deletions(-) diff --git a/erpnext/buying/number_card/active_suppliers/active_suppliers.json b/erpnext/buying/number_card/active_suppliers/active_suppliers.json index 61d34c6261e..91d5b13b06f 100644 --- a/erpnext/buying/number_card/active_suppliers/active_suppliers.json +++ b/erpnext/buying/number_card/active_suppliers/active_suppliers.json @@ -3,7 +3,6 @@ "docstatus": 0, "doctype": "Number Card", "document_type": "Supplier", - "dynamic_filters_json": "[[\"Supplier\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"]]", "filters_json": "[[\"Supplier\",\"disabled\",\"=\",\"0\"]]", "function": "Count", "idx": 0, diff --git a/erpnext/manufacturing/number_card/monthly_quality_inspection/monthly_quality_inspection.json b/erpnext/manufacturing/number_card/monthly_quality_inspection/monthly_quality_inspection.json index e716493483d..91a45365c0d 100644 --- a/erpnext/manufacturing/number_card/monthly_quality_inspection/monthly_quality_inspection.json +++ b/erpnext/manufacturing/number_card/monthly_quality_inspection/monthly_quality_inspection.json @@ -3,7 +3,6 @@ "docstatus": 0, "doctype": "Number Card", "document_type": "Quality Inspection", - "dynamic_filters_json": "[[\"Quality Inspection\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"]]", "filters_json": "[[\"Quality Inspection\",\"docstatus\",\"=\",1],[\"Quality Inspection\",\"creation\",\"between\",[\"2020-06-08\",\"2020-07-08\"]]]", "function": "Count", "idx": 0, diff --git a/erpnext/selling/number_card/active_customers/active_customers.json b/erpnext/selling/number_card/active_customers/active_customers.json index 8b027a14a0e..7a31a21f6fd 100644 --- a/erpnext/selling/number_card/active_customers/active_customers.json +++ b/erpnext/selling/number_card/active_customers/active_customers.json @@ -3,7 +3,6 @@ "docstatus": 0, "doctype": "Number Card", "document_type": "Customer", - "dynamic_filters_json": "[[\"Customer\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"]]", "filters_json": "[[\"Customer\",\"disabled\",\"=\",\"0\"]]", "function": "Count", "idx": 0, diff --git a/erpnext/stock/number_card/total_active_items/total_active_items.json b/erpnext/stock/number_card/total_active_items/total_active_items.json index e2db153be0a..f6863b96d7c 100644 --- a/erpnext/stock/number_card/total_active_items/total_active_items.json +++ b/erpnext/stock/number_card/total_active_items/total_active_items.json @@ -3,7 +3,6 @@ "docstatus": 0, "doctype": "Number Card", "document_type": "Item", - "dynamic_filters_json": "[[\"Item\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"]]", "filters_json": "[[\"Item\",\"disabled\",\"=\",0]]", "function": "Count", "idx": 0, diff --git a/erpnext/stock/number_card/total_stock_value/total_stock_value.json b/erpnext/stock/number_card/total_stock_value/total_stock_value.json index 001549ba4f5..8e480a6b3e6 100644 --- a/erpnext/stock/number_card/total_stock_value/total_stock_value.json +++ b/erpnext/stock/number_card/total_stock_value/total_stock_value.json @@ -4,7 +4,6 @@ "docstatus": 0, "doctype": "Number Card", "document_type": "Bin", - "dynamic_filters_json": "[[\"Bin\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"]]", "filters_json": "[]", "function": "Sum", "idx": 0, From 465a26f714baaff2f8a3a1da6dc12fe91c699d1e Mon Sep 17 00:00:00 2001 From: Ernesto Ruiz Date: Sat, 23 Nov 2024 09:07:18 -0600 Subject: [PATCH 0539/1614] chore: Add translations to QI validations in Update stock_controller.py chore: Add translations to QI validations in Update stock_controller.py (cherry picked from commit 6754f15487edb51b60ebaecc6fc43d34e2154e07) --- erpnext/controllers/stock_controller.py | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/erpnext/controllers/stock_controller.py b/erpnext/controllers/stock_controller.py index 4eb67b6f42e..8f0a5d5edf5 100644 --- a/erpnext/controllers/stock_controller.py +++ b/erpnext/controllers/stock_controller.py @@ -1008,11 +1008,13 @@ class StockController(AccountsController): def validate_qi_presence(self, row): """Check if QI is present on row level. Warn on save and stop on submit if missing.""" if not row.quality_inspection: - msg = f"Row #{row.idx}: Quality Inspection is required for Item {frappe.bold(row.item_code)}" + msg = _("Row #{0}: Quality Inspection is required for Item {1}").format( + row.idx, frappe.bold(row.item_code) + ) if self.docstatus == 1: - frappe.throw(_(msg), title=_("Inspection Required"), exc=QualityInspectionRequiredError) + frappe.throw(msg, title=_("Inspection Required"), exc=QualityInspectionRequiredError) else: - frappe.msgprint(_(msg), title=_("Inspection Required"), indicator="blue") + frappe.msgprint(msg, title=_("Inspection Required"), indicator="blue") def validate_qi_submission(self, row): """Check if QI is submitted on row level, during submission""" @@ -1021,11 +1023,13 @@ class StockController(AccountsController): if not qa_docstatus == 1: link = frappe.utils.get_link_to_form("Quality Inspection", row.quality_inspection) - msg = f"Row #{row.idx}: Quality Inspection {link} is not submitted for the item: {row.item_code}" + msg = _("Row #{0}: Quality Inspection {1} is not submitted for the item: {2}").format( + row.idx, link, row.item_code + ) if action == "Stop": - frappe.throw(_(msg), title=_("Inspection Submission"), exc=QualityInspectionNotSubmittedError) + frappe.throw(msg, title=_("Inspection Submission"), exc=QualityInspectionNotSubmittedError) else: - frappe.msgprint(_(msg), alert=True, indicator="orange") + frappe.msgprint(msg, alert=True, indicator="orange") def validate_qi_rejection(self, row): """Check if QI is rejected on row level, during submission""" @@ -1034,11 +1038,13 @@ class StockController(AccountsController): if qa_status == "Rejected": link = frappe.utils.get_link_to_form("Quality Inspection", row.quality_inspection) - msg = f"Row #{row.idx}: Quality Inspection {link} was rejected for item {row.item_code}" + msg = _("Row #{0}: Quality Inspection {1} was rejected for item {2}").format( + row.idx, link, row.item_code + ) if action == "Stop": - frappe.throw(_(msg), title=_("Inspection Rejected"), exc=QualityInspectionRejectedError) + frappe.throw(msg, title=_("Inspection Rejected"), exc=QualityInspectionRejectedError) else: - frappe.msgprint(_(msg), alert=True, indicator="orange") + frappe.msgprint(msg, alert=True, indicator="orange") def update_blanket_order(self): blanket_orders = list(set([d.blanket_order for d in self.items if d.blanket_order])) From cde19066fe6b42aca5cae6971805973ac18a01dd Mon Sep 17 00:00:00 2001 From: vishakhdesai Date: Mon, 25 Nov 2024 12:50:35 +0530 Subject: [PATCH 0540/1614] fix: use field precision instead of hardcoded precision in so and po (cherry picked from commit 1a1e2c7e01f76ed9f9cc727fb802ade8faa99440) # Conflicts: # erpnext/buying/doctype/purchase_order/purchase_order.js --- .../doctype/purchase_order/purchase_order.js | 29 +++++++++++--- .../doctype/sales_order/sales_order.js | 39 +++++++++++++------ 2 files changed, 50 insertions(+), 18 deletions(-) diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.js b/erpnext/buying/doctype/purchase_order/purchase_order.js index de335bd6292..cb0aea0eb15 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.js +++ b/erpnext/buying/doctype/purchase_order/purchase_order.js @@ -93,7 +93,10 @@ frappe.ui.form.on("Purchase Order", { get_materials_from_supplier: function (frm) { let po_details = []; - if (frm.doc.supplied_items && (flt(frm.doc.per_received, 2) == 100 || frm.doc.status === "Closed")) { + if ( + frm.doc.supplied_items && + (flt(frm.doc.per_received, precision("per_received")) == 100 || frm.doc.status === "Closed") + ) { frm.doc.supplied_items.forEach((d) => { if (d.total_supplied_qty && d.total_supplied_qty != d.consumed_qty) { po_details.push(d.name); @@ -329,8 +332,8 @@ erpnext.buying.PurchaseOrderController = class PurchaseOrderController extends ( if (!["Closed", "Delivered"].includes(doc.status)) { if ( this.frm.doc.status !== "Closed" && - flt(this.frm.doc.per_received, 2) < 100 && - flt(this.frm.doc.per_billed, 2) < 100 + flt(this.frm.doc.per_received, precision("per_received")) < 100 && + flt(this.frm.doc.per_billed, precision("per_billed")) < 100 ) { if (!this.frm.doc.__onload || this.frm.doc.__onload.can_update_items) { this.frm.add_custom_button(__("Update Items"), () => { @@ -344,7 +347,10 @@ erpnext.buying.PurchaseOrderController = class PurchaseOrderController extends ( } } if (this.frm.has_perm("submit")) { - if (flt(doc.per_billed, 2) < 100 || flt(doc.per_received, 2) < 100) { + if ( + flt(doc.per_billed, precision("per_billed")) < 100 || + flt(doc.per_received, precision("per_received")) < 100 + ) { if (doc.status != "On Hold") { this.frm.add_custom_button( __("Hold"), @@ -382,8 +388,13 @@ erpnext.buying.PurchaseOrderController = class PurchaseOrderController extends ( } if (doc.status != "Closed") { if (doc.status != "On Hold") { +<<<<<<< HEAD if (flt(doc.per_received) < 100 && allow_receipt) { cur_frm.add_custom_button( +======= + if (flt(doc.per_received, precision("per_received")) < 100 && allow_receipt) { + this.frm.add_custom_button( +>>>>>>> 1a1e2c7e01 (fix: use field precision instead of hardcoded precision in so and po) __("Purchase Receipt"), this.make_purchase_receipt, __("Create") @@ -408,14 +419,20 @@ erpnext.buying.PurchaseOrderController = class PurchaseOrderController extends ( } } } +<<<<<<< HEAD if (flt(doc.per_billed) < 100) cur_frm.add_custom_button( +======= + // Please do not add precision in the below flt function + if (flt(doc.per_billed, precision("per_billed")) < 100) + this.frm.add_custom_button( +>>>>>>> 1a1e2c7e01 (fix: use field precision instead of hardcoded precision in so and po) __("Purchase Invoice"), this.make_purchase_invoice, __("Create") ); - if (flt(doc.per_billed, 2) < 100 && doc.status != "Delivered") { + if (flt(doc.per_billed, precision("per_billed")) < 100 && doc.status != "Delivered") { this.frm.add_custom_button( __("Payment"), () => this.make_payment_entry(), @@ -423,7 +440,7 @@ erpnext.buying.PurchaseOrderController = class PurchaseOrderController extends ( ); } - if (flt(doc.per_billed, 2) < 100) { + if (flt(doc.per_billed, precision("per_billed")) < 100) { this.frm.add_custom_button( __("Payment Request"), function () { diff --git a/erpnext/selling/doctype/sales_order/sales_order.js b/erpnext/selling/doctype/sales_order/sales_order.js index 5387286c709..2c8a6cccceb 100644 --- a/erpnext/selling/doctype/sales_order/sales_order.js +++ b/erpnext/selling/doctype/sales_order/sales_order.js @@ -57,8 +57,8 @@ frappe.ui.form.on("Sales Order", { if (frm.doc.docstatus === 1) { if ( frm.doc.status !== "Closed" && - flt(frm.doc.per_delivered, 2) < 100 && - flt(frm.doc.per_billed, 2) < 100 && + flt(frm.doc.per_delivered, precision("per_delivered")) < 100 && + flt(frm.doc.per_billed, precision("per_billed")) < 100 && frm.has_perm("write") ) { frm.add_custom_button(__("Update Items"), () => { @@ -75,7 +75,7 @@ frappe.ui.form.on("Sales Order", { if ( frm.doc.__onload && frm.doc.__onload.has_unreserved_stock && - flt(frm.doc.per_picked) === 0 + flt(frm.doc.per_picked, precision("per_picked")) === 0 ) { frm.add_custom_button( __("Reserve"), @@ -604,7 +604,10 @@ erpnext.selling.SalesOrderController = class SalesOrderController extends erpnex __("Status") ); - if (flt(doc.per_delivered, 2) < 100 || flt(doc.per_billed, 2) < 100) { + if ( + flt(doc.per_delivered, precision("per_delivered")) < 100 || + flt(doc.per_billed, precision("per_billed")) < 100 + ) { // close this.frm.add_custom_button(__("Close"), () => this.close_sales_order(), __("Status")); } @@ -627,7 +630,10 @@ erpnext.selling.SalesOrderController = class SalesOrderController extends erpnex ) && !this.frm.doc.skip_delivery_note; if (this.frm.has_perm("submit")) { - if (flt(doc.per_delivered, 2) < 100 || flt(doc.per_billed, 2) < 100) { + if ( + flt(doc.per_delivered, precision("per_delivered")) < 100 || + flt(doc.per_billed, precision("per_billed")) < 100 + ) { // hold this.frm.add_custom_button( __("Hold"), @@ -645,8 +651,8 @@ erpnext.selling.SalesOrderController = class SalesOrderController extends erpnex if ( (!doc.__onload || !doc.__onload.has_reserved_stock) && - flt(doc.per_picked, 2) < 100 && - flt(doc.per_delivered, 2) < 100 && + flt(doc.per_picked, precision("per_picked")) < 100 && + flt(doc.per_delivered, precision("per_delivered")) < 100 && frappe.model.can_create("Pick List") ) { this.frm.add_custom_button( @@ -664,7 +670,7 @@ erpnext.selling.SalesOrderController = class SalesOrderController extends erpnex // delivery note if ( - flt(doc.per_delivered, 2) < 100 && + flt(doc.per_delivered, precision("per_delivered")) < 100 && (order_is_a_sale || order_is_a_custom_sale) && allow_delivery ) { @@ -686,7 +692,10 @@ erpnext.selling.SalesOrderController = class SalesOrderController extends erpnex } // sales invoice - if (flt(doc.per_billed, 2) < 100 && frappe.model.can_create("Sales Invoice")) { + if ( + flt(doc.per_billed, precision("per_billed")) < 100 && + frappe.model.can_create("Sales Invoice") + ) { this.frm.add_custom_button( __("Sales Invoice"), () => me.make_sales_invoice(), @@ -698,7 +707,7 @@ erpnext.selling.SalesOrderController = class SalesOrderController extends erpnex if ( (!doc.order_type || ((order_is_a_sale || order_is_a_custom_sale) && - flt(doc.per_delivered, 2) < 100)) && + flt(doc.per_delivered, precision("per_delivered")) < 100)) && frappe.model.can_create("Material Request") ) { this.frm.add_custom_button( @@ -723,7 +732,10 @@ erpnext.selling.SalesOrderController = class SalesOrderController extends erpnex } // maintenance - if (flt(doc.per_delivered, 2) < 100 && (order_is_maintenance || order_is_a_custom_sale)) { + if ( + flt(doc.per_delivered, precision("per_delivered")) < 100 && + (order_is_maintenance || order_is_a_custom_sale) + ) { if (frappe.model.can_create("Maintenance Visit")) { this.frm.add_custom_button( __("Maintenance Visit"), @@ -741,7 +753,10 @@ erpnext.selling.SalesOrderController = class SalesOrderController extends erpnex } // project - if (flt(doc.per_delivered, 2) < 100 && frappe.model.can_create("Project")) { + if ( + flt(doc.per_delivered, precision("per_delivered")) < 100 && + frappe.model.can_create("Project") + ) { this.frm.add_custom_button(__("Project"), () => this.make_project(), __("Create")); } From bc93de682b6de2cec6474c1067dd461fbc193732 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 26 Nov 2024 13:48:00 +0530 Subject: [PATCH 0541/1614] chore: resolve conflict --- .../buying/doctype/purchase_order/purchase_order.js | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.js b/erpnext/buying/doctype/purchase_order/purchase_order.js index cb0aea0eb15..9718ab19b19 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.js +++ b/erpnext/buying/doctype/purchase_order/purchase_order.js @@ -388,13 +388,8 @@ erpnext.buying.PurchaseOrderController = class PurchaseOrderController extends ( } if (doc.status != "Closed") { if (doc.status != "On Hold") { -<<<<<<< HEAD - if (flt(doc.per_received) < 100 && allow_receipt) { - cur_frm.add_custom_button( -======= if (flt(doc.per_received, precision("per_received")) < 100 && allow_receipt) { this.frm.add_custom_button( ->>>>>>> 1a1e2c7e01 (fix: use field precision instead of hardcoded precision in so and po) __("Purchase Receipt"), this.make_purchase_receipt, __("Create") @@ -419,14 +414,9 @@ erpnext.buying.PurchaseOrderController = class PurchaseOrderController extends ( } } } -<<<<<<< HEAD - if (flt(doc.per_billed) < 100) - cur_frm.add_custom_button( -======= // Please do not add precision in the below flt function if (flt(doc.per_billed, precision("per_billed")) < 100) this.frm.add_custom_button( ->>>>>>> 1a1e2c7e01 (fix: use field precision instead of hardcoded precision in so and po) __("Purchase Invoice"), this.make_purchase_invoice, __("Create") From ea0f24aa573e66d289be4af567405e072eb73968 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 26 Nov 2024 19:43:51 +0530 Subject: [PATCH 0542/1614] fix: billed qty and received amount in PO analysis report (backport #44349) (#44354) fix: billed qty and received amount in PO analysis report (#44349) (cherry picked from commit 2ab7ec5437834a63e0a0ebe5e081236370d56e8b) Co-authored-by: rohitwaghchaure --- .../purchase_order_analysis.py | 38 +++++++++++++++++-- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.py b/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.py index 084c3b5fc2b..1a250acd4d2 100644 --- a/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.py +++ b/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.py @@ -18,6 +18,7 @@ def execute(filters=None): columns = get_columns(filters) data = get_data(filters) + update_received_amount(data) if not data: return [], [], None, [] @@ -40,7 +41,6 @@ def get_data(filters): po = frappe.qb.DocType("Purchase Order") po_item = frappe.qb.DocType("Purchase Order Item") pi_item = frappe.qb.DocType("Purchase Invoice Item") - pr_item = frappe.qb.DocType("Purchase Receipt Item") query = ( frappe.qb.from_(po) @@ -48,8 +48,6 @@ def get_data(filters): .on(po_item.parent == po.name) .left_join(pi_item) .on((pi_item.po_detail == po_item.name) & (pi_item.docstatus == 1)) - .left_join(pr_item) - .on((pr_item.purchase_order_item == po_item.name) & (pr_item.docstatus == 1)) .select( po.transaction_date.as_("date"), po_item.schedule_date.as_("required_date"), @@ -63,7 +61,6 @@ def get_data(filters): (po_item.qty - po_item.received_qty).as_("pending_qty"), Sum(IfNull(pi_item.qty, 0)).as_("billed_qty"), po_item.base_amount.as_("amount"), - (pr_item.base_amount).as_("received_qty_amount"), (po_item.billed_amt * IfNull(po.conversion_rate, 1)).as_("billed_amount"), (po_item.base_amount - (po_item.billed_amt * IfNull(po.conversion_rate, 1))).as_( "pending_amount" @@ -95,6 +92,39 @@ def get_data(filters): return data +def update_received_amount(data): + pr_data = get_received_amount_data(data) + + for row in data: + row.received_qty_amount = flt(pr_data.get(row.name)) + + +def get_received_amount_data(data): + pr = frappe.qb.DocType("Purchase Receipt") + pr_item = frappe.qb.DocType("Purchase Receipt Item") + + query = ( + frappe.qb.from_(pr) + .inner_join(pr_item) + .on(pr_item.parent == pr.name) + .select( + pr_item.purchase_order_item, + Sum(pr_item.base_amount).as_("received_qty_amount"), + ) + .where((pr_item.parent == pr.name) & (pr.docstatus == 1)) + .groupby(pr_item.purchase_order_item) + ) + + query = query.where(pr_item.purchase_order_item.isin([row.name for row in data])) + + data = query.run() + + if not data: + return frappe._dict() + + return frappe._dict(data) + + def prepare_data(data, filters): completed, pending = 0, 0 pending_field = "pending_amount" From 89bd4eba46894efba5cfe9bc3411448d41366807 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 26 Nov 2024 21:18:26 +0530 Subject: [PATCH 0543/1614] fix: added validation for quality inspection (backport #44351) (#44357) fix: added validation for quality inspection (#44351) (cherry picked from commit 0fd50b504814e8f035be8d6cef62121513fb8639) Co-authored-by: rohitwaghchaure --- .../quality_inspection/quality_inspection.py | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/quality_inspection/quality_inspection.py b/erpnext/stock/doctype/quality_inspection/quality_inspection.py index 43efcbc8ca6..6890256dc04 100644 --- a/erpnext/stock/doctype/quality_inspection/quality_inspection.py +++ b/erpnext/stock/doctype/quality_inspection/quality_inspection.py @@ -6,7 +6,7 @@ import frappe from frappe import _ from frappe.model.document import Document from frappe.model.mapper import get_mapped_doc -from frappe.utils import cint, cstr, flt, get_number_format_info +from frappe.utils import cint, cstr, flt, get_link_to_form, get_number_format_info from erpnext.stock.doctype.quality_inspection_template.quality_inspection_template import ( get_template_details, @@ -73,6 +73,27 @@ class QualityInspection(Document): if self.readings: self.inspect_and_set_status() + self.validate_inspection_required() + + def validate_inspection_required(self): + if self.reference_type in ["Purchase Receipt", "Purchase Invoice"] and not frappe.get_cached_value( + "Item", self.item_code, "inspection_required_before_purchase" + ): + frappe.throw( + _( + "'Inspection Required before Purchase' has disabled for the item {0}, no need to create the QI" + ).format(get_link_to_form("Item", self.item_code)) + ) + + if self.reference_type in ["Delivery Note", "Sales Invoice"] and not frappe.get_cached_value( + "Item", self.item_code, "inspection_required_before_delivery" + ): + frappe.throw( + _( + "'Inspection Required before Delivery' has disabled for the item {0}, no need to create the QI" + ).format(get_link_to_form("Item", self.item_code)) + ) + def before_submit(self): self.validate_readings_status_mandatory() From 7e61aca512c18adca6f8eb5b2300287898e8f3e4 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 26 Nov 2024 20:16:24 +0100 Subject: [PATCH 0544/1614] fix: unify company address query in sales transactions (backport #44361) (#44365) fix: unify company address query in sales transactions (#44361) * fix: unify company address query in sales transactions * refactor: get the correct field label (cherry picked from commit 3f92a57d63edf5c5b478736e25d77b5eb43eac94) Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com> --- .../doctype/sales_invoice/sales_invoice.js | 14 -------------- erpnext/public/js/queries.js | 6 +++++- erpnext/public/js/utils/sales_common.js | 1 + erpnext/selling/doctype/quotation/quotation.js | 14 -------------- erpnext/selling/doctype/sales_order/sales_order.js | 14 -------------- 5 files changed, 6 insertions(+), 43 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js index 5e248c8b235..75c71ef6eb3 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js @@ -741,20 +741,6 @@ frappe.ui.form.on("Sales Invoice", { }; }; - frm.set_query("company_address", function (doc) { - if (!doc.company) { - frappe.throw(__("Please set Company")); - } - - return { - query: "frappe.contacts.doctype.address.address.address_query", - filters: { - link_doctype: "Company", - link_name: doc.company, - }, - }; - }); - frm.set_query("pos_profile", function (doc) { if (!doc.company) { frappe.throw(__("Please set Company")); diff --git a/erpnext/public/js/queries.js b/erpnext/public/js/queries.js index d7edac3cb9f..5350f91746c 100644 --- a/erpnext/public/js/queries.js +++ b/erpnext/public/js/queries.js @@ -77,9 +77,13 @@ $.extend(erpnext.queries, { }, company_address_query: function (doc) { + if (!doc.company) { + frappe.throw(__("Please set {0}", [__(frappe.meta.get_label(doc.doctype, "company", doc.name))])); + } + return { query: "frappe.contacts.doctype.address.address.address_query", - filters: { is_your_company_address: 1, link_doctype: "Company", link_name: doc.company || "" }, + filters: { link_doctype: "Company", link_name: doc.company }, }; }, diff --git a/erpnext/public/js/utils/sales_common.js b/erpnext/public/js/utils/sales_common.js index ac4ecf52e63..373bf3d2115 100644 --- a/erpnext/public/js/utils/sales_common.js +++ b/erpnext/public/js/utils/sales_common.js @@ -52,6 +52,7 @@ erpnext.sales_common = { me.frm.set_query("customer_address", erpnext.queries.address_query); me.frm.set_query("shipping_address_name", erpnext.queries.address_query); me.frm.set_query("dispatch_address_name", erpnext.queries.dispatch_address_query); + me.frm.set_query("company_address", erpnext.queries.company_address_query); erpnext.accounts.dimensions.setup_dimension_filters(me.frm, me.frm.doctype); diff --git a/erpnext/selling/doctype/quotation/quotation.js b/erpnext/selling/doctype/quotation/quotation.js index a4c70d7f50f..7311857e350 100644 --- a/erpnext/selling/doctype/quotation/quotation.js +++ b/erpnext/selling/doctype/quotation/quotation.js @@ -24,20 +24,6 @@ frappe.ui.form.on("Quotation", { frm.set_df_property("packed_items", "cannot_add_rows", true); frm.set_df_property("packed_items", "cannot_delete_rows", true); - frm.set_query("company_address", function (doc) { - if (!doc.company) { - frappe.throw(__("Please set Company")); - } - - return { - query: "frappe.contacts.doctype.address.address.address_query", - filters: { - link_doctype: "Company", - link_name: doc.company, - }, - }; - }); - frm.set_query("serial_and_batch_bundle", "packed_items", (doc, cdt, cdn) => { let row = locals[cdt][cdn]; return { diff --git a/erpnext/selling/doctype/sales_order/sales_order.js b/erpnext/selling/doctype/sales_order/sales_order.js index 2c8a6cccceb..f285d638322 100644 --- a/erpnext/selling/doctype/sales_order/sales_order.js +++ b/erpnext/selling/doctype/sales_order/sales_order.js @@ -26,20 +26,6 @@ frappe.ui.form.on("Sales Order", { return doc.stock_qty <= doc.delivered_qty ? "green" : "orange"; }); - frm.set_query("company_address", function (doc) { - if (!doc.company) { - frappe.throw(__("Please set Company")); - } - - return { - query: "frappe.contacts.doctype.address.address.address_query", - filters: { - link_doctype: "Company", - link_name: doc.company, - }, - }; - }); - frm.set_query("bom_no", "items", function (doc, cdt, cdn) { var row = locals[cdt][cdn]; return { From e0cb5f9ba8dc8a5b23af958b5c988b3499ed4853 Mon Sep 17 00:00:00 2001 From: Raffael Meyer <14891507+barredterra@users.noreply.github.com> Date: Tue, 26 Nov 2024 21:10:34 +0100 Subject: [PATCH 0545/1614] feat(Dunning): separate tab "Address & Contact" (#44363) (cherry picked from commit e094473c65b63942dae8a422107452fa7e72d1ed) # Conflicts: # erpnext/accounts/doctype/dunning/dunning.json --- erpnext/accounts/doctype/dunning/dunning.json | 51 ++++++++++++++----- 1 file changed, 37 insertions(+), 14 deletions(-) diff --git a/erpnext/accounts/doctype/dunning/dunning.json b/erpnext/accounts/doctype/dunning/dunning.json index b7e8aeaaafd..85ce6d555d3 100644 --- a/erpnext/accounts/doctype/dunning/dunning.json +++ b/erpnext/accounts/doctype/dunning/dunning.json @@ -19,16 +19,6 @@ "currency", "column_break_11", "conversion_rate", - "address_and_contact_section", - "customer_address", - "address_display", - "contact_person", - "contact_display", - "column_break_16", - "company_address", - "company_address_display", - "contact_mobile", - "contact_email", "section_break_6", "dunning_type", "column_break_8", @@ -56,7 +46,21 @@ "income_account", "column_break_48", "cost_center", - "amended_from" + "amended_from", + "address_and_contact_tab", + "address_and_contact_section", + "customer_address", + "address_display", + "column_break_vodj", + "contact_person", + "contact_display", + "contact_mobile", + "contact_email", + "section_break_xban", + "column_break_16", + "company_address", + "company_address_display", + "column_break_lqmf" ], "fields": [ { @@ -178,10 +182,8 @@ "label": "Rate of Interest (%) Yearly" }, { - "collapsible": 1, "fieldname": "address_and_contact_section", - "fieldtype": "Section Break", - "label": "Address and Contact" + "fieldtype": "Section Break" }, { "fieldname": "address_display", @@ -377,11 +379,32 @@ { "fieldname": "column_break_48", "fieldtype": "Column Break" + }, + { + "fieldname": "address_and_contact_tab", + "fieldtype": "Tab Break", + "label": "Address & Contact" + }, + { + "fieldname": "column_break_vodj", + "fieldtype": "Column Break" + }, + { + "fieldname": "section_break_xban", + "fieldtype": "Section Break" + }, + { + "fieldname": "column_break_lqmf", + "fieldtype": "Column Break" } ], "is_submittable": 1, "links": [], +<<<<<<< HEAD "modified": "2023-06-15 15:46:53.865712", +======= + "modified": "2024-11-26 13:46:07.760867", +>>>>>>> e094473c65 (feat(Dunning): separate tab "Address & Contact" (#44363)) "modified_by": "Administrator", "module": "Accounts", "name": "Dunning", From c20def5d59eb0213c492d85e356b88f94fc91672 Mon Sep 17 00:00:00 2001 From: Raffael Meyer <14891507+barredterra@users.noreply.github.com> Date: Tue, 26 Nov 2024 21:12:39 +0100 Subject: [PATCH 0546/1614] chore: resolve conflicts --- erpnext/accounts/doctype/dunning/dunning.json | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/erpnext/accounts/doctype/dunning/dunning.json b/erpnext/accounts/doctype/dunning/dunning.json index 85ce6d555d3..496097417ba 100644 --- a/erpnext/accounts/doctype/dunning/dunning.json +++ b/erpnext/accounts/doctype/dunning/dunning.json @@ -400,11 +400,7 @@ ], "is_submittable": 1, "links": [], -<<<<<<< HEAD - "modified": "2023-06-15 15:46:53.865712", -======= "modified": "2024-11-26 13:46:07.760867", ->>>>>>> e094473c65 (feat(Dunning): separate tab "Address & Contact" (#44363)) "modified_by": "Administrator", "module": "Accounts", "name": "Dunning", @@ -458,4 +454,4 @@ "states": [], "title_field": "customer_name", "track_changes": 1 -} \ No newline at end of file +} From 67809c781a9088b381c51c0c997737e47a8c14df Mon Sep 17 00:00:00 2001 From: venkat102 Date: Tue, 26 Nov 2024 14:58:57 +0530 Subject: [PATCH 0547/1614] fix: show cc on the email (cherry picked from commit 2dd5699f6d6b3ae465490e60f44f1bcd772265f2) --- .../process_statement_of_accounts.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.py b/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.py index bc3ba26beb7..bf1c8c0b66e 100644 --- a/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.py +++ b/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.py @@ -474,6 +474,7 @@ def send_emails(document_name, from_scheduler=False, posting_date=None): reference_doctype="Process Statement Of Accounts", reference_name=document_name, attachments=attachments, + expose_recipients="header", ) if doc.enable_auto_email and from_scheduler: From ef882de509b43c5e7ef1cfd2e08f942df18df17b Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 27 Nov 2024 10:31:30 +0530 Subject: [PATCH 0548/1614] feat: provision to disable item attribute (backport #44358) (#44370) * feat: provision to disable item attribute (#44358) (cherry picked from commit 123e3ef263cdf36101064fa999180425204b9963) # Conflicts: # erpnext/stock/doctype/item_attribute/item_attribute.json # erpnext/stock/doctype/item_variant_attribute/item_variant_attribute.json * chore: fix conflicts * chore: fix conflicts --------- Co-authored-by: rohitwaghchaure --- erpnext/stock/doctype/item/item.js | 105 +++++++++--------- .../item_attribute/item_attribute.json | 17 ++- .../doctype/item_attribute/item_attribute.py | 14 +++ .../item_variant_attribute.json | 12 +- .../item_variant_attribute.py | 1 + 5 files changed, 95 insertions(+), 54 deletions(-) diff --git a/erpnext/stock/doctype/item/item.js b/erpnext/stock/doctype/item/item.js index 81eeb914af0..4195506ad3b 100644 --- a/erpnext/stock/doctype/item/item.js +++ b/erpnext/stock/doctype/item/item.js @@ -663,39 +663,41 @@ $.extend(erpnext.item, { } frm.doc.attributes.forEach(function (d) { - let p = new Promise((resolve) => { - if (!d.numeric_values) { - frappe - .call({ - method: "frappe.client.get_list", - args: { - doctype: "Item Attribute Value", - filters: [["parent", "=", d.attribute]], - fields: ["attribute_value"], - limit_page_length: 0, - parent: "Item Attribute", - order_by: "idx", - }, - }) - .then((r) => { - if (r.message) { - attr_val_fields[d.attribute] = r.message.map(function (d) { - return d.attribute_value; - }); - resolve(); - } - }); - } else { - let values = []; - for (var i = d.from_range; i <= d.to_range; i = flt(i + d.increment, 6)) { - values.push(i); + if (!d.disabled) { + let p = new Promise((resolve) => { + if (!d.numeric_values) { + frappe + .call({ + method: "frappe.client.get_list", + args: { + doctype: "Item Attribute Value", + filters: [["parent", "=", d.attribute]], + fields: ["attribute_value"], + limit_page_length: 0, + parent: "Item Attribute", + order_by: "idx", + }, + }) + .then((r) => { + if (r.message) { + attr_val_fields[d.attribute] = r.message.map(function (d) { + return d.attribute_value; + }); + resolve(); + } + }); + } else { + let values = []; + for (var i = d.from_range; i <= d.to_range; i = flt(i + d.increment, 6)) { + values.push(i); + } + attr_val_fields[d.attribute] = values; + resolve(); } - attr_val_fields[d.attribute] = values; - resolve(); - } - }); + }); - promises.push(p); + promises.push(p); + } }, this); Promise.all(promises).then(() => { @@ -710,26 +712,29 @@ $.extend(erpnext.item, { for (var i = 0; i < frm.doc.attributes.length; i++) { var fieldtype, desc; var row = frm.doc.attributes[i]; - if (row.numeric_values) { - fieldtype = "Float"; - desc = - "Min Value: " + - row.from_range + - " , Max Value: " + - row.to_range + - ", in Increments of: " + - row.increment; - } else { - fieldtype = "Data"; - desc = ""; + + if (!row.disabled) { + if (row.numeric_values) { + fieldtype = "Float"; + desc = + "Min Value: " + + row.from_range + + " , Max Value: " + + row.to_range + + ", in Increments of: " + + row.increment; + } else { + fieldtype = "Data"; + desc = ""; + } + fields = fields.concat({ + label: row.attribute, + fieldname: row.attribute, + fieldtype: fieldtype, + reqd: 0, + description: desc, + }); } - fields = fields.concat({ - label: row.attribute, - fieldname: row.attribute, - fieldtype: fieldtype, - reqd: 0, - description: desc, - }); } if (frm.doc.image) { diff --git a/erpnext/stock/doctype/item_attribute/item_attribute.json b/erpnext/stock/doctype/item_attribute/item_attribute.json index 5c4678916f3..d9b0898ca7f 100644 --- a/erpnext/stock/doctype/item_attribute/item_attribute.json +++ b/erpnext/stock/doctype/item_attribute/item_attribute.json @@ -10,6 +10,8 @@ "field_order": [ "attribute_name", "numeric_values", + "column_break_vbik", + "disabled", "section_break_4", "from_range", "increment", @@ -70,15 +72,26 @@ "fieldtype": "Table", "label": "Item Attribute Values", "options": "Item Attribute Value" + }, + { + "fieldname": "column_break_vbik", + "fieldtype": "Column Break" + }, + { + "default": "0", + "fieldname": "disabled", + "fieldtype": "Check", + "label": "Disabled" } ], "icon": "fa fa-edit", "index_web_pages_for_search": 1, "links": [], - "modified": "2020-10-02 12:03:02.359202", + "modified": "2024-11-26 20:05:29.421714", "modified_by": "Administrator", "module": "Stock", "name": "Item Attribute", + "naming_rule": "By fieldname", "owner": "Administrator", "permissions": [ { @@ -94,4 +107,4 @@ "sort_field": "modified", "sort_order": "DESC", "track_changes": 1 -} \ No newline at end of file +} diff --git a/erpnext/stock/doctype/item_attribute/item_attribute.py b/erpnext/stock/doctype/item_attribute/item_attribute.py index 04421d6292e..3b9bcf93288 100644 --- a/erpnext/stock/doctype/item_attribute/item_attribute.py +++ b/erpnext/stock/doctype/item_attribute/item_attribute.py @@ -30,6 +30,7 @@ class ItemAttribute(Document): from erpnext.stock.doctype.item_attribute_value.item_attribute_value import ItemAttributeValue attribute_name: DF.Data + disabled: DF.Check from_range: DF.Float increment: DF.Float item_attribute_values: DF.Table[ItemAttributeValue] @@ -47,6 +48,19 @@ class ItemAttribute(Document): def on_update(self): self.validate_exising_items() + self.set_enabled_disabled_in_items() + + def set_enabled_disabled_in_items(self): + db_value = self.get_doc_before_save() + if not db_value or db_value.disabled != self.disabled: + item_variant_table = frappe.qb.DocType("Item Variant Attribute") + query = ( + frappe.qb.update(item_variant_table) + .set(item_variant_table.disabled, self.disabled) + .where(item_variant_table.attribute == self.name) + ) + + query.run() def validate_exising_items(self): """Validate that if there are existing items with attributes, they are valid""" diff --git a/erpnext/stock/doctype/item_variant_attribute/item_variant_attribute.json b/erpnext/stock/doctype/item_variant_attribute/item_variant_attribute.json index 9699ecbb3db..cfc752c1f61 100644 --- a/erpnext/stock/doctype/item_variant_attribute/item_variant_attribute.json +++ b/erpnext/stock/doctype/item_variant_attribute/item_variant_attribute.json @@ -11,6 +11,7 @@ "column_break_2", "attribute_value", "numeric_values", + "disabled", "section_break_4", "from_range", "increment", @@ -74,11 +75,18 @@ "fieldname": "to_range", "fieldtype": "Float", "label": "To Range" + }, + { + "default": "0", + "fetch_from": "attribute.disabled", + "fieldname": "disabled", + "fieldtype": "Check", + "label": "Disabled" } ], "istable": 1, "links": [], - "modified": "2023-07-14 17:15:19.112119", + "modified": "2024-11-26 20:10:49.873339", "modified_by": "Administrator", "module": "Stock", "name": "Item Variant Attribute", @@ -87,4 +95,4 @@ "sort_field": "modified", "sort_order": "DESC", "states": [] -} \ No newline at end of file +} diff --git a/erpnext/stock/doctype/item_variant_attribute/item_variant_attribute.py b/erpnext/stock/doctype/item_variant_attribute/item_variant_attribute.py index 756b7421761..ea239d2ccc9 100644 --- a/erpnext/stock/doctype/item_variant_attribute/item_variant_attribute.py +++ b/erpnext/stock/doctype/item_variant_attribute/item_variant_attribute.py @@ -16,6 +16,7 @@ class ItemVariantAttribute(Document): attribute: DF.Link attribute_value: DF.Data | None + disabled: DF.Check from_range: DF.Float increment: DF.Float numeric_values: DF.Check From a523c14fd574f3e22d90aef3b73d98f7953625d4 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Wed, 27 Nov 2024 13:44:33 +0530 Subject: [PATCH 0549/1614] fix: correct placeholder index in message (cherry picked from commit d61cb9a4bfa3913b208d2d30f40c9b34639344fb) --- erpnext/accounts/doctype/payment_entry/payment_entry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index b9fad5c9010..3a80b5beb7a 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -1746,7 +1746,7 @@ class PaymentEntry(AccountsController): if paid_amount > total_negative_outstanding: if total_negative_outstanding == 0: frappe.msgprint( - _("Cannot {0} from {2} without any negative outstanding invoice").format( + _("Cannot {0} from {1} without any negative outstanding invoice").format( self.payment_type, self.party_type, ) From 860350a5b329a49d078f70f22c38a0a1a4ca2032 Mon Sep 17 00:00:00 2001 From: vishakhdesai Date: Wed, 27 Nov 2024 12:43:34 +0530 Subject: [PATCH 0550/1614] fix: remove field precision in SO and PO for percentage fields (cherry picked from commit eff9cd10cd6dcf47ad05311c5730da267482b870) # Conflicts: # erpnext/selling/doctype/sales_order/sales_order_list.js --- .../doctype/purchase_order/purchase_order.js | 22 ++++----- .../doctype/sales_order/sales_order.js | 45 ++++++------------- .../doctype/sales_order/sales_order_list.js | 14 ++++-- 3 files changed, 31 insertions(+), 50 deletions(-) diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.js b/erpnext/buying/doctype/purchase_order/purchase_order.js index 9718ab19b19..e71f2418794 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.js +++ b/erpnext/buying/doctype/purchase_order/purchase_order.js @@ -93,10 +93,7 @@ frappe.ui.form.on("Purchase Order", { get_materials_from_supplier: function (frm) { let po_details = []; - if ( - frm.doc.supplied_items && - (flt(frm.doc.per_received, precision("per_received")) == 100 || frm.doc.status === "Closed") - ) { + if (frm.doc.supplied_items && (flt(frm.doc.per_received) == 100 || frm.doc.status === "Closed")) { frm.doc.supplied_items.forEach((d) => { if (d.total_supplied_qty && d.total_supplied_qty != d.consumed_qty) { po_details.push(d.name); @@ -332,8 +329,8 @@ erpnext.buying.PurchaseOrderController = class PurchaseOrderController extends ( if (!["Closed", "Delivered"].includes(doc.status)) { if ( this.frm.doc.status !== "Closed" && - flt(this.frm.doc.per_received, precision("per_received")) < 100 && - flt(this.frm.doc.per_billed, precision("per_billed")) < 100 + flt(this.frm.doc.per_received) < 100 && + flt(this.frm.doc.per_billed) < 100 ) { if (!this.frm.doc.__onload || this.frm.doc.__onload.can_update_items) { this.frm.add_custom_button(__("Update Items"), () => { @@ -347,10 +344,7 @@ erpnext.buying.PurchaseOrderController = class PurchaseOrderController extends ( } } if (this.frm.has_perm("submit")) { - if ( - flt(doc.per_billed, precision("per_billed")) < 100 || - flt(doc.per_received, precision("per_received")) < 100 - ) { + if (flt(doc.per_billed) < 100 || flt(doc.per_received) < 100) { if (doc.status != "On Hold") { this.frm.add_custom_button( __("Hold"), @@ -388,7 +382,7 @@ erpnext.buying.PurchaseOrderController = class PurchaseOrderController extends ( } if (doc.status != "Closed") { if (doc.status != "On Hold") { - if (flt(doc.per_received, precision("per_received")) < 100 && allow_receipt) { + if (flt(doc.per_received) < 100 && allow_receipt) { this.frm.add_custom_button( __("Purchase Receipt"), this.make_purchase_receipt, @@ -415,14 +409,14 @@ erpnext.buying.PurchaseOrderController = class PurchaseOrderController extends ( } } // Please do not add precision in the below flt function - if (flt(doc.per_billed, precision("per_billed")) < 100) + if (flt(doc.per_billed) < 100) this.frm.add_custom_button( __("Purchase Invoice"), this.make_purchase_invoice, __("Create") ); - if (flt(doc.per_billed, precision("per_billed")) < 100 && doc.status != "Delivered") { + if (flt(doc.per_billed) < 100 && doc.status != "Delivered") { this.frm.add_custom_button( __("Payment"), () => this.make_payment_entry(), @@ -430,7 +424,7 @@ erpnext.buying.PurchaseOrderController = class PurchaseOrderController extends ( ); } - if (flt(doc.per_billed, precision("per_billed")) < 100) { + if (flt(doc.per_billed) < 100) { this.frm.add_custom_button( __("Payment Request"), function () { diff --git a/erpnext/selling/doctype/sales_order/sales_order.js b/erpnext/selling/doctype/sales_order/sales_order.js index f285d638322..45f6b364761 100644 --- a/erpnext/selling/doctype/sales_order/sales_order.js +++ b/erpnext/selling/doctype/sales_order/sales_order.js @@ -43,8 +43,8 @@ frappe.ui.form.on("Sales Order", { if (frm.doc.docstatus === 1) { if ( frm.doc.status !== "Closed" && - flt(frm.doc.per_delivered, precision("per_delivered")) < 100 && - flt(frm.doc.per_billed, precision("per_billed")) < 100 && + flt(frm.doc.per_delivered) < 100 && + flt(frm.doc.per_billed) < 100 && frm.has_perm("write") ) { frm.add_custom_button(__("Update Items"), () => { @@ -61,7 +61,7 @@ frappe.ui.form.on("Sales Order", { if ( frm.doc.__onload && frm.doc.__onload.has_unreserved_stock && - flt(frm.doc.per_picked, precision("per_picked")) === 0 + flt(frm.doc.per_picked) === 0 ) { frm.add_custom_button( __("Reserve"), @@ -590,10 +590,7 @@ erpnext.selling.SalesOrderController = class SalesOrderController extends erpnex __("Status") ); - if ( - flt(doc.per_delivered, precision("per_delivered")) < 100 || - flt(doc.per_billed, precision("per_billed")) < 100 - ) { + if (flt(doc.per_delivered) < 100 || flt(doc.per_billed) < 100) { // close this.frm.add_custom_button(__("Close"), () => this.close_sales_order(), __("Status")); } @@ -616,10 +613,7 @@ erpnext.selling.SalesOrderController = class SalesOrderController extends erpnex ) && !this.frm.doc.skip_delivery_note; if (this.frm.has_perm("submit")) { - if ( - flt(doc.per_delivered, precision("per_delivered")) < 100 || - flt(doc.per_billed, precision("per_billed")) < 100 - ) { + if (flt(doc.per_delivered) < 100 || flt(doc.per_billed) < 100) { // hold this.frm.add_custom_button( __("Hold"), @@ -637,8 +631,8 @@ erpnext.selling.SalesOrderController = class SalesOrderController extends erpnex if ( (!doc.__onload || !doc.__onload.has_reserved_stock) && - flt(doc.per_picked, precision("per_picked")) < 100 && - flt(doc.per_delivered, precision("per_delivered")) < 100 && + flt(doc.per_picked) < 100 && + flt(doc.per_delivered) < 100 && frappe.model.can_create("Pick List") ) { this.frm.add_custom_button( @@ -656,7 +650,7 @@ erpnext.selling.SalesOrderController = class SalesOrderController extends erpnex // delivery note if ( - flt(doc.per_delivered, precision("per_delivered")) < 100 && + flt(doc.per_delivered) < 100 && (order_is_a_sale || order_is_a_custom_sale) && allow_delivery ) { @@ -678,10 +672,7 @@ erpnext.selling.SalesOrderController = class SalesOrderController extends erpnex } // sales invoice - if ( - flt(doc.per_billed, precision("per_billed")) < 100 && - frappe.model.can_create("Sales Invoice") - ) { + if (flt(doc.per_billed) < 100 && frappe.model.can_create("Sales Invoice")) { this.frm.add_custom_button( __("Sales Invoice"), () => me.make_sales_invoice(), @@ -692,8 +683,7 @@ erpnext.selling.SalesOrderController = class SalesOrderController extends erpnex // material request if ( (!doc.order_type || - ((order_is_a_sale || order_is_a_custom_sale) && - flt(doc.per_delivered, precision("per_delivered")) < 100)) && + ((order_is_a_sale || order_is_a_custom_sale) && flt(doc.per_delivered) < 100)) && frappe.model.can_create("Material Request") ) { this.frm.add_custom_button( @@ -718,10 +708,7 @@ erpnext.selling.SalesOrderController = class SalesOrderController extends erpnex } // maintenance - if ( - flt(doc.per_delivered, precision("per_delivered")) < 100 && - (order_is_maintenance || order_is_a_custom_sale) - ) { + if (flt(doc.per_delivered) < 100 && (order_is_maintenance || order_is_a_custom_sale)) { if (frappe.model.can_create("Maintenance Visit")) { this.frm.add_custom_button( __("Maintenance Visit"), @@ -739,10 +726,7 @@ erpnext.selling.SalesOrderController = class SalesOrderController extends erpnex } // project - if ( - flt(doc.per_delivered, precision("per_delivered")) < 100 && - frappe.model.can_create("Project") - ) { + if (flt(doc.per_delivered) < 100 && frappe.model.can_create("Project")) { this.frm.add_custom_button(__("Project"), () => this.make_project(), __("Create")); } @@ -770,10 +754,7 @@ erpnext.selling.SalesOrderController = class SalesOrderController extends erpnex } } // payment request - if ( - flt(doc.per_billed, precision("per_billed", doc)) < - 100 + frappe.boot.sysdefaults.over_billing_allowance - ) { + if (flt(doc.per_billed) < 100 + frappe.boot.sysdefaults.over_billing_allowance) { this.frm.add_custom_button( __("Payment Request"), () => this.make_payment_request(), diff --git a/erpnext/selling/doctype/sales_order/sales_order_list.js b/erpnext/selling/doctype/sales_order/sales_order_list.js index 5ccd5d551cb..73ef164f5c1 100644 --- a/erpnext/selling/doctype/sales_order/sales_order_list.js +++ b/erpnext/selling/doctype/sales_order/sales_order_list.js @@ -20,14 +20,20 @@ frappe.listview_settings["Sales Order"] = { return [__("On Hold"), "orange", "status,=,On Hold"]; } else if (doc.status === "Completed") { return [__("Completed"), "green", "status,=,Completed"]; +<<<<<<< HEAD } else if (!doc.skip_delivery_note && flt(doc.per_delivered, 2) < 100) { +======= + } else if (doc.advance_payment_status === "Requested") { + return [__("To Pay"), "gray", "advance_payment_status,=,Requested"]; + } else if (!doc.skip_delivery_note && flt(doc.per_delivered) < 100) { +>>>>>>> eff9cd10cd (fix: remove field precision in SO and PO for percentage fields) if (frappe.datetime.get_diff(doc.delivery_date) < 0) { // not delivered & overdue return [__("Overdue"), "red", "per_delivered,<,100|delivery_date,<,Today|status,!=,Closed"]; } else if (flt(doc.grand_total) === 0) { // not delivered (zeroount order) return [__("To Deliver"), "orange", "per_delivered,<,100|grand_total,=,0|status,!=,Closed"]; - } else if (flt(doc.per_billed, 2) < 100) { + } else if (flt(doc.per_billed) < 100) { // not delivered & not billed return [ __("To Deliver and Bill"), @@ -39,13 +45,13 @@ frappe.listview_settings["Sales Order"] = { return [__("To Deliver"), "orange", "per_delivered,<,100|per_billed,=,100|status,!=,Closed"]; } } else if ( - flt(doc.per_delivered, 2) === 100 && + flt(doc.per_delivered) === 100 && flt(doc.grand_total) !== 0 && - flt(doc.per_billed, 2) < 100 + flt(doc.per_billed) < 100 ) { // to bill return [__("To Bill"), "orange", "per_delivered,=,100|per_billed,<,100|status,!=,Closed"]; - } else if (doc.skip_delivery_note && flt(doc.per_billed, 2) < 100) { + } else if (doc.skip_delivery_note && flt(doc.per_billed) < 100) { return [__("To Bill"), "orange", "per_billed,<,100|status,!=,Closed"]; } }, From ca56709295002f86c0b936a75ed250415784ea06 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Mon, 25 Nov 2024 17:31:07 +0530 Subject: [PATCH 0551/1614] fix: update gross profit for returned invoices (cherry picked from commit 8a42601e99a298782f43f252c64b1d692875d202) --- .../report/gross_profit/gross_profit.py | 65 +++++++++---------- 1 file changed, 32 insertions(+), 33 deletions(-) diff --git a/erpnext/accounts/report/gross_profit/gross_profit.py b/erpnext/accounts/report/gross_profit/gross_profit.py index a9039a9cada..12a4ca76aab 100644 --- a/erpnext/accounts/report/gross_profit/gross_profit.py +++ b/erpnext/accounts/report/gross_profit/gross_profit.py @@ -440,6 +440,7 @@ class GrossProfitGenerator: if grouped_by_invoice: buying_amount = 0 + base_amount = 0 for row in reversed(self.si_list): if self.filters.get("group_by") == "Monthly": @@ -480,12 +481,11 @@ class GrossProfitGenerator: else: row.buying_amount = flt(self.get_buying_amount(row, row.item_code), self.currency_precision) - if grouped_by_invoice: - if row.indent == 1.0: - buying_amount += row.buying_amount - elif row.indent == 0.0: - row.buying_amount = buying_amount - buying_amount = 0 + if grouped_by_invoice and row.indent == 0.0: + row.buying_amount = buying_amount + row.base_amount = base_amount + buying_amount = 0 + base_amount = 0 # get buying rate if flt(row.qty): @@ -495,11 +495,19 @@ class GrossProfitGenerator: if self.is_not_invoice_row(row): row.buying_rate, row.base_rate = 0.0, 0.0 + if self.is_not_invoice_row(row): + self.update_return_invoices(row) + + if grouped_by_invoice and row.indent == 1.0: + buying_amount += row.buying_amount + base_amount += row.base_amount + # calculate gross profit row.gross_profit = flt(row.base_amount - row.buying_amount, self.currency_precision) if row.base_amount: row.gross_profit_percent = flt( - (row.gross_profit / row.base_amount) * 100.0, self.currency_precision + (row.gross_profit / row.base_amount) * 100.0, + self.currency_precision, ) else: row.gross_profit_percent = 0.0 @@ -510,33 +518,24 @@ class GrossProfitGenerator: if self.grouped: self.get_average_rate_based_on_group_by() + def update_return_invoices(self, row): + if row.parent in self.returned_invoices and row.item_code in self.returned_invoices[row.parent]: + returned_item_rows = self.returned_invoices[row.parent][row.item_code] + for returned_item_row in returned_item_rows: + # returned_items 'qty' should be stateful + if returned_item_row.qty != 0: + if row.qty >= abs(returned_item_row.qty): + row.qty += returned_item_row.qty + returned_item_row.qty = 0 + else: + row.qty = 0 + returned_item_row.qty += row.qty + row.base_amount += flt(returned_item_row.base_amount, self.currency_precision) + row.buying_amount = flt(flt(row.qty) * flt(row.buying_rate), self.currency_precision) + def get_average_rate_based_on_group_by(self): for key in list(self.grouped): - if self.filters.get("group_by") == "Invoice": - for row in self.grouped[key]: - if row.indent == 1.0: - if ( - row.parent in self.returned_invoices - and row.item_code in self.returned_invoices[row.parent] - ): - returned_item_rows = self.returned_invoices[row.parent][row.item_code] - for returned_item_row in returned_item_rows: - # returned_items 'qty' should be stateful - if returned_item_row.qty != 0: - if row.qty >= abs(returned_item_row.qty): - row.qty += returned_item_row.qty - returned_item_row.qty = 0 - else: - row.qty = 0 - returned_item_row.qty += row.qty - row.base_amount += flt(returned_item_row.base_amount, self.currency_precision) - row.buying_amount = flt( - flt(row.qty) * flt(row.buying_rate), self.currency_precision - ) - if flt(row.qty) or row.base_amount: - row = self.set_average_rate(row) - self.grouped_data.append(row) - elif self.filters.get("group_by") == "Payment Term": + if self.filters.get("group_by") == "Payment Term": for i, row in enumerate(self.grouped[key]): invoice_portion = 0 @@ -556,7 +555,7 @@ class GrossProfitGenerator: new_row = self.set_average_rate(new_row) self.grouped_data.append(new_row) - else: + elif self.filters.get("group_by") != "Invoice": for i, row in enumerate(self.grouped[key]): if i == 0: new_row = row From f4518cac9a3ae9b4a018b24f3ea29ec525e2236a Mon Sep 17 00:00:00 2001 From: ljain112 Date: Mon, 25 Nov 2024 18:45:17 +0530 Subject: [PATCH 0552/1614] fix: gp for return invoice (cherry picked from commit 00403515a8ba005e5ac5c0e7a5ff88a5bda5b170) --- erpnext/accounts/report/gross_profit/gross_profit.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/report/gross_profit/gross_profit.py b/erpnext/accounts/report/gross_profit/gross_profit.py index 12a4ca76aab..5ba1e41b624 100644 --- a/erpnext/accounts/report/gross_profit/gross_profit.py +++ b/erpnext/accounts/report/gross_profit/gross_profit.py @@ -526,11 +526,16 @@ class GrossProfitGenerator: if returned_item_row.qty != 0: if row.qty >= abs(returned_item_row.qty): row.qty += returned_item_row.qty + row.base_amount += flt(returned_item_row.base_amount, self.currency_precision) returned_item_row.qty = 0 + returned_item_row.base_amount = 0 + else: row.qty = 0 + row.base_amount = 0 returned_item_row.qty += row.qty - row.base_amount += flt(returned_item_row.base_amount, self.currency_precision) + returned_item_row.base_amount += row.base_amount + row.buying_amount = flt(flt(row.qty) * flt(row.buying_rate), self.currency_precision) def get_average_rate_based_on_group_by(self): From 66af7f4a14e58029f80aa87b62a056c04be60969 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Mon, 25 Nov 2024 19:05:08 +0530 Subject: [PATCH 0553/1614] fix: test case (cherry picked from commit af5a3e5a48c7da329a078c3d0e177593061d123b) --- erpnext/accounts/report/gross_profit/test_gross_profit.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/report/gross_profit/test_gross_profit.py b/erpnext/accounts/report/gross_profit/test_gross_profit.py index 83de93891fe..721be79ed88 100644 --- a/erpnext/accounts/report/gross_profit/test_gross_profit.py +++ b/erpnext/accounts/report/gross_profit/test_gross_profit.py @@ -418,12 +418,12 @@ class TestGrossProfit(FrappeTestCase): "item_name": self.item, "warehouse": "Stores - _GP", "qty": 0.0, - "avg._selling_rate": 0.0, + "avg._selling_rate": 100, "valuation_rate": 0.0, - "selling_amount": -100.0, + "selling_amount": 0.0, "buying_amount": 0.0, - "gross_profit": -100.0, - "gross_profit_%": 100.0, + "gross_profit": 0.0, + "gross_profit_%": 0.0, } gp_entry = [x for x in data if x.parent_invoice == sinv.name] # Both items of Invoice should have '0' qty From d6ef43858cee5b3a05a306588c258eb1d41b7031 Mon Sep 17 00:00:00 2001 From: venkat102 Date: Tue, 26 Nov 2024 22:13:57 +0530 Subject: [PATCH 0554/1614] fix: check difference with company currency (cherry picked from commit e2bae4cf07918adf815384b3db81717df95d9413) --- .../doctype/period_closing_voucher/period_closing_voucher.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py index 1d4ee25241e..7e0145e91a4 100644 --- a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py +++ b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py @@ -171,9 +171,7 @@ class PeriodClosingVoucher(AccountsController): pl_account_balances = self.get_account_balances_based_on_dimensions(report_type="Profit and Loss") for dimensions, account_balances in pl_account_balances.items(): for acc, balances in account_balances.items(): - balance_in_company_currency = flt(balances.debit_in_account_currency) - flt( - balances.credit_in_account_currency - ) + balance_in_company_currency = flt(balances.debit) - flt(balances.credit) if balance_in_company_currency and acc != "balances": self.pl_accounts_reverse_gle.append( self.get_gle_for_pl_account(acc, balances, dimensions) From 45e41827c76526412ec29e5d5678d90360f65631 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Wed, 27 Nov 2024 17:20:36 +0530 Subject: [PATCH 0555/1614] chore: resolve conflict --- erpnext/selling/doctype/sales_order/sales_order_list.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/erpnext/selling/doctype/sales_order/sales_order_list.js b/erpnext/selling/doctype/sales_order/sales_order_list.js index 73ef164f5c1..46d115a1713 100644 --- a/erpnext/selling/doctype/sales_order/sales_order_list.js +++ b/erpnext/selling/doctype/sales_order/sales_order_list.js @@ -20,13 +20,7 @@ frappe.listview_settings["Sales Order"] = { return [__("On Hold"), "orange", "status,=,On Hold"]; } else if (doc.status === "Completed") { return [__("Completed"), "green", "status,=,Completed"]; -<<<<<<< HEAD - } else if (!doc.skip_delivery_note && flt(doc.per_delivered, 2) < 100) { -======= - } else if (doc.advance_payment_status === "Requested") { - return [__("To Pay"), "gray", "advance_payment_status,=,Requested"]; } else if (!doc.skip_delivery_note && flt(doc.per_delivered) < 100) { ->>>>>>> eff9cd10cd (fix: remove field precision in SO and PO for percentage fields) if (frappe.datetime.get_diff(doc.delivery_date) < 0) { // not delivered & overdue return [__("Overdue"), "red", "per_delivered,<,100|delivery_date,<,Today|status,!=,Closed"]; From d073b005a8579e48266d1265ccf542f625ac595b Mon Sep 17 00:00:00 2001 From: venkat102 Date: Wed, 27 Nov 2024 14:02:11 +0530 Subject: [PATCH 0556/1614] fix: filter item with search fields (cherry picked from commit ebfbee3da50961019691d650d7d152502d541094) --- .../doctype/product_bundle/product_bundle.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/erpnext/selling/doctype/product_bundle/product_bundle.py b/erpnext/selling/doctype/product_bundle/product_bundle.py index 464cff01d7e..609f45a608f 100644 --- a/erpnext/selling/doctype/product_bundle/product_bundle.py +++ b/erpnext/selling/doctype/product_bundle/product_bundle.py @@ -5,6 +5,7 @@ import frappe from frappe import _ from frappe.model.document import Document +from frappe.query_builder import Criterion from frappe.utils import get_link_to_form @@ -93,15 +94,24 @@ class ProductBundle(Document): def get_new_item_code(doctype, txt, searchfield, start, page_len, filters): product_bundles = frappe.db.get_list("Product Bundle", {"disabled": 0}, pluck="name") + if not searchfield or searchfield == "name": + searchfield = frappe.get_meta("Item").get("search_fields") + + searchfield = searchfield.split(",") + searchfield.append("name") + item = frappe.qb.DocType("Item") query = ( frappe.qb.from_(item) - .select(item.item_code, item.item_name) - .where((item.is_stock_item == 0) & (item.is_fixed_asset == 0) & (item[searchfield].like(f"%{txt}%"))) + .select(item.name, item.item_name) + .where((item.is_stock_item == 0) & (item.is_fixed_asset == 0)) .limit(page_len) .offset(start) ) + if searchfield: + query = query.where(Criterion.any([item[fieldname].like(f"%{txt}%") for fieldname in searchfield])) + if product_bundles: query = query.where(item.name.notin(product_bundles)) From a2612d5f36eaeee10231b27b5c4bfea2c79208da Mon Sep 17 00:00:00 2001 From: venkat102 Date: Tue, 26 Nov 2024 00:03:42 +0530 Subject: [PATCH 0557/1614] fix: set debit transaction currency in gl entry (cherry picked from commit 6e19c06e58dd2ffa9cb4bee014a7c0671ff8bf80) --- .../doctype/payment_entry/payment_entry.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index 3a80b5beb7a..89f52b46679 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -1219,11 +1219,19 @@ class PaymentEntry(AccountsController): dr_or_cr = "debit" if dr_or_cr == "credit" else "credit" gle.update( - { - dr_or_cr: allocated_amount_in_company_currency, - dr_or_cr + "_in_account_currency": d.allocated_amount, - "cost_center": cost_center, - } + self.get_gl_dict( + { + "account": self.party_account, + "party_type": self.party_type, + "party": self.party, + "against": against_account, + "account_currency": self.party_account_currency, + "cost_center": cost_center, + dr_or_cr + "_in_account_currency": d.allocated_amount, + dr_or_cr: allocated_amount_in_company_currency, + }, + item=self, + ) ) if self.book_advance_payments_in_separate_party_account: From 0e1f5ff391b7a6f277149e5a14203f4cde7fac6c Mon Sep 17 00:00:00 2001 From: Abdeali Chharchhoda Date: Wed, 27 Nov 2024 16:53:50 +0530 Subject: [PATCH 0558/1614] fix: Add translation for showing mandatory fields in error msg (cherry picked from commit f42ec6a124d272dec0ac9671b7eef13f55d81de2) --- erpnext/selling/doctype/quotation/quotation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/selling/doctype/quotation/quotation.py b/erpnext/selling/doctype/quotation/quotation.py index 8e560b8d0ab..2bc6ef8399e 100644 --- a/erpnext/selling/doctype/quotation/quotation.py +++ b/erpnext/selling/doctype/quotation/quotation.py @@ -568,7 +568,7 @@ def handle_mandatory_error(e, customer, lead_name): from frappe.utils import get_link_to_form mandatory_fields = e.args[0].split(":")[1].split(",") - mandatory_fields = [customer.meta.get_label(field.strip()) for field in mandatory_fields] + mandatory_fields = [_(customer.meta.get_label(field.strip())) for field in mandatory_fields] frappe.local.message_log = [] message = _("Could not auto create Customer due to the following missing mandatory field(s):") + "
" From fd1cbf4b6f83dbcc8c955490120351197ffc5d7f Mon Sep 17 00:00:00 2001 From: vimalraj27 Date: Wed, 27 Nov 2024 18:03:39 +0530 Subject: [PATCH 0559/1614] chore: Fix typo "Purchase Reecipt" (cherry picked from commit 21049bae91846548d0640d9d63c2f2e20d35e4ea) --- erpnext/controllers/sales_and_purchase_return.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/controllers/sales_and_purchase_return.py b/erpnext/controllers/sales_and_purchase_return.py index 32234e5c551..7f9a5a35a73 100644 --- a/erpnext/controllers/sales_and_purchase_return.py +++ b/erpnext/controllers/sales_and_purchase_return.py @@ -1036,7 +1036,7 @@ def filter_serial_batches(parent_doc, data, row, warehouse_field=None, qty_field available_serial_nos.append(serial_no) if available_serial_nos: - if parent_doc.doctype in ["Purchase Invoice", "Purchase Reecipt"]: + if parent_doc.doctype in ["Purchase Invoice", "Purchase Receipt"]: available_serial_nos = get_available_serial_nos(available_serial_nos, warehouse) if len(available_serial_nos) > qty: @@ -1052,7 +1052,7 @@ def filter_serial_batches(parent_doc, data, row, warehouse_field=None, qty_field if batch_qty <= 0: continue - if parent_doc.doctype in ["Purchase Invoice", "Purchase Reecipt"]: + if parent_doc.doctype in ["Purchase Invoice", "Purchase Receipt"]: batch_qty = get_available_batch_qty( parent_doc, batch_no, From 3f577779be3c8a2140ffb24947252c15b848a008 Mon Sep 17 00:00:00 2001 From: Ninad1306 Date: Mon, 25 Nov 2024 10:44:25 +0530 Subject: [PATCH 0560/1614] fix: initially closing amt should be equal to expected amt (cherry picked from commit af9524920bc1de7587b8f73363edeab2a486e5a8) --- .../doctype/pos_closing_entry/pos_closing_entry.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.js b/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.js index 5711b27da04..7504c79141b 100644 --- a/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.js +++ b/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.js @@ -147,7 +147,7 @@ frappe.ui.form.on("POS Closing Entry", { frm.doc.grand_total += flt(doc.grand_total); frm.doc.net_total += flt(doc.net_total); frm.doc.total_quantity += flt(doc.total_qty); - refresh_payments(doc, frm); + refresh_payments(doc, frm, false); refresh_taxes(doc, frm); refresh_fields(frm); set_html_data(frm); @@ -172,7 +172,7 @@ function set_form_data(data, frm) { frm.doc.grand_total += flt(d.grand_total); frm.doc.net_total += flt(d.net_total); frm.doc.total_quantity += flt(d.total_qty); - refresh_payments(d, frm); + refresh_payments(d, frm, true); refresh_taxes(d, frm); }); } @@ -186,7 +186,7 @@ function add_to_pos_transaction(d, frm) { }); } -function refresh_payments(d, frm) { +function refresh_payments(d, frm, is_new) { d.payments.forEach((p) => { const payment = frm.doc.payment_reconciliation.find( (pay) => pay.mode_of_payment === p.mode_of_payment @@ -196,9 +196,7 @@ function refresh_payments(d, frm) { } if (payment) { payment.expected_amount += flt(p.amount); - if (payment.closing_amount === 0) { - payment.closing_amount = payment.expected_amount; - } + if (is_new) payment.closing_amount = payment.expected_amount; payment.difference = payment.closing_amount - payment.expected_amount; } else { frm.add_child("payment_reconciliation", { From 8d8027d4233f9181a34ee00b33ff15da2cae2da4 Mon Sep 17 00:00:00 2001 From: Sugesh393 Date: Tue, 26 Nov 2024 13:58:52 +0530 Subject: [PATCH 0561/1614] fix: set outstanding amount while creating payment request for invoices (cherry picked from commit 38e7d0a41e2a55ef98f2c6147c34b64708929854) --- erpnext/accounts/doctype/payment_request/payment_request.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/doctype/payment_request/payment_request.py b/erpnext/accounts/doctype/payment_request/payment_request.py index ae974a8cf0e..aaae8204a9b 100644 --- a/erpnext/accounts/doctype/payment_request/payment_request.py +++ b/erpnext/accounts/doctype/payment_request/payment_request.py @@ -667,11 +667,9 @@ def get_amount(ref_doc, payment_account=None): elif dt in ["Sales Invoice", "Purchase Invoice"]: if not ref_doc.get("is_pos"): if ref_doc.party_account_currency == ref_doc.currency: - grand_total = flt(ref_doc.rounded_total or ref_doc.grand_total) + grand_total = flt(ref_doc.outstanding_amount) else: - grand_total = flt( - flt(ref_doc.base_rounded_total or ref_doc.base_grand_total) / ref_doc.conversion_rate - ) + grand_total = flt(flt(ref_doc.outstanding_amount) / ref_doc.conversion_rate) elif dt == "Sales Invoice": for pay in ref_doc.payments: if pay.type == "Phone" and pay.account == payment_account: From 81b9832917ebf5487f5471b007d47278252cde02 Mon Sep 17 00:00:00 2001 From: Sugesh393 Date: Tue, 26 Nov 2024 13:59:45 +0530 Subject: [PATCH 0562/1614] test: add unit test to validate outstanding amount in payment request (cherry picked from commit bbe3bc95d08950bebc9ede64c11c9660a564a8a6) # Conflicts: # erpnext/accounts/doctype/payment_request/test_payment_request.py --- .../payment_request/test_payment_request.py | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/erpnext/accounts/doctype/payment_request/test_payment_request.py b/erpnext/accounts/doctype/payment_request/test_payment_request.py index b0c3dbf4d5b..cd5a1a26575 100644 --- a/erpnext/accounts/doctype/payment_request/test_payment_request.py +++ b/erpnext/accounts/doctype/payment_request/test_payment_request.py @@ -7,6 +7,7 @@ import unittest import frappe from frappe.tests.utils import FrappeTestCase, change_settings +from erpnext.accounts.doctype.payment_entry.payment_entry import get_payment_entry from erpnext.accounts.doctype.payment_entry.test_payment_entry import create_payment_terms_template from erpnext.accounts.doctype.payment_request.payment_request import make_payment_request from erpnext.accounts.doctype.purchase_invoice.test_purchase_invoice import make_purchase_invoice @@ -524,3 +525,25 @@ class TestPaymentRequest(FrappeTestCase): self.assertEqual(pr.grand_total, 1000) so.load_from_db() +<<<<<<< HEAD +======= + self.assertEqual(so.advance_payment_status, "Requested") + + def test_partial_paid_invoice_with_payment_request(self): + si = create_sales_invoice(currency="INR", qty=1, rate=5000) + si.save() + si.submit() + + pe = get_payment_entry("Sales Invoice", si.name, bank_account="_Test Bank - _TC") + pe.reference_no = "PAYEE0002" + pe.reference_date = frappe.utils.nowdate() + pe.paid_amount = 2500 + pe.references[0].allocated_amount = 2500 + pe.save() + pe.submit() + + si.load_from_db() + pr = make_payment_request(dt="Sales Invoice", dn=si.name, mute_email=1) + + self.assertEqual(pr.grand_total, si.outstanding_amount) +>>>>>>> bbe3bc95d0 (test: add unit test to validate outstanding amount in payment request) From d0d97c26a05ab961f88ece2609698ff37f3a5273 Mon Sep 17 00:00:00 2001 From: Sugesh393 Date: Wed, 27 Nov 2024 17:41:16 +0530 Subject: [PATCH 0563/1614] fix: reduce paid amount from grand total (cherry picked from commit 82907672d938b2b447f0f7382e8fc4e4c343e708) --- .../payment_request/payment_request.py | 40 +++++++++++++++++-- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/payment_request/payment_request.py b/erpnext/accounts/doctype/payment_request/payment_request.py index aaae8204a9b..1d31fd4b67b 100644 --- a/erpnext/accounts/doctype/payment_request/payment_request.py +++ b/erpnext/accounts/doctype/payment_request/payment_request.py @@ -3,7 +3,7 @@ import json import frappe from frappe import _, qb from frappe.model.document import Document -from frappe.query_builder.functions import Sum +from frappe.query_builder.functions import Abs, Sum from frappe.utils import flt, nowdate from frappe.utils.background_jobs import enqueue @@ -564,6 +564,8 @@ def make_payment_request(**args): # fetches existing payment request `grand_total` amount existing_payment_request_amount = get_existing_payment_request_amount(ref_doc.doctype, ref_doc.name) + existing_paid_amount = get_existing_paid_amount(ref_doc.doctype, ref_doc.name) + def validate_and_calculate_grand_total(grand_total, existing_payment_request_amount): grand_total -= existing_payment_request_amount if not grand_total: @@ -583,6 +585,15 @@ def make_payment_request(**args): else: grand_total = validate_and_calculate_grand_total(grand_total, existing_payment_request_amount) + if existing_paid_amount: + if ref_doc.party_account_currency == ref_doc.currency: + if ref_doc.conversion_rate: + grand_total -= flt(existing_paid_amount / ref_doc.conversion_rate) + else: + grand_total -= flt(existing_paid_amount) + else: + grand_total -= flt(existing_paid_amount / ref_doc.conversion_rate) + if draft_payment_request: frappe.db.set_value( "Payment Request", draft_payment_request, "grand_total", grand_total, update_modified=False @@ -667,9 +678,11 @@ def get_amount(ref_doc, payment_account=None): elif dt in ["Sales Invoice", "Purchase Invoice"]: if not ref_doc.get("is_pos"): if ref_doc.party_account_currency == ref_doc.currency: - grand_total = flt(ref_doc.outstanding_amount) + grand_total = flt(ref_doc.rounded_total or ref_doc.grand_total) else: - grand_total = flt(flt(ref_doc.outstanding_amount) / ref_doc.conversion_rate) + grand_total = flt( + flt(ref_doc.base_rounded_total or ref_doc.base_grand_total) / ref_doc.conversion_rate + ) elif dt == "Sales Invoice": for pay in ref_doc.payments: if pay.type == "Phone" and pay.account == payment_account: @@ -751,6 +764,27 @@ def get_existing_payment_request_amount(ref_dt, ref_dn, statuses: list | None = return response[0][0] if response[0] else 0 +def get_existing_paid_amount(doctype, name): + PL = frappe.qb.DocType("Payment Ledger Entry") + PER = frappe.qb.DocType("Payment Entry Reference") + + query = ( + frappe.qb.from_(PL) + .left_join(PER) + .on( + (PER.reference_doctype == PL.against_voucher_type) & (PER.reference_name == PL.against_voucher_no) + ) + .select(Abs(Sum(PL.amount)).as_("total_paid_amount")) + .where(PL.against_voucher_type.eq(doctype)) + .where(PL.against_voucher_no.eq(name)) + .where(PL.amount < 0) + .where(PER.payment_request.isnull()) + ) + response = query.run() + + return response[0][0] if response[0] else 0 + + def get_gateway_details(args): # nosemgrep """ Return gateway and payment account of default payment gateway From 0ab0b4f716acee6837e7c62f875a99c2d11881ef Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Wed, 27 Nov 2024 20:29:36 +0530 Subject: [PATCH 0564/1614] chore: resolve conflict --- .../accounts/doctype/payment_request/test_payment_request.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/erpnext/accounts/doctype/payment_request/test_payment_request.py b/erpnext/accounts/doctype/payment_request/test_payment_request.py index cd5a1a26575..4442dbdd7ea 100644 --- a/erpnext/accounts/doctype/payment_request/test_payment_request.py +++ b/erpnext/accounts/doctype/payment_request/test_payment_request.py @@ -525,9 +525,6 @@ class TestPaymentRequest(FrappeTestCase): self.assertEqual(pr.grand_total, 1000) so.load_from_db() -<<<<<<< HEAD -======= - self.assertEqual(so.advance_payment_status, "Requested") def test_partial_paid_invoice_with_payment_request(self): si = create_sales_invoice(currency="INR", qty=1, rate=5000) @@ -546,4 +543,3 @@ class TestPaymentRequest(FrappeTestCase): pr = make_payment_request(dt="Sales Invoice", dn=si.name, mute_email=1) self.assertEqual(pr.grand_total, si.outstanding_amount) ->>>>>>> bbe3bc95d0 (test: add unit test to validate outstanding amount in payment request) From 294ded20300f2aa3b08bf9bd8e59a20397b68235 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Wed, 27 Nov 2024 16:01:32 +0000 Subject: [PATCH 0565/1614] chore(release): Bumped to Version 15.44.0 # [15.44.0](https://github.com/frappe/erpnext/compare/v15.43.3...v15.44.0) (2024-11-27) ### Bug Fixes * correct placeholder index in message ([a523c14](https://github.com/frappe/erpnext/commit/a523c14fd574f3e22d90aef3b73d98f7953625d4)) * add company dynamic filters in number cards ([db21def](https://github.com/frappe/erpnext/commit/db21def58b21938dd3b2fc51fd0d432a97202665)) * added Stock UOM field for RM in work order (backport [#44185](https://github.com/frappe/erpnext/issues/44185)) ([#44237](https://github.com/frappe/erpnext/issues/44237)) ([d4f0512](https://github.com/frappe/erpnext/commit/d4f0512a10550914b2aad1795fe8692658aab67a)) * added validation for quality inspection (backport [#44351](https://github.com/frappe/erpnext/issues/44351)) ([#44357](https://github.com/frappe/erpnext/issues/44357)) ([89bd4eb](https://github.com/frappe/erpnext/commit/89bd4eba46894efba5cfe9bc3411448d41366807)) * billed qty and received amount in PO analysis report (backport [#44349](https://github.com/frappe/erpnext/issues/44349)) ([#44354](https://github.com/frappe/erpnext/issues/44354)) ([ea0f24a](https://github.com/frappe/erpnext/commit/ea0f24aa573e66d289be4af567405e072eb73968)) * check difference with company currency ([d6ef438](https://github.com/frappe/erpnext/commit/d6ef43858cee5b3a05a306588c258eb1d41b7031)) * filter item with search fields ([d073b00](https://github.com/frappe/erpnext/commit/d073b005a8579e48266d1265ccf542f625ac595b)) * filter with item group only if it is mentioned in pos profile ([a439862](https://github.com/frappe/erpnext/commit/a4398626f66bae98b520d75f72e9d00222789174)) * Get submitted documents in validate_for_closed_fiscal_year ([af74a3c](https://github.com/frappe/erpnext/commit/af74a3c32fb5ec83439ed3417706aa3d1a0deefd)) * gp for return invoice ([f4518ca](https://github.com/frappe/erpnext/commit/f4518cac9a3ae9b4a018b24f3ea29ec525e2236a)) * include current invoice amount when tax_on_excess_amount is checked ([0ffeb9f](https://github.com/frappe/erpnext/commit/0ffeb9f6adbc581ecc9a0403c2680079213f9d93)) * Increase quantity by `1 UOM` when adding an item from the selector in POS ([0d38028](https://github.com/frappe/erpnext/commit/0d3802873b62dae8c346a9e256ebaa04050acff6)) * initially closing amt should be equal to expected amt ([3f57777](https://github.com/frappe/erpnext/commit/3f577779be3c8a2140ffb24947252c15b848a008)) * make free qty round on large transaction qty ([4856a96](https://github.com/frappe/erpnext/commit/4856a9633e2e6cd46cf001799f01c7d290514b6a)) * no permission to read Doctype (backport [#44256](https://github.com/frappe/erpnext/issues/44256)) ([#44258](https://github.com/frappe/erpnext/issues/44258)) ([8b15a96](https://github.com/frappe/erpnext/commit/8b15a965dd0ffea82c1d55a2893a79cf1fd243bb)) * not able to fetch batch item price ([97f2341](https://github.com/frappe/erpnext/commit/97f2341b98ea0cdb84cbf7dbaebdd32b208824b6)) * patch ([#44191](https://github.com/frappe/erpnext/issues/44191)) ([8b02402](https://github.com/frappe/erpnext/commit/8b02402f6295296e9465d813996c90e08ffa889e)) * reduce paid amount from grand total ([d0d97c2](https://github.com/frappe/erpnext/commit/d0d97c26a05ab961f88ece2609698ff37f3a5273)) * remove field precision in SO and PO for percentage fields ([860350a](https://github.com/frappe/erpnext/commit/860350a5b329a49d078f70f22c38a0a1a4ca2032)) * remove irrelavent filters ([7423d7d](https://github.com/frappe/erpnext/commit/7423d7d3372aecb0b6003e67313322061bdea673)) * set debit transaction currency in gl entry ([a2612d5](https://github.com/frappe/erpnext/commit/a2612d5f36eaeee10231b27b5c4bfea2c79208da)) * set outstanding amount while creating payment request for invoices ([8d8027d](https://github.com/frappe/erpnext/commit/8d8027d4233f9181a34ee00b33ff15da2cae2da4)) * set price_list_currency only if it exists ([8cd455b](https://github.com/frappe/erpnext/commit/8cd455b050c9687bc1c5cb91dd6360035cea4f30)) * Show available stock qty in `stock_uom` instead of `uom` ([49dad1a](https://github.com/frappe/erpnext/commit/49dad1a456bd22d154deafbfc5b27930721b2240)) * show cc on the email ([67809c7](https://github.com/frappe/erpnext/commit/67809c781a9088b381c51c0c997737e47a8c14df)) * test case ([66af7f4](https://github.com/frappe/erpnext/commit/66af7f4a14e58029f80aa87b62a056c04be60969)) * toggle debit credit amounts for transaction currency too; minor refactor ([7f8334f](https://github.com/frappe/erpnext/commit/7f8334f29a83a6e85fe32dcc9a2247c90046acee)) * unify company address query in sales transactions (backport [#44361](https://github.com/frappe/erpnext/issues/44361)) ([#44365](https://github.com/frappe/erpnext/issues/44365)) ([7e61aca](https://github.com/frappe/erpnext/commit/7e61aca512c18adca6f8eb5b2300287898e8f3e4)) * update gross profit for returned invoices ([ca56709](https://github.com/frappe/erpnext/commit/ca56709295002f86c0b936a75ed250415784ea06)) * use field precision instead of hardcoded precision in so and po ([cde1906](https://github.com/frappe/erpnext/commit/cde19066fe6b42aca5cae6971805973ac18a01dd)) ### Features * available qty at company in sales transactions (backport [#44260](https://github.com/frappe/erpnext/issues/44260)) ([#44325](https://github.com/frappe/erpnext/issues/44325)) ([20d0e95](https://github.com/frappe/erpnext/commit/20d0e95d7c3de85e0a0364dd9e7954f3aa6dbeee)) * provision to disable item attribute (backport [#44358](https://github.com/frappe/erpnext/issues/44358)) ([#44370](https://github.com/frappe/erpnext/issues/44370)) ([ef882de](https://github.com/frappe/erpnext/commit/ef882de509b43c5e7ef1cfd2e08f942df18df17b)) * Show Aggregate Value from Subsidiary Companies ([0469b0d](https://github.com/frappe/erpnext/commit/0469b0d1ecca4b5d13232d3ba5a7f4275a582da4)) ### Reverts * use `+ flt(value)` instead of direct increment ([b65e16a](https://github.com/frappe/erpnext/commit/b65e16a91b71ca7e674c04d08c2a01a8a0fb1079)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index babb8246bdb..82b86724482 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.43.3" +__version__ = "15.44.0" def get_default_company(user=None): From 70b5b08d588ea4e9132f2ab51846a16d4da04241 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 27 Nov 2024 18:55:43 +0100 Subject: [PATCH 0566/1614] feat: add Company Contact Person in selling transactions (backport #44362) (#44398) * feat: add Company Contact Person in selling transactions (#44362) (cherry picked from commit f6776c7d6b37ce2766244dfeaf5939bda1a183ba) * chore: resolve merge conflicts --------- Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com> --- .../accounts/doctype/pos_invoice/pos_invoice.json | 10 +++++++++- .../accounts/doctype/pos_invoice/pos_invoice.py | 9 +++------ .../doctype/sales_invoice/sales_invoice.json | 14 +++++++++++--- .../doctype/sales_invoice/sales_invoice.py | 1 + erpnext/public/js/queries.js | 11 +++++++++++ erpnext/public/js/utils/sales_common.js | 1 + erpnext/selling/doctype/quotation/quotation.json | 12 ++++++++++-- erpnext/selling/doctype/quotation/quotation.py | 1 + .../selling/doctype/sales_order/sales_order.json | 12 ++++++++++-- erpnext/selling/doctype/sales_order/sales_order.py | 1 + .../stock/doctype/delivery_note/delivery_note.json | 12 ++++++++++-- .../stock/doctype/delivery_note/delivery_note.py | 1 + 12 files changed, 69 insertions(+), 16 deletions(-) diff --git a/erpnext/accounts/doctype/pos_invoice/pos_invoice.json b/erpnext/accounts/doctype/pos_invoice/pos_invoice.json index d7b173667ec..42861140494 100644 --- a/erpnext/accounts/doctype/pos_invoice/pos_invoice.json +++ b/erpnext/accounts/doctype/pos_invoice/pos_invoice.json @@ -48,6 +48,7 @@ "shipping_address", "company_address", "company_address_display", + "company_contact_person", "currency_and_price_list", "currency", "conversion_rate", @@ -1558,12 +1559,19 @@ "fieldname": "update_billed_amount_in_delivery_note", "fieldtype": "Check", "label": "Update Billed Amount in Delivery Note" + }, + { + "fieldname": "company_contact_person", + "fieldtype": "Link", + "label": "Company Contact Person", + "options": "Contact", + "print_hide": 1 } ], "icon": "fa fa-file-text", "is_submittable": 1, "links": [], - "modified": "2024-03-20 16:00:34.268756", + "modified": "2024-11-26 13:10:50.309570", "modified_by": "Administrator", "module": "Accounts", "name": "POS Invoice", diff --git a/erpnext/accounts/doctype/pos_invoice/pos_invoice.py b/erpnext/accounts/doctype/pos_invoice/pos_invoice.py index 20316e3394b..ab5a4092c33 100644 --- a/erpnext/accounts/doctype/pos_invoice/pos_invoice.py +++ b/erpnext/accounts/doctype/pos_invoice/pos_invoice.py @@ -32,12 +32,8 @@ class POSInvoice(SalesInvoice): from erpnext.accounts.doctype.payment_schedule.payment_schedule import PaymentSchedule from erpnext.accounts.doctype.pos_invoice_item.pos_invoice_item import POSInvoiceItem from erpnext.accounts.doctype.pricing_rule_detail.pricing_rule_detail import PricingRuleDetail - from erpnext.accounts.doctype.sales_invoice_advance.sales_invoice_advance import ( - SalesInvoiceAdvance, - ) - from erpnext.accounts.doctype.sales_invoice_payment.sales_invoice_payment import ( - SalesInvoicePayment, - ) + from erpnext.accounts.doctype.sales_invoice_advance.sales_invoice_advance import SalesInvoiceAdvance + from erpnext.accounts.doctype.sales_invoice_payment.sales_invoice_payment import SalesInvoicePayment from erpnext.accounts.doctype.sales_invoice_timesheet.sales_invoice_timesheet import ( SalesInvoiceTimesheet, ) @@ -75,6 +71,7 @@ class POSInvoice(SalesInvoice): company: DF.Link company_address: DF.Link | None company_address_display: DF.SmallText | None + company_contact_person: DF.Link | None consolidated_invoice: DF.Link | None contact_display: DF.SmallText | None contact_email: DF.Data | None diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json index c44afd555e0..cb861e68cdc 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json @@ -159,8 +159,9 @@ "dispatch_address", "company_address_section", "company_address", - "company_addr_col_break", "company_address_display", + "company_addr_col_break", + "company_contact_person", "terms_tab", "payment_schedule_section", "ignore_default_payment_terms_template", @@ -2166,6 +2167,13 @@ "label": "Update Outstanding for Self", "no_copy": 1, "print_hide": 1 + }, + { + "fieldname": "company_contact_person", + "fieldtype": "Link", + "label": "Company Contact Person", + "options": "Contact", + "print_hide": 1 } ], "icon": "fa fa-file-text", @@ -2178,7 +2186,7 @@ "link_fieldname": "consolidated_invoice" } ], - "modified": "2024-07-18 15:30:39.428519", + "modified": "2024-11-26 12:34:09.110690", "modified_by": "Administrator", "module": "Accounts", "name": "Sales Invoice", @@ -2233,4 +2241,4 @@ "title_field": "title", "track_changes": 1, "track_seen": 1 -} +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 8baa36475da..410e934ab71 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -96,6 +96,7 @@ class SalesInvoice(SellingController): company: DF.Link company_address: DF.Link | None company_address_display: DF.SmallText | None + company_contact_person: DF.Link | None company_tax_id: DF.Data | None contact_display: DF.SmallText | None contact_email: DF.Data | None diff --git a/erpnext/public/js/queries.js b/erpnext/public/js/queries.js index 5350f91746c..fd5b7603844 100644 --- a/erpnext/public/js/queries.js +++ b/erpnext/public/js/queries.js @@ -56,6 +56,17 @@ $.extend(erpnext.queries, { } }, + company_contact_query: function (doc) { + if (!doc.company) { + frappe.throw(__("Please set {0}", [__(frappe.meta.get_label(doc.doctype, "company", doc.name))])); + } + + return { + query: "frappe.contacts.doctype.contact.contact.contact_query", + filters: { link_doctype: "Company", link_name: doc.company }, + }; + }, + address_query: function (doc) { if (frappe.dynamic_link) { if (!doc[frappe.dynamic_link.fieldname]) { diff --git a/erpnext/public/js/utils/sales_common.js b/erpnext/public/js/utils/sales_common.js index 373bf3d2115..ca2bed20c7f 100644 --- a/erpnext/public/js/utils/sales_common.js +++ b/erpnext/public/js/utils/sales_common.js @@ -49,6 +49,7 @@ erpnext.sales_common = { ); me.frm.set_query("contact_person", erpnext.queries.contact_query); + me.frm.set_query("company_contact_person", erpnext.queries.company_contact_query); me.frm.set_query("customer_address", erpnext.queries.address_query); me.frm.set_query("shipping_address_name", erpnext.queries.address_query); me.frm.set_query("dispatch_address_name", erpnext.queries.dispatch_address_query); diff --git a/erpnext/selling/doctype/quotation/quotation.json b/erpnext/selling/doctype/quotation/quotation.json index d6ee87b5dee..4d257ff69e7 100644 --- a/erpnext/selling/doctype/quotation/quotation.json +++ b/erpnext/selling/doctype/quotation/quotation.json @@ -96,8 +96,9 @@ "shipping_address", "company_address_section", "company_address", - "column_break_87", "company_address_display", + "column_break_87", + "company_contact_person", "terms_tab", "payment_schedule_section", "payment_terms_template", @@ -1076,13 +1077,20 @@ "fieldname": "disable_rounded_total", "fieldtype": "Check", "label": "Disable Rounded Total" + }, + { + "fieldname": "company_contact_person", + "fieldtype": "Link", + "label": "Company Contact Person", + "options": "Contact", + "print_hide": 1 } ], "icon": "fa fa-shopping-cart", "idx": 82, "is_submittable": 1, "links": [], - "modified": "2024-11-07 18:37:11.715189", + "modified": "2024-11-26 12:43:29.293637", "modified_by": "Administrator", "module": "Selling", "name": "Quotation", diff --git a/erpnext/selling/doctype/quotation/quotation.py b/erpnext/selling/doctype/quotation/quotation.py index 8e560b8d0ab..1922d6584ee 100644 --- a/erpnext/selling/doctype/quotation/quotation.py +++ b/erpnext/selling/doctype/quotation/quotation.py @@ -50,6 +50,7 @@ class Quotation(SellingController): company: DF.Link company_address: DF.Link | None company_address_display: DF.SmallText | None + company_contact_person: DF.Link | None competitors: DF.TableMultiSelect[CompetitorDetail] contact_display: DF.SmallText | None contact_email: DF.Data | None diff --git a/erpnext/selling/doctype/sales_order/sales_order.json b/erpnext/selling/doctype/sales_order/sales_order.json index 0695c3fd9c4..1525b9632de 100644 --- a/erpnext/selling/doctype/sales_order/sales_order.json +++ b/erpnext/selling/doctype/sales_order/sales_order.json @@ -113,8 +113,9 @@ "dispatch_address", "col_break46", "company_address", - "column_break_92", "company_address_display", + "column_break_92", + "company_contact_person", "payment_schedule_section", "payment_terms_section", "payment_terms_template", @@ -1640,13 +1641,20 @@ "no_copy": 1, "print_hide": 1, "report_hide": 1 + }, + { + "fieldname": "company_contact_person", + "fieldtype": "Link", + "label": "Company Contact Person", + "options": "Contact", + "print_hide": 1 } ], "icon": "fa fa-file-text", "idx": 105, "is_submittable": 1, "links": [], - "modified": "2024-05-23 16:35:54.905804", + "modified": "2024-11-26 12:42:06.872527", "modified_by": "Administrator", "module": "Selling", "name": "Sales Order", diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py index d8b3f3c6dcf..374c37f99bf 100755 --- a/erpnext/selling/doctype/sales_order/sales_order.py +++ b/erpnext/selling/doctype/sales_order/sales_order.py @@ -85,6 +85,7 @@ class SalesOrder(SellingController): company: DF.Link company_address: DF.Link | None company_address_display: DF.SmallText | None + company_contact_person: DF.Link | None contact_display: DF.SmallText | None contact_email: DF.Data | None contact_mobile: DF.SmallText | None diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.json b/erpnext/stock/doctype/delivery_note/delivery_note.json index 87c333370b2..4a0580f0e94 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note.json +++ b/erpnext/stock/doctype/delivery_note/delivery_note.json @@ -108,8 +108,9 @@ "dispatch_address", "company_address_section", "company_address", - "column_break_101", "company_address_display", + "column_break_101", + "company_contact_person", "terms_tab", "tc_name", "terms", @@ -1391,13 +1392,20 @@ "fieldname": "named_place", "fieldtype": "Data", "label": "Named Place" + }, + { + "fieldname": "company_contact_person", + "fieldtype": "Link", + "label": "Company Contact Person", + "options": "Contact", + "print_hide": 1 } ], "icon": "fa fa-truck", "idx": 146, "is_submittable": 1, "links": [], - "modified": "2024-03-20 16:05:02.854990", + "modified": "2024-11-26 12:44:28.258215", "modified_by": "Administrator", "module": "Stock", "name": "Delivery Note", diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.py b/erpnext/stock/doctype/delivery_note/delivery_note.py index 68eb07d3a77..0bc6b28fe68 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note.py +++ b/erpnext/stock/doctype/delivery_note/delivery_note.py @@ -53,6 +53,7 @@ class DeliveryNote(SellingController): company: DF.Link company_address: DF.Link | None company_address_display: DF.SmallText | None + company_contact_person: DF.Link | None contact_display: DF.SmallText | None contact_email: DF.Data | None contact_mobile: DF.SmallText | None From 0fbc60a20e0958d93c935446f0271d9ee626ecb5 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 27 Nov 2024 23:52:16 +0100 Subject: [PATCH 0567/1614] fix: show "Send SMS" only when enabled (backport #43941) (#43970) fix: show "Send SMS" only when enabled (#43941) (cherry picked from commit 65088cbb1b7cf54858805b5a5bd1b38ff3e0e29d) Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com> --- erpnext/public/js/controllers/transaction.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 77db3292eb7..b342f38ac40 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -486,7 +486,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe setup_sms() { var me = this; let blacklist = ['Purchase Invoice', 'BOM']; - if(this.frm.doc.docstatus===1 && !["Lost", "Stopped", "Closed"].includes(this.frm.doc.status) + if(frappe.boot.sms_gateway_enabled && this.frm.doc.docstatus===1 && !["Lost", "Stopped", "Closed"].includes(this.frm.doc.status) && !blacklist.includes(this.frm.doctype)) { this.frm.page.add_menu_item(__('Send SMS'), function() { me.send_sms(); }); } From c3bc724523aab30585554e24f7e3907ae48f6ea2 Mon Sep 17 00:00:00 2001 From: Khushi Rawat <142375893+khushi8112@users.noreply.github.com> Date: Thu, 28 Nov 2024 11:36:05 +0530 Subject: [PATCH 0568/1614] fix: IndexError in Asset Depreciation Ledger when query result is empty (cherry picked from commit 7c393e5aa01f0c1e05470e1073adf42e89540601) --- .../asset_depreciation_ledger/asset_depreciation_ledger.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/report/asset_depreciation_ledger/asset_depreciation_ledger.py b/erpnext/accounts/report/asset_depreciation_ledger/asset_depreciation_ledger.py index e1545bdcd87..a1ed6e1caa1 100644 --- a/erpnext/accounts/report/asset_depreciation_ledger/asset_depreciation_ledger.py +++ b/erpnext/accounts/report/asset_depreciation_ledger/asset_depreciation_ledger.py @@ -71,6 +71,7 @@ def get_data(filters): assets = [d.against_voucher for d in gl_entries] assets_details = get_assets_details(assets) + print(gl_entries) for d in gl_entries: asset_data = assets_details.get(d.against_voucher) @@ -89,7 +90,9 @@ def get_data(filters): & (DepreciationSchedule.schedule_date == d.posting_date) ) ).run(as_dict=True) - asset_data.accumulated_depreciation_amount = query[0]["accumulated_depreciation_amount"] + asset_data.accumulated_depreciation_amount = ( + query[0]["accumulated_depreciation_amount"] if query else 0 + ) else: asset_data.accumulated_depreciation_amount += d.debit From 5bbef90f08abfcf35feb8ef9101735cc906078f8 Mon Sep 17 00:00:00 2001 From: Khushi Rawat <142375893+khushi8112@users.noreply.github.com> Date: Thu, 28 Nov 2024 11:41:00 +0530 Subject: [PATCH 0569/1614] chore: removed print statement (cherry picked from commit 1737de7c10d96eaf8b6f8430202977336d969e00) --- .../asset_depreciation_ledger/asset_depreciation_ledger.py | 1 - 1 file changed, 1 deletion(-) diff --git a/erpnext/accounts/report/asset_depreciation_ledger/asset_depreciation_ledger.py b/erpnext/accounts/report/asset_depreciation_ledger/asset_depreciation_ledger.py index a1ed6e1caa1..a21103c719d 100644 --- a/erpnext/accounts/report/asset_depreciation_ledger/asset_depreciation_ledger.py +++ b/erpnext/accounts/report/asset_depreciation_ledger/asset_depreciation_ledger.py @@ -71,7 +71,6 @@ def get_data(filters): assets = [d.against_voucher for d in gl_entries] assets_details = get_assets_details(assets) - print(gl_entries) for d in gl_entries: asset_data = assets_details.get(d.against_voucher) From 173d60fb7d9aaab62e7bcd7e1e6ae5ec5f261518 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 28 Nov 2024 14:41:26 +0530 Subject: [PATCH 0570/1614] fix: typeerror on transaction.js (cherry picked from commit 46ce8780f2c7284ae6149a9b4a82e58fa1b017d7) --- erpnext/public/js/controllers/transaction.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index b342f38ac40..18cddd7f7a1 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -1124,7 +1124,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe apply_discount_on_item(doc, cdt, cdn, field) { var item = frappe.get_doc(cdt, cdn); - if(!item?.price_list_rate) { + if(item && !item.price_list_rate) { item[field] = 0.0; } else { this.price_list_rate(doc, cdt, cdn); From 8ab9fc7f55b7759033f540cd275630a30ace8e5b Mon Sep 17 00:00:00 2001 From: Ninad Parikh <109862100+Ninad1306@users.noreply.github.com> Date: Thu, 28 Nov 2024 15:59:52 +0530 Subject: [PATCH 0571/1614] fix: Data Should be Computed in Backend to Maintain Consistent Behaviour (#44195) (cherry picked from commit 69bd90b038e08b2348a100445acefb0d7fe7fecc) --- .../report/balance_sheet/balance_sheet.py | 4 ++ .../accounts/report/financial_statements.py | 65 +++++++++++++++++++ .../profit_and_loss_statement.py | 8 +++ erpnext/public/js/financial_statements.js | 39 ++++------- 4 files changed, 91 insertions(+), 25 deletions(-) diff --git a/erpnext/accounts/report/balance_sheet/balance_sheet.py b/erpnext/accounts/report/balance_sheet/balance_sheet.py index ab2f45d4f8b..fc19c40f8f9 100644 --- a/erpnext/accounts/report/balance_sheet/balance_sheet.py +++ b/erpnext/accounts/report/balance_sheet/balance_sheet.py @@ -7,6 +7,7 @@ from frappe import _ from frappe.utils import cint, flt from erpnext.accounts.report.financial_statements import ( + compute_growth_view_data, get_columns, get_data, get_filtered_list_for_consolidated_report, @@ -101,6 +102,9 @@ def execute(filters=None): period_list, asset, liability, equity, provisional_profit_loss, currency, filters ) + if filters.get("selected_view") == "Growth": + compute_growth_view_data(data, period_list) + return columns, data, message, chart, report_summary, primitive_summary diff --git a/erpnext/accounts/report/financial_statements.py b/erpnext/accounts/report/financial_statements.py index c233f3c7e2b..ca947255788 100644 --- a/erpnext/accounts/report/financial_statements.py +++ b/erpnext/accounts/report/financial_statements.py @@ -2,6 +2,7 @@ # License: GNU General Public License v3. See license.txt +import copy import functools import math import re @@ -668,3 +669,67 @@ def get_filtered_list_for_consolidated_report(filters, period_list): filtered_summary_list.append(period) return filtered_summary_list + + +def compute_growth_view_data(data, columns): + data_copy = copy.deepcopy(data) + + for row_idx in range(len(data_copy)): + for column_idx in range(1, len(columns)): + previous_period_key = columns[column_idx - 1].get("key") + current_period_key = columns[column_idx].get("key") + current_period_value = data_copy[row_idx].get(current_period_key) + previous_period_value = data_copy[row_idx].get(previous_period_key) + annual_growth = 0 + + if current_period_value is None: + data[row_idx][current_period_key] = None + continue + + if previous_period_value == 0 and current_period_value > 0: + annual_growth = 1 + + elif previous_period_value > 0: + annual_growth = (current_period_value - previous_period_value) / previous_period_value + + growth_percent = round(annual_growth * 100, 2) + + data[row_idx][current_period_key] = growth_percent + + +def compute_margin_view_data(data, columns, accumulated_values): + if not columns: + return + + if not accumulated_values: + columns.append({"key": "total"}) + + data_copy = copy.deepcopy(data) + + base_row = None + for row in data_copy: + if row.get("account_name") == _("Income"): + base_row = row + break + + if not base_row: + return + + for row_idx in range(len(data_copy)): + # Taking the total income from each column (for all the financial years) as the base (100%) + row = data_copy[row_idx] + if not row: + continue + + for column in columns: + curr_period = column.get("key") + base_value = base_row[curr_period] + curr_value = row[curr_period] + + if curr_value is None or base_value <= 0: + data[row_idx][curr_period] = None + continue + + margin_percent = round((curr_value / base_value) * 100, 2) + + data[row_idx][curr_period] = margin_percent diff --git a/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py b/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py index 35453f2ec44..2b6280c74b5 100644 --- a/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py +++ b/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py @@ -7,6 +7,8 @@ from frappe import _ from frappe.utils import flt from erpnext.accounts.report.financial_statements import ( + compute_growth_view_data, + compute_margin_view_data, get_columns, get_data, get_filtered_list_for_consolidated_report, @@ -68,6 +70,12 @@ def execute(filters=None): period_list, filters.periodicity, income, expense, net_profit_loss, currency, filters ) + if filters.get("selected_view") == "Growth": + compute_growth_view_data(data, period_list) + + if filters.get("selected_view") == "Margin": + compute_margin_view_data(data, period_list, filters.accumulated_values) + return columns, data, None, chart, report_summary, primitive_summary diff --git a/erpnext/public/js/financial_statements.js b/erpnext/public/js/financial_statements.js index bd80c254889..a58eb9f013a 100644 --- a/erpnext/public/js/financial_statements.js +++ b/erpnext/public/js/financial_statements.js @@ -9,40 +9,29 @@ erpnext.financial_statements = { data && column.colIndex >= 3 ) { - //Assuming that the first three columns are s.no, account name and the very first year of the accounting values, to calculate the relative percentage values of the successive columns. - const lastAnnualValue = row[column.colIndex - 1].content; - const currentAnnualvalue = data[column.fieldname]; - if (currentAnnualvalue == undefined) return "NA"; //making this not applicable for undefined/null values - let annualGrowth = 0; - if (lastAnnualValue == 0 && currentAnnualvalue > 0) { - //If the previous year value is 0 and the current value is greater than 0 - annualGrowth = 1; - } else if (lastAnnualValue > 0) { - annualGrowth = (currentAnnualvalue - lastAnnualValue) / lastAnnualValue; - } + const growthPercent = data[column.fieldname]; - const growthPercent = Math.round(annualGrowth * 10000) / 100; //calculating the rounded off percentage + if (growthPercent == undefined) return "NA"; //making this not applicable for undefined/null values - value = $(`${(growthPercent >= 0 ? "+" : "") + growthPercent + "%"}`); - if (growthPercent < 0) { - value = $(value).addClass("text-danger"); + if (column.fieldname === "total") { + value = $(`${growthPercent}`); } else { - value = $(value).addClass("text-success"); + value = $(`${(growthPercent >= 0 ? "+" : "") + growthPercent + "%"}`); + + if (growthPercent < 0) { + value = $(value).addClass("text-danger"); + } else { + value = $(value).addClass("text-success"); + } } value = $(value).wrap("

").parent().html(); return value; } else if (frappe.query_report.get_filter_value("selected_view") == "Margin" && data) { - if (column.fieldname == "account" && data.account_name == __("Income")) { - //Taking the total income from each column (for all the financial years) as the base (100%) - this.baseData = row; - } if (column.colIndex >= 2) { - //Assuming that the first two columns are s.no and account name, to calculate the relative percentage values of the successive columns. - const currentAnnualvalue = data[column.fieldname]; - const baseValue = this.baseData[column.colIndex].content; - if (currentAnnualvalue == undefined || baseValue <= 0) return "NA"; - const marginPercent = Math.round((currentAnnualvalue / baseValue) * 10000) / 100; + const marginPercent = data[column.fieldname]; + + if (marginPercent == undefined) return "NA"; //making this not applicable for undefined/null values value = $(`${marginPercent + "%"}`); if (marginPercent < 0) value = $(value).addClass("text-danger"); From 633be8d06bcbba0a7b08ba3e9172f67a7562343b Mon Sep 17 00:00:00 2001 From: David Date: Mon, 29 Jul 2024 20:01:22 +0200 Subject: [PATCH 0572/1614] fix: link cash flow rows and fix summary linking (cherry picked from commit b94af285875e23ce0d983831a7831f00934c67c2) # Conflicts: # erpnext/public/js/financial_statements.js --- .../accounts/report/cash_flow/cash_flow.js | 5 +- .../accounts/report/cash_flow/cash_flow.py | 58 +++++++++++-------- .../accounts/report/financial_statements.py | 10 ++-- erpnext/public/js/financial_statements.js | 20 +++++-- 4 files changed, 57 insertions(+), 36 deletions(-) diff --git a/erpnext/accounts/report/cash_flow/cash_flow.js b/erpnext/accounts/report/cash_flow/cash_flow.js index c824f0d9f38..bc76ee0a114 100644 --- a/erpnext/accounts/report/cash_flow/cash_flow.js +++ b/erpnext/accounts/report/cash_flow/cash_flow.js @@ -1,7 +1,10 @@ // Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -frappe.query_reports["Cash Flow"] = $.extend({}, erpnext.financial_statements); +frappe.query_reports["Cash Flow"] = $.extend(erpnext.financial_statements, { + name_field: "section", + parent_field: "parent_section", +}); erpnext.utils.add_dimensions("Cash Flow", 10); diff --git a/erpnext/accounts/report/cash_flow/cash_flow.py b/erpnext/accounts/report/cash_flow/cash_flow.py index 9b441671415..562ac5efb81 100644 --- a/erpnext/accounts/report/cash_flow/cash_flow.py +++ b/erpnext/accounts/report/cash_flow/cash_flow.py @@ -30,7 +30,7 @@ def execute(filters=None): company=filters.company, ) - cash_flow_accounts = get_cash_flow_accounts() + cash_flow_sections = get_cash_flow_accounts() # compute net profit / loss income = get_data( @@ -60,14 +60,14 @@ def execute(filters=None): summary_data = {} company_currency = frappe.get_cached_value("Company", filters.company, "default_currency") - for cash_flow_account in cash_flow_accounts: + for cash_flow_section in cash_flow_sections: section_data = [] data.append( { - "account_name": cash_flow_account["section_header"], - "parent_account": None, + "section_name": "'" + cash_flow_section["section_header"] + "'", + "parent_section": None, "indent": 0.0, - "account": cash_flow_account["section_header"], + "section": cash_flow_section["section_header"], } ) @@ -75,31 +75,40 @@ def execute(filters=None): # add first net income in operations section if net_profit_loss: net_profit_loss.update( - {"indent": 1, "parent_account": cash_flow_accounts[0]["section_header"]} + {"indent": 1, "parent_section": cash_flow_sections[0]["section_header"]} ) data.append(net_profit_loss) section_data.append(net_profit_loss) - for account in cash_flow_account["account_types"]: - account_data = get_account_type_based_data( - filters.company, account["account_type"], period_list, filters.accumulated_values, filters + for row in cash_flow_section["account_types"]: + row_data = get_account_type_based_data( + filters.company, row["account_type"], period_list, filters.accumulated_values, filters ) - account_data.update( + accounts = frappe.get_all( + "Account", + filters={ + "account_type": row["account_type"], + "is_group": 0, + }, + pluck="name", + ) + row_data.update( { - "account_name": account["label"], - "account": account["label"], + "section_name": row["label"], + "section": row["label"], "indent": 1, - "parent_account": cash_flow_account["section_header"], + "accounts": accounts, + "parent_section": cash_flow_section["section_header"], "currency": company_currency, } ) - data.append(account_data) - section_data.append(account_data) + data.append(row_data) + section_data.append(row_data) add_total_row_account( data, section_data, - cash_flow_account["section_footer"], + cash_flow_section["section_footer"], period_list, company_currency, summary_data, @@ -109,7 +118,7 @@ def execute(filters=None): add_total_row_account( data, data, _("Net Change in Cash"), period_list, company_currency, summary_data, filters ) - columns = get_columns(filters.periodicity, period_list, filters.accumulated_values, filters.company) + columns = get_columns(filters.periodicity, period_list, filters.accumulated_values, filters.company, True) chart = get_chart_data(columns, data, company_currency) @@ -217,8 +226,8 @@ def get_start_date(period, accumulated_values, company): def add_total_row_account(out, data, label, period_list, currency, summary_data, filters, consolidated=False): total_row = { - "account_name": "'" + _("{0}").format(label) + "'", - "account": "'" + _("{0}").format(label) + "'", + "section_name": "'" + _("{0}").format(label) + "'", + "section": "'" + _("{0}").format(label) + "'", "currency": currency, } @@ -229,7 +238,7 @@ def add_total_row_account(out, data, label, period_list, currency, summary_data, period_list = get_filtered_list_for_consolidated_report(filters, period_list) for row in data: - if row.get("parent_account"): + if row.get("parent_section"): for period in period_list: key = period if consolidated else period["key"] total_row.setdefault(key, 0.0) @@ -254,13 +263,14 @@ def get_report_summary(summary_data, currency): def get_chart_data(columns, data, currency): labels = [d.get("label") for d in columns[2:]] + print(data) datasets = [ { - "name": account.get("account").replace("'", ""), - "values": [account.get(d.get("fieldname")) for d in columns[2:]], + "name": section.get("section").replace("'", ""), + "values": [section.get(d.get("fieldname")) for d in columns[2:]], } - for account in data - if account.get("parent_account") is None and account.get("currency") + for section in data + if section.get("parent_section") is None and section.get("currency") ] datasets = datasets[:-1] diff --git a/erpnext/accounts/report/financial_statements.py b/erpnext/accounts/report/financial_statements.py index ca947255788..76b3dfc65c8 100644 --- a/erpnext/accounts/report/financial_statements.py +++ b/erpnext/accounts/report/financial_statements.py @@ -335,8 +335,8 @@ def filter_out_zero_value_rows(data, parent_children_map, show_zero_values=False def add_total_row(out, root_type, balance_must_be, period_list, company_currency): total_row = { - "account_name": _("Total {0} ({1})").format(_(root_type), _(balance_must_be)), - "account": _("Total {0} ({1})").format(_(root_type), _(balance_must_be)), + "account_name": "'" + _("Total {0} ({1})").format(_(root_type), _(balance_must_be)) + "'", + "account": "'" + _("Total {0} ({1})").format(_(root_type), _(balance_must_be)) + "'", "currency": company_currency, "opening_balance": 0.0, } @@ -617,11 +617,11 @@ def get_cost_centers_with_children(cost_centers): return list(set(all_cost_centers)) -def get_columns(periodicity, period_list, accumulated_values=1, company=None): +def get_columns(periodicity, period_list, accumulated_values=1, company=None, cash_flow=False): columns = [ { - "fieldname": "account", - "label": _("Account"), + "fieldname": "stub", + "label": _("Account") if not cash_flow else _("Section"), "fieldtype": "Link", "options": "Account", "width": 300, diff --git a/erpnext/public/js/financial_statements.js b/erpnext/public/js/financial_statements.js index a58eb9f013a..b14b5cdcf37 100644 --- a/erpnext/public/js/financial_statements.js +++ b/erpnext/public/js/financial_statements.js @@ -28,6 +28,13 @@ erpnext.financial_statements = { return value; } else if (frappe.query_report.get_filter_value("selected_view") == "Margin" && data) { +<<<<<<< HEAD +======= + if (column.fieldname == "stub" && data.account_name == __("Income")) { + //Taking the total income from each column (for all the financial years) as the base (100%) + this.baseData = row; + } +>>>>>>> b94af28587 (fix: link cash flow rows and fix summary linking) if (column.colIndex >= 2) { const marginPercent = data[column.fieldname]; @@ -41,8 +48,9 @@ erpnext.financial_statements = { } } - if (data && column.fieldname == "account") { - value = data.account_name || value; + if (data && column.fieldname == "stub") { + // first column + value = data.section_name || data.account_name || value; if (filter && filter?.text && filter?.type == "contains") { if (!value.toLowerCase().includes(filter.text)) { @@ -50,7 +58,7 @@ erpnext.financial_statements = { } } - if (data.account) { + if (data.account || data.accounts) { column.link_onclick = "erpnext.financial_statements.open_general_ledger(" + JSON.stringify(data) + ")"; } @@ -59,7 +67,7 @@ erpnext.financial_statements = { value = default_formatter(value, row, column, data); - if (data && !data.parent_account) { + if (data && !data.parent_account && !data.parent_section) { value = $(`${value}`); var $value = $(value).css("font-weight", "bold"); @@ -73,13 +81,13 @@ erpnext.financial_statements = { return value; }, open_general_ledger: function (data) { - if (!data.account) return; + if (!data.account && !data.accounts) return; let project = $.grep(frappe.query_report.filters, function (e) { return e.df.fieldname == "project"; }); frappe.route_options = { - account: data.account, + account: data.account || data.accounts, company: frappe.query_report.get_filter_value("company"), from_date: data.from_date || data.year_start_date, to_date: data.to_date || data.year_end_date, From 48d6fcaab8e4fbc92c2cb8474c8cb9437e70449a Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Fri, 29 Nov 2024 10:43:36 +0530 Subject: [PATCH 0573/1614] chore: resolve conflict --- erpnext/public/js/financial_statements.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/erpnext/public/js/financial_statements.js b/erpnext/public/js/financial_statements.js index b14b5cdcf37..cf3efae6d52 100644 --- a/erpnext/public/js/financial_statements.js +++ b/erpnext/public/js/financial_statements.js @@ -28,13 +28,10 @@ erpnext.financial_statements = { return value; } else if (frappe.query_report.get_filter_value("selected_view") == "Margin" && data) { -<<<<<<< HEAD -======= if (column.fieldname == "stub" && data.account_name == __("Income")) { //Taking the total income from each column (for all the financial years) as the base (100%) this.baseData = row; } ->>>>>>> b94af28587 (fix: link cash flow rows and fix summary linking) if (column.colIndex >= 2) { const marginPercent = data[column.fieldname]; From ae81bb3c1bca02f4da1fb32ee74f2c8e2f7129a2 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Fri, 29 Nov 2024 10:52:38 +0530 Subject: [PATCH 0574/1614] chore: revert 'stub' --- erpnext/accounts/report/financial_statements.py | 2 +- erpnext/public/js/financial_statements.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/report/financial_statements.py b/erpnext/accounts/report/financial_statements.py index 76b3dfc65c8..73e49983fb2 100644 --- a/erpnext/accounts/report/financial_statements.py +++ b/erpnext/accounts/report/financial_statements.py @@ -620,7 +620,7 @@ def get_cost_centers_with_children(cost_centers): def get_columns(periodicity, period_list, accumulated_values=1, company=None, cash_flow=False): columns = [ { - "fieldname": "stub", + "fieldname": "account", "label": _("Account") if not cash_flow else _("Section"), "fieldtype": "Link", "options": "Account", diff --git a/erpnext/public/js/financial_statements.js b/erpnext/public/js/financial_statements.js index cf3efae6d52..7a3877b9c46 100644 --- a/erpnext/public/js/financial_statements.js +++ b/erpnext/public/js/financial_statements.js @@ -28,7 +28,7 @@ erpnext.financial_statements = { return value; } else if (frappe.query_report.get_filter_value("selected_view") == "Margin" && data) { - if (column.fieldname == "stub" && data.account_name == __("Income")) { + if (column.fieldname == "account" && data.account_name == __("Income")) { //Taking the total income from each column (for all the financial years) as the base (100%) this.baseData = row; } @@ -45,7 +45,7 @@ erpnext.financial_statements = { } } - if (data && column.fieldname == "stub") { + if (data && column.fieldname == "account") { // first column value = data.section_name || data.account_name || value; From 5f785ede16341ab9e8db12db21b08d70c140de1a Mon Sep 17 00:00:00 2001 From: Abdeali Chharchhoda Date: Sat, 23 Nov 2024 14:47:31 +0530 Subject: [PATCH 0575/1614] refactor: Used object to get payment request status indicator (cherry picked from commit e1c4d6e1e666ee539caf746ed303003ac89f8024) # Conflicts: # erpnext/accounts/doctype/payment_request/payment_request_list.js --- .../payment_request/payment_request_list.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/erpnext/accounts/doctype/payment_request/payment_request_list.js b/erpnext/accounts/doctype/payment_request/payment_request_list.js index 183ca7c4584..a1e1549e9d9 100644 --- a/erpnext/accounts/doctype/payment_request/payment_request_list.js +++ b/erpnext/accounts/doctype/payment_request/payment_request_list.js @@ -1,6 +1,17 @@ +const INDICATORS = { + "Partially Paid": "orange", + Cancelled: "red", + Draft: "gray", + Failed: "red", + Initiated: "green", + Paid: "blue", + Requested: "green", +}; + frappe.listview_settings["Payment Request"] = { add_fields: ["status"], get_indicator: function (doc) { +<<<<<<< HEAD if (doc.status == "Draft") { return [__("Draft"), "gray", "status,=,Draft"]; } @@ -15,5 +26,8 @@ frappe.listview_settings["Payment Request"] = { } else if (doc.status == "Cancelled") { return [__("Cancelled"), "red", "status,=,Cancelled"]; } +======= + return [__(doc.status), INDICATORS[doc.status] || "gray", `status,=,${doc.status}`]; +>>>>>>> e1c4d6e1e6 (refactor: Used object to get payment request status indicator) }, }; From 0d67c62f43758d453bc59ea0595046f48afa78ab Mon Sep 17 00:00:00 2001 From: Abdeali Chharchhoda Date: Sat, 23 Nov 2024 15:10:23 +0530 Subject: [PATCH 0576/1614] fix: Dashboard for `Payment Request` (cherry picked from commit 91955e27c38338ff72ae4d19d8f7e26880c5eb3a) --- .../payment_request/payment_request_dashboard.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 erpnext/accounts/doctype/payment_request/payment_request_dashboard.py diff --git a/erpnext/accounts/doctype/payment_request/payment_request_dashboard.py b/erpnext/accounts/doctype/payment_request/payment_request_dashboard.py new file mode 100644 index 00000000000..02ad5684792 --- /dev/null +++ b/erpnext/accounts/doctype/payment_request/payment_request_dashboard.py @@ -0,0 +1,14 @@ +from frappe import _ + + +def get_data(): + return { + "fieldname": "payment_request", + "internal_links": { + "Payment Entry": ["references", "payment_request"], + "Payment Order": ["references", "payment_order"], + }, + "transactions": [ + {"label": _("Payment"), "items": ["Payment Entry", "Payment Order"]}, + ], + } From 9c4b5814a65b9bed086326aa11538f5a9db99938 Mon Sep 17 00:00:00 2001 From: Abdeali Chharchhoda Date: Tue, 26 Nov 2024 12:10:05 +0530 Subject: [PATCH 0577/1614] revert: remove default `Payment Request` indicator color (cherry picked from commit 37ceb09955c4e5a12714d6422c6092a271382e4f) # Conflicts: # erpnext/accounts/doctype/payment_request/payment_request_list.js --- .../doctype/payment_request/payment_request_list.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/erpnext/accounts/doctype/payment_request/payment_request_list.js b/erpnext/accounts/doctype/payment_request/payment_request_list.js index a1e1549e9d9..61dae1451f9 100644 --- a/erpnext/accounts/doctype/payment_request/payment_request_list.js +++ b/erpnext/accounts/doctype/payment_request/payment_request_list.js @@ -11,6 +11,7 @@ const INDICATORS = { frappe.listview_settings["Payment Request"] = { add_fields: ["status"], get_indicator: function (doc) { +<<<<<<< HEAD <<<<<<< HEAD if (doc.status == "Draft") { return [__("Draft"), "gray", "status,=,Draft"]; @@ -29,5 +30,10 @@ frappe.listview_settings["Payment Request"] = { ======= return [__(doc.status), INDICATORS[doc.status] || "gray", `status,=,${doc.status}`]; >>>>>>> e1c4d6e1e6 (refactor: Used object to get payment request status indicator) +======= + if (!doc.status || !INDICATORS[doc.status]) return; + + return [__(doc.status), INDICATORS[doc.status], `status,=,${doc.status}`]; +>>>>>>> 37ceb09955 (revert: remove default `Payment Request` indicator color) }, }; From 4b046160f8f9d43c34c1f9e093d052d4f9ca2e27 Mon Sep 17 00:00:00 2001 From: Abdeali Chharchhoda Date: Wed, 27 Nov 2024 15:52:45 +0530 Subject: [PATCH 0578/1614] refactor: Move `PR` link filters to client side (cherry picked from commit 2db2c8bce1c1f453818e7e693ded0c0eec8053ec) --- erpnext/accounts/doctype/payment_entry/payment_entry.js | 4 ++++ .../accounts/doctype/payment_request/payment_request.py | 7 +------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.js b/erpnext/accounts/doctype/payment_entry/payment_entry.js index a377aa04db2..2d27cccfff8 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.js +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.js @@ -185,6 +185,10 @@ frappe.ui.form.on("Payment Entry", { filters: { reference_doctype: row.reference_doctype, reference_name: row.reference_name, + company: doc.company, + status: ["!=", "Paid"], + outstanding_amount: [">", 0], // for compatibility with old data + docstatus: 1, }, }; }); diff --git a/erpnext/accounts/doctype/payment_request/payment_request.py b/erpnext/accounts/doctype/payment_request/payment_request.py index 1d31fd4b67b..27e3aa83092 100644 --- a/erpnext/accounts/doctype/payment_request/payment_request.py +++ b/erpnext/accounts/doctype/payment_request/payment_request.py @@ -987,12 +987,7 @@ def get_open_payment_requests_query(doctype, txt, searchfield, start, page_len, open_payment_requests = frappe.get_list( "Payment Request", - filters={ - **filters, - "status": ["!=", "Paid"], - "outstanding_amount": ["!=", 0], # for compatibility with old data - "docstatus": 1, - }, + filters=filters, fields=["name", "grand_total", "outstanding_amount"], order_by="transaction_date ASC,creation ASC", ) From 5999a8e24f908dc84bce88969bdb192c03c2cd08 Mon Sep 17 00:00:00 2001 From: Abdeali Chharchhoda Date: Wed, 27 Nov 2024 17:18:10 +0530 Subject: [PATCH 0579/1614] fix: Add filter for `outstanding_amount` to fetch open PRs (cherry picked from commit 214dfab2697ec13e70262cb4af92ca812a2dcb80) --- erpnext/accounts/doctype/payment_entry/payment_entry.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index 89f52b46679..5ebe1dd8754 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -2877,6 +2877,7 @@ def get_open_payment_requests_for_references(references=None): .where(Tuple(PR.reference_doctype, PR.reference_name).isin(list(refs))) .where(PR.status != "Paid") .where(PR.docstatus == 1) + .where(PR.outstanding_amount > 0) # to avoid old PRs with 0 outstanding amount .orderby(Coalesce(PR.transaction_date, PR.creation), order=frappe.qb.asc) ).run(as_dict=True) From 1c50111371eea3eb1abffb73babb550013f748b5 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Fri, 29 Nov 2024 14:50:41 +0530 Subject: [PATCH 0580/1614] chore: resolve conflict --- .../payment_request/payment_request_list.js | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/erpnext/accounts/doctype/payment_request/payment_request_list.js b/erpnext/accounts/doctype/payment_request/payment_request_list.js index 61dae1451f9..1027385aaaf 100644 --- a/erpnext/accounts/doctype/payment_request/payment_request_list.js +++ b/erpnext/accounts/doctype/payment_request/payment_request_list.js @@ -11,29 +11,8 @@ const INDICATORS = { frappe.listview_settings["Payment Request"] = { add_fields: ["status"], get_indicator: function (doc) { -<<<<<<< HEAD -<<<<<<< HEAD - if (doc.status == "Draft") { - return [__("Draft"), "gray", "status,=,Draft"]; - } - if (doc.status == "Requested") { - return [__("Requested"), "green", "status,=,Requested"]; - } else if (doc.status == "Initiated") { - return [__("Initiated"), "green", "status,=,Initiated"]; - } else if (doc.status == "Partially Paid") { - return [__("Partially Paid"), "orange", "status,=,Partially Paid"]; - } else if (doc.status == "Paid") { - return [__("Paid"), "blue", "status,=,Paid"]; - } else if (doc.status == "Cancelled") { - return [__("Cancelled"), "red", "status,=,Cancelled"]; - } -======= - return [__(doc.status), INDICATORS[doc.status] || "gray", `status,=,${doc.status}`]; ->>>>>>> e1c4d6e1e6 (refactor: Used object to get payment request status indicator) -======= if (!doc.status || !INDICATORS[doc.status]) return; return [__(doc.status), INDICATORS[doc.status], `status,=,${doc.status}`]; ->>>>>>> 37ceb09955 (revert: remove default `Payment Request` indicator color) }, }; From e607795baed7544bcaedac031ed595b3a34eec4d Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 29 Nov 2024 15:49:18 +0530 Subject: [PATCH 0581/1614] fix: do not validate stock during inward (backport #44417) (#44427) fix: do not validate stock during inward (#44417) (cherry picked from commit d37d7b9811b8bd51f577004cfb89aefcab6d41cd) Co-authored-by: rohitwaghchaure --- .../doctype/serial_and_batch_bundle/serial_and_batch_bundle.py | 3 +++ 1 file changed, 3 insertions(+) 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 68c47b0d577..dc30039a8c0 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 @@ -972,6 +972,9 @@ class SerialandBatchBundle(Document): ): return + if self.voucher_type in ["Sales Invoice", "Delivery Note"] and self.type_of_transaction == "Inward": + return + if not self.has_batch_no: return From 0e39aa349eda503339299acae94009c6e54b54cb Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 29 Nov 2024 17:00:59 +0530 Subject: [PATCH 0582/1614] fix: SABB print for packed items (backport #44413) (#44428) fix: SABB print for packed items (#44413) (cherry picked from commit 5266f236b70290bfcf32e51d86fb0a9a673f9576) Co-authored-by: rohitwaghchaure --- erpnext/controllers/print_settings.py | 8 +++++++- erpnext/stock/serial_batch_bundle.py | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/erpnext/controllers/print_settings.py b/erpnext/controllers/print_settings.py index f99711631ff..f05ef67c308 100644 --- a/erpnext/controllers/print_settings.py +++ b/erpnext/controllers/print_settings.py @@ -11,7 +11,13 @@ def set_print_templates_for_item_table(doc, settings): "items": { "qty": "templates/print_formats/includes/item_table_qty.html", "serial_and_batch_bundle": "templates/print_formats/includes/serial_and_batch_bundle.html", - } + }, + "packed_items": { + "serial_and_batch_bundle": "templates/print_formats/includes/serial_and_batch_bundle.html", + }, + "supplied_items": { + "serial_and_batch_bundle": "templates/print_formats/includes/serial_and_batch_bundle.html", + }, } doc.flags.compact_item_fields = ["description", "qty", "rate", "amount"] diff --git a/erpnext/stock/serial_batch_bundle.py b/erpnext/stock/serial_batch_bundle.py index 3fed0195d69..dd459bb30bc 100644 --- a/erpnext/stock/serial_batch_bundle.py +++ b/erpnext/stock/serial_batch_bundle.py @@ -478,7 +478,7 @@ def get_serial_or_batch_nos(bundle): html = "" for d in data: if d.serial_no: - html += f"" + html += f"" else: html += f"" From 0d41c23383961a332802de46c2919981e8250a3c Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 29 Nov 2024 18:12:24 +0530 Subject: [PATCH 0583/1614] fix: precision calculation causing 0.1 discrepancy (backport #44431) (#44436) fix: precision calculation causing 0.1 discrepancy (#44431) (cherry picked from commit 7f7564b581b8bc2e373b1bf6fc668b54f375d00c) Co-authored-by: rohitwaghchaure --- .../serial_and_batch_bundle/serial_and_batch_bundle.py | 6 ++---- 1 file changed, 2 insertions(+), 4 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 dc30039a8c0..9b07c1e4d19 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 @@ -432,8 +432,6 @@ class SerialandBatchBundle(Document): valuation_field = "rate" child_table = "Subcontracting Receipt Item" - precision = frappe.get_precision(child_table, valuation_field) or 2 - if not rate and self.voucher_detail_no and self.voucher_no: rate = frappe.db.get_value(child_table, self.voucher_detail_no, valuation_field) @@ -443,9 +441,9 @@ class SerialandBatchBundle(Document): elif (d.incoming_rate == rate) and d.qty and d.stock_value_difference: continue - d.incoming_rate = flt(rate, precision) + d.incoming_rate = rate if d.qty: - d.stock_value_difference = flt(d.qty) * flt(d.incoming_rate) + d.stock_value_difference = d.qty * d.incoming_rate if save: d.db_set( From c81b5e3d9cb8acb6d15b294bb0545f713ba5748d Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 29 Nov 2024 18:13:05 +0530 Subject: [PATCH 0584/1614] fix: source warehouse not set in required items of WO (backport #44426) (#44434) fix: source warehouse not set in required items of WO (#44426) fix: source warehouse not set in required items of WO on data import (cherry picked from commit 4050ea07eb7c45b3a9babe9472faf2fa89f47a9c) Co-authored-by: rohitwaghchaure --- erpnext/manufacturing/doctype/work_order/work_order.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/erpnext/manufacturing/doctype/work_order/work_order.py b/erpnext/manufacturing/doctype/work_order/work_order.py index 1ebcde75366..1d0df26800d 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order.py +++ b/erpnext/manufacturing/doctype/work_order/work_order.py @@ -160,10 +160,18 @@ class WorkOrder(Document): self.validate_workstation_type() self.reset_use_multi_level_bom() + if self.source_warehouse: + self.set_warehouses() + validate_uom_is_integer(self, "stock_uom", ["qty", "produced_qty"]) self.set_required_items(reset_only_qty=len(self.get("required_items"))) + def set_warehouses(self): + for row in self.required_items: + if not row.source_warehouse: + row.source_warehouse = self.source_warehouse + def reset_use_multi_level_bom(self): if self.is_new(): return From 1f9797905973ef8adc74867adc3a1f052cf5e83b Mon Sep 17 00:00:00 2001 From: Sagar Vora Date: Fri, 29 Nov 2024 22:51:32 +0530 Subject: [PATCH 0585/1614] perf: cache product bundle items at document level (#44440) (cherry picked from commit 6de7320ef40f218cf6aa3b01d0dc1c0c431e68ed) --- erpnext/controllers/selling_controller.py | 32 ++++++++++++++++++----- 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/erpnext/controllers/selling_controller.py b/erpnext/controllers/selling_controller.py index bb59166d3f8..459cf36bf44 100644 --- a/erpnext/controllers/selling_controller.py +++ b/erpnext/controllers/selling_controller.py @@ -381,12 +381,32 @@ class SellingController(StockController): return il def has_product_bundle(self, item_code): - product_bundle = frappe.qb.DocType("Product Bundle") - return ( - frappe.qb.from_(product_bundle) - .select(product_bundle.name) - .where((product_bundle.new_item_code == item_code) & (product_bundle.disabled == 0)) - ).run() + product_bundle_items = getattr(self, "_product_bundle_items", None) + if product_bundle_items is None: + self._product_bundle_items = product_bundle_items = {} + + if item_code not in product_bundle_items: + self._fetch_product_bundle_items(item_code) + + return product_bundle_items[item_code] + + def _fetch_product_bundle_items(self, item_code): + product_bundle_items = self._product_bundle_items + items_to_fetch = {row.item_code for row in self.items if row.item_code not in product_bundle_items} + # fetch for requisite item_code even if it is not in items + items_to_fetch.add(item_code) + + items_with_product_bundle = { + row.new_item_code + for row in frappe.get_all( + "Product Bundle", + filters={"new_item_code": ("in", items_to_fetch), "disabled": 0}, + fields="new_item_code", + ) + } + + for item_code in items_to_fetch: + product_bundle_items[item_code] = item_code in items_with_product_bundle def get_already_delivered_qty(self, current_docname, so, so_detail): delivered_via_dn = frappe.db.sql( From 17c2734042ed0ed2f226ff2adb1ef70dfd63cfd9 Mon Sep 17 00:00:00 2001 From: Abdeali Chharchhoda Date: Fri, 29 Nov 2024 18:13:03 +0530 Subject: [PATCH 0586/1614] fix: added fieldname to avoid fieldname to translate (cherry picked from commit b80022133c0043d2ccfdcfef8770c2970adc9f0c) --- .../report/accounts_receivable/accounts_receivable.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py index a58d4ab72ca..86e3dbc5b78 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py @@ -1013,7 +1013,7 @@ class ReceivablePayableReport: def get_columns(self): self.columns = [] - self.add_column(_("Posting Date"), fieldtype="Date") + self.add_column(_("Posting Date"), fieldname="posting_date", fieldtype="Date") self.add_column( label=_("Party Type"), fieldname="party_type", @@ -1066,7 +1066,7 @@ class ReceivablePayableReport: width=180, ) - self.add_column(label=_("Due Date"), fieldtype="Date") + self.add_column(label=_("Due Date"), fieldname="due_date", fieldtype="Date") if self.account_type == "Payable": self.add_column(label=_("Bill No"), fieldname="bill_no", fieldtype="Data") From 48059a7c74422fa2c462aabb041fb642b01a9ae2 Mon Sep 17 00:00:00 2001 From: Sagar Vora Date: Sat, 30 Nov 2024 00:11:03 +0530 Subject: [PATCH 0587/1614] perf: reduce queries during transaction save (cherry picked from commit b6b8a06fda0ffaffe3e163af77772520d8c3be1c) --- erpnext/accounts/party.py | 14 +++++++------- erpnext/controllers/selling_controller.py | 8 +------- erpnext/utilities/transaction_base.py | 10 +++++----- 3 files changed, 13 insertions(+), 19 deletions(-) diff --git a/erpnext/accounts/party.py b/erpnext/accounts/party.py index 65054aec53f..5be80872db8 100644 --- a/erpnext/accounts/party.py +++ b/erpnext/accounts/party.py @@ -29,6 +29,12 @@ from erpnext.accounts.utils import get_fiscal_year from erpnext.exceptions import InvalidAccountCurrency, PartyDisabled, PartyFrozen from erpnext.utilities.regional import temporary_flag +try: + from frappe.contacts.doctype.address.address import render_address as _render_address +except ImportError: + # Older frappe versions where this function is not available + from frappe.contacts.doctype.address.address import get_address_display as _render_address + PURCHASE_TRANSACTION_TYPES = { "Supplier Quotation", "Purchase Order", @@ -982,10 +988,4 @@ def add_party_account(party_type, party, company, account): def render_address(address, check_permissions=True): - try: - from frappe.contacts.doctype.address.address import render_address as _render - except ImportError: - # Older frappe versions where this function is not available - from frappe.contacts.doctype.address.address import get_address_display as _render - - return frappe.call(_render, address, check_permissions=check_permissions) + return frappe.call(_render_address, address, check_permissions=check_permissions) diff --git a/erpnext/controllers/selling_controller.py b/erpnext/controllers/selling_controller.py index 459cf36bf44..b704cb30791 100644 --- a/erpnext/controllers/selling_controller.py +++ b/erpnext/controllers/selling_controller.py @@ -74,19 +74,13 @@ class SellingController(StockController): if customer: from erpnext.accounts.party import _get_party_details - fetch_payment_terms_template = False - if self.get("__islocal") or self.company != frappe.db.get_value( - self.doctype, self.name, "company" - ): - fetch_payment_terms_template = True - party_details = _get_party_details( customer, ignore_permissions=self.flags.ignore_permissions, doctype=self.doctype, company=self.company, posting_date=self.get("posting_date"), - fetch_payment_terms_template=fetch_payment_terms_template, + fetch_payment_terms_template=self.has_value_changed("company"), party_address=self.customer_address, shipping_address=self.shipping_address_name, company_address=self.get("company_address"), diff --git a/erpnext/utilities/transaction_base.py b/erpnext/utilities/transaction_base.py index 6fab5380c38..2e4bdac6aab 100644 --- a/erpnext/utilities/transaction_base.py +++ b/erpnext/utilities/transaction_base.py @@ -257,11 +257,11 @@ def validate_uom_is_integer(doc, uom_field, qty_fields, child_dt=None): if isinstance(qty_fields, str): qty_fields = [qty_fields] - distinct_uoms = list(set(d.get(uom_field) for d in doc.get_all_children())) - integer_uoms = list( - filter( - lambda uom: frappe.db.get_value("UOM", uom, "must_be_whole_number", cache=True) or None, - distinct_uoms, + distinct_uoms = tuple(set(uom for uom in (d.get(uom_field) for d in doc.get_all_children()) if uom)) + integer_uoms = set( + d[0] + for d in frappe.db.get_values( + "UOM", (("name", "in", distinct_uoms), ("must_be_whole_number", "=", 1)), cache=True ) ) From 579d8e293eb898b0bae0da31ca53b8aa46955884 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Sat, 30 Nov 2024 13:42:54 +0530 Subject: [PATCH 0588/1614] fix: number format in the message (backport #44435) (#44438) fix: number format in the message (#44435) (cherry picked from commit 810c72a30c6f06b19ae1f606b22c0df8fa0dc7b2) Co-authored-by: rohitwaghchaure --- .../serial_and_batch_bundle/serial_and_batch_bundle.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 9b07c1e4d19..fff9cbfc07d 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 @@ -607,8 +607,10 @@ class SerialandBatchBundle(Document): precision = row.precision if abs(abs(flt(self.total_qty, precision)) - abs(flt(qty, precision))) > 0.01: + total_qty = frappe.format_value(abs(flt(self.total_qty)), "Float", row) + set_qty = frappe.format_value(abs(flt(row.get(qty_field))), "Float", row) self.throw_error_message( - f"Total quantity {abs(flt(self.total_qty))} in the Serial and Batch Bundle {bold(self.name)} does not match with the quantity {abs(flt(row.get(qty_field)))} for the Item {bold(self.item_code)} in the {self.voucher_type} # {self.voucher_no}" + f"Total quantity {total_qty} in the Serial and Batch Bundle {bold(self.name)} does not match with the quantity {set_qty} for the Item {bold(self.item_code)} in the {self.voucher_type} # {self.voucher_no}" ) def get_qty_field(self, row, qty_field=None) -> str: From eb4a485df6e0953c1552549ffda74caea644ed60 Mon Sep 17 00:00:00 2001 From: Abdeali Chharchhoda Date: Fri, 29 Nov 2024 17:42:11 +0530 Subject: [PATCH 0589/1614] fix: Added translation for `Account` column (cherry picked from commit de6cbd382f7ff93adff53ad598c2d76361fab4a5) --- .../accounts/report/accounts_receivable/accounts_receivable.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py index 86e3dbc5b78..ad6dd096b58 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py @@ -1028,7 +1028,7 @@ class ReceivablePayableReport: width=180, ) self.add_column( - label=self.account_type + " Account", + label=_(self.account_type + " Account"), fieldname="party_account", fieldtype="Link", options="Account", From fdda86455a93a25bb2216893da69cc8efe9a07d2 Mon Sep 17 00:00:00 2001 From: Abdeali Chharchhoda Date: Mon, 2 Dec 2024 11:23:10 +0530 Subject: [PATCH 0590/1614] fix: Translate `Party Account` column label (cherry picked from commit a4f8315602ad5ebfd3805b986f7186648d05313c) --- .../report/accounts_receivable/accounts_receivable.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py index ad6dd096b58..49dce0e299b 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py @@ -1027,8 +1027,15 @@ class ReceivablePayableReport: options="party_type", width=180, ) + if self.account_type == "Receivable": + label = _("Receivable Account") + elif self.account_type == "Payable": + label = _("Payable Account") + else: + label = _("Party Account") + self.add_column( - label=_(self.account_type + " Account"), + label=label, fieldname="party_account", fieldtype="Link", options="Account", From c8e2c9aa2535b35a9c2a803762ef26a55ef804e2 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Thu, 28 Nov 2024 19:50:01 +0530 Subject: [PATCH 0591/1614] fix: handle multi currency in common party journal entry (cherry picked from commit e371f68d66700a1641bb36da533385682feac076) # Conflicts: # erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py --- .../sales_invoice/test_sales_invoice.py | 194 ++++++++++++++++++ erpnext/controllers/accounts_controller.py | 67 +++++- 2 files changed, 251 insertions(+), 10 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py index 90bec018257..1d7359b811f 100644 --- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py @@ -4135,6 +4135,200 @@ class TestSalesInvoice(FrappeTestCase): self.assertEqual(len(actual), 4) self.assertEqual(expected, actual) +<<<<<<< HEAD +======= + @IntegrationTestCase.change_settings("Accounts Settings", {"enable_common_party_accounting": True}) + def test_common_party_with_foreign_currency_jv(self): + from erpnext.accounts.doctype.account.test_account import create_account + from erpnext.accounts.doctype.opening_invoice_creation_tool.test_opening_invoice_creation_tool import ( + make_customer, + ) + from erpnext.accounts.doctype.party_link.party_link import create_party_link + from erpnext.buying.doctype.supplier.test_supplier import create_supplier + from erpnext.setup.utils import get_exchange_rate + + creditors = create_account( + account_name="Creditors USD", + parent_account="Accounts Payable - _TC", + company="_Test Company", + account_currency="USD", + account_type="Payable", + ) + debtors = create_account( + account_name="Debtors USD", + parent_account="Accounts Receivable - _TC", + company="_Test Company", + account_currency="USD", + account_type="Receivable", + ) + + # create a customer + customer = make_customer(customer="_Test Common Party USD") + cust_doc = frappe.get_doc("Customer", customer) + cust_doc.default_currency = "USD" + test_account_details = { + "company": "_Test Company", + "account": debtors, + } + cust_doc.append("accounts", test_account_details) + cust_doc.save() + + # create a supplier + supplier = create_supplier(supplier_name="_Test Common Party USD").name + supp_doc = frappe.get_doc("Supplier", supplier) + supp_doc.default_currency = "USD" + test_account_details = { + "company": "_Test Company", + "account": creditors, + } + supp_doc.append("accounts", test_account_details) + supp_doc.save() + + # create a party link between customer & supplier + create_party_link("Supplier", supplier, customer) + + # create a sales invoice + si = create_sales_invoice( + customer=customer, + currency="USD", + conversion_rate=get_exchange_rate("USD", "INR"), + debit_to=debtors, + do_not_save=1, + ) + si.party_account_currency = "USD" + si.save() + si.submit() + + # check outstanding of sales invoice + si.reload() + self.assertEqual(si.status, "Paid") + self.assertEqual(flt(si.outstanding_amount), 0.0) + + # check creation of journal entry + jv = frappe.get_all( + "Journal Entry Account", + { + "account": si.debit_to, + "party_type": "Customer", + "party": si.customer, + "reference_type": si.doctype, + "reference_name": si.name, + }, + pluck="credit_in_account_currency", + ) + self.assertTrue(jv) + self.assertEqual(jv[0], si.grand_total) + + @IntegrationTestCase.change_settings("Accounts Settings", {"enable_common_party_accounting": True}) + def test_common_party_with_different_currency_in_debtor_and_creditor(self): + from erpnext.accounts.doctype.account.test_account import create_account + from erpnext.accounts.doctype.opening_invoice_creation_tool.test_opening_invoice_creation_tool import ( + make_customer, + ) + from erpnext.accounts.doctype.party_link.party_link import create_party_link + from erpnext.buying.doctype.supplier.test_supplier import create_supplier + from erpnext.setup.utils import get_exchange_rate + + creditors = create_account( + account_name="Creditors INR", + parent_account="Accounts Payable - _TC", + company="_Test Company", + account_currency="INR", + account_type="Payable", + ) + debtors = create_account( + account_name="Debtors USD", + parent_account="Accounts Receivable - _TC", + company="_Test Company", + account_currency="USD", + account_type="Receivable", + ) + + # create a customer + customer = make_customer(customer="_Test Common Party USD") + cust_doc = frappe.get_doc("Customer", customer) + cust_doc.default_currency = "USD" + test_account_details = { + "company": "_Test Company", + "account": debtors, + } + cust_doc.append("accounts", test_account_details) + cust_doc.save() + + # create a supplier + supplier = create_supplier(supplier_name="_Test Common Party INR").name + supp_doc = frappe.get_doc("Supplier", supplier) + supp_doc.default_currency = "INR" + test_account_details = { + "company": "_Test Company", + "account": creditors, + } + supp_doc.append("accounts", test_account_details) + supp_doc.save() + + # create a party link between customer & supplier + create_party_link("Supplier", supplier, customer) + + # create a sales invoice + si = create_sales_invoice( + customer=customer, + currency="USD", + conversion_rate=get_exchange_rate("USD", "INR"), + debit_to=debtors, + do_not_save=1, + ) + si.party_account_currency = "USD" + si.save() + si.submit() + + # check outstanding of sales invoice + si.reload() + self.assertEqual(si.status, "Paid") + self.assertEqual(flt(si.outstanding_amount), 0.0) + + # check creation of journal entry + jv = frappe.get_all( + "Journal Entry Account", + { + "account": si.debit_to, + "party_type": "Customer", + "party": si.customer, + "reference_type": si.doctype, + "reference_name": si.name, + }, + pluck="credit_in_account_currency", + ) + self.assertTrue(jv) + self.assertEqual(jv[0], si.grand_total) + + def test_invoice_remarks(self): + si = frappe.copy_doc(self.globalTestRecords["Sales Invoice"][0]) + si.po_no = "Test PO" + si.po_date = nowdate() + si.save() + si.submit() + self.assertEqual(si.remarks, f"Against Customer Order Test PO dated {format_date(nowdate())}") + + def test_gl_voucher_subtype(self): + si = create_sales_invoice() + gl_entries = frappe.get_all( + "GL Entry", + filters={"voucher_type": "Sales Invoice", "voucher_no": si.name}, + pluck="voucher_subtype", + ) + + self.assertTrue(all([x == "Sales Invoice" for x in gl_entries])) + + si = create_sales_invoice(is_return=1, qty=-1) + gl_entries = frappe.get_all( + "GL Entry", + filters={"voucher_type": "Sales Invoice", "voucher_no": si.name}, + pluck="voucher_subtype", + ) + + self.assertTrue(all([x == "Credit Note" for x in gl_entries])) + +>>>>>>> e371f68d66 (fix: handle multi currency in common party journal entry) def set_advance_flag(company, flag, default_account): frappe.db.set_value( diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index b4b23dd5f4c..bc0cdde94de 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -2465,6 +2465,12 @@ class AccountsController(TransactionBase): secondary_account = get_party_account(secondary_party_type, secondary_party, self.company) primary_account_currency = get_account_currency(primary_account) secondary_account_currency = get_account_currency(secondary_account) + default_currency = erpnext.get_company_currency(self.company) + + # Determine if multi-currency journal entry is needed + multi_currency = ( + primary_account_currency != default_currency or secondary_account_currency != default_currency + ) jv = frappe.new_doc("Journal Entry") jv.voucher_type = "Journal Entry" @@ -2489,7 +2495,7 @@ class AccountsController(TransactionBase): advance_entry.cost_center = self.cost_center or erpnext.get_default_cost_center(self.company) advance_entry.is_advance = "Yes" - # update dimesions + # Update dimensions dimensions_dict = frappe._dict() active_dimensions = get_dimensions()[0] for dim in active_dimensions: @@ -2498,17 +2504,58 @@ class AccountsController(TransactionBase): reconcilation_entry.update(dimensions_dict) advance_entry.update(dimensions_dict) - if self.doctype == "Sales Invoice": - reconcilation_entry.credit_in_account_currency = self.outstanding_amount - advance_entry.debit_in_account_currency = self.outstanding_amount + # Calculate exchange rates if necessary + if multi_currency: + # Exchange rates for primary and secondary accounts + exc_rate_primary_to_default = ( + 1 + if primary_account_currency == default_currency + else get_exchange_rate(primary_account_currency, default_currency, self.posting_date) + ) + exc_rate_secondary_to_default = ( + 1 + if secondary_account_currency == default_currency + else get_exchange_rate(secondary_account_currency, default_currency, self.posting_date) + ) + exc_rate_secondary_to_primary = ( + 1 + if secondary_account_currency == primary_account_currency + else get_exchange_rate( + secondary_account_currency, primary_account_currency, self.posting_date + ) + ) + + # Convert outstanding amount from secondary to primary account currency, if needed + + os_in_default_currency = self.outstanding_amount * exc_rate_secondary_to_default + os_in_primary_currency = self.outstanding_amount * exc_rate_secondary_to_primary + + if self.doctype == "Sales Invoice": + # Calculate credit and debit values for reconciliation and advance entries + reconcilation_entry.credit_in_account_currency = self.outstanding_amount + reconcilation_entry.credit = os_in_default_currency + + advance_entry.debit_in_account_currency = os_in_primary_currency + advance_entry.debit = os_in_default_currency + else: + advance_entry.credit_in_account_currency = os_in_primary_currency + advance_entry.credit = os_in_default_currency + + reconcilation_entry.debit_in_account_currency = self.outstanding_amount + reconcilation_entry.debit = os_in_default_currency + + # Set exchange rates for entries + reconcilation_entry.exchange_rate = exc_rate_secondary_to_default + advance_entry.exchange_rate = exc_rate_primary_to_default else: - advance_entry.credit_in_account_currency = self.outstanding_amount - reconcilation_entry.debit_in_account_currency = self.outstanding_amount - - default_currency = erpnext.get_company_currency(self.company) - if primary_account_currency != default_currency or secondary_account_currency != default_currency: - jv.multi_currency = 1 + if self.doctype == "Sales Invoice": + reconcilation_entry.credit_in_account_currency = self.outstanding_amount + advance_entry.debit_in_account_currency = self.outstanding_amount + else: + advance_entry.credit_in_account_currency = self.outstanding_amount + reconcilation_entry.debit_in_account_currency = self.outstanding_amount + jv.multi_currency = multi_currency jv.append("accounts", reconcilation_entry) jv.append("accounts", advance_entry) From 4c5570ae7d5d04fd3254f3c68e08877530a21997 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 2 Dec 2024 13:46:39 +0530 Subject: [PATCH 0592/1614] chore: resolve conflict --- .../sales_invoice/test_sales_invoice.py | 114 +----------------- 1 file changed, 1 insertion(+), 113 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py index 1d7359b811f..d2b8882743a 100644 --- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py @@ -4135,91 +4135,7 @@ class TestSalesInvoice(FrappeTestCase): self.assertEqual(len(actual), 4) self.assertEqual(expected, actual) -<<<<<<< HEAD -======= - @IntegrationTestCase.change_settings("Accounts Settings", {"enable_common_party_accounting": True}) - def test_common_party_with_foreign_currency_jv(self): - from erpnext.accounts.doctype.account.test_account import create_account - from erpnext.accounts.doctype.opening_invoice_creation_tool.test_opening_invoice_creation_tool import ( - make_customer, - ) - from erpnext.accounts.doctype.party_link.party_link import create_party_link - from erpnext.buying.doctype.supplier.test_supplier import create_supplier - from erpnext.setup.utils import get_exchange_rate - - creditors = create_account( - account_name="Creditors USD", - parent_account="Accounts Payable - _TC", - company="_Test Company", - account_currency="USD", - account_type="Payable", - ) - debtors = create_account( - account_name="Debtors USD", - parent_account="Accounts Receivable - _TC", - company="_Test Company", - account_currency="USD", - account_type="Receivable", - ) - - # create a customer - customer = make_customer(customer="_Test Common Party USD") - cust_doc = frappe.get_doc("Customer", customer) - cust_doc.default_currency = "USD" - test_account_details = { - "company": "_Test Company", - "account": debtors, - } - cust_doc.append("accounts", test_account_details) - cust_doc.save() - - # create a supplier - supplier = create_supplier(supplier_name="_Test Common Party USD").name - supp_doc = frappe.get_doc("Supplier", supplier) - supp_doc.default_currency = "USD" - test_account_details = { - "company": "_Test Company", - "account": creditors, - } - supp_doc.append("accounts", test_account_details) - supp_doc.save() - - # create a party link between customer & supplier - create_party_link("Supplier", supplier, customer) - - # create a sales invoice - si = create_sales_invoice( - customer=customer, - currency="USD", - conversion_rate=get_exchange_rate("USD", "INR"), - debit_to=debtors, - do_not_save=1, - ) - si.party_account_currency = "USD" - si.save() - si.submit() - - # check outstanding of sales invoice - si.reload() - self.assertEqual(si.status, "Paid") - self.assertEqual(flt(si.outstanding_amount), 0.0) - - # check creation of journal entry - jv = frappe.get_all( - "Journal Entry Account", - { - "account": si.debit_to, - "party_type": "Customer", - "party": si.customer, - "reference_type": si.doctype, - "reference_name": si.name, - }, - pluck="credit_in_account_currency", - ) - self.assertTrue(jv) - self.assertEqual(jv[0], si.grand_total) - - @IntegrationTestCase.change_settings("Accounts Settings", {"enable_common_party_accounting": True}) + @change_settings("Accounts Settings", {"enable_common_party_accounting": True}) def test_common_party_with_different_currency_in_debtor_and_creditor(self): from erpnext.accounts.doctype.account.test_account import create_account from erpnext.accounts.doctype.opening_invoice_creation_tool.test_opening_invoice_creation_tool import ( @@ -4301,34 +4217,6 @@ class TestSalesInvoice(FrappeTestCase): self.assertTrue(jv) self.assertEqual(jv[0], si.grand_total) - def test_invoice_remarks(self): - si = frappe.copy_doc(self.globalTestRecords["Sales Invoice"][0]) - si.po_no = "Test PO" - si.po_date = nowdate() - si.save() - si.submit() - self.assertEqual(si.remarks, f"Against Customer Order Test PO dated {format_date(nowdate())}") - - def test_gl_voucher_subtype(self): - si = create_sales_invoice() - gl_entries = frappe.get_all( - "GL Entry", - filters={"voucher_type": "Sales Invoice", "voucher_no": si.name}, - pluck="voucher_subtype", - ) - - self.assertTrue(all([x == "Sales Invoice" for x in gl_entries])) - - si = create_sales_invoice(is_return=1, qty=-1) - gl_entries = frappe.get_all( - "GL Entry", - filters={"voucher_type": "Sales Invoice", "voucher_no": si.name}, - pluck="voucher_subtype", - ) - - self.assertTrue(all([x == "Credit Note" for x in gl_entries])) - ->>>>>>> e371f68d66 (fix: handle multi currency in common party journal entry) def set_advance_flag(company, flag, default_account): frappe.db.set_value( From ae93f7f967e2b4da1c76552a794bce118827b57f Mon Sep 17 00:00:00 2001 From: Sagar Vora Date: Mon, 2 Dec 2024 14:54:29 +0530 Subject: [PATCH 0593/1614] fix: set correct unallocated amount in Payment Entry (#43958) * fix: set correct unallocated amount in Payment Entry * fix: add checkbox and other logic fix * fix: patch to set is_exchange_gain_loss in Payment Entry deductions * fix: consider deductions except exch. gain/loss * fix: set exchange gain loss in payment entry * fix: separate function to set exchange gain loss * fix: failing test cases * fix: add cash disc. row first * fix: review changes * fix: changes as per review * fix: failing test cases * fix: review * fix: wait for request to complete before updating exchange gain loss * fix: review --------- Co-authored-by: vishakhdesai Co-authored-by: ruthra kumar (cherry picked from commit 7cc111f7907b47a177dffc4bc40992281d8946b3) # Conflicts: # erpnext/accounts/doctype/payment_entry_deduction/payment_entry_deduction.json # erpnext/patches.txt --- .../test_exchange_rate_revaluation.py | 4 +- .../doctype/payment_entry/payment_entry.js | 242 +++++++++++------- .../doctype/payment_entry/payment_entry.json | 8 +- .../doctype/payment_entry/payment_entry.py | 135 +++++++--- .../payment_entry/test_payment_entry.py | 38 +-- .../payment_entry_deduction.json | 13 + .../payment_entry_deduction.py | 1 + .../test_unreconcile_payment.py | 2 + erpnext/accounts/test/test_utils.py | 8 +- erpnext/patches.txt | 6 + ...e_gain_loss_in_payment_entry_deductions.py | 22 ++ 11 files changed, 304 insertions(+), 175 deletions(-) create mode 100644 erpnext/patches/v15_0/set_is_exchange_gain_loss_in_payment_entry_deductions.py diff --git a/erpnext/accounts/doctype/exchange_rate_revaluation/test_exchange_rate_revaluation.py b/erpnext/accounts/doctype/exchange_rate_revaluation/test_exchange_rate_revaluation.py index 51053f1f68c..3eef6ab3832 100644 --- a/erpnext/accounts/doctype/exchange_rate_revaluation/test_exchange_rate_revaluation.py +++ b/erpnext/accounts/doctype/exchange_rate_revaluation/test_exchange_rate_revaluation.py @@ -188,7 +188,7 @@ class TestExchangeRateRevaluation(AccountsTestMixin, FrappeTestCase): pe = get_payment_entry(si.doctype, si.name) pe.paid_amount = 95 - pe.source_exchange_rate = 84.211 + pe.source_exchange_rate = 84.2105 pe.received_amount = 8000 pe.references = [] pe.save().submit() @@ -229,7 +229,7 @@ class TestExchangeRateRevaluation(AccountsTestMixin, FrappeTestCase): row = next(x for x in je.accounts if x.account == self.debtors_usd) self.assertEqual(flt(row.credit_in_account_currency, precision), 5.0) # in USD row = next(x for x in je.accounts if x.account != self.debtors_usd) - self.assertEqual(flt(row.debit_in_account_currency, precision), 421.06) # in INR + self.assertEqual(flt(row.debit_in_account_currency, precision), 421.05) # in INR # total_debit and total_credit will be 0.0, as JV is posting only to account currency fields self.assertEqual(flt(je.total_debit, precision), 0.0) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.js b/erpnext/accounts/doctype/payment_entry/payment_entry.js index 2d27cccfff8..f2d11ba9ff3 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.js +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.js @@ -324,11 +324,6 @@ frappe.ui.form.on("Payment Entry", { "write_off_difference_amount", frm.doc.difference_amount && frm.doc.party && frm.doc.total_allocated_amount > party_amount ); - - frm.toggle_display( - "set_exchange_gain_loss", - frm.doc.paid_amount && frm.doc.received_amount && frm.doc.difference_amount - ); }, set_dynamic_labels: function (frm) { @@ -1119,36 +1114,34 @@ frappe.ui.form.on("Payment Entry", { }, set_unallocated_amount: function (frm) { - var unallocated_amount = 0; - var total_deductions = frappe.utils.sum( - $.map(frm.doc.deductions || [], function (d) { - return flt(d.amount); - }) - ); + let unallocated_amount = 0; + let deductions_to_consider = 0; + + for (const row of frm.doc.deductions || []) { + if (!row.is_exchange_gain_loss) deductions_to_consider += flt(row.amount); + } + const included_taxes = get_included_taxes(frm); if (frm.doc.party) { if ( frm.doc.payment_type == "Receive" && - frm.doc.base_total_allocated_amount < frm.doc.base_received_amount + total_deductions && - frm.doc.total_allocated_amount < - frm.doc.paid_amount + total_deductions / frm.doc.source_exchange_rate - ) { - unallocated_amount = - (frm.doc.base_received_amount + - total_deductions - - flt(frm.doc.base_total_taxes_and_charges) - - frm.doc.base_total_allocated_amount) / - frm.doc.source_exchange_rate; - } else if ( - frm.doc.payment_type == "Pay" && - frm.doc.base_total_allocated_amount < frm.doc.base_paid_amount - total_deductions && - frm.doc.total_allocated_amount < - frm.doc.received_amount + total_deductions / frm.doc.target_exchange_rate + frm.doc.base_total_allocated_amount < frm.doc.base_paid_amount + deductions_to_consider ) { unallocated_amount = (frm.doc.base_paid_amount + - flt(frm.doc.base_total_taxes_and_charges) - - (total_deductions + frm.doc.base_total_allocated_amount)) / + deductions_to_consider - + frm.doc.base_total_allocated_amount - + included_taxes) / + frm.doc.source_exchange_rate; + } else if ( + frm.doc.payment_type == "Pay" && + frm.doc.base_total_allocated_amount < frm.doc.base_received_amount - deductions_to_consider + ) { + unallocated_amount = + (frm.doc.base_received_amount - + deductions_to_consider - + frm.doc.base_total_allocated_amount - + included_taxes) / frm.doc.target_exchange_rate; } } @@ -1242,77 +1235,85 @@ frappe.ui.form.on("Payment Entry", { }, write_off_difference_amount: function (frm) { - frm.events.set_deductions_entry(frm, "write_off_account"); + frm.events.set_write_off_deduction(frm); }, - set_exchange_gain_loss: function (frm) { - frm.events.set_deductions_entry(frm, "exchange_gain_loss_account"); + base_paid_amount: function (frm) { + frm.events.set_exchange_gain_loss_deduction(frm); }, - set_deductions_entry: function (frm, account) { - if (frm.doc.difference_amount) { - frappe.call({ - method: "erpnext.accounts.doctype.payment_entry.payment_entry.get_company_defaults", - args: { - company: frm.doc.company, - }, - callback: function (r, rt) { - if (r.message) { - const write_off_row = $.map(frm.doc["deductions"] || [], function (t) { - return t.account == r.message[account] ? t : null; - }); + base_received_amount: function (frm) { + frm.events.set_exchange_gain_loss_deduction(frm); + }, - const difference_amount = flt( - frm.doc.difference_amount, - precision("difference_amount") - ); + set_exchange_gain_loss_deduction: async function (frm) { + // wait for allocate_party_amount_against_ref_docs to finish + await frappe.after_ajax(); + const base_paid_amount = frm.doc.base_paid_amount || 0; + const base_received_amount = frm.doc.base_received_amount || 0; + const exchange_gain_loss = flt( + base_paid_amount - base_received_amount, + get_deduction_amount_precision() + ); - const add_deductions = (details) => { - let row = null; - if (!write_off_row.length && difference_amount) { - row = frm.add_child("deductions"); - row.account = details[account]; - row.cost_center = details["cost_center"]; - } else { - row = write_off_row[0]; - } - - if (row) { - row.amount = flt(row.amount) + difference_amount; - } else { - frappe.msgprint(__("No gain or loss in the exchange rate")); - } - refresh_field("deductions"); - }; - - if (!r.message[account]) { - frappe.prompt( - { - label: __("Please Specify Account"), - fieldname: account, - fieldtype: "Link", - options: "Account", - get_query: () => ({ - filters: { - company: frm.doc.company, - }, - }), - }, - (values) => { - const details = Object.assign({}, r.message, values); - add_deductions(details); - }, - __(frappe.unscrub(account)) - ); - } else { - add_deductions(r.message); - } - - frm.events.set_unallocated_amount(frm); - } - }, - }); + if (!exchange_gain_loss) { + frm.events.delete_exchange_gain_loss(frm); + return; } + + const account_fieldname = "exchange_gain_loss_account"; + let row = (frm.doc.deductions || []).find((t) => t.is_exchange_gain_loss); + + if (!row) { + const response = await get_company_defaults(frm.doc.company); + + const account = + response.message?.[account_fieldname] || + (await prompt_for_missing_account(frm, account_fieldname)); + + row = frm.add_child("deductions"); + row.account = account; + row.cost_center = response.message?.cost_center; + row.is_exchange_gain_loss = 1; + } + + row.amount = exchange_gain_loss; + frm.refresh_field("deductions"); + frm.events.set_unallocated_amount(frm); + }, + + delete_exchange_gain_loss: function (frm) { + const exchange_gain_loss_row = (frm.doc.deductions || []).find((row) => row.is_exchange_gain_loss); + + if (!exchange_gain_loss_row) return; + + exchange_gain_loss_row.amount = 0; + frm.get_field("deductions").grid.grid_rows[exchange_gain_loss_row.idx - 1].remove(); + frm.refresh_field("deductions"); + }, + + set_write_off_deduction: async function (frm) { + const difference_amount = flt(frm.doc.difference_amount, get_deduction_amount_precision()); + if (!difference_amount) return; + + const account_fieldname = "write_off_account"; + const response = await get_company_defaults(frm.doc.company); + const write_off_account = + response.message?.[account_fieldname] || + (await prompt_for_missing_account(frm, account_fieldname)); + + if (!write_off_account) return; + + let row = (frm.doc["deductions"] || []).find((t) => t.account == write_off_account); + if (!row) { + row = frm.add_child("deductions"); + row.account = write_off_account; + row.cost_center = response.message?.cost_center; + } + + row.amount = flt(row.amount) + difference_amount; + frm.refresh_field("deductions"); + frm.events.set_unallocated_amount(frm); }, bank_account: function (frm) { @@ -1778,6 +1779,13 @@ frappe.ui.form.on("Advance Taxes and Charges", { }); frappe.ui.form.on("Payment Entry Deduction", { + before_deductions_remove: function (doc, cdt, cdn) { + const row = frappe.get_doc(cdt, cdn); + if (row.is_exchange_gain_loss && row.amount) { + frappe.throw(__("Cannot delete Exchange Gain/Loss row")); + } + }, + amount: function (frm) { frm.events.set_unallocated_amount(frm); }, @@ -1799,3 +1807,53 @@ function set_default_party_type(frm) { if (party_type) frm.set_value("party_type", party_type); } + +function get_included_taxes(frm) { + let included_taxes = 0; + for (const tax of frm.doc.taxes) { + if (!tax.included_in_paid_amount) continue; + + if (tax.add_deduct_tax == "Add") { + included_taxes += tax.base_tax_amount; + } else { + included_taxes -= tax.base_tax_amount; + } + } + + return included_taxes; +} + +function get_company_defaults(company) { + return frappe.call({ + method: "erpnext.accounts.doctype.payment_entry.payment_entry.get_company_defaults", + args: { + company: company, + }, + }); +} + +function prompt_for_missing_account(frm, account) { + return new Promise((resolve) => { + const dialog = frappe.prompt( + { + label: __(frappe.unscrub(account)), + fieldname: account, + fieldtype: "Link", + options: "Account", + get_query: () => ({ + filters: { + company: frm.doc.company, + }, + }), + }, + (values) => resolve(values?.[account]), + __("Please Specify Account") + ); + + dialog.on_hide = () => resolve(""); + }); +} + +function get_deduction_amount_precision() { + return frappe.meta.get_field_precision(frappe.meta.get_field("Payment Entry Deduction", "amount")); +} diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.json b/erpnext/accounts/doctype/payment_entry/payment_entry.json index d420bcca342..69debbec5c7 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.json +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.json @@ -56,7 +56,6 @@ "section_break_34", "total_allocated_amount", "base_total_allocated_amount", - "set_exchange_gain_loss", "column_break_36", "unallocated_amount", "difference_amount", @@ -390,11 +389,6 @@ "print_hide": 1, "read_only": 1 }, - { - "fieldname": "set_exchange_gain_loss", - "fieldtype": "Button", - "label": "Set Exchange Gain / Loss" - }, { "fieldname": "column_break_36", "fieldtype": "Column Break" @@ -801,7 +795,7 @@ "table_fieldname": "payment_entries" } ], - "modified": "2024-05-31 17:07:06.197249", + "modified": "2024-11-07 11:19:19.320883", "modified_by": "Administrator", "module": "Accounts", "name": "Payment Entry", diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index 5ebe1dd8754..7e3d8a5833b 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -893,6 +893,7 @@ class PaymentEntry(AccountsController): self.set_amounts_in_company_currency() self.set_total_allocated_amount() self.set_unallocated_amount() + self.set_exchange_gain_loss() self.set_difference_amount() def validate_amounts(self): @@ -988,10 +989,10 @@ class PaymentEntry(AccountsController): if d.exchange_rate is None: d.exchange_rate = 1 - allocated_amount_in_pe_exchange_rate = flt( + allocated_amount_in_ref_exchange_rate = flt( flt(d.allocated_amount) * flt(d.exchange_rate), self.precision("base_paid_amount") ) - d.exchange_gain_loss = base_allocated_amount - allocated_amount_in_pe_exchange_rate + d.exchange_gain_loss = base_allocated_amount - allocated_amount_in_ref_exchange_rate return base_allocated_amount def set_total_allocated_amount(self): @@ -1009,29 +1010,80 @@ class PaymentEntry(AccountsController): def set_unallocated_amount(self): self.unallocated_amount = 0 - if self.party: - total_deductions = sum(flt(d.amount) for d in self.get("deductions")) - included_taxes = self.get_included_taxes() - if ( - self.payment_type == "Receive" - and self.base_total_allocated_amount < self.base_received_amount + total_deductions - and self.total_allocated_amount - < flt(self.paid_amount) + (total_deductions / self.source_exchange_rate) - ): - self.unallocated_amount = ( - self.base_received_amount + total_deductions - self.base_total_allocated_amount - ) / self.source_exchange_rate - self.unallocated_amount -= included_taxes - elif ( - self.payment_type == "Pay" - and self.base_total_allocated_amount < (self.base_paid_amount - total_deductions) - and self.total_allocated_amount - < flt(self.received_amount) + (total_deductions / self.target_exchange_rate) - ): - self.unallocated_amount = ( - self.base_paid_amount - (total_deductions + self.base_total_allocated_amount) - ) / self.target_exchange_rate - self.unallocated_amount -= included_taxes + if not self.party: + return + + deductions_to_consider = sum( + flt(d.amount) for d in self.get("deductions") if not d.is_exchange_gain_loss + ) + included_taxes = self.get_included_taxes() + + if self.payment_type == "Receive" and self.base_total_allocated_amount < ( + self.base_paid_amount + deductions_to_consider + ): + self.unallocated_amount = ( + self.base_paid_amount + + deductions_to_consider + - self.base_total_allocated_amount + - included_taxes + ) / self.source_exchange_rate + elif self.payment_type == "Pay" and self.base_total_allocated_amount < ( + self.base_received_amount - deductions_to_consider + ): + self.unallocated_amount = ( + self.base_received_amount + - deductions_to_consider + - self.base_total_allocated_amount + - included_taxes + ) / self.target_exchange_rate + + def set_exchange_gain_loss(self): + exchange_gain_loss = flt( + self.base_paid_amount - self.base_received_amount, + self.precision("amount", "deductions"), + ) + + exchange_gain_loss_rows = [row for row in self.get("deductions") if row.is_exchange_gain_loss] + exchange_gain_loss_row = exchange_gain_loss_rows.pop(0) if exchange_gain_loss_rows else None + + for row in exchange_gain_loss_rows: + self.remove(row) + + if not exchange_gain_loss: + if exchange_gain_loss_row: + self.remove(exchange_gain_loss_row) + + return + + if not exchange_gain_loss_row: + values = frappe.get_cached_value( + "Company", self.company, ("exchange_gain_loss_account", "cost_center"), as_dict=True + ) + + for fieldname, value in values.items(): + if value: + continue + + label = _(frappe.get_meta("Company").get_label(fieldname)) + return frappe.msgprint( + _("Please set {0} in Company {1} to account for Exchange Gain / Loss").format( + label, get_link_to_form("Company", self.company) + ), + title=_("Missing Default in Company"), + indicator="red" if self.docstatus.is_submitted() else "yellow", + raise_exception=self.docstatus.is_submitted(), + ) + + exchange_gain_loss_row = self.append( + "deductions", + { + "account": values.exchange_gain_loss_account, + "cost_center": values.cost_center, + "is_exchange_gain_loss": 1, + }, + ) + + exchange_gain_loss_row.amount = exchange_gain_loss def set_difference_amount(self): base_unallocated_amount = flt(self.unallocated_amount) * ( @@ -1059,11 +1111,13 @@ class PaymentEntry(AccountsController): def get_included_taxes(self): included_taxes = 0 for tax in self.get("taxes"): - if tax.included_in_paid_amount: - if tax.add_deduct_tax == "Add": - included_taxes += tax.base_tax_amount - else: - included_taxes -= tax.base_tax_amount + if not tax.included_in_paid_amount: + continue + + if tax.add_deduct_tax == "Add": + included_taxes += tax.base_tax_amount + else: + included_taxes -= tax.base_tax_amount return included_taxes @@ -1912,8 +1966,8 @@ class PaymentEntry(AccountsController): def get_matched_payment_request_of_references(references=None): """ Get those `Payment Requests` which are matched with `References`.\n - - Amount must be same. - - Only single `Payment Request` available for this amount. + - Amount must be same. + - Only single `Payment Request` available for this amount. Example: [(reference_doctype, reference_name, allocated_amount, payment_request), ...] """ @@ -2015,7 +2069,7 @@ def get_outstanding_of_references_with_payment_term(references=None): def get_outstanding_of_references_with_no_payment_term(references): """ Fetch outstanding amount of `References` which have no `Payment Term` set.\n - - Fetch outstanding amount from `References` it self. + - Fetch outstanding amount from `References` it self. Note: `None` is used for allocation of `Payment Request` Example: {(reference_doctype, reference_name, None): outstanding_amount, ...} @@ -2829,9 +2883,6 @@ def get_payment_entry( update_accounting_dimensions(pe, doc) if party_account and bank: - pe.set_exchange_rate(ref_doc=doc) - pe.set_amounts() - if discount_amount: base_total_discount_loss = 0 if frappe.db.get_single_value("Accounts Settings", "book_tax_discount_loss"): @@ -2841,7 +2892,8 @@ def get_payment_entry( pe, doc, discount_amount, base_total_discount_loss, party_account_currency ) - pe.set_difference_amount() + pe.set_exchange_rate(ref_doc=doc) + pe.set_amounts() # If PE is created from PR directly, then no need to find open PRs for the references if not created_from_payment_request: @@ -2853,7 +2905,7 @@ def get_payment_entry( def get_open_payment_requests_for_references(references=None): """ Fetch all unpaid Payment Requests for the references. \n - - Each reference can have multiple Payment Requests. \n + - Each reference can have multiple Payment Requests. \n Example: {("Sales Invoice", "SINV-00001"): {"PREQ-00001": 1000, "PREQ-00002": 2000}} """ @@ -3188,13 +3240,14 @@ def set_pending_discount_loss(pe, doc, discount_amount, base_total_discount_loss book_tax_loss = frappe.db.get_single_value("Accounts Settings", "book_tax_discount_loss") account_type = "round_off_account" if book_tax_loss else "default_discount_account" - pe.set_gain_or_loss( - account_details={ + pe.append( + "deductions", + { "account": frappe.get_cached_value("Company", pe.company, account_type), "cost_center": pe.cost_center or frappe.get_cached_value("Company", pe.company, "cost_center"), "amount": discount_amount * positive_negative, - } + }, ) diff --git a/erpnext/accounts/doctype/payment_entry/test_payment_entry.py b/erpnext/accounts/doctype/payment_entry/test_payment_entry.py index 8758110534f..312628d9f97 100644 --- a/erpnext/accounts/doctype/payment_entry/test_payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/test_payment_entry.py @@ -479,16 +479,9 @@ class TestPaymentEntry(FrappeTestCase): self.assertEqual(pe.deductions[0].account, "Write Off - _TC") # Exchange loss - self.assertEqual(pe.difference_amount, 300.0) - - pe.append( - "deductions", - { - "account": "_Test Exchange Gain/Loss - _TC", - "cost_center": "_Test Cost Center - _TC", - "amount": 300.0, - }, - ) + self.assertEqual(pe.deductions[-1].amount, 300.0) + pe.deductions[-1].account = "_Test Exchange Gain/Loss - _TC" + pe.deductions[-1].cost_center = "_Test Cost Center - _TC" pe.insert() pe.submit() @@ -552,16 +545,10 @@ class TestPaymentEntry(FrappeTestCase): pe.reference_no = "1" pe.reference_date = "2016-01-01" - self.assertEqual(pe.difference_amount, 100) + self.assertEqual(pe.deductions[0].amount, 100) + pe.deductions[0].account = "_Test Exchange Gain/Loss - _TC" + pe.deductions[0].cost_center = "_Test Cost Center - _TC" - pe.append( - "deductions", - { - "account": "_Test Exchange Gain/Loss - _TC", - "cost_center": "_Test Cost Center - _TC", - "amount": 100, - }, - ) pe.insert() pe.submit() @@ -654,16 +641,9 @@ class TestPaymentEntry(FrappeTestCase): pe.set_exchange_rate() pe.set_amounts() - self.assertEqual(pe.difference_amount, 500) - - pe.append( - "deductions", - { - "account": "_Test Exchange Gain/Loss - _TC", - "cost_center": "_Test Cost Center - _TC", - "amount": 500, - }, - ) + self.assertEqual(pe.deductions[0].amount, 500) + pe.deductions[0].account = "_Test Exchange Gain/Loss - _TC" + pe.deductions[0].cost_center = "_Test Cost Center - _TC" pe.insert() pe.submit() diff --git a/erpnext/accounts/doctype/payment_entry_deduction/payment_entry_deduction.json b/erpnext/accounts/doctype/payment_entry_deduction/payment_entry_deduction.json index 1c31829f0ea..82e871d0fff 100644 --- a/erpnext/accounts/doctype/payment_entry_deduction/payment_entry_deduction.json +++ b/erpnext/accounts/doctype/payment_entry_deduction/payment_entry_deduction.json @@ -9,6 +9,7 @@ "cost_center", "amount", "column_break_2", + "is_exchange_gain_loss", "description" ], "fields": [ @@ -45,12 +46,24 @@ "fieldname": "description", "fieldtype": "Small Text", "label": "Description" + }, + { + "default": "0", + "depends_on": "eval:doc.is_exchange_gain_loss", + "fieldname": "is_exchange_gain_loss", + "fieldtype": "Check", + "label": "Is Exchange Gain / Loss?", + "read_only": 1 } ], "index_web_pages_for_search": 1, "istable": 1, "links": [], +<<<<<<< HEAD "modified": "2023-03-06 07:11:57.739619", +======= + "modified": "2024-11-05 16:07:47.307971", +>>>>>>> 7cc111f790 (fix: set correct unallocated amount in Payment Entry (#43958)) "modified_by": "Administrator", "module": "Accounts", "name": "Payment Entry Deduction", diff --git a/erpnext/accounts/doctype/payment_entry_deduction/payment_entry_deduction.py b/erpnext/accounts/doctype/payment_entry_deduction/payment_entry_deduction.py index fc67c526b28..ae4134fc27a 100644 --- a/erpnext/accounts/doctype/payment_entry_deduction/payment_entry_deduction.py +++ b/erpnext/accounts/doctype/payment_entry_deduction/payment_entry_deduction.py @@ -18,6 +18,7 @@ class PaymentEntryDeduction(Document): amount: DF.Currency cost_center: DF.Link description: DF.SmallText | None + is_exchange_gain_loss: DF.Check parent: DF.Data parentfield: DF.Data parenttype: DF.Data diff --git a/erpnext/accounts/doctype/unreconcile_payment/test_unreconcile_payment.py b/erpnext/accounts/doctype/unreconcile_payment/test_unreconcile_payment.py index 3d222b22ff8..c058dbfa0b8 100644 --- a/erpnext/accounts/doctype/unreconcile_payment/test_unreconcile_payment.py +++ b/erpnext/accounts/doctype/unreconcile_payment/test_unreconcile_payment.py @@ -262,6 +262,7 @@ class TestUnreconcilePayment(AccountsTestMixin, FrappeTestCase): pe1.paid_from = self.debtors_usd pe1.paid_from_account_currency = "USD" pe1.source_exchange_rate = 75 + pe1.paid_amount = 100 pe1.received_amount = 75 * 100 pe1.save() # Allocate payment against both invoices @@ -279,6 +280,7 @@ class TestUnreconcilePayment(AccountsTestMixin, FrappeTestCase): pe2.paid_from = self.debtors_usd pe2.paid_from_account_currency = "USD" pe2.source_exchange_rate = 75 + pe2.paid_amount = 100 pe2.received_amount = 75 * 100 pe2.save() # Allocate payment against both invoices diff --git a/erpnext/accounts/test/test_utils.py b/erpnext/accounts/test/test_utils.py index 59cbc11794f..5e108dee9b5 100644 --- a/erpnext/accounts/test/test_utils.py +++ b/erpnext/accounts/test/test_utils.py @@ -92,14 +92,14 @@ class TestUtils(unittest.TestCase): payment_entry.deductions = [] payment_entry.save() - # below is the difference between base_received_amount and base_paid_amount - self.assertEqual(payment_entry.difference_amount, -4855.0) + # below is the difference between base_paid_amount and base_received_amount (exchange gain) + self.assertEqual(payment_entry.deductions[0].amount, -4855.0) payment_entry.target_exchange_rate = 62.9 payment_entry.save() - # below is due to change in exchange rate - self.assertEqual(payment_entry.references[0].exchange_gain_loss, -4855.0) + # after changing the exchange rate, there is no exchange gain / loss + self.assertEqual(payment_entry.deductions, []) payment_entry.references = [] self.assertEqual(payment_entry.difference_amount, 0.0) diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 2716aa9883b..1828cfa031f 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -380,6 +380,12 @@ erpnext.patches.v15_0.add_disassembly_order_stock_entry_type #1 erpnext.patches.v15_0.set_standard_stock_entry_type erpnext.patches.v15_0.link_purchase_item_to_asset_doc erpnext.patches.v14_0.update_currency_exchange_settings_for_frankfurter +<<<<<<< HEAD erpnext.patches.v15_0.update_task_assignee_email_field_in_asset_maintenance_log erpnext.patches.v15_0.update_sub_voucher_type_in_gl_entries erpnext.patches.v14_0.update_stock_uom_in_work_order_item +======= +erpnext.patches.v15_0.migrate_old_item_wise_tax_detail_data_format +erpnext.patches.v15_0.set_is_exchange_gain_loss_in_payment_entry_deductions +erpnext.patches.v14_0.update_stock_uom_in_work_order_item +>>>>>>> 7cc111f790 (fix: set correct unallocated amount in Payment Entry (#43958)) diff --git a/erpnext/patches/v15_0/set_is_exchange_gain_loss_in_payment_entry_deductions.py b/erpnext/patches/v15_0/set_is_exchange_gain_loss_in_payment_entry_deductions.py new file mode 100644 index 00000000000..9ffe272fd5e --- /dev/null +++ b/erpnext/patches/v15_0/set_is_exchange_gain_loss_in_payment_entry_deductions.py @@ -0,0 +1,22 @@ +import frappe + + +def execute(): + default_exchange_gain_loss_accounts = frappe.get_all( + "Company", + filters={"exchange_gain_loss_account": ["!=", ""]}, + pluck="exchange_gain_loss_account", + ) + + if not default_exchange_gain_loss_accounts: + return + + payment_entry = frappe.qb.DocType("Payment Entry") + payment_entry_deduction = frappe.qb.DocType("Payment Entry Deduction") + + frappe.qb.update(payment_entry_deduction).set(payment_entry_deduction.is_exchange_gain_loss, 1).join( + payment_entry, + ).on(payment_entry.name == payment_entry_deduction.parent).where( + (payment_entry.paid_to_account_currency != payment_entry.paid_from_account_currency) + & (payment_entry_deduction.account.isin(default_exchange_gain_loss_accounts)) + ).run() From c1579789121d8fb93e352a55f45c80aa1c6771b6 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 2 Dec 2024 14:57:54 +0530 Subject: [PATCH 0594/1614] chore: resolve conflicts --- .../payment_entry_deduction/payment_entry_deduction.json | 4 ---- erpnext/patches.txt | 5 ----- 2 files changed, 9 deletions(-) diff --git a/erpnext/accounts/doctype/payment_entry_deduction/payment_entry_deduction.json b/erpnext/accounts/doctype/payment_entry_deduction/payment_entry_deduction.json index 82e871d0fff..e47b51ae028 100644 --- a/erpnext/accounts/doctype/payment_entry_deduction/payment_entry_deduction.json +++ b/erpnext/accounts/doctype/payment_entry_deduction/payment_entry_deduction.json @@ -59,11 +59,7 @@ "index_web_pages_for_search": 1, "istable": 1, "links": [], -<<<<<<< HEAD - "modified": "2023-03-06 07:11:57.739619", -======= "modified": "2024-11-05 16:07:47.307971", ->>>>>>> 7cc111f790 (fix: set correct unallocated amount in Payment Entry (#43958)) "modified_by": "Administrator", "module": "Accounts", "name": "Payment Entry Deduction", diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 1828cfa031f..f53769155bd 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -380,12 +380,7 @@ erpnext.patches.v15_0.add_disassembly_order_stock_entry_type #1 erpnext.patches.v15_0.set_standard_stock_entry_type erpnext.patches.v15_0.link_purchase_item_to_asset_doc erpnext.patches.v14_0.update_currency_exchange_settings_for_frankfurter -<<<<<<< HEAD erpnext.patches.v15_0.update_task_assignee_email_field_in_asset_maintenance_log erpnext.patches.v15_0.update_sub_voucher_type_in_gl_entries erpnext.patches.v14_0.update_stock_uom_in_work_order_item -======= -erpnext.patches.v15_0.migrate_old_item_wise_tax_detail_data_format erpnext.patches.v15_0.set_is_exchange_gain_loss_in_payment_entry_deductions -erpnext.patches.v14_0.update_stock_uom_in_work_order_item ->>>>>>> 7cc111f790 (fix: set correct unallocated amount in Payment Entry (#43958)) From 5c6d9c98122ab0d2a9278455e97c776cf49e8a66 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 2 Dec 2024 15:37:38 +0530 Subject: [PATCH 0595/1614] refactor(UI): Rearranging fields under new sections (cherry picked from commit 7244754d28762c7c6347812529b8e28ab24475cc) --- erpnext/setup/doctype/company/company.json | 53 ++++++++++++++++++---- 1 file changed, 43 insertions(+), 10 deletions(-) diff --git a/erpnext/setup/doctype/company/company.json b/erpnext/setup/doctype/company/company.json index 4b07037ad3e..271b440fbda 100644 --- a/erpnext/setup/doctype/company/company.json +++ b/erpnext/setup/doctype/company/company.json @@ -48,24 +48,30 @@ "default_bank_account", "default_cash_account", "default_receivable_account", - "round_off_account", - "round_off_for_opening", - "round_off_cost_center", + "default_payable_account", "write_off_account", - "exchange_gain_loss_account", - "unrealized_exchange_gain_loss_account", "unrealized_profit_loss_account", "column_break0", "allow_account_creation_against_child_company", - "default_payable_account", "default_expense_account", "default_income_account", - "default_deferred_revenue_account", - "default_deferred_expense_account", "default_discount_account", "payment_terms", "cost_center", "default_finance_book", + "exchange_gain__loss_section", + "exchange_gain_loss_account", + "column_break_sttp", + "unrealized_exchange_gain_loss_account", + "round_off_section", + "round_off_account", + "round_off_cost_center", + "column_break_jqfo", + "round_off_for_opening", + "deferred_accounting_section", + "default_deferred_revenue_account", + "column_break_dcdl", + "default_deferred_expense_account", "advance_payments_section", "book_advance_payments_in_separate_party_account", "reconcile_on_advance_payment_date", @@ -287,7 +293,7 @@ { "fieldname": "default_settings", "fieldtype": "Section Break", - "label": "Accounts Settings", + "label": "Default Accounts", "oldfieldtype": "Section Break" }, { @@ -808,6 +814,33 @@ "fieldtype": "Link", "label": "Round Off for Opening", "options": "Account" + }, + { + "fieldname": "exchange_gain__loss_section", + "fieldtype": "Section Break", + "label": "Exchange Gain / Loss" + }, + { + "fieldname": "round_off_section", + "fieldtype": "Section Break", + "label": "Round Off" + }, + { + "fieldname": "deferred_accounting_section", + "fieldtype": "Section Break", + "label": "Deferred Accounting" + }, + { + "fieldname": "column_break_sttp", + "fieldtype": "Column Break" + }, + { + "fieldname": "column_break_jqfo", + "fieldtype": "Column Break" + }, + { + "fieldname": "column_break_dcdl", + "fieldtype": "Column Break" } ], "icon": "fa fa-building", @@ -815,7 +848,7 @@ "image_field": "company_logo", "is_tree": 1, "links": [], - "modified": "2024-08-02 11:34:46.785377", + "modified": "2024-12-02 15:37:32.723176", "modified_by": "Administrator", "module": "Setup", "name": "Company", From 05795af4716990fb4e3c104dbf4a6721fb7f7afa Mon Sep 17 00:00:00 2001 From: Ninad1306 Date: Wed, 27 Nov 2024 12:05:39 +0530 Subject: [PATCH 0596/1614] fix: always set sales incoming rate for internal transfers (cherry picked from commit d049c978843ebf3e974aea8559d12d8024fd6ca8) --- erpnext/controllers/buying_controller.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/controllers/buying_controller.py b/erpnext/controllers/buying_controller.py index e9e7ef62670..6020dce0761 100644 --- a/erpnext/controllers/buying_controller.py +++ b/erpnext/controllers/buying_controller.py @@ -356,14 +356,14 @@ class BuyingController(SubcontractingController): if not self.is_internal_transfer(): return + self.set_sales_incoming_rate_for_internal_transfer() + allow_at_arms_length_price = frappe.get_cached_value( "Stock Settings", None, "allow_internal_transfer_at_arms_length_price" ) if allow_at_arms_length_price: return - self.set_sales_incoming_rate_for_internal_transfer() - for d in self.get("items"): d.discount_percentage = 0.0 d.discount_amount = 0.0 From 558d49b3d3c1044a255e0c26d89954d7083484f7 Mon Sep 17 00:00:00 2001 From: Ninad1306 Date: Wed, 27 Nov 2024 12:06:11 +0530 Subject: [PATCH 0597/1614] test: validate buying workflow (cherry picked from commit 94d3fc9fde78220b7924d14b858204785480018a) --- .../tests/test_accounts_controller.py | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/erpnext/controllers/tests/test_accounts_controller.py b/erpnext/controllers/tests/test_accounts_controller.py index b2f8fce3d31..289a955f980 100644 --- a/erpnext/controllers/tests/test_accounts_controller.py +++ b/erpnext/controllers/tests/test_accounts_controller.py @@ -807,6 +807,7 @@ class TestAccountsController(FrappeTestCase): @change_settings("Stock Settings", {"allow_internal_transfer_at_arms_length_price": 1}) def test_16_internal_transfer_at_arms_length_price(self): + from erpnext.accounts.doctype.sales_invoice.sales_invoice import make_inter_company_purchase_invoice from erpnext.stock.doctype.warehouse.test_warehouse import create_warehouse prepare_data_for_internal_transfer() @@ -840,6 +841,31 @@ class TestAccountsController(FrappeTestCase): # rate should reset to incoming rate self.assertEqual(si.items[0].rate, 100) + si.update_stock = 0 + si.save() + si.submit() + + pi = make_inter_company_purchase_invoice(si.name) + pi.update_stock = 1 + pi.items[0].rate = arms_length_price + pi.items[0].warehouse = target_warehouse + pi.items[0].from_warehouse = warehouse + pi.save() + + self.assertEqual(pi.items[0].rate, 100) + self.assertEqual(pi.items[0].valuation_rate, 100) + + frappe.db.set_single_value("Stock Settings", "allow_internal_transfer_at_arms_length_price", 1) + pi = make_inter_company_purchase_invoice(si.name) + pi.update_stock = 1 + pi.items[0].rate = arms_length_price + pi.items[0].warehouse = target_warehouse + pi.items[0].from_warehouse = warehouse + pi.save() + + self.assertEqual(pi.items[0].rate, arms_length_price) + self.assertEqual(pi.items[0].valuation_rate, 100) + def test_20_journal_against_sales_invoice(self): # Invoice in Foreign Currency si = self.create_sales_invoice(qty=1, conversion_rate=80, rate=1) From 435280d626e542f64e7265733f6dd478339ffcc5 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Thu, 28 Nov 2024 20:45:17 +0530 Subject: [PATCH 0598/1614] fix: adjusted incoming rate for zero rated item in purchase receipt (cherry picked from commit 3182c6981c7bb2107b8c2d59b7f0e474f94c0cea) --- .../purchase_invoice/test_purchase_invoice.py | 24 +++++++++++++++++++ .../purchase_receipt/purchase_receipt.py | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py index f0b51c32c05..e353435661c 100644 --- a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py @@ -1735,6 +1735,30 @@ class TestPurchaseInvoice(FrappeTestCase, StockTestMixin): frappe.db.set_single_value("Buying Settings", "set_landed_cost_based_on_purchase_invoice_rate", 1) + # Cost of Item is zero in Purchase Receipt + pr = make_purchase_receipt(qty=1, rate=0) + + stock_value_difference = frappe.db.get_value( + "Stock Ledger Entry", + {"voucher_type": "Purchase Receipt", "voucher_no": pr.name}, + "stock_value_difference", + ) + self.assertEqual(stock_value_difference, 0) + + pi = create_purchase_invoice_from_receipt(pr.name) + for row in pi.items: + row.rate = 150 + + pi.save() + pi.submit() + + stock_value_difference = frappe.db.get_value( + "Stock Ledger Entry", + {"voucher_type": "Purchase Receipt", "voucher_no": pr.name}, + "stock_value_difference", + ) + self.assertEqual(stock_value_difference, 150) + # Increase the cost of the item pr = make_purchase_receipt(qty=1, rate=100) diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py index 4c2b6891cea..76ecf0fd596 100644 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py @@ -1085,7 +1085,7 @@ def update_billing_percentage(pr_doc, update_modified=True, adjust_incoming_rate if adjust_incoming_rate: adjusted_amt = 0.0 - if item.billed_amt and item.amount: + if item.billed_amt is not None and item.amount is not None: adjusted_amt = flt(item.billed_amt) - flt(item.amount) adjusted_amt = adjusted_amt * flt(pr_doc.conversion_rate) From ebdacc094c47aa334282b5f75cc194e6c25d48ad Mon Sep 17 00:00:00 2001 From: Sugesh393 Date: Fri, 29 Nov 2024 17:39:40 +0530 Subject: [PATCH 0599/1614] fix: calculate submitted payment entry as paid amount (cherry picked from commit 561a159aec1d71125fa0b1779df5ac1ff111b0da) --- erpnext/accounts/doctype/payment_request/payment_request.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/erpnext/accounts/doctype/payment_request/payment_request.py b/erpnext/accounts/doctype/payment_request/payment_request.py index 27e3aa83092..61bb2932d2b 100644 --- a/erpnext/accounts/doctype/payment_request/payment_request.py +++ b/erpnext/accounts/doctype/payment_request/payment_request.py @@ -778,6 +778,8 @@ def get_existing_paid_amount(doctype, name): .where(PL.against_voucher_type.eq(doctype)) .where(PL.against_voucher_no.eq(name)) .where(PL.amount < 0) + .where(PL.delinked == 0) + .where(PER.docstatus == 1) .where(PER.payment_request.isnull()) ) response = query.run() From aa090beae0d0a7d3730634c6525e43f681f74653 Mon Sep 17 00:00:00 2001 From: Sugesh393 Date: Fri, 29 Nov 2024 17:44:22 +0530 Subject: [PATCH 0600/1614] test: add new unit test to validate paid amount in payment request (cherry picked from commit 9bee2d430cb05f21b911d0af5f9c0d1a66615ffc) --- .../payment_request/test_payment_request.py | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/erpnext/accounts/doctype/payment_request/test_payment_request.py b/erpnext/accounts/doctype/payment_request/test_payment_request.py index 4442dbdd7ea..eadb714baa3 100644 --- a/erpnext/accounts/doctype/payment_request/test_payment_request.py +++ b/erpnext/accounts/doctype/payment_request/test_payment_request.py @@ -543,3 +543,30 @@ class TestPaymentRequest(FrappeTestCase): pr = make_payment_request(dt="Sales Invoice", dn=si.name, mute_email=1) self.assertEqual(pr.grand_total, si.outstanding_amount) + + +def test_partial_paid_invoice_with_submitted_payment_entry(self): + pi = make_purchase_invoice(currency="INR", qty=1, rate=5000) + pi.save() + pi.submit() + + pe = get_payment_entry("Purchase Invoice", pi.name, bank_account="_Test Bank - _TC") + pe.reference_no = "PURINV0001" + pe.reference_date = frappe.utils.nowdate() + pe.paid_amount = 2500 + pe.references[0].allocated_amount = 2500 + pe.save() + pe.submit() + pe.cancel() + + pe = get_payment_entry("Purchase Invoice", pi.name, bank_account="_Test Bank - _TC") + pe.reference_no = "PURINV0002" + pe.reference_date = frappe.utils.nowdate() + pe.paid_amount = 2500 + pe.references[0].allocated_amount = 2500 + pe.save() + pe.submit() + + pi.load_from_db() + pr = make_payment_request(dt="Purchase Invoice", dn=pi.name, mute_email=1) + self.assertEqual(pr.grand_total, pi.outstanding_amount) From 0a9c92fce940ed74dbd1b22ecfbebfc6612ba61a Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 3 Dec 2024 15:09:09 +0530 Subject: [PATCH 0601/1614] fix: incorrect Gross Margin on project (backport #44461) (#44468) * fix: incorrect Gross Margin on project (#44461) (cherry picked from commit 7de9c14a2ce329ea6134fddf5c13424bc5191657) # Conflicts: # erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py * chore: resolve conflict --------- Co-authored-by: rohitwaghchaure Co-authored-by: ruthra kumar --- .../doctype/sales_invoice/sales_invoice.py | 3 +++ .../doctype/sales_invoice/test_sales_invoice.py | 14 ++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 410e934ab71..1a7ffc3c339 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -1755,6 +1755,9 @@ class SalesInvoice(SellingController): def update_project(self): unique_projects = list(set([d.project for d in self.get("items") if d.project])) + if self.project and self.project not in unique_projects: + unique_projects.append(self.project) + for p in unique_projects: project = frappe.get_doc("Project", p) project.update_billed_amount() diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py index d2b8882743a..57eb84caaa4 100644 --- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py @@ -4217,6 +4217,20 @@ class TestSalesInvoice(FrappeTestCase): self.assertTrue(jv) self.assertEqual(jv[0], si.grand_total) + def test_total_billed_amount(self): + si = create_sales_invoice(do_not_submit=True) + + project = frappe.new_doc("Project") + project.project_name = "Test Total Billed Amount" + project.save() + + si.project = project.name + si.save() + si.submit() + + doc = frappe.get_doc("Project", project.name) + self.assertEqual(doc.total_billed_amount, si.grand_total) + def set_advance_flag(company, flag, default_account): frappe.db.set_value( From ea57f2b2921f5fb6b06a0be1bac0cac4ddaf248a Mon Sep 17 00:00:00 2001 From: ljain112 Date: Mon, 2 Dec 2024 14:08:21 +0530 Subject: [PATCH 0602/1614] fix: remove queries (cherry picked from commit a86b223aed6e978154dbe6feb3581bcdacff2d60) --- .../report/gross_profit/gross_profit.py | 29 +++++++------------ 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/erpnext/accounts/report/gross_profit/gross_profit.py b/erpnext/accounts/report/gross_profit/gross_profit.py index 5ba1e41b624..852d33c6356 100644 --- a/erpnext/accounts/report/gross_profit/gross_profit.py +++ b/erpnext/accounts/report/gross_profit/gross_profit.py @@ -421,10 +421,10 @@ class GrossProfitGenerator: self.load_invoice_items() self.get_delivery_notes() + self.load_product_bundle() if filters.group_by == "Invoice": self.group_items_by_invoice() - self.load_product_bundle() self.load_non_stock_items() self.get_returned_invoice_items() self.process() @@ -851,6 +851,7 @@ class GrossProfitGenerator: `tabSales Invoice`.project, `tabSales Invoice`.update_stock, `tabSales Invoice`.customer, `tabSales Invoice`.customer_group, `tabSales Invoice`.territory, `tabSales Invoice Item`.item_code, + `tabSales Invoice`.base_net_total as "invoice_base_net_total", `tabSales Invoice Item`.item_name, `tabSales Invoice Item`.description, `tabSales Invoice Item`.warehouse, `tabSales Invoice Item`.item_group, `tabSales Invoice Item`.brand, `tabSales Invoice Item`.so_detail, @@ -911,6 +912,7 @@ class GrossProfitGenerator: """ grouped = OrderedDict() + product_bundels = self.product_bundles.get("Sales Invoice", {}) for row in self.si_list: # initialize list with a header row for each new parent @@ -921,8 +923,7 @@ class GrossProfitGenerator: ) # if item is a bundle, add it's components as seperate rows - if frappe.db.exists("Product Bundle", row.item_code): - bundled_items = self.get_bundle_items(row) + if bundled_items := product_bundels.get(row.parent, {}).get(row.item_code): for x in bundled_items: bundle_item = self.get_bundle_item_row(row, x) grouped.get(row.parent).append(bundle_item) @@ -958,18 +959,11 @@ class GrossProfitGenerator: "item_row": None, "is_return": row.is_return, "cost_center": row.cost_center, - "base_net_amount": frappe.db.get_value("Sales Invoice", row.parent, "base_net_total"), + "base_net_amount": row.invoice_base_net_total, } ) - def get_bundle_items(self, product_bundle): - return frappe.get_all( - "Product Bundle Item", filters={"parent": product_bundle.item_code}, fields=["item_code", "qty"] - ) - def get_bundle_item_row(self, product_bundle, item): - item_name, description, item_group, brand = self.get_bundle_item_details(item.item_code) - return frappe._dict( { "parent_invoice": product_bundle.item_code, @@ -982,23 +976,20 @@ class GrossProfitGenerator: "customer": product_bundle.customer, "customer_group": product_bundle.customer_group, "item_code": item.item_code, - "item_name": item_name, - "description": description, + "item_name": item.item_name, + "description": item.description, "warehouse": product_bundle.warehouse, - "item_group": item_group, - "brand": brand, + "item_group": "", + "brand": "", "dn_detail": product_bundle.dn_detail, "delivery_note": product_bundle.delivery_note, - "qty": (flt(product_bundle.qty) * flt(item.qty)), + "qty": item.total_qty * -1, "item_row": None, "is_return": product_bundle.is_return, "cost_center": product_bundle.cost_center, } ) - def get_bundle_item_details(self, item_code): - return frappe.db.get_value("Item", item_code, ["item_name", "description", "item_group", "brand"]) - def get_stock_ledger_entries(self, item_code, warehouse): if item_code and warehouse: if (item_code, warehouse) not in self.sle: From f165e1732b2160cf6cc65ca52ee2ce0d2a833667 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Mon, 2 Dec 2024 15:20:20 +0530 Subject: [PATCH 0603/1614] fix: correct buying amount for product bundel (cherry picked from commit 4e6a5893e7a26da863920c782f2719861b5aaecd) --- .../report/gross_profit/gross_profit.py | 36 +++++++++++-------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/erpnext/accounts/report/gross_profit/gross_profit.py b/erpnext/accounts/report/gross_profit/gross_profit.py index 852d33c6356..1191f72cb3f 100644 --- a/erpnext/accounts/report/gross_profit/gross_profit.py +++ b/erpnext/accounts/report/gross_profit/gross_profit.py @@ -636,6 +636,7 @@ class GrossProfitGenerator: if packed_item.get("parent_detail_docname") == row.item_row: packed_item_row = row.copy() packed_item_row.warehouse = packed_item.warehouse + packed_item_row.qty = packed_item.total_qty * -1 buying_amount += self.get_buying_amount(packed_item_row, packed_item.item_code) return flt(buying_amount, self.currency_precision) @@ -668,7 +669,9 @@ class GrossProfitGenerator: else: my_sle = self.get_stock_ledger_entries(item_code, row.warehouse) if (row.update_stock or row.dn_detail) and my_sle: - parenttype, parent = row.parenttype, row.parent + parenttype = row.parenttype + parent = row.invoice or row.parent + if row.dn_detail: parenttype, parent = "Delivery Note", row.delivery_note @@ -963,30 +966,33 @@ class GrossProfitGenerator: } ) - def get_bundle_item_row(self, product_bundle, item): + def get_bundle_item_row(self, row, item): return frappe._dict( { - "parent_invoice": product_bundle.item_code, - "indent": product_bundle.indent + 1, + "parent_invoice": row.item_code, + "parenttype": row.parenttype, + "indent": row.indent + 1, "parent": None, "invoice_or_item": item.item_code, - "posting_date": product_bundle.posting_date, - "posting_time": product_bundle.posting_time, - "project": product_bundle.project, - "customer": product_bundle.customer, - "customer_group": product_bundle.customer_group, + "posting_date": row.posting_date, + "posting_time": row.posting_time, + "project": row.project, + "customer": row.customer, + "customer_group": row.customer_group, "item_code": item.item_code, "item_name": item.item_name, "description": item.description, - "warehouse": product_bundle.warehouse, + "warehouse": item.warehouse or row.warehouse, + "update_stock": row.update_stock, "item_group": "", "brand": "", - "dn_detail": product_bundle.dn_detail, - "delivery_note": product_bundle.delivery_note, + "dn_detail": row.dn_detail, + "delivery_note": row.delivery_note, "qty": item.total_qty * -1, - "item_row": None, - "is_return": product_bundle.is_return, - "cost_center": product_bundle.cost_center, + "item_row": row.item_row, + "is_return": row.is_return, + "cost_center": row.cost_center, + "invoice": row.parent, } ) From 4a713f6b5e40472166718cc67b5f975b47bc9de3 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 3 Dec 2024 15:39:17 +0530 Subject: [PATCH 0604/1614] chore: fix typo (cherry picked from commit fc0122ce760f8c2f14de931bf8f082de8cefa02d) --- erpnext/accounts/report/gross_profit/gross_profit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/report/gross_profit/gross_profit.py b/erpnext/accounts/report/gross_profit/gross_profit.py index 1191f72cb3f..c59a3bd2a7a 100644 --- a/erpnext/accounts/report/gross_profit/gross_profit.py +++ b/erpnext/accounts/report/gross_profit/gross_profit.py @@ -915,7 +915,7 @@ class GrossProfitGenerator: """ grouped = OrderedDict() - product_bundels = self.product_bundles.get("Sales Invoice", {}) + product_bundles = self.product_bundles.get("Sales Invoice", {}) for row in self.si_list: # initialize list with a header row for each new parent @@ -926,7 +926,7 @@ class GrossProfitGenerator: ) # if item is a bundle, add it's components as seperate rows - if bundled_items := product_bundels.get(row.parent, {}).get(row.item_code): + if bundled_items := product_bundles.get(row.parent, {}).get(row.item_code): for x in bundled_items: bundle_item = self.get_bundle_item_row(row, x) grouped.get(row.parent).append(bundle_item) From 63de576be61ec2ec30c79cec055b4c8afa2dfd07 Mon Sep 17 00:00:00 2001 From: vishakhdesai Date: Tue, 26 Nov 2024 14:26:02 +0530 Subject: [PATCH 0605/1614] fix: move validate_total_debit_and_credit from validate to on_submit in Journal Entry (cherry picked from commit 8b5d4c023654157d58b40fce81ab6787d95bc734) --- erpnext/accounts/doctype/journal_entry/journal_entry.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.py b/erpnext/accounts/doctype/journal_entry/journal_entry.py index aeaadae0b30..34a4d14fbbf 100644 --- a/erpnext/accounts/doctype/journal_entry/journal_entry.py +++ b/erpnext/accounts/doctype/journal_entry/journal_entry.py @@ -127,9 +127,6 @@ class JournalEntry(AccountsController): self.set_amounts_in_company_currency() self.validate_debit_credit_amount() self.set_total_debit_credit() - # Do not validate while importing via data import - if not frappe.flags.in_import: - self.validate_total_debit_and_credit() if not frappe.flags.is_reverse_depr_entry: self.validate_against_jv() @@ -185,6 +182,10 @@ class JournalEntry(AccountsController): return self._cancel() def on_submit(self): + # Do not validate while importing via data import + if not frappe.flags.in_import: + self.validate_total_debit_and_credit() + self.validate_cheque_info() self.check_credit_limit() self.make_gl_entries() From 16d0d42afe2f1282c5291cfcb88495348910c015 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 3 Dec 2024 17:42:11 +0530 Subject: [PATCH 0606/1614] refactor: validate debit and credit on before_submit (cherry picked from commit c3ace82db83dcf2dbb2afabeda2a82aa37d9e5ab) --- erpnext/accounts/doctype/journal_entry/journal_entry.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.py b/erpnext/accounts/doctype/journal_entry/journal_entry.py index 34a4d14fbbf..ef2388a7eaa 100644 --- a/erpnext/accounts/doctype/journal_entry/journal_entry.py +++ b/erpnext/accounts/doctype/journal_entry/journal_entry.py @@ -181,11 +181,12 @@ class JournalEntry(AccountsController): else: return self._cancel() - def on_submit(self): + def before_submit(self): # Do not validate while importing via data import if not frappe.flags.in_import: self.validate_total_debit_and_credit() + def on_submit(self): self.validate_cheque_info() self.check_credit_limit() self.make_gl_entries() From 1d158d58f62087691b8c0f5673f18f9bb21a5e7c Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Wed, 4 Dec 2024 04:38:06 +0000 Subject: [PATCH 0607/1614] chore(release): Bumped to Version 15.45.0 # [15.45.0](https://github.com/frappe/erpnext/compare/v15.44.0...v15.45.0) (2024-12-04) ### Bug Fixes * Add filter for `outstanding_amount` to fetch open PRs ([5999a8e](https://github.com/frappe/erpnext/commit/5999a8e24f908dc84bce88969bdb192c03c2cd08)) * Add translation for showing mandatory fields in error msg ([0e1f5ff](https://github.com/frappe/erpnext/commit/0e1f5ff391b7a6f277149e5a14203f4cde7fac6c)) * added fieldname to avoid fieldname to translate ([17c2734](https://github.com/frappe/erpnext/commit/17c2734042ed0ed2f226ff2adb1ef70dfd63cfd9)) * Added translation for `Account` column ([eb4a485](https://github.com/frappe/erpnext/commit/eb4a485df6e0953c1552549ffda74caea644ed60)) * adjusted incoming rate for zero rated item in purchase receipt ([435280d](https://github.com/frappe/erpnext/commit/435280d626e542f64e7265733f6dd478339ffcc5)) * always set sales incoming rate for internal transfers ([05795af](https://github.com/frappe/erpnext/commit/05795af4716990fb4e3c104dbf4a6721fb7f7afa)) * calculate submitted payment entry as paid amount ([ebdacc0](https://github.com/frappe/erpnext/commit/ebdacc094c47aa334282b5f75cc194e6c25d48ad)) * correct buying amount for product bundel ([f165e17](https://github.com/frappe/erpnext/commit/f165e1732b2160cf6cc65ca52ee2ce0d2a833667)) * Dashboard for `Payment Request` ([0d67c62](https://github.com/frappe/erpnext/commit/0d67c62f43758d453bc59ea0595046f48afa78ab)) * Data Should be Computed in Backend to Maintain Consistent Behaviour ([#44195](https://github.com/frappe/erpnext/issues/44195)) ([8ab9fc7](https://github.com/frappe/erpnext/commit/8ab9fc7f55b7759033f540cd275630a30ace8e5b)) * do not validate stock during inward (backport [#44417](https://github.com/frappe/erpnext/issues/44417)) ([#44427](https://github.com/frappe/erpnext/issues/44427)) ([e607795](https://github.com/frappe/erpnext/commit/e607795baed7544bcaedac031ed595b3a34eec4d)) * handle multi currency in common party journal entry ([c8e2c9a](https://github.com/frappe/erpnext/commit/c8e2c9aa2535b35a9c2a803762ef26a55ef804e2)) * incorrect Gross Margin on project (backport [#44461](https://github.com/frappe/erpnext/issues/44461)) ([#44468](https://github.com/frappe/erpnext/issues/44468)) ([0a9c92f](https://github.com/frappe/erpnext/commit/0a9c92fce940ed74dbd1b22ecfbebfc6612ba61a)) * IndexError in Asset Depreciation Ledger when query result is empty ([c3bc724](https://github.com/frappe/erpnext/commit/c3bc724523aab30585554e24f7e3907ae48f6ea2)) * link cash flow rows and fix summary linking ([633be8d](https://github.com/frappe/erpnext/commit/633be8d06bcbba0a7b08ba3e9172f67a7562343b)) * move validate_total_debit_and_credit from validate to on_submit in Journal Entry ([63de576](https://github.com/frappe/erpnext/commit/63de576be61ec2ec30c79cec055b4c8afa2dfd07)) * number format in the message (backport [#44435](https://github.com/frappe/erpnext/issues/44435)) ([#44438](https://github.com/frappe/erpnext/issues/44438)) ([579d8e2](https://github.com/frappe/erpnext/commit/579d8e293eb898b0bae0da31ca53b8aa46955884)) * precision calculation causing 0.1 discrepancy (backport [#44431](https://github.com/frappe/erpnext/issues/44431)) ([#44436](https://github.com/frappe/erpnext/issues/44436)) ([0d41c23](https://github.com/frappe/erpnext/commit/0d41c23383961a332802de46c2919981e8250a3c)) * remove queries ([ea57f2b](https://github.com/frappe/erpnext/commit/ea57f2b2921f5fb6b06a0be1bac0cac4ddaf248a)) * SABB print for packed items (backport [#44413](https://github.com/frappe/erpnext/issues/44413)) ([#44428](https://github.com/frappe/erpnext/issues/44428)) ([0e39aa3](https://github.com/frappe/erpnext/commit/0e39aa349eda503339299acae94009c6e54b54cb)) * set correct unallocated amount in Payment Entry ([#43958](https://github.com/frappe/erpnext/issues/43958)) ([ae93f7f](https://github.com/frappe/erpnext/commit/ae93f7f967e2b4da1c76552a794bce118827b57f)) * show "Send SMS" only when enabled (backport [#43941](https://github.com/frappe/erpnext/issues/43941)) ([#43970](https://github.com/frappe/erpnext/issues/43970)) ([0fbc60a](https://github.com/frappe/erpnext/commit/0fbc60a20e0958d93c935446f0271d9ee626ecb5)) * source warehouse not set in required items of WO (backport [#44426](https://github.com/frappe/erpnext/issues/44426)) ([#44434](https://github.com/frappe/erpnext/issues/44434)) ([c81b5e3](https://github.com/frappe/erpnext/commit/c81b5e3d9cb8acb6d15b294bb0545f713ba5748d)) * Translate `Party Account` column label ([fdda864](https://github.com/frappe/erpnext/commit/fdda86455a93a25bb2216893da69cc8efe9a07d2)) * typeerror on transaction.js ([173d60f](https://github.com/frappe/erpnext/commit/173d60fb7d9aaab62e7bcd7e1e6ae5ec5f261518)) ### Features * add Company Contact Person in selling transactions (backport [#44362](https://github.com/frappe/erpnext/issues/44362)) ([#44398](https://github.com/frappe/erpnext/issues/44398)) ([70b5b08](https://github.com/frappe/erpnext/commit/70b5b08d588ea4e9132f2ab51846a16d4da04241)) * **Dunning:** separate tab "Address & Contact" ([#44363](https://github.com/frappe/erpnext/issues/44363)) ([e0cb5f9](https://github.com/frappe/erpnext/commit/e0cb5f9ba8dc8a5b23af958b5c988b3499ed4853)) ### Performance Improvements * cache product bundle items at document level ([#44440](https://github.com/frappe/erpnext/issues/44440)) ([1f97979](https://github.com/frappe/erpnext/commit/1f9797905973ef8adc74867adc3a1f052cf5e83b)) * reduce queries during transaction save ([48059a7](https://github.com/frappe/erpnext/commit/48059a7c74422fa2c462aabb041fb642b01a9ae2)) ### Reverts * remove default `Payment Request` indicator color ([9c4b581](https://github.com/frappe/erpnext/commit/9c4b5814a65b9bed086326aa11538f5a9db99938)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 82b86724482..faee116955b 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.44.0" +__version__ = "15.45.0" def get_default_company(user=None): From 106671a414436fe162d492e7619bcf9ff34236d1 Mon Sep 17 00:00:00 2001 From: mahsem <137205921+mahsem@users.noreply.github.com> Date: Wed, 4 Dec 2024 08:35:48 +0100 Subject: [PATCH 0608/1614] fix: add strings for translation in timesheet.js (#44496) (cherry picked from commit 6585fabdb161513d4c4e3799d44780dba58fc905) --- erpnext/projects/doctype/timesheet/timesheet.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/projects/doctype/timesheet/timesheet.js b/erpnext/projects/doctype/timesheet/timesheet.js index 9aba75b3ce9..168b891e98c 100644 --- a/erpnext/projects/doctype/timesheet/timesheet.js +++ b/erpnext/projects/doctype/timesheet/timesheet.js @@ -58,10 +58,10 @@ frappe.ui.form.on("Timesheet", { } if (frm.doc.docstatus < 1) { - let button = "Start Timer"; + let button = __("Start Timer"); $.each(frm.doc.time_logs || [], function (i, row) { if (row.from_time <= frappe.datetime.now_datetime() && !row.completed) { - button = "Resume Timer"; + button = __("Resume Timer"); } }); From 539c5b7974ffdaf4caf8acb6d4acc00fba626668 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 4 Dec 2024 19:02:26 +0530 Subject: [PATCH 0609/1614] fix: duplicate required items in the CSV (backport #44498) (#44507) * fix: duplicate required items in the CSV (#44498) (cherry picked from commit b4534e56e4a1b62f6433b031671d62be9c28cf6a) # Conflicts: # erpnext/manufacturing/doctype/production_plan/production_plan.json * chore: fix conflicts --------- Co-authored-by: rohitwaghchaure --- .../production_plan/production_plan.json | 8 ++-- .../production_plan/production_plan.py | 47 +++++++++++-------- 2 files changed, 31 insertions(+), 24 deletions(-) diff --git a/erpnext/manufacturing/doctype/production_plan/production_plan.json b/erpnext/manufacturing/doctype/production_plan/production_plan.json index 84bbad58c38..22971d4debd 100644 --- a/erpnext/manufacturing/doctype/production_plan/production_plan.json +++ b/erpnext/manufacturing/doctype/production_plan/production_plan.json @@ -243,7 +243,7 @@ "depends_on": "eval:!doc.__islocal", "fieldname": "download_materials_required", "fieldtype": "Button", - "label": "Download Materials Request Plan" + "label": "Download Required Materials" }, { "fieldname": "get_items_for_mr", @@ -398,7 +398,7 @@ "collapsible": 1, "fieldname": "download_materials_request_plan_section_section", "fieldtype": "Section Break", - "label": "Download Materials Request Plan Section" + "label": "Preview Required Materials" }, { "default": "0", @@ -439,7 +439,7 @@ "index_web_pages_for_search": 1, "is_submittable": 1, "links": [], - "modified": "2024-02-27 13:34:20.692211", + "modified": "2024-12-04 11:55:03.108971", "modified_by": "Administrator", "module": "Manufacturing", "name": "Production Plan", @@ -463,4 +463,4 @@ "sort_field": "modified", "sort_order": "ASC", "states": [] -} \ No newline at end of file +} diff --git a/erpnext/manufacturing/doctype/production_plan/production_plan.py b/erpnext/manufacturing/doctype/production_plan/production_plan.py index 3f82a75d302..265f99e47d3 100644 --- a/erpnext/manufacturing/doctype/production_plan/production_plan.py +++ b/erpnext/manufacturing/doctype/production_plan/production_plan.py @@ -44,9 +44,7 @@ class ProductionPlan(Document): from erpnext.manufacturing.doctype.material_request_plan_item.material_request_plan_item import ( MaterialRequestPlanItem, ) - from erpnext.manufacturing.doctype.production_plan_item.production_plan_item import ( - ProductionPlanItem, - ) + from erpnext.manufacturing.doctype.production_plan_item.production_plan_item import ProductionPlanItem from erpnext.manufacturing.doctype.production_plan_item_reference.production_plan_item_reference import ( ProductionPlanItemReference, ) @@ -1085,24 +1083,33 @@ def download_raw_materials(doc, warehouses=None): frappe.flags.show_qty_in_stock_uom = 1 items = get_items_for_material_requests(doc, warehouses=warehouses, get_parent_warehouse_data=True) + duplicate_item_wh_list = frappe._dict() + for d in items: - item_list.append( - [ - d.get("item_code"), - d.get("item_name"), - d.get("description"), - d.get("stock_uom"), - d.get("warehouse"), - d.get("required_bom_qty"), - d.get("projected_qty"), - d.get("actual_qty"), - d.get("ordered_qty"), - d.get("planned_qty"), - d.get("reserved_qty_for_production"), - d.get("safety_stock"), - d.get("quantity"), - ] - ) + key = (d.get("item_code"), d.get("warehouse")) + if key in duplicate_item_wh_list: + rm_data = duplicate_item_wh_list[key] + rm_data[12] += d.get("quantity") + continue + + rm_data = [ + d.get("item_code"), + d.get("item_name"), + d.get("description"), + d.get("stock_uom"), + d.get("warehouse"), + d.get("required_bom_qty"), + d.get("projected_qty"), + d.get("actual_qty"), + d.get("ordered_qty"), + d.get("planned_qty"), + d.get("reserved_qty_for_production"), + d.get("safety_stock"), + d.get("quantity"), + ] + + duplicate_item_wh_list[key] = rm_data + item_list.append(rm_data) if not doc.get("for_warehouse"): row = {"item_code": d.get("item_code")} From 07df87ab6972ed3bb23b8ce8029a787a367655cf Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 4 Dec 2024 19:02:45 +0530 Subject: [PATCH 0610/1614] fix: required by date in the reorder material request (backport #44497) (#44509) fix: required by date in the reorder material request (#44497) (cherry picked from commit 4001166ecc689ee877adf1d9babd4d0332ab4752) Co-authored-by: rohitwaghchaure --- .../doctype/stock_entry/test_stock_entry.py | 40 +++++++++++++++++++ erpnext/stock/reorder_item.py | 2 + 2 files changed, 42 insertions(+) diff --git a/erpnext/stock/doctype/stock_entry/test_stock_entry.py b/erpnext/stock/doctype/stock_entry/test_stock_entry.py index 469b865dd59..a26940462bf 100644 --- a/erpnext/stock/doctype/stock_entry/test_stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/test_stock_entry.py @@ -1645,6 +1645,46 @@ class TestStockEntry(FrappeTestCase): mr.cancel() mr.delete() + def test_auto_reorder_level_with_lead_time_days(self): + from erpnext.stock.reorder_item import reorder_item + + item_doc = make_item( + "Test Auto Reorder Item - 002", + properties={"stock_uom": "Kg", "purchase_uom": "Nos", "is_stock_item": 1, "lead_time_days": 2}, + uoms=[{"uom": "Nos", "conversion_factor": 5}], + ) + + if not frappe.db.exists("Item Reorder", {"parent": item_doc.name}): + item_doc.append( + "reorder_levels", + { + "warehouse_reorder_level": 0, + "warehouse_reorder_qty": 10, + "warehouse": "_Test Warehouse - _TC", + "material_request_type": "Purchase", + }, + ) + + item_doc.save(ignore_permissions=True) + + frappe.db.set_single_value("Stock Settings", "auto_indent", 1) + + mr_list = reorder_item() + + frappe.db.set_single_value("Stock Settings", "auto_indent", 0) + mrs = frappe.get_all( + "Material Request Item", + fields=["schedule_date"], + filters={"item_code": item_doc.name, "uom": "Nos"}, + ) + + for mri in mrs: + self.assertEqual(getdate(mri.schedule_date), getdate(add_days(today(), 2))) + + for mr in mr_list: + mr.cancel() + mr.delete() + def test_use_serial_and_batch_fields(self): item = make_item( "Test Use Serial and Batch Item SN Item", diff --git a/erpnext/stock/reorder_item.py b/erpnext/stock/reorder_item.py index ed87906731e..570dc3a3405 100644 --- a/erpnext/stock/reorder_item.py +++ b/erpnext/stock/reorder_item.py @@ -98,6 +98,7 @@ def _reorder_item(): "description": d.description, "stock_uom": d.stock_uom, "purchase_uom": d.purchase_uom, + "lead_time_days": d.lead_time_days, } ), ) @@ -129,6 +130,7 @@ def get_items_for_reorder() -> dict[str, list]: item_table.brand, item_table.variant_of, item_table.has_variants, + item_table.lead_time_days, ) .where( (item_table.disabled == 0) From 8733eda576fe6d27ea64dfb43ee52c2f1215b234 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 5 Dec 2024 09:45:17 +0530 Subject: [PATCH 0611/1614] fix: inv dimensions fields not creating for standard doctype (backport #44504) (#44515) fix: inv dimensions fields not creating for standard doctype (#44504) (cherry picked from commit 353610ce619d8406c8bd613807cf69c76274dfe0) Co-authored-by: rohitwaghchaure --- .../inventory_dimension/inventory_dimension.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/erpnext/stock/doctype/inventory_dimension/inventory_dimension.py b/erpnext/stock/doctype/inventory_dimension/inventory_dimension.py index 4f8a166932d..661605bdf5f 100644 --- a/erpnext/stock/doctype/inventory_dimension/inventory_dimension.py +++ b/erpnext/stock/doctype/inventory_dimension/inventory_dimension.py @@ -214,13 +214,10 @@ class InventoryDimension(Document): dimension_fields = [] if self.apply_to_all_doctypes: for doctype in get_inventory_documents(): - if field_exists(doctype[0], self.source_fieldname): - continue - dimension_fields = self.get_dimension_fields(doctype[0]) self.add_transfer_field(doctype[0], dimension_fields) custom_fields.setdefault(doctype[0], dimension_fields) - elif not field_exists(self.document_type, self.source_fieldname): + else: dimension_fields = self.get_dimension_fields() self.add_transfer_field(self.document_type, dimension_fields) @@ -239,8 +236,17 @@ class InventoryDimension(Document): dimension_field["fieldname"] = self.target_fieldname custom_fields["Stock Ledger Entry"] = dimension_field + filter_custom_fields = {} if custom_fields: - create_custom_fields(custom_fields) + for doctype, fields in custom_fields.items(): + if isinstance(fields, dict): + fields = [fields] + + for field in fields: + if not field_exists(doctype, field["fieldname"]): + filter_custom_fields.setdefault(doctype, []).append(field) + + create_custom_fields(filter_custom_fields) def add_transfer_field(self, doctype, dimension_fields): if doctype not in [ From 283043eba7d305bd88d64fe5780a1b65ab3725c2 Mon Sep 17 00:00:00 2001 From: mahsem <137205921+mahsem@users.noreply.github.com> Date: Wed, 4 Dec 2024 08:58:16 +0100 Subject: [PATCH 0612/1614] fix: add labels for translation in sales_order.js (cherry picked from commit d544328ffe629ed1dfb22a593db4044de8e30131) --- erpnext/selling/doctype/sales_order/sales_order.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/erpnext/selling/doctype/sales_order/sales_order.js b/erpnext/selling/doctype/sales_order/sales_order.js index 45f6b364761..de4053458e4 100644 --- a/erpnext/selling/doctype/sales_order/sales_order.js +++ b/erpnext/selling/doctype/sales_order/sales_order.js @@ -146,7 +146,7 @@ frappe.ui.form.on("Sales Order", { target: frm, setters: [ { - label: "Supplier", + label: __("Supplier"), fieldname: "supplier", fieldtype: "Link", options: "Supplier", @@ -783,7 +783,7 @@ erpnext.selling.SalesOrderController = class SalesOrderController extends erpnex target: me.frm, setters: [ { - label: "Customer", + label: __("Customer"), fieldname: "party_name", fieldtype: "Link", options: "Customer", @@ -838,7 +838,7 @@ erpnext.selling.SalesOrderController = class SalesOrderController extends erpnex } else { const fields = [ { - label: "Items", + label: __("Items"), fieldtype: "Table", fieldname: "items", description: __("Select BOM and Qty for Production"), @@ -1193,7 +1193,7 @@ erpnext.selling.SalesOrderController = class SalesOrderController extends erpnex { fieldname: "items_for_po", fieldtype: "Table", - label: "Select Items", + label: __("Select Items"), fields: [ { fieldtype: "Data", From af97d3e341c903c4e1505e00edf36d465a4157a6 Mon Sep 17 00:00:00 2001 From: mahsem <137205921+mahsem@users.noreply.github.com> Date: Thu, 5 Dec 2024 05:29:43 +0100 Subject: [PATCH 0613/1614] refactor: translatable label on pos payments (#42081) * Use better description in pos_payment.js Use Change Amount instead of Change and To Be Paid in pos_payment.js and be consistent with other strings * change_amount_pos_payment.js (cherry picked from commit 138ffc4e93f8d63f6784d4c48ccb16e825144d8f) --- erpnext/selling/page/point_of_sale/pos_payment.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/selling/page/point_of_sale/pos_payment.js b/erpnext/selling/page/point_of_sale/pos_payment.js index 9f389dfa81f..bea1918fa20 100644 --- a/erpnext/selling/page/point_of_sale/pos_payment.js +++ b/erpnext/selling/page/point_of_sale/pos_payment.js @@ -589,7 +589,7 @@ erpnext.PointOfSale.Payment = class { const remaining = grand_total - doc.paid_amount; const change = doc.change_amount || remaining <= 0 ? -1 * remaining : undefined; const currency = doc.currency; - const label = change ? __("Change") : __("To Be Paid"); + const label = __("Change Amount"); this.$totals.html( `
From ceec5fdb6c094928cb566973547ebe571d655f51 Mon Sep 17 00:00:00 2001 From: mahsem <137205921+mahsem@users.noreply.github.com> Date: Wed, 4 Dec 2024 09:07:09 +0100 Subject: [PATCH 0614/1614] fix: strings for translation in pos_past_order_summary.js (cherry picked from commit 23c846d4b92dbc121255c8dc98d11de7536e3e4e) --- .../selling/page/point_of_sale/pos_past_order_summary.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/selling/page/point_of_sale/pos_past_order_summary.js b/erpnext/selling/page/point_of_sale/pos_past_order_summary.js index c399005643c..4a2d8911d1a 100644 --- a/erpnext/selling/page/point_of_sale/pos_past_order_summary.js +++ b/erpnext/selling/page/point_of_sale/pos_past_order_summary.js @@ -46,7 +46,7 @@ erpnext.PointOfSale.PastOrderSummary = class { init_email_print_dialog() { const email_dialog = new frappe.ui.Dialog({ - title: "Email Receipt", + title: __("Email Receipt"), fields: [ { fieldname: "email_id", fieldtype: "Data", options: "Email", label: "Email ID", reqd: 1 }, { fieldname: "content", fieldtype: "Small Text", label: "Message (if any)" }, @@ -59,7 +59,7 @@ erpnext.PointOfSale.PastOrderSummary = class { this.email_dialog = email_dialog; const print_dialog = new frappe.ui.Dialog({ - title: "Print Receipt", + title: __("Print Receipt"), fields: [{ fieldname: "print", fieldtype: "Data", label: "Print Preview" }], primary_action: () => { this.print_receipt(); @@ -112,7 +112,7 @@ erpnext.PointOfSale.PastOrderSummary = class { get_discount_html(doc) { if (doc.discount_amount) { return `
-
Discount (${doc.additional_discount_percentage} %)
+
${__("Discount")} (${doc.additional_discount_percentage} %)
${format_currency(doc.discount_amount, doc.currency)}
`; } else { From ffdd7cfa8678ecb4880eb8c68d260673e3cbbc5d Mon Sep 17 00:00:00 2001 From: mahsem <137205921+mahsem@users.noreply.github.com> Date: Wed, 4 Dec 2024 15:40:55 +0100 Subject: [PATCH 0615/1614] fix: add label strings for translation in pos_controller.js (cherry picked from commit bd77a5557d9b3bac54122cf43d56050bc1ecba5e) --- erpnext/selling/page/point_of_sale/pos_controller.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/selling/page/point_of_sale/pos_controller.js b/erpnext/selling/page/point_of_sale/pos_controller.js index de3259ae2b7..c1127c39cc0 100644 --- a/erpnext/selling/page/point_of_sale/pos_controller.js +++ b/erpnext/selling/page/point_of_sale/pos_controller.js @@ -30,7 +30,7 @@ erpnext.PointOfSale.Controller = class { fieldname: "mode_of_payment", fieldtype: "Link", in_list_view: 1, - label: "Mode of Payment", + label: __("Mode of Payment"), options: "Mode of Payment", reqd: 1, }, @@ -38,7 +38,7 @@ erpnext.PointOfSale.Controller = class { fieldname: "opening_amount", fieldtype: "Currency", in_list_view: 1, - label: "Opening Amount", + label: __("Opening Amount"), options: "company:company_currency", change: function () { dialog.fields_dict.balance_details.df.data.some((d) => { @@ -87,7 +87,7 @@ erpnext.PointOfSale.Controller = class { { fieldname: "balance_details", fieldtype: "Table", - label: "Opening Balance Details", + label: __("Opening Balance Details"), cannot_add_rows: false, in_place_edit: true, reqd: 1, From 71d8dfb401a8a3f533e5e06eedb27cc9a1ae8d27 Mon Sep 17 00:00:00 2001 From: mahsem <137205921+mahsem@users.noreply.github.com> Date: Wed, 4 Dec 2024 10:12:34 +0100 Subject: [PATCH 0616/1614] fix: add strings for translation in pos_item_cart.js (cherry picked from commit 4b72b60f1a75657c444f210fcb3dd7a055e4d9b8) --- erpnext/selling/page/point_of_sale/pos_item_cart.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/selling/page/point_of_sale/pos_item_cart.js b/erpnext/selling/page/point_of_sale/pos_item_cart.js index b808b4f8828..4ed678e2db0 100644 --- a/erpnext/selling/page/point_of_sale/pos_item_cart.js +++ b/erpnext/selling/page/point_of_sale/pos_item_cart.js @@ -966,13 +966,13 @@ erpnext.PointOfSale.ItemCart = class { if (!res.length) { transaction_container.html( - `
No recent transactions found
` + `
${__("No recent transactions found")}
` ); return; } const elapsed_time = moment(res[0].posting_date + " " + res[0].posting_time).fromNow(); - this.$customer_section.find(".customer-desc").html(`Last transacted ${elapsed_time}`); + this.$customer_section.find(".customer-desc").html(`${__("Last transacted")} ${__(elapsed_time)}`); res.forEach((invoice) => { const posting_datetime = moment(invoice.posting_date + " " + invoice.posting_time).format( @@ -997,7 +997,7 @@ erpnext.PointOfSale.ItemCart = class {
- ${invoice.status} + ${__(invoice.status)}
From d540c99934c5594f16a4e811ea88b0d3a6eca259 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 5 Dec 2024 10:10:34 +0530 Subject: [PATCH 0617/1614] chore: linter fix (cherry picked from commit 31efaf6dbf8f0139a4dd291ae8abb3e27bdc91ac) --- erpnext/selling/page/point_of_sale/pos_item_cart.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/erpnext/selling/page/point_of_sale/pos_item_cart.js b/erpnext/selling/page/point_of_sale/pos_item_cart.js index 4ed678e2db0..6342b237f6e 100644 --- a/erpnext/selling/page/point_of_sale/pos_item_cart.js +++ b/erpnext/selling/page/point_of_sale/pos_item_cart.js @@ -972,7 +972,9 @@ erpnext.PointOfSale.ItemCart = class { } const elapsed_time = moment(res[0].posting_date + " " + res[0].posting_time).fromNow(); - this.$customer_section.find(".customer-desc").html(`${__("Last transacted")} ${__(elapsed_time)}`); + this.$customer_section + .find(".customer-desc") + .html(`${__("Last transacted")} ${__(elapsed_time)}`); res.forEach((invoice) => { const posting_datetime = moment(invoice.posting_date + " " + invoice.posting_time).format( From f4aa4c94668a95a04b5a36dde582474df0f0be7b Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 5 Dec 2024 12:51:25 +0530 Subject: [PATCH 0618/1614] fix: incorrect stock UOM for BOM raw materials (backport #44528) (#44531) fix: incorrect stock UOM for BOM raw materials (#44528) fix: incorrect stock uom for BOM raw materials (cherry picked from commit 5413cf9f1fae48c4af47f5790ef7b5e8d81ebaf7) Co-authored-by: rohitwaghchaure --- erpnext/manufacturing/doctype/bom/bom.py | 18 +++++++++++++++++ erpnext/manufacturing/doctype/bom/test_bom.py | 20 +++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py index c3105b8e9ec..0c087470901 100644 --- a/erpnext/manufacturing/doctype/bom/bom.py +++ b/erpnext/manufacturing/doctype/bom/bom.py @@ -260,6 +260,24 @@ class BOM(WebsiteGenerator): self.update_cost(update_parent=False, from_child_bom=True, update_hour_rate=False, save=False) self.set_process_loss_qty() self.validate_scrap_items() + self.set_default_uom() + + def set_default_uom(self): + if not self.get("items"): + return + + item_wise_uom = frappe._dict( + frappe.get_all( + "Item", + filters={"name": ("in", [item.item_code for item in self.items])}, + fields=["name", "stock_uom"], + as_list=1, + ) + ) + + for row in self.get("items"): + if row.stock_uom != item_wise_uom.get(row.item_code): + row.stock_uom = item_wise_uom.get(row.item_code) def get_context(self, context): context.parents = [{"name": "boms", "title": _("All BOMs")}] diff --git a/erpnext/manufacturing/doctype/bom/test_bom.py b/erpnext/manufacturing/doctype/bom/test_bom.py index d02b51ca6e7..396a0b107d5 100644 --- a/erpnext/manufacturing/doctype/bom/test_bom.py +++ b/erpnext/manufacturing/doctype/bom/test_bom.py @@ -755,6 +755,26 @@ class TestBOM(FrappeTestCase): self.assertTrue("_Test RM Item 2 Fixed Asset Item" not in items) self.assertTrue("_Test RM Item 3 Manufacture Item" in items) + def test_bom_raw_materials_stock_uom(self): + rm_item = make_item( + properties={"is_stock_item": 1, "valuation_rate": 1000.0, "stock_uom": "Nos"} + ).name + fg_item = make_item(properties={"is_stock_item": 1}).name + + from erpnext.manufacturing.doctype.production_plan.test_production_plan import make_bom + + bom = make_bom(item=fg_item, raw_materials=[rm_item], do_not_submit=True) + for row in bom.items: + self.assertEqual(row.stock_uom, "Nos") + + frappe.db.set_value("Item", rm_item, "stock_uom", "Kg") + + bom.items[0].qty = 2 + bom.save() + + for row in bom.items: + self.assertEqual(row.stock_uom, "Kg") + def get_default_bom(item_code="_Test FG Item 2"): return frappe.db.get_value("BOM", {"item": item_code, "is_active": 1, "is_default": 1}) From 3771c6eeae15644e459181128f41ebd04a8d0c19 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 5 Dec 2024 13:46:23 +0530 Subject: [PATCH 0619/1614] fix: consider zero valuation rate for serial nos (backport #44532) (#44534) fix: consider zero valuation rate for serial nos (#44532) (cherry picked from commit 14f2b0ab0e5530395e269213a8594733dca4974a) Co-authored-by: rohitwaghchaure --- erpnext/stock/serial_batch_bundle.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/stock/serial_batch_bundle.py b/erpnext/stock/serial_batch_bundle.py index dd459bb30bc..05b3536c57b 100644 --- a/erpnext/stock/serial_batch_bundle.py +++ b/erpnext/stock/serial_batch_bundle.py @@ -508,7 +508,7 @@ class SerialNoValuation(DeprecatedSerialNoValuation): serial_nos = self.get_serial_nos() for serial_no in serial_nos: incoming_rate = self.get_incoming_rate_from_bundle(serial_no) - if not incoming_rate: + if incoming_rate is None: continue self.stock_value_change += incoming_rate @@ -553,7 +553,7 @@ class SerialNoValuation(DeprecatedSerialNoValuation): query = query.where(timestamp_condition) incoming_rate = query.run() - return flt(incoming_rate[0][0]) if incoming_rate else 0.0 + return flt(incoming_rate[0][0]) if incoming_rate else None def get_serial_nos(self): if self.sle.get("serial_nos"): From 843ff18cf9e45cc88042eb328b30907e888628c8 Mon Sep 17 00:00:00 2001 From: mahsem <137205921+mahsem@users.noreply.github.com> Date: Thu, 5 Dec 2024 08:37:43 +0100 Subject: [PATCH 0620/1614] fix: add title for translation in asset.js (cherry picked from commit 61439132a4386c1867a08d141e0702e03484cf02) --- erpnext/assets/doctype/asset/asset.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/assets/doctype/asset/asset.js b/erpnext/assets/doctype/asset/asset.js index c6e76abb0b5..21e307b480c 100644 --- a/erpnext/assets/doctype/asset/asset.js +++ b/erpnext/assets/doctype/asset/asset.js @@ -416,7 +416,7 @@ frappe.ui.form.on("Asset", { } frm.dashboard.render_graph({ - title: "Asset Value", + title: __("Asset Value"), data: { labels: x_intervals, datasets: [ From 99a327155e4a13e5ea8e0ad188a1acd38f90efed Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 5 Dec 2024 15:51:44 +0530 Subject: [PATCH 0621/1614] fix: update qty in SABB if qty changed in stock reco (backport #44542) (#44546) fix: update qty in SABB if qty changed in stock reco (#44542) (cherry picked from commit 7249cf0001bebe7a33933f9d379065f9cb8d7d61) Co-authored-by: rohitwaghchaure --- .../stock_reconciliation.py | 47 ++++++++++++++++--- 1 file changed, 40 insertions(+), 7 deletions(-) diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py index f671c11712a..c13b3620517 100644 --- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py +++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py @@ -166,6 +166,24 @@ class StockReconciliation(StockController): if not frappe.db.exists("Item", item.item_code): frappe.throw(_("Item {0} does not exist").format(item.item_code)) + item_details = frappe.get_cached_value( + "Item", item.item_code, ["has_serial_no", "has_batch_no"], as_dict=1 + ) + + if not (item_details.has_serial_no or item_details.has_batch_no): + continue + + if ( + not item.use_serial_batch_fields + and not item.reconcile_all_serial_batch + and not item.serial_and_batch_bundle + ): + frappe.throw( + _("Row # {0}: Please add Serial and Batch Bundle for Item {1}").format( + item.idx, frappe.bold(item.item_code) + ) + ) + if not item.reconcile_all_serial_batch and item.serial_and_batch_bundle: bundle = self.get_bundle_for_specific_serial_batch(item) item.current_serial_and_batch_bundle = bundle.name @@ -181,13 +199,6 @@ class StockReconciliation(StockController): if voucher_detail_no and voucher_detail_no != item.name: continue - item_details = frappe.get_cached_value( - "Item", item.item_code, ["has_serial_no", "has_batch_no"], as_dict=1 - ) - - if not (item_details.has_serial_no or item_details.has_batch_no): - continue - if not item.current_serial_and_batch_bundle: serial_and_batch_bundle = frappe.get_doc( { @@ -400,6 +411,28 @@ class StockReconciliation(StockController): item.qty = bundle_doc.total_qty item.valuation_rate = bundle_doc.avg_rate + elif item.serial_and_batch_bundle and item.qty: + self.update_existing_serial_and_batch_bundle(item) + + def update_existing_serial_and_batch_bundle(self, item): + batch_details = frappe.get_all( + "Serial and Batch Entry", + fields=["batch_no", "qty", "name"], + filters={"parent": item.serial_and_batch_bundle, "batch_no": ("is", "set")}, + ) + + if batch_details and len(batch_details) == 1: + batch = batch_details[0] + if abs(batch.qty) == abs(item.qty): + return + + update_values = { + "qty": item.qty, + "stock_value_difference": flt(item.valuation_rate) * flt(item.qty), + } + + frappe.db.set_value("Serial and Batch Entry", batch.name, update_values) + def remove_items_with_no_change(self): """Remove items if qty or rate is not changed""" self.difference_amount = 0.0 From 5ef063c63471092f568ee5fdead5ae0f2f52a74d Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 5 Dec 2024 15:52:04 +0530 Subject: [PATCH 0622/1614] fix: not able to make PO for returned qty from material request (backport #44540) (#44547) fix: not able to make PO for returned qty from material request (#44540) (cherry picked from commit 024c44208786dc3da59f6cdabba125ceb6f7c8d6) Co-authored-by: rohitwaghchaure --- .../doctype/material_request/material_request.js | 16 ++++++++-------- .../doctype/material_request/material_request.py | 8 ++++++-- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/erpnext/stock/doctype/material_request/material_request.js b/erpnext/stock/doctype/material_request/material_request.js index f04acc85ed5..c7485470cf0 100644 --- a/erpnext/stock/doctype/material_request/material_request.js +++ b/erpnext/stock/doctype/material_request/material_request.js @@ -107,6 +107,14 @@ frappe.ui.form.on("Material Request", { if (flt(frm.doc.per_received, precision) < 100) { frm.add_custom_button(__("Stop"), () => frm.events.update_status(frm, "Stopped")); + + if (frm.doc.material_request_type === "Purchase") { + frm.add_custom_button( + __("Purchase Order"), + () => frm.events.make_purchase_order(frm), + __("Create") + ); + } } if (flt(frm.doc.per_ordered, precision) < 100) { @@ -149,14 +157,6 @@ frappe.ui.form.on("Material Request", { ); } - if (frm.doc.material_request_type === "Purchase") { - frm.add_custom_button( - __("Purchase Order"), - () => frm.events.make_purchase_order(frm), - __("Create") - ); - } - if (frm.doc.material_request_type === "Purchase") { frm.add_custom_button( __("Request for Quotation"), diff --git a/erpnext/stock/doctype/material_request/material_request.py b/erpnext/stock/doctype/material_request/material_request.py index 7bf3ca4d728..23d289170db 100644 --- a/erpnext/stock/doctype/material_request/material_request.py +++ b/erpnext/stock/doctype/material_request/material_request.py @@ -378,7 +378,9 @@ def set_missing_values(source, target_doc): def update_item(obj, target, source_parent): target.conversion_factor = obj.conversion_factor - target.qty = flt(flt(obj.stock_qty) - flt(obj.ordered_qty)) / target.conversion_factor + + qty = obj.received_qty or obj.ordered_qty + target.qty = flt(flt(obj.stock_qty) - flt(qty)) / target.conversion_factor target.stock_qty = target.qty * target.conversion_factor if getdate(target.schedule_date) < getdate(nowdate()): target.schedule_date = None @@ -430,7 +432,9 @@ def make_purchase_order(source_name, target_doc=None, args=None): filtered_items = args.get("filtered_children", []) child_filter = d.name in filtered_items if filtered_items else True - return d.ordered_qty < d.stock_qty and child_filter + qty = d.received_qty or d.ordered_qty + + return qty < d.stock_qty and child_filter doclist = get_mapped_doc( "Material Request", From 63b1df38a81877168ea71047c9b29db144c4d8a9 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 5 Dec 2024 16:01:04 +0530 Subject: [PATCH 0623/1614] fix: variant qty while making work order from BOM (backport #44548) (#44551) fix: variant qty while making work order from BOM (#44548) (cherry picked from commit 1571dff3ef4c89c91e155967c0a187e8f855fe28) Co-authored-by: rohitwaghchaure --- erpnext/manufacturing/doctype/bom/bom.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/bom/bom.js b/erpnext/manufacturing/doctype/bom/bom.js index 6267ee4d029..5cfd170ab13 100644 --- a/erpnext/manufacturing/doctype/bom/bom.js +++ b/erpnext/manufacturing/doctype/bom/bom.js @@ -364,7 +364,7 @@ frappe.ui.form.on("BOM", { dialog.fields_dict.items.df.data.push({ item_code: d.item_code, variant_item_code: "", - qty: d.qty, + qty: (d.qty / frm.doc.quantity) * (dialog.fields_dict.qty.value || 1), source_warehouse: d.source_warehouse, operation: d.operation, }); From 06ac21dd856a5b6ecfb37ccf20c3d83fa4d79c05 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 5 Dec 2024 22:57:09 +0530 Subject: [PATCH 0624/1614] chore: Ignore stock validation for non stock invoices (backport #44549) (#44554) chore: Ignore stock validation for non stock invoices (#44549) * chore: Ignore stock validation for non stock invoices * chore: Ignore stock validation for non stock invoices (cherry picked from commit 1ac292285e217c77d2c9f9ce37e4c018c2f5e849) Co-authored-by: Deepesh Garg --- erpnext/controllers/sales_and_purchase_return.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/erpnext/controllers/sales_and_purchase_return.py b/erpnext/controllers/sales_and_purchase_return.py index 7f9a5a35a73..696d404d16d 100644 --- a/erpnext/controllers/sales_and_purchase_return.py +++ b/erpnext/controllers/sales_and_purchase_return.py @@ -24,6 +24,10 @@ def validate_return(doc): if doc.return_against: validate_return_against(doc) + + if doc.doctype in ("Sales Invoice", "Purchase Invoice") and not doc.update_stock: + return + validate_returned_items(doc) From 6980d1e142d25a3151ea5b12625a9f6e62e39352 Mon Sep 17 00:00:00 2001 From: mahsem <137205921+mahsem@users.noreply.github.com> Date: Thu, 5 Dec 2024 16:40:00 +0100 Subject: [PATCH 0625/1614] fix: add labels for translation in sales_order_analysis.py (cherry picked from commit 8a554a55382cf41855a0e22af89a55c8ec79a5e7) --- .../selling/report/sales_order_analysis/sales_order_analysis.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/selling/report/sales_order_analysis/sales_order_analysis.py b/erpnext/selling/report/sales_order_analysis/sales_order_analysis.py index 70b021a9cab..8fcf29bd7a6 100644 --- a/erpnext/selling/report/sales_order_analysis/sales_order_analysis.py +++ b/erpnext/selling/report/sales_order_analysis/sales_order_analysis.py @@ -206,7 +206,7 @@ def prepare_data(data, so_elapsed_time, filters): def prepare_chart_data(pending, completed): - labels = ["Amount to Bill", "Billed Amount"] + labels = [_("Amount to Bill"), _("Billed Amount")] return { "data": {"labels": labels, "datasets": [{"values": [pending, completed]}]}, From 773e03f84f9514b2d7558be14ea257b9596d4474 Mon Sep 17 00:00:00 2001 From: mahsem <137205921+mahsem@users.noreply.github.com> Date: Thu, 5 Dec 2024 16:20:31 +0100 Subject: [PATCH 0626/1614] fix: add strings for translation payment_terms_status_for_sales_order.py (cherry picked from commit 7d244051c8dd231abbd3bcd9717d95f7046ab3fc) --- .../payment_terms_status_for_sales_order.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/selling/report/payment_terms_status_for_sales_order/payment_terms_status_for_sales_order.py b/erpnext/selling/report/payment_terms_status_for_sales_order/payment_terms_status_for_sales_order.py index cf61a0e35f3..1b57a6d7390 100644 --- a/erpnext/selling/report/payment_terms_status_for_sales_order/payment_terms_status_for_sales_order.py +++ b/erpnext/selling/report/payment_terms_status_for_sales_order/payment_terms_status_for_sales_order.py @@ -270,11 +270,11 @@ def prepare_chart(s_orders): "labels": [term.payment_term for term in s_orders], "datasets": [ { - "name": "Payment Amount", + "name": _("Payment Amount"), "values": [x.base_payment_amount for x in s_orders], }, { - "name": "Paid Amount", + "name": _("Paid Amount"), "values": [x.paid_amount for x in s_orders], }, ], From 43fc8bf74e758ceb8c0a7170fff6fdc3c7ce0b9f Mon Sep 17 00:00:00 2001 From: mahsem <137205921+mahsem@users.noreply.github.com> Date: Thu, 5 Dec 2024 16:13:07 +0100 Subject: [PATCH 0627/1614] fix: add string for translation in delayed_tasks_summary.py (cherry picked from commit 84b54f549abc28b5b776c2833977044aa876fd34) --- .../report/delayed_tasks_summary/delayed_tasks_summary.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/projects/report/delayed_tasks_summary/delayed_tasks_summary.py b/erpnext/projects/report/delayed_tasks_summary/delayed_tasks_summary.py index 766e40e319c..dc3da259662 100644 --- a/erpnext/projects/report/delayed_tasks_summary/delayed_tasks_summary.py +++ b/erpnext/projects/report/delayed_tasks_summary/delayed_tasks_summary.py @@ -77,7 +77,7 @@ def get_chart_data(data): charts = { "data": { "labels": [_("On Track"), _("Delayed")], - "datasets": [{"name": "Delayed", "values": [on_track, delay]}], + "datasets": [{"name": _("Delayed"), "values": [on_track, delay]}], }, "type": "percentage", "colors": ["#84D5BA", "#CB4B5F"], From dd3a747af461a01b4fdafb877320460a85a864fe Mon Sep 17 00:00:00 2001 From: mahsem <137205921+mahsem@users.noreply.github.com> Date: Thu, 5 Dec 2024 09:17:35 +0100 Subject: [PATCH 0628/1614] fix: add labels for translation in quality_inspection_summary.py (cherry picked from commit 6ff4704345fcf299f959f61f05341da76680db69) --- .../quality_inspection_summary/quality_inspection_summary.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/manufacturing/report/quality_inspection_summary/quality_inspection_summary.py b/erpnext/manufacturing/report/quality_inspection_summary/quality_inspection_summary.py index 38e05852ee8..7e0fcf14cc6 100644 --- a/erpnext/manufacturing/report/quality_inspection_summary/quality_inspection_summary.py +++ b/erpnext/manufacturing/report/quality_inspection_summary/quality_inspection_summary.py @@ -42,7 +42,7 @@ def get_data(filters): def get_chart_data(periodic_data, columns): - labels = ["Rejected", "Accepted"] + labels = [_("Rejected"), _("Accepted")] status_wise_data = {"Accepted": 0, "Rejected": 0} @@ -53,7 +53,7 @@ def get_chart_data(periodic_data, columns): datasets.append( { - "name": "Qty Wise Chart", + "name": _("Qty Wise Chart"), "values": [status_wise_data.get("Rejected"), status_wise_data.get("Accepted")], } ) From 7a6cb0f157adb8a0e582e2d2c6806a2acc2e8a32 Mon Sep 17 00:00:00 2001 From: mahsem <137205921+mahsem@users.noreply.github.com> Date: Thu, 5 Dec 2024 09:02:05 +0100 Subject: [PATCH 0629/1614] fix: add labels for translation in production_analytics.py (cherry picked from commit 9b09116576f7645b9bdfc4e8be3c1c90c7516935) --- .../production_analytics/production_analytics.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/erpnext/manufacturing/report/production_analytics/production_analytics.py b/erpnext/manufacturing/report/production_analytics/production_analytics.py index c02c1e6fcd3..dc2b9ad62f3 100644 --- a/erpnext/manufacturing/report/production_analytics/production_analytics.py +++ b/erpnext/manufacturing/report/production_analytics/production_analytics.py @@ -131,11 +131,11 @@ def get_chart_data(periodic_data, columns): pending.append(periodic_data.get("Pending").get(d)) completed.append(periodic_data.get("Completed").get(d)) - datasets.append({"name": "All Work Orders", "values": all_data}) - datasets.append({"name": "Not Started", "values": not_start}) - datasets.append({"name": "Overdue", "values": overdue}) - datasets.append({"name": "Pending", "values": pending}) - datasets.append({"name": "Completed", "values": completed}) + datasets.append({"name": _("All Work Orders"), "values": all_data}) + datasets.append({"name": _("Not Started"), "values": not_start}) + datasets.append({"name": _("Overdue"), "values": overdue}) + datasets.append({"name": _("Pending"), "values": pending}) + datasets.append({"name": _("Completed"), "values": completed}) chart = {"data": {"labels": labels, "datasets": datasets}} chart["type"] = "line" From f06827c6fbdbbd74cf3c93a843a206e384cfdf5b Mon Sep 17 00:00:00 2001 From: mahsem <137205921+mahsem@users.noreply.github.com> Date: Thu, 5 Dec 2024 08:41:02 +0100 Subject: [PATCH 0630/1614] fix: add labels for translation in purchase_order_analysis.py (cherry picked from commit 342a398bec707688749c79b515462b5ea4bde734) --- .../report/purchase_order_analysis/purchase_order_analysis.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.py b/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.py index 1a250acd4d2..6d2034d1878 100644 --- a/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.py +++ b/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.py @@ -180,7 +180,7 @@ def prepare_data(data, filters): def prepare_chart_data(pending, completed): - labels = ["Amount to Bill", "Billed Amount"] + labels = [_("Amount to Bill"), _("Billed Amount")] return { "data": {"labels": labels, "datasets": [{"values": [pending, completed]}]}, From 31c2b818bdaf1e7b1dae39a045d8b2fdbd00d4e6 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 6 Dec 2024 11:57:48 +0100 Subject: [PATCH 0631/1614] fix(Bank Transaction): error in party matching should not block submitting (backport #44416) (#44574) fix(Bank Transaction): error in party matching should not block submitting (#44416) (cherry picked from commit 72256565bb2caf02f8e87b3ee0fbd0ee233c4f40) Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com> --- .../bank_transaction/bank_transaction.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/erpnext/accounts/doctype/bank_transaction/bank_transaction.py b/erpnext/accounts/doctype/bank_transaction/bank_transaction.py index 4354f238a42..c13dbe445f1 100644 --- a/erpnext/accounts/doctype/bank_transaction/bank_transaction.py +++ b/erpnext/accounts/doctype/bank_transaction/bank_transaction.py @@ -208,13 +208,17 @@ class BankTransaction(Document): if self.party_type and self.party: return - result = AutoMatchParty( - bank_party_account_number=self.bank_party_account_number, - bank_party_iban=self.bank_party_iban, - bank_party_name=self.bank_party_name, - description=self.description, - deposit=self.deposit, - ).match() + result = None + try: + result = AutoMatchParty( + bank_party_account_number=self.bank_party_account_number, + bank_party_iban=self.bank_party_iban, + bank_party_name=self.bank_party_name, + description=self.description, + deposit=self.deposit, + ).match() + except Exception: + frappe.log_error(title=_("Error in party matching for Bank Transaction {0}").format(self.name)) if not result: return From 03ae9e27be5acca32d3e15f8434a3f6062dc8c30 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 6 Dec 2024 21:50:49 +0530 Subject: [PATCH 0632/1614] fix: BOM name issue (backport #44575) (#44579) fix: BOM name issue (#44575) fix: bom name issue (cherry picked from commit b7a3c6b6ca902138007daff2343abe14f91157f7) Co-authored-by: rohitwaghchaure --- erpnext/manufacturing/doctype/bom/bom.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py index 0c087470901..2f48a498ec3 100644 --- a/erpnext/manufacturing/doctype/bom/bom.py +++ b/erpnext/manufacturing/doctype/bom/bom.py @@ -176,9 +176,14 @@ class BOM(WebsiteGenerator): search_key = f"{self.doctype}-{self.item}%" existing_boms = frappe.get_all( - "BOM", filters={"name": ("like", search_key), "amended_from": ["is", "not set"]}, pluck="name" + "BOM", filters={"name": search_key, "amended_from": ["is", "not set"]}, pluck="name" ) + if not existing_boms: + existing_boms = frappe.get_all( + "BOM", filters={"name": ("like", search_key), "amended_from": ["is", "not set"]}, pluck="name" + ) + if existing_boms: index = self.get_next_version_index(existing_boms) else: From 0b268279cfbe720917bd73ff952771e1eaae05b4 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 6 Dec 2024 22:35:37 +0530 Subject: [PATCH 0633/1614] fix: BOM for variant items (backport #44580) (#44584) fix: BOM for variant items (#44580) (cherry picked from commit 93e9517f5d6b023cba91d93cb77340691dd24ac0) Co-authored-by: rohitwaghchaure --- erpnext/manufacturing/doctype/bom/bom.js | 56 ++++++++++++------- .../doctype/work_order/work_order.py | 18 +++++- 2 files changed, 50 insertions(+), 24 deletions(-) diff --git a/erpnext/manufacturing/doctype/bom/bom.js b/erpnext/manufacturing/doctype/bom/bom.js index 5cfd170ab13..d8024a428a3 100644 --- a/erpnext/manufacturing/doctype/bom/bom.js +++ b/erpnext/manufacturing/doctype/bom/bom.js @@ -182,25 +182,30 @@ frappe.ui.form.on("BOM", { }, make_work_order(frm) { - frm.events.setup_variant_prompt(frm, "Work Order", (frm, item, data, variant_items) => { - frappe.call({ - method: "erpnext.manufacturing.doctype.work_order.work_order.make_work_order", - args: { - bom_no: frm.doc.name, - item: item, - qty: data.qty || 0.0, - project: frm.doc.project, - variant_items: variant_items, - }, - freeze: true, - callback(r) { - if (r.message) { - let doc = frappe.model.sync(r.message)[0]; - frappe.set_route("Form", doc.doctype, doc.name); - } - }, - }); - }); + frm.events.setup_variant_prompt( + frm, + "Work Order", + (frm, item, data, variant_items, use_multi_level_bom) => { + frappe.call({ + method: "erpnext.manufacturing.doctype.work_order.work_order.make_work_order", + args: { + bom_no: frm.doc.name, + item: item, + qty: data.qty || 0.0, + project: frm.doc.project, + variant_items: variant_items, + use_multi_level_bom: use_multi_level_bom, + }, + freeze: true, + callback(r) { + if (r.message) { + let doc = frappe.model.sync(r.message)[0]; + frappe.set_route("Form", doc.doctype, doc.name); + } + }, + }); + } + ); }, make_variant_bom(frm) { @@ -248,6 +253,13 @@ frappe.ui.form.on("BOM", { }; }, }); + + fields.push({ + fieldtype: "Check", + label: __("Use Multi-Level BOM"), + fieldname: "use_multi_level_bom", + default: 1, + }); } if (!skip_qty_field) { @@ -285,6 +297,7 @@ frappe.ui.form.on("BOM", { fieldname: "items", fieldtype: "Table", label: __("Raw Materials"), + depends_on: "eval:!doc.use_multi_level_bom", fields: [ { fieldname: "item_code", @@ -347,14 +360,15 @@ frappe.ui.form.on("BOM", { (data) => { let item = data.item || frm.doc.item; let variant_items = data.items || []; + let use_multi_level_bom = data.use_multi_level_bom || 0; variant_items.forEach((d) => { - if (!d.variant_item_code) { + if (!d.variant_item_code && !use_multi_level_bom) { frappe.throw(__("Select variant item code for the template item {0}", [d.item_code])); } }); - callback(frm, item, data, variant_items); + callback(frm, item, data, variant_items, use_multi_level_bom); }, __(title), __("Create") diff --git a/erpnext/manufacturing/doctype/work_order/work_order.py b/erpnext/manufacturing/doctype/work_order/work_order.py index 1d0df26800d..e5219d7cb3e 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order.py +++ b/erpnext/manufacturing/doctype/work_order/work_order.py @@ -1299,7 +1299,7 @@ def get_item_details(item, project=None, skip_bom_info=False, throw=True): @frappe.whitelist() -def make_work_order(bom_no, item, qty=0, project=None, variant_items=None): +def make_work_order(bom_no, item, qty=0, project=None, variant_items=None, use_multi_level_bom=None): if not frappe.has_permission("Work Order", "write"): frappe.throw(_("Not permitted"), frappe.PermissionError) @@ -1309,12 +1309,13 @@ def make_work_order(bom_no, item, qty=0, project=None, variant_items=None): wo_doc.production_item = item wo_doc.update(item_details) wo_doc.bom_no = bom_no + wo_doc.use_multi_level_bom = cint(use_multi_level_bom) if flt(qty) > 0: wo_doc.qty = flt(qty) wo_doc.get_items_and_operations_from_bom() - if variant_items: + if variant_items and not wo_doc.use_multi_level_bom: add_variant_item(variant_items, wo_doc, bom_no, "required_items") return wo_doc @@ -1358,7 +1359,18 @@ def add_variant_item(variant_items, wo_doc, bom_no, table_name="items"): args["amount"] = flt(args.get("required_qty")) * flt(args.get("rate")) args["uom"] = item_data.stock_uom - wo_doc.append(table_name, args) + + existing_row = get_template_rm_item(wo_doc, item.get("item_code")) + if existing_row: + existing_row.update(args) + else: + wo_doc.append(table_name, args) + + +def get_template_rm_item(wo_doc, item_code): + for row in wo_doc.required_items: + if row.item_code == item_code: + return row @frappe.whitelist() From 3c50cfef4e432f039979f8d389a240b95da39e09 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 5 Dec 2024 16:01:04 +0530 Subject: [PATCH 0634/1614] fix: variant qty while making work order from BOM (backport #44548) (#44551) fix: variant qty while making work order from BOM (#44548) (cherry picked from commit 1571dff3ef4c89c91e155967c0a187e8f855fe28) Co-authored-by: rohitwaghchaure (cherry picked from commit 63b1df38a81877168ea71047c9b29db144c4d8a9) --- erpnext/manufacturing/doctype/bom/bom.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/bom/bom.js b/erpnext/manufacturing/doctype/bom/bom.js index 6267ee4d029..5cfd170ab13 100644 --- a/erpnext/manufacturing/doctype/bom/bom.js +++ b/erpnext/manufacturing/doctype/bom/bom.js @@ -364,7 +364,7 @@ frappe.ui.form.on("BOM", { dialog.fields_dict.items.df.data.push({ item_code: d.item_code, variant_item_code: "", - qty: d.qty, + qty: (d.qty / frm.doc.quantity) * (dialog.fields_dict.qty.value || 1), source_warehouse: d.source_warehouse, operation: d.operation, }); From 27b63beb18c4a67a8043d8cfd5c0635427b47cec Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 6 Dec 2024 21:50:49 +0530 Subject: [PATCH 0635/1614] fix: BOM name issue (backport #44575) (#44579) fix: BOM name issue (#44575) fix: bom name issue (cherry picked from commit b7a3c6b6ca902138007daff2343abe14f91157f7) Co-authored-by: rohitwaghchaure (cherry picked from commit 03ae9e27be5acca32d3e15f8434a3f6062dc8c30) --- erpnext/manufacturing/doctype/bom/bom.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py index c3105b8e9ec..f8523c88933 100644 --- a/erpnext/manufacturing/doctype/bom/bom.py +++ b/erpnext/manufacturing/doctype/bom/bom.py @@ -176,9 +176,14 @@ class BOM(WebsiteGenerator): search_key = f"{self.doctype}-{self.item}%" existing_boms = frappe.get_all( - "BOM", filters={"name": ("like", search_key), "amended_from": ["is", "not set"]}, pluck="name" + "BOM", filters={"name": search_key, "amended_from": ["is", "not set"]}, pluck="name" ) + if not existing_boms: + existing_boms = frappe.get_all( + "BOM", filters={"name": ("like", search_key), "amended_from": ["is", "not set"]}, pluck="name" + ) + if existing_boms: index = self.get_next_version_index(existing_boms) else: From 2a2d8da6286f0db21f2c9498f5eda730a86edb5a Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 6 Dec 2024 22:35:37 +0530 Subject: [PATCH 0636/1614] fix: BOM for variant items (backport #44580) (#44584) fix: BOM for variant items (#44580) (cherry picked from commit 93e9517f5d6b023cba91d93cb77340691dd24ac0) Co-authored-by: rohitwaghchaure (cherry picked from commit 0b268279cfbe720917bd73ff952771e1eaae05b4) --- erpnext/manufacturing/doctype/bom/bom.js | 56 ++++++++++++------- .../doctype/work_order/work_order.py | 18 +++++- 2 files changed, 50 insertions(+), 24 deletions(-) diff --git a/erpnext/manufacturing/doctype/bom/bom.js b/erpnext/manufacturing/doctype/bom/bom.js index 6267ee4d029..63c114970ea 100644 --- a/erpnext/manufacturing/doctype/bom/bom.js +++ b/erpnext/manufacturing/doctype/bom/bom.js @@ -182,25 +182,30 @@ frappe.ui.form.on("BOM", { }, make_work_order(frm) { - frm.events.setup_variant_prompt(frm, "Work Order", (frm, item, data, variant_items) => { - frappe.call({ - method: "erpnext.manufacturing.doctype.work_order.work_order.make_work_order", - args: { - bom_no: frm.doc.name, - item: item, - qty: data.qty || 0.0, - project: frm.doc.project, - variant_items: variant_items, - }, - freeze: true, - callback(r) { - if (r.message) { - let doc = frappe.model.sync(r.message)[0]; - frappe.set_route("Form", doc.doctype, doc.name); - } - }, - }); - }); + frm.events.setup_variant_prompt( + frm, + "Work Order", + (frm, item, data, variant_items, use_multi_level_bom) => { + frappe.call({ + method: "erpnext.manufacturing.doctype.work_order.work_order.make_work_order", + args: { + bom_no: frm.doc.name, + item: item, + qty: data.qty || 0.0, + project: frm.doc.project, + variant_items: variant_items, + use_multi_level_bom: use_multi_level_bom, + }, + freeze: true, + callback(r) { + if (r.message) { + let doc = frappe.model.sync(r.message)[0]; + frappe.set_route("Form", doc.doctype, doc.name); + } + }, + }); + } + ); }, make_variant_bom(frm) { @@ -248,6 +253,13 @@ frappe.ui.form.on("BOM", { }; }, }); + + fields.push({ + fieldtype: "Check", + label: __("Use Multi-Level BOM"), + fieldname: "use_multi_level_bom", + default: 1, + }); } if (!skip_qty_field) { @@ -285,6 +297,7 @@ frappe.ui.form.on("BOM", { fieldname: "items", fieldtype: "Table", label: __("Raw Materials"), + depends_on: "eval:!doc.use_multi_level_bom", fields: [ { fieldname: "item_code", @@ -347,14 +360,15 @@ frappe.ui.form.on("BOM", { (data) => { let item = data.item || frm.doc.item; let variant_items = data.items || []; + let use_multi_level_bom = data.use_multi_level_bom || 0; variant_items.forEach((d) => { - if (!d.variant_item_code) { + if (!d.variant_item_code && !use_multi_level_bom) { frappe.throw(__("Select variant item code for the template item {0}", [d.item_code])); } }); - callback(frm, item, data, variant_items); + callback(frm, item, data, variant_items, use_multi_level_bom); }, __(title), __("Create") diff --git a/erpnext/manufacturing/doctype/work_order/work_order.py b/erpnext/manufacturing/doctype/work_order/work_order.py index 1d0df26800d..e5219d7cb3e 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order.py +++ b/erpnext/manufacturing/doctype/work_order/work_order.py @@ -1299,7 +1299,7 @@ def get_item_details(item, project=None, skip_bom_info=False, throw=True): @frappe.whitelist() -def make_work_order(bom_no, item, qty=0, project=None, variant_items=None): +def make_work_order(bom_no, item, qty=0, project=None, variant_items=None, use_multi_level_bom=None): if not frappe.has_permission("Work Order", "write"): frappe.throw(_("Not permitted"), frappe.PermissionError) @@ -1309,12 +1309,13 @@ def make_work_order(bom_no, item, qty=0, project=None, variant_items=None): wo_doc.production_item = item wo_doc.update(item_details) wo_doc.bom_no = bom_no + wo_doc.use_multi_level_bom = cint(use_multi_level_bom) if flt(qty) > 0: wo_doc.qty = flt(qty) wo_doc.get_items_and_operations_from_bom() - if variant_items: + if variant_items and not wo_doc.use_multi_level_bom: add_variant_item(variant_items, wo_doc, bom_no, "required_items") return wo_doc @@ -1358,7 +1359,18 @@ def add_variant_item(variant_items, wo_doc, bom_no, table_name="items"): args["amount"] = flt(args.get("required_qty")) * flt(args.get("rate")) args["uom"] = item_data.stock_uom - wo_doc.append(table_name, args) + + existing_row = get_template_rm_item(wo_doc, item.get("item_code")) + if existing_row: + existing_row.update(args) + else: + wo_doc.append(table_name, args) + + +def get_template_rm_item(wo_doc, item_code): + for row in wo_doc.required_items: + if row.item_code == item_code: + return row @frappe.whitelist() From a5cc30741703857556efe0f201a7bb91231eee0b Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Sat, 7 Dec 2024 12:58:34 +0530 Subject: [PATCH 0637/1614] fix: BOM name issue (backport #44586) (#44589) fix: BOM name issue (#44586) (cherry picked from commit d871e21a40943b3e9d52e2dd7233a128fa0f0ff6) Co-authored-by: rohitwaghchaure --- erpnext/manufacturing/doctype/bom/bom.js | 14 +++++----- erpnext/manufacturing/doctype/bom/bom.py | 34 ++++++++++-------------- 2 files changed, 21 insertions(+), 27 deletions(-) diff --git a/erpnext/manufacturing/doctype/bom/bom.js b/erpnext/manufacturing/doctype/bom/bom.js index d8024a428a3..36ada87111a 100644 --- a/erpnext/manufacturing/doctype/bom/bom.js +++ b/erpnext/manufacturing/doctype/bom/bom.js @@ -253,15 +253,15 @@ frappe.ui.form.on("BOM", { }; }, }); - - fields.push({ - fieldtype: "Check", - label: __("Use Multi-Level BOM"), - fieldname: "use_multi_level_bom", - default: 1, - }); } + fields.push({ + fieldtype: "Check", + label: __("Use Multi-Level BOM"), + fieldname: "use_multi_level_bom", + default: 1, + }); + if (!skip_qty_field) { fields.push({ fieldtype: "Float", diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py index 2f48a498ec3..730ff494801 100644 --- a/erpnext/manufacturing/doctype/bom/bom.py +++ b/erpnext/manufacturing/doctype/bom/bom.py @@ -179,15 +179,7 @@ class BOM(WebsiteGenerator): "BOM", filters={"name": search_key, "amended_from": ["is", "not set"]}, pluck="name" ) - if not existing_boms: - existing_boms = frappe.get_all( - "BOM", filters={"name": ("like", search_key), "amended_from": ["is", "not set"]}, pluck="name" - ) - - if existing_boms: - index = self.get_next_version_index(existing_boms) - else: - index = 1 + index = self.get_index_for_bom(existing_boms) prefix = self.doctype suffix = "%.3i" % index # convert index to string (1 -> "001") @@ -205,21 +197,23 @@ class BOM(WebsiteGenerator): name = f"{prefix}-{truncated_item_name}-{suffix}" if frappe.db.exists("BOM", name): - conflicting_bom = frappe.get_doc("BOM", name) + existing_boms = frappe.get_all( + "BOM", filters={"name": ("like", search_key), "amended_from": ["is", "not set"]}, pluck="name" + ) - if conflicting_bom.item != self.item: - msg = _("A BOM with name {0} already exists for item {1}.").format( - frappe.bold(name), frappe.bold(conflicting_bom.item) - ) - - frappe.throw( - _("{0}{1} Did you rename the item? Please contact Administrator / Tech support").format( - msg, "
" - ) - ) + index = self.get_index_for_bom(existing_boms) + suffix = "%.3i" % index + name = f"{prefix}-{self.item}-{suffix}" self.name = name + def get_index_for_bom(self, existing_boms): + index = 1 + if existing_boms: + index = self.get_next_version_index(existing_boms) + + return index + @staticmethod def get_next_version_index(existing_boms: list[str]) -> int: # split by "/" and "-" From 408a09233bfae90082a06ab21cf38ceaf7a9c7cb Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Sat, 7 Dec 2024 12:58:34 +0530 Subject: [PATCH 0638/1614] fix: BOM name issue (backport #44586) (#44589) fix: BOM name issue (#44586) (cherry picked from commit d871e21a40943b3e9d52e2dd7233a128fa0f0ff6) Co-authored-by: rohitwaghchaure (cherry picked from commit a5cc30741703857556efe0f201a7bb91231eee0b) # Conflicts: # erpnext/manufacturing/doctype/bom/bom.py --- erpnext/manufacturing/doctype/bom/bom.js | 7 ++++++ erpnext/manufacturing/doctype/bom/bom.py | 28 ++++++++++++++---------- 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/erpnext/manufacturing/doctype/bom/bom.js b/erpnext/manufacturing/doctype/bom/bom.js index 6267ee4d029..92e4715590b 100644 --- a/erpnext/manufacturing/doctype/bom/bom.js +++ b/erpnext/manufacturing/doctype/bom/bom.js @@ -250,6 +250,13 @@ frappe.ui.form.on("BOM", { }); } + fields.push({ + fieldtype: "Check", + label: __("Use Multi-Level BOM"), + fieldname: "use_multi_level_bom", + default: 1, + }); + if (!skip_qty_field) { fields.push({ fieldtype: "Float", diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py index c3105b8e9ec..41ea6f80f10 100644 --- a/erpnext/manufacturing/doctype/bom/bom.py +++ b/erpnext/manufacturing/doctype/bom/bom.py @@ -179,10 +179,14 @@ class BOM(WebsiteGenerator): "BOM", filters={"name": ("like", search_key), "amended_from": ["is", "not set"]}, pluck="name" ) +<<<<<<< HEAD if existing_boms: index = self.get_next_version_index(existing_boms) else: index = 1 +======= + index = self.get_index_for_bom(existing_boms) +>>>>>>> a5cc307417 (fix: BOM name issue (backport #44586) (#44589)) prefix = self.doctype suffix = "%.3i" % index # convert index to string (1 -> "001") @@ -200,21 +204,23 @@ class BOM(WebsiteGenerator): name = f"{prefix}-{truncated_item_name}-{suffix}" if frappe.db.exists("BOM", name): - conflicting_bom = frappe.get_doc("BOM", name) + existing_boms = frappe.get_all( + "BOM", filters={"name": ("like", search_key), "amended_from": ["is", "not set"]}, pluck="name" + ) - if conflicting_bom.item != self.item: - msg = _("A BOM with name {0} already exists for item {1}.").format( - frappe.bold(name), frappe.bold(conflicting_bom.item) - ) - - frappe.throw( - _("{0}{1} Did you rename the item? Please contact Administrator / Tech support").format( - msg, "
" - ) - ) + index = self.get_index_for_bom(existing_boms) + suffix = "%.3i" % index + name = f"{prefix}-{self.item}-{suffix}" self.name = name + def get_index_for_bom(self, existing_boms): + index = 1 + if existing_boms: + index = self.get_next_version_index(existing_boms) + + return index + @staticmethod def get_next_version_index(existing_boms: list[str]) -> int: # split by "/" and "-" From 3b57767d367ac4b54042b0ff73c038395f223520 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Sat, 7 Dec 2024 07:35:56 +0000 Subject: [PATCH 0639/1614] chore(release): Bumped to Version 15.45.1 ## [15.45.1](https://github.com/frappe/erpnext/compare/v15.45.0...v15.45.1) (2024-12-07) ### Bug Fixes * BOM for variant items (backport [#44580](https://github.com/frappe/erpnext/issues/44580)) ([#44584](https://github.com/frappe/erpnext/issues/44584)) ([2a2d8da](https://github.com/frappe/erpnext/commit/2a2d8da6286f0db21f2c9498f5eda730a86edb5a)) * BOM name issue (backport [#44575](https://github.com/frappe/erpnext/issues/44575)) ([#44579](https://github.com/frappe/erpnext/issues/44579)) ([27b63be](https://github.com/frappe/erpnext/commit/27b63beb18c4a67a8043d8cfd5c0635427b47cec)) * variant qty while making work order from BOM (backport [#44548](https://github.com/frappe/erpnext/issues/44548)) ([#44551](https://github.com/frappe/erpnext/issues/44551)) ([3c50cfe](https://github.com/frappe/erpnext/commit/3c50cfef4e432f039979f8d389a240b95da39e09)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index faee116955b..c0a4cea763c 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.45.0" +__version__ = "15.45.1" def get_default_company(user=None): From a204abcaa59f0502110536fa1cb9e8268dde7b1b Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Sat, 7 Dec 2024 13:10:40 +0530 Subject: [PATCH 0640/1614] chore: fix conflicts --- erpnext/manufacturing/doctype/bom/bom.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py index 41ea6f80f10..480a98f8916 100644 --- a/erpnext/manufacturing/doctype/bom/bom.py +++ b/erpnext/manufacturing/doctype/bom/bom.py @@ -179,14 +179,7 @@ class BOM(WebsiteGenerator): "BOM", filters={"name": ("like", search_key), "amended_from": ["is", "not set"]}, pluck="name" ) -<<<<<<< HEAD - if existing_boms: - index = self.get_next_version_index(existing_boms) - else: - index = 1 -======= index = self.get_index_for_bom(existing_boms) ->>>>>>> a5cc307417 (fix: BOM name issue (backport #44586) (#44589)) prefix = self.doctype suffix = "%.3i" % index # convert index to string (1 -> "001") From 0cd495a128015d14add5a66c619d6880af5dd465 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Sat, 7 Dec 2024 08:18:12 +0000 Subject: [PATCH 0641/1614] chore(release): Bumped to Version 15.45.2 ## [15.45.2](https://github.com/frappe/erpnext/compare/v15.45.1...v15.45.2) (2024-12-07) ### Bug Fixes * BOM name issue (backport [#44586](https://github.com/frappe/erpnext/issues/44586)) ([#44589](https://github.com/frappe/erpnext/issues/44589)) ([408a092](https://github.com/frappe/erpnext/commit/408a09233bfae90082a06ab21cf38ceaf7a9c7cb)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index c0a4cea763c..6eedda1f463 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.45.1" +__version__ = "15.45.2" def get_default_company(user=None): From 11fc560a88a66308d927c104d87c28ae5226a7ad Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Sun, 8 Dec 2024 14:44:19 +0530 Subject: [PATCH 0642/1614] fix: duplicate buttons --- erpnext/manufacturing/doctype/bom/bom.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/erpnext/manufacturing/doctype/bom/bom.js b/erpnext/manufacturing/doctype/bom/bom.js index 9d862e0bbdf..36ada87111a 100644 --- a/erpnext/manufacturing/doctype/bom/bom.js +++ b/erpnext/manufacturing/doctype/bom/bom.js @@ -253,13 +253,6 @@ frappe.ui.form.on("BOM", { }; }, }); - - fields.push({ - fieldtype: "Check", - label: __("Use Multi-Level BOM"), - fieldname: "use_multi_level_bom", - default: 1, - }); } fields.push({ From 6f80af0355ef1b26434b111e122b523487dd57c7 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Sun, 8 Dec 2024 09:23:09 +0000 Subject: [PATCH 0643/1614] chore(release): Bumped to Version 15.45.3 ## [15.45.3](https://github.com/frappe/erpnext/compare/v15.45.2...v15.45.3) (2024-12-08) ### Bug Fixes * duplicate buttons ([11fc560](https://github.com/frappe/erpnext/commit/11fc560a88a66308d927c104d87c28ae5226a7ad)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 6eedda1f463..cf0568e6cc6 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.45.2" +__version__ = "15.45.3" def get_default_company(user=None): From 608eaaa482507cd5724e4b05ee0dc99e0b6f5004 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Sun, 8 Dec 2024 16:06:41 +0530 Subject: [PATCH 0644/1614] fix: BOM has not attr required items (backport #44598) (#44600) fix: BOM has not attr required items (#44598) (cherry picked from commit 42d238da1425b5c8a72308c2522a9336d4ea89fb) Co-authored-by: rohitwaghchaure --- erpnext/manufacturing/doctype/bom/bom.js | 28 +++++++++++++++---- .../doctype/work_order/work_order.py | 4 ++- 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/erpnext/manufacturing/doctype/bom/bom.js b/erpnext/manufacturing/doctype/bom/bom.js index 36ada87111a..3a0bcf6b47e 100644 --- a/erpnext/manufacturing/doctype/bom/bom.js +++ b/erpnext/manufacturing/doctype/bom/bom.js @@ -255,12 +255,14 @@ frappe.ui.form.on("BOM", { }); } - fields.push({ - fieldtype: "Check", - label: __("Use Multi-Level BOM"), - fieldname: "use_multi_level_bom", - default: 1, - }); + if (!skip_qty_field) { + fields.push({ + fieldtype: "Check", + label: __("Use Multi-Level BOM"), + fieldname: "use_multi_level_bom", + default: 1, + }); + } if (!skip_qty_field) { fields.push({ @@ -306,6 +308,13 @@ frappe.ui.form.on("BOM", { fieldtype: "Link", in_list_view: 1, reqd: 1, + get_query() { + return { + filters: { + has_variants: 1, + }, + }; + }, }, { fieldname: "variant_item_code", @@ -326,6 +335,13 @@ frappe.ui.form.on("BOM", { }, }; }, + change() { + let doc = this.doc; + if (!doc.qty) { + doc.qty = 1.0; + this.grid.set_value("qty", 1.0, doc); + } + }, }, { fieldname: "qty", diff --git a/erpnext/manufacturing/doctype/work_order/work_order.py b/erpnext/manufacturing/doctype/work_order/work_order.py index e5219d7cb3e..9af3403ffa3 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order.py +++ b/erpnext/manufacturing/doctype/work_order/work_order.py @@ -1360,7 +1360,9 @@ def add_variant_item(variant_items, wo_doc, bom_no, table_name="items"): args["amount"] = flt(args.get("required_qty")) * flt(args.get("rate")) args["uom"] = item_data.stock_uom - existing_row = get_template_rm_item(wo_doc, item.get("item_code")) + existing_row = ( + get_template_rm_item(wo_doc, item.get("item_code")) if table_name == "required_items" else None + ) if existing_row: existing_row.update(args) else: From 2a17ecdc3949380215b03e4ae296de40efc2c11d Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Sun, 8 Dec 2024 16:07:06 +0530 Subject: [PATCH 0645/1614] fix: currency symbol in SCO and SCR (backport #44577) (#44594) * fix: currency symbol in SCO and SCR (#44577) (cherry picked from commit 8806d17ef1daa0a581aec5f4f20489346802cc19) # Conflicts: # erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order.json # erpnext/subcontracting/doctype/subcontracting_order_item/subcontracting_order_item.json # erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.json # erpnext/subcontracting/doctype/subcontracting_receipt_item/subcontracting_receipt_item.json * chore: fix conflicts * chore: fix conflicts * chore: fix conflicts * chore: fix conflicts --------- Co-authored-by: rohitwaghchaure --- .../subcontracting_order.json | 21 ++++++++------- .../subcontracting_order_item.json | 11 +++++--- .../subcontracting_order_item.py | 3 +++ .../subcontracting_receipt.json | 27 ++++++++++--------- .../subcontracting_receipt_item.json | 9 ++++--- .../subcontracting_receipt_item.py | 1 + 6 files changed, 42 insertions(+), 30 deletions(-) diff --git a/erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order.json b/erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order.json index b8bda832983..206e3135dfb 100644 --- a/erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order.json +++ b/erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order.json @@ -294,7 +294,7 @@ "fieldname": "total", "fieldtype": "Currency", "label": "Total", - "options": "currency", + "options": "Company:company:default_currency", "read_only": 1 }, { @@ -353,6 +353,7 @@ "fieldname": "total_additional_costs", "fieldtype": "Currency", "label": "Total Additional Costs", + "options": "Company:company:default_currency", "print_hide_if_no_value": 1, "read_only": 1 }, @@ -450,21 +451,21 @@ "options": "Project" }, { - "fieldname": "tab_other_info", - "fieldtype": "Tab Break", - "label": "Other Info" + "fieldname": "tab_other_info", + "fieldtype": "Tab Break", + "label": "Other Info" }, { - "fieldname": "tab_connections", - "fieldtype": "Tab Break", - "label": "Connections", - "show_dashboard": 1 + "fieldname": "tab_connections", + "fieldtype": "Tab Break", + "label": "Connections", + "show_dashboard": 1 } ], "icon": "fa fa-file-text", "is_submittable": 1, "links": [], - "modified": "2024-01-03 20:56:04.670380", + "modified": "2024-12-06 15:21:49.924146", "modified_by": "Administrator", "module": "Subcontracting", "name": "Subcontracting Order", @@ -519,4 +520,4 @@ "timeline_field": "supplier", "title_field": "supplier_name", "track_changes": 1 -} \ No newline at end of file +} diff --git a/erpnext/subcontracting/doctype/subcontracting_order_item/subcontracting_order_item.json b/erpnext/subcontracting/doctype/subcontracting_order_item/subcontracting_order_item.json index 1ca90c31654..502a28b3ec6 100644 --- a/erpnext/subcontracting/doctype/subcontracting_order_item/subcontracting_order_item.json +++ b/erpnext/subcontracting/doctype/subcontracting_order_item/subcontracting_order_item.json @@ -185,7 +185,7 @@ "fieldtype": "Currency", "in_list_view": 1, "label": "Rate", - "options": "currency", + "options": "Company:company:default_currency", "read_only": 1, "reqd": 1 }, @@ -199,7 +199,7 @@ "fieldtype": "Currency", "in_list_view": 1, "label": "Amount", - "options": "currency", + "options": "Company:company:default_currency", "read_only": 1, "reqd": 1 }, @@ -269,6 +269,7 @@ "fieldname": "service_cost_per_qty", "fieldtype": "Currency", "label": "Service Cost Per Qty", + "options": "Company:company:default_currency", "read_only": 1, "reqd": 1 }, @@ -277,6 +278,7 @@ "fieldname": "additional_cost_per_qty", "fieldtype": "Currency", "label": "Additional Cost Per Qty", + "options": "Company:company:default_currency", "read_only": 1 }, { @@ -284,6 +286,7 @@ "fieldtype": "Currency", "label": "Raw Material Cost Per Qty", "no_copy": 1, + "options": "Company:company:default_currency", "read_only": 1 }, { @@ -384,7 +387,7 @@ "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2023-11-30 15:29:43.744618", + "modified": "2024-12-06 15:23:05.252346", "modified_by": "Administrator", "module": "Subcontracting", "name": "Subcontracting Order Item", @@ -397,4 +400,4 @@ "sort_order": "DESC", "states": [], "track_changes": 1 -} \ No newline at end of file +} diff --git a/erpnext/subcontracting/doctype/subcontracting_order_item/subcontracting_order_item.py b/erpnext/subcontracting/doctype/subcontracting_order_item/subcontracting_order_item.py index fcd143c1dd9..7a426f91cb0 100644 --- a/erpnext/subcontracting/doctype/subcontracting_order_item/subcontracting_order_item.py +++ b/erpnext/subcontracting/doctype/subcontracting_order_item/subcontracting_order_item.py @@ -26,8 +26,11 @@ class SubcontractingOrderItem(Document): include_exploded_items: DF.Check item_code: DF.Link item_name: DF.Data + job_card: DF.Link | None manufacturer: DF.Link | None manufacturer_part_no: DF.Data | None + material_request: DF.Link | None + material_request_item: DF.Data | None page_break: DF.Check parent: DF.Data parentfield: DF.Data diff --git a/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.json b/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.json index ad03171f29a..b8bd95bcbca 100644 --- a/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.json +++ b/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.json @@ -336,7 +336,7 @@ "fieldname": "total", "fieldtype": "Currency", "label": "Total", - "options": "currency", + "options": "Company:company:default_currency", "read_only": 1 }, { @@ -618,6 +618,7 @@ "fieldname": "total_additional_costs", "fieldtype": "Currency", "label": "Total Additional Costs", + "options": "Company:company:default_currency", "print_hide_if_no_value": 1, "read_only": 1 }, @@ -656,27 +657,27 @@ "fieldtype": "Column Break" }, { - "fieldname": "tab_other_info", - "fieldtype": "Tab Break", - "label": "Other Info" + "fieldname": "tab_other_info", + "fieldtype": "Tab Break", + "label": "Other Info" }, { - "collapsible": 1, - "fieldname": "order_status_section", - "fieldtype": "Section Break", - "label": "Order Status" + "collapsible": 1, + "fieldname": "order_status_section", + "fieldtype": "Section Break", + "label": "Order Status" }, { - "fieldname": "tab_connections", - "fieldtype": "Tab Break", - "label": "Connections", - "show_dashboard": 1 + "fieldname": "tab_connections", + "fieldtype": "Tab Break", + "label": "Connections", + "show_dashboard": 1 } ], "in_create": 1, "is_submittable": 1, "links": [], - "modified": "2024-05-28 15:02:13.517969", + "modified": "2024-12-06 15:24:38.384232", "modified_by": "Administrator", "module": "Subcontracting", "name": "Subcontracting Receipt", diff --git a/erpnext/subcontracting/doctype/subcontracting_receipt_item/subcontracting_receipt_item.json b/erpnext/subcontracting/doctype/subcontracting_receipt_item/subcontracting_receipt_item.json index 75e263e2c1c..23a7e69669d 100644 --- a/erpnext/subcontracting/doctype/subcontracting_receipt_item/subcontracting_receipt_item.json +++ b/erpnext/subcontracting/doctype/subcontracting_receipt_item/subcontracting_receipt_item.json @@ -207,7 +207,7 @@ "fieldtype": "Currency", "in_list_view": 1, "label": "Rate", - "options": "currency", + "options": "Company:company:default_currency", "print_width": "100px", "read_only": 1, "width": "100px" @@ -217,7 +217,7 @@ "fieldtype": "Currency", "in_list_view": 1, "label": "Amount", - "options": "currency", + "options": "Company:company:default_currency", "read_only": 1 }, { @@ -231,6 +231,7 @@ "fieldtype": "Currency", "label": "Raw Material Cost Per Qty", "no_copy": 1, + "options": "Company:company:default_currency", "read_only": 1 }, { @@ -239,6 +240,7 @@ "fieldname": "service_cost_per_qty", "fieldtype": "Currency", "label": "Service Cost Per Qty", + "options": "Company:company:default_currency", "read_only": 1, "reqd": 1 }, @@ -248,6 +250,7 @@ "fieldname": "additional_cost_per_qty", "fieldtype": "Currency", "label": "Additional Cost Per Qty", + "options": "Company:company:default_currency", "read_only": 1 }, { @@ -582,7 +585,7 @@ "idx": 1, "istable": 1, "links": [], - "modified": "2024-03-29 15:42:43.425544", + "modified": "2024-12-06 15:23:58.680169", "modified_by": "Administrator", "module": "Subcontracting", "name": "Subcontracting Receipt Item", diff --git a/erpnext/subcontracting/doctype/subcontracting_receipt_item/subcontracting_receipt_item.py b/erpnext/subcontracting/doctype/subcontracting_receipt_item/subcontracting_receipt_item.py index 1a4ce5b977a..69f7ae73e7a 100644 --- a/erpnext/subcontracting/doctype/subcontracting_receipt_item/subcontracting_receipt_item.py +++ b/erpnext/subcontracting/doctype/subcontracting_receipt_item/subcontracting_receipt_item.py @@ -28,6 +28,7 @@ class SubcontractingReceiptItem(Document): is_scrap_item: DF.Check item_code: DF.Link item_name: DF.Data | None + job_card: DF.Link | None manufacturer: DF.Link | None manufacturer_part_no: DF.Data | None page_break: DF.Check From 971e474640de208d023d3a69979613395cb9d387 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Sun, 8 Dec 2024 16:06:41 +0530 Subject: [PATCH 0646/1614] fix: BOM has not attr required items (backport #44598) (#44600) fix: BOM has not attr required items (#44598) (cherry picked from commit 42d238da1425b5c8a72308c2522a9336d4ea89fb) Co-authored-by: rohitwaghchaure (cherry picked from commit 608eaaa482507cd5724e4b05ee0dc99e0b6f5004) --- erpnext/manufacturing/doctype/bom/bom.js | 28 +++++++++++++++---- .../doctype/work_order/work_order.py | 4 ++- 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/erpnext/manufacturing/doctype/bom/bom.js b/erpnext/manufacturing/doctype/bom/bom.js index 36ada87111a..3a0bcf6b47e 100644 --- a/erpnext/manufacturing/doctype/bom/bom.js +++ b/erpnext/manufacturing/doctype/bom/bom.js @@ -255,12 +255,14 @@ frappe.ui.form.on("BOM", { }); } - fields.push({ - fieldtype: "Check", - label: __("Use Multi-Level BOM"), - fieldname: "use_multi_level_bom", - default: 1, - }); + if (!skip_qty_field) { + fields.push({ + fieldtype: "Check", + label: __("Use Multi-Level BOM"), + fieldname: "use_multi_level_bom", + default: 1, + }); + } if (!skip_qty_field) { fields.push({ @@ -306,6 +308,13 @@ frappe.ui.form.on("BOM", { fieldtype: "Link", in_list_view: 1, reqd: 1, + get_query() { + return { + filters: { + has_variants: 1, + }, + }; + }, }, { fieldname: "variant_item_code", @@ -326,6 +335,13 @@ frappe.ui.form.on("BOM", { }, }; }, + change() { + let doc = this.doc; + if (!doc.qty) { + doc.qty = 1.0; + this.grid.set_value("qty", 1.0, doc); + } + }, }, { fieldname: "qty", diff --git a/erpnext/manufacturing/doctype/work_order/work_order.py b/erpnext/manufacturing/doctype/work_order/work_order.py index e5219d7cb3e..9af3403ffa3 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order.py +++ b/erpnext/manufacturing/doctype/work_order/work_order.py @@ -1360,7 +1360,9 @@ def add_variant_item(variant_items, wo_doc, bom_no, table_name="items"): args["amount"] = flt(args.get("required_qty")) * flt(args.get("rate")) args["uom"] = item_data.stock_uom - existing_row = get_template_rm_item(wo_doc, item.get("item_code")) + existing_row = ( + get_template_rm_item(wo_doc, item.get("item_code")) if table_name == "required_items" else None + ) if existing_row: existing_row.update(args) else: From 3c8abe41e799043db43cfcad7d9c49439521ccbc Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Sun, 8 Dec 2024 11:01:12 +0000 Subject: [PATCH 0647/1614] chore(release): Bumped to Version 15.45.4 ## [15.45.4](https://github.com/frappe/erpnext/compare/v15.45.3...v15.45.4) (2024-12-08) ### Bug Fixes * BOM has not attr required items (backport [#44598](https://github.com/frappe/erpnext/issues/44598)) ([#44600](https://github.com/frappe/erpnext/issues/44600)) ([971e474](https://github.com/frappe/erpnext/commit/971e474640de208d023d3a69979613395cb9d387)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index cf0568e6cc6..bb8bf11b7ea 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.45.3" +__version__ = "15.45.4" def get_default_company(user=None): From 47e1ed1eff0a14fef46881ac42843b43d5ce43d0 Mon Sep 17 00:00:00 2001 From: mahsem <137205921+mahsem@users.noreply.github.com> Date: Fri, 6 Dec 2024 14:59:16 +0100 Subject: [PATCH 0648/1614] fix: add docstatus for translation (cherry picked from commit dda272220bcc65768ef0adcdb48d23baba576481) --- erpnext/templates/includes/issue_row.html | 2 +- erpnext/templates/includes/projects/project_row.html | 2 +- erpnext/templates/includes/transaction_row.html | 2 +- erpnext/templates/pages/timelog_info.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/erpnext/templates/includes/issue_row.html b/erpnext/templates/includes/issue_row.html index a04f558509f..b55712ab189 100644 --- a/erpnext/templates/includes/issue_row.html +++ b/erpnext/templates/includes/issue_row.html @@ -18,7 +18,7 @@ {% if doc.status == "Open" %} {{ doc.priority }} {% else %} - {{ doc.status }} + {{ _(doc.status) }} {%- endif -%} diff --git a/erpnext/templates/includes/projects/project_row.html b/erpnext/templates/includes/projects/project_row.html index 686637a2014..ccb306afcdb 100644 --- a/erpnext/templates/includes/projects/project_row.html +++ b/erpnext/templates/includes/projects/project_row.html @@ -20,7 +20,7 @@ {% else %} - {{ doc.status }} + {{ _(doc.status) }} {% endif %} {% if doc["_assign"] %} diff --git a/erpnext/templates/includes/transaction_row.html b/erpnext/templates/includes/transaction_row.html index a498ba0eefa..061c9bd1796 100644 --- a/erpnext/templates/includes/transaction_row.html +++ b/erpnext/templates/includes/transaction_row.html @@ -8,7 +8,7 @@
- {{doc.status}} + {{ _(doc.status) }}
diff --git a/erpnext/templates/pages/timelog_info.html b/erpnext/templates/pages/timelog_info.html index be13826444c..9f9445661a0 100644 --- a/erpnext/templates/pages/timelog_info.html +++ b/erpnext/templates/pages/timelog_info.html @@ -38,7 +38,7 @@ - + From 2560beb69581ef74551e892e54410cde0fb13a00 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 9 Dec 2024 12:58:20 +0530 Subject: [PATCH 0649/1614] fix: prevent set_payment_schedule on return documents --- erpnext/stock/doctype/delivery_note/delivery_note.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.py b/erpnext/stock/doctype/delivery_note/delivery_note.py index 0bc6b28fe68..2b4dad137c2 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note.py +++ b/erpnext/stock/doctype/delivery_note/delivery_note.py @@ -1046,7 +1046,7 @@ def make_sales_invoice(source_name, target_doc=None, args=None): automatically_fetch_payment_terms = cint( frappe.db.get_single_value("Accounts Settings", "automatically_fetch_payment_terms") ) - if automatically_fetch_payment_terms: + if automatically_fetch_payment_terms and not doc.is_return: doc.set_payment_schedule() return doc From cce1cc66747cdf3f4a8fe210b53298c41417526f Mon Sep 17 00:00:00 2001 From: ljain112 Date: Wed, 4 Dec 2024 20:40:08 +0530 Subject: [PATCH 0650/1614] fix: correct color for draft in list view (cherry picked from commit 143acf23303a1cf8a3dff7ec60be694974badb4a) --- .../accounts/doctype/payment_request/payment_request_list.js | 2 +- erpnext/accounts/doctype/sales_invoice/sales_invoice_list.js | 2 +- erpnext/stock/doctype/pick_list/pick_list_list.js | 2 +- .../doctype/subcontracting_order/subcontracting_order_list.js | 2 +- .../subcontracting_receipt/subcontracting_receipt_list.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/erpnext/accounts/doctype/payment_request/payment_request_list.js b/erpnext/accounts/doctype/payment_request/payment_request_list.js index 1027385aaaf..6e4aada66c6 100644 --- a/erpnext/accounts/doctype/payment_request/payment_request_list.js +++ b/erpnext/accounts/doctype/payment_request/payment_request_list.js @@ -1,7 +1,7 @@ const INDICATORS = { "Partially Paid": "orange", Cancelled: "red", - Draft: "gray", + Draft: "red", Failed: "red", Initiated: "green", Paid: "blue", diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice_list.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice_list.js index f971f68a454..3371a63cca2 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice_list.js +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice_list.js @@ -15,7 +15,7 @@ frappe.listview_settings["Sales Invoice"] = { ], get_indicator: function (doc) { const status_colors = { - Draft: "grey", + Draft: "red", Unpaid: "orange", Paid: "green", Return: "gray", diff --git a/erpnext/stock/doctype/pick_list/pick_list_list.js b/erpnext/stock/doctype/pick_list/pick_list_list.js index 9cdbfe18720..eca6eece785 100644 --- a/erpnext/stock/doctype/pick_list/pick_list_list.js +++ b/erpnext/stock/doctype/pick_list/pick_list_list.js @@ -4,7 +4,7 @@ frappe.listview_settings["Pick List"] = { get_indicator: function (doc) { const status_colors = { - Draft: "grey", + Draft: "red", Open: "orange", Completed: "green", Cancelled: "red", diff --git a/erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order_list.js b/erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order_list.js index 895ffdbf88c..f5486bbd59d 100644 --- a/erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order_list.js +++ b/erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order_list.js @@ -4,7 +4,7 @@ frappe.listview_settings["Subcontracting Order"] = { get_indicator: function (doc) { const status_colors = { - Draft: "grey", + Draft: "red", Open: "orange", "Partially Received": "yellow", Completed: "green", diff --git a/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt_list.js b/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt_list.js index be6c0d0b18f..5f5a6db01e0 100644 --- a/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt_list.js +++ b/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt_list.js @@ -4,7 +4,7 @@ frappe.listview_settings["Subcontracting Receipt"] = { get_indicator: function (doc) { const status_colors = { - Draft: "grey", + Draft: "red", Return: "gray", "Return Issued": "grey", Completed: "green", From 243bf542c43de476c8d0c26c34bd45d31e72f905 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 14:56:10 +0530 Subject: [PATCH 0651/1614] fix: description overwrite on qty change (backport #44606) (#44609) fix: description overwrite on qty change (#44606) (cherry picked from commit 9ad79625e02772a6c72b5eacfd7ebf5f38706675) Co-authored-by: rohitwaghchaure --- erpnext/stock/doctype/material_request/material_request.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/erpnext/stock/doctype/material_request/material_request.js b/erpnext/stock/doctype/material_request/material_request.js index c7485470cf0..09c01a0ee88 100644 --- a/erpnext/stock/doctype/material_request/material_request.js +++ b/erpnext/stock/doctype/material_request/material_request.js @@ -259,18 +259,21 @@ frappe.ui.form.on("Material Request", { }, callback: function (r) { const d = item; - const allow_to_change_fields = [ + let allow_to_change_fields = [ "actual_qty", "projected_qty", "min_order_qty", "item_name", - "description", "stock_uom", "uom", "conversion_factor", "stock_qty", ]; + if (overwrite_warehouse) { + allow_to_change_fields.push("description"); + } + if (!r.exc) { $.each(r.message, function (key, value) { if (!d[key] || allow_to_change_fields.includes(key)) { From 04b07a9e1c0235d5a8515973f55c2676532dfcc3 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 19:11:49 +0530 Subject: [PATCH 0652/1614] fix: not able to make sales return entry (backport #44605) (#44613) fix: not able to make sales return entry (#44605) (cherry picked from commit 314c7b8d2afa6abda3386b5f8f7dcf2ce659ffc0) Co-authored-by: rohitwaghchaure --- .../doctype/serial_and_batch_bundle/serial_and_batch_bundle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 fff9cbfc07d..4bd8f5e8465 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 @@ -223,7 +223,7 @@ class SerialandBatchBundle(Document): else: valuation_rate = valuation_details["batches"].get(row.batch_no) - row.incoming_rate = valuation_rate + row.incoming_rate = flt(valuation_rate) row.stock_value_difference = flt(row.qty) * flt(row.incoming_rate) if save: From bdb60a51c3232dc14b052822463a43b67b16ed8f Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 20:30:45 +0530 Subject: [PATCH 0653/1614] fix: do not allow to inward same serial nos multiple times (backport #44617) (#44619) * fix: do not allow to inward same serial nos multiple times (#44617) (cherry picked from commit 616bb383c5434e43b32099f5e21d679c0bb0baae) # Conflicts: # erpnext/patches.txt * chore: fix conflicts --------- Co-authored-by: rohitwaghchaure --- erpnext/patches.txt | 1 + .../v15_0/enable_allow_existing_serial_no.py | 6 ++ .../purchase_receipt/test_purchase_receipt.py | 36 ++++++++++ .../serial_and_batch_bundle.py | 68 +++++++++++++++++-- .../stock_settings/stock_settings.json | 11 ++- .../doctype/stock_settings/stock_settings.py | 1 + 6 files changed, 114 insertions(+), 9 deletions(-) create mode 100644 erpnext/patches/v15_0/enable_allow_existing_serial_no.py diff --git a/erpnext/patches.txt b/erpnext/patches.txt index f53769155bd..a916478d4b3 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -384,3 +384,4 @@ erpnext.patches.v15_0.update_task_assignee_email_field_in_asset_maintenance_log erpnext.patches.v15_0.update_sub_voucher_type_in_gl_entries erpnext.patches.v14_0.update_stock_uom_in_work_order_item erpnext.patches.v15_0.set_is_exchange_gain_loss_in_payment_entry_deductions +erpnext.patches.v15_0.enable_allow_existing_serial_no diff --git a/erpnext/patches/v15_0/enable_allow_existing_serial_no.py b/erpnext/patches/v15_0/enable_allow_existing_serial_no.py new file mode 100644 index 00000000000..e13adc2b187 --- /dev/null +++ b/erpnext/patches/v15_0/enable_allow_existing_serial_no.py @@ -0,0 +1,6 @@ +import frappe + + +def execute(): + if frappe.get_all("Company", filters={"country": "India"}, limit=1): + frappe.db.set_single_value("Stock Settings", "allow_existing_serial_no", 1) diff --git a/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py index 4b8d5101f43..86d1a6948de 100644 --- a/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py +++ b/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py @@ -3948,6 +3948,42 @@ class TestPurchaseReceipt(FrappeTestCase): self.assertEqual(return_pr.per_billed, 100) self.assertEqual(return_pr.status, "Completed") + def test_do_not_allow_to_inward_same_serial_no_multiple_times(self): + from erpnext.stock.doctype.stock_entry.test_stock_entry import make_stock_entry + + frappe.db.set_single_value("Stock Settings", "allow_existing_serial_no", 0) + + item_code = make_item( + "Test Do Not Allow INWD Item 123", {"has_serial_no": 1, "serial_no_series": "SN-TDAISN-.#####"} + ).name + + pr = make_purchase_receipt(item_code=item_code, qty=1, rate=100, use_serial_batch_fields=1) + serial_no = get_serial_nos_from_bundle(pr.items[0].serial_and_batch_bundle)[0] + + status = frappe.db.get_value("Serial No", serial_no, "status") + self.assertTrue(status == "Active") + + make_stock_entry( + item_code=item_code, + source=pr.items[0].warehouse, + qty=1, + serial_no=serial_no, + use_serial_batch_fields=1, + ) + + status = frappe.db.get_value("Serial No", serial_no, "status") + self.assertFalse(status == "Active") + + pr = make_purchase_receipt( + item_code=item_code, qty=1, rate=100, use_serial_batch_fields=1, do_not_submit=1 + ) + pr.items[0].serial_no = serial_no + pr.save() + + self.assertRaises(frappe.exceptions.ValidationError, pr.submit) + + frappe.db.set_single_value("Stock Settings", "allow_existing_serial_no", 1) + def prepare_data_for_internal_transfer(): from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_internal_supplier 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 4bd8f5e8465..a1f3135b70b 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 @@ -89,6 +89,10 @@ class SerialandBatchBundle(Document): self.validate_serial_and_batch_no() self.validate_duplicate_serial_and_batch_no() self.validate_voucher_no() + + if self.docstatus == 0: + self.allow_existing_serial_nos() + if self.type_of_transaction == "Maintenance": return @@ -102,6 +106,42 @@ class SerialandBatchBundle(Document): self.set_incoming_rate() self.calculate_qty_and_amount() + def allow_existing_serial_nos(self): + if self.type_of_transaction == "Outward" or not self.has_serial_no: + return + + if frappe.db.get_single_value("Stock Settings", "allow_existing_serial_no"): + return + + if self.voucher_type not in ["Purchase Receipt", "Purchase Invoice", "Stock Entry"]: + return + + if self.voucher_type == "Stock Entry" and frappe.get_cached_value( + "Stock Entry", self.voucher_no, "purpose" + ) in ["Material Transfer", "Send to Subcontractor", "Material Transfer for Manufacture"]: + return + + serial_nos = [d.serial_no for d in self.entries if d.serial_no] + + data = frappe.get_all( + "Serial and Batch Entry", + filters={"serial_no": ("in", serial_nos), "docstatus": 1, "qty": ("<", 0)}, + fields=["serial_no", "parent"], + ) + + note = "

Note:
" + for row in data: + frappe.throw( + _( + "You can't process the serial number {0} as it has already been used in the SABB {1}. {2} if you want to inward same serial number multiple times then enabled 'Allow existing Serial No to be Manufactured/Received again' in the {3}" + ).format( + row.serial_no, + get_link_to_form("Serial and Batch Bundle", row.parent), + note, + get_link_to_form("Stock Settings", "Stock Settings"), + ) + ) + def reset_serial_batch_bundle(self): if self.is_new() and self.amended_from: for field in ["is_cancelled", "is_rejected"]: @@ -136,7 +176,12 @@ class SerialandBatchBundle(Document): return serial_nos = [d.serial_no for d in self.entries if d.serial_no] - kwargs = {"item_code": self.item_code, "warehouse": self.warehouse} + kwargs = { + "item_code": self.item_code, + "warehouse": self.warehouse, + "check_serial_nos": True, + "serial_nos": serial_nos, + } if self.voucher_type == "POS Invoice": kwargs["ignore_voucher_nos"] = [self.voucher_no] @@ -177,6 +222,7 @@ class SerialandBatchBundle(Document): "posting_date": self.posting_date, "posting_time": self.posting_time, "serial_nos": serial_nos, + "check_serial_nos": True, } ) @@ -1683,7 +1729,7 @@ def get_serial_nos_based_on_posting_date(kwargs, ignore_serial_nos): serial_nos = set() data = get_stock_ledgers_for_serial_nos(kwargs) - bundle_wise_serial_nos = get_bundle_wise_serial_nos(data) + bundle_wise_serial_nos = get_bundle_wise_serial_nos(data, kwargs) for d in data: if d.serial_and_batch_bundle: if sns := bundle_wise_serial_nos.get(d.serial_and_batch_bundle): @@ -1707,16 +1753,21 @@ def get_serial_nos_based_on_posting_date(kwargs, ignore_serial_nos): return serial_nos -def get_bundle_wise_serial_nos(data): +def get_bundle_wise_serial_nos(data, kwargs): bundle_wise_serial_nos = defaultdict(list) bundles = [d.serial_and_batch_bundle for d in data if d.serial_and_batch_bundle] if not bundles: return bundle_wise_serial_nos + filters = {"parent": ("in", bundles), "docstatus": 1, "serial_no": ("is", "set")} + + if kwargs.get("check_serial_nos") and kwargs.get("serial_nos"): + filters["serial_no"] = ("in", kwargs.get("serial_nos")) + bundle_data = frappe.get_all( "Serial and Batch Entry", fields=["serial_no", "parent"], - filters={"parent": ("in", bundles), "docstatus": 1, "serial_no": ("is", "set")}, + filters=filters, ) for d in bundle_data: @@ -2277,6 +2328,8 @@ def get_ledgers_from_serial_batch_bundle(**kwargs) -> list[frappe._dict]: def get_stock_ledgers_for_serial_nos(kwargs): + from erpnext.stock.utils import get_combine_datetime + stock_ledger_entry = frappe.qb.DocType("Stock Ledger Entry") query = ( @@ -2287,15 +2340,16 @@ def get_stock_ledgers_for_serial_nos(kwargs): stock_ledger_entry.serial_and_batch_bundle, ) .where(stock_ledger_entry.is_cancelled == 0) + .orderby(stock_ledger_entry.posting_datetime) ) if kwargs.get("posting_date"): if kwargs.get("posting_time") is None: kwargs.posting_time = nowtime() - timestamp_condition = CombineDatetime( - stock_ledger_entry.posting_date, stock_ledger_entry.posting_time - ) <= CombineDatetime(kwargs.posting_date, kwargs.posting_time) + timestamp_condition = stock_ledger_entry.posting_datetime <= get_combine_datetime( + kwargs.posting_date, kwargs.posting_time + ) query = query.where(timestamp_condition) diff --git a/erpnext/stock/doctype/stock_settings/stock_settings.json b/erpnext/stock/doctype/stock_settings/stock_settings.json index 069e7da41cb..e542a1582e3 100644 --- a/erpnext/stock/doctype/stock_settings/stock_settings.json +++ b/erpnext/stock/doctype/stock_settings/stock_settings.json @@ -49,12 +49,13 @@ "do_not_use_batchwise_valuation", "auto_create_serial_and_batch_bundle_for_outward", "pick_serial_and_batch_based_on", + "naming_series_prefix", "column_break_mhzc", "disable_serial_no_and_batch_selector", "use_naming_series", - "naming_series_prefix", "use_serial_batch_fields", "do_not_update_serial_batch_on_creation_of_auto_bundle", + "allow_existing_serial_no", "stock_planning_tab", "auto_material_request", "auto_indent", @@ -460,6 +461,12 @@ "fieldname": "over_picking_allowance", "fieldtype": "Percent", "label": "Over Picking Allowance" + }, + { + "default": "1", + "fieldname": "allow_existing_serial_no", + "fieldtype": "Check", + "label": "Allow existing Serial No to be Manufactured/Received again" } ], "icon": "icon-cog", @@ -467,7 +474,7 @@ "index_web_pages_for_search": 1, "issingle": 1, "links": [], - "modified": "2024-07-29 14:55:19.093508", + "modified": "2024-12-09 17:52:36.030456", "modified_by": "Administrator", "module": "Stock", "name": "Stock Settings", diff --git a/erpnext/stock/doctype/stock_settings/stock_settings.py b/erpnext/stock/doctype/stock_settings/stock_settings.py index 229ff944750..b7a317cd66a 100644 --- a/erpnext/stock/doctype/stock_settings/stock_settings.py +++ b/erpnext/stock/doctype/stock_settings/stock_settings.py @@ -25,6 +25,7 @@ class StockSettings(Document): action_if_quality_inspection_is_not_submitted: DF.Literal["Stop", "Warn"] action_if_quality_inspection_is_rejected: DF.Literal["Stop", "Warn"] + allow_existing_serial_no: DF.Check allow_from_dn: DF.Check allow_from_pr: DF.Check allow_internal_transfer_at_arms_length_price: DF.Check From 98bd5f20c4e20edb766ad4b0b4df23fda5552be9 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Thu, 5 Dec 2024 15:18:44 +0530 Subject: [PATCH 0654/1614] fix: restrict advance payment entries with flag where "book_advance_payments_in_separate_party_account" is true --- .../payment_reconciliation.py | 6 ++--- erpnext/controllers/accounts_controller.py | 26 ++++++++++++++----- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py index 68e9eef711a..db4a4b0f268 100644 --- a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py +++ b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py @@ -153,10 +153,7 @@ class PaymentReconciliation(Document): self.add_payment_entries(non_reconciled_payments) def get_payment_entries(self): - if self.default_advance_account: - party_account = [self.receivable_payable_account, self.default_advance_account] - else: - party_account = [self.receivable_payable_account] + party_account = [self.receivable_payable_account] order_doctype = "Sales Order" if self.party_type == "Customer" else "Purchase Order" condition = frappe._dict( @@ -187,6 +184,7 @@ class PaymentReconciliation(Document): self.party, party_account, order_doctype, + default_advance_account=self.default_advance_account, against_all_orders=True, limit=self.payment_limit, condition=condition, diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index bc0cdde94de..e1a7d5803c9 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -2916,6 +2916,7 @@ def get_advance_payment_entries( party_account, order_doctype, order_list=None, + default_advance_account=None, include_unallocated=True, against_all_orders=False, limit=None, @@ -2929,6 +2930,7 @@ def get_advance_payment_entries( party_type, party, party_account, + default_advance_account, limit, condition, ) @@ -2952,6 +2954,7 @@ def get_advance_payment_entries( party_type, party, party_account, + default_advance_account, limit, condition, ) @@ -2967,6 +2970,7 @@ def get_common_query( party_type, party, party_account, + default_advance_account, limit, condition, ): @@ -2988,14 +2992,22 @@ def get_common_query( .where(payment_entry.docstatus == 1) ) - if payment_type == "Receive": - q = q.select((payment_entry.paid_from_account_currency).as_("currency")) - q = q.select(payment_entry.paid_from) - q = q.where(payment_entry.paid_from.isin(party_account)) + field = "paid_from" if payment_type == "Receive" else "paid_to" + + q = q.select((payment_entry[f"{field}_account_currency"]).as_("currency")) + q = q.select(payment_entry[field]) + account_condition = payment_entry[field].isin(party_account) + if default_advance_account: + q = q.where( + account_condition + | ( + (payment_entry[field] == default_advance_account) + & (payment_entry.book_advance_payments_in_separate_party_account == 1) + ) + ) + else: - q = q.select((payment_entry.paid_to_account_currency).as_("currency")) - q = q.select(payment_entry.paid_to) - q = q.where(payment_entry.paid_to.isin(party_account)) + q = q.where(account_condition) if payment_type == "Receive": q = q.select((payment_entry.source_exchange_rate).as_("exchange_rate")) From 5cd39941ee9d8067e606df169b1d773fa46cc580 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 10 Dec 2024 10:57:20 +0530 Subject: [PATCH 0655/1614] fix: 'Use Multi-Level BOM' checkbox default value (backport #44618) (#44620) fix: 'Use Multi-Level BOM' checkbox default value (#44618) (cherry picked from commit f5c038cd1bb129609a048a62fe61bd20505abe32) Co-authored-by: rohitwaghchaure --- erpnext/manufacturing/doctype/bom/bom.js | 16 +++++++--------- erpnext/manufacturing/doctype/bom/bom.py | 17 +++++++++++++++++ 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/erpnext/manufacturing/doctype/bom/bom.js b/erpnext/manufacturing/doctype/bom/bom.js index 3a0bcf6b47e..4b52859cabd 100644 --- a/erpnext/manufacturing/doctype/bom/bom.js +++ b/erpnext/manufacturing/doctype/bom/bom.js @@ -255,15 +255,6 @@ frappe.ui.form.on("BOM", { }); } - if (!skip_qty_field) { - fields.push({ - fieldtype: "Check", - label: __("Use Multi-Level BOM"), - fieldname: "use_multi_level_bom", - default: 1, - }); - } - if (!skip_qty_field) { fields.push({ fieldtype: "Float", @@ -291,6 +282,13 @@ frappe.ui.form.on("BOM", { cur_dialog.refresh(); }, }); + + fields.push({ + fieldtype: "Check", + label: __("Use Multi-Level BOM"), + fieldname: "use_multi_level_bom", + default: frm.doc?.__onload.use_multi_level_bom, + }); } var has_template_rm = frm.doc.items.filter((d) => d.has_variants === 1) || []; diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py index 730ff494801..78b95f2c80c 100644 --- a/erpnext/manufacturing/doctype/bom/bom.py +++ b/erpnext/manufacturing/doctype/bom/bom.py @@ -214,6 +214,23 @@ class BOM(WebsiteGenerator): return index + def onload(self): + super().onload() + + self.set_onload_for_muulti_level_bom() + + def set_onload_for_muulti_level_bom(self): + use_multi_level_bom = frappe.db.get_value( + "Property Setter", + {"field_name": "use_multi_level_bom", "doc_type": "Work Order", "property": "default"}, + "value", + ) + + if use_multi_level_bom is None: + use_multi_level_bom = 1 + + self.set_onload("use_multi_level_bom", cint(use_multi_level_bom)) + @staticmethod def get_next_version_index(existing_boms: list[str]) -> int: # split by "/" and "-" From 815c6b423497f59d0bafa58483ca6b63b432a56b Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 5 Dec 2024 22:57:09 +0530 Subject: [PATCH 0656/1614] chore: Ignore stock validation for non stock invoices (backport #44549) (#44554) chore: Ignore stock validation for non stock invoices (#44549) * chore: Ignore stock validation for non stock invoices * chore: Ignore stock validation for non stock invoices (cherry picked from commit 1ac292285e217c77d2c9f9ce37e4c018c2f5e849) Co-authored-by: Deepesh Garg (cherry picked from commit 06ac21dd856a5b6ecfb37ccf20c3d83fa4d79c05) --- erpnext/controllers/sales_and_purchase_return.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/erpnext/controllers/sales_and_purchase_return.py b/erpnext/controllers/sales_and_purchase_return.py index 7f9a5a35a73..696d404d16d 100644 --- a/erpnext/controllers/sales_and_purchase_return.py +++ b/erpnext/controllers/sales_and_purchase_return.py @@ -24,6 +24,10 @@ def validate_return(doc): if doc.return_against: validate_return_against(doc) + + if doc.doctype in ("Sales Invoice", "Purchase Invoice") and not doc.update_stock: + return + validate_returned_items(doc) From ef5a5643dca2c5ee8f008088eb9bcc77079e72e9 Mon Sep 17 00:00:00 2001 From: Khushi Rawat <142375893+khushi8112@users.noreply.github.com> Date: Tue, 10 Dec 2024 12:54:02 +0530 Subject: [PATCH 0657/1614] fix: precision check for salvage value --- erpnext/assets/doctype/asset/asset.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/erpnext/assets/doctype/asset/asset.py b/erpnext/assets/doctype/asset/asset.py index c788d5265a7..05d575ac822 100644 --- a/erpnext/assets/doctype/asset/asset.py +++ b/erpnext/assets/doctype/asset/asset.py @@ -410,6 +410,9 @@ class Asset(AccountsController): ) def validate_asset_finance_books(self, row): + row.expected_value_after_useful_life = flt( + row.expected_value_after_useful_life, self.precision("gross_purchase_amount") + ) if flt(row.expected_value_after_useful_life) >= flt(self.gross_purchase_amount): frappe.throw( _("Row {0}: Expected Value After Useful Life must be less than Gross Purchase Amount").format( @@ -430,7 +433,10 @@ class Asset(AccountsController): self.opening_accumulated_depreciation = 0 self.opening_number_of_booked_depreciations = 0 else: - depreciable_amount = flt(self.gross_purchase_amount) - flt(row.expected_value_after_useful_life) + depreciable_amount = flt( + flt(self.gross_purchase_amount) - flt(row.expected_value_after_useful_life), + self.precision("gross_purchase_amount"), + ) if flt(self.opening_accumulated_depreciation) > depreciable_amount: frappe.throw( _("Opening Accumulated Depreciation must be less than or equal to {0}").format( From 7e0ff851ab1a46479927b0a3e097aab5fa368ad8 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Wed, 11 Dec 2024 15:40:56 +0530 Subject: [PATCH 0658/1614] refactor: consider against voucher when not filtered on voucher_no --- .../report/general_ledger/general_ledger.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/erpnext/accounts/report/general_ledger/general_ledger.py b/erpnext/accounts/report/general_ledger/general_ledger.py index 04df22c9c9c..69e3d241f12 100644 --- a/erpnext/accounts/report/general_ledger/general_ledger.py +++ b/erpnext/accounts/report/general_ledger/general_ledger.py @@ -35,9 +35,6 @@ def execute(filters=None): if filters.get("party"): filters.party = frappe.parse_json(filters.get("party")) - if filters.get("voucher_no") and not filters.get("group_by"): - filters.group_by = "Group by Voucher (Consolidated)" - validate_filters(filters, account_details) validate_party(filters) @@ -373,16 +370,21 @@ def get_data_with_opening_closing(filters, account_details, accounting_dimension if acc_dict.entries: # opening data.append({"debit_in_transaction_currency": None, "credit_in_transaction_currency": None}) - if filters.get("group_by") != "Group by Voucher": + if (not filters.get("group_by") and not filters.get("voucher_no")) or ( + filters.get("group_by") and filters.get("group_by") != "Group by Voucher" + ): data.append(acc_dict.totals.opening) data += acc_dict.entries # totals - data.append(acc_dict.totals.total) + if filters.get("group_by") or not filters.voucher_no: + data.append(acc_dict.totals.total) # closing - if filters.get("group_by") != "Group by Voucher": + if (not filters.get("group_by") and not filters.get("voucher_no")) or ( + filters.get("group_by") and filters.get("group_by") != "Group by Voucher" + ): data.append(acc_dict.totals.closing) data.append({"debit_in_transaction_currency": None, "credit_in_transaction_currency": None}) From f88dc263d5746f1f3f9b9dafd75d050390df23a1 Mon Sep 17 00:00:00 2001 From: venkat102 Date: Wed, 11 Dec 2024 15:55:22 +0530 Subject: [PATCH 0659/1614] fix: update free item qty while adding same item in seperate row --- erpnext/accounts/doctype/pricing_rule/utils.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/pricing_rule/utils.py b/erpnext/accounts/doctype/pricing_rule/utils.py index 087e2bffa4b..551eaa3d1ce 100644 --- a/erpnext/accounts/doctype/pricing_rule/utils.py +++ b/erpnext/accounts/doctype/pricing_rule/utils.py @@ -651,8 +651,17 @@ def get_product_discount_rule(pricing_rule, item_details, args=None, doc=None): qty = pricing_rule.free_qty or 1 if pricing_rule.is_recursive: - transaction_qty = (args.get("qty") if args else doc.total_qty) - pricing_rule.apply_recursion_over - if transaction_qty: + transaction_qty = sum( + [ + row.qty + for row in doc.items + if not row.is_free_item + and row.item_code == args.item_code + and row.pricing_rules == args.pricing_rules + ] + ) + transaction_qty = transaction_qty - pricing_rule.apply_recursion_over + if transaction_qty and transaction_qty > 0: qty = flt(transaction_qty) * qty / pricing_rule.recurse_for if pricing_rule.round_free_qty: qty = (flt(transaction_qty) // pricing_rule.recurse_for) * (pricing_rule.free_qty or 1) From 6a84f0b0272d9e9c39c583e652cc55823a68e690 Mon Sep 17 00:00:00 2001 From: KerollesFathy Date: Wed, 11 Dec 2024 13:41:03 +0200 Subject: [PATCH 0660/1614] chore: resync version-15-hotfix with feature branch --- CODEOWNERS | 16 +- erpnext/__init__.py | 13 +- erpnext/accounts/deferred_revenue.py | 2 +- erpnext/accounts/doctype/account/account.json | 4 +- erpnext/accounts/doctype/account/account.py | 38 +- .../in_standard_chart_of_accounts.json | 6 +- .../verified/standard_chart_of_accounts.py | 2 + .../account_closing_balance.py | 4 +- .../accounting_dimension.js | 2 +- .../accounting_dimension.py | 2 + .../accounting_dimension_filter.py | 5 +- .../accounting_period/accounting_period.py | 2 + .../advance_payment_ledger_entry/__init__.py | 0 .../advance_payment_ledger_entry.js | 8 + .../advance_payment_ledger_entry.json | 113 + .../advance_payment_ledger_entry.py | 27 + .../test_advance_payment_ledger_entry.py | 222 ++ .../doctype/bank_account/bank_account.json | 47 +- .../bank_account/bank_account_dashboard.py | 20 - .../doctype/bank_clearance/bank_clearance.js | 26 +- .../doctype/bank_clearance/bank_clearance.py | 25 +- .../bank_clearance/test_bank_clearance.py | 81 +- .../bank_transaction/bank_transaction.py | 18 +- .../test_cost_center_allocation.py | 53 +- .../currency_exchange_settings.py | 2 +- erpnext/accounts/doctype/dunning/dunning.json | 51 +- erpnext/accounts/doctype/dunning/dunning.py | 38 +- .../exchange_rate_revaluation.py | 82 +- .../test_exchange_rate_revaluation.py | 4 +- .../doctype/fiscal_year/fiscal_year.js | 5 +- .../doctype/fiscal_year/fiscal_year.json | 4 +- .../accounts/doctype/gl_entry/gl_entry.json | 106 +- erpnext/accounts/doctype/gl_entry/gl_entry.py | 3 +- .../doctype/journal_entry/journal_entry.js | 29 +- .../doctype/journal_entry/journal_entry.py | 20 +- .../journal_entry/test_journal_entry.py | 66 + .../opening_invoice_creation_tool.js | 16 +- .../doctype/payment_entry/payment_entry.js | 497 +-- .../doctype/payment_entry/payment_entry.json | 8 +- .../doctype/payment_entry/payment_entry.py | 824 ++++- .../payment_entry/test_payment_entry.py | 158 +- .../payment_entry_deduction.json | 11 +- .../payment_entry_deduction.py | 1 + .../payment_entry_reference.json | 28 +- .../payment_entry_reference.py | 12 +- .../payment_reconciliation.py | 27 +- .../test_payment_reconciliation.py | 265 +- .../payment_reconciliation_payment.json | 16 +- .../payment_reconciliation_payment.py | 2 +- .../payment_request/payment_request.js | 4 +- .../payment_request/payment_request.json | 52 +- .../payment_request/payment_request.py | 423 ++- .../payment_request_dashboard.py | 14 + .../payment_request/payment_request_list.js | 27 +- .../payment_request/test_payment_request.py | 294 +- .../period_closing_voucher.js | 18 + .../period_closing_voucher.json | 38 +- .../period_closing_voucher.py | 769 ++-- .../test_period_closing_voucher.py | 8 +- .../pos_closing_entry/pos_closing_entry.js | 10 +- .../pos_closing_entry/pos_closing_entry.py | 10 +- .../doctype/pos_invoice/pos_invoice.js | 16 +- .../doctype/pos_invoice/pos_invoice.json | 10 +- .../doctype/pos_invoice/pos_invoice.py | 42 +- .../doctype/pos_invoice/test_pos_invoice.py | 2 +- .../pos_invoice_merge_log.py | 15 +- .../test_pos_invoice_merge_log.py | 2 +- .../doctype/pricing_rule/pricing_rule.json | 7 +- .../doctype/pricing_rule/pricing_rule.py | 23 +- .../doctype/pricing_rule/test_pricing_rule.py | 48 +- .../accounts/doctype/pricing_rule/utils.py | 33 +- .../process_payment_reconciliation.js | 21 +- .../process_payment_reconciliation.json | 16 +- .../process_payment_reconciliation.py | 2 + .../process_statement_of_accounts.json | 9 +- .../process_statement_of_accounts.py | 3 + .../promotional_scheme/promotional_scheme.py | 52 +- .../test_promotional_scheme.py | 25 + .../purchase_invoice/purchase_invoice.js | 71 +- .../purchase_invoice/purchase_invoice.json | 5 +- .../purchase_invoice/purchase_invoice.py | 155 +- .../purchase_invoice/test_purchase_invoice.py | 212 ++ .../purchase_invoice_item.json | 5 +- .../repost_accounting_ledger.py | 6 +- .../test_repost_accounting_ledger.py | 6 +- .../doctype/sales_invoice/sales_invoice.js | 17 +- .../doctype/sales_invoice/sales_invoice.json | 14 +- .../doctype/sales_invoice/sales_invoice.py | 79 +- .../sales_invoice/sales_invoice_list.js | 2 +- .../sales_invoice/test_sales_invoice.py | 420 ++- .../sales_invoice_item.json | 31 +- .../sales_invoice_item/sales_invoice_item.py | 1 + .../doctype/subscription/subscription.py | 5 +- erpnext/accounts/doctype/tax_rule/tax_rule.py | 2 +- .../tax_withholding_category.py | 42 +- .../test_tax_withholding_category.py | 129 +- .../test_unreconcile_payment.py | 107 +- .../unreconcile_payment.json | 5 +- erpnext/accounts/general_ledger.py | 230 +- .../total_incoming_bills.json | 3 +- .../total_incoming_payment.json | 1 + .../total_outgoing_bills.json | 1 + .../total_outgoing_payment.json | 1 + erpnext/accounts/party.py | 60 +- .../accounts_payable/accounts_payable.js | 35 +- .../accounts_payable/test_accounts_payable.py | 5 +- .../accounts_payable_summary.js | 30 +- .../accounts_receivable.js | 30 +- .../accounts_receivable.py | 174 +- .../test_accounts_receivable.py | 95 +- .../accounts_receivable_summary.js | 30 +- .../accounts_receivable_summary.py | 54 +- .../test_accounts_receivable_summary.py | 10 +- .../asset_depreciation_ledger.py | 4 +- .../asset_depreciations_and_balances.js | 6 + .../asset_depreciations_and_balances.py | 160 +- .../report/balance_sheet/balance_sheet.py | 26 +- .../bank_reconciliation_statement.js | 16 + .../bank_reconciliation_statement.py | 4 +- .../accounts/report/cash_flow/cash_flow.js | 5 +- .../accounts/report/cash_flow/cash_flow.py | 64 +- .../__init__.py | 0 ...heques_and_deposits_incorrectly_cleared.js | 44 + ...ques_and_deposits_incorrectly_cleared.json | 29 + ...heques_and_deposits_incorrectly_cleared.py | 153 + .../consolidated_financial_statement.py | 76 +- .../deferred_revenue_and_expense.py | 33 +- .../accounts/report/financial_statements.py | 216 +- .../general_and_payment_ledger_comparison.py | 6 +- .../report/general_ledger/general_ledger.html | 5 +- .../report/general_ledger/general_ledger.py | 21 +- .../report/gross_profit/gross_profit.py | 135 +- .../report/gross_profit/test_gross_profit.py | 8 +- .../report/invalid_ledger_entries/__init__.py | 0 .../invalid_ledger_entries.js | 51 + .../invalid_ledger_entries.json | 23 + .../invalid_ledger_entries.py | 137 + .../report/payment_ledger/payment_ledger.py | 5 +- .../profit_and_loss_statement.py | 16 +- .../purchase_register/purchase_register.py | 5 +- .../report/sales_register/sales_register.py | 3 +- .../sales_register/test_sales_register.py | 179 + .../tax_withholding_details.py | 2 +- .../report/trial_balance/trial_balance.py | 20 +- erpnext/accounts/report/utils.py | 9 +- erpnext/accounts/test/accounts_mixin.py | 38 + erpnext/accounts/test/test_reports.py | 4 +- erpnext/accounts/test/test_utils.py | 8 +- erpnext/accounts/utils.py | 181 +- erpnext/assets/doctype/asset/asset.js | 12 +- erpnext/assets/doctype/asset/asset.json | 24 +- erpnext/assets/doctype/asset/asset.py | 89 +- .../asset_capitalization.py | 30 +- .../test_asset_capitalization.py | 21 +- .../asset_depreciation_schedule.py | 6 +- .../asset_maintenance/asset_maintenance.py | 1 + .../asset_maintenance_log.json | 12 +- .../asset_maintenance_log.py | 1 + .../number_card/asset_value/asset_value.json | 1 + .../new_assets_(this_year).json | 1 + .../total_assets/total_assets.json | 1 + .../doctype/purchase_order/purchase_order.js | 55 +- .../doctype/purchase_order/purchase_order.py | 53 +- .../purchase_order_dashboard.py | 13 +- .../purchase_order/purchase_order_list.js | 17 +- .../request_for_quotation.js | 11 +- .../request_for_quotation.py | 2 + erpnext/buying/doctype/supplier/supplier.py | 2 +- .../item_wise_purchase_history.js | 62 + .../item_wise_purchase_history.json | 40 +- .../item_wise_purchase_history.py | 276 ++ .../procurement_tracker.py | 2 +- .../purchase_order_analysis.py | 37 +- .../purchase_order_trends.js | 7 + erpnext/controllers/accounts_controller.py | 286 +- erpnext/controllers/buying_controller.py | 22 +- erpnext/controllers/item_variant.py | 2 +- erpnext/controllers/print_settings.py | 8 +- erpnext/controllers/queries.py | 12 +- .../controllers/sales_and_purchase_return.py | 76 +- erpnext/controllers/selling_controller.py | 81 +- erpnext/controllers/stock_controller.py | 68 +- .../controllers/subcontracting_controller.py | 94 +- erpnext/controllers/taxes_and_totals.py | 32 +- .../tests/test_accounts_controller.py | 26 + .../tests/test_subcontracting_controller.py | 3 + erpnext/controllers/trends.py | 10 +- erpnext/crm/doctype/lead/lead.js | 237 +- .../crm/doctype/opportunity/opportunity.json | 7 +- erpnext/crm/doctype/prospect/test_prospect.py | 23 + erpnext/crm/frappe_crm_api.py | 173 + .../open_opportunity/open_opportunity.json | 2 +- erpnext/edi/__init__.py | 0 erpnext/edi/doctype/__init__.py | 0 erpnext/edi/doctype/code_list/__init__.py | 0 erpnext/edi/doctype/code_list/code_list.js | 51 + erpnext/edi/doctype/code_list/code_list.json | 112 + erpnext/edi/doctype/code_list/code_list.py | 125 + .../edi/doctype/code_list/code_list_import.js | 218 ++ .../edi/doctype/code_list/code_list_import.py | 140 + .../edi/doctype/code_list/code_list_list.js | 8 + .../edi/doctype/code_list/test_code_list.py | 9 + erpnext/edi/doctype/common_code/__init__.py | 0 .../edi/doctype/common_code/common_code.js | 8 + .../edi/doctype/common_code/common_code.json | 103 + .../edi/doctype/common_code/common_code.py | 114 + .../doctype/common_code/common_code_list.js | 8 + .../doctype/common_code/test_common_code.py | 9 + .../doctype/plaid_settings/plaid_settings.py | 2 +- erpnext/hooks.py | 21 +- erpnext/manufacturing/doctype/bom/bom.js | 81 +- erpnext/manufacturing/doctype/bom/bom.py | 78 +- erpnext/manufacturing/doctype/bom/test_bom.py | 20 + .../doctype/bom_creator/bom_creator.json | 3 +- .../doctype/bom_update_log/bom_update_log.py | 8 +- .../doctype/job_card/job_card.js | 2 +- .../doctype/job_card/job_card.py | 25 +- .../manufacturing_settings.json | 59 +- .../manufacturing_settings.py | 9 +- .../doctype/plant_floor/plant_floor.js | 21 + .../doctype/plant_floor/plant_floor.json | 5 +- .../production_plan/production_plan.js | 22 +- .../production_plan/production_plan.json | 8 +- .../production_plan/production_plan.py | 88 +- .../doctype/work_order/test_work_order.py | 317 ++ .../doctype/work_order/work_order.js | 85 +- .../doctype/work_order/work_order.py | 59 +- .../work_order_item/work_order_item.json | 13 +- .../work_order_item/work_order_item.py | 2 + .../monthly_completed_work_order.json | 1 + .../monthly_total_work_order.json | 1 + .../ongoing_job_card/ongoing_job_card.json | 1 + .../production_analytics.py | 10 +- .../production_plan_summary.py | 51 +- .../quality_inspection_summary.py | 4 +- .../manufacturing/manufacturing.json | 157 +- erpnext/modules.txt | 1 + erpnext/patches.txt | 16 +- .../fix_additional_cost_in_mfg_stock_entry.py | 2 +- .../item_reposting_for_incorrect_sl_and_gl.py | 3 +- .../v14_0/set_period_start_end_date_in_pcv.py | 17 + .../patches/v14_0/single_to_multi_dunning.py | 2 +- .../patches/v14_0/update_closing_balances.py | 118 +- ...rency_exchange_settings_for_frankfurter.py | 11 + .../v14_0/update_reports_with_range.py | 39 + .../update_stock_uom_in_work_order_item.py | 15 + .../add_disassembly_order_stock_entry_type.py | 13 + .../create_advance_payment_ledger_records.py | 73 + .../drop_index_posting_datetime_from_sle.py | 16 + .../v15_0/enable_allow_existing_serial_no.py | 6 + .../v15_0/link_purchase_item_to_asset_doc.py | 74 + ...e_gain_loss_in_payment_entry_deductions.py | 22 + .../v15_0/set_standard_stock_entry_type.py | 17 + .../patches/v15_0/update_invoice_remarks.py | 149 + .../update_sub_voucher_type_in_gl_entries.py | 57 + ...ee_email_field_in_asset_maintenance_log.py | 18 + erpnext/projects/doctype/project/project.js | 1 + erpnext/projects/doctype/project/project.py | 49 +- .../projects/doctype/project/test_project.py | 28 + erpnext/projects/doctype/task/task.py | 4 +- .../projects/doctype/timesheet/timesheet.js | 4 +- .../projects/doctype/timesheet/timesheet.py | 48 +- .../delayed_tasks_summary.py | 2 +- .../report/project_summary/project_summary.py | 8 +- erpnext/public/images/erpnext-logo-blue.png | Bin 0 -> 4235 bytes .../dialog_manager.js | 8 + .../bom_configurator.bundle.js | 12 +- erpnext/public/js/controllers/accounts.js | 9 +- erpnext/public/js/controllers/buying.js | 22 +- .../public/js/controllers/taxes_and_totals.js | 47 +- erpnext/public/js/controllers/transaction.js | 139 +- erpnext/public/js/financial_statements.js | 61 +- erpnext/public/js/queries.js | 17 +- .../visual_plant_floor_template.html | 20 +- erpnext/public/js/utils.js | 1 + erpnext/public/js/utils/sales_common.js | 6 +- .../js/utils/serial_no_batch_selector.js | 230 +- erpnext/public/js/utils/unreconcile.js | 9 +- erpnext/public/scss/erpnext.scss | 41 + .../selling/doctype/customer/customer.json | 19 +- erpnext/selling/doctype/customer/customer.py | 3 +- .../doctype/product_bundle/product_bundle.py | 14 +- .../selling/doctype/quotation/quotation.js | 16 +- .../selling/doctype/quotation/quotation.json | 21 +- .../selling/doctype/quotation/quotation.py | 141 +- .../doctype/quotation/test_quotation.py | 56 +- .../quotation_item/quotation_item.json | 31 +- .../doctype/quotation_item/quotation_item.py | 1 + .../doctype/sales_order/sales_order.js | 52 +- .../doctype/sales_order/sales_order.json | 12 +- .../doctype/sales_order/sales_order.py | 38 +- .../sales_order/sales_order_calendar.js | 1 + .../sales_order/sales_order_dashboard.py | 4 +- .../doctype/sales_order/sales_order_list.js | 10 +- .../doctype/sales_order/test_sales_order.py | 7 + .../sales_order_item/sales_order_item.json | 29 +- .../sales_order_item/sales_order_item.py | 1 + .../active_customers/active_customers.json | 1 - .../page/point_of_sale/point_of_sale.py | 18 +- .../page/point_of_sale/pos_controller.js | 12 +- .../page/point_of_sale/pos_item_cart.js | 49 +- .../page/point_of_sale/pos_item_details.js | 2 +- .../page/point_of_sale/pos_item_selector.js | 4 +- .../point_of_sale/pos_past_order_summary.js | 6 +- .../selling/page/point_of_sale/pos_payment.js | 7 +- .../payment_terms_status_for_sales_order.py | 4 +- .../report/sales_analytics/sales_analytics.js | 5 + .../report/sales_analytics/sales_analytics.py | 112 +- .../sales_order_analysis.py | 2 +- .../sales_order_trends/sales_order_trends.js | 7 + erpnext/setup/default_success_action.py | 5 +- erpnext/setup/doctype/brand/brand.js | 56 +- erpnext/setup/doctype/brand/brand.json | 5 +- erpnext/setup/doctype/company/company.js | 4 +- erpnext/setup/doctype/company/company.json | 58 +- erpnext/setup/doctype/company/company.py | 7 +- .../currency_exchange/currency_exchange.js | 34 +- .../test_currency_exchange.py | 4 +- .../doctype/customer_group/customer_group.py | 5 - .../doctype/holiday_list/holiday_list.py | 6 +- .../transaction_deletion_record.py | 16 +- erpnext/setup/install.py | 2 +- .../setup_wizard/data/country_wise_tax.json | 361 +- .../operations/install_fixtures.py | 33 +- .../setup_wizard/operations/taxes_setup.py | 8 +- erpnext/stock/dashboard/item_dashboard.js | 9 +- erpnext/stock/dashboard/item_dashboard.py | 1 + .../stock/dashboard/item_dashboard_list.html | 2 + .../oldest_items/oldest_items.json | 9 +- erpnext/stock/doctype/batch/batch.py | 4 +- .../doctype/delivery_note/delivery_note.json | 12 +- .../doctype/delivery_note/delivery_note.py | 100 +- .../delivery_note/test_delivery_note.py | 303 ++ .../delivery_note_item.json | 32 +- .../delivery_note_item/delivery_note_item.py | 1 + .../inventory_dimension.py | 39 +- .../test_inventory_dimension.py | 53 +- erpnext/stock/doctype/item/item.js | 105 +- erpnext/stock/doctype/item/item.py | 79 +- .../doctype/item/templates/item_row.html | 2 +- .../item_attribute/item_attribute.json | 17 +- .../doctype/item_attribute/item_attribute.py | 14 + .../item_variant_attribute.json | 12 +- .../item_variant_attribute.py | 1 + .../material_request/material_request.js | 23 +- .../material_request/material_request.py | 13 +- erpnext/stock/doctype/pick_list/pick_list.py | 4 +- .../stock/doctype/pick_list/pick_list_list.js | 2 +- .../purchase_receipt/purchase_receipt.js | 43 +- .../purchase_receipt/purchase_receipt.json | 4 +- .../purchase_receipt/purchase_receipt.py | 49 +- .../purchase_receipt/test_purchase_receipt.py | 394 ++- .../quality_inspection/quality_inspection.js | 2 +- .../quality_inspection/quality_inspection.py | 26 +- .../repost_item_valuation.py | 2 +- .../serial_and_batch_bundle.py | 255 +- .../stock/doctype/stock_entry/stock_entry.js | 21 +- .../doctype/stock_entry/stock_entry.json | 20 +- .../stock/doctype/stock_entry/stock_entry.py | 116 +- .../doctype/stock_entry/test_stock_entry.py | 165 +- .../stock_entry_type/stock_entry_type.json | 15 +- .../stock_entry_type/stock_entry_type.py | 19 +- .../stock_entry_type/test_stock_entry_type.py | 29 +- .../stock_ledger_entry.json | 5 +- .../stock_ledger_entry/stock_ledger_entry.py | 70 +- .../test_stock_ledger_entry.py | 7 +- .../stock_reconciliation.py | 68 +- .../test_stock_reconciliation.py | 54 + .../stock_reservation_entry.py | 5 +- .../stock_settings/stock_settings.json | 11 +- .../doctype/stock_settings/stock_settings.py | 9 +- erpnext/stock/get_item_details.py | 44 +- .../total_warehouses/total_warehouses.json | 1 + erpnext/stock/reorder_item.py | 9 +- .../available_batch_report.js | 2 +- .../batch_wise_balance_history.py | 2 +- .../serial_and_batch_summary.py | 2 - .../serial_no_service_contract_expiry.json | 43 +- .../serial_no_status/serial_no_status.json | 43 +- .../serial_no_warranty_expiry.json | 43 +- .../stock/report/stock_ageing/stock_ageing.js | 23 +- .../stock/report/stock_ageing/stock_ageing.py | 41 +- .../report/stock_ageing/test_stock_ageing.py | 4 +- .../report/stock_balance/stock_balance.js | 6 + .../report/stock_balance/stock_balance.py | 5 +- .../stock_ledger_invariant_check.js | 6 + .../stock_ledger_invariant_check.py | 31 +- .../stock_ledger_variance.js | 18 +- .../stock_ledger_variance.py | 18 +- .../stock_projected_qty.py | 1 + erpnext/stock/report/test_reports.py | 5 +- ...rehouse_wise_item_balance_age_and_value.js | 15 + ...rehouse_wise_item_balance_age_and_value.py | 2 - erpnext/stock/serial_batch_bundle.py | 50 +- erpnext/stock/stock_ledger.py | 75 +- .../subcontracting_order.json | 21 +- .../subcontracting_order_list.js | 2 +- .../test_subcontracting_order.py | 23 + .../subcontracting_order_item.json | 11 +- .../subcontracting_order_item.py | 3 + .../subcontracting_receipt.js | 12 +- .../subcontracting_receipt.json | 27 +- .../subcontracting_receipt.py | 185 +- .../subcontracting_receipt_list.js | 2 +- .../test_subcontracting_receipt.py | 103 +- .../subcontracting_receipt_item.json | 9 +- .../subcontracting_receipt_item.py | 1 + .../service_level_agreement.py | 2 +- erpnext/templates/includes/issue_row.html | 2 +- .../includes/projects/project_row.html | 2 +- .../templates/includes/transaction_row.html | 2 +- erpnext/templates/pages/order.html | 4 +- erpnext/templates/pages/order.py | 10 +- erpnext/templates/pages/projects.py | 2 +- erpnext/templates/pages/timelog_info.html | 2 +- erpnext/tests/test_perf.py | 2 +- erpnext/translations/de.csv | 301 +- erpnext/translations/es.csv | 2525 ++++++++++++++ erpnext/translations/fa.csv | 2532 ++++++++++++++ erpnext/translations/sv.csv | 3083 +++++++++++++++++ erpnext/utilities/bulk_transaction.py | 5 + erpnext/utilities/transaction_base.py | 10 +- pyproject.toml | 2 +- 423 files changed, 23145 insertions(+), 3944 deletions(-) create mode 100644 erpnext/accounts/doctype/advance_payment_ledger_entry/__init__.py create mode 100644 erpnext/accounts/doctype/advance_payment_ledger_entry/advance_payment_ledger_entry.js create mode 100644 erpnext/accounts/doctype/advance_payment_ledger_entry/advance_payment_ledger_entry.json create mode 100644 erpnext/accounts/doctype/advance_payment_ledger_entry/advance_payment_ledger_entry.py create mode 100644 erpnext/accounts/doctype/advance_payment_ledger_entry/test_advance_payment_ledger_entry.py delete mode 100644 erpnext/accounts/doctype/bank_account/bank_account_dashboard.py create mode 100644 erpnext/accounts/doctype/payment_request/payment_request_dashboard.py create mode 100644 erpnext/accounts/report/cheques_and_deposits_incorrectly_cleared/__init__.py create mode 100644 erpnext/accounts/report/cheques_and_deposits_incorrectly_cleared/cheques_and_deposits_incorrectly_cleared.js create mode 100644 erpnext/accounts/report/cheques_and_deposits_incorrectly_cleared/cheques_and_deposits_incorrectly_cleared.json create mode 100644 erpnext/accounts/report/cheques_and_deposits_incorrectly_cleared/cheques_and_deposits_incorrectly_cleared.py create mode 100644 erpnext/accounts/report/invalid_ledger_entries/__init__.py create mode 100644 erpnext/accounts/report/invalid_ledger_entries/invalid_ledger_entries.js create mode 100644 erpnext/accounts/report/invalid_ledger_entries/invalid_ledger_entries.json create mode 100644 erpnext/accounts/report/invalid_ledger_entries/invalid_ledger_entries.py create mode 100644 erpnext/accounts/report/sales_register/test_sales_register.py create mode 100644 erpnext/buying/report/item_wise_purchase_history/item_wise_purchase_history.js create mode 100644 erpnext/buying/report/item_wise_purchase_history/item_wise_purchase_history.py create mode 100644 erpnext/crm/frappe_crm_api.py create mode 100644 erpnext/edi/__init__.py create mode 100644 erpnext/edi/doctype/__init__.py create mode 100644 erpnext/edi/doctype/code_list/__init__.py create mode 100644 erpnext/edi/doctype/code_list/code_list.js create mode 100644 erpnext/edi/doctype/code_list/code_list.json create mode 100644 erpnext/edi/doctype/code_list/code_list.py create mode 100644 erpnext/edi/doctype/code_list/code_list_import.js create mode 100644 erpnext/edi/doctype/code_list/code_list_import.py create mode 100644 erpnext/edi/doctype/code_list/code_list_list.js create mode 100644 erpnext/edi/doctype/code_list/test_code_list.py create mode 100644 erpnext/edi/doctype/common_code/__init__.py create mode 100644 erpnext/edi/doctype/common_code/common_code.js create mode 100644 erpnext/edi/doctype/common_code/common_code.json create mode 100644 erpnext/edi/doctype/common_code/common_code.py create mode 100644 erpnext/edi/doctype/common_code/common_code_list.js create mode 100644 erpnext/edi/doctype/common_code/test_common_code.py create mode 100644 erpnext/patches/v14_0/set_period_start_end_date_in_pcv.py create mode 100644 erpnext/patches/v14_0/update_currency_exchange_settings_for_frankfurter.py create mode 100644 erpnext/patches/v14_0/update_reports_with_range.py create mode 100644 erpnext/patches/v14_0/update_stock_uom_in_work_order_item.py create mode 100644 erpnext/patches/v15_0/add_disassembly_order_stock_entry_type.py create mode 100644 erpnext/patches/v15_0/create_advance_payment_ledger_records.py create mode 100644 erpnext/patches/v15_0/drop_index_posting_datetime_from_sle.py create mode 100644 erpnext/patches/v15_0/enable_allow_existing_serial_no.py create mode 100644 erpnext/patches/v15_0/link_purchase_item_to_asset_doc.py create mode 100644 erpnext/patches/v15_0/set_is_exchange_gain_loss_in_payment_entry_deductions.py create mode 100644 erpnext/patches/v15_0/set_standard_stock_entry_type.py create mode 100644 erpnext/patches/v15_0/update_invoice_remarks.py create mode 100644 erpnext/patches/v15_0/update_sub_voucher_type_in_gl_entries.py create mode 100644 erpnext/patches/v15_0/update_task_assignee_email_field_in_asset_maintenance_log.py create mode 100644 erpnext/public/images/erpnext-logo-blue.png diff --git a/CODEOWNERS b/CODEOWNERS index 9077c6783c7..4a19fc871b5 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -4,21 +4,21 @@ # the repo. Unless a later match takes precedence, erpnext/accounts/ @deepeshgarg007 @ruthra-kumar -erpnext/assets/ @anandbaburajan @deepeshgarg007 +erpnext/assets/ @khushi8112 @deepeshgarg007 erpnext/regional @deepeshgarg007 @ruthra-kumar erpnext/selling @deepeshgarg007 @ruthra-kumar erpnext/support/ @deepeshgarg007 pos* -erpnext/buying/ @rohitwaghchaure @s-aga-r -erpnext/maintenance/ @rohitwaghchaure @s-aga-r -erpnext/manufacturing/ @rohitwaghchaure @s-aga-r -erpnext/quality_management/ @rohitwaghchaure @s-aga-r -erpnext/stock/ @rohitwaghchaure @s-aga-r -erpnext/subcontracting @rohitwaghchaure @s-aga-r +erpnext/buying/ @rohitwaghchaure +erpnext/maintenance/ @rohitwaghchaure +erpnext/manufacturing/ @rohitwaghchaure +erpnext/quality_management/ @rohitwaghchaure +erpnext/stock/ @rohitwaghchaure +erpnext/subcontracting @rohitwaghchaure erpnext/controllers/ @deepeshgarg007 @rohitwaghchaure erpnext/patches/ @deepeshgarg007 .github/ @deepeshgarg007 -pyproject.toml @phot0n +pyproject.toml @akhilnarang diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 4a9236066cc..bb8bf11b7ea 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -2,8 +2,9 @@ import functools import inspect import frappe +from frappe.utils.user import is_website_user -__version__ = "15.28.2" +__version__ = "15.45.4" def get_default_company(user=None): @@ -149,3 +150,13 @@ def allow_regional(fn): return frappe.get_attr(overrides[function_path][-1])(*args, **kwargs) return caller + + +def check_app_permission(): + if frappe.session.user == "Administrator": + return True + + if is_website_user(): + return False + + return True diff --git a/erpnext/accounts/deferred_revenue.py b/erpnext/accounts/deferred_revenue.py index a48ce9b4c63..a88764cf1b2 100644 --- a/erpnext/accounts/deferred_revenue.py +++ b/erpnext/accounts/deferred_revenue.py @@ -58,7 +58,7 @@ def build_conditions(process_type, account, company): ) if account: - conditions += f"AND {deferred_account}='{account}'" + conditions += f"AND {deferred_account}={frappe.db.escape(account)}" elif company: conditions += f"AND p.company = {frappe.db.escape(company)}" diff --git a/erpnext/accounts/doctype/account/account.json b/erpnext/accounts/doctype/account/account.json index e87b59ea9cb..7b56444e635 100644 --- a/erpnext/accounts/doctype/account/account.json +++ b/erpnext/accounts/doctype/account/account.json @@ -121,7 +121,7 @@ "label": "Account Type", "oldfieldname": "account_type", "oldfieldtype": "Select", - "options": "\nAccumulated Depreciation\nAsset Received But Not Billed\nBank\nCash\nChargeable\nCapital Work in Progress\nCost of Goods Sold\nCurrent Asset\nCurrent Liability\nDepreciation\nDirect Expense\nDirect Income\nEquity\nExpense Account\nExpenses Included In Asset Valuation\nExpenses Included In Valuation\nFixed Asset\nIncome Account\nIndirect Expense\nIndirect Income\nLiability\nPayable\nReceivable\nRound Off\nStock\nStock Adjustment\nStock Received But Not Billed\nService Received But Not Billed\nTax\nTemporary", + "options": "\nAccumulated Depreciation\nAsset Received But Not Billed\nBank\nCash\nChargeable\nCapital Work in Progress\nCost of Goods Sold\nCurrent Asset\nCurrent Liability\nDepreciation\nDirect Expense\nDirect Income\nEquity\nExpense Account\nExpenses Included In Asset Valuation\nExpenses Included In Valuation\nFixed Asset\nIncome Account\nIndirect Expense\nIndirect Income\nLiability\nPayable\nReceivable\nRound Off\nRound Off for Opening\nStock\nStock Adjustment\nStock Received But Not Billed\nService Received But Not Billed\nTax\nTemporary", "search_index": 1 }, { @@ -191,7 +191,7 @@ "idx": 1, "is_tree": 1, "links": [], - "modified": "2024-06-27 16:23:04.444354", + "modified": "2024-08-19 15:19:11.095045", "modified_by": "Administrator", "module": "Accounts", "name": "Account", diff --git a/erpnext/accounts/doctype/account/account.py b/erpnext/accounts/doctype/account/account.py index 69c1e16bb1e..b510651e68f 100644 --- a/erpnext/accounts/doctype/account/account.py +++ b/erpnext/accounts/doctype/account/account.py @@ -60,6 +60,7 @@ class Account(NestedSet): "Payable", "Receivable", "Round Off", + "Round Off for Opening", "Stock", "Stock Adjustment", "Stock Received But Not Billed", @@ -103,14 +104,12 @@ class Account(NestedSet): self.name = get_autoname_with_number(self.account_number, self.account_name, self.company) def validate(self): - from erpnext.accounts.utils import validate_field_number - if frappe.local.flags.allow_unverified_charts: return self.validate_parent() self.validate_parent_child_account_type() self.validate_root_details() - validate_field_number("Account", self.name, self.account_number, self.company, "account_number") + self.validate_account_number() self.validate_group_or_ledger() self.set_root_and_report_type() self.validate_mandatory() @@ -202,7 +201,7 @@ class Account(NestedSet): msg = _( "There are ledger entries against this account. Changing {0} to non-{1} in live system will cause incorrect output in 'Accounts {2}' report" ).format( - frappe.bold("Account Type"), doc_before_save.account_type, doc_before_save.account_type + frappe.bold(_("Account Type")), doc_before_save.account_type, doc_before_save.account_type ) frappe.msgprint(msg) self.add_comment("Comment", msg) @@ -311,6 +310,22 @@ class Account(NestedSet): if frappe.db.get_value("GL Entry", {"account": self.name}): frappe.throw(_("Currency can not be changed after making entries using some other currency")) + def validate_account_number(self, account_number=None): + if not account_number: + account_number = self.account_number + + if account_number: + account_with_same_number = frappe.db.get_value( + "Account", + {"account_number": account_number, "company": self.company, "name": ["!=", self.name]}, + ) + if account_with_same_number: + frappe.throw( + _("Account Number {0} already used in account {1}").format( + account_number, account_with_same_number + ) + ) + def create_account_for_child_company(self, parent_acc_name_map, descendants, parent_acc_name): for company in descendants: company_bold = frappe.bold(company) @@ -464,19 +479,6 @@ def get_account_autoname(account_number, account_name, company): return " - ".join(parts) -def validate_account_number(name, account_number, company): - if account_number: - account_with_same_number = frappe.db.get_value( - "Account", {"account_number": account_number, "company": company, "name": ["!=", name]} - ) - if account_with_same_number: - frappe.throw( - _("Account Number {0} already used in account {1}").format( - account_number, account_with_same_number - ) - ) - - @frappe.whitelist() def update_account_number(name, account_name, account_number=None, from_descendant=False): account = frappe.get_cached_doc("Account", name) @@ -517,7 +519,7 @@ def update_account_number(name, account_name, account_number=None, from_descenda frappe.throw(message, title=_("Rename Not Allowed")) - validate_account_number(name, account_number, account.company) + account.validate_account_number(account_number) if account_number: frappe.db.set_value("Account", name, "account_number", account_number.strip()) else: diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/in_standard_chart_of_accounts.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/in_standard_chart_of_accounts.json index 2ec0b7f70c8..4d807b09c33 100644 --- a/erpnext/accounts/doctype/account/chart_of_accounts/verified/in_standard_chart_of_accounts.json +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/in_standard_chart_of_accounts.json @@ -109,7 +109,8 @@ "Utility Expenses": {}, "Write Off": {}, "Exchange Gain/Loss": {}, - "Gain/Loss on Asset Disposal": {} + "Gain/Loss on Asset Disposal": {}, + "Impairment": {} }, "root_type": "Expense" }, @@ -132,7 +133,8 @@ "Source of Funds (Liabilities)": { "Capital Account": { "Reserves and Surplus": {}, - "Shareholders Funds": {} + "Shareholders Funds": {}, + "Revaluation Surplus": {} }, "Current Liabilities": { "Accounts Payable": { diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/standard_chart_of_accounts.py b/erpnext/accounts/doctype/account/chart_of_accounts/verified/standard_chart_of_accounts.py index e30ad24a374..5a5e232db8d 100644 --- a/erpnext/accounts/doctype/account/chart_of_accounts/verified/standard_chart_of_accounts.py +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/standard_chart_of_accounts.py @@ -72,6 +72,7 @@ def get(): _("Write Off"): {}, _("Exchange Gain/Loss"): {}, _("Gain/Loss on Asset Disposal"): {}, + _("Impairment"): {}, }, "root_type": "Expense", }, @@ -104,6 +105,7 @@ def get(): _("Dividends Paid"): {"account_type": "Equity"}, _("Opening Balance Equity"): {"account_type": "Equity"}, _("Retained Earnings"): {"account_type": "Equity"}, + _("Revaluation Surplus"): {"account_type": "Equity"}, "root_type": "Equity", }, } diff --git a/erpnext/accounts/doctype/account_closing_balance/account_closing_balance.py b/erpnext/accounts/doctype/account_closing_balance/account_closing_balance.py index 82821e140ea..6d5e023f039 100644 --- a/erpnext/accounts/doctype/account_closing_balance/account_closing_balance.py +++ b/erpnext/accounts/doctype/account_closing_balance/account_closing_balance.py @@ -113,9 +113,9 @@ def get_previous_closing_entries(company, closing_date, accounting_dimensions): entries = [] last_period_closing_voucher = frappe.db.get_all( "Period Closing Voucher", - filters={"docstatus": 1, "company": company, "posting_date": ("<", closing_date)}, + filters={"docstatus": 1, "company": company, "period_end_date": ("<", closing_date)}, fields=["name"], - order_by="posting_date desc", + order_by="period_end_date desc", limit=1, ) diff --git a/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.js b/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.js index 4e45dede1d5..6f4f9f8d782 100644 --- a/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.js +++ b/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.js @@ -58,7 +58,7 @@ frappe.ui.form.on("Accounting Dimension", { }, label: function (frm) { - frm.set_value("fieldname", frappe.model.scrub(frm.doc.label)); + frm.set_value("fieldname", frm.doc.label.replace(/ /g, "_").replace(/-/g, "_").toLowerCase()); }, document_type: function (frm) { diff --git a/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.py b/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.py index db99bcd223b..8fc22dd7650 100644 --- a/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.py +++ b/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.py @@ -7,6 +7,7 @@ import json import frappe from frappe import _, scrub from frappe.custom.doctype.custom_field.custom_field import create_custom_field +from frappe.database.schema import validate_column_name from frappe.model import core_doctypes_list from frappe.model.document import Document from frappe.utils import cstr @@ -60,6 +61,7 @@ class AccountingDimension(Document): if not self.is_new(): self.validate_document_type_change() + validate_column_name(self.fieldname) self.validate_dimension_defaults() def validate_document_type_change(self): diff --git a/erpnext/accounts/doctype/accounting_dimension_filter/accounting_dimension_filter.py b/erpnext/accounts/doctype/accounting_dimension_filter/accounting_dimension_filter.py index 1954b4b0efe..7c843cf552e 100644 --- a/erpnext/accounts/doctype/accounting_dimension_filter/accounting_dimension_filter.py +++ b/erpnext/accounts/doctype/accounting_dimension_filter/accounting_dimension_filter.py @@ -74,12 +74,12 @@ def get_dimension_filter_map(): a.applicable_on_account, d.dimension_value, p.accounting_dimension, p.allow_or_restrict, a.is_mandatory FROM - `tabApplicable On Account` a, `tabAllowed Dimension` d, + `tabApplicable On Account` a, `tabAccounting Dimension Filter` p + LEFT JOIN `tabAllowed Dimension` d ON d.parent = p.name WHERE p.name = a.parent AND p.disabled = 0 - AND p.name = d.parent """, as_dict=1, ) @@ -97,7 +97,6 @@ def get_dimension_filter_map(): f.allow_or_restrict, f.is_mandatory, ) - frappe.flags.dimension_filter_map = dimension_filter_map return frappe.flags.dimension_filter_map diff --git a/erpnext/accounts/doctype/accounting_period/accounting_period.py b/erpnext/accounts/doctype/accounting_period/accounting_period.py index 172ef93f14d..300d216618e 100644 --- a/erpnext/accounts/doctype/accounting_period/accounting_period.py +++ b/erpnext/accounts/doctype/accounting_period/accounting_period.py @@ -101,6 +101,8 @@ def validate_accounting_period_on_doc_save(doc, method=None): date = doc.available_for_use_date elif doc.doctype == "Asset Repair": date = doc.completion_date + elif doc.doctype == "Period Closing Voucher": + date = doc.period_end_date else: date = doc.posting_date diff --git a/erpnext/accounts/doctype/advance_payment_ledger_entry/__init__.py b/erpnext/accounts/doctype/advance_payment_ledger_entry/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/erpnext/accounts/doctype/advance_payment_ledger_entry/advance_payment_ledger_entry.js b/erpnext/accounts/doctype/advance_payment_ledger_entry/advance_payment_ledger_entry.js new file mode 100644 index 00000000000..1a0dc1e7272 --- /dev/null +++ b/erpnext/accounts/doctype/advance_payment_ledger_entry/advance_payment_ledger_entry.js @@ -0,0 +1,8 @@ +// Copyright (c) 2024, Frappe Technologies Pvt. Ltd. and contributors +// For license information, please see license.txt + +// frappe.ui.form.on("Advance Payment Ledger Entry", { +// refresh(frm) { + +// }, +// }); diff --git a/erpnext/accounts/doctype/advance_payment_ledger_entry/advance_payment_ledger_entry.json b/erpnext/accounts/doctype/advance_payment_ledger_entry/advance_payment_ledger_entry.json new file mode 100644 index 00000000000..290ed11c98e --- /dev/null +++ b/erpnext/accounts/doctype/advance_payment_ledger_entry/advance_payment_ledger_entry.json @@ -0,0 +1,113 @@ +{ + "actions": [], + "allow_rename": 1, + "creation": "2024-10-16 16:57:12.085072", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "company", + "voucher_type", + "voucher_no", + "against_voucher_type", + "against_voucher_no", + "amount", + "currency", + "event" + ], + "fields": [ + { + "fieldname": "voucher_type", + "fieldtype": "Link", + "label": "Voucher Type", + "options": "DocType", + "read_only": 1 + }, + { + "fieldname": "voucher_no", + "fieldtype": "Dynamic Link", + "label": "Voucher No", + "options": "voucher_type", + "read_only": 1 + }, + { + "fieldname": "against_voucher_type", + "fieldtype": "Link", + "label": "Against Voucher Type", + "options": "DocType", + "read_only": 1 + }, + { + "fieldname": "against_voucher_no", + "fieldtype": "Dynamic Link", + "label": "Against Voucher No", + "options": "against_voucher_type", + "read_only": 1 + }, + { + "fieldname": "amount", + "fieldtype": "Currency", + "label": "Amount", + "read_only": 1 + }, + { + "fieldname": "currency", + "fieldtype": "Link", + "label": "Currency", + "options": "Currency", + "read_only": 1 + }, + { + "fieldname": "event", + "fieldtype": "Data", + "label": "Event", + "read_only": 1 + }, + { + "fieldname": "company", + "fieldtype": "Link", + "label": "Company", + "options": "Company", + "read_only": 1 + } + ], + "in_create": 1, + "index_web_pages_for_search": 1, + "links": [], + "modified": "2024-11-05 10:31:28.736671", + "modified_by": "Administrator", + "module": "Accounts", + "name": "Advance Payment Ledger Entry", + "owner": "Administrator", + "permissions": [ + { + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Accounts User", + "share": 1 + }, + { + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Accounts Manager", + "share": 1 + }, + { + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Auditor", + "share": 1 + } + ], + "sort_field": "creation", + "sort_order": "DESC", + "states": [] +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/advance_payment_ledger_entry/advance_payment_ledger_entry.py b/erpnext/accounts/doctype/advance_payment_ledger_entry/advance_payment_ledger_entry.py new file mode 100644 index 00000000000..0ec2d411761 --- /dev/null +++ b/erpnext/accounts/doctype/advance_payment_ledger_entry/advance_payment_ledger_entry.py @@ -0,0 +1,27 @@ +# Copyright (c) 2024, Frappe Technologies Pvt. Ltd. and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + + +class AdvancePaymentLedgerEntry(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + against_voucher_no: DF.DynamicLink | None + against_voucher_type: DF.Link | None + amount: DF.Currency + company: DF.Link | None + currency: DF.Link | None + event: DF.Data | None + voucher_no: DF.DynamicLink | None + voucher_type: DF.Link | None + # end: auto-generated types + + pass diff --git a/erpnext/accounts/doctype/advance_payment_ledger_entry/test_advance_payment_ledger_entry.py b/erpnext/accounts/doctype/advance_payment_ledger_entry/test_advance_payment_ledger_entry.py new file mode 100644 index 00000000000..2f578aed172 --- /dev/null +++ b/erpnext/accounts/doctype/advance_payment_ledger_entry/test_advance_payment_ledger_entry.py @@ -0,0 +1,222 @@ +# Copyright (c) 2024, Frappe Technologies Pvt. Ltd. and Contributors +# See license.txt + +import frappe +from frappe.tests.utils import FrappeTestCase +from frappe.utils import nowdate, today + +from erpnext.accounts.doctype.payment_entry.test_payment_entry import get_payment_entry +from erpnext.accounts.test.accounts_mixin import AccountsTestMixin +from erpnext.buying.doctype.purchase_order.test_purchase_order import create_purchase_order +from erpnext.selling.doctype.sales_order.test_sales_order import make_sales_order + + +class TestAdvancePaymentLedgerEntry(AccountsTestMixin, FrappeTestCase): + """ + Integration tests for AdvancePaymentLedgerEntry. + Use this class for testing interactions between multiple components. + """ + + def setUp(self): + self.create_company() + self.create_usd_receivable_account() + self.create_usd_payable_account() + self.create_item() + self.clear_old_entries() + + def tearDown(self): + frappe.db.rollback() + + def create_sales_order(self, qty=1, rate=100, currency="INR", do_not_submit=False): + """ + Helper method + """ + so = make_sales_order( + company=self.company, + customer=self.customer, + currency=currency, + item=self.item, + qty=qty, + rate=rate, + transaction_date=today(), + do_not_submit=do_not_submit, + ) + return so + + def create_purchase_order(self, qty=1, rate=100, currency="INR", do_not_submit=False): + """ + Helper method + """ + po = create_purchase_order( + company=self.company, + customer=self.supplier, + currency=currency, + item=self.item, + qty=qty, + rate=rate, + transaction_date=today(), + do_not_submit=do_not_submit, + ) + return po + + def test_so_advance_paid_and_currency_with_payment(self): + self.create_customer("_Test USD Customer", "USD") + + so = self.create_sales_order(currency="USD", do_not_submit=True) + so.conversion_rate = 80 + so.submit() + + pe_exchange_rate = 85 + pe = get_payment_entry(so.doctype, so.name, bank_account=self.cash) + pe.reference_no = "1" + pe.reference_date = nowdate() + pe.paid_from = self.debtors_usd + pe.paid_from_account_currency = "USD" + pe.source_exchange_rate = pe_exchange_rate + pe.paid_amount = so.grand_total + pe.received_amount = pe_exchange_rate * pe.paid_amount + pe.references[0].outstanding_amount = 100 + pe.references[0].total_amount = 100 + pe.references[0].allocated_amount = 100 + pe.save().submit() + + so.reload() + self.assertEqual(so.advance_paid, 100) + self.assertEqual(so.party_account_currency, "USD") + + # cancel advance payment + pe.reload() + pe.cancel() + + so.reload() + self.assertEqual(so.advance_paid, 0) + self.assertEqual(so.party_account_currency, "USD") + + def test_so_advance_paid_and_currency_with_journal(self): + self.create_customer("_Test USD Customer", "USD") + + so = self.create_sales_order(currency="USD", do_not_submit=True) + so.conversion_rate = 80 + so.submit() + + je_exchange_rate = 85 + je = frappe.get_doc( + { + "doctype": "Journal Entry", + "company": self.company, + "voucher_type": "Journal Entry", + "posting_date": so.transaction_date, + "multi_currency": True, + "accounts": [ + { + "account": self.debtors_usd, + "party_type": "Customer", + "party": so.customer, + "credit": 8500, + "credit_in_account_currency": 100, + "is_advance": "Yes", + "reference_type": so.doctype, + "reference_name": so.name, + "exchange_rate": je_exchange_rate, + }, + { + "account": self.cash, + "debit": 8500, + "debit_in_account_currency": 8500, + }, + ], + } + ) + je.save().submit() + so.reload() + self.assertEqual(so.advance_paid, 100) + self.assertEqual(so.party_account_currency, "USD") + + # cancel advance payment + je.reload() + je.cancel() + + so.reload() + self.assertEqual(so.advance_paid, 0) + self.assertEqual(so.party_account_currency, "USD") + + def test_po_advance_paid_and_currency_with_payment(self): + self.create_supplier("_Test USD Supplier", "USD") + + po = self.create_purchase_order(currency="USD", do_not_submit=True) + po.conversion_rate = 80 + po.submit() + + pe_exchange_rate = 85 + pe = get_payment_entry(po.doctype, po.name, bank_account=self.cash) + pe.reference_no = "1" + pe.reference_date = nowdate() + pe.paid_to = self.creditors_usd + pe.paid_to_account_currency = "USD" + pe.target_exchange_rate = pe_exchange_rate + pe.received_amount = po.grand_total + pe.paid_amount = pe_exchange_rate * pe.received_amount + pe.references[0].outstanding_amount = 100 + pe.references[0].total_amount = 100 + pe.references[0].allocated_amount = 100 + pe.save().submit() + + po.reload() + self.assertEqual(po.advance_paid, 100) + self.assertEqual(po.party_account_currency, "USD") + + # cancel advance payment + pe.reload() + pe.cancel() + + po.reload() + self.assertEqual(po.advance_paid, 0) + self.assertEqual(po.party_account_currency, "USD") + + def test_po_advance_paid_and_currency_with_journal(self): + self.create_supplier("_Test USD Supplier", "USD") + + po = self.create_purchase_order(currency="USD", do_not_submit=True) + po.conversion_rate = 80 + po.submit() + + je_exchange_rate = 85 + je = frappe.get_doc( + { + "doctype": "Journal Entry", + "company": self.company, + "voucher_type": "Journal Entry", + "posting_date": po.transaction_date, + "multi_currency": True, + "accounts": [ + { + "account": self.creditors_usd, + "party_type": "Supplier", + "party": po.supplier, + "debit": 8500, + "debit_in_account_currency": 100, + "is_advance": "Yes", + "reference_type": po.doctype, + "reference_name": po.name, + "exchange_rate": je_exchange_rate, + }, + { + "account": self.cash, + "credit": 8500, + "credit_in_account_currency": 8500, + }, + ], + } + ) + je.save().submit() + po.reload() + self.assertEqual(po.advance_paid, 100) + self.assertEqual(po.party_account_currency, "USD") + + # cancel advance payment + je.reload() + je.cancel() + + po.reload() + self.assertEqual(po.advance_paid, 0) + self.assertEqual(po.party_account_currency, "USD") diff --git a/erpnext/accounts/doctype/bank_account/bank_account.json b/erpnext/accounts/doctype/bank_account/bank_account.json index 32f1c675d3b..962551b2417 100644 --- a/erpnext/accounts/doctype/bank_account/bank_account.json +++ b/erpnext/accounts/doctype/bank_account/bank_account.json @@ -208,8 +208,49 @@ "label": "Disabled" } ], - "links": [], - "modified": "2023-09-22 21:31:34.763977", + "links": [ + { + "group": "Transactions", + "link_doctype": "Payment Request", + "link_fieldname": "bank_account" + }, + { + "group": "Transactions", + "link_doctype": "Payment Order", + "link_fieldname": "bank_account" + }, + { + "group": "Transactions", + "link_doctype": "Bank Guarantee", + "link_fieldname": "bank_account" + }, + { + "group": "Transactions", + "link_doctype": "Bank Transaction", + "link_fieldname": "bank_account" + }, + { + "group": "Accounting", + "link_doctype": "Payment Entry", + "link_fieldname": "bank_account" + }, + { + "group": "Accounting", + "link_doctype": "Journal Entry", + "link_fieldname": "bank_account" + }, + { + "group": "Party", + "link_doctype": "Customer", + "link_fieldname": "default_bank_account" + }, + { + "group": "Party", + "link_doctype": "Supplier", + "link_fieldname": "default_bank_account" + } + ], + "modified": "2024-10-30 09:41:14.113414", "modified_by": "Administrator", "module": "Accounts", "name": "Bank Account", @@ -246,4 +287,4 @@ "sort_order": "DESC", "states": [], "track_changes": 1 -} \ No newline at end of file +} diff --git a/erpnext/accounts/doctype/bank_account/bank_account_dashboard.py b/erpnext/accounts/doctype/bank_account/bank_account_dashboard.py deleted file mode 100644 index 8bf8d8a5cd0..00000000000 --- a/erpnext/accounts/doctype/bank_account/bank_account_dashboard.py +++ /dev/null @@ -1,20 +0,0 @@ -from frappe import _ - - -def get_data(): - return { - "fieldname": "bank_account", - "non_standard_fieldnames": { - "Customer": "default_bank_account", - "Supplier": "default_bank_account", - }, - "transactions": [ - { - "label": _("Payments"), - "items": ["Payment Entry", "Payment Request", "Payment Order", "Payroll Entry"], - }, - {"label": _("Party"), "items": ["Customer", "Supplier"]}, - {"items": ["Bank Guarantee"]}, - {"items": ["Journal Entry"]}, - ], - } diff --git a/erpnext/accounts/doctype/bank_clearance/bank_clearance.js b/erpnext/accounts/doctype/bank_clearance/bank_clearance.js index 2993825482c..7ece7c9c2d6 100644 --- a/erpnext/accounts/doctype/bank_clearance/bank_clearance.js +++ b/erpnext/accounts/doctype/bank_clearance/bank_clearance.js @@ -38,6 +38,11 @@ frappe.ui.form.on("Bank Clearance", { frm.add_custom_button(__("Get Payment Entries"), () => frm.trigger("get_payment_entries")); frm.change_custom_button_type(__("Get Payment Entries"), null, "primary"); + if (frm.doc.payment_entries.length) { + frm.add_custom_button(__("Update Clearance Date"), () => frm.trigger("update_clearance_date")); + frm.change_custom_button_type(__("Get Payment Entries"), null, "default"); + frm.change_custom_button_type(__("Update Clearance Date"), null, "primary"); + } }, update_clearance_date: function (frm) { @@ -45,13 +50,7 @@ frappe.ui.form.on("Bank Clearance", { method: "update_clearance_date", doc: frm.doc, callback: function (r, rt) { - frm.refresh_field("payment_entries"); - frm.refresh_fields(); - - if (!frm.doc.payment_entries.length) { - frm.change_custom_button_type(__("Get Payment Entries"), null, "primary"); - frm.change_custom_button_type(__("Update Clearance Date"), null, "default"); - } + frm.refresh(); }, }); }, @@ -60,17 +59,8 @@ frappe.ui.form.on("Bank Clearance", { return frappe.call({ method: "get_payment_entries", doc: frm.doc, - callback: function (r, rt) { - frm.refresh_field("payment_entries"); - - if (frm.doc.payment_entries.length) { - frm.add_custom_button(__("Update Clearance Date"), () => - frm.trigger("update_clearance_date") - ); - - frm.change_custom_button_type(__("Get Payment Entries"), null, "default"); - frm.change_custom_button_type(__("Update Clearance Date"), null, "primary"); - } + callback: function () { + frm.refresh(); }, }); }, diff --git a/erpnext/accounts/doctype/bank_clearance/bank_clearance.py b/erpnext/accounts/doctype/bank_clearance/bank_clearance.py index 63758a5e7fb..ac7883fce13 100644 --- a/erpnext/accounts/doctype/bank_clearance/bank_clearance.py +++ b/erpnext/accounts/doctype/bank_clearance/bank_clearance.py @@ -6,7 +6,7 @@ import frappe from frappe import _, msgprint from frappe.model.document import Document from frappe.query_builder.custom import ConstantColumn -from frappe.utils import flt, fmt_money, getdate +from frappe.utils import flt, fmt_money, get_link_to_form, getdate from pypika import Order import erpnext @@ -96,8 +96,11 @@ class BankClearance(Document): if d.cheque_date and getdate(d.clearance_date) < getdate(d.cheque_date): frappe.throw( - _("Row #{0}: Clearance date {1} cannot be before Cheque Date {2}").format( - d.idx, d.clearance_date, d.cheque_date + _("Row #{0}: For {1} Clearance date {2} cannot be before Cheque Date {3}").format( + d.idx, + get_link_to_form(d.payment_document, d.payment_entry), + d.clearance_date, + d.cheque_date, ) ) @@ -105,8 +108,18 @@ class BankClearance(Document): if not d.clearance_date: d.clearance_date = None - payment_entry = frappe.get_doc(d.payment_document, d.payment_entry) - payment_entry.db_set("clearance_date", d.clearance_date) + if d.payment_document == "Sales Invoice": + frappe.db.set_value( + "Sales Invoice Payment", + {"parent": d.payment_entry, "account": self.get("account"), "amount": [">", 0]}, + "clearance_date", + d.clearance_date, + ) + + else: + frappe.db.set_value( + d.payment_document, d.payment_entry, "clearance_date", d.clearance_date + ) clearance_date_updated = True @@ -155,7 +168,7 @@ def get_payment_entries_for_bank_clearance( "Payment Entry" as payment_document, name as payment_entry, reference_no as cheque_number, reference_date as cheque_date, if(paid_from=%(account)s, paid_amount + total_taxes_and_charges, 0) as credit, - if(paid_from=%(account)s, 0, received_amount) as debit, + if(paid_from=%(account)s, 0, received_amount + total_taxes_and_charges) as debit, posting_date, ifnull(party,if(paid_from=%(account)s,paid_to,paid_from)) as against_account, clearance_date, if(paid_to=%(account)s, paid_to_account_currency, paid_from_account_currency) as account_currency from `tabPayment Entry` diff --git a/erpnext/accounts/doctype/bank_clearance/test_bank_clearance.py b/erpnext/accounts/doctype/bank_clearance/test_bank_clearance.py index d785bfbfef2..658a69a4803 100644 --- a/erpnext/accounts/doctype/bank_clearance/test_bank_clearance.py +++ b/erpnext/accounts/doctype/bank_clearance/test_bank_clearance.py @@ -6,16 +6,29 @@ import unittest import frappe from frappe.utils import add_months, getdate +from erpnext.accounts.doctype.cost_center.test_cost_center import create_cost_center from erpnext.accounts.doctype.payment_entry.test_payment_entry import get_payment_entry from erpnext.accounts.doctype.purchase_invoice.test_purchase_invoice import make_purchase_invoice +from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice +from erpnext.stock.doctype.item.test_item import create_item +from erpnext.stock.doctype.warehouse.test_warehouse import create_warehouse from erpnext.tests.utils import if_lending_app_installed, if_lending_app_not_installed class TestBankClearance(unittest.TestCase): @classmethod def setUpClass(cls): + create_warehouse( + warehouse_name="_Test Warehouse", + properties={"parent_warehouse": "All Warehouses - _TC"}, + company="_Test Company", + ) + create_item("_Test Item") + create_cost_center(cost_center_name="_Test Cost Center", company="_Test Company") + clear_payment_entries() clear_loan_transactions() + clear_pos_sales_invoices() make_bank_account() add_transactions() @@ -83,11 +96,41 @@ class TestBankClearance(unittest.TestCase): bank_clearance.get_payment_entries() self.assertEqual(len(bank_clearance.payment_entries), 3) + def test_update_clearance_date_on_si(self): + sales_invoice = make_pos_sales_invoice() + + date = getdate() + bank_clearance = frappe.get_doc("Bank Clearance") + bank_clearance.account = "_Test Bank Clearance - _TC" + bank_clearance.from_date = add_months(date, -1) + bank_clearance.to_date = date + bank_clearance.include_pos_transactions = 1 + bank_clearance.get_payment_entries() + + self.assertNotEqual(len(bank_clearance.payment_entries), 0) + for payment in bank_clearance.payment_entries: + if payment.payment_entry == sales_invoice.name: + payment.clearance_date = date + + bank_clearance.update_clearance_date() + + si_clearance_date = frappe.db.get_value( + "Sales Invoice Payment", + {"parent": sales_invoice.name, "account": bank_clearance.account}, + "clearance_date", + ) + + self.assertEqual(si_clearance_date, date) + def clear_payment_entries(): frappe.db.delete("Payment Entry") +def clear_pos_sales_invoices(): + frappe.db.delete("Sales Invoice", {"is_pos": 1}) + + @if_lending_app_installed def clear_loan_transactions(): for dt in [ @@ -115,9 +158,45 @@ def add_transactions(): def make_payment_entry(): - pi = make_purchase_invoice(supplier="_Test Supplier", qty=1, rate=690) + from erpnext.buying.doctype.supplier.test_supplier import create_supplier + + supplier = create_supplier(supplier_name="_Test Supplier") + pi = make_purchase_invoice( + supplier=supplier, + supplier_warehouse="_Test Warehouse - _TC", + expense_account="Cost of Goods Sold - _TC", + uom="Nos", + qty=1, + rate=690, + ) pe = get_payment_entry("Purchase Invoice", pi.name, bank_account="_Test Bank Clearance - _TC") pe.reference_no = "Conrad Oct 18" pe.reference_date = "2018-10-24" pe.insert() pe.submit() + + +def make_pos_sales_invoice(): + from erpnext.accounts.doctype.opening_invoice_creation_tool.test_opening_invoice_creation_tool import ( + make_customer, + ) + + mode_of_payment = frappe.get_doc({"doctype": "Mode of Payment", "name": "Cash"}) + + if not frappe.db.get_value("Mode of Payment Account", {"company": "_Test Company", "parent": "Cash"}): + mode_of_payment.append( + "accounts", {"company": "_Test Company", "default_account": "_Test Bank Clearance - _TC"} + ) + mode_of_payment.save() + + customer = make_customer(customer="_Test Customer") + + si = create_sales_invoice(customer=customer, item="_Test Item", is_pos=1, qty=1, rate=1000, do_not_save=1) + si.set("payments", []) + si.append( + "payments", {"mode_of_payment": "Cash", "account": "_Test Bank Clearance - _TC", "amount": 1000} + ) + si.insert() + si.submit() + + return si diff --git a/erpnext/accounts/doctype/bank_transaction/bank_transaction.py b/erpnext/accounts/doctype/bank_transaction/bank_transaction.py index 4354f238a42..c13dbe445f1 100644 --- a/erpnext/accounts/doctype/bank_transaction/bank_transaction.py +++ b/erpnext/accounts/doctype/bank_transaction/bank_transaction.py @@ -208,13 +208,17 @@ class BankTransaction(Document): if self.party_type and self.party: return - result = AutoMatchParty( - bank_party_account_number=self.bank_party_account_number, - bank_party_iban=self.bank_party_iban, - bank_party_name=self.bank_party_name, - description=self.description, - deposit=self.deposit, - ).match() + result = None + try: + result = AutoMatchParty( + bank_party_account_number=self.bank_party_account_number, + bank_party_iban=self.bank_party_iban, + bank_party_name=self.bank_party_name, + description=self.description, + deposit=self.deposit, + ).match() + except Exception: + frappe.log_error(title=_("Error in party matching for Bank Transaction {0}").format(self.name)) if not result: return diff --git a/erpnext/accounts/doctype/cost_center_allocation/test_cost_center_allocation.py b/erpnext/accounts/doctype/cost_center_allocation/test_cost_center_allocation.py index 65784dbb6c7..4abc82d8bec 100644 --- a/erpnext/accounts/doctype/cost_center_allocation/test_cost_center_allocation.py +++ b/erpnext/accounts/doctype/cost_center_allocation/test_cost_center_allocation.py @@ -22,8 +22,10 @@ class TestCostCenterAllocation(unittest.TestCase): cost_centers = [ "Main Cost Center 1", "Main Cost Center 2", + "Main Cost Center 3", "Sub Cost Center 1", "Sub Cost Center 2", + "Sub Cost Center 3", ] for cc in cost_centers: create_cost_center(cost_center_name=cc, company="_Test Company") @@ -36,7 +38,7 @@ class TestCostCenterAllocation(unittest.TestCase): ) jv = make_journal_entry( - "_Test Cash - _TC", "Sales - _TC", 100, cost_center="Main Cost Center 1 - _TC", submit=True + "Cash - _TC", "Sales - _TC", 100, cost_center="Main Cost Center 1 - _TC", submit=True ) expected_values = [["Sub Cost Center 1 - _TC", 0.0, 60], ["Sub Cost Center 2 - _TC", 0.0, 40]] @@ -120,7 +122,7 @@ class TestCostCenterAllocation(unittest.TestCase): def test_valid_from_based_on_existing_gle(self): # GLE posted against Sub Cost Center 1 on today jv = make_journal_entry( - "_Test Cash - _TC", + "Cash - _TC", "Sales - _TC", 100, cost_center="Main Cost Center 1 - _TC", @@ -141,6 +143,53 @@ class TestCostCenterAllocation(unittest.TestCase): jv.cancel() + def test_multiple_cost_center_allocation_on_same_main_cost_center(self): + coa1 = create_cost_center_allocation( + "_Test Company", + "Main Cost Center 3 - _TC", + {"Sub Cost Center 1 - _TC": 30, "Sub Cost Center 2 - _TC": 30, "Sub Cost Center 3 - _TC": 40}, + valid_from=add_days(today(), -5), + ) + + coa2 = create_cost_center_allocation( + "_Test Company", + "Main Cost Center 3 - _TC", + {"Sub Cost Center 1 - _TC": 50, "Sub Cost Center 2 - _TC": 50}, + valid_from=add_days(today(), -1), + ) + + jv = make_journal_entry( + "Cash - _TC", + "Sales - _TC", + 100, + cost_center="Main Cost Center 3 - _TC", + posting_date=today(), + submit=True, + ) + + expected_values = {"Sub Cost Center 1 - _TC": 50, "Sub Cost Center 2 - _TC": 50} + + gle = frappe.qb.DocType("GL Entry") + gl_entries = ( + frappe.qb.from_(gle) + .select(gle.cost_center, gle.debit, gle.credit) + .where(gle.voucher_type == "Journal Entry") + .where(gle.voucher_no == jv.name) + .where(gle.account == "Sales - _TC") + .orderby(gle.cost_center) + ).run(as_dict=1) + + self.assertTrue(gl_entries) + + for gle in gl_entries: + self.assertTrue(gle.cost_center in expected_values) + self.assertEqual(gle.debit, 0) + self.assertEqual(gle.credit, expected_values[gle.cost_center]) + + coa1.cancel() + coa2.cancel() + jv.cancel() + def create_cost_center_allocation( company, diff --git a/erpnext/accounts/doctype/currency_exchange_settings/currency_exchange_settings.py b/erpnext/accounts/doctype/currency_exchange_settings/currency_exchange_settings.py index 8cbb99e9252..160e791978e 100644 --- a/erpnext/accounts/doctype/currency_exchange_settings/currency_exchange_settings.py +++ b/erpnext/accounts/doctype/currency_exchange_settings/currency_exchange_settings.py @@ -109,7 +109,7 @@ def get_api_endpoint(service_provider: str | None = None, use_http: bool = False if service_provider == "exchangerate.host": api = "api.exchangerate.host/convert" elif service_provider == "frankfurter.app": - api = "frankfurter.app/{transaction_date}" + api = "api.frankfurter.app/{transaction_date}" protocol = "https://" if use_http: diff --git a/erpnext/accounts/doctype/dunning/dunning.json b/erpnext/accounts/doctype/dunning/dunning.json index b7e8aeaaafd..496097417ba 100644 --- a/erpnext/accounts/doctype/dunning/dunning.json +++ b/erpnext/accounts/doctype/dunning/dunning.json @@ -19,16 +19,6 @@ "currency", "column_break_11", "conversion_rate", - "address_and_contact_section", - "customer_address", - "address_display", - "contact_person", - "contact_display", - "column_break_16", - "company_address", - "company_address_display", - "contact_mobile", - "contact_email", "section_break_6", "dunning_type", "column_break_8", @@ -56,7 +46,21 @@ "income_account", "column_break_48", "cost_center", - "amended_from" + "amended_from", + "address_and_contact_tab", + "address_and_contact_section", + "customer_address", + "address_display", + "column_break_vodj", + "contact_person", + "contact_display", + "contact_mobile", + "contact_email", + "section_break_xban", + "column_break_16", + "company_address", + "company_address_display", + "column_break_lqmf" ], "fields": [ { @@ -178,10 +182,8 @@ "label": "Rate of Interest (%) Yearly" }, { - "collapsible": 1, "fieldname": "address_and_contact_section", - "fieldtype": "Section Break", - "label": "Address and Contact" + "fieldtype": "Section Break" }, { "fieldname": "address_display", @@ -377,11 +379,28 @@ { "fieldname": "column_break_48", "fieldtype": "Column Break" + }, + { + "fieldname": "address_and_contact_tab", + "fieldtype": "Tab Break", + "label": "Address & Contact" + }, + { + "fieldname": "column_break_vodj", + "fieldtype": "Column Break" + }, + { + "fieldname": "section_break_xban", + "fieldtype": "Section Break" + }, + { + "fieldname": "column_break_lqmf", + "fieldtype": "Column Break" } ], "is_submittable": 1, "links": [], - "modified": "2023-06-15 15:46:53.865712", + "modified": "2024-11-26 13:46:07.760867", "modified_by": "Administrator", "module": "Accounts", "name": "Dunning", @@ -435,4 +454,4 @@ "states": [], "title_field": "customer_name", "track_changes": 1 -} \ No newline at end of file +} diff --git a/erpnext/accounts/doctype/dunning/dunning.py b/erpnext/accounts/doctype/dunning/dunning.py index ad58761e1bf..d63db3a09a1 100644 --- a/erpnext/accounts/doctype/dunning/dunning.py +++ b/erpnext/accounts/doctype/dunning/dunning.py @@ -210,19 +210,31 @@ def get_linked_dunnings_as_per_state(sales_invoice, state): @frappe.whitelist() -def get_dunning_letter_text(dunning_type, doc, language=None): +def get_dunning_letter_text(dunning_type: str, doc: str | dict, language: str | None = None) -> dict: + DOCTYPE = "Dunning Letter Text" + FIELDS = ["body_text", "closing_text", "language"] + if isinstance(doc, str): doc = json.loads(doc) + + if not language: + language = doc.get("language") + if language: - filters = {"parent": dunning_type, "language": language} - else: - filters = {"parent": dunning_type, "is_default_language": 1} - letter_text = frappe.db.get_value( - "Dunning Letter Text", filters, ["body_text", "closing_text", "language"], as_dict=1 - ) - if letter_text: - return { - "body_text": frappe.render_template(letter_text.body_text, doc), - "closing_text": frappe.render_template(letter_text.closing_text, doc), - "language": letter_text.language, - } + letter_text = frappe.db.get_value( + DOCTYPE, {"parent": dunning_type, "language": language}, FIELDS, as_dict=1 + ) + + if not letter_text: + letter_text = frappe.db.get_value( + DOCTYPE, {"parent": dunning_type, "is_default_language": 1}, FIELDS, as_dict=1 + ) + + if not letter_text: + return {} + + return { + "body_text": frappe.render_template(letter_text.body_text, doc), + "closing_text": frappe.render_template(letter_text.closing_text, doc), + "language": letter_text.language, + } diff --git a/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.py b/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.py index 8607d1ed71f..c08bd3878d5 100644 --- a/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.py +++ b/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.py @@ -74,6 +74,21 @@ class ExchangeRateRevaluation(Document): if not (self.company and self.posting_date): frappe.throw(_("Please select Company and Posting Date to getting entries")) + def before_submit(self): + self.remove_accounts_without_gain_loss() + + def remove_accounts_without_gain_loss(self): + self.accounts = [account for account in self.accounts if account.gain_loss] + + if not self.accounts: + frappe.throw(_("At least one account with exchange gain or loss is required")) + + frappe.msgprint( + _("Removing rows without exchange gain or loss"), + alert=True, + indicator="yellow", + ) + def on_cancel(self): self.ignore_linked_doctypes = "GL Entry" @@ -248,23 +263,23 @@ class ExchangeRateRevaluation(Document): new_exchange_rate = get_exchange_rate(d.account_currency, company_currency, posting_date) new_balance_in_base_currency = flt(d.balance_in_account_currency * new_exchange_rate) gain_loss = flt(new_balance_in_base_currency, precision) - flt(d.balance, precision) - if gain_loss: - accounts.append( - { - "account": d.account, - "party_type": d.party_type, - "party": d.party, - "account_currency": d.account_currency, - "balance_in_base_currency": d.balance, - "balance_in_account_currency": d.balance_in_account_currency, - "zero_balance": d.zero_balance, - "current_exchange_rate": current_exchange_rate, - "new_exchange_rate": new_exchange_rate, - "new_balance_in_base_currency": new_balance_in_base_currency, - "new_balance_in_account_currency": d.balance_in_account_currency, - "gain_loss": gain_loss, - } - ) + + accounts.append( + { + "account": d.account, + "party_type": d.party_type, + "party": d.party, + "account_currency": d.account_currency, + "balance_in_base_currency": d.balance, + "balance_in_account_currency": d.balance_in_account_currency, + "zero_balance": d.zero_balance, + "current_exchange_rate": current_exchange_rate, + "new_exchange_rate": new_exchange_rate, + "new_balance_in_base_currency": new_balance_in_base_currency, + "new_balance_in_account_currency": d.balance_in_account_currency, + "gain_loss": gain_loss, + } + ) # Handle Accounts with '0' balance in Account/Base Currency for d in [x for x in account_details if x.zero_balance]: @@ -288,23 +303,22 @@ class ExchangeRateRevaluation(Document): current_exchange_rate * d.balance_in_account_currency ) - if gain_loss: - accounts.append( - { - "account": d.account, - "party_type": d.party_type, - "party": d.party, - "account_currency": d.account_currency, - "balance_in_base_currency": d.balance, - "balance_in_account_currency": d.balance_in_account_currency, - "zero_balance": d.zero_balance, - "current_exchange_rate": current_exchange_rate, - "new_exchange_rate": new_exchange_rate, - "new_balance_in_base_currency": new_balance_in_base_currency, - "new_balance_in_account_currency": new_balance_in_account_currency, - "gain_loss": gain_loss, - } - ) + accounts.append( + { + "account": d.account, + "party_type": d.party_type, + "party": d.party, + "account_currency": d.account_currency, + "balance_in_base_currency": d.balance, + "balance_in_account_currency": d.balance_in_account_currency, + "zero_balance": d.zero_balance, + "current_exchange_rate": current_exchange_rate, + "new_exchange_rate": new_exchange_rate, + "new_balance_in_base_currency": new_balance_in_base_currency, + "new_balance_in_account_currency": new_balance_in_account_currency, + "gain_loss": gain_loss, + } + ) return accounts diff --git a/erpnext/accounts/doctype/exchange_rate_revaluation/test_exchange_rate_revaluation.py b/erpnext/accounts/doctype/exchange_rate_revaluation/test_exchange_rate_revaluation.py index 51053f1f68c..3eef6ab3832 100644 --- a/erpnext/accounts/doctype/exchange_rate_revaluation/test_exchange_rate_revaluation.py +++ b/erpnext/accounts/doctype/exchange_rate_revaluation/test_exchange_rate_revaluation.py @@ -188,7 +188,7 @@ class TestExchangeRateRevaluation(AccountsTestMixin, FrappeTestCase): pe = get_payment_entry(si.doctype, si.name) pe.paid_amount = 95 - pe.source_exchange_rate = 84.211 + pe.source_exchange_rate = 84.2105 pe.received_amount = 8000 pe.references = [] pe.save().submit() @@ -229,7 +229,7 @@ class TestExchangeRateRevaluation(AccountsTestMixin, FrappeTestCase): row = next(x for x in je.accounts if x.account == self.debtors_usd) self.assertEqual(flt(row.credit_in_account_currency, precision), 5.0) # in USD row = next(x for x in je.accounts if x.account != self.debtors_usd) - self.assertEqual(flt(row.debit_in_account_currency, precision), 421.06) # in INR + self.assertEqual(flt(row.debit_in_account_currency, precision), 421.05) # in INR # total_debit and total_credit will be 0.0, as JV is posting only to account currency fields self.assertEqual(flt(je.total_debit, precision), 0.0) diff --git a/erpnext/accounts/doctype/fiscal_year/fiscal_year.js b/erpnext/accounts/doctype/fiscal_year/fiscal_year.js index a44b52f08f8..aeb9f982b4d 100644 --- a/erpnext/accounts/doctype/fiscal_year/fiscal_year.js +++ b/erpnext/accounts/doctype/fiscal_year/fiscal_year.js @@ -4,10 +4,7 @@ frappe.ui.form.on("Fiscal Year", { onload: function (frm) { if (frm.doc.__islocal) { - frm.set_value( - "year_start_date", - frappe.datetime.add_days(frappe.defaults.get_default("year_end_date"), 1) - ); + frm.set_value("year_start_date", frappe.datetime.year_start()); } }, year_start_date: function (frm) { diff --git a/erpnext/accounts/doctype/fiscal_year/fiscal_year.json b/erpnext/accounts/doctype/fiscal_year/fiscal_year.json index 66db37fe13b..de8f0337a3d 100644 --- a/erpnext/accounts/doctype/fiscal_year/fiscal_year.json +++ b/erpnext/accounts/doctype/fiscal_year/fiscal_year.json @@ -72,10 +72,10 @@ }, { "default": "0", - "description": "Less than 12 months.", + "description": "More/Less than 12 months.", "fieldname": "is_short_year", "fieldtype": "Check", - "label": "Is Short Year", + "label": "Is Short/Long Year", "set_only_once": 1 } ], diff --git a/erpnext/accounts/doctype/gl_entry/gl_entry.json b/erpnext/accounts/doctype/gl_entry/gl_entry.json index 2d106ad8cee..c285a33f73e 100644 --- a/erpnext/accounts/doctype/gl_entry/gl_entry.json +++ b/erpnext/accounts/doctype/gl_entry/gl_entry.json @@ -6,38 +6,50 @@ "document_type": "Document", "engine": "InnoDB", "field_order": [ + "dates_section", "posting_date", "transaction_date", + "column_break_avko", + "fiscal_year", + "due_date", + "account_details_section", "account", + "account_currency", + "column_break_ifvf", + "against", "party_type", "party", - "cost_center", - "debit", - "credit", - "account_currency", - "debit_in_account_currency", - "credit_in_account_currency", - "against", + "transaction_details_section", + "voucher_type", + "voucher_no", + "voucher_subtype", + "transaction_currency", + "column_break_dpsx", "against_voucher_type", "against_voucher", - "voucher_type", - "voucher_subtype", - "voucher_no", "voucher_detail_no", + "transaction_exchange_rate", + "amounts_section", + "debit_in_account_currency", + "debit", + "debit_in_transaction_currency", + "column_break_bm1w", + "credit_in_account_currency", + "credit", + "credit_in_transaction_currency", + "dimensions_section", + "cost_center", + "column_break_lmnm", "project", - "remarks", + "more_info_section", + "finance_book", + "company", "is_opening", "is_advance", - "fiscal_year", - "company", - "finance_book", + "column_break_8abq", "to_rename", - "due_date", "is_cancelled", - "transaction_currency", - "debit_in_transaction_currency", - "credit_in_transaction_currency", - "transaction_exchange_rate" + "remarks" ], "fields": [ { @@ -285,13 +297,67 @@ "fieldname": "voucher_subtype", "fieldtype": "Small Text", "label": "Voucher Subtype" + }, + { + "fieldname": "dates_section", + "fieldtype": "Section Break", + "label": "Dates" + }, + { + "fieldname": "column_break_avko", + "fieldtype": "Column Break" + }, + { + "fieldname": "account_details_section", + "fieldtype": "Section Break", + "label": "Account Details" + }, + { + "fieldname": "column_break_ifvf", + "fieldtype": "Column Break" + }, + { + "fieldname": "transaction_details_section", + "fieldtype": "Section Break", + "label": "Transaction Details" + }, + { + "fieldname": "amounts_section", + "fieldtype": "Section Break", + "label": "Amounts" + }, + { + "fieldname": "column_break_dpsx", + "fieldtype": "Column Break" + }, + { + "fieldname": "more_info_section", + "fieldtype": "Section Break", + "label": "More Info" + }, + { + "fieldname": "column_break_bm1w", + "fieldtype": "Column Break" + }, + { + "fieldname": "dimensions_section", + "fieldtype": "Section Break", + "label": "Dimensions" + }, + { + "fieldname": "column_break_lmnm", + "fieldtype": "Column Break" + }, + { + "fieldname": "column_break_8abq", + "fieldtype": "Column Break" } ], "icon": "fa fa-list", "idx": 1, "in_create": 1, "links": [], - "modified": "2024-07-02 14:31:51.496466", + "modified": "2024-08-22 13:03:39.997475", "modified_by": "Administrator", "module": "Accounts", "name": "GL Entry", diff --git a/erpnext/accounts/doctype/gl_entry/gl_entry.py b/erpnext/accounts/doctype/gl_entry/gl_entry.py index d74224c4aa2..a7e7edb098d 100644 --- a/erpnext/accounts/doctype/gl_entry/gl_entry.py +++ b/erpnext/accounts/doctype/gl_entry/gl_entry.py @@ -430,8 +430,9 @@ def update_against_account(voucher_type, voucher_no): def on_doctype_update(): - frappe.db.add_index("GL Entry", ["against_voucher_type", "against_voucher"]) frappe.db.add_index("GL Entry", ["voucher_type", "voucher_no"]) + frappe.db.add_index("GL Entry", ["posting_date", "company"]) + frappe.db.add_index("GL Entry", ["party_type", "party"]) def rename_gle_sle_docs(): diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.js b/erpnext/accounts/doctype/journal_entry/journal_entry.js index d290d794df1..faa38763b80 100644 --- a/erpnext/accounts/doctype/journal_entry/journal_entry.js +++ b/erpnext/accounts/doctype/journal_entry/journal_entry.js @@ -360,21 +360,23 @@ erpnext.accounts.JournalEntry = class JournalEntry extends frappe.ui.form.Contro accounts_add(doc, cdt, cdn) { var row = frappe.get_doc(cdt, cdn); + row.exchange_rate = 1; $.each(doc.accounts, function (i, d) { if (d.account && d.party && d.party_type) { row.account = d.account; row.party = d.party; row.party_type = d.party_type; + row.exchange_rate = d.exchange_rate; } }); // set difference if (doc.difference) { if (doc.difference > 0) { - row.credit_in_account_currency = doc.difference; + row.credit_in_account_currency = doc.difference / row.exchange_rate; row.credit = doc.difference; } else { - row.debit_in_account_currency = -doc.difference; + row.debit_in_account_currency = -doc.difference / row.exchange_rate; row.debit = -doc.difference; } } @@ -680,6 +682,7 @@ $.extend(erpnext.journal_entry, { callback: function (r) { if (r.message) { $.extend(d, r.message); + erpnext.journal_entry.set_amount_on_last_row(frm, dt, dn); erpnext.journal_entry.set_debit_credit_in_company_currency(frm, dt, dn); refresh_field("accounts"); } @@ -687,4 +690,26 @@ $.extend(erpnext.journal_entry, { }); } }, + set_amount_on_last_row: function (frm, dt, dn) { + let row = locals[dt][dn]; + let length = frm.doc.accounts.length; + if (row.idx != length) return; + + let difference = frm.doc.accounts.reduce((total, row) => { + if (row.idx == length) return total; + + return total + row.debit - row.credit; + }, 0); + + if (difference) { + if (difference > 0) { + row.credit_in_account_currency = difference / row.exchange_rate; + row.credit = difference; + } else { + row.debit_in_account_currency = -difference / row.exchange_rate; + row.debit = -difference; + } + } + refresh_field("accounts"); + }, }); diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.py b/erpnext/accounts/doctype/journal_entry/journal_entry.py index 6adc8be3f7d..ef2388a7eaa 100644 --- a/erpnext/accounts/doctype/journal_entry/journal_entry.py +++ b/erpnext/accounts/doctype/journal_entry/journal_entry.py @@ -127,9 +127,6 @@ class JournalEntry(AccountsController): self.set_amounts_in_company_currency() self.validate_debit_credit_amount() self.set_total_debit_credit() - # Do not validate while importing via data import - if not frappe.flags.in_import: - self.validate_total_debit_and_credit() if not frappe.flags.is_reverse_depr_entry: self.validate_against_jv() @@ -184,10 +181,16 @@ class JournalEntry(AccountsController): else: return self._cancel() + def before_submit(self): + # Do not validate while importing via data import + if not frappe.flags.in_import: + self.validate_total_debit_and_credit() + def on_submit(self): self.validate_cheque_info() self.check_credit_limit() self.make_gl_entries() + self.make_advance_payment_ledger_entries() self.update_advance_paid() self.update_asset_value() self.update_inter_company_jv() @@ -195,6 +198,11 @@ class JournalEntry(AccountsController): self.update_booked_depreciation() def on_update_after_submit(self): + # Flag will be set on Reconciliation + # Reconciliation tool will anyways repost ledger entries. So, no need to check and do implicit repost. + if self.flags.get("ignore_reposting_on_reconciliation"): + return + self.needs_repost = self.check_if_fields_updated(fields_to_check=[], child_tables={"accounts": []}) if self.needs_repost: self.validate_for_repost() @@ -213,8 +221,10 @@ class JournalEntry(AccountsController): "Repost Accounting Ledger Items", "Unreconcile Payment", "Unreconcile Payment Entries", + "Advance Payment Ledger Entry", ) self.make_gl_entries(1) + self.make_advance_payment_ledger_entries() self.update_advance_paid() self.unlink_advance_entry_reference() self.unlink_asset_reference() @@ -254,7 +264,7 @@ class JournalEntry(AccountsController): frappe.throw(_("Journal Entry type should be set as Depreciation Entry for asset depreciation")) def validate_stock_accounts(self): - stock_accounts = get_stock_accounts(self.company, self.doctype, self.name) + stock_accounts = get_stock_accounts(self.company, accounts=self.accounts) for account in stock_accounts: account_bal, stock_bal, warehouse_list = get_stock_and_account_balance( account, self.posting_date, self.company @@ -1663,6 +1673,8 @@ def make_reverse_journal_entry(source_name, target_doc=None): "debit": "credit", "credit_in_account_currency": "debit_in_account_currency", "credit": "debit", + "reference_type": "reference_type", + "reference_name": "reference_name", }, }, }, diff --git a/erpnext/accounts/doctype/journal_entry/test_journal_entry.py b/erpnext/accounts/doctype/journal_entry/test_journal_entry.py index c53faf9ff39..8f4c4e3ccda 100644 --- a/erpnext/accounts/doctype/journal_entry/test_journal_entry.py +++ b/erpnext/accounts/doctype/journal_entry/test_journal_entry.py @@ -515,6 +515,72 @@ class TestJournalEntry(unittest.TestCase): self.assertEqual(row.debit_in_account_currency, 100) self.assertEqual(row.credit_in_account_currency, 100) + def test_toggle_debit_credit_if_negative(self): + from erpnext.accounts.general_ledger import process_gl_map + + # Create JV with defaut cost center - _Test Cost Center + frappe.db.set_single_value("Accounts Settings", "merge_similar_account_heads", 0) + + jv = frappe.new_doc("Journal Entry") + jv.posting_date = nowdate() + jv.company = "_Test Company" + jv.user_remark = "test" + jv.extend( + "accounts", + [ + { + "account": "_Test Cash - _TC", + "debit": 100 * -1, + "debit_in_account_currency": 100 * -1, + "exchange_rate": 1, + }, + { + "account": "_Test Bank - _TC", + "credit": 100 * -1, + "credit_in_account_currency": 100 * -1, + "exchange_rate": 1, + }, + ], + ) + + jv.flags.ignore_validate = True + jv.save() + + self.assertEqual(len(jv.accounts), 2) + + gl_map = jv.build_gl_map() + + for row in gl_map: + if row.account == "_Test Cash - _TC": + self.assertEqual(row.debit, 100 * -1) + self.assertEqual(row.debit_in_account_currency, 100 * -1) + self.assertEqual(row.debit_in_transaction_currency, 100 * -1) + + gl_map = process_gl_map(gl_map, False) + + for row in gl_map: + if row.account == "_Test Cash - _TC": + self.assertEqual(row.credit, 100) + self.assertEqual(row.credit_in_account_currency, 100) + self.assertEqual(row.credit_in_transaction_currency, 100) + + def test_transaction_exchange_rate_on_journals(self): + jv = make_journal_entry("_Test Bank - _TC", "_Test Receivable USD - _TC", 100, save=False) + jv.accounts[0].update({"debit_in_account_currency": 8500, "exchange_rate": 1}) + jv.accounts[1].update({"party_type": "Customer", "party": "_Test Customer USD", "exchange_rate": 85}) + jv.submit() + actual = frappe.db.get_all( + "GL Entry", + filters={"voucher_no": jv.name, "is_cancelled": 0}, + fields=["account", "transaction_exchange_rate"], + order_by="account", + ) + expected = [ + {"account": "_Test Bank - _TC", "transaction_exchange_rate": 1.0}, + {"account": "_Test Receivable USD - _TC", "transaction_exchange_rate": 85.0}, + ] + self.assertEqual(expected, actual) + def make_journal_entry( account1, diff --git a/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.js b/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.js index f1efba8a954..4938e6690e5 100644 --- a/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.js +++ b/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.js @@ -28,7 +28,12 @@ frappe.ui.form.on("Opening Invoice Creation Tool", { frm.refresh_fields(); frm.page.clear_indicator(); frm.dashboard.hide_progress(); - frappe.msgprint(__("Opening {0} Invoices created", [frm.doc.invoice_type])); + + if (frm.doc.invoice_type == "Sales") { + frappe.msgprint(__("Opening Sales Invoices have been created.")); + } else { + frappe.msgprint(__("Opening Purchase Invoices have been created.")); + } }, 1500, data.title @@ -48,12 +53,19 @@ frappe.ui.form.on("Opening Invoice Creation Tool", { !frm.doc.import_in_progress && frm.trigger("make_dashboard"); frm.page.set_primary_action(__("Create Invoices"), () => { let btn_primary = frm.page.btn_primary.get(0); + let freeze_message; + if (frm.doc.invoice_type == "Sales") { + freeze_message = __("Creating Sales Invoices ..."); + } else { + freeze_message = __("Creating Purchase Invoices ..."); + } + return frm.call({ doc: frm.doc, btn: $(btn_primary), method: "make_invoices", freeze: 1, - freeze_message: __("Creating {0} Invoice", [frm.doc.invoice_type]), + freeze_message: freeze_message, }); }); diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.js b/erpnext/accounts/doctype/payment_entry/payment_entry.js index c28dcf525df..f2d11ba9ff3 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.js +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.js @@ -26,6 +26,10 @@ frappe.ui.form.on("Payment Entry", { } erpnext.accounts.dimensions.setup_dimension_filters(frm, frm.doctype); + + if (frm.is_new()) { + set_default_party_type(frm); + } }, setup: function (frm) { @@ -35,6 +39,11 @@ frappe.ui.form.on("Payment Entry", { var account_types = ["Pay", "Internal Transfer"].includes(frm.doc.payment_type) ? ["Bank", "Cash"] : [frappe.boot.party_account_types[frm.doc.party_type]]; + + if (frm.doc.party_type == "Shareholder") { + account_types.push("Equity"); + } + return { filters: { account_type: ["in", account_types], @@ -90,6 +99,9 @@ frappe.ui.form.on("Payment Entry", { var account_types = ["Receive", "Internal Transfer"].includes(frm.doc.payment_type) ? ["Bank", "Cash"] : [frappe.boot.party_account_types[frm.doc.party_type]]; + if (frm.doc.party_type == "Shareholder") { + account_types.push("Equity"); + } return { filters: { account_type: ["in", account_types], @@ -166,6 +178,21 @@ frappe.ui.form.on("Payment Entry", { }; }); + frm.set_query("payment_request", "references", function (doc, cdt, cdn) { + const row = frappe.get_doc(cdt, cdn); + return { + query: "erpnext.accounts.doctype.payment_request.payment_request.get_open_payment_requests_query", + filters: { + reference_doctype: row.reference_doctype, + reference_name: row.reference_name, + company: doc.company, + status: ["!=", "Paid"], + outstanding_amount: [">", 0], // for compatibility with old data + docstatus: 1, + }, + }; + }); + frm.set_query("sales_taxes_and_charges_template", function () { return { filters: { @@ -183,7 +210,15 @@ frappe.ui.form.on("Payment Entry", { }, }; }); + + frm.add_fetch( + "payment_request", + "outstanding_amount", + "payment_request_outstanding", + "Payment Entry Reference" + ); }, + refresh: function (frm) { erpnext.hide_company(frm); frm.events.hide_unhide_fields(frm); @@ -208,6 +243,7 @@ frappe.ui.form.on("Payment Entry", { ); } erpnext.accounts.unreconcile_payment.add_unreconcile_btn(frm); + frappe.flags.allocate_payment_amount = true; }, validate_company: (frm) => { @@ -288,16 +324,11 @@ frappe.ui.form.on("Payment Entry", { "write_off_difference_amount", frm.doc.difference_amount && frm.doc.party && frm.doc.total_allocated_amount > party_amount ); - - frm.toggle_display( - "set_exchange_gain_loss", - frm.doc.paid_amount && frm.doc.received_amount && frm.doc.difference_amount - ); }, set_dynamic_labels: function (frm) { var company_currency = frm.doc.company - ? frappe.get_doc(":Company", frm.doc.company).default_currency + ? frappe.get_doc(":Company", frm.doc.company)?.default_currency : ""; frm.set_currency_labels( @@ -375,9 +406,19 @@ frappe.ui.form.on("Payment Entry", { }, payment_type: function (frm) { + set_default_party_type(frm); + if (frm.doc.payment_type == "Internal Transfer") { $.each( - ["party", "party_balance", "paid_from", "paid_to", "references", "total_allocated_amount"], + [ + "party", + "party_type", + "party_balance", + "paid_from", + "paid_to", + "references", + "total_allocated_amount", + ], function (i, field) { frm.set_value(field, null); } @@ -412,6 +453,12 @@ frappe.ui.form.on("Payment Entry", { return { query: "erpnext.controllers.queries.employee_query", }; + } else if (frm.doc.party_type == "Shareholder") { + return { + filters: { + company: frm.doc.company, + }, + }; } }); @@ -644,7 +691,7 @@ frappe.ui.form.on("Payment Entry", { frm.set_value("source_exchange_rate", 1); } else if (frm.doc.paid_from) { if (["Internal Transfer", "Pay"].includes(frm.doc.payment_type)) { - let company_currency = frappe.get_doc(":Company", frm.doc.company).default_currency; + let company_currency = frappe.get_doc(":Company", frm.doc.company)?.default_currency; frappe.call({ method: "erpnext.setup.utils.get_exchange_rate", args: { @@ -775,7 +822,7 @@ frappe.ui.form.on("Payment Entry", { ); if (frm.doc.payment_type == "Pay") - frm.events.allocate_party_amount_against_ref_docs(frm, frm.doc.received_amount, 1); + frm.events.allocate_party_amount_against_ref_docs(frm, frm.doc.received_amount, true); else frm.events.set_unallocated_amount(frm); frm.set_paid_amount_based_on_received_amount = false; @@ -796,7 +843,7 @@ frappe.ui.form.on("Payment Entry", { } if (frm.doc.payment_type == "Receive") - frm.events.allocate_party_amount_against_ref_docs(frm, frm.doc.paid_amount, 1); + frm.events.allocate_party_amount_against_ref_docs(frm, frm.doc.paid_amount, true); else frm.events.set_unallocated_amount(frm); }, @@ -967,6 +1014,7 @@ frappe.ui.form.on("Payment Entry", { c.outstanding_amount = d.outstanding_amount; c.bill_no = d.bill_no; c.payment_term = d.payment_term; + c.payment_term_outstanding = d.payment_term_outstanding; c.allocated_amount = d.allocated_amount; c.account = d.account; @@ -1016,7 +1064,8 @@ frappe.ui.form.on("Payment Entry", { frm.events.allocate_party_amount_against_ref_docs( frm, - frm.doc.payment_type == "Receive" ? frm.doc.paid_amount : frm.doc.received_amount + frm.doc.payment_type == "Receive" ? frm.doc.paid_amount : frm.doc.received_amount, + false ); }, }); @@ -1030,93 +1079,13 @@ frappe.ui.form.on("Payment Entry", { return ["Sales Invoice", "Purchase Invoice"]; }, - allocate_party_amount_against_ref_docs: function (frm, paid_amount, paid_amount_change) { - var total_positive_outstanding_including_order = 0; - var total_negative_outstanding = 0; - var total_deductions = frappe.utils.sum( - $.map(frm.doc.deductions || [], function (d) { - return flt(d.amount); - }) - ); - - paid_amount -= total_deductions; - - $.each(frm.doc.references || [], function (i, row) { - if (flt(row.outstanding_amount) > 0) - total_positive_outstanding_including_order += flt(row.outstanding_amount); - else total_negative_outstanding += Math.abs(flt(row.outstanding_amount)); + allocate_party_amount_against_ref_docs: async function (frm, paid_amount, paid_amount_change) { + await frm.call("allocate_amount_to_references", { + paid_amount: paid_amount, + paid_amount_change: paid_amount_change, + allocate_payment_amount: frappe.flags.allocate_payment_amount ?? false, }); - var allocated_negative_outstanding = 0; - if ( - (frm.doc.payment_type == "Receive" && frm.doc.party_type == "Customer") || - (frm.doc.payment_type == "Pay" && frm.doc.party_type == "Supplier") || - (frm.doc.payment_type == "Pay" && frm.doc.party_type == "Employee") - ) { - if (total_positive_outstanding_including_order > paid_amount) { - var remaining_outstanding = total_positive_outstanding_including_order - paid_amount; - allocated_negative_outstanding = - total_negative_outstanding < remaining_outstanding - ? total_negative_outstanding - : remaining_outstanding; - } - - var allocated_positive_outstanding = paid_amount + allocated_negative_outstanding; - } else if (["Customer", "Supplier"].includes(frm.doc.party_type)) { - total_negative_outstanding = flt(total_negative_outstanding, precision("outstanding_amount")); - if (paid_amount > total_negative_outstanding) { - if (total_negative_outstanding == 0) { - frappe.msgprint( - __("Cannot {0} {1} {2} without any negative outstanding invoice", [ - frm.doc.payment_type, - frm.doc.party_type == "Customer" ? "to" : "from", - frm.doc.party_type, - ]) - ); - return false; - } else { - frappe.msgprint( - __("Paid Amount cannot be greater than total negative outstanding amount {0}", [ - total_negative_outstanding, - ]) - ); - return false; - } - } else { - allocated_positive_outstanding = total_negative_outstanding - paid_amount; - allocated_negative_outstanding = - paid_amount + - (total_positive_outstanding_including_order < allocated_positive_outstanding - ? total_positive_outstanding_including_order - : allocated_positive_outstanding); - } - } - - $.each(frm.doc.references || [], function (i, row) { - if (frappe.flags.allocate_payment_amount == 0) { - //If allocate payment amount checkbox is unchecked, set zero to allocate amount - row.allocated_amount = 0; - } else if ( - frappe.flags.allocate_payment_amount != 0 && - (!row.allocated_amount || paid_amount_change) - ) { - if (row.outstanding_amount > 0 && allocated_positive_outstanding >= 0) { - row.allocated_amount = - row.outstanding_amount >= allocated_positive_outstanding - ? allocated_positive_outstanding - : row.outstanding_amount; - allocated_positive_outstanding -= flt(row.allocated_amount); - } else if (row.outstanding_amount < 0 && allocated_negative_outstanding) { - row.allocated_amount = - Math.abs(row.outstanding_amount) >= allocated_negative_outstanding - ? -1 * allocated_negative_outstanding - : row.outstanding_amount; - allocated_negative_outstanding -= Math.abs(flt(row.allocated_amount)); - } - } - }); - - frm.refresh_fields(); frm.events.set_total_allocated_amount(frm); }, @@ -1145,36 +1114,34 @@ frappe.ui.form.on("Payment Entry", { }, set_unallocated_amount: function (frm) { - var unallocated_amount = 0; - var total_deductions = frappe.utils.sum( - $.map(frm.doc.deductions || [], function (d) { - return flt(d.amount); - }) - ); + let unallocated_amount = 0; + let deductions_to_consider = 0; + + for (const row of frm.doc.deductions || []) { + if (!row.is_exchange_gain_loss) deductions_to_consider += flt(row.amount); + } + const included_taxes = get_included_taxes(frm); if (frm.doc.party) { if ( frm.doc.payment_type == "Receive" && - frm.doc.base_total_allocated_amount < frm.doc.base_received_amount + total_deductions && - frm.doc.total_allocated_amount < - frm.doc.paid_amount + total_deductions / frm.doc.source_exchange_rate - ) { - unallocated_amount = - (frm.doc.base_received_amount + - total_deductions - - flt(frm.doc.base_total_taxes_and_charges) - - frm.doc.base_total_allocated_amount) / - frm.doc.source_exchange_rate; - } else if ( - frm.doc.payment_type == "Pay" && - frm.doc.base_total_allocated_amount < frm.doc.base_paid_amount - total_deductions && - frm.doc.total_allocated_amount < - frm.doc.received_amount + total_deductions / frm.doc.target_exchange_rate + frm.doc.base_total_allocated_amount < frm.doc.base_paid_amount + deductions_to_consider ) { unallocated_amount = (frm.doc.base_paid_amount + - flt(frm.doc.base_total_taxes_and_charges) - - (total_deductions + frm.doc.base_total_allocated_amount)) / + deductions_to_consider - + frm.doc.base_total_allocated_amount - + included_taxes) / + frm.doc.source_exchange_rate; + } else if ( + frm.doc.payment_type == "Pay" && + frm.doc.base_total_allocated_amount < frm.doc.base_received_amount - deductions_to_consider + ) { + unallocated_amount = + (frm.doc.base_received_amount - + deductions_to_consider - + frm.doc.base_total_allocated_amount - + included_taxes) / frm.doc.target_exchange_rate; } } @@ -1268,77 +1235,85 @@ frappe.ui.form.on("Payment Entry", { }, write_off_difference_amount: function (frm) { - frm.events.set_deductions_entry(frm, "write_off_account"); + frm.events.set_write_off_deduction(frm); }, - set_exchange_gain_loss: function (frm) { - frm.events.set_deductions_entry(frm, "exchange_gain_loss_account"); + base_paid_amount: function (frm) { + frm.events.set_exchange_gain_loss_deduction(frm); }, - set_deductions_entry: function (frm, account) { - if (frm.doc.difference_amount) { - frappe.call({ - method: "erpnext.accounts.doctype.payment_entry.payment_entry.get_company_defaults", - args: { - company: frm.doc.company, - }, - callback: function (r, rt) { - if (r.message) { - const write_off_row = $.map(frm.doc["deductions"] || [], function (t) { - return t.account == r.message[account] ? t : null; - }); + base_received_amount: function (frm) { + frm.events.set_exchange_gain_loss_deduction(frm); + }, - const difference_amount = flt( - frm.doc.difference_amount, - precision("difference_amount") - ); + set_exchange_gain_loss_deduction: async function (frm) { + // wait for allocate_party_amount_against_ref_docs to finish + await frappe.after_ajax(); + const base_paid_amount = frm.doc.base_paid_amount || 0; + const base_received_amount = frm.doc.base_received_amount || 0; + const exchange_gain_loss = flt( + base_paid_amount - base_received_amount, + get_deduction_amount_precision() + ); - const add_deductions = (details) => { - let row = null; - if (!write_off_row.length && difference_amount) { - row = frm.add_child("deductions"); - row.account = details[account]; - row.cost_center = details["cost_center"]; - } else { - row = write_off_row[0]; - } - - if (row) { - row.amount = flt(row.amount) + difference_amount; - } else { - frappe.msgprint(__("No gain or loss in the exchange rate")); - } - refresh_field("deductions"); - }; - - if (!r.message[account]) { - frappe.prompt( - { - label: __("Please Specify Account"), - fieldname: account, - fieldtype: "Link", - options: "Account", - get_query: () => ({ - filters: { - company: frm.doc.company, - }, - }), - }, - (values) => { - const details = Object.assign({}, r.message, values); - add_deductions(details); - }, - __(frappe.unscrub(account)) - ); - } else { - add_deductions(r.message); - } - - frm.events.set_unallocated_amount(frm); - } - }, - }); + if (!exchange_gain_loss) { + frm.events.delete_exchange_gain_loss(frm); + return; } + + const account_fieldname = "exchange_gain_loss_account"; + let row = (frm.doc.deductions || []).find((t) => t.is_exchange_gain_loss); + + if (!row) { + const response = await get_company_defaults(frm.doc.company); + + const account = + response.message?.[account_fieldname] || + (await prompt_for_missing_account(frm, account_fieldname)); + + row = frm.add_child("deductions"); + row.account = account; + row.cost_center = response.message?.cost_center; + row.is_exchange_gain_loss = 1; + } + + row.amount = exchange_gain_loss; + frm.refresh_field("deductions"); + frm.events.set_unallocated_amount(frm); + }, + + delete_exchange_gain_loss: function (frm) { + const exchange_gain_loss_row = (frm.doc.deductions || []).find((row) => row.is_exchange_gain_loss); + + if (!exchange_gain_loss_row) return; + + exchange_gain_loss_row.amount = 0; + frm.get_field("deductions").grid.grid_rows[exchange_gain_loss_row.idx - 1].remove(); + frm.refresh_field("deductions"); + }, + + set_write_off_deduction: async function (frm) { + const difference_amount = flt(frm.doc.difference_amount, get_deduction_amount_precision()); + if (!difference_amount) return; + + const account_fieldname = "write_off_account"; + const response = await get_company_defaults(frm.doc.company); + const write_off_account = + response.message?.[account_fieldname] || + (await prompt_for_missing_account(frm, account_fieldname)); + + if (!write_off_account) return; + + let row = (frm.doc["deductions"] || []).find((t) => t.account == write_off_account); + if (!row) { + row = frm.add_child("deductions"); + row.account = write_off_account; + row.cost_center = response.message?.cost_center; + } + + row.amount = flt(row.amount) + difference_amount; + frm.refresh_field("deductions"); + frm.events.set_unallocated_amount(frm); }, bank_account: function (frm) { @@ -1664,6 +1639,62 @@ frappe.ui.form.on("Payment Entry", { return current_tax_amount; }, + + cost_center: function (frm) { + if (frm.doc.posting_date && (frm.doc.paid_from || frm.doc.paid_to)) { + return frappe.call({ + method: "erpnext.accounts.doctype.payment_entry.payment_entry.get_party_and_account_balance", + args: { + company: frm.doc.company, + date: frm.doc.posting_date, + paid_from: frm.doc.paid_from, + paid_to: frm.doc.paid_to, + ptype: frm.doc.party_type, + pty: frm.doc.party, + cost_center: frm.doc.cost_center, + }, + callback: function (r, rt) { + if (r.message) { + frappe.run_serially([ + () => { + frm.set_value( + "paid_from_account_balance", + r.message.paid_from_account_balance + ); + frm.set_value("paid_to_account_balance", r.message.paid_to_account_balance); + frm.set_value("party_balance", r.message.party_balance); + }, + ]); + } + }, + }); + } + }, + + after_save: function (frm) { + const { matched_payment_requests } = frappe.last_response; + if (!matched_payment_requests) return; + + const COLUMN_LABEL = [ + [__("Reference DocType"), __("Reference Name"), __("Allocated Amount"), __("Payment Request")], + ]; + + frappe.msgprint({ + title: __("Unset Matched Payment Request"), + message: COLUMN_LABEL.concat(matched_payment_requests), + as_table: true, + wide: true, + primary_action: { + label: __("Allocate Payment Request"), + action() { + frappe.hide_msgprint(); + frm.call("set_matched_payment_requests", { matched_payment_requests }, () => { + frm.dirty(); + }); + }, + }, + }); + }, }); frappe.ui.form.on("Payment Entry Reference", { @@ -1748,6 +1779,13 @@ frappe.ui.form.on("Advance Taxes and Charges", { }); frappe.ui.form.on("Payment Entry Deduction", { + before_deductions_remove: function (doc, cdt, cdn) { + const row = frappe.get_doc(cdt, cdn); + if (row.is_exchange_gain_loss && row.amount) { + frappe.throw(__("Cannot delete Exchange Gain/Loss row")); + } + }, + amount: function (frm) { frm.events.set_unallocated_amount(frm); }, @@ -1756,35 +1794,66 @@ frappe.ui.form.on("Payment Entry Deduction", { frm.events.set_unallocated_amount(frm); }, }); -frappe.ui.form.on("Payment Entry", { - cost_center: function (frm) { - if (frm.doc.posting_date && (frm.doc.paid_from || frm.doc.paid_to)) { - return frappe.call({ - method: "erpnext.accounts.doctype.payment_entry.payment_entry.get_party_and_account_balance", - args: { - company: frm.doc.company, - date: frm.doc.posting_date, - paid_from: frm.doc.paid_from, - paid_to: frm.doc.paid_to, - ptype: frm.doc.party_type, - pty: frm.doc.party, - cost_center: frm.doc.cost_center, - }, - callback: function (r, rt) { - if (r.message) { - frappe.run_serially([ - () => { - frm.set_value( - "paid_from_account_balance", - r.message.paid_from_account_balance - ); - frm.set_value("paid_to_account_balance", r.message.paid_to_account_balance); - frm.set_value("party_balance", r.message.party_balance); - }, - ]); - } - }, - }); + +function set_default_party_type(frm) { + if (frm.doc.party) return; + + let party_type; + if (frm.doc.payment_type == "Receive") { + party_type = "Customer"; + } else if (frm.doc.payment_type == "Pay") { + party_type = "Supplier"; + } + + if (party_type) frm.set_value("party_type", party_type); +} + +function get_included_taxes(frm) { + let included_taxes = 0; + for (const tax of frm.doc.taxes) { + if (!tax.included_in_paid_amount) continue; + + if (tax.add_deduct_tax == "Add") { + included_taxes += tax.base_tax_amount; + } else { + included_taxes -= tax.base_tax_amount; } - }, -}); + } + + return included_taxes; +} + +function get_company_defaults(company) { + return frappe.call({ + method: "erpnext.accounts.doctype.payment_entry.payment_entry.get_company_defaults", + args: { + company: company, + }, + }); +} + +function prompt_for_missing_account(frm, account) { + return new Promise((resolve) => { + const dialog = frappe.prompt( + { + label: __(frappe.unscrub(account)), + fieldname: account, + fieldtype: "Link", + options: "Account", + get_query: () => ({ + filters: { + company: frm.doc.company, + }, + }), + }, + (values) => resolve(values?.[account]), + __("Please Specify Account") + ); + + dialog.on_hide = () => resolve(""); + }); +} + +function get_deduction_amount_precision() { + return frappe.meta.get_field_precision(frappe.meta.get_field("Payment Entry Deduction", "amount")); +} diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.json b/erpnext/accounts/doctype/payment_entry/payment_entry.json index d420bcca342..69debbec5c7 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.json +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.json @@ -56,7 +56,6 @@ "section_break_34", "total_allocated_amount", "base_total_allocated_amount", - "set_exchange_gain_loss", "column_break_36", "unallocated_amount", "difference_amount", @@ -390,11 +389,6 @@ "print_hide": 1, "read_only": 1 }, - { - "fieldname": "set_exchange_gain_loss", - "fieldtype": "Button", - "label": "Set Exchange Gain / Loss" - }, { "fieldname": "column_break_36", "fieldtype": "Column Break" @@ -801,7 +795,7 @@ "table_fieldname": "payment_entries" } ], - "modified": "2024-05-31 17:07:06.197249", + "modified": "2024-11-07 11:19:19.320883", "modified_by": "Administrator", "module": "Accounts", "name": "Payment Entry", diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index 454101027e7..7e3d8a5833b 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -7,8 +7,10 @@ from functools import reduce import frappe from frappe import ValidationError, _, qb, scrub, throw +from frappe.query_builder import Tuple +from frappe.query_builder.functions import Count from frappe.utils import cint, comma_or, flt, getdate, nowdate -from frappe.utils.data import comma_and, fmt_money +from frappe.utils.data import comma_and, fmt_money, get_link_to_form from pypika import Case from pypika.functions import Coalesce, Sum @@ -98,13 +100,18 @@ class PaymentEntry(AccountsController): self.set_status() self.set_total_in_words() + def before_save(self): + self.set_matched_unset_payment_requests_to_response() + def on_submit(self): if self.difference_amount: frappe.throw(_("Difference Amount must be zero")) self.make_gl_entries() self.update_outstanding_amounts() - self.update_advance_paid() self.update_payment_schedule() + self.update_payment_requests() + self.make_advance_payment_ledger_entries() + self.update_advance_paid() # advance_paid_status depends on the payment request amount self.set_status() def set_liability_account(self): @@ -145,9 +152,21 @@ class PaymentEntry(AccountsController): self.is_opening = "No" return - liability_account = get_party_account( - self.party_type, self.party, self.company, include_advance=True - )[1] + accounts = get_party_account(self.party_type, self.party, self.company, include_advance=True) + + liability_account = accounts[1] if len(accounts) > 1 else None + fieldname = ( + "default_advance_received_account" + if self.party_type == "Customer" + else "default_advance_paid_account" + ) + + if not liability_account: + throw( + _("Please set default {0} in Company {1}").format( + frappe.bold(frappe.get_meta("Company").get_label(fieldname)), frappe.bold(self.company) + ) + ) self.set(self.party_account_field, liability_account) @@ -172,34 +191,40 @@ class PaymentEntry(AccountsController): "Repost Accounting Ledger Items", "Unreconcile Payment", "Unreconcile Payment Entries", + "Advance Payment Ledger Entry", ) super().on_cancel() self.make_gl_entries(cancel=1) self.update_outstanding_amounts() - self.update_advance_paid() self.delink_advance_entry_references() self.update_payment_schedule(cancel=1) - self.set_payment_req_status() + self.update_payment_requests(cancel=True) + self.make_advance_payment_ledger_entries() + self.update_advance_paid() # advance_paid_status depends on the payment request amount self.set_status() - def set_payment_req_status(self): - from erpnext.accounts.doctype.payment_request.payment_request import update_payment_req_status + def update_payment_requests(self, cancel=False): + from erpnext.accounts.doctype.payment_request.payment_request import ( + update_payment_requests_as_per_pe_references, + ) - update_payment_req_status(self, None) + update_payment_requests_as_per_pe_references(self.references, cancel=cancel) def update_outstanding_amounts(self): self.set_missing_ref_details(force=True) def validate_duplicate_entry(self): - reference_names = [] + reference_names = set() for d in self.get("references"): - if (d.reference_doctype, d.reference_name, d.payment_term) in reference_names: + key = (d.reference_doctype, d.reference_name, d.payment_term, d.payment_request) + if key in reference_names: frappe.throw( _("Row #{0}: Duplicate entry in References {1} {2}").format( d.idx, d.reference_doctype, d.reference_name ) ) - reference_names.append((d.reference_doctype, d.reference_name, d.payment_term)) + + reference_names.add(key) def set_bank_account_data(self): if self.bank_account: @@ -225,6 +250,8 @@ class PaymentEntry(AccountsController): if self.payment_type == "Internal Transfer": return + self.validate_allocated_amount_as_per_payment_request() + if self.party_type in ("Customer", "Supplier"): self.validate_allocated_amount_with_latest_data() else: @@ -237,6 +264,27 @@ class PaymentEntry(AccountsController): if flt(d.allocated_amount) < 0 and flt(d.allocated_amount) < flt(d.outstanding_amount): frappe.throw(fail_message.format(d.idx)) + def validate_allocated_amount_as_per_payment_request(self): + """ + Allocated amount should not be greater than the outstanding amount of the Payment Request. + """ + if not self.references: + return + + pr_outstanding_amounts = get_payment_request_outstanding_set_in_references(self.references) + + if not pr_outstanding_amounts: + return + + for ref in self.references: + if ref.payment_request and ref.allocated_amount > pr_outstanding_amounts[ref.payment_request]: + frappe.throw( + msg=_( + "Row #{0}: Allocated Amount cannot be greater than Outstanding Amount of Payment Request {1}" + ).format(ref.idx, get_link_to_form("Payment Request", ref.payment_request)), + title=_("Invalid Allocated Amount"), + ) + def term_based_allocation_enabled_for_reference( self, reference_doctype: str, reference_name: str ) -> bool: @@ -845,6 +893,7 @@ class PaymentEntry(AccountsController): self.set_amounts_in_company_currency() self.set_total_allocated_amount() self.set_unallocated_amount() + self.set_exchange_gain_loss() self.set_difference_amount() def validate_amounts(self): @@ -940,10 +989,10 @@ class PaymentEntry(AccountsController): if d.exchange_rate is None: d.exchange_rate = 1 - allocated_amount_in_pe_exchange_rate = flt( + allocated_amount_in_ref_exchange_rate = flt( flt(d.allocated_amount) * flt(d.exchange_rate), self.precision("base_paid_amount") ) - d.exchange_gain_loss = base_allocated_amount - allocated_amount_in_pe_exchange_rate + d.exchange_gain_loss = base_allocated_amount - allocated_amount_in_ref_exchange_rate return base_allocated_amount def set_total_allocated_amount(self): @@ -961,29 +1010,80 @@ class PaymentEntry(AccountsController): def set_unallocated_amount(self): self.unallocated_amount = 0 - if self.party: - total_deductions = sum(flt(d.amount) for d in self.get("deductions")) - included_taxes = self.get_included_taxes() - if ( - self.payment_type == "Receive" - and self.base_total_allocated_amount < self.base_received_amount + total_deductions - and self.total_allocated_amount - < flt(self.paid_amount) + (total_deductions / self.source_exchange_rate) - ): - self.unallocated_amount = ( - self.base_received_amount + total_deductions - self.base_total_allocated_amount - ) / self.source_exchange_rate - self.unallocated_amount -= included_taxes - elif ( - self.payment_type == "Pay" - and self.base_total_allocated_amount < (self.base_paid_amount - total_deductions) - and self.total_allocated_amount - < flt(self.received_amount) + (total_deductions / self.target_exchange_rate) - ): - self.unallocated_amount = ( - self.base_paid_amount - (total_deductions + self.base_total_allocated_amount) - ) / self.target_exchange_rate - self.unallocated_amount -= included_taxes + if not self.party: + return + + deductions_to_consider = sum( + flt(d.amount) for d in self.get("deductions") if not d.is_exchange_gain_loss + ) + included_taxes = self.get_included_taxes() + + if self.payment_type == "Receive" and self.base_total_allocated_amount < ( + self.base_paid_amount + deductions_to_consider + ): + self.unallocated_amount = ( + self.base_paid_amount + + deductions_to_consider + - self.base_total_allocated_amount + - included_taxes + ) / self.source_exchange_rate + elif self.payment_type == "Pay" and self.base_total_allocated_amount < ( + self.base_received_amount - deductions_to_consider + ): + self.unallocated_amount = ( + self.base_received_amount + - deductions_to_consider + - self.base_total_allocated_amount + - included_taxes + ) / self.target_exchange_rate + + def set_exchange_gain_loss(self): + exchange_gain_loss = flt( + self.base_paid_amount - self.base_received_amount, + self.precision("amount", "deductions"), + ) + + exchange_gain_loss_rows = [row for row in self.get("deductions") if row.is_exchange_gain_loss] + exchange_gain_loss_row = exchange_gain_loss_rows.pop(0) if exchange_gain_loss_rows else None + + for row in exchange_gain_loss_rows: + self.remove(row) + + if not exchange_gain_loss: + if exchange_gain_loss_row: + self.remove(exchange_gain_loss_row) + + return + + if not exchange_gain_loss_row: + values = frappe.get_cached_value( + "Company", self.company, ("exchange_gain_loss_account", "cost_center"), as_dict=True + ) + + for fieldname, value in values.items(): + if value: + continue + + label = _(frappe.get_meta("Company").get_label(fieldname)) + return frappe.msgprint( + _("Please set {0} in Company {1} to account for Exchange Gain / Loss").format( + label, get_link_to_form("Company", self.company) + ), + title=_("Missing Default in Company"), + indicator="red" if self.docstatus.is_submitted() else "yellow", + raise_exception=self.docstatus.is_submitted(), + ) + + exchange_gain_loss_row = self.append( + "deductions", + { + "account": values.exchange_gain_loss_account, + "cost_center": values.cost_center, + "is_exchange_gain_loss": 1, + }, + ) + + exchange_gain_loss_row.amount = exchange_gain_loss def set_difference_amount(self): base_unallocated_amount = flt(self.unallocated_amount) * ( @@ -1011,11 +1111,13 @@ class PaymentEntry(AccountsController): def get_included_taxes(self): included_taxes = 0 for tax in self.get("taxes"): - if tax.included_in_paid_amount: - if tax.add_deduct_tax == "Add": - included_taxes += tax.base_tax_amount - else: - included_taxes -= tax.base_tax_amount + if not tax.included_in_paid_amount: + continue + + if tax.add_deduct_tax == "Add": + included_taxes += tax.base_tax_amount + else: + included_taxes -= tax.base_tax_amount return included_taxes @@ -1098,6 +1200,12 @@ class PaymentEntry(AccountsController): if self.payment_type in ("Receive", "Pay") and not self.get("party_account_field"): self.setup_party_account_field() + company_currency = erpnext.get_company_currency(self.company) + if self.paid_from_account_currency != company_currency: + self.currency = self.paid_from_account_currency + elif self.paid_to_account_currency != company_currency: + self.currency = self.paid_to_account_currency + gl_entries = [] self.add_party_gl_entries(gl_entries) self.add_bank_gl_entries(gl_entries) @@ -1121,6 +1229,8 @@ class PaymentEntry(AccountsController): if not self.party_account: return + advance_payment_doctypes = frappe.get_hooks("advance_payment_doctypes") + if self.payment_type == "Receive": against_account = self.paid_to else: @@ -1163,14 +1273,41 @@ class PaymentEntry(AccountsController): dr_or_cr = "debit" if dr_or_cr == "credit" else "credit" gle.update( - { - dr_or_cr: allocated_amount_in_company_currency, - dr_or_cr + "_in_account_currency": d.allocated_amount, - "against_voucher_type": d.reference_doctype, - "against_voucher": d.reference_name, - "cost_center": cost_center, - } + self.get_gl_dict( + { + "account": self.party_account, + "party_type": self.party_type, + "party": self.party, + "against": against_account, + "account_currency": self.party_account_currency, + "cost_center": cost_center, + dr_or_cr + "_in_account_currency": d.allocated_amount, + dr_or_cr: allocated_amount_in_company_currency, + }, + item=self, + ) ) + + if self.book_advance_payments_in_separate_party_account: + if d.reference_doctype in advance_payment_doctypes: + # Upon reconciliation, whole ledger will be reposted. So, reference to SO/PO is fine + gle.update( + { + "against_voucher_type": d.reference_doctype, + "against_voucher": d.reference_name, + } + ) + else: + # Do not reference Invoices while Advance is in separate party account + gle.update({"against_voucher_type": self.doctype, "against_voucher": self.name}) + else: + gle.update( + { + "against_voucher_type": d.reference_doctype, + "against_voucher": d.reference_name, + } + ) + gl_entries.append(gle) if self.unallocated_amount: @@ -1179,13 +1316,22 @@ class PaymentEntry(AccountsController): base_unallocated_amount = self.unallocated_amount * exchange_rate gle = party_gl_dict.copy() - gle.update( - { - dr_or_cr + "_in_account_currency": self.unallocated_amount, - dr_or_cr: base_unallocated_amount, - } - ) + gle.update( + self.get_gl_dict( + { + "account": self.party_account, + "party_type": self.party_type, + "party": self.party, + "against": against_account, + "account_currency": self.party_account_currency, + "cost_center": self.cost_center, + dr_or_cr + "_in_account_currency": self.unallocated_amount, + dr_or_cr: base_unallocated_amount, + }, + item=self, + ) + ) if self.book_advance_payments_in_separate_party_account: gle.update( { @@ -1594,6 +1740,380 @@ class PaymentEntry(AccountsController): return current_tax_fraction + def set_matched_unset_payment_requests_to_response(self): + """ + Find matched Payment Requests for those references which have no Payment Request set.\n + And set to `frappe.response` to show in the frontend for allocation. + """ + if not self.references: + return + + matched_payment_requests = get_matched_payment_request_of_references( + [row for row in self.references if not row.payment_request] + ) + + if not matched_payment_requests: + return + + frappe.response["matched_payment_requests"] = matched_payment_requests + + @frappe.whitelist() + def allocate_amount_to_references(self, paid_amount, paid_amount_change, allocate_payment_amount): + """ + Allocate `Allocated Amount` and `Payment Request` against `Reference` based on `Paid Amount` and `Outstanding Amount`.\n + :param paid_amount: Paid Amount / Received Amount. + :param paid_amount_change: Flag to check if `Paid Amount` is changed or not. + :param allocate_payment_amount: Flag to allocate amount or not. (Payment Request is also dependent on this flag) + """ + if not self.references: + return + + if not allocate_payment_amount: + for ref in self.references: + ref.allocated_amount = 0 + return + + # calculating outstanding amounts + precision = self.precision("paid_amount") + total_positive_outstanding_including_order = 0 + total_negative_outstanding = 0 + paid_amount -= sum(flt(d.amount, precision) for d in self.deductions) + + for ref in self.references: + reference_outstanding_amount = ref.outstanding_amount + abs_outstanding_amount = abs(reference_outstanding_amount) + + if reference_outstanding_amount > 0: + total_positive_outstanding_including_order += abs_outstanding_amount + else: + total_negative_outstanding += abs_outstanding_amount + + # calculating allocated outstanding amounts + allocated_negative_outstanding = 0 + allocated_positive_outstanding = 0 + + # checking party type and payment type + if (self.payment_type == "Receive" and self.party_type == "Customer") or ( + self.payment_type == "Pay" and self.party_type in ("Supplier", "Employee") + ): + if total_positive_outstanding_including_order > paid_amount: + remaining_outstanding = flt( + total_positive_outstanding_including_order - paid_amount, precision + ) + allocated_negative_outstanding = min(remaining_outstanding, total_negative_outstanding) + + allocated_positive_outstanding = paid_amount + allocated_negative_outstanding + + elif self.party_type in ("Supplier", "Employee"): + if paid_amount > total_negative_outstanding: + if total_negative_outstanding == 0: + frappe.msgprint( + _("Cannot {0} from {1} without any negative outstanding invoice").format( + self.payment_type, + self.party_type, + ) + ) + else: + frappe.msgprint( + _("Paid Amount cannot be greater than total negative outstanding amount {0}").format( + total_negative_outstanding + ) + ) + + return + + else: + allocated_positive_outstanding = flt(total_negative_outstanding - paid_amount, precision) + allocated_negative_outstanding = paid_amount + min( + total_positive_outstanding_including_order, allocated_positive_outstanding + ) + + # inner function to set `allocated_amount` to those row which have no PR + def _allocation_to_unset_pr_row( + row, outstanding_amount, allocated_positive_outstanding, allocated_negative_outstanding + ): + if outstanding_amount > 0 and allocated_positive_outstanding >= 0: + row.allocated_amount = min(allocated_positive_outstanding, outstanding_amount) + allocated_positive_outstanding = flt( + allocated_positive_outstanding - row.allocated_amount, precision + ) + elif outstanding_amount < 0 and allocated_negative_outstanding: + row.allocated_amount = min(allocated_negative_outstanding, abs(outstanding_amount)) * -1 + allocated_negative_outstanding = flt( + allocated_negative_outstanding - abs(row.allocated_amount), precision + ) + return allocated_positive_outstanding, allocated_negative_outstanding + + # allocate amount based on `paid_amount` is changed or not + if not paid_amount_change: + for ref in self.references: + allocated_positive_outstanding, allocated_negative_outstanding = _allocation_to_unset_pr_row( + ref, + ref.outstanding_amount, + allocated_positive_outstanding, + allocated_negative_outstanding, + ) + + allocate_open_payment_requests_to_references(self.references, self.precision("paid_amount")) + + else: + payment_request_outstanding_amounts = ( + get_payment_request_outstanding_set_in_references(self.references) or {} + ) + references_outstanding_amounts = get_references_outstanding_amount(self.references) or {} + remaining_references_allocated_amounts = references_outstanding_amounts.copy() + + # Re allocate amount to those references which have PR set (Higher priority) + for ref in self.references: + if not ref.payment_request: + continue + + # fetch outstanding_amount of `Reference` (Payment Term) and `Payment Request` to allocate new amount + key = (ref.reference_doctype, ref.reference_name, ref.get("payment_term")) + reference_outstanding_amount = references_outstanding_amounts[key] + pr_outstanding_amount = payment_request_outstanding_amounts[ref.payment_request] + + if reference_outstanding_amount > 0 and allocated_positive_outstanding >= 0: + # allocate amount according to outstanding amounts + outstanding_amounts = ( + allocated_positive_outstanding, + reference_outstanding_amount, + pr_outstanding_amount, + ) + + ref.allocated_amount = min(outstanding_amounts) + + # update amounts to track allocation + allocated_amount = ref.allocated_amount + allocated_positive_outstanding = flt( + allocated_positive_outstanding - allocated_amount, precision + ) + remaining_references_allocated_amounts[key] = flt( + remaining_references_allocated_amounts[key] - allocated_amount, precision + ) + payment_request_outstanding_amounts[ref.payment_request] = flt( + payment_request_outstanding_amounts[ref.payment_request] - allocated_amount, precision + ) + + elif reference_outstanding_amount < 0 and allocated_negative_outstanding: + # allocate amount according to outstanding amounts + outstanding_amounts = ( + allocated_negative_outstanding, + abs(reference_outstanding_amount), + pr_outstanding_amount, + ) + + ref.allocated_amount = min(outstanding_amounts) * -1 + + # update amounts to track allocation + allocated_amount = abs(ref.allocated_amount) + allocated_negative_outstanding = flt( + allocated_negative_outstanding - allocated_amount, precision + ) + remaining_references_allocated_amounts[key] += allocated_amount # negative amount + payment_request_outstanding_amounts[ref.payment_request] = flt( + payment_request_outstanding_amounts[ref.payment_request] - allocated_amount, precision + ) + # Re allocate amount to those references which have no PR (Lower priority) + for ref in self.references: + if ref.payment_request: + continue + + key = (ref.reference_doctype, ref.reference_name, ref.get("payment_term")) + reference_outstanding_amount = remaining_references_allocated_amounts[key] + + allocated_positive_outstanding, allocated_negative_outstanding = _allocation_to_unset_pr_row( + ref, + reference_outstanding_amount, + allocated_positive_outstanding, + allocated_negative_outstanding, + ) + + @frappe.whitelist() + def set_matched_payment_requests(self, matched_payment_requests): + """ + Set `Payment Request` against `Reference` based on `matched_payment_requests`.\n + :param matched_payment_requests: List of tuple of matched Payment Requests. + + --- + Example: [(reference_doctype, reference_name, allocated_amount, payment_request), ...] + """ + if not self.references or not matched_payment_requests: + return + + if isinstance(matched_payment_requests, str): + matched_payment_requests = json.loads(matched_payment_requests) + + # modify matched_payment_requests + # like (reference_doctype, reference_name, allocated_amount): payment_request + payment_requests = {} + + for row in matched_payment_requests: + key = tuple(row[:3]) + payment_requests[key] = row[3] + + for ref in self.references: + if ref.payment_request: + continue + + key = (ref.reference_doctype, ref.reference_name, ref.allocated_amount) + + if key in payment_requests: + ref.payment_request = payment_requests[key] + del payment_requests[key] # to avoid duplicate allocation + + +def get_matched_payment_request_of_references(references=None): + """ + Get those `Payment Requests` which are matched with `References`.\n + - Amount must be same. + - Only single `Payment Request` available for this amount. + + Example: [(reference_doctype, reference_name, allocated_amount, payment_request), ...] + """ + if not references: + return + + # to fetch matched rows + refs = { + (row.reference_doctype, row.reference_name, row.allocated_amount) + for row in references + if row.reference_doctype and row.reference_name and row.allocated_amount + } + + if not refs: + return + + PR = frappe.qb.DocType("Payment Request") + + # query to group by reference_doctype, reference_name, outstanding_amount + subquery = ( + frappe.qb.from_(PR) + .select( + PR.reference_doctype, + PR.reference_name, + PR.outstanding_amount.as_("allocated_amount"), + PR.name.as_("payment_request"), + Count("*").as_("count"), + ) + .where(Tuple(PR.reference_doctype, PR.reference_name, PR.outstanding_amount).isin(refs)) + .where(PR.status != "Paid") + .where(PR.docstatus == 1) + .groupby(PR.reference_doctype, PR.reference_name, PR.outstanding_amount) + ) + + # query to fetch matched rows which are single + matched_prs = ( + frappe.qb.from_(subquery) + .select( + subquery.reference_doctype, + subquery.reference_name, + subquery.allocated_amount, + subquery.payment_request, + ) + .where(subquery.count == 1) + .run() + ) + + return matched_prs if matched_prs else None + + +def get_references_outstanding_amount(references=None): + """ + Fetch accurate outstanding amount of `References`.\n + - If `Payment Term` is set, then fetch outstanding amount from `Payment Schedule`. + - If `Payment Term` is not set, then fetch outstanding amount from `References` it self. + + Example: {(reference_doctype, reference_name, payment_term): outstanding_amount, ...} + """ + if not references: + return + + refs_with_payment_term = get_outstanding_of_references_with_payment_term(references) or {} + refs_without_payment_term = get_outstanding_of_references_with_no_payment_term(references) or {} + + return {**refs_with_payment_term, **refs_without_payment_term} + + +def get_outstanding_of_references_with_payment_term(references=None): + """ + Fetch outstanding amount of `References` which have `Payment Term` set.\n + Example: {(reference_doctype, reference_name, payment_term): outstanding_amount, ...} + """ + if not references: + return + + refs = { + (row.reference_doctype, row.reference_name, row.payment_term) + for row in references + if row.reference_doctype and row.reference_name and row.payment_term + } + + if not refs: + return + + PS = frappe.qb.DocType("Payment Schedule") + + response = ( + frappe.qb.from_(PS) + .select(PS.parenttype, PS.parent, PS.payment_term, PS.outstanding) + .where(Tuple(PS.parenttype, PS.parent, PS.payment_term).isin(refs)) + ).run(as_dict=True) + + if not response: + return + + return {(row.parenttype, row.parent, row.payment_term): row.outstanding for row in response} + + +def get_outstanding_of_references_with_no_payment_term(references): + """ + Fetch outstanding amount of `References` which have no `Payment Term` set.\n + - Fetch outstanding amount from `References` it self. + + Note: `None` is used for allocation of `Payment Request` + Example: {(reference_doctype, reference_name, None): outstanding_amount, ...} + """ + if not references: + return + + outstanding_amounts = {} + + for ref in references: + if ref.payment_term: + continue + + key = (ref.reference_doctype, ref.reference_name, None) + + if key not in outstanding_amounts: + outstanding_amounts[key] = ref.outstanding_amount + + return outstanding_amounts + + +def get_payment_request_outstanding_set_in_references(references=None): + """ + Fetch outstanding amount of `Payment Request` which are set in `References`.\n + Example: {payment_request: outstanding_amount, ...} + """ + if not references: + return + + referenced_payment_requests = {row.payment_request for row in references if row.payment_request} + + if not referenced_payment_requests: + return + + PR = frappe.qb.DocType("Payment Request") + + response = ( + frappe.qb.from_(PR) + .select(PR.name, PR.outstanding_amount) + .where(PR.name.isin(referenced_payment_requests)) + ).run() + + return dict(response) if response else None + def validate_inclusive_tax(tax, doc): def _on_previous_row_error(row_range): @@ -1740,7 +2260,7 @@ def get_outstanding_reference_documents(args, validate=False): d["bill_no"] = frappe.db.get_value(d.voucher_type, d.voucher_no, "bill_no") # Get negative outstanding sales /purchase invoices - if args.get("party_type") != "Employee" and not args.get("voucher_no"): + if args.get("party_type") != "Employee": negative_outstanding_invoices = get_negative_outstanding_invoices( args.get("party_type"), args.get("party"), @@ -2046,7 +2566,9 @@ def get_party_details(company, party_type, party, date, cost_center=None): account_balance = get_balance_on(party_account, date, cost_center=cost_center) _party_name = "title" if party_type == "Shareholder" else party_type.lower() + "_name" party_name = frappe.db.get_value(party_type, party, _party_name) - party_balance = get_balance_on(party_type=party_type, party=party, cost_center=cost_center) + party_balance = get_balance_on( + party_type=party_type, party=party, company=company, cost_center=cost_center + ) if party_type in ["Customer", "Supplier"]: party_bank_account = get_party_bank_account(party_type, party) bank_account = get_default_company_bank_account(company, party_type, party) @@ -2224,6 +2746,8 @@ def get_payment_entry( party_type=None, payment_type=None, reference_date=None, + ignore_permissions=False, + created_from_payment_request=False, ): doc = frappe.get_doc(dt, dn) over_billing_allowance = frappe.db.get_single_value("Accounts Settings", "over_billing_allowance") @@ -2359,9 +2883,6 @@ def get_payment_entry( update_accounting_dimensions(pe, doc) if party_account and bank: - pe.set_exchange_rate(ref_doc=doc) - pe.set_amounts() - if discount_amount: base_total_discount_loss = 0 if frappe.db.get_single_value("Accounts Settings", "book_tax_discount_loss"): @@ -2371,11 +2892,183 @@ def get_payment_entry( pe, doc, discount_amount, base_total_discount_loss, party_account_currency ) - pe.set_difference_amount() + pe.set_exchange_rate(ref_doc=doc) + pe.set_amounts() + + # If PE is created from PR directly, then no need to find open PRs for the references + if not created_from_payment_request: + allocate_open_payment_requests_to_references(pe.references, pe.precision("paid_amount")) return pe +def get_open_payment_requests_for_references(references=None): + """ + Fetch all unpaid Payment Requests for the references. \n + - Each reference can have multiple Payment Requests. \n + + Example: {("Sales Invoice", "SINV-00001"): {"PREQ-00001": 1000, "PREQ-00002": 2000}} + """ + if not references: + return + + refs = { + (row.reference_doctype, row.reference_name) + for row in references + if row.reference_doctype and row.reference_name and row.allocated_amount + } + + if not refs: + return + + PR = frappe.qb.DocType("Payment Request") + + response = ( + frappe.qb.from_(PR) + .select(PR.name, PR.reference_doctype, PR.reference_name, PR.outstanding_amount) + .where(Tuple(PR.reference_doctype, PR.reference_name).isin(list(refs))) + .where(PR.status != "Paid") + .where(PR.docstatus == 1) + .where(PR.outstanding_amount > 0) # to avoid old PRs with 0 outstanding amount + .orderby(Coalesce(PR.transaction_date, PR.creation), order=frappe.qb.asc) + ).run(as_dict=True) + + if not response: + return + + reference_payment_requests = {} + + for row in response: + key = (row.reference_doctype, row.reference_name) + + if key not in reference_payment_requests: + reference_payment_requests[key] = {row.name: row.outstanding_amount} + else: + reference_payment_requests[key][row.name] = row.outstanding_amount + + return reference_payment_requests + + +def allocate_open_payment_requests_to_references(references=None, precision=None): + """ + Allocate unpaid Payment Requests to the references. \n + --- + - Allocation based on below factors + - Reference Allocated Amount + - Reference Outstanding Amount (With Payment Terms or without Payment Terms) + - Reference Payment Request's outstanding amount + --- + - Allocation based on below scenarios + - Reference's Allocated Amount == Payment Request's Outstanding Amount + - Allocate the Payment Request to the reference + - This PR will not be allocated further + - Reference's Allocated Amount < Payment Request's Outstanding Amount + - Allocate the Payment Request to the reference + - Reduce the PR's outstanding amount by the allocated amount + - This PR can be allocated further + - Reference's Allocated Amount > Payment Request's Outstanding Amount + - Allocate the Payment Request to the reference + - Reduce Allocated Amount of the reference by the PR's outstanding amount + - Create a new row for the remaining amount until the Allocated Amount is 0 + - Allocate PR if available + --- + - Note: + - Priority is given to the first Payment Request of respective references. + - Single Reference can have multiple rows. + - With Payment Terms or without Payment Terms + - With Payment Request or without Payment Request + """ + if not references: + return + + # get all unpaid payment requests for the references + references_open_payment_requests = get_open_payment_requests_for_references(references) + + if not references_open_payment_requests: + return + + if not precision: + precision = references[0].precision("allocated_amount") + + # to manage new rows + row_number = 1 + MOVE_TO_NEXT_ROW = 1 + TO_SKIP_NEW_ROW = 2 + + while row_number <= len(references): + row = references[row_number - 1] + reference_key = (row.reference_doctype, row.reference_name) + + # update the idx to maintain the order + row.idx = row_number + + # unpaid payment requests for the reference + reference_payment_requests = references_open_payment_requests.get(reference_key) + + if not reference_payment_requests: + row_number += MOVE_TO_NEXT_ROW # to move to next reference row + continue + + # get the first payment request and its outstanding amount + payment_request, pr_outstanding_amount = next(iter(reference_payment_requests.items())) + allocated_amount = row.allocated_amount + + # allocate the payment request to the reference and PR's outstanding amount + row.payment_request = payment_request + + if pr_outstanding_amount == allocated_amount: + del reference_payment_requests[payment_request] + row_number += MOVE_TO_NEXT_ROW + + elif pr_outstanding_amount > allocated_amount: + # reduce the outstanding amount of the payment request + reference_payment_requests[payment_request] -= allocated_amount + row_number += MOVE_TO_NEXT_ROW + + else: + # split the reference row to allocate the remaining amount + del reference_payment_requests[payment_request] + row.allocated_amount = pr_outstanding_amount + allocated_amount = flt(allocated_amount - pr_outstanding_amount, precision) + + # set the remaining amount to the next row + while allocated_amount: + # create a new row for the remaining amount + new_row = frappe.copy_doc(row) + references.insert(row_number, new_row) + + # get the first payment request and its outstanding amount + payment_request, pr_outstanding_amount = next( + iter(reference_payment_requests.items()), (None, None) + ) + + # update new row + new_row.idx = row_number + 1 + new_row.payment_request = payment_request + new_row.allocated_amount = min( + pr_outstanding_amount if pr_outstanding_amount else allocated_amount, allocated_amount + ) + + if not payment_request or not pr_outstanding_amount: + row_number += TO_SKIP_NEW_ROW + break + + elif pr_outstanding_amount == allocated_amount: + del reference_payment_requests[payment_request] + row_number += TO_SKIP_NEW_ROW + break + + elif pr_outstanding_amount > allocated_amount: + reference_payment_requests[payment_request] -= allocated_amount + row_number += TO_SKIP_NEW_ROW + break + + else: + allocated_amount = flt(allocated_amount - pr_outstanding_amount, precision) + del reference_payment_requests[payment_request] + row_number += MOVE_TO_NEXT_ROW + + def update_accounting_dimensions(pe, doc): """ Updates accounting dimensions in Payment Entry based on the accounting dimensions in the reference document @@ -2547,13 +3240,14 @@ def set_pending_discount_loss(pe, doc, discount_amount, base_total_discount_loss book_tax_loss = frappe.db.get_single_value("Accounts Settings", "book_tax_discount_loss") account_type = "round_off_account" if book_tax_loss else "default_discount_account" - pe.set_gain_or_loss( - account_details={ + pe.append( + "deductions", + { "account": frappe.get_cached_value("Company", pe.company, account_type), "cost_center": pe.cost_center or frappe.get_cached_value("Company", pe.company, "cost_center"), "amount": discount_amount * positive_negative, - } + }, ) diff --git a/erpnext/accounts/doctype/payment_entry/test_payment_entry.py b/erpnext/accounts/doctype/payment_entry/test_payment_entry.py index cc03dc260bb..312628d9f97 100644 --- a/erpnext/accounts/doctype/payment_entry/test_payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/test_payment_entry.py @@ -479,16 +479,9 @@ class TestPaymentEntry(FrappeTestCase): self.assertEqual(pe.deductions[0].account, "Write Off - _TC") # Exchange loss - self.assertEqual(pe.difference_amount, 300.0) - - pe.append( - "deductions", - { - "account": "_Test Exchange Gain/Loss - _TC", - "cost_center": "_Test Cost Center - _TC", - "amount": 300.0, - }, - ) + self.assertEqual(pe.deductions[-1].amount, 300.0) + pe.deductions[-1].account = "_Test Exchange Gain/Loss - _TC" + pe.deductions[-1].cost_center = "_Test Cost Center - _TC" pe.insert() pe.submit() @@ -552,16 +545,10 @@ class TestPaymentEntry(FrappeTestCase): pe.reference_no = "1" pe.reference_date = "2016-01-01" - self.assertEqual(pe.difference_amount, 100) + self.assertEqual(pe.deductions[0].amount, 100) + pe.deductions[0].account = "_Test Exchange Gain/Loss - _TC" + pe.deductions[0].cost_center = "_Test Cost Center - _TC" - pe.append( - "deductions", - { - "account": "_Test Exchange Gain/Loss - _TC", - "cost_center": "_Test Cost Center - _TC", - "amount": 100, - }, - ) pe.insert() pe.submit() @@ -654,16 +641,9 @@ class TestPaymentEntry(FrappeTestCase): pe.set_exchange_rate() pe.set_amounts() - self.assertEqual(pe.difference_amount, 500) - - pe.append( - "deductions", - { - "account": "_Test Exchange Gain/Loss - _TC", - "cost_center": "_Test Cost Center - _TC", - "amount": 500, - }, - ) + self.assertEqual(pe.deductions[0].amount, 500) + pe.deductions[0].account = "_Test Exchange Gain/Loss - _TC" + pe.deductions[0].cost_center = "_Test Cost Center - _TC" pe.insert() pe.submit() @@ -956,6 +936,53 @@ class TestPaymentEntry(FrappeTestCase): self.assertEqual(flt(expected_party_balance), party_balance) self.assertEqual(flt(expected_party_account_balance, 2), flt(party_account_balance, 2)) + def test_gl_of_multi_currency_payment_transaction(self): + from erpnext.setup.doctype.currency_exchange.test_currency_exchange import ( + save_new_records, + test_records, + ) + + save_new_records(test_records) + paid_from = create_account( + parent_account="Current Liabilities - _TC", + account_name="_Test Cash USD", + company="_Test Company", + account_type="Cash", + account_currency="USD", + ) + payment_entry = create_payment_entry( + party="_Test Supplier USD", + paid_from=paid_from, + paid_to="_Test Payable USD - _TC", + paid_amount=100, + save=True, + ) + payment_entry.source_exchange_rate = 84.4 + payment_entry.target_exchange_rate = 84.4 + payment_entry.save() + payment_entry = payment_entry.submit() + gle = qb.DocType("GL Entry") + gl_entries = ( + qb.from_(gle) + .select( + gle.account, + gle.debit, + gle.credit, + gle.debit_in_account_currency, + gle.credit_in_account_currency, + gle.debit_in_transaction_currency, + gle.credit_in_transaction_currency, + ) + .orderby(gle.account) + .where(gle.voucher_no == payment_entry.name) + .run() + ) + expected_gl_entries = ( + (paid_from, 0.0, 8440.0, 0.0, 100.0, 0.0, 100.0), + ("_Test Payable USD - _TC", 8440.0, 0.0, 100.0, 0.0, 100.0, 0.0), + ) + self.assertEqual(gl_entries, expected_gl_entries) + def test_multi_currency_payment_entry_with_taxes(self): payment_entry = create_payment_entry( party="_Test Supplier USD", paid_to="_Test Payable USD - _TC", save=True @@ -1791,6 +1818,79 @@ class TestPaymentEntry(FrappeTestCase): # 'Is Opening' should always be 'No' for normal advance payments self.assertEqual(gl_with_opening_set, []) + @change_settings("Accounts Settings", {"delete_linked_ledger_entries": 1}) + def test_delete_linked_exchange_gain_loss_journal(self): + from erpnext.accounts.doctype.account.test_account import create_account + from erpnext.accounts.doctype.opening_invoice_creation_tool.test_opening_invoice_creation_tool import ( + make_customer, + ) + + debtors = create_account( + account_name="Debtors USD", + parent_account="Accounts Receivable - _TC", + company="_Test Company", + account_currency="USD", + account_type="Receivable", + ) + + # create a customer + customer = make_customer(customer="_Test Party USD") + cust_doc = frappe.get_doc("Customer", customer) + cust_doc.default_currency = "USD" + test_account_details = { + "company": "_Test Company", + "account": debtors, + } + cust_doc.append("accounts", test_account_details) + cust_doc.save() + + # create a sales invoice + si = create_sales_invoice( + customer=customer, + currency="USD", + conversion_rate=83.970000000, + debit_to=debtors, + do_not_save=1, + ) + si.party_account_currency = "USD" + si.save() + si.submit() + + # create a payment entry for the invoice + pe = get_payment_entry("Sales Invoice", si.name) + pe.reference_no = "1" + pe.reference_date = frappe.utils.nowdate() + pe.paid_amount = 100 + pe.source_exchange_rate = 90 + pe.append( + "deductions", + { + "account": "_Test Exchange Gain/Loss - _TC", + "cost_center": "_Test Cost Center - _TC", + "amount": 2710, + }, + ) + pe.save() + pe.submit() + + # check creation of journal entry + jv = frappe.get_all( + "Journal Entry Account", + {"reference_type": pe.doctype, "reference_name": pe.name, "docstatus": 1}, + pluck="parent", + ) + self.assertTrue(jv) + + # check cancellation of payment entry and journal entry + pe.cancel() + self.assertTrue(pe.docstatus == 2) + self.assertTrue(frappe.db.get_value("Journal Entry", {"name": jv[0]}, "docstatus") == 2) + + # check deletion of payment entry and journal entry + pe.delete() + self.assertRaises(frappe.DoesNotExistError, frappe.get_doc, pe.doctype, pe.name) + self.assertRaises(frappe.DoesNotExistError, frappe.get_doc, "Journal Entry", jv[0]) + def create_payment_entry(**args): payment_entry = frappe.new_doc("Payment Entry") diff --git a/erpnext/accounts/doctype/payment_entry_deduction/payment_entry_deduction.json b/erpnext/accounts/doctype/payment_entry_deduction/payment_entry_deduction.json index 1c31829f0ea..e47b51ae028 100644 --- a/erpnext/accounts/doctype/payment_entry_deduction/payment_entry_deduction.json +++ b/erpnext/accounts/doctype/payment_entry_deduction/payment_entry_deduction.json @@ -9,6 +9,7 @@ "cost_center", "amount", "column_break_2", + "is_exchange_gain_loss", "description" ], "fields": [ @@ -45,12 +46,20 @@ "fieldname": "description", "fieldtype": "Small Text", "label": "Description" + }, + { + "default": "0", + "depends_on": "eval:doc.is_exchange_gain_loss", + "fieldname": "is_exchange_gain_loss", + "fieldtype": "Check", + "label": "Is Exchange Gain / Loss?", + "read_only": 1 } ], "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2023-03-06 07:11:57.739619", + "modified": "2024-11-05 16:07:47.307971", "modified_by": "Administrator", "module": "Accounts", "name": "Payment Entry Deduction", diff --git a/erpnext/accounts/doctype/payment_entry_deduction/payment_entry_deduction.py b/erpnext/accounts/doctype/payment_entry_deduction/payment_entry_deduction.py index fc67c526b28..ae4134fc27a 100644 --- a/erpnext/accounts/doctype/payment_entry_deduction/payment_entry_deduction.py +++ b/erpnext/accounts/doctype/payment_entry_deduction/payment_entry_deduction.py @@ -18,6 +18,7 @@ class PaymentEntryDeduction(Document): amount: DF.Currency cost_center: DF.Link description: DF.SmallText | None + is_exchange_gain_loss: DF.Check parent: DF.Data parentfield: DF.Data parenttype: DF.Data diff --git a/erpnext/accounts/doctype/payment_entry_reference/payment_entry_reference.json b/erpnext/accounts/doctype/payment_entry_reference/payment_entry_reference.json index 23ed8252333..361f516b830 100644 --- a/erpnext/accounts/doctype/payment_entry_reference/payment_entry_reference.json +++ b/erpnext/accounts/doctype/payment_entry_reference/payment_entry_reference.json @@ -10,6 +10,7 @@ "due_date", "bill_no", "payment_term", + "payment_term_outstanding", "account_type", "payment_type", "column_break_4", @@ -18,7 +19,9 @@ "allocated_amount", "exchange_rate", "exchange_gain_loss", - "account" + "account", + "payment_request", + "payment_request_outstanding" ], "fields": [ { @@ -120,12 +123,33 @@ "fieldname": "payment_type", "fieldtype": "Data", "label": "Payment Type" + }, + { + "fieldname": "payment_request", + "fieldtype": "Link", + "label": "Payment Request", + "options": "Payment Request" + }, + { + "depends_on": "eval: doc.payment_term", + "fieldname": "payment_term_outstanding", + "fieldtype": "Float", + "label": "Payment Term Outstanding", + "read_only": 1 + }, + { + "depends_on": "eval: doc.payment_request && doc.payment_request_outstanding", + "fieldname": "payment_request_outstanding", + "fieldtype": "Float", + "is_virtual": 1, + "label": "Payment Request Outstanding", + "read_only": 1 } ], "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2024-04-05 09:44:08.310593", + "modified": "2024-09-16 18:11:50.019343", "modified_by": "Administrator", "module": "Accounts", "name": "Payment Entry Reference", diff --git a/erpnext/accounts/doctype/payment_entry_reference/payment_entry_reference.py b/erpnext/accounts/doctype/payment_entry_reference/payment_entry_reference.py index 4a027b4ee32..2ac92ba4a84 100644 --- a/erpnext/accounts/doctype/payment_entry_reference/payment_entry_reference.py +++ b/erpnext/accounts/doctype/payment_entry_reference/payment_entry_reference.py @@ -1,7 +1,7 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt - +import frappe from frappe.model.document import Document @@ -25,11 +25,19 @@ class PaymentEntryReference(Document): parent: DF.Data parentfield: DF.Data parenttype: DF.Data + payment_request: DF.Link | None + payment_request_outstanding: DF.Float payment_term: DF.Link | None + payment_term_outstanding: DF.Float payment_type: DF.Data | None reference_doctype: DF.Link reference_name: DF.DynamicLink total_amount: DF.Float # end: auto-generated types - pass + @property + def payment_request_outstanding(self): + if not self.payment_request: + return + + return frappe.db.get_value("Payment Request", self.payment_request, "outstanding_amount") diff --git a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py index 8481fd8ffa4..db4a4b0f268 100644 --- a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py +++ b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py @@ -153,10 +153,7 @@ class PaymentReconciliation(Document): self.add_payment_entries(non_reconciled_payments) def get_payment_entries(self): - if self.default_advance_account: - party_account = [self.receivable_payable_account, self.default_advance_account] - else: - party_account = [self.receivable_payable_account] + party_account = [self.receivable_payable_account] order_doctype = "Sales Order" if self.party_type == "Customer" else "Purchase Order" condition = frappe._dict( @@ -187,6 +184,7 @@ class PaymentReconciliation(Document): self.party, party_account, order_doctype, + default_advance_account=self.default_advance_account, against_all_orders=True, limit=self.payment_limit, condition=condition, @@ -211,12 +209,14 @@ class PaymentReconciliation(Document): if self.get("cost_center"): conditions.append(jea.cost_center == self.cost_center) - dr_or_cr = ( - "credit_in_account_currency" - if erpnext.get_party_account_type(self.party_type) == "Receivable" - else "debit_in_account_currency" - ) - conditions.append(jea[dr_or_cr].gt(0)) + account_type = erpnext.get_party_account_type(self.party_type) + + if account_type == "Receivable": + dr_or_cr = jea.credit_in_account_currency - jea.debit_in_account_currency + elif account_type == "Payable": + dr_or_cr = jea.debit_in_account_currency - jea.credit_in_account_currency + + conditions.append(dr_or_cr.gt(0)) if self.bank_cash_account: conditions.append(jea.against_account.like(f"%%{self.bank_cash_account}%%")) @@ -231,7 +231,7 @@ class PaymentReconciliation(Document): je.posting_date, je.remark.as_("remarks"), jea.name.as_("reference_row"), - jea[dr_or_cr].as_("amount"), + dr_or_cr.as_("amount"), jea.is_advance, jea.exchange_rate, jea.account_currency.as_("currency"), @@ -323,6 +323,7 @@ class PaymentReconciliation(Document): "posting_date": inv.posting_date, "currency": inv.currency, "cost_center": inv.cost_center, + "remarks": inv.remarks, } ) ) @@ -370,6 +371,10 @@ class PaymentReconciliation(Document): if self.invoice_limit: non_reconciled_invoices = non_reconciled_invoices[: self.invoice_limit] + non_reconciled_invoices = sorted( + non_reconciled_invoices, key=lambda k: k["posting_date"] or getdate(nowdate()) + ) + self.add_invoice_entries(non_reconciled_invoices) def add_invoice_entries(self, non_reconciled_invoices): diff --git a/erpnext/accounts/doctype/payment_reconciliation/test_payment_reconciliation.py b/erpnext/accounts/doctype/payment_reconciliation/test_payment_reconciliation.py index 5aa411158a8..3f0fb29d671 100644 --- a/erpnext/accounts/doctype/payment_reconciliation/test_payment_reconciliation.py +++ b/erpnext/accounts/doctype/payment_reconciliation/test_payment_reconciliation.py @@ -5,7 +5,7 @@ import frappe from frappe import qb from frappe.tests.utils import FrappeTestCase, change_settings -from frappe.utils import add_days, flt, nowdate +from frappe.utils import add_days, add_years, flt, getdate, nowdate, today from erpnext import get_default_cost_center from erpnext.accounts.doctype.payment_entry.payment_entry import get_payment_entry @@ -13,6 +13,7 @@ from erpnext.accounts.doctype.payment_entry.test_payment_entry import create_pay from erpnext.accounts.doctype.purchase_invoice.test_purchase_invoice import make_purchase_invoice from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice from erpnext.accounts.party import get_party_account +from erpnext.accounts.utils import get_fiscal_year from erpnext.buying.doctype.purchase_order.test_purchase_order import create_purchase_order from erpnext.stock.doctype.item.test_item import create_item @@ -631,6 +632,42 @@ class TestPaymentReconciliation(FrappeTestCase): self.assertEqual(len(pr.get("invoices")), 0) self.assertEqual(len(pr.get("payments")), 0) + def test_negative_debit_or_credit_journal_against_invoice(self): + transaction_date = nowdate() + amount = 100 + si = self.create_sales_invoice(qty=1, rate=amount, posting_date=transaction_date) + + # credit debtors account to record a payment + je = self.create_journal_entry(self.bank, self.debit_to, amount, transaction_date) + je.accounts[1].party_type = "Customer" + je.accounts[1].party = self.customer + je.accounts[1].credit_in_account_currency = 0 + je.accounts[1].debit_in_account_currency = -1 * amount + je.save() + je.submit() + + pr = self.create_payment_reconciliation() + + pr.get_unreconciled_entries() + invoices = [x.as_dict() for x in pr.get("invoices")] + payments = [x.as_dict() for x in pr.get("payments")] + pr.allocate_entries(frappe._dict({"invoices": invoices, "payments": payments})) + + # Difference amount should not be calculated for base currency accounts + for row in pr.allocation: + self.assertEqual(flt(row.get("difference_amount")), 0.0) + + pr.reconcile() + + # assert outstanding + si.reload() + self.assertEqual(si.status, "Paid") + self.assertEqual(si.outstanding_amount, 0) + + # check PR tool output + self.assertEqual(len(pr.get("invoices")), 0) + self.assertEqual(len(pr.get("payments")), 0) + def test_journal_against_journal(self): transaction_date = nowdate() sales = "Sales - _PR" @@ -953,6 +990,100 @@ class TestPaymentReconciliation(FrappeTestCase): frappe.db.get_value("Journal Entry", jea_parent.parent, "voucher_type"), "Exchange Gain Or Loss" ) + def test_difference_amount_via_negative_debit_or_credit_journal_entry(self): + # Make Sale Invoice + si = self.create_sales_invoice( + qty=1, rate=100, posting_date=nowdate(), do_not_save=True, do_not_submit=True + ) + si.customer = self.customer4 + si.currency = "EUR" + si.conversion_rate = 85 + si.debit_to = self.debtors_eur + si.save().submit() + + # Make payment using Journal Entry + je1 = self.create_journal_entry("HDFC - _PR", self.debtors_eur, 100, nowdate()) + je1.multi_currency = 1 + je1.accounts[0].exchange_rate = 1 + je1.accounts[0].credit_in_account_currency = -8000 + je1.accounts[0].credit = -8000 + je1.accounts[0].debit_in_account_currency = 0 + je1.accounts[0].debit = 0 + je1.accounts[1].party_type = "Customer" + je1.accounts[1].party = self.customer4 + je1.accounts[1].exchange_rate = 80 + je1.accounts[1].credit_in_account_currency = 100 + je1.accounts[1].credit = 8000 + je1.accounts[1].debit_in_account_currency = 0 + je1.accounts[1].debit = 0 + je1.save() + je1.submit() + + je2 = self.create_journal_entry("HDFC - _PR", self.debtors_eur, 200, nowdate()) + je2.multi_currency = 1 + je2.accounts[0].exchange_rate = 1 + je2.accounts[0].credit_in_account_currency = -16000 + je2.accounts[0].credit = -16000 + je2.accounts[0].debit_in_account_currency = 0 + je2.accounts[0].debit = 0 + je2.accounts[1].party_type = "Customer" + je2.accounts[1].party = self.customer4 + je2.accounts[1].exchange_rate = 80 + je2.accounts[1].credit_in_account_currency = 200 + je1.accounts[1].credit = 16000 + je1.accounts[1].debit_in_account_currency = 0 + je1.accounts[1].debit = 0 + je2.save() + je2.submit() + + pr = self.create_payment_reconciliation() + pr.party = self.customer4 + pr.receivable_payable_account = self.debtors_eur + pr.get_unreconciled_entries() + + self.assertEqual(len(pr.invoices), 1) + self.assertEqual(len(pr.payments), 2) + + # Test exact payment allocation + invoices = [x.as_dict() for x in pr.invoices] + payments = [pr.payments[0].as_dict()] + pr.allocate_entries(frappe._dict({"invoices": invoices, "payments": payments})) + + self.assertEqual(pr.allocation[0].allocated_amount, 100) + self.assertEqual(pr.allocation[0].difference_amount, -500) + + # Test partial payment allocation (with excess payment entry) + pr.set("allocation", []) + pr.get_unreconciled_entries() + invoices = [x.as_dict() for x in pr.invoices] + payments = [pr.payments[1].as_dict()] + pr.allocate_entries(frappe._dict({"invoices": invoices, "payments": payments})) + pr.allocation[0].difference_account = "Exchange Gain/Loss - _PR" + + self.assertEqual(pr.allocation[0].allocated_amount, 100) + self.assertEqual(pr.allocation[0].difference_amount, -500) + + # Check if difference journal entry gets generated for difference amount after reconciliation + pr.reconcile() + total_credit_amount = frappe.db.get_all( + "Journal Entry Account", + {"account": self.debtors_eur, "docstatus": 1, "reference_name": si.name}, + "sum(credit) as amount", + group_by="reference_name", + )[0].amount + + # total credit includes the exchange gain/loss amount + self.assertEqual(flt(total_credit_amount, 2), 8500) + + jea_parent = frappe.db.get_all( + "Journal Entry Account", + filters={"account": self.debtors_eur, "docstatus": 1, "reference_name": si.name, "credit": 500}, + fields=["parent"], + )[0] + self.assertEqual( + frappe.db.get_value("Journal Entry", jea_parent.parent, "voucher_type"), "Exchange Gain Or Loss" + ) + def test_difference_amount_via_payment_entry(self): # Make Sale Invoice si = self.create_sales_invoice( @@ -1845,6 +1976,78 @@ class TestPaymentReconciliation(FrappeTestCase): self.assertEqual(len(pr.invoices), 1) self.assertEqual(len(pr.payments), 1) + def test_reconciliation_on_closed_period_payment(self): + # create backdated fiscal year + first_fy_start_date = frappe.db.get_value("Fiscal Year", {"disabled": 0}, "min(year_start_date)") + prev_fy_start_date = add_years(first_fy_start_date, -1) + prev_fy_end_date = add_days(first_fy_start_date, -1) + create_fiscal_year( + company=self.company, year_start_date=prev_fy_start_date, year_end_date=prev_fy_end_date + ) + + # make journal entry for previous year + je_1 = frappe.new_doc("Journal Entry") + je_1.posting_date = add_days(prev_fy_start_date, 20) + je_1.company = self.company + je_1.user_remark = "test" + je_1.set( + "accounts", + [ + { + "account": self.debit_to, + "cost_center": self.cost_center, + "party_type": "Customer", + "party": self.customer, + "debit_in_account_currency": 0, + "credit_in_account_currency": 1000, + }, + { + "account": self.bank, + "cost_center": self.sub_cc.name, + "credit_in_account_currency": 0, + "debit_in_account_currency": 500, + }, + { + "account": self.cash, + "cost_center": self.sub_cc.name, + "credit_in_account_currency": 0, + "debit_in_account_currency": 500, + }, + ], + ) + je_1.submit() + + # make period closing voucher + pcv = make_period_closing_voucher( + company=self.company, cost_center=self.cost_center, posting_date=prev_fy_end_date + ) + pcv.reload() + # check if period closing voucher is completed + self.assertEqual(pcv.gle_processing_status, "Completed") + + # make journal entry for active year + je_2 = self.create_journal_entry( + acc1=self.debit_to, acc2=self.income_account, amount=1000, posting_date=today() + ) + je_2.accounts[0].party_type = "Customer" + je_2.accounts[0].party = self.customer + je_2.submit() + + # process reconciliation on closed period payment + pr = self.create_payment_reconciliation(party_is_customer=True) + pr.from_invoice_date = pr.to_invoice_date = pr.from_payment_date = pr.to_payment_date = None + pr.get_unreconciled_entries() + invoices = [invoice.as_dict() for invoice in pr.invoices] + payments = [payment.as_dict() for payment in pr.payments] + pr.allocate_entries(frappe._dict({"invoices": invoices, "payments": payments})) + pr.reconcile() + je_1.reload() + je_2.reload() + + # check whether the payment reconciliation is done on the closed period + self.assertEqual(pr.get("invoices"), []) + self.assertEqual(pr.get("payments"), []) + def make_customer(customer_name, currency=None): if not frappe.db.exists("Customer", customer_name): @@ -1872,3 +2075,63 @@ def make_supplier(supplier_name, currency=None): return supplier.name else: return supplier_name + + +def create_fiscal_year(company, year_start_date, year_end_date): + fy_docname = frappe.db.exists( + "Fiscal Year", {"year_start_date": year_start_date, "year_end_date": year_end_date} + ) + if not fy_docname: + fy_doc = frappe.get_doc( + { + "doctype": "Fiscal Year", + "year": f"{getdate(year_start_date).year}-{getdate(year_end_date).year}", + "year_start_date": year_start_date, + "year_end_date": year_end_date, + "companies": [{"company": company}], + } + ).save() + return fy_doc + else: + fy_doc = frappe.get_doc("Fiscal Year", fy_docname) + if not frappe.db.exists("Fiscal Year Company", {"parent": fy_docname, "company": company}): + fy_doc.append("companies", {"company": company}) + fy_doc.save() + return fy_doc + + +def make_period_closing_voucher(company, cost_center, posting_date=None, submit=True): + from erpnext.accounts.doctype.account.test_account import create_account + + parent_account = frappe.db.get_value( + "Account", {"company": company, "account_name": "Current Liabilities", "is_group": 1}, "name" + ) + surplus_account = create_account( + account_name="Reserve and Surplus", + is_group=0, + company=company, + root_type="Liability", + report_type="Balance Sheet", + account_currency="INR", + parent_account=parent_account, + doctype="Account", + ) + fy = get_fiscal_year(posting_date, company=company) + pcv = frappe.get_doc( + { + "doctype": "Period Closing Voucher", + "transaction_date": posting_date or today(), + "period_start_date": fy[1], + "period_end_date": fy[2], + "company": company, + "fiscal_year": fy[0], + "cost_center": cost_center, + "closing_account_head": surplus_account, + "remarks": "test", + } + ) + pcv.insert() + if submit: + pcv.submit() + + return pcv diff --git a/erpnext/accounts/doctype/payment_reconciliation_payment/payment_reconciliation_payment.json b/erpnext/accounts/doctype/payment_reconciliation_payment/payment_reconciliation_payment.json index d199236ae99..010e93558cf 100644 --- a/erpnext/accounts/doctype/payment_reconciliation_payment/payment_reconciliation_payment.json +++ b/erpnext/accounts/doctype/payment_reconciliation_payment/payment_reconciliation_payment.json @@ -14,7 +14,7 @@ "amount", "difference_amount", "sec_break1", - "remark", + "remarks", "currency", "exchange_rate", "cost_center" @@ -74,12 +74,6 @@ "fieldname": "sec_break1", "fieldtype": "Section Break" }, - { - "fieldname": "remark", - "fieldtype": "Small Text", - "label": "Remark", - "read_only": 1 - }, { "fieldname": "currency", "fieldtype": "Link", @@ -105,12 +99,18 @@ "fieldtype": "Link", "label": "Cost Center", "options": "Cost Center" + }, + { + "fieldname": "remarks", + "fieldtype": "Small Text", + "label": "Remarks", + "read_only": 1 } ], "is_virtual": 1, "istable": 1, "links": [], - "modified": "2023-11-17 17:33:34.818530", + "modified": "2024-10-29 16:24:43.021230", "modified_by": "Administrator", "module": "Accounts", "name": "Payment Reconciliation Payment", diff --git a/erpnext/accounts/doctype/payment_reconciliation_payment/payment_reconciliation_payment.py b/erpnext/accounts/doctype/payment_reconciliation_payment/payment_reconciliation_payment.py index 4ab80ecaafe..49c17eae41b 100644 --- a/erpnext/accounts/doctype/payment_reconciliation_payment/payment_reconciliation_payment.py +++ b/erpnext/accounts/doctype/payment_reconciliation_payment/payment_reconciliation_payment.py @@ -27,7 +27,7 @@ class PaymentReconciliationPayment(Document): reference_name: DF.DynamicLink | None reference_row: DF.Data | None reference_type: DF.Link | None - remark: DF.SmallText | None + remarks: DF.SmallText | None # end: auto-generated types @staticmethod diff --git a/erpnext/accounts/doctype/payment_request/payment_request.js b/erpnext/accounts/doctype/payment_request/payment_request.js index e45aa512fe8..50f96a4e2b6 100644 --- a/erpnext/accounts/doctype/payment_request/payment_request.js +++ b/erpnext/accounts/doctype/payment_request/payment_request.js @@ -48,8 +48,8 @@ frappe.ui.form.on("Payment Request", "refresh", function (frm) { } if ( - (!frm.doc.payment_gateway_account || frm.doc.payment_request_type == "Outward") && - frm.doc.status == "Initiated" + frm.doc.payment_request_type == "Outward" && + ["Initiated", "Partially Paid"].includes(frm.doc.status) ) { frm.add_custom_button(__("Create Payment Entry"), function () { frappe.call({ diff --git a/erpnext/accounts/doctype/payment_request/payment_request.json b/erpnext/accounts/doctype/payment_request/payment_request.json index 0537ee6d3a3..2eef429cd3a 100644 --- a/erpnext/accounts/doctype/payment_request/payment_request.json +++ b/erpnext/accounts/doctype/payment_request/payment_request.json @@ -9,18 +9,22 @@ "transaction_date", "column_break_2", "naming_series", + "company", "mode_of_payment", "party_details", "party_type", "party", + "party_name", "column_break_4", "reference_doctype", "reference_name", "transaction_details", "grand_total", + "currency", "is_a_subscription", "column_break_18", - "currency", + "outstanding_amount", + "party_account_currency", "subscription_section", "subscription_plans", "bank_account_details", @@ -68,6 +72,7 @@ { "fieldname": "transaction_date", "fieldtype": "Date", + "in_preview": 1, "label": "Transaction Date" }, { @@ -132,7 +137,8 @@ "no_copy": 1, "options": "reference_doctype", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "search_index": 1 }, { "fieldname": "transaction_details", @@ -140,12 +146,14 @@ "label": "Transaction Details" }, { - "description": "Amount in customer's currency", + "description": "Amount in transaction currency", "fieldname": "grand_total", "fieldtype": "Currency", + "in_preview": 1, "label": "Amount", "non_negative": 1, - "options": "currency" + "options": "currency", + "reqd": 1 }, { "default": "0", @@ -390,13 +398,44 @@ "options": "Payment Request", "print_hide": 1, "read_only": 1 + }, + { + "depends_on": "eval: doc.docstatus === 1", + "description": "Amount in party's bank account currency", + "fieldname": "outstanding_amount", + "fieldtype": "Currency", + "in_preview": 1, + "label": "Outstanding Amount", + "non_negative": 1, + "options": "party_account_currency", + "read_only": 1 + }, + { + "fieldname": "company", + "fieldtype": "Link", + "label": "Company", + "options": "Company", + "read_only": 1 + }, + { + "fieldname": "party_account_currency", + "fieldtype": "Link", + "label": "Party Account Currency", + "options": "Currency", + "read_only": 1 + }, + { + "fieldname": "party_name", + "fieldtype": "Data", + "label": "Party Name", + "read_only": 1 } ], "in_create": 1, "index_web_pages_for_search": 1, "is_submittable": 1, "links": [], - "modified": "2024-06-20 13:54:55.245774", + "modified": "2024-10-23 12:23:40.117336", "modified_by": "Administrator", "module": "Accounts", "name": "Payment Request", @@ -431,7 +470,8 @@ "write": 1 } ], + "show_preview_popup": 1, "sort_field": "modified", "sort_order": "DESC", "states": [] -} +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/payment_request/payment_request.py b/erpnext/accounts/doctype/payment_request/payment_request.py index a2c6a9d856a..61bb2932d2b 100644 --- a/erpnext/accounts/doctype/payment_request/payment_request.py +++ b/erpnext/accounts/doctype/payment_request/payment_request.py @@ -1,11 +1,13 @@ import json import frappe -from frappe import _ +from frappe import _, qb from frappe.model.document import Document +from frappe.query_builder.functions import Abs, Sum from frappe.utils import flt, nowdate from frappe.utils.background_jobs import enqueue +from erpnext import get_company_currency from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import ( get_accounting_dimensions, ) @@ -15,9 +17,18 @@ from erpnext.accounts.doctype.payment_entry.payment_entry import ( ) from erpnext.accounts.doctype.subscription_plan.subscription_plan import get_plan_rate from erpnext.accounts.party import get_party_account, get_party_bank_account -from erpnext.accounts.utils import get_account_currency +from erpnext.accounts.utils import get_account_currency, get_currency_precision from erpnext.utilities import payment_app_import_guard +ALLOWED_DOCTYPES_FOR_PAYMENT_REQUEST = [ + "Sales Order", + "Purchase Order", + "Sales Invoice", + "Purchase Invoice", + "POS Invoice", + "Fees", +] + def _get_payment_gateway_controller(*args, **kwargs): with payment_app_import_guard(): @@ -45,6 +56,7 @@ class PaymentRequest(Document): bank_account: DF.Link | None bank_account_no: DF.ReadOnly | None branch_code: DF.ReadOnly | None + company: DF.Link | None cost_center: DF.Link | None currency: DF.Link | None email_to: DF.Data | None @@ -56,16 +68,19 @@ class PaymentRequest(Document): mode_of_payment: DF.Link | None mute_email: DF.Check naming_series: DF.Literal["ACC-PRQ-.YYYY.-"] + outstanding_amount: DF.Currency party: DF.DynamicLink | None + party_account_currency: DF.Link | None + party_name: DF.Data | None party_type: DF.Link | None payment_account: DF.ReadOnly | None - payment_channel: DF.Literal["", "Email", "Phone"] + payment_channel: DF.Literal["", "Email", "Phone", "Other"] payment_gateway: DF.ReadOnly | None payment_gateway_account: DF.Link | None payment_order: DF.Link | None payment_request_type: DF.Literal["Outward", "Inward"] payment_url: DF.Data | None - print_format: DF.Literal + print_format: DF.Literal[None] project: DF.Link | None reference_doctype: DF.Link | None reference_name: DF.DynamicLink | None @@ -99,6 +114,12 @@ class PaymentRequest(Document): frappe.throw(_("To create a Payment Request reference document is required")) def validate_payment_request_amount(self): + if self.grand_total == 0: + frappe.throw( + _("{0} cannot be zero").format(self.get_label_from_fieldname("grand_total")), + title=_("Invalid Amount"), + ) + existing_payment_request_amount = flt( get_existing_payment_request_amount(self.reference_doctype, self.reference_name) ) @@ -146,6 +167,28 @@ class PaymentRequest(Document): ).format(self.grand_total, amount) ) + def before_submit(self): + if ( + self.currency != self.party_account_currency + and self.party_account_currency == get_company_currency(self.company) + ): + # set outstanding amount in party account currency + invoice = frappe.get_value( + self.reference_doctype, + self.reference_name, + ["rounded_total", "grand_total", "base_rounded_total", "base_grand_total"], + as_dict=1, + ) + grand_total = invoice.get("rounded_total") or invoice.get("grand_total") + base_grand_total = invoice.get("base_rounded_total") or invoice.get("base_grand_total") + self.outstanding_amount = flt( + self.grand_total / grand_total * base_grand_total, + self.precision("outstanding_amount"), + ) + + else: + self.outstanding_amount = self.grand_total + def on_submit(self): if self.payment_request_type == "Outward": self.db_set("status", "Initiated") @@ -261,12 +304,12 @@ class PaymentRequest(Document): return controller.get_payment_url( **{ "amount": flt(self.grand_total, self.precision("grand_total")), - "title": data.company.encode("utf-8"), - "description": self.subject.encode("utf-8"), + "title": data.company, + "description": self.subject, "reference_doctype": "Payment Request", "reference_docname": self.name, "payer_email": self.email_to or frappe.session.user, - "payer_name": frappe.safe_encode(data.customer_name), + "payer_name": data.customer_name, "order_id": self.name, "currency": self.currency, } @@ -274,7 +317,7 @@ class PaymentRequest(Document): def set_as_paid(self): if self.payment_channel == "Phone": - self.db_set("status", "Paid") + self.db_set({"status": "Paid", "outstanding_amount": 0}) else: payment_entry = self.create_payment_entry() @@ -295,26 +338,32 @@ class PaymentRequest(Document): else: party_account = get_party_account("Customer", ref_doc.get("customer"), ref_doc.company) - party_account_currency = ref_doc.get("party_account_currency") or get_account_currency(party_account) + party_account_currency = ( + self.get("party_account_currency") + or ref_doc.get("party_account_currency") + or get_account_currency(party_account) + ) + + party_amount = bank_amount = self.outstanding_amount - bank_amount = self.grand_total if party_account_currency == ref_doc.company_currency and party_account_currency != self.currency: - party_amount = ref_doc.get("base_rounded_total") or ref_doc.get("base_grand_total") - else: - party_amount = self.grand_total + exchange_rate = ref_doc.get("conversion_rate") + bank_amount = flt(self.outstanding_amount / exchange_rate, self.precision("grand_total")) + # outstanding amount is already in Part's account currency payment_entry = get_payment_entry( self.reference_doctype, self.reference_name, party_amount=party_amount, bank_account=self.payment_account, bank_amount=bank_amount, + created_from_payment_request=True, ) payment_entry.update( { "mode_of_payment": self.mode_of_payment, - "reference_no": self.name, + "reference_no": self.name, # to prevent validation error "reference_date": nowdate(), "remarks": "Payment Entry against {} {} via Payment Request {}".format( self.reference_doctype, self.reference_name, self.name @@ -322,6 +371,9 @@ class PaymentRequest(Document): } ) + # Allocate payment_request for each reference in payment_entry (Payment Term can splits the row) + self._allocate_payment_request_to_pe_references(references=payment_entry.references) + # Update dimensions payment_entry.update( { @@ -330,14 +382,6 @@ class PaymentRequest(Document): } ) - if party_account_currency == ref_doc.company_currency and party_account_currency != self.currency: - amount = payment_entry.base_paid_amount - else: - amount = self.grand_total - - payment_entry.received_amount = amount - payment_entry.get("references")[0].allocated_amount = amount - # Update 'Paid Amount' on Forex transactions if self.currency != ref_doc.company_currency: if ( @@ -428,6 +472,62 @@ class PaymentRequest(Document): return create_stripe_subscription(gateway_controller, data) + def _allocate_payment_request_to_pe_references(self, references): + """ + Allocate the Payment Request to the Payment Entry references based on\n + - Allocated Amount. + - Outstanding Amount of Payment Request.\n + Payment Request is doc itself and references are the rows of Payment Entry. + """ + if len(references) == 1: + references[0].payment_request = self.name + return + + precision = references[0].precision("allocated_amount") + outstanding_amount = self.outstanding_amount + + # to manage rows + row_number = 1 + MOVE_TO_NEXT_ROW = 1 + TO_SKIP_NEW_ROW = 2 + NEW_ROW_ADDED = False + + while row_number <= len(references): + row = references[row_number - 1] + + # update the idx to maintain the order + row.idx = row_number + + if outstanding_amount == 0: + if not NEW_ROW_ADDED: + break + + row_number += MOVE_TO_NEXT_ROW + continue + + # allocate the payment request to the row + row.payment_request = self.name + + if row.allocated_amount <= outstanding_amount: + outstanding_amount = flt(outstanding_amount - row.allocated_amount, precision) + row_number += MOVE_TO_NEXT_ROW + else: + remaining_allocated_amount = flt(row.allocated_amount - outstanding_amount, precision) + row.allocated_amount = outstanding_amount + outstanding_amount = 0 + + # create a new row without PR for remaining unallocated amount + new_row = frappe.copy_doc(row) + references.insert(row_number, new_row) + + # update new row + new_row.idx = row_number + 1 + new_row.payment_request = None + new_row.allocated_amount = remaining_allocated_amount + + NEW_ROW_ADDED = True + row_number += TO_SKIP_NEW_ROW + @frappe.whitelist(allow_guest=True) def make_payment_request(**args): @@ -435,6 +535,9 @@ def make_payment_request(**args): args = frappe._dict(args) + if args.dt not in ALLOWED_DOCTYPES_FOR_PAYMENT_REQUEST: + frappe.throw(_("Payment Requests cannot be created against: {0}").format(frappe.bold(args.dt))) + ref_doc = frappe.get_doc(args.dt, args.dn) gateway_account = get_gateway_details(args) or frappe._dict() @@ -458,10 +561,38 @@ def make_payment_request(**args): {"reference_doctype": args.dt, "reference_name": args.dn, "docstatus": 0}, ) - existing_payment_request_amount = get_existing_payment_request_amount(args.dt, args.dn) + # fetches existing payment request `grand_total` amount + existing_payment_request_amount = get_existing_payment_request_amount(ref_doc.doctype, ref_doc.name) + + existing_paid_amount = get_existing_paid_amount(ref_doc.doctype, ref_doc.name) + + def validate_and_calculate_grand_total(grand_total, existing_payment_request_amount): + grand_total -= existing_payment_request_amount + if not grand_total: + frappe.throw(_("Payment Request is already created")) + return grand_total if existing_payment_request_amount: - grand_total -= existing_payment_request_amount + if args.order_type == "Shopping Cart": + # If Payment Request is in an advanced stage, then create for remaining amount. + if get_existing_payment_request_amount( + ref_doc.doctype, ref_doc.name, ["Initiated", "Partially Paid", "Payment Ordered", "Paid"] + ): + grand_total = validate_and_calculate_grand_total(grand_total, existing_payment_request_amount) + else: + # If PR's are processed, cancel all of them. + cancel_old_payment_requests(ref_doc.doctype, ref_doc.name) + else: + grand_total = validate_and_calculate_grand_total(grand_total, existing_payment_request_amount) + + if existing_paid_amount: + if ref_doc.party_account_currency == ref_doc.currency: + if ref_doc.conversion_rate: + grand_total -= flt(existing_paid_amount / ref_doc.conversion_rate) + else: + grand_total -= flt(existing_paid_amount) + else: + grand_total -= flt(existing_paid_amount / ref_doc.conversion_rate) if draft_payment_request: frappe.db.set_value( @@ -476,6 +607,13 @@ def make_payment_request(**args): "Outward" if args.get("dt") in ["Purchase Order", "Purchase Invoice"] else "Inward" ) + party_type = args.get("party_type") or "Customer" + party_account_currency = ref_doc.get("party_account_currency") + + if not party_account_currency: + party_account = get_party_account(party_type, ref_doc.get(party_type.lower()), ref_doc.company) + party_account_currency = get_account_currency(party_account) + pr.update( { "payment_gateway_account": gateway_account.get("name"), @@ -484,6 +622,7 @@ def make_payment_request(**args): "payment_channel": gateway_account.get("payment_channel"), "payment_request_type": args.get("payment_request_type"), "currency": ref_doc.currency, + "party_account_currency": party_account_currency, "grand_total": grand_total, "mode_of_payment": args.mode_of_payment, "email_to": args.recipient_id or ref_doc.owner, @@ -491,9 +630,11 @@ def make_payment_request(**args): "message": gateway_account.get("message") or get_dummy_message(ref_doc), "reference_doctype": args.dt, "reference_name": args.dn, - "party_type": args.get("party_type") or "Customer", + "company": ref_doc.get("company"), + "party_type": party_type, "party": args.get("party") or ref_doc.get("customer"), "bank_account": bank_account, + "party_name": args.get("party_name") or ref_doc.get("customer_name"), } ) @@ -514,6 +655,8 @@ def make_payment_request(**args): if frappe.db.get_single_value("Accounts Settings", "create_pr_in_draft_status", cache=True): pr.insert(ignore_permissions=True) if args.submit_doc: + if pr.get("__unsaved"): + pr.insert(ignore_permissions=True) pr.submit() if args.order_type == "Shopping Cart": @@ -535,9 +678,11 @@ def get_amount(ref_doc, payment_account=None): elif dt in ["Sales Invoice", "Purchase Invoice"]: if not ref_doc.get("is_pos"): if ref_doc.party_account_currency == ref_doc.currency: - grand_total = flt(ref_doc.grand_total) + grand_total = flt(ref_doc.rounded_total or ref_doc.grand_total) else: - grand_total = flt(ref_doc.base_grand_total) / ref_doc.conversion_rate + grand_total = flt( + flt(ref_doc.base_rounded_total or ref_doc.base_grand_total) / ref_doc.conversion_rate + ) elif dt == "Sales Invoice": for pay in ref_doc.payments: if pay.type == "Phone" and pay.account == payment_account: @@ -552,31 +697,94 @@ def get_amount(ref_doc, payment_account=None): grand_total = ref_doc.outstanding_amount if grand_total > 0: - return grand_total + return flt(grand_total, get_currency_precision()) else: frappe.throw(_("Payment Entry is already created")) -def get_existing_payment_request_amount(ref_dt, ref_dn): +def get_irequest_status(payment_requests: None | list = None) -> list: + IR = frappe.qb.DocType("Integration Request") + res = [] + if payment_requests: + res = ( + frappe.qb.from_(IR) + .select(IR.name) + .where(IR.reference_doctype.eq("Payment Request")) + .where(IR.reference_docname.isin(payment_requests)) + .where(IR.status.isin(["Authorized", "Completed"])) + .run(as_dict=True) + ) + return res + + +def cancel_old_payment_requests(ref_dt, ref_dn): + PR = frappe.qb.DocType("Payment Request") + + if res := ( + frappe.qb.from_(PR) + .select(PR.name) + .where(PR.reference_doctype == ref_dt) + .where(PR.reference_name == ref_dn) + .where(PR.docstatus == 1) + .where(PR.status.isin(["Draft", "Requested"])) + .run(as_dict=True) + ): + if get_irequest_status([x.name for x in res]): + frappe.throw(_("Another Payment Request is already processed")) + else: + for x in res: + doc = frappe.get_doc("Payment Request", x.name) + doc.flags.ignore_permissions = True + doc.cancel() + + if ireqs := get_irequests_of_payment_request(doc.name): + for ireq in ireqs: + frappe.db.set_value("Integration Request", ireq.name, "status", "Cancelled") + + +def get_existing_payment_request_amount(ref_dt, ref_dn, statuses: list | None = None) -> list: """ - Get the existing payment request which are unpaid or partially paid for payment channel other than Phone - and get the summation of existing paid payment request for Phone payment channel. + Return the total amount of Payment Requests against a reference document. """ - existing_payment_request_amount = frappe.db.sql( - """ - select sum(grand_total) - from `tabPayment Request` - where - reference_doctype = %s - and reference_name = %s - and docstatus = 1 - and (status != 'Paid' - or (payment_channel = 'Phone' - and status = 'Paid')) - """, - (ref_dt, ref_dn), + PR = frappe.qb.DocType("Payment Request") + + query = ( + frappe.qb.from_(PR) + .select(Sum(PR.grand_total)) + .where(PR.reference_doctype == ref_dt) + .where(PR.reference_name == ref_dn) + .where(PR.docstatus == 1) ) - return flt(existing_payment_request_amount[0][0]) if existing_payment_request_amount else 0 + + if statuses: + query = query.where(PR.status.isin(statuses)) + + response = query.run() + + return response[0][0] if response[0] else 0 + + +def get_existing_paid_amount(doctype, name): + PL = frappe.qb.DocType("Payment Ledger Entry") + PER = frappe.qb.DocType("Payment Entry Reference") + + query = ( + frappe.qb.from_(PL) + .left_join(PER) + .on( + (PER.reference_doctype == PL.against_voucher_type) & (PER.reference_name == PL.against_voucher_no) + ) + .select(Abs(Sum(PL.amount)).as_("total_paid_amount")) + .where(PL.against_voucher_type.eq(doctype)) + .where(PL.against_voucher_no.eq(name)) + .where(PL.amount < 0) + .where(PL.delinked == 0) + .where(PER.docstatus == 1) + .where(PER.payment_request.isnull()) + ) + response = query.run() + + return response[0][0] if response[0] else 0 def get_gateway_details(args): # nosemgrep @@ -623,41 +831,66 @@ def make_payment_entry(docname): return doc.create_payment_entry(submit=False).as_dict() -def update_payment_req_status(doc, method): - from erpnext.accounts.doctype.payment_entry.payment_entry import get_reference_details +def update_payment_requests_as_per_pe_references(references=None, cancel=False): + """ + Update Payment Request's `Status` and `Outstanding Amount` based on Payment Entry Reference's `Allocated Amount`. + """ + if not references: + return - for ref in doc.references: - payment_request_name = frappe.db.get_value( - "Payment Request", - { - "reference_doctype": ref.reference_doctype, - "reference_name": ref.reference_name, - "docstatus": 1, - }, + precision = references[0].precision("allocated_amount") + + referenced_payment_requests = frappe.get_all( + "Payment Request", + filters={"name": ["in", {row.payment_request for row in references if row.payment_request}]}, + fields=[ + "name", + "grand_total", + "outstanding_amount", + "payment_request_type", + ], + ) + + referenced_payment_requests = {pr.name: pr for pr in referenced_payment_requests} + + for ref in references: + if not ref.payment_request: + continue + + payment_request = referenced_payment_requests[ref.payment_request] + pr_outstanding = payment_request["outstanding_amount"] + + # update outstanding amount + new_outstanding_amount = flt( + pr_outstanding + ref.allocated_amount if cancel else pr_outstanding - ref.allocated_amount, + precision, ) - if payment_request_name: - ref_details = get_reference_details( - ref.reference_doctype, - ref.reference_name, - doc.party_account_currency, - doc.party_type, - doc.party, + # to handle same payment request for the multiple allocations + payment_request["outstanding_amount"] = new_outstanding_amount + + if not cancel and new_outstanding_amount < 0: + frappe.throw( + msg=_( + "The allocated amount is greater than the outstanding amount of Payment Request {0}" + ).format(ref.payment_request), + title=_("Invalid Allocated Amount"), ) - pay_req_doc = frappe.get_doc("Payment Request", payment_request_name) - status = pay_req_doc.status - if status != "Paid" and not ref_details.outstanding_amount: - status = "Paid" - elif status != "Partially Paid" and ref_details.outstanding_amount != ref_details.total_amount: - status = "Partially Paid" - elif ref_details.outstanding_amount == ref_details.total_amount: - if pay_req_doc.payment_request_type == "Outward": - status = "Initiated" - elif pay_req_doc.payment_request_type == "Inward": - status = "Requested" + # update status + if new_outstanding_amount == payment_request["grand_total"]: + status = "Initiated" if payment_request["payment_request_type"] == "Outward" else "Requested" + elif new_outstanding_amount == 0: + status = "Paid" + elif new_outstanding_amount > 0: + status = "Partially Paid" - pay_req_doc.db_set("status", status) + # update database + frappe.db.set_value( + "Payment Request", + ref.payment_request, + {"outstanding_amount": new_outstanding_amount, "status": status}, + ) def get_dummy_message(doc): @@ -741,3 +974,45 @@ def validate_payment(doc, method=None): doc.reference_docname ) ) + + +@frappe.whitelist() +def get_open_payment_requests_query(doctype, txt, searchfield, start, page_len, filters): + # permission checks in `get_list()` + filters = frappe._dict(filters) + + if not filters.reference_doctype or not filters.reference_name: + return [] + + if txt: + filters.name = ["like", f"%{txt}%"] + + open_payment_requests = frappe.get_list( + "Payment Request", + filters=filters, + fields=["name", "grand_total", "outstanding_amount"], + order_by="transaction_date ASC,creation ASC", + ) + + return [ + ( + pr.name, + _("Grand Total: {0}").format(pr.grand_total), + _("Outstanding Amount: {0}").format(pr.outstanding_amount), + ) + for pr in open_payment_requests + ] + + +def get_irequests_of_payment_request(doc: str | None = None) -> list: + res = [] + if doc: + res = frappe.db.get_all( + "Integration Request", + { + "reference_doctype": "Payment Request", + "reference_docname": doc, + "status": "Queued", + }, + ) + return res diff --git a/erpnext/accounts/doctype/payment_request/payment_request_dashboard.py b/erpnext/accounts/doctype/payment_request/payment_request_dashboard.py new file mode 100644 index 00000000000..02ad5684792 --- /dev/null +++ b/erpnext/accounts/doctype/payment_request/payment_request_dashboard.py @@ -0,0 +1,14 @@ +from frappe import _ + + +def get_data(): + return { + "fieldname": "payment_request", + "internal_links": { + "Payment Entry": ["references", "payment_request"], + "Payment Order": ["references", "payment_order"], + }, + "transactions": [ + {"label": _("Payment"), "items": ["Payment Entry", "Payment Order"]}, + ], + } diff --git a/erpnext/accounts/doctype/payment_request/payment_request_list.js b/erpnext/accounts/doctype/payment_request/payment_request_list.js index 183ca7c4584..6e4aada66c6 100644 --- a/erpnext/accounts/doctype/payment_request/payment_request_list.js +++ b/erpnext/accounts/doctype/payment_request/payment_request_list.js @@ -1,19 +1,18 @@ +const INDICATORS = { + "Partially Paid": "orange", + Cancelled: "red", + Draft: "red", + Failed: "red", + Initiated: "green", + Paid: "blue", + Requested: "green", +}; + frappe.listview_settings["Payment Request"] = { add_fields: ["status"], get_indicator: function (doc) { - if (doc.status == "Draft") { - return [__("Draft"), "gray", "status,=,Draft"]; - } - if (doc.status == "Requested") { - return [__("Requested"), "green", "status,=,Requested"]; - } else if (doc.status == "Initiated") { - return [__("Initiated"), "green", "status,=,Initiated"]; - } else if (doc.status == "Partially Paid") { - return [__("Partially Paid"), "orange", "status,=,Partially Paid"]; - } else if (doc.status == "Paid") { - return [__("Paid"), "blue", "status,=,Paid"]; - } else if (doc.status == "Cancelled") { - return [__("Cancelled"), "red", "status,=,Cancelled"]; - } + if (!doc.status || !INDICATORS[doc.status]) return; + + return [__(doc.status), INDICATORS[doc.status], `status,=,${doc.status}`]; }, }; diff --git a/erpnext/accounts/doctype/payment_request/test_payment_request.py b/erpnext/accounts/doctype/payment_request/test_payment_request.py index 6d15f84d7cf..eadb714baa3 100644 --- a/erpnext/accounts/doctype/payment_request/test_payment_request.py +++ b/erpnext/accounts/doctype/payment_request/test_payment_request.py @@ -1,11 +1,14 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt +import re import unittest import frappe -from frappe.tests.utils import FrappeTestCase +from frappe.tests.utils import FrappeTestCase, change_settings +from erpnext.accounts.doctype.payment_entry.payment_entry import get_payment_entry +from erpnext.accounts.doctype.payment_entry.test_payment_entry import create_payment_terms_template from erpnext.accounts.doctype.payment_request.payment_request import make_payment_request from erpnext.accounts.doctype.purchase_invoice.test_purchase_invoice import make_purchase_invoice from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice @@ -15,6 +18,7 @@ from erpnext.setup.utils import get_exchange_rate test_dependencies = ["Currency Exchange", "Journal Entry", "Contact", "Address"] + payment_gateway = {"doctype": "Payment Gateway", "gateway": "_Test Gateway"} payment_method = [ @@ -278,3 +282,291 @@ class TestPaymentRequest(FrappeTestCase): self.assertEqual(pe.paid_amount, 800) self.assertEqual(pe.base_received_amount, 800) self.assertEqual(pe.received_amount, 10) + + def test_multiple_payment_if_partially_paid_for_same_currency(self): + so = make_sales_order(currency="INR", qty=1, rate=1000) + + pr = make_payment_request( + dt="Sales Order", + dn=so.name, + mute_email=1, + submit_doc=1, + return_doc=1, + ) + + self.assertEqual(pr.grand_total, 1000) + self.assertEqual(pr.outstanding_amount, pr.grand_total) + self.assertEqual(pr.party_account_currency, pr.currency) # INR + + so.load_from_db() + + # to make partial payment + pe = pr.create_payment_entry(submit=False) + pe.paid_amount = 200 + pe.references[0].allocated_amount = 200 + pe.submit() + + self.assertEqual(pe.references[0].payment_request, pr.name) + + so.load_from_db() + + pr.load_from_db() + self.assertEqual(pr.status, "Partially Paid") + self.assertEqual(pr.outstanding_amount, 800) + self.assertEqual(pr.grand_total, 1000) + + # complete payment + pe = pr.create_payment_entry() + + self.assertEqual(pe.paid_amount, 800) # paid amount set from pr's outstanding amount + self.assertEqual(pe.references[0].allocated_amount, 800) + self.assertEqual(pe.references[0].outstanding_amount, 800) # for Orders it is not zero + self.assertEqual(pe.references[0].payment_request, pr.name) + + so.load_from_db() + + pr.load_from_db() + self.assertEqual(pr.status, "Paid") + self.assertEqual(pr.outstanding_amount, 0) + self.assertEqual(pr.grand_total, 1000) + + # creating a more payment Request must not allowed + self.assertRaisesRegex( + frappe.exceptions.ValidationError, + re.compile(r"Payment Request is already created"), + make_payment_request, + dt="Sales Order", + dn=so.name, + mute_email=1, + submit_doc=1, + return_doc=1, + ) + + @change_settings("Accounts Settings", {"allow_multi_currency_invoices_against_single_party_account": 1}) + def test_multiple_payment_if_partially_paid_for_multi_currency(self): + pi = make_purchase_invoice(currency="USD", conversion_rate=50, qty=1, rate=100, do_not_save=1) + pi.credit_to = "Creditors - _TC" + pi.submit() + + pr = make_payment_request( + dt="Purchase Invoice", + dn=pi.name, + mute_email=1, + submit_doc=1, + return_doc=1, + ) + + # 100 USD -> 5000 INR + self.assertEqual(pr.grand_total, 100) + self.assertEqual(pr.outstanding_amount, 5000) + self.assertEqual(pr.currency, "USD") + self.assertEqual(pr.party_account_currency, "INR") + self.assertEqual(pr.status, "Initiated") + + # to make partial payment + pe = pr.create_payment_entry(submit=False) + pe.paid_amount = 2000 + pe.references[0].allocated_amount = 2000 + pe.submit() + + self.assertEqual(pe.references[0].payment_request, pr.name) + + pr.load_from_db() + self.assertEqual(pr.status, "Partially Paid") + self.assertEqual(pr.outstanding_amount, 3000) + self.assertEqual(pr.grand_total, 100) + + # complete payment + pe = pr.create_payment_entry() + self.assertEqual(pe.paid_amount, 3000) # paid amount set from pr's outstanding amount + self.assertEqual(pe.references[0].allocated_amount, 3000) + self.assertEqual(pe.references[0].outstanding_amount, 0) # for Invoices it will zero + self.assertEqual(pe.references[0].payment_request, pr.name) + + pr.load_from_db() + self.assertEqual(pr.status, "Paid") + self.assertEqual(pr.outstanding_amount, 0) + self.assertEqual(pr.grand_total, 100) + + # creating a more payment Request must not allowed + self.assertRaisesRegex( + frappe.exceptions.ValidationError, + re.compile(r"Payment Request is already created"), + make_payment_request, + dt="Purchase Invoice", + dn=pi.name, + mute_email=1, + submit_doc=1, + return_doc=1, + ) + + def test_single_payment_with_payment_term_for_same_currency(self): + create_payment_terms_template() + + po = create_purchase_order(do_not_save=1, currency="INR", qty=1, rate=20000) + po.payment_terms_template = "Test Receivable Template" # 84.746 and 15.254 + po.save() + po.submit() + + pr = make_payment_request( + dt="Purchase Order", + dn=po.name, + mute_email=1, + submit_doc=1, + return_doc=1, + ) + + self.assertEqual(pr.grand_total, 20000) + self.assertEqual(pr.outstanding_amount, pr.grand_total) + self.assertEqual(pr.party_account_currency, pr.currency) # INR + self.assertEqual(pr.status, "Initiated") + + po.load_from_db() + + pe = pr.create_payment_entry() + + self.assertEqual(len(pe.references), 2) + self.assertEqual(pe.paid_amount, 20000) + + # check 1st payment term + self.assertEqual(pe.references[0].allocated_amount, 16949.2) + self.assertEqual(pe.references[0].payment_request, pr.name) + + # check 2nd payment term + self.assertEqual(pe.references[1].allocated_amount, 3050.8) + self.assertEqual(pe.references[1].payment_request, pr.name) + + po.load_from_db() + + pr.load_from_db() + self.assertEqual(pr.status, "Paid") + self.assertEqual(pr.outstanding_amount, 0) + self.assertEqual(pr.grand_total, 20000) + + @change_settings("Accounts Settings", {"allow_multi_currency_invoices_against_single_party_account": 1}) + def test_single_payment_with_payment_term_for_multi_currency(self): + create_payment_terms_template() + + si = create_sales_invoice( + do_not_save=1, currency="USD", debit_to="Debtors - _TC", qty=1, rate=200, conversion_rate=50 + ) + si.payment_terms_template = "Test Receivable Template" # 84.746 and 15.254 + si.save() + si.submit() + + pr = make_payment_request( + dt="Sales Invoice", + dn=si.name, + mute_email=1, + submit_doc=1, + return_doc=1, + ) + + # 200 USD -> 10000 INR + self.assertEqual(pr.grand_total, 200) + self.assertEqual(pr.outstanding_amount, 10000) + self.assertEqual(pr.currency, "USD") + self.assertEqual(pr.party_account_currency, "INR") + + pe = pr.create_payment_entry() + self.assertEqual(len(pe.references), 2) + self.assertEqual(pe.paid_amount, 10000) + + # check 1st payment term + # convert it via dollar and conversion_rate + self.assertEqual(pe.references[0].allocated_amount, 8474.5) # multi currency conversion + self.assertEqual(pe.references[0].payment_request, pr.name) + + # check 2nd payment term + self.assertEqual(pe.references[1].allocated_amount, 1525.5) # multi currency conversion + self.assertEqual(pe.references[1].payment_request, pr.name) + + pr.load_from_db() + self.assertEqual(pr.status, "Paid") + self.assertEqual(pr.outstanding_amount, 0) + self.assertEqual(pr.grand_total, 200) + + def test_payment_cancel_process(self): + so = make_sales_order(currency="INR", qty=1, rate=1000) + + pr = make_payment_request( + dt="Sales Order", + dn=so.name, + mute_email=1, + submit_doc=1, + return_doc=1, + ) + + self.assertEqual(pr.grand_total, 1000) + self.assertEqual(pr.outstanding_amount, pr.grand_total) + + so.load_from_db() + + pe = pr.create_payment_entry(submit=False) + pe.paid_amount = 800 + pe.references[0].allocated_amount = 800 + pe.submit() + + self.assertEqual(pe.references[0].payment_request, pr.name) + + so.load_from_db() + + pr.load_from_db() + self.assertEqual(pr.status, "Partially Paid") + self.assertEqual(pr.outstanding_amount, 200) + self.assertEqual(pr.grand_total, 1000) + + # cancelling PE + pe.cancel() + + pr.load_from_db() + self.assertEqual(pr.status, "Requested") + self.assertEqual(pr.outstanding_amount, 1000) + self.assertEqual(pr.grand_total, 1000) + + so.load_from_db() + + def test_partial_paid_invoice_with_payment_request(self): + si = create_sales_invoice(currency="INR", qty=1, rate=5000) + si.save() + si.submit() + + pe = get_payment_entry("Sales Invoice", si.name, bank_account="_Test Bank - _TC") + pe.reference_no = "PAYEE0002" + pe.reference_date = frappe.utils.nowdate() + pe.paid_amount = 2500 + pe.references[0].allocated_amount = 2500 + pe.save() + pe.submit() + + si.load_from_db() + pr = make_payment_request(dt="Sales Invoice", dn=si.name, mute_email=1) + + self.assertEqual(pr.grand_total, si.outstanding_amount) + + +def test_partial_paid_invoice_with_submitted_payment_entry(self): + pi = make_purchase_invoice(currency="INR", qty=1, rate=5000) + pi.save() + pi.submit() + + pe = get_payment_entry("Purchase Invoice", pi.name, bank_account="_Test Bank - _TC") + pe.reference_no = "PURINV0001" + pe.reference_date = frappe.utils.nowdate() + pe.paid_amount = 2500 + pe.references[0].allocated_amount = 2500 + pe.save() + pe.submit() + pe.cancel() + + pe = get_payment_entry("Purchase Invoice", pi.name, bank_account="_Test Bank - _TC") + pe.reference_no = "PURINV0002" + pe.reference_date = frappe.utils.nowdate() + pe.paid_amount = 2500 + pe.references[0].allocated_amount = 2500 + pe.save() + pe.submit() + + pi.load_from_db() + pr = make_payment_request(dt="Purchase Invoice", dn=pi.name, mute_email=1) + self.assertEqual(pr.grand_total, pi.outstanding_amount) diff --git a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.js b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.js index 82d8cb37fe7..095310c7e70 100644 --- a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.js +++ b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.js @@ -19,6 +19,24 @@ frappe.ui.form.on("Period Closing Voucher", { }); }, + fiscal_year: function (frm) { + if (frm.doc.fiscal_year) { + frappe.call({ + method: "erpnext.accounts.doctype.period_closing_voucher.period_closing_voucher.get_period_start_end_date", + args: { + fiscal_year: frm.doc.fiscal_year, + company: frm.doc.company, + }, + callback: function (r) { + if (r.message) { + frm.set_value("period_start_date", r.message[0]); + frm.set_value("period_end_date", r.message[1]); + } + }, + }); + } + }, + refresh: function (frm) { if (frm.doc.docstatus > 0) { frm.add_custom_button( diff --git a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.json b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.json index 624b5f82f64..f41cff0e0d8 100644 --- a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.json +++ b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.json @@ -6,39 +6,32 @@ "engine": "InnoDB", "field_order": [ "transaction_date", - "posting_date", - "fiscal_year", - "year_start_date", - "amended_from", "company", + "fiscal_year", + "period_start_date", + "period_end_date", + "amended_from", "column_break1", "closing_account_head", - "remarks", "gle_processing_status", + "remarks", "error_message" ], "fields": [ { + "default": "Today", "fieldname": "transaction_date", "fieldtype": "Date", "label": "Transaction Date", "oldfieldname": "transaction_date", "oldfieldtype": "Date" }, - { - "fieldname": "posting_date", - "fieldtype": "Date", - "label": "Posting Date", - "oldfieldname": "posting_date", - "oldfieldtype": "Date", - "reqd": 1 - }, { "fieldname": "fiscal_year", "fieldtype": "Link", "in_list_view": 1, "in_standard_filter": 1, - "label": "Closing Fiscal Year", + "label": "Fiscal Year", "oldfieldname": "fiscal_year", "oldfieldtype": "Select", "options": "Fiscal Year", @@ -103,16 +96,25 @@ "read_only": 1 }, { - "fieldname": "year_start_date", + "fieldname": "period_end_date", "fieldtype": "Date", - "label": "Year Start Date" + "label": "Period End Date", + "reqd": 1 + }, + { + "fieldname": "period_start_date", + "fieldtype": "Date", + "label": "Period Start Date", + "oldfieldname": "posting_date", + "oldfieldtype": "Date", + "reqd": 1 } ], "icon": "fa fa-file-text", "idx": 1, "is_submittable": 1, "links": [], - "modified": "2023-09-11 20:19:11.810533", + "modified": "2024-09-15 17:22:45.291628", "modified_by": "Administrator", "module": "Accounts", "name": "Period Closing Voucher", @@ -148,7 +150,7 @@ "write": 1 } ], - "search_fields": "posting_date, fiscal_year", + "search_fields": "fiscal_year, period_start_date, period_end_date", "sort_field": "modified", "sort_order": "DESC", "states": [], diff --git a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py index 9bc110d243e..7e0145e91a4 100644 --- a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py +++ b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py @@ -2,15 +2,20 @@ # License: GNU General Public License v3. See license.txt +import copy + import frappe from frappe import _ from frappe.query_builder.functions import Sum -from frappe.utils import add_days, flt +from frappe.utils import add_days, flt, formatdate, getdate +from erpnext.accounts.doctype.account_closing_balance.account_closing_balance import ( + make_closing_entries, +) from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import ( get_accounting_dimensions, ) -from erpnext.accounts.utils import get_account_currency, get_fiscal_year, validate_fiscal_year +from erpnext.accounts.utils import get_account_currency, get_fiscal_year from erpnext.controllers.accounts_controller import AccountsController @@ -29,38 +34,397 @@ class PeriodClosingVoucher(AccountsController): error_message: DF.Text | None fiscal_year: DF.Link gle_processing_status: DF.Literal["In Progress", "Completed", "Failed"] - posting_date: DF.Date + period_end_date: DF.Date + period_start_date: DF.Date remarks: DF.SmallText transaction_date: DF.Date | None - year_start_date: DF.Date | None # end: auto-generated types def validate(self): - self.validate_account_head() - self.validate_posting_date() + self.validate_start_and_end_date() + self.check_if_previous_year_closed() + self.block_if_future_closing_voucher_exists() + self.check_closing_account_type() + self.check_closing_account_currency() + + def validate_start_and_end_date(self): + self.fy_start_date, self.fy_end_date = frappe.db.get_value( + "Fiscal Year", self.fiscal_year, ["year_start_date", "year_end_date"] + ) + + prev_closed_period_end_date = get_previous_closed_period_in_current_year( + self.fiscal_year, self.company + ) + valid_start_date = ( + add_days(prev_closed_period_end_date, 1) if prev_closed_period_end_date else self.fy_start_date + ) + + if getdate(self.period_start_date) != getdate(valid_start_date): + frappe.throw(_("Period Start Date must be {0}").format(formatdate(valid_start_date))) + + if getdate(self.period_start_date) > getdate(self.period_end_date): + frappe.throw(_("Period Start Date cannot be greater than Period End Date")) + + if getdate(self.period_end_date) > getdate(self.fy_end_date): + frappe.throw(_("Period End Date cannot be greater than Fiscal Year End Date")) + + def check_if_previous_year_closed(self): + last_year_closing = add_days(self.fy_start_date, -1) + previous_fiscal_year = get_fiscal_year(last_year_closing, company=self.company, boolean=True) + if not previous_fiscal_year: + return + + previous_fiscal_year_start_date = previous_fiscal_year[0][1] + gle_exists_in_previous_year = frappe.db.exists( + "GL Entry", + { + "posting_date": ("between", [previous_fiscal_year_start_date, last_year_closing]), + "company": self.company, + "is_cancelled": 0, + }, + ) + if not gle_exists_in_previous_year: + return + + previous_fiscal_year_closed = frappe.db.exists( + "Period Closing Voucher", + { + "period_end_date": ("between", [previous_fiscal_year_start_date, last_year_closing]), + "docstatus": 1, + "company": self.company, + }, + ) + if not previous_fiscal_year_closed: + frappe.throw(_("Previous Year is not closed, please close it first")) + + def block_if_future_closing_voucher_exists(self): + future_closing_voucher = self.get_future_closing_voucher() + if future_closing_voucher and future_closing_voucher[0][0]: + action = "cancel" if self.docstatus == 2 else "create" + frappe.throw( + _( + "You cannot {0} this document because another Period Closing Entry {1} exists after {2}" + ).format(action, future_closing_voucher[0][0], self.period_end_date) + ) + + def get_future_closing_voucher(self): + return frappe.db.get_value( + "Period Closing Voucher", + {"period_end_date": (">", self.period_end_date), "docstatus": 1, "company": self.company}, + "name", + ) + + def check_closing_account_type(self): + closing_account_type = frappe.get_cached_value("Account", self.closing_account_head, "root_type") + + if closing_account_type not in ["Liability", "Equity"]: + frappe.throw( + _("Closing Account {0} must be of type Liability / Equity").format(self.closing_account_head) + ) + + def check_closing_account_currency(self): + account_currency = get_account_currency(self.closing_account_head) + company_currency = frappe.get_cached_value("Company", self.company, "default_currency") + if account_currency != company_currency: + frappe.throw(_("Currency of the Closing Account must be {0}").format(company_currency)) def on_submit(self): self.db_set("gle_processing_status", "In Progress") - get_opening_entries = False - - if not frappe.db.exists( - "Period Closing Voucher", {"company": self.company, "docstatus": 1, "name": ("!=", self.name)} - ): - get_opening_entries = True - - self.make_gl_entries(get_opening_entries=get_opening_entries) + self.make_gl_entries() def on_cancel(self): - self.validate_future_closing_vouchers() - self.db_set("gle_processing_status", "In Progress") self.ignore_linked_doctypes = ("GL Entry", "Stock Ledger Entry", "Payment Ledger Entry") - gle_count = frappe.db.count( - "GL Entry", - {"voucher_type": "Period Closing Voucher", "voucher_no": self.name, "is_cancelled": 0}, - ) - if gle_count > 5000: + self.block_if_future_closing_voucher_exists() + self.db_set("gle_processing_status", "In Progress") + self.cancel_gl_entries() + + def make_gl_entries(self): + if self.get_gle_count_in_selected_period() > 5000: frappe.enqueue( - make_reverse_gl_entries, + process_gl_and_closing_entries, + doc=self, + timeout=1800, + ) + frappe.msgprint( + _( + "The GL Entries and closing balances will be processed in the background, it can take a few minutes." + ), + alert=True, + ) + else: + process_gl_and_closing_entries(self) + + def get_gle_count_in_selected_period(self): + return frappe.db.count( + "GL Entry", + { + "posting_date": ["between", [self.period_start_date, self.period_end_date]], + "company": self.company, + "is_cancelled": 0, + }, + ) + + def get_pcv_gl_entries(self): + self.pl_accounts_reverse_gle = [] + self.closing_account_gle = [] + + pl_account_balances = self.get_account_balances_based_on_dimensions(report_type="Profit and Loss") + for dimensions, account_balances in pl_account_balances.items(): + for acc, balances in account_balances.items(): + balance_in_company_currency = flt(balances.debit) - flt(balances.credit) + if balance_in_company_currency and acc != "balances": + self.pl_accounts_reverse_gle.append( + self.get_gle_for_pl_account(acc, balances, dimensions) + ) + + # closing liability account + self.closing_account_gle.append( + self.get_gle_for_closing_account(account_balances["balances"], dimensions) + ) + + return self.pl_accounts_reverse_gle + self.closing_account_gle + + def get_gle_for_pl_account(self, acc, balances, dimensions): + balance_in_account_currency = flt(balances.debit_in_account_currency) - flt( + balances.credit_in_account_currency + ) + balance_in_company_currency = flt(balances.debit) - flt(balances.credit) + gl_entry = frappe._dict( + { + "company": self.company, + "posting_date": self.period_end_date, + "account": acc, + "account_currency": balances.account_currency, + "debit_in_account_currency": abs(balance_in_account_currency) + if balance_in_account_currency < 0 + else 0, + "debit": abs(balance_in_company_currency) if balance_in_company_currency < 0 else 0, + "credit_in_account_currency": abs(balance_in_account_currency) + if balance_in_account_currency > 0 + else 0, + "credit": abs(balance_in_company_currency) if balance_in_company_currency > 0 else 0, + "is_period_closing_voucher_entry": 1, + "voucher_type": "Period Closing Voucher", + "voucher_no": self.name, + "fiscal_year": self.fiscal_year, + "remarks": self.remarks, + "is_opening": "No", + } + ) + self.update_default_dimensions(gl_entry, dimensions) + return gl_entry + + def get_gle_for_closing_account(self, dimension_balance, dimensions): + balance_in_account_currency = flt(dimension_balance.balance_in_account_currency) + balance_in_company_currency = flt(dimension_balance.balance_in_company_currency) + gl_entry = frappe._dict( + { + "company": self.company, + "posting_date": self.period_end_date, + "account": self.closing_account_head, + "account_currency": frappe.db.get_value( + "Account", self.closing_account_head, "account_currency" + ), + "debit_in_account_currency": balance_in_account_currency + if balance_in_account_currency > 0 + else 0, + "debit": balance_in_company_currency if balance_in_company_currency > 0 else 0, + "credit_in_account_currency": abs(balance_in_account_currency) + if balance_in_account_currency < 0 + else 0, + "credit": abs(balance_in_company_currency) if balance_in_company_currency < 0 else 0, + "is_period_closing_voucher_entry": 1, + "voucher_type": "Period Closing Voucher", + "voucher_no": self.name, + "fiscal_year": self.fiscal_year, + "remarks": self.remarks, + "is_opening": "No", + } + ) + self.update_default_dimensions(gl_entry, dimensions) + return gl_entry + + def update_default_dimensions(self, gl_entry, dimensions): + for i, dimension in enumerate(self.accounting_dimension_fields): + gl_entry[dimension] = dimensions[i] + + def get_account_balances_based_on_dimensions(self, report_type): + """Get balance for dimension-wise pl accounts""" + self.get_accounting_dimension_fields() + acc_bal_dict = frappe._dict() + gl_entries = [] + + with frappe.db.unbuffered_cursor(): + gl_entries = self.get_gl_entries_for_current_period(report_type, as_iterator=True) + for gle in gl_entries: + acc_bal_dict = self.set_account_balance_dict(gle, acc_bal_dict) + + if report_type == "Balance Sheet" and self.is_first_period_closing_voucher(): + opening_entries = self.get_gl_entries_for_current_period(report_type, only_opening_entries=True) + for gle in opening_entries: + acc_bal_dict = self.set_account_balance_dict(gle, acc_bal_dict) + + return acc_bal_dict + + def get_accounting_dimension_fields(self): + default_dimensions = ["cost_center", "finance_book", "project"] + self.accounting_dimension_fields = default_dimensions + get_accounting_dimensions() + + def get_gl_entries_for_current_period(self, report_type, only_opening_entries=False, as_iterator=False): + date_condition = "" + if only_opening_entries: + date_condition = "is_opening = 'Yes'" + else: + date_condition = f"posting_date BETWEEN '{self.period_start_date}' AND '{self.period_end_date}' and is_opening = 'No'" + + # nosemgrep + return frappe.db.sql( + """ + SELECT + name, + posting_date, + account, + account_currency, + debit_in_account_currency, + credit_in_account_currency, + debit, + credit, + {} + FROM `tabGL Entry` + WHERE + {} + AND company = %s + AND voucher_type != 'Period Closing Voucher' + AND EXISTS(SELECT name FROM `tabAccount` WHERE name = account AND report_type = %s) + AND is_cancelled = 0 + """.format( + ", ".join(self.accounting_dimension_fields), + date_condition, + ), + (self.company, report_type), + as_dict=1, + as_iterator=as_iterator, + ) + + def set_account_balance_dict(self, gle, acc_bal_dict): + key = self.get_key(gle) + + acc_bal_dict.setdefault(key, frappe._dict()).setdefault( + gle.account, + frappe._dict( + { + "debit_in_account_currency": 0, + "credit_in_account_currency": 0, + "debit": 0, + "credit": 0, + "account_currency": gle.account_currency, + } + ), + ) + + acc_bal_dict[key][gle.account].debit_in_account_currency += flt(gle.debit_in_account_currency) + acc_bal_dict[key][gle.account].credit_in_account_currency += flt(gle.credit_in_account_currency) + acc_bal_dict[key][gle.account].debit += flt(gle.debit) + acc_bal_dict[key][gle.account].credit += flt(gle.credit) + + # dimension-wise total balances + acc_bal_dict[key].setdefault( + "balances", + frappe._dict( + { + "balance_in_account_currency": 0, + "balance_in_company_currency": 0, + } + ), + ) + + balance_in_account_currency = flt(gle.debit_in_account_currency) - flt(gle.credit_in_account_currency) + balance_in_company_currency = flt(gle.debit) - flt(gle.credit) + + acc_bal_dict[key]["balances"].balance_in_account_currency += balance_in_account_currency + acc_bal_dict[key]["balances"].balance_in_company_currency += balance_in_company_currency + + return acc_bal_dict + + def get_key(self, gle): + return tuple([gle.get(dimension) for dimension in self.accounting_dimension_fields]) + + def get_account_closing_balances(self): + pl_closing_entries = self.get_closing_entries_for_pl_accounts() + bs_closing_entries = self.get_closing_entries_for_balance_sheet_accounts() + closing_entries_for_closing_account = self.get_closing_entries_for_closing_account() + closing_entries = pl_closing_entries + bs_closing_entries + closing_entries_for_closing_account + return closing_entries + + def get_closing_entries_for_pl_accounts(self): + closing_entries = copy.deepcopy(self.pl_accounts_reverse_gle) + for d in self.pl_accounts_reverse_gle: + # reverse debit and credit + gle_copy = copy.deepcopy(d) + gle_copy.debit = d.credit + gle_copy.credit = d.debit + gle_copy.debit_in_account_currency = d.credit_in_account_currency + gle_copy.credit_in_account_currency = d.debit_in_account_currency + gle_copy.is_period_closing_voucher_entry = 0 + gle_copy.period_closing_voucher = self.name + closing_entries.append(gle_copy) + + return closing_entries + + def get_closing_entries_for_balance_sheet_accounts(self): + closing_entries = [] + balance_sheet_account_balances = self.get_account_balances_based_on_dimensions( + report_type="Balance Sheet" + ) + + for dimensions, account_balances in balance_sheet_account_balances.items(): + for acc, balances in account_balances.items(): + balance_in_company_currency = flt(balances.debit) - flt(balances.credit) + if acc != "balances" and balance_in_company_currency: + closing_entries.append(self.get_closing_entry(acc, balances, dimensions)) + + return closing_entries + + def get_closing_entry(self, account, balances, dimensions): + closing_entry = frappe._dict( + { + "company": self.company, + "closing_date": self.period_end_date, + "period_closing_voucher": self.name, + "account": account, + "account_currency": balances.account_currency, + "debit_in_account_currency": flt(balances.debit_in_account_currency), + "debit": flt(balances.debit), + "credit_in_account_currency": flt(balances.credit_in_account_currency), + "credit": flt(balances.credit), + "is_period_closing_voucher_entry": 0, + } + ) + self.update_default_dimensions(closing_entry, dimensions) + return closing_entry + + def get_closing_entries_for_closing_account(self): + closing_entries = copy.deepcopy(self.closing_account_gle) + for d in closing_entries: + d.period_closing_voucher = self.name + + return closing_entries + + def is_first_period_closing_voucher(self): + first_pcv = frappe.db.get_value( + "Period Closing Voucher", + {"company": self.company, "docstatus": 1}, + "name", + order_by="period_end_date asc", + ) + + if not first_pcv or first_pcv == self.name: + return True + + def cancel_gl_entries(self): + if self.get_gle_count_against_current_pcv() > 5000: + frappe.enqueue( + process_cancellation, voucher_type="Period Closing Voucher", voucher_no=self.name, queue="long", @@ -71,341 +435,74 @@ class PeriodClosingVoucher(AccountsController): alert=True, ) else: - make_reverse_gl_entries(voucher_type="Period Closing Voucher", voucher_no=self.name) + process_cancellation(voucher_type="Period Closing Voucher", voucher_no=self.name) - self.delete_closing_entries() - - def validate_future_closing_vouchers(self): - if frappe.db.exists( - "Period Closing Voucher", - {"posting_date": (">", self.posting_date), "docstatus": 1, "company": self.company}, - ): - frappe.throw( - _( - "You can not cancel this Period Closing Voucher, please cancel the future Period Closing Vouchers first" - ) - ) - - def delete_closing_entries(self): - closing_balance = frappe.qb.DocType("Account Closing Balance") - frappe.qb.from_(closing_balance).delete().where( - closing_balance.period_closing_voucher == self.name - ).run() - - def validate_account_head(self): - closing_account_type = frappe.get_cached_value("Account", self.closing_account_head, "root_type") - - if closing_account_type not in ["Liability", "Equity"]: - frappe.throw( - _("Closing Account {0} must be of type Liability / Equity").format(self.closing_account_head) - ) - - account_currency = get_account_currency(self.closing_account_head) - company_currency = frappe.get_cached_value("Company", self.company, "default_currency") - if account_currency != company_currency: - frappe.throw(_("Currency of the Closing Account must be {0}").format(company_currency)) - - def validate_posting_date(self): - validate_fiscal_year( - self.posting_date, self.fiscal_year, self.company, label=_("Posting Date"), doc=self - ) - - self.year_start_date = get_fiscal_year(self.posting_date, self.fiscal_year, company=self.company)[1] - - self.check_if_previous_year_closed() - - pcv = frappe.qb.DocType("Period Closing Voucher") - existing_entry = ( - frappe.qb.from_(pcv) - .select(pcv.name) - .where( - (pcv.posting_date >= self.posting_date) - & (pcv.fiscal_year == self.fiscal_year) - & (pcv.docstatus == 1) - & (pcv.company == self.company) - ) - .run() - ) - - if existing_entry and existing_entry[0][0]: - frappe.throw( - _("Another Period Closing Entry {0} has been made after {1}").format( - existing_entry[0][0], self.posting_date - ) - ) - - def check_if_previous_year_closed(self): - last_year_closing = add_days(self.year_start_date, -1) - previous_fiscal_year = get_fiscal_year(last_year_closing, company=self.company, boolean=True) - if not previous_fiscal_year: - return - - previous_fiscal_year_start_date = previous_fiscal_year[0][1] - if not frappe.db.exists( + def get_gle_count_against_current_pcv(self): + return frappe.db.count( "GL Entry", - { - "posting_date": ("between", [previous_fiscal_year_start_date, last_year_closing]), - "company": self.company, - "is_cancelled": 0, - }, - ): - return - - if not frappe.db.exists( - "Period Closing Voucher", - { - "posting_date": ("between", [previous_fiscal_year_start_date, last_year_closing]), - "docstatus": 1, - "company": self.company, - }, - ): - frappe.throw(_("Previous Year is not closed, please close it first")) - - def make_gl_entries(self, get_opening_entries=False): - gl_entries = self.get_gl_entries() - closing_entries = self.get_grouped_gl_entries(get_opening_entries=get_opening_entries) - if len(gl_entries + closing_entries) > 3000: - frappe.enqueue( - process_gl_entries, - gl_entries=gl_entries, - voucher_name=self.name, - timeout=3000, - ) - - frappe.enqueue( - process_closing_entries, - gl_entries=gl_entries, - closing_entries=closing_entries, - voucher_name=self.name, - company=self.company, - closing_date=self.posting_date, - timeout=3000, - ) - - frappe.msgprint( - _("The GL Entries will be processed in the background, it can take a few minutes."), - alert=True, - ) - else: - process_gl_entries(gl_entries, self.name) - process_closing_entries(gl_entries, closing_entries, self.name, self.company, self.posting_date) - - def get_grouped_gl_entries(self, get_opening_entries=False): - closing_entries = [] - for acc in self.get_balances_based_on_dimensions( - group_by_account=True, for_aggregation=True, get_opening_entries=get_opening_entries - ): - closing_entries.append(self.get_closing_entries(acc)) - - return closing_entries - - def get_gl_entries(self): - gl_entries = [] - - # pl account - for acc in self.get_balances_based_on_dimensions( - group_by_account=True, report_type="Profit and Loss" - ): - if flt(acc.bal_in_company_currency): - gl_entries.append(self.get_gle_for_pl_account(acc)) - - # closing liability account - for acc in self.get_balances_based_on_dimensions( - group_by_account=False, report_type="Profit and Loss" - ): - if flt(acc.bal_in_company_currency): - gl_entries.append(self.get_gle_for_closing_account(acc)) - - return gl_entries - - def get_gle_for_pl_account(self, acc): - gl_entry = self.get_gl_dict( - { - "company": self.company, - "closing_date": self.posting_date, - "account": acc.account, - "cost_center": acc.cost_center, - "finance_book": acc.finance_book, - "account_currency": acc.account_currency, - "debit_in_account_currency": abs(flt(acc.bal_in_account_currency)) - if flt(acc.bal_in_account_currency) < 0 - else 0, - "debit": abs(flt(acc.bal_in_company_currency)) if flt(acc.bal_in_company_currency) < 0 else 0, - "credit_in_account_currency": abs(flt(acc.bal_in_account_currency)) - if flt(acc.bal_in_account_currency) > 0 - else 0, - "credit": abs(flt(acc.bal_in_company_currency)) - if flt(acc.bal_in_company_currency) > 0 - else 0, - "is_period_closing_voucher_entry": 1, - }, - item=acc, - ) - self.update_default_dimensions(gl_entry, acc) - return gl_entry - - def get_gle_for_closing_account(self, acc): - gl_entry = self.get_gl_dict( - { - "company": self.company, - "closing_date": self.posting_date, - "account": self.closing_account_head, - "cost_center": acc.cost_center, - "finance_book": acc.finance_book, - "account_currency": acc.account_currency, - "debit_in_account_currency": abs(flt(acc.bal_in_account_currency)) - if flt(acc.bal_in_account_currency) > 0 - else 0, - "debit": abs(flt(acc.bal_in_company_currency)) if flt(acc.bal_in_company_currency) > 0 else 0, - "credit_in_account_currency": abs(flt(acc.bal_in_account_currency)) - if flt(acc.bal_in_account_currency) < 0 - else 0, - "credit": abs(flt(acc.bal_in_company_currency)) - if flt(acc.bal_in_company_currency) < 0 - else 0, - "is_period_closing_voucher_entry": 1, - }, - item=acc, - ) - self.update_default_dimensions(gl_entry, acc) - return gl_entry - - def get_closing_entries(self, acc): - closing_entry = self.get_gl_dict( - { - "company": self.company, - "closing_date": self.posting_date, - "period_closing_voucher": self.name, - "account": acc.account, - "cost_center": acc.cost_center, - "finance_book": acc.finance_book, - "account_currency": acc.account_currency, - "debit_in_account_currency": flt(acc.debit_in_account_currency), - "debit": flt(acc.debit), - "credit_in_account_currency": flt(acc.credit_in_account_currency), - "credit": flt(acc.credit), - }, - item=acc, + {"voucher_type": "Period Closing Voucher", "voucher_no": self.name, "is_cancelled": 0}, ) - for dimension in self.accounting_dimensions: - closing_entry.update({dimension: acc.get(dimension)}) - return closing_entry - - def update_default_dimensions(self, gl_entry, acc): - if not self.accounting_dimensions: - self.accounting_dimensions = get_accounting_dimensions() - - for dimension in self.accounting_dimensions: - gl_entry.update({dimension: acc.get(dimension)}) - - def get_balances_based_on_dimensions( - self, group_by_account=False, report_type=None, for_aggregation=False, get_opening_entries=False - ): - """Get balance for dimension-wise pl accounts""" - - qb_dimension_fields = ["cost_center", "finance_book", "project"] - - self.accounting_dimensions = get_accounting_dimensions() - for dimension in self.accounting_dimensions: - qb_dimension_fields.append(dimension) - - if group_by_account: - qb_dimension_fields.append("account") - - account_filters = { - "company": self.company, - "is_group": 0, - } - - if report_type: - account_filters.update({"report_type": report_type}) - - accounts = frappe.get_all("Account", filters=account_filters, pluck="name") - - gl_entry = frappe.qb.DocType("GL Entry") - query = frappe.qb.from_(gl_entry).select(gl_entry.account, gl_entry.account_currency) - - if not for_aggregation: - query = query.select( - (Sum(gl_entry.debit_in_account_currency) - Sum(gl_entry.credit_in_account_currency)).as_( - "bal_in_account_currency" - ), - (Sum(gl_entry.debit) - Sum(gl_entry.credit)).as_("bal_in_company_currency"), - ) - else: - query = query.select( - (Sum(gl_entry.debit_in_account_currency)).as_("debit_in_account_currency"), - (Sum(gl_entry.credit_in_account_currency)).as_("credit_in_account_currency"), - (Sum(gl_entry.debit)).as_("debit"), - (Sum(gl_entry.credit)).as_("credit"), - ) - - for dimension in qb_dimension_fields: - query = query.select(gl_entry[dimension]) - - query = query.where( - (gl_entry.company == self.company) - & (gl_entry.is_cancelled == 0) - & (gl_entry.account.isin(accounts)) - ) - - if get_opening_entries: - query = query.where( - gl_entry.posting_date.between(self.get("year_start_date"), self.posting_date) - | gl_entry.is_opening - == "Yes" - ) - else: - query = query.where( - gl_entry.posting_date.between(self.get("year_start_date"), self.posting_date) - & gl_entry.is_opening - == "No" - ) - - if for_aggregation: - query = query.where(gl_entry.voucher_type != "Period Closing Voucher") - - for dimension in qb_dimension_fields: - query = query.groupby(gl_entry[dimension]) - - return query.run(as_dict=1) - - -def process_gl_entries(gl_entries, voucher_name): +def process_gl_and_closing_entries(doc): from erpnext.accounts.general_ledger import make_gl_entries try: + gl_entries = doc.get_pcv_gl_entries() if gl_entries: make_gl_entries(gl_entries, merge_entries=False) - frappe.db.set_value("Period Closing Voucher", voucher_name, "gle_processing_status", "Completed") + + closing_entries = doc.get_account_closing_balances() + make_closing_entries(closing_entries, doc.name, doc.company, doc.period_end_date) + + frappe.db.set_value(doc.doctype, doc.name, "gle_processing_status", "Completed") except Exception as e: frappe.db.rollback() frappe.log_error(e) - frappe.db.set_value("Period Closing Voucher", voucher_name, "gle_processing_status", "Failed") + frappe.db.set_value(doc.doctype, doc.name, "gle_processing_status", "Failed") -def process_closing_entries(gl_entries, closing_entries, voucher_name, company, closing_date): - from erpnext.accounts.doctype.account_closing_balance.account_closing_balance import ( - make_closing_entries, - ) - - try: - if gl_entries + closing_entries: - make_closing_entries(gl_entries + closing_entries, voucher_name, company, closing_date) - except Exception as e: - frappe.db.rollback() - frappe.log_error(e) - - -def make_reverse_gl_entries(voucher_type, voucher_no): +def process_cancellation(voucher_type, voucher_no): from erpnext.accounts.general_ledger import make_reverse_gl_entries try: make_reverse_gl_entries(voucher_type=voucher_type, voucher_no=voucher_no) + delete_closing_entries(voucher_no) frappe.db.set_value("Period Closing Voucher", voucher_no, "gle_processing_status", "Completed") except Exception as e: frappe.db.rollback() frappe.log_error(e) frappe.db.set_value("Period Closing Voucher", voucher_no, "gle_processing_status", "Failed") + + +def delete_closing_entries(voucher_no): + closing_balance = frappe.qb.DocType("Account Closing Balance") + frappe.qb.from_(closing_balance).delete().where( + closing_balance.period_closing_voucher == voucher_no + ).run() + + +@frappe.whitelist() +def get_period_start_end_date(fiscal_year, company): + fy_start_date, fy_end_date = frappe.db.get_value( + "Fiscal Year", fiscal_year, ["year_start_date", "year_end_date"] + ) + prev_closed_period_end_date = get_previous_closed_period_in_current_year(fiscal_year, company) + period_start_date = ( + add_days(prev_closed_period_end_date, 1) if prev_closed_period_end_date else fy_start_date + ) + return period_start_date, fy_end_date + + +def get_previous_closed_period_in_current_year(fiscal_year, company): + prev_closed_period_end_date = frappe.db.get_value( + "Period Closing Voucher", + filters={ + "company": company, + "fiscal_year": fiscal_year, + "docstatus": 1, + }, + fieldname=["period_end_date"], + order_by="period_end_date desc", + ) + return prev_closed_period_end_date diff --git a/erpnext/accounts/doctype/period_closing_voucher/test_period_closing_voucher.py b/erpnext/accounts/doctype/period_closing_voucher/test_period_closing_voucher.py index 1bd565e1b36..e9d65f7f856 100644 --- a/erpnext/accounts/doctype/period_closing_voucher/test_period_closing_voucher.py +++ b/erpnext/accounts/doctype/period_closing_voucher/test_period_closing_voucher.py @@ -317,16 +317,18 @@ class TestPeriodClosingVoucher(unittest.TestCase): repost_doc.posting_date = today() repost_doc.save() - def make_period_closing_voucher(self, posting_date=None, submit=True): + def make_period_closing_voucher(self, posting_date, submit=True): surplus_account = create_account() cost_center = create_cost_center("Test Cost Center 1") + fy = get_fiscal_year(posting_date, company="Test PCV Company") pcv = frappe.get_doc( { "doctype": "Period Closing Voucher", "transaction_date": posting_date or today(), - "posting_date": posting_date or today(), + "period_start_date": fy[1], + "period_end_date": fy[2], "company": "Test PCV Company", - "fiscal_year": get_fiscal_year(today(), company="Test PCV Company")[0], + "fiscal_year": fy[0], "cost_center": cost_center, "closing_account_head": surplus_account, "remarks": "test", diff --git a/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.js b/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.js index 68a85f7ee96..7504c79141b 100644 --- a/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.js +++ b/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.js @@ -80,8 +80,10 @@ frappe.ui.form.on("POS Closing Entry", { ) { reset_values(frm); frappe.run_serially([ + () => frappe.dom.freeze(__("Loading Invoices! Please Wait...")), () => frm.trigger("set_opening_amounts"), () => frm.trigger("get_pos_invoices"), + () => frappe.dom.unfreeze(), ]); } }, @@ -145,7 +147,7 @@ frappe.ui.form.on("POS Closing Entry", { frm.doc.grand_total += flt(doc.grand_total); frm.doc.net_total += flt(doc.net_total); frm.doc.total_quantity += flt(doc.total_qty); - refresh_payments(doc, frm); + refresh_payments(doc, frm, false); refresh_taxes(doc, frm); refresh_fields(frm); set_html_data(frm); @@ -170,7 +172,7 @@ function set_form_data(data, frm) { frm.doc.grand_total += flt(d.grand_total); frm.doc.net_total += flt(d.net_total); frm.doc.total_quantity += flt(d.total_qty); - refresh_payments(d, frm); + refresh_payments(d, frm, true); refresh_taxes(d, frm); }); } @@ -184,7 +186,7 @@ function add_to_pos_transaction(d, frm) { }); } -function refresh_payments(d, frm) { +function refresh_payments(d, frm, is_new) { d.payments.forEach((p) => { const payment = frm.doc.payment_reconciliation.find( (pay) => pay.mode_of_payment === p.mode_of_payment @@ -194,7 +196,7 @@ function refresh_payments(d, frm) { } if (payment) { payment.expected_amount += flt(p.amount); - payment.closing_amount = payment.expected_amount; + if (is_new) payment.closing_amount = payment.expected_amount; payment.difference = payment.closing_amount - payment.expected_amount; } else { frm.add_child("payment_reconciliation", { diff --git a/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.py b/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.py index 9faf8693a8a..fda868cfe51 100644 --- a/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.py +++ b/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.py @@ -87,19 +87,15 @@ class POSClosingEntry(StatusUpdater): as_dict=1, )[0] if pos_invoice.consolidated_invoice: - invalid_row.setdefault("msg", []).append( - _("POS Invoice is {}").format(frappe.bold("already consolidated")) - ) + invalid_row.setdefault("msg", []).append(_("POS Invoice is already consolidated")) invalid_rows.append(invalid_row) continue if pos_invoice.pos_profile != self.pos_profile: invalid_row.setdefault("msg", []).append( - _("POS Profile doesn't matches {}").format(frappe.bold(self.pos_profile)) + _("POS Profile doesn't match {}").format(frappe.bold(self.pos_profile)) ) if pos_invoice.docstatus != 1: - invalid_row.setdefault("msg", []).append( - _("POS Invoice is not {}").format(frappe.bold("submitted")) - ) + invalid_row.setdefault("msg", []).append(_("POS Invoice is not submitted")) if pos_invoice.owner != self.user: invalid_row.setdefault("msg", []).append( _("POS Invoice isn't created by user {}").format(frappe.bold(self.owner)) diff --git a/erpnext/accounts/doctype/pos_invoice/pos_invoice.js b/erpnext/accounts/doctype/pos_invoice/pos_invoice.js index a6e8bfa6286..6a537a2559a 100644 --- a/erpnext/accounts/doctype/pos_invoice/pos_invoice.js +++ b/erpnext/accounts/doctype/pos_invoice/pos_invoice.js @@ -40,10 +40,24 @@ erpnext.selling.POSInvoiceController = class POSInvoiceController extends erpnex }; }); + this.frm.set_query("item_code", "items", function (doc) { + return { + query: "erpnext.accounts.doctype.pos_invoice.pos_invoice.item_query", + filters: { + has_variants: ["=", 0], + is_sales_item: ["=", 1], + disabled: ["=", 0], + is_fixed_asset: ["=", 0], + pos_profile: ["=", doc.pos_profile], + }, + }; + }); + erpnext.accounts.dimensions.setup_dimension_filters(this.frm, this.frm.doctype); } onload_post_render(frm) { + super.onload_post_render(); this.pos_profile(frm); } @@ -51,7 +65,7 @@ erpnext.selling.POSInvoiceController = class POSInvoiceController extends erpnex super.refresh(); if (doc.docstatus == 1 && !doc.is_return) { - this.frm.add_custom_button(__("Return"), this.make_sales_return, __("Create")); + this.frm.add_custom_button(__("Return"), this.make_sales_return.bind(this), __("Create")); this.frm.page.set_inner_btn_group_as_primary(__("Create")); } diff --git a/erpnext/accounts/doctype/pos_invoice/pos_invoice.json b/erpnext/accounts/doctype/pos_invoice/pos_invoice.json index d7b173667ec..42861140494 100644 --- a/erpnext/accounts/doctype/pos_invoice/pos_invoice.json +++ b/erpnext/accounts/doctype/pos_invoice/pos_invoice.json @@ -48,6 +48,7 @@ "shipping_address", "company_address", "company_address_display", + "company_contact_person", "currency_and_price_list", "currency", "conversion_rate", @@ -1558,12 +1559,19 @@ "fieldname": "update_billed_amount_in_delivery_note", "fieldtype": "Check", "label": "Update Billed Amount in Delivery Note" + }, + { + "fieldname": "company_contact_person", + "fieldtype": "Link", + "label": "Company Contact Person", + "options": "Contact", + "print_hide": 1 } ], "icon": "fa fa-file-text", "is_submittable": 1, "links": [], - "modified": "2024-03-20 16:00:34.268756", + "modified": "2024-11-26 13:10:50.309570", "modified_by": "Administrator", "module": "Accounts", "name": "POS Invoice", diff --git a/erpnext/accounts/doctype/pos_invoice/pos_invoice.py b/erpnext/accounts/doctype/pos_invoice/pos_invoice.py index ef4db1dac98..ab5a4092c33 100644 --- a/erpnext/accounts/doctype/pos_invoice/pos_invoice.py +++ b/erpnext/accounts/doctype/pos_invoice/pos_invoice.py @@ -6,6 +6,7 @@ import frappe from frappe import _, bold from frappe.query_builder.functions import IfNull, Sum from frappe.utils import cint, flt, get_link_to_form, getdate, nowdate +from frappe.utils.nestedset import get_descendants_of from erpnext.accounts.doctype.loyalty_program.loyalty_program import validate_loyalty_points from erpnext.accounts.doctype.payment_request.payment_request import make_payment_request @@ -15,6 +16,7 @@ from erpnext.accounts.doctype.sales_invoice.sales_invoice import ( update_multi_mode_option, ) from erpnext.accounts.party import get_due_date, get_party_account +from erpnext.controllers.queries import item_query as _item_query from erpnext.stock.doctype.serial_no.serial_no import get_serial_nos @@ -30,12 +32,8 @@ class POSInvoice(SalesInvoice): from erpnext.accounts.doctype.payment_schedule.payment_schedule import PaymentSchedule from erpnext.accounts.doctype.pos_invoice_item.pos_invoice_item import POSInvoiceItem from erpnext.accounts.doctype.pricing_rule_detail.pricing_rule_detail import PricingRuleDetail - from erpnext.accounts.doctype.sales_invoice_advance.sales_invoice_advance import ( - SalesInvoiceAdvance, - ) - from erpnext.accounts.doctype.sales_invoice_payment.sales_invoice_payment import ( - SalesInvoicePayment, - ) + from erpnext.accounts.doctype.sales_invoice_advance.sales_invoice_advance import SalesInvoiceAdvance + from erpnext.accounts.doctype.sales_invoice_payment.sales_invoice_payment import SalesInvoicePayment from erpnext.accounts.doctype.sales_invoice_timesheet.sales_invoice_timesheet import ( SalesInvoiceTimesheet, ) @@ -73,6 +71,7 @@ class POSInvoice(SalesInvoice): company: DF.Link company_address: DF.Link | None company_address_display: DF.SmallText | None + company_contact_person: DF.Link | None consolidated_invoice: DF.Link | None contact_display: DF.SmallText | None contact_email: DF.Data | None @@ -188,7 +187,7 @@ class POSInvoice(SalesInvoice): def validate(self): if not cint(self.is_pos): frappe.throw( - _("POS Invoice should have {} field checked.").format(frappe.bold("Include Payment")) + _("POS Invoice should have the field {0} checked.").format(frappe.bold(_("Include Payment"))) ) # run on validate method of selling controller @@ -449,7 +448,7 @@ class POSInvoice(SalesInvoice): if self.is_return and entry.amount > 0: frappe.throw(_("Row #{0} (Payment Table): Amount must be negative").format(entry.idx)) - if self.is_return: + if self.is_return and self.docstatus != 0: invoice_total = self.rounded_total or self.grand_total total_amount_in_payments = flt(total_amount_in_payments, self.precision("grand_total")) if total_amount_in_payments and total_amount_in_payments < invoice_total: @@ -837,3 +836,30 @@ def add_return_modes(doc, pos_profile): ]: payment_mode = get_mode_of_payment_info(mode_of_payment, doc.company) append_payment(payment_mode[0]) + + +@frappe.whitelist() +@frappe.validate_and_sanitize_search_inputs +def item_query(doctype, txt, searchfield, start, page_len, filters, as_dict=False): + if pos_profile := filters.get("pos_profile")[1]: + pos_profile = frappe.get_cached_doc("POS Profile", pos_profile) + if item_groups := get_item_group(pos_profile): + filters["item_group"] = ["in", tuple(item_groups)] + + del filters["pos_profile"] + + else: + filters.pop("pos_profile", None) + + return _item_query(doctype, txt, searchfield, start, page_len, filters, as_dict) + + +def get_item_group(pos_profile): + item_groups = [] + if pos_profile.get("item_groups"): + # Get items based on the item groups defined in the POS profile + for row in pos_profile.get("item_groups"): + item_groups.append(row.item_group) + item_groups.extend(get_descendants_of("Item Group", row.item_group)) + + return list(set(item_groups)) diff --git a/erpnext/accounts/doctype/pos_invoice/test_pos_invoice.py b/erpnext/accounts/doctype/pos_invoice/test_pos_invoice.py index f210a6434cf..1dbc630e62e 100644 --- a/erpnext/accounts/doctype/pos_invoice/test_pos_invoice.py +++ b/erpnext/accounts/doctype/pos_invoice/test_pos_invoice.py @@ -93,7 +93,7 @@ class TestPOSInvoice(unittest.TestCase): inv.save() - self.assertEqual(inv.net_total, 4298.25) + self.assertEqual(inv.net_total, 4298.24) self.assertEqual(inv.grand_total, 4900.00) def test_tax_calculation_with_multiple_items(self): diff --git a/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py b/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py index 2cf204dd347..5bb43b3fa72 100644 --- a/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py +++ b/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py @@ -97,16 +97,15 @@ class POSInvoiceMergeLog(Document): return_against_status = frappe.db.get_value("POS Invoice", return_against, "status") if return_against_status != "Consolidated": # if return entry is not getting merged in the current pos closing and if it is not consolidated - bold_unconsolidated = frappe.bold("not Consolidated") - msg = _("Row #{}: Original Invoice {} of return invoice {} is {}.").format( - d.idx, bold_return_against, bold_pos_invoice, bold_unconsolidated - ) + msg = _( + "Row #{}: The original Invoice {} of return invoice {} is not consolidated." + ).format(d.idx, bold_return_against, bold_pos_invoice) msg += " " msg += _( - "Original invoice should be consolidated before or along with the return invoice." + "The original invoice should be consolidated before or along with the return invoice." ) msg += "

" - msg += _("You can add original invoice {} manually to proceed.").format( + msg += _("You can add the original invoice {} manually to proceed.").format( bold_return_against ) frappe.throw(msg) @@ -439,7 +438,9 @@ def split_invoices(invoices): if not item.serial_no and not item.serial_and_batch_bundle: continue - return_against_is_added = any(d for d in _invoices if d.pos_invoice == pos_invoice.return_against) + return_against_is_added = any( + d for d in _invoices if d and d[0].pos_invoice == pos_invoice.return_against + ) if return_against_is_added: break diff --git a/erpnext/accounts/doctype/pos_invoice_merge_log/test_pos_invoice_merge_log.py b/erpnext/accounts/doctype/pos_invoice_merge_log/test_pos_invoice_merge_log.py index 20f6ddb5ba9..904d8e83b9c 100644 --- a/erpnext/accounts/doctype/pos_invoice_merge_log/test_pos_invoice_merge_log.py +++ b/erpnext/accounts/doctype/pos_invoice_merge_log/test_pos_invoice_merge_log.py @@ -343,7 +343,7 @@ class TestPOSInvoiceMergeLog(unittest.TestCase): inv.load_from_db() consolidated_invoice = frappe.get_doc("Sales Invoice", inv.consolidated_invoice) self.assertEqual(consolidated_invoice.status, "Return") - self.assertEqual(consolidated_invoice.rounding_adjustment, -0.001) + self.assertEqual(consolidated_invoice.rounding_adjustment, -0.002) finally: frappe.set_user("Administrator") diff --git a/erpnext/accounts/doctype/pricing_rule/pricing_rule.json b/erpnext/accounts/doctype/pricing_rule/pricing_rule.json index 6f191c106c9..ee9dd2be8c3 100644 --- a/erpnext/accounts/doctype/pricing_rule/pricing_rule.json +++ b/erpnext/accounts/doctype/pricing_rule/pricing_rule.json @@ -419,7 +419,8 @@ "depends_on": "eval:doc.rate_or_discount==\"Rate\"", "fieldname": "rate", "fieldtype": "Currency", - "label": "Rate" + "label": "Rate", + "options": "currency" }, { "default": "0", @@ -647,7 +648,7 @@ "icon": "fa fa-gift", "idx": 1, "links": [], - "modified": "2024-05-17 13:16:34.496704", + "modified": "2024-09-16 18:14:51.314765", "modified_by": "Administrator", "module": "Accounts", "name": "Pricing Rule", @@ -709,4 +710,4 @@ "sort_order": "DESC", "states": [], "title_field": "title" -} +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py index de29ec0f004..73cb2483811 100644 --- a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py +++ b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py @@ -186,7 +186,8 @@ class PricingRule(Document): if not self.priority: throw( _("As the field {0} is enabled, the field {1} is mandatory.").format( - frappe.bold("Apply Discount on Discounted Rate"), frappe.bold("Priority") + frappe.bold(_("Apply Discount on Discounted Rate")), + frappe.bold(_("Priority")), ) ) @@ -194,7 +195,7 @@ class PricingRule(Document): throw( _( "As the field {0} is enabled, the value of the field {1} should be more than 1." - ).format(frappe.bold("Apply Discount on Discounted Rate"), frappe.bold("Priority")) + ).format(frappe.bold(_("Apply Discount on Discounted Rate")), frappe.bold(_("Priority"))) ) def validate_applicable_for_selling_or_buying(self): @@ -445,7 +446,20 @@ def get_pricing_rule_for_item(args, doc=None, for_validate=False): if isinstance(pricing_rule, str): pricing_rule = frappe.get_cached_doc("Pricing Rule", pricing_rule) update_pricing_rule_uom(pricing_rule, args) - pricing_rule.apply_rule_on_other_items = get_pricing_rule_items(pricing_rule) or [] + fetch_other_item = True if pricing_rule.apply_rule_on_other else False + pricing_rule.apply_rule_on_other_items = ( + get_pricing_rule_items(pricing_rule, other_items=fetch_other_item) or [] + ) + + if pricing_rule.coupon_code_based == 1: + if not args.coupon_code: + return item_details + + coupon_code = frappe.db.get_value( + doctype="Coupon Code", filters={"pricing_rule": pricing_rule.name}, fieldname="name" + ) + if args.coupon_code != coupon_code: + continue if pricing_rule.get("suggestion"): continue @@ -472,9 +486,6 @@ def get_pricing_rule_for_item(args, doc=None, for_validate=False): pricing_rule.apply_rule_on_other_items ) - if pricing_rule.coupon_code_based == 1 and args.coupon_code is None: - return item_details - if not pricing_rule.validate_applied_rule: if pricing_rule.price_or_product_discount == "Price": apply_price_discount_rule(pricing_rule, item_details, args) diff --git a/erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py b/erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py index 235fddf3ab3..965e2b267a3 100644 --- a/erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py +++ b/erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py @@ -5,6 +5,7 @@ import unittest import frappe +from frappe.tests.utils import FrappeTestCase, change_settings from erpnext.accounts.doctype.purchase_invoice.test_purchase_invoice import make_purchase_invoice from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice @@ -14,7 +15,7 @@ from erpnext.stock.doctype.item.test_item import make_item from erpnext.stock.get_item_details import get_item_details -class TestPricingRule(unittest.TestCase): +class TestPricingRule(FrappeTestCase): def setUp(self): delete_existing_pricing_rules() setup_pricing_rule_data() @@ -1130,6 +1131,51 @@ class TestPricingRule(unittest.TestCase): self.assertEqual(so.items[1].item_code, "_Test Item") self.assertEqual(so.items[1].qty, 3) + so = make_sales_order(item_code="_Test Item", qty=5, do_not_submit=1) + so.items[0].qty = 1 + del so.items[-1] + so.save() + self.assertEqual(len(so.items), 1) + + def test_pricing_rule_for_product_free_item_round_free_qty(self): + frappe.delete_doc_if_exists("Pricing Rule", "_Test Pricing Rule") + test_record = { + "doctype": "Pricing Rule", + "title": "_Test Pricing Rule", + "apply_on": "Item Code", + "currency": "USD", + "items": [ + { + "item_code": "_Test Item", + } + ], + "selling": 1, + "rate": 0, + "min_qty": 100, + "max_qty": 0, + "price_or_product_discount": "Product", + "same_item": 1, + "free_qty": 10, + "round_free_qty": 1, + "is_recursive": 1, + "recurse_for": 100, + "company": "_Test Company", + } + frappe.get_doc(test_record.copy()).insert() + + # With pricing rule + so = make_sales_order(item_code="_Test Item", qty=100) + so.load_from_db() + self.assertEqual(so.items[1].is_free_item, 1) + self.assertEqual(so.items[1].item_code, "_Test Item") + self.assertEqual(so.items[1].qty, 10) + + so = make_sales_order(item_code="_Test Item", qty=150) + so.load_from_db() + self.assertEqual(so.items[1].is_free_item, 1) + self.assertEqual(so.items[1].item_code, "_Test Item") + self.assertEqual(so.items[1].qty, 10) + def test_apply_multiple_pricing_rules_for_discount_percentage_and_amount(self): frappe.delete_doc_if_exists("Pricing Rule", "_Test Pricing Rule 1") frappe.delete_doc_if_exists("Pricing Rule", "_Test Pricing Rule 2") diff --git a/erpnext/accounts/doctype/pricing_rule/utils.py b/erpnext/accounts/doctype/pricing_rule/utils.py index 9c7911d7cae..551eaa3d1ce 100644 --- a/erpnext/accounts/doctype/pricing_rule/utils.py +++ b/erpnext/accounts/doctype/pricing_rule/utils.py @@ -486,7 +486,7 @@ def get_qty_and_rate_for_other_item(doc, pr_doc, pricing_rules, row_item): continue stock_qty = row.get("qty") * (row.get("conversion_factor") or 1.0) - amount = stock_qty * (row.get("price_list_rate") or row.get("rate")) + amount = stock_qty * (flt(row.get("price_list_rate")) or flt(row.get("rate"))) pricing_rules = filter_pricing_rules_for_qty_amount(stock_qty, amount, pricing_rules, row) if pricing_rules and pricing_rules[0]: @@ -651,11 +651,23 @@ def get_product_discount_rule(pricing_rule, item_details, args=None, doc=None): qty = pricing_rule.free_qty or 1 if pricing_rule.is_recursive: - transaction_qty = (args.get("qty") if args else doc.total_qty) - pricing_rule.apply_recursion_over - if transaction_qty: + transaction_qty = sum( + [ + row.qty + for row in doc.items + if not row.is_free_item + and row.item_code == args.item_code + and row.pricing_rules == args.pricing_rules + ] + ) + transaction_qty = transaction_qty - pricing_rule.apply_recursion_over + if transaction_qty and transaction_qty > 0: qty = flt(transaction_qty) * qty / pricing_rule.recurse_for if pricing_rule.round_free_qty: - qty = math.floor(qty) + qty = (flt(transaction_qty) // pricing_rule.recurse_for) * (pricing_rule.free_qty or 1) + + if not qty: + return free_item_data_args = { "item_code": free_item, @@ -725,14 +737,11 @@ def get_pricing_rule_items(pr_doc, other_items=False) -> list: def validate_coupon_code(coupon_name): coupon = frappe.get_doc("Coupon Code", coupon_name) - - if coupon.valid_from: - if coupon.valid_from > getdate(today()): - frappe.throw(_("Sorry, this coupon code's validity has not started")) - elif coupon.valid_upto: - if coupon.valid_upto < getdate(today()): - frappe.throw(_("Sorry, this coupon code's validity has expired")) - elif coupon.used >= coupon.maximum_use: + if coupon.valid_from and coupon.valid_from > getdate(today()): + frappe.throw(_("Sorry, this coupon code's validity has not started")) + elif coupon.valid_upto and coupon.valid_upto < getdate(today()): + frappe.throw(_("Sorry, this coupon code's validity has expired")) + elif coupon.maximum_use and coupon.used >= coupon.maximum_use: frappe.throw(_("Sorry, this coupon code is no longer valid")) diff --git a/erpnext/accounts/doctype/process_payment_reconciliation/process_payment_reconciliation.js b/erpnext/accounts/doctype/process_payment_reconciliation/process_payment_reconciliation.js index 0f52a4d998e..d72c4724690 100644 --- a/erpnext/accounts/doctype/process_payment_reconciliation/process_payment_reconciliation.js +++ b/erpnext/accounts/doctype/process_payment_reconciliation/process_payment_reconciliation.js @@ -20,6 +20,17 @@ frappe.ui.form.on("Process Payment Reconciliation", { }, }; }); + + frm.set_query("default_advance_account", function (doc) { + return { + filters: { + company: doc.company, + is_group: 0, + account_type: doc.party_type == "Customer" ? "Receivable" : "Payable", + root_type: doc.party_type == "Customer" ? "Liability" : "Asset", + }, + }; + }); frm.set_query("cost_center", function (doc) { return { filters: { @@ -102,6 +113,7 @@ frappe.ui.form.on("Process Payment Reconciliation", { company(frm) { frm.set_value("party", ""); frm.set_value("receivable_payable_account", ""); + frm.set_value("default_advance_account", ""); }, party_type(frm) { frm.set_value("party", ""); @@ -109,6 +121,7 @@ frappe.ui.form.on("Process Payment Reconciliation", { party(frm) { frm.set_value("receivable_payable_account", ""); + frm.set_value("default_advance_account", ""); if (!frm.doc.receivable_payable_account && frm.doc.party_type && frm.doc.party) { return frappe.call({ method: "erpnext.accounts.party.get_party_account", @@ -116,10 +129,16 @@ frappe.ui.form.on("Process Payment Reconciliation", { company: frm.doc.company, party_type: frm.doc.party_type, party: frm.doc.party, + include_advance: 1, }, callback: (r) => { if (!r.exc && r.message) { - frm.set_value("receivable_payable_account", r.message); + if (typeof r.message === "string") { + frm.set_value("receivable_payable_account", r.message); + } else if (Array.isArray(r.message)) { + frm.set_value("receivable_payable_account", r.message[0]); + frm.set_value("default_advance_account", r.message[1]); + } } frm.refresh(); }, diff --git a/erpnext/accounts/doctype/process_payment_reconciliation/process_payment_reconciliation.json b/erpnext/accounts/doctype/process_payment_reconciliation/process_payment_reconciliation.json index 1a1ab4d800e..0511571d754 100644 --- a/erpnext/accounts/doctype/process_payment_reconciliation/process_payment_reconciliation.json +++ b/erpnext/accounts/doctype/process_payment_reconciliation/process_payment_reconciliation.json @@ -13,6 +13,7 @@ "column_break_io6c", "party", "receivable_payable_account", + "default_advance_account", "filter_section", "from_invoice_date", "to_invoice_date", @@ -141,12 +142,23 @@ { "fieldname": "section_break_a8yx", "fieldtype": "Section Break" + }, + { + "depends_on": "eval:doc.party", + "description": "Only 'Payment Entries' made against this advance account are supported.", + "documentation_url": "https://docs.erpnext.com/docs/user/manual/en/advance-in-separate-party-account", + "fieldname": "default_advance_account", + "fieldtype": "Link", + "label": "Default Advance Account", + "mandatory_depends_on": "doc.party_type", + "options": "Account", + "reqd": 1 } ], "index_web_pages_for_search": 1, "is_submittable": 1, "links": [], - "modified": "2023-08-11 10:56:51.699137", + "modified": "2024-08-27 14:48:56.715320", "modified_by": "Administrator", "module": "Accounts", "name": "Process Payment Reconciliation", @@ -180,4 +192,4 @@ "sort_order": "DESC", "states": [], "title_field": "company" -} \ No newline at end of file +} diff --git a/erpnext/accounts/doctype/process_payment_reconciliation/process_payment_reconciliation.py b/erpnext/accounts/doctype/process_payment_reconciliation/process_payment_reconciliation.py index 5048fc5e25e..882a2c4ad1c 100644 --- a/erpnext/accounts/doctype/process_payment_reconciliation/process_payment_reconciliation.py +++ b/erpnext/accounts/doctype/process_payment_reconciliation/process_payment_reconciliation.py @@ -23,6 +23,7 @@ class ProcessPaymentReconciliation(Document): bank_cash_account: DF.Link | None company: DF.Link cost_center: DF.Link | None + default_advance_account: DF.Link error_log: DF.LongText | None from_invoice_date: DF.Date | None from_payment_date: DF.Date | None @@ -101,6 +102,7 @@ def get_pr_instance(doc: str): "party_type", "party", "receivable_payable_account", + "default_advance_account", "from_invoice_date", "to_invoice_date", "from_payment_date", diff --git a/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.json b/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.json index 22be5299280..763607c22a1 100644 --- a/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.json +++ b/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.json @@ -25,6 +25,7 @@ "payment_terms_template", "sales_partner", "sales_person", + "show_remarks", "based_on_payment_terms", "section_break_3", "customer_collection", @@ -390,10 +391,16 @@ "fieldname": "ignore_cr_dr_notes", "fieldtype": "Check", "label": "Ignore System Generated Credit / Debit Notes" + }, + { + "default": "0", + "fieldname": "show_remarks", + "fieldtype": "Check", + "label": "Show Remarks" } ], "links": [], - "modified": "2024-08-13 10:41:18.381165", + "modified": "2024-10-18 17:51:39.108481", "modified_by": "Administrator", "module": "Accounts", "name": "Process Statement Of Accounts", diff --git a/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.py b/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.py index 509199ccae6..bf1c8c0b66e 100644 --- a/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.py +++ b/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.py @@ -70,6 +70,7 @@ class ProcessStatementOfAccounts(Document): sales_person: DF.Link | None sender: DF.Link | None show_net_values_in_party_account: DF.Check + show_remarks: DF.Check start_date: DF.Date | None subject: DF.Data | None terms_and_conditions: DF.Link | None @@ -187,6 +188,7 @@ def get_common_filters(doc): "finance_book": doc.finance_book if doc.finance_book else None, "account": [doc.account] if doc.account else None, "cost_center": [cc.cost_center_name for cc in doc.cost_center], + "show_remarks": doc.show_remarks, } ) @@ -472,6 +474,7 @@ def send_emails(document_name, from_scheduler=False, posting_date=None): reference_doctype="Process Statement Of Accounts", reference_name=document_name, attachments=attachments, + expose_recipients="header", ) if doc.enable_auto_email and from_scheduler: diff --git a/erpnext/accounts/doctype/promotional_scheme/promotional_scheme.py b/erpnext/accounts/doctype/promotional_scheme/promotional_scheme.py index 86bd2135515..4cc87394b4f 100644 --- a/erpnext/accounts/doctype/promotional_scheme/promotional_scheme.py +++ b/erpnext/accounts/doctype/promotional_scheme/promotional_scheme.py @@ -5,6 +5,8 @@ import frappe from frappe import _ from frappe.model.document import Document +from frappe.query_builder import Criterion +from frappe.query_builder.functions import IfNull pricing_rule_fields = [ "apply_on", @@ -162,22 +164,50 @@ class PromotionalScheme(Document): if self.is_new(): return - transaction_exists = False - docnames = [] + invalid_pricing_rule = self.get_invalid_pricing_rules() - # If user has changed applicable for - if self.get_doc_before_save() and self.get_doc_before_save().applicable_for == self.applicable_for: + if not invalid_pricing_rule: return - docnames = frappe.get_all("Pricing Rule", filters={"promotional_scheme": self.name}) + if frappe.db.exists( + "Pricing Rule Detail", + { + "pricing_rule": ["in", invalid_pricing_rule], + "docstatus": ["<", 2], + }, + ): + raise_for_transaction_exists(self.name) - for docname in docnames: - if frappe.db.exists("Pricing Rule Detail", {"pricing_rule": docname.name, "docstatus": ("<", 2)}): - raise_for_transaction_exists(self.name) + for doc in invalid_pricing_rule: + frappe.delete_doc("Pricing Rule", doc) - if docnames and not transaction_exists: - for docname in docnames: - frappe.delete_doc("Pricing Rule", docname.name) + frappe.msgprint( + _("The following invalid Pricing Rules are deleted:") + + "

  • " + + "
  • ".join(invalid_pricing_rule) + + "
" + ) + + def get_invalid_pricing_rules(self): + pr = frappe.qb.DocType("Pricing Rule") + conditions = [] + conditions.append(pr.promotional_scheme == self.name) + + if self.applicable_for: + applicable_for = frappe.scrub(self.applicable_for) + applicable_for_list = [d.get(applicable_for) for d in self.get(applicable_for)] + + conditions.append( + (IfNull(pr.applicable_for, "") != self.applicable_for) + | ( + (IfNull(pr.applicable_for, "") == self.applicable_for) + & IfNull(pr[applicable_for], "").notin(applicable_for_list) + ) + ) + else: + conditions.append(IfNull(pr.applicable_for, "") != "") + + return frappe.qb.from_(pr).select(pr.name).where(Criterion.all(conditions)).run(pluck=True) def on_update(self): self.validate() diff --git a/erpnext/accounts/doctype/promotional_scheme/test_promotional_scheme.py b/erpnext/accounts/doctype/promotional_scheme/test_promotional_scheme.py index 74ba6cf923c..a4ea81f0d9f 100644 --- a/erpnext/accounts/doctype/promotional_scheme/test_promotional_scheme.py +++ b/erpnext/accounts/doctype/promotional_scheme/test_promotional_scheme.py @@ -90,6 +90,31 @@ class TestPromotionalScheme(unittest.TestCase): price_rules = frappe.get_all("Pricing Rule", filters={"promotional_scheme": ps.name}) self.assertEqual(price_rules, []) + def test_change_applicable_for_values_in_promotional_scheme(self): + ps = make_promotional_scheme(applicable_for="Customer", customer="_Test Customer") + ps.append("customer", {"customer": "_Test Customer 2"}) + ps.save() + + price_rules = frappe.get_all( + "Pricing Rule", filters={"promotional_scheme": ps.name, "applicable_for": "Customer"} + ) + self.assertTrue(len(price_rules), 2) + + ps.set("customer", []) + ps.append("customer", {"customer": "_Test Customer 2"}) + ps.save() + + price_rules = frappe.get_all( + "Pricing Rule", + filters={ + "promotional_scheme": ps.name, + "applicable_for": "Customer", + "customer": "_Test Customer", + }, + ) + self.assertEqual(price_rules, []) + frappe.delete_doc("Promotional Scheme", ps.name) + def test_min_max_amount_configuration(self): ps = make_promotional_scheme() ps.price_discount_slabs[0].min_amount = 10 diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js index 9c8c8cdfb03..be429689b5a 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js @@ -31,6 +31,13 @@ erpnext.accounts.PurchaseInvoice = class PurchaseInvoice extends erpnext.buying. }, }; }); + + this.frm.set_query("expense_account", "items", function () { + return { + query: "erpnext.controllers.queries.get_expense_account", + filters: { company: doc.company }, + }; + }); } onload() { @@ -335,7 +342,9 @@ erpnext.accounts.PurchaseInvoice = class PurchaseInvoice extends erpnext.buying. party_type: "Supplier", account: this.frm.doc.credit_to, price_list: this.frm.doc.buying_price_list, - fetch_payment_terms_template: cint(!this.frm.doc.ignore_default_payment_terms_template), + fetch_payment_terms_template: cint( + (this.frm.doc.is_return == 0) & !this.frm.doc.ignore_default_payment_terms_template + ), }, function () { me.apply_pricing_rule(); @@ -506,13 +515,6 @@ cur_frm.fields_dict["select_print_heading"].get_query = function (doc, cdt, cdn) }; }; -cur_frm.set_query("expense_account", "items", function (doc) { - return { - query: "erpnext.controllers.queries.get_expense_account", - filters: { company: doc.company }, - }; -}); - cur_frm.set_query("wip_composite_asset", "items", function () { return { filters: { is_composite_asset: 1, docstatus: 0 }, @@ -561,11 +563,12 @@ frappe.ui.form.on("Purchase Invoice", { frm.custom_make_buttons = { "Purchase Invoice": "Return / Debit Note", "Payment Entry": "Payment", - "Landed Cost Voucher": function () { - frm.trigger("create_landed_cost_voucher"); - }, }; + if (frm.doc.update_stock) { + frm.custom_make_buttons["Landed Cost Voucher"] = "Landed Cost Voucher"; + } + frm.set_query("additional_discount_account", function () { return { filters: { @@ -607,20 +610,6 @@ frappe.ui.form.on("Purchase Invoice", { }); }, - create_landed_cost_voucher: function (frm) { - let lcv = frappe.model.get_new_doc("Landed Cost Voucher"); - lcv.company = frm.doc.company; - - let lcv_receipt = frappe.model.get_new_doc("Landed Cost Purchase Invoice"); - lcv_receipt.receipt_document_type = "Purchase Invoice"; - lcv_receipt.receipt_document = frm.doc.name; - lcv_receipt.supplier = frm.doc.supplier; - lcv_receipt.grand_total = frm.doc.grand_total; - lcv.purchase_receipts = [lcv_receipt]; - - frappe.set_route("Form", lcv.doctype, lcv.name); - }, - add_custom_buttons: function (frm) { if (frm.doc.docstatus == 1 && frm.doc.per_received < 100) { frm.add_custom_button( @@ -645,14 +634,40 @@ frappe.ui.form.on("Purchase Invoice", { __("View") ); } + + if (frm.doc.docstatus === 1 && frm.doc.update_stock) { + frm.add_custom_button( + __("Landed Cost Voucher"), + () => { + frm.events.make_lcv(frm); + }, + __("Create") + ); + } + }, + + make_lcv(frm) { + frappe.call({ + method: "erpnext.stock.doctype.purchase_receipt.purchase_receipt.make_lcv", + args: { + doctype: frm.doc.doctype, + docname: frm.doc.name, + }, + callback: (r) => { + if (r.message) { + var doc = frappe.model.sync(r.message); + frappe.set_route("Form", doc[0].doctype, doc[0].name); + } + }, + }); }, onload: function (frm) { - if (frm.doc.__onload && frm.is_new()) { - if (frm.doc.supplier) { + if (frm.doc.__onload && frm.doc.supplier) { + if (frm.is_new()) { frm.doc.apply_tds = frm.doc.__onload.supplier_tds ? 1 : 0; } - if (!frm.doc.__onload.enable_apply_tds) { + if (!frm.doc.__onload.supplier_tds) { frm.set_df_property("apply_tds", "read_only", 1); } } diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json index 3751c027c97..6b21ec5b678 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json @@ -1134,12 +1134,14 @@ "label": "Payment Terms" }, { + "depends_on": "eval:(!doc.is_paid && !doc.is_return)", "fieldname": "payment_terms_template", "fieldtype": "Link", "label": "Payment Terms Template", "options": "Payment Terms Template" }, { + "depends_on": "eval:(!doc.is_paid && !doc.is_return)", "fieldname": "payment_schedule", "fieldtype": "Table", "label": "Payment Schedule", @@ -1271,6 +1273,7 @@ "fieldtype": "Select", "in_standard_filter": 1, "label": "Status", + "no_copy": 1, "options": "\nDraft\nReturn\nDebit Note Issued\nSubmitted\nPaid\nPartly Paid\nUnpaid\nOverdue\nCancelled\nInternal Transfer", "print_hide": 1 }, @@ -1630,7 +1633,7 @@ "idx": 204, "is_submittable": 1, "links": [], - "modified": "2024-07-25 19:42:36.931278", + "modified": "2024-10-25 18:13:01.944477", "modified_by": "Administrator", "module": "Accounts", "name": "Purchase Invoice", diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index c33b2c0ff17..ebc4efc08a0 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -285,7 +285,6 @@ class PurchaseInvoice(BuyingController): self.set_against_expense_account() self.validate_write_off_account() self.validate_multiple_billing("Purchase Receipt", "pr_detail", "amount") - self.create_remarks() self.set_status() self.validate_purchase_receipt_if_update_stock() validate_inter_company_party( @@ -322,10 +321,11 @@ class PurchaseInvoice(BuyingController): def create_remarks(self): if not self.remarks: - if self.bill_no and self.bill_date: - self.remarks = _("Against Supplier Invoice {0} dated {1}").format( - self.bill_no, formatdate(self.bill_date) - ) + if self.bill_no: + self.remarks = _("Against Supplier Invoice {0}").format(self.bill_no) + if self.bill_date: + self.remarks += " " + _("dated {0}").format(formatdate(self.bill_date)) + else: self.remarks = _("No Remarks") @@ -346,22 +346,6 @@ class PurchaseInvoice(BuyingController): self.tax_withholding_category = tds_category self.set_onload("supplier_tds", tds_category) - # If Linked Purchase Order has TDS applied, enable 'apply_tds' checkbox - if purchase_orders := [x.purchase_order for x in self.items if x.purchase_order]: - po = qb.DocType("Purchase Order") - po_with_tds = ( - qb.from_(po) - .select(po.name) - .where( - po.docstatus.eq(1) - & (po.name.isin(purchase_orders)) - & (po.apply_tds.eq(1)) - & (po.tax_withholding_category.notnull()) - ) - .run() - ) - self.set_onload("enable_apply_tds", True if po_with_tds else False) - super().set_missing_values(for_validate) def validate_credit_to_acc(self): @@ -377,16 +361,16 @@ class PurchaseInvoice(BuyingController): if account.report_type != "Balance Sheet": frappe.throw( _( - "Please ensure {} account is a Balance Sheet account. You can change the parent account to a Balance Sheet account or select a different account." - ).format(frappe.bold("Credit To")), + "Please ensure that the {0} account is a Balance Sheet account. You can change the parent account to a Balance Sheet account or select a different account." + ).format(frappe.bold(_("Credit To"))), title=_("Invalid Account"), ) if self.supplier and account.account_type != "Payable": frappe.throw( _( - "Please ensure {} account {} is a Payable account. Change the account type to Payable or select a different account." - ).format(frappe.bold("Credit To"), frappe.bold(self.credit_to)), + "Please ensure that the {0} account {1} is a Payable account. You can change the account type to Payable or select a different account." + ).format(frappe.bold(_("Credit To")), frappe.bold(self.credit_to)), title=_("Invalid Account"), ) @@ -634,7 +618,7 @@ class PurchaseInvoice(BuyingController): "To submit the invoice without purchase order please set {0} as {1} in {2}" ).format( frappe.bold(_("Purchase Order Required")), - frappe.bold("No"), + frappe.bold(_("No")), get_link_to_form("Buying Settings", "Buying Settings", "Buying Settings"), ) throw(msg, title=_("Mandatory Purchase Order")) @@ -655,7 +639,7 @@ class PurchaseInvoice(BuyingController): "To submit the invoice without purchase receipt please set {0} as {1} in {2}" ).format( frappe.bold(_("Purchase Receipt Required")), - frappe.bold("No"), + frappe.bold(_("No")), get_link_to_form("Buying Settings", "Buying Settings", "Buying Settings"), ) throw(msg, title=_("Mandatory Purchase Receipt")) @@ -747,6 +731,9 @@ class PurchaseInvoice(BuyingController): validate_docs_for_voucher_types(["Purchase Invoice"]) validate_docs_for_deferred_accounting([], [self.name]) + def before_submit(self): + self.create_remarks() + def on_submit(self): super().on_submit() @@ -876,6 +863,7 @@ class PurchaseInvoice(BuyingController): self.make_tax_gl_entries(gl_entries) self.make_internal_transfer_gl_entries(gl_entries) + self.make_gl_entries_for_tax_withholding(gl_entries) gl_entries = make_regional_gl_entries(gl_entries, self) @@ -909,32 +897,37 @@ class PurchaseInvoice(BuyingController): ) if grand_total and not self.is_internal_transfer(): - against_voucher = self.name - if self.is_return and self.return_against and not self.update_outstanding_for_self: - against_voucher = self.return_against + self.add_supplier_gl_entry(gl_entries, base_grand_total, grand_total) - # Did not use base_grand_total to book rounding loss gle - gl_entries.append( - self.get_gl_dict( - { - "account": self.credit_to, - "party_type": "Supplier", - "party": self.supplier, - "due_date": self.due_date, - "against": self.against_expense_account, - "credit": base_grand_total, - "credit_in_account_currency": base_grand_total - if self.party_account_currency == self.company_currency - else grand_total, - "against_voucher": against_voucher, - "against_voucher_type": self.doctype, - "project": self.project, - "cost_center": self.cost_center, - }, - self.party_account_currency, - item=self, - ) - ) + def add_supplier_gl_entry( + self, gl_entries, base_grand_total, grand_total, against_account=None, remarks=None, skip_merge=False + ): + against_voucher = self.name + if self.is_return and self.return_against and not self.update_outstanding_for_self: + against_voucher = self.return_against + + # Did not use base_grand_total to book rounding loss gle + gl = { + "account": self.credit_to, + "party_type": "Supplier", + "party": self.supplier, + "due_date": self.due_date, + "against": against_account or self.against_expense_account, + "credit": base_grand_total, + "credit_in_account_currency": base_grand_total + if self.party_account_currency == self.company_currency + else grand_total, + "against_voucher": against_voucher, + "against_voucher_type": self.doctype, + "project": self.project, + "cost_center": self.cost_center, + "_skip_merge": skip_merge, + } + + if remarks: + gl["remarks"] = remarks + + gl_entries.append(self.get_gl_dict(gl, self.party_account_currency, item=self)) def make_item_gl_entries(self, gl_entries): # item gl entries @@ -1262,7 +1255,11 @@ class PurchaseInvoice(BuyingController): def update_gross_purchase_amount_for_linked_assets(self, item): assets = frappe.db.get_all( "Asset", - filters={"purchase_invoice": self.name, "item_code": item.item_code}, + filters={ + "purchase_invoice": self.name, + "item_code": item.item_code, + "purchase_invoice_item": ("in", [item.name, ""]), + }, fields=["name", "asset_quantity"], ) for asset in assets: @@ -1422,6 +1419,31 @@ class PurchaseInvoice(BuyingController): ) ) + def make_gl_entries_for_tax_withholding(self, gl_entries): + """ + Tax withholding amount is not part of supplier invoice. + Separate supplier GL Entry for correct reporting. + """ + if not self.apply_tds: + return + + for row in self.get("taxes"): + if not row.is_tax_withholding_account or not row.tax_amount: + continue + + base_tds_amount = row.base_tax_amount_after_discount_amount + tds_amount = row.tax_amount_after_discount_amount + + self.add_supplier_gl_entry(gl_entries, base_tds_amount, tds_amount) + self.add_supplier_gl_entry( + gl_entries, + -base_tds_amount, + -tds_amount, + against_account=row.account_head, + remarks=_("TDS Deducted"), + skip_merge=True, + ) + def make_payment_gl_entries(self, gl_entries): # Make Cash GL Entries if cint(self.is_paid) and self.cash_bank_account and self.paid_amount: @@ -1515,10 +1537,29 @@ class PurchaseInvoice(BuyingController): # eg: rounding_adjustment = 0.01 and exchange rate = 0.05 and precision of base_rounding_adjustment is 2 # then base_rounding_adjustment becomes zero and error is thrown in GL Entry if not self.is_internal_transfer() and self.rounding_adjustment and self.base_rounding_adjustment: - round_off_account, round_off_cost_center = get_round_off_account_and_cost_center( + ( + round_off_account, + round_off_cost_center, + round_off_for_opening, + ) = get_round_off_account_and_cost_center( self.company, "Purchase Invoice", self.name, self.use_company_roundoff_cost_center ) + if self.is_opening == "Yes" and self.rounding_adjustment: + if not round_off_for_opening: + frappe.throw( + _( + "Opening Invoice has rounding adjustment of {0}.

'{1}' account is required to post these values. Please set it in Company: {2}.

Or, '{3}' can be enabled to not post any rounding adjustment." + ).format( + frappe.bold(self.rounding_adjustment), + frappe.bold("Round Off for Opening"), + get_link_to_form("Company", self.company), + frappe.bold("Disable Rounded Total"), + ) + ) + else: + round_off_account = round_off_for_opening + gl_entries.append( self.get_gl_dict( { @@ -1602,7 +1643,11 @@ class PurchaseInvoice(BuyingController): for proj, value in projects.items(): res = frappe.qb.from_(pj).select(pj.total_purchase_cost).where(pj.name == proj).for_update().run() current_purchase_cost = res and res[0][0] or 0 - frappe.db.set_value("Project", proj, "total_purchase_cost", current_purchase_cost + value) + # frappe.db.set_value("Project", proj, "total_purchase_cost", current_purchase_cost + value) + project_doc = frappe.get_doc("Project", proj) + project_doc.total_purchase_cost = current_purchase_cost + value + project_doc.calculate_gross_margin() + project_doc.db_update() def validate_supplier_invoice(self): if self.bill_date: diff --git a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py index eb7c486f2e1..e353435661c 100644 --- a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py @@ -1544,6 +1544,61 @@ class TestPurchaseInvoice(FrappeTestCase, StockTestMixin): payment_entry.load_from_db() self.assertEqual(payment_entry.taxes[0].allocated_amount, 0) + def test_purchase_gl_with_tax_withholding_tax(self): + company = "_Test Company" + + tds_account_args = { + "doctype": "Account", + "account_name": "TDS Payable", + "account_type": "Tax", + "parent_account": frappe.db.get_value( + "Account", {"account_name": "Duties and Taxes", "company": company} + ), + "company": company, + } + + tds_account = create_account(**tds_account_args) + tax_withholding_category = "Test TDS - 194 - Dividends - Individual" + + # Update tax withholding category with current fiscal year and rate details + create_tax_witholding_category(tax_withholding_category, company, tds_account) + + # create a new supplier to test + supplier = create_supplier( + supplier_name="_Test TDS Advance Supplier", + tax_withholding_category=tax_withholding_category, + ) + + pi = make_purchase_invoice( + supplier=supplier.name, + rate=3000, + qty=1, + item="_Test Non Stock Item", + do_not_submit=1, + ) + pi.apply_tds = 1 + pi.tax_withholding_category = tax_withholding_category + pi.save() + pi.submit() + + self.assertEqual(pi.taxes[0].tax_amount, 300) + self.assertEqual(pi.taxes[0].account_head, tds_account) + + gl_entries = frappe.get_all( + "GL Entry", + filters={"voucher_no": pi.name, "voucher_type": "Purchase Invoice", "account": "Creditors - _TC"}, + fields=["account", "against", "debit", "credit"], + ) + + for gle in gl_entries: + if gle.debit: + # GL Entry with TDS Amount + self.assertEqual(gle.against, tds_account) + self.assertEqual(gle.debit, 300) + else: + # GL Entry with Purchase Invoice Amount + self.assertEqual(gle.credit, 3000) + def test_provisional_accounting_entry(self): setup_provisional_accounting() @@ -1680,6 +1735,30 @@ class TestPurchaseInvoice(FrappeTestCase, StockTestMixin): frappe.db.set_single_value("Buying Settings", "set_landed_cost_based_on_purchase_invoice_rate", 1) + # Cost of Item is zero in Purchase Receipt + pr = make_purchase_receipt(qty=1, rate=0) + + stock_value_difference = frappe.db.get_value( + "Stock Ledger Entry", + {"voucher_type": "Purchase Receipt", "voucher_no": pr.name}, + "stock_value_difference", + ) + self.assertEqual(stock_value_difference, 0) + + pi = create_purchase_invoice_from_receipt(pr.name) + for row in pi.items: + row.rate = 150 + + pi.save() + pi.submit() + + stock_value_difference = frappe.db.get_value( + "Stock Ledger Entry", + {"voucher_type": "Purchase Receipt", "voucher_no": pr.name}, + "stock_value_difference", + ) + self.assertEqual(stock_value_difference, 150) + # Increase the cost of the item pr = make_purchase_receipt(qty=1, rate=100) @@ -2236,6 +2315,139 @@ class TestPurchaseInvoice(FrappeTestCase, StockTestMixin): self.assertEqual(pi_expected_values[i][1], gle.debit) self.assertEqual(pi_expected_values[i][2], gle.credit) + def test_adjust_incoming_rate_from_pi_with_multi_currency(self): + from erpnext.stock.doctype.landed_cost_voucher.test_landed_cost_voucher import ( + make_landed_cost_voucher, + ) + + frappe.db.set_single_value("Buying Settings", "maintain_same_rate", 0) + + frappe.db.set_single_value("Buying Settings", "set_landed_cost_based_on_purchase_invoice_rate", 1) + + # Increase the cost of the item + + pr = make_purchase_receipt( + qty=10, rate=1, currency="USD", do_not_save=1, supplier="_Test Supplier USD" + ) + pr.conversion_rate = 6300 + pr.plc_conversion_rate = 1 + pr.save() + pr.submit() + + self.assertEqual(pr.conversion_rate, 6300) + self.assertEqual(pr.plc_conversion_rate, 1) + self.assertEqual(pr.base_grand_total, 6300 * 10) + + stock_value_difference = frappe.db.get_value( + "Stock Ledger Entry", + {"voucher_type": "Purchase Receipt", "voucher_no": pr.name}, + "stock_value_difference", + ) + self.assertEqual(stock_value_difference, 6300 * 10) + + make_landed_cost_voucher( + company=pr.company, + receipt_document_type="Purchase Receipt", + receipt_document=pr.name, + charges=3000, + distribute_charges_based_on="Qty", + ) + + pi = create_purchase_invoice_from_receipt(pr.name) + for row in pi.items: + row.rate = 1.1 + + pi.save() + pi.submit() + + stock_value_difference = frappe.db.get_value( + "Stock Ledger Entry", + {"voucher_type": "Purchase Receipt", "voucher_no": pr.name}, + "stock_value_difference", + ) + self.assertEqual(stock_value_difference, 7230 * 10) + + frappe.db.set_single_value("Buying Settings", "set_landed_cost_based_on_purchase_invoice_rate", 0) + + frappe.db.set_single_value("Buying Settings", "maintain_same_rate", 1) + + def test_last_purchase_rate(self): + item = create_item("_Test Item For Last Purchase Rate from PI", is_stock_item=1) + pi1 = make_purchase_invoice(item_code=item.item_code, qty=10, rate=100) + item.reload() + self.assertEqual(item.last_purchase_rate, 100) + + pi2 = make_purchase_invoice(item_code=item.item_code, qty=10, rate=200) + item.reload() + self.assertEqual(item.last_purchase_rate, 200) + + pi2.cancel() + item.reload() + self.assertEqual(item.last_purchase_rate, 100) + + pi1.cancel() + item.reload() + self.assertEqual(item.last_purchase_rate, 0) + + def test_opening_invoice_rounding_adjustment_validation(self): + pi = make_purchase_invoice(do_not_save=1) + pi.items[0].rate = 99.98 + pi.items[0].qty = 1 + pi.items[0].expense_account = "Temporary Opening - _TC" + pi.is_opening = "Yes" + pi.save() + self.assertRaises(frappe.ValidationError, pi.submit) + + def _create_opening_roundoff_account(self, company_name): + liability_root = frappe.db.get_all( + "Account", + filters={"company": company_name, "root_type": "Liability", "disabled": 0}, + order_by="lft", + limit=1, + )[0] + + # setup round off account + if acc := frappe.db.exists( + "Account", + { + "account_name": "Round Off for Opening", + "account_type": "Round Off for Opening", + "company": company_name, + }, + ): + frappe.db.set_value("Company", company_name, "round_off_for_opening", acc) + else: + acc = frappe.new_doc("Account") + acc.company = company_name + acc.parent_account = liability_root.name + acc.account_name = "Round Off for Opening" + acc.account_type = "Round Off for Opening" + acc.save() + frappe.db.set_value("Company", company_name, "round_off_for_opening", acc.name) + + def test_ledger_entries_of_opening_invoice_with_rounding_adjustment(self): + pi = make_purchase_invoice(do_not_save=1) + pi.items[0].rate = 99.98 + pi.items[0].qty = 1 + pi.items[0].expense_account = "Temporary Opening - _TC" + pi.is_opening = "Yes" + pi.save() + self._create_opening_roundoff_account(pi.company) + pi.submit() + actual = frappe.db.get_all( + "GL Entry", + filters={"voucher_no": pi.name, "is_opening": "Yes", "is_cancelled": False}, + fields=["account", "debit", "credit", "is_opening"], + order_by="account,debit", + ) + expected = [ + {"account": "Creditors - _TC", "debit": 0.0, "credit": 100.0, "is_opening": "Yes"}, + {"account": "Round Off for Opening - _TC", "debit": 0.02, "credit": 0.0, "is_opening": "Yes"}, + {"account": "Temporary Opening - _TC", "debit": 99.98, "credit": 0.0, "is_opening": "Yes"}, + ] + self.assertEqual(len(actual), 3) + self.assertEqual(expected, actual) + def set_advance_flag(company, flag, default_account): frappe.db.set_value( diff --git a/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json b/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json index 8a2ba36cf62..258cc10d4ec 100644 --- a/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json +++ b/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json @@ -505,7 +505,8 @@ "fieldtype": "Link", "label": "Project", "options": "Project", - "print_hide": 1 + "print_hide": 1, + "search_index": 1 }, { "allow_on_submit": 1, @@ -974,7 +975,7 @@ "idx": 1, "istable": 1, "links": [], - "modified": "2024-07-19 12:12:42.449298", + "modified": "2024-10-28 15:06:19.246141", "modified_by": "Administrator", "module": "Accounts", "name": "Purchase Invoice Item", diff --git a/erpnext/accounts/doctype/repost_accounting_ledger/repost_accounting_ledger.py b/erpnext/accounts/doctype/repost_accounting_ledger/repost_accounting_ledger.py index 8c8ba633df0..0bd9a2a0515 100644 --- a/erpnext/accounts/doctype/repost_accounting_ledger/repost_accounting_ledger.py +++ b/erpnext/accounts/doctype/repost_accounting_ledger/repost_accounting_ledger.py @@ -45,9 +45,9 @@ class RepostAccountingLedger(Document): latest_pcv = ( frappe.db.get_all( "Period Closing Voucher", - filters={"company": self.company}, - order_by="posting_date desc", - pluck="posting_date", + filters={"company": self.company, "docstatus": 1}, + order_by="period_end_date desc", + pluck="period_end_date", limit=1, ) or None diff --git a/erpnext/accounts/doctype/repost_accounting_ledger/test_repost_accounting_ledger.py b/erpnext/accounts/doctype/repost_accounting_ledger/test_repost_accounting_ledger.py index f631ef437d6..9f906bb7647 100644 --- a/erpnext/accounts/doctype/repost_accounting_ledger/test_repost_accounting_ledger.py +++ b/erpnext/accounts/doctype/repost_accounting_ledger/test_repost_accounting_ledger.py @@ -129,13 +129,15 @@ class TestRepostAccountingLedger(AccountsTestMixin, FrappeTestCase): cost_center=self.cost_center, rate=100, ) + fy = get_fiscal_year(today(), company=self.company) pcv = frappe.get_doc( { "doctype": "Period Closing Voucher", "transaction_date": today(), - "posting_date": today(), + "period_start_date": fy[1], + "period_end_date": today(), "company": self.company, - "fiscal_year": get_fiscal_year(today(), company=self.company)[0], + "fiscal_year": fy[0], "cost_center": self.cost_center, "closing_account_head": self.retained_earnings, "remarks": "test", diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js index 87b71cd793f..75c71ef6eb3 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js @@ -339,6 +339,9 @@ erpnext.accounts.SalesInvoiceController = class SalesInvoiceController extends ( account: this.frm.doc.debit_to, price_list: this.frm.doc.selling_price_list, pos_profile: pos_profile, + fetch_payment_terms_template: cint( + (this.frm.doc.is_return == 0) & !this.frm.doc.ignore_default_payment_terms_template + ), }, function () { me.apply_pricing_rule(); @@ -738,20 +741,6 @@ frappe.ui.form.on("Sales Invoice", { }; }; - frm.set_query("company_address", function (doc) { - if (!doc.company) { - frappe.throw(__("Please set Company")); - } - - return { - query: "frappe.contacts.doctype.address.address.address_query", - filters: { - link_doctype: "Company", - link_name: doc.company, - }, - }; - }); - frm.set_query("pos_profile", function (doc) { if (!doc.company) { frappe.throw(__("Please set Company")); diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json index c44afd555e0..cb861e68cdc 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json @@ -159,8 +159,9 @@ "dispatch_address", "company_address_section", "company_address", - "company_addr_col_break", "company_address_display", + "company_addr_col_break", + "company_contact_person", "terms_tab", "payment_schedule_section", "ignore_default_payment_terms_template", @@ -2166,6 +2167,13 @@ "label": "Update Outstanding for Self", "no_copy": 1, "print_hide": 1 + }, + { + "fieldname": "company_contact_person", + "fieldtype": "Link", + "label": "Company Contact Person", + "options": "Contact", + "print_hide": 1 } ], "icon": "fa fa-file-text", @@ -2178,7 +2186,7 @@ "link_fieldname": "consolidated_invoice" } ], - "modified": "2024-07-18 15:30:39.428519", + "modified": "2024-11-26 12:34:09.110690", "modified_by": "Administrator", "module": "Accounts", "name": "Sales Invoice", @@ -2233,4 +2241,4 @@ "title_field": "title", "track_changes": 1, "track_seen": 1 -} +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 5d6c8a353fb..1a7ffc3c339 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -96,6 +96,7 @@ class SalesInvoice(SellingController): company: DF.Link company_address: DF.Link | None company_address_display: DF.SmallText | None + company_contact_person: DF.Link | None company_tax_id: DF.Data | None contact_display: DF.SmallText | None contact_email: DF.Data | None @@ -278,7 +279,6 @@ class SalesInvoice(SellingController): self.check_sales_order_on_hold_or_close("sales_order") self.validate_debit_to_acc() self.clear_unallocated_advances("Sales Invoice Advance", "advances") - self.add_remarks() self.validate_fixed_asset() self.set_income_account_for_fixed_assets() self.validate_item_cost_centers() @@ -298,8 +298,11 @@ class SalesInvoice(SellingController): self.update_current_stock() self.validate_delivery_note() + is_deferred_invoice = any(d.get("enable_deferred_revenue") for d in self.get("items")) + # validate service stop date to lie in between start and end date - validate_service_stop_date(self) + if is_deferred_invoice: + validate_service_stop_date(self) if not self.is_opening: self.is_opening = "No" @@ -341,6 +344,7 @@ class SalesInvoice(SellingController): ): validate_loyalty_points(self, self.loyalty_points) + self.allow_write_off_only_on_pos() self.reset_default_field_value("set_warehouse", "items", "warehouse") def validate_accounts(self): @@ -422,6 +426,9 @@ class SalesInvoice(SellingController): self.set_account_for_mode_of_payment() self.set_paid_amount() + def before_submit(self): + self.add_remarks() + def on_submit(self): self.validate_pos_paid_amount() @@ -514,7 +521,7 @@ class SalesInvoice(SellingController): ) if pos_closing_entry and pos_closing_entry[0]: msg = _("To cancel a {} you need to cancel the POS Closing Entry {}.").format( - frappe.bold("Consolidated Sales Invoice"), + frappe.bold(_("Consolidated Sales Invoice")), get_link_to_form("POS Closing Entry", pos_closing_entry[0]), ) frappe.throw(msg, title=_("Not Allowed")) @@ -858,7 +865,7 @@ class SalesInvoice(SellingController): if account.report_type != "Balance Sheet": msg = ( - _("Please ensure {} account is a Balance Sheet account.").format(frappe.bold("Debit To")) + _("Please ensure {} account is a Balance Sheet account.").format(frappe.bold(_("Debit To"))) + " " ) msg += _( @@ -869,7 +876,7 @@ class SalesInvoice(SellingController): if self.customer and account.account_type != "Receivable": msg = ( _("Please ensure {} account {} is a Receivable account.").format( - frappe.bold("Debit To"), frappe.bold(self.debit_to) + frappe.bold(_("Debit To")), frappe.bold(self.debit_to) ) + " " ) @@ -946,10 +953,11 @@ class SalesInvoice(SellingController): def add_remarks(self): if not self.remarks: - if self.po_no and self.po_date: - self.remarks = _("Against Customer Order {0} dated {1}").format( - self.po_no, formatdate(self.po_date) - ) + if self.po_no: + self.remarks = _("Against Customer Order {0}").format(self.po_no) + if self.po_date: + self.remarks += " " + _("dated {0}").format(formatdate(self.po_date)) + else: self.remarks = _("No Remarks") @@ -1018,6 +1026,10 @@ class SalesInvoice(SellingController): raise_exception=1, ) + def allow_write_off_only_on_pos(self): + if not self.is_pos and self.write_off_account: + self.write_off_account = None + def validate_write_off_account(self): if flt(self.write_off_amount) and not self.write_off_account: self.write_off_account = frappe.get_cached_value("Company", self.company, "write_off_account") @@ -1351,14 +1363,15 @@ class SalesInvoice(SellingController): else: if asset.calculate_depreciation: - notes = _( - "This schedule was created when Asset {0} was sold through Sales Invoice {1}." - ).format( - get_link_to_form(asset.doctype, asset.name), - get_link_to_form(self.doctype, self.get("name")), - ) - depreciate_asset(asset, self.posting_date, notes) - asset.reload() + if not asset.status == "Fully Depreciated": + notes = _( + "This schedule was created when Asset {0} was sold through Sales Invoice {1}." + ).format( + get_link_to_form(asset.doctype, asset.name), + get_link_to_form(self.doctype, self.get("name")), + ) + depreciate_asset(asset, self.posting_date, notes) + asset.reload() fixed_asset_gl_entries = get_gl_entries_on_asset_disposal( asset, @@ -1621,10 +1634,29 @@ class SalesInvoice(SellingController): and self.base_rounding_adjustment and not self.is_internal_transfer() ): - round_off_account, round_off_cost_center = get_round_off_account_and_cost_center( + ( + round_off_account, + round_off_cost_center, + round_off_for_opening, + ) = get_round_off_account_and_cost_center( self.company, "Sales Invoice", self.name, self.use_company_roundoff_cost_center ) + if self.is_opening == "Yes" and self.rounding_adjustment: + if not round_off_for_opening: + frappe.throw( + _( + "Opening Invoice has rounding adjustment of {0}.

'{1}' account is required to post these values. Please set it in Company: {2}.

Or, '{3}' can be enabled to not post any rounding adjustment." + ).format( + frappe.bold(self.rounding_adjustment), + frappe.bold("Round Off for Opening"), + get_link_to_form("Company", self.company), + frappe.bold("Disable Rounded Total"), + ) + ) + else: + round_off_account = round_off_for_opening + gl_entries.append( self.get_gl_dict( { @@ -1722,9 +1754,14 @@ class SalesInvoice(SellingController): ) def update_project(self): - if self.project: - project = frappe.get_doc("Project", self.project) + unique_projects = list(set([d.project for d in self.get("items") if d.project])) + if self.project and self.project not in unique_projects: + unique_projects.append(self.project) + + for p in unique_projects: + project = frappe.get_doc("Project", p) project.update_billed_amount() + project.calculate_gross_margin() project.db_update() def verify_payment_amount_is_positive(self): @@ -2115,7 +2152,7 @@ def make_delivery_note(source_name, target_doc=None): "postprocess": update_item, "condition": lambda doc: doc.delivered_by_supplier != 1, }, - "Sales Taxes and Charges": {"doctype": "Sales Taxes and Charges", "add_if_empty": True}, + "Sales Taxes and Charges": {"doctype": "Sales Taxes and Charges", "reset_value": True}, "Sales Team": { "doctype": "Sales Team", "field_map": {"incentives": "incentives"}, diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice_list.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice_list.js index f971f68a454..3371a63cca2 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice_list.js +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice_list.js @@ -15,7 +15,7 @@ frappe.listview_settings["Sales Invoice"] = { ], get_indicator: function (doc) { const status_colors = { - Draft: "grey", + Draft: "red", Unpaid: "orange", Paid: "green", Return: "gray", diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py index fef30bdfecd..57eb84caaa4 100644 --- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py @@ -8,7 +8,7 @@ import frappe from frappe import qb from frappe.model.dynamic_links import get_dynamic_link_map from frappe.tests.utils import FrappeTestCase, change_settings -from frappe.utils import add_days, flt, getdate, nowdate, today +from frappe.utils import add_days, flt, format_date, getdate, nowdate, today import erpnext from erpnext.accounts.doctype.account.test_account import create_account, get_inventory_account @@ -314,7 +314,8 @@ class TestSalesInvoice(FrappeTestCase): si.insert() # with inclusive tax - self.assertEqual(si.items[0].net_amount, 3947.368421052631) + self.assertEqual(si.items[0].net_amount, 3947.37) + self.assertEqual(si.net_total, si.base_net_total) self.assertEqual(si.net_total, 3947.37) self.assertEqual(si.grand_total, 5000) @@ -658,7 +659,7 @@ class TestSalesInvoice(FrappeTestCase): 62.5, 625.0, 50, - 499.97600115194473, + 499.98, ], "_Test Item Home Desktop 200": [ 190.66, @@ -669,7 +670,7 @@ class TestSalesInvoice(FrappeTestCase): 190.66, 953.3, 150, - 749.9968530500239, + 750, ], } @@ -682,20 +683,21 @@ class TestSalesInvoice(FrappeTestCase): self.assertEqual(d.get(k), expected_values[d.item_code][i]) # check net total - self.assertEqual(si.net_total, 1249.97) + self.assertEqual(si.base_net_total, si.net_total) + self.assertEqual(si.net_total, 1249.98) self.assertEqual(si.total, 1578.3) # check tax calculation expected_values = { "keys": ["tax_amount", "total"], - "_Test Account Excise Duty - _TC": [140, 1389.97], - "_Test Account Education Cess - _TC": [2.8, 1392.77], - "_Test Account S&H Education Cess - _TC": [1.4, 1394.17], - "_Test Account CST - _TC": [27.88, 1422.05], - "_Test Account VAT - _TC": [156.25, 1578.30], - "_Test Account Customs Duty - _TC": [125, 1703.30], - "_Test Account Shipping Charges - _TC": [100, 1803.30], - "_Test Account Discount - _TC": [-180.33, 1622.97], + "_Test Account Excise Duty - _TC": [140, 1389.98], + "_Test Account Education Cess - _TC": [2.8, 1392.78], + "_Test Account S&H Education Cess - _TC": [1.4, 1394.18], + "_Test Account CST - _TC": [27.88, 1422.06], + "_Test Account VAT - _TC": [156.25, 1578.31], + "_Test Account Customs Duty - _TC": [125, 1703.31], + "_Test Account Shipping Charges - _TC": [100, 1803.31], + "_Test Account Discount - _TC": [-180.33, 1622.98], } for d in si.get("taxes"): @@ -731,7 +733,7 @@ class TestSalesInvoice(FrappeTestCase): "base_rate": 2500, "base_amount": 25000, "net_rate": 40, - "net_amount": 399.9808009215558, + "net_amount": 399.98, "base_net_rate": 2000, "base_net_amount": 19999, }, @@ -745,7 +747,7 @@ class TestSalesInvoice(FrappeTestCase): "base_rate": 7500, "base_amount": 37500, "net_rate": 118.01, - "net_amount": 590.0531205155963, + "net_amount": 590.05, "base_net_rate": 5900.5, "base_net_amount": 29502.5, }, @@ -783,8 +785,13 @@ class TestSalesInvoice(FrappeTestCase): self.assertEqual(si.base_grand_total, 60795) self.assertEqual(si.grand_total, 1215.90) - self.assertEqual(si.rounding_adjustment, 0.01) - self.assertEqual(si.base_rounding_adjustment, 0.50) + # no rounding adjustment as the Smallest Currency Fraction Value of USD is 0.01 + if frappe.db.get_value("Currency", "USD", "smallest_currency_fraction_value") < 0.01: + self.assertEqual(si.rounding_adjustment, 0.10) + self.assertEqual(si.base_rounding_adjustment, 5.0) + else: + self.assertEqual(si.rounding_adjustment, 0.0) + self.assertEqual(si.base_rounding_adjustment, 0.0) def test_outstanding(self): w = self.make() @@ -1995,7 +2002,7 @@ class TestSalesInvoice(FrappeTestCase): # Check if SO is unlinked/replaced by SI in PE & if SO advance paid is 0 self.assertEqual(pe.references[0].reference_name, si.name) - self.assertEqual(sales_order.advance_paid, 0.0) + self.assertEqual(sales_order.advance_paid, 300.0) # check outstanding after advance allocation self.assertEqual( @@ -2172,7 +2179,7 @@ class TestSalesInvoice(FrappeTestCase): def test_rounding_adjustment_2(self): si = create_sales_invoice(rate=400, do_not_save=True) - for rate in [400, 600, 100]: + for rate in [400.25, 600.30, 100.65]: si.append( "items", { @@ -2198,18 +2205,19 @@ class TestSalesInvoice(FrappeTestCase): ) si.save() si.submit() - self.assertEqual(si.net_total, 1271.19) - self.assertEqual(si.grand_total, 1500) - self.assertEqual(si.total_taxes_and_charges, 228.82) - self.assertEqual(si.rounding_adjustment, -0.01) + self.assertEqual(si.net_total, si.base_net_total) + self.assertEqual(si.net_total, 1272.20) + self.assertEqual(si.grand_total, 1501.20) + self.assertEqual(si.total_taxes_and_charges, 229) + self.assertEqual(si.rounding_adjustment, -0.20) round_off_account = frappe.get_cached_value("Company", "_Test Company", "round_off_account") expected_values = { - "_Test Account Service Tax - _TC": [0.0, 114.41], - "_Test Account VAT - _TC": [0.0, 114.41], - si.debit_to: [1500, 0.0], - round_off_account: [0.01, 0.01], - "Sales - _TC": [0.0, 1271.18], + "_Test Account Service Tax - _TC": [0.0, 114.50], + "_Test Account VAT - _TC": [0.0, 114.50], + si.debit_to: [1501, 0.0], + round_off_account: [0.20, 0.0], + "Sales - _TC": [0.0, 1272.20], } gl_entries = frappe.db.sql( @@ -2267,7 +2275,8 @@ class TestSalesInvoice(FrappeTestCase): si.save() si.submit() - self.assertEqual(si.net_total, 4007.16) + self.assertEqual(si.net_total, si.base_net_total) + self.assertEqual(si.net_total, 4007.15) self.assertEqual(si.grand_total, 4488.02) self.assertEqual(si.total_taxes_and_charges, 480.86) self.assertEqual(si.rounding_adjustment, -0.02) @@ -2280,7 +2289,7 @@ class TestSalesInvoice(FrappeTestCase): ["_Test Account Service Tax - _TC", 0.0, 240.43], ["_Test Account VAT - _TC", 0.0, 240.43], ["Sales - _TC", 0.0, 4007.15], - [round_off_account, 0.02, 0.01], + [round_off_account, 0.01, 0.0], ] ) @@ -3162,6 +3171,50 @@ class TestSalesInvoice(FrappeTestCase): party_link.delete() frappe.db.set_single_value("Accounts Settings", "enable_common_party_accounting", 0) + def test_sales_invoice_cancel_with_common_party_advance_jv(self): + from erpnext.accounts.doctype.opening_invoice_creation_tool.test_opening_invoice_creation_tool import ( + make_customer, + ) + from erpnext.accounts.doctype.party_link.party_link import create_party_link + from erpnext.buying.doctype.supplier.test_supplier import create_supplier + + # create a customer + customer = make_customer(customer="_Test Common Supplier") + # create a supplier + supplier = create_supplier(supplier_name="_Test Common Supplier").name + + # create a party link between customer & supplier + party_link = create_party_link("Supplier", supplier, customer) + + # enable common party accounting + frappe.db.set_single_value("Accounts Settings", "enable_common_party_accounting", 1) + + # create a sales invoice + si = create_sales_invoice(customer=customer) + + # check creation of journal entry + jv = frappe.db.get_value( + "Journal Entry Account", + filters={ + "reference_type": si.doctype, + "reference_name": si.name, + "docstatus": 1, + }, + fieldname="parent", + ) + + self.assertTrue(jv) + + # cancel sales invoice + si.cancel() + + # check cancellation of journal entry + jv_status = frappe.db.get_value("Journal Entry", jv, "docstatus") + self.assertEqual(jv_status, 2) + + party_link.delete() + frappe.db.set_single_value("Accounts Settings", "enable_common_party_accounting", 0) + def test_payment_statuses(self): from erpnext.accounts.doctype.payment_entry.test_payment_entry import get_payment_entry @@ -3871,6 +3924,313 @@ class TestSalesInvoice(FrappeTestCase): self.assertEqual(len(res), 1) self.assertEqual(res[0][0], pos_return.return_against) + @change_settings("Accounts Settings", {"enable_common_party_accounting": True}) + def test_common_party_with_foreign_currency_jv(self): + from erpnext.accounts.doctype.account.test_account import create_account + from erpnext.accounts.doctype.opening_invoice_creation_tool.test_opening_invoice_creation_tool import ( + make_customer, + ) + from erpnext.accounts.doctype.party_link.party_link import create_party_link + from erpnext.buying.doctype.supplier.test_supplier import create_supplier + from erpnext.setup.utils import get_exchange_rate + + creditors = create_account( + account_name="Creditors USD", + parent_account="Accounts Payable - _TC", + company="_Test Company", + account_currency="USD", + account_type="Payable", + ) + debtors = create_account( + account_name="Debtors USD", + parent_account="Accounts Receivable - _TC", + company="_Test Company", + account_currency="USD", + account_type="Receivable", + ) + + # create a customer + customer = make_customer(customer="_Test Common Party USD") + cust_doc = frappe.get_doc("Customer", customer) + cust_doc.default_currency = "USD" + test_account_details = { + "company": "_Test Company", + "account": debtors, + } + cust_doc.append("accounts", test_account_details) + cust_doc.save() + + # create a supplier + supplier = create_supplier(supplier_name="_Test Common Party USD").name + supp_doc = frappe.get_doc("Supplier", supplier) + supp_doc.default_currency = "USD" + test_account_details = { + "company": "_Test Company", + "account": creditors, + } + supp_doc.append("accounts", test_account_details) + supp_doc.save() + + # create a party link between customer & supplier + create_party_link("Supplier", supplier, customer) + + # create a sales invoice + si = create_sales_invoice( + customer=customer, + currency="USD", + conversion_rate=get_exchange_rate("USD", "INR"), + debit_to=debtors, + do_not_save=1, + ) + si.party_account_currency = "USD" + si.save() + si.submit() + + # check outstanding of sales invoice + si.reload() + self.assertEqual(si.status, "Paid") + self.assertEqual(flt(si.outstanding_amount), 0.0) + + # check creation of journal entry + jv = frappe.get_all( + "Journal Entry Account", + { + "account": si.debit_to, + "party_type": "Customer", + "party": si.customer, + "reference_type": si.doctype, + "reference_name": si.name, + }, + pluck="credit_in_account_currency", + ) + self.assertTrue(jv) + self.assertEqual(jv[0], si.grand_total) + + def test_invoice_remarks(self): + si = frappe.copy_doc(test_records[0]) + si.po_no = "Test PO" + si.po_date = nowdate() + si.save() + si.submit() + self.assertEqual(si.remarks, f"Against Customer Order Test PO dated {format_date(nowdate())}") + + def test_gl_voucher_subtype(self): + si = create_sales_invoice() + gl_entries = frappe.get_all( + "GL Entry", + filters={"voucher_type": "Sales Invoice", "voucher_no": si.name}, + pluck="voucher_subtype", + ) + + self.assertTrue(all([x == "Sales Invoice" for x in gl_entries])) + + si = create_sales_invoice(is_return=1, qty=-1) + gl_entries = frappe.get_all( + "GL Entry", + filters={"voucher_type": "Sales Invoice", "voucher_no": si.name}, + pluck="voucher_subtype", + ) + + self.assertTrue(all([x == "Credit Note" for x in gl_entries])) + + def test_validation_on_opening_invoice_with_rounding(self): + si = create_sales_invoice(qty=1, rate=99.98, do_not_submit=True) + si.is_opening = "Yes" + si.items[0].income_account = "Temporary Opening - _TC" + si.save() + self.assertRaises(frappe.ValidationError, si.submit) + + def _create_opening_roundoff_account(self, company_name): + liability_root = frappe.db.get_all( + "Account", + filters={"company": company_name, "root_type": "Liability", "disabled": 0}, + order_by="lft", + limit=1, + )[0] + + # setup round off account + if acc := frappe.db.exists( + "Account", + { + "account_name": "Round Off for Opening", + "account_type": "Round Off for Opening", + "company": company_name, + }, + ): + frappe.db.set_value("Company", company_name, "round_off_for_opening", acc) + else: + acc = frappe.new_doc("Account") + acc.company = company_name + acc.parent_account = liability_root.name + acc.account_name = "Round Off for Opening" + acc.account_type = "Round Off for Opening" + acc.save() + frappe.db.set_value("Company", company_name, "round_off_for_opening", acc.name) + + def test_opening_invoice_with_rounding_adjustment(self): + si = create_sales_invoice(qty=1, rate=99.98, do_not_submit=True) + si.is_opening = "Yes" + si.items[0].income_account = "Temporary Opening - _TC" + si.save() + + self._create_opening_roundoff_account(si.company) + + si.reload() + si.submit() + res = frappe.db.get_all( + "GL Entry", + filters={"voucher_no": si.name, "is_opening": "Yes"}, + fields=["account", "debit", "credit", "is_opening"], + ) + self.assertEqual(len(res), 3) + + def _create_opening_invoice_with_inclusive_tax(self): + si = create_sales_invoice(qty=1, rate=90, do_not_submit=True) + si.is_opening = "Yes" + si.items[0].income_account = "Temporary Opening - _TC" + item_template = si.items[0].as_dict() + item_template.name = None + item_template.rate = 55 + si.append("items", item_template) + si.append( + "taxes", + { + "charge_type": "On Net Total", + "account_head": "_Test Account Service Tax - _TC", + "cost_center": "_Test Cost Center - _TC", + "description": "Testing...", + "rate": 5, + "included_in_print_rate": True, + }, + ) + # there will be 0.01 precision loss between Dr and Cr + # caused by 'included_in_print_tax' option + si.save() + return si + + def test_rounding_validation_for_opening_with_inclusive_tax(self): + si = self._create_opening_invoice_with_inclusive_tax() + # 'Round Off for Opening' not set in Company master + # Ledger level validation must be thrown + self.assertRaises(frappe.ValidationError, si.submit) + + def test_ledger_entries_on_opening_invoice_with_rounding_loss_by_inclusive_tax(self): + si = self._create_opening_invoice_with_inclusive_tax() + # 'Round Off for Opening' is set in Company master + self._create_opening_roundoff_account(si.company) + + si.submit() + actual = frappe.db.get_all( + "GL Entry", + filters={"voucher_no": si.name, "is_opening": "Yes", "is_cancelled": False}, + fields=["account", "debit", "credit", "is_opening"], + order_by="account,debit", + ) + expected = [ + {"account": "_Test Account Service Tax - _TC", "debit": 0.0, "credit": 6.9, "is_opening": "Yes"}, + {"account": "Debtors - _TC", "debit": 145.0, "credit": 0.0, "is_opening": "Yes"}, + {"account": "Round Off for Opening - _TC", "debit": 0.0, "credit": 0.01, "is_opening": "Yes"}, + {"account": "Temporary Opening - _TC", "debit": 0.0, "credit": 138.09, "is_opening": "Yes"}, + ] + self.assertEqual(len(actual), 4) + self.assertEqual(expected, actual) + + @change_settings("Accounts Settings", {"enable_common_party_accounting": True}) + def test_common_party_with_different_currency_in_debtor_and_creditor(self): + from erpnext.accounts.doctype.account.test_account import create_account + from erpnext.accounts.doctype.opening_invoice_creation_tool.test_opening_invoice_creation_tool import ( + make_customer, + ) + from erpnext.accounts.doctype.party_link.party_link import create_party_link + from erpnext.buying.doctype.supplier.test_supplier import create_supplier + from erpnext.setup.utils import get_exchange_rate + + creditors = create_account( + account_name="Creditors INR", + parent_account="Accounts Payable - _TC", + company="_Test Company", + account_currency="INR", + account_type="Payable", + ) + debtors = create_account( + account_name="Debtors USD", + parent_account="Accounts Receivable - _TC", + company="_Test Company", + account_currency="USD", + account_type="Receivable", + ) + + # create a customer + customer = make_customer(customer="_Test Common Party USD") + cust_doc = frappe.get_doc("Customer", customer) + cust_doc.default_currency = "USD" + test_account_details = { + "company": "_Test Company", + "account": debtors, + } + cust_doc.append("accounts", test_account_details) + cust_doc.save() + + # create a supplier + supplier = create_supplier(supplier_name="_Test Common Party INR").name + supp_doc = frappe.get_doc("Supplier", supplier) + supp_doc.default_currency = "INR" + test_account_details = { + "company": "_Test Company", + "account": creditors, + } + supp_doc.append("accounts", test_account_details) + supp_doc.save() + + # create a party link between customer & supplier + create_party_link("Supplier", supplier, customer) + + # create a sales invoice + si = create_sales_invoice( + customer=customer, + currency="USD", + conversion_rate=get_exchange_rate("USD", "INR"), + debit_to=debtors, + do_not_save=1, + ) + si.party_account_currency = "USD" + si.save() + si.submit() + + # check outstanding of sales invoice + si.reload() + self.assertEqual(si.status, "Paid") + self.assertEqual(flt(si.outstanding_amount), 0.0) + + # check creation of journal entry + jv = frappe.get_all( + "Journal Entry Account", + { + "account": si.debit_to, + "party_type": "Customer", + "party": si.customer, + "reference_type": si.doctype, + "reference_name": si.name, + }, + pluck="credit_in_account_currency", + ) + self.assertTrue(jv) + self.assertEqual(jv[0], si.grand_total) + + def test_total_billed_amount(self): + si = create_sales_invoice(do_not_submit=True) + + project = frappe.new_doc("Project") + project.project_name = "Test Total Billed Amount" + project.save() + + si.project = project.name + si.save() + si.submit() + + doc = frappe.get_doc("Project", project.name) + self.assertEqual(doc.total_billed_amount, si.grand_total) + def set_advance_flag(company, flag, default_account): frappe.db.set_value( diff --git a/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json b/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json index 932bc8e49d4..dd370ef414f 100644 --- a/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json +++ b/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json @@ -89,11 +89,14 @@ "incoming_rate", "item_tax_rate", "actual_batch_qty", - "actual_qty", "section_break_eoec", "serial_no", "column_break_ytgd", "batch_no", + "available_quantity_section", + "actual_qty", + "column_break_ogff", + "company_total_stock", "edit_references", "sales_order", "so_detail", @@ -675,7 +678,8 @@ "allow_on_submit": 1, "fieldname": "actual_qty", "fieldtype": "Float", - "label": "Available Qty at Warehouse", + "label": "Qty (Warehouse)", + "no_copy": 1, "oldfieldname": "actual_qty", "oldfieldtype": "Currency", "print_hide": 1, @@ -812,7 +816,8 @@ "fieldname": "project", "fieldtype": "Link", "label": "Project", - "options": "Project" + "options": "Project", + "search_index": 1 }, { "depends_on": "eval:parent.update_stock == 1", @@ -922,12 +927,30 @@ { "fieldname": "column_break_ytgd", "fieldtype": "Column Break" + }, + { + "fieldname": "available_quantity_section", + "fieldtype": "Section Break", + "label": "Available Quantity" + }, + { + "fieldname": "column_break_ogff", + "fieldtype": "Column Break" + }, + { + "allow_on_submit": 1, + "fieldname": "company_total_stock", + "fieldtype": "Float", + "label": "Qty (Company)", + "no_copy": 1, + "print_hide": 1, + "read_only": 1 } ], "idx": 1, "istable": 1, "links": [], - "modified": "2024-05-23 16:36:18.970862", + "modified": "2024-11-25 16:27:33.287341", "modified_by": "Administrator", "module": "Accounts", "name": "Sales Invoice Item", diff --git a/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.py b/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.py index 9be1b42aab3..b7b0873c76b 100644 --- a/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.py +++ b/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.py @@ -28,6 +28,7 @@ class SalesInvoiceItem(Document): base_rate_with_margin: DF.Currency batch_no: DF.Link | None brand: DF.Data | None + company_total_stock: DF.Float conversion_factor: DF.Float cost_center: DF.Link customer_item_code: DF.Data | None diff --git a/erpnext/accounts/doctype/subscription/subscription.py b/erpnext/accounts/doctype/subscription/subscription.py index 916757a8d6d..d57f1de4379 100644 --- a/erpnext/accounts/doctype/subscription/subscription.py +++ b/erpnext/accounts/doctype/subscription/subscription.py @@ -737,10 +737,7 @@ class Subscription(Document): elif self.generate_invoice_at == "Days before the current subscription period": processing_date = add_days(self.current_invoice_start, -self.number_of_days) - process_subscription = frappe.new_doc("Process Subscription") - process_subscription.posting_date = processing_date - process_subscription.subscription = self.name - process_subscription.save().submit() + self.process(posting_date=processing_date) def is_prorate() -> int: diff --git a/erpnext/accounts/doctype/tax_rule/tax_rule.py b/erpnext/accounts/doctype/tax_rule/tax_rule.py index ed623c6635e..1c0c0a3c1d6 100644 --- a/erpnext/accounts/doctype/tax_rule/tax_rule.py +++ b/erpnext/accounts/doctype/tax_rule/tax_rule.py @@ -185,7 +185,7 @@ def get_tax_template(posting_date, args): conditions.append("(from_date is null) and (to_date is null)") conditions.append( - "ifnull(tax_category, '') = {}".format(frappe.db.escape(cstr(args.get("tax_category")))) + "ifnull(tax_category, '') = {}".format(frappe.db.escape(cstr(args.get("tax_category")), False)) ) if "tax_category" in args.keys(): del args["tax_category"] diff --git a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py index 9fd78da2d07..69c7eb1153c 100644 --- a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py +++ b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py @@ -327,7 +327,7 @@ def get_tax_amount(party_type, parties, inv, tax_details, posting_date, pan_no=N tax_amount = 0 else: # if no TCS has been charged in FY, - # then chargeable value is "prev invoices + advances" value which cross the threshold + # then chargeable value is "prev invoices + advances - advance_adjusted" value which cross the threshold tax_amount = get_tcs_amount(parties, inv, tax_details, vouchers, advance_vouchers) if cint(tax_details.round_off_tax_amount): @@ -414,6 +414,9 @@ def get_advance_vouchers(parties, company=None, from_date=None, to_date=None, pa Use Payment Ledger to fetch unallocated Advance Payments """ + if party_type == "Supplier": + return [] + ple = qb.DocType("Payment Ledger Entry") conditions = [] @@ -511,7 +514,7 @@ def get_tds_amount(ldc, parties, inv, tax_details, vouchers): payment_entry_filters.pop("apply_tax_withholding_amount", None) payment_entry_filters.pop("tax_withholding_category", None) - supp_credit_amt = frappe.db.get_value("Purchase Invoice", invoice_filters, field) or 0.0 + supp_inv_credit_amt = frappe.db.get_value("Purchase Invoice", invoice_filters, field) or 0.0 supp_jv_credit_amt = ( frappe.db.get_value( @@ -535,7 +538,7 @@ def get_tds_amount(ldc, parties, inv, tax_details, vouchers): group_by="payment_type", ) - supp_credit_amt += supp_jv_credit_amt + supp_credit_amt = supp_jv_credit_amt supp_credit_amt += inv.tax_withholding_net_total for type in payment_entry_amounts: @@ -553,19 +556,19 @@ def get_tds_amount(ldc, parties, inv, tax_details, vouchers): tax_withholding_net_total = inv.tax_withholding_net_total if (threshold and tax_withholding_net_total >= threshold) or ( - cumulative_threshold and supp_credit_amt >= cumulative_threshold + cumulative_threshold and (supp_credit_amt + supp_inv_credit_amt) >= cumulative_threshold ): + # Get net total again as TDS is calculated on net total + # Grand is used to just check for threshold breach + net_total = ( + frappe.db.get_value("Purchase Invoice", invoice_filters, "sum(tax_withholding_net_total)") or 0.0 + ) + supp_credit_amt += net_total + if (cumulative_threshold and supp_credit_amt >= cumulative_threshold) and cint( tax_details.tax_on_excess_amount ): - # Get net total again as TDS is calculated on net total - # Grand is used to just check for threshold breach - net_total = ( - frappe.db.get_value("Purchase Invoice", invoice_filters, "sum(tax_withholding_net_total)") - or 0.0 - ) - net_total += inv.tax_withholding_net_total - supp_credit_amt = net_total - cumulative_threshold + supp_credit_amt = net_total + tax_withholding_net_total - cumulative_threshold if ldc and is_valid_certificate(ldc, inv.get("posting_date") or inv.get("transaction_date"), 0): tds_amount = get_lower_deduction_amount( @@ -607,8 +610,6 @@ def get_tcs_amount(parties, inv, tax_details, vouchers, adv_vouchers): conditions.append(ple.voucher_no == ple.against_voucher_no) conditions.append(ple.company == inv.company) - (qb.from_(ple).select(Abs(Sum(ple.amount))).where(Criterion.all(conditions)).run(as_list=1)) - advance_amt = ( qb.from_(ple).select(Abs(Sum(ple.amount))).where(Criterion.all(conditions)).run()[0][0] or 0.0 ) @@ -631,9 +632,12 @@ def get_tcs_amount(parties, inv, tax_details, vouchers, adv_vouchers): ) cumulative_threshold = tax_details.get("cumulative_threshold", 0) + advance_adjusted = get_advance_adjusted_in_invoice(inv) current_invoice_total = get_invoice_total_without_tcs(inv, tax_details) - total_invoiced_amt = current_invoice_total + invoiced_amt + advance_amt - credit_note_amt + total_invoiced_amt = ( + current_invoice_total + invoiced_amt + advance_amt - credit_note_amt - advance_adjusted + ) if cumulative_threshold and total_invoiced_amt >= cumulative_threshold: chargeable_amt = total_invoiced_amt - cumulative_threshold @@ -642,6 +646,14 @@ def get_tcs_amount(parties, inv, tax_details, vouchers, adv_vouchers): return tcs_amount +def get_advance_adjusted_in_invoice(inv): + advances_adjusted = 0 + for row in inv.get("advances", []): + advances_adjusted += row.allocated_amount + + return advances_adjusted + + def get_invoice_total_without_tcs(inv, tax_details): tcs_tax_row = [d for d in inv.taxes if d.account_head == tax_details.account_head] tcs_tax_row_amount = tcs_tax_row[0].base_tax_amount if tcs_tax_row else 0 diff --git a/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py b/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py index 1e3939d98a4..f9f34380d55 100644 --- a/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py +++ b/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py @@ -74,11 +74,17 @@ class TestTaxWithholdingCategory(FrappeTestCase): self.assertEqual(pi.grand_total, 18000) # check gl entry for the purchase invoice - gl_entries = frappe.db.get_all("GL Entry", filters={"voucher_no": pi.name}, fields=["*"]) + gl_entries = frappe.db.get_all( + "GL Entry", + filters={"voucher_no": pi.name}, + fields=["account", "sum(debit) as debit", "sum(credit) as credit"], + group_by="account", + ) self.assertEqual(len(gl_entries), 3) for d in gl_entries: if d.account == pi.credit_to: - self.assertEqual(d.credit, 18000) + self.assertEqual(d.credit, 20000) + self.assertEqual(d.debit, 2000) elif d.account == pi.items[0].get("expense_account"): self.assertEqual(d.debit, 20000) elif d.account == pi.taxes[0].get("account_head"): @@ -121,6 +127,85 @@ class TestTaxWithholdingCategory(FrappeTestCase): for d in reversed(invoices): d.cancel() + def test_cumulative_threshold_with_party_ledger_amount_on_net_total(self): + invoices = [] + frappe.db.set_value( + "Supplier", "Test TDS Supplier3", "tax_withholding_category", "Advance TDS Category" + ) + + # Invoice with tax and without exceeding single and cumulative thresholds + for _ in range(2): + pi = create_purchase_invoice(supplier="Test TDS Supplier3", rate=1000, do_not_save=True) + pi.apply_tds = 1 + pi.append( + "taxes", + { + "category": "Total", + "charge_type": "Actual", + "account_head": "_Test Account VAT - _TC", + "cost_center": "Main - _TC", + "tax_amount": 500, + "description": "Test", + "add_deduct_tax": "Add", + }, + ) + pi.save() + pi.submit() + invoices.append(pi) + + # Third Invoice exceeds single threshold and not exceeding cumulative threshold + pi1 = create_purchase_invoice(supplier="Test TDS Supplier3", rate=6000) + pi1.apply_tds = 1 + pi1.save() + pi1.submit() + invoices.append(pi1) + + # Cumulative threshold is 10,000 + # Threshold calculation should be only on the third invoice + self.assertEqual(pi1.taxes[0].tax_amount, 800) + + for d in reversed(invoices): + d.cancel() + + def test_cumulative_threshold_with_tax_on_excess_amount(self): + invoices = [] + frappe.db.set_value("Supplier", "Test TDS Supplier3", "tax_withholding_category", "New TDS Category") + + # Invoice with tax and without exceeding single and cumulative thresholds + for _ in range(2): + pi = create_purchase_invoice(supplier="Test TDS Supplier3", rate=10000, do_not_save=True) + pi.apply_tds = 1 + pi.append( + "taxes", + { + "category": "Total", + "charge_type": "Actual", + "account_head": "_Test Account VAT - _TC", + "cost_center": "Main - _TC", + "tax_amount": 500, + "description": "Test", + "add_deduct_tax": "Add", + }, + ) + pi.save() + pi.submit() + invoices.append(pi) + + # Third Invoice exceeds single threshold and not exceeding cumulative threshold + pi1 = create_purchase_invoice(supplier="Test TDS Supplier3", rate=20000) + pi1.apply_tds = 1 + pi1.save() + pi1.submit() + invoices.append(pi1) + + # Cumulative threshold is 10,000 + # Threshold calculation should be only on the third invoice + self.assertTrue(len(pi1.taxes) > 0) + self.assertEqual(pi1.taxes[0].tax_amount, 1000) + + for d in reversed(invoices): + d.cancel() + def test_cumulative_threshold_tcs(self): frappe.db.set_value( "Customer", "Test TCS Customer", "tax_withholding_category", "Cumulative Threshold TCS" @@ -210,6 +295,46 @@ class TestTaxWithholdingCategory(FrappeTestCase): d.reload() d.cancel() + def test_tcs_on_allocated_advance_payments(self): + frappe.db.set_value( + "Customer", "Test TCS Customer", "tax_withholding_category", "Cumulative Threshold TCS" + ) + + vouchers = [] + + # create advance payment + pe = create_payment_entry( + payment_type="Receive", party_type="Customer", party="Test TCS Customer", paid_amount=30000 + ) + pe.paid_from = "Debtors - _TC" + pe.paid_to = "Cash - _TC" + pe.submit() + vouchers.append(pe) + + si = create_sales_invoice(customer="Test TCS Customer", rate=50000) + advances = si.get_advance_entries() + si.append( + "advances", + { + "reference_type": advances[0].reference_type, + "reference_name": advances[0].reference_name, + "advance_amount": advances[0].amount, + "allocated_amount": 30000, + }, + ) + si.submit() + vouchers.append(si) + + # assert tax collection on total invoice ,advance payment adjusted should be excluded. + tcs_charged = sum([d.base_tax_amount for d in si.taxes if d.account_head == "TCS - _TC"]) + # tcs = (inv amt)50000+(adv amt)30000-(adv adj) 30000 - threshold(30000) * rate 10% + self.assertEqual(tcs_charged, 2000) + + # cancel invoice and payments to avoid clashing + for d in reversed(vouchers): + d.reload() + d.cancel() + def test_tds_calculation_on_net_total(self): frappe.db.set_value( "Supplier", "Test TDS Supplier4", "tax_withholding_category", "Cumulative Threshold TDS" diff --git a/erpnext/accounts/doctype/unreconcile_payment/test_unreconcile_payment.py b/erpnext/accounts/doctype/unreconcile_payment/test_unreconcile_payment.py index 43dfbfaef60..c058dbfa0b8 100644 --- a/erpnext/accounts/doctype/unreconcile_payment/test_unreconcile_payment.py +++ b/erpnext/accounts/doctype/unreconcile_payment/test_unreconcile_payment.py @@ -7,7 +7,9 @@ from frappe.utils import today from erpnext.accounts.doctype.payment_entry.test_payment_entry import create_payment_entry from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice +from erpnext.accounts.party import get_party_account from erpnext.accounts.test.accounts_mixin import AccountsTestMixin +from erpnext.selling.doctype.sales_order.sales_order import make_sales_invoice from erpnext.selling.doctype.sales_order.test_sales_order import make_sales_order @@ -260,6 +262,7 @@ class TestUnreconcilePayment(AccountsTestMixin, FrappeTestCase): pe1.paid_from = self.debtors_usd pe1.paid_from_account_currency = "USD" pe1.source_exchange_rate = 75 + pe1.paid_amount = 100 pe1.received_amount = 75 * 100 pe1.save() # Allocate payment against both invoices @@ -277,6 +280,7 @@ class TestUnreconcilePayment(AccountsTestMixin, FrappeTestCase): pe2.paid_from = self.debtors_usd pe2.paid_from_account_currency = "USD" pe2.source_exchange_rate = 75 + pe2.paid_amount = 100 pe2.received_amount = 75 * 100 pe2.save() # Allocate payment against both invoices @@ -360,6 +364,107 @@ class TestUnreconcilePayment(AccountsTestMixin, FrappeTestCase): # Assert 'Advance Paid' so.reload() pe.reload() - self.assertEqual(so.advance_paid, 0) + self.assertEqual(so.advance_paid, 100) self.assertEqual(len(pe.references), 0) self.assertEqual(pe.unallocated_amount, 100) + + pe.cancel() + so.reload() + self.assertEqual(so.advance_paid, 100) + + def test_06_unreconcile_advance_from_payment_entry(self): + self.enable_advance_as_liability() + so1 = self.create_sales_order() + so2 = self.create_sales_order() + + pe = self.create_payment_entry() + # Allocation payment against Sales Order + pe.paid_amount = 260 + pe.append( + "references", + {"reference_doctype": so1.doctype, "reference_name": so1.name, "allocated_amount": 150}, + ) + pe.append( + "references", + {"reference_doctype": so2.doctype, "reference_name": so2.name, "allocated_amount": 110}, + ) + pe.save().submit() + + # Assert 'Advance Paid' + so1.reload() + self.assertEqual(so1.advance_paid, 150) + so2.reload() + self.assertEqual(so2.advance_paid, 110) + + unreconcile = frappe.get_doc( + { + "doctype": "Unreconcile Payment", + "company": self.company, + "voucher_type": pe.doctype, + "voucher_no": pe.name, + } + ) + unreconcile.add_references() + self.assertEqual(len(unreconcile.allocations), 2) + allocations = [(x.reference_name, x.allocated_amount) for x in unreconcile.allocations] + self.assertListEqual(allocations, [(so1.name, 150), (so2.name, 110)]) + # unreconcile so2 + unreconcile.remove(unreconcile.allocations[0]) + unreconcile.save().submit() + + # Assert 'Advance Paid' + so1.reload() + so2.reload() + pe.reload() + self.assertEqual(so1.advance_paid, 150) + self.assertEqual(so2.advance_paid, 110) + self.assertEqual(len(pe.references), 1) + self.assertEqual(pe.unallocated_amount, 110) + + self.disable_advance_as_liability() + + def test_07_adv_from_so_to_invoice(self): + self.enable_advance_as_liability() + so = self.create_sales_order() + pe = self.create_payment_entry() + pe.paid_amount = 1000 + pe.append( + "references", + {"reference_doctype": so.doctype, "reference_name": so.name, "allocated_amount": 1000}, + ) + pe.save().submit() + + # Assert 'Advance Paid' + so.reload() + self.assertEqual(so.advance_paid, 1000) + + si = make_sales_invoice(so.name) + si.insert().submit() + + pr = frappe.get_doc( + { + "doctype": "Payment Reconciliation", + "company": self.company, + "party_type": "Customer", + "party": so.customer, + } + ) + accounts = get_party_account("Customer", so.customer, so.company, True) + pr.receivable_payable_account = accounts[0] + pr.default_advance_account = accounts[1] + pr.get_unreconciled_entries() + self.assertEqual(len(pr.get("invoices")), 1) + self.assertEqual(len(pr.get("payments")), 1) + invoices = [x.as_dict() for x in pr.get("invoices")] + payments = [x.as_dict() for x in pr.get("payments")] + pr.allocate_entries(frappe._dict({"invoices": invoices, "payments": payments})) + pr.reconcile() + + self.assertEqual(len(pr.get("invoices")), 0) + self.assertEqual(len(pr.get("payments")), 0) + + # Assert 'Advance Paid' + so.reload() + self.assertEqual(so.advance_paid, 1000) + + self.disable_advance_as_liability() diff --git a/erpnext/accounts/doctype/unreconcile_payment/unreconcile_payment.json b/erpnext/accounts/doctype/unreconcile_payment/unreconcile_payment.json index f906dc6cec6..f2c2f380fe9 100644 --- a/erpnext/accounts/doctype/unreconcile_payment/unreconcile_payment.json +++ b/erpnext/accounts/doctype/unreconcile_payment/unreconcile_payment.json @@ -1,7 +1,5 @@ { "actions": [], - "allow_rename": 1, - "autoname": "format:UNREC-{#####}", "creation": "2023-08-22 10:26:34.421423", "default_view": "List", "doctype": "DocType", @@ -58,11 +56,10 @@ "index_web_pages_for_search": 1, "is_submittable": 1, "links": [], - "modified": "2023-08-28 17:42:50.261377", + "modified": "2024-10-10 12:03:50.022444", "modified_by": "Administrator", "module": "Accounts", "name": "Unreconcile Payment", - "naming_rule": "Expression", "owner": "Administrator", "permissions": [ { diff --git a/erpnext/accounts/general_ledger.py b/erpnext/accounts/general_ledger.py index a4d128a5845..19da840f543 100644 --- a/erpnext/accounts/general_ledger.py +++ b/erpnext/accounts/general_ledger.py @@ -7,7 +7,7 @@ import copy import frappe from frappe import _ from frappe.model.meta import get_field_precision -from frappe.utils import cint, flt, formatdate, getdate, now +from frappe.utils import cint, flt, formatdate, get_link_to_form, getdate, now import erpnext from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import ( @@ -37,13 +37,14 @@ def make_gl_entries( validate_disabled_accounts(gl_map) gl_map = process_gl_map(gl_map, merge_entries) if gl_map and len(gl_map) > 1: - create_payment_ledger_entry( - gl_map, - cancel=0, - adv_adj=adv_adj, - update_outstanding=update_outstanding, - from_repost=from_repost, - ) + if gl_map[0].voucher_type != "Period Closing Voucher": + create_payment_ledger_entry( + gl_map, + cancel=0, + adv_adj=adv_adj, + update_outstanding=update_outstanding, + from_repost=from_repost, + ) save_entries(gl_map, adv_adj, update_outstanding, from_repost) # Post GL Map proccess there may no be any GL Entries elif gl_map: @@ -116,17 +117,16 @@ def get_accounting_dimensions_for_offsetting_entry(gl_map, company): def validate_disabled_accounts(gl_map): accounts = [d.account for d in gl_map if d.account] - Account = frappe.qb.DocType("Account") + disabled_accounts = frappe.get_all( + "Account", + filters={"disabled": 1, "is_group": 0, "company": gl_map[0].company}, + fields=["name"], + ) - disabled_accounts = ( - frappe.qb.from_(Account) - .where(Account.name.isin(accounts) & Account.disabled == 1) - .select(Account.name, Account.disabled) - ).run(as_dict=True) - - if disabled_accounts: + used_disabled_accounts = set(accounts).intersection(set([d.name for d in disabled_accounts])) + if used_disabled_accounts: account_list = "
" - account_list += ", ".join([frappe.bold(d.name) for d in disabled_accounts]) + account_list += ", ".join([frappe.bold(d) for d in used_disabled_accounts]) frappe.throw( _("Cannot create accounting entries against disabled accounts: {0}").format(account_list), title=_("Disabled Account Selected"), @@ -179,50 +179,53 @@ def process_gl_map(gl_map, merge_entries=True, precision=None): def distribute_gl_based_on_cost_center_allocation(gl_map, precision=None): - cost_center_allocation = get_cost_center_allocation_data(gl_map[0]["company"], gl_map[0]["posting_date"]) - if not cost_center_allocation: - return gl_map - new_gl_map = [] for d in gl_map: cost_center = d.get("cost_center") # Validate budget against main cost center validate_expense_against_budget(d, expense_amount=flt(d.debit, precision) - flt(d.credit, precision)) - - if cost_center and cost_center_allocation.get(cost_center): - for sub_cost_center, percentage in cost_center_allocation.get(cost_center, {}).items(): - gle = copy.deepcopy(d) - gle.cost_center = sub_cost_center - for field in ("debit", "credit", "debit_in_account_currency", "credit_in_account_currency"): - gle[field] = flt(flt(d.get(field)) * percentage / 100, precision) - new_gl_map.append(gle) - else: + cost_center_allocation = get_cost_center_allocation_data( + gl_map[0]["company"], gl_map[0]["posting_date"], cost_center + ) + if not cost_center_allocation: new_gl_map.append(d) + continue + + for sub_cost_center, percentage in cost_center_allocation: + gle = copy.deepcopy(d) + gle.cost_center = sub_cost_center + for field in ("debit", "credit", "debit_in_account_currency", "credit_in_account_currency"): + gle[field] = flt(flt(d.get(field)) * percentage / 100, precision) + new_gl_map.append(gle) return new_gl_map -def get_cost_center_allocation_data(company, posting_date): - par = frappe.qb.DocType("Cost Center Allocation") - child = frappe.qb.DocType("Cost Center Allocation Percentage") +def get_cost_center_allocation_data(company, posting_date, cost_center): + cost_center_allocation = frappe.db.get_value( + "Cost Center Allocation", + { + "docstatus": 1, + "company": company, + "valid_from": ("<=", posting_date), + "main_cost_center": cost_center, + }, + pluck="name", + order_by="valid_from desc", + ) - records = ( - frappe.qb.from_(par) - .inner_join(child) - .on(par.name == child.parent) - .select(par.main_cost_center, child.cost_center, child.percentage) - .where(par.docstatus == 1) - .where(par.company == company) - .where(par.valid_from <= posting_date) - .orderby(par.valid_from, order=frappe.qb.desc) - ).run(as_dict=True) + if not cost_center_allocation: + return [] - cc_allocation = frappe._dict() - for d in records: - cc_allocation.setdefault(d.main_cost_center, frappe._dict()).setdefault(d.cost_center, d.percentage) + records = frappe.db.get_all( + "Cost Center Allocation Percentage", + {"parent": cost_center_allocation}, + ["cost_center", "percentage"], + as_list=True, + ) - return cc_allocation + return records def merge_similar_entries(gl_map, precision=None): @@ -231,6 +234,10 @@ def merge_similar_entries(gl_map, precision=None): merge_properties = get_merge_properties(accounting_dimensions) for entry in gl_map: + if entry._skip_merge: + merged_gl_map.append(entry) + continue + entry.merge_key = get_merge_key(entry, merge_properties) # if there is already an entry in this account then just add it # to that entry @@ -308,66 +315,48 @@ def check_if_in_list(gle, gl_map): def toggle_debit_credit_if_negative(gl_map): + debit_credit_field_map = { + "debit": "credit", + "debit_in_account_currency": "credit_in_account_currency", + "debit_in_transaction_currency": "credit_in_transaction_currency", + } + for entry in gl_map: # toggle debit, credit if negative entry - if flt(entry.debit) < 0 and flt(entry.credit) < 0 and flt(entry.debit) == flt(entry.credit): - entry.credit *= -1 - entry.debit *= -1 + for debit_field, credit_field in debit_credit_field_map.items(): + debit = flt(entry.get(debit_field)) + credit = flt(entry.get(credit_field)) - if ( - flt(entry.debit_in_account_currency) < 0 - and flt(entry.credit_in_account_currency) < 0 - and flt(entry.debit_in_account_currency) == flt(entry.credit_in_account_currency) - ): - entry.credit_in_account_currency *= -1 - entry.debit_in_account_currency *= -1 + if debit < 0 and credit < 0 and debit == credit: + debit *= -1 + credit *= -1 - if flt(entry.debit) < 0: - entry.credit = flt(entry.credit) - flt(entry.debit) - entry.debit = 0.0 + if debit < 0: + credit = credit - debit + debit = 0.0 - if flt(entry.debit_in_account_currency) < 0: - entry.credit_in_account_currency = flt(entry.credit_in_account_currency) - flt( - entry.debit_in_account_currency - ) - entry.debit_in_account_currency = 0.0 + if credit < 0: + debit = debit - credit + credit = 0.0 - if flt(entry.credit) < 0: - entry.debit = flt(entry.debit) - flt(entry.credit) - entry.credit = 0.0 + # update net values + # In some scenarios net value needs to be shown in the ledger + # This method updates net values as debit or credit + if entry.post_net_value and debit and credit: + if debit > credit: + debit = debit - credit + credit = 0.0 - if flt(entry.credit_in_account_currency) < 0: - entry.debit_in_account_currency = flt(entry.debit_in_account_currency) - flt( - entry.credit_in_account_currency - ) - entry.credit_in_account_currency = 0.0 + else: + credit = credit - debit + debit = 0.0 - update_net_values(entry) + entry[debit_field] = debit + entry[credit_field] = credit return gl_map -def update_net_values(entry): - # In some scenarios net value needs to be shown in the ledger - # This method updates net values as debit or credit - if entry.post_net_value and entry.debit and entry.credit: - if entry.debit > entry.credit: - entry.debit = entry.debit - entry.credit - entry.debit_in_account_currency = ( - entry.debit_in_account_currency - entry.credit_in_account_currency - ) - entry.credit = 0 - entry.credit_in_account_currency = 0 - else: - entry.credit = entry.credit - entry.debit - entry.credit_in_account_currency = ( - entry.credit_in_account_currency - entry.debit_in_account_currency - ) - - entry.debit = 0 - entry.debit_in_account_currency = 0 - - def save_entries(gl_map, adv_adj, update_outstanding, from_repost=False): if not from_repost: validate_cwip_accounts(gl_map) @@ -489,16 +478,36 @@ def raise_debit_credit_not_equal_error(debit_credit_diff, voucher_type, voucher_ ) +def has_opening_entries(gl_map: list) -> bool: + for x in gl_map: + if x.is_opening == "Yes": + return True + return False + + def make_round_off_gle(gl_map, debit_credit_diff, precision): - round_off_account, round_off_cost_center = get_round_off_account_and_cost_center( + round_off_account, round_off_cost_center, round_off_for_opening = get_round_off_account_and_cost_center( gl_map[0].company, gl_map[0].voucher_type, gl_map[0].voucher_no ) round_off_gle = frappe._dict() round_off_account_exists = False + has_opening_entry = has_opening_entries(gl_map) + + if has_opening_entry: + if not round_off_for_opening: + frappe.throw( + _("Please set '{0}' in Company: {1}").format( + frappe.bold("Round Off for Opening"), get_link_to_form("Company", gl_map[0].company) + ) + ) + + account = round_off_for_opening + else: + account = round_off_account if gl_map[0].voucher_type != "Period Closing Voucher": for d in gl_map: - if d.account == round_off_account: + if d.account == account: round_off_gle = d if d.debit: debit_credit_diff -= flt(d.debit) - flt(d.credit) @@ -516,7 +525,7 @@ def make_round_off_gle(gl_map, debit_credit_diff, precision): round_off_gle.update( { - "account": round_off_account, + "account": account, "debit_in_account_currency": abs(debit_credit_diff) if debit_credit_diff < 0 else 0, "credit_in_account_currency": debit_credit_diff if debit_credit_diff > 0 else 0, "debit": abs(debit_credit_diff) if debit_credit_diff < 0 else 0, @@ -530,6 +539,9 @@ def make_round_off_gle(gl_map, debit_credit_diff, precision): } ) + if has_opening_entry: + round_off_gle.update({"is_opening": "Yes"}) + update_accounting_dimensions(round_off_gle) if not round_off_account_exists: gl_map.append(round_off_gle) @@ -554,9 +566,9 @@ def update_accounting_dimensions(round_off_gle): def get_round_off_account_and_cost_center(company, voucher_type, voucher_no, use_company_default=False): - round_off_account, round_off_cost_center = frappe.get_cached_value( - "Company", company, ["round_off_account", "round_off_cost_center"] - ) or [None, None] + round_off_account, round_off_cost_center, round_off_for_opening = frappe.get_cached_value( + "Company", company, ["round_off_account", "round_off_cost_center", "round_off_for_opening"] + ) or [None, None, None] # Use expense account as fallback if not round_off_account: @@ -571,12 +583,20 @@ def get_round_off_account_and_cost_center(company, voucher_type, voucher_no, use round_off_cost_center = parent_cost_center if not round_off_account: - frappe.throw(_("Please mention Round Off Account in Company")) + frappe.throw( + _("Please mention '{0}' in Company: {1}").format( + frappe.bold("Round Off Account"), get_link_to_form("Company", company) + ) + ) if not round_off_cost_center: - frappe.throw(_("Please mention Round Off Cost Center in Company")) + frappe.throw( + _("Please mention '{0}' in Company: {1}").format( + frappe.bold("Round Off Cost Center"), get_link_to_form("Company", company) + ) + ) - return round_off_account, round_off_cost_center + return round_off_account, round_off_cost_center, round_off_for_opening def make_reverse_gl_entries( @@ -705,7 +725,7 @@ def validate_against_pcv(is_opening, posting_date, company): ) last_pcv_date = frappe.db.get_value( - "Period Closing Voucher", {"docstatus": 1, "company": company}, "max(posting_date)" + "Period Closing Voucher", {"docstatus": 1, "company": company}, "max(period_end_date)" ) if last_pcv_date and getdate(posting_date) <= getdate(last_pcv_date): diff --git a/erpnext/accounts/number_card/total_incoming_bills/total_incoming_bills.json b/erpnext/accounts/number_card/total_incoming_bills/total_incoming_bills.json index 283e187b542..88c7cae3f69 100644 --- a/erpnext/accounts/number_card/total_incoming_bills/total_incoming_bills.json +++ b/erpnext/accounts/number_card/total_incoming_bills/total_incoming_bills.json @@ -4,13 +4,14 @@ "docstatus": 0, "doctype": "Number Card", "document_type": "Purchase Invoice", + "dynamic_filters_json": "[[\"Purchase Invoice\",\"company\",\"=\",\" frappe.defaults.get_user_default(\\\"Company\\\")\"]]", "filters_json": "[[\"Purchase Invoice\",\"docstatus\",\"=\",\"1\",false],[\"Purchase Invoice\",\"posting_date\",\"Timespan\",\"this year\",false]]", "function": "Sum", "idx": 0, "is_public": 1, "is_standard": 1, "label": "Total Incoming Bills", - "modified": "2020-07-22 13:06:46.045344", + "modified": "2024-11-20 19:08:37.043777", "modified_by": "Administrator", "module": "Accounts", "name": "Total Incoming Bills", diff --git a/erpnext/accounts/number_card/total_incoming_payment/total_incoming_payment.json b/erpnext/accounts/number_card/total_incoming_payment/total_incoming_payment.json index bc23c15b6a9..a53b222ed7d 100644 --- a/erpnext/accounts/number_card/total_incoming_payment/total_incoming_payment.json +++ b/erpnext/accounts/number_card/total_incoming_payment/total_incoming_payment.json @@ -4,6 +4,7 @@ "docstatus": 0, "doctype": "Number Card", "document_type": "Payment Entry", + "dynamic_filters_json": "[[\"Payment Entry\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"]]", "filters_json": "[[\"Payment Entry\",\"docstatus\",\"=\",\"1\",false],[\"Payment Entry\",\"posting_date\",\"Timespan\",\"this year\",false],[\"Payment Entry\",\"payment_type\",\"=\",\"Receive\",false]]", "function": "Sum", "idx": 0, diff --git a/erpnext/accounts/number_card/total_outgoing_bills/total_outgoing_bills.json b/erpnext/accounts/number_card/total_outgoing_bills/total_outgoing_bills.json index fe916182102..092defd94bd 100644 --- a/erpnext/accounts/number_card/total_outgoing_bills/total_outgoing_bills.json +++ b/erpnext/accounts/number_card/total_outgoing_bills/total_outgoing_bills.json @@ -4,6 +4,7 @@ "docstatus": 0, "doctype": "Number Card", "document_type": "Sales Invoice", + "dynamic_filters_json": "[[\"Sales Invoice\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"]]", "filters_json": "[[\"Sales Invoice\",\"docstatus\",\"=\",\"1\",false],[\"Sales Invoice\",\"posting_date\",\"Timespan\",\"this year\",false]]", "function": "Sum", "idx": 0, diff --git a/erpnext/accounts/number_card/total_outgoing_payment/total_outgoing_payment.json b/erpnext/accounts/number_card/total_outgoing_payment/total_outgoing_payment.json index d27be883500..d60f30f7c9a 100644 --- a/erpnext/accounts/number_card/total_outgoing_payment/total_outgoing_payment.json +++ b/erpnext/accounts/number_card/total_outgoing_payment/total_outgoing_payment.json @@ -4,6 +4,7 @@ "docstatus": 0, "doctype": "Number Card", "document_type": "Payment Entry", + "dynamic_filters_json": "[[\"Payment Entry\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"]]", "filters_json": "[[\"Payment Entry\",\"docstatus\",\"=\",\"1\",false],[\"Payment Entry\",\"posting_date\",\"Timespan\",\"this year\",false],[\"Payment Entry\",\"payment_type\",\"=\",\"Pay\",false]]", "function": "Sum", "idx": 0, diff --git a/erpnext/accounts/party.py b/erpnext/accounts/party.py index e6015e081d6..5be80872db8 100644 --- a/erpnext/accounts/party.py +++ b/erpnext/accounts/party.py @@ -29,6 +29,12 @@ from erpnext.accounts.utils import get_fiscal_year from erpnext.exceptions import InvalidAccountCurrency, PartyDisabled, PartyFrozen from erpnext.utilities.regional import temporary_flag +try: + from frappe.contacts.doctype.address.address import render_address as _render_address +except ImportError: + # Older frappe versions where this function is not available + from frappe.contacts.doctype.address.address import get_address_display as _render_address + PURCHASE_TRANSACTION_TYPES = { "Supplier Quotation", "Purchase Order", @@ -68,7 +74,7 @@ def get_party_details( pos_profile=None, ): if not party: - return {} + return frappe._dict() if not frappe.db.exists(party_type, party): frappe.throw(_("{0}: {1} does not exists").format(party_type, party)) return _get_party_details( @@ -881,16 +887,17 @@ def get_party_shipping_address(doctype: str, name: str) -> str | None: def get_partywise_advanced_payment_amount( party_type, posting_date=None, future_payment=0, company=None, party=None ): + account_type = frappe.get_cached_value("Party Type", party_type, "account_type") + ple = frappe.qb.DocType("Payment Ledger Entry") + acc = frappe.qb.DocType("Account") + query = ( frappe.qb.from_(ple) - .select(ple.party, Abs(Sum(ple.amount).as_("amount"))) - .where( - (ple.party_type.isin(party_type)) - & (ple.amount < 0) - & (ple.against_voucher_no == ple.voucher_no) - & (ple.delinked == 0) - ) + .inner_join(acc) + .on(ple.account == acc.name) + .select(ple.party) + .where((ple.party_type.isin(party_type)) & (acc.account_type == account_type) & (ple.delinked == 0)) .groupby(ple.party) ) @@ -909,9 +916,32 @@ def get_partywise_advanced_payment_amount( if invoice_doctypes := frappe.get_hooks("invoice_doctypes"): query = query.where(ple.voucher_type.notin(invoice_doctypes)) - data = query.run() - if data: - return frappe._dict(data) + # Get advance amount from Receivable / Payable Account + party_ledger = query.select(Abs(Sum(ple.amount).as_("amount"))) + party_ledger = party_ledger.where(ple.amount < 0) + party_ledger = party_ledger.where(ple.against_voucher_no == ple.voucher_no) + party_ledger = party_ledger.where( + acc.root_type == ("Liability" if account_type == "Payable" else "Asset") + ) + + data = party_ledger.run() + data = frappe._dict(data or {}) + + # Get advance amount from Advance Account + advance_ledger = query.select(Sum(ple.amount).as_("amount"), ple.account) + advance_ledger = advance_ledger.where( + acc.root_type == ("Asset" if account_type == "Payable" else "Liability") + ) + advance_ledger = advance_ledger.groupby(ple.account) + advance_ledger = advance_ledger.having(Sum(ple.amount) < 0) + + advance_data = advance_ledger.run() + + for row in advance_data: + data.setdefault(row[0], 0) + data[row[0]] += abs(row[1]) + + return data def get_default_contact(doctype: str, name: str) -> str | None: @@ -958,10 +988,4 @@ def add_party_account(party_type, party, company, account): def render_address(address, check_permissions=True): - try: - from frappe.contacts.doctype.address.address import render_address as _render - except ImportError: - # Older frappe versions where this function is not available - from frappe.contacts.doctype.address.address import get_address_display as _render - - return frappe.call(_render, address, check_permissions=check_permissions) + return frappe.call(_render_address, address, check_permissions=check_permissions) diff --git a/erpnext/accounts/report/accounts_payable/accounts_payable.js b/erpnext/accounts/report/accounts_payable/accounts_payable.js index 86463f1f1f2..445e532183b 100644 --- a/erpnext/accounts/report/accounts_payable/accounts_payable.js +++ b/erpnext/accounts/report/accounts_payable/accounts_payable.js @@ -61,32 +61,10 @@ frappe.query_reports["Accounts Payable"] = { default: "Due Date", }, { - fieldname: "range1", - label: __("Ageing Range 1"), - fieldtype: "Int", - default: "30", - reqd: 1, - }, - { - fieldname: "range2", - label: __("Ageing Range 2"), - fieldtype: "Int", - default: "60", - reqd: 1, - }, - { - fieldname: "range3", - label: __("Ageing Range 3"), - fieldtype: "Int", - default: "90", - reqd: 1, - }, - { - fieldname: "range4", - label: __("Ageing Range 4"), - fieldtype: "Int", - default: "120", - reqd: 1, + fieldname: "range", + label: __("Ageing Range"), + fieldtype: "Data", + default: "30, 60, 90, 120", }, { fieldname: "payment_terms_template", @@ -162,6 +140,11 @@ frappe.query_reports["Accounts Payable"] = { label: __("In Party Currency"), fieldtype: "Check", }, + { + fieldname: "handle_employee_advances", + label: __("Handle Employee Advances"), + fieldtype: "Check", + }, ], formatter: function (value, row, column, data, default_formatter) { diff --git a/erpnext/accounts/report/accounts_payable/test_accounts_payable.py b/erpnext/accounts/report/accounts_payable/test_accounts_payable.py index 43856bf569f..8971dc3d37b 100644 --- a/erpnext/accounts/report/accounts_payable/test_accounts_payable.py +++ b/erpnext/accounts/report/accounts_payable/test_accounts_payable.py @@ -30,10 +30,7 @@ class TestAccountsPayable(AccountsTestMixin, FrappeTestCase): "party_type": "Supplier", "party": [self.supplier], "report_date": today(), - "range1": 30, - "range2": 60, - "range3": 90, - "range4": 120, + "range": "30, 60, 90, 120", "in_party_currency": 1, } diff --git a/erpnext/accounts/report/accounts_payable_summary/accounts_payable_summary.js b/erpnext/accounts/report/accounts_payable_summary/accounts_payable_summary.js index 92ea9e8f598..cf7a62c6b69 100644 --- a/erpnext/accounts/report/accounts_payable_summary/accounts_payable_summary.js +++ b/erpnext/accounts/report/accounts_payable_summary/accounts_payable_summary.js @@ -24,32 +24,10 @@ frappe.query_reports["Accounts Payable Summary"] = { default: "Due Date", }, { - fieldname: "range1", - label: __("Ageing Range 1"), - fieldtype: "Int", - default: "30", - reqd: 1, - }, - { - fieldname: "range2", - label: __("Ageing Range 2"), - fieldtype: "Int", - default: "60", - reqd: 1, - }, - { - fieldname: "range3", - label: __("Ageing Range 3"), - fieldtype: "Int", - default: "90", - reqd: 1, - }, - { - fieldname: "range4", - label: __("Ageing Range 4"), - fieldtype: "Int", - default: "120", - reqd: 1, + fieldname: "range", + label: __("Ageing Range"), + fieldtype: "Data", + default: "30, 60, 90, 120", }, { fieldname: "finance_book", diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.js b/erpnext/accounts/report/accounts_receivable/accounts_receivable.js index 7e795fbe3c1..9f15bbc333d 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.js +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.js @@ -89,32 +89,10 @@ frappe.query_reports["Accounts Receivable"] = { default: "Due Date", }, { - fieldname: "range1", - label: __("Ageing Range 1"), - fieldtype: "Int", - default: "30", - reqd: 1, - }, - { - fieldname: "range2", - label: __("Ageing Range 2"), - fieldtype: "Int", - default: "60", - reqd: 1, - }, - { - fieldname: "range3", - label: __("Ageing Range 3"), - fieldtype: "Int", - default: "90", - reqd: 1, - }, - { - fieldname: "range4", - label: __("Ageing Range 4"), - fieldtype: "Int", - default: "120", - reqd: 1, + fieldname: "range", + label: __("Ageing Range"), + fieldtype: "Data", + default: "30, 60, 90, 120", }, { fieldname: "customer_group", diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py index f8511d2f497..49dce0e299b 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py @@ -50,6 +50,11 @@ class ReceivablePayableReport: getdate(nowdate()) if self.filters.report_date > getdate(nowdate()) else self.filters.report_date ) + if not self.filters.range: + self.filters.range = "30, 60, 90, 120" + self.ranges = [num.strip() for num in self.filters.range.split(",") if num.strip().isdigit()] + self.range_numbers = [num for num in range(1, len(self.ranges) + 2)] + def run(self, args): self.filters.update(args) self.set_defaults() @@ -112,6 +117,26 @@ class ReceivablePayableReport: self.build_data() + def build_voucher_dict(self, ple): + return frappe._dict( + voucher_type=ple.voucher_type, + voucher_no=ple.voucher_no, + party=ple.party, + party_account=ple.account, + posting_date=ple.posting_date, + account_currency=ple.account_currency, + remarks=ple.remarks, + invoiced=0.0, + paid=0.0, + credit_note=0.0, + outstanding=0.0, + invoiced_in_account_currency=0.0, + paid_in_account_currency=0.0, + credit_note_in_account_currency=0.0, + outstanding_in_account_currency=0.0, + cost_center=ple.cost_center, + ) + def init_voucher_balance(self): # build all keys, since we want to exclude vouchers beyond the report date for ple in self.ple_entries: @@ -123,24 +148,8 @@ class ReceivablePayableReport: key = (ple.account, ple.voucher_type, ple.voucher_no, ple.party) if key not in self.voucher_balance: - self.voucher_balance[key] = frappe._dict( - voucher_type=ple.voucher_type, - voucher_no=ple.voucher_no, - party=ple.party, - party_account=ple.account, - posting_date=ple.posting_date, - account_currency=ple.account_currency, - remarks=ple.remarks, - invoiced=0.0, - paid=0.0, - credit_note=0.0, - outstanding=0.0, - invoiced_in_account_currency=0.0, - paid_in_account_currency=0.0, - credit_note_in_account_currency=0.0, - outstanding_in_account_currency=0.0, - cost_center=ple.cost_center, - ) + self.voucher_balance[key] = self.build_voucher_dict(ple) + self.get_invoices(ple) if self.filters.get("group_by_party"): @@ -208,6 +217,18 @@ class ReceivablePayableReport: row = self.voucher_balance.get(key) + # Build and use a separate row for Employee Advances. + # This allows Payments or Journals made against Emp Advance to be processed. + if ( + not row + and ple.against_voucher_type == "Employee Advance" + and self.filters.handle_employee_advances + ): + _d = self.build_voucher_dict(ple) + _d.voucher_type = ple.against_voucher_type + _d.voucher_no = ple.against_voucher_no + row = self.voucher_balance[key] = _d + if not row: # no invoice, this is an invoice / stand-alone payment / credit note if self.filters.get("ignore_accounts"): @@ -289,8 +310,8 @@ class ReceivablePayableReport: must_consider = False if self.filters.get("for_revaluation_journals"): - if (abs(row.outstanding) >= 0.0 / 10**self.currency_precision) or ( - abs(row.outstanding_in_account_currency) >= 0.0 / 10**self.currency_precision + if (abs(row.outstanding) >= 1.0 / 10**self.currency_precision) or ( + abs(row.outstanding_in_account_currency) >= 1.0 / 10**self.currency_precision ): must_consider = True else: @@ -364,6 +385,7 @@ class ReceivablePayableReport: self.delivery_notes = frappe._dict() # delivery note link inside sales invoice + # nosemgrep si_against_dn = frappe.db.sql( """ select parent, delivery_note @@ -379,6 +401,7 @@ class ReceivablePayableReport: if d.delivery_note: self.delivery_notes.setdefault(d.parent, set()).add(d.delivery_note) + # nosemgrep dn_against_si = frappe.db.sql( """ select distinct parent, against_sales_invoice @@ -396,13 +419,16 @@ class ReceivablePayableReport: def get_invoice_details(self): self.invoice_details = frappe._dict() if self.account_type == "Receivable": + # nosemgrep si_list = frappe.db.sql( """ select name, due_date, po_no from `tabSales Invoice` where posting_date <= %s + and company = %s + and docstatus = 1 """, - self.filters.report_date, + (self.filters.report_date, self.filters.company), as_dict=1, ) for d in si_list: @@ -410,6 +436,7 @@ class ReceivablePayableReport: # Get Sales Team if self.filters.show_sales_person: + # nosemgrep sales_team = frappe.db.sql( """ select parent, sales_person @@ -424,25 +451,33 @@ class ReceivablePayableReport: ) if self.account_type == "Payable": + # nosemgrep for pi in frappe.db.sql( """ select name, due_date, bill_no, bill_date from `tabPurchase Invoice` - where posting_date <= %s + where + posting_date <= %s + and company = %s + and docstatus = 1 """, - self.filters.report_date, + (self.filters.report_date, self.filters.company), as_dict=1, ): self.invoice_details.setdefault(pi.name, pi) # Invoices booked via Journal Entries + # nosemgrep journal_entries = frappe.db.sql( """ select name, due_date, bill_no, bill_date from `tabJournal Entry` - where posting_date <= %s + where + posting_date <= %s + and company = %s + and docstatus = 1 """, - self.filters.report_date, + (self.filters.report_date, self.filters.company), as_dict=1, ) @@ -451,6 +486,8 @@ class ReceivablePayableReport: self.invoice_details.setdefault(je.name, je) def set_party_details(self, row): + if not row.party: + return # customer / supplier name party_details = self.get_party_details(row.party) or {} row.update(party_details) @@ -475,6 +512,7 @@ class ReceivablePayableReport: def get_payment_terms(self, row): # build payment_terms for row + # nosemgrep payment_terms_details = frappe.db.sql( f""" select @@ -484,7 +522,8 @@ class ReceivablePayableReport: from `tab{row.voucher_type}` si, `tabPayment Schedule` ps where si.name = ps.parent and - si.name = %s + si.name = %s and + si.is_return = 0 order by ps.paid_amount desc, due_date """, row.voucher_no, @@ -687,6 +726,7 @@ class ReceivablePayableReport: def get_return_entries(self): doctype = "Sales Invoice" if self.account_type == "Receivable" else "Purchase Invoice" filters = { + "posting_date": ("<=", self.filters.report_date), "is_return": 1, "docstatus": 1, "company": self.filters.company, @@ -717,37 +757,22 @@ class ReceivablePayableReport: # ageing buckets should not have amounts if due date is not reached if getdate(entry_date) > getdate(self.filters.report_date): - row.range1 = row.range2 = row.range3 = row.range4 = row.range5 = 0.0 + [setattr(row, f"range{i}", 0.0) for i in self.range_numbers] - row.total_due = row.range1 + row.range2 + row.range3 + row.range4 + row.range5 + row.total_due = sum(row[f"range{i}"] for i in self.range_numbers) def get_ageing_data(self, entry_date, row): # [0-30, 30-60, 60-90, 90-120, 120-above] - row.range1 = row.range2 = row.range3 = row.range4 = row.range5 = 0.0 + [setattr(row, f"range{i}", 0.0) for i in self.range_numbers] if not (self.age_as_on and entry_date): return row.age = (getdate(self.age_as_on) - getdate(entry_date)).days or 0 - index = None - if not (self.filters.range1 and self.filters.range2 and self.filters.range3 and self.filters.range4): - self.filters.range1, self.filters.range2, self.filters.range3, self.filters.range4 = ( - 30, - 60, - 90, - 120, - ) - - for i, days in enumerate( - [self.filters.range1, self.filters.range2, self.filters.range3, self.filters.range4] - ): - if cint(row.age) <= cint(days): - index = i - break - - if index is None: - index = 4 + index = next( + (i for i, days in enumerate(self.ranges) if cint(row.age) <= cint(days)), len(self.ranges) + ) row["range" + str(index + 1)] = row.outstanding def get_ple_entries(self): @@ -809,6 +834,7 @@ class ReceivablePayableReport: if self.filters.get("sales_person"): lft, rgt = frappe.db.get_value("Sales Person", self.filters.get("sales_person"), ["lft", "rgt"]) + # nosemgrep records = frappe.db.sql( """ select distinct parent, parenttype @@ -987,22 +1013,29 @@ class ReceivablePayableReport: def get_columns(self): self.columns = [] - self.add_column("Posting Date", fieldtype="Date") + self.add_column(_("Posting Date"), fieldname="posting_date", fieldtype="Date") self.add_column( - label="Party Type", + label=_("Party Type"), fieldname="party_type", fieldtype="Data", width=100, ) self.add_column( - label="Party", + label=_("Party"), fieldname="party", fieldtype="Dynamic Link", options="party_type", width=180, ) + if self.account_type == "Receivable": + label = _("Receivable Account") + elif self.account_type == "Payable": + label = _("Payable Account") + else: + label = _("Party Account") + self.add_column( - label=self.account_type + " Account", + label=label, fieldname="party_account", fieldtype="Link", options="Account", @@ -1011,10 +1044,10 @@ class ReceivablePayableReport: if self.party_naming_by == "Naming Series": if self.account_type == "Payable": - label = "Supplier Name" + label = _("Supplier Name") fieldname = "supplier_name" else: - label = "Customer Name" + label = _("Customer Name") fieldname = "customer_name" self.add_column( label=label, @@ -1040,7 +1073,7 @@ class ReceivablePayableReport: width=180, ) - self.add_column(label="Due Date", fieldtype="Date") + self.add_column(label=_("Due Date"), fieldname="due_date", fieldtype="Date") if self.account_type == "Payable": self.add_column(label=_("Bill No"), fieldname="bill_no", fieldtype="Data") @@ -1059,6 +1092,7 @@ class ReceivablePayableReport: self.add_column(_("Debit Note"), fieldname="credit_note") self.add_column(_("Outstanding Amount"), fieldname="outstanding") + self.add_column(label=_("Age (Days)"), fieldname="age", fieldtype="Int", width=80) self.setup_ageing_columns() self.add_column( @@ -1117,34 +1151,26 @@ class ReceivablePayableReport: def setup_ageing_columns(self): # for charts self.ageing_column_labels = [] - self.add_column(label=_("Age (Days)"), fieldname="age", fieldtype="Int", width=80) + ranges = [*self.ranges, "Above"] + + prev_range_value = 0 + for idx, curr_range_value in enumerate(ranges): + label = f"{prev_range_value}-{curr_range_value}" + self.add_column(label=label, fieldname="range" + str(idx + 1)) - for i, label in enumerate( - [ - "0-{range1}".format(range1=self.filters["range1"]), - "{range1}-{range2}".format( - range1=cint(self.filters["range1"]) + 1, range2=self.filters["range2"] - ), - "{range2}-{range3}".format( - range2=cint(self.filters["range2"]) + 1, range3=self.filters["range3"] - ), - "{range3}-{range4}".format( - range3=cint(self.filters["range3"]) + 1, range4=self.filters["range4"] - ), - _("{range4}-Above").format(range4=cint(self.filters["range4"]) + 1), - ] - ): - self.add_column(label=label, fieldname="range" + str(i + 1)) self.ageing_column_labels.append(label) + if curr_range_value.isdigit(): + prev_range_value = cint(curr_range_value) + 1 + def get_chart_data(self): + precision = cint(frappe.db.get_default("float_precision")) or 2 rows = [] for row in self.data: row = frappe._dict(row) if not cint(row.bold): - values = [row.range1, row.range2, row.range3, row.range4, row.range5] - precision = cint(frappe.db.get_default("float_precision")) or 2 - rows.append({"values": [flt(val, precision) for val in values]}) + values = [flt(row.get(f"range{i}", None), precision) for i in self.range_numbers] + rows.append({"values": values}) self.chart = { "data": {"labels": self.ageing_column_labels, "datasets": rows}, diff --git a/erpnext/accounts/report/accounts_receivable/test_accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/test_accounts_receivable.py index c4baa4e4842..39ca78153c3 100644 --- a/erpnext/accounts/report/accounts_receivable/test_accounts_receivable.py +++ b/erpnext/accounts/report/accounts_receivable/test_accounts_receivable.py @@ -83,10 +83,7 @@ class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase): "party": [self.customer], "report_date": add_days(today(), 2), "based_on_payment_terms": 0, - "range1": 30, - "range2": 60, - "range3": 90, - "range4": 120, + "range": "30, 60, 90, 120", "show_remarks": False, } @@ -116,10 +113,7 @@ class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase): "company": self.company, "based_on_payment_terms": 1, "report_date": today(), - "range1": 30, - "range2": 60, - "range3": 90, - "range4": 120, + "range": "30, 60, 90, 120", "show_remarks": True, } @@ -172,10 +166,7 @@ class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase): filters = { "company": self.company, "report_date": today(), - "range1": 30, - "range2": 60, - "range3": 90, - "range4": 120, + "range": "30, 60, 90, 120", "show_remarks": True, } @@ -266,10 +257,7 @@ class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase): "company": self.company, "based_on_payment_terms": 0, "report_date": today(), - "range1": 30, - "range2": 60, - "range3": 90, - "range4": 120, + "range": "30, 60, 90, 120", } report = execute(filters) @@ -328,10 +316,7 @@ class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase): filters = { "company": self.company, "report_date": today(), - "range1": 30, - "range2": 60, - "range3": 90, - "range4": 120, + "range": "30, 60, 90, 120", } report = execute(filters) @@ -397,10 +382,7 @@ class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase): filters = { "company": self.company, "report_date": today(), - "range1": 30, - "range2": 60, - "range3": 90, - "range4": 120, + "range": "30, 60, 90, 120", } report = execute(filters) self.assertEqual(report[1], []) @@ -416,10 +398,7 @@ class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase): filters = { "company": self.company, "report_date": today(), - "range1": 30, - "range2": 60, - "range3": 90, - "range4": 120, + "range": "30, 60, 90, 120", "group_by_party": True, } report = execute(filters)[1] @@ -493,10 +472,7 @@ class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase): filters = { "company": self.company, "report_date": today(), - "range1": 30, - "range2": 60, - "range3": 90, - "range4": 120, + "range": "30, 60, 90, 120", "show_future_payments": True, } report = execute(filters)[1] @@ -555,10 +531,7 @@ class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase): filters = { "company": self.company, "report_date": today(), - "range1": 30, - "range2": 60, - "range3": 90, - "range4": 120, + "range": "30, 60, 90, 120", "sales_person": sales_person.name, "show_sales_person": True, } @@ -575,10 +548,7 @@ class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase): filters = { "company": self.company, "report_date": today(), - "range1": 30, - "range2": 60, - "range3": 90, - "range4": 120, + "range": "30, 60, 90, 120", "cost_center": self.cost_center, } report = execute(filters)[1] @@ -593,10 +563,7 @@ class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase): filters = { "company": self.company, "report_date": today(), - "range1": 30, - "range2": 60, - "range3": 90, - "range4": 120, + "range": "30, 60, 90, 120", "customer_group": cus_group, } report = execute(filters)[1] @@ -618,10 +585,7 @@ class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase): filters = { "company": self.company, "report_date": today(), - "range1": 30, - "range2": 60, - "range3": 90, - "range4": 120, + "range": "30, 60, 90, 120", "customer_group": cus_groups_list, # Use the list of customer groups } report = execute(filters)[1] @@ -660,10 +624,7 @@ class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase): filters = { "company": self.company, "report_date": today(), - "range1": 30, - "range2": 60, - "range3": 90, - "range4": 120, + "range": "30, 60, 90, 120", "party_account": self.debit_to, } report = execute(filters)[1] @@ -711,10 +672,7 @@ class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase): "party_type": "Customer", "party": [self.customer], "report_date": today(), - "range1": 30, - "range2": 60, - "range3": 90, - "range4": 120, + "range": "30, 60, 90, 120", "in_party_currency": 1, } @@ -754,10 +712,7 @@ class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase): "party_type": "Customer", "party": [self.customer1, self.customer3], "report_date": today(), - "range1": 30, - "range2": 60, - "range3": 90, - "range4": 120, + "range": "30, 60, 90, 120", } si1 = self.create_sales_invoice(no_payment_schedule=True, do_not_submit=True) @@ -837,10 +792,7 @@ class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase): filters = { "company": self.company, "report_date": today(), - "range1": 30, - "range2": 60, - "range3": 90, - "range4": 120, + "range": "30, 60, 90, 120", } report_ouput = execute(filters)[1] @@ -903,10 +855,7 @@ class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase): { "company": self.company, "report_date": today(), - "range1": 30, - "range2": 60, - "range3": 90, - "range4": 120, + "range": "30, 60, 90, 120", "show_future_payments": True, "in_party_currency": False, } @@ -965,10 +914,7 @@ class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase): filters = { "company": self.company, "report_date": today(), - "range1": 30, - "range2": 60, - "range3": 90, - "range4": 120, + "range": "30, 60, 90, 120", } # check invoice grand total and invoiced column's value for 3 payment terms @@ -991,10 +937,7 @@ class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase): filters = { "company": self.company, "report_date": today(), - "range1": 30, - "range2": 60, - "range3": 90, - "range4": 120, + "range": "30, 60, 90, 120", } # check invoice grand total and invoiced column's value for 3 payment terms diff --git a/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.js b/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.js index 964abc23747..e36f40169b3 100644 --- a/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.js +++ b/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.js @@ -24,32 +24,10 @@ frappe.query_reports["Accounts Receivable Summary"] = { default: "Due Date", }, { - fieldname: "range1", - label: __("Ageing Range 1"), - fieldtype: "Int", - default: "30", - reqd: 1, - }, - { - fieldname: "range2", - label: __("Ageing Range 2"), - fieldtype: "Int", - default: "60", - reqd: 1, - }, - { - fieldname: "range3", - label: __("Ageing Range 3"), - fieldtype: "Int", - default: "90", - reqd: 1, - }, - { - fieldname: "range4", - label: __("Ageing Range 4"), - fieldtype: "Int", - default: "120", - reqd: 1, + fieldname: "range", + label: __("Ageing Range"), + fieldtype: "Data", + default: "30, 60, 90, 120", }, { fieldname: "finance_book", diff --git a/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.py b/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.py index 6a1b1057724..87fc7ea68be 100644 --- a/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.py +++ b/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.py @@ -104,25 +104,23 @@ class AccountsReceivableSummary(ReceivablePayableReport): self.set_party_details(d) def init_party_total(self, row): + default_dict = { + "invoiced": 0.0, + "paid": 0.0, + "credit_note": 0.0, + "outstanding": 0.0, + "total_due": 0.0, + "future_amount": 0.0, + "sales_person": [], + "party_type": row.party_type, + } + for i in self.range_numbers: + range_key = f"range{i}" + default_dict[range_key] = 0.0 + self.party_total.setdefault( row.party, - frappe._dict( - { - "invoiced": 0.0, - "paid": 0.0, - "credit_note": 0.0, - "outstanding": 0.0, - "range1": 0.0, - "range2": 0.0, - "range3": 0.0, - "range4": 0.0, - "range5": 0.0, - "total_due": 0.0, - "future_amount": 0.0, - "sales_person": [], - "party_type": row.party_type, - } - ), + frappe._dict(default_dict), ) def set_party_details(self, row): @@ -173,6 +171,7 @@ class AccountsReceivableSummary(ReceivablePayableReport): self.add_column(_("Difference"), fieldname="diff") self.setup_ageing_columns() + self.add_column(label="Total Amount Due", fieldname="total_due") if self.filters.show_future_payments: self.add_column(label=_("Future Payment Amount"), fieldname="future_amount") @@ -206,27 +205,6 @@ class AccountsReceivableSummary(ReceivablePayableReport): label=_("Currency"), fieldname="currency", fieldtype="Link", options="Currency", width=80 ) - def setup_ageing_columns(self): - for i, label in enumerate( - [ - "0-{range1}".format(range1=self.filters["range1"]), - "{range1}-{range2}".format( - range1=cint(self.filters["range1"]) + 1, range2=self.filters["range2"] - ), - "{range2}-{range3}".format( - range2=cint(self.filters["range2"]) + 1, range3=self.filters["range3"] - ), - "{range3}-{range4}".format( - range3=cint(self.filters["range3"]) + 1, range4=self.filters["range4"] - ), - "{range4}-{above}".format(range4=cint(self.filters["range4"]) + 1, above=_("Above")), - ] - ): - self.add_column(label=label, fieldname="range" + str(i + 1)) - - # Add column for total due amount - self.add_column(label="Total Amount Due", fieldname="total_due") - def get_gl_balance(report_date, company): return frappe._dict( diff --git a/erpnext/accounts/report/accounts_receivable_summary/test_accounts_receivable_summary.py b/erpnext/accounts/report/accounts_receivable_summary/test_accounts_receivable_summary.py index 4ef607bab28..a98cc6af7a3 100644 --- a/erpnext/accounts/report/accounts_receivable_summary/test_accounts_receivable_summary.py +++ b/erpnext/accounts/report/accounts_receivable_summary/test_accounts_receivable_summary.py @@ -27,10 +27,7 @@ class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase): "company": self.company, "customer": self.customer, "posting_date": today(), - "range1": 30, - "range2": 60, - "range3": 90, - "range4": 120, + "range": "30, 60, 90, 120", } si = create_sales_invoice( @@ -121,10 +118,7 @@ class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase): "company": self.company, "customer": self.customer, "posting_date": today(), - "range1": 30, - "range2": 60, - "range3": 90, - "range4": 120, + "range": "30, 60, 90, 120", } si = create_sales_invoice( diff --git a/erpnext/accounts/report/asset_depreciation_ledger/asset_depreciation_ledger.py b/erpnext/accounts/report/asset_depreciation_ledger/asset_depreciation_ledger.py index e1545bdcd87..a21103c719d 100644 --- a/erpnext/accounts/report/asset_depreciation_ledger/asset_depreciation_ledger.py +++ b/erpnext/accounts/report/asset_depreciation_ledger/asset_depreciation_ledger.py @@ -89,7 +89,9 @@ def get_data(filters): & (DepreciationSchedule.schedule_date == d.posting_date) ) ).run(as_dict=True) - asset_data.accumulated_depreciation_amount = query[0]["accumulated_depreciation_amount"] + asset_data.accumulated_depreciation_amount = ( + query[0]["accumulated_depreciation_amount"] if query else 0 + ) else: asset_data.accumulated_depreciation_amount += d.debit diff --git a/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.js b/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.js index 49771d7ebe9..0f74df6f909 100644 --- a/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.js +++ b/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.js @@ -46,5 +46,11 @@ frappe.query_reports["Asset Depreciations and Balances"] = { options: "Asset", depends_on: "eval: doc.group_by == 'Asset'", }, + { + fieldname: "finance_book", + label: __("Finance Book"), + fieldtype: "Link", + options: "Finance Book", + }, ], }; diff --git a/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.py b/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.py index f9a008ade7f..cdd5baf3240 100644 --- a/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.py +++ b/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.py @@ -36,6 +36,7 @@ def get_group_by_asset_category_data(filters): + flt(row.cost_of_new_purchase) - flt(row.cost_of_sold_asset) - flt(row.cost_of_scrapped_asset) + - flt(row.cost_of_capitalized_asset) ) row.update( @@ -68,7 +69,10 @@ def get_group_by_asset_category_data(filters): def get_asset_categories_for_grouped_by_category(filters): condition = "" if filters.get("asset_category"): - condition += " and asset_category = %(asset_category)s" + condition += " and a.asset_category = %(asset_category)s" + if filters.get("finance_book"): + condition += " and exists (select 1 from `tabAsset Depreciation Schedule` ads where ads.asset = a.name and ads.finance_book = %(finance_book)s)" + # nosemgrep return frappe.db.sql( f""" @@ -108,10 +112,26 @@ def get_asset_categories_for_grouped_by_category(filters): end else 0 - end), 0) as cost_of_scrapped_asset + end), 0) as cost_of_scrapped_asset, + ifnull(sum(case when ifnull(a.disposal_date, 0) != 0 + and a.disposal_date >= %(from_date)s + and a.disposal_date <= %(to_date)s then + case when a.status = "Capitalized" then + a.gross_purchase_amount + else + 0 + end + else + 0 + end), 0) as cost_of_capitalized_asset from `tabAsset` a - where docstatus=1 and company=%(company)s and purchase_date <= %(to_date)s {condition} - and not exists(select name from `tabAsset Capitalization Asset Item` where asset = a.name) + where a.docstatus=1 and a.company=%(company)s and a.purchase_date <= %(to_date)s {condition} + and not exists( + select 1 from `tabAsset Capitalization Asset Item` acai join `tabAsset Capitalization` ac on acai.parent=ac.name + where acai.asset = a.name + and ac.posting_date < %(from_date)s + and ac.docstatus=1 + ) group by a.asset_category """, { @@ -119,6 +139,7 @@ def get_asset_categories_for_grouped_by_category(filters): "from_date": filters.from_date, "company": filters.company, "asset_category": filters.get("asset_category"), + "finance_book": filters.get("finance_book"), }, as_dict=1, ) @@ -127,55 +148,77 @@ def get_asset_categories_for_grouped_by_category(filters): def get_asset_details_for_grouped_by_category(filters): condition = "" if filters.get("asset"): - condition += " and name = %(asset)s" + condition += " and a.name = %(asset)s" + if filters.get("finance_book"): + condition += " and exists (select 1 from `tabAsset Depreciation Schedule` ads where ads.asset = a.name and ads.finance_book = %(finance_book)s)" + + # nosemgrep return frappe.db.sql( f""" - SELECT name, - ifnull(sum(case when purchase_date < %(from_date)s then - case when ifnull(disposal_date, 0) = 0 or disposal_date >= %(from_date)s then - gross_purchase_amount + SELECT a.name, + ifnull(sum(case when a.purchase_date < %(from_date)s then + case when ifnull(a.disposal_date, 0) = 0 or a.disposal_date >= %(from_date)s then + a.gross_purchase_amount else 0 end else 0 end), 0) as cost_as_on_from_date, - ifnull(sum(case when purchase_date >= %(from_date)s then - gross_purchase_amount + ifnull(sum(case when a.purchase_date >= %(from_date)s then + a.gross_purchase_amount else 0 end), 0) as cost_of_new_purchase, - ifnull(sum(case when ifnull(disposal_date, 0) != 0 - and disposal_date >= %(from_date)s - and disposal_date <= %(to_date)s then - case when status = "Sold" then - gross_purchase_amount + ifnull(sum(case when ifnull(a.disposal_date, 0) != 0 + and a.disposal_date >= %(from_date)s + and a.disposal_date <= %(to_date)s then + case when a.status = "Sold" then + a.gross_purchase_amount else 0 end else 0 end), 0) as cost_of_sold_asset, - ifnull(sum(case when ifnull(disposal_date, 0) != 0 - and disposal_date >= %(from_date)s - and disposal_date <= %(to_date)s then - case when status = "Scrapped" then - gross_purchase_amount + ifnull(sum(case when ifnull(a.disposal_date, 0) != 0 + and a.disposal_date >= %(from_date)s + and a.disposal_date <= %(to_date)s then + case when a.status = "Scrapped" then + a.gross_purchase_amount else 0 end else 0 - end), 0) as cost_of_scrapped_asset - from `tabAsset` - where docstatus=1 and company=%(company)s and purchase_date <= %(to_date)s {condition} - group by name + end), 0) as cost_of_scrapped_asset, + ifnull(sum(case when ifnull(a.disposal_date, 0) != 0 + and a.disposal_date >= %(from_date)s + and a.disposal_date <= %(to_date)s then + case when a.status = "Capitalized" then + a.gross_purchase_amount + else + 0 + end + else + 0 + end), 0) as cost_of_capitalized_asset + from `tabAsset` a + where a.docstatus=1 and a.company=%(company)s and a.purchase_date <= %(to_date)s {condition} + and not exists( + select 1 from `tabAsset Capitalization Asset Item` acai join `tabAsset Capitalization` ac on acai.parent=ac.name + where acai.asset = a.name + and ac.posting_date < %(from_date)s + and ac.docstatus=1 + ) + group by a.name """, { "to_date": filters.to_date, "from_date": filters.from_date, "company": filters.company, "asset": filters.get("asset"), + "finance_book": filters.get("finance_book"), }, as_dict=1, ) @@ -197,6 +240,7 @@ def get_group_by_asset_data(filters): + flt(row.cost_of_new_purchase) - flt(row.cost_of_sold_asset) - flt(row.cost_of_scrapped_asset) + - flt(row.cost_of_capitalized_asset) ) row.update(next(asset for asset in assets if asset["asset"] == asset_detail.get("name", ""))) @@ -223,9 +267,15 @@ def get_group_by_asset_data(filters): def get_assets_for_grouped_by_category(filters): condition = "" if filters.get("asset_category"): - condition = " and a.asset_category = '{}'".format(filters.get("asset_category")) + condition = f" and a.asset_category = '{filters.get('asset_category')}'" + finance_book_filter = "" + if filters.get("finance_book"): + finance_book_filter += " and ifnull(gle.finance_book, '')=%(finance_book)s" + condition += " and exists (select 1 from `tabAsset Depreciation Schedule` ads where ads.asset = a.name and ads.finance_book = %(finance_book)s)" + + # nosemgrep return frappe.db.sql( - """ + f""" SELECT results.asset_category, sum(results.accumulated_depreciation_as_on_from_date) as accumulated_depreciation_as_on_from_date, sum(results.depreciation_eliminated_during_the_period) as depreciation_eliminated_during_the_period, @@ -255,7 +305,14 @@ def get_assets_for_grouped_by_category(filters): aca.parent = a.asset_category and aca.company_name = %(company)s join `tabCompany` company on company.name = %(company)s - where a.docstatus=1 and a.company=%(company)s and a.purchase_date <= %(to_date)s and gle.debit != 0 and gle.is_cancelled = 0 and gle.account = ifnull(aca.depreciation_expense_account, company.depreciation_expense_account) {0} + where + a.docstatus=1 + and a.company=%(company)s + and a.purchase_date <= %(to_date)s + and gle.debit != 0 + and gle.is_cancelled = 0 + and gle.account = ifnull(aca.depreciation_expense_account, company.depreciation_expense_account) + {condition} {finance_book_filter} group by a.asset_category union SELECT a.asset_category, @@ -271,11 +328,16 @@ def get_assets_for_grouped_by_category(filters): end), 0) as depreciation_eliminated_during_the_period, 0 as depreciation_amount_during_the_period from `tabAsset` a - where a.docstatus=1 and a.company=%(company)s and a.purchase_date <= %(to_date)s {0} + where a.docstatus=1 and a.company=%(company)s and a.purchase_date <= %(to_date)s {condition} group by a.asset_category) as results group by results.asset_category - """.format(condition), - {"to_date": filters.to_date, "from_date": filters.from_date, "company": filters.company}, + """, + { + "to_date": filters.to_date, + "from_date": filters.from_date, + "company": filters.company, + "finance_book": filters.get("finance_book", ""), + }, as_dict=1, ) @@ -283,9 +345,15 @@ def get_assets_for_grouped_by_category(filters): def get_assets_for_grouped_by_asset(filters): condition = "" if filters.get("asset"): - condition = " and a.name = '{}'".format(filters.get("asset")) + condition = f" and a.name = '{filters.get('asset')}'" + finance_book_filter = "" + if filters.get("finance_book"): + finance_book_filter += " and ifnull(gle.finance_book, '')=%(finance_book)s" + condition += " and exists (select 1 from `tabAsset Depreciation Schedule` ads where ads.asset = a.name and ads.finance_book = %(finance_book)s)" + + # nosemgrep return frappe.db.sql( - """ + f""" SELECT results.name as asset, sum(results.accumulated_depreciation_as_on_from_date) as accumulated_depreciation_as_on_from_date, sum(results.depreciation_eliminated_during_the_period) as depreciation_eliminated_during_the_period, @@ -315,7 +383,14 @@ def get_assets_for_grouped_by_asset(filters): aca.parent = a.asset_category and aca.company_name = %(company)s join `tabCompany` company on company.name = %(company)s - where a.docstatus=1 and a.company=%(company)s and a.purchase_date <= %(to_date)s and gle.debit != 0 and gle.is_cancelled = 0 and gle.account = ifnull(aca.depreciation_expense_account, company.depreciation_expense_account) {0} + where + a.docstatus=1 + and a.company=%(company)s + and a.purchase_date <= %(to_date)s + and gle.debit != 0 + and gle.is_cancelled = 0 + and gle.account = ifnull(aca.depreciation_expense_account, company.depreciation_expense_account) + {finance_book_filter} {condition} group by a.name union SELECT a.name as name, @@ -331,11 +406,16 @@ def get_assets_for_grouped_by_asset(filters): end), 0) as depreciation_eliminated_during_the_period, 0 as depreciation_amount_during_the_period from `tabAsset` a - where a.docstatus=1 and a.company=%(company)s and a.purchase_date <= %(to_date)s {0} + where a.docstatus=1 and a.company=%(company)s and a.purchase_date <= %(to_date)s {condition} group by a.name) as results group by results.name - """.format(condition), - {"to_date": filters.to_date, "from_date": filters.from_date, "company": filters.company}, + """, + { + "to_date": filters.to_date, + "from_date": filters.from_date, + "company": filters.company, + "finance_book": filters.get("finance_book", ""), + }, as_dict=1, ) @@ -389,6 +469,12 @@ def get_columns(filters): "fieldtype": "Currency", "width": 140, }, + { + "label": _("Cost of New Capitalized Asset"), + "fieldname": "cost_of_capitalized_asset", + "fieldtype": "Currency", + "width": 140, + }, { "label": _("Cost as on") + " " + formatdate(filters.to_date), "fieldname": "cost_as_on_to_date", diff --git a/erpnext/accounts/report/balance_sheet/balance_sheet.py b/erpnext/accounts/report/balance_sheet/balance_sheet.py index e89a177a867..fc19c40f8f9 100644 --- a/erpnext/accounts/report/balance_sheet/balance_sheet.py +++ b/erpnext/accounts/report/balance_sheet/balance_sheet.py @@ -7,6 +7,7 @@ from frappe import _ from frappe.utils import cint, flt from erpnext.accounts.report.financial_statements import ( + compute_growth_view_data, get_columns, get_data, get_filtered_list_for_consolidated_report, @@ -95,12 +96,15 @@ def execute(filters=None): filters.periodicity, period_list, filters.accumulated_values, company=filters.company ) - chart = get_chart_data(filters, columns, asset, liability, equity) + chart = get_chart_data(filters, columns, asset, liability, equity, currency) report_summary, primitive_summary = get_report_summary( period_list, asset, liability, equity, provisional_profit_loss, currency, filters ) + if filters.get("selected_view") == "Growth": + compute_growth_view_data(data, period_list) + return columns, data, message, chart, report_summary, primitive_summary @@ -122,13 +126,13 @@ def get_provisional_profit_loss( for period in period_list: key = period if consolidated else period.key - total_assets = flt(asset[0].get(key)) + total_assets = flt(asset[-2].get(key)) effective_liability = 0.00 - if liability: - effective_liability += flt(liability[0].get(key)) - if equity: - effective_liability += flt(equity[0].get(key)) + if liability and liability[-1] == {}: + effective_liability += flt(liability[-2].get(key)) + if equity and equity[-1] == {}: + effective_liability += flt(equity[-2].get(key)) provisional_profit_loss[key] = total_assets - effective_liability total_row[key] = provisional_profit_loss[key] + effective_liability @@ -195,9 +199,9 @@ def get_report_summary( key = period if consolidated else period.key if asset: net_asset += asset[-2].get(key) - if liability: + if liability and liability[-1] == {}: net_liability += liability[-2].get(key) - if equity: + if equity and equity[-1] == {}: net_equity += equity[-2].get(key) if provisional_profit_loss: net_provisional_profit_loss += provisional_profit_loss.get(key) @@ -221,7 +225,7 @@ def get_report_summary( ], (net_asset - net_liability + net_equity) -def get_chart_data(filters, columns, asset, liability, equity): +def get_chart_data(filters, columns, asset, liability, equity, currency): labels = [d.get("label") for d in columns[2:]] asset_data, liability_data, equity_data = [], [], [] @@ -249,4 +253,8 @@ def get_chart_data(filters, columns, asset, liability, equity): else: chart["type"] = "line" + chart["fieldtype"] = "Currency" + chart["options"] = "currency" + chart["currency"] = currency + return chart diff --git a/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.js b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.js index efcfa7a5ee5..2684c87a22a 100644 --- a/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.js +++ b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.js @@ -46,4 +46,20 @@ frappe.query_reports["Bank Reconciliation Statement"] = { fieldtype: "Check", }, ], + formatter: function (value, row, column, data, default_formatter, filter) { + if (column.fieldname == "payment_entry" && value == __("Cheques and Deposits incorrectly cleared")) { + column.link_onclick = + "frappe.query_reports['Bank Reconciliation Statement'].open_utility_report()"; + } + return default_formatter(value, row, column, data); + }, + open_utility_report: function () { + frappe.route_options = { + company: frappe.query_report.get_filter_value("company"), + account: frappe.query_report.get_filter_value("account"), + report_date: frappe.query_report.get_filter_value("report_date"), + }; + frappe.open_in_new_tab = true; + frappe.set_route("query-report", "Cheques and Deposits Incorrectly cleared"); + }, }; diff --git a/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py index 8a8e3a59972..c7dba16492e 100644 --- a/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py +++ b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py @@ -154,8 +154,8 @@ def get_payment_entries(filters): select "Payment Entry" as payment_document, name as payment_entry, reference_no, reference_date as ref_date, - if(paid_to=%(account)s, received_amount, 0) as debit, - if(paid_from=%(account)s, paid_amount, 0) as credit, + if(paid_to=%(account)s, received_amount_after_tax, 0) as debit, + if(paid_from=%(account)s, paid_amount_after_tax, 0) as credit, posting_date, ifnull(party,if(paid_from=%(account)s,paid_to,paid_from)) as against_account, clearance_date, if(paid_to=%(account)s, paid_to_account_currency, paid_from_account_currency) as account_currency from `tabPayment Entry` diff --git a/erpnext/accounts/report/cash_flow/cash_flow.js b/erpnext/accounts/report/cash_flow/cash_flow.js index c824f0d9f38..bc76ee0a114 100644 --- a/erpnext/accounts/report/cash_flow/cash_flow.js +++ b/erpnext/accounts/report/cash_flow/cash_flow.js @@ -1,7 +1,10 @@ // Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -frappe.query_reports["Cash Flow"] = $.extend({}, erpnext.financial_statements); +frappe.query_reports["Cash Flow"] = $.extend(erpnext.financial_statements, { + name_field: "section", + parent_field: "parent_section", +}); erpnext.utils.add_dimensions("Cash Flow", 10); diff --git a/erpnext/accounts/report/cash_flow/cash_flow.py b/erpnext/accounts/report/cash_flow/cash_flow.py index c034f95ec00..562ac5efb81 100644 --- a/erpnext/accounts/report/cash_flow/cash_flow.py +++ b/erpnext/accounts/report/cash_flow/cash_flow.py @@ -30,7 +30,7 @@ def execute(filters=None): company=filters.company, ) - cash_flow_accounts = get_cash_flow_accounts() + cash_flow_sections = get_cash_flow_accounts() # compute net profit / loss income = get_data( @@ -60,14 +60,14 @@ def execute(filters=None): summary_data = {} company_currency = frappe.get_cached_value("Company", filters.company, "default_currency") - for cash_flow_account in cash_flow_accounts: + for cash_flow_section in cash_flow_sections: section_data = [] data.append( { - "account_name": cash_flow_account["section_header"], - "parent_account": None, + "section_name": "'" + cash_flow_section["section_header"] + "'", + "parent_section": None, "indent": 0.0, - "account": cash_flow_account["section_header"], + "section": cash_flow_section["section_header"], } ) @@ -75,31 +75,40 @@ def execute(filters=None): # add first net income in operations section if net_profit_loss: net_profit_loss.update( - {"indent": 1, "parent_account": cash_flow_accounts[0]["section_header"]} + {"indent": 1, "parent_section": cash_flow_sections[0]["section_header"]} ) data.append(net_profit_loss) section_data.append(net_profit_loss) - for account in cash_flow_account["account_types"]: - account_data = get_account_type_based_data( - filters.company, account["account_type"], period_list, filters.accumulated_values, filters + for row in cash_flow_section["account_types"]: + row_data = get_account_type_based_data( + filters.company, row["account_type"], period_list, filters.accumulated_values, filters ) - account_data.update( + accounts = frappe.get_all( + "Account", + filters={ + "account_type": row["account_type"], + "is_group": 0, + }, + pluck="name", + ) + row_data.update( { - "account_name": account["label"], - "account": account["label"], + "section_name": row["label"], + "section": row["label"], "indent": 1, - "parent_account": cash_flow_account["section_header"], + "accounts": accounts, + "parent_section": cash_flow_section["section_header"], "currency": company_currency, } ) - data.append(account_data) - section_data.append(account_data) + data.append(row_data) + section_data.append(row_data) add_total_row_account( data, section_data, - cash_flow_account["section_footer"], + cash_flow_section["section_footer"], period_list, company_currency, summary_data, @@ -109,9 +118,9 @@ def execute(filters=None): add_total_row_account( data, data, _("Net Change in Cash"), period_list, company_currency, summary_data, filters ) - columns = get_columns(filters.periodicity, period_list, filters.accumulated_values, filters.company) + columns = get_columns(filters.periodicity, period_list, filters.accumulated_values, filters.company, True) - chart = get_chart_data(columns, data) + chart = get_chart_data(columns, data, company_currency) report_summary = get_report_summary(summary_data, company_currency) @@ -217,8 +226,8 @@ def get_start_date(period, accumulated_values, company): def add_total_row_account(out, data, label, period_list, currency, summary_data, filters, consolidated=False): total_row = { - "account_name": "'" + _("{0}").format(label) + "'", - "account": "'" + _("{0}").format(label) + "'", + "section_name": "'" + _("{0}").format(label) + "'", + "section": "'" + _("{0}").format(label) + "'", "currency": currency, } @@ -229,7 +238,7 @@ def add_total_row_account(out, data, label, period_list, currency, summary_data, period_list = get_filtered_list_for_consolidated_report(filters, period_list) for row in data: - if row.get("parent_account"): + if row.get("parent_section"): for period in period_list: key = period if consolidated else period["key"] total_row.setdefault(key, 0.0) @@ -252,20 +261,23 @@ def get_report_summary(summary_data, currency): return report_summary -def get_chart_data(columns, data): +def get_chart_data(columns, data, currency): labels = [d.get("label") for d in columns[2:]] + print(data) datasets = [ { - "name": account.get("account").replace("'", ""), - "values": [account.get(d.get("fieldname")) for d in columns[2:]], + "name": section.get("section").replace("'", ""), + "values": [section.get(d.get("fieldname")) for d in columns[2:]], } - for account in data - if account.get("parent_account") is None and account.get("currency") + for section in data + if section.get("parent_section") is None and section.get("currency") ] datasets = datasets[:-1] chart = {"data": {"labels": labels, "datasets": datasets}, "type": "bar"} chart["fieldtype"] = "Currency" + chart["options"] = "currency" + chart["currency"] = currency return chart diff --git a/erpnext/accounts/report/cheques_and_deposits_incorrectly_cleared/__init__.py b/erpnext/accounts/report/cheques_and_deposits_incorrectly_cleared/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/erpnext/accounts/report/cheques_and_deposits_incorrectly_cleared/cheques_and_deposits_incorrectly_cleared.js b/erpnext/accounts/report/cheques_and_deposits_incorrectly_cleared/cheques_and_deposits_incorrectly_cleared.js new file mode 100644 index 00000000000..e83fc6f5b57 --- /dev/null +++ b/erpnext/accounts/report/cheques_and_deposits_incorrectly_cleared/cheques_and_deposits_incorrectly_cleared.js @@ -0,0 +1,44 @@ +// Copyright (c) 2024, Frappe Technologies Pvt. Ltd. and contributors +// For license information, please see license.txt + +frappe.query_reports["Cheques and Deposits Incorrectly cleared"] = { + filters: [ + { + fieldname: "company", + label: __("Company"), + fieldtype: "Link", + options: "Company", + reqd: 1, + default: frappe.defaults.get_user_default("Company"), + }, + { + fieldname: "account", + label: __("Bank Account"), + fieldtype: "Link", + options: "Account", + default: frappe.defaults.get_user_default("Company") + ? locals[":Company"][frappe.defaults.get_user_default("Company")]["default_bank_account"] + : "", + reqd: 1, + get_query: function () { + var company = frappe.query_report.get_filter_value("company"); + return { + query: "erpnext.controllers.queries.get_account_list", + filters: [ + ["Account", "account_type", "in", "Bank, Cash"], + ["Account", "is_group", "=", 0], + ["Account", "disabled", "=", 0], + ["Account", "company", "=", company], + ], + }; + }, + }, + { + fieldname: "report_date", + label: __("Date"), + fieldtype: "Date", + default: frappe.datetime.get_today(), + reqd: 1, + }, + ], +}; diff --git a/erpnext/accounts/report/cheques_and_deposits_incorrectly_cleared/cheques_and_deposits_incorrectly_cleared.json b/erpnext/accounts/report/cheques_and_deposits_incorrectly_cleared/cheques_and_deposits_incorrectly_cleared.json new file mode 100644 index 00000000000..50cf765ca3d --- /dev/null +++ b/erpnext/accounts/report/cheques_and_deposits_incorrectly_cleared/cheques_and_deposits_incorrectly_cleared.json @@ -0,0 +1,29 @@ +{ + "add_total_row": 0, + "columns": [], + "creation": "2024-07-30 17:20:07.570971", + "disabled": 0, + "docstatus": 0, + "doctype": "Report", + "filters": [], + "idx": 0, + "is_standard": "Yes", + "letterhead": null, + "modified": "2024-07-30 17:20:07.570971", + "modified_by": "Administrator", + "module": "Accounts", + "name": "Cheques and Deposits Incorrectly cleared", + "owner": "Administrator", + "prepared_report": 0, + "ref_doctype": "Payment Entry", + "report_name": "Cheques and Deposits Incorrectly cleared", + "report_type": "Script Report", + "roles": [ + { + "role": "Accounts User" + }, + { + "role": "Accounts Manager" + } + ] +} \ No newline at end of file diff --git a/erpnext/accounts/report/cheques_and_deposits_incorrectly_cleared/cheques_and_deposits_incorrectly_cleared.py b/erpnext/accounts/report/cheques_and_deposits_incorrectly_cleared/cheques_and_deposits_incorrectly_cleared.py new file mode 100644 index 00000000000..891dc2c4bb1 --- /dev/null +++ b/erpnext/accounts/report/cheques_and_deposits_incorrectly_cleared/cheques_and_deposits_incorrectly_cleared.py @@ -0,0 +1,153 @@ +# Copyright (c) 2024, Frappe Technologies Pvt. Ltd. and contributors +# For license information, please see license.txt + +import frappe +from frappe import _, qb +from frappe.query_builder import CustomFunction +from frappe.query_builder.custom import ConstantColumn + + +def execute(filters=None): + columns = get_columns() + data = build_data(filters) + return columns, data + + +def build_payment_entry_dict(row: dict) -> dict: + row_dict = frappe._dict() + row_dict.update( + { + "payment_document": row.get("doctype"), + "payment_entry": row.get("name"), + "posting_date": row.get("posting_date"), + "clearance_date": row.get("clearance_date"), + } + ) + if row.get("payment_type") == "Receive" and row.get("party_type") in ["Customer", "Supplier"]: + row_dict.update( + { + "debit": row.get("amount"), + "credit": 0, + } + ) + else: + row_dict.update( + { + "debit": 0, + "credit": row.get("amount"), + } + ) + return row_dict + + +def build_journal_entry_dict(row: dict) -> dict: + row_dict = frappe._dict() + row_dict.update( + { + "payment_document": row.get("doctype"), + "payment_entry": row.get("name"), + "posting_date": row.get("posting_date"), + "clearance_date": row.get("clearance_date"), + "debit": row.get("debit_in_account_currency"), + "credit": row.get("credit_in_account_currency"), + } + ) + return row_dict + + +def build_data(filters): + vouchers = get_amounts_not_reflected_in_system_for_bank_reconciliation_statement(filters) + data = [] + for x in vouchers: + if x.doctype == "Payment Entry": + data.append(build_payment_entry_dict(x)) + elif x.doctype == "Journal Entry": + data.append(build_journal_entry_dict(x)) + return data + + +def get_amounts_not_reflected_in_system_for_bank_reconciliation_statement(filters): + je = qb.DocType("Journal Entry") + jea = qb.DocType("Journal Entry Account") + doctype_name = ConstantColumn("Journal Entry") + + journals = ( + qb.from_(je) + .inner_join(jea) + .on(je.name == jea.parent) + .select( + doctype_name.as_("doctype"), + je.name, + jea.debit_in_account_currency, + jea.credit_in_account_currency, + je.posting_date, + je.clearance_date, + ) + .where( + je.docstatus.eq(1) + & jea.account.eq(filters.account) + & je.posting_date.gt(filters.report_date) + & je.clearance_date.lte(filters.report_date) + & (je.is_opening.isnull() | je.is_opening.eq("No")) + ) + .run(as_dict=1) + ) + + ifelse = CustomFunction("IF", ["condition", "then", "else"]) + pe = qb.DocType("Payment Entry") + doctype_name = ConstantColumn("Payment Entry") + payments = ( + qb.from_(pe) + .select( + doctype_name.as_("doctype"), + pe.name, + ifelse(pe.paid_from.eq(filters.account), pe.paid_amount, pe.received_amount).as_("amount"), + pe.payment_type, + pe.party_type, + pe.posting_date, + pe.clearance_date, + ) + .where( + pe.docstatus.eq(1) + & (pe.paid_from.eq(filters.account) | pe.paid_to.eq(filters.account)) + & pe.posting_date.gt(filters.report_date) + & pe.clearance_date.lte(filters.report_date) + ) + .run(as_dict=1) + ) + + return journals + payments + + +def get_columns(): + return [ + { + "fieldname": "payment_document", + "label": _("Payment Document Type"), + "fieldtype": "Data", + "width": 220, + }, + { + "fieldname": "payment_entry", + "label": _("Payment Document"), + "fieldtype": "Dynamic Link", + "options": "payment_document", + "width": 220, + }, + { + "fieldname": "debit", + "label": _("Debit"), + "fieldtype": "Currency", + "options": "account_currency", + "width": 120, + }, + { + "fieldname": "credit", + "label": _("Credit"), + "fieldtype": "Currency", + "options": "account_currency", + "width": 120, + }, + {"fieldname": "posting_date", "label": _("Posting Date"), "fieldtype": "Date", "width": 110}, + {"fieldname": "clearance_date", "label": _("Clearance Date"), "fieldtype": "Date", "width": 110}, + ] diff --git a/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.py b/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.py index 2931b728a42..d287b30bf0b 100644 --- a/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.py +++ b/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.py @@ -115,7 +115,7 @@ def get_balance_sheet_data(fiscal_year, companies, columns, filters): True, ) - chart = get_chart_data(filters, columns, asset, liability, equity) + chart = get_chart_data(filters, columns, asset, liability, equity, company_currency) return data, message, chart, report_summary @@ -173,7 +173,7 @@ def get_profit_loss_data(fiscal_year, companies, columns, filters): if net_profit_loss: data.append(net_profit_loss) - chart = get_pl_chart_data(filters, columns, income, expense, net_profit_loss) + chart = get_pl_chart_data(filters, columns, income, expense, net_profit_loss, company_currency) report_summary, primitive_summary = get_pl_summary( companies, "", income, expense, net_profit_loss, company_currency, filters, True @@ -469,10 +469,13 @@ def update_parent_account_names(accounts): for d in accounts: if d.account_number: - account_name = d.account_number + " - " + d.account_name + account_key = d.account_number + " - " + d.account_name else: - account_name = d.account_name - name_to_account_map[d.name] = account_name + account_key = d.account_name + + d.account_key = account_key + + name_to_account_map[d.name] = account_key for account in accounts: if account.parent_account: @@ -505,33 +508,26 @@ def get_subsidiary_companies(company): def get_accounts(root_type, companies): accounts = [] - added_accounts = [] for company in companies: - for account in frappe.get_all( - "Account", - fields=[ - "name", - "is_group", - "company", - "parent_account", - "lft", - "rgt", - "root_type", - "report_type", - "account_name", - "account_number", - ], - filters={"company": company, "root_type": root_type}, - ): - if account.account_number: - account_key = account.account_number + "-" + account.account_name - else: - account_key = account.account_name - - if account_key not in added_accounts: - accounts.append(account) - added_accounts.append(account_key) + accounts.extend( + frappe.get_all( + "Account", + fields=[ + "name", + "is_group", + "company", + "parent_account", + "lft", + "rgt", + "root_type", + "report_type", + "account_name", + "account_number", + ], + filters={"company": company, "root_type": root_type}, + ) + ) return accounts @@ -770,15 +766,17 @@ def add_total_row(out, root_type, balance_must_be, companies, company_currency): def filter_accounts(accounts, depth=10): parent_children_map = {} accounts_by_name = {} - for d in accounts: - if d.account_number: - account_name = d.account_number + " - " + d.account_name - else: - account_name = d.account_name - d["company_wise_opening_bal"] = defaultdict(float) - accounts_by_name[account_name] = d + added_accounts = [] - parent_children_map.setdefault(d.parent_account or None, []).append(d) + for d in accounts: + if d.account_key in added_accounts: + continue + + added_accounts.append(d.account_key) + d["company_wise_opening_bal"] = defaultdict(float) + accounts_by_name[d.account_key] = d + + parent_children_map.setdefault(d.parent_account_name or None, []).append(d) filtered_accounts = [] @@ -790,7 +788,7 @@ def filter_accounts(accounts, depth=10): for child in children: child.indent = level filtered_accounts.append(child) - add_to_list(child.name, level + 1) + add_to_list(child.account_key, level + 1) add_to_list(None, 0) diff --git a/erpnext/accounts/report/deferred_revenue_and_expense/deferred_revenue_and_expense.py b/erpnext/accounts/report/deferred_revenue_and_expense/deferred_revenue_and_expense.py index c6d9eac5966..377777ab2a3 100644 --- a/erpnext/accounts/report/deferred_revenue_and_expense/deferred_revenue_and_expense.py +++ b/erpnext/accounts/report/deferred_revenue_and_expense/deferred_revenue_and_expense.py @@ -122,21 +122,24 @@ class Deferred_Item: """ simulate future posting by creating dummy gl entries. starts from the last posting date. """ - if self.service_start_date != self.service_end_date: - if add_days(self.last_entry_date, 1) < self.period_list[-1].to_date: - self.estimate_for_period_list = get_period_list( - self.filters.from_fiscal_year, - self.filters.to_fiscal_year, - add_days(self.last_entry_date, 1), - self.period_list[-1].to_date, - "Date Range", - "Monthly", - company=self.filters.company, - ) - for period in self.estimate_for_period_list: - amount = self.calculate_amount(period.from_date, period.to_date) - gle = self.make_dummy_gle(period.key, period.to_date, amount) - self.gle_entries.append(gle) + if ( + self.service_start_date != self.service_end_date + and add_days(self.last_entry_date, 1) < self.service_end_date + ): + self.estimate_for_period_list = get_period_list( + self.filters.from_fiscal_year, + self.filters.to_fiscal_year, + add_days(self.last_entry_date, 1), + self.service_end_date, + "Date Range", + "Monthly", + company=self.filters.company, + ) + + for period in self.estimate_for_period_list: + amount = self.calculate_amount(period.from_date, period.to_date) + gle = self.make_dummy_gle(period.key, period.to_date, amount) + self.gle_entries.append(gle) def calculate_item_revenue_expense_for_period(self): """ diff --git a/erpnext/accounts/report/financial_statements.py b/erpnext/accounts/report/financial_statements.py index 6d7635979bb..73e49983fb2 100644 --- a/erpnext/accounts/report/financial_statements.py +++ b/erpnext/accounts/report/financial_statements.py @@ -2,6 +2,7 @@ # License: GNU General Public License v3. See license.txt +import copy import functools import math import re @@ -9,6 +10,7 @@ import re import frappe from frappe import _ from frappe.utils import add_days, add_months, cint, cstr, flt, formatdate, get_first_day, getdate +from pypika.terms import ExistsCriterion from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import ( get_accounting_dimensions, @@ -181,12 +183,12 @@ def get_data( company, period_list[0]["year_start_date"] if only_current_fiscal_year else None, period_list[-1]["to_date"], - root.lft, - root.rgt, filters, gl_entries_by_account, - ignore_closing_entries=ignore_closing_entries, + root.lft, + root.rgt, root_type=root_type, + ignore_closing_entries=ignore_closing_entries, ) calculate_values( @@ -333,8 +335,8 @@ def filter_out_zero_value_rows(data, parent_children_map, show_zero_values=False def add_total_row(out, root_type, balance_must_be, period_list, company_currency): total_row = { - "account_name": _("Total {0} ({1})").format(_(root_type), _(balance_must_be)), - "account": _("Total {0} ({1})").format(_(root_type), _(balance_must_be)), + "account_name": "'" + _("Total {0} ({1})").format(_(root_type), _(balance_must_be)) + "'", + "account": "'" + _("Total {0} ({1})").format(_(root_type), _(balance_must_be)) + "'", "currency": company_currency, "opening_balance": 0.0, } @@ -419,93 +421,78 @@ def set_gl_entries_by_account( company, from_date, to_date, - root_lft, - root_rgt, filters, gl_entries_by_account, + root_lft=None, + root_rgt=None, + root_type=None, ignore_closing_entries=False, ignore_opening_entries=False, - root_type=None, ): """Returns a dict like { "account": [gl entries], ... }""" gl_entries = [] - account_filters = { - "company": company, - "is_group": 0, - "lft": (">=", root_lft), - "rgt": ("<=", root_rgt), - } - - if root_type: - account_filters.update( - { - "root_type": root_type, - } + # For balance sheet + ignore_closing_balances = frappe.db.get_single_value( + "Accounts Settings", "ignore_account_closing_balance" + ) + if not from_date and not ignore_closing_balances: + last_period_closing_voucher = frappe.db.get_all( + "Period Closing Voucher", + filters={ + "docstatus": 1, + "company": filters.company, + "period_end_date": ("<", filters["period_start_date"]), + }, + fields=["period_end_date", "name"], + order_by="period_end_date desc", + limit=1, ) + if last_period_closing_voucher: + gl_entries += get_accounting_entries( + "Account Closing Balance", + from_date, + to_date, + filters, + root_lft, + root_rgt, + root_type, + ignore_closing_entries, + last_period_closing_voucher[0].name, + ) + from_date = add_days(last_period_closing_voucher[0].period_end_date, 1) + ignore_opening_entries = True - accounts_list = frappe.db.get_all( - "Account", - filters=account_filters, - pluck="name", + gl_entries += get_accounting_entries( + "GL Entry", + from_date, + to_date, + filters, + root_lft, + root_rgt, + root_type, + ignore_closing_entries, + ignore_opening_entries=ignore_opening_entries, ) - if accounts_list: - # For balance sheet - ignore_closing_balances = frappe.db.get_single_value( - "Accounts Settings", "ignore_account_closing_balance" - ) - if not from_date and not ignore_closing_balances: - last_period_closing_voucher = frappe.db.get_all( - "Period Closing Voucher", - filters={ - "docstatus": 1, - "company": filters.company, - "posting_date": ("<", filters["period_start_date"]), - }, - fields=["posting_date", "name"], - order_by="posting_date desc", - limit=1, - ) - if last_period_closing_voucher: - gl_entries += get_accounting_entries( - "Account Closing Balance", - from_date, - to_date, - accounts_list, - filters, - ignore_closing_entries, - last_period_closing_voucher[0].name, - ) - from_date = add_days(last_period_closing_voucher[0].posting_date, 1) - ignore_opening_entries = True + if filters and filters.get("presentation_currency"): + convert_to_presentation_currency(gl_entries, get_currency(filters)) - gl_entries += get_accounting_entries( - "GL Entry", - from_date, - to_date, - accounts_list, - filters, - ignore_closing_entries, - ignore_opening_entries=ignore_opening_entries, - ) + for entry in gl_entries: + gl_entries_by_account.setdefault(entry.account, []).append(entry) - if filters and filters.get("presentation_currency"): - convert_to_presentation_currency(gl_entries, get_currency(filters)) - - for entry in gl_entries: - gl_entries_by_account.setdefault(entry.account, []).append(entry) - - return gl_entries_by_account + return gl_entries_by_account def get_accounting_entries( doctype, from_date, to_date, - accounts, filters, - ignore_closing_entries, + root_lft=None, + root_rgt=None, + root_type=None, + ignore_closing_entries=None, period_closing_voucher=None, ignore_opening_entries=False, ): @@ -535,13 +522,30 @@ def get_accounting_entries( query = query.where(gl_entry.period_closing_voucher == period_closing_voucher) query = apply_additional_conditions(doctype, query, from_date, ignore_closing_entries, filters) - query = query.where(gl_entry.account.isin(accounts)) + + if (root_lft and root_rgt) or root_type: + account_filter_query = get_account_filter_query(root_lft, root_rgt, root_type, gl_entry) + query = query.where(ExistsCriterion(account_filter_query)) entries = query.run(as_dict=True) return entries +def get_account_filter_query(root_lft, root_rgt, root_type, gl_entry): + acc = frappe.qb.DocType("Account") + exists_query = ( + frappe.qb.from_(acc).select(acc.name).where(acc.name == gl_entry.account).where(acc.is_group == 0) + ) + if root_lft and root_rgt: + exists_query = exists_query.where(acc.lft >= root_lft).where(acc.rgt <= root_rgt) + + if root_type: + exists_query = exists_query.where(acc.root_type == root_type) + + return exists_query + + def apply_additional_conditions(doctype, query, from_date, ignore_closing_entries, filters): gl_entry = frappe.qb.DocType(doctype) accounting_dimensions = get_accounting_dimensions(as_list=False) @@ -613,11 +617,11 @@ def get_cost_centers_with_children(cost_centers): return list(set(all_cost_centers)) -def get_columns(periodicity, period_list, accumulated_values=1, company=None): +def get_columns(periodicity, period_list, accumulated_values=1, company=None, cash_flow=False): columns = [ { "fieldname": "account", - "label": _("Account"), + "label": _("Account") if not cash_flow else _("Section"), "fieldtype": "Link", "options": "Account", "width": 300, @@ -665,3 +669,67 @@ def get_filtered_list_for_consolidated_report(filters, period_list): filtered_summary_list.append(period) return filtered_summary_list + + +def compute_growth_view_data(data, columns): + data_copy = copy.deepcopy(data) + + for row_idx in range(len(data_copy)): + for column_idx in range(1, len(columns)): + previous_period_key = columns[column_idx - 1].get("key") + current_period_key = columns[column_idx].get("key") + current_period_value = data_copy[row_idx].get(current_period_key) + previous_period_value = data_copy[row_idx].get(previous_period_key) + annual_growth = 0 + + if current_period_value is None: + data[row_idx][current_period_key] = None + continue + + if previous_period_value == 0 and current_period_value > 0: + annual_growth = 1 + + elif previous_period_value > 0: + annual_growth = (current_period_value - previous_period_value) / previous_period_value + + growth_percent = round(annual_growth * 100, 2) + + data[row_idx][current_period_key] = growth_percent + + +def compute_margin_view_data(data, columns, accumulated_values): + if not columns: + return + + if not accumulated_values: + columns.append({"key": "total"}) + + data_copy = copy.deepcopy(data) + + base_row = None + for row in data_copy: + if row.get("account_name") == _("Income"): + base_row = row + break + + if not base_row: + return + + for row_idx in range(len(data_copy)): + # Taking the total income from each column (for all the financial years) as the base (100%) + row = data_copy[row_idx] + if not row: + continue + + for column in columns: + curr_period = column.get("key") + base_value = base_row[curr_period] + curr_value = row[curr_period] + + if curr_value is None or base_value <= 0: + data[row_idx][curr_period] = None + continue + + margin_percent = round((curr_value / base_value) * 100, 2) + + data[row_idx][curr_period] = margin_percent diff --git a/erpnext/accounts/report/general_and_payment_ledger_comparison/general_and_payment_ledger_comparison.py b/erpnext/accounts/report/general_and_payment_ledger_comparison/general_and_payment_ledger_comparison.py index 89cf7e504f0..9d079eb9ebd 100644 --- a/erpnext/accounts/report/general_and_payment_ledger_comparison/general_and_payment_ledger_comparison.py +++ b/erpnext/accounts/report/general_and_payment_ledger_comparison/general_and_payment_ledger_comparison.py @@ -199,8 +199,7 @@ class General_Payment_Ledger_Comparison: dict( label=_("Voucher Type"), fieldname="voucher_type", - fieldtype="Link", - options="DocType", + fieldtype="Data", width="100", ) ) @@ -219,8 +218,7 @@ class General_Payment_Ledger_Comparison: dict( label=_("Party Type"), fieldname="party_type", - fieldtype="Link", - options="DocType", + fieldtype="Data", width="100", ) ) diff --git a/erpnext/accounts/report/general_ledger/general_ledger.html b/erpnext/accounts/report/general_ledger/general_ledger.html index 3c4e1a05c97..bdea568bdf4 100644 --- a/erpnext/accounts/report/general_ledger/general_ledger.html +++ b/erpnext/accounts/report/general_ledger/general_ledger.html @@ -48,8 +48,9 @@
{% } %} -
{%= __("Remarks") %}: {%= data[i].remarks %} - {% if(data[i].bill_no) { %} + {% if(data[i].remarks) { %} +
{%= __("Remarks") %}: {%= data[i].remarks %} + {% } else if(data[i].bill_no) { %}
{%= __("Supplier Invoice No") %}: {%= data[i].bill_no %} {% } %} diff --git a/erpnext/accounts/report/general_ledger/general_ledger.py b/erpnext/accounts/report/general_ledger/general_ledger.py index 2564eb0800f..69e3d241f12 100644 --- a/erpnext/accounts/report/general_ledger/general_ledger.py +++ b/erpnext/accounts/report/general_ledger/general_ledger.py @@ -345,10 +345,18 @@ def get_accounts_with_children(accounts): return frappe.qb.from_(doctype).select(doctype.name).where(Criterion.any(conditions)).run(pluck=True) +def set_bill_no(gl_entries): + inv_details = get_supplier_invoice_details() + for gl in gl_entries: + gl["bill_no"] = inv_details.get(gl.get("against_voucher"), "") + + def get_data_with_opening_closing(filters, account_details, accounting_dimensions, gl_entries): data = [] totals_dict = get_totals_dict() + set_bill_no(gl_entries) + gle_map = initialize_gle_map(gl_entries, filters, totals_dict) totals, entries = get_accountwise_gle(filters, accounting_dimensions, gl_entries, gle_map, totals_dict) @@ -362,16 +370,21 @@ def get_data_with_opening_closing(filters, account_details, accounting_dimension if acc_dict.entries: # opening data.append({"debit_in_transaction_currency": None, "credit_in_transaction_currency": None}) - if filters.get("group_by") != "Group by Voucher": + if (not filters.get("group_by") and not filters.get("voucher_no")) or ( + filters.get("group_by") and filters.get("group_by") != "Group by Voucher" + ): data.append(acc_dict.totals.opening) data += acc_dict.entries # totals - data.append(acc_dict.totals.total) + if filters.get("group_by") or not filters.voucher_no: + data.append(acc_dict.totals.total) # closing - if filters.get("group_by") != "Group by Voucher": + if (not filters.get("group_by") and not filters.get("voucher_no")) or ( + filters.get("group_by") and filters.get("group_by") != "Group by Voucher" + ): data.append(acc_dict.totals.closing) data.append({"debit_in_transaction_currency": None, "credit_in_transaction_currency": None}) @@ -536,7 +549,6 @@ def get_account_type_map(company): def get_result_as_list(data, filters): balance, _balance_in_account_currency = 0, 0 - inv_details = get_supplier_invoice_details() for d in data: if not d.get("posting_date"): @@ -546,7 +558,6 @@ def get_result_as_list(data, filters): d["balance"] = balance d["account_currency"] = filters.account_currency - d["bill_no"] = inv_details.get(d.get("against_voucher"), "") return data diff --git a/erpnext/accounts/report/gross_profit/gross_profit.py b/erpnext/accounts/report/gross_profit/gross_profit.py index a9039a9cada..c59a3bd2a7a 100644 --- a/erpnext/accounts/report/gross_profit/gross_profit.py +++ b/erpnext/accounts/report/gross_profit/gross_profit.py @@ -421,10 +421,10 @@ class GrossProfitGenerator: self.load_invoice_items() self.get_delivery_notes() + self.load_product_bundle() if filters.group_by == "Invoice": self.group_items_by_invoice() - self.load_product_bundle() self.load_non_stock_items() self.get_returned_invoice_items() self.process() @@ -440,6 +440,7 @@ class GrossProfitGenerator: if grouped_by_invoice: buying_amount = 0 + base_amount = 0 for row in reversed(self.si_list): if self.filters.get("group_by") == "Monthly": @@ -480,12 +481,11 @@ class GrossProfitGenerator: else: row.buying_amount = flt(self.get_buying_amount(row, row.item_code), self.currency_precision) - if grouped_by_invoice: - if row.indent == 1.0: - buying_amount += row.buying_amount - elif row.indent == 0.0: - row.buying_amount = buying_amount - buying_amount = 0 + if grouped_by_invoice and row.indent == 0.0: + row.buying_amount = buying_amount + row.base_amount = base_amount + buying_amount = 0 + base_amount = 0 # get buying rate if flt(row.qty): @@ -495,11 +495,19 @@ class GrossProfitGenerator: if self.is_not_invoice_row(row): row.buying_rate, row.base_rate = 0.0, 0.0 + if self.is_not_invoice_row(row): + self.update_return_invoices(row) + + if grouped_by_invoice and row.indent == 1.0: + buying_amount += row.buying_amount + base_amount += row.base_amount + # calculate gross profit row.gross_profit = flt(row.base_amount - row.buying_amount, self.currency_precision) if row.base_amount: row.gross_profit_percent = flt( - (row.gross_profit / row.base_amount) * 100.0, self.currency_precision + (row.gross_profit / row.base_amount) * 100.0, + self.currency_precision, ) else: row.gross_profit_percent = 0.0 @@ -510,33 +518,29 @@ class GrossProfitGenerator: if self.grouped: self.get_average_rate_based_on_group_by() + def update_return_invoices(self, row): + if row.parent in self.returned_invoices and row.item_code in self.returned_invoices[row.parent]: + returned_item_rows = self.returned_invoices[row.parent][row.item_code] + for returned_item_row in returned_item_rows: + # returned_items 'qty' should be stateful + if returned_item_row.qty != 0: + if row.qty >= abs(returned_item_row.qty): + row.qty += returned_item_row.qty + row.base_amount += flt(returned_item_row.base_amount, self.currency_precision) + returned_item_row.qty = 0 + returned_item_row.base_amount = 0 + + else: + row.qty = 0 + row.base_amount = 0 + returned_item_row.qty += row.qty + returned_item_row.base_amount += row.base_amount + + row.buying_amount = flt(flt(row.qty) * flt(row.buying_rate), self.currency_precision) + def get_average_rate_based_on_group_by(self): for key in list(self.grouped): - if self.filters.get("group_by") == "Invoice": - for row in self.grouped[key]: - if row.indent == 1.0: - if ( - row.parent in self.returned_invoices - and row.item_code in self.returned_invoices[row.parent] - ): - returned_item_rows = self.returned_invoices[row.parent][row.item_code] - for returned_item_row in returned_item_rows: - # returned_items 'qty' should be stateful - if returned_item_row.qty != 0: - if row.qty >= abs(returned_item_row.qty): - row.qty += returned_item_row.qty - returned_item_row.qty = 0 - else: - row.qty = 0 - returned_item_row.qty += row.qty - row.base_amount += flt(returned_item_row.base_amount, self.currency_precision) - row.buying_amount = flt( - flt(row.qty) * flt(row.buying_rate), self.currency_precision - ) - if flt(row.qty) or row.base_amount: - row = self.set_average_rate(row) - self.grouped_data.append(row) - elif self.filters.get("group_by") == "Payment Term": + if self.filters.get("group_by") == "Payment Term": for i, row in enumerate(self.grouped[key]): invoice_portion = 0 @@ -556,7 +560,7 @@ class GrossProfitGenerator: new_row = self.set_average_rate(new_row) self.grouped_data.append(new_row) - else: + elif self.filters.get("group_by") != "Invoice": for i, row in enumerate(self.grouped[key]): if i == 0: new_row = row @@ -632,6 +636,7 @@ class GrossProfitGenerator: if packed_item.get("parent_detail_docname") == row.item_row: packed_item_row = row.copy() packed_item_row.warehouse = packed_item.warehouse + packed_item_row.qty = packed_item.total_qty * -1 buying_amount += self.get_buying_amount(packed_item_row, packed_item.item_code) return flt(buying_amount, self.currency_precision) @@ -664,7 +669,9 @@ class GrossProfitGenerator: else: my_sle = self.get_stock_ledger_entries(item_code, row.warehouse) if (row.update_stock or row.dn_detail) and my_sle: - parenttype, parent = row.parenttype, row.parent + parenttype = row.parenttype + parent = row.invoice or row.parent + if row.dn_detail: parenttype, parent = "Delivery Note", row.delivery_note @@ -847,6 +854,7 @@ class GrossProfitGenerator: `tabSales Invoice`.project, `tabSales Invoice`.update_stock, `tabSales Invoice`.customer, `tabSales Invoice`.customer_group, `tabSales Invoice`.territory, `tabSales Invoice Item`.item_code, + `tabSales Invoice`.base_net_total as "invoice_base_net_total", `tabSales Invoice Item`.item_name, `tabSales Invoice Item`.description, `tabSales Invoice Item`.warehouse, `tabSales Invoice Item`.item_group, `tabSales Invoice Item`.brand, `tabSales Invoice Item`.so_detail, @@ -907,6 +915,7 @@ class GrossProfitGenerator: """ grouped = OrderedDict() + product_bundles = self.product_bundles.get("Sales Invoice", {}) for row in self.si_list: # initialize list with a header row for each new parent @@ -917,8 +926,7 @@ class GrossProfitGenerator: ) # if item is a bundle, add it's components as seperate rows - if frappe.db.exists("Product Bundle", row.item_code): - bundled_items = self.get_bundle_items(row) + if bundled_items := product_bundles.get(row.parent, {}).get(row.item_code): for x in bundled_items: bundle_item = self.get_bundle_item_row(row, x) grouped.get(row.parent).append(bundle_item) @@ -954,47 +962,40 @@ class GrossProfitGenerator: "item_row": None, "is_return": row.is_return, "cost_center": row.cost_center, - "base_net_amount": frappe.db.get_value("Sales Invoice", row.parent, "base_net_total"), + "base_net_amount": row.invoice_base_net_total, } ) - def get_bundle_items(self, product_bundle): - return frappe.get_all( - "Product Bundle Item", filters={"parent": product_bundle.item_code}, fields=["item_code", "qty"] - ) - - def get_bundle_item_row(self, product_bundle, item): - item_name, description, item_group, brand = self.get_bundle_item_details(item.item_code) - + def get_bundle_item_row(self, row, item): return frappe._dict( { - "parent_invoice": product_bundle.item_code, - "indent": product_bundle.indent + 1, + "parent_invoice": row.item_code, + "parenttype": row.parenttype, + "indent": row.indent + 1, "parent": None, "invoice_or_item": item.item_code, - "posting_date": product_bundle.posting_date, - "posting_time": product_bundle.posting_time, - "project": product_bundle.project, - "customer": product_bundle.customer, - "customer_group": product_bundle.customer_group, + "posting_date": row.posting_date, + "posting_time": row.posting_time, + "project": row.project, + "customer": row.customer, + "customer_group": row.customer_group, "item_code": item.item_code, - "item_name": item_name, - "description": description, - "warehouse": product_bundle.warehouse, - "item_group": item_group, - "brand": brand, - "dn_detail": product_bundle.dn_detail, - "delivery_note": product_bundle.delivery_note, - "qty": (flt(product_bundle.qty) * flt(item.qty)), - "item_row": None, - "is_return": product_bundle.is_return, - "cost_center": product_bundle.cost_center, + "item_name": item.item_name, + "description": item.description, + "warehouse": item.warehouse or row.warehouse, + "update_stock": row.update_stock, + "item_group": "", + "brand": "", + "dn_detail": row.dn_detail, + "delivery_note": row.delivery_note, + "qty": item.total_qty * -1, + "item_row": row.item_row, + "is_return": row.is_return, + "cost_center": row.cost_center, + "invoice": row.parent, } ) - def get_bundle_item_details(self, item_code): - return frappe.db.get_value("Item", item_code, ["item_name", "description", "item_group", "brand"]) - def get_stock_ledger_entries(self, item_code, warehouse): if item_code and warehouse: if (item_code, warehouse) not in self.sle: diff --git a/erpnext/accounts/report/gross_profit/test_gross_profit.py b/erpnext/accounts/report/gross_profit/test_gross_profit.py index 83de93891fe..721be79ed88 100644 --- a/erpnext/accounts/report/gross_profit/test_gross_profit.py +++ b/erpnext/accounts/report/gross_profit/test_gross_profit.py @@ -418,12 +418,12 @@ class TestGrossProfit(FrappeTestCase): "item_name": self.item, "warehouse": "Stores - _GP", "qty": 0.0, - "avg._selling_rate": 0.0, + "avg._selling_rate": 100, "valuation_rate": 0.0, - "selling_amount": -100.0, + "selling_amount": 0.0, "buying_amount": 0.0, - "gross_profit": -100.0, - "gross_profit_%": 100.0, + "gross_profit": 0.0, + "gross_profit_%": 0.0, } gp_entry = [x for x in data if x.parent_invoice == sinv.name] # Both items of Invoice should have '0' qty diff --git a/erpnext/accounts/report/invalid_ledger_entries/__init__.py b/erpnext/accounts/report/invalid_ledger_entries/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/erpnext/accounts/report/invalid_ledger_entries/invalid_ledger_entries.js b/erpnext/accounts/report/invalid_ledger_entries/invalid_ledger_entries.js new file mode 100644 index 00000000000..47d478f2865 --- /dev/null +++ b/erpnext/accounts/report/invalid_ledger_entries/invalid_ledger_entries.js @@ -0,0 +1,51 @@ +// Copyright (c) 2024, Frappe Technologies Pvt. Ltd. and contributors +// For license information, please see license.txt + +function get_filters() { + let filters = [ + { + fieldname: "company", + label: __("Company"), + fieldtype: "Link", + options: "Company", + default: frappe.defaults.get_user_default("Company"), + reqd: 1, + }, + { + fieldname: "from_date", + label: __("Start Date"), + fieldtype: "Date", + reqd: 1, + default: frappe.datetime.add_months(frappe.datetime.get_today(), -1), + }, + { + fieldname: "to_date", + label: __("End Date"), + fieldtype: "Date", + reqd: 1, + default: frappe.datetime.get_today(), + }, + { + fieldname: "account", + label: __("Account"), + fieldtype: "MultiSelectList", + options: "Account", + get_data: function (txt) { + return frappe.db.get_link_options("Account", txt, { + company: frappe.query_report.get_filter_value("company"), + }); + }, + }, + { + fieldname: "voucher_no", + label: __("Voucher No"), + fieldtype: "Data", + width: 100, + }, + ]; + return filters; +} + +frappe.query_reports["Invalid Ledger Entries"] = { + filters: get_filters(), +}; diff --git a/erpnext/accounts/report/invalid_ledger_entries/invalid_ledger_entries.json b/erpnext/accounts/report/invalid_ledger_entries/invalid_ledger_entries.json new file mode 100644 index 00000000000..00dbbfc5056 --- /dev/null +++ b/erpnext/accounts/report/invalid_ledger_entries/invalid_ledger_entries.json @@ -0,0 +1,23 @@ +{ + "add_total_row": 0, + "columns": [], + "creation": "2024-09-09 12:31:25.295976", + "disabled": 0, + "docstatus": 0, + "doctype": "Report", + "filters": [], + "idx": 0, + "is_standard": "Yes", + "letterhead": null, + "modified": "2024-09-09 12:31:25.295976", + "modified_by": "Administrator", + "module": "Accounts", + "name": "Invalid Ledger Entries", + "owner": "Administrator", + "prepared_report": 0, + "ref_doctype": "GL Entry", + "report_name": "Invalid Ledger Entries", + "report_type": "Script Report", + "roles": [], + "timeout": 0 +} \ No newline at end of file diff --git a/erpnext/accounts/report/invalid_ledger_entries/invalid_ledger_entries.py b/erpnext/accounts/report/invalid_ledger_entries/invalid_ledger_entries.py new file mode 100644 index 00000000000..33fda705cf2 --- /dev/null +++ b/erpnext/accounts/report/invalid_ledger_entries/invalid_ledger_entries.py @@ -0,0 +1,137 @@ +# Copyright (c) 2024, Frappe Technologies Pvt. Ltd. and contributors +# For license information, please see license.txt + +import frappe +from frappe import _, qb +from frappe.query_builder import Criterion +from frappe.query_builder.custom import ConstantColumn + + +def execute(filters: dict | None = None): + """Return columns and data for the report. + + This is the main entry point for the report. It accepts the filters as a + dictionary and should return columns and data. It is called by the framework + every time the report is refreshed or a filter is updated. + """ + validate_filters(filters) + + columns = get_columns() + data = get_data(filters) + + return columns, data + + +def get_columns() -> list[dict]: + """Return columns for the report. + + One field definition per column, just like a DocType field definition. + """ + return [ + {"label": _("Voucher Type"), "fieldname": "voucher_type", "fieldtype": "Link", "options": "DocType"}, + { + "label": _("Voucher No"), + "fieldname": "voucher_no", + "fieldtype": "Dynamic Link", + "options": "voucher_type", + }, + ] + + +def get_data(filters) -> list[list]: + """Return data for the report. + + The report data is a list of rows, with each row being a list of cell values. + """ + active_vouchers = get_active_vouchers_for_period(filters) + invalid_vouchers = identify_cancelled_vouchers(active_vouchers) + + return invalid_vouchers + + +def identify_cancelled_vouchers(active_vouchers: list[dict] | list | None = None) -> list[dict]: + cancelled_vouchers = [] + if active_vouchers: + # Group by voucher types and use single query to identify cancelled vouchers + vtypes = set([x.voucher_type for x in active_vouchers]) + + for _t in vtypes: + _names = [x.voucher_no for x in active_vouchers if x.voucher_type == _t] + dt = qb.DocType(_t) + non_active_vouchers = ( + qb.from_(dt) + .select(ConstantColumn(_t).as_("voucher_type"), dt.name.as_("voucher_no")) + .where(dt.docstatus.ne(1) & dt.name.isin(_names)) + .run(as_dict=True) + ) + if non_active_vouchers: + cancelled_vouchers.extend(non_active_vouchers) + return cancelled_vouchers + + +def validate_filters(filters: dict | None = None): + if not filters: + frappe.throw(_("Filters missing")) + + if not filters.company: + frappe.throw(_("Company is mandatory")) + + if filters.from_date > filters.to_date: + frappe.throw(_("Start Date should be lower than End Date")) + + +def build_query_filters(filters: dict | None = None) -> list: + qb_filters = [] + if filters: + if filters.account: + qb_filters.append(qb.Field("account").isin(filters.account)) + + if filters.voucher_no: + qb_filters.append(qb.Field("voucher_no").eq(filters.voucher_no)) + + return qb_filters + + +def get_active_vouchers_for_period(filters: dict | None = None) -> list[dict]: + uniq_vouchers = [] + + if filters: + gle = qb.DocType("GL Entry") + ple = qb.DocType("Payment Ledger Entry") + + qb_filters = build_query_filters(filters) + + gl_vouchers = ( + qb.from_(gle) + .select(gle.voucher_type) + .distinct() + .select(gle.voucher_no) + .distinct() + .where( + gle.is_cancelled.eq(0) + & gle.company.eq(filters.company) + & gle.posting_date[filters.from_date : filters.to_date] + ) + .where(Criterion.all(qb_filters)) + .run(as_dict=True) + ) + + pl_vouchers = ( + qb.from_(ple) + .select(ple.voucher_type) + .distinct() + .select(ple.voucher_no) + .distinct() + .where( + ple.delinked.eq(0) + & ple.company.eq(filters.company) + & ple.posting_date[filters.from_date : filters.to_date] + ) + .where(Criterion.all(qb_filters)) + .run(as_dict=True) + ) + + uniq_vouchers.extend(gl_vouchers) + uniq_vouchers.extend(pl_vouchers) + + return uniq_vouchers diff --git a/erpnext/accounts/report/payment_ledger/payment_ledger.py b/erpnext/accounts/report/payment_ledger/payment_ledger.py index 9852c6e7ab9..9dd5ae5c400 100644 --- a/erpnext/accounts/report/payment_ledger/payment_ledger.py +++ b/erpnext/accounts/report/payment_ledger/payment_ledger.py @@ -130,6 +130,7 @@ class PaymentLedger: ) def get_columns(self): + company_currency = frappe.get_cached_value("Company", self.filters.get("company"), "default_currency") options = None self.columns.append( dict( @@ -194,7 +195,7 @@ class PaymentLedger: label=_("Amount"), fieldname="amount", fieldtype="Currency", - options="Company:company:default_currency", + options=company_currency, width="100", ) ) @@ -210,7 +211,7 @@ class PaymentLedger: ) ) self.columns.append( - dict(label=_("Currency"), fieldname="currency", fieldtype="Currency", hidden=True) + dict(label=_("Currency"), fieldname="currency", fieldtype="Link", options="Currency", hidden=True) ) def run(self): diff --git a/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py b/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py index 58610b22a93..2b6280c74b5 100644 --- a/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py +++ b/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py @@ -7,6 +7,8 @@ from frappe import _ from frappe.utils import flt from erpnext.accounts.report.financial_statements import ( + compute_growth_view_data, + compute_margin_view_data, get_columns, get_data, get_filtered_list_for_consolidated_report, @@ -59,15 +61,21 @@ def execute(filters=None): columns = get_columns(filters.periodicity, period_list, filters.accumulated_values, filters.company) - chart = get_chart_data(filters, columns, income, expense, net_profit_loss) - currency = filters.presentation_currency or frappe.get_cached_value( "Company", filters.company, "default_currency" ) + chart = get_chart_data(filters, columns, income, expense, net_profit_loss, currency) + report_summary, primitive_summary = get_report_summary( period_list, filters.periodicity, income, expense, net_profit_loss, currency, filters ) + if filters.get("selected_view") == "Growth": + compute_growth_view_data(data, period_list) + + if filters.get("selected_view") == "Margin": + compute_margin_view_data(data, period_list, filters.accumulated_values) + return columns, data, None, chart, report_summary, primitive_summary @@ -152,7 +160,7 @@ def get_net_profit_loss(income, expense, period_list, company, currency=None, co return net_profit_loss -def get_chart_data(filters, columns, income, expense, net_profit_loss): +def get_chart_data(filters, columns, income, expense, net_profit_loss, currency): labels = [d.get("label") for d in columns[2:]] income_data, expense_data, net_profit = [], [], [] @@ -181,5 +189,7 @@ def get_chart_data(filters, columns, income, expense, net_profit_loss): chart["type"] = "line" chart["fieldtype"] = "Currency" + chart["options"] = "currency" + chart["currency"] = currency return chart diff --git a/erpnext/accounts/report/purchase_register/purchase_register.py b/erpnext/accounts/report/purchase_register/purchase_register.py index 504c74babcb..48364cc2c91 100644 --- a/erpnext/accounts/report/purchase_register/purchase_register.py +++ b/erpnext/accounts/report/purchase_register/purchase_register.py @@ -311,6 +311,7 @@ def get_account_columns(invoice_list, include_payments): """select distinct expense_account from `tabPurchase Invoice Item` where docstatus = 1 and (expense_account is not null and expense_account != '') + and parenttype='Purchase Invoice' and parent in (%s) order by expense_account""" % ", ".join(["%s"] * len(invoice_list)), tuple([inv.name for inv in invoice_list]), @@ -451,7 +452,7 @@ def get_invoice_expense_map(invoice_list): """ select parent, expense_account, sum(base_net_amount) as amount from `tabPurchase Invoice Item` - where parent in (%s) + where parent in (%s) and parenttype='Purchase Invoice' group by parent, expense_account """ % ", ".join(["%s"] * len(invoice_list)), @@ -522,7 +523,7 @@ def get_invoice_po_pr_map(invoice_list): """ select parent, purchase_order, purchase_receipt, po_detail, project from `tabPurchase Invoice Item` - where parent in (%s) + where parent in (%s) and parenttype='Purchase Invoice' """ % ", ".join(["%s"] * len(invoice_list)), tuple(inv.name for inv in invoice_list), diff --git a/erpnext/accounts/report/sales_register/sales_register.py b/erpnext/accounts/report/sales_register/sales_register.py index 6c0bf91e3f8..34d53238f50 100644 --- a/erpnext/accounts/report/sales_register/sales_register.py +++ b/erpnext/accounts/report/sales_register/sales_register.py @@ -526,7 +526,8 @@ def get_invoice_tax_map(invoice_list, invoice_income_map, income_accounts, inclu tax_details = frappe.db.sql( """select parent, account_head, sum(base_tax_amount_after_discount_amount) as tax_amount - from `tabSales Taxes and Charges` where parent in (%s) group by parent, account_head""" + from `tabSales Taxes and Charges` where parent in (%s) and parenttype = 'Sales Invoice' + group by parent, account_head""" % ", ".join(["%s"] * len(invoice_list)), tuple(inv.name for inv in invoice_list), as_dict=1, diff --git a/erpnext/accounts/report/sales_register/test_sales_register.py b/erpnext/accounts/report/sales_register/test_sales_register.py new file mode 100644 index 00000000000..95aa5add24c --- /dev/null +++ b/erpnext/accounts/report/sales_register/test_sales_register.py @@ -0,0 +1,179 @@ +import frappe +from frappe.tests.utils import FrappeTestCase +from frappe.utils import getdate, today + +from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice +from erpnext.accounts.report.sales_register.sales_register import execute +from erpnext.accounts.test.accounts_mixin import AccountsTestMixin + + +class TestItemWiseSalesRegister(AccountsTestMixin, FrappeTestCase): + def setUp(self): + self.create_company() + self.create_customer() + self.create_item() + self.create_child_cost_center() + + def tearDown(self): + frappe.db.rollback() + + def create_child_cost_center(self): + cc_name = "South Wing" + if frappe.db.exists("Cost Center", cc_name): + cc = frappe.get_doc("Cost Center", cc_name) + else: + parent = frappe.db.get_value("Cost Center", self.cost_center, "parent_cost_center") + cc = frappe.get_doc( + { + "doctype": "Cost Center", + "company": self.company, + "is_group": False, + "parent_cost_center": parent, + "cost_center_name": cc_name, + } + ) + cc = cc.save() + self.south_cc = cc.name + + def create_sales_invoice(self, rate=100, do_not_submit=False): + si = create_sales_invoice( + item=self.item, + company=self.company, + customer=self.customer, + debit_to=self.debit_to, + posting_date=today(), + parent_cost_center=self.cost_center, + cost_center=self.cost_center, + rate=rate, + price_list_rate=rate, + do_not_save=1, + ) + si = si.save() + if not do_not_submit: + si = si.submit() + return si + + def test_basic_report_output(self): + si = self.create_sales_invoice(rate=98) + + filters = frappe._dict({"from_date": today(), "to_date": today(), "company": self.company}) + report = execute(filters) + + res = [x for x in report[1] if x.get("voucher_no") == si.name] + + expected_result = { + "voucher_type": si.doctype, + "voucher_no": si.name, + "posting_date": getdate(), + "customer": self.customer, + "receivable_account": self.debit_to, + "net_total": 98.0, + "grand_total": 98.0, + "debit": 98.0, + } + + report_output = {k: v for k, v in res[0].items() if k in expected_result} + self.assertDictEqual(report_output, expected_result) + + def test_journal_with_cost_center_filter(self): + je1 = frappe.get_doc( + { + "doctype": "Journal Entry", + "voucher_type": "Journal Entry", + "company": self.company, + "posting_date": getdate(), + "accounts": [ + { + "account": self.debit_to, + "party_type": "Customer", + "party": self.customer, + "credit_in_account_currency": 77, + "credit": 77, + "is_advance": "Yes", + "cost_center": self.cost_center, + }, + { + "account": self.cash, + "debit_in_account_currency": 77, + "debit": 77, + }, + ], + } + ) + je1.submit() + + je2 = frappe.get_doc( + { + "doctype": "Journal Entry", + "voucher_type": "Journal Entry", + "company": self.company, + "posting_date": getdate(), + "accounts": [ + { + "account": self.debit_to, + "party_type": "Customer", + "party": self.customer, + "credit_in_account_currency": 98, + "credit": 98, + "is_advance": "Yes", + "cost_center": self.south_cc, + }, + { + "account": self.cash, + "debit_in_account_currency": 98, + "debit": 98, + }, + ], + } + ) + je2.submit() + + filters = frappe._dict( + { + "from_date": today(), + "to_date": today(), + "company": self.company, + "include_payments": True, + "customer": self.customer, + "cost_center": self.cost_center, + } + ) + report_output = execute(filters)[1] + filtered_output = [x for x in report_output if x.get("voucher_no") == je1.name] + self.assertEqual(len(filtered_output), 1) + expected_result = { + "voucher_type": je1.doctype, + "voucher_no": je1.name, + "posting_date": je1.posting_date, + "customer": self.customer, + "receivable_account": self.debit_to, + "net_total": 77.0, + "credit": 77.0, + } + result_fields = {k: v for k, v in filtered_output[0].items() if k in expected_result} + self.assertDictEqual(result_fields, expected_result) + + filters = frappe._dict( + { + "from_date": today(), + "to_date": today(), + "company": self.company, + "include_payments": True, + "customer": self.customer, + "cost_center": self.south_cc, + } + ) + report_output = execute(filters)[1] + filtered_output = [x for x in report_output if x.get("voucher_no") == je2.name] + self.assertEqual(len(filtered_output), 1) + expected_result = { + "voucher_type": je2.doctype, + "voucher_no": je2.name, + "posting_date": je2.posting_date, + "customer": self.customer, + "receivable_account": self.debit_to, + "net_total": 98.0, + "credit": 98.0, + } + result_output = {k: v for k, v in filtered_output[0].items() if k in expected_result} + self.assertDictEqual(result_output, expected_result) diff --git a/erpnext/accounts/report/tax_withholding_details/tax_withholding_details.py b/erpnext/accounts/report/tax_withholding_details/tax_withholding_details.py index 276e95bd5d1..0c18dac7768 100644 --- a/erpnext/accounts/report/tax_withholding_details/tax_withholding_details.py +++ b/erpnext/accounts/report/tax_withholding_details/tax_withholding_details.py @@ -336,7 +336,7 @@ def get_tds_docs(filters): def get_tds_docs_query(filters, bank_accounts, tds_accounts): if not tds_accounts: frappe.throw( - _("No {0} Accounts found for this company.").format(frappe.bold("Tax Withholding")), + _("No {0} Accounts found for this company.").format(frappe.bold(_("Tax Withholding"))), title=_("Accounts Missing Error"), ) gle = frappe.qb.DocType("GL Entry") diff --git a/erpnext/accounts/report/trial_balance/trial_balance.py b/erpnext/accounts/report/trial_balance/trial_balance.py index f216ecea15a..8ca850f301e 100644 --- a/erpnext/accounts/report/trial_balance/trial_balance.py +++ b/erpnext/accounts/report/trial_balance/trial_balance.py @@ -94,12 +94,6 @@ def get_data(filters): accounts, accounts_by_name, parent_children_map = filter_accounts(accounts) - min_lft, max_rgt = frappe.db.sql( - """select min(lft), max(rgt) from `tabAccount` - where company=%s""", - (filters.company,), - )[0] - gl_entries_by_account = {} opening_balances = get_opening_balances(filters) @@ -112,10 +106,10 @@ def get_data(filters): filters.company, filters.from_date, filters.to_date, - min_lft, - max_rgt, filters, gl_entries_by_account, + root_lft=None, + root_rgt=None, ignore_closing_entries=not flt(filters.with_period_closing_entry_for_current_period), ignore_opening_entries=True, ) @@ -150,9 +144,9 @@ def get_rootwise_opening_balances(filters, report_type): if not ignore_closing_balances: last_period_closing_voucher = frappe.db.get_all( "Period Closing Voucher", - filters={"docstatus": 1, "company": filters.company, "posting_date": ("<", filters.from_date)}, - fields=["posting_date", "name"], - order_by="posting_date desc", + filters={"docstatus": 1, "company": filters.company, "period_end_date": ("<", filters.from_date)}, + fields=["period_end_date", "name"], + order_by="period_end_date desc", limit=1, ) @@ -168,8 +162,8 @@ def get_rootwise_opening_balances(filters, report_type): ) # Report getting generate from the mid of a fiscal year - if getdate(last_period_closing_voucher[0].posting_date) < getdate(add_days(filters.from_date, -1)): - start_date = add_days(last_period_closing_voucher[0].posting_date, 1) + if getdate(last_period_closing_voucher[0].period_end_date) < getdate(add_days(filters.from_date, -1)): + start_date = add_days(last_period_closing_voucher[0].period_end_date, 1) gle += get_opening_balance( "GL Entry", filters, report_type, accounting_dimensions, start_date=start_date ) diff --git a/erpnext/accounts/report/utils.py b/erpnext/accounts/report/utils.py index bd1b35559ea..2a72b10e4eb 100644 --- a/erpnext/accounts/report/utils.py +++ b/erpnext/accounts/report/utils.py @@ -255,7 +255,9 @@ def get_journal_entries(filters, args): ) .orderby(je.posting_date, je.name, order=Order.desc) ) - query = apply_common_conditions(filters, query, doctype="Journal Entry", payments=True) + query = apply_common_conditions( + filters, query, doctype="Journal Entry", child_doctype="Journal Entry Account", payments=True + ) journal_entries = query.run(as_dict=True) return journal_entries @@ -306,7 +308,9 @@ def apply_common_conditions(filters, query, doctype, child_doctype=None, payment query = query.where(parent_doc.posting_date <= filters.to_date) if payments: - if filters.get("cost_center"): + if doctype == "Journal Entry" and filters.get("cost_center"): + query = query.where(child_doc.cost_center == filters.cost_center) + elif filters.get("cost_center"): query = query.where(parent_doc.cost_center == filters.cost_center) else: if filters.get("cost_center"): @@ -326,6 +330,7 @@ def apply_common_conditions(filters, query, doctype, child_doctype=None, payment if join_required: query = query.inner_join(child_doc).on(parent_doc.name == child_doc.parent) + query = query.where(child_doc.parenttype == doctype) query = query.distinct() if parent_doc.get_table_name() != "tabJournal Entry": diff --git a/erpnext/accounts/test/accounts_mixin.py b/erpnext/accounts/test/accounts_mixin.py index d503f7bc4af..e526e07c734 100644 --- a/erpnext/accounts/test/accounts_mixin.py +++ b/erpnext/accounts/test/accounts_mixin.py @@ -87,6 +87,22 @@ class AccountsTestMixin: "parent_account": "Bank Accounts - " + abbr, } ), + frappe._dict( + { + "attribute_name": "advance_received", + "account_name": "Advance Received", + "parent_account": "Current Liabilities - " + abbr, + "account_type": "Receivable", + } + ), + frappe._dict( + { + "attribute_name": "advance_paid", + "account_name": "Advance Paid", + "parent_account": "Current Assets - " + abbr, + "account_type": "Payable", + } + ), ] for acc in other_accounts: acc_name = acc.account_name + " - " + abbr @@ -101,9 +117,31 @@ class AccountsTestMixin: "company": self.company, } ) + new_acc.account_type = acc.get("account_type", None) new_acc.save() setattr(self, acc.attribute_name, new_acc.name) + self.identify_default_warehouses() + + def enable_advance_as_liability(self): + company = frappe.get_doc("Company", self.company) + company.book_advance_payments_in_separate_party_account = True + company.default_advance_received_account = self.advance_received + company.default_advance_paid_account = self.advance_paid + company.save() + + def disable_advance_as_liability(self): + company = frappe.get_doc("Company", self.company) + company.book_advance_payments_in_separate_party_account = False + company.default_advance_paid_account = company.default_advance_received_account = None + company.save() + + def identify_default_warehouses(self): + for w in frappe.db.get_all( + "Warehouse", filters={"company": self.company}, fields=["name", "warehouse_name"] + ): + setattr(self, "warehouse_" + w.warehouse_name.lower().strip().replace(" ", "_"), w.name) + def create_usd_receivable_account(self): account_name = "Debtors USD" if not frappe.db.get_value( diff --git a/erpnext/accounts/test/test_reports.py b/erpnext/accounts/test/test_reports.py index c2e10f8fd47..56b7832a32e 100644 --- a/erpnext/accounts/test/test_reports.py +++ b/erpnext/accounts/test/test_reports.py @@ -14,8 +14,8 @@ DEFAULT_FILTERS = { REPORT_FILTER_TEST_CASES: list[tuple[ReportName, ReportFilters]] = [ ("General Ledger", {"group_by": "Group by Voucher (Consolidated)"}), ("General Ledger", {"group_by": "Group by Voucher (Consolidated)", "include_dimensions": 1}), - ("Accounts Payable", {"range1": 30, "range2": 60, "range3": 90, "range4": 120}), - ("Accounts Receivable", {"range1": 30, "range2": 60, "range3": 90, "range4": 120}), + ("Accounts Payable", {"range": "30, 60, 90, 120"}), + ("Accounts Receivable", {"range": "30, 60, 90, 120"}), ("Consolidated Financial Statement", {"report": "Balance Sheet"}), ("Consolidated Financial Statement", {"report": "Profit and Loss Statement"}), ("Consolidated Financial Statement", {"report": "Cash Flow"}), diff --git a/erpnext/accounts/test/test_utils.py b/erpnext/accounts/test/test_utils.py index 59cbc11794f..5e108dee9b5 100644 --- a/erpnext/accounts/test/test_utils.py +++ b/erpnext/accounts/test/test_utils.py @@ -92,14 +92,14 @@ class TestUtils(unittest.TestCase): payment_entry.deductions = [] payment_entry.save() - # below is the difference between base_received_amount and base_paid_amount - self.assertEqual(payment_entry.difference_amount, -4855.0) + # below is the difference between base_paid_amount and base_received_amount (exchange gain) + self.assertEqual(payment_entry.deductions[0].amount, -4855.0) payment_entry.target_exchange_rate = 62.9 payment_entry.save() - # below is due to change in exchange rate - self.assertEqual(payment_entry.references[0].exchange_gain_loss, -4855.0) + # after changing the exchange rate, there is no exchange gain / loss + self.assertEqual(payment_entry.deductions, []) payment_entry.references = [] self.assertEqual(payment_entry.difference_amount, 0.0) diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py index 0450221222d..144039b794f 100644 --- a/erpnext/accounts/utils.py +++ b/erpnext/accounts/utils.py @@ -474,10 +474,14 @@ def reconcile_against_document( doc = frappe.get_doc(voucher_type, voucher_no) frappe.flags.ignore_party_validation = True - # For payments with `Advance` in separate account feature enabled, only new ledger entries are posted for each reference. - # No need to cancel/delete payment ledger entries + # When Advance is allocated from an Order to an Invoice + # whole ledger must be reposted + repost_whole_ledger = any([x.voucher_detail_no for x in entries]) if voucher_type == "Payment Entry" and doc.book_advance_payments_in_separate_party_account: - doc.make_advance_gl_entries(cancel=1) + if repost_whole_ledger: + doc.make_gl_entries(cancel=1) + else: + doc.make_advance_gl_entries(cancel=1) else: _delete_pl_entries(voucher_type, voucher_no) @@ -511,9 +515,14 @@ def reconcile_against_document( doc = frappe.get_doc(entry.voucher_type, entry.voucher_no) if voucher_type == "Payment Entry" and doc.book_advance_payments_in_separate_party_account: - # both ledgers must be posted to for `Advance` in separate account feature - # TODO: find a more efficient way post only for the new linked vouchers - doc.make_advance_gl_entries() + # When Advance is allocated from an Order to an Invoice + # whole ledger must be reposted + if repost_whole_ledger: + doc.make_gl_entries() + else: + # both ledgers must be posted to for `Advance` in separate account feature + # TODO: find a more efficient way post only for the new linked vouchers + doc.make_advance_gl_entries() else: gl_map = doc.build_gl_map() # Make sure there is no overallocation @@ -621,6 +630,16 @@ def update_reference_in_journal_entry(d, journal_entry, do_not_save=False): if jv_detail.get("reference_type") in ["Sales Order", "Purchase Order"]: update_advance_paid.append((jv_detail.reference_type, jv_detail.reference_name)) + rev_dr_or_cr = ( + "debit_in_account_currency" + if d["dr_or_cr"] == "credit_in_account_currency" + else "credit_in_account_currency" + ) + if jv_detail.get(rev_dr_or_cr): + d["dr_or_cr"] = rev_dr_or_cr + d["allocated_amount"] = d["allocated_amount"] * -1 + d["unadjusted_amount"] = d["unadjusted_amount"] * -1 + if flt(d["unadjusted_amount"]) - flt(d["allocated_amount"]) != 0: # adjust the unreconciled balance amount_in_account_currency = flt(d["unadjusted_amount"]) - flt(d["allocated_amount"]) @@ -665,6 +684,8 @@ def update_reference_in_journal_entry(d, journal_entry, do_not_save=False): # will work as update after submit journal_entry.flags.ignore_validate_update_after_submit = True + # Ledgers will be reposted by Reconciliation tool + journal_entry.flags.ignore_reposting_on_reconciliation = True if not do_not_save: journal_entry.save(ignore_permissions=True) @@ -745,40 +766,114 @@ def cancel_exchange_gain_loss_journal( Cancel Exchange Gain/Loss for Sales/Purchase Invoice, if they have any. """ if parent_doc.doctype in ["Sales Invoice", "Purchase Invoice", "Payment Entry", "Journal Entry"]: - journals = frappe.db.get_all( - "Journal Entry Account", - filters={ - "reference_type": parent_doc.doctype, - "reference_name": parent_doc.name, - "docstatus": 1, - }, - fields=["parent"], - as_list=1, + gain_loss_journals = get_linked_exchange_gain_loss_journal( + referenced_dt=parent_doc.doctype, referenced_dn=parent_doc.name, je_docstatus=1 ) - - if journals: - gain_loss_journals = frappe.db.get_all( - "Journal Entry", - filters={ - "name": ["in", [x[0] for x in journals]], - "voucher_type": "Exchange Gain Or Loss", - "docstatus": 1, - }, - as_list=1, - ) - for doc in gain_loss_journals: - gain_loss_je = frappe.get_doc("Journal Entry", doc[0]) - if referenced_dt and referenced_dn: - references = [(x.reference_type, x.reference_name) for x in gain_loss_je.accounts] - if ( - len(references) == 2 - and (referenced_dt, referenced_dn) in references - and (parent_doc.doctype, parent_doc.name) in references - ): - # only cancel JE generated against parent_doc and referenced_dn - gain_loss_je.cancel() - else: + for doc in gain_loss_journals: + gain_loss_je = frappe.get_doc("Journal Entry", doc) + if referenced_dt and referenced_dn: + references = [(x.reference_type, x.reference_name) for x in gain_loss_je.accounts] + if ( + len(references) == 2 + and (referenced_dt, referenced_dn) in references + and (parent_doc.doctype, parent_doc.name) in references + ): + # only cancel JE generated against parent_doc and referenced_dn gain_loss_je.cancel() + else: + gain_loss_je.cancel() + + +def delete_exchange_gain_loss_journal( + parent_doc: dict | object, referenced_dt: str | None = None, referenced_dn: str | None = None +) -> None: + """ + Delete Exchange Gain/Loss for Sales/Purchase Invoice, if they have any. + """ + if parent_doc.doctype in ["Sales Invoice", "Purchase Invoice", "Payment Entry", "Journal Entry"]: + gain_loss_journals = get_linked_exchange_gain_loss_journal( + referenced_dt=parent_doc.doctype, referenced_dn=parent_doc.name, je_docstatus=2 + ) + for doc in gain_loss_journals: + gain_loss_je = frappe.get_doc("Journal Entry", doc) + if referenced_dt and referenced_dn: + references = [(x.reference_type, x.reference_name) for x in gain_loss_je.accounts] + if ( + len(references) == 2 + and (referenced_dt, referenced_dn) in references + and (parent_doc.doctype, parent_doc.name) in references + ): + # only delete JE generated against parent_doc and referenced_dn + gain_loss_je.delete() + else: + gain_loss_je.delete() + + +def get_linked_exchange_gain_loss_journal(referenced_dt: str, referenced_dn: str, je_docstatus: int) -> list: + """ + Get all the linked exchange gain/loss journal entries for a given document. + """ + gain_loss_journals = [] + if journals := frappe.db.get_all( + "Journal Entry Account", + { + "reference_type": referenced_dt, + "reference_name": referenced_dn, + "docstatus": je_docstatus, + }, + pluck="parent", + ): + gain_loss_journals = frappe.db.get_all( + "Journal Entry", + { + "name": ["in", journals], + "voucher_type": "Exchange Gain Or Loss", + "is_system_generated": 1, + "docstatus": je_docstatus, + }, + pluck="name", + ) + return gain_loss_journals + + +def cancel_common_party_journal(self): + if self.doctype not in ["Sales Invoice", "Purchase Invoice"]: + return + + if not frappe.db.get_single_value("Accounts Settings", "enable_common_party_accounting"): + return + + party_link = self.get_common_party_link() + if not party_link: + return + + journal_entry = frappe.db.get_value( + "Journal Entry Account", + filters={ + "reference_type": self.doctype, + "reference_name": self.name, + "docstatus": 1, + }, + fieldname="parent", + ) + + if not journal_entry: + return + + common_party_journal = frappe.db.get_value( + "Journal Entry", + filters={ + "name": journal_entry, + "is_system_generated": True, + "docstatus": 1, + }, + ) + + if not common_party_journal: + return + + common_party_je = frappe.get_doc("Journal Entry", common_party_journal) + common_party_je.cancel() def update_accounting_ledgers_after_reference_removal( @@ -1462,12 +1557,16 @@ def compare_existing_and_expected_gle(existing_gle, expected_gle, precision): return matched -def get_stock_accounts(company, voucher_type=None, voucher_no=None): +def get_stock_accounts(company, voucher_type=None, voucher_no=None, accounts=None): stock_accounts = [ d.name for d in frappe.db.get_all("Account", {"account_type": "Stock", "company": company, "is_group": 0}) ] - if voucher_type and voucher_no: + + if accounts: + stock_accounts = [row.account for row in accounts if row.account in stock_accounts] + + elif voucher_type and voucher_no: if voucher_type == "Journal Entry": stock_accounts = [ d.account @@ -1880,6 +1979,7 @@ class QueryPaymentLedger: ple.cost_center.as_("cost_center"), Sum(ple.amount).as_("amount"), Sum(ple.amount_in_account_currency).as_("amount_in_account_currency"), + ple.remarks, ) .where(ple.delinked == 0) .where(Criterion.all(filter_on_voucher_no)) @@ -1942,6 +2042,7 @@ class QueryPaymentLedger: Table("vouchers").due_date, Table("vouchers").currency, Table("vouchers").cost_center.as_("cost_center"), + Table("vouchers").remarks, ) .where(Criterion.all(filter_on_outstanding_amount)) ) diff --git a/erpnext/assets/doctype/asset/asset.js b/erpnext/assets/doctype/asset/asset.js index 145e2ba3b3e..21e307b480c 100644 --- a/erpnext/assets/doctype/asset/asset.js +++ b/erpnext/assets/doctype/asset/asset.js @@ -213,7 +213,7 @@ frappe.ui.form.on("Asset", {
- Failed to post depreciation entries + ${__("Failed to post depreciation entries")}
`; @@ -416,7 +416,7 @@ frappe.ui.form.on("Asset", { } frm.dashboard.render_graph({ - title: "Asset Value", + title: __("Asset Value"), data: { labels: x_intervals, datasets: [ @@ -506,6 +506,7 @@ frappe.ui.form.on("Asset", { create_asset_repair: function (frm) { frappe.call({ args: { + company: frm.doc.company, asset: frm.doc.name, asset_name: frm.doc.asset_name, }, @@ -520,6 +521,7 @@ frappe.ui.form.on("Asset", { create_asset_capitalization: function (frm) { frappe.call({ args: { + company: frm.doc.company, asset: frm.doc.name, asset_name: frm.doc.asset_name, item_code: frm.doc.item_code, @@ -528,6 +530,7 @@ frappe.ui.form.on("Asset", { callback: function (r) { var doclist = frappe.model.sync(r.message); frappe.set_route("Form", doclist[0].doctype, doclist[0].name); + $(".primary-action").prop("hidden", false); }, }); }, @@ -670,6 +673,11 @@ frappe.ui.form.on("Asset", { if (item.asset_location) { frm.set_value("location", item.asset_location); } + if (doctype === "Purchase Receipt") { + frm.set_value("purchase_receipt_item", item.name); + } else if (doctype === "Purchase Invoice") { + frm.set_value("purchase_invoice_item", item.name); + } }); }, diff --git a/erpnext/assets/doctype/asset/asset.json b/erpnext/assets/doctype/asset/asset.json index e408cc24d1e..55932e9b787 100644 --- a/erpnext/assets/doctype/asset/asset.json +++ b/erpnext/assets/doctype/asset/asset.json @@ -33,14 +33,16 @@ "dimension_col_break", "purchase_details_section", "purchase_receipt", + "purchase_receipt_item", "purchase_invoice", + "purchase_invoice_item", + "purchase_date", "available_for_use_date", - "total_asset_cost", - "additional_asset_cost", "column_break_23", "gross_purchase_amount", "asset_quantity", - "purchase_date", + "additional_asset_cost", + "total_asset_cost", "section_break_23", "calculate_depreciation", "column_break_33", @@ -536,6 +538,20 @@ "fieldname": "opening_number_of_booked_depreciations", "fieldtype": "Int", "label": "Opening Number of Booked Depreciations" + }, + { + "fieldname": "purchase_receipt_item", + "fieldtype": "Link", + "hidden": 1, + "label": "Purchase Receipt Item", + "options": "Purchase Receipt Item" + }, + { + "fieldname": "purchase_invoice_item", + "fieldtype": "Link", + "hidden": 1, + "label": "Purchase Invoice Item", + "options": "Purchase Invoice Item" } ], "idx": 72, @@ -579,7 +595,7 @@ "link_fieldname": "target_asset" } ], - "modified": "2024-08-01 16:39:09.340973", + "modified": "2024-08-26 23:28:29.095139", "modified_by": "Administrator", "module": "Assets", "name": "Asset", diff --git a/erpnext/assets/doctype/asset/asset.py b/erpnext/assets/doctype/asset/asset.py index 1b9e911be5b..05d575ac822 100644 --- a/erpnext/assets/doctype/asset/asset.py +++ b/erpnext/assets/doctype/asset/asset.py @@ -94,7 +94,9 @@ class Asset(AccountsController): purchase_amount: DF.Currency purchase_date: DF.Date | None purchase_invoice: DF.Link | None + purchase_invoice_item: DF.Link | None purchase_receipt: DF.Link | None + purchase_receipt_item: DF.Link | None split_from: DF.Link | None status: DF.Literal[ "Draft", @@ -117,13 +119,13 @@ class Asset(AccountsController): # end: auto-generated types def validate(self): + self.validate_precision() self.validate_asset_values() self.validate_asset_and_reference() self.validate_item() self.validate_cost_center() self.set_missing_values() self.validate_gross_and_purchase_amount() - self.validate_expected_value_after_useful_life() self.validate_finance_books() if not self.split_from: @@ -144,6 +146,7 @@ class Asset(AccountsController): "Asset Depreciation Schedules created:
{0}

Please check, edit if needed, and submit the Asset." ).format(asset_depr_schedules_links) ) + self.validate_expected_value_after_useful_life() self.set_total_booked_depreciations() self.total_asset_cost = self.gross_purchase_amount self.status = self.get_status() @@ -304,6 +307,15 @@ class Asset(AccountsController): title=_("Missing Finance Book"), ) + def validate_precision(self): + float_precision = cint(frappe.db.get_default("float_precision")) or 2 + if self.gross_purchase_amount: + self.gross_purchase_amount = flt(self.gross_purchase_amount, float_precision) + if self.opening_accumulated_depreciation: + self.opening_accumulated_depreciation = flt( + self.opening_accumulated_depreciation, float_precision + ) + def validate_asset_values(self): if not self.asset_category: self.asset_category = frappe.get_cached_value("Item", self.item_code, "asset_category") @@ -398,6 +410,9 @@ class Asset(AccountsController): ) def validate_asset_finance_books(self, row): + row.expected_value_after_useful_life = flt( + row.expected_value_after_useful_life, self.precision("gross_purchase_amount") + ) if flt(row.expected_value_after_useful_life) >= flt(self.gross_purchase_amount): frappe.throw( _("Row {0}: Expected Value After Useful Life must be less than Gross Purchase Amount").format( @@ -418,7 +433,10 @@ class Asset(AccountsController): self.opening_accumulated_depreciation = 0 self.opening_number_of_booked_depreciations = 0 else: - depreciable_amount = flt(self.gross_purchase_amount) - flt(row.expected_value_after_useful_life) + depreciable_amount = flt( + flt(self.gross_purchase_amount) - flt(row.expected_value_after_useful_life), + self.precision("gross_purchase_amount"), + ) if flt(self.opening_accumulated_depreciation) > depreciable_amount: frappe.throw( _("Opening Accumulated Depreciation must be less than or equal to {0}").format( @@ -469,6 +487,9 @@ class Asset(AccountsController): def validate_expected_value_after_useful_life(self): for row in self.get("finance_books"): + row.expected_value_after_useful_life = flt( + row.expected_value_after_useful_life, self.precision("gross_purchase_amount") + ) depr_schedule = get_depr_schedule(self.name, "Draft", row.finance_book) if not depr_schedule: @@ -621,6 +642,9 @@ class Asset(AccountsController): return records def validate_make_gl_entry(self): + if self.is_composite_asset: + return True + purchase_document = self.get_purchase_document() if not purchase_document: return False @@ -669,7 +693,7 @@ class Asset(AccountsController): if not fixed_asset_account: frappe.throw( _("Set {0} in asset category {1} for company {2}").format( - frappe.bold("Fixed Asset Account"), + frappe.bold(_("Fixed Asset Account")), frappe.bold(self.asset_category), frappe.bold(self.company), ), @@ -691,12 +715,17 @@ class Asset(AccountsController): return cwip_account def make_gl_entries(self): + if self.check_asset_capitalization_gl_entries(): + return + gl_entries = [] purchase_document = self.get_purchase_document() fixed_asset_account, cwip_account = self.get_fixed_asset_account(), self.get_cwip_account() - if purchase_document and self.purchase_amount and getdate(self.available_for_use_date) <= getdate(): + if (self.is_composite_asset or (purchase_document and self.purchase_amount)) and getdate( + self.available_for_use_date + ) <= getdate(): gl_entries.append( self.get_gl_dict( { @@ -733,6 +762,24 @@ class Asset(AccountsController): make_gl_entries(gl_entries) self.db_set("booked_fixed_asset", 1) + def check_asset_capitalization_gl_entries(self): + if self.is_composite_asset: + result = frappe.db.get_value( + "Asset Capitalization", + {"target_asset": self.name, "docstatus": 1}, + ["name", "target_fixed_asset_account"], + ) + + if result: + asset_capitalization, target_fixed_asset_account = result + # Check GL entries for the retrieved Asset Capitalization and target fixed asset account + return has_gl_entries( + "Asset Capitalization", asset_capitalization, target_fixed_asset_account + ) + # return if there are no submitted capitalization for given asset + return True + return False + @frappe.whitelist() def get_depreciation_rate(self, args, on_validate=False): if isinstance(args, str): @@ -762,14 +809,19 @@ class Asset(AccountsController): args.get("value_after_depreciation") ) else: - value = flt(args.get("expected_value_after_useful_life")) / flt(self.gross_purchase_amount) + value = flt(args.get("expected_value_after_useful_life")) / ( + flt(self.gross_purchase_amount) - flt(self.opening_accumulated_depreciation) + ) depreciation_rate = math.pow( value, 1.0 / ( ( - flt(args.get("total_number_of_depreciations"), 2) + ( + flt(args.get("total_number_of_depreciations"), 2) + - flt(self.opening_number_of_booked_depreciations) + ) * flt(args.get("frequency_of_depreciation")) ) / 12 @@ -779,6 +831,22 @@ class Asset(AccountsController): return flt((100 * (1 - depreciation_rate)), float_precision) +def has_gl_entries(doctype, docname, target_account): + gl_entry = frappe.qb.DocType("GL Entry") + gl_entries = ( + frappe.qb.from_(gl_entry) + .select(gl_entry.account) + .where( + (gl_entry.voucher_type == doctype) + & (gl_entry.voucher_no == docname) + & (gl_entry.debit != 0) + & (gl_entry.account == target_account) + ) + .run(as_dict=True) + ) + return len(gl_entries) > 0 + + def update_maintenance_status(): assets = frappe.get_all( "Asset", filters={"docstatus": 1, "maintenance_required": 1, "disposal_date": ("is", "not set")} @@ -854,18 +922,19 @@ def create_asset_maintenance(asset, item_code, item_name, asset_category, compan @frappe.whitelist() -def create_asset_repair(asset, asset_name): +def create_asset_repair(company, asset, asset_name): asset_repair = frappe.new_doc("Asset Repair") - asset_repair.update({"asset": asset, "asset_name": asset_name}) + asset_repair.update({"company": company, "asset": asset, "asset_name": asset_name}) return asset_repair @frappe.whitelist() -def create_asset_capitalization(asset, asset_name, item_code): +def create_asset_capitalization(company, asset, asset_name, item_code): asset_capitalization = frappe.new_doc("Asset Capitalization") asset_capitalization.update( { "target_asset": asset, + "company": company, "capitalization_method": "Choose a WIP composite asset", "target_asset_name": asset_name, "target_item_code": item_code, @@ -904,7 +973,7 @@ def transfer_asset(args): @frappe.whitelist() def get_item_details(item_code, asset_category, gross_purchase_amount): - asset_category_doc = frappe.get_doc("Asset Category", asset_category) + asset_category_doc = frappe.get_cached_doc("Asset Category", asset_category) books = [] for d in asset_category_doc.finance_books: books.append( diff --git a/erpnext/assets/doctype/asset_capitalization/asset_capitalization.py b/erpnext/assets/doctype/asset_capitalization/asset_capitalization.py index 4c22f7ddd7a..b38bd952bca 100644 --- a/erpnext/assets/doctype/asset_capitalization/asset_capitalization.py +++ b/erpnext/assets/doctype/asset_capitalization/asset_capitalization.py @@ -317,7 +317,16 @@ class AssetCapitalization(StockController): if not self.target_is_fixed_asset and not self.get("asset_items"): frappe.throw(_("Consumed Asset Items is mandatory for Decapitalization")) - if not (self.get("stock_items") or self.get("asset_items") or self.get("service_items")): + if self.capitalization_method == "Create a new composite asset" and not ( + self.get("stock_items") or self.get("asset_items") + ): + frappe.throw( + _( + "Consumed Stock Items or Consumed Asset Items are mandatory for creating new composite asset" + ) + ) + + elif not (self.get("stock_items") or self.get("asset_items") or self.get("service_items")): frappe.throw( _( "Consumed Stock Items, Consumed Asset Items or Consumed Service Items is mandatory for Capitalization" @@ -460,13 +469,24 @@ class AssetCapitalization(StockController): self.get_gl_entries_for_consumed_asset_items(gl_entries, target_account, target_against, precision) self.get_gl_entries_for_consumed_service_items(gl_entries, target_account, target_against, precision) - self.get_gl_entries_for_target_item(gl_entries, target_against, precision) + self.get_gl_entries_for_target_item(gl_entries, target_account, target_against, precision) return gl_entries def get_target_account(self): if self.target_is_fixed_asset: - return self.target_fixed_asset_account + from erpnext.assets.doctype.asset.asset import is_cwip_accounting_enabled + + asset_category = frappe.get_cached_value("Asset", self.target_asset, "asset_category") + if is_cwip_accounting_enabled(asset_category): + target_account = get_asset_category_account( + "capital_work_in_progress_account", + asset_category=asset_category, + company=self.company, + ) + return target_account if target_account else self.target_fixed_asset_account + else: + return self.target_fixed_asset_account else: return self.warehouse_account[self.target_warehouse]["account"] @@ -554,13 +574,13 @@ class AssetCapitalization(StockController): ) ) - def get_gl_entries_for_target_item(self, gl_entries, target_against, precision): + def get_gl_entries_for_target_item(self, gl_entries, target_account, target_against, precision): if self.target_is_fixed_asset: # Capitalization gl_entries.append( self.get_gl_dict( { - "account": self.target_fixed_asset_account, + "account": target_account, "against": ", ".join(target_against), "remarks": self.get("remarks") or _("Accounting Entry for Asset"), "debit": flt(self.total_value, precision), diff --git a/erpnext/assets/doctype/asset_capitalization/test_asset_capitalization.py b/erpnext/assets/doctype/asset_capitalization/test_asset_capitalization.py index 5508bdcbef2..86293fac765 100644 --- a/erpnext/assets/doctype/asset_capitalization/test_asset_capitalization.py +++ b/erpnext/assets/doctype/asset_capitalization/test_asset_capitalization.py @@ -31,6 +31,12 @@ class TestAssetCapitalization(unittest.TestCase): def test_capitalization_with_perpetual_inventory(self): company = "_Test Company with perpetual inventory" set_depreciation_settings_in_company(company=company) + name = frappe.db.get_value( + "Asset Category Account", + filters={"parent": "Computers", "company_name": company}, + fieldname=["name"], + ) + frappe.db.set_value("Asset Category Account", name, "capital_work_in_progress_account", "") # Variables consumed_asset_value = 100000 @@ -187,9 +193,10 @@ class TestAssetCapitalization(unittest.TestCase): # Test General Ledger Entries default_expense_account = frappe.db.get_value("Company", company, "default_expense_account") expected_gle = { - "_Test Fixed Asset - _TC": 3000, - "Expenses Included In Asset Valuation - _TC": -1000, - default_expense_account: -2000, + "_Test Fixed Asset - _TC": -100000.0, + default_expense_account: -2000.0, + "CWIP Account - _TC": 103000.0, + "Expenses Included In Asset Valuation - _TC": -1000.0, } actual_gle = get_actual_gle_dict(asset_capitalization.name) @@ -214,6 +221,12 @@ class TestAssetCapitalization(unittest.TestCase): def test_capitalization_with_wip_composite_asset(self): company = "_Test Company with perpetual inventory" set_depreciation_settings_in_company(company=company) + name = frappe.db.get_value( + "Asset Category Account", + filters={"parent": "Computers", "company_name": company}, + fieldname=["name"], + ) + frappe.db.set_value("Asset Category Account", name, "capital_work_in_progress_account", "") stock_rate = 1000 stock_qty = 2 @@ -424,7 +437,7 @@ class TestAssetCapitalization(unittest.TestCase): self.assertEqual(target_asset.purchase_amount, total_amount) expected_gle = { - "_Test Fixed Asset - _TC": 1000.0, + "CWIP Account - _TC": 1000.0, "Expenses Included In Asset Valuation - _TC": -1000.0, } diff --git a/erpnext/assets/doctype/asset_depreciation_schedule/asset_depreciation_schedule.py b/erpnext/assets/doctype/asset_depreciation_schedule/asset_depreciation_schedule.py index bad89e93259..679fbfe2e58 100644 --- a/erpnext/assets/doctype/asset_depreciation_schedule/asset_depreciation_schedule.py +++ b/erpnext/assets/doctype/asset_depreciation_schedule/asset_depreciation_schedule.py @@ -767,8 +767,12 @@ def get_daily_depr_amount(asset, row, schedule_idx, amount): every_year_depr = amount / total_years + depr_period_start_date = add_days( + get_last_day(add_months(row.depreciation_start_date, row.frequency_of_depreciation * -1)), 1 + ) + year_start_date = add_years( - row.depreciation_start_date, (row.frequency_of_depreciation * schedule_idx) // 12 + depr_period_start_date, ((row.frequency_of_depreciation * schedule_idx) // 12) ) year_end_date = add_days(add_years(year_start_date, 1), -1) diff --git a/erpnext/assets/doctype/asset_maintenance/asset_maintenance.py b/erpnext/assets/doctype/asset_maintenance/asset_maintenance.py index b44164f2dae..70ab7fdc8e8 100644 --- a/erpnext/assets/doctype/asset_maintenance/asset_maintenance.py +++ b/erpnext/assets/doctype/asset_maintenance/asset_maintenance.py @@ -144,6 +144,7 @@ def update_maintenance_log(asset_maintenance, item_code, item_name, task): "has_certificate": task.certificate_required, "description": task.description, "assign_to_name": task.assign_to_name, + "task_assignee_email": task.assign_to, "periodicity": str(task.periodicity), "maintenance_type": task.maintenance_type, "due_date": task.next_due_date, diff --git a/erpnext/assets/doctype/asset_maintenance_log/asset_maintenance_log.json b/erpnext/assets/doctype/asset_maintenance_log/asset_maintenance_log.json index 7d33176e2f3..c948630869b 100644 --- a/erpnext/assets/doctype/asset_maintenance_log/asset_maintenance_log.json +++ b/erpnext/assets/doctype/asset_maintenance_log/asset_maintenance_log.json @@ -23,6 +23,7 @@ "column_break_6", "maintenance_status", "assign_to_name", + "task_assignee_email", "due_date", "completion_date", "description", @@ -168,15 +169,22 @@ "in_preview": 1, "label": "Task Name", "read_only": 1 + }, + { + "fieldname": "task_assignee_email", + "fieldtype": "Data", + "label": "Task Assignee Email", + "read_only": 1 } ], "index_web_pages_for_search": 1, "is_submittable": 1, "links": [], - "modified": "2021-01-22 12:33:45.888124", + "modified": "2024-09-24 15:12:37.497853", "modified_by": "Administrator", "module": "Assets", "name": "Asset Maintenance Log", + "naming_rule": "By \"Naming Series\" field", "owner": "Administrator", "permissions": [ { @@ -199,4 +207,4 @@ "sort_order": "DESC", "track_changes": 1, "track_seen": 1 -} \ No newline at end of file +} diff --git a/erpnext/assets/doctype/asset_maintenance_log/asset_maintenance_log.py b/erpnext/assets/doctype/asset_maintenance_log/asset_maintenance_log.py index 95d02714c5b..140eb1af27e 100644 --- a/erpnext/assets/doctype/asset_maintenance_log/asset_maintenance_log.py +++ b/erpnext/assets/doctype/asset_maintenance_log/asset_maintenance_log.py @@ -37,6 +37,7 @@ class AssetMaintenanceLog(Document): naming_series: DF.Literal["ACC-AML-.YYYY.-"] periodicity: DF.Data | None task: DF.Link | None + task_assignee_email: DF.Data | None task_name: DF.Data | None # end: auto-generated types diff --git a/erpnext/assets/number_card/asset_value/asset_value.json b/erpnext/assets/number_card/asset_value/asset_value.json index 68e5f54c789..c437f4800f3 100644 --- a/erpnext/assets/number_card/asset_value/asset_value.json +++ b/erpnext/assets/number_card/asset_value/asset_value.json @@ -4,6 +4,7 @@ "docstatus": 0, "doctype": "Number Card", "document_type": "Asset", + "dynamic_filters_json": "[[\"Asset\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"]]", "filters_json": "[]", "function": "Sum", "idx": 0, diff --git a/erpnext/assets/number_card/new_assets_(this_year)/new_assets_(this_year).json b/erpnext/assets/number_card/new_assets_(this_year)/new_assets_(this_year).json index 6c8fb356575..cdf52d011d4 100644 --- a/erpnext/assets/number_card/new_assets_(this_year)/new_assets_(this_year).json +++ b/erpnext/assets/number_card/new_assets_(this_year)/new_assets_(this_year).json @@ -3,6 +3,7 @@ "docstatus": 0, "doctype": "Number Card", "document_type": "Asset", + "dynamic_filters_json": "[[\"Asset\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"]]", "filters_json": "[[\"Asset\",\"creation\",\"Timespan\",\"this year\",false]]", "function": "Count", "idx": 0, diff --git a/erpnext/assets/number_card/total_assets/total_assets.json b/erpnext/assets/number_card/total_assets/total_assets.json index d127de8f2c6..d8626da608c 100644 --- a/erpnext/assets/number_card/total_assets/total_assets.json +++ b/erpnext/assets/number_card/total_assets/total_assets.json @@ -3,6 +3,7 @@ "docstatus": 0, "doctype": "Number Card", "document_type": "Asset", + "dynamic_filters_json": "[[\"Asset\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"]]", "filters_json": "[]", "function": "Count", "idx": 0, diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.js b/erpnext/buying/doctype/purchase_order/purchase_order.js index bd92ebef3d7..e71f2418794 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.js +++ b/erpnext/buying/doctype/purchase_order/purchase_order.js @@ -65,10 +65,35 @@ frappe.ui.form.on("Purchase Order", { } }, + supplier: function (frm) { + // Do not update if inter company reference is there as the details will already be updated + if (frm.updating_party_details || frm.doc.inter_company_invoice_reference) return; + + if (frm.doc.__onload && frm.doc.__onload.load_after_mapping) return; + + erpnext.utils.get_party_details( + frm, + "erpnext.accounts.party.get_party_details", + { + posting_date: frm.doc.transaction_date, + bill_date: frm.doc.bill_date, + party: frm.doc.supplier, + party_type: "Supplier", + account: frm.doc.credit_to, + price_list: frm.doc.buying_price_list, + fetch_payment_terms_template: cint(!frm.doc.ignore_default_payment_terms_template), + }, + function () { + frm.set_df_property("apply_tds", "read_only", frm.supplier_tds ? 0 : 1); + frm.set_df_property("tax_withholding_category", "hidden", frm.supplier_tds ? 0 : 1); + } + ); + }, + get_materials_from_supplier: function (frm) { let po_details = []; - if (frm.doc.supplied_items && (flt(frm.doc.per_received, 2) == 100 || frm.doc.status === "Closed")) { + if (frm.doc.supplied_items && (flt(frm.doc.per_received) == 100 || frm.doc.status === "Closed")) { frm.doc.supplied_items.forEach((d) => { if (d.total_supplied_qty && d.total_supplied_qty != d.consumed_qty) { po_details.push(d.name); @@ -108,6 +133,15 @@ frappe.ui.form.on("Purchase Order", { frm.set_value("transaction_date", frappe.datetime.get_today()); } + if (frm.doc.__onload && frm.doc.supplier) { + if (frm.is_new()) { + frm.doc.apply_tds = frm.doc.__onload.supplier_tds ? 1 : 0; + } + if (!frm.doc.__onload.supplier_tds) { + frm.set_df_property("apply_tds", "read_only", 1); + } + } + erpnext.queries.setup_queries(frm, "Warehouse", function () { return erpnext.queries.warehouse(frm.doc); }); @@ -295,8 +329,8 @@ erpnext.buying.PurchaseOrderController = class PurchaseOrderController extends ( if (!["Closed", "Delivered"].includes(doc.status)) { if ( this.frm.doc.status !== "Closed" && - flt(this.frm.doc.per_received, 2) < 100 && - flt(this.frm.doc.per_billed, 2) < 100 + flt(this.frm.doc.per_received) < 100 && + flt(this.frm.doc.per_billed) < 100 ) { if (!this.frm.doc.__onload || this.frm.doc.__onload.can_update_items) { this.frm.add_custom_button(__("Update Items"), () => { @@ -310,7 +344,7 @@ erpnext.buying.PurchaseOrderController = class PurchaseOrderController extends ( } } if (this.frm.has_perm("submit")) { - if (flt(doc.per_billed, 2) < 100 || flt(doc.per_received, 2) < 100) { + if (flt(doc.per_billed) < 100 || flt(doc.per_received) < 100) { if (doc.status != "On Hold") { this.frm.add_custom_button( __("Hold"), @@ -348,8 +382,8 @@ erpnext.buying.PurchaseOrderController = class PurchaseOrderController extends ( } if (doc.status != "Closed") { if (doc.status != "On Hold") { - if (flt(doc.per_received, 2) < 100 && allow_receipt) { - cur_frm.add_custom_button( + if (flt(doc.per_received) < 100 && allow_receipt) { + this.frm.add_custom_button( __("Purchase Receipt"), this.make_purchase_receipt, __("Create") @@ -374,14 +408,15 @@ erpnext.buying.PurchaseOrderController = class PurchaseOrderController extends ( } } } - if (flt(doc.per_billed, 2) < 100) - cur_frm.add_custom_button( + // Please do not add precision in the below flt function + if (flt(doc.per_billed) < 100) + this.frm.add_custom_button( __("Purchase Invoice"), this.make_purchase_invoice, __("Create") ); - if (flt(doc.per_billed, 2) < 100 && doc.status != "Delivered") { + if (flt(doc.per_billed) < 100 && doc.status != "Delivered") { this.frm.add_custom_button( __("Payment"), () => this.make_payment_entry(), @@ -389,7 +424,7 @@ erpnext.buying.PurchaseOrderController = class PurchaseOrderController extends ( ); } - if (flt(doc.per_billed, 2) < 100) { + if (flt(doc.per_billed) < 100) { this.frm.add_custom_button( __("Payment Request"), function () { diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.py b/erpnext/buying/doctype/purchase_order/purchase_order.py index 0508483a0fc..6ba9cb69f9f 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.py +++ b/erpnext/buying/doctype/purchase_order/purchase_order.py @@ -581,7 +581,7 @@ class PurchaseOrder(BuyingController): def update_receiving_percentage(self): total_qty, received_qty = 0.0, 0.0 for item in self.items: - received_qty += item.received_qty + received_qty += min(item.received_qty, item.qty) total_qty += item.qty if total_qty: self.db_set("per_received", flt(received_qty / total_qty) * 100, update_modified=False) @@ -625,9 +625,11 @@ class PurchaseOrder(BuyingController): if not self.is_against_so(): return for item in removed_items: - prev_ordered_qty = frappe.get_cached_value( - "Sales Order Item", item.get("sales_order_item"), "ordered_qty" + prev_ordered_qty = ( + frappe.get_cached_value("Sales Order Item", item.get("sales_order_item"), "ordered_qty") + or 0.0 ) + frappe.db.set_value( "Sales Order Item", item.get("sales_order_item"), "ordered_qty", prev_ordered_qty - item.qty ) @@ -648,6 +650,13 @@ class PurchaseOrder(BuyingController): if sco: update_sco_status(sco, "Closed" if self.status == "Closed" else None) + def set_missing_values(self, for_validate=False): + tds_category = frappe.db.get_value("Supplier", self.supplier, "tax_withholding_category") + if tds_category and not for_validate: + self.set_onload("supplier_tds", tds_category) + + super().set_missing_values(for_validate) + @frappe.request_cache def item_last_purchase_rate(name, conversion_rate, item_code, conversion_factor=1.0): @@ -731,7 +740,7 @@ def make_purchase_receipt(source_name, target_doc=None): "condition": lambda doc: abs(doc.received_qty) < abs(doc.qty) and doc.delivered_by_supplier != 1, }, - "Purchase Taxes and Charges": {"doctype": "Purchase Taxes and Charges", "add_if_empty": True}, + "Purchase Taxes and Charges": {"doctype": "Purchase Taxes and Charges", "reset_value": True}, }, target_doc, set_missing_values, @@ -760,6 +769,11 @@ def get_mapped_purchase_invoice(source_name, target_doc=None, ignore_permissions def postprocess(source, target): target.flags.ignore_permissions = ignore_permissions set_missing_values(source, target) + + # set tax_withholding_category from Purchase Order + if source.apply_tds and source.tax_withholding_category and target.apply_tds: + target.tax_withholding_category = source.tax_withholding_category + # Get the advance paid Journal Entries in Purchase Invoice Advance if target.get("allocate_advances_automatically"): target.set_advances() @@ -807,7 +821,7 @@ def get_mapped_purchase_invoice(source_name, target_doc=None, ignore_permissions "postprocess": update_item, "condition": lambda doc: (doc.base_amount == 0 or abs(doc.billed_amt) < abs(doc.amount)), }, - "Purchase Taxes and Charges": {"doctype": "Purchase Taxes and Charges", "add_if_empty": True}, + "Purchase Taxes and Charges": {"doctype": "Purchase Taxes and Charges", "reset_value": True}, } doc = get_mapped_doc( @@ -877,6 +891,20 @@ def make_subcontracting_order(source_name, target_doc=None, save=False, submit=F def get_mapped_subcontracting_order(source_name, target_doc=None): + def post_process(source_doc, target_doc): + target_doc.populate_items_table() + + if target_doc.set_warehouse: + for item in target_doc.items: + item.warehouse = target_doc.set_warehouse + else: + if source_doc.set_warehouse: + for item in target_doc.items: + item.warehouse = source_doc.set_warehouse + else: + for idx, item in enumerate(target_doc.items): + item.warehouse = source_doc.items[idx].warehouse + if target_doc and isinstance(target_doc, str): target_doc = json.loads(target_doc) for key in ["service_items", "items", "supplied_items"]: @@ -907,22 +935,9 @@ def get_mapped_subcontracting_order(source_name, target_doc=None): }, }, target_doc, + post_process, ) - target_doc.populate_items_table() - source_doc = frappe.get_doc("Purchase Order", source_name) - - if target_doc.set_warehouse: - for item in target_doc.items: - item.warehouse = target_doc.set_warehouse - else: - if source_doc.set_warehouse: - for item in target_doc.items: - item.warehouse = source_doc.set_warehouse - else: - for idx, item in enumerate(target_doc.items): - item.warehouse = source_doc.items[idx].warehouse - return target_doc diff --git a/erpnext/buying/doctype/purchase_order/purchase_order_dashboard.py b/erpnext/buying/doctype/purchase_order/purchase_order_dashboard.py index 36fe079fc98..3fb8b30f139 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order_dashboard.py +++ b/erpnext/buying/doctype/purchase_order/purchase_order_dashboard.py @@ -14,18 +14,25 @@ def get_data(): "Material Request": ["items", "material_request"], "Supplier Quotation": ["items", "supplier_quotation"], "Project": ["items", "project"], + "Sales Order": ["items", "sales_order"], + "BOM": ["items", "bom"], + "Production Plan": ["items", "production_plan"], + "Blanket Order": ["items", "blanket_order"], }, "transactions": [ - {"label": _("Related"), "items": ["Purchase Receipt", "Purchase Invoice"]}, + {"label": _("Related"), "items": ["Purchase Receipt", "Purchase Invoice", "Sales Order"]}, {"label": _("Payment"), "items": ["Payment Entry", "Journal Entry", "Payment Request"]}, { "label": _("Reference"), - "items": ["Material Request", "Supplier Quotation", "Project", "Auto Repeat"], + "items": ["Supplier Quotation", "Project", "Auto Repeat"], + }, + { + "label": _("Manufacturing"), + "items": ["Material Request", "BOM", "Production Plan", "Blanket Order"], }, { "label": _("Sub-contracting"), "items": ["Subcontracting Order", "Subcontracting Receipt", "Stock Entry"], }, - {"label": _("Internal"), "items": ["Sales Order"]}, ], } diff --git a/erpnext/buying/doctype/purchase_order/purchase_order_list.js b/erpnext/buying/doctype/purchase_order/purchase_order_list.js index c1bf1f3b8d9..7b37987b926 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order_list.js +++ b/erpnext/buying/doctype/purchase_order/purchase_order_list.js @@ -10,14 +10,15 @@ frappe.listview_settings["Purchase Order"] = { "status", ], get_indicator: function (doc) { + // Please do not add precision in the flt function if (doc.status === "Closed") { return [__("Closed"), "green", "status,=,Closed"]; } else if (doc.status === "On Hold") { return [__("On Hold"), "orange", "status,=,On Hold"]; } else if (doc.status === "Delivered") { return [__("Delivered"), "green", "status,=,Closed"]; - } else if (flt(doc.per_received, 2) < 100 && doc.status !== "Closed") { - if (flt(doc.per_billed, 2) < 100) { + } else if (flt(doc.per_received) < 100 && doc.status !== "Closed") { + if (flt(doc.per_billed) < 100) { return [ __("To Receive and Bill"), "orange", @@ -26,17 +27,9 @@ frappe.listview_settings["Purchase Order"] = { } else { return [__("To Receive"), "orange", "per_received,<,100|per_billed,=,100|status,!=,Closed"]; } - } else if ( - flt(doc.per_received, 2) >= 100 && - flt(doc.per_billed, 2) < 100 && - doc.status !== "Closed" - ) { + } else if (flt(doc.per_received) >= 100 && flt(doc.per_billed) < 100 && doc.status !== "Closed") { return [__("To Bill"), "orange", "per_received,=,100|per_billed,<,100|status,!=,Closed"]; - } else if ( - flt(doc.per_received, 2) >= 100 && - flt(doc.per_billed, 2) == 100 && - doc.status !== "Closed" - ) { + } else if (flt(doc.per_received) >= 100 && flt(doc.per_billed) == 100 && doc.status !== "Closed") { return [__("Completed"), "green", "per_received,=,100|per_billed,=,100|status,!=,Closed"]; } }, diff --git a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.js b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.js index b8689d29a56..d7c2c3f24b1 100644 --- a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.js +++ b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.js @@ -146,8 +146,8 @@ frappe.ui.form.on("Request for Quotation", { return; } }, - "Download PDF for Supplier", - "Download" + __("Download PDF for Supplier"), + __("Download") ); }, __("Tools") @@ -272,9 +272,10 @@ frappe.ui.form.on("Request for Quotation", { }); }; - dialog.fields_dict.note.$wrapper - .append(`

This is a preview of the email to be sent. A PDF of the document will - automatically be attached with the email.

`); + const msg = __( + "This is a preview of the email to be sent. A PDF of the document will automatically be attached with the email." + ); + dialog.fields_dict.note.$wrapper.append(`

${msg}

`); dialog.show(); }, diff --git a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py index c8ef833e0e9..3a71733a003 100644 --- a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py +++ b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py @@ -390,6 +390,7 @@ def make_supplier_quotation_from_rfq(source_name, target_doc=None, for_supplier= "Request for Quotation": { "doctype": "Supplier Quotation", "validation": {"docstatus": ["=", 1]}, + "field_map": {"opportunity": "opportunity"}, }, "Request for Quotation Item": { "doctype": "Supplier Quotation Item", @@ -455,6 +456,7 @@ def create_rfq_items(sq_doc, supplier, data): "material_request", "material_request_item", "stock_qty", + "uom", ]: args[field] = data.get(field) diff --git a/erpnext/buying/doctype/supplier/supplier.py b/erpnext/buying/doctype/supplier/supplier.py index bccab8b01e0..3b72953c563 100644 --- a/erpnext/buying/doctype/supplier/supplier.py +++ b/erpnext/buying/doctype/supplier/supplier.py @@ -97,7 +97,7 @@ class Supplier(TransactionBase): elif supp_master_name == "Naming Series": set_name_by_naming_series(self) else: - self.name = set_name_from_naming_options(frappe.get_meta(self.doctype).autoname, self) + set_name_from_naming_options(frappe.get_meta(self.doctype).autoname, self) def on_update(self): self.create_primary_contact() diff --git a/erpnext/buying/report/item_wise_purchase_history/item_wise_purchase_history.js b/erpnext/buying/report/item_wise_purchase_history/item_wise_purchase_history.js new file mode 100644 index 00000000000..37870b43b6d --- /dev/null +++ b/erpnext/buying/report/item_wise_purchase_history/item_wise_purchase_history.js @@ -0,0 +1,62 @@ +// Copyright (c) 2024, Frappe Technologies Pvt. Ltd. and contributors +// For license information, please see license.txt + +frappe.query_reports["Item-wise Purchase History"] = { + filters: [ + { + fieldname: "company", + label: __("Company"), + fieldtype: "Link", + options: "Company", + default: frappe.defaults.get_user_default("Company"), + reqd: 1, + }, + { + fieldname: "from_date", + reqd: 1, + label: __("From Date"), + fieldtype: "Date", + default: frappe.datetime.add_months(frappe.datetime.get_today(), -1), + }, + { + fieldname: "to_date", + reqd: 1, + default: frappe.datetime.get_today(), + label: __("To Date"), + fieldtype: "Date", + }, + { + fieldname: "item_group", + label: __("Item Group"), + fieldtype: "Link", + options: "Item Group", + }, + { + fieldname: "item_code", + label: __("Item"), + fieldtype: "Link", + options: "Item", + get_query: () => { + return { + query: "erpnext.controllers.queries.item_query", + }; + }, + }, + { + fieldname: "supplier", + label: __("Supplier"), + fieldtype: "Link", + options: "Supplier", + }, + ], + + formatter: function (value, row, column, data, default_formatter) { + value = default_formatter(value, row, column, data); + let format_fields = ["received_qty", "billed_amt"]; + + if (format_fields.includes(column.fieldname) && data && data[column.fieldname] > 0) { + value = "" + value + ""; + } + return value; + }, +}; diff --git a/erpnext/buying/report/item_wise_purchase_history/item_wise_purchase_history.json b/erpnext/buying/report/item_wise_purchase_history/item_wise_purchase_history.json index 521c68c5329..35045afcf8b 100644 --- a/erpnext/buying/report/item_wise_purchase_history/item_wise_purchase_history.json +++ b/erpnext/buying/report/item_wise_purchase_history/item_wise_purchase_history.json @@ -1,30 +1,30 @@ { - "add_total_row": 1, - "apply_user_permissions": 1, - "creation": "2013-05-03 14:55:53", - "disabled": 0, - "docstatus": 0, - "doctype": "Report", - "idx": 3, - "is_standard": "Yes", - "modified": "2017-02-24 20:08:57.446613", - "modified_by": "Administrator", - "module": "Buying", - "name": "Item-wise Purchase History", - "owner": "Administrator", - "query": "select\n po_item.item_code as \"Item Code:Link/Item:120\",\n\tpo_item.item_name as \"Item Name::120\",\n po_item.item_group as \"Item Group:Link/Item Group:120\",\n\tpo_item.description as \"Description::150\",\n\tpo_item.qty as \"Qty:Float:100\",\n\tpo_item.uom as \"UOM:Link/UOM:80\",\n\tpo_item.base_rate as \"Rate:Currency:120\",\n\tpo_item.base_amount as \"Amount:Currency:120\",\n\tpo.name as \"Purchase Order:Link/Purchase Order:120\",\n\tpo.transaction_date as \"Transaction Date:Date:140\",\n\tpo.supplier as \"Supplier:Link/Supplier:130\",\n sup.supplier_name as \"Supplier Name::150\",\n\tpo_item.project as \"Project:Link/Project:130\",\n\tifnull(po_item.received_qty, 0) as \"Received Qty:Float:120\",\n\tpo.company as \"Company:Link/Company:\"\nfrom\n\t`tabPurchase Order` po, `tabPurchase Order Item` po_item, `tabSupplier` sup\nwhere\n\tpo.name = po_item.parent and po.supplier = sup.name and po.docstatus = 1\norder by po.name desc", - "ref_doctype": "Purchase Order", - "report_name": "Item-wise Purchase History", - "report_type": "Query Report", + "add_total_row": 1, + "creation": "2013-05-03 14:55:53", + "disable_prepared_report": 0, + "disabled": 0, + "docstatus": 0, + "doctype": "Report", + "idx": 5, + "is_standard": "Yes", + "modified": "2024-06-19 12:12:15.418799", + "modified_by": "Administrator", + "module": "Buying", + "name": "Item-wise Purchase History", + "owner": "Administrator", + "prepared_report": 0, + "ref_doctype": "Purchase Order", + "report_name": "Item-wise Purchase History", + "report_type": "Script Report", "roles": [ { "role": "Stock User" - }, + }, { "role": "Purchase Manager" - }, + }, { "role": "Purchase User" } - ] + ] } \ No newline at end of file diff --git a/erpnext/buying/report/item_wise_purchase_history/item_wise_purchase_history.py b/erpnext/buying/report/item_wise_purchase_history/item_wise_purchase_history.py new file mode 100644 index 00000000000..a8950af3ea3 --- /dev/null +++ b/erpnext/buying/report/item_wise_purchase_history/item_wise_purchase_history.py @@ -0,0 +1,276 @@ +# Copyright (c) 2024, Frappe Technologies Pvt. Ltd. and contributors +# For license information, please see license.txt + +import frappe +from frappe import _ +from frappe.utils import flt +from frappe.utils.nestedset import get_descendants_of + + +def execute(filters=None): + filters = frappe._dict(filters or {}) + if filters.from_date > filters.to_date: + frappe.throw(_("From Date cannot be greater than To Date")) + + columns = get_columns(filters) + data = get_data(filters) + + chart_data = get_chart_data(data) + + return columns, data, None, chart_data + + +def get_columns(filters): + return [ + { + "label": _("Item Code"), + "fieldtype": "Link", + "fieldname": "item_code", + "options": "Item", + "width": 120, + }, + { + "label": _("Item Name"), + "fieldtype": "Data", + "fieldname": "item_name", + "width": 140, + }, + { + "label": _("Item Group"), + "fieldtype": "Link", + "fieldname": "item_group", + "options": "Item Group", + "width": 120, + }, + { + "label": _("Description"), + "fieldtype": "Data", + "fieldname": "description", + "width": 140, + }, + { + "label": _("Quantity"), + "fieldtype": "Float", + "fieldname": "quantity", + "width": 120, + }, + { + "label": _("UOM"), + "fieldtype": "Link", + "fieldname": "uom", + "options": "UOM", + "width": 90, + }, + { + "label": _("Rate"), + "fieldname": "rate", + "fieldtype": "Currency", + "options": "currency", + "width": 120, + }, + { + "label": _("Amount"), + "fieldname": "amount", + "fieldtype": "Currency", + "options": "currency", + "width": 120, + }, + { + "label": _("Purchase Order"), + "fieldtype": "Link", + "fieldname": "purchase_order", + "options": "Purchase Order", + "width": 160, + }, + { + "label": _("Transaction Date"), + "fieldtype": "Date", + "fieldname": "transaction_date", + "width": 110, + }, + { + "label": _("Supplier"), + "fieldtype": "Link", + "fieldname": "supplier", + "options": "Supplier", + "width": 100, + }, + { + "label": _("Supplier Name"), + "fieldtype": "Data", + "fieldname": "supplier_name", + "width": 140, + }, + { + "label": _("Supplier Group"), + "fieldtype": "Link", + "fieldname": "supplier_group", + "options": "Supplier Group", + "width": 120, + }, + { + "label": _("Project"), + "fieldtype": "Link", + "fieldname": "project", + "options": "Project", + "width": 100, + }, + { + "label": _("Received Quantity"), + "fieldtype": "Float", + "fieldname": "received_qty", + "width": 150, + }, + { + "label": _("Billed Amount"), + "fieldtype": "Currency", + "fieldname": "billed_amt", + "options": "currency", + "width": 120, + }, + { + "label": _("Company"), + "fieldtype": "Link", + "fieldname": "company", + "options": "Company", + "width": 100, + }, + { + "label": _("Currency"), + "fieldtype": "Link", + "fieldname": "currency", + "options": "Currency", + "hidden": 1, + }, + ] + + +def get_data(filters): + data = [] + + company_list = get_descendants_of("Company", filters.get("company")) + company_list.append(filters.get("company")) + + supplier_details = get_supplier_details() + item_details = get_item_details() + purchase_order_records = get_purchase_order_details(company_list, filters) + + for record in purchase_order_records: + supplier_record = supplier_details.get(record.supplier) + item_record = item_details.get(record.item_code) + row = { + "item_code": record.get("item_code"), + "item_name": item_record.get("item_name"), + "item_group": item_record.get("item_group"), + "description": record.get("description"), + "quantity": record.get("qty"), + "uom": record.get("uom"), + "rate": record.get("base_rate"), + "amount": record.get("base_amount"), + "purchase_order": record.get("name"), + "transaction_date": record.get("transaction_date"), + "supplier": record.get("supplier"), + "supplier_name": supplier_record.get("supplier_name"), + "supplier_group": supplier_record.get("supplier_group"), + "project": record.get("project"), + "received_qty": flt(record.get("received_qty")), + "billed_amt": flt(record.get("billed_amt")), + "company": record.get("company"), + } + row["currency"] = frappe.get_cached_value("Company", row["company"], "default_currency") + data.append(row) + + return data + + +def get_supplier_details(): + details = frappe.get_all("Supplier", fields=["name", "supplier_name", "supplier_group"]) + supplier_details = {} + for d in details: + supplier_details.setdefault( + d.name, + frappe._dict({"supplier_name": d.supplier_name, "supplier_group": d.supplier_group}), + ) + return supplier_details + + +def get_item_details(): + details = frappe.db.get_all("Item", fields=["name", "item_name", "item_group"]) + item_details = {} + for d in details: + item_details.setdefault(d.name, frappe._dict({"item_name": d.item_name, "item_group": d.item_group})) + return item_details + + +def get_purchase_order_details(company_list, filters): + db_po = frappe.qb.DocType("Purchase Order") + db_po_item = frappe.qb.DocType("Purchase Order Item") + + query = ( + frappe.qb.from_(db_po) + .inner_join(db_po_item) + .on(db_po_item.parent == db_po.name) + .select( + db_po.name, + db_po.supplier, + db_po.transaction_date, + db_po.project, + db_po.company, + db_po_item.item_code, + db_po_item.description, + db_po_item.qty, + db_po_item.uom, + db_po_item.base_rate, + db_po_item.base_amount, + db_po_item.received_qty, + (db_po_item.billed_amt * db_po.conversion_rate).as_("billed_amt"), + ) + .where(db_po.docstatus == 1) + .where(db_po.company.isin(tuple(company_list))) + ) + + for field in ("item_code", "item_group"): + if filters.get(field): + query = query.where(db_po_item[field] == filters[field]) + + if filters.get("from_date"): + query = query.where(db_po.transaction_date >= filters.from_date) + + if filters.get("to_date"): + query = query.where(db_po.transaction_date <= filters.to_date) + + if filters.get("supplier"): + query = query.where(db_po.supplier == filters.supplier) + + return query.run(as_dict=1) + + +def get_chart_data(data): + item_wise_purchase_map = {} + labels, datapoints = [], [] + + for row in data: + item_key = row.get("item_code") + + if item_key not in item_wise_purchase_map: + item_wise_purchase_map[item_key] = 0 + + item_wise_purchase_map[item_key] = flt(item_wise_purchase_map[item_key]) + flt(row.get("amount")) + + item_wise_purchase_map = { + item: value + for item, value in (sorted(item_wise_purchase_map.items(), key=lambda i: i[1], reverse=True)) + } + + for key in item_wise_purchase_map: + labels.append(key) + datapoints.append(item_wise_purchase_map[key]) + + return { + "data": { + "labels": labels[:30], # show max of 30 items in chart + "datasets": [{"name": _("Total Purchase Amount"), "values": datapoints[:30]}], + }, + "type": "bar", + "fieldtype": "Currency", + } diff --git a/erpnext/buying/report/procurement_tracker/procurement_tracker.py b/erpnext/buying/report/procurement_tracker/procurement_tracker.py index a7e03c08fac..bd0798236b3 100644 --- a/erpnext/buying/report/procurement_tracker/procurement_tracker.py +++ b/erpnext/buying/report/procurement_tracker/procurement_tracker.py @@ -175,7 +175,7 @@ def get_data(filters): "purchase_order": po.parent, "supplier": po.supplier, "estimated_cost": flt(mr_record.get("amount")), - "actual_cost": flt(pi_records.get(po.name)), + "actual_cost": flt(pi_records.get(po.name)) or flt(po.amount), "purchase_order_amt": flt(po.amount), "purchase_order_amt_in_company_currency": flt(po.base_amount), "expected_delivery_date": po.schedule_date, diff --git a/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.py b/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.py index da1c70d3179..6d2034d1878 100644 --- a/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.py +++ b/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.py @@ -18,6 +18,7 @@ def execute(filters=None): columns = get_columns(filters) data = get_data(filters) + update_received_amount(data) if not data: return [], [], None, [] @@ -60,7 +61,6 @@ def get_data(filters): (po_item.qty - po_item.received_qty).as_("pending_qty"), Sum(IfNull(pi_item.qty, 0)).as_("billed_qty"), po_item.base_amount.as_("amount"), - (po_item.received_qty * po_item.base_rate).as_("received_qty_amount"), (po_item.billed_amt * IfNull(po.conversion_rate, 1)).as_("billed_amount"), (po_item.base_amount - (po_item.billed_amt * IfNull(po.conversion_rate, 1))).as_( "pending_amount" @@ -92,6 +92,39 @@ def get_data(filters): return data +def update_received_amount(data): + pr_data = get_received_amount_data(data) + + for row in data: + row.received_qty_amount = flt(pr_data.get(row.name)) + + +def get_received_amount_data(data): + pr = frappe.qb.DocType("Purchase Receipt") + pr_item = frappe.qb.DocType("Purchase Receipt Item") + + query = ( + frappe.qb.from_(pr) + .inner_join(pr_item) + .on(pr_item.parent == pr.name) + .select( + pr_item.purchase_order_item, + Sum(pr_item.base_amount).as_("received_qty_amount"), + ) + .where((pr_item.parent == pr.name) & (pr.docstatus == 1)) + .groupby(pr_item.purchase_order_item) + ) + + query = query.where(pr_item.purchase_order_item.isin([row.name for row in data])) + + data = query.run() + + if not data: + return frappe._dict() + + return frappe._dict(data) + + def prepare_data(data, filters): completed, pending = 0, 0 pending_field = "pending_amount" @@ -147,7 +180,7 @@ def prepare_data(data, filters): def prepare_chart_data(pending, completed): - labels = ["Amount to Bill", "Billed Amount"] + labels = [_("Amount to Bill"), _("Billed Amount")] return { "data": {"labels": labels, "datasets": [{"values": [pending, completed]}]}, diff --git a/erpnext/buying/report/purchase_order_trends/purchase_order_trends.js b/erpnext/buying/report/purchase_order_trends/purchase_order_trends.js index 56684a8659b..9b193a34d83 100644 --- a/erpnext/buying/report/purchase_order_trends/purchase_order_trends.js +++ b/erpnext/buying/report/purchase_order_trends/purchase_order_trends.js @@ -2,3 +2,10 @@ // License: GNU General Public License v3. See license.txt frappe.query_reports["Purchase Order Trends"] = $.extend({}, erpnext.purchase_trends_filters); + +frappe.query_reports["Purchase Order Trends"]["filters"].push({ + fieldname: "include_closed_orders", + label: __("Include Closed Orders"), + fieldtype: "Check", + default: 0, +}); diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 63d0404642a..e1a7d5803c9 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -233,7 +233,7 @@ class AccountsController(TransactionBase): ).format( frappe.bold(document_type), get_link_to_form(self.doctype, self.get("return_against")), - frappe.bold("Update Outstanding for Self"), + frappe.bold(_("Update Outstanding for Self")), get_link_to_form("Payment Reconciliation", "Payment Reconciliation"), ) ) @@ -345,13 +345,30 @@ class AccountsController(TransactionBase): repost_doc.flags.ignore_links = True repost_doc.save(ignore_permissions=True) + def _remove_advance_payment_ledger_entries(self): + adv = qb.DocType("Advance Payment Ledger Entry") + qb.from_(adv).delete().where(adv.voucher_type.eq(self.doctype) & adv.voucher_no.eq(self.name)).run() + + advance_payment_doctypes = frappe.get_hooks("advance_payment_doctypes") + + if self.doctype in advance_payment_doctypes: + qb.from_(adv).delete().where( + adv.against_voucher_type.eq(self.doctype) & adv.against_voucher_no.eq(self.name) + ).run() + def on_trash(self): + from erpnext.accounts.utils import delete_exchange_gain_loss_journal + + self._remove_advance_payment_ledger_entries() self._remove_references_in_repost_doctypes() self._remove_references_in_unreconcile() self.remove_serial_and_batch_bundle() # delete sl and gl entries on deletion of transaction if frappe.db.get_single_value("Accounts Settings", "delete_linked_ledger_entries"): + # delete linked exchange gain/loss journal + delete_exchange_gain_loss_journal(self) + ple = frappe.qb.DocType("Payment Ledger Entry") frappe.qb.from_(ple).delete().where( (ple.voucher_type == self.doctype) & (ple.voucher_no == self.name) @@ -388,12 +405,15 @@ class AccountsController(TransactionBase): def validate_return_against_account(self): if self.doctype in ["Sales Invoice", "Purchase Invoice"] and self.is_return and self.return_against: cr_dr_account_field = "debit_to" if self.doctype == "Sales Invoice" else "credit_to" - cr_dr_account_label = "Debit To" if self.doctype == "Sales Invoice" else "Credit To" - cr_dr_account = self.get(cr_dr_account_field) - if frappe.get_value(self.doctype, self.return_against, cr_dr_account_field) != cr_dr_account: + original_account = frappe.get_value(self.doctype, self.return_against, cr_dr_account_field) + if original_account != self.get(cr_dr_account_field): frappe.throw( - _("'{0}' account: '{1}' should match the Return Against Invoice").format( - frappe.bold(cr_dr_account_label), frappe.bold(cr_dr_account) + _( + "Please set {0} to {1}, the same account that was used in the original invoice {2}." + ).format( + frappe.bold(_(self.meta.get_label(cr_dr_account_field), context=self.doctype)), + frappe.bold(original_account), + frappe.bold(self.return_against), ) ) @@ -443,6 +463,11 @@ class AccountsController(TransactionBase): ) def validate_invoice_documents_schedule(self): + if self.is_return: + self.payment_terms_template = "" + self.payment_schedule = [] + return + self.validate_payment_schedule_dates() self.set_due_date() self.set_payment_schedule() @@ -457,7 +482,7 @@ class AccountsController(TransactionBase): self.validate_payment_schedule_amount() def validate_all_documents_schedule(self): - if self.doctype in ("Sales Invoice", "Purchase Invoice") and not self.is_return: + if self.doctype in ("Sales Invoice", "Purchase Invoice"): self.validate_invoice_documents_schedule() elif self.doctype in ("Quotation", "Purchase Order", "Sales Order"): self.validate_non_invoice_documents_schedule() @@ -1031,7 +1056,9 @@ class AccountsController(TransactionBase): gl_dict.update( { "transaction_currency": self.get("currency") or self.company_currency, - "transaction_exchange_rate": self.get("conversion_rate", 1), + "transaction_exchange_rate": item.get("exchange_rate", 1) + if self.doctype == "Journal Entry" and item + else self.get("conversion_rate", 1), "debit_in_transaction_currency": self.get_value_in_transaction_currency( account_currency, gl_dict, "debit" ), @@ -1056,16 +1083,26 @@ class AccountsController(TransactionBase): "Stock Entry": "stock_entry_type", "Asset Capitalization": "entry_type", } + + for method_name in frappe.get_hooks("voucher_subtypes"): + voucher_subtype = frappe.get_attr(method_name)(self) + + if voucher_subtype: + return voucher_subtype + if self.doctype in voucher_subtypes: return self.get(voucher_subtypes[self.doctype]) elif self.doctype == "Purchase Receipt" and self.is_return: return "Purchase Return" elif self.doctype == "Delivery Note" and self.is_return: return "Sales Return" - elif (self.doctype == "Sales Invoice" and self.is_return) or self.doctype == "Purchase Invoice": + elif self.doctype == "Sales Invoice" and self.is_return: return "Credit Note" - elif (self.doctype == "Purchase Invoice" and self.is_return) or self.doctype == "Sales Invoice": + elif self.doctype == "Sales Invoice" and self.is_debit_note: return "Debit Note" + elif self.doctype == "Purchase Invoice" and self.is_return: + return "Debit Note" + return self.doctype def get_value_in_transaction_currency(self, account_currency, gl_dict, field): @@ -1261,7 +1298,11 @@ class AccountsController(TransactionBase): d.exchange_gain_loss = difference def make_precision_loss_gl_entry(self, gl_entries): - round_off_account, round_off_cost_center = get_round_off_account_and_cost_center( + ( + round_off_account, + round_off_cost_center, + round_off_for_opening, + ) = get_round_off_account_and_cost_center( self.company, "Purchase Invoice", self.name, self.use_company_roundoff_cost_center ) @@ -1334,6 +1375,12 @@ class AccountsController(TransactionBase): # Cancelling existing exchange gain/loss journals is handled during the `on_cancel` event. # see accounts/utils.py:cancel_exchange_gain_loss_journal() if self.docstatus == 1: + if dimensions_dict is None: + dimensions_dict = frappe._dict() + active_dimensions = get_dimensions()[0] + for dim in active_dimensions: + dimensions_dict[dim.fieldname] = self.get(dim.fieldname) + if self.get("doctype") == "Journal Entry": # 'args' is populated with exchange gain/loss account and the amount to be booked. # These are generated by Sales/Purchase Invoice during reconciliation and advance allocation. @@ -1574,6 +1621,7 @@ class AccountsController(TransactionBase): remove_from_bank_transaction, ) from erpnext.accounts.utils import ( + cancel_common_party_journal, cancel_exchange_gain_loss_journal, unlink_ref_doc_from_payment_entries, ) @@ -1585,6 +1633,7 @@ class AccountsController(TransactionBase): # Cancel Exchange Gain/Loss Journal before unlinking cancel_exchange_gain_loss_journal(self) + cancel_common_party_journal(self) if frappe.db.get_single_value("Accounts Settings", "unlink_payment_on_cancellation_of_invoice"): unlink_ref_doc_from_payment_entries(self) @@ -1904,21 +1953,23 @@ class AccountsController(TransactionBase): return stock_items - def set_total_advance_paid(self): - ple = frappe.qb.DocType("Payment Ledger Entry") - party = self.customer if self.doctype == "Sales Order" else self.supplier + def calculate_total_advance_from_ledger(self): + adv = frappe.qb.DocType("Advance Payment Ledger Entry") advance = ( - frappe.qb.from_(ple) - .select(ple.account_currency, Abs(Sum(ple.amount_in_account_currency)).as_("amount")) + frappe.qb.from_(adv) + .select(adv.currency.as_("account_currency"), Abs(Sum(adv.amount)).as_("amount")) .where( - (ple.against_voucher_type == self.doctype) - & (ple.against_voucher_no == self.name) - & (ple.party == party) - & (ple.delinked == 0) - & (ple.company == self.company) + (adv.against_voucher_type == self.doctype) + & (adv.against_voucher_no == self.name) + & (adv.company == self.company) ) .run(as_dict=True) ) + return advance + + def set_total_advance_paid(self): + advance = self.calculate_total_advance_from_ledger() + advance_paid, order_total = None, None if advance: advance = advance[0] @@ -1951,7 +2002,7 @@ class AccountsController(TransactionBase): ).format(formatted_advance_paid, self.name, formatted_order_total) ) - frappe.db.set_value(self.doctype, self.name, "advance_paid", advance_paid) + self.db_set("advance_paid", advance_paid) @property def company_abbr(self): @@ -1962,7 +2013,9 @@ class AccountsController(TransactionBase): def raise_missing_debit_credit_account_error(self, party_type, party): """Raise an error if debit to/credit to account does not exist.""" - db_or_cr = frappe.bold("Debit To") if self.doctype == "Sales Invoice" else frappe.bold("Credit To") + db_or_cr = ( + frappe.bold(_("Debit To")) if self.doctype == "Sales Invoice" else frappe.bold(_("Credit To")) + ) rec_or_pay = "Receivable" if self.doctype == "Sales Invoice" else "Payable" link_to_party = frappe.utils.get_link_to_form(party_type, party) @@ -2410,12 +2463,21 @@ class AccountsController(TransactionBase): primary_account = get_party_account(primary_party_type, primary_party, self.company) secondary_account = get_party_account(secondary_party_type, secondary_party, self.company) + primary_account_currency = get_account_currency(primary_account) + secondary_account_currency = get_account_currency(secondary_account) + default_currency = erpnext.get_company_currency(self.company) + + # Determine if multi-currency journal entry is needed + multi_currency = ( + primary_account_currency != default_currency or secondary_account_currency != default_currency + ) jv = frappe.new_doc("Journal Entry") jv.voucher_type = "Journal Entry" jv.posting_date = self.posting_date jv.company = self.company jv.remark = f"Adjustment for {self.doctype} {self.name}" + jv.is_system_generated = True reconcilation_entry = frappe._dict() advance_entry = frappe._dict() @@ -2433,7 +2495,7 @@ class AccountsController(TransactionBase): advance_entry.cost_center = self.cost_center or erpnext.get_default_cost_center(self.company) advance_entry.is_advance = "Yes" - # update dimesions + # Update dimensions dimensions_dict = frappe._dict() active_dimensions = get_dimensions()[0] for dim in active_dimensions: @@ -2442,13 +2504,58 @@ class AccountsController(TransactionBase): reconcilation_entry.update(dimensions_dict) advance_entry.update(dimensions_dict) - if self.doctype == "Sales Invoice": - reconcilation_entry.credit_in_account_currency = self.outstanding_amount - advance_entry.debit_in_account_currency = self.outstanding_amount - else: - advance_entry.credit_in_account_currency = self.outstanding_amount - reconcilation_entry.debit_in_account_currency = self.outstanding_amount + # Calculate exchange rates if necessary + if multi_currency: + # Exchange rates for primary and secondary accounts + exc_rate_primary_to_default = ( + 1 + if primary_account_currency == default_currency + else get_exchange_rate(primary_account_currency, default_currency, self.posting_date) + ) + exc_rate_secondary_to_default = ( + 1 + if secondary_account_currency == default_currency + else get_exchange_rate(secondary_account_currency, default_currency, self.posting_date) + ) + exc_rate_secondary_to_primary = ( + 1 + if secondary_account_currency == primary_account_currency + else get_exchange_rate( + secondary_account_currency, primary_account_currency, self.posting_date + ) + ) + # Convert outstanding amount from secondary to primary account currency, if needed + + os_in_default_currency = self.outstanding_amount * exc_rate_secondary_to_default + os_in_primary_currency = self.outstanding_amount * exc_rate_secondary_to_primary + + if self.doctype == "Sales Invoice": + # Calculate credit and debit values for reconciliation and advance entries + reconcilation_entry.credit_in_account_currency = self.outstanding_amount + reconcilation_entry.credit = os_in_default_currency + + advance_entry.debit_in_account_currency = os_in_primary_currency + advance_entry.debit = os_in_default_currency + else: + advance_entry.credit_in_account_currency = os_in_primary_currency + advance_entry.credit = os_in_default_currency + + reconcilation_entry.debit_in_account_currency = self.outstanding_amount + reconcilation_entry.debit = os_in_default_currency + + # Set exchange rates for entries + reconcilation_entry.exchange_rate = exc_rate_secondary_to_default + advance_entry.exchange_rate = exc_rate_primary_to_default + else: + if self.doctype == "Sales Invoice": + reconcilation_entry.credit_in_account_currency = self.outstanding_amount + advance_entry.debit_in_account_currency = self.outstanding_amount + else: + advance_entry.credit_in_account_currency = self.outstanding_amount + reconcilation_entry.debit_in_account_currency = self.outstanding_amount + + jv.multi_currency = multi_currency jv.append("accounts", reconcilation_entry) jv.append("accounts", advance_entry) @@ -2506,6 +2613,67 @@ class AccountsController(TransactionBase): repost_ledger.insert() repost_ledger.submit() + def get_advance_payment_doctypes(self) -> list: + return frappe.get_hooks("advance_payment_doctypes") + + def make_advance_payment_ledger_for_journal(self): + advance_payment_doctypes = self.get_advance_payment_doctypes() + advance_doctype_references = [ + x for x in self.accounts if x.reference_type in advance_payment_doctypes + ] + + for x in advance_doctype_references: + # Looking for payments + dr_or_cr = ( + "credit_in_account_currency" + if x.account_type == "Receivable" + else "debit_in_account_currency" + ) + + amount = x.get(dr_or_cr) + if amount > 0: + doc = frappe.new_doc("Advance Payment Ledger Entry") + doc.company = self.company + doc.voucher_type = self.doctype + doc.voucher_no = self.name + doc.against_voucher_type = x.reference_type + doc.against_voucher_no = x.reference_name + doc.amount = amount if self.docstatus == 1 else -1 * amount + doc.event = "Submit" if self.docstatus == 1 else "Cancel" + doc.currency = x.account_currency + doc.flags.ignore_permissions = 1 + doc.save() + + def make_advance_payment_ledger_for_payment(self): + advance_payment_doctypes = self.get_advance_payment_doctypes() + advance_doctype_references = [ + x for x in self.references if x.reference_doctype in advance_payment_doctypes + ] + currency = ( + self.paid_from_account_currency + if self.payment_type == "Receive" + else self.paid_to_account_currency + ) + for x in advance_doctype_references: + doc = frappe.new_doc("Advance Payment Ledger Entry") + doc.company = self.company + doc.voucher_type = self.doctype + doc.voucher_no = self.name + doc.against_voucher_type = x.reference_doctype + doc.against_voucher_no = x.reference_name + doc.amount = x.allocated_amount if self.docstatus == 1 else -1 * x.allocated_amount + doc.currency = currency + doc.event = "Submit" if self.docstatus == 1 else "Cancel" + doc.flags.ignore_permissions = 1 + doc.save() + + def make_advance_payment_ledger_entries(self): + if self.docstatus != 0: + if self.doctype == "Journal Entry": + self.make_advance_payment_ledger_for_journal() + elif self.doctype == "Payment Entry": + self.make_advance_payment_ledger_for_payment() + @frappe.whitelist() def get_tax_rate(account_head): @@ -2748,6 +2916,7 @@ def get_advance_payment_entries( party_account, order_doctype, order_list=None, + default_advance_account=None, include_unallocated=True, against_all_orders=False, limit=None, @@ -2761,6 +2930,7 @@ def get_advance_payment_entries( party_type, party, party_account, + default_advance_account, limit, condition, ) @@ -2784,6 +2954,7 @@ def get_advance_payment_entries( party_type, party, party_account, + default_advance_account, limit, condition, ) @@ -2799,6 +2970,7 @@ def get_common_query( party_type, party, party_account, + default_advance_account, limit, condition, ): @@ -2820,14 +2992,22 @@ def get_common_query( .where(payment_entry.docstatus == 1) ) - if payment_type == "Receive": - q = q.select((payment_entry.paid_from_account_currency).as_("currency")) - q = q.select(payment_entry.paid_from) - q = q.where(payment_entry.paid_from.isin(party_account)) + field = "paid_from" if payment_type == "Receive" else "paid_to" + + q = q.select((payment_entry[f"{field}_account_currency"]).as_("currency")) + q = q.select(payment_entry[field]) + account_condition = payment_entry[field].isin(party_account) + if default_advance_account: + q = q.where( + account_condition + | ( + (payment_entry[field] == default_advance_account) + & (payment_entry.book_advance_payments_in_separate_party_account == 1) + ) + ) + else: - q = q.select((payment_entry.paid_to_account_currency).as_("currency")) - q = q.select(payment_entry.paid_to) - q = q.where(payment_entry.paid_to.isin(party_account)) + q = q.where(account_condition) if payment_type == "Receive": q = q.select((payment_entry.source_exchange_rate).as_("exchange_rate")) @@ -3085,9 +3265,9 @@ def set_order_defaults(parent_doctype, parent_doctype_name, child_doctype, child child_item.warehouse = get_item_warehouse(item, p_doc, overwrite_warehouse=True) if not child_item.warehouse: frappe.throw( - _("Cannot find {} for item {}. Please set the same in Item Master or Stock Settings.").format( - frappe.bold("default warehouse"), frappe.bold(item.item_code) - ) + _( + "Cannot find a default warehouse for item {0}. Please set one in the Item Master or in Stock Settings." + ).format(frappe.bold(item.item_code)) ) set_child_tax_template_and_map(item, child_item, p_doc) @@ -3285,7 +3465,6 @@ def update_child_qty_rate(parent_doctype, trans_items, parent_doctype_name, chil items_added_or_removed = False # updated to true if any new item is added or removed any_conversion_factor_changed = False - sales_doctypes = ["Sales Order", "Sales Invoice", "Delivery Note", "Quotation"] parent = frappe.get_doc(parent_doctype, parent_doctype_name) check_doc_permissions(parent, "write") @@ -3401,25 +3580,21 @@ def update_child_qty_rate(parent_doctype, trans_items, parent_doctype_name, chil # if rate is greater than price_list_rate, set margin # or set discount child_item.discount_percentage = 0 - - if parent_doctype in sales_doctypes: - child_item.margin_type = "Amount" - child_item.margin_rate_or_amount = flt( - child_item.rate - child_item.price_list_rate, - child_item.precision("margin_rate_or_amount"), - ) - child_item.rate_with_margin = child_item.rate + child_item.margin_type = "Amount" + child_item.margin_rate_or_amount = flt( + child_item.rate - child_item.price_list_rate, + child_item.precision("margin_rate_or_amount"), + ) + child_item.rate_with_margin = child_item.rate else: child_item.discount_percentage = flt( (1 - flt(child_item.rate) / flt(child_item.price_list_rate)) * 100.0, child_item.precision("discount_percentage"), ) child_item.discount_amount = flt(child_item.price_list_rate) - flt(child_item.rate) - - if parent_doctype in sales_doctypes: - child_item.margin_type = "" - child_item.margin_rate_or_amount = 0 - child_item.rate_with_margin = 0 + child_item.margin_type = "" + child_item.margin_rate_or_amount = 0 + child_item.rate_with_margin = 0 child_item.flags.ignore_validate_update_after_submit = True if new_child_flag: @@ -3494,6 +3669,9 @@ def update_child_qty_rate(parent_doctype, trans_items, parent_doctype_name, chil parent.update_billing_percentage() parent.set_status() + parent.validate_uom_is_integer("uom", "qty") + parent.validate_uom_is_integer("stock_uom", "stock_qty") + # Cancel and Recreate Stock Reservation Entries. if parent_doctype == "Sales Order": from erpnext.stock.doctype.stock_reservation_entry.stock_reservation_entry import ( diff --git a/erpnext/controllers/buying_controller.py b/erpnext/controllers/buying_controller.py index a55eded2a4c..6020dce0761 100644 --- a/erpnext/controllers/buying_controller.py +++ b/erpnext/controllers/buying_controller.py @@ -356,14 +356,14 @@ class BuyingController(SubcontractingController): if not self.is_internal_transfer(): return + self.set_sales_incoming_rate_for_internal_transfer() + allow_at_arms_length_price = frappe.get_cached_value( "Stock Settings", None, "allow_internal_transfer_at_arms_length_price" ) if allow_at_arms_length_price: return - self.set_sales_incoming_rate_for_internal_transfer() - for d in self.get("items"): d.discount_percentage = 0.0 d.discount_amount = 0.0 @@ -689,9 +689,11 @@ class BuyingController(SubcontractingController): if self.doctype in ["Purchase Receipt", "Purchase Invoice"]: self.process_fixed_asset() - if self.doctype in ["Purchase Order", "Purchase Receipt"] and not frappe.db.get_single_value( - "Buying Settings", "disable_last_purchase_rate" - ): + if self.doctype in [ + "Purchase Order", + "Purchase Receipt", + "Purchase Invoice", + ] and not frappe.db.get_single_value("Buying Settings", "disable_last_purchase_rate"): update_last_purchase_rate(self, is_submit=1) def on_cancel(self): @@ -700,9 +702,11 @@ class BuyingController(SubcontractingController): if self.get("is_return"): return - if self.doctype in ["Purchase Order", "Purchase Receipt"] and not frappe.db.get_single_value( - "Buying Settings", "disable_last_purchase_rate" - ): + if self.doctype in [ + "Purchase Order", + "Purchase Receipt", + "Purchase Invoice", + ] and not frappe.db.get_single_value("Buying Settings", "disable_last_purchase_rate"): update_last_purchase_rate(self, is_submit=0) if self.doctype in ["Purchase Receipt", "Purchase Invoice"]: @@ -820,6 +824,8 @@ class BuyingController(SubcontractingController): "asset_quantity": asset_quantity, "purchase_receipt": self.name if self.doctype == "Purchase Receipt" else None, "purchase_invoice": self.name if self.doctype == "Purchase Invoice" else None, + "purchase_receipt_item": row.name if self.doctype == "Purchase Receipt" else None, + "purchase_invoice_item": row.name if self.doctype == "Purchase Invoice" else None, } ) diff --git a/erpnext/controllers/item_variant.py b/erpnext/controllers/item_variant.py index cc6870f892a..5dace4af884 100644 --- a/erpnext/controllers/item_variant.py +++ b/erpnext/controllers/item_variant.py @@ -150,7 +150,7 @@ def validate_item_attribute_value(attributes_list, attribute, attribute_value, i ) msg += "
" + _( "To still proceed with editing this Attribute Value, enable {0} in Item Variant Settings." - ).format(frappe.bold("Allow Rename Attribute Value")) + ).format(frappe.bold(_("Allow Rename Attribute Value"))) frappe.throw(msg, InvalidItemAttributeValueError, title=_("Edit Not Allowed")) diff --git a/erpnext/controllers/print_settings.py b/erpnext/controllers/print_settings.py index f99711631ff..f05ef67c308 100644 --- a/erpnext/controllers/print_settings.py +++ b/erpnext/controllers/print_settings.py @@ -11,7 +11,13 @@ def set_print_templates_for_item_table(doc, settings): "items": { "qty": "templates/print_formats/includes/item_table_qty.html", "serial_and_batch_bundle": "templates/print_formats/includes/serial_and_batch_bundle.html", - } + }, + "packed_items": { + "serial_and_batch_bundle": "templates/print_formats/includes/serial_and_batch_bundle.html", + }, + "supplied_items": { + "serial_and_batch_bundle": "templates/print_formats/includes/serial_and_batch_bundle.html", + }, } doc.flags.compact_item_fields = ["description", "qty", "rate", "amount"] diff --git a/erpnext/controllers/queries.py b/erpnext/controllers/queries.py index a07a00dd03e..463cb859970 100644 --- a/erpnext/controllers/queries.py +++ b/erpnext/controllers/queries.py @@ -366,7 +366,7 @@ def get_batch_no(doctype, txt, searchfield, start, page_len, filters): def get_empty_batches(filters, start, page_len, filtered_batches=None, txt=None): - query_filter = {"item": filters.get("item_code")} + query_filter = {"item": filters.get("item_code"), "disabled": 0} if txt: query_filter["name"] = ("like", f"%{txt}%") @@ -415,7 +415,6 @@ def get_batches_from_stock_ledger_entries(searchfields, txt, filters, start=0, p stock_ledger_entry.batch_no, Sum(stock_ledger_entry.actual_qty).as_("qty"), ) - .where((batch_table.expiry_date >= expiry_date) | (batch_table.expiry_date.isnull())) .where(stock_ledger_entry.is_cancelled == 0) .where( (stock_ledger_entry.item_code == filters.get("item_code")) @@ -428,6 +427,9 @@ def get_batches_from_stock_ledger_entries(searchfields, txt, filters, start=0, p .limit(page_len) ) + if not filters.get("include_expired_batches"): + query = query.where((batch_table.expiry_date >= expiry_date) | (batch_table.expiry_date.isnull())) + query = query.select( Concat("MFG-", batch_table.manufacturing_date).as_("manufacturing_date"), Concat("EXP-", batch_table.expiry_date).as_("expiry_date"), @@ -466,7 +468,6 @@ def get_batches_from_serial_and_batch_bundle(searchfields, txt, filters, start=0 bundle.batch_no, Sum(bundle.qty).as_("qty"), ) - .where((batch_table.expiry_date >= expiry_date) | (batch_table.expiry_date.isnull())) .where(stock_ledger_entry.is_cancelled == 0) .where( (stock_ledger_entry.item_code == filters.get("item_code")) @@ -479,6 +480,11 @@ def get_batches_from_serial_and_batch_bundle(searchfields, txt, filters, start=0 .limit(page_len) ) + if not filters.get("include_expired_batches"): + bundle_query = bundle_query.where( + (batch_table.expiry_date >= expiry_date) | (batch_table.expiry_date.isnull()) + ) + bundle_query = bundle_query.select( Concat("MFG-", batch_table.manufacturing_date), Concat("EXP-", batch_table.expiry_date), diff --git a/erpnext/controllers/sales_and_purchase_return.py b/erpnext/controllers/sales_and_purchase_return.py index 3755506b6f5..696d404d16d 100644 --- a/erpnext/controllers/sales_and_purchase_return.py +++ b/erpnext/controllers/sales_and_purchase_return.py @@ -24,6 +24,10 @@ def validate_return(doc): if doc.return_against: validate_return_against(doc) + + if doc.doctype in ("Sales Invoice", "Purchase Invoice") and not doc.update_stock: + return + validate_returned_items(doc) @@ -79,6 +83,9 @@ def validate_returned_items(doc): if doc.doctype in ["Purchase Invoice", "Purchase Receipt", "Subcontracting Receipt"]: select_fields += ",rejected_qty, received_qty" + if doc.doctype in ["Purchase Receipt", "Purchase Invoice"]: + select_fields += ",name" + for d in frappe.db.sql( f"""select {select_fields} from `tab{doc.doctype} Item` where parent = %s""", doc.return_against, @@ -104,15 +111,24 @@ def validate_returned_items(doc): items_returned = False for d in doc.get("items"): + key = d.item_code + raise_exception = False + if doc.doctype in ["Purchase Receipt", "Purchase Invoice"]: + field = frappe.scrub(doc.doctype) + "_item" + if d.get(field): + key = (d.item_code, d.get(field)) + raise_exception = True + if d.item_code and (flt(d.qty) < 0 or flt(d.get("received_qty")) < 0): - if d.item_code not in valid_items: - frappe.throw( + if key not in valid_items: + frappe.msgprint( _("Row # {0}: Returned Item {1} does not exist in {2} {3}").format( d.idx, d.item_code, doc.doctype, doc.return_against - ) + ), + raise_exception=raise_exception, ) else: - ref = valid_items.get(d.item_code, frappe._dict()) + ref = valid_items.get(key, frappe._dict()) validate_quantity(doc, d, ref, valid_items, already_returned_items) if ( @@ -193,8 +209,12 @@ def validate_quantity(doc, args, ref, valid_items, already_returned_items): def get_ref_item_dict(valid_items, ref_item_row): from erpnext.stock.doctype.serial_no.serial_no import get_serial_nos + key = ref_item_row.item_code + if ref_item_row.get("name"): + key = (ref_item_row.item_code, ref_item_row.name) + valid_items.setdefault( - ref_item_row.item_code, + key, frappe._dict( { "qty": 0, @@ -208,7 +228,7 @@ def get_ref_item_dict(valid_items, ref_item_row): } ), ) - item_dict = valid_items[ref_item_row.item_code] + item_dict = valid_items[key] item_dict["qty"] += ref_item_row.qty item_dict["stock_qty"] += ref_item_row.get("stock_qty", 0) if ref_item_row.get("rate", 0) > item_dict["rate"]: @@ -335,6 +355,9 @@ def make_return_doc(doctype: str, source_name: str, target_doc=None, return_agai doc.select_print_heading = frappe.get_cached_value("Print Heading", _("Debit Note")) if source.tax_withholding_category: doc.set_onload("supplier_tds", source.tax_withholding_category) + elif doctype == "Delivery Note": + # manual additions to the return should hit the return warehous, too + doc.set_warehouse = default_warehouse_for_sales_return for tax in doc.get("taxes") or []: if tax.charge_type == "Actual": @@ -581,6 +604,10 @@ def make_return_doc(doctype: str, source_name: str, target_doc=None, return_agai if default_warehouse_for_sales_return: target_doc.warehouse = default_warehouse_for_sales_return + if not source_doc.use_serial_batch_fields and source_doc.serial_and_batch_bundle: + target_doc.serial_no = None + target_doc.batch_no = None + if ( (source_doc.serial_no or source_doc.batch_no) and not source_doc.serial_and_batch_bundle @@ -883,6 +910,7 @@ def get_serial_batches_based_on_bundle(field, _bundle_ids): "`tabSerial and Batch Entry`.`serial_no`", "`tabSerial and Batch Entry`.`batch_no`", "`tabSerial and Batch Entry`.`qty`", + "`tabSerial and Batch Entry`.`incoming_rate`", "`tabSerial and Batch Bundle`.`voucher_detail_no`", "`tabSerial and Batch Bundle`.`voucher_type`", "`tabSerial and Batch Bundle`.`voucher_no`", @@ -904,15 +932,23 @@ def get_serial_batches_based_on_bundle(field, _bundle_ids): if key not in available_dict: available_dict[key] = frappe._dict( - {"qty": 0.0, "serial_nos": defaultdict(float), "batches": defaultdict(float)} + { + "qty": 0.0, + "serial_nos": defaultdict(float), + "batches": defaultdict(float), + "serial_nos_valuation": defaultdict(float), + "batches_valuation": defaultdict(float), + } ) available_dict[key]["qty"] += row.qty if row.serial_no: available_dict[key]["serial_nos"][row.serial_no] += row.qty + available_dict[key]["serial_nos_valuation"][row.serial_no] = row.incoming_rate elif row.batch_no: available_dict[key]["batches"][row.batch_no] += row.qty + available_dict[key]["batches_valuation"][row.batch_no] = row.incoming_rate return available_dict @@ -948,12 +984,13 @@ def get_serial_and_batch_bundle(field, doctype, reference_ids, is_rejected=False ) ) else: - fields = [ - "serial_and_batch_bundle", - ] + fields = ["serial_and_batch_bundle"] if is_rejected: - fields.extend(["rejected_serial_and_batch_bundle", "return_qty_from_rejected_warehouse"]) + fields.append("rejected_serial_and_batch_bundle") + + if doctype == "Purchase Receipt Item": + fields.append("return_qty_from_rejected_warehouse") del filters["rejected_serial_and_batch_bundle"] data = frappe.get_all( @@ -987,7 +1024,14 @@ def filter_serial_batches(parent_doc, data, row, warehouse_field=None, qty_field warehouse = row.get(warehouse_field) qty = abs(row.get(qty_field)) - filterd_serial_batch = frappe._dict({"serial_nos": [], "batches": defaultdict(float)}) + filterd_serial_batch = frappe._dict( + { + "serial_nos": [], + "batches": defaultdict(float), + "serial_nos_valuation": data.get("serial_nos_valuation"), + "batches_valuation": data.get("batches_valuation"), + } + ) if data.serial_nos: available_serial_nos = [] @@ -996,8 +1040,8 @@ def filter_serial_batches(parent_doc, data, row, warehouse_field=None, qty_field available_serial_nos.append(serial_no) if available_serial_nos: - if parent_doc.doctype in ["Purchase Invoice", "Purchase Reecipt"]: - available_serial_nos = get_available_serial_nos(available_serial_nos) + if parent_doc.doctype in ["Purchase Invoice", "Purchase Receipt"]: + available_serial_nos = get_available_serial_nos(available_serial_nos, warehouse) if len(available_serial_nos) > qty: filterd_serial_batch["serial_nos"] = sorted(available_serial_nos[0 : cint(qty)]) @@ -1012,7 +1056,7 @@ def filter_serial_batches(parent_doc, data, row, warehouse_field=None, qty_field if batch_qty <= 0: continue - if parent_doc.doctype in ["Purchase Invoice", "Purchase Reecipt"]: + if parent_doc.doctype in ["Purchase Invoice", "Purchase Receipt"]: batch_qty = get_available_batch_qty( parent_doc, batch_no, @@ -1082,6 +1126,8 @@ def make_serial_batch_bundle_for_return(data, child_doc, parent_doc, warehouse_f "warehouse": warehouse, "serial_nos": data.get("serial_nos"), "batches": data.get("batches"), + "serial_nos_valuation": data.get("serial_nos_valuation"), + "batches_valuation": data.get("batches_valuation"), "posting_date": parent_doc.posting_date, "posting_time": parent_doc.posting_time, "voucher_type": parent_doc.doctype, diff --git a/erpnext/controllers/selling_controller.py b/erpnext/controllers/selling_controller.py index c1f565e7323..b704cb30791 100644 --- a/erpnext/controllers/selling_controller.py +++ b/erpnext/controllers/selling_controller.py @@ -21,9 +21,15 @@ class SellingController(StockController): def onload(self): super().onload() - if self.doctype in ("Sales Order", "Delivery Note", "Sales Invoice"): + if self.doctype in ("Sales Order", "Delivery Note", "Sales Invoice", "Quotation"): for item in self.get("items") + (self.get("packed_items") or []): - item.update(get_bin_details(item.item_code, item.warehouse, include_child_warehouses=True)) + company = self.company + + item.update( + get_bin_details( + item.item_code, item.warehouse, company=company, include_child_warehouses=True + ) + ) def validate(self): super().validate() @@ -68,19 +74,13 @@ class SellingController(StockController): if customer: from erpnext.accounts.party import _get_party_details - fetch_payment_terms_template = False - if self.get("__islocal") or self.company != frappe.db.get_value( - self.doctype, self.name, "company" - ): - fetch_payment_terms_template = True - party_details = _get_party_details( customer, ignore_permissions=self.flags.ignore_permissions, doctype=self.doctype, company=self.company, posting_date=self.get("posting_date"), - fetch_payment_terms_template=fetch_payment_terms_template, + fetch_payment_terms_template=self.has_value_changed("company"), party_address=self.customer_address, shipping_address=self.shipping_address_name, company_address=self.get("company_address"), @@ -167,6 +167,9 @@ class SellingController(StockController): total = 0.0 sales_team = self.get("sales_team") + + self.validate_sales_team(sales_team) + for sales_person in sales_team: self.round_floats_in(sales_person) @@ -186,6 +189,20 @@ class SellingController(StockController): if sales_team and total != 100.0: throw(_("Total allocated percentage for sales team should be 100")) + def validate_sales_team(self, sales_team): + sales_persons = [d.sales_person for d in sales_team] + + if not sales_persons: + return + + sales_person_status = frappe.db.get_all( + "Sales Person", filters={"name": ["in", sales_persons]}, fields=["name", "enabled"] + ) + + for row in sales_person_status: + if not row.enabled: + frappe.throw(_("Sales Person {0} is disabled.").format(row.name)) + def validate_max_discount(self): for d in self.get("items"): if d.item_code: @@ -358,12 +375,32 @@ class SellingController(StockController): return il def has_product_bundle(self, item_code): - product_bundle = frappe.qb.DocType("Product Bundle") - return ( - frappe.qb.from_(product_bundle) - .select(product_bundle.name) - .where((product_bundle.new_item_code == item_code) & (product_bundle.disabled == 0)) - ).run() + product_bundle_items = getattr(self, "_product_bundle_items", None) + if product_bundle_items is None: + self._product_bundle_items = product_bundle_items = {} + + if item_code not in product_bundle_items: + self._fetch_product_bundle_items(item_code) + + return product_bundle_items[item_code] + + def _fetch_product_bundle_items(self, item_code): + product_bundle_items = self._product_bundle_items + items_to_fetch = {row.item_code for row in self.items if row.item_code not in product_bundle_items} + # fetch for requisite item_code even if it is not in items + items_to_fetch.add(item_code) + + items_with_product_bundle = { + row.new_item_code + for row in frappe.get_all( + "Product Bundle", + filters={"new_item_code": ("in", items_to_fetch), "disabled": 0}, + fields="new_item_code", + ) + } + + for item_code in items_to_fetch: + product_bundle_items[item_code] = item_code in items_with_product_bundle def get_already_delivered_qty(self, current_docname, so, so_detail): delivered_via_dn = frappe.db.sql( @@ -473,6 +510,16 @@ class SellingController(StockController): raise_error_if_no_rate=False, ) + if ( + not d.incoming_rate + and self.get("return_against") + and self.get("is_return") + and get_valuation_method(d.item_code) == "Moving Average" + ): + d.incoming_rate = get_rate_for_return( + self.doctype, self.name, d.item_code, self.return_against, item_row=d + ) + # For internal transfers use incoming rate as the valuation rate if self.is_internal_transfer(): if self.doctype == "Delivery Note" or self.get("update_stock"): @@ -640,7 +687,7 @@ class SellingController(StockController): if self.doctype in ["Sales Order", "Quotation"]: for item in self.items: item.gross_profit = flt( - ((item.base_rate - flt(item.valuation_rate)) * item.stock_qty), + ((flt(item.stock_uom_rate) - flt(item.valuation_rate)) * item.stock_qty), self.precision("amount", item), ) @@ -697,7 +744,7 @@ class SellingController(StockController): duplicate_items_msg = _("Item {0} entered multiple times.").format(frappe.bold(d.item_code)) duplicate_items_msg += "

" duplicate_items_msg += _("Please enable {} in {} to allow same item in multiple rows").format( - frappe.bold("Allow Item to Be Added Multiple Times in a Transaction"), + frappe.bold(_("Allow Item to Be Added Multiple Times in a Transaction")), get_link_to_form("Selling Settings", "Selling Settings"), ) if frappe.db.get_value("Item", d.item_code, "is_stock_item") == 1: diff --git a/erpnext/controllers/stock_controller.py b/erpnext/controllers/stock_controller.py index 1620fa3bfff..8f0a5d5edf5 100644 --- a/erpnext/controllers/stock_controller.py +++ b/erpnext/controllers/stock_controller.py @@ -63,6 +63,33 @@ class StockController(AccountsController): self.set_rate_of_stock_uom() self.validate_internal_transfer() self.validate_putaway_capacity() + self.reset_conversion_factor() + + def reset_conversion_factor(self): + for row in self.get("items"): + if row.uom != row.stock_uom: + continue + + if row.conversion_factor != 1.0: + row.conversion_factor = 1.0 + frappe.msgprint( + _( + "Conversion factor for item {0} has been reset to 1.0 as the uom {1} is same as stock uom {2}." + ).format(bold(row.item_code), bold(row.uom), bold(row.stock_uom)), + alert=True, + ) + + def validate_items_exist(self): + if not self.get("items"): + return + + items = [d.item_code for d in self.get("items")] + + exists_items = frappe.get_all("Item", filters={"name": ("in", items)}, pluck="name") + non_exists_items = set(items) - set(exists_items) + + if non_exists_items: + frappe.throw(_("Items {0} do not exist in the Item master.").format(", ".join(non_exists_items))) def validate_duplicate_serial_and_batch_bundle(self, table_name): if not self.get(table_name): @@ -307,6 +334,11 @@ class StockController(AccountsController): } ) + if self.doctype in ["Sales Invoice", "Delivery Note"]: + row.db_set( + "incoming_rate", frappe.db.get_value("Serial and Batch Bundle", bundle, "avg_rate") + ) + def get_reference_ids(self, table_name, qty_field=None, bundle_field=None) -> tuple[str, list[str]]: field = { "Sales Invoice": "sales_invoice_item", @@ -345,6 +377,9 @@ class StockController(AccountsController): @frappe.request_cache def is_serial_batch_item(self, item_code) -> bool: + if not frappe.db.exists("Item", item_code): + frappe.throw(_("Item {0} does not exist.").format(bold(item_code))) + item_details = frappe.db.get_value("Item", item_code, ["has_serial_no", "has_batch_no"], as_dict=1) if item_details.has_serial_no or item_details.has_batch_no: @@ -804,6 +839,15 @@ class StockController(AccountsController): if not dimension: continue + if ( + self.doctype in ["Purchase Invoice", "Purchase Receipt"] + and row.get("rejected_warehouse") + and sl_dict.get("warehouse") == row.get("rejected_warehouse") + ): + fieldname = f"rejected_{dimension.source_fieldname}" + sl_dict[dimension.target_fieldname] = row.get(fieldname) + continue + if self.doctype in [ "Purchase Invoice", "Purchase Receipt", @@ -964,11 +1008,13 @@ class StockController(AccountsController): def validate_qi_presence(self, row): """Check if QI is present on row level. Warn on save and stop on submit if missing.""" if not row.quality_inspection: - msg = f"Row #{row.idx}: Quality Inspection is required for Item {frappe.bold(row.item_code)}" + msg = _("Row #{0}: Quality Inspection is required for Item {1}").format( + row.idx, frappe.bold(row.item_code) + ) if self.docstatus == 1: - frappe.throw(_(msg), title=_("Inspection Required"), exc=QualityInspectionRequiredError) + frappe.throw(msg, title=_("Inspection Required"), exc=QualityInspectionRequiredError) else: - frappe.msgprint(_(msg), title=_("Inspection Required"), indicator="blue") + frappe.msgprint(msg, title=_("Inspection Required"), indicator="blue") def validate_qi_submission(self, row): """Check if QI is submitted on row level, during submission""" @@ -977,11 +1023,13 @@ class StockController(AccountsController): if not qa_docstatus == 1: link = frappe.utils.get_link_to_form("Quality Inspection", row.quality_inspection) - msg = f"Row #{row.idx}: Quality Inspection {link} is not submitted for the item: {row.item_code}" + msg = _("Row #{0}: Quality Inspection {1} is not submitted for the item: {2}").format( + row.idx, link, row.item_code + ) if action == "Stop": - frappe.throw(_(msg), title=_("Inspection Submission"), exc=QualityInspectionNotSubmittedError) + frappe.throw(msg, title=_("Inspection Submission"), exc=QualityInspectionNotSubmittedError) else: - frappe.msgprint(_(msg), alert=True, indicator="orange") + frappe.msgprint(msg, alert=True, indicator="orange") def validate_qi_rejection(self, row): """Check if QI is rejected on row level, during submission""" @@ -990,11 +1038,13 @@ class StockController(AccountsController): if qa_status == "Rejected": link = frappe.utils.get_link_to_form("Quality Inspection", row.quality_inspection) - msg = f"Row #{row.idx}: Quality Inspection {link} was rejected for item {row.item_code}" + msg = _("Row #{0}: Quality Inspection {1} was rejected for item {2}").format( + row.idx, link, row.item_code + ) if action == "Stop": - frappe.throw(_(msg), title=_("Inspection Rejected"), exc=QualityInspectionRejectedError) + frappe.throw(msg, title=_("Inspection Rejected"), exc=QualityInspectionRejectedError) else: - frappe.msgprint(_(msg), alert=True, indicator="orange") + frappe.msgprint(msg, alert=True, indicator="orange") def update_blanket_order(self): blanket_orders = list(set([d.blanket_order for d in self.items if d.blanket_order])) diff --git a/erpnext/controllers/subcontracting_controller.py b/erpnext/controllers/subcontracting_controller.py index a6727ef8826..5fb1ee468cd 100644 --- a/erpnext/controllers/subcontracting_controller.py +++ b/erpnext/controllers/subcontracting_controller.py @@ -561,11 +561,11 @@ class SubcontractingController(StockController): use_serial_batch_fields = frappe.db.get_single_value("Stock Settings", "use_serial_batch_fields") if self.doctype == self.subcontract_data.order_doctype: - rm_obj.required_qty = qty - rm_obj.amount = rm_obj.required_qty * rm_obj.rate + rm_obj.required_qty = flt(qty, rm_obj.precision("required_qty")) + rm_obj.amount = flt(rm_obj.required_qty * rm_obj.rate, rm_obj.precision("amount")) else: - rm_obj.consumed_qty = qty - rm_obj.required_qty = bom_item.required_qty or qty + rm_obj.consumed_qty = flt(qty, rm_obj.precision("consumed_qty")) + rm_obj.required_qty = flt(bom_item.required_qty or qty, rm_obj.precision("required_qty")) rm_obj.serial_and_batch_bundle = None setattr( rm_obj, self.subcontract_data.order_field, item_row.get(self.subcontract_data.order_field) @@ -576,30 +576,56 @@ class SubcontractingController(StockController): self.__set_batch_nos(bom_item, item_row, rm_obj, qty) if self.doctype == "Subcontracting Receipt" and not use_serial_batch_fields: - args = frappe._dict( - { - "item_code": rm_obj.rm_item_code, - "warehouse": self.supplier_warehouse, - "posting_date": self.posting_date, - "posting_time": self.posting_time, - "qty": -1 * flt(rm_obj.consumed_qty), - "actual_qty": -1 * flt(rm_obj.consumed_qty), - "voucher_type": self.doctype, - "voucher_no": self.name, - "voucher_detail_no": item_row.name, - "company": self.company, - "allow_zero_valuation": 1, - } - ) - rm_obj.serial_and_batch_bundle = self.__set_serial_and_batch_bundle( item_row, rm_obj, rm_obj.consumed_qty ) - if rm_obj.serial_and_batch_bundle: - args["serial_and_batch_bundle"] = rm_obj.serial_and_batch_bundle + self.set_rate_for_supplied_items(rm_obj, item_row) - rm_obj.rate = get_incoming_rate(args) + def update_rate_for_supplied_items(self): + if self.doctype != "Subcontracting Receipt": + return + + for row in self.supplied_items: + item_row = None + if row.reference_name: + item_row = self.get_item_row(row.reference_name) + + if not item_row: + continue + + self.set_rate_for_supplied_items(row, item_row) + + def get_item_row(self, reference_name): + for item in self.items: + if item.name == reference_name: + return item + + def set_rate_for_supplied_items(self, rm_obj, item_row): + args = frappe._dict( + { + "item_code": rm_obj.rm_item_code, + "warehouse": self.supplier_warehouse, + "posting_date": self.posting_date, + "posting_time": self.posting_time, + "qty": -1 * flt(rm_obj.consumed_qty), + "actual_qty": -1 * flt(rm_obj.consumed_qty), + "voucher_type": self.doctype, + "voucher_no": self.name, + "voucher_detail_no": item_row.name, + "company": self.company, + "allow_zero_valuation": 1, + } + ) + + if rm_obj.serial_and_batch_bundle: + args["serial_and_batch_bundle"] = rm_obj.serial_and_batch_bundle + + if rm_obj.use_serial_batch_fields: + args["batch_no"] = rm_obj.batch_no + args["serial_no"] = rm_obj.serial_no + + rm_obj.rate = get_incoming_rate(args) def __set_batch_nos(self, bom_item, item_row, rm_obj, qty): key = (rm_obj.rm_item_code, item_row.item_code, item_row.get(self.subcontract_data.order_field)) @@ -638,8 +664,8 @@ class SubcontractingController(StockController): self.__set_serial_nos(item_row, rm_obj) def __set_consumed_qty(self, rm_obj, consumed_qty, required_qty=0): - rm_obj.required_qty = required_qty - rm_obj.consumed_qty = consumed_qty + rm_obj.required_qty = flt(required_qty, rm_obj.precision("required_qty")) + rm_obj.consumed_qty = flt(consumed_qty, rm_obj.precision("consumed_qty")) def __set_serial_nos(self, item_row, rm_obj): key = (rm_obj.rm_item_code, item_row.item_code, item_row.get(self.subcontract_data.order_field)) @@ -1209,6 +1235,17 @@ def add_items_in_ste(ste_doc, row, qty, rm_details, rm_detail_field="sco_rm_deta def make_return_stock_entry_for_subcontract( available_materials, order_doc, rm_details, order_doctype="Subcontracting Order" ): + def post_process(source_doc, target_doc): + target_doc.purpose = "Material Transfer" + + if source_doc.doctype == "Purchase Order": + target_doc.purchase_order = source_doc.name + else: + target_doc.subcontracting_order = source_doc.name + + target_doc.company = source_doc.company + target_doc.is_return = 1 + ste_doc = get_mapped_doc( order_doctype, order_doc.name, @@ -1219,18 +1256,13 @@ def make_return_stock_entry_for_subcontract( }, }, ignore_child_tables=True, + postprocess=post_process, ) - ste_doc.purpose = "Material Transfer" - if order_doctype == "Purchase Order": - ste_doc.purchase_order = order_doc.name rm_detail_field = "po_detail" else: - ste_doc.subcontracting_order = order_doc.name rm_detail_field = "sco_rm_detail" - ste_doc.company = order_doc.company - ste_doc.is_return = 1 for _key, value in available_materials.items(): if not value.qty: diff --git a/erpnext/controllers/taxes_and_totals.py b/erpnext/controllers/taxes_and_totals.py index 2d3b224b76f..bf5beab1a82 100644 --- a/erpnext/controllers/taxes_and_totals.py +++ b/erpnext/controllers/taxes_and_totals.py @@ -8,6 +8,7 @@ import frappe from frappe import _, scrub from frappe.model.document import Document from frappe.utils import cint, flt, round_based_on_smallest_currency_fraction +from frappe.utils.deprecations import deprecated import erpnext from erpnext.accounts.doctype.journal_entry.journal_entry import get_exchange_rate @@ -40,7 +41,7 @@ class calculate_taxes_and_totals: return items def calculate(self): - if not len(self._items): + if not len(self.doc.items): return self.discount_amount_applied = False @@ -74,7 +75,7 @@ class calculate_taxes_and_totals: self.calculate_net_total() self.calculate_tax_withholding_net_total() self.calculate_taxes() - self.manipulate_grand_total_for_inclusive_tax() + self.adjust_grand_total_for_inclusive_tax() self.calculate_totals() self._cleanup() self.calculate_total_net_weight() @@ -95,7 +96,7 @@ class calculate_taxes_and_totals: if self.doc.get("is_return") and self.doc.get("return_against"): return - for item in self._items: + for item in self.doc.items: if item.item_code and item.get("item_tax_template"): item_doc = frappe.get_cached_doc("Item", item.item_code) args = { @@ -154,7 +155,7 @@ class calculate_taxes_and_totals: return if not self.discount_amount_applied: - for item in self._items: + for item in self.doc.items: self.doc.round_floats_in(item) if item.discount_percentage == 100: @@ -258,7 +259,7 @@ class calculate_taxes_and_totals: if not any(cint(tax.included_in_print_rate) for tax in self.doc.get("taxes")): return - for item in self._items: + for item in self.doc.items: item_tax_map = self._load_item_tax_rate(item.item_tax_rate) cumulated_tax_fraction = 0 total_inclusive_tax_amount_per_qty = 0 @@ -286,7 +287,7 @@ class calculate_taxes_and_totals: ): amount = flt(item.amount) - total_inclusive_tax_amount_per_qty - item.net_amount = flt(amount / (1 + cumulated_tax_fraction)) + item.net_amount = flt(amount / (1 + cumulated_tax_fraction), item.precision("net_amount")) item.net_rate = flt(item.net_amount / item.qty, item.precision("net_rate")) item.discount_percentage = flt( item.discount_percentage, item.precision("discount_percentage") @@ -531,7 +532,12 @@ class calculate_taxes_and_totals: tax.base_tax_amount = round(tax.base_tax_amount, 0) tax.base_tax_amount_after_discount_amount = round(tax.base_tax_amount_after_discount_amount, 0) + @deprecated def manipulate_grand_total_for_inclusive_tax(self): + # for backward compatablility - if in case used by an external application + return self.adjust_grand_total_for_inclusive_tax() + + def adjust_grand_total_for_inclusive_tax(self): # if fully inclusive taxes and diff if self.doc.get("taxes") and any(cint(t.included_in_print_rate) for t in self.doc.get("taxes")): last_tax = self.doc.get("taxes")[-1] @@ -553,17 +559,21 @@ class calculate_taxes_and_totals: diff = flt(diff, self.doc.precision("rounding_adjustment")) if diff and abs(diff) <= (5.0 / 10 ** last_tax.precision("tax_amount")): - self.doc.rounding_adjustment = diff + self.doc.grand_total_diff = diff + else: + self.doc.grand_total_diff = 0 def calculate_totals(self): if self.doc.get("taxes"): - self.doc.grand_total = flt(self.doc.get("taxes")[-1].total) + flt(self.doc.rounding_adjustment) + self.doc.grand_total = flt(self.doc.get("taxes")[-1].total) + flt( + self.doc.get("grand_total_diff") + ) else: self.doc.grand_total = flt(self.doc.net_total) if self.doc.get("taxes"): self.doc.total_taxes_and_charges = flt( - self.doc.grand_total - self.doc.net_total - flt(self.doc.rounding_adjustment), + self.doc.grand_total - self.doc.net_total - flt(self.doc.get("grand_total_diff")), self.doc.precision("total_taxes_and_charges"), ) else: @@ -626,8 +636,8 @@ class calculate_taxes_and_totals: self.doc.grand_total, self.doc.currency, self.doc.precision("rounded_total") ) - # if print_in_rate is set, we would have already calculated rounding adjustment - self.doc.rounding_adjustment += flt( + # rounding adjustment should always be the difference vetween grand and rounded total + self.doc.rounding_adjustment = flt( self.doc.rounded_total - self.doc.grand_total, self.doc.precision("rounding_adjustment") ) diff --git a/erpnext/controllers/tests/test_accounts_controller.py b/erpnext/controllers/tests/test_accounts_controller.py index b2f8fce3d31..289a955f980 100644 --- a/erpnext/controllers/tests/test_accounts_controller.py +++ b/erpnext/controllers/tests/test_accounts_controller.py @@ -807,6 +807,7 @@ class TestAccountsController(FrappeTestCase): @change_settings("Stock Settings", {"allow_internal_transfer_at_arms_length_price": 1}) def test_16_internal_transfer_at_arms_length_price(self): + from erpnext.accounts.doctype.sales_invoice.sales_invoice import make_inter_company_purchase_invoice from erpnext.stock.doctype.warehouse.test_warehouse import create_warehouse prepare_data_for_internal_transfer() @@ -840,6 +841,31 @@ class TestAccountsController(FrappeTestCase): # rate should reset to incoming rate self.assertEqual(si.items[0].rate, 100) + si.update_stock = 0 + si.save() + si.submit() + + pi = make_inter_company_purchase_invoice(si.name) + pi.update_stock = 1 + pi.items[0].rate = arms_length_price + pi.items[0].warehouse = target_warehouse + pi.items[0].from_warehouse = warehouse + pi.save() + + self.assertEqual(pi.items[0].rate, 100) + self.assertEqual(pi.items[0].valuation_rate, 100) + + frappe.db.set_single_value("Stock Settings", "allow_internal_transfer_at_arms_length_price", 1) + pi = make_inter_company_purchase_invoice(si.name) + pi.update_stock = 1 + pi.items[0].rate = arms_length_price + pi.items[0].warehouse = target_warehouse + pi.items[0].from_warehouse = warehouse + pi.save() + + self.assertEqual(pi.items[0].rate, arms_length_price) + self.assertEqual(pi.items[0].valuation_rate, 100) + def test_20_journal_against_sales_invoice(self): # Invoice in Foreign Currency si = self.create_sales_invoice(qty=1, conversion_rate=80, rate=1) diff --git a/erpnext/controllers/tests/test_subcontracting_controller.py b/erpnext/controllers/tests/test_subcontracting_controller.py index dfd4351dcad..84326bafef2 100644 --- a/erpnext/controllers/tests/test_subcontracting_controller.py +++ b/erpnext/controllers/tests/test_subcontracting_controller.py @@ -1234,6 +1234,7 @@ def make_subcontracted_items(): "Subcontracted Item SA6": {}, "Subcontracted Item SA7": {}, "Subcontracted Item SA8": {}, + "Subcontracted Item SA9": {"stock_uom": "Litre"}, } for item, properties in sub_contracted_items.items(): @@ -1254,6 +1255,7 @@ def make_raw_materials(): "Subcontracted SRM Item 4": {"has_serial_no": 1, "serial_no_series": "SRII.####"}, "Subcontracted SRM Item 5": {"has_serial_no": 1, "serial_no_series": "SRIID.####"}, "Subcontracted SRM Item 8": {}, + "Subcontracted SRM Item 9": {"stock_uom": "Litre"}, } for item, properties in raw_materials.items(): @@ -1280,6 +1282,7 @@ def make_service_items(): "Subcontracted Service Item 6": {}, "Subcontracted Service Item 7": {}, "Subcontracted Service Item 8": {}, + "Subcontracted Service Item 9": {}, } for item, properties in service_items.items(): diff --git a/erpnext/controllers/trends.py b/erpnext/controllers/trends.py index 18fe7767c5d..24d11e6050a 100644 --- a/erpnext/controllers/trends.py +++ b/erpnext/controllers/trends.py @@ -69,13 +69,15 @@ def get_data(filters, conditions): "Delivery Note", ]: posting_date = "t1.posting_date" - if filters.period_based_on: + if filters.period_based_on and conditions.get("trans") in ["Sales Invoice", "Purchase Invoice"]: posting_date = "t1." + filters.period_based_on if conditions["based_on_select"] in ["t1.project,", "t2.project,"]: cond = " and " + conditions["based_on_select"][:-1] + " IS Not NULL" - if conditions.get("trans") in ["Sales Order", "Purchase Order"]: - cond += " and t1.status != 'Closed'" + + if not filters.get("include_closed_orders"): + if conditions.get("trans") in ["Sales Order", "Purchase Order"]: + cond += " and t1.status != 'Closed'" if conditions.get("trans") == "Quotation" and filters.get("group_by") == "Customer": cond += " and t1.quotation_to = 'Customer'" @@ -222,7 +224,7 @@ def period_wise_columns_query(filters, trans): if trans in ["Purchase Receipt", "Delivery Note", "Purchase Invoice", "Sales Invoice"]: trans_date = "posting_date" - if filters.period_based_on: + if filters.period_based_on and trans in ["Purchase Invoice", "Sales Invoice"]: trans_date = filters.period_based_on else: trans_date = "transaction_date" diff --git a/erpnext/crm/doctype/lead/lead.js b/erpnext/crm/doctype/lead/lead.js index 609eab7f9a2..325ee3d8d6e 100644 --- a/erpnext/crm/doctype/lead/lead.js +++ b/erpnext/crm/doctype/lead/lead.js @@ -7,9 +7,9 @@ cur_frm.email_field = "email_id"; erpnext.LeadController = class LeadController extends frappe.ui.form.Controller { setup() { this.frm.make_methods = { - Customer: this.make_customer, - Quotation: this.make_quotation, - Opportunity: this.make_opportunity, + Customer: this.make_customer.bind(this), + Quotation: this.make_quotation.bind(this), + Opportunity: this.make_opportunity.bind(this), }; // For avoiding integration issues. @@ -28,18 +28,18 @@ erpnext.LeadController = class LeadController extends frappe.ui.form.Controller erpnext.toggle_naming_series(); if (!this.frm.is_new() && doc.__onload && !doc.__onload.is_customer) { - this.frm.add_custom_button(__("Customer"), this.make_customer, __("Create")); - this.frm.add_custom_button( - __("Opportunity"), - function () { - me.frm.trigger("make_opportunity"); - }, - __("Create") - ); - this.frm.add_custom_button(__("Quotation"), this.make_quotation, __("Create")); + this.frm.add_custom_button(__("Customer"), this.make_customer.bind(this), __("Create")); + this.frm.add_custom_button(__("Opportunity"), this.make_opportunity.bind(this), __("Create")); + this.frm.add_custom_button(__("Quotation"), this.make_quotation.bind(this), __("Create")); if (!doc.__onload.linked_prospects.length) { - this.frm.add_custom_button(__("Prospect"), this.make_prospect, __("Create")); - this.frm.add_custom_button(__("Add to Prospect"), this.add_lead_to_prospect, __("Action")); + this.frm.add_custom_button(__("Prospect"), this.make_prospect.bind(this), __("Create")); + this.frm.add_custom_button( + __("Add to Prospect"), + () => { + this.add_lead_to_prospect(this.frm); + }, + __("Action") + ); } } @@ -53,8 +53,7 @@ erpnext.LeadController = class LeadController extends frappe.ui.form.Controller this.show_activities(); } - add_lead_to_prospect() { - let me = this; + add_lead_to_prospect(frm) { frappe.prompt( [ { @@ -69,12 +68,12 @@ erpnext.LeadController = class LeadController extends frappe.ui.form.Controller frappe.call({ method: "erpnext.crm.doctype.lead.lead.add_lead_to_prospect", args: { - lead: me.frm.doc.name, + lead: frm.doc.name, prospect: data.prospect, }, callback: function (r) { if (!r.exc) { - me.frm.reload_doc(); + frm.reload_doc(); } }, freeze: true, @@ -89,32 +88,123 @@ erpnext.LeadController = class LeadController extends frappe.ui.form.Controller make_customer() { frappe.model.open_mapped_doc({ method: "erpnext.crm.doctype.lead.lead.make_customer", - frm: cur_frm, + frm: this.frm, }); } make_quotation() { frappe.model.open_mapped_doc({ method: "erpnext.crm.doctype.lead.lead.make_quotation", - frm: cur_frm, + frm: this.frm, }); } + async make_opportunity() { + const frm = this.frm; + let existing_prospect = ( + await frappe.db.get_value( + "Prospect Lead", + { + lead: frm.doc.name, + }, + "name", + null, + "Prospect" + ) + ).message?.name; + + let fields = []; + if (!existing_prospect) { + fields.push( + { + label: "Create Prospect", + fieldname: "create_prospect", + fieldtype: "Check", + default: 1, + }, + { + label: "Prospect Name", + fieldname: "prospect_name", + fieldtype: "Data", + default: frm.doc.company_name, + depends_on: "create_prospect", + mandatory_depends_on: "create_prospect", + } + ); + } + + await frm.reload_doc(); + + let existing_contact = ( + await frappe.db.get_value( + "Contact", + { + first_name: frm.doc.first_name || frm.doc.lead_name, + last_name: frm.doc.last_name, + }, + "name" + ) + ).message?.name; + + if (!existing_contact) { + fields.push({ + label: "Create Contact", + fieldname: "create_contact", + fieldtype: "Check", + default: "1", + }); + } + + if (fields.length) { + const d = new frappe.ui.Dialog({ + title: __("Create Opportunity"), + fields: fields, + primary_action: function (data) { + frappe.call({ + method: "create_prospect_and_contact", + doc: frm.doc, + args: { + data: data, + }, + freeze: true, + callback: function (r) { + if (!r.exc) { + frappe.model.open_mapped_doc({ + method: "erpnext.crm.doctype.lead.lead.make_opportunity", + frm: frm, + }); + } + d.hide(); + }, + }); + }, + primary_action_label: __("Create"), + }); + d.show(); + } else { + frappe.model.open_mapped_doc({ + method: "erpnext.crm.doctype.lead.lead.make_opportunity", + frm: frm, + }); + } + } + make_prospect() { + const me = this; frappe.model.with_doctype("Prospect", function () { let prospect = frappe.model.get_new_doc("Prospect"); - prospect.company_name = cur_frm.doc.company_name; - prospect.no_of_employees = cur_frm.doc.no_of_employees; - prospect.industry = cur_frm.doc.industry; - prospect.market_segment = cur_frm.doc.market_segment; - prospect.territory = cur_frm.doc.territory; - prospect.fax = cur_frm.doc.fax; - prospect.website = cur_frm.doc.website; - prospect.prospect_owner = cur_frm.doc.lead_owner; - prospect.notes = cur_frm.doc.notes; + prospect.company_name = me.frm.doc.company_name; + prospect.no_of_employees = me.frm.doc.no_of_employees; + prospect.industry = me.frm.doc.industry; + prospect.market_segment = me.frm.doc.market_segment; + prospect.territory = me.frm.doc.territory; + prospect.fax = me.frm.doc.fax; + prospect.website = me.frm.doc.website; + prospect.prospect_owner = me.frm.doc.lead_owner; + prospect.notes = me.frm.doc.notes; let leads_row = frappe.model.add_child(prospect, "leads"); - leads_row.lead = cur_frm.doc.name; + leads_row.lead = me.frm.doc.name; frappe.set_route("Form", "Prospect", prospect.name); }); @@ -150,90 +240,3 @@ erpnext.LeadController = class LeadController extends frappe.ui.form.Controller }; extend_cscript(cur_frm.cscript, new erpnext.LeadController({ frm: cur_frm })); - -frappe.ui.form.on("Lead", { - make_opportunity: async function (frm) { - let existing_prospect = ( - await frappe.db.get_value( - "Prospect Lead", - { - lead: frm.doc.name, - }, - "name", - null, - "Prospect" - ) - ).message.name; - - if (!existing_prospect) { - var fields = [ - { - label: "Create Prospect", - fieldname: "create_prospect", - fieldtype: "Check", - default: 1, - }, - { - label: "Prospect Name", - fieldname: "prospect_name", - fieldtype: "Data", - default: frm.doc.company_name, - depends_on: "create_prospect", - }, - ]; - } - let existing_contact = ( - await frappe.db.get_value( - "Contact", - { - first_name: frm.doc.first_name || frm.doc.lead_name, - last_name: frm.doc.last_name, - }, - "name" - ) - ).message.name; - - if (!existing_contact) { - fields.push({ - label: "Create Contact", - fieldname: "create_contact", - fieldtype: "Check", - default: "1", - }); - } - - if (fields) { - var d = new frappe.ui.Dialog({ - title: __("Create Opportunity"), - fields: fields, - primary_action: function () { - var data = d.get_values(); - frappe.call({ - method: "create_prospect_and_contact", - doc: frm.doc, - args: { - data: data, - }, - freeze: true, - callback: function (r) { - if (!r.exc) { - frappe.model.open_mapped_doc({ - method: "erpnext.crm.doctype.lead.lead.make_opportunity", - frm: frm, - }); - } - d.hide(); - }, - }); - }, - primary_action_label: __("Create"), - }); - d.show(); - } else { - frappe.model.open_mapped_doc({ - method: "erpnext.crm.doctype.lead.lead.make_opportunity", - frm: frm, - }); - } - }, -}); diff --git a/erpnext/crm/doctype/opportunity/opportunity.json b/erpnext/crm/doctype/opportunity/opportunity.json index 07641d20c33..75373398b09 100644 --- a/erpnext/crm/doctype/opportunity/opportunity.json +++ b/erpnext/crm/doctype/opportunity/opportunity.json @@ -185,7 +185,8 @@ { "fieldname": "expected_closing", "fieldtype": "Date", - "label": "Expected Closing Date" + "label": "Expected Closing Date", + "no_copy": 1 }, { "fieldname": "section_break_14", @@ -357,6 +358,7 @@ "fieldname": "transaction_date", "fieldtype": "Date", "label": "Opportunity Date", + "no_copy": 1, "oldfieldname": "transaction_date", "oldfieldtype": "Date", "reqd": 1, @@ -388,6 +390,7 @@ "fieldname": "first_response_time", "fieldtype": "Duration", "label": "First Response Time", + "no_copy": 1, "read_only": 1 }, { @@ -622,7 +625,7 @@ "icon": "fa fa-info-sign", "idx": 195, "links": [], - "modified": "2022-10-13 12:42:21.545636", + "modified": "2024-08-20 04:12:29.095761", "modified_by": "Administrator", "module": "CRM", "name": "Opportunity", diff --git a/erpnext/crm/doctype/prospect/test_prospect.py b/erpnext/crm/doctype/prospect/test_prospect.py index c3930ee6c93..47e38515cac 100644 --- a/erpnext/crm/doctype/prospect/test_prospect.py +++ b/erpnext/crm/doctype/prospect/test_prospect.py @@ -27,6 +27,29 @@ class TestProspect(unittest.TestCase): address_doc.reload() self.assertEqual(address_doc.has_link("Prospect", prospect_doc.name), True) + def test_make_customer_from_prospect(self): + from erpnext.crm.doctype.prospect.prospect import make_customer as make_customer_from_prospect + + frappe.delete_doc_if_exists("Customer", "_Test Prospect") + + prospect = frappe.get_doc( + { + "doctype": "Prospect", + "company_name": "_Test Prospect", + "customer_group": "_Test Customer Group", + } + ) + prospect.insert() + + customer = make_customer_from_prospect("_Test Prospect") + + self.assertEqual(customer.doctype, "Customer") + self.assertEqual(customer.company_name, "_Test Prospect") + self.assertEqual(customer.customer_group, "_Test Customer Group") + + customer.company = "_Test Company" + customer.insert() + def make_prospect(**args): args = frappe._dict(args) diff --git a/erpnext/crm/frappe_crm_api.py b/erpnext/crm/frappe_crm_api.py new file mode 100644 index 00000000000..a00f0ba798d --- /dev/null +++ b/erpnext/crm/frappe_crm_api.py @@ -0,0 +1,173 @@ +import json + +import frappe +from frappe import _ +from frappe.custom.doctype.custom_field.custom_field import create_custom_fields + + +@frappe.whitelist() +def create_custom_fields_for_frappe_crm(): + frappe.only_for("System Manager") + custom_fields = { + "Quotation": [ + { + "fieldname": "crm_deal", + "fieldtype": "Data", + "label": "Frappe CRM Deal", + "insert_after": "party_name", + } + ], + "Customer": [ + { + "fieldname": "crm_deal", + "fieldtype": "Data", + "label": "Frappe CRM Deal", + "insert_after": "prospect_name", + } + ], + } + create_custom_fields(custom_fields, ignore_validate=True) + + +@frappe.whitelist() +def create_prospect_against_crm_deal(): + frappe.only_for("System Manager") + doc = frappe.form_dict + prospect = frappe.get_doc( + { + "doctype": "Prospect", + "company_name": doc.organization or doc.lead_name, + "no_of_employees": doc.no_of_employees, + "prospect_owner": doc.deal_owner, + "company": doc.erpnext_company, + "crm_deal": doc.crm_deal, + "territory": doc.territory, + "industry": doc.industry, + "website": doc.website, + "annual_revenue": doc.annual_revenue, + } + ) + + try: + prospect_name = frappe.db.get_value("Prospect", {"company_name": prospect.company_name}) + if not prospect_name: + prospect.insert() + prospect_name = prospect.name + except Exception: + frappe.log_error( + frappe.get_traceback(), + f"Error while creating prospect against CRM Deal: {frappe.form_dict.get('crm_deal_id')}", + ) + pass + + create_contacts(json.loads(doc.contacts), prospect.company_name, "Prospect", prospect_name) + create_address("Prospect", prospect_name, doc.address) + frappe.response["message"] = prospect_name + + +def create_contacts(contacts, organization=None, link_doctype=None, link_docname=None): + for c in contacts: + c = frappe._dict(c) + existing_contact = contact_exists(c.email, c.mobile_no) + if existing_contact: + contact = frappe.get_doc("Contact", existing_contact) + else: + contact = frappe.get_doc( + { + "doctype": "Contact", + "first_name": c.get("full_name"), + "gender": c.get("gender"), + "company_name": organization, + } + ) + + if c.get("email"): + contact.append("email_ids", {"email_id": c.get("email"), "is_primary": 1}) + + if c.get("mobile_no"): + contact.append("phone_nos", {"phone": c.get("mobile_no"), "is_primary_mobile_no": 1}) + + link_doc(contact, link_doctype, link_docname) + + contact.save(ignore_permissions=True) + + +def create_address(doctype, docname, address): + if not address: + return + if isinstance(address, str): + address = json.loads(address) + try: + _address = frappe.db.exists("Address", address.get("name")) + if not _address: + new_address_doc = frappe.new_doc("Address") + for field in [ + "address_title", + "address_type", + "address_line1", + "address_line2", + "city", + "county", + "state", + "pincode", + "country", + ]: + if address.get(field): + new_address_doc.set(field, address.get(field)) + + new_address_doc.append("links", {"link_doctype": doctype, "link_name": docname}) + new_address_doc.insert(ignore_mandatory=True) + return new_address_doc.name + else: + address = frappe.get_doc("Address", _address) + link_doc(address, doctype, docname) + address.save(ignore_permissions=True) + return address.name + except Exception: + frappe.log_error(frappe.get_traceback(), f"Error while creating address for {docname}") + + +def link_doc(doc, link_doctype, link_docname): + already_linked = any( + [(link.link_doctype == link_doctype and link.link_name == link_docname) for link in doc.links] + ) + if not already_linked: + doc.append( + "links", {"link_doctype": link_doctype, "link_name": link_docname, "link_title": link_docname} + ) + + +def contact_exists(email, mobile_no): + email_exist = frappe.db.exists("Contact Email", {"email_id": email}) + mobile_exist = frappe.db.exists("Contact Phone", {"phone": mobile_no}) + + doctype = "Contact Email" if email_exist else "Contact Phone" + name = email_exist or mobile_exist + + if name: + return frappe.db.get_value(doctype, name, "parent") + + return False + + +@frappe.whitelist() +def create_customer(customer_data=None): + frappe.only_for("System Manager") + if not customer_data: + customer_data = frappe.form_dict + + try: + customer_name = frappe.db.exists("Customer", {"customer_name": customer_data.get("customer_name")}) + if not customer_name: + customer = frappe.get_doc({"doctype": "Customer", **customer_data}).insert( + ignore_permissions=True + ) + customer_name = customer.name + + contacts = json.loads(customer_data.get("contacts")) + create_contacts(contacts, customer_name, "Customer", customer_name) + create_address("Customer", customer_name, customer_data.get("address")) + return customer_name + except Exception: + frappe.log_error(frappe.get_traceback(), "Error while creating customer against Frappe CRM Deal") + pass diff --git a/erpnext/crm/number_card/open_opportunity/open_opportunity.json b/erpnext/crm/number_card/open_opportunity/open_opportunity.json index 6e06ed64da3..33a757feb14 100644 --- a/erpnext/crm/number_card/open_opportunity/open_opportunity.json +++ b/erpnext/crm/number_card/open_opportunity/open_opportunity.json @@ -3,7 +3,7 @@ "docstatus": 0, "doctype": "Number Card", "document_type": "Opportunity", - "dynamic_filters_json": "[[\"Opportunity\",\"status\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"]]", + "dynamic_filters_json": "[[\"Opportunity\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"]]", "filters_json": "[[\"Opportunity\",\"company\",\"=\",null,false]]", "function": "Count", "idx": 0, diff --git a/erpnext/edi/__init__.py b/erpnext/edi/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/erpnext/edi/doctype/__init__.py b/erpnext/edi/doctype/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/erpnext/edi/doctype/code_list/__init__.py b/erpnext/edi/doctype/code_list/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/erpnext/edi/doctype/code_list/code_list.js b/erpnext/edi/doctype/code_list/code_list.js new file mode 100644 index 00000000000..f8b9a2003fd --- /dev/null +++ b/erpnext/edi/doctype/code_list/code_list.js @@ -0,0 +1,51 @@ +// Copyright (c) 2024, Frappe Technologies Pvt. Ltd. and contributors +// For license information, please see license.txt + +frappe.ui.form.on("Code List", { + refresh: (frm) => { + if (!frm.doc.__islocal) { + frm.add_custom_button(__("Import Genericode File"), function () { + erpnext.edi.import_genericode(frm); + }); + } + }, + setup: (frm) => { + frm.savetrash = () => { + frm.validate_form_action("Delete"); + frappe.confirm( + __( + "Are you sure you want to delete {0}?

This action will also delete all associated Common Code documents.

", + [frm.docname.bold()] + ), + function () { + return frappe.call({ + method: "frappe.client.delete", + args: { + doctype: frm.doctype, + name: frm.docname, + }, + freeze: true, + freeze_message: __("Deleting {0} and all associated Common Code documents...", [ + frm.docname, + ]), + callback: function (r) { + if (!r.exc) { + frappe.utils.play_sound("delete"); + frappe.model.clear_doc(frm.doctype, frm.docname); + window.history.back(); + } + }, + }); + } + ); + }; + + frm.set_query("default_common_code", function (doc) { + return { + filters: { + code_list: doc.name, + }, + }; + }); + }, +}); diff --git a/erpnext/edi/doctype/code_list/code_list.json b/erpnext/edi/doctype/code_list/code_list.json new file mode 100644 index 00000000000..ffcc2f2b605 --- /dev/null +++ b/erpnext/edi/doctype/code_list/code_list.json @@ -0,0 +1,112 @@ +{ + "actions": [], + "allow_copy": 1, + "allow_rename": 1, + "autoname": "prompt", + "creation": "2024-09-29 06:55:03.920375", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "title", + "canonical_uri", + "url", + "default_common_code", + "column_break_nkls", + "version", + "publisher", + "publisher_id", + "section_break_npxp", + "description" + ], + "fields": [ + { + "fieldname": "title", + "fieldtype": "Data", + "label": "Title" + }, + { + "fieldname": "publisher", + "fieldtype": "Data", + "in_standard_filter": 1, + "label": "Publisher" + }, + { + "columns": 1, + "fieldname": "version", + "fieldtype": "Data", + "in_list_view": 1, + "label": "Version" + }, + { + "fieldname": "description", + "fieldtype": "Small Text", + "label": "Description" + }, + { + "fieldname": "canonical_uri", + "fieldtype": "Data", + "in_list_view": 1, + "label": "Canonical URI" + }, + { + "fieldname": "column_break_nkls", + "fieldtype": "Column Break" + }, + { + "fieldname": "section_break_npxp", + "fieldtype": "Section Break" + }, + { + "fieldname": "publisher_id", + "fieldtype": "Data", + "in_standard_filter": 1, + "label": "Publisher ID" + }, + { + "fieldname": "url", + "fieldtype": "Data", + "label": "URL", + "options": "URL" + }, + { + "description": "This value shall be used when no matching Common Code for a record is found.", + "fieldname": "default_common_code", + "fieldtype": "Link", + "label": "Default Common Code", + "options": "Common Code" + } + ], + "index_web_pages_for_search": 1, + "links": [ + { + "link_doctype": "Common Code", + "link_fieldname": "code_list" + } + ], + "modified": "2024-11-16 17:01:40.260293", + "modified_by": "Administrator", + "module": "EDI", + "name": "Code List", + "naming_rule": "Set by user", + "owner": "Administrator", + "permissions": [ + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, + "write": 1 + } + ], + "search_fields": "description", + "show_title_field_in_link": 1, + "sort_field": "creation", + "sort_order": "DESC", + "states": [], + "title_field": "title" +} \ No newline at end of file diff --git a/erpnext/edi/doctype/code_list/code_list.py b/erpnext/edi/doctype/code_list/code_list.py new file mode 100644 index 00000000000..8957c6565b9 --- /dev/null +++ b/erpnext/edi/doctype/code_list/code_list.py @@ -0,0 +1,125 @@ +# Copyright (c) 2024, Frappe Technologies Pvt. Ltd. and contributors +# For license information, please see license.txt + +from typing import TYPE_CHECKING + +import frappe +from frappe.model.document import Document + +if TYPE_CHECKING: + from lxml.etree import Element + + +class CodeList(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + canonical_uri: DF.Data | None + default_common_code: DF.Link | None + description: DF.SmallText | None + publisher: DF.Data | None + publisher_id: DF.Data | None + title: DF.Data | None + url: DF.Data | None + version: DF.Data | None + # end: auto-generated types + + def on_trash(self): + if not frappe.flags.in_bulk_delete: + self.__delete_linked_docs() + + def __delete_linked_docs(self): + self.db_set("default_common_code", None) + + linked_docs = frappe.get_all( + "Common Code", + filters={"code_list": self.name}, + fields=["name"], + ) + + for doc in linked_docs: + frappe.delete_doc("Common Code", doc.name) + + def get_codes_for(self, doctype: str, name: str) -> tuple[str]: + """Get the applicable codes for a doctype and name""" + return get_codes_for(self.name, doctype, name) + + def get_docnames_for(self, doctype: str, code: str) -> tuple[str]: + """Get the mapped docnames for a doctype and code""" + return get_docnames_for(self.name, doctype, code) + + def get_default_code(self) -> str | None: + """Get the default common code for this code list""" + return ( + frappe.db.get_value("Common Code", self.default_common_code, "common_code") + if self.default_common_code + else None + ) + + def from_genericode(self, root: "Element"): + """Extract Code List details from genericode XML""" + self.title = root.find(".//Identification/ShortName").text + self.version = root.find(".//Identification/Version").text + self.canonical_uri = root.find(".//CanonicalUri").text + # optionals + self.description = getattr(root.find(".//Identification/LongName"), "text", None) + self.publisher = getattr(root.find(".//Identification/Agency/ShortName"), "text", None) + if not self.publisher: + self.publisher = getattr(root.find(".//Identification/Agency/LongName"), "text", None) + self.publisher_id = getattr(root.find(".//Identification/Agency/Identifier"), "text", None) + self.url = getattr(root.find(".//Identification/LocationUri"), "text", None) + + +def get_codes_for(code_list: str, doctype: str, name: str) -> tuple[str]: + """Return the common code for a given record""" + CommonCode = frappe.qb.DocType("Common Code") + DynamicLink = frappe.qb.DocType("Dynamic Link") + + codes = ( + frappe.qb.from_(CommonCode) + .join(DynamicLink) + .on((CommonCode.name == DynamicLink.parent) & (DynamicLink.parenttype == "Common Code")) + .select(CommonCode.common_code) + .where( + (DynamicLink.link_doctype == doctype) + & (DynamicLink.link_name == name) + & (CommonCode.code_list == code_list) + ) + .distinct() + .orderby(CommonCode.common_code) + ).run() + + return tuple(c[0] for c in codes) if codes else () + + +def get_docnames_for(code_list: str, doctype: str, code: str) -> tuple[str]: + """Return the record name for a given common code""" + CommonCode = frappe.qb.DocType("Common Code") + DynamicLink = frappe.qb.DocType("Dynamic Link") + + docnames = ( + frappe.qb.from_(CommonCode) + .join(DynamicLink) + .on((CommonCode.name == DynamicLink.parent) & (DynamicLink.parenttype == "Common Code")) + .select(DynamicLink.link_name) + .where( + (DynamicLink.link_doctype == doctype) + & (CommonCode.common_code == code) + & (CommonCode.code_list == code_list) + ) + .distinct() + .orderby(DynamicLink.idx) + ).run() + + return tuple(d[0] for d in docnames) if docnames else () + + +def get_default_code(code_list: str) -> str | None: + """Return the default common code for a given code list""" + code_id = frappe.db.get_value("Code List", code_list, "default_common_code") + return frappe.db.get_value("Common Code", code_id, "common_code") if code_id else None diff --git a/erpnext/edi/doctype/code_list/code_list_import.js b/erpnext/edi/doctype/code_list/code_list_import.js new file mode 100644 index 00000000000..4a33f3e2fe6 --- /dev/null +++ b/erpnext/edi/doctype/code_list/code_list_import.js @@ -0,0 +1,218 @@ +frappe.provide("erpnext.edi"); + +erpnext.edi.import_genericode = function (listview_or_form) { + let doctype = "Code List"; + let docname = undefined; + if (listview_or_form.doc !== undefined) { + docname = listview_or_form.doc.name; + } + new frappe.ui.FileUploader({ + method: "erpnext.edi.doctype.code_list.code_list_import.import_genericode", + doctype: doctype, + docname: docname, + allow_toggle_private: false, + allow_take_photo: false, + on_success: function (_file_doc, r) { + listview_or_form.refresh(); + show_column_selection_dialog(r.message); + }, + }); +}; + +function show_column_selection_dialog(context) { + let title_description = __("If there is no title column, use the code column for the title."); + let default_title = get_default(context.columns, ["name", "Name", "code-name", "scheme-name"]); + let fields = [ + { + fieldtype: "HTML", + fieldname: "code_list_info", + options: `
${__( + "You are importing data for the code list:" + )} ${frappe.utils.get_form_link( + "Code List", + context.code_list, + true, + context.code_list_title + )}
`, + }, + { + fieldtype: "Section Break", + }, + { + fieldname: "import_column", + label: __("Import"), + fieldtype: "Column Break", + }, + { + fieldname: "title_column", + label: __("as Title"), + fieldtype: "Select", + reqd: 1, + options: context.columns, + default: default_title, + description: default_title ? null : title_description, + }, + { + fieldname: "code_column", + label: __("as Code"), + fieldtype: "Select", + options: context.columns, + reqd: 1, + default: get_default(context.columns, ["code", "Code", "value"]), + }, + { + fieldname: "filters_column", + label: __("Filter"), + fieldtype: "Column Break", + }, + ]; + + if (context.columns.length > 2) { + fields.splice(5, 0, { + fieldname: "description_column", + label: __("as Description"), + fieldtype: "Select", + options: [null].concat(context.columns), + default: get_default(context.columns, [ + "description", + "Description", + "remark", + __("description"), + __("Description"), + ]), + }); + } + + // Add filterable columns + for (let column in context.filterable_columns) { + fields.push({ + fieldname: `filter_${column}`, + label: __("by {}", [column]), + fieldtype: "Select", + options: [null].concat(context.filterable_columns[column]), + }); + } + + fields.push( + { + fieldname: "preview_section", + label: __("Preview"), + fieldtype: "Section Break", + }, + { + fieldname: "preview_html", + fieldtype: "HTML", + } + ); + + let d = new frappe.ui.Dialog({ + title: __("Select Columns and Filters"), + fields: fields, + primary_action_label: __("Import"), + size: "large", // This will make the modal wider + primary_action(values) { + let filters = {}; + for (let field in values) { + if (field.startsWith("filter_") && values[field]) { + filters[field.replace("filter_", "")] = values[field]; + } + } + frappe + .xcall("erpnext.edi.doctype.code_list.code_list_import.process_genericode_import", { + code_list_name: context.code_list, + file_name: context.file, + code_column: values.code_column, + title_column: values.title_column, + description_column: values.description_column, + filters: filters, + }) + .then((count) => { + frappe.msgprint(__("Import completed. {0} common codes created.", [count])); + }); + d.hide(); + }, + }); + + d.fields_dict.code_column.df.onchange = () => update_preview(d, context); + d.fields_dict.title_column.df.onchange = (e) => { + let field = d.fields_dict.title_column; + if (!e.target.value) { + field.df.description = title_description; + field.refresh(); + } else { + field.df.description = null; + field.refresh(); + } + update_preview(d, context); + }; + + // Add onchange events for filterable columns + for (let column in context.filterable_columns) { + d.fields_dict[`filter_${column}`].df.onchange = () => update_preview(d, context); + } + + d.show(); + update_preview(d, context); +} + +/** + * Return the first key from the keys array that is found in the columns array. + */ +function get_default(columns, keys) { + return keys.find((key) => columns.includes(key)); +} + +function update_preview(dialog, context) { + let code_column = dialog.get_value("code_column"); + let title_column = dialog.get_value("title_column"); + let description_column = dialog.get_value("description_column"); + + let html = '
{d.batch_no}{d.serial_no}{abs(d.qty)}
{d.batch_no}{d.serial_no}{abs(d.qty)}
{d.batch_no}{abs(d.qty)}
'; + if (title_column) html += ``; + if (code_column) html += ``; + if (description_column) html += ``; + + // Add headers for filterable columns + for (let column in context.filterable_columns) { + if (dialog.get_value(`filter_${column}`)) { + html += ``; + } + } + + html += ""; + + for (let i = 0; i < 3; i++) { + html += ""; + if (title_column) { + let title = context.example_values[title_column][i] || ""; + html += ``; + } + if (code_column) { + let code = context.example_values[code_column][i] || ""; + html += ``; + } + if (description_column) { + let description = context.example_values[description_column][i] || ""; + html += ``; + } + + // Add values for filterable columns + for (let column in context.filterable_columns) { + if (dialog.get_value(`filter_${column}`)) { + let value = context.example_values[column][i] || ""; + html += ``; + } + } + + html += ""; + } + + html += "
${__("Title")}${__("Code")}${__("Description")}${__(column)}
${truncate(title)}${truncate(code)}${truncate(description)}${truncate(value)}
"; + + dialog.fields_dict.preview_html.$wrapper.html(html); +} + +function truncate(value, maxLength = 40) { + if (typeof value !== "string") return ""; + return value.length > maxLength ? value.substring(0, maxLength - 3) + "..." : value; +} diff --git a/erpnext/edi/doctype/code_list/code_list_import.py b/erpnext/edi/doctype/code_list/code_list_import.py new file mode 100644 index 00000000000..50df3be471e --- /dev/null +++ b/erpnext/edi/doctype/code_list/code_list_import.py @@ -0,0 +1,140 @@ +import json + +import frappe +import requests +from frappe import _ +from lxml import etree + +URL_PREFIXES = ("http://", "https://") + + +@frappe.whitelist() +def import_genericode(): + doctype = "Code List" + docname = frappe.form_dict.docname + content = frappe.local.uploaded_file + + # recover the content, if it's a link + if (file_url := frappe.local.uploaded_file_url) and file_url.startswith(URL_PREFIXES): + try: + # If it's a URL, fetch the content and make it a local file (for durable audit) + response = requests.get(frappe.local.uploaded_file_url) + response.raise_for_status() + frappe.local.uploaded_file = content = response.content + frappe.local.uploaded_filename = frappe.local.uploaded_file_url.split("/")[-1] + frappe.local.uploaded_file_url = None + except Exception as e: + frappe.throw(f"
{e!s}
", title=_("Fetching Error")) + + if file_url := frappe.local.uploaded_file_url: + file_path = frappe.utils.file_manager.get_file_path(file_url) + with open(file_path.encode(), mode="rb") as f: + content = f.read() + + # Parse the xml content + parser = etree.XMLParser(remove_blank_text=True) + try: + root = etree.fromstring(content, parser=parser) + except Exception as e: + frappe.throw(f"
{e!s}
", title=_("Parsing Error")) + + # Extract the name (CanonicalVersionUri) from the parsed XML + name = root.find(".//CanonicalVersionUri").text + docname = docname or name + + if frappe.db.exists(doctype, docname): + code_list = frappe.get_doc(doctype, docname) + if code_list.name != name: + frappe.throw(_("The uploaded file does not match the selected Code List.")) + else: + # Create a new Code List document with the extracted name + code_list = frappe.new_doc(doctype) + code_list.name = name + + code_list.from_genericode(root) + code_list.save() + + # Attach the file and provide a recoverable identifier + file_doc = frappe.get_doc( + { + "doctype": "File", + "attached_to_doctype": "Code List", + "attached_to_name": code_list.name, + "folder": "Home/Attachments", + "file_name": frappe.local.uploaded_filename, + "file_url": frappe.local.uploaded_file_url, + "is_private": 1, + "content": content, + } + ).save() + + # Get available columns and example values + columns, example_values, filterable_columns = get_genericode_columns_and_examples(root) + + return { + "code_list": code_list.name, + "code_list_title": code_list.title, + "file": file_doc.name, + "columns": columns, + "example_values": example_values, + "filterable_columns": filterable_columns, + } + + +@frappe.whitelist() +def process_genericode_import( + code_list_name: str, + file_name: str, + code_column: str, + title_column: str | None = None, + description_column: str | None = None, + filters: str | None = None, +): + from erpnext.edi.doctype.common_code.common_code import import_genericode + + column_map = {"code": code_column, "title": title_column, "description": description_column} + + return import_genericode(code_list_name, file_name, column_map, json.loads(filters) if filters else None) + + +def get_genericode_columns_and_examples(root): + columns = [] + example_values = {} + filterable_columns = {} + + # Get column names + for column in root.findall(".//Column"): + column_id = column.get("Id") + columns.append(column_id) + example_values[column_id] = [] + filterable_columns[column_id] = set() + + # Get all values and count unique occurrences + for row in root.findall(".//SimpleCodeList/Row"): + for value in row.findall("Value"): + column_id = value.get("ColumnRef") + if column_id not in columns: + # Handle undeclared column + columns.append(column_id) + example_values[column_id] = [] + filterable_columns[column_id] = set() + + simple_value = value.find("./SimpleValue") + if simple_value is None: + continue + + filterable_columns[column_id].add(simple_value.text) + + # Get example values (up to 3) and filter columns with cardinality <= 5 + for row in root.findall(".//SimpleCodeList/Row")[:3]: + for value in row.findall("Value"): + column_id = value.get("ColumnRef") + simple_value = value.find("./SimpleValue") + if simple_value is None: + continue + + example_values[column_id].append(simple_value.text) + + filterable_columns = {k: list(v) for k, v in filterable_columns.items() if len(v) <= 5} + + return columns, example_values, filterable_columns diff --git a/erpnext/edi/doctype/code_list/code_list_list.js b/erpnext/edi/doctype/code_list/code_list_list.js new file mode 100644 index 00000000000..08125de2903 --- /dev/null +++ b/erpnext/edi/doctype/code_list/code_list_list.js @@ -0,0 +1,8 @@ +frappe.listview_settings["Code List"] = { + onload: function (listview) { + listview.page.add_inner_button(__("Import Genericode File"), function () { + erpnext.edi.import_genericode(listview); + }); + }, + hide_name_column: true, +}; diff --git a/erpnext/edi/doctype/code_list/test_code_list.py b/erpnext/edi/doctype/code_list/test_code_list.py new file mode 100644 index 00000000000..d37b1ee8f5a --- /dev/null +++ b/erpnext/edi/doctype/code_list/test_code_list.py @@ -0,0 +1,9 @@ +# Copyright (c) 2024, Frappe Technologies Pvt. Ltd. and Contributors +# See license.txt + +# import frappe +from frappe.tests.utils import FrappeTestCase + + +class TestCodeList(FrappeTestCase): + pass diff --git a/erpnext/edi/doctype/common_code/__init__.py b/erpnext/edi/doctype/common_code/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/erpnext/edi/doctype/common_code/common_code.js b/erpnext/edi/doctype/common_code/common_code.js new file mode 100644 index 00000000000..646d5c85b74 --- /dev/null +++ b/erpnext/edi/doctype/common_code/common_code.js @@ -0,0 +1,8 @@ +// Copyright (c) 2024, Frappe Technologies Pvt. Ltd. and contributors +// For license information, please see license.txt + +// frappe.ui.form.on("Common Code", { +// refresh(frm) { + +// }, +// }); diff --git a/erpnext/edi/doctype/common_code/common_code.json b/erpnext/edi/doctype/common_code/common_code.json new file mode 100644 index 00000000000..b2cb43fa575 --- /dev/null +++ b/erpnext/edi/doctype/common_code/common_code.json @@ -0,0 +1,103 @@ +{ + "actions": [], + "autoname": "hash", + "creation": "2024-09-29 07:01:18.133067", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "code_list", + "title", + "common_code", + "description", + "column_break_wxsw", + "additional_data", + "section_break_rhgh", + "applies_to" + ], + "fields": [ + { + "fieldname": "code_list", + "fieldtype": "Link", + "in_list_view": 1, + "in_standard_filter": 1, + "label": "Code List", + "options": "Code List", + "reqd": 1, + "search_index": 1 + }, + { + "fieldname": "title", + "fieldtype": "Data", + "in_list_view": 1, + "in_standard_filter": 1, + "label": "Title", + "length": 300, + "reqd": 1 + }, + { + "fieldname": "column_break_wxsw", + "fieldtype": "Column Break" + }, + { + "fieldname": "section_break_rhgh", + "fieldtype": "Section Break" + }, + { + "fieldname": "applies_to", + "fieldtype": "Table", + "label": "Applies To", + "options": "Dynamic Link" + }, + { + "fieldname": "common_code", + "fieldtype": "Data", + "in_list_view": 1, + "in_standard_filter": 1, + "label": "Common Code", + "length": 300, + "reqd": 1, + "search_index": 1 + }, + { + "fieldname": "additional_data", + "fieldtype": "Code", + "label": "Additional Data", + "max_height": "190px", + "read_only": 1 + }, + { + "fieldname": "description", + "fieldtype": "Small Text", + "in_list_view": 1, + "label": "Description", + "max_height": "60px" + } + ], + "links": [], + "modified": "2024-11-06 07:46:17.175687", + "modified_by": "Administrator", + "module": "EDI", + "name": "Common Code", + "naming_rule": "Random", + "owner": "Administrator", + "permissions": [ + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, + "write": 1 + } + ], + "search_fields": "common_code,description", + "show_title_field_in_link": 1, + "sort_field": "creation", + "sort_order": "DESC", + "states": [], + "title_field": "title" +} \ No newline at end of file diff --git a/erpnext/edi/doctype/common_code/common_code.py b/erpnext/edi/doctype/common_code/common_code.py new file mode 100644 index 00000000000..d558b2d282f --- /dev/null +++ b/erpnext/edi/doctype/common_code/common_code.py @@ -0,0 +1,114 @@ +# Copyright (c) 2024, Frappe Technologies Pvt. Ltd. and contributors +# For license information, please see license.txt + +import hashlib + +import frappe +from frappe import _ +from frappe.model.document import Document +from frappe.utils.data import get_link_to_form +from lxml import etree + + +class CommonCode(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.core.doctype.dynamic_link.dynamic_link import DynamicLink + from frappe.types import DF + + additional_data: DF.Code | None + applies_to: DF.Table[DynamicLink] + code_list: DF.Link + common_code: DF.Data + description: DF.SmallText | None + title: DF.Data + # end: auto-generated types + + def validate(self): + self.validate_distinct_references() + + def validate_distinct_references(self): + """Ensure no two Common Codes of the same Code List are linked to the same document.""" + for link in self.applies_to: + existing_links = frappe.get_all( + "Common Code", + filters=[ + ["name", "!=", self.name], + ["code_list", "=", self.code_list], + ["Dynamic Link", "link_doctype", "=", link.link_doctype], + ["Dynamic Link", "link_name", "=", link.link_name], + ], + fields=["name", "common_code"], + ) + + if existing_links: + existing_link = existing_links[0] + frappe.throw( + _("{0} {1} is already linked to Common Code {2}.").format( + link.link_doctype, + link.link_name, + get_link_to_form("Common Code", existing_link["name"], existing_link["common_code"]), + ) + ) + + def from_genericode(self, column_map: dict, xml_element: "etree.Element"): + """Populate the Common Code document from a genericode XML element + + Args: + column_map (dict): A mapping of column names to XML column references. Keys: code, title, description + code (etree.Element): The XML element representing a code in the genericode file + """ + title_column = column_map.get("title") + code_column = column_map["code"] + description_column = column_map.get("description") + + self.common_code = xml_element.find(f"./Value[@ColumnRef='{code_column}']/SimpleValue").text + + if title_column: + simple_value_title = xml_element.find(f"./Value[@ColumnRef='{title_column}']/SimpleValue") + self.title = simple_value_title.text if simple_value_title is not None else self.common_code + + if description_column: + simple_value_descr = xml_element.find(f"./Value[@ColumnRef='{description_column}']/SimpleValue") + self.description = simple_value_descr.text if simple_value_descr is not None else None + + self.additional_data = etree.tostring(xml_element, encoding="unicode", pretty_print=True) + + +def simple_hash(input_string, length=6): + return hashlib.blake2b(input_string.encode(), digest_size=length // 2).hexdigest() + + +def import_genericode(code_list: str, file_name: str, column_map: dict, filters: dict | None = None): + """Import genericode file and create Common Code entries""" + file_path = frappe.utils.file_manager.get_file_path(file_name) + parser = etree.XMLParser(remove_blank_text=True) + tree = etree.parse(file_path, parser=parser) + root = tree.getroot() + + # Construct the XPath expression + xpath_expr = ".//SimpleCodeList/Row" + filter_conditions = [ + f"Value[@ColumnRef='{column_ref}']/SimpleValue='{value}'" for column_ref, value in filters.items() + ] + if filter_conditions: + xpath_expr += "[" + " and ".join(filter_conditions) + "]" + + elements = root.xpath(xpath_expr) + total_elements = len(elements) + for i, xml_element in enumerate(elements, start=1): + common_code: "CommonCode" = frappe.new_doc("Common Code") + common_code.code_list = code_list + common_code.from_genericode(column_map, xml_element) + common_code.save() + frappe.publish_progress(i / total_elements * 100, title=_("Importing Common Codes")) + + return total_elements + + +def on_doctype_update(): + frappe.db.add_index("Common Code", ["code_list", "common_code"]) diff --git a/erpnext/edi/doctype/common_code/common_code_list.js b/erpnext/edi/doctype/common_code/common_code_list.js new file mode 100644 index 00000000000..de1b665b161 --- /dev/null +++ b/erpnext/edi/doctype/common_code/common_code_list.js @@ -0,0 +1,8 @@ +frappe.listview_settings["Common Code"] = { + onload: function (listview) { + listview.page.add_inner_button(__("Import Genericode File"), function () { + erpnext.edi.import_genericode(listview); + }); + }, + hide_name_column: true, +}; diff --git a/erpnext/edi/doctype/common_code/test_common_code.py b/erpnext/edi/doctype/common_code/test_common_code.py new file mode 100644 index 00000000000..e9c67b2cc82 --- /dev/null +++ b/erpnext/edi/doctype/common_code/test_common_code.py @@ -0,0 +1,9 @@ +# Copyright (c) 2024, Frappe Technologies Pvt. Ltd. and Contributors +# See license.txt + +# import frappe +from frappe.tests.utils import FrappeTestCase + + +class TestCommonCode(FrappeTestCase): + pass diff --git a/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.py b/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.py index edfab4777a7..e187c075077 100644 --- a/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.py +++ b/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.py @@ -96,7 +96,7 @@ def add_bank_accounts(response, bank, company): frappe.throw( _( "Please setup and enable a group account with the Account Type - {0} for the company {1}" - ).format(frappe.bold("Bank"), company) + ).format(frappe.bold(_("Bank")), company) ) for account in response["accounts"]: diff --git a/erpnext/hooks.py b/erpnext/hooks.py index 527be6ab337..882adec4d51 100644 --- a/erpnext/hooks.py +++ b/erpnext/hooks.py @@ -10,7 +10,17 @@ source_link = "https://github.com/frappe/erpnext" app_logo_url = "/assets/erpnext/images/erpnext-logo.svg" -develop_version = "14.x.x-develop" +add_to_apps_screen = [ + { + "name": "erpnext", + "logo": "/assets/erpnext/images/erpnext-logo-blue.png", + "title": "ERPNext", + "route": "/app/home", + "has_permission": "erpnext.check_app_permission", + } +] + +develop_version = "15.x.x-develop" app_include_js = "erpnext.bundle.js" app_include_css = "erpnext.bundle.css" @@ -25,6 +35,14 @@ doctype_js = { "Newsletter": "public/js/newsletter.js", "Contact": "public/js/contact.js", } +doctype_list_js = { + "Code List": [ + "edi/doctype/code_list/code_list_import.js", + ], + "Common Code": [ + "edi/doctype/code_list/code_list_import.js", + ], +} override_doctype_class = {"Address": "erpnext.accounts.custom.address.ERPNextAddress"} @@ -355,7 +373,6 @@ doc_events = { "Payment Entry": { "on_submit": [ "erpnext.regional.create_transaction_log", - "erpnext.accounts.doctype.payment_request.payment_request.update_payment_req_status", "erpnext.accounts.doctype.dunning.dunning.resolve_dunning", ], "on_cancel": ["erpnext.accounts.doctype.dunning.dunning.resolve_dunning"], diff --git a/erpnext/manufacturing/doctype/bom/bom.js b/erpnext/manufacturing/doctype/bom/bom.js index 6267ee4d029..fe498ca32f9 100644 --- a/erpnext/manufacturing/doctype/bom/bom.js +++ b/erpnext/manufacturing/doctype/bom/bom.js @@ -182,25 +182,30 @@ frappe.ui.form.on("BOM", { }, make_work_order(frm) { - frm.events.setup_variant_prompt(frm, "Work Order", (frm, item, data, variant_items) => { - frappe.call({ - method: "erpnext.manufacturing.doctype.work_order.work_order.make_work_order", - args: { - bom_no: frm.doc.name, - item: item, - qty: data.qty || 0.0, - project: frm.doc.project, - variant_items: variant_items, - }, - freeze: true, - callback(r) { - if (r.message) { - let doc = frappe.model.sync(r.message)[0]; - frappe.set_route("Form", doc.doctype, doc.name); - } - }, - }); - }); + frm.events.setup_variant_prompt( + frm, + "Work Order", + (frm, item, data, variant_items, use_multi_level_bom) => { + frappe.call({ + method: "erpnext.manufacturing.doctype.work_order.work_order.make_work_order", + args: { + bom_no: frm.doc.name, + item: item, + qty: data.qty || 0.0, + project: frm.doc.project, + variant_items: variant_items, + use_multi_level_bom: use_multi_level_bom, + }, + freeze: true, + callback(r) { + if (r.message) { + let doc = frappe.model.sync(r.message)[0]; + frappe.set_route("Form", doc.doctype, doc.name); + } + }, + }); + } + ); }, make_variant_bom(frm) { @@ -250,6 +255,15 @@ frappe.ui.form.on("BOM", { }); } + if (!skip_qty_field) { + fields.push({ + fieldtype: "Check", + label: __("Use Multi-Level BOM"), + fieldname: "use_multi_level_bom", + default: 1, + }); + } + if (!skip_qty_field) { fields.push({ fieldtype: "Float", @@ -277,6 +291,13 @@ frappe.ui.form.on("BOM", { cur_dialog.refresh(); }, }); + + fields.push({ + fieldtype: "Check", + label: __("Use Multi-Level BOM"), + fieldname: "use_multi_level_bom", + default: frm.doc?.__onload.use_multi_level_bom, + }); } var has_template_rm = frm.doc.items.filter((d) => d.has_variants === 1) || []; @@ -285,6 +306,7 @@ frappe.ui.form.on("BOM", { fieldname: "items", fieldtype: "Table", label: __("Raw Materials"), + depends_on: "eval:!doc.use_multi_level_bom", fields: [ { fieldname: "item_code", @@ -293,6 +315,13 @@ frappe.ui.form.on("BOM", { fieldtype: "Link", in_list_view: 1, reqd: 1, + get_query() { + return { + filters: { + has_variants: 1, + }, + }; + }, }, { fieldname: "variant_item_code", @@ -313,6 +342,13 @@ frappe.ui.form.on("BOM", { }, }; }, + change() { + let doc = this.doc; + if (!doc.qty) { + doc.qty = 1.0; + this.grid.set_value("qty", 1.0, doc); + } + }, }, { fieldname: "qty", @@ -347,14 +383,15 @@ frappe.ui.form.on("BOM", { (data) => { let item = data.item || frm.doc.item; let variant_items = data.items || []; + let use_multi_level_bom = data.use_multi_level_bom || 0; variant_items.forEach((d) => { - if (!d.variant_item_code) { + if (!d.variant_item_code && !use_multi_level_bom) { frappe.throw(__("Select variant item code for the template item {0}", [d.item_code])); } }); - callback(frm, item, data, variant_items); + callback(frm, item, data, variant_items, use_multi_level_bom); }, __(title), __("Create") @@ -364,7 +401,7 @@ frappe.ui.form.on("BOM", { dialog.fields_dict.items.df.data.push({ item_code: d.item_code, variant_item_code: "", - qty: d.qty, + qty: (d.qty / frm.doc.quantity) * (dialog.fields_dict.qty.value || 1), source_warehouse: d.source_warehouse, operation: d.operation, }); diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py index 303670cee72..6b2dd77c471 100644 --- a/erpnext/manufacturing/doctype/bom/bom.py +++ b/erpnext/manufacturing/doctype/bom/bom.py @@ -176,13 +176,10 @@ class BOM(WebsiteGenerator): search_key = f"{self.doctype}-{self.item}%" existing_boms = frappe.get_all( - "BOM", filters={"name": ("like", search_key), "amended_from": ["is", "not set"]}, pluck="name" + "BOM", filters={"name": search_key, "amended_from": ["is", "not set"]}, pluck="name" ) - if existing_boms: - index = self.get_next_version_index(existing_boms) - else: - index = 1 + index = self.get_index_for_bom(existing_boms) prefix = self.doctype suffix = "%.3i" % index # convert index to string (1 -> "001") @@ -200,21 +197,40 @@ class BOM(WebsiteGenerator): name = f"{prefix}-{truncated_item_name}-{suffix}" if frappe.db.exists("BOM", name): - conflicting_bom = frappe.get_doc("BOM", name) + existing_boms = frappe.get_all( + "BOM", filters={"name": ("like", search_key), "amended_from": ["is", "not set"]}, pluck="name" + ) - if conflicting_bom.item != self.item: - msg = _("A BOM with name {0} already exists for item {1}.").format( - frappe.bold(name), frappe.bold(conflicting_bom.item) - ) - - frappe.throw( - _("{0}{1} Did you rename the item? Please contact Administrator / Tech support").format( - msg, "
" - ) - ) + index = self.get_index_for_bom(existing_boms) + suffix = "%.3i" % index + name = f"{prefix}-{self.item}-{suffix}" self.name = name + def get_index_for_bom(self, existing_boms): + index = 1 + if existing_boms: + index = self.get_next_version_index(existing_boms) + + return index + + def onload(self): + super().onload() + + self.set_onload_for_muulti_level_bom() + + def set_onload_for_muulti_level_bom(self): + use_multi_level_bom = frappe.db.get_value( + "Property Setter", + {"field_name": "use_multi_level_bom", "doc_type": "Work Order", "property": "default"}, + "value", + ) + + if use_multi_level_bom is None: + use_multi_level_bom = 1 + + self.set_onload("use_multi_level_bom", cint(use_multi_level_bom)) + @staticmethod def get_next_version_index(existing_boms: list[str]) -> int: # split by "/" and "-" @@ -260,6 +276,24 @@ class BOM(WebsiteGenerator): self.update_cost(update_parent=False, from_child_bom=True, update_hour_rate=False, save=False) self.set_process_loss_qty() self.validate_scrap_items() + self.set_default_uom() + + def set_default_uom(self): + if not self.get("items"): + return + + item_wise_uom = frappe._dict( + frappe.get_all( + "Item", + filters={"name": ("in", [item.item_code for item in self.items])}, + fields=["name", "stock_uom"], + as_list=1, + ) + ) + + for row in self.get("items"): + if row.stock_uom != item_wise_uom.get(row.item_code): + row.stock_uom = item_wise_uom.get(row.item_code) def get_context(self, context): context.parents = [{"name": "boms", "title": _("All BOMs")}] @@ -742,11 +776,8 @@ class BOM(WebsiteGenerator): base_total_rm_cost = 0 for d in self.get("items"): - if not d.is_stock_item and self.rm_cost_as_per == "Valuation Rate": - continue - old_rate = d.rate - if not self.bom_creator: + if not self.bom_creator and d.is_stock_item: d.rate = self.get_rm_rate( { "company": self.company, @@ -968,6 +999,13 @@ class BOM(WebsiteGenerator): if not d.batch_size or d.batch_size <= 0: d.batch_size = 1 + if not d.workstation and not d.workstation_type: + frappe.throw( + _( + "Row {0}: Workstation or Workstation Type is mandatory for an operation {1}" + ).format(d.idx, d.operation) + ) + def get_tree_representation(self) -> BOMTree: """Get a complete tree representation preserving order of child items.""" return BOMTree(self.name) diff --git a/erpnext/manufacturing/doctype/bom/test_bom.py b/erpnext/manufacturing/doctype/bom/test_bom.py index e6ee59afb27..83e722cce50 100644 --- a/erpnext/manufacturing/doctype/bom/test_bom.py +++ b/erpnext/manufacturing/doctype/bom/test_bom.py @@ -768,6 +768,26 @@ class TestBOM(FrappeTestCase): for item_code in scraped_items.keys(): self.assertIn(item_code, bom_scraped_items, f"Item {item_code} not found in BOM scrap items") + def test_bom_raw_materials_stock_uom(self): + rm_item = make_item( + properties={"is_stock_item": 1, "valuation_rate": 1000.0, "stock_uom": "Nos"} + ).name + fg_item = make_item(properties={"is_stock_item": 1}).name + + from erpnext.manufacturing.doctype.production_plan.test_production_plan import make_bom + + bom = make_bom(item=fg_item, raw_materials=[rm_item], do_not_submit=True) + for row in bom.items: + self.assertEqual(row.stock_uom, "Nos") + + frappe.db.set_value("Item", rm_item, "stock_uom", "Kg") + + bom.items[0].qty = 2 + bom.save() + + for row in bom.items: + self.assertEqual(row.stock_uom, "Kg") + def get_default_bom(item_code="_Test FG Item 2"): return frappe.db.get_value("BOM", {"item": item_code, "is_active": 1, "is_default": 1}) diff --git a/erpnext/manufacturing/doctype/bom_creator/bom_creator.json b/erpnext/manufacturing/doctype/bom_creator/bom_creator.json index 9d2384e31a0..65664be2bea 100644 --- a/erpnext/manufacturing/doctype/bom_creator/bom_creator.json +++ b/erpnext/manufacturing/doctype/bom_creator/bom_creator.json @@ -280,6 +280,7 @@ "read_only": 1 } ], + "hide_toolbar": 1, "icon": "fa fa-sitemap", "is_submittable": 1, "links": [ @@ -288,7 +289,7 @@ "link_fieldname": "bom_creator" } ], - "modified": "2024-04-02 16:30:59.779190", + "modified": "2024-09-21 09:05:52.945112", "modified_by": "Administrator", "module": "Manufacturing", "name": "BOM Creator", diff --git a/erpnext/manufacturing/doctype/bom_update_log/bom_update_log.py b/erpnext/manufacturing/doctype/bom_update_log/bom_update_log.py index 12d52ea51fd..34a3900015d 100644 --- a/erpnext/manufacturing/doctype/bom_update_log/bom_update_log.py +++ b/erpnext/manufacturing/doctype/bom_update_log/bom_update_log.py @@ -8,7 +8,7 @@ from frappe import _ from frappe.model.document import Document from frappe.query_builder import DocType, Interval from frappe.query_builder.functions import Now -from frappe.utils import cint, cstr +from frappe.utils import cint, cstr, date_diff, today from erpnext.manufacturing.doctype.bom_update_log.bom_updation_utils import ( get_leaf_boms, @@ -88,10 +88,12 @@ class BOMUpdateLog(Document): wip_log = frappe.get_all( "BOM Update Log", - {"update_type": "Update Cost", "status": ["in", ["Queued", "In Progress"]]}, + fields=["name", "modified"], + filters={"update_type": "Update Cost", "status": ["in", ["Queued", "In Progress"]]}, limit_page_length=1, ) - if wip_log: + + if wip_log and date_diff(today(), wip_log[0].modified) < 1: log_link = frappe.utils.get_link_to_form("BOM Update Log", wip_log[0].name) frappe.throw( _("BOM Updation already in progress. Please wait until {0} is complete.").format(log_link), diff --git a/erpnext/manufacturing/doctype/job_card/job_card.js b/erpnext/manufacturing/doctype/job_card/job_card.js index 4cc60a3b4a6..ad514efa55f 100644 --- a/erpnext/manufacturing/doctype/job_card/job_card.js +++ b/erpnext/manufacturing/doctype/job_card/job_card.js @@ -37,7 +37,7 @@ frappe.ui.form.on("Job Card", { frappe.flags.resume_job = 0; let has_items = frm.doc.items && frm.doc.items.length; - if (!frm.is_new() && frm.doc.__onload.work_order_closed) { + if (!frm.is_new() && frm.doc.__onload?.work_order_closed) { frm.disable_save(); return; } diff --git a/erpnext/manufacturing/doctype/job_card/job_card.py b/erpnext/manufacturing/doctype/job_card/job_card.py index abea4c86279..58637109077 100644 --- a/erpnext/manufacturing/doctype/job_card/job_card.py +++ b/erpnext/manufacturing/doctype/job_card/job_card.py @@ -669,7 +669,7 @@ class JobCard(Document): self.set_transferred_qty() def validate_transfer_qty(self): - if self.items and self.transferred_qty < self.for_quantity: + if not self.is_corrective_job_card and self.items and self.transferred_qty < self.for_quantity: frappe.throw( _( "Materials needs to be transferred to the work in progress warehouse for the job card {0}" @@ -941,26 +941,19 @@ class JobCard(Document): qty = 0 if self.work_order: - doc = frappe.get_doc("Work Order", self.work_order) if doc.transfer_material_against == "Job Card" and not doc.skip_transfer: - completed = True + min_qty = [] for d in doc.operations: - if d.status != "Completed": - completed = False + if d.completed_qty: + min_qty.append(d.completed_qty) + else: + min_qty = [] break - if completed: - job_cards = frappe.get_all( - "Job Card", - filters={"work_order": self.work_order, "docstatus": ("!=", 2)}, - fields="sum(transferred_qty) as qty", - group_by="operation_id", - ) + if min_qty: + qty = min(min_qty) - if job_cards: - qty = min(d.qty for d in job_cards) - - doc.db_set("material_transferred_for_manufacturing", qty) + doc.db_set("material_transferred_for_manufacturing", qty) self.set_status(update_status) diff --git a/erpnext/manufacturing/doctype/manufacturing_settings/manufacturing_settings.json b/erpnext/manufacturing/doctype/manufacturing_settings/manufacturing_settings.json index 63e3fa3e9ff..26cbc03eeb2 100644 --- a/erpnext/manufacturing/doctype/manufacturing_settings/manufacturing_settings.json +++ b/erpnext/manufacturing/doctype/manufacturing_settings/manufacturing_settings.json @@ -5,18 +5,17 @@ "document_type": "Document", "engine": "InnoDB", "field_order": [ + "bom_and_work_order_tab", "raw_materials_consumption_section", "material_consumption", "get_rm_cost_from_consumption_entry", "column_break_3", "backflush_raw_materials_based_on", - "capacity_planning", - "disable_capacity_planning", - "allow_overtime", - "allow_production_on_holidays", - "column_break_5", - "capacity_planning_for_days", - "mins_between_operations", + "validate_components_quantities_per_bom", + "bom_section", + "update_bom_costs_automatically", + "column_break_lhyt", + "manufacture_sub_assembly_in_operation", "section_break_6", "default_wip_warehouse", "default_fg_warehouse", @@ -30,8 +29,14 @@ "add_corrective_operation_cost_in_finished_good_valuation", "column_break_24", "job_card_excess_transfer", + "capacity_planning", + "disable_capacity_planning", + "allow_overtime", + "allow_production_on_holidays", + "column_break_5", + "capacity_planning_for_days", + "mins_between_operations", "other_settings_section", - "update_bom_costs_automatically", "set_op_cost_and_scrape_from_sub_assemblies", "column_break_23", "make_serial_no_batch_from_work_order" @@ -149,7 +154,7 @@ { "fieldname": "raw_materials_consumption_section", "fieldtype": "Section Break", - "label": "Raw Materials Consumption" + "label": "Raw Materials Consumption " }, { "fieldname": "column_break_16", @@ -183,8 +188,8 @@ }, { "fieldname": "job_card_section", - "fieldtype": "Section Break", - "label": "Job Card" + "fieldtype": "Tab Break", + "label": "Job Card and Capacity Planning" }, { "fieldname": "column_break_24", @@ -210,13 +215,41 @@ "fieldname": "get_rm_cost_from_consumption_entry", "fieldtype": "Check", "label": "Get Raw Materials Cost from Consumption Entry" + }, + { + "fieldname": "bom_and_work_order_tab", + "fieldtype": "Tab Break", + "label": "BOM and Production" + }, + { + "fieldname": "bom_section", + "fieldtype": "Section Break", + "label": "BOM" + }, + { + "fieldname": "column_break_lhyt", + "fieldtype": "Column Break" + }, + { + "default": "0", + "description": "If enabled then system will manufacture Sub-assembly against the Job Card (operation).", + "fieldname": "manufacture_sub_assembly_in_operation", + "fieldtype": "Check", + "label": "Manufacture Sub-assembly in Operation" + }, + { + "default": "0", + "depends_on": "eval:doc.backflush_raw_materials_based_on == \"BOM\"", + "fieldname": "validate_components_quantities_per_bom", + "fieldtype": "Check", + "label": "Validate Components Quantities Per BOM" } ], "icon": "icon-wrench", "index_web_pages_for_search": 1, "issingle": 1, "links": [], - "modified": "2024-02-08 19:00:37.561244", + "modified": "2024-09-02 12:12:03.132567", "modified_by": "Administrator", "module": "Manufacturing", "name": "Manufacturing Settings", @@ -234,4 +267,4 @@ "sort_order": "DESC", "states": [], "track_changes": 1 -} \ No newline at end of file +} diff --git a/erpnext/manufacturing/doctype/manufacturing_settings/manufacturing_settings.py b/erpnext/manufacturing/doctype/manufacturing_settings/manufacturing_settings.py index 84dbce2b83f..cb2916c8ac5 100644 --- a/erpnext/manufacturing/doctype/manufacturing_settings/manufacturing_settings.py +++ b/erpnext/manufacturing/doctype/manufacturing_settings/manufacturing_settings.py @@ -29,15 +29,22 @@ class ManufacturingSettings(Document): get_rm_cost_from_consumption_entry: DF.Check job_card_excess_transfer: DF.Check make_serial_no_batch_from_work_order: DF.Check + manufacture_sub_assembly_in_operation: DF.Check material_consumption: DF.Check mins_between_operations: DF.Int overproduction_percentage_for_sales_order: DF.Percent overproduction_percentage_for_work_order: DF.Percent set_op_cost_and_scrape_from_sub_assemblies: DF.Check update_bom_costs_automatically: DF.Check + validate_components_quantities_per_bom: DF.Check # end: auto-generated types - pass + def before_save(self): + self.reset_values() + + def reset_values(self): + if self.backflush_raw_materials_based_on != "BOM" and self.validate_components_quantities_per_bom: + self.validate_components_quantities_per_bom = 0 def get_mins_between_operations(): diff --git a/erpnext/manufacturing/doctype/plant_floor/plant_floor.js b/erpnext/manufacturing/doctype/plant_floor/plant_floor.js index becdbdb9c95..3d18900b70c 100644 --- a/erpnext/manufacturing/doctype/plant_floor/plant_floor.js +++ b/erpnext/manufacturing/doctype/plant_floor/plant_floor.js @@ -6,6 +6,22 @@ frappe.ui.form.on("Plant Floor", { frm.trigger("setup_queries"); }, + add_workstation(frm) { + frm.add_custom_button(__("Create Workstation"), () => { + var doc = frappe.model.get_new_doc("Workstation"); + doc.plant_floor = frm.doc.name; + doc.status = "Off"; + frappe.ui.form.make_quick_entry( + "Workstation", + () => { + frm.trigger("prepare_workstation_dashboard"); + }, + null, + doc + ); + }).addClass("btn-primary"); + }, + setup_queries(frm) { frm.set_query("warehouse", (doc) => { if (!doc.company) { @@ -24,6 +40,11 @@ frappe.ui.form.on("Plant Floor", { refresh(frm) { frm.trigger("prepare_stock_dashboard"); frm.trigger("prepare_workstation_dashboard"); + + if (!frm.is_new()) { + frm.trigger("add_workstation"); + frm.disable_save(); + } }, prepare_workstation_dashboard(frm) { diff --git a/erpnext/manufacturing/doctype/plant_floor/plant_floor.json b/erpnext/manufacturing/doctype/plant_floor/plant_floor.json index be0052c47bf..c1c167c395b 100644 --- a/erpnext/manufacturing/doctype/plant_floor/plant_floor.json +++ b/erpnext/manufacturing/doctype/plant_floor/plant_floor.json @@ -69,9 +69,10 @@ "options": "Company" } ], + "hide_toolbar": 1, "index_web_pages_for_search": 1, "links": [], - "modified": "2024-01-30 11:59:07.508535", + "modified": "2024-09-19 19:06:36.481625", "modified_by": "Administrator", "module": "Manufacturing", "name": "Plant Floor", @@ -94,4 +95,4 @@ "sort_field": "modified", "sort_order": "DESC", "states": [] -} \ No newline at end of file +} diff --git a/erpnext/manufacturing/doctype/production_plan/production_plan.js b/erpnext/manufacturing/doctype/production_plan/production_plan.js index 5b4ef233926..e7ac7f7cc83 100644 --- a/erpnext/manufacturing/doctype/production_plan/production_plan.js +++ b/erpnext/manufacturing/doctype/production_plan/production_plan.js @@ -87,17 +87,17 @@ frappe.ui.form.on("Production Plan", { if (frm.doc.docstatus === 1) { frm.trigger("show_progress"); - if (frm.doc.status !== "Completed") { - frm.add_custom_button( - __("Production Plan Summary"), - () => { - frappe.set_route("query-report", "Production Plan Summary", { - production_plan: frm.doc.name, - }); - }, - __("View") - ); + frm.add_custom_button( + __("Production Plan Summary"), + () => { + frappe.set_route("query-report", "Production Plan Summary", { + production_plan: frm.doc.name, + }); + }, + __("View") + ); + if (frm.doc.status !== "Completed") { if (frm.doc.status === "Closed") { frm.add_custom_button( __("Re-open"), @@ -277,7 +277,7 @@ frappe.ui.form.on("Production Plan", { frm.clear_table("prod_plan_references"); frappe.call({ - method: "get_items", + method: "combine_so_items", freeze: true, doc: frm.doc, callback: function () { diff --git a/erpnext/manufacturing/doctype/production_plan/production_plan.json b/erpnext/manufacturing/doctype/production_plan/production_plan.json index 84bbad58c38..22971d4debd 100644 --- a/erpnext/manufacturing/doctype/production_plan/production_plan.json +++ b/erpnext/manufacturing/doctype/production_plan/production_plan.json @@ -243,7 +243,7 @@ "depends_on": "eval:!doc.__islocal", "fieldname": "download_materials_required", "fieldtype": "Button", - "label": "Download Materials Request Plan" + "label": "Download Required Materials" }, { "fieldname": "get_items_for_mr", @@ -398,7 +398,7 @@ "collapsible": 1, "fieldname": "download_materials_request_plan_section_section", "fieldtype": "Section Break", - "label": "Download Materials Request Plan Section" + "label": "Preview Required Materials" }, { "default": "0", @@ -439,7 +439,7 @@ "index_web_pages_for_search": 1, "is_submittable": 1, "links": [], - "modified": "2024-02-27 13:34:20.692211", + "modified": "2024-12-04 11:55:03.108971", "modified_by": "Administrator", "module": "Manufacturing", "name": "Production Plan", @@ -463,4 +463,4 @@ "sort_field": "modified", "sort_order": "ASC", "states": [] -} \ No newline at end of file +} diff --git a/erpnext/manufacturing/doctype/production_plan/production_plan.py b/erpnext/manufacturing/doctype/production_plan/production_plan.py index 7d3aa000c87..265f99e47d3 100644 --- a/erpnext/manufacturing/doctype/production_plan/production_plan.py +++ b/erpnext/manufacturing/doctype/production_plan/production_plan.py @@ -44,9 +44,7 @@ class ProductionPlan(Document): from erpnext.manufacturing.doctype.material_request_plan_item.material_request_plan_item import ( MaterialRequestPlanItem, ) - from erpnext.manufacturing.doctype.production_plan_item.production_plan_item import ( - ProductionPlanItem, - ) + from erpnext.manufacturing.doctype.production_plan_item.production_plan_item import ProductionPlanItem from erpnext.manufacturing.doctype.production_plan_item_reference.production_plan_item_reference import ( ProductionPlanItemReference, ) @@ -269,6 +267,31 @@ class ProductionPlan(Document): {"material_request": data.name, "material_request_date": data.transaction_date}, ) + @frappe.whitelist() + def combine_so_items(self): + if self.combine_items and self.po_items and len(self.po_items) > 0: + items = [] + for row in self.po_items: + items.append( + frappe._dict( + { + "parent": row.sales_order, + "item_code": row.item_code, + "warehouse": row.warehouse, + "qty": row.pending_qty, + "pending_qty": row.pending_qty, + "conversion_factor": 1.0, + "description": row.description, + "bom_no": row.bom_no, + } + ) + ) + + self.set("po_items", []) + self.add_items(items) + else: + self.get_items() + @frappe.whitelist() def get_items(self): self.set("po_items", []) @@ -435,24 +458,28 @@ class ProductionPlan(Document): item_details = get_item_details(data.item_code, throw=False) if self.combine_items: - if item_details.bom_no in refs: - refs[item_details.bom_no]["so_details"].append( + bom_no = item_details.bom_no + if data.get("bom_no"): + bom_no = data.get("bom_no") + + if bom_no in refs: + refs[bom_no]["so_details"].append( {"sales_order": data.parent, "sales_order_item": data.name, "qty": data.pending_qty} ) - refs[item_details.bom_no]["qty"] += data.pending_qty + refs[bom_no]["qty"] += data.pending_qty continue else: - refs[item_details.bom_no] = { + refs[bom_no] = { "qty": data.pending_qty, "po_item_ref": data.name, "so_details": [], } - refs[item_details.bom_no]["so_details"].append( + refs[bom_no]["so_details"].append( {"sales_order": data.parent, "sales_order_item": data.name, "qty": data.pending_qty} ) - bom_no = data.bom_no or item_details and item_details.bom_no or "" + bom_no = data.bom_no or item_details and item_details.get("bom_no") or "" if not bom_no: continue @@ -1056,24 +1083,33 @@ def download_raw_materials(doc, warehouses=None): frappe.flags.show_qty_in_stock_uom = 1 items = get_items_for_material_requests(doc, warehouses=warehouses, get_parent_warehouse_data=True) + duplicate_item_wh_list = frappe._dict() + for d in items: - item_list.append( - [ - d.get("item_code"), - d.get("item_name"), - d.get("description"), - d.get("stock_uom"), - d.get("warehouse"), - d.get("required_bom_qty"), - d.get("projected_qty"), - d.get("actual_qty"), - d.get("ordered_qty"), - d.get("planned_qty"), - d.get("reserved_qty_for_production"), - d.get("safety_stock"), - d.get("quantity"), - ] - ) + key = (d.get("item_code"), d.get("warehouse")) + if key in duplicate_item_wh_list: + rm_data = duplicate_item_wh_list[key] + rm_data[12] += d.get("quantity") + continue + + rm_data = [ + d.get("item_code"), + d.get("item_name"), + d.get("description"), + d.get("stock_uom"), + d.get("warehouse"), + d.get("required_bom_qty"), + d.get("projected_qty"), + d.get("actual_qty"), + d.get("ordered_qty"), + d.get("planned_qty"), + d.get("reserved_qty_for_production"), + d.get("safety_stock"), + d.get("quantity"), + ] + + duplicate_item_wh_list[key] = rm_data + item_list.append(rm_data) if not doc.get("for_warehouse"): row = {"item_code": d.get("item_code")} diff --git a/erpnext/manufacturing/doctype/work_order/test_work_order.py b/erpnext/manufacturing/doctype/work_order/test_work_order.py index d1f2cdbd1aa..6ee3f73eb08 100644 --- a/erpnext/manufacturing/doctype/work_order/test_work_order.py +++ b/erpnext/manufacturing/doctype/work_order/test_work_order.py @@ -1531,6 +1531,197 @@ class TestWorkOrder(FrappeTestCase): self.assertFalse(serial_nos) + def test_backflushed_batch_raw_materials_based_on_transferred_autosabb(self): + frappe.db.set_single_value( + "Manufacturing Settings", + "backflush_raw_materials_based_on", + "Material Transferred for Manufacture", + ) + + batch_item = "Test Batch MCC Keyboard" + fg_item = "Test FG Item with Batch Raw Materials" + + ste_doc = test_stock_entry.make_stock_entry( + item_code=batch_item, target="Stores - _TC", qty=8, basic_rate=100, do_not_save=True + ) + + # Inward raw materials in Stores warehouse + ste_doc.submit() + ste_doc.reload() + + batch_no = get_batch_from_bundle(ste_doc.items[0].serial_and_batch_bundle) + + wo_doc = make_wo_order_test_record(production_item=fg_item, qty=4) + # action taken upon Start button: + transferred_ste_doc = frappe.get_doc( + make_stock_entry(wo_doc.name, "Material Transfer for Manufacture", 4) + ) + + transferred_ste_doc.submit() + transferred_ste_doc.reload() + + self.assertTrue(transferred_ste_doc.items[0].serial_and_batch_bundle) + self.assertEqual( + get_batch_from_bundle(transferred_ste_doc.items[0].serial_and_batch_bundle), batch_no + ) + self.assertEqual(transferred_ste_doc.items[0].qty, 4.0) + + # Make additional consumption and link to WO + test_stock_entry.make_stock_entry( + item_code="Test Batch Battery Consumable", + target="Stores - _TC", + qty=8, + basic_rate=2.33, + ) + consume_use_doc = test_stock_entry.make_stock_entry( + item_code="Test Batch Battery Consumable", # consumable not linked to BOM + source="Stores - _TC", + qty=4, + purpose="Material Consumption for Manufacture", + do_not_save=True, + ) + consume_use_doc.work_order = wo_doc.name + consume_use_doc.fg_completed_qty = 4 + consume_use_doc.submit() + consume_use_doc.reload() + + manufacture_ste_doc = frappe.get_doc(make_stock_entry(wo_doc.name, "Manufacture", 4)) + mfr_items = [i.as_dict() for i in manufacture_ste_doc.items] + manufacture_ste_doc.submit() + manufacture_ste_doc.reload() + + self.assertTrue(len(mfr_items), 2) + self.assertTrue(manufacture_ste_doc.items[0].serial_and_batch_bundle) + self.assertEqual( + get_batch_from_bundle(manufacture_ste_doc.items[0].serial_and_batch_bundle), batch_no + ) + self.assertEqual(manufacture_ste_doc.items[0].qty, 4.0) + + def test_backflushed_serial_no_raw_materials_based_on_transferred_autosabb(self): + frappe.db.set_single_value( + "Manufacturing Settings", + "backflush_raw_materials_based_on", + "Material Transferred for Manufacture", + ) + + sn_item = "Test Serial No BTT Headphone" + fg_item = "Test FG Item with Serial No Raw Materials" + + ste_doc = test_stock_entry.make_stock_entry( + item_code=sn_item, target="Stores - _TC", qty=4, basic_rate=100, do_not_save=True + ) + + # Inward raw materials in Stores warehouse + ste_doc.submit() + ste_doc.reload() + + serial_nos_list = sorted(get_serial_nos_from_bundle(ste_doc.items[0].serial_and_batch_bundle)) + + wo_doc = make_wo_order_test_record(production_item=fg_item, qty=4) + transferred_ste_doc = frappe.get_doc( + make_stock_entry(wo_doc.name, "Material Transfer for Manufacture", 4) + ) + + transferred_ste_doc.submit() + transferred_ste_doc.reload() + + self.assertTrue(transferred_ste_doc.items[0].serial_and_batch_bundle) + self.assertEqual( + sorted(get_serial_nos_from_bundle(transferred_ste_doc.items[0].serial_and_batch_bundle)), + serial_nos_list, + ) + self.assertEqual(transferred_ste_doc.items[0].qty, 4.0) + + # Make additional consumption and link to WO + test_stock_entry.make_stock_entry( + item_code="Test Serial Battery Consumable", + target="Stores - _TC", + qty=8, + basic_rate=3.33, + ) + consume_use_doc = test_stock_entry.make_stock_entry( + item_code="Test Serial Battery Consumable", # consumable not linked to BOM + source="Stores - _TC", + qty=4, + purpose="Material Consumption for Manufacture", + do_not_save=True, + ) + consume_use_doc.work_order = wo_doc.name + consume_use_doc.fg_completed_qty = 4 + consume_use_doc.submit() + consume_use_doc.reload() + + manufacture_ste_doc = frappe.get_doc(make_stock_entry(wo_doc.name, "Manufacture", 4)) + mfr_items = [i.as_dict() for i in manufacture_ste_doc.items] + manufacture_ste_doc.submit() + manufacture_ste_doc.reload() + + self.assertTrue(len(mfr_items), 2) + self.assertTrue(manufacture_ste_doc.items[0].serial_and_batch_bundle) + self.assertEqual( + sorted(get_serial_nos_from_bundle(manufacture_ste_doc.items[0].serial_and_batch_bundle)), + serial_nos_list, + ) + self.assertEqual(manufacture_ste_doc.items[0].qty, 4.0) + + def test_backflushed_serial_no_batch_raw_materials_based_on_transferred_autosabb(self): + frappe.db.set_single_value( + "Manufacturing Settings", + "backflush_raw_materials_based_on", + "Material Transferred for Manufacture", + ) + + sn_batch_item = "Test Batch Serial No WebCam" + fg_item = "Test FG Item with Serial & Batch No Raw Materials" + + ste_doc = test_stock_entry.make_stock_entry( + item_code=sn_batch_item, target="Stores - _TC", qty=4, basic_rate=100, do_not_save=True + ) + + ste_doc.submit() + ste_doc.reload() + + serial_nos_list = sorted(get_serial_nos_from_bundle(ste_doc.items[0].serial_and_batch_bundle)) + batch_no = get_batch_from_bundle(ste_doc.items[0].serial_and_batch_bundle) + + wo_doc = make_wo_order_test_record(production_item=fg_item, qty=4) + transferred_ste_doc = frappe.get_doc( + make_stock_entry(wo_doc.name, "Material Transfer for Manufacture", 4) + ) + + transferred_ste_doc.submit() + transferred_ste_doc.reload() + + self.assertTrue(transferred_ste_doc.items[0].serial_and_batch_bundle) + self.assertEqual( + sorted(get_serial_nos_from_bundle(transferred_ste_doc.items[0].serial_and_batch_bundle)), + serial_nos_list, + ) + self.assertEqual( + get_batch_from_bundle(transferred_ste_doc.items[0].serial_and_batch_bundle), batch_no + ) + self.assertEqual(transferred_ste_doc.items[0].qty, 4.0) + + manufacture_ste_doc = frappe.get_doc(make_stock_entry(wo_doc.name, "Manufacture", 4)) + manufacture_ste_doc.submit() + manufacture_ste_doc.reload() + + self.assertTrue(manufacture_ste_doc.items[0].serial_and_batch_bundle) + self.assertEqual( + sorted(get_serial_nos_from_bundle(manufacture_ste_doc.items[0].serial_and_batch_bundle)), + serial_nos_list, + ) + self.assertEqual( + get_batch_from_bundle(manufacture_ste_doc.items[0].serial_and_batch_bundle), batch_no + ) + self.assertEqual(manufacture_ste_doc.items[0].qty, 4.0) + + bundle = manufacture_ste_doc.items[0].serial_and_batch_bundle + bundle_doc = frappe.get_doc("Serial and Batch Bundle", bundle) + qty = sum(e.qty for e in bundle_doc.entries) + self.assertEqual(qty, -4.0) + + ### def test_non_consumed_material_return_against_work_order(self): frappe.db.set_single_value( "Manufacturing Settings", @@ -2053,6 +2244,108 @@ class TestWorkOrder(FrappeTestCase): "BOM", ) + def test_disassemby_order(self): + fg_item = "Test Disassembly Item" + source_warehouse = "Stores - _TC" + raw_materials = ["Test Disassembly RM Item 1", "Test Disassembly RM Item 2"] + + make_item(fg_item, {"is_stock_item": 1}) + for item in raw_materials: + make_item(item, {"is_stock_item": 1}) + test_stock_entry.make_stock_entry( + item_code=item, + target=source_warehouse, + qty=1, + basic_rate=100, + ) + + make_bom(item=fg_item, source_warehouse=source_warehouse, raw_materials=raw_materials) + + wo = make_wo_order_test_record( + item=fg_item, + qty=1, + source_warehouse=source_warehouse, + skip_transfer=1, + ) + + stock_entry = frappe.get_doc(make_stock_entry(wo.name, "Manufacture", 1)) + for row in stock_entry.items: + if row.item_code in raw_materials: + row.s_warehouse = source_warehouse + + stock_entry.submit() + + wo.reload() + self.assertEqual(wo.status, "Completed") + + stock_entry = frappe.get_doc(make_stock_entry(wo.name, "Disassemble", 1)) + stock_entry.save() + + self.assertEqual(stock_entry.purpose, "Disassemble") + + for row in stock_entry.items: + if row.item_code == fg_item: + self.assertTrue(row.s_warehouse) + self.assertFalse(row.t_warehouse) + else: + self.assertFalse(row.s_warehouse) + self.assertTrue(row.t_warehouse) + + stock_entry.submit() + + def test_components_qty_for_bom_based_manufacture_entry(self): + frappe.db.set_single_value("Manufacturing Settings", "backflush_raw_materials_based_on", "BOM") + frappe.db.set_single_value("Manufacturing Settings", "validate_components_quantities_per_bom", 1) + + fg_item = "Test FG Item For Component Validation" + source_warehouse = "Stores - _TC" + raw_materials = ["Test Component Validation RM Item 1", "Test Component Validation RM Item 2"] + + make_item(fg_item, {"is_stock_item": 1}) + for item in raw_materials: + make_item(item, {"is_stock_item": 1}) + test_stock_entry.make_stock_entry( + item_code=item, + target=source_warehouse, + qty=10, + basic_rate=100, + ) + + make_bom(item=fg_item, source_warehouse=source_warehouse, raw_materials=raw_materials) + + wo = make_wo_order_test_record( + item=fg_item, + qty=10, + source_warehouse=source_warehouse, + ) + + transfer_entry = frappe.get_doc(make_stock_entry(wo.name, "Material Transfer for Manufacture", 10)) + transfer_entry.save() + for row in transfer_entry.items: + row.qty = 5 + + self.assertRaises(frappe.ValidationError, transfer_entry.save) + + transfer_entry.reload() + for row in transfer_entry.items: + self.assertEqual(row.qty, 10) + + transfer_entry.submit() + + manufacture_entry = frappe.get_doc(make_stock_entry(wo.name, "Manufacture", 10)) + manufacture_entry.save() + for row in manufacture_entry.items: + if not row.s_warehouse: + continue + + row.qty = 5 + + self.assertRaises(frappe.ValidationError, manufacture_entry.save) + manufacture_entry.reload() + manufacture_entry.submit() + + frappe.db.set_single_value("Manufacturing Settings", "validate_components_quantities_per_bom", 0) + def make_operation(**kwargs): kwargs = frappe._dict(kwargs) @@ -2233,6 +2526,29 @@ def prepare_data_for_backflush_based_on_materials_transferred(): make_bom(item=item.name, source_warehouse="Stores - _TC", raw_materials=[batch_item_doc.name]) + # Make additional items not attached to a BOM + make_item( + "Test Batch Battery Consumable", + { + "is_stock_item": 1, + "has_batch_no": 1, + "create_new_batch": 1, + "batch_number_series": "TBMK.#####", + "valuation_rate": 2.33, + "stock_uom": "Nos", + }, + ) + make_item( + "Test Serial Battery Consumable", + { + "is_stock_item": 1, + "has_serial_no": 1, + "serial_no_series": "TSBH.#####", + "valuation_rate": 3.33, + "stock_uom": "Nos", + }, + ) + sn_item_doc = make_item( "Test Serial No BTT Headphone", { @@ -2370,6 +2686,7 @@ def make_wo_order_test_record(**args): wo_order.batch_size = args.batch_size or 0 if args.source_warehouse: + wo_order.source_warehouse = args.source_warehouse for item in wo_order.get("required_items"): item.source_warehouse = args.source_warehouse diff --git a/erpnext/manufacturing/doctype/work_order/work_order.js b/erpnext/manufacturing/doctype/work_order/work_order.js index 1da33f0ad9b..df72b1e6b51 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order.js +++ b/erpnext/manufacturing/doctype/work_order/work_order.js @@ -183,13 +183,30 @@ frappe.ui.form.on("Work Order", { } } + if (frm.doc.status == "Completed") { + if (frm.doc.__onload.backflush_raw_materials_based_on == "Material Transferred for Manufacture") { + frm.add_custom_button( + __("BOM"), + () => { + frm.trigger("make_bom"); + }, + __("Create") + ); + } + } + if ( - frm.doc.status == "Completed" && - frm.doc.__onload.backflush_raw_materials_based_on == "Material Transferred for Manufacture" + frm.doc.docstatus === 1 && + ["Closed", "Completed"].includes(frm.doc.status) && + frm.doc.produced_qty > 0 ) { - frm.add_custom_button(__("Create BOM"), () => { - frm.trigger("make_bom"); - }); + frm.add_custom_button( + __("Disassemble Order"), + () => { + frm.trigger("make_disassembly_order"); + }, + __("Create") + ); } frm.trigger("add_custom_button_to_return_components"); @@ -337,6 +354,23 @@ frappe.ui.form.on("Work Order", { }); }, + make_disassembly_order(frm) { + erpnext.work_order + .show_prompt_for_qty_input(frm, "Disassemble") + .then((data) => { + return frappe.xcall("erpnext.manufacturing.doctype.work_order.work_order.make_stock_entry", { + work_order_id: frm.doc.name, + purpose: "Disassemble", + qty: data.qty, + target_warehouse: data.target_warehouse, + }); + }) + .then((stock_entry) => { + frappe.model.sync(stock_entry); + frappe.set_route("Form", stock_entry.doctype, stock_entry.name); + }); + }, + show_progress_for_items: function (frm) { var bars = []; var message = ""; @@ -745,6 +779,10 @@ erpnext.work_order = { get_max_transferable_qty: (frm, purpose) => { let max = 0; + if (purpose === "Disassemble") { + return flt(frm.doc.produced_qty); + } + if (frm.doc.skip_transfer) { max = flt(frm.doc.qty) - flt(frm.doc.produced_qty); } else { @@ -759,15 +797,38 @@ erpnext.work_order = { show_prompt_for_qty_input: function (frm, purpose) { let max = this.get_max_transferable_qty(frm, purpose); + + let fields = [ + { + fieldtype: "Float", + label: __("Qty for {0}", [__(purpose)]), + fieldname: "qty", + description: __("Max: {0}", [max]), + default: max, + }, + ]; + + if (purpose === "Disassemble") { + fields.push({ + fieldtype: "Link", + options: "Warehouse", + fieldname: "target_warehouse", + label: __("Target Warehouse"), + default: frm.doc.source_warehouse || frm.doc.wip_warehouse, + get_query() { + return { + filters: { + company: frm.doc.company, + is_group: 0, + }, + }; + }, + }); + } + return new Promise((resolve, reject) => { frappe.prompt( - { - fieldtype: "Float", - label: __("Qty for {0}", [__(purpose)]), - fieldname: "qty", - description: __("Max: {0}", [max]), - default: max, - }, + fields, (data) => { max += (frm.doc.qty * (frm.doc.__onload.overproduction_percentage || 0.0)) / 100; diff --git a/erpnext/manufacturing/doctype/work_order/work_order.py b/erpnext/manufacturing/doctype/work_order/work_order.py index 904e42a6a03..9af3403ffa3 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order.py +++ b/erpnext/manufacturing/doctype/work_order/work_order.py @@ -158,16 +158,39 @@ class WorkOrder(Document): self.validate_operation_time() self.status = self.get_status() self.validate_workstation_type() + self.reset_use_multi_level_bom() + + if self.source_warehouse: + self.set_warehouses() validate_uom_is_integer(self, "stock_uom", ["qty", "produced_qty"]) self.set_required_items(reset_only_qty=len(self.get("required_items"))) + def set_warehouses(self): + for row in self.required_items: + if not row.source_warehouse: + row.source_warehouse = self.source_warehouse + + def reset_use_multi_level_bom(self): + if self.is_new(): + return + + before_save_obj = self.get_doc_before_save() + if before_save_obj.use_multi_level_bom != self.use_multi_level_bom: + self.get_items_and_operations_from_bom() + def validate_workstation_type(self): + if not self.docstatus.is_submitted(): + return + for row in self.operations: if not row.workstation and not row.workstation_type: - msg = f"Row {row.idx}: Workstation or Workstation Type is mandatory for an operation {row.operation}" - frappe.throw(_(msg)) + frappe.throw( + _("Row {0}: Workstation or Workstation Type is mandatory for an operation {1}").format( + row.idx, row.operation + ) + ) def validate_sales_order(self): if self.sales_order: @@ -520,7 +543,6 @@ class WorkOrder(Document): def delete_auto_created_batch_and_serial_no(self): for row in frappe.get_all("Serial No", filters={"work_order": self.name}): frappe.delete_doc("Serial No", row.name) - self.db_set("serial_no", "") for row in frappe.get_all("Batch", filters={"reference_name": self.name}): frappe.delete_doc("Batch", row.name) @@ -1277,7 +1299,7 @@ def get_item_details(item, project=None, skip_bom_info=False, throw=True): @frappe.whitelist() -def make_work_order(bom_no, item, qty=0, project=None, variant_items=None): +def make_work_order(bom_no, item, qty=0, project=None, variant_items=None, use_multi_level_bom=None): if not frappe.has_permission("Work Order", "write"): frappe.throw(_("Not permitted"), frappe.PermissionError) @@ -1287,12 +1309,13 @@ def make_work_order(bom_no, item, qty=0, project=None, variant_items=None): wo_doc.production_item = item wo_doc.update(item_details) wo_doc.bom_no = bom_no + wo_doc.use_multi_level_bom = cint(use_multi_level_bom) if flt(qty) > 0: wo_doc.qty = flt(qty) wo_doc.get_items_and_operations_from_bom() - if variant_items: + if variant_items and not wo_doc.use_multi_level_bom: add_variant_item(variant_items, wo_doc, bom_no, "required_items") return wo_doc @@ -1336,7 +1359,20 @@ def add_variant_item(variant_items, wo_doc, bom_no, table_name="items"): args["amount"] = flt(args.get("required_qty")) * flt(args.get("rate")) args["uom"] = item_data.stock_uom - wo_doc.append(table_name, args) + + existing_row = ( + get_template_rm_item(wo_doc, item.get("item_code")) if table_name == "required_items" else None + ) + if existing_row: + existing_row.update(args) + else: + wo_doc.append(table_name, args) + + +def get_template_rm_item(wo_doc, item_code): + for row in wo_doc.required_items: + if row.item_code == item_code: + return row @frappe.whitelist() @@ -1359,7 +1395,7 @@ def set_work_order_ops(name): @frappe.whitelist() -def make_stock_entry(work_order_id, purpose, qty=None): +def make_stock_entry(work_order_id, purpose, qty=None, target_warehouse=None): work_order = frappe.get_doc("Work Order", work_order_id) if not frappe.db.get_value("Warehouse", work_order.wip_warehouse, "is_group"): wip_warehouse = work_order.wip_warehouse @@ -1389,9 +1425,16 @@ def make_stock_entry(work_order_id, purpose, qty=None): stock_entry.to_warehouse = work_order.fg_warehouse stock_entry.project = work_order.project + if purpose == "Disassemble": + stock_entry.from_warehouse = work_order.fg_warehouse + stock_entry.to_warehouse = target_warehouse or work_order.source_warehouse + stock_entry.set_stock_entry_type() stock_entry.get_items() - stock_entry.set_serial_no_batch_for_finished_good() + + if purpose != "Disassemble": + stock_entry.set_serial_no_batch_for_finished_good() + return stock_entry.as_dict() diff --git a/erpnext/manufacturing/doctype/work_order_item/work_order_item.json b/erpnext/manufacturing/doctype/work_order_item/work_order_item.json index 0f4d693544e..580168180a7 100644 --- a/erpnext/manufacturing/doctype/work_order_item/work_order_item.json +++ b/erpnext/manufacturing/doctype/work_order_item/work_order_item.json @@ -15,6 +15,7 @@ "include_item_in_manufacturing", "qty_section", "required_qty", + "stock_uom", "rate", "amount", "column_break_11", @@ -138,11 +139,19 @@ "in_list_view": 1, "label": "Returned Qty ", "read_only": 1 + }, + { + "fetch_from": "item_code.stock_uom", + "fieldname": "stock_uom", + "fieldtype": "Link", + "label": "Stock UOM", + "options": "UOM", + "read_only": 1 } ], "istable": 1, "links": [], - "modified": "2024-02-11 15:45:32.318374", + "modified": "2024-11-19 15:48:16.823384", "modified_by": "Administrator", "module": "Manufacturing", "name": "Work Order Item", @@ -153,4 +162,4 @@ "sort_order": "DESC", "states": [], "track_changes": 1 -} \ No newline at end of file +} diff --git a/erpnext/manufacturing/doctype/work_order_item/work_order_item.py b/erpnext/manufacturing/doctype/work_order_item/work_order_item.py index 267ca5d21de..04f78eb1c3b 100644 --- a/erpnext/manufacturing/doctype/work_order_item/work_order_item.py +++ b/erpnext/manufacturing/doctype/work_order_item/work_order_item.py @@ -25,6 +25,7 @@ class WorkOrderItem(Document): item_code: DF.Link | None item_name: DF.Data | None operation: DF.Link | None + operation_row_id: DF.Int parent: DF.Data parentfield: DF.Data parenttype: DF.Data @@ -32,6 +33,7 @@ class WorkOrderItem(Document): required_qty: DF.Float returned_qty: DF.Float source_warehouse: DF.Link | None + stock_uom: DF.Link | None transferred_qty: DF.Float # end: auto-generated types diff --git a/erpnext/manufacturing/number_card/monthly_completed_work_order/monthly_completed_work_order.json b/erpnext/manufacturing/number_card/monthly_completed_work_order/monthly_completed_work_order.json index 36c0b9ae75b..7381de707d7 100644 --- a/erpnext/manufacturing/number_card/monthly_completed_work_order/monthly_completed_work_order.json +++ b/erpnext/manufacturing/number_card/monthly_completed_work_order/monthly_completed_work_order.json @@ -3,6 +3,7 @@ "docstatus": 0, "doctype": "Number Card", "document_type": "Work Order", + "dynamic_filters_json": "[[\"Work Order\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"]]", "filters_json": "[[\"Work Order\",\"status\",\"=\",\"Completed\"],[\"Work Order\",\"docstatus\",\"=\",1],[\"Work Order\",\"creation\",\"between\",[\"2020-06-08\",\"2020-07-08\"]]]", "function": "Count", "idx": 0, diff --git a/erpnext/manufacturing/number_card/monthly_total_work_order/monthly_total_work_order.json b/erpnext/manufacturing/number_card/monthly_total_work_order/monthly_total_work_order.json index 80d3b1520ae..e4b8c940454 100644 --- a/erpnext/manufacturing/number_card/monthly_total_work_order/monthly_total_work_order.json +++ b/erpnext/manufacturing/number_card/monthly_total_work_order/monthly_total_work_order.json @@ -3,6 +3,7 @@ "docstatus": 0, "doctype": "Number Card", "document_type": "Work Order", + "dynamic_filters_json": "[[\"Work Order\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"]]", "filters_json": "[[\"Work Order\",\"docstatus\",\"=\",1],[\"Work Order\",\"creation\",\"between\",[\"2020-06-08\",\"2020-07-08\"]]]", "function": "Count", "idx": 0, diff --git a/erpnext/manufacturing/number_card/ongoing_job_card/ongoing_job_card.json b/erpnext/manufacturing/number_card/ongoing_job_card/ongoing_job_card.json index ba23ff34531..0138af827a6 100644 --- a/erpnext/manufacturing/number_card/ongoing_job_card/ongoing_job_card.json +++ b/erpnext/manufacturing/number_card/ongoing_job_card/ongoing_job_card.json @@ -3,6 +3,7 @@ "docstatus": 0, "doctype": "Number Card", "document_type": "Job Card", + "dynamic_filters_json": "[[\"Job Card\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"]]", "filters_json": "[[\"Job Card\",\"status\",\"!=\",\"Completed\"],[\"Job Card\",\"docstatus\",\"=\",1]]", "function": "Count", "idx": 0, diff --git a/erpnext/manufacturing/report/production_analytics/production_analytics.py b/erpnext/manufacturing/report/production_analytics/production_analytics.py index c02c1e6fcd3..dc2b9ad62f3 100644 --- a/erpnext/manufacturing/report/production_analytics/production_analytics.py +++ b/erpnext/manufacturing/report/production_analytics/production_analytics.py @@ -131,11 +131,11 @@ def get_chart_data(periodic_data, columns): pending.append(periodic_data.get("Pending").get(d)) completed.append(periodic_data.get("Completed").get(d)) - datasets.append({"name": "All Work Orders", "values": all_data}) - datasets.append({"name": "Not Started", "values": not_start}) - datasets.append({"name": "Overdue", "values": overdue}) - datasets.append({"name": "Pending", "values": pending}) - datasets.append({"name": "Completed", "values": completed}) + datasets.append({"name": _("All Work Orders"), "values": all_data}) + datasets.append({"name": _("Not Started"), "values": not_start}) + datasets.append({"name": _("Overdue"), "values": overdue}) + datasets.append({"name": _("Pending"), "values": pending}) + datasets.append({"name": _("Completed"), "values": completed}) chart = {"data": {"labels": labels, "datasets": datasets}} chart["type"] = "line" diff --git a/erpnext/manufacturing/report/production_plan_summary/production_plan_summary.py b/erpnext/manufacturing/report/production_plan_summary/production_plan_summary.py index 5bc9236c1d5..c62cab77d61 100644 --- a/erpnext/manufacturing/report/production_plan_summary/production_plan_summary.py +++ b/erpnext/manufacturing/report/production_plan_summary/production_plan_summary.py @@ -27,32 +27,51 @@ def get_data(filters): def get_production_plan_item_details(filters, data, order_details): - itemwise_indent = {} - production_plan_doc = frappe.get_cached_doc("Production Plan", filters.get("production_plan")) for row in production_plan_doc.po_items: - work_order = frappe.get_value( + work_orders = frappe.get_all( "Work Order", - {"production_plan_item": row.name, "bom_no": row.bom_no, "production_item": row.item_code}, - "name", + filters={ + "production_plan_item": row.name, + "bom_no": row.bom_no, + "production_item": row.item_code, + }, + pluck="name", ) - if row.item_code not in itemwise_indent: - itemwise_indent.setdefault(row.item_code, {}) + order_qty = row.planned_qty + total_produced_qty = 0.0 + pending_qty = 0.0 + for work_order in work_orders: + produced_qty = flt(order_details.get((work_order, row.item_code), {}).get("produced_qty", 0)) + pending_qty = flt(order_qty) - produced_qty + + total_produced_qty += produced_qty + + data.append( + { + "indent": 0, + "item_code": row.item_code, + "sales_order": row.get("sales_order"), + "item_name": frappe.get_cached_value("Item", row.item_code, "item_name"), + "qty": order_qty, + "document_type": "Work Order", + "document_name": work_order or "", + "bom_level": 0, + "produced_qty": produced_qty, + "pending_qty": pending_qty, + } + ) + + order_qty = pending_qty data.append( { - "indent": 0, "item_code": row.item_code, - "sales_order": row.get("sales_order"), - "item_name": frappe.get_cached_value("Item", row.item_code, "item_name"), + "indent": 0, "qty": row.planned_qty, - "document_type": "Work Order", - "document_name": work_order or "", - "bom_level": 0, - "produced_qty": order_details.get((work_order, row.item_code), {}).get("produced_qty", 0), - "pending_qty": flt(row.planned_qty) - - flt(order_details.get((work_order, row.item_code), {}).get("produced_qty", 0)), + "produced_qty": total_produced_qty, + "pending_qty": pending_qty, } ) diff --git a/erpnext/manufacturing/report/quality_inspection_summary/quality_inspection_summary.py b/erpnext/manufacturing/report/quality_inspection_summary/quality_inspection_summary.py index 38e05852ee8..7e0fcf14cc6 100644 --- a/erpnext/manufacturing/report/quality_inspection_summary/quality_inspection_summary.py +++ b/erpnext/manufacturing/report/quality_inspection_summary/quality_inspection_summary.py @@ -42,7 +42,7 @@ def get_data(filters): def get_chart_data(periodic_data, columns): - labels = ["Rejected", "Accepted"] + labels = [_("Rejected"), _("Accepted")] status_wise_data = {"Accepted": 0, "Rejected": 0} @@ -53,7 +53,7 @@ def get_chart_data(periodic_data, columns): datasets.append( { - "name": "Qty Wise Chart", + "name": _("Qty Wise Chart"), "values": [status_wise_data.get("Rejected"), status_wise_data.get("Accepted")], } ) diff --git a/erpnext/manufacturing/workspace/manufacturing/manufacturing.json b/erpnext/manufacturing/workspace/manufacturing/manufacturing.json index d2520d6b7eb..06b9f1b0759 100644 --- a/erpnext/manufacturing/workspace/manufacturing/manufacturing.json +++ b/erpnext/manufacturing/workspace/manufacturing/manufacturing.json @@ -1,4 +1,5 @@ { + "app": "erpnext", "charts": [], "content": "[{\"id\":\"csBCiDglCE\",\"type\":\"header\",\"data\":{\"text\":\"Your Shortcuts\",\"col\":12}},{\"id\":\"YHCQG3wAGv\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"BOM Creator\",\"col\":3}},{\"id\":\"xit0dg7KvY\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"BOM\",\"col\":3}},{\"id\":\"LRhGV9GAov\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Production Plan\",\"col\":3}},{\"id\":\"69KKosI6Hg\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Work Order\",\"col\":3}},{\"id\":\"PwndxuIpB3\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Job Card\",\"col\":3}},{\"id\":\"Ubj6zXcmIQ\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Plant Floor\",\"col\":3}},{\"id\":\"OtMcArFRa5\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"BOM Stock Report\",\"col\":3}},{\"id\":\"76yYsI5imF\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Production Planning Report\",\"col\":3}},{\"id\":\"PIQJYZOMnD\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Learn Manufacturing\",\"col\":3}},{\"id\":\"OaiDqTT03Y\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Forecasting\",\"col\":3}},{\"id\":\"bN_6tHS-Ct\",\"type\":\"spacer\",\"data\":{\"col\":12}},{\"id\":\"yVEFZMqVwd\",\"type\":\"header\",\"data\":{\"text\":\"Reports & Masters\",\"col\":12}},{\"id\":\"rwrmsTI58-\",\"type\":\"card\",\"data\":{\"card_name\":\"Production\",\"col\":4}},{\"id\":\"6dnsyX-siZ\",\"type\":\"card\",\"data\":{\"card_name\":\"Bill of Materials\",\"col\":4}},{\"id\":\"CIq-v5f5KC\",\"type\":\"card\",\"data\":{\"card_name\":\"Reports\",\"col\":4}},{\"id\":\"8RRiQeYr0G\",\"type\":\"card\",\"data\":{\"card_name\":\"Tools\",\"col\":4}},{\"id\":\"Pu8z7-82rT\",\"type\":\"card\",\"data\":{\"card_name\":\"Settings\",\"col\":4}}]", "creation": "2020-03-02 17:11:37.032604", @@ -124,11 +125,86 @@ "onboard": 0, "type": "Link" }, + { + "hidden": 0, + "is_query_report": 0, + "label": "Bill of Materials", + "link_count": 6, + "onboard": 0, + "type": "Card Break" + }, + { + "dependencies": "", + "hidden": 0, + "is_query_report": 0, + "label": "Item", + "link_count": 0, + "link_to": "Item", + "link_type": "DocType", + "onboard": 1, + "type": "Link" + }, + { + "dependencies": "Item", + "hidden": 0, + "is_query_report": 0, + "label": "Bill of Materials", + "link_count": 0, + "link_to": "BOM", + "link_type": "DocType", + "onboard": 1, + "type": "Link" + }, + { + "dependencies": "", + "hidden": 0, + "is_query_report": 0, + "label": "Workstation Type", + "link_count": 0, + "link_to": "Workstation Type", + "link_type": "DocType", + "onboard": 0, + "type": "Link" + }, + { + "dependencies": "", + "hidden": 0, + "is_query_report": 0, + "label": "Workstation", + "link_count": 0, + "link_to": "Workstation", + "link_type": "DocType", + "onboard": 0, + "type": "Link" + }, + { + "dependencies": "", + "hidden": 0, + "is_query_report": 0, + "label": "Operation", + "link_count": 0, + "link_to": "Operation", + "link_type": "DocType", + "onboard": 0, + "type": "Link" + }, + { + "dependencies": "Work Order", + "hidden": 0, + "is_query_report": 1, + "label": "Routing", + "link_count": 0, + "link_to": "Routing", + "link_type": "DocType", + "onboard": 0, + "type": "Link" + }, { "hidden": 0, "is_query_report": 0, "label": "Reports", "link_count": 10, + "link_type": "DocType", "onboard": 0, "type": "Card Break" }, @@ -233,90 +309,16 @@ }, { "hidden": 0, - "is_query_report": 0, + "is_query_report": 1, "label": "Work Order Consumed Materials", "link_count": 0, "link_to": "Work Order Consumed Materials", "link_type": "Report", "onboard": 0, "type": "Link" - }, - { - "hidden": 0, - "is_query_report": 0, - "label": "Bill of Materials", - "link_count": 6, - "onboard": 0, - "type": "Card Break" - }, - { - "dependencies": "", - "hidden": 0, - "is_query_report": 0, - "label": "Item", - "link_count": 0, - "link_to": "Item", - "link_type": "DocType", - "onboard": 1, - "type": "Link" - }, - { - "dependencies": "Item", - "hidden": 0, - "is_query_report": 0, - "label": "Bill of Materials", - "link_count": 0, - "link_to": "BOM", - "link_type": "DocType", - "onboard": 1, - "type": "Link" - }, - { - "dependencies": "", - "hidden": 0, - "is_query_report": 0, - "label": "Workstation Type", - "link_count": 0, - "link_to": "Workstation Type", - "link_type": "DocType", - "onboard": 0, - "type": "Link" - }, - { - "dependencies": "", - "hidden": 0, - "is_query_report": 0, - "label": "Workstation", - "link_count": 0, - "link_to": "Workstation", - "link_type": "DocType", - "onboard": 0, - "type": "Link" - }, - { - "dependencies": "", - "hidden": 0, - "is_query_report": 0, - "label": "Operation", - "link_count": 0, - "link_to": "Operation", - "link_type": "DocType", - "onboard": 0, - "type": "Link" - }, - { - "dependencies": "Work Order", - "hidden": 0, - "is_query_report": 1, - "label": "Routing", - "link_count": 0, - "link_to": "Routing", - "link_type": "DocType", - "onboard": 0, - "type": "Link" } ], - "modified": "2024-01-30 21:49:58.577218", + "modified": "2024-10-21 14:13:38.777556", "modified_by": "Administrator", "module": "Manufacturing", "name": "Manufacturing", @@ -398,5 +400,6 @@ "type": "Report" } ], - "title": "Manufacturing" + "title": "Manufacturing", + "type": "Workspace" } \ No newline at end of file diff --git a/erpnext/modules.txt b/erpnext/modules.txt index c53cdf467d2..b8b12e90fb0 100644 --- a/erpnext/modules.txt +++ b/erpnext/modules.txt @@ -18,3 +18,4 @@ Communication Telephony Bulk Transaction Subcontracting +EDI \ No newline at end of file diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 208c9e58d4f..a916478d4b3 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -314,7 +314,8 @@ erpnext.patches.v13_0.update_docs_link erpnext.patches.v15_0.update_asset_value_for_manual_depr_entries erpnext.patches.v15_0.update_gpa_and_ndb_for_assdeprsch erpnext.patches.v14_0.create_accounting_dimensions_for_closing_balance -erpnext.patches.v14_0.update_closing_balances #14-07-2023 +erpnext.patches.v14_0.set_period_start_end_date_in_pcv +erpnext.patches.v14_0.update_closing_balances #08-11-2024 execute:frappe.db.set_single_value("Accounts Settings", "merge_similar_account_heads", 0) erpnext.patches.v14_0.update_reference_type_in_journal_entry_accounts erpnext.patches.v14_0.update_subscription_details @@ -358,6 +359,7 @@ erpnext.patches.v15_0.allow_on_submit_dimensions_for_repostable_doctypes erpnext.patches.v14_0.update_flag_for_return_invoices #2024-03-22 erpnext.patches.v15_0.create_accounting_dimensions_in_payment_request erpnext.patches.v14_0.update_pos_return_ledger_entries #2024-08-16 +erpnext.patches.v15_0.create_advance_payment_ledger_records # below migration patch should always run last erpnext.patches.v14_0.migrate_gl_to_payment_ledger erpnext.stock.doctype.delivery_note.patches.drop_unused_return_against_index # 2023-12-20 @@ -371,3 +373,15 @@ erpnext.patches.v15_0.update_warehouse_field_in_asset_repair_consumed_item_docty erpnext.patches.v15_0.update_asset_repair_field_in_stock_entry erpnext.patches.v15_0.update_total_number_of_booked_depreciations erpnext.patches.v15_0.do_not_use_batchwise_valuation +erpnext.patches.v15_0.update_invoice_remarks +erpnext.patches.v14_0.update_reports_with_range +erpnext.patches.v15_0.drop_index_posting_datetime_from_sle +erpnext.patches.v15_0.add_disassembly_order_stock_entry_type #1 +erpnext.patches.v15_0.set_standard_stock_entry_type +erpnext.patches.v15_0.link_purchase_item_to_asset_doc +erpnext.patches.v14_0.update_currency_exchange_settings_for_frankfurter +erpnext.patches.v15_0.update_task_assignee_email_field_in_asset_maintenance_log +erpnext.patches.v15_0.update_sub_voucher_type_in_gl_entries +erpnext.patches.v14_0.update_stock_uom_in_work_order_item +erpnext.patches.v15_0.set_is_exchange_gain_loss_in_payment_entry_deductions +erpnext.patches.v15_0.enable_allow_existing_serial_no diff --git a/erpnext/patches/v13_0/fix_additional_cost_in_mfg_stock_entry.py b/erpnext/patches/v13_0/fix_additional_cost_in_mfg_stock_entry.py index e305b375c7f..5609b6bb895 100644 --- a/erpnext/patches/v13_0/fix_additional_cost_in_mfg_stock_entry.py +++ b/erpnext/patches/v13_0/fix_additional_cost_in_mfg_stock_entry.py @@ -15,7 +15,7 @@ def execute(): def find_broken_stock_entries() -> list[StockEntryCode]: period_closing_date = frappe.db.get_value( - "Period Closing Voucher", {"docstatus": 1}, "posting_date", order_by="posting_date desc" + "Period Closing Voucher", {"docstatus": 1}, "period_end_date", order_by="period_end_date desc" ) stock_entries_to_patch = frappe.db.sql( diff --git a/erpnext/patches/v13_0/item_reposting_for_incorrect_sl_and_gl.py b/erpnext/patches/v13_0/item_reposting_for_incorrect_sl_and_gl.py index c0d715063a8..2441075de30 100644 --- a/erpnext/patches/v13_0/item_reposting_for_incorrect_sl_and_gl.py +++ b/erpnext/patches/v13_0/item_reposting_for_incorrect_sl_and_gl.py @@ -38,7 +38,7 @@ def execute(): data = frappe.db.sql( """ SELECT - name, item_code, warehouse, voucher_type, voucher_no, posting_date, posting_time, company + name, item_code, warehouse, voucher_type, voucher_no, posting_date, posting_time, company, creation FROM `tabStock Ledger Entry` WHERE @@ -67,6 +67,7 @@ def execute(): "voucher_type": d.voucher_type, "voucher_no": d.voucher_no, "sle_id": d.name, + "creation": d.creation, }, allow_negative_stock=True, ) diff --git a/erpnext/patches/v14_0/set_period_start_end_date_in_pcv.py b/erpnext/patches/v14_0/set_period_start_end_date_in_pcv.py new file mode 100644 index 00000000000..8020a286f69 --- /dev/null +++ b/erpnext/patches/v14_0/set_period_start_end_date_in_pcv.py @@ -0,0 +1,17 @@ +# Copyright (c) 2023, Frappe Technologies Pvt. Ltd. and Contributors +# License: MIT. See LICENSE + + +import frappe + + +def execute(): + # nosemgrep + frappe.db.sql( + """ + UPDATE `tabPeriod Closing Voucher` + SET + period_start_date = (select year_start_date from `tabFiscal Year` where name = fiscal_year), + period_end_date = posting_date + """ + ) diff --git a/erpnext/patches/v14_0/single_to_multi_dunning.py b/erpnext/patches/v14_0/single_to_multi_dunning.py index 3b01871d437..98be0204518 100644 --- a/erpnext/patches/v14_0/single_to_multi_dunning.py +++ b/erpnext/patches/v14_0/single_to_multi_dunning.py @@ -66,7 +66,7 @@ def get_accounts_closing_date(): ) # always returns datetime.date period_closing_date = frappe.db.get_value( - "Period Closing Voucher", {"docstatus": 1}, "posting_date", order_by="posting_date desc" + "Period Closing Voucher", {"docstatus": 1}, "period_end_date", order_by="period_end_date desc" ) # Set most recent frozen/closing date as filter diff --git a/erpnext/patches/v14_0/update_closing_balances.py b/erpnext/patches/v14_0/update_closing_balances.py index cfc29c87fa1..31c7e85d875 100644 --- a/erpnext/patches/v14_0/update_closing_balances.py +++ b/erpnext/patches/v14_0/update_closing_balances.py @@ -7,67 +7,83 @@ import frappe from erpnext.accounts.doctype.account_closing_balance.account_closing_balance import ( make_closing_entries, ) +from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import ( + get_accounting_dimensions, +) from erpnext.accounts.utils import get_fiscal_year def execute(): frappe.db.truncate("Account Closing Balance") + gle_fields = get_gle_fields() + for company in frappe.get_all("Company", pluck="name"): i = 0 company_wise_order = {} - for pcv in frappe.db.get_all( - "Period Closing Voucher", - fields=["company", "posting_date", "name"], - filters={"docstatus": 1, "company": company}, - order_by="posting_date", - ): + for pcv in get_period_closing_vouchers(company): company_wise_order.setdefault(pcv.company, []) - if pcv.posting_date not in company_wise_order[pcv.company]: + if pcv.period_end_date not in company_wise_order[pcv.company]: pcv_doc = frappe.get_doc("Period Closing Voucher", pcv.name) - pcv_doc.year_start_date = get_fiscal_year( - pcv.posting_date, pcv.fiscal_year, company=pcv.company - )[1] + pcv_doc.pl_accounts_reverse_gle = get_pcv_gl_entries_for_pl_accounts(pcv, gle_fields) + pcv_doc.closing_account_gle = get_pcv_gl_entries_for_closing_accounts(pcv, gle_fields) + closing_entries = pcv_doc.get_account_closing_balances() + make_closing_entries(closing_entries, pcv.name, pcv.company, pcv.period_end_date) - # get gl entries against pcv - gl_entries = frappe.db.get_all( - "GL Entry", filters={"voucher_no": pcv.name, "is_cancelled": 0}, fields=["*"] - ) - for entry in gl_entries: - entry["is_period_closing_voucher_entry"] = 1 - entry["closing_date"] = pcv_doc.posting_date - entry["period_closing_voucher"] = pcv_doc.name - - closing_entries = [] - - if pcv.posting_date not in company_wise_order[pcv.company]: - # get all gl entries for the year - closing_entries = frappe.db.get_all( - "GL Entry", - filters={ - "is_cancelled": 0, - "voucher_no": ["!=", pcv.name], - "posting_date": ["between", [pcv_doc.year_start_date, pcv.posting_date]], - "is_opening": "No", - "company": company, - }, - fields=["*"], - ) - - if i == 0: - # add opening entries only for the first pcv - closing_entries += frappe.db.get_all( - "GL Entry", - filters={"is_cancelled": 0, "is_opening": "Yes", "company": company}, - fields=["*"], - ) - - for entry in closing_entries: - entry["closing_date"] = pcv_doc.posting_date - entry["period_closing_voucher"] = pcv_doc.name - - entries = gl_entries + closing_entries - - make_closing_entries(entries, pcv.name, pcv.company, pcv.posting_date) - company_wise_order[pcv.company].append(pcv.posting_date) + company_wise_order[pcv.company].append(pcv.period_end_date) i += 1 + + +def get_gle_fields(): + default_diemnsion_fields = ["cost_center", "finance_book", "project"] + accounting_dimension_fields = get_accounting_dimensions() + gle_fields = [ + "name", + "company", + "posting_date", + "account", + "account_currency", + "debit", + "credit", + "debit_in_account_currency", + "credit_in_account_currency", + *default_diemnsion_fields, + *accounting_dimension_fields, + ] + + return gle_fields + + +def get_period_closing_vouchers(company): + return frappe.db.get_all( + "Period Closing Voucher", + fields=["name", "closing_account_head", "period_start_date", "period_end_date", "company"], + filters={"docstatus": 1, "company": company}, + order_by="period_end_date", + ) + + +def get_pcv_gl_entries_for_pl_accounts(pcv, gle_fields): + return get_gl_entries(pcv, gle_fields, {"account": ["!=", pcv.closing_account_head]}) + + +def get_pcv_gl_entries_for_closing_accounts(pcv, gle_fields): + return get_gl_entries(pcv, gle_fields, {"account": pcv.closing_account_head}) + + +def get_gl_entries(pcv, gle_fields, accounts_filter=None): + filters = {"voucher_no": pcv.name, "is_cancelled": 0} + if accounts_filter: + filters.update(accounts_filter) + + gl_entries = frappe.db.get_all( + "GL Entry", + filters=filters, + fields=gle_fields, + ) + for entry in gl_entries: + entry["is_period_closing_voucher_entry"] = 1 + entry["closing_date"] = pcv.period_end_date + entry["period_closing_voucher"] = pcv.name + + return gl_entries diff --git a/erpnext/patches/v14_0/update_currency_exchange_settings_for_frankfurter.py b/erpnext/patches/v14_0/update_currency_exchange_settings_for_frankfurter.py new file mode 100644 index 00000000000..a67c5a26237 --- /dev/null +++ b/erpnext/patches/v14_0/update_currency_exchange_settings_for_frankfurter.py @@ -0,0 +1,11 @@ +import frappe + + +def execute(): + settings = frappe.get_doc("Currency Exchange Settings") + if settings.service_provider != "frankfurter.app": + return + + settings.set_parameters_and_result() + settings.flags.ignore_validate = True + settings.save() diff --git a/erpnext/patches/v14_0/update_reports_with_range.py b/erpnext/patches/v14_0/update_reports_with_range.py new file mode 100644 index 00000000000..014fba883fc --- /dev/null +++ b/erpnext/patches/v14_0/update_reports_with_range.py @@ -0,0 +1,39 @@ +import json + +import frappe + +REFERENCE_REPORTS = [ + "Accounts Receivable", + "Accounts Receivable Summary", + "Accounts Payable", + "Accounts Payable Summary", + "Stock Ageing", +] + + +def execute(): + for report in REFERENCE_REPORTS: + update_reference_reports(report) + + +def update_reference_reports(reference_report): + reports = frappe.get_all( + "Report", filters={"reference_report": reference_report}, fields={"json", "name"} + ) + + for report in reports: + update_report_json(report) + update_reference_reports(report.name) + + +def update_report_json(report): + report_json = json.loads(report.json) + report_filter = report_json.get("filters") + + if not report_filter: + return + + keys_to_pop = [key for key in report_filter if key.startswith("range")] + report_filter["range"] = ", ".join(str(report_filter.pop(key)) for key in keys_to_pop) + + frappe.db.set_value("Report", report.name, "json", json.dumps(report_json)) diff --git a/erpnext/patches/v14_0/update_stock_uom_in_work_order_item.py b/erpnext/patches/v14_0/update_stock_uom_in_work_order_item.py new file mode 100644 index 00000000000..d611065d8f1 --- /dev/null +++ b/erpnext/patches/v14_0/update_stock_uom_in_work_order_item.py @@ -0,0 +1,15 @@ +import frappe + + +def execute(): + frappe.db.sql( + """ + UPDATE + `tabWork Order Item`, `tabItem` + SET + `tabWork Order Item`.stock_uom = `tabItem`.stock_uom + WHERE + `tabWork Order Item`.item_code = `tabItem`.name + AND `tabWork Order Item`.docstatus = 1 + """ + ) diff --git a/erpnext/patches/v15_0/add_disassembly_order_stock_entry_type.py b/erpnext/patches/v15_0/add_disassembly_order_stock_entry_type.py new file mode 100644 index 00000000000..1f3413b172b --- /dev/null +++ b/erpnext/patches/v15_0/add_disassembly_order_stock_entry_type.py @@ -0,0 +1,13 @@ +import frappe + + +def execute(): + if not frappe.db.exists("Stock Entry Type", "Disassemble"): + frappe.get_doc( + { + "doctype": "Stock Entry Type", + "name": "Disassemble", + "purpose": "Disassemble", + "is_standard": 1, + } + ).insert(ignore_permissions=True) diff --git a/erpnext/patches/v15_0/create_advance_payment_ledger_records.py b/erpnext/patches/v15_0/create_advance_payment_ledger_records.py new file mode 100644 index 00000000000..8d247885cab --- /dev/null +++ b/erpnext/patches/v15_0/create_advance_payment_ledger_records.py @@ -0,0 +1,73 @@ +import frappe +from frappe import qb +from frappe.query_builder.custom import ConstantColumn + + +def get_advance_doctypes() -> list: + return frappe.get_hooks("advance_payment_doctypes") + + +def get_payments_with_so_po_reference() -> list: + advance_payment_entries = [] + advance_doctypes = get_advance_doctypes() + per = qb.DocType("Payment Entry Reference") + payments_with_reference = ( + qb.from_(per) + .select(per.parent) + .distinct() + .where(per.reference_doctype.isin(advance_doctypes) & per.docstatus.eq(1)) + .run() + ) + if payments_with_reference: + pe = qb.DocType("Payment Entry") + advance_payment_entries = ( + qb.from_(pe) + .select(ConstantColumn("Payment Entry").as_("doctype")) + .select(pe.name) + .where(pe.name.isin(payments_with_reference) & pe.docstatus.eq(1)) + .run(as_dict=True) + ) + + return advance_payment_entries + + +def get_journals_with_so_po_reference() -> list: + advance_journal_entries = [] + advance_doctypes = get_advance_doctypes() + jea = qb.DocType("Journal Entry Account") + journals_with_reference = ( + qb.from_(jea) + .select(jea.parent) + .distinct() + .where(jea.reference_type.isin(advance_doctypes) & jea.docstatus.eq(1)) + .run() + ) + if journals_with_reference: + je = qb.DocType("Journal Entry") + advance_journal_entries = ( + qb.from_(je) + .select(ConstantColumn("Journal Entry").as_("doctype")) + .select(je.name) + .where(je.name.isin(journals_with_reference) & je.docstatus.eq(1)) + .run(as_dict=True) + ) + + return advance_journal_entries + + +def make_advance_ledger_entries(vouchers: list): + for x in vouchers: + frappe.get_doc(x.doctype, x.name).make_advance_payment_ledger_entries() + + +def execute(): + """ + Description: + Create Advance Payment Ledger Entry for all Payments made against Sales / Purchase Orders + """ + frappe.db.truncate("Advance Payment Ledger Entry") + payment_entries = get_payments_with_so_po_reference() + make_advance_ledger_entries(payment_entries) + + journals = get_journals_with_so_po_reference() + make_advance_ledger_entries(journals) diff --git a/erpnext/patches/v15_0/drop_index_posting_datetime_from_sle.py b/erpnext/patches/v15_0/drop_index_posting_datetime_from_sle.py new file mode 100644 index 00000000000..40b0b2d6759 --- /dev/null +++ b/erpnext/patches/v15_0/drop_index_posting_datetime_from_sle.py @@ -0,0 +1,16 @@ +import click +import frappe + + +def execute(): + table = "tabStock Ledger Entry" + index = "posting_datetime_creation_index" + + if not frappe.db.has_index(table, index): + return + + try: + frappe.db.sql_ddl(f"ALTER TABLE `{table}` DROP INDEX `{index}`") + click.echo(f"✓ dropped {index} index from {table}") + except Exception: + frappe.log_error("Failed to drop index") diff --git a/erpnext/patches/v15_0/enable_allow_existing_serial_no.py b/erpnext/patches/v15_0/enable_allow_existing_serial_no.py new file mode 100644 index 00000000000..e13adc2b187 --- /dev/null +++ b/erpnext/patches/v15_0/enable_allow_existing_serial_no.py @@ -0,0 +1,6 @@ +import frappe + + +def execute(): + if frappe.get_all("Company", filters={"country": "India"}, limit=1): + frappe.db.set_single_value("Stock Settings", "allow_existing_serial_no", 1) diff --git a/erpnext/patches/v15_0/link_purchase_item_to_asset_doc.py b/erpnext/patches/v15_0/link_purchase_item_to_asset_doc.py new file mode 100644 index 00000000000..662858e52a4 --- /dev/null +++ b/erpnext/patches/v15_0/link_purchase_item_to_asset_doc.py @@ -0,0 +1,74 @@ +import frappe + + +def execute(): + if frappe.db.has_column("Asset", "purchase_invoice_item") and frappe.db.has_column( + "Asset", "purchase_receipt_item" + ): + # Get all assets with their related Purchase Invoice and Purchase Receipt + assets = frappe.get_all( + "Asset", + filters={"docstatus": 0}, + fields=[ + "name", + "item_code", + "purchase_invoice", + "purchase_receipt", + "gross_purchase_amount", + "asset_quantity", + "purchase_invoice_item", + "purchase_receipt_item", + ], + ) + + for asset in assets: + # Get Purchase Invoice Items + if asset.purchase_invoice and not asset.purchase_invoice_item: + purchase_invoice_item = get_linked_item( + "Purchase Invoice Item", + asset.purchase_invoice, + asset.item_code, + asset.gross_purchase_amount, + asset.asset_quantity, + ) + frappe.db.set_value("Asset", asset.name, "purchase_invoice_item", purchase_invoice_item) + + # Get Purchase Receipt Items + if asset.purchase_receipt and not asset.purchase_receipt_item: + purchase_receipt_item = get_linked_item( + "Purchase Receipt Item", + asset.purchase_receipt, + asset.item_code, + asset.gross_purchase_amount, + asset.asset_quantity, + ) + frappe.db.set_value("Asset", asset.name, "purchase_receipt_item", purchase_receipt_item) + + +def get_linked_item(doctype, parent, item_code, amount, quantity): + items = frappe.get_all( + doctype, + filters={ + "parenttype": doctype.replace(" Item", ""), + "parent": parent, + "item_code": item_code, + }, + fields=["name", "rate", "amount", "qty", "landed_cost_voucher_amount"], + ) + if len(items) == 1: + # If only one item exists, return it directly + return items[0].name + + for item in items: + landed_cost = item.get("landed_cost_voucher_amount", 0) + # Check if the asset is grouped + if quantity > 1: + if item.amount + landed_cost == amount and item.qty == quantity: + return item.name + elif item.qty == quantity: + return item.name + else: + if item.rate + (landed_cost / item.qty) == amount: + return item.name + + return items[0].name if items else None diff --git a/erpnext/patches/v15_0/set_is_exchange_gain_loss_in_payment_entry_deductions.py b/erpnext/patches/v15_0/set_is_exchange_gain_loss_in_payment_entry_deductions.py new file mode 100644 index 00000000000..9ffe272fd5e --- /dev/null +++ b/erpnext/patches/v15_0/set_is_exchange_gain_loss_in_payment_entry_deductions.py @@ -0,0 +1,22 @@ +import frappe + + +def execute(): + default_exchange_gain_loss_accounts = frappe.get_all( + "Company", + filters={"exchange_gain_loss_account": ["!=", ""]}, + pluck="exchange_gain_loss_account", + ) + + if not default_exchange_gain_loss_accounts: + return + + payment_entry = frappe.qb.DocType("Payment Entry") + payment_entry_deduction = frappe.qb.DocType("Payment Entry Deduction") + + frappe.qb.update(payment_entry_deduction).set(payment_entry_deduction.is_exchange_gain_loss, 1).join( + payment_entry, + ).on(payment_entry.name == payment_entry_deduction.parent).where( + (payment_entry.paid_to_account_currency != payment_entry.paid_from_account_currency) + & (payment_entry_deduction.account.isin(default_exchange_gain_loss_accounts)) + ).run() diff --git a/erpnext/patches/v15_0/set_standard_stock_entry_type.py b/erpnext/patches/v15_0/set_standard_stock_entry_type.py new file mode 100644 index 00000000000..4a721abae40 --- /dev/null +++ b/erpnext/patches/v15_0/set_standard_stock_entry_type.py @@ -0,0 +1,17 @@ +import frappe + + +def execute(): + for stock_entry_type in [ + "Material Issue", + "Material Receipt", + "Material Transfer", + "Material Transfer for Manufacture", + "Material Consumption for Manufacture", + "Manufacture", + "Repack", + "Send to Subcontractor", + "Disassemble", + ]: + if frappe.db.exists("Stock Entry Type", stock_entry_type): + frappe.db.set_value("Stock Entry Type", stock_entry_type, "is_standard", 1) diff --git a/erpnext/patches/v15_0/update_invoice_remarks.py b/erpnext/patches/v15_0/update_invoice_remarks.py new file mode 100644 index 00000000000..9146713815f --- /dev/null +++ b/erpnext/patches/v15_0/update_invoice_remarks.py @@ -0,0 +1,149 @@ +import frappe +from frappe import _ + + +def execute(): + update_sales_invoice_remarks() + update_purchase_invoice_remarks() + + +def update_sales_invoice_remarks(): + """ + Update remarks in Sales Invoice. + Some sites may have very large volume of sales invoices. + In such cases, updating documents one by one won't be successful, especially during site migration step. + Refer to the bug report: https://github.com/frappe/erpnext/issues/43634 + In this case, a bulk update must be done. + + Step 1: Update remarks in GL Entries + Step 2: Update remarks in Payment Ledger Entries + Step 3: Update remarks in Sales Invoice - Should be last step + """ + + ### Step 1: Update remarks in GL Entries + update_sales_invoice_gle_remarks() + + ### Step 2: Update remarks in Payment Ledger Entries + update_sales_invoice_ple_remarks() + + ### Step 3: Update remarks in Sales Invoice + update_query = """ + UPDATE `tabSales Invoice` + SET remarks = concat('Against Customer Order ', po_no) + WHERE po_no <> '' AND docstatus = %(docstatus)s and remarks = %(remarks)s + """ + + # Data for update query + values = {"remarks": "No Remarks", "docstatus": 1} + + # Execute query + frappe.db.sql(update_query, values=values, as_dict=0) + + +def update_purchase_invoice_remarks(): + """ + Update remarks in Purchase Invoice. + Some sites may have very large volume of purchase invoices. + In such cases, updating documents one by one wont be successful, especially during site migration step. + Refer to the bug report: https://github.com/frappe/erpnext/issues/43634 + In this case, a bulk update must be done. + + Step 1: Update remarks in GL Entries + Step 2: Update remarks in Payment Ledger Entries + Step 3: Update remarks in Purchase Invoice - Should be last step + """ + + ### Step 1: Update remarks in GL Entries + update_purchase_invoice_gle_remarks() + + ### Step 2: Update remarks in Payment Ledger Entries + update_purchase_invoice_ple_remarks() + + ### Step 3: Update remarks in Purchase Invoice + update_query = """ + UPDATE `tabPurchase Invoice` + SET remarks = concat('Against Supplier Invoice ', bill_no) + WHERE bill_no <> '' AND docstatus = %(docstatus)s and remarks = %(remarks)s + """ + + # Data for update query + values = {"remarks": "No Remarks", "docstatus": 1} + + # Execute query + frappe.db.sql(update_query, values=values, as_dict=0) + + +def update_sales_invoice_gle_remarks(): + ## Update query to update GL Entry - Updates all entries which are for Sales Invoice with No Remarks + update_query = """ + UPDATE + `tabGL Entry` as gle + INNER JOIN `tabSales Invoice` as si + ON gle.voucher_type = 'Sales Invoice' AND gle.voucher_no = si.name AND gle.remarks = %(remarks)s + SET + gle.remarks = concat('Against Customer Order ', si.po_no) + WHERE si.po_no <> '' AND si.docstatus = %(docstatus)s and si.remarks = %(remarks)s + """ + + # Data for update query + values = {"remarks": "No Remarks", "docstatus": 1} + + # Execute query + frappe.db.sql(update_query, values=values, as_dict=0) + + +def update_sales_invoice_ple_remarks(): + ## Update query to update Payment Ledger Entry - Updates all entries which are for Sales Invoice with No Remarks + update_query = """ + UPDATE + `tabPayment Ledger Entry` as ple + INNER JOIN `tabSales Invoice` as si + ON ple.voucher_type = 'Sales Invoice' AND ple.voucher_no = si.name AND ple.remarks = %(remarks)s + SET + ple.remarks = concat('Against Customer Order ', si.po_no) + WHERE si.po_no <> '' AND si.docstatus = %(docstatus)s and si.remarks = %(remarks)s + """ + + ### Data for update query + values = {"remarks": "No Remarks", "docstatus": 1} + + ### Execute query + frappe.db.sql(update_query, values=values, as_dict=0) + + +def update_purchase_invoice_gle_remarks(): + ### Query to update GL Entry - Updates all entries which are for Purchase Invoice with No Remarks + update_query = """ + UPDATE + `tabGL Entry` as gle + INNER JOIN `tabPurchase Invoice` as pi + ON gle.voucher_type = 'Purchase Invoice' AND gle.voucher_no = pi.name AND gle.remarks = %(remarks)s + SET + gle.remarks = concat('Against Supplier Invoice ', pi.bill_no) + WHERE pi.bill_no <> '' AND pi.docstatus = %(docstatus)s and pi.remarks = %(remarks)s + """ + + ### Data for update query + values = {"remarks": "No Remarks", "docstatus": 1} + + ### Execute query + frappe.db.sql(update_query, values=values, as_dict=0) + + +def update_purchase_invoice_ple_remarks(): + ### Query to update Payment Ledger Entry - Updates all entries which are for Purchase Invoice with No Remarks + update_query = """ + UPDATE + `tabPayment Ledger Entry` as ple + INNER JOIN `tabPurchase Invoice` as pi + ON ple.voucher_type = 'Purchase Invoice' AND ple.voucher_no = pi.name AND ple.remarks = %(remarks)s + SET + ple.remarks = concat('Against Supplier Invoice ', pi.bill_no) + WHERE pi.bill_no <> '' AND pi.docstatus = %(docstatus)s and pi.remarks = %(remarks)s + """ + + ### Data for update query + values = {"remarks": "No Remarks", "docstatus": 1} + + ### Execute query + frappe.db.sql(update_query, values=values, as_dict=0) diff --git a/erpnext/patches/v15_0/update_sub_voucher_type_in_gl_entries.py b/erpnext/patches/v15_0/update_sub_voucher_type_in_gl_entries.py new file mode 100644 index 00000000000..7160a6ba87d --- /dev/null +++ b/erpnext/patches/v15_0/update_sub_voucher_type_in_gl_entries.py @@ -0,0 +1,57 @@ +import frappe + + +def execute(): + update_purchase_invoices() + update_sales_invoices() + update_sales_debit_notes() + + +def update_purchase_invoices(): + invoices = frappe.get_all( + "Purchase Invoice", + filters={"docstatus": 1, "is_return": 0}, + pluck="name", + ) + + if not invoices: + return + + update_gl_entry(doctype="Purchase Invoice", invoices=invoices, value="Purchase Invoice") + + +def update_sales_invoices(): + invoices = frappe.get_all( + "Sales Invoice", + filters={"docstatus": 1, "is_return": 0, "is_debit_note": 0}, + pluck="name", + ) + if not invoices: + return + + update_gl_entry(doctype="Sales Invoice", invoices=invoices, value="Sales Invoice") + + +def update_sales_debit_notes(): + invoices = frappe.get_all( + "Sales Invoice", + filters={"docstatus": 1, "is_debit_note": 1}, + pluck="name", + ) + + if not invoices: + return + + update_gl_entry(doctype="Sales Invoice", invoices=invoices, value="Debit Note") + + +def update_gl_entry(doctype, invoices, value): + gl_entry = frappe.qb.DocType("GL Entry") + ( + frappe.qb.update(gl_entry) + .set("voucher_subtype", value) + .where(gl_entry.voucher_subtype.isnotnull()) + .where(gl_entry.voucher_no.isin(invoices)) + .where(gl_entry.voucher_type == doctype) + .run() + ) diff --git a/erpnext/patches/v15_0/update_task_assignee_email_field_in_asset_maintenance_log.py b/erpnext/patches/v15_0/update_task_assignee_email_field_in_asset_maintenance_log.py new file mode 100644 index 00000000000..a6eda9c2e17 --- /dev/null +++ b/erpnext/patches/v15_0/update_task_assignee_email_field_in_asset_maintenance_log.py @@ -0,0 +1,18 @@ +import frappe +from frappe.query_builder import DocType + + +def execute(): + if frappe.db.has_column("Asset Maintenance Log", "task_assignee_email"): + asset_maintenance_log = DocType("Asset Maintenance Log") + asset_maintenance_task = DocType("Asset Maintenance Task") + try: + ( + frappe.qb.update(asset_maintenance_log) + .set(asset_maintenance_log.task_assignee_email, asset_maintenance_task.assign_to) + .join(asset_maintenance_task) + .on(asset_maintenance_log.task == asset_maintenance_task.name) + .run() + ) + except Exception: + frappe.log_error("Failed to update Task Assignee Email Field.") diff --git a/erpnext/projects/doctype/project/project.js b/erpnext/projects/doctype/project/project.js index d03ab786cc1..643e3b21782 100644 --- a/erpnext/projects/doctype/project/project.js +++ b/erpnext/projects/doctype/project/project.js @@ -45,6 +45,7 @@ frappe.ui.form.on("Project", { frm.set_query("sales_order", function () { var filters = { project: ["in", frm.doc.__islocal ? [""] : [frm.doc.name, ""]], + company: frm.doc.company, }; if (frm.doc.customer) { diff --git a/erpnext/projects/doctype/project/project.py b/erpnext/projects/doctype/project/project.py index b09735e5644..f1512501e76 100644 --- a/erpnext/projects/doctype/project/project.py +++ b/erpnext/projects/doctype/project/project.py @@ -93,14 +93,14 @@ class Project(Document): def validate(self): if not self.is_new(): - self.copy_from_template() + self.copy_from_template() # nosemgrep self.send_welcome_email() self.update_costing() self.update_percent_complete() self.validate_from_to_dates("expected_start_date", "expected_end_date") self.validate_from_to_dates("actual_start_date", "actual_end_date") - def copy_from_template(self): + def copy_from_template(self): # nosemgrep """ Copy tasks from template """ @@ -205,7 +205,7 @@ class Project(Document): self.db_update() def after_insert(self): - self.copy_from_template() + self.copy_from_template() # nosemgrep if self.sales_order: frappe.db.set_value("Sales Order", self.sales_order, "project", self.name) @@ -213,6 +213,13 @@ class Project(Document): frappe.db.set_value("Sales Order", {"project": self.name}, "project", "") def update_percent_complete(self): + if self.status == "Completed": + if ( + len(frappe.get_all("Task", dict(project=self.name))) == 0 + ): # A project without tasks should be able to complete + self.percent_complete_method = "Manual" + self.percent_complete = 100 + if self.percent_complete_method == "Manual": if self.status == "Completed": self.percent_complete = 100 @@ -317,9 +324,13 @@ class Project(Document): self.total_sales_amount = total_sales_amount and total_sales_amount[0][0] or 0 def update_billed_amount(self): + # nosemgrep total_billed_amount = frappe.db.sql( - """select sum(base_net_total) - from `tabSales Invoice` where project = %s and docstatus=1""", + """select sum(base_net_amount) + from `tabSales Invoice Item` si_item, `tabSales Invoice` si + where si_item.parent = si.name + and if(si_item.project, si_item.project, si.project) = %s + and si.docstatus=1""", self.name, ) @@ -669,31 +680,8 @@ def update_project_sales_billing(): return # Else simply fallback to Daily - exists_query = "(SELECT 1 from `tab{doctype}` where docstatus = 1 and project = `tabProject`.name)" - project_map = {} - for project_details in frappe.db.sql( - """ - SELECT name, 1 as order_exists, null as invoice_exists from `tabProject` where - exists {order_exists} - union - SELECT name, null as order_exists, 1 as invoice_exists from `tabProject` where - exists {invoice_exists} - """.format( - order_exists=exists_query.format(doctype="Sales Order"), - invoice_exists=exists_query.format(doctype="Sales Invoice"), - ), - as_dict=True, - ): - project = project_map.setdefault( - project_details.name, frappe.get_doc("Project", project_details.name) - ) - if project_details.order_exists: - project.update_sales_amount() - if project_details.invoice_exists: - project.update_billed_amount() - - for project in project_map.values(): - project.save() + for project in frappe.get_all("Project", filters={"status": ["!=", "Cancelled"]}): + frappe.get_doc("Project", project.name).save() @frappe.whitelist() @@ -744,7 +732,6 @@ def get_users_email(doc): def calculate_total_purchase_cost(project: str | None = None): if project: pitem = qb.DocType("Purchase Invoice Item") - frappe.qb.DocType("Purchase Invoice Item") total_purchase_cost = ( qb.from_(pitem) .select(Sum(pitem.base_net_amount)) diff --git a/erpnext/projects/doctype/project/test_project.py b/erpnext/projects/doctype/project/test_project.py index 1b7460f7a2a..e5996c2da9d 100644 --- a/erpnext/projects/doctype/project/test_project.py +++ b/erpnext/projects/doctype/project/test_project.py @@ -199,6 +199,34 @@ class TestProject(FrappeTestCase): if not pt.is_group: self.assertIsNotNone(pt.parent_task) + def test_project_having_no_tasks_complete(self): + project_name = "Test Project - No Tasks Completion" + frappe.db.sql(""" delete from tabTask where project = %s """, project_name) + frappe.delete_doc("Project", project_name) + + project = frappe.get_doc( + { + "doctype": "Project", + "project_name": project_name, + "status": "Open", + "expected_start_date": nowdate(), + "company": "_Test Company", + } + ).insert() + + tasks = frappe.get_all( + "Task", + ["subject", "exp_end_date", "depends_on_tasks", "name", "parent_task"], + dict(project=project.name), + order_by="creation asc", + ) + + self.assertEqual(project.status, "Open") + self.assertEqual(len(tasks), 0) + project.status = "Completed" + project.save() + self.assertEqual(project.status, "Completed") + def get_project(name, template): project = frappe.get_doc( diff --git a/erpnext/projects/doctype/task/task.py b/erpnext/projects/doctype/task/task.py index c03c99b25d5..5eae55d71c5 100755 --- a/erpnext/projects/doctype/task/task.py +++ b/erpnext/projects/doctype/task/task.py @@ -153,14 +153,14 @@ class Task(NestedSet): def validate_parent_template_task(self): if self.parent_task: if not frappe.db.get_value("Task", self.parent_task, "is_template"): - parent_task_format = f"""{self.parent_task}""" + parent_task_format = f"""{self.parent_task}""" frappe.throw(_("Parent Task {0} is not a Template Task").format(parent_task_format)) def validate_depends_on_tasks(self): if self.depends_on: for task in self.depends_on: if not frappe.db.get_value("Task", task.task, "is_template"): - dependent_task_format = f"""{task.task}""" + dependent_task_format = f"""{task.task}""" frappe.throw(_("Dependent Task {0} is not a Template Task").format(dependent_task_format)) def validate_completed_on(self): diff --git a/erpnext/projects/doctype/timesheet/timesheet.js b/erpnext/projects/doctype/timesheet/timesheet.js index 9aba75b3ce9..168b891e98c 100644 --- a/erpnext/projects/doctype/timesheet/timesheet.js +++ b/erpnext/projects/doctype/timesheet/timesheet.js @@ -58,10 +58,10 @@ frappe.ui.form.on("Timesheet", { } if (frm.doc.docstatus < 1) { - let button = "Start Timer"; + let button = __("Start Timer"); $.each(frm.doc.time_logs || [], function (i, row) { if (row.from_time <= frappe.datetime.now_datetime() && !row.completed) { - button = "Resume Timer"; + button = __("Resume Timer"); } }); diff --git a/erpnext/projects/doctype/timesheet/timesheet.py b/erpnext/projects/doctype/timesheet/timesheet.py index fb15b507efb..7ab661c8822 100644 --- a/erpnext/projects/doctype/timesheet/timesheet.py +++ b/erpnext/projects/doctype/timesheet/timesheet.py @@ -22,6 +22,46 @@ class OverWorkLoggedError(frappe.ValidationError): class Timesheet(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.projects.doctype.timesheet_detail.timesheet_detail import TimesheetDetail + + amended_from: DF.Link | None + base_total_billable_amount: DF.Currency + base_total_billed_amount: DF.Currency + base_total_costing_amount: DF.Currency + company: DF.Link | None + currency: DF.Link | None + customer: DF.Link | None + department: DF.Link | None + employee: DF.Link | None + employee_name: DF.Data | None + end_date: DF.Date | None + exchange_rate: DF.Float + naming_series: DF.Literal["TS-.YYYY.-"] + note: DF.TextEditor | None + parent_project: DF.Link | None + per_billed: DF.Percent + sales_invoice: DF.Link | None + start_date: DF.Date | None + status: DF.Literal["Draft", "Submitted", "Billed", "Payslip", "Completed", "Cancelled"] + time_logs: DF.Table[TimesheetDetail] + title: DF.Data | None + total_billable_amount: DF.Currency + total_billable_hours: DF.Float + total_billed_amount: DF.Currency + total_billed_hours: DF.Float + total_costing_amount: DF.Currency + total_hours: DF.Float + user: DF.Link | None + # end: auto-generated types + def validate(self): self.set_status() self.validate_dates() @@ -129,10 +169,14 @@ class Timesheet(Document): task.save() tasks.append(data.task) - elif data.project and data.project not in projects: - frappe.get_doc("Project", data.project).update_project() + if data.project and data.project not in projects: projects.append(data.project) + for project in projects: + project_doc = frappe.get_doc("Project", project) + project_doc.update_project() + project_doc.save() + def validate_dates(self): for data in self.time_logs: if data.from_time and data.to_time and time_diff_in_hours(data.to_time, data.from_time) < 0: diff --git a/erpnext/projects/report/delayed_tasks_summary/delayed_tasks_summary.py b/erpnext/projects/report/delayed_tasks_summary/delayed_tasks_summary.py index 766e40e319c..dc3da259662 100644 --- a/erpnext/projects/report/delayed_tasks_summary/delayed_tasks_summary.py +++ b/erpnext/projects/report/delayed_tasks_summary/delayed_tasks_summary.py @@ -77,7 +77,7 @@ def get_chart_data(data): charts = { "data": { "labels": [_("On Track"), _("Delayed")], - "datasets": [{"name": "Delayed", "values": [on_track, delay]}], + "datasets": [{"name": _("Delayed"), "values": [on_track, delay]}], }, "type": "percentage", "colors": ["#84D5BA", "#CB4B5F"], diff --git a/erpnext/projects/report/project_summary/project_summary.py b/erpnext/projects/report/project_summary/project_summary.py index 7a35fd236a0..261517f02c6 100644 --- a/erpnext/projects/report/project_summary/project_summary.py +++ b/erpnext/projects/report/project_summary/project_summary.py @@ -15,6 +15,7 @@ def execute(filters=None): filters=filters, fields=[ "name", + "project_name", "status", "percent_complete", "expected_start_date", @@ -48,6 +49,11 @@ def get_columns(): "options": "Project", "width": 200, }, + { + "fieldname": "project_name", + "label": _("Project Name"), + "width": 200, + }, { "fieldname": "project_type", "label": _("Type"), @@ -82,7 +88,7 @@ def get_chart_data(data): overdue = [] for project in data: - labels.append(project.name) + labels.append(project.project_name) total.append(project.total_tasks) completed.append(project.completed_tasks) overdue.append(project.overdue_tasks) diff --git a/erpnext/public/images/erpnext-logo-blue.png b/erpnext/public/images/erpnext-logo-blue.png new file mode 100644 index 0000000000000000000000000000000000000000..0134b3f0627c5bc95aee1682f7979f9590751b4e GIT binary patch literal 4235 zcmds5X;f3!7Cs50f>0}zp$e$27MUc15RF0{7=$nd1B5|>BA^i&gvcO}I8Z<)6&lb8 zC}T*%Ok^f;K-4f<3?LW~kXV8cQw&I$Ug%q^|K5+jAMIQ3$60sXefC}F+xy#hf9ISe zCkJaq`K|H*07aV<7R~@bxNBqMda0$P;q<)pAs2GOJq!SS)Y^a)nUPDSMo5^m^)XQ1 zr75B{wM%d>6?~L%L4H24jYT3m`KPpuk(_ZUo>0vu~xS9s%57AWw}c()pk4k zYSb6xVQ!>Y*?~x~S$Wl162aQozeB zGStK zj_lvbn=%L38wLE(0sZfZ%G=!%s-E{5(j2F925xSq>`uILdaEqfbXjLE`D-EKrb&$! z+5puQ4Bt{V9;>XwezoUnY_$XG8C{dRg7Ij--dhs}!CJaBpBs~$<&HPrLmRZ)PDKXl z%3_WE&ez*j=tX}bF!Obb0p+yic;i;I0jIfc47E>o0JghaJCx``j?X$oYf;>)1s7_q z1C$GvX$^aWF?rnWCf$n;N1*SSuD$W;bnU7_vLUToP<`rs7^($$6?om8eQf0YvC#{? z%!t#-;Ro*oFgrc-bfgLD397bq^^yhie&U;(6$N#rW*~*eQ}B%-PhcP$YqL5=hl``e|@OIbut`3dqBNOr1G zZLHb`F%L^xuo6GmTX%M`k68jboX&UjCm-lSu&7$$s}tVqK*#Y0i?FWKIog7?ukn}RHHEUDXo;e z8+TOJC+gF4PtjrjbEX+IUnLubuw>4~ z-^oNytkcwtgAJ(EooOrKy4~I-Es2&GR%*4`cYu*LUVI~>Iw;aS7IP(nqN6Nu0BnKH z&<&!*m)0^=H@yxpigW5!a8}nQ^9K*@dl_T{7>^KhMh;&0VixK&tPScy!rH$FeU^0h z^(*y=6ghkI(ns%}D3VNi&y%lm8jdO7)0a}Ibr}l!I1bI4%7!xOtfir*7=8jE5llvn zK7Y-?3!|lgamssT($%;D;+D!!o7j?}BwQ+y!1;~Cx@-^i=?x#7J3u*>VqQ92{Za;O z^Y5_VX(grT{yKK?*73rk*FSMR_lfr^gUUOC*V_)nIGYqfD<`e)yCyi&iZQ^Hm)I-l z%%JJ0fM~01*Wg@?eJSWMeo`B~T!^=oB_;oCNALf`v;N$R+QG(A_>3$FDXta$Y<6{n zHCKxTU;~O*pg4GGoH}6d*nVpMF_%hK&eUIqvI&pIYoddDHnh=V& z?cEwGVoD7>51r6|-`5b)1OX}KVO2Q+Xy%tqV7%c?*K9k+o(5oP(LIHd=Hb>Q2!Or0 ze3*`#uTkS7H|YYq5ASSR%X&Yy0Px(ct!cS#*_S3<4`4|s4(pdPIf%~>V)x^oCAbhf z74TCHk9S1J7DM!0`*1v5rpPtWT_Q`;na(V6t>*L)Rdw<2{@w5&f%n%^6e!#AIC;ccW5tdAq?Rb3eGu)p_tob8$TuWH zz=GO8mgBz`#D7%?YcvilHt|LC5aX~f?Q1ORud%qBnoiV&85_nK()4pDaDRJw{q@k_ z%KPXWveLiuH$T2}e)YS`kbHSx32*z4-b>cN>-7IOi+^V85mcQsj+@tF zjD4N|`CjoSy#Lg%)~fKp3d&-!gcOfh$s^sRjXfxr0oe}PL7prB!}tp=n3{kcuH|wu zx49Mu#6( z@hj-EF&H3;axR=Rq-jc}0(QI4{W!fJ7hbIdQiNZ26^$*O!h6dCSR*RI(X&4m00lHo z<3xA9#Hv|}EW9jP<~(8aX@EGwo)94e)cN%Xb0zSPte(ctBAXaxzz*SZRfhYDaNDJd z=M_u%wnd$5&3)+k7{cBd*MLZTR339uyHy^%k9KKJTo%0gHrj;7tRX?(TZ!L?-J)F` zSz@d_T2Q1P{@VOA{G6Q+a1pC|z@OuHI9){FP$;hHz|f}@k*0`JSH{nT?%iAFr7U=2zLypY?LPIN`#V%;G@;SBWKYD=A~(kS#JRwu_wV)+iPxm+v=wgPT=W{ zY{9lDy(bhq^U}GN*QeG?Hw%p7;R$28;&lA#R~nBDu$B`}{O{V)-4t_L{5V}Ytt~R- za!%Y)=H_d>o35uQ0=;pYFbx7y$)1@1tKX_Cad_z@QXXKvaVAGw)L#Dn6StLEu4S?C z6w1DYxQQD(+Hqv1a4^D&buJgF0I*uSsS#&b_g=naE@a?GD4iov8h`UY?c9}nn(Ufp)bRgJ}2 z#Lh`Xaynkb7{0i2Jw}s!9indSKC{fK&xn`gB}dYI8TwsbJa z5apCSk&Wp-L=~ELcRzh2&)$JD&B?8cK~IMDoYa1C7g~!Y zr>xID^W~U_DLzsK39mp!r=I^=oF<5BS&pA?R1SPruA}N>)m8l3t#fJ=;ZWHB_CD3S zFFjB$P(_HyQ1>}AJ(FZbSlWxQw_E-7a9`xsmX~}h!Y!r24F78v3EFR~DZPg}-Rhcz z^cni3>VUqVfI+bimgx7Vtqe2==d~gQ!`mtS76hf1np8+%7S`dzDul`$3P%<1^_1Qn O02@mOi}GVW*Zu`KlJAZH literal 0 HcmV?d00001 diff --git a/erpnext/public/js/bank_reconciliation_tool/dialog_manager.js b/erpnext/public/js/bank_reconciliation_tool/dialog_manager.js index 6ff38f91082..bab25b6eca2 100644 --- a/erpnext/public/js/bank_reconciliation_tool/dialog_manager.js +++ b/erpnext/public/js/bank_reconciliation_tool/dialog_manager.js @@ -374,6 +374,14 @@ erpnext.accounts.bank_reconciliation.DialogManager = class DialogManager { label: "Cost Center", options: "Cost Center", depends_on: "eval:doc.action=='Create Voucher' && doc.document_type=='Payment Entry'", + get_query: () => { + return { + filters: { + is_group: 0, + company: this.company, + }, + }; + }, }, { fieldtype: "Section Break", diff --git a/erpnext/public/js/bom_configurator/bom_configurator.bundle.js b/erpnext/public/js/bom_configurator/bom_configurator.bundle.js index 5061be9d20a..21aa70fe7ae 100644 --- a/erpnext/public/js/bom_configurator/bom_configurator.bundle.js +++ b/erpnext/public/js/bom_configurator/bom_configurator.bundle.js @@ -25,6 +25,9 @@ class BOMConfigurator { }; frappe.views.trees["BOM Configurator"] = new frappe.views.TreeView(options); + let node = frappe.views.trees["BOM Configurator"].tree.root_node; + frappe.views.trees["BOM Configurator"].tree.show_toolbar(node); + frappe.views.trees["BOM Configurator"].tree.load_children(node, true); this.tree_view = frappe.views.trees["BOM Configurator"]; } @@ -137,7 +140,7 @@ class BOMConfigurator { btnClass: "hidden-xs", }, { - label: __("Expand All"), + label: __("Collapse All"), click: function (node) { let view = frappe.views.trees["BOM Configurator"]; @@ -283,6 +286,13 @@ class BOMConfigurator { fieldtype: "Float", reqd: 1, read_only: read_only, + change() { + this.layout.fields_dict.items.grid.data.forEach((row) => { + row.qty = flt(this.value); + }); + + this.layout.fields_dict.items.grid.refresh(); + }, }, { fieldtype: "Section Break" }, { diff --git a/erpnext/public/js/controllers/accounts.js b/erpnext/public/js/controllers/accounts.js index c39fb524264..c7b08f1dc15 100644 --- a/erpnext/public/js/controllers/accounts.js +++ b/erpnext/public/js/controllers/accounts.js @@ -160,7 +160,7 @@ erpnext.accounts.taxes = { let tax = frappe.get_doc(cdt, cdn); try { me.validate_taxes_and_charges(cdt, cdn); - me.validate_inclusive_tax(tax); + me.validate_inclusive_tax(tax, frm); } catch(e) { tax.included_in_print_rate = 0; refresh_field("included_in_print_rate", tax.name, tax.parentfield); @@ -170,7 +170,8 @@ erpnext.accounts.taxes = { }); }, - validate_inclusive_tax: function(tax) { + validate_inclusive_tax: function(tax, frm) { + this.frm = this.frm || frm; let actual_type_error = function() { var msg = __("Actual type tax cannot be included in Item rate in row {0}", [tax.idx]) frappe.throw(msg); @@ -186,12 +187,12 @@ erpnext.accounts.taxes = { if(tax.charge_type == "Actual") { // inclusive tax cannot be of type Actual actual_type_error(); - } else if(tax.charge_type == "On Previous Row Amount" && + } else if(tax.charge_type == "On Previous Row Amount" && this.frm && !cint(this.frm.doc["taxes"][tax.row_id - 1].included_in_print_rate) ) { // referred row should also be an inclusive tax on_previous_row_error(tax.row_id); - } else if(tax.charge_type == "On Previous Row Total") { + } else if(tax.charge_type == "On Previous Row Total" && this.frm) { var taxes_not_included = $.map(this.frm.doc["taxes"].slice(0, tax.row_id), function(t) { return cint(t.included_in_print_rate) ? null : t; }); if(taxes_not_included.length > 0) { diff --git a/erpnext/public/js/controllers/buying.js b/erpnext/public/js/controllers/buying.js index b5a8b757706..202efe157f0 100644 --- a/erpnext/public/js/controllers/buying.js +++ b/erpnext/public/js/controllers/buying.js @@ -342,12 +342,15 @@ erpnext.buying = { add_serial_batch_bundle(doc, cdt, cdn) { let item = locals[cdt][cdn]; let me = this; + let fields = ["has_batch_no", "has_serial_no"]; - frappe.db.get_value("Item", item.item_code, ["has_batch_no", "has_serial_no"]) + frappe.db.get_value("Item", item.item_code, fields) .then((r) => { if (r.message && (r.message.has_batch_no || r.message.has_serial_no)) { - item.has_serial_no = r.message.has_serial_no; - item.has_batch_no = r.message.has_batch_no; + fields.forEach((field) => { + item[field] = r.message[field]; + }); + item.type_of_transaction = item.qty > 0 ? "Inward" : "Outward"; item.is_rejected = false; @@ -380,13 +383,16 @@ erpnext.buying = { add_serial_batch_for_rejected_qty(doc, cdt, cdn) { let item = locals[cdt][cdn]; let me = this; + let fields = ["has_batch_no", "has_serial_no"]; - frappe.db.get_value("Item", item.item_code, ["has_batch_no", "has_serial_no"]) + frappe.db.get_value("Item", item.item_code, fields) .then((r) => { if (r.message && (r.message.has_batch_no || r.message.has_serial_no)) { - item.has_serial_no = r.message.has_serial_no; - item.has_batch_no = r.message.has_batch_no; - item.type_of_transaction = item.rejected_qty > 0 ? "Inward" : "Outward"; + fields.forEach((field) => { + item[field] = r.message[field]; + }); + + item.type_of_transaction = !doc.is_return > 0 ? "Inward" : "Outward"; item.is_rejected = true; new erpnext.SerialBatchPackageSelector( @@ -398,7 +404,7 @@ erpnext.buying = { } let update_values = { - "serial_and_batch_bundle": r.name, + "rejected_serial_and_batch_bundle": r.name, "use_serial_batch_fields": 0, "rejected_qty": qty / flt(item.conversion_factor || 1, precision("conversion_factor", item)) } diff --git a/erpnext/public/js/controllers/taxes_and_totals.js b/erpnext/public/js/controllers/taxes_and_totals.js index adf05ffb154..ee78e493db6 100644 --- a/erpnext/public/js/controllers/taxes_and_totals.js +++ b/erpnext/public/js/controllers/taxes_and_totals.js @@ -103,7 +103,7 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments { this.determine_exclusive_rate(); this.calculate_net_total(); this.calculate_taxes(); - this.manipulate_grand_total_for_inclusive_tax(); + this.adjust_grand_total_for_inclusive_tax(); this.calculate_totals(); this._cleanup(); } @@ -128,7 +128,7 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments { calculate_item_values() { var me = this; if (!this.discount_amount_applied) { - for (const item of this.frm._items || []) { + for (const item of this.frm.doc.items || []) { frappe.model.round_floats_in(item); item.net_rate = item.rate; item.qty = item.qty === undefined ? (me.frm.doc.is_return ? -1 : 1) : item.qty; @@ -185,7 +185,7 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments { if (!this.discount_amount_applied) { erpnext.accounts.taxes.validate_taxes_and_charges(tax.doctype, tax.name); - erpnext.accounts.taxes.validate_inclusive_tax(tax); + erpnext.accounts.taxes.validate_inclusive_tax(tax, this.frm); } frappe.model.round_floats_in(tax); }); @@ -227,7 +227,7 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments { }); if(has_inclusive_tax==false) return; - $.each(me.frm._items || [], function(n, item) { + $.each(this.frm.doc.items || [], function(n, item) { var item_tax_map = me._load_item_tax_rate(item.item_tax_rate); var cumulated_tax_fraction = 0.0; var total_inclusive_tax_amount_per_qty = 0; @@ -250,7 +250,7 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments { if(!me.discount_amount_applied && item.qty && (total_inclusive_tax_amount_per_qty || cumulated_tax_fraction)) { var amount = flt(item.amount) - total_inclusive_tax_amount_per_qty; - item.net_amount = flt(amount / (1 + cumulated_tax_fraction)); + item.net_amount = flt(amount / (1 + cumulated_tax_fraction), precision("net_amount", item)); item.net_rate = item.qty ? flt(item.net_amount / item.qty, precision("net_rate", item)) : 0; me.set_in_company_currency(item, ["net_rate", "net_amount"]); @@ -305,6 +305,8 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments { me.frm.doc.net_total += item.net_amount; me.frm.doc.base_net_total += item.base_net_amount; }); + + frappe.model.round_floats_in(this.frm.doc, ["total", "base_total", "net_total", "base_net_total"]); } calculate_shipping_charges() { @@ -523,7 +525,15 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments { } } + /** + * @deprecated Use adjust_grand_total_for_inclusive_tax instead. + */ manipulate_grand_total_for_inclusive_tax() { + // for backward compatablility - if in case used by an external application + this.adjust_grand_total_for_inclusive_tax() + } + + adjust_grand_total_for_inclusive_tax() { var me = this; // if fully inclusive taxes and diff if (this.frm.doc["taxes"] && this.frm.doc["taxes"].length) { @@ -550,7 +560,9 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments { diff = flt(diff, precision("rounding_adjustment")); if ( diff && Math.abs(diff) <= (5.0 / Math.pow(10, precision("tax_amount", last_tax))) ) { - me.frm.doc.rounding_adjustment = diff; + me.frm.doc.grand_total_diff = diff; + } else { + me.frm.doc.grand_total_diff = 0; } } } @@ -561,7 +573,7 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments { var me = this; var tax_count = this.frm.doc["taxes"] ? this.frm.doc["taxes"].length : 0; this.frm.doc.grand_total = flt(tax_count - ? this.frm.doc["taxes"][tax_count - 1].total + flt(this.frm.doc.rounding_adjustment) + ? this.frm.doc["taxes"][tax_count - 1].total + flt(this.frm.doc.grand_total_diff) : this.frm.doc.net_total); if(["Quotation", "Sales Order", "Delivery Note", "Sales Invoice", "POS Invoice"].includes(this.frm.doc.doctype)) { @@ -621,7 +633,7 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments { if(frappe.meta.get_docfield(this.frm.doc.doctype, "rounded_total", this.frm.doc.name)) { this.frm.doc.rounded_total = round_based_on_smallest_currency_fraction(this.frm.doc.grand_total, this.frm.doc.currency, precision("rounded_total")); - this.frm.doc.rounding_adjustment += flt(this.frm.doc.rounded_total - this.frm.doc.grand_total, + this.frm.doc.rounding_adjustment = flt(this.frm.doc.rounded_total - this.frm.doc.grand_total, precision("rounding_adjustment")); this.set_in_company_currency(this.frm.doc, ["rounding_adjustment", "rounded_total"]); @@ -630,7 +642,7 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments { _cleanup() { this.frm.doc.base_in_words = this.frm.doc.in_words = ""; - let items = this.frm._items; + let items = this.frm.doc.items; if(items && items.length) { if(!frappe.meta.get_docfield(items[0].doctype, "item_tax_amount", this.frm.doctype)) { @@ -689,8 +701,7 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments { if (total_for_discount_amount) { $.each(this.frm._items || [], function(i, item) { distributed_amount = flt(me.frm.doc.discount_amount) * item.net_amount / total_for_discount_amount; - item.net_amount = flt(item.net_amount - distributed_amount, - precision("base_amount", item)); + item.net_amount = flt(item.net_amount - distributed_amount, precision("net_amount", item)); net_total += item.net_amount; // discount amount rounding loss adjustment if no taxes @@ -833,13 +844,13 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments { ); } - if(!this.frm.doc.is_return){ - this.frm.doc.payments.find(payment => { - if (payment.default) { - payment.amount = total_amount_to_pay; - } - }); - } + this.frm.doc.payments.find(payment => { + if (payment.default) { + payment.amount = total_amount_to_pay; + } else { + payment.amount = 0 + } + }); this.frm.refresh_fields(); } diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 4696c7f3b4d..18cddd7f7a1 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -289,28 +289,6 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe } ]); } - - if(this.frm.fields_dict['items'].grid.get_field('serial_and_batch_bundle')) { - let sbb_field = this.frm.get_docfield('items', 'serial_and_batch_bundle'); - if (sbb_field) { - sbb_field.get_route_options_for_new_doc = (row) => { - return { - 'item_code': row.doc.item_code, - } - }; - } - } - - if(this.frm.fields_dict['items'].grid.get_field('batch_no')) { - let batch_no_field = this.frm.get_docfield('items', 'batch_no'); - if (batch_no_field) { - batch_no_field.get_route_options_for_new_doc = function(row) { - return { - 'item': row.doc.item_code - } - }; - } - } } is_return() { @@ -375,7 +353,8 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe recipient_id: me.frm.doc.contact_email, payment_request_type: payment_request_type, party_type: payment_request_type == 'Outward' ? "Supplier" : "Customer", - party: payment_request_type == 'Outward' ? me.frm.doc.supplier : me.frm.doc.customer + party: payment_request_type == 'Outward' ? me.frm.doc.supplier : me.frm.doc.customer, + party_name:payment_request_type == 'Outward' ? me.frm.doc.supplier_name : me.frm.doc.customer_name }, callback: function(r) { if(!r.exc){ @@ -408,6 +387,35 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe this.setup_quality_inspection(); this.validate_has_items(); erpnext.utils.view_serial_batch_nos(this.frm); + this.set_route_options_for_new_doc(); + } + + set_route_options_for_new_doc() { + // While creating the batch from the link field, copy item from line item to batch form + + if(this.frm.fields_dict['items'].grid.get_field('batch_no')) { + let batch_no_field = this.frm.get_docfield('items', 'batch_no'); + if (batch_no_field) { + batch_no_field.get_route_options_for_new_doc = function(row) { + return { + 'item': row.doc.item_code + } + }; + } + } + + // While creating the SABB from the link field, copy item, doctype from line item to SABB form + if(this.frm.fields_dict['items'].grid.get_field('serial_and_batch_bundle')) { + let sbb_field = this.frm.get_docfield('items', 'serial_and_batch_bundle'); + if (sbb_field) { + sbb_field.get_route_options_for_new_doc = (row) => { + return { + "item_code": row.doc.item_code, + "voucher_type": this.frm.doc.doctype, + } + }; + } + } } scan_barcode() { @@ -478,7 +486,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe setup_sms() { var me = this; let blacklist = ['Purchase Invoice', 'BOM']; - if(this.frm.doc.docstatus===1 && !["Lost", "Stopped", "Closed"].includes(this.frm.doc.status) + if(frappe.boot.sms_gateway_enabled && this.frm.doc.docstatus===1 && !["Lost", "Stopped", "Closed"].includes(this.frm.doc.status) && !blacklist.includes(this.frm.doctype)) { this.frm.page.add_menu_item(__('Send SMS'), function() { me.send_sms(); }); } @@ -573,6 +581,15 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe callback: function(r) { if(!r.exc) { frappe.run_serially([ + () => { + if (item.docstatus === 0 + && frappe.meta.has_field(item.doctype, "use_serial_batch_fields") + && !item.use_serial_batch_fields + && cint(frappe.user_defaults?.use_serial_batch_fields) === 1 + ) { + item["use_serial_batch_fields"] = 1; + } + }, () => { var d = locals[cdt][cdn]; me.add_taxes_from_item_tax_template(d.item_tax_rate); @@ -939,9 +956,14 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe if (frappe.meta.get_docfield(this.frm.doctype, "shipping_address") && ['Purchase Order', 'Purchase Receipt', 'Purchase Invoice'].includes(this.frm.doctype)) { - erpnext.utils.get_shipping_address(this.frm, function() { - set_party_account(set_pricing); - }); + let is_drop_ship = me.frm.doc.items.some(item => item.delivered_by_supplier); + + if (!is_drop_ship) { + console.log('get_shipping_address'); + erpnext.utils.get_shipping_address(this.frm, function() { + set_party_account(set_pricing); + }); + } } else { set_party_account(set_pricing); @@ -1102,7 +1124,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe apply_discount_on_item(doc, cdt, cdn, field) { var item = frappe.get_doc(cdt, cdn); - if(!item.price_list_rate) { + if(item && !item.price_list_rate) { item[field] = 0.0; } else { this.price_list_rate(doc, cdt, cdn); @@ -1215,8 +1237,8 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe }, callback: function(r) { if(!r.exc) { - me.apply_price_list(item, true) frappe.model.set_value(cdt, cdn, 'conversion_factor', r.message.conversion_factor); + me.apply_price_list(item, true); } } }); @@ -1258,6 +1280,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe "Purchase Receipt": ["purchase_order_item", "purchase_invoice_item", "purchase_receipt_item"], "Purchase Invoice": ["purchase_order_item", "pr_detail", "po_detail"], "Sales Order": ["prevdoc_docname", "quotation_item"], + "Purchase Order": ["supplier_quotation_item"], }; const mappped_fields = mapped_item_field_map[this.frm.doc.doctype] || []; @@ -1267,6 +1290,10 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe .filter(Boolean).length > 0; } else if (this.frm.doc?.items) { let first_row = this.frm.doc.items[0]; + if (!first_row) { + return false + }; + let mapped_rows = mappped_fields.filter(d => first_row[d]) return mapped_rows?.length > 0; @@ -1421,12 +1448,13 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe let show = cint(this.frm.doc.discount_amount) || ((this.frm.doc.taxes || []).filter(function(d) {return d.included_in_print_rate===1}).length); - if(frappe.meta.get_docfield(cur_frm.doctype, "net_total")) + if(this.frm.doc.doctype && frappe.meta.get_docfield(this.frm.doc.doctype, "net_total")) { this.frm.toggle_display("net_total", show); + } - if(frappe.meta.get_docfield(cur_frm.doctype, "base_net_total")) + if(this.frm.doc.doctype && frappe.meta.get_docfield(this.frm.doc.doctype, "base_net_total")) { this.frm.toggle_display("base_net_total", (show && (me.frm.doc.currency != company_currency))); - + } } change_grid_labels(company_currency) { @@ -1500,6 +1528,31 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe } } + batch_no(frm, cdt, cdn) { + let row = locals[cdt][cdn]; + if (row.use_serial_batch_fields && row.batch_no) { + var params = this._get_args(row); + params.batch_no = row.batch_no; + params.uom = row.uom; + + frappe.call({ + method: "erpnext.stock.get_item_details.get_batch_based_item_price", + args: { + params: params, + item_code: row.item_code, + }, + callback: function(r) { + if (!r.exc && r.message) { + row.price_list_rate = r.message; + row.rate = r.message; + refresh_field("rate", row.name, row.parentfield); + refresh_field("price_list_rate", row.name, row.parentfield); + } + } + }) + } + } + toggle_item_grid_columns(company_currency) { const me = this; // toggle columns @@ -1509,8 +1562,8 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe item_grid.set_column_disp(fname, me.frm.doc.currency != company_currency); }); - var show = (cint(cur_frm.doc.discount_amount)) || - ((cur_frm.doc.taxes || []).filter(function(d) {return d.included_in_print_rate===1}).length); + var show = (cint(this.frm.doc.discount_amount)) || + ((this.frm.doc.taxes || []).filter(function(d) {return d.included_in_print_rate===1}).length); $.each(["net_rate", "net_amount"], function(i, fname) { if(frappe.meta.get_docfield(item_grid.doctype, fname)) @@ -1776,7 +1829,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe if (data && data.apply_rule_on_other_items && JSON.parse(data.apply_rule_on_other_items)) { me.frm.doc.items.forEach(d => { - if (in_list(JSON.parse(data.apply_rule_on_other_items), d[data.apply_rule_on])) { + if (in_list(JSON.parse(data.apply_rule_on_other_items), d[data.apply_rule_on]) && d.item_code === data.item_code) { for(var k in data) { if (data.pricing_rule_for == "Discount Percentage" && data.apply_rule_on_other_items && k == "discount_amount") { continue; @@ -1851,8 +1904,14 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe callback: function(r) { if (!r.exc) { frappe.run_serially([ - () => me.frm.set_value("price_list_currency", r.message.parent.price_list_currency), - () => me.frm.set_value("plc_conversion_rate", r.message.parent.plc_conversion_rate), + () => { + if (r.message.parent.price_list_currency) + me.frm.set_value("price_list_currency", r.message.parent.price_list_currency); + }, + () => { + if (r.message.parent.plc_conversion_rate) + me.frm.set_value("plc_conversion_rate", r.message.parent.plc_conversion_rate); + }, () => { if(args.items.length) { me._set_values_for_item_list(r.message.children); @@ -1878,6 +1937,10 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe const fields = ["discount_percentage", "discount_amount", "margin_rate_or_amount", "rate_with_margin"]; + if (!item) { + return; + } + if(item.remove_free_item) { let items = []; @@ -2394,7 +2457,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe payment_terms_template() { var me = this; const doc = this.frm.doc; - if(doc.payment_terms_template && doc.doctype !== 'Delivery Note') { + if(doc.payment_terms_template && doc.doctype !== 'Delivery Note' && !doc.is_return) { var posting_date = doc.posting_date || doc.transaction_date; frappe.call({ method: "erpnext.controllers.accounts_controller.get_payment_terms", diff --git a/erpnext/public/js/financial_statements.js b/erpnext/public/js/financial_statements.js index bd8b70af02e..7a3877b9c46 100644 --- a/erpnext/public/js/financial_statements.js +++ b/erpnext/public/js/financial_statements.js @@ -9,25 +9,20 @@ erpnext.financial_statements = { data && column.colIndex >= 3 ) { - //Assuming that the first three columns are s.no, account name and the very first year of the accounting values, to calculate the relative percentage values of the successive columns. - const lastAnnualValue = row[column.colIndex - 1].content; - const currentAnnualvalue = data[column.fieldname]; - if (currentAnnualvalue == undefined) return "NA"; //making this not applicable for undefined/null values - let annualGrowth = 0; - if (lastAnnualValue == 0 && currentAnnualvalue > 0) { - //If the previous year value is 0 and the current value is greater than 0 - annualGrowth = 1; - } else if (lastAnnualValue > 0) { - annualGrowth = (currentAnnualvalue - lastAnnualValue) / lastAnnualValue; - } + const growthPercent = data[column.fieldname]; - const growthPercent = Math.round(annualGrowth * 10000) / 100; //calculating the rounded off percentage + if (growthPercent == undefined) return "NA"; //making this not applicable for undefined/null values - value = $(`${(growthPercent >= 0 ? "+" : "") + growthPercent + "%"}`); - if (growthPercent < 0) { - value = $(value).addClass("text-danger"); + if (column.fieldname === "total") { + value = $(`${growthPercent}`); } else { - value = $(value).addClass("text-success"); + value = $(`${(growthPercent >= 0 ? "+" : "") + growthPercent + "%"}`); + + if (growthPercent < 0) { + value = $(value).addClass("text-danger"); + } else { + value = $(value).addClass("text-success"); + } } value = $(value).wrap("

").parent().html(); @@ -38,11 +33,9 @@ erpnext.financial_statements = { this.baseData = row; } if (column.colIndex >= 2) { - //Assuming that the first two columns are s.no and account name, to calculate the relative percentage values of the successive columns. - const currentAnnualvalue = data[column.fieldname]; - const baseValue = this.baseData[column.colIndex].content; - if (currentAnnualvalue == undefined || baseValue <= 0) return "NA"; - const marginPercent = Math.round((currentAnnualvalue / baseValue) * 10000) / 100; + const marginPercent = data[column.fieldname]; + + if (marginPercent == undefined) return "NA"; //making this not applicable for undefined/null values value = $(`${marginPercent + "%"}`); if (marginPercent < 0) value = $(value).addClass("text-danger"); @@ -53,7 +46,8 @@ erpnext.financial_statements = { } if (data && column.fieldname == "account") { - value = data.account_name || value; + // first column + value = data.section_name || data.account_name || value; if (filter && filter?.text && filter?.type == "contains") { if (!value.toLowerCase().includes(filter.text)) { @@ -61,7 +55,7 @@ erpnext.financial_statements = { } } - if (data.account) { + if (data.account || data.accounts) { column.link_onclick = "erpnext.financial_statements.open_general_ledger(" + JSON.stringify(data) + ")"; } @@ -70,7 +64,7 @@ erpnext.financial_statements = { value = default_formatter(value, row, column, data); - if (data && !data.parent_account) { + if (data && !data.parent_account && !data.parent_section) { value = $(`${value}`); var $value = $(value).css("font-weight", "bold"); @@ -84,13 +78,13 @@ erpnext.financial_statements = { return value; }, open_general_ledger: function (data) { - if (!data.account) return; + if (!data.account && !data.accounts) return; let project = $.grep(frappe.query_report.filters, function (e) { return e.df.fieldname == "project"; }); frappe.route_options = { - account: data.account, + account: data.account || data.accounts, company: frappe.query_report.get_filter_value("company"), from_date: data.from_date || data.year_start_date, to_date: data.to_date || data.year_end_date, @@ -116,14 +110,17 @@ erpnext.financial_statements = { erpnext.financial_statements.filters = get_filters(); let fiscal_year = erpnext.utils.get_fiscal_year(frappe.datetime.get_today()); + var filters = report.get_values(); - frappe.model.with_doc("Fiscal Year", fiscal_year, function (r) { - var fy = frappe.model.get_doc("Fiscal Year", fiscal_year); - frappe.query_report.set_filter_value({ - period_start_date: fy.year_start_date, - period_end_date: fy.year_end_date, + if (!filters.period_start_date || !filters.period_end_date) { + frappe.model.with_doc("Fiscal Year", fiscal_year, function (r) { + var fy = frappe.model.get_doc("Fiscal Year", fiscal_year); + frappe.query_report.set_filter_value({ + period_start_date: fy.year_start_date, + period_end_date: fy.year_end_date, + }); }); - }); + } if (report.page) { const views_menu = report.page.add_custom_button_group(__("Financial Statements")); diff --git a/erpnext/public/js/queries.js b/erpnext/public/js/queries.js index d7edac3cb9f..fd5b7603844 100644 --- a/erpnext/public/js/queries.js +++ b/erpnext/public/js/queries.js @@ -56,6 +56,17 @@ $.extend(erpnext.queries, { } }, + company_contact_query: function (doc) { + if (!doc.company) { + frappe.throw(__("Please set {0}", [__(frappe.meta.get_label(doc.doctype, "company", doc.name))])); + } + + return { + query: "frappe.contacts.doctype.contact.contact.contact_query", + filters: { link_doctype: "Company", link_name: doc.company }, + }; + }, + address_query: function (doc) { if (frappe.dynamic_link) { if (!doc[frappe.dynamic_link.fieldname]) { @@ -77,9 +88,13 @@ $.extend(erpnext.queries, { }, company_address_query: function (doc) { + if (!doc.company) { + frappe.throw(__("Please set {0}", [__(frappe.meta.get_label(doc.doctype, "company", doc.name))])); + } + return { query: "frappe.contacts.doctype.address.address.address_query", - filters: { is_your_company_address: 1, link_doctype: "Company", link_name: doc.company || "" }, + filters: { link_doctype: "Company", link_name: doc.company }, }; }, diff --git a/erpnext/public/js/templates/visual_plant_floor_template.html b/erpnext/public/js/templates/visual_plant_floor_template.html index 2e67085c022..a1639f07370 100644 --- a/erpnext/public/js/templates/visual_plant_floor_template.html +++ b/erpnext/public/js/templates/visual_plant_floor_template.html @@ -1,5 +1,16 @@ {% $.each(workstations, (idx, row) => { %}
+
+ {% if(row.status == "Production") { %} +
+
+
+
+ {% } %} + + {{row.status}} + +
-
-

{{row.status}}

-
{{row.workstation_name}}
+
+ + {{row.workstation_name}} +
-{% }); %} \ No newline at end of file +{% }); %} diff --git a/erpnext/public/js/utils.js b/erpnext/public/js/utils.js index a7d88edcafa..7c02fefc0f9 100755 --- a/erpnext/public/js/utils.js +++ b/erpnext/public/js/utils.js @@ -920,6 +920,7 @@ erpnext.utils.map_current_doc = function (opts) { target: opts.target, date_field: opts.date_field || undefined, setters: opts.setters, + read_only_setters: opts.read_only_setters, data_fields: data_fields, get_query: opts.get_query, add_filters_group: 1, diff --git a/erpnext/public/js/utils/sales_common.js b/erpnext/public/js/utils/sales_common.js index 91a85aa02a5..ca2bed20c7f 100644 --- a/erpnext/public/js/utils/sales_common.js +++ b/erpnext/public/js/utils/sales_common.js @@ -15,10 +15,11 @@ erpnext.sales_common = { onload() { super.onload(); this.setup_queries(); - this.frm.set_query("shipping_rule", function () { + this.frm.set_query("shipping_rule", function (doc) { return { filters: { shipping_rule_type: "Selling", + company: doc.company, }, }; }); @@ -28,6 +29,7 @@ erpnext.sales_common = { query: "erpnext.controllers.queries.get_project_name", filters: { customer: doc.customer, + company: doc.company, }, }; }); @@ -47,9 +49,11 @@ erpnext.sales_common = { ); me.frm.set_query("contact_person", erpnext.queries.contact_query); + me.frm.set_query("company_contact_person", erpnext.queries.company_contact_query); me.frm.set_query("customer_address", erpnext.queries.address_query); me.frm.set_query("shipping_address_name", erpnext.queries.address_query); me.frm.set_query("dispatch_address_name", erpnext.queries.dispatch_address_query); + me.frm.set_query("company_address", erpnext.queries.company_address_query); erpnext.accounts.dimensions.setup_dimension_filters(me.frm, me.frm.doctype); diff --git a/erpnext/public/js/utils/serial_no_batch_selector.js b/erpnext/public/js/utils/serial_no_batch_selector.js index 78efb46f4c3..de1faf36ef5 100644 --- a/erpnext/public/js/utils/serial_no_batch_selector.js +++ b/erpnext/public/js/utils/serial_no_batch_selector.js @@ -16,7 +16,7 @@ erpnext.SerialBatchPackageSelector = class SerialNoBatchBundleUpdate { let label = this.item?.has_serial_no ? __("Serial Nos") : __("Batch Nos"); let primary_label = this.bundle ? __("Update") : __("Add"); - if (this.item?.has_serial_no && this.item?.batch_no) { + if (this.item?.has_serial_no && this.item?.has_batch_no) { label = __("Serial Nos / Batch Nos"); } @@ -24,6 +24,7 @@ erpnext.SerialBatchPackageSelector = class SerialNoBatchBundleUpdate { this.dialog = new frappe.ui.Dialog({ title: this.item?.title || primary_label, + size: "large", fields: this.get_dialog_fields(), primary_action_label: primary_label, primary_action: () => this.update_bundle_entries(), @@ -95,7 +96,12 @@ erpnext.SerialBatchPackageSelector = class SerialNoBatchBundleUpdate { options: "Warehouse", default: this.get_warehouse(), onchange: () => { - this.item.warehouse = this.dialog.get_value("warehouse"); + if (this.item?.is_rejected) { + this.item.rejected_warehouse = this.dialog.get_value("warehouse"); + } else { + this.item.warehouse = this.dialog.get_value("warehouse"); + } + this.get_auto_data(); }, get_query: () => { @@ -164,12 +170,14 @@ erpnext.SerialBatchPackageSelector = class SerialNoBatchBundleUpdate { fields.push({ fieldtype: "Section Break", + depends_on: "eval:doc.enter_manually !== 1 || doc.entries?.length > 0", }); fields.push({ fieldname: "entries", fieldtype: "Table", allow_bulk_edit: true, + depends_on: "eval:doc.enter_manually !== 1 || doc.entries?.length > 0", data: [], fields: this.get_dialog_table_fields(), }); @@ -178,6 +186,7 @@ erpnext.SerialBatchPackageSelector = class SerialNoBatchBundleUpdate { } get_attach_field() { + let me = this; let label = this.item?.has_serial_no ? __("Serial Nos") : __("Batch Nos"); let primary_label = this.bundle ? __("Update") : __("Add"); @@ -185,66 +194,41 @@ erpnext.SerialBatchPackageSelector = class SerialNoBatchBundleUpdate { label = __("Serial Nos / Batch Nos"); } - let fields = [ - { - fieldtype: "Section Break", - label: __("{0} {1} via CSV File", [primary_label, label]), - }, - ]; - - if (this.item?.has_serial_no) { - fields = [ - ...fields, - { - fieldtype: "Check", - label: __("Import Using CSV file"), - fieldname: "import_using_csv_file", - default: 0, + let fields = []; + if (this.item.has_serial_no) { + fields.push({ + fieldtype: "Check", + label: __("Enter Manually"), + fieldname: "enter_manually", + default: 1, + depends_on: "eval:doc.import_using_csv_file !== 1", + change() { + if (me.dialog.get_value("enter_manually")) { + me.dialog.set_value("import_using_csv_file", 0); + } }, - { - fieldtype: "Section Break", - label: __("{0} {1} Manually", [primary_label, label]), - depends_on: "eval:doc.import_using_csv_file === 0", - }, - { - fieldtype: "Data", - label: __("Enter Serial No Range"), - fieldname: "serial_no_range", - depends_on: "eval:doc.import_using_csv_file === 0", - description: __('Enter "ABC-001::100" for serial nos "ABC-001" to "ABC-100".'), - onchange: () => { - this.set_serial_nos_from_range(); - }, - }, - { - fieldtype: "Small Text", - label: __("Enter Serial Nos"), - fieldname: "upload_serial_nos", - depends_on: "eval:doc.import_using_csv_file === 0", - description: __("Enter each serial no in a new line"), - }, - { - fieldtype: "Column Break", - depends_on: "eval:doc.import_using_csv_file === 0", - }, - { - fieldtype: "Button", - fieldname: "make_serial_nos", - label: __("Create Serial Nos"), - depends_on: "eval:doc.import_using_csv_file === 0", - click: () => { - this.create_serial_nos(); - }, - }, - { - fieldtype: "Section Break", - depends_on: "eval:doc.import_using_csv_file === 1", - }, - ]; + }); } fields = [ ...fields, + { + fieldtype: "Check", + label: __("Import Using CSV file"), + fieldname: "import_using_csv_file", + depends_on: "eval:doc.enter_manually !== 1", + default: !this.item.has_serial_no ? 1 : 0, + change() { + if (me.dialog.get_value("import_using_csv_file")) { + me.dialog.set_value("enter_manually", 0); + } + }, + }, + { + fieldtype: "Section Break", + depends_on: "eval:doc.import_using_csv_file === 1", + label: __("{0} {1} via CSV File", [primary_label, label]), + }, { fieldtype: "Button", fieldname: "download_csv", @@ -262,6 +246,44 @@ erpnext.SerialBatchPackageSelector = class SerialNoBatchBundleUpdate { }, ]; + if (this.item?.has_serial_no) { + fields = [ + ...fields, + { + fieldtype: "Section Break", + label: __("{0} {1} Manually", [primary_label, label]), + depends_on: "eval:doc.enter_manually === 1", + }, + { + fieldtype: "Data", + label: __("Serial No Range"), + fieldname: "serial_no_range", + depends_on: "eval:doc.enter_manually === 1 && !doc.serial_no_series", + description: __('"SN-01::10" for "SN-01" to "SN-10"'), + onchange: () => { + this.set_serial_nos_from_range(); + }, + }, + ]; + } + + if (this.item?.has_serial_no) { + fields = [ + ...fields, + { + fieldtype: "Column Break", + depends_on: "eval:doc.enter_manually === 1", + }, + { + fieldtype: "Small Text", + label: __("Enter Serial Nos"), + fieldname: "upload_serial_nos", + depends_on: "eval:doc.enter_manually === 1", + description: __("Enter each serial no in a new line"), + }, + ]; + } + return fields; } @@ -368,8 +390,28 @@ erpnext.SerialBatchPackageSelector = class SerialNoBatchBundleUpdate { ]; } + get_batch_qty(batch_no, callback) { + let warehouse = this.item.s_warehouse || this.item.t_warehouse || this.item.warehouse; + frappe.call({ + method: "erpnext.stock.doctype.batch.batch.get_batch_qty", + args: { + batch_no: batch_no, + warehouse: warehouse, + item_code: this.item.item_code, + posting_date: this.frm.doc.posting_date, + posting_time: this.frm.doc.posting_time, + }, + callback: (r) => { + if (r.message) { + callback(flt(r.message)); + } + }, + }); + } + get_dialog_table_fields() { let fields = []; + let me = this; if (this.item.has_serial_no) { fields.push({ @@ -395,6 +437,20 @@ erpnext.SerialBatchPackageSelector = class SerialNoBatchBundleUpdate { fieldname: "batch_no", label: __("Batch No"), in_list_view: 1, + get_route_options_for_new_doc: () => { + return { + item: this.item.item_code, + }; + }, + change() { + let doc = this.doc; + if (!doc.qty && me.item.type_of_transaction === "Outward") { + me.get_batch_qty(doc.batch_no, (qty) => { + doc.qty = qty; + this.grid.set_value("qty", qty, doc); + }); + } + }, get_query: () => { let is_inward = false; if ( @@ -406,6 +462,8 @@ erpnext.SerialBatchPackageSelector = class SerialNoBatchBundleUpdate { is_inward = true; } + let include_expired_batches = me.include_expired_batches(); + return { query: "erpnext.controllers.queries.get_batch_no", filters: { @@ -413,6 +471,7 @@ erpnext.SerialBatchPackageSelector = class SerialNoBatchBundleUpdate { warehouse: this.item.s_warehouse || this.item.t_warehouse || this.item.warehouse, is_inward: is_inward, + include_expired_batches: include_expired_batches, }, }; }, @@ -441,6 +500,14 @@ erpnext.SerialBatchPackageSelector = class SerialNoBatchBundleUpdate { return fields; } + include_expired_batches() { + return ( + this.frm.doc.doctype === "Stock Reconciliation" || + (this.frm.doc.doctype === "Stock Entry" && + ["Material Receipt", "Material Transfer", "Material Issue"].includes(this.frm.doc.purpose)) + ); + } + get_auto_data() { let { qty, based_on } = this.dialog.get_values(); @@ -458,12 +525,17 @@ erpnext.SerialBatchPackageSelector = class SerialNoBatchBundleUpdate { based_on = "FIFO"; } + let warehouse = this.item.warehouse || this.item.s_warehouse; + if (this.item?.is_rejected) { + warehouse = this.item.rejected_warehouse; + } + if (qty) { frappe.call({ method: "erpnext.stock.doctype.serial_and_batch_bundle.serial_and_batch_bundle.get_auto_data", args: { item_code: this.item.item_code, - warehouse: this.item.warehouse || this.item.s_warehouse, + warehouse: warehouse, has_serial_no: this.item.has_serial_no, has_batch_no: this.item.has_batch_no, qty: qty, @@ -482,6 +554,8 @@ erpnext.SerialBatchPackageSelector = class SerialNoBatchBundleUpdate { scan_barcode_data() { const { scan_serial_no, scan_batch_no } = this.dialog.get_values(); + this.dialog.set_value("enter_manually", 0); + if (scan_serial_no || scan_batch_no) { frappe.call({ method: "erpnext.stock.doctype.serial_and_batch_bundle.serial_and_batch_bundle.is_serial_batch_no_exists", @@ -525,14 +599,13 @@ erpnext.SerialBatchPackageSelector = class SerialNoBatchBundleUpdate { serial_no: scan_serial_no, }, callback: (r) => { - if (r.message) { - this.dialog.fields_dict.entries.df.data.push({ - serial_no: scan_serial_no, - batch_no: r.message, - }); + this.dialog.fields_dict.entries.df.data.push({ + serial_no: scan_serial_no, + batch_no: r.message, + }); - this.dialog.fields_dict.scan_serial_no.set_value(""); - } + this.dialog.fields_dict.scan_serial_no.set_value(""); + this.dialog.fields_dict.entries.grid.refresh(); }, }); } @@ -561,6 +634,12 @@ erpnext.SerialBatchPackageSelector = class SerialNoBatchBundleUpdate { update_bundle_entries() { let entries = this.dialog.get_values().entries; let warehouse = this.dialog.get_value("warehouse"); + let upload_serial_nos = this.dialog.get_value("upload_serial_nos"); + + if (!entries?.length && upload_serial_nos) { + this.create_serial_nos(); + return; + } if ((entries && !entries.length) || !entries) { frappe.throw(__("Please add atleast one Serial No / Batch No")); @@ -570,6 +649,10 @@ erpnext.SerialBatchPackageSelector = class SerialNoBatchBundleUpdate { frappe.throw(__("Please select a Warehouse")); } + if (this.item?.is_rejected && this.item.rejected_warehouse === this.item.warehouse) { + frappe.throw(__("Rejected Warehouse and Accepted Warehouse cannot be same.")); + } + frappe .call({ method: "erpnext.stock.doctype.serial_and_batch_bundle.serial_and_batch_bundle.add_serial_batch_ledgers", @@ -581,9 +664,13 @@ erpnext.SerialBatchPackageSelector = class SerialNoBatchBundleUpdate { }, }) .then((r) => { - this.callback && this.callback(r.message); - this.frm.save(); - this.dialog.hide(); + frappe.run_serially([ + () => { + this.callback && this.callback(r.message); + }, + () => this.frm.save(), + () => this.dialog.hide(), + ]); }); } @@ -607,6 +694,10 @@ erpnext.SerialBatchPackageSelector = class SerialNoBatchBundleUpdate { } get_warehouse() { + if (this.item?.is_rejected) { + return this.item.rejected_warehouse; + } + return this.item?.type_of_transaction === "Outward" ? this.item.warehouse || this.item.s_warehouse : this.item.warehouse || this.item.t_warehouse; @@ -640,5 +731,8 @@ erpnext.SerialBatchPackageSelector = class SerialNoBatchBundleUpdate { }); this.dialog.fields_dict.entries.grid.refresh(); + if (this.dialog.fields_dict.entries.df.data?.length) { + this.dialog.set_value("enter_manually", 0); + } } }; diff --git a/erpnext/public/js/utils/unreconcile.js b/erpnext/public/js/utils/unreconcile.js index 6864e2865d3..7dba4705e40 100644 --- a/erpnext/public/js/utils/unreconcile.js +++ b/erpnext/public/js/utils/unreconcile.js @@ -4,7 +4,8 @@ erpnext.accounts.unreconcile_payment = { add_unreconcile_btn(frm) { if (frm.doc.docstatus == 1) { if ( - (frm.doc.doctype == "Journal Entry" && frm.doc.voucher_type != "Journal Entry") || + (frm.doc.doctype == "Journal Entry" && + !["Journal Entry", "Bank Entry", "Cash Entry"].includes(frm.doc.voucher_type)) || !["Purchase Invoice", "Sales Invoice", "Journal Entry", "Payment Entry"].includes( frm.doc.doctype ) @@ -69,7 +70,7 @@ erpnext.accounts.unreconcile_payment = { { label: __("Voucher Type"), fieldname: "voucher_type", - fieldtype: "Dynamic Link", + fieldtype: "Link", options: "DocType", in_list_view: 1, read_only: 1, @@ -77,7 +78,7 @@ erpnext.accounts.unreconcile_payment = { { label: __("Voucher No"), fieldname: "voucher_no", - fieldtype: "Link", + fieldtype: "Dynamic Link", options: "voucher_type", in_list_view: 1, read_only: 1, @@ -99,6 +100,7 @@ erpnext.accounts.unreconcile_payment = { fieldtype: "Table", read_only: 1, fields: child_table_fields, + cannot_add_rows: true, }, ]; @@ -122,7 +124,6 @@ erpnext.accounts.unreconcile_payment = { title: "UnReconcile Allocations", fields: unreconcile_dialog_fields, size: "large", - cannot_add_rows: true, primary_action_label: "UnReconcile", primary_action(values) { let selected_allocations = values.allocations.filter((x) => x.__checked); diff --git a/erpnext/public/scss/erpnext.scss b/erpnext/public/scss/erpnext.scss index 03dd31104e1..29a2696470f 100644 --- a/erpnext/public/scss/erpnext.scss +++ b/erpnext/public/scss/erpnext.scss @@ -507,6 +507,47 @@ body[data-route="pos"] { position: relative; } +.ring-container { + position: relative; +} + +.circle { + width: 9px; + height: 9px; + background-color: #278f5e; + border-radius: 50%; + position: absolute; + left: 9px; + top: 8px; +} + +@keyframes pulsate { + 0% { + -webkit-transform: scale(0.1, 0.1); + opacity: 0; + } + 50% { + opacity: 1; + } + 100% { + -webkit-transform: scale(1.2, 1.2); + opacity: 0; + } +} + +.ringring { + border: 2px solid #62bd19; + -webkit-border-radius: 40px; + height: 15px; + width: 15px; + position: absolute; + left: 6px; + top: 5px; + -webkit-animation: pulsate 3s ease-out; + -webkit-animation-iteration-count: infinite; + opacity: 0; +} + .plant-floor { padding-bottom: 25px; } diff --git a/erpnext/selling/doctype/customer/customer.json b/erpnext/selling/doctype/customer/customer.json index af32f4ecf84..dec09e512fe 100644 --- a/erpnext/selling/doctype/customer/customer.json +++ b/erpnext/selling/doctype/customer/customer.json @@ -21,6 +21,7 @@ "gender", "lead_name", "opportunity_name", + "prospect_name", "account_manager", "image", "defaults_tab", @@ -307,13 +308,15 @@ "fetch_from": "customer_primary_contact.mobile_no", "fieldname": "mobile_no", "fieldtype": "Read Only", - "label": "Mobile No" + "label": "Mobile No", + "options": "Mobile" }, { "fetch_from": "customer_primary_contact.email_id", "fieldname": "email_id", "fieldtype": "Read Only", - "label": "Email Id" + "label": "Email Id", + "options": "Email" }, { "fieldname": "column_break_26", @@ -570,6 +573,14 @@ { "fieldname": "column_break_nwor", "fieldtype": "Column Break" + }, + { + "fieldname": "prospect_name", + "fieldtype": "Link", + "label": "From Prospect", + "no_copy": 1, + "options": "Prospect", + "print_hide": 1 } ], "icon": "fa fa-user", @@ -583,7 +594,7 @@ "link_fieldname": "party" } ], - "modified": "2024-05-08 18:03:20.716169", + "modified": "2024-06-17 03:24:59.612974", "modified_by": "Administrator", "module": "Selling", "name": "Customer", @@ -668,4 +679,4 @@ "states": [], "title_field": "customer_name", "track_changes": 1 -} \ No newline at end of file +} diff --git a/erpnext/selling/doctype/customer/customer.py b/erpnext/selling/doctype/customer/customer.py index 71f0022df14..0e9c1f3e790 100644 --- a/erpnext/selling/doctype/customer/customer.py +++ b/erpnext/selling/doctype/customer/customer.py @@ -77,6 +77,7 @@ class Customer(TransactionBase): payment_terms: DF.Link | None portal_users: DF.Table[PortalUser] primary_address: DF.Text | None + prospect_name: DF.Link | None represents_company: DF.Link | None sales_team: DF.Table[SalesTeam] salutation: DF.Link | None @@ -104,7 +105,7 @@ class Customer(TransactionBase): elif cust_master_name == "Naming Series": set_name_by_naming_series(self) else: - self.name = set_name_from_naming_options(frappe.get_meta(self.doctype).autoname, self) + set_name_from_naming_options(frappe.get_meta(self.doctype).autoname, self) def get_customer_name(self): if frappe.db.get_value("Customer", self.customer_name) and not frappe.flags.in_import: diff --git a/erpnext/selling/doctype/product_bundle/product_bundle.py b/erpnext/selling/doctype/product_bundle/product_bundle.py index 464cff01d7e..609f45a608f 100644 --- a/erpnext/selling/doctype/product_bundle/product_bundle.py +++ b/erpnext/selling/doctype/product_bundle/product_bundle.py @@ -5,6 +5,7 @@ import frappe from frappe import _ from frappe.model.document import Document +from frappe.query_builder import Criterion from frappe.utils import get_link_to_form @@ -93,15 +94,24 @@ class ProductBundle(Document): def get_new_item_code(doctype, txt, searchfield, start, page_len, filters): product_bundles = frappe.db.get_list("Product Bundle", {"disabled": 0}, pluck="name") + if not searchfield or searchfield == "name": + searchfield = frappe.get_meta("Item").get("search_fields") + + searchfield = searchfield.split(",") + searchfield.append("name") + item = frappe.qb.DocType("Item") query = ( frappe.qb.from_(item) - .select(item.item_code, item.item_name) - .where((item.is_stock_item == 0) & (item.is_fixed_asset == 0) & (item[searchfield].like(f"%{txt}%"))) + .select(item.name, item.item_name) + .where((item.is_stock_item == 0) & (item.is_fixed_asset == 0)) .limit(page_len) .offset(start) ) + if searchfield: + query = query.where(Criterion.any([item[fieldname].like(f"%{txt}%") for fieldname in searchfield])) + if product_bundles: query = query.where(item.name.notin(product_bundles)) diff --git a/erpnext/selling/doctype/quotation/quotation.js b/erpnext/selling/doctype/quotation/quotation.js index 3044d865c0c..7311857e350 100644 --- a/erpnext/selling/doctype/quotation/quotation.js +++ b/erpnext/selling/doctype/quotation/quotation.js @@ -24,20 +24,6 @@ frappe.ui.form.on("Quotation", { frm.set_df_property("packed_items", "cannot_add_rows", true); frm.set_df_property("packed_items", "cannot_delete_rows", true); - frm.set_query("company_address", function (doc) { - if (!doc.company) { - frappe.throw(__("Please set Company")); - } - - return { - query: "frappe.contacts.doctype.address.address.address_query", - filters: { - link_doctype: "Company", - link_name: doc.company, - }, - }; - }); - frm.set_query("serial_and_batch_bundle", "packed_items", (doc, cdt, cdn) => { let row = locals[cdt][cdn]; return { @@ -71,7 +57,7 @@ frappe.ui.form.on("Quotation", { frm.trigger("set_label"); frm.trigger("toggle_reqd_lead_customer"); frm.trigger("set_dynamic_field_label"); - frm.set_value("party_name", ""); + // frm.set_value("party_name", ""); // removed to set party_name from url for crm integration frm.set_value("customer_name", ""); }, diff --git a/erpnext/selling/doctype/quotation/quotation.json b/erpnext/selling/doctype/quotation/quotation.json index 982e7326775..4d257ff69e7 100644 --- a/erpnext/selling/doctype/quotation/quotation.json +++ b/erpnext/selling/doctype/quotation/quotation.json @@ -65,6 +65,7 @@ "grand_total", "rounding_adjustment", "rounded_total", + "disable_rounded_total", "in_words", "section_break_44", "apply_discount_on", @@ -95,8 +96,9 @@ "shipping_address", "company_address_section", "company_address", - "column_break_87", "company_address_display", + "column_break_87", + "company_contact_person", "terms_tab", "payment_schedule_section", "payment_terms_template", @@ -661,6 +663,7 @@ "width": "200px" }, { + "depends_on": "eval:!doc.disable_rounded_total", "fieldname": "base_rounding_adjustment", "fieldtype": "Currency", "label": "Rounding Adjustment (Company Currency)", @@ -709,6 +712,7 @@ "width": "200px" }, { + "depends_on": "eval:!doc.disable_rounded_total", "fieldname": "rounding_adjustment", "fieldtype": "Currency", "label": "Rounding Adjustment", @@ -1067,13 +1071,26 @@ "fieldname": "named_place", "fieldtype": "Data", "label": "Named Place" + }, + { + "default": "0", + "fieldname": "disable_rounded_total", + "fieldtype": "Check", + "label": "Disable Rounded Total" + }, + { + "fieldname": "company_contact_person", + "fieldtype": "Link", + "label": "Company Contact Person", + "options": "Contact", + "print_hide": 1 } ], "icon": "fa fa-shopping-cart", "idx": 82, "is_submittable": 1, "links": [], - "modified": "2024-03-20 16:04:21.567847", + "modified": "2024-11-26 12:43:29.293637", "modified_by": "Administrator", "module": "Selling", "name": "Quotation", diff --git a/erpnext/selling/doctype/quotation/quotation.py b/erpnext/selling/doctype/quotation/quotation.py index f9442204df1..55a14c912c2 100644 --- a/erpnext/selling/doctype/quotation/quotation.py +++ b/erpnext/selling/doctype/quotation/quotation.py @@ -50,6 +50,7 @@ class Quotation(SellingController): company: DF.Link company_address: DF.Link | None company_address_display: DF.SmallText | None + company_contact_person: DF.Link | None competitors: DF.TableMultiSelect[CompetitorDetail] contact_display: DF.SmallText | None contact_email: DF.Data | None @@ -61,6 +62,7 @@ class Quotation(SellingController): customer_address: DF.Link | None customer_group: DF.Link | None customer_name: DF.Data | None + disable_rounded_total: DF.Check discount_amount: DF.Currency enq_det: DF.Text | None grand_total: DF.Currency @@ -220,6 +222,10 @@ class Quotation(SellingController): "Lead", self.party_name, ["lead_name", "company_name"] ) self.customer_name = company_name or lead_name + elif self.party_name and self.quotation_to == "Prospect": + self.customer_name = self.party_name + elif self.party_name and self.quotation_to == "CRM Deal": + self.customer_name = frappe.db.get_value("CRM Deal", self.party_name, "organization") def update_opportunity(self, status): for opportunity in set(d.prevdoc_docname for d in self.get("items")): @@ -347,8 +353,8 @@ def make_sales_order(source_name: str, target_doc=None): return _make_sales_order(source_name, target_doc) -def _make_sales_order(source_name, target_doc=None, customer_group=None, ignore_permissions=False): - customer = _make_customer(source_name, ignore_permissions, customer_group) +def _make_sales_order(source_name, target_doc=None, ignore_permissions=False): + customer = _make_customer(source_name, ignore_permissions) ordered_items = frappe._dict( frappe.db.get_all( "Sales Order Item", @@ -365,24 +371,25 @@ def _make_sales_order(source_name, target_doc=None, customer_group=None, ignore_ if customer: target.customer = customer.name target.customer_name = customer.customer_name + + # sales team + if not target.get("sales_team"): + for d in customer.get("sales_team") or []: + target.append( + "sales_team", + { + "sales_person": d.sales_person, + "allocated_percentage": d.allocated_percentage or None, + "commission_rate": d.commission_rate, + }, + ) + if source.referral_sales_partner: target.sales_partner = source.referral_sales_partner target.commission_rate = frappe.get_value( "Sales Partner", source.referral_sales_partner, "commission_rate" ) - # sales team - if not target.get("sales_team"): - for d in customer.get("sales_team") or []: - target.append( - "sales_team", - { - "sales_person": d.sales_person, - "allocated_percentage": d.allocated_percentage or None, - "commission_rate": d.commission_rate, - }, - ) - target.flags.ignore_permissions = ignore_permissions target.run_method("set_missing_values") target.run_method("calculate_taxes_and_totals") @@ -426,7 +433,7 @@ def _make_sales_order(source_name, target_doc=None, customer_group=None, ignore_ "postprocess": update_item, "condition": can_map_row, }, - "Sales Taxes and Charges": {"doctype": "Sales Taxes and Charges", "add_if_empty": True}, + "Sales Taxes and Charges": {"doctype": "Sales Taxes and Charges", "reset_value": True}, "Sales Team": {"doctype": "Sales Team", "add_if_empty": True}, "Payment Schedule": {"doctype": "Payment Schedule", "add_if_empty": True}, }, @@ -491,7 +498,7 @@ def _make_sales_invoice(source_name, target_doc=None, ignore_permissions=False): "postprocess": update_item, "condition": lambda row: not row.is_alternative, }, - "Sales Taxes and Charges": {"doctype": "Sales Taxes and Charges", "add_if_empty": True}, + "Sales Taxes and Charges": {"doctype": "Sales Taxes and Charges", "reset_value": True}, "Sales Team": {"doctype": "Sales Team", "add_if_empty": True}, }, target_doc, @@ -502,51 +509,71 @@ def _make_sales_invoice(source_name, target_doc=None, ignore_permissions=False): return doclist -def _make_customer(source_name, ignore_permissions=False, customer_group=None): +def _make_customer(source_name, ignore_permissions=False): quotation = frappe.db.get_value( - "Quotation", source_name, ["order_type", "party_name", "customer_name"], as_dict=1 + "Quotation", + source_name, + ["order_type", "quotation_to", "party_name", "customer_name"], + as_dict=1, ) - if quotation and quotation.get("party_name"): - if not frappe.db.exists("Customer", quotation.get("party_name")): - lead_name = quotation.get("party_name") - customer_name = frappe.db.get_value( - "Customer", {"lead_name": lead_name}, ["name", "customer_name"], as_dict=True - ) - if not customer_name: - from erpnext.crm.doctype.lead.lead import _make_customer + if quotation.quotation_to == "Customer": + return frappe.get_doc("Customer", quotation.party_name) - customer_doclist = _make_customer(lead_name, ignore_permissions=ignore_permissions) - customer = frappe.get_doc(customer_doclist) - customer.flags.ignore_permissions = ignore_permissions - customer.customer_group = customer_group + # Check if a Customer already exists for the Lead or Prospect. + existing_customer = None + if quotation.quotation_to == "Lead": + existing_customer = frappe.db.get_value("Customer", {"lead_name": quotation.party_name}) + elif quotation.quotation_to == "Prospect": + existing_customer = frappe.db.get_value("Customer", {"prospect_name": quotation.party_name}) - try: - customer.insert() - return customer - except frappe.NameError: - if frappe.defaults.get_global_default("cust_master_name") == "Customer Name": - customer.run_method("autoname") - customer.name += "-" + lead_name - customer.insert() - return customer - else: - raise - except frappe.MandatoryError as e: - mandatory_fields = e.args[0].split(":")[1].split(",") - mandatory_fields = [customer.meta.get_label(field.strip()) for field in mandatory_fields] + if existing_customer: + return frappe.get_doc("Customer", existing_customer) - frappe.local.message_log = [] - lead_link = frappe.utils.get_link_to_form("Lead", lead_name) - message = ( - _("Could not auto create Customer due to the following missing mandatory field(s):") - + "
" - ) - message += "
  • " + "
  • ".join(mandatory_fields) + "
" - message += _("Please create Customer from Lead {0}.").format(lead_link) + # If no Customer exists, create a new Customer or Prospect. + if quotation.quotation_to == "Lead": + return create_customer_from_lead(quotation.party_name, ignore_permissions=ignore_permissions) + elif quotation.quotation_to == "Prospect": + return create_customer_from_prospect(quotation.party_name, ignore_permissions=ignore_permissions) - frappe.throw(message, title=_("Mandatory Missing")) - else: - return customer_name - else: - return frappe.get_doc("Customer", quotation.get("party_name")) + return None + + +def create_customer_from_lead(lead_name, ignore_permissions=False): + from erpnext.crm.doctype.lead.lead import _make_customer + + customer = _make_customer(lead_name, ignore_permissions=ignore_permissions) + customer.flags.ignore_permissions = ignore_permissions + + try: + customer.insert() + return customer + except frappe.MandatoryError as e: + handle_mandatory_error(e, customer, lead_name) + + +def create_customer_from_prospect(prospect_name, ignore_permissions=False): + from erpnext.crm.doctype.prospect.prospect import make_customer as make_customer_from_prospect + + customer = make_customer_from_prospect(prospect_name) + customer.flags.ignore_permissions = ignore_permissions + + try: + customer.insert() + return customer + except frappe.MandatoryError as e: + handle_mandatory_error(e, customer, prospect_name) + + +def handle_mandatory_error(e, customer, lead_name): + from frappe.utils import get_link_to_form + + mandatory_fields = e.args[0].split(":")[1].split(",") + mandatory_fields = [_(customer.meta.get_label(field.strip())) for field in mandatory_fields] + + frappe.local.message_log = [] + message = _("Could not auto create Customer due to the following missing mandatory field(s):") + "
" + message += "
  • " + "
  • ".join(mandatory_fields) + "
" + message += _("Please create Customer from Lead {0}.").format(get_link_to_form("Lead", lead_name)) + + frappe.throw(message, title=_("Mandatory Missing")) diff --git a/erpnext/selling/doctype/quotation/test_quotation.py b/erpnext/selling/doctype/quotation/test_quotation.py index 7b66b7a251a..05f43f26559 100644 --- a/erpnext/selling/doctype/quotation/test_quotation.py +++ b/erpnext/selling/doctype/quotation/test_quotation.py @@ -561,12 +561,50 @@ class TestQuotation(FrappeTestCase): "description": "VAT", "doctype": "Sales Taxes and Charges", "rate": 10, + "included_in_print_rate": 1, }, ) quotation.submit() - self.assertEqual(quotation.net_total, 290) - self.assertEqual(quotation.grand_total, 319) + self.assertEqual(round(quotation.items[1].net_rate, 2), 136.36) + self.assertEqual(round(quotation.items[1].amount, 2), 150) + + self.assertEqual(round(quotation.items[2].net_rate, 2), 163.64) + self.assertEqual(round(quotation.items[2].amount, 2), 180) + + self.assertEqual(round(quotation.net_total, 2), 263.64) + self.assertEqual(round(quotation.total_taxes_and_charges, 2), 26.36) + self.assertEqual(quotation.grand_total, 290) + + def test_amount_calculation_for_alternative_items(self): + """Make sure that the amount is calculated correctly for alternative items when the qty is changed.""" + from erpnext.stock.doctype.item.test_item import make_item + + item_list = [] + stock_items = { + "_Test Simple Item 1": 100, + "_Test Alt 1": 120, + } + + for item, rate in stock_items.items(): + make_item(item, {"is_stock_item": 0}) + item_list.append( + { + "item_code": item, + "qty": 1, + "rate": rate, + "is_alternative": "Alt" in item, + } + ) + + quotation = make_quotation(item_list=item_list, do_not_submit=1) + + self.assertEqual(quotation.items[1].amount, 120) + + quotation.items[1].qty = 2 + quotation.save() + + self.assertEqual(quotation.items[1].amount, 240) def test_alternative_items_sales_order_mapping_with_stock_items(self): from erpnext.selling.doctype.quotation.quotation import make_sales_order @@ -677,6 +715,20 @@ class TestQuotation(FrappeTestCase): item_doc.taxes = [] item_doc.save() + def test_grand_total_and_rounded_total_values(self): + quotation = make_quotation(qty=6, rate=12.3, do_not_submit=1) + + self.assertEqual(quotation.grand_total, 73.8) + self.assertEqual(quotation.rounding_adjustment, 0.2) + self.assertEqual(quotation.rounded_total, 74) + + quotation.disable_rounded_total = 1 + quotation.save() + + self.assertEqual(quotation.grand_total, 73.8) + self.assertEqual(quotation.rounding_adjustment, 0) + self.assertEqual(quotation.rounded_total, 0) + test_records = frappe.get_test_records("Quotation") diff --git a/erpnext/selling/doctype/quotation_item/quotation_item.json b/erpnext/selling/doctype/quotation_item/quotation_item.json index 0e25313f76a..1ea19aaaf56 100644 --- a/erpnext/selling/doctype/quotation_item/quotation_item.json +++ b/erpnext/selling/doctype/quotation_item/quotation_item.json @@ -24,6 +24,10 @@ "uom", "conversion_factor", "stock_qty", + "available_quantity_section", + "actual_qty", + "column_break_ylrv", + "company_total_stock", "section_break_16", "price_list_rate", "base_price_list_rate", @@ -70,7 +74,6 @@ "prevdoc_docname", "item_balance", "projected_qty", - "actual_qty", "col_break4", "stock_balance", "item_tax_rate", @@ -460,9 +463,10 @@ "report_hide": 1 }, { + "allow_on_submit": 1, "fieldname": "actual_qty", "fieldtype": "Float", - "label": "Actual Qty", + "label": "Qty (Warehouse)", "no_copy": 1, "print_hide": 1, "read_only": 1, @@ -662,12 +666,31 @@ "label": "Has Alternative Item", "print_hide": 1, "read_only": 1 + }, + { + "fieldname": "available_quantity_section", + "fieldtype": "Section Break", + "label": "Available Quantity" + }, + { + "fieldname": "column_break_ylrv", + "fieldtype": "Column Break" + }, + { + "allow_on_submit": 1, + "fieldname": "company_total_stock", + "fieldtype": "Float", + "label": "Qty (Company)", + "no_copy": 1, + "print_hide": 1, + "read_only": 1, + "report_hide": 1 } ], "idx": 1, "istable": 1, "links": [], - "modified": "2023-11-14 18:24:24.619832", + "modified": "2024-11-24 15:18:43.952844", "modified_by": "Administrator", "module": "Selling", "name": "Quotation Item", @@ -677,4 +700,4 @@ "sort_order": "DESC", "states": [], "track_changes": 1 -} \ No newline at end of file +} diff --git a/erpnext/selling/doctype/quotation_item/quotation_item.py b/erpnext/selling/doctype/quotation_item/quotation_item.py index f209762c3ba..7d68eaf07ba 100644 --- a/erpnext/selling/doctype/quotation_item/quotation_item.py +++ b/erpnext/selling/doctype/quotation_item/quotation_item.py @@ -27,6 +27,7 @@ class QuotationItem(Document): blanket_order: DF.Link | None blanket_order_rate: DF.Currency brand: DF.Link | None + company_total_stock: DF.Float conversion_factor: DF.Float customer_item_code: DF.Data | None description: DF.TextEditor | None diff --git a/erpnext/selling/doctype/sales_order/sales_order.js b/erpnext/selling/doctype/sales_order/sales_order.js index cdcd1047bd8..de4053458e4 100644 --- a/erpnext/selling/doctype/sales_order/sales_order.js +++ b/erpnext/selling/doctype/sales_order/sales_order.js @@ -26,20 +26,6 @@ frappe.ui.form.on("Sales Order", { return doc.stock_qty <= doc.delivered_qty ? "green" : "orange"; }); - frm.set_query("company_address", function (doc) { - if (!doc.company) { - frappe.throw(__("Please set Company")); - } - - return { - query: "frappe.contacts.doctype.address.address.address_query", - filters: { - link_doctype: "Company", - link_name: doc.company, - }, - }; - }); - frm.set_query("bom_no", "items", function (doc, cdt, cdn) { var row = locals[cdt][cdn]; return { @@ -57,8 +43,8 @@ frappe.ui.form.on("Sales Order", { if (frm.doc.docstatus === 1) { if ( frm.doc.status !== "Closed" && - flt(frm.doc.per_delivered, 2) < 100 && - flt(frm.doc.per_billed, 2) < 100 && + flt(frm.doc.per_delivered) < 100 && + flt(frm.doc.per_billed) < 100 && frm.has_perm("write") ) { frm.add_custom_button(__("Update Items"), () => { @@ -160,7 +146,7 @@ frappe.ui.form.on("Sales Order", { target: frm, setters: [ { - label: "Supplier", + label: __("Supplier"), fieldname: "supplier", fieldtype: "Link", options: "Supplier", @@ -604,7 +590,7 @@ erpnext.selling.SalesOrderController = class SalesOrderController extends erpnex __("Status") ); - if (flt(doc.per_delivered, 2) < 100 || flt(doc.per_billed, 2) < 100) { + if (flt(doc.per_delivered) < 100 || flt(doc.per_billed) < 100) { // close this.frm.add_custom_button(__("Close"), () => this.close_sales_order(), __("Status")); } @@ -627,7 +613,7 @@ erpnext.selling.SalesOrderController = class SalesOrderController extends erpnex ) && !this.frm.doc.skip_delivery_note; if (this.frm.has_perm("submit")) { - if (flt(doc.per_delivered, 2) < 100 || flt(doc.per_billed, 2) < 100) { + if (flt(doc.per_delivered) < 100 || flt(doc.per_billed) < 100) { // hold this.frm.add_custom_button( __("Hold"), @@ -645,8 +631,8 @@ erpnext.selling.SalesOrderController = class SalesOrderController extends erpnex if ( (!doc.__onload || !doc.__onload.has_reserved_stock) && - flt(doc.per_picked, 2) < 100 && - flt(doc.per_delivered, 2) < 100 && + flt(doc.per_picked) < 100 && + flt(doc.per_delivered) < 100 && frappe.model.can_create("Pick List") ) { this.frm.add_custom_button( @@ -664,7 +650,7 @@ erpnext.selling.SalesOrderController = class SalesOrderController extends erpnex // delivery note if ( - flt(doc.per_delivered, 2) < 100 && + flt(doc.per_delivered) < 100 && (order_is_a_sale || order_is_a_custom_sale) && allow_delivery ) { @@ -686,7 +672,7 @@ erpnext.selling.SalesOrderController = class SalesOrderController extends erpnex } // sales invoice - if (flt(doc.per_billed, 2) < 100 && frappe.model.can_create("Sales Invoice")) { + if (flt(doc.per_billed) < 100 && frappe.model.can_create("Sales Invoice")) { this.frm.add_custom_button( __("Sales Invoice"), () => me.make_sales_invoice(), @@ -697,8 +683,7 @@ erpnext.selling.SalesOrderController = class SalesOrderController extends erpnex // material request if ( (!doc.order_type || - ((order_is_a_sale || order_is_a_custom_sale) && - flt(doc.per_delivered, 2) < 100)) && + ((order_is_a_sale || order_is_a_custom_sale) && flt(doc.per_delivered) < 100)) && frappe.model.can_create("Material Request") ) { this.frm.add_custom_button( @@ -723,7 +708,7 @@ erpnext.selling.SalesOrderController = class SalesOrderController extends erpnex } // maintenance - if (flt(doc.per_delivered, 2) < 100 && (order_is_maintenance || order_is_a_custom_sale)) { + if (flt(doc.per_delivered) < 100 && (order_is_maintenance || order_is_a_custom_sale)) { if (frappe.model.can_create("Maintenance Visit")) { this.frm.add_custom_button( __("Maintenance Visit"), @@ -741,7 +726,7 @@ erpnext.selling.SalesOrderController = class SalesOrderController extends erpnex } // project - if (flt(doc.per_delivered, 2) < 100 && frappe.model.can_create("Project")) { + if (flt(doc.per_delivered) < 100 && frappe.model.can_create("Project")) { this.frm.add_custom_button(__("Project"), () => this.make_project(), __("Create")); } @@ -769,10 +754,7 @@ erpnext.selling.SalesOrderController = class SalesOrderController extends erpnex } } // payment request - if ( - flt(doc.per_billed, precision("per_billed", doc)) < - 100 + frappe.boot.sysdefaults.over_billing_allowance - ) { + if (flt(doc.per_billed) < 100 + frappe.boot.sysdefaults.over_billing_allowance) { this.frm.add_custom_button( __("Payment Request"), () => this.make_payment_request(), @@ -801,7 +783,7 @@ erpnext.selling.SalesOrderController = class SalesOrderController extends erpnex target: me.frm, setters: [ { - label: "Customer", + label: __("Customer"), fieldname: "party_name", fieldtype: "Link", options: "Customer", @@ -856,7 +838,7 @@ erpnext.selling.SalesOrderController = class SalesOrderController extends erpnex } else { const fields = [ { - label: "Items", + label: __("Items"), fieldtype: "Table", fieldname: "items", description: __("Select BOM and Qty for Production"), @@ -1211,7 +1193,7 @@ erpnext.selling.SalesOrderController = class SalesOrderController extends erpnex { fieldname: "items_for_po", fieldtype: "Table", - label: "Select Items", + label: __("Select Items"), fields: [ { fieldtype: "Data", @@ -1251,7 +1233,7 @@ erpnext.selling.SalesOrderController = class SalesOrderController extends erpnex ], }, ], - primary_action_label: "Create Purchase Order", + primary_action_label: __("Create Purchase Order"), primary_action(args) { if (!args) return; diff --git a/erpnext/selling/doctype/sales_order/sales_order.json b/erpnext/selling/doctype/sales_order/sales_order.json index 0695c3fd9c4..1525b9632de 100644 --- a/erpnext/selling/doctype/sales_order/sales_order.json +++ b/erpnext/selling/doctype/sales_order/sales_order.json @@ -113,8 +113,9 @@ "dispatch_address", "col_break46", "company_address", - "column_break_92", "company_address_display", + "column_break_92", + "company_contact_person", "payment_schedule_section", "payment_terms_section", "payment_terms_template", @@ -1640,13 +1641,20 @@ "no_copy": 1, "print_hide": 1, "report_hide": 1 + }, + { + "fieldname": "company_contact_person", + "fieldtype": "Link", + "label": "Company Contact Person", + "options": "Contact", + "print_hide": 1 } ], "icon": "fa fa-file-text", "idx": 105, "is_submittable": 1, "links": [], - "modified": "2024-05-23 16:35:54.905804", + "modified": "2024-11-26 12:42:06.872527", "modified_by": "Administrator", "module": "Selling", "name": "Sales Order", diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py index 570677aad78..374c37f99bf 100755 --- a/erpnext/selling/doctype/sales_order/sales_order.py +++ b/erpnext/selling/doctype/sales_order/sales_order.py @@ -35,7 +35,7 @@ from erpnext.stock.doctype.stock_reservation_entry.stock_reservation_entry impor get_sre_reserved_qty_details_for_voucher, has_reserved_stock, ) -from erpnext.stock.get_item_details import get_default_bom, get_price_list_rate +from erpnext.stock.get_item_details import get_bin_details, get_default_bom, get_price_list_rate from erpnext.stock.stock_balance import get_reserved_qty, update_bin_qty form_grid_templates = {"items": "templates/form_grid/item_grid.html"} @@ -85,6 +85,7 @@ class SalesOrder(SellingController): company: DF.Link company_address: DF.Link | None company_address_display: DF.SmallText | None + company_contact_person: DF.Link | None contact_display: DF.SmallText | None contact_email: DF.Data | None contact_mobile: DF.SmallText | None @@ -185,6 +186,8 @@ class SalesOrder(SellingController): super().__init__(*args, **kwargs) def onload(self) -> None: + super().onload() + if frappe.db.get_single_value("Stock Settings", "enable_stock_reservation"): if self.has_unreserved_stock(): self.set_onload("has_unreserved_stock", True) @@ -582,7 +585,7 @@ class SalesOrder(SellingController): item_delivered_qty = item_delivered_qty[0][0] if item_delivered_qty else 0 item.db_set("delivered_qty", flt(item_delivered_qty), update_modified=False) - delivered_qty += item.delivered_qty + delivered_qty += min(item.delivered_qty, item.qty) tot_qty += item.qty if tot_qty != 0: @@ -836,6 +839,9 @@ def make_material_request(source_name, target_doc=None): target.project = source_parent.project target.qty = get_remaining_qty(source) target.stock_qty = flt(target.qty) * flt(target.conversion_factor) + target.actual_qty = get_bin_details( + target.item_code, target.warehouse, source_parent.company, True + ).get("actual_qty", 0) args = target.as_dict().copy() args.update( @@ -931,7 +937,7 @@ def make_delivery_note(source_name, target_doc=None, kwargs=None): mapper = { "Sales Order": {"doctype": "Delivery Note", "validation": {"docstatus": ["=", 1]}}, - "Sales Taxes and Charges": {"doctype": "Sales Taxes and Charges", "add_if_empty": True}, + "Sales Taxes and Charges": {"doctype": "Sales Taxes and Charges", "reset_value": True}, "Sales Team": {"doctype": "Sales Team", "add_if_empty": True}, } @@ -1123,7 +1129,10 @@ def make_sales_invoice(source_name, target_doc=None, ignore_permissions=False): "condition": lambda doc: doc.qty and (doc.base_amount == 0 or abs(doc.billed_amt) < abs(doc.amount)), }, - "Sales Taxes and Charges": {"doctype": "Sales Taxes and Charges", "add_if_empty": True}, + "Sales Taxes and Charges": { + "doctype": "Sales Taxes and Charges", + "reset_value": True, + }, "Sales Team": {"doctype": "Sales Team", "add_if_empty": True}, }, target_doc, @@ -1222,7 +1231,10 @@ def get_events(start, end, filters=None): """, {"start": start, "end": end}, as_dict=True, - update={"allDay": 0}, + update={ + "allDay": 0, + "convertToUserTz": 0, + }, ) return data @@ -1339,6 +1351,8 @@ def make_purchase_order_for_default_supplier(source_name, selected_items=None, t "discount_percentage", "discount_amount", "pricing_rules", + "margin_type", + "margin_rate_or_amount", ], "postprocess": update_item, "condition": lambda doc: doc.ordered_qty < doc.stock_qty @@ -1392,9 +1406,17 @@ def make_purchase_order(source_name, selected_items=None, target_doc=None): target.payment_schedule = [] if is_drop_ship_order(target): - target.customer = source.customer - target.customer_name = source.customer_name - target.shipping_address = source.shipping_address_name + if source.shipping_address_name: + target.shipping_address = source.shipping_address_name + target.shipping_address_display = source.shipping_address + else: + target.shipping_address = source.customer_address + target.shipping_address_display = source.address_display + + target.customer_contact_person = source.contact_person + target.customer_contact_display = source.contact_display + target.customer_contact_mobile = source.contact_mobile + target.customer_contact_email = source.contact_email else: target.customer = target.customer_name = target.shipping_address = None diff --git a/erpnext/selling/doctype/sales_order/sales_order_calendar.js b/erpnext/selling/doctype/sales_order/sales_order_calendar.js index f4c0e2ba72a..59a32bde7a3 100644 --- a/erpnext/selling/doctype/sales_order/sales_order_calendar.js +++ b/erpnext/selling/doctype/sales_order/sales_order_calendar.js @@ -8,6 +8,7 @@ frappe.views.calendar["Sales Order"] = { id: "name", title: "customer_name", allDay: "allDay", + convertToUserTz: "convertToUserTz", }, gantt: true, filters: [ diff --git a/erpnext/selling/doctype/sales_order/sales_order_dashboard.py b/erpnext/selling/doctype/sales_order/sales_order_dashboard.py index c84009725b8..7c1c0deb33f 100644 --- a/erpnext/selling/doctype/sales_order/sales_order_dashboard.py +++ b/erpnext/selling/doctype/sales_order/sales_order_dashboard.py @@ -15,6 +15,8 @@ def get_data(): }, "internal_links": { "Quotation": ["items", "prevdoc_docname"], + "BOM": ["items", "bom_no"], + "Blanket Order": ["items", "blanket_order"], }, "transactions": [ { @@ -23,7 +25,7 @@ def get_data(): }, {"label": _("Purchasing"), "items": ["Material Request", "Purchase Order"]}, {"label": _("Projects"), "items": ["Project"]}, - {"label": _("Manufacturing"), "items": ["Work Order"]}, + {"label": _("Manufacturing"), "items": ["Work Order", "BOM", "Blanket Order"]}, {"label": _("Reference"), "items": ["Quotation", "Auto Repeat", "Stock Reservation Entry"]}, {"label": _("Payment"), "items": ["Payment Entry", "Payment Request", "Journal Entry"]}, ], diff --git a/erpnext/selling/doctype/sales_order/sales_order_list.js b/erpnext/selling/doctype/sales_order/sales_order_list.js index 5ccd5d551cb..46d115a1713 100644 --- a/erpnext/selling/doctype/sales_order/sales_order_list.js +++ b/erpnext/selling/doctype/sales_order/sales_order_list.js @@ -20,14 +20,14 @@ frappe.listview_settings["Sales Order"] = { return [__("On Hold"), "orange", "status,=,On Hold"]; } else if (doc.status === "Completed") { return [__("Completed"), "green", "status,=,Completed"]; - } else if (!doc.skip_delivery_note && flt(doc.per_delivered, 2) < 100) { + } else if (!doc.skip_delivery_note && flt(doc.per_delivered) < 100) { if (frappe.datetime.get_diff(doc.delivery_date) < 0) { // not delivered & overdue return [__("Overdue"), "red", "per_delivered,<,100|delivery_date,<,Today|status,!=,Closed"]; } else if (flt(doc.grand_total) === 0) { // not delivered (zeroount order) return [__("To Deliver"), "orange", "per_delivered,<,100|grand_total,=,0|status,!=,Closed"]; - } else if (flt(doc.per_billed, 2) < 100) { + } else if (flt(doc.per_billed) < 100) { // not delivered & not billed return [ __("To Deliver and Bill"), @@ -39,13 +39,13 @@ frappe.listview_settings["Sales Order"] = { return [__("To Deliver"), "orange", "per_delivered,<,100|per_billed,=,100|status,!=,Closed"]; } } else if ( - flt(doc.per_delivered, 2) === 100 && + flt(doc.per_delivered) === 100 && flt(doc.grand_total) !== 0 && - flt(doc.per_billed, 2) < 100 + flt(doc.per_billed) < 100 ) { // to bill return [__("To Bill"), "orange", "per_delivered,=,100|per_billed,<,100|status,!=,Closed"]; - } else if (doc.skip_delivery_note && flt(doc.per_billed, 2) < 100) { + } else if (doc.skip_delivery_note && flt(doc.per_billed) < 100) { return [__("To Bill"), "orange", "per_billed,<,100|status,!=,Closed"]; } }, diff --git a/erpnext/selling/doctype/sales_order/test_sales_order.py b/erpnext/selling/doctype/sales_order/test_sales_order.py index 53c629a90b4..244a6b1ddad 100644 --- a/erpnext/selling/doctype/sales_order/test_sales_order.py +++ b/erpnext/selling/doctype/sales_order/test_sales_order.py @@ -30,6 +30,7 @@ from erpnext.selling.doctype.sales_order.sales_order import ( ) from erpnext.stock.doctype.item.test_item import make_item from erpnext.stock.doctype.stock_entry.stock_entry_utils import make_stock_entry +from erpnext.stock.get_item_details import get_bin_details class TestSalesOrder(AccountsTestMixin, FrappeTestCase): @@ -96,6 +97,12 @@ class TestSalesOrder(AccountsTestMixin, FrappeTestCase): self.assertEqual(mr.material_request_type, "Purchase") self.assertEqual(len(mr.get("items")), len(so.get("items"))) + for item in mr.get("items"): + actual_qty = get_bin_details(item.item_code, item.warehouse, mr.company, True).get( + "actual_qty", 0 + ) + self.assertEqual(flt(item.actual_qty), actual_qty) + def test_make_delivery_note(self): so = make_sales_order(do_not_submit=True) diff --git a/erpnext/selling/doctype/sales_order_item/sales_order_item.json b/erpnext/selling/doctype/sales_order_item/sales_order_item.json index d451768eaab..fb9e895ccb7 100644 --- a/erpnext/selling/doctype/sales_order_item/sales_order_item.json +++ b/erpnext/selling/doctype/sales_order_item/sales_order_item.json @@ -78,11 +78,14 @@ "against_blanket_order", "blanket_order", "blanket_order_rate", + "available_quantity_section", + "actual_qty", + "column_break_jpky", + "company_total_stock", "manufacturing_section_section", "bom_no", "planning_section", "projected_qty", - "actual_qty", "ordered_qty", "planned_qty", "production_plan_qty", @@ -636,7 +639,7 @@ "allow_on_submit": 1, "fieldname": "actual_qty", "fieldtype": "Float", - "label": "Actual Qty", + "label": "Qty (Warehouse)", "no_copy": 1, "print_hide": 1, "print_width": "70px", @@ -905,12 +908,30 @@ "label": "Is Stock Item", "print_hide": 1, "report_hide": 1 + }, + { + "allow_on_submit": 1, + "fieldname": "company_total_stock", + "fieldtype": "Float", + "label": "Qty (Company)", + "no_copy": 1, + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "column_break_jpky", + "fieldtype": "Column Break" + }, + { + "fieldname": "available_quantity_section", + "fieldtype": "Section Break", + "label": "Available Quantity" } ], "idx": 1, "istable": 1, "links": [], - "modified": "2024-03-21 18:15:56.625005", + "modified": "2024-11-21 14:21:29.743474", "modified_by": "Administrator", "module": "Selling", "name": "Sales Order Item", @@ -921,4 +942,4 @@ "sort_order": "DESC", "states": [], "track_changes": 1 -} \ No newline at end of file +} diff --git a/erpnext/selling/doctype/sales_order_item/sales_order_item.py b/erpnext/selling/doctype/sales_order_item/sales_order_item.py index fa7b9b968f3..888ea755e2e 100644 --- a/erpnext/selling/doctype/sales_order_item/sales_order_item.py +++ b/erpnext/selling/doctype/sales_order_item/sales_order_item.py @@ -30,6 +30,7 @@ class SalesOrderItem(Document): blanket_order_rate: DF.Currency bom_no: DF.Link | None brand: DF.Link | None + company_total_stock: DF.Float conversion_factor: DF.Float customer_item_code: DF.Data | None delivered_by_supplier: DF.Check diff --git a/erpnext/selling/number_card/active_customers/active_customers.json b/erpnext/selling/number_card/active_customers/active_customers.json index 33776348477..7a31a21f6fd 100644 --- a/erpnext/selling/number_card/active_customers/active_customers.json +++ b/erpnext/selling/number_card/active_customers/active_customers.json @@ -3,7 +3,6 @@ "docstatus": 0, "doctype": "Number Card", "document_type": "Customer", - "dynamic_filters_json": "", "filters_json": "[[\"Customer\",\"disabled\",\"=\",\"0\"]]", "function": "Count", "idx": 0, diff --git a/erpnext/selling/page/point_of_sale/point_of_sale.py b/erpnext/selling/page/point_of_sale/point_of_sale.py index 2bb61a6439c..206e51bbc5a 100644 --- a/erpnext/selling/page/point_of_sale/point_of_sale.py +++ b/erpnext/selling/page/point_of_sale/point_of_sale.py @@ -35,6 +35,7 @@ def search_by_term(search_term, warehouse, price_list): "description": item_doc.description, "is_stock_item": item_doc.is_stock_item, "item_code": item_doc.name, + "item_group": item_doc.item_group, "item_image": item_doc.image, "item_name": item_doc.item_name, "serial_no": serial_no, @@ -92,6 +93,14 @@ def search_by_term(search_term, warehouse, price_list): return {"items": [item]} +def filter_result_items(result, pos_profile): + if result and result.get("items"): + pos_item_groups = frappe.db.get_all("POS Item Group", {"parent": pos_profile}, pluck="item_group") + if not pos_item_groups: + return + result["items"] = [item for item in result.get("items") if item.get("item_group") in pos_item_groups] + + @frappe.whitelist() def get_items(start, page_length, price_list, item_group, pos_profile, search_term=""): warehouse, hide_unavailable_items = frappe.db.get_value( @@ -102,6 +111,7 @@ def get_items(start, page_length, price_list, item_group, pos_profile, search_te if search_term: result = search_by_term(search_term, warehouse, price_list) or [] + filter_result_items(result, pos_profile) if result: return result @@ -159,6 +169,8 @@ def get_items(start, page_length, price_list, item_group, pos_profile, search_te if not items_data: return result + current_date = frappe.utils.today() + for item in items_data: uoms = frappe.get_doc("Item", item.item_code).get("uoms", []) @@ -167,12 +179,16 @@ def get_items(start, page_length, price_list, item_group, pos_profile, search_te item_price = frappe.get_all( "Item Price", - fields=["price_list_rate", "currency", "uom", "batch_no"], + fields=["price_list_rate", "currency", "uom", "batch_no", "valid_from", "valid_upto"], filters={ "price_list": price_list, "item_code": item.item_code, "selling": True, + "valid_from": ["<=", current_date], + "valid_upto": ["in", [None, "", current_date]], }, + order_by="valid_from desc", + limit=1, ) if not item_price: diff --git a/erpnext/selling/page/point_of_sale/pos_controller.js b/erpnext/selling/page/point_of_sale/pos_controller.js index 000a79b70a0..c1127c39cc0 100644 --- a/erpnext/selling/page/point_of_sale/pos_controller.js +++ b/erpnext/selling/page/point_of_sale/pos_controller.js @@ -30,7 +30,7 @@ erpnext.PointOfSale.Controller = class { fieldname: "mode_of_payment", fieldtype: "Link", in_list_view: 1, - label: "Mode of Payment", + label: __("Mode of Payment"), options: "Mode of Payment", reqd: 1, }, @@ -38,7 +38,7 @@ erpnext.PointOfSale.Controller = class { fieldname: "opening_amount", fieldtype: "Currency", in_list_view: 1, - label: "Opening Amount", + label: __("Opening Amount"), options: "company:company_currency", change: function () { dialog.fields_dict.balance_details.df.data.some((d) => { @@ -87,7 +87,7 @@ erpnext.PointOfSale.Controller = class { { fieldname: "balance_details", fieldtype: "Table", - label: "Opening Balance Details", + label: __("Opening Balance Details"), cannot_add_rows: false, in_place_edit: true, reqd: 1, @@ -547,6 +547,8 @@ erpnext.PointOfSale.Controller = class { async on_cart_update(args) { frappe.dom.freeze(); + if (this.frm.doc.set_warehouse != this.settings.warehouse) + this.frm.doc.set_warehouse = this.settings.warehouse; let item_row = undefined; try { let { field, value, item } = args; @@ -554,7 +556,7 @@ erpnext.PointOfSale.Controller = class { const item_row_exists = !$.isEmptyObject(item_row); const from_selector = field === "qty" && value === "+1"; - if (from_selector) value = flt(item_row.stock_qty) + flt(value); + if (from_selector) value = flt(item_row.qty) + flt(value); if (item_row_exists) { if (field === "qty") value = flt(value); @@ -685,7 +687,7 @@ erpnext.PointOfSale.Controller = class { const is_stock_item = resp[1]; frappe.dom.unfreeze(); - const bold_uom = item_row.uom.bold(); + const bold_uom = item_row.stock_uom.bold(); const bold_item_code = item_row.item_code.bold(); const bold_warehouse = warehouse.bold(); const bold_available_qty = available_qty.toString().bold(); diff --git a/erpnext/selling/page/point_of_sale/pos_item_cart.js b/erpnext/selling/page/point_of_sale/pos_item_cart.js index 694f70d4db5..6342b237f6e 100644 --- a/erpnext/selling/page/point_of_sale/pos_item_cart.js +++ b/erpnext/selling/page/point_of_sale/pos_item_cart.js @@ -389,28 +389,14 @@ erpnext.PointOfSale.ItemCart = class { placeholder: discount ? discount + "%" : __("Enter discount percentage."), input_class: "input-xs", onchange: function () { - if (flt(this.value) != 0) { - frappe.model.set_value( - frm.doc.doctype, - frm.doc.name, - "additional_discount_percentage", - flt(this.value) - ); - me.hide_discount_control(this.value); - } else { - frappe.model.set_value( - frm.doc.doctype, - frm.doc.name, - "additional_discount_percentage", - 0 - ); - me.$add_discount_elem.css({ - border: "1px dashed var(--gray-500)", - padding: "var(--padding-sm) var(--padding-md)", - }); - me.$add_discount_elem.html(`${me.get_discount_icon()} ${__("Add Discount")}`); - me.discount_field = undefined; - } + this.value = flt(this.value); + frappe.model.set_value( + frm.doc.doctype, + frm.doc.name, + "additional_discount_percentage", + flt(this.value) + ); + me.hide_discount_control(this.value); }, }, parent: this.$add_discount_elem.find(".add-discount-field"), @@ -421,9 +407,13 @@ erpnext.PointOfSale.ItemCart = class { } hide_discount_control(discount) { - if (!discount) { - this.$add_discount_elem.css({ padding: "0px", border: "none" }); - this.$add_discount_elem.html(`
`); + if (!flt(discount)) { + this.$add_discount_elem.css({ + border: "1px dashed var(--gray-500)", + padding: "var(--padding-sm) var(--padding-md)", + }); + this.$add_discount_elem.html(`${this.get_discount_icon()} ${__("Add Discount")}`); + this.discount_field = undefined; } else { this.$add_discount_elem.css({ border: "1px dashed var(--dark-green-500)", @@ -976,13 +966,15 @@ erpnext.PointOfSale.ItemCart = class { if (!res.length) { transaction_container.html( - `
No recent transactions found
` + `
${__("No recent transactions found")}
` ); return; } const elapsed_time = moment(res[0].posting_date + " " + res[0].posting_time).fromNow(); - this.$customer_section.find(".customer-desc").html(`Last transacted ${elapsed_time}`); + this.$customer_section + .find(".customer-desc") + .html(`${__("Last transacted")} ${__(elapsed_time)}`); res.forEach((invoice) => { const posting_datetime = moment(invoice.posting_date + " " + invoice.posting_time).format( @@ -1007,7 +999,7 @@ erpnext.PointOfSale.ItemCart = class {
- ${invoice.status} + ${__(invoice.status)}
@@ -1051,6 +1043,7 @@ erpnext.PointOfSale.ItemCart = class { this.highlight_checkout_btn(false); } + this.hide_discount_control(frm.doc.additional_discount_percentage); this.update_totals_section(frm); if (frm.doc.docstatus === 1) { diff --git a/erpnext/selling/page/point_of_sale/pos_item_details.js b/erpnext/selling/page/point_of_sale/pos_item_details.js index 4673eaa9858..ad4b4cd15be 100644 --- a/erpnext/selling/page/point_of_sale/pos_item_details.js +++ b/erpnext/selling/page/point_of_sale/pos_item_details.js @@ -272,7 +272,7 @@ erpnext.PointOfSale.ItemDetails = class { }; this.warehouse_control.df.get_query = () => { return { - filters: { company: this.events.get_frm().doc.company }, + filters: { company: this.events.get_frm().doc.company, is_group: 0 }, }; }; this.warehouse_control.refresh(); diff --git a/erpnext/selling/page/point_of_sale/pos_item_selector.js b/erpnext/selling/page/point_of_sale/pos_item_selector.js index b5fa8849d60..207a444218b 100644 --- a/erpnext/selling/page/point_of_sale/pos_item_selector.js +++ b/erpnext/selling/page/point_of_sale/pos_item_selector.js @@ -99,7 +99,7 @@ erpnext.PointOfSale.ItemSelector = class { return `
${qty_to_display}
-
+
{ this.print_receipt(); @@ -112,7 +112,7 @@ erpnext.PointOfSale.PastOrderSummary = class { get_discount_html(doc) { if (doc.discount_amount) { return `
-
Discount (${doc.additional_discount_percentage} %)
+
${__("Discount")} (${doc.additional_discount_percentage} %)
${format_currency(doc.discount_amount, doc.currency)}
`; } else { diff --git a/erpnext/selling/page/point_of_sale/pos_payment.js b/erpnext/selling/page/point_of_sale/pos_payment.js index 232b6a02123..bea1918fa20 100644 --- a/erpnext/selling/page/point_of_sale/pos_payment.js +++ b/erpnext/selling/page/point_of_sale/pos_payment.js @@ -350,6 +350,11 @@ erpnext.PointOfSale.Payment = class { } checkout() { + const frm = this.events.get_frm(); + frm.cscript.calculate_outstanding_amount(); + frm.refresh_field("outstanding_amount"); + frm.refresh_field("paid_amount"); + frm.refresh_field("base_paid_amount"); this.events.toggle_other_sections(true); this.toggle_component(true); @@ -584,7 +589,7 @@ erpnext.PointOfSale.Payment = class { const remaining = grand_total - doc.paid_amount; const change = doc.change_amount || remaining <= 0 ? -1 * remaining : undefined; const currency = doc.currency; - const label = change ? __("Change") : __("To Be Paid"); + const label = __("Change Amount"); this.$totals.html( `
diff --git a/erpnext/selling/report/payment_terms_status_for_sales_order/payment_terms_status_for_sales_order.py b/erpnext/selling/report/payment_terms_status_for_sales_order/payment_terms_status_for_sales_order.py index cf61a0e35f3..1b57a6d7390 100644 --- a/erpnext/selling/report/payment_terms_status_for_sales_order/payment_terms_status_for_sales_order.py +++ b/erpnext/selling/report/payment_terms_status_for_sales_order/payment_terms_status_for_sales_order.py @@ -270,11 +270,11 @@ def prepare_chart(s_orders): "labels": [term.payment_term for term in s_orders], "datasets": [ { - "name": "Payment Amount", + "name": _("Payment Amount"), "values": [x.base_payment_amount for x in s_orders], }, { - "name": "Paid Amount", + "name": _("Paid Amount"), "values": [x.paid_amount for x in s_orders], }, ], diff --git a/erpnext/selling/report/sales_analytics/sales_analytics.js b/erpnext/selling/report/sales_analytics/sales_analytics.js index a01103afb96..7c5d5436877 100644 --- a/erpnext/selling/report/sales_analytics/sales_analytics.js +++ b/erpnext/selling/report/sales_analytics/sales_analytics.js @@ -73,6 +73,11 @@ frappe.query_reports["Sales Analytics"] = { default: "Monthly", reqd: 1, }, + { + fieldname: "show_aggregate_value_from_subsidiary_companies", + label: __("Show Aggregate Value from Subsidiary Companies"), + fieldtype: "Check", + }, ], get_datatable_options(options) { return Object.assign(options, { diff --git a/erpnext/selling/report/sales_analytics/sales_analytics.py b/erpnext/selling/report/sales_analytics/sales_analytics.py index 27d2e6e555e..262687ef19d 100644 --- a/erpnext/selling/report/sales_analytics/sales_analytics.py +++ b/erpnext/selling/report/sales_analytics/sales_analytics.py @@ -4,6 +4,8 @@ import frappe from frappe import _, scrub +from frappe.query_builder import DocType +from frappe.query_builder.functions import IfNull from frappe.utils import add_days, add_to_date, flt, getdate from erpnext.accounts.utils import get_fiscal_year @@ -37,7 +39,26 @@ class Analytics: ] self.get_period_date_ranges() + def update_company_list_for_parent_company(self): + company_list = [self.filters.get("company")] + + selected_company = self.filters.get("company") + if ( + selected_company + and self.filters.get("show_aggregate_value_from_subsidiary_companies") + and frappe.db.get_value("Company", selected_company, "is_group") + ): + lft, rgt = frappe.db.get_value("Company", selected_company, ["lft", "rgt"]) + child_companies = frappe.db.get_list( + "Company", filters={"lft": [">", lft], "rgt": ["<", rgt]}, pluck="name" + ) + + company_list.extend(child_companies) + + self.filters["company"] = company_list + def run(self): + self.update_company_list_for_parent_company() self.get_columns() self.get_data() self.get_chart_data() @@ -123,14 +144,23 @@ class Analytics: else: value_field = "total_qty" - self.entries = frappe.db.sql( - """ select s.order_type as entity, s.{value_field} as value_field, s.{date_field} - from `tab{doctype}` s where s.docstatus = 1 and s.company = %s and s.{date_field} between %s and %s - and ifnull(s.order_type, '') != '' order by s.order_type - """.format(date_field=self.date_field, value_field=value_field, doctype=self.filters.doc_type), - (self.filters.company, self.filters.from_date, self.filters.to_date), - as_dict=1, - ) + doctype = DocType(self.filters.doc_type) + + self.entries = ( + frappe.qb.from_(doctype) + .select( + doctype.order_type.as_("entity"), + doctype[self.date_field], + doctype[value_field].as_("value_field"), + ) + .where( + (doctype.docstatus == 1) + & (doctype.company.isin(self.filters.company)) + & (doctype[self.date_field].between(self.filters.from_date, self.filters.to_date)) + & (IfNull(doctype.order_type, "") != "") + ) + .orderby(doctype.order_type) + ).run(as_dict=True) self.get_teams() @@ -152,7 +182,7 @@ class Analytics: fields=[entity, entity_name, value_field, self.date_field], filters={ "docstatus": 1, - "company": self.filters.company, + "company": ["in", self.filters.company], self.date_field: ("between", [self.filters.from_date, self.filters.to_date]), }, ) @@ -167,16 +197,26 @@ class Analytics: else: value_field = "stock_qty" - self.entries = frappe.db.sql( - """ - select i.item_code as entity, i.item_name as entity_name, i.stock_uom, i.{value_field} as value_field, s.{date_field} - from `tab{doctype} Item` i , `tab{doctype}` s - where s.name = i.parent and i.docstatus = 1 and s.company = %s - and s.{date_field} between %s and %s - """.format(date_field=self.date_field, value_field=value_field, doctype=self.filters.doc_type), - (self.filters.company, self.filters.from_date, self.filters.to_date), - as_dict=1, - ) + doctype = DocType(self.filters.doc_type) + doctype_item = DocType(f"{self.filters.doc_type} Item") + + self.entries = ( + frappe.qb.from_(doctype_item) + .join(doctype) + .on(doctype.name == doctype_item.parent) + .select( + doctype_item.item_code.as_("entity"), + doctype_item.item_name.as_("entity_name"), + doctype_item.stock_uom, + doctype_item[value_field].as_("value_field"), + doctype[self.date_field], + ) + .where( + (doctype_item.docstatus == 1) + & (doctype.company.isin(self.filters.company)) + & (doctype[self.date_field].between(self.filters.from_date, self.filters.to_date)) + ) + ).run(as_dict=True) self.entity_names = {} for d in self.entries: @@ -201,7 +241,7 @@ class Analytics: fields=[entity_field, value_field, self.date_field], filters={ "docstatus": 1, - "company": self.filters.company, + "company": ["in", self.filters.company], self.date_field: ("between", [self.filters.from_date, self.filters.to_date]), }, ) @@ -213,16 +253,24 @@ class Analytics: else: value_field = "qty" - self.entries = frappe.db.sql( - f""" - select i.item_group as entity, i.{value_field} as value_field, s.{self.date_field} - from `tab{self.filters.doc_type} Item` i , `tab{self.filters.doc_type}` s - where s.name = i.parent and i.docstatus = 1 and s.company = %s - and s.{self.date_field} between %s and %s - """, - (self.filters.company, self.filters.from_date, self.filters.to_date), - as_dict=1, - ) + doctype = DocType(self.filters.doc_type) + doctype_item = DocType(f"{self.filters.doc_type} Item") + + self.entries = ( + frappe.qb.from_(doctype_item) + .join(doctype) + .on(doctype.name == doctype_item.parent) + .select( + doctype_item.item_group.as_("entity"), + doctype_item[value_field].as_("value_field"), + doctype[self.date_field], + ) + .where( + (doctype_item.docstatus == 1) + & (doctype.company.isin(self.filters.company)) + & (doctype[self.date_field].between(self.filters.from_date, self.filters.to_date)) + ) + ).run(as_dict=True) self.get_groups() @@ -239,7 +287,7 @@ class Analytics: fields=[entity, value_field, self.date_field], filters={ "docstatus": 1, - "company": self.filters.company, + "company": ["in", self.filters.company], "project": ["!=", ""], self.date_field: ("between", [self.filters.from_date, self.filters.to_date]), }, @@ -312,7 +360,7 @@ class Analytics: str(((posting_date.month - 1) // 3) + 1), str(posting_date.year) ) else: - year = get_fiscal_year(posting_date, company=self.filters.company) + year = get_fiscal_year(posting_date, company=self.filters.company[0]) period = str(year[0]) return period diff --git a/erpnext/selling/report/sales_order_analysis/sales_order_analysis.py b/erpnext/selling/report/sales_order_analysis/sales_order_analysis.py index 70b021a9cab..8fcf29bd7a6 100644 --- a/erpnext/selling/report/sales_order_analysis/sales_order_analysis.py +++ b/erpnext/selling/report/sales_order_analysis/sales_order_analysis.py @@ -206,7 +206,7 @@ def prepare_data(data, so_elapsed_time, filters): def prepare_chart_data(pending, completed): - labels = ["Amount to Bill", "Billed Amount"] + labels = [_("Amount to Bill"), _("Billed Amount")] return { "data": {"labels": labels, "datasets": [{"values": [pending, completed]}]}, diff --git a/erpnext/selling/report/sales_order_trends/sales_order_trends.js b/erpnext/selling/report/sales_order_trends/sales_order_trends.js index 28bd5504930..a44353cf54b 100644 --- a/erpnext/selling/report/sales_order_trends/sales_order_trends.js +++ b/erpnext/selling/report/sales_order_trends/sales_order_trends.js @@ -2,3 +2,10 @@ // License: GNU General Public License v3. See license.txt frappe.query_reports["Sales Order Trends"] = $.extend({}, erpnext.sales_trends_filters); + +frappe.query_reports["Sales Order Trends"]["filters"].push({ + fieldname: "include_closed_orders", + label: __("Include Closed Orders"), + fieldtype: "Check", + default: 0, +}); diff --git a/erpnext/setup/default_success_action.py b/erpnext/setup/default_success_action.py index 2b9e75c3265..dba20548184 100644 --- a/erpnext/setup/default_success_action.py +++ b/erpnext/setup/default_success_action.py @@ -11,14 +11,17 @@ doctype_list = [ def get_message(doctype): - return _("{0} has been submitted successfully").format(_(doctype)) + # Properly format the string with translated doctype + return _("{0} has been submitted successfully").format(doctype) def get_first_success_message(doctype): + # Reuse the get_message function for consistency return get_message(doctype) def get_default_success_action(): + # Loop through each doctype in the list and return formatted actions return [ { "doctype": "Success Action", diff --git a/erpnext/setup/doctype/brand/brand.js b/erpnext/setup/doctype/brand/brand.js index 5d16d734e0f..99b4ace6cd2 100644 --- a/erpnext/setup/doctype/brand/brand.js +++ b/erpnext/setup/doctype/brand/brand.js @@ -3,22 +3,14 @@ frappe.ui.form.on("Brand", { setup: (frm) => { - frm.fields_dict["brand_defaults"].grid.get_field("default_warehouse").get_query = function ( - doc, - cdt, - cdn - ) { + frm.set_query("default_warehouse", "brand_defaults", function (doc, cdt, cdn) { const row = locals[cdt][cdn]; return { filters: { company: row.company }, }; - }; + }); - frm.fields_dict["brand_defaults"].grid.get_field("default_discount_account").get_query = function ( - doc, - cdt, - cdn - ) { + frm.set_query("default_discount_account", "brand_defaults", function (doc, cdt, cdn) { const row = locals[cdt][cdn]; return { filters: { @@ -27,13 +19,9 @@ frappe.ui.form.on("Brand", { is_group: 0, }, }; - }; + }); - frm.fields_dict["brand_defaults"].grid.get_field("buying_cost_center").get_query = function ( - doc, - cdt, - cdn - ) { + frm.set_query("buying_cost_center", "brand_defaults", function (doc, cdt, cdn) { const row = locals[cdt][cdn]; return { filters: { @@ -41,25 +29,17 @@ frappe.ui.form.on("Brand", { company: row.company, }, }; - }; + }); - frm.fields_dict["brand_defaults"].grid.get_field("expense_account").get_query = function ( - doc, - cdt, - cdn - ) { + frm.set_query("expense_account", "brand_defaults", function (doc, cdt, cdn) { const row = locals[cdt][cdn]; return { query: "erpnext.controllers.queries.get_expense_account", filters: { company: row.company }, }; - }; + }); - frm.fields_dict["brand_defaults"].grid.get_field("default_provisional_account").get_query = function ( - doc, - cdt, - cdn - ) { + frm.set_query("default_provisional_account", "brand_defaults", function (doc, cdt, cdn) { const row = locals[cdt][cdn]; return { filters: { @@ -68,13 +48,9 @@ frappe.ui.form.on("Brand", { is_group: 0, }, }; - }; + }); - frm.fields_dict["brand_defaults"].grid.get_field("selling_cost_center").get_query = function ( - doc, - cdt, - cdn - ) { + frm.set_query("selling_cost_center", "brand_defaults", function (doc, cdt, cdn) { const row = locals[cdt][cdn]; return { filters: { @@ -82,18 +58,14 @@ frappe.ui.form.on("Brand", { company: row.company, }, }; - }; + }); - frm.fields_dict["brand_defaults"].grid.get_field("income_account").get_query = function ( - doc, - cdt, - cdn - ) { + frm.set_query("income_account", "brand_defaults", function (doc, cdt, cdn) { const row = locals[cdt][cdn]; return { query: "erpnext.controllers.queries.get_income_account", filters: { company: row.company }, }; - }; + }); }, }); diff --git a/erpnext/setup/doctype/brand/brand.json b/erpnext/setup/doctype/brand/brand.json index 45b4db81f1f..8511d221551 100644 --- a/erpnext/setup/doctype/brand/brand.json +++ b/erpnext/setup/doctype/brand/brand.json @@ -56,10 +56,11 @@ "idx": 1, "image_field": "image", "links": [], - "modified": "2021-03-01 15:57:30.005783", + "modified": "2024-08-20 14:10:21.377962", "modified_by": "Administrator", "module": "Setup", "name": "Brand", + "naming_rule": "By fieldname", "owner": "Administrator", "permissions": [ { @@ -108,4 +109,4 @@ "show_name_in_global_search": 1, "sort_field": "modified", "sort_order": "ASC" -} \ No newline at end of file +} diff --git a/erpnext/setup/doctype/company/company.js b/erpnext/setup/doctype/company/company.js index 939eaf25712..72d28a705ad 100644 --- a/erpnext/setup/doctype/company/company.js +++ b/erpnext/setup/doctype/company/company.js @@ -20,7 +20,6 @@ frappe.ui.form.on("Company", { }, setup: function (frm) { frm.__rename_queue = "long"; - erpnext.company.setup_queries(frm); frm.set_query("parent_company", function () { return { @@ -81,6 +80,8 @@ frappe.ui.form.on("Company", { }, refresh: function (frm) { + erpnext.company.setup_queries(frm); + frm.toggle_display("address_html", !frm.is_new()); if (!frm.is_new()) { @@ -251,6 +252,7 @@ erpnext.company.setup_queries = function (frm) { ["default_expense_account", { root_type: "Expense" }], ["default_income_account", { root_type: "Income" }], ["round_off_account", { root_type: "Expense" }], + ["round_off_for_opening", { root_type: "Liability", account_type: "Round Off for Opening" }], ["write_off_account", { root_type: "Expense" }], ["default_deferred_expense_account", {}], ["default_deferred_revenue_account", {}], diff --git a/erpnext/setup/doctype/company/company.json b/erpnext/setup/doctype/company/company.json index 284bd2b7f22..271b440fbda 100644 --- a/erpnext/setup/doctype/company/company.json +++ b/erpnext/setup/doctype/company/company.json @@ -48,23 +48,30 @@ "default_bank_account", "default_cash_account", "default_receivable_account", - "round_off_account", - "round_off_cost_center", + "default_payable_account", "write_off_account", - "exchange_gain_loss_account", - "unrealized_exchange_gain_loss_account", "unrealized_profit_loss_account", "column_break0", "allow_account_creation_against_child_company", - "default_payable_account", "default_expense_account", "default_income_account", - "default_deferred_revenue_account", - "default_deferred_expense_account", "default_discount_account", "payment_terms", "cost_center", "default_finance_book", + "exchange_gain__loss_section", + "exchange_gain_loss_account", + "column_break_sttp", + "unrealized_exchange_gain_loss_account", + "round_off_section", + "round_off_account", + "round_off_cost_center", + "column_break_jqfo", + "round_off_for_opening", + "deferred_accounting_section", + "default_deferred_revenue_account", + "column_break_dcdl", + "default_deferred_expense_account", "advance_payments_section", "book_advance_payments_in_separate_party_account", "reconcile_on_advance_payment_date", @@ -286,7 +293,7 @@ { "fieldname": "default_settings", "fieldtype": "Section Break", - "label": "Accounts Settings", + "label": "Default Accounts", "oldfieldtype": "Section Break" }, { @@ -801,6 +808,39 @@ "fieldtype": "Link", "label": "Default Operating Cost Account", "options": "Account" + }, + { + "fieldname": "round_off_for_opening", + "fieldtype": "Link", + "label": "Round Off for Opening", + "options": "Account" + }, + { + "fieldname": "exchange_gain__loss_section", + "fieldtype": "Section Break", + "label": "Exchange Gain / Loss" + }, + { + "fieldname": "round_off_section", + "fieldtype": "Section Break", + "label": "Round Off" + }, + { + "fieldname": "deferred_accounting_section", + "fieldtype": "Section Break", + "label": "Deferred Accounting" + }, + { + "fieldname": "column_break_sttp", + "fieldtype": "Column Break" + }, + { + "fieldname": "column_break_jqfo", + "fieldtype": "Column Break" + }, + { + "fieldname": "column_break_dcdl", + "fieldtype": "Column Break" } ], "icon": "fa fa-building", @@ -808,7 +848,7 @@ "image_field": "company_logo", "is_tree": 1, "links": [], - "modified": "2024-07-24 18:17:56.413971", + "modified": "2024-12-02 15:37:32.723176", "modified_by": "Administrator", "module": "Setup", "name": "Company", diff --git a/erpnext/setup/doctype/company/company.py b/erpnext/setup/doctype/company/company.py index f79ea60f5c4..d781288c8bd 100644 --- a/erpnext/setup/doctype/company/company.py +++ b/erpnext/setup/doctype/company/company.py @@ -91,6 +91,7 @@ class Company(NestedSet): rgt: DF.Int round_off_account: DF.Link | None round_off_cost_center: DF.Link | None + round_off_for_opening: DF.Link | None sales_monthly_history: DF.SmallText | None series_for_depreciation_entry: DF.Data | None stock_adjustment_account: DF.Link | None @@ -203,7 +204,7 @@ class Company(NestedSet): ): frappe.throw( _("'{0}' should be in company currency {1}.").format( - frappe.bold("Default Advance Received Account"), frappe.bold(self.default_currency) + frappe.bold(_("Default Advance Received Account")), frappe.bold(self.default_currency) ) ) @@ -214,7 +215,7 @@ class Company(NestedSet): ): frappe.throw( _("'{0}' should be in company currency {1}.").format( - frappe.bold("Default Advance Paid Account"), frappe.bold(self.default_currency) + frappe.bold(_("Default Advance Paid Account")), frappe.bold(self.default_currency) ) ) @@ -447,7 +448,7 @@ class Company(NestedSet): ): frappe.throw( _("Set default {0} account for non stock items").format( - frappe.bold("Provisional Account") + frappe.bold(_("Provisional Account")) ) ) diff --git a/erpnext/setup/doctype/currency_exchange/currency_exchange.js b/erpnext/setup/doctype/currency_exchange/currency_exchange.js index 82f0e22ee61..d4501e5d0da 100644 --- a/erpnext/setup/doctype/currency_exchange/currency_exchange.js +++ b/erpnext/setup/doctype/currency_exchange/currency_exchange.js @@ -1,30 +1,32 @@ // Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors // License: GNU General Public License v3. See license.txt -extend_cscript(cur_frm.cscript, { - onload: function () { - if (cur_frm.doc.__islocal) { - cur_frm.set_value("to_currency", frappe.defaults.get_global_default("currency")); +frappe.ui.form.on("Currency Exchange", { + onload: function (frm) { + if (frm.doc.__islocal) { + frm.set_value("to_currency", frappe.defaults.get_global_default("currency")); } }, - refresh: function () { - cur_frm.cscript.set_exchange_rate_label(); + refresh: function (frm) { + // Don't trigger on Quick Entry form + if (typeof frm.is_dialog === "undefined") { + frm.trigger("set_exchange_rate_label"); + } }, - from_currency: function () { - cur_frm.cscript.set_exchange_rate_label(); + from_currency: function (frm) { + frm.trigger("set_exchange_rate_label"); }, - to_currency: function () { - cur_frm.cscript.set_exchange_rate_label(); + to_currency: function (frm) { + frm.trigger("set_exchange_rate_label"); }, - - set_exchange_rate_label: function () { - if (cur_frm.doc.from_currency && cur_frm.doc.to_currency) { - var default_label = __(frappe.meta.docfield_map[cur_frm.doctype]["exchange_rate"].label); - cur_frm.fields_dict.exchange_rate.set_label( - default_label + repl(" (1 %(from_currency)s = [?] %(to_currency)s)", cur_frm.doc) + set_exchange_rate_label: function (frm) { + if (frm.doc.from_currency && frm.doc.to_currency) { + var default_label = __(frappe.meta.docfield_map[frm.doctype]["exchange_rate"].label); + frm.fields_dict.exchange_rate.set_label( + default_label + repl(" (1 %(from_currency)s = [?] %(to_currency)s)", frm.doc) ); } }, diff --git a/erpnext/setup/doctype/currency_exchange/test_currency_exchange.py b/erpnext/setup/doctype/currency_exchange/test_currency_exchange.py index 3249c93ef87..d28b1e65b7b 100644 --- a/erpnext/setup/doctype/currency_exchange/test_currency_exchange.py +++ b/erpnext/setup/doctype/currency_exchange/test_currency_exchange.py @@ -68,9 +68,9 @@ def patched_requests_get(*args, **kwargs): if kwargs["params"].get("date") and kwargs["params"].get("from") and kwargs["params"].get("to"): if test_exchange_values.get(kwargs["params"]["date"]): return PatchResponse({"result": test_exchange_values[kwargs["params"]["date"]]}, 200) - elif args[0].startswith("https://frankfurter.app") and kwargs.get("params"): + elif args[0].startswith("https://api.frankfurter.app") and kwargs.get("params"): if kwargs["params"].get("base") and kwargs["params"].get("symbols"): - date = args[0].replace("https://frankfurter.app/", "") + date = args[0].replace("https://api.frankfurter.app/", "") if test_exchange_values.get(date): return PatchResponse( {"rates": {kwargs["params"].get("symbols"): test_exchange_values.get(date)}}, 200 diff --git a/erpnext/setup/doctype/customer_group/customer_group.py b/erpnext/setup/doctype/customer_group/customer_group.py index 06f2f43374e..5dd0fd02011 100644 --- a/erpnext/setup/doctype/customer_group/customer_group.py +++ b/erpnext/setup/doctype/customer_group/customer_group.py @@ -71,14 +71,9 @@ class CustomerGroup(NestedSet): ) def on_update(self): - self.validate_name_with_customer() super().on_update() self.validate_one_root() - def validate_name_with_customer(self): - if frappe.db.exists("Customer", self.name): - frappe.msgprint(_("A customer with the same name already exists"), raise_exception=1) - def get_parent_customer_groups(customer_group): lft, rgt = frappe.db.get_value("Customer Group", customer_group, ["lft", "rgt"]) diff --git a/erpnext/setup/doctype/holiday_list/holiday_list.py b/erpnext/setup/doctype/holiday_list/holiday_list.py index 0216f75a628..b7920236ce1 100644 --- a/erpnext/setup/doctype/holiday_list/holiday_list.py +++ b/erpnext/setup/doctype/holiday_list/holiday_list.py @@ -149,7 +149,11 @@ class HolidayList(Document): unique_dates = [] for row in self.holidays: if row.holiday_date in unique_dates: - frappe.throw(_("Holiday Date {0} added multiple times").format(frappe.bold(row.holiday_date))) + frappe.throw( + _("Holiday Date {0} added multiple times").format( + frappe.bold(formatdate(row.holiday_date)) + ) + ) unique_dates.append(row.holiday_date) diff --git a/erpnext/setup/doctype/transaction_deletion_record/transaction_deletion_record.py b/erpnext/setup/doctype/transaction_deletion_record/transaction_deletion_record.py index c9c3c837ceb..ce3f918f7eb 100644 --- a/erpnext/setup/doctype/transaction_deletion_record/transaction_deletion_record.py +++ b/erpnext/setup/doctype/transaction_deletion_record/transaction_deletion_record.py @@ -485,8 +485,14 @@ def is_deletion_doc_running(company: str | None = None, err_msg: str | None = No def check_for_running_deletion_job(doc, method=None): # Check if DocType has 'company' field - df = qb.DocType("DocField") - if qb.from_(df).select(df.parent).where((df.fieldname == "company") & (df.parent == doc.doctype)).run(): - is_deletion_doc_running( - doc.company, _("Cannot make any transactions until the deletion job is completed") - ) + if doc.doctype not in ("GL Entry", "Payment Ledger Entry", "Stock Ledger Entry"): + df = qb.DocType("DocField") + if ( + qb.from_(df) + .select(df.parent) + .where((df.fieldname == "company") & (df.parent == doc.doctype)) + .run() + ): + is_deletion_doc_running( + doc.company, _("Cannot make any transactions until the deletion job is completed") + ) diff --git a/erpnext/setup/install.py b/erpnext/setup/install.py index bba9e79a348..97ec418d955 100644 --- a/erpnext/setup/install.py +++ b/erpnext/setup/install.py @@ -98,7 +98,7 @@ def setup_currency_exchange(): ces.set("result_key", []) ces.set("req_params", []) - ces.api_endpoint = "https://frankfurter.app/{transaction_date}" + ces.api_endpoint = "https://api.frankfurter.app/{transaction_date}" ces.append("result_key", {"key": "rates"}) ces.append("result_key", {"key": "{to_currency}"}) ces.append("req_params", {"key": "base", "value": "{from_currency}"}) diff --git a/erpnext/setup/setup_wizard/data/country_wise_tax.json b/erpnext/setup/setup_wizard/data/country_wise_tax.json index a746ebee7ed..efe1d705c51 100644 --- a/erpnext/setup/setup_wizard/data/country_wise_tax.json +++ b/erpnext/setup/setup_wizard/data/country_wise_tax.json @@ -449,18 +449,355 @@ }, "France": { - "France VAT 20%": { - "account_name": "VAT 20%", - "tax_rate": 20, - "default": 1 - }, - "France VAT 10%": { - "account_name": "VAT 10%", - "tax_rate": 10 - }, - "France VAT 5.5%": { - "account_name": "VAT 5.5%", - "tax_rate": 5.5 + "chart_of_accounts": { + "France - Plan Comptable General avec code": { + "sales_tax_templates": [ + { + "title": "TVA 20% Collectée", + "tax_category": "Vente Domestique", + "taxes": [ + { + "account_head": { + "account_name": "TVA 20% Collectée", + "account_number": "445720", + "root_type": "Liability", + "tax_rate": 20.0 + }, + "description": "TVA 20%", + "rate": 20 + } + ] + }, + { + "title": "TVA 10% Collectée", + "tax_category": "Vente Domestique", + "taxes": [ + { + "account_head": { + "account_name": "TVA 10% Collectée", + "account_number": "445710", + "root_type": "Liability", + "tax_rate": 10.0 + }, + "description": "TVA 10%", + "rate": 10 + } + ] + }, + { + "title": "TVA 5.5% Collectée", + "tax_category": "Vente Domestique", + "taxes": [ + { + "account_head": { + "account_name": "TVA 5.5% Collectée", + "account_number": "445755", + "root_type": "Liability", + "tax_rate": 5.5 + }, + "description": "TVA 5.5%", + "rate": 5.5 + } + ] + }, + { + "title": "TVA 2.1% Collectée", + "tax_category": "Vente Domestique", + "taxes": [ + { + "account_head": { + "account_name": "TVA 2.1% Collectée", + "account_number": "445721", + "root_type": "Liability", + "tax_rate": 2.10 + }, + "description": "TVA 2.1%", + "rate": 2.1 + } + ] + } + ], + "purchase_tax_templates": [ + { + "title": "TVA 20% Déductible", + "tax_category": "Achat Domestique", + "taxes": [ + { + "account_head": { + "account_name": "TVA 20% Déductible", + "account_number": "445620", + "root_type": "Asset", + "tax_rate": 20.0 + }, + "description": "TVA 20%", + "rate": 20 + } + ] + }, + { + "title": "TVA 10% Déductible", + "tax_category": "Achat Domestique", + "taxes": [ + { + "account_head": { + "account_name": "TVA 10% Déductible", + "account_number": "445610", + "root_type": "Asset", + "tax_rate": 10.0 + }, + "description": "TVA 10%", + "rate": 10 + } + ] + }, + { + "title": "TVA 5.5% Déductible", + "tax_category": "Achat Domestique", + "taxes": [ + { + "account_head": { + "account_name": "TVA 5.5% Déductible", + "account_number": "445655", + "root_type": "Asset", + "tax_rate": 5.5 + }, + "description": "TVA 5.5%", + "rate": 5.5 + } + ] + }, + { + "title": "TVA 2.1% Déductible", + "tax_category": "Achat Domestique", + "taxes": [ + { + "account_head": { + "account_name": "TVA 2.1% Déductible", + "account_number": "445621", + "root_type": "Asset", + "tax_rate": 2.1 + }, + "description": "TVA 2.1%", + "rate": 2.1 + } + ] + }, + { + "title": "TVA 20% Déductible - Incluse dans le prix", + "taxes": [ + { + "account_head": { + "account_name": "TVA 20% Déductible", + "account_number": "445620", + "root_type": "Asset", + "tax_rate": 20.0 + }, + "included_in_print_rate": 1, + "description": "TVA 20%", + "rate": 20 + } + ] + }, + { + "title": "TVA 10% Déductible - Incluse dans le prix", + "taxes": [ + { + "account_head": { + "account_name": "TVA 10% Déductible", + "account_number": "445610", + "root_type": "Asset", + "tax_rate": 10.0 + }, + "included_in_print_rate": 1, + "description": "TVA 10%", + "rate": 10 + } + ] + }, + { + "title": "TVA 5.5% Déductible - Incluse dans le prix", + "taxes": [ + { + "account_head": { + "account_name": "TVA 5.5% Déductible", + "account_number": "445655", + "root_type": "Asset", + "tax_rate": 5.5 + }, + "included_in_print_rate": 1, + "description": "TVA 5.5%", + "rate": 5.5 + } + ] + }, + { + "title": "TVA 2.1% Déductible - Incluse dans le prix", + "taxes": [ + { + "account_head": { + "account_name": "TVA 2.1% Déductible", + "account_number": "445621", + "root_type": "Asset", + "tax_rate": 2.1 + }, + "included_in_print_rate": 1, + "description": "TVA 2.1%", + "rate": 2.1 + } + ] + }, + { + "title": "TVA Intracommunautaire", + "tax_category": "Achat - EU", + "taxes": [ + { + "account_head": { + "account_name": "TVA déductible sur acquisition intracommunautaires", + "account_number": "445662", + "root_type": "Asset", + "tax_rate": 20.0, + "add_deduct_tax": "Add" + }, + "description": "TVA déductible sur acquisition intracommunautaires", + "rate": 20 + }, + { + "account_head": { + "account_name": "TVA due intracommunautaire", + "account_number": "445200", + "root_type": "Asset", + "tax_rate": 20.0, + "add_deduct_tax": "Deduct" + }, + "description": "TVA due intracommunautaire", + "rate": 20 + } + ] + } + ], + "item_tax_templates": [ + { + "title": "TVA 20% Déductible - Achat", + "taxes": [ + { + "tax_type": { + "account_name": "TVA 20% Déductible", + "account_number": "445620", + "root_type": "Asset", + "tax_rate": 20.0 + }, + "description": "TVA 20%", + "tax_rate": 20 + } + ] + }, + { + "title": "TVA 10% Déductible - Achat", + "taxes": [ + { + "tax_type": { + "account_name": "TVA 10% Déductible", + "account_number": "445610", + "root_type": "Asset", + "tax_rate": 10.0 + }, + "description": "TVA 10%", + "tax_rate": 10 + } + ] + }, + { + "title": "TVA 5.5% Déductible - Achat", + "taxes": [ + { + "tax_type": { + "account_name": "TVA 5.5% Déductible", + "account_number": "445655", + "root_type": "Asset", + "tax_rate": 5.5 + }, + "description": "TVA 5.5%", + "tax_rate": 5.5 + } + ] + }, + { + "title": "TVA 2.1% Déductible - Achat", + "taxes": [ + { + "tax_type": { + "account_name": "TVA 2.1% Déductible", + "account_number": "445621", + "root_type": "Asset", + "tax_rate": 2.1 + }, + "description": "TVA 2.1%", + "tax_rate": 2.1 + } + ] + }, + { + "title": "TVA 20% Collecté - Vente", + "taxes": [ + { + "tax_type": { + "account_name": "TVA 20% Collecté", + "account_number": "445720", + "root_type": "Liability", + "tax_rate": 20.0 + }, + "description": "TVA 20%", + "tax_rate": 20 + } + ] + }, + { + "title": "TVA 10% Collecté - Vente", + "taxes": [ + { + "tax_type": { + "account_name": "TVA 10% Collecté", + "account_number": "445710", + "root_type": "Liability", + "tax_rate": 10.0 + }, + "description": "TVA 10%", + "tax_rate": 10 + } + ] + }, + { + "title": "TVA 5.5% Collecté - Vente", + "taxes": [ + { + "tax_type": { + "account_name": "TVA 5.5% Collecté", + "account_number": "445755", + "root_type": "Liability", + "tax_rate": 5.5 + }, + "description": "TVA 5.5%", + "tax_rate": 5.5 + } + ] + }, + { + "title": "TVA 2.1% Collecté - Vente", + "taxes": [ + { + "tax_type": { + "account_name": "TVA 2.1% Collecté", + "account_number": "445721", + "root_type": "Liability", + "tax_rate": 2.1 + }, + "description": "TVA 2.1%", + "tax_rate": 2.1 + } + ] + } + ] + } } }, diff --git a/erpnext/setup/setup_wizard/operations/install_fixtures.py b/erpnext/setup/setup_wizard/operations/install_fixtures.py index 0bcb9fb6019..270a9e06054 100644 --- a/erpnext/setup/setup_wizard/operations/install_fixtures.py +++ b/erpnext/setup/setup_wizard/operations/install_fixtures.py @@ -66,29 +66,54 @@ def install(country=None): "parent_item_group": _("All Item Groups"), }, # Stock Entry Type - {"doctype": "Stock Entry Type", "name": "Material Issue", "purpose": "Material Issue"}, - {"doctype": "Stock Entry Type", "name": "Material Receipt", "purpose": "Material Receipt"}, + { + "doctype": "Stock Entry Type", + "name": "Material Issue", + "purpose": "Material Issue", + "is_standard": 1, + }, + { + "doctype": "Stock Entry Type", + "name": "Material Receipt", + "purpose": "Material Receipt", + "is_standard": 1, + }, { "doctype": "Stock Entry Type", "name": "Material Transfer", "purpose": "Material Transfer", + "is_standard": 1, }, - {"doctype": "Stock Entry Type", "name": "Manufacture", "purpose": "Manufacture"}, - {"doctype": "Stock Entry Type", "name": "Repack", "purpose": "Repack"}, + { + "doctype": "Stock Entry Type", + "name": "Manufacture", + "purpose": "Manufacture", + "is_standard": 1, + }, + { + "doctype": "Stock Entry Type", + "name": "Repack", + "purpose": "Repack", + "is_standard": 1, + }, + {"doctype": "Stock Entry Type", "name": "Disassemble", "purpose": "Disassemble", "is_standard": 1}, { "doctype": "Stock Entry Type", "name": "Send to Subcontractor", "purpose": "Send to Subcontractor", + "is_standard": 1, }, { "doctype": "Stock Entry Type", "name": "Material Transfer for Manufacture", "purpose": "Material Transfer for Manufacture", + "is_standard": 1, }, { "doctype": "Stock Entry Type", "name": "Material Consumption for Manufacture", "purpose": "Material Consumption for Manufacture", + "is_standard": 1, }, # territory: with two default territories, one for home country and one named Rest of the World { diff --git a/erpnext/setup/setup_wizard/operations/taxes_setup.py b/erpnext/setup/setup_wizard/operations/taxes_setup.py index 384673448b0..6561f386c55 100644 --- a/erpnext/setup/setup_wizard/operations/taxes_setup.py +++ b/erpnext/setup/setup_wizard/operations/taxes_setup.py @@ -86,7 +86,13 @@ def simple_to_detailed(templates): def from_detailed_data(company_name, data): """Create Taxes and Charges Templates from detailed data.""" - coa_name = frappe.db.get_value("Company", company_name, "chart_of_accounts") + charts_company_name = company_name + if ( + frappe.db.get_value("Company", company_name, "create_chart_of_accounts_based_on") + == "Existing Company" + ): + charts_company_name = frappe.db.get_value("Company", company_name, "existing_company") + coa_name = frappe.db.get_value("Company", charts_company_name, "chart_of_accounts") coa_data = data.get("chart_of_accounts", {}) tax_templates = coa_data.get(coa_name) or coa_data.get("*", {}) tax_categories = data.get("tax_categories") diff --git a/erpnext/stock/dashboard/item_dashboard.js b/erpnext/stock/dashboard/item_dashboard.js index 36a51056bb4..6fc9e6666a2 100644 --- a/erpnext/stock/dashboard/item_dashboard.js +++ b/erpnext/stock/dashboard/item_dashboard.js @@ -48,17 +48,18 @@ erpnext.stock.ItemDashboard = class ItemDashboard { let actual_qty = unescape(element.attr("data-actual_qty")); let disable_quick_entry = Number(unescape(element.attr("data-disable_quick_entry"))); let entry_type = action === "Move" ? "Material Transfer" : "Material Receipt"; + let stock_uom = unescape(element.attr("data-stock-uom")); if (disable_quick_entry) { open_stock_entry(item, warehouse, entry_type); } else { if (action === "Add") { let rate = unescape($(this).attr("data-rate")); - erpnext.stock.move_item(item, null, warehouse, actual_qty, rate, function () { + erpnext.stock.move_item(item, null, warehouse, actual_qty, rate, stock_uom, function () { me.refresh(); }); } else { - erpnext.stock.move_item(item, warehouse, null, actual_qty, null, function () { + erpnext.stock.move_item(item, warehouse, null, actual_qty, null, stock_uom, function () { me.refresh(); }); } @@ -207,7 +208,7 @@ erpnext.stock.ItemDashboard = class ItemDashboard { } }; -erpnext.stock.move_item = function (item, source, target, actual_qty, rate, callback) { +erpnext.stock.move_item = function (item, source, target, actual_qty, rate, stock_uom, callback) { var dialog = new frappe.ui.Dialog({ title: target ? __("Add Item") : __("Move Item"), fields: [ @@ -295,6 +296,8 @@ erpnext.stock.move_item = function (item, source, target, actual_qty, rate, call let row = frappe.model.add_child(doc, "items"); row.item_code = dialog.get_value("item_code"); row.s_warehouse = dialog.get_value("source"); + row.stock_uom = stock_uom; + row.uom = stock_uom; row.t_warehouse = dialog.get_value("target"); row.qty = dialog.get_value("qty"); row.conversion_factor = 1; diff --git a/erpnext/stock/dashboard/item_dashboard.py b/erpnext/stock/dashboard/item_dashboard.py index e6382688669..3d7c21639e0 100644 --- a/erpnext/stock/dashboard/item_dashboard.py +++ b/erpnext/stock/dashboard/item_dashboard.py @@ -71,6 +71,7 @@ def get_data( item.update( { "item_name": frappe.get_cached_value("Item", item.item_code, "item_name"), + "stock_uom": frappe.get_cached_value("Item", item.item_code, "stock_uom"), "disable_quick_entry": frappe.get_cached_value("Item", item.item_code, "has_batch_no") or frappe.get_cached_value("Item", item.item_code, "has_serial_no"), "projected_qty": flt(item.projected_qty, precision), diff --git a/erpnext/stock/dashboard/item_dashboard_list.html b/erpnext/stock/dashboard/item_dashboard_list.html index 3b2619133bf..ae90ff80686 100644 --- a/erpnext/stock/dashboard/item_dashboard_list.html +++ b/erpnext/stock/dashboard/item_dashboard_list.html @@ -49,12 +49,14 @@ data-disable_quick_entry="{{ d.disable_quick_entry }}" data-warehouse="{{ d.warehouse }}" data-actual_qty="{{ d.actual_qty }}" + data-stock-uom="{{ d.stock_uom }}" data-item="{{ escape(d.item_code) }}">{{ __("Move") }} {% endif %}
diff --git a/erpnext/stock/dashboard_chart/oldest_items/oldest_items.json b/erpnext/stock/dashboard_chart/oldest_items/oldest_items.json index 9c10a5346be..a55fe7a6a6c 100644 --- a/erpnext/stock/dashboard_chart/oldest_items/oldest_items.json +++ b/erpnext/stock/dashboard_chart/oldest_items/oldest_items.json @@ -1,22 +1,23 @@ { "chart_name": "Oldest Items", "chart_type": "Report", - "creation": "2020-07-20 21:01:04.336845", + "creation": "2022-03-30 00:58:02.041721", "custom_options": "{\"colors\": [\"#5e64ff\"]}", "docstatus": 0, "doctype": "Dashboard Chart", - "dynamic_filters_json": "{\"company\":\"frappe.defaults.get_user_default(\\\"Company\\\")\",\"to_date\":\"frappe.datetime.nowdate()\"}", - "filters_json": "{\"range1\":30,\"range2\":60,\"range3\":90,\"show_warehouse_wise_stock\":0}", + "dynamic_filters_json": "{\"company\":\"frappe.defaults.get_user_default(\\\"Company\\\")\",\"to_date\":\"frappe.datetime.nowdate()\",\"range1\":\"30\",\"range2\":\"60\",\"range3\":\"90\"}", + "filters_json": "{\"range\":\"30, 60, 90\",\"show_warehouse_wise_stock\":0}", "idx": 0, "is_public": 1, "is_standard": 1, - "modified": "2020-07-29 14:50:26.846482", + "modified": "2024-09-23 22:37:51.392999", "modified_by": "Administrator", "module": "Stock", "name": "Oldest Items", "number_of_groups": 0, "owner": "Administrator", "report_name": "Stock Ageing", + "roles": [], "timeseries": 0, "type": "Bar", "use_report_chart": 1, diff --git a/erpnext/stock/doctype/batch/batch.py b/erpnext/stock/doctype/batch/batch.py index c539c315747..5d71ca06cb4 100644 --- a/erpnext/stock/doctype/batch/batch.py +++ b/erpnext/stock/doctype/batch/batch.py @@ -188,9 +188,9 @@ class Batch(Document): if has_expiry_date and not self.expiry_date: frappe.throw( msg=_("Please set {0} for Batched Item {1}, which is used to set {2} on Submit.").format( - frappe.bold("Shelf Life in Days"), + frappe.bold(_("Shelf Life in Days")), get_link_to_form("Item", self.item), - frappe.bold("Batch Expiry Date"), + frappe.bold(_("Batch Expiry Date")), ), title=_("Expiry Date Mandatory"), ) diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.json b/erpnext/stock/doctype/delivery_note/delivery_note.json index 87c333370b2..4a0580f0e94 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note.json +++ b/erpnext/stock/doctype/delivery_note/delivery_note.json @@ -108,8 +108,9 @@ "dispatch_address", "company_address_section", "company_address", - "column_break_101", "company_address_display", + "column_break_101", + "company_contact_person", "terms_tab", "tc_name", "terms", @@ -1391,13 +1392,20 @@ "fieldname": "named_place", "fieldtype": "Data", "label": "Named Place" + }, + { + "fieldname": "company_contact_person", + "fieldtype": "Link", + "label": "Company Contact Person", + "options": "Contact", + "print_hide": 1 } ], "icon": "fa fa-truck", "idx": 146, "is_submittable": 1, "links": [], - "modified": "2024-03-20 16:05:02.854990", + "modified": "2024-11-26 12:44:28.258215", "modified_by": "Administrator", "module": "Stock", "name": "Delivery Note", diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.py b/erpnext/stock/doctype/delivery_note/delivery_note.py index 8a096aca80c..2b4dad137c2 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note.py +++ b/erpnext/stock/doctype/delivery_note/delivery_note.py @@ -53,6 +53,7 @@ class DeliveryNote(SellingController): company: DF.Link company_address: DF.Link | None company_address_display: DF.SmallText | None + company_contact_person: DF.Link | None contact_display: DF.SmallText | None contact_email: DF.Data | None contact_mobile: DF.SmallText | None @@ -208,6 +209,8 @@ class DeliveryNote(SellingController): ) def onload(self): + super().onload() + if self.docstatus == 0: self.set_onload("has_unpacked_items", self.has_unpacked_items()) @@ -360,52 +363,33 @@ class DeliveryNote(SellingController): self.validate_sales_invoice_references() def validate_sales_order_references(self): - err_msg = "" - for item in self.items: - if (item.against_sales_order and not item.so_detail) or ( - not item.against_sales_order and item.so_detail - ): - if not item.against_sales_order: - err_msg += ( - _("'Sales Order' reference ({1}) is missing in row {0}").format( - frappe.bold(item.idx), frappe.bold("against_sales_order") - ) - + "
" - ) - else: - err_msg += ( - _("'Sales Order Item' reference ({1}) is missing in row {0}").format( - frappe.bold(item.idx), frappe.bold("so_detail") - ) - + "
" - ) - - if err_msg: - frappe.throw(err_msg, title=_("References to Sales Orders are Incomplete")) + self._validate_dependent_item_fields( + "against_sales_order", "so_detail", _("References to Sales Orders are Incomplete") + ) def validate_sales_invoice_references(self): - err_msg = "" - for item in self.items: - if (item.against_sales_invoice and not item.si_detail) or ( - not item.against_sales_invoice and item.si_detail - ): - if not item.against_sales_invoice: - err_msg += ( - _("'Sales Invoice' reference ({1}) is missing in row {0}").format( - frappe.bold(item.idx), frappe.bold("against_sales_invoice") - ) - + "
" - ) - else: - err_msg += ( - _("'Sales Invoice Item' reference ({1}) is missing in row {0}").format( - frappe.bold(item.idx), frappe.bold("si_detail") - ) - + "
" - ) + self._validate_dependent_item_fields( + "against_sales_invoice", "si_detail", _("References to Sales Invoices are Incomplete") + ) - if err_msg: - frappe.throw(err_msg, title=_("References to Sales Invoices are Incomplete")) + def _validate_dependent_item_fields(self, field_a: str, field_b: str, error_title: str): + errors = [] + for item in self.items: + missing_label = None + if item.get(field_a) and not item.get(field_b): + missing_label = item.meta.get_label(field_b) + elif item.get(field_b) and not item.get(field_a): + missing_label = item.meta.get_label(field_a) + + if missing_label and missing_label != "No Label": + errors.append( + _("The field {0} in row {1} is not set").format( + frappe.bold(_(missing_label)), frappe.bold(item.idx) + ) + ) + + if errors: + frappe.throw("
".join(errors), title=error_title) def validate_proj_cust(self): """check for does customer belong to same project as entered..""" @@ -1037,7 +1021,6 @@ def make_sales_invoice(source_name, target_doc=None, args=None): "parent": "delivery_note", "so_detail": "so_detail", "against_sales_order": "sales_order", - "serial_no": "serial_no", "cost_center": "cost_center", }, "postprocess": update_item, @@ -1047,7 +1030,7 @@ def make_sales_invoice(source_name, target_doc=None, args=None): }, "Sales Taxes and Charges": { "doctype": "Sales Taxes and Charges", - "add_if_empty": True, + "reset_value": not (args and args.get("merge_taxes")), "ignore": args.get("merge_taxes") if args else 0, }, "Sales Team": { @@ -1063,7 +1046,7 @@ def make_sales_invoice(source_name, target_doc=None, args=None): automatically_fetch_payment_terms = cint( frappe.db.get_single_value("Accounts Settings", "automatically_fetch_payment_terms") ) - if automatically_fetch_payment_terms: + if automatically_fetch_payment_terms and not doc.is_return: doc.set_payment_schedule() return doc @@ -1205,18 +1188,19 @@ def make_shipment(source_name, target_doc=None): # As we are using session user details in the pickup_contact then pickup_contact_person will be session user target.pickup_contact_person = frappe.session.user - contact = frappe.db.get_value( - "Contact", source.contact_person, ["email_id", "phone", "mobile_no"], as_dict=1 - ) - delivery_contact_display = f"{source.contact_display}" - if contact: - if contact.email_id: - delivery_contact_display += "
" + contact.email_id - if contact.phone: - delivery_contact_display += "
" + contact.phone - if contact.mobile_no and not contact.phone: - delivery_contact_display += "
" + contact.mobile_no - target.delivery_contact = delivery_contact_display + if source.contact_person: + contact = frappe.db.get_value( + "Contact", source.contact_person, ["email_id", "phone", "mobile_no"], as_dict=1 + ) + delivery_contact_display = f"{source.contact_display}" + if contact: + if contact.email_id: + delivery_contact_display += "
" + contact.email_id + if contact.phone: + delivery_contact_display += "
" + contact.phone + if contact.mobile_no and not contact.phone: + delivery_contact_display += "
" + contact.mobile_no + target.delivery_contact = delivery_contact_display if source.shipping_address_name: target.delivery_address_name = source.shipping_address_name diff --git a/erpnext/stock/doctype/delivery_note/test_delivery_note.py b/erpnext/stock/doctype/delivery_note/test_delivery_note.py index cfe550f2f27..9acdce8bebc 100644 --- a/erpnext/stock/doctype/delivery_note/test_delivery_note.py +++ b/erpnext/stock/doctype/delivery_note/test_delivery_note.py @@ -3,6 +3,7 @@ import json +from collections import defaultdict import frappe from frappe.tests.utils import FrappeTestCase @@ -2039,6 +2040,305 @@ class TestDeliveryNote(FrappeTestCase): self.assertEqual(sn.status, "Delivered") self.assertEqual(sn.warranty_period, 100) + def test_batch_return_dn(self): + from erpnext.stock.doctype.delivery_note.delivery_note import make_sales_return + + item_code = make_item( + "Test Batch Return DN Item 1", + properties={ + "has_batch_no": 1, + "valuation_method": "Moving Average", + "create_new_batch": 1, + "batch_number_series": "TBRDN1-.#####", + "is_stock_item": 1, + }, + ).name + + se = make_stock_entry(item_code=item_code, target="_Test Warehouse - _TC", qty=5, basic_rate=100) + + batch_no = get_batch_from_bundle(se.items[0].serial_and_batch_bundle) + dn = create_delivery_note( + item_code=item_code, + qty=5, + rate=500, + use_serial_batch_fields=1, + batch_no=batch_no, + ) + + dn_return = make_sales_return(dn.name) + dn_return.save().submit() + + self.assertEqual(dn_return.items[0].qty, 5 * -1) + + returned_batch_no = get_batch_from_bundle(dn_return.items[0].serial_and_batch_bundle) + self.assertEqual(batch_no, returned_batch_no) + + stock_value_difference = frappe.db.get_value( + "Stock Ledger Entry", + {"voucher_no": dn_return.name, "voucher_type": "Delivery Note"}, + "stock_value_difference", + ) + + self.assertEqual(stock_value_difference, 100.0 * 5) + + def test_delivery_note_return_valuation_without_use_serial_batch_field(self): + from erpnext.stock.doctype.delivery_note.delivery_note import make_sales_return + + batch_item = make_item( + "_Test Delivery Note Return Valuation Batch Item", + properties={ + "has_batch_no": 1, + "create_new_batch": 1, + "is_stock_item": 1, + "batch_number_series": "BRTN-DNN-BI-.#####", + }, + ).name + + serial_item = make_item( + "_Test Delivery Note Return Valuation Serial Item", + properties={"has_serial_no": 1, "is_stock_item": 1, "serial_no_series": "SRTN-DNN-TP-.#####"}, + ).name + + batches = {} + serial_nos = [] + for qty, rate in {3: 300, 2: 100}.items(): + se = make_stock_entry( + item_code=batch_item, target="_Test Warehouse - _TC", qty=qty, basic_rate=rate + ) + batches[get_batch_from_bundle(se.items[0].serial_and_batch_bundle)] = qty + + for qty, rate in {2: 100, 1: 50}.items(): + make_stock_entry(item_code=serial_item, target="_Test Warehouse - _TC", qty=qty, basic_rate=rate) + serial_nos.extend(get_serial_nos_from_bundle(se.items[0].serial_and_batch_bundle)) + + dn = create_delivery_note( + item_code=batch_item, + qty=5, + rate=1000, + use_serial_batch_fields=0, + batches=batches, + do_not_submit=True, + ) + + bundle_id = make_serial_batch_bundle( + frappe._dict( + { + "item_code": serial_item, + "warehouse": dn.items[0].warehouse, + "qty": 3, + "voucher_type": "Delivery Note", + "serial_nos": serial_nos, + "posting_date": dn.posting_date, + "posting_time": dn.posting_time, + "type_of_transaction": "Outward", + "do_not_submit": True, + } + ) + ).name + + dn.append( + "items", + { + "item_code": serial_item, + "qty": 3, + "rate": 700, + "base_rate": 700, + "item_name": serial_item, + "uom": "Nos", + "stock_uom": "Nos", + "conversion_factor": 1, + "warehouse": dn.items[0].warehouse, + "use_serial_batch_fields": 0, + "serial_and_batch_bundle": bundle_id, + }, + ) + + dn.save() + dn.submit() + dn.reload() + + batch_no_valuation = defaultdict(float) + serial_no_valuation = defaultdict(float) + + for row in dn.items: + if row.serial_and_batch_bundle: + bundle_data = frappe.get_all( + "Serial and Batch Entry", + filters={"parent": row.serial_and_batch_bundle}, + fields=["incoming_rate", "serial_no", "batch_no"], + ) + + for d in bundle_data: + if d.batch_no: + batch_no_valuation[d.batch_no] = d.incoming_rate + elif d.serial_no: + serial_no_valuation[d.serial_no] = d.incoming_rate + + return_entry = make_sales_return(dn.name) + + return_entry.save() + return_entry.submit() + return_entry.reload() + + for row in return_entry.items: + if row.item_code == batch_item: + bundle_data = frappe.get_all( + "Serial and Batch Entry", + filters={"parent": row.serial_and_batch_bundle}, + fields=["incoming_rate", "batch_no"], + ) + + for d in bundle_data: + self.assertEqual(d.incoming_rate, batch_no_valuation[d.batch_no]) + else: + bundle_data = frappe.get_all( + "Serial and Batch Entry", + filters={"parent": row.serial_and_batch_bundle}, + fields=["incoming_rate", "serial_no"], + ) + + for d in bundle_data: + self.assertEqual(d.incoming_rate, serial_no_valuation[d.serial_no]) + + def test_delivery_note_return_valuation_with_use_serial_batch_field(self): + from erpnext.stock.doctype.delivery_note.delivery_note import make_sales_return + + batch_item = make_item( + "_Test Delivery Note Return Valuation WITH Batch Item", + properties={ + "has_batch_no": 1, + "create_new_batch": 1, + "is_stock_item": 1, + "batch_number_series": "BRTN-DNN-BIW-.#####", + }, + ).name + + serial_item = make_item( + "_Test Delivery Note Return Valuation WITH Serial Item", + properties={"has_serial_no": 1, "is_stock_item": 1, "serial_no_series": "SRTN-DNN-TPW-.#####"}, + ).name + + batches = [] + serial_nos = [] + for qty, rate in {3: 300, 2: 100}.items(): + se = make_stock_entry( + item_code=batch_item, target="_Test Warehouse - _TC", qty=qty, basic_rate=rate + ) + batches.append(get_batch_from_bundle(se.items[0].serial_and_batch_bundle)) + + for qty, rate in {2: 100, 1: 50}.items(): + se = make_stock_entry( + item_code=serial_item, target="_Test Warehouse - _TC", qty=qty, basic_rate=rate + ) + serial_nos.extend(get_serial_nos_from_bundle(se.items[0].serial_and_batch_bundle)) + + dn = create_delivery_note( + item_code=batch_item, + qty=3, + rate=1000, + use_serial_batch_fields=1, + batch_no=batches[0], + do_not_submit=True, + ) + + dn.append( + "items", + { + "item_code": batch_item, + "qty": 2, + "rate": 1000, + "base_rate": 1000, + "item_name": batch_item, + "uom": dn.items[0].uom, + "stock_uom": dn.items[0].uom, + "conversion_factor": 1, + "warehouse": dn.items[0].warehouse, + "use_serial_batch_fields": 1, + "batch_no": batches[1], + }, + ) + + dn.append( + "items", + { + "item_code": serial_item, + "qty": 2, + "rate": 700, + "base_rate": 700, + "item_name": serial_item, + "uom": "Nos", + "stock_uom": "Nos", + "conversion_factor": 1, + "warehouse": dn.items[0].warehouse, + "use_serial_batch_fields": 1, + "serial_no": "\n".join(serial_nos[0:2]), + }, + ) + + dn.append( + "items", + { + "item_code": serial_item, + "qty": 1, + "rate": 700, + "base_rate": 700, + "item_name": serial_item, + "uom": "Nos", + "stock_uom": "Nos", + "conversion_factor": 1, + "warehouse": dn.items[0].warehouse, + "use_serial_batch_fields": 1, + "serial_no": serial_nos[-1], + }, + ) + + dn.save() + dn.submit() + dn.reload() + + batch_no_valuation = defaultdict(float) + serial_no_valuation = defaultdict(float) + + for row in dn.items: + if row.serial_and_batch_bundle: + bundle_data = frappe.get_all( + "Serial and Batch Entry", + filters={"parent": row.serial_and_batch_bundle}, + fields=["incoming_rate", "serial_no", "batch_no"], + ) + + for d in bundle_data: + if d.batch_no: + batch_no_valuation[d.batch_no] = d.incoming_rate + elif d.serial_no: + serial_no_valuation[d.serial_no] = d.incoming_rate + + return_entry = make_sales_return(dn.name) + + return_entry.save() + return_entry.submit() + return_entry.reload() + + for row in return_entry.items: + if row.item_code == batch_item: + bundle_data = frappe.get_all( + "Serial and Batch Entry", + filters={"parent": row.serial_and_batch_bundle}, + fields=["incoming_rate", "batch_no"], + ) + + for d in bundle_data: + self.assertEqual(d.incoming_rate, batch_no_valuation[d.batch_no]) + else: + bundle_data = frappe.get_all( + "Serial and Batch Entry", + filters={"parent": row.serial_and_batch_bundle}, + fields=["incoming_rate", "serial_no"], + ) + + for d in bundle_data: + self.assertEqual(d.incoming_rate, serial_no_valuation[d.serial_no]) + def create_delivery_note(**args): dn = frappe.new_doc("Delivery Note") @@ -2066,6 +2366,9 @@ def create_delivery_note(**args): if args.get("batch_no"): batches = frappe._dict({args.batch_no: qty}) + if args.get("batches"): + batches = frappe._dict(args.batches) + bundle_id = make_serial_batch_bundle( frappe._dict( { diff --git a/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json b/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json index b8164b25753..56e5209da59 100644 --- a/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json +++ b/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json @@ -87,16 +87,19 @@ "column_break_rxvc", "batch_no", "available_qty_section", - "actual_batch_qty", "actual_qty", - "installed_qty", - "item_tax_rate", + "actual_batch_qty", "column_break_atna", + "company_total_stock", + "section_break_kejd", + "installed_qty", "packed_qty", + "column_break_fguf", "received_qty", "accounting_details_section", "expense_account", "column_break_71", + "item_tax_rate", "internal_transfer_section", "material_request", "purchase_order", @@ -519,7 +522,7 @@ "allow_on_submit": 1, "fieldname": "actual_qty", "fieldtype": "Float", - "label": "Available Qty at From Warehouse", + "label": "Qty (Warehouse)", "no_copy": 1, "oldfieldname": "actual_qty", "oldfieldtype": "Currency", @@ -907,13 +910,30 @@ { "fieldname": "column_break_rxvc", "fieldtype": "Column Break" + }, + { + "allow_on_submit": 1, + "fieldname": "company_total_stock", + "fieldtype": "Float", + "label": "Qty (Company)", + "no_copy": 1, + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "section_break_kejd", + "fieldtype": "Section Break" + }, + { + "fieldname": "column_break_fguf", + "fieldtype": "Column Break" } ], "idx": 1, "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2024-03-21 18:15:07.603672", + "modified": "2024-11-21 17:37:37.441498", "modified_by": "Administrator", "module": "Stock", "name": "Delivery Note Item", @@ -923,4 +943,4 @@ "sort_field": "modified", "sort_order": "DESC", "states": [] -} \ No newline at end of file +} diff --git a/erpnext/stock/doctype/delivery_note_item/delivery_note_item.py b/erpnext/stock/doctype/delivery_note_item/delivery_note_item.py index b76f7429728..716cd7d4856 100644 --- a/erpnext/stock/doctype/delivery_note_item/delivery_note_item.py +++ b/erpnext/stock/doctype/delivery_note_item/delivery_note_item.py @@ -30,6 +30,7 @@ class DeliveryNoteItem(Document): batch_no: DF.Link | None billed_amt: DF.Currency brand: DF.Link | None + company_total_stock: DF.Float conversion_factor: DF.Float cost_center: DF.Link | None customer_item_code: DF.Data | None diff --git a/erpnext/stock/doctype/inventory_dimension/inventory_dimension.py b/erpnext/stock/doctype/inventory_dimension/inventory_dimension.py index 3bafa12983f..661605bdf5f 100644 --- a/erpnext/stock/doctype/inventory_dimension/inventory_dimension.py +++ b/erpnext/stock/doctype/inventory_dimension/inventory_dimension.py @@ -107,6 +107,7 @@ class InventoryDimension(Document): self.source_fieldname, f"to_{self.source_fieldname}", f"from_{self.source_fieldname}", + f"rejected_{self.source_fieldname}", ], ) } @@ -171,12 +172,12 @@ class InventoryDimension(Document): if label_start_with: label = f"{label_start_with} {self.dimension_name}" - return [ + dimension_fields = [ dict( fieldname="inventory_dimension", fieldtype="Section Break", insert_after=self.get_insert_after_fieldname(doctype), - label="Inventory Dimension", + label=_("Inventory Dimension"), collapsible=1, ), dict( @@ -184,26 +185,39 @@ class InventoryDimension(Document): fieldtype="Link", insert_after="inventory_dimension", options=self.reference_document, - label=label, + label=_(label), search_index=1, reqd=self.reqd, mandatory_depends_on=self.mandatory_depends_on, ), ] + if doctype in ["Purchase Invoice Item", "Purchase Receipt Item"]: + dimension_fields.append( + dict( + fieldname="rejected_" + self.source_fieldname, + fieldtype="Link", + insert_after=self.source_fieldname, + options=self.reference_document, + label=_("Rejected " + self.dimension_name), + search_index=1, + reqd=self.reqd, + mandatory_depends_on=self.mandatory_depends_on, + ) + ) + + return dimension_fields + def add_custom_fields(self): custom_fields = {} dimension_fields = [] if self.apply_to_all_doctypes: for doctype in get_inventory_documents(): - if field_exists(doctype[0], self.source_fieldname): - continue - dimension_fields = self.get_dimension_fields(doctype[0]) self.add_transfer_field(doctype[0], dimension_fields) custom_fields.setdefault(doctype[0], dimension_fields) - elif not field_exists(self.document_type, self.source_fieldname): + else: dimension_fields = self.get_dimension_fields() self.add_transfer_field(self.document_type, dimension_fields) @@ -222,8 +236,17 @@ class InventoryDimension(Document): dimension_field["fieldname"] = self.target_fieldname custom_fields["Stock Ledger Entry"] = dimension_field + filter_custom_fields = {} if custom_fields: - create_custom_fields(custom_fields) + for doctype, fields in custom_fields.items(): + if isinstance(fields, dict): + fields = [fields] + + for field in fields: + if not field_exists(doctype, field["fieldname"]): + filter_custom_fields.setdefault(doctype, []).append(field) + + create_custom_fields(filter_custom_fields) def add_transfer_field(self, doctype, dimension_fields): if doctype not in [ diff --git a/erpnext/stock/doctype/inventory_dimension/test_inventory_dimension.py b/erpnext/stock/doctype/inventory_dimension/test_inventory_dimension.py index 8ce954d55e6..f8128ce0033 100644 --- a/erpnext/stock/doctype/inventory_dimension/test_inventory_dimension.py +++ b/erpnext/stock/doctype/inventory_dimension/test_inventory_dimension.py @@ -16,6 +16,7 @@ from erpnext.stock.doctype.inventory_dimension.inventory_dimension import ( from erpnext.stock.doctype.item.test_item import create_item from erpnext.stock.doctype.purchase_receipt.test_purchase_receipt import make_purchase_receipt from erpnext.stock.doctype.stock_entry.stock_entry_utils import make_stock_entry +from erpnext.stock.doctype.stock_ledger_entry.stock_ledger_entry import InventoryDimensionNegativeStockError from erpnext.stock.doctype.warehouse.test_warehouse import create_warehouse @@ -268,21 +269,47 @@ class TestInventoryDimension(FrappeTestCase): item_code = "Test Inventory Dimension Item" create_item(item_code) warehouse = create_warehouse("Store Warehouse") + rj_warehouse = create_warehouse("RJ Warehouse") + + if not frappe.db.exists("Store", "Rejected Store"): + frappe.get_doc({"doctype": "Store", "store_name": "Rejected Store"}).insert( + ignore_permissions=True + ) # Purchase Receipt -> Inward in Store 1 pr_doc = make_purchase_receipt( - item_code=item_code, warehouse=warehouse, qty=10, rate=100, do_not_submit=True + item_code=item_code, + warehouse=warehouse, + qty=10, + rejected_qty=5, + rate=100, + rejected_warehouse=rj_warehouse, + do_not_submit=True, ) pr_doc.items[0].store = "Store 1" + pr_doc.items[0].rejected_store = "Rejected Store" pr_doc.save() pr_doc.submit() - entries = get_voucher_sl_entries(pr_doc.name, ["warehouse", "store", "incoming_rate"]) + entries = frappe.get_all( + "Stock Ledger Entry", + filters={"voucher_no": pr_doc.name, "warehouse": warehouse}, + fields=["store"], + order_by="creation", + ) - self.assertEqual(entries[0].warehouse, warehouse) self.assertEqual(entries[0].store, "Store 1") + entries = frappe.get_all( + "Stock Ledger Entry", + filters={"voucher_no": pr_doc.name, "warehouse": rj_warehouse}, + fields=["store"], + order_by="creation", + ) + + self.assertEqual(entries[0].store, "Rejected Store") + # Stock Entry -> Transfer from Store 1 to Store 2 se_doc = make_stock_entry( item_code=item_code, qty=10, from_warehouse=warehouse, to_warehouse=warehouse, do_not_save=True @@ -426,39 +453,49 @@ class TestInventoryDimension(FrappeTestCase): warehouse = create_warehouse("Negative Stock Warehouse") + # Try issuing 10 qty, more than available stock against inventory dimension doc = make_stock_entry(item_code=item_code, source=warehouse, qty=10, do_not_submit=True) doc.items[0].inv_site = "Site 1" - self.assertRaises(frappe.ValidationError, doc.submit) + self.assertRaises(InventoryDimensionNegativeStockError, doc.submit) + + # cancel the stock entry doc.reload() if doc.docstatus == 1: doc.cancel() + # Receive 10 qty against inventory dimension doc = make_stock_entry(item_code=item_code, target=warehouse, qty=10, do_not_submit=True) - doc.items[0].to_inv_site = "Site 1" doc.submit() + # check inventory dimension value in stock ledger entry site_name = frappe.get_all( "Stock Ledger Entry", filters={"voucher_no": doc.name, "is_cancelled": 0}, fields=["inv_site"] )[0].inv_site self.assertEqual(site_name, "Site 1") + # Receive another 100 qty without inventory dimension + doc = make_stock_entry(item_code=item_code, target=warehouse, qty=100) + + # Try issuing 100 qty, more than available stock against inventory dimension + # Note: total available qty for the item is 110, but against inventory dimension, only 10 qty is available doc = make_stock_entry(item_code=item_code, source=warehouse, qty=100, do_not_submit=True) - doc.items[0].inv_site = "Site 1" - self.assertRaises(frappe.ValidationError, doc.submit) + self.assertRaises(InventoryDimensionNegativeStockError, doc.submit) + # disable validate_negative_stock for inventory dimension inv_dimension.reload() inv_dimension.db_set("validate_negative_stock", 0) frappe.local.inventory_dimensions = {} + # Try issuing 100 qty, more than available stock against inventory dimension doc = make_stock_entry(item_code=item_code, source=warehouse, qty=100, do_not_submit=True) - doc.items[0].inv_site = "Site 1" doc.submit() self.assertEqual(doc.docstatus, 1) + # check inventory dimension value in stock ledger entry site_name = frappe.get_all( "Stock Ledger Entry", filters={"voucher_no": doc.name, "is_cancelled": 0}, fields=["inv_site"] )[0].inv_site diff --git a/erpnext/stock/doctype/item/item.js b/erpnext/stock/doctype/item/item.js index 81eeb914af0..4195506ad3b 100644 --- a/erpnext/stock/doctype/item/item.js +++ b/erpnext/stock/doctype/item/item.js @@ -663,39 +663,41 @@ $.extend(erpnext.item, { } frm.doc.attributes.forEach(function (d) { - let p = new Promise((resolve) => { - if (!d.numeric_values) { - frappe - .call({ - method: "frappe.client.get_list", - args: { - doctype: "Item Attribute Value", - filters: [["parent", "=", d.attribute]], - fields: ["attribute_value"], - limit_page_length: 0, - parent: "Item Attribute", - order_by: "idx", - }, - }) - .then((r) => { - if (r.message) { - attr_val_fields[d.attribute] = r.message.map(function (d) { - return d.attribute_value; - }); - resolve(); - } - }); - } else { - let values = []; - for (var i = d.from_range; i <= d.to_range; i = flt(i + d.increment, 6)) { - values.push(i); + if (!d.disabled) { + let p = new Promise((resolve) => { + if (!d.numeric_values) { + frappe + .call({ + method: "frappe.client.get_list", + args: { + doctype: "Item Attribute Value", + filters: [["parent", "=", d.attribute]], + fields: ["attribute_value"], + limit_page_length: 0, + parent: "Item Attribute", + order_by: "idx", + }, + }) + .then((r) => { + if (r.message) { + attr_val_fields[d.attribute] = r.message.map(function (d) { + return d.attribute_value; + }); + resolve(); + } + }); + } else { + let values = []; + for (var i = d.from_range; i <= d.to_range; i = flt(i + d.increment, 6)) { + values.push(i); + } + attr_val_fields[d.attribute] = values; + resolve(); } - attr_val_fields[d.attribute] = values; - resolve(); - } - }); + }); - promises.push(p); + promises.push(p); + } }, this); Promise.all(promises).then(() => { @@ -710,26 +712,29 @@ $.extend(erpnext.item, { for (var i = 0; i < frm.doc.attributes.length; i++) { var fieldtype, desc; var row = frm.doc.attributes[i]; - if (row.numeric_values) { - fieldtype = "Float"; - desc = - "Min Value: " + - row.from_range + - " , Max Value: " + - row.to_range + - ", in Increments of: " + - row.increment; - } else { - fieldtype = "Data"; - desc = ""; + + if (!row.disabled) { + if (row.numeric_values) { + fieldtype = "Float"; + desc = + "Min Value: " + + row.from_range + + " , Max Value: " + + row.to_range + + ", in Increments of: " + + row.increment; + } else { + fieldtype = "Data"; + desc = ""; + } + fields = fields.concat({ + label: row.attribute, + fieldname: row.attribute, + fieldtype: fieldtype, + reqd: 0, + description: desc, + }); } - fields = fields.concat({ - label: row.attribute, - fieldname: row.attribute, - fieldtype: fieldtype, - reqd: 0, - description: desc, - }); } if (frm.doc.image) { diff --git a/erpnext/stock/doctype/item/item.py b/erpnext/stock/doctype/item/item.py index 1ceb949d691..e40b3822af6 100644 --- a/erpnext/stock/doctype/item/item.py +++ b/erpnext/stock/doctype/item/item.py @@ -22,6 +22,7 @@ from frappe.utils import ( strip_html, ) from frappe.utils.html_utils import clean_html +from pypika import Order import erpnext from erpnext.controllers.item_variant import ( @@ -345,7 +346,13 @@ class Item(Document): def validate_item_tax_net_rate_range(self): for tax in self.get("taxes"): if flt(tax.maximum_net_rate) < flt(tax.minimum_net_rate): - frappe.throw(_("Row #{0}: Maximum Net Rate cannot be greater than Minimum Net Rate")) + frappe.throw( + _("Taxes row #{0}: {1} cannot be smaller than {2}").format( + tax.idx, + bold(_(tax.meta.get_label("maximum_net_rate"))), + bold(_(tax.meta.get_label("minimum_net_rate"))), + ) + ) def update_template_tables(self): template = frappe.get_cached_doc("Item", self.variant_of) @@ -1133,34 +1140,10 @@ def get_last_purchase_details(item_code, doc_name=None, conversion_rate=1.0): """returns last purchase details in stock uom""" # get last purchase order item details - last_purchase_order = frappe.db.sql( - """\ - select po.name, po.transaction_date, po.conversion_rate, - po_item.conversion_factor, po_item.base_price_list_rate, - po_item.discount_percentage, po_item.base_rate, po_item.base_net_rate - from `tabPurchase Order` po, `tabPurchase Order Item` po_item - where po.docstatus = 1 and po_item.item_code = %s and po.name != %s and - po.name = po_item.parent - order by po.transaction_date desc, po.name desc - limit 1""", - (item_code, cstr(doc_name)), - as_dict=1, - ) + last_purchase_order = get_purchase_voucher_details("Purchase Order", item_code, doc_name) # get last purchase receipt item details - last_purchase_receipt = frappe.db.sql( - """\ - select pr.name, pr.posting_date, pr.posting_time, pr.conversion_rate, - pr_item.conversion_factor, pr_item.base_price_list_rate, pr_item.discount_percentage, - pr_item.base_rate, pr_item.base_net_rate - from `tabPurchase Receipt` pr, `tabPurchase Receipt Item` pr_item - where pr.docstatus = 1 and pr_item.item_code = %s and pr.name != %s and - pr.name = pr_item.parent - order by pr.posting_date desc, pr.posting_time desc, pr.name desc - limit 1""", - (item_code, cstr(doc_name)), - as_dict=1, - ) + last_purchase_receipt = get_purchase_voucher_details("Purchase Receipt", item_code, doc_name) purchase_order_date = getdate( last_purchase_order and last_purchase_order[0].transaction_date or "1900-01-01" @@ -1181,7 +1164,13 @@ def get_last_purchase_details(item_code, doc_name=None, conversion_rate=1.0): purchase_date = purchase_receipt_date else: - return frappe._dict() + last_purchase_invoice = get_purchase_voucher_details("Purchase Invoice", item_code, doc_name) + + if last_purchase_invoice: + last_purchase = last_purchase_invoice[0] + purchase_date = getdate(last_purchase.posting_date) + else: + return frappe._dict() conversion_factor = flt(last_purchase.conversion_factor) out = frappe._dict( @@ -1207,6 +1196,40 @@ def get_last_purchase_details(item_code, doc_name=None, conversion_rate=1.0): return out +def get_purchase_voucher_details(doctype, item_code, document_name): + parent_doc = frappe.qb.DocType(doctype) + child_doc = frappe.qb.DocType(doctype + " Item") + + query = ( + frappe.qb.from_(parent_doc) + .inner_join(child_doc) + .on(parent_doc.name == child_doc.parent) + .select( + parent_doc.name, + parent_doc.conversion_rate, + child_doc.conversion_factor, + child_doc.base_price_list_rate, + child_doc.discount_percentage, + child_doc.base_rate, + child_doc.base_net_rate, + ) + .where(parent_doc.docstatus == 1) + .where(child_doc.item_code == item_code) + .where(parent_doc.name != document_name) + ) + + if doctype in ("Purchase Receipt", "Purchase Invoice"): + query = query.select(parent_doc.posting_date, parent_doc.posting_time) + query = query.orderby( + parent_doc.posting_date, parent_doc.posting_time, parent_doc.name, order=Order.desc + ) + else: + query = query.select(parent_doc.transaction_date) + query = query.orderby(parent_doc.transaction_date, parent_doc.name, order=Order.desc) + + return query.run(as_dict=1) + + def check_stock_uom_with_bin(item, stock_uom): if stock_uom == frappe.db.get_value("Item", item, "stock_uom"): return diff --git a/erpnext/stock/doctype/item/templates/item_row.html b/erpnext/stock/doctype/item/templates/item_row.html index f81fc1d8743..809ac838ccb 100644 --- a/erpnext/stock/doctype/item/templates/item_row.html +++ b/erpnext/stock/doctype/item/templates/item_row.html @@ -1,4 +1,4 @@ diff --git a/erpnext/stock/doctype/item_attribute/item_attribute.json b/erpnext/stock/doctype/item_attribute/item_attribute.json index 5c4678916f3..d9b0898ca7f 100644 --- a/erpnext/stock/doctype/item_attribute/item_attribute.json +++ b/erpnext/stock/doctype/item_attribute/item_attribute.json @@ -10,6 +10,8 @@ "field_order": [ "attribute_name", "numeric_values", + "column_break_vbik", + "disabled", "section_break_4", "from_range", "increment", @@ -70,15 +72,26 @@ "fieldtype": "Table", "label": "Item Attribute Values", "options": "Item Attribute Value" + }, + { + "fieldname": "column_break_vbik", + "fieldtype": "Column Break" + }, + { + "default": "0", + "fieldname": "disabled", + "fieldtype": "Check", + "label": "Disabled" } ], "icon": "fa fa-edit", "index_web_pages_for_search": 1, "links": [], - "modified": "2020-10-02 12:03:02.359202", + "modified": "2024-11-26 20:05:29.421714", "modified_by": "Administrator", "module": "Stock", "name": "Item Attribute", + "naming_rule": "By fieldname", "owner": "Administrator", "permissions": [ { @@ -94,4 +107,4 @@ "sort_field": "modified", "sort_order": "DESC", "track_changes": 1 -} \ No newline at end of file +} diff --git a/erpnext/stock/doctype/item_attribute/item_attribute.py b/erpnext/stock/doctype/item_attribute/item_attribute.py index 04421d6292e..3b9bcf93288 100644 --- a/erpnext/stock/doctype/item_attribute/item_attribute.py +++ b/erpnext/stock/doctype/item_attribute/item_attribute.py @@ -30,6 +30,7 @@ class ItemAttribute(Document): from erpnext.stock.doctype.item_attribute_value.item_attribute_value import ItemAttributeValue attribute_name: DF.Data + disabled: DF.Check from_range: DF.Float increment: DF.Float item_attribute_values: DF.Table[ItemAttributeValue] @@ -47,6 +48,19 @@ class ItemAttribute(Document): def on_update(self): self.validate_exising_items() + self.set_enabled_disabled_in_items() + + def set_enabled_disabled_in_items(self): + db_value = self.get_doc_before_save() + if not db_value or db_value.disabled != self.disabled: + item_variant_table = frappe.qb.DocType("Item Variant Attribute") + query = ( + frappe.qb.update(item_variant_table) + .set(item_variant_table.disabled, self.disabled) + .where(item_variant_table.attribute == self.name) + ) + + query.run() def validate_exising_items(self): """Validate that if there are existing items with attributes, they are valid""" diff --git a/erpnext/stock/doctype/item_variant_attribute/item_variant_attribute.json b/erpnext/stock/doctype/item_variant_attribute/item_variant_attribute.json index 9699ecbb3db..cfc752c1f61 100644 --- a/erpnext/stock/doctype/item_variant_attribute/item_variant_attribute.json +++ b/erpnext/stock/doctype/item_variant_attribute/item_variant_attribute.json @@ -11,6 +11,7 @@ "column_break_2", "attribute_value", "numeric_values", + "disabled", "section_break_4", "from_range", "increment", @@ -74,11 +75,18 @@ "fieldname": "to_range", "fieldtype": "Float", "label": "To Range" + }, + { + "default": "0", + "fetch_from": "attribute.disabled", + "fieldname": "disabled", + "fieldtype": "Check", + "label": "Disabled" } ], "istable": 1, "links": [], - "modified": "2023-07-14 17:15:19.112119", + "modified": "2024-11-26 20:10:49.873339", "modified_by": "Administrator", "module": "Stock", "name": "Item Variant Attribute", @@ -87,4 +95,4 @@ "sort_field": "modified", "sort_order": "DESC", "states": [] -} \ No newline at end of file +} diff --git a/erpnext/stock/doctype/item_variant_attribute/item_variant_attribute.py b/erpnext/stock/doctype/item_variant_attribute/item_variant_attribute.py index 756b7421761..ea239d2ccc9 100644 --- a/erpnext/stock/doctype/item_variant_attribute/item_variant_attribute.py +++ b/erpnext/stock/doctype/item_variant_attribute/item_variant_attribute.py @@ -16,6 +16,7 @@ class ItemVariantAttribute(Document): attribute: DF.Link attribute_value: DF.Data | None + disabled: DF.Check from_range: DF.Float increment: DF.Float numeric_values: DF.Check diff --git a/erpnext/stock/doctype/material_request/material_request.js b/erpnext/stock/doctype/material_request/material_request.js index f04acc85ed5..09c01a0ee88 100644 --- a/erpnext/stock/doctype/material_request/material_request.js +++ b/erpnext/stock/doctype/material_request/material_request.js @@ -107,6 +107,14 @@ frappe.ui.form.on("Material Request", { if (flt(frm.doc.per_received, precision) < 100) { frm.add_custom_button(__("Stop"), () => frm.events.update_status(frm, "Stopped")); + + if (frm.doc.material_request_type === "Purchase") { + frm.add_custom_button( + __("Purchase Order"), + () => frm.events.make_purchase_order(frm), + __("Create") + ); + } } if (flt(frm.doc.per_ordered, precision) < 100) { @@ -149,14 +157,6 @@ frappe.ui.form.on("Material Request", { ); } - if (frm.doc.material_request_type === "Purchase") { - frm.add_custom_button( - __("Purchase Order"), - () => frm.events.make_purchase_order(frm), - __("Create") - ); - } - if (frm.doc.material_request_type === "Purchase") { frm.add_custom_button( __("Request for Quotation"), @@ -259,18 +259,21 @@ frappe.ui.form.on("Material Request", { }, callback: function (r) { const d = item; - const allow_to_change_fields = [ + let allow_to_change_fields = [ "actual_qty", "projected_qty", "min_order_qty", "item_name", - "description", "stock_uom", "uom", "conversion_factor", "stock_qty", ]; + if (overwrite_warehouse) { + allow_to_change_fields.push("description"); + } + if (!r.exc) { $.each(r.message, function (key, value) { if (!d[key] || allow_to_change_fields.includes(key)) { diff --git a/erpnext/stock/doctype/material_request/material_request.py b/erpnext/stock/doctype/material_request/material_request.py index 117ed261439..23d289170db 100644 --- a/erpnext/stock/doctype/material_request/material_request.py +++ b/erpnext/stock/doctype/material_request/material_request.py @@ -267,6 +267,7 @@ class MaterialRequest(BuyingController): mr_qty_allowance = frappe.db.get_single_value("Stock Settings", "mr_qty_allowance") for d in self.get("items"): + precision = d.precision("ordered_qty") if d.name in mr_items: if self.material_request_type in ("Material Issue", "Material Transfer", "Customer Provided"): d.ordered_qty = flt(mr_items_ordered_qty.get(d.name)) @@ -276,14 +277,14 @@ class MaterialRequest(BuyingController): (d.qty + (d.qty * (mr_qty_allowance / 100))), d.precision("ordered_qty") ) - if d.ordered_qty and d.ordered_qty > allowed_qty: + if d.ordered_qty and flt(d.ordered_qty, precision) > flt(allowed_qty, precision): frappe.throw( _( "The total Issue / Transfer quantity {0} in Material Request {1} cannot be greater than allowed requested quantity {2} for Item {3}" ).format(d.ordered_qty, d.parent, allowed_qty, d.item_code) ) - elif d.ordered_qty and d.ordered_qty > d.stock_qty: + elif d.ordered_qty and flt(d.ordered_qty, precision) > flt(d.stock_qty, precision): frappe.throw( _( "The total Issue / Transfer quantity {0} in Material Request {1} cannot be greater than requested quantity {2} for Item {3}" @@ -377,7 +378,9 @@ def set_missing_values(source, target_doc): def update_item(obj, target, source_parent): target.conversion_factor = obj.conversion_factor - target.qty = flt(flt(obj.stock_qty) - flt(obj.ordered_qty)) / target.conversion_factor + + qty = obj.received_qty or obj.ordered_qty + target.qty = flt(flt(obj.stock_qty) - flt(qty)) / target.conversion_factor target.stock_qty = target.qty * target.conversion_factor if getdate(target.schedule_date) < getdate(nowdate()): target.schedule_date = None @@ -429,7 +432,9 @@ def make_purchase_order(source_name, target_doc=None, args=None): filtered_items = args.get("filtered_children", []) child_filter = d.name in filtered_items if filtered_items else True - return d.ordered_qty < d.stock_qty and child_filter + qty = d.received_qty or d.ordered_qty + + return qty < d.stock_qty and child_filter doclist = get_mapped_doc( "Material Request", diff --git a/erpnext/stock/doctype/pick_list/pick_list.py b/erpnext/stock/doctype/pick_list/pick_list.py index 0c93fd6c402..ba1cc228bfa 100644 --- a/erpnext/stock/doctype/pick_list/pick_list.py +++ b/erpnext/stock/doctype/pick_list/pick_list.py @@ -109,7 +109,7 @@ class PickList(Document): "actual_qty", ) - if row.qty > bin_qty: + if row.qty > flt(bin_qty): frappe.throw( _( "At Row #{0}: The picked quantity {1} for the item {2} is greater than available stock {3} in the warehouse {4}." @@ -650,6 +650,8 @@ class PickList(Document): if self.name: query = query.where(pi_item.parent != self.name) + query = query.for_update() + return query.run(as_dict=True) def _get_product_bundles(self) -> dict[str, str]: diff --git a/erpnext/stock/doctype/pick_list/pick_list_list.js b/erpnext/stock/doctype/pick_list/pick_list_list.js index 9cdbfe18720..eca6eece785 100644 --- a/erpnext/stock/doctype/pick_list/pick_list_list.js +++ b/erpnext/stock/doctype/pick_list/pick_list_list.js @@ -4,7 +4,7 @@ frappe.listview_settings["Pick List"] = { get_indicator: function (doc) { const status_colors = { - Draft: "grey", + Draft: "red", Open: "orange", Completed: "green", Cancelled: "red", diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js index bfac4381a06..bcecf8be14d 100644 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js @@ -11,25 +11,10 @@ erpnext.buying.setup_buying_controller(); frappe.ui.form.on("Purchase Receipt", { setup: (frm) => { - frm.make_methods = { - "Landed Cost Voucher": () => { - let lcv = frappe.model.get_new_doc("Landed Cost Voucher"); - lcv.company = frm.doc.company; - - let lcv_receipt = frappe.model.get_new_doc("Landed Cost Purchase Receipt"); - lcv_receipt.receipt_document_type = "Purchase Receipt"; - lcv_receipt.receipt_document = frm.doc.name; - lcv_receipt.supplier = frm.doc.supplier; - lcv_receipt.grand_total = frm.doc.grand_total; - lcv.purchase_receipts = [lcv_receipt]; - - frappe.set_route("Form", lcv.doctype, lcv.name); - }, - }; - frm.custom_make_buttons = { "Stock Entry": "Return", "Purchase Invoice": "Purchase Invoice", + "Landed Cost Voucher": "Landed Cost Voucher", }; frm.set_query("expense_account", "items", function () { @@ -114,9 +99,35 @@ frappe.ui.form.on("Purchase Receipt", { } } + if (frm.doc.docstatus === 1) { + frm.add_custom_button( + __("Landed Cost Voucher"), + () => { + frm.events.make_lcv(frm); + }, + __("Create") + ); + } + frm.events.add_custom_buttons(frm); }, + make_lcv(frm) { + frappe.call({ + method: "erpnext.stock.doctype.purchase_receipt.purchase_receipt.make_lcv", + args: { + doctype: frm.doc.doctype, + docname: frm.doc.name, + }, + callback: (r) => { + if (r.message) { + var doc = frappe.model.sync(r.message); + frappe.set_route("Form", doc[0].doctype, doc[0].name); + } + }, + }); + }, + add_custom_buttons: function (frm) { if (frm.doc.docstatus == 0) { frm.add_custom_button( diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json index 61a180caba4..643f9e7a82f 100755 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json @@ -889,7 +889,7 @@ "no_copy": 1, "oldfieldname": "status", "oldfieldtype": "Select", - "options": "\nDraft\nTo Bill\nCompleted\nReturn Issued\nCancelled\nClosed", + "options": "\nDraft\nPartly Billed\nTo Bill\nCompleted\nReturn Issued\nCancelled\nClosed", "print_hide": 1, "print_width": "150px", "read_only": 1, @@ -1273,7 +1273,7 @@ "idx": 261, "is_submittable": 1, "links": [], - "modified": "2024-07-04 14:50:10.538472", + "modified": "2024-11-13 16:55:14.129055", "modified_by": "Administrator", "module": "Stock", "name": "Purchase Receipt", diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py index 3c97d13b904..76ecf0fd596 100644 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py @@ -112,7 +112,9 @@ class PurchaseReceipt(BuyingController): shipping_address: DF.Link | None shipping_address_display: DF.SmallText | None shipping_rule: DF.Link | None - status: DF.Literal["", "Draft", "To Bill", "Completed", "Return Issued", "Cancelled", "Closed"] + status: DF.Literal[ + "", "Draft", "Partly Billed", "To Bill", "Completed", "Return Issued", "Cancelled", "Closed" + ] subcontracting_receipt: DF.Link | None supplied_items: DF.Table[PurchaseReceiptItemSupplied] supplier: DF.Link @@ -837,7 +839,11 @@ class PurchaseReceipt(BuyingController): def update_assets(self, item, valuation_rate): assets = frappe.db.get_all( "Asset", - filters={"purchase_receipt": self.name, "item_code": item.item_code}, + filters={ + "purchase_receipt": self.name, + "item_code": item.item_code, + "purchase_receipt_item": ("in", [item.name, ""]), + }, fields=["name", "asset_quantity"], ) @@ -1055,6 +1061,8 @@ def get_billed_amount_against_po(po_items): def update_billing_percentage(pr_doc, update_modified=True, adjust_incoming_rate=False): # Update Billing % based on pending accepted qty + buying_settings = frappe.get_single("Buying Settings") + total_amount, total_billed_amount = 0, 0 item_wise_returned_qty = get_item_wise_returned_qty(pr_doc) @@ -1062,19 +1070,25 @@ def update_billing_percentage(pr_doc, update_modified=True, adjust_incoming_rate returned_qty = flt(item_wise_returned_qty.get(item.name)) returned_amount = flt(returned_qty) * flt(item.rate) pending_amount = flt(item.amount) - returned_amount - total_billable_amount = pending_amount if item.billed_amt <= pending_amount else item.billed_amt + if buying_settings.bill_for_rejected_quantity_in_purchase_invoice: + pending_amount = flt(item.amount) + + total_billable_amount = abs(flt(item.amount)) + if pending_amount > 0: + total_billable_amount = pending_amount if item.billed_amt <= pending_amount else item.billed_amt total_amount += total_billable_amount - total_billed_amount += flt(item.billed_amt) + total_billed_amount += abs(flt(item.billed_amt)) if pr_doc.get("is_return") and not total_amount and total_billed_amount: total_amount = total_billed_amount if adjust_incoming_rate: adjusted_amt = 0.0 - if item.billed_amt and item.amount: + if item.billed_amt is not None and item.amount is not None: adjusted_amt = flt(item.billed_amt) - flt(item.amount) + adjusted_amt = adjusted_amt * flt(pr_doc.conversion_rate) item.db_set("rate_difference_with_purchase_invoice", adjusted_amt, update_modified=False) percent_billed = round(100 * (total_billed_amount / (total_amount or 1)), 6) @@ -1209,7 +1223,7 @@ def make_purchase_invoice(source_name, target_doc=None, args=None): }, "Purchase Taxes and Charges": { "doctype": "Purchase Taxes and Charges", - "add_if_empty": True, + "reset_value": not (args and args.get("merge_taxes")), "ignore": args.get("merge_taxes") if args else 0, }, }, @@ -1365,3 +1379,26 @@ def get_item_account_wise_additional_cost(purchase_document): @erpnext.allow_regional def update_regional_gl_entries(gl_list, doc): return + + +@frappe.whitelist() +def make_lcv(doctype, docname): + landed_cost_voucher = frappe.new_doc("Landed Cost Voucher") + + details = frappe.db.get_value(doctype, docname, ["supplier", "company", "base_grand_total"], as_dict=1) + + landed_cost_voucher.company = details.company + + landed_cost_voucher.append( + "purchase_receipts", + { + "receipt_document_type": doctype, + "receipt_document": docname, + "grand_total": details.base_grand_total, + "supplier": details.supplier, + }, + ) + + landed_cost_voucher.get_items_from_purchase_receipts() + + return landed_cost_voucher.as_dict() diff --git a/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py index c239360d945..86d1a6948de 100644 --- a/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py +++ b/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py @@ -3,7 +3,7 @@ import frappe from frappe.tests.utils import FrappeTestCase, change_settings -from frappe.utils import add_days, cint, cstr, flt, getdate, nowtime, today +from frappe.utils import add_days, cint, cstr, flt, get_datetime, getdate, nowtime, today from pypika import functions as fn import erpnext @@ -3592,6 +3592,398 @@ class TestPurchaseReceipt(FrappeTestCase): inter_transfer_dn.cancel() frappe.db.set_single_value("Stock Settings", "auto_create_serial_and_batch_bundle_for_outward", 1) + def test_sles_with_same_posting_datetime_and_creation(self): + from erpnext.stock.doctype.stock_entry.test_stock_entry import make_stock_entry + from erpnext.stock.report.stock_balance.stock_balance import execute + + item_code = "Test Item for SLE with same posting datetime and creation" + create_item(item_code) + + pr = make_purchase_receipt( + item_code=item_code, + qty=10, + rate=100, + posting_date="2023-11-06", + posting_time="00:00:00", + ) + + sr = make_stock_entry( + item_code=item_code, + source=pr.items[0].warehouse, + qty=10, + posting_date="2023-11-07", + posting_time="14:28:0.330404", + ) + + sle = frappe.db.get_value( + "Stock Ledger Entry", + {"voucher_type": sr.doctype, "voucher_no": sr.name, "item_code": sr.items[0].item_code}, + "name", + ) + + sle_doc = frappe.get_doc("Stock Ledger Entry", sle) + sle_doc.db_set("creation", "2023-11-07 14:28:01.208930") + + sle_doc.reload() + self.assertEqual(get_datetime(sle_doc.creation), get_datetime("2023-11-07 14:28:01.208930")) + + sr = make_stock_entry( + item_code=item_code, + target=pr.items[0].warehouse, + qty=50, + posting_date="2023-11-07", + posting_time="14:28:0.920825", + ) + + sle = frappe.db.get_value( + "Stock Ledger Entry", + {"voucher_type": sr.doctype, "voucher_no": sr.name, "item_code": sr.items[0].item_code}, + "name", + ) + + sle_doc = frappe.get_doc("Stock Ledger Entry", sle) + sle_doc.db_set("creation", "2023-11-07 14:28:01.044561") + + sle_doc.reload() + self.assertEqual(get_datetime(sle_doc.creation), get_datetime("2023-11-07 14:28:01.044561")) + + pr.repost_future_sle_and_gle(force=True) + + columns, data = execute( + filters=frappe._dict( + {"item_code": item_code, "warehouse": pr.items[0].warehouse, "company": pr.company} + ) + ) + + self.assertEqual(data[0].get("bal_qty"), 50.0) + + def test_same_stock_and_transaction_uom_conversion_factor(self): + item_code = "Test Item for Same Stock and Transaction UOM Conversion Factor" + create_item(item_code) + + pr = make_purchase_receipt( + item_code=item_code, + qty=10, + rate=100, + stock_uom="Nos", + transaction_uom="Nos", + conversion_factor=10, + ) + + self.assertEqual(pr.items[0].conversion_factor, 1.0) + + def test_purchase_receipt_return_valuation_without_use_serial_batch_field(self): + from erpnext.stock.doctype.purchase_receipt.purchase_receipt import make_purchase_return + + batch_item = make_item( + "_Test Purchase Receipt Return Valuation Batch Item", + properties={ + "has_batch_no": 1, + "create_new_batch": 1, + "is_stock_item": 1, + "batch_number_series": "BRTN-TPRBI-.#####", + }, + ).name + + serial_item = make_item( + "_Test Purchase Receipt Return Valuation Serial Item", + properties={"has_serial_no": 1, "is_stock_item": 1, "serial_no_series": "SRTN-TPRSI-.#####"}, + ).name + + rej_warehouse = create_warehouse("_Test Purchase Warehouse For Rejected Qty") + + pr = make_purchase_receipt( + item_code=batch_item, + received_qty=10, + qty=8, + rejected_qty=2, + rejected_warehouse=rej_warehouse, + rate=300, + do_not_submit=1, + use_serial_batch_fields=0, + ) + + pr.append( + "items", + { + "item_code": serial_item, + "qty": 2, + "rate": 100, + "base_rate": 100, + "item_name": serial_item, + "uom": "Nos", + "stock_uom": "Nos", + "conversion_factor": 1, + "rejected_qty": 1, + "warehouse": pr.items[0].warehouse, + "use_serial_batch_fields": 0, + "rejected_warehouse": rej_warehouse, + }, + ) + + pr.save() + pr.submit() + pr.reload() + + batch_no = get_batch_from_bundle(pr.items[0].serial_and_batch_bundle) + rejected_batch_no = get_batch_from_bundle(pr.items[0].rejected_serial_and_batch_bundle) + + self.assertEqual(batch_no, rejected_batch_no) + + return_entry = make_purchase_return(pr.name) + + return_entry.save() + return_entry.submit() + return_entry.reload() + + for row in return_entry.items: + if row.item_code == batch_item: + bundle_data = frappe.get_all( + "Serial and Batch Entry", + filters={"parent": row.serial_and_batch_bundle}, + pluck="incoming_rate", + ) + + for incoming_rate in bundle_data: + self.assertEqual(incoming_rate, 300.00) + else: + bundle_data = frappe.get_all( + "Serial and Batch Entry", + filters={"parent": row.serial_and_batch_bundle}, + pluck="incoming_rate", + ) + + for incoming_rate in bundle_data: + self.assertEqual(incoming_rate, 100.00) + + for row in return_entry.items: + if row.item_code == batch_item: + bundle_data = frappe.get_all( + "Serial and Batch Entry", + filters={"parent": row.rejected_serial_and_batch_bundle}, + pluck="incoming_rate", + ) + + for incoming_rate in bundle_data: + self.assertEqual(incoming_rate, 0) + else: + bundle_data = frappe.get_all( + "Serial and Batch Entry", + filters={"parent": row.rejected_serial_and_batch_bundle}, + pluck="incoming_rate", + ) + + for incoming_rate in bundle_data: + self.assertEqual(incoming_rate, 0) + + def test_purchase_receipt_return_valuation_with_use_serial_batch_field(self): + from erpnext.stock.doctype.purchase_receipt.purchase_receipt import make_purchase_return + + batch_item = make_item( + "_Test Purchase Receipt Return Valuation With Batch Item", + properties={"has_batch_no": 1, "create_new_batch": 1, "is_stock_item": 1}, + ).name + + serial_item = make_item( + "_Test Purchase Receipt Return Valuation With Serial Item", + properties={"has_serial_no": 1, "is_stock_item": 1}, + ).name + + rej_warehouse = create_warehouse("_Test Purchase Warehouse For Rejected Qty") + + batch_no = "BATCH-RTN-BNU-TPRBI-0001" + serial_nos = ["SNU-RTN-TPRSI-0001", "SNU-RTN-TPRSI-0002", "SNU-RTN-TPRSI-0003"] + + if not frappe.db.exists("Batch", batch_no): + frappe.get_doc( + { + "doctype": "Batch", + "batch_id": batch_no, + "item": batch_item, + } + ).insert() + + for serial_no in serial_nos: + if not frappe.db.exists("Serial No", serial_no): + frappe.get_doc( + { + "doctype": "Serial No", + "item_code": serial_item, + "serial_no": serial_no, + } + ).insert() + + pr = make_purchase_receipt( + item_code=batch_item, + received_qty=10, + qty=8, + rejected_qty=2, + rejected_warehouse=rej_warehouse, + batch_no=batch_no, + use_serial_batch_fields=1, + rate=300, + do_not_submit=1, + ) + + pr.append( + "items", + { + "item_code": serial_item, + "qty": 2, + "rate": 100, + "base_rate": 100, + "item_name": serial_item, + "uom": "Nos", + "stock_uom": "Nos", + "conversion_factor": 1, + "rejected_qty": 1, + "warehouse": pr.items[0].warehouse, + "use_serial_batch_fields": 1, + "rejected_warehouse": rej_warehouse, + "serial_no": "\n".join(serial_nos[:2]), + "rejected_serial_no": serial_nos[2], + }, + ) + + pr.save() + pr.submit() + pr.reload() + + batch_no = get_batch_from_bundle(pr.items[0].serial_and_batch_bundle) + rejected_batch_no = get_batch_from_bundle(pr.items[0].rejected_serial_and_batch_bundle) + + self.assertEqual(batch_no, rejected_batch_no) + + return_entry = make_purchase_return(pr.name) + + return_entry.save() + return_entry.submit() + return_entry.reload() + + for row in return_entry.items: + if row.item_code == batch_item: + bundle_data = frappe.get_all( + "Serial and Batch Entry", + filters={"parent": row.serial_and_batch_bundle}, + pluck="incoming_rate", + ) + + for incoming_rate in bundle_data: + self.assertEqual(incoming_rate, 300.00) + else: + bundle_data = frappe.get_all( + "Serial and Batch Entry", + filters={"parent": row.serial_and_batch_bundle}, + pluck="incoming_rate", + ) + + for incoming_rate in bundle_data: + self.assertEqual(incoming_rate, 100.00) + + for row in return_entry.items: + if row.item_code == batch_item: + bundle_data = frappe.get_all( + "Serial and Batch Entry", + filters={"parent": row.rejected_serial_and_batch_bundle}, + pluck="incoming_rate", + ) + + for incoming_rate in bundle_data: + self.assertEqual(incoming_rate, 0) + else: + bundle_data = frappe.get_all( + "Serial and Batch Entry", + filters={"parent": row.rejected_serial_and_batch_bundle}, + pluck="incoming_rate", + ) + + for incoming_rate in bundle_data: + self.assertEqual(incoming_rate, 0) + + def test_purchase_return_partial_debit_note(self): + pr = make_purchase_receipt( + company="_Test Company with perpetual inventory", + warehouse="Stores - TCP1", + supplier_warehouse="Work In Progress - TCP1", + ) + + return_pr = make_purchase_receipt( + company="_Test Company with perpetual inventory", + warehouse="Stores - TCP1", + supplier_warehouse="Work In Progress - TCP1", + is_return=1, + return_against=pr.name, + qty=-2, + do_not_submit=1, + ) + return_pr.items[0].purchase_receipt_item = pr.items[0].name + return_pr.submit() + + # because new_doc isn't considering is_return portion of status_updater + returned = frappe.get_doc("Purchase Receipt", return_pr.name) + returned.update_prevdoc_status() + pr.load_from_db() + + # Check if Original PR updated + self.assertEqual(pr.items[0].returned_qty, 2) + self.assertEqual(pr.per_returned, 40) + + # Create first partial debit_note + pi_1 = make_purchase_invoice(return_pr.name) + pi_1.items[0].qty = -1 + pi_1.submit() + + # Check if the first partial debit billing percentage got updated + return_pr.reload() + self.assertEqual(return_pr.per_billed, 50) + self.assertEqual(return_pr.status, "Partly Billed") + + # Create second partial debit_note to complete the debit note + pi_2 = make_purchase_invoice(return_pr.name) + pi_2.items[0].qty = -1 + pi_2.submit() + + # Check if the second partial debit note billing percentage got updated + return_pr.reload() + self.assertEqual(return_pr.per_billed, 100) + self.assertEqual(return_pr.status, "Completed") + + def test_do_not_allow_to_inward_same_serial_no_multiple_times(self): + from erpnext.stock.doctype.stock_entry.test_stock_entry import make_stock_entry + + frappe.db.set_single_value("Stock Settings", "allow_existing_serial_no", 0) + + item_code = make_item( + "Test Do Not Allow INWD Item 123", {"has_serial_no": 1, "serial_no_series": "SN-TDAISN-.#####"} + ).name + + pr = make_purchase_receipt(item_code=item_code, qty=1, rate=100, use_serial_batch_fields=1) + serial_no = get_serial_nos_from_bundle(pr.items[0].serial_and_batch_bundle)[0] + + status = frappe.db.get_value("Serial No", serial_no, "status") + self.assertTrue(status == "Active") + + make_stock_entry( + item_code=item_code, + source=pr.items[0].warehouse, + qty=1, + serial_no=serial_no, + use_serial_batch_fields=1, + ) + + status = frappe.db.get_value("Serial No", serial_no, "status") + self.assertFalse(status == "Active") + + pr = make_purchase_receipt( + item_code=item_code, qty=1, rate=100, use_serial_batch_fields=1, do_not_submit=1 + ) + pr.items[0].serial_no = serial_no + pr.save() + + self.assertRaises(frappe.exceptions.ValidationError, pr.submit) + + frappe.db.set_single_value("Stock Settings", "allow_existing_serial_no", 1) + def prepare_data_for_internal_transfer(): from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_internal_supplier diff --git a/erpnext/stock/doctype/quality_inspection/quality_inspection.js b/erpnext/stock/doctype/quality_inspection/quality_inspection.js index fc487514a2c..99e25bf5eb6 100644 --- a/erpnext/stock/doctype/quality_inspection/quality_inspection.js +++ b/erpnext/stock/doctype/quality_inspection/quality_inspection.js @@ -60,7 +60,7 @@ frappe.ui.form.on("Quality Inspection", { refresh: function (frm) { // Ignore cancellation of reference doctype on cancel all. - frm.ignore_doctypes_on_cancel_all = [frm.doc.reference_type]; + frm.ignore_doctypes_on_cancel_all = [frm.doc.reference_type, "Serial and Batch Bundle"]; }, item_code: function (frm) { diff --git a/erpnext/stock/doctype/quality_inspection/quality_inspection.py b/erpnext/stock/doctype/quality_inspection/quality_inspection.py index 60f048673fb..6890256dc04 100644 --- a/erpnext/stock/doctype/quality_inspection/quality_inspection.py +++ b/erpnext/stock/doctype/quality_inspection/quality_inspection.py @@ -6,7 +6,7 @@ import frappe from frappe import _ from frappe.model.document import Document from frappe.model.mapper import get_mapped_doc -from frappe.utils import cint, cstr, flt, get_number_format_info +from frappe.utils import cint, cstr, flt, get_link_to_form, get_number_format_info from erpnext.stock.doctype.quality_inspection_template.quality_inspection_template import ( get_template_details, @@ -73,6 +73,27 @@ class QualityInspection(Document): if self.readings: self.inspect_and_set_status() + self.validate_inspection_required() + + def validate_inspection_required(self): + if self.reference_type in ["Purchase Receipt", "Purchase Invoice"] and not frappe.get_cached_value( + "Item", self.item_code, "inspection_required_before_purchase" + ): + frappe.throw( + _( + "'Inspection Required before Purchase' has disabled for the item {0}, no need to create the QI" + ).format(get_link_to_form("Item", self.item_code)) + ) + + if self.reference_type in ["Delivery Note", "Sales Invoice"] and not frappe.get_cached_value( + "Item", self.item_code, "inspection_required_before_delivery" + ): + frappe.throw( + _( + "'Inspection Required before Delivery' has disabled for the item {0}, no need to create the QI" + ).format(get_link_to_form("Item", self.item_code)) + ) + def before_submit(self): self.validate_readings_status_mandatory() @@ -109,6 +130,8 @@ class QualityInspection(Document): self.update_qc_reference() def on_cancel(self): + self.ignore_linked_doctypes = "Serial and Batch Bundle" + self.update_qc_reference() def on_trash(self): @@ -243,6 +266,7 @@ class QualityInspection(Document): for i in range(1, 11): field = "reading_" + str(i) if reading.get(field) is None: + data[field] = 0.0 continue data[field] = parse_float(reading.get(field)) diff --git a/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py b/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py index c20eadeb78d..0c81a296d5e 100644 --- a/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py +++ b/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py @@ -125,7 +125,7 @@ class RepostItemValuation(Document): query = ( frappe.qb.from_(table) - .select(Max(table.posting_date)) + .select(Max(table.period_end_date)) .where((table.company == company) & (table.docstatus == 1)) ).run() 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 ef4d475dca4..a1f3135b70b 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 @@ -89,6 +89,10 @@ class SerialandBatchBundle(Document): self.validate_serial_and_batch_no() self.validate_duplicate_serial_and_batch_no() self.validate_voucher_no() + + if self.docstatus == 0: + self.allow_existing_serial_nos() + if self.type_of_transaction == "Maintenance": return @@ -102,6 +106,42 @@ class SerialandBatchBundle(Document): self.set_incoming_rate() self.calculate_qty_and_amount() + def allow_existing_serial_nos(self): + if self.type_of_transaction == "Outward" or not self.has_serial_no: + return + + if frappe.db.get_single_value("Stock Settings", "allow_existing_serial_no"): + return + + if self.voucher_type not in ["Purchase Receipt", "Purchase Invoice", "Stock Entry"]: + return + + if self.voucher_type == "Stock Entry" and frappe.get_cached_value( + "Stock Entry", self.voucher_no, "purpose" + ) in ["Material Transfer", "Send to Subcontractor", "Material Transfer for Manufacture"]: + return + + serial_nos = [d.serial_no for d in self.entries if d.serial_no] + + data = frappe.get_all( + "Serial and Batch Entry", + filters={"serial_no": ("in", serial_nos), "docstatus": 1, "qty": ("<", 0)}, + fields=["serial_no", "parent"], + ) + + note = "

Note:
" + for row in data: + frappe.throw( + _( + "You can't process the serial number {0} as it has already been used in the SABB {1}. {2} if you want to inward same serial number multiple times then enabled 'Allow existing Serial No to be Manufactured/Received again' in the {3}" + ).format( + row.serial_no, + get_link_to_form("Serial and Batch Bundle", row.parent), + note, + get_link_to_form("Stock Settings", "Stock Settings"), + ) + ) + def reset_serial_batch_bundle(self): if self.is_new() and self.amended_from: for field in ["is_cancelled", "is_rejected"]: @@ -136,7 +176,12 @@ class SerialandBatchBundle(Document): return serial_nos = [d.serial_no for d in self.entries if d.serial_no] - kwargs = {"item_code": self.item_code, "warehouse": self.warehouse} + kwargs = { + "item_code": self.item_code, + "warehouse": self.warehouse, + "check_serial_nos": True, + "serial_nos": serial_nos, + } if self.voucher_type == "POS Invoice": kwargs["ignore_voucher_nos"] = [self.voucher_no] @@ -177,6 +222,7 @@ class SerialandBatchBundle(Document): "posting_date": self.posting_date, "posting_time": self.posting_time, "serial_nos": serial_nos, + "check_serial_nos": True, } ) @@ -197,7 +243,7 @@ class SerialandBatchBundle(Document): def throw_error_message(self, message, exception=frappe.ValidationError): frappe.throw(_(message), exception, title=_("Error")) - def set_incoming_rate(self, row=None, save=False, allow_negative_stock=False): + def set_incoming_rate(self, parent=None, row=None, save=False, allow_negative_stock=False): if self.type_of_transaction not in ["Inward", "Outward"] or self.voucher_type in [ "Installation Note", "Job Card", @@ -206,13 +252,70 @@ class SerialandBatchBundle(Document): ]: return - if self.type_of_transaction == "Outward": + if return_aginst := self.get_return_aginst(parent=parent): + self.set_valuation_rate_for_return_entry(return_aginst, save) + elif self.type_of_transaction == "Outward": self.set_incoming_rate_for_outward_transaction( row, save, allow_negative_stock=allow_negative_stock ) else: self.set_incoming_rate_for_inward_transaction(row, save) + def set_valuation_rate_for_return_entry(self, return_aginst, save=False): + if valuation_details := self.get_valuation_rate_for_return_entry(return_aginst): + for row in self.entries: + if row.serial_no: + valuation_rate = valuation_details["serial_nos"].get(row.serial_no) + else: + valuation_rate = valuation_details["batches"].get(row.batch_no) + + row.incoming_rate = flt(valuation_rate) + row.stock_value_difference = flt(row.qty) * flt(row.incoming_rate) + + if save: + row.db_set( + { + "incoming_rate": row.incoming_rate, + "stock_value_difference": row.stock_value_difference, + } + ) + + def get_valuation_rate_for_return_entry(self, return_aginst): + valuation_details = frappe._dict( + { + "serial_nos": defaultdict(float), + "batches": defaultdict(float), + } + ) + + bundle_data = frappe.get_all( + "Serial and Batch Bundle", + fields=[ + "`tabSerial and Batch Entry`.`serial_no`", + "`tabSerial and Batch Entry`.`batch_no`", + "`tabSerial and Batch Entry`.`incoming_rate`", + ], + filters=[ + ["Serial and Batch Bundle", "voucher_no", "=", return_aginst], + ["Serial and Batch Entry", "docstatus", "=", 1], + ["Serial and Batch Bundle", "is_cancelled", "=", 0], + ["Serial and Batch Bundle", "item_code", "=", self.item_code], + ["Serial and Batch Bundle", "warehouse", "=", self.warehouse], + ], + order_by="`tabSerial and Batch Bundle`.`creation`, `tabSerial and Batch Entry`.`idx`", + ) + + if not bundle_data: + return {} + + for row in bundle_data: + if row.serial_no: + valuation_details["serial_nos"][row.serial_no] = row.incoming_rate + else: + valuation_details["batches"][row.batch_no] = row.incoming_rate + + return valuation_details + def calculate_total_qty(self, save=True): self.total_qty = 0.0 for d in self.entries: @@ -280,7 +383,7 @@ class SerialandBatchBundle(Document): ) def validate_negative_batch(self, batch_no, available_qty): - if available_qty < 0: + if available_qty < 0 and not self.is_stock_reco_for_valuation_adjustment(available_qty): msg = f"""Batch No {bold(batch_no)} of an Item {bold(self.item_code)} has negative stock of quantity {bold(available_qty)} in the @@ -288,6 +391,18 @@ class SerialandBatchBundle(Document): frappe.throw(_(msg), BatchNegativeStockError) + def is_stock_reco_for_valuation_adjustment(self, available_qty): + if ( + self.voucher_type == "Stock Reconciliation" + and self.type_of_transaction == "Outward" + and self.voucher_detail_no + and abs(frappe.db.get_value("Stock Reconciliation Item", self.voucher_detail_no, "qty")) + == abs(available_qty) + ): + return True + + return False + def get_sle_for_outward_transaction(self): sle = frappe._dict( { @@ -315,6 +430,33 @@ class SerialandBatchBundle(Document): return sle + def get_return_aginst(self, parent=None): + return_aginst = None + + if parent and parent.get("is_return") and parent.get("return_against"): + return parent.get("return_against") + + if ( + self.voucher_type + in [ + "Delivery Note", + "Sales Invoice", + "Purchase Invoice", + "Purchase Receipt", + "POS Invoice", + "Subcontracting Receipt", + ] + and self.voucher_type + and self.voucher_no + ): + voucher_details = frappe.db.get_value( + self.voucher_type, self.voucher_no, ["is_return", "return_against"], as_dict=True + ) + if voucher_details and voucher_details.get("is_return") and voucher_details.get("return_against"): + return voucher_details.get("return_against") + + return return_aginst + def set_incoming_rate_for_inward_transaction(self, row=None, save=False): valuation_field = "valuation_rate" if self.voucher_type in ["Sales Invoice", "Delivery Note", "Quotation"]: @@ -336,18 +478,18 @@ class SerialandBatchBundle(Document): valuation_field = "rate" child_table = "Subcontracting Receipt Item" - precision = frappe.get_precision(child_table, valuation_field) or 2 - if not rate and self.voucher_detail_no and self.voucher_no: rate = frappe.db.get_value(child_table, self.voucher_detail_no, valuation_field) for d in self.entries: - if (d.incoming_rate == rate) and d.qty and d.stock_value_difference: + if self.is_rejected: + rate = 0.0 + elif (d.incoming_rate == rate) and d.qty and d.stock_value_difference: continue - d.incoming_rate = flt(rate, precision) + d.incoming_rate = rate if d.qty: - d.stock_value_difference = flt(d.qty) * flt(d.incoming_rate) + d.stock_value_difference = d.qty * d.incoming_rate if save: d.db_set( @@ -391,7 +533,7 @@ class SerialandBatchBundle(Document): # If user has changed the rate in the child table if self.docstatus == 0: - self.set_incoming_rate(save=True, row=row) + self.set_incoming_rate(parent=parent, row=row, save=True) if self.docstatus == 0 and parent.get("is_return") and parent.is_new(): self.reset_qty(row, qty_field=qty_field) @@ -511,8 +653,10 @@ class SerialandBatchBundle(Document): precision = row.precision if abs(abs(flt(self.total_qty, precision)) - abs(flt(qty, precision))) > 0.01: + total_qty = frappe.format_value(abs(flt(self.total_qty)), "Float", row) + set_qty = frappe.format_value(abs(flt(row.get(qty_field))), "Float", row) self.throw_error_message( - f"Total quantity {abs(flt(self.total_qty))} in the Serial and Batch Bundle {bold(self.name)} does not match with the quantity {abs(flt(row.get(qty_field)))} for the Item {bold(self.item_code)} in the {self.voucher_type} # {self.voucher_no}" + f"Total quantity {total_qty} in the Serial and Batch Bundle {bold(self.name)} does not match with the quantity {set_qty} for the Item {bold(self.item_code)} in the {self.voucher_type} # {self.voucher_no}" ) def get_qty_field(self, row, qty_field=None) -> str: @@ -591,6 +735,9 @@ class SerialandBatchBundle(Document): serial_batches = {} for row in self.entries: if not row.qty and row.batch_no and not row.serial_no: + if self.voucher_type == "Stock Reconciliation" and self.type_of_transaction == "Inward": + continue + frappe.throw( _("At row {0}: Qty is mandatory for the batch {1}").format( bold(row.idx), bold(row.batch_no) @@ -648,10 +795,6 @@ class SerialandBatchBundle(Document): ) def validate_incorrect_serial_nos(self, serial_nos): - if self.voucher_type == "Stock Entry" and self.voucher_no: - if frappe.get_cached_value("Stock Entry", self.voucher_no, "purpose") == "Repack": - return - incorrect_serial_nos = frappe.get_all( "Serial No", filters={"name": ("in", serial_nos), "item_code": ("!=", self.item_code)}, @@ -875,6 +1018,9 @@ class SerialandBatchBundle(Document): ): return + if self.voucher_type in ["Sales Invoice", "Delivery Note"] and self.type_of_transaction == "Inward": + return + if not self.has_batch_no: return @@ -1296,8 +1442,12 @@ def add_serial_batch_ledgers(entries, child_row, doc, warehouse, do_not_save=Fal 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): - sb_doc = update_serial_batch_no_ledgers(entries, child_row, parent_doc, warehouse) + bundle = child_row.serial_and_batch_bundle + if child_row.get("is_rejected"): + bundle = child_row.rejected_serial_and_batch_bundle + + if frappe.db.exists("Serial and Batch Bundle", bundle): + sb_doc = update_serial_batch_no_ledgers(bundle, entries, child_row, parent_doc, warehouse) else: sb_doc = create_serial_batch_no_ledgers( entries, child_row, parent_doc, warehouse, do_not_save=do_not_save @@ -1329,6 +1479,15 @@ def create_serial_batch_no_ledgers( } ) + batch_no = None + + if ( + not entries[0].get("batch_no") + and entries[0].get("serial_no") + and frappe.get_cached_value("Item", child_row.item_code, "has_batch_no") + ): + batch_no = get_batch(child_row.item_code) + for row in entries: row = frappe._dict(row) doc.append( @@ -1336,7 +1495,7 @@ def create_serial_batch_no_ledgers( { "qty": (flt(row.qty) or 1.0) * (1 if type_of_transaction == "Inward" else -1), "warehouse": warehouse, - "batch_no": row.batch_no, + "batch_no": row.batch_no or batch_no, "serial_no": row.serial_no, }, ) @@ -1351,6 +1510,18 @@ def create_serial_batch_no_ledgers( return doc +def get_batch(item_code): + from erpnext.stock.doctype.batch.batch import make_batch + + return make_batch( + frappe._dict( + { + "item": item_code, + } + ) + ) + + def get_type_of_transaction(parent_doc, child_row): type_of_transaction = child_row.get("type_of_transaction") if parent_doc.get("doctype") == "Stock Entry": @@ -1379,8 +1550,8 @@ def get_type_of_transaction(parent_doc, child_row): return type_of_transaction -def update_serial_batch_no_ledgers(entries, child_row, parent_doc, warehouse=None) -> object: - doc = frappe.get_doc("Serial and Batch Bundle", child_row.serial_and_batch_bundle) +def update_serial_batch_no_ledgers(bundle, entries, child_row, parent_doc, warehouse=None) -> object: + doc = frappe.get_doc("Serial and Batch Bundle", bundle) doc.voucher_detail_no = child_row.name doc.posting_date = parent_doc.posting_date doc.posting_time = parent_doc.posting_time @@ -1558,13 +1729,14 @@ def get_serial_nos_based_on_posting_date(kwargs, ignore_serial_nos): serial_nos = set() data = get_stock_ledgers_for_serial_nos(kwargs) + bundle_wise_serial_nos = get_bundle_wise_serial_nos(data, kwargs) for d in data: if d.serial_and_batch_bundle: - sns = get_serial_nos_from_bundle(d.serial_and_batch_bundle, kwargs.get("serial_nos", [])) - if d.actual_qty > 0: - serial_nos.update(sns) - else: - serial_nos.difference_update(sns) + if sns := bundle_wise_serial_nos.get(d.serial_and_batch_bundle): + if d.actual_qty > 0: + serial_nos.update(sns) + else: + serial_nos.difference_update(sns) elif d.serial_no: sns = get_serial_nos(d.serial_no) @@ -1581,6 +1753,30 @@ def get_serial_nos_based_on_posting_date(kwargs, ignore_serial_nos): return serial_nos +def get_bundle_wise_serial_nos(data, kwargs): + bundle_wise_serial_nos = defaultdict(list) + bundles = [d.serial_and_batch_bundle for d in data if d.serial_and_batch_bundle] + if not bundles: + return bundle_wise_serial_nos + + filters = {"parent": ("in", bundles), "docstatus": 1, "serial_no": ("is", "set")} + + if kwargs.get("check_serial_nos") and kwargs.get("serial_nos"): + filters["serial_no"] = ("in", kwargs.get("serial_nos")) + + bundle_data = frappe.get_all( + "Serial and Batch Entry", + fields=["serial_no", "parent"], + filters=filters, + ) + + for d in bundle_data: + if d.parent: + bundle_wise_serial_nos[d.parent].append(d.serial_no) + + return bundle_wise_serial_nos + + def get_reserved_serial_nos(kwargs) -> list: """Returns a list of `Serial No` reserved in POS Invoice and Stock Reservation Entry.""" @@ -2132,6 +2328,8 @@ def get_ledgers_from_serial_batch_bundle(**kwargs) -> list[frappe._dict]: def get_stock_ledgers_for_serial_nos(kwargs): + from erpnext.stock.utils import get_combine_datetime + stock_ledger_entry = frappe.qb.DocType("Stock Ledger Entry") query = ( @@ -2142,15 +2340,16 @@ def get_stock_ledgers_for_serial_nos(kwargs): stock_ledger_entry.serial_and_batch_bundle, ) .where(stock_ledger_entry.is_cancelled == 0) + .orderby(stock_ledger_entry.posting_datetime) ) if kwargs.get("posting_date"): if kwargs.get("posting_time") is None: kwargs.posting_time = nowtime() - timestamp_condition = CombineDatetime( - stock_ledger_entry.posting_date, stock_ledger_entry.posting_time - ) <= CombineDatetime(kwargs.posting_date, kwargs.posting_time) + timestamp_condition = stock_ledger_entry.posting_datetime <= get_combine_datetime( + kwargs.posting_date, kwargs.posting_time + ) query = query.where(timestamp_condition) diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.js b/erpnext/stock/doctype/stock_entry/stock_entry.js index c54876713c3..0e39c2a9756 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.js +++ b/erpnext/stock/doctype/stock_entry/stock_entry.js @@ -117,6 +117,10 @@ frappe.ui.form.on("Stock Entry", { filters["is_inward"] = 1; } + if (["Material Receipt", "Material Transfer", "Material Issue"].includes(doc.purpose)) { + filters["include_expired_batches"] = 1; + } + return { query: "erpnext.controllers.queries.get_batch_no", filters: filters, @@ -447,9 +451,11 @@ frappe.ui.form.on("Stock Entry", { source_doctype: "Stock Entry", target: frm, date_field: "posting_date", + read_only_setters: ["stock_entry_type", "purpose", "add_to_transit"], setters: { stock_entry_type: "Material Transfer", purpose: "Material Transfer", + add_to_transit: 1, }, get_query_filters: { docstatus: 1, @@ -828,6 +834,15 @@ frappe.ui.form.on("Stock Entry", { }); frappe.ui.form.on("Stock Entry Detail", { + set_basic_rate_manually(frm, cdt, cdn) { + let row = locals[cdt][cdn]; + frm.fields_dict.items.grid.update_docfield_property( + "basic_rate", + "read_only", + row?.set_basic_rate_manually ? 0 : 1 + ); + }, + qty(frm, cdt, cdn) { frm.events.set_basic_rate(frm, cdt, cdn); }, @@ -1296,7 +1311,7 @@ erpnext.stock.StockEntry = class StockEntry extends erpnext.stock.StockControlle this.frm.cscript.toggle_enable_bom(); - if (doc.purpose == "Send to Subcontractor") { + if (erpnext.stock.is_subcontracting_or_return_transfer(doc)) { doc.customer = doc.customer_name = doc.customer_address = @@ -1362,6 +1377,10 @@ erpnext.stock.select_batch_and_serial_no = (frm, item) => { }); }; +erpnext.stock.is_subcontracting_or_return_transfer = (doc) => { + return doc.purpose == "Send to Subcontractor" || (doc.purpose == "Material Transfer" && doc.is_return); +}; + function attach_bom_items(bom_no) { if (!bom_no) { return; diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.json b/erpnext/stock/doctype/stock_entry/stock_entry.json index 3f467d3627a..f5fdfafe778 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.json +++ b/erpnext/stock/doctype/stock_entry/stock_entry.json @@ -127,7 +127,7 @@ "label": "Purpose", "oldfieldname": "purpose", "oldfieldtype": "Select", - "options": "Material Issue\nMaterial Receipt\nMaterial Transfer\nMaterial Transfer for Manufacture\nMaterial Consumption for Manufacture\nManufacture\nRepack\nSend to Subcontractor", + "options": "Material Issue\nMaterial Receipt\nMaterial Transfer\nMaterial Transfer for Manufacture\nMaterial Consumption for Manufacture\nManufacture\nRepack\nSend to Subcontractor\nDisassemble", "read_only": 1, "search_index": 1 }, @@ -143,7 +143,7 @@ "reqd": 1 }, { - "depends_on": "eval:in_list([\"Material Transfer for Manufacture\", \"Manufacture\", \"Material Consumption for Manufacture\"], doc.purpose)", + "depends_on": "eval:in_list([\"Material Transfer for Manufacture\", \"Manufacture\", \"Material Consumption for Manufacture\", \"Disassemble\"], doc.purpose)", "fieldname": "work_order", "fieldtype": "Link", "label": "Work Order", @@ -154,14 +154,14 @@ "search_index": 1 }, { - "depends_on": "eval:doc.purpose==\"Send to Subcontractor\"", + "depends_on": "eval: erpnext.stock.is_subcontracting_or_return_transfer(doc)", "fieldname": "purchase_order", "fieldtype": "Link", "label": "Purchase Order", "options": "Purchase Order" }, { - "depends_on": "eval:doc.purpose==\"Send to Subcontractor\"", + "depends_on": "eval: erpnext.stock.is_subcontracting_or_return_transfer(doc)", "fieldname": "subcontracting_order", "fieldtype": "Link", "label": "Subcontracting Order", @@ -242,7 +242,7 @@ }, { "default": "0", - "depends_on": "eval:in_list([\"Material Issue\", \"Material Transfer\", \"Manufacture\", \"Repack\", \"Send to Subcontractor\", \"Material Transfer for Manufacture\", \"Material Consumption for Manufacture\"], doc.purpose)", + "depends_on": "eval:in_list([\"Material Issue\", \"Material Transfer\", \"Manufacture\", \"Repack\", \"Send to Subcontractor\", \"Material Transfer for Manufacture\", \"Material Consumption for Manufacture\", \"Disassemble\"], doc.purpose)", "fieldname": "from_bom", "fieldtype": "Check", "label": "From BOM", @@ -427,13 +427,13 @@ }, { "collapsible": 1, - "depends_on": "eval:doc.purpose === \"Send to Subcontractor\"", + "depends_on": "eval: erpnext.stock.is_subcontracting_or_return_transfer(doc)", "fieldname": "contact_section", "fieldtype": "Section Break", "label": "Supplier Details" }, { - "depends_on": "eval:doc.purpose === \"Send to Subcontractor\"", + "depends_on": "eval: erpnext.stock.is_subcontracting_or_return_transfer(doc)", "fieldname": "supplier", "fieldtype": "Link", "label": "Supplier", @@ -445,7 +445,7 @@ }, { "bold": 1, - "depends_on": "eval:doc.purpose === \"Send to Subcontractor\"", + "depends_on": "eval: erpnext.stock.is_subcontracting_or_return_transfer(doc)", "fieldname": "supplier_name", "fieldtype": "Data", "label": "Supplier Name", @@ -455,7 +455,7 @@ "read_only": 1 }, { - "depends_on": "eval:doc.purpose === \"Send to Subcontractor\"", + "depends_on": "eval: erpnext.stock.is_subcontracting_or_return_transfer(doc)", "fieldname": "supplier_address", "fieldtype": "Link", "label": "Supplier Address", @@ -697,7 +697,7 @@ "index_web_pages_for_search": 1, "is_submittable": 1, "links": [], - "modified": "2024-08-13 19:02:42.386955", + "modified": "2024-08-13 19:05:42.386955", "modified_by": "Administrator", "module": "Stock", "name": "Stock Entry", diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index 14e0fdf6388..f362f9d3da9 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -132,6 +132,7 @@ class StockEntry(StockController): "Manufacture", "Repack", "Send to Subcontractor", + "Disassemble", ] remarks: DF.Text | None sales_invoice_no: DF.Link | None @@ -231,6 +232,7 @@ class StockEntry(StockController): self.validate_serialized_batch() self.calculate_rate_and_amount() self.validate_putaway_capacity() + self.validate_component_quantities() if not self.get("purpose") == "Manufacture": # ignore scrap item wh difference and empty source/target wh @@ -337,6 +339,7 @@ class StockEntry(StockController): "Repack", "Send to Subcontractor", "Material Consumption for Manufacture", + "Disassemble", ] if self.purpose not in valid_purposes: @@ -616,6 +619,7 @@ class StockEntry(StockController): "Manufacture", "Material Transfer for Manufacture", "Material Consumption for Manufacture", + "Disassemble", ): # check if work order is entered @@ -744,6 +748,34 @@ class StockEntry(StockController): title=_("Insufficient Stock"), ) + def validate_component_quantities(self): + if self.purpose not in ["Manufacture", "Material Transfer for Manufacture"]: + return + + if not frappe.db.get_single_value("Manufacturing Settings", "validate_components_quantities_per_bom"): + return + + if not self.fg_completed_qty: + return + + raw_materials = self.get_bom_raw_materials(self.fg_completed_qty) + + precision = frappe.get_precision("Stock Entry Detail", "qty") + for row in self.items: + if not row.s_warehouse: + continue + + if details := raw_materials.get(row.item_code): + if flt(details.get("qty"), precision) != flt(row.qty, precision): + frappe.throw( + _("For the item {0}, the quantity should be {1} according to the BOM {2}.").format( + frappe.bold(row.item_code), + flt(details.get("qty"), precision), + get_link_to_form("BOM", self.bom_no), + ), + title=_("Incorrect Component Quantity"), + ) + @frappe.whitelist() def get_stock_and_rate(self): """ @@ -763,9 +795,6 @@ class StockEntry(StockController): self.set_total_incoming_outgoing_value() self.set_total_amount() - if not reset_outgoing_rate: - self.set_serial_and_batch_bundle() - def set_basic_rate(self, reset_outgoing_rate=True, raise_error_if_no_rate=True): """ Set rate for outgoing, scrapped and finished items @@ -898,8 +927,8 @@ class StockEntry(StockController): ).format( item.idx, frappe.bold(label), - frappe.bold("Manufacture"), - frappe.bold("Material Consumption for Manufacture"), + frappe.bold(_("Manufacture")), + frappe.bold(_("Material Consumption for Manufacture")), ) ) @@ -909,7 +938,7 @@ class StockEntry(StockController): ): frappe.throw( _("Only one {0} entry can be created against the Work Order {1}").format( - frappe.bold("Manufacture"), frappe.bold(self.work_order) + frappe.bold(_("Manufacture")), frappe.bold(self.work_order) ) ) @@ -983,7 +1012,7 @@ class StockEntry(StockController): def set_stock_entry_type(self): if self.purpose: self.stock_entry_type = frappe.get_cached_value( - "Stock Entry Type", {"purpose": self.purpose}, "name" + "Stock Entry Type", {"purpose": self.purpose, "is_standard": 1}, "name" ) def set_purpose_for_stock_entry(self): @@ -1277,10 +1306,10 @@ class StockEntry(StockController): 3. Check FG Item and Qty against WO if present (mfg) """ production_item, wo_qty, finished_items = None, 0, [] - - wo_details = frappe.db.get_value("Work Order", self.work_order, ["production_item", "qty"]) - if wo_details: - production_item, wo_qty = wo_details + if self.work_order: + wo_details = frappe.db.get_value("Work Order", self.work_order, ["production_item", "qty"]) + if wo_details: + production_item, wo_qty = wo_details for d in self.get("items"): if d.is_finished_item: @@ -1562,10 +1591,6 @@ class StockEntry(StockController): if pro_doc.status == "Stopped": msg = f"Transaction not allowed against stopped Work Order {self.work_order}" - if self.is_return and pro_doc.status not in ["Completed", "Closed"]: - title = _("Stock Return") - msg = f"Work Order {self.work_order} must be completed or closed" - if msg: frappe.throw(_(msg), title=title) @@ -1703,11 +1728,63 @@ class StockEntry(StockController): }, ) + def get_items_for_disassembly(self): + """Get items for Disassembly Order""" + + if not self.work_order: + frappe.throw(_("The Work Order is mandatory for Disassembly Order")) + + items = self.get_items_from_manufacture_entry() + + s_warehouse = "" + if self.work_order: + s_warehouse = frappe.db.get_value("Work Order", self.work_order, "fg_warehouse") + + for row in items: + child_row = self.append("items", {}) + for field, value in row.items(): + if value is not None: + child_row.set(field, value) + + child_row.s_warehouse = (self.from_warehouse or s_warehouse) if row.is_finished_item else "" + child_row.t_warehouse = self.to_warehouse if not row.is_finished_item else "" + child_row.is_finished_item = 0 if row.is_finished_item else 1 + + def get_items_from_manufacture_entry(self): + return frappe.get_all( + "Stock Entry", + fields=[ + "`tabStock Entry Detail`.`item_code`", + "`tabStock Entry Detail`.`item_name`", + "`tabStock Entry Detail`.`description`", + "`tabStock Entry Detail`.`qty`", + "`tabStock Entry Detail`.`transfer_qty`", + "`tabStock Entry Detail`.`stock_uom`", + "`tabStock Entry Detail`.`uom`", + "`tabStock Entry Detail`.`basic_rate`", + "`tabStock Entry Detail`.`conversion_factor`", + "`tabStock Entry Detail`.`is_finished_item`", + "`tabStock Entry Detail`.`batch_no`", + "`tabStock Entry Detail`.`serial_no`", + "`tabStock Entry Detail`.`use_serial_batch_fields`", + ], + filters=[ + ["Stock Entry", "purpose", "=", "Manufacture"], + ["Stock Entry", "work_order", "=", self.work_order], + ["Stock Entry", "docstatus", "=", 1], + ["Stock Entry Detail", "docstatus", "=", 1], + ], + order_by="`tabStock Entry Detail`.`idx` desc, `tabStock Entry Detail`.`is_finished_item` desc", + ) + @frappe.whitelist() def get_items(self): self.set("items", []) self.validate_work_order() + if self.purpose == "Disassemble": + return self.get_items_for_disassembly() + if not self.posting_date or not self.posting_time: frappe.throw(_("Posting date and posting time is mandatory")) @@ -3064,11 +3141,13 @@ def get_available_materials(work_order) -> dict: if row.serial_no: for serial_no in get_serial_nos(row.serial_no): - item_data.serial_nos.remove(serial_no) + if serial_no in item_data.serial_nos: + item_data.serial_nos.remove(serial_no) elif row.serial_nos: for serial_no in get_serial_nos(row.serial_nos): - item_data.serial_nos.remove(serial_no) + if serial_no in item_data.serial_nos: + item_data.serial_nos.remove(serial_no) return available_materials @@ -3186,6 +3265,9 @@ def create_serial_and_batch_bundle(parent_doc, row, child, type_of_transaction=N for batch_no, qty in row.batches_to_be_consume.items(): doc.append("entries", {"batch_no": batch_no, "warehouse": row.warehouse, "qty": qty * -1}) + if not doc.entries: + return None + return doc.insert(ignore_permissions=True).name diff --git a/erpnext/stock/doctype/stock_entry/test_stock_entry.py b/erpnext/stock/doctype/stock_entry/test_stock_entry.py index a680b7733d3..a26940462bf 100644 --- a/erpnext/stock/doctype/stock_entry/test_stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/test_stock_entry.py @@ -4,7 +4,7 @@ from frappe.permissions import add_user_permission, remove_user_permission from frappe.tests.utils import FrappeTestCase, change_settings -from frappe.utils import add_days, flt, nowtime, today +from frappe.utils import add_days, cstr, flt, get_time, getdate, nowtime, today from erpnext.accounts.doctype.account.test_account import get_inventory_account from erpnext.stock.doctype.item.test_item import ( @@ -970,61 +970,6 @@ class TestStockEntry(FrappeTestCase): self.assertRaises(frappe.ValidationError, ste.submit) - def test_same_serial_nos_in_repack_or_manufacture_entries(self): - s1 = make_serialized_item(target_warehouse="_Test Warehouse - _TC") - serial_nos = get_serial_nos_from_bundle(s1.get("items")[0].serial_and_batch_bundle) - - s2 = make_stock_entry( - item_code="_Test Serialized Item With Series", - source="_Test Warehouse - _TC", - qty=2, - basic_rate=100, - purpose="Repack", - serial_no=serial_nos, - do_not_save=True, - ) - - frappe.flags.use_serial_and_batch_fields = True - - cls_obj = SerialBatchCreation( - { - "type_of_transaction": "Inward", - "serial_and_batch_bundle": s2.items[0].serial_and_batch_bundle, - "item_code": "_Test Serialized Item", - "warehouse": "_Test Warehouse - _TC", - } - ) - - cls_obj.duplicate_package() - bundle_id = cls_obj.serial_and_batch_bundle - doc = frappe.get_doc("Serial and Batch Bundle", bundle_id) - doc.db_set( - { - "item_code": "_Test Serialized Item", - "warehouse": "_Test Warehouse - _TC", - } - ) - - doc.load_from_db() - - s2.append( - "items", - { - "item_code": "_Test Serialized Item", - "t_warehouse": "_Test Warehouse - _TC", - "qty": 2, - "basic_rate": 120, - "expense_account": "Stock Adjustment - _TC", - "conversion_factor": 1.0, - "cost_center": "_Test Cost Center - _TC", - "serial_and_batch_bundle": bundle_id, - }, - ) - - s2.submit() - s2.cancel() - frappe.flags.use_serial_and_batch_fields = False - def test_quality_check(self): item_code = "_Test Item For QC" if not frappe.db.exists("Item", item_code): @@ -1700,6 +1645,46 @@ class TestStockEntry(FrappeTestCase): mr.cancel() mr.delete() + def test_auto_reorder_level_with_lead_time_days(self): + from erpnext.stock.reorder_item import reorder_item + + item_doc = make_item( + "Test Auto Reorder Item - 002", + properties={"stock_uom": "Kg", "purchase_uom": "Nos", "is_stock_item": 1, "lead_time_days": 2}, + uoms=[{"uom": "Nos", "conversion_factor": 5}], + ) + + if not frappe.db.exists("Item Reorder", {"parent": item_doc.name}): + item_doc.append( + "reorder_levels", + { + "warehouse_reorder_level": 0, + "warehouse_reorder_qty": 10, + "warehouse": "_Test Warehouse - _TC", + "material_request_type": "Purchase", + }, + ) + + item_doc.save(ignore_permissions=True) + + frappe.db.set_single_value("Stock Settings", "auto_indent", 1) + + mr_list = reorder_item() + + frappe.db.set_single_value("Stock Settings", "auto_indent", 0) + mrs = frappe.get_all( + "Material Request Item", + fields=["schedule_date"], + filters={"item_code": item_doc.name, "uom": "Nos"}, + ) + + for mri in mrs: + self.assertEqual(getdate(mri.schedule_date), getdate(add_days(today(), 2))) + + for mr in mr_list: + mr.cancel() + mr.delete() + def test_use_serial_and_batch_fields(self): item = make_item( "Test Use Serial and Batch Item SN Item", @@ -1780,6 +1765,74 @@ class TestStockEntry(FrappeTestCase): frappe.db.set_value("Serial and Batch Bundle", sbb, "type_of_transaction", "Inward") self.assertRaises(frappe.ValidationError, se.submit) + def test_stock_entry_for_same_posting_date_and_time(self): + warehouse = "_Test Warehouse - _TC" + item_code = "Test Stock Entry For Same Posting Datetime 1" + make_item(item_code, {"is_stock_item": 1}) + posting_date = nowdate() + posting_time = nowtime() + + for index in range(25): + se = make_stock_entry( + item_code=item_code, + qty=1, + to_warehouse=warehouse, + posting_date=posting_date, + posting_time=posting_time, + do_not_submit=True, + purpose="Material Receipt", + basic_rate=100, + ) + + se.append( + "items", + { + "item_code": item_code, + "item_name": se.items[0].item_name, + "description": se.items[0].description, + "t_warehouse": se.items[0].t_warehouse, + "basic_rate": 100, + "qty": 1, + "stock_qty": 1, + "conversion_factor": 1, + "expense_account": se.items[0].expense_account, + "cost_center": se.items[0].cost_center, + "uom": se.items[0].uom, + "stock_uom": se.items[0].stock_uom, + }, + ) + + se.remarks = f"The current number is {cstr(index)}" + + se.submit() + + sles = frappe.get_all( + "Stock Ledger Entry", + fields=[ + "posting_date", + "posting_time", + "actual_qty", + "qty_after_transaction", + "incoming_rate", + "stock_value_difference", + "stock_value", + ], + filters={"item_code": item_code, "warehouse": warehouse}, + order_by="creation", + ) + + self.assertEqual(len(sles), 50) + i = 0 + for sle in sles: + i += 1 + self.assertEqual(getdate(sle.posting_date), getdate(posting_date)) + self.assertEqual(get_time(sle.posting_time), get_time(posting_time)) + self.assertEqual(sle.actual_qty, 1) + self.assertEqual(sle.qty_after_transaction, i) + self.assertEqual(sle.incoming_rate, 100) + self.assertEqual(sle.stock_value_difference, 100) + self.assertEqual(sle.stock_value, 100 * i) + def make_serialized_item(**args): args = frappe._dict(args) diff --git a/erpnext/stock/doctype/stock_entry_type/stock_entry_type.json b/erpnext/stock/doctype/stock_entry_type/stock_entry_type.json index db8e1fef69b..c522df59941 100644 --- a/erpnext/stock/doctype/stock_entry_type/stock_entry_type.json +++ b/erpnext/stock/doctype/stock_entry_type/stock_entry_type.json @@ -7,7 +7,8 @@ "engine": "InnoDB", "field_order": [ "purpose", - "add_to_transit" + "add_to_transit", + "is_standard" ], "fields": [ { @@ -16,7 +17,7 @@ "fieldtype": "Select", "in_list_view": 1, "label": "Purpose", - "options": "\nMaterial Issue\nMaterial Receipt\nMaterial Transfer\nMaterial Transfer for Manufacture\nMaterial Consumption for Manufacture\nManufacture\nRepack\nSend to Subcontractor", + "options": "\nMaterial Issue\nMaterial Receipt\nMaterial Transfer\nMaterial Transfer for Manufacture\nMaterial Consumption for Manufacture\nManufacture\nRepack\nSend to Subcontractor\nDisassemble", "reqd": 1, "set_only_once": 1 }, @@ -26,13 +27,21 @@ "fieldname": "add_to_transit", "fieldtype": "Check", "label": "Add to Transit" + }, + { + "default": "0", + "fieldname": "is_standard", + "fieldtype": "Check", + "label": "Is Standard", + "read_only": 1 } ], "links": [], - "modified": "2024-07-08 08:41:19.385020", + "modified": "2024-08-24 16:00:22.696958", "modified_by": "Administrator", "module": "Stock", "name": "Stock Entry Type", + "naming_rule": "Set by user", "owner": "Administrator", "permissions": [ { diff --git a/erpnext/stock/doctype/stock_entry_type/stock_entry_type.py b/erpnext/stock/doctype/stock_entry_type/stock_entry_type.py index 034223122f6..8d05a43408b 100644 --- a/erpnext/stock/doctype/stock_entry_type/stock_entry_type.py +++ b/erpnext/stock/doctype/stock_entry_type/stock_entry_type.py @@ -2,7 +2,7 @@ # For license information, please see license.txt -# import frappe +import frappe from frappe.model.document import Document @@ -16,6 +16,7 @@ class StockEntryType(Document): from frappe.types import DF add_to_transit: DF.Check + is_standard: DF.Check purpose: DF.Literal[ "", "Material Issue", @@ -26,9 +27,25 @@ class StockEntryType(Document): "Manufacture", "Repack", "Send to Subcontractor", + "Disassemble", ] # end: auto-generated types def validate(self): + self.validate_standard_type() if self.add_to_transit and self.purpose != "Material Transfer": self.add_to_transit = 0 + + def validate_standard_type(self): + if self.is_standard and self.name not in [ + "Material Issue", + "Material Receipt", + "Material Transfer", + "Material Transfer for Manufacture", + "Material Consumption for Manufacture", + "Manufacture", + "Repack", + "Send to Subcontractor", + "Disassemble", + ]: + frappe.throw(f"Stock Entry Type {self.name} cannot be set as standard") diff --git a/erpnext/stock/doctype/stock_entry_type/test_stock_entry_type.py b/erpnext/stock/doctype/stock_entry_type/test_stock_entry_type.py index 83ebe7e651b..61156545e34 100644 --- a/erpnext/stock/doctype/stock_entry_type/test_stock_entry_type.py +++ b/erpnext/stock/doctype/stock_entry_type/test_stock_entry_type.py @@ -3,6 +3,33 @@ import unittest +import frappe + class TestStockEntryType(unittest.TestCase): - pass + def test_stock_entry_type_non_standard(self): + stock_entry_type = "Test Manufacturing" + + doc = frappe.get_doc( + { + "doctype": "Stock Entry Type", + "__newname": stock_entry_type, + "purpose": "Manufacture", + "is_standard": 1, + } + ) + + self.assertRaises(frappe.ValidationError, doc.insert) + + def test_stock_entry_type_is_standard(self): + for stock_entry_type in [ + "Material Issue", + "Material Receipt", + "Material Transfer", + "Material Transfer for Manufacture", + "Material Consumption for Manufacture", + "Manufacture", + "Repack", + "Send to Subcontractor", + ]: + self.assertTrue(frappe.db.get_value("Stock Entry Type", stock_entry_type, "is_standard")) 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 58b6e4a74b6..d9af64c3983 100644 --- a/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.json +++ b/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.json @@ -352,7 +352,8 @@ { "fieldname": "posting_datetime", "fieldtype": "Datetime", - "label": "Posting Datetime" + "label": "Posting Datetime", + "search_index": 1 } ], "hide_toolbar": 1, @@ -361,7 +362,7 @@ "in_create": 1, "index_web_pages_for_search": 1, "links": [], - "modified": "2024-06-27 16:23:18.820049", + "modified": "2024-08-27 09:28:03.961443", "modified_by": "Administrator", "module": "Stock", "name": "Stock Ledger Entry", diff --git a/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py b/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py index 319303dbbb0..5aeabeeec56 100644 --- a/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py +++ b/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py @@ -8,6 +8,7 @@ import frappe from frappe import _, bold from frappe.core.doctype.role.role import get_users from frappe.model.document import Document +from frappe.query_builder.functions import Sum from frappe.utils import add_days, cint, flt, formatdate, get_datetime, getdate from erpnext.accounts.utils import get_fiscal_year @@ -25,6 +26,10 @@ class BackDatedStockTransaction(frappe.ValidationError): pass +class InventoryDimensionNegativeStockError(frappe.ValidationError): + pass + + exclude_from_linked_with = True @@ -104,61 +109,56 @@ class StockLedgerEntry(Document): self.posting_datetime = get_combine_datetime(self.posting_date, self.posting_time) def validate_inventory_dimension_negative_stock(self): - if self.is_cancelled: + if self.is_cancelled or self.actual_qty >= 0: return - extra_cond = "" - kwargs = {} - dimensions = self._get_inventory_dimensions() if not dimensions: return - for dimension, values in dimensions.items(): - kwargs[dimension] = values.get("value") - extra_cond += f" and {dimension} = %({dimension})s" - - kwargs.update( - { - "item_code": self.item_code, - "warehouse": self.warehouse, - "posting_date": self.posting_date, - "posting_time": self.posting_time, - "company": self.company, - "sle": self.name, - } - ) - - sle = get_previous_sle(kwargs, extra_cond=extra_cond) - qty_after_transaction = 0.0 flt_precision = cint(frappe.db.get_default("float_precision")) or 2 - if sle: - qty_after_transaction = sle.qty_after_transaction + for dimension, values in dimensions.items(): + dimension_value = values.get("value") + available_qty = self.get_available_qty_after_prev_transaction(dimension, dimension_value) - diff = qty_after_transaction + flt(self.actual_qty) - diff = flt(diff, flt_precision) - if diff < 0 and abs(diff) > 0.0001: - self.throw_validation_error(diff, dimensions) + diff = flt(available_qty + flt(self.actual_qty), flt_precision) # qty after current transaction + if diff < 0 and abs(diff) > 0.0001: + self.throw_validation_error(diff, dimension, dimension_value) - def throw_validation_error(self, diff, dimensions): - dimension_msg = _(", with the inventory {0}: {1}").format( - "dimensions" if len(dimensions) > 1 else "dimension", - ", ".join(f"{bold(d.doctype)} ({d.value})" for k, d in dimensions.items()), - ) + def get_available_qty_after_prev_transaction(self, dimension, dimension_value): + sle = frappe.qb.DocType("Stock Ledger Entry") + available_qty = ( + frappe.qb.from_(sle) + .select(Sum(sle.actual_qty)) + .where( + (sle.item_code == self.item_code) + & (sle.warehouse == self.warehouse) + & (sle.posting_datetime < self.posting_datetime) + & (sle.company == self.company) + & (sle.is_cancelled == 0) + & (sle[dimension] == dimension_value) + ) + ).run() + return available_qty[0][0] or 0 + + def throw_validation_error(self, diff, dimension, dimension_value): msg = _( - "{0} units of {1} are required in {2}{3}, on {4} {5} for {6} to complete the transaction." + "{0} units of {1} are required in {2} with the inventory dimension: {3} ({4}) on {5} {6} for {7} to complete the transaction." ).format( abs(diff), frappe.get_desk_link("Item", self.item_code), frappe.get_desk_link("Warehouse", self.warehouse), - dimension_msg, + frappe.bold(dimension), + frappe.bold(dimension_value), self.posting_date, self.posting_time, frappe.get_desk_link(self.voucher_type, self.voucher_no), ) - frappe.throw(msg, title=_("Inventory Dimension Negative Stock")) + frappe.throw( + msg, title=_("Inventory Dimension Negative Stock"), exc=InventoryDimensionNegativeStockError + ) def _get_inventory_dimensions(self): inv_dimensions = get_inventory_dimensions() diff --git a/erpnext/stock/doctype/stock_ledger_entry/test_stock_ledger_entry.py b/erpnext/stock/doctype/stock_ledger_entry/test_stock_ledger_entry.py index 069192fdb16..42e402e0005 100644 --- a/erpnext/stock/doctype/stock_ledger_entry/test_stock_ledger_entry.py +++ b/erpnext/stock/doctype/stock_ledger_entry/test_stock_ledger_entry.py @@ -1043,6 +1043,8 @@ class TestStockLedgerEntry(FrappeTestCase, StockTestMixin): self.assertEqual(50, _get_stock_credit(final_consumption)) def test_tie_breaking(self): + from erpnext.stock.doctype.repost_item_valuation.repost_item_valuation import repost_entries + frappe.flags.dont_execute_stock_reposts = True self.addCleanup(frappe.flags.pop, "dont_execute_stock_reposts") @@ -1085,6 +1087,7 @@ class TestStockLedgerEntry(FrappeTestCase, StockTestMixin): self.assertEqual([10, 11], ordered_qty_after_transaction()) first.cancel() + repost_entries() self.assertEqual([1], ordered_qty_after_transaction()) backdated = make_stock_entry( @@ -1184,7 +1187,7 @@ class TestStockLedgerEntry(FrappeTestCase, StockTestMixin): qty=5, posting_date="2021-01-01", rate=10, - posting_time="02:00:00.1234", + posting_time="02:00:00", ) time.sleep(3) @@ -1196,7 +1199,7 @@ class TestStockLedgerEntry(FrappeTestCase, StockTestMixin): qty=100, rate=10, posting_date="2021-01-01", - posting_time="02:00:00", + posting_time="02:00:00.1234", ) sle = frappe.get_all( diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py index 93e3e69729b..c13b3620517 100644 --- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py +++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py @@ -61,6 +61,7 @@ class StockReconciliation(StockController): self.head_row = ["Item Code", "Warehouse", "Quantity", "Valuation Rate"] def validate(self): + self.validate_items_exist() if not self.expense_account: self.expense_account = frappe.get_cached_value( "Company", self.company, "stock_adjustment_account" @@ -162,6 +163,27 @@ class StockReconciliation(StockController): def set_current_serial_and_batch_bundle(self, voucher_detail_no=None, save=False) -> None: """Set Serial and Batch Bundle for each item""" for item in self.items: + if not frappe.db.exists("Item", item.item_code): + frappe.throw(_("Item {0} does not exist").format(item.item_code)) + + item_details = frappe.get_cached_value( + "Item", item.item_code, ["has_serial_no", "has_batch_no"], as_dict=1 + ) + + if not (item_details.has_serial_no or item_details.has_batch_no): + continue + + if ( + not item.use_serial_batch_fields + and not item.reconcile_all_serial_batch + and not item.serial_and_batch_bundle + ): + frappe.throw( + _("Row # {0}: Please add Serial and Batch Bundle for Item {1}").format( + item.idx, frappe.bold(item.item_code) + ) + ) + if not item.reconcile_all_serial_batch and item.serial_and_batch_bundle: bundle = self.get_bundle_for_specific_serial_batch(item) item.current_serial_and_batch_bundle = bundle.name @@ -177,13 +199,6 @@ class StockReconciliation(StockController): if voucher_detail_no and voucher_detail_no != item.name: continue - item_details = frappe.get_cached_value( - "Item", item.item_code, ["has_serial_no", "has_batch_no"], as_dict=1 - ) - - if not (item_details.has_serial_no or item_details.has_batch_no): - continue - if not item.current_serial_and_batch_bundle: serial_and_batch_bundle = frappe.get_doc( { @@ -320,6 +335,7 @@ class StockReconciliation(StockController): row.item_code, posting_date=self.posting_date, posting_time=self.posting_time, + for_stock_levels=True, ) total_current_qty += current_qty @@ -357,6 +373,9 @@ class StockReconciliation(StockController): def set_new_serial_and_batch_bundle(self): for item in self.items: + if not item.item_code: + continue + if item.use_serial_batch_fields: continue @@ -392,6 +411,28 @@ class StockReconciliation(StockController): item.qty = bundle_doc.total_qty item.valuation_rate = bundle_doc.avg_rate + elif item.serial_and_batch_bundle and item.qty: + self.update_existing_serial_and_batch_bundle(item) + + def update_existing_serial_and_batch_bundle(self, item): + batch_details = frappe.get_all( + "Serial and Batch Entry", + fields=["batch_no", "qty", "name"], + filters={"parent": item.serial_and_batch_bundle, "batch_no": ("is", "set")}, + ) + + if batch_details and len(batch_details) == 1: + batch = batch_details[0] + if abs(batch.qty) == abs(item.qty): + return + + update_values = { + "qty": item.qty, + "stock_value_difference": flt(item.valuation_rate) * flt(item.qty), + } + + frappe.db.set_value("Serial and Batch Entry", batch.name, update_values) + def remove_items_with_no_change(self): """Remove items if qty or rate is not changed""" self.difference_amount = 0.0 @@ -684,7 +725,7 @@ class StockReconciliation(StockController): from erpnext.stock.stock_ledger import get_stock_value_difference difference_amount = get_stock_value_difference( - row.item_code, row.warehouse, self.posting_date, self.posting_time + row.item_code, row.warehouse, self.posting_date, self.posting_time, self.name ) if not difference_amount: @@ -1315,7 +1356,16 @@ def get_stock_balance_for( qty, rate = data if item_dict.get("has_batch_no"): - qty = get_batch_qty(batch_no, warehouse, posting_date=posting_date, posting_time=posting_time) or 0 + qty = ( + get_batch_qty( + batch_no, + warehouse, + posting_date=posting_date, + posting_time=posting_time, + for_stock_levels=True, + ) + or 0 + ) return { "qty": qty, diff --git a/erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.py b/erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.py index 9bb6ba9ec90..9754443d4ac 100644 --- a/erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.py +++ b/erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.py @@ -1275,6 +1275,60 @@ class TestStockReconciliation(FrappeTestCase, StockTestMixin): qty = get_batch_qty(batch_id, warehouse, batch_item_code) self.assertEqual(qty, 110) + def test_skip_reposting_for_entries_after_stock_reco(self): + from erpnext.stock.doctype.stock_entry.test_stock_entry import make_stock_entry + + item_code = create_item("Test Item For Skip Reposting After Stock Reco", is_stock_item=1).name + + warehouse = "_Test Warehouse - _TC" + + make_stock_entry( + posting_date="2024-11-01", + posting_time="11:00", + item_code=item_code, + target=warehouse, + qty=10, + basic_rate=100, + ) + + create_stock_reconciliation( + posting_date="2024-11-02", + posting_time="11:00", + item_code=item_code, + warehouse=warehouse, + qty=20, + rate=100, + ) + + se = make_stock_entry( + posting_date="2024-11-03", + posting_time="11:00", + item_code=item_code, + source=warehouse, + qty=15, + ) + + stock_value_difference = frappe.db.get_value( + "Stock Ledger Entry", {"voucher_no": se.name, "is_cancelled": 0}, "stock_value_difference" + ) + + self.assertEqual(stock_value_difference, 1500.00 * -1) + + make_stock_entry( + posting_date="2024-10-29", + posting_time="11:00", + item_code=item_code, + target=warehouse, + qty=10, + basic_rate=100, + ) + + stock_value_difference = frappe.db.get_value( + "Stock Ledger Entry", {"voucher_no": se.name, "is_cancelled": 0}, "stock_value_difference" + ) + + self.assertEqual(stock_value_difference, 1500.00 * -1) + def create_batch_item_with_batch(item_name, batch_id): batch_item_doc = create_item(item_name, is_stock_item=1) diff --git a/erpnext/stock/doctype/stock_reservation_entry/stock_reservation_entry.py b/erpnext/stock/doctype/stock_reservation_entry/stock_reservation_entry.py index 9808d2dfe72..8316488e253 100644 --- a/erpnext/stock/doctype/stock_reservation_entry/stock_reservation_entry.py +++ b/erpnext/stock/doctype/stock_reservation_entry/stock_reservation_entry.py @@ -255,7 +255,7 @@ class StockReservationEntry(Document): if self.has_batch_no else _("Warehouse"), frappe.bold(self.warehouse), - frappe.bold("Stock Reservation Entry"), + frappe.bold(_("Stock Reservation Entry")), ) frappe.throw(msg) @@ -497,7 +497,8 @@ def validate_stock_reservation_settings(voucher: object) -> None: if not frappe.db.get_single_value("Stock Settings", "enable_stock_reservation"): msg = _("Please enable {0} in the {1}.").format( - frappe.bold("Stock Reservation"), frappe.bold("Stock Settings") + frappe.bold(_("Stock Reservation")), + frappe.bold(_("Stock Settings")), ) frappe.throw(msg) diff --git a/erpnext/stock/doctype/stock_settings/stock_settings.json b/erpnext/stock/doctype/stock_settings/stock_settings.json index 069e7da41cb..e542a1582e3 100644 --- a/erpnext/stock/doctype/stock_settings/stock_settings.json +++ b/erpnext/stock/doctype/stock_settings/stock_settings.json @@ -49,12 +49,13 @@ "do_not_use_batchwise_valuation", "auto_create_serial_and_batch_bundle_for_outward", "pick_serial_and_batch_based_on", + "naming_series_prefix", "column_break_mhzc", "disable_serial_no_and_batch_selector", "use_naming_series", - "naming_series_prefix", "use_serial_batch_fields", "do_not_update_serial_batch_on_creation_of_auto_bundle", + "allow_existing_serial_no", "stock_planning_tab", "auto_material_request", "auto_indent", @@ -460,6 +461,12 @@ "fieldname": "over_picking_allowance", "fieldtype": "Percent", "label": "Over Picking Allowance" + }, + { + "default": "1", + "fieldname": "allow_existing_serial_no", + "fieldtype": "Check", + "label": "Allow existing Serial No to be Manufactured/Received again" } ], "icon": "icon-cog", @@ -467,7 +474,7 @@ "index_web_pages_for_search": 1, "issingle": 1, "links": [], - "modified": "2024-07-29 14:55:19.093508", + "modified": "2024-12-09 17:52:36.030456", "modified_by": "Administrator", "module": "Stock", "name": "Stock Settings", diff --git a/erpnext/stock/doctype/stock_settings/stock_settings.py b/erpnext/stock/doctype/stock_settings/stock_settings.py index c029b7bd1fb..b7a317cd66a 100644 --- a/erpnext/stock/doctype/stock_settings/stock_settings.py +++ b/erpnext/stock/doctype/stock_settings/stock_settings.py @@ -25,6 +25,7 @@ class StockSettings(Document): action_if_quality_inspection_is_not_submitted: DF.Literal["Stop", "Warn"] action_if_quality_inspection_is_rejected: DF.Literal["Stop", "Warn"] + allow_existing_serial_no: DF.Check allow_from_dn: DF.Check allow_from_pr: DF.Check allow_internal_transfer_at_arms_length_price: DF.Check @@ -175,7 +176,7 @@ class StockSettings(Document): if self.allow_negative_stock and self.enable_stock_reservation: frappe.throw( _("As {0} is enabled, you can not enable {1}.").format( - frappe.bold("Stock Reservation"), frappe.bold("Allow Negative Stock") + frappe.bold(_("Stock Reservation")), frappe.bold(_("Allow Negative Stock")) ) ) @@ -187,7 +188,7 @@ class StockSettings(Document): if self.allow_negative_stock: frappe.throw( _("As {0} is enabled, you can not enable {1}.").format( - frappe.bold("Allow Negative Stock"), frappe.bold("Stock Reservation") + frappe.bold(_("Allow Negative Stock")), frappe.bold(_("Stock Reservation")) ) ) @@ -207,7 +208,7 @@ class StockSettings(Document): if bin_with_negative_stock: frappe.throw( _("As there are negative stock, you can not enable {0}.").format( - frappe.bold("Stock Reservation") + frappe.bold(_("Stock Reservation")) ) ) @@ -221,7 +222,7 @@ class StockSettings(Document): if has_reserved_stock: frappe.throw( _("As there are reserved stock, you cannot disable {0}.").format( - frappe.bold("Stock Reservation") + frappe.bold(_("Stock Reservation")) ) ) diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py index 6485c5f6022..d5d492a2c93 100644 --- a/erpnext/stock/get_item_details.py +++ b/erpnext/stock/get_item_details.py @@ -10,7 +10,7 @@ from frappe.model import child_table_fields, default_fields from frappe.model.meta import get_field_precision from frappe.model.utils import get_fetch_values from frappe.query_builder.functions import IfNull, Sum -from frappe.utils import add_days, add_months, cint, cstr, flt, getdate +from frappe.utils import add_days, add_months, cint, cstr, flt, getdate, parse_json from erpnext import get_company_currency from erpnext.accounts.doctype.pricing_rule.pricing_rule import ( @@ -807,14 +807,10 @@ def get_price_list_rate(args, item_doc, out=None): if price_list_rate is None or frappe.db.get_single_value( "Stock Settings", "update_existing_price_list_rate" ): - if args.get("is_internal_supplier") or args.get("is_internal_customer"): - return out + insert_item_price(args) - if args.price_list and args.rate: - insert_item_price(args) - - if not price_list_rate: - return out + if price_list_rate is None: + return out out.price_list_rate = flt(price_list_rate) * flt(args.plc_conversion_rate) / flt(args.conversion_rate) @@ -835,6 +831,14 @@ def get_price_list_rate(args, item_doc, out=None): def insert_item_price(args): """Insert Item Price if Price List and Price List Rate are specified and currency is the same""" + if ( + not args.price_list + or not args.rate + or args.get("is_internal_supplier") + or args.get("is_internal_customer") + ): + return + if frappe.db.get_value("Price List", args.price_list, "currency", cache=True) == args.currency and cint( frappe.db.get_single_value("Stock Settings", "auto_insert_price_list_rate_if_missing") ): @@ -885,7 +889,7 @@ def insert_item_price(args): ) -def get_item_price(args, item_code, ignore_party=False): +def get_item_price(args, item_code, ignore_party=False, force_batch_no=False) -> list[dict]: """ Get name, price_list_rate from Item Price based on conditions Check if the desired qty is within the increment of the packing list. @@ -902,13 +906,17 @@ def get_item_price(args, item_code, ignore_party=False): (ip.item_code == item_code) & (ip.price_list == args.get("price_list")) & (IfNull(ip.uom, "").isin(["", args.get("uom")])) - & (IfNull(ip.batch_no, "").isin(["", args.get("batch_no")])) ) .orderby(ip.valid_from, order=frappe.qb.desc) .orderby(IfNull(ip.batch_no, ""), order=frappe.qb.desc) .orderby(ip.uom, order=frappe.qb.desc) ) + if force_batch_no: + query = query.where(ip.batch_no == args.get("batch_no")) + else: + query = query.where(IfNull(ip.batch_no, "").isin(["", args.get("batch_no")])) + if not ignore_party: if args.get("customer"): query = query.where(ip.customer == args.get("customer")) @@ -926,6 +934,22 @@ def get_item_price(args, item_code, ignore_party=False): return query.run() +@frappe.whitelist() +def get_batch_based_item_price(params, item_code) -> float: + if isinstance(params, str): + params = parse_json(params) + + item_price = get_item_price(params, item_code, force_batch_no=True) + + if not item_price: + item_price = get_item_price(params, item_code, ignore_party=True, force_batch_no=True) + + if item_price and item_price[0][2] == params.get("uom"): + return item_price[0][1] + + return 0.0 + + def get_price_list_rate_for(args, item_code): """ :param customer: link to Customer DocType diff --git a/erpnext/stock/number_card/total_warehouses/total_warehouses.json b/erpnext/stock/number_card/total_warehouses/total_warehouses.json index ab0836a3afe..8eadfac48d1 100644 --- a/erpnext/stock/number_card/total_warehouses/total_warehouses.json +++ b/erpnext/stock/number_card/total_warehouses/total_warehouses.json @@ -3,6 +3,7 @@ "docstatus": 0, "doctype": "Number Card", "document_type": "Warehouse", + "dynamic_filters_json": "[[\"Warehouse\",\"company\",\"=\",\"frappe.defaults.get_user_default(\\\"Company\\\")\"]]", "filters_json": "[[\"Warehouse\",\"disabled\",\"=\",0]]", "function": "Count", "idx": 0, diff --git a/erpnext/stock/reorder_item.py b/erpnext/stock/reorder_item.py index 7bc8b71917c..570dc3a3405 100644 --- a/erpnext/stock/reorder_item.py +++ b/erpnext/stock/reorder_item.py @@ -98,6 +98,7 @@ def _reorder_item(): "description": d.description, "stock_uom": d.stock_uom, "purchase_uom": d.purchase_uom, + "lead_time_days": d.lead_time_days, } ), ) @@ -129,6 +130,7 @@ def get_items_for_reorder() -> dict[str, list]: item_table.brand, item_table.variant_of, item_table.has_variants, + item_table.lead_time_days, ) .where( (item_table.disabled == 0) @@ -354,9 +356,14 @@ def get_email_list(company): def get_comapny_wise_users(company): + companies = [company] + + if parent_company := frappe.db.get_value("Company", company, "parent_company"): + companies.append(parent_company) + users = frappe.get_all( "User Permission", - filters={"allow": "Company", "for_value": company, "apply_to_all_doctypes": 1}, + filters={"allow": "Company", "for_value": ("in", companies), "apply_to_all_doctypes": 1}, fields=["user"], ) diff --git a/erpnext/stock/report/available_batch_report/available_batch_report.js b/erpnext/stock/report/available_batch_report/available_batch_report.js index 011f7e09ca2..a13e4ca82f7 100644 --- a/erpnext/stock/report/available_batch_report/available_batch_report.js +++ b/erpnext/stock/report/available_batch_report/available_batch_report.js @@ -17,7 +17,7 @@ frappe.query_reports["Available Batch Report"] = { fieldtype: "Date", width: "80", reqd: 1, - default: frappe.datetime.add_months(frappe.datetime.get_today(), -1), + default: frappe.datetime.get_today(), }, { fieldname: "item_code", diff --git a/erpnext/stock/report/batch_wise_balance_history/batch_wise_balance_history.py b/erpnext/stock/report/batch_wise_balance_history/batch_wise_balance_history.py index 822da13cc72..0bb9d40581a 100644 --- a/erpnext/stock/report/batch_wise_balance_history/batch_wise_balance_history.py +++ b/erpnext/stock/report/batch_wise_balance_history/batch_wise_balance_history.py @@ -168,7 +168,7 @@ def get_stock_ledger_entries_for_batch_bundle(filters): & (sle.has_batch_no == 1) & (sle.posting_date <= filters["to_date"]) ) - .groupby(batch_package.batch_no, batch_package.warehouse) + .groupby(sle.voucher_no, batch_package.batch_no, batch_package.warehouse) .orderby(sle.item_code, sle.warehouse) ) diff --git a/erpnext/stock/report/serial_and_batch_summary/serial_and_batch_summary.py b/erpnext/stock/report/serial_and_batch_summary/serial_and_batch_summary.py index 15d9a12bc65..486828af1cc 100644 --- a/erpnext/stock/report/serial_and_batch_summary/serial_and_batch_summary.py +++ b/erpnext/stock/report/serial_and_batch_summary/serial_and_batch_summary.py @@ -106,8 +106,6 @@ def get_columns(filters, data): { "label": _("Voucher Type"), "fieldname": "voucher_type", - "fieldtype": "Link", - "options": "DocType", "width": 120, }, { diff --git a/erpnext/stock/report/serial_no_service_contract_expiry/serial_no_service_contract_expiry.json b/erpnext/stock/report/serial_no_service_contract_expiry/serial_no_service_contract_expiry.json index 6d20719f8eb..75e2fac98fd 100644 --- a/erpnext/stock/report/serial_no_service_contract_expiry/serial_no_service_contract_expiry.json +++ b/erpnext/stock/report/serial_no_service_contract_expiry/serial_no_service_contract_expiry.json @@ -1,30 +1,33 @@ { - "add_total_row": 0, - "apply_user_permissions": 1, - "creation": "2013-01-14 10:52:58", - "disabled": 0, - "docstatus": 0, - "doctype": "Report", - "idx": 3, - "is_standard": "Yes", - "json": "{\"add_total_row\": 0, \"sort_by\": \"Serial No.modified\", \"sort_order\": \"desc\", \"sort_by_next\": null, \"filters\": [[\"Serial No\", \"delivery_document_type\", \"in\", [\"Delivery Note\", \"Sales Invoice\"]], [\"Serial No\", \"warehouse\", \"=\", \"\"]], \"sort_order_next\": \"desc\", \"columns\": [[\"name\", \"Serial No\"], [\"item_code\", \"Serial No\"], [\"amc_expiry_date\", \"Serial No\"], [\"maintenance_status\", \"Serial No\"], [\"delivery_document_no\", \"Serial No\"], [\"customer\", \"Serial No\"], [\"customer_name\", \"Serial No\"], [\"item_name\", \"Serial No\"], [\"description\", \"Serial No\"], [\"item_group\", \"Serial No\"], [\"brand\", \"Serial No\"]]}", - "modified": "2017-02-24 20:02:00.706889", - "modified_by": "Administrator", - "module": "Stock", - "name": "Serial No Service Contract Expiry", - "owner": "Administrator", - "ref_doctype": "Serial No", - "report_name": "Serial No Service Contract Expiry", - "report_type": "Report Builder", + "add_total_row": 0, + "columns": [], + "creation": "2013-01-14 10:52:58", + "disabled": 0, + "docstatus": 0, + "doctype": "Report", + "filters": [], + "idx": 3, + "is_standard": "Yes", + "json": "{\"add_total_row\": 0, \"sort_by\": \"Serial No.modified\", \"sort_order\": \"desc\", \"sort_by_next\": null, \"filters\": [[\"Serial No\", \"warehouse\", \"=\", \"\"]], \"sort_order_next\": \"desc\", \"columns\": [[\"name\", \"Serial No\"], [\"item_code\", \"Serial No\"], [\"amc_expiry_date\", \"Serial No\"], [\"maintenance_status\", \"Serial No\"],[\"item_name\", \"Serial No\"], [\"description\", \"Serial No\"], [\"item_group\", \"Serial No\"], [\"brand\", \"Serial No\"]]}", + "letterhead": null, + "modified": "2024-09-26 13:07:23.451182", + "modified_by": "Administrator", + "module": "Stock", + "name": "Serial No Service Contract Expiry", + "owner": "Administrator", + "prepared_report": 0, + "ref_doctype": "Serial No", + "report_name": "Serial No Service Contract Expiry", + "report_type": "Report Builder", "roles": [ { "role": "Item Manager" - }, + }, { "role": "Stock Manager" - }, + }, { "role": "Stock User" } ] -} \ No newline at end of file +} diff --git a/erpnext/stock/report/serial_no_status/serial_no_status.json b/erpnext/stock/report/serial_no_status/serial_no_status.json index 8f03567c852..d74c2087f72 100644 --- a/erpnext/stock/report/serial_no_status/serial_no_status.json +++ b/erpnext/stock/report/serial_no_status/serial_no_status.json @@ -1,30 +1,33 @@ { - "add_total_row": 0, - "apply_user_permissions": 1, - "creation": "2013-01-14 10:52:58", - "disabled": 0, - "docstatus": 0, - "doctype": "Report", - "idx": 4, - "is_standard": "Yes", - "json": "{\"add_total_row\": 0, \"sort_by\": \"Serial No.name\", \"sort_order\": \"desc\", \"sort_by_next\": null, \"filters\": [], \"sort_order_next\": \"desc\", \"columns\": [[\"name\", \"Serial No\"], [\"item_code\", \"Serial No\"], [\"warehouse\", \"Serial No\"], [\"item_name\", \"Serial No\"], [\"description\", \"Serial No\"], [\"item_group\", \"Serial No\"], [\"brand\", \"Serial No\"], [\"purchase_document_type\", \"Serial No\"], [\"purchase_document_no\", \"Serial No\"], [\"purchase_date\", \"Serial No\"], [\"customer\", \"Serial No\"], [\"customer_name\", \"Serial No\"], [\"purchase_rate\", \"Serial No\"], [\"delivery_document_type\", \"Serial No\"], [\"delivery_document_no\", \"Serial No\"], [\"delivery_date\", \"Serial No\"], [\"supplier\", \"Serial No\"], [\"supplier_name\", \"Serial No\"]]}", - "modified": "2017-02-24 19:54:21.392265", - "modified_by": "Administrator", - "module": "Stock", - "name": "Serial No Status", - "owner": "Administrator", - "ref_doctype": "Serial No", - "report_name": "Serial No Status", - "report_type": "Report Builder", + "add_total_row": 0, + "columns": [], + "creation": "2013-01-14 10:52:58", + "disabled": 0, + "docstatus": 0, + "doctype": "Report", + "filters": [], + "idx": 4, + "is_standard": "Yes", + "json": "{\"add_total_row\": 0, \"sort_by\": \"Serial No.name\", \"sort_order\": \"desc\", \"sort_by_next\": null, \"filters\": [], \"sort_order_next\": \"desc\", \"columns\": [[\"name\", \"Serial No\"], [\"item_code\", \"Serial No\"], [\"warehouse\", \"Serial No\"], [\"item_name\", \"Serial No\"], [\"description\", \"Serial No\"], [\"item_group\", \"Serial No\"], [\"brand\", \"Serial No\"],[\"purchase_document_no\", \"Serial No\"]]}", + "letterhead": null, + "modified": "2024-09-26 13:10:52.693648", + "modified_by": "Administrator", + "module": "Stock", + "name": "Serial No Status", + "owner": "Administrator", + "prepared_report": 0, + "ref_doctype": "Serial No", + "report_name": "Serial No Status", + "report_type": "Report Builder", "roles": [ { "role": "Item Manager" - }, + }, { "role": "Stock Manager" - }, + }, { "role": "Stock User" } ] -} \ No newline at end of file +} diff --git a/erpnext/stock/report/serial_no_warranty_expiry/serial_no_warranty_expiry.json b/erpnext/stock/report/serial_no_warranty_expiry/serial_no_warranty_expiry.json index ef345f45216..75e2fac98fd 100644 --- a/erpnext/stock/report/serial_no_warranty_expiry/serial_no_warranty_expiry.json +++ b/erpnext/stock/report/serial_no_warranty_expiry/serial_no_warranty_expiry.json @@ -1,30 +1,33 @@ { - "add_total_row": 0, - "apply_user_permissions": 1, - "creation": "2013-01-14 10:52:58", - "disabled": 0, - "docstatus": 0, - "doctype": "Report", - "idx": 3, - "is_standard": "Yes", - "json": "{\"add_total_row\": 0, \"sort_by\": \"Serial No.modified\", \"sort_order\": \"desc\", \"sort_by_next\": null, \"filters\": [[\"Serial No\", \"delivery_document_type\", \"in\", [\"Delivery Note\", \"Sales Invoice\"]], [\"Serial No\", \"warehouse\", \"=\", \"\"]], \"sort_order_next\": \"desc\", \"columns\": [[\"name\", \"Serial No\"], [\"item_code\", \"Serial No\"], [\"warranty_expiry_date\", \"Serial No\"], [\"warranty_period\", \"Serial No\"], [\"maintenance_status\", \"Serial No\"], [\"purchase_document_no\", \"Serial No\"], [\"purchase_date\", \"Serial No\"], [\"supplier\", \"Serial No\"], [\"supplier_name\", \"Serial No\"], [\"delivery_document_no\", \"Serial No\"], [\"delivery_date\", \"Serial No\"], [\"customer\", \"Serial No\"], [\"customer_name\", \"Serial No\"], [\"item_name\", \"Serial No\"], [\"description\", \"Serial No\"], [\"item_group\", \"Serial No\"], [\"brand\", \"Serial No\"]]}", - "modified": "2017-02-24 20:01:53.097456", - "modified_by": "Administrator", - "module": "Stock", - "name": "Serial No Warranty Expiry", - "owner": "Administrator", - "ref_doctype": "Serial No", - "report_name": "Serial No Warranty Expiry", - "report_type": "Report Builder", + "add_total_row": 0, + "columns": [], + "creation": "2013-01-14 10:52:58", + "disabled": 0, + "docstatus": 0, + "doctype": "Report", + "filters": [], + "idx": 3, + "is_standard": "Yes", + "json": "{\"add_total_row\": 0, \"sort_by\": \"Serial No.modified\", \"sort_order\": \"desc\", \"sort_by_next\": null, \"filters\": [[\"Serial No\", \"warehouse\", \"=\", \"\"]], \"sort_order_next\": \"desc\", \"columns\": [[\"name\", \"Serial No\"], [\"item_code\", \"Serial No\"], [\"amc_expiry_date\", \"Serial No\"], [\"maintenance_status\", \"Serial No\"],[\"item_name\", \"Serial No\"], [\"description\", \"Serial No\"], [\"item_group\", \"Serial No\"], [\"brand\", \"Serial No\"]]}", + "letterhead": null, + "modified": "2024-09-26 13:07:23.451182", + "modified_by": "Administrator", + "module": "Stock", + "name": "Serial No Service Contract Expiry", + "owner": "Administrator", + "prepared_report": 0, + "ref_doctype": "Serial No", + "report_name": "Serial No Service Contract Expiry", + "report_type": "Report Builder", "roles": [ { "role": "Item Manager" - }, + }, { "role": "Stock Manager" - }, + }, { "role": "Stock User" } ] -} \ No newline at end of file +} diff --git a/erpnext/stock/report/stock_ageing/stock_ageing.js b/erpnext/stock/report/stock_ageing/stock_ageing.js index 578869b6e93..a3ebf14571d 100644 --- a/erpnext/stock/report/stock_ageing/stock_ageing.js +++ b/erpnext/stock/report/stock_ageing/stock_ageing.js @@ -54,25 +54,10 @@ frappe.query_reports["Stock Ageing"] = { options: "Brand", }, { - fieldname: "range1", - label: __("Ageing Range 1"), - fieldtype: "Int", - default: "30", - reqd: 1, - }, - { - fieldname: "range2", - label: __("Ageing Range 2"), - fieldtype: "Int", - default: "60", - reqd: 1, - }, - { - fieldname: "range3", - label: __("Ageing Range 3"), - fieldtype: "Int", - default: "90", - reqd: 1, + fieldname: "range", + label: __("Ageing Range"), + fieldtype: "Data", + default: "30, 60, 90", }, { fieldname: "show_warehouse_wise_stock", diff --git a/erpnext/stock/report/stock_ageing/stock_ageing.py b/erpnext/stock/report/stock_ageing/stock_ageing.py index 09af3f224a3..c7e0af6cd38 100644 --- a/erpnext/stock/report/stock_ageing/stock_ageing.py +++ b/erpnext/stock/report/stock_ageing/stock_ageing.py @@ -16,6 +16,7 @@ Filters = frappe._dict def execute(filters: Filters = None) -> tuple: to_date = filters["to_date"] + filters.ranges = [num.strip() for num in filters.range.split(",") if num.strip().isdigit()] columns = get_columns(filters) item_details = FIFOSlots(filters).generate() @@ -48,7 +49,7 @@ def format_report_data(filters: Filters, item_details: dict, to_date: str) -> li average_age = get_average_age(fifo_queue, to_date) earliest_age = date_diff(to_date, fifo_queue[0][1]) latest_age = date_diff(to_date, fifo_queue[-1][1]) - range1, range2, range3, above_range3 = get_range_age(filters, fifo_queue, to_date, item_dict) + range_values = get_range_age(filters, fifo_queue, to_date, item_dict) row = [details.name, details.item_name, details.description, details.item_group, details.brand] @@ -59,10 +60,7 @@ def format_report_data(filters: Filters, item_details: dict, to_date: str) -> li [ flt(item_dict.get("total_qty"), precision), average_age, - range1, - range2, - range3, - above_range3, + *range_values, earliest_age, latest_age, details.stock_uom, @@ -89,25 +87,22 @@ def get_average_age(fifo_queue: list, to_date: str) -> float: return flt(age_qty / total_qty, 2) if total_qty else 0.0 -def get_range_age(filters: Filters, fifo_queue: list, to_date: str, item_dict: dict) -> tuple: +def get_range_age(filters: Filters, fifo_queue: list, to_date: str, item_dict: dict) -> list: precision = cint(frappe.db.get_single_value("System Settings", "float_precision", cache=True)) - - range1 = range2 = range3 = above_range3 = 0.0 + range_values = [0.0] * (len(filters.ranges) + 1) for item in fifo_queue: age = flt(date_diff(to_date, item[1])) qty = flt(item[0]) if not item_dict["has_serial_no"] else 1.0 - if age <= flt(filters.range1): - range1 = flt(range1 + qty, precision) - elif age <= flt(filters.range2): - range2 = flt(range2 + qty, precision) - elif age <= flt(filters.range3): - range3 = flt(range3 + qty, precision) + for i, age_limit in enumerate(filters.ranges): + if age <= flt(age_limit): + range_values[i] = flt(range_values[i] + qty, precision) + break else: - above_range3 = flt(above_range3 + qty, precision) + range_values[-1] = flt(range_values[-1] + qty, precision) - return range1, range2, range3, above_range3 + return range_values def get_columns(filters: Filters) -> list[dict]: @@ -193,12 +188,14 @@ def get_chart_data(data: list, filters: Filters) -> dict: def setup_ageing_columns(filters: Filters, range_columns: list): - ranges = [ - f"0 - {filters['range1']}", - f"{cint(filters['range1']) + 1} - {cint(filters['range2'])}", - f"{cint(filters['range2']) + 1} - {cint(filters['range3'])}", - _("{0} - Above").format(cint(filters["range3"]) + 1), - ] + prev_range_value = 0 + ranges = [] + for range in filters.ranges: + ranges.append(f"{prev_range_value} - {range}") + prev_range_value = cint(range) + 1 + + ranges.append(f"{prev_range_value} - Above") + for i, label in enumerate(ranges): fieldname = "range" + str(i + 1) add_column(range_columns, label=_("Age ({0})").format(label), fieldname=fieldname) diff --git a/erpnext/stock/report/stock_ageing/test_stock_ageing.py b/erpnext/stock/report/stock_ageing/test_stock_ageing.py index fb363606233..c0c007e5015 100644 --- a/erpnext/stock/report/stock_ageing/test_stock_ageing.py +++ b/erpnext/stock/report/stock_ageing/test_stock_ageing.py @@ -9,9 +9,7 @@ from erpnext.stock.report.stock_ageing.stock_ageing import FIFOSlots, format_rep class TestStockAgeing(FrappeTestCase): def setUp(self) -> None: - self.filters = frappe._dict( - company="_Test Company", to_date="2021-12-10", range1=30, range2=60, range3=90 - ) + self.filters = frappe._dict(company="_Test Company", to_date="2021-12-10", ranges=["30", "60", "90"]) def test_normal_inward_outward_queue(self): "Reference: Case 1 in stock_ageing_fifo_logic.md (same wh)" diff --git a/erpnext/stock/report/stock_balance/stock_balance.js b/erpnext/stock/report/stock_balance/stock_balance.js index d80261895aa..1d86634fd95 100644 --- a/erpnext/stock/report/stock_balance/stock_balance.js +++ b/erpnext/stock/report/stock_balance/stock_balance.js @@ -107,6 +107,12 @@ frappe.query_reports["Stock Balance"] = { fieldtype: "Check", default: 0, }, + { + fieldname: "show_dimension_wise_stock", + label: __("Show Dimension Wise Stock"), + fieldtype: "Check", + default: 0, + }, ], formatter: function (value, row, column, data, default_formatter) { diff --git a/erpnext/stock/report/stock_balance/stock_balance.py b/erpnext/stock/report/stock_balance/stock_balance.py index 2694ba03c8b..8ea07338cf1 100644 --- a/erpnext/stock/report/stock_balance/stock_balance.py +++ b/erpnext/stock/report/stock_balance/stock_balance.py @@ -252,7 +252,10 @@ class StockBalanceReport: group_by_key = [row.company, row.item_code, row.warehouse] for fieldname in self.inventory_dimensions: - if self.filters.get(fieldname): + if not row.get(fieldname): + continue + + if self.filters.get(fieldname) or self.filters.get("show_dimension_wise_stock"): group_by_key.append(row.get(fieldname)) return tuple(group_by_key) diff --git a/erpnext/stock/report/stock_ledger_invariant_check/stock_ledger_invariant_check.js b/erpnext/stock/report/stock_ledger_invariant_check/stock_ledger_invariant_check.js index 1b05d3a65e4..df65654e36b 100644 --- a/erpnext/stock/report/stock_ledger_invariant_check/stock_ledger_invariant_check.js +++ b/erpnext/stock/report/stock_ledger_invariant_check/stock_ledger_invariant_check.js @@ -32,6 +32,12 @@ frappe.query_reports["Stock Ledger Invariant Check"] = { mandatory: 1, options: "Warehouse", }, + { + fieldname: "show_incorrect_entries", + fieldtype: "Check", + label: "Show Incorrect Entries", + default: 0, + }, ], formatter(value, row, column, data, default_formatter) { diff --git a/erpnext/stock/report/stock_ledger_invariant_check/stock_ledger_invariant_check.py b/erpnext/stock/report/stock_ledger_invariant_check/stock_ledger_invariant_check.py index fb392f7e36a..5cf653e3851 100644 --- a/erpnext/stock/report/stock_ledger_invariant_check/stock_ledger_invariant_check.py +++ b/erpnext/stock/report/stock_ledger_invariant_check/stock_ledger_invariant_check.py @@ -5,7 +5,7 @@ import json import frappe from frappe import _ -from frappe.utils import get_link_to_form, parse_json +from frappe.utils import cint, flt, get_link_to_form, parse_json SLE_FIELDS = ( "name", @@ -36,7 +36,7 @@ def execute(filters=None): def get_data(filters): sles = get_stock_ledger_entries(filters) - return add_invariant_check_fields(sles) + return add_invariant_check_fields(sles, filters) def get_stock_ledger_entries(filters): @@ -48,11 +48,14 @@ def get_stock_ledger_entries(filters): ) -def add_invariant_check_fields(sles): +def add_invariant_check_fields(sles, filters): balance_qty = 0.0 balance_stock_value = 0.0 + + incorrect_idx = 0 + precision = frappe.get_precision("Stock Ledger Entry", "actual_qty") for idx, sle in enumerate(sles): - queue = json.loads(sle.stock_queue) + queue = json.loads(sle.stock_queue) if sle.stock_queue else [] fifo_qty = 0.0 fifo_value = 0.0 @@ -95,6 +98,12 @@ def add_invariant_check_fields(sles): ) sle.diff_value_diff = sle.stock_value_from_diff - sle.stock_value + if not incorrect_idx and filters.get("show_incorrect_entries"): + if is_sle_has_correct_data(sle, precision): + continue + else: + incorrect_idx = idx + if idx > 0: sle.fifo_stock_diff = sle.fifo_stock_value - sles[idx - 1].fifo_stock_value sle.fifo_difference_diff = sle.fifo_stock_diff - sle.stock_value_difference @@ -104,9 +113,23 @@ def add_invariant_check_fields(sles): "Batch", sle.batch_no, "use_batchwise_valuation", cache=True ) + if filters.get("show_incorrect_entries"): + if incorrect_idx > 0: + sles = sles[cint(incorrect_idx) - 1 :] + + return [] + return sles +def is_sle_has_correct_data(sle, precision): + if flt(sle.difference_in_qty, precision) != 0.0 or flt(sle.diff_value_diff, precision) != 0: + print(flt(sle.difference_in_qty, precision), flt(sle.diff_value_diff, precision)) + return False + + return True + + def get_columns(): return [ { diff --git a/erpnext/stock/report/stock_ledger_variance/stock_ledger_variance.js b/erpnext/stock/report/stock_ledger_variance/stock_ledger_variance.js index 07e7b59b514..5dfb6627662 100644 --- a/erpnext/stock/report/stock_ledger_variance/stock_ledger_variance.js +++ b/erpnext/stock/report/stock_ledger_variance/stock_ledger_variance.js @@ -47,7 +47,23 @@ frappe.query_reports["Stock Ledger Variance"] = { fieldname: "difference_in", fieldtype: "Select", label: __("Difference In"), - options: ["", "Qty", "Value", "Valuation"], + options: [ + { + // Check "Stock Ledger Invariant Check" report with A - B column + label: __("Quantity (A - B)"), + value: "Qty", + }, + { + // Check "Stock Ledger Invariant Check" report with G - D column + label: __("Value (G - D)"), + value: "Value", + }, + { + // Check "Stock Ledger Invariant Check" report with I - K column + label: __("Valuation (I - K)"), + value: "Valuation", + }, + ], }, { fieldname: "include_disabled", diff --git a/erpnext/stock/report/stock_ledger_variance/stock_ledger_variance.py b/erpnext/stock/report/stock_ledger_variance/stock_ledger_variance.py index 0b7e551c86f..808afadd05a 100644 --- a/erpnext/stock/report/stock_ledger_variance/stock_ledger_variance.py +++ b/erpnext/stock/report/stock_ledger_variance/stock_ledger_variance.py @@ -1,6 +1,8 @@ # Copyright (c) 2023, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt +import json + import frappe from frappe import _ from frappe.utils import cint, flt @@ -270,12 +272,16 @@ def has_difference(row, precision, difference_in, valuation_method): value_diff = flt(row.diff_value_diff, precision) valuation_diff = flt(row.valuation_diff, precision) else: - qty_diff = flt(row.difference_in_qty, precision) or flt(row.fifo_qty_diff, precision) - value_diff = ( - flt(row.diff_value_diff, precision) - or flt(row.fifo_value_diff, precision) - or flt(row.fifo_difference_diff, precision) - ) + qty_diff = flt(row.difference_in_qty, precision) + value_diff = flt(row.diff_value_diff, precision) + + if row.stock_queue and json.loads(row.stock_queue): + value_diff = value_diff or ( + flt(row.fifo_value_diff, precision) or flt(row.fifo_difference_diff, precision) + ) + + qty_diff = qty_diff or flt(row.fifo_qty_diff, precision) + valuation_diff = flt(row.valuation_diff, precision) or flt(row.fifo_valuation_diff, precision) if difference_in == "Qty" and qty_diff: diff --git a/erpnext/stock/report/stock_projected_qty/stock_projected_qty.py b/erpnext/stock/report/stock_projected_qty/stock_projected_qty.py index 743656c6472..9b4520064d6 100644 --- a/erpnext/stock/report/stock_projected_qty/stock_projected_qty.py +++ b/erpnext/stock/report/stock_projected_qty/stock_projected_qty.py @@ -297,6 +297,7 @@ def get_item_map(item_code, include_uom): if include_uom: ucd = frappe.qb.DocType("UOM Conversion Detail") + query = query.select(ucd.conversion_factor) query = query.left_join(ucd).on((ucd.parent == item.name) & (ucd.uom == include_uom)) items = query.run(as_dict=True) diff --git a/erpnext/stock/report/test_reports.py b/erpnext/stock/report/test_reports.py index 74c6afa204b..ad2b46b393f 100644 --- a/erpnext/stock/report/test_reports.py +++ b/erpnext/stock/report/test_reports.py @@ -1,6 +1,7 @@ import unittest import frappe +from frappe.utils.make_random import get_random from erpnext.tests.utils import ReportFilters, ReportName, execute_script_report @@ -11,7 +12,7 @@ DEFAULT_FILTERS = { } -batch = frappe.db.get_value("Batch", fieldname=["name"], as_dict=True, order_by="creation desc") +batch = get_random("Batch") REPORT_FILTER_TEST_CASES: list[tuple[ReportName, ReportFilters]] = [ ("Stock Ledger", {"_optional": True}), @@ -62,7 +63,7 @@ REPORT_FILTER_TEST_CASES: list[tuple[ReportName, ReportFilters]] = [ ("Item Prices", {"items": "Enabled Items only"}), ("Delayed Item Report", {"based_on": "Sales Invoice"}), ("Delayed Item Report", {"based_on": "Delivery Note"}), - ("Stock Ageing", {"range1": 30, "range2": 60, "range3": 90, "_optional": True}), + ("Stock Ageing", {"range": "30, 60, 90", "_optional": True}), ("Stock Ledger Invariant Check", {"warehouse": "_Test Warehouse - _TC", "item": "_Test Item"}), ("FIFO Queue vs Qty After Transaction Comparison", {"warehouse": "_Test Warehouse - _TC"}), ("FIFO Queue vs Qty After Transaction Comparison", {"item_group": "All Item Groups"}), diff --git a/erpnext/stock/report/warehouse_wise_item_balance_age_and_value/warehouse_wise_item_balance_age_and_value.js b/erpnext/stock/report/warehouse_wise_item_balance_age_and_value/warehouse_wise_item_balance_age_and_value.js index 137c786e44b..ac1ecfff530 100644 --- a/erpnext/stock/report/warehouse_wise_item_balance_age_and_value/warehouse_wise_item_balance_age_and_value.js +++ b/erpnext/stock/report/warehouse_wise_item_balance_age_and_value/warehouse_wise_item_balance_age_and_value.js @@ -3,6 +3,15 @@ frappe.query_reports["Warehouse wise Item Balance Age and Value"] = { filters: [ + { + fieldname: "company", + label: __("Company"), + fieldtype: "Link", + width: "80", + options: "Company", + reqd: 1, + default: frappe.defaults.get_user_default("Company"), + }, { fieldname: "from_date", label: __("From Date"), @@ -39,6 +48,12 @@ frappe.query_reports["Warehouse wise Item Balance Age and Value"] = { fieldtype: "Link", width: "80", options: "Warehouse", + get_query: function () { + const company = frappe.query_report.get_filter_value("company"); + return { + filters: { company: company }, + }; + }, }, { fieldname: "filter_total_zero_qty", diff --git a/erpnext/stock/report/warehouse_wise_item_balance_age_and_value/warehouse_wise_item_balance_age_and_value.py b/erpnext/stock/report/warehouse_wise_item_balance_age_and_value/warehouse_wise_item_balance_age_and_value.py index 0df8b6ddb48..68caff40356 100644 --- a/erpnext/stock/report/warehouse_wise_item_balance_age_and_value/warehouse_wise_item_balance_age_and_value.py +++ b/erpnext/stock/report/warehouse_wise_item_balance_age_and_value/warehouse_wise_item_balance_age_and_value.py @@ -109,8 +109,6 @@ def validate_filters(filters): sle_count = flt(frappe.qb.from_("Stock Ledger Entry").select(Count("name")).run()[0][0]) if sle_count > 500000: frappe.throw(_("Please set filter based on Item or Warehouse")) - if not filters.get("company"): - filters["company"] = frappe.defaults.get_user_default("Company") def get_warehouse_list(filters): diff --git a/erpnext/stock/serial_batch_bundle.py b/erpnext/stock/serial_batch_bundle.py index 71e664dd066..05b3536c57b 100644 --- a/erpnext/stock/serial_batch_bundle.py +++ b/erpnext/stock/serial_batch_bundle.py @@ -124,7 +124,7 @@ class SerialBatchBundle: "Outward": self.sle.actual_qty < 0, }.get(sn_doc.type_of_transaction) - if not condition: + if not condition and self.sle.actual_qty: correct_type = "Inward" if sn_doc.type_of_transaction == "Inward": correct_type = "Outward" @@ -133,7 +133,7 @@ class SerialBatchBundle: frappe.throw(_(msg), title=_("Incorrect Type of Transaction")) precision = sn_doc.precision("total_qty") - if flt(sn_doc.total_qty, precision) != flt(self.sle.actual_qty, precision): + if self.sle.actual_qty and flt(sn_doc.total_qty, precision) != flt(self.sle.actual_qty, precision): msg = f"Total qty {flt(sn_doc.total_qty, precision)} of Serial and Batch Bundle {link} is not equal to Actual Qty {flt(self.sle.actual_qty, precision)} in the {self.sle.voucher_type} {self.sle.voucher_no}" frappe.throw(_(msg)) @@ -183,7 +183,7 @@ class SerialBatchBundle: } if self.sle.actual_qty < 0 and self.is_material_transfer(): - values_to_update["valuation_rate"] = sn_doc.avg_rate + values_to_update["valuation_rate"] = flt(sn_doc.avg_rate) if not frappe.db.get_single_value( "Stock Settings", "do_not_update_serial_batch_on_creation_of_auto_bundle" @@ -288,7 +288,7 @@ class SerialBatchBundle: "Serial and Batch Bundle", self.sle.serial_and_batch_bundle, "docstatus" ) - if docstatus != 1: + if docstatus == 0: self.submit_serial_and_batch_bundle() if self.item_details.has_serial_no == 1: @@ -311,7 +311,9 @@ class SerialBatchBundle: if self.is_pos_transaction(): return - frappe.get_cached_doc("Serial and Batch Bundle", self.sle.serial_and_batch_bundle).cancel() + doc = frappe.get_cached_doc("Serial and Batch Bundle", self.sle.serial_and_batch_bundle) + if doc.docstatus == 1: + doc.cancel() def is_pos_transaction(self): if ( @@ -476,7 +478,7 @@ def get_serial_or_batch_nos(bundle): html = "" for d in data: if d.serial_no: - html += f"" + html += f"" else: html += f"" @@ -506,7 +508,7 @@ class SerialNoValuation(DeprecatedSerialNoValuation): serial_nos = self.get_serial_nos() for serial_no in serial_nos: incoming_rate = self.get_incoming_rate_from_bundle(serial_no) - if not incoming_rate: + if incoming_rate is None: continue self.stock_value_change += incoming_rate @@ -551,7 +553,7 @@ class SerialNoValuation(DeprecatedSerialNoValuation): query = query.where(timestamp_condition) incoming_rate = query.run() - return flt(incoming_rate[0][0]) if incoming_rate else 0.0 + return flt(incoming_rate[0][0]) if incoming_rate else None def get_serial_nos(self): if self.sle.get("serial_nos"): @@ -984,7 +986,7 @@ class SerialBatchCreation: required_qty = flt(abs(self.actual_qty), precision) if required_qty - total_qty > 0: - msg = f"For the item {bold(doc.item_code)}, the Avaliable qty {bold(total_qty)} is less than the Required Qty {bold(required_qty)} in the warehouse {bold(doc.warehouse)}. Please add sufficient qty in the warehouse." + msg = f"For the item {bold(doc.item_code)}, the Available qty {bold(total_qty)} is less than the Required Qty {bold(required_qty)} in the warehouse {bold(doc.warehouse)}. Please add sufficient qty in the warehouse." frappe.throw(msg, title=_("Insufficient Stock")) def set_auto_serial_batch_entries_for_outward(self): @@ -1088,6 +1090,8 @@ class SerialBatchCreation: frappe.db.bulk_insert("Serial No", fields=fields, values=set(serial_nos_details)) def set_serial_batch_entries(self, doc): + incoming_rate = self.get("incoming_rate") + if self.get("serial_nos"): serial_no_wise_batch = frappe._dict({}) if self.has_batch_no: @@ -1095,30 +1099,54 @@ class SerialBatchCreation: qty = -1 if self.type_of_transaction == "Outward" else 1 for serial_no in self.serial_nos: + if self.get("serial_nos_valuation"): + incoming_rate = self.get("serial_nos_valuation").get(serial_no) + doc.append( "entries", { "serial_no": serial_no, "qty": qty, "batch_no": serial_no_wise_batch.get(serial_no) or self.get("batch_no"), - "incoming_rate": self.get("incoming_rate"), + "incoming_rate": incoming_rate, }, ) elif self.get("batches"): for batch_no, batch_qty in self.batches.items(): + if self.get("batches_valuation"): + incoming_rate = self.get("batches_valuation").get(batch_no) + doc.append( "entries", { "batch_no": batch_no, "qty": batch_qty * (-1 if self.type_of_transaction == "Outward" else 1), - "incoming_rate": self.get("incoming_rate"), + "incoming_rate": incoming_rate, }, ) def create_batch(self): from erpnext.stock.doctype.batch.batch import make_batch + if self.is_rejected: + bundle = frappe.db.get_value( + "Serial and Batch Bundle", + { + "voucher_no": self.voucher_no, + "voucher_type": self.voucher_type, + "voucher_detail_no": self.voucher_detail_no, + "is_rejected": 0, + "docstatus": 1, + "is_cancelled": 0, + }, + "name", + ) + + if bundle: + if batch_no := frappe.db.get_value("Serial and Batch Entry", {"parent": bundle}, "batch_no"): + return batch_no + return make_batch( frappe._dict( { diff --git a/erpnext/stock/stock_ledger.py b/erpnext/stock/stock_ledger.py index 693481dfba8..26e7af150b9 100644 --- a/erpnext/stock/stock_ledger.py +++ b/erpnext/stock/stock_ledger.py @@ -623,9 +623,21 @@ class update_entries_after: if sle.dependant_sle_voucher_detail_no: entries_to_fix = self.get_dependent_entries_to_fix(entries_to_fix, sle) + if self.has_stock_reco_with_serial_batch(sle): + break + if self.exceptions: self.raise_exceptions() + def has_stock_reco_with_serial_batch(self, sle): + if ( + sle.vocher_type == "Stock Reconciliation" + and frappe.db.get_value(sle.voucher_type, sle.voucher_no, "set_posting_time") == 1 + ): + return not (sle.batch_no or sle.serial_no or sle.serial_and_batch_bundle) + + return False + def process_sle_against_current_timestamp(self): sl_entries = self.get_sle_against_current_voucher() for sle in sl_entries: @@ -647,6 +659,7 @@ class update_entries_after: and ( posting_datetime = %(posting_datetime)s ) + and creation = %(creation)s order by creation ASC for update @@ -864,7 +877,7 @@ class update_entries_after: sle.stock_value = self.wh_data.stock_value sle.stock_queue = json.dumps(self.wh_data.stock_queue) - if not sle.is_adjustment_entry or not self.args.get("sle_id"): + if not sle.is_adjustment_entry: sle.stock_value_difference = stock_value_difference sle.doctype = "Stock Ledger Entry" @@ -1034,7 +1047,7 @@ class update_entries_after: rate = 0 # Material Transfer, Repack, Manufacturing if sle.voucher_type == "Stock Entry": - self.recalculate_amounts_in_stock_entry(sle.voucher_no) + self.recalculate_amounts_in_stock_entry(sle.voucher_no, sle.voucher_detail_no) rate = frappe.db.get_value("Stock Entry Detail", sle.voucher_detail_no, "valuation_rate") # Sales and Purchase Return elif sle.voucher_type in ( @@ -1073,6 +1086,15 @@ class update_entries_after: } ) + if not rate and sle.voucher_type in ["Delivery Note", "Sales Invoice"]: + rate = get_rate_for_return( + sle.voucher_type, + sle.voucher_no, + sle.item_code, + voucher_detail_no=sle.voucher_detail_no, + sle=sle, + ) + else: rate = get_rate_for_return( sle.voucher_type, @@ -1154,14 +1176,16 @@ class update_entries_after: # Update outgoing item's rate, recalculate FG Item's rate and total incoming/outgoing amount if not sle.dependant_sle_voucher_detail_no: - self.recalculate_amounts_in_stock_entry(sle.voucher_no) + self.recalculate_amounts_in_stock_entry(sle.voucher_no, sle.voucher_detail_no) - def recalculate_amounts_in_stock_entry(self, voucher_no): + def recalculate_amounts_in_stock_entry(self, voucher_no, voucher_detail_no): stock_entry = frappe.get_doc("Stock Entry", voucher_no, for_update=True) stock_entry.calculate_rate_and_amount(reset_outgoing_rate=False, raise_error_if_no_rate=False) stock_entry.db_update() for d in stock_entry.items: - d.db_update() + # Update only the row that matches the voucher_detail_no or the row containing the FG/Scrap Item. + if d.name == voucher_detail_no or (not d.s_warehouse and d.t_warehouse): + d.db_update() def update_rate_on_delivery_and_sales_return(self, sle, outgoing_rate): # Update item's incoming rate on transaction @@ -1526,7 +1550,12 @@ def get_previous_sle_of_current_voucher(args, operator="<", exclude_current_vouc voucher_no = args.get("voucher_no") voucher_condition = f"and voucher_no != '{voucher_no}'" - sle = frappe.db.sql( + elif args.get("creation") and args.get("sle_id"): + creation = args.get("creation") + operator = "<=" + voucher_condition = f"and creation < '{creation}'" + + sle = frappe.db.sql( # nosemgrep f""" select *, posting_datetime as "timestamp" from `tabStock Ledger Entry` @@ -1537,7 +1566,7 @@ def get_previous_sle_of_current_voucher(args, operator="<", exclude_current_vouc and ( posting_datetime {operator} %(posting_datetime)s ) - order by posting_datetime desc, creation desc + order by posting_date desc, posting_time desc, creation desc limit 1 for update""", { @@ -1623,6 +1652,7 @@ def get_stock_ledger_entries( if extra_cond: conditions += f"{extra_cond}" + # nosemgrep return frappe.db.sql( """ select *, posting_datetime as "timestamp" @@ -1630,7 +1660,7 @@ def get_stock_ledger_entries( where item_code = %(item_code)s and is_cancelled = 0 {conditions} - order by posting_datetime {order}, creation {order} + order by posting_date {order}, posting_time {order}, creation {order} {limit} {for_update}""".format( conditions=conditions, limit=limit or "", @@ -1724,6 +1754,9 @@ def get_valuation_rate( # Get moving average rate of a specific batch number if warehouse and serial_and_batch_bundle: + sabb = frappe.db.get_value( + "Serial and Batch Bundle", serial_and_batch_bundle, ["posting_date", "posting_time"], as_dict=True + ) batch_obj = BatchNoValuation( sle=frappe._dict( { @@ -1731,6 +1764,8 @@ def get_valuation_rate( "warehouse": warehouse, "actual_qty": -1, "serial_and_batch_bundle": serial_and_batch_bundle, + "posting_date": sabb.posting_date, + "posting_time": sabb.posting_time, } ) ) @@ -1738,7 +1773,7 @@ def get_valuation_rate( return batch_obj.get_incoming_rate() # Get valuation rate from last sle for the same item and warehouse - if last_valuation_rate := frappe.db.sql( + if last_valuation_rate := frappe.db.sql( # nosemgrep """select valuation_rate from `tabStock Ledger Entry` force index (item_warehouse) where @@ -1747,7 +1782,7 @@ def get_valuation_rate( AND valuation_rate >= 0 AND is_cancelled = 0 AND NOT (voucher_no = %s AND voucher_type = %s) - order by posting_datetime desc, name desc limit 1""", + order by posting_date desc, posting_time desc, name desc limit 1""", (item_code, warehouse, voucher_no, voucher_type), ): return flt(last_valuation_rate[0][0]) @@ -1818,7 +1853,7 @@ def update_qty_in_future_sle(args, allow_negative_stock=False): detail = next_stock_reco_detail[0] datetime_limit_condition = get_datetime_limit_condition(detail) - frappe.db.sql( + frappe.db.sql( # nosemgrep f""" update `tabStock Ledger Entry` set qty_after_transaction = qty_after_transaction + {qty_shift} @@ -1984,8 +2019,8 @@ def is_negative_with_precision(neg_sle, is_batch=False): return qty_deficit < 0 and abs(qty_deficit) > 0.0001 -def get_future_sle_with_negative_qty(args): - return frappe.db.sql( +def get_future_sle_with_negative_qty(sle_args): + return frappe.db.sql( # nosemgrep """ select qty_after_transaction, posting_date, posting_time, @@ -1998,28 +2033,28 @@ def get_future_sle_with_negative_qty(args): and posting_datetime >= %(posting_datetime)s and is_cancelled = 0 and qty_after_transaction < 0 - order by posting_datetime asc + order by posting_date asc, posting_time asc limit 1 """, - args, + sle_args, as_dict=1, ) -def get_future_sle_with_negative_batch_qty(args): - return frappe.db.sql( +def get_future_sle_with_negative_batch_qty(sle_args): + return frappe.db.sql( # nosemgrep """ with batch_ledger as ( select posting_date, posting_time, posting_datetime, voucher_type, voucher_no, - sum(actual_qty) over (order by posting_datetime, creation) as cumulative_total + sum(actual_qty) over (order by posting_date, posting_time, creation) as cumulative_total from `tabStock Ledger Entry` where item_code = %(item_code)s and warehouse = %(warehouse)s and batch_no=%(batch_no)s and is_cancelled = 0 - order by posting_datetime, creation + order by posting_date, posting_time, creation ) select * from batch_ledger where @@ -2027,7 +2062,7 @@ def get_future_sle_with_negative_batch_qty(args): and posting_datetime >= %(posting_datetime)s limit 1 """, - args, + sle_args, as_dict=1, ) diff --git a/erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order.json b/erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order.json index b8bda832983..206e3135dfb 100644 --- a/erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order.json +++ b/erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order.json @@ -294,7 +294,7 @@ "fieldname": "total", "fieldtype": "Currency", "label": "Total", - "options": "currency", + "options": "Company:company:default_currency", "read_only": 1 }, { @@ -353,6 +353,7 @@ "fieldname": "total_additional_costs", "fieldtype": "Currency", "label": "Total Additional Costs", + "options": "Company:company:default_currency", "print_hide_if_no_value": 1, "read_only": 1 }, @@ -450,21 +451,21 @@ "options": "Project" }, { - "fieldname": "tab_other_info", - "fieldtype": "Tab Break", - "label": "Other Info" + "fieldname": "tab_other_info", + "fieldtype": "Tab Break", + "label": "Other Info" }, { - "fieldname": "tab_connections", - "fieldtype": "Tab Break", - "label": "Connections", - "show_dashboard": 1 + "fieldname": "tab_connections", + "fieldtype": "Tab Break", + "label": "Connections", + "show_dashboard": 1 } ], "icon": "fa fa-file-text", "is_submittable": 1, "links": [], - "modified": "2024-01-03 20:56:04.670380", + "modified": "2024-12-06 15:21:49.924146", "modified_by": "Administrator", "module": "Subcontracting", "name": "Subcontracting Order", @@ -519,4 +520,4 @@ "timeline_field": "supplier", "title_field": "supplier_name", "track_changes": 1 -} \ No newline at end of file +} diff --git a/erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order_list.js b/erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order_list.js index 895ffdbf88c..f5486bbd59d 100644 --- a/erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order_list.js +++ b/erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order_list.js @@ -4,7 +4,7 @@ frappe.listview_settings["Subcontracting Order"] = { get_indicator: function (doc) { const status_colors = { - Draft: "grey", + Draft: "red", Open: "orange", "Partially Received": "yellow", Completed: "green", diff --git a/erpnext/subcontracting/doctype/subcontracting_order/test_subcontracting_order.py b/erpnext/subcontracting/doctype/subcontracting_order/test_subcontracting_order.py index 0ae07993be8..ac87239e73e 100644 --- a/erpnext/subcontracting/doctype/subcontracting_order/test_subcontracting_order.py +++ b/erpnext/subcontracting/doctype/subcontracting_order/test_subcontracting_order.py @@ -25,6 +25,7 @@ from erpnext.controllers.tests.test_subcontracting_controller import ( make_subcontracted_items, set_backflush_based_on, ) +from erpnext.manufacturing.doctype.production_plan.test_production_plan import make_bom from erpnext.stock.doctype.item.test_item import make_item from erpnext.stock.doctype.stock_entry.test_stock_entry import make_stock_entry from erpnext.subcontracting.doctype.subcontracting_order.subcontracting_order import ( @@ -683,6 +684,28 @@ class TestSubcontractingOrder(FrappeTestCase): self.assertEqual(requested_qty, new_requested_qty) + def test_subcontracting_order_rm_required_items_for_precision(self): + item_code = "Subcontracted Item SA9" + raw_materials = ["Subcontracted SRM Item 9"] + if not frappe.db.exists("BOM", {"item": item_code}): + make_bom(item=item_code, raw_materials=raw_materials, rate=100, rm_qty=1.04) + + service_items = [ + { + "warehouse": "_Test Warehouse - _TC", + "item_code": "Subcontracted Service Item 9", + "qty": 1, # 202.0656, + "rate": 100, + "fg_item": "Subcontracted Item SA9", + "fg_item_qty": 202.0656, + }, + ] + + sco = get_subcontracting_order(service_items=service_items) + sco.reload() + + self.assertEqual(sco.supplied_items[0].required_qty, 210.149) + def create_subcontracting_order(**args): args = frappe._dict(args) diff --git a/erpnext/subcontracting/doctype/subcontracting_order_item/subcontracting_order_item.json b/erpnext/subcontracting/doctype/subcontracting_order_item/subcontracting_order_item.json index 1ca90c31654..502a28b3ec6 100644 --- a/erpnext/subcontracting/doctype/subcontracting_order_item/subcontracting_order_item.json +++ b/erpnext/subcontracting/doctype/subcontracting_order_item/subcontracting_order_item.json @@ -185,7 +185,7 @@ "fieldtype": "Currency", "in_list_view": 1, "label": "Rate", - "options": "currency", + "options": "Company:company:default_currency", "read_only": 1, "reqd": 1 }, @@ -199,7 +199,7 @@ "fieldtype": "Currency", "in_list_view": 1, "label": "Amount", - "options": "currency", + "options": "Company:company:default_currency", "read_only": 1, "reqd": 1 }, @@ -269,6 +269,7 @@ "fieldname": "service_cost_per_qty", "fieldtype": "Currency", "label": "Service Cost Per Qty", + "options": "Company:company:default_currency", "read_only": 1, "reqd": 1 }, @@ -277,6 +278,7 @@ "fieldname": "additional_cost_per_qty", "fieldtype": "Currency", "label": "Additional Cost Per Qty", + "options": "Company:company:default_currency", "read_only": 1 }, { @@ -284,6 +286,7 @@ "fieldtype": "Currency", "label": "Raw Material Cost Per Qty", "no_copy": 1, + "options": "Company:company:default_currency", "read_only": 1 }, { @@ -384,7 +387,7 @@ "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2023-11-30 15:29:43.744618", + "modified": "2024-12-06 15:23:05.252346", "modified_by": "Administrator", "module": "Subcontracting", "name": "Subcontracting Order Item", @@ -397,4 +400,4 @@ "sort_order": "DESC", "states": [], "track_changes": 1 -} \ No newline at end of file +} diff --git a/erpnext/subcontracting/doctype/subcontracting_order_item/subcontracting_order_item.py b/erpnext/subcontracting/doctype/subcontracting_order_item/subcontracting_order_item.py index fcd143c1dd9..7a426f91cb0 100644 --- a/erpnext/subcontracting/doctype/subcontracting_order_item/subcontracting_order_item.py +++ b/erpnext/subcontracting/doctype/subcontracting_order_item/subcontracting_order_item.py @@ -26,8 +26,11 @@ class SubcontractingOrderItem(Document): include_exploded_items: DF.Check item_code: DF.Link item_name: DF.Data + job_card: DF.Link | None manufacturer: DF.Link | None manufacturer_part_no: DF.Data | None + material_request: DF.Link | None + material_request_item: DF.Data | None page_break: DF.Check parent: DF.Data parentfield: DF.Data diff --git a/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.js b/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.js index 83113a223c2..2aaf8a8adcd 100644 --- a/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.js +++ b/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.js @@ -249,11 +249,15 @@ frappe.ui.form.on("Subcontracting Receipt", { }); frm.set_query("batch_no", "supplied_items", (doc, cdt, cdn) => { - var row = locals[cdt][cdn]; + let row = locals[cdt][cdn]; + let filters = { + item_code: row.rm_item_code, + warehouse: doc.supplier_warehouse, + }; + return { - filters: { - item: row.rm_item_code, - }, + query: "erpnext.controllers.queries.get_batch_no", + filters: filters, }; }); diff --git a/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.json b/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.json index ad03171f29a..b8bd95bcbca 100644 --- a/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.json +++ b/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.json @@ -336,7 +336,7 @@ "fieldname": "total", "fieldtype": "Currency", "label": "Total", - "options": "currency", + "options": "Company:company:default_currency", "read_only": 1 }, { @@ -618,6 +618,7 @@ "fieldname": "total_additional_costs", "fieldtype": "Currency", "label": "Total Additional Costs", + "options": "Company:company:default_currency", "print_hide_if_no_value": 1, "read_only": 1 }, @@ -656,27 +657,27 @@ "fieldtype": "Column Break" }, { - "fieldname": "tab_other_info", - "fieldtype": "Tab Break", - "label": "Other Info" + "fieldname": "tab_other_info", + "fieldtype": "Tab Break", + "label": "Other Info" }, { - "collapsible": 1, - "fieldname": "order_status_section", - "fieldtype": "Section Break", - "label": "Order Status" + "collapsible": 1, + "fieldname": "order_status_section", + "fieldtype": "Section Break", + "label": "Order Status" }, { - "fieldname": "tab_connections", - "fieldtype": "Tab Break", - "label": "Connections", - "show_dashboard": 1 + "fieldname": "tab_connections", + "fieldtype": "Tab Break", + "label": "Connections", + "show_dashboard": 1 } ], "in_create": 1, "is_submittable": 1, "links": [], - "modified": "2024-05-28 15:02:13.517969", + "modified": "2024-12-06 15:24:38.384232", "modified_by": "Administrator", "module": "Subcontracting", "name": "Subcontracting Receipt", diff --git a/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.py b/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.py index 48203167187..37cd43ac1f6 100644 --- a/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.py +++ b/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.py @@ -237,9 +237,14 @@ class SubcontractingReceipt(SubcontractingController): frappe.db.get_single_value("Buying Settings", "backflush_raw_materials_of_subcontract_based_on") == "BOM" and self.supplied_items - and not any(item.serial_and_batch_bundle for item in self.supplied_items) ): - self.supplied_items = [] + if not any( + item.serial_and_batch_bundle or item.batch_no or item.serial_no + for item in self.supplied_items + ): + self.supplied_items = [] + else: + self.update_rate_for_supplied_items() @frappe.whitelist() def get_scrap_items(self, recalculate_rate=False): @@ -326,9 +331,12 @@ class SubcontractingReceipt(SubcontractingController): supplied_items_details[item.name] = {} for supplied_item in supplied_items: + if supplied_item.rm_item_code not in supplied_items_details[item.name]: + supplied_items_details[item.name][supplied_item.rm_item_code] = 0.0 + supplied_items_details[item.name][ supplied_item.rm_item_code - ] = supplied_item.available_qty + ] += supplied_item.available_qty else: for item in self.get("supplied_items"): item.available_qty_for_consumption = supplied_items_details.get(item.reference_name, {}).get( @@ -682,86 +690,107 @@ def make_purchase_receipt(source_name, target_doc=None, save=False, submit=False else: source_doc = source_name - if not source_doc.is_return: - if not target_doc: - target_doc = frappe.new_doc("Purchase Receipt") - target_doc.is_subcontracted = 1 - target_doc.is_old_subcontracting_flow = 0 + if source_doc.is_return: + return - target_doc = get_mapped_doc( - "Subcontracting Receipt", - source_doc.name, - { - "Subcontracting Receipt": { - "doctype": "Purchase Receipt", - "field_map": { - "posting_date": "posting_date", - "posting_time": "posting_time", - "name": "subcontracting_receipt", - "supplier_warehouse": "supplier_warehouse", - }, - "field_no_map": ["total_qty", "total"], - }, - }, - target_doc, - ignore_child_tables=True, + po_sr_item_dict = {} + po_name = None + for item in source_doc.items: + if not item.purchase_order: + continue + + if not po_name: + po_name = item.purchase_order + + po_sr_item_dict[item.purchase_order_item] = { + "qty": flt(item.qty), + "rejected_qty": flt(item.rejected_qty), + "warehouse": item.warehouse, + "rejected_warehouse": item.rejected_warehouse, + "subcontracting_receipt_item": item.name, + } + + if not po_name: + frappe.throw( + _("Purchase Order Item reference is missing in Subcontracting Receipt {0}").format( + source_doc.name + ) ) - target_doc.currency = frappe.get_cached_value("Company", target_doc.company, "default_currency") + def update_item(obj, target, source_parent): + sr_item_details = po_sr_item_dict.get(obj.name) + ratio = flt(obj.qty) / flt(obj.fg_item_qty) - po_items_details = {} - for item in source_doc.items: - if item.purchase_order and item.purchase_order_item: - if item.purchase_order not in po_items_details: - po_doc = frappe.get_doc("Purchase Order", item.purchase_order) - po_items_details[item.purchase_order] = { - po_item.name: po_item for po_item in po_doc.items - } + target.update( + { + "qty": ratio * sr_item_details["qty"], + "rejected_qty": ratio * sr_item_details["rejected_qty"], + "warehouse": sr_item_details["warehouse"], + "rejected_warehouse": sr_item_details["rejected_warehouse"], + "subcontracting_receipt_item": sr_item_details["subcontracting_receipt_item"], + } + ) - if po_item := po_items_details[item.purchase_order].get(item.purchase_order_item): - conversion_factor = flt(po_item.qty) / flt(po_item.fg_item_qty) - item_row = { - "item_code": po_item.item_code, - "item_name": po_item.item_name, - "conversion_factor": conversion_factor, - "qty": flt(item.qty) * conversion_factor, - "rejected_qty": flt(item.rejected_qty) * conversion_factor, - "uom": po_item.uom, - "rate": po_item.rate, - "warehouse": item.warehouse, - "rejected_warehouse": item.rejected_warehouse, - "purchase_order": item.purchase_order, - "purchase_order_item": item.purchase_order_item, - "subcontracting_receipt_item": item.name, - "project": po_item.project, - } - target_doc.append("items", item_row) + def post_process(source, target): + target.set_missing_values() + target.update( + { + "posting_date": source_doc.posting_date, + "posting_time": source_doc.posting_time, + "subcontracting_receipt": source_doc.name, + "supplier_warehouse": source_doc.supplier_warehouse, + "is_subcontracted": 1, + "is_old_subcontracting_flow": 0, + "currency": frappe.get_cached_value("Company", target.company, "default_currency"), + } + ) - if not target_doc.items: - frappe.throw( - _("Purchase Order Item reference is missing in Subcontracting Receipt {0}").format( - source_doc.name - ) + target_doc = get_mapped_doc( + "Purchase Order", + po_name, + { + "Purchase Order": { + "doctype": "Purchase Receipt", + "field_map": {"supplier_warehouse": "supplier_warehouse"}, + "validation": { + "docstatus": ["=", 1], + }, + }, + "Purchase Order Item": { + "doctype": "Purchase Receipt Item", + "field_map": { + "name": "purchase_order_item", + "parent": "purchase_order", + "bom": "bom", + }, + "postprocess": update_item, + "condition": lambda doc: doc.name in po_sr_item_dict, + }, + "Purchase Taxes and Charges": { + "doctype": "Purchase Taxes and Charges", + "reset_value": True, + "condition": lambda doc: not doc.is_tax_withholding_account, + }, + }, + postprocess=post_process, + ) + + if (save or submit) and frappe.has_permission(target_doc.doctype, "create"): + target_doc.save() + + if submit and frappe.has_permission(target_doc.doctype, "submit", target_doc): + try: + target_doc.submit() + except Exception as e: + target_doc.add_comment("Comment", _("Submit Action Failed") + "

" + str(e)) + + if notify: + frappe.msgprint( + _("Purchase Receipt {0} created.").format( + get_link_to_form(target_doc.doctype, target_doc.name) + ), + indicator="green", + alert=True, ) - target_doc.set_missing_values() - - if (save or submit) and frappe.has_permission(target_doc.doctype, "create"): - target_doc.save() - - if submit and frappe.has_permission(target_doc.doctype, "submit", target_doc): - try: - target_doc.submit() - except Exception as e: - target_doc.add_comment("Comment", _("Submit Action Failed") + "

" + str(e)) - - if notify: - frappe.msgprint( - _("Purchase Receipt {0} created.").format( - get_link_to_form(target_doc.doctype, target_doc.name) - ), - indicator="green", - alert=True, - ) - - return target_doc + return target_doc diff --git a/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt_list.js b/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt_list.js index be6c0d0b18f..5f5a6db01e0 100644 --- a/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt_list.js +++ b/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt_list.js @@ -4,7 +4,7 @@ frappe.listview_settings["Subcontracting Receipt"] = { get_indicator: function (doc) { const status_colors = { - Draft: "grey", + Draft: "red", Return: "gray", "Return Issued": "grey", Completed: "green", diff --git a/erpnext/subcontracting/doctype/subcontracting_receipt/test_subcontracting_receipt.py b/erpnext/subcontracting/doctype/subcontracting_receipt/test_subcontracting_receipt.py index 8ff5c8f27b0..e0fa7923ef9 100644 --- a/erpnext/subcontracting/doctype/subcontracting_receipt/test_subcontracting_receipt.py +++ b/erpnext/subcontracting/doctype/subcontracting_receipt/test_subcontracting_receipt.py @@ -1075,18 +1075,42 @@ class TestSubcontractingReceipt(FrappeTestCase): @change_settings("Buying Settings", {"auto_create_purchase_receipt": 1}) def test_auto_create_purchase_receipt(self): + from erpnext.buying.doctype.purchase_order.test_purchase_order import create_purchase_order + fg_item = "Subcontracted Item SA1" service_items = [ { "warehouse": "_Test Warehouse - _TC", "item_code": "Subcontracted Service Item 1", - "qty": 5, + "qty": 10, "rate": 100, "fg_item": fg_item, "fg_item_qty": 5, }, ] - sco = get_subcontracting_order(service_items=service_items) + + po = create_purchase_order( + rm_items=service_items, + is_subcontracted=1, + supplier_warehouse="_Test Warehouse 1 - _TC", + do_not_submit=True, + ) + po.append( + "taxes", + { + "account_head": "_Test Account Excise Duty - _TC", + "charge_type": "On Net Total", + "cost_center": "_Test Cost Center - _TC", + "description": "Excise Duty", + "doctype": "Purchase Taxes and Charges", + "rate": 10, + }, + ) + po.save() + po.submit() + + sco = get_subcontracting_order(po_name=po.name) + rm_items = get_rm_items(sco.supplied_items) itemwise_details = make_stock_in_entry(rm_items=rm_items) make_stock_transfer_entry( @@ -1094,11 +1118,24 @@ class TestSubcontractingReceipt(FrappeTestCase): rm_items=rm_items, itemwise_details=copy.deepcopy(itemwise_details), ) + scr = make_subcontracting_receipt(sco.name) + scr.items[0].qty = 3 scr.save() scr.submit() - self.assertTrue(frappe.db.get_value("Purchase Receipt", {"subcontracting_receipt": scr.name})) + pr_details = frappe.get_all( + "Purchase Receipt", + filters={"subcontracting_receipt": scr.name}, + fields=["name", "total_taxes_and_charges"], + ) + + self.assertTrue(pr_details) + + pr_qty = frappe.db.get_value("Purchase Receipt Item", {"parent": pr_details[0]["name"]}, "qty") + self.assertEqual(pr_qty, 6) + + self.assertEqual(pr_details[0]["total_taxes_and_charges"], 60) def test_use_serial_batch_fields_for_subcontracting_receipt(self): fg_item = make_item( @@ -1361,6 +1398,66 @@ class TestSubcontractingReceipt(FrappeTestCase): frappe.db.set_single_value("Stock Settings", "use_serial_batch_fields", 1) + def test_change_batch_for_raw_materials(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 + + bom = make_bom(item=fg_item, raw_materials=[rm_item1]) + second_batch_no = None + for row in bom.items: + se = make_stock_entry( + item_code=row.item_code, + qty=1, + target="_Test Warehouse 1 - _TC", + rate=300, + ) + + se.reload() + se1 = make_stock_entry( + item_code=row.item_code, + qty=1, + target="_Test Warehouse 1 - _TC", + rate=300, + ) + + se1.reload() + + second_batch_no = get_batch_from_bundle(se1.items[0].serial_and_batch_bundle) + + 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) + scr = make_subcontracting_receipt(sco.name) + scr.save() + scr.reload() + + scr.supplied_items[0].batch_no = second_batch_no + scr.supplied_items[0].use_serial_batch_fields = 1 + scr.submit() + scr.reload() + + batch_no = get_batch_from_bundle(scr.supplied_items[0].serial_and_batch_bundle) + self.assertEqual(batch_no, second_batch_no) + self.assertEqual(scr.items[0].rm_cost_per_qty, 300) + self.assertEqual(scr.items[0].service_cost_per_qty, 100) + def make_return_subcontracting_receipt(**args): args = frappe._dict(args) diff --git a/erpnext/subcontracting/doctype/subcontracting_receipt_item/subcontracting_receipt_item.json b/erpnext/subcontracting/doctype/subcontracting_receipt_item/subcontracting_receipt_item.json index 75e263e2c1c..23a7e69669d 100644 --- a/erpnext/subcontracting/doctype/subcontracting_receipt_item/subcontracting_receipt_item.json +++ b/erpnext/subcontracting/doctype/subcontracting_receipt_item/subcontracting_receipt_item.json @@ -207,7 +207,7 @@ "fieldtype": "Currency", "in_list_view": 1, "label": "Rate", - "options": "currency", + "options": "Company:company:default_currency", "print_width": "100px", "read_only": 1, "width": "100px" @@ -217,7 +217,7 @@ "fieldtype": "Currency", "in_list_view": 1, "label": "Amount", - "options": "currency", + "options": "Company:company:default_currency", "read_only": 1 }, { @@ -231,6 +231,7 @@ "fieldtype": "Currency", "label": "Raw Material Cost Per Qty", "no_copy": 1, + "options": "Company:company:default_currency", "read_only": 1 }, { @@ -239,6 +240,7 @@ "fieldname": "service_cost_per_qty", "fieldtype": "Currency", "label": "Service Cost Per Qty", + "options": "Company:company:default_currency", "read_only": 1, "reqd": 1 }, @@ -248,6 +250,7 @@ "fieldname": "additional_cost_per_qty", "fieldtype": "Currency", "label": "Additional Cost Per Qty", + "options": "Company:company:default_currency", "read_only": 1 }, { @@ -582,7 +585,7 @@ "idx": 1, "istable": 1, "links": [], - "modified": "2024-03-29 15:42:43.425544", + "modified": "2024-12-06 15:23:58.680169", "modified_by": "Administrator", "module": "Subcontracting", "name": "Subcontracting Receipt Item", diff --git a/erpnext/subcontracting/doctype/subcontracting_receipt_item/subcontracting_receipt_item.py b/erpnext/subcontracting/doctype/subcontracting_receipt_item/subcontracting_receipt_item.py index 1a4ce5b977a..69f7ae73e7a 100644 --- a/erpnext/subcontracting/doctype/subcontracting_receipt_item/subcontracting_receipt_item.py +++ b/erpnext/subcontracting/doctype/subcontracting_receipt_item/subcontracting_receipt_item.py @@ -28,6 +28,7 @@ class SubcontractingReceiptItem(Document): is_scrap_item: DF.Check item_code: DF.Link item_name: DF.Data | None + job_card: DF.Link | None manufacturer: DF.Link | None manufacturer_part_no: DF.Data | None page_break: DF.Check diff --git a/erpnext/support/doctype/service_level_agreement/service_level_agreement.py b/erpnext/support/doctype/service_level_agreement/service_level_agreement.py index b140fdab51f..011a5bc371f 100644 --- a/erpnext/support/doctype/service_level_agreement/service_level_agreement.py +++ b/erpnext/support/doctype/service_level_agreement/service_level_agreement.py @@ -144,7 +144,7 @@ class ServiceLevelAgreement(Document): ): frappe.throw( _("{0} is not enabled in {1}").format( - frappe.bold("Track Service Level Agreement"), + frappe.bold(_("Track Service Level Agreement")), get_link_to_form("Support Settings", "Support Settings"), ) ) diff --git a/erpnext/templates/includes/issue_row.html b/erpnext/templates/includes/issue_row.html index a04f558509f..b55712ab189 100644 --- a/erpnext/templates/includes/issue_row.html +++ b/erpnext/templates/includes/issue_row.html @@ -18,7 +18,7 @@ {% if doc.status == "Open" %} {{ doc.priority }} {% else %} - {{ doc.status }} + {{ _(doc.status) }} {%- endif -%} diff --git a/erpnext/templates/includes/projects/project_row.html b/erpnext/templates/includes/projects/project_row.html index 686637a2014..ccb306afcdb 100644 --- a/erpnext/templates/includes/projects/project_row.html +++ b/erpnext/templates/includes/projects/project_row.html @@ -20,7 +20,7 @@ {% else %} - {{ doc.status }} + {{ _(doc.status) }} {% endif %} {% if doc["_assign"] %} diff --git a/erpnext/templates/includes/transaction_row.html b/erpnext/templates/includes/transaction_row.html index a498ba0eefa..061c9bd1796 100644 --- a/erpnext/templates/includes/transaction_row.html +++ b/erpnext/templates/includes/transaction_row.html @@ -8,7 +8,7 @@
- {{doc.status}} + {{ _(doc.status) }}
diff --git a/erpnext/templates/pages/order.html b/erpnext/templates/pages/order.html index 6c59a9688dc..388feb9eba9 100644 --- a/erpnext/templates/pages/order.html +++ b/erpnext/templates/pages/order.html @@ -173,11 +173,11 @@
{{ d.item_code }}
- {{ html2text(d.description) | truncate(140) }} + {{ html2text(d.description or "") | truncate(140) }}
{{ _("Qty ") }}({{ d.get_formatted("qty") }})
-{% endmacro %} \ No newline at end of file +{% endmacro %} diff --git a/erpnext/templates/pages/order.py b/erpnext/templates/pages/order.py index 505399f4a5b..dca5a0c7497 100644 --- a/erpnext/templates/pages/order.py +++ b/erpnext/templates/pages/order.py @@ -4,6 +4,10 @@ import frappe from frappe import _ +from erpnext.accounts.doctype.payment_request.payment_request import ( + ALLOWED_DOCTYPES_FOR_PAYMENT_REQUEST, +) + def get_context(context): context.no_cache = 1 @@ -46,8 +50,10 @@ def get_context(context): ) context.available_loyalty_points = int(loyalty_program_details.get("loyalty_points")) - context.show_pay_button = "payments" in frappe.get_installed_apps() and frappe.db.get_single_value( - "Buying Settings", "show_pay_button" + context.show_pay_button = ( + "payments" in frappe.get_installed_apps() + and frappe.db.get_single_value("Buying Settings", "show_pay_button") + and context.doc.doctype in ALLOWED_DOCTYPES_FOR_PAYMENT_REQUEST ) context.show_make_pi_button = False if context.doc.get("supplier"): diff --git a/erpnext/templates/pages/projects.py b/erpnext/templates/pages/projects.py index e3e26fc82a6..787c7c0069b 100644 --- a/erpnext/templates/pages/projects.py +++ b/erpnext/templates/pages/projects.py @@ -51,7 +51,7 @@ def get_tasks(project, start=0, search=None, item_status=None): "parent_task", ], limit_start=start, - limit_page_length=10, + limit_page_length=100, ) task_nest = [] for task in tasks: diff --git a/erpnext/templates/pages/timelog_info.html b/erpnext/templates/pages/timelog_info.html index be13826444c..9f9445661a0 100644 --- a/erpnext/templates/pages/timelog_info.html +++ b/erpnext/templates/pages/timelog_info.html @@ -38,7 +38,7 @@ - + diff --git a/erpnext/tests/test_perf.py b/erpnext/tests/test_perf.py index fc17b1dcbda..db54ca97395 100644 --- a/erpnext/tests/test_perf.py +++ b/erpnext/tests/test_perf.py @@ -3,7 +3,7 @@ from frappe.tests.utils import FrappeTestCase INDEXED_FIELDS = { "Bin": ["item_code"], - "GL Entry": ["voucher_type", "against_voucher_type"], + "GL Entry": ["voucher_no", "posting_date", "company", "party"], "Purchase Order Item": ["item_code"], "Stock Ledger Entry": ["warehouse"], } diff --git a/erpnext/translations/de.csv b/erpnext/translations/de.csv index 5f6e6f761e0..9ef1d4bc63a 100644 --- a/erpnext/translations/de.csv +++ b/erpnext/translations/de.csv @@ -4480,10 +4480,23 @@ Payment Reconciliation,Zahlungsabgleich, Receivable / Payable Account,Forderungen-/Verbindlichkeiten-Konto, Bank / Cash Account,Bank / Geldkonto, From Invoice Date,Ab Rechnungsdatum, -To Invoice Date,Um Datum Rechnung, -Minimum Invoice Amount,Mindestabrechnung, +To Invoice Date,Bis Rechnungsdatum, +Invoice Limit,Max. Anzahl Rechnungen, +From Payment Date,Ab Zahlungsdatum, +To Payment Date,Bis Zahlungsdatum, +Payment Limit,Max. Anzahl Zahlungen, +Minimum Invoice Amount,Minimaler Rechnungsbetrag, Maximum Invoice Amount,Maximaler Rechnungsbetrag, -System will fetch all the entries if limit value is zero.,"Das System ruft alle Einträge ab, wenn der Grenzwert Null ist.", +Minimum Payment Amount,Minimaler Zahlungsbetrag, +Maximum Payment Amount,Maximaler Zahlungsbetrag, +Filter on Invoice,Filter auf Rechnungsnr., +Filter on Payment,Filter auf Zahlungsnr., +"If you need to reconcile particular transactions against each other, then please select accordingly. If not, all the transactions will be allocated in FIFO order.","Wenn Sie bestimmte Transaktionen gegeneinander abgleichen müssen, wählen Sie diese bitte entsprechend aus. Andernfalls werden alle Transaktionen in FIFO-Reihenfolge zugewiesen.", +System will fetch all the entries if limit value is zero.,"Das System ruft alle Einträge ab, wenn die max. Anzahl Null ist.", +This filter will be applied to Journal Entry.,Dieser Filter wird auf Buchungssätze angewendet., +Unreconciled Entries,Nicht zugeordnete Buchungen, +Allocated Entries,Zugewiesene Buchungen, +Accounting Dimensions Filter,Filetr nach Buchhaltungsdimensionen, Get Unreconciled Entries,Nicht zugeordnete Buchungen aufrufen, Unreconciled Payment Details,Nicht abgeglichene Zahlungen, Invoice/Journal Entry Details,Einzelheiten zu Rechnungs-/Journalbuchungen, @@ -11816,3 +11829,285 @@ will be,wird sein, {} is a child company.,{} ist ein untergeordnetes Unternehmen., {} {} is already linked with another {},{} {} ist bereits mit einem anderen {} verknüpft, {} {} is already linked with {} {},{} {} ist bereits mit {} {} verknüpft, +A Transaction Deletion Document: {0} is triggered for {0},Eine Transaktion Löschungsdokument: {0} wird für {0} ausgelöst, +About Us Settings,"Einstellungen zu ""Über uns""", +Allow Internal Transfers at Arm's Length Price,Interne Übertragungen zum Fremdvergleichspreis zulassen, +Asset decapitalized after Asset Capitalization {0} was submitted,"Vermögenswert freigegeben, nachdem Anlagenaktivierung {0} gebucht wurde", +Auto Email Report,Auto Email-Bericht, +Auto close Opportunity Replied after the no. of days mentioned above,Automatische Schließungschaltung antwortete nach der oben genannten Anzahl von Tagen, +Avg Rate (Balance Stock),Durchschnittliche Rate (Lagerbestand), +Billing Interval in Subscription Plan must be Month to follow calendar months,"Abrechnungsintervall im Abonnementplan muss ""Monat"" sein, um Kalendermonate zu folgen", +Bulk Update,Massen-Update, +Can't disable batch wise valuation for active batches.,Sie können die chargenweise Bewertung für aktive Chargen nicht deaktivieren., +Can't disable batch wise valuation for items with FIFO valuation method.,Sie können die chargenweise Bewertung für Artikel mit FIFO-Bewertungsmethode nicht deaktivieren., +Cannot disable batch wise valuation for FIFO valuation method.,Sie können die chargenweise Bewertung für die FIFO-Bewertungsmethode nicht deaktivieren., +Cannot enqueue multi docs for one company. {0} is already queued/running for company: {1},Mehrere Dokumente für ein Unternehmen können nicht in die Warteschlange gestellt werden. {0} ist bereits in die Warteschlange gestellt/wird für das Unternehmen ausgeführt: {1}, +Contact Us Settings,Einstellungen zu „Kontaktieren Sie uns“, +Create Journal Entries,Buchungssätze erstellen, +Create a variant with the template image.,Eine Variante mit dem Vorlagenbild erstellen., +Create in Draft Status,In Entwurfsstatus erstellen, +Custom delimiters,Benutzerdefinierte Trennzeichen, +Deleted Documents,Gelöschte Dokumente, +Delimiter options,Trennzeichenoptionen, +Dependent Task {0} is not a Template Task,Abhängige Aufgabe {0} ist keine Vorlage einer Aufgabe, +Depreciation Entry Posting Status,Buchungsstatus des Abschreibungseintrags, +Depreciation Schedule View,Ansicht Abschreibungsplan, +Depreciation cannot be calculated for fully depreciated assets,Für vollständig abgeschriebene Vermögensgegenstände kann keine Abschreibung berechnet werden, +Do Not Use Batch-wise Valuation,Keine chargenweise Bewertung verwenden, +Domain Settings,Domäneneinstellungen, +Email Domain,E-Mail-Domain, +Enable Immutable Ledger,Unveränderliches Hauptbuch aktivieren, +Enable it if users want to consider rejected materials to dispatch.,"Aktivieren Sie diese Option, wenn Benutzer zurückgewiesenes Material für den Versand berücksichtigen möchten.", +Excess Materials Consumed,Überschüssige Materialien verbraucht, +Excess Transfer,Überschuss-Übertragung, +FIFO Queue vs Qty After Transaction Comparison,Vergleich zwischen FIFO-Warteschlange und Menge nach Transaktion, +"For the {0}, the quantity is required to make the return entry","Für die {0} ist die Menge erforderlich, um die Retoure zu erstellen", +"If enabled, the item rate won't adjust to the valuation rate during internal transfers, but accounting will still use the valuation rate.","Falls aktiviert, wird der Artikelkurs bei internen Transfers nicht an den Bewertungskurs angepasst, aber die Buchhaltung verwendet weiterhin den Wertansatz.", +"If enabled, the system will use the moving average valuation method to calculate the valuation rate for the batched items and will not consider the individual batch-wise incoming rate.","Falls aktiviert, verwendet das System die Bewertungsmethode des gleitenden Durchschnitts zur Berechnung des Wertansatzes für die chargenweisen Artikel und berücksichtigt nicht den individuellen chargenweisen Eingangskurs.", +Job Worker,Unterauftragnehmer, +Job Worker Address,Unterauftragnehmer Adresse, +Job Worker Address Details,Vorschau Adresse Unterauftragnehmer, +Job Worker Contact,Vertrag des Unterauftragnehmers, +Job Worker Delivery Note,Lieferschein des Unterauftragnehmers, +Job Worker Name,Name des Unterauftragnehmer, +Job Worker Warehouse,Lagerhaus des Unterauftragnehmers, +"Learn about Common Party","Erfahren Sie mehr über die Verknüpfung von Kunden und Lieferanten", +Notification,Benachrichtigung, +Notification Settings,Benachrichtigungseinstellungen, +Offsetting for Accounting Dimension,Verrechnung für Buchhaltungsdimension, +Only Include Allocated Payments,Nur zugeordnete Zahlungen einbeziehen, +Only one {0} entry can be created against the Work Order {1},Nur ein {0} Eintrag kann gegen den Arbeitsauftrag {1} erstellt werden, +Over Picking Allowance,Überkommissionierzugabe, +Over Transfer Allowance,Überschlusstransferzugabe, +Overbilling of {} ignored because you have {} role.,"Überhöhte Abrechnung von {} wurde ignoriert, weil Sie die Rolle {} haben.", +Payment Reconciliation Job: {0} is running for this party. Can't reconcile now.,Job für Zahlungsabgleich: {0} läuft für diese Partei. Kann jetzt nicht abgleichen., +Payment Request created from Sales Order or Purchase Order will be in Draft status. When disabled document will be in unsaved state.,"Eine Zahlungsanforderung, die aus einem Auftrag oder einer Bestellung erstellt wurde, wird im Entwurfsstatus sein. Wenn deaktiviert, wird das Dokument in ungespeichertem Zustand sein.", +Payment Request took too long to respond. Please try requesting for payment again.,"Zahlungsaufforderung hat zu lange gedauert, um zu antworten. Bitte versuchen Sie die Zahlung erneut anzufragen.", +Payment Terms Status for Sales Order,Status für Zahlungsbedingungen für Aufträge, +Pipeline By,Pipeline von, +Please enable Use Old Serial / Batch Fields to make_bundle,"Bitte aktivieren Sie ""Alte Serien-/Batchfelder verwenden"" für make_bundle", +Print Style,Druckstil, +Reconcile All Serial Nos / Batches,Alle Seriennummern/Chargen abgleichen, +Reset Company Default Values,Standardwerte des Unternehmens zurücksetzen, +Reset Raw Materials Table,Tabelle Rohstoffe zurücksetzen, +Return Against Subcontracting Receipt,Retoure gegen Unterauftragsbeleg, +Return Components,Komponenten zurückgeben, +Returned Against,Zurückgegeben gegen, +Returned exchange rate is neither integer not float.,Der zurückgegebene Wechselkurs ist weder Integer noch Float., +Round Off Tax Amount,Steuerbetrag abrunden, +Rounding Loss Allowance,Rundungsverlusttoleranz, +Rounding Loss Allowance should be between 0 and 1,Rundungsverlusttoleranz muss zwischen 0 und 1 sein, +Row #{0}: Rejected Warehouse is mandatory for the rejected Item {1},Zeile #{0}: Ausschusslager ist für den abgelehnten Artikel {1} obligatorisch, +Row #{0}: You cannot use the inventory dimension '{1}' in Stock Reconciliation to modify the quantity or valuation rate. Stock reconciliation with inventory dimensions is intended solely for performing opening entries.,"Zeile #{0}: Sie können die Bestandsdimension '{1}' in der Bestandsabgleich nicht verwenden, um die Menge oder den Wertansatz zu ändern. Die Bestandsabgleich mit Bestandsdimensionen ist ausschließlich für die Durchführung von Eröffnungsbuchungen vorgesehen.", +Row {0}: Packed Qty must be equal to {1} Qty.,Zeile {0}: Verpackte Menge muss gleich der {1} Menge sein., +Row {0}: Total Number of Depreciations cannot be less than or equal to Opening Number of Booked Depreciations,Zeile {0}: Die Gesamtzahl der Abschreibungen kann nicht kleiner oder gleich der Anzahl der gebuchten Abschreibungen zu Beginn sein, +SCO Supplied Item,Artikel beigestellt für Unterauftrag, +SLA Fulfilled On Status,SLA erfüllt am Status, +SLA will be applied if {1} is set as {2}{3},"SLA wird angewendet, wenn {1} als {2}{3} eingestellt ist", +SMS Settings,SMS-Einstellungen, +SO Total Qty,Kd.-Auftr.-Gesamtmenge, +"Sales Order {0} already exists against Customer's Purchase Order {1}. To allow multiple Sales Orders, Enable {2} in {3}","Auftrag {0} existiert bereits für die Kundenbestellung {1}. Um mehrere Verkaufsaufträge zuzulassen, aktivieren Sie {2} in {3}", +"Scorecard variables can be used, as well as: +{total_score} (the total score from that period), +{period_number} (the number of periods to present day) +","Variablen der Bewertung können verwendet werden, sowie: +{total_score} (die Gesamtpunktzahl aus diesem Zeitraum), +{period_number} (die Anzahl der Zeiträume bis zum heutigen Tag) +", +Select Accounting Dimension.,Buchhaltungsdimension auswählen, +Select Corrective Operation,Nacharbeit auswählen, +Select Date of Birth. This will validate Employees age and prevent hiring of under-age staff.,Wählen Sie Geburtsdatum. Damit wird das Alter der Mitarbeiter überprüft und die Einstellung von minderjährigen Mitarbeitern verhindert., +"Select Date of joining. It will have impact on the first salary calculation, Leave allocation on pro-rata bases.",Wählen Sie Eintrittsdatum. Es wirkt sich auf die erste Gehaltsberechnung und die Zuteilung von Abwesenheiten auf Pro-rata-Basis aus., +Select Dimension,Dimension auswählen, +Select Items for Quality Inspection,Artikel für die Qualitätsprüfung auswählen, +Select Job Worker Address,Unterauftragnehmer Adresse auswählen, +Service Expenses,Wartungsaufwand, +Service Level Agreement for {0} {1} already exists.,Service Level Agreement für {0} {1} existiert bereits., +System Settings,Systemverwaltung, +Website Script,Webseiten-Skript, +Website Theme,Webseiten-Thema, +Workflow Action,Workflow-Aktion, +Workflow State,Workflow-Status, +{0} is not running. Cannot trigger events for this Document,{0} läuft nicht. Ereignisse für dieses Dokument können nicht ausgelöst werden, +"""SN-01::10"" for ""SN-01"" to ""SN-10""","""SN-01::10"" für ""SN-01"" bis ""SN-10""", +"Masters & Reports","Stammdaten & Berichte", +"Quick Access","Schnellzugriff", +"Reports & Masters","Berichte & Stammdaten", +"Reports & Masters","Berichte & Stammdaten", +"Settings","Einstellungen", +"Shortcuts","Verknüpfungen", +"Your Shortcuts + + + + + + ","Ihre Verknüpfungen + + + + + + ", +"Your Shortcuts","Ihre Verknüpfungen", +Grand Total: {0},Gesamtsumme:{0}, +Outstanding Amount: {0},Ausstehender Betrag: {0}, +Against Customer Order {0},Gegen Kundenauftrag {0}, +Against Supplier Invoice {0},Gegen Lieferantenrechnung {0}, +Ageing Range,Alterungsbereich, +Allocate Payment Request,Zahlungsanfrage zuweisen, +Amount in party's bank account currency,Betrag in der Währung des Bankkontos des Beteiligten, +Amount in transaction currency,Betrag in Transaktionswährung, +BIN Qty,BIN Menge, +BOM and Production,Stückliste und Produktion, +Balance Stock Value,Bestandswert, +Base Cost Per Unit,Grundkosten pro Einheit, +Base Rate,Basispreis, +Base Tax Withholding Net Total,Basis-Steuereinbehalt-Nettosumme, +Base Total,Basis-Summe, +Base Total Billable Amount,Basis Gesamter abrechenbarer Betrag, +Batch Expiry Date,Ablaufdatum der Charge, +Bill for Rejected Quantity in Purchase Invoice,Rechnung für abgelehnte Menge in der Eingangsrechnung, +Calculate daily depreciation using total days in depreciation period,Tägliche Abschreibung anhand der Gesamttage im Abschreibungszeitraum berechnen, +Call Schedule Row {0}: To time slot should always be ahead of From time slot.,Anrufplanzeile {0}: Das Zeitfenster Bis sollte immer vor dem Zeitfenster Von liegen., +Cannot find a default warehouse for item {0}. Please set one in the Item Master or in Stock Settings.,Es wurde kein Standardlager für den Artikel {0} gefunden. Bitte legen Sie eines im Artikelstamm oder in den Lagereinstellungen fest., +Cannot {0} from {2} without any negative outstanding invoice,Kann nicht {0} von {2} ohne negative ausstehende Rechnung, +Cheques and Deposits Incorrectly cleared,Falsch verrechnete Schecks und Einzahlungen, +Columns are not according to template. Please compare the uploaded file with standard template,Die Spalten stimmen nicht mit der Vorlage überein. Bitte vergleichen Sie die hochgeladene Datei mit der Standardvorlage, +Company is mandatory,Unternehmen ist obligatorisch, +Completion Date can not be before Failure Date. Please adjust the dates accordingly.,Das Fertigstellungsdatum kann nicht vor dem Ausfalldatum liegen. Bitte passen Sie die Daten entsprechend an., +Consumed Stock Items or Consumed Asset Items are mandatory for creating new composite asset,Verbrauchte Lagerartikel oder verbrauchte Vermögensgegenstand-Artikel sind für die Erstellung obligatorisch, +Convert to Item Based Reposting,Umstellung auf artikelbasiertes Umbuchen, +Create Workstation,Arbeitsplatz erstellen, +Creating Journal Entries...,Journaleinträge erstellen..., +Creating Purchase Invoices ...,Eingangsrechnungen erstellen ..., +Creating Sales Invoices ...,Ausgangsrechnungen erstellen ..., +Currency Exchange Settings Result,Währungsumtauscheinstellungen Ergebnis, +Deal Owner,Besitzer des Deals, +Decapitalized,Dekapitalisiert, +Dependant SLE Voucher Detail No,Unterhaltsberechtigter SLE Beleg Detail Nr., +Disassemble,Demontage, +Documents: {0} have deferred revenue/expense enabled for them. Cannot repost.,Dokumente: {0} hat vertagte Einnahmen/Ausgaben aktiviert. Kann nicht erneut posten., +Don't Reserve Sales Order Qty on Sales Return,Menge des Auftrags nicht bei der Rücksendung reservieren, +Enter Manually,Manuell eingeben, +Failed to post depreciation entries,Abschreibungsbuchungen fehlgeschlagen, +Filters missing,Filter fehlen, +"For Return Invoices with Stock effect, '0' qty Items are not allowed. Following rows are affected: {0}",Bei Retourenrechnungen mit Lagereffekt sind Artikel mit einer Menge von '0' nicht zulässig. Folgende Zeilen sind betroffen: {0}, +"For the item {0}, the quantity should be {1} according to the BOM {2}.",Für den Artikel {0} sollte die Menge gemäß Stückliste {2} {1} betragen., +"For the {0}, no stock is available for the return in the warehouse {1}.",Für {0} ist im Lager {1} kein Bestand für die Retoure verfügbar., +Force-Fetch Subscription Updates,Abonnement-Updates erzwingen, +From Date is mandatory,Von-Datum ist obligatorisch, +From Prospect,Von Interessenten, +Gross Purchase Amount Too Low: {0} cannot be depreciated over {1} cycles with a frequency of {2} depreciations.,Bruttokaufbetrag zu niedrig: {0} kann nicht über {1} Zyklen mit einer Häufigkeit von {2} Abschreibungen abgeschrieben werden., +If enabled then system won't apply the pricing rule on the delivery note which will be create from the pick list,"Falls aktiviert, wird das System die Preisregel nicht auf den Lieferschein anwenden, der aus der Pickliste erstellt wird", +Impairment,Wertminderung, +Include Closed Orders,Geschlossene Aufträge/Bestellungen einbeziehen, +Invalid Allocated Amount,Ungültiger zugewiesener Betrag, +Invalid Amount,Ungültiger Betrag, +Is Standard,Ist Standard, +Item {0} does not exist.,Artikel {0} existiert nicht., +Items {0} do not exist in the Item master.,Artikel {0} sind nicht im Artikelstamm vorhanden., +Journal entries have been created,Journaleinträge wurden erstellt, +Net total calculation precision loss,Präzisionsverlust bei Berechnung der Nettosumme, +Only Deduct Tax On Excess Amount ,Nur den überschüssigen Betrag versteuern , +Payment Ledger Entry,Zahlungsbucheintrag, +Payment Requests cannot be created against: {0},Zahlungsanforderungen können nicht erstellt werden für: {0}, +Period Closing Entry For Current Period,Periodenabschlussbuchung für aktuelle Periode, +Provisional Account,Vorläufiges Konto, +Rate of Stock UOM,Einzelpreis der Lager-ME, +Raw Materials Consumption ,Rohstoffverbrauch , +Recalculating Purchase Cost against this Project...,Neuberechnung der Anschaffungskosten für dieses Projekt..., +Reference DocType,Referenz DocType, +Round Tax Amount Row-wise,Steuerbetrag zeilenweise runden, +Rounding gain/loss Entry for Stock Transfer,Rundungsgewinn/-verlustbuchung für Umlagerung, +Row #{0}: Only {1} available to reserve for the Item {2},Zeile #{0}: Nur {1} zur Reservierung für den Artikel {2} verfügbar, +Row #{}: The original Invoice {} of return invoice {} is not consolidated.,Zeile #{}: Die ursprüngliche Rechnung {} der Rechnungskorrektur {} ist nicht konsolidiert., +Row {0}: Item {1} must be a subcontracted item.,Zeile {0}: Artikel {1} muss ein an Dritte vergebener Artikel sein., +Row {0}: Please provide a valid Delivery Note Item or Packed Item reference.,Zeile {0}: Bitte geben Sie einen gültigen Lieferschein Artikel oder verpackten Artikel an., +Row {0}: Target Warehouse is mandatory for internal transfers,Zeile {0}: Ziellager ist für interne Transfers obligatorisch, +Row({0}): Outstanding Amount cannot be greater than actual Outstanding Amount {1} in {2},Zeile({0}): Ausstehender Betrag kann nicht größer sein als der tatsächliche ausstehende Betrag {1} in {2}, +Rows with Same Account heads will be merged on Ledger,Zeilen mit denselben Konten werden im Hauptbuch zusammengefasst, +Select Warehouses to get Stock for Materials Planning,"Wählen Sie Lager aus, um Bestände für die Materialplanung zu erhalten", +Select an invoice to load summary data,"Wählen Sie eine Rechnung aus, um die Zusammenfassung zu laden", +Serial / Batch Bundle,Serien- / Chargenbündel, +Serial / Batch Bundle Missing,Serien- / Chargenbündel fehlt, +Serial No Range,Seriennummernbereich, +Serial and Batch Details,Serien- und Chargendetails, +Sets 'Accepted Warehouse' in each row of the Items table.,Legt in jeder Zeile der Artikeltabelle das Annahmelager fest., +Sets 'Rejected Warehouse' in each row of the Items table.,Legt in jeder Zeile der Artikeltabelle das „Ausschusslager“ fest., +Shelf Life in Days,Haltbarkeitsdauer in Tagen, +Show Disabled Warehouses,Deaktivierte Lager anzeigen, +Show GL Balance,Hauptbuchsaldo anzeigen, +Show Pay Button in Purchase Order Portal,Schaltfläche „Bezahlen“ im Bestellportal anzeigen, +Show Taxes as Table in Print,Steuern als Tabelle im Druck anzeigen, +Show net values in opening and closing columns,Nettowerte in Eröffnungs- und Abschlussspalten anzeigen, +Show with upcoming revenue/expense,Mit kommenden Einnahmen/Ausgaben anzeigen, +Something went wrong please try again,"Etwas ist schief gelaufen, bitte versuchen Sie es erneut", +South Africa VAT Account,Südafrika Mehrwertsteuer-Konto, +South Africa VAT Settings,Südafrika Mehrwertsteuer-Einstellungen, +Start Date should be lower than End Date,Das Startdatum muss vor dem Enddatum liegen, +Start Deletion,Löschen starten, +Start Time can't be greater than or equal to End Time for {0}.,Die Startzeit kann nicht größer oder gleich der Endzeit für {0} sein., +Started a background job to create {1} {0},Hintergrundjob zum Erstellen von {1} {0} gestartet, +Status set to rejected as there are one or more rejected readings.,"Der Status wurde auf abgelehnt gesetzt, da es einen oder mehrere abgelehnte Messwerte gibt.", +Stock Consumed During Repair,Während der Reparatur verbrauchter Bestand, +Stock Consumption Details,Details zum Lagerverbrauch, +Stock Planning,Bestandsplanung, +Stock Reservation,Bestandsreservierung, +Stock Reservation Entries Cancelled,Bestandsreservierungen storniert, +Stock Reservation Entries Created,Bestandsreservierungen erstellt, +Stock Reservation Entry,Bestandsreservierungseintrag, +Stock Reservation Entry cannot be updated as it has been delivered.,"Der Bestandsreservierungseintrag kann nicht aktualisiert werden, da er bereits geliefert wurde.", +"Stock Reservation Entry created against a Pick List cannot be updated. If you need to make changes, we recommend canceling the existing entry and creating a new one.","Ein anhand einer Kommissionierliste erstellter Bestandsreservierungseintrag kann nicht aktualisiert werden. Wenn Sie Änderungen vornehmen müssen, empfehlen wir, den vorhandenen Eintrag zu stornieren und einen neuen zu erstellen.", +Stock Reservation can only be created against {0}.,Bestandsreservierungen können nur gegen {0} erstellt werden., +Stock Reserved Qty (in Stock UOM),Reservierter Bestand (in Lager-ME), +Stock Unreservation,Aufhebung der Bestandsreservierung, +Stock/Accounts can not be frozen as processing of backdated entries is going on. Please try again later.,"Lagerbestände/Konten können nicht eingefroren werden, da die Verarbeitung rückwirkender Einträge noch läuft. Bitte versuchen Sie es später erneut.", +Supplied Item,Gelieferter Artikel, +Supplies subject to the reverse charge provision,"Lieferungen, die der Reverse-Charge-Regelung unterliegen", +Task {0} depends on Task {1}. Please add Task {1} to the Tasks list.,Aufgabe {0} hängt von Aufgabe {1} ab. Bitte fügen Sie Aufgabe {1} zur Aufgabenliste hinzu., +Tax Amount will be rounded on a row(items) level,Der Steuerbetrag wird auf (Artikel-)Zeilenebene gerundet, +Tax Refunds provided to Tourists under the Tax Refunds for Tourists Scheme,Steuererstattungen für Touristen im Rahmen der Steuererstattungsregelung für Touristen, +"Tax detail table fetched from item master as a string and stored in this field. +Used for Taxes and Charges","Steuerdetailtabelle, die aus dem Artikelstamm als Zeichenfolge abgerufen und in diesem Feld gespeichert wird. +Wird für Steuern und Gebühren verwendet", +"The Payment Request {0} is already paid, cannot process payment twice","Die Auszahlungsanforderung {0} ist bereits bezahlt, die Zahlung kann nicht zweimal verarbeitet werden", +The Serial No at Row #{0}: {1} is not available in warehouse {2}.,Die Seriennummer in Zeile #{0}: {1} ist im Lager {2} nicht verfügbar., +The Work Order is mandatory for Disassembly Order,Der Arbeitsauftrag ist obligatorisch für den Demontageauftrag, +The allocated amount is greater than the outstanding amount of Payment Request {0},Der zugewiesene Betrag ist größer als der ausstehende Betrag der Zahlungsanforderung {0}, +The field {0} in row {1} is not set,Das Feld {0} in der Zeile {1} ist nicht gesetzt, +The following invalid Pricing Rules are deleted:,Die folgenden ungültigen Preisregeln werden gelöscht:, +The original invoice should be consolidated before or along with the return invoice.,Die Originalrechnung sollte vor oder zusammen mit der Erstattungsrechnung konsolidiert werden., +"The sync has started in the background, please check the {0} list for new records.",Die Synchronisierung wurde im Hintergrund gestartet. Bitte überprüfen Sie die Liste {0} auf neue Datensätze., +"The users with this Role are allowed to create/modify a stock transaction, even though the transaction is frozen.","Die Benutzer mit dieser Rolle dürfen eine Lagerbewegungen erstellen/ändern, auch wenn die Transaktion eingefroren ist.", +There are no active Fiscal Years for which Demo Data can be generated.,"Es gibt keine aktiven Geschäftsjahre, für die Demodaten erstellt werden können.", +There were issues unlinking payment entry {0}.,Es gab Probleme bei der Aufhebung der Verknüpfung der Zahlung {0}., +"This is enabled by default. If you want to plan materials for sub-assemblies of the Item you're manufacturing leave this enabled. If you plan and manufacture the sub-assemblies separately, you can disable this checkbox.","Diese Option ist standardmäßig aktiviert. Wenn Sie Materialien für Unterbaugruppen des Artikels, den Sie herstellen, planen möchten, lassen Sie diese Option aktiviert. Wenn Sie die Unterbaugruppen separat planen und herstellen, können Sie dieses Kontrollkästchen deaktivieren.", +To Date is mandatory,Bis Datum ist obligatorisch, +To Delivery Date,Bis Liefertermin, +To Due Date,Bis Fälligkeitsdatum, +To Reference Date,Bis Stichtag, +To cancel a {} you need to cancel the POS Closing Entry {}.,"Um einen {} zu stornieren, müssen Sie die POS-Abschlussbuchung {} stornieren.", +Total Incoming Value (Receipt),Gesamter eingehender Wert (Empfang), +Total Number of Booked Depreciations ,Gesamtzahl der gebuchten Abschreibungen , +Total Operation Time,Gesamtbetriebszeit, +Total Other Charges,Sonstige Kosten insgesamt, +Total Purchase Amount,Gesamtkaufbetrag, +Total Purchase Cost has been updated,Die Gesamteinkaufskosten wurden aktualisiert, +UnReconcile,Zuordnung aufheben, +Unrealized Profit / Loss account for intra-company transfers,Konto für nicht realisierte Gewinne/Verluste aus konzerninternen Transfers, +Unrealized Profit/Loss account for intra-company transfers,Konto für nicht realisierte Gewinne/Verluste aus konzerninternen Transfers, +Validate Components Quantities Per BOM,Anzahl der Komponenten pro Stückliste überprüfen, +Validate Pricing Rule,Preisregel validieren, +Validate Stock on Save,Lagerbestand beim Speichern validieren, +Warning on Negative Stock,Warnung vor negativem Bestand, +You cannot create a {0} within the closed Accounting Period {1},Sie können innerhalb der abgeschlossenen Abrechnungsperiode {1} kein(e) {0} erstellen, +dated {0},von {0}, +must be between 0 and 100,muss zwischen 0 und 100 liegen, +or its descendants,oder seine Nachkommen, +subscription is already cancelled.,abonnement ist bereits storniert., +{0} Account not found against Customer {1}.,{0} Konto für Kunde {1} nicht gefunden., +{0} Transaction(s) Reconciled,{0} Transaktion(en) Abgestimmt, +{0} cannot be zero,{0} kann nicht Null sein, +{0} is already running for {1},{0} läuft bereits für {1}, +{0} units of Item {1} is not available in any of the warehouses.,{0} Einheiten des Artikels {1} sind in keinem der Lager verfügbar., diff --git a/erpnext/translations/es.csv b/erpnext/translations/es.csv index 1b0468d2077..dcb95fe5466 100644 --- a/erpnext/translations/es.csv +++ b/erpnext/translations/es.csv @@ -8743,3 +8743,2528 @@ WhatsApp,WhatsApp, Make a call,Haz una llamada, Approve,Aprobar, Reject,Rechazar, + Address, Dirección, + Amount, Importe, + Is Child Table, Es una tabla secundaria, + Name, Nombre, + Rate, Precio, + Summary, Resumen, +"""SN-01::10"" for ""SN-01"" to ""SN-10""","""SN-01::10"" para ""SN-01"" a ""SN-10""", +# In Stock,# En stock, +# Req'd Items,# Artículos Requeridos, +% Finished Item Quantity,% Cantidad de Artículos Terminados, +% Occupied,% Ocupado, +% Picked,% Seleccionado, +% Process Loss,% Pérdida por Proceso, +% Returned,% Devuelto, +'Account' in the Accounting section of Customer {0},'Cuenta' en la sección Contabilidad de Cliente {0}, +'Allow Multiple Sales Orders Against a Customer's Purchase Order','Permitir múltiples órdenes de venta contra la orden de compra de un cliente', +'Default {0} Account' in Company {1},'Cuenta {0} Predeterminada' en la Compañía {1}, +'To Package No.' cannot be less than 'From Package No.','Al paquete n.°' no puede ser menor que 'Desde el paquete n.°', +'{0}' account is already used by {1}. Use another account.,La cuenta de '{0}' ya está siendo utilizada por {1}. Utilice otra cuenta., +'{0}' should be in company currency {1}.,'{0}' debe estar en la moneda de la empresa {1}., +(A) Qty After Transaction,(A) Cant. después de la transacción, +(B) Expected Qty After Transaction,(B) Cant. esperada después de la transacción, +(C) Total Qty in Queue,(C) Cant. total en cola, +(C) Total qty in queue,(C) Cant. total en cola, +(D) Balance Stock Value,(D) Valor del balance de las existencias, +(E) Balance Stock Value in Queue,(E) Valor del balance de las existencias en cola, +(F) Change in Stock Value,(F) Cambio en el Valor de Stock, +(G) Sum of Change in Stock Value,(G) Suma del Cambio en el Valor de Stock, +(H) Change in Stock Value (FIFO Queue),(H) Cambio en Valor de Stock (Cola FIFO), +(H) Valuation Rate,(H) Tasa de valoración, +(I) Valuation Rate,(I) Tasa de valoración, +(J) Valuation Rate as per FIFO,(J) Tasa de valoración según FIFO, +(K) Valuation = Value (D) ÷ Qty (A),(K) Valoración = Valor (D) ÷ Cant. (A), +", with the inventory {0}: {1}",", con el inventario {0}: {1}", +0-30 Days,0-30 días, +1000+,más de 1.000, +11-50,11 a 50, +3 Yearly,3 Anual, +30-60 Days,30-60 días, +60-90 Days,60-90 días, +90 Above,Superior a 90, +"
+

Note

+
    +
  • +You can use Jinja tags in Subject and Body fields for dynamic values. +
  • + All fields in this doctype are available under the doc object and all fields for the customer to whom the mail will go to is available under the customer object. +
+

Examples

+ +
    +
  • Subject:

    Statement Of Accounts for {{ customer.customer_name }}

  • +
  • Body:

    +
    Hello {{ customer.customer_name }},
    PFA your Statement Of Accounts from {{ doc.from_date }} to {{ doc.to_date }}.
  • +
+","
+

Nota

+
    +
  • +Puede usar las etiquetas Jinja en los campos Asunto y Cuerpo para valores dinámicos. +
  • + Todos los campos de este doctype están disponibles en el objeto doc y todos los campos del cliente al que se enviará el correo están disponibles en el objeto customer . +
+

Ejemplos

+ +
    +
  • Asunto:

    Estado de Cuentas para {{ customer.customer_name }}

  • +
  • Cuerpo:

    +
    Hola {{ customer.customer_name }},
    PFA tu Estado de Cuenta del {{ doc.from_date }} al {{ doc.to_date }}.
  • +
+", +"
Other Details
","
Otros detalles
", +"
No Matching Bank Transactions Found
","
No se han encontrado transacciones bancarias coincidentes
", +"
+

All dimensions in centimeter only

+
","
+

Todas las dimensiones solo en centímetros

+
", +"

About Product Bundle

+ +

Aggregate group of Items into another Item. This is useful if you are bundling a certain Items into a package and you maintain stock of the packed Items and not the aggregate Item.

+

The package Item will have Is Stock Item as No and Is Sales Item as Yes.

+

Example:

+

If you are selling Laptops and Backpacks separately and have a special price if the customer buys both, then the Laptop + Backpack will be a new Product Bundle Item.

","

Acerca de la agrupación de productos

+ +

Agregue un grupo de Artículos en otro Artículo. Esto es útil si está agrupando ciertos Artículos en un paquete y mantiene existencias de los Artículos empaquetados y no del Artículo agregado.

+

El Artículo del paquete tendrá Es Artículo de Stock como No y Es Artículo de Venta como .

+

Ejemplo:

+

Si está vendiendo Portátiles y Mochilas por separado y tiene un precio especial si el cliente compra ambos, entonces el Portátil + Mochila será un nuevo Artículo de Paquete de Productos.

", +"

Currency Exchange Settings Help

+

There are 3 variables that could be used within the endpoint, result key and in values of the parameter.

+

Exchange rate between {from_currency} and {to_currency} on {transaction_date} is fetched by the API.

+

Example: If your endpoint is exchange.com/2021-08-01, then, you will have to input exchange.com/{transaction_date}

","

Ayuda para la configuración del cambio de divisas

+

Hay 3 variables que se pueden utilizar dentro del endpoint, clave de resultado y en valores del parámetro.

+

El tipo de cambio entre {from_currency} y {to_currency} en {transaction_date} es obtenido por la API.

+

Ejemplo: Si su endpoint es exchange.com/2021-08-01, entonces, tendrá que introducir exchange.com/{transaction_date}

", +"

Body Text and Closing Text Example

+ +
We have noticed that you have not yet paid invoice {{sales_invoice}} for {{frappe.db.get_value(""Currency"", currency, ""symbol"")}} {{outstanding_amount}}. This is a friendly reminder that the invoice was due on {{due_date}}. Please pay the amount due immediately to avoid any further dunning cost.
+ +

How to get fieldnames

+ +

The fieldnames you can use in your template are the fields in the document. You can find out the fields of any documents via Setup > Customize Form View and selecting the document type (e.g. Sales Invoice)

+ +

Templating

+ +

Templates are compiled using the Jinja Templating Language. To learn more about Jinja, read this documentation.

","

Ejemplo de cuerpo de texto y texto de cierre

+ +
Hemos observado que aún no ha pagado la factura {{sales_invoice}} correspondiente a {{frappe.db.get_value(""Currency"", currency, ""symbol"")}} {{outstanding_amount}}. Este es un recordatorio amistoso de que la factura vencía el {{due_date}}. Le rogamos que abone inmediatamente el importe adeudado para evitar posibles gastos de reclamación.
+ +

Cómo obtener nombres de campo

+ +

Los nombres de campo que puede utilizar en su plantilla son los campos del documento. Puede averiguar los campos de cualquier documento a través de Configuración > Personalizar vista de formulario y seleccionando el tipo de documento (por ejemplo, Factura de venta)

+ +

Plantillas

+ +

Las plantillas se compilan utilizando el lenguaje de plantillas Jinja. Para saber más sobre Jinja, lea esta documentación.

", +"

Contract Template Example

+ +
Contract for Customer {{ party_name }}
+
+-Valid From : {{ start_date }} 
+-Valid To : {{ end_date }}
+
+ +

How to get fieldnames

+ +

The field names you can use in your Contract Template are the fields in the Contract for which you are creating the template. You can find out the fields of any documents via Setup > Customize Form View and selecting the document type (e.g. Contract)

+ +

Templating

+ +

Templates are compiled using the Jinja Templating Language. To learn more about Jinja, read this documentation.

","

Ejemplo de plantilla de contrato

+ +
Contrato para cliente {{ party_name }}
+
+-Válido desde : {{ start_date }} 
+-Válido hasta : {{ end_date }}
+
+ +

Cómo obtener los nombres de campo

+ +

Los nombres de campo que puede utilizar en su Plantilla de Contrato son los campos del Contrato para el que está creando la plantilla. Puede averiguar los campos de cualquier documento a través de Configuración > Personalizar vista de formulario y seleccionando el tipo de documento (por ejemplo, Contrato)

+ +

Creación de plantillas

+ +

Las plantillas se compilan utilizando el lenguaje de plantillas Jinja. Para saber más sobre Jinja, lea esta documentación.

", +"

Standard Terms and Conditions Example

+ +
Delivery Terms for Order number {{ name }}
+
+-Order Date : {{ transaction_date }} 
+-Expected Delivery Date : {{ delivery_date }}
+
+ +

How to get fieldnames

+ +

The fieldnames you can use in your email template are the fields in the document from which you are sending the email. You can find out the fields of any documents via Setup > Customize Form View and selecting the document type (e.g. Sales Invoice)

+ +

Templating

+ +

Templates are compiled using the Jinja Templating Language. To learn more about Jinja, read this documentation.

","

Ejemplo de condiciones generales

+ +
Condiciones de entrega para el número de pedido {{ name }}
+
+-Fecha de pedido : {{ transaction_date }} 
+-Fecha de entrega prevista : {{ delivery_date }}
+
+ +

Cómo obtener los nombres de campo

+ +

Los nombres de campo que puede utilizar en su plantilla de correo electrónico son los campos del documento desde el que está enviando el correo electrónico. Puede averiguar los campos de cualquier documento a través de Configuración > Personalizar vista de formulario y seleccionando el tipo de documento (por ejemplo, Factura de venta)

+ +

Plantillas

+ +

Las plantillas se compilan utilizando el lenguaje de plantillas Jinja. Para saber más sobre Jinja, lea esta documentación.

", +"
Or
","
O
", +"","", +"","", +"","", +"

In your Email Template, you can use the following special variables: +

+
    +
  • + {{ update_password_link }}: A link where your supplier can set a new password to log into your portal. +
  • +
  • + {{ portal_link }}: A link to this RFQ in your supplier portal. +
  • +
  • + {{ supplier_name }}: The company name of your supplier. +
  • +
  • + {{ contact.salutation }} {{ contact.last_name }}: The contact person of your supplier. +
  • + {{ user_fullname }}: Your full name. +
  • +
+

+

Apart from these, you can access all values in this RFQ, like {{ message_for_supplier }} or {{ terms }}.

","

En su plantilla de correo electrónico, puede utilizar las siguientes variables especiales: +

+
    +
  • + {{ update_password_link }}: Un enlace donde su proveedor puede establecer una nueva contraseña para acceder a su portal. +
  • +
  • + {{ portal_link }}: Un enlace a esta petición de oferta en su portal de proveedores. +
  • +
  • + {{ supplier_name }}: El nombre de la empresa de su proveedor. +
  • +
  • + {{ contact.salutation }} {{ contact.last_name }}: La persona de contacto de su proveedor. +
  • + {{ user_fullname }}: Su nombre completo. +
  • +
+

+

Aparte de éstos, puede acceder a todos los valores de esta petición de oferta, como {{ message_for_supplier }} o {{ terms }}.

", +"
Message Example
+ +<p> Thank You for being a part of {{ doc.company }}! We hope you are enjoying the service.</p> + +<p> Please find enclosed the E Bill statement. The outstanding amount is {{ doc.grand_total }}.</p> + +<p> We don't want you to be spending time running around in order to pay for your Bill.
After all, life is beautiful and the time you have in hand should be spent to enjoy it!
So here are our little ways to help you get more time for life! </p> + +<a href=""{{ payment_url }}""> click here to pay </a> + +
+","
Ejemplo de mensaje
+ +<p> ¡Gracias por formar parte de {{ doc.company }}! Esperamos que esté disfrutando del servicio.</p> + +<p> Le adjuntamos el extracto de la factura E. El importe pendiente es de {{ doc.grand_total }}.</p> + +<p> No queremos que pierda tiempo dando vueltas para pagar su Factura.
¡Después de todo, la vida es bella y el tiempo de que dispone debe emplearlo en disfrutarla!
¡Así que aquí tiene nuestras pequeñas maneras de ayudarle a tener más tiempo para la vida! </p> + +<a href=""{{ payment_url }}""> pulse aquí para pagar </a> + +
+", +"
Message Example
+ +<p>Dear {{ doc.contact_person }},</p> + +<p>Requesting payment for {{ doc.doctype }}, {{ doc.name }} for {{ doc.grand_total }}.</p> + +<a href=""{{ payment_url }}""> click here to pay </a> + +
+","
Ejemplo de mensaje
+ +<p>Estimado {{ doc.contact_person }},</p> + +<p>Solicitando pago por {{ doc.doctype }}, {{ doc.name }} por {{ doc.grand_total }}.</p> + +<a href=""{{ payment_url }}""> Haga clic aquí para pagar </a> + +
+", +"Masters & Reports","Datos Maestros & Informes", +"Quick Access","Acceso rápido", +"Reports & Masters","Informes y Datos Maestros", +"Reports & Masters","Informes & Datos Maestros", +"Settings","Configuración", +"Shortcuts","Accesos directos", +"Your Shortcuts + + + + + + ","Tus accesos directos + + + + + + ", +"Your Shortcuts","Tus accesos directos", +Grand Total: {0},Total general: {0}, +Outstanding Amount: {0},Importe pendiente: {0}, +"
{d.batch_no}{d.serial_no}{abs(d.qty)}
{d.batch_no}{d.serial_no}{abs(d.qty)}
{d.batch_no}{abs(d.qty)}
+ + + + + + + + + + + + + + + + + +
Child DocumentNon Child Document
+

To access parent document field use parent.fieldname and to access child table document field use doc.fieldname

+ +
+

To access document field use doc.fieldname

+
+

Example: parent.doctype == ""Stock Entry"" and doc.item_code == ""Test""

+ +
+

Example: doc.doctype == ""Stock Entry"" and doc.purpose == ""Manufacture""

+
+ + + + + + +"," + + + + + + + + + + + + + + + + + +
Documento secundarioDocumento no secundario
+

Para acceder al campo del documento principal, utilice parent.fieldname y para acceder al campo del documento de la tabla secundaria, utilice doc.fieldname

+ +
+

Para acceder al campo del documento, utilice doc.fieldname

+
+

Ejemplo: parent.doctype == ""Entrada de stock"" y doc.item_code == ""Prueba""

+ +
+

Ejemplo: doc.doctype == ""Entrada de stock"" y doc.purpose == ""Fabricación""

+
+ + + + + + +", +A - B,A-B, +A - C,A-C, +A Holiday List can be added to exclude counting these days for the Workstation.,Se puede añadir una lista de días festivos para excluir el cómputo de estos días para el puesto de trabajo., +A Packing Slip can only be created for Draft Delivery Note.,Solo se puede crear un albarán para un borrador de nota de entrega., +"A Price List is a collection of Item Prices either Selling, Buying, or both","Una lista de precios es una colección de Precios de Productos, ya sea de Venta, de Compra o ambos", +A Reconciliation Job {0} is running for the same filters. Cannot reconcile now,Se está ejecutando un trabajo de reconciliación {0} para los mismos filtros. No se puede reconciliar ahora., +A Transaction Deletion Document: {0} is triggered for {0},Un documento de borrado de transacciones: {0} se activa para {0}, +A customer must have primary contact email.,Un cliente debe tener un correo electrónico de contacto principal., +A driver must be set to submit.,Debe seleccionar un conductor antes de confirmar., +A template with tax category {0} already exists. Only one template is allowed with each tax category,Ya existe una plantilla con categoría de impuestos {0}. Sólo se permite una plantilla con cada categoría de impuestos, +API Details,Detalles de la API, +AWB Number,Número AWB, +Abbreviation: {0} must appear only once,Abreviación: {0} debe aparecer sólo una vez, +About Us Settings,Configuración de información de la compañía, +About {0} minute remaining,Quedan aproximadamente {0} minutos, +About {0} minutes remaining,Quedan aproximadamente {0} minutos, +About {0} seconds remaining,Quedan aproximadamente {0} segundos, +Acceptance Criteria Formula,Fórmula de Criterio de Aceptación, +Acceptance Criteria Value,Valor de los Criterios de Aceptación, +Accepted Qty in Stock UOM,Cantidad Aceptada en UdM de Stock, +Access Key,Clave de Acceso, +Access Key is required for Service Provider: {0},Se requiere clave de acceso para el proveedor de servicios: {0}, +Account Balance (From),Saldo de cuenta (Desde), +Account Balance (To),Saldo de cuenta (Para), +Account Closing Balance,Balance de Cierre de Cuenta, +Account Currency (From),Moneda de la Cuenta (De), +Account Currency (To),Divisa de la Cuenta (De), +Account Opening Balance,Saldo de Apertura de Cuenta, +Account not Found,Cuenta no encontrada, +Account {0} added multiple times,Cuenta {0} agregada varias veces, +Accounting Dimension Filter,Filtro de dimensión contable, +Accounting Dimensions Filter,Filtro de dimensiones contables, +Accounting Entry for {0},Entrada contable para {0}, +Accounts Closing,Cierre de Cuentas, +Accounts Missing Error,Error de Cuentas Faltantes, +Accounts Receivable/Payable,Cuentas por Cobrar/Pagar, +Accounts to Merge,Cuentas a fusionar, +Action If Quality Inspection Is Rejected,Acción si se rechaza la inspección de calidad, +Action If Same Rate is Not Maintained,Acción si no se mantiene la misma tasa, +Action if Same Rate is Not Maintained Throughout Sales Cycle,Si no se mantiene la misma tarifa durante todo el ciclo de ventas, +Active Status,Estado activo, +Actual Balance Qty,Cantidad de Saldo Actual, +Actual Expense,Gasto actual, +Actual Posting,Asiento Actual, +Actual Qty in Warehouse,Cantidad real en Almacén, +Actual Time,Tiempo actual, +Add Columns in Transaction Currency,Añadir Columnas en Moneda de Transacción, +Add Corrective Operation Cost in Finished Good Valuation,Añadir Costo de Operación Correctiva en la Valoración de Productos Terminados, +Add Discount,Agregar descuento, +Add Items in the Purpose Table,Añadir Elementos en la Tabla de Propósitos, +Add Lead to Prospect,Añadir cliente potencial a prospecto, +Add Local Holidays,Agregar días festivos locales, +Add Manually,Añadir manualmente, +Add Or Deduct,Añadir o deducir, +Add Serial / Batch Bundle,Añadir Nro. Serie/Lote, +Add Serial / Batch No,Añadir Nro Serie/Lote, +Add Serial / Batch No (Rejected Qty),Añadir Nro Serie/Lote (Cant Rechazada), +Add Stock,Añadir Inventario, +Add Sub Assembly,Añadir sub ensamblaje, +Add Template,Añadir plantilla, +Add a Note,Añadir Nota, +Add details,Añadir detalles, +Add to Prospect,Añadir a prospectos, +Added By,Añadido por, +Added On,Añadido el, +Added Supplier Role to User {0}.,Añadido el Rol de Proveedor al Usuario {0}., +Added {1} Role to User {0}.,Se agregó el Rol {1} al Usuario {0}., +Adding Lead to Prospect...,Agregando cliente potencial a prospecto..., +Additional,Adicional, +Additional Asset Cost,Costo Adicional del Activo, +Additional Cost Per Qty,Costo adicional por cantidad, +Additional Info,Información Adicional, +Address And Contacts,Dirección y Contactos, +Adjust Asset Value,Ajustar el valor del activo, +Adjustment Against,Ajuste contra, +Adjustment based on Purchase Invoice rate,Ajuste basado en la tarifa de la Factura de Compra, +Advance Account: {0} must be in either customer billing currency: {1} or Company default currency: {2},La cuenta de anticipo: {0} debe estar en la moneda de facturación del cliente: {1} o en la moneda predeterminada de la empresa: {2}, +Advance Payment,Pago adelantado, +Advance Tax,Impuesto anticipado, +Advance Taxes and Charges,Impuestos y Cargos anticipados, +Advance paid against {0} {1} cannot be greater than Grand Total {2},El anticipo pagado contra {0} {1} no puede ser mayor que el total general {2}., +Advance payments allocated against orders will only be fetched,Los pagos anticipados asignados a pedidos solo se recuperarán., +Affected Transactions,Transacciones Afectadas, +Against Customer Order {0},Contra pedido del cliente {0}, +Against Supplier Invoice {0},Contra factura del proveedor {0}, +Against Voucher No,Contra el Número de Comprobante, +Age ({0}),Edad ({0}), +Ageing Range,Rango de antigüedad, +Agent Busy Message,Mensaje de agente ocupado, +Agent Group,Grupo de agentes, +Agent Unavailable Message,Mensaje de agente no disponible, +Aggregate a group of Items into another Item. This is useful if you are maintaining the stock of the packed items and not the bundled item,Agregue un grupo de Artículos en otro Artículo. Esto es útil si está manteniendo el stock de los artículos empaquetados y no del artículo agrupado, +Algorithm,Algoritmo, +All Activities,Todas las Actividades, +All Activities HTML,Todas las actividades HTML, +All Items,Todos los Productos, +All Sales Transactions can be tagged against multiple Sales Persons so that you can set and monitor targets.,Todas las transacciones de ventas se pueden etiquetar contra varias personas de ventas para que pueda establecer y supervisar los objetivos., +All allocations have been successfully reconciled,Todas las asignaciones se han reconciliado con éxito., +All items have already been received,Todos los artículos ya han sido recibidos, +All items in this document already have a linked Quality Inspection.,Todos los artículos de este documento ya tienen una Inspección de Calidad vinculada., +All the Comments and Emails will be copied from one document to another newly created document(Lead -> Opportunity -> Quotation) throughout the CRM documents.,Todos los comentarios y correos electrónicos se copiarán de un documento a otro recién creado (Cliente potencial -> Oportunidad -> Oferta) en todos los documentos del CRM., +"All the required items (raw materials) will be fetched from BOM and populated in this table. Here you can also change the Source Warehouse for any item. And during the production, you can track transferred raw materials from this table.","Todos los artículos necesarios (materias primas) se obtendrán de la lista de materiales y se rellenarán en esta tabla. Aquí también puede cambiar el Almacén de Origen para cualquier artículo. Y durante la producción, puede hacer un seguimiento de las materias primas transferidas desde esta tabla.", +Allocate Payment Request,Asignar solicitud de pago, +Allocated Entries,Entradas Asignadas, +Allocated To:,Asignado a:, +Allocations,Asignaciones, +Allow,Permitir, +Allow Alternative Item must be checked on Item {},Permitir elemento alternativo debe estar marcado en Elemento {}, +Allow Continuous Material Consumption,Permitir el consumo continuo de material, +Allow Excess Material Transfer,Permitir la transferencia de material sobrante, +Allow Internal Transfers at Arm's Length Price,Permitir Transferencias Internas a Precio de Mercado, +Allow Item to be Added Multiple Times in a Transaction,Permitir que un artículo se añada varias veces en una transacción, +Allow Lead Duplication based on Emails,Permitir la duplicación de clientes potenciales basada en correos electrónicos, +Allow Negative rates for Items,Permitir tarifas negativas para Productos, +Allow Or Restrict Dimension,Permitir o Restringir dimensión, +Allow Partial Reservation,Permitir reserva parcial, +Allow Purchase,Permitir Compra, +Allow Sales,Permitir Ventas, +Allow Sales Order Creation For Expired Quotation,Permitir la creación de Órdenes de Venta para Cotizaciones vencidas, +Allow User to Edit Discount,Permitir al usuario editar el descuento, +Allow User to Edit Rate,Permitir al usuario editar la tarifa, +Allow Zero Rate,Permitir Tarifa Cero, +Allow material consumptions without immediately manufacturing finished goods against a Work Order,Permitir consumos de material sin fabricar inmediatamente productos acabados contra una Orden de Trabajo, +Allow multi-currency invoices against single party account ,Permitir facturas en múltiples monedas contra una cuenta de una sola parte., +Allow to Edit Stock UOM Qty for Purchase Documents,Permitir editar la cantidad de UdM de stock para documentos de compras, +Allow to Edit Stock UOM Qty for Sales Documents,Permitir editar la cantidad de UdM de stock para documentos de ventas, +Allow transferring raw materials even after the Required Quantity is fulfilled,Permitir la transferencia de materias primas incluso después de cumplir la cantidad requerida, +Allowed,Permitido, +Allowed Dimension,Dimensión permitida, +Allowed Doctypes,Doctypes permitidos, +Allowed Items,Productos Permitidos, +Allowed primary roles are 'Customer' and 'Supplier'. Please select one of these roles only.,"Los roles principales permitidos son 'Cliente' y 'Proveedor'. Por favor, seleccione sólo uno de estos roles.", +Allows to keep aside a specific quantity of inventory for a particular order.,Permite reservar una cantidad específica de existencias para un pedido concreto., +Already Picked,Ya ha sido seleccionado, +Alternative Items,Ítems Alternativos, +"Alternatively, you can download the template and fill your data in.",También puede descargar la plantilla y rellenar sus datos., +Amount (AED),Importe del impuesto (AED), +Amount Eligible for Commission,Importe elegible para la comisión, +Amount in Account Currency,Importe en Moneda de la Cuenta, +Amount in party's bank account currency,Importe en la divisa de la cuenta bancaria., +Amount in transaction currency,Importe en la divisa de la transacción, +An Item Group is a way to classify items based on types.,Un Grupo de Producto es una forma de clasificar Productos según sus tipos., +An error has been appeared while reposting item valuation via {0},Se ha producido un error al volver a publicar la valoración del artículo a través de {0}, +An error has occurred during {0}. Check {1} for more details,Se ha producido un error durante {0}. Consulte {1} para obtener más detalles.,Error Log +Annual Revenue,Ingresos Anuales, +"Another Cost Center Allocation record {0} applicable from {1}, hence this allocation will be applicable upto {2}","Otro registro de Asignación de Centro de Coste {0} aplicable desde {1}, por lo tanto esta asignación será aplicable hasta {2}", +"Any one of following filters required: warehouse, Item Code, Item Group","Se requiere cualquiera de los siguientes filtros: almacén, código de artículo, grupo de artículos", +Applicable Dimension,Dimensión aplicable, +Applicable On Account,Aplicable en Cuenta, +Applied on each reading.,Se aplica en cada lectura., +Applied putaway rules.,Reglas de almacenamiento aplicadas., +Apply Putaway Rule,Aplicar la regla de almacenamiento, +Apply Recursion Over (As Per Transaction UOM),Aplicar recursión sobre (según UdM de transacción), +Apply SLA for Resolution Time,Aplicar SLA para el tiempo de resolución, +Apply TDS,Aplicar a, +Apply Tax Withholding Amount ,Aplicar Monto de Retención de Impuestos , +Apply restriction on dimension values,Aplicar restricción a los valores de dimensión, +Apply to All Inventory Documents,Aplicar a todos los documentos de inventario, +Apply to Document,Aplicar al documento, +Appointment Created Successfully,Cita creada exitosamente, +Appointment Scheduling Disabled,Programación de citas deshabilitada, +Appointment Scheduling has been disabled for this site,La programación de citas ha sido desactivada para este sitio, +Appointment was created. But no lead was found. Please check the email to confirm,"Se creó la cita, pero no se encontró ningún cliente potencial. Por favor, revise el correo electrónico para confirmar.", +Approximately match the description/party name against parties,Comparar aproximadamente la descripción/nombre de la parte con las partes., +Are you sure you want to clear all demo data?,¿Está seguro de que desea borrar todos los datos de la demostración?, +Are you sure you want to delete this Item?,¿Está seguro de que desea borrar este elemento?, +Are you sure you want to restart this subscription?,¿Está seguro de que desea reiniciar esta suscripción?, +As on Date,A fecha, +"As there are existing submitted transactions against item {0}, you can not change the value of {1}.","Como ya existen transacciones validadas contra el artículo {0}, no puede cambiar el valor de {1}.", +"As there are negative stock, you can not enable {0}.","Como hay existencias negativas, no puede habilitar {0}.", +"As there are reserved stock, you cannot disable {0}.","Como hay stock reservado, no puedes desactivar {0}.", +"As there are sufficient Sub Assembly Items, Work Order is not required for Warehouse {0}.","Dado que hay suficientes artículos de sub ensamblaje, no se requiere una orden de trabajo para el almacén {0}.", +"As {0} is enabled, you can not enable {1}.","Como {0} está habilitado, no puedes habilitar {1}.", +Assembly Items,Artículos de montaje, +Asset Activity,Actividad de Activos, +Asset Capitalization,Capitalización de Activos, +Asset Capitalization Asset Item,Elemento de Capitalización de Activos, +Asset Capitalization Service Item,Elemento de servicio de capitalización de activos, +Asset Capitalization Stock Item,Elemento de stock de capitalización de activos, +Asset Depreciation Details,Detalles de depreciación de activos, +Asset Depreciation Schedule,Calendario de depreciación de activos, +Asset Depreciation Schedule for Asset {0} and Finance Book {1} is not using shift based depreciation,Calendario de depreciación de activos para el activo {0} y el libro de finanzas {1} no está utilizando la depreciación por turnos, +Asset Depreciation Schedule not found for Asset {0} and Finance Book {1},El Calendario de amortización de activos no encontrado para el activo {0} y el libro de finanzas {1}, +Asset Depreciation Schedule {0} for Asset {1} already exists.,El Calendario de amortización de activos {0} para el activo {1} ya existe., +Asset Depreciation Schedule {0} for Asset {1} and Finance Book {2} already exists.,El Calendario de Depreciación de Activos {0} para el Activo {1} y el Libro Financiero {2} ya existe., +"Asset Depreciation Schedules created:
{0}

Please check, edit if needed, and submit the Asset.","Programas de depreciación de activos creados:
{0}

Verifique, edite si es necesario y valide el activo.", +Asset ID,Id de Activo, +Asset Quantity,Cantidad de Activos, +Asset Repair Consumed Item,Artículo Consumido en Reparación de Activos, +Asset Settings,Configuración de Activos, +Asset Shift Allocation,Asignación de Turnos de Activos, +Asset Shift Factor,Factor de cambio de activos, +Asset Shift Factor {0} is set as default currently. Please change it first.,El factor de cambio de activos {0} está configurado como predeterminado actualmente. Cámbielo primero., +Asset cancelled,Activo cancelado, +Asset capitalized after Asset Capitalization {0} was submitted,El Activo capitalizado fue validado después de la Capitalización de Activos {0}, +Asset created,Activo creado, +Asset created after Asset Capitalization {0} was submitted,El Activo creado fue validado después del la Capitalización de Activos {0}, +Asset created after being split from Asset {0},Activo creado después de ser separado del Activo {0}, +Asset decapitalized after Asset Capitalization {0} was submitted,El Activo descapitalizado fue validado después de la Capitalización de Activos {0}, +Asset deleted,Activo eliminado, +Asset issued to Employee {0},Activo emitido al empleado {0}, +Asset out of order due to Asset Repair {0},Activo fuera de servicio debido a la reparación del activo {0}, +Asset received at Location {0} and issued to Employee {1},Activo recibido en el lugar {0} y entregado al empleado {1}, +Asset restored,Activo restituido, +Asset restored after Asset Capitalization {0} was cancelled,Activo restituido después de la Capitalización de Activos {0} fue cancelada, +Asset returned,Activo devuelto, +Asset scrapped,Activo desechado, +Asset sold,Activo vendido, +Asset submitted,Activo validado, +Asset transferred to Location {0},Activo transferido a la ubicación {0}, +Asset updated after being split into Asset {0},Activo actualizado tras ser dividido en Activo {0}, +Asset updated after cancellation of Asset Repair {0},Activo actualizado tras la anulación de la reparación de activos {0}, +Asset updated after completion of Asset Repair {0},Activo actualizado tras la finalización de la reparación del activo {0}, +Asset {0} cannot be received at a location and given to an employee in a single movement,El activo {0} no puede recibirse en un lugar y entregarse a un empleado en un solo movimiento, +Asset {0} does not belong to Item {1},Activo {0} no pertenece al Producto {1}, +Asset {0} does not exist,Activo {0} no existe, +Asset {0} has been created. Please set the depreciation details if any and submit it.,"Se ha creado el activo {0}. Por favor, establezca los detalles de depreciación si los hay y valídelo.", +Asset {0} has been updated. Please set the depreciation details if any and submit it.,"El activo {0} ha sido actualizado. Por favor, establezca los detalles de depreciación si los hay y valídelo.", +Asset's depreciation schedule updated after Asset Shift Allocation {0},Calendario de amortización del activo actualizado tras la asignación del cambio de activo {0}, +Asset's value adjusted after cancellation of Asset Value Adjustment {0},Valor del activo ajustado tras la cancelación del ajuste del valor del activo {0}, +Asset's value adjusted after submission of Asset Value Adjustment {0},Valor del activo ajustado tras la presentación del ajuste del valor del activo {0}, +Assign Job to Employee,Asignar trabajo a un empleado, +Assignment,Asignación, +Assignment Conditions,Condiciones de asignación, +At Row #{0}: The picked quantity {1} for the item {2} is greater than available stock {3} for the batch {4} in the warehouse {5}.,En la fila #{0}: La cantidad seleccionada {1} para el artículo {2} es mayor que el stock disponible {3} para el lote {4} en el almacén {5}., +At Row #{0}: The picked quantity {1} for the item {2} is greater than available stock {3} in the warehouse {4}.,En la fila #{0}: La cantidad seleccionada {1} para el artículo {2} es mayor que el stock disponible {3} en el almacén {4}., +At row {0}: Batch No is mandatory for Item {1},En la fila {0}: el Núm. de Lote es obligatorio para el Producto {1}, +At row {0}: Parent Row No cannot be set for item {1},En la fila {0}: No se puede establecer el nº de fila padre para el artículo {1}, +At row {0}: Qty is mandatory for the batch {1},En la fila {0}: La cant. es obligatoria para el lote {1}, +At row {0}: Serial No is mandatory for Item {1},En la fila {0}: el Núm. Serial es obligatorio para el Producto {1}, +At row {0}: Serial and Batch Bundle {1} has already created. Please remove the values from the serial no or batch no fields.,"En la fila {0}: El paquete de serie y lote {1} ya está creado. Por favor, elimine los valores de los campos nº de serie o nº de lote.", +At row {0}: set Parent Row No for item {1},En la fila {0}: establezca el nº de fila padre para el artículo {1}, +Attach CSV File,Adjuntar archivo CSV, +Attendance & Leaves,Asistencia y Salidas, +Attribute value: {0} must appear only once,Valor del atributo: {0} debe aparecer sólo una vez, +Auto Create Exchange Rate Revaluation,Creación automática de la revalorización del Tipo de Cambio, +Auto Create Purchase Receipt,Creación automática de Recibo de Compra, +Auto Create Serial and Batch Bundle For Outward,Crear Automáticamente Lote y Serie para Salida, +Auto Create Subcontracting Order,Crear orden de subcontratación automáticamente, +Auto Created Serial and Batch Bundle,Creación automática de series y lotes, +Auto Creation of Contact,Creación automática de Contacto, +Auto Email Report,Reporte de Correo Electrónico Automático, +Auto Insert Item Price If Missing,Insertar automáticamente el precio del artículo si falta, +Auto Name,Nombre Automático, +Auto Reconcile,Reconciliación Automática, +Auto Reconcile Payments,Reconciliación Automática de Pagos, +Auto Reconciliation,Reconciliación Automática, +Auto Reconciliation of Payments has been disabled. Enable it through {0},Reconciliación automática de pagos ha sido desactivada. Habilítelo a través de {0}, +Auto Reserve Serial and Batch Nos,Reserva automática de números de serie y de lote, +Auto Reserve Stock for Sales Order on Purchase,Reserva automática de stock para órdenes de venta en el momento de la compra, +Auto close Opportunity Replied after the no. of days mentioned above,Cierre automático Oportunidad Respondida después del número de días mencionado anteriormente, +Auto match and set the Party in Bank Transactions,Coincidencia automática y fijación de la entidad en las Transacciones Bancarias, +Auto write off precision loss while consolidation,Cancelación automática de la pérdida de precisión durante la consolidación, +Automatically Add Filtered Item To Cart,Añadir automáticamente el artículo filtrado a la cesta, +Automatically Fetch Payment Terms from Order,Obtenga automáticamente las condiciones de pago del pedido, +Automatically post balancing accounting entry,Registrar automáticamente el asiento contable de balance, +Available Batch Report,Informe de lotes disponibles, +Available Qty For Consumption,Cantidad disponible para consumo, +Available Qty at Company,Cant. disponible en Compañía, +Available Qty at Target Warehouse,Cantidad disponible en Almacén de destino, +Available Qty to Reserve,Cantidad disponible para reservar, +Average Completion,Promedio de completado, +Avg Rate,Tasa promedio, +Avg Rate (Balance Stock),Tasa media (Balance Stock), +BFS,BFS (Búsqueda en Amplitud), +BIN Qty,Cant. BIN, +BOM Created,LdM Creado, +BOM Creator,Creador LdM, +BOM Creator Item,Creador de elementos de lista de materiales, +BOM Info,Información de LdM, +BOM Level,Nivel de lista de materiales, +BOM Tree,Árbol LdM, +BOM UoM,LdM UdM, +BOM Update Batch,Lote de actualización de lista de materiales, +BOM Update Initiated,Actualización de lista de materiales iniciada, +BOM Update Log,Registro de actualización de lista de materiales, +BOM Update Tool Log with job status maintained,Registro de la herramienta de actualización de lista de materiales con el estado del trabajo mantenido, +BOM Updation already in progress. Please wait until {0} is complete.,La actualización de la lista de materiales ya está en curso. Espere hasta que se complete {0} ., +BOM Updation is queued and may take a few minutes. Check {0} for progress.,La actualización de la lista de materiales está en cola y puede tardar unos minutos. Verifique {0} para ver el progreso., +BOM and Production,Lista de materiales y producción, +BOM recursion: {1} cannot be parent or child of {0},Recursión de la lista de materiales: {1} no puede ser padre o hijo de {0}, +BOMs Updated,Listas de materiales actualizadas, +BOMs created successfully,Listas de materiales creadas con éxito, +BOMs creation failed,La creación de listas de materiales falló, +"BOMs creation has been enqueued, kindly check the status after some time","La creación de listas de materiales se ha puesto en cola, compruebe el estado después de algún tiempo", +Balance Qty (Stock),Cantidad (stock), +Balance Sheet Summary,Resumen del balance general, +Balance Stock Value,Valor de stock, +Bank Reconciliation Tool,Herramienta de Reconciliación Bancaria, +Bank Statement Import,Importación de extractos bancarios, +Bank Transaction {0} Matched,Transacción bancaria {0} Cotejada, +Bank Transaction {0} added as Journal Entry,Transacción bancaria {0} añadida como asiento, +Bank Transaction {0} added as Payment Entry,Transacción bancaria {0} añadida como asiento de pago, +Bank Transaction {0} is already fully reconciled,Transacción bancaria {0} ya está totalmente conciliada, +Bank Transaction {0} updated,Transacción bancaria {0} actualizada, +Bank/Cash Account,Cuenta Banco/Efectivo, +Bank/Cash Account {0} doesn't belong to company {1},La Cuenta Banco/Efectivo {0} no pertenece a la compañía {1}, +Base Amount,Importe base, +Base Cost Per Unit,Coste base por unidad, +Base Rate,Tarifa base, +Base Tax Withholding Net Total,Base Imponible Retención Neta Total, +Base Total,Total base, +Base Total Billable Amount,Base Importe total facturable, +Base Total Billed Amount,Base Importe total facturado, +Base Total Costing Amount,Base Importe total del cálculo de costes, +Based On Value,Basado en el Valor, +"Based on your HR Policy, select your leave allocation period's end date","Basándose en su política de RRHH, seleccione la fecha de finalización del período de asignación de vacaciones", +"Based on your HR Policy, select your leave allocation period's start date","Basándose en su política de RRHH, seleccione la fecha de inicio de su período de asignación de vacaciones", +Batch Expiry Date,Fecha de caducidad del lote, +Batch No is mandatory,El número de lote es obligatorio, +Batch No {0} does not exists,Lote núm. {0} no existe, +Batch No {0} is linked with Item {1} which has serial no. Please scan serial no instead.,"El lote nº {0} está vinculado con el artículo {1} que tiene nº de serie. Por favor, escanee el nº de serie en su lugar.", +Batch No.,Nº de Lote, +Batch Nos,Números de Lote, +Batch Nos are created successfully,Los Núm. de Lote se crearon correctamente, +Batch Not Available for Return,Lote no disponible para devolución, +Batch Qty,Cantidad de lote, +Batch and Serial No,Núm. de Lote y Serie, +Batch not created for item {} since it does not have a batch series.,"Lote no creado para el artículo {}, ya que no tiene serie de lote.", +Batch {0} and Warehouse,Lote {0} y almacén, +Batch {0} is not available in warehouse {1},El lote {0} no está disponible en el almacén {1}, +Batchwise Valuation,Valoración por lotes, +Beginning of the current subscription period,Inicio del periodo de suscripción actual, +Below Subscription Plans are of different currency to the party default billing currency/Company currency: {0},Los siguientes planes de suscripción tienen una moneda diferente a la moneda de facturación predeterminada de la parte/moneda de la empresa: {0}, +Bill for Rejected Quantity in Purchase Invoice,Facturación de la cantidad rechazada en la factura de compra, +Billed Items To Be Received,Artículos facturados por recibir, +"Billed, Received & Returned","Facturado, Recibido y Devuelto", +Billing Address Details,Detalles de la dirección de facturación, +Billing Interval in Subscription Plan must be Month to follow calendar months,El intervalo de facturación en el plan de suscripción debe ser Mes para seguir los meses naturales, +Bisect Accounting Statements,Estados contables divididos, +Bisect Left,Dividir a la izquierda, +Bisect Nodes,Dividir nodos, +Bisect Right,Dividir a la derecha, +Bisecting From,Dividir desde, +Bisecting Left ...,Dividir a la izquierda..., +Bisecting Right ...,Dividir a la derecha..., +Bisecting To,Dividir a, +Blanket Order Allowance (%),Asignación de pedidos generales (%), +Bom No,Lista de materiales Nº, +Book Advance Payments as Liability option is chosen. Paid From account changed from {0} to {1}.,Se eligió la opción de Reservar pagos por adelantado como pasivo. La cuenta Pagado desde cambió de {0} a {1}., +Book Advance Payments in Separate Party Account,Contabilizar los pagos anticipados en una cuenta separada, +Book Tax Loss on Early Payment Discount,Pérdida de impuestos sobre descuentos de pago anticipado, +Book an appointment,Concierte una cita, +Booking stock value across multiple accounts will make it harder to track stock and account value.,Registrar el valor de las existencias en varias cuentas hará que sea más difícil realizar un seguimiento del valor de las existencias y de las cuentas., +Books have been closed till the period ending on {0},Los libros estarán cerrados hasta el período que finaliza el {0}, +Both Payable Account: {0} and Advance Account: {1} must be of same currency for company: {2},Tanto la Cuenta de Acreedores: {0} como la Cuenta de Anticipos: {1} deben ser de la misma moneda para la empresa: {2}, +Both Receivable Account: {0} and Advance Account: {1} must be of same currency for company: {2},Tanto la cuenta de deudores: {0} como la cuenta de anticipos: {1} deben ser de la misma moneda para la empresa: {2}, +Both {0} Account: {1} and Advance Account: {2} must be of same currency for company: {3},Tanto la cuenta {0} : {1} como la cuenta de anticipos: {2} deben ser de la misma moneda para la empresa: {3}, +Budget Exceeded,Presupuesto excedido, +Build All?,¿Construir todo?, +Build Tree,Construir árbol, +Buildable Qty,Cantidad fabricable, +Bulk Transaction Log,Registro de transacciones masivas, +Bulk Transaction Log Detail,Detalle del registro de transacciones masivas, +Bulk Update,Actualización masiva, +Bundle Items,Conjunto de Productos, +Buying & Selling Settings,Configuración de Compra y Venta, +Buying and Selling,Compra y Venta, +"By default, the Supplier Name is set as per the Supplier Name entered. If you want Suppliers to be named by a Naming Series choose the 'Naming Series' option.","Por defecto, el Nombre del Proveedor se establece según el Nombre del Proveedor introducido. Si desea que los Proveedores sean nombrados por una Serie de Nombres elija la opción 'Serie de Nombres'.", +Bypass credit check at Sales Order,Omitir verificación de crédito en Orden de Venta, +COGS By Item Group,CMV grupo de artículos, +COGS Debit,Débito CMV, +CRM Note,Nota CRM, +CRM Settings,Configuración CRM, +Calculate Product Bundle Price based on Child Items' Rates,Calcular el precio del paquete de productos en función de las tarifas de los artículos secundarios, +Calculate daily depreciation using total days in depreciation period,Calcular la depreciación diaria utilizando el total de días del período de depreciación, +Call Again,Volver a llamar, +Call Ended,Llamada finalizada, +Call Handling Schedule,Horario de atención de llamadas, +Call Received By,Llamada recibida por, +Call Receiving Device,Dispositivo receptor de llamadas, +Call Routing,Enrutamiento de llamadas, +Call Schedule Row {0}: To time slot should always be ahead of From time slot.,Horario de llamadas Fila {0}: La franja horaria A debe estar siempre por delante de la franja horaria Desde., +Call Type,Tipo de llamada, +Callback,Devolver Llamada, +Campaign Item,Artículos de campaña, +Can not close Work Order. Since {0} Job Cards are in Work In Progress state.,No se puede cerrar la Orden de Trabajo. Ya que {0} Las fichas de trabajo están en estado Trabajo en curso., +"Can not filter based on Child Account, if grouped by Account",No se puede filtrar basado en la cuenta secundaria si está agrupada por cuenta, +"Can't change the valuation method, as there are transactions against some items which do not have its own valuation method","No se puede cambiar el método de valoración, ya que hay transacciones contra algunos artículos que no tienen su propio método de valoración.", +Can't disable batch wise valuation for active batches.,No se puede deshabilitar la valoración por lotes para lotes activos., +Can't disable batch wise valuation for items with FIFO valuation method.,No se puede desactivar la valoración por lotes para artículos con método de valoración FIFO., +Cannot Merge,No se puede fusionar, +Cannot Resubmit Ledger entries for vouchers in Closed fiscal year.,No se pueden volver a validar entradas del libro mayor para comprobantes en un año fiscal cerrado., +"Cannot amend {0} {1}, please create a new one instead.","No se puede modificar {0} {1}; en su lugar, cree uno nuevo.", +Cannot apply TDS against multiple parties in one entry,No se puede aplicar Retención de impuestos en origen contra varias partes en una sola entrada, +Cannot cancel as processing of cancelled documents is pending.,No se puede cancelar porque el procesamiento de los documentos cancelados está pendiente., +Cannot cancel the transaction. Reposting of item valuation on submission is not completed yet.,"No se puede cancelar la transacción. La validación del traspaso de la valoración del artículo, aún no se ha completado.", +Cannot change Reference Document Type.,No se puede cambiar el tipo de documento de referencia., +Cannot complete task {0} as its dependant task {1} are not completed / cancelled.,No se puede completar la tarea {0} porque su tarea dependiente {1} no está completada / cancelada., +Cannot convert Task to non-group because the following child Tasks exist: {0}.,No se puede convertir una tarea a una no grupal porque existen las siguientes tareas secundarias: {0}., +Cannot convert to Group because Account Type is selected.,No se puede convertir a Grupo porque Tipo de Cuenta está seleccionado., +Cannot create Stock Reservation Entries for future dated Purchase Receipts.,No se pueden crear entradas de reserva de stock para recibos de compra con fecha futura., +Cannot create a pick list for Sales Order {0} because it has reserved stock. Please unreserve the stock in order to create a pick list.,No se puede crear una lista de selección para la orden de venta {0} porque tiene stock reservado. Anule la reserva del stock para crear una lista de selección., +Cannot create accounting entries against disabled accounts: {0},No se pueden crear asientos contables contra cuentas desactivadas: {0}, +Cannot disable batch wise valuation for FIFO valuation method.,No se puede desactivar la valoración por lotes para el método de valoración FIFO., +Cannot enqueue multi docs for one company. {0} is already queued/running for company: {1},No se pueden poner en cola varios documentos para una empresa. {0} ya está en cola/en ejecución para la empresa: {1}, +Cannot find a default warehouse for item {0}. Please set one in the Item Master or in Stock Settings.,No se puede encontrar un almacén predeterminado para el artículo {0}. Establezca uno en el Maestro de artículos o en la Configuración de existencias., +Cannot make any transactions until the deletion job is completed,No se puede realizar ninguna transacción hasta que se complete el trabajo de eliminación., +Cannot produce more item for {0},No se puede producir más productos por {0}, +Cannot produce more than {0} items for {1},No se pueden producir más de {0} productos por {1}, +Cannot receive from customer against negative outstanding,No se puede recibir del cliente contra saldos pendientes negativos, +Cannot retrieve link token for update. Check Error Log for more information,No se puede recuperar el token de enlace para la actualización. Consulte el registro de errores para obtener más información, +Cannot retrieve link token. Check Error Log for more information,No se puede recuperar el token de enlace. Compruebe el registro de errores para obtener más información, +Cannot {0} from {2} without any negative outstanding invoice,No se puede {0} desde {2} sin ninguna factura pendiente negativa, +Capacity (Stock UOM),Capacidad (Stock UdM), +Capacity in Stock UOM,Capacidad en stock UdM, +Capacity must be greater than 0,La capacidad debe ser superior a 0, +Capitalization,Capitalización, +Capitalization Method,Método de Capitalización, +Capitalize Asset,Capitalizar Activo, +Capitalize Repair Cost,Capitalizar el coste de reparación, +Capitalized,Capitalizado, +Carrier,Operador, +Carrier Service,Servicio de Operador, +Carry Forward Communication and Comments,Llevar adelante la comunicación y los comentarios, +Category Details,Detalles de la categoría, +Caution: This might alter frozen accounts.,Precaución: Esto podría alterar las cuentas congeladas., +Change in Stock Value,Cambio en el Valor de Stock, +Changed customer name to '{}' as '{}' already exists.,Se cambió el nombre del Cliente a '{}' porque '{}' ya existe., +Changes,Cambio, +Charge of type 'Actual' in row {0} cannot be included in Item Rate or Paid Amount,El cargo de tipo 'Real' en la fila {0} no puede incluirse en la Tarifa del artículo o en el Importe pagado, +Chart Of Accounts,Plan de Cuentas, +Checked On,Comprobado el, +Checking this will round off the tax amount to the nearest integer,Al marcar esta casilla se redondeará el importe del impuesto al número entero más próximo, +Cheques and Deposits Incorrectly cleared,Cheques y depósitos compensados incorrectamente, +Choose a WIP composite asset,Elija un activo compuesto WIP, +Clear Demo Data,Borrar datos de demostración, +Clear Notifications,Borrar Notificaciones, +Clearing Demo Data...,Borrando datos de demostración..., +Click on 'Get Finished Goods for Manufacture' to fetch the items from the above Sales Orders. Items only for which a BOM is present will be fetched.,"Haga clic en ""Obtener Productos Terminados para Fabricación"" para obtener los artículos de los Pedidos de Ventas anteriores. Sólo se obtendrán los artículos para los que exista una lista de materiales.", +Click on Add to Holidays. This will populate the holidays table with all the dates that fall on the selected weekly off. Repeat the process for populating the dates for all your weekly holidays,Haga clic en Añadir a vacaciones. Esto rellenará la tabla de días festivos con todas las fechas que caen en el día festivo semanal seleccionado. Repita el proceso para rellenar las fechas de todas sus vacaciones semanales, +Click on Get Sales Orders to fetch sales orders based on the above filters.,Haga clic en Obtener pedidos de venta para obtener los pedidos de venta basados en los filtros anteriores., +Click to add email / phone,Clic para añadir correo / teléfono, +Close Replied Opportunity After Days,Cerrar oportunidad respondida después de días, +Closed Work Order can not be stopped or Re-opened,La orden de trabajo cerrada no puede detenerse ni reabrirse, +Closing,Cierre, +Closing Balance as per Bank Statement,Saldo de cierre según extracto bancario, +Closing Balance as per ERP,Saldo de cierre según ERP, +Closing Stock Balance,Saldo de stock de cierre, +Columns are not according to template. Please compare the uploaded file with standard template,"Las columnas no se ajustan a la plantilla. Por favor, compare el archivo subido con la plantilla estándar", +Communication Channel,Canal de comunicación, +Company Address Display,Mostrar dirección de la empresa, +Company Billing Address,Dirección de Facturación de la Compañía, +Company Details,Detalles de la Compañía, +Company Shipping Address,Dirección de envío de la compañía, +Company Tax ID,Número de Identificación Fiscal de la Compañía, +Company and Posting Date is mandatory,La Empresa y la Fecha de Publicación son obligatorias, +Company is mandatory,La empresa es obligatoria, +Company is mandatory for generating an invoice. Please set a default company in Global Defaults.,La empresa es obligatoria para generar una factura. Establezca una empresa predeterminada en Valores predeterminados globales., +Company which internal customer represents,Compañía a la que representa el Cliente Interno, +Company which internal customer represents.,Compañía a la que representa el Cliente Interno., +Company which internal supplier represents,Empresa a la que representa el proveedor interno, +Company {0} is added more than once,La empresa {0} se agrega más de una vez, +Company {} does not exist yet. Taxes setup aborted.,La empresa {} aún no existe. Configuración de impuestos abortada., +Company {} does not match with POS Profile Company {},La empresa {} no coincide con el perfil de POS {}, +Competitor,Competidor, +Competitor Detail,Detalle del Competidor, +Competitor Name,Nombre del Competidor, +Competitors,Competidores, +Complete Job,Trabajo completo, +Complete Order,Pedido completo, +Completed On,Completado el, +Completed On cannot be greater than Today,Completado el no puede ser después de hoy, +Completed Tasks,Tareas Completadas, +Completed Time,Tiempo completado, +Completion Date can not be before Failure Date. Please adjust the dates accordingly.,La fecha de finalización no puede ser anterior a la fecha de falla. Ajuste las fechas según corresponda., +Conditional Rule,Regla condicional, +Conditional Rule Examples,Ejemplos de reglas condicionales, +Configure Product Assembly,Configurar el ensamblaje del producto, +Configure the action to stop the transaction or just warn if the same rate is not maintained.,Configure la acción para detener la transacción o simplemente avisar si no se mantiene la misma tasa., +Connections,Conexiones, +Consider Entire Party Ledger Amount,Considerar el importe total del Libro Mayor de Partes, +Consider Minimum Order Qty,Considerar la cantidad mínima de pedido, +Consider Rejected Warehouses,Considerar los almacenes rechazados, +Considered In Paid Amount,Considerado en el importe pagado, +Consolidate Sales Order Items,Consolidar posiciones de pedido de cliente, +Consolidate Sub Assembly Items,Consolidar elementos de subensamblado, +Consumed Asset Items is mandatory for Decapitalization,Los elementos de activos consumidos son obligatorios para la descapitalización, +Consumed Asset Total Value,Valor total de los activos consumidos, +Consumed Assets,Activos consumidos, +Consumed Quantity,Calidad consumida, +Consumed Stock Items,Artículos de stock consumidos, +Consumed Stock Items or Consumed Asset Items are mandatory for creating new composite asset,Los artículos de stock consumidos o los artículos de activos consumidos son obligatorios para crear un nuevo activo compuesto., +"Consumed Stock Items, Consumed Asset Items or Consumed Service Items is mandatory for Capitalization","Los artículos de stock consumidos, los artículos de activos consumidos o los artículos de servicios consumidos son obligatorios para la capitalización", +Consumed Stock Total Value,Valor total del stock consumido, +Consumption Rate,Tasa de consumo, +Contact Details,Detalles de contacto, +Contact Mobile,Contacto Móvil, +Contact Us Settings,Configuración de contácto, +Contacts,Contactos, +Contract Template Help,Ayuda con la plantilla de contrato, +Contribution Qty,Contribución Cantidad, +Control Historical Stock Transactions,Control de las transacciones históricas de existencias, +Conversion factor for item {0} has been reset to 1.0 as the uom {1} is same as stock uom {2}.,El factor de conversión para el artículo {0} se ha restablecido a 1.0 ya que la unidad de medida {1} es la misma que la unidad de medida de stock {2}., +Convert Item Description to Clean HTML in Transactions,Convertir la descripción del artículo a HTML limpio en las transacciones, +Convert to Group,Convertir a grupo,Warehouse +Convert to Item Based Reposting,Convertir a reenvío basado en artículos, +Convert to Ledger,Convertir a libro mayor,Warehouse +Core,Núcleo, +Corrective Job Card,Ficha de trabajo correctivo, +Corrective Operation,Operación correctiva, +Corrective Operation Cost,Coste de la operación correctiva, +Cost Center Allocation,Asignación de centros de costes, +Cost Center Allocation Percentage,Porcentaje de Asignación del Centro de Costos, +Cost Center Allocation Percentages,Porcentajes de Asignación del Centro de Costo, +Cost Center For Item with Item Code {0} has been Changed to {1},El centro de costes para el artículo con código de artículo {0} se ha cambiado a {1}, +"Cost Center is a part of Cost Center Allocation, hence cannot be converted to a group","El centro de costes forma parte de la asignación de centros de costes, por lo que no puede convertirse en un grupo", +Cost Center with Allocation records can not be converted to a group,El centro de costes con registros de asignación no puede convertirse en un grupo, +Cost Center {0} cannot be used for allocation as it is used as main cost center in other allocation record.,"El centro de costes {0} no puede utilizarse para la asignación, ya que se utiliza como centro de costes principal en otro registro de asignación.", +Cost Center {} doesn't belong to Company {},Centro de costos {} no pertenece a la empresa {}, +Cost Center {} is a group cost center and group cost centers cannot be used in transactions,El centro de costes {} es un centro de costes de grupo y los centros de costes de grupo no pueden utilizarse en las transacciones, +Cost Configuration,Configuración de costes, +Cost Per Unit,Coste por unidad, +Cost of New Capitalized Asset,Coste del nuevo activo capitalizado, +Cost of Poor Quality Report,Informe sobre el coste de la mala calidad, +Cost to Company (CTC),Coste para la empresa (CTE), +Costing Details,Detalles de costos, +Could Not Delete Demo Data,No se pueden borrar los datos de la demostración, +Could not auto update shifts. Shift with shift factor {0} needed.,No se pudieron actualizar automáticamente los turnos. Se necesita un turno con un factor de turno {0} ., +Could not detect the Company for updating Bank Accounts,No se ha podido detectar la empresa para actualizar las cuentas bancarias, +Could not find path for ,No se pudo encontrar la ruta para , +Count,Contar, +Create Depreciation Entry,Crear asiento de amortización, +Create Employee records.,Crear registros de empleados., +Create Grouped Asset,Crear activos agrupados, +Create Job Card based on Batch Size,Crear tarjeta de trabajo en función del tamaño del lote, +Create Journal Entries,Crear asientos, +Create Ledger Entries for Change Amount,Crear entradas en el libro mayor para el importe de modificación, +Create Link,Crear enlace, +Create Multi-level BOM,Crear lista de materiales Multi-Nivel, +Create New Customer,Crear Nuevo Cliente, +Create Opportunity,Crear Oportunidad, +Create Prospect,Crear prospecto, +Create Reposting Entries,Crear entradas de reenvío, +Create Reposting Entry,Crear entrada de reenvío, +Create Stock Entry,Crear entrada de stock, +Create Workstation,Crear estación de trabajo, +Create a new composite asset,Crear un nuevo activo compuesto, +Create a variant with the template image.,Cree una variante con la imagen de la plantilla., +Create in Draft Status,Crear en estado Borrador, +Create {0} {1} ?,¿Crear {0} {1} ?, +Created On,Creado el, +Created {0} scorecards for {1} between:,Se crearon {0} tarjetas de puntos para {1} entre:, +Creating Delivery Note ...,Creando Nota de Entrega..., +Creating Journal Entries...,Creación de asientos de diario..., +Creating Packing Slip ...,Creando albarán..., +Creating Purchase Invoices ...,Creando facturas de compra..., +Creating Purchase Receipt ...,Creando Recibo de Compra..., +Creating Sales Invoices ...,Creando facturas de venta..., +Creating Stock Entry,Creando Entrada de Inventario, +Creating Subcontracting Order ...,Creando Orden de Subcontratación..., +Creating Subcontracting Receipt ...,Creando Recibo de Subcontratación..., +Creating User...,Creando usuario..., +Creation,Creación, +Creation of {1}(s) successful,Creación de {1}(s) exitosa, +"Creation of {0} failed. + Check Bulk Transaction Log","La creación de {0} falló. + Verificar Registro de transacciones masivas", +"Creation of {0} partially successful. + Check Bulk Transaction Log","Creación de {0} parcialmente satisfactoria. + Compruebe Registro de transacciones masivas", +Credit (Transaction),Crédito (Transacción), +Credit Amount in Transaction Currency,Importe del crédito en la moneda de la transacción, +Credit Limit Crossed,Límite de crédito sobrepasado, +Credit Limit Settings,Configuración del límite de crédito, +"Credit Note will update it's own outstanding amount, even if ""Return Against"" is specified.","La nota de crédito actualizará su propio importe pendiente, incluso si se especifica ""Devolución contra"".", +Currency Exchange Settings Details,Detalles de la configuración del cambio de divisas, +Currency Exchange Settings Result,Resultado de la configuración de cambio de moneda, +Current Asset,Activo corriente, +Current Index,Índice actual, +Current Level,Nivel actual, +Current Liability,Pasivo corriente, +Current Node,Nodo actual, +Current Serial / Batch Bundle,Paquete de serie / lote actual, +Custom,Personalizar, +Custom delimiters,Delimitador personalizado, +Customer ,Cliente , +Customer / Item / Item Group,Cliente / Producto / Grupo de Productos, +Customer Defaults,Valores predeterminados del cliente, +Customer Group Item,Artículo del grupo de clientes, +Customer Group: {0} does not exist,Grupo de Clientes: {0} no existe, +Customer Item,Artículo del cliente, +Customer Name: ,Nombre del cliente: , +Customer Portal Users,Usuarios del Portal del Cliente, +Customer: ,Cliente: , +Daily Time to send,Tiempo diario para enviar, +Dashboard,Tablero, +Data Based On,Datos basados en, +Date ,Fecha , +Date must be between {0} and {1},La fecha debe estar entre {0} y {1}, +Days before the current subscription period,Días antes del período de suscripción actual, +DeLinked,Desvinculado, +Deal Owner,Propietario de la Oferta, +Debit (Transaction),Débito (Transacción), +Debit Amount in Transaction Currency,Importe del débito en la moneda de la transacción, +"Debit Note will update it's own outstanding amount, even if ""Return Against"" is specified.","La nota de débito actualizará su propio monto pendiente, incluso si se especifica ""Devolver contra"".", +Debit-Credit Mismatch,Desajuste débito-crédito, +Debit-Credit mismatch,Desajuste débito-crédito, +Decapitalization,Descapitalización, +Decapitalized,Descapitalizado, +Default Advance Account,Cuenta de anticipos por defecto, +Default Advance Paid Account,Cuenta de anticipos por defecto, +Default Advance Received Account,Cuenta de anticipos recibidos por defecto, +Default BOM not found for FG Item {0},Lista de materiales por defecto no encontrada para el artículo FG {0}, +Default Discount Account,Cuenta de descuento predeterminada, +Default In-Transit Warehouse,Almacén en tránsito predeterminado, +Default Operating Cost Account,Cuenta de costos operativos por defecto, +Default Payment Discount Account,Cuenta de descuento por pago predeterminado, +Default Provisional Account,Cuenta provisional predeterminada, +Default Service Level Agreement for {0} already exists.,Ya existe un acuerdo de nivel de servicio predeterminado para {0} ., +Default Unit of Measure for Item {0} cannot be changed directly because you have already made some transaction(s) with another UOM. You need to either cancel the linked documents or create a new Item.,La unidad de medida predeterminada para el artículo {0} no se puede cambiar directamente porque ya ha realizado alguna transacción con otra unidad de medida. Debe cancelar los documentos vinculados o crear un artículo nuevo., +Default settings for your stock-related transactions,Configuración predeterminada para sus transacciones relacionadas con acciones, +"Default tax templates for sales, purchase and items are created.","Se crean plantillas de impuestos por defecto para ventas, compras y artículos.", +Deferred Accounting,Contabilidad diferida, +Deferred Accounting Defaults,Contabilidad diferida predeterminada, +Deferred Revenue and Expense,Ingresos y gastos diferidos, +Deferred accounting failed for some invoices:,La contabilidad diferida falló para algunas facturas:, +Delay (In Days),Retraso (en días), +Delayed,Retrasado, +Delayed Tasks Summary,Resumen de tareas retrasadas, +Delete Accounting and Stock Ledger Entries on deletion of Transaction,Borrar asientos del libro de contabilidad y de existencias al borrar una transacción, +Delete Bins,Eliminar contenedores, +Delete Cancelled Ledger Entries,Eliminar entradas contables canceladas, +Delete Dimension,Eliminar Dimensión, +Delete Leads and Addresses,Eliminar clientes potenciales y direcciones, +Delete Transactions,Eliminar transacciones, +Deleted Documents,Documentos Eliminados, +Deletion in Progress!,¡Eliminación en progreso!, +Delimiter options,Opciones de delimitador, +Delivery Manager,Gerente de Envío, +Delivery Note Packed Item,Albarán de entrega Artículo embalado, +Delivery Note(s) created for the Pick List,Nota(s) de entrega creada(s) para la lista de selección, +Delivery User,Usuario de Envío, +Delivery to,Entregar a, +Demo Company,Empresa de Demostración, +Demo data cleared,Datos de demostración borrados, +Dependant SLE Voucher Detail No,Detalle del comprobante SLE dependiente N.º, +Dependent Task {0} is not a Template Task,La tarea dependiente {0} no es una tarea plantilla, +Deposit,Depósito, +Depreciate based on daily pro-rata,Depreciación basada en el prorrateo diario, +Depreciate based on shifts,Depreciar según turnos, +Depreciation Details,Detalles de la depreciación, +Depreciation Entry Posting Status,Estado de contabilización del asiento de amortización, +Depreciation Expense Account should be an Income or Expense Account.,La cuenta de gastos de depreciación debe ser una cuenta de ingresos o de gastos., +Depreciation Posting Date cannot be before Available-for-use Date,La fecha de contabilización de la depreciación no puede ser anterior a la fecha de disponibilidad para uso, +Depreciation Row {0}: Depreciation Posting Date cannot be before Available-for-use Date,Fila de depreciación {0}: La fecha de contabilización de la depreciación no puede ser anterior a la fecha de disponibilidad para uso, +Depreciation Schedule View,Vista del calendario de amortización, +Depreciation cannot be calculated for fully depreciated assets,La amortización no puede calcularse para los activos totalmente amortizados, +Description of Content,Descripción del contenido, +Desk User,Usuario de Escritorio, +Difference In,Diferencia en, +Difference Posting Date,Fecha de publicación de la diferencia, +Difference Qty,Diferencia Cant., +Different 'Source Warehouse' and 'Target Warehouse' can be set for each row.,Se pueden configurar diferentes 'Almacén de origen' y 'Almacén de destino' para cada fila., +Dimension Details,Detalles de la dimensión, +Dimension Filter Help,Ayuda del filtro de dimensiones, +Dimension-wise Accounts Balance Report,Informe de balance de cuentas por dimensiones, +Direct Expense,Gastos Directos, +Disable Last Purchase Rate,Desactivar última tasa de compra, +Disable Serial No And Batch Selector,Desactivar selección de Nún. de Serie y Lote, +Disabled Account Selected,Cuenta deshabilitada seleccionada, +Disabled Warehouse {0} cannot be used for this transaction.,El almacén deshabilitado {0} no se puede utilizar para esta transacción., +Disabled pricing rules since this {} is an internal transfer,Deshabilitado las reglas de precios ya que esta {} es una transferencia interna, +Disabled tax included prices since this {} is an internal transfer,"Precios con impuestos incluidos, ya que este {} es un traslado interno", +Disables auto-fetching of existing quantity,Desactiva la obtención automática de la cantidad existente, +Disassemble,Desmontar, +Disassemble Order,Orden de desmontaje, +Discount Account,Cuenta de Descuento, +Discount Date,Fecha de descuento, +Discount Settings,Configuración de Descuento, +Discount Validity,Validez del descuento, +Discount Validity Based On,Validez del descuento basado en, +Discount of {} applied as per Payment Term,Descuento de {} aplicado según la Condición de Pago, +Discounted Amount,Importe descontado, +"Discounts to be applied in sequential ranges like buy 1 get 1, buy 2 get 2, buy 3 get 3 and so on","Descuentos a aplicar en rangos secuenciales como compra 1 consigue 1, compra 2 consigue 2, compra 3 consigue 3 y así sucesivamente", +Discrepancy between General and Payment Ledger,Discrepancia entre el Libro Mayor y el Libro de Pagos, +Dispatch Address,Dirección de Despacho, +Dispatch Address Name,Nombre de Dirección de Despacho, +Distinct Item and Warehouse,Distinto artículo y almacén, +Distribute Additional Costs Based On ,Distribuir los costes adicionales en función de , +Distribute Manually,Distribuir manualmente, +Do Not Explode,No desglosar, +Do Not Update Serial / Batch on Creation of Auto Bundle,No actualizar el número de serie o lote al crear un paquete automático, +Do Not Use Batch-wise Valuation,No utilice la valoración por lotes, +Do reposting for each Stock Transaction,Realice el traspaso para cada transacción bursátil, +Do you still want to enable negative inventory?,¿Aún desea activar el inventario negativo?, +DocTypes should not be added manually to the 'Excluded DocTypes' table. You are only allowed to remove entries from it.,Los DocTypes no deben añadirse manualmente a la tabla 'DocTypes excluidos'. Solamente se le permite eliminar entradas de la misma., +Document Type already used as a dimension,Tipo de documento ya utilizado como dimensión, +Documents,Documentos, +Documents: {0} have deferred revenue/expense enabled for them. Cannot repost.,Documentos: {0} tienen habilitados ingresos/gastos diferidos. No se pueden volver a publicar., +Domain Settings,Configuraciones de Dominio, +Don't Reserve Sales Order Qty on Sales Return,No reserve la cantidad de la orden de venta en la devolución de ventas, +Don't Send Emails,No envíe correos electrónicos, +Dont Recompute tax,No recalcular impuestos, +Download Backups,Descargar Backups, +Download CSV Template,Descargar la plantilla CSV, +Download Materials Request Plan,Descargar Plan de Solicitud de Materiales, +Download Materials Request Plan Section,Descargar Sección de Solicitud de Planos de Materiales, +Dunning Amount (Company Currency),Importe de la reclamación (moneda de la empresa), +Dunning Level,Nivel de reclamación, +Duplicate Closing Stock Balance,Saldo de stock de cierre duplicado, +Duplicate Customer Group,Grupo de clientes duplicados, +Duplicate Finance Book,Duplicado del Libro de Finanzas, +Duplicate Item Group,Grupo de Productos duplicado, +Duplicate POS Invoices found,Se encontraron facturas PV duplicadas, +Dynamic Condition,Condición Dinámica, +Edit Capacity,Editar capacidad, +Edit Cart,Editar carrito, +Edit Full Form,Editar formulario completo, +Edit Note,Editar Nota, +Editing {0} is not allowed as per POS Profile settings,La edición de {0} no está permitida según la configuración del perfil del PV, +Either 'Selling' or 'Buying' must be selected,"Debe seleccionar ""Vender"" o ""Comprar"".", +Email / Notifications,Correo / Notificaciones, +Email Address (required),Dirección de correo electrónico (obligatorio), +"Email Address must be unique, it is already used in {0}","La dirección de correo electrónico debe ser única, ya se utiliza en {0}", +Email Digest Recipient,Destinatario del resumen de correo electrónico, +Email Digest: {0},Resumen de correo: {0}, +Email Domain,Dominio de Correo Electrónico, +Email or Phone/Mobile of the Contact are mandatory to continue.,El correo electrónico o el teléfono/móvil del contacto son obligatorios para continuar., +Email verification failed.,Error en la verificación del correo electrónico., +Employee User Id,Id. de usuario del empleado, +Enable Allow Partial Reservation in the Stock Settings to reserve partial stock.,Habilite Permitir reserva parcial en la configuración de stock para reservar stock parcial., +Enable Automatic Party Matching,Habilitar la coincidencia automática de partes, +Enable Common Party Accounting,Habilitar la contabilidad de partes comunes, +Enable Discount Accounting for Selling,Habilitar la contabilidad de descuentos para las ventas, +Enable Fuzzy Matching,Habilitar coincidencia difusa, +Enable Health Monitor,Habilitar monitor de salud, +Enable Immutable Ledger,Habilitar libro mayor inmutable, +Enable Provisional Accounting For Non Stock Items,Habilitar contabilidad provisional para artículos que no están en stock, +Enable Stock Reservation,Habilitar reserva de existencias, +Enable it if users want to consider rejected materials to dispatch.,Habilítelo si los usuarios desean considerar los materiales rechazados para enviarlos., +Enable this checkbox even if you want to set the zero priority,Active esta casilla incluso si desea establecer la prioridad cero, +"Enable this option to calculate daily depreciation by considering the total number of days in the entire depreciation period, (including leap years) while using daily pro-rata based depreciation","Active esta opción para calcular la amortización diaria teniendo en cuenta el número total de días de todo el período de amortización, (incluidos los años bisiestos) al utilizar la amortización diaria prorrateada.", +Enable to apply SLA on every {0},Habilitar para aplicar SLA en cada {0}, +Enabling this ensures each Purchase Invoice has a unique value in Supplier Invoice No. field within a particular fiscal year,Habilitar esta opción garantiza que cada factura de compra tenga un valor único en el campo Nº de factura del proveedor dentro de un ejercicio fiscal determinado, +Enabling this option will allow you to record -

1. Advances Received in a Liability Account instead of the Asset Account

2. Advances Paid in an Asset Account instead of the Liability Account,Activar esta opción le permitirá registrar -

1. Anticipos Recibidos en una Cuenta de Pasivo en lugar de la Cuenta de Activo

2. Anticipos Pagados en una Cuenta de Activo en lugar de la Cuenta de Pasivo, +Enabling this will allow creation of multi-currency invoices against single party account in company currency,Habilitar esta opción permitirá la creación de facturas multidivisa contra la cuenta de una sola parte en la divisa de la empresa, +Enabling this will change the way how cancelled transactions are handled.,Al activar esta opción cambiará la forma en que se gestionan las transacciones canceladas., +End Transit,Fin del tránsito, +End of the current subscription period,Fin del periodo de suscripción actual, +"Enter First and Last name of Employee, based on Which Full Name will be updated. IN transactions, it will be Full Name which will be fetched.","Introduzca el Nombre y Apellidos del Empleado, en base a los cuales se actualizará el Nombre Completo. EN las transacciones, será el Nombre Completo el que se obtendrá.", +Enter Manually,Introducir manualmente, +Enter Serial Nos,Ingrese Serial Nro., +Enter Visit Details,Introduzca los datos de la visita, +Enter a name for Routing.,Introduzca un nombre para el Enrutamiento., +"Enter a name for the Operation, for example, Cutting.","Introduzca un nombre para la Operación, por ejemplo, Corte.", +Enter a name for this Holiday List.,Introduzca un nombre para esta Lista de vacaciones., +"Enter an Item Code, the name will be auto-filled the same as Item Code on clicking inside the Item Name field.","Introduzca un Código de Artículo, el nombre se autocompletará igual que Código de Artículo al pulsar dentro del campo Nombre de Artículo.", +Enter each serial no in a new line,Introduzca cada nº de serie en una nueva línea, +"Enter the Operation, the table will fetch the Operation details like Hourly Rate, Workstation automatically. + + After that, set the Operation Time in minutes and the table will calculate the Operation Costs based on the Hourly Rate and Operation Time.","Introduzca la Operación, la tabla obtendrá los detalles de la Operación como la Tasa Horaria, la Estación de Trabajo automáticamente. + + Después, fije el Tiempo de Operación en minutos y la tabla calculará los Costes de Operación basándose en la Tarifa Horaria y el Tiempo de Operación.", +Enter the opening stock units.,Introduzca las unidades de existencias iniciales., +Enter the quantity of the Item that will be manufactured from this Bill of Materials.,Introduzca la cantidad del Artículo que se fabricará a partir de esta Lista de Materiales., +Enter the quantity to manufacture. Raw material Items will be fetched only when this is set.,Introduzca la cantidad a fabricar. Los artículos de materia prima sólo se obtendrán cuando se haya configurado esta opción., +Error during caller information update,Error al actualizar la información de llamada, +Error while posting depreciation entries,Error al contabilizar asientos de amortización, +Error while processing deferred accounting for {0},Error al procesar la contabilidad diferida para {0}, +Error while reposting item valuation,Error al volver a publicar la valoración del artículo, +"Error: This asset already has {0} depreciation periods booked. + The `depreciation start` date must be at least {1} periods after the `available for use` date. + Please correct the dates accordingly.","Error: Este activo ya tiene contabilizados {0} periodos de amortización. + La fecha de `inicio de la amortización` debe ser al menos {1} periodos después de la fecha de `disponible para su uso`. + Por favor, corrija las fechas en consecuencia.", +Errors Notification,Notificación de errores, +Even invoices with apply tax withholding unchecked will be considered for checking cumulative threshold breach,Incluso las facturas que no tengan marcada la opción de aplicar la retención de impuestos se tendrán en cuenta para comprobar el incumplimiento del umbral acumulativo., +Example URL,URL de ejemplo, +Example of a linked document: {0},Ejemplo de documento vinculado: {0}, +"Example: ABCD.##### +If series is set and Serial No is not mentioned in transactions, then automatic serial number will be created based on this series. If you always want to explicitly mention Serial Nos for this item. leave this blank.","Ejemplo: ABCD. #####. Si se establece una serie y no se menciona el No de lote en las transacciones, se creará un número de lote automático basado en esta serie. Si siempre quiere mencionar explícitamente el No de lote para este artículo, déjelo en blanco. Nota: esta configuración tendrá prioridad sobre el Prefijo de denominación de serie en Configuración de stock.", +Example: Serial No {0} reserved in {1}.,Ejemplo: Número de serie {0} reservado en {1}., +Excess Materials Consumed,Exceso de materiales consumidos, +Excess Transfer,Exceso de transferencia, +Exchange Gain Or Loss,Ganancias o pérdidas por cambio de divisas, +Exchange Gain/Loss amount has been booked through {0},El importe de las ganancias/pérdidas de cambio se ha contabilizado a través de {0}., +Exchange Rate Revaluation Settings,Configuración de revaluación del tipo de cambio, +Excluded DocTypes,DocTipes excluidos, +Exempt Supplies,Suministros exentos, +Expected,Esperado, +Expected Balance Qty,Balance esperado, +Expected End Date should be less than or equal to parent task's Expected End Date {0}.,La fecha de finalización esperada debe ser menor o igual a la fecha de finalización esperada de la tarea principal {0}., +Expected Stock Value,Valor esperado de stock, +Expected Time Required (In Mins),Tiempo previsto necesario (en minutos), +Expiry,Expiración, +Export Data,Exportar Datos, +Export Errored Rows,Exportar filas con errores, +Export Import Log,Exportar registro de importación, +Extra Consumed Qty,Cantidad extra consumida, +Extra Job Card Quantity,Cantidad de tarjetas de trabajo adicionales, +FIFO Queue vs Qty After Transaction Comparison,Comparación entre cola FIFO y cantidad después de la transacción, +"FIFO Stock Queue (qty, rate)","Cola de existencias FIFO (cantidad, tasa)", +FIFO/LIFO Queue,Cola FIFO/LIFO, +Failed Entries,Entradas fallidas, +"Failed to erase demo data, please delete the demo company manually.","Fallo al borrar los datos de demostración, por favor borre la empresa de demostración manualmente.", +Failed to post depreciation entries,Fallo al contabilizar las entradas de depreciación, +Failed to setup defaults for country {0}. Please contact support.,Fallo al configurar los valores predeterminados para el país {0}. Póngase en contacto con el servicio de asistencia., +Failure,Fracaso, +Failure Description,Descripción del fallo, +Fetch Based On,Obtener Basado en, +Fetch Overdue Payments,Recuperar pagos atrasados, +Fetch Timesheet,Obtener Hoja de Tiempo, +Fetch Value From,Obtener valor de, +Fetching exchange rates ...,Obteniendo tipos de cambio..., +Filter by Reference Date,Filtrar por Fecha de Referencia, +Filter on Invoice,Filtrar en factura, +Filter on Payment,Filtrar en el pago, +Filters missing,Faltan filtros, +Final Product,Producto final, +Financial Ratios,Índices financieros, +Financial Reports,Informes Financieros, +Financial Year Begins On,El año fiscal comienza el, +Financial reports will be generated using GL Entry doctypes (should be enabled if Period Closing Voucher is not posted for all years sequentially or missing) ,Los informes financieros se generarán utilizando los doctypes de entrada GL (debe activarse si el Comprobante de Cierre de Período no se contabiliza para todos los años secuencialmente o faltantes) , +Finished Good BOM,Lista de materiales de productos terminados, +Finished Good Item,Artículo de Producto Terminado, +Finished Good Item Qty,Producto acabado Cantidad, +Finished Good Item Quantity,Producto acabado Cantidad, +Finished Good Item is not specified for service item {0},Artículo de producto terminado no especificado para artículo de servicio {0}, +Finished Good Item {0} Qty can not be zero,Producto terminado Artículo {0} La cantidad no puede ser cero, +Finished Good Item {0} must be a sub-contracted item,El artículo terminado {0} debe ser un artículo subcontratado, +Finished Good Qty,Cantidad de producto acabado, +Finished Good Quantity ,Cantidad de producto acabado , +Finished Good UOM,Producto acabado UdM, +Finished Good {0} does not have a default BOM.,El Producto acabado {0} no tiene una lista de materiales predeterminada., +Finished Good {0} is disabled.,El Producto acabado {0} está deshabilitado., +Finished Good {0} must be a stock item.,El Producto acabado {0} debe ser un artículo de stock., +Finished Good {0} must be a sub-contracted item.,El producto terminado {0} debe ser un artículo subcontratado., +Finished Goods Based Operating Cost,Coste de explotación basado en los productos acabados, +Finished Goods Item,Producto acabado, +Finished Goods Reference,Productos acabados Referencia, +Finished Goods Value,Valor de los productos acabados, +Finished Goods based Operating Cost,Coste de explotación basado en los productos acabados, +Finished Item {0} does not match with Work Order {1},Artículo terminado {0} no coincide con la orden de trabajo {1}, +First Response Due,Primera respuesta pendiente, +First Response SLA Failed by {},El primer acuerdo de nivel de servicio de respuesta falló por {}, +Fixed Asset Defaults,Cuenta de activo fijo predeterminada, +Fixed Time,Tiempo fijo, +Floor,Piso, +Floor Name,Nombre del Piso, +For Item,Para artículo, +For Item {0} cannot be received more than {1} qty against the {2} {3},Para el artículo {0} no se puede recibir más de {1} cantidad contra {2} {3}, +For Job Card,Para tarjeta de trabajo, +For Operation,Para operaciones, +"For Return Invoices with Stock effect, '0' qty Items are not allowed. Following rows are affected: {0}","Para las Facturas de Devolución con efecto de Stock, no se permiten artículos de cant. '0'. Se ven afectadas las siguientes líneas: {0}", +For Work Order,Para Orden de Trabajo, +For dunning fee and interest,Por gastos de reclamación e intereses, +"For item {0}, rate must be a positive number. To Allow negative rates, enable {1} in {2}","Para el producto {0}, el precio debe ser un número positivo. Para permitir precios negativos, habilite {1} en {2}", +For quantity {0} should not be greater than allowed quantity {1},Para la cantidad {0} no debe ser mayor que la cantidad permitida {1}, +"For the item {0}, the quantity should be {1} according to the BOM {2}.","Para el artículo {0}, la cantidad debe ser {1} según la lista de materiales {2}.", +"For the {0}, no stock is available for the return in the warehouse {1}.","Para la {0}, no hay existencias disponibles para la devolución en el almacén {1}.", +"For the {0}, the quantity is required to make the return entry","Para el {0}, se requiere la cantidad para realizar la entrada de devolución", +Force-Fetch Subscription Updates,Actualizaciones forzadas de suscripciones, +Forecasting,Previsión, +Formula Based Criteria,Criterios basados en fórmulas, +Free Item Rate,Tarifa de artículo libre, +From Corrective Job Card,De la ficha de trabajo correctiva, +From Date and To Date are mandatory,Desde la fecha y hasta la fecha son obligatorios, +From Date is mandatory,Desde Fecha es obligatorio, +From Date: {0} cannot be greater than To date: {1},Desde la fecha: {0} no puede ser mayor que Hasta la fecha: {1}, +From Delivery Date,Desde la fecha de entrega, +From Doctype,Desde DocType, +From Due Date,Desde la fecha de vencimiento, +From Opportunity,Desde Oportunidad, +From Payment Date,Desde la fecha de pago, +From Prospect,Desde Prospecto, +From Reference Date,Desde la fecha de referencia, +From Voucher Detail No,Desde el número de detalle del comprobante, +From Voucher No,Del número de comprobante, +From Voucher Type,Desde el tipo de comprobante, +From and To dates are required,Las fechas desde y hasta son obligatorias, +Full and Final Statement,Declaración completa y definitiva, +GL Balance,Balance GL, +GL Entry Processing Status,Estado de procesamiento de la entrada GL, +GL reposting index,Índice de traspaso GL, +Gain/Loss accumulated in foreign currency account. Accounts with '0' balance in either Base or Account currency,Ganancia/pérdida acumulada en cuenta en moneda extranjera. Cuentas con saldo “0” en moneda base o de cuenta, +Gain/Loss already booked,Ganancias/pérdidas ya contabilizadas, +Gain/Loss from Revaluation,Ganancias/pérdidas por revalorización, +General Ledger,Balance general,Warehouse +General and Payment Ledger Comparison,Comparación de los libros mayor y de pagos, +General and Payment Ledger mismatch,Desajuste entre el Libro Mayor y el Libro de Pagos, +Generate Closing Stock Balance,Generar balance de cierre de stock, +Generate Demo Data for Exploration,Generar datos de demostración para la exploración, +Generate E-Invoice,Generar E-Factura, +Generate Invoice At,Generar factura el, +Generated,Generado, +Generating Preview,Generando vista previa, +Get Allocations,Obtener Asignaciones, +Get Customer Group Details,Obtener Detalles del Grupo de Clientes, +Get Finished Goods for Manufacture,Obtener productos acabados para su fabricación, +Get Outstanding Orders,Obtener pedidos pendientes, +Get Raw Materials Cost from Consumption Entry,Obtenga el coste de las materias primas a partir de la entrada de consumo, +Get Raw Materials for Purchase,Obtener materias primas para comprar, +Get Raw Materials for Transfer,Obtener materias primas para el traslado, +Get Scrap Items,Obtener artículos de desecho, +Get Stock,Obtener existencias, +Get Sub Assembly Items,Obtener artículos de subensamblaje, +Get Supplier Group Details,Obtener detalles del grupo de proveedores, +Get Timesheets,Obtener Hojas de Tiempo, +Get stops from,Obtener paradas de, +Getting Scrap Items,Obtener artículos de desecho, +Give free item for every N quantity,Regale un artículo gratis por cada cantidad N, +Go back,Volver, +Go to {0} List,Ir a la lista {0}, +Goals,Objetivos, +Goods,Mercancías, +Grant Commission,Conceder Comisión, +Greeting Message,Mensaje de saludo, +Gross Profit Percent,Porcentaje de beneficio bruto, +Gross Purchase Amount Too Low: {0} cannot be depreciated over {1} cycles with a frequency of {2} depreciations.,Importe bruto de compra demasiado bajo: {0} no puede amortizarse a lo largo de {1} ciclos con una frecuencia de {2} amortizaciones., +Gross Purchase Amount should be equal to purchase amount of one single Asset.,El monto bruto de compra debe ser igual a al monto de compra de un solo activo., +Group Same Items,Agrupar mismos artículos, +Growth View,Vista de Crecimiento, +Half-yearly,Medio año, +Handle Employee Advances,Gestionar los anticipos de los empleados, +Has Alternative Item,Tiene Ítem Alternativo, +Has Item Scanned,Tiene artículos escaneados, +Has Priority,Tiene prioridad, +Have Default Naming Series for Batch ID?,¿Dispone de series de nombres por defecto para el ID de lote?, +Heatmap,Mapa de calor, +Height (cm),Altura (cm), +"Hello,","Hola,", +Helps you distribute the Budget/Target across months if you have seasonality in your business.,Le ayuda a distribuir el Presupuesto/Objetivo a lo largo de los meses si tiene estacionalidad en su negocio., +Here are the error logs for the aforementioned failed depreciation entries: {0},A continuación se muestran los registros de errores de las entradas de depreciación fallidas mencionadas anteriormente: {0}, +Here are the options to proceed:,Estas son las opciones para proceder:, +"Here, you can select a senior of this Employee. Based on this, Organization Chart will be populated.","Aquí puede seleccionar un superior de este Empleado. Basándose en esto, se rellenará el Organigrama.", +"Here, your weekly offs are pre-populated based on the previous selections. You can add more rows to also add public and national holidays individually.","Aquí, los días libres semanales se rellenan previamente en función de las selecciones anteriores. Puede agregar más filas para agregar también días festivos públicos y nacionales de forma individual.", +"Hi,","Hola,", +Hide Images,Ocultar Imágenes, +Holiday Date {0} added multiple times,Fecha de vacaciones {0} añadida varias veces, +Hours Spent,Horas Dedicadas, +How often should Project be updated of Total Purchase Cost ?,¿Con qué frecuencia debe actualizarse el proyecto del coste total de compra?, +Idle,Inactivo, +"If Enabled - Reconciliation happens on the Advance Payment posting date
+If Disabled - Reconciliation happens on oldest of 2 Dates: Invoice Date or the Advance Payment posting date
+","Si está habilitado : la conciliación se realiza en la fecha de contabilización del pago por adelantado
+Si está deshabilitado : la conciliación se realiza en la fecha más antigua de las 2 fechas: fecha de factura o la fecha de contabilización del pago por adelantado
+", +"If an operation is divided into sub operations, they can be added here.","Si una operación se divide en suboperaciones, éstas pueden añadirse aquí.", +"If checked, Rejected Quantity will be included while making Purchase Invoice from Purchase Receipt.","Si se marca, la Cantidad Rechazada se incluirá al hacer la Factura de Compra a partir del Recibo de Compra.", +"If checked, Stock will be reserved on Submit","Si está marcado, se reservarán las existencias al Validar", +"If checked, picked qty won't automatically be fulfilled on submit of pick list.","Si se marca, la cantidad seleccionada no se completará automáticamente al validar la lista de selección.", +"If checked, the tax amount will be considered as already included in the Paid Amount in Payment Entry","Si está marcada, el importe del impuesto se considerará ya incluido en el Importe pagado en la Entrada de pago", +"If checked, we will create demo data for you to explore the system. This demo data can be erased later.","Si está marcada, crearemos datos de demostración para que explore el sistema. Estos datos de demostración pueden borrarse posteriormente.", +If enabled then system will manufacture Sub-assembly against the Job Card (operation).,"Si se activa, el sistema fabricará el subconjunto según la tarjeta de trabajo (operación).", +If enabled then system won't apply the pricing rule on the delivery note which will be create from the pick list,"Si se activa, el sistema no aplicará la regla de precios en el albarán que se creará a partir de la lista de selección.", +If enabled then system won't override the picked qty / batches / serial numbers.,"Si se activa, el sistema no anulará las cantidades / lotes / números de serie elegidos.", +"If enabled, a print of this document will be attached to each email","Si está habilitado, se adjuntará una impresión de este documento a cada correo electrónico", +"If enabled, additional ledger entries will be made for discounts in a separate Discount Account","Si está habilitado, se realizarán entradas contables adicionales para descuentos en una cuenta de descuento separada", +"If enabled, all files attached to this document will be attached to each email","Si está habilitado, todos los archivos adjuntos a este documento se adjuntarán a cada correo electrónico.", +"If enabled, do not update serial / batch values in the stock transactions on creation of auto Serial + / Batch Bundle. ","Si está habilitado, no actualice los valores de serie/lote en las transacciones de stock al crear automáticamente el paquete de serie + /lote. ", +"If enabled, ledger entries will be posted for change amount in POS transactions","Si se activa, se contabilizarán las entradas en el libro mayor para el importe de cambio en las transacciones de TPV", +"If enabled, the consolidated invoices will have rounded total disabled","Si se activa, las facturas consolidadas tendrán el total redondeado desactivado", +"If enabled, the item rate won't adjust to the valuation rate during internal transfers, but accounting will still use the valuation rate.","Si está activada, la tasa del artículo no se ajustará a la tasa de valoración durante las transferencias internas, pero la contabilidad seguirá utilizando la tasa de valoración.", +"If enabled, the system will create material requests even if the stock exists in the 'Raw Materials Warehouse'.","Si se activa, el sistema creará solicitudes de material aunque haya existencias en el ""Almacén de materias primas"".", +"If enabled, the system will use the moving average valuation method to calculate the valuation rate for the batched items and will not consider the individual batch-wise incoming rate.","Si se activa, el sistema utilizará el método de valoración media móvil para calcular la tasa de valoración de los artículos por lotes y no tendrá en cuenta la tasa de entrada individual por lotes.", +"If enabled, then system will only validate the pricing rule and not apply automatically. User has to manually set the discount percentage / margin / free items to validate the pricing rule","Si está activada, el sistema sólo validará la regla de precios y no la aplicará automáticamente. El usuario debe establecer manualmente el porcentaje de descuento / margen / artículos gratuitos para validar la regla de precios.", +"If mentioned, the system will allow only the users with this Role to create or modify any stock transaction earlier than the latest stock transaction for a specific item and warehouse. If set as blank, it allows all users to create/edit back-dated transactions.","Si se menciona, el sistema permitirá sólo a los usuarios con este Rol crear o modificar cualquier transacción de existencias anterior a la última transacción de existencias para un artículo y almacén específicos. Si se establece en blanco, permite a todos los usuarios crear/editar transacciones con fecha anterior.", +"If not, you can Cancel / Submit this entry","En caso contrario, puedes Cancelar/Validar esta entrada", +"If rate is zero then item will be treated as ""Free Item""","Si la tarifa es cero, el artículo se tratará como ""Artículo gratuito"".", +"If the BOM results in Scrap material, the Scrap Warehouse needs to be selected.","Si la lista de materiales arroja como resultado material de desecho, se debe seleccionar el almacén de desecho.", +"If the selected BOM has Operations mentioned in it, the system will fetch all Operations from BOM, these values can be changed.","Si la lista de materiales seleccionada tiene Operaciones mencionadas en ella, el sistema obtendrá todas las Operaciones de la lista de materiales, estos valores pueden modificarse.", +"If this checkbox is enabled, then the system won’t run the MRP for the available sub-assembly items.","Si esta casilla de verificación está activada, el sistema no ejecutará la planificación de necesidades para los artículos de subensamblaje disponibles.", +If this is undesirable please cancel the corresponding Payment Entry.,"Si no lo desea, anule el asiento de pago correspondiente.", +"If yes, then this warehouse will be used to store rejected materials","En caso afirmativo, este almacén se utilizará para almacenar los materiales rechazados", +"If you are maintaining stock of this Item in your Inventory, ERPNext will make a stock ledger entry for each transaction of this item.","Si mantiene existencias de este artículo en su inventario, ERPNext realizará una entrada en el libro de existencias para cada transacción de este artículo.", +"If you need to reconcile particular transactions against each other, then please select accordingly. If not, all the transactions will be allocated in FIFO order.","Si necesita conciliar transacciones específicas entre sí, seleccione la opción correspondiente. De lo contrario, todas las transacciones se asignarán en orden FIFO.", +"If you still want to proceed, please disable 'Skip Available Sub Assembly Items' checkbox.","Si aún así desea continuar, desactive la casilla 'Omitir elementos de subensamblaje disponibles'.", +"If you still want to proceed, please enable {0}.","Si aún desea continuar, habilite {0}.", +"If your CSV uses a different delimiter, add that character here, ensuring no spaces or additional characters are included.","Si su CSV utiliza un delimitador diferente, añada ese carácter aquí, asegurándose de no incluir espacios ni caracteres adicionales.", +Ignore Account Closing Balance,Ignorar el saldo de cierre de la cuenta, +Ignore Available Stock,Ignorar stock disponible, +Ignore Closing Balance,Ignorar el saldo de cierre, +Ignore Default Payment Terms Template,Ignorar Plantilla de Términos de Pago Predeterminado, +Ignore Empty Stock,Ignorar Stock Vacío, +Ignore Exchange Rate Revaluation Journals,Ignorar los Diarios de Revaluación del Tipo de Cambio, +Ignore Pricing Rule is enabled. Cannot apply coupon code.,La opción Ignorar regla de precios está habilitada. No se puede aplicar el código de cupón., +Ignore System Generated Credit / Debit Notes,Ignorar las notas de crédito / débito generadas por el sistema, +Ignore Voucher Type filter and Select Vouchers Manually,Ignorar el filtro de tipo de cupón y seleccionar cupones manualmente, +Impairment,Deteriorado, +Import File,Importar archivo, +Import File Errors and Warnings,Importar errores y advertencias de archivos, +Import Log Preview,Vista previa de registro de importación, +Import Preview,Vista previa de importación, +Import Progress,Progreso de importación, +Import Type,Tipo de importación, +Import Using CSV file,Importación mediante archivo CSV, +Import Warnings,Advertencias de importación, +Import from Google Sheets,Importar desde Google Sheets, +"Importing {0} of {1}, {2}","Importar {0} de {1}, {2}", +In House,En casa, +In Minutes,En Minutos, +In Party Currency,En moneda del individuo, +In Transit Transfer,Transferencia en tránsito, +In Transit Warehouse,Almacén en Tránsito, +In mins,En minutos, +"In row {0} of Appointment Booking Slots: ""To Time"" must be later than ""From Time"".","En la fila {0} de las franjas horarias de reserva de citas: ""Hora de llegada"" debe ser posterior a ""Hora de salida"".", +"In the case of 'Use Multi-Level BOM' in a work order, if the user wishes to add sub-assembly costs to Finished Goods items without using a job card as well the scrap items, then this option needs to be enable.","En el caso de ""Utilizar lista de materiales multi-nivel"" en una orden de trabajo, si el usuario desea añadir costes de subconjuntos a los artículos de productos acabados sin utilizar una ficha de trabajo, así como a los artículos de desecho, deberá activar esta opción.", +"In this section, you can define Company-wide transaction-related defaults for this Item. Eg. Default Warehouse, Default Price List, Supplier, etc.","En esta sección, puede definir los valores predeterminados relacionados con las transacciones de toda la empresa para este Artículo. Por ejemplo, Almacén por defecto, Lista de precios por defecto, Proveedor, etc.", +Inactive Status,Estado inactivo, +Include Account Currency,Incluir la divisa de la cuenta, +Include Closed Orders,Incluye Pedidos Cerrados, +Include Default FB Assets,Incluir activos FB por defecto, +Include Disabled,Incluye Deshabilitado, +Include Expired Batches,Incluir lotes caducados, +Include Safety Stock in Required Qty Calculation,Incluir stock de seguridad en el cálculo de cantidad requerida, +Include Timesheets in Draft Status,Incluir hojas de horas en estado borrador, +Include Zero Stock Items,Incluir Productos sin existencias, +Incoming Call Handling Schedule,Programa de gestión de llamadas entrantes, +Incoming Call Settings,Configuración de llamadas entrantes, +Incoming Rate (Costing),Tarifa de entrada (costo), +Incorrect Balance Qty After Transaction,Cantidad de saldo incorrecta tras la transacción, +Incorrect Batch Consumed,Lote incorrecto consumido, +Incorrect Check in (group) Warehouse for Reorder,Comprobación incorrecta en (grupo) Almacén para Reordenar, +Incorrect Component Quantity,Cantidad incorrecta de componentes, +Incorrect Invoice,Factura incorrecta, +Incorrect Movement Purpose,Movimiento incorrecto Propósito, +Incorrect Payment Type,Tipo de pago incorrecto, +Incorrect Reference Document (Purchase Receipt Item),Documento de referencia incorrecto (partida de recibo de compra), +Incorrect Serial No Valuation,Valoración incorrecta del número de serie, +Incorrect Serial Number Consumed,Número de serie incorrecto Consumido, +Incorrect Stock Value Report,Informe incorrecto sobre el valor de las existencias, +Incorrect Type of Transaction,Tipo de transacción incorrecto, +Increase In Asset Life(Months),Aumento de la vida útil del activo (meses), +Indent,Sangría, +Indirect Expense,Gastos Indirectos, +Individual GL Entry cannot be cancelled.,La inscripción GL individual no puede cancelarse., +Individual Stock Ledger Entry cannot be cancelled.,La entrada individual en el Libro Mayor no puede cancelarse., +Initialize Summary Table,Inicializar tabla resumen, +Insert New Records,Insertar nuevos registros, +Inspection Rejected,Inspección Rechazada, +Inspection Submission,Presentación de la inspección, +Instruction,Instrucción, +Insufficient Capacity,Capacidad Insuficiente, +Insufficient Stock for Batch,Stock insuficiente para el lote, +Inter Transfer Reference,Referencia de inter transferencia, +Interest and/or dunning fee,Intereses y/o gastos de reclamación, +Internal,Interno, +Internal Customer,Cliente Interno, +Internal Customer for company {0} already exists,Cliente Interno para empresa {0} ya existe, +Internal Sale or Delivery Reference missing.,Falta referencia de venta o entrega interna., +Internal Sales Reference Missing,Falta la referencia de ventas internas, +Internal Supplier,Proveedor Interno, +Internal Supplier for company {0} already exists,El Proveedor Interno de la compañía {0} ya existe, +Internal Transfer Reference Missing,Falta referencia de transferencia interna, +Internal Transfers,Transferencias Internas, +Internal transfers can only be done in company's default currency,Las transferencias internas solo se pueden realizar en la moneda predeterminada de la empresa., +Invalid,Inválido, +Invalid Allocated Amount,Importe asignado no válido, +Invalid Amount,Importe no válido, +Invalid Auto Repeat Date,Fecha de repetición automática inválida, +Invalid Cost Center,Centro de Costo Inválido, +Invalid Delivery Date,Fecha de Entrega Inválida, +Invalid Document,Documento inválido, +Invalid Document Type,Tipo de Documento Inválido, +Invalid Formula,Fórmula Inválida, +Invalid Group By,Agrupar por no válido, +Invalid Item Defaults,Artículos por defecto no válidos, +Invalid Ledger Entries,Entradas no válidas en el libro mayor, +Invalid Primary Role,Función principal no válida, +Invalid Priority,Prioridad inválida, +Invalid Process Loss Configuration,Configuración de pérdida de proceso no válida, +Invalid Purchase Invoice,Factura de Compra no válida, +Invalid Qty,Cant. inválida, +Invalid Schedule,Programación no válida, +Invalid Serial and Batch Bundle,Paquete de serie y lote no válidos, +Invalid Warehouse,Almacén inválido, +Invalid result key. Response:,Clave de resultado no válida. Respuesta:, +Invalid value {0} for {1} against account {2},Valor no válido {0} para {1} contra la cuenta {2}, +Inventory Dimension,Dimensión del inventario, +Inventory Dimension Negative Stock,Dimensión del inventario Existencias negativas, +Inventory Settings,Configuración de Inventario, +Invoice Cancellation,Cancelación de facturas, +Invoice Limit,Límite de facturación, +Invoice Portion (%),Porción de Factura (%), +Invoice and Billing,Factura y facturación, +Invoiced Qty,Cant. Facturada, +Invoices and Payments have been Fetched and Allocated,Se han obtenido y asignado facturas y pagos, +Invoicing Features,Características de Facturación, +Is Adjustment Entry,Es entrada de ajuste, +Is Alternative,Es Alternativo, +Is Cash or Non Trade Discount,Es Efectivo o Descuento no Comercial, +Is Composite Asset,Es Activo compuesto, +Is Corrective Job Card,Es Tarjeta de Trabajo Correctiva, +Is Corrective Operation,Es Operación Correctiva, +Is Expandable,Es expansible, +Is Finished Item,Es un artículo acabado, +Is Fully Depreciated,Está completamente Depreciado, +Is Group Warehouse,Es Almacén de Grupo, +Is Old Subcontracting Flow,Es un antiguo flujo de subcontratación, +Is Outward,Es hacia afuera, +Is Period Closing Voucher Entry,Es la entrada de comprobante de cierre de período, +Is Rate Adjustment Entry (Debit Note),Es Entrada de Ajuste de Tarifa (Nota de Débito), +Is Recursive,Es recursivo, +Is Rejected,Rechazado, +Is Rejected Warehouse,Es Almacén de Rechazados, +Is Scrap Item,Es artículo de desecho, +Is Short Year,Es Año corto, +Is Standard,Es estándar, +Is Stock Item,Es artículo de stock, +Is System Generated,Es generado por el sistema, +Is Tax Withholding Account,Es una cuenta de retención de impuestos, +Is Template,Es Plantilla, +Issue Analytics,Análisis de Incidencias, +Issue Summary,Resumen de Incidencias, +Issue a debit note with 0 qty against an existing Sales Invoice,Emitir una Nota de Débito con cantidad 0 contra una Factura de Venta existente, +Issuing cannot be done to a location. Please enter employee to issue the Asset {0} to,No se puede emitir a una ubicación. Ingrese el empleado al que se emitirá el activo {0}, +It can take upto few hours for accurate stock values to be visible after merging items.,Pueden pasar algunas horas hasta que los valores de stock precisos sean visibles después de fusionar los elementos., +"It's not possible to distribute charges equally when total amount is zero, please set 'Distribute Charges Based On' as 'Quantity'","No es posible distribuir los cargos equitativamente cuando el importe total es cero, por favor configure 'Distribuir cargos en base a' como 'Cantidad'.", +Item Code (Final Product),Código de artículo (producto final), +Item Group wise Discount,Descuento por grupo de artículos, +Item Price Settings,Configuración del precio del artículo, +"Item Price appears multiple times based on Price List, Supplier/Customer, Currency, Item, Batch, UOM, Qty, and Dates.","El precio del producto aparece varias veces según la lista de precios, proveedor/cliente, moneda, producto, lote, unidad de medida, cantidad y fechas.", +Item Reference,Referencia del artículo, +Item Warehouse based reposting has been enabled.,Se ha habilitado el traspaso basado en el almacén de artículos., +Item and Warehouse,Producto y Almacén, +Item is removed since no serial / batch no selected.,El artículo se elimina al no haberse seleccionado ningún número de serie / lote., +Item qty can not be updated as raw materials are already processed.,La cantidad de artículos no puede actualizarse porque las materias primas ya están procesadas., +Item rate has been updated to zero as Allow Zero Valuation Rate is checked for item {0},La tasa del artículo se ha actualizado a cero ya que la opción Permitir tasa de valoración cero está marcada para el artículo {0}, +Item valuation reposting in progress. Report might show incorrect item valuation.,Traspaso de valoración de artículos en curso. El informe podría mostrar una valoración de artículos incorrecta., +Item {0} cannot be added as a sub-assembly of itself,El artículo {0} no puede añadirse como subconjunto de sí mismo, +Item {0} cannot be ordered more than {1} against Blanket Order {2}.,El artículo {0} no se puede pedir más de {1} contra el pedido general {2}., +Item {0} does not exist.,El artículo {0} no existe., +Item {0} entered multiple times.,Producto {0} ingresado varias veces., +Item {0} is already reserved/delivered against Sales Order {1}.,El artículo {0} ya está reservado/entregado contra el pedido de venta {1}., +Item {0} must be a Non-Stock Item,El artículo {0} debe ser un artículo que no se encuentra en stock, +Item {0} not found in 'Raw Materials Supplied' table in {1} {2},El artículo {0} no se encontró en la tabla 'Materias primas suministradas' en {1} {2}, +Item {0} not found.,Artículo {0} no encontrado., +Item {} does not exist.,Producto {0} no existe., +Items & Pricing,Productos y Precios, +Items Catalogue,Catálogo de Productos, +Items cannot be updated as Subcontracting Order is created against the Purchase Order {0}.,Los artículos no se pueden actualizar ya que la orden de subcontratación se crea contra la orden de compra {0}., +Items rate has been updated to zero as Allow Zero Valuation Rate is checked for the following items: {0},"La tasa de artículos se ha actualizado a cero, ya que la opción Permitir tasa de valoración cero está marcada para los siguientes artículos: {0}", +Items to Be Repost,Artículos a reenviar, +Items to Order and Receive,Productos para Ordenar y Recibir, +Items to Reserve,Artículos para reservar, +Items {0} do not exist in the Item master.,Los artículos {0} no existen en el maestro de artículos., +Job Capacity,Capacidad de Trabajo, +Job Card Operation,Ficha de trabajo Operación, +Job Card Scheduled Time,Ficha de trabajo Hora programada, +Job Card Scrap Item,Ficha de trabajo Artículo de desecho, +Job Card and Capacity Planning,Tarjeta de trabajo y planificación de capacidad, +Job Cards,Tarjetas de Trabajo, +Job Paused,Trabajo en pausa, +Job Worker,Trabajador, +Job Worker Address,Dirección del trabajador, +Job Worker Address Details,Datos de la dirección del trabajador, +Job Worker Contact,Contacto del trabajador, +Job Worker Delivery Note,Albarán del trabajador, +Job Worker Name,Nombre del trabajador, +Job Worker Warehouse,Trabajador de almacén, +Job: {0} has been triggered for processing failed transactions,Trabajo: {0} se ha activado para procesar transacciones fallidas, +Joining,Uniéndose, +Journal Entries,Entradas de diario, +Journal Entry for Asset scrapping cannot be cancelled. Please restore the Asset.,No se puede cancelar la entrada del diario correspondiente al desguace de activos. Restaure el activo., +Journal Entry type should be set as Depreciation Entry for asset depreciation,El tipo de entrada de diario debe configurarse como Entrada de depreciación para la depreciación de activos., +Journal entries have been created,Se han creado entradas de diario, +Journals,Diarios, +Key,Clave, +Kindly cancel the Manufacturing Entries first against the work order {0}.,Por favor cancele primero las entradas de fabricación contra la orden de trabajo {0}., +"Last Name, Email or Phone/Mobile of the user are mandatory to continue.","Apellido, Email o Teléfono/Móvil del usuario son obligatorios para continuar.", +Lead -> Prospect,Cliente potencial -> Prospecto, +Lead Conversion Time,Tiempo de conversión de clientes potenciales, +Lead Owner cannot be same as the Lead Email Address,El propietario del cliente potencial no puede ser el mismo que la dirección de correo electrónico del cliente potencial, +Lead {0} has been added to prospect {1}.,El cliente potencial {0} se ha agregado al prospecto {1}., +Leaderboard,Tabla de líderes, +Leads,Clientes potenciales, +Learn Accounting,Aprender Contabilidad, +Learn Inventory Management,Aprende la Gestión del Inventario, +Learn Manufacturing,Aprender Manufactura, +Learn Procurement,Aprender Compras, +Learn Project Management,Aprender Gestión de Proyecto, +Learn Sales Management,Aprender Gestión de Ventas, +"Learn about Common Party","Conozca más sobre Partes comúnes", +"Leave blank for home. +This is relative to site URL, for example ""about"" will redirect to ""https://yoursitename.com/about""","Déjelo en blanco para la página de inicio. +Esto es relativo a la URL del sitio, por ejemplo ""acerca de"" redirigirá a ""https://yoursitename.com/about""", +Ledger Health,Estado del libro mayor, +Ledger Health Monitor,Monitor de estado del libro mayor, +Ledger Health Monitor Company,Monitor de estado del libro mayor Empresa, +Ledger Merge,Fusión de libro mayor, +Ledger Merge Accounts,Cuentas de fusión de libro mayor, +Ledgers,Libros mayores, +Left Child,Secundario izquierdo, +Legend,Leyenda, +Length,Largo, +Length (cm),Longitud (cm), +Less than 12 months.,Menos de 12 meses., +Level (BOM),Nivel (lista de materiales), +Limit timeslot for Stock Reposting,Limitar el tiempo disponible para la reubicación de existencias, +Limits don't apply on,Los límites no se aplican en, +Link a new bank account,Vincular una nueva cuenta bancaria, +Link with Customer,Enlace con el cliente, +Link with Supplier,Enlace con el proveedor, +Linked with submitted documents,Vinculado con los documentos validados, +Linking Failed,Enlace fallido, +Linking to Customer Failed. Please try again.,Error al vincular al cliente. Inténtalo de nuevo., +Linking to Supplier Failed. Please try again.,Error al vincular al proveedor. Inténtalo nuevamente., +Links,Enlaces, +Loading import file...,Cargando archivo de importación..., +Locked,Bloqueado, +Log Entries,Entradas de registro, +Log the selling and buying rate of an Item,Registra la tasa de venta y compra de un artículo, +Lost Quotations,Cotizaciones perdidas, +Lost Quotations %,Cotizaciones perdidas %, +Lost Reasons are required in case opportunity is Lost.,Se requieren motivos de pérdida en caso de que se pierda la oportunidad., +Lost Value,Valor perdido, +Lost Value %,% de valor perdido, +Machine Type,Tipo de Máquina, +Main Cost Center,Centro de Costo principal, +Main Cost Center {0} cannot be entered in the child table,El centro de costo principal {0} no se puede ingresar en la tabla secundaria, +Maintain Asset,Mantener activos, +Maintenance Details,Detalles de mantenimiento, +Make ,Crear , +Make Asset Movement,Realizar movimiento de activos, +Make Quotation,Hacer Cotización, +Make Return Entry,Hacer Entrada de Devolución, +Make Serial No / Batch from Work Order,Crear número de serie/lote a partir de la orden de trabajo, +Make {0} Variant,Hacer {0} variante, +Make {0} Variants,Hacer {0} variantes, +Making Journal Entries against advance accounts: {0} is not recommended. These Journals won't be available for Reconciliation.,No se recomienda realizar asientos contables contra cuentas anticipadas: {0} . Estos asientos contables no estarán disponibles para la conciliación., +Manage,Gestionar, +Mandatory Accounting Dimension,Dimensión contable obligatoria, +Mandatory Depends On,Obligatorio depende de, +Mandatory Field,Campo obligatorio, +Mandatory Section,Sección obligatoria, +Manual Inspection,Inspección Manual, +Manufacture Sub-assembly in Operation,Subensamblaje de Manufactura en Operación, +Manufacturing Type,Tipo de fabricación, +Mapping Purchase Receipt ...,Mapeando Recibo de Compra..., +Mapping Subcontracting Order ...,Mapeando órdenes de subcontratación..., +Mapping {0} ...,Mapeando {0} ..., +Margin View,Vista de Margen, +Mark As Closed,Marcar como cerrado, +Material Returned from WIP,Material devuelto de WIP, +Material Transfer (In Transit),Transferencia de material (en tránsito), +Materials are already received against the {0} {1},Los materiales ya se recibieron contra el {0} {1}, +Materials needs to be transferred to the work in progress warehouse for the job card {0},Es necesario transferir los materiales al almacén de trabajos en curso para la ficha de trabajo {0}, +Max Qty (As Per Stock UOM),Cantidad máxima (según unidad de medida en existencia), +Maximum Net Rate,Tasa Neta Máxima, +Maximum Payment Amount,Importe máximo del pago, +Maximum Value,Valor Máximo, +Maximum quantity scanned for item {0}.,Cantidad máxima escaneada para el artículo {0}., +Meeting,Reunión, +Mention if non-standard Receivable account,Indique si no es Cuenta por Cobrar estándar, +Merge Invoices Based On,Fusionar facturas en función de, +Merge Progress,Progreso de fusión, +Merge Similar Account Heads,Fusionar cuentas similares, +Merge taxes from multiple documents,Fusionar impuestos de varios documentos, +Merged,Combinado, +"Merging is only possible if following properties are same in both records. Is Group, Root Type, Company and Account Currency","La fusión solo es posible si las siguientes propiedades son las mismas en ambos registros: grupo, tipo de raíz, empresa y moneda de la cuenta.", +Merging {0} of {1},Fusionando {0} de {1}, +Min Qty (As Per Stock UOM),Cant. mín. (según UdM en almacén), +Min Qty should be greater than Recurse Over Qty,La cantidad mínima debe ser mayor que la cantidad recursiva, +Minimum Net Rate,Tasa Neta Mínima, +Minimum Payment Amount,Importe mínimo de pago, +Minimum Value,Valor mínimo, +Mismatch,Desajuste, +Missing,Faltante, +Missing Asset,Activo faltante, +Missing Cost Center,Centro de costos faltante, +Missing Finance Book,Falta el libro de finanzas, +Missing Finished Good,Falta Acabado Bueno, +Missing Formula,Falta fórmula, +Missing Items,Faltan artículos, +Missing Payments App,Aplicación de pagos faltantes, +Missing Serial No Bundle,Falta el número de serie del paquete, +Missing value,Valor faltante, +Modified By,Modificado por, +Modified On,Modificado el, +Module Settings,Configuración de Módulos, +Monitor for Last 'X' days,"Monitorización de los últimos ""X"" días", +Move Stock,Mover Stock, +Move to Cart,Mover al carrito, +Movement,Movimiento, +Moving up in tree ...,Subiendo en árbol ..., +Multi-level BOM Creator,Creador de listas de materiales multinivel, +Multiple Loyalty Programs found for Customer {}. Please select manually.,Se encontraron varios programas de fidelización para el cliente {}. Seleccione manualmente., +Multiple Warehouse Accounts,Múltiples cuentas de almacén, +Multiple items cannot be marked as finished item,No se pueden marcar varios artículos como artículo terminado, +Must be a publicly accessible Google Sheets URL and adding Bank Account column is necessary for importing via Google Sheets,Debe ser una URL de Hojas de cálculo de Google de acceso público y es necesario agregar la columna Cuenta bancaria para importar a través de Hojas de cálculo de Google., +Named Place,Lugar nombrado, +Naming Series and Price Defaults,Series de Nombres y Precios por Defecto, +Net total calculation precision loss,Pérdida neta total de precisión de cálculo, +New Balance In Account Currency,Nuevo saldo en la moneda de la cuenta, +New Event,Nuevo Evento, +New Note,Nueva Nota, +New Task,Nueva Tarea, +New Version,Nueva versión, +Newsletter,Boletín de noticias, +No Answer,Sin respuesta, +No Customers found with selected options.,No se encontraron clientes con las opciones seleccionadas., +No Items selected for transfer.,No hay artículos seleccionados para transferir., +No Matching Bank Transactions Found,No se han encontrado transacciones bancarias coincidentes, +No Notes,Sin notas, +No Outstanding Invoices found for this party,No se encontraron facturas pendientes para esta parte, +No POS Profile found. Please create a New POS Profile first,"No se ha encontrado ningún Perfil de PV. Por favor, cree primero un Nuevo Perfil PV", +No Records for these settings.,No hay registros para estas configuraciones., +No Serial / Batches are available for return,No hay números de serie ni lotes disponibles para devolución, +No Stock Available Currently,No hay existencias disponibles actualmente, +No Summary,Sin resumen, +No Tax Withholding data found for the current posting date.,No se han encontrado datos de retenciones fiscales para la fecha de contabilización actual., +No Terms,Sin términos, +No Unreconciled Invoices and Payments found for this party and account,No se encontraron facturas ni pagos sin conciliar para esta parte y cuenta, +No Unreconciled Payments found for this party,No se encontraron pagos no conciliados para esta parte, +No Work Orders were created,No se crearon órdenes de trabajo, +No additional fields available,No hay campos adicionales disponibles, +No billing email found for customer: {0},No se encontró ningún correo electrónico de facturación para el cliente: {0}, +No data found. Seems like you uploaded a blank file,No se encontraron datos. Parece que has subido un archivo en blanco., +No employee was scheduled for call popup,No se programó ningún empleado para la ventana emergente de llamada, +No failed logs,No hay registros fallidos, +No item available for transfer.,No hay ningún artículo disponible para transferencia., +No items are available in sales orders {0} for production,No hay artículos disponibles en los pedidos de venta {0} para producción, +No items are available in the sales order {0} for production,No hay artículos disponibles en la orden de venta {0} para producción, +No items in cart,No hay artículos en el carrito, +No matches occurred via auto reconciliation,No se produjeron coincidencias mediante la conciliación automática, +No more children on Left,No más secundarios en la izquierda, +No more children on Right,No más secundarios en la derecha, +No of Docs,Nº de documentos, +No of Employees,Núm. de Empleados, +No of Months (Expense),Nº de meses (gastos), +No of Months (Revenue),Nº de meses (Ingresos), +No open event,Ningún evento abierto, +No open task,Sin tareas abiertas, +No outstanding {0} found for the {1} {2} which qualify the filters you have specified.,No se encontraron {0} pendientes para los {1} {2} que califican para los filtros que ha especificado., +No primary email found for customer: {0},No se encontró ningún correo electrónico principal para el cliente: {0}, +No records found in Allocation table,No se encontraron registros en la tabla de asignación, +No records found in the Invoices table,No se encontraron registros en la tabla Facturas, +No records found in the Payments table,No se encontraron registros en la tabla Pagos, +No stock transactions can be created or modified before this date.,No se podrán crear ni modificar transacciones de stock antes de esta fecha., +No {0} Accounts found for this company.,No se han encontrado cuentas en {0} para esta empresa., +No.,Nº, +No. of Employees,Núm. de Empleados, +No. of parallel job cards which can be allowed on this workstation. Example: 2 would mean this workstation can process production for two Work Orders at a time.,Nº de tarjetas de trabajo paralelas que se pueden permitir en esta estación de trabajo. Ejemplo: 2 significaría que esta estación de trabajo puede procesar la producción de dos Órdenes de Trabajo a la vez., +Note: Automatic log deletion only applies to logs of type Update Cost,Nota: El borrado automático de registros sólo se aplica a los registros de tipo Coste de actualización, +"Note: To merge the items, create a separate Stock Reconciliation for the old item {0}","Nota: Para fusionar los artículos, cree una reconciliación de existencias separada para el antiguo artículo {0}.", +Notes HTML,Notas HTML, +Notification,Notificación, +Notification Settings,Configuración de las notificaciones, +Notify Reposting Error to Role,Notificar error de reenvío al rol, +Number of Days,Número de días, +Numeric,Numérico, +Numeric Inspection,Inspección numérica, +Off,Apagado, +Offsetting Account,Cuenta de compensación, +Offsetting for Accounting Dimension,Compensación de la dimensión contable, +On Paid Amount,Sobre el importe pagado, +On This Date,En esta fecha, +On Track,En marcha, +On enabling this cancellation entries will be posted on the actual cancellation date and reports will consider cancelled entries as well,Al habilitar esta cancelación las entradas se contabilizarán en la fecha real de cancelación y los informes también tendrán en cuenta las entradas canceladas, +"On expanding a row in the Items to Manufacture table, you'll see an option to 'Include Exploded Items'. Ticking this includes raw materials of the sub-assembly items in the production process.","Al expandir una fila en la tabla de Artículos para fabricar, verá una opción para ""Incluir artículos despiezados"". Al marcar esta opción, se incluyen las materias primas de los artículos del subconjunto en el proceso de producción.", +"On submission of the stock transaction, system will auto create the Serial and Batch Bundle based on the Serial No / Batch fields.","En la validación la transacción de existencias, el sistema creará automáticamente el lote de series y lotes basándose en los campos Número de serie / Lote.", +Once the Work Order is Closed. It can't be resumed.,Una vez cerrada la Orden de Trabajo. No se puede reanudar., +Only 'Payment Entries' made against this advance account are supported.,Sólo se admiten 'Entradas de pago' realizadas contra esta cuenta de anticipo., +Only CSV and Excel files can be used to for importing data. Please check the file format you are trying to upload,Solo se pueden utilizar archivos CSV y Excel para importar datos. Verifique el formato del archivo que intenta cargar, +Only Deduct Tax On Excess Amount ,Deducir impuestos solo sobre el importe excedente , +Only Include Allocated Payments,Incluir sólo los pagos asignados, +Only Parent can be of type {0},Sólo el principal puede ser del tipo {0}, +Only existing assets,Solo activos existentes, +"Only one Subcontracting Order can be created against a Purchase Order, cancel the existing Subcontracting Order to create a new one.",Solo se puede crear una orden de subcontratación contra una orden de compra; cancele la orden de subcontratación existente para crear una nueva., +Only one {0} entry can be created against the Work Order {1},Solo se puede crear una entrada {0} contra la orden de trabajo {1}, +"Only values between [0,1) are allowed. Like {0.00, 0.04, 0.09, ...} +Ex: If allowance is set at 0.07, accounts that have balance of 0.07 in either of the currencies will be considered as zero balance account","Solo se permiten valores entre [0,1). Como {0,00, 0,04, 0,09, ...} +Ejemplo: si la asignación se establece en 0,07, las cuentas que tengan un saldo de 0,07 en cualquiera de las monedas se considerarán cuentas con saldo cero.", +Only {0} are supported,Solo se admiten {0}, +Open Activities HTML,Abrir actividades HTML, +Open Call Log,Abrir registro de llamadas, +Open Event,Abrir Evento, +Open Events,Eventos abiertos, +Open Sales Orders,Órdenes de venta abiertas, +Open Task,Abrir tarea, +Open Tasks,Tareas abiertas, +Open Work Order {0},Orden de trabajo abierta {0}, +Opening & Closing,Apertura y cierre, +Opening Accumulated Depreciation must be less than or equal to {0},La depreciación acumulada de apertura debe ser inferior o igual a {0}., +Opening Entry can not be created after Period Closing Voucher is created.,El asiento de apertura no puede crearse después de haber creado el comprobante de cierre del período., +Opening Number of Booked Depreciations,Número de apertura de depreciaciones registradas, +Opening Purchase Invoices have been created.,Se han creado facturas de compra de apertura., +Opening Sales Invoices have been created.,Se han creado facturas de venta de apertura., +Operating Cost Per BOM Quantity,Coste operativo por cantidad de la lista de materiales, +Operation time does not depend on quantity to produce,El tiempo de operación no depende de la cantidad a producir, +Opportunity Amount (Company Currency),Valor de la oportunidad (moneda de la empresa), +Opportunity Owner,Propietario de oportunidad, +Opportunity Source,Fuente de oportunidad, +Opportunity Summary by Sales Stage,Resumen de oportunidades por etapa de venta, +Opportunity Summary by Sales Stage ,Resumen de oportunidades por etapa de venta , +Opportunity Value,Valor de oportunidad, +Order Status,Estado del Pedido, +Other Info,Información adicional, +Out of stock,Agotado, +Over Picking Allowance,Tolerancia por exceso de recogida, +Over Receipt,Sobre recibo, +Over Receipt/Delivery of {0} {1} ignored for item {2} because you have {3} role.,Se ignora la recepción/entrega excesiva de {0} {1} para el artículo {2} porque tiene el rol {3} ., +Over Transfer Allowance,Exceso de asignación por transferencia, +Overbilling of {0} {1} ignored for item {2} because you have {3} role.,Sobrefacturación de {0} {1} ignorada para el artículo {2} porque tiene el rol {3} ., +Overbilling of {} ignored because you have {} role.,Se ignora la sobrefacturación de {} porque tiene el rol {}., +Overdue Payment,Pago vencido, +Overdue Payments,Pagos vencidos, +Overdue Tasks,Tareas atrasadas, +Overview,Visión general, +PDF Name,Nombre del PDF, +POS Closing Failed,Cierre de TPV fallido, +POS Closing failed while running in a background process. You can resolve the {0} and retry the process again.,El Cierre del TPV falló mientras se ejecutaba un proceso en segundo plano. Puede resolver el {0} y reintentar el proceso de nuevo., +POS Invoice is already consolidated,La factura del TPV ya está consolidada, +POS Invoice is not submitted,La factura del TPV no se presenta, +POS Invoice should have the field {0} checked.,La factura del TPV debe tener el campo {} marcado., +POS Invoices will be consolidated in a background process,Las facturas de TPV se consolidarán en un proceso en segundo plano, +POS Invoices will be unconsolidated in a background process,Las facturas de TPV no se consolidarán en un proceso en segundo plano, +POS Profile doesn't match {},El perfil de TPV no coincide con {}, +POS Profile {} contains Mode of Payment {}. Please remove them to disable this mode.,"El Perfil de TPV {} contiene el Modo de Pago {}. Por favor, elimínelos para desactivar este modo.", +POS Search Fields,Campos de búsqueda en el TPV, +POS Setting,Ajuste del TPV, +Package No(s) already in use. Try from Package No {0},Los números de paquete ya están en uso. Pruebe desde el número de paquete {0}, +Packaging Slip From Delivery Note,Recibo de embalaje de la nota de entrega, +Packed Items cannot be transferred internally,Los artículos empaquetados no se pueden transferir internamente, +Packed Qty,Cantidad empaquetada, +Page Break After Each SoA,Salto de página después de cada SoA, +Paid Amount After Tax,Importe pagado después de impuestos, +Paid Amount After Tax (Company Currency),Importe pagado después de impuestos (moneda de la empresa), +Paid From Account Type,Pagado desde tipo de cuenta, +Paid To Account Type,Tipo de cuenta pagada, +Pallets,Palés, +Parameter Group,Grupo de parámetros, +Parameter Group Name,Nombre del grupo de parámetros, +Parcel Template,Plantilla de paquete, +Parcel Template Name,Nombre de la plantilla de parcela, +Parcel weight cannot be 0,El peso del paquete no puede ser 0, +Parcels,Paquetes, +Parent Account Missing,Falta la cuenta principal, +Parent Document,Documento Principal, +Parent Item {0} must not be a Fixed Asset,El artículo principal {0} no debe ser un activo fijo, +Parent Row No,Número de fila principal, +Parent Task {0} is not a Template Task,La tarea principal {0} no es una tarea de plantilla, +Partial Material Transferred,Material parcial transferido, +Partial Stock Reservation,Reserva parcial de stock, +Partial Success,Éxito Parcial, +"Partial stock can be reserved. For example, If you have a Sales Order of 100 units and the Available Stock is 90 units then a Stock Reservation Entry will be created for 90 units. ","Se puede reservar un stock parcial. Por ejemplo, si tiene un pedido de venta de 100 unidades y el stock disponible es de 90 unidades, se creará una entrada de reserva de stock para 90 unidades. ", +Partially Delivered,Entregado parcialmente, +Partially Reconciled,Parcialmente reconciliado, +Partially Reserved,Parcialmente reservado, +Partly Paid,Pagado parcialmente, +Partly Paid and Discounted,Parcialmente pagado y descontado, +Partnership,Asociación, +Party Account No. (Bank Statement),Número de cuenta de la Entidad(extracto bancario), +Party Account {0} currency ({1}) and document currency ({2}) should be same,La moneda de la cuenta de la Entidad {0} ({1}) y la moneda del documento ({2}) deben ser las mismas, +Party IBAN (Bank Statement),IBAN del destinatario (extracto bancario), +Party Item Code,Código de artículo de la Entidad, +Party Link,Enlace de la Entidad, +Party Name/Account Holder (Bank Statement),Nombre de la Entidad/titular de la cuenta (extracto bancario), +Party Specific Item,Producto específico de la Parte, +Party Type and Party is required for Receivable / Payable account {0},Se requiere el tipo de Entidad y la Entidad para la cuenta por cobrar/pagar {0}, +Party can only be one of {0},La Entidad solo puede ser una de {0}, +Passport Details,Datos del pasaporte, +Pause Job,Pausar trabajo, +Paused,Pausado, +Payment Amount (Company Currency),Importe del pago (moneda de la empresa), +"Payment Entry {0} is linked against Order {1}, check if it should be pulled as advance in this invoice.","La entrada de pago {0} está vinculada al pedido {1}, verifique si debe extraerse como anticipo en esta factura.", +Payment Ledger,Libro de pagos, +Payment Ledger Balance,Saldo del libro mayor de pagos, +Payment Ledger Entry,Entrada de libro mayor de pagos, +Payment Limit,Límite de pago, +Payment Reconciliation Allocation,Asignación de conciliación de pagos, +Payment Reconciliation Job: {0} is running for this party. Can't reconcile now.,Trabajo de conciliación de pagos: {0} se está ejecutando para esta parte. No se puede conciliar ahora., +Payment Reconciliations,Conciliaciones de pagos, +Payment Request Outstanding,Solicitud de pago pendiente, +Payment Request created from Sales Order or Purchase Order will be in Draft status. When disabled document will be in unsaved state.,"La solicitud de pago creada a partir de una orden de venta o una orden de compra estará en estado de borrador. Si está deshabilitada, el documento estará en estado de no guardado.", +Payment Request is already created,La solicitud de pago ya está creada, +Payment Request took too long to respond. Please try requesting for payment again.,La solicitud de pago tardó demasiado en responder. Intente solicitar el pago nuevamente., +Payment Requests cannot be created against: {0},No se pueden crear solicitudes de pago contra: {0}, +Payment Term Outstanding,Plazo de pago pendiente, +Payment Terms Status for Sales Order,Estado de las condiciones de pago de la orden de venta, +Payment Terms from orders will be fetched into the invoices as is,Las condiciones de pago de los pedidos se reflejarán en las facturas tal como están., +Payment Unlink Error,Error al desvincular el pago, +Payment of {0} received successfully.,Pago de {0} recibido exitosamente., +Payment of {0} received successfully. Waiting for other requests to complete...,Pago de {0} recibido con éxito. Esperando que se completen otras solicitudes..., +Payment request failed,Solicitud de pago fallida, +Payment term {0} not used in {1},Término de pago {0} no utilizado en {1}, +Pending processing,Pendiente de procesamiento, +Per Received,Por recibido, +Percentage (%),Porcentaje (%), +Percentage you are allowed to order beyond the Blanket Order quantity.,Porcentaje que se le permite pedir más allá de la cantidad del pedido general., +Percentage you are allowed to sell beyond the Blanket Order quantity.,Porcentaje que se le permite vender más allá de la cantidad del pedido general., +Period Closed,Período cerrado, +Period Closing Entry For Current Period,Asiento de cierre de período para el período actual, +Period Closing Settings,Configuración de cierre de período, +Period Details,Detalles del periodo, +Period To Date,Período hasta la fecha, +Period_from_date,Periodo_desde_fecha, +Phone Ext.,Extensión telefónica, +Pick List Incomplete,Lista de selección incompleta, +Pick Manually,Seleccionar manualmente, +Pick Serial / Batch Based On,Selección de serie / lote basada en, +Pick Serial / Batch No,Seleccione el número de serie/lote, +Picked Qty (in Stock UOM),Cantidad seleccionada (en stock UdM), +Pickup,Recogida, +Pickup Contact Person,Persona de contacto para la recogida, +Pickup Date,Fecha de recogida, +Pickup Date cannot be before this day,La fecha de recogida no puede ser anterior a este día., +Pickup From,Recoger de, +Pickup To time should be greater than Pickup From time,La hora de recogida hasta debe ser mayor que la hora de recogida desde, +Pickup Type,Tipo de recogida, +Pickup from,Recoger de, +Pickup to,Recogida a, +Pipeline By,Fuente de información por, +Plaid Link Failed,Vinculación a Plaid fallido, +Plaid Link Refresh Required,Se requiere actualización de la vinculación con Plaid, +Plaid Link Updated,Enlace de Plaid actualizado, +Plan to Request Qty,Plan para solicitar cantidad, +Plant Dashboard,Panel de control de la planta, +Plant Floor,Planta, +Please Set Priority,"Por favor, establezca la prioridad", +Please Specify Account,Por favor especifique la cuenta, +Please add 'Supplier' role to user {0}.,"Por favor, añada el rol 'Proveedor' al usuario {0}.", +Please add Request for Quotation to the sidebar in Portal Settings.,"Por favor, añada la Solicitud de Presupuesto a la barra lateral en los Ajustes del Portal.", +Please add Root Account for - {0},"Por favor, añada una cuenta raíz para - {0}", +Please add atleast one Serial No / Batch No,"Por favor, añada al menos un nº de serie / nº de lote", +Please add the Bank Account column,"Por favor, añada la columna Cuenta bancaria", +Please add the account to root level Company - {0},"Por favor, añada la cuenta al nivel raíz Empresa - {0}", +Please add {1} role to user {0}.,"Por favor, añada el rol {1} al usuario {0}.", +Please adjust the qty or edit {0} to proceed.,Ajuste la cantidad o edite {0} para continuar., +Please attach CSV file,Adjunte el archivo CSV, +Please cancel and amend the Payment Entry,"Por favor, cancele y modifique la Entrada de Pago", +Please cancel payment entry manually first,"Por favor, cancele primero la entrada del pago manualmente", +Please cancel related transaction.,"Por favor, cancele la transacción relacionada.", +Please check Process Deferred Accounting {0} and submit manually after resolving errors.,"Por favor, marque Procesar contabilidad diferida {0} y valídelo manualmente después de resolver los errores.", +Please check either with operations or FG Based Operating Cost.,Consulte con operaciones o con el costo operativo basado en FG., +Please check the error message and take necessary actions to fix the error and then restart the reposting again.,"Por favor, compruebe el mensaje de error y tome las medidas necesarias para solucionar el error y luego reinicie el reenvío de nuevo.", +Please check your email to confirm the appointment,"Por favor, compruebe su correo electrónico para confirmar la cita", +Please contact any of the following users to extend the credit limits for {0}: {1},Comuníquese con cualquiera de los siguientes usuarios para ampliar los límites de crédito para {0}: {1}, +Please contact any of the following users to {} this transaction.,"Por favor, póngase en contacto con cualquiera de los siguientes usuarios para {} esta transacción.", +Please contact your administrator to extend the credit limits for {0}.,Póngase en contacto con su administrador para ampliar los límites de crédito de {0}., +Please create Landed Cost Vouchers against Invoices that have 'Update Stock' enabled.,"Cree comprobantes de costo de destino contra facturas que tengan habilitada la opción ""Actualizar stock"".", +Please create a new Accounting Dimension if required.,"Por favor, cree una nueva Dimensión Contable si es necesario.", +Please create purchase from internal sale or delivery document itself,"Por favor, cree la compra a partir de la venta interna o del propio documento de entrega", +"Please delete Product Bundle {0}, before merging {1} into {2}","Por favor, elimine el paquete de productos {0}, antes de fusionar {1} en {2}", +Please do not book expense of multiple assets against one single Asset.,"Por favor, no contabilice gastos de múltiples activos contra un único Activo.", +Please enable Use Old Serial / Batch Fields to make_bundle,"Por favor, active Usar campos de serie / lote antiguos en make_bundle", +Please enable only if the understand the effects of enabling this.,Habilítelo solo si comprende los efectos de habilitar esto., +Please enable {0} in the {1}.,"Por favor, habilite {0} en la página {1}.", +Please enable {} in {} to allow same item in multiple rows,"Por favor, active {} en {} para permitir el mismo elemento en varias filas", +Please ensure that the {0} account is a Balance Sheet account. You can change the parent account to a Balance Sheet account or select a different account.,Asegúrese de que la cuenta {0} es una cuenta de Balance. Puede cambiar la cuenta padre a una cuenta de Balance o seleccionar una cuenta diferente., +Please ensure that the {0} account {1} is a Payable account. You can change the account type to Payable or select a different account.,Asegúrese de que la cuenta {0} {1} sea una cuenta de pago. Puede cambiar el tipo de cuenta a pago o seleccionar una cuenta diferente., +Please ensure {} account is a Balance Sheet account.,Asegúrese de que la cuenta {} sea una cuenta de balance general., +Please ensure {} account {} is a Receivable account.,Asegúrese de que {} cuenta {} sea una cuenta por cobrar., +Please enter Root Type for account- {0},"Por favor, introduzca el tipo de cuenta- {0}", +Please enter Serial Nos,"Por favor, introduzca Serial Nos", +Please enter Shipment Parcel information,"Por favor, introduzca la información del paquete de envío", +Please enter Stock Items consumed during the Repair.,Ingrese los artículos en stock consumidos durante la reparación., +Please enter mobile number first.,"Por favor, introduzca primero el número de móvil.", +Please enter quantity for item {0},Ingrese la cantidad del artículo {0}, +Please enter serial nos,"Por favor, introduzca los números de serie", +"Please first set Last Name, Email and Phone for the user","Primero configure el apellido, el correo electrónico y el teléfono del usuario.", +Please fix overlapping time slots for {0},"Por favor, arreglen los espacios de tiempo superpuestos para {0}", +Please fix overlapping time slots for {0}.,"Por favor, arregle los espacios de tiempo superpuestos para {0}.", +Please import accounts against parent company or enable {} in company master.,"Por favor, importe las cuentas contra la empresa principal o habilite {} en el maestro de empresas.", +"Please keep one Applicable Charges, when 'Distribute Charges Based On' is 'Distribute Manually'. For more charges, please create another Landed Cost Voucher.","Conserve un solo Cargo aplicable cuando la opción ""Distribuir cargos según"" esté configurada como ""Distribuir manualmente"". Para más cargos, cree otro Comprobante de costo de destino.", +Please make sure the file you are using has 'Parent Account' column present in the header.,Asegúrese de que el archivo que está utilizando tenga la columna 'Cuenta principal' presente en el encabezado., +Please mention 'Weight UOM' along with Weight.,Mencione 'Peso UdM' junto con el Peso., +Please mention the Current and New BOM for replacement.,"Por favor, mencione la lista de materiales actual y la nueva para la sustitución.", +Please rectify and try again.,"Por favor, corrija y vuelva a intentarlo.", +Please refresh or reset the Plaid linking of the Bank {}.,"Por favor, actualice o reinicie la vinculación del Banco con Plaid {}.", +Please save before proceeding.,"Por favor, guarde antes de continuar.", +Please select Bank Account,"Por favor, seleccione Cuenta Bancaria", +Please select Finished Good Item for Service Item {0},"Por favor, seleccione Artículo de producto terminado para el artículo de servicio {0}", +Please select Serial/Batch Nos to reserve or change Reservation Based On to Qty.,Seleccione los números de serie/lote para reservar o cambie Reserva basada en a Cantidad., +Please select Subcontracting Order instead of Purchase Order {0},Por favor seleccione Orden de Subcontratación en lugar de Orden de Compra {0}, +Please select Unrealized Profit / Loss account or add default Unrealized Profit / Loss account account for company {0},Seleccione la cuenta de ganancias/pérdidas no realizadas o agregue la cuenta de ganancias/pérdidas no realizadas predeterminada para la empresa {0}, +Please select a Subcontracting Purchase Order.,Seleccione una orden de compra de subcontratación., +Please select a Warehouse,Por favor seleccione un almacén, +Please select a Work Order first.,Seleccione primero una orden de trabajo., +Please select a country,"Por favor, selecciona un país", +Please select a customer for fetching payments.,Seleccione un cliente para obtener los pagos., +Please select a date,"Por favor, seleccione una fecha", +Please select a date and time,Por favor seleccione una fecha y hora, +Please select a row to create a Reposting Entry,Seleccione una fila para crear una entrada de reenvío, +Please select a supplier for fetching payments.,"Por favor, seleccione un proveedor para obtener los pagos.", +Please select a valid Purchase Order that has Service Items.,"Por favor, seleccione una Orden de Compra válida que tenga Artículos de Servicio.", +Please select a valid Purchase Order that is configured for Subcontracting.,"Por favor, seleccione un Pedido válido que esté configurado para Subcontratación.", +Please select an item code before setting the warehouse.,Seleccione un código de artículo antes de configurar el almacén., +Please select either the Item or Warehouse or Warehouse Type filter to generate the report.,Seleccione el filtro Artículo o Almacén o Tipo de almacén para generar el informe., +Please select items,Por favor seleccione artículos, +Please select items to reserve.,Por favor seleccione los artículos que desea reservar., +Please select items to unreserve.,Seleccione los artículos que desea cancelar la reserva., +Please select only one row to create a Reposting Entry,Seleccione solo una fila para crear una entrada de reenvío, +Please select rows to create Reposting Entries,Seleccione filas para crear entradas de reenvío, +Please select the required filters,Por favor seleccione los filtros requeridos, +Please select valid document type.,Seleccione un tipo de documento válido., +Please set Account,"Por favor, establezca una cuenta", +Please set Accounting Dimension {} in {},"Por favor, establezca la dimensión contable {} en {}", +Please set Email/Phone for the contact,"Por favor, establezca Email/Teléfono para el contacto", +Please set Fiscal Code for the customer '%s',"Por favor, establezca el código fiscal para el cliente '%s'", +Please set Fiscal Code for the public administration '%s',"Por favor, establezca el código fiscal para la administración pública '%s'", +Please set Fixed Asset Account in {} against {}.,Establezca la cuenta de activos fijos en {} frente a {}., +Please set Opening Number of Booked Depreciations,"Por favor, establezca el número de apertura de las depreciaciones registradas", +Please set Parent Row No for item {0},Establezca el número de fila principal para el artículo {0}, +Please set Root Type,"Por favor, configure el tipo de raíz", +Please set Tax ID for the customer '%s',"Por favor, establezca el número de identificación fiscal para el cliente '%s'", +Please set VAT Accounts in {0},Establezca las cuentas de IVA en {0}, +"Please set Vat Accounts for Company: ""{0}"" in UAE VAT Settings","Establezca las cuentas de IVA para la empresa: ""{0}"" en la configuración de IVA de los EAU", +Please set a Cost Center for the Asset or set an Asset Depreciation Cost Center for the Company {},Establezca un centro de costo para el activo o establezca un centro de costo de depreciación de activos para la empresa {}, +Please set a default Holiday List for Company {0},Establezca una lista de días festivos predeterminada para la empresa {0}, +Please set an Address on the Company '%s',"Por favor, establezca una dirección en la empresa '%s'", +Please set an Expense Account in the Items table,Establezca una cuenta de gastos en la tabla de artículos, +Please set default Exchange Gain/Loss Account in Company {},Establezca la cuenta de ganancias/pérdidas de cambio predeterminada en la empresa {}, +Please set default Expense Account in Company {0},Establezca la cuenta de gastos predeterminada en la empresa {0}, +Please set default cost of goods sold account in company {0} for booking rounding gain and loss during stock transfer,Establezca la cuenta de costo de bienes vendidos predeterminada en la empresa {0} para registrar las ganancias y pérdidas por redondeo durante la transferencia de existencias, +Please set either the Tax ID or Fiscal Code on Company '%s',Establezca el ID fiscal o el código fiscal en la empresa '%s', +Please set filters,"Por favor, defina los filtros", +Please set one of the following:,Establezca una de las siguientes opciones:, +Please set the cost center field in {0} or setup a default Cost Center for the Company.,Establezca el campo del centro de costo en {0} o configure un centro de costo predeterminado para la empresa., +Please set {0} in BOM Creator {1},Establezca {0} en LdM Creator {1}, +Please setup and enable a group account with the Account Type - {0} for the company {1},"Por favor, configura y habilita una cuenta de grupo con el tipo de cuenta - {0} para la empresa {1}.", +Please share this email with your support team so that they can find and fix the issue.,Comparta este correo electrónico con su equipo de soporte para que puedan encontrar y solucionar el problema., +Please specify a {0},Por favor especifique un {0}, +Please try again in an hour.,Vuelve a intentarlo en 1 hora., +Please update Repair Status.,"Por favor, actualice el estado de la reparación.", +Portal User,Usuario del portal, +Portal Users,Usuario del Portal, +Posting Datetime,Fecha y hora de publicación, +Powered by {0},Desarrollado por {0}, +"Previous Year is not closed, please close it first","El año anterior no está cerrado, por favor ciérrelo primero", +Price ({0}),Precio ({0}), +Price List Defaults,Lista de precios por defecto, +Price Per Unit ({0}),Precio por Unidad ({0}), +Primary Address and Contact,Dirección principal y Contacto, +Primary Contact,Contacto Principal, +Primary Party,Entidad Primaria, +Primary Role,Rol principal, +Print Format Builder,Diseñador de formatos de impresión, +Print Style,Estilo de Impresión, +Printing,Impresión, +Priority cannot be lesser than 1.,La prioridad no puede ser menor a 1., +Priority is mandatory,La prioridad es obligatoria, +Probability,Probabilidad, +Process Loss,Pérdida por Proceso, +Process Loss Percentage cannot be greater than 100,El porcentaje de pérdida de proceso no puede ser mayor que 100, +Process Loss Qty,Cantidad de pérdida de proceso, +Process Loss Report,Informe de pérdidas de proceso, +Process Loss Value,Valor de pérdida del proceso, +Process Payment Reconciliation,Proceso de conciliación de pagos, +Process Payment Reconciliation Log,Registro de conciliación de procesos de pago, +Process Payment Reconciliation Log Allocations,Asignaciones del registro de conciliación de pagos del proceso, +Process Subscription,Proceso de suscripción, +Process in Single Transaction,Proceso en Transacción Única, +Processed BOMs,Listas de materiales procesadas, +Processing Sales! Please Wait...,¡Procesando ventas! Por favor espere..., +Produced / Received Qty,Cantidad producida/recibida, +Product Price ID,ID del Precio del producto, +Production Plan Already Submitted,Plan de producción ya validado, +Production Plan Item Reference,Plan de producción Articulo de referencia, +Production Plan Qty,Plan de producción Cantidad, +Production Plan Sub Assembly Item,Plan de producción Elemento de subensamblaje, +Production Plan Sub-assembly Item,Plan de producción Subconjunto Artículo, +Production Plan Summary,Resumen del plan de producción, +Profile,Perfil, +Profit and Loss Summary,Resumen de pérdidas y ganancias, +Progress,Progreso, +Progress (%),Progreso (%), +Project Progress:,Progreso del proyecto:, +Prompt Qty,Cantidad inmediata, +Prospect,Prospecto, +Prospect Lead,Prospecto de cliente potencial, +Prospect Opportunity,Oportunidad prospecto, +Prospect Owner,Propietario del prospecto, +Prospect {0} already exists,El prospecto {0} ya existe, +Provisional Account,Cuenta provisional, +Provisional Expense Account,Cuenta de Gastos Provisionales, +Purchase Order Item reference is missing in Subcontracting Receipt {0},Falta la referencia del artículo de la orden de compra en el recibo de subcontratación {0}, +Purchase Orders {0} are un-linked,Las órdenes de compra {0} no están vinculadas, +Purchase Receipt (Draft) will be auto-created on submission of Subcontracting Receipt.,El recibo de compra (borrador) se creará automáticamente al validar el recibo de subcontratación., +Purchase Receipt {0} created.,Recibo de compra {0} creado., +Purchase Value,Valor de compra, +Purchases,Compras, +Purposes Required,Propósitos requeridos, +Putaway Rule,Regla de almacenamiento, +Putaway Rule already exists for Item {0} in Warehouse {1}.,La regla de almacenamiento ya existe para el artículo {0} en el almacén {1}., +Qty ,Cant. , +Qty After Transaction,Cantidad después de la transacción, +Qty As Per BOM,Cantidad según lista de materiales, +Qty Change,Cantidad Cambio, +Qty In Stock,Cant en existencia, +Qty Per Unit,Cantidad por unidad, +"Qty To Manufacture ({0}) cannot be a fraction for the UOM {2}. To allow this, disable '{1}' in the UOM {2}.","La cantidad a fabricar ({0}) no puede ser una fracción para la unidad de medida {2}. Para permitir esto, deshabilite '{1}' en la unidad de medida {2}.", +Qty To Produce,Cantidad a producir, +Qty and Rate,Cantidad y Tarifa, +Qty as Per Stock UOM,Cantidad según stock UdM, +Qty for which recursion isn't applicable.,Cantidad para la que no es aplicable la recursividad., +Qty in Stock UOM,Cantidad en stock UdM, +Qty of Finished Goods Item should be greater than 0.,La cantidad de productos acabados debe ser superior a 0., +Qty to Be Consumed,Cantidad para ser consumida, +Qty to Build,Cantidad a construir, +Qty to Fetch,Cantidad a buscar, +Qty to Produce,Cantidad a producir, +Qualification Status,Estado de la cualificación, +Qualified,Cualificado, +Qualified By,Calificado por, +Qualified on,Calificado el, +Quality Inspection Parameter,Parámetros de inspección de calidad, +Quality Inspection Parameter Group,Grupo de parámetros de inspección de calidad, +Quality Inspection Settings,Configuración de inspección de calidad, +Quality Inspection(s),Inspección(es) de calidad, +Quantity is required,Se requiere cantidad, +"Quantity must be greater than zero, and less or equal to {0}",La cantidad debe ser mayor que cero y menor o igual a {0}, +Quantity to Produce should be greater than zero.,La cantidad a producir debe ser mayor que cero., +Quantity to Scan,Cantidad a escanear, +Quarter {0} {1},Cuatrimestre {0} {1}, +Quotation Number,Número de Cotización, +Quoted Amount,Importe Cotizado, +Rate Difference with Purchase Invoice,Diferencia de tarifa con la factura de compra, +Rate Section,Sección de tarifas, +Rate of Stock UOM,Tasa de stock UdM, +Raw Material Cost Per Qty,Coste de la materia prima por cant., +Raw Material Item,Artículo de materia prima, +Raw Material Value,Valor de la materia prima, +Raw Materials Actions,Acciones de Materias Primas, +Raw Materials Consumption ,Consumo de materias primas , +Raw Materials Warehouse,Almacén de materias primas, +Reached Root,Raíz alcanzada, +Reading Value,Valor de lectura, +Reason for hold:,Motivo de la retención:, +Rebuild Tree,Reconstruir el árbol, +Rebuilding BTree for period ...,Reconstruyendo BTree para el período..., +Recalculate Incoming/Outgoing Rate,Recalcular la tasa de entrada/salida, +Recalculating Purchase Cost against this Project...,Recalcular el coste de compra contra este proyecto..., +Receivable/Payable Account,Cuenta por cobrar/por pagar, +Receivable/Payable Account: {0} doesn't belong to company {1},Cuenta por cobrar/por pagar: {0} no pertenece a la empresa {1}, +Received Amount After Tax,Importe recibido después de impuestos, +Received Amount After Tax (Company Currency),Importe recibido después de impuestos (moneda de la empresa), +Received Amount cannot be greater than Paid Amount,El importe recibido no puede ser mayor que el importe pagado, +Received Qty in Stock UOM,Cantidad recibida en stock UdM, +Recent Orders,Pedidos recientes, +Recent Transactions,Transacciones recientes, +Reconcile All Serial Nos / Batches,Concilie todos los números de serie / lotes, +Reconcile on Advance Payment Date,Conciliar en fecha de pago anticipado, +Reconcile the Bank Transaction,Conciliar la transacción bancaria, +Reconciled Entries,Entradas conciliadas, +Reconciliation Error Log,Registro de errores de conciliación, +Reconciliation Logs,Registros de conciliación, +Reconciliation Progress,Progreso de la reconciliación, +Recording HTML,Grabación HTML, +Recoverable Standard Rated expenses should not be set when Reverse Charge Applicable is Y,Los gastos recuperables con tasa estándar no se deben establecer cuando la inversión de cargo aplicable es Y, +Recurse Every (As Per Transaction UOM),Recursiva cada (según la unidad de medida de la transacción), +Recurse Over Qty cannot be less than 0,El recursivo sobre cantidad no puede ser menor que 0, +Recursive Discounts with Mixed condition is not supported by the system,El sistema no admite descuentos recursivos con condiciones mixtas, +Reference Date for Early Payment Discount,Fecha de referencia para el descuento por pronto pago, +Reference Detail,Detalle de referencia, +Reference DocType,DocType de referencia, +Reference Exchange Rate,Tipo de cambio de referencia, +Reference No,Nº de referencia, +Reference number of the invoice from the previous system,Número de referencia de la factura del sistema anterior, +References to Sales Invoices are Incomplete,Las referencias a las facturas de venta están incompletas, +References to Sales Orders are Incomplete,Las referencias a los pedidos de venta están incompletas, +References {0} of type {1} had no outstanding amount left before submitting the Payment Entry. Now they have a negative outstanding amount.,Las referencias {0} del tipo {1} no tenían ningún importe pendiente antes de enviar la Entrada de pago. Ahora tienen un importe pendiente negativo., +Refresh Google Sheet,Actualizar hoja de Google, +Refresh Plaid Link,Actualizar enlace de Plaid, +Regenerate Closing Stock Balance,Regenerar saldo de stock de cierre, +Rejected Serial and Batch Bundle,Lote y serie rechazados, +Rejected Warehouse and Accepted Warehouse cannot be same.,Almacén Rechazado y Almacén Aceptado no pueden ser el mismo., +Remarks Column Length,Observaciones Longitud de la columna, +Remove Parent Row No in Items Table,Eliminar el número de fila principal en la tabla de elementos, +Repair,Reparar, +Repair Asset,Reparar activos, +Repair Details,Detalles de la reparación, +"Replace a particular BOM in all other BOMs where it is used. It will replace the old BOM link, update cost and regenerate ""BOM Explosion Item"" table as per new BOM. +It also updates latest price in all the BOMs.","Sustituye una determinada lista de materiales en todas las demás listas de materiales en las que se utilice. Reemplazará el enlace de la lista de materiales antigua, actualizará el coste y regenerará la tabla ""Elemento de explosión de la lista de materiales"" según la nueva lista de materiales. +También actualiza el último precio en todas las listas de materiales.", +Report Error,Reportar Error, +Report Filters,Filtros de informe, +Report View,Vista de Reporte, +Repost Accounting Ledger,Traspaso libro de contabilidad, +Repost Accounting Ledger Items,Traspaso de partidas del libro mayor de contabilidad, +Repost Accounting Ledger Settings,Traspasar configuración del libro mayor de contabilidad, +Repost Allowed Types,Tipos de Traspasos permitidos, +Repost Error Log,Traspaso registro de errores, +Repost Item Valuation,Traspaso Valoración de artículos, +Repost Payment Ledger,Traspaso del Libro de Pagos, +Repost Payment Ledger Items,Traspaso de partidas del libro de pagos, +Repost Status,Estado del Traspaso, +Repost has started in the background,El traspaso ha comenzado en segundo plano., +Repost in background,Traspasar en segundo plano, +Repost started in the background,Traspaso iniciado en segundo plano, +Reposting Completed {0}%,Traspaso completado {0}%, +Reposting Data File,Traspaso del archivo de datos, +Reposting Info,Información de Traspaso , +Reposting Progress,Traspasar el progreso, +Reposting entries created: {0},Traspaso de entradas creadas: {0}, +Reposting has been started in the background.,Se ha iniciado un traspaso en segundo plano., +Reposting in the background.,Traspasando en segundo plano., +Represents a Financial Year. All accounting entries and other major transactions are tracked against the Fiscal Year.,Representa un año fiscal. Todos los asientos contables y otras transacciones importantes se registran en relación con el año fiscal., +Request Parameters,Parámetros de la solicitud, +Request Timeout,Tiempo de espera superado, +Reservation Based On,Reserva basada en, +Reserve,Reservar, +Reserve Stock,Reservar stock, +"Reserved Qty ({0}) cannot be a fraction. To allow this, disable '{1}' in UOM {3}.","La cantidad reservada ({0}) no puede ser una fracción. Para permitirlo, deshabilite '{1}' en la unidad de medida {3}.", +Reserved Qty for Production Plan,Cantidad reservada para el plan de producción, +Reserved Qty for Subcontract,Cantidad reservada para subcontrato, +Reserved Qty should be greater than Delivered Qty.,La cantidad reservada debe ser mayor que la cantidad entregada., +Reserved Serial No.,Número de serie reservado., +Reserved Stock,Existencias Reservadas, +Reserved Stock for Batch,Stock reservado para lote, +Reserved for POS Transactions,Reservado para transacciones TPV, +Reserved for Production,Reservado para producción, +Reserved for Production Plan,Reservado para el plan de producción, +Reserved for Sub Contracting,Reservado para subcontratación, +Reserving Stock...,Reservando de stock..., +Reset Company Default Values,Restablecer valores predeterminados de la empresa, +Reset Plaid Link,Restablecer vinculación con Plaid, +Reset Raw Materials Table,Restablecer tabla de materias primas, +Resolution Due,Resolución pendiente, +Response and Resolution,Respuesta y resolución, +Restart,Reiniciar, +Restore Asset,Restaurar activo, +Restrict,Restringir, +Restrict Items Based On,Restringir Pruductos según, +Result Key,Clave de resultados, +Resume Job,Reanudar Trabajo, +Retried,Reintentado, +Retry,Reintentar, +Retry Failed Transactions,Reintentar transacciones fallidas, +Return Against,Devolución contra, +Return Against Subcontracting Receipt,Devolución contra recibo de subcontratación, +Return Components,Componentes de retorno, +Return Issued,Devolución emitida, +Return Qty,Cantidad devuelta, +Return Qty from Rejected Warehouse,Cantidad devuelta del almacén rechazado, +Return of Components,Devolución de componentes, +Returned,Devuelto, +Returned Against,Devuelto contra, +Returned Qty ,Cant devuelta , +Returned Qty in Stock UOM,Cantidad devuelta en stock UdM, +Returned exchange rate is neither integer not float.,El tipo de cambio devuelto no es ni entero ni flotante., +Revaluation Journals,Diarios de revalorización, +Revaluation Surplus,Superávit de revalorización, +Revenue,Ganancia, +Reversal Of,Reversión de, +Right Child,Secundario correcto, +Role Allowed to Create/Edit Back-dated Transactions,Rol permitido para crear o editar transacciones retroactivas, +Role Allowed to Over Bill ,Rol Permitido para Facturar en Exceso , +Role Allowed to Over Deliver/Receive,Rol que permite entregar/recibir más de lo debido, +Role Allowed to Override Stop Action,Rol autorizado para anular la acción de parada, +Role allowed to bypass Credit Limit,Rol permitido para eludir el límite de crédito, +Root,Raíz, +"Root Type for {0} must be one of the Asset, Liability, Income, Expense and Equity","El tipo de raíz para {0} debe ser uno de los siguientes: Activo, Pasivo, Ingreso, Gasto y Patrimonio", +Round Free Qty,Redondear cantidad gratis, +Round Off Tax Amount,Redondear el importe del impuesto, +Round Tax Amount Row-wise,Redondear el importe del impuesto por filas, +Rounding Loss Allowance,Redondeo de la indemnización por pérdidas, +Rounding Loss Allowance should be between 0 and 1,El margen de pérdida por redondeo debe estar entre 0 y 1, +Rounding gain/loss Entry for Stock Transfer,Redondeo de ganancias/pérdidas Entrada para traslado de existencias, +Row #,Fila #, +Row # {0}:,Fila # {0}:, +Row #{0}: A reorder entry already exists for warehouse {1} with reorder type {2}.,Fila #{0}: Ya existe una entrada de reorden para el almacén {1} con el tipo de reorden {2}., +Row #{0}: Acceptance Criteria Formula is incorrect.,Fila #{0}: La fórmula de los criterios de aceptación es incorrecta., +Row #{0}: Acceptance Criteria Formula is required.,Fila #{0}: Se requiere la fórmula de criterios de aceptación., +Row #{0}: Accepted Warehouse and Rejected Warehouse cannot be same,Fila #{0}: Almacén Aceptado y Almacén Rechazado no puede ser el mismo, +Row #{0}: Accepted Warehouse is mandatory for the accepted Item {1},Fila #{0}: El almacén aceptado es obligatorio para el artículo aceptado {1}, +Row #{0}: Allocated Amount cannot be greater than Outstanding Amount of Payment Request {1},Fila #{0}: El Importe Asignado no puede ser mayor que el Importe Pendiente de la Solicitud de Pago {1}, +Row #{0}: Allocated amount:{1} is greater than outstanding amount:{2} for Payment Term {3},Fila #{0}: Importe asignado:{1} es superior al importe pendiente:{2} para el plazo de pago {3}, +Row #{0}: Amount must be a positive number,Fila #{0}: El importe debe ser un número positivo, +Row #{0}: BOM is not specified for subcontracting item {0},Fila #{0}: La lista de materiales no está especificada para el artículo de subcontratación {0}, +Row #{0}: Batch No {1} is already selected.,Fila #{0}: El lote nº {1} ya está seleccionado., +Row #{0}: Cannot allocate more than {1} against payment term {2},Fila #{0}: No se puede asignar más de {1} contra la condición de pago {2}, +Row #{0}: Cannot transfer more than Required Qty {1} for Item {2} against Job Card {3},Fila #{0}: No se puede transferir más de la cantidad requerida {1} para el artículo {2} contra la tarjeta de trabajo {3}, +Row #{0}: Consumed Asset {1} cannot be Draft,Fila #{0}: El activo consumido {1} no puede ser borrador, +Row #{0}: Consumed Asset {1} cannot be cancelled,Fila #{0}: El activo consumido {1} no puede estar cancelado, +Row #{0}: Consumed Asset {1} cannot be the same as the Target Asset,Fila #{0}: El activo consumido {1} no puede ser el mismo que el activo de destino, +Row #{0}: Consumed Asset {1} cannot be {2},Fila #{0}: El activo consumido {1} no puede ser {2}, +Row #{0}: Consumed Asset {1} does not belong to company {2},Fila #{0}: El activo consumido {1} no pertenece a la empresa {2}, +Row #{0}: Cumulative threshold cannot be less than Single Transaction threshold,Fila #{0}: El umbral acumulativo no puede ser menor que el umbral de transacción única, +Row #{0}: Dates overlapping with other row,Fila #{0}: Fechas superpuestas con otras filas, +Row #{0}: Default BOM not found for FG Item {1},Fila #{0}: No se encontró la lista de materiales predeterminada para el artículo FG {1}, +Row #{0}: Expense Account not set for the Item {1}. {2},Fila #{0}: Cuenta de gastos no configurada para el artículo {1}. {2}, +Row #{0}: Finished Good Item Qty can not be zero,Fila #{0}: La cantidad de artículos terminados no puede ser cero, +Row #{0}: Finished Good Item is not specified for service item {1},Fila #{0}: No se especifica el artículo bueno acabado para el artículo de servicio {1}, +Row #{0}: Finished Good Item {1} must be a sub-contracted item,Fila #{0}: Artículo terminado. El artículo {1} debe ser un artículo subcontratado., +Row #{0}: Finished Good reference is mandatory for Scrap Item {1}.,Fila #{0}: La referencia de producto terminado es obligatoria para el artículo de desecho {1}., +Row #{0}: For {1} Clearance date {2} cannot be before Cheque Date {3},Fila #{0}: Para {1} La fecha de liquidación {2} no puede ser anterior a la fecha del cheque {3}, +"Row #{0}: For {1}, you can select reference document only if account gets credited","Fila #{0}: Para {1}, puede seleccionar el documento de referencia solo si se acredita la cuenta", +"Row #{0}: For {1}, you can select reference document only if account gets debited","Fila #{0}: Para {1}, puede seleccionar el documento de referencia solo si se debita la cuenta", +Row #{0}: From Date cannot be before To Date,Fila #{0}: La fecha de inicio no puede ser anterior a la fecha de finalización, +Row #{0}: Item {1} does not exist,Fila #{0}: El artículo {1} no existe, +"Row #{0}: Item {1} has been picked, please reserve stock from the Pick List.","Fila #{0}: El artículo {1} ha sido recogido, por favor reserve existencias de la Lista de Recogida.", +Row #{0}: Item {1} is not a service item,Fila #{0}: El artículo {1} no es un artículo de servicio, +Row #{0}: Item {1} is not a stock item,Fila #{0}: El artículo {1} no es un artículo de stock, +Row #{0}: Only {1} available to reserve for the Item {2},Fila #{0}: Solo {1} disponible para reservar para el artículo {2}, +Row #{0}: Please select Item Code in Assembly Items,"Fila #{0}: Por favor, seleccione el código del artículo en Artículos de ensamblaje", +Row #{0}: Please select the BOM No in Assembly Items,"Fila #{0}: Por favor, seleccione el nº de lista de materiales en Artículos de ensamblaje", +Row #{0}: Please select the Sub Assembly Warehouse,"Fila #{0}: Por favor, seleccione el Almacén de Sub-montaje", +Row #{0}: Please update deferred revenue/expense account in item row or default account in company master,"Fila #{0}: Por favor, actualice la cuenta de ingresos/gastos diferidos en la fila de artículos o la cuenta por defecto en el maestro de empresas", +Row #{0}: Qty increased by {1},Fila #{0}: Cantidad aumentada en {1}, +Row #{0}: Qty must be a positive number,Fila #{0}: La cantidad debe ser un número positivo, +Row #{0}: Qty should be less than or equal to Available Qty to Reserve (Actual Qty - Reserved Qty) {1} for Iem {2} against Batch {3} in Warehouse {4}.,Fila #{0}: La cantidad debe ser menor o igual a la cantidad disponible para reservar (cantidad real - cantidad reservada) {1} para Artículo {2} contra el lote {3} en el almacén {4}., +Row #{0}: Quantity to reserve for the Item {1} should be greater than 0.,Fila #{0}: La cantidad a reservar para el artículo {1} debe ser superior a 0., +Row #{0}: Rate must be same as {1}: {2} ({3} / {4}),Fila #{0}: La tasa debe ser la misma que {1}: {2} ({3} / {4}), +Row #{0}: Received Qty must be equal to Accepted + Rejected Qty for Item {1},Fila #{0}: La cantidad recibida debe ser igual a la cantidad aceptada + rechazada para el artículo {1}, +Row #{0}: Rejected Qty cannot be set for Scrap Item {1}.,Fila #{0}: No se puede establecer la cantidad rechazada para el artículo de rechazo {1}., +Row #{0}: Rejected Warehouse is mandatory for the rejected Item {1},Fila #{0}: El almacén rechazado es obligatorio para el artículo rechazado {1}, +Row #{0}: Scrap Item Qty cannot be zero,Fila #{0}: La cantidad de artículos desechados no puede ser cero, +"Row #{0}: Selling rate for item {1} is lower than its {2}. + Selling {3} should be atleast {4}.

Alternatively, + you can disable selling price validation in {5} to bypass + this validation.","Fila #{0}: El precio de venta del artículo {1} es inferior a su {2}. + Venta {3} debe ser al menos {4}.

Alternativamente, + puede desactivar la validación del precio de venta en {5} para saltarse + esta validación.", +Row #{0}: Serial No {1} for Item {2} is not available in {3} {4} or might be reserved in another {5}.,Fila #{0}: El número de serie {1} del artículo {2} no está disponible en {3} {4} o podría estar reservado en otro {5}., +Row #{0}: Serial No {1} is already selected.,Fila #{0}: El número de serie {1} ya está seleccionado., +Row #{0}: Start Time and End Time are required,Fila #{0}: Se requiere hora de inicio y hora de fin, +Row #{0}: Start Time must be before End Time,Fila #{0}: La hora de inicio debe ser antes del fin, +Row #{0}: Status is mandatory,Fila #{0}: El estado es obligatorio, +Row #{0}: Stock cannot be reserved for Item {1} against a disabled Batch {2}.,Fila #{0}: No se puede reservar stock para el artículo {1} contra un lote deshabilitado {2}., +Row #{0}: Stock cannot be reserved for a non-stock Item {1},Fila #{0}: No se puede reservar stock para un artículo que no es de stock {1}, +Row #{0}: Stock cannot be reserved in group warehouse {1}.,Fila #{0}: No se pueden reservar existencias en el almacén de grupo {1}., +Row #{0}: Stock is already reserved for the Item {1}.,Fila #{0}: Ya hay stock reservado para el artículo {1}., +Row #{0}: Stock is reserved for item {1} in warehouse {2}.,Fila #{0}: Hay stock reservado para el artículo {1} en el almacén {2}., +Row #{0}: Stock not available to reserve for Item {1} against Batch {2} in Warehouse {3}.,Fila #{0}: Stock no disponible para reservar para el artículo {1} contra el lote {2} en el almacén {3}., +Row #{0}: Stock not available to reserve for the Item {1} in Warehouse {2}.,Fila #{0}: Stock no disponible para reservar para el artículo {1} en el almacén {2}., +Row #{0}: The warehouse {1} is not a child warehouse of a group warehouse {2},Fila #{0}: El almacén {1} no es un almacén secundario de un almacén de grupo {2}, +Row #{0}: You cannot use the inventory dimension '{1}' in Stock Reconciliation to modify the quantity or valuation rate. Stock reconciliation with inventory dimensions is intended solely for performing opening entries.,Fila #{0}: No se puede utilizar la dimensión de inventario '{1}' en la conciliación de stock para modificar la cantidad o la tasa de valoración. La conciliación de stock con las dimensiones de inventario está destinada únicamente a realizar asientos de apertura., +Row #{0}: You must select an Asset for Item {1}.,Fila #{0}: Debe seleccionar un activo para el artículo {1}., +Row #{0}: {1} is not a valid reading field. Please refer to the field description.,Fila #{0}: {1} no es un campo de lectura válido. Consulte la descripción del campo., +Row #{0}: {1} of {2} should be {3}. Please update the {1} or select a different account.,"Fila #{0}: {1} de {2} debería ser {3}. Por favor, actualice {1} o seleccione una cuenta diferente.", +Row #{1}: Warehouse is mandatory for stock Item {0},Fila #{1}: El Almacén es obligatorio para el producto en stock {0}, +Row #{}: Finance Book should not be empty since you're using multiple.,"Fila #{}: Libro de Finanzas no debe estar vacío, ya que está utilizando múltiples.", +Row #{}: Please use a different Finance Book.,"Fila #{}: Por favor, utilice un Libro de Finanzas diferente.", +Row #{}: The original Invoice {} of return invoice {} is not consolidated.,Fila #{}: La factura original {} de la factura de devolución {} no está consolidada., +Row #{}: item {} has been picked already.,Fila #{}: el artículo {} ya ha sido seleccionado., +Row #{}: {} {} doesn't belong to Company {}. Please select valid {}.,"Fila #{}: {} {} no pertenece a la empresa {}. Por favor, seleccione una {} válida.", +Row No {0}: Warehouse is required. Please set a Default Warehouse for Item {1} and Company {2},Fila n.° {0}: Se requiere almacén. Establezca un almacén predeterminado para el artículo {1} y la empresa {2}, +Row Number,Número de fila, +Row {0},Fila {0}, +"Row {0} picked quantity is less than the required quantity, additional {1} {2} required.","Fila {0} la cantidad recogida es inferior a la requerida, se requiere {1} {2} adicional.", +Row {0}# Item {1} cannot be transferred more than {2} against {3} {4},Fila {0}# El artículo {1} no puede transferirse más que {2} contra {3} {4}, +Row {0}# Item {1} not found in 'Raw Materials Supplied' table in {2} {3},Fila {0}# El artículo {1} no se encontró en la tabla 'Materias primas suministradas' en {2} {3}, +Row {0}: Accepted Qty and Rejected Qty can't be zero at the same time.,Fila {0}: La cantidad aceptada y la cantidad rechazada no pueden ser cero al mismo tiempo., +Row {0}: Account {1} and Party Type {2} have different account types,Fila {0}: La cuenta {1} y el tipo de entidad {2} tienen diferentes tipos de cuenta, +Row {0}: Allocated amount {1} must be less than or equal to invoice outstanding amount {2},Fila {0}: El importe asignado {1} debe ser inferior o igual al importe pendiente de la factura {2}, +Row {0}: Allocated amount {1} must be less than or equal to remaining payment amount {2},Fila {0}: El importe asignado {1} debe ser inferior o igual al importe de pago restante {2}, +"Row {0}: As {1} is enabled, raw materials cannot be added to {2} entry. Use {3} entry to consume raw materials.","Fila {0}: Como {1} está activada, no se pueden añadir materias primas a la entrada {2} . Utilice la entrada {3} para consumir materias primas.", +Row {0}: Both Debit and Credit values cannot be zero,Fila {0}: Tanto el Debe como el Haber no pueden ser cero, +Row {0}: Cost Center {1} does not belong to Company {2},Fila {0}: El centro de costes {1} no pertenece a la empresa {2}, +Row {0}: Either Delivery Note Item or Packed Item reference is mandatory.,Fila {0}: La referencia del artículo de la nota de entrega o del artículo empaquetado es obligatoria., +Row {0}: Expense Head changed to {1} as no Purchase Receipt is created against Item {2}.,Fila {0}: el encabezado de gasto cambió a {1} ya que no se crea ningún recibo de compra para el artículo {2}., +Row {0}: Expense Head changed to {1} because account {2} is not linked to warehouse {3} or it is not the default inventory account,Fila {0}: Cabecera de Gasto cambiada a {1} porque la cuenta {2} no está vinculada al almacén {3} o no es la cuenta de inventario por defecto, +Row {0}: Expense Head changed to {1} because expense is booked against this account in Purchase Receipt {2},Fila {0}: Cabecera de Gasto cambiada a {1} porque el gasto se contabiliza contra esta cuenta en el Recibo de Compra {2}, +Row {0}: From Warehouse is mandatory for internal transfers,Fila {0}: Desde el almacén es obligatorio para transferencias internas, +Row {0}: Item Tax template updated as per validity and rate applied,Fila {0}: Plantilla de impuesto del artículo actualizada según la validez y la tasa aplicada, +Row {0}: Item rate has been updated as per valuation rate since its an internal stock transfer,"Fila {0}: La tarifa del artículo se ha actualizado según la tarifa de valoración, ya que se trata de una transferencia de stock interna", +Row {0}: Item {1} must be a stock item.,Fila {0}: El artículo {1} debe ser un artículo de stock., +Row {0}: Item {1} must be a subcontracted item.,Fila {0}: El artículo {1} debe ser un artículo subcontratado., +Row {0}: Packed Qty must be equal to {1} Qty.,Fila {0}: La cantidad embalada debe ser igual a la cantidad {1} ., +Row {0}: Packing Slip is already created for Item {1}.,Fila {0}: Ya se creó el albarán para el artículo {1}., +Row {0}: Payment Term is mandatory,Fila {0}: El plazo de pago es obligatorio, +Row {0}: Please provide a valid Delivery Note Item or Packed Item reference.,Fila {0}: proporcione una referencia de artículo de nota de entrega o artículo empaquetado válida., +Row {0}: Please select a BOM for Item {1}.,"Fila {0}: Por favor, seleccione una lista de materiales para el artículo {1}.", +Row {0}: Please select an active BOM for Item {1}.,"Fila {0}: Por favor, seleccione una lista de materiales activa para el artículo {1}.", +Row {0}: Please select an valid BOM for Item {1}.,"Fila {0}: Por favor, seleccione una lista de materiales válida para el artículo {1}.", +Row {0}: Project must be same as the one set in the Timesheet: {1}.,Fila {0}: El proyecto debe ser el mismo que el establecido en la hoja de horas: {1}., +Row {0}: Purchase Invoice {1} has no stock impact.,Fila {0}: La factura de compra {1} no tiene impacto en el stock., +Row {0}: Qty cannot be greater than {1} for the Item {2}.,Fila {0}: La cantidad no puede ser mayor que {1} para el artículo {2}., +Row {0}: Qty in Stock UOM can not be zero.,Fila {0}: La UdM de cantidad en stock no puede ser cero., +Row {0}: Qty must be greater than 0.,Fila {0}: La cantidad debe ser mayor que 0., +Row {0}: Shift cannot be changed since the depreciation has already been processed,Fila {0}: No se puede cambiar el turno porque ya se ha procesado la amortización, +Row {0}: Target Warehouse is mandatory for internal transfers,Fila {0}: El almacén de destino es obligatorio para las transferencias internas, +"Row {0}: To set {1} periodicity, difference between from and to date must be greater than or equal to {2}","Fila {0}: Para establecer la periodicidad {1} , la diferencia entre la fecha de inicio y la de finalización debe ser mayor o igual a {2}", +Row {0}: Total Number of Depreciations cannot be less than or equal to Opening Number of Booked Depreciations,Fila {0}: El número total de amortizaciones no puede ser inferior o igual al número inicial de amortizaciones contabilizadas, +Row {0}: {1} account already applied for Accounting Dimension {2},Fila {0}: {1} cuenta ya aplicada para la Dimensión Contable {2}, +Row {0}: {1} {2} cannot be same as {3} (Party Account) {4},Fila {0}: {1} {2} no puede ser la misma que {3} (Cuenta de la Entidad) {4}, +Row {0}: {2} Item {1} does not exist in {2} {3},Fila {0}: {2} El elemento {1} no existe en {2} {3}, +Row({0}): Outstanding Amount cannot be greater than actual Outstanding Amount {1} in {2},Fila({0}): El importe pendiente no puede ser mayor que el importe pendiente real {1} en {2}, +Rows with Same Account heads will be merged on Ledger,Las líneas con los mismos encabezamientos de cuenta se fusionarán en el Libro Mayor, +Rows: {0} have 'Payment Entry' as reference_type. This should not be set manually.,Filas: {0} tienen 'Entrada de pago' como reference_type. No debe establecerse manualmente., +Rows: {0} in {1} section are Invalid. Reference Name should point to a valid Payment Entry or Journal Entry.,Las filas {0} en la sección {1} no son válidas. El nombre de referencia debe apuntar a una entrada de pago o de diario válida., +Run parallel job cards in a workstation,Ejecutar tarjetas de trabajo en paralelo en una estación de trabajo, +Running,Ejecutando, +SCO Supplied Item,Artículo suministrado por SCO, +SLA Fulfilled On,SLA completado el, +SLA Fulfilled On Status,SLA cumplido en estado, +SLA Paused On,SLA en pausa, +SLA will be applied if {1} is set as {2}{3},SLA se aplicará si {1} se establece como {2}{3}, +SLA will be applied on every {0},El SLA se aplicará en cada {0}, +SMS Settings,Ajustes de SMS, +SO Total Qty,SO Cantidad total, +Salary Currency,Divisa de salario, +Sales Incoming Rate,Tasa de entrada de ventas, +Sales Invoice {0} must be deleted before cancelling this Sales Order,La factura de venta {0} debe eliminarse antes de cancelar esta orden de venta, +Sales Order Packed Item,Artículo empaquetado de la orden de venta, +Sales Order Reference,Referencia del pedido de venta, +Sales Order Status,Estado del pedido de venta, +"Sales Order {0} already exists against Customer's Purchase Order {1}. To allow multiple Sales Orders, Enable {2} in {3}","El Pedido de Venta {0} ya existe contra el Pedido de Compra del Cliente {1}. Para permitir múltiples Pedidos de Venta, habilite {2} en {3}.", +Sales Partner ,Socio de ventas , +Sales Partner Item,Artículo de socio de ventas, +Sales Partner Target Variance Based On Item Group,Variación de objetivos del socio de ventas según el grupo de artículos, +Sales Pipeline Analytics,Análisis del flujo de ventas, +Sales Update Frequency in Company and Project,Frecuencia de actualización de ventas en empresa y proyecto, +Sales Value,Valor de las ventas, +Salvage Value Percentage,Porcentaje de Valor de Recuperación, +Same item and warehouse combination already entered.,Ya se ha introducido la misma combinación de artículo y almacén., +Savings,Ahorros, +Scan Batch No,Escanear Lote No, +Scan Mode,Modo de escaneo, +Scan Serial No,Escanear número de serie, +Scan barcode for item {0},Escanee el código de barras del artículo {0}, +"Scan mode enabled, existing quantity will not be fetched.","Modo de escaneo habilitado, la cantidad existente no se obtendrá.", +Scanned Quantity,Cantidad escaneada, +Scheduled Time Logs,Registros de tiempo programado, +Scheduler is Inactive. Can't trigger job now.,El planificador está inactivo. No se puede activar el trabajo ahora., +Scheduler is Inactive. Can't trigger jobs now.,El planificador está inactivo. No se pueden activar los trabajos ahora., +Scheduler is inactive. Cannot enqueue job.,El planificador está inactivo. No se puede poner en cola el trabajo., +Scheduler is inactive. Cannot merge accounts.,El planificador está inactivo. No se pueden combinar cuentas., +Scheduling,Planificación, +Select Alternative Items for Sales Order,Seleccionar ítems alternativos para Orden de Venta, +Select View,Seleccione Vista, +Select an item from each set to be used in the Sales Order.,Seleccione un ítem de cada conjunto para usarlo en la Orden de Venta., +Send Attached Files,Enviar Archivos Adjuntos, +Send Document Print,Enviar Impresión de Documento, +Service Expenses,Gastos de servicio, +Service Item,Artículo de servicio, +Set Default Supplier,Establecer Proveedor Predeterminado, +Set Quantity,Establecer cantidad, +Set Warehouse,Establecer Almacén, +Shipment,Envío, +Shipment Amount,Monto del envío, +Shipment Delivery Note,Nota de Entrega de envío, +Shipment ID,ID de Envío, +Shipment Information,Información del Envío, +Shipment Type,Tipo de Envío, +Shipment details,Detalles del envío, +Show Failed Logs,Mostrar registros fallidos, +Show Preview,Mostrar Vista Previa, +Show Remarks,Mostrar Observaciones, +Skipped,Omitido, +"Skipping {0} of {1}, {2}","Saltando {0} de {1}, {2}", +Sold by,Vendido por, +Spacer,Espaciador, +Start Deletion,Iniciar eliminación, +Start Import,Comience a Importar, +Sub Operation,Sub operación, +Sub Operations,Sub operaciones, +Subcontracting Settings,Configuración de Subcontratación, +Subdivision,Subdivisión, +Submit After Import,Validar después de la importación, +Successfully imported {0} record.,Importado correctamente {0} registro., +Successfully imported {0} records.,Importado correctamente {0} registros., +Successfully linked to Customer,Vinculado exitosamente al Cliente, +Successfully linked to Supplier,Vinculado exitosamente al Proveedor, +Successfully merged {0} out of {1}.,Fusionado satisfactoriamente {0} de {1}., +Successfully updated {0},Actualizado exitosamente {0}, +"Successfully updated {0} record out of {1}. Click on Export Errored Rows, fix the errors and import again.","Registro {0} actualizado correctamente de {1}. Haga clic en Exportar filas con errores, corrija los errores e importe nuevamente.", +Successfully updated {0} record.,Registro {0} actualizado correctamente., +"Successfully updated {0} records out of {1}. Click on Export Errored Rows, fix the errors and import again.","Actualizado correctamente los registros {0} de {1}. Haga clic en Exportar filas Erroradas, corrija los errores e importe de nuevo.", +Successfully updated {0} records.,Registros {0} actualizados correctamente., +Supplied Item,Producto suministrado, +Supplier Address Details,Detalles de Dirección del Proveedor, +Supplier Info,Info. Proveedor, +Supplier Invoice,Factura de Proveedor, +Supplier Item,Producto del Proveedor, +Supplier Portal Users,Usuarios del Portal del Proveedor, +Supplier Primary Address,Dirección principal del Proveedor, +Supplier Primary Contact,Contacto principal del Proveedor, +Sync Now,Sincronizar ahora, +Sync Started,Sincronización Iniciada, +System Settings,Configuración del Sistema, +Tax Amount,Importe de Impuestos, +Tax Masters,Maestros Fiscales, +Tax Settings,Configuración de Impuestos, +Team,Equipo, +Template Options,Opciones de plantilla, +Template Warnings,Advertencias de plantilla, +Terms & Conditions,Términos y Condiciones, +Terms Template,Plantilla de Términos, +Territory Wise Sales,Ventas por territorios, +The Condition '{0}' is invalid,La Condición '{0}' no es válida, +"The sync has started in the background, please check the {0} list for new records.","La sincronización se ha iniciado en segundo plano, por favor compruebe en la lista {0} si hay nuevos registros.", +The task has been enqueued as a background job.,La tarea se ha puesto en cola como trabajo en segundo plano., +There was an error creating Bank Account while linking with Plaid.,Se ha producido un error al crear la cuenta bancaria mientras se vinculaba con Plaid., +There was an error syncing transactions.,Se ha producido un error al sincronizar las transacciones., +There was an error updating Bank Account {} while linking with Plaid.,Se ha producido un error al actualizar la cuenta bancaria {} mientras se vinculaba con Plaid., +There was an issue connecting to Plaid's authentication server. Check browser console for more information,Se ha producido un problema al conectar con el servidor de autenticación de Plaid. Compruebe la consola del navegador para obtener más información, +Time in mins,Tiempo en min, +Time in mins.,Tiempo en minutos., +Time slot is not available,La franja horaria no está disponible, +To Doctype,A Doctype, +Total Incoming Value (Receipt),Valor Total Entrante (Recepción), +Total Issues,Total de Incidencias, +Total Outgoing Value (Consumption),Valor Total Saliente (Consumo), +Total Supplied Qty,Cant. Total suministrada, +Total Time (in Mins),Tiempo total (en minutos), +Total Value,Valor Total, +Total Value Difference (Incoming - Outgoing),Diferencia de valor total (entrante - saliente), +Total Views,Total de visualizaciones, +Total Warehouses,Total Almacenes, +Tracking Status,Estado de seguimiento, +Tracking Status Info,Información de estado de seguimiento, +Tracking URL,URL de Seguimiento, +Transaction Settings,Configuración de Transacciones, +Transaction currency: {0} cannot be different from Bank Account({1}) currency: {2},Moneda de la transacción: {0} no puede ser diferente de la moneda de la cuenta bancaria ({1}): {2}, +Transit,Tránsito, +Transit Entry,Entrada de Tránsito, +Type of Transaction,Tipo de Transacción, +UAE VAT 201,IVA EAU 201, +Unable to find variable:,No se puede encontrar la variable:, +Unassigned Qty,Cant. Sin asignar, +Unit of Measure (UOM),Unidad de Medida (UdM), +Unlinked,Desvincular, +Unqualified,No calificada, +Unrealized Profit / Loss Account,Cuenta de Pérdidas/Ganancias no realizada, +Up,Arriba, +Update Existing Records,Actualizar registros existentes, +Update Rate as per Last Purchase,Actualizar tasa según la última compra, +Update Total Purchase Cost,Actualizar Costo Total de Compra, +Updating Work Order status,Actualizando estado de la Orden de Trabajo, +"Updating {0} of {1}, {2}","Actualización {0} de {1}, {2}", +Upload Bank Statement,Cargar extracto bancario, +Use Company Default Round Off Cost Center,Utilizar el Centro de Costes de redondeo por defecto de la Compañía, +Use Company default Cost Center for Round off,Utilizar el Centro de Costos por defecto de la compañía para el redondeo, +Use HTTP Protocol,Usar protocolo HTTP, +Use Transaction Date Exchange Rate,Usar el tipo de cambio de fecha de la transacción, +User {0}: Removed Employee Self Service role as there is no mapped employee.,"Usuario {0}: Eliminado el rol de Autoservicio del Empleado, ya que no hay ningún empleado mapeado.", +User {0}: Removed Employee role as there is no mapped employee.,"Usuario {0}: Se eliminó el rol de Empleado, ya que no hay ningún empleado asignado.", +VAT Accounts,Cuentas de IVA, +VAT Amount (AED),Importe del IVA (AED), +VAT Audit Report,Informe de auditoría del IVA, +Valuation Rate (In / Out),Tasa de Valoración (Entrada/Salida), +Value Change,Cambio de Valor, +Voucher,Comprobante, +"WARNING: Exotel app has been separated from ERPNext, please install the app to continue using Exotel integration.",ADVERTENCIA: La aplicación Exotel se ha separado de ERPNext; instale la aplicación para continuar usando la integración de Exotel., +Waiting for payment...,Esperando Pago..., +Warehouse Capacity for Item '{0}' must be greater than the existing stock level of {1} {2}.,Capacidad del Almacén para el Producto '{0}' debe ser mayor que el nivel de stock existente de {1} {2}., +Warehouse Details,Detalle del Almacén, +Warehouse Disabled?,¿Almacén deshabilitado?, +Warehouse Settings,Configuración del Almacén, +Warehouse Wise Stock Balance,Saldo de existencias en almacén, +Warehouse wise Stock Value,Valor de las existencias en función del almacén, +Warehouse {0} does not belong to Company {1}.,Almacén {0} no pertenece a la Compañía {1}., +Warning!,¡Advertencia!, +Watch Video,Ver video, +Website Script,Script del Sitio Web, +Website Theme,Tema del Sitio Web, +Week {0} {1},Semana {0} {1}, +Weight (kg),Peso (kg), +Width (cm),Ancho (cm), +Workflow,Flujos de Trabajo, +Workflow Action,Acciones de flujos de trabajo, +Workflow State,Estados de flujos de trabajo, +Workstation Status,Estado de la estación de trabajo, +Workstation Type,Tipo de estación de trabajo, +Workstations,Estación de trabajo, +Wrong Company,Compañía incorrecta, +You haven't created a {0} yet,Aún no ha creado un {0}, +Your Name (required),Su nombre (requerido), +`Allow Negative rates for Items`,`Permitir precios Negativos para los Productos`, +description,descripción, +fieldname,nombre del campo, +variance,variación, +{0} and {1},{0} y {1}, +{0} is already running for {1},{0} ya se está ejecutando por {1}, +{0} {1} Manually,{0} {1} Manualmente, +{0} {1} Partially Reconciled,{0} {1} Parcialmente reconciliado, +{0} {1}: Account {2} is a Group Account and group accounts cannot be used in transactions,{0} {1}: La cuenta {2} es una Cuenta de Grupo y las Cuentas de Grupo no pueden utilizarse en transacciones, +{0} {1}: Cost Center {2} is a group cost center and group cost centers cannot be used in transactions,{0} {1}: El Centro de Costos {2} es un Centro de Costos de Grupo y los Centros de Costos de Grupo no pueden utilizarse en transacciones, +{0}% of total invoice value will be given as discount.,{0}% del valor total de la factura se otorgará como descuento., +{} Available,{} Disponible, +{} Assigned,{} Asignado, +{} Available,{} Disponible, +{} Open,{} Abierto, +{} {} is already linked with another {},{} {} ya está vinculado con otro {}, +{} {} is already linked with {} {},{} {} ya está vinculado con {} {}, diff --git a/erpnext/translations/fa.csv b/erpnext/translations/fa.csv index 7c2e8544c9c..f65226bf761 100644 --- a/erpnext/translations/fa.csv +++ b/erpnext/translations/fa.csv @@ -8743,3 +8743,2535 @@ WhatsApp,واتس اپ, Make a call,تماس بگیر, Approve,تایید, Reject,رد کردن, + Address, آدرس, + Amount, میزان, + Is Child Table, جدول فرزند است, + Name, نام, + Rate, نرخ, + Summary, خلاصه, +"""SN-01::10"" for ""SN-01"" to ""SN-10""","""SN-01::10"" برای ""SN-01"" تا ""SN-10""", +# In Stock,# در موجودی, +# Req'd Items,# آیتم‌های درخواست شده, +% Finished Item Quantity,% مقدار آیتم تمام شده, +% Occupied,٪ مشغول, +% Picked,% انتخاب شده, +% Process Loss,% از دست دادن فرآیند, +% Returned,% برگردانده شده, +'Account' in the Accounting section of Customer {0},حساب در بخش حسابداری مشتری {0}, +'Allow Multiple Sales Orders Against a Customer's Purchase Order',اجازه دادن سفارش‌های فروش چندگانه در برابر سفارش خرید مشتری, +'Default {0} Account' in Company {1},«حساب پیش‌فرض {0}» در شرکت {1}, +'To Package No.' cannot be less than 'From Package No.',"'به شماره بسته.' نمی تواند کمتر از ""از شماره بسته"" باشد.", +'{0}' account is already used by {1}. Use another account.,حساب '{0}' قبلاً توسط {1} استفاده شده است. از حساب دیگری استفاده کنید., +'{0}' should be in company currency {1}.,"""{0}"" باید به ارز شرکت {1} باشد.", +(A) Qty After Transaction,(A) تعداد پس از تراکنش, +(B) Expected Qty After Transaction,(ب) تعداد مورد انتظار پس از تراکنش, +(C) Total Qty in Queue,(C) تعداد کل در صف, +(C) Total qty in queue,(C) تعداد کل در صف, +(D) Balance Stock Value,(D) ارزش موجودی, +(E) Balance Stock Value in Queue,(E) موجودی ارزش موجودی در صف, +(F) Change in Stock Value,(F) تغییر در ارزش موجودی, +(G) Sum of Change in Stock Value,(ز) مجموع تغییر در ارزش موجودی, +(H) Change in Stock Value (FIFO Queue),(H) تغییر در ارزش موجودی (صف FIFO), +(H) Valuation Rate,(H) نرخ ارزش گذاری, +(I) Valuation Rate,(I) نرخ ارزش گذاری, +(J) Valuation Rate as per FIFO,(J) نرخ ارزیابی مطابق با FIFO, +(K) Valuation = Value (D) ÷ Qty (A),(K) ارزش = ارزش (D) ÷ تعداد (A), +", with the inventory {0}: {1}",، با موجودی {0}: {1}, +0-30 Days,0-30 روز, +3 Yearly,3 سالانه, +30-60 Days,30-60 روز, +60-90 Days,60-90 روز, +90 Above,90 بالا, +"
Other Details
","
جزئیات دیگر
", +"
No Matching Bank Transactions Found
","
هیچ تراکنش بانکی منطبقی پیدا نشد
", +"
+

All dimensions in centimeter only

+
","
+

همه ابعاد فقط به سانتی‌متر

+
", +"

About Product Bundle

+ +

Aggregate group of Items into another Item. This is useful if you are bundling a certain Items into a package and you maintain stock of the packed Items and not the aggregate Item.

+

The package Item will have Is Stock Item as No and Is Sales Item as Yes.

+

Example:

+

If you are selling Laptops and Backpacks separately and have a special price if the customer buys both, then the Laptop + Backpack will be a new Product Bundle Item.

","

درباره باندل محصول

+ +

گروهی از آیتم‌ها را در آیتم دیگری جمع آوری کنید. اگر آیتم‌های خاصی را در یک باندل قرار دهید و موجودی آیتم‌های بسته بندی شده را حفظ کنید و نه آیتم‌های جمع آوری شده، مفید است.

+

بسته آیتم دارای آیتم موجودی است به عنوان خیر و آیتم فروش است به عنوان بله خواهد بود. .

+

مثال:

+

اگر لپ‌تاپ و کوله‌پشتی را جداگانه می‌فروشید و اگر مشتری هر دو را بخرد، قیمت ویژه‌ای دارید، لپ‌تاپ + کوله‌پشتی یک کالای باندل محصول جدید خواهد بود.

", +"
Or
","
یا
", +"","", +"","", +"","", +"Masters & Reports","مستندات و گزارش ها", +"Quick Access","دسترسی سریع", +"Reports & Masters","گزارش ها و مستندات", +"Reports & Masters","گزارش ها و مستندات", +"Settings","تنظیمات", +"Shortcuts","میانبرها", +"Your Shortcuts + + + + + + ","میانبرهای شما + + + + + + ", +"Your Shortcuts","میانبرهای شما", +Grand Total: {0},جمع کل: {0}, +Outstanding Amount: {0},مبلغ معوق: {0}, +A - B,الف - ب, +A - C,الف - ج, +A Holiday List can be added to exclude counting these days for the Workstation.,فهرست تعطیلات را می توان اضافه کرد تا شمارش این روزها برای ایستگاه کاری حذف شود., +A Packing Slip can only be created for Draft Delivery Note.,یک برگه بسته بندی فقط می تواند برای پیش نویس یادداشت تحویل ایجاد شود., +"A Price List is a collection of Item Prices either Selling, Buying, or both",لیست قیمت مجموعه ای از قیمت های آیتم‌های فروش، خرید یا هر دو است, +A Reconciliation Job {0} is running for the same filters. Cannot reconcile now,یک کار تطبیق {0} برای همین فیلترها در حال اجرا است. الان نمیشه تطبیق کرد, +A Transaction Deletion Document: {0} is triggered for {0},یک سند حذف تراکنش: {0} برای {0} فعال می شود, +A customer must have primary contact email.,مشتری باید ایمیل تماس اصلی داشته باشد., +A driver must be set to submit.,یک راننده باید برای ارسال تنظیم شود., +A template with tax category {0} already exists. Only one template is allowed with each tax category,الگویی با دسته مالیاتی {0} از قبل وجود دارد. فقط یک الگو با هر دسته مالیات مجاز است, +API Details,جزئیات API, +AWB Number,شماره AWB, +Abbreviation: {0} must appear only once,مخفف: {0} باید فقط یک بار ظاهر شود, +About Us Settings,تنظیمات درباره ما, +About {0} minute remaining,حدود {0} دقیقه باقی مانده است, +About {0} minutes remaining,حدود {0} دقیقه باقی مانده است, +About {0} seconds remaining,حدود {0} ثانیه باقی مانده است, +Acceptance Criteria Formula,فرمول معیارهای پذیرش, +Acceptance Criteria Value,مقدار معیارهای پذیرش, +Accepted Qty in Stock UOM,تعداد پذیرفته شده در انبار UOM, +Access Key,کلید دسترسی, +Access Key is required for Service Provider: {0},کلید دسترسی برای ارائه‌دهنده خدمات لازم است: {0}, +Account Balance (From),تراز حساب (از), +Account Balance (To),تراز حساب (به), +Account Closing Balance,تراز اختتامیه حساب, +Account Currency (From),ارز حساب (از), +Account Currency (To),ارز حساب (به), +Account Opening Balance,تراز افتتاحیه حساب, +Account not Found,حساب پیدا نشد, +Account {0} added multiple times,حساب {0} چندین بار اضافه شد, +Accounting Dimension Filter,فیلتر ابعاد حسابداری, +Accounting Dimensions Filter,فیلتر ابعاد حسابداری, +Accounting Entry for {0},ثبت حسابداری برای {0}, +Accounts Closing,بسته شدن حساب ها, +Accounts Missing Error,خطای گم شدن حساب ها, +Accounts Receivable/Payable,حساب های دریافتنی / پرداختنی, +Accounts to Merge,حساب ها برای ادغام, +Action If Quality Inspection Is Rejected,اقدام اگر بازرسی کیفیت رد شود, +Action If Same Rate is Not Maintained,اگر همان نرخ حفظ نشود، اقدام کنید, +Action if Same Rate is Not Maintained Throughout Sales Cycle,اگر نرخ یکسانی در طول چرخه فروش حفظ نشود، اقدام کنید, +Active Status,وضعیت فعال, +Actual Balance Qty,مقدار تراز واقعی, +Actual Expense,هزینه واقعی, +Actual Posting,ارسال واقعی, +Actual Qty in Warehouse,مقدار واقعی در انبار, +Actual Time,زمان واقعی, +Add Columns in Transaction Currency,اضافه کردن ستون به ارز تراکنش, +Add Corrective Operation Cost in Finished Good Valuation,اضافه کردن هزینه عملیات اصلاحی در ارزش گذاری کالای تمام شده, +Add Discount,افزودن تخفیف, +Add Items in the Purpose Table,افزودن آیتم‌ها در جدول هدف, +Add Lead to Prospect,لید را به Prospect اضافه کنید, +Add Local Holidays,تعطیلات محلی را اضافه کنید, +Add Manually,افزودن دستی, +Add Or Deduct,افزودن یا کسر, +Add Serial / Batch Bundle,افزودن باندل سریال / دسته, +Add Serial / Batch No,اضافه کردن سریال / شماره دسته, +Add Serial / Batch No (Rejected Qty),اضافه کردن سریال / شماره دسته (تعداد رد شده), +Add Stock,افزودن موجودی, +Add Sub Assembly,افزودن زیر مونتاژ, +Add Template,اضافه کردن الگو, +Add a Note,یک یادداشت اضافه کنید, +Add details,جزئیات را اضافه کنید, +Add to Prospect,به Prospect اضافه کنید, +Added By,اضافه شده توسط, +Added On,اضافه شده در, +Added Supplier Role to User {0}.,نقش تامین کننده به کاربر {0} اضافه شد., +Added {1} Role to User {0}.,نقش {1} به کاربر {0} اضافه شد., +Adding Lead to Prospect...,افزودن سرنخ به مشتری بالقوه..., +Additional,اضافی, +Additional Asset Cost,هزینه دارایی اضافی, +Additional Cost Per Qty,هزینه اضافی در هر تعداد, +Additional Info,اطلاعات اضافی, +Address And Contacts,آدرس و مخاطبین, +Adjust Asset Value,ارزش دارایی را تنظیم کنید, +Adjustment Against,تعدیل در مقابل, +Adjustment based on Purchase Invoice rate,تعدیل بر اساس نرخ فاکتور خرید, +Advance Payment,پیش پرداخت, +Advance Tax,پیش پرداخت مالیات, +Advance Taxes and Charges,پیش پرداخت مالیات و هزینه ها, +Advance paid against {0} {1} cannot be greater than Grand Total {2},پیش پرداخت در مقابل {0} {1} نمی تواند بیشتر از کل کل {2} باشد, +Advance payments allocated against orders will only be fetched,پیش پرداخت های تخصیص یافته در برابر سفارش ها فقط واکشی می شود, +Affected Transactions,معاملات تحت تأثیر, +Against Customer Order {0},در مقابل سفارش مشتری {0}, +Against Supplier Invoice {0},در مقابل فاکتور تامین کننده {0}, +Against Voucher No,در مقابل کوپن شماره, +Age ({0}),سن ({0}), +Ageing Range,محدوده سالخوردگی, +Agent Busy Message,پیام مامور مشغول, +Agent Group,گروه عامل, +Agent Unavailable Message,پیام عامل در دسترس نیست, +Aggregate a group of Items into another Item. This is useful if you are maintaining the stock of the packed items and not the bundled item,گروهی از آیتم‌ها را در یک آیتم دیگر جمع کنید. اگر موجودی آیتم‌های بسته بندی شده را نگهداری می کنید و نه آیتم باندل شده، مفید است, +Algorithm,الگوریتم, +All Activities,تمام فعالیت ها, +All Activities HTML,تمام فعالیت ها HTML, +All Items,همه آیتم ها, +All allocations have been successfully reconciled,همه تخصیص ها با موفقیت تطبیق داده شده است, +All items have already been received,همه آیتم‌ها قبلاً دریافت شده است, +All items in this document already have a linked Quality Inspection.,همه آیتم‌ها در این سند قبلاً دارای یک بازرسی کیفیت مرتبط هستند., +All the Comments and Emails will be copied from one document to another newly created document(Lead -> Opportunity -> Quotation) throughout the CRM documents.,تمام نظرات و ایمیل ها از یک سند به سند جدید ایجاد شده دیگر (سرنخ -> فرصت -> پیش فاکتور) در سراسر اسناد CRM کپی می شوند., +"All the required items (raw materials) will be fetched from BOM and populated in this table. Here you can also change the Source Warehouse for any item. And during the production, you can track transferred raw materials from this table.",تمام آیتم‌های مورد نیاز (مواد اولیه) از BOM واکشی شده و در این جدول پر می شود. در اینجا شما همچنین می توانید انبار منبع را برای هر آیتم تغییر دهید. و در حین تولید می توانید مواد اولیه انتقال یافته را از این جدول ردیابی کنید., +Allocate Payment Request,تخصیص درخواست پرداخت, +Allocated Entries,ورودی های اختصاص داده شده, +Allocated To:,اختصاص داده شده به:, +Allocations,تخصیص ها, +Allow,اجازه, +Allow Alternative Item must be checked on Item {},آیتم جایگزین مجاز است باید برای آیتم {} علامت زده شود, +Allow Continuous Material Consumption,اجازه مصرف مداوم مواد, +Allow Excess Material Transfer,اجازه انتقال مواد اضافی را بدهید, +Allow Item to be Added Multiple Times in a Transaction,اجازه دهید آیتم چندین بار در یک تراکنش اضافه شود, +Allow Lead Duplication based on Emails,اجازه تکرار سرنخ بر اساس ایمیل, +Allow Negative rates for Items,نرخ های منفی برای آیتم‌ها مجاز است, +Allow Or Restrict Dimension,اجازه یا محدود کردن ابعاد, +Allow Partial Reservation,اجازه رزرو جزئی, +Allow Purchase,اجازه خرید, +Allow Sales,اجازه فروش, +Allow Sales Order Creation For Expired Quotation,اجازه ایجاد سفارش فروش برای قیمت منقضی شده, +Allow User to Edit Discount,به کاربر اجازه ویرایش تخفیف را بدهید, +Allow User to Edit Rate,به کاربر اجازه ویرایش نرخ بدهید, +Allow Zero Rate,اجازه نرخ صفر, +Allow material consumptions without immediately manufacturing finished goods against a Work Order,اجازه مصرف مواد را بدون تولید فوری کالاهای تمام شده در برابر دستور کار بدهید, +Allow multi-currency invoices against single party account , صورتحساب‌های چند ارزی را در برابر حساب یک طرف مجاز کنید, +Allow to Edit Stock UOM Qty for Purchase Documents,اجازه ویرایش موجودی UOM Qty برای اسناد خرید, +Allow to Edit Stock UOM Qty for Sales Documents,امکان ویرایش موجودی UOM Qty برای اسناد فروش, +Allow transferring raw materials even after the Required Quantity is fulfilled,امکان انتقال مواد خام حتی پس از برآورده شدن مقدار مورد نیاز, +Allowed,مجاز, +Allowed Dimension,ابعاد مجاز, +Allowed Doctypes,Doctypes مجاز, +Allowed Items,آیتم‌های مجاز, +Allowed primary roles are 'Customer' and 'Supplier'. Please select one of these roles only.,نقش‌های اصلی مجاز عبارتند از «مشتری» و «تامین‌کننده». لطفا فقط یکی از این نقش ها را انتخاب کنید., +Allows to keep aside a specific quantity of inventory for a particular order.,اجازه می دهد تا مقدار مشخصی از موجودی را برای یک سفارش خاص کنار بگذارید., +Already Picked,قبلاً انتخاب شده است, +Alternative Items,آیتم‌های جایگزین, +"Alternatively, you can download the template and fill your data in.",همچنین می توانید الگو را دانلود کرده و داده های خود را پر کنید., +Amount (AED),مقدار (AED), +Amount Eligible for Commission,مبلغ واجد شرایط برای کمیسیون, +Amount in Account Currency,مبلغ به ارز حساب, +Amount in party's bank account currency,مبلغ به ارز حساب بانکی طرف, +Amount in transaction currency,مبلغ به ارز تراکنش, +An Item Group is a way to classify items based on types.,گروه آیتم راهی برای دسته بندی آیتم‌ها بر اساس انواع است., +An error has been appeared while reposting item valuation via {0},هنگام ارسال مجدد ارزیابی مورد از طریق {0} خطایی ظاهر شد, +An error has occurred during {0}. Check {1} for more details,خطایی در طول {0} رخ داده است. برای جزئیات بیشتر {1} را بررسی کنید,Error Log +Annual Revenue,درآمد سالانه, +"Another Cost Center Allocation record {0} applicable from {1}, hence this allocation will be applicable upto {2}",یکی دیگر از رکوردهای تخصیص مرکز هزینه {0} قابل اعمال از {1}، بنابراین این تخصیص تا {2} قابل اعمال خواهد بود., +"Any one of following filters required: warehouse, Item Code, Item Group",هر یک از فیلترهای زیر مورد نیاز است: انبار، کد آیتم، گروه آیتم, +Applicable Dimension,ابعاد قابل اجرا, +Applicable On Account,قابل اجرا در حساب, +Applied on each reading.,در هر خواندن اعمال می شود., +Applied putaway rules.,اعمال قوانین حذف, +Apply Putaway Rule,اعمال قانون Putaway, +Apply Recursion Over (As Per Transaction UOM),اعمال بازگشت بیش از (بر اساس UOM تراکنش), +Apply SLA for Resolution Time,اعمال SLA برای زمان حل و فصل, +Apply TDS,TDS را اعمال کنید, +Apply Tax Withholding Amount , اعمال مبلغ کسر مالیات, +Apply restriction on dimension values,اعمال محدودیت در مقادیر ابعاد, +Apply to All Inventory Documents,برای همه اسناد موجودی اعمال شود, +Apply to Document,درخواست برای سند, +Appointment Created Successfully,قرار ملاقات با موفقیت ایجاد شد, +Appointment Scheduling Disabled,زمان‌بندی قرار غیرفعال است, +Appointment Scheduling has been disabled for this site,زمان‌بندی قرار برای این سایت غیرفعال شده است, +Appointment was created. But no lead was found. Please check the email to confirm,قرار ملاقات ایجاد شد. اما سرنخی پیدا نشد. لطفا برای تایید ایمیل را بررسی کنید, +Approximately match the description/party name against parties,تقریباً توصیف/نام طرف را با طرف‌ها مطابقت دهید, +Are you sure you want to clear all demo data?,آیا مطمئن هستید که می خواهید تمام داده های نمایشی را پاک کنید؟, +Are you sure you want to delete this Item?,آیا مطمئن هستید که میخواهید این آیتم را حذف کنید؟, +Are you sure you want to restart this subscription?,آیا مطمئن هستید که می خواهید این اشتراک را مجدداً راه‌اندازی کنید؟, +As on Date,همانطور که در تاریخ, +"As there are existing submitted transactions against item {0}, you can not change the value of {1}.",از آنجایی که تراکنش‌های ارسالی موجود در مقابل آیتم {0} وجود دارد، نمی‌توانید مقدار {1} را تغییر دهید., +"As there are negative stock, you can not enable {0}.",از آنجایی که موجودی منفی وجود دارد، نمی توانید {0} را فعال کنید., +"As there are reserved stock, you cannot disable {0}.",از آنجایی که موجودی رزرو شده وجود دارد، نمی توانید {0} را غیرفعال کنید., +"As there are sufficient Sub Assembly Items, Work Order is not required for Warehouse {0}.",از آنجایی که آیتم‌های زیر مونتاژ کافی وجود دارد، برای انبار {0} نیازی به دستور کار نیست., +"As {0} is enabled, you can not enable {1}.",از آنجایی که {0} فعال است، نمی توانید {1} را فعال کنید., +Assembly Items,آیتم‌های مونتاژ, +Asset Activity,فعالیت دارایی, +Asset Capitalization,سرمایه گذاری دارایی ها, +Asset Capitalization Asset Item,دارایی دارایی با سرمایه, +Asset Capitalization Service Item,آیتم خدمات سرمایه گذاری دارایی, +Asset Capitalization Stock Item,آیتم موجودی سرمایه گذاری دارایی, +Asset Depreciation Details,جزئیات استهلاک دارایی, +Asset Depreciation Schedule,جدول استهلاک دارایی ها, +Asset Depreciation Schedule for Asset {0} and Finance Book {1} is not using shift based depreciation,برنامه استهلاک دارایی برای دارایی {0} و کتاب مالی {1} از استهلاک مبتنی بر شیفت استفاده نمی کند, +Asset Depreciation Schedule not found for Asset {0} and Finance Book {1},برنامه استهلاک دارایی برای دارایی {0} و کتاب مالی {1} یافت نشد, +Asset Depreciation Schedule {0} for Asset {1} already exists.,برنامه استهلاک دارایی {0} برای دارایی {1} از قبل وجود دارد., +Asset Depreciation Schedule {0} for Asset {1} and Finance Book {2} already exists.,برنامه استهلاک دارایی {0} برای دارایی {1} و کتاب مالی {2} از قبل وجود دارد., +"Asset Depreciation Schedules created:
{0}

Please check, edit if needed, and submit the Asset.",برنامه‌های استهلاک دارایی ایجاد شده:
{0}

لطفاً بررسی کنید، در صورت نیاز ویرایش کنید و دارایی را ارسال کنید., +Asset ID,شناسه دارایی, +Asset Quantity,مقدار دارایی, +Asset Repair Consumed Item,کالای مصرفی تعمیر دارایی, +Asset Settings,تنظیمات دارایی, +Asset Shift Allocation,تخصیص تغییر دارایی, +Asset Shift Factor,عامل تغییر دارایی, +Asset Shift Factor {0} is set as default currently. Please change it first.,عامل تغییر دارایی {0} در حال حاضر به عنوان پیش فرض تنظیم شده است. لطفا ابتدا آن را تغییر دهید., +Asset cancelled,دارایی لغو شد, +Asset capitalized after Asset Capitalization {0} was submitted,پس از ارسال دارایی با حروف بزرگ {0} دارایی با حروف بزرگ نوشته شد, +Asset created,دارایی ایجاد شد, +Asset created after Asset Capitalization {0} was submitted,دارایی ایجاد شده پس از ارسال با حروف بزرگ دارایی {0}, +Asset created after being split from Asset {0},دارایی پس از جدا شدن از دارایی {0} ایجاد شد, +Asset decapitalized after Asset Capitalization {0} was submitted,پس از ارسال دارایی با سرمایه {0}، دارایی از سرمایه خارج شد, +Asset deleted,دارایی حذف شد, +Asset issued to Employee {0},دارایی برای کارمند {0} حواله شده, +Asset out of order due to Asset Repair {0},دارایی از کار افتاده به دلیل تعمیر دارایی {0}, +Asset received at Location {0} and issued to Employee {1},دارایی در مکان {0} دریافت و برای کارمند {1} حواله شد, +Asset restored,دارایی بازیابی شد, +Asset restored after Asset Capitalization {0} was cancelled,دارایی پس از لغو حروف بزرگ دارایی {0} بازیابی شد, +Asset returned,دارایی برگردانده شد, +Asset scrapped,دارایی از بین رفته است, +Asset sold,دارایی فروخته شده, +Asset submitted,دارایی ارسال شد, +Asset transferred to Location {0},دارایی به مکان {0} منتقل شد, +Asset updated after being split into Asset {0},دارایی پس از تقسیم به دارایی {0} به روز شد, +Asset updated after cancellation of Asset Repair {0},دارایی پس از لغو تعمیر دارایی {0} به روز شد, +Asset updated after completion of Asset Repair {0},دارایی پس از اتمام تعمیر دارایی به روز شد {0}, +Asset {0} cannot be received at a location and given to an employee in a single movement,دارایی {0} را نمی توان در یک مکان دریافت کرد و در یک حرکت به کارمند داد, +Asset {0} does not belong to Item {1},دارایی {0} به آیتم {1} تعلق ندارد, +Asset {0} does not exist,دارایی {0} وجود ندارد, +Asset {0} has been created. Please set the depreciation details if any and submit it.,دارایی {0} ایجاد شده است. لطفاً جزئیات استهلاک را در صورت وجود تنظیم و ارسال کنید., +Asset {0} has been updated. Please set the depreciation details if any and submit it.,دارایی {0} به روز شده است. لطفاً جزئیات استهلاک را در صورت وجود تنظیم و ارسال کنید., +Asset's depreciation schedule updated after Asset Shift Allocation {0},برنامه استهلاک دارایی پس از تخصیص تغییر دارایی {0} به روز شد, +Asset's value adjusted after cancellation of Asset Value Adjustment {0},ارزش دارایی پس از لغو تعدیل ارزش دارایی تنظیم شد {0}, +Asset's value adjusted after submission of Asset Value Adjustment {0},ارزش دارایی پس از ارسال تعدیل ارزش دارایی تنظیم شد {0}, +Assign Job to Employee,کار را به کارمند واگذار کنید, +Assignment,تخصیص, +Assignment Conditions,شرایط تخصیص, +At Row #{0}: The picked quantity {1} for the item {2} is greater than available stock {3} for the batch {4} in the warehouse {5}.,در ردیف #{0}: مقدار انتخاب شده {1} برای آیتم {2} بیشتر از موجودی در دسترس {3} برای دسته {4} در انبار {5} است., +At Row #{0}: The picked quantity {1} for the item {2} is greater than available stock {3} in the warehouse {4}.,در ردیف #{0}: مقدار انتخاب شده {1} برای آیتم {2} بیشتر از موجودی در دسترس {3} در انبار {4} است., +At row {0}: Batch No is mandatory for Item {1},در ردیف {0}: شماره دسته برای مورد {1} اجباری است, +At row {0}: Parent Row No cannot be set for item {1},در ردیف {0}: ردیف والد برای آیتم {1} قابل تنظیم نیست, +At row {0}: Qty is mandatory for the batch {1},در ردیف {0}: مقدار برای دسته {1} اجباری است, +At row {0}: Serial No is mandatory for Item {1},در ردیف {0}: شماره سریال برای آیتم {1} اجباری است, +At row {0}: Serial and Batch Bundle {1} has already created. Please remove the values from the serial no or batch no fields.,در ردیف {0}: باندل سریال و دسته {1} قبلا ایجاد شده است. لطفاً مقادیر را از فیلدهای شماره سریال یا شماره دسته حذف کنید., +At row {0}: set Parent Row No for item {1},در ردیف {0}: تنظیم شماره ردیف والد برای آیتم {1}, +Attach CSV File,پیوست فایل CSV, +Attendance & Leaves,حضور و غیاب و مرخصی, +Attribute value: {0} must appear only once,مقدار مشخصه: {0} باید فقط یک بار ظاهر شود, +Auto Create Exchange Rate Revaluation,ایجاد خودکار تجدید ارزیابی نرخ ارز, +Auto Create Purchase Receipt,ایجاد خودکار رسید خرید, +Auto Create Serial and Batch Bundle For Outward,ایجاد خودکار باندل سریال و دسته برای بیرون, +Auto Create Subcontracting Order,ایجاد خودکار سفارش قرارداد فرعی, +Auto Created Serial and Batch Bundle,باندل سریال و دسته ایجاد شده به صورت خودکار, +Auto Creation of Contact,ایجاد خودکار مخاطب, +Auto Email Report,گزارش خودکار ایمیل, +Auto Insert Item Price If Missing,درج خودکار قیمت آیتم در صورت فراموش شدن, +Auto Name,نام خودکار, +Auto Reconcile,تطبیق خودکار, +Auto Reconcile Payments,تطبیق خودکار پرداخت ها, +Auto Reconciliation,تطبیق خودکار, +Auto Reconciliation of Payments has been disabled. Enable it through {0},تطبیق خودکار پرداخت‌ها غیرفعال شده است. آن را از طریق {0} فعال کنید, +Auto Reserve Serial and Batch Nos,شماره سریال و دسته رزرو خودکار, +Auto Reserve Stock for Sales Order on Purchase,ذخیره خودکار موجودی برای سفارش فروش در هنگام خرید, +Auto close Opportunity Replied after the no. of days mentioned above,فرصت بسته شدن خودکار پس از خیر پاسخ داده شد. از روزهای ذکر شده در بالا, +Auto match and set the Party in Bank Transactions,مطابقت خودکار و تنظیم طرف در معاملات بانکی, +Auto write off precision loss while consolidation,حذف خودکار از دست دادن دقت در هنگام تلفیق, +Automatically Add Filtered Item To Cart,افزودن خودکار آیتم فیلتر شده به سبد خرید, +Automatically Fetch Payment Terms from Order,واکشی خودکار شرایط پرداخت از سفارش, +Automatically post balancing accounting entry,ثبت حسابداری تراز به طور خودکار, +Available Qty For Consumption,تعداد موجود برای مصرف, +Available Qty at Company,تعداد موجود در شرکت, +Available Qty at Target Warehouse,تعداد موجود در انبار هدف, +Available Qty to Reserve,تعداد برای رزرو موجود است, +Average Completion,میانگین تکمیل, +Avg Rate,میانگین نرخ, +Avg Rate (Balance Stock),میانگین نرخ (تراز موجودی), +BOM Created,BOM ایجاد شد, +BOM Creator,ایجاد کننده BOM, +BOM Creator Item,آیتم ایجاد کننده BOM, +BOM Info,اطلاعات BOM, +BOM Level,سطح BOM, +BOM Tree,درخت BOM, +BOM UoM,واحد اندازه گیری BOM, +BOM Update Batch,دسته به روز رسانی BOM, +BOM Update Initiated,به روز رسانی BOM آغاز شد, +BOM Update Log,لاگ به روز رسانی BOM, +BOM Updation already in progress. Please wait until {0} is complete.,به‌روزرسانی BOM در حال انجام است. لطفاً صبر کنید تا {0} کامل شود., +BOM Updation is queued and may take a few minutes. Check {0} for progress.,به روز رسانی BOM در صف است و ممکن است چند دقیقه طول بکشد. برای پیشرفت، {0} را بررسی کنید., +BOM and Production,BOM و تولید, +BOM recursion: {1} cannot be parent or child of {0},بازگشت BOM: {1} نمی تواند والد یا فرزند {0} باشد, +BOMs Updated,BOM ها به روز شدند, +BOMs created successfully,BOM با موفقیت ایجاد شد, +BOMs creation failed,ایجاد BOM ناموفق بود, +"BOMs creation has been enqueued, kindly check the status after some time",ایجاد BOM در نوبت قرار گرفته است، لطفاً وضعیت را پس از مدتی بررسی کنید, +Balance Qty (Stock),مقدار تراز (موجودی), +Balance Sheet Summary,خلاصه ترازنامه, +Balance Stock Value,تراز ارزش موجودی, +Bank Reconciliation Tool,ابزار تطبیق بانکی, +Bank Statement Import,درون‌بُرد صورتحساب بانکی, +Bank Transaction {0} Matched,تراکنش بانکی {0} مطابقت دارد, +Bank Transaction {0} added as Journal Entry,تراکنش بانکی {0} به عنوان ثبت دفتر روزنامه اضافه شد, +Bank Transaction {0} added as Payment Entry,تراکنش بانکی {0} به عنوان ثبت پرداخت اضافه شد, +Bank Transaction {0} is already fully reconciled,تراکنش بانکی {0} در حال حاضر به طور کامل تطبیق شده است, +Bank Transaction {0} updated,تراکنش بانکی {0} به روز شد, +Bank/Cash Account,بانک / حساب نقدی, +Bank/Cash Account {0} doesn't belong to company {1},حساب بانکی/نقدی {0} به شرکت {1} تعلق ندارد, +Base Amount,مقدار پایه, +Base Cost Per Unit,هزینه پایه به ازای هر واحد, +Base Rate,نرخ پایه, +Base Tax Withholding Net Total,کل خالص کسر مالیات پایه, +Base Total,مجموع پایه, +Base Total Billable Amount,مبنا کل مبلغ قابل پرداخت, +Base Total Billed Amount,مبنا کل مبلغ صورتحساب, +Base Total Costing Amount,مبنا کل بهای تمام شده, +Based On Value,بر اساس ارزش, +"Based on your HR Policy, select your leave allocation period's end date",بر اساس خط مشی منابع انسانی خود، تاریخ پایان دوره تخصیص مرخصی خود را انتخاب کنید, +"Based on your HR Policy, select your leave allocation period's start date",بر اساس خط مشی منابع انسانی خود، تاریخ شروع دوره تخصیص مرخصی خود را انتخاب کنید, +Batch No is mandatory,شماره دسته اجباری است, +Batch No {0} does not exists,شماره دسته {0} وجود ندارد, +Batch No {0} is linked with Item {1} which has serial no. Please scan serial no instead.,شماره دسته {0} با آیتم {1} که دارای شماره سریال است پیوند داده شده است. لطفاً شماره سریال را اسکن کنید., +Batch No.,شماره دسته, +Batch Nos,شماره های دسته, +Batch Nos are created successfully,شماره های دسته با موفقیت ایجاد شد, +Batch Qty,مقدار دسته, +Batch and Serial No,شماره دسته و سریال, +Batch not created for item {} since it does not have a batch series.,دسته ای برای آیتم {} ایجاد نشده است زیرا سری دسته ای ندارد., +Batch {0} and Warehouse,دسته {0} و انبار, +Batch {0} is not available in warehouse {1},دسته {0} در انبار {1} موجود نیست, +Batchwise Valuation,ارزش گذاری دسته ای, +Beginning of the current subscription period,شروع دوره اشتراک فعلی, +Bill for Rejected Quantity in Purchase Invoice,صورتحساب مقدار رد شده در فاکتور خرید, +Billed Items To Be Received,آیتم‌های صورتحساب شده برای دریافت, +"Billed, Received & Returned",صورتحساب، دریافت و برگردانده شد, +Billing Address Details,جزئیات آدرس صورتحساب, +Billing Interval in Subscription Plan must be Month to follow calendar months,فاصله صورتحساب در طرح اشتراک باید ماه باشد تا ماه‌های تقویمی را دنبال کنید, +Blanket Order Allowance (%),سفارش کلی مجاز (%), +Bom No,شماره BOM, +Book Advance Payments as Liability option is chosen. Paid From account changed from {0} to {1}.,گزینه رزرو پیش پرداخت به عنوان بدهی انتخاب شده است. حساب Paid From از {0} به {1} تغییر کرد., +Book Advance Payments in Separate Party Account,پیش پرداخت را در حساب طرف جداگانه رزرو کنید, +Book Tax Loss on Early Payment Discount,از دست دادن مالیات در تخفیف پرداخت زودهنگام رزرو کنید, +Book an appointment,یک قرار ملاقات رزرو کنید, +Booking stock value across multiple accounts will make it harder to track stock and account value.,رزرو ارزش موجودی در چندین حساب، ردیابی موجودی و ارزش حساب را دشوارتر می کند., +Books have been closed till the period ending on {0},کتاب‌ها تا پایان دوره {0} بسته شده‌اند, +Budget Exceeded,بودجه بیش از حد, +Build All?,ساخت همه؟, +Buildable Qty,تعداد قابل ساخت, +Bulk Transaction Log,لاگ تراکنش های انبوه, +Bulk Transaction Log Detail,جزئیات لاگ تراکنش های انبوه, +Bulk Update,به روز رسانی انبوه, +Bundle Items,آیتم‌های باندل, +Buying & Selling Settings,تنظیمات خرید و فروش, +Buying and Selling,خرید و فروش, +"By default, the Supplier Name is set as per the Supplier Name entered. If you want Suppliers to be named by a Naming Series choose the 'Naming Series' option.","به‌طور پیش‌فرض، نام تامین‌کننده مطابق با نام تامین‌کننده وارد شده تنظیم می‌شود. اگر می‌خواهید تامین‌کنندگان با سری نام‌گذاری نام‌گذاری شوند. گزینه ""Naming Series"" را انتخاب کنید.", +Bypass credit check at Sales Order,دور زدن بررسی اعتبار در سفارش فروش, +COGS By Item Group,COGS بر اساس گروه آیتم, +CRM Note,یادداشت CRM, +CRM Settings,تنظیمات CRM, +Calculate Product Bundle Price based on Child Items' Rates,قیمت باندل محصول را بر اساس نرخ آیتم‌های فرزند محاسبه کنید, +Call Again,دوباره تماس بگیر, +Call Ended,مکالمه تلفنی تمام شد, +Call Handling Schedule,برنامه رسیدگی به تماس ها, +Call Received By,تماس دریافت شده توسط, +Call Receiving Device,دستگاه دریافت تماس, +Call Routing,مسیریابی تماس, +Call Schedule Row {0}: To time slot should always be ahead of From time slot.,ردیف زمان‌بندی تماس {0}: بازه زمانی To همیشه باید جلوتر از بازه زمانی از زمان باشد., +Call Type,نوع تماس, +Callback,پاسخ به تماس, +Campaign Item,آیتم کمپین, +Can not close Work Order. Since {0} Job Cards are in Work In Progress state.,نمی توان دستور کار را بست. از آنجایی که کارت کارهای {0} در حالت کار در حال انجام هستند., +"Can not filter based on Child Account, if grouped by Account",اگر براساس حساب گروه‌بندی شود، نمی‌توان بر اساس حساب فرزند فیلتر کرد, +"Can't change the valuation method, as there are transactions against some items which do not have its own valuation method",نمی توان روش ارزش گذاری را تغییر داد، زیرا معاملاتی در برابر برخی اقلام وجود دارد که روش ارزش گذاری خاص خود را ندارند., +Cannot Merge,نمی توان ادغام کرد, +Cannot Resubmit Ledger entries for vouchers in Closed fiscal year.,نمی‌توان ورودی‌های دفتر کل را برای کوپن‌ها در سال مالی بسته دوباره ارسال کرد., +"Cannot amend {0} {1}, please create a new one instead.",نمی توان {0} {1} را اصلاح کرد، لطفاً در عوض یک مورد جدید ایجاد کنید., +Cannot apply TDS against multiple parties in one entry,نمی‌توان TDS را در یک ورودی در مقابل چندین طرف اعمال کرد, +Cannot cancel the transaction. Reposting of item valuation on submission is not completed yet.,نمی توان تراکنش را لغو کرد. ارسال مجدد ارزیابی اقلام هنگام ارسال هنوز تکمیل نشده است., +Cannot change Reference Document Type.,نمی توان نوع سند مرجع را تغییر داد., +Cannot complete task {0} as its dependant task {1} are not completed / cancelled.,نمی توان کار {0} را تکمیل کرد زیرا وظیفه وابسته آن {1} تکمیل نشده / لغو شد., +Cannot convert Task to non-group because the following child Tasks exist: {0}.,نمی توان وظیفه را به غیر گروهی تبدیل کرد زیرا وظایف فرزند زیر وجود دارد: {0}., +Cannot convert to Group because Account Type is selected.,نمی توان به گروه تبدیل کرد زیرا نوع حساب انتخاب شده است., +Cannot create Stock Reservation Entries for future dated Purchase Receipts.,نمی توان ورودی های رزرو موجودی را برای رسیدهای خرید با تاریخ آینده ایجاد کرد., +Cannot create a pick list for Sales Order {0} because it has reserved stock. Please unreserve the stock in order to create a pick list.,نمی‌توان فهرست انتخابی برای سفارش فروش {0} ایجاد کرد زیرا موجودی رزرو کرده است. لطفاً برای ایجاد لیست انتخاب، موجودی را لغو رزرو کنید., +Cannot create accounting entries against disabled accounts: {0},نمی توان ورودی های حسابداری را در برابر حساب های غیرفعال ایجاد کرد: {0}, +Cannot enqueue multi docs for one company. {0} is already queued/running for company: {1},نمی توان چند سند را برای یک شرکت در صف قرار داد. {0} قبلاً برای شرکت: {1} در صف/در حال اجراست, +Cannot find a default warehouse for item {0}. Please set one in the Item Master or in Stock Settings.,نمی توان یک انبار پیش فرض برای آیتم {0} پیدا کرد. لطفاً یکی را در مدیریت آیتم یا در تنظیمات سهام تنظیم کنید., +Cannot make any transactions until the deletion job is completed,تا زمانی که کار حذف کامل نشود، نمی توان هیچ تراکنشی انجام داد, +Cannot produce more item for {0},نمی توان مورد بیشتری برای {0} تولید کرد, +Cannot produce more than {0} items for {1},نمی توان بیش از {0} مورد برای {1} تولید کرد, +Cannot receive from customer against negative outstanding,نمی توان از مشتری در برابر معوقات منفی دریافت کرد, +Cannot retrieve link token for update. Check Error Log for more information,نمی توان توکن پیوند را برای به روز رسانی بازیابی کرد. برای اطلاعات بیشتر Log خطا را بررسی کنید, +Cannot retrieve link token. Check Error Log for more information,توکن پیوند بازیابی نمی شود. برای اطلاعات بیشتر Log خطا را بررسی کنید, +Capacity (Stock UOM),ظرفیت (Stock UOM), +Capacity in Stock UOM,ظرفیت موجود در انبار UOM, +Capacity must be greater than 0,ظرفیت باید بیشتر از 0 باشد, +Capitalization,حروف بزرگ, +Capitalization Method,روش حروف بزرگ, +Capitalize Asset,سرمایه گذاری دارایی, +Capitalize Repair Cost,سرمایه گذاری در هزینه تعمیر, +Capitalized,با حروف بزرگ, +Carrier,حامل, +Carrier Service,خدمات حامل, +Carry Forward Communication and Comments,انتقال ارتباطات و نظرات, +Category Details,جزئیات دسته, +Caution: This might alter frozen accounts.,احتیاط: این ممکن است حساب های مسدود شده را تغییر دهد., +Change in Stock Value,تغییر در ارزش موجودی, +Changed customer name to '{}' as '{}' already exists.,"نام مشتری به ""{}"" به عنوان ""{}"" تغییر کرده است.", +Changes,تغییرات, +Charge of type 'Actual' in row {0} cannot be included in Item Rate or Paid Amount,"هزینه از نوع ""واقعی"" در ردیف {0} نمی تواند در نرخ مورد یا مبلغ پرداختی لحاظ شود", +Chart Of Accounts,نمودار حساب, +Checking this will round off the tax amount to the nearest integer,بررسی این مقدار مالیات را به نزدیکترین عدد صحیح گرد می کند, +Choose a WIP composite asset,یک دارایی ترکیبی «کار در حال انجام» را انتخاب کنید, +Clear Demo Data,پاک کردن داده های نمایشی, +Clear Notifications,پاک کردن اعلان ها, +Clearing Demo Data...,در حال پاک کردن داده های نمایشی..., +Click on 'Get Finished Goods for Manufacture' to fetch the items from the above Sales Orders. Items only for which a BOM is present will be fetched.,"برای دریافت آیتم‌ها از سفارش‌های فروش فوق، روی ""دریافت کالاهای تمام شده برای ساخت"" کلیک کنید. فقط آیتم‌هایی که BOM برای آنها وجود دارد واکشی می شوند.", +Click on Add to Holidays. This will populate the holidays table with all the dates that fall on the selected weekly off. Repeat the process for populating the dates for all your weekly holidays,روی افزودن به تعطیلات کلیک کنید. با این کار جدول تعطیلات با تمام تاریخ هایی که در تعطیلات هفتگی انتخاب شده قرار می گیرند پر می کند. فرآیند پر کردن تاریخ ها را برای تمام تعطیلات هفتگی خود تکرار کنید, +Click on Get Sales Orders to fetch sales orders based on the above filters.,برای دریافت سفارش‌های فروش بر اساس فیلترهای بالا، روی دریافت سفارش‌های فروش کلیک کنید., +Click to add email / phone,برای افزودن ایمیل / تلفن کلیک کنید, +Close Replied Opportunity After Days,بستن فرصت پاسخ داده شده پس از چند روز, +Closed Work Order can not be stopped or Re-opened,دستور کار بسته را نمی توان متوقف کرد یا دوباره باز کرد, +Closing,بسته شدن, +Closing Balance as per Bank Statement,مانده پایانی طبق صورتحساب بانکی, +Closing Balance as per ERP,تراز پایانی طبق ERP, +Closing Stock Balance,تراز پایانی موجودی, +Communication Channel,کانال ارتباطی, +Company Address Display,نمایش آدرس شرکت, +Company Billing Address,آدرس صورتحساب شرکت, +Company Details,جزئیات شرکت, +Company Shipping Address,آدرس حمل و نقل شرکت, +Company Tax ID,شناسه مالیاتی شرکت, +Company and Posting Date is mandatory,شرکت و تاریخ ارسال الزامی است, +Company is mandatory,شرکت الزامی است, +Company is mandatory for generating an invoice. Please set a default company in Global Defaults.,شرکت برای تهیه فاکتور الزامی است. لطفاً یک شرکت پیش‌فرض را در پیش‌فرض‌های سراسری تنظیم کنید., +Company which internal customer represents,شرکتی که مشتری داخلی نماینده آن است, +Company which internal customer represents.,شرکتی که مشتری داخلی نماینده آن است., +Company which internal supplier represents,شرکتی که تامین کننده داخلی آن را نمایندگی می کند, +Company {0} is added more than once,شرکت {0} بیش از یک بار اضافه شده است, +Company {} does not exist yet. Taxes setup aborted.,شرکت {} هنوز وجود ندارد. تنظیم مالیات لغو شد., +Company {} does not match with POS Profile Company {},شرکت {} با نمایه POS شرکت {} مطابقت ندارد, +Competitor,رقیب, +Competitor Detail,جزئیات رقیب, +Competitor Name,نام رقیب, +Competitors,رقبا, +Complete Job,کار کامل, +Completed On,تکمیل شد, +Completed On cannot be greater than Today,تکمیل شده در تاریخ نمی تواند بزرگتر از امروز باشد, +Completed Tasks,وظایف تکمیل شده, +Completed Time,زمان تکمیل شده, +Conditional Rule,قانون مشروط, +Conditional Rule Examples,مثال های قانون شرطی, +Configure Product Assembly,پیکربندی اسمبلی محصول, +Configure the action to stop the transaction or just warn if the same rate is not maintained.,کنش را طوری پیکربندی کنید که تراکنش را متوقف کند یا در صورت عدم حفظ همان نرخ فقط هشدار دهد., +Connections,اتصالات, +Consider Entire Party Ledger Amount,کل مبلغ دفتر کل طرف را در نظر بگیرید, +Consider Minimum Order Qty,در نظر گرفتن حداقل تعداد سفارش, +Consider Rejected Warehouses,در نظر گرفتن انبارهای مرجوعی, +Considered In Paid Amount,به مبلغ پرداختی در نظر گرفته شده است, +Consolidate Sales Order Items,تلفیق آیتم‌های سفارش فروش, +Consolidate Sub Assembly Items,تلفیق آیتم‌های زیر مونتاز, +Consumed Asset Items is mandatory for Decapitalization,اقلام دارایی مصرف شده برای کاهش سرمایه اجباری است, +Consumed Asset Total Value,ارزش کل دارایی مصرف شده, +Consumed Assets,دارایی های مصرف شده, +Consumed Quantity,مقدار مصرف شده, +Consumed Stock Items,آیتم‌های موجودی مصرفی, +Consumed Stock Total Value,ارزش کل موجودی مصرف شده, +Consumption Rate,نرخ مصرف, +Contact Details,اطلاعات تماس, +Contact Mobile,موبایل مخاطب, +Contact Us Settings,تنظیمات تماس با ما, +Contacts,مخاطب, +Contract Template Help,راهنمای الگوی قرارداد, +Contribution Qty,مقدار مشارکت, +Control Historical Stock Transactions,معاملات تاریخی موجودی را کنترل کنید, +Convert Item Description to Clean HTML in Transactions,توضیحات مورد را به Clean HTML در Transactions تبدیل کنید, +Convert to Group,تبدیل به گروه,Warehouse +Convert to Item Based Reposting,تبدیل به ارسال مجدد بر اساس آیتم, +Convert to Ledger,تبدیل به دفتر کل,Warehouse +Core,هسته, +Corrective Job Card,کارت کار اصلاحی, +Corrective Operation,عملیات اصلاحی, +Corrective Operation Cost,هزینه عملیات اصلاحی, +Cost Center Allocation,تخصیص مرکز هزینه, +Cost Center Allocation Percentage,درصد تخصیص مرکز هزینه, +Cost Center Allocation Percentages,درصدهای تخصیص مرکز هزینه, +Cost Center For Item with Item Code {0} has been Changed to {1},مرکز هزینه برای مورد با کد مورد {0} به {1} تغییر کرده است, +"Cost Center is a part of Cost Center Allocation, hence cannot be converted to a group",مرکز هزینه بخشی از تخصیص مرکز هزینه است، بنابراین نمی توان آن را به یک گروه تبدیل کرد, +Cost Center with Allocation records can not be converted to a group,مرکز هزینه با رکوردهای تخصیص را نمی توان به گروه تبدیل کرد, +Cost Center {0} cannot be used for allocation as it is used as main cost center in other allocation record.,مرکز هزینه {0} را نمی توان برای تخصیص استفاده کرد زیرا به عنوان مرکز هزینه اصلی در سایر رکوردهای تخصیص استفاده می شود., +Cost Center {} doesn't belong to Company {},مرکز هزینه {} متعلق به شرکت {} نیست, +Cost Center {} is a group cost center and group cost centers cannot be used in transactions,مرکز هزینه {} یک مرکز هزینه گروهی است و مراکز هزینه گروهی را نمی توان در تراکنش ها استفاده کرد, +Cost Configuration,پیکربندی هزینه, +Cost Per Unit,هزینه هر واحد, +Cost of Poor Quality Report,گزارش هزینه کیفیت پایین, +Cost to Company (CTC),هزینه شرکت (CTC), +Costing Details,جزئیات هزینه, +Could Not Delete Demo Data,داده های نسخه ی نمایشی حذف نشد, +Could not auto update shifts. Shift with shift factor {0} needed.,به‌روزرسانی خودکار شیفت‌ها ممکن نیست. Shift با ضریب تغییر {0} مورد نیاز است., +Could not detect the Company for updating Bank Accounts,شرکت برای به‌روزرسانی حساب‌های بانکی شناسایی نشد, +Could not find path for , مسیری برای پیدا نشد, +Count,شمردن, +Create Depreciation Entry,ایجاد ثبت استهلاک, +Create Employee records.,ایجاد رکوردهای کارمندان., +Create Grouped Asset,ایجاد دارایی گروهی, +Create Job Card based on Batch Size,ایجاد کارت کار بر اساس اندازه دسته ای, +Create Ledger Entries for Change Amount,برای تغییر مقدار، ورودی های دفتر کل ایجاد کنید, +Create Link,ایجاد لینک, +Create Multi-level BOM,BOM چند سطحی ایجاد کنید, +Create New Customer,مشتری جدید ایجاد کنید, +Create Opportunity,ایجاد فرصت, +Create Prospect,ایجاد مشتری بالقوه, +Create Reposting Entries,ورودی های ارسال مجدد ایجاد کنید, +Create Reposting Entry,ایجاد ورودی ارسال مجدد, +Create Stock Entry,ایجاد ثبت موجودی, +Create a new composite asset,یک دارایی ترکیبی جدید ایجاد کنید, +Create {0} {1} ?,{0} {1} ایجاد شود؟, +Created On,ایجاد شد, +Created {0} scorecards for {1} between:,ایجاد {0} کارت امتیازی برای {1} بین:, +Creating Delivery Note ...,ایجاد یادداشت تحویل ..., +Creating Packing Slip ...,ایجاد برگه بسته بندی ..., +Creating Purchase Invoices ...,ایجاد فاکتورهای خرید ..., +Creating Purchase Receipt ...,ایجاد رسید خرید ..., +Creating Sales Invoices ...,ایجاد فاکتورهای فروش ..., +Creating Stock Entry,ایجاد ثبت موجودی, +Creating Subcontracting Order ...,ایجاد سفارش پیمانکاری فرعی ..., +Creating Subcontracting Receipt ...,ایجاد رسید پیمانکاری فرعی ..., +Creating User...,ایجاد کاربر..., +Creation,ایجاد, +Creation of {1}(s) successful,ایجاد {1}(ها) با موفقیت, +Credit (Transaction),اعتبار (تراکنش), +Credit Amount in Transaction Currency,مقدار اعتبار به ارز تراکنش, +Credit Limit Crossed,از حد اعتبار عبور کرد, +Credit Limit Settings,تنظیمات محدودیت اعتباری, +Currency Exchange Settings Details,جزئیات تنظیمات تبادل ارز, +Currency Exchange Settings Result,نتیجه تنظیمات تبادل ارز, +Current Asset,دارایی جاری, +Current Index,شاخص فعلی, +Current Level,سطح فعلی, +Current Liability,بدهی جاری, +Current Serial / Batch Bundle,باندل سریال / دسته فعلی, +Custom,سفارشی, +Customer , مشتری, +Customer / Item / Item Group,مشتری / آیتم / گروه آیتم, +Customer Defaults,پیش فرض های مشتری, +Customer Group Item,مورد گروه مشتری, +Customer Group: {0} does not exist,گروه مشتری: {0} وجود ندارد, +Customer Item,مورد مشتری, +Customer Name: , نام مشتری:, +Customer Portal Users,کاربران پورتال مشتری, +Customer: , مشتری:, +D - E,د - ای, +Daily Time to send,زمان ارسال روزانه, +Dashboard,داشبورد, +Data Based On,داده ها بر اساس, +Date , تاریخ, +Date must be between {0} and {1},تاریخ باید بین {0} و {1} باشد, +Days before the current subscription period,چند روز قبل از دوره اشتراک فعلی, +Deal Owner,صاحب معامله, +Debit (Transaction),بدهی (تراکنش), +Debit Amount in Transaction Currency,مبلغ بدهی به ارز تراکنش, +Decapitalization,سرمایه زدایی, +Decapitalized,بدون سرمایه, +Default Advance Account,حساب پیش فرض پیش فرض, +Default Advance Paid Account,حساب پیش فرض پیش پرداخت, +Default Advance Received Account,پیش فرض پیش فرض حساب دریافت شده, +Default BOM not found for FG Item {0},BOM پیش فرض برای آیتم کالای تمام شده {0} یافت نشد, +Default Discount Account,حساب تخفیف پیش فرض, +Default In-Transit Warehouse,انبار پیش فرض در حمل و نقل, +Default Payment Discount Account,حساب تخفیف پیش‌فرض پرداخت, +Default Provisional Account,حساب موقت پیش فرض, +Default Service Level Agreement for {0} already exists.,توافقنامه سطح سرویس پیش فرض برای {0} از قبل وجود دارد., +Default Unit of Measure for Item {0} cannot be changed directly because you have already made some transaction(s) with another UOM. You need to either cancel the linked documents or create a new Item.,واحد اندازه گیری پیش فرض برای مورد {0} را نمی توان مستقیماً تغییر داد زیرا قبلاً تراکنش(هایی) را با UOM دیگری انجام داده اید. شما باید اسناد پیوند داده شده را لغو کنید یا یک مورد جدید ایجاد کنید., +Default settings for your stock-related transactions,تنظیمات پیش‌فرض برای تراکنش‌های مربوط به موجودی شما, +"Default tax templates for sales, purchase and items are created.",الگوهای مالیاتی پیش فرض برای فروش، خرید و اقلام ایجاد می شود., +Deferred Accounting,حسابداری معوق, +Deferred Accounting Defaults,پیش‌فرض‌های حسابداری معوق, +Deferred Revenue and Expense,درآمد و هزینه معوق, +Deferred accounting failed for some invoices:,حسابداری معوق برای برخی از فاکتورها ناموفق بود:, +Delay (In Days),تاخیر (در چند روز), +Delayed,با تاخیر, +Delayed Tasks Summary,خلاصه وظایف تاخیری, +Delete Accounting and Stock Ledger Entries on deletion of Transaction,حذف ورودی های حسابداری و دفتر کل موجودی در حذف تراکنش, +Delete Cancelled Ledger Entries,ورودی های لغو شده در دفتر کل را حذف کنید, +Delete Dimension,حذف ابعاد, +Delete Leads and Addresses,سرنخ ها و آدرس ها را حذف کنید, +Delete Transactions,حذف تراکنش ها, +Deleted Documents,اسناد حذف شده, +Deletion in Progress!,حذف در حال انجام است!, +Delimiter options,گزینه های جداکننده, +Delivery Manager,مدیر تحویل, +Delivery Note Packed Item,کالای بسته بندی شده یادداشت تحویل, +Delivery Note(s) created for the Pick List,یادداشت(های) تحویل برای لیست انتخاب ایجاد شده است, +Delivery User,کاربر تحویل, +Delivery to,تحویل به, +Demo Company,شرکت دمو, +Demo data cleared,داده‌های نمایشی پاک شد, +Dependant SLE Voucher Detail No,شماره جزئیات کوپن SLE وابسته, +Dependent Task {0} is not a Template Task,وظیفه وابسته {0} یک کار الگو نیست, +Deposit,سپرده, +Depreciate based on daily pro-rata,استهلاک بر اساس تناسب روزانه, +Depreciate based on shifts,استهلاک بر اساس نوبت, +Depreciation Details,جزئیات استهلاک, +Depreciation Entry Posting Status,وضعیت ثبت استهلاک, +Depreciation Expense Account should be an Income or Expense Account.,حساب هزینه استهلاک باید یک حساب درآمد یا هزینه باشد., +Depreciation Schedule View,مشاهده برنامه زمانبندی استهلاک, +Depreciation cannot be calculated for fully depreciated assets,استهلاک برای دارایی های کاملا مستهلک شده قابل محاسبه نیست, +Description of Content,شرح مطالب, +Desk User,کاربر میز, +Difference In,تفاوت در, +Difference Posting Date,تفاوت تاریخ ارسال, +Difference Qty,تفاوت تعداد, +Different 'Source Warehouse' and 'Target Warehouse' can be set for each row.,برای هر ردیف می توان «انبار منبع» و «انبار هدف» متفاوتی را تنظیم کرد., +Dimension Details,جزئیات ابعاد, +Dimension Filter Help,راهنمای فیلتر ابعاد, +Dimension-wise Accounts Balance Report,گزارش تراز حسابها از نظر ابعاد, +Direct Expense,هزینه مستقیم, +Disable Last Purchase Rate,نرخ آخرین خرید را غیرفعال کنید, +Disable Serial No And Batch Selector,غیرفعال کردن سریال No And Batch Selector, +Disabled Account Selected,حساب غیرفعال انتخاب شد, +Disabled Warehouse {0} cannot be used for this transaction.,از انبار غیرفعال شده {0} نمی توان برای این تراکنش استفاده کرد., +Disabled pricing rules since this {} is an internal transfer,قوانین قیمت گذاری غیرفعال شده است زیرا این {} یک انتقال داخلی است, +Disabled tax included prices since this {} is an internal transfer,مالیات غیرفعال شامل قیمت‌ها می‌شود زیرا این {} یک انتقال داخلی است, +Disables auto-fetching of existing quantity,واکشی خودکار مقدار موجود را غیرفعال می کند, +Disassemble,مجزا کردن (دیس اسمبل), +Discount Account,حساب تخفیف, +Discount Date,تاریخ تخفیف, +Discount Settings,تنظیمات تخفیف, +Discount Validity,اعتبار تخفیف, +Discount Validity Based On,اعتبار تخفیف بر اساس, +Discount of {} applied as per Payment Term,تخفیف {} طبق شرایط پرداخت اعمال شد, +Discounted Amount,مبلغ با تخفیف, +"Discounts to be applied in sequential ranges like buy 1 get 1, buy 2 get 2, buy 3 get 3 and so on",تخفیف هایی که در محدوده های متوالی اعمال می شوند مانند خرید 1 دریافت 1، خرید 2 دریافت 2، خرید 3 دریافت 3 و غیره, +Discrepancy between General and Payment Ledger,اختلاف بین دفتر کل و دفتر پرداخت, +Dispatch Address,آدرس اعزام, +Dispatch Address Name,نام آدرس اعزام, +Distinct Item and Warehouse,کالا و انبار متمایز, +Distribute Additional Costs Based On , توزیع هزینه های اضافی بر اساس, +Distribute Manually,توزیع دستی, +Do Not Explode,گسترده نکنید, +DocTypes should not be added manually to the 'Excluded DocTypes' table. You are only allowed to remove entries from it.,DocTypes نباید به صورت دستی به جدول 'Excluded DocTypes' اضافه شود. شما فقط مجاز به حذف ورودی ها از آن هستید., +Document Type already used as a dimension,نوع سند قبلاً به عنوان بعد استفاده شده است, +Documents,اسناد, +Documents: {0} have deferred revenue/expense enabled for them. Cannot repost.,اسناد: {0} درآمد/هزینه معوق را برای آنها فعال کرده است. امکان ارسال مجدد وجود ندارد., +Domain Settings,تنظیمات دامنه, +Don't Reserve Sales Order Qty on Sales Return,تعداد سفارش فروش را در بازگشت فروش رزرو نکنید, +Don't Send Emails,ایمیل ارسال نکنید, +Dont Recompute tax,مالیات را دوباره محاسبه نکنید, +Download Backups,دانلود نسخه پشتیبان, +Download CSV Template,دانلود قالب CSV, +Download Materials Request Plan,دانلود طرح درخواست مواد, +Download Materials Request Plan Section,دانلود بخش طرح درخواست مواد, +Dunning Amount (Company Currency),مقدار Dunning (ارز شرکت), +Dunning Level,سطح دانینگ, +Duplicate Closing Stock Balance,تکرار کردن تراز موجودی اختتامیه, +Duplicate Customer Group,گروه مشتریان تکراری, +Duplicate Finance Book,کتاب مالی تکراری, +Duplicate Item Group,گروه آیتم تکراری, +Duplicate POS Invoices found,فاکتورهای POS تکراری پیدا شد, +Edit Capacity,ویرایش ظرفیت, +Edit Full Form,ویرایش فرم کامل, +Edit Note,ویرایش یادداشت, +Editing {0} is not allowed as per POS Profile settings,ویرایش {0} طبق تنظیمات نمایه POS مجاز نیست, +Either 'Selling' or 'Buying' must be selected,«فروش» یا «خرید» باید انتخاب شود, +Email / Notifications,ایمیل / اعلان ها, +Email Address (required),آدرس ایمیل (الزامی), +"Email Address must be unique, it is already used in {0}",آدرس ایمیل باید منحصر به فرد باشد، از قبل در {0} استفاده شده است, +Email Digest Recipient,دریافت کننده خلاصه ایمیل, +Email Digest: {0},خلاصه ایمیل: {0}, +Email Domain,دامنه ایمیل, +Email or Phone/Mobile of the Contact are mandatory to continue.,برای ادامه ایمیل یا تلفن/موبایل مخاطب الزامی است., +Email verification failed.,تأیید ایمیل انجام نشد., +Employee User Id,شناسه کاربر کارمند, +Enable Allow Partial Reservation in the Stock Settings to reserve partial stock.,برای رزرو موجودی جزئی، Allow Partial Reservation را در تنظیمات موجودی فعال کنید., +Enable Automatic Party Matching,تنظیم خودکار طرف را فعال کنید, +Enable Common Party Accounting,حسابداری طرف مشترک را فعال کنید, +Enable Discount Accounting for Selling,فعال کردن حسابداری تخفیف برای فروش, +Enable Fuzzy Matching,Fuzzy Matching را فعال کنید, +Enable Provisional Accounting For Non Stock Items,فعال کردن حسابداری موقت برای آیتم‌ها غیر موجودی, +Enable Stock Reservation,فعال کردن رزرو موجودی, +Enable it if users want to consider rejected materials to dispatch.,اگر کاربران می خواهند مواد رد شده را برای ارسال در نظر بگیرند، آن را فعال کنید., +Enable to apply SLA on every {0},فعال کردن اعمال SLA در هر {0}, +Enabling this option will allow you to record -

1. Advances Received in a Liability Account instead of the Asset Account

2. Advances Paid in an Asset Account instead of the Liability Account,فعال کردن این گزینه به شما امکان می دهد ثبت کنید -

1. پیش پرداخت های دریافت شده در حساب بدهی به جای حساب دارایی

2. پیش پرداخت های پرداخت شده در حساب دارایی به جای حساب بدهی, +Enabling this will allow creation of multi-currency invoices against single party account in company currency,فعال کردن این امکان ایجاد صورتحساب‌های چند ارزی را در برابر حساب یک طرف به واحد پول شرکت فراهم می‌کند, +End Transit,پایان حمل و نقل, +End of the current subscription period,پایان دوره اشتراک فعلی, +"Enter First and Last name of Employee, based on Which Full Name will be updated. IN transactions, it will be Full Name which will be fetched.",نام و نام خانوادگی کارمند را که بر اساس نام کامل به روز می شود وارد کنید. در معاملات، نام کامل خواهد بود که واکشی می شود., +Enter Manually,ورود دستی, +Enter Serial Nos,شماره های سریال را وارد کنید, +Enter Visit Details,جزئیات بازدید را وارد کنید, +Enter a name for Routing.,یک نام برای مسیریابی وارد کنید., +"Enter a name for the Operation, for example, Cutting.",یک نام برای عملیات وارد کنید، به عنوان مثال، برش., +Enter a name for this Holiday List.,یک نام برای این لیست تعطیلات وارد کنید., +"Enter an Item Code, the name will be auto-filled the same as Item Code on clicking inside the Item Name field.",یک کد مورد را وارد کنید، نام با کلیک کردن در داخل قسمت نام مورد، به طور خودکار مانند کد مورد پر می شود., +Enter each serial no in a new line,هر شماره سریال را در یک خط جدید وارد کنید, +Enter the opening stock units.,واحدهای موجودی افتتاحی را وارد کنید., +Enter the quantity of the Item that will be manufactured from this Bill of Materials.,مقدار آیتمی را که از این صورتحساب مواد تولید می شود وارد کنید., +Enter the quantity to manufacture. Raw material Items will be fetched only when this is set.,مقدار تولید را وارد کنید. آیتم‌های مواد خام فقط زمانی واکشی می شوند که این تنظیم شود., +Error during caller information update,خطا در حین به روز رسانی اطلاعات تماس گیرنده, +Error while posting depreciation entries,خطا هنگام ارسال ورودی های استهلاک, +Error while processing deferred accounting for {0},خطا هنگام پردازش حسابداری معوق برای {0}, +Error while reposting item valuation,خطا هنگام ارسال مجدد ارزیابی مورد, +Errors Notification,اعلان خطاها, +Even invoices with apply tax withholding unchecked will be considered for checking cumulative threshold breach,حتی فاکتورهایی با اعمال کسر مالیات بدون بررسی برای بررسی نقض آستانه تجمعی در نظر گرفته می‌شوند., +Example URL,URL مثال, +Example of a linked document: {0},نمونه ای از یک سند پیوندی: {0}, +Example: Serial No {0} reserved in {1}.,مثال: شماره سریال {0} در {1} رزرو شده است., +Excess Materials Consumed,مواد اضافی مصرف شده, +Excess Transfer,انتقال مازاد, +Exchange Gain Or Loss,سود یا ضرر مبادله, +Exchange Gain/Loss amount has been booked through {0},مبلغ سود/زیان مبادله از طریق {0} رزرو شده است, +Exchange Rate Revaluation Settings,تنظیمات تجدید ارزیابی نرخ ارز, +Excluded DocTypes,DocType های حذف شده, +Exempt Supplies,لوازم معاف, +Expected,انتظار می رود, +Expected Balance Qty,مقدار تراز مورد انتظار, +Expected End Date should be less than or equal to parent task's Expected End Date {0}.,تاریخ پایان مورد انتظار باید کمتر یا مساوی با تاریخ پایان مورد انتظار وظیفه والد {0} باشد., +Expected Stock Value,ارزش موجودی مورد انتظار, +Expected Time Required (In Mins),زمان مورد نیاز مورد انتظار (به دقیقه), +Expiry,انقضا, +Export Data,برون‌بُرد داده ها, +Export Errored Rows,صادر کردن ردیف های خطا, +Export Import Log,لاگ درون‌بُرد برون‌بُرد, +Extra Consumed Qty,مقدار مصرف اضافی, +Extra Job Card Quantity,مقدار کارت کار اضافی, +FIFO Queue vs Qty After Transaction Comparison,صف FIFO در مقابل تعداد پس از مقایسه تراکنش, +"FIFO Stock Queue (qty, rate)",صف موجودی FIFO (تعداد، نرخ), +FIFO/LIFO Queue,صف FIFO/LIFO, +Failed Entries,ورودی های ناموفق, +"Failed to erase demo data, please delete the demo company manually.",داده‌های نمایشی پاک نشد، لطفاً شرکت نمایشی را به صورت دستی حذف کنید., +Failed to setup defaults for country {0}. Please contact support.,تنظیم پیش فرض های کشور {0} انجام نشد. لطفا با پشتیبانی تماس بگیرید., +Failure,شکست, +Failure Description,شرح شکست, +Fetch Based On,واکشی بر اساس, +Fetch Overdue Payments,واکشی پرداخت های معوق, +Fetch Timesheet,واکشی جدول زمانی, +Fetch Value From,واکشی ارزش از, +Fetching exchange rates ...,واکشی نرخ ارز ..., +Filter by Reference Date,فیلتر بر اساس تاریخ مرجع, +Filter on Invoice,فیلتر روی فاکتور, +Filter on Payment,فیلتر در پرداخت, +Filters missing,فیلترها یافت نشدند, +Final Product,محصول نهایی, +Financial Ratios,نسبت های مالی, +Financial Reports,گزارشهای مالی, +Financial Year Begins On,سال مالی شروع می شود, +Financial reports will be generated using GL Entry doctypes (should be enabled if Period Closing Voucher is not posted for all years sequentially or missing) ,گزارش‌های مالی با استفاده از اسناد ثبت دفتر کل ایجاد می‌شوند (اگر کوپن پایان دوره برای همه سال‌ها به‌طور متوالی پست نشده باشد یا مفقود شده باشد، باید فعال شود) , +Finished Good BOM,BOM کالای تمام شده, +Finished Good Item,آیتم کالای تمام شده, +Finished Good Item Qty,تعداد آیتم کالای تمام شده, +Finished Good Item Quantity,تعداد آیتم کالای تمام شده, +Finished Good Item is not specified for service item {0},آیتم کالای تمام شده برای آیتم سرویس مشخص نشده است {0}, +Finished Good Item {0} Qty can not be zero,مقدار آیتم کالای تمام شده {0} تعداد نمی تواند صفر باشد, +Finished Good Item {0} must be a sub-contracted item,آیتم کالای تمام شده {0} باید یک آیتم قرارداد فرعی باشد, +Finished Good Qty,مقدار کالای تمام شده, +Finished Good Quantity ,مقدار کالای تمام شده , +Finished Good UOM,UOM خوب به پایان رسید, +Finished Good {0} does not have a default BOM.,Finished Good {0} BOM پیش فرض ندارد., +Finished Good {0} is disabled.,Finished Good {0} غیرفعال است., +Finished Good {0} must be a stock item.,کالای تمام شده {0} باید یک آیتم موجودی باشد., +Finished Good {0} must be a sub-contracted item.,کالای تمام شده {0} باید یک آیتم قرارداد فرعی باشد., +Finished Goods Based Operating Cost,هزینه عملیاتی بر اساس کالاهای تمام شده, +Finished Goods Item,آیتم کالاهای تمام شده, +Finished Goods Reference,مرجع کالاهای تمام شده, +Finished Goods Value,ارزش کالاهای تمام شده, +Finished Goods based Operating Cost,هزینه عملیاتی بر اساس کالاهای تمام شده, +Finished Item {0} does not match with Work Order {1},مورد تمام شده {0} با دستور کار {1} مطابقت ندارد, +First Response Due,اولین پاسخ به علت, +First Response SLA Failed by {},اولین پاسخ SLA توسط {} انجام نشد, +Fixed Asset Defaults,پیش فرض دارایی های ثابت, +Fixed Time,زمان ثابت, +For Item,برای آیتم, +For Job Card,برای کارت کار, +For Operation,برای عملیات, +For Work Order,برای دستور کار, +For dunning fee and interest,برای هزینه و سود, +"For item {0}, rate must be a positive number. To Allow negative rates, enable {1} in {2}",برای مورد {0}، نرخ باید یک عدد مثبت باشد. برای مجاز کردن نرخ‌های منفی، {1} را در {2} فعال کنید, +For quantity {0} should not be greater than allowed quantity {1},برای مقدار {0} نباید بیشتر از مقدار مجاز {1} باشد, +Forecasting,پیش بینی, +Formula Based Criteria,معیارهای مبتنی بر فرمول, +Free Item Rate,نرخ آیتم رایگان, +From Corrective Job Card,از کارت کار اصلاحی, +From Date and To Date are mandatory,از تاریخ و تا تاریخ اجباری است, +From Delivery Date,از تاریخ تحویل, +From Doctype,از Doctype, +From Due Date,از تاریخ سررسید, +From Opportunity,از فرصت, +From Payment Date,از تاریخ پرداخت, +From Reference Date,از تاریخ مرجع, +From Voucher Detail No,از جزئیات کوپن شماره, +From Voucher No,از کوپن شماره, +From Voucher Type,از نوع کوپن, +From and To dates are required,تاریخ های از و تا تاریخ لازم است, +Full and Final Statement,صورت کامل و نهایی, +GL Balance,تراز دفتر کل, +GL Entry Processing Status,وضعیت پردازش ثبت دفتر کل, +GL reposting index,فهرست ارسال مجدد دفتر کل, +Gain/Loss accumulated in foreign currency account. Accounts with '0' balance in either Base or Account currency,سود/زیان انباشته شده در حساب ارزی. حساب‌هایی با موجودی «0» به ارز پایه یا حساب, +Gain/Loss already booked,سود/باخت قبلا رزرو شده است, +Gain/Loss from Revaluation,سود/زیان ناشی از تجدید ارزیابی, +General Ledger,دفتر کل مرکزی,Warehouse +General and Payment Ledger Comparison,مقایسه دفتر کل مرکزی و پرداخت, +General and Payment Ledger mismatch,عدم تطابق دفتر کل و دفتر پرداخت, +Generate Closing Stock Balance,ایجاد تراز موجودی اختتامیه, +Generate Demo Data for Exploration,داده های نسخه ی نمایشی را برای کاوش ایجاد کنید, +Generate E-Invoice,ایجاد فاکتور الکترونیکی, +Generate Invoice At,ایجاد فاکتور در, +Generating Preview,ایجاد پیش نمایش, +Get Allocations,تخصیص ها را دریافت کنید, +Get Customer Group Details,دریافت جزئیات گروه مشتری, +Get Finished Goods for Manufacture,دریافت کالاهای تمام شده برای تولید, +Get Outstanding Orders,دریافت سفارش‌های معوق, +Get Raw Materials for Purchase,دریافت مواد اولیه برای خرید, +Get Raw Materials for Transfer,دریافت مواد اولیه برای انتقال, +Get Scrap Items,آیتم‌های ضایعات را دریافت کنید, +Get Stock,موجودی دریافت کنید, +Get Sub Assembly Items,دریافت آیتم‌های زیر مونتاژ, +Get Supplier Group Details,جزئیات گروه تامین کننده را دریافت کنید, +Get Timesheets,برگه های زمانی را دریافت کنید, +Get stops from,توقف از, +Getting Scrap Items,دریافت آیتم‌های ضایعات, +Give free item for every N quantity,برای هر N مقدار آیتم رایگان بدهید, +Go back,برگرد, +Go to {0} List,به فهرست {0} بروید, +Goals,اهداف, +Goods,کالاها, +Grant Commission,اعطاء کمیسیون, +Greeting Message,پیام تبریک, +Gross Profit Percent,درصد سود ناخالص, +Gross Purchase Amount should be equal to purchase amount of one single Asset.,مقدار خرید ناخالص باید برابر برای خرید یک دارایی واحد باشد., +Group Same Items,گروه بندی آیتم‌های مشابه, +Growth View,نمای رشد, +Half-yearly,نیم سال, +Has Alternative Item,دارای آیتم جایگزین, +Has Item Scanned,آیتم اسکن شده است, +Have Default Naming Series for Batch ID?,آیا سری نام‌گذاری پیش‌فرض برای Batch ID دارید؟, +Heatmap,نقشه حرارت, +Height (cm),ارتفاع (سانتی متر), +"Hello,",سلام،, +Here are the error logs for the aforementioned failed depreciation entries: {0},در اینجا گزارش های خطا برای ورودی های استهلاک ناموفق فوق الذکر آمده است: {0}, +Here are the options to proceed:,در اینجا گزینه هایی برای ادامه وجود دارد:, +"Here, you can select a senior of this Employee. Based on this, Organization Chart will be populated.",در اینجا، می توانید یک ارشد این کارمند را انتخاب کنید. بر این اساس نمودار سازمانی پر می شود., +"Here, your weekly offs are pre-populated based on the previous selections. You can add more rows to also add public and national holidays individually.",در اینجا، تخفیف‌های هفتگی شما بر اساس انتخاب‌های قبلی از قبل پر شده است. می‌توانید ردیف‌های بیشتری اضافه کنید تا تعطیلات عمومی و ملی را به‌صورت جداگانه اضافه کنید., +"Hi,",سلام،, +Hide Images,مخفی کردن تصاویر, +Holiday Date {0} added multiple times,تاریخ تعطیلات {0} چندین بار اضافه شد, +Hours Spent,ساعت های صرف شده, +How often should Project be updated of Total Purchase Cost ?,هر چند وقت یکبار پروژه باید از هزینه کل خرید به روز شود؟, +I - J,من - جی, +I - K,من - ک, +Idle,بیکار (Idle), +"If an operation is divided into sub operations, they can be added here.",اگر یک عملیات به عملیات فرعی تقسیم شود، می توان آنها را در اینجا اضافه کرد., +"If checked, Rejected Quantity will be included while making Purchase Invoice from Purchase Receipt.",در صورت علامت زدن، مقدار رد شده هنگام تهیه فاکتور خرید از رسید خرید لحاظ می شود., +"If checked, Stock will be reserved on Submit",در صورت علامت زدن، موجودی در ارسال رزرو خواهد شد, +"If checked, picked qty won't automatically be fulfilled on submit of pick list.",اگر علامت زده شود، تعداد انتخاب شده به طور خودکار در ارسال لیست انتخاب انجام نمی شود., +"If checked, the tax amount will be considered as already included in the Paid Amount in Payment Entry",در صورت بررسی، مبلغ مالیات به عنوان مبلغ پرداخت شده در ثبت پرداخت در نظر گرفته می شود, +"If checked, we will create demo data for you to explore the system. This demo data can be erased later.",در صورت علامت زدن، داده‌های نمایشی را برای شما ایجاد می‌کنیم تا سیستم را کاوش کنید. این داده های نمایشی را می توان بعداً پاک کرد., +If enabled then system won't override the picked qty / batches / serial numbers.,اگر فعال باشد، سیستم تعداد / دسته / شماره سریال انتخاب شده را بازنویسی نمی کند., +"If enabled, a print of this document will be attached to each email",در صورت فعال بودن، چاپی از این سند به هر ایمیل پیوست می شود, +"If enabled, additional ledger entries will be made for discounts in a separate Discount Account",در صورت فعال بودن، ورودی های دفتر کل اضافی برای تخفیف در یک حساب تخفیف جداگانه ایجاد می شود, +"If enabled, all files attached to this document will be attached to each email",در صورت فعال بودن، تمام فایل های پیوست شده به این سند به هر ایمیل پیوست می شود, +"If enabled, ledger entries will be posted for change amount in POS transactions",در صورت فعال بودن، ورودی‌های دفتر کل برای مبلغ تغییر در تراکنش‌های POS پست می‌شوند, +"If enabled, the consolidated invoices will have rounded total disabled",در صورت فعال بودن، صورتحساب‌های تلفیقی، کل غیرفعال می‌شوند, +"If enabled, the system will create material requests even if the stock exists in the 'Raw Materials Warehouse'.","اگر فعال باشد، سیستم حتی اگر موجودی در ""انبار مواد خام"" وجود داشته باشد، درخواست های مواد ایجاد می کند.", +"If mentioned, the system will allow only the users with this Role to create or modify any stock transaction earlier than the latest stock transaction for a specific item and warehouse. If set as blank, it allows all users to create/edit back-dated transactions.",در صورت ذکر شده، این سیستم فقط به کاربران دارای این نقش اجازه می‌دهد تا هر تراکنش موجودی را زودتر از آخرین تراکنش موجودی برای یک کالا و انبار خاص ایجاد یا اصلاح کنند. اگر به صورت خالی تنظیم شود، به همه کاربران اجازه می دهد تا تراکنش های قدیمی را ایجاد/ویرایش کنند., +"If not, you can Cancel / Submit this entry",اگر نه، می توانید این ثبت را لغو / ارسال کنید, +"If rate is zero then item will be treated as ""Free Item""","اگر نرخ صفر باشد، آیتم به عنوان ""آیتم رایگان"" تلقی می شود", +"If the BOM results in Scrap material, the Scrap Warehouse needs to be selected.",اگر BOM منجر به مواد قراضه شود، انبار ضایعات باید انتخاب شود., +"If the selected BOM has Operations mentioned in it, the system will fetch all Operations from BOM, these values can be changed.",اگر BOM انتخاب شده دارای عملیات ذکر شده در آن باشد، سیستم تمام عملیات را از BOM واکشی می کند، این مقادیر را می توان تغییر داد., +"If this checkbox is enabled, then the system won’t run the MRP for the available sub-assembly items.",اگر این چک باکس فعال باشد، سیستم MRP را برای آیتم‌های زیر مونتاژ موجود اجرا نمی کند., +If this is undesirable please cancel the corresponding Payment Entry.,اگر این امر نامطلوب است، لطفاً ثبت پرداخت مربوطه را لغو کنید., +"If yes, then this warehouse will be used to store rejected materials",اگر بله، پس از این انبار برای نگهداری مواد رد شده استفاده می شود, +"If you are maintaining stock of this Item in your Inventory, ERPNext will make a stock ledger entry for each transaction of this item.",اگر موجودی این کالا را در موجودی خود نگهداری می کنید، ERPNext برای هر تراکنش این کالا یک ثبت در دفتر کل موجودی ایجاد می کند., +"If you need to reconcile particular transactions against each other, then please select accordingly. If not, all the transactions will be allocated in FIFO order.",اگر نیاز به تطبیق معاملات خاصی با یکدیگر دارید، لطفاً مطابق آن را انتخاب کنید. در غیر این صورت، تمام تراکنش ها به ترتیب FIFO تخصیص می یابد., +"If you still want to proceed, please disable 'Skip Available Sub Assembly Items' checkbox.",اگر همچنان می‌خواهید ادامه دهید، لطفاً کادر انتخاب «صرف نظر از آیتم‌های زیر مونتاژ موجود» را غیرفعال کنید., +"If you still want to proceed, please enable {0}.",اگر همچنان می‌خواهید ادامه دهید، لطفاً {0} را فعال کنید., +"If your CSV uses a different delimiter, add that character here, ensuring no spaces or additional characters are included.",اگر CSV شما از جداکننده دیگری استفاده می‌کند، آن کاراکتر را در اینجا اضافه کنید، مطمئن شوید که هیچ فاصله یا نویسه اضافی در آن وجود ندارد., +Ignore Account Closing Balance,نادیده گرفتن موجودی بسته شدن حساب, +Ignore Available Stock,نادیده گرفتن موجودی در دسترس, +Ignore Closing Balance,نادیده گرفتن تراز اختتامیه, +Ignore Default Payment Terms Template,الگوی شرایط پرداخت پیش‌فرض را نادیده بگیرید, +Ignore Empty Stock,موجودی خالی را نادیده بگیرید, +Ignore Exchange Rate Revaluation Journals,دفتر روزنامه های تجدید ارزیابی نرخ ارز را نادیده بگیرید, +Ignore Pricing Rule is enabled. Cannot apply coupon code.,نادیده گرفتن قانون قیمت گذاری فعال است. نمی توان کد تخفیف را اعمال کرد., +Ignore Voucher Type filter and Select Vouchers Manually,فیلتر نوع کوپن را نادیده بگیرید و کوپن ها را به صورت دستی انتخاب کنید, +Import File,درون‌بُرد فایل, +Import File Errors and Warnings,خطاها و هشدارهای درون‌بُرد فایل, +Import Log Preview,پیش نمایش لاگ درون‌بُرد, +Import Preview,پیش نمایش درون‌بُرد, +Import Progress,پیشرفت درون‌بُرد, +Import Type,نوع درون‌بُرد, +Import Using CSV file,درون‌بُرد با استفاده از فایل CSV, +Import Warnings,هشدارهای درون‌بُرد, +Import from Google Sheets,درون‌بُرد از Google Sheets, +"Importing {0} of {1}, {2}",در حال درون‌بُرد {0} از {1}، {2}, +In House,در خانه, +In Minutes,به دقیقه, +In Party Currency,به ارز طرف, +In Transit Transfer,در انتقال ترانزیت, +In Transit Warehouse,در انبار ترانزیت, +In mins,به دقیقه, +"In row {0} of Appointment Booking Slots: ""To Time"" must be later than ""From Time"".",در ردیف {0} قسمت‌های رزرو قرار ملاقات: «تا زمان» باید دیرتر از «از زمان» باشد., +"In the case of 'Use Multi-Level BOM' in a work order, if the user wishes to add sub-assembly costs to Finished Goods items without using a job card as well the scrap items, then this option needs to be enable.",در مورد «استفاده از BOM چند سطحی» در یک دستور کار، اگر کاربر بخواهد هزینه‌های زیر مونتاژ را بدون استفاده از کارت کار و همچنین آیتم‌های ضایعات به کالاهای نهایی اضافه کند، این گزینه باید فعال شود., +"In this section, you can define Company-wide transaction-related defaults for this Item. Eg. Default Warehouse, Default Price List, Supplier, etc.",در این بخش می‌توانید پیش‌فرض‌های مربوط به تراکنش‌های کل شرکت را برای این آیتم تعریف کنید. به عنوان مثال. انبار پیش فرض، لیست قیمت پیش فرض، تامین کننده و غیره, +Inactive Status,وضعیت غیر فعال, +Include Account Currency,شامل ارز حساب, +Include Default FB Assets,دارایی های پیش فرض FB را شامل شود, +Include Disabled,شامل افراد غیر فعال, +Include Safety Stock in Required Qty Calculation,لحاظ کردن موجودی ایمنی در محاسبه مقدار مورد نیاز, +Include Timesheets in Draft Status,شامل جدول زمانی در وضعیت پیش نویس, +Include Zero Stock Items,شامل آیتم‌های موجودی صفر, +Incoming Call Handling Schedule,برنامه رسیدگی به تماس های ورودی, +Incoming Call Settings,تنظیمات تماس ورودی, +Incoming Rate (Costing),نرخ ورودی (هزینه‌یابی), +Incorrect Balance Qty After Transaction,تعداد موجودی نادرست پس از تراکنش, +Incorrect Batch Consumed,دسته نادرست مصرف شده است, +Incorrect Invoice,فاکتور نادرست, +Incorrect Movement Purpose,هدف جابجایی نادرست, +Incorrect Payment Type,نوع پرداخت نادرست, +Incorrect Serial No Valuation,ارزش گذاری شماره سریال نادرست است, +Incorrect Serial Number Consumed,شماره سریال نادرست مصرف شده است, +Incorrect Stock Value Report,گزارش ارزش موجودی نادرست است, +Incorrect Type of Transaction,نوع تراکنش نادرست, +Incoterm,اینکوترم, +Increase In Asset Life(Months),افزایش عمر دارایی (ماه), +Indent,تورفتگی, +Indirect Expense,هزینه غیر مستقیم, +Individual GL Entry cannot be cancelled.,ثبت انفرادی دفتر کل را نمی توان لغو کرد., +Individual Stock Ledger Entry cannot be cancelled.,ورود فردی به دفتر موجودی را نمی توان لغو کرد., +Insert New Records,درج رکوردهای جدید, +Inspection Rejected,بازرسی رد شد, +Inspection Submission,ارسال بازرسی, +Instruction,دستورالعمل, +Insufficient Capacity,ظرفیت ناکافی, +Insufficient Stock for Batch,موجودی ناکافی برای دسته, +Inter Transfer Reference,مرجع انتقال داخلی, +Interest and/or dunning fee,بهره و/یا هزینه اجناس, +Internal,درونی؛ داخلی, +Internal Customer,مشتری داخلی, +Internal Customer for company {0} already exists,مشتری داخلی برای شرکت {0} از قبل وجود دارد, +Internal Sale or Delivery Reference missing.,مرجع فروش داخلی یا تحویل موجود نیست., +Internal Sales Reference Missing,مرجع فروش داخلی وجود ندارد, +Internal Supplier,تامین کننده داخلی, +Internal Supplier for company {0} already exists,تامین کننده داخلی برای شرکت {0} از قبل وجود دارد, +Internal Transfer Reference Missing,مرجع انتقال داخلی وجود ندارد, +Internal Transfers,نقل و انتقالات داخلی, +Internal transfers can only be done in company's default currency,نقل و انتقالات داخلی فقط با ارز پیش فرض شرکت قابل انجام است, +Invalid,بی اعتبار, +Invalid Auto Repeat Date,تاریخ تکرار خودکار نامعتبر است, +Invalid Cost Center,مرکز هزینه نامعتبر است, +Invalid Delivery Date,تاریخ تحویل نامعتبر است, +Invalid Document,سند نامعتبر, +Invalid Document Type,نوع سند نامعتبر است, +Invalid Formula,فرمول نامعتبر است, +Invalid Group By,گروه نامعتبر توسط, +Invalid Item Defaults,پیش فرض های آیتم نامعتبر, +Invalid Ledger Entries,ورودی های دفتر نامعتبر, +Invalid Primary Role,نقش اصلی نامعتبر است, +Invalid Priority,اولویت نامعتبر است, +Invalid Process Loss Configuration,پیکربندی از دست دادن فرآیند نامعتبر است, +Invalid Purchase Invoice,فاکتور خرید نامعتبر, +Invalid Qty,تعداد نامعتبر است, +Invalid Schedule,زمانبندی نامعتبر است, +Invalid Warehouse,انبار نامعتبر, +Invalid result key. Response:,کلید نتیجه نامعتبر است. واکنش:, +Invalid value {0} for {1} against account {2},مقدار {0} برای {1} در برابر حساب {2} نامعتبر است, +Inventory Dimension,ابعاد موجودی, +Inventory Dimension Negative Stock,ابعاد موجودی منفی, +Inventory Settings,تنظیمات موجودی, +Invoice Cancellation,لغو فاکتور, +Invoice Limit,حد فاکتور, +Invoice Portion (%),سهم فاکتور (%), +Invoice and Billing,فاکتور و صورتحساب, +Invoiced Qty,تعداد فاکتور, +Invoices and Payments have been Fetched and Allocated,فاکتورها و پرداخت ها واکشی و تخصیص داده شده است, +Invoicing Features,ویژگی های صورتحساب, +Is Adjustment Entry,ثبت تعدیل است, +Is Alternative,جایگزین است, +Is Cash or Non Trade Discount,تخفیف نقدی یا غیرتجاری است, +Is Composite Asset,دارایی مرکب است, +Is Corrective Job Card,کارت کار اصلاحی است, +Is Corrective Operation,عملیات اصلاحی است, +Is Expandable,قابل گسترش است, +Is Finished Item,مورد تمام شده است, +Is Fully Depreciated,کاملا مستهلک شده, +Is Group Warehouse,انبار گروه است, +Is Old Subcontracting Flow,جریان پیمانکاری فرعی قدیمی است, +Is Outward,بیرونی است, +Is Period Closing Voucher Entry,ثبت کوپن پایان دوره است, +Is Rate Adjustment Entry (Debit Note),ثبت تعدیل نرخ است (یادداشت بدهی), +Is Recursive,بازگشتی است, +Is Rejected,رد شده است, +Is Rejected Warehouse,انبار مرجوعی است, +Is Scrap Item,آیتم ضایعات است, +Is Short Year,سال کوتاه است, +Is Standard,استاندارد است, +Is Stock Item,آیتم موجودی است, +Is System Generated,سیستم تولید شده است, +Is Template,قالب است, +Issue Analytics,تجزیه و تحلیل مشکل, +Issue Summary,خلاصه مشکل, +Issue a debit note with 0 qty against an existing Sales Invoice,در مقابل فاکتور فروش موجود، یک برگه بدهی با مقدار 0 صادر کنید, +Issuing cannot be done to a location. Please enter employee to issue the Asset {0} to,صدور را نمی توان به یک مکان انجام داد. لطفاً کارمند را وارد کنید تا دارایی {0} را صادر کند, +It can take upto few hours for accurate stock values to be visible after merging items.,ممکن است چند ساعت طول بکشد تا ارزش موجودی دقیق پس از ادغام اقلام قابل مشاهده باشد., +"It's not possible to distribute charges equally when total amount is zero, please set 'Distribute Charges Based On' as 'Quantity'",وقتی مبلغ کل صفر است، نمی توان هزینه ها را به طور مساوی تقسیم کرد، لطفاً «توزیع هزینه ها بر اساس» را به عنوان «مقدار» تنظیم کنید, +Item Code (Final Product),کد آیتم (محصول نهایی), +Item Group wise Discount,تخفیف بر اساس گروه آیتم, +Item Price Settings,تنظیمات قیمت آیتم, +"Item Price appears multiple times based on Price List, Supplier/Customer, Currency, Item, Batch, UOM, Qty, and Dates.",قیمت آیتم چندین بار بر اساس لیست قیمت، تامین کننده/مشتری، ارز، آیتم، دسته، UOM، مقدار و تاریخ ها ظاهر می شود., +Item Reference,مرجع آیتم, +Item Warehouse based reposting has been enabled.,ارسال مجدد بر اساس انبار مورد فعال شده است., +Item and Warehouse,آیتم و انبار, +Item is removed since no serial / batch no selected.,مورد حذف شده است زیرا هیچ سریال / دسته ای انتخاب نشده است., +Item qty can not be updated as raw materials are already processed.,تعداد مورد را نمی توان به روز کرد زیرا مواد خام قبلاً پردازش شده است., +Item rate has been updated to zero as Allow Zero Valuation Rate is checked for item {0},نرخ مورد به صفر به‌روزرسانی شده است زیرا نرخ ارزش گذاری مجاز صفر برای مورد {0} بررسی می‌شود, +Item valuation reposting in progress. Report might show incorrect item valuation.,ارسال مجدد ارزیابی آیتم در حال انجام است. گزارش ممکن است ارزش گذاری اقلام نادرست را نشان دهد., +Item {0} cannot be added as a sub-assembly of itself,آیتم {0} را نمی توان به عنوان یک زیر مونتاژ از خودش اضافه کرد, +Item {0} cannot be ordered more than {1} against Blanket Order {2}.,مورد {0} را نمی توان بیش از {1} در مقابل سفارش بلانکت {2} سفارش داد., +Item {0} does not exist.,آیتم {0} وجود ندارد., +Item {0} entered multiple times.,آیتم {0} چندین بار وارد شده است., +Item {0} is already reserved/delivered against Sales Order {1}.,مورد {0} قبلاً در برابر سفارش فروش {1} رزرو شده/تحویل شده است., +Item {0} must be a Non-Stock Item,مورد {0} باید یک کالای غیر موجودی باشد, +Item {0} not found in 'Raw Materials Supplied' table in {1} {2},"مورد {0} در جدول ""مواد خام تامین شده"" در {1} {2} یافت نشد", +Item {0} not found.,مورد {0} یافت نشد., +Item {} does not exist.,مورد {} وجود ندارد., +Items & Pricing,آیتم‌ها و قیمت, +Items Catalogue,کاتالوگ آیتم‌ها, +Items cannot be updated as Subcontracting Order is created against the Purchase Order {0}.,موارد را نمی توان به روز کرد زیرا سفارش قرارداد فرعی در برابر سفارش خرید {0} ایجاد شده است., +Items rate has been updated to zero as Allow Zero Valuation Rate is checked for the following items: {0},نرخ اقلام به صفر به‌روزرسانی شده است زیرا نرخ ارزش گذاری مجاز صفر برای موارد زیر بررسی می‌شود: {0}, +Items to Be Repost,مواردی که باید بازنشر شوند, +Items to Order and Receive,آیتم‌های قابل سفارش و دریافت, +Items to Reserve,موارد برای رزرو, +Job Capacity,ظرفیت کاری, +Job Card Operation,عملیات کارت کار, +Job Card Scheduled Time,زمان برنامه ریزی شده کارت کار, +Job Card Scrap Item,آیتم ضایعات کارت کار, +Job Card and Capacity Planning,برنامه ریزی کارت کار و ظرفیت, +Job Paused,کار متوقف شد, +Job: {0} has been triggered for processing failed transactions,شغل: {0} برای پردازش تراکنش های ناموفق فعال شده است, +Joining,پیوستن, +Journal Entries,ورودی های دفتر روزنامه, +Journal Entry for Asset scrapping cannot be cancelled. Please restore the Asset.,ثبت دفتر روزنامه برای حذف دارایی را نمی توان لغو کرد. لطفا دارایی را بازیابی کنید., +Journal Entry type should be set as Depreciation Entry for asset depreciation,نوع ثبت دفتر روزنامه باید به عنوان ورودی استهلاک برای استهلاک دارایی تنظیم شود, +Journals,دفترهای روزنامه, +Key,کلید, +Kindly cancel the Manufacturing Entries first against the work order {0}.,لطفاً ابتدا ورودی‌های تولید را در برابر دستور کار {0} لغو کنید., +"Last Name, Email or Phone/Mobile of the user are mandatory to continue.",نام خانوادگی، ایمیل یا تلفن / تلفن همراه کاربر برای ادامه اجباری است., +Lead -> Prospect,سرنخ -> مشتری بالقوه, +Lead Conversion Time,زمان تبدیل سرنخ, +Lead Owner cannot be same as the Lead Email Address,مالک اصلی نمی تواند با آدرس ایمیل اصلی یکسان باشد, +Lead {0} has been added to prospect {1}.,سرنخ {0} به مشتری بالقوه {1} اضافه شده است., +Leaderboard,تابلوی امتیازات, +Leads,سرنخ ها, +Learn Accounting,حسابداری یاد بگیرید, +Learn Inventory Management,مدیریت لیست موجودی را یاد بگیرید, +Learn Manufacturing,یادگیری تولید, +Learn Procurement,تدارکات را بیاموزید, +Learn Project Management,مدیریت پروژه را یاد بگیرید, +Learn Sales Management,مدیریت فروش را یاد بگیرید, +Ledger Merge,ادغام دفتر کل, +Ledger Merge Accounts,حساب های ادغام دفتر کل, +Ledgers,دفتر کل, +Legend,افسانه, +Length,طول, +Length (cm),طول (سانتی متر), +Less than 12 months.,کمتر از 12 ماه., +Level (BOM),سطح (BOM), +Limit timeslot for Stock Reposting,محدودیت زمانی برای ارسال مجدد موجودی, +Limits don't apply on,محدودیت ها اعمال نمی شود, +Link a new bank account,پیوند یک حساب بانکی جدید, +Link with Customer,پیوند با مشتری, +Link with Supplier,پیوند با تامین کننده, +Linked with submitted documents,مرتبط با اسناد ارسالی, +Linking Failed,پیوند ناموفق بود, +Linking to Customer Failed. Please try again.,پیوند به مشتری انجام نشد. لطفا دوباره تلاش کنید., +Linking to Supplier Failed. Please try again.,پیوند به تامین کننده انجام نشد. لطفا دوباره تلاش کنید., +Links,پیوندها, +Loading import file...,در حال بارگیری فایل درون‌بُرد..., +Locked,قفل شده است, +Log Entries,ورودی های لاگ, +Lost Quotations,پیش فاکتور های از دست رفته, +Lost Quotations %,% پیش فاکتور های از دست رفته, +Lost Reasons are required in case opportunity is Lost.,در صورت از دست رفتن فرصت، دلایل از دست رفتن مورد نیاز است., +Lost Value,ارزش از دست رفته, +Lost Value %,مقدار از دست رفته %, +Machine Type,نوع ماشین, +Main Cost Center,مرکز هزینه اصلی, +Main Cost Center {0} cannot be entered in the child table,مرکز هزینه اصلی {0} را نمی توان در جدول فرزند وارد کرد, +Maintain Asset,حفظ دارایی, +Maintenance Details,جزئیات تعمیر و نگهداری, +Make , بسازید, +Make Asset Movement,جابجایی دارایی را ایجاد کنید, +Make Quotation,پیش فاکتور ایجاد کنید, +Make Return Entry,ایجاد ثبت بازگشت, +Make Serial No / Batch from Work Order,شماره سریال / دسته از دستور کار را بسازید, +Make {0} Variant,ایجاد {0} گونه, +Make {0} Variants,ایجاد {0} گونه, +Manage,مدیریت, +Mandatory Accounting Dimension,بعد حسابداری اجباری, +Mandatory Depends On,اجباری بستگی دارد, +Mandatory Field,فیلد اجباری, +Mandatory Section,بخش اجباری, +Manual Inspection,بازرسی دستی, +Manufacture Sub-assembly in Operation,تولید زیر مونتاژ در عملیات, +Manufacturing Type,نوع تولید, +Mapping Purchase Receipt ...,نگاشت رسید خرید ..., +Mapping Subcontracting Order ...,نگاشت سفارش پیمانکاری فرعی ..., +Mapping {0} ...,نگاشت {0}..., +Mark As Closed,علامت گذاری به عنوان بسته شده, +Material Returned from WIP,مواد برگردانده شده از «کار در حال انجام», +Material Transfer (In Transit),انتقال مواد (در حال حمل و نقل), +Materials are already received against the {0} {1},مواد قبلاً در مقابل {0} {1} دریافت شده است, +Materials needs to be transferred to the work in progress warehouse for the job card {0},برای کارت کار باید مواد به انبار کار در حال انجام انتقال داده شود {0}, +Max Qty (As Per Stock UOM),حداکثر تعداد (بر اساس موجودی UOM), +Maximum Net Rate,حداکثر نرخ خالص, +Maximum Payment Amount,حداکثر مبلغ پرداختی, +Maximum Value,حداکثر ارزش, +Maximum quantity scanned for item {0}.,حداکثر مقدار اسکن شده برای مورد {0}., +Meeting,ملاقات, +Mention if non-standard Receivable account,اگر حساب دریافتنی غیر استاندارد است را ذکر کنید, +Merge Invoices Based On,ادغام فاکتورها بر اساس, +Merge Progress,ادغام پیشرفت, +Merge Similar Account Heads,ادغام سران حساب های مشابه, +Merge taxes from multiple documents,ادغام مالیات از اسناد متعدد, +Merged,ادغام شد, +"Merging is only possible if following properties are same in both records. Is Group, Root Type, Company and Account Currency",ادغام تنها در صورتی امکان پذیر است که ویژگی های زیر در هر دو رکورد یکسان باشند. گروه، نوع ریشه، شرکت و ارز حساب است, +Merging {0} of {1},ادغام {0} از {1}, +Min Qty (As Per Stock UOM),حداقل تعداد (بر اساس موجودی UOM), +Min Qty should be greater than Recurse Over Qty,Min Qty باید بیشتر از Recurse Over Qty باشد, +Minimum Net Rate,حداقل نرخ خالص, +Minimum Payment Amount,حداقل مبلغ پرداختی, +Minimum Value,حداقل ارزش, +Mismatch,عدم تطابق, +Missing,جا افتاده, +Missing Asset,دارایی گمشده, +Missing Cost Center,مرکز هزینه جا افتاده, +Missing Finance Book,کتاب مالی جا افتاده, +Missing Finished Good,از دست رفته به پایان رسید, +Missing Formula,فرمول جا افتاده, +Missing Items,آیتم‌های جا افتاده, +Missing Payments App,برنامه پرداخت وجود ندارد, +Missing Serial No Bundle,باندل شماره سریال جا افتاده, +Missing value,مقدار از دست رفته, +Modified By,تغییر داده شده توسط, +Modified On,اصلاح شده در, +Module Settings,تنظیمات ماژول, +Move Stock,انتقال موجودی, +Move to Cart,جابجایی به سبد خرید, +Movement,جابجایی, +Moving up in tree ...,بالا رفتن در درخت..., +Multi-level BOM Creator,ایجاد کننده BOM چند سطحی, +Multiple Loyalty Programs found for Customer {}. Please select manually.,چندین برنامه وفاداری برای مشتری {} پیدا شد. لطفا به صورت دستی انتخاب کنید, +Multiple Warehouse Accounts,چندین حساب انبار, +Multiple items cannot be marked as finished item,چند مورد را نمی توان به عنوان مورد تمام شده علامت گذاری کرد, +Must be a publicly accessible Google Sheets URL and adding Bank Account column is necessary for importing via Google Sheets,باید یک URL کاربرگ‌نگار Google برای عموم قابل دسترسی باشد و افزودن ستون حساب بانکی برای درون‌بُرد از طریق Google Sheets ضروری است., +Named Place,مکان نامگذاری شده, +Naming Series and Price Defaults,نام گذاری سری ها و پیش فرض های قیمت, +Net total calculation precision loss,خالص از دست دادن دقت محاسبه کل, +New Balance In Account Currency,تراز جدید به ارز حساب, +New Event,رویداد جدید, +New Note,یادداشت جدید, +New Task,وظیفه جدید, +New Version,نسخه جدید, +Newsletter,خبرنامه, +No Answer,بدون پاسخ, +No Customers found with selected options.,هیچ مشتری با گزینه های انتخاب شده یافت نشد., +No Items selected for transfer.,هیچ موردی برای انتقال انتخاب نشده است., +No Matching Bank Transactions Found,هیچ تراکنش بانکی منطبقی یافت نشد, +No Notes,بدون یادداشت, +No Outstanding Invoices found for this party,هیچ صورتحساب معوقی برای این طرف یافت نشد, +No POS Profile found. Please create a New POS Profile first,هیچ نمایه POS یافت نشد. لطفا ابتدا یک نمایه POS جدید ایجاد کنید, +No Records for these settings.,هیچ رکوردی برای این تنظیمات وجود ندارد., +No Stock Available Currently,موجودی در حال حاضر موجود نیست, +No Summary,بدون خلاصه, +No Tax Withholding data found for the current posting date.,هیچ داده کسر مالیات برای تاریخ ارسال فعلی یافت نشد., +No Terms,بدون شرایط, +No Unreconciled Invoices and Payments found for this party and account,هیچ فاکتور و پرداخت ناسازگاری برای این طرف و حساب پیدا نشد, +No Unreconciled Payments found for this party,هیچ پرداخت ناسازگاری برای این طرف یافت نشد, +No Work Orders were created,هیچ دستور کار ایجاد نشد, +No additional fields available,هیچ فیلد اضافی در دسترس نیست, +No billing email found for customer: {0},هیچ ایمیل صورتحساب برای مشتری پیدا نشد: {0}, +No data found. Seems like you uploaded a blank file,داده ای یافت نشد. به نظر می رسد شما یک فایل خالی آپلود کرده اید, +No employee was scheduled for call popup,هیچ کارمندی برای فراخوانی برنامه ریزی نشده بود, +No failed logs,هیچ لاگ ناموفقی نیست, +No item available for transfer.,هیچ آیتمی برای انتقال موجود نیست., +No items are available in sales orders {0} for production,هیچ موردی در سفار‌ش‌های فروش {0} برای تولید موجود نیست, +No items are available in the sales order {0} for production,هیچ موردی در سفارش فروش {0} برای تولید موجود نیست, +No matches occurred via auto reconciliation,هیچ همخوانی ای از طریق تطبیق خودکار رخ نداد, +No more children on Left,دیگر هیچ فرزندی در سمت چپ وجود ندارد, +No more children on Right,دیگر هیچ فرزندی در سمت راست وجود ندارد, +No of Docs,شماره اسناد, +No of Employees,تعداد کارمندان, +No of Months (Expense),تعداد ماه ها (هزینه), +No of Months (Revenue),تعداد ماه ها (درآمد), +No open event,رویداد باز وجود ندارد, +No open task,هیچ وظیفه بازی نیست, +No outstanding {0} found for the {1} {2} which qualify the filters you have specified.,هیچ {0} معوقاتی برای {1} {2} که واجد شرایط فیلترهایی است که شما مشخص کرده اید، یافت نشد., +No primary email found for customer: {0},ایمیل اصلی برای مشتری پیدا نشد: {0}, +No records found in Allocation table,هیچ رکوردی در جدول تخصیص یافت نشد, +No records found in the Invoices table,هیچ رکوردی در جدول فاکتورها یافت نشد, +No records found in the Payments table,هیچ رکوردی در جدول پرداخت ها یافت نشد, +No stock transactions can be created or modified before this date.,هیچ تراکنش موجودیی را نمی توان قبل از این تاریخ ایجاد یا تغییر داد., +No {0} Accounts found for this company.,هیچ حساب {0} برای این شرکت یافت نشد., +No.,شماره, +No. of Employees,تعداد کارمندان, +No. of parallel job cards which can be allowed on this workstation. Example: 2 would mean this workstation can process production for two Work Orders at a time.,تعداد کارت کارهای موازی که می توانند در این ایستگاه کاری مجاز باشند. مثال: 2 به این معنی است که این ایستگاه کاری می تواند تولید را برای دو دستور کار در یک زمان پردازش کند., +Note: Automatic log deletion only applies to logs of type Update Cost,توجه: حذف خودکار لاگ فقط برای گزارش‌هایی از نوع به‌روزرسانی هزینه اعمال می‌شود, +"Note: To merge the items, create a separate Stock Reconciliation for the old item {0}",توجه: برای ادغام آیتم‌ها، یک تطبیق موجودی جداگانه برای آیتم قدیمی {0} ایجاد کنید, +Notes HTML,یادداشت های HTML, +Notification,اعلان, +Notification Settings,تنظیمات اعلان, +Notify Reposting Error to Role,خطای ارسال مجدد به نقش را اطلاع دهید, +Number of Days,تعداد روزها, +Numeric,عددی, +Numeric Inspection,بازرسی عددی, +Off,خاموش, +Offsetting Account,تسویه حساب, +Offsetting for Accounting Dimension,جبران برای بعد حسابداری, +On Paid Amount,با مبلغ پرداخت شده, +On This Date,در این تاریخ, +On Track,در مسیر, +"On expanding a row in the Items to Manufacture table, you'll see an option to 'Include Exploded Items'. Ticking this includes raw materials of the sub-assembly items in the production process.","با گسترش یک ردیف در جدول Items to Manufacture، گزینه ای برای ""شامل آیتم‌های گسترده شده"" را مشاهده خواهید کرد. تیک زدن این شامل مواد اولیه آیتم‌های زیر مونتاژ در فرآیند تولید می شود.", +Once the Work Order is Closed. It can't be resumed.,هنگامی که دستور کار بسته شد. نمی توان آن را از سر گرفت., +Only CSV and Excel files can be used to for importing data. Please check the file format you are trying to upload,برای درون‌بُرد داده ها فقط می توان از فایل های CSV و Excel استفاده کرد. لطفاً فرمت فایلی را که می‌خواهید آپلود کنید بررسی کنید, +Only Deduct Tax On Excess Amount , فقط از مقدار مازاد مالیات کسر کنید, +Only Include Allocated Payments,فقط شامل پرداخت های اختصاص داده شده است, +Only Parent can be of type {0},فقط والد می توانند از نوع {0} باشند, +Only existing assets,فقط دارایی های موجود, +"Only one Subcontracting Order can be created against a Purchase Order, cancel the existing Subcontracting Order to create a new one.",فقط یک سفارش پیمانکاری فرعی را می توان در مقابل یک سفارش خرید ایجاد کرد، برای ایجاد یک سفارش جدید، سفارش پیمانکاری فرعی موجود را لغو کنید., +Only {0} are supported,فقط {0} پشتیبانی می شود, +Open Activities HTML,Activity HTML را باز کنید, +Open Call Log,لاگ تماس را باز کنید, +Open Events,رویدادهای باز, +Open Sales Orders,باز کردن سفارش‌های فروش, +Open Task,وظیفه باز, +Open Tasks,وظایف باز, +Opening & Closing,افتتاحیه و اختتامیه, +Opening Accumulated Depreciation must be less than or equal to {0},استهلاک انباشته افتتاحیه باید کمتر یا مساوی با {0} باشد., +Opening Entry can not be created after Period Closing Voucher is created.,پس از ایجاد کوپن بسته شدن دوره، ورودی باز نمی تواند ایجاد شود., +Opening Purchase Invoices have been created.,فاکتورهای خرید افتتاحیه ایجاد شده است., +Opening Sales Invoices have been created.,فاکتورهای فروش افتتاحیه ایجاد شده است., +Operating Cost Per BOM Quantity,هزینه عملیاتی به ازای هر مقدار BOM, +Operation time does not depend on quantity to produce,زمان عملیات به مقدار تولید بستگی ندارد, +Opportunity Amount (Company Currency),مقدار فرصت (ارز شرکت), +Opportunity Owner,صاحب فرصت, +Opportunity Source,منبع فرصت, +Opportunity Summary by Sales Stage,خلاصه فرصت بر اساس مرحله فروش, +Opportunity Summary by Sales Stage ,خلاصه فرصت بر اساس مرحله فروش , +Opportunity Value,ارزش فرصت, +Order Status,وضعیت سفارش, +Other Info,سایر اطلاعات, +Out of stock,تمام شده, +Over Receipt,بیش از رسید, +Over Receipt/Delivery of {0} {1} ignored for item {2} because you have {3} role.,بیش از رسید/تحویل {0} {1} برای مورد {2} نادیده گرفته شد زیرا شما نقش {3} را دارید., +Over Transfer Allowance,بیش از کمک هزینه انتقال, +Overbilling of {0} {1} ignored for item {2} because you have {3} role.,اضافه صورتحساب {0} {1} برای مورد {2} نادیده گرفته شد زیرا شما نقش {3} را دارید., +Overbilling of {} ignored because you have {} role.,پرداخت بیش از حد {} نادیده گرفته شد زیرا شما نقش {} را دارید., +Overdue Payment,پرداخت معوقه, +Overdue Payments,پرداخت های معوق, +Overdue Tasks,وظایف عقب افتاده, +Overview,بررسی اجمالی, +PDF Name,نام PDF, +POS Closing Failed,بسته شدن POS ناموفق بود, +POS Closing failed while running in a background process. You can resolve the {0} and retry the process again.,بسته شدن POS هنگام اجرا در یک فرآیند پس‌زمینه انجام نشد. می توانید {0} را حل کنید و دوباره این فرآیند را امتحان کنید., +POS Invoices will be consolidated in a background process,فاکتورهای POS در یک فرآیند پس زمینه تلفیق می شوند, +POS Invoices will be unconsolidated in a background process,فاکتورهای POS در یک فرآیند پس زمینه تجمیع نمی شوند, +POS Profile {} contains Mode of Payment {}. Please remove them to disable this mode.,نمایه POS {} شامل حالت پرداخت {} است. لطفاً آنها را حذف کنید تا این حالت غیرفعال شود., +POS Search Fields,فیلدهای جستجوی POS, +POS Setting,تنظیمات POS, +Package No(s) already in use. Try from Package No {0},شماره (های) بسته در حال حاضر در حال استفاده است. از بسته شماره {0} امتحان کنید, +Packaging Slip From Delivery Note,برگه بسته بندی از یادداشت تحویل, +Packed Items cannot be transferred internally,اقلام بسته بندی شده را نمی توان به صورت داخلی منتقل کرد, +Packed Qty,تعداد بسته بندی شده, +Page Break After Each SoA,شکست صفحه پس از هر SoA, +Paid Amount After Tax,مبلغ پرداختی پس از کسر مالیات, +Paid Amount After Tax (Company Currency),مبلغ پرداختی پس از مالیات (ارز شرکت), +Paid From Account Type,پرداخت از نوع حساب, +Paid To Account Type,پرداخت به نوع حساب, +Pallets,پالت, +Parameter Group,گروه پارامتر, +Parameter Group Name,نام گروه پارامتر, +Parcel Template,قالب بسته, +Parcel Template Name,نام قالب بسته, +Parcel weight cannot be 0,وزن بسته نمی تواند 0 باشد, +Parcels,بسته ها, +Parent Account Missing,حساب والدین جا افتاده است, +Parent Document,سند والد, +Parent Item {0} must not be a Fixed Asset,مورد اصلی {0} نباید دارایی ثابت باشد, +Parent Row No,شماره ردیف والد, +Parent Task {0} is not a Template Task,وظیفه والد {0} یک وظیفه الگو نیست, +Partial Material Transferred,مواد جزئی منتقل شد, +Partial Stock Reservation,رزرو جزئی موجودی, +Partial Success,موفقیت جزئی, +"Partial stock can be reserved. For example, If you have a Sales Order of 100 units and the Available Stock is 90 units then a Stock Reservation Entry will be created for 90 units. ",موجودی جزئی قابل رزرو است. به عنوان مثال، اگر شما یک سفارش فروش 100 واحدی دارید و موجودی در دسترس 90 واحد است، یک ورودی رزرو موجودی برای 90 واحد ایجاد می شود. , +Partially Delivered,تا حدی تحویل شد, +Partially Reconciled,تا حدی تطبیق کرد, +Partially Reserved,تا حدی رزرو شده است, +Partly Paid,تا حدی پرداخت شده, +Partly Paid and Discounted,تا حدودی پرداخت شده و با تخفیف, +Partnership,شراکت, +Party Account No. (Bank Statement),شماره حساب طرف (صورتحساب بانکی), +Party Account {0} currency ({1}) and document currency ({2}) should be same,واحد پول حساب طرف {0} ({1}) و واحد پول سند ({2}) باید یکسان باشند, +Party IBAN (Bank Statement),طرف IBAN (صورتحساب بانکی), +Party Item Code,کد آیتم طرف, +Party Link,لینک طرف, +Party Name/Account Holder (Bank Statement),نام طرف / دارنده حساب (صورتحساب بانکی), +Party Specific Item,مورد خاص طرف, +Party Type and Party is required for Receivable / Payable account {0},نوع طرف و طرف برای حساب دریافتنی / پرداختنی {0} لازم است, +Party can only be one of {0},طرف فقط می تواند یکی از {0} باشد, +Passport Details,مشخصات پاسپورت, +Pause Job,مکث کار, +Paused,مکث کرد, +Payment Amount (Company Currency),مبلغ پرداختی (ارز شرکت), +"Payment Entry {0} is linked against Order {1}, check if it should be pulled as advance in this invoice.",ثبت پرداخت {0} با سفارش {1} مرتبط است، بررسی کنید که آیا باید به عنوان پیش پرداخت در این فاکتور آورده شود., +Payment Ledger,دفتر کل پرداخت, +Payment Ledger Balance,تراز دفتر کل پرداخت, +Payment Ledger Entry,ثبت دفتر پرداخت, +Payment Limit,محدودیت پرداخت, +Payment Reconciliation Allocation,تخصیص تطبیق پرداخت, +Payment Reconciliation Job: {0} is running for this party. Can't reconcile now.,کار تطبیق پرداخت: {0} برای این طرف اجرا می شود. الان نمیشه تطبیق کرد, +Payment Reconciliations,تطبیق های پرداخت, +Payment Request took too long to respond. Please try requesting for payment again.,پاسخ درخواست پرداخت خیلی طول کشید. لطفاً دوباره درخواست پرداخت کنید., +Payment Requests cannot be created against: {0},درخواست های پرداخت را نمی توان در مقابل: {0} ایجاد کرد, +Payment Terms Status for Sales Order,وضعیت شرایط پرداخت برای سفارش فروش, +Payment Terms from orders will be fetched into the invoices as is,شرایط پرداخت از سفارش‌ها همانطور که هست در فاکتورها آورده می شود, +Payment Unlink Error,خطای لغو پیوند پرداخت, +Payment of {0} received successfully.,پرداخت {0} با موفقیت دریافت شد., +Payment of {0} received successfully. Waiting for other requests to complete...,پرداخت {0} با موفقیت دریافت شد. در انتظار تکمیل درخواست های دیگر..., +Payment request failed,درخواست پرداخت انجام نشد, +Payment term {0} not used in {1},مدت پرداخت {0} در {1} استفاده نشده است, +Pending processing,در انتظار پردازش, +Per Received,هر دریافت شده, +Percentage (%),درصد (%), +Percentage you are allowed to order beyond the Blanket Order quantity.,درصدی که مجاز به سفارش آن هستید فراتر از مقدار سفارش کلی., +Percentage you are allowed to sell beyond the Blanket Order quantity.,درصدی که مجاز به فروش آن هستید فراتر از مقدار سفارش کلی., +Period Closed,دوره بسته است, +Period Closing Settings,تنظیمات اختتامیه دوره, +Period Details,جزئیات دوره, +Phone Ext.,تلفن خارجی, +Pick List Incomplete,فهرست انتخابی ناقص است, +Pick Manually,انتخاب دستی, +Pick Serial / Batch Based On,انتخاب سریال / دسته بر اساس, +Pick Serial / Batch No,انتخاب سریال / شماره دسته, +Picked Qty (in Stock UOM),تعداد انتخاب شده (در انبار UOM), +Pickup,سوار کردن, +Pickup Contact Person,شخص تماس وانت, +Pickup Date,تاریخ تحویل, +Pickup Date cannot be before this day,تاریخ تحویل نمی‌تواند قبل از این روز باشد, +Pickup From,وانت از, +Pickup To time should be greater than Pickup From time,Pickup To time باید بیشتر از Pickup From Time باشد, +Pickup Type,نوع پیکاپ, +Pickup from,وانت از, +Pickup to,وانت به, +Pipeline By,خط لوله توسط, +Plaid Link Failed,پیوند Plaid ناموفق بود, +Plaid Link Refresh Required,بازخوانی پیوند شطرنجی مورد نیاز است, +Plaid Link Updated,پیوند شطرنجی به روز شد, +Plan to Request Qty,برنامه ریزی برای مقدار درخواست, +Please Set Priority,لطفا اولویت را تعیین کنید, +Please Specify Account,لطفا حساب را مشخص کنید, +Please add 'Supplier' role to user {0}.,"لطفا نقش ""تامین کننده"" را به کاربر {0} اضافه کنید.", +Please add Request for Quotation to the sidebar in Portal Settings.,لطفاً درخواست برای پیش فاکتور را به نوار کناری در تنظیمات پورتال اضافه کنید., +Please add Root Account for - {0},لطفاً حساب ریشه برای - {0} اضافه کنید, +Please add atleast one Serial No / Batch No,لطفاً حداقل یک شماره سریال / شماره دسته اضافه کنید, +Please add the Bank Account column,لطفا ستون حساب بانکی را اضافه کنید, +Please add the account to root level Company - {0},لطفاً حساب را به شرکت سطح ریشه اضافه کنید - {0}, +Please add {1} role to user {0}.,لطفاً نقش {1} را به کاربر {0} اضافه کنید., +Please adjust the qty or edit {0} to proceed.,لطفاً تعداد را تنظیم کنید یا برای ادامه {0} را ویرایش کنید., +Please attach CSV file,لطفا فایل CSV را پیوست کنید, +Please cancel and amend the Payment Entry,لطفاً ثبت پرداخت را لغو و اصلاح کنید, +Please cancel payment entry manually first,لطفاً ابتدا ثبت پرداخت را به صورت دستی لغو کنید, +Please cancel related transaction.,لطفا تراکنش مربوطه را لغو کنید., +Please check Process Deferred Accounting {0} and submit manually after resolving errors.,لطفاً Process Deferred Accounting {0} را بررسی کنید و پس از رفع خطاها را به صورت دستی ارسال کنید., +Please check either with operations or FG Based Operating Cost.,لطفاً با عملیات یا هزینه عملیاتی مبتنی بر FG بررسی کنید., +Please check the error message and take necessary actions to fix the error and then restart the reposting again.,لطفاً پیام خطا را بررسی کنید و اقدامات لازم را برای رفع خطا انجام دهید و سپس ارسال مجدد را مجدداً راه‌اندازی کنید., +Please check your email to confirm the appointment,لطفا ایمیل خود را برای تایید قرار ملاقات بررسی کنید, +Please contact any of the following users to extend the credit limits for {0}: {1},لطفاً برای تمدید محدودیت اعتبار برای {0} با هر یک از کاربران زیر تماس بگیرید: {1}, +Please contact any of the following users to {} this transaction.,لطفاً با هر یک از کاربران زیر برای {} این تراکنش تماس بگیرید., +Please contact your administrator to extend the credit limits for {0}.,لطفاً برای تمدید محدودیت اعتبار برای {0} با سرپرست خود تماس بگیرید., +Please create Landed Cost Vouchers against Invoices that have 'Update Stock' enabled.,لطفاً در برابر فاکتورهایی که «به‌روزرسانی موجودی» را فعال کرده‌اند، کوپن‌های هزینه تمام شده تا درب انبار ایجاد کنید., +Please create a new Accounting Dimension if required.,لطفاً در صورت نیاز یک بعد حسابداری جدید ایجاد کنید., +Please create purchase from internal sale or delivery document itself,لطفا خرید را از فروش داخلی یا سند تحویل خود ایجاد کنید, +"Please delete Product Bundle {0}, before merging {1} into {2}",لطفاً قبل از ادغام {1} در {2}، باندل محصول {0} را حذف کنید, +Please do not book expense of multiple assets against one single Asset.,لطفا هزینه چند دارایی را در مقابل یک دارایی ثبت نکنید., +Please enable only if the understand the effects of enabling this.,لطفاً فقط در صورتی فعال کنید که تأثیرات فعال کردن آن را درک کنید., +Please enable {0} in the {1}.,لطفاً {0} را در {1} فعال کنید., +Please enable {} in {} to allow same item in multiple rows,لطفاً {} را در {} فعال کنید تا یک مورد در چندین ردیف مجاز باشد, +Please ensure {} account is a Balance Sheet account.,لطفاً مطمئن شوید که حساب {} یک حساب ترازنامه است., +Please ensure {} account {} is a Receivable account.,لطفاً مطمئن شوید که {} حساب {} یک حساب دریافتنی است., +Please enter Root Type for account- {0},لطفاً نوع ریشه را برای حساب وارد کنید- {0}, +Please enter Serial Nos,لطفا شماره های سریال را وارد کنید, +Please enter Shipment Parcel information,لطفا اطلاعات بسته حمل و نقل را وارد کنید, +Please enter Stock Items consumed during the Repair.,لطفاً آیتم‌های موجودی مصرف شده در طول تعمیر را وارد کنید., +Please enter mobile number first.,لطفا ابتدا شماره موبایل را وارد کنید, +Please enter quantity for item {0},لطفاً مقدار مورد {0} را وارد کنید, +Please enter serial nos,لطفا شماره سریال را وارد کنید, +"Please first set Last Name, Email and Phone for the user",لطفا ابتدا نام خانوادگی، ایمیل و تلفن را برای کاربر تنظیم کنید, +Please fix overlapping time slots for {0},لطفاً بازه های زمانی همپوشانی را برای {0} اصلاح کنید, +Please fix overlapping time slots for {0}.,لطفاً بازه های زمانی همپوشانی را برای {0} برطرف کنید., +Please import accounts against parent company or enable {} in company master.,لطفاً حساب‌ها را در مقابل شرکت مادر وارد کنید یا {} را در شرکت اصلی فعال کنید., +Please make sure the file you are using has 'Parent Account' column present in the header.,لطفاً مطمئن شوید که فایلی که استفاده می‌کنید دارای ستون «حساب والد» در سرصفحه باشد., +Please mention 'Weight UOM' along with Weight.,"لطفا ""وزن UOM"" را همراه با وزن ذکر کنید.", +Please mention the Current and New BOM for replacement.,لطفاً BOM فعلی و جدید را برای جایگزینی ذکر کنید., +Please rectify and try again.,لطفاً اصلاح کنید و دوباره امتحان کنید., +Please refresh or reset the Plaid linking of the Bank {}.,لطفاً پیوند Plaid بانک {} را بازخوانی یا بازنشانی کنید., +Please save before proceeding.,لطفا قبل از ادامه ذخیره کنید., +Please select Bank Account,لطفا حساب بانکی را انتخاب کنید, +Please select Finished Good Item for Service Item {0},لطفاً آیتم کالای تمام شده را برای آیتم سرویس {0} انتخاب کنید, +Please select Serial/Batch Nos to reserve or change Reservation Based On to Qty.,لطفاً شماره‌های سریال/دسته را برای رزرو انتخاب کنید یا رزرو براساس تعداد را تغییر دهید., +Please select Subcontracting Order instead of Purchase Order {0},لطفاً به جای سفارش خرید، سفارش قرارداد فرعی را انتخاب کنید {0}, +Please select Unrealized Profit / Loss account or add default Unrealized Profit / Loss account account for company {0},لطفاً حساب سود / زیان تحقق نیافته را انتخاب کنید یا حساب سود / زیان پیش فرض را برای شرکت اضافه کنید {0}, +Please select a Subcontracting Purchase Order.,لطفاً سفارش خرید پیمانکاری فرعی را انتخاب کنید., +Please select a Warehouse,لطفاً یک انبار انتخاب کنید, +Please select a Work Order first.,لطفاً ابتدا یک دستور کار را انتخاب کنید., +Please select a country,لطفا یک کشور را انتخاب کنید, +Please select a customer for fetching payments.,لطفاً یک مشتری را برای واکشی پرداخت ها انتخاب کنید., +Please select a date,لطفا تاریخ را انتخاب کنید, +Please select a date and time,لطفا تاریخ و زمان را انتخاب کنید, +Please select a row to create a Reposting Entry,لطفاً یک ردیف برای ایجاد یک ورودی ارسال مجدد انتخاب کنید, +Please select a supplier for fetching payments.,لطفاً یک تامین کننده برای واکشی پرداخت ها انتخاب کنید., +Please select a valid Purchase Order that has Service Items.,لطفاً یک سفارش خرید معتبر که دارای آیتم‌های خدماتی است انتخاب کنید., +Please select a valid Purchase Order that is configured for Subcontracting.,لطفاً یک سفارش خرید معتبر که برای قرارداد فرعی پیکربندی شده است، انتخاب کنید., +Please select an item code before setting the warehouse.,لطفاً قبل از تنظیم انبار یک کد آیتم را انتخاب کنید., +Please select items,لطفا آیتم‌ها را انتخاب کنید, +Please select items to unreserve.,لطفا آیتم‌ها را برای لغو رزرو انتخاب کنید., +Please select only one row to create a Reposting Entry,لطفاً فقط یک ردیف را برای ایجاد یک ورودی ارسال مجدد انتخاب کنید, +Please select rows to create Reposting Entries,لطفاً ردیف‌هایی را برای ایجاد ورودی‌های ارسال مجدد انتخاب کنید, +Please select the required filters,لطفا فیلترهای مورد نیاز را انتخاب کنید, +Please select valid document type.,لطفا نوع سند معتبر را انتخاب کنید., +Please set Account,لطفا حساب را تنظیم کنید, +Please set Accounting Dimension {} in {},لطفاً بعد حسابداری {} را در {} تنظیم کنید, +Please set Email/Phone for the contact,لطفا ایمیل/تلفن را برای مخاطب تنظیم کنید, +Please set Fiscal Code for the customer '%s',"لطفاً کد مالی را برای مشتری ""%s"" تنظیم کنید", +Please set Fixed Asset Account in {} against {}.,لطفاً حساب دارایی ثابت را در {} در مقابل {} تنظیم کنید., +Please set Parent Row No for item {0},لطفاً شماره ردیف والد را برای آیتم {0} تنظیم کنید, +Please set Root Type,لطفا Root Type را تنظیم کنید, +Please set Tax ID for the customer '%s',"لطفاً شناسه مالیاتی را برای مشتری ""%s"" تنظیم کنید", +Please set VAT Accounts in {0},لطفاً حساب‌های VAT را در {0} تنظیم کنید, +"Please set Vat Accounts for Company: ""{0}"" in UAE VAT Settings","لطفاً حساب‌های مالیات بر ارزش افزوده را برای شرکت تنظیم کنید: ""{0}"" در تنظیمات مالیات بر ارزش افزوده امارات", +Please set a Cost Center for the Asset or set an Asset Depreciation Cost Center for the Company {},لطفاً یک مرکز هزینه برای دارایی یا یک مرکز هزینه استهلاک دارایی برای شرکت تنظیم کنید {}, +Please set a default Holiday List for Company {0},لطفاً یک فهرست تعطیلات پیش‌فرض برای شرکت {0} تنظیم کنید, +Please set an Address on the Company '%s',"لطفاً یک آدرس در شرکت ""%s"" تنظیم کنید", +Please set an Expense Account in the Items table,لطفاً یک حساب هزینه در جدول آیتم‌ها تنظیم کنید, +Please set default Exchange Gain/Loss Account in Company {},لطفاً حساب سود/زیان مبادله پیش‌فرض را در شرکت تنظیم کنید {}, +Please set default Expense Account in Company {0},لطفاً حساب هزینه پیش‌فرض را در شرکت {0} تنظیم کنید, +Please set default cost of goods sold account in company {0} for booking rounding gain and loss during stock transfer,لطفاً حساب هزینه پیش‌فرض کالاهای فروخته‌شده در شرکت {0} را برای رزرو سود و زیان در حین انتقال موجودی تنظیم کنید, +Please set filters,لطفا فیلترها را تنظیم کنید, +Please set one of the following:,لطفا یکی از موارد زیر را تنظیم کنید:, +Please set the cost center field in {0} or setup a default Cost Center for the Company.,لطفاً فیلد مرکز هزینه را در {0} تنظیم کنید یا یک مرکز هزینه پیش‌فرض برای شرکت تنظیم کنید., +Please set {0} in BOM Creator {1},لطفاً {0} را در BOM Creator {1} تنظیم کنید, +Please share this email with your support team so that they can find and fix the issue.,لطفاً این ایمیل را با تیم پشتیبانی خود به اشتراک بگذارید تا آنها بتوانند مشکل را پیدا کرده و برطرف کنند., +Please specify a {0},لطفاً یک {0} را مشخص کنید, +Please try again in an hour.,لطفا یک ساعت دیگر دوباره امتحان کنید., +Please update Repair Status.,لطفاً وضعیت تعمیر را به روز کنید., +Portal User,کاربر پورتال, +Portal Users,کاربران پورتال, +"Previous Year is not closed, please close it first",سال قبل تعطیل نیست، لطفا اول آن را ببندید, +Price ({0}),قیمت ({0}), +Price List Defaults,لیست قیمت پیش فرض, +Price Per Unit ({0}),قیمت هر واحد ({0}), +Primary Address and Contact,آدرس و مخاطب اصلی, +Primary Contact,مخاطب اصلی, +Primary Party,طرف اصلی, +Primary Role,نقش اصلی, +Print Format Builder,فرمت ساز چاپ, +Print Style,سبک چاپ, +Printing,چاپ, +Priority cannot be lesser than 1.,اولویت نمی تواند کمتر از 1 باشد., +Priority is mandatory,اولویت الزامی است, +Probability,احتمال, +Process Loss,از دست دادن فرآیند, +Process Loss Percentage cannot be greater than 100,درصد ضرر فرآیند نمی تواند بیشتر از 100 باشد, +Process Loss Qty,تعداد از دست دادن فرآیند, +Process Loss Report,گزارش از دست دادن فرآیند, +Process Loss Value,ارزش از دست دادن فرآیند, +Process Payment Reconciliation,فرآیند تطبیق پرداخت, +Process Payment Reconciliation Log,گزارش تطبیق پرداخت فرآیند, +Process Payment Reconciliation Log Allocations,تخصیص گزارش تطبیق پرداخت فرآیند, +Process Subscription,فرآیند اشتراک, +Processed BOMs,BOM های پردازش شده, +Processing Sales! Please Wait...,در حال پردازش فروش! لطفا صبر کنید..., +Produced / Received Qty,تعداد تولید / دریافت شده, +Product Price ID,شناسه قیمت محصول, +Production Plan Already Submitted,طرح تولید قبلا ارسال شده است, +Production Plan Item Reference,مرجع آیتم طرح تولید, +Production Plan Qty,مقدار برنامه تولید, +Production Plan Sub Assembly Item,آیتم زیر مونتاژ برنامه تولید, +Production Plan Sub-assembly Item,آیتم زیر مونتاژ برنامه تولید, +Production Plan Summary,خلاصه برنامه تولید, +Profile,مشخصات, +Profit and Loss Summary,خلاصه سود و زیان, +Progress,پیشرفت, +Progress (%),پیشرفت (%), +Project Progress:,پیشرفت پروژه:, +Prompt Qty,تعداد را اعلان کنید, +Prospect,مشتری بالقوه, +Prospect Lead,سرنخ مشتری بالقوه, +Prospect Opportunity,فرصت مشتری بالقوه, +Prospect Owner,مالک مشتری بالقوه, +Prospect {0} already exists,مشتری بالقوه {0} از قبل وجود دارد, +Provisional Expense Account,حساب هزینه موقت, +Purchase Order Item reference is missing in Subcontracting Receipt {0},مرجع آیتم سفارش خرید در رسید پیمانکاری فرعی وجود ندارد {0}, +Purchase Orders {0} are un-linked,سفارش‌های خرید {0} لغو پیوند هستند, +Purchase Receipt (Draft) will be auto-created on submission of Subcontracting Receipt.,رسید خرید (پیش نویس) به صورت خودکار با ارائه رسید پیمانکاری فرعی ایجاد می شود., +Purchase Receipt {0} created.,رسید خرید {0} ایجاد شد., +Purchase Value,ارزش خرید, +Purchases,خریدها, +Purposes Required,اهداف مورد نیاز, +Putaway Rule,قانون Putaway, +Putaway Rule already exists for Item {0} in Warehouse {1}.,قانون Putaway از قبل برای مورد {0} در انبار {1} وجود دارد., +Qty , تعداد, +Qty After Transaction,تعداد بعد از تراکنش, +Qty As Per BOM,مقدار طبق BOM, +Qty Change,تغییر تعداد, +Qty In Stock,تعداد موجود در انبار, +Qty Per Unit,تعداد در هر واحد, +Qty To Produce,تعداد برای تولید, +Qty and Rate,تعداد و نرخ, +Qty as Per Stock UOM,تعداد به ازای موجودی UOM, +Qty for which recursion isn't applicable.,تعداد که بازگشت برای آنها قابل اعمال نیست., +Qty in Stock UOM,تعداد موجود در انبار UOM, +Qty of Finished Goods Item should be greater than 0.,تعداد کالاهای تمام شده باید بیشتر از 0 باشد., +Qty to Be Consumed,مقدار قابل مصرف, +Qty to Build,تعداد برای ساخت, +Qty to Fetch,تعداد برای واکشی, +Qty to Produce,تعداد برای تولید, +Qualification Status,وضعیت صلاحیت, +Qualified,واجد شرایط, +Qualified By,واجد شرایط توسط, +Qualified on,واجد شرایط, +Quality Inspection Parameter,پارامتر بازرسی کیفیت, +Quality Inspection Parameter Group,گروه پارامترهای بازرسی کیفیت, +Quality Inspection Settings,تنظیمات بازرسی کیفیت, +Quality Inspection(s),بازرسی(های) کیفیت, +Quantity is required,مقدار مورد نیاز است, +"Quantity must be greater than zero, and less or equal to {0}",مقدار باید بزرگتر از صفر و کمتر یا مساوی با {0} باشد., +Quantity to Produce should be greater than zero.,مقدار تولید باید بیشتر از صفر باشد., +Quantity to Scan,مقدار برای اسکن, +Quarter {0} {1},سه ماهه {0} {1}, +Quotation Number,شماره پیش فاکتور, +Quoted Amount,مبلغ نقل شده, +Rate Difference with Purchase Invoice,تفاوت نرخ با فاکتور خرید, +Rate Section,بخش امتیاز دهی, +Rate of Stock UOM,نرخ موجودی UOM, +Ratios,نسبت ها, +Raw Material Cost Per Qty,هزینه مواد خام به ازای هر تعداد, +Raw Material Item,مورد مواد خام, +Raw Material Value,ارزش مواد خام, +Raw Materials Consumption ,مصرف مواد اولیه , +Raw Materials Warehouse,انبار مواد اولیه, +Reading Value,مقدار خواندن, +Reason for hold:,دلیل نگه داشتن:, +Rebuild Tree,درخت را بازسازی کنید, +Recalculate Incoming/Outgoing Rate,محاسبه مجدد نرخ ورودی/خروجی, +Recalculating Purchase Cost against this Project...,محاسبه مجدد هزینه خرید در مقابل این پروژه..., +Receivable/Payable Account,حساب دریافتنی/پرداختنی, +Receivable/Payable Account: {0} doesn't belong to company {1},حساب دریافتنی/پرداختنی: {0} به شرکت {1} تعلق ندارد, +Received Amount After Tax,مبلغ دریافتی پس از کسر مالیات, +Received Amount After Tax (Company Currency),مبلغ دریافتی پس از کسر مالیات (ارز شرکت), +Received Amount cannot be greater than Paid Amount,مبلغ دریافتی نمی تواند بیشتر از مبلغ پرداختی باشد, +Received Qty in Stock UOM,تعداد در انبار UOM دریافت شد, +Recent Orders,سفارش‌های اخیر, +Reconcile the Bank Transaction,تراکنش بانکی را تطبیق دهید, +Reconciled Entries,ثبت های تطبیق شده, +Reconciliation Error Log,لاگ خطای تطبیق, +Reconciliation Logs,لاگ‌های مربوط به تطبیق, +Reconciliation Progress,پیشرفت تطبیق, +Recording HTML,ضبط HTML, +Recoverable Standard Rated expenses should not be set when Reverse Charge Applicable is Y,زمانی که شارژ معکوس قابل اعمال Y است، هزینه‌های استاندارد قابل بازیافت نباید تنظیم شوند, +Recurse Every (As Per Transaction UOM),تکرار هر (بر اساس UOM تراکنش), +Recurse Over Qty cannot be less than 0,Recurse Over Qty نمی تواند کمتر از 0 باشد, +Reference Date for Early Payment Discount,تاریخ مرجع برای تخفیف پرداخت زودهنگام, +Reference Detail,جزئیات مرجع, +Reference DocType,مرجع DocType, +Reference Exchange Rate,نرخ ارز مرجع, +Reference No,شماره مرجع, +Reference number of the invoice from the previous system,شماره مرجع فاکتور از سیستم قبلی, +References {0} of type {1} had no outstanding amount left before submitting the Payment Entry. Now they have a negative outstanding amount.,مراجع {0} از نوع {1} قبل از ارسال ثبت پرداخت، مبلغ معوقه ای باقی نمانده بود. اکنون آنها یک مبلغ معوقه منفی دارند., +Refresh Google Sheet,برگه Google را بازخوانی کنید, +Refresh Plaid Link,پیوند شطرنجی را تازه کنید, +Regenerate Closing Stock Balance,بازسازی تراز موجودی اختتامیه, +Rejected Serial and Batch Bundle,باندل سریال و دسته رد شده, +Remarks Column Length,طول ستون اظهارات, +Repair,تعمیر, +Repair Asset,دارایی تعمیر, +Repair Details,جزئیات تعمیر, +Report Error,گزارش خطا, +Report Filters,گزارش فیلترها, +Report View,نمای گزارش, +Repost Accounting Ledger,بازنشر دفتر کل حسابداری, +Repost Accounting Ledger Items,بازنشر اقلام دفتر کل حسابداری, +Repost Accounting Ledger Settings,بازنشر تنظیمات دفتر کل حسابداری, +Repost Allowed Types,بازنشر انواع مجاز, +Repost Error Log,لاگ خطای ارسال مجدد, +Repost Item Valuation,ارسال مجدد ارزش گذاری مورد, +Repost Payment Ledger,ارسال مجدد دفتر کل پرداخت, +Repost Payment Ledger Items,ارسال مجدد اقلام دفتر کل پرداخت, +Repost Status,وضعیت بازنشر, +Repost has started in the background,ارسال مجدد در پس زمینه شروع شده است, +Repost in background,بازنشر در پس زمینه, +Repost started in the background,بازنشر در پس‌زمینه شروع شد, +Reposting Data File,ارسال مجدد فایل داده, +Reposting Info,بازنشر اطلاعات, +Reposting Progress,بازنشر پیشرفت, +Reposting entries created: {0},ارسال مجدد ورودی های ایجاد شده: {0}, +Reposting has been started in the background.,ارسال مجدد در پس‌زمینه آغاز شده است., +Reposting in the background.,بازنشر در پس زمینه, +Represents a Financial Year. All accounting entries and other major transactions are tracked against the Fiscal Year.,نشان دهنده یک سال مالی است. کلیه ثبت‌های حسابداری و سایر تراکنش‌های عمده در برابر سال مالی ردیابی می شوند., +Request Parameters,پارامترهای درخواست, +Request Timeout,درخواست مهلت زمانی, +Reservation Based On,رزرو بر اساس, +Reserve,ذخیره, +Reserve Stock,ذخیره موجودی, +"Reserved Qty ({0}) cannot be a fraction. To allow this, disable '{1}' in UOM {3}.","تعداد رزرو شده ({0}) نمی تواند کسری باشد. برای اجازه دادن به این کار، ""{1}"" را در UOM {3} غیرفعال کنید.", +Reserved Qty for Production Plan,تعداد رزرو شده برای طرح تولید, +Reserved Qty for Subcontract,مقدار رزرو شده برای قرارداد فرعی, +Reserved Qty should be greater than Delivered Qty.,تعداد رزرو شده باید بیشتر از تعداد تحویل شده باشد., +Reserved Serial No.,شماره سریال رزرو شده, +Reserved Stock,موجودی رزرو شده, +Reserved Stock for Batch,موجودی رزرو شده برای دسته, +Reserved for POS Transactions,برای معاملات POS رزرو شده است, +Reserved for Production,برای تولید محفوظ است, +Reserved for Production Plan,برای طرح تولید محفوظ است, +Reserved for Sub Contracting,برای پیمانکاری فرعی محفوظ است, +Reserving Stock...,رزرو موجودی..., +Reset Company Default Values,بازنشانی مقادیر پیش فرض شرکت, +Reset Plaid Link,بازنشانی پیوند Plaid, +Resolution Due,سررسید حل و فصل, +Response and Resolution,پاسخ و حل و فصل, +Restart,راه‌اندازی مجدد, +Restore Asset,بازیابی دارایی, +Restrict,محدود کردن, +Restrict Items Based On,موارد را بر اساس محدود کنید, +Result Key,کلید نتیجه, +Resume Job,رزومه کاری, +Retried,دوباره امتحان شد, +Retry,دوباره امتحان کنید, +Retry Failed Transactions,تراکنش های ناموفق را دوباره امتحان کنید, +Return Against,بازگشت در مقابل, +Return Against Subcontracting Receipt,استرداد در مقابل رسید پیمانکاری فرعی, +Return Components,برگرداندن اجزاء, +Return Issued,حواله بازگشت صادر شد, +Return Qty,تعداد برگشت, +Return Qty from Rejected Warehouse,تعداد بازگرداندن از انبار مرجوعی, +Return of Components,بازگشت اجزاء, +Returned,بازگشت, +Returned Against,بازگشت در برابر, +Returned Qty ,مقدار برگردانده شده , +Returned Qty in Stock UOM,تعداد برگردانده شده در انبار UOM, +Returned exchange rate is neither integer not float.,نرخ ارز برگشتی نه عدد صحیح است و نه شناور., +Revaluation Journals,دفترهای روزنامه تجدید ارزیابی, +Revaluation Surplus,مازاد تجدید ارزیابی, +Revenue,درآمد, +Reversal Of,معکوس شدن, +Role Allowed to Create/Edit Back-dated Transactions,نقش مجاز برای ایجاد/ویرایش تراکنش های قدیمی, +Role Allowed to Over Bill , نقش مجاز به Over Bill, +Role Allowed to Over Deliver/Receive,نقش مجاز به تحویل/دریافت بیش از حد, +Role Allowed to Override Stop Action,نقش مجاز برای لغو عمل توقف, +Role allowed to bypass Credit Limit,نقش مجاز برای دور زدن محدودیت اعتبار, +"Root Type for {0} must be one of the Asset, Liability, Income, Expense and Equity",نوع ریشه برای {0} باید یکی از دارایی، بدهی، درآمد، هزینه و حقوق صاحبان موجودی باشد., +Round Free Qty,دور تعداد رایگان, +Round Off Tax Amount,دور کردن مبلغ مالیات, +Round Tax Amount Row-wise,گرد کردن مقدار مالیات مبتنی بر ردیف, +Rounding Loss Allowance,زیان گرد کردن مجاز, +Rounding Loss Allowance should be between 0 and 1,زیان گرد کردن مجاز باید بین 0 و 1 باشد, +Rounding gain/loss Entry for Stock Transfer,گرد کردن ثبت سود/زیان برای انتقال موجودی, +Row #,ردیف #, +Row # {0}:,ردیف شماره {0}:, +Row #{0}: A reorder entry already exists for warehouse {1} with reorder type {2}.,ردیف #{0}: یک ورودی سفارش مجدد از قبل برای انبار {1} با نوع سفارش مجدد {2} وجود دارد., +Row #{0}: Acceptance Criteria Formula is incorrect.,ردیف #{0}: فرمول معیارهای پذیرش نادرست است., +Row #{0}: Acceptance Criteria Formula is required.,ردیف #{0}: فرمول معیارهای پذیرش الزامی است., +Row #{0}: Accepted Warehouse and Rejected Warehouse cannot be same,ردیف #{0}: انبار پذیرفته شده و انبار مرجوعی نمی توانند یکسان باشند, +Row #{0}: Accepted Warehouse is mandatory for the accepted Item {1},ردیف #{0}: انبار پذیرفته شده برای مورد پذیرفته شده اجباری است {1}, +Row #{0}: Allocated amount:{1} is greater than outstanding amount:{2} for Payment Term {3},ردیف #{0}: مبلغ تخصیص یافته:{1} بیشتر از مبلغ معوق است:{2} برای مدت پرداخت {3}, +Row #{0}: Amount must be a positive number,ردیف #{0}: مقدار باید یک عدد مثبت باشد, +Row #{0}: BOM is not specified for subcontracting item {0},ردیف #{0}: BOM برای قرارداد فرعی مورد {0} مشخص نشده است, +Row #{0}: Batch No {1} is already selected.,ردیف #{0}: شماره دسته {1} قبلاً انتخاب شده است., +Row #{0}: Cannot allocate more than {1} against payment term {2},ردیف #{0}: نمی توان بیش از {1} را در مقابل مدت پرداخت {2} تخصیص داد, +Row #{0}: Cannot transfer more than Required Qty {1} for Item {2} against Job Card {3},ردیف #{0}: نمی توان بیش از مقدار لازم {1} برای مورد {2} در مقابل کارت کار {3} انتقال داد, +Row #{0}: Consumed Asset {1} cannot be Draft,ردیف #{0}: دارایی مصرف شده {1} نمی تواند پیش نویس باشد, +Row #{0}: Consumed Asset {1} cannot be cancelled,ردیف #{0}: دارایی مصرف شده {1} قابل لغو نیست, +Row #{0}: Consumed Asset {1} cannot be the same as the Target Asset,ردیف #{0}: دارایی مصرف شده {1} نمی تواند با دارایی هدف یکسان باشد, +Row #{0}: Consumed Asset {1} cannot be {2},ردیف #{0}: دارایی مصرف شده {1} نمی تواند {2} باشد, +Row #{0}: Consumed Asset {1} does not belong to company {2},ردیف #{0}: دارایی مصرف شده {1} به شرکت {2} تعلق ندارد, +Row #{0}: Cumulative threshold cannot be less than Single Transaction threshold,ردیف #{0}: آستانه تجمعی نمی‌تواند کمتر از آستانه یک تراکنش باشد, +Row #{0}: Dates overlapping with other row,ردیف #{0}: تاریخ ها با ردیف دیگر همپوشانی دارند, +Row #{0}: Default BOM not found for FG Item {1},ردیف #{0}: BOM پیش‌فرض برای آیتم کالای تمام شده {1} یافت نشد, +Row #{0}: Expense Account not set for the Item {1}. {2},ردیف #{0}: حساب هزینه برای مورد {1} تنظیم نشده است. {2}, +Row #{0}: Finished Good Item Qty can not be zero,ردیف #{0}: مقدار آیتم کالای تمام شده نمی تواند صفر باشد, +Row #{0}: Finished Good Item is not specified for service item {1},ردیف #{0}: آیتم کالای تمام شده برای مورد خدماتی {1} مشخص نشده است, +Row #{0}: Finished Good Item {1} must be a sub-contracted item,ردیف #{0}: آیتم کالای تمام شده {1} باید یک آیتم قرارداد فرعی باشد, +Row #{0}: Finished Good reference is mandatory for Scrap Item {1}.,ردیف #{0}: مرجع کالای تمام شده برای ضایعات {1} اجباری است., +"Row #{0}: For {1}, you can select reference document only if account gets credited",ردیف #{0}: برای {1}، فقط در صورتی می‌توانید سند مرجع را انتخاب کنید که حساب اعتبار شود, +"Row #{0}: For {1}, you can select reference document only if account gets debited",ردیف #{0}: برای {1}، فقط در صورتی می‌توانید سند مرجع را انتخاب کنید که حساب بدهکار شود, +Row #{0}: From Date cannot be before To Date,ردیف #{0}: From Date نمی تواند قبل از To Date باشد, +Row #{0}: Item {1} does not exist,ردیف #{0}: مورد {1} وجود ندارد, +"Row #{0}: Item {1} has been picked, please reserve stock from the Pick List.",ردیف #{0}: مورد {1} انتخاب شده است، لطفاً موجودی را از فهرست انتخاب رزرو کنید., +Row #{0}: Item {1} is not a service item,ردیف #{0}: مورد {1} یک مورد خدماتی نیست, +Row #{0}: Item {1} is not a stock item,ردیف #{0}: مورد {1} یک کالای موجودی نیست, +Row #{0}: Only {1} available to reserve for the Item {2},ردیف #{0}: فقط {1} برای رزرو مورد {2} موجود است, +Row #{0}: Please select Item Code in Assembly Items,ردیف #{0}: لطفاً کد آیتم را در آیتم‌های اسمبلی انتخاب کنید, +Row #{0}: Please select the BOM No in Assembly Items,ردیف #{0}: لطفاً شماره BOM را در آیتم‌های اسمبلی انتخاب کنید, +Row #{0}: Please select the Sub Assembly Warehouse,ردیف #{0}: لطفاً انبار زیر مونتاژ را انتخاب کنید, +Row #{0}: Please update deferred revenue/expense account in item row or default account in company master,ردیف #{0}: لطفاً حساب درآمد/هزینه معوق را در ردیف آیتم یا حساب پیش‌فرض در اصلی شرکت به‌روزرسانی کنید., +Row #{0}: Qty increased by {1},ردیف #{0}: تعداد با {1} افزایش یافت, +Row #{0}: Qty must be a positive number,ردیف #{0}: تعداد باید یک عدد مثبت باشد, +Row #{0}: Qty should be less than or equal to Available Qty to Reserve (Actual Qty - Reserved Qty) {1} for Iem {2} against Batch {3} in Warehouse {4}.,ردیف #{0}: تعداد باید کمتر یا برابر با تعداد موجود برای رزرو (تعداد واقعی - تعداد رزرو شده) {1} برای Iem {2} در مقابل دسته {3} در انبار {4} باشد., +Row #{0}: Quantity to reserve for the Item {1} should be greater than 0.,ردیف #{0}: مقدار قابل رزرو برای مورد {1} باید بیشتر از 0 باشد., +Row #{0}: Rate must be same as {1}: {2} ({3} / {4}),ردیف #{0}: نرخ باید مانند {1} باشد: {2} ({3} / {4}), +Row #{0}: Received Qty must be equal to Accepted + Rejected Qty for Item {1},ردیف #{0}: تعداد دریافتی باید برابر با تعداد پذیرفته شده + رد شده برای مورد {1} باشد., +Row #{0}: Rejected Qty cannot be set for Scrap Item {1}.,سطر #{0}: تعداد رد شده را نمی توان برای ضایعات {1} تنظیم کرد., +Row #{0}: Rejected Warehouse is mandatory for the rejected Item {1},ردیف #{0}: انبار مرجوعی برای مورد رد شده اجباری است {1}, +Row #{0}: Scrap Item Qty cannot be zero,ردیف #{0}: تعداد مورد ضایعات نمی تواند صفر باشد, +Row #{0}: Serial No {1} for Item {2} is not available in {3} {4} or might be reserved in another {5}.,ردیف #{0}: شماره سریال {1} برای آیتم {2} در {3} {4} موجود نیست یا ممکن است در {5} دیگری رزرو شده باشد., +Row #{0}: Serial No {1} is already selected.,ردیف #{0}: شماره سریال {1} قبلاً انتخاب شده است., +Row #{0}: Start Time and End Time are required,ردیف #{0}: زمان شروع و زمان پایان مورد نیاز است, +Row #{0}: Start Time must be before End Time,ردیف #{0}: زمان شروع باید قبل از زمان پایان باشد, +Row #{0}: Status is mandatory,ردیف #{0}: وضعیت اجباری است, +Row #{0}: Stock cannot be reserved for Item {1} against a disabled Batch {2}.,ردیف #{0}: موجودی را نمی توان برای آیتم {1} در مقابل دسته غیرفعال شده {2} رزرو کرد., +Row #{0}: Stock cannot be reserved for a non-stock Item {1},ردیف #{0}: موجودی را نمی توان برای یک کالای غیر موجودی رزرو کرد {1}, +Row #{0}: Stock cannot be reserved in group warehouse {1}.,ردیف #{0}: موجودی در انبار گروهی {1} قابل رزرو نیست., +Row #{0}: Stock is already reserved for the Item {1}.,ردیف #{0}: موجودی قبلاً برای مورد {1} رزرو شده است., +Row #{0}: Stock is reserved for item {1} in warehouse {2}.,ردیف #{0}: موجودی برای کالای {1} در انبار {2} رزرو شده است., +Row #{0}: Stock not available to reserve for Item {1} against Batch {2} in Warehouse {3}.,ردیف #{0}: موجودی برای رزرو مورد {1} در مقابل دسته {2} در انبار {3} موجود نیست., +Row #{0}: Stock not available to reserve for the Item {1} in Warehouse {2}.,ردیف #{0}: موجودی برای رزرو مورد {1} در انبار {2} موجود نیست., +Row #{0}: You cannot use the inventory dimension '{1}' in Stock Reconciliation to modify the quantity or valuation rate. Stock reconciliation with inventory dimensions is intended solely for performing opening entries.,ردیف #{0}: نمی‌توانید از بعد موجودی «{1}» در تطبیق موجودی برای تغییر مقدار یا نرخ ارزیابی استفاده کنید. تطبیق موجودی با ابعاد موجودی صرفاً برای انجام ورودی های افتتاحیه در نظر گرفته شده است., +Row #{0}: You must select an Asset for Item {1}.,ردیف #{0}: باید یک دارایی برای مورد {1} انتخاب کنید., +Row #{0}: {1} is not a valid reading field. Please refer to the field description.,ردیف #{0}: {1} یک فیلد خواندنی معتبر نیست. لطفا به توضیحات فیلد مراجعه کنید., +Row #{0}: {1} of {2} should be {3}. Please update the {1} or select a different account.,ردیف #{0}: {1} از {2} باید {3} باشد. لطفاً {1} را به روز کنید یا حساب دیگری را انتخاب کنید., +Row #{1}: Warehouse is mandatory for stock Item {0},ردیف #{1}: انبار برای کالای موجودی {0} اجباری است, +Row #{}: Finance Book should not be empty since you're using multiple.,ردیف #{}: کتاب مالی نباید خالی باشد زیرا از چندگانه استفاده می کنید., +Row #{}: Please use a different Finance Book.,ردیف #{}: لطفاً از کتاب مالی دیگری استفاده کنید., +Row #{}: item {} has been picked already.,ردیف #{}: مورد {} قبلاً انتخاب شده است., +Row #{}: {} {} doesn't belong to Company {}. Please select valid {}.,ردیف #{}: {} {} به شرکت {} تعلق ندارد. لطفاً {} معتبر را انتخاب کنید., +Row No {0}: Warehouse is required. Please set a Default Warehouse for Item {1} and Company {2},ردیف شماره {0}: انبار مورد نیاز است. لطفاً یک انبار پیش فرض برای مورد {1} و شرکت {2} تنظیم کنید, +Row Number,شماره ردیف, +Row {0},ردیف {0}, +"Row {0} picked quantity is less than the required quantity, additional {1} {2} required.",مقدار انتخابی ردیف {0} کمتر از مقدار مورد نیاز است، {1} {2} اضافی مورد نیاز است., +Row {0}# Item {1} cannot be transferred more than {2} against {3} {4},ردیف {0}# مورد {1} را نمی توان بیش از {2} در برابر {3} {4} منتقل کرد, +Row {0}# Item {1} not found in 'Raw Materials Supplied' table in {2} {3},ردیف {0}# مورد {1} در جدول «مواد خام عرضه شده» در {2} {3} یافت نشد, +Row {0}: Accepted Qty and Rejected Qty can't be zero at the same time.,ردیف {0}: تعداد پذیرفته شده و تعداد رد شده نمی توانند همزمان صفر باشند., +Row {0}: Account {1} and Party Type {2} have different account types,ردیف {0}: حساب {1} و نوع طرف {2} انواع مختلف حساب دارند, +Row {0}: Allocated amount {1} must be less than or equal to invoice outstanding amount {2},ردیف {0}: مبلغ تخصیص یافته {1} باید کمتر یا برابر با مبلغ معوق فاکتور {2} باشد., +Row {0}: Allocated amount {1} must be less than or equal to remaining payment amount {2},ردیف {0}: مبلغ تخصیص یافته {1} باید کمتر یا مساوی با مبلغ پرداخت باقی مانده باشد {2}, +Row {0}: Both Debit and Credit values cannot be zero,ردیف {0}: هر دو مقدار بدهی و اعتبار نمی توانند صفر باشند, +Row {0}: Cost Center {1} does not belong to Company {2},ردیف {0}: مرکز هزینه {1} به شرکت {2} تعلق ندارد, +Row {0}: Either Delivery Note Item or Packed Item reference is mandatory.,ردیف {0}: مرجع مورد یادداشت تحویل یا کالای بسته بندی شده اجباری است., +Row {0}: Expense Head changed to {1} as no Purchase Receipt is created against Item {2}.,ردیف {0}: سر هزینه به {1} تغییر کرد زیرا هیچ رسید خریدی در برابر مورد {2} ایجاد نشد., +Row {0}: Expense Head changed to {1} because account {2} is not linked to warehouse {3} or it is not the default inventory account,ردیف {0}: سر هزینه به {1} تغییر کرد زیرا حساب {2} به انبار {3} مرتبط نیست یا حساب موجودی پیش‌فرض نیست, +Row {0}: Expense Head changed to {1} because expense is booked against this account in Purchase Receipt {2},ردیف {0}: سر هزینه به {1} تغییر کرد زیرا هزینه در قبض خرید {2} در مقابل این حساب رزرو شده است., +Row {0}: From Warehouse is mandatory for internal transfers,ردیف {0}: از انبار برای نقل و انتقالات داخلی اجباری است, +Row {0}: Item Tax template updated as per validity and rate applied,ردیف {0}: الگوی مالیات آیتم بر اساس اعتبار و نرخ اعمال شده به روز شد, +Row {0}: Item rate has been updated as per valuation rate since its an internal stock transfer,ردیف {0}: نرخ اقلام براساس نرخ ارزیابی به‌روزرسانی شده است، زیرا یک انتقال داخلی موجودی است, +Row {0}: Item {1} must be a stock item.,ردیف {0}: مورد {1} باید یک کالای موجودی باشد., +Row {0}: Item {1} must be a subcontracted item.,ردیف {0}: مورد {1} باید یک آیتم قرارداد فرعی باشد., +Row {0}: Packed Qty must be equal to {1} Qty.,ردیف {0}: تعداد بسته بندی شده باید برابر با {1} تعداد باشد., +Row {0}: Packing Slip is already created for Item {1}.,ردیف {0}: برگه بسته بندی قبلاً برای مورد {1} ایجاد شده است., +Row {0}: Payment Term is mandatory,ردیف {0}: مدت پرداخت اجباری است, +Row {0}: Please provide a valid Delivery Note Item or Packed Item reference.,ردیف {0}: لطفاً یک مورد یادداشت تحویل معتبر یا مرجع کالای بسته بندی شده ارائه دهید., +Row {0}: Please select a BOM for Item {1}.,ردیف {0}: لطفاً یک BOM برای مورد {1} انتخاب کنید., +Row {0}: Please select an active BOM for Item {1}.,ردیف {0}: لطفاً یک BOM فعال برای مورد {1} انتخاب کنید., +Row {0}: Please select an valid BOM for Item {1}.,ردیف {0}: لطفاً یک BOM معتبر برای مورد {1} انتخاب کنید., +Row {0}: Project must be same as the one set in the Timesheet: {1}.,ردیف {0}: پروژه باید مانند آنچه در صفحه زمان تنظیم شده است: {1} باشد., +Row {0}: Purchase Invoice {1} has no stock impact.,ردیف {0}: فاکتور خرید {1} تأثیری بر موجودی ندارد., +Row {0}: Qty cannot be greater than {1} for the Item {2}.,ردیف {0}: تعداد نمی‌تواند بیشتر از {1} برای مورد {2} باشد., +Row {0}: Qty in Stock UOM can not be zero.,ردیف {0}: تعداد موجودی UOM در انبار نمی تواند صفر باشد., +Row {0}: Qty must be greater than 0.,ردیف {0}: تعداد باید بیشتر از 0 باشد., +Row {0}: Shift cannot be changed since the depreciation has already been processed,ردیف {0}: Shift را نمی توان تغییر داد زیرا استهلاک قبلاً پردازش شده است, +Row {0}: Target Warehouse is mandatory for internal transfers,ردیف {0}: انبار هدف برای نقل و انتقالات داخلی اجباری است, +"Row {0}: To set {1} periodicity, difference between from and to date must be greater than or equal to {2}",ردیف {0}: برای تنظیم تناوب {1}، تفاوت بین تاریخ و تاریخ باید بزرگتر یا مساوی با {2} باشد., +Row {0}: {1} account already applied for Accounting Dimension {2},ردیف {0}: حساب {1} قبلاً برای بعد حسابداری {2} اعمال شده است, +Row {0}: {1} {2} cannot be same as {3} (Party Account) {4},ردیف {0}: {1} {2} نمی‌تواند مانند {3} (حساب طرف) {4}, +Row({0}): Outstanding Amount cannot be greater than actual Outstanding Amount {1} in {2},ردیف ({0}): مبلغ معوق نمی تواند بیشتر از مبلغ معوقه واقعی {1} در {2} باشد., +Rows with Same Account heads will be merged on Ledger,ردیف هایی با سرهای حساب یکسان در دفتر کل ادغام می شوند, +Rows: {0} have 'Payment Entry' as reference_type. This should not be set manually.,"ردیف‌ها: {0} دارای ""ثبت پرداخت"" به عنوان reference_type هستند. این نباید به صورت دستی تنظیم شود.", +Rows: {0} in {1} section are Invalid. Reference Name should point to a valid Payment Entry or Journal Entry.,ردیف‌ها: {0} در بخش {1} نامعتبر است. نام مرجع باید به یک ثبت پرداخت معتبر یا ثبت دفتر روزنامه اشاره کند., +Run parallel job cards in a workstation,اجرای موازی کارت های در یک ایستگاه کاری, +Running,در حال اجرا, +SCO Supplied Item,مورد عرضه شده SCO, +SLA Fulfilled On,SLA تکمیل شد, +SLA Fulfilled On Status,SLA در وضعیت تکمیل شد, +SLA Paused On,SLA متوقف شد, +SLA will be applied if {1} is set as {2}{3},اگر {1} به عنوان {2}{3} تنظیم شود، SLA اعمال خواهد شد, +SLA will be applied on every {0},SLA در هر {0} اعمال خواهد شد, +SMS Settings,تنظیمات پیامک, +Salary Currency,ارز حقوق و دستمزد, +Sales Invoice {0} must be deleted before cancelling this Sales Order,فاکتور فروش {0} باید قبل از لغو این سفارش فروش حذف شود, +Sales Order Packed Item,سفارش فروش کالای بسته بندی شده, +Sales Order Reference,مرجع سفارش فروش, +Sales Order Status,وضعیت سفارش فروش, +"Sales Order {0} already exists against Customer's Purchase Order {1}. To allow multiple Sales Orders, Enable {2} in {3}",سفارش فروش {0} در مقابل سفارش خرید مشتری {1} وجود دارد. برای مجاز کردن چندین سفارش فروش، {2} را در {3} فعال کنید, +Sales Partner , شریک فروش, +Sales Partner Item,مورد شریک فروش, +Sales Pipeline Analytics,تجزیه و تحلیل خط لوله فروش, +Sales Update Frequency in Company and Project,فرکانس به روز رسانی فروش در شرکت و پروژه, +Sales Value,ارزش فروش, +Salvage Value Percentage,درصد ارزش نجات, +Same item and warehouse combination already entered.,همان کالا و ترکیب انبار قبلا وارد شده است., +Savings,پس انداز, +Scan Batch No,اسکن شماره دسته, +Scan Mode,حالت اسکن, +Scan Serial No,اسکن شماره سریال, +Scan barcode for item {0},اسکن بارکد برای مورد {0}, +"Scan mode enabled, existing quantity will not be fetched.",حالت اسکن فعال است، مقدار موجود واکشی نخواهد شد., +Scanned Quantity,مقدار اسکن شده, +Scheduled Time Logs,گزارش های زمان برنامه ریزی شده, +Scheduler is Inactive. Can't trigger job now.,زمان‌بند غیرفعال است. اکنون نمی توان کار را آغاز کرد., +Scheduler is Inactive. Can't trigger jobs now.,زمان‌بند غیرفعال است. اکنون نمی توان کارها را آغاز کرد., +Scheduler is inactive. Cannot enqueue job.,زمانبند غیرفعال است. نمی توان کار را در نوبت گذاشت., +Scheduler is inactive. Cannot merge accounts.,زمانبند غیرفعال است. نمی توان حساب ها را ادغام کرد., +Scheduling,برنامه ریزی, +Scrap & Process Loss,ضایعات و از دست دادن فرآیند, +Scrap Asset,دارایی قراضه, +Scrap Cost Per Qty,هزینه قراضه در هر تعداد, +Scrap Item Code,کد آیتم ضایعات, +Scrap Item Name,نام آیتم ضایعات, +"Search by item code, serial number or barcode",جستجو بر اساس کد آیتم، شماره سریال یا بارکد, +Secondary Party,طرف ثانویه, +Secondary Role,نقش ثانویه, +Segregate Serial / Batch Bundle,جداسازی باندل سریال / دسته, +Select Accounting Dimension.,بعد حسابداری را انتخاب کنید., +Select Alternative Items for Sales Order,آیتم‌های جایگزین را برای سفارش فروش انتخاب کنید, +Select Batch No,شماره دسته را انتخاب کنید, +Select Corrective Operation,عملیات اصلاحی را انتخاب کنید, +Select Date of Birth. This will validate Employees age and prevent hiring of under-age staff.,تاریخ تولد را انتخاب کنید. این امر سن کارکنان را تأیید می کند و از استخدام کارکنان زیر سن جلوگیری می کند., +"Select Date of joining. It will have impact on the first salary calculation, Leave allocation on pro-rata bases.",تاریخ عضویت را انتخاب کنید. در اولین محاسبه حقوق، تخصیص مرخصی به نسبت، تاثیر خواهد داشت., +Select Dimension,Dimension را انتخاب کنید, +Select Finished Good,Finished Good را انتخاب کنید, +Select Items for Quality Inspection,موارد را برای بازرسی کیفیت انتخاب کنید, +Select Serial No,شماره سریال را انتخاب کنید, +Select Serial and Batch,سریال و دسته را انتخاب کنید, +Select Time,زمان را انتخاب کنید, +Select Vouchers to Match,کوپن‌ها را برای مطابقت انتخاب کنید, +Select Warehouses to get Stock for Materials Planning,برای بدست آوردن انبار برای برنامه ریزی مواد، انبارها را انتخاب کنید, +Select a Company this Employee belongs to.,شرکتی را انتخاب کنید که این کارمند به آن تعلق دارد., +Select a Customer,یک مشتری انتخاب کنید, +Select an Item Group.,یک گروه آیتم را انتخاب کنید., +Select an item from each set to be used in the Sales Order.,از هر مجموعه یک مورد را برای استفاده در سفارش فروش انتخاب کنید., +Select the Default Workstation where the Operation will be performed. This will be fetched in BOMs and Work Orders.,ایستگاه کاری پیش‌فرض را که در آن عملیات انجام می‌شود، انتخاب کنید. این در BOM ها و دستور کارها واکشی می شود., +Select the Item to be manufactured.,موردی را که باید تولید شود انتخاب کنید., +"Select the Item to be manufactured. The Item name, UoM, Company, and Currency will be fetched automatically.",موردی را که باید تولید شود انتخاب کنید. نام مورد، UoM، شرکت و ارز به طور خودکار واکشی می شود., +Select the Warehouse,انبار را انتخاب کنید, +Select the date and your timezone,تاریخ و منطقه زمانی خود را انتخاب کنید, +Select the raw materials (Items) required to manufacture the Item,مواد خام (آیتم‌ها) مورد نیاز برای تولید آیتم را انتخاب کنید, +Select your weekly off day,روز تعطیل هفتگی خود را انتخاب کنید, +Selected Vouchers,کوپن های انتخاب شده, +Selected date is,تاریخ انتخاب شده است, +Selected document must be in submitted state,سند انتخاب شده باید در حالت ارسال شده باشد, +Self delivery,تحویل خود, +Sell Asset,فروش دارایی, +Send Attached Files,ارسال فایل های پیوست, +Send Document Print,ارسال سند چاپ, +Send Emails,ارسال ایمیل, +Sequential,متوالی, +Serial & Batch Item,آیتم سریال و دسته ای, +Serial & Batch Item Settings,تنظیمات آیتم سریال و دسته ای, +Serial / Batch Bundle,باندل سریال / دسته, +Serial / Batch Bundle Missing,باندل سریال / دسته جا افتاده, +Serial / Batch No,شماره سریال / دسته, +Serial / Batch Nos,شماره های سریال / دسته ای, +Serial No Ledger,دفتر کل شماره سریال, +Serial No Range,محدوده شماره سریال, +Serial No and Batch for Finished Good,شماره سریال و دسته ای برای Finished Good, +Serial No is mandatory,شماره سریال اجباری است, +Serial No {0} already exists,شماره سریال {0} از قبل وجود دارد, +Serial No {0} already scanned,شماره سریال {0} قبلاً اسکن شده است, +Serial No {0} does not exists,شماره سریال {0} وجود ندارد, +Serial No {0} is already added,شماره سریال {0} قبلاً اضافه شده است, +Serial Nos,شماره های سریال, +Serial Nos / Batch Nos,شماره های سریال / شماره های دسته ای, +Serial Nos Mismatch,عدم تطابق شماره های سریال, +Serial Nos are created successfully,شماره های سریال با موفقیت ایجاد شد, +"Serial Nos are reserved in Stock Reservation Entries, you need to unreserve them before proceeding.",شماره های سریال در ورودی های رزرو موجودی رزرو شده اند، قبل از ادامه باید آنها را لغو رزرو کنید., +Serial and Batch,سریال و دسته, +Serial and Batch Bundle,باندل سریال و دسته, +Serial and Batch Bundle created,باندل سریال و دسته ایجاد شد, +Serial and Batch Bundle updated,باندل سریال و دسته به روز شد, +Serial and Batch Details,جزئیات سریال و دسته, +Serial and Batch Entry,ثبت سریال و دسته, +Serial and Batch No,شماره سریال و دسته, +Serial and Batch Nos,شماره سریال و دسته, +Serial and Batch Nos will be auto-reserved based on Pick Serial / Batch Based On,شماره های سریال و دسته بر اساس انتخاب سریال / دسته بر اساس به صورت خودکار رزرو می شوند, +Serial and Batch Reservation,رزرو سریال و دسته, +Serial and Batch Summary,خلاصه سریال و دسته ای, +Service Cost Per Qty,هزینه خدمات در هر تعداد, +Service Expense Total Amount,هزینه خدمات کل مبلغ, +Service Expenses,هزینه های خدمات, +Service Item,آیتم خدمات, +Service Item Qty,تعداد مورد خدمات, +Service Item Qty / Finished Good Qty,تعداد آیتم خدمات / تعداد کالای تمام شده, +Service Item UOM,مورد خدمات UOM, +Service Item {0} is disabled.,مورد سرویس {0} غیرفعال است., +Service Item {0} must be a non-stock item.,مورد سرویس {0} باید یک کالای غیر موجودی باشد., +Service Items,آیتم‌های خدماتی, +Service Level Agreement for {0} {1} already exists.,قرارداد سطح سرویس برای {0} {1} از قبل وجود دارد., +Service Level Name,نام سطح خدمات, +Service Provider,ارائه دهنده خدمات, +Set Default Supplier,تامین کننده پیش فرض را تنظیم کنید, +Set From Warehouse,مجموعه از انبار, +Set Landed Cost Based on Purchase Invoice Rate,تنظیم هزینه تمام شده تا درب انبار بر اساس نرخ فاکتور خرید, +Set Loyalty Program,تنظیم برنامه وفاداری, +Set Operating Cost / Scrape Items From Sub-assemblies,تنظیم هزینه عملیاتی / آیتم‌های ضایعات از زیر مونتاژها, +Set Operating Cost Based On BOM Quantity,هزینه عملیاتی را بر اساس مقدار BOM تنظیم کنید, +Set Process Loss Item Quantity,مقدار مورد از دست دادن فرآیند را تنظیم کنید, +Set Project Status,تنظیم وضعیت پروژه, +Set Quantity,تنظیم مقدار, +Set Response Time for Priority {0} in row {1}.,زمان پاسخ را برای اولویت {0} در ردیف {1} تنظیم کنید., +Set Valuation Rate Based on Source Warehouse,نرخ ارزش گذاری را بر اساس انبار منبع تنظیم کنید, +Set Warehouse,مجموعه انبار, +Set default {0} account for non stock items,تنظیم حساب پیش‌فرض {0} را برای آیتم‌های غیر موجودی, +Set fieldname from which you want to fetch the data from the parent form.,نام فیلدی را که می‌خواهید داده‌ها را از فرم والد دریافت کنید، تنظیم کنید., +Set quantity of process loss item:,تنظیم مقدار مورد از دست دادن فرآیند:, +Set the Planned Start Date (an Estimated Date at which you want the Production to begin),تاریخ شروع برنامه ریزی شده را تنظیم کنید (تاریخ تخمینی که در آن می خواهید تولید شروع شود), +Set the status manually.,وضعیت را به صورت دستی تنظیم کنید., +Set {0} in asset category {1} for company {2},تنظیم {0} در دسته دارایی {1} برای شرکت {2}, +Sets 'Accepted Warehouse' in each row of the Items table.,انبار پذیرفته شده را در هر ردیف از جدول آیتم ها تنظیم می کند., +Sets 'Rejected Warehouse' in each row of the Items table.,انبار مرجوعی را در هر ردیف از جدول آیتم ها تنظیم می کند., +Sets 'Reserve Warehouse' in each row of the Supplied Items table.,انبار ذخیره را در هر ردیف از جدول اقلام عرضه شده تنظیم می کند., +Setting Item Locations...,تنظیم مکان مورد..., +Setting the account as a Company Account is necessary for Bank Reconciliation,تنظیم حساب به عنوان حساب شرکت برای تسویه حساب بانکی ضروری است, +Setting {} is required,تنظیم {} مورد نیاز است, +Setup your organization,سازمان خود را راه‌اندازی کنید, +Shift,تغییر مکان, +Shift Factor,ضریب تغییر, +Shift Name,نام شیفت, +Shipment,حمل و نقل, +Shipment Amount,مبلغ حمل و نقل, +Shipment Delivery Note,یادداشت تحویل حمل و نقل, +Shipment ID,شناسه حمل و نقل, +Shipment Information,اطلاعات حمل و نقل, +Shipment Parcel,بسته حمل و نقل, +Shipment Parcel Template,قالب بسته حمل و نقل, +Shipment Type,نوع حمل و نقل, +Shipment details,جزئیات حمل و نقل, +Shipping Address Details,جزئیات آدرس حمل و نقل, +Shipping Address Template,الگوی آدرس حمل و نقل, +Show Balances in Chart Of Accounts,نمایش موجودی در نمودار حساب, +Show Barcode Field in Stock Transactions,نمایش فیلد بارکد در معاملات موجودی, +Show Dimension Wise Stock,نمایش موجودی بر اساس ابعاد, +Show Disabled Warehouses,نمایش انبارهای غیرفعال, +Show Failed Logs,نمایش لاگ های ناموفق, +Show GL Balance,نمایش تراز دفتر کل, +Show Item Name,نمایش نام آیتم, +Show Ledger View,نمایش نمای دفتر کل, +Show Net Values in Party Account,نمایش ارزش خالص در حساب طرف, +Show Pay Button in Purchase Order Portal,نمایش دکمه پرداخت در پورتال سفارش خرید, +Show Preview,نمایش پیش نمایش, +Show Remarks,نمایش اظهارات, +Show Taxes as Table in Print,نمایش مالیات به عنوان جدول در چاپ, +Show net values in opening and closing columns,نمایش مقادیر خالص در ستون افتتاحیه و اختتامیه, +Show only the Immediate Upcoming Term,فقط عبارت فوری آینده را نشان دهید, +Show pending entries,نمایش ورودی های معلق, +Show with upcoming revenue/expense,نمایش با درآمد/هزینه آتی, +"Simple Python Expression, Example: doc.status == 'Open' and doc.issue_type == 'Bug'",عبارت ساده پایتون، مثال: doc.status == 'Open' و doc.issue_type == 'Bug', +Simultaneous,همزمان, +Skip Available Sub Assembly Items,صرف نظر از آیتم‌های زیر مونتاژ موجود, +Skipped,رد شد, +Skipping Tax Withholding Category {0} as there is no associated account set for Company {1} in it.,رد شدن از دسته مالیات کسر مالیات {0} زیرا هیچ حساب مرتبطی برای شرکت {1} در آن تنظیم نشده است., +"Skipping {0} of {1}, {2}",پرش از {0} از {1}، {2}, +Sold by,فروخته شده توسط, +Something went wrong please try again,اشتباهی رخ داده لطفا دوباره تلاش کنید, +Source Exchange Rate,نرخ مبادله منبع, +Source Fieldname,نام فیلد منبع, +South Africa VAT Account,حساب مالیات بر ارزش افزوده آفریقای جنوبی, +South Africa VAT Settings,تنظیمات مالیات بر ارزش افزوده آفریقای جنوبی, +Spacer,اسپیسر, +Split Asset,تقسیم دارایی, +Split Early Payment Discount Loss into Income and Tax Loss,زیان تخفیف پرداخت زودهنگام را به درآمد و ضرر مالیات تقسیم کنید, +Split From,تقسیم از, +Split Qty,تقسیم تعداد, +Split qty cannot be grater than or equal to asset qty,مقدار تقسیم نمی‌تواند بیشتر یا مساوی تعداد دارایی باشد, +Splitting {0} {1} into {2} rows as per Payment Terms,تقسیم {0} {1} به ردیف‌های {2} طبق شرایط پرداخت, +Stage,صحنه, +Stale Days should start from 1.,روزهای قدیمی باید از 1 شروع شود., +Standard Description,شرح استاندارد, +Standard Rated Expenses,هزینه های رتبه بندی استاندارد, +"Standard Terms and Conditions that can be added to Sales and Purchases. Examples: Validity of the offer, Payment Terms, Safety and Usage, etc.",شرایط و ضوابط استاندارد که می تواند به خرید و فروش اضافه شود. مثال: اعتبار پیشنهاد، شرایط پرداخت، ایمنی و استفاده و غیره., +Standard rated supplies in {0},منابع دارای رتبه استاندارد در {0}, +Start / Resume,شروع / از سرگیری, +Start Date should be lower than End Date,تاریخ شروع باید کمتر از تاریخ پایان باشد, +Start Deletion,شروع حذف, +Start Import,شروع درون‌بُرد, +Start Job,شروع کار, +Start Merge,ادغام را شروع کنید, +Start Reposting,بازنشر را شروع کنید, +Start Time can't be greater than or equal to End Time for {0}.,زمان شروع نمی تواند بزرگتر یا مساوی با زمان پایان برای {0} باشد., +Started a background job to create {1} {0},یک کار پس‌زمینه برای ایجاد {1} {0} شروع کرد, +Status Details,جزئیات وضعیت, +Status Illustration,مصور سازی وضعیت, +Status set to rejected as there are one or more rejected readings.,وضعیت رد شد زیرا یک یا چند قرائت رد شده وجود دارد., +Stock Closing,اختتامیه موجودی, +Stock Consumed During Repair,موجودی مصرف شده در حین تعمیر, +Stock Consumption Details,جزئیات مصرف موجودی, +Stock Entries already created for Work Order {0}: {1},ثبت های موجودی قبلاً برای دستور کار {0} ایجاد شده‌اند: {1}, +Stock Ledger Invariant Check,چک ثابت دفتر کل موجودی, +Stock Ledger Variance,واریانس دفتر کل موجودی, +Stock Movement,جابه‌جایی موجودی, +Stock Planning,برنامه ریزی موجودی, +Stock Reposting Settings,تنظیمات ارسال مجدد موجودی, +Stock Reservation,رزرو موجودی, +Stock Reservation Entries Cancelled,ورودی های رزرو موجودی لغو شد, +Stock Reservation Entries Created,نوشته های رزرو موجودی ایجاد شد, +Stock Reservation Entry,ثبت رزرو موجودی, +Stock Reservation Entry cannot be updated as it has been delivered.,ورودی رزرو موجودی را نمی توان به دلیل تحویل گرفتن به روز کرد., +"Stock Reservation Entry created against a Pick List cannot be updated. If you need to make changes, we recommend canceling the existing entry and creating a new one.",ثبت رزرو موجودی ایجاد شده در برابر فهرست انتخابی نمی تواند به روز شود. اگر نیاز به ایجاد تغییرات دارید، توصیه می کنیم ثبت موجود را لغو کنید و یک ثبت جدید ایجاد کنید., +Stock Reservation Warehouse Mismatch,عدم تطابق انبار رزرو انبار, +Stock Reservation can only be created against {0}.,رزرو موجودی فقط می تواند در مقابل {0} ایجاد شود., +Stock Reserved Qty (in Stock UOM),تعداد موجودی رزرو شده (در انبار UOM), +Stock Transactions Settings,تنظیمات معاملات موجودی, +Stock UOM Quantity,مقدار موجودی UOM, +Stock Unreservation,عدم رزرو موجودی, +Stock Validations,اعتبارسنجی موجودی, +Stock cannot be reserved in group warehouse {0}.,موجودی در انبار گروهی {0} قابل رزرو نیست., +Stock cannot be reserved in the group warehouse {0}.,موجودی در انبار گروهی {0} قابل رزرو نیست., +Stock not available for Item {0} in Warehouse {1}.,موجودی برای کالای {0} در انبار {1} موجود نیست., +Stock quantity not enough for Item Code: {0} under warehouse {1}. Available quantity {2} {3}.,مقدار موجودی برای کد مورد کافی نیست: {0} در انبار {1}. مقدار موجود {2} {3}., +Stock transactions that are older than the mentioned days cannot be modified.,معاملات موجودی با قدمت بیشتر از روزهای مذکور قابل تغییر نمی باشد., +Stock/Accounts can not be frozen as processing of backdated entries is going on. Please try again later.,موجودی/حساب‌ها را نمی‌توان مسدود کرد زیرا پردازش ورودی‌های به‌تاریخ در حال انجام است. لطفاً بعداً دوباره امتحان کنید., +Sub Assemblies & Raw Materials,زیر مونتاژها و مواد اولیه, +Sub Assembly Item,آیتم زیر مونتاژ, +Sub Assembly Item Code,کد آیتم‌های زیر مونتاژ, +Sub Assembly Items,آیتم‌های زیر مونتاژ, +Sub Assembly Warehouse,انبار زیر مونتاژ, +Sub Operation,عملیات فرعی, +Sub Operations,عملیات فرعی, +Subcontract BOM,قرارداد فرعی BOM, +Subcontract Order,سفارش قرارداد فرعی, +Subcontract Order Summary,خلاصه سفارش قرارداد فرعی, +Subcontract Return,بازگشت قرارداد فرعی, +Subcontracting BOM,پیمانکاری فرعی BOM, +Subcontracting Order,سفارش پیمانکاری فرعی, +Subcontracting Order (Draft) will be auto-created on submission of Purchase Order.,سفارش پیمانکاری فرعی (پیش نویس) با ارسال سفارش خرید به صورت خودکار ایجاد می شود., +Subcontracting Order Item,مورد سفارش پیمانکاری فرعی, +Subcontracting Order Service Item,آیتم خدمات سفارش قرارداد فرعی, +Subcontracting Order Supplied Item,اقلام عرضه شده سفارش پیمانکاری فرعی, +Subcontracting Order {0} created.,سفارش قرارداد فرعی {0} ایجاد شد., +Subcontracting Purchase Order,سفارش خرید پیمانکاری فرعی, +Subcontracting Receipt,رسید پیمانکاری فرعی, +Subcontracting Receipt Item,آیتم رسید پیمانکاری, +Subcontracting Receipt Supplied Item,آیتم عرضه شده رسید پیمانکاری فرعی, +Subcontracting Settings,تنظیمات پیمانکاری فرعی, +Subdivision,زیر مجموعه, +Submit Action Failed,اقدام ارسال نشد, +Submit After Import,ارسال پس از درون‌بُرد, +Submit ERR Journals?,دفترهای روزنامه ERR ارسال شود؟, +Submit Generated Invoices,فاکتورهای تولید شده را ارسال کنید, +Succeeded,موفق شد, +Succeeded Entries,ورودی های موفق, +"Successfully changed Stock UOM, please redefine conversion factors for new UOM.",UOM موجودی با موفقیت تغییر کرد، لطفاً فاکتورهای تبدیل را برای UOM جدید دوباره تعریف کنید., +Successfully imported {0},{0} با موفقیت درون‌بُرد شد, +"Successfully imported {0} record out of {1}. Click on Export Errored Rows, fix the errors and import again.",{0} رکورد از {1} با موفقیت درون‌بُرد شد. روی Export Errored Rows کلیک کنید، خطاها را برطرف کرده و دوباره وارد کنید., +Successfully imported {0} record.,{0} رکورد با موفقیت درون‌بُرد شد., +"Successfully imported {0} records out of {1}. Click on Export Errored Rows, fix the errors and import again.",{0} رکورد از {1} با موفقیت درون‌بُرد شد. روی Export Errored Rows کلیک کنید، خطاها را برطرف کرده و دوباره وارد کنید., +Successfully imported {0} records.,{0} رکورد با موفقیت درون‌بُرد شد., +Successfully linked to Customer,با موفقیت به مشتری پیوند داده شد, +Successfully linked to Supplier,با موفقیت به تامین کننده پیوند داده شد, +Successfully merged {0} out of {1}.,{0} از {1} با موفقیت ادغام شد., +Successfully updated {0},با موفقیت به روز شد {0}, +"Successfully updated {0} record out of {1}. Click on Export Errored Rows, fix the errors and import again.",{0} رکورد از {1} با موفقیت به روز شد. روی Export Errored Rows کلیک کنید، خطاها را برطرف کرده و دوباره وارد کنید., +Successfully updated {0} record.,رکورد {0} با موفقیت به روز شد., +"Successfully updated {0} records out of {1}. Click on Export Errored Rows, fix the errors and import again.",{0} رکورد از {1} با موفقیت به روز شد. روی Export Errored Rows کلیک کنید، خطاها را برطرف کرده و دوباره وارد کنید., +Successfully updated {0} records.,رکورد {0} با موفقیت به روز شد., +Sum of Repair Cost and Value of Consumed Stock Items.,مجموع هزینه تعمیر و ارزش آیتم‌های موجودی مصرف شده., +Supplied Item,مورد عرضه شده, +Supplier Address Details,جزئیات آدرس تامین کننده, +Supplier Contact,تماس با تامین کننده, +Supplier Group Item,مورد گروه تامین کننده, +Supplier Info,اطلاعات تامین کننده, +Supplier Invoice,فاکتور تامین کننده, +Supplier Item,مورد تامین کننده, +Supplier Portal Users,کاربران پورتال تامین کننده, +Supplier Primary Address,آدرس اصلی تامین کننده, +Supplier Primary Contact,تماس اصلی تامین کننده, +Supplier Warehouse mandatory for sub-contracted {0},انبار تامین کننده برای قراردادهای فرعی {0} اجباری است, +Supplies subject to the reverse charge provision,لوازم مشمول ارائه شارژ معکوس, +Sync Now,اکنون همگام سازی کنید, +Sync Started,همگام سازی شروع شد, +System Settings,تنظیمات سیستم, +System will automatically create the serial numbers / batch for the Finished Good on submission of work order,سیستم به طور خودکار شماره سریال / دسته ای را برای کالای تمام شده در هنگام ارسال سفارش ایجاد می کند, +System will not check over billing since amount for Item {0} in {1} is zero,سیستم صورتحساب را بررسی نمی‌کند زیرا مبلغ مورد {0} در {1} صفر است, +TDS Payable,TDS قابل پرداخت, +Target Asset,دارایی هدف, +Target Asset Location,مکان دارایی مورد نظر, +Target Asset {0} cannot be cancelled,دارایی هدف {0} قابل لغو نیست, +Target Asset {0} cannot be submitted,دارایی هدف {0} قابل ارسال نیست, +Target Asset {0} cannot be {1},دارایی هدف {0} نمی تواند {1} باشد, +Target Asset {0} does not belong to company {1},دارایی هدف {0} به شرکت {1} تعلق ندارد, +Target Asset {0} needs to be composite asset,دارایی هدف {0} باید دارایی ترکیبی باشد, +Target Batch No,شماره دسته هدف, +Target Exchange Rate,نرخ ارز هدف, +Target Fieldname (Stock Ledger Entry),نام فیلد هدف (ثبت دفتر کل موجودی), +Target Fixed Asset Account,حساب دارایی ثابت هدف, +Target Has Batch No,هدف دارای Batch No, +Target Has Serial No,هدف دارای شماره سریال, +Target Incoming Rate,نرخ ورودی هدف, +Target Is Fixed Asset,هدف دارایی ثابت است, +Target Item Code,کد آیتم هدف, +Target Item Name,نام آیتم هدف, +Target Item {0} is neither a Fixed Asset nor a Stock Item,مورد هدف {0} نه یک دارایی ثابت است و نه یک کالای موجودی, +Target Item {0} must be a Fixed Asset item,مورد هدف {0} باید یک مورد دارایی ثابت باشد, +Target Item {0} must be a Stock Item,مورد هدف {0} باید یک مورد موجودی باشد, +Target Qty must be a positive number,تعداد هدف باید یک عدد مثبت باشد, +Target Serial No,شماره سریال هدف, +Target Warehouse is mandatory for Decapitalization,انبار هدف برای کاهش سرمایه اجباری است, +Target Warehouse is set for some items but the customer is not an internal customer.,انبار هدف برای برخی آیتم‌ها تنظیم شده است اما مشتری، یک مشتری داخلی نیست., +Task {0} depends on Task {1}. Please add Task {1} to the Tasks list.,وظیفه {0} به وظیفه {1} بستگی دارد. لطفاً وظیفه {1} را به لیست وظایف اضافه کنید., +Tax Amount,مقدار مالیات, +Tax Amount will be rounded on a row(items) level,مقدار مالیات در سطح ردیف (آیتم‌ها) گرد می شود, +Tax Refunds provided to Tourists under the Tax Refunds for Tourists Scheme,بازپرداخت مالیات بر اساس طرح بازپرداخت مالیات برای گردشگران به گردشگران ارائه می شود, +Tax Settings,تنظیمات مالیاتی, +Tax Withheld Vouchers,کوپن های مالیاتی کسر شده, +Tax Withholding Category {} against Company {} for Customer {} should have Cumulative Threshold value.,رده مالیاتی {} در برابر شرکت {} برای مشتری {} باید مقدار آستانه تجمعی داشته باشد., +Tax Withholding Details,جزئیات کسر مالیات, +Tax Withholding Net Total,کل خالص کسر مالیات, +Tax will be withheld only for amount exceeding the cumulative threshold,مالیات فقط برای مبلغی که بیش از آستانه تجمعی باشد، کسر خواهد شد, +Team,تیم, +Telephony Call Type,نوع تماس تلفنی, +Template Item Selected,آیتم الگو انتخاب شد, +Template Options,گزینه های الگو, +Template Task,وظیفه الگو, +Template Warnings,هشدارهای الگو, +Terms & Conditions,شرایط و ضوابط, +Terms Template,الگوی شرایط, +Territory Item,قلمرو مورد, +Territory Wise Sales,فروش از نظر منطقه, +The Condition '{0}' is invalid,"شرط ""{0}"" نامعتبر است", +The Document Type {0} must have a Status field to configure Service Level Agreement,نوع سند {0} باید دارای یک فیلد وضعیت برای پیکربندی قرارداد سطح سرویس باشد, +"The GL Entries will be cancelled in the background, it can take a few minutes.",ورودی‌های دفتر کل در پس‌زمینه لغو می‌شوند، ممکن است چند دقیقه طول بکشد., +"The Payment Request {0} is already paid, cannot process payment twice",درخواست پرداخت {0} قبلاً پرداخت شده است، نمی‌توان پرداخت را دو بار پردازش کرد, +"The Pick List having Stock Reservation Entries cannot be updated. If you need to make changes, we recommend canceling the existing Stock Reservation Entries before updating the Pick List.",فهرست انتخابی دارای ورودی های رزرو موجودی نمی تواند به روز شود. اگر نیاز به ایجاد تغییرات دارید، توصیه می‌کنیم قبل از به‌روزرسانی فهرست انتخاب، ورودی‌های رزرو موجودی را لغو کنید., +The Process Loss Qty has reset as per job cards Process Loss Qty,Process Loss Qty مطابق با کارت کارهای Process Loss Ty بازنشانی شده است, +The currency of invoice {} ({}) is different from the currency of this dunning ({}).,واحد پول فاکتور {} ({}) با واحد پول این دونینگ ({}) متفاوت است., +The default BOM for that item will be fetched by the system. You can also change the BOM.,BOM پیش‌فرض برای آن مورد توسط سیستم واکشی می‌شود. شما همچنین می توانید BOM را تغییر دهید., +The field {0} in row {1} is not set,فیلد {0} در ردیف {1} تنظیم نشده است, +"The following Items, having Putaway Rules, could not be accomodated:",موارد زیر که دارای قوانین Putaway هستند، قابل استفاده نیستند:, +The following assets have failed to automatically post depreciation entries: {0},دارایی های زیر به طور خودکار ورودی های استهلاک را پست نکرده اند: {0}, +The items {0} and {1} are present in the following {2} :,موارد {0} و {1} در {2} زیر موجود هستند:, +The operation {0} can not add multiple times,عملیات {0} نمی تواند چندین بار اضافه کند, +The operation {0} can not be the sub operation,عملیات {0} نمی تواند عملیات فرعی باشد, +The reserved stock will be released when you update items. Are you certain you wish to proceed?,با به‌روزرسانی موارد، موجودی رزرو شده آزاد می‌شود. آیا مطمئن هستید که می خواهید ادامه دهید؟, +The reserved stock will be released. Are you certain you wish to proceed?,موجودی رزرو شده آزاد خواهد شد. آیا مطمئن هستید که می خواهید ادامه دهید؟, +The selected {0} does not contain the selected Asset Item.,{0} انتخاب شده حاوی مورد دارایی انتخابی نیست., +"The stock has been reserved for the following Items and Warehouses, un-reserve the same to {0} the Stock Reconciliation:

{1}",موجودی برای اقلام و انبارهای زیر رزرو شده است، همان را در {0} تطبیق موجودی لغو کنید:

{1}, +"The sync has started in the background, please check the {0} list for new records.",همگام سازی در پس زمینه شروع شده است، لطفاً لیست {0} را برای رکوردهای جدید بررسی کنید., +"The task has been enqueued as a background job. In case there is any issue on processing in background, the system will add a comment about the error on this Stock Reconciliation and revert to the Submitted stage",وظیفه به عنوان یک کار پس زمینه در نوبت قرار گرفته است. در صورت وجود هرگونه مشکل در پردازش در پس‌زمینه، سیستم نظری در مورد خطا در این تطبیق موجودی اضافه می‌کند و به مرحله ارسال باز می‌گردد., +The total Issue / Transfer quantity {0} in Material Request {1} cannot be greater than allowed requested quantity {2} for Item {3},مجموع مقدار حواله / انتقال {0} در درخواست مواد {1} نمی تواند بیشتر از مقدار مجاز درخواستی {2} برای آیتم {3} باشد, +The total Issue / Transfer quantity {0} in Material Request {1} cannot be greater than requested quantity {2} for Item {3},مجموع مقدار حواله / انتقال {0} در درخواست مواد {1} نمی تواند بیشتر از مقدار درخواستی {2} برای آیتم {3} باشد, +"The users with this Role are allowed to create/modify a stock transaction, even though the transaction is frozen.",کاربران دارای این نقش مجاز به ایجاد/تغییر تراکنش موجودی هستند، حتی اگر تراکنش مسدود شده باشد., +The warehouse where you store finished Items before they are shipped.,انباری که اقلام تمام شده را قبل از ارسال در آن ذخیره می کنید., +"The warehouse where you store your raw materials. Each required item can have a separate source warehouse. Group warehouse also can be selected as source warehouse. On submission of the Work Order, the raw materials will be reserved in these warehouses for production usage.",انباری که مواد اولیه خود را در آن نگهداری می کنید. هر کالای مورد نیاز می تواند یک انبار منبع جداگانه داشته باشد. انبار گروهی نیز می تواند به عنوان انبار منبع انتخاب شود. پس از ارسال دستور کار، مواد اولیه در این انبارها برای استفاده تولید رزرو می شود., +The warehouse where your Items will be transferred when you begin production. Group Warehouse can also be selected as a Work in Progress warehouse.,انباری که هنگام شروع تولید، اقلام شما در آن منتقل می شوند. انبار گروهی همچنین می تواند به عنوان انبار Work in Progress انتخاب شود., +The {0} {1} is used to calculate the valuation cost for the finished good {2}.,{0} {1} برای محاسبه هزینه ارزیابی کالای نهایی {2} استفاده می‌شود., +There are no Failed transactions,هیچ تراکنش ناموفقی وجود ندارد, +There are no slots available on this date,هیچ اسلاتی در این تاریخ موجود نیست, +There are only {0} asset created or linked to {1}. Please create or link {2} Assets with respective document.,فقط {0} دارایی ایجاد شده یا به {1} پیوند داده شده است. لطفاً {2} دارایی ها را با سند مربوطه ایجاد یا پیوند دهید., +"There are two options to maintain valuation of stock. FIFO (first in - first out) and Moving Average. To understand this topic in detail please visit Item Valuation, FIFO and Moving Average.",دو گزینه برای حفظ ارزش موجودی وجود دارد. FIFO (اولین ورود - اولین خروج) و میانگین متحرک. برای درک جزئیات این موضوع، لطفاً از هدف ارزش اقلام، FIFO و میانگین متحرک., +There aren't any item variants for the selected item,هیچ گونه آیتمی برای آیتم انتخابی وجود ندارد, +There is already a valid Lower Deduction Certificate {0} for Supplier {1} against category {2} for this time period.,در حال حاضر یک گواهی کسر کمتر معتبر {0} برای تامین کننده {1} در برابر دسته {2} برای این دوره زمانی وجود دارد., +There is already an active Subcontracting BOM {0} for the Finished Good {1}.,در حال حاضر یک BOM قرارداد فرعی فعال {0} برای کالای نهایی {1} وجود دارد., +There must be atleast 1 Finished Good in this Stock Entry,باید حداقل 1 کالای تمام شده در این ثبت موجودی وجود داشته باشد, +There was an error creating Bank Account while linking with Plaid.,هنگام پیوند با Plaid خطایی در ایجاد حساب بانکی روی داد., +There was an error syncing transactions.,هنگام همگام‌سازی تراکنش‌ها خطایی روی داد., +There was an error updating Bank Account {} while linking with Plaid.,هنگام به‌روزرسانی حساب بانکی {} هنگام پیوند با Plaid خطایی روی داد., +There was an issue connecting to Plaid's authentication server. Check browser console for more information,مشکلی در اتصال به سرور تأیید اعتبار Plaid وجود داشت. برای اطلاعات بیشتر کنسول مرورگر را بررسی کنید, +There were issues unlinking payment entry {0}.,مشکلاتی در قطع پیوند ثبت پرداخت {0} وجود داشت., +This Account has '0' balance in either Base Currency or Account Currency,این حساب دارای موجودی '0' به ارز پایه یا ارز حساب است, +This field is used to set the 'Customer'.,"این فیلد برای تنظیم ""مشتری"" استفاده می شود.", +This filter will be applied to Journal Entry.,این فیلتر برای ثبت دفتر روزنامه اعمال خواهد شد., +This is a Template BOM and will be used to make the work order for {0} of the item {1},این یک الگوی BOM است و برای ایجاد دستور کار برای {0} مورد {1} استفاده خواهد شد., +This is considered dangerous from accounting point of view.,این از نظر حسابداری خطرناک تلقی می شود., +"This is enabled by default. If you want to plan materials for sub-assemblies of the Item you're manufacturing leave this enabled. If you plan and manufacture the sub-assemblies separately, you can disable this checkbox.",این به طور پیش فرض فعال است. اگر می‌خواهید مواد را برای زیر مونتاژ های آیتمی که در حال تولید آن هستید برنامه‌ریزی کنید، این گزینه را فعال کنید. اگر زیر مونتاژ ها را جداگانه برنامه ریزی و تولید می کنید، می توانید این چک باکس را غیرفعال کنید., +"This is for raw material Items that'll be used to create finished goods. If the Item is an additional service like 'washing' that'll be used in the BOM, keep this unchecked.","این برای اقلام مواد خام است که برای ایجاد کالاهای نهایی استفاده می شود. اگر مورد یک سرویس اضافی مانند ""شستن"" است که در BOM استفاده می شود، این مورد را علامت نزنید.", +This item filter has already been applied for the {0},این فیلتر مورد قبلاً برای {0} اعمال شده است, +This option can be checked to edit the 'Posting Date' and 'Posting Time' fields.,این گزینه برای ویرایش فیلدهای «تاریخ ارسال» و «زمان ارسال» قابل بررسی است., +This schedule was created when Asset {0} was adjusted through Asset Value Adjustment {1}.,این برنامه زمانی ایجاد شد که دارایی {0} از طریق تعدیل ارزش دارایی {1} تنظیم شد., +This schedule was created when Asset {0} was consumed through Asset Capitalization {1}.,این برنامه زمانی ایجاد شد که دارایی {0} از طریق سرمایه گذاری دارایی {1} مصرف شد., +This schedule was created when Asset {0} was repaired through Asset Repair {1}.,این برنامه زمانی ایجاد شد که دارایی {0} از طریق تعمیر دارایی {1} تعمیر شد., +This schedule was created when Asset {0} was restored on Asset Capitalization {1}'s cancellation.,این برنامه زمانی ایجاد شد که دارایی {0} در لغو دارایی با حروف بزرگ {1} بازیابی شد., +This schedule was created when Asset {0} was restored.,این برنامه زمانی ایجاد شد که دارایی {0} بازیابی شد., +This schedule was created when Asset {0} was returned through Sales Invoice {1}.,این برنامه زمانی ایجاد شد که دارایی {0} از طریق فاکتور فروش {1} برگردانده شد., +This schedule was created when Asset {0} was scrapped.,این برنامه زمانی ایجاد شد که دارایی {0} لغو شد., +This schedule was created when Asset {0} was sold through Sales Invoice {1}.,این برنامه زمانی ایجاد شد که دارایی {0} از طریق فاکتور فروش {1} فروخته شد., +This schedule was created when Asset {0} was updated after being split into new Asset {1}.,این برنامه زمانی ایجاد شد که دارایی {0} پس از تقسیم به دارایی جدید {1} به روز شد., +This schedule was created when Asset {0}'s Asset Repair {1} was cancelled.,این برنامه زمانی ایجاد شد که تعمیر دارایی {0} {1} لغو شد., +This schedule was created when Asset {0}'s Asset Value Adjustment {1} was cancelled.,این برنامه زمانی ایجاد شد که تعدیل ارزش دارایی {0} {1} لغو شد., +This schedule was created when Asset {0}'s shifts were adjusted through Asset Shift Allocation {1}.,این برنامه زمانی ایجاد شد که تغییرات دارایی {0} از طریق تخصیص تغییر دارایی {1} تنظیم شد., +This schedule was created when new Asset {0} was split from Asset {1}.,این برنامه زمانی ایجاد شد که دارایی جدید {0} از دارایی {1} جدا شد., +"This table is used to set details about the 'Item', 'Qty', 'Basic Rate', etc.","این جدول برای تنظیم جزئیات مربوط به ""آیتم""، ""مقدار""، ""نرخ پایه"" و غیره استفاده می شود.", +This {} will be treated as material transfer.,این {} به عنوان انتقال مواد در نظر گرفته می شود., +Threshold for Suggestion (In Percentage),آستانه پیشنهاد (در درصد), +Time Taken to Deliver,زمان صرف شده برای تحویل, +Time in mins,زمان به دقیقه, +Time in mins.,زمان به دقیقه., +Time slot is not available,بازه زمانی در دسترس نیست, +To Delivery Date,تا تاریخ تحویل, +To Doctype,برای Doctype, +To Due Date,به تاریخ سررسید, +To Payment Date,به تاریخ پرداخت, +To Reference Date,به تاریخ مرجع, +To add Operations tick the 'With Operations' checkbox.,"برای افزودن عملیات، کادر ""با عملیات"" را علامت بزنید.", +To add subcontracted Item's raw materials if include exploded items is disabled.,افزودن مواد خام قراردادی فرعی در صورت وجود آیتم‌های گسترده شده غیرفعال است., +To apply condition on parent field use parent.field_name and to apply condition on child table use doc.field_name. Here field_name could be based on the actual column name of the respective field.,برای اعمال شرط در فیلد والد از parent.field_name و برای اعمال شرط در جدول فرزند از doc.field_name استفاده کنید. در اینجا field_name می تواند بر اساس نام ستون واقعی فیلد مربوطه باشد., +To be Delivered to Customer,برای تحویل به مشتری, +To cancel a {} you need to cancel the POS Closing Entry {}.,برای لغو یک {}، باید ثبت اختتامیه POS {} را لغو کنید., +"To enable Capital Work in Progress Accounting,",برای فعال کردن حسابداری کار سرمایه ای،, +To include non-stock items in the material request planning. i.e. Items for which 'Maintain Stock' checkbox is unticked.,"گنجاندن آیتم‌های غیر موجودی در برنامه ریزی درخواست مواد. به عنوان مثال آیتم‌هایی که چک باکس ""نگهداری موجودی"" برای آنها علامت گذاری نشده است.", +To submit the invoice without purchase order please set {0} as {1} in {2},برای ارسال فاکتور بدون سفارش خرید لطفاً {0} را به عنوان {1} در {2} تنظیم کنید, +To submit the invoice without purchase receipt please set {0} as {1} in {2},برای ارسال فاکتور بدون رسید خرید، لطفاً {0} را به عنوان {1} در {2} تنظیم کنید., +"To use a different finance book, please uncheck 'Include Default FB Assets'",برای استفاده از یک کتاب مالی متفاوت، لطفاً علامت «شامل دارایی‌های پیش‌فرض FB» را بردارید., +"To use a different finance book, please uncheck 'Include Default FB Entries'",برای استفاده از یک کتاب مالی متفاوت، لطفاً علامت «شامل ورودی‌های پیش‌فرض FB» را بردارید., +Total Active Items,مجموع آیتم‌های فعال, +Total Allocations,مجموع تخصیص ها, +Total Asset,کل دارایی, +Total Asset Cost,هزینه کل دارایی, +Total Billing Hours,کل ساعت صورتحساب, +Total Contribution Amount Against Invoices: {0},مجموع مبلغ مشارکت در برابر فاکتورها: {0}, +Total Contribution Amount Against Orders: {0},کل مبلغ مشارکت در برابر سفارش‌ها: {0}, +Total Equity,مجموع حقوق صاحبان موجودی, +Total Incoming Bills,مجموع صورتحساب های دریافتی, +Total Incoming Payment,کل پرداخت ورودی, +Total Incoming Value (Receipt),مجموع ارزش ورودی (رسید), +Total Interest,سود کل, +Total Issues,مجموع مشکلات, +Total Items,مجموع آیتم‌ها, +Total Liability,کل مسئولیت, +Total Operation Time,کل زمان عملیات, +Total Other Charges,مجموع سایر هزینه ها, +Total Outgoing Bills,مجموع صورتحساب خروجی, +Total Outgoing Payment,کل پرداخت خروجی, +Total Outgoing Value (Consumption),کل ارزش خروجی (مصرف), +Total Purchase Amount,کل مبلغ خرید, +Total Purchase Cost has been updated,کل هزینه خرید به روز شده است, +Total Repair Cost,کل هزینه تعمیر, +Total Reposting Count,تعداد کل بازنشر, +Total Sales Amount,کل مبلغ فروش, +Total Stock Value,ارزش کل موجودی, +Total Supplied Qty,تعداد کل عرضه شده, +Total Time (in Mins),زمان کل (به دقیقه), +Total Value,ارزش کل, +Total Value Difference (Incoming - Outgoing),تفاوت ارزش کل (ورودی - خروجی), +Total Views,کل بازدیدها, +Total Warehouses,کل انبارها, +Total percentage against cost centers should be 100,درصد کل در مقابل مراکز هزینه باید 100 باشد, +Tracking Status,وضعیت پیگیری, +Tracking Status Info,اطلاعات وضعیت ردیابی, +Tracking URL,URL پیگیری, +Transaction Deletion Document: {0} is running for this Company. {1},سند حذف تراکنش: {0} برای این شرکت در حال اجرا است. {1}, +Transaction Deletion Record,رکورد حذف تراکنش, +Transaction Deletion Record Item,مورد رکورد حذف تراکنش, +Transaction Exchange Rate,نرخ ارز معاملات, +Transaction Settings,تنظیمات تراکنش, +Transactions against the Company already exist! Chart of Accounts can only be imported for a Company with no transactions.,معاملات در مقابل شرکت در حال حاضر وجود دارد! نمودار حساب ها فقط برای شرکتی بدون تراکنش قابل درون‌بُرد است., +Transfer Asset,انتقال دارایی, +Transfer From Warehouses,انتقال از انبارها, +Transferring cannot be done to an Employee. Please enter location where Asset {0} has to be transferred,انتقال به کارمند امکان پذیر نیست. لطفاً مکانی را وارد کنید که دارایی {0} باید در آنجا منتقل شود, +Transit,ترانزیت, +Transit Entry,ورودی حمل و نقل, +Truncates 'Remarks' column to set character length,"ستون ""Remarks"" را برای تنظیم طول کاراکتر کوتاه می کند", +Type Of Call,نوع تماس, +Type of Transaction,نوع تراکنش, +UAE VAT 201,مالیات بر ارزش افزوده امارات متحده عربی 201, +UAE VAT Account,حساب مالیات بر ارزش افزوده امارات متحده عربی, +UAE VAT Accounts,حساب های مالیات بر ارزش افزوده امارات متحده عربی, +UAE VAT Settings,تنظیمات مالیات بر ارزش افزوده امارات متحده عربی, +UOM conversion factor required for UOM: {0} in Item: {1},ضریب تبدیل UOM مورد نیاز برای UOM: {0} در مورد: {1}, +UnReconcile,تطبیق نکردن, +Unable to find variable:,قادر به یافتن متغیر نیست:, +Unassigned Qty,تعداد تعیین نشده, +"Under Working Hours table, you can add start and end times for a Workstation. For example, a Workstation may be active from 9 am to 1 pm, then 2 pm to 5 pm. You can also specify the working hours based on shifts. While scheduling a Work Order, the system will check for the availability of the Workstation based on the working hours specified.",در جدول ساعات کاری، می توانید زمان شروع و پایان یک ایستگاه کاری را اضافه کنید. به عنوان مثال، یک ایستگاه کاری ممکن است از ساعت 9 صبح تا 1 بعد از ظهر و سپس از 2 بعد از ظهر تا 5 بعد از ظهر فعال باشد. همچنین می توانید ساعت کاری را بر اساس شیفت ها مشخص کنید. هنگام برنامه ریزی یک دستور کار، سیستم بر اساس ساعات کاری مشخص شده، در دسترس بودن ایستگاه کاری را بررسی می کند., +Unit of Measure (UOM),واحد اندازه گیری (UOM), +Unlinked,بدون پیوند, +Unqualified,فاقد صلاحیت, +Unrealized Profit / Loss Account,حساب سود / زیان تحقق نیافته, +Unrealized Profit / Loss account for intra-company transfers,حساب سود / زیان تحقق نیافته برای نقل و انتقالات درون شرکتی, +Unrealized Profit/Loss account for intra-company transfers,حساب سود/زیان تحقق نیافته برای نقل و انتقالات درون شرکتی, +Unreconcile Payment,پرداخت ناسازگار, +Unreconcile Payment Entries,ورودی های پرداخت ناسازگار, +Unreconcile Transaction,تراکنش ناسازگار, +Unreconciled Amount,مبلغ ناسازگار, +Unreconciled Entries,ورودی های تطبیق نگرفته, +Unreserve,لغو رزرو کنید, +Unreserve Stock,ذخیره موجودی, +Unreserving Stock...,عدم رزرو موجودی..., +Up,بالا, +Update Billed Amount in Delivery Note,مبلغ صورتحساب در یادداشت تحویل را به روز کنید, +Update Existing Price List Rate,به روز رسانی نرخ لیست قیمت موجود, +Update Existing Records,به روز رسانی رکوردهای موجود, +Update Rate as per Last Purchase,نرخ به روز رسانی بر اساس آخرین خرید, +Update Total Purchase Cost,به روز رسانی کل هزینه خرید, +Update frequency of Project,فرکانس به روز رسانی پروژه, +Update stock must be enabled for the purchase invoice {0},به‌روزرسانی موجودی باید برای فاکتور خرید فعال شود {0}, +Updated via 'Time Log' (In Minutes),"به روز شده از طریق ""Time Log"" (به دقیقه)", +Updating Work Order status,به روز رسانی وضعیت دستور کار, +"Updating {0} of {1}, {2}",در حال به روز رسانی {0} از {1}، {2}, +Upload Bank Statement,بارگذاری صورتحساب بانکی, +Use 'Repost in background' button to trigger background job. Job can only be triggered when document is in Queued or Failed status.,برای فعال کردن کار پس‌زمینه از دکمه «بازنشر در پس‌زمینه» استفاده کنید. کار فقط زمانی می تواند فعال شود که سند در وضعیت صف یا ناموفق باشد., +Use Batch-wise Valuation,استفاده از ارزش گذاری دسته ای, +Use Company Default Round Off Cost Center,از مرکز هزینه دور پیش فرض شرکت استفاده کنید, +Use Company default Cost Center for Round off,از مرکز هزینه پیش‌فرض شرکت برای دور کردن استفاده کنید, +Use HTTP Protocol,استفاده از پروتکل HTTP, +Use Item based reposting,از ارسال مجدد بر اساس آیتم استفاده کنید, +Use Serial No / Batch Fields,از فیلدهای شماره سریال / دسته استفاده کنید, +Use Transaction Date Exchange Rate,از نرخ مبادله تاریخ تراکنش استفاده کنید, +User {0}: Removed Employee Self Service role as there is no mapped employee.,کاربر {0}: نقش خود سرویس کارمند حذف شد زیرا کارمند نگاشت شده وجود ندارد., +User {0}: Removed Employee role as there is no mapped employee.,کاربر {0}: نقش کارمند حذف شد زیرا کارمند نگاشت شده وجود ندارد., +Users can enable the checkbox If they want to adjust the incoming rate (set using purchase receipt) based on the purchase invoice rate.,اگر کاربران بخواهند نرخ ورودی (تنظیم با استفاده از رسید خرید) را بر اساس نرخ فاکتور خرید تنظیم کنند، می توانند کادر انتخاب را فعال کنند., +Users with this role are allowed to over bill above the allowance percentage,کاربرانی که این نقش را دارند مجاز به اضافه صورتحساب بالاتر از درصد مجاز هستند, +Users with this role are allowed to over deliver/receive against orders above the allowance percentage,کاربرانی که این نقش را دارند مجاز به بیش تحویل/دریافت سفارش‌ها بالاتر از درصد مجاز هستند, +Using negative stock disables FIFO/Moving average valuation when inventory is negative.,استفاده از موجودی منفی، ارزش گذاری FIFO / میانگین متحرک را زمانی که موجودی کالا منفی است، غیرفعال می کند., +VAT Accounts,حساب های مالیات بر ارزش افزوده, +VAT Amount (AED),مقدار VAT (AED), +VAT Audit Report,گزارش حسابرسی مالیات بر ارزش افزوده, +VAT on Expenses and All Other Inputs,مالیات بر ارزش افزوده هزینه ها و سایر ورودی ها, +VAT on Sales and All Other Outputs,مالیات بر ارزش افزوده بر فروش و سایر خروجی ها, +Valid From must be after {0} as last GL Entry against the cost center {1} posted on this date,معتبر از باید بعد از {0} به عنوان آخرین ثبت دفتر کل در برابر مرکز هزینه {1} پست شده در این تاریخ باشد, +Validate Negative Stock,اعتبار موجودی منفی, +Validate Stock on Save,اعتبار موجودی در ذخیره, +Valuation Field Type,نوع فیلد ارزش گذاری, +Valuation Rate (In / Out),نرخ ارزش گذاری (ورودی/خروجی), +Valuation rate for customer provided items has been set to zero.,نرخ ارزش گذاری برای آیتم‌های ارائه شده توسط مشتری صفر تعیین شده است., +Value Based Inspection,بازرسی مبتنی بر ارزش, +Value Change,تغییر ارزش, +Value Details,جزئیات ارزش, +Value of Goods,ارزش کالاها, +Value of goods cannot be 0,ارزش کالا نمی تواند 0 باشد, +Verification failed please check the link,تأیید انجام نشد لطفاً پیوند را بررسی کنید, +Via Landed Cost Voucher,از طریق کوپن هزینه تمام شده تا درب انبار, +View BOM Update Log,مشاهده لاگ به‌روزرسانی BOM, +View Exchange Gain/Loss Journals,مشاهده دفترهای روزنامه سود/زیان تبادل, +View General Ledger,مشاهده دفتر کل مرکزی, +View Ledgers,مشاهده دفتر کل ها, +Visits,بازدیدها, +Voice Call Settings,تنظیمات تماس صوتی, +Voucher,کوپن, +Voucher Name,نام کوپن, +Voucher No is mandatory,شماره کوپن الزامی است, +Voucher Qty,مقدار کوپن, +Voucher Subtype,زیرنوع کوپن, +Voucher {0} is over-allocated by {1},کوپن {0} توسط {1} بیش از حد تخصیص داده شده است, +Voucher {0} value is broken: {1},ارزش کوپن {0} خراب است: {1}, +Voucher-wise Balance,تراز مبتنی بر کوپن, +"WARNING: Exotel app has been separated from ERPNext, please install the app to continue using Exotel integration.",هشدار: برنامه Exotel از ERPNext جدا شده است، لطفاً برای ادامه استفاده از Exotel یکپارچه سازی، برنامه را نصب کنید., +WIP Composite Asset,دارایی ترکیبی «کار در حال انجام», +Waiting for payment...,در انتظار پرداخت..., +Warehouse Capacity for Item '{0}' must be greater than the existing stock level of {1} {2}.,"ظرفیت انبار برای آیتم ""{0}"" باید بیشتر از سطح موجودی موجود در {1} {2} باشد.", +Warehouse Details,جزئیات انبار, +Warehouse Disabled?,انبار غیر فعال است؟, +Warehouse Settings,تنظیمات انبار, +Warehouse Wise Stock Balance,تراز موجودی مبتنی بر انبار, +Warehouse wise Stock Value,ارزش موجودی مبتنی بر انبار, +Warehouse {0} does not belong to Company {1}.,انبار {0} متعلق به شرکت {1} نیست., +"Warehouse {0} is not linked to any account, please mention the account in the warehouse record or set default inventory account in company {1}.",انبار {0} به هیچ حسابی مرتبط نیست، لطفاً حساب را در سابقه انبار ذکر کنید یا حساب موجودی پیش فرض را در شرکت {1} تنظیم کنید., +Warehouse's Stock Value has already been booked in the following accounts:,ارزش موجودی انبار قبلاً در حساب های زیر رزرو شده است:, +Warning - Row {0}: Billing Hours are more than Actual Hours,هشدار - ردیف {0}: ساعات صورتحساب بیشتر از ساعت‌های واقعی است, +Warning on Negative Stock,هشدار در مورد موجودی منفی, +Warning!,هشدار!, +Watch Video,تماشای ویدیو, +Website Script,اسکریپت وب سایت, +Website Theme,تم وب سایت, +Week {0} {1},هفته {0} {1}, +Weekly Time to send,زمان ارسال هفتگی, +Weight (kg),وزن (کیلوگرم), +"When a parent warehouse is chosen, the system conducts stock checks against the associated child warehouses",هنگامی که یک انبار اصلی انتخاب می شود، سیستم بررسی های موجودی را در مقابل انبارهای فرزند مرتبط انجام می دهد, +"When creating an Item, entering a value for this field will automatically create an Item Price at the backend.",هنگام ایجاد یک آیتم، با وارد کردن یک مقدار برای این فیلد، به طور خودکار قیمت آیتم در قسمت پشتیبان ایجاد می شود., +"While making Purchase Invoice from Purchase Order, use Exchange Rate on Invoice's transaction date rather than inheriting it from Purchase Order. Only applies for Purchase Invoice.",هنگام تهیه فاکتور خرید از سفارش خرید، به جای ارث بردن آن از سفارش خرید، از نرخ مبادله در تاریخ تراکنش فاکتور استفاده کنید. فقط برای فاکتور خرید اعمال می شود., +Width (cm),عرض (سانتی متر), +Withdrawal,برداشت از حساب, +Work Order / Subcontract PO,دستور کار / PO قرارداد فرعی, +Work Order Consumed Materials,مواد مصرفی دستور کار, +Workflow,جریان کار, +Workflow Action,عمل گردش کار, +Workflow State,وضعیت گردش کار, +Workstation Dashboard,داشبورد ایستگاه کاری, +Workstation Status,وضعیت ایستگاه کاری, +Workstation Type,نوع ایستگاه کاری, +Workstations,ایستگاه های کاری, +Write Off Limit,محدودیت نوشتن, +Wrong Company,شرکت اشتباه, +Wrong Template,الگوی اشتباه, +You are not authorized to make/edit Stock Transactions for Item {0} under warehouse {1} before this time.,شما مجاز به انجام/ویرایش معاملات موجودی برای کالای {0} در انبار {1} قبل از این زمان نیستید., +You are picking more than required quantity for the item {0}. Check if there is any other pick list created for the sales order {1}.,شما در حال انتخاب بیش از مقدار مورد نیاز برای مورد {0} هستید. بررسی کنید که آیا لیست انتخاب دیگری برای سفارش فروش {1} ایجاد شده است., +"You can set it as a machine name or operation type. For example, stiching machine 12",می توانید آن را به عنوان نام ماشین یا نوع عملیات تنظیم کنید. مثلا ماشین دوخت 12, +You can't make any changes to Job Card since Work Order is closed.,از آنجایی که دستور کار بسته شده است، نمی توانید هیچ تغییری در کارت کار ایجاد کنید., +You can't redeem Loyalty Points having more value than the Rounded Total.,نمی‌توانید امتیازهای وفاداری را که ارزش بیشتری از مجموع گرد شده دارند، پس‌خرید کنید., +You cannot change the rate if BOM is mentioned against any Item.,اگر BOM در برابر هر موردی ذکر شده باشد، نمی توانید نرخ را تغییر دهید., +You cannot create a {0} within the closed Accounting Period {1},شما نمی توانید یک {0} در دوره حسابداری بسته {1} ایجاد کنید, +You cannot create/amend any accounting entries till this date.,تا این تاریخ نمی توانید هیچ ورودی حسابداری ایجاد یا اصلاح کنید., +You cannot repost item valuation before {},شما نمی توانید ارزیابی مورد را قبل از {} دوباره ارسال کنید, +You have entered a duplicate Delivery Note on Row,شما یک یادداشت تحویل تکراری در ردیف وارد کرده اید, +You haven't created a {0} yet,شما هنوز یک {0} ایجاد نکرده اید, +You need to cancel POS Closing Entry {} to be able to cancel this document.,برای اینکه بتوانید این سند را لغو کنید، باید ثبت اختتامیه POS {} را لغو کنید., +Your Name (required),نام شما (الزامی), +Your email has been verified and your appointment has been scheduled,ایمیل شما تایید شده و قرار ملاقات شما تعیین شده است, +Zero Balance,تراز صفر, +Zero Rated,دارای امتیاز صفر, +Zero quantity,مقدار صفر, +`Allow Negative rates for Items`,«نرخ های منفی برای آیتم‌ها مجاز است», +as a percentage of finished item quantity,به عنوان درصدی از مقدار کالای تمام شده, +at,در, +description,شرح, +discount applied,تخفیف اعمال شد, +doc_type,نوع_doc, +exchangerate.host,مبادله.میزبان, +is already,است در حال حاضر, +must be between 0 and 100,باید بین 0 تا 100 باشد, +or its descendants,یا فرزندان آن, +out of 5,از 5, +payments app is not installed. Please install it from {0} or {1},برنامه پرداخت نصب نشده است لطفاً آن را از {0} یا {1} نصب کنید, +payments app is not installed. Please install it from {} or {},برنامه پرداخت نصب نشده است لطفاً آن را از {} یا {} نصب کنید, +performing either one below:,انجام هر یک از موارد زیر:, +product bundle item row's name in sales order. Also indicates that picked item is to be used for a product bundle,نام ردیف آیتم‌های باندل محصول در سفارش فروش. همچنین نشان می دهد که آیتم انتخاب شده قرار است برای یک باندل محصول استفاده شود, +ratings,رتبه بندی ها, +subscription is already cancelled.,اشتراک در حال حاضر لغو شده است., +temporary name,نام موقت, +to unallocate the amount of this Return Invoice before cancelling it.,برای تخصیص مبلغ این فاکتور برگشتی قبل از لغو آن., +variance,واریانس, +via BOM Update Tool,از طریق BOM Update Tool, +will be,خواهد بود, +{0} {1} has submitted Assets. Remove Item {2} from table to continue.,{0} {1} دارایی‌ها را ارسال کرده است. برای ادامه، آیتم {2} را از جدول حذف کنید., +{0} Account not found against Customer {1}.,{0} حساب در مقابل مشتری پیدا نشد {1}., +{0} Budget for Account {1} against {2} {3} is {4}. It {5} exceed by {6},{0} بودجه برای حساب {1} در برابر {2} {3} {4} است. {5} از {6} بیشتر است, +{0} Transaction(s) Reconciled,{0} تراکنش(های) تطبیق شد, +{0} account is not of type {1},حساب {0} از نوع {1} نیست, +{0} account not found while submitting purchase receipt,هنگام ارسال رسید خرید، حساب {0} پیدا نشد, +{0} and {1},{0} و {1}, +{0} cannot be used as a Main Cost Center because it has been used as child in Cost Center Allocation {1},{0} نمی‌تواند به‌عنوان مرکز هزینه اصلی استفاده شود زیرا به‌عنوان فرزند در تخصیص مرکز هزینه {1} استفاده شده است., +{0} cannot be zero,{0} نمی تواند صفر باشد, +{0} currency must be same as company's default currency. Please select another account.,ارز {0} باید با واحد پول پیش‌فرض شرکت یکسان باشد. لطفا حساب دیگری را انتخاب کنید., +{0} entered twice {1} in Item Taxes,{0} دو بار {1} در مالیات آیتم وارد شد, +{0} has Payment Term based allocation enabled. Select a Payment Term for Row #{1} in Payment References section,{0} تخصیص مبتنی بر مدت پرداخت را فعال کرده است. در بخش مراجع پرداخت، یک شرایط پرداخت برای ردیف #{1} انتخاب کنید, +{0} is a mandatory Accounting Dimension.
Please set a value for {0} in Accounting Dimensions section.,{0} یک بعد حسابداری اجباری است.
لطفاً یک مقدار برای {0} در بخش ابعاد حسابداری تنظیم کنید., +{0} is added multiple times on rows: {1},{0} چندین بار در ردیف ها اضافه می شود: {1}, +{0} is already running for {1},{0} در حال حاضر برای {1} در حال اجرا است, +{0} is mandatory for account {1},{0} برای حساب {1} اجباری است, +{0} qty of Item {1} is being received into Warehouse {2} with capacity {3}.,{0} تعداد مورد {1} در انبار {2} با ظرفیت {3} در حال دریافت است., +"{0} units are reserved for Item {1} in Warehouse {2}, please un-reserve the same to {3} the Stock Reconciliation.",{0} واحد برای مورد {1} در انبار {2} رزرو شده است، لطفاً همان را در {3} تطبیق موجودی لغو کنید., +{0} units of Item {1} is picked in another Pick List.,{0} واحد از مورد {1} در فهرست انتخاب دیگری انتخاب شده است., +"{0} units of {1} are required in {2}{3}, on {4} {5} for {6} to complete the transaction.",{0} واحد از {1} در {2}{3}، در {4} {5} برای {6} برای تکمیل تراکنش مورد نیاز است., +{0} units of {1} needed in {2} on {3} {4} to complete this transaction.,برای تکمیل این تراکنش به {0} واحد از {1} در {2} در {3} {4} نیاز است., +{0} will be given as discount.,{0} به عنوان تخفیف داده می شود., +{0} {1} Manually,{0} {1} به صورت دستی, +{0} {1} Partially Reconciled,{0} {1} تا حدی تطبیق کرد, +"{0} {1} cannot be updated. If you need to make changes, we recommend canceling the existing entry and creating a new one.",{0} {1} نمی تواند به روز شود. اگر نیاز به ایجاد تغییرات دارید، توصیه می کنیم ورودی موجود را لغو کنید و یک ورودی جدید ایجاد کنید., +{0} {1} has already been fully paid.,{0} {1} قبلاً به طور کامل پرداخت شده است., +{0} {1} has already been partly paid. Please use the 'Get Outstanding Invoice' or the 'Get Outstanding Orders' button to get the latest outstanding amounts.,{0} {1} قبلاً تا حدی پرداخت شده است. لطفاً از دکمه «دریافت صورتحساب معوق» یا «دریافت سفارش‌های معوق» برای دریافت آخرین مبالغ معوق استفاده کنید., +{0} {1} is allocated twice in this Bank Transaction,{0} {1} دو بار در این تراکنش بانکی تخصیص داده شده است, +{0} {1} is not in any active Fiscal Year,{0} {1} در هیچ سال مالی فعالی نیست, +{0} {1} is on hold,{0} {1} در انتظار است, +{0} {1} not allowed to be reposted. Modify {2} to enable reposting.,{0} {1} مجاز به ارسال مجدد نیست. برای فعال کردن ارسال مجدد، {2} را تغییر دهید., +{0} {1} via CSV File,{0} {1} از طریق فایل CSV, +{0} {1}: Account {2} is a Group Account and group accounts cannot be used in transactions,{0} {1}: حساب {2} یک حساب گروهی است و نمی توان از حساب های گروهی در تراکنش ها استفاده کرد, +{0} {1}: Cost Center is required for 'Profit and Loss' account {2}.,"{0} {1}: مرکز هزینه برای حساب ""سود و زیان"" {2} لازم است.", +{0} {1}: Cost Center {2} is a group cost center and group cost centers cannot be used in transactions,{0} {1}: مرکز هزینه {2} یک مرکز هزینه گروهی است و مراکز هزینه گروهی را نمی توان در تراکنش ها استفاده کرد, +{0}% of total invoice value will be given as discount.,{0}% از ارزش کل فاکتور به عنوان تخفیف داده می شود., +{0}'s {1} cannot be after {2}'s Expected End Date.,{1} {0} نمی تواند بعد از تاریخ پایان مورد انتظار {2} باشد., +{item_name}'s Sample Size ({sample_size}) cannot be greater than the Accepted Quantity ({accepted_quantity}),اندازه نمونه {item_name} ({sample_size}) نمی‌تواند بیشتر از مقدار مورد قبول ({accepted_quantity}) باشد., +{} Available,{} در دسترس, +{} To Deliver,{} برای تحویل, +{} To Receive,{} برای دریافت, +{} Assigned,{} اختصاص یافته, +{} Available,{} در دسترس, +{} Open,{} باز, +{} Pending,{} انتظار, +{} To Bill,{} برای صورتحساب, +{} is a child company.,{} یک شرکت فرزند است., +{} {} is already linked with another {},{} {} قبلاً با {} دیگری پیوند شده است, +{} {} is already linked with {} {},{} {} قبلاً با {} {} پیوند داده شده است, diff --git a/erpnext/translations/sv.csv b/erpnext/translations/sv.csv index 4a53c63fafa..ca0782fb728 100644 --- a/erpnext/translations/sv.csv +++ b/erpnext/translations/sv.csv @@ -8743,3 +8743,3086 @@ WhatsApp,WhatsApp, Make a call,Ringa ett samtal, Approve,Godkänna, Reject,Avvisa, + Address, Adress, + Amount,Belopp, + Is Child Table,Är Undertabell, + Name,Namn, + Rate,Moms %, + Summary,Översikt, +"""SN-01::10"" for ""SN-01"" to ""SN-10""","""SN-01::10"" för ""SN-01"" till ""SN-10""", +# In Stock,# I Lager, +# Req'd Items,# Erfodrade Artiklar, +% Finished Item Quantity,% Färdig Artikel Kvantitet, +% Occupied,% Upptagen, +% Picked,% Plockad, +% Process Loss,% Process Förlust, +% Returned,% Retur, +'Account' in the Accounting section of Customer {0},"""Konto"" i Bokföring Sektion för Kund {0}", +'Allow Multiple Sales Orders Against a Customer's Purchase Order',"""Tillåt flera Försäljning Order mot Kund Inköp Order""", +'Default {0} Account' in Company {1},"""Standard {0} Konto"" i Bolag {1}", +'To Package No.' cannot be less than 'From Package No.',"""Till Paket Nummer."" får inte vara lägre än ""Från Paket Nummer.""", +'{0}' account is already used by {1}. Use another account.,'{0}' konto används redan av {1}. Använd ett annat konto., +'{0}' should be in company currency {1}.,"""{0}"" ska vara i bolag valuta {1}.", +(A) Qty After Transaction,(A) Kvantitet Efter Transaktion, +(B) Expected Qty After Transaction,(B) Förväntad Kvantitet Efter Transaktion, +(C) Total Qty in Queue,(C) Totalt Kvantitet i Kö, +(C) Total qty in queue,(C) Totalt Kvantitet i Kö, +(D) Balance Stock Value,(D) Saldo Lager Värde, +(E) Balance Stock Value in Queue,(E) Saldo Lager Värde i Kö, +(F) Change in Stock Value,(F) Förändring i Lager Värde, +(G) Sum of Change in Stock Value,(G) Summan av Förändring i Lager Värde, +(H) Change in Stock Value (FIFO Queue),(H) Förändring av Lager Värde (FIFO), +(H) Valuation Rate,(H) Grund Pris, +(I) Valuation Rate,(I) Grund Pris, +(J) Valuation Rate as per FIFO,(J) Grund Pris enligt FIFO, +(K) Valuation = Value (D) ÷ Qty (A),(K) Värdering = Värde (D) ÷ Kvantitet (A), +", with the inventory {0}: {1}",", med inventering {0}: {1}", +0-30 Days,0-30 Dagar, +3 Yearly,Var Tredje År, +30-60 Days,30-60 Dagar, +60-90 Days,60 - 90 Dagar, +90 Above,90+ Dagar, +"
+

Note

+
    +
  • +You can use Jinja tags in Subject and Body fields for dynamic values. +
  • + All fields in this doctype are available under the doc object and all fields for the customer to whom the mail will go to is available under the customer object. +
+

Examples

+ +
    +
  • Subject:

    Statement Of Accounts for {{ customer.customer_name }}

  • +
  • Body:

    +
    Hello {{ customer.customer_name }},
    PFA your Statement Of Accounts from {{ doc.from_date }} to {{ doc.to_date }}.
  • +
+","
+

Observera

+
    +
  • +Du kan använda Jinja Taggar i Ämne och Huvudtext-fält för dynamiska värden. +
  • + Alla fält i denna doctype är tillgängliga under doc-objekt och alla fält för kund som e-post meddelande går till är tillgängliga under customer-objekt. +
+

Exempel

+ +
    +
  • Ämne:

    Konto besked för {{ customer.customer_name }}

  • +
  • Huvudtext:

    +
    Hej {{ customer.customer_name }},
    Kontoutdrag från {{ doc.from_date }} till {{ doc.to_date }}.
    +
+", +"
Other Details
","
Övriga Detaljer
", +"
No Matching Bank Transactions Found
","
Inga avstämda Bank Transaktioner hittades
", +"
+

All dimensions in centimeter only

+
","
+

Alla mått endast i centimeter

+
", +"

About Product Bundle

+ +

Aggregate group of Items into another Item. This is useful if you are bundling a certain Items into a package and you maintain stock of the packed Items and not the aggregate Item.

+

The package Item will have Is Stock Item as No and Is Sales Item as Yes.

+

Example:

+

If you are selling Laptops and Backpacks separately and have a special price if the customer buys both, then the Laptop + Backpack will be a new Product Bundle Item.

","

Om Artikel Paket

+ +

Paketera grupp av artiklar till annan Artikel. Det är användbart om man paketerar vissa Artiklar i paket och har lager av packade Artiklar och inte paketarad Artikel.Artikel kommer att ha Artikel. Är Lagerar Artikel som Nej och Är Försäljning Artikel som Ja.

+

Exempel:

+

Om man säljer bärbara datorer och ryggsäckar separat och har specialpris om kunder köper båda, så kommer det att vara bärbar dator + ryggsäck som paket artikel.", +"

Currency Exchange Settings Help

+

There are 3 variables that could be used within the endpoint, result key and in values of the parameter.

+

Exchange rate between {from_currency} and {to_currency} on {transaction_date} is fetched by the API.

+

Example: If your endpoint is exchange.com/2021-08-01, then, you will have to input exchange.com/{transaction_date}

","

Valutaväxling Inställningar Hjälp

+

Det finns 3 variabler som kan användas av slutpunkt, resultat nyckel och i parameter värde.

+

Växelkurs mellan {from_currency} och {to_currency} {transaction_date} hämtas av API.

+

Exempel: Om slutpunkt är exchange.com/2021-08-01 måste du ange exchange.com/{transaction_date}

", +"

Body Text and Closing Text Example

+ +
We have noticed that you have not yet paid invoice {{sales_invoice}} for {{frappe.db.get_value(""Currency"", currency, ""symbol"")}} {{outstanding_amount}}. This is a friendly reminder that the invoice was due on {{due_date}}. Please pay the amount due immediately to avoid any further dunning cost.
+ +

How to get fieldnames

+ +

The fieldnames you can use in your template are the fields in the document. You can find out the fields of any documents via Setup > Customize Form View and selecting the document type (e.g. Sales Invoice)

+ +

Templating

+ +

Templates are compiled using the Jinja Templating Language. To learn more about Jinja, read this documentation.

","

Huvudtext och exempel på Avslutande Text

+ +
Vi har märkt att ni ännu inte har betalat faktura {{sales_invoice}} för {{frappe.db.get_value(""Currency"", currency, ""symbol"")}} {{outstanding_amount}}. Detta är en vänlig påminnelse om att fakturan var förfallen {{due_date}}. Vänligen betala förfallen belopp omedelbart för att undvika ytterligare kostnader.
+ +

Hur får man fältnamn

+ +

Fältnamn man kan använda i mall är fält i dokument. Du kan ta reda på fält namn för alla dokument via Inställningar > Anpassa formulärvy och välj dokument typ (t.ex. Försäljning Faktura)

+ +

Mall

+ +

Mallar kompileras med Jinja Templating Language. Om du vill veta mer om Jinja läs denna dokumentation.

", +"

Contract Template Example

+ +
Contract for Customer {{ party_name }}
+
+-Valid From : {{ start_date }} 
+-Valid To : {{ end_date }}
+
+ +

How to get fieldnames

+ +

The field names you can use in your Contract Template are the fields in the Contract for which you are creating the template. You can find out the fields of any documents via Setup > Customize Form View and selecting the document type (e.g. Contract)

+ +

Templating

+ +

Templates are compiled using the Jinja Templating Language. To learn more about Jinja, read this documentation.

","

Exempel på Avtal Mall

+ +
Avtal för Kund {{ party_name }}
+
+-Giltigt från: {{ start_date }}
+-Gäller till: {{ end_date }}
+
+ +

Hur får man fältnamn

+ +

Fältnamn du kan använda i avtal mall är fält i avtal som du skapar mallen för. Du kan ta reda på fält namn för alla dokument via Inställningar > Anpassa formulärvy och välj dokument typ (t.ex. Avtal)

+ +

Mall

+ +

Mallar kompileras med Jinja Templating Language. Om du vill veta mer om Jinja läser du den här dokumentationen.

", +"

Standard Terms and Conditions Example

+ +
Delivery Terms for Order number {{ name }}
+
+-Order Date : {{ transaction_date }} 
+-Expected Delivery Date : {{ delivery_date }}
+
+ +

How to get fieldnames

+ +

The fieldnames you can use in your email template are the fields in the document from which you are sending the email. You can find out the fields of any documents via Setup > Customize Form View and selecting the document type (e.g. Sales Invoice)

+ +

Templating

+ +

Templates are compiled using the Jinja Templating Language. To learn more about Jinja, read this documentation.

","

Exempel på Standard Villkor

+ +
Leverans Villkor för Order Nummer {{ name }}
+
+-Order Datum: {{ transaction_date }}
+-Förväntat Leverans Datum: {{ delivery_date }}
+
+ +

Hur hämtas fältnamn

+ +

Fältnamn som kan användas i E-post Mall är fält i Dokument som man skickar E-post meddelande från. Man kan ta reda på fält namn för alla dokument via Inställning > Anpassa Formulär Vy och välja Dokument Typ (t.ex. Försäljning Faktura)

+ +

Skriva Mallar

+ +

Mallar kompileras med Jinja Mall Språk. Läs mer om Jinja dokumentation:

", +"
Or
","
Eller
", +"","", +"","", +"","", +"

In your Email Template, you can use the following special variables: +

+
    +
  • + {{ update_password_link }}: A link where your supplier can set a new password to log into your portal. +
  • +
  • + {{ portal_link }}: A link to this RFQ in your supplier portal. +
  • +
  • + {{ supplier_name }}: The company name of your supplier. +
  • +
  • + {{ contact.salutation }} {{ contact.last_name }}: The contact person of your supplier. +
  • + {{ user_fullname }}: Your full name. +
  • +
+

+

Apart from these, you can access all values in this RFQ, like {{ message_for_supplier }} or {{ terms }}.

","

I E-post Mall kan följande specialvariabler användas: +

+
    +
  • + {{ update_password_link }} : Länk där leverantör kan ange nytt lösenord för att logga in på leverantör portal. +
  • +
  • + {{ portal_link }}: Länk till offert begäran på leverantör portal. +
  • +
  • + {{ supplier_name }}: Leverantör namn. +
  • +
  • + {{ contact.salutation }} {{ contact.last_name }}: Kontakt person för leverantör. +
  • +
  • + {{ user_fullname } }: Användarens fullständiga namn. +
  • +
+

+

+

Förutom dessa kan man komma åt alla värden i offert begäran, som {{ message_for_supplier }} eller {{ terms }}.

", +"
Message Example
+ +<p> Thank You for being a part of {{ doc.company }}! We hope you are enjoying the service.</p> + +<p> Please find enclosed the E Bill statement. The outstanding amount is {{ doc.grand_total }}.</p> + +<p> We don't want you to be spending time running around in order to pay for your Bill.
After all, life is beautiful and the time you have in hand should be spent to enjoy it!
So here are our little ways to help you get more time for life! </p> + +<a href=""{{ payment_url }}""> click here to pay </a> + +
+","
Meddelande Exempel
+ +<p> Tack för att ni är en del av {{ doc.company }}! Vi hoppas att ni gillar tjänst.</p> + +<p> Vänligen se bifogat E-faktura. Utestående belopp är {{ doc.grand_total }}.</p> + +<p> Vi vill inte att ni ska spendera tid med att springa runt för att betala faktura.
Livet är trots allt vackert och den tid man har bör spenderas för att njuta av livet!
Så här är våra små sätt att hjälpa er att få mer tid för livet! < /p> + +<a href=""{{ payment_url }}""> klicka här för att betala </a> + +
+", +"
Message Example
+ +<p>Dear {{ doc.contact_person }},</p> + +<p>Requesting payment for {{ doc.doctype }}, {{ doc.name }} for {{ doc.grand_total }}.</p> + +<a href=""{{ payment_url }}""> click here to pay </a> + +
+","
Meddelande Exempel
+ +<p>Hej {{ doc.contact_person }},</p> + +<p>Begär betalning för {{ doc.doctype }}, {{ doc.name }} för {{ doc.grand_total }}.</p> + +<a href=""{{ payment_url }}""> klicka här för att betala </a> + +
+", +"Masters & Reports","Inställningar & Rapporter", +"Quick Access","Genvägar", +"Reports & Masters","Rapporter & Inställningar", +"Reports & Masters","Rapporter & Inställningar", +"Settings","Inställningar", +"Shortcuts","Genvägar", +"Your Shortcuts + + + + + + ","Genvägar + + + + + + ", +"Your Shortcuts","Genvägar", +Grand Total: {0},Totalt: {0}, +Outstanding Amount: {0},Utestående belopp: {0}, +" + + + + + + + + + + + + + + + + + +
Child DocumentNon Child Document
+

To access parent document field use parent.fieldname and to access child table document field use doc.fieldname

+ +
+

To access document field use doc.fieldname

+
+

Example: parent.doctype == ""Stock Entry"" and doc.item_code == ""Test""

+ +
+

Example: doc.doctype == ""Stock Entry"" and doc.purpose == ""Manufacture""

+
+ + + + + + +"," + + Underordnad Dokument + Överordnad Dokument + + + + + +

För att komma åt överordnad dokument fält använd parent.fieldname och för att komma åt underordnad dokument fält använd doc.fieldname

+ + + +

För att komma åt dokument fält använd doc.fieldname

+ + + + +

Exampel: parent.doctype == ""Stock Entry"" and doc.item_code == ""Test""

+ + + +

Exampel: doc.doctype == ""Stock Entry"" and doc.purpose == ""Produktion""

+ + + + + + + + + + + +", +A Holiday List can be added to exclude counting these days for the Workstation.,Helg Lista kan läggas till för att utesluta dessa dagar för Arbetsstation., +A Packing Slip can only be created for Draft Delivery Note.,Packsedel kan endast skapas för utkast till Försäljning Följesedel., +"A Price List is a collection of Item Prices either Selling, Buying, or both","Prislista är samling av artikel priser som antingen säljs, köpes eller båda", +A Reconciliation Job {0} is running for the same filters. Cannot reconcile now,Avstämning jobb {0} körs för samma filter. Kan inte stämma av nu, +A Transaction Deletion Document: {0} is triggered for {0},Transaktion Borttagning jobb utlöst för {0} , +A customer must have primary contact email.,Kund måste ha primär kontakt e-post adress., +A driver must be set to submit.,Förare måste anges för att godkänna., +A template with tax category {0} already exists. Only one template is allowed with each tax category,Mall med moms kategori {0} finns redan. Endast en mall är tillåten med varje moms kategori, +API Details,API Detaljer, +AWB Number,AWB Nummer, +Abbreviation: {0} must appear only once,Förkortning: {0} får endast visas en gång, +About Us Settings,Om Oss Inställningar, +About {0} minute remaining,Cirka {0} minut kvar, +About {0} minutes remaining,Cirka {0} minuter kvar, +About {0} seconds remaining,Cirka {0} sekunder kvar, +Acceptance Criteria Formula,Acceptans Kriterier Formel , +Acceptance Criteria Value,Acceptans Kriterier Värde, +Accepted Qty in Stock UOM,Godkänd Kvantitet (per Lager Enhet), +Access Key,Åtkomst Nyckel, +Access Key is required for Service Provider: {0},Åtkomst Nyckel erfordras för Tjänsteleverantör: {0}, +Account Balance (From),Konto Saldo (Från), +Account Balance (To),Konto Saldo (Till), +Account Closing Balance,Konto Stängning Saldo, +Account Currency (From),Konto Valuta (Från), +Account Currency (To),Konto Valuta (Till), +Account Opening Balance,Öppning Saldo, +Account not Found,Konto ej funnen, +Account {0} added multiple times,Konto {0} har lagts till flera gånger, +Accounting Dimension Filter,Bokföring Dimension Filter, +Accounting Dimensions Filter,Bokföring Dimension Filter, +Accounting Entry for {0},Bokföring Post för {0}, +Accounts Closing,Bokföring Låsning, +Accounts Missing Error,Konton Saknas Fel, +Accounts Receivable/Payable,Fordringar/Skulder, +Accounts to Merge,Konton som ska Slås Samman, +Action If Quality Inspection Is Rejected,Åtgärd om Kvalitet Kontroll är Avvisad, +Action If Same Rate is Not Maintained,Åtgärd om Marginal inte Bibehålls, +Action if Same Rate is Not Maintained Throughout Sales Cycle,Åtgärd om samma Pris inte bibehålls under Försäljning, +Active Status,Aktiv Status, +Actual Balance Qty,Faktiskt Saldo Kvantitet, +Actual Expense,Faktisk Kostnad, +Actual Posting,Faktisk Postning, +Actual Qty in Warehouse,Faktisk Kvantitet på Lager, +Actual Time,Verklig Tid, +Add Columns in Transaction Currency,Lägg till kolumner i Transaktion Valuta, +Add Corrective Operation Cost in Finished Good Valuation,Lägg till Korrigerande Driftkostnad i Färdig Artikel, +Add Discount,Lägg till Rabatt, +Add Items in the Purpose Table,Lägg till Artiklar i Syfte Tabell, +Add Lead to Prospect,Lägg till Potentiell Kund till Prospekt, +Add Local Holidays,Lägg till Lokal Helgdag, +Add Manually,Lägg till Manuellt, +Add Or Deduct,Lägg till eller Dra av, +Add Serial / Batch Bundle,Lägg till Serie / Parti Paket, +Add Serial / Batch No,Lägg till Serie/Parti Nummer, +Add Serial / Batch No (Rejected Qty),Lägg till Serie/Parti Nummer (Avvisad Kvantitet), +Add Stock,Lägg till Lager, +Add Sub Assembly,Lägg till Delmontering, +Add Template,Lägg till Mall, +Add a Note,Lägg till Notering, +Add details,Lägg till Detaljer, +Add to Prospect,Lägg till Prospekt, +Added By,Lagt till Av, +Added On,Tillagd, +Added Supplier Role to User {0}.,Lade till Leverantör Roll till Användare {0}., +Added {1} Role to User {0}.,Lade till {1} roll till användare {0}., +Adding Lead to Prospect...,Lägger till Potentiell Kund..., +Additional,Extra, +Additional Asset Cost,Extra Tillgång Kostnad, +Additional Cost Per Qty,Extra Kostnad per Kvantitet, +Additional Info,Extra Information, +Address And Contacts,Adress & Kontakter, +Adjust Asset Value,Justera Tillgång Värde, +Adjustment Against,Justering Mot, +Adjustment based on Purchase Invoice rate,Justering Baserad på Inköp Faktura Pris, +Advance Account: {0} must be in either customer billing currency: {1} or Company default currency: {2},Förskott Konto: {0} måste vara antingen i kundens fakturering valuta: {1} eller bolag standard valuta: {2}, +Advance Payment,Förskott Betalning, +Advance Tax,Förskott Moms, +Advance Taxes and Charges,Förskott Moms och Avgifter, +Advance paid against {0} {1} cannot be greater than Grand Total {2},Förskott Betalning mot {0} {1} kan inte vara större än Totalt Belopp {2}, +Advance payments allocated against orders will only be fetched,Förskott betalningar allokerade mot order kommer att hämtas, +Affected Transactions,Berörda Transaktioner, +Against Customer Order {0},Mot Kund Order {0}, +Against Supplier Invoice {0},Mot Leverantör Faktura {0}, +Against Voucher No,Mot Verifikat Nummer, +Age ({0}),Ålder ({0}), +Ageing Range,Åldring Intervall, +Agent Busy Message,Agent Upptaget Meddelande, +Agent Group,Agent Grupp, +Agent Unavailable Message,Agent Otillgänglig Meddelande, +Aggregate a group of Items into another Item. This is useful if you are maintaining the stock of the packed items and not the bundled item,Paketera flera Artiklar till ett annat Artikel. Användbart om lager baseras på packade artiklar och inte ingående artiklar, +Algorithm,Algoritm, +All Activities,Alla Aktivitet, +All Activities HTML,Alla Aktivitet HTML, +All Items,Alla Artiklar, +All Sales Transactions can be tagged against multiple Sales Persons so that you can set and monitor targets.,Alla försäljning transaktioner kan taggas mot flera säljare för att ange och övervaka mål., +All allocations have been successfully reconciled,Alla tilldelningar är avstämda, +All items have already been received,Alla Artiklar är redan mottagna, +All items in this document already have a linked Quality Inspection.,Alla Artiklar i detta dokument har redan länkad Kvalitet Kontroll., +All the Comments and Emails will be copied from one document to another newly created document(Lead -> Opportunity -> Quotation) throughout the CRM documents.,Alla kommentarer och E-post meddelande kommer att kopieras från ett dokument till ett annat nyskapad dokument (Potentiell Kund -> Möjlighet -> Försäljning Offert) genom hela Säljstöd process., +"All the required items (raw materials) will be fetched from BOM and populated in this table. Here you can also change the Source Warehouse for any item. And during the production, you can track transferred raw materials from this table.",Alla nödvändiga artiklar (råmaterial) kommer att hämtas från stycklista och läggs till denna tabell. Här kan du också ändra hämtlager för valfri artikel. Och under produktion kan du spåra överförd råmaterial från denna tabell., +Allocate Payment Request,Tilldela Betalning Begäran, +Allocated Entries,Tilldelade Poster, +Allocated To:,Tilldelad Till:, +Allocations,Tilldelningar, +Allow,Tillåt, +Allow Alternative Item must be checked on Item {},Tillåt Alternativ Artikel måste vara vald för Artikel {}, +Allow Continuous Material Consumption,Tillåt Kontinuerlig Material Förbrukning, +Allow Excess Material Transfer,Tillåt Överflödig Material Överföring, +Allow Internal Transfers at Arm's Length Price,Tillåt Interna Överföringar till Marknad Pris, +Allow Item to be Added Multiple Times in a Transaction,Tillåt att Artikel läggs till flera gånger i Transaktion, +Allow Lead Duplication based on Emails,Tillåt Potentiella Kunder Duplicering baserat på E-post Meddelande, +Allow Negative rates for Items,Tillåt Negativa Priser för Artiklar, +Allow Or Restrict Dimension,Tillåt eller Begränsa Dimension, +Allow Partial Reservation,Tillåt Partiell Reservation, +Allow Purchase,Tillåt Inköp, +Allow Sales,Tillåt Försäljning, +Allow Sales Order Creation For Expired Quotation,Tillåt att Försäljning Order skapas för Förfallen Försäljning Offert, +Allow User to Edit Discount,Tillåt Användare att Redigera Rabatt, +Allow User to Edit Rate,Tillåt Användare att Redigera Pris, +Allow Zero Rate,Tillåt Noll Pris, +Allow material consumptions without immediately manufacturing finished goods against a Work Order,Tillåt Material Förbrukning utan att omedelbart producera färdiga artiklar mot Arbetsorder, +Allow multi-currency invoices against single party account ,Tillåt Fler Valuta Fakturor mot Parti Konto, +Allow to Edit Stock UOM Qty for Purchase Documents,Tillåt att redigera Lager Enhet Kvantitet för Inköp Dokument, +Allow to Edit Stock UOM Qty for Sales Documents,Tillåt att redigera Lager Enhet Kvantitet för Försäljning Dokument, +Allow transferring raw materials even after the Required Quantity is fulfilled,Tillåt överföring av råmaterial även efter att Erfordrad Kvantitet är uppfylld, +Allowed,Tillåten, +Allowed Dimension,Tillåten Dimension, +Allowed Doctypes,Tillåtna Dokument, +Allowed Items,Tillåtna Artiklar, +Allowed primary roles are 'Customer' and 'Supplier'. Please select one of these roles only.,Tillåtna primära roller är 'Kund' och 'Leverantör'. Välj endast en av dessa roller., +Allows to keep aside a specific quantity of inventory for a particular order.,Tillåter reservation av specifierad artikel kvantitet för angiven order., +Already Picked,Redan Plockad, +Alternative Items,Alternativa Artiklar, +"Alternatively, you can download the template and fill your data in.",Alternativt kan du ladda ner mall och fylla i dina uppgifter., +Amount (AED),Belopp (AED), +Amount Eligible for Commission,Provision Belopp, +Amount in Account Currency,Belopp i Konto Valuta, +Amount in party's bank account currency,Belopp i partens Bank Konto Valuta, +Amount in transaction currency,Belopp i transaktion valuta, +An Item Group is a way to classify items based on types.,Artikel grupp är ett sätt att klassificera artiklar baserat på typer., +An error has been appeared while reposting item valuation via {0},Fel har uppstått vid ompostering av artikel värdering via {0}, +An error has occurred during {0}. Check {1} for more details,Fel har uppstått under {0}. Kontrollera {1} för mer information,Error Log +Annual Revenue,Årlig Omsätning, +"Another Cost Center Allocation record {0} applicable from {1}, hence this allocation will be applicable upto {2}","Annan Resultat Enhet Tilldelning Post {0} är tillämplig från {1}, därför kommer denna tilldelning att gälla upp till {2}", +"Any one of following filters required: warehouse, Item Code, Item Group","Något av följande filter erfordras: Lager, Artikelkod, Artikelgrupp", +Applicable Dimension,Tillämpad Dimension, +Applicable On Account,Tillämplig På Konto, +Applied on each reading.,Tillämpas vid varje läsning., +Applied putaway rules.,Tillämpad Läggundan Regler, +Apply Putaway Rule,Tillämpa Lägg Undan Regel, +Apply Recursion Over (As Per Transaction UOM),Tillämpa Rekursion Över (per Transaktion Enhet), +Apply SLA for Resolution Time,Tillämpa Service Nivå Avtal för Resolution Tid, +Apply TDS,Tillämpa TDS, +Apply Tax Withholding Amount ,Tillämpa Moms Avdrag Belopp, +Apply restriction on dimension values,Tillämpa begränsning på dimension värde, +Apply to All Inventory Documents,Tillämpa på Alla Lager Dokument, +Apply to Document,Tillämpa på Dokument, +Appointment Created Successfully,Möte Bokad!, +Appointment Scheduling Disabled,Bokning av Möten Inaktiverad, +Appointment Scheduling has been disabled for this site,Bokning av Möten är Inaktiverad för denna Webbplats, +Appointment was created. But no lead was found. Please check the email to confirm,Möte Skapad. Men inget Poteentiel Kund hittades. Kontrollera e-post meddelande för att bekräfta, +Approximately match the description/party name against parties,Ungefärlig avstämning av beskrivning/partinamn mot parti, +Are you sure you want to clear all demo data?,Är du säker på att du vill ta bort alla demodata?, +Are you sure you want to delete this Item?,Är du säker på att du vill ta bort detta Artikel?, +Are you sure you want to restart this subscription?,Är du säker på att du vill starta om denna prenumeration?, +As on Date,Som den, +"As there are existing submitted transactions against item {0}, you can not change the value of {1}.",Eftersom det finns befintliga godkäAda transaktioner mot artikel {0} kan man inte ändra värdet på {1}., +"As there are negative stock, you can not enable {0}.",Eftersom det finns negativ lager kan du inte aktivera {0}., +"As there are reserved stock, you cannot disable {0}.",Eftersom det finns reserverat lager kan du inte inaktivera {0}., +"As there are sufficient Sub Assembly Items, Work Order is not required for Warehouse {0}.",Eftersom det finns tillräckligt med Undermontering Artiklar erfordras inte Arbetsorder för Lager {0}., +"As {0} is enabled, you can not enable {1}.",Eftersom {0} är aktiverad kan du inte aktivera {1}., +Assembly Items,Montering Artiklar, +Asset Activity,Tillgång Aktivitet, +Asset Capitalization,Tillgång Bokning, +Asset Capitalization Asset Item,Tillgång Bokning Tillgång Post, +Asset Capitalization Service Item,Tillgång Bokning Service Post, +Asset Capitalization Stock Item,Tillgång Bokning Lager Post, +Asset Depreciation Details,Tillgång Avskrivning Detaljer, +Asset Depreciation Schedule,Tillgång Avskrivning Schema, +Asset Depreciation Schedule for Asset {0} and Finance Book {1} is not using shift based depreciation,Tillgång Avskrivning Schema för Tillgång {0} och Finans Register {1} använder inte skift baserad avskrivning, +Asset Depreciation Schedule not found for Asset {0} and Finance Book {1},Tillgång Avskrivning Schema finns inte för Tillgång {0} och Finans Register {1}, +Asset Depreciation Schedule {0} for Asset {1} already exists.,Tillgång Avskrivning Schema {0} för Tillgång {1} finns redan., +Asset Depreciation Schedule {0} for Asset {1} and Finance Book {2} already exists.,Tillgång Avskrivning Schema {0} för Tillgång {1} och Finans Register {2} finns redan., +"Asset Depreciation Schedules created:
{0}

Please check, edit if needed, and submit the Asset.",Tillgång Avskrivning Schema skapades:
{0}

Kontrollera och Godkänn Tillgång., +Asset ID,Tillgång ID, +Asset Quantity,Tillgång Antal, +Asset Repair Consumed Item,Tillgång Bokning Förbrukad Post, +Asset Settings,Tillgång Inställningar, +Asset Shift Allocation,Tillgång Skift Tilldelning, +Asset Shift Factor,Tillgång Förskjutning Faktor, +Asset Shift Factor {0} is set as default currently. Please change it first.,Tillgång Förskjutning Faktor {0} är för närvarande angiven som standard. Vänligen ändra det först., +Asset cancelled,Tillgång Annullerad, +Asset capitalized after Asset Capitalization {0} was submitted,Tillgång kapitaliserad efter att Tillgång Kapitalisering {0} godkändes , +Asset created,Tillgång Skapad, +Asset created after Asset Capitalization {0} was submitted,Tillgång skapad efter att Tillgång Kapitalisering {0} godkändes, +Asset created after being split from Asset {0},Tillgång skapad efter att ha delats från Tillgång {0}, +Asset decapitalized after Asset Capitalization {0} was submitted,Tillgång avkapitaliserad efter att Tillgång Kapitalisering {0} godkändes, +Asset deleted,Tillgång Borttagen, +Asset issued to Employee {0},Tillgång utfärdad till Personal {0}, +Asset out of order due to Asset Repair {0},Tillgång ur funktion på grund av reparation av Tillgång {0}, +Asset received at Location {0} and issued to Employee {1},Tillgång mottagen på plats {0} och utfärdad till Personal {1}, +Asset restored,Tillgång återställd, +Asset restored after Asset Capitalization {0} was cancelled,Tillgång återställd efter att Tillgång Kapitalisering {0} annullerats, +Asset returned,Tillgång återlämnad, +Asset scrapped,Tillgång skrotad, +Asset sold,Tillgång Såld, +Asset submitted,Tillgång Godkänd, +Asset transferred to Location {0},Tillgång överförd till Plats {0}, +Asset updated after being split into Asset {0},Tillgång uppdaterad efter att ha delats upp i Tillgång {0}, +Asset updated after cancellation of Asset Repair {0},Tillgång uppdaterad efter annullering av Tillgång Reparation {0}, +Asset updated after completion of Asset Repair {0},Tillgång uppdaterad efter slutförande av Tillgång Reparation {0}, +Asset {0} cannot be received at a location and given to an employee in a single movement,Tillgång {0} kan inte tas emot på plats och ges till Personal i en enda rörelse, +Asset {0} does not belong to Item {1},Tillgång {0} tillhör inte Post {1}, +Asset {0} does not exist,Tillgång {0} finns inte, +Asset {0} has been created. Please set the depreciation details if any and submit it.,Tillgång {0} skapad. Ange avskrivning detaljer och godkänn den., +Asset {0} has been updated. Please set the depreciation details if any and submit it.,Tillgång {0} uppdaterad. Ange avskrivning detaljer och godkänn den., +Asset's depreciation schedule updated after Asset Shift Allocation {0},Tillgång Avskrivning Schema uppdaterad efter Tillgång Förskjutning Tilldelning {0}, +Asset's value adjusted after cancellation of Asset Value Adjustment {0},Tillgång Värde Justerat efter annullering av Tillgång Värde Justering {0}, +Asset's value adjusted after submission of Asset Value Adjustment {0},Tillgångens Värde Justerat efter godkänade av Tillgång Värde Justering {0}, +Assign Job to Employee,Tilldela jobb till Personal, +Assignment,Tilldelning, +Assignment Conditions,Tilldelning Villkor, +At Row #{0}: The picked quantity {1} for the item {2} is greater than available stock {3} for the batch {4} in the warehouse {5}.,På rad #{0}: Plockad kvantitet {1} för artikel {2} är större än tillgänglig kvantitet {3} för parti {4} i lager {5}., +At Row #{0}: The picked quantity {1} for the item {2} is greater than available stock {3} in the warehouse {4}.,På rad #{0}: Plockad kvantitet {1} för artikel {2} är större än tillgänglig kvantitet {3} i lager {4}., +At row {0}: Batch No is mandatory for Item {1},Rad {0}: Parti Nummer erfordras för Artikel {1}, +At row {0}: Parent Row No cannot be set for item {1},Rad {0}: Överordnad rad nummer kan inte anges för artikel {1}, +At row {0}: Qty is mandatory for the batch {1},Rad {0}: Kvantitet erfordras för Artikel {1}, +At row {0}: Serial No is mandatory for Item {1},Rad {0}: Serie Nummer erfordras för Artikel {1}, +At row {0}: Serial and Batch Bundle {1} has already created. Please remove the values from the serial no or batch no fields.,Rad {0}: Serie och Parti Paket {1} år redan skapad. Ta bort värde från serienummer eller parti nummer fält., +At row {0}: set Parent Row No for item {1},Rad {0}: ange överordnad rad nummer för artikel {1}, +Attach CSV File,Bifoga CSV Fil, +Attendance & Leaves,Närvaro & Ledighet, +Attribute value: {0} must appear only once,Egenskap Värde: {0} får endast visas en gång, +Auto Create Exchange Rate Revaluation,Automatiskt Skapa Valuta Växling Kurs Omvärdering, +Auto Create Purchase Receipt,Automatiskt Skapa Inköp Följesedel, +Auto Create Serial and Batch Bundle For Outward,Automatiskt Skapa Serie Nummer och Parti Paket för Försäljning, +Auto Create Subcontracting Order, Automatiskt Skapa Underleverantör Order, +Auto Created Serial and Batch Bundle,Automatiskt Skapad Serie och Parti Paket, +Auto Creation of Contact,Automatiskt Skapa Kontakt, +Auto Email Report,Automatiskt E-post Rapport, +Auto Insert Item Price If Missing,Automatiskt Infoga Artikel Pris om det saknas, +Auto Name,Automatiskt, +Auto Reconcile,Automatiskt Avstämning, +Auto Reconcile Payments,Automatisk Betalning Avstämning, +Auto Reconciliation,Automatisk Avstämning, +Auto Reconciliation of Payments has been disabled. Enable it through {0},Automatisk Avstämning av Betalningar har inaktiverats. Aktivera genom {0}, +Auto Reserve Serial and Batch Nos,Automatisk Reservera Serie och Parti Nummer, +Auto Reserve Stock for Sales Order on Purchase,Automatisk Reservera Lager för Försäljning Order vid Inköp, +Auto close Opportunity Replied after the no. of days mentioned above,Automatiskt Stäng Besvarad Möjlighet efter ovan angivet antal dagar, +Auto match and set the Party in Bank Transactions,Automatiskt avstäm och ange Parti i Bank Transaktioner, +Auto write off precision loss while consolidation,Automatisk Avskrivning Precision av Förlust under Konsolidering, +Automatically Add Filtered Item To Cart,Automatiskt Lägg till Filtrerad Artikel till Kundkorg, +Automatically Fetch Payment Terms from Order,Automatikt Hämta Betalning Villkor från Order, +Automatically post balancing accounting entry,Automatiskt skapa balans bokföring post, +Available Batch Report,Tillgänglig Parti Rapport, +Available Qty For Consumption,Tillgänglig Kvantitet för Förbrukning, +Available Qty at Company,Tillgänglig Kvantitet, +Available Qty at Target Warehouse,Tillgänglig Kvantitet på Till Lager, +Available Qty to Reserve,Tillgängligt Kvantitet att Reservera, +Average Completion,Genomsnittlig Slutförande, +Avg Rate,Genomsnittlig Pris, +Avg Rate (Balance Stock),Genomsnittlig Pris (Lager Saldo), +BIN Qty,Lager Kvantitet, +BOM Created,Stycklista Skapad, +BOM Creator,Stycklista Generator, +BOM Creator Item,Stycklista Generator Post, +BOM Info,Stycklista Information, +BOM Level,Stycklista Nivå, +BOM Tree,Stycklista Träd, +BOM UoM,Stycklista Enhet, +BOM Update Batch,Stycklista Uppdatera Parti , +BOM Update Initiated,Stycklista Uppdatering Initierad, +BOM Update Log,Stycklista Uppdatering Logg, +BOM Update Tool Log with job status maintained,Stycklista Uppdatering Verktyg Logg med jobb status upprätthållen, +BOM Updation already in progress. Please wait until {0} is complete.,Stycklista Uppdatering pågår. Vänta tills {0} är klar., +BOM Updation is queued and may take a few minutes. Check {0} for progress.,Stycklista Uppdatering i kö och kan ta några minuter. Kontrollera {0} för framsteg., +BOM and Production,Stycklista & Produktion, +BOM recursion: {1} cannot be parent or child of {0},Stycklista Rekursion: {1} kan inte vara överordnad eller underordnad till {0}, +BOMs Updated,Stycklista Uppdaterad, +BOMs created successfully,Stycklista Skapad, +BOMs creation failed,Stycklista Skapande Misslyckades, +"BOMs creation has been enqueued, kindly check the status after some time",Skapandet av Stycklistor i Kö. Vänligen kontrollera status efter en tid, +Balance Qty (Stock),Saldo Kvantitet (Lager), +Balance Sheet Summary,Balans Rapport Översikt, +Balance Stock Value,Saldo Lager Värde, +Bank Reconciliation Tool,Bank Avstämning Verktyg, +Bank Statement Import,Bank Avstämning Import, +Bank Transaction {0} Matched,Bank Transaktion {0} avstämd, +Bank Transaction {0} added as Journal Entry,Bank Transaktion {0} har lagts till som Journal Post, +Bank Transaction {0} added as Payment Entry,Bank Transaktion {0} har lagts till som Betalning Post, +Bank Transaction {0} is already fully reconciled,Bank Transaktion {0} är redan helt avstämd, +Bank Transaction {0} updated,Bank Transaktion {0} uppdaterad, +Bank/Cash Account,Bank / Kassa Konto, +Bank/Cash Account {0} doesn't belong to company {1},Bank / Kassa Konto {0} tillhör inte bolag {1}, +Base Amount,Bas Belopp, +Base Cost Per Unit,Bas Kostnad per Enhet, +Base Rate,Bas Pris, +Base Tax Withholding Net Total,Bas Netto Totalt Ex Moms , +Base Total,Bas Totalt, +Base Total Billable Amount,Bas Totalt Fakturerbar Belopp, +Base Total Billed Amount,Bas Totalt Fakturerad Belopp, +Base Total Costing Amount,Bas Totalt Kostnad Belopp, +Based On Value,Baserad på Värde, +"Based on your HR Policy, select your leave allocation period's end date",Baserat på din Personal Princip välj slutdatum för din ledighet tilldelning, +"Based on your HR Policy, select your leave allocation period's start date",Baserat på din Personal Princip väljstart datum för ledighet period, +Batch Expiry Date,Parti Förfallodatum, +Batch No is mandatory,Parti Nummer erfordras, +Batch No {0} does not exists,Parti Nummer {0} finns inte, +Batch No {0} is linked with Item {1} which has serial no. Please scan serial no instead.,Parti Nummer {0} är länkat till Artikel {1} som har serie nummer. Skanna serie nummer istället., +Batch No.,Parti Nummer, +Batch Nos,Parti Nummer, +Batch Nos are created successfully,Parti Nummer Skapade, +Batch Not Available for Return,Parti Ej Tillgänglig för Retur, +Batch Qty,Parti Kvantitet, +Batch and Serial No,Parti och Serie Nummer, +Batch not created for item {} since it does not have a batch series.,Parti är inte skapad för Artikel {} eftersom den inte har Parti Nummer., +Batch {0} and Warehouse,Parti {0} och Lager, +Batch {0} is not available in warehouse {1},Parti {0} är inte tillgängligt i lager {1}, +Batchwise Valuation,Värdering per Parti, +Beginning of the current subscription period,Början av aktuell prenumeration period, +Below Subscription Plans are of different currency to the party default billing currency/Company currency: {0},Nedan Prenumeration Planer är i annan valuta än Parti standard valuta/bolag valuta: {0}, +Bill for Rejected Quantity in Purchase Invoice,Faktura för Avvisad Kvantitet i Inköp Faktura, +Billed Items To Be Received,Fakturerade Artiklar att Ta Emot, +"Billed, Received & Returned","Fakturerad,Mottagen & Returnerad", +Billing Address Details,Faktura Adress Detaljer, +Billing Interval in Subscription Plan must be Month to follow calendar months,Fakturering Intervall i Prenumeration Plan måste vara Månad för att följa kalender månader, +Bisect Accounting Statements,Halvera Bokföring Rapporter, +Bisect Left,Bisekt Vänster, +Bisect Nodes,Halvera Noder, +Bisect Right,Halvera Höger, +Bisecting From,Halvera Från, +Bisecting Left ...,Halverar Vänster..., +Bisecting Right ...,Halverar Höger..., +Bisecting To,Halverar Till, +Blanket Order Allowance (%),Blankoavtal Order Tillåtelse (%), +Bom No,Stycklista Nummer, +Book Advance Payments as Liability option is chosen. Paid From account changed from {0} to {1}.,Bokför Förskott Betalningar eftersom Skuld alternativ är vald. Betald från konto har ändrats från {0} till {1}., +Book Advance Payments in Separate Party Account,Bokför Förskott Betalningar på Separat Konto, +Book Tax Loss on Early Payment Discount,Bokför Moms Bortfall vid Tidig Betalning Rabatt, +Book an appointment,Boka Möte, +Booking stock value across multiple accounts will make it harder to track stock and account value.,Bokföring av Lager Värde på flera Konto gör det svårare att spåra lager och konto värde., +Books have been closed till the period ending on {0},Bokföring är låst till {0}, +Both Payable Account: {0} and Advance Account: {1} must be of same currency for company: {2},Både Skuld Konto: {0} och Förskott Konto: {1} måste vara i samma valuta för bolag: {2}, +Both Receivable Account: {0} and Advance Account: {1} must be of same currency for company: {2},Både Fordring Konto: {0} och Förskott Konto: {1} måste vara i samma valuta för bolag: {2}, +Both {0} Account: {1} and Advance Account: {2} must be of same currency for company: {3},Både {0} Konto: {1} och Förskott Konto: {2} måste vara i samma valuta för bolag: {3}, +Budget Exceeded,Budget Överskriden, +Buildable Qty,Producerbart Kvantitet, +Bulk Transaction Log,Mass Transaktion Logg, +Bulk Transaction Log Detail,Mass Transaktion Logg Detaljer, +Bulk Update,Mass Uppdatera, +Bundle Items,Paketera Artiklar, +Buying & Selling Settings,Inköp & Försäljning Inställningar, +Buying and Selling,Inköp & Försäljning, +"By default, the Supplier Name is set as per the Supplier Name entered. If you want Suppliers to be named by a Naming Series choose the 'Naming Series' option.","Som standard är leverantör namn satt enligt angiven Leverantörs Namn. Om man vill att leverantörer ska namnges av Nummer Serie Välj 'Nummer Serie'", +Bypass credit check at Sales Order,Ignorera Kredit Kontroll vid Försäljning Order, +COGS By Item Group,Kostnad för Sålda Artiklar Efter Artikel Grupp, +COGS Debit,Kostnad för Sålda Artiklar Debet, +CRM Note,Säljstöd Anteckning, +CRM Settings,Säljstöd Inställningar, +Calculate Product Bundle Price based on Child Items' Rates,Beräkna Artikel Paket Pris baserat på Underordnade Artiklar priser, +Calculate daily depreciation using total days in depreciation period,Beräkna daglig avskrivning med hjälp av totalt antal dagar i avskrivningsperiod, +Call Again,Ring Igen, +Call Ended,Samtal Avslutad, +Call Handling Schedule,Samtal Hantering Schema, +Call Received By,Samtal Mottagen Av, +Call Receiving Device,Samtal Mottagning Enhet, +Call Routing,Samtal Dirigering, +Call Schedule Row {0}: To time slot should always be ahead of From time slot.,Samtal Schema Rad {0}: Till tid bör alltid ligga före Från tid., +Call Type,Samtal Typ, +Callback,Återuppringning, +Campaign Item,Kampanj Artikel, +Can not close Work Order. Since {0} Job Cards are in Work In Progress state.,"Kan inte stänga Arbetsorder, eftersom {0} Jobbkort har Arbete pågår status.", +"Can not filter based on Child Account, if grouped by Account","Kan inte filtrera baserat på Underordnad Konto, om grupperat efter konto", +"Can't change the valuation method, as there are transactions against some items which do not have its own valuation method","Kan inte ändra värdering sätt, eftersom det finns transaktioner mot vissa artiklar som inte har egen värdering sätt", +Can't disable batch wise valuation for active batches.,Kan inte inaktivera partivis värdering för aktiva partier., +Can't disable batch wise valuation for items with FIFO valuation method.,Kan inte inaktivera partivis värdering för artiklar med FIFO värdering metod., +Cannot Merge,Kan inte Slå Samman, +Cannot Resubmit Ledger entries for vouchers in Closed fiscal year.,Kan inte godkänna om Register Poster för verifikationer under stängt Bokföringsår., +"Cannot amend {0} {1}, please create a new one instead.","Kan inte ändra {0} {1}, skapa ny istället.", +Cannot apply TDS against multiple parties in one entry,Kan inte tillämpa TDS mot flera parter i en post, +Cannot cancel as processing of cancelled documents is pending.,Kan inte avbryta eftersom behandling av annullerade dokument väntar., +Cannot cancel the transaction. Reposting of item valuation on submission is not completed yet.,Kan inte annullera transaktion. Ompostering av artikel värdering vid godkännande är inte klar ännu., +Cannot change Reference Document Type.,Kan inte ändra Referens Dokument Typ, +Cannot complete task {0} as its dependant task {1} are not completed / cancelled.,Kan inte slutföra uppgift {0} eftersom dess beroende uppgift {1} inte har slutförts/avbrutits., +Cannot convert Task to non-group because the following child Tasks exist: {0}.,Kan inte konvertera uppgift till ej grupp eftersom följande underordnade uppgifter finns: {0}., +Cannot convert to Group because Account Type is selected.,Kan inte konvertera till Grupp eftersom Konto Typ är vald., +Cannot create Stock Reservation Entries for future dated Purchase Receipts.,Kan inte skapa Lager Reservation Poster för framtid daterade Inköp Följesedlar., +Cannot create a pick list for Sales Order {0} because it has reserved stock. Please unreserve the stock in order to create a pick list.,Kan inte skapa plocklista för Försäljning Order {0} eftersom den har reserverad lager. Vänligen avboka lager för att skapa plocklista., +Cannot create accounting entries against disabled accounts: {0},Kan inte skapa bokföring poster mot inaktiverade konto: {0}, +Cannot disable batch wise valuation for FIFO valuation method.,Kan inte inaktivera partivis värdering för FIFO värdering metod., +Cannot enqueue multi docs for one company. {0} is already queued/running for company: {1},Kan inte ställa flera dokument i kö för ett bolag. {0} är redan i kö/körs för bolag: {1}, +Cannot find a default warehouse for item {0}. Please set one in the Item Master or in Stock Settings.,Kan inte hitta standardlager för artikel {0}. Ange det i Artikelinställningar eller i Lagerinställningar., +Cannot make any transactions until the deletion job is completed,Kan inte skapa transaktioner förrän borttagning jobb är slutfört, +Cannot produce more item for {0},Kan inte producera fler artiklar för {0}, +Cannot produce more than {0} items for {1},Kan inte producera mer än {0} artiklar för {1}, +Cannot receive from customer against negative outstanding,Kan inte ta emot från kund mot negativt utestående, +Cannot retrieve link token for update. Check Error Log for more information,Kan inte hämta länk token för uppdatering Kontrollera Fellogg för mer information, +Cannot retrieve link token. Check Error Log for more information,Kan inte hämta länk token. Se fellogg för mer information, +Cannot {0} from {2} without any negative outstanding invoice,Kan inte {0} från {2} utan någon negativ utestående faktura, +Capacity (Stock UOM),Kapacitet (Lager Enhet), +Capacity in Stock UOM,Kapacitet i Lager Enhet, +Capacity must be greater than 0,Kapacitet måste vara högre än 0, +Capitalization,Kapitalisering, +Capitalization Method,Kaptitalisering Sätt, +Capitalize Asset,Kapitalisera Tillgång, +Capitalize Repair Cost,Kapitalisera Reparation Kostnad, +Capitalized,Kapitaliserad, +Carrier,Transportör, +Carrier Service,Transportör Service, +Carry Forward Communication and Comments,Vidarebefordra E-post och Kommentarer, +Category Details,Kategori Detaljer, +Caution: This might alter frozen accounts.,Varning: Detta kan ändra låsta konto., +Change in Stock Value,Förändring i Lager Värde, +Changed customer name to '{}' as '{}' already exists.,Ändrade kund namn till '{}' eftersom '{}' redan finns., +Changes,Ändringar, +Charge of type 'Actual' in row {0} cannot be included in Item Rate or Paid Amount,"Debitering av typ ""Verklig"" i rad {0} kan inte inkluderas i Artikel Pris eller Betald Belopp", +Chart Of Accounts,Kontoplan, +Checked On,Kontrollerad, +Checking this will round off the tax amount to the nearest integer,Om vald avrundas moms belopp till närmaste heltal, +Cheques and Deposits Incorrectly cleared,Checkar och Depositioner felaktigt avstämda, +Choose a WIP composite asset,Välj pågående arbete Sammansatt Tillgång, +Clear Demo Data,Tar Bort Demo Data... , +Clear Notifications,Rensa Noteringar, +Clearing Demo Data...,Tar Bort Demo Data..., +Click on 'Get Finished Goods for Manufacture' to fetch the items from the above Sales Orders. Items only for which a BOM is present will be fetched.,"Klicka på ""Hämta Färdiga Artiklar för Produktion"" för att hämta artiklar från ovanstående Försäljning Ordrar. Endast artiklar för vilka det finns stycklista kommer att hämtas.", +Click on Add to Holidays. This will populate the holidays table with all the dates that fall on the selected weekly off. Repeat the process for populating the dates for all your weekly holidays,Klicka på 'Lägg till Helgdagar'. Detta kommer att fylla helg tabell med alla datum som infaller på valda veckovis ledighet. Upprepa processen för att fylla i datum för alla helgdagar, +Click on Get Sales Orders to fetch sales orders based on the above filters.,Klicka på 'Hämta Försäljning Order' för att hämta Försäljning Ordrar baserade på ovanstående filter., +Click to add email / phone,Klicka på att lägga till e-post / telefon, +Close Replied Opportunity After Days,Stäng Besvarad Möjlighet Efter Dagar, +Closed Work Order can not be stopped or Re-opened,Stängd Arbetsorder kan inte stoppas eller öppnas igen, +Closing,Stänger, +Closing Balance as per Bank Statement,Stängning Saldo enligt Bank, +Closing Balance as per ERP, Stängning Saldo enligt System, +Closing Stock Balance,Stängning Lager Saldo, +Columns are not according to template. Please compare the uploaded file with standard template,Kolumner är inte enligt mall. Jämför uppladdad fil med standardmall, +Communication Channel,Kommunikation Kanal, +Company Address Display,Bolag Adress Visning, +Company Billing Address,Bolag Faktura Adress, +Company Details,Bolag Detaljer, +Company Shipping Address,Bolag Leverans Adress, +Company Tax ID,Org.Nr., +Company and Posting Date is mandatory,Bolag och Bokföring Datum erfordras, +Company is mandatory,Bolag Erfordras, +Company is mandatory for generating an invoice. Please set a default company in Global Defaults.,Bolag erfordras för att skapa faktura. Ange standard bolag i Standard Inställningar., +Company which internal customer represents,Bolag som intern kund representerar, +Company which internal customer represents.,Bolag som intern kund representerar., +Company which internal supplier represents,Bolag som intern leverantör representerar, +Company {0} is added more than once,Bolag{0} har lagts till mer än en gång, +Company {} does not exist yet. Taxes setup aborted.,Bolag {} finns inte ännu. Moms inställning avbröts., +Company {} does not match with POS Profile Company {},Bolag {} stämmer inte med Kassa Profil Bolag {}, +Competitor,Konkurrent, +Competitor Detail,Konkurrent Detaljer, +Competitor Name,Konkurrent Namn, +Competitors,Konkurrenter, +Complete Job,Slutför Jobb, +Complete Order,Slutför Order, +Completed On,Slutförd, +Completed On cannot be greater than Today,Klar datum kan inte vara senare än idag, +Completed Tasks,Antal Klara Uppgifter, +Completed Time,Klar Tid, +Completion Date can not be before Failure Date. Please adjust the dates accordingly.,Slutförande datum kan inte vara före fel datum. Justera datum därefter., +Conditional Rule,Villkor Regel, +Conditional Rule Examples,Villkor Regel Exempel, +Configure Product Assembly,Konfigurera Artikel Produktion, +Configure the action to stop the transaction or just warn if the same rate is not maintained.,Konfigurera åtgärd att stoppa transaktion eller varna om Marginal inte bibehålls., +Connections,Anslutningar, +Consider Entire Party Ledger Amount,Inkludera Hela Partibok Belopp, +Consider Minimum Order Qty,Inkludera Minimum Order Kvantitet, +Consider Rejected Warehouses,Inkludera Avvisad Lager , +Considered In Paid Amount,Moms Inkluderad i Betald Belopp, +Consolidate Sales Order Items,Konsolidera Försäljning Order Artiklar, +Consolidate Sub Assembly Items,Konsolidera Delmontering Artiklar, +Consumed Asset Items is mandatory for Decapitalization,Förbrukade Tillgång Artiklar erfordras för Dekapitalisering, +Consumed Asset Total Value,Förbrukad Tillgång Totalt Värde, +Consumed Assets,Förbrukade Tillgångar, +Consumed Quantity,Förbrukad Kvantitet, +Consumed Stock Items,Förbrukade Lager Artiklar, +Consumed Stock Items or Consumed Asset Items are mandatory for creating new composite asset,Förbrukade Lager Artiklar eller Förbrukade Tillgång Artiklar erfordras för att skapa ny sammansatt tillgång, +"Consumed Stock Items, Consumed Asset Items or Consumed Service Items is mandatory for Capitalization","Förbrukade Lager Artiklar, Förbrukade Tillgång Artiklar eller Förbrukade Service Artiklar erfordras för Kapitalisering", +Consumed Stock Total Value,Förbrukad Lager Totalt Värde, +Consumption Rate,Förbrukning Värde, +Contact Details,Kontakt Uppgifter, +Contact Mobile,Kontakt Mobil, +Contact Us Settings,Kontakta Oss Inställningar, +Contacts,Kontakter, +Contract Template Help,Avtal Mall Hjälp, +Contribution Qty,Bidrag Kvantitet, +Control Historical Stock Transactions,Kontroll Tidigare Lager Transaktioner, +Conversion factor for item {0} has been reset to 1.0 as the uom {1} is same as stock uom {2}.,"Konvertering faktor för artikel {0} är återställd till 1,0 eftersom enhet {1} är samma som lager enhet {2}.", +Convert Item Description to Clean HTML in Transactions,Konvertera Artikel Beskrivning till ren HTML i Transaktioner, +Convert to Group,Konvertera till Grupp,Warehouse +Convert to Item Based Reposting,Konvertera till Artikel Baserad Ompostering, +Convert to Ledger,Konvertera till Register,Warehouse +Core,System, +Corrective Job Card,Korrigerande Jobbkort, +Corrective Operation,Korrigerande Åtgärd, +Corrective Operation Cost,Korrigerande Åtgärd Kostnad, +Cost Center Allocation,Resultat Enhet Tilldelning, +Cost Center Allocation Percentage,Resultat Enhet Procentuell Tilldelning , +Cost Center Allocation Percentages,Resultat Enhet Procentuell Tilldelning, +Cost Center For Item with Item Code {0} has been Changed to {1},Resultat Enhet för Artikel med Artikelkod {0} har ändrats till {1}, +"Cost Center is a part of Cost Center Allocation, hence cannot be converted to a group",Resultat Enhet är del av Resultat Enhet Tilldelning och kan därför inte konverteras till grupp, +Cost Center with Allocation records can not be converted to a group,Resultat Enhet med tilldelning poster kan inte konverteras till grupp, +Cost Center {0} cannot be used for allocation as it is used as main cost center in other allocation record.,Resultat Enhet {0} kan inte användas för tilldelning eftersom det används som Huvud Resultat Enhet i annan tilldelning post., +Cost Center {} doesn't belong to Company {},Resultat Enhet {} tillhör inte bolag {}, +Cost Center {} is a group cost center and group cost centers cannot be used in transactions,Resultat Enhet {} är Grupp Resultat Enhet och Grupp Resultat Enhet kan inte användas i transaktioner, +Cost Configuration,Kostnad Inställning, +Cost Per Unit,Kostnad Per Enhet, +Cost of New Capitalized Asset,Kostnad för ny Kapitaliserad Tillgång, +Cost of Poor Quality Report,Kostand för Dålig Kvalitet Rapport, +Cost to Company (CTC),Totalt Kostnad per År, +Costing Details,Kostnad Detaljer, +Could Not Delete Demo Data,Kunde inte ta bort demodata, +Could not auto update shifts. Shift with shift factor {0} needed.,Kunde inte uppdatera förskjutning automatiskt. Förskjutning med förskjutning faktor {0} behövs., +Could not detect the Company for updating Bank Accounts,Kunde inte identifiera bolag för uppdatering av Bank Konto, +Could not find path for ,Kunde inte hitta sökväg för, +Count,Antal, +Create Depreciation Entry,Skapa Avskrivning Post, +Create Employee records.,Skapa Personal Uppgifter, +Create Grouped Asset,Skapa Grupperad Tillgång, +Create Job Card based on Batch Size,Skapa Jobbkort baserad på Parti Storlek, +Create Journal Entries,Skapa Journal Poster, +Create Ledger Entries for Change Amount,Skapa Register Poster för Växel Belopp, +Create Link,Skapa Länk, +Create Multi-level BOM,Skapa Flernivå Stycklista, +Create New Customer,Skapa Ny Kund, +Create Opportunity,Skapa Möjlighet, +Create Prospect,Skapa Prospekt, +Create Reposting Entries,Skapa Ompostering Poster, +Create Reposting Entry,Skapa Ompostering Post, +Create Stock Entry,Skapa Lager Post, +Create Workstation,Skapa Arbetsplats, +Create a new composite asset,Skapa ny Sammansatt Tillgång, +Create a variant with the template image.,Skapa variant med Mall Bild., +Create in Draft Status,Skapa i Utkast Status, +Create {0} {1} ?,Skapa {0} {1} ?, +Created On,Skapad, +Created {0} scorecards for {1} between:,Skapade {0} Resultatkort för {1} mellan:, +Creating Delivery Note ...,Skapar Försäljning Följesedel ..., +Creating Journal Entries...,Skapar Journal Poster..., +Creating Packing Slip ...,Skapar Packsedel ..., +Creating Purchase Invoices ...,Skapar Inköp Ordrar ..., +Creating Purchase Receipt ...,Skapar Inköp Följesedel ..., +Creating Sales Invoices ...,Skapa Försäljning Fakturor ..., +Creating Stock Entry,Skapar Lager Post...., +Creating Subcontracting Order ...,Skapar Underleverantör Order ..., +Creating Subcontracting Receipt ...,Skapar Underleverantör Följesedel ..., +Creating User...,Skapar Användare..., +Creation,Skapande, +Creation of {1}(s) successful,Skapande av {1}(s) klar, +"Creation of {0} failed. + Check Bulk Transaction Log","Skapande av {0} misslyckad. + Kontrollera Mass Transaktion Logg", +"Creation of {0} partially successful. + Check Bulk Transaction Log","Skapande av {0} delvis klar. + Kontrollera Mass Transaktion Logg", +Credit (Transaction),Kredit (Transaktion), +Credit Amount in Transaction Currency,Kredit Belopp i Transaktion Valuta, +Credit Limit Crossed,Kredit Gräns Överskriden, +Credit Limit Settings,Kredit Gräns Inställningar, +"Credit Note will update it's own outstanding amount, even if ""Return Against"" is specified.","Kredit Nota kommer att uppdatera sitt eget utestående belopp, även om ""Retur Mot"" anges.", +Currency Exchange Settings Details,Valuta Växling Inställning Detaljer, +Currency Exchange Settings Result,Valuta Växling Inställning Resultat, +Current Asset,Aktuell Tillgång, +Current Index,Aktuellt Index, +Current Level,Aktuell Nivå, +Current Liability,Aktuell Skuld, +Current Node,Aktuell Nod, +Current Serial / Batch Bundle,Aktuell Serie / Parti Paket, +Custom,Anpassad, +Custom delimiters,Anpassade Avgränsare, +Customer ,Kund, +Customer / Item / Item Group,Kund / Artikel / Artikel Grupp, +Customer Defaults,Kund Standard, +Customer Group Item,Kund Grupp Artikel, +Customer Group: {0} does not exist,Kund Grupp: {0} finns inte, +Customer Item,Kund Artikel, +Customer Name: ,Kund Namn:, +Customer Portal Users,Portal  Användare, +Customer: ,Kund:, +Daily Time to send,Daglig Tid att Skicka, +Dashboard,Översikt Panel, +Data Based On,Data Baserad På, +Date ,Datum , +Date must be between {0} and {1},Datum måste vara mellan {0} och {1}, +Days before the current subscription period,Dagar före aktuell prenumeration period, +DeLinked,Bortkoppplad, +Deal Owner,Ansvarig, +Debit (Transaction),Debet (Transaktion), +Debit Amount in Transaction Currency,Debet Belopp i Transaktion Valuta, +"Debit Note will update it's own outstanding amount, even if ""Return Against"" is specified.","Debet Nota kommer att uppdatera sitt eget utestående belopp, även om ""Retur Mot"" anges.", +Debit-Credit Mismatch,Debet-Kredit överensstämmer ej, +Debit-Credit mismatch,Debet-Kredit överensstämmer ej, +Decapitalization,Dekapitalisering, +Decapitalized,Dekapitaliserad, +Default Advance Account,Standard Förskött Konto, +Default Advance Paid Account,Standard Förskött Skuld Konto, +Default Advance Received Account,Standard Förskött Intäkt Konto, +Default BOM not found for FG Item {0},Standard Stycklista hittades inte för Färdig Artikel {0}, +Default Discount Account,Standard Rabatt Konto, +Default In-Transit Warehouse,Standard I Transit Lager, +Default Operating Cost Account,Standard Driftskostnad Konto, +Default Payment Discount Account,Standard Rabatt Konto, +Default Provisional Account,Standard Provisorisk Konto, +Default Service Level Agreement for {0} already exists.,Standard Service Nivå Avtal för {0} finns redan., +Default Unit of Measure for Item {0} cannot be changed directly because you have already made some transaction(s) with another UOM. You need to either cancel the linked documents or create a new Item.,Standard Enhet för Artikel {0} kan inte ändras eftersom det finns några transaktion(er) med annan Enhet. Man måste antingen annullera länkade dokument eller skapa ny artikel., +Default settings for your stock-related transactions,Standard inställningar för lager relaterade transaktioner, +"Default tax templates for sales, purchase and items are created.","Standard Moms Mallar för Försäljning,Inköp och Artiklar är skapade. ", +Deferred Accounting,Uppskjuten Bokföring, +Deferred Accounting Defaults,Uppskjuten Bokföring Standard, +Deferred Revenue and Expense,Uppskjuten Intäkt och Kostnad, +Deferred accounting failed for some invoices:,Uppskjuten Bokföring misslyckades för vissa fakturor:, +Delay (In Days),Försening (I Dagar), +Delayed,Försenad, +Delayed Tasks Summary,Försenad Uppgifter Översikt, +Delete Accounting and Stock Ledger Entries on deletion of Transaction,Ta bort Bokföring och Lager Register Poster vid radering av Transaktion, +Delete Bins,Ta bort från Papperskorg, +Delete Cancelled Ledger Entries,Ta bort Annullerade Register Poster, +Delete Dimension,Ta bort Dimension, +Delete Leads and Addresses,Ta bort Prospekt och Adresser, +Delete Transactions,Ta bort Transaktioner, +Deleted Documents,Papperskorg, +Deletion in Progress!,Borttagning Pågår!, +Delimiter options,Avgränsning Alternativ, +Delivery Manager,Leverans Ansvarig, +Delivery Note Packed Item,Försäljning Följesedel Packad Artikel, +Delivery Note(s) created for the Pick List,Försäljning Följesedel skapad för Plocklista, +Delivery User,Leverans Användare, +Delivery to,Leverera Till, +Demo Company,Demo Bolag, +Demo data cleared,Demo Data Borttagen, +Dependant SLE Voucher Detail No,Beroende SLE Verifikat Detalj Nummer, +Dependent Task {0} is not a Template Task,Beroende Uppgift {0} är inte Mall Uppgift, +Deposit,Insättning, +Depreciate based on daily pro-rata,Skriv av baserat på dagliga proportioner, +Depreciate based on shifts,Skriv av baserat på förskjutningar, +Depreciation Details,Avskrivning Detaljer, +Depreciation Entry Posting Status,Avskrivning Post Bokföring Status, +Depreciation Expense Account should be an Income or Expense Account.,Kostnad Avskrivning Konto ska vara Intäkt eller Kostnad Konto., +Depreciation Posting Date cannot be before Available-for-use Date,Avskrivning Bokföring Datum kan inte vara före Tillgänglig för Användning Datum, +Depreciation Row {0}: Depreciation Posting Date cannot be before Available-for-use Date,Avskrivning Rad {0}: Avskrivning Bokföring Datum kan inte vara före Tillgänglig för Användning Datum, +Depreciation Schedule View,Avskrivning Schema Vy, +Depreciation cannot be calculated for fully depreciated assets,Avskrivning kan inte beräknas för fullt avskrivna tillgångar, +Description of Content,Beskrivning av Innehåll, +Desk User,Skrivbord Användare, +Difference In,Differens I, +Difference Posting Date,Differens Bokföring Datum, +Difference Qty,Differens Kvantitet, +Different 'Source Warehouse' and 'Target Warehouse' can be set for each row.,Olika 'Från Lager' och 'Till Lager' kan anges för varje rad., +Dimension Details,Dimension Detaljer, +Dimension Filter Help,Dimension Filter Hjälp, +Dimension-wise Accounts Balance Report,Bokföring Saldo Rapport per Dimension, +Direct Expense,Direkta Kostnader, +Disable Last Purchase Rate,Inaktivera Senaste Inköp Pris, +Disable Serial No And Batch Selector,Inaktivera Serie Nummer och Parti Väljare, +Disabled Account Selected,Inaktiverad Konto Vald, +Disabled Warehouse {0} cannot be used for this transaction.,Inaktiverad Lager {0} kan inte användas för denna transaktion., +Disabled pricing rules since this {} is an internal transfer,Inaktiverade Prissättning Regler eftersom detta {} är intern överföring, +Disabled tax included prices since this {} is an internal transfer,Inaktiverade Pris Inklusive Moms eftersom detta {} är intern överföring, +Disables auto-fetching of existing quantity,Inaktiverar automatisk hämtning av befintlig kvantitet, +Disassemble,Demontera, +Disassemble Order,Demontering Order, +Discount Account,Rabatt Konto, +Discount Date,Rabatt Datum, +Discount Settings,Rabatt Inställningar, +Discount Validity,Rabatt Giltighet , +Discount Validity Based On,Rabatt Giltighet Baserad På, +Discount of {} applied as per Payment Term,Rabatt på {} tillämpad enligt Betalning Villkor, +Discounted Amount,Rabatterad Belopp, +"Discounts to be applied in sequential ranges like buy 1 get 1, buy 2 get 2, buy 3 get 3 and so on","Rabatter som ska tillämpas i sekventiella intervall som köp 1 få 1, köp 2 få 2, köp 3 få 3 och så vidare", +Discrepancy between General and Payment Ledger,Avvikelse mellan Bökföring Register och Betalning Register, +Dispatch Address,Leverans Adress, +Dispatch Address Name,Leverans Adress Namn, +Distinct Item and Warehouse,Distinkt Artikel och Lager, +Distribute Additional Costs Based On ,Fördela Extra Kostnader Baserat På, +Distribute Manually,Fördela Manuellt, +Do Not Explode,Utvidga Ej, +Do Not Update Serial / Batch on Creation of Auto Bundle,Uppdatera inte Serie / Parti vid skapande av Automatiskt Paket, +Do Not Use Batch-wise Valuation,Använd inte partivis värdering, +Do reposting for each Stock Transaction,Skapa ompostering för varje Lager Transaktion, +Do you still want to enable negative inventory?,Vill du fortfarande aktivera negativ Lager?, +DocField,DocType Fält, +DocTypes should not be added manually to the 'Excluded DocTypes' table. You are only allowed to remove entries from it.,"DocTypes ska inte läggas till manuellt i ""Excluded DocTypes"" tabell . Man får bara ta bort poster från den.", +Document Type already used as a dimension,Dokument Typ används redan som dimension, +Documents,Dokument , +Documents: {0} have deferred revenue/expense enabled for them. Cannot repost.,Dokument: {0} har uppskjutna intäkter/kostnader aktiverat för dem. Kan inte posta om., +Domain Settings,Domän Inställningar, +Don't Reserve Sales Order Qty on Sales Return,Reservera inte Försäljning Order Kvantitet vid Försäljning Retur, +Don't Send Emails,Skicka inte E-post, +Dont Recompute tax,Räkna inte om Moms, +Download Backups,Säkerhetskopior, +Download CSV Template,Ladda ner CSV Mall, +Download Materials Request Plan,Ladda ner Material Begäran Plan, +Download Materials Request Plan Section,Ladda ner Material Begäran Plan Sektion, +Dunning Amount (Company Currency),Påminnelse Avgift (Bolag Valuta), +Dunning Level,Påminnelse Nivå, +Duplicate Closing Stock Balance,Kopiera Stängning Lager Saldo, +Duplicate Customer Group,Kopiera Kund Grupp, +Duplicate Finance Book,Kopiera Finans Register, +Duplicate Item Group,Kopiera Artikel Grupp, +Duplicate POS Invoices found,Kopiera Kassa Fakturor , +Dynamic Condition,Dynamiska Villkor, +Edit Capacity,Redigera Kapacitet, +Edit Cart,Ändra Kundkorg, +Edit Full Form,Öppna i Full Formulär, +Edit Note,Redigera Anteckning, +Editing {0} is not allowed as per POS Profile settings,Ej Tillåtet att Redigera {0} pga Kassa Profil Inställningar, +Either 'Selling' or 'Buying' must be selected,"""Inköp"" eller ""Försäljning"" måste väljas", +Email / Notifications,E-post / Aviseringar, +Email Address (required),E-post Adress (erfordras), +"Email Address must be unique, it is already used in {0}","E-post Adress måste vara unik, den används redan i {0}", +Email Digest Recipient,E-post Utskick Mottagare, +Email Digest: {0},E-post Utskick: {0}, +Email Domain,E-post Domän, +Email or Phone/Mobile of the Contact are mandatory to continue.,E-post eller Telefon / Mobil för Kontakt erfordras för att fortsätta., +Email verification failed.,E-post verifiering misslyckades., +Employee User Id,Användare ID, +Enable Allow Partial Reservation in the Stock Settings to reserve partial stock.,Aktivera Tillåt Partiell Reservation i Lager Inställningar för att reservera partiell lager., +Enable Automatic Party Matching,Aktivera Automatiskt Parti Avstämning, +Enable Common Party Accounting,Aktivera Gemensam Parti Bokföring, +Enable Discount Accounting for Selling,Aktivera Rabatt Bokföring för Försäljning, +Enable Fuzzy Matching,Aktivera Ungefärlig Avstämning, +Enable Health Monitor,Aktivera System Övervakning, +Enable Immutable Ledger,Aktivera Oförenderlig Bokföring, +Enable Provisional Accounting For Non Stock Items,Aktivera Provisorisk Bokföring för ej Lager Artiklar, +Enable Stock Reservation,Aktivera Lager Reservation, +Enable it if users want to consider rejected materials to dispatch.,Aktivera om användare vill inkludera att avvisat material ska skickas., +Enable this checkbox even if you want to set the zero priority,Aktivera denna kryssruta även om nollprioritet ska anges, +"Enable this option to calculate daily depreciation by considering the total number of days in the entire depreciation period, (including leap years) while using daily pro-rata based depreciation",Aktivera detta alternativ för att beräkna daglig avskrivning genom att använda totalt antal dagar i hela avskrivningsperiod (inklusive skottår) vid användning av proportionell baserad avskrivning, +Enable to apply SLA on every {0},Aktivera för att tillämpa Service Nivå Avtal på varje {0}, +Enabling this ensures each Purchase Invoice has a unique value in Supplier Invoice No. field within a particular fiscal year,Aktivera för att säkerställa att varje Inköp Faktura har unikt värde i fält Leverantör Faktura Nummer fält per bokföring år, +Enabling this option will allow you to record -

1. Advances Received in a Liability Account instead of the Asset Account

2. Advances Paid in an Asset Account instead of the Liability Account,Aktivera för att möjliggöra bokföring av:

1. Mottagna Förskott Betalningar bokförs på Skuld Konto istället för Tillgång Konto

2. Betalade Förskott Betalningar bokförs på Tillgång Konto istället för Skuld Konto, +Enabling this will allow creation of multi-currency invoices against single party account in company currency,Aktivera för att tillåta skapande av fakturor i flera valutor mot enskilt konto i bolag valuta, +Enabling this will change the way how cancelled transactions are handled.,Aktivering av detta ändrar hur avbrutna transaktioner hanteras., +End Transit,Avsluta Transit, +End of the current subscription period,Slut datum på aktuell prenumeration period, +"Enter First and Last name of Employee, based on Which Full Name will be updated. IN transactions, it will be Full Name which will be fetched.","Ange För och Efternamn på Personal, baserat på vilket Fullständigt namn kommer att uppdateras. Vid transaktioner kommer det att vara Fullständigt namn som kommer att hämtas.", +Enter Manually,Ange Manuellt, +Enter Serial Nos,Ange Serie Nummer, +Enter Visit Details,Ange Besök Detaljer, +Enter a name for Routing.,Ange namn för Åtgärd Följd., +"Enter a name for the Operation, for example, Cutting.","Ange namn för Åtgärd, till exempel Skärning.", +Enter a name for this Holiday List.,Ange namn för denna Helg Lista., +"Enter an Item Code, the name will be auto-filled the same as Item Code on clicking inside the Item Name field.","Ange Artikel Kod, namn kommer att automatiskt hämtas på samma sätt som Artikel Kod när man klickar i Artikel Namn fält .", +Enter each serial no in a new line,Ange varje Serie Nummer på ny rad, +"Enter the Operation, the table will fetch the Operation details like Hourly Rate, Workstation automatically. + + After that, set the Operation Time in minutes and the table will calculate the Operation Costs based on the Hourly Rate and Operation Time.","Ange Åtgärd, detaljer hämtas automatiskt som timpris, arbetsstation . + + Efteråt, anges Åtgärd tid i minuter och system beräknar Åtgärd Kostnad baserat på timpris och tid.", +Enter the opening stock units.,Ange Öppning Lager Enheter., +Enter the quantity of the Item that will be manufactured from this Bill of Materials.,Ange kvantitet för Artikel som ska produceras från denna Stycklista., +Enter the quantity to manufacture. Raw material Items will be fetched only when this is set.,Ange kvantitet som ska produceras. Råmaterial Artiklar hämtas endast när detta är angivet., +Error during caller information update,Fel uppstod under uppdatering av samtalsinformation, +Error while posting depreciation entries,Fel uppstod vid bokföring av avskrivning poster, +Error while processing deferred accounting for {0},Fel uppstod när uppskjuten bokföring för {0} bearbetades, +Error while reposting item valuation,Fel uppstod vid ombokning av artikel värdering , +"Error: This asset already has {0} depreciation periods booked. + The `depreciation start` date must be at least {1} periods after the `available for use` date. + Please correct the dates accordingly.","Fel: Denna tillgång har redan {0} avskrivning perioder bokade. + Start datum för ""avskrivning"" måste vara minst {1} perioder efter ""tillgänglig för användning"" datum. + Korrigera datum enligt detta.", +Errors Notification,Fel Avisering, +Even invoices with apply tax withholding unchecked will be considered for checking cumulative threshold breach,Även fakturor med tillämpa moms undanhållning omarkerad kommer att betraktas för att kontrollera kumulativ tröskel överträdelse, +Example URL,Exempel URL, +Example of a linked document: {0},Exempel på länkad dokument: {0}, +"Example: ABCD.##### +If series is set and Serial No is not mentioned in transactions, then automatic serial number will be created based on this series. If you always want to explicitly mention Serial Nos for this item. leave this blank.","Exempel:. ABCD ##### Om serie är angiven och Serie Nummer inte anges i transaktioner, skapas Serie Nummer automatiskt utifrån denna serie. Om man alltid vill ange serie nummer för denna artikel lämna det tomt.", +Example: Serial No {0} reserved in {1}.,Exempel: Serie Nummer {0} reserverad i {1}., +Excess Materials Consumed,Överskott Material Förbrukad, +Excess Transfer,Överskott Överföring, +Exchange Gain Or Loss,Valutaväxling Resultat, +Exchange Gain/Loss amount has been booked through {0},Valutaväxling Resultat Belopp har bokförts genom {0}, +Exchange Rate Revaluation Settings,Valutaväxling Kurs Omvärdering Inställningar, +Excluded DocTypes,Exkluderade DocTyper, +Exempt Supplies,Undantagna Leveranser, +Expected,Förväntad, +Expected Balance Qty,Förväntad Saldo Kvantitet, +Expected End Date should be less than or equal to parent task's Expected End Date {0}.,Förväntat Slut Datum ska vara tidigare än eller lika med Överordnade Uppgifters förväntade Slut Datum {0}., +Expected Stock Value,Förväntad Lager Värde, +Expected Time Required (In Mins),Förväntad Tid (I Minuter), +Expiry,BESTFÖRE, +Export Data,Data Export, +Export Errored Rows,Exportera Felaktiga Rader, +Export Import Log,Exportera Import Logg, +Extra Consumed Qty,Extra Förbrukad Kvantitet, +Extra Job Card Quantity,Extra Jobbkort Kvantitet, +FIFO Queue vs Qty After Transaction Comparison,FIFO Kö mot Kvantitet Efter Transaktion Jämförelse, +"FIFO Stock Queue (qty, rate)","FIFO Lager Kö (kvantitet, pris)", +FIFO/LIFO Queue,FIFO / LIFO Kö, +Failed Entries,Misslyckade Poster, +"Failed to erase demo data, please delete the demo company manually.","Misslyckades att ta bort demodata, vänligen radera demo bolag manuellt.", +Failed to post depreciation entries,Kunde inte bokföra avskrivning poster, +Failed to setup defaults for country {0}. Please contact support.,Misslyckades att ange standard inställningar för {0}. Kontakta support., +Failure,Fel, +Failure Description,Fel Beskrivning, +Fetch Based On,Hämta Baserad På, +Fetch Overdue Payments,Hämta Förfallna Fakturor, +Fetch Timesheet,Hämta Tidrapport, +Fetch Value From,Hämta Värde Från, +Fetching exchange rates ...,Hämtar växel kurs ..., +Filter by Reference Date,Filtrera efter Referens Datum, +Filter on Invoice,Filtrera Faktura, +Filter on Payment,Filtrera Betalning, +Filters missing,Filter saknas, +Final Product,Färdig Artikel, +Financial Ratios,Finansiell Nyckeltal, +Financial Reports,Rapporter, +Financial Year Begins On,Bokföringsår Start Datum, +Financial reports will be generated using GL Entry doctypes (should be enabled if Period Closing Voucher is not posted for all years sequentially or missing) ,Finansiella Rapporter kommer att genereras med hjälp av Bokföring Poster (ska vara aktiverat om Period Låsning Verifikat inte publiceras för alla år i följd eller saknas), +Finished Good BOM,Färdig Stycklista, +Finished Good Item,Färdig Artikel, +Finished Good Item Qty,Färdig Artikel Kvantitet, +Finished Good Item Quantity,Färdig Artikel Kvantitet, +Finished Good Item is not specified for service item {0},Färdig Artikel är inte specificerad för service artikel {0}, +Finished Good Item {0} Qty can not be zero,Färdig Artikel {0} kvantitet kan inte vara noll, +Finished Good Item {0} must be a sub-contracted item,Färdig Artikel {0} måste vara underleverantör artikel, +Finished Good Qty,Färdig Artikel Kvantitet, +Finished Good Quantity ,Färdig Artikel Kvantitet, +Finished Good UOM,Färdig Artikel Enhet, +Finished Good {0} does not have a default BOM.,Färdig Artikel {0} har ingen standard Stycklista., +Finished Good {0} is disabled.,Färdig Artikel {0} är inaktiverad., +Finished Good {0} must be a stock item.,Färdig Artikel {0} måste vara lager artikel., +Finished Good {0} must be a sub-contracted item.,Färdig Artikel {0} måste vara underleverantör artikel., +Finished Goods Based Operating Cost,Färdiga Artiklar Baserade Driftskostnader, +Finished Goods Item,Färdig Artikel Post, +Finished Goods Reference,Färdig Artikel Referens, +Finished Goods Value,Färdig Artikel Värde, +Finished Goods based Operating Cost,Färdiga Artiklar Baserade Driftskostnader, +Finished Item {0} does not match with Work Order {1},Färdig Artikel {0} stämmer inte med Arbetsorder {1}, +First Response Due,Första Respons, +First Response SLA Failed by {},Första Respons Service Nivå Avtal misslyckades efter {}, +Fixed Asset Defaults,Fasta Tillgångar, +Fixed Time,Fast Tid, +Floor,Yta, +Floor Name,Yta Namn, +For Item,För Artikel, +For Item {0} cannot be received more than {1} qty against the {2} {3},För Artikel {0} kan inte tas emot mer än {1} i kvantitet mot {2} {3}, +For Job Card,För Jobbkort, +For Operation,För Åtgärd, +"For Return Invoices with Stock effect, '0' qty Items are not allowed. Following rows are affected: {0}","För Retur Fakturor med Lager påverkan, '0' kvantitet artiklar är inte tillåtna. Följande rader påverkas: {0}", +For Work Order,För Arbetsorder, +For dunning fee and interest,För påminnelseavgift och ränta, +"For item {0}, rate must be a positive number. To Allow negative rates, enable {1} in {2}","För Artikel {0} pris måste vara positiv tal. Att tillåta negativa priser, aktivera {1} i {2}", +For quantity {0} should not be greater than allowed quantity {1},För Kvantitet {0} ska inte vara högre än tillåten kvantitet {1}, +"For the item {0}, the quantity should be {1} according to the BOM {2}.",För artikel {0} ska kvantitet vara {1} enligt stycklista {2}., +"For the {0}, no stock is available for the return in the warehouse {1}.",För {0} finns inget kvantitet tillgängligt för retur i lager {1}., +"For the {0}, the quantity is required to make the return entry",För {0} erfordras kvantitet för att skapa retur post, +Force-Fetch Subscription Updates,Hämta Prenumeration Uppdateringar, +Forecasting,Prognos, +Formula Based Criteria,Formel Baserade Kriterier, +Free Item Rate,Gratis Artikel Pris, +From Corrective Job Card,Från Korrigerande Jobbkort, +From Date and To Date are mandatory,Från Datum och Till Datum Erfodras, +From Date is mandatory,Från Datum Erfordras, +From Date: {0} cannot be greater than To date: {1},Från Datum: {0} kan inte vara senare än Till Datum: {1}, +From Delivery Date,Från Leverans Datum, +From Doctype,Från DocType, +From Due Date,Från Förfallo Datum, +From Opportunity,Från Möjlighet, +From Payment Date,Från Betalning Datum, +From Prospect,Från Prospekt, +From Reference Date,Från Referens Datum, +From Voucher Detail No,Från Verifikat Detalj Nummer, +From Voucher No,Från Verifikat Nummer, +From Voucher Type,Från Verifikat Typ, +From and To dates are required,Från och Till Datum Erfodras, +Full and Final Statement,Avgång Avtal, +GL Balance,Bokföring Register Saldo, +GL Entry Processing Status,Bokföring Register Bearbetning Status, +GL reposting index,Bokföring Register Ompostering Index, +Gain/Loss accumulated in foreign currency account. Accounts with '0' balance in either Base or Account currency,Resultat ackumulerad på konto i utländsk valuta. Konto med '0' saldo i antingen Bas eller Konto valuta, +Gain/Loss already booked,Resultat Bokförd, +Gain/Loss from Revaluation,Omvärdering Resultat, +General Ledger,Bokföring Register,Warehouse +General and Payment Ledger Comparison,Bokföring och Betalning Register Jämförelse, +General and Payment Ledger mismatch,Bokföring och Betalning Register Jämförelse , +Generate Closing Stock Balance,Skapa Stängning Lager Saldo, +Generate Demo Data for Exploration,Skapa Demo Data för att Utforska, +Generate E-Invoice,Skapa E-Faktura, +Generate Invoice At,Skapa Faktura , +Generated,Skapad, +Generating Preview,Skapar Förhandsvisning, +Get Allocations,Hämta Tilldelningar, +Get Customer Group Details,Hämta Kund Grupp Detaljer, +Get Finished Goods for Manufacture,Hämta Artiklar för Produktion, +Get Outstanding Orders,Hämta Utestående Ordrar, +Get Raw Materials Cost from Consumption Entry,Hämta Råmaterial Kostnad från Förbrukning Post, +Get Raw Materials for Purchase,Hämta Råmaterial för Inköp, +Get Raw Materials for Transfer,Hämta Råmaterial för Överföring, +Get Scrap Items,Hämta Rest Artiklar, +Get Stock,Hämta Lager, +Get Sub Assembly Items,Hämta Delmontering Artiklar, +Get Supplier Group Details,Hämta Leverantör Grupp Detaljer, +Get Timesheets,Hämta Tidrapporter, +Get stops from,Hämta Leverans Stopp från, +Getting Scrap Items,Hämta Rest Artiklar, +Give free item for every N quantity,Lämna gratis artikel för varje N kvantitet, +Go back,Tillbaka, +Go to {0} List,Till {0} Lista, +Goals,Mål, +Goods,Gods, +Grant Commission,Bevilja Provision, +Greeting Message,Hälsning Meddelande, +Gross Profit Percent,Brutto Resultat %, +Gross Purchase Amount Too Low: {0} cannot be depreciated over {1} cycles with a frequency of {2} depreciations.,Brutto Inköp Belopp för lågt: {0} kan inte skrivas av över {1} cykler med en frekvens på {2} avskrivningar., +Gross Purchase Amount should be equal to purchase amount of one single Asset.,Brutto Inköp Belopp ska vara lika med inköp belopp för enskild Tillgång., +Group Same Items,Sammanfoga lika Artikelrader, +Growth View,Tillväxt Vy, +Half-yearly,Halvår, +Handle Employee Advances,Hantera Personal Förskott, +Has Alternative Item,Har Alternativ Artikel, +Has Item Scanned,Har Artikel Skannad, +Has Priority,Har Prioritet, +Have Default Naming Series for Batch ID?,Har Standard Nummer Serie för Parti?, +Heatmap,Värme Karta, +Height (cm),Höjd (cm), +"Hello,","Hej,", +Helps you distribute the Budget/Target across months if you have seasonality in your business.,Hjälper vid fördelning av Budget/ Mål över månader om bolag har säsongsvariationer., +Here are the error logs for the aforementioned failed depreciation entries: {0},Här är felloggar för ovannämnda misslyckade avskrivning poster: {0}, +Here are the options to proceed:,Här är alternativ för att fortsätta:, +"Here, you can select a senior of this Employee. Based on this, Organization Chart will be populated.",Här kan du välja överordnad för Personal. Baserat på detta kommer organisation diagam att fyllas i., +"Here, your weekly offs are pre-populated based on the previous selections. You can add more rows to also add public and national holidays individually.",Här är veckovisa ledigheter angivna i förväg baserat på de tidigare val. Man kan lägga till fler rader för att även lägga till allmänna och nationella helgdagar individuellt., +"Hi,","Hej,", +Hide Images,Dölj Bilder, +Holiday Date {0} added multiple times,Helgdag {0} har lagts till flera gånger, +Hours Spent,Förbrukade Timmar, +How often should Project be updated of Total Purchase Cost ?,Hur ofta ska Projekt uppdateras baserat på Totalt Inköp Kostnad?, +Idle,Overksam, +"If Enabled - Reconciliation happens on the Advance Payment posting date
+If Disabled - Reconciliation happens on oldest of 2 Dates: Invoice Date or the Advance Payment posting date
+","Om Aktiverad - Avstämning sker på Förskott Betalning datum
+Om Inaktiverad - Avstämning sker på äldsta av 2 datum: Faktura datum eller Förskott Betalning datum
+", +"If an operation is divided into sub operations, they can be added here.",Om åtgärd är uppdelad i underåtgärder kan de läggas till här., +"If checked, Rejected Quantity will be included while making Purchase Invoice from Purchase Receipt.","Om vald, kommer avvisad kvantitet att inkluderas när Inköp Faktura skapas från Inköp Följesedel.", +"If checked, Stock will be reserved on Submit","Om vald, kommer Lager Reservation att skapas vid Godkänn", +"If checked, picked qty won't automatically be fulfilled on submit of pick list.","Om vald, kommer plockad kvantitet inte automatiskt att uppfyllas när plocklista godkänns.", +"If checked, the tax amount will be considered as already included in the Paid Amount in Payment Entry","Om vald, kommer moms belopp anses vara inkluderad i Betald Belopp i Betalning Post", +"If checked, we will create demo data for you to explore the system. This demo data can be erased later.","Om vald,kommer demo data skapas så att man kan utforska system. Dessa demo data kan raderas senare.", +If enabled then system will manufacture Sub-assembly against the Job Card (operation).,Om aktiverad kommer system att producera Underenheter mot Jobbkort (Åtgärd)., +If enabled then system won't apply the pricing rule on the delivery note which will be create from the pick list,Om aktiverat kommer systemet inte att tillämpa prisregel på följesedel som kommer att skapas från plocklista, +If enabled then system won't override the picked qty / batches / serial numbers.,Om aktiverad kommer system inte åsidosätta plockad kvantitet / partier / serie nummer., +"If enabled, a print of this document will be attached to each email","Om aktiverad, kommer utskrift av detta dokument att bifogas till varje e-post meddelande", +"If enabled, additional ledger entries will be made for discounts in a separate Discount Account","Om aktiverad, extra bokföring poster kommer att skapas för rabatter på separat rabatt konto", +"If enabled, all files attached to this document will be attached to each email","Om aktiverad, kommer alla filer som bifogas detta dokument att bifogas till varje e-post meddelande", +"If enabled, do not update serial / batch values in the stock transactions on creation of auto Serial + / Batch Bundle. ","Om aktiverad, uppdatera inte serie nummer /parti värde i lager transaktioner vid skapande av automatiskt Serie Nummer + / Parti Paket. ", +"If enabled, ledger entries will be posted for change amount in POS transactions","Om aktiverad,bokföring poster kommer att bokföras för Växel Belopp i Kassa Transaktioner", +"If enabled, the consolidated invoices will have rounded total disabled",Om aktiverad kommer Konsoliderad Faktura att ha avrundad totalt inaktiverad, +"If enabled, the item rate won't adjust to the valuation rate during internal transfers, but accounting will still use the valuation rate.","Om aktiverad, kommer artikel pris inte att sättas till grund pris vid interna överföringar, men bokföring kommer fortfarande att använda grund pris.", +"If enabled, the system will create material requests even if the stock exists in the 'Raw Materials Warehouse'.","Om aktiverad, kommer system att skapa material begäran även om det finns på 'Råmaterial Lager'.", +"If enabled, the system will use the moving average valuation method to calculate the valuation rate for the batched items and will not consider the individual batch-wise incoming rate.","aaOm aktiverad, kommer system att använda Ma värdering sätt för att beräkna värdering för artikel partier och kommer inte att beakta individuell per parti pris.", +"If enabled, then system will only validate the pricing rule and not apply automatically. User has to manually set the discount percentage / margin / free items to validate the pricing rule","Om aktiverad, kommer system bara att validera prissättning regel och inte tillämpas automatiskt. Användare måste manuellt ange rabatt procent / marginal / gratis artikel för att validera prissättning regel", +"If mentioned, the system will allow only the users with this Role to create or modify any stock transaction earlier than the latest stock transaction for a specific item and warehouse. If set as blank, it allows all users to create/edit back-dated transactions.","Om angiven kommer system att tillåta Användare med denna roll att skapa eller ändra lager transaktioner tidigare än senaste lager transaktion för specifik artikel och lager. Om angiven som tomt, tillåter det alla Användare att skapa/redigera backdaterade transaktioner.", +"If not, you can Cancel / Submit this entry",Om inte kan man Annullera/Godkänna denna post, +"If rate is zero then item will be treated as ""Free Item""","Om pris är noll kommer artikel att behandlas som ""Gratis Artikel""", +"If the BOM results in Scrap material, the Scrap Warehouse needs to be selected.",Om Stycklista har Rest Material måste Rest Lager väljas., +"If the selected BOM has Operations mentioned in it, the system will fetch all Operations from BOM, these values can be changed.","Om vald Stycklista har angivna Åtgärder kommer system att hämta alla Åtgärder från Stycklista, dessa värden kan ändras.", +"If this checkbox is enabled, then the system won’t run the MRP for the available sub-assembly items.",Om vald kommer systemet inte att köra Material Resurs Planering för tillgängliga undermontering artiklar., +If this is undesirable please cancel the corresponding Payment Entry.,Om detta inte är önskvärt annullera motsvarande betalning post., +"If yes, then this warehouse will be used to store rejected materials","Om ja, kommer detta lager att användas för att lagra avvisat material", +"If you are maintaining stock of this Item in your Inventory, ERPNext will make a stock ledger entry for each transaction of this item.","Om man har denna artikel i Lager, kommer System att lagerbokföra varje transaktion av denna artikel.", +"If you need to reconcile particular transactions against each other, then please select accordingly. If not, all the transactions will be allocated in FIFO order.","Om man behöver stämma av specifika transaktioner mot varandra, välj därefter. Om inte, kommer alla transaktioner att tilldelas i FIFO ordning.", +"If you still want to proceed, please disable 'Skip Available Sub Assembly Items' checkbox.","Om du fortfarande vill fortsätta, avmarkera ""Hoppa över tillgängliga undermontering artiklar"".", +"If you still want to proceed, please enable {0}.","För att fortsätta, aktivera {0}.", +"If your CSV uses a different delimiter, add that character here, ensuring no spaces or additional characters are included.","Om CSV använder en annan avgränsare, lägg till det tecknet här, se till att inga mellanslag eller ytterligare tecken inkluderas.", +Ignore Account Closing Balance,Ignorera Bokföring Stängning Saldo, +Ignore Available Stock,Ignorera Tillgängligt Lager, +Ignore Closing Balance,Ignorera Stängning Saldo, +Ignore Default Payment Terms Template,Ignorera Standard Betalning Villkor Mall , +Ignore Empty Stock,Ignorera Tom Lager, +Ignore Exchange Rate Revaluation Journals,Ignorera Växelkurs Omvärdering Journaler , +Ignore Pricing Rule is enabled. Cannot apply coupon code.,Ignorera att Prissättning Regel är aktiverad. Det går inte att använda kupong kod., +Ignore System Generated Credit / Debit Notes,Ignorera System Skapade Kredit / Debet Notor, +Ignore Voucher Type filter and Select Vouchers Manually,Ignorera Verifikat Typ filter och Välj Verifikat Manuellt, +Impairment,Nedskrivningar, +Import File,Importera Fil, +Import File Errors and Warnings,Importera Fil Fel och Varningar, +Import Log Preview,Importera Logg Förhandsvisning, +Import Preview,Importera Förhandsvisning, +Import Progress,Import Framsteg, +Import Type,Import Typ, +Import Using CSV file,Importera med hjälp av CSV fil, +Import Warnings,Import Varningar, +Import from Google Sheets,Importera från Google Sheets, +"Importing {0} of {1}, {2}","Importerar {0} av {1}, {2}", +In House,Intern, +In Minutes,I Minuter, +In Party Currency,I Parti Valuta, +In Transit Transfer,I Transit Överföring, +In Transit Warehouse,I Transit Lager, +In mins,I Minuter, +"In row {0} of Appointment Booking Slots: ""To Time"" must be later than ""From Time"".","På rad {0} av Möte Bokning Tider: ""Till Tid"" måste vara senare än ""Från Tid"".", +"In the case of 'Use Multi-Level BOM' in a work order, if the user wishes to add sub-assembly costs to Finished Goods items without using a job card as well the scrap items, then this option needs to be enable.","I fall att 'Använd Flernivå Stycklista' används i arbetsorder, om användare vill lägga till undermontering kostnader till färdiga artiklar utan att använda jobbkort samt rest artiklar, måste detta alternativ vara aktiverad.", +"In this section, you can define Company-wide transaction-related defaults for this Item. Eg. Default Warehouse, Default Price List, Supplier, etc.","I detta sektion kan man definiera bolagsomfattande transaktion relaterade standard inställningar för denna artikel. T.ex. Standard Lager, Standard Prislista, Leverantör, osv.", +Inactive Status,Inaktiv Status, +Include Account Currency,Inkludera Konto Valuta, +Include Closed Orders,Inkludera Stängda Ordrar, +Include Default FB Assets,Inkludera Standard Finans Register Tillgångar, +Include Disabled,Inkludera Inaktiverad, +Include Expired Batches,Inkludera Utgångna Partier, +Include Safety Stock in Required Qty Calculation,Inkludera Säkerhet Lager i Begärd Kvantitet Beräkning, +Include Timesheets in Draft Status,Inkludera Tidrapporter i Utkast Status, +Include Zero Stock Items,Inkludera artiklar ej tillgängliga i lager, +Incoming Call Handling Schedule,Inkommande Samtalshantering Schema, +Incoming Call Settings,Inkommande Samtal Inställningar, +Incoming Rate (Costing),Inköp Pris (Kostnad), +Incorrect Balance Qty After Transaction,Felaktig Saldo Kvantitet Efter Transaktion, +Incorrect Batch Consumed,Felaktig Parti Förbrukad, +Incorrect Check in (group) Warehouse for Reorder,Felaktig vald (grupp) Lager för Ombeställning, +Incorrect Component Quantity,Felaktig Komponent Kvantitet, +Incorrect Invoice,Felaktig Faktura, +Incorrect Movement Purpose,Felaktig Förflytning Syfte, +Incorrect Payment Type,Felaktig Betalning Typ, +Incorrect Reference Document (Purchase Receipt Item),Felaktig Referens Dokument (Inköp Följesedel Artikel), +Incorrect Serial No Valuation,Felaktig Serie Nummer Värdering, +Incorrect Serial Number Consumed,Felaktig Serie Nummer Förbrukad, +Incorrect Stock Value Report,Felaktig Lager Värde Rapport, +Incorrect Type of Transaction,Felaktig Typ av Transaktion, +Increase In Asset Life(Months),Utökning av Tillgång Livslängd (Månader), +Indent,Rekvisition, +Indirect Expense,Indirekt Kostnad, +Individual GL Entry cannot be cancelled.,Enskild Bokföring Post kan inte avbokas., +Individual Stock Ledger Entry cannot be cancelled.,Enskild Lager Register Post kan inte avbokas., +Initialize Summary Table,Initiera Översikt Tabell, +Insert New Records,Infoga Nya Poster, +Inspection Rejected,Kontroll Avvisad, +Inspection Submission,Kontroll Godkännande, +Instruction,Instruktion, +Insufficient Capacity,Otillräcklig Kapacitet, +Insufficient Stock for Batch,Otillräcklig Lager för Parti, +Inter Transfer Reference,Intern Överföring Referens, +Interest and/or dunning fee,Ränta och/eller Påminnelseavgift, +Internal,Intern, +Internal Customer,Intern Kund, +Internal Customer for company {0} already exists,Intern Kund för Bolag {0} finns redan, +Internal Sale or Delivery Reference missing.,Intern Försäljning eller Leverans Referens saknas., +Internal Sales Reference Missing,Intern Försäljning Referens saknas, +Internal Supplier,Intern Leverantör, +Internal Supplier for company {0} already exists,Intern Leverantör för Bolag {0} finns redan, +Internal Transfer Reference Missing,Intern Överföring Referens saknas, +Internal Transfers,Interna Överföringar, +Internal transfers can only be done in company's default currency,Interna Överföringar kan endast göras i bolag standard valuta, +Invalid,Ogiltig, +Invalid Allocated Amount,Ogiltig Tilldelad Belopp, +Invalid Amount,Ogiltig Belopp, +Invalid Auto Repeat Date,Ogiltig Återkommande Datum, +Invalid Cost Center,Ogiltig Resultat Enhet, +Invalid Delivery Date,Ogiltig Leverans Datum, +Invalid Document,Ogiltig Dokument, +Invalid Document Type,Ogiltig Dokument Typ, +Invalid Formula,Ogiltig Formel, +Invalid Group By,Ogiltig Gruppera Efter, +Invalid Item Defaults,Ogiltig Artikel Standard, +Invalid Ledger Entries,Ogiltiga Register Poster, +Invalid Primary Role,Ogiltig Primär Roll, +Invalid Priority,Ogiltig Prioritet, +Invalid Process Loss Configuration,Ogiltig Process Förlust Konfiguration, +Invalid Purchase Invoice,Ogiltig Inköp Faktura, +Invalid Qty,Ogiltig Kvantitet, +Invalid Schedule,Ogiltig Schema, +Invalid Serial and Batch Bundle,Felaktig Serie och Parti Paket, +Invalid Warehouse,Ogiltig Lager, +Invalid result key. Response:,Ogiltig resultat nyckel. Svar:, +Invalid value {0} for {1} against account {2},Ogiltigt värde {0} för {1} mot konto {2}, +Inventory Dimension,Lager Dimension, +Inventory Dimension Negative Stock,Lager Dimension Negativ Lager, +Inventory Settings,Lager Inställningar, +Invoice Cancellation,Faktura Annullering, +Invoice Limit,Faktura Gräns, +Invoice Portion (%),Faktura Andel (%), +Invoice and Billing,Faktura & Fakturering, +Invoiced Qty,Fakturerad Kvantitet, +Invoices and Payments have been Fetched and Allocated,Fakturor och Betalningar är Hämtade och Tilldelade, +Invoicing Features,Fakturering Funktioner, +Is Adjustment Entry,Är Justering Post, +Is Alternative,Är Alternativ, +Is Cash or Non Trade Discount,Är Kontant eller Ej Försäljning Rabatt, +Is Composite Asset,Är Sammansatt Tillgång, +Is Corrective Job Card,Är Korrigerande Jobbkort, +Is Corrective Operation,Är Korrigerande Åtgärd, +Is Expandable,Är Utvidningsbar, +Is Finished Item,Är Färdig Artikel, +Is Fully Depreciated,Är Helt Avskriven, +Is Group Warehouse,Är Grupp Lager, +Is Old Subcontracting Flow,Är Gammal Underleverantör Flöde, +Is Outward,Är Utgående, +Is Period Closing Voucher Entry,Är Period Stängning Verifikat Post, +Is Rate Adjustment Entry (Debit Note),Är Pris Justering Post (Debet Nota), +Is Recursive,Är Rekursiv, +Is Rejected,Är Avvisad, +Is Rejected Warehouse,Är Avvisad Lager, +Is Scrap Item,Är Rest Artikel, +Is Short Year, Är Kort År, +Is Standard,Är Standard, +Is Stock Item,Är Lager Artikel, +Is System Generated,Är System Skapad, +Is Tax Withholding Account,Är Moms Avdrag Konto, +Is Template,Är Mall, +Issue Analytics,Ärende Analys, +Issue Summary,Ärende Översikt, +Issue a debit note with 0 qty against an existing Sales Invoice,Utfärda Debet Nota med 0 i Kvantitet mot befintlig Försäljning Faktura, +Issuing cannot be done to a location. Please enter employee to issue the Asset {0} to,Utfärdande kan inte göras till plats. Ange personal att utfärda Tillgång {0} , +It can take upto few hours for accurate stock values to be visible after merging items.,Det kan ta upp till några timmar för korrekta lagervärden att vara synliga efter sammanslagning av artiklar., +"It's not possible to distribute charges equally when total amount is zero, please set 'Distribute Charges Based On' as 'Quantity'","Det är inte möjligt att fördela avgifter lika när det totala beloppet är noll, vänligen ange ""Distribuera Avgifter Baserat På"" som ""Kvantitet""", +Item Code (Final Product),Artikel Kod (Färdig Artikel), +Item Group wise Discount,Rabatt per Artikel Grupp, +Item Price Settings,Artikel Pris Inställningar, +"Item Price appears multiple times based on Price List, Supplier/Customer, Currency, Item, Batch, UOM, Qty, and Dates.","Artikel Pris visas flera gånger baserat på Prislista, Leverantör/Kund, Valuta, Artikel, Parti, Enhet, Kvantitet och Datum.", +Item Reference,Artikel Referens, +Item Warehouse based reposting has been enabled.,Artikel Lager baserad omläggning är aktiverad., +Item and Warehouse,Artikel och Lager, +Item is removed since no serial / batch no selected.,Artikel tas bort eftersom ingen serie nummer/parti nummer är vald., +Item qty can not be updated as raw materials are already processed.,Artikel kvantitet kan inte uppdateras eftersom råmaterial redan är bearbetad., +Item rate has been updated to zero as Allow Zero Valuation Rate is checked for item {0},Artikel pris har ändrats till noll eftersom Tillåt Noll Grund Pris är vald för artikel {0}, +Item valuation reposting in progress. Report might show incorrect item valuation.,Artikel värdering omläggning pågår. Rapport kan visa felaktig artikelvärde., +Item {0} cannot be added as a sub-assembly of itself,Artikel {0} kan inte läggas till som underenhet av sig själv, +Item {0} cannot be ordered more than {1} against Blanket Order {2}.,Artikel {0} kan inte skapas order för mer än {1} mot Blankoavtal Order {2}., +Item {0} does not exist.,Artikel {0} finns inte., +Item {0} entered multiple times.,Artikel {0} är angiven flera gånger., +Item {0} is already reserved/delivered against Sales Order {1}.,Artikel {0} är redan reserverad/levererad mot Försäljning Order {1}., +Item {0} must be a Non-Stock Item,Artikel {0} måste vara Ej Lager Artikel, +Item {0} not found in 'Raw Materials Supplied' table in {1} {2},"Artikel {0} hittades inte i ""Råmaterial Levererad"" tabell i {1} {2}", +Item {0} not found.,Artikel {0} hittades inte., +Item {} does not exist.,Artikel {} finns inte., +Items & Pricing,Artiklar & Priser, +Items Catalogue,Artikel Katalog, +Items cannot be updated as Subcontracting Order is created against the Purchase Order {0}.,Artiklar kan inte uppdateras eftersom underleverantör order är skapad mot Inköp Order {0}., +Items rate has been updated to zero as Allow Zero Valuation Rate is checked for the following items: {0},Artikel Pris har ändrats till noll eftersom Tillåt Noll Grund Pris är vald för följande artiklar: {0}, +Items to Be Repost,Artikel som ska Läggas om, +Items to Order and Receive,Inköp Artiklar, +Items to Reserve,Artiklar att Reservera, +Items {0} do not exist in the Item master.,Artikel {0} saknas i Artikel Register., +Job Capacity,Arbetskapacitet, +Job Card Operation,Jobbkort Åtgärd, +Job Card Scheduled Time,Jobbkort Schemalagd Tid, +Job Card Scrap Item,Jobbkort Rest Artikel, +Job Card and Capacity Planning,Jobbkort & Kapacitet Planering, +Job Cards,Jobbkort , +Job Paused,Jobb Pausad, +Job Worker,Jobb Ansvarig, +Job Worker Address,Jobb Ansvarig Adress, +Job Worker Address Details,Jobb Ansvarig Adress Detaljer, +Job Worker Contact,Jobb Ansvarig Kontakt, +Job Worker Delivery Note,Jobb Ansvarig Följesedel, +Job Worker Name,Jobb Ansvarig Namn, +Job Worker Warehouse,Jobb Ansvarig Lager, +Job: {0} has been triggered for processing failed transactions,Jobb: {0} är utlöst för bearbetning av misslyckade transaktioner, +Joining,Anställning, +Journal Entries,Journal Poster, +Journal Entry for Asset scrapping cannot be cancelled. Please restore the Asset.,Journal Post för Tillgång avskrivning kan inte annulleras. Vänligen återställ Tillgång., +Journal Entry type should be set as Depreciation Entry for asset depreciation,Journal Post Typ ska anges som Avskrivning Post för tillgång avskrivning, +Journal entries have been created,Journal Poster är skapade, +Journals,Journaler, +Key,Nyckel, +Kindly cancel the Manufacturing Entries first against the work order {0}.,Vänligen annullera Produktion Poster först mot Arbetsorder {0}., +"Last Name, Email or Phone/Mobile of the user are mandatory to continue.","Efternamn, E-post eller Telefon/Mobil erfodras för användare att fortsätta.", +Lead -> Prospect,Potentiell Kund -> Prospekt, +Lead Conversion Time,Potentiell Kund Samtal Tid, +Lead Owner cannot be same as the Lead Email Address,Potentiell Kund Ansvarig kan inte vara samma som Potentiell Kund E-post Adress, +Lead {0} has been added to prospect {1}.,Potentiell Kund {0} är lagd till Prospekt {1}., +Leaderboard,Topplista, +Leads,Potentiella Kunder, +Learn Accounting,Lär dig om Bokföring, +Learn Inventory Management,Lär dig om Lager Hantering, +Learn Manufacturing,Lär dig om Produktion, +Learn Procurement,Lär dig om Inköp, +Learn Project Management,Lär dig om Projekt Hantering, +Learn Sales Management,Lär dig om Försäljning, +"Learn about Common Party","Lär dig om Gemensam Parti", +"Leave blank for home. +This is relative to site URL, for example ""about"" will redirect to ""https://yoursitename.com/about""","Lämna tom för Hem. Detta är relativt till webbadress, till exempel 'Om' kommer att omdirigera till 'https://yoursitename.com/about'", +Ledger Health,Register Status, +Ledger Health Monitor,Register Status Övervakning, +Ledger Health Monitor Company,Register Status Övervakning Bolag, +Ledger Merge,Bokgöring Register Sammanslagning, +Ledger Merge Accounts,Register Sammanslagning Konton, +Ledgers,Register, +Left Child,Vänster Underordnad, +Legend,Förklaring, +Length,Längd, +Length (cm),Längd (cm), +Less than 12 months.,Kortare än tolv månader., +Level (BOM),Nivå (Stycklista), +Limit timeslot for Stock Reposting,Begränsa tid för Lager Omläggning, +Limits don't apply on,Gräns gäller inte, +Link a new bank account,Länka ny Bank Konto, +Link with Customer,Länka med Kund, +Link with Supplier,Länka med Leverantör, +Linked with submitted documents,Länkad med godkända dokument, +Linking Failed,Länkning Misslyckad, +Linking to Customer Failed. Please try again.,Länkning med Kund Misslyckades. Var god försök igen., +Linking to Supplier Failed. Please try again.,Länkning med Leverantör Misslyckades. Var god försök igen., +Links,Länkar, +Loading import file...,Laddar import fil..., +Locked,Låst, +Log Entries,Logg Poster, +Log the selling and buying rate of an Item,Logga försäljning och inköp pris för Artikel, +Lost Quotations,Förlorade Försäljning Offerter, +Lost Quotations %,Förlorade Försäljning Offerter (%), +Lost Reasons are required in case opportunity is Lost.,Förlorad Anledning erfordras om Möjlighet är Förlorad., +Lost Value,Förlorad Värde, +Lost Value %,Förlorad Värde %, +Machine Type,Maskin Typ, +Main Cost Center,Standard Resultat Enhet, +Main Cost Center {0} cannot be entered in the child table,Huvud Resultat Enhet {0} kan inte anges i underordnad tabell, +Maintain Asset,Underhåll Tillgång, +Maintenance Details,Service Detaljer, +Make ,Märke , +Make Asset Movement,Skapa Tillgång Förflyttning, +Make Quotation,Skapa Offert, +Make Return Entry,Skapa Retur Post, +Make Serial No / Batch from Work Order,Skapa Serie / Parti Nummer från Arbetsorder, +Make {0} Variant,Skapa {0} Variant, +Make {0} Variants,Skapa {0} Varianter, +Making Journal Entries against advance accounts: {0} is not recommended. These Journals won't be available for Reconciliation.,Skapa Journal Poster mot förskott konton: {0} rekommenderas inte. Dessa journaler kommer inte att vara tillgängliga för avstämning., +Manage,Hantera, +Mandatory Accounting Dimension,Erfodrad Bokföring Dimension, +Mandatory Depends On,Erfordrad Beroende Av, +Mandatory Field,Erfodrad Fält, +Mandatory Section,Erfodrad Sektion, +Manual Inspection,Manuell Kontroll, +Manufacture Sub-assembly in Operation,Producera Underenhet i Åtgärd, +Manufacturing Type,Produktion Typ, +Mapping Purchase Receipt ...,Mappar Inköp Följesedel..., +Mapping Subcontracting Order ...,Mappar Underleverantör Order ..., +Mapping {0} ...,Mappar {0} ..., +Margin View,Marginal Vy, +Mark As Closed,Ange som Stängd , +Material Returned from WIP,Material Retur från Arbete Pågår, +Material Transfer (In Transit),Material Överföring (I Transit), +Materials are already received against the {0} {1},Material mottagen mot {0} {1}, +Materials needs to be transferred to the work in progress warehouse for the job card {0},Material måste överföras till Arbete Pågår Lager för Jobbkort {0}, +Max Qty (As Per Stock UOM),Maximum Kvantitet (per Lager Enhet), +Maximum Net Rate,Maximum Netto Pris, +Maximum Payment Amount,Maximum Betalning Belopp, +Maximum Value,Maximum Värde, +Maximum quantity scanned for item {0}.,Maximum kvantitet skannad för artikel {0}., +Meeting,Möte, +Mention if non-standard Receivable account,Ange om ej Standard Fordring Konto, +Merge Invoices Based On,Slå Samman Faktura Baserad På, +Merge Progress,Sammanslagning Framsteg, +Merge Similar Account Heads,Slå Samman Liknande Konto Poster, +Merge taxes from multiple documents,Slå Samman Moms från flera dokument, +Merged,Sammanslagen, +"Merging is only possible if following properties are same in both records. Is Group, Root Type, Company and Account Currency","Sammanslagning är endast möjlig om följande egenskaper är lika i båda poster. Är Grupp, Konto Klass, Bolag och Konto Valuta", +Merging {0} of {1},Slår Samman {0} av {1}, +Min Qty (As Per Stock UOM),Minimum Kvantitet (per Lager Enhet), +Min Qty should be greater than Recurse Over Qty,Minimum Kvantitet ska vara högre än Rekurs över kvantitet, +Minimum Net Rate,Minimum Netto Pris, +Minimum Payment Amount,Minimum Betalning Belopp, +Minimum Value,Mimimum Värde, +Mismatch,Felavstämd, +Missing,Saknas, +Missing Asset,Tillgång Saknas, +Missing Cost Center,Resultat Enhet Saknas, +Missing Finance Book,Finans Register Saknas, +Missing Finished Good,Färdig Artikel Saknas, +Missing Formula,Formel Saknas, +Missing Items,Artiklar Saknas, +Missing Payments App,Betalning App Saknas, +Missing Serial No Bundle,Serie Nummer Paket Saknas, +Missing value,Värde Saknas, +Modified By,Modifierad Av, +Modified On,Modifierad, +Module Settings,Modul Inställningar, +Monitor for Last 'X' days,"Övervakning för senaste ""X"" dagar", +Move Stock,Flytta Lager, +Move to Cart,Flytta till Kundkorg, +Movement,Förflyttning, +Moving up in tree ...,Flytta upp i träd..., +Multi-level BOM Creator,Fler Nivå Stycklista Generator, +Multiple Loyalty Programs found for Customer {}. Please select manually.,Flera Lojalitet Program hittades för Kund {}. Välj manuellt., +Multiple Warehouse Accounts,Flera Lager Konton, +Multiple items cannot be marked as finished item,Flera artiklar kan inte väljas som färdiga artiklar, +Must be a publicly accessible Google Sheets URL and adding Bank Account column is necessary for importing via Google Sheets,Måste vara publik tillgänglig URL för Google Sheets och det är nödvändigt att lägga till Bank Konto Kolumn att importera via Google Sheets, +Named Place,Namngiven Plats, +Naming Series and Price Defaults,Nummer Serie & Pris Standard, +Net total calculation precision loss,Netto Total Beräkning Precision Förlust, +New Balance In Account Currency,Ny Saldo i Konto Valuta, +New Event,Ny Händelse, +New Note,Ny Anteckning, +New Task,Ny Uppgift, +New Version,Ny Version, +Newsletter,Nyhetsbrev, +No Answer,Ingen Svar, +No Customers found with selected options.,Inga Kunder hittades med valda alternativ., +No Items selected for transfer.,Inga Artiklar har valts för överföring., +No Matching Bank Transactions Found,Inga matchande banktransaktioner hittades, +No Notes,Inga Anteckningar, +No Outstanding Invoices found for this party,Inga Utestående Fakturor hittades för denna parti, +No POS Profile found. Please create a New POS Profile first,Ingen Kassa Profil hittad. Skapa ny Kassa Profil, +No Records for these settings.,Inga Poster för dessa inställningar., +No Serial / Batches are available for return,Inga Serie Nummer/Partier är tillgängliga för retur, +No Stock Available Currently,Ingen Lager Tillgänglig för närvarande, +No Summary,Ingen Översikt, +No Tax Withholding data found for the current posting date.,Ingen Moms Avdrag data hittades för aktuell bokföring datum., +No Terms,Inga Villkor, +No Unreconciled Invoices and Payments found for this party and account,Inga Oavstämda Fakturor och Betalningar hittades för denna parti och konto, +No Unreconciled Payments found for this party,Inga Oavstämda Betalningar hittades för denna parti, +No Work Orders were created,Inga Arbetsordrar skapades, +No additional fields available,Inga extra fält tillgängliga, +No billing email found for customer: {0},Ingen faktura e-post hittades för kund: {0}, +No data found. Seems like you uploaded a blank file,Ingen data hittades. Det verkar som om tom fil laddats upp, +No employee was scheduled for call popup,Ingen personal var schemalagd för oväntad samtal, +No failed logs,Inga Misslyckade Logg, +No item available for transfer.,Ingen artikel tillgänglig för överföring., +No items are available in sales orders {0} for production,Inga artiklar är tillgängliga i Försäljning Order {0} för produktion, +No items are available in the sales order {0} for production,Inga artiklar är tillgängliga i Försäljning Order {0} för produktion, +No items in cart,Antal Artiklar i Kundkorg, +No matches occurred via auto reconciliation,Inga avstämningar uppstod via automatisk avstämning, +No more children on Left,Inga fler underordnade till Vänster, +No more children on Right,Inga fler underordnade till Höger, +No of Docs,Antal Dokument , +No of Employees,Personal Antal, +No of Months (Expense),Antal Månader, +No of Months (Revenue),Antal Månader, +No open event,Inga öppna Händelse, +No open task,Inga öppna Uppgifter, +No outstanding {0} found for the {1} {2} which qualify the filters you have specified.,Inga utestående {0} hittades för {1} {2} som uppfyller angiven filter., +No primary email found for customer: {0},Ingen primär e-post adress hittades för kund: {0}, +No records found in Allocation table,Inga poster hittades i Tilldelning tabell, +No records found in the Invoices table,Inga poster hittades i Faktura Tabell, +No records found in the Payments table,Inga poster hittades i Betalning Tabell, +No stock transactions can be created or modified before this date.,Inga lager transaktioner kan skapas eller ändras före detta datum., +No {0} Accounts found for this company.,Inga {0} konto hittades för detta bolag., +No.,Nr., +No. of Employees,Personal Antal, +No. of parallel job cards which can be allowed on this workstation. Example: 2 would mean this workstation can process production for two Work Orders at a time.,Antal samtidiga Jobbkort som kan tillåtas på denna arbetsstation. Exempel: 2 skulle innebära att denna arbetsstation kan hantera två Arbetsordrar åt gången., +Note: Automatic log deletion only applies to logs of type Update Cost,Obs: Automatisk logg radering gäller endast loggar av typ Uppdatera Kostnad, +"Note: To merge the items, create a separate Stock Reconciliation for the old item {0}",Obs: För att slå samman artiklar skapar separat lager avstämning för gamla artikel {0}, +Notes HTML,Anteckningar HTML, +Notification,Aviseringar, +Notification Settings,Avisering Inställningar, +Notify Reposting Error to Role,Avisera omläggning fel till roll, +Number of Days,Antal Dagar, +Numeric,Numerisk, +Numeric Inspection,Numerisk Kontroll, +Off,Av, +Offsetting Account,Avräkning Konto, +Offsetting for Accounting Dimension,Avräkning för Bokföring Dimension, +On Paid Amount,På Betald Belopp, +On This Date,Datum, +On Track,På Bana, +On enabling this cancellation entries will be posted on the actual cancellation date and reports will consider cancelled entries as well,När du aktiverar denna annullering kommer poster att publiceras på faktisk annullering datum och rapporter kommer också att inkludera annullerade poster, +"On expanding a row in the Items to Manufacture table, you'll see an option to 'Include Exploded Items'. Ticking this includes raw materials of the sub-assembly items in the production process.","Vid utökning av rad i Artiklar att Producera Tabell,kommer du att se alternativ ""Inkludera Utvidgade Artiklar"". Genom att väljadetta ingår råvaror från delkomponenter i produktion process.", +"On submission of the stock transaction, system will auto create the Serial and Batch Bundle based on the Serial No / Batch fields.",Vid godkännade av lager transaktion kommer system att automatiskt skapa Serie och Parti Paket baserat på Serienummer / Parti fält., +Once the Work Order is Closed. It can't be resumed.,När Arbetsorder är Stängd kan den inte återupptas., +Only 'Payment Entries' made against this advance account are supported.,"Endast ""Betalning Poster"" som skapas mot detta förskott konto stöds.", +Only CSV and Excel files can be used to for importing data. Please check the file format you are trying to upload,Endast CSV och Excel filer kan användas för data import. Kontrollera filformat du försöker ladda upp, +Only Deduct Tax On Excess Amount ,Endast Dra av Skatt på Överskjutande Belopp, +Only Include Allocated Payments,Endast Inkludera allokerade betalningar, +Only Parent can be of type {0},Endast Överordnad kan vara av typ {0}, +Only existing assets,Endast Befintliga Tillgångar, +"Only one Subcontracting Order can be created against a Purchase Order, cancel the existing Subcontracting Order to create a new one.","Endast en Underleverantör Order kan skapas mot en Inköp Order, annullera befintlig Underleverantör Order för att skapa ny.", +Only one {0} entry can be created against the Work Order {1},Endast en {0} post kan skapas mot Arbetsorder {1}, +"Only values between [0,1) are allowed. Like {0.00, 0.04, 0.09, ...} +Ex: If allowance is set at 0.07, accounts that have balance of 0.07 in either of the currencies will be considered as zero balance account","Endast värden mellan [0,1) är tillåtna, t.ex.{0.00, 0.04, 0.09, ...} +Exempel: Om tillåtelse är angiven till 0,07, kommer konton som har saldo på 0,07 i någon av valutorna att betraktas som noll saldo konto.", +Only {0} are supported,Endast {0} stöds, +Open Activities HTML,Öppna Aktiviteter HTML, +Open Call Log,Öppna Samtal Logg, +Open Event,Öppna Händelse, +Open Events,Öppna Händelser, +Open Sales Orders,Öppna Försäljning Ordrar, +Open Task,Öppna Uppgift, +Open Tasks,Öppna Uppgifter, +Open Work Order {0},Öppna Arbetsorder {0}, +Opening & Closing,Öppning & Stängning, +Opening Accumulated Depreciation must be less than or equal to {0},Öppning Ackumulerad Avskrivning måste vara mindre än eller lika med {0}, +Opening Entry can not be created after Period Closing Voucher is created.,Öppning Post kan inte skapas efter att Period Stängning Verifikat är skapad., +Opening Number of Booked Depreciations,Öppning Nummer för Bokförda Avskrivningar, +Opening Purchase Invoices have been created.,Öppning Inköp Fakturor är skapade., +Opening Sales Invoices have been created.,Öppning Försäljning Fakturor är skapade., +Operating Cost Per BOM Quantity,Drift Kostnad per Stycklista Kvantitet, +Operation time does not depend on quantity to produce,Åtgärd Tid beror inte på kvantitet som ska produceras, +Opportunity Amount (Company Currency),Möjlighet Belopp (Bolag Valuta), +Opportunity Owner,Möjlighet Ansvarig, +Opportunity Source,Möjlighet Källa, +Opportunity Summary by Sales Stage,Möjlighet Översikt efter Försäljning Stadium, +Opportunity Summary by Sales Stage ,Möjlighet Översikt efter Försäljning Stadium, +Opportunity Value,Möjlighet Värde, +Other Info,Övrig Information, +Out of stock,Ej på Lager, +Over Picking Allowance,Över Plock Tillåtelse, +Over Receipt,Över Följesedel, +Over Receipt/Delivery of {0} {1} ignored for item {2} because you have {3} role.,Över Följesedel/Leverans av {0} {1} ignoreras för artikel {2} eftersom du har {3} roll., +Over Transfer Allowance,Över Överföring Tillåtelse, +Overbilling of {0} {1} ignored for item {2} because you have {3} role.,Överfakturering av {0} {1} ignoreras för artikel {2} eftersom du har {3} roll., +Overbilling of {} ignored because you have {} role.,Överfakturering av {} ignoreras eftersom du har {} roll., +Overdue Payment,Förfallna Fakturor, +Overdue Payments,Förfallna Fakturor, +Overdue Tasks,Försenade Uppgifter, +Overview,Recension , +PDF Name,PDF Namn, +POS Closing Failed,Kassa Stängning Misslyckad, +POS Closing failed while running in a background process. You can resolve the {0} and retry the process again.,Kassa Stängning misslyckades medan den kördes i bakgrund process. Du kan lösa {0} och försöka igen., +POS Invoice is already consolidated,Kassa Faktura är redan konsoliderad, +POS Invoice is not submitted,Kassa Faktura är inte godkänd, +POS Invoice should have the field {0} checked.,Kassa Faktura ska ha {} fält vald., +POS Invoices will be consolidated in a background process,Kassa Fakturor kommer att konsolideras i bakgrund process, +POS Invoices will be unconsolidated in a background process,Kassa Fakturor kommer att okonsolideras i bakgrund process, +POS Profile doesn't match {},Kassa Profil matchar inte {}, +POS Profile {} contains Mode of Payment {}. Please remove them to disable this mode.,Kassa Profil {} innehåller Betalning Sätt {}. Ta bort Betalning Sätt för att inaktivera detta läge., +POS Search Fields,Kassa Sök Fält, +POS Setting,Kassa Inställningar, +Package No(s) already in use. Try from Package No {0},Paket Nummer används redan. Prova från Paket Nummer {0} , +Packaging Slip From Delivery Note,Packsedel från Försäljning Följesedel, +Packed Items cannot be transferred internally,Packade artiklar kan inte överföras internt, +Packed Qty,Förpackad Kvantitet, +Page Break After Each SoA,Sidbrytning efter varje SoA, +Paid Amount After Tax,Betald Belopp efter Moms, +Paid Amount After Tax (Company Currency),Betald Belopp efter Moms (Bolag Valuta), +Paid From Account Type,Betald från Konto Typ, +Paid To Account Type,Betald till Konto Typ, +Pallets,Pall, +Parameter Group,Parameter Grupp, +Parameter Group Name,Parameter Grupp Namn, +Parcel Template,Leverans Paket Mall, +Parcel Template Name,Leverans Paket Mall Namn, +Parcel weight cannot be 0,Leverans Paket Vikt får inte vara 0, +Parcels,Paket, +Parent Account Missing,Överordnad Konto Saknas, +Parent Document,Överordnad Dokument, +Parent Item {0} must not be a Fixed Asset,Överordnad Artikel {0} får inte vara Tillgång, +Parent Row No,Överordnad Rad Nummer, +Parent Task {0} is not a Template Task,Överordnad Uppgift {0} är inte Mall Uppgift, +Partial Material Transferred,Delvis Material Överförd, +Partial Stock Reservation,Delvis Lager Reservation, +Partial Success,Delvis Klar, +"Partial stock can be reserved. For example, If you have a Sales Order of 100 units and the Available Stock is 90 units then a Stock Reservation Entry will be created for 90 units. ","Delvis Lager kan reserveras. Till exempel, om du har en försäljning order på 100 enheter och det tillgängliga lagret är 90 enheter kommer lager reservation post att skapas för 90", +Partially Delivered,Delvis Levererad, +Partially Reconciled,Delvis Avstämd, +Partially Reserved,Delvis Reserverad, +Partly Paid,Delvis Betald, +Partly Paid and Discounted,Delvis Betald och Rabatterad, +Partnership,Partner, +Party Account No. (Bank Statement),Parti Konto Nummer (Kontoutdrag), +Party Account {0} currency ({1}) and document currency ({2}) should be same,Parti Konto {0} valuta ({1}) och dokument valuta ({2}) ska vara samma, +Party IBAN (Bank Statement),Parti IBAN (Kontoutdrag), +Party Item Code,Parti Artikel Kod, +Party Link,Parti Länk, +Party Name/Account Holder (Bank Statement),Parti Namn/Kontoinnehavare (Kontoutdrag), +Party Specific Item,Parti Specifik Artikel, +Party Type and Party is required for Receivable / Payable account {0},Parti Typ och Parti erfodras för Fordring / Skuld konto {0}, +Party can only be one of {0},Parti kan endast vara en av {0}, +Passport Details,Passport Detaljer, +Pause Job,Pausa Jobb, +Paused,Pausad, +Payment Amount (Company Currency),Faktura Belopp (Bolag Valuta), +"Payment Entry {0} is linked against Order {1}, check if it should be pulled as advance in this invoice.","Betalning Post {0} är länkad till Order {1}, kontrollera om den ska hämtas som förskott på denna faktura.", +Payment Ledger,Betalning Register, +Payment Ledger Balance,Betalning Register Saldo, +Payment Ledger Entry,Betalning Register Post, +Payment Limit,Betalning Gräns, +Payment Reconciliation Allocation,Betalning Avstämning Tilldelning , +Payment Reconciliation Job: {0} is running for this party. Can't reconcile now.,Betalning Avstämning Jobb: {0} körs för denna parti. Kan inte avstämas nu., +Payment Reconciliations,Betalning Avstämningar, +Payment Request Outstanding,Betalning Begäran Utestående Belopp, +Payment Request created from Sales Order or Purchase Order will be in Draft status. When disabled document will be in unsaved state.,Betalning Begäran som skapas från Försäljning Order eller Inköp Order kommer att få Utkast status. När inaktiverad kommer dokument att vara i osparat tillstånd., +Payment Request is already created,Betalning Begäran är redan skapad, +Payment Request took too long to respond. Please try requesting for payment again.,Betalning Begäran tog för lång tid att svara. Försök att begära betalning igen., +Payment Requests cannot be created against: {0},Betalning Begäran kan inte skapas mot: {0}, +Payment Term Outstanding,Betalningsvillkor Utestående Belopp, +Payment Terms Status for Sales Order,Betalning Villkor Status för Försäljning Order, +Payment Terms from orders will be fetched into the invoices as is,Betalning Villkor från Order hämtas till Faktura som den är, +Payment Unlink Error,Betalning Bortkoppling Fel, +Payment of {0} received successfully.,Betalning på {0} mottagen., +Payment of {0} received successfully. Waiting for other requests to complete...,Betalning på {0} mottagen. Väntar på att andra begäran ska slutföras..., +Payment request failed,Betalning Begäran Misslyckades, +Payment term {0} not used in {1},Betalning Villkor {0} används inte i {1}, +Pending processing,Väntar på bearbetning, +Per Received,Per Mottagen, +Percentage (%),Procent (%), +Percentage you are allowed to order beyond the Blanket Order quantity.,Procentandel tillåten för order utöver Blankoavtal Order Kvantitet., +Percentage you are allowed to sell beyond the Blanket Order quantity.,Procentandel tillåten för försäljning utöver Blankoavtal Order Kvantitet., +Period Closed,Period Stängd, +Period Closing Entry For Current Period,Period Låsning Post för Aktuell Period, +Period Closing Settings,Period Låsning Inställningar, +Period Details,Period Detaljer, +Period To Date,Period Till Datum, +Period_from_date,Period Från Datum, +Phone Ext.,Telefon Anknytning, +Pick List Incomplete,Plocklista Ofullständig, +Pick Manually,Plocka Manuellt, +Pick Serial / Batch Based On,Välj Serie / Parti Baserad På, +Pick Serial / Batch No,Välj Serie / Parti Nummer, +Picked Qty (in Stock UOM),Plockad Kvantitet (Lager Enhet), +Pickup,Hämtning, +Pickup Contact Person,Hämtning Adress Kontakt Person, +Pickup Date,Hämtning Datum, +Pickup Date cannot be before this day,Hämtning Datum kan inte infalla före denna dag, +Pickup From,Hämtning Från, +Pickup To time should be greater than Pickup From time,Hämtning Till Tid ska vara senare än Hämtning Från Tid, +Pickup Type,Hämtning Typ, +Pickup from,Hämtning Från, +Pickup to,Hämtning Till, +Pipeline By,Tratt Efter, +Plaid Link Failed,Plaid Länk Misslyckades, +Plaid Link Refresh Required,Plaid Länk Uppdatering erfordras, +Plaid Link Updated,Plaid Länk Uppdaterad, +Plan to Request Qty,Planerad Kvantitet, +Plant Dashboard,Fabrik Översikt Panel, +Plant Floor,Produktion Yta, +Please Set Priority,Ange Prioritet, +Please Specify Account,Specificera Konto, +Please add 'Supplier' role to user {0}.,"Lägg till Roll ""Leverantör"" till användare {0}.", +Please add Request for Quotation to the sidebar in Portal Settings.,Lägg till Offert Förfråga i sidofält i Portal Inställningar., +Please add Root Account for - {0},Lägg till Överordnad Konto för - {0}, +Please add atleast one Serial No / Batch No,Lägg till minst en Serie Nr / Parti Nr, +Please add the Bank Account column,Lägg till Bank Konto kolumn, +Please add the account to root level Company - {0},Lägg till Konto till Överordnad Bolag - {0}, +Please add {1} role to user {0}.,Lägg till roll {1} till användare {0}., +Please adjust the qty or edit {0} to proceed.,Justera kvantitet eller redigera {0} för att fortsätta., +Please attach CSV file,Bifoga CSV Fil, +Please cancel and amend the Payment Entry,Annullera och ändra Betalning Post, +Please cancel payment entry manually first,Annullera Betalning Post manuellt, +Please cancel related transaction.,Annullera relaterad transaktion., +Please check Process Deferred Accounting {0} and submit manually after resolving errors.,Välj Bearbeta Uppskjuten Bokföring {0} och godkänn manuellt efter att ha löst fel., +Please check either with operations or FG Based Operating Cost.,Välj antingen Med Åtgärder eller Färdig Artikel Baserad Åtgärd Kostnad., +Please check the error message and take necessary actions to fix the error and then restart the reposting again.,Kontrollera felmeddelande och vidta nödvändiga åtgärder för att åtgärda fel och starta sedan ompostning igen., +Please check your email to confirm the appointment,Kontrollera din E-post för att bekräfta Möte, +Please contact any of the following users to extend the credit limits for {0}: {1},Kontakta någon av följande användare för att utöka kredit gränser för {0}: {1}, +Please contact any of the following users to {} this transaction.,Kontakta någon av följande användare för att {} denna transaktion., +Please contact your administrator to extend the credit limits for {0}.,Kontakta administratör för att utöka kredit gränser för {0}., +Please create Landed Cost Vouchers against Invoices that have 'Update Stock' enabled.,"Skapa Landad Kostnad Verifikat mot fakturor som har ""Uppdatera Lager"" aktiverad.", +Please create a new Accounting Dimension if required.,Skapa Bokföring Dimension vid behov., +Please create purchase from internal sale or delivery document itself,Skapa Inköp från intern Försäljning eller Följesedel, +"Please delete Product Bundle {0}, before merging {1} into {2}",Ta bort Artikel Paket {0} innan sammanslagning av {1} med {2}, +Please do not book expense of multiple assets against one single Asset.,Bokför inte kostnader för flera Tillgångar mot enskild Tillgång., +Please enable Use Old Serial / Batch Fields to make_bundle,Aktivera Använd gamla Serie / Parti Fält för att skapa paket, +Please enable only if the understand the effects of enabling this.,Aktivera endast om du förstår effekterna av att aktivera detta., +Please enable {0} in the {1}.,Aktivera {0} i {1}., +Please enable {} in {} to allow same item in multiple rows,Aktivera {} i {} för att tillåta samma Artikel i flera rader, +Please ensure that the {0} account is a Balance Sheet account. You can change the parent account to a Balance Sheet account or select a different account.,Kontrollera att {0} konto är Balans Rapport Konto. Ändra Överordnad Konto till Balans Rapport Konto eller välj annat konto., +Please ensure that the {0} account {1} is a Payable account. You can change the account type to Payable or select a different account.,Kontrollera att {0} konto {1} är Skuld Konto. Ändra Konto Typ till Skuld Konto Typ eller välj ett annat konto., +Please ensure {} account is a Balance Sheet account.,Kontrollera att {} konto är Balans Rapport konto., +Please ensure {} account {} is a Receivable account.,Kontrollera att {} konto {} är fordring konto., +Please enter Root Type for account- {0},Ange Konto Klass för konto {0}, +Please enter Serial Nos,Ange Serie Nummer, +Please enter Shipment Parcel information,Ange Leverans Paket information, +Please enter Stock Items consumed during the Repair.,Ange Artiklar förbrukade under reparation., +Please enter mobile number first.,Ange Mobil Nummer, +Please enter quantity for item {0},Ange Kvantitet för artikel {0}, +Please enter serial nos,Ange Serie Nummer, +"Please first set Last Name, Email and Phone for the user","Ange Efternamn, E-post och Telefon för användare", +Please fix overlapping time slots for {0},Åtgärda överlappande tider för {0}, +Please fix overlapping time slots for {0}.,Åtgärda överlappande tider för {0}, +Please import accounts against parent company or enable {} in company master.,Importera konton mot moderbolag eller aktivera {} i bolag inställningar., +"Please keep one Applicable Charges, when 'Distribute Charges Based On' is 'Distribute Manually'. For more charges, please create another Landed Cost Voucher.","Behåll en Tillämplig Avgift när ""Distribuera avgifter Baserat på"" är ""Distribuera Manuellt"". För fler avgifter, skapa annan Landad Kostnad Verifikat", +Please make sure the file you are using has 'Parent Account' column present in the header.,"Kontrollera att fil har kolumn ""Överordnad Konto"" i rubrik.", +Please mention 'Weight UOM' along with Weight.,"Ange ""Vikt Enhet"" tillsammans med Vikt.", +Please mention the Current and New BOM for replacement.,Ange Aktuell och Ny Stycklista för ersättning., +Please rectify and try again.,Rätta till och försök igen., +Please refresh or reset the Plaid linking of the Bank {}.,Uppdatera eller återställ Plaid Länk för Bank {}., +Please save before proceeding.,Spara innan du fortsätter., +Please select Bank Account,Välj Bank Konto, +Please select Finished Good Item for Service Item {0},Välj Färdig Artikel för Service Artikel {0}, +Please select Serial/Batch Nos to reserve or change Reservation Based On to Qty.,Välj Serie / Parti Nummer att reservera eller ändra Reservation Baserad På Kvantitet., +Please select Subcontracting Order instead of Purchase Order {0},Välj Underleverantör Order istället för Inköp Order {0}, +Please select Unrealized Profit / Loss account or add default Unrealized Profit / Loss account account for company {0},Välj Orealiserad Resultat Konto eller ange standard konto för Orealiserad Resultat Konto för Bolag {0}, +Please select a Subcontracting Purchase Order.,Välj Underleverantörer Inköp Order, +Please select a Warehouse,Välj Lager, +Please select a Work Order first.,Välj Arbetsorder, +Please select a country,Välj Land, +Please select a customer for fetching payments.,Välj Kund för att hämta betalningar., +Please select a date,Välj Datum, +Please select a date and time,Välj Tid och Datum, +Please select a row to create a Reposting Entry,Välj rad att skapa Ompostering Post, +Please select a supplier for fetching payments.,Välj Leverantör för att hämta betalningar., +Please select a valid Purchase Order that has Service Items.,Välj giltig Inköp Order med Service Artiklar., +Please select a valid Purchase Order that is configured for Subcontracting.,Välj giltig Inköp Order som är konfigurerad för Underleverantör., +Please select an item code before setting the warehouse.,Välj Artikel Kod innan du anger Lager., +Please select either the Item or Warehouse or Warehouse Type filter to generate the report.,"Välj antingen Artikel,Lager eller Lager Typ filter att skapa rapport.", +Please select items,Välj Artiklar, +Please select items to reserve.,Välj Artiklar att reservera, +Please select items to unreserve.,Välj Artiklar att reservera, +Please select only one row to create a Reposting Entry,Vänligen välj endast en rad för att skapa Ompostering Post, +Please select rows to create Reposting Entries,Välj rader för att skapa Ompostering Poster, +Please select the required filters,Välj de filter som krävs, +Please select valid document type.,Välj giltig dokument typ., +Please set Account,Ange Konto, +Please set Accounting Dimension {} in {},Ange Bokföring Dimension {} i {}, +Please set Email/Phone for the contact,Ange E-post/Telefon för Kontakt, +Please set Fiscal Code for the customer '%s',"Ange Org.Nr. för Kund ""%s""", +Please set Fiscal Code for the public administration '%s',"Ange Org.Nr. för Offentlig Förvaltning ""%s""", +Please set Fixed Asset Account in {} against {}.,Ange Tillgång Konto i {} mot {}., +Please set Opening Number of Booked Depreciations,Ange Öppning Nummer för Bokförda Avskrivningar, +Please set Parent Row No for item {0},Ange Överordnad Rad Nummer för artikel {0}, +Please set Root Type,Ange Konto Klass, +Please set Tax ID for the customer '%s',Ange Org.Nr. for Kund '%s', +Please set VAT Accounts in {0},Ange Moms Konton i {0}, +"Please set Vat Accounts for Company: ""{0}"" in UAE VAT Settings","Ange Moms Konton för Bolag: ""{0}"" i moms inställningarna i Förenade Arabemirater", +Please set a Cost Center for the Asset or set an Asset Depreciation Cost Center for the Company {},Ange Resultat Enhet för Tillgång eller ange Resultat Enhet för Tillgång Avskrivningar för Bolag {}, +Please set a default Holiday List for Company {0},Ange standard Helg Lista för Bolag {0}, +Please set an Address on the Company '%s',Ange adress för Bolag '%s', +Please set an Expense Account in the Items table,Ange Kostnad konto i Artikel tabell, +Please set default Exchange Gain/Loss Account in Company {},Ange Standard Valutaväxling Resultat Konto för Bolag {}, +Please set default Expense Account in Company {0},Ange Standard Konstnad Konto för Bolag {0}, +Please set default cost of goods sold account in company {0} for booking rounding gain and loss during stock transfer,Ange Standard Kostnad för sålda artiklar i bolag {0} för bokning av avrundning av vinst och förlust under lager överföring, +Please set either the Tax ID or Fiscal Code on Company '%s',"Ange antingen Skatt eller Moms Kod för Bolag ""%s""", +Please set filters,Ange Filter, +Please set one of the following:,Ange något av följande:, +Please set the cost center field in {0} or setup a default Cost Center for the Company.,Ange Resultat Enhet i {0} eller ange Standard Resultat Enhet för Bolag., +Please set {0} in BOM Creator {1},Ange {0} i Stycklista Generator {1}, +Please setup and enable a group account with the Account Type - {0} for the company {1},Konfigurera och aktivera Kontoplan Grupp med Kontoklass {0} för bolag {1}, +Please share this email with your support team so that they can find and fix the issue.,Dela detta e-post meddelande med support så att de kan hitta och åtgärda problem. , +Please specify a {0},Ange {0}, +Please try again in an hour.,Försök igen om en timme., +Please update Repair Status.,Uppdatera Reparation Status., +Portal User,Portal Användare, +Portal Users,Portal Användare, +Posting Datetime,Bokföring Datum och Tid, +Powered by {0},Tillhandahålls av {0}, +"Previous Year is not closed, please close it first","Föregående År är inte stängd, vänligen stäng det", +Price ({0}),Pris ({0}), +Price List Defaults,Prislista Standard, +Price Per Unit ({0}),Pris Per Enhet ({0}), +Primary Address and Contact,Primär Adress & Kontakt, +Primary Contact,Primär Kontakt, +Primary Party,Primär Parti, +Primary Role,Primär Roll, +Print Format Builder,Utskrift Format Redigerare, +Print Style,Utskrift Stil, +Printing,Utskrift, +Priority cannot be lesser than 1.,Prioritet får inte vara mindre än 1., +Priority is mandatory,Parti Erfodras , +Probability,Sannolikhet, +Process Loss,Process Förlust, +Process Loss Percentage cannot be greater than 100,Process Förlust i Procent får inte vara större än 100 , +Process Loss Qty,Process Förlust Kvantitet, +Process Loss Report,Process Förlust Rapport, +Process Loss Value,Process Förlust Värde, +Process Payment Reconciliation,Betalning Avstämning Bearbetning, +Process Payment Reconciliation Log,Betalning Avstämning Bearbetning Logg, +Process Payment Reconciliation Log Allocations,Betalning Avstämning Bearbetning Logg Tilldelningar, +Process Subscription,Behandla Prenumeration, +Process in Single Transaction,Process i Singel Transaktion, +Processed BOMs,Behandlade Stycklistor, +Processing Sales! Please Wait...,Behandlar Försäljning!Vänlige Vänta..., +Produced / Received Qty,Producerad / Mottagen Kvantitet, +Product Price ID,Artikel Pris, +Production Plan Already Submitted,Produktion Plan Redan Godkänd, +Production Plan Item Reference,Produktion Plan Post Referens, +Production Plan Qty,Produktion Plan Kvantitet, +Production Plan Sub Assembly Item,Produktion Plan Delmontering Artikel, +Production Plan Sub-assembly Item,Produktion Plan Delmontering Artikel, +Production Plan Summary,Produktion Plan Översikt, +Profile,Profil, +Profit and Loss Summary,Resultat Rapport Översikt, +Progress,Framsteg, +Progress (%),Framsteg(%), +Project Progress:,Projekt Framsteg:, +Prompt Qty,Fråga efter Kvantitet, +Prospect,Prospekt, +Prospect Lead,Prospekt Potentiell Kund, +Prospect Opportunity,Prospekt Möjlighet, +Prospect Owner,Prospekt Ansvarig, +Prospect {0} already exists,Prospekt {0} finns redan, +Provisional Account,Provisoriskt Konto, +Provisional Expense Account,Provisorisk Kostnad Konto, +Purchase Order Item reference is missing in Subcontracting Receipt {0},Inköp Order Artikel Referens saknas på Underleverantör Följesedel {0}, +Purchase Orders {0} are un-linked,Inköp Ordrar {0} är inte länkade, +Purchase Receipt (Draft) will be auto-created on submission of Subcontracting Receipt.,Inköp Följesedel (utkast) kommer att skapas automatiskt vid godkännande av Underleverantör Följesedel., +Purchase Receipt {0} created.,Inköp Följesedel {0} skapad, +Purchase Value,Inköp Värde, +Purchases,Inköp, +Purposes Required,Anledning Erfodras, +Putaway Rule,Lägg Undan Regel, +Putaway Rule already exists for Item {0} in Warehouse {1}.,Lägg Undan Regel finns redan för Artikel {0} i Lager {1}., +Qty ,Kvantitet, +Qty After Transaction,Kvantitet efter Transaktion, +Qty As Per BOM,Kvantitet per Stycklista, +Qty Change,Kvantitet Förändring, +Qty In Stock,Kvantitet i Lager, +Qty Per Unit,Kvantitet per Enhet, +"Qty To Manufacture ({0}) cannot be a fraction for the UOM {2}. To allow this, disable '{1}' in the UOM {2}.","Kvantitet att Producera ({0}) kan inte vara bråkdel för enhet {2}. För att tillåta detta, inaktivera '{1}' i enhet {2}.", +Qty To Produce,Kvantitet att Producera, +Qty and Rate,Kvantitet och Pris, +Qty as Per Stock UOM,Kvantitet per Lager Enhet, +Qty for which recursion isn't applicable.,Kvantitet för vilket rekursion inte är tillämplig., +Qty in Stock UOM,Kvantitet i Lager Enhet, +Qty of Finished Goods Item should be greater than 0.,Kvantitet Färdiga Artiklar ska vara högre än 0., +Qty to Be Consumed,Kvantitet att Förbruka, +Qty to Build,Kvantitet att Producera, +Qty to Fetch,Kvantitet att Hämta, +Qty to Produce,Kvantitet att Producera, +Qualification Status,Kvalificering Status, +Qualified,Kvalificerad, +Qualified By,Kvalificerad Av, +Qualified on,Kvalificerad(Datum), +Quality Inspection Parameter,Kvalitet Kontroll Parameter, +Quality Inspection Parameter Group,Kvalitet Kontroll Parametrar Grupp, +Quality Inspection Settings,Kvalitet Kontroll Inställningar, +Quality Inspection(s),Kvalitet Kontroll, +Quantity is required,Kvantitet erfodras, +"Quantity must be greater than zero, and less or equal to {0}",Kvantitet måste vara större än noll och mindre eller lika med {0}, +Quantity to Produce should be greater than zero.,Kvantitet att producera ska vara högre än noll., +Quantity to Scan,Kvantitet att Skanna, +Quarter {0} {1},Kvartal {0} {1}, +Quotation Number,Försäljning Offert Nummer, +Quoted Amount,Offererad Belopp, +Rate Difference with Purchase Invoice,Pris Differens mot Inköp Faktura, +Rate Section,Pris, +Rate of Stock UOM,Pris av Lager Enhet, +Ratios,Förhållanden, +Raw Material Cost Per Qty,Råmaterial Kostnad per Kvantitet, +Raw Material Item,Råmaterial Artikel, +Raw Material Value,Råmaterial Värde, +Raw Materials Actions,Råmaterial Åtgärder, +Raw Materials Consumption ,Råmaterial Förbrukning , +Raw Materials Warehouse,Råmaterial Lager, +Reached Root,Nått Rot, +Reading Value,Avläst Värde, +Reason for hold:,Anledning för Spärr:, +Rebuild Tree,Bygg om Träd, +Rebuilding BTree for period ...,Bygger om BTree för period ..., +Recalculate Incoming/Outgoing Rate,Räkna om In/Ut Pris, +Recalculating Purchase Cost against this Project...,Räkna om Inköp Kostnad mot detta Projekt..., +Receivable/Payable Account,Fordring / Skuld Konto, +Receivable/Payable Account: {0} doesn't belong to company {1},Fordring / Skuld Konto: {0} tillhör inte bolag {1}, +Received Amount After Tax,Mottaget Belopp Efter Moms, +Received Amount After Tax (Company Currency),Mottaget Belopp Efter Moms (Bolag Valuta), +Received Amount cannot be greater than Paid Amount,Mottaget Belopp kan inte vara högre än Betald Belopp, +Received Qty in Stock UOM,Mottagen Kvantitet (per Lager Enhet), +Recent Orders,Senaste Ordrar, +Recent Transactions,Senaste Transaktioner, +Reconcile All Serial Nos / Batches,Stäm av alla Serie Nummer / Partier, +Reconcile on Advance Payment Date,Stäm av på Förskott Betalning Datum, +Reconcile the Bank Transaction,Avstäm Bank Transaktion, +Reconciled Entries,Avstämda Poster, +Reconciliation Error Log,Avstämning Fel Logg, +Reconciliation Logs,Avstämning Logg, +Reconciliation Progress,Avstämning Framsteg, +Recording HTML,Inspelning HTML, +Recoverable Standard Rated expenses should not be set when Reverse Charge Applicable is Y,Återställbara Standard Klassade Kostnader ska inte anges när Omvänd Debitering är Ja, +Recurse Every (As Per Transaction UOM),Rekurs Varje (per Transaktion Enhet), +Recurse Over Qty cannot be less than 0,Rekurs Över Kvantitet får inte vara mindre än 0, +Recursive Discounts with Mixed condition is not supported by the system,Rekursiva Rabatter med Blandat Villkor stöds inte av system, +Reference Date for Early Payment Discount,Referens Datum för Tidig Betalning Rabatt, +Reference Detail,Referens Detalj, +Reference DocType,Referens DocType, +Reference Exchange Rate,Referens Växel Kurs, +Reference No,Referens Nummer. , +Reference number of the invoice from the previous system,Referens Nummer på Faktura från tidigare system, +References to Sales Invoices are Incomplete,Referenser till Försäljning Fakturor är ofullständiga, +References to Sales Orders are Incomplete,Referenser till Försäljning Ordrar är ofullständiga, +References {0} of type {1} had no outstanding amount left before submitting the Payment Entry. Now they have a negative outstanding amount.,Referenser {0} av typ {1} hade inget utestående belopp kvar innan godkännande av Betalning Post. Nu har de negativ utestående belopp., +Refresh Google Sheet,Uppdatera Google Sheet, +Refresh Plaid Link,Uppdatera Plaid Länk, +Regenerate Closing Stock Balance,Återskapa Stängning Lager Saldo, +Rejected Serial and Batch Bundle,Avvisad Serie och Parti Paket, +Rejected Warehouse and Accepted Warehouse cannot be same.,Avvisad lager och Accepterad lager kan inte vara samma., +Remarks Column Length,Anmärkningar Kolumn Bredd, +Remove Parent Row No in Items Table,Ta bort Överordnad Radnummer i Artikel Tabell, +Repair,Reparera, +Repair Asset,Reparera Tillgång, +Repair Details,Reparation Detaljer, +"Replace a particular BOM in all other BOMs where it is used. It will replace the old BOM link, update cost and regenerate ""BOM Explosion Item"" table as per new BOM. +It also updates latest price in all the BOMs.","Ersätt stycklista i alla andra stycklistor där den används. Den kommer att ersätta gamla stycklista länk, uppdatera kostnaden och regenerera tabell ""Stycklista Utvidgad Artikel"" enligt ny stycklista. +Den uppdaterar också senaste pris i alla stycklistor.", +Report Error,Rapport Fel, +Report Filters,Rapport Sortering, +Report View,Rapport Vy, +Repost Accounting Ledger,Posta om Bokföring Register, +Repost Accounting Ledger Items,Posta om Bokföring Register Poster, +Repost Accounting Ledger Settings,Posta om Bokföring Register Poster Inställningar, +Repost Allowed Types,Posta om Tillåtna Typer, +Repost Error Log,Posta om Fel Logg, +Repost Item Valuation,Posta om Artikel Värdering, +Repost Payment Ledger,Posta om Betalning Register, +Repost Payment Ledger Items,Posta om Betalning Register Poster, +Repost has started in the background,Repost startad i bakgrund, +Repost in background,Repost i bakgrund, +Repost started in the background,Repost startad i bakgrund, +Reposting Completed {0}%,Repostering Klar {0}%, +Reposting Data File,Repostering av Data Fil, +Reposting Info,Repostering Info, +Reposting Progress,Repostering Framsteg, +Reposting entries created: {0},Repostering Poster skapade: {0}, +Reposting has been started in the background.,Repostering startad i bakgrund, +Reposting in the background.,Repostering i bakgrund, +Represents a Financial Year. All accounting entries and other major transactions are tracked against the Fiscal Year.,Representerar ett bokföringsår. Alla bokföringsposter och andra större transaktioner spåras mot bokföringsår., +Request Parameters,Begäran Parametrar, +Request Timeout,Begäran Löpte Ut, +Reservation Based On,Reservation Baserad På, +Reserve,Reservera, +Reserve Stock,Reservera, +"Reserved Qty ({0}) cannot be a fraction. To allow this, disable '{1}' in UOM {3}.","Reserverat Kvantitet ({0}) kan inte vara bråkdel. För att tillåta detta, inaktivera '{1}' i Enhet {3}.", +Reserved Qty for Production Plan,Reserverad Kvantitet för Produktion Plan, +Reserved Qty for Subcontract,Reserverad Kvantitet för Underleverantör, +Reserved Qty should be greater than Delivered Qty.,Reserverad Kvantitet ska vara högre än Levererad Kvantitet., +Reserved Serial No.,Reserverad Serie Nummer, +Reserved Stock,Reserverad, +Reserved Stock for Batch,Reserverad för Parti, +Reserved for POS Transactions,Reserverad för Kassa, +Reserved for Production,Reserverad för Produktion, +Reserved for Production Plan,Reserverad för Produktion Plan, +Reserved for Sub Contracting,Reserverad för Underleverantör, +Reserving Stock...,Reserverar...., +Reset Company Default Values,Återställ Bolag Standard Värde, +Reset Plaid Link,Återställ Plaid Länk, +Reset Raw Materials Table,Återställ Råmaterial Tabell, +Resolution Due,Beslut om, +Response and Resolution,Svar och Lösning, +Restart,Starta om, +Restore Asset,Återställ Tillgång, +Restrict,Begränsa, +Restrict Items Based On,Begränsa Artiklar Baserat På, +Result Key,Resultat Nyckel, +Resume Job,Återuppta Jobb, +Retried,Försökte igen, +Retry,Försök igen, +Retry Failed Transactions,Försök igen med Misslyckade Transaktioner, +Return Against,Retur Mot, +Return Against Subcontracting Receipt,Retur mot Underleverantör Följesedel, +Return Components,Returnera Komponenter, +Return Issued,Retur Utfärdad, +Return Qty,Retur Kvantitet, +Return Qty from Rejected Warehouse,Retur Kvantitet från Avvisad Lager, +Return of Components,Retur av Komponenter, +Returned,Retur, +Returned Against,Returnerad Mot, +Returned Qty ,Retur Kvantitet, +Returned Qty in Stock UOM,Retur Kvantitet (per Lager Enhet), +Returned exchange rate is neither integer not float.,Returnerad växelkurs är varken heltal eller flyttal., +Revaluation Journals,Omvärdering Journaler, +Revaluation Surplus,Omvärdering Överskott, +Revenue,Intäkt, +Reversal Of,Återföring Av, +Right Child,Höger Underordnad, +Role Allowed to Create/Edit Back-dated Transactions,Roll Godkänd att Skapa/Redigera Bakdaterade Transaktioner, +Role Allowed to Over Bill ,Roll Godkänd att Överfakturera, +Role Allowed to Over Deliver/Receive,Roll Godkänd att Över Leverera/Ta Emot, +Role Allowed to Override Stop Action,Roll Godkänd att Åsidosätta Stopp Åtgärd, +Role allowed to bypass Credit Limit,Roll Godkänd att Åsidosätta Kredit Gräns, +Root,Klass, +"Root Type for {0} must be one of the Asset, Liability, Income, Expense and Equity","Konto Klass för {0} måste vara en av följande klasser: Tillgång, Skuld, Intäkt, Kostnad och Eget Kapital", +Round Free Qty,Avrunda Gratis Kvantitet, +Round Off Tax Amount,Avrunda Moms Belopp, +Round Tax Amount Row-wise,Avrunda Moms Belopp per Artikelrad, +Rounding Loss Allowance,Avrundning Förlust Tillåtelse, +Rounding Loss Allowance should be between 0 and 1,Avrundning Förlust Tillåtelse ska vara mellan 0 och 1, +Rounding gain/loss Entry for Stock Transfer,Avrundning Resultat Post för Lager Överföring, +Row #,Rad #, +Row # {0}:,Rad # {0}:, +Row #{0}: A reorder entry already exists for warehouse {1} with reorder type {2}.,Rad # {0}: Återbeställning Post finns redan för lager {1} med återbeställning typ {2}., +Row #{0}: Acceptance Criteria Formula is incorrect.,Rad # {0}: Godkännande Villkor Formel är felaktig., +Row #{0}: Acceptance Criteria Formula is required.,Rad # {0}: Godkännande Villkor Formel erfodras., +Row #{0}: Accepted Warehouse and Rejected Warehouse cannot be same,Rad # {0}: Godkänd Lager och Avvisat Lager kan inte vara samma, +Row #{0}: Accepted Warehouse is mandatory for the accepted Item {1},Rad # {0}: Godkänd Lager erfodras för godkänd Artikel {1}, +Row #{0}: Allocated Amount cannot be greater than Outstanding Amount of Payment Request {1},Rad #{0}: Tilldelad belopp kan inte vara högre än utestående belopp för betalning begäran {1}, +Row #{0}: Allocated amount:{1} is greater than outstanding amount:{2} for Payment Term {3},Rad # {0}: Tilldela belopp:{1} är högre än utestående belopp:{2} för Betalning Villkor {3}, +Row #{0}: Amount must be a positive number,Rad # {0}: Belopp måste vara positiv tal, +Row #{0}: BOM is not specified for subcontracting item {0},Rad # {0}: Stycklista är inte specificerad för Underleverantör Artikel {0}, +Row #{0}: Batch No {1} is already selected.,Rad # {0}: Parti Nummer {1} är redan vald., +Row #{0}: Cannot allocate more than {1} against payment term {2},Rad # {0}: Kan inte tilldela mer än {1} mot betalning villkor {2}, +Row #{0}: Cannot transfer more than Required Qty {1} for Item {2} against Job Card {3},Rad # {0}: Kan inte överföra mer än Erforderlig Kvantitet {1} för Artikel {2} mot Jobbkort {3}, +Row #{0}: Consumed Asset {1} cannot be Draft,Rad # {0}: Förbrukad Tillgång {1} kan inte vara Utkast, +Row #{0}: Consumed Asset {1} cannot be cancelled,Rad # {0}: Förbrukad tillgång {1} kan inte annulleras, +Row #{0}: Consumed Asset {1} cannot be the same as the Target Asset,Rad # {0}: Förbrukad Tillgång {1} kan inte vara samma som Mål Tillgång, +Row #{0}: Consumed Asset {1} cannot be {2},Rad # {0}: Förbrukad Tillgång {1} kan inte vara {2}, +Row #{0}: Consumed Asset {1} does not belong to company {2},Rad # {0}: Förbrukad Tillgång {1} tillhör inte Bolag {2}, +Row #{0}: Cumulative threshold cannot be less than Single Transaction threshold,Rad # {0}: Kumulativ tröskel får inte vara lägre än Enskild Transaktion tröskel, +Row #{0}: Dates overlapping with other row,Rad # {0}: Datum överlappar andra rad , +Row #{0}: Default BOM not found for FG Item {1},Rad # {0}: Standard Stycklista hittades inte för Färdig Artikel {1} , +Row #{0}: Expense Account not set for the Item {1}. {2},Rad # {0}: Kostnad Konto inte angiven för Artikel {1}. {2}, +Row #{0}: Finished Good Item Qty can not be zero,Rad # {0}: Färdig Artikel Kvantitet kan inte vara noll, +Row #{0}: Finished Good Item is not specified for service item {1},Rad # {0}: Färdig Artikel är inte specificerad för Service Artikel {1} , +Row #{0}: Finished Good Item {1} must be a sub-contracted item,Rad # {0}: Färdig Artikel {1} måste vara Underleverantör Artikel , +Row #{0}: Finished Good reference is mandatory for Scrap Item {1}.,Rad # {0}: Färdig Artikel referens erfodras för Rest Artikel {1}. , +Row #{0}: For {1} Clearance date {2} cannot be before Cheque Date {3},Rad #{0}: För {1} Avstämning datum {2} kan inte vara före Check Datum {3}, +"Row #{0}: For {1}, you can select reference document only if account gets credited",Rad # {0}: För {1} kan du välja referens dokument endast om konto krediteras, +"Row #{0}: For {1}, you can select reference document only if account gets debited",Rad # {0}: För {1} kan du välja referens dokument endast om konto debiteras, +Row #{0}: From Date cannot be before To Date,Rad # {0}: Från Datum kan inte vara före Till Datum, +Row #{0}: Item {1} does not exist,Rad # {0}: Artikel {1} finns inte, +"Row #{0}: Item {1} has been picked, please reserve stock from the Pick List.","Rad # {0}: Artikel {1} är plockad, reservera lager från Plocklista. ", +Row #{0}: Item {1} is not a service item,Rad # {0}: Artikel {1} är inte service artikel, +Row #{0}: Item {1} is not a stock item,Rad # {0}: Artikel {1} är inte service artikel, +Row #{0}: Only {1} available to reserve for the Item {2},Rad # {0}: Endast {1} tillgänglig att reservera för artikel {2} , +Row #{0}: Please select Item Code in Assembly Items,Rad # {0}: Välj Artikel Kod för Montering Artiklar, +Row #{0}: Please select the BOM No in Assembly Items,Rad # {0}: Välj Stycklista Nummer för Montering Artiklar, +Row #{0}: Please select the Sub Assembly Warehouse,Rad # {0}: Välj Undermontering Lager, +Row #{0}: Please update deferred revenue/expense account in item row or default account in company master,Rad # {0}: Uppdatera konto för uppskjutna intäkter/kostnader i artikel rad eller standard konto i bolag, +Row #{0}: Qty increased by {1},Rad # {0}: Kvantitet ökade med {1}, +Row #{0}: Qty must be a positive number,Rad # {0}: Kvantitet måste vara psitivt tal, +Row #{0}: Qty should be less than or equal to Available Qty to Reserve (Actual Qty - Reserved Qty) {1} for Iem {2} against Batch {3} in Warehouse {4}.,Rad # {0}: Kvantitet ska vara mindre än eller lika med tillgänglig kvantitet att reservera (verklig antal - reserverad antal) {1} för artikel {2} mot parti {3} i lager {4}., +Row #{0}: Quantity to reserve for the Item {1} should be greater than 0.,Rad # {0}: Kvantitet att reservera för Artikel {1} ska vara högre än 0., +Row #{0}: Rate must be same as {1}: {2} ({3} / {4}),Rad #{0}: Pris måste vara samma som {1}: {2} ({3} / {4}) , +Row #{0}: Received Qty must be equal to Accepted + Rejected Qty for Item {1},Rad #{0}: Mottaget Kvantitet måste vara lika med Godkänd + Avvisad Kvantitet för Artikel {1}, +Row #{0}: Rejected Qty cannot be set for Scrap Item {1}.,Rad # {0}: Avvisad Kvantitet kan inte anges för Rest Artikel {1}., +Row #{0}: Rejected Warehouse is mandatory for the rejected Item {1},Rad # {0}: Avvisad Lager erfodras för avvisad Artikel {1}, +Row #{0}: Scrap Item Qty cannot be zero,Rad # {0}: Rest Artikel Kvantitet kan inte vara noll, +"Row #{0}: Selling rate for item {1} is lower than its {2}. + Selling {3} should be atleast {4}.

Alternatively, + you can disable selling price validation in {5} to bypass + this validation.","Rad # {0}: Försäljning Pris för artikel {1} är lägre än {2}. + Försäljning Pris {3} ska vara minst {4}.

Alternativt, + kan man inaktivera validering av försäljning pris i {5} för att kringgå + denna validering.", +Row #{0}: Serial No {1} for Item {2} is not available in {3} {4} or might be reserved in another {5}.,Rad # {0}: Serie Nummer {1} för artikel {2} är inte tillgänglig i {3} {4} eller kan vara reserverad i annan {5}., +Row #{0}: Serial No {1} is already selected.,Rad # {0}: Serie Nummer {1} är redan vald., +Row #{0}: Start Time and End Time are required,Rad # {0}: Från Tid och till Tid erfodras. , +Row #{0}: Start Time must be before End Time,Rad # {0}: Från Tid måste vara före till Tid , +Row #{0}: Status is mandatory,Rad # {0}: Status erfodras, +Row #{0}: Stock cannot be reserved for Item {1} against a disabled Batch {2}.,Rad # {0}: Lager kan inte reserveras för artikel {1} mot inaktiverad Parti {2}., +Row #{0}: Stock cannot be reserved for a non-stock Item {1},Rad # {0}: Lager kan inte reserveras för artikel som inte finns i lager {1}, +Row #{0}: Stock cannot be reserved in group warehouse {1}.,Rad # {0}: Lager kan inte reserveras i Grupp Lager {1}., +Row #{0}: Stock is already reserved for the Item {1}.,Rad # {0}: Lager är redan reserverad för artikel {1}., +Row #{0}: Stock is reserved for item {1} in warehouse {2}.,Rad # {0}: Lager är reserverad för artikel {1} i lager {2}., +Row #{0}: Stock not available to reserve for Item {1} against Batch {2} in Warehouse {3}.,Rad # {0}: Lager är inte tillgänglig att reservera för artikel {1} mot Parti {2} i Lager {3}., +Row #{0}: Stock not available to reserve for the Item {1} in Warehouse {2}.,Rad # {0}: Kvantitet ej tillgänglig för reservation för Artikel {1} på {2} Lager., +Row #{0}: The warehouse {1} is not a child warehouse of a group warehouse {2},Rad # {0}: Lager {1} är inte underordnad till grupp lager {2}, +Row #{0}: You cannot use the inventory dimension '{1}' in Stock Reconciliation to modify the quantity or valuation rate. Stock reconciliation with inventory dimensions is intended solely for performing opening entries.,Rad # {0}: Man kan inte använda Lager Dimension '{1}' i Lager Avstämning för att ändra kvantitet eller Grund Pris. Lager Avstämning med Lager Dimensioner är endast avsedd för att utföra öppningsposter., +Row #{0}: You must select an Asset for Item {1}.,Rad # {0}: Du måste välja Tillgång för Artikel {1}., +Row #{0}: {1} is not a valid reading field. Please refer to the field description.,Rad #{0}: {1} är inte giltigt läsfält. Se fält beskrivning., +Row #{0}: {1} of {2} should be {3}. Please update the {1} or select a different account.,Rad # {0}: {1} av {2} ska vara {3}. Uppdatera {1} eller välj ett annat konto., +Row #{1}: Warehouse is mandatory for stock Item {0},Rad # {1}: Lager erfodras för lager artikel {0} , +Row #{}: Finance Book should not be empty since you're using multiple.,Rad # {}: Finans Register ska inte vara tom eftersom du använder flera., +Row #{}: Please use a different Finance Book.,Rad # {}: Använd annan Finans Register., +Row #{}: The original Invoice {} of return invoice {} is not consolidated.,Rad #{}: Ursprunglig Faktura {} för Retur Faktura {} är inte konsoliderad., +Row #{}: item {} has been picked already.,Rad # {}: Artikel {} är redan plockad., +Row #{}: {} {} doesn't belong to Company {}. Please select valid {}.,Rad # {}: {} {} tillhör inte bolag {}. Välj giltig {}., +Row No {0}: Warehouse is required. Please set a Default Warehouse for Item {1} and Company {2},Rad # {0}: Lager erfodras. Ange Standard Lager för Artikel {1} och Bolag {2}, +Row Number,Rad Nummer, +Row {0},Rad {0}, +"Row {0} picked quantity is less than the required quantity, additional {1} {2} required.","Rad # {0}: Plockad kvantitet är lägre än erfodrad kvantitet, ytterligare {1} {2} erfodras.", +Row {0}# Item {1} cannot be transferred more than {2} against {3} {4},Rad # {0}: Artikel {1} kan inte överföras mer än {2} mot {3} {4}, +Row {0}# Item {1} not found in 'Raw Materials Supplied' table in {2} {3},"Rad # {0}: Artikel {1} hittades inte i tabellen ""Råmaterial Levererad"" i {2} {3}", +Row {0}: Accepted Qty and Rejected Qty can't be zero at the same time.,Rad # {0}: Godkänd Kvantitet och Avvisad Kvantitet kan inte vara noll samtidigt., +Row {0}: Account {1} and Party Type {2} have different account types,Rad # {0}: Konto {1} och Parti Typ {2} har olika konto typer, +Row {0}: Allocated amount {1} must be less than or equal to invoice outstanding amount {2},Rad # {0}: Tilldelad belopp {1} måste vara lägre än eller lika med utestående faktura belopp {2}, +Row {0}: Allocated amount {1} must be less than or equal to remaining payment amount {2},Rad # {0}: Tilldelad belopp {1} måste vara lägre än eller lika med återstående betalning belopp {2}, +"Row {0}: As {1} is enabled, raw materials cannot be added to {2} entry. Use {3} entry to consume raw materials.",Rad {0}: Eftersom {1} är aktiverat kan råmaterial inte läggas till {2} post. Använd {3} post för att förbruka råmaterial., +Row {0}: Both Debit and Credit values cannot be zero,Rad # {0}: Både debet och kredit värdena kan inte vara noll, +Row {0}: Cost Center {1} does not belong to Company {2},Rad # {0}: Resultat Enhet {1} tillhör inte Bolag {2}, +Row {0}: Either Delivery Note Item or Packed Item reference is mandatory.,Rad # {0}: Antingen Följesedel eller Packad Artikel Referens erfordras, +Row {0}: Expense Head changed to {1} as no Purchase Receipt is created against Item {2}.,Rad # {0}: Kostnad har ändrats till {1} eftersom inget Inköp Följesedel är skapad mot Artikel {2}., +Row {0}: Expense Head changed to {1} because account {2} is not linked to warehouse {3} or it is not the default inventory account,Rad # {0}: Kostnad har ändrats till {1} eftersom konto {2} inte är länkat till lager {3} eller det inte är standard konto för lager, +Row {0}: Expense Head changed to {1} because expense is booked against this account in Purchase Receipt {2},Rad # {0}: Kostnad har ändrats till {1} eftersom kostnad bokförs mot detta konto i Inköp Följesedel {2}, +Row {0}: From Warehouse is mandatory for internal transfers,Rad # {0}: Från Lager erfodras för interna överföringar, +Row {0}: Item Tax template updated as per validity and rate applied,Rad # {0}: Artikel Moms Mall uppdaterad enligt giltighet och tillämpad moms sats, +Row {0}: Item rate has been updated as per valuation rate since its an internal stock transfer,Rad # {0}: Artikel Pris är uppdaterad enligt Grund Pris eftersom det är intern lager överföring, +Row {0}: Item {1} must be a stock item.,Rad # {0}: Artikel {1} måste vara lager artikel., +Row {0}: Item {1} must be a subcontracted item.,Rad # {0}: Artikel {1} måste vara Underleverantör Artikel., +Row {0}: Packed Qty must be equal to {1} Qty.,Rad # {0}: Packad Kvantitet måste vara lika med {1} Kvantitet., +Row {0}: Packing Slip is already created for Item {1}.,Rad # {0}: Packsedel är redan skapad för Artikel {1}., +Row {0}: Payment Term is mandatory,Rad # {0}: Betalning Villkor Erfodras, +Row {0}: Please provide a valid Delivery Note Item or Packed Item reference.,Rad # {0}: Ange giltig referens för Försäljning Följesedel eller Packsedel., +Row {0}: Please select a BOM for Item {1}.,Rad # {0}: Välj Stycklista för Artikel {1}., +Row {0}: Please select an active BOM for Item {1}.,Rad # {0}: Välj aktiv Stycklista för Artikel {1}., +Row {0}: Please select an valid BOM for Item {1}.,Rad # {0}: Välj giltig Stycklista för Artikel {1}, +Row {0}: Project must be same as the one set in the Timesheet: {1}.,Rad # {0}: Projekt måste vara samma som är angiven i tidrapport: {1}., +Row {0}: Purchase Invoice {1} has no stock impact.,Rad # {0}: Inköp Faktura {1} har ingen efekt på lager., +Row {0}: Qty cannot be greater than {1} for the Item {2}.,Rad # {0}: Kvantitet får inte vara högre än {1} för Artikel {2}., +Row {0}: Qty in Stock UOM can not be zero.,Rad # {0}: Kvantitet i Lager Enhet kan inte vara noll., +Row {0}: Qty must be greater than 0.,Rad # {0}: Kvantitet måste vara högre än 0., +Row {0}: Shift cannot be changed since the depreciation has already been processed,Rad # {0}: Förskjutning inte ändras eftersom avskrivning redan är behandlad, +Row {0}: Target Warehouse is mandatory for internal transfers,Rad # {0}: Till Lager erfodras för interna överföringar, +"Row {0}: To set {1} periodicity, difference between from and to date must be greater than or equal to {2}",Rad # {0}: För att ange periodicitet för {1} måste skillnaden mellan från och till datum vara större än eller lika med {2}, +Row {0}: Total Number of Depreciations cannot be less than or equal to Opening Number of Booked Depreciations,Rad # {0}: Totalt Antal Avskrivningar får inte vara mindre än eller lika med antal bokförda avskrivningar, +Row {0}: {1} account already applied for Accounting Dimension {2},Rad # {0}: {1} konto är redan tillämpad för Bokföring Dimension {2}, +Row {0}: {1} {2} cannot be same as {3} (Party Account) {4},Rad # {0}: {1} {2} kan inte vara samma som {3} (Parti Konto) {4}, +Row {0}: {2} Item {1} does not exist in {2} {3},Rad # {0}: {2} Artikel {1} finns inte i {2} {3}, +Row({0}): Outstanding Amount cannot be greater than actual Outstanding Amount {1} in {2},Rad # ({0}): Utestående belopp kan inte vara högre än verklig utestående belopp {1} i {2}, +Rows with Same Account heads will be merged on Ledger,Rader med samma Konto Poster kommer slås samman i Bokföring Register, +Rows: {0} have 'Payment Entry' as reference_type. This should not be set manually.,"Rader: {0} har ""Betalning Post"" som referens typ. Detta ska inte anges manuellt.", +Rows: {0} in {1} section are Invalid. Reference Name should point to a valid Payment Entry or Journal Entry.,Rader: {0} i sektion {1} är ogiltiga. Referens namn ska peka på giltig Betalning Post eller Journal Post, +Run parallel job cards in a workstation,Kör parallella jobbkort på arbetsplats, +Running,Behandlar, +SCO Supplied Item,Underleverantör Levererad Artikel, +SLA Fulfilled On,Service Nivå Avtal Uppfylld , +SLA Fulfilled On Status,Service Nivå Avtal Uppfylld Status, +SLA Paused On,Service Nivå Avtal Pausad, +SLA will be applied if {1} is set as {2}{3},"Service Nivå Avtal kommer att tillämpas om {1} är angiven som {2}{3} +​", +SLA will be applied on every {0},Service Nivå Avtal kommer att tillämpas varje {0}, +SMS Settings,SMS Inställningar, +SO Total Qty,Försäljning Order Totalt Kvantitet, +Salary Currency,Lön Valuta, +Sales Incoming Rate,Inkommande Försäljning Pris, +Sales Invoice {0} must be deleted before cancelling this Sales Order,Försäljning Faktura {0} måste annulleras innan annullering av denna Försäljning Order, +Sales Order Packed Item,Försäljning Order Packad Artikel, +Sales Order Reference,Försäljning Order Referens, +Sales Order Status,Försäljning Order Status, +"Sales Order {0} already exists against Customer's Purchase Order {1}. To allow multiple Sales Orders, Enable {2} in {3}","Försäljning Order {0} finns redan mot Kund Inköp Order {1}. För att tillåta flera Försäljning Ordrar, aktivera {2} i {3}", +Sales Partner ,Försäljning Partner, +Sales Partner Item,Försäljning Partner Artikel, +Sales Partner Target Variance Based On Item Group,Artikel Grupp Mål Avvikelse per Försäljning Partner, +Sales Pipeline Analytics,Försäljning Analys, +Sales Update Frequency in Company and Project,Försäljning Uppdatering Intervall, +Sales Value,Försäljning Värde, +Salvage Value Percentage,Procentuellt Rest Värde, +Same item and warehouse combination already entered.,Samma artikel och lager kombination är redan angivna., +Savings,Besparingar, +Scan Batch No,Skanna Parti Nummer, +Scan Mode,Skanning Läge, +Scan Serial No,Skanna Serie Nummer, +Scan barcode for item {0},Skanna Streckkod för artikel {0}, +"Scan mode enabled, existing quantity will not be fetched.","Skanning Läge aktiverad, befintlig kvantitet kommer inte att hämtas.", +Scanned Quantity,Skannad Kvantitet, +Scheduled Time Logs,Schemalagda Tidsloggar, +Scheduler is Inactive. Can't trigger job now.,Schemaläggare är inaktiv. Kan inte starta jobb nu., +Scheduler is Inactive. Can't trigger jobs now.,Schemaläggare är inaktiv. Kan inte starta jobb nu., +Scheduler is inactive. Cannot enqueue job.,Schemaläggare är inaktiv. Kan inte placera jobb i kö., +Scheduler is inactive. Cannot merge accounts.,Schemaläggare är inaktiv. Kan inte slå samman konton., +Scheduling,Schemaläggning, +"Scorecard variables can be used, as well as: +{total_score} (the total score from that period), +{period_number} (the number of periods to present day) +","Resultatkort variabler kan användas, såväl som: +{total_score} (totalt resultat från detta period), +{period_number} (antal intervall tills nu) +", +Scrap & Process Loss,Rest & Bearbetning Förlust, +Scrap Asset,Rest Tillgång, +Scrap Cost Per Qty,Rest Kostnad per Kvantitet, +Scrap Item Code,Rest Artikel Kod, +Scrap Item Name,Rest Artikel Namn, +"Search by item code, serial number or barcode","Sök efter Artikel Kod, Serie Nummer eller Streck/QR Kod", +Secondary Party,Sekundär Parti, +Secondary Role,Sekundär Roll, +Segregate Serial / Batch Bundle,Skilj Serie / Parti Paket, +Select Accounting Dimension.,Välj Bokföring Dimension, +Select Alternative Items for Sales Order,Välj Alternativ Artikel för Försäljning Order, +Select Batch No,Välj Parti Nummer, +Select Corrective Operation,Välj Korrigerande Åtgärd, +Select Date of Birth. This will validate Employees age and prevent hiring of under-age staff.,Välj Födelsedag. Detta kommer att validera personal ålder och förhindra anställning av minderårig personal., +"Select Date of joining. It will have impact on the first salary calculation, Leave allocation on pro-rata bases.","Välj Anställning Datum. Detta kommer att påverka första lön, Ledighet tilldelning på proportionell bas.", +Select Dimension,Välj Dimension, +Select Finished Good,Välj Färdig Artikel, +Select Items for Quality Inspection, Välj Artiklar för Kvalitet Kontroll, +Select Job Worker Address,Välj Jobb Ansvarig Adress, +Select Serial No,Välj Serie Nummer, +Select Serial and Batch,Välj Serie Nummer och Parti Nummer, +Select Time,Välj Tid, +Select View,Välj Vy, +Select Vouchers to Match,Välj Verifikat, +Select Warehouses to get Stock for Materials Planning,Välj Lager för att hämta Lager Kvantitet för Material Planering, +Select a Company this Employee belongs to.,Välj Bolag som detta Personal tillhör till, +Select a Customer,Välj Kund, +Select an Item Group.,Välj Artikel Grupp, +Select an invoice to load summary data,Välj faktura för att ladda översikt data, +Select an item from each set to be used in the Sales Order.,Välj artikel från varje uppsättning som ska användas i Försäljning Order., +Select the Default Workstation where the Operation will be performed. This will be fetched in BOMs and Work Orders.,Välj Standard Arbetsstation där Åtgärd ska utföras. Detta kommer att läggas till Stycklistor och Arbetsordrar., +Select the Item to be manufactured.,Välj Artikel som ska produceras., +"Select the Item to be manufactured. The Item name, UoM, Company, and Currency will be fetched automatically.","Välj Artikel som ska produceras. Artikel Namn, Enhet, Bolag och Valuta kommer att hämtas automatiskt.", +Select the Warehouse,Välj Lager, +Select the date and your timezone,Välj Datum och Tidzon, +Select the raw materials (Items) required to manufacture the Item,Välj Råmaterial (Artiklar) som erfodras för att producera artikel, +"Select whether to get items from a Sales Order or a Material Request. For now select Sales Order. + A Production Plan can also be created manually where you can select the Items to manufacture.","Välj att få artiklar från Försäljning Order eller Material Begäran. För Tillfället Välj Försäljning Order. + Produktion Plan kan också skapas manuellt där man kan välja vilka artiklar som ska produceras.", +Select your weekly off day,Välj ledig dag i veckan, +Selected Vouchers,Valda Verifikat, +Selected date is,Vald Datum, +Selected document must be in submitted state,Vald dokument måste ha godkänd status, +Self delivery,Egen Leverans, +Sell Asset,Sälj Tillgång, +Send Attached Files,Skicka Bifogade Filer, +Send Document Print,Skicka Utskrifter, +Send Emails,Skicka E-post, +Sequential,Sekventiell, +Serial & Batch Item,Serie Nummer & Parti, +Serial & Batch Item Settings,Serie Nummer & Parti Inställningar, +Serial / Batch Bundle,Serie / Parti Paket, +Serial / Batch Bundle Missing,Serie / Parti Paket Saknas, +Serial / Batch No,Serie / Parti Nummer, +Serial / Batch Nos,Serie / Parti Nummer, +Serial No Ledger,Serie Nummer Register, +Serial No Range,Serienummer Intervall, +Serial No and Batch Selector cannot be use when Use Serial / Batch Fields is enabled.,Serie Nummer och Parti Väljare kan inte användas när Använd Serie Nummer / Parti Fält är aktiverad., +Serial No and Batch for Finished Good,Serie Nummer och Parti för Färdig Artikel, +Serial No is mandatory,Serie Nummer erfodras, +Serial No {0} already exists,Serie Nummer {0} finns redan, +Serial No {0} already scanned,Serie Nummer {0} är redan skannad, +Serial No {0} does not exists,Serie Nummer {0} finns inte , +Serial No {0} is already added,Serie Nummer {0} har redan lagts till, +Serial Nos,Serie Nummer., +Serial Nos / Batch Nos,Serie Nummer. / Parti Nummer., +Serial Nos Mismatch,Serie Nummer stämmer inte, +Serial Nos are created successfully,Serie Nummer skapade, +"Serial Nos are reserved in Stock Reservation Entries, you need to unreserve them before proceeding.","Serie Nmmer är reserverade iLagerreservationsinlägg, du måste avboka dem innan du fortsätter.", +Serial and Batch,Serie Nummer och Parti , +Serial and Batch Bundle,Serie och Parti Paket, +Serial and Batch Bundle created,Serie och Parti Paket skapad, +Serial and Batch Bundle updated,Serie och Parti Paket uppdaterad, +Serial and Batch Bundle {0} is already used in {1} {2}.,Serie och Parti Paket {0} används redan i {1} {2}., +Serial and Batch Details,Serie och Parti Detaljer, +Serial and Batch Entry,Serie och Parti Post, +Serial and Batch No,Serie och Parti Nummer, +Serial and Batch Nos,Serie och Parti Nummer, +Serial and Batch Nos will be auto-reserved based on Pick Serial / Batch Based On,Serie och Parti Nummer kommer att reserveras automatiskt baserat på Välj Serie/Parti baserat på, +Serial and Batch Reservation,Serie Nummer och Parti Reservation, +Serial and Batch Summary,Serie- och batchnummer kommer att reserveras automatiskt baserat på Välj serie/batch baserat på, +Service Cost Per Qty,Service Kostnad Per Kvantitet, +Service Expense Total Amount,Service Kostnad Totalt Belopp, +Service Expenses,Service Kostnader, +Service Item,Service Artikel, +Service Item Qty,Service Artikel Kvantitet, +Service Item Qty / Finished Good Qty,Service Artikel Kvantitet / Färdig Artikel Kvantitet, +Service Item UOM,Service Artikel Enhet, +Service Item {0} is disabled.,Service Artikel är inaktiverad, +Service Item {0} must be a non-stock item.,Service Artikel {0} får inte vara Lager Artikel., +Service Items,Service Artikel, +Service Level Agreement for {0} {1} already exists.,Service Nivå Avtal för {0} {1} finns redan., +Service Level Name,Service Nivå Namn, +Service Provider,Service Leverantör, +Set Default Supplier,Ange Standard Leverantör, +Set From Warehouse,Ange Från Lager, +Set Landed Cost Based on Purchase Invoice Rate,Ange Landad Kostnad baserat på Inköp Faktura Pris, +Set Loyalty Program,Ange Bonus Program, +Set Operating Cost / Scrape Items From Sub-assemblies,Ange Driftskostnad / Rest Artiklar från Underenheter, +Set Operating Cost Based On BOM Quantity,Ange Åtgärd Kostnad baserad på Stycklista, +Set Parent Row No in Items Table,Ange Överordnad Radnummer i Artikel Tabell, +Set Process Loss Item Quantity,Ange Process Förlust Artikel Kvantitet, +Set Project Status,Ange Projekt Status, +Set Quantity,Ange Kvantitet, +Set Response Time for Priority {0} in row {1}.,Ange Svarstid för Prioritet {0} i rad {1}., +Set Valuation Rate Based on Source Warehouse,Ange Grund Pris Baserad på Från Lager, +Set Warehouse,Välj Lager, +Set default {0} account for non stock items,Ange Standard {0} konto för Ej Lager Artiklar, +Set fieldname from which you want to fetch the data from the parent form.,Ange fältnamn från vilket data ska hämtas från överordnad formulär., +Set quantity of process loss item:,Ange kvantitet för Process Förlust Artikel:, +Set the Planned Start Date (an Estimated Date at which you want the Production to begin),Ange Planerad Start Datum, +Set the status manually.,Ange status manuellt., +Set {0} in asset category {1} for company {2},Ange {0} i Tillgång Kategori {1} för Bolag {2}, +Sets 'Accepted Warehouse' in each row of the Items table.,Ange 'Godkänd Lager' i varje rad i Artiklar Tabell, +Sets 'Rejected Warehouse' in each row of the Items table.,Ange 'Avvisad Lager' i varje rad i Artikel Tabell, +Sets 'Reserve Warehouse' in each row of the Supplied Items table.,Anger 'Reserv Lager' i varje rad i Levererad Artikel Tabell., +Setting Item Locations...,Anger Artikelplatser..., +Setting the account as a Company Account is necessary for Bank Reconciliation,Ange konto som Bolag Konto för Bank Avstämmning, +Setting {} is required,Konfigurera {} erfodras, +Setup your organization,Bolag Inställningar, +Shelf Life in Days,Hållbarhet i Dagar, +Shift,Skift, +Shift Factor,Förskjutning Faktor, +Shift Name,Förskjutning Namn, +Shipment,Leverans, +Shipment Amount,Leverans Belopp, +Shipment Delivery Note,Leverans Försäljning Följesedel, +Shipment ID,Leverans ID, +Shipment Information,Leverans Information, +Shipment Parcel,Leverans Paket, +Shipment Parcel Template,Leverans Paket Mall, +Shipment Type,Leverans Typ, +Shipment details,Leverans Detaljer, +Shipping Address Details,Leverans Adress Detaljer, +Shipping Address Template,Leverans Adress Mall, +Show Balances in Chart Of Accounts,Visa Saldo i Kontoplan, +Show Barcode Field in Stock Transactions,Visa Streck/QR Kod Fält i Lager Transaktioner, +Show Dimension Wise Stock,Visa Lager per Dimension, +Show Disabled Warehouses,Visa Inaktiverade Lager, +Show Failed Logs,Visa Misslyckade Logg, +Show GL Balance,Visa Bokföring Register Saldo, +Show Item Name,Visa Artikel Namn, +Show Ledger View,Visa Register Vy, +Show Net Values in Party Account,Visa Nettovärde i Parti Konto, +Show Pay Button in Purchase Order Portal,Visa Betala Knapp i Portal, +Show Preview,Förhandsgranska, +Show Remarks,Visa Anmärkningar, +Show Taxes as Table in Print,Visa Moms Belopp som Kolumn, +Show net values in opening and closing columns,Visa Nettovärde i Öppning och Stängning kolumner, +Show only the Immediate Upcoming Term,Visa endast Omedelbart Kommande Villkor, +Show pending entries,Visa väntande poster, +Show with upcoming revenue/expense,Visa med kommande Intäkter/Kostnader, +"Simple Python Expression, Example: doc.status == 'Open' and doc.issue_type == 'Bug'","Enkelt Python uttryck, exempel: doc.status == 'Open' och doc.issue_type == 'Bug'", +"Simple Python formula applied on Reading fields.
Numeric eg. 1: reading_1 > 0.2 and reading_1 < 0.5
+Numeric eg. 2: mean > 3.5 (mean of populated fields)
+Value based eg.: reading_value in (""A"", ""B"", ""C"")","Enkel Python formel tillämpad på läsfält.
Numerisk t.ex. 1: reading_1 > 0.2 and reading_1 < 0.5
+Numerisk t.ex. 2: mean > 3.5 (mean of populated fields)
+Värde baserad t.ex.: reading_value in (""A"", ""B"", ""C"")", +Simultaneous,Samtidig, +Skip Available Sub Assembly Items,Hoppa över tillgängliga Delmontering Artiklar, +Skipped,Hoppade över, +Skipping Tax Withholding Category {0} as there is no associated account set for Company {1} in it.,Hoppar över Moms Undantag Kategori {0} eftersom det inte finns något konto associerat med Bolag {1}., +"Skipping {0} of {1}, {2}","Hoppa över {0} av {1}, {2}", +Sold by,Försäljare, +Something went wrong please try again,Något gick snett! Försök igen., +Source Exchange Rate,Käll Växelkurs, +Source Fieldname,Käll Fältnamn, +Source Warehouse Address Link,Från Lager Adress Länk, +South Africa VAT Account,Sydafrika Moms Konto, +South Africa VAT Settings,Sydafrika Moms Konto Inställningar, +Spacer,Mellanrum, +Split Asset,Dela Tillgång, +Split Early Payment Discount Loss into Income and Tax Loss,Dela Tidig Betalning Rabatt Bortfall i Intäkt och Moms Bortfall, +Split From,Dela Från, +Split Qty,Dela Kvantitet, +Split qty cannot be grater than or equal to asset qty,Delad kvantitet får inte vara större än eller lika med tillgång kvantitet, +Splitting {0} {1} into {2} rows as per Payment Terms,Delar {0} {1} i {2} rader enligt Betalning Villkor, +Stage,Stadie, +Stale Days should start from 1.,Inaktuella Dagar ska börja från 1., +Standard Description,Standard Beskrivning, +Standard Rated Expenses,Standard Klassade Kostnader, +"Standard Terms and Conditions that can be added to Sales and Purchases. Examples: Validity of the offer, Payment Terms, Safety and Usage, etc.","Standard Villkor som kan läggas till Försäljning och Inköp. Exempel: Erbjudande Giltighet, Betalningsvillkor, Säkerhet,Användning, etc.", +Standard rated supplies in {0},Standard Klassade Förbrukning Artiklar i {0}, +"Standard tax template that can be applied to all Purchase Transactions. This template can contain a list of tax heads and also other expense heads like ""Shipping"", ""Insurance"", ""Handling"", etc.","Standard Moms Mall som kan tillämpas på alla Inköp Transaktioner. Mallen kan innehålla lista över Moms Konto och även andra kostnad konto som ""Leverans"", ""Försäkring"", ""Hantering"" osv.", +"Standard tax template that can be applied to all Sales Transactions. This template can contain a list of tax heads and also other expense/income heads like ""Shipping"", ""Insurance"", ""Handling"" etc.","Standard Moms Mall som kan tillämpas på alla Försäljning Transaktioner. Mallen kan innehålla lista över Moms Konto och även andra kostnad konto som ""Leverans"", ""Försäkring"", ""Hantering"" osv.", +Start / Resume,Starta / Återuppta, +Start Date should be lower than End Date,Startdatum ska vara före Slutdatum, +Start Deletion,Starta Borttagning, +Start Import,Starta Import, +Start Job,Starta Jobb, +Start Merge,Starta Sammanslagning, +Start Reposting,Starta Ompostning, +Start Time can't be greater than or equal to End Time for {0}.,Start Tid får inte vara senare än eller lika med Slut Tid för {0}., +Started a background job to create {1} {0},Startade bakgrundsjobb för att skapa {1} {0}, +Status Details,Status Detaljer, +Status Illustration,Statusbild, +Status set to rejected as there are one or more rejected readings.,Status satt till avvisad eftersom det finns en eller flera avvisade avläsningar., +Stock Closing,Lager Låsning, +Stock Consumed During Repair,Lager Förbrukad under Reparation, +Stock Consumption Details,Lager Förbrukning Detaljer, +Stock Entries already created for Work Order {0}: {1},Lager Poster redan skapade för Arbetsorder {0}: {1}, +Stock Ledger Invariant Check,Lager Register Oföränderlig Kontroll, +Stock Ledger Variance,Lager Register Avvikelse, +Stock Movement,Lager Hantering, +Stock Planning,Lager Planering, +Stock Reposting Settings,Lager Ompostering Inställningar, +Stock Reservation,Lager Reservation, +Stock Reservation Entries Cancelled,Lager Reservation Poster Annullerade, +Stock Reservation Entries Created,Lager Reservation Poster Skapade, +Stock Reservation Entry,Lager Reservation Post, +Stock Reservation Entry cannot be updated as it has been delivered.,Lager Reservation Post kan inte uppdateras eftersom den är levererad. , +"Stock Reservation Entry created against a Pick List cannot be updated. If you need to make changes, we recommend canceling the existing entry and creating a new one.",Lager Reservation Post skapad mot Plocklista kan inte uppdateras. Om man behöver göra ändringar rekommenderas att man anullerar befintlig post och skapar ny. , +Stock Reservation Warehouse Mismatch,Lager Reservation för Lager stämmer inte, +Stock Reservation can only be created against {0}.,Lager Reservation kan endast skapas mot {0}., +Stock Reserved Qty (in Stock UOM),Lager Reserverad Kvantitet (Lager Enhet), +Stock Transactions Settings,Lager Transaktion Inställningar, +Stock UOM Quantity,Lager Kvantitet, +Stock Unreservation,Lager Reservation Annullering, +Stock Validations,Lager Validering, +Stock and Manufacturing,Lager & Produktion, +Stock cannot be reserved in group warehouse {0}.,Lager kan inte reserveras i grupp lager {0}., +Stock cannot be reserved in the group warehouse {0}.,Lager kan inte reserveras i grupp lager {0}., +Stock not available for Item {0} in Warehouse {1}.,Lager ej tillgängligt för Artikel {0} i Lager {1}., +Stock quantity not enough for Item Code: {0} under warehouse {1}. Available quantity {2} {3}.,Lager Kvantitet ej tillgänglig för Artikel Kod: {0} på lager {1}. Tillgänglig kvantitet {2} {3}., +Stock transactions that are older than the mentioned days cannot be modified.,Lager Transaktioner som är äldre än angiven antal dagar kan inte ändras., +Stock will be reserved on submission of Purchase Receipt created against Material Request for Sales Order.,Lager kommer att reserveras vid godkännade av Inköp Följesedel skapat mot Material Begäran för Försäljning Order., +Stock/Accounts can not be frozen as processing of backdated entries is going on. Please try again later.,Lager/Konton kan inte låsas eftersom bearbetning av bakdaterade poster pågår. Försök igen senare., +Sub Assemblies & Raw Materials,Delmonteringar & Råmaterial, +Sub Assembly Item,Delmontering Artikel, +Sub Assembly Item Code,Delmontering Artikel Kod, +Sub Assembly Items,Delmontering Artiklar, +Sub Assembly Warehouse,Delmontering Lager, +Sub Operation,Underåtgärd, +Sub Operations,Underåtgärder, +Subcontract BOM,Underleverantör Stycklista, +Subcontract Order,Underleverantör Order, +Subcontract Order Summary,Underleverantör Order Översikt, +Subcontract Return,Underleverantör Retur, +Subcontracting BOM,Underleverantör Stycklista, +Subcontracting Order,Underleverantör Order, +Subcontracting Order (Draft) will be auto-created on submission of Purchase Order.,Underleverantör Order (Utkast) kommer att skapas automatiskt vid godkännande av Inköp Order., +Subcontracting Order Item,Underleverantör Order Artikel, +Subcontracting Order Service Item,Underleverantör Order Service Artikel, +Subcontracting Order Supplied Item,Underleverantör Order Levererad Artikel, +Subcontracting Order {0} created.,Underleverantör Order {0} skapad, +Subcontracting Purchase Order,Underleverantör Inköp Order, +Subcontracting Receipt,Underleverantör Följesedel/Kvitto, +Subcontracting Receipt Item,Underleverantör Följesedel/Kvitto Artikel, +Subcontracting Receipt Supplied Item,Underleverantör Följesedel/Kvitto Levererad Artikel, +Subcontracting Settings,Underleverantör Inställningar, +Subdivision,Underavdelning, +Submit Action Failed,Godkännande Misslyckades, +Submit After Import,Godkänn efter Import, +Submit ERR Journals?,Godkänn ERR Journaler ?, +Submit Generated Invoices,Godkänn Skapade Fakturor, +Subscription for Future dates cannot be processed.,Prenumeration för framtida datum kan inte behandlas., +Succeeded,Klar, +Succeeded Entries,Klara Poster, +"Successfully changed Stock UOM, please redefine conversion factors for new UOM.","Lager Enhet ändrad, ändra konvertering faktor för ny enhet.", +Successfully imported {0},Importerade {0}, +"Successfully imported {0} record out of {1}. Click on Export Errored Rows, fix the errors and import again.","Importerade {0} post av {1}. Klicka på Exportera felaktiga rader, åtgärda fel och importera igen.", +Successfully imported {0} record.,Importerade {0} post., +"Successfully imported {0} records out of {1}. Click on Export Errored Rows, fix the errors and import again.","Importerade {0} poster av {1}. Klicka på Exportera felaktiga rader, åtgärda fel och importera igen.", +Successfully imported {0} records.,Importerade {0} poster., +Successfully linked to Customer,Länkad till Kund, +Successfully linked to Supplier,Länkad till Leverantör, +Successfully merged {0} out of {1}.,Slog samman {0} av {1}., +Successfully updated {0},Uppdaterade {0}, +"Successfully updated {0} record out of {1}. Click on Export Errored Rows, fix the errors and import again.","Uppdaterade {0} post av {1}. Klicka på Exportera felaktiga rader, åtgärda fel och importera igen.", +Successfully updated {0} record.,Uppdaterade {0} post., +"Successfully updated {0} records out of {1}. Click on Export Errored Rows, fix the errors and import again.","Uppdaterade {0} poster av {1}. Klicka på Exportera felaktiga rader, åtgärda fel och importera igen.", +Successfully updated {0} records.,Uppdaterade {0} poster., +Sum of Repair Cost and Value of Consumed Stock Items.,Summa för reparation kostnad och värde för förbrukade lager artiklar., +Supplied Item,Levererad Artikel, +Supplier Address Details,Leverantör Adress Detaljer, +Supplier Contact,Leverantör Kontakt, +Supplier Group Item,Leverantör Grupp Artikel, +Supplier Info,Leverantör Info, +Supplier Invoice,Leverantör Faktura, +Supplier Item,Leverantör Artikel, +Supplier Portal Users,Leverantör  Portal Användare, +Supplier Primary Address,Leverantör Primär Adress, +Supplier Primary Contact,Leverantör Primär Kontakt, +Supplier Warehouse mandatory for sub-contracted {0},Leverantör Lager erfodras för underleverantör {0}, +Supplies subject to the reverse charge provision,Leveranser som omfattas av omvänd betalning provision, +Sync Now,Synkronisera Nu, +Sync Started,Synkronisering Startad, +System Settings,System Inställningar, +System will automatically create the serial numbers / batch for the Finished Good on submission of work order,System kommer automatiskt att skapa serienummer/parti för färdig artikel vid godkännade av arbetsorder, +System will not check over billing since amount for Item {0} in {1} is zero,System kontrollerar inte överfakturering eftersom belopp för Artikel {0} i {1} är noll, +TCS Amount,TCS Belopp, +TCS Rate %,TDS Sats %, +TDS Amount,TDS Belopp, +TDS Payable,TDS Betalbar, +Target Asset,Tillgång, +Target Asset Location,Tillgång Plats, +Target Asset {0} cannot be cancelled,Tillgång {0} kan inte annulleras, +Target Asset {0} cannot be submitted,Tillgång {0} kan inte godkännas, +Target Asset {0} cannot be {1},Tillgång {0} kan inte bli {1}, +Target Asset {0} does not belong to company {1},Tillgång {0} tillhör inte bolag {1}, +Target Asset {0} needs to be composite asset,Tillgång {0} måste vara sammansatt tillgång, +Target Batch No,Parti Nummer, +Target Exchange Rate,Växelkurs, +Target Fieldname (Stock Ledger Entry),Fältnamn (Lager Register Post), +Target Fixed Asset Account,Tillgång Konto, +Target Has Batch No,Har Parti Nummer, +Target Has Serial No,Har Serie Nummer, +Target Incoming Rate,In Pris, +Target Is Fixed Asset,Är Tillgång, +Target Item Code,Artikel Kod, +Target Item Name,Artikel Namn, +Target Item {0} is neither a Fixed Asset nor a Stock Item,Artikel {0} är varken Tillgång eller Lager Artikel, +Target Item {0} must be a Fixed Asset item,Artikel {0} måste vara Tillgång, +Target Item {0} must be a Stock Item,Artikel {0} måste vara Lager Artikel, +Target Qty must be a positive number,Kvantitet måste vara positivt tal, +Target Serial No,Serie Nummer, +Target Warehouse Address Link,Till Lager Adress Länk, +Target Warehouse is mandatory for Decapitalization,Till Lager erfodras för Dekapitalisering, +Target Warehouse is set for some items but the customer is not an internal customer.,Till Lager angiven för vissa artiklar men kund är inte intern kund., +Task {0} depends on Task {1}. Please add Task {1} to the Tasks list.,Uppgift {0} beror på Uppgift {1}. Lägg till Uppgift {1} i Uppgift Lista., +Tax Amount,Momspliktig Belopp, +Tax Amount will be rounded on a row(items) level,Moms Belopp kommer att avrundas per Artikelrad, +Tax Masters,Moms Inställningar, +Tax Refunds provided to Tourists under the Tax Refunds for Tourists Scheme,Moms Återbäring till turister enligt momsåterbäring för turister, +Tax Settings,Moms Inställningar, +Tax Withheld Vouchers,Moms Avdrag Verifikat, +Tax Withholding,Moms Avdrag, +Tax Withholding Category {} against Company {} for Customer {} should have Cumulative Threshold value.,Moms Avdrag Kategori {} mot bolag {} för kund {} ska ha Kumulativ Tröskel Värde., +Tax Withholding Details,Moms Avdrag Kategori, +Tax Withholding Net Total,Moms Avdrag Netto Totalt, +"Tax detail table fetched from item master as a string and stored in this field. +Used for Taxes and Charges","Moms Tabell hämtad från Artikel Tabell som sträng och lagrad i detta fält. +Används för Moms och Avgifter", +Tax will be withheld only for amount exceeding the cumulative threshold,Moms kommer att dras av bara för belopp som överstiger kumulativ tröskel, +Taxes row #{0}: {1} cannot be smaller than {2},Momsrad #{0}: {1} kan inte vara lägre än {2}, +Telephony Call Type,Telefoni Typ, +Template Item Selected,Mall Artikel Vald, +Template Options,Mall Alternativ, +Template Task,Mall Upgift, +Template Warnings,Mall Varningar, +Terms & Conditions,Regler & Villkor, +Terms Template,Villkor Mall, +Territory Item,Distrikt Artikel, +Territory Wise Sales,Försäljning per Distrikt, +The Condition '{0}' is invalid,Villkor '{0}' är ogiltig, +The Document Type {0} must have a Status field to configure Service Level Agreement,Dokument Typ {0} måste ha Statusfält för att konfigurera Service Nivå Avtal, +"The GL Entries will be cancelled in the background, it can take a few minutes.","Bokföring Register Poster kommer att annulleras i bakgrunden, det kan ta några minuter.", +"The Payment Request {0} is already paid, cannot process payment twice","Betalning Begäran {0} är redan betald, kan inte behandla betalning två gånger", +"The Pick List having Stock Reservation Entries cannot be updated. If you need to make changes, we recommend canceling the existing Stock Reservation Entries before updating the Pick List.",Plocklista med Lager Reservation kan inte uppdateras. Om ändringar behöver göras rekommenderas annullering av befintlig Lager Reservation innan uppdatering av Plocklista., +The Process Loss Qty has reset as per job cards Process Loss Qty,Process Förlust Kvantitet är återställd enligt Jobbkort Process Förlust Kvantitet, +The Serial No at Row #{0}: {1} is not available in warehouse {2}.,Serie Nummer på rad #{0}: {1} är inte tillgänglig i lager {2}., +The Serial and Batch Bundle {0} is not valid for this transaction. The 'Type of Transaction' should be 'Outward' instead of 'Inward' in Serial and Batch Bundle {0},"Serie och Parti Paket {0} är inte giltigt för denna transaktion. ""Typ av Transaktion"" ska vara ""Utgående"" istället för ""Ingående"" i Serie och Parti Paket {0}", +The Work Order is mandatory for Disassembly Order,Arbetsorder erfordras för Demontering Order, +The allocated amount is greater than the outstanding amount of Payment Request {0},Tilldelad Belopp är högre än utestående belopp för Betalning Begäran {0}, +The currency of invoice {} ({}) is different from the currency of this dunning ({}).,Faktura valuta {} ({}) är annan än valuta för denna påminnelse ({})., +The default BOM for that item will be fetched by the system. You can also change the BOM.,Standard Stycklista för artikel kommer att hämtas av system. Man kan också ändra Stycklista., +The field {0} in row {1} is not set,Fält {0} i rad {1} är inte angiven, +"The following Items, having Putaway Rules, could not be accomodated:","Följande Artiklar, med Lägg undan regler, kunde inte tillgodoses:", +The following assets have failed to automatically post depreciation entries: {0},Följande tillgångar kunde inte bokföra avskrivning poster automatiskt: {0}, +The following invalid Pricing Rules are deleted:,Följande ogiltiga prissättningsregler tas bort:, +The items {0} and {1} are present in the following {2} :,Artiklar {0} och {1} finns i följande {2}:, +The operation {0} can not add multiple times,Åtgärd {0} kan inte läggas till flera gånger, +The operation {0} can not be the sub operation,Åtgärd {0} kan inte vara underåtgärd, +The original invoice should be consolidated before or along with the return invoice.,Original Faktura ska konsolideras före eller tillsammans med retur faktura., +The percentage you are allowed to pick more items in the pick list than the ordered quantity.,Procentandel artiklar du får plocka utöver artiklar i plocklista., +"The percentage you are allowed to transfer more against the quantity ordered. For example, if you have ordered 100 units, and your Allowance is 10%, then you are allowed transfer 110 units.","Procentandel man får överföra mer mot order kvantitet. Till exempel, om man har order på 100 enheter och tillåtelse är 10%, får man överföra upp till 110 enheter.", +The reserved stock will be released when you update items. Are you certain you wish to proceed?,Lager Reservation kommer att släppas när artiklar uppdaterats. Fortsätt?, +The reserved stock will be released. Are you certain you wish to proceed?,Lager Reservation kommer att släppas. Fortsätt?, +The selected {0} does not contain the selected Asset Item.,Vald {0} innehåller inte vald Tillgång Post., +"The stock for the item {0} in the {1} warehouse was negative on the {2}. You should create a positive entry {3} before the date {4} and time {5} to post the correct valuation rate. For more details, please read the documentation.","Lager för artikel {0} i {1} lager var negativt {2}. Skapa positiv post {3} före {4} och {5} för att bokföra rätt grund pris. För mer information, läs dokumentation .", +"The stock has been reserved for the following Items and Warehouses, un-reserve the same to {0} the Stock Reconciliation:

{1}","Lager är reserverad för följande Artiklar och Lager, ta bort reservation till {0} Lager Inventering :

{1}", +"The sync has started in the background, please check the {0} list for new records.",Synkronisering startad i bakgrunden. Kolla {0} lista för nya poster., +The task has been enqueued as a background job.,Uppgift är i kö som bakgrund jobb., +"The task has been enqueued as a background job. In case there is any issue on processing in background, the system will add a comment about the error on this Stock Reconciliation and revert to the Submitted stage",Uppgift är i kö som ett bakgrund jobb. Om det finns några problem med bearbetning i bakgrund kommer system att lägga till kommentar om fel på denna Lager Inventering och återgå till Godkänd status, +The total Issue / Transfer quantity {0} in Material Request {1} cannot be greater than allowed requested quantity {2} for Item {3},Totalt Utfärdad / Överföring Kvantitet {0} i Material Begäran {1} kan inte vara högre än tillåten begärd kvantitet {2} för artikel {3}, +The total Issue / Transfer quantity {0} in Material Request {1} cannot be greater than requested quantity {2} for Item {3},Totalt Utfärdad / Överföring Kvantitet {0} i Material Begäran {1} kan inte vara högre än begärd kvantitet {2} för artikel {3}, +"The users with this Role are allowed to create/modify a stock transaction, even though the transaction is frozen.","Användare med denna roll får skapa/ändra lager transaktion, även om transaktion är låst.", +The warehouse where you store finished Items before they are shipped.,Lager där färdiga artiklar lagras innan de levereras., +"The warehouse where you store your raw materials. Each required item can have a separate source warehouse. Group warehouse also can be selected as source warehouse. On submission of the Work Order, the raw materials will be reserved in these warehouses for production usage.",Lager där råmaterial lagras. Varje erfodrad artikel kan ha separat från lager. Grupp lager kan också väljas som från lager. Vid godkännade av arbetsorder kommer råmaterial att reserveras i dessa lager för produktion., +The warehouse where your Items will be transferred when you begin production. Group Warehouse can also be selected as a Work in Progress warehouse.,Lager där artiklar kommer att överföras när produktion påbörjas. Grupp Lager kan också väljas som Arbete Pågår lager., +The {0} {1} is used to calculate the valuation cost for the finished good {2}.,{0} {1} används för att beräkna grund kostnad för färdig artikel {2}., +There are ledger entries against this account. Changing {0} to non-{1} in live system will cause incorrect output in 'Accounts {2}' report,"Det finns bokföring register aposter mot detta konto. Om du ändrar {0} till icke-{1} i system kommer det att orsaka felaktig utdata i ""Konton {2}"" rapporten ", +There are no Failed transactions,Det finns inga misslyckade transaktioner, +There are no active Fiscal Years for which Demo Data can be generated.,Det finns inga aktiva bokföringsår för vilka demo data kan genereras., +There are no slots available on this date,Det finns inga lediga tider för detta datum, +There are only {0} asset created or linked to {1}. Please create or link {2} Assets with respective document.,Det finns bara {0} tillgångar skapade eller länkade till {1}. Skapa eller länka {2} Tillgångar med respektive dokument., +"There are two options to maintain valuation of stock. FIFO (first in - first out) and Moving Average. To understand this topic in detail please visit
Item Valuation, FIFO and Moving Average.","Det finns två alternativ för att upprätthålla Lager värdering. FIFO (först in - först ut) och Medelvärde. För att förstå detta ämne i detalj besök Artikelvärdering, FIFO och Medelvärde.", +There aren't any item variants for the selected item,Det finns inga artikelvarianter för vald artikel, +There is already a valid Lower Deduction Certificate {0} for Supplier {1} against category {2} for this time period.,Det finns redan giltigt Lägre Avdrag Certifikat {0} för Leverantör {1} mot kategori {2} för denna tidsperiod., +There is already an active Subcontracting BOM {0} for the Finished Good {1}.,Det finns redan aktiv Underleverantör Stycklista {0} för färdig artikel {1}., +There must be atleast 1 Finished Good in this Stock Entry,Det måste finnas minst en färdig artikel i denna Lager Post, +There was an error creating Bank Account while linking with Plaid.,Det uppstod fel när Bank Konto skulle skapas vid länkning med Plaid., +There was an error syncing transactions.,Det uppstod fel med synkronisering av transaktioner., +There was an error updating Bank Account {} while linking with Plaid.,Det uppstod fel när Bank Konto {} skulle uppdateras vid länkning med Plaid., +There was an issue connecting to Plaid's authentication server. Check browser console for more information,Det uppstod fel vid anslutning till Plaid autentisering server. Kontrollera webbläsare konsol för mer information, +There were issues unlinking payment entry {0}.,Det uppstod fel med borttagning av länk till Betalning Post {0}., +This Account has '0' balance in either Base Currency or Account Currency,"Konto har ""0"" Saldo i antingen Standard Valuta eller Konto Valuta", +This field is used to set the 'Customer'.,Detta fält används för att ange 'Kund'., +This filter will be applied to Journal Entry.,Detta filter kommer att tillämpas på Journal Post, +This is a Template BOM and will be used to make the work order for {0} of the item {1},Detta är Stycklista Mall och kommer att användas för att skapa arbetsorder för {0} av artikel {1}, +This is considered dangerous from accounting point of view.,Detta anses vara farligt ur bokföring synpunkt., +"This is enabled by default. If you want to plan materials for sub-assemblies of the Item you're manufacturing leave this enabled. If you plan and manufacture the sub-assemblies separately, you can disable this checkbox.","Detta är aktiverat som standard. Planeras material för underenheter för artikel som produceras, lämna detta aktiverat. Planeras och produceras underenheterna separat kan den inaktiveras.", +"This is for raw material Items that'll be used to create finished goods. If the Item is an additional service like 'washing' that'll be used in the BOM, keep this unchecked.","Detta är för råmaterial artiklar som kommer att användas för att skapa färdiga artiklar. Om artikel är tillägg service som ""tvätt"" som kommer att användas i stycklista, låt den vara inaktiverad", +This item filter has already been applied for the {0},Detta artikel filter har redan tillämpats för {0}, +This option can be checked to edit the 'Posting Date' and 'Posting Time' fields.,Detta alternativ kan väljas för att redigera fält 'Post Datum' och 'Post Tid'., +This schedule was created when Asset {0} was adjusted through Asset Value Adjustment {1}.,Detta schema skapades när Tillgång {0} justerades genom Tillgång Värde Justering {1}., +This schedule was created when Asset {0} was consumed through Asset Capitalization {1}.,Detta schema skapades när Tillgång {0} förbrukades genom Tillgång Kapitalisering {1}., +This schedule was created when Asset {0} was repaired through Asset Repair {1}.,Detta schema skapades när Tillgång {0} reparerades genom Tillgång Reparation {1}., +This schedule was created when Asset {0} was restored on Asset Capitalization {1}'s cancellation.,Detta schema skapades när Tillgång {0} återställdes vid annullering av Tillgång Kapitalisering {1}., +This schedule was created when Asset {0} was restored.,Detta schema skapades när Tillgång {0} återställdes., +This schedule was created when Asset {0} was returned through Sales Invoice {1}.,Detta schema skapades när Tillgång {0} returnerades via Försäljning Faktura {1}., +This schedule was created when Asset {0} was scrapped.,Detta schema skapades när Tillgång {0} skrevs av., +This schedule was created when Asset {0} was sold through Sales Invoice {1}.,Detta schema skapades när Tillgång {0} såldes via Försäljning Faktura {1}., +This schedule was created when Asset {0} was updated after being split into new Asset {1}.,Detta schema skapades när Tillgång {0} uppdaterades efter att ha delats upp i ny Tillgång {1}., +This schedule was created when Asset {0}'s Asset Repair {1} was cancelled.,Detta schema skapades när Tillgång Reparation {0} Tillgång Reparation {1} annullerades., +This schedule was created when Asset {0}'s Asset Value Adjustment {1} was cancelled.,Detta schema skapades när Tillgång {0} Tillgång Värde Justering {1} annullerades., +This schedule was created when Asset {0}'s shifts were adjusted through Asset Shift Allocation {1}.,Detta schema skapades när Tillgång {0} förskjutning justerades genom Tillgång Förskjutning Tilldelning {1}., +This schedule was created when new Asset {0} was split from Asset {1}.,Detta schema skapades när ny Tillgång {0} delades från Tillgång {1}., +"This table is used to set details about the 'Item', 'Qty', 'Basic Rate', etc.","Denna tabell används för att ange detaljer om 'Artikel', 'Kvantitet', 'Bas Pris', etc.", +This {} will be treated as material transfer.,Denna {} kommer att behandlas som material överföring., +Threshold for Suggestion (In Percentage),Tröskel för Förslag (%), +Time Taken to Deliver,Tid som tagits att Leverera, +Time in mins,Tid i minuter, +Time in mins.,Tid i minuter, +Time slot is not available,Tid är inte tillgänglig, +To Date is mandatory,Till Datum Erfordras, +To Delivery Date,Till Leverans Datum, +To Doctype,Till DocType, +To Due Date,Till Förfallo Datum, +To Payment Date,Till Betalning Datum, +To Reference Date,Till Referens Datum, +To add Operations tick the 'With Operations' checkbox.,Att lägga till Åtgärder kryssa i rutan 'Med Åtgärder'., +To add subcontracted Item's raw materials if include exploded items is disabled.,Att lägga till Underleverantör Artikel råmaterial om Inkludera Utvidgade Artiklar är inaktiverad., +To apply condition on parent field use parent.field_name and to apply condition on child table use doc.field_name. Here field_name could be based on the actual column name of the respective field.,"Att tillämpa villkor på överordnad fält, använd parent.field_name och för att tillämpa villkor på underordnad tabell använd doc.field_name. Här kan fältnamn baseras på verklig kolumn namn för respektive fält.", +To be Delivered to Customer,Levereras till Kund, +To cancel a {} you need to cancel the POS Closing Entry {}.,Att annullera {} måste du annullera Kassa Stängning Post {}., +"To enable Capital Work in Progress Accounting,",Att aktivera Pågående Kapitalarbete Bokföring, +To include non-stock items in the material request planning. i.e. Items for which 'Maintain Stock' checkbox is unticked.,Att inkludera ej lagerartiklar i material begäran planering. dvs Artiklar för vilka ruta 'Lager Hantera' är inaktiverad., +To submit the invoice without purchase order please set {0} as {1} in {2},"Att godkänna faktura utan inköp order, ange {0} som {1} i {2}", +To submit the invoice without purchase receipt please set {0} as {1} in {2},Att godkänna faktura utan inköp följesedel ange {0} som {1} i {2}, +"To use a different finance book, please uncheck 'Include Default FB Assets'","Att använda annan finans register, inaktivera ""Inkludera Standard Finans Register Tillgångar""", +"To use a different finance book, please uncheck 'Include Default FB Entries'","Att använda annan finans register, inaktivera ""Inkludera Standard Finans Register Tillgångar""", +Total Active Items,Totalt Aktiva Artiklar, +Total Allocations,Totala Tilldelningar, +Total Asset,Totalt Tillgång, +Total Asset Cost,Totalt Tillgång Kostnad, +Total Billing Hours,Totalt Fakturerbara Timmar, +Total Contribution Amount Against Invoices: {0},Totalt Bidrag Belopp Mot Fakturor: {0}, +Total Contribution Amount Against Orders: {0},Totalt Bidrag Belopp Mot Ordrar: {0}, +Total Equity,Totalt Eget Kapital, +Total Incoming Bills,Inkommande Fakturor, +Total Incoming Payment,Inkommande Betalningar, +Total Incoming Value (Receipt),Totalt Ingående Värde (Faktura), +Total Interest,Totalt Ränta, +Total Issues,Totalt Frågor, +Total Items,Totalt Artiklar, +Total Liability,Totalt Skuld, +Total Number of Booked Depreciations ,Totalt Antal Bokförda Avskrivningar , +Total Operation Time,Totalt Drift Tid, +Total Other Charges,Totalt Övriga Avgifter, +Total Outgoing Bills,Utgående Fakturor, +Total Outgoing Payment,Utgående Betalningar, +Total Outgoing Value (Consumption),Utgående Värde (Förbrukning), +Total Picked Quantity {0} is more than ordered qty {1}. You can set the Over Picking Allowance in Stock Settings.,Totalt plockad kvantitet {0} är mer än order kvantitet {1}. Du kan ange överplock tillåtelse i Lager Inställningar., +Total Purchase Amount,Totalt Inköp Belopp, +Total Purchase Cost has been updated,Totalt Inköp Kostnad uppdaterad, +Total Repair Cost,Totalt Reparation Kostnad, +Total Reposting Count,Totalt Ompostering Antal, +Total Sales Amount,Totalt Försäljning Belopp, +Total Stock Value,Totalt Lager Värde, +Total Supplied Qty,Totalt Levererad Kvantitet, +Total Time (in Mins),Totalt Tid i Minuter, +Total Value,Totalt Värde, +Total Value Difference (Incoming - Outgoing),Värde Differens (Inkommande - Utgående), +Total Views,Totalt Visningar, +Total Warehouses,Totalt Antal Lager, +Total percentage against cost centers should be 100,Totalt procentsats mot resultat enhet ska vara 100%, +Tracking Status,Spårning Status, +Tracking Status Info,Spårning Status Info, +Tracking URL,Spårning URL, +Transaction Deletion Document: {0} is running for this Company. {1},Transaktion Borttagning Dokument: {0} körs redan för {1}, +Transaction Deletion Record,Transaktion Borttagning Post, +Transaction Deletion Record Details,Transaktion Borttagning Post Detaljer, +Transaction Deletion Record Item,Transaktion Borttagning Post Artikel, +Transaction Exchange Rate,Transaktion Växelkurs, +Transaction Settings,Transaktion Inställningar, +Transaction currency: {0} cannot be different from Bank Account({1}) currency: {2},Transaktion valuta: {0} kan inte skilja sig från Bank Konto ({1}) valuta: {2}, +Transactions against the Company already exist! Chart of Accounts can only be imported for a Company with no transactions.,Transaktioner mot bolag finns redan! Kontoplan kan endast importeras för bolag utan transaktioner., +Transfer Asset,Överför Tillgång, +Transfer From Warehouses,Överföring Från Lager, +Transferring cannot be done to an Employee. Please enter location where Asset {0} has to be transferred,Överföring kan inte skapas för Personal. Ange plats där Tillgång {0} ska överföras, +Transit Entry,Transit Post, +Truncates 'Remarks' column to set character length,"Trunkerar kolumn ""Anmärkningar"" för att ange teckenlängd", +Type Of Call,Typ av Samtal, +Type of Transaction,Typ av Transaktion, +UAE VAT Account,UAE VAT Konto, +UAE VAT Accounts,UAE VAT Konton, +UAE VAT Settings,UAE VAT Inställningar, +UOM conversion factor required for UOM: {0} in Item: {1},Enhet Konvertering Faktor erfodras för Enhet: {0} för Artikel: {1}, +UnReconcile,Ångra, +Unable to find the time slot in the next {0} days for the operation {1}. Please increase the 'Capacity Planning For (Days)' in the {2}.,"Kunde inte att hitta tider under de kommande {0} dagarna för åtgärd {1}. Öka ""Kapacitet Planering för (Dagar)"" i {2}.", +Unable to find variable:,Kan inte hitta variabel:, +Unassigned Qty,Ej Tilldelat Kvantitet, +"Under Working Hours table, you can add start and end times for a Workstation. For example, a Workstation may be active from 9 am to 1 pm, then 2 pm to 5 pm. You can also specify the working hours based on shifts. While scheduling a Work Order, the system will check for the availability of the Workstation based on the working hours specified.","Under Arbetstid tabell kan man lägga till start och slut tider för arbetsstation. Till exempel kan arbetsstation vara aktiv från 9.00 till 12.00, sedan 1300 till 17.00. Du kan även ange arbetstid utifrån skift. Under schemaläggning av arbetsorder kommer system att kontrollera tillgänglighet för arbetsstation baserat på angiven arbetstid.", +Unit of Measure (UOM),Enhet, +Unlinked,Bortkopplad, +Unqualified,Okvalificerad, +Unrealized Profit / Loss Account,Orealiserad Resultat Konto, +Unrealized Profit / Loss account for intra-company transfers,Orealiserad Resultat konto för koncern överföringar, +Unrealized Profit/Loss account for intra-company transfers,Orealiserad Resultat konto för koncern överföringar, +Unreconcile Payment,Ångra Betalning Avstämning, +Unreconcile Payment Entries,Ångra Betalning Avstämning Post, +Unreconcile Transaction,Ångra Transaktion, +Unreconciled Amount,Ångrad Betalning Avstämning Belopp, +Unreconciled Entries,Ångrad Betalning Avstämning Post, +Unreserve,Ångra Reservation, +Unreserve Stock,Ångra Lager Reservation, +Unreserving Stock...,Ångrar Lager Reservation ..., +Unset Matched Payment Request,Ångra Avstämd Betalning Begäran, +Up,Upp, +Update Billed Amount in Delivery Note,Uppdatera Fakturerad Belopp i Försäljning Följesedel, +Update Billed Amount in Purchase Order,Uppdatera Fakturerad Belopp i Inköp Order, +Update Billed Amount in Purchase Receipt,Uppdatera Fakturerad Belopp i Inköp Följesedel, +Update Existing Price List Rate,Uppdatera Befintlig Prislista Pris, +Update Existing Records,Uppdatera Befintliga Poster, +Update Outstanding for Self,Uppdatera Utestående för sig själv, +Update Rate as per Last Purchase,Uppdatera Pris per Senaste Inköp, +Update Total Purchase Cost,Uppdatera Total Inköp Kostnad, +Update frequency of Project,Projekt Uppdatering Intervall, +Update stock must be enabled for the purchase invoice {0},Uppdatera Lager måste vara aktiverat för Inköp Faktura {0}, +Updated via 'Time Log' (In Minutes),Uppdaterad via 'Tid Logg' (i Minuter), +Updating Work Order status,Uppdaterar Arbetsorder status, +"Updating {0} of {1}, {2}","Uppdaterar {0} av {1}, {2}", +Upload Bank Statement,Importera Bank Avstämning, +Use 'Repost in background' button to trigger background job. Job can only be triggered when document is in Queued or Failed status.,"Använd knapp ""Posta om i Backgrund"" för att utlösa bakgrund jobb. Jobb kan bara utlösas när dokument har status 'I Kö' eller 'Misslyckad'.", +Use Batch-wise Valuation,Använd Värdering per Parti, +Use Company Default Round Off Cost Center,Använd Bolag Standard Avrundning Resultat Enhet, +Use Company default Cost Center for Round off,Använd Bolag standard Resultat Enhet för Avrundning, +Use HTTP Protocol,Använd HTTP Protokoll, +Use Item based reposting,Använd Artikel baserad Ompostering , +Use Serial / Batch Fields,Använd Serie / Parti Nummer Fält, +Use Serial No / Batch Fields,Använd Serie / Parti Nummer Fält, +Use Transaction Date Exchange Rate,Använd Transaktion Datum Växelkurs, +User {0}: Removed Employee Self Service role as there is no mapped employee.,Användare {0}: Borttagen Personal Självbetjäning roll eftersom det inte finns någon mappad personal., +User {0}: Removed Employee role as there is no mapped employee.,Användare {0}: Borttagen Personal roll eftersom det inte finns mappad personal., +Users can enable the checkbox If they want to adjust the incoming rate (set using purchase receipt) based on the purchase invoice rate.,Användare kan kryssa i rut Om de vill justera inköp pris (anges med inköp följesedel) baserat på inköp faktura pris., +Users with this role are allowed to over bill above the allowance percentage,Användare med denna roll tillåts att överfakturera över tillåten procentsats, +Users with this role are allowed to over deliver/receive against orders above the allowance percentage,Användare med denna roll tillåts att överleverera/ta emot ordrar över tillåten procentsats, +Using negative stock disables FIFO/Moving average valuation when inventory is negative.,Användning av negativ lager inaktiverar FIFO/MA värdering sätt när lager värde är negativ., +VAT Accounts,Moms Konton, +VAT Amount (AED),Moms Belopp (AED), +VAT Audit Report,Moms Revision Rapport, +VAT on Expenses and All Other Inputs,Moms på Utgifter och Alla Andra intäkter, +VAT on Sales and All Other Outputs,Moms på Försäljning och Alla Andra utgifter, +Valid From must be after {0} as last GL Entry against the cost center {1} posted on this date,Giltig Från Datum måste vara efter {0} eftersom senaste Bokföring Register Post mot resultat enhet {1} postad detta datum, +Validate Components Quantities Per BOM,Validera Komponent Kvantiteter per Stycklista, +Validate Negative Stock,Validera Negativ Lager, +Validate Pricing Rule,Validera Prissättning Regel, +Validate Stock on Save,Validera Lager på Spara, +Valuation Field Type,Värdering Fält Typ, +Valuation Rate (In / Out),Grund Pris (In/Ut), +Valuation rate for customer provided items has been set to zero.,Grund Pris för Kund Försedda Artiklar angavs till noll., +Valuation rate for the item as per Sales Invoice (Only for Internal Transfers),Grund Pris för artikel enligt Försäljning Faktura (endast för Interna Överföringar), +Value Based Inspection,Värde Baserad Kontroll, +Value Change,Värde Förändring, +Value Details,Värde Detaljer, +Value of Goods,Gods Värde, +Value of goods cannot be 0,Godsvärde kan inte vara 0, +Verification failed please check the link,"Verifiering misslyckades, kontrollera länk", +Via Landed Cost Voucher,Genom Landad Kostnad Verifikat, +View BOM Update Log,Visa Stycklista Uppdatering Logg, +View Exchange Gain/Loss Journals,Visa Växelkurs Resultat Journaler, +View General Ledger,Visa Bokföring Register, +View Ledgers,Visa Register, +Visits,Besök, +Voice Call Settings,Röst Samtal Inställningar, +Voucher,Verifikat, +Voucher Name,Verifikat Namn, +Voucher No is mandatory,Verifikat Nummer Erfodras, +Voucher Qty,Verifikat Kvantitet, +Voucher Subtype,Verifikat Undertyp, +Voucher {0} is over-allocated by {1},Verifikat {0} är övertilldelad av {1}, +Voucher {0} value is broken: {1},Verifikat {0} värde bruten: {1}, +Voucher-wise Balance,Saldo per Verifikat, +"WARNING: Exotel app has been separated from ERPNext, please install the app to continue using Exotel integration.","OBS: Exotel app har separerats från System, installera app för att fortsätta använda Exotelintegration.", +WIP Composite Asset,Pågående Arbete Sammansatt Tillgång, +Waiting for payment...,Väntar på betalning..., +Warehouse Capacity for Item '{0}' must be greater than the existing stock level of {1} {2}.,Lager Kapacitet för Artikel '{0}' måste vara högre än befintlig lager nivå på {1} {2}. , +Warehouse Details,Lager Detaljer, +Warehouse Disabled?,Lager Inaktiverad?, +Warehouse Settings,Lager Inställningar, +Warehouse Wise Stock Balance,Lager Saldo per Lager, +Warehouse wise Stock Value,Lager Värde per Lager, +Warehouse {0} does not belong to Company {1}.,Lager {0} tillhör inte Bolag {1}., +"Warehouse {0} is not linked to any account, please mention the account in the warehouse record or set default inventory account in company {1}.",Lager {0} är inte länkad till något konto. Ange konto i lager post eller ange standard konto för lager i bolag {1}., +Warehouse's Stock Value has already been booked in the following accounts:,Lagrets Lager Värde är redan bokförd på följande konton:, +Warning - Row {0}: Billing Hours are more than Actual Hours,Varning - Rad # {0}: Fakturerbara timmar är fler än verkliga timmar, +Warning on Negative Stock,Varna vid Negativt Lager, +Warning!,Varning!, +Watch Video,Visa Video, +"We can see {0} is made against {1}. If you want {1}'s outstanding to be updated, uncheck '{2}' checkbox.

Or you can use {3} tool to reconcile against {1} later.","Vi kan se att {0} skapades mot {1}. Om du vill att {1}s utestående ska uppdateras, avmarkera '{2}'kryssruta .

Eller så kan du använda {3} verktyg för att stämma av mot {1} senare.", +Website Script,Webbplats Skript, +Website Theme,Webbplats Tema, +Week {0} {1},Vecka {0} {1}, +Weekly Time to send,Veckotid att skicka, +Weight (kg),Vikt (kg), +"When a parent warehouse is chosen, the system conducts stock checks against the associated child warehouses",Näröverordnat lager valts utför system lagerkontroller mot tillhörande underordnade lager, +"When creating an Item, entering a value for this field will automatically create an Item Price at the backend.","Vid skapande av Artikel, om man anger värde för detta fält, skapas automatiskt artikelpris i bakgrund.", +"While making Purchase Invoice from Purchase Order, use Exchange Rate on Invoice's transaction date rather than inheriting it from Purchase Order. Only applies for Purchase Invoice.","Vid skapande av Inköp Faktura från Inköp Order, använd Inköp Faktura transaktion datum för växelkurs istället för att ärva den från Inköp Order. Gäller endast Inköp Faktura.", +Width (cm),Bredd (cm), +With Period Closing Entry For Opening Balances,Med PeriodStängning Post för Öppning Saldon, +Withdrawal,Uttag, +Work Order / Subcontract PO,Arbetsorder / Underleverantör Inköp Order, +Work Order Consumed Materials,Arbetsorder Förbrukat Material, +Workflow,Arbetsflöde, +Workflow Action,Arbetsflöde Åtgärd, +Workflow State,Arbetsflöde Tillstånd, +Workstation Dashboard,Arbetsplats Översikt Panel, +Workstation Status,Arbetsplats Status, +Workstation Type,Arbetsplats Typ, +Workstations,Arbetsplatser, +Write Off Limit,Avskrivning Gräns, +Wrong Company,Fel Bolag, +Wrong Template,Fel Mall, +You are not authorized to make/edit Stock Transactions for Item {0} under warehouse {1} before this time.,Du är inte behörig att skapa/redigera lager transaktioner för artikel {0} under lager {1} före denna tidpunkt., +You are picking more than required quantity for the item {0}. Check if there is any other pick list created for the sales order {1}.,Du väljer mer än vad som krävs för artikel {0}. Kontrollera om det finns någon annan plocklista skapad för försäljning order {1}., +You can add the original invoice {} manually to proceed.,Lägg till original faktura {} manuellt för att fortsätta., +"You can set it as a machine name or operation type. For example, stiching machine 12",Du kan ange den som maskin namn eller åtgärd typ. Till exempel sy maskin 12, +You can't make any changes to Job Card since Work Order is closed.,Du kan inte göra några ändringar i Jobbkort eftersom Arbetsorder är stängd., +You can't redeem Loyalty Points having more value than the Rounded Total.,Det går inte att lösa in Lojalitet Poäng som har mer värde än Avrundad Belopp., +You cannot change the rate if BOM is mentioned against any Item.,Du kan inte ändra pris om Stycklista är angiven mot någon artikel., +You cannot create a {0} within the closed Accounting Period {1},Du kan inte skapa {0} inom stängd bokföring period {1}, +You cannot create/amend any accounting entries till this date.,Du kan inte skapa/ändra några bokföring poster fram till detta datum., +You cannot repost item valuation before {},Du kan inte lägga om artikel värdering före {}, +You have entered a duplicate Delivery Note on Row,Du har angett dubblett Försäljning Följesedel på Rad, +You haven't created a {0} yet,Ingen {0} skapad än, +You need to cancel POS Closing Entry {} to be able to cancel this document.,Annullera Kassa Stängning Post {} för att annullera detta dokument., +Your Name (required),Ditt Namn, +Your email has been verified and your appointment has been scheduled,Din E-post är verifierad och ditt möte är bokad, +Zero Balance,Noll Saldo, +Zero Rated,Noll Pris, +Zero quantity,Noll Kvantitet, +`Allow Negative rates for Items`,"""Tillåt Negativa Priser för Artiklar"".", +as a percentage of finished item quantity,som procentsats av färdig artikel kvantitet, +at,kl., +dated {0},daterad {0}, +description,Beskrivning, +discount applied,Rabatt Tillämpad, +fieldname,Fält Namn , +is already,är redan, +must be between 0 and 100,måste vara mellan 0 och 100, +or its descendants,eller dess underordnad, +out of 5,av 5 möjliga, +payments app is not installed. Please install it from {0} or {1},payment app är inte installerad. Installera det från {0} eller {1}, +payments app is not installed. Please install it from {} or {},payment app är inte installerad. Installera det från {0} eller {1}, +performing either one below:,utför någon av dem nedan:, +product bundle item row's name in sales order. Also indicates that picked item is to be used for a product bundle,Artikel paket artikel rad namn i försäljning order. Indikerar också att plockad artikel ska användas för artikel paket, +quotation_item,Försäljning Offert Artikel, +ratings,Bedömningar, +subscription is already cancelled.,prenumeration är redan annullerad., +to unallocate the amount of this Return Invoice before cancelling it.,att ta bort belopp för denna Retur Faktura innan annullering., +variance,avvikelse, +via BOM Update Tool,via Ersätt Stycklista Verktyg, +will be,kommer vara, +{0} {1} has submitted Assets. Remove Item {2} from table to continue.,{0} {1} har godkänt tillgångar. Ta bort Artikel {2} från tabell för att fortsätta., +{0} Account not found against Customer {1}.,{0} Konto hittades inte mot Kund {1}., +{0} Account: {1} ({2}) must be in either customer billing currency: {3} or Company default currency: {4},{0} Konto: {1} ({2}) måste vara antingen i kundens faktura valuta: {3} eller bolag standard valuta: {4}, +{0} Budget for Account {1} against {2} {3} is {4}. It {5} exceed by {6},{0} Budget för Konto {1} mot {2} {3} är {4}. Det {5} överstiger med {6}, +{0} Transaction(s) Reconciled,{0} Transaktion(er) Avstämda, +{0} account is not of type {1},{0} konto är inte av typ {1}, +{0} account not found while submitting purchase receipt,{0} konto hittades inte när vid godkänande av Inköp Följesedel, +{0} and {1},{0} och {1}, +{0} cannot be used as a Main Cost Center because it has been used as child in Cost Center Allocation {1},{0} kan inte användas som Överordnad Resultat Enhet eftersom det har använts som underordnad i Resultat Enhet Tilldelning {1}, +{0} cannot be zero,{0} kan inte vara noll, +{0} currency must be same as company's default currency. Please select another account.,{0} valuta måste vara samma som bolag standard valuta. Välj ett annat konto., +{0} entered twice {1} in Item Taxes,{0} angiven två gånger {1} under Artikel Moms, +{0} has Payment Term based allocation enabled. Select a Payment Term for Row #{1} in Payment References section,{0} har Betalning Villkor baserad tilldelning aktiverad. Välj Betalning Villkor för Rad #{1} i Betalning Referenser, +{0} is a mandatory Accounting Dimension.
Please set a value for {0} in Accounting Dimensions section.,{0} är erfordrad Bokföring Dimension.
Ange värde för {0} Bokföring Dimensioner., +{0} is added multiple times on rows: {1},{0} läggs till flera gånger på rader: {1}, +{0} is already running for {1}, {0} körs redan för {1}, +{0} is mandatory for account {1},{0} är erfodrad för konto {1}, +{0} is not running. Cannot trigger events for this Document,{0} körs inte. Kan inte utlösa händelser för detta Dokument, +{0} qty of Item {1} is being received into Warehouse {2} with capacity {3}.,{0} kvantitet av artikel {1} tas emot i Lager {2} med kapacitet {3}., +"{0} units are reserved for Item {1} in Warehouse {2}, please un-reserve the same to {3} the Stock Reconciliation.","{0} enheter är reserverade för Artikel {1} i Lager {2}, ta bort reservation för {3} Lager Inventering.", +{0} units of Item {1} is not available in any of the warehouses.,{0} enheter av Artikel {1} är inte tillgängliga på Lager., +{0} units of Item {1} is picked in another Pick List.,{0} enheter av Artikel {1} är vald i en annan Plocklista., +"{0} units of {1} are required in {2}{3}, on {4} {5} for {6} to complete the transaction.","{0} enheter av {1} erfordras i {2}{3}, den {4} {5} för att {6} ska kunna slutföra transaktion.", +{0} units of {1} needed in {2} on {3} {4} to complete this transaction.,{0} enheter av {1} behövs i {2} den {3} {4} för att slutföra denna transaktion., +{0} will be given as discount.,{0} kommer att ges som rabatt., +{0} {1} Manually,{0} {1} Manuellt, +{0} {1} Partially Reconciled,{0} {1} Delvis Avstämd, +"{0} {1} cannot be updated. If you need to make changes, we recommend canceling the existing entry and creating a new one.",{0} {1} kan inte uppdateras. Om du behöver göra ändringar rekommenderar vi att du annullerar befintlig post och skapar ny., +{0} {1} has already been fully paid.,{0} {1} är redan betalad till fullo., +{0} {1} has already been partly paid. Please use the 'Get Outstanding Invoice' or the 'Get Outstanding Orders' button to get the latest outstanding amounts.,"{0} {1} är redan delvis betald. Använd knapp ""Hämta Utestående Faktura"" eller ""Hämta Utestående Ordrar"" knapp för att hämta senaste utestående belopp.", +{0} {1} is allocated twice in this Bank Transaction,{0} {1} är tilldelad två gånger i denna Bank Transaktion, +{0} {1} is not in any active Fiscal Year,{0} {1} är inte under något aktivt Bokföringsår, +{0} {1} is on hold,{0} {1} är parkerad, +{0} {1} not allowed to be reposted. Modify {2} to enable reposting.,{0} {1} får inte läggas upp igen. Ändra {2} för att aktivera omläggning., +{0} {1} via CSV File,{0} {1} via CSV fil, +{0} {1}: Account {2} is a Group Account and group accounts cannot be used in transactions,{0} {1}: Konto {2} är ett grupp konto och grupp konton kan inte användas i transaktioner, +{0} {1}: Cost Center is required for 'Profit and Loss' account {2}.,"{0} {1}: Resultat Enhet erfordras för ""Resultat"" konto {2}.", +{0} {1}: Cost Center {2} is a group cost center and group cost centers cannot be used in transactions,{0} {1}: Resultat Enhet {2} är grupp resultat enhet och grupp resultat enhet kan inte användas i transaktioner, +{0}'s {1} cannot be after {2}'s Expected End Date.,{0}s {1} kan inte vara efter förväntad slut datum för {2}, +{item_name}'s Sample Size ({sample_size}) cannot be greater than the Accepted Quantity ({accepted_quantity}),{item_name} Prov Kvantitet ({sample_size}) kan inte vara högre än accepterad kvantitete ({accepted_quantity}), +{} Available,{} Tillgängliga, +{} To Deliver,{} Att Leverera, +{} To Receive,{} Att Ta Emot, +{} Assigned,{} Tilldelade, +{} Available,{} Tillgängliga, +{} Open,{} Öppen, +{} Pending,{}Pågående, +{} To Bill,{} Att Fakturera, +{} is a child company.,{} är dotter bolag., +{} {} is already linked with another {},{} {} är redan länkad till annan {}, +{} {} is already linked with {} {},{} {} är redan länkad till {} {}, diff --git a/erpnext/utilities/bulk_transaction.py b/erpnext/utilities/bulk_transaction.py index 4319fa7d6ea..7ba687941c9 100644 --- a/erpnext/utilities/bulk_transaction.py +++ b/erpnext/utilities/bulk_transaction.py @@ -137,6 +137,11 @@ def task(doc_name, from_doctype, to_doctype): }, "Purchase Receipt": {"Purchase Invoice": purchase_receipt.make_purchase_invoice}, } + + hooks = frappe.get_hooks("bulk_transaction_task_mapper") + for hook in hooks: + mapper.update(frappe.get_attr(hook)()) + frappe.flags.bulk_transaction = True if to_doctype in ["Payment Entry"]: obj = mapper[from_doctype][to_doctype](from_doctype, doc_name) diff --git a/erpnext/utilities/transaction_base.py b/erpnext/utilities/transaction_base.py index 6fab5380c38..2e4bdac6aab 100644 --- a/erpnext/utilities/transaction_base.py +++ b/erpnext/utilities/transaction_base.py @@ -257,11 +257,11 @@ def validate_uom_is_integer(doc, uom_field, qty_fields, child_dt=None): if isinstance(qty_fields, str): qty_fields = [qty_fields] - distinct_uoms = list(set(d.get(uom_field) for d in doc.get_all_children())) - integer_uoms = list( - filter( - lambda uom: frappe.db.get_value("UOM", uom, "must_be_whole_number", cache=True) or None, - distinct_uoms, + distinct_uoms = tuple(set(uom for uom in (d.get(uom_field) for d in doc.get_all_children()) if uom)) + integer_uoms = set( + d[0] + for d in frappe.db.get_values( + "UOM", (("name", "in", distinct_uoms), ("must_be_whole_number", "=", 1)), cache=True ) ) diff --git a/pyproject.toml b/pyproject.toml index aaac05d7ed0..d891b186d89 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,7 +29,7 @@ requires = ["flit_core >=3.4,<4"] build-backend = "flit_core.buildapi" [tool.bench.frappe-dependencies] -frappe = ">=15.10.0,<16.0.0" +frappe = ">=15.40.4,<16.0.0" [tool.ruff] line-length = 110 From 2466e4c2fdf887a435a035dad4095b1b3f9b0ba4 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 11 Dec 2024 21:33:36 +0530 Subject: [PATCH 0661/1614] fix: valuation rate for batch in stock reconciliation (backport #44657) (#44664) fix: valuation rate for batch in stock reconciliation (#44657) fix: valuation rate for batch in stock reco (cherry picked from commit 15c7d26378d195b9ffeee0e6b9efbbb3bc7748a0) Co-authored-by: rohitwaghchaure --- .../stock_reconciliation.js | 1 + .../stock_reconciliation.py | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js index 31985678009..85acc762969 100644 --- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js +++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js @@ -207,6 +207,7 @@ frappe.ui.form.on("Stock Reconciliation", { posting_time: frm.doc.posting_time, batch_no: d.batch_no, row: d, + company: frm.doc.company, }, callback: function (r) { const row = frappe.model.get_doc(cdt, cdn); diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py index c13b3620517..12773a5555d 100644 --- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py +++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py @@ -466,6 +466,7 @@ class StockReconciliation(StockController): batch_no=item.batch_no, inventory_dimensions_dict=inventory_dimensions_dict, row=item, + company=self.company, ) if ( @@ -974,6 +975,7 @@ class StockReconciliation(StockController): self.posting_date, self.posting_time, row=row, + company=self.company, ) current_qty = item_dict.get("qty") @@ -1308,6 +1310,7 @@ def get_stock_balance_for( with_valuation_rate: bool = True, inventory_dimensions_dict=None, row=None, + company=None, ): frappe.has_permission("Stock Reconciliation", "write", throw=True) @@ -1367,6 +1370,21 @@ def get_stock_balance_for( or 0 ) + if row.use_serial_batch_fields and row.batch_no: + rate = get_incoming_rate( + frappe._dict( + { + "item_code": row.item_code, + "warehouse": row.warehouse, + "qty": row.qty * -1, + "batch_no": row.batch_no, + "company": company, + "posting_date": posting_date, + "posting_time": posting_time, + } + ) + ) + return { "qty": qty, "rate": rate, From bd9c84d3b76908b6756d0b3ade35e50722f30332 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 12 Dec 2024 15:24:32 +0530 Subject: [PATCH 0662/1614] fix: make projected qty editable after submit (backport #44670) (#44671) * fix: make projected qty editable after submit (#44670) (cherry picked from commit 9ef9ff3de89d0e59a590792090ab112b18420634) # Conflicts: # erpnext/selling/doctype/quotation_item/quotation_item.json * chore: fix conflicts --------- Co-authored-by: Venkatesh <47534423+venkat102@users.noreply.github.com> Co-authored-by: rohitwaghchaure --- erpnext/selling/doctype/quotation_item/quotation_item.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/selling/doctype/quotation_item/quotation_item.json b/erpnext/selling/doctype/quotation_item/quotation_item.json index 1ea19aaaf56..9dd65a8b4f8 100644 --- a/erpnext/selling/doctype/quotation_item/quotation_item.json +++ b/erpnext/selling/doctype/quotation_item/quotation_item.json @@ -455,6 +455,7 @@ "fieldtype": "Column Break" }, { + "allow_on_submit": 1, "fieldname": "projected_qty", "fieldtype": "Float", "label": "Projected Qty", @@ -690,7 +691,7 @@ "idx": 1, "istable": 1, "links": [], - "modified": "2024-11-24 15:18:43.952844", + "modified": "2024-12-12 13:49:17.765883", "modified_by": "Administrator", "module": "Selling", "name": "Quotation Item", From 33273faccbd514dd635c821a9cb18c30f6513982 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 12 Dec 2024 15:44:28 +0530 Subject: [PATCH 0663/1614] fix: validate returned serial nos and batches (backport #44669) (#44674) fix: validate returned serial nos and batches (#44669) (cherry picked from commit 4385349e3640bf8b3f5279b466a3b94330d9a3cd) Co-authored-by: rohitwaghchaure --- .../purchase_receipt/test_purchase_receipt.py | 63 +++++++++++++++++++ .../serial_and_batch_bundle.py | 36 ++++++++--- 2 files changed, 90 insertions(+), 9 deletions(-) diff --git a/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py index 86d1a6948de..b097c0e6441 100644 --- a/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py +++ b/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py @@ -3984,6 +3984,69 @@ class TestPurchaseReceipt(FrappeTestCase): frappe.db.set_single_value("Stock Settings", "allow_existing_serial_no", 1) + def test_seral_no_return_validation(self): + from erpnext.stock.doctype.purchase_receipt.purchase_receipt import ( + make_purchase_return, + ) + + sn_item_code = make_item( + "Test Serial No for Validation", {"has_serial_no": 1, "serial_no_series": "SN-TSNFVAL-.#####"} + ).name + + pr1 = make_purchase_receipt(item_code=sn_item_code, qty=5, rate=100, use_serial_batch_fields=1) + pr1_serial_nos = get_serial_nos_from_bundle(pr1.items[0].serial_and_batch_bundle) + + serial_no_pr = make_purchase_receipt( + item_code=sn_item_code, qty=5, rate=100, use_serial_batch_fields=1 + ) + serial_no_pr_serial_nos = get_serial_nos_from_bundle(serial_no_pr.items[0].serial_and_batch_bundle) + + sn_return = make_purchase_return(serial_no_pr.name) + sn_return.items[0].qty = -1 + sn_return.items[0].received_qty = -1 + sn_return.items[0].serial_no = pr1_serial_nos[0] + sn_return.save() + self.assertRaises(frappe.ValidationError, sn_return.submit) + + sn_return = make_purchase_return(serial_no_pr.name) + sn_return.items[0].qty = -1 + sn_return.items[0].received_qty = -1 + sn_return.items[0].serial_no = serial_no_pr_serial_nos[0] + sn_return.save() + sn_return.submit() + + def test_batch_no_return_validation(self): + from erpnext.stock.doctype.purchase_receipt.purchase_receipt import ( + make_purchase_return, + ) + + batch_item_code = make_item( + "Test Batch No for Validation", + {"has_batch_no": 1, "batch_number_series": "BT-TSNFVAL-.#####", "create_new_batch": 1}, + ).name + + pr1 = make_purchase_receipt(item_code=batch_item_code, qty=5, rate=100, use_serial_batch_fields=1) + batch_no = get_batch_from_bundle(pr1.items[0].serial_and_batch_bundle) + + batch_no_pr = make_purchase_receipt( + item_code=batch_item_code, qty=5, rate=100, use_serial_batch_fields=1 + ) + original_batch_no = get_batch_from_bundle(batch_no_pr.items[0].serial_and_batch_bundle) + + batch_return = make_purchase_return(batch_no_pr.name) + batch_return.items[0].qty = -1 + batch_return.items[0].received_qty = -1 + batch_return.items[0].batch_no = batch_no + batch_return.save() + self.assertRaises(frappe.ValidationError, batch_return.submit) + + batch_return = make_purchase_return(batch_no_pr.name) + batch_return.items[0].qty = -1 + batch_return.items[0].received_qty = -1 + batch_return.items[0].batch_no = original_batch_no + batch_return.save() + batch_return.submit() + def prepare_data_for_internal_transfer(): from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_internal_supplier 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 a1f3135b70b..dc2071b9ee0 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 @@ -252,8 +252,8 @@ class SerialandBatchBundle(Document): ]: return - if return_aginst := self.get_return_aginst(parent=parent): - self.set_valuation_rate_for_return_entry(return_aginst, save) + if return_against := self.get_return_against(parent=parent): + self.set_valuation_rate_for_return_entry(return_against, save) elif self.type_of_transaction == "Outward": self.set_incoming_rate_for_outward_transaction( row, save, allow_negative_stock=allow_negative_stock @@ -261,9 +261,12 @@ class SerialandBatchBundle(Document): else: self.set_incoming_rate_for_inward_transaction(row, save) - def set_valuation_rate_for_return_entry(self, return_aginst, save=False): - if valuation_details := self.get_valuation_rate_for_return_entry(return_aginst): + def set_valuation_rate_for_return_entry(self, return_against, save=False): + if valuation_details := self.get_valuation_rate_for_return_entry(return_against): for row in self.entries: + if valuation_details: + self.validate_returned_serial_batch_no(return_against, row, valuation_details) + if row.serial_no: valuation_rate = valuation_details["serial_nos"].get(row.serial_no) else: @@ -280,7 +283,22 @@ class SerialandBatchBundle(Document): } ) - def get_valuation_rate_for_return_entry(self, return_aginst): + def validate_returned_serial_batch_no(self, return_against, row, original_inv_details): + if row.serial_no and row.serial_no not in original_inv_details["serial_nos"]: + self.throw_error_message( + _( + "Serial No {0} is not present in the {1} {2}, hence you can't return it against the {1} {2}" + ).format(bold(row.serial_no), self.voucher_type, bold(return_against)) + ) + + if row.batch_no and row.batch_no not in original_inv_details["batches"]: + self.throw_error_message( + _( + "Batch No {0} is not present in the original {1} {2}, hence you can't return it against the {1} {2}" + ).format(bold(row.batch_no), self.voucher_type, bold(return_against)) + ) + + def get_valuation_rate_for_return_entry(self, return_against): valuation_details = frappe._dict( { "serial_nos": defaultdict(float), @@ -296,7 +314,7 @@ class SerialandBatchBundle(Document): "`tabSerial and Batch Entry`.`incoming_rate`", ], filters=[ - ["Serial and Batch Bundle", "voucher_no", "=", return_aginst], + ["Serial and Batch Bundle", "voucher_no", "=", return_against], ["Serial and Batch Entry", "docstatus", "=", 1], ["Serial and Batch Bundle", "is_cancelled", "=", 0], ["Serial and Batch Bundle", "item_code", "=", self.item_code], @@ -430,8 +448,8 @@ class SerialandBatchBundle(Document): return sle - def get_return_aginst(self, parent=None): - return_aginst = None + def get_return_against(self, parent=None): + return_against = None if parent and parent.get("is_return") and parent.get("return_against"): return parent.get("return_against") @@ -455,7 +473,7 @@ class SerialandBatchBundle(Document): if voucher_details and voucher_details.get("is_return") and voucher_details.get("return_against"): return voucher_details.get("return_against") - return return_aginst + return return_against def set_incoming_rate_for_inward_transaction(self, row=None, save=False): valuation_field = "valuation_rate" From 6e01a9b84d2e0e8538b6dda5dbcadba65d9e65e4 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Thu, 12 Dec 2024 10:45:52 +0000 Subject: [PATCH 0664/1614] chore(release): Bumped to Version 15.45.5 ## [15.45.5](https://github.com/frappe/erpnext/compare/v15.45.4...v15.45.5) (2024-12-12) ### Bug Fixes * 'Use Multi-Level BOM' checkbox default value (backport [#44618](https://github.com/frappe/erpnext/issues/44618)) ([#44620](https://github.com/frappe/erpnext/issues/44620)) ([5cd3994](https://github.com/frappe/erpnext/commit/5cd39941ee9d8067e606df169b1d773fa46cc580)) * add docstatus for translation ([47e1ed1](https://github.com/frappe/erpnext/commit/47e1ed1eff0a14fef46881ac42843b43d5ce43d0)) * add label strings for translation in pos_controller.js ([ffdd7cf](https://github.com/frappe/erpnext/commit/ffdd7cfa8678ecb4880eb8c68d260673e3cbbc5d)) * add labels for translation in production_analytics.py ([7a6cb0f](https://github.com/frappe/erpnext/commit/7a6cb0f157adb8a0e582e2d2c6806a2acc2e8a32)) * add labels for translation in purchase_order_analysis.py ([f06827c](https://github.com/frappe/erpnext/commit/f06827c6fbdbbd74cf3c93a843a206e384cfdf5b)) * add labels for translation in quality_inspection_summary.py ([dd3a747](https://github.com/frappe/erpnext/commit/dd3a747af461a01b4fdafb877320460a85a864fe)) * add labels for translation in sales_order_analysis.py ([6980d1e](https://github.com/frappe/erpnext/commit/6980d1e142d25a3151ea5b12625a9f6e62e39352)) * add labels for translation in sales_order.js ([283043e](https://github.com/frappe/erpnext/commit/283043eba7d305bd88d64fe5780a1b65ab3725c2)) * add string for translation in delayed_tasks_summary.py ([43fc8bf](https://github.com/frappe/erpnext/commit/43fc8bf74e758ceb8c0a7170fff6fdc3c7ce0b9f)) * add strings for translation in pos_item_cart.js ([71d8dfb](https://github.com/frappe/erpnext/commit/71d8dfb401a8a3f533e5e06eedb27cc9a1ae8d27)) * add strings for translation in timesheet.js ([#44496](https://github.com/frappe/erpnext/issues/44496)) ([106671a](https://github.com/frappe/erpnext/commit/106671a414436fe162d492e7619bcf9ff34236d1)) * add strings for translation payment_terms_status_for_sales_order.py ([773e03f](https://github.com/frappe/erpnext/commit/773e03f84f9514b2d7558be14ea257b9596d4474)) * add title for translation in asset.js ([843ff18](https://github.com/frappe/erpnext/commit/843ff18cf9e45cc88042eb328b30907e888628c8)) * **Bank Transaction:** error in party matching should not block submitting (backport [#44416](https://github.com/frappe/erpnext/issues/44416)) ([#44574](https://github.com/frappe/erpnext/issues/44574)) ([31c2b81](https://github.com/frappe/erpnext/commit/31c2b818bdaf1e7b1dae39a045d8b2fdbd00d4e6)) * BOM for variant items (backport [#44580](https://github.com/frappe/erpnext/issues/44580)) ([#44584](https://github.com/frappe/erpnext/issues/44584)) ([0b26827](https://github.com/frappe/erpnext/commit/0b268279cfbe720917bd73ff952771e1eaae05b4)) * BOM has not attr required items (backport [#44598](https://github.com/frappe/erpnext/issues/44598)) ([#44600](https://github.com/frappe/erpnext/issues/44600)) ([608eaaa](https://github.com/frappe/erpnext/commit/608eaaa482507cd5724e4b05ee0dc99e0b6f5004)) * BOM name issue (backport [#44575](https://github.com/frappe/erpnext/issues/44575)) ([#44579](https://github.com/frappe/erpnext/issues/44579)) ([03ae9e2](https://github.com/frappe/erpnext/commit/03ae9e27be5acca32d3e15f8434a3f6062dc8c30)) * BOM name issue (backport [#44586](https://github.com/frappe/erpnext/issues/44586)) ([#44589](https://github.com/frappe/erpnext/issues/44589)) ([a5cc307](https://github.com/frappe/erpnext/commit/a5cc30741703857556efe0f201a7bb91231eee0b)) * consider zero valuation rate for serial nos (backport [#44532](https://github.com/frappe/erpnext/issues/44532)) ([#44534](https://github.com/frappe/erpnext/issues/44534)) ([3771c6e](https://github.com/frappe/erpnext/commit/3771c6eeae15644e459181128f41ebd04a8d0c19)) * correct color for draft in list view ([cce1cc6](https://github.com/frappe/erpnext/commit/cce1cc66747cdf3f4a8fe210b53298c41417526f)) * currency symbol in SCO and SCR (backport [#44577](https://github.com/frappe/erpnext/issues/44577)) ([#44594](https://github.com/frappe/erpnext/issues/44594)) ([2a17ecd](https://github.com/frappe/erpnext/commit/2a17ecdc3949380215b03e4ae296de40efc2c11d)) * description overwrite on qty change (backport [#44606](https://github.com/frappe/erpnext/issues/44606)) ([#44609](https://github.com/frappe/erpnext/issues/44609)) ([243bf54](https://github.com/frappe/erpnext/commit/243bf542c43de476c8d0c26c34bd45d31e72f905)) * do not allow to inward same serial nos multiple times (backport [#44617](https://github.com/frappe/erpnext/issues/44617)) ([#44619](https://github.com/frappe/erpnext/issues/44619)) ([bdb60a5](https://github.com/frappe/erpnext/commit/bdb60a51c3232dc14b052822463a43b67b16ed8f)) * duplicate required items in the CSV (backport [#44498](https://github.com/frappe/erpnext/issues/44498)) ([#44507](https://github.com/frappe/erpnext/issues/44507)) ([539c5b7](https://github.com/frappe/erpnext/commit/539c5b7974ffdaf4caf8acb6d4acc00fba626668)) * incorrect stock UOM for BOM raw materials (backport [#44528](https://github.com/frappe/erpnext/issues/44528)) ([#44531](https://github.com/frappe/erpnext/issues/44531)) ([f4aa4c9](https://github.com/frappe/erpnext/commit/f4aa4c94668a95a04b5a36dde582474df0f0be7b)) * inv dimensions fields not creating for standard doctype (backport [#44504](https://github.com/frappe/erpnext/issues/44504)) ([#44515](https://github.com/frappe/erpnext/issues/44515)) ([8733eda](https://github.com/frappe/erpnext/commit/8733eda576fe6d27ea64dfb43ee52c2f1215b234)) * make projected qty editable after submit (backport [#44670](https://github.com/frappe/erpnext/issues/44670)) ([#44671](https://github.com/frappe/erpnext/issues/44671)) ([bd9c84d](https://github.com/frappe/erpnext/commit/bd9c84d3b76908b6756d0b3ade35e50722f30332)) * not able to make PO for returned qty from material request (backport [#44540](https://github.com/frappe/erpnext/issues/44540)) ([#44547](https://github.com/frappe/erpnext/issues/44547)) ([5ef063c](https://github.com/frappe/erpnext/commit/5ef063c63471092f568ee5fdead5ae0f2f52a74d)) * not able to make sales return entry (backport [#44605](https://github.com/frappe/erpnext/issues/44605)) ([#44613](https://github.com/frappe/erpnext/issues/44613)) ([04b07a9](https://github.com/frappe/erpnext/commit/04b07a9e1c0235d5a8515973f55c2676532dfcc3)) * precision check for salvage value ([ef5a564](https://github.com/frappe/erpnext/commit/ef5a5643dca2c5ee8f008088eb9bcc77079e72e9)) * prevent set_payment_schedule on return documents ([2560beb](https://github.com/frappe/erpnext/commit/2560beb69581ef74551e892e54410cde0fb13a00)) * required by date in the reorder material request (backport [#44497](https://github.com/frappe/erpnext/issues/44497)) ([#44509](https://github.com/frappe/erpnext/issues/44509)) ([07df87a](https://github.com/frappe/erpnext/commit/07df87ab6972ed3bb23b8ce8029a787a367655cf)) * restrict advance payment entries with flag ([98bd5f2](https://github.com/frappe/erpnext/commit/98bd5f20c4e20edb766ad4b0b4df23fda5552be9)) * strings for translation in pos_past_order_summary.js ([ceec5fd](https://github.com/frappe/erpnext/commit/ceec5fdb6c094928cb566973547ebe571d655f51)) * update free item qty while adding same item in seperate row ([f88dc26](https://github.com/frappe/erpnext/commit/f88dc263d5746f1f3f9b9dafd75d050390df23a1)) * update qty in SABB if qty changed in stock reco (backport [#44542](https://github.com/frappe/erpnext/issues/44542)) ([#44546](https://github.com/frappe/erpnext/issues/44546)) ([99a3271](https://github.com/frappe/erpnext/commit/99a327155e4a13e5ea8e0ad188a1acd38f90efed)) * validate returned serial nos and batches (backport [#44669](https://github.com/frappe/erpnext/issues/44669)) ([#44674](https://github.com/frappe/erpnext/issues/44674)) ([33273fa](https://github.com/frappe/erpnext/commit/33273faccbd514dd635c821a9cb18c30f6513982)) * valuation rate for batch in stock reconciliation (backport [#44657](https://github.com/frappe/erpnext/issues/44657)) ([#44664](https://github.com/frappe/erpnext/issues/44664)) ([2466e4c](https://github.com/frappe/erpnext/commit/2466e4c2fdf887a435a035dad4095b1b3f9b0ba4)) * variant qty while making work order from BOM (backport [#44548](https://github.com/frappe/erpnext/issues/44548)) ([#44551](https://github.com/frappe/erpnext/issues/44551)) ([63b1df3](https://github.com/frappe/erpnext/commit/63b1df38a81877168ea71047c9b29db144c4d8a9)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index bb8bf11b7ea..679554abb55 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.45.4" +__version__ = "15.45.5" def get_default_company(user=None): From 0ba6e60608b2f00d3ab68b6c837994f17e7df8d0 Mon Sep 17 00:00:00 2001 From: mahsem <137205921+mahsem@users.noreply.github.com> Date: Mon, 9 Dec 2024 16:24:23 +0100 Subject: [PATCH 0665/1614] fix: add doc.status to translation from POS --- erpnext/selling/page/point_of_sale/pos_past_order_summary.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/selling/page/point_of_sale/pos_past_order_summary.js b/erpnext/selling/page/point_of_sale/pos_past_order_summary.js index 4a2d8911d1a..ed6e6e02dcc 100644 --- a/erpnext/selling/page/point_of_sale/pos_past_order_summary.js +++ b/erpnext/selling/page/point_of_sale/pos_past_order_summary.js @@ -85,7 +85,7 @@ erpnext.PointOfSale.PastOrderSummary = class {
${doc.name}
- ${doc.status} + ${__(doc.status)}
`; } From 328b9e7d9e59b1f7e188d7ad211158806022372d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Di=C3=B3genes=20Souza?= <103958767+devdiogenes@users.noreply.github.com> Date: Fri, 13 Dec 2024 03:26:55 -0300 Subject: [PATCH 0666/1614] fix: Wrong allocated_amount for sales_team in gross_profit report (#42989) * fix: Wrong allocated_amount for sales_team in gross_profit report * style: Removes whitespaces --------- Co-authored-by: ruthra kumar --- erpnext/accounts/report/gross_profit/gross_profit.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/report/gross_profit/gross_profit.py b/erpnext/accounts/report/gross_profit/gross_profit.py index c59a3bd2a7a..647490dcc90 100644 --- a/erpnext/accounts/report/gross_profit/gross_profit.py +++ b/erpnext/accounts/report/gross_profit/gross_profit.py @@ -790,7 +790,10 @@ class GrossProfitGenerator: """ if self.filters.group_by == "Sales Person": - sales_person_cols = ", sales.sales_person, sales.allocated_amount, sales.incentives" + sales_person_cols = """, sales.sales_person, + sales.allocated_percentage * `tabSales Invoice Item`.base_net_amount / 100 as allocated_amount, + sales.incentives + """ sales_team_table = "left join `tabSales Team` sales on sales.parent = `tabSales Invoice`.name" else: sales_person_cols = "" From fdfbb577794fa6af0d3b148555d4d518632f72b9 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Thu, 12 Dec 2024 15:15:07 +0530 Subject: [PATCH 0667/1614] fix: remove invalid filter in Account Receivable report --- .../report/accounts_receivable/accounts_receivable.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py index 49dce0e299b..1d67109d68d 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py @@ -551,9 +551,7 @@ class ReceivablePayableReport: self.append_payment_term(row, d, term) def append_payment_term(self, row, d, term): - if ( - self.filters.get("customer") or self.filters.get("supplier") - ) and d.currency == d.party_account_currency: + if d.currency == d.party_account_currency: invoiced = d.payment_amount else: invoiced = d.base_payment_amount From 47c7356b38447ec70391cb329a972deedbfee0bf Mon Sep 17 00:00:00 2001 From: Khushi Rawat <142375893+khushi8112@users.noreply.github.com> Date: Wed, 11 Dec 2024 00:18:04 +0530 Subject: [PATCH 0668/1614] fix: switched asset terminology from cost to value --- .../asset_depreciations_and_balances.py | 78 +++++++++---------- 1 file changed, 38 insertions(+), 40 deletions(-) diff --git a/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.py b/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.py index cdd5baf3240..bec5d128f0a 100644 --- a/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.py +++ b/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.py @@ -28,15 +28,14 @@ def get_group_by_asset_category_data(filters): for asset_category in asset_categories: row = frappe._dict() - # row.asset_category = asset_category row.update(asset_category) - row.cost_as_on_to_date = ( - flt(row.cost_as_on_from_date) - + flt(row.cost_of_new_purchase) - - flt(row.cost_of_sold_asset) - - flt(row.cost_of_scrapped_asset) - - flt(row.cost_of_capitalized_asset) + row.value_as_on_to_date = ( + flt(row.value_as_on_from_date) + + flt(row.value_of_new_purchase) + - flt(row.value_of_sold_asset) + - flt(row.value_of_scrapped_asset) + - flt(row.value_of_capitalized_asset) ) row.update( @@ -53,11 +52,11 @@ def get_group_by_asset_category_data(filters): - flt(row.depreciation_eliminated_during_the_period) ) - row.net_asset_value_as_on_from_date = flt(row.cost_as_on_from_date) - flt( + row.net_asset_value_as_on_from_date = flt(row.value_as_on_from_date) - flt( row.accumulated_depreciation_as_on_from_date ) - row.net_asset_value_as_on_to_date = flt(row.cost_as_on_to_date) - flt( + row.net_asset_value_as_on_to_date = flt(row.value_as_on_to_date) - flt( row.accumulated_depreciation_as_on_to_date ) @@ -85,12 +84,12 @@ def get_asset_categories_for_grouped_by_category(filters): end else 0 - end), 0) as cost_as_on_from_date, + end), 0) as value_as_on_from_date, ifnull(sum(case when a.purchase_date >= %(from_date)s then a.gross_purchase_amount else 0 - end), 0) as cost_of_new_purchase, + end), 0) as value_of_new_purchase, ifnull(sum(case when ifnull(a.disposal_date, 0) != 0 and a.disposal_date >= %(from_date)s and a.disposal_date <= %(to_date)s then @@ -101,7 +100,7 @@ def get_asset_categories_for_grouped_by_category(filters): end else 0 - end), 0) as cost_of_sold_asset, + end), 0) as value_of_sold_asset, ifnull(sum(case when ifnull(a.disposal_date, 0) != 0 and a.disposal_date >= %(from_date)s and a.disposal_date <= %(to_date)s then @@ -112,7 +111,7 @@ def get_asset_categories_for_grouped_by_category(filters): end else 0 - end), 0) as cost_of_scrapped_asset, + end), 0) as value_of_scrapped_asset, ifnull(sum(case when ifnull(a.disposal_date, 0) != 0 and a.disposal_date >= %(from_date)s and a.disposal_date <= %(to_date)s then @@ -123,7 +122,7 @@ def get_asset_categories_for_grouped_by_category(filters): end else 0 - end), 0) as cost_of_capitalized_asset + end), 0) as value_of_capitalized_asset from `tabAsset` a where a.docstatus=1 and a.company=%(company)s and a.purchase_date <= %(to_date)s {condition} and not exists( @@ -164,12 +163,12 @@ def get_asset_details_for_grouped_by_category(filters): end else 0 - end), 0) as cost_as_on_from_date, + end), 0) as value_as_on_from_date, ifnull(sum(case when a.purchase_date >= %(from_date)s then a.gross_purchase_amount else 0 - end), 0) as cost_of_new_purchase, + end), 0) as value_of_new_purchase, ifnull(sum(case when ifnull(a.disposal_date, 0) != 0 and a.disposal_date >= %(from_date)s and a.disposal_date <= %(to_date)s then @@ -180,7 +179,7 @@ def get_asset_details_for_grouped_by_category(filters): end else 0 - end), 0) as cost_of_sold_asset, + end), 0) as value_of_sold_asset, ifnull(sum(case when ifnull(a.disposal_date, 0) != 0 and a.disposal_date >= %(from_date)s and a.disposal_date <= %(to_date)s then @@ -191,7 +190,7 @@ def get_asset_details_for_grouped_by_category(filters): end else 0 - end), 0) as cost_of_scrapped_asset, + end), 0) as value_of_scrapped_asset, ifnull(sum(case when ifnull(a.disposal_date, 0) != 0 and a.disposal_date >= %(from_date)s and a.disposal_date <= %(to_date)s then @@ -202,7 +201,7 @@ def get_asset_details_for_grouped_by_category(filters): end else 0 - end), 0) as cost_of_capitalized_asset + end), 0) as value_of_capitalized_asset from `tabAsset` a where a.docstatus=1 and a.company=%(company)s and a.purchase_date <= %(to_date)s {condition} and not exists( @@ -232,15 +231,14 @@ def get_group_by_asset_data(filters): for asset_detail in asset_details: row = frappe._dict() - # row.asset_category = asset_category row.update(asset_detail) - row.cost_as_on_to_date = ( - flt(row.cost_as_on_from_date) - + flt(row.cost_of_new_purchase) - - flt(row.cost_of_sold_asset) - - flt(row.cost_of_scrapped_asset) - - flt(row.cost_of_capitalized_asset) + row.value_as_on_to_date = ( + flt(row.value_as_on_from_date) + + flt(row.value_of_new_purchase) + - flt(row.value_of_sold_asset) + - flt(row.value_of_scrapped_asset) + - flt(row.value_of_capitalized_asset) ) row.update(next(asset for asset in assets if asset["asset"] == asset_detail.get("name", ""))) @@ -251,11 +249,11 @@ def get_group_by_asset_data(filters): - flt(row.depreciation_eliminated_during_the_period) ) - row.net_asset_value_as_on_from_date = flt(row.cost_as_on_from_date) - flt( + row.net_asset_value_as_on_from_date = flt(row.value_as_on_from_date) - flt( row.accumulated_depreciation_as_on_from_date ) - row.net_asset_value_as_on_to_date = flt(row.cost_as_on_to_date) - flt( + row.net_asset_value_as_on_to_date = flt(row.value_as_on_to_date) - flt( row.accumulated_depreciation_as_on_to_date ) @@ -446,38 +444,38 @@ def get_columns(filters): columns += [ { - "label": _("Cost as on") + " " + formatdate(filters.day_before_from_date), - "fieldname": "cost_as_on_from_date", + "label": _("Value as on") + " " + formatdate(filters.day_before_from_date), + "fieldname": "value_as_on_from_date", "fieldtype": "Currency", "width": 140, }, { - "label": _("Cost of New Purchase"), - "fieldname": "cost_of_new_purchase", + "label": _("Value of New Purchase"), + "fieldname": "value_of_new_purchase", "fieldtype": "Currency", "width": 140, }, { - "label": _("Cost of Sold Asset"), - "fieldname": "cost_of_sold_asset", + "label": _("Value of Sold Asset"), + "fieldname": "value_of_sold_asset", "fieldtype": "Currency", "width": 140, }, { - "label": _("Cost of Scrapped Asset"), - "fieldname": "cost_of_scrapped_asset", + "label": _("Value of Scrapped Asset"), + "fieldname": "value_of_scrapped_asset", "fieldtype": "Currency", "width": 140, }, { - "label": _("Cost of New Capitalized Asset"), - "fieldname": "cost_of_capitalized_asset", + "label": _("Value of New Capitalized Asset"), + "fieldname": "value_of_capitalized_asset", "fieldtype": "Currency", "width": 140, }, { - "label": _("Cost as on") + " " + formatdate(filters.to_date), - "fieldname": "cost_as_on_to_date", + "label": _("Value as on") + " " + formatdate(filters.to_date), + "fieldname": "value_as_on_to_date", "fieldtype": "Currency", "width": 140, }, From 78d7d7148f2443e48b4feb088c70522f62b6040f Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 16 Dec 2024 16:14:02 +0530 Subject: [PATCH 0669/1614] fix: broken CI - always install wkhtmltopdf - remove specific version on mariadb-client (cherry picked from commit eb1e36ca227480d8414b912a88cf440cfe0b7cd3) --- .github/helper/install.sh | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/helper/install.sh b/.github/helper/install.sh index 915a4637999..30389734429 100644 --- a/.github/helper/install.sh +++ b/.github/helper/install.sh @@ -6,7 +6,7 @@ cd ~ || exit sudo apt update sudo apt remove mysql-server mysql-client -sudo apt install libcups2-dev redis-server mariadb-client-10.6 +sudo apt install libcups2-dev redis-server mariadb-client pip install frappe-bench @@ -44,13 +44,9 @@ fi install_whktml() { - if [ "$(lsb_release -rs)" = "22.04" ]; then - wget -O /tmp/wkhtmltox.deb https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox_0.12.6.1-2.jammy_amd64.deb - sudo apt install /tmp/wkhtmltox.deb - else - echo "Please update this script to support wkhtmltopdf for $(lsb_release -ds)" - exit 1 - fi + wget -O /tmp/wkhtmltox.deb https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox_0.12.6.1-2.jammy_amd64.deb + sudo apt install /tmp/wkhtmltox.deb + } install_whktml & wkpid=$! From 158a4803ca2d0645387fc1b1b9040352b2328e9f Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 17 Dec 2024 11:04:40 +0530 Subject: [PATCH 0670/1614] fix: unsupported operand type (backport #44722) (#44723) fix: unsupported operand type (#44722) (cherry picked from commit 95da0913f6016c0f0c23b99712afa88fa87c74af) Co-authored-by: rohitwaghchaure --- .../serial_and_batch_bundle/serial_and_batch_bundle.py | 4 ++-- 1 file changed, 2 insertions(+), 2 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 dc2071b9ee0..30538049e6c 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 @@ -505,9 +505,9 @@ class SerialandBatchBundle(Document): elif (d.incoming_rate == rate) and d.qty and d.stock_value_difference: continue - d.incoming_rate = rate + d.incoming_rate = flt(rate) if d.qty: - d.stock_value_difference = d.qty * d.incoming_rate + d.stock_value_difference = flt(d.qty) * d.incoming_rate if save: d.db_set( From 8940747161ca368e8ebab8f0eae199a70f09c3cf Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 17 Dec 2024 11:04:54 +0530 Subject: [PATCH 0671/1614] fix: delink SABB from cancelled SLEs (backport #44691) (#44719) fix: delink SABB from cancelled SLEs (#44691) (cherry picked from commit 5f539619bc6f6ae713c8b82aba5b580345d47728) Co-authored-by: rohitwaghchaure --- .../pos_invoice_merge_log.py | 36 +++++++++++++++++++ .../serial_and_batch_bundle.py | 2 ++ 2 files changed, 38 insertions(+) diff --git a/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py b/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py index 5bb43b3fa72..b9bf145c728 100644 --- a/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py +++ b/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py @@ -132,6 +132,7 @@ class POSInvoiceMergeLog(Document): self.update_pos_invoices(pos_invoice_docs) self.serial_and_batch_bundle_reference_for_pos_invoice() self.cancel_linked_invoices() + self.delink_serial_and_batch_bundle() def process_merging_into_sales_invoice(self, data): sales_invoice = self.get_new_sales_invoice() @@ -319,6 +320,38 @@ class POSInvoiceMergeLog(Document): for table_name in ["items", "packed_items"]: pos_invoice.set_serial_and_batch_bundle(table_name) + def delink_serial_and_batch_bundle(self): + bundles = self.get_serial_and_batch_bundles() + if not bundles: + return + + sle_table = frappe.qb.DocType("Stock Ledger Entry") + query = ( + frappe.qb.update(sle_table) + .set(sle_table.serial_and_batch_bundle, None) + .where(sle_table.serial_and_batch_bundle.isin(bundles) & sle_table.is_cancelled == 1) + ) + + query.run() + + def get_serial_and_batch_bundles(self): + pos_invoices = [] + for d in self.pos_invoices: + pos_invoices.append(d.pos_invoice) + + if pos_invoices: + return frappe.get_all( + "POS Invoice Item", + filters={ + "docstatus": 1, + "parent": ["in", pos_invoices], + "serial_and_batch_bundle": ["is", "set"], + }, + pluck="serial_and_batch_bundle", + ) + + return [] + def cancel_linked_invoices(self): for si_name in [self.consolidated_invoice, self.consolidated_credit_note]: if not si_name: @@ -503,6 +536,9 @@ def cancel_merge_logs(merge_logs, closing_entry=None): try: for log in merge_logs: merge_log = frappe.get_doc("POS Invoice Merge Log", log) + if merge_log.docstatus == 2: + continue + merge_log.flags.ignore_permissions = True merge_log.cancel() 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 30538049e6c..f96a6760bec 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 @@ -519,6 +519,8 @@ class SerialandBatchBundle(Document): if not self.voucher_no or self.voucher_no != row.parent: values_to_set["voucher_no"] = row.parent + self.db_set("is_cancelled", 0) + if self.voucher_type != parent.doctype: values_to_set["voucher_type"] = parent.doctype From 7665eac277a1128eb686f97d3038fdd5d27c1063 Mon Sep 17 00:00:00 2001 From: rs-rethik Date: Wed, 11 Dec 2024 12:15:56 +0530 Subject: [PATCH 0672/1614] feat: change type link to multiselect (cherry picked from commit 4de180feeea20a2f0a2c9c4ba794f1db55f82ed8) --- .../process_statement_of_accounts.json | 6 ++-- .../process_statement_of_accounts.py | 7 ++-- .../__init__.py | 0 .../process_statement_of_accounts_cc.json | 32 +++++++++++++++++++ .../process_statement_of_accounts_cc.py | 23 +++++++++++++ 5 files changed, 63 insertions(+), 5 deletions(-) create mode 100644 erpnext/accounts/doctype/process_statement_of_accounts_cc/__init__.py create mode 100644 erpnext/accounts/doctype/process_statement_of_accounts_cc/process_statement_of_accounts_cc.json create mode 100644 erpnext/accounts/doctype/process_statement_of_accounts_cc/process_statement_of_accounts_cc.py diff --git a/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.json b/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.json index 763607c22a1..ed9a4d84f53 100644 --- a/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.json +++ b/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.json @@ -244,9 +244,9 @@ }, { "fieldname": "cc_to", - "fieldtype": "Link", + "fieldtype": "Table MultiSelect", "label": "CC To", - "options": "User" + "options": "Process Statement Of Accounts CC" }, { "default": "1", @@ -400,7 +400,7 @@ } ], "links": [], - "modified": "2024-10-18 17:51:39.108481", + "modified": "2024-12-11 12:11:13.543134", "modified_by": "Administrator", "module": "Accounts", "name": "Process Statement Of Accounts", diff --git a/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.py b/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.py index bf1c8c0b66e..6910559b8b4 100644 --- a/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.py +++ b/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.py @@ -31,6 +31,9 @@ class ProcessStatementOfAccounts(Document): if TYPE_CHECKING: from frappe.types import DF + from erpnext.accounts.doctype.process_statement_of_accounts_cc.process_statement_of_accounts_cc import ( + ProcessStatementOfAccountsCC, + ) from erpnext.accounts.doctype.process_statement_of_accounts_customer.process_statement_of_accounts_customer import ( ProcessStatementOfAccountsCustomer, ) @@ -41,7 +44,7 @@ class ProcessStatementOfAccounts(Document): ageing_based_on: DF.Literal["Due Date", "Posting Date"] based_on_payment_terms: DF.Check body: DF.TextEditor | None - cc_to: DF.Link | None + cc_to: DF.TableMultiSelect[ProcessStatementOfAccountsCC] collection_name: DF.DynamicLink | None company: DF.Link cost_center: DF.TableMultiSelect[PSOACostCenter] @@ -324,7 +327,7 @@ def get_recipients_and_cc(customer, doc): cc = [] if doc.cc_to != "": try: - cc = [frappe.get_value("User", doc.cc_to, "email")] + cc = [frappe.get_value("User", user.cc, "email") for user in doc.cc_to] except Exception: pass diff --git a/erpnext/accounts/doctype/process_statement_of_accounts_cc/__init__.py b/erpnext/accounts/doctype/process_statement_of_accounts_cc/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/erpnext/accounts/doctype/process_statement_of_accounts_cc/process_statement_of_accounts_cc.json b/erpnext/accounts/doctype/process_statement_of_accounts_cc/process_statement_of_accounts_cc.json new file mode 100644 index 00000000000..c6103048b50 --- /dev/null +++ b/erpnext/accounts/doctype/process_statement_of_accounts_cc/process_statement_of_accounts_cc.json @@ -0,0 +1,32 @@ +{ + "actions": [], + "allow_rename": 1, + "creation": "2024-12-11 12:10:04.654593", + "doctype": "DocType", + "editable_grid": 1, + "engine": "InnoDB", + "field_order": [ + "cc" + ], + "fields": [ + { + "fieldname": "cc", + "fieldtype": "Link", + "in_list_view": 1, + "label": "CC", + "options": "User" + } + ], + "index_web_pages_for_search": 1, + "istable": 1, + "links": [], + "modified": "2024-12-11 12:10:39.772598", + "modified_by": "Administrator", + "module": "Accounts", + "name": "Process Statement Of Accounts CC", + "owner": "Administrator", + "permissions": [], + "sort_field": "creation", + "sort_order": "DESC", + "states": [] +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/process_statement_of_accounts_cc/process_statement_of_accounts_cc.py b/erpnext/accounts/doctype/process_statement_of_accounts_cc/process_statement_of_accounts_cc.py new file mode 100644 index 00000000000..a500b6c89a7 --- /dev/null +++ b/erpnext/accounts/doctype/process_statement_of_accounts_cc/process_statement_of_accounts_cc.py @@ -0,0 +1,23 @@ +# Copyright (c) 2024, Frappe Technologies Pvt. Ltd. and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + + +class ProcessStatementOfAccountsCC(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + cc: DF.Link | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types + + pass From df9bc33f34c67ee0200be5e29bb99da09dab34ff Mon Sep 17 00:00:00 2001 From: rs-rethik Date: Wed, 11 Dec 2024 12:17:18 +0530 Subject: [PATCH 0673/1614] fix: update cc_to multiselect in process statement of accounts (cherry picked from commit 2a6be127ef399566327cdbbc5305e51543ef7a36) # Conflicts: # erpnext/patches.txt --- erpnext/patches.txt | 5 +++++ .../update_cc_in_process_statement_of_accounts.py | 11 +++++++++++ 2 files changed, 16 insertions(+) create mode 100644 erpnext/patches/v15_0/update_cc_in_process_statement_of_accounts.py diff --git a/erpnext/patches.txt b/erpnext/patches.txt index a916478d4b3..fae3c93e722 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -383,5 +383,10 @@ erpnext.patches.v14_0.update_currency_exchange_settings_for_frankfurter erpnext.patches.v15_0.update_task_assignee_email_field_in_asset_maintenance_log erpnext.patches.v15_0.update_sub_voucher_type_in_gl_entries erpnext.patches.v14_0.update_stock_uom_in_work_order_item +<<<<<<< HEAD erpnext.patches.v15_0.set_is_exchange_gain_loss_in_payment_entry_deductions erpnext.patches.v15_0.enable_allow_existing_serial_no +======= +erpnext.patches.v15_0.enable_allow_existing_serial_no +erpnext.patches.v15_0.update_cc_in_process_statement_of_accounts +>>>>>>> 2a6be127ef (fix: update cc_to multiselect in process statement of accounts) diff --git a/erpnext/patches/v15_0/update_cc_in_process_statement_of_accounts.py b/erpnext/patches/v15_0/update_cc_in_process_statement_of_accounts.py new file mode 100644 index 00000000000..8b9ec0b9d3a --- /dev/null +++ b/erpnext/patches/v15_0/update_cc_in_process_statement_of_accounts.py @@ -0,0 +1,11 @@ +import frappe + + +def execute(): + data = frappe.db.sql( + """SELECT name, cc_to FROM `tabProcess Statement Of Accounts` WHERE cc_to IS NOT NULL""", as_dict=True + ) + for d in data: + doc = frappe.get_doc("Process Statement Of Accounts", d.name) + doc.append("cc_to", {"cc": d.cc_to}) + doc.save() From 082fd27938c4bc5e7fa2eb62dcc81f08cdca173b Mon Sep 17 00:00:00 2001 From: rs-rethik Date: Mon, 16 Dec 2024 11:26:49 +0530 Subject: [PATCH 0674/1614] refactor: convert sql query to query builder (cherry picked from commit 494ac04f8e189d19cfe7ee81bc6f4429ee136f8a) --- .../update_cc_in_process_statement_of_accounts.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/erpnext/patches/v15_0/update_cc_in_process_statement_of_accounts.py b/erpnext/patches/v15_0/update_cc_in_process_statement_of_accounts.py index 8b9ec0b9d3a..016aa8f14ea 100644 --- a/erpnext/patches/v15_0/update_cc_in_process_statement_of_accounts.py +++ b/erpnext/patches/v15_0/update_cc_in_process_statement_of_accounts.py @@ -1,10 +1,16 @@ import frappe +from frappe import qb def execute(): - data = frappe.db.sql( - """SELECT name, cc_to FROM `tabProcess Statement Of Accounts` WHERE cc_to IS NOT NULL""", as_dict=True - ) + process_statement_of_accounts = qb.DocType("Process Statement Of Accounts") + + data = ( + frappe.qb.from_(process_statement_of_accounts) + .select(process_statement_of_accounts.name, process_statement_of_accounts.cc_to) + .where(process_statement_of_accounts.cc_to.isnotnull()) + ).run(as_dict=True) + for d in data: doc = frappe.get_doc("Process Statement Of Accounts", d.name) doc.append("cc_to", {"cc": d.cc_to}) From 5b4eb5ea9aa97b1fc03e4b27a6561e2aab76a24e Mon Sep 17 00:00:00 2001 From: rs-rethik Date: Mon, 16 Dec 2024 11:55:34 +0530 Subject: [PATCH 0675/1614] chore: remove irrelevant import (cherry picked from commit 5401cf964704a4e540f942771882c54a94d6fc08) --- .../v15_0/update_cc_in_process_statement_of_accounts.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/erpnext/patches/v15_0/update_cc_in_process_statement_of_accounts.py b/erpnext/patches/v15_0/update_cc_in_process_statement_of_accounts.py index 016aa8f14ea..75aa8b9faf1 100644 --- a/erpnext/patches/v15_0/update_cc_in_process_statement_of_accounts.py +++ b/erpnext/patches/v15_0/update_cc_in_process_statement_of_accounts.py @@ -1,9 +1,8 @@ import frappe -from frappe import qb def execute(): - process_statement_of_accounts = qb.DocType("Process Statement Of Accounts") + process_statement_of_accounts = frappe.qb.DocType("Process Statement Of Accounts") data = ( frappe.qb.from_(process_statement_of_accounts) From 632a45d82e60ba4179d8f6c9a36e511e97de9193 Mon Sep 17 00:00:00 2001 From: Khushi Rawat <142375893+khushi8112@users.noreply.github.com> Date: Fri, 13 Dec 2024 12:31:38 +0530 Subject: [PATCH 0676/1614] fix: handle zero salvage value case --- erpnext/assets/doctype/asset/asset.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/assets/doctype/asset/asset.py b/erpnext/assets/doctype/asset/asset.py index 05d575ac822..dbef3d096c7 100644 --- a/erpnext/assets/doctype/asset/asset.py +++ b/erpnext/assets/doctype/asset/asset.py @@ -805,6 +805,9 @@ class Asset(AccountsController): return args.get("rate_of_depreciation") if self.flags.increase_in_asset_value_due_to_repair: + if not flt(args.get("expected_value_after_useful_life")): + return args.get("rate_of_depreciation") + value = flt(args.get("expected_value_after_useful_life")) / flt( args.get("value_after_depreciation") ) From f9a904c58423074fed8013a20f130d88f6e2f0d8 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 17 Dec 2024 11:38:37 +0530 Subject: [PATCH 0677/1614] chore: resolve conflict --- erpnext/patches.txt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/erpnext/patches.txt b/erpnext/patches.txt index fae3c93e722..7e03ef9394c 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -383,10 +383,6 @@ erpnext.patches.v14_0.update_currency_exchange_settings_for_frankfurter erpnext.patches.v15_0.update_task_assignee_email_field_in_asset_maintenance_log erpnext.patches.v15_0.update_sub_voucher_type_in_gl_entries erpnext.patches.v14_0.update_stock_uom_in_work_order_item -<<<<<<< HEAD erpnext.patches.v15_0.set_is_exchange_gain_loss_in_payment_entry_deductions erpnext.patches.v15_0.enable_allow_existing_serial_no -======= -erpnext.patches.v15_0.enable_allow_existing_serial_no erpnext.patches.v15_0.update_cc_in_process_statement_of_accounts ->>>>>>> 2a6be127ef (fix: update cc_to multiselect in process statement of accounts) From ed42ed04d262a492291a4720a8af6a32661f993e Mon Sep 17 00:00:00 2001 From: Khushi Rawat <142375893+khushi8112@users.noreply.github.com> Date: Fri, 13 Dec 2024 12:36:30 +0530 Subject: [PATCH 0678/1614] fix: make rate of depreciation mandatory --- erpnext/assets/doctype/asset/asset.py | 6 +++--- .../doctype/asset_finance_book/asset_finance_book.json | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/erpnext/assets/doctype/asset/asset.py b/erpnext/assets/doctype/asset/asset.py index dbef3d096c7..243ad009050 100644 --- a/erpnext/assets/doctype/asset/asset.py +++ b/erpnext/assets/doctype/asset/asset.py @@ -804,10 +804,10 @@ class Asset(AccountsController): ): return args.get("rate_of_depreciation") - if self.flags.increase_in_asset_value_due_to_repair: - if not flt(args.get("expected_value_after_useful_life")): - return args.get("rate_of_depreciation") + if args.get("rate_of_depreciation") and not flt(args.get("expected_value_after_useful_life")): + return args.get("rate_of_depreciation") + if self.flags.increase_in_asset_value_due_to_repair: value = flt(args.get("expected_value_after_useful_life")) / flt( args.get("value_after_depreciation") ) diff --git a/erpnext/assets/doctype/asset_finance_book/asset_finance_book.json b/erpnext/assets/doctype/asset_finance_book/asset_finance_book.json index c269948b742..b86028a7621 100644 --- a/erpnext/assets/doctype/asset_finance_book/asset_finance_book.json +++ b/erpnext/assets/doctype/asset_finance_book/asset_finance_book.json @@ -86,7 +86,8 @@ "description": "In Percentage", "fieldname": "rate_of_depreciation", "fieldtype": "Percent", - "label": "Rate of Depreciation" + "label": "Rate of Depreciation (%)", + "mandatory_depends_on": "eval:doc.depreciation_method == 'Written Down Value'" }, { "fieldname": "salvage_value_percentage", @@ -117,7 +118,7 @@ "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2024-05-21 15:48:20.907250", + "modified": "2024-12-13 12:11:03.743209", "modified_by": "Administrator", "module": "Assets", "name": "Asset Finance Book", From 218e7774238908cc7f26c38243a5322bfe585bee Mon Sep 17 00:00:00 2001 From: Smit Vora Date: Wed, 11 Dec 2024 17:57:47 +0530 Subject: [PATCH 0679/1614] fix: better indicator base amount for Tax Witholding in Journal Entry (cherry picked from commit 56a0a0db18fb16ce4a30a92a0fc271351def3894) --- .../tax_withholding_details/tax_withholding_details.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/report/tax_withholding_details/tax_withholding_details.py b/erpnext/accounts/report/tax_withholding_details/tax_withholding_details.py index 0c18dac7768..b969627fdd6 100644 --- a/erpnext/accounts/report/tax_withholding_details/tax_withholding_details.py +++ b/erpnext/accounts/report/tax_withholding_details/tax_withholding_details.py @@ -72,8 +72,8 @@ def get_result(filters, tds_docs, tds_accounts, tax_category_map, journal_entry_ if net_total_map.get((voucher_type, name)): if voucher_type == "Journal Entry": # back calcalute total amount from rate and tax_amount - if rate: - total_amount = grand_total = base_total = tax_amount / (rate / 100) + base_total = min(tax_amount / (rate / 100), net_total_map.get((voucher_type, name))[0]) + total_amount = grand_total = base_total elif voucher_type == "Purchase Invoice": total_amount, grand_total, base_total, bill_no, bill_date = net_total_map.get( (voucher_type, name) @@ -405,7 +405,7 @@ def get_doc_info(vouchers, doctype, tax_category_map, net_total_map=None): "paid_amount_after_tax", "base_paid_amount", ], - "Journal Entry": ["total_amount"], + "Journal Entry": ["total_debit"], } entries = frappe.get_all( @@ -427,7 +427,7 @@ def get_doc_info(vouchers, doctype, tax_category_map, net_total_map=None): elif doctype == "Payment Entry": value = [entry.paid_amount, entry.paid_amount_after_tax, entry.base_paid_amount] else: - value = [entry.total_amount] * 3 + value = [entry.total_debit] * 3 net_total_map[(doctype, entry.name)] = value From 8aec13115c28c5e28679f69ad2cb9ceae3d09cd6 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 17 Dec 2024 12:29:42 +0530 Subject: [PATCH 0680/1614] fix: pos invoice return reference missing (backport #44720) (#44729) fix: pos invoice return reference missing (#44720) (cherry picked from commit 852596dbe60664f07ad2862ce445ba0729153a73) Co-authored-by: rohitwaghchaure --- .../pos_invoice_merge_log.py | 25 ++++++++++++++----- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py b/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py index b9bf145c728..761ed8d804e 100644 --- a/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py +++ b/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py @@ -117,12 +117,12 @@ class POSInvoiceMergeLog(Document): sales = [d for d in pos_invoice_docs if d.get("is_return") == 0] sales_invoice, credit_note = "", "" - if returns: - credit_note = self.process_merging_into_credit_note(returns) - if sales: sales_invoice = self.process_merging_into_sales_invoice(sales) + if returns: + credit_note = self.process_merging_into_credit_note(returns, sales_invoice) + self.save() # save consolidated_sales_invoice & consolidated_credit_note ref in merge log self.update_pos_invoices(pos_invoice_docs, sales_invoice, credit_note) @@ -140,8 +140,13 @@ class POSInvoiceMergeLog(Document): sales_invoice.is_consolidated = 1 sales_invoice.set_posting_time = 1 - sales_invoice.posting_date = getdate(self.posting_date) - sales_invoice.posting_time = get_time(self.posting_time) + + if not sales_invoice.posting_date: + sales_invoice.posting_date = getdate(self.posting_date) + + if not sales_invoice.posting_time: + sales_invoice.posting_time = get_time(self.posting_time) + sales_invoice.save() sales_invoice.submit() @@ -149,12 +154,14 @@ class POSInvoiceMergeLog(Document): return sales_invoice.name - def process_merging_into_credit_note(self, data): + def process_merging_into_credit_note(self, data, sales_invoice): credit_note = self.get_new_sales_invoice() credit_note.is_return = 1 credit_note = self.merge_pos_invoice_into(credit_note, data) + credit_note.return_against = sales_invoice + credit_note.is_consolidated = 1 credit_note.set_posting_time = 1 credit_note.posting_date = getdate(self.posting_date) @@ -181,6 +188,10 @@ class POSInvoiceMergeLog(Document): for doc in data: map_doc(doc, invoice, table_map={"doctype": invoice.doctype}) + if doc.get("posting_date"): + invoice.posting_date = getdate(doc.posting_date) + invoice.posting_time = get_time(doc.posting_time) + if doc.redeem_loyalty_points: invoice.loyalty_redemption_account = doc.loyalty_redemption_account invoice.loyalty_redemption_cost_center = doc.loyalty_redemption_cost_center @@ -298,6 +309,8 @@ class POSInvoiceMergeLog(Document): sales_invoice = frappe.new_doc("Sales Invoice") sales_invoice.customer = self.customer sales_invoice.is_pos = 1 + sales_invoice.posting_date = None + sales_invoice.posting_time = None return sales_invoice From 8ba7424996136209c32b60593219e33fa330e8f7 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 17 Dec 2024 14:48:18 +0530 Subject: [PATCH 0681/1614] fix: purchase return entry issue (backport #44721) (#44737) fix: purchase return entry issue (#44721) (cherry picked from commit 1f5d7072e7644aead90743e8316097bf1d0d4afb) Co-authored-by: rohitwaghchaure --- .../controllers/sales_and_purchase_return.py | 26 +++++++++++-------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/erpnext/controllers/sales_and_purchase_return.py b/erpnext/controllers/sales_and_purchase_return.py index 696d404d16d..5c8f5a6fbd7 100644 --- a/erpnext/controllers/sales_and_purchase_return.py +++ b/erpnext/controllers/sales_and_purchase_return.py @@ -76,16 +76,13 @@ def validate_return_against(doc): def validate_returned_items(doc): valid_items = frappe._dict() - select_fields = "item_code, qty, stock_qty, rate, parenttype, conversion_factor" + select_fields = "item_code, qty, stock_qty, rate, parenttype, conversion_factor, name" if doc.doctype != "Purchase Invoice": select_fields += ",serial_no, batch_no" if doc.doctype in ["Purchase Invoice", "Purchase Receipt", "Subcontracting Receipt"]: select_fields += ",rejected_qty, received_qty" - if doc.doctype in ["Purchase Receipt", "Purchase Invoice"]: - select_fields += ",name" - for d in frappe.db.sql( f"""select {select_fields} from `tab{doc.doctype} Item` where parent = %s""", doc.return_against, @@ -113,11 +110,13 @@ def validate_returned_items(doc): for d in doc.get("items"): key = d.item_code raise_exception = False - if doc.doctype in ["Purchase Receipt", "Purchase Invoice"]: + if doc.doctype in ["Purchase Receipt", "Purchase Invoice", "Sales Invoice"]: field = frappe.scrub(doc.doctype) + "_item" if d.get(field): key = (d.item_code, d.get(field)) raise_exception = True + elif doc.doctype == "Delivery Note": + key = (d.item_code, d.get("dn_detail")) if d.item_code and (flt(d.qty) < 0 or flt(d.get("received_qty")) < 0): if key not in valid_items: @@ -129,7 +128,7 @@ def validate_returned_items(doc): ) else: ref = valid_items.get(key, frappe._dict()) - validate_quantity(doc, d, ref, valid_items, already_returned_items) + validate_quantity(doc, key, d, ref, valid_items, already_returned_items) if ( ref.rate @@ -159,7 +158,7 @@ def validate_returned_items(doc): frappe.throw(_("Atleast one item should be entered with negative quantity in return document")) -def validate_quantity(doc, args, ref, valid_items, already_returned_items): +def validate_quantity(doc, key, args, ref, valid_items, already_returned_items): fields = ["stock_qty"] if doc.doctype in ["Purchase Receipt", "Purchase Invoice", "Subcontracting Receipt"]: if not args.get("return_qty_from_rejected_warehouse"): @@ -167,7 +166,7 @@ def validate_quantity(doc, args, ref, valid_items, already_returned_items): else: fields.extend(["received_qty"]) - already_returned_data = already_returned_items.get(args.item_code) or {} + already_returned_data = already_returned_items.get(key) or {} company_currency = erpnext.get_company_currency(doc.company) stock_qty_precision = get_field_precision( @@ -253,15 +252,20 @@ def get_already_returned_items(doc): column += """, sum(abs(child.rejected_qty) * child.conversion_factor) as rejected_qty, sum(abs(child.received_qty) * child.conversion_factor) as received_qty""" + field = ( + frappe.scrub(doc.doctype) + "_item" + if doc.doctype in ["Purchase Invoice", "Purchase Receipt", "Sales Invoice"] + else "dn_detail" + ) data = frappe.db.sql( f""" - select {column} + select {column}, {field} from `tab{doc.doctype} Item` child, `tab{doc.doctype}` par where child.parent = par.name and par.docstatus = 1 and par.is_return = 1 and par.return_against = %s - group by item_code + group by item_code, {field} """, doc.return_against, as_dict=1, @@ -271,7 +275,7 @@ def get_already_returned_items(doc): for d in data: items.setdefault( - d.item_code, + (d.item_code, d.get(field)), frappe._dict( { "qty": d.get("qty"), From a8f739370610c21e8643526eb14c8055dbe0563a Mon Sep 17 00:00:00 2001 From: venkat102 Date: Fri, 13 Dec 2024 11:22:17 +0530 Subject: [PATCH 0682/1614] fix: set company bank account if default account not set in mode of payment (cherry picked from commit 91c7e3d5f3168736f40973816594a57e36d0f625) --- .../doctype/payment_entry/payment_entry.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.js b/erpnext/accounts/doctype/payment_entry/payment_entry.js index f2d11ba9ff3..8fd5f00b583 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.js +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.js @@ -1328,6 +1328,24 @@ frappe.ui.form.on("Payment Entry", { if (r.message) { if (!frm.doc.mode_of_payment) { frm.set_value(field, r.message.account); + } else { + frappe.call({ + method: "frappe.client.get_value", + args: { + doctype: "Mode of Payment Account", + filters: { + parent: frm.doc.mode_of_payment, + company: frm.doc.company, + }, + fieldname: "default_account", + parent: "Mode of Payment", + }, + callback: function (res) { + if (!res.message.default_account) { + frm.set_value(field, r.message.account); + } + }, + }); } frm.set_value("bank", r.message.bank); frm.set_value("bank_account_no", r.message.bank_account_no); From db3a87c837bbccab59e3cc30e132aaa5b72bc66b Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 17 Dec 2024 17:43:31 +0530 Subject: [PATCH 0683/1614] fix: allow all dispatch address for drop ship invoice --- erpnext/public/js/queries.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/erpnext/public/js/queries.js b/erpnext/public/js/queries.js index fd5b7603844..46958092199 100644 --- a/erpnext/public/js/queries.js +++ b/erpnext/public/js/queries.js @@ -99,9 +99,12 @@ $.extend(erpnext.queries, { }, dispatch_address_query: function (doc) { + var filters = { link_doctype: "Company", link_name: doc.company || "" }; + var is_drop_ship = doc.items.some((item) => item.delivered_by_supplier); + if (is_drop_ship) filters = {}; return { query: "frappe.contacts.doctype.address.address.address_query", - filters: { link_doctype: "Company", link_name: doc.company || "" }, + filters: filters, }; }, From 83aeb2e4754700467508533a7d4d736dbdfe489a Mon Sep 17 00:00:00 2001 From: ljain112 Date: Fri, 13 Dec 2024 13:46:15 +0530 Subject: [PATCH 0684/1614] fix: User permissions in financial statements (cherry picked from commit a626372d660a061de4594f92efaeac0a45d4bd57) --- erpnext/accounts/report/financial_statements.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/report/financial_statements.py b/erpnext/accounts/report/financial_statements.py index 73e49983fb2..a12b217d1be 100644 --- a/erpnext/accounts/report/financial_statements.py +++ b/erpnext/accounts/report/financial_statements.py @@ -527,7 +527,16 @@ def get_accounting_entries( account_filter_query = get_account_filter_query(root_lft, root_rgt, root_type, gl_entry) query = query.where(ExistsCriterion(account_filter_query)) - entries = query.run(as_dict=True) + query = query.get_sql() + + from frappe.desk.reportview import build_match_conditions + + match_conditions = build_match_conditions(doctype) + + if match_conditions: + query += "and" + match_conditions + + entries = frappe.db.sql(query, as_dict=True) return entries From 40a8ed85711f86e95f8d5eca23ca6d3a77c74084 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Tue, 17 Dec 2024 18:49:38 +0530 Subject: [PATCH 0685/1614] fix: using query.walk() for escaping (cherry picked from commit 5ea131c763633e1c93abddcbcd551d6d10df7336) --- erpnext/accounts/report/financial_statements.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/report/financial_statements.py b/erpnext/accounts/report/financial_statements.py index a12b217d1be..918bafa169a 100644 --- a/erpnext/accounts/report/financial_statements.py +++ b/erpnext/accounts/report/financial_statements.py @@ -527,8 +527,6 @@ def get_accounting_entries( account_filter_query = get_account_filter_query(root_lft, root_rgt, root_type, gl_entry) query = query.where(ExistsCriterion(account_filter_query)) - query = query.get_sql() - from frappe.desk.reportview import build_match_conditions match_conditions = build_match_conditions(doctype) @@ -536,9 +534,9 @@ def get_accounting_entries( if match_conditions: query += "and" + match_conditions - entries = frappe.db.sql(query, as_dict=True) + query, params = query.walk() - return entries + return frappe.db.sql(query, params, as_dict=True) def get_account_filter_query(root_lft, root_rgt, root_type, gl_entry): From f1a5000872d0a3dc79f271afbe7a4d045282635f Mon Sep 17 00:00:00 2001 From: venkat102 Date: Sun, 15 Dec 2024 22:55:24 +0530 Subject: [PATCH 0686/1614] fix: update discount when pricing rule is changed (cherry picked from commit 8338d1d5b45dc20049130d96546fad002a64ba99) --- erpnext/accounts/doctype/pricing_rule/pricing_rule.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py index 73cb2483811..385cc1a685e 100644 --- a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py +++ b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py @@ -415,6 +415,8 @@ def get_pricing_rule_for_item(args, doc=None, for_validate=False): "parent": args.parent, "parenttype": args.parenttype, "child_docname": args.get("child_docname"), + "discount_percentage": 0.0, + "discount_amount": 0, } ) From 3ac801c884f93b1008adc126e31f73d6820575b1 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Wed, 18 Dec 2024 10:41:24 +0530 Subject: [PATCH 0687/1614] fix: duplicate Use Multi-Level BOM checkbox (#44757) --- erpnext/manufacturing/doctype/bom/bom.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/erpnext/manufacturing/doctype/bom/bom.js b/erpnext/manufacturing/doctype/bom/bom.js index fe498ca32f9..4b52859cabd 100644 --- a/erpnext/manufacturing/doctype/bom/bom.js +++ b/erpnext/manufacturing/doctype/bom/bom.js @@ -255,15 +255,6 @@ frappe.ui.form.on("BOM", { }); } - if (!skip_qty_field) { - fields.push({ - fieldtype: "Check", - label: __("Use Multi-Level BOM"), - fieldname: "use_multi_level_bom", - default: 1, - }); - } - if (!skip_qty_field) { fields.push({ fieldtype: "Float", From 375b48699f12e5a8e70f16394eff51386d38abf1 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Wed, 18 Dec 2024 05:32:46 +0000 Subject: [PATCH 0688/1614] chore(release): Bumped to Version 15.46.0 # [15.46.0](https://github.com/frappe/erpnext/compare/v15.45.5...v15.46.0) (2024-12-18) ### Bug Fixes * add doc.status to translation from POS ([0ba6e60](https://github.com/frappe/erpnext/commit/0ba6e60608b2f00d3ab68b6c837994f17e7df8d0)) * allow all dispatch address for drop ship invoice ([db3a87c](https://github.com/frappe/erpnext/commit/db3a87c837bbccab59e3cc30e132aaa5b72bc66b)) * broken CI ([78d7d71](https://github.com/frappe/erpnext/commit/78d7d7148f2443e48b4feb088c70522f62b6040f)) * delink SABB from cancelled SLEs (backport [#44691](https://github.com/frappe/erpnext/issues/44691)) ([#44719](https://github.com/frappe/erpnext/issues/44719)) ([8940747](https://github.com/frappe/erpnext/commit/8940747161ca368e8ebab8f0eae199a70f09c3cf)) * duplicate Use Multi-Level BOM checkbox ([#44757](https://github.com/frappe/erpnext/issues/44757)) ([3ac801c](https://github.com/frappe/erpnext/commit/3ac801c884f93b1008adc126e31f73d6820575b1)) * handle zero salvage value case ([632a45d](https://github.com/frappe/erpnext/commit/632a45d82e60ba4179d8f6c9a36e511e97de9193)) * make rate of depreciation mandatory ([ed42ed0](https://github.com/frappe/erpnext/commit/ed42ed04d262a492291a4720a8af6a32661f993e)) * pos invoice return reference missing (backport [#44720](https://github.com/frappe/erpnext/issues/44720)) ([#44729](https://github.com/frappe/erpnext/issues/44729)) ([8aec131](https://github.com/frappe/erpnext/commit/8aec13115c28c5e28679f69ad2cb9ceae3d09cd6)) * purchase return entry issue (backport [#44721](https://github.com/frappe/erpnext/issues/44721)) ([#44737](https://github.com/frappe/erpnext/issues/44737)) ([8ba7424](https://github.com/frappe/erpnext/commit/8ba7424996136209c32b60593219e33fa330e8f7)) * remove invalid filter in Account Receivable report ([fdfbb57](https://github.com/frappe/erpnext/commit/fdfbb577794fa6af0d3b148555d4d518632f72b9)) * set company bank account if default account not set in mode of payment ([a8f7393](https://github.com/frappe/erpnext/commit/a8f739370610c21e8643526eb14c8055dbe0563a)) * switched asset terminology from cost to value ([47c7356](https://github.com/frappe/erpnext/commit/47c7356b38447ec70391cb329a972deedbfee0bf)) * unsupported operand type (backport [#44722](https://github.com/frappe/erpnext/issues/44722)) ([#44723](https://github.com/frappe/erpnext/issues/44723)) ([158a480](https://github.com/frappe/erpnext/commit/158a4803ca2d0645387fc1b1b9040352b2328e9f)) * update cc_to multiselect in process statement of accounts ([df9bc33](https://github.com/frappe/erpnext/commit/df9bc33f34c67ee0200be5e29bb99da09dab34ff)) * update discount when pricing rule is changed ([f1a5000](https://github.com/frappe/erpnext/commit/f1a5000872d0a3dc79f271afbe7a4d045282635f)) * User permissions in financial statements ([83aeb2e](https://github.com/frappe/erpnext/commit/83aeb2e4754700467508533a7d4d736dbdfe489a)) * using query.walk() for escaping ([40a8ed8](https://github.com/frappe/erpnext/commit/40a8ed85711f86e95f8d5eca23ca6d3a77c74084)) * Wrong allocated_amount for sales_team in gross_profit report ([#42989](https://github.com/frappe/erpnext/issues/42989)) ([328b9e7](https://github.com/frappe/erpnext/commit/328b9e7d9e59b1f7e188d7ad211158806022372d)) ### Features * change type link to multiselect ([7665eac](https://github.com/frappe/erpnext/commit/7665eac277a1128eb686f97d3038fdd5d27c1063)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 679554abb55..ba7c7f49afb 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.45.5" +__version__ = "15.46.0" def get_default_company(user=None): From 75aee42635f87c6a608b43ca7c11d56071965f07 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Wed, 18 Dec 2024 10:54:21 +0530 Subject: [PATCH 0689/1614] fix: use utility method to generate url (cherry picked from commit b970eb8b1507813b5c13bce6be4a9a10eb1769db) --- .../doctype/plaid_settings/plaid_settings.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.js b/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.js index fc3bf804245..3c72f2cbab5 100644 --- a/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.js +++ b/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.js @@ -25,7 +25,12 @@ frappe.ui.form.on("Plaid Settings", { method: "erpnext.erpnext_integrations.doctype.plaid_settings.plaid_settings.enqueue_synchronization", freeze: true, callback: () => { - let bank_transaction_link = 'Bank Transaction'; + let bank_transaction_link = frappe.utils.get_form_link( + "Bank Transaction", + "", + true, + "Bank Transaction" + ); frappe.msgprint({ title: __("Sync Started"), From 8eb8cc5d3cd6cf530c4b20674d19e1b36a39ce6c Mon Sep 17 00:00:00 2001 From: ljain112 Date: Wed, 18 Dec 2024 13:47:37 +0530 Subject: [PATCH 0690/1614] fix: 'str' object has no attribute 'get_sql' (cherry picked from commit 9a43acb65c3930cfd552d25e6aa3f3909bb4adf9) --- erpnext/accounts/report/financial_statements.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/erpnext/accounts/report/financial_statements.py b/erpnext/accounts/report/financial_statements.py index 918bafa169a..c653ae1b38f 100644 --- a/erpnext/accounts/report/financial_statements.py +++ b/erpnext/accounts/report/financial_statements.py @@ -529,13 +529,12 @@ def get_accounting_entries( from frappe.desk.reportview import build_match_conditions + query, params = query.walk() match_conditions = build_match_conditions(doctype) if match_conditions: query += "and" + match_conditions - query, params = query.walk() - return frappe.db.sql(query, params, as_dict=True) From 8b810f5fb8f451ec6f3c29dd2070785750a643d5 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Wed, 18 Dec 2024 13:47:37 +0530 Subject: [PATCH 0691/1614] fix: 'str' object has no attribute 'get_sql' (cherry picked from commit 9a43acb65c3930cfd552d25e6aa3f3909bb4adf9) --- erpnext/accounts/report/financial_statements.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/erpnext/accounts/report/financial_statements.py b/erpnext/accounts/report/financial_statements.py index 918bafa169a..c653ae1b38f 100644 --- a/erpnext/accounts/report/financial_statements.py +++ b/erpnext/accounts/report/financial_statements.py @@ -529,13 +529,12 @@ def get_accounting_entries( from frappe.desk.reportview import build_match_conditions + query, params = query.walk() match_conditions = build_match_conditions(doctype) if match_conditions: query += "and" + match_conditions - query, params = query.walk() - return frappe.db.sql(query, params, as_dict=True) From 9aed4289397f33b8c6986aba7b277815fc625930 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Wed, 18 Dec 2024 09:10:34 +0000 Subject: [PATCH 0692/1614] chore(release): Bumped to Version 15.46.1 ## [15.46.1](https://github.com/frappe/erpnext/compare/v15.46.0...v15.46.1) (2024-12-18) ### Bug Fixes * 'str' object has no attribute 'get_sql' ([8eb8cc5](https://github.com/frappe/erpnext/commit/8eb8cc5d3cd6cf530c4b20674d19e1b36a39ce6c)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index ba7c7f49afb..e81409cf049 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.46.0" +__version__ = "15.46.1" def get_default_company(user=None): From 0fd7792f49f97b45d620098e0faa433a3ea904f1 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 18 Dec 2024 17:28:22 +0530 Subject: [PATCH 0693/1614] fix: added docs.frappe.io in documentation_url (#44776) (cherry picked from commit febdf4c61e0a2b748aa11c23c8e83dcfc6089599) --- .github/helper/documentation.py | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/helper/documentation.py b/.github/helper/documentation.py index 83346045f89..d07c880684e 100644 --- a/.github/helper/documentation.py +++ b/.github/helper/documentation.py @@ -10,6 +10,7 @@ WEBSITE_REPOS = [ DOCUMENTATION_DOMAINS = [ "docs.erpnext.com", + "docs.frappe.io", "frappeframework.com", ] From 20324224d37e1554fcb958ee79b94e5257ac93c5 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 18 Dec 2024 20:38:56 +0530 Subject: [PATCH 0694/1614] fix: POS Closing entry issue (backport #44772) (#44781) fix: POS Closing entry issue (#44772) (cherry picked from commit 779dd2d7984fa091094da59a4fc310efccb22e81) Co-authored-by: rohitwaghchaure --- .../pos_invoice_merge_log.py | 27 ++++++++++++++----- 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py b/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py index 761ed8d804e..18136a033b0 100644 --- a/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py +++ b/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py @@ -117,11 +117,13 @@ class POSInvoiceMergeLog(Document): sales = [d for d in pos_invoice_docs if d.get("is_return") == 0] sales_invoice, credit_note = "", "" + sales_invoice_doc = None if sales: - sales_invoice = self.process_merging_into_sales_invoice(sales) + sales_invoice_doc = self.process_merging_into_sales_invoice(sales) + sales_invoice = sales_invoice_doc.name if returns: - credit_note = self.process_merging_into_credit_note(returns, sales_invoice) + credit_note = self.process_merging_into_credit_note(returns, sales_invoice_doc) self.save() # save consolidated_sales_invoice & consolidated_credit_note ref in merge log self.update_pos_invoices(pos_invoice_docs, sales_invoice, credit_note) @@ -152,15 +154,23 @@ class POSInvoiceMergeLog(Document): self.consolidated_invoice = sales_invoice.name - return sales_invoice.name + return sales_invoice - def process_merging_into_credit_note(self, data, sales_invoice): + def process_merging_into_credit_note(self, data, sales_invoice_doc=None): credit_note = self.get_new_sales_invoice() credit_note.is_return = 1 credit_note = self.merge_pos_invoice_into(credit_note, data) + referenes = {} - credit_note.return_against = sales_invoice + if sales_invoice_doc: + credit_note.return_against = sales_invoice_doc.name + + for d in sales_invoice_doc.items: + referenes[d.item_code] = d.name + + for d in credit_note.items: + d.sales_invoice_item = referenes.get(d.item_code) credit_note.is_consolidated = 1 credit_note.set_posting_time = 1 @@ -366,7 +376,12 @@ class POSInvoiceMergeLog(Document): return [] def cancel_linked_invoices(self): - for si_name in [self.consolidated_invoice, self.consolidated_credit_note]: + invoices = [self.consolidated_invoice, self.consolidated_credit_note] + if not invoices: + return + + invoices.reverse() + for si_name in invoices: if not si_name: continue si = frappe.get_doc("Sales Invoice", si_name) From b706a8274f489f1d0b9ef160d771ecd38abadaf8 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 19 Dec 2024 13:31:28 +0530 Subject: [PATCH 0695/1614] perf: SABB (backport #44764) (#44789) perf: SABB (#44764) (cherry picked from commit 90baa38f643811d2edd3b26b8cb81ae62ad158c5) Co-authored-by: rohitwaghchaure --- erpnext/controllers/stock_controller.py | 5 +++- .../serial_and_batch_bundle.py | 12 ++++----- erpnext/stock/serial_batch_bundle.py | 16 +++--------- erpnext/stock/stock_ledger.py | 25 +++++++++++-------- 4 files changed, 29 insertions(+), 29 deletions(-) diff --git a/erpnext/controllers/stock_controller.py b/erpnext/controllers/stock_controller.py index 8f0a5d5edf5..c1cb83657da 100644 --- a/erpnext/controllers/stock_controller.py +++ b/erpnext/controllers/stock_controller.py @@ -1758,6 +1758,9 @@ def make_bundle_for_material_transfer(**kwargs): bundle_doc.calculate_qty_and_amount() bundle_doc.flags.ignore_permissions = True bundle_doc.flags.ignore_validate = True - bundle_doc.save(ignore_permissions=True) + if kwargs.do_not_submit: + bundle_doc.save(ignore_permissions=True) + else: + bundle_doc.submit() return bundle_doc.name 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 f96a6760bec..6ff0317dce6 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 @@ -90,12 +90,10 @@ class SerialandBatchBundle(Document): self.validate_duplicate_serial_and_batch_no() self.validate_voucher_no() - if self.docstatus == 0: - self.allow_existing_serial_nos() - if self.type_of_transaction == "Maintenance": return + self.allow_existing_serial_nos() if not self.flags.ignore_validate_serial_batch or frappe.flags.in_test: self.validate_serial_nos_duplicate() self.check_future_entries_exists() @@ -2101,6 +2099,8 @@ def update_available_batches(available_batches, *reserved_batches) -> None: def get_available_batches(kwargs): + from erpnext.stock.utils import get_combine_datetime + stock_ledger_entry = frappe.qb.DocType("Stock Ledger Entry") batch_ledger = frappe.qb.DocType("Serial and Batch Entry") batch_table = frappe.qb.DocType("Batch") @@ -2128,9 +2128,9 @@ def get_available_batches(kwargs): if kwargs.get("posting_time") is None: kwargs.posting_time = nowtime() - timestamp_condition = CombineDatetime( - stock_ledger_entry.posting_date, stock_ledger_entry.posting_time - ) <= CombineDatetime(kwargs.posting_date, kwargs.posting_time) + timestamp_condition = stock_ledger_entry.posting_datetime <= get_combine_datetime( + kwargs.posting_date, kwargs.posting_time + ) query = query.where(timestamp_condition) diff --git a/erpnext/stock/serial_batch_bundle.py b/erpnext/stock/serial_batch_bundle.py index 05b3536c57b..732a14c2fb5 100644 --- a/erpnext/stock/serial_batch_bundle.py +++ b/erpnext/stock/serial_batch_bundle.py @@ -725,15 +725,6 @@ class BatchNoValuation(DeprecatedBatchNoValuation): stock_value_change = self.batch_avg_rate[batch_no] * ledger.qty self.stock_value_change += stock_value_change - frappe.db.set_value( - "Serial and Batch Entry", - ledger.name, - { - "stock_value_difference": stock_value_change, - "incoming_rate": self.batch_avg_rate[batch_no], - }, - ) - def calculate_valuation_rate(self): if not hasattr(self, "wh_data"): return @@ -947,12 +938,13 @@ class SerialBatchCreation: if self.get("make_bundle_from_sle") and self.type_of_transaction == "Inward": doc.flags.ignore_validate_serial_batch = True - doc.save() - self.validate_qty(doc) - if not hasattr(self, "do_not_submit") or not self.do_not_submit: doc.flags.ignore_voucher_validation = True doc.submit() + else: + doc.save() + + self.validate_qty(doc) return doc diff --git a/erpnext/stock/stock_ledger.py b/erpnext/stock/stock_ledger.py index 26e7af150b9..1e1b2411569 100644 --- a/erpnext/stock/stock_ledger.py +++ b/erpnext/stock/stock_ledger.py @@ -988,18 +988,23 @@ class update_entries_after: if not frappe.db.exists("Serial and Batch Bundle", sle.serial_and_batch_bundle): return - doc = frappe.get_cached_doc("Serial and Batch Bundle", sle.serial_and_batch_bundle) - - doc.set_incoming_rate(save=True, allow_negative_stock=self.allow_negative_stock) - doc.calculate_qty_and_amount(save=True) + if self.args.get("sle_id") and sle.actual_qty < 0: + doc = frappe.db.get_value( + "Serial and Batch Bundle", + sle.serial_and_batch_bundle, + ["total_amount", "total_qty"], + as_dict=1, + ) + else: + doc = frappe.get_doc("Serial and Batch Bundle", sle.serial_and_batch_bundle) + doc.set_incoming_rate(save=True, allow_negative_stock=self.allow_negative_stock) + doc.calculate_qty_and_amount(save=True) self.wh_data.stock_value = round_off_if_near_zero(self.wh_data.stock_value + doc.total_amount) - - precision = doc.precision("total_qty") - self.wh_data.qty_after_transaction += flt(doc.total_qty, precision) - if flt(self.wh_data.qty_after_transaction, precision): - self.wh_data.valuation_rate = flt(self.wh_data.stock_value, precision) / flt( - self.wh_data.qty_after_transaction, precision + self.wh_data.qty_after_transaction += flt(doc.total_qty, self.flt_precision) + if flt(self.wh_data.qty_after_transaction, self.flt_precision): + self.wh_data.valuation_rate = flt(self.wh_data.stock_value, self.flt_precision) / flt( + self.wh_data.qty_after_transaction, self.flt_precision ) def update_valuation_rate_in_serial_and_batch_bundle(self, sle, valuation_rate): From cdeec8d24c29cb4de3159234a6e627d2f9e7593a Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 20 Dec 2024 09:35:51 +0530 Subject: [PATCH 0696/1614] fix: closing stock balance permissions (backport #44791) (#44793) * fix: closing stock balance permissions (#44791) (cherry picked from commit 3662a6a41d2e1e4631c964dffa4d215542a38af1) # Conflicts: # erpnext/stock/doctype/closing_stock_balance/closing_stock_balance.json * chore: fix conflicts --------- Co-authored-by: rohitwaghchaure --- .../closing_stock_balance.json | 34 +++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/erpnext/stock/doctype/closing_stock_balance/closing_stock_balance.json b/erpnext/stock/doctype/closing_stock_balance/closing_stock_balance.json index acb96e7a2f5..c1e5878a439 100644 --- a/erpnext/stock/doctype/closing_stock_balance/closing_stock_balance.json +++ b/erpnext/stock/doctype/closing_stock_balance/closing_stock_balance.json @@ -113,7 +113,7 @@ "index_web_pages_for_search": 1, "is_submittable": 1, "links": [], - "modified": "2023-05-18 11:46:04.448220", + "modified": "2024-12-19 13:48:46.618066", "modified_by": "Administrator", "module": "Stock", "name": "Closing Stock Balance", @@ -121,6 +121,7 @@ "owner": "Administrator", "permissions": [ { + "cancel": 1, "create": 1, "delete": 1, "email": 1, @@ -130,10 +131,39 @@ "report": 1, "role": "System Manager", "share": 1, + "submit": 1, + "write": 1 + }, + { + "cancel": 1, + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Stock Manager", + "share": 1, + "submit": 1, + "write": 1 + }, + { + "cancel": 1, + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Stock User", + "share": 1, + "submit": 1, "write": 1 } ], "sort_field": "modified", "sort_order": "DESC", "states": [] -} \ No newline at end of file +} From db9a319104f2b1988a99e6f45bf555e1dcd79ca1 Mon Sep 17 00:00:00 2001 From: Smit Vora Date: Fri, 20 Dec 2024 11:02:33 +0530 Subject: [PATCH 0697/1614] fix: typerror on TDS payable monthly report (backport #37707) --- .../report/tax_withholding_details/tax_withholding_details.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/report/tax_withholding_details/tax_withholding_details.py b/erpnext/accounts/report/tax_withholding_details/tax_withholding_details.py index b969627fdd6..d6e0af0b5da 100644 --- a/erpnext/accounts/report/tax_withholding_details/tax_withholding_details.py +++ b/erpnext/accounts/report/tax_withholding_details/tax_withholding_details.py @@ -70,7 +70,7 @@ def get_result(filters, tds_docs, tds_accounts, tax_category_map, journal_entry_ rate = tax_rate_map.get(tax_withholding_category) if net_total_map.get((voucher_type, name)): - if voucher_type == "Journal Entry": + if voucher_type == "Journal Entry" and tax_amount and rate: # back calcalute total amount from rate and tax_amount base_total = min(tax_amount / (rate / 100), net_total_map.get((voucher_type, name))[0]) total_amount = grand_total = base_total From 98cc79d9420b63773a1bf04db702d31a162a968c Mon Sep 17 00:00:00 2001 From: mahsem <137205921+mahsem@users.noreply.github.com> Date: Wed, 11 Dec 2024 16:32:04 +0100 Subject: [PATCH 0698/1614] feat: swedish COA (cherry picked from commit 8a5f7ec4d7079045f8af1ef8fcfffe10f473220d) --- ...ontoplan_BAS_2024_with_account_number.json | 6300 +++++++++++++++++ 1 file changed, 6300 insertions(+) create mode 100644 erpnext/accounts/doctype/account/chart_of_accounts/verified/se_kontoplan_BAS_2024_with_account_number.json diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/se_kontoplan_BAS_2024_with_account_number.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/se_kontoplan_BAS_2024_with_account_number.json new file mode 100644 index 00000000000..6411c04aad6 --- /dev/null +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/se_kontoplan_BAS_2024_with_account_number.json @@ -0,0 +1,6300 @@ +{ + "country_code": "se", + "name": "BAS 2024 med Nummer", + "tree": { + "1 Tillgångar": { + "root_type": "Asset", + "account_type": "Fixed Asset", + "is_group": 1, + "10 Immateriella anläggningstillgångar": { + "is_group": 1, + "101 Utvecklingsutgifter": { + "is_group": 1, + "Utvecklingsutgifter": { + "account_number": "1010" + }, + "Balanserade utgifter för forskning och utveckling": { + "account_number": "1011" + }, + "Balanserade utgifter för programvaror": { + "account_number": "1012" + }, + "Ackumulerade nedskrivningar på balanserade utgifter": { + "account_number": "1018", + "account_type": "Accumulated Depreciation" + }, + "Ackumulerade avskrivningar på balanserade utgifter": { + "account_number": "1019", + "account_type": "Accumulated Depreciation" + } + }, + "102 Koncessioner m.m.": { + "is_group": 1, + "Koncessioner m.m.": { + "account_number": "1020" + }, + "Ackumulerade nedskrivningar på koncessioner m.m.": { + "account_number": "1028", + "account_type": "Accumulated Depreciation" + }, + "Ackumulerade avskrivningar på koncessioner m.m.": { + "account_number": "1029", + "account_type": "Accumulated Depreciation" + } + }, + "103 Patent": { + "is_group": 1, + "Patent": { + "account_number": "1030", + "account_type": "Fixed Asset" + }, + "Ackumulerade nedskrivningar på patent": { + "account_number": "1038" + }, + "Ackumulerade avskrivningar på patent": { + "account_number": "1039", + "account_type": "Accumulated Depreciation" + } + }, + "104 Licenser": { + "is_group": 1, + "Licenser": { + "account_number": "1040" + }, + "Ackumulerade nedskrivningar på licenser": { + "account_number": "1048" + }, + "Ackumulerade avskrivningar på licenser": { + "account_number": "1049", + "account_type": "Accumulated Depreciation" + } + }, + "105 Varumärken": { + "is_group": 1, + "Varumärken": { + "account_number": "1050" + }, + "Ackumulerade nedskrivningar på varumärken": { + "account_number": "1058" + }, + "Ackumulerade avskrivningar på varumärken": { + "account_number": "1059", + "account_type": "Accumulated Depreciation" + } + }, + "106 Hyresrätter, tomträtter och liknande": { + "is_group": 1, + "Hyresrätter, tomträtter och liknande": { + "account_number": "1060", + "account_type": "Fixed Asset" + }, + "Ackumulerade nedskrivningar på hyresrätter, tomträtter och liknande": { + "account_number": "1068" + }, + "Ackumulerade avskrivningar på hyresrätter, tomträtter och liknande": { + "account_number": "1069", + "account_type": "Accumulated Depreciation" + } + }, + "107 Goodwill": { + "is_group": 1, + "Goodwill": { + "account_number": "1070" + }, + "Ackumulerade nedskrivningar på goodwill": { + "account_number": "1078" + }, + "Ackumulerade avskrivningar på goodwill": { + "account_number": "1079", + "account_type": "Accumulated Depreciation" + } + }, + "108 Förskott för immateriella anläggningstillgångar": { + "is_group": 1, + "Förskott för immateriell anläggningstillgång": { + "account_number": "1080" + }, + "Pågående projekt för immateriella anläggningstillgångar": { + "account_number": "1081" + }, + "Förskott för immateriella anläggningstillgångar": { + "account_number": "1088" + } + } + }, + "11 Byggnader och mark": { + "is_group": 1, + "111 Byggnader": { + "is_group": 1, + "Byggnader": { + "account_number": "1110", + "account_type": "Fixed Asset" + }, + "Byggnader på egen mark": { + "account_number": "1111" + }, + "Byggnader på annans mark": { + "account_number": "1112" + }, + "Ackumulerade nedskrivningar på byggnader": { + "account_number": "1118", + "account_type": "Accumulated Depreciation" + }, + "Ackumulerade avskrivningar på byggnader": { + "account_number": "1119", + "account_type": "Accumulated Depreciation" + } + }, + "112 Förbättringsutgifter på annans fastighet": { + "is_group": 1, + "Förbättringsutgifter på annans fastighet": { + "account_number": "1120" + }, + "Ackumulerade avskrivningar på förbättringsutgifter på annans fastighet": { + "account_number": "1129", + "account_type": "Accumulated Depreciation" + } + }, + "113 Mark": { + "is_group": 1, + "Mark": { + "account_number": "1130", + "account_type": "Fixed Asset" + } + }, + "114 Tomter och obebyggda markområden": { + "is_group": 1, + "Tomter och obebyggda markområden": { + "account_number": "1140" + } + }, + "115 Markanläggningar": { + "is_group": 1, + "Markanläggningar": { + "account_number": "1150", + "account_type": "Fixed Asset" + }, + "Ackumulerade nedskrivningar på markanläggningar": { + "account_number": "1158" + }, + "Ackumulerade avskrivningar på markanläggningar": { + "account_number": "1159", + "account_type": "Accumulated Depreciation" + } + }, + "118 Pågående nyanläggningar och förskott för byggnader och mark": { + "is_group": 1, + "Pågående nyanläggningar och förskott för byggnader och mark": { + "account_number": "1180", + "account_type": "Fixed Asset" + }, + "Pågående ny-, till- och ombyggnad": { + "account_number": "1181" + }, + "Förskott för byggnader och mark": { + "account_number": "1188", + "account_type": "Accumulated Depreciation" + } + } + }, + "12 Maskiner och inventarier": { + "is_group": 1, + "121 Maskiner och andra tekniska anläggningar": { + "is_group": 1, + "Maskiner och andra tekniska anläggningar": { + "account_number": "1210", + "account_type": "Fixed Asset" + }, + "Maskiner": { + "account_number": "1211", + "account_type": "Fixed Asset" + }, + "Andra tekniska anläggningar": { + "account_number": "1213", + "account_type": "Fixed Asset" + }, + "Ackumulerade nedskrivningar på maskiner och andra tekniska anläggningar": { + "account_number": "1218", + "account_type": "Accumulated Depreciation" + }, + "Ackumulerade avskrivningar på maskiner och andra tekniska anläggningar": { + "account_number": "1219", + "account_type": "Accumulated Depreciation" + } + }, + "122 Inventarier och verktyg": { + "is_group": 1, + "Inventarier och verktyg": { + "account_number": "1220", + "account_type": "Fixed Asset" + }, + "Inventarier": { + "account_number": "1221" + }, + "Byggnadsinventarier": { + "account_number": "1222" + }, + "Verktyg": { + "account_number": "1225" + }, + "Ackumulerade nedskrivningar på inventarier och verktyg": { + "account_number": "1228" + }, + "Ackumulerade avskrivningar på inventarier och verktyg": { + "account_number": "1229", + "account_type": "Accumulated Depreciation" + } + }, + "123 Installationer": { + "is_group": 1, + "Installationer": { + "account_number": "1230", + "account_type": "Fixed Asset" + }, + "Installationer på egen fastighet": { + "account_number": "1231", + "account_type": "Fixed Asset" + }, + "Installationer på annans fastighet": { + "account_number": "1232", + "account_type": "Fixed Asset" + }, + "Ackumulerade nedskrivningar på installationer": { + "account_number": "1238", + "account_type": "Accumulated Depreciation" + }, + "Ackumulerade avskrivningar på installationer": { + "account_number": "1239", + "account_type": "Accumulated Depreciation" + } + }, + "124 Bilar och andra transportmedel": { + "is_group": 1, + "Bilar och andra transportmedel": { + "account_number": "1240", + "account_type": "Fixed Asset" + }, + "Personbilar": { + "account_number": "1241", + "account_type": "Fixed Asset" + }, + "Lastbilar": { + "account_number": "1242", + "account_type": "Fixed Asset" + }, + "Truckar": { + "account_number": "1243", + "account_type": "Fixed Asset" + }, + "Arbetsmaskiner": { + "account_number": "1244", + "account_type": "Fixed Asset" + }, + "Traktorer": { + "account_number": "1245", + "account_type": "Fixed Asset" + }, + "Motorcyklar, mopeder och skotrar": { + "account_number": "1246", + "account_type": "Fixed Asset" + }, + "Båtar, flygplan och helikoptrar": { + "account_number": "1247", + "account_type": "Fixed Asset" + }, + "Ackumulerade nedskrivningar på bilar och andra transportmedel": { + "account_number": "1248", + "account_type": "Fixed Asset" + }, + "Ackumulerade avskrivningar på bilar och andra transportmedel": { + "account_number": "1249", + "account_type": "Accumulated Depreciation" + } + }, + "125 Datorer": { + "is_group": 1, + "Datorer": { + "account_number": "1250", + "account_type": "Fixed Asset" + }, + "Datorer, företaget": { + "account_number": "1251" + }, + "Datorer, personal": { + "account_number": "1257" + }, + "Ackumulerade nedskrivningar på datorer": { + "account_number": "1258", + "account_type": "Accumulated Depreciation" + }, + "Ackumulerade avskrivningar på datorer": { + "account_number": "1259", + "account_type": "Accumulated Depreciation" + } + }, + "126 Leasade tillgångar": { + "is_group": 1, + "Leasade tillgångar": { + "account_number": "1260" + }, + "Ackumulerade avskrivningar på leasade tillgångar": { + "account_number": "1269", + "account_type": "Accumulated Depreciation" + } + }, + "128 Pågående nyanläggningar och förskott för maskiner och inventarier": { + "is_group": 1, + "Pågående nyanläggningar och förskott för maskiner och inventarier": { + "account_number": "1280" + }, + "Pågående nyanläggningar, maskiner och inventarier": { + "account_number": "1281" + }, + "Förskott för maskiner och inventarier": { + "account_number": "1288" + } + }, + "129 Övriga materiella anläggningstillgångar": { + "is_group": 1, + "Övriga materiella anläggningstillgångar": { + "account_number": "1290", + "account_type": "Fixed Asset" + }, + "Konst och liknande tillgångar": { + "account_number": "1291", + "account_type": "Fixed Asset" + }, + "Djur som klassificeras som anläggningstillgång": { + "account_number": "1292" + }, + "Ackumulerade nedskrivningar på övriga materiella anläggningstillgångar": { + "account_number": "1298" + }, + "Ackumulerade avskrivningar på övriga materiella anläggningstillgångar": { + "account_number": "1299", + "account_type": "Accumulated Depreciation" + } + } + }, + "13 Finansiella anläggningstillgångar": { + "is_group": 1, + "131 Andelar i koncernföretag": { + "is_group": 1, + "Andelar i koncernföretag": { + "account_number": "1310" + }, + "Aktier i noterade svenska koncernföretag": { + "account_number": "1311" + }, + "Aktier i onoterade svenska koncernföretag": { + "account_number": "1312" + }, + "Aktier i noterade utländska koncernföretag": { + "account_number": "1313" + }, + "Aktier i onoterade utländska koncernföretag": { + "account_number": "1314" + }, + "Andra andelar i svenska koncernföretag": { + "account_number": "1316" + }, + "Andra andelar i utländska koncernföretag": { + "account_number": "1317" + }, + "Ackumulerade nedskrivningar av andelar i koncernföretag": { + "account_number": "1318" + } + }, + "132 Långfristiga fordringar hos koncernföretag": { + "is_group": 1, + "Långfristiga fordringar hos koncernföretag": { + "account_number": "1320" + }, + "Långfristiga fordringar hos moderföretag": { + "account_number": "1321" + }, + "Långfristiga fordringar hos dotterföretag": { + "account_number": "1322" + }, + "Långfristiga fordringar hosandra koncernföretag": { + "account_number": "1323" + }, + "Ackumulerade nedskrivningar av långfristiga fordringar hos koncernföretag": { + "account_number": "1328" + } + }, + "133 Andelar i intresseföretag, gemensamt styrda företag och övriga företag": { + "is_group": 1, + "Andelar i intresseföretag, gemensamt styrda företag och övriga företag": { + "account_number": "1330" + }, + "Andelar i intresseföretag": { + "account_number": "1331" + }, + "Ackumulerade nedskrivningar av andelar i intresseföretag": { + "account_number": "1332" + }, + "Andelar i gemensamt styrda företag": { + "account_number": "1333" + }, + "Ackumulerade nedskrivningar av andelar i gemensamt styrda företag": { + "account_number": "1334" + }, + "Andelar i övriga företag som det finns ett ägarintresse i": { + "account_number": "1336" + }, + "Ackumulerade nedskrivningar av andelar i övriga företag": { + "account_number": "1337" + }, + "Ackumulerade nedskrivningar av andelar i intresseföretag övriga": { + "account_number": "1338" + } + }, + "134 Långfristiga fordringar hos intresseföretag": { + "is_group": 1, + "Långfristiga fordringar hos intresseföretag, gemensamt styrda företag": { + "account_number": "1340" + }, + "Långfristiga fordringar hos intresseföretag": { + "account_number": "1341" + }, + "Ackumulerade nedskrivningar av långfristiga fordringar hos intresseföretag": { + "account_number": "1342" + }, + "Långfristiga fordringar hos gemensamt styrda företag": { + "account_number": "1343" + }, + "Ackumulerade nedskrivningar av långfristiga fordringar hos gemensamt styrda företag": { + "account_number": "1344" + }, + "Långfristiga fordringar hos övriga företag som det finns ett ägarintresse i": { + "account_number": "1346" + }, + "Ackumulerade nedskrivningar av långfristiga fordringar hos övriga företag": { + "account_number": "1347" + }, + "Ackumulerade nedskrivningar av långfristiga fordringar hos intresseföretag, gemensamt styrda företag": { + "account_number": "1348" + } + }, + "135 Andelar och värdepapper i andra företag": { + "is_group": 1, + "Andelar och värdepapper i andra företag": { + "account_number": "1350" + }, + "Andelar i noterade företag": { + "account_number": "1351" + }, + "Andra andelar": { + "account_number": "1352" + }, + "Andelar i bostadsrättsföreningar": { + "account_number": "1353" + }, + "Obligationer": { + "account_number": "1354" + }, + "Andelar i ekonomiska föreningar, övriga företag": { + "account_number": "1356" + }, + "Andelar i handelsbolag, andra företag": { + "account_number": "1357" + }, + "Ackumulerade nedskrivningar av andra andelar och värdepapper": { + "account_number": "1358" + } + }, + "136 Lån till delägare eller närstående enligt ABL, långfristig del": { + "is_group": 1, + "Lån till delägare eller närstående enligt ABL, långfristig del": { + "account_number": "1360" + }, + "Ackumulerade nedskrivningar av lån till delägare eller närstående enligt ABL, långfristig del": { + "account_number": "1369" + } + }, + "137 Uppskjuten skattefordran": { + "is_group": 1, + "Uppskjuten skattefordran": { + "account_number": "1370" + } + }, + "138 Andra långfristiga fordringar": { + "is_group": 1, + "Andra långfristiga fordringar": { + "account_number": "1380", + "account_type": "Receivable" + }, + "Långfristiga reversfordringar": { + "account_number": "1381" + }, + "Långfristiga fordringar hos anställda": { + "account_number": "1382" + }, + "Lämnade depositioner, långfristiga": { + "account_number": "1383" + }, + "Derivat": { + "account_number": "1384" + }, + "Kapitalförsäkring": { + "account_number": "1385" + }, + "Långfristiga kontraktsfordringar": { + "account_number": "1387" + }, + "Långfristiga kundfordringar": { + "account_number": "1388" + }, + "Ackumulerade nedskrivningar av andra långfristiga fordringar": { + "account_number": "1389" + } + } + }, + "14 Lager, produkter i arbete och pågående arbeten": { + "is_group": 1, + "account_type": "Stock", + "141 Lager av råvaror": { + "is_group": 1, + "Lager av råvaror": { + "account_number": "1410", + "account_type": "Stock" + }, + "Förändring av lager av råvaror": { + "account_number": "1419", + "account_type": "Stock Adjustment" + } + }, + "142 Lager av tillsatsmaterial och förnödenheter": { + "is_group": 1, + "Lager av tillsatsmaterial och förnödenheter": { + "account_number": "1420", + "account_type": "Stock" + }, + "Förändring av lager av tillsatsmaterial och förnödenheter": { + "account_number": "1429", + "account_type": "Stock Adjustment" + } + }, + "144 Produkter i arbete": { + "is_group": 1, + "Produkter i arbete": { + "account_number": "1440", + "account_type": "Stock" + }, + "Förändring av produkter i arbete": { + "account_number": "1449", + "account_type": "Stock Adjustment" + } + }, + "145 Lager av färdiga varor": { + "is_group": 1, + "Lager av färdiga varor": { + "account_number": "1450", + "account_type": "Stock" + }, + "Förändring av lager av färdiga varor": { + "account_number": "1459", + "account_type": "Stock Adjustment" + } + }, + "146 Lager av handelsvaror": { + "is_group": 1, + "Lager av handelsvaror": { + "account_number": "1460", + "account_type": "Stock" + }, + "Lager av varor VMB": { + "account_number": "1465" + }, + "Lager av varor VMB förenklad": { + "account_number": "1467" + }, + "Förändring av lager av handelsvaror": { + "account_number": "1469", + "account_type": "Stock Adjustment" + } + }, + "147 Pågående arbeten": { + "is_group": 1, + "Pågående arbeten": { + "account_number": "1470" + }, + "Pågående arbeten, nedlagda kostnader": { + "account_number": "1471" + }, + "Pågående arbeten, fakturering": { + "account_number": "1478" + }, + "Förändring av pågående arbeten": { + "account_number": "1479" + } + }, + "148 Förskott för varor och tjänster": { + "is_group": 1, + "Förskott för varor och tjänster": { + "account_number": "1480" + }, + "Remburser": { + "account_number": "1481" + }, + "Övriga förskott till leverantörer": { + "account_number": "1489" + } + }, + "149 Övriga lagertillgångar": { + "is_group": 1, + "Övriga lagertillgångar": { + "account_number": "1490" + }, + "Lager av värdepapper": { + "account_number": "1491" + }, + "Lager av fastigheter": { + "account_number": "1492" + }, + "Djur som klassificeras som omsättningstillgång": { + "account_number": "1493" + } + } + }, + "15 Kundfordringar": { + "account_type": "Receivable", + "is_group": 1, + "151 Kundfordringar": { + "is_group": 1, + "Kundfordringar": { + "account_number": "1510", + "account_type": "Receivable" + }, + "Kundfordringar ": { + "account_number": "1511", + "account_type": "Receivable" + }, + "Belånade kundfordringar (factoring)": { + "account_number": "1512", + "account_type": "Receivable" + }, + "Kundfordringar – delad faktura": { + "account_number": "1513", + "account_type": "Receivable" + }, + "Tvistiga kundfordringar": { + "account_number": "1516" + }, + "Ej reskontraförda kundfordringar": { + "account_number": "1518" + }, + "Nedskrivning av kundfordringar": { + "account_number": "1519", + "account_type": "Receivable" + } + }, + "152 Växelfordringar": { + "is_group": 1, + "Växelfordringar": { + "account_number": "1520" + }, + "Osäkra växelfordringar": { + "account_number": "1525" + }, + "Nedskrivning av växelfordringar": { + "account_number": "1529" + } + }, + "153 Kontraktsfordringar": { + "is_group": 1, + "Kontraktsfordringar": { + "account_number": "1530" + }, + "Kontraktsfordringar ": { + "account_number": "1531" + }, + "Belånade kontraktsfordringar": { + "account_number": "1532" + }, + "Tvistiga kontraktsfordringar": { + "account_number": "1536" + }, + "Nedskrivning av kontraktsfordringar": { + "account_number": "1539" + } + }, + "155 Konsignationsfordringar": { + "is_group": 1, + "Konsignationsfordringar": { + "account_number": "1550" + } + }, + "156 Kundfordringar hos koncernföretag": { + "is_group": 1, + "Kundfordringar hos koncernföretag": { + "account_number": "1560" + }, + "Kundfordringar hos moderföretag": { + "account_number": "1561" + }, + "Kundfordringar hos dotterföretag": { + "account_number": "1562" + }, + "Kundfordringar hos andra koncernföretag": { + "account_number": "1563" + }, + "Ej reskontraförda kundfordringar hos koncernföretag": { + "account_number": "1568" + }, + "Nedskrivning av kundfordringar hos koncernföretag": { + "account_number": "1569" + } + }, + "157 Kundfordringar hos intresseföretag, gemensamt styrda företag": { + "is_group": 1, + "Kundfordringar hos intresseföretag, gemensamt styrda företag": { + "account_number": "1570" + }, + "Kundfordringar hos intresseföretag": { + "account_number": "1571" + }, + "Kundfordringar hos gemensamt styrda företag": { + "account_number": "1572" + }, + "Kundfordringar hos övriga företag som det finns ett ägarintresse i": { + "account_number": "1573" + } + }, + "158 Fordringar för kontokort och kuponger": { + "is_group": 1, + "Fordringar för kontokort och kuponger": { + "account_number": "1580" + } + } + }, + "16 Övriga kortfristiga fordringar": { + "is_group": 1, + "161 Kortfristiga fordringar hos anställda": { + "is_group": 1, + "Kortfristiga fordringar hos anställda": { + "account_number": "1610" + }, + "Reseförskott": { + "account_number": "1611" + }, + "Kassaförskott": { + "account_number": "1612" + }, + "Övriga förskott": { + "account_number": "1613" + }, + "Tillfälliga lån till anställda": { + "account_number": "1614" + }, + "Övriga fordringar hos anställda": { + "account_number": "1619" + } + }, + "162 Upparbetad men ej fakturerad intäkt": { + "is_group": 1, + "Upparbetad men ej fakturerad intäkt": { + "account_number": "1620" + } + }, + "163 Avräkning för skatter och avgifter (skattekonto)": { + "is_group": 1, + "Avräkning för skatter och avgifter (skattekonto)": { + "account_number": "1630", + "account_type": "Tax" + } + }, + "164 Skattefordringar": { + "is_group": 1, + "Skattefordringar": { + "account_number": "1640" + } + }, + "165 Momsfordran": { + "is_group": 1, + "Momsfordran": { + "account_number": "1650" + } + }, + "166 Kortfristiga fordringar hos koncernföretag": { + "is_group": 1, + "Kortfristiga fordringar hos koncernföretag": { + "account_number": "1660" + }, + "Kortfristiga fordringar hos moderföretag": { + "account_number": "1661" + }, + "Kortfristiga fordringar hos dotterföretag": { + "account_number": "1662" + }, + "Kortfristiga fordringar hos andra koncernföretag": { + "account_number": "1663" + } + }, + "167 Kortfristiga fordringar hos intresseföretag, gemensamt styrda företag": { + "is_group": 1, + "Kortfristiga fordringar hos intresseföretag, gemensamt styrda företag": { + "account_number": "1670" + }, + "Kortfristiga fordringar hos intresseföretag": { + "account_number": "1671" + }, + "Kortfristiga fordringar hos gemensamt styrda företag": { + "account_number": "1672" + }, + "Kortfristiga fordringar hos övriga företag som det finns ett ögarintresse i": { + "account_number": "1673" + } + }, + "168 Andra kortfristiga fordringar": { + "is_group": 1, + "Andra kortfristiga fordringar": { + "account_number": "1680" + }, + "Utlägg för kunder": { + "account_number": "1681" + }, + "Kortfristiga lånefordringar": { + "account_number": "1682" + }, + "Derivat": { + "account_number": "1683" + }, + "Kortfristiga fordringar hos leverantörer": { + "account_number": "1684" + }, + "Kortfristiga fordringar hos delägare eller närstående": { + "account_number": "1685" + }, + "Kortfristig del av långfristiga fordringar": { + "account_number": "1687" + }, + "Fordran arbetsmarknadsförsäkringar": { + "account_number": "1688" + }, + "Övriga kortfristiga fordringar": { + "account_number": "1689" + } + }, + "169 Fordringar för tecknat men ej inbetalt aktiekapital": { + "is_group": 1, + "Fordringar för tecknat men ej inbetalt aktiekapital": { + "account_number": "1690" + } + } + }, + "17 Förutbetalda kostnader och upplupna intäkter": { + "is_group": 1, + "171 Förutbetalda hyreskostnader": { + "is_group": 1, + "Förutbetalda hyreskostnader": { + "account_number": "1710" + } + }, + "172 Förutbetalda leasingavgifter": { + "is_group": 1, + "Förutbetalda leasingavgifter": { + "account_number": "1720" + } + }, + "173 Förutbetalda försäkringspremier": { + "is_group": 1, + "Förutbetalda försäkringspremier": { + "account_number": "1730" + } + }, + "174 Förutbetalda räntekostnader": { + "is_group": 1, + "Förutbetalda räntekostnader": { + "account_number": "1740" + } + }, + "175 Upplupna hyresintäkter": { + "is_group": 1, + "Upplupna hyresintäkter": { + "account_number": "1750" + } + }, + "176 Upplupna ränteintäkter": { + "is_group": 1, + "Upplupna ränteintäkter": { + "account_number": "1760" + } + }, + "177 Tillgångar av kostnadsnatur": { + "is_group": 1, + "Tillgångar av kostnadsnatur": { + "account_number": "1770" + } + }, + "178 Upplupna avtalsintäkter": { + "is_group": 1, + "Upplupna avtalsintäkter": { + "account_number": "1780" + } + }, + "179 Övriga förutbetalda kostnader och upplupna intäkter": { + "is_group": 1, + "Övriga förutbetalda kostnader och upplupna intäkter": { + "account_number": "1790" + } + } + }, + "18 Kortfristiga placeringar": { + "is_group": 1, + "181 Andelar i börsnoterade företag": { + "is_group": 1, + "Andelar i börsnoterade företag": { + "account_number": "1810" + } + }, + "182 Obligationer": { + "is_group": 1, + "Obligationer": { + "account_number": "1820" + } + }, + "183 Konvertibla skuldebrev": { + "is_group": 1, + "Konvertibla skuldebrev": { + "account_number": "1830" + } + }, + "186 Andelar i koncernföretag, kortfristigt": { + "is_group": 1, + "Andelar i koncernföretag, kortfristigt": { + "account_number": "1860" + } + }, + "188 Andra kortfristiga placeringar": { + "is_group": 1, + "Andra kortfristiga placeringar": { + "account_number": "1880" + }, + "Derivat": { + "account_number": "1886" + }, + "Andelar i övriga företag": { + "account_number": "1889" + } + }, + "189 Nedskrivning av kortfristiga placeringar": { + "is_group": 1, + "Nedskrivning av kortfristiga placeringar": { + "account_number": "1890" + } + } + }, + "19 Kassa och bank": { + "account_type": "Cash", + "is_group": 1, + "191 Kassa": { + "is_group": 1, + "Kassa": { + "account_number": "1910", + "account_type": "Cash" + }, + "Huvudkassa": { + "account_number": "1911" + }, + "Kassa 2": { + "account_number": "1912" + }, + "Kassa 3": { + "account_number": "1913" + } + }, + "192 PlusGiro": { + "is_group": 1, + "PlusGiro": { + "account_number": "1920" + } + }, + "193 Företagskonto/checkkonto/affärskonto": { + "is_group": 1, + "Företagskonto/checkkonto/affärskonto": { + "account_number": "1930", + "account_type": "Bank" + } + }, + "194 Övriga bankkonton": { + "is_group": 1, + "Övriga bankkonton": { + "account_number": "1940" + } + }, + "195 Bankcertifikat": { + "is_group": 1, + "Bankcertifikat": { + "account_number": "1950" + } + }, + "196 Koncernkonto moderföretag": { + "is_group": 1, + "Koncernkonto moderföretag": { + "account_number": "1960" + } + }, + "197 Särskilda bankkonton": { + "is_group": 1, + "Särskilda bankkonton": { + "account_number": "1970" + }, + "Upphovsmannakonto": { + "account_number": "1972" + }, + "Skogskonto": { + "account_number": "1973" + }, + "Spärrade bankmedel": { + "account_number": "1974" + }, + "Övriga särskilda bankkonton": { + "account_number": "1979" + } + }, + "198 Valutakonton": { + "is_group": 1, + "Valutakonton": { + "account_number": "1980" + } + }, + "199 Redovisningsmedel": { + "is_group": 1, + "Redovisningsmedel": { + "account_number": "1990" + } + } + } + }, + "2 Eget Kapital och Skulder": { + "root_type": "Liability", + "is_group": 1, + "20 Eget Kapital": { + "account_type": "Equity", + "is_group": 1, + "201 Eget kapital, delägare 1": { + "is_group": 1, + "Eget kapital": { + "account_number": "2010", + "account_type": "Equity" + }, + "Egna varuuttag": { + "account_number": "2011", + "account_type": "Equity" + }, + "Övriga egna uttag": { + "account_number": "2013", + "account_type": "Equity" + }, + "Årets kapitaltillskott": { + "account_number": "2017", + "account_type": "Equity" + }, + "Övriga egna insättningar": { + "account_number": "2018", + "account_type": "Equity" + }, + "Årets resultat": { + "account_number": "2019", + "account_type": "Equity" + } + }, + "202 Eget kapital, delägare 2": { + "is_group": 1, + "Eget kapital": { + "account_number": "2020", + "account_type": "Equity" + }, + "Egna varuuttag": { + "account_number": "2021", + "account_type": "Equity" + }, + "Övriga egna uttag": { + "account_number": "2023", + "account_type": "Equity" + }, + "Årets kapitaltillskott": { + "account_number": "2027", + "account_type": "Equity" + }, + "Övriga egna insättningar": { + "account_number": "2028", + "account_type": "Equity" + }, + "Årets resultat": { + "account_number": "2029", + "account_type": "Equity" + } + }, + "203 Eget kapital, delägare 3": { + "is_group": 1, + "Eget kapital": { + "account_number": "2030", + "account_type": "Equity" + }, + "Egna varuuttag": { + "account_number": "2031", + "account_type": "Equity" + }, + "Övriga egna uttag": { + "account_number": "2033", + "account_type": "Equity" + }, + "Årets kapitaltillskott": { + "account_number": "2037", + "account_type": "Equity" + }, + "Övriga egna insättningar": { + "account_number": "2038", + "account_type": "Equity" + }, + "Årets resultat": { + "account_number": "2039", + "account_type": "Equity" + } + }, + "204 Eget kapital, delägare 4": { + "is_group": 1, + "Eget kapital": { + "account_number": "2040", + "account_type": "Equity" + }, + "Egna varuuttag": { + "account_number": "2041", + "account_type": "Equity" + }, + "Övriga egna uttag": { + "account_number": "2043", + "account_type": "Equity" + }, + "Årets kapitaltillskott": { + "account_number": "2047", + "account_type": "Equity" + }, + "Övriga egna insättningar": { + "account_number": "2048", + "account_type": "Equity" + }, + "Årets resultat": { + "account_number": "2049", + "account_type": "Equity" + } + }, + "205 Avsättning till expansionsfond": { + "is_group": 1, + "Avsättning till expansionsfond": { + "account_number": "2050" + } + }, + "206 Eget kapital i ideella föreningar, stiftelser och registrerade trossamfund": { + "is_group": 1, + "Eget kapital i ideella föreningar, stiftelser och registrerade trossamfund": { + "account_number": "2060", + "account_type": "Equity" + }, + "Eget kapital/stiftelsekapital/grundkapital": { + "account_number": "2061" + }, + "Förändring i fond för verkligt värde": { + "account_number": "2065" + }, + "Värdesäkringsfond": { + "account_number": "2066" + }, + "Balanserad vinst eller förlust/balanserat kapital": { + "account_number": "2067" + }, + "Vinst eller förlust från föregående år": { + "account_number": "2068" + }, + "Årets resultat": { + "account_number": "2069" + } + }, + "207 Ändamålsbestämda medel": { + "is_group": 1, + "Ändamålsbestämda medel": { + "account_number": "2070", + "account_type": "Equity" + }, + "Ändamål 1": { + "account_number": "2071" + }, + "Ändamål 2": { + "account_number": "2072" + } + }, + "208 Bundet eget kapital": { + "is_group": 1, + "Bundet eget kapital": { + "account_number": "2080" + }, + "Aktiekapital": { + "account_number": "2081", + "account_type": "Equity" + }, + "Ej registrerat aktiekapital": { + "account_number": "2082" + }, + "Medlemsinsatser": { + "account_number": "2083", + "account_type": "Equity" + }, + "Förlagsinsatser": { + "account_number": "2084" + }, + "Uppskrivningsfond": { + "account_number": "2085" + }, + "Reservfond": { + "account_number": "2086", + "account_type": "Equity" + }, + "Bunden överkursfond": { + "account_number": "2087" + }, + "Fond för yttre underhåll": { + "account_number": "2088" + }, + "Fond för utvecklingsutgifter": { + "account_number": "2089" + } + }, + "209 Fritt eget kapital": { + "is_group": 1, + "Fritt eget kapital": { + "account_number": "2090", + "account_type": "Equity" + }, + "Balanserad vinst eller förlust": { + "account_number": "2091", + "account_type": "Equity" + }, + "Mottagna/lämnade koncernbidrag": { + "account_number": "2092" + }, + "Erhållna aktieägartillskott": { + "account_number": "2093" + }, + "Egna aktier": { + "account_number": "2094" + }, + "Fusionsresultat": { + "account_number": "2095" + }, + "Fond för verkligt värde": { + "account_number": "2096" + }, + "Fri överkursfond": { + "account_number": "2097" + }, + "Vinst eller förlust från föregående år": { + "account_number": "2098", + "account_type": "Equity" + }, + "Årets resultat": { + "account_number": "2099", + "account_type": "Equity" + } + } + }, + "21 Obeskattade reserver": { + "root_type": "Equity", + "is_group": 1, + "211 Periodiseringsfonder": { + "account_type": "Equity", + "is_group": 1, + "Periodiseringsfonder": { + "account_number": "2110" + } + }, + "212 Periodiseringsfond 2020": { + "is_group": 1, + "Periodiseringsfond 2020": { + "account_number": "2120", + "account_type": "Equity" + }, + "Periodiseringsfond 2021": { + "account_number": "2121", + "account_type": "Equity" + }, + "Periodiseringsfond 2022": { + "account_number": "2122", + "account_type": "Equity" + }, + "Periodiseringsfond 2023": { + "account_number": "2123", + "account_type": "Equity" + }, + "Periodiseringsfond 2024": { + "account_number": "2124", + "account_type": "Equity" + }, + "Periodiseringsfond 2025": { + "account_number": "2125", + "account_type": "Equity" + }, + "Periodiseringsfond 2017": { + "account_number": "2127", + "account_type": "Equity" + }, + "Periodiseringsfond 2018": { + "account_number": "2128", + "account_type": "Equity" + }, + "Periodiseringsfond 2019": { + "account_number": "2129", + "account_type": "Equity" + } + }, + "213 Periodiseringsfond 2020": { + "is_group": 1, + "Periodiseringsfond 2020": { + "account_number": "2130", + "account_type": "Equity" + }, + "Periodiseringsfond 2021": { + "account_number": "2131", + "account_type": "Equity" + }, + "Periodiseringsfond 2022": { + "account_number": "2132", + "account_type": "Equity" + }, + "Periodiseringsfond 2023": { + "account_number": "2133", + "account_type": "Equity" + }, + "Periodiseringsfond 2024": { + "account_number": "2134", + "account_type": "Equity" + }, + "Periodiseringsfond 2025-2": { + "account_number": "2135", + "account_type": "Equity" + }, + "Periodiseringsfond 2017": { + "account_number": "2137", + "account_type": "Equity" + }, + "Periodiseringsfond 2018": { + "account_number": "2138", + "account_type": "Equity" + }, + "Periodiseringsfond 2019": { + "account_number": "2139", + "account_type": "Equity" + } + }, + "215 Ackumulerade överavskrivningar": { + "is_group": 1, + "Ackumulerade överavskrivningar": { + "account_number": "2150", + "account_type": "Equity" + }, + "Ackumulerade överavskrivningar på immateriella anläggningstillgångar": { + "account_number": "2151" + }, + "Ackumulerade överavskrivningar på byggnader och markanläggningar": { + "account_number": "2152" + }, + "Ackumulerade överavskrivningar på maskiner och inventarier": { + "account_number": "2153" + } + }, + "216 Ersättningsfond": { + "is_group": 1, + "Ersättningsfond": { + "account_number": "2160" + }, + "Ersättningsfond maskiner och inventarier": { + "account_number": "2161" + }, + "Ersättningsfond byggnader och markanläggningar": { + "account_number": "2162" + }, + "Ersättningsfond för djurlager i jordbruk och renskötsel": { + "account_number": "2164" + } + }, + "219 Övriga obeskattade reserver": { + "is_group": 1, + "Övriga obeskattade reserver": { + "account_number": "2190" + }, + "Lagerreserv": { + "account_number": "2196" + }, + "Övriga obeskattade reserver övriga": { + "account_number": "2199" + } + } + }, + "22 Avsättningar": { + "account_type": "Equity", + "is_group": 1, + "221 Avsättningar för pensioner enligt tryggandelagen": { + "account_type": "Equity", + "is_group": 1, + "Avsättningar för pensioner enligt tryggandelagen": { + "account_number": "2210", + "account_type": "Equity" + } + }, + "222 Avsättningar för garantier": { + "account_type": "Equity", + "is_group": 1, + "Avsättningar för garantier": { + "account_number": "2220", + "account_type": "Equity" + } + }, + "223 Övriga avsättningar för pensioner och liknande förpliktelser": { + "account_type": "Equity", + "is_group": 1, + "Övriga avsättningar för pensioner och liknande förpliktelser": { + "account_number": "2230" + } + }, + "224 Avsättningar för uppskjutna skatter": { + "is_group": 1, + "Avsättningar för uppskjutna skatter": { + "account_number": "2240" + } + }, + "225 Övriga avsättningar för skatter": { + "is_group": 1, + "Övriga avsättningar för skatter": { + "account_number": "2250" + }, + "Avsättningar för tvistiga skatter": { + "account_number": "2252" + }, + "Avsättningar särskild löneskatt, deklarationspost": { + "account_number": "2253" + } + }, + "229 Övriga avsättningar": { + "account_type": "Equity", + "is_group": 1, + "Övriga avsättningar": { + "account_number": "2290", + "account_type": "Equity" + } + } + }, + "23 Långfristiga skulder": { + "is_group": 1, + "231 Obligations- och förlagslån": { + "is_group": 1, + "Obligations- och förlagslån": { + "account_number": "2310" + } + }, + "232 Konvertibla lån och liknande": { + "is_group": 1, + "Konvertibla lån och liknande": { + "account_number": "2320" + }, + "Konvertibla lån": { + "account_number": "2321" + }, + "Lån förenade med optionsrätt": { + "account_number": "2322" + }, + "Vinstandelslån": { + "account_number": "2323" + }, + "Kapitalandelslån": { + "account_number": "2334" + } + }, + "233 Checkräkningskredit": { + "is_group": 1, + "Checkräkningskredit": { + "account_number": "2330" + }, + "Checkräkningskredit 1": { + "account_number": "2331" + }, + "Checkräkningskredit 2": { + "account_number": "2332" + } + }, + "234 Byggnadskreditiv": { + "is_group": 1, + "Byggnadskreditiv": { + "account_number": "2340" + } + }, + "235 Andra långfristiga skulder till kreditinstitut": { + "is_group": 1, + "Andra långfristiga skulder till kreditinstitut": { + "account_number": "2350" + }, + "Fastighetslån, långfristig del": { + "account_number": "2351" + }, + "Långfristiga lån i utländsk valuta från kreditinstitut": { + "account_number": "2355" + }, + "Övriga långfristiga lån från kreditinstitut": { + "account_number": "2359" + } + }, + "236 Långfristiga skulder till koncernfäretag": { + "is_group": 1, + "Långfristiga skulder till koncernfäretag": { + "account_number": "2360" + }, + "Långfristiga skulder till moderfäretag": { + "account_number": "2361" + }, + "Långfristiga skulder till dotterfäretag": { + "account_number": "2362" + }, + "Långfristiga skulder till andra koncernfäretag": { + "account_number": "2363" + } + }, + "237 Långfristiga skulder till intresseföretag, gemensamt styrda företag": { + "is_group": 1, + "Långfristiga skulder till intresseföretag, gemensamt styrda företag": { + "account_number": "2370" + }, + "Långfristiga skulder till intresseföretag": { + "account_number": "2371" + }, + "Långfristiga skulder till gemensamt styrda företag": { + "account_number": "2372" + }, + "Långfristiga skulder till övriga företag som det finns ett ägarintresse i": { + "account_number": "2373" + } + }, + "239 Övriga långfristiga skulder": { + "is_group": 1, + "Övriga långfristiga skulder": { + "account_number": "2390" + }, + "Avbetalningskontrakt, långfristig del": { + "account_number": "2391" + }, + "Villkorliga långfristiga skulder": { + "account_number": "2392" + }, + "Lån från närstående personer, långfristig del": { + "account_number": "2393" + }, + "Långfristiga leverantörskrediter": { + "account_number": "2394" + }, + "Andra långfristiga lån i utländsk valuta": { + "account_number": "2395" + }, + "Derivat": { + "account_number": "2396" + }, + "Mottagna depositioner, långfristiga": { + "account_number": "2397" + }, + "Övriga långfristiga skulder övriga": { + "account_number": "2399" + } + } + }, + "24 Kortfristiga skulder till kreditinstitut, kunder och leverantörer": { + "is_group": 1, + "241 Andra kortfristiga låneskulder till kreditinstitut": { + "is_group": 1, + "Andra kortfristiga låneskulder till kreditinstitut": { + "account_number": "2410", + "account_type": "Payable" + }, + "Kortfristiga lån från kreditinstitut": { + "account_number": "2411" + }, + "Byggnadskreditiv, kortfristig del": { + "account_number": "2412" + }, + "Kortfristig del av långfristiga skulder till kreditinstitut": { + "account_number": "2417" + }, + "Övriga kortfristiga skulder till kreditinstitut": { + "account_number": "2419" + } + }, + "242 Förskott från kunder": { + "is_group": 1, + "Förskott från kunder": { + "account_number": "2420", + "account_type": "Payable" + }, + "Ej inlösta presentkort": { + "account_number": "2421" + }, + "Övriga förskott från kunder": { + "account_number": "2429" + } + }, + "243 Pågående arbeten": { + "is_group": 1, + "Pågående arbeten": { + "account_number": "2430", + "account_type": "Payable" + }, + "Pågående arbeten, fakturering": { + "account_number": "2431" + }, + "Pågående arbeten, nedlagda kostnader": { + "account_number": "2438" + }, + "Beräknad fÖrändring av pågående arbeten": { + "account_number": "2439" + } + }, + "244 Leverantörsskulder": { + "is_group": 1, + "Leverantörsskulder": { + "account_number": "2440", + "account_type": "Payable" + }, + "Leverantörsskulder övriga": { + "account_number": "2441" + }, + "Konsignationsskulder": { + "account_number": "2443" + }, + "Tvistiga leverantörsskulder": { + "account_number": "2445" + }, + "Ej reskontraförda leverantörsskulder": { + "account_number": "2448", + "account_type": "Stock Received But Not Billed" + } + }, + "245 Fakturerad men ej upparbetad intäkt": { + "is_group": 1, + "Fakturerad men ej upparbetad intäkt": { + "account_number": "2450" + } + }, + "246 Leverantörsskulder till koncernföretag": { + "is_group": 1, + "Leverantörsskulder till koncernföretag": { + "account_number": "2460" + }, + "Leverantörsskulder till moderföretag": { + "account_number": "2461" + }, + "Leverantörsskulder till dotterföretag": { + "account_number": "2462" + }, + "Leverantörsskulder till andra koncernföretag": { + "account_number": "2463" + } + }, + "247 Leverantörsskulder till intresseföretag, gemensamt styrda företag och övriga företag som det finns ett ägarintresse i": { + "is_group": 1, + "Leverantörsskulder till intresseföretag, gemensamt styrda företag och övriga företag som det finns ett ägarintresse i": { + "account_number": "2470" + }, + "Leverantörsskulder till intresseföretag": { + "account_number": "2471" + }, + "Leverantörsskulder till gemensamt styrda företag": { + "account_number": "2472" + }, + "Leverantörsskulder till övriga företag som det finns ett ägarintresse i": { + "account_number": "2473" + } + }, + "248 Checkräkningskredit, kortfristig": { + "is_group": 1, + "Checkräkningskredit, kortfristig": { + "account_number": "2480" + } + }, + "249 Övriga kortfristiga skulder till kreditinstitut, kunder och leverantörer": { + "is_group": 1, + "Övriga kortfristiga skulder till kreditinstitut, kunder och leverantörer": { + "account_number": "2490" + }, + "Avräkning spelarrangörer": { + "account_number": "2491" + }, + "Växelskulder": { + "account_number": "2492" + }, + "Andra övriga kortfristiga skulder": { + "account_number": "2499" + } + } + }, + "25 Skatteskulder": { + "is_group": 1, + "251 Skatteskulder": { + "is_group": 1, + "Skatteskulder": { + "account_number": "2510" + }, + "Beräknad inkomstskatt": { + "account_number": "2512" + }, + "Beräknad fastighetsskatt/fastighetsavgift": { + "account_number": "2513" + }, + "Beräknad särskild löneskatt på pensionskostnader": { + "account_number": "2514" + }, + "Beräknad avkastningsskatt": { + "account_number": "2515" + }, + "Beräknad utländsk skatt": { + "account_number": "2517" + }, + "Betald F-skatt": { + "account_number": "2518" + } + } + }, + "26 Moms och punktskatter": { + "is_group": 1, + "261 Utgående moms, 25 %": { + "is_group": 1, + "Utgående moms, 25 %": { + "account_number": "2610", + "account_type": "Tax", + "tax_rate": 25.0 + }, + "Utgående moms på försäljning inom Sverige, 25 %": { + "account_number": "2611", + "account_type": "Tax", + "tax_rate": 25.0 + }, + "Utgående moms på egna uttag, 25 %": { + "account_number": "2612", + "account_type": "Tax", + "tax_rate": 25.0 + }, + "Utgående moms för uthyrning, 25 %": { + "account_number": "2613", + "account_type": "Tax", + "tax_rate": 25.0 + }, + "Utgående moms omvänd skattskyldighet, 25 %": { + "account_number": "2614", + "account_type": "Tax", + "tax_rate": 25.0 + }, + "Utgående moms import av varor, 25 %": { + "account_number": "2615", + "account_type": "Tax", + "tax_rate": 25.0 + }, + "Utgående moms VMB 25 %": { + "account_number": "2616", + "account_type": "Tax", + "tax_rate": 25.0 + }, + "Vilande utgående moms, 25 %": { + "account_number": "2618", + "account_type": "Tax", + "tax_rate": 25.0 + } + }, + "262 Utgående moms, 12 %": { + "is_group": 1, + "Utgående moms, 12 %": { + "account_number": "2620", + "account_type": "Tax", + "tax_rate": 12.0 + }, + "Utgående moms på försäljning inom Sverige, 12 %": { + "account_number": "2621", + "account_type": "Tax", + "tax_rate": 12.0 + }, + "Utgående moms på egna uttag, 12 %": { + "account_number": "2622", + "account_type": "Tax", + "tax_rate": 12.0 + }, + "Utgående moms för uthyrning, 12 %": { + "account_number": "2623", + "account_type": "Tax", + "tax_rate": 12.0 + }, + "Utgående moms omvänd skattskyldighet, 12 %": { + "account_number": "2624", + "account_type": "Tax", + "tax_rate": 12.0 + }, + "Utgående moms import av varor, 12 %": { + "account_number": "2625", + "account_type": "Tax", + "tax_rate": 12.0 + }, + "Utgående moms VMB 12 %": { + "account_number": "2626", + "account_type": "Tax", + "tax_rate": 12.0 + }, + "Vilande utgående moms, 12 %": { + "account_number": "2628", + "account_type": "Tax", + "tax_rate": 12.0 + } + }, + "263 Utgående moms, 6 %": { + "is_group": 1, + "Utgående moms, 6 %": { + "account_number": "2630", + "account_type": "Tax", + "tax_rate": 6.0 + }, + "Utgående moms på försäljning inom Sverige, 6 %": { + "account_number": "2631", + "account_type": "Tax", + "tax_rate": 6.0 + }, + "Utgående moms på egna uttag, 6 %": { + "account_number": "2632", + "account_type": "Tax", + "tax_rate": 6.0 + }, + "Utgående moms för uthyrning, 6 %": { + "account_number": "2633", + "account_type": "Tax", + "tax_rate": 6.0 + }, + "Utgående moms omvänd skattskyldighet, 6 %": { + "account_number": "2634", + "account_type": "Tax", + "tax_rate": 6.0 + }, + "Utgående moms import av varor, 6 %": { + "account_number": "2635", + "account_type": "Tax", + "tax_rate": 6.0 + }, + "Utgående moms VMB 6 %": { + "account_number": "2636", + "account_type": "Tax", + "tax_rate": 6.0 + }, + "Vilande utgående moms, 6 %": { + "account_number": "2638", + "account_type": "Tax", + "tax_rate": 6.0 + } + }, + "264 Ingående moms": { + "is_group": 1, + "Ingående moms": { + "account_number": "2640", + "account_type": "Tax" + }, + "Debiterad ingående moms": { + "account_number": "2641", + "account_type": "Tax" + }, + "Debiterad ingående moms i anslutning till frivillig skattskyldighet": { + "account_number": "2642", + "account_type": "Tax" + }, + "Beräknad ingående moms på förvärv från utlandet": { + "account_number": "2645", + "account_type": "Tax" + }, + "Ingående moms på uthyrning": { + "account_number": "2646", + "account_type": "Tax" + }, + "Ingående moms omvänd skattskyldighet varor och tjänster i Sverige": { + "account_number": "2647", + "account_type": "Tax" + }, + "Vilande ingående moms": { + "account_number": "2648", + "account_type": "Tax" + }, + "Ingående moms, blandad verksamhet": { + "account_number": "2649", + "account_type": "Tax" + } + }, + "265 Redovisningskonto för moms": { + "is_group": 1, + "Redovisningskonto för moms": { + "account_number": "2650", + "account_type": "Tax" + } + }, + "266 Punktskatter": { + "is_group": 1, + "Punktskatter": { + "account_number": "2660", + "account_type": "Tax" + } + }, + "267 Utgående moms, OSS": { + "is_group": 1, + "Utgående moms på försäljning inom EU, OSS": { + "account_number": "2670", + "account_type": "Tax" + } + } + }, + "27 Personalens skatter, avgifter och löneavdrag": { + "is_group": 1, + "271 Personalskatt": { + "is_group": 1, + "Personalskatt": { + "account_number": "2710" + } + }, + "273 Lagstadgade sociala avgifter och särskild löneskatt": { + "is_group": 1, + "Lagstadgade sociala avgifter och särskild löneskatt": { + "account_number": "2730" + }, + "Avräkning lagstadgade sociala avgifter": { + "account_number": "2731" + }, + "Avräkning särskild löneskatt": { + "account_number": "2732" + } + }, + "274 Avtalade sociala avgifter": { + "is_group": 1, + "Avtalade sociala avgifter": { + "account_number": "2740" + } + }, + "275 Utmätning i lön m.m.": { + "is_group": 1, + "Utmätning i lön m.m.": { + "account_number": "2750" + } + }, + "276 Semestermedel": { + "is_group": 1, + "Semestermedel": { + "account_number": "2760" + }, + "Avräkning semesterlöner": { + "account_number": "2761" + }, + "Semesterlönekassa": { + "account_number": "2762" + } + }, + "279 Övriga löneavdrag": { + "is_group": 1, + "Övriga löneavdrag": { + "account_number": "2790" + }, + "Personalens intressekonto": { + "account_number": "2791" + }, + "Lönsparande": { + "account_number": "2792" + }, + "Gruppförsäkringspremier": { + "account_number": "2793" + }, + "Fackföreningsavgifter": { + "account_number": "2794" + }, + "Mätnings- och granskningsarvoden": { + "account_number": "2795" + }, + "Övriga löneavdrag övriga": { + "account_number": "2799" + } + } + }, + "28 Övriga kortfristiga skulder": { + "is_group": 1, + "281 Avräkning för factoring och belånade kontraktsfordringar": { + "is_group": 1, + "Avräkning för factoring och belånade kontraktsfordringar": { + "account_number": "2810" + }, + "Avräkning för factoring": { + "account_number": "2811" + }, + "Avräkning för belånade kontraktsfordringar": { + "account_number": "2812" + } + }, + "282 Kortfristiga skulder till anställda": { + "is_group": 1, + "Kortfristiga skulder till anställda": { + "account_number": "2820" + }, + "Löneskulder": { + "account_number": "2821" + }, + "Reseräkningar": { + "account_number": "2822" + }, + "Tantiem, gratifikationer": { + "account_number": "2823" + }, + "Övriga kortfristiga skulder till anställda": { + "account_number": "2829" + } + }, + "283 Avräkning för annans räkning": { + "is_group": 1, + "Avräkning för annans räkning": { + "account_number": "2830" + } + }, + "284 Kortfristiga låneskulder": { + "is_group": 1, + "Kortfristiga låneskulder": { + "account_number": "2840" + }, + "Kortfristig del av långfristiga skulder": { + "account_number": "2841" + }, + "Övriga kortfristiga låneskulder": { + "account_number": "2849" + } + }, + "285 Avräkning för skatter och avgifter (skattekonto)": { + "is_group": 1, + "Avräkning för skatter och avgifter (skattekonto)": { + "account_number": "2850" + }, + "Anståndsbelopp för moms, arbetsgivaravgifter och personalskatt": { + "account_number": "2852" + } + }, + "286 Kortfristiga skulder till koncernföretag": { + "is_group": 1, + "Kortfristiga skulder till koncernföretag": { + "account_number": "2860" + }, + "Kortfristiga skulder till moderföretag": { + "account_number": "2861" + }, + "Kortfristiga skulder till dotterföretag": { + "account_number": "2862" + }, + "Kortfristiga skulder till andra koncernföretag": { + "account_number": "2863" + } + }, + "287 Kortfristiga skulder till intresseföretag, gemensamt styrda företag": { + "is_group": 1, + "Kortfristiga skulder till intresseföretag, gemensamt styrda företag": { + "account_number": "2870" + }, + "Kortfristiga skulder till intresseföretag": { + "account_number": "2871" + }, + "Kortfristiga skulder till gemensamt styrda företag": { + "account_number": "2872" + }, + "Kortfristiga skulder till övriga företag": { + "account_number": "2873" + } + }, + "288 Skuld erhållna bidrag": { + "is_group": 1, + "Skuld erhållna bidrag": { + "account_number": "2880" + } + }, + "289 Övriga kortfristiga skulder": { + "is_group": 1, + "Övriga kortfristiga skulder": { + "account_number": "2890" + }, + "Skulder under indrivning": { + "account_number": "2891" + }, + "Inre reparationsfond/underhållsfond": { + "account_number": "2892" + }, + "Skulder till närstående personer, kortfristig del": { + "account_number": "2893" + }, + "Derivat (kortfristiga skulder)": { + "account_number": "2895" + }, + "Mottagna depositioner, kortfristiga": { + "account_number": "2897" + }, + "Outtagen vinstutdelning": { + "account_number": "2898" + }, + "Övriga kortfristiga skulder övriga": { + "account_number": "2899" + } + } + }, + "29 Upplupna kostnader och förutbetalda intäkter": { + "is_group": 1, + "291 Upplupna löner": { + "is_group": 1, + "Upplupna löner": { + "account_number": "2910" + }, + "Löneskulder": { + "account_number": "2911" + }, + "Ackordsöverskott": { + "account_number": "2912" + }, + "Övriga upplupna löner": { + "account_number": "2919" + } + }, + "292 Upplupna semesterlöner": { + "is_group": 1, + "Upplupna semesterlöner": { + "account_number": "2920" + } + }, + "293 Upplupna pensionskostnader": { + "is_group": 1, + "Upplupna pensionskostnader": { + "account_number": "2930" + }, + "Upplupna pensionsutbetalningar": { + "account_number": "2931" + } + }, + "294 Upplupna lagstadgade sociala och andra avgifter": { + "is_group": 1, + "Upplupna lagstadgade sociala och andra avgifter": { + "account_number": "2940" + }, + "Beräknade upplupna lagstadgade sociala avgifter": { + "account_number": "2941" + }, + "Beräknad upplupen särskild löneskatt": { + "account_number": "2942" + }, + "Beräknad upplupen särskild löneskatt på pensionskostnader, deklarationspost": { + "account_number": "2943" + }, + "Beräknad upplupen avkastningsskatt på pensionskostnader": { + "account_number": "2944" + } + }, + "295 Upplupna avtalade sociala avgifter": { + "is_group": 1, + "Upplupna avtalade sociala avgifter": { + "account_number": "2950" + }, + "Upplupna avtalade arbetsmarknadsförsäkringar": { + "account_number": "2951" + }, + "Upplupna avtalade pensionsförsäkringsavgifter, deklarationspost": { + "account_number": "2959" + } + }, + "296 Upplupna räntekostnader": { + "is_group": 1, + "Upplupna räntekostnader": { + "account_number": "2960" + } + }, + "297 Förutbetalda intäkter": { + "is_group": 1, + "Förutbetalda intäkter": { + "account_number": "2970" + }, + "Förutbetalda hyresintäkter": { + "account_number": "2971" + }, + "Förutbetalda medlemsavgifter": { + "account_number": "2972" + }, + "Övriga förutbetalda intäkter": { + "account_number": "2979" + } + }, + "298 Upplupna avtalskostnader": { + "is_group": 1, + "Upplupna avtalskostnader": { + "account_number": "2980" + } + }, + "299 Övriga upplupna kostnader och förutbetalda intäkter": { + "is_group": 1, + "Övriga upplupna kostnader och förutbetalda intäkter": { + "account_number": "2990" + }, + "Beräknat arvode för bokslut": { + "account_number": "2991" + }, + "Beräknat arvode för revision": { + "account_number": "2992" + }, + "Ospecificerad skuld till leverantörer": { + "account_number": "2993" + }, + "Ej ankomna leverantörsfakturor": { + "account_number": "2995" + }, + "Övriga upplupna kostnader och förutbetalda intäkter övriga": { + "account_number": "2998" + }, + "OBS-konto": { + "account_number": "2999" + } + } + } + }, + "3 Rörelsens inkomster/intäkter": { + "root_type": "Income", + "is_group": 1, + "30 Huvudintäkter": { + "account_type": "Income Account", + "is_group": 1, + "300 Försäljning inom Sverige": { + "is_group": 1, + "Försäljning inom Sverige": { + "account_number": "3000", + "account_type": "Income Account" + }, + "Försäljning inom Sverige, 25 % moms": { + "account_number": "3001" + }, + "Försäljning inom Sverige, 12 % moms": { + "account_number": "3002" + }, + "Försäljning inom Sverige, 6 % moms": { + "account_number": "3003" + }, + "Försäljning inom Sverige, momsfri": { + "account_number": "3004" + } + } + }, + "31 Huvudintäkter": { + "account_type": "Income Account", + "is_group": 1, + "310 Försäljning av varor utanför Sverige": { + "is_group": 1, + "Försäljning av varor utanför Sverige": { + "account_number": "3100" + }, + "Försäljning varor till land utanför EU": { + "account_number": "3105" + }, + "Försäljning varor till annat EU-land, momspliktig": { + "account_number": "3106" + }, + "Försäljning varor till annat EU-land, momsfri": { + "account_number": "3108" + } + } + }, + "32 Huvudintäkter": { + "account_type": "Income Account", + "is_group": 1, + "320 Försäljning VMB och omvänd moms": { + "account_type": "Income Account", + "is_group": 1, + "Försäljning VMB och omvänd moms.": { + "account_number": "3200" + } + }, + "321 Försäljning positiv VMB 25 %": { + "is_group": 1, + "Försäljning positiv VMB 25 %": { + + "account_number": "3211" + }, + "Försäljning negativ VMB 25 %": { + + "account_number": "3212" + } + }, + "323 Försäljning inom byggsektorn, omvänd skattskyldighet moms": { + "account_type": "Income Account", + "is_group": 1, + "Försäljning inom byggsektorn, omvänd skattskyldighet moms": { + "account_number": "3231" + } + } + }, + "33 Huvudintäkter": { + "account_type": "Income Account", + "is_group": 1, + "330 Försäljning av tjänster utanför Sverige": { + "is_group": 1, + "Försäljning av tjänster utanför Sverige": { + "account_number": "3300" + }, + "Försäljning tjänster till land utanför EU": { + "account_number": "3305" + }, + "Försäljning tjänster till annat EU-land": { + "account_type": "Income Account" + } + } + }, + "34 Huvudintäkter": { + "account_type": "Income Account", + "is_group": 1, + "340 Försäljning, egna uttag": { + "is_group": 1, + "Försäljning, egna uttag": { + "account_number": "3400" + }, + "Egna uttag momspliktiga, 25 %": { + "account_number": "3401" + }, + "Egna uttag momspliktiga, 12 %": { + "account_number": "3402" + }, + "Egna uttag momspliktiga, 6 %": { + "account_number": "3403" + }, + "Egna uttag, momsfria": { + "account_number": "3404" + } + } + }, + "35 Fakturerade kostnader": { + "is_group": 1, + "350 Fakturerade kostnader (gruppkonto)": { + "account_type": "Income Account", + "is_group": 1, + "Fakturerade kostnader (gruppkonto)": { + "account_number": "3500" + } + }, + "351 Fakturerat emballage": { + "is_group": 1, + "Fakturerat emballage": { + "account_type": "Income Account", + "account_number": "3510" + }, + "Fakturerat emballage.": { + "account_number": "3511" + }, + "Returnerat emballage": { + "account_number": "3518" + } + }, + "352 Fakturerade frakter": { + "is_group": 1, + "Fakturerade frakter": { + "account_type": "Income Account", + "account_number": "3520" + }, + "Fakturerade frakter, EU-land": { + "account_type": "Income Account", + "account_number": "3521" + }, + "Fakturerade frakter, export": { + "account_type": "Income Account", + "account_number": "3522" + } + }, + "353 Fakturerade tull- och speditionskostnader m.m.": { + "account_type": "Income Account", + "is_group": 1, + "Fakturerade tull- och speditionskostnader m.m.": { + "account_number": "3530" + } + }, + "354 Faktureringsavgifter": { + "account_type": "Income Account", + "is_group": 1, + "Faktureringsavgifter": { + "account_type": "Income Account", + "account_number": "3540" + }, + "Faktureringsavgifter, EU-land": { + "account_type": "Income Account", + "account_number": "3541" + }, + "Faktureringsavgifter, export": { + "account_type": "Income Account", + "account_number": "3542" + } + }, + "355 Fakturerade resekostnader": { + "account_type": "Income Account", + "is_group": 1, + "Fakturerade resekostnader": { + "account_number": "3550" + } + }, + "356 Fakturerade kostnader till koncernföretag": { + "account_type": "Income Account", + "is_group": 1, + "Fakturerade kostnader till koncernföretag": { + "account_number": "3560" + }, + "Fakturerade kostnader till moderföretag": { + "account_number": "3561" + }, + "Fakturerade kostnader till dotterföretag": { + "account_number": "3562" + }, + "Fakturerade kostnader till andra koncernföretag": { + "account_number": "3563" + } + }, + "357 Fakturerade kostnader till intresseföretag, gemensamt styrda företag och övriga företag": { + "account_type": "Income Account", + "is_group": 1, + "Fakturerade kostnader till intresseföretag, gemensamt styrda företag": { + "account_number": "3570" + } + }, + "359 Övriga fakturerade kostnader": { + "account_type": "Income Account", + "is_group": 1, + "Övriga fakturerade kostnader": { + "account_number": "3590" + } + } + }, + "36 Rörelsens sidointäkter": { + "is_group": 1, + "360 Rörelsens sidointäkter (gruppkonto)": { + "account_type": "Income Account", + "is_group": 1, + "Rörelsens sidointäkter (gruppkonto)": { + "account_number": "3600" + } + }, + "361 Försäljning av material": { + "is_group": 1, + "Försäljning av material": { + "account_number": "3610" + }, + "Försäljning av råmaterial": { + "account_number": "3611" + }, + "Försäljning av skrot": { + "account_number": "3612" + }, + "Försäljning av förbrukningsmaterial": { + "account_number": "3613" + }, + "Försäljning av övrigt material": { + "account_number": "3619" + } + }, + "362 Tillfällig uthyrning av personal": { + "account_type": "Income Account", + "is_group": 1, + "Tillfällig uthyrning av personal": { + "account_number": "3620" + } + }, + "363 Tillfällig uthyrning av transportmedel": { + "account_type": "Income Account", + "is_group": 1, + "Tillfällig uthyrning av transportmedel": { + "account_number": "3630" + } + }, + "367 Intäkter från värdepapper": { + "is_group": 1, + "Intäkter från värdepapper": { + "account_number": "3670" + }, + "Försäljning av värdepapper": { + "account_number": "3671" + }, + "Utdelning från värdepapper": { + "account_number": "3672" + }, + "Övriga intäkter från värdepapper": { + "account_number": "3679" + } + }, + "368 Management fees": { + "account_type": "Income Account", + "is_group": 1, + "Management fees": { + "account_number": "3680" + } + }, + "369 Övriga sidointäkter": { + "account_type": "Income Account", + "is_group": 1, + "Övriga sidointäkter": { + "account_number": "3690" + } + } + }, + "37 Intäktskorrigeringar": { + "is_group": 1, + "370 Intäktskorrigeringar (gruppkonto)": { + "account_type": "Income Account", + "is_group": 1, + "Intäktskorrigeringar (gruppkonto)": { + "account_number": "3700" + } + }, + "371 Ofördelade intäktsreduktioner": { + "is_group": 1, + "Ofördelade intäktsreduktioner": { + "account_number": "3710" + } + }, + "373 Lämnade rabatter": { + "is_group": 1, + "Lämnade rabatter": { + "account_number": "3730" + }, + "Lämnade kassarabatter": { + "account_number": "3731" + }, + "Lämnade mängdrabatter": { + "account_number": "3732" + } + }, + "374 Öres- och kronutjämning": { + "is_group": 1, + "Öres- och kronutjämning": { + "account_number": "3740", + "account_type": "Round Off" + } + }, + "375 Punktskatter": { + "is_group": 1, + "Punktskatter": { + "account_number": "3750" + }, + "Intäktsförda punktskatter (kreditkonto)": { + "account_number": "3751" + }, + "Skuldförda punktskatter (debetkonto)": { + "account_number": "3752" + } + }, + "379 Övriga intäktskorrigeringar": { + + "is_group": 1, + "Övriga intäktskorrigeringar": { + "account_number": "3790" + } + } + }, + "38 Aktiverat arbete för egen räkning": { + "is_group": 1, + "380 Aktiverat arbete för egen räkning (gruppkonto)": { + "account_type": "Income Account", + "is_group": 1, + "Aktiverat arbete för egen räkning (gruppkonto)": { + "account_number": "3800" + } + }, + "384 Aktiverat arbete (material)": { + "account_type": "Income Account", + "is_group": 1, + "Aktiverat arbete (material)": { + "account_number": "3840" + } + }, + "385 Aktiverat arbete (omkostnader)": { + "account_type": "Income Account", + "is_group": 1, + "Aktiverat arbete (omkostnader)": { + "account_number": "3850" + } + }, + "387 Aktiverat arbete (personal)": { + "account_type": "Income Account", + "is_group": 1, + "Aktiverat arbete (personal)": { + "account_number": "3870" + } + } + }, + "39 Övriga rörelseintäkter": { + "account_type": "Income Account", + "is_group": 1, + "390 Övriga rörelseintäkter (gruppkonto)": { + "account_type": "Income Account", + "is_group": 1, + "Övriga rörelseintäkter (gruppkonto)": { + "account_number": "3900" + } + }, + "391 Hyres- och arrendeintäkter": { + "is_group": 1, + "Hyres- och arrendeintäkter": { + "account_number": "3910" + }, + "Hyresintäkter": { + "account_number": "3911" + }, + "Arrendeintäkter": { + "account_number": "3912" + }, + "Frivilligt momspliktiga hyresintäkter": { + + "account_number": "3913" + }, + "Övriga momspliktiga hyresintäkter": { + "account_number": "3914" + } + }, + "392 Provisionsintäkter, licensintäkter och royalties": { + "is_group": 1, + "Provisionsintäkter, licensintäkter och royalties": { + "account_number": "3920" + }, + "Provisionsintäkter": { + "account_number": "3921" + }, + "Licensintäkter och royalties": { + "account_number": "3922" + }, + "Franchiseintäkter": { + "account_number": "3925" + } + }, + "394 Orealiserade negativa/positiva värdeförändringar på säkringsinstrument": { + "account_type": "Income Account", + "is_group": 1, + "Orealiserade negativa/positiva värdeförändringar på säkringsinstrument": { + "account_number": "3940" + } + }, + "395 Återvunna, tidigare avskrivna kundfordringar": { + "account_type": "Income Account", + "is_group": 1, + "Återvunna, tidigare avskrivna kundfordringar": { + "account_number": "3950" + } + }, + "396 Valutakursvinster på fordringar och skulder av rörelsekaraktär": { + "account_type": "Income Account", + "is_group": 1, + "Valutakursvinster på fordringar och skulder av rörelsekaraktär": { + "account_number": "3960" + } + }, + "397 Vinst vid avyttring av immateriella och materiella anläggningstillgångar": { + "is_group": 1, + "Vinst vid avyttring av immateriella och materiella anläggningstillgångar": { + + "account_number": "3970" + }, + "Vinst vid avyttring av immateriella anläggningstillgångar": { + "account_number": "3971" + }, + "Vinst vid avyttring av byggnader och mark": { + "account_number": "3972" + }, + "Vinst vid avyttring av maskiner och inventarier": { + "account_number": "3973" + } + }, + "398 Erhållna offentliga bidrag": { + "is_group": 1, + "Erhållna offentliga bidrag": { + + "account_number": "3980" + }, + "Erhållna EU-bidrag": { + "account_number": "3981" + }, + "Erhållna statliga bidrag": { + "account_number": "3985" + }, + "Erhållna kommunala bidrag": { + "account_number": "3987" + }, + "Erhållna offentliga bidrag för personal": { + "account_number": "3988" + }, + "Övriga erhållna offentliga bidrag": { + "account_number": "3989" + } + }, + "399 Övriga ersättningar, bidrag och intäkter": { + "is_group": 1, + "Övriga ersättningar, bidrag och intäkter": { + "account_number": "3990" + }, + "Konfliktersättning": { + "account_number": "3991" + }, + "Erhållna skadestånd": { + "account_number": "3992" + }, + "Erhållna donationer och gåvor": { + "account_number": "3993" + }, + "Försäkringsersättningar": { + "account_number": "3994" + }, + "Erhållet ackord på skulder av rörelsekaraktär": { + "account_number": "3995" + }, + "Erhållna reklambidrag": { + "account_number": "3996" + }, + "Sjuklöneersättning": { + "account_number": "3997" + }, + "Återbäring av överskott från försäkringsföretag": { + "account_number": "3998" + }, + "Övriga rörelseintäkter": { + "account_number": "3999" + } + } + } + }, + "4 Utgifter/kostnader för varor, material och vissa köpta tjänster": { + "root_type": "Expense", + "is_group": 1, + "40 Inköp av varor och material": { + "account_type": "Expense Account", + "is_group": 1, + "400 Inköp av varor från Sverige": { + "is_group": 1, + "Inköp av varor från Sverige": { + "account_number": "4000", + "account_type": "Expense Account" + } + } + }, + "41 Inköp av varor och material": { + "account_type": "Expense Account", + "is_group": 1, + "410 Inköp av varor från Sverige": { + "is_group": 1, + "Inköp av varor från Sverige": { + "account_number": "4100", + "account_type": "Expense Account" + } + } + }, + "42 Inköp av varor och material": { + "is_group": 1, + "420 Sålda varor VMB": { + "is_group": 1, + "Sålda varor VMB": { + "account_number": "4200", + "account_type": "Expense Account" + } + }, + "421 Sålda varor positiv VMB 25 %": { + "is_group": 1, + "Sålda varor positiv VMB 25 %": { + "account_number": "4211", + "account_type": "Expense Account" + }, + "Sålda varor negativ VMB 25 %": { + "account_number": "4212", + "account_type": "Expense Account" + } + } + }, + "43 Inköp av varor och material": { + "account_type": "Expense Account", + "is_group": 1, + "430 Inköp av varor från Sverige": { + "is_group": 1, + "Inköp av varor från Sverige": { + "account_number": "4300", + "account_type": "Expense Account" + } + } + }, + "44 Inköp av varor och material": { + "is_group": 1, + "440 Momspliktiga inköp i Sverige": { + "is_group": 1, + "Momspliktiga inköp i Sverige": { + "account_number": "4400", + "account_type": "Expense Account" + } + }, + "441 Inköpta varor i Sverige, omvänd skattskyldighet": { + "is_group": 1, + "Inköpta varor i Sverige, omvänd skattskyldighet, 25 % moms": { + "account_number": "4415", + "account_type": "Expense Account" + }, + "Inköpta varor i Sverige, omvänd skattskyldighet, 12 % moms": { + "account_number": "4416", + "account_type": "Expense Account" + }, + "Inköpta varor i Sverige, omvänd skattskyldighet, 6 % moms": { + "account_number": "4417", + "account_type": "Expense Account" + } + }, + "442 Inköpta tjänster i Sverige, omvänd skattskyldighet": { + "is_group": 1, + "Inköpta tjänster i Sverige, omvänd skattskyldighet, 25 % moms": { + "account_number": "4425", + "account_type": "Expense Account" + }, + "Inköpta tjänster i Sverige, omvänd skattskyldighet, 12 %": { + "account_number": "4426", + "account_type": "Expense Account" + }, + "Inköpta tjänster i Sverige, omvänd skattskyldighet, 6 %": { + "account_number": "4427", + "account_type": "Expense Account" + } + } + }, + "45 Inköp av varor och material": { + "is_group": 1, + "450 Övriga momspliktiga inköp": { + "is_group": 1, + "Övriga momspliktiga inköp": { + "account_number": "4500", + "account_type": "Expense Account" + } + }, + "451 Inköp av varor från annat EU-land": { + "is_group": 1, + "Inköp av varor från annat EU-land, 25 %": { + "account_number": "4515", + "account_type": "Expense Account" + }, + "Inköp av varor från annat EU-land, 12 %": { + "account_number": "4516", + "account_type": "Expense Account" + }, + "Inköp av varor från annat EU-land, 6 %": { + "account_number": "4517", + "account_type": "Expense Account" + }, + "Inköp av varor från annat EU-land, momsfri": { + "account_number": "4518", + "account_type": "Expense Account" + } + }, + "453 Inköp av tjänster från ett land utanför EU": { + "is_group": 1, + "Inköp av tjänster från ett land utanför EU, 25 % moms": { + "account_number": "4531", + "account_type": "Expense Account" + }, + "Inköp av tjänster från ett land utanför EU, 12 % moms": { + "account_number": "4532", + "account_type": "Expense Account" + }, + "Inköp av tjänster från ett land utanför EU, 6 % moms": { + "account_number": "4533", + "account_type": "Expense Account" + }, + "Inköp av tjänster från annat EU-land, 25 %": { + "account_number": "4535", + "account_type": "Expense Account" + }, + "Inköp av tjänster från annat EU-land, 12 %": { + "account_number": "4536", + "account_type": "Expense Account" + }, + "Inköp av tjänster från annat EU-land, 6 %": { + "account_number": "4537", + "account_type": "Expense Account" + }, + "Inköp av tjänster från annat EU-land, momsfri": { + "account_number": "4538", + "account_type": "Expense Account" + } + }, + "454 Import av varor": { + "is_group": 1, + "Import av varor, 25 % moms": { + "account_number": "4545", + "account_type": "Expense Account" + }, + "Import av varor, 12 % moms": { + "account_number": "4546", + "account_type": "Expense Account" + }, + "Import av varor, 6 % moms": { + "account_number": "4547", + "account_type": "Expense Account" + } + } + }, + "46 Legoarbeten, underentreprenader": { + "is_group": 1, + "460 Legoarbeten och underentreprenader (gruppkonto)": { + "is_group": 1, + "Legoarbeten och underentreprenader (gruppkonto)": { + "account_number": "4600", + "account_type": "Expense Account" + } + } + }, + "47 Reduktion av inköpspriser": { + "is_group": 1, + "470 Reduktion av inköpspriser (gruppkonto)": { + "account_type": "Expense Account", + "is_group": 1, + "Reduktion av inköpspriser (gruppkonto)": { + "account_number": "4700", + "account_type": "Expense Account" + } + }, + "473 Erhållna rabatter": { + "is_group": 1, + "Erhållna rabatter": { + "account_number": "4730" + }, + "Erhållna kassarabatter": { + "account_number": "4731" + }, + "Erhållna mängdrabatter (inkl. bonus)": { + "account_number": "4732" + }, + "Erhållet aktivitetsstöd": { + "account_number": "4733" + } + }, + "479 Övriga reduktioner av inköpspriser": { + "is_group": 1, + "Övriga reduktioner av inköpspriser": { + "account_number": "4790" + } + } + }, + "49 Förändring av lager, produkter i arbete och pågående arbeten": { + "is_group": 1, + "490 Förändring av lager (gruppkonto)": { + "is_group": 1, + "Förändring av lager (gruppkonto)": { + "account_number": "4900", + "account_type": "Stock Adjustment" + } + }, + "491 Förändring av lager av råvaror": { + "is_group": 1, + "Förändring av lager av råvaror": { + "account_number": "4910", + "account_type": "Expense Account" + } + }, + "492 Förändring av lager av tillsatsmaterial och förnödenheter": { + "is_group": 1, + "Förändring av lager av tillsatsmaterial och förnödenheter": { + "account_number": "4920", + "account_type": "Expense Account" + } + }, + "494 Förändring av produkter i arbete": { + "is_group": 1, + "Förändring av produkter i arbete": { + "account_number": "4940", + "account_type": "Expense Account" + }, + "Förändring av produkter i arbete, material och utlägg": { + "account_number": "4944" + }, + "Förändring av produkter i arbete, omkostnader": { + "account_number": "4945" + }, + "Förändring av produkter i arbete, personalkostnader": { + "account_number": "4947" + } + }, + "495 Förändring av lager av färdiga varor": { + "is_group": 1, + "Förändring av lager av färdiga varor": { + "account_number": "4950", + "account_type": "Expense Account" + } + }, + "496 Förändring av lager av handelsvaror": { + "is_group": 1, + "Förändring av lager av handelsvaror": { + "account_number": "4960", + "account_type": "Stock Adjustment" + } + }, + "497 Förändring av pågående arbeten, nedlagda kostnader": { + "is_group": 1, + "Förändring av pågående arbeten, nedlagda kostnader": { + "account_number": "4970", + "account_type": "Expense Account" + }, + "Förändring av pågående arbeten, material och utlägg": { + "account_number": "4974" + }, + "Förändring av pågående arbeten, omkostnader": { + "account_number": "4975" + }, + "Förändring av pågående arbeten, personalkostnader": { + "account_number": "4977" + } + }, + "498 Förändring av lager av värdepapper": { + "is_group": 1, + "Förändring av lager av värdepapper": { + "account_number": "4980" + }, + "Sålda värdepappers anskaffningsvärde": { + "account_number": "4981" + }, + "Nedskrivning av värdepapper": { + "account_number": "4987" + }, + "Återföring av nedskrivning av värdepapper": { + "account_number": "4988" + } + } + } + }, + "5 Övriga externa rörelseutgifter/kostnader": { + "root_type": "Expense", + "is_group": 1, + "50 Lokalkostnader": { + "is_group": 1, + "500 Lokalkostnader (gruppkonto)": { + "account_type": "Expense Account", + "is_group": 1, + "Lokalkostnader (gruppkonto)": { + "account_number": "5000" + } + }, + "501 Lokalhyra": { + "is_group": 1, + "Lokalhyra": { + "account_number": "5010", + "account_type": "Expense Account" + }, + "Hyra för kontorslokaler": { + "account_number": "5011" + }, + "Hyra för garage": { + "account_number": "5012" + }, + "Hyra för lagerlokaler": { + "account_number": "5013" + } + }, + "502 El för belysning": { + "is_group": 1, + "El för belysning": { + "account_number": "5020", + "account_type": "Expense Account" + } + }, + "503 Värme": { + "is_group": 1, + "Värme": { + "account_number": "5030", + "account_type": "Expense Account" + } + }, + "504 Vatten och avlopp": { + "is_group": 1, + "Vatten och avlopp": { + "account_number": "5040", + "account_type": "Expense Account" + } + }, + "505 Lokaltillbehör": { + "is_group": 1, + "Lokaltillbehör": { + "account_number": "5050", + "account_type": "Expense Account" + } + }, + "506 Städning och renhållning": { + "is_group": 1, + "Städning och renhållning": { + "account_number": "5060", + "account_type": "Expense Account" + }, + "Städning": { + "account_number": "5061" + }, + "Sophämtning": { + "account_number": "5062" + }, + "Hyra för sopcontainer": { + "account_number": "5063" + }, + "Snöröjning": { + "account_number": "5064" + }, + "Trädgårdsskötsel": { + "account_number": "5065" + } + }, + "507 Reparation och underhåll av lokaler": { + "is_group": 1, + "Reparation och underhåll av lokaler": { + "account_number": "5070", + "account_type": "Expense Account" + } + }, + "509 Övriga lokalkostnader": { + "account_type": "Expense Account", + "is_group": 1, + "Övriga lokalkostnader": { + "account_number": "5090" + }, + "Övriga lokalkostnader, avdragsgilla": { + "account_number": "5098" + }, + "Övriga lokalkostnader, ej avdragsgilla": { + "account_number": "5099" + } + } + }, + "51 Fastighetskostnader": { + "is_group": 1, + "510 Fastighetskostnader (gruppkonto)": { + "account_type": "Expense Account", + "is_group": 1, + "Fastighetskostnader (gruppkonto)": { + "account_number": "5100" + } + }, + "511 Tomträttsavgäld/arrende": { + "account_type": "Expense Account", + "is_group": 1, + "Tomträttsavgäld/arrende": { + "account_number": "5110" + } + }, + "512 El för belysning": { + "is_group": 1, + "El för belysning": { + "account_number": "5120", + "account_type": "Expense Account" + } + }, + "513 Värme": { + "is_group": 1, + "Värme": { + "account_number": "5130", + "account_type": "Expense Account" + }, + "Uppvärmninig": { + "account_number": "5131", + "account_type": "Expense Account" + }, + "Sotning": { + "account_number": "5132", + "account_type": "Expense Account" + } + }, + "514 Vatten och avlopp": { + "is_group": 1, + "Vatten och avlopp": { + "account_number": "5140", + "account_type": "Expense Account" + } + }, + "516 Städning och renhållning": { + "is_group": 1, + "Städning och renhållning": { + "account_number": "5160", + "account_type": "Expense Account" + }, + "Städning": { + "account_number": "5161" + }, + "Sophämtning": { + "account_number": "5162" + }, + "Hyra för sopcontainer": { + "account_number": "5163" + }, + "Snöröjning": { + "account_number": "5164" + }, + "Trädgårdsskötsel": { + "account_number": "5165" + } + }, + "517 Reparation och underhåll av fastighet": { + "is_group": 1, + "Reparation och underhåll av fastighet": { + "account_number": "5170", + "account_type": "Expense Account" + } + }, + "519 Övriga fastighetskostnader": { + "is_group": 1, + "Övriga fastighetskostnader": { + "account_number": "5190" + }, + "Fastighetsskatt/fastighetsavgift": { + "account_number": "5191" + }, + "Fastighetsförsäkringspremier": { + "account_number": "5192" + }, + "Fastighetsskötsel och förvaltning": { + "account_number": "5193" + }, + "Övriga fastighetskostnader, avdragsgilla": { + "account_number": "5198" + }, + "Övriga fastighetskostnader, ej avdragsgilla": { + "account_number": "5199" + } + } + }, + "52 Hyra av anläggningstillgångar": { + "is_group": 1, + "520 Hyra av anläggningstillgångar (gruppkonto)": { + "is_group": 1, + "Hyra av anläggningstillgångar (gruppkonto)": { + "account_number": "5200", + "account_type": "Expense Account" + } + }, + "521 Hyra av maskiner och andra tekniska anläggningar": { + "is_group": 1, + "Hyra av maskiner och andra tekniska anläggningar": { + "account_number": "5210", + "account_type": "Expense Account" + }, + "Korttidshyra av maskiner och andra tekniska anläggningar": { + "account_number": "5211", + "account_type": "Expense Account" + }, + "Leasing av maskiner och andra tekniska anläggningar": { + "account_number": "5212", + "account_type": "Expense Account" + } + }, + "522 Hyra av inventarier och verktyg": { + "is_group": 1, + "Hyra av inventarier och verktyg": { + "account_number": "5220" + }, + "Korttidshyra av inventarier och verktyg": { + "account_number": "5221" + }, + "Leasing av inventarier och verktyg": { + "account_number": "5222" + } + }, + "525 Hyra av datorer": { + "is_group": 1, + "Hyra av datorer": { + "account_number": "5250" + }, + "Korttidshyra av datorer": { + "account_number": "5251" + }, + "Leasing av datorer": { + "account_number": "5252" + } + }, + "529 Övriga hyreskostnader för anläggningstillgångar": { + "account_type": "Expense Account", + "is_group": 1, + "Övriga hyreskostnader för anläggningstillgångar": { + "account_number": "5290" + } + } + }, + "53 Energikostnader": { + "is_group": 1, + "530 Energikostnader (gruppkonto)": { + "is_group": 1, + "Energikostnader (gruppkonto)": { + "account_number": "5300", + "account_type": "Expense Account" + } + }, + "531 El för drift": { + "account_type": "Expense Account", + "is_group": 1, + "El för drift": { + "account_number": "5310" + } + }, + "532 Gas": { + "account_type": "Expense Account", + "is_group": 1, + "Gas": { + "account_number": "5320" + } + }, + "533 Eldningsolja": { + "account_type": "Expense Account", + "is_group": 1, + "Eldningsolja": { + "account_number": "5330" + } + }, + "534 Stenkol och koks": { + "account_type": "Expense Account", + "is_group": 1, + "Stenkol och koks": { + "account_number": "5340" + } + }, + "535 Torv, träkol, ved och annat träbränsle": { + "account_type": "Expense Account", + "is_group": 1, + "Torv, träkol, ved och annat träbränsle": { + "account_number": "5350" + } + }, + "536 Bensin, fotogen och motorbrännolja": { + "account_type": "Expense Account", + "is_group": 1, + "Bensin, fotogen och motorbrännolja": { + "account_number": "5360" + } + }, + "537 Fjärrvärme, kyla och ånga": { + "account_type": "Expense Account", + "is_group": 1, + "Fjärrvärme, kyla och ånga": { + "account_number": "5370" + } + }, + "538 Vatten": { + "account_type": "Expense Account", + "is_group": 1, + "Vatten": { + "account_number": "5380" + } + }, + "539 Övriga energikostnader": { + "account_type": "Expense Account", + "is_group": 1, + "Övriga energikostnader": { + "account_number": "5390" + } + } + }, + "54 Förbrukningsinventarier och förbrukningsmaterial": { + "is_group": 1, + "540 Förbrukningsinventarier och förbrukningsmaterial": { + "is_group": 1, + "Förbrukningsinventarier och förbrukningsmaterial": { + "account_number": "5400" + } + }, + "541 Förbrukningsinventarier": { + "is_group": 1, + "Förbrukningsinventarier": { + "account_number": "5410", + "account_type": "Expense Account" + }, + "Förbrukningsinventarier med en livslängd på mer än ett år": { + "account_number": "5411", + "account_type": "Expense Account" + }, + "Förbrukningsinventarier med en livslängd på ett år eller mindre": { + "account_number": "5412", + "account_type": "Expense Account" + } + }, + "542 Programvaror": { + "is_group": 1, + "Programvaror": { + "account_number": "5420", + "account_type": "Expense Account" + } + }, + "543 Transportinventarier": { + "account_type": "Expense Account", + "is_group": 1, + "Transportinventarier": { + "account_number": "5430" + } + }, + "544 Förbrukningsemballage": { + "account_type": "Expense Account", + "is_group": 1, + "Förbrukningsemballage": { + "account_number": "5440" + } + }, + "546 Förbrukningsmaterial": { + "is_group": 1, + "BFörbrukningsmaterial": { + "account_number": "5460", + "account_type": "Expense Account" + } + }, + "548 Arbetskläder och skyddsmaterial": { + "account_type": "Expense Account", + "is_group": 1, + "Arbetskläder och skyddsmaterial": { + "account_number": "5480" + } + }, + "549 Övriga förbrukningsinventarier och förbrukningsmaterial": { + "account_type": "Expense Account", + "is_group": 1, + "Övriga förbrukningsinventarier och förbrukningsmaterial": { + "account_number": "5490" + }, + "Övriga förbrukningsinventarier med en livslängd på mer än ett år": { + "account_number": "5491" + }, + "Övriga förbrukningsinventarier med en livslängd på ett år eller mindre": { + "account_number": "5492" + }, + "Övrigt förbrukningsmaterial": { + "account_number": "5493" + } + } + }, + "55 Reparation och underhåll": { + "account_type": "Expense Account", + "is_group": 1, + "550 Reparation och underhåll (gruppkonto)": { + "is_group": 1, + "Reparation och underhåll (gruppkonto)": { + "account_number": "5500", + "account_type": "Expense Account" + } + }, + "551 Reparation och underhåll av maskiner och andra tekniska anläggningar": { + "account_type": "Expense Account", + "is_group": 1, + "Reparation och underhåll av maskiner och andra tekniska anläggningar": { + "account_number": "5510" + } + }, + "552 Reparation och underhåll av inventarier, verktyg och datorer m.m.": { + "account_type": "Expense Account", + "is_group": 1, + "Reparation och underhåll av inventarier, verktyg och datorer m.m.": { + "account_number": "5520" + } + }, + "553 Reparation och underhåll av installationer": { + "account_type": "Expense Account", + "is_group": 1, + "Reparation och underhåll av installationer": { + "account_number": "5530" + } + }, + "555 Reparation och underhåll av förbrukningsinventarier": { + "account_type": "Expense Account", + "is_group": 1, + "Reparation och underhåll av förbrukningsinventarier": { + "account_number": "5550" + } + }, + "558 Underhåll och tvätt av arbetskläder": { + "account_type": "Expense Account", + "is_group": 1, + "Underhåll och tvätt av arbetskläder": { + "account_number": "5580" + } + }, + "559 Övriga kostnader för reparation och underhåll": { + "account_type": "Expense Account", + "is_group": 1, + "Övriga kostnader för reparation och underhåll": { + "account_number": "5590" + } + } + }, + "56 Kostnader för transportmedel": { + "is_group": 1, + "560 Kostnader för transportmedel (gruppkonto)": { + "is_group": 1, + "Kostnader för transportmedel (gruppkonto)": { + "account_number": "5600", + "account_type": "Expense Account" + } + }, + "561 Personbilskostnader": { + "is_group": 1, + "Personbilskostnader": { + "account_number": "5610", + "account_type": "Expense Account" + }, + "Drivmedel för personbilar": { + "account_number": "5611", + "account_type": "Expense Account" + }, + "Försäkring och skatt för personbilar": { + "account_number": "5612", + "account_type": "Expense Account" + }, + "Reparation och underhåll av personbilar": { + "account_number": "5613", + "account_type": "Expense Account" + }, + "Leasing av personbilar": { + "account_number": "5615", + "account_type": "Expense Account" + }, + "Trängselskatt, avdragsgill": { + "account_number": "5616", + "account_type": "Expense Account" + }, + "Övriga personbilskostnader": { + "account_number": "5619", + "account_type": "Expense Account" + } + }, + "562 Lastbilkostnader": { + "account_type": "Expense Account", + "is_group": 1, + "Lastbilkostnader": { + "account_number": "5620" + } + }, + "563 Truckkostnader": { + "account_type": "Expense Account", + "is_group": 1, + "Truckkostnader": { + "account_number": "5630" + } + }, + "564 Kostnader för arbetsmaskiner": { + "account_type": "Expense Account", + "is_group": 1, + "Kostnader för arbetsmaskiner": { + "account_number": "5640" + } + }, + "565 Traktorkostnader": { + "account_type": "Expense Account", + "is_group": 1, + "Traktorkostnader": { + "account_number": "5650" + } + }, + "566 Motorcykel-, moped- och skoterkostnade": { + "account_type": "Expense Account", + "is_group": 1, + "Motorcykel-, moped- och skoterkostnade": { + "account_number": "5660" + } + }, + "567 Båt-, flygplans- och helikopterkostnader": { + "account_type": "Expense Account", + "is_group": 1, + "MBåt-, flygplans- och helikopterkostnader": { + "account_number": "5670" + } + }, + "569 Övriga kostnader för transportmedel": { + "account_type": "Expense Account", + "is_group": 1, + "Övriga kostnader för transportmedel": { + "account_number": "5690" + } + } + }, + "57 Frakter och transporter": { + "account_type": "Expense Account", + "is_group": 1, + "570 Frakter och transporter (gruppkonto)": { + "is_group": 1, + "Frakter och transporter (gruppkonto)": { + "account_number": "5700", + "account_type": "Expense Account" + } + }, + "571 Frakter, transporter och försäkringar vid varudistribution": { + "is_group": 1, + "Frakter, transporter och försäkringar vid varudistribution": { + "account_number": "5710" + } + }, + "572 Tull- och speditionskostnader m.m.": { + "is_group": 1, + "Tull- och speditionskostnader m.m.": { + "account_number": "5720" + } + }, + "573 Arbetstransporter": { + "is_group": 1, + "Arbetstransporter": { + "account_number": "5730" + } + }, + "579 Övriga kostnader för frakter och transporter": { + "is_group": 1, + "Övriga kostnader för frakter och transporter": { + "account_number": "5790" + } + } + }, + "58 Resekostnader": { + "account_type": "Expense Account", + "is_group": 1, + "580 Resekostnader (gruppkonto)": { + "is_group": 1, + "Resekostnader (gruppkonto)": { + "account_number": "5800", + "account_type": "Expense Account" + } + }, + "581 Biljetter": { + "is_group": 1, + "Biljetter": { + "account_number": "5810", + "account_type": "Expense Account" + } + }, + "582 Hyrbilskostnader": { + "is_group": 1, + "Hyrbilskostnader": { + "account_number": "5820", + "account_type": "Expense Account" + } + }, + "583 Kost och logi": { + "is_group": 1, + "Kost och logi": { + "account_number": "5830" + }, + "Kost och logi i Sverige": { + "account_number": "5831", + "account_type": "Expense Account" + }, + "Kost och logi i utlandet": { + "account_number": "5832", + "account_type": "Expense Account" + } + }, + "589 Övriga resekostnader": { + "is_group": 1, + "Övriga resekostnader": { + "account_number": "5890" + } + } + }, + "59 Reklam och PR": { + "account_type": "Expense Account", + "is_group": 1, + "590 Reklam och PR (gruppkonto)": { + "is_group": 1, + "Reklam och PR (gruppkonto)": { + "account_number": "5900", + "account_type": "Expense Account" + } + }, + "591 Annonsering": { + "account_type": "Expense Account", + "is_group": 1, + "Annonsering": { + "account_number": "5910" + } + }, + "592 Utomhus- och trafikreklam": { + "account_type": "Expense Account", + "is_group": 1, + "Utomhus- och trafikreklam": { + "account_number": "5920" + } + }, + "593 Reklamtrycksaker och direktreklam": { + "account_type": "Expense Account", + "is_group": 1, + "Reklamtrycksaker och direktreklam": { + "account_number": "5930" + } + }, + "594 Utställningar och mässor": { + "account_type": "Expense Account", + "is_group": 1, + "Utställningar och mässor": { + "account_number": "5940" + } + }, + "595 Butiksreklam och återförsäljarreklam": { + "account_type": "Expense Account", + "is_group": 1, + "Butiksreklam och återförsäljarreklam": { + "account_number": "5950" + } + }, + "596 Varuprover, reklamgåvor, presentreklam och tävlingar": { + "account_type": "Expense Account", + "is_group": 1, + "Varuprover, reklamgåvor, presentreklam och tävlingar": { + "account_number": "5960" + } + }, + "597 Film-, radio-, TV- och Internetreklam": { + "account_type": "Expense Account", + "is_group": 1, + "Film-, radio-, TV- och Internetreklam": { + "account_number": "5970" + } + }, + "598 PR, institutionell reklam och sponsring": { + "account_type": "Expense Account", + "is_group": 1, + "PR, institutionell reklam och sponsring": { + "account_number": "5980" + } + }, + "599 Övriga kostnader för reklam och PR": { + "account_type": "Expense Account", + "is_group": 1, + "Övriga kostnader för reklam och PR": { + "account_number": "5990" + } + } + } + }, + "6 Övriga externa rörelseutgifter/kostnader": { + "root_type": "Expense", + "is_group": 1, + "60 Övriga försäljningskostnader": { + "is_group": 1, + "600 Övriga försäljningskostnader (gruppkonto)": { + "account_type": "Expense Account", + "is_group": 1, + "Övriga försäljningskostnader (gruppkonto)": { + "account_number": "6000" + } + }, + "601 Kataloger, prislistor m.m.": { + "account_type": "Expense Account", + "is_group": 1, + "Kataloger, prislistor m.m.": { + "account_number": "6010" + } + }, + "602 Egna facktidskrifter": { + "account_type": "Expense Account", + "is_group": 1, + "Egna facktidskrifter": { + "account_number": "6020" + } + }, + "603 Speciella orderkostnader": { + "account_type": "Expense Account", + "is_group": 1, + "Speciella orderkostnader": { + "account_number": "6030" + } + }, + "604 Kontokortsavgifter": { + "account_type": "Expense Account", + "is_group": 1, + "Kontokortsavgifter": { + "account_number": "6040" + } + }, + "605 Försäljningsprovisioner": { + "is_group": 1, + "Försäljningsprovisioner": { + "account_number": "6050" + }, + "Franchisekostnader o.dyl.": { + "account_number": "6055" + } + }, + "606 Kreditförsäljningskostnader": { + "is_group": 1, + "Kreditförsäljningskostnader": { + "account_number": "6060" + }, + "Kreditupplysning": { + "account_number": "6061" + }, + "Inkasso och KFM-avgifter": { + "account_number": "6062" + }, + "Kreditförsäkringspremier": { + "account_number": "6063" + }, + "Factoringavgifter": { + "account_number": "6064" + }, + "Övriga kreditförsäljningskostnader": { + "account_number": "6069" + } + }, + "607 Representation": { + "is_group": 1, + "Representation": { + "account_number": "6070" + }, + "Representation, avdragsgill": { + "account_number": "6071", + "account_type": "Expense Account" + }, + "Representation, ej avdragsgill": { + "account_number": "6072", + "account_type": "Expense Account" + } + }, + "608 Bankgarantier": { + "account_type": "Expense Account", + "is_group": 1, + "Bankgarantier": { + "account_number": "6080" + } + }, + "609 Övriga försäljningskostnader": { + "is_group": 1, + "Övriga försäljningskostnader": { + "account_number": "6090", + "account_type": "Expense Account" + } + } + }, + "61 Kontorsmateriel och trycksaker": { + "is_group": 1, + "610 Kontorsmateriel och trycksaker (gruppkonto)": { + "is_group": 1, + "Kontorsmateriel och trycksaker (gruppkonto)": { + "account_number": "6100", + "account_type": "Expense Account" + } + }, + "611 Kontorsmateriel": { + "account_type": "Expense Account", + "is_group": 1, + "Kontorsmateriel": { + "account_number": "6110" + } + }, + "615 Trycksaker": { + "account_type": "Expense Account", + "is_group": 1, + "Trycksaker": { + "account_number": "6150" + } + } + }, + "62 Tele och post": { + "is_group": 1, + "620 Tele och post (gruppkonto)": { + "account_type": "Expense Account", + "is_group": 1, + "Tele och post (gruppkonto)": { + "account_number": "6200" + } + }, + "621 Telekommunikation": { + "account_type": "Expense Account", + "is_group": 1, + "Telekommunikation": { + "account_number": "6210", + "account_type": "Expense Account" + }, + "Fast telefoni": { + "account_number": "6211", + "account_type": "Expense Account" + }, + "Mobiltelefon": { + "account_number": "6212", + "account_type": "Expense Account" + }, + "Mobilsökning": { + "account_number": "6213", + "account_type": "Expense Account" + }, + "Fax": { + "account_number": "6214", + "account_type": "Expense Account" + }, + "Telex": { + "account_number": "6215", + "account_type": "Expense Account" + } + }, + "623 Datakommunikation": { + "account_type": "Expense Account", + "is_group": 1, + "Datakommunikation": { + "account_number": "6230" + } + }, + "625 Postbefordran": { + "is_group": 1, + "Postbefordran": { + "account_number": "6250", + "account_type": "Expense Account" + } + } + }, + "63 Företagsförsäkringar och övriga riskkostnader": { + "is_group": 1, + "630 Företagsförsäkringar och övriga riskkostnader (gruppkonto)": { + "account_type": "Expense Account", + "is_group": 1, + "Företagsförsäkringar och övriga riskkostnader (gruppkonto)": { + "account_number": "6300" + } + }, + "631 Företagsförsäkringar": { + "is_group": 1, + "Företagsförsäkringar": { + "account_number": "6310", + "account_type": "Expense Account" + } + }, + "632 Självrisker vid skada": { + "account_type": "Expense Account", + "is_group": 1, + "Självrisker vid skada": { + "account_number": "6320" + } + }, + "633 Förluster i pågående arbeten": { + "account_type": "Expense Account", + "is_group": 1, + "Förluster i pågående arbeten": { + "account_number": "6330" + } + }, + "634 Lämnade skadestånd": { + "is_group": 1, + "Lämnade skadestånd": { + "account_number": "6340" + }, + "Lämnade skadestånd, avdragsgilla": { + "account_number": "6341" + }, + "Lämnade skadestånd, ej avdragsgilla": { + "account_number": "6342" + } + }, + "635 Förluster på kundfordringar": { + "account_type": "Expense Account", + "is_group": 1, + "Förluster på kundfordringar": { + "account_number": "6350", + "account_type": "Expense Account" + }, + "Konstaterade förluster på kundfordringar": { + "account_number": "6351", + "account_type": "Expense Account" + }, + "Befarade förluster på kundfordringar": { + "account_number": "6352", + "account_type": "Expense Account" + } + }, + "636 Garantikostnader": { + "account_type": "Expense Account", + "is_group": 1, + "Garantikostnader": { + "account_number": "6360" + }, + "Förändring av garantiavsättning": { + "account_number": "6361" + }, + "Faktiska garantikostnader": { + "account_number": "6362" + } + }, + "637 Kostnader för bevakning och larm": { + "account_type": "Expense Account", + "is_group": 1, + "Kostnader för bevakning och larm": { + "account_number": "6370" + } + }, + "638 Förluster på övriga kortfristiga fordringar": { + "account_type": "Expense Account", + "is_group": 1, + "Förluster på övriga kortfristiga fordringar": { + "account_number": "6380" + } + }, + "639 Övriga riskkostnader": { + "is_group": 1, + "Övriga riskkostnader": { + "account_number": "6390", + "account_type": "Expense Account" + } + } + }, + "64 Förvaltningskostnader": { + "is_group": 1, + "640 Förvaltningskostnader (gruppkonto)": { + "account_type": "Expense Account", + "is_group": 1, + "Förvaltningskostnader (gruppkonto)": { + "account_number": "6400" + } + }, + "641 Styrelsearvoden som inte är lön": { + "is_group": 1, + "Styrelsearvoden som inte är lön": { + "account_number": "6410", + "account_type": "Expense Account" + } + }, + "642 Ersättningar till revisor": { + "account_type": "Expense Account", + "is_group": 1, + "Ersättningar till revisor": { + "account_number": "6420", + "account_type": "Expense Account" + }, + "Revision": { + "account_number": "6421", + "account_type": "Expense Account" + }, + "Revisonsverksamhet utöver revision": { + "account_number": "6422", + "account_type": "Expense Account" + }, + "Skatterådgivning – revisor": { + "account_number": "6423", + "account_type": "Expense Account" + }, + "Övriga tjänster – revisor": { + "account_number": "6424", + "account_type": "Expense Account" + } + }, + "643 Management fees": { + "account_type": "Expense Account", + "is_group": 1, + "Management fees": { + "account_number": "6430" + } + }, + "644 Årsredovisning och delårsrapporter": { + "account_type": "Expense Account", + "is_group": 1, + "Årsredovisning och delårsrapporter": { + "account_number": "6440" + } + }, + "645 Bolagsstämma/års- eller föreningsstämma": { + "account_type": "Expense Account", + "is_group": 1, + "Bolagsstämma/års- eller föreningsstämma": { + "account_number": "6450" + } + }, + "649 Övriga förvaltningskostnader": { + "account_type": "Expense Account", + "is_group": 1, + "Övriga förvaltningskostnader": { + "account_number": "6490" + } + } + }, + "65 Övriga externa tjänster": { + "is_group": 1, + "650 Övriga externa tjänster (gruppkonto)": { + "account_type": "Expense Account", + "is_group": 1, + "Övriga externa tjänster (gruppkonto)": { + "account_number": "6500" + } + }, + "651 Mätningskostnader": { + "account_type": "Expense Account", + "is_group": 1, + "Mätningskostnader": { + "account_number": "6510" + } + }, + "652 Ritnings- och kopieringskostnader": { + "account_type": "Expense Account", + "is_group": 1, + "Ritnings- och kopieringskostnader": { + "account_number": "6520" + } + }, + "653 Redovisningstjänster": { + "is_group": 1, + "Redovisningstjänster": { + "account_number": "6530", + "account_type": "Expense Account" + } + }, + "654 IT-tjänster": { + "is_group": 1, + "IT-tjänster": { + "account_number": "6540", + "account_type": "Expense Account" + } + }, + "655 Konsultarvoden": { + "account_type": "Expense Account", + "is_group": 1, + "Konsultarvoden": { + "account_number": "6550", + "account_type": "Expense Account" + }, + "Arkitekttjänster": { + "account_number": "6551", + "account_type": "Expense Account" + }, + "Teknisk provning och analys": { + "account_number": "6552", + "account_type": "Expense Account" + }, + "Tekniska konsulttjänster": { + "account_number": "6553", + "account_type": "Expense Account" + }, + "Finansiell- och övrig ekonomisk rådgivning": { + "account_number": "6554", + "account_type": "Expense Account" + }, + "Skatterådgivning inkl. insolvens- och konkursförvaltning": { + "account_number": "6555", + "account_type": "Expense Account" + }, + "Köpta tjänster avseende forskning och utveckling": { + "account_number": "6556", + "account_type": "Expense Account" + }, + "Övrig konsultverksamhet": { + "account_number": "6559", + "account_type": "Expense Account" + } + }, + "656 Serviceavgifter till branschorganisationer": { + "is_group": 1, + "Serviceavgifter till branschorganisationer": { + "account_number": "6560", + "account_type": "Expense Account" + } + }, + "657 Bankkostnader": { + "is_group": 1, + "Bankkostnader": { + "account_number": "6570", + "account_type": "Expense Account" + } + }, + "658 Advokat- och rättegångskostnader": { + "account_type": "Expense Account", + "is_group": 1, + "Advokat- och rättegångskostnader": { + "account_number": "6580" + } + }, + "659 Övriga externa tjänster": { + "is_group": 1, + "Övriga externa tjänster": { + "account_number": "6590", + "account_type": "Expense Account" + } + } + }, + "66 (Fri kontogrupp)": { + "account_type": "Expense Account", + "is_group": 1, + "660 (Fri kontogrupp)": { + "account_type": "Expense Account", + "is_group": 1, + "(Fri kontogrupp)": { + "account_number": "6600" + } + } + }, + "67 (Fri kontogrupp)": { + "account_type": "Expense Account", + "is_group": 1, + "670 (Fri kontogrupp)": { + "account_type": "Expense Account", + "is_group": 1, + "(Fri kontogrupp)": { + "account_number": "6700" + } + } + }, + "68 Inhyrd personal": { + "is_group": 1, + "680 Inhyrd personal (gruppkonto)": { + "is_group": 1, + "Inhyrd personal (gruppkonto)": { + "account_number": "6800", + "account_type": "Expense Account" + } + }, + "681 Inhyrd produktionspersonal": { + "account_type": "Expense Account", + "is_group": 1, + "Inhyrd produktionspersonal": { + "account_number": "6810" + } + }, + "682 Inhyrd lagerpersonal": { + "account_type": "Expense Account", + "is_group": 1, + "Inhyrd lagerpersonal": { + "account_number": "6820" + } + }, + "683 Inhyrd transportpersonal": { + "account_type": "Expense Account", + "is_group": 1, + "Inhyrd transportpersonal": { + "account_number": "6830" + } + }, + "684 Inhyrd kontors- och ekonomipersonal": { + "account_type": "Expense Account", + "is_group": 1, + "Inhyrd kontors- och ekonomipersonal": { + "account_number": "6840" + } + }, + "685 Inhyrd IT-personal": { + "account_type": "Expense Account", + "is_group": 1, + "Inhyrd IT-personal": { + "account_number": "6850" + } + }, + "686 Inhyrd marknads- och försäljningspersonal": { + "account_type": "Expense Account", + "is_group": 1, + "Inhyrd marknads- och försäljningspersonal": { + "account_number": "6860" + } + }, + "687 Inhyrd restaurang- och butikspersonal": { + "account_type": "Expense Account", + "is_group": 1, + "Inhyrd restaurang- och butikspersonal": { + "account_number": "6870" + } + }, + "688 Inhyrda företagsledare": { + "account_type": "Expense Account", + "is_group": 1, + "Inhyrda företagsledare": { + "account_number": "6880" + } + }, + "689 Övrig inhyrd personal": { + "account_type": "Expense Account", + "is_group": 1, + "Övrig inhyrd personal": { + "account_number": "6890" + } + } + }, + "69 Övriga externa kostnader": { + "is_group": 1, + "690 Övriga externa kostnader (gruppkonto)": { + "account_type": "Expense Account", + "is_group": 1, + "Övriga externa kostnader (gruppkonto)": { + "account_number": "6900" + } + }, + "691 Licensavgifter och royalties": { + "account_type": "Expense Account", + "is_group": 1, + "Licensavgifter och royalties": { + "account_number": "6910" + } + }, + "692 Kostnader för egna patent": { + "account_type": "Expense Account", + "is_group": 1, + "Kostnader för egna patent": { + "account_number": "6920" + } + }, + "693 Kostnader för varumärken m.m.": { + "account_type": "Expense Account", + "is_group": 1, + "Kostnader för varumärken m.m.": { + "account_number": "6930" + } + }, + "694 Kontroll-, provnings- och stämpelavgifter": { + "account_type": "Expense Account", + "is_group": 1, + "Kontroll-, provnings- och stämpelavgifter": { + "account_number": "6940" + } + }, + "695 Tillsynsavgifter myndigheter": { + "account_type": "Expense Account", + "is_group": 1, + "Tillsynsavgifter myndigheter": { + "account_number": "6950" + } + }, + "697 Tidningar, tidskrifter och facklitteratur": { + "is_group": 1, + "Tidningar, tidskrifter och facklitteratur": { + "account_number": "6970", + "account_type": "Expense Account" + } + }, + "698 Föreningsavgifter": { + "is_group": 1, + "Föreningsavgifter": { + "account_number": "6980", + "account_type": "Expense Account" + }, + "Föreningsavgifter, avdragsgilla": { + "account_number": "6981" + }, + "Föreningsavgifter,ej avdragsgilla": { + "account_number": "6982" + } + }, + "699 Övriga externa kostnader": { + "is_group": 1, + "Övriga externa kostnader": { + "account_number": "6990" + }, + "Övriga externa kostnader, avdragsgilla": { + "account_number": "6991", + "account_type": "Expense Account" + }, + "Övriga externa kostnader, ej avdragsgilla": { + "account_number": "6992", + "account_type": "Expense Account" + }, + "Lämnade bidrag och gåvor": { + "account_number": "6993" + }, + "Betald utländsk inkomstskatt": { + "account_number": "6996" + }, + "Obetald utländsk inkomstskatt": { + "account_number": "6997" + }, + "Utländsk moms": { + "account_number": "6998" + }, + "Ingående moms, blandad verksamhet": { + "account_number": "6999" + } + } + } + }, + "7 Utgifter/kostnader för personal, avskrivningar m.m.": { + "root_type": "Expense", + "is_group": 1, + "70 Löner till kollektivanställda": { + "is_group": 1, + "700 Löner till kollektivanställda (gruppkonto)": { + "account_type": "Expense Account", + "is_group": 1, + "Löner till kollektivanställda (gruppkonto)": { + "account_number": "7000" + } + }, + "701 Löner till kollektivanställda": { + "is_group": 1, + "Löner till kollektivanställda": { + "account_number": "7010", + "account_type": "Expense Account" + }, + "Löner till kollektivanställda övriga": { + "account_number": "7011", + "account_type": "Expense Account" + }, + "Vinstandelar till kollektivanställda": { + "account_number": "7012" + }, + "Lön växa-stöd kollektivanställda 10,21 %": { + "account_number": "7013" + }, + "Avgångsvederlag till kollektivanställda": { + "account_number": "7017" + }, + "Bruttolöneavdrag, kollektivanställda": { + "account_number": "7018" + }, + "Upplupna löner och vinstandelar till kollektivanställda": { + "account_number": "7019" + } + }, + "703 Löner till kollektivanställda (utlandsanställda)": { + "is_group": 1, + "Löner till kollektivanställda (utlandsanställda)": { + "account_number": "7030" + }, + "Löner till kollektivanställda (utlandsanställda) övriga": { + "account_number": "7031" + }, + "Vinstandelar till kollektivanställda (utlandsanställda)": { + "account_number": "7032" + }, + "Avgångsvederlag till kollektivanställda (utlandsanställda)": { + "account_number": "7037" + }, + "Bruttolöneavdrag, kollektivanställda (utlandsanställda)": { + "account_number": "7038" + }, + "Upplupna löner och vinstandelar till kollektivanställda (utlandsanställda)": { + "account_number": "7039" + } + }, + "708 Löner till kollektivanställda för ej arbetad tid": { + "is_group": 1, + "Löner till kollektivanställda för ej arbetad tid": { + "account_number": "7080" + }, + "Sjuklöner till kollektivanställda": { + "account_number": "7081" + }, + "Semesterlöner till kollektivanställda": { + "account_number": "7082" + }, + "Föräldraersättning till kollektivanställda": { + "account_number": "7083" + }, + "Övriga löner till kollektivanställda för ej arbetad tid": { + "account_number": "7089" + } + }, + "709 Förändring av semesterlöneskuld": { + "is_group": 1, + "Förändring av semesterlöneskuld": { + "account_number": "7090", + "account_type": "Expense Account" + } + } + }, + "71 (Fri kontogrupp)": { + "account_type": "Expense Account", + "is_group": 1, + "710 (Fri kontogrupp)": { + "account_type": "Expense Account", + "is_group": 1, + "(Fri kontogrupp)": { + "account_number": "7100" + } + } + }, + "72 Löner till tjänstemän och företagsledare": { + "is_group": 1, + "720 Löner till tjänstemän och företagsledare (gruppkonto)": { + "account_type": "Expense Account", + "Löner till tjänstemän och företagsledare (gruppkonto)": { + "account_number": "7200" + } + }, + "721 Löner till tjänstemän": { + "is_group": 1, + "Löner till tjänstemän": { + "account_number": "7210", + "account_type": "Expense Account" + }, + "Vinstandelar till tjänstemän": { + "account_number": "7212" + }, + "Lön växa-stöd tjänstemän 10,21 %": { + "account_number": "7213" + }, + "Avgångsvederlag till tjänstemän": { + "account_number": "7217" + }, + "Bruttolöneavdrag, tjänstemän": { + "account_number": "7218" + }, + "Upplupna löner och vinstandelar till tjänstemän": { + "account_number": "7219" + } + }, + "722 Löner till företagsledare": { + "is_group": 1, + "Löner till företagsledare": { + "account_number": "7220", + "account_type": "Expense Account" + }, + "Löner till företagsledare övriga": { + "account_number": "7221" + }, + "Tantiem till företagsledare": { + "account_number": "7222" + }, + "Avgångsvederlag till företagsledare": { + "account_number": "7227" + }, + "Bruttolöneavdrag, företagsledare": { + "account_number": "7228" + }, + "Upplupna löner och tantiem till företagsledare": { + "account_number": "7229" + } + }, + "723 Löner till tjänstemän och ftgsledare (utlandsanställda)": { + "is_group": 1, + "Löner till tjänstemän och ftgsledare (utlandsanställda)": { + "account_number": "7230" + }, + "Löner till tjänstemän och ftgsledare övriga (utlandsanställda)": { + "account_number": "7231" + }, + "Vinstandelar till tjänstemän och ftgsledare (utlandsanställda)": { + "account_number": "7232" + }, + "Avgångsvederlag till tjänstemän och ftgsledare (utlandsanställda)": { + "account_number": "7237" + }, + "Bruttolöneavdrag, tjänstemän och ftgsledare (utlandsanställda)": { + "account_number": "7238" + }, + "Upplupna löner och vinstandelar till tjänstemän och ftgsledare (utlandsanställda)": { + "account_number": "7239" + } + }, + "724 Styrelsearvoden": { + "is_group": 1, + "Styrelsearvoden": { + "account_number": "7240", + "account_type": "Expense Account" + } + }, + "728 Löner till tjänstemän och företagsledare för ej arbetad tid": { + "is_group": 1, + "Löner till tjänstemän och företagsledare för ej arbetad tid": { + "account_number": "7280" + }, + "Sjuklöner till tjänstemän": { + "account_number": "7281" + }, + "Sjuklöner till företagsledare": { + "account_number": "7282" + }, + "Föräldraersättning till tjänstemän": { + "account_number": "7283" + }, + "Föräldraersättning till företagsledare": { + "account_number": "7284" + }, + "Semesterlöner till tjänstemän": { + "account_number": "7285" + }, + "Semesterlöner till företagsledare": { + "account_number": "7286" + }, + "Övriga löner till tjänstemän för ej arbetad tid": { + "account_number": "7288" + }, + "Övriga löner till företagsledare för ej arbetad tid": { + "account_number": "7289" + } + }, + "729 Förändring av semesterlöneskuld": { + "account_type": "Expense Account", + "is_group": 1, + "Förändring av semesterlöneskuld": { + "account_number": "7290", + "account_type": "Expense Account" + }, + "Förändring av semesterlöneskuld till tjänstemän": { + "account_number": "7291" + }, + "Förändring av semesterlöneskuld till företagsledare": { + "account_number": "7292" + } + } + }, + "73 Kostnadsersättningar och förmåner": { + "is_group": 1, + "730 Kostnadsersättningar och förmåner (gruppkonto)": { + "account_type": "Expense Account", + "is_group": 1, + "Kostnadsersättningar och förmåner (gruppkonto)": { + "account_number": "7300" + } + }, + "731 Kontanta extraersättningar": { + "is_group": 1, + "Kontanta extraersättningar": { + "account_number": "7310", + "account_type": "Expense Account" + }, + "Ersättningar för sammanträden m.m.": { + "account_number": "7311" + }, + "Ersättningar för förslagsverksamhet och uppfinningar": { + "account_number": "7312" + }, + "Ersättningar för/bidrag till bostadskostnader": { + "account_number": "7313" + }, + "Ersättningar för/bidrag till måltidskostnader": { + "account_number": "7314" + }, + "Ersättningar för/bidrag till resor till och från arbetsplatsen": { + "account_number": "7315" + }, + "Ersättningar för/bidrag till arbetskläder": { + "account_number": "7316" + }, + "Ersättningar för/bidrag till arbetsmaterial och arbetsverktyg": { + "account_number": "7317" + }, + "Felräkningspengar": { + "account_number": "7318" + }, + "Övriga kontanta extraersättningar": { + "account_number": "7319" + } + }, + "732 Traktamenten vid tjänsteresa": { + "is_group": 1, + "Traktamenten vid tjänsteresa": { + "account_number": "7320" + }, + "Skattefria traktamenten, Sverige": { + "account_number": "7321", + "account_type": "Expense Account" + }, + "Skattepliktiga traktamenten, Sverige": { + "account_number": "7322", + "account_type": "Expense Account" + }, + "Skattefria traktamenten, utlandet": { + "account_number": "7323", + "account_type": "Expense Account" + }, + "Skattepliktiga traktamenten, utlandet": { + "account_number": "7324", + "account_type": "Expense Account" + } + }, + "733 Bilersättningar": { + "is_group": 1, + "Bilersättningar": { + "account_number": "7330" + }, + "Skattefria bilersättningar": { + "account_number": "7331", + "account_type": "Expense Account" + }, + "Skattepliktiga bilersättningar": { + "account_number": "7332", + "account_type": "Expense Account" + }, + "Ersättning för trängselskatt, skattefri": { + "account_number": "7333", + "account_type": "Expense Account" + } + }, + "735 Ersättningar för föreskrivna arbetskläder": { + "account_type": "Expense Account", + "is_group": 1, + "Ersättningar för föreskrivna arbetskläder": { + "account_number": "7350" + } + }, + "737 Representationsersättningar": { + "account_type": "Expense Account", + "is_group": 1, + "Representationsersättningar": { + "account_number": "7370" + } + }, + "738 Kostnader för förmåner till anställda": { + "is_group": 1, + "Kostnader för förmåner till anställda": { + "account_number": "7380", + "account_type": "Expense Account" + }, + "Kostnader för fri bostad": { + "account_number": "7381" + }, + "Kostnader för fria eller subventionerade måltider": { + "account_number": "7382" + }, + "Kostnader för fria resor till och från arbetsplatsen": { + "account_number": "7383" + }, + "Kostnader för fria eller subventionerade arbetskläder": { + "account_number": "7384" + }, + "Kostnader för fri bil": { + "account_number": "7385", + "account_type": "Expense Account" + }, + "Subventionerad ränta": { + "account_number": "7386" + }, + "Kostnader för lånedatorer": { + "account_number": "7387" + }, + "Anställdas ersättning för erhållna förmåner": { + "account_number": "7388" + }, + "Övriga kostnader för förmåner": { + "account_number": "7389" + } + }, + "739 Övriga kostnadsersättningar och förmåner": { + "is_group": 1, + "Övriga kostnadsersättningar och förmåner": { + "account_number": "7390", + "account_type": "Expense Account" + }, + "Kostnad för trängselskatteförmån": { + "account_number": "7391" + }, + "Kostnad för förmån av hushållsnära tjänster": { + "account_number": "7392" + } + } + }, + "74 Löner till tjänstemän och företagsledare": { + "is_group": 1, + "740 Pensionskostnader (gruppkonto)": { + "account_type": "Expense Account", + "is_group": 1, + "Pensionskostnader (gruppkonto)": { + "account_number": "7400" + } + }, + "741 Pensionsförsäkringspremier": { + "is_group": 1, + "Pensionsförsäkringspremier": { + "account_number": "7410", + "account_type": "Expense Account" + }, + "Premier för kollektiva pensionsförsäkringar": { + "account_number": "7411" + }, + "Premier för individuella pensionsförsäkringar": { + "account_number": "7412" + } + }, + "742 Förändring av pensionsskuld": { + "account_type": "Expense Account", + "is_group": 1, + "Förändring av pensionsskuld": { + "account_number": "7420" + } + }, + "743 Avdrag för räntedel i pensionskostnad": { + "account_type": "Expense Account", + "is_group": 1, + "Avdrag för räntedel i pensionskostnad": { + "account_number": "7430" + } + }, + "744 Förändring av pensionsstiftelsekapital": { + "is_group": 1, + "Förändring av pensionsstiftelsekapital": { + "account_number": "7440" + }, + "Överföring av medel till pensionsstiftelse": { + "account_number": "7441" + }, + "Gottgörelse från pensionsstiftelse": { + "account_number": "7448" + } + }, + "746 Pensionsutbetalningar": { + "is_group": 1, + "Pensionsutbetalningar": { + "account_number": "7460" + }, + "Pensionsutbetalningar till f.d. kollektivanställda": { + "account_number": "7461" + }, + "Pensionsutbetalningar till f.d. tjänstemän": { + "account_number": "7462" + }, + "Pensionsutbetalningar till f.d. företagsledare": { + "account_number": "7463" + } + }, + "747 Förvaltnings- och kreditförsäkringsavgifter": { + "account_type": "Expense Account", + "is_group": 1, + "Förvaltnings- och kreditförsäkringsavgifter": { + "account_number": "7470" + } + }, + "749 Övriga pensionskostnader": { + "is_group": 1, + "Övriga pensionskostnader": { + "account_number": "7490", + "account_type": "Expense Account" + } + } + }, + "75 Sociala och andra avgifter enligt lag och avtal": { + "is_group": 1, + "750 Sociala och andra avgifter enligt lag och avtal (gruppkonto)": { + "account_type": "Expense Account", + "is_group": 1, + "Sociala och andra avgifter enligt lag och avtal (gruppkonto)": { + "account_number": "7500" + } + }, + "751 Arbetsgivaravgifter 31,42 %": { + "is_group": 1, + "Arbetsgivaravgifter 31,42 %": { + "account_number": "7510" + }, + "Arbetsgivaravgifter för löner och ersättningar": { + "account_number": "7511", + "account_type": "Expense Account" + }, + "Arbetsgivaravgifter för förmånsvärden": { + "account_number": "7512", + "account_type": "Expense Account" + }, + "Arbetsgivaravgifter på skattepliktiga kostnadsersättningar": { + "account_number": "7515" + }, + "Arbetsgivaravgifter på arvoden": { + "account_number": "7516" + }, + "Arbetsgivaravgifter på bruttolöneavdrag m.m.": { + "account_number": "7518" + }, + "Arbetsgivaravgifter för semester- och löneskulder": { + "account_number": "7519", + "account_type": "Expense Account" + } + }, + "753 Särskild löneskatt": { + "is_group": 1, + "Särskild löneskatt": { + "account_number": "7530", + "account_type": "Expense Account" + }, + "Särskild löneskatt för vissa försäkringsersättningar m.m.": { + "account_number": "7531" + }, + "Särskild löneskatt pensionskostnader, deklarationspost": { + "account_number": "7532" + }, + "Särskild löneskatt för pensionskostnader": { + "account_number": "7533" + } + }, + "755 Avkastningsskatt på pensionsmedel": { + "is_group": 1, + "Avkastningsskatt på pensionsmedel": { + "account_number": "7550", + "account_type": "Expense Account" + }, + "Avkastningsskatt 15 % försäkringsföretag m.fl. samt avsatt till pensioner": { + "account_number": "7551" + }, + "Avkastningsskatt 15 % utländska pensionsförsäkringar": { + "account_number": "7552" + }, + "Avkastningsskatt 30 % utländska försäkringsföretag m.fl.": { + "account_number": "7553" + }, + "Avkastningsskatt 30 % utländska kapitalförsäkringar": { + "account_number": "7554" + } + }, + "757 Premier för arbetsmarknadsförsäkringar": { + "is_group": 1, + "Premier för arbetsmarknadsförsäkringar": { + "account_number": "7570", + "account_type": "Expense Account" + }, + "Arbetsmarknadsförsäkringar": { + "account_number": "7571" + }, + "Arbetsmarknadsförsäkringar pensionsförsäkringspremier, deklarationspost": { + "account_number": "7572" + } + }, + "758 Gruppförsäkringspremier": { + "is_group": 1, + "Gruppförsäkringspremier": { + "account_number": "7580", + "account_type": "Expense Account" + }, + "Grupplivförsäkringspremier": { + "account_number": "7581" + }, + "Gruppsjukförsäkringspremier": { + "account_number": "7582" + }, + "Gruppolycksfallsförsäkringspremier": { + "account_number": "7583" + }, + "Övriga gruppförsäkringspremier": { + "account_number": "7589" + } + }, + "759 Övriga sociala och andra avgifter enligt lag och avtal": { + "is_group": 1, + "Övriga sociala och andra avgifter enligt lag och avtal": { + "account_number": "7590", + "account_type": "Expense Account" + } + } + }, + "76 Övriga personalkostnader": { + "is_group": 1, + "760 Övriga personalkostnader (gruppkonto)": { + "is_group": 1, + "Övriga personalkostnader (gruppkonto)": { + "account_number": "7600", + "account_type": "Expense Account" + } + }, + "761 Utbildning": { + "is_group": 1, + "Utbildning": { + "account_number": "7610", + "account_type": "Expense Account" + } + }, + "762 Sjuk- och hälsovård": { + "is_group": 1, + "Sjuk- och hälsovård": { + "account_number": "7620" + }, + "Sjuk- och hälsovård, avdragsgill": { + "account_number": "7621", + "account_type": "Expense Account" + }, + "Sjuk- och hälsovård, ej avdragsgill": { + "account_number": "7622", + "account_type": "Expense Account" + }, + "Sjukvårdsförsäkring, ej avdragsgill": { + "account_number": "7623" + } + }, + "763 Personalrepresentation": { + "is_group": 1, + "Personalrepresentation": { + "account_number": "7630" + }, + "Personalrepresentation, avdragsgill": { + "account_number": "7631", + "account_type": "Expense Account" + }, + "Personalrepresentation, ej avdragsgill": { + "account_number": "7632", + "account_type": "Expense Account" + } + }, + "765 Sjuklöneförsäkring": { + "account_type": "Expense Account", + "is_group": 1, + "Sjuklöneförsäkring": { + "account_number": "7650" + } + }, + "767 Förändring av personalstiftelsekapital": { + "is_group": 1, + "Förändring av personalstiftelsekapital": { + "account_number": "7670" + }, + "Avsättning till personalstiftelse": { + "account_number": "7671" + }, + "Gottgörelse från personalstiftelse": { + "account_number": "7678" + } + }, + "769 Övrig personalkostnad": { + "is_group": 1, + "Övriga personalkostnader": { + "account_number": "7690" + }, + "Personalrekrytering": { + "account_number": "7691" + }, + "Begravningshjälp": { + "account_number": "7692" + }, + "Fritidsverksamhet": { + "account_number": "7693" + }, + "Övriga personalkostnader övriga": { + "account_number": "7699" + } + } + }, + "77 Nedskrivningar och återföring av nedskrivningar": { + "is_group": 1, + "771 Nedskrivningar av immateriella anläggningstillgångar": { + "account_type": "Expense Account", + "is_group": 1, + "Nedskrivningar av immateriella anläggningstillgångar": { + "account_number": "7710" + } + }, + "772 Nedskrivningar av byggnader och mark": { + "is_group": 1, + "Nedskrivningar av byggnader och mark": { + "account_number": "7720", + "account_type": "Expense Account" + } + }, + "773 Nedskrivningar av maskiner och inventarier": { + "is_group": 1, + "Nedskrivningar av maskiner och inventarier": { + "account_number": "7730", + "account_type": "Expense Account" + } + }, + "774 Nedskrivningar av vissa omsättningstillgångar": { + "account_type": "Expense Account", + "is_group": 1, + "Nedskrivningar av vissa omsättningstillgångar": { + "account_number": "7740" + } + }, + "776 Återföring av nedskrivningar av immateriella anläggningstillgångar": { + "account_type": "Expense Account", + "is_group": 1, + "Återföring av nedskrivningar av immateriella anläggningstillgångar": { + "account_number": "7760" + } + }, + "777 Återföring av nedskrivningar av byggnader och mark": { + "account_type": "Expense Account", + "is_group": 1, + "Återföring av nedskrivningar av byggnader och mark": { + "account_number": "7770" + } + }, + "778 Återföring av nedskrivningar av maskiner och inventarier": { + "account_type": "Expense Account", + "is_group": 1, + "Återföring av nedskrivningar av maskiner och inventarier": { + "account_number": "7780" + } + }, + "779 Återföring av nedskrivningar av vissa omsättningstillgångar": { + "account_type": "Expense Account", + "is_group": 1, + "Återföring av nedskrivningar av vissa omsättningstillgångar": { + "account_number": "7790" + } + } + }, + "78 Avskrivningar enligt plan": { + "is_group": 1, + "781 Avskrivningar på immateriella anläggningstillgångar": { + "is_group": 1, + "Avskrivningar på immateriella anläggningstillgångar": { + "account_number": "7810", + "account_type": "Depreciation" + }, + "Avskrivningar på balanserade utgifter": { + "account_number": "7811" + }, + "Avskrivningar på patent": { + "account_number": "7813" + }, + "Avskrivningar på licenser": { + "account_number": "7814" + }, + "Avskrivningar på hyresrätter": { + "account_number": "7816" + }, + "Avskrivningar på goodwill": { + "account_number": "7817" + }, + "Avskrivningar på övriga immateriella anläggningstillgångar": { + "account_number": "7819", + "account_type": "Depreciation" + } + }, + "782 Avskrivningar på byggnader och markanläggningar": { + "is_group": 1, + "Avskrivningar på byggnader och markanläggningar": { + "account_number": "7820", + "account_type": "Expense Account" + }, + "Avskrivningar på byggnader": { + "account_number": "7821" + }, + "Avskrivningar på markanläggningar": { + "account_number": "7824" + }, + "Avskrivningar på övriga byggnader": { + "account_number": "7829" + } + }, + "783 Avskrivningar på maskiner och inventarier": { + "is_group": 1, + "Avskrivningar på maskiner och inventarier": { + "account_number": "7830", + "account_type": "Depreciation" + }, + "Avskrivningar på maskiner och andra tekniska anläggningar": { + "account_number": "7831", + "account_type": "Depreciation" + }, + "Avskrivningar på inventarier och verktyg": { + "account_number": "7832", + "account_type": "Depreciation" + }, + "Avskrivningar på installationer": { + "account_number": "7833", + "account_type": "Depreciation" + }, + "Avskrivningar på bilar och andra transportmedel": { + "account_number": "7834", + "account_type": "Depreciation" + }, + "Avskrivningar på datorer": { + "account_number": "7835", + "account_type": "Depreciation" + }, + "Avskrivningar på leasade tillgångar": { + "account_number": "7836", + "account_type": "Depreciation" + }, + "Avskrivningar på övriga maskiner och inventarier": { + "account_number": "7839", + "account_type": "Depreciation" + } + }, + "784 Avskrivningar på förbättringsutgifter på annans fastighet": { + "is_group": 1, + "Avskrivningar på förbättringsutgifter på annans fastighet": { + "account_number": "7840" + } + } + }, + "79 Övriga rörelsekostnader": { + "is_group": 1, + "794 Orealiserade positiva/negativa värdeförändringar på säkringsinstrument": { + "account_type": "Expense Account", + "is_group": 1, + "Orealiserade positiva/negativa värdeförändringar på säkringsinstrument": { + "account_number": "7940" + } + }, + "796 Valutakursförluster på fordringar och skulder av rörelsekaraktär": { + "account_type": "Expense Account", + "is_group": 1, + "Valutakursförluster på fordringar och skulder av rörelsekaraktär": { + "account_number": "7960" + } + }, + "797 Förlust vid avyttring av immateriella och materiella anläggningstillgångar": { + "is_group": 1, + "Förlust vid avyttring av immateriella och materiella anläggningstillgångar": { + "account_number": "7970", + "account_type": "Expense Account" + }, + "Förlust vid avyttring av immateriella anläggningstillgångar": { + "account_number": "7971" + }, + "Förlust vid avyttring av byggnader och mark": { + "account_number": "7972" + }, + "Förlust vid avyttring av maskiner och inventarier": { + "account_number": "7973" + } + }, + "799 Övriga rörelsekostnader": { + "is_group": 1, + "Övriga rörelsekostnader": { + "account_number": "7999", + "account_type": "Expense Account" + } + } + } + }, + "8 Finansiella och andra inkomster/intäkter och utgifter/kostnader": { + "root_type": "Expense", + "is_group": 1, + "80 Resultat från andelar i koncernföretag": { + "is_group": 1, + "801 Utdelning på andelar i koncernföretag": { + "is_group": 1, + "Utdelning på andelar i koncernföretag": { + "account_number": "8010" + }, + "Utdelning på andelar i dotterföretag": { + "account_number": "8012" + }, + "Emissionsinsats, koncernföretag": { + "account_number": "8016" + } + }, + "802 Resultat vid försäljning av andelar i koncernföretag": { + "is_group": 1, + "Resultat vid försäljning av andelar i koncernföretag": { + "account_number": "8020" + }, + "Resultat vid försäljning av andelar i dotterföretag": { + "account_number": "8022" + } + }, + "803 Resultatandelar från handelsbolag (dotterföretag)": { + "is_group": 1, + "Resultatandelar från handelsbolag (dotterföretag)": { + "account_number": "8030" + } + }, + "807 Nedskrivningar av andelar i och långfristiga fordringar hos koncernföretag": { + "is_group": 1, + "Nedskrivningar av andelar i och långfristiga fordringar hos koncernföretag": { + "account_number": "8070" + }, + "Nedskrivningar av andelar i dotterföretag": { + "account_number": "8072" + }, + "Nedskrivningar av långfristiga fordringar hos moderföretag": { + "account_number": "8076" + }, + "Nedskrivningar av långfristiga fordringar hos dotterföretag": { + "account_number": "8077" + } + }, + "808 återföringar av nedskrivningar av andelar i och långfristiga fordringar hos koncernföretag": { + "is_group": 1, + "återföringar av nedskrivningar av andelar i och långfristiga fordringar hos koncernföretag": { + "account_number": "8080" + }, + "återföringar av nedskrivningar av andelar i dotterföretag": { + "account_number": "8082" + }, + "återföringar av nedskrivningar av långfristiga fordringar hos moderföretag": { + "account_number": "8086" + }, + "återföringar av nedskrivningar av långfristiga fordringar hos dotterföretag": { + "account_number": "8087" + } + } + }, + "81 Resultat från andelar i intresseföretag": { + "account_type": "Expense Account", + "is_group": 1, + "811 Utdelningar på andelar i intresseföretag": { + "account_type": "Expense Account", + "is_group": 1, + "Utdelningar på andelar i intresseföretag": { + "account_number": "8110" + }, + "Utdelningar på andelar i intresseföretag övriga": { + "account_number": "8111" + }, + "Utdelningar på andelar i gemensamt styrda företag": { + "account_number": "8112" + }, + "Utdelningar på andelar i övriga företag": { + "account_number": "8113" + }, + "Emissionsinsats, intresseföretag": { + "account_number": "8116" + }, + "Emissionsinsats, gemensamt styrda företag": { + "account_number": "8117" + }, + "Emissionsinsats, övriga företag": { + "account_number": "8118" + } + }, + "812 Resultat vid försäljning av andelar i intresseföretag": { + "account_type": "Expense Account", + "is_group": 1, + "Resultat vid försäljning av andelar i intresseföretag": { + "account_number": "8120" + }, + "Resultat vid försäljning av andelar i intresseföretag övriga": { + "account_number": "8121" + }, + "Resultat vid försäljning av andelar i gemensamt styrda företag": { + "account_number": "8122" + }, + "Resultat vid försäljning av andelar i övriga företag": { + "account_number": "8123" + } + }, + "813 Resultatandelar från handelsbolag": { + "account_type": "Expense Account", + "is_group": 1, + "Resultatandelar från handelsbolag (intresseföretag, gemensamt styrda företag)": { + "account_number": "8130" + }, + "Resultatandelar från handelsbolag (intresseföretag)": { + "account_number": "8131" + }, + "Resultatandelar från handelsbolag (gemensamt styrda företag)": { + "account_number": "8132" + }, + "Resultatandelar från handelsbolag (övriga företag)": { + "account_number": "8133" + } + }, + "817 Nedskrivningar av andelar i och långfristiga fordringar hos intresseföretag": { + "account_type": "Expense Account", + "is_group": 1, + "Nedskrivningar av andelar i och långfristiga fordringar hos intresseföretag": { + "account_number": "8170" + }, + "Nedskrivningar av andelar i intresseföretag": { + "account_number": "8171" + }, + "Nedskrivningar av långfristiga fordringar hos intresseföretag": { + "account_number": "8172" + }, + "Nedskrivningar av andelar i gemensamt styrda företag": { + "account_number": "8173" + }, + "Nedskrivningar av långfristiga fordringar hos gemensamt styrda företag": { + "account_number": "8174" + }, + "Nedskrivningar av andelar i övriga företag som det finns ett ägarintresse i": { + "account_number": "8176" + }, + "Nedskrivningar av långfristiga fordringar hos övriga företag": { + "account_number": "8177" + } + }, + "818 Återföringar av nedskrivningar av andelar i och långfristiga fordringar hos intresseföretag": { + "account_type": "Expense Account", + "is_group": 1, + "Återföringar av nedskrivningar av andelar i och långfristiga fordringar hos intresseföretag": { + "account_number": "8180" + }, + "Återföringar av nedskrivningar av andelar i intresseföretag": { + "account_number": "8181" + }, + "Återföringar av nedskrivningar av långfristiga fordringar hos intresseföretag": { + "account_number": "8182" + }, + "Återföringar av nedskrivningar av andelar i gemensamt styrda företag": { + "account_number": "8183" + }, + "Återföringar av nedskrivningar av långfristiga fordringar hos gemensamt styrda företag": { + "account_number": "8184" + }, + "Återföringar av nedskrivningar av andelar i övriga företag": { + "account_number": "8186" + }, + "Återföringar av nedskrivningar av långfristiga fordringar hos övriga företag": { + "account_number": "8187" + } + } + }, + "82 Resultat från övriga värdepapper och långfristiga fordringar (anläggningstillgångar)": { + "is_group": 1, + "821 Utdelningar på andelar i andra företag": { + "is_group": 1, + "Utdelningar på andelar i andra företag": { + "account_number": "8210" + }, + "Utdelningar, övriga företag": { + "account_number": "8212" + }, + "Insatsemissioner, övriga företag": { + "account_number": "8216" + } + }, + "822 Resultat vid försäljning av värdepapper i och långfristiga fordringar hos andra företag": { + "is_group": 1, + "Resultat vid försäljning av värdepapper i och långfristiga fordringar hos andra företag": { + "account_number": "8220" + }, + "Resultat vid försäljning av andelar i andra företag": { + "account_number": "8221" + }, + "Resultat vid försäljning av långfristiga fordringar hos andra företag": { + "account_number": "8222" + }, + "Resultat vid försäljning av derivat (långfristiga värdepappersinnehav)": { + "account_number": "8223" + } + }, + "823 Valutakursdifferenser på långfristiga fordringar": { + "is_group": 1, + "Valutakursdifferenser på långfristiga fordringar": { + "account_number": "8230" + }, + "Valutakursvinster på långfristiga fordringar": { + "account_number": "8231" + }, + "Valutakursförluster på långfristiga fordringar": { + "account_number": "8236" + } + }, + "824 Resultatandelar från handelsbolag (andra företag)": { + "is_group": 1, + "Resultatandelar från handelsbolag (andra företag)": { + "account_number": "8240" + } + }, + "825 Ränteintäkter från långfristiga fordringar hos och värdepapper i andra företag": { + "is_group": 1, + "Ränteintäkter från långfristiga fordringar hos och värdepapper i andra företag": { + "account_number": "8250" + }, + "Ränteintäkter från långfristiga fordringar": { + "account_number": "8251" + }, + "Ränteintäkter från övriga värdepapper": { + "account_number": "8252" + }, + "Skattefria ränteintäkter, långfristiga tillgångar": { + "account_number": "8254" + }, + "Avkastningsskatt kapitalplacering": { + "account_number": "8255" + } + }, + "826 Ränteintäkter från långfristiga fordringar hos koncernföretag": { + "is_group": 1, + "Ränteintäkter från långfristiga fordringar hos koncernföretag": { + "account_number": "8260" + }, + "Ränteintäkter från långfristiga fordringar hos moderföretag": { + "account_number": "8261" + }, + "Ränteintäkter från långfristiga fordringar hos dotterföretag": { + "account_number": "8262" + }, + "Ränteintäkter från långfristiga fordringar hos andra koncernföretag": { + "account_number": "8263" + } + }, + "827 Nedskrivningar av innehav av andelar i och långfristiga fordringar hos andra företag": { + "is_group": 1, + "Nedskrivningar av innehav av andelar i och långfristiga fordringar hos andra företag": { + "account_number": "8270" + }, + "Nedskrivningar av andelar i andra företag": { + "account_number": "8271" + }, + "Nedskrivningar av långfristiga fordringar hos andra företag": { + "account_number": "8272" + }, + "Nedskrivningar av övriga värdepapper hos andra företag": { + "account_number": "8273" + } + }, + "828 Återföringar av nedskrivningar av andelar i och långfristiga fordringar hos andra företag": { + "is_group": 1, + "Återföringar av nedskrivningar av andelar i och långfristiga fordringar hos andra företag": { + "account_number": "8280" + }, + "Återföringar av nedskrivningar av andelar i andra företag": { + "account_number": "8281" + }, + "Återföringar av nedskrivningar av långfristiga fordringar hos andra företag": { + "account_number": "8282" + }, + "Återföringar av nedskrivningar av övriga värdepapper i andra företag": { + "account_number": "8283" + } + }, + "829 Värdering till verkligt värde, anläggningstillgångar": { + "is_group": 1, + "Värdering till verkligt värde, anläggningstillgångar": { + "account_number": "8290" + }, + "Orealiserade värdeförändringar på anläggningstillgångar": { + "account_number": "8291" + }, + "Orealiserade värdeförändringar på derivatinstrument": { + "account_number": "8295" + } + } + }, + "83 Övriga ränteintäkter och liknande resultatposter": { + "is_group": 1, + "831 Ränteintäkter från omsättningstillgångar": { + "is_group": 1, + "Ränteintäkter från omsättningstillgångar": { + "account_number": "8310" + }, + "Ränteintäkter från bank": { + "account_number": "8311" + }, + "Ränteintäkter från kortfristiga placeringar": { + "account_number": "8312" + }, + "Ränteintäkter från kortfristiga fordringar": { + "account_number": "8313" + }, + "Skattefria ränteintäkter": { + "account_number": "8314", + "account_type": "Income Account" + }, + "Ränteintäkter för dold räntekompensation": { + "account_number": "8317" + }, + "Övriga ränteintäkter från omsättningstillgångar": { + "account_number": "8319" + } + }, + "832 Värdering till verkligt värde, omsättningstillgångar": { + "is_group": 1, + "Värdering till verkligt värde, omsättningstillgångar": { + "account_number": "8320" + }, + "Orealiserade värdeförändringar på omsättningstillgångar": { + "account_number": "8321" + }, + "Orealiserade värdeförändringar på derivatinstrument (oms.-tillg.)": { + "account_number": "8325" + } + }, + "833 Valutakursdifferenser på kortfristiga fordringar och placeringar": { + "is_group": 1, + "Valutakursdifferenser på kortfristiga fordringar och placeringar": { + "account_number": "8330" + }, + "Valutakursvinster på kortfristiga fordringar och placeringar": { + "account_number": "8331" + }, + "Valutakursförluster på kortfristiga fordringar och placeringar": { + "account_number": "8336" + } + }, + "834 Utdelningar på kortfristiga placeringar": { + "is_group": 1, + "Utdelningar på kortfristiga placeringar": { + "account_number": "8340" + } + }, + "835 Resultat vid försäljning av kortfristiga placeringar": { + "is_group": 1, + "Resultat vid försäljning av kortfristiga placeringar": { + "account_number": "8350" + } + }, + "836 Övriga ränteintäkter från koncernföretag": { + "is_group": 1, + "Övriga ränteintäkter från koncernföretag": { + "account_number": "8360" + }, + "Övriga ränteintäkter från moderföretag": { + "account_number": "8361" + }, + "Övriga ränteintäkter från dotterföretag": { + "account_number": "8362" + }, + "Övriga ränteintäkter från andra koncernföretag": { + "account_number": "8363" + } + }, + "837 Nedskrivningar av kortfristiga placeringar": { + "is_group": 1, + "Nedskrivningar av kortfristiga placeringar": { + "account_number": "8370" + } + }, + "838 Återföringar av nedskrivningar av kortfristiga placeringar": { + "is_group": 1, + "Återföringar av nedskrivningar av kortfristiga placeringar": { + "account_number": "8380" + } + }, + "839 Övriga finansiella intäkter": { + "is_group": 1, + "Övriga finansiella intäkter": { + "account_number": "8390" + } + } + }, + "84 Räntekostnader och liknande resultatposter": { + "is_group": 1, + "840 Räntekostnader (gruppkonto)": { + "is_group": 1, + "Räntekostnader (gruppkonto)": { + "account_number": "8400" + } + }, + "841 Räntekostnader för långfristiga skulder": { + "is_group": 1, + "Räntekostnader för långfristiga skulder": { + "account_number": "8410", + "account_type": "Expense Account" + }, + "Räntekostnader för obligations-, förlags- och konvertibla lån": { + "account_number": "8411" + }, + "Räntedel i årets pensionskostnad": { + "account_number": "8412" + }, + "Räntekostnader för checkräkningskredit": { + "account_number": "8413" + }, + "Räntekostnader för andra skulder till kreditinstitut": { + "account_number": "8415" + }, + "Räntekostnader för dold räntekompensation m.m.": { + "account_number": "8417" + }, + "Avdragspost för räntesubventioner": { + "account_number": "8418" + }, + "Övriga räntekostnader för långfristiga skulder": { + "account_number": "8419" + } + }, + "842 Räntekostnader för kortfristiga skulder": { + "is_group": 1, + "Räntekostnader för kortfristiga skulder": { + "account_number": "8420", + "account_type": "Expense Account" + }, + "Räntekostnader till kreditinstitut": { + "account_number": "8421", + "account_type": "Expense Account" + }, + "Dröjsmålsräntor för leverantörsskulder": { + "account_number": "8422", + "account_type": "Expense Account" + }, + "Räntekostnader för skatter och avgifter": { + "account_number": "8423", + "account_type": "Expense Account" + }, + "Räntekostnader byggnadskreditiv": { + "account_number": "8424" + }, + "Övriga räntekostnader för kortfristiga skulder": { + "account_number": "8429" + } + }, + "843 Valutakursdifferenser på skulder": { + "is_group": 1, + "Valutakursdifferenser på skulder": { + "account_number": "8430", + "account_type": "Expense Account" + }, + "Valutakursvinster på skulder": { + "account_number": "8431" + }, + "Valutakursförluster på skulder": { + "account_number": "8436" + } + }, + "844 Erhållna räntebidrag": { + "is_group": 1, + "Erhållna räntebidrag": { + "account_number": "8440" + } + }, + "845 Orealiserade värdeförändringar på skulder": { + "is_group": 1, + "Orealiserade värdeförändringar på skulder": { + "account_number": "8450" + }, + "Orealiserade värdeförändringar på skulder övriga": { + "account_number": "8451" + }, + "Orealiserade värdeförändringar på säkringsinstrument": { + "account_number": "8455" + } + }, + "846 Räntekostnader till koncernföretag": { + "is_group": 1, + "Räntekostnader till koncernföretag": { + "account_number": "8460" + }, + "Räntekostnader till moderföretag": { + "account_number": "8461" + }, + "Räntekostnader till dotterföretag": { + "account_number": "8462" + }, + "Räntekostnader till andra koncernföretag": { + "account_number": "8463" + } + }, + "848 Aktiverade ränteutgifter": { + "is_group": 1, + "Aktiverade ränteutgifter": { + "account_number": "8480" + } + }, + "849 Övriga skuldrelaterade poster": { + "is_group": 1, + "Övriga skuldrelaterade poster": { + "account_number": "8490" + }, + "Erhållet ackord på skulder till kreditinstitut m.m.": { + "account_number": "8491" + } + } + }, + "85 (Fri kontogrupp)": { + "is_group": 1, + "(Fri kontogrupp)": { + "account_number": "8500" + } + }, + "86 (Fri kontogrupp)": { + "is_group": 1, + "(Fri kontogrupp)": { + "account_number": "8600" + } + }, + "87 (Fri kontogrupp)": { + "is_group": 1, + "(Fri kontogrupp)": { + "account_number": "8700" + } + }, + "88 Bokslutsdispositioner": { + "is_group": 1, + "881 Förändring av periodiseringsfond": { + "is_group": 1, + "Förändring av periodiseringsfond": { + "account_number": "8810" + }, + "Avsättning till periodiseringsfond": { + "account_number": "8811" + }, + "Återföring från periodiseringsfond": { + "account_number": "8819" + } + }, + "882 Mottagna koncernbidrag": { + "is_group": 1, + "Mottagna koncernbidrag": { + "account_number": "8820" + } + }, + "883 Lämnade koncernbidrag": { + "is_group": 1, + "Lämnade koncernbidrag": { + "account_number": "8830" + } + }, + "884 Lämnade gottgörelser": { + "is_group": 1, + "Lämnade gottgörelser": { + "account_number": "8840" + } + }, + "885 Förändring av överavskrivningar": { + "is_group": 1, + "Förändring av överavskrivningar": { + "account_number": "8850" + }, + "Förändring av överavskrivningar, immateriella anläggningstillgångar": { + "account_number": "8851" + }, + "Förändring av överavskrivningar, byggnader och markanläggningar": { + "account_number": "8852" + }, + "Förändring av överavskrivningar, maskiner och inventarier": { + "account_number": "8853" + } + }, + "886 Förändring av ersättningsfond": { + "is_group": 1, + "Förändring av ersättningsfond": { + "account_number": "8860" + }, + "Avsättning till ersättningsfond för inventarier": { + "account_number": "8861" + }, + "Avsättning till ersättningsfond för byggnader och markanläggningar": { + "account_number": "8862" + }, + "Avsättning till ersättningsfond för djurlager i jordbruk och rensku00f6tsel": { + "account_number": "8864" + }, + "Ianspråktagande av ersättningsfond för avskrivningar": { + "account_number": "8865" + }, + "Ianspråktagande av ersättningsfond för annat än avskrivningar": { + "account_number": "8866" + }, + "Återföring från ersättningsfond": { + "account_number": "8869" + } + }, + "889 Övriga bokslutsdispositioner": { + "is_group": 1, + "Övriga bokslutsdispositioner": { + "account_number": "8890" + }, + "Nedskrivningar av konsolideringskaraktär av anläggningstillgångar": { + "account_number": "8892" + }, + "Förändring av lagerreserv": { + "account_number": "8896" + }, + "Övriga bokslutsdispositioner övriga": { + "account_number": "8899" + } + } + }, + "89 Skatter och årets resultat": { + "is_group": 1, + "891 Skatt som belastar årets resultat": { + "is_group": 1, + "Skatt som belastar årets resultat": { + "account_number": "8910" + } + }, + "892 Skatt på grund av ändrad beskattning": { + "is_group": 1, + "Skatt på grund av ändrad beskattning": { + "account_number": "8920" + } + }, + "893 Restituerad skatt": { + "is_group": 1, + "Restituerad skatt": { + "account_number": "8930" + } + }, + "894 Uppskjuten skatt": { + "is_group": 1, + "Uppskjuten skatt": { + "account_number": "8940" + } + }, + "898 Övriga skatter": { + "is_group": 1, + "Övriga skatter": { + "account_number": "8980" + } + }, + "899 Resultat": { + "is_group": 1, + "Resultat": { + "account_number": "8990" + }, + "Årets resultat": { + "account_number": "8999" + } + } + } + }, + "9 Eget Kapital": { + "root_type": "Equity", + "is_group": 1, + "90 Eget Kapital": { + "account_type": "Equity", + "is_group": 1, + "901 Eget kapital, delägare 1": { + "is_group": 1, + "Eget kapital": { + "account_number": "9010", + "account_type": "Equity" + }, + "Egna varuuttag": { + "account_number": "9011", + "account_type": "Equity" + }, + "Övriga egna uttag": { + "account_number": "9013", + "account_type": "Equity" + }, + "Årets kapitaltillskott": { + "account_number": "9017", + "account_type": "Equity" + }, + "Övriga egna insättningar": { + "account_number": "9018", + "account_type": "Equity" + }, + "Årets resultat": { + "account_number": "9019", + "account_type": "Equity" + } + }, + "902 Eget kapital, delägare 2": { + "is_group": 1, + "Eget kapital": { + "account_number": "9020", + "account_type": "Equity" + }, + "Egna varuuttag": { + "account_number": "9021", + "account_type": "Equity" + }, + "Övriga egna uttag": { + "account_number": "9023", + "account_type": "Equity" + }, + "Årets kapitaltillskott": { + "account_number": "9027", + "account_type": "Equity" + }, + "Övriga egna insättningar": { + "account_number": "9028", + "account_type": "Equity" + }, + "Årets resultat": { + "account_number": "9029", + "account_type": "Equity" + } + }, + "903 Eget kapital, delägare 3": { + "is_group": 1, + "Eget kapital": { + "account_number": "9030", + "account_type": "Equity" + }, + "Egna varuuttag": { + "account_number": "9031", + "account_type": "Equity" + }, + "Övriga egna uttag": { + "account_number": "9033", + "account_type": "Equity" + }, + "Årets kapitaltillskott": { + "account_number": "9037", + "account_type": "Equity" + }, + "Övriga egna insättningar": { + "account_number": "9038", + "account_type": "Equity" + }, + "Årets resultat": { + "account_number": "9039", + "account_type": "Equity" + } + }, + "904 Eget kapital, delägare 4": { + "is_group": 1, + "Eget kapital": { + "account_number": "9040", + "account_type": "Equity" + }, + "Egna varuuttag": { + "account_number": "9041", + "account_type": "Equity" + }, + "Övriga egna uttag": { + "account_number": "9043", + "account_type": "Equity" + }, + "Årets kapitaltillskott": { + "account_number": "9047", + "account_type": "Equity" + }, + "Övriga egna insättningar": { + "account_number": "9048", + "account_type": "Equity" + }, + "Årets resultat": { + "account_number": "9049", + "account_type": "Equity" + } + }, + "905 Avsättning till expansionsfond": { + "is_group": 1, + "Avsättning till expansionsfond": { + "account_number": "9050" + } + }, + "906 Eget kapital i ideella föreningar, stiftelser och registrerade trossamfund": { + "is_group": 1, + "Eget kapital i ideella föreningar, stiftelser och registrerade trossamfund": { + "account_number": "9060", + "account_type": "Equity" + }, + "Eget kapital/stiftelsekapital/grundkapital": { + "account_number": "9061" + }, + "Förändring i fond för verkligt värde": { + "account_number": "9065" + }, + "Värdesäkringsfond": { + "account_number": "9066" + }, + "Balanserad vinst eller förlust/balanserat kapital": { + "account_number": "9067" + }, + "Vinst eller förlust från föregående år": { + "account_number": "9068" + }, + "Årets resultat": { + "account_number": "9069" + } + }, + "907 Ändamålsbestämda medel": { + "is_group": 1, + "Ändamålsbestämda medel": { + "account_number": "9070", + "account_type": "Equity" + }, + "Ändamål 1": { + "account_number": "9071" + }, + "Ändamål 2": { + "account_number": "9072" + } + }, + "908 Bundet eget kapital": { + "is_group": 1, + "Bundet eget kapital": { + "account_number": "9080" + }, + "Aktiekapital": { + "account_number": "9081", + "account_type": "Equity" + }, + "Ej registrerat aktiekapital": { + "account_number": "9082" + }, + "Medlemsinsatser": { + "account_number": "9083", + "account_type": "Equity" + }, + "Förlagsinsatser": { + "account_number": "9084" + }, + "Uppskrivningsfond": { + "account_number": "9085" + }, + "Reservfond": { + "account_number": "9086", + "account_type": "Equity" + }, + "Bunden överkursfond": { + "account_number": "9087" + }, + "Fond för yttre underhåll": { + "account_number": "9088" + }, + "Fond för utvecklingsutgifter": { + "account_number": "9089" + } + }, + "909 Fritt eget kapital": { + "is_group": 1, + "Fritt eget kapital": { + "account_number": "9090", + "account_type": "Equity" + }, + "Balanserad vinst eller förlust": { + "account_number": "9091", + "account_type": "Equity" + }, + "Mottagna/lämnade koncernbidrag": { + "account_number": "9092" + }, + "Erhållna aktieägartillskott": { + "account_number": "9093" + }, + "Egna aktier": { + "account_number": "9094" + }, + "Fusionsresultat": { + "account_number": "9095" + }, + "Fond för verkligt värde": { + "account_number": "9096" + }, + "Fri överkursfond": { + "account_number": "9097" + }, + "Vinst eller förlust från föregående år": { + "account_number": "9098", + "account_type": "Equity" + }, + "Årets resultat": { + "account_number": "9099", + "account_type": "Equity" + } + } + }, + "91 Obeskattade reserver": { + "root_type": "Equity", + "is_group": 1, + "911 Periodiseringsfonder": { + "account_type": "Equity", + "is_group": 1, + "Periodiseringsfonder": { + "account_number": "9110" + } + }, + "912 Periodiseringsfond 2020": { + "is_group": 1, + "Periodiseringsfond 2020": { + "account_number": "9120", + "account_type": "Equity" + }, + "Periodiseringsfond 2021": { + "account_number": "9121", + "account_type": "Equity" + }, + "Periodiseringsfond 2022": { + "account_number": "9122", + "account_type": "Equity" + }, + "Periodiseringsfond 2023": { + "account_number": "9123", + "account_type": "Equity" + }, + "Periodiseringsfond 2024": { + "account_number": "9124", + "account_type": "Equity" + }, + "Periodiseringsfond 2016": { + "account_number": "9126", + "account_type": "Equity" + }, + "Periodiseringsfond 2017": { + "account_number": "9127", + "account_type": "Equity" + }, + "Periodiseringsfond 2018": { + "account_number": "9128", + "account_type": "Equity" + }, + "Periodiseringsfond 2019": { + "account_number": "9129", + "account_type": "Equity" + } + }, + "913 Periodiseringsfond 2020": { + "is_group": 1, + "Periodiseringsfond 2020": { + "account_number": "9130", + "account_type": "Equity" + }, + "Periodiseringsfond 2021": { + "account_number": "9131", + "account_type": "Equity" + }, + "Periodiseringsfond 2022": { + "account_number": "9132", + "account_type": "Equity" + }, + "Periodiseringsfond 2023": { + "account_number": "9133", + "account_type": "Equity" + }, + "Periodiseringsfond 2024": { + "account_number": "9134", + "account_type": "Equity" + }, + "Periodiseringsfond 2016": { + "account_number": "9136", + "account_type": "Equity" + }, + "Periodiseringsfond 2017": { + "account_number": "9137", + "account_type": "Equity" + }, + "Periodiseringsfond 2018": { + "account_number": "9138", + "account_type": "Equity" + }, + "Periodiseringsfond 2019": { + "account_number": "9139", + "account_type": "Equity" + } + }, + "915 Ackumulerade överavskrivningar": { + "is_group": 1, + "Ackumulerade överavskrivningar": { + "account_number": "9150", + "account_type": "Equity" + }, + "Ackumulerade överavskrivningar på immateriella anläggningstillgångar": { + "account_number": "9151" + }, + "Ackumulerade överavskrivningar på byggnader och markanläggningar": { + "account_number": "9152" + }, + "Ackumulerade överavskrivningar på maskiner och inventarier": { + "account_number": "9153" + } + }, + "916 Ersättningsfond": { + "is_group": 1, + "Ersättningsfond": { + "account_number": "9160" + }, + "Ersättningsfond maskiner och inventarier": { + "account_number": "9161" + }, + "Ersättningsfond byggnader och markanläggningar": { + "account_number": "9162" + }, + "Ersättningsfond för djurlager i jordbruk och renskötsel": { + "account_number": "9164" + } + }, + "919 Övriga obeskattade reserver": { + "is_group": 1, + "Övriga obeskattade reserver": { + "account_number": "9190" + }, + "Lagerreserv": { + "account_number": "9196" + }, + "Övriga obeskattade reserver övriga": { + "account_number": "9199" + } + } + }, + "92 Avsättningar": { + "account_type": "Equity", + "is_group": 1, + "921 Avsättningar för pensioner enligt tryggandelagen": { + "account_type": "Equity", + "is_group": 1, + "Avsättningar för pensioner enligt tryggandelagen": { + "account_number": "9210", + "account_type": "Equity" + } + }, + "922 Avsättningar för garantier": { + "account_type": "Equity", + "is_group": 1, + "Avsättningar för garantier": { + "account_number": "9220", + "account_type": "Equity" + } + }, + "923 Övriga avsättningar för pensioner och liknande förpliktelser": { + "account_type": "Equity", + "is_group": 1, + "Övriga avsättningar för pensioner och liknande förpliktelser": { + "account_number": "9230" + } + }, + "924 Avsättningar för uppskjutna skatter": { + "is_group": 1, + "Avsättningar för uppskjutna skatter": { + "account_number": "9240" + } + }, + "925 Övriga avsättningar för skatter": { + "is_group": 1, + "Övriga avsättningar för skatter": { + "account_number": "9250" + }, + "Avsättningar för tvistiga skatter": { + "account_number": "9252" + }, + "Avsättningar särskild löneskatt, deklarationspost": { + "account_number": "9253" + } + }, + "929 Övriga avsättningar": { + "account_type": "Equity", + "is_group": 1, + "Övriga avsättningar": { + "account_number": "9290", + "account_type": "Equity" + } + } + } + } + + } +} From 8f811728d97293744bb35f6a3bdba889708127c5 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 20 Dec 2024 12:18:01 +0530 Subject: [PATCH 0699/1614] feat(subcontracting): Added provision to create multiple Subcontracting Orders against a single Purchase Order (backport #44711) (#44782) * feat(subcontracting): Added provision to create multiple Subcontracting Orders against a single Purchase Order (#44711) * feat(subcontracting): Added provision to create multiple Subcontracting Orders from a single Subcontracted Purchase Order * refactor(new_sc_flow_2): Fixed error thrown by semgrep (cherry picked from commit 3eba6bf3ddcf911638681a83522e4e47196183ae) # Conflicts: # erpnext/buying/doctype/purchase_order/purchase_order.js # erpnext/buying/doctype/purchase_order/test_purchase_order.py # erpnext/buying/doctype/purchase_order_item/purchase_order_item.json # erpnext/subcontracting/doctype/subcontracting_order_item/subcontracting_order_item.json # erpnext/subcontracting/doctype/subcontracting_order_service_item/subcontracting_order_service_item.json * feat(subcontracting): Added provision to create multiple Subcontracting Orders against a single Purchase Order (#44711) * feat(subcontracting): Added provision to create multiple Subcontracting Orders from a single Subcontracted Purchase Order * refactor(new_sc_flow_2): Fixed error thrown by semgrep * fix: Resolved errors and removed code from develop branch merged by mistake --------- Co-authored-by: Mihir Kandoi --- .../doctype/purchase_order/purchase_order.js | 14 ++- .../doctype/purchase_order/purchase_order.py | 59 +++++---- .../purchase_order/test_purchase_order.py | 116 +++++++++++++++++- .../purchase_order_item.json | 13 +- .../purchase_order_item.py | 1 + .../controllers/subcontracting_controller.py | 19 +++ .../tests/test_subcontracting_controller.py | 3 +- .../subcontracting_order.js | 30 ++++- .../subcontracting_order.py | 50 ++++++-- .../test_subcontracting_order.py | 6 - .../subcontracting_order_item.json | 14 ++- .../subcontracting_order_item.py | 1 + .../subcontracting_order_service_item.json | 2 +- .../subcontracting_order_service_item.py | 2 + 14 files changed, 271 insertions(+), 59 deletions(-) diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.js b/erpnext/buying/doctype/purchase_order/purchase_order.js index e71f2418794..4cc38391276 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.js +++ b/erpnext/buying/doctype/purchase_order/purchase_order.js @@ -400,11 +400,15 @@ erpnext.buying.PurchaseOrderController = class PurchaseOrderController extends ( ); } } else { - cur_frm.add_custom_button( - __("Subcontracting Order"), - this.make_subcontracting_order, - __("Create") - ); + if (!doc.items.every((item) => item.qty == item.sco_qty)) { + this.frm.add_custom_button( + __("Subcontracting Order"), + () => { + me.make_subcontracting_order(); + }, + __("Create") + ); + } } } } diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.py b/erpnext/buying/doctype/purchase_order/purchase_order.py index 6ba9cb69f9f..26c0101b49b 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.py +++ b/erpnext/buying/doctype/purchase_order/purchase_order.py @@ -867,27 +867,40 @@ def make_inter_company_sales_order(source_name, target_doc=None): @frappe.whitelist() def make_subcontracting_order(source_name, target_doc=None, save=False, submit=False, notify=False): - target_doc = get_mapped_subcontracting_order(source_name, target_doc) + if not is_po_fully_subcontracted(source_name): + target_doc = get_mapped_subcontracting_order(source_name, target_doc) - if (save or submit) and frappe.has_permission(target_doc.doctype, "create"): - target_doc.save() + if (save or submit) and frappe.has_permission(target_doc.doctype, "create"): + target_doc.save() - if submit and frappe.has_permission(target_doc.doctype, "submit", target_doc): - try: - target_doc.submit() - except Exception as e: - target_doc.add_comment("Comment", _("Submit Action Failed") + "

" + str(e)) + if submit and frappe.has_permission(target_doc.doctype, "submit", target_doc): + try: + target_doc.submit() + except Exception as e: + target_doc.add_comment("Comment", _("Submit Action Failed") + "

" + str(e)) - if notify: - frappe.msgprint( - _("Subcontracting Order {0} created.").format( - get_link_to_form(target_doc.doctype, target_doc.name) - ), - indicator="green", - alert=True, - ) + if notify: + frappe.msgprint( + _("Subcontracting Order {0} created.").format( + get_link_to_form(target_doc.doctype, target_doc.name) + ), + indicator="green", + alert=True, + ) - return target_doc + return target_doc + else: + frappe.throw(_("This PO has been fully subcontracted.")) + + +def is_po_fully_subcontracted(po_name): + table = frappe.qb.DocType("Purchase Order Item") + query = ( + frappe.qb.from_(table) + .select(table.name) + .where((table.parent == po_name) & (table.qty != table.sco_qty)) + ) + return not query.run(as_dict=True) def get_mapped_subcontracting_order(source_name, target_doc=None): @@ -931,7 +944,8 @@ def get_mapped_subcontracting_order(source_name, target_doc=None): "material_request": "material_request", "material_request_item": "material_request_item", }, - "field_no_map": [], + "field_no_map": ["qty", "fg_item_qty", "amount"], + "condition": lambda item: item.qty != item.sco_qty, }, }, target_doc, @@ -939,12 +953,3 @@ def get_mapped_subcontracting_order(source_name, target_doc=None): ) return target_doc - - -@frappe.whitelist() -def is_subcontracting_order_created(po_name) -> bool: - return ( - True - if frappe.db.exists("Subcontracting Order", {"purchase_order": po_name, "docstatus": ["=", 1]}) - else False - ) diff --git a/erpnext/buying/doctype/purchase_order/test_purchase_order.py b/erpnext/buying/doctype/purchase_order/test_purchase_order.py index dbfcbf60b26..5d8ce73e8ab 100644 --- a/erpnext/buying/doctype/purchase_order/test_purchase_order.py +++ b/erpnext/buying/doctype/purchase_order/test_purchase_order.py @@ -1004,7 +1004,7 @@ class TestPurchaseOrder(FrappeTestCase): ) def update_items(po, qty): - trans_items = [po.items[0].as_dict()] + trans_items = [po.items[0].as_dict().update({"docname": po.items[0].name})] trans_items[0]["qty"] = qty trans_items[0]["fg_item_qty"] = qty trans_items = json.dumps(trans_items, default=str) @@ -1059,6 +1059,73 @@ class TestPurchaseOrder(FrappeTestCase): self.assertEqual(po.items[0].qty, 30) self.assertEqual(po.items[0].fg_item_qty, 30) + def test_new_sc_flow(self): + from erpnext.buying.doctype.purchase_order.purchase_order import make_subcontracting_order + + po = create_po_for_sc_testing() + sco = make_subcontracting_order(po.name) + + sco.items[0].qty = 5 + sco.items.pop(1) + sco.items[1].qty = 25 + sco.save() + sco.submit() + + # Test - 1: Quantity of Service Items should change based on change in Quantity of its corresponding Finished Goods Item + self.assertEqual(sco.service_items[0].qty, 5) + + # Test - 2: Subcontracted Quantity for the PO Items of each line item should be updated accordingly + po.reload() + self.assertEqual(po.items[0].sco_qty, 5) + self.assertEqual(po.items[1].sco_qty, 0) + self.assertEqual(po.items[2].sco_qty, 12.5) + + # Test - 3: Amount for both FG Item and its Service Item should be updated correctly based on change in Quantity + self.assertEqual(sco.items[0].amount, 2000) + self.assertEqual(sco.service_items[0].amount, 500) + + # Test - 4: Service Items should be removed if its corresponding Finished Good line item is deleted + self.assertEqual(len(sco.service_items), 2) + + # Test - 5: Service Item quantity calculation should be based upon conversion factor calculated from its corresponding PO Item + self.assertEqual(sco.service_items[1].qty, 12.5) + + sco = make_subcontracting_order(po.name) + + sco.items[0].qty = 6 + + # Test - 6: Saving document should not be allowed if Quantity exceeds available Subcontracting Quantity of any Purchase Order Item + self.assertRaises(frappe.ValidationError, sco.save) + + sco.items[0].qty = 5 + sco.items.pop() + sco.items.pop() + sco.save() + sco.submit() + + sco = make_subcontracting_order(po.name) + + # Test - 7: Since line item 1 is now fully subcontracted, new SCO should by default only have the remaining 2 line items + self.assertEqual(len(sco.items), 2) + + sco.items.pop(0) + sco.save() + sco.submit() + + # Test - 8: Subcontracted Quantity for each PO Item should be subtracted if SCO gets cancelled + po.reload() + self.assertEqual(po.items[2].sco_qty, 25) + sco.cancel() + po.reload() + self.assertEqual(po.items[2].sco_qty, 12.5) + + sco = make_subcontracting_order(po.name) + sco.save() + sco.submit() + + # Test - 8: Since this PO is now fully subcontracted, creating a new SCO from it should throw error + self.assertRaises(frappe.ValidationError, make_subcontracting_order, po.name) + @change_settings("Buying Settings", {"auto_create_subcontracting_order": 1}) def test_auto_create_subcontracting_order(self): from erpnext.controllers.tests.test_subcontracting_controller import ( @@ -1124,6 +1191,53 @@ class TestPurchaseOrder(FrappeTestCase): self.assertEqual(po.per_billed, 100) +def create_po_for_sc_testing(): + from erpnext.controllers.tests.test_subcontracting_controller import ( + make_bom_for_subcontracted_items, + make_raw_materials, + make_service_items, + make_subcontracted_items, + ) + + make_subcontracted_items() + make_raw_materials() + make_service_items() + make_bom_for_subcontracted_items() + + service_items = [ + { + "warehouse": "_Test Warehouse - _TC", + "item_code": "Subcontracted Service Item 1", + "qty": 10, + "rate": 100, + "fg_item": "Subcontracted Item SA1", + "fg_item_qty": 10, + }, + { + "warehouse": "_Test Warehouse - _TC", + "item_code": "Subcontracted Service Item 2", + "qty": 20, + "rate": 25, + "fg_item": "Subcontracted Item SA2", + "fg_item_qty": 15, + }, + { + "warehouse": "_Test Warehouse - _TC", + "item_code": "Subcontracted Service Item 3", + "qty": 25, + "rate": 10, + "fg_item": "Subcontracted Item SA3", + "fg_item_qty": 50, + }, + ] + + return create_purchase_order( + rm_items=service_items, + is_subcontracted=1, + supplier_warehouse="_Test Warehouse 1 - _TC", + ) + + def prepare_data_for_internal_transfer(): from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_internal_supplier from erpnext.selling.doctype.customer.test_customer import create_internal_customer diff --git a/erpnext/buying/doctype/purchase_order_item/purchase_order_item.json b/erpnext/buying/doctype/purchase_order_item/purchase_order_item.json index e3e8def7ffd..4fc20594ffa 100644 --- a/erpnext/buying/doctype/purchase_order_item/purchase_order_item.json +++ b/erpnext/buying/doctype/purchase_order_item/purchase_order_item.json @@ -1,7 +1,7 @@ { "actions": [], "autoname": "hash", - "creation": "2013-05-24 19:29:06", + "creation": "2024-12-09 12:54:24.652161", "doctype": "DocType", "document_type": "Document", "editable_grid": 1, @@ -26,6 +26,7 @@ "quantity_and_rate", "qty", "stock_uom", + "sco_qty", "col_break2", "uom", "conversion_factor", @@ -909,13 +910,21 @@ { "fieldname": "column_break_fyqr", "fieldtype": "Column Break" + }, + { + "allow_on_submit": 1, + "fieldname": "sco_qty", + "fieldtype": "Float", + "label": "Subcontracted Quantity", + "no_copy": 1, + "read_only": 1 } ], "idx": 1, "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2024-02-05 11:23:24.859435", + "modified": "2024-12-10 12:11:18.536089", "modified_by": "Administrator", "module": "Buying", "name": "Purchase Order Item", diff --git a/erpnext/buying/doctype/purchase_order_item/purchase_order_item.py b/erpnext/buying/doctype/purchase_order_item/purchase_order_item.py index e9cc2b4eecf..b80abda56c3 100644 --- a/erpnext/buying/doctype/purchase_order_item/purchase_order_item.py +++ b/erpnext/buying/doctype/purchase_order_item/purchase_order_item.py @@ -80,6 +80,7 @@ class PurchaseOrderItem(Document): sales_order_item: DF.Data | None sales_order_packed_item: DF.Data | None schedule_date: DF.Date + sco_qty: DF.Float stock_qty: DF.Float stock_uom: DF.Link stock_uom_rate: DF.Currency diff --git a/erpnext/controllers/subcontracting_controller.py b/erpnext/controllers/subcontracting_controller.py index 5fb1ee468cd..75cb5516348 100644 --- a/erpnext/controllers/subcontracting_controller.py +++ b/erpnext/controllers/subcontracting_controller.py @@ -103,6 +103,19 @@ class SubcontractingController(StockController): _("Row {0}: Item {1} must be a subcontracted item.").format(item.idx, item.item_name) ) + if ( + self.doctype not in "Subcontracting Receipt" + and item.qty + > flt(get_pending_sco_qty(self.purchase_order).get(item.purchase_order_item)) + / item.sc_conversion_factor + ): + frappe.throw( + _( + "Row {0}: Item {1}'s quantity cannot be higher than the available quantity." + ).format(item.idx, item.item_name) + ) + item.amount = item.qty * item.rate + if item.bom: is_active, bom_item = frappe.get_value("BOM", item.bom, ["is_active", "item"]) @@ -1110,6 +1123,12 @@ def get_item_details(items): return item_details +def get_pending_sco_qty(po_name): + table = frappe.qb.DocType("Purchase Order Item") + query = frappe.qb.from_(table).select(table.name, table.qty, table.sco_qty).where(table.parent == po_name) + return {item.name: item.qty - item.sco_qty for item in query.run(as_dict=True)} + + @frappe.whitelist() def make_rm_stock_entry( subcontract_order, rm_items=None, order_doctype="Subcontracting Order", target_doc=None diff --git a/erpnext/controllers/tests/test_subcontracting_controller.py b/erpnext/controllers/tests/test_subcontracting_controller.py index 84326bafef2..0bc348e8876 100644 --- a/erpnext/controllers/tests/test_subcontracting_controller.py +++ b/erpnext/controllers/tests/test_subcontracting_controller.py @@ -1261,6 +1261,7 @@ def make_raw_materials(): for item, properties in raw_materials.items(): if not frappe.db.exists("Item", item): properties.update({"is_stock_item": 1}) + properties.update({"valuation_rate": 100}) make_item(item, properties) @@ -1311,7 +1312,7 @@ def make_bom_for_subcontracted_items(): for item_code, raw_materials in boms.items(): if not frappe.db.exists("BOM", {"item": item_code}): - make_bom(item=item_code, raw_materials=raw_materials, rate=100) + make_bom(item=item_code, raw_materials=raw_materials, rate=100, currency="INR") def set_backflush_based_on(based_on): diff --git a/erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order.js b/erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order.js index c6ee3a3e0e3..e9513a47597 100644 --- a/erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order.js +++ b/erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order.js @@ -5,10 +5,38 @@ frappe.provide("erpnext.buying"); erpnext.landed_cost_taxes_and_charges.setup_triggers("Subcontracting Order"); +// client script for Subcontracting Order Item is not necessarily required as the server side code will do everything that is necessary. +// this is just so that the user does not get potentially confused +frappe.ui.form.on("Subcontracting Order Item", { + qty(frm, cdt, cdn) { + const row = locals[cdt][cdn]; + frappe.model.set_value(cdt, cdn, "amount", row.qty * row.rate); + const service_item = frm.doc.service_items[row.idx - 1]; + frappe.model.set_value( + service_item.doctype, + service_item.name, + "qty", + row.qty * row.sc_conversion_factor + ); + frappe.model.set_value(service_item.doctype, service_item.name, "fg_item_qty", row.qty); + frappe.model.set_value( + service_item.doctype, + service_item.name, + "amount", + row.qty * row.sc_conversion_factor * service_item.rate + ); + }, + before_items_remove(frm, cdt, cdn) { + const row = locals[cdt][cdn]; + frm.toggle_enable(["service_items"], true); + frm.get_field("service_items").grid.grid_rows[row.idx - 1].remove(); + frm.toggle_enable(["service_items"], false); + }, +}); + frappe.ui.form.on("Subcontracting Order", { setup: (frm) => { frm.get_field("items").grid.cannot_add_rows = true; - frm.get_field("items").grid.only_sortable(); frm.trigger("set_queries"); frm.set_indicator_formatter("item_code", (doc) => (doc.qty <= doc.received_qty ? "green" : "orange")); diff --git a/erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order.py b/erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order.py index 8419c8e9093..f6d3fa04148 100644 --- a/erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order.py +++ b/erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order.py @@ -6,7 +6,6 @@ from frappe import _ from frappe.model.mapper import get_mapped_doc from frappe.utils import flt -from erpnext.buying.doctype.purchase_order.purchase_order import is_subcontracting_order_created from erpnext.buying.utils import check_on_hold_or_closed_status from erpnext.controllers.subcontracting_controller import SubcontractingController from erpnext.stock.stock_balance import update_bin_qty @@ -120,20 +119,15 @@ class SubcontractingOrder(SubcontractingController): def on_submit(self): self.update_prevdoc_status() self.update_status() + self.update_sco_qty_in_po() def on_cancel(self): self.update_prevdoc_status() self.update_status() + self.update_sco_qty_in_po(cancel=True) def validate_purchase_order_for_subcontracting(self): if self.purchase_order: - if is_subcontracting_order_created(self.purchase_order): - frappe.throw( - _( - "Only one Subcontracting Order can be created against a Purchase Order, cancel the existing Subcontracting Order to create a new one." - ) - ) - po = frappe.get_doc("Purchase Order", self.purchase_order) if not po.is_subcontracted: @@ -154,10 +148,23 @@ class SubcontractingOrder(SubcontractingController): frappe.throw(_("Please select a Subcontracting Purchase Order.")) def validate_service_items(self): - for item in self.service_items: - if frappe.get_value("Item", item.item_code, "is_stock_item"): - msg = f"Service Item {item.item_name} must be a non-stock item." - frappe.throw(_(msg)) + purchase_order_items = [item.purchase_order_item for item in self.items] + self.service_items = [ + service_item + for service_item in self.service_items + if service_item.purchase_order_item in purchase_order_items + ] + + for service_item in self.service_items: + if frappe.get_value("Item", service_item.item_code, "is_stock_item"): + frappe.throw(_("Service Item {0} must be a non-stock item.").format(service_item.item_code)) + + item = next( + item for item in self.items if item.purchase_order_item == service_item.purchase_order_item + ) + service_item.qty = item.qty * item.sc_conversion_factor + service_item.fg_item_qty = item.qty + service_item.amount = service_item.qty * service_item.rate def validate_supplied_items(self): if self.supplier_warehouse: @@ -241,6 +248,18 @@ class SubcontractingOrder(SubcontractingController): for si in self.service_items: if si.fg_item: item = frappe.get_doc("Item", si.fg_item) + + po_item = frappe.get_doc("Purchase Order Item", si.purchase_order_item) + available_qty = po_item.qty - po_item.sco_qty + + if available_qty == 0: + continue + + si.qty = available_qty + conversion_factor = po_item.qty / po_item.fg_item_qty + si.fg_item_qty = available_qty / conversion_factor + si.amount = available_qty * si.rate + bom = ( frappe.db.get_value( "Subcontracting BOM", @@ -257,6 +276,7 @@ class SubcontractingOrder(SubcontractingController): "schedule_date": self.schedule_date, "description": item.description, "qty": si.fg_item_qty, + "sc_conversion_factor": conversion_factor, "stock_uom": item.stock_uom, "bom": bom, "purchase_order_item": si.purchase_order_item, @@ -310,6 +330,12 @@ class SubcontractingOrder(SubcontractingController): self.update_ordered_qty_for_subcontracting() self.update_reserved_qty_for_subcontracting() + def update_sco_qty_in_po(self, cancel=False): + for service_item in self.service_items: + doc = frappe.get_doc("Purchase Order Item", service_item.purchase_order_item) + doc.sco_qty = (doc.sco_qty + service_item.qty) if not cancel else (doc.sco_qty - service_item.qty) + doc.save() + @frappe.whitelist() def make_subcontracting_receipt(source_name, target_doc=None): diff --git a/erpnext/subcontracting/doctype/subcontracting_order/test_subcontracting_order.py b/erpnext/subcontracting/doctype/subcontracting_order/test_subcontracting_order.py index ac87239e73e..43592b628ad 100644 --- a/erpnext/subcontracting/doctype/subcontracting_order/test_subcontracting_order.py +++ b/erpnext/subcontracting/doctype/subcontracting_order/test_subcontracting_order.py @@ -40,12 +40,6 @@ class TestSubcontractingOrder(FrappeTestCase): make_service_items() make_bom_for_subcontracted_items() - def test_populate_items_table(self): - sco = get_subcontracting_order() - sco.items = None - sco.populate_items_table() - self.assertEqual(len(sco.service_items), len(sco.items)) - def test_set_missing_values(self): sco = get_subcontracting_order() before = {sco.total_qty, sco.total, sco.total_additional_costs} diff --git a/erpnext/subcontracting/doctype/subcontracting_order_item/subcontracting_order_item.json b/erpnext/subcontracting/doctype/subcontracting_order_item/subcontracting_order_item.json index 502a28b3ec6..31616944fda 100644 --- a/erpnext/subcontracting/doctype/subcontracting_order_item/subcontracting_order_item.json +++ b/erpnext/subcontracting/doctype/subcontracting_order_item/subcontracting_order_item.json @@ -51,7 +51,8 @@ "project", "section_break_34", "purchase_order_item", - "page_break" + "page_break", + "sc_conversion_factor" ], "fields": [ { @@ -144,8 +145,8 @@ "fieldtype": "Float", "in_list_view": 1, "label": "Quantity", + "non_negative": 1, "print_width": "60px", - "read_only": 1, "reqd": 1, "width": "60px" }, @@ -381,13 +382,20 @@ "no_copy": 1, "read_only": 1, "search_index": 1 + }, + { + "fieldname": "sc_conversion_factor", + "fieldtype": "Float", + "hidden": 1, + "label": "SC Conversion Factor", + "read_only": 1 } ], "idx": 1, "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2024-12-06 15:23:05.252346", + "modified": "2024-12-13 13:35:28.935898", "modified_by": "Administrator", "module": "Subcontracting", "name": "Subcontracting Order Item", diff --git a/erpnext/subcontracting/doctype/subcontracting_order_item/subcontracting_order_item.py b/erpnext/subcontracting/doctype/subcontracting_order_item/subcontracting_order_item.py index 7a426f91cb0..d8f2e5664e7 100644 --- a/erpnext/subcontracting/doctype/subcontracting_order_item/subcontracting_order_item.py +++ b/erpnext/subcontracting/doctype/subcontracting_order_item/subcontracting_order_item.py @@ -42,6 +42,7 @@ class SubcontractingOrderItem(Document): received_qty: DF.Float returned_qty: DF.Float rm_cost_per_qty: DF.Currency + sc_conversion_factor: DF.Float schedule_date: DF.Date | None service_cost_per_qty: DF.Currency stock_uom: DF.Link diff --git a/erpnext/subcontracting/doctype/subcontracting_order_service_item/subcontracting_order_service_item.json b/erpnext/subcontracting/doctype/subcontracting_order_service_item/subcontracting_order_service_item.json index f1e94e125a9..ad3dfe34c88 100644 --- a/erpnext/subcontracting/doctype/subcontracting_order_service_item/subcontracting_order_service_item.json +++ b/erpnext/subcontracting/doctype/subcontracting_order_service_item/subcontracting_order_service_item.json @@ -155,7 +155,7 @@ ], "istable": 1, "links": [], - "modified": "2023-11-30 13:29:31.017440", + "modified": "2024-12-05 17:33:46.099601", "modified_by": "Administrator", "module": "Subcontracting", "name": "Subcontracting Order Service Item", diff --git a/erpnext/subcontracting/doctype/subcontracting_order_service_item/subcontracting_order_service_item.py b/erpnext/subcontracting/doctype/subcontracting_order_service_item/subcontracting_order_service_item.py index cc4901baf45..661a2b2702c 100644 --- a/erpnext/subcontracting/doctype/subcontracting_order_service_item/subcontracting_order_service_item.py +++ b/erpnext/subcontracting/doctype/subcontracting_order_service_item/subcontracting_order_service_item.py @@ -19,6 +19,8 @@ class SubcontractingOrderServiceItem(Document): fg_item_qty: DF.Float item_code: DF.Link item_name: DF.Data + material_request: DF.Link | None + material_request_item: DF.Data | None parent: DF.Data parentfield: DF.Data parenttype: DF.Data From cc1834b0ccb1c2f5ab1202d4d01aca58dfe56f01 Mon Sep 17 00:00:00 2001 From: mahsem <137205921+mahsem@users.noreply.github.com> Date: Sat, 14 Dec 2024 07:12:19 +0100 Subject: [PATCH 0700/1614] fix: Swedish tax templates (cherry picked from commit 73112fa3c9c21389f0b4e5938686bb5780df8254) --- .../setup_wizard/data/country_wise_tax.json | 197 +++++++++++++++++- 1 file changed, 194 insertions(+), 3 deletions(-) diff --git a/erpnext/setup/setup_wizard/data/country_wise_tax.json b/erpnext/setup/setup_wizard/data/country_wise_tax.json index efe1d705c51..9f10785dac1 100644 --- a/erpnext/setup/setup_wizard/data/country_wise_tax.json +++ b/erpnext/setup/setup_wizard/data/country_wise_tax.json @@ -4500,9 +4500,200 @@ }, "Sweden": { - "Sweden Tax": { - "account_name": "VAT", - "tax_rate": 25.00 + "tax_categories": [], + "chart_of_accounts": { + "*": { + "sales_tax_templates": [ + { + "title": "Försäljning Moms 25%", + "is_default": 0, + "taxes": [ + { + "account_head": { + "account_name": "Utgående moms, 25 %", + "account_number": "2610", + "tax_rate": 25.00 + }, + "description": "Moms 25%", + "rate": 25.00 + } + ] + }, + { + "title": "Försäljning Moms 12%", + "is_default": 0, + "taxes": [ + { + "account_head": { + "account_name": "Utgående moms, 12 %", + "account_number": "2620", + "tax_rate": 12.00 + }, + "description": "Moms 12%", + "rate": 12.00 + } + ] + }, + { + "title": "Försäljning Moms 6%", + "is_default": 0, + "taxes": [ + { + "account_head": { + "account_name": "Utgående moms, 6 %", + "account_number": "2630", + "tax_rate": 6.00 + }, + "description": "Moms 6%", + "rate": 6.00 + } + ] + }, + { + "title": "Försäljning Moms 0%", + "is_default": 0, + "taxes": [ + { + "account_head": { + "account_name": "Utgående moms, 6 %", + "account_number": "2630", + "tax_rate": 0.00 + }, + "description": "Moms 0%", + "rate": 0.00 + } + ] + } + ], + "purchase_tax_templates": [ + { + "title": "Inköp Moms 25%", + "is_default": 0, + "taxes": [ + { + "account_head": { + "account_name": "Ingående moms", + "account_number": "2640", + "root_type": "Liability", + "tax_rate": 25.00 + }, + "description": "Moms 25%", + "rate": 25.00 + } + ] + }, + { + "title": "Inköp Moms 12%", + "is_default": 0, + "taxes": [ + { + "account_head": { + "account_name": "Ingående moms", + "account_number": "2640", + "root_type": "Liability", + "tax_rate": 12.00 + }, + "description": "Moms 12%", + "rate": 12.00 + } + ] + }, + { + "title": "Inköp Moms 6%", + "is_default": 0, + "taxes": [ + { + "account_head": { + "account_name": "Ingående moms", + "account_number": "2640", + "root_type": "Liability", + "tax_rate": 6.00 + }, + "description": "Moms 6%", + "rate": 6.00 + } + ] + }, + { + "title": "Inköp Moms 0%", + "is_default": 0, + "taxes": [ + { + "account_head": { + "account_name": "Ingående moms", + "account_number": "2640", + "root_type": "Liability", + "tax_rate": 0.00 + }, + "description": "Moms 0%", + "rate": 0.00 + } + ] + } + ], + "item_tax_templates": [ + { + "title": "Artikel Moms 25%", + "taxes": [ + { + "tax_type": { + "account_name": "Utgående moms, 25 %", + "account_number": "2610", + "root_type": "Liability", + "tax_rate": 25.00 + }, + "description": "Moms 25%", + "tax_rate": 25.00 + } + ] + }, + { + "title": "Artikel Moms 12%", + "taxes": [ + { + "tax_type": { + "account_name": "Utgående moms, 12 %", + "account_number": "2620", + "root_type": "Liability", + "tax_rate": 12.00 + }, + "description": "Moms 12%", + "tax_rate": 12.00 + } + ] + }, + { + "title": "Artikel Moms 6%", + "taxes": [ + { + "tax_type": { + "account_name": "Utgående moms, 6 %", + "account_number": "2630", + "root_type": "Liability", + "tax_rate": 6.00 + }, + "description": "Moms 6%", + "tax_rate": 6.00 + } + ] + }, + { + "title": "Artikel Moms 0%", + "taxes": [ + { + "tax_type": { + "account_name": "Utgående moms, 0 %", + "account_number": "2611", + "root_type": "Liability", + "tax_rate": 0.00 + }, + "description": "Moms 0%", + "tax_rate": 0.00 + } + ] + } + ] + } } }, From ad57e33cd7247c6b822469582e15939dd7a3e80b Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 20 Dec 2024 19:38:52 +0530 Subject: [PATCH 0701/1614] fix: slow posting datetime update (backport #44799) (#44805) fix: slow posting datetime update (#44799) (cherry picked from commit a7b5e2565bf93b5d08d754b3e6765fef97ab70b6) Co-authored-by: rohitwaghchaure --- .../test_serial_and_batch_bundle.py | 2 ++ .../doctype/stock_ledger_entry/stock_ledger_entry.py | 11 +++-------- .../stock_reconciliation/test_stock_reconciliation.py | 1 + erpnext/stock/stock_ledger.py | 1 - 4 files changed, 6 insertions(+), 9 deletions(-) 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 5fe79384e6d..647082baa68 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 @@ -186,6 +186,7 @@ class TestSerialandBatchBundle(FrappeTestCase): } ) + doc.set_posting_datetime() doc.flags.ignore_permissions = True doc.flags.ignore_mandatory = True doc.flags.ignore_links = True @@ -586,6 +587,7 @@ class TestSerialandBatchBundle(FrappeTestCase): "company": "_Test Company", } ) + doc.set_posting_datetime() doc.flags.ignore_permissions = True doc.flags.ignore_mandatory = True doc.flags.ignore_links = True diff --git a/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py b/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py index 5aeabeeec56..6f5acd64d44 100644 --- a/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py +++ b/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py @@ -88,6 +88,7 @@ class StockLedgerEntry(Document): self.flags.ignore_submit_comment = True from erpnext.stock.utils import validate_disabled_warehouse, validate_warehouse_company + self.set_posting_datetime() self.validate_mandatory() self.validate_batch() validate_disabled_warehouse(self.warehouse) @@ -98,15 +99,10 @@ class StockLedgerEntry(Document): self.validate_with_last_transaction_posting_time() self.validate_inventory_dimension_negative_stock() - def set_posting_datetime(self, save=False): + def set_posting_datetime(self): from erpnext.stock.utils import get_combine_datetime - if save: - posting_datetime = get_combine_datetime(self.posting_date, self.posting_time) - if not self.posting_datetime or self.posting_datetime != posting_datetime: - self.db_set("posting_datetime", posting_datetime) - else: - self.posting_datetime = get_combine_datetime(self.posting_date, self.posting_time) + self.posting_datetime = get_combine_datetime(self.posting_date, self.posting_time) def validate_inventory_dimension_negative_stock(self): if self.is_cancelled or self.actual_qty >= 0: @@ -173,7 +169,6 @@ class StockLedgerEntry(Document): return inv_dimension_dict def on_submit(self): - self.set_posting_datetime(save=True) self.check_stock_frozen_date() # Added to handle few test cases where serial_and_batch_bundles are not required diff --git a/erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.py b/erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.py index 9754443d4ac..a3673063a48 100644 --- a/erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.py +++ b/erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.py @@ -1242,6 +1242,7 @@ class TestStockReconciliation(FrappeTestCase, StockTestMixin): } ) + doc.set_posting_datetime() doc.flags.ignore_permissions = True doc.flags.ignore_mandatory = True doc.flags.ignore_links = True diff --git a/erpnext/stock/stock_ledger.py b/erpnext/stock/stock_ledger.py index 1e1b2411569..d11c19446bb 100644 --- a/erpnext/stock/stock_ledger.py +++ b/erpnext/stock/stock_ledger.py @@ -222,7 +222,6 @@ def make_entry(args, allow_negative_stock=False, via_landed_cost_voucher=False): sle.flags.ignore_permissions = 1 sle.allow_negative_stock = allow_negative_stock sle.via_landed_cost_voucher = via_landed_cost_voucher - sle.set_posting_datetime() sle.submit() # Added to handle the case when the stock ledger entry is created from the repostig From 16b013fab27a84c3889027db255166b76688efc4 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Sat, 21 Dec 2024 10:26:25 +0530 Subject: [PATCH 0702/1614] fix: Duplicate entry ' EF1DE8B2E1B6' for key 'PRIMARY' (backport #44809) (#44814) fix: Duplicate entry ' EF1DE8B2E1B6' for key 'PRIMARY' (#44809) (cherry picked from commit 56f561cdaa0689afbb14a8f6896e9a90dee91af9) Co-authored-by: rohitwaghchaure --- .../serial_and_batch_bundle.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 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 6ff0317dce6..af378ca2f0b 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 @@ -807,7 +807,7 @@ class SerialandBatchBundle(Document): ) for serial_no, batch_no in serial_batches.items(): - if correct_batches.get(serial_no) != batch_no: + if correct_batches.get(serial_no) and correct_batches.get(serial_no) != batch_no: self.throw_error_message( f"Serial No {bold(serial_no)} does not belong to Batch No {bold(batch_no)}" ) @@ -1186,19 +1186,19 @@ def parse_csv_file_to_get_serial_batch(reader): continue if has_serial_no or (has_serial_no and has_batch_no): - _dict = {"serial_no": row[0], "qty": 1} + _dict = {"serial_no": row[0].strip(), "qty": 1} if has_batch_no: _dict.update( { - "batch_no": row[1], + "batch_no": row[1].strip(), "qty": row[2], } ) batch_nos.append( { - "batch_no": row[1], + "batch_no": row[1].strip(), "qty": row[2], } ) @@ -1207,7 +1207,7 @@ def parse_csv_file_to_get_serial_batch(reader): elif has_batch_no: batch_nos.append( { - "batch_no": row[0], + "batch_no": row[0].strip(), "qty": row[1], } ) @@ -1251,7 +1251,7 @@ def make_serial_nos(item_code, serial_nos): "Item", item_code, ["description", "item_code", "item_name", "warranty_period"], as_dict=1 ) - serial_nos = [d.get("serial_no") for d in serial_nos if d.get("serial_no")] + serial_nos = [d.get("serial_no").strip() for d in serial_nos if d.get("serial_no")] existing_serial_nos = frappe.get_all("Serial No", filters={"name": ("in", serial_nos)}) existing_serial_nos = [d.get("name") for d in existing_serial_nos if d.get("name")] From d137f780bd072f0baf18feef734157c90318674b Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Thu, 19 Dec 2024 17:06:54 +0530 Subject: [PATCH 0703/1614] fix: Ledger repost support for extending app doctypes (cherry picked from commit ed231abb54544f7362812500d9cbaefce09f778d) --- .../repost_accounting_ledger.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/erpnext/accounts/doctype/repost_accounting_ledger/repost_accounting_ledger.py b/erpnext/accounts/doctype/repost_accounting_ledger/repost_accounting_ledger.py index 0bd9a2a0515..7f2d437aece 100644 --- a/erpnext/accounts/doctype/repost_accounting_ledger/repost_accounting_ledger.py +++ b/erpnext/accounts/doctype/repost_accounting_ledger/repost_accounting_ledger.py @@ -1,6 +1,8 @@ # Copyright (c) 2023, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt +import inspect + import frappe from frappe import _, qb from frappe.model.document import Document @@ -142,6 +144,8 @@ class RepostAccountingLedger(Document): @frappe.whitelist() def start_repost(account_repost_doc=str) -> None: + from erpnext.accounts.general_ledger import make_reverse_gl_entries + frappe.flags.through_repost_accounting_ledger = True if account_repost_doc: repost_doc = frappe.get_doc("Repost Accounting Ledger", account_repost_doc) @@ -177,6 +181,14 @@ def start_repost(account_repost_doc=str) -> None: if not repost_doc.delete_cancelled_entries: doc.make_gl_entries(1) doc.make_gl_entries() + else: + if hasattr(doc, "make_gl_entries") and callable(doc.make_gl_entries): + if not repost_doc.delete_cancelled_entries: + if "cancel" in inspect.getfullargspec(doc.make_gl_entries): + doc.make_gl_entries(cancel=1) + else: + make_reverse_gl_entries(voucher_type=doc.doctype, voucher_no=doc.name) + doc.make_gl_entries() def get_allowed_types_from_settings(): From b5596d98e3e6f59d6ac0ee8d7266379ad25ca1b5 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Sun, 22 Dec 2024 20:34:31 +0530 Subject: [PATCH 0704/1614] fix: Add hooks for repost allowed doctypes (cherry picked from commit 919abd2c03865ab671c6977f735638b2f43753b0) --- .../repost_accounting_ledger/repost_accounting_ledger.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/repost_accounting_ledger/repost_accounting_ledger.py b/erpnext/accounts/doctype/repost_accounting_ledger/repost_accounting_ledger.py index 7f2d437aece..73977f5d560 100644 --- a/erpnext/accounts/doctype/repost_accounting_ledger/repost_accounting_ledger.py +++ b/erpnext/accounts/doctype/repost_accounting_ledger/repost_accounting_ledger.py @@ -181,7 +181,7 @@ def start_repost(account_repost_doc=str) -> None: if not repost_doc.delete_cancelled_entries: doc.make_gl_entries(1) doc.make_gl_entries() - else: + elif doc.doctype in frappe.get_hooks("repost_allowed_doctypes"): if hasattr(doc, "make_gl_entries") and callable(doc.make_gl_entries): if not repost_doc.delete_cancelled_entries: if "cancel" in inspect.getfullargspec(doc.make_gl_entries): From 13a3c816d742fe2b95cfa889b38d45ee88ea0acf Mon Sep 17 00:00:00 2001 From: Abdeali Chharchhoda Date: Mon, 23 Dec 2024 08:48:46 +0530 Subject: [PATCH 0705/1614] fix: Remove typo (cherry picked from commit ba28f6bf7331b3ef86a49fbcce959e601956a1a4) --- erpnext/accounts/doctype/bank_account/bank_account.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/bank_account/bank_account.py b/erpnext/accounts/doctype/bank_account/bank_account.py index c7c693a1cba..4155f0edeef 100644 --- a/erpnext/accounts/doctype/bank_account/bank_account.py +++ b/erpnext/accounts/doctype/bank_account/bank_account.py @@ -48,7 +48,7 @@ class BankAccount(Document): self.name = self.account_name + " - " + self.bank def on_trash(self): - delete_contact_and_address("BankAccount", self.name) + delete_contact_and_address("Bank Account", self.name) def validate(self): self.validate_company() From e6390bfba1dca8c961029564c40b5ae1ae37878e Mon Sep 17 00:00:00 2001 From: barredterra <14891507+barredterra@users.noreply.github.com> Date: Tue, 10 Dec 2024 14:28:22 +0100 Subject: [PATCH 0706/1614] fix: permissions for marking Quotation as lost (cherry picked from commit 4d5241486ffa426fe7b17be3354a93ae0896d730) # Conflicts: # erpnext/crm/doctype/competitor/competitor.json # erpnext/setup/doctype/quotation_lost_reason/quotation_lost_reason.json --- .../crm/doctype/competitor/competitor.json | 27 ++++++++++++------- .../quotation_lost_reason.json | 20 ++++++++++++++ 2 files changed, 38 insertions(+), 9 deletions(-) diff --git a/erpnext/crm/doctype/competitor/competitor.json b/erpnext/crm/doctype/competitor/competitor.json index fd6da239212..2348394d30e 100644 --- a/erpnext/crm/doctype/competitor/competitor.json +++ b/erpnext/crm/doctype/competitor/competitor.json @@ -38,7 +38,11 @@ "table_fieldname": "competitors" } ], +<<<<<<< HEAD "modified": "2023-11-23 19:33:54.284279", +======= + "modified": "2024-12-10 08:26:38.496003", +>>>>>>> 4d5241486f (fix: permissions for marking Quotation as lost) "modified_by": "Administrator", "module": "CRM", "name": "Competitor", @@ -53,20 +57,25 @@ "print": 1, "read": 1, "report": 1, - "role": "System Manager", + "role": "Sales Master Manager", "share": 1, "write": 1 }, { - "create": 1, - "email": 1, - "export": 1, - "print": 1, "read": 1, - "report": 1, - "role": "Sales User", - "share": 1, - "write": 1 + "role": "Sales User" + }, + { + "read": 1, + "role": "Sales Manager" + }, + { + "read": 1, + "role": "Maintenance Manager" + }, + { + "read": 1, + "role": "Maintenance User" } ], "quick_entry": 1, diff --git a/erpnext/setup/doctype/quotation_lost_reason/quotation_lost_reason.json b/erpnext/setup/doctype/quotation_lost_reason/quotation_lost_reason.json index 0eae08e8707..e1eafb527e3 100644 --- a/erpnext/setup/doctype/quotation_lost_reason/quotation_lost_reason.json +++ b/erpnext/setup/doctype/quotation_lost_reason/quotation_lost_reason.json @@ -32,7 +32,11 @@ "table_fieldname": "lost_reasons" } ], +<<<<<<< HEAD "modified": "2023-11-23 19:31:02.743353", +======= + "modified": "2024-12-10 08:21:38.280627", +>>>>>>> 4d5241486f (fix: permissions for marking Quotation as lost) "modified_by": "Administrator", "module": "Setup", "name": "Quotation Lost Reason", @@ -49,6 +53,22 @@ "role": "Sales Master Manager", "share": 1, "write": 1 + }, + { + "read": 1, + "role": "Sales User" + }, + { + "read": 1, + "role": "Sales Manager" + }, + { + "read": 1, + "role": "Maintenance User" + }, + { + "read": 1, + "role": "Maintenance Manager" } ], "quick_entry": 1, From 3d4a4e661c802c121594881b7357c9cf46023aa0 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 23 Dec 2024 11:14:27 +0530 Subject: [PATCH 0707/1614] chore: resolve conflicts --- erpnext/crm/doctype/competitor/competitor.json | 4 ---- .../doctype/quotation_lost_reason/quotation_lost_reason.json | 4 ---- 2 files changed, 8 deletions(-) diff --git a/erpnext/crm/doctype/competitor/competitor.json b/erpnext/crm/doctype/competitor/competitor.json index 2348394d30e..021488ab99b 100644 --- a/erpnext/crm/doctype/competitor/competitor.json +++ b/erpnext/crm/doctype/competitor/competitor.json @@ -38,11 +38,7 @@ "table_fieldname": "competitors" } ], -<<<<<<< HEAD - "modified": "2023-11-23 19:33:54.284279", -======= "modified": "2024-12-10 08:26:38.496003", ->>>>>>> 4d5241486f (fix: permissions for marking Quotation as lost) "modified_by": "Administrator", "module": "CRM", "name": "Competitor", diff --git a/erpnext/setup/doctype/quotation_lost_reason/quotation_lost_reason.json b/erpnext/setup/doctype/quotation_lost_reason/quotation_lost_reason.json index e1eafb527e3..a0e0f176ddf 100644 --- a/erpnext/setup/doctype/quotation_lost_reason/quotation_lost_reason.json +++ b/erpnext/setup/doctype/quotation_lost_reason/quotation_lost_reason.json @@ -32,11 +32,7 @@ "table_fieldname": "lost_reasons" } ], -<<<<<<< HEAD - "modified": "2023-11-23 19:31:02.743353", -======= "modified": "2024-12-10 08:21:38.280627", ->>>>>>> 4d5241486f (fix: permissions for marking Quotation as lost) "modified_by": "Administrator", "module": "Setup", "name": "Quotation Lost Reason", From a79d2946a16e1cb1d7dd4e507551790c0b5826e3 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Thu, 19 Dec 2024 17:06:54 +0530 Subject: [PATCH 0708/1614] fix: Ledger repost support for extending app doctypes (cherry picked from commit ed231abb54544f7362812500d9cbaefce09f778d) --- .../repost_accounting_ledger.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/erpnext/accounts/doctype/repost_accounting_ledger/repost_accounting_ledger.py b/erpnext/accounts/doctype/repost_accounting_ledger/repost_accounting_ledger.py index 0bd9a2a0515..7f2d437aece 100644 --- a/erpnext/accounts/doctype/repost_accounting_ledger/repost_accounting_ledger.py +++ b/erpnext/accounts/doctype/repost_accounting_ledger/repost_accounting_ledger.py @@ -1,6 +1,8 @@ # Copyright (c) 2023, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt +import inspect + import frappe from frappe import _, qb from frappe.model.document import Document @@ -142,6 +144,8 @@ class RepostAccountingLedger(Document): @frappe.whitelist() def start_repost(account_repost_doc=str) -> None: + from erpnext.accounts.general_ledger import make_reverse_gl_entries + frappe.flags.through_repost_accounting_ledger = True if account_repost_doc: repost_doc = frappe.get_doc("Repost Accounting Ledger", account_repost_doc) @@ -177,6 +181,14 @@ def start_repost(account_repost_doc=str) -> None: if not repost_doc.delete_cancelled_entries: doc.make_gl_entries(1) doc.make_gl_entries() + else: + if hasattr(doc, "make_gl_entries") and callable(doc.make_gl_entries): + if not repost_doc.delete_cancelled_entries: + if "cancel" in inspect.getfullargspec(doc.make_gl_entries): + doc.make_gl_entries(cancel=1) + else: + make_reverse_gl_entries(voucher_type=doc.doctype, voucher_no=doc.name) + doc.make_gl_entries() def get_allowed_types_from_settings(): From 640c13a5f3307888473e86dc840e2962105f2a47 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Sun, 22 Dec 2024 20:34:31 +0530 Subject: [PATCH 0709/1614] fix: Add hooks for repost allowed doctypes (cherry picked from commit 919abd2c03865ab671c6977f735638b2f43753b0) --- .../repost_accounting_ledger/repost_accounting_ledger.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/repost_accounting_ledger/repost_accounting_ledger.py b/erpnext/accounts/doctype/repost_accounting_ledger/repost_accounting_ledger.py index 7f2d437aece..73977f5d560 100644 --- a/erpnext/accounts/doctype/repost_accounting_ledger/repost_accounting_ledger.py +++ b/erpnext/accounts/doctype/repost_accounting_ledger/repost_accounting_ledger.py @@ -181,7 +181,7 @@ def start_repost(account_repost_doc=str) -> None: if not repost_doc.delete_cancelled_entries: doc.make_gl_entries(1) doc.make_gl_entries() - else: + elif doc.doctype in frappe.get_hooks("repost_allowed_doctypes"): if hasattr(doc, "make_gl_entries") and callable(doc.make_gl_entries): if not repost_doc.delete_cancelled_entries: if "cancel" in inspect.getfullargspec(doc.make_gl_entries): From 58e846709ec961d965c9b6bdaf5cec482b608305 Mon Sep 17 00:00:00 2001 From: Nicolas Pereira <41456803+hqnicolas@users.noreply.github.com> Date: Fri, 13 Dec 2024 01:51:30 -0300 Subject: [PATCH 0710/1614] fix: Stock Entry uses incorrect company when generated from Pick List (#44679) (cherry picked from commit 00898be8e4638ed88e30ace37b752d2a3b5887c2) (cherry picked from commit cd693b5fa48e552f7e7418a551a1e84ed7024c90) --- erpnext/stock/doctype/pick_list/pick_list.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/stock/doctype/pick_list/pick_list.py b/erpnext/stock/doctype/pick_list/pick_list.py index ba1cc228bfa..b48d479560d 100644 --- a/erpnext/stock/doctype/pick_list/pick_list.py +++ b/erpnext/stock/doctype/pick_list/pick_list.py @@ -1247,6 +1247,7 @@ def create_stock_entry(pick_list): stock_entry = frappe.new_doc("Stock Entry") stock_entry.pick_list = pick_list.get("name") stock_entry.purpose = pick_list.get("purpose") + stock_entry.company = pick_list.get("company") stock_entry.set_stock_entry_type() if pick_list.get("work_order"): From a55aaea5a15f9966635b4960547c62589ef32af2 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Tue, 17 Dec 2024 17:54:08 +0530 Subject: [PATCH 0711/1614] fix: buying rate for service item in gross profit report (cherry picked from commit 8d6e79a16f52723da3b494a2e863f8e77d4419ac) --- erpnext/accounts/report/gross_profit/gross_profit.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/report/gross_profit/gross_profit.py b/erpnext/accounts/report/gross_profit/gross_profit.py index 647490dcc90..a27503e8b6d 100644 --- a/erpnext/accounts/report/gross_profit/gross_profit.py +++ b/erpnext/accounts/report/gross_profit/gross_profit.py @@ -748,12 +748,13 @@ class GrossProfitGenerator: .inner_join(purchase_invoice) .on(purchase_invoice.name == purchase_invoice_item.parent) .select( - purchase_invoice.name, purchase_invoice_item.base_rate / purchase_invoice_item.conversion_factor, ) .where(purchase_invoice.docstatus == 1) .where(purchase_invoice.posting_date <= self.filters.to_date) .where(purchase_invoice_item.item_code == item_code) + .where(purchase_invoice.is_return == 0) + .where(purchase_invoice_item.parenttype == "Purchase Invoice") ) if row.project: From 1900cebf52204da4ead3cf844720859a7ee3b4ca Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Mon, 23 Dec 2024 06:17:04 +0000 Subject: [PATCH 0712/1614] chore(release): Bumped to Version 15.46.2 ## [15.46.2](https://github.com/frappe/erpnext/compare/v15.46.1...v15.46.2) (2024-12-23) ### Bug Fixes * Add hooks for repost allowed doctypes ([640c13a](https://github.com/frappe/erpnext/commit/640c13a5f3307888473e86dc840e2962105f2a47)) * Ledger repost support for extending app doctypes ([a79d294](https://github.com/frappe/erpnext/commit/a79d2946a16e1cb1d7dd4e507551790c0b5826e3)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index e81409cf049..f6dd799ba08 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.46.1" +__version__ = "15.46.2" def get_default_company(user=None): From 875797e655db4a67696ed6eae963705be5ebaa68 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Thu, 19 Dec 2024 12:04:04 +0530 Subject: [PATCH 0713/1614] fix: correct args for get_advance_payment_entries_for_regional (cherry picked from commit df13a4cc2f3167ff322379227f5382fc8045a417) --- erpnext/controllers/accounts_controller.py | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index e1a7d5803c9..6932a4b47d9 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -1214,6 +1214,8 @@ class AccountsController(TransactionBase): def get_advance_entries(self, include_unallocated=True): party_account = [] + default_advance_account = None + if self.doctype == "Sales Invoice": party_type = "Customer" party = self.customer @@ -1229,10 +1231,14 @@ class AccountsController(TransactionBase): order_doctype = "Purchase Order" party_account.append(self.credit_to) - party_account.extend( - get_party_account(party_type, party=party, company=self.company, include_advance=True) + party_accounts = get_party_account( + party_type, party=party, company=self.company, include_advance=True ) + if party_accounts: + party_account.append(party_accounts[0]) + default_advance_account = party_accounts[1] if len(party_accounts) == 2 else None + order_list = list(set(d.get(order_field) for d in self.get("items") if d.get(order_field))) journal_entries = get_advance_journal_entries( @@ -1240,7 +1246,13 @@ class AccountsController(TransactionBase): ) payment_entries = get_advance_payment_entries_for_regional( - party_type, party, party_account, order_doctype, order_list, include_unallocated + party_type, + party, + party_account, + order_doctype, + order_list, + default_advance_account, + include_unallocated, ) res = journal_entries + payment_entries From 497029f958c0c7167422c32edbd50c080eeaff33 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 23 Dec 2024 13:38:21 +0530 Subject: [PATCH 0714/1614] fix: incorrect Material Transferred for Manufacturing qty (backport #44823) (#44832) * fix: incorrect Material Transferred for Manufacturing qty (#44823) (cherry picked from commit fe0036e707252f5842444a5cb728410cb81fe6ca) # Conflicts: # erpnext/manufacturing/doctype/job_card/job_card.py * chore: fix conflicts --------- Co-authored-by: rohitwaghchaure --- .../doctype/job_card/job_card.py | 5 +- .../doctype/work_order/test_work_order.py | 55 +++++++++++++++++++ 2 files changed, 58 insertions(+), 2 deletions(-) diff --git a/erpnext/manufacturing/doctype/job_card/job_card.py b/erpnext/manufacturing/doctype/job_card/job_card.py index 58637109077..011df3258ee 100644 --- a/erpnext/manufacturing/doctype/job_card/job_card.py +++ b/erpnext/manufacturing/doctype/job_card/job_card.py @@ -944,8 +944,9 @@ class JobCard(Document): if doc.transfer_material_against == "Job Card" and not doc.skip_transfer: min_qty = [] for d in doc.operations: - if d.completed_qty: - min_qty.append(d.completed_qty) + completed_qty = flt(d.completed_qty) + flt(d.process_loss_qty) + if completed_qty: + min_qty.append(completed_qty) else: min_qty = [] break diff --git a/erpnext/manufacturing/doctype/work_order/test_work_order.py b/erpnext/manufacturing/doctype/work_order/test_work_order.py index 6ee3f73eb08..f8ddf007428 100644 --- a/erpnext/manufacturing/doctype/work_order/test_work_order.py +++ b/erpnext/manufacturing/doctype/work_order/test_work_order.py @@ -7,6 +7,7 @@ from frappe.tests.utils import FrappeTestCase, change_settings, timeout from frappe.utils import add_days, add_months, add_to_date, cint, flt, now, today from erpnext.manufacturing.doctype.job_card.job_card import JobCardCancelError +from erpnext.manufacturing.doctype.job_card.job_card import make_stock_entry as make_stock_entry_from_jc from erpnext.manufacturing.doctype.production_plan.test_production_plan import make_bom from erpnext.manufacturing.doctype.work_order.work_order import ( CapacityError, @@ -505,6 +506,60 @@ class TestWorkOrder(FrappeTestCase): for stock_entry in stock_entries: stock_entry.cancel() + def test_work_order_material_transferred_qty_with_process_loss(self): + stock_entries = [] + bom = frappe.get_doc("BOM", {"docstatus": 1, "with_operations": 1, "company": "_Test Company"}) + + work_order = make_wo_order_test_record( + item=bom.item, + qty=2, + bom_no=bom.name, + source_warehouse="_Test Warehouse - _TC", + transfer_material_against="Job Card", + ) + + self.assertEqual(work_order.qty, 2) + + for row in work_order.required_items: + stock_entry_doc = test_stock_entry.make_stock_entry( + item_code=row.item_code, target="_Test Warehouse - _TC", qty=row.required_qty, basic_rate=100 + ) + stock_entries.append(stock_entry_doc) + + job_cards = frappe.get_all( + "Job Card", filters={"work_order": work_order.name}, order_by="creation asc" + ) + + for row in job_cards: + transfer_entry_1 = make_stock_entry_from_jc(row.name) + transfer_entry_1.submit() + + doc = frappe.get_doc("Job Card", row.name) + for row in doc.scheduled_time_logs: + doc.append( + "time_logs", + { + "from_time": row.from_time, + "to_time": row.to_time, + "time_in_mins": row.time_in_mins, + "completed_qty": 1, + }, + ) + + doc.save() + doc.submit() + + self.assertEqual(doc.total_completed_qty, 1) + self.assertEqual(doc.process_loss_qty, 1) + + work_order.reload() + + self.assertEqual(work_order.material_transferred_for_manufacturing, 2) + + for row in work_order.operations: + self.assertEqual(row.completed_qty, 1) + self.assertEqual(row.process_loss_qty, 1) + def test_capcity_planning(self): frappe.db.set_single_value( "Manufacturing Settings", {"disable_capacity_planning": 0, "capacity_planning_for_days": 1} From bec1f972b36c33b76317fd286370834f71504797 Mon Sep 17 00:00:00 2001 From: rs-rethik Date: Fri, 20 Dec 2024 12:07:20 +0530 Subject: [PATCH 0715/1614] feat: add difference_posting_date field (cherry picked from commit 225e56cbcae5c30172b52aa2e6cbc04a5ec01d43) # Conflicts: # erpnext/accounts/doctype/purchase_invoice_advance/purchase_invoice_advance.json # erpnext/accounts/doctype/sales_invoice_advance/sales_invoice_advance.json --- .../purchase_invoice_advance.json | 18 +++++++++++++++--- .../purchase_invoice_advance.py | 1 + .../sales_invoice_advance.json | 18 +++++++++++++++--- .../sales_invoice_advance.py | 1 + 4 files changed, 32 insertions(+), 6 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice_advance/purchase_invoice_advance.json b/erpnext/accounts/doctype/purchase_invoice_advance/purchase_invoice_advance.json index 4db531eac90..5cb780b3e6f 100644 --- a/erpnext/accounts/doctype/purchase_invoice_advance/purchase_invoice_advance.json +++ b/erpnext/accounts/doctype/purchase_invoice_advance/purchase_invoice_advance.json @@ -14,7 +14,8 @@ "advance_amount", "allocated_amount", "exchange_gain_loss", - "ref_exchange_rate" + "ref_exchange_rate", + "difference_posting_date" ], "fields": [ { @@ -30,7 +31,7 @@ "width": "180px" }, { - "columns": 3, + "columns": 2, "fieldname": "reference_name", "fieldtype": "Dynamic Link", "in_list_view": 1, @@ -40,7 +41,7 @@ "read_only": 1 }, { - "columns": 3, + "columns": 2, "fieldname": "remarks", "fieldtype": "Text", "in_list_view": 1, @@ -111,13 +112,24 @@ "label": "Reference Exchange Rate", "non_negative": 1, "read_only": 1 + }, + { + "columns": 2, + "fieldname": "difference_posting_date", + "fieldtype": "Date", + "in_list_view": 1, + "label": "Difference Posting Date" } ], "idx": 1, "index_web_pages_for_search": 1, "istable": 1, "links": [], +<<<<<<< HEAD "modified": "2023-06-23 21:13:18.013816", +======= + "modified": "2024-12-20 12:04:46.729972", +>>>>>>> 225e56cbca (feat: add difference_posting_date field) "modified_by": "Administrator", "module": "Accounts", "name": "Purchase Invoice Advance", diff --git a/erpnext/accounts/doctype/purchase_invoice_advance/purchase_invoice_advance.py b/erpnext/accounts/doctype/purchase_invoice_advance/purchase_invoice_advance.py index bbd3009224a..a3fabbdc322 100644 --- a/erpnext/accounts/doctype/purchase_invoice_advance/purchase_invoice_advance.py +++ b/erpnext/accounts/doctype/purchase_invoice_advance/purchase_invoice_advance.py @@ -16,6 +16,7 @@ class PurchaseInvoiceAdvance(Document): advance_amount: DF.Currency allocated_amount: DF.Currency + difference_posting_date: DF.Date | None exchange_gain_loss: DF.Currency parent: DF.Data parentfield: DF.Data diff --git a/erpnext/accounts/doctype/sales_invoice_advance/sales_invoice_advance.json b/erpnext/accounts/doctype/sales_invoice_advance/sales_invoice_advance.json index 0ae85d90004..151d493ed09 100644 --- a/erpnext/accounts/doctype/sales_invoice_advance/sales_invoice_advance.json +++ b/erpnext/accounts/doctype/sales_invoice_advance/sales_invoice_advance.json @@ -14,7 +14,8 @@ "advance_amount", "allocated_amount", "exchange_gain_loss", - "ref_exchange_rate" + "ref_exchange_rate", + "difference_posting_date" ], "fields": [ { @@ -30,7 +31,7 @@ "width": "250px" }, { - "columns": 3, + "columns": 2, "fieldname": "reference_name", "fieldtype": "Dynamic Link", "in_list_view": 1, @@ -41,7 +42,7 @@ "read_only": 1 }, { - "columns": 3, + "columns": 2, "fieldname": "remarks", "fieldtype": "Text", "in_list_view": 1, @@ -112,13 +113,24 @@ "label": "Reference Exchange Rate", "non_negative": 1, "read_only": 1 + }, + { + "columns": 2, + "fieldname": "difference_posting_date", + "fieldtype": "Date", + "in_list_view": 1, + "label": "Difference Posting Date" } ], "idx": 1, "index_web_pages_for_search": 1, "istable": 1, "links": [], +<<<<<<< HEAD "modified": "2023-06-23 21:12:57.557731", +======= + "modified": "2024-12-20 11:58:28.962370", +>>>>>>> 225e56cbca (feat: add difference_posting_date field) "modified_by": "Administrator", "module": "Accounts", "name": "Sales Invoice Advance", diff --git a/erpnext/accounts/doctype/sales_invoice_advance/sales_invoice_advance.py b/erpnext/accounts/doctype/sales_invoice_advance/sales_invoice_advance.py index 5eeedb25f29..1d115c5c507 100644 --- a/erpnext/accounts/doctype/sales_invoice_advance/sales_invoice_advance.py +++ b/erpnext/accounts/doctype/sales_invoice_advance/sales_invoice_advance.py @@ -16,6 +16,7 @@ class SalesInvoiceAdvance(Document): advance_amount: DF.Currency allocated_amount: DF.Currency + difference_posting_date: DF.Date | None exchange_gain_loss: DF.Currency parent: DF.Data parentfield: DF.Data From 7498cdf644960525f09b07cc829a09f704a22b4b Mon Sep 17 00:00:00 2001 From: rs-rethik Date: Fri, 20 Dec 2024 12:10:08 +0530 Subject: [PATCH 0716/1614] feat: use difference_posting_date for journal entry posting_date (cherry picked from commit ff1d040a6e1aa80c3b93835395db31a222dd5568) --- erpnext/controllers/accounts_controller.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 6932a4b47d9..b15788d8fcc 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -1204,6 +1204,7 @@ class AccountsController(TransactionBase): "advance_amount": flt(d.amount), "allocated_amount": allocated_amount, "ref_exchange_rate": flt(d.exchange_rate), # exchange_rate of advance entry + "difference_posting_date": self.posting_date, } if d.get("paid_from"): advance_row["account"] = d.paid_from @@ -1509,7 +1510,6 @@ class AccountsController(TransactionBase): gain_loss_account = frappe.get_cached_value( "Company", self.company, "exchange_gain_loss_account" ) - je = create_gain_loss_journal( self.company, args.get("difference_posting_date") if args else self.posting_date, @@ -1595,6 +1595,7 @@ class AccountsController(TransactionBase): "Company", self.company, "exchange_gain_loss_account" ), "exchange_gain_loss": flt(d.get("exchange_gain_loss")), + "difference_posting_date": d.get("difference_posting_date"), } ) lst.append(args) From 4884849f23c8a27661a540c0cb2c7c26d588aa08 Mon Sep 17 00:00:00 2001 From: rs-rethik Date: Fri, 20 Dec 2024 12:13:35 +0530 Subject: [PATCH 0717/1614] test: add unit test to validate journal entry posting date (cherry picked from commit c14a2d73bf10fd910e319bc62c2d8e117cce73f1) --- .../tests/test_accounts_controller.py | 93 +++++++++++++++++++ 1 file changed, 93 insertions(+) diff --git a/erpnext/controllers/tests/test_accounts_controller.py b/erpnext/controllers/tests/test_accounts_controller.py index 289a955f980..069eae55315 100644 --- a/erpnext/controllers/tests/test_accounts_controller.py +++ b/erpnext/controllers/tests/test_accounts_controller.py @@ -2,6 +2,8 @@ # For license information, please see license.txt +from datetime import datetime + import frappe from frappe import qb from frappe.query_builder.functions import Sum @@ -1979,3 +1981,94 @@ class TestAccountsController(FrappeTestCase): self.assertEqual(len(exc_je_for_adv), 0) self.remove_advance_accounts_from_party_master() + + def test_difference_posting_date_in_pi_and_si(self): + self.setup_advance_accounts_in_party_master() + + # create payment entry for customer + adv = self.create_payment_entry(amount=1, source_exc_rate=83) + adv.save() + self.assertEqual(adv.paid_from, self.advance_received_usd) + adv.submit() + + # create sales invoice with advance received + si = self.create_sales_invoice(qty=1, conversion_rate=80, rate=1, do_not_submit=True) + si.debit_to = self.debtors_usd + si.append( + "advances", + { + "reference_type": "Payment Entry", + "reference_name": "ACC-PAY-2024-00001", + "remarks": "Amount INR 1 received from _Test MC Customer USD\nTransaction reference no Test001 dated 2024-12-19", + "advance_amount": 1.0, + "allocated_amount": 1.0, + "exchange_gain_loss": 3.0, + "ref_exchange_rate": 83.0, + "difference_posting_date": add_days(nowdate(), -2), + }, + ) + si.save().submit() + + # exc Gain/Loss journal should've been creatad + exc_je_for_si = self.get_journals_for(si.doctype, si.name) + exc_je_for_adv = self.get_journals_for(adv.doctype, adv.name) + self.assertEqual(len(exc_je_for_si), 1) + self.assertEqual(len(exc_je_for_adv), 1) + self.assertEqual(exc_je_for_si, exc_je_for_adv) + + # check jv created with difference_posting_date in sales invoice + jv = frappe.get_doc("Journal Entry", exc_je_for_si[0].parent) + sales_invoice = frappe.get_doc("Sales Invoice", si.name) + self.assertEqual(sales_invoice.advances[0].difference_posting_date, jv.posting_date) + + # create payment entry for supplier + usd_amount = 1 + inr_amount = 85 + exc_rate = 85 + adv = create_payment_entry( + company=self.company, + payment_type="Pay", + party_type="Supplier", + party=self.supplier, + paid_from=self.cash, + paid_to=self.advance_paid_usd, + paid_amount=inr_amount, + ) + adv.source_exchange_rate = 1 + adv.target_exchange_rate = exc_rate + adv.received_amount = usd_amount + adv.paid_amount = exc_rate * usd_amount + adv.posting_date = nowdate() + adv.save() + self.assertEqual(adv.paid_to, self.advance_paid_usd) + adv.submit() + + # create purchase invoice with advance paid + pi = self.create_purchase_invoice(qty=1, conversion_rate=80, rate=1, do_not_submit=True) + pi.append( + "advances", + { + "reference_type": "Payment Entry", + "reference_name": "ACC-PAY-2024-00002", + "remarks": "Amount INR 1 paid to _Test MC Supplier USD\nTransaction reference no Test001 dated 2024-12-20", + "advance_amount": 1.0, + "allocated_amount": 1.0, + "exchange_gain_loss": 5.0, + "ref_exchange_rate": 85.0, + "difference_posting_date": add_days(nowdate(), -2), + }, + ) + pi.save().submit() + self.assertEqual(pi.credit_to, self.creditors_usd) + + # exc Gain/Loss journal should've been creatad + exc_je_for_pi = self.get_journals_for(pi.doctype, pi.name) + exc_je_for_adv = self.get_journals_for(adv.doctype, adv.name) + self.assertEqual(len(exc_je_for_pi), 1) + self.assertEqual(len(exc_je_for_adv), 1) + self.assertEqual(exc_je_for_pi, exc_je_for_adv) + + # check jv created with difference_posting_date in purchase invoice + journal_voucher = frappe.get_doc("Journal Entry", exc_je_for_pi[0].parent) + purchase_invoice = frappe.get_doc("Purchase Invoice", pi.name) + self.assertEqual(purchase_invoice.advances[0].difference_posting_date, journal_voucher.posting_date) From 13123a04121258e27b6692a03c6004cd244c7b35 Mon Sep 17 00:00:00 2001 From: rs-rethik Date: Fri, 20 Dec 2024 12:42:47 +0530 Subject: [PATCH 0718/1614] refactor: convert sql query to query builder (cherry picked from commit 2d58e845e633943bae2d481f66d200b16ab91bdf) --- erpnext/controllers/accounts_controller.py | 34 +++++++++++----------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index b15788d8fcc..e5b5887e3ed 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -379,13 +379,14 @@ class AccountsController(TransactionBase): == 1 ) ).run() - frappe.db.sql( - "delete from `tabGL Entry` where voucher_type=%s and voucher_no=%s", (self.doctype, self.name) - ) - frappe.db.sql( - "delete from `tabStock Ledger Entry` where voucher_type=%s and voucher_no=%s", - (self.doctype, self.name), - ) + gle = frappe.qb.DocType("GL Entry") + frappe.qb.from_(gle).delete().where( + (gle.voucher_type == self.doctype) & (gle.voucher_no == self.name) + ).run() + sle = frappe.qb.DocType("Stock Ledger Entry") + frappe.qb.from_(gle).delete().where( + (sle.voucher_type == self.doctype) & (sle.voucher_no == self.name) + ).run() def remove_serial_and_batch_bundle(self): bundles = frappe.get_all( @@ -1150,11 +1151,12 @@ class AccountsController(TransactionBase): def clear_unallocated_advances(self, childtype, parentfield): self.set(parentfield, self.get(parentfield, {"allocated_amount": ["not in", [0, None, ""]]})) - frappe.db.sql( - """delete from `tab{}` where parentfield={} and parent = {} - and allocated_amount = 0""".format(childtype, "%s", "%s"), - (parentfield, self.name), - ) + doctype = frappe.qb.DocType(childtype) + frappe.qb.from_(doctype).delete().where( + (doctype.parentfield == parentfield) + & (doctype.parent == self.name) + & (doctype.allocated_amount == 0) + ).run() @frappe.whitelist() def apply_shipping_rule(self): @@ -2129,11 +2131,9 @@ class AccountsController(TransactionBase): for adv in self.advances: consider_for_total_advance = True if adv.reference_name == linked_doc_name: - frappe.db.sql( - f"""delete from `tab{self.doctype} Advance` - where name = %s""", - adv.name, - ) + doctype = frappe.qb.DocType(self.doctype + " Advance") + frappe.qb.from_(doctype).delete().where(doctype.name == adv.name).run() + consider_for_total_advance = False if consider_for_total_advance: From 3ab4acfafaa79295b6c56d9c6a03ccfe78f2e9c0 Mon Sep 17 00:00:00 2001 From: rs-rethik Date: Fri, 20 Dec 2024 14:00:54 +0530 Subject: [PATCH 0719/1614] fix: update query (cherry picked from commit 854e37c05c454ad2d93ec0f4a70600f2ca7d5eec) --- erpnext/controllers/accounts_controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index e5b5887e3ed..20b5885bfdc 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -384,7 +384,7 @@ class AccountsController(TransactionBase): (gle.voucher_type == self.doctype) & (gle.voucher_no == self.name) ).run() sle = frappe.qb.DocType("Stock Ledger Entry") - frappe.qb.from_(gle).delete().where( + frappe.qb.from_(sle).delete().where( (sle.voucher_type == self.doctype) & (sle.voucher_no == self.name) ).run() From cf4068d1a384a6c43c5d9e08e1cfdce7a9519cdd Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 23 Dec 2024 14:10:44 +0530 Subject: [PATCH 0720/1614] chore: resolve conflicts --- .../purchase_invoice_advance/purchase_invoice_advance.json | 4 ---- .../doctype/sales_invoice_advance/sales_invoice_advance.json | 4 ---- 2 files changed, 8 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice_advance/purchase_invoice_advance.json b/erpnext/accounts/doctype/purchase_invoice_advance/purchase_invoice_advance.json index 5cb780b3e6f..4d0579ebc7e 100644 --- a/erpnext/accounts/doctype/purchase_invoice_advance/purchase_invoice_advance.json +++ b/erpnext/accounts/doctype/purchase_invoice_advance/purchase_invoice_advance.json @@ -125,11 +125,7 @@ "index_web_pages_for_search": 1, "istable": 1, "links": [], -<<<<<<< HEAD - "modified": "2023-06-23 21:13:18.013816", -======= "modified": "2024-12-20 12:04:46.729972", ->>>>>>> 225e56cbca (feat: add difference_posting_date field) "modified_by": "Administrator", "module": "Accounts", "name": "Purchase Invoice Advance", diff --git a/erpnext/accounts/doctype/sales_invoice_advance/sales_invoice_advance.json b/erpnext/accounts/doctype/sales_invoice_advance/sales_invoice_advance.json index 151d493ed09..1246d04d3d6 100644 --- a/erpnext/accounts/doctype/sales_invoice_advance/sales_invoice_advance.json +++ b/erpnext/accounts/doctype/sales_invoice_advance/sales_invoice_advance.json @@ -126,11 +126,7 @@ "index_web_pages_for_search": 1, "istable": 1, "links": [], -<<<<<<< HEAD - "modified": "2023-06-23 21:12:57.557731", -======= "modified": "2024-12-20 11:58:28.962370", ->>>>>>> 225e56cbca (feat: add difference_posting_date field) "modified_by": "Administrator", "module": "Accounts", "name": "Sales Invoice Advance", From 4c5540aef9232d044b9a0bd3de278a3b04222230 Mon Sep 17 00:00:00 2001 From: vishakhdesai Date: Fri, 20 Dec 2024 18:03:42 +0530 Subject: [PATCH 0721/1614] fix: update correct cost center in Accounts Receivable Report (cherry picked from commit 09776e9a5ab6221329b3f6e8e3ad94aee0e43d5d) --- .../accounts/report/accounts_receivable/accounts_receivable.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py index 1d67109d68d..0d70225c919 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py @@ -150,6 +150,9 @@ class ReceivablePayableReport: if key not in self.voucher_balance: self.voucher_balance[key] = self.build_voucher_dict(ple) + if ple.voucher_type == ple.against_voucher_type and ple.voucher_no == ple.against_voucher_no: + self.voucher_balance[key].cost_center = ple.cost_center + self.get_invoices(ple) if self.filters.get("group_by_party"): From 19a8ea217ef9252c2ed78fb6f55a501f525276e7 Mon Sep 17 00:00:00 2001 From: vishakhdesai Date: Fri, 20 Dec 2024 18:41:51 +0530 Subject: [PATCH 0722/1614] fix: do not set cost_center update_voucher_balance as it is set in init_voucher_balance (cherry picked from commit 3b36ce560c1faeeff93c428a589522138ab364d2) --- .../report/accounts_receivable/accounts_receivable.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py index 0d70225c919..1ddf9bce06f 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py @@ -134,7 +134,6 @@ class ReceivablePayableReport: paid_in_account_currency=0.0, credit_note_in_account_currency=0.0, outstanding_in_account_currency=0.0, - cost_center=ple.cost_center, ) def init_voucher_balance(self): @@ -278,9 +277,6 @@ class ReceivablePayableReport: row.paid -= amount row.paid_in_account_currency -= amount_in_account_currency - if not row.cost_center and ple.cost_center: - row.cost_center = str(ple.cost_center) - def update_sub_total_row(self, row, party): total_row = self.total_row_map.get(party) From f005bef218d96d7be929d2db9d3cf476e5477d4a Mon Sep 17 00:00:00 2001 From: venkat102 Date: Tue, 17 Dec 2024 13:15:02 +0530 Subject: [PATCH 0723/1614] chore: use get function (cherry picked from commit 1663c7983eac8112b535c467ca9c3845f94bb577) --- .../tax_withholding_category/tax_withholding_category.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py index 69c7eb1153c..9a690a26122 100644 --- a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py +++ b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py @@ -539,7 +539,7 @@ def get_tds_amount(ldc, parties, inv, tax_details, vouchers): ) supp_credit_amt = supp_jv_credit_amt - supp_credit_amt += inv.tax_withholding_net_total + supp_credit_amt += inv.get("tax_withholding_net_total", 0) for type in payment_entry_amounts: if type.payment_type == "Pay": @@ -551,9 +551,9 @@ def get_tds_amount(ldc, parties, inv, tax_details, vouchers): cumulative_threshold = tax_details.get("cumulative_threshold", 0) if inv.doctype != "Payment Entry": - tax_withholding_net_total = inv.base_tax_withholding_net_total + tax_withholding_net_total = inv.get("base_tax_withholding_net_total", 0) else: - tax_withholding_net_total = inv.tax_withholding_net_total + tax_withholding_net_total = inv.get("tax_withholding_net_total", 0) if (threshold and tax_withholding_net_total >= threshold) or ( cumulative_threshold and (supp_credit_amt + supp_inv_credit_amt) >= cumulative_threshold From 8f8dd1c088823dd55013da7c79caf58afd73dc11 Mon Sep 17 00:00:00 2001 From: venkat102 Date: Tue, 17 Dec 2024 13:15:41 +0530 Subject: [PATCH 0724/1614] fix: fetch tax withholding category from the voucher (cherry picked from commit 09e64594dbd694e4a77b287a08d4e44fd2bc6aba) --- .../report/tax_withholding_details/tax_withholding_details.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/report/tax_withholding_details/tax_withholding_details.py b/erpnext/accounts/report/tax_withholding_details/tax_withholding_details.py index d6e0af0b5da..42c6c82b19f 100644 --- a/erpnext/accounts/report/tax_withholding_details/tax_withholding_details.py +++ b/erpnext/accounts/report/tax_withholding_details/tax_withholding_details.py @@ -405,7 +405,7 @@ def get_doc_info(vouchers, doctype, tax_category_map, net_total_map=None): "paid_amount_after_tax", "base_paid_amount", ], - "Journal Entry": ["total_debit"], + "Journal Entry": ["tax_withholding_category", "total_debit"], } entries = frappe.get_all( From 01c1ed98ac3883620ed1c9ebc21eaaf6fd8e8f76 Mon Sep 17 00:00:00 2001 From: Nijith anil <83776819+nijithanil@users.noreply.github.com> Date: Mon, 23 Dec 2024 14:48:32 +0530 Subject: [PATCH 0725/1614] fix(ux): purchase invoice link in error message (#44797) * fix(ux): purchase invoice link in error message * chore: fix linter --------- Co-authored-by: ruthra kumar (cherry picked from commit 6f00a87a9c3036d450dbae22fed53ba8a420b0db) --- .../accounts/doctype/purchase_invoice/purchase_invoice.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index ebc4efc08a0..dc6ee6c1469 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -1677,7 +1677,12 @@ class PurchaseInvoice(BuyingController): if pi: pi = pi[0][0] - frappe.throw(_("Supplier Invoice No exists in Purchase Invoice {0}").format(pi)) + + frappe.throw( + _("Supplier Invoice No exists in Purchase Invoice {0}").format( + get_link_to_form("Purchase Invoice", pi) + ) + ) def update_billing_status_in_pr(self, update_modified=True): if self.is_return and not self.update_billed_amount_in_purchase_receipt: From 33fc987d95283f76dea8dc77e4fa7856a1b4f485 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 23 Dec 2024 14:49:42 +0530 Subject: [PATCH 0726/1614] refactor(test): remove hardcoded names --- erpnext/controllers/tests/test_accounts_controller.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/erpnext/controllers/tests/test_accounts_controller.py b/erpnext/controllers/tests/test_accounts_controller.py index 069eae55315..e557a6b2d79 100644 --- a/erpnext/controllers/tests/test_accounts_controller.py +++ b/erpnext/controllers/tests/test_accounts_controller.py @@ -1990,6 +1990,7 @@ class TestAccountsController(FrappeTestCase): adv.save() self.assertEqual(adv.paid_from, self.advance_received_usd) adv.submit() + adv.reload() # create sales invoice with advance received si = self.create_sales_invoice(qty=1, conversion_rate=80, rate=1, do_not_submit=True) @@ -1997,8 +1998,8 @@ class TestAccountsController(FrappeTestCase): si.append( "advances", { - "reference_type": "Payment Entry", - "reference_name": "ACC-PAY-2024-00001", + "reference_type": adv.doctype, + "reference_name": adv.name, "remarks": "Amount INR 1 received from _Test MC Customer USD\nTransaction reference no Test001 dated 2024-12-19", "advance_amount": 1.0, "allocated_amount": 1.0, @@ -2048,8 +2049,8 @@ class TestAccountsController(FrappeTestCase): pi.append( "advances", { - "reference_type": "Payment Entry", - "reference_name": "ACC-PAY-2024-00002", + "reference_type": adv.doctype, + "reference_name": adv.name, "remarks": "Amount INR 1 paid to _Test MC Supplier USD\nTransaction reference no Test001 dated 2024-12-20", "advance_amount": 1.0, "allocated_amount": 1.0, From 2edb6f3224fd064beaf31dbf722f08ddf68c146c Mon Sep 17 00:00:00 2001 From: ljain112 Date: Mon, 16 Dec 2024 16:20:36 +0530 Subject: [PATCH 0727/1614] fix: avg. buying amount for product bundle item with serial and batch no in gross profit report (cherry picked from commit cc3f4bb0b04f56f33f290114d4c18594bd9f3eef) --- erpnext/accounts/report/gross_profit/gross_profit.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/erpnext/accounts/report/gross_profit/gross_profit.py b/erpnext/accounts/report/gross_profit/gross_profit.py index a27503e8b6d..5df37603b9a 100644 --- a/erpnext/accounts/report/gross_profit/gross_profit.py +++ b/erpnext/accounts/report/gross_profit/gross_profit.py @@ -637,6 +637,7 @@ class GrossProfitGenerator: packed_item_row = row.copy() packed_item_row.warehouse = packed_item.warehouse packed_item_row.qty = packed_item.total_qty * -1 + packed_item_row.serial_and_batch_bundle = packed_item.serial_and_batch_bundle buying_amount += self.get_buying_amount(packed_item_row, packed_item.item_code) return flt(buying_amount, self.currency_precision) @@ -728,6 +729,7 @@ class GrossProfitGenerator: "voucher_no": row.parent, "allow_zero_valuation": True, "company": self.filters.company, + "item_code": item_code, } ) @@ -997,6 +999,7 @@ class GrossProfitGenerator: "is_return": row.is_return, "cost_center": row.cost_center, "invoice": row.parent, + "serial_and_batch_bundle": row.serial_and_batch_bundle, } ) @@ -1048,6 +1051,7 @@ class GrossProfitGenerator: pki.rate, (pki.rate * pki.qty).as_("base_amount"), pki.parent_detail_docname, + pki.serial_and_batch_bundle, ) .where(pki.docstatus == 1) ) From 0969877cd7c30d997f5f42de1d8a7197846d07de Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 23 Dec 2024 18:11:53 +0530 Subject: [PATCH 0728/1614] fix: incoming rate should be zero for rejected items (backport #44857) (#44859) fix: incoming rate should be zero for rejected items (#44857) (cherry picked from commit a515a399cf7778b8a5fa430b11188fe9b677024d) Co-authored-by: rohitwaghchaure --- .../purchase_invoice/test_purchase_invoice.py | 46 +++++++++++++++++++ .../purchase_receipt/purchase_receipt.py | 5 ++ 2 files changed, 51 insertions(+) diff --git a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py index e353435661c..76fbfd2f4e2 100644 --- a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py @@ -1838,6 +1838,52 @@ class TestPurchaseInvoice(FrappeTestCase, StockTestMixin): frappe.db.set_single_value("Buying Settings", "maintain_same_rate", 1) + def test_adjust_incoming_rate_for_rejected_item(self): + frappe.db.set_single_value("Buying Settings", "maintain_same_rate", 0) + + frappe.db.set_single_value("Buying Settings", "set_landed_cost_based_on_purchase_invoice_rate", 1) + + # Cost of Item is zero in Purchase Receipt + pr = make_purchase_receipt(qty=1, rejected_qty=1, rate=0) + + stock_value_difference = frappe.db.get_value( + "Stock Ledger Entry", + {"voucher_type": "Purchase Receipt", "voucher_no": pr.name}, + "stock_value_difference", + ) + self.assertEqual(stock_value_difference, 0) + + pi = create_purchase_invoice_from_receipt(pr.name) + for row in pi.items: + row.qty = 1 + row.rate = 150 + + pi.save() + pi.submit() + + stock_value_difference = frappe.db.get_value( + "Stock Ledger Entry", + {"voucher_type": "Purchase Receipt", "voucher_no": pr.name, "warehouse": pi.items[0].warehouse}, + "stock_value_difference", + ) + self.assertEqual(stock_value_difference, 150) + + stock_value_difference = frappe.db.get_value( + "Stock Ledger Entry", + { + "voucher_type": "Purchase Receipt", + "voucher_no": pr.name, + "warehouse": pi.items[0].rejected_warehouse, + }, + "stock_value_difference", + ) + + self.assertFalse(stock_value_difference) + + frappe.db.set_single_value("Buying Settings", "set_landed_cost_based_on_purchase_invoice_rate", 0) + + frappe.db.set_single_value("Buying Settings", "maintain_same_rate", 1) + def test_item_less_defaults(self): pi = frappe.new_doc("Purchase Invoice") pi.supplier = "_Test Supplier" diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py index 76ecf0fd596..22d7012cc8b 100644 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py @@ -920,12 +920,17 @@ class PurchaseReceipt(BuyingController): ) def enable_recalculate_rate_in_sles(self): + rejected_warehouses = frappe.get_all( + "Purchase Receipt Item", filters={"parent": self.name}, pluck="rejected_warehouse" + ) + sle_table = frappe.qb.DocType("Stock Ledger Entry") ( frappe.qb.update(sle_table) .set(sle_table.recalculate_rate, 1) .where(sle_table.voucher_no == self.name) .where(sle_table.voucher_type == "Purchase Receipt") + .where(sle_table.warehouse.notin(rejected_warehouses)) ).run() From 3f3df7ef2a09d2ce9348b85448bc934eb5b49acf Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 23 Dec 2024 19:15:32 +0530 Subject: [PATCH 0729/1614] perf: slow query related to stock ledger entry (backport #44861) (#44862) perf: slow query related to stock ledger entry (#44861) (cherry picked from commit 54d7b742ab98ef8fea26913f7d8a301cccc5a917) Co-authored-by: rohitwaghchaure --- .../stock/doctype/stock_ledger_entry/stock_ledger_entry.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 d9af64c3983..66fa6064129 100644 --- a/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.json +++ b/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.json @@ -124,6 +124,7 @@ "options": "DocType", "print_width": "150px", "read_only": 1, + "search_index": 1, "width": "150px" }, { @@ -362,7 +363,7 @@ "in_create": 1, "index_web_pages_for_search": 1, "links": [], - "modified": "2024-08-27 09:28:03.961443", + "modified": "2024-12-23 18:03:05.171023", "modified_by": "Administrator", "module": "Stock", "name": "Stock Ledger Entry", From 8092d58d9c36d263a2218fa7b4e95636706faf77 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 23 Dec 2024 19:15:46 +0530 Subject: [PATCH 0730/1614] fix: do not validate qc for scrap item (backport #44844) (#44853) fix: do not validate qc for scrap item (#44844) (cherry picked from commit a2c2b8b5ad1b9d991b5c5380860e271a01ab012f) Co-authored-by: rohitwaghchaure --- erpnext/controllers/stock_controller.py | 3 + .../doctype/stock_entry/test_stock_entry.py | 74 +++++++++++++++++++ 2 files changed, 77 insertions(+) diff --git a/erpnext/controllers/stock_controller.py b/erpnext/controllers/stock_controller.py index c1cb83657da..34556f725d4 100644 --- a/erpnext/controllers/stock_controller.py +++ b/erpnext/controllers/stock_controller.py @@ -999,6 +999,9 @@ class StockController(AccountsController): elif self.doctype == "Stock Entry" and row.t_warehouse: qi_required = True # inward stock needs inspection + if row.get("is_scrap_item"): + continue + if qi_required: # validate row only if inspection is required on item level self.validate_qi_presence(row) if self.docstatus == 1: diff --git a/erpnext/stock/doctype/stock_entry/test_stock_entry.py b/erpnext/stock/doctype/stock_entry/test_stock_entry.py index a26940462bf..05661d3a83a 100644 --- a/erpnext/stock/doctype/stock_entry/test_stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/test_stock_entry.py @@ -970,6 +970,80 @@ class TestStockEntry(FrappeTestCase): self.assertRaises(frappe.ValidationError, ste.submit) + def test_quality_check_for_scrap_item(self): + from erpnext.manufacturing.doctype.work_order.work_order import ( + make_stock_entry as _make_stock_entry, + ) + + scrap_item = "_Test Scrap Item 1" + make_item(scrap_item, {"is_stock_item": 1, "is_purchase_item": 0}) + + bom_name = frappe.db.get_value("BOM Scrap Item", {"docstatus": 1}, "parent") + production_item = frappe.db.get_value("BOM", bom_name, "item") + + work_order = frappe.new_doc("Work Order") + work_order.production_item = production_item + work_order.update( + { + "company": "_Test Company", + "fg_warehouse": "_Test Warehouse 1 - _TC", + "production_item": production_item, + "bom_no": bom_name, + "qty": 1.0, + "stock_uom": frappe.db.get_value("Item", production_item, "stock_uom"), + "skip_transfer": 1, + } + ) + + work_order.get_items_and_operations_from_bom() + work_order.submit() + + stock_entry = frappe.get_doc(_make_stock_entry(work_order.name, "Manufacture", 1)) + for row in stock_entry.items: + if row.s_warehouse: + make_stock_entry( + item_code=row.item_code, + target=row.s_warehouse, + qty=row.qty, + basic_rate=row.basic_rate or 100, + ) + + if row.is_scrap_item: + row.item_code = scrap_item + row.uom = frappe.db.get_value("Item", scrap_item, "stock_uom") + row.stock_uom = frappe.db.get_value("Item", scrap_item, "stock_uom") + + stock_entry.inspection_required = 1 + stock_entry.save() + + self.assertTrue([row.item_code for row in stock_entry.items if row.is_scrap_item]) + + for row in stock_entry.items: + if not row.is_scrap_item: + qc = frappe.get_doc( + { + "doctype": "Quality Inspection", + "reference_name": stock_entry.name, + "inspected_by": "Administrator", + "reference_type": "Stock Entry", + "inspection_type": "In Process", + "status": "Accepted", + "sample_size": 1, + "item_code": row.item_code, + } + ) + + qc_name = qc.submit() + row.quality_inspection = qc_name + + stock_entry.reload() + stock_entry.submit() + for row in stock_entry.items: + if row.is_scrap_item: + self.assertFalse(row.quality_inspection) + else: + self.assertTrue(row.quality_inspection) + def test_quality_check(self): item_code = "_Test Item For QC" if not frappe.db.exists("Item", item_code): From f32cf84413dc4466ad77a320667e296c1344b160 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 23 Dec 2024 22:30:58 +0530 Subject: [PATCH 0731/1614] fix: Warehouse wise Stock Value chart roles (backport #44865) (#44867) fix: Warehouse wise Stock Value chart roles (#44865) (cherry picked from commit 7d41805d0e91d681a92b292946f1d63c54f11dd0) Co-authored-by: rohitwaghchaure --- .../warehouse_wise_stock_value.json | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/erpnext/stock/dashboard_chart/warehouse_wise_stock_value/warehouse_wise_stock_value.json b/erpnext/stock/dashboard_chart/warehouse_wise_stock_value/warehouse_wise_stock_value.json index a07b55382ca..400ec5e0e64 100644 --- a/erpnext/stock/dashboard_chart/warehouse_wise_stock_value/warehouse_wise_stock_value.json +++ b/erpnext/stock/dashboard_chart/warehouse_wise_stock_value/warehouse_wise_stock_value.json @@ -1,19 +1,37 @@ { "chart_name": "Warehouse wise Stock Value", "chart_type": "Custom", - "creation": "2020-07-20 21:01:04.296157", + "creation": "2022-03-30 00:58:02.018824", "docstatus": 0, "doctype": "Dashboard Chart", "filters_json": "{}", "idx": 0, "is_public": 1, "is_standard": 1, - "modified": "2020-07-22 13:01:01.815123", + "last_synced_on": "2024-12-23 18:44:46.822164", + "modified": "2024-12-23 19:31:17.003946", "modified_by": "Administrator", "module": "Stock", "name": "Warehouse wise Stock Value", "number_of_groups": 0, "owner": "Administrator", + "roles": [ + { + "role": "Sales Manager" + }, + { + "role": "Accounts Manager" + }, + { + "role": "Stock Manager" + }, + { + "role": "Stock User" + }, + { + "role": "Accounts User" + } + ], "source": "Warehouse wise Stock Value", "timeseries": 0, "type": "Bar", From d6001e5ef9b9fd05b3e534c25cc36f388f8e57ee Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 23 Dec 2024 22:31:16 +0530 Subject: [PATCH 0732/1614] fix: stock entry not fetching expired batches (backport #44863) (#44868) fix: stock entry not fetching expired batches (#44863) (cherry picked from commit c9b143b509c18a31b65f252d495b69eb24ab4f53) Co-authored-by: rohitwaghchaure --- erpnext/controllers/stock_controller.py | 2 +- .../stock/doctype/stock_entry/stock_entry.js | 1 + .../stock/doctype/stock_entry/stock_entry.py | 46 +++++++++++++++---- 3 files changed, 39 insertions(+), 10 deletions(-) diff --git a/erpnext/controllers/stock_controller.py b/erpnext/controllers/stock_controller.py index 34556f725d4..6e013746199 100644 --- a/erpnext/controllers/stock_controller.py +++ b/erpnext/controllers/stock_controller.py @@ -156,7 +156,7 @@ class StockController(AccountsController): from erpnext.stock.doctype.serial_no.serial_no import get_serial_nos is_material_issue = False - if self.doctype == "Stock Entry" and self.purpose == "Material Issue": + if self.doctype == "Stock Entry" and self.purpose in ["Material Issue", "Material Transfer"]: is_material_issue = True for d in self.get("items"): diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.js b/erpnext/stock/doctype/stock_entry/stock_entry.js index 0e39c2a9756..df6a61d335b 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.js +++ b/erpnext/stock/doctype/stock_entry/stock_entry.js @@ -371,6 +371,7 @@ frappe.ui.form.on("Stock Entry", { function () { frappe.call({ method: "erpnext.stock.doctype.stock_entry.stock_entry.get_expired_batch_items", + freeze: true, callback: function (r) { if (!r.exc && r.message) { frm.set_value("items", []); diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index f362f9d3da9..febc814b978 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -2975,17 +2975,45 @@ def get_uom_details(item_code, uom, qty): @frappe.whitelist() def get_expired_batch_items(): - return frappe.db.sql( - """select b.item, sum(sle.actual_qty) as qty, sle.batch_no, sle.warehouse, sle.stock_uom\ - from `tabBatch` b, `tabStock Ledger Entry` sle - where b.expiry_date <= %s - and b.expiry_date is not NULL - and b.batch_id = sle.batch_no and sle.is_cancelled = 0 - group by sle.warehouse, sle.item_code, sle.batch_no""", - (nowdate()), - as_dict=1, + from erpnext.stock.doctype.serial_and_batch_bundle.serial_and_batch_bundle import get_auto_batch_nos + + expired_batches = get_expired_batches() + if not expired_batches: + return [] + + expired_batches_stock = get_auto_batch_nos( + frappe._dict( + { + "batch_no": list(expired_batches.keys()), + "for_stock_levels": True, + } + ) ) + for row in expired_batches_stock: + row.update(expired_batches.get(row.batch_no)) + + return expired_batches_stock + + +def get_expired_batches(): + batch = frappe.qb.DocType("Batch") + + data = ( + frappe.qb.from_(batch) + .select(batch.item, batch.name.as_("batch_no"), batch.stock_uom) + .where((batch.expiry_date <= nowdate()) & (batch.expiry_date.isnotnull())) + ).run(as_dict=True) + + if not data: + return [] + + expired_batches = frappe._dict() + for row in data: + expired_batches[row.batch_no] = row + + return expired_batches + @frappe.whitelist() def get_warehouse_details(args): From 516a325a31d48d5833b285e78cd5dd2f7e2f91c9 Mon Sep 17 00:00:00 2001 From: Khushi Rawat <142375893+khushi8112@users.noreply.github.com> Date: Mon, 23 Dec 2024 15:42:18 +0530 Subject: [PATCH 0733/1614] fix: asset field precision check (cherry picked from commit 92b8768ae2e6327b68e723113529f5ee529a18d6) --- erpnext/assets/doctype/asset/asset.py | 12 +++++------- .../asset_depreciation_schedule.py | 14 +++++++++----- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/erpnext/assets/doctype/asset/asset.py b/erpnext/assets/doctype/asset/asset.py index 243ad009050..e499b5e0faa 100644 --- a/erpnext/assets/doctype/asset/asset.py +++ b/erpnext/assets/doctype/asset/asset.py @@ -308,12 +308,14 @@ class Asset(AccountsController): ) def validate_precision(self): - float_precision = cint(frappe.db.get_default("float_precision")) or 2 if self.gross_purchase_amount: - self.gross_purchase_amount = flt(self.gross_purchase_amount, float_precision) + self.gross_purchase_amount = flt( + self.gross_purchase_amount, self.precision("gross_purchase_amount") + ) + if self.opening_accumulated_depreciation: self.opening_accumulated_depreciation = flt( - self.opening_accumulated_depreciation, float_precision + self.opening_accumulated_depreciation, self.precision("opening_accumulated_depreciation") ) def validate_asset_values(self): @@ -487,11 +489,7 @@ class Asset(AccountsController): def validate_expected_value_after_useful_life(self): for row in self.get("finance_books"): - row.expected_value_after_useful_life = flt( - row.expected_value_after_useful_life, self.precision("gross_purchase_amount") - ) depr_schedule = get_depr_schedule(self.name, "Draft", row.finance_book) - if not depr_schedule: continue diff --git a/erpnext/assets/doctype/asset_depreciation_schedule/asset_depreciation_schedule.py b/erpnext/assets/doctype/asset_depreciation_schedule/asset_depreciation_schedule.py index 679fbfe2e58..fe9fa870e0a 100644 --- a/erpnext/assets/doctype/asset_depreciation_schedule/asset_depreciation_schedule.py +++ b/erpnext/assets/doctype/asset_depreciation_schedule/asset_depreciation_schedule.py @@ -430,6 +430,7 @@ class AssetDepreciationSchedule(Document): if not depreciation_amount: continue + depreciation_amount = flt(depreciation_amount, asset_doc.precision("gross_purchase_amount")) value_after_depreciation = flt( value_after_depreciation - flt(depreciation_amount), asset_doc.precision("gross_purchase_amount"), @@ -443,6 +444,7 @@ class AssetDepreciationSchedule(Document): depreciation_amount += flt(value_after_depreciation) - flt( row.expected_value_after_useful_life ) + depreciation_amount = flt(depreciation_amount, asset_doc.precision("gross_purchase_amount")) skip_row = True if flt(depreciation_amount, asset_doc.precision("gross_purchase_amount")) > 0: @@ -517,10 +519,13 @@ class AssetDepreciationSchedule(Document): i - 1 ].accumulated_depreciation_amount else: - accumulated_depreciation = flt(self.opening_accumulated_depreciation) + accumulated_depreciation = flt( + self.opening_accumulated_depreciation, + asset_doc.precision("opening_accumulated_depreciation"), + ) - depreciation_amount = flt(d.depreciation_amount, d.precision("depreciation_amount")) - value_after_depreciation -= flt(depreciation_amount) + value_after_depreciation -= flt(d.depreciation_amount) + value_after_depreciation = flt(value_after_depreciation, d.precision("depreciation_amount")) # for the last row, if depreciation method = Straight Line if ( @@ -530,12 +535,11 @@ class AssetDepreciationSchedule(Document): and not date_of_return and not row.shift_based ): - depreciation_amount += flt( + d.depreciation_amount += flt( value_after_depreciation - flt(row.expected_value_after_useful_life), d.precision("depreciation_amount"), ) - d.depreciation_amount = depreciation_amount accumulated_depreciation += d.depreciation_amount d.accumulated_depreciation_amount = flt( accumulated_depreciation, d.precision("accumulated_depreciation_amount") From ddfead2cde3a25c95bb1bff79680a41365ebf8de Mon Sep 17 00:00:00 2001 From: Khushi Rawat <142375893+khushi8112@users.noreply.github.com> Date: Mon, 23 Dec 2024 23:37:51 +0530 Subject: [PATCH 0734/1614] fix: test case correction (cherry picked from commit 2f7e6230a6c15885e291902c509e36a2017ec8b4) --- erpnext/assets/doctype/asset/test_asset.py | 2 +- .../asset_depreciation_schedule/asset_depreciation_schedule.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/assets/doctype/asset/test_asset.py b/erpnext/assets/doctype/asset/test_asset.py index 06f170200a8..8a320d617ff 100644 --- a/erpnext/assets/doctype/asset/test_asset.py +++ b/erpnext/assets/doctype/asset/test_asset.py @@ -889,7 +889,7 @@ class TestDepreciationMethods(AssetSetup): ["2030-12-31", 28630.14, 28630.14], ["2031-12-31", 35684.93, 64315.07], ["2032-12-31", 17842.46, 82157.53], - ["2033-06-06", 5342.46, 87499.99], + ["2033-06-06", 5342.47, 87500.00], ] schedules = [ diff --git a/erpnext/assets/doctype/asset_depreciation_schedule/asset_depreciation_schedule.py b/erpnext/assets/doctype/asset_depreciation_schedule/asset_depreciation_schedule.py index fe9fa870e0a..a60478ac8a1 100644 --- a/erpnext/assets/doctype/asset_depreciation_schedule/asset_depreciation_schedule.py +++ b/erpnext/assets/doctype/asset_depreciation_schedule/asset_depreciation_schedule.py @@ -344,7 +344,7 @@ class AssetDepreciationSchedule(Document): date_of_disposal, original_schedule_date=schedule_date, ) - + depreciation_amount = flt(depreciation_amount, asset_doc.precision("gross_purchase_amount")) if depreciation_amount > 0: self.add_depr_schedule_row(date_of_disposal, depreciation_amount, n) From 7a5c30fe9b5e3833ffeba46cead6ba42a69c0add Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Tue, 24 Dec 2024 09:06:37 +0530 Subject: [PATCH 0735/1614] fix: posting_time issue (#44870) (cherry picked from commit 079b86044efce7bf04c94900cdde6b1119c53fb2) # Conflicts: # erpnext/stock/deprecated_serial_batch.py --- erpnext/stock/deprecated_serial_batch.py | 9 ++++++++- erpnext/stock/serial_batch_bundle.py | 5 ++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/erpnext/stock/deprecated_serial_batch.py b/erpnext/stock/deprecated_serial_batch.py index d10833b6d46..b2c3e75b5a0 100644 --- a/erpnext/stock/deprecated_serial_batch.py +++ b/erpnext/stock/deprecated_serial_batch.py @@ -3,8 +3,12 @@ from collections import defaultdict import frappe from frappe.query_builder.functions import CombineDatetime, Sum +<<<<<<< HEAD from frappe.utils import flt from frappe.utils.deprecations import deprecated +======= +from frappe.utils import flt, nowtime +>>>>>>> 079b86044e (fix: posting_time issue (#44870)) from pypika import Order @@ -112,7 +116,10 @@ class DeprecatedBatchNoValuation: sle = frappe.qb.DocType("Stock Ledger Entry") timestamp_condition = None - if self.sle.posting_date and self.sle.posting_time: + if self.sle.posting_date: + if self.sle.posting_time is None: + self.sle.posting_time = nowtime() + posting_datetime = get_combine_datetime(self.sle.posting_date, self.sle.posting_time) if not self.sle.creation: posting_datetime = posting_datetime + datetime.timedelta(milliseconds=1) diff --git a/erpnext/stock/serial_batch_bundle.py b/erpnext/stock/serial_batch_bundle.py index 732a14c2fb5..c450bf1a086 100644 --- a/erpnext/stock/serial_batch_bundle.py +++ b/erpnext/stock/serial_batch_bundle.py @@ -643,7 +643,10 @@ class BatchNoValuation(DeprecatedBatchNoValuation): child = frappe.qb.DocType("Serial and Batch Entry") timestamp_condition = "" - if self.sle.posting_date and self.sle.posting_time: + if self.sle.posting_date: + if self.sle.posting_time is None: + self.sle.posting_time = nowtime() + timestamp_condition = CombineDatetime(parent.posting_date, parent.posting_time) < CombineDatetime( self.sle.posting_date, self.sle.posting_time ) From 90aadcdcbc04734b3b47de70d263e541b874f4e2 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Tue, 24 Dec 2024 10:16:53 +0530 Subject: [PATCH 0736/1614] chore: fix conflicts --- erpnext/stock/deprecated_serial_batch.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/erpnext/stock/deprecated_serial_batch.py b/erpnext/stock/deprecated_serial_batch.py index b2c3e75b5a0..b3f4c2dead4 100644 --- a/erpnext/stock/deprecated_serial_batch.py +++ b/erpnext/stock/deprecated_serial_batch.py @@ -3,12 +3,8 @@ from collections import defaultdict import frappe from frappe.query_builder.functions import CombineDatetime, Sum -<<<<<<< HEAD -from frappe.utils import flt -from frappe.utils.deprecations import deprecated -======= from frappe.utils import flt, nowtime ->>>>>>> 079b86044e (fix: posting_time issue (#44870)) +from frappe.utils.deprecations import deprecated from pypika import Order From ca7c229e863aefc8fcf9181513afa309b2c3fd25 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 24 Dec 2024 10:48:15 +0530 Subject: [PATCH 0737/1614] fix: Paid + Write Off Amount issue in Sales Invoice (backport #44763) (#44874) fix: Paid + Write Off Amount issue in Sales Invoice (cherry picked from commit 1fd7ba7c8879828526dedcce956b6bd59f10a4a9) Co-authored-by: vishakhdesai --- erpnext/accounts/doctype/sales_invoice/sales_invoice.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 1a7ffc3c339..dc2b44e7527 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -1002,9 +1002,9 @@ class SalesInvoice(SellingController): def validate_pos(self): if self.is_return: invoice_total = self.rounded_total or self.grand_total - if flt(self.paid_amount) + flt(self.write_off_amount) - flt(invoice_total) > 1.0 / ( - 10.0 ** (self.precision("grand_total") + 1.0) - ): + if abs(flt(self.paid_amount)) + abs(flt(self.write_off_amount)) - abs( + flt(invoice_total) + ) > 1.0 / (10.0 ** (self.precision("grand_total") + 1.0)): frappe.throw(_("Paid amount + Write Off Amount can not be greater than Grand Total")) def validate_warehouse(self): From 96cc9e29a190f9dffe47ee8b6e59e4353263aa89 Mon Sep 17 00:00:00 2001 From: Abdeali Chharchhodawala <99460106+Abdeali099@users.noreply.github.com> Date: Tue, 24 Dec 2024 10:22:32 +0530 Subject: [PATCH 0738/1614] fix: add `Stock UOM` when adding new item in POS list (#44780) --- erpnext/selling/page/point_of_sale/pos_controller.js | 12 ++++++++++-- .../selling/page/point_of_sale/pos_item_selector.js | 5 ++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/erpnext/selling/page/point_of_sale/pos_controller.js b/erpnext/selling/page/point_of_sale/pos_controller.js index c1127c39cc0..32cb2bc0525 100644 --- a/erpnext/selling/page/point_of_sale/pos_controller.js +++ b/erpnext/selling/page/point_of_sale/pos_controller.js @@ -574,11 +574,19 @@ erpnext.PointOfSale.Controller = class { } else { if (!this.frm.doc.customer) return this.raise_customer_selection_alert(); - const { item_code, batch_no, serial_no, rate, uom } = item; + const { item_code, batch_no, serial_no, rate, uom, stock_uom } = item; if (!item_code) return; - const new_item = { item_code, batch_no, rate, uom, [field]: value }; + if (rate == undefined || rate == 0) { + frappe.show_alert({ + message: __("Price is not set for the item."), + indicator: "orange", + }); + frappe.utils.play_sound("error"); + return; + } + const new_item = { item_code, batch_no, rate, uom, [field]: value, stock_uom }; if (serial_no) { await this.check_serial_no_availablilty(item_code, this.frm.doc.set_warehouse, serial_no); diff --git a/erpnext/selling/page/point_of_sale/pos_item_selector.js b/erpnext/selling/page/point_of_sale/pos_item_selector.js index 207a444218b..9882c2d201e 100644 --- a/erpnext/selling/page/point_of_sale/pos_item_selector.js +++ b/erpnext/selling/page/point_of_sale/pos_item_selector.js @@ -118,6 +118,7 @@ erpnext.PointOfSale.ItemSelector = class { data-item-code="${escape(item.item_code)}" data-serial-no="${escape(serial_no)}" data-batch-no="${escape(batch_no)}" data-uom="${escape(uom)}" data-rate="${escape(price_list_rate || 0)}" + data-stock-uom="${escape(item.stock_uom)}" title="${item.item_name}"> ${get_item_image_html()} @@ -251,17 +252,19 @@ erpnext.PointOfSale.ItemSelector = class { let serial_no = unescape($item.attr("data-serial-no")); let uom = unescape($item.attr("data-uom")); let rate = unescape($item.attr("data-rate")); + let stock_uom = unescape($item.attr("data-stock-uom")); // escape(undefined) returns "undefined" then unescape returns "undefined" batch_no = batch_no === "undefined" ? undefined : batch_no; serial_no = serial_no === "undefined" ? undefined : serial_no; uom = uom === "undefined" ? undefined : uom; rate = rate === "undefined" ? undefined : rate; + stock_uom = stock_uom === "undefined" ? undefined : stock_uom; me.events.item_selected({ field: "qty", value: "+1", - item: { item_code, batch_no, serial_no, uom, rate }, + item: { item_code, batch_no, serial_no, uom, rate, stock_uom }, }); me.search_field.set_focus(); }); From 5ca60f3e0a353fe18e1db9275bc683852842d6f3 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Thu, 19 Dec 2024 16:27:04 +0530 Subject: [PATCH 0739/1614] fix: correct tds rate with lower deduction certificate (cherry picked from commit cb9c12d4952f68cf4a175fdd3adc470f37e40272) --- .../tax_withholding_category/tax_withholding_category.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py index 9a690a26122..cde1d24e5b4 100644 --- a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py +++ b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py @@ -247,14 +247,14 @@ def get_tax_row_for_tds(tax_details, tax_amount): } -def get_lower_deduction_certificate(company, tax_details, pan_no): +def get_lower_deduction_certificate(company, posting_date, tax_details, pan_no): ldc_name = frappe.db.get_value( "Lower Deduction Certificate", { "pan_no": pan_no, "tax_withholding_category": tax_details.tax_withholding_category, - "valid_from": (">=", tax_details.from_date), - "valid_upto": ("<=", tax_details.to_date), + "valid_from": ("<=", posting_date), + "valid_upto": (">=", posting_date), "company": company, }, "name", @@ -302,7 +302,7 @@ def get_tax_amount(party_type, parties, inv, tax_details, posting_date, pan_no=N tax_amount = 0 if party_type == "Supplier": - ldc = get_lower_deduction_certificate(inv.company, tax_details, pan_no) + ldc = get_lower_deduction_certificate(inv.company, posting_date, tax_details, pan_no) if tax_deducted: net_total = inv.tax_withholding_net_total if ldc: From 57e6ed464594eb096c3a5956874b4773fc3abe97 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 24 Dec 2024 15:12:32 +0530 Subject: [PATCH 0740/1614] fix: set project in GL from the SLE (backport #44879) (#44885) fix: set project in GL from the SLE (#44879) (cherry picked from commit 021d077808a200be4cda178ac0df0b9bcce4886c) Co-authored-by: rohitwaghchaure --- erpnext/controllers/stock_controller.py | 45 ++++++++++++++++--------- 1 file changed, 29 insertions(+), 16 deletions(-) diff --git a/erpnext/controllers/stock_controller.py b/erpnext/controllers/stock_controller.py index 6e013746199..970dc348057 100644 --- a/erpnext/controllers/stock_controller.py +++ b/erpnext/controllers/stock_controller.py @@ -530,7 +530,7 @@ class StockController(AccountsController): "account": warehouse_account[sle.warehouse]["account"], "against": expense_account, "cost_center": item_row.cost_center, - "project": item_row.project or self.get("project"), + "project": sle.get("project") or item_row.project or self.get("project"), "remarks": self.get("remarks") or _("Accounting Entry for Stock"), "debit": flt(sle.stock_value_difference, precision), "is_opening": item_row.get("is_opening") @@ -550,7 +550,9 @@ class StockController(AccountsController): "cost_center": item_row.cost_center, "remarks": self.get("remarks") or _("Accounting Entry for Stock"), "debit": -1 * flt(sle.stock_value_difference, precision), - "project": item_row.get("project") or self.get("project"), + "project": sle.get("project") + or item_row.get("project") + or self.get("project"), "is_opening": item_row.get("is_opening") or self.get("is_opening") or "No", @@ -678,23 +680,34 @@ class StockController(AccountsController): def get_stock_ledger_details(self): stock_ledger = {} - stock_ledger_entries = frappe.db.sql( - """ - select - name, warehouse, stock_value_difference, valuation_rate, - voucher_detail_no, item_code, posting_date, posting_time, - actual_qty, qty_after_transaction - from - `tabStock Ledger Entry` - where - voucher_type=%s and voucher_no=%s and is_cancelled = 0 - """, - (self.doctype, self.name), - as_dict=True, - ) + + table = frappe.qb.DocType("Stock Ledger Entry") + + stock_ledger_entries = ( + frappe.qb.from_(table) + .select( + table.name, + table.warehouse, + table.stock_value_difference, + table.valuation_rate, + table.voucher_detail_no, + table.item_code, + table.posting_date, + table.posting_time, + table.actual_qty, + table.qty_after_transaction, + table.project, + ) + .where( + (table.voucher_type == self.doctype) + & (table.voucher_no == self.name) + & (table.is_cancelled == 0) + ) + ).run(as_dict=True) for sle in stock_ledger_entries: stock_ledger.setdefault(sle.voucher_detail_no, []).append(sle) + return stock_ledger def check_expense_account(self, item): From 69ed2a9dfe905e9d655e3f94ff608457ad09623f Mon Sep 17 00:00:00 2001 From: venkat102 Date: Tue, 24 Dec 2024 15:34:39 +0530 Subject: [PATCH 0741/1614] refactor: use db_set instead of set_value to trigger notification (cherry picked from commit f8b923edfee32ad1a7d306c9e5445e9aed2702d9) --- erpnext/accounts/doctype/bank_clearance/bank_clearance.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/bank_clearance/bank_clearance.py b/erpnext/accounts/doctype/bank_clearance/bank_clearance.py index ac7883fce13..7f08653b15b 100644 --- a/erpnext/accounts/doctype/bank_clearance/bank_clearance.py +++ b/erpnext/accounts/doctype/bank_clearance/bank_clearance.py @@ -117,9 +117,9 @@ class BankClearance(Document): ) else: - frappe.db.set_value( - d.payment_document, d.payment_entry, "clearance_date", d.clearance_date - ) + # using db_set to trigger notification + payment_entry = frappe.get_doc(d.payment_document, d.payment_entry) + payment_entry.db_set("clearance_date", d.clearance_date) clearance_date_updated = True From 771632a5e2be9ac2981d951481267ea2244094dd Mon Sep 17 00:00:00 2001 From: venkat102 Date: Tue, 24 Dec 2024 12:35:38 +0530 Subject: [PATCH 0742/1614] fix: show profit and loss after period closing (cherry picked from commit dc5cd93bf0448eea9c2caef77413aa18058c3243) --- .../consolidated_financial_statement.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.py b/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.py index d287b30bf0b..04625fc76fc 100644 --- a/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.py +++ b/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.py @@ -350,7 +350,7 @@ def get_data(companies, root_type, balance_must_be, fiscal_year, filters=None, i gl_entries_by_account, accounts_by_name, accounts, - ignore_closing_entries=False, + ignore_closing_entries=ignore_closing_entries, root_type=root_type, ) From 944dc966bc2c26bf11986d52d5186f4e89fd11cc Mon Sep 17 00:00:00 2001 From: vishakhdesai Date: Thu, 19 Dec 2024 12:27:06 +0530 Subject: [PATCH 0743/1614] fix: refactor query in get_total_allocated_amount in bank_transaction (cherry picked from commit 6b847cdb623322a64096337dcbe86cdbdc60bb6b) --- .../bank_reconciliation_tool.py | 6 ++- .../bank_transaction/bank_transaction.py | 37 +++++++++++++------ 2 files changed, 30 insertions(+), 13 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 42b1a54dea6..8fb3f36f28e 100644 --- a/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py +++ b/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py @@ -480,8 +480,12 @@ def get_linked_payments( def subtract_allocations(gl_account, vouchers): "Look up & subtract any existing Bank Transaction allocations" copied = [] + + voucher_docs = [(voucher.get("doctype"), voucher.get("name")) for voucher in vouchers] + voucher_allocated_amounts = get_total_allocated_amount(voucher_docs) + for voucher in vouchers: - rows = get_total_allocated_amount(voucher.get("doctype"), voucher.get("name")) + rows = voucher_allocated_amounts.get((voucher.get("doctype"), voucher.get("name"))) filtered_row = list(filter(lambda row: row.get("gl_account") == gl_account, rows)) if amount := None if not filtered_row else filtered_row[0]["total"]: diff --git a/erpnext/accounts/doctype/bank_transaction/bank_transaction.py b/erpnext/accounts/doctype/bank_transaction/bank_transaction.py index c13dbe445f1..7e509896fec 100644 --- a/erpnext/accounts/doctype/bank_transaction/bank_transaction.py +++ b/erpnext/accounts/doctype/bank_transaction/bank_transaction.py @@ -154,10 +154,16 @@ class BankTransaction(Document): """ remaining_amount = self.unallocated_amount to_remove = [] + payment_entry_docs = [(pe.payment_document, pe.payment_entry) for pe in self.payment_entries] + pe_bt_allocations = get_total_allocated_amount(payment_entry_docs) + for payment_entry in self.payment_entries: if payment_entry.allocated_amount == 0.0: unallocated_amount, should_clear, latest_transaction = get_clearance_details( - self, payment_entry + self, + payment_entry, + pe_bt_allocations.get((payment_entry.payment_document, payment_entry.payment_entry)) + or [], ) if 0.0 == unallocated_amount: @@ -232,7 +238,7 @@ def get_doctypes_for_bank_reconciliation(): return frappe.get_hooks("bank_reconciliation_doctypes") -def get_clearance_details(transaction, payment_entry): +def get_clearance_details(transaction, payment_entry, bt_allocations): """ There should only be one bank gle for a voucher. Could be none for a Bank Transaction. @@ -241,7 +247,6 @@ def get_clearance_details(transaction, payment_entry): """ gl_bank_account = frappe.db.get_value("Bank Account", transaction.bank_account, "account") gles = get_related_bank_gl_entries(payment_entry.payment_document, payment_entry.payment_entry) - bt_allocations = get_total_allocated_amount(payment_entry.payment_document, payment_entry.payment_entry) unallocated_amount = min( transaction.unallocated_amount, @@ -294,44 +299,52 @@ def get_related_bank_gl_entries(doctype, docname): ) -def get_total_allocated_amount(doctype, docname): +def get_total_allocated_amount(docs): """ Gets the sum of allocations for a voucher on each bank GL account along with the latest bank transaction name & date NOTE: query may also include just saved vouchers/payments but with zero allocated_amount """ + if not docs: + return {} + # nosemgrep: frappe-semgrep-rules.rules.frappe-using-db-sql result = frappe.db.sql( """ - SELECT total, latest_name, latest_date, gl_account FROM ( + SELECT total, latest_name, latest_date, gl_account, payment_document, payment_entry FROM ( SELECT ROW_NUMBER() OVER w AS rownum, - SUM(btp.allocated_amount) OVER(PARTITION BY ba.account) AS total, + SUM(btp.allocated_amount) OVER(PARTITION BY ba.account, btp.payment_document, btp.payment_entry) AS total, FIRST_VALUE(bt.name) OVER w AS latest_name, FIRST_VALUE(bt.date) OVER w AS latest_date, - ba.account AS gl_account + ba.account AS gl_account, + btp.payment_document, + btp.payment_entry FROM `tabBank Transaction Payments` btp LEFT JOIN `tabBank Transaction` bt ON bt.name=btp.parent LEFT JOIN `tabBank Account` ba ON ba.name=bt.bank_account WHERE - btp.payment_document = %(doctype)s - AND btp.payment_entry = %(docname)s + (btp.payment_document, btp.payment_entry) IN %(docs)s AND bt.docstatus = 1 - WINDOW w AS (PARTITION BY ba.account ORDER BY bt.date desc) + WINDOW w AS (PARTITION BY ba.account, btp.payment_document, btp.payment_entry ORDER BY bt.date DESC) ) temp WHERE rownum = 1 """, - dict(doctype=doctype, docname=docname), + dict(docs=docs), as_dict=True, ) + + payment_allocation_details = {} for row in result: # Why is this *sometimes* a byte string? if isinstance(row["latest_name"], bytes): row["latest_name"] = row["latest_name"].decode() row["latest_date"] = frappe.utils.getdate(row["latest_date"]) - return result + payment_allocation_details.setdefault((row["payment_document"], row["payment_entry"]), []).append(row) + + return payment_allocation_details def get_paid_amount(payment_entry, currency, gl_bank_account): From 61367ee1edb5ebff648750fd1f2886c58acf4198 Mon Sep 17 00:00:00 2001 From: vishakhdesai Date: Thu, 19 Dec 2024 12:55:11 +0530 Subject: [PATCH 0744/1614] fix: failing tests fixed (cherry picked from commit 2ce07865d36d74ef058d613dfe4714ddfd6b58e6) --- .../bank_reconciliation_tool/bank_reconciliation_tool.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 8fb3f36f28e..28038e9212a 100644 --- a/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py +++ b/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py @@ -485,7 +485,7 @@ def subtract_allocations(gl_account, vouchers): voucher_allocated_amounts = get_total_allocated_amount(voucher_docs) for voucher in vouchers: - rows = voucher_allocated_amounts.get((voucher.get("doctype"), voucher.get("name"))) + rows = voucher_allocated_amounts.get((voucher.get("doctype"), voucher.get("name"))) or [] filtered_row = list(filter(lambda row: row.get("gl_account") == gl_account, rows)) if amount := None if not filtered_row else filtered_row[0]["total"]: From 139a56b8a44de5d7d5355d7b8dadb8f193943d35 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Wed, 25 Dec 2024 03:36:34 +0000 Subject: [PATCH 0745/1614] chore(release): Bumped to Version 15.47.0 # [15.47.0](https://github.com/frappe/erpnext/compare/v15.46.2...v15.47.0) (2024-12-25) ### Bug Fixes * 'str' object has no attribute 'get_sql' ([8b810f5](https://github.com/frappe/erpnext/commit/8b810f5fb8f451ec6f3c29dd2070785750a643d5)) * add `Stock UOM` when adding new item in POS list ([#44780](https://github.com/frappe/erpnext/issues/44780)) ([96cc9e2](https://github.com/frappe/erpnext/commit/96cc9e29a190f9dffe47ee8b6e59e4353263aa89)) * Add hooks for repost allowed doctypes ([b5596d9](https://github.com/frappe/erpnext/commit/b5596d98e3e6f59d6ac0ee8d7266379ad25ca1b5)) * added docs.frappe.io in documentation_url ([#44776](https://github.com/frappe/erpnext/issues/44776)) ([0fd7792](https://github.com/frappe/erpnext/commit/0fd7792f49f97b45d620098e0faa433a3ea904f1)) * asset field precision check ([516a325](https://github.com/frappe/erpnext/commit/516a325a31d48d5833b285e78cd5dd2f7e2f91c9)) * avg. buying amount for product bundle item with serial and batch no in gross profit report ([2edb6f3](https://github.com/frappe/erpnext/commit/2edb6f3224fd064beaf31dbf722f08ddf68c146c)) * better indicator base amount for Tax Witholding in Journal Entry ([218e777](https://github.com/frappe/erpnext/commit/218e7774238908cc7f26c38243a5322bfe585bee)) * buying rate for service item in gross profit report ([a55aaea](https://github.com/frappe/erpnext/commit/a55aaea5a15f9966635b4960547c62589ef32af2)) * closing stock balance permissions (backport [#44791](https://github.com/frappe/erpnext/issues/44791)) ([#44793](https://github.com/frappe/erpnext/issues/44793)) ([cdeec8d](https://github.com/frappe/erpnext/commit/cdeec8d24c29cb4de3159234a6e627d2f9e7593a)) * correct args for get_advance_payment_entries_for_regional ([875797e](https://github.com/frappe/erpnext/commit/875797e655db4a67696ed6eae963705be5ebaa68)) * correct tds rate with lower deduction certificate ([5ca60f3](https://github.com/frappe/erpnext/commit/5ca60f3e0a353fe18e1db9275bc683852842d6f3)) * do not set cost_center update_voucher_balance as it is set in init_voucher_balance ([19a8ea2](https://github.com/frappe/erpnext/commit/19a8ea217ef9252c2ed78fb6f55a501f525276e7)) * do not validate qc for scrap item (backport [#44844](https://github.com/frappe/erpnext/issues/44844)) ([#44853](https://github.com/frappe/erpnext/issues/44853)) ([8092d58](https://github.com/frappe/erpnext/commit/8092d58d9c36d263a2218fa7b4e95636706faf77)) * Duplicate entry ' EF1DE8B2E1B6' for key 'PRIMARY' (backport [#44809](https://github.com/frappe/erpnext/issues/44809)) ([#44814](https://github.com/frappe/erpnext/issues/44814)) ([16b013f](https://github.com/frappe/erpnext/commit/16b013fab27a84c3889027db255166b76688efc4)) * fetch tax withholding category from the voucher ([8f8dd1c](https://github.com/frappe/erpnext/commit/8f8dd1c088823dd55013da7c79caf58afd73dc11)) * incoming rate should be zero for rejected items (backport [#44857](https://github.com/frappe/erpnext/issues/44857)) ([#44859](https://github.com/frappe/erpnext/issues/44859)) ([0969877](https://github.com/frappe/erpnext/commit/0969877cd7c30d997f5f42de1d8a7197846d07de)) * incorrect Material Transferred for Manufacturing qty (backport [#44823](https://github.com/frappe/erpnext/issues/44823)) ([#44832](https://github.com/frappe/erpnext/issues/44832)) ([497029f](https://github.com/frappe/erpnext/commit/497029f958c0c7167422c32edbd50c080eeaff33)) * Ledger repost support for extending app doctypes ([d137f78](https://github.com/frappe/erpnext/commit/d137f780bd072f0baf18feef734157c90318674b)) * Paid + Write Off Amount issue in Sales Invoice (backport [#44763](https://github.com/frappe/erpnext/issues/44763)) ([#44874](https://github.com/frappe/erpnext/issues/44874)) ([ca7c229](https://github.com/frappe/erpnext/commit/ca7c229e863aefc8fcf9181513afa309b2c3fd25)) * permissions for marking Quotation as lost ([e6390bf](https://github.com/frappe/erpnext/commit/e6390bfba1dca8c961029564c40b5ae1ae37878e)) * POS Closing entry issue (backport [#44772](https://github.com/frappe/erpnext/issues/44772)) ([#44781](https://github.com/frappe/erpnext/issues/44781)) ([2032422](https://github.com/frappe/erpnext/commit/20324224d37e1554fcb958ee79b94e5257ac93c5)) * posting_time issue ([#44870](https://github.com/frappe/erpnext/issues/44870)) ([7a5c30f](https://github.com/frappe/erpnext/commit/7a5c30fe9b5e3833ffeba46cead6ba42a69c0add)) * Remove typo ([13a3c81](https://github.com/frappe/erpnext/commit/13a3c816d742fe2b95cfa889b38d45ee88ea0acf)) * set project in GL from the SLE (backport [#44879](https://github.com/frappe/erpnext/issues/44879)) ([#44885](https://github.com/frappe/erpnext/issues/44885)) ([57e6ed4](https://github.com/frappe/erpnext/commit/57e6ed464594eb096c3a5956874b4773fc3abe97)) * show profit and loss after period closing ([771632a](https://github.com/frappe/erpnext/commit/771632a5e2be9ac2981d951481267ea2244094dd)) * slow posting datetime update (backport [#44799](https://github.com/frappe/erpnext/issues/44799)) ([#44805](https://github.com/frappe/erpnext/issues/44805)) ([ad57e33](https://github.com/frappe/erpnext/commit/ad57e33cd7247c6b822469582e15939dd7a3e80b)) * stock entry not fetching expired batches (backport [#44863](https://github.com/frappe/erpnext/issues/44863)) ([#44868](https://github.com/frappe/erpnext/issues/44868)) ([d6001e5](https://github.com/frappe/erpnext/commit/d6001e5ef9b9fd05b3e534c25cc36f388f8e57ee)) * Stock Entry uses incorrect company when generated from Pick List ([#44679](https://github.com/frappe/erpnext/issues/44679)) ([58e8467](https://github.com/frappe/erpnext/commit/58e846709ec961d965c9b6bdaf5cec482b608305)) * Swedish tax templates ([cc1834b](https://github.com/frappe/erpnext/commit/cc1834b0ccb1c2f5ab1202d4d01aca58dfe56f01)) * test case correction ([ddfead2](https://github.com/frappe/erpnext/commit/ddfead2cde3a25c95bb1bff79680a41365ebf8de)) * typerror on TDS payable monthly report (backport [#37707](https://github.com/frappe/erpnext/issues/37707)) ([db9a319](https://github.com/frappe/erpnext/commit/db9a319104f2b1988a99e6f45bf555e1dcd79ca1)) * update correct cost center in Accounts Receivable Report ([4c5540a](https://github.com/frappe/erpnext/commit/4c5540aef9232d044b9a0bd3de278a3b04222230)) * update query ([3ab4acf](https://github.com/frappe/erpnext/commit/3ab4acfafaa79295b6c56d9c6a03ccfe78f2e9c0)) * use utility method to generate url ([75aee42](https://github.com/frappe/erpnext/commit/75aee42635f87c6a608b43ca7c11d56071965f07)) * **ux:** purchase invoice link in error message ([#44797](https://github.com/frappe/erpnext/issues/44797)) ([01c1ed9](https://github.com/frappe/erpnext/commit/01c1ed98ac3883620ed1c9ebc21eaaf6fd8e8f76)) * Warehouse wise Stock Value chart roles (backport [#44865](https://github.com/frappe/erpnext/issues/44865)) ([#44867](https://github.com/frappe/erpnext/issues/44867)) ([f32cf84](https://github.com/frappe/erpnext/commit/f32cf84413dc4466ad77a320667e296c1344b160)) ### Features * add difference_posting_date field ([bec1f97](https://github.com/frappe/erpnext/commit/bec1f972b36c33b76317fd286370834f71504797)) * **subcontracting:** Added provision to create multiple Subcontracting Orders against a single Purchase Order (backport [#44711](https://github.com/frappe/erpnext/issues/44711)) ([#44782](https://github.com/frappe/erpnext/issues/44782)) ([8f81172](https://github.com/frappe/erpnext/commit/8f811728d97293744bb35f6a3bdba889708127c5)) * swedish COA ([98cc79d](https://github.com/frappe/erpnext/commit/98cc79d9420b63773a1bf04db702d31a162a968c)) * use difference_posting_date for journal entry posting_date ([7498cdf](https://github.com/frappe/erpnext/commit/7498cdf644960525f09b07cc829a09f704a22b4b)) ### Performance Improvements * SABB (backport [#44764](https://github.com/frappe/erpnext/issues/44764)) ([#44789](https://github.com/frappe/erpnext/issues/44789)) ([b706a82](https://github.com/frappe/erpnext/commit/b706a8274f489f1d0b9ef160d771ecd38abadaf8)) * slow query related to stock ledger entry (backport [#44861](https://github.com/frappe/erpnext/issues/44861)) ([#44862](https://github.com/frappe/erpnext/issues/44862)) ([3f3df7e](https://github.com/frappe/erpnext/commit/3f3df7ef2a09d2ce9348b85448bc934eb5b49acf)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index f6dd799ba08..4458398bfff 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.46.2" +__version__ = "15.47.0" def get_default_company(user=None): From 9060e4ce57499b5aed335e3fc4b27cd27f452cef Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 26 Dec 2024 11:03:13 +0530 Subject: [PATCH 0746/1614] fix: allow zero valuation rate (backport #44902) (#44910) fix: allow zero valuation rate (#44902) (cherry picked from commit 614a8f106d0cc84f04cd44261d0e2d16a0cca536) Co-authored-by: rohitwaghchaure --- erpnext/stock/stock_ledger.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/stock_ledger.py b/erpnext/stock/stock_ledger.py index d11c19446bb..5aaf30c9889 100644 --- a/erpnext/stock/stock_ledger.py +++ b/erpnext/stock/stock_ledger.py @@ -937,7 +937,7 @@ class update_entries_after: # else it remains the same as that of previous entry self.wh_data.valuation_rate = new_stock_value / new_stock_qty - if not self.wh_data.valuation_rate and sle.voucher_detail_no: + if self.wh_data.valuation_rate is None and sle.voucher_detail_no: allow_zero_rate = self.check_if_allow_zero_valuation_rate(sle.voucher_type, sle.voucher_detail_no) if not allow_zero_rate: self.wh_data.valuation_rate = self.get_fallback_rate(sle) From 763951af277cd56427cc9569b516a42494ffa941 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 26 Dec 2024 11:30:55 +0530 Subject: [PATCH 0747/1614] fix: allow zero valuation rate (backport #44902) (backport #44910) (#44913) fix: allow zero valuation rate (backport #44902) (#44910) fix: allow zero valuation rate (#44902) (cherry picked from commit 614a8f106d0cc84f04cd44261d0e2d16a0cca536) Co-authored-by: rohitwaghchaure (cherry picked from commit 9060e4ce57499b5aed335e3fc4b27cd27f452cef) Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- erpnext/stock/stock_ledger.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/stock_ledger.py b/erpnext/stock/stock_ledger.py index d11c19446bb..5aaf30c9889 100644 --- a/erpnext/stock/stock_ledger.py +++ b/erpnext/stock/stock_ledger.py @@ -937,7 +937,7 @@ class update_entries_after: # else it remains the same as that of previous entry self.wh_data.valuation_rate = new_stock_value / new_stock_qty - if not self.wh_data.valuation_rate and sle.voucher_detail_no: + if self.wh_data.valuation_rate is None and sle.voucher_detail_no: allow_zero_rate = self.check_if_allow_zero_valuation_rate(sle.voucher_type, sle.voucher_detail_no) if not allow_zero_rate: self.wh_data.valuation_rate = self.get_fallback_rate(sle) From f25d65ecc40cfdedab4c6f7428dc7ae92d86944d Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Thu, 26 Dec 2024 06:02:20 +0000 Subject: [PATCH 0748/1614] chore(release): Bumped to Version 15.47.1 ## [15.47.1](https://github.com/frappe/erpnext/compare/v15.47.0...v15.47.1) (2024-12-26) ### Bug Fixes * allow zero valuation rate (backport [#44902](https://github.com/frappe/erpnext/issues/44902)) (backport [#44910](https://github.com/frappe/erpnext/issues/44910)) ([#44913](https://github.com/frappe/erpnext/issues/44913)) ([763951a](https://github.com/frappe/erpnext/commit/763951af277cd56427cc9569b516a42494ffa941)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 4458398bfff..5b93888b84e 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.47.0" +__version__ = "15.47.1" def get_default_company(user=None): From c24126226660889427bb169d5460e04fa5be7a45 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 26 Dec 2024 22:58:11 +0530 Subject: [PATCH 0749/1614] fix: not able to make purchase receipt from SCR (backport #44919) (#44925) * fix: not able to make purchase receipt from SCR (#44919) (cherry picked from commit ab1cca0c406445adf5c4d147e97f4e3a8011bbba) * chore: fix test case --------- Co-authored-by: rohitwaghchaure --- .../subcontracting_receipt.py | 29 ++++++++ .../test_subcontracting_receipt.py | 74 +++++++++++++++++++ 2 files changed, 103 insertions(+) diff --git a/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.py b/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.py index 37cd43ac1f6..300f7a774eb 100644 --- a/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.py +++ b/erpnext/subcontracting/doctype/subcontracting_receipt/subcontracting_receipt.py @@ -775,6 +775,9 @@ def make_purchase_receipt(source_name, target_doc=None, save=False, submit=False postprocess=post_process, ) + if not target_doc.get("items"): + add_po_items_to_pr(source_doc, target_doc) + if (save or submit) and frappe.has_permission(target_doc.doctype, "create"): target_doc.save() @@ -794,3 +797,29 @@ def make_purchase_receipt(source_name, target_doc=None, save=False, submit=False ) return target_doc + + +def add_po_items_to_pr(scr_doc, target_doc): + fg_items = {(item.item_code, item.purchase_order): item.qty for item in scr_doc.items} + + for (item_code, po_name), fg_qty in fg_items.items(): + po_doc = frappe.get_doc("Purchase Order", po_name) + for item in po_doc.items: + if item.fg_item != item_code: + continue + + qty = (item.stock_qty - item.received_qty) * fg_qty / item.fg_item_qty + if qty: + target_doc.append( + "items", + { + "item_code": item.item_code, + "item_name": item.item_name, + "description": item.description, + "qty": qty, + "rate": item.rate, + "warehouse": item.warehouse, + "purchase_order": item.parent, + "purchase_order_item": item.name, + }, + ) diff --git a/erpnext/subcontracting/doctype/subcontracting_receipt/test_subcontracting_receipt.py b/erpnext/subcontracting/doctype/subcontracting_receipt/test_subcontracting_receipt.py index e0fa7923ef9..b5d190f7736 100644 --- a/erpnext/subcontracting/doctype/subcontracting_receipt/test_subcontracting_receipt.py +++ b/erpnext/subcontracting/doctype/subcontracting_receipt/test_subcontracting_receipt.py @@ -1137,6 +1137,80 @@ class TestSubcontractingReceipt(FrappeTestCase): self.assertEqual(pr_details[0]["total_taxes_and_charges"], 60) + @change_settings("Buying Settings", {"auto_create_purchase_receipt": 1}) + def test_auto_create_purchase_receipt_with_no_reference_of_po_item(self): + from erpnext.buying.doctype.purchase_order.test_purchase_order import create_purchase_order + + fg_item = "Subcontracted Item SA1" + service_items = [ + { + "warehouse": "_Test Warehouse - _TC", + "item_code": "Subcontracted Service Item 1", + "qty": 10, + "rate": 100, + "fg_item": fg_item, + "fg_item_qty": 5, + }, + ] + + po = create_purchase_order( + rm_items=service_items, + is_subcontracted=1, + supplier_warehouse="_Test Warehouse 1 - _TC", + do_not_submit=True, + ) + po.append( + "taxes", + { + "account_head": "_Test Account Excise Duty - _TC", + "charge_type": "On Net Total", + "cost_center": "_Test Cost Center - _TC", + "description": "Excise Duty", + "doctype": "Purchase Taxes and Charges", + "rate": 10, + }, + ) + po.save() + po.submit() + + sco = get_subcontracting_order(po_name=po.name) + for row in sco.items: + row.db_set("purchase_order_item", None) + + sco.reload() + + for row in sco.items: + self.assertFalse(row.purchase_order_item) + + rm_items = get_rm_items(sco.supplied_items) + itemwise_details = make_stock_in_entry(rm_items=rm_items) + make_stock_transfer_entry( + sco_no=sco.name, + rm_items=rm_items, + itemwise_details=copy.deepcopy(itemwise_details), + ) + + scr = make_subcontracting_receipt(sco.name) + for row in scr.items: + self.assertFalse(row.purchase_order_item) + + scr.items[0].qty = 3 + scr.save() + scr.submit() + + pr_details = frappe.get_all( + "Purchase Receipt", + filters={"subcontracting_receipt": scr.name}, + fields=["name", "total_taxes_and_charges"], + ) + + self.assertTrue(pr_details) + + pr_qty = frappe.db.get_value("Purchase Receipt Item", {"parent": pr_details[0]["name"]}, "qty") + self.assertEqual(pr_qty, 6) + + self.assertEqual(pr_details[0]["total_taxes_and_charges"], 60) + def test_use_serial_batch_fields_for_subcontracting_receipt(self): fg_item = make_item( "Test Subcontracted Item With Batch No", From 042d12b2c14ab689d8676803bc6136f897f57932 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 26 Dec 2024 22:58:29 +0530 Subject: [PATCH 0750/1614] fix: material request status (backport #44917) (#44918) * fix: material request status (#44917) (cherry picked from commit 1319ce4bc1e8e77c9580b7b7dd68b5320f5186ff) * chore: fix test case --------- Co-authored-by: rohitwaghchaure --- erpnext/controllers/status_updater.py | 6 ++- .../material_request/material_request_list.js | 6 +++ .../material_request/test_material_request.py | 38 +++++++++++++++++++ 3 files changed, 49 insertions(+), 1 deletion(-) diff --git a/erpnext/controllers/status_updater.py b/erpnext/controllers/status_updater.py index e8aa6254d34..e1cd0a1c340 100644 --- a/erpnext/controllers/status_updater.py +++ b/erpnext/controllers/status_updater.py @@ -126,9 +126,13 @@ status_map = { "Partially Received", "eval:self.status != 'Stopped' and self.per_received > 0 and self.per_received < 100 and self.docstatus == 1 and self.material_request_type == 'Purchase'", ], + [ + "Partially Received", + "eval:self.status != 'Stopped' and self.per_ordered < 100 and self.per_ordered > 0 and self.docstatus == 1 and self.material_request_type == 'Material Transfer'", + ], [ "Partially Ordered", - "eval:self.status != 'Stopped' and self.per_ordered < 100 and self.per_ordered > 0 and self.docstatus == 1", + "eval:self.status != 'Stopped' and self.per_ordered < 100 and self.per_ordered > 0 and self.docstatus == 1 and self.material_request_type != 'Material Transfer'", ], [ "Manufactured", diff --git a/erpnext/stock/doctype/material_request/material_request_list.js b/erpnext/stock/doctype/material_request/material_request_list.js index ee5c9e7b86c..57332aa7730 100644 --- a/erpnext/stock/doctype/material_request/material_request_list.js +++ b/erpnext/stock/doctype/material_request/material_request_list.js @@ -14,6 +14,12 @@ frappe.listview_settings["Material Request"] = { } } else if (doc.docstatus == 1 && flt(doc.per_ordered, precision) == 0) { return [__("Pending"), "orange", "per_ordered,=,0"]; + } else if ( + doc.docstatus == 1 && + flt(doc.per_ordered, precision) < 100 && + doc.material_request_type == "Material Transfer" + ) { + return [__("Partially Received"), "yellow", "per_ordered,<,100"]; } else if (doc.docstatus == 1 && flt(doc.per_ordered, precision) < 100) { return [__("Partially ordered"), "yellow", "per_ordered,<,100"]; } else if (doc.docstatus == 1 && flt(doc.per_ordered, precision) == 100) { diff --git a/erpnext/stock/doctype/material_request/test_material_request.py b/erpnext/stock/doctype/material_request/test_material_request.py index 4d48d50c9f0..b0ea7964117 100644 --- a/erpnext/stock/doctype/material_request/test_material_request.py +++ b/erpnext/stock/doctype/material_request/test_material_request.py @@ -17,6 +17,7 @@ from erpnext.stock.doctype.material_request.material_request import ( make_supplier_quotation, raise_work_orders, ) +from erpnext.stock.doctype.warehouse.test_warehouse import create_warehouse class TestMaterialRequest(FrappeTestCase): @@ -59,6 +60,43 @@ class TestMaterialRequest(FrappeTestCase): self.assertEqual(se.doctype, "Stock Entry") self.assertEqual(len(se.get("items")), len(mr.get("items"))) + def test_partial_make_stock_entry(self): + from erpnext.stock.doctype.stock_entry.stock_entry_utils import make_stock_entry as _make_stock_entry + + mr = frappe.copy_doc(test_records[0]).insert() + + source_wh = create_warehouse( + warehouse_name="_Test Source Warehouse", + properties={"parent_warehouse": "All Warehouses - _TC"}, + company="_Test Company", + ) + + mr = frappe.get_doc("Material Request", mr.name) + mr.material_request_type = "Material Transfer" + + for row in mr.items: + _make_stock_entry( + item_code=row.item_code, + qty=10, + to_warehouse=source_wh, + company="_Test Company", + rate=100, + ) + + row.from_warehouse = source_wh + row.qty = 10 + + mr.save() + mr.submit() + + se = make_stock_entry(mr.name) + se.get("items")[0].qty = 5 + se.insert() + se.submit() + + mr.reload() + self.assertEqual(mr.status, "Partially Received") + def test_in_transit_make_stock_entry(self): mr = frappe.copy_doc(test_records[0]).insert() From 991a3366a8e19cd9ba4f52fe4e911167842b4786 Mon Sep 17 00:00:00 2001 From: mahsem <137205921+mahsem@users.noreply.github.com> Date: Sat, 21 Dec 2024 13:49:54 +0100 Subject: [PATCH 0751/1614] fix: relabel rate to tax rate (cherry picked from commit 1eb8b0ceef5b6b4bbbcfa599aa58d7bb4819b1a2) --- erpnext/accounts/doctype/account/account.json | 2 +- .../advance_taxes_and_charges/advance_taxes_and_charges.json | 2 +- .../pos_closing_entry_taxes/pos_closing_entry_taxes.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/account/account.json b/erpnext/accounts/doctype/account/account.json index 7b56444e635..5f906b54aaa 100644 --- a/erpnext/accounts/doctype/account/account.json +++ b/erpnext/accounts/doctype/account/account.json @@ -128,7 +128,7 @@ "description": "Rate at which this tax is applied", "fieldname": "tax_rate", "fieldtype": "Float", - "label": "Rate", + "label": "Tax Rate", "oldfieldname": "tax_rate", "oldfieldtype": "Currency" }, diff --git a/erpnext/accounts/doctype/advance_taxes_and_charges/advance_taxes_and_charges.json b/erpnext/accounts/doctype/advance_taxes_and_charges/advance_taxes_and_charges.json index 05b284ae16f..544f4fd6640 100644 --- a/erpnext/accounts/doctype/advance_taxes_and_charges/advance_taxes_and_charges.json +++ b/erpnext/accounts/doctype/advance_taxes_and_charges/advance_taxes_and_charges.json @@ -101,7 +101,7 @@ "fieldname": "rate", "fieldtype": "Float", "in_list_view": 1, - "label": "Rate", + "label": "Tax Rate", "oldfieldname": "rate", "oldfieldtype": "Currency" }, diff --git a/erpnext/accounts/doctype/pos_closing_entry_taxes/pos_closing_entry_taxes.json b/erpnext/accounts/doctype/pos_closing_entry_taxes/pos_closing_entry_taxes.json index 42e7d0ef965..7e3e9c259f1 100644 --- a/erpnext/accounts/doctype/pos_closing_entry_taxes/pos_closing_entry_taxes.json +++ b/erpnext/accounts/doctype/pos_closing_entry_taxes/pos_closing_entry_taxes.json @@ -14,7 +14,7 @@ "fieldname": "rate", "fieldtype": "Percent", "in_list_view": 1, - "label": "Rate", + "label": "Tax Rate", "read_only": 1 }, { From 5cc9e10923a1687bf5ee41e7036acd88de397f26 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 27 Dec 2024 11:24:57 +0530 Subject: [PATCH 0752/1614] fix: Show order tax amount in customer currency on the portal (backport #44915) (#44923) fix: Show order tax amount in customer currency on the portal (#44915) (cherry picked from commit b998933ef032f1fb2be78c0e9e4a3ba374db6b57) Co-authored-by: Nabin Hait --- erpnext/templates/includes/order/order_taxes.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/templates/includes/order/order_taxes.html b/erpnext/templates/includes/order/order_taxes.html index d7b9620fa0a..42f46ac8d12 100644 --- a/erpnext/templates/includes/order/order_taxes.html +++ b/erpnext/templates/includes/order/order_taxes.html @@ -12,14 +12,14 @@ {% endif %} {% for d in doc.taxes %} - {% if d.base_tax_amount %} + {% if d.tax_amount %}
{{ d.description }}
- {{ d.get_formatted("base_tax_amount") }} + {{ d.get_formatted("tax_amount") }}
From 488d8080c8cd416adcc3249c5f88e505436c805d Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 27 Dec 2024 11:33:09 +0530 Subject: [PATCH 0753/1614] fix: strings for translation (backport #44816) (#44927) * fix: strings for translation (cherry picked from commit 3be633f6f1446af09631b3ce2253696b146866c2) # Conflicts: # erpnext/accounts/utils.py * fix: resolved conflict --------- Co-authored-by: mahsem <137205921+mahsem@users.noreply.github.com> Co-authored-by: Nabin Hait --- .../item_wise_sales_register/item_wise_sales_register.py | 2 +- erpnext/accounts/utils.py | 2 +- .../exponential_smoothing_forecasting.py | 4 ++-- .../report/production_analytics/production_analytics.py | 2 +- .../public/js/bom_configurator/bom_configurator.bundle.js | 8 ++++---- .../stock/doctype/material_request/material_request.js | 2 +- erpnext/templates/includes/footer/footer_extension.html | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py b/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py index 604c0a6569d..f7a2e40b4ba 100644 --- a/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py +++ b/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py @@ -318,7 +318,7 @@ def get_columns(additional_table_columns, filters): "width": 100, }, { - "label": _("Rate"), + "label": _("Tax Rate"), "fieldname": "rate", "fieldtype": "Float", "options": "currency", diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py index 144039b794f..b3408a073af 100644 --- a/erpnext/accounts/utils.py +++ b/erpnext/accounts/utils.py @@ -130,7 +130,7 @@ def get_fiscal_years( else: return ((fy.name, fy.year_start_date, fy.year_end_date),) - error_msg = _("""{0} {1} is not in any active Fiscal Year""").format(label, formatdate(transaction_date)) + error_msg = _("""{0} {1} is not in any active Fiscal Year""").format(_(label), formatdate(transaction_date)) if company: error_msg = _("""{0} for {1}""").format(error_msg, frappe.bold(company)) diff --git a/erpnext/manufacturing/report/exponential_smoothing_forecasting/exponential_smoothing_forecasting.py b/erpnext/manufacturing/report/exponential_smoothing_forecasting/exponential_smoothing_forecasting.py index 0f5fa959dc5..6e66c9e539d 100644 --- a/erpnext/manufacturing/report/exponential_smoothing_forecasting/exponential_smoothing_forecasting.py +++ b/erpnext/manufacturing/report/exponential_smoothing_forecasting/exponential_smoothing_forecasting.py @@ -230,8 +230,8 @@ class ForecastingReport(ExponentialSmoothingForecast): "data": { "labels": labels, "datasets": [ - {"name": "Demand", "values": self.total_demand}, - {"name": "Forecast", "values": self.total_forecast}, + {"name": _("Demand"), "values": self.total_demand}, + {"name": _("Forecast"), "values": self.total_forecast}, ], }, "type": "line", diff --git a/erpnext/manufacturing/report/production_analytics/production_analytics.py b/erpnext/manufacturing/report/production_analytics/production_analytics.py index dc2b9ad62f3..e511612d3a3 100644 --- a/erpnext/manufacturing/report/production_analytics/production_analytics.py +++ b/erpnext/manufacturing/report/production_analytics/production_analytics.py @@ -106,7 +106,7 @@ def get_data(filters, columns): for label in labels: work = {} - work["Status"] = label + work["Status"] = _(label) for _dummy, end_date in ranges: period = get_period(end_date, filters) if periodic_data.get(label).get(period): diff --git a/erpnext/public/js/bom_configurator/bom_configurator.bundle.js b/erpnext/public/js/bom_configurator/bom_configurator.bundle.js index 21aa70fe7ae..b1019f67ca9 100644 --- a/erpnext/public/js/bom_configurator/bom_configurator.bundle.js +++ b/erpnext/public/js/bom_configurator/bom_configurator.bundle.js @@ -147,10 +147,10 @@ class BOMConfigurator { if (!node.expanded) { view.tree.load_children(node, true); $(node.parent[0]).find(".tree-children").show(); - node.$toolbar.find(".expand-all-btn").html("Collapse All"); + node.$toolbar.find(".expand-all-btn").html(__("Collapse All")); } else { node.$tree_link.trigger("click"); - node.$toolbar.find(".expand-all-btn").html("Expand All"); + node.$toolbar.find(".expand-all-btn").html(__("Expand All")); } }, condition: function (node) { @@ -190,10 +190,10 @@ class BOMConfigurator { if (!node.expanded) { view.tree.load_children(node, true); $(node.parent[0]).find(".tree-children").show(); - node.$toolbar.find(".expand-all-btn").html("Collapse All"); + node.$toolbar.find(".expand-all-btn").html(__("Collapse All")); } else { node.$tree_link.trigger("click"); - node.$toolbar.find(".expand-all-btn").html("Expand All"); + node.$toolbar.find(".expand-all-btn").html(__("Expand All")); } }, condition: function (node) { diff --git a/erpnext/stock/doctype/material_request/material_request.js b/erpnext/stock/doctype/material_request/material_request.js index 09c01a0ee88..83b63e225b3 100644 --- a/erpnext/stock/doctype/material_request/material_request.js +++ b/erpnext/stock/doctype/material_request/material_request.js @@ -322,7 +322,7 @@ frappe.ui.form.on("Material Request", { default: 1, }, ], - primary_action_label: "Get Items", + primary_action_label: __("Get Items"), primary_action(values) { if (!values) return; values["company"] = frm.doc.company; diff --git a/erpnext/templates/includes/footer/footer_extension.html b/erpnext/templates/includes/footer/footer_extension.html index 0072dc280c7..11e0adaa2ee 100644 --- a/erpnext/templates/includes/footer/footer_extension.html +++ b/erpnext/templates/includes/footer/footer_extension.html @@ -17,7 +17,7 @@ frappe.ready(function() { if($("#footer-subscribe-email").val() && validate_email($("#footer-subscribe-email").val())) { $("#footer-subscribe-email").attr('disabled', true); - $("#footer-subscribe-button").html("Sending...") + $("#footer-subscribe-button").html(__("Sending...")) .attr("disabled", true); erpnext.subscribe_to_newsletter({ email: $("#footer-subscribe-email").val(), From 6cc70605fa4d4b61b329a323aec49b6005ad7af4 Mon Sep 17 00:00:00 2001 From: Sanket322 Date: Tue, 24 Dec 2024 16:38:51 +0530 Subject: [PATCH 0754/1614] fix: clear payment schedule in purchase invoice for is_paid (cherry picked from commit e1fc239f3d6e737d1acf022db274fedf4a396af0) --- .../doctype/purchase_invoice/purchase_invoice.js | 2 ++ erpnext/controllers/accounts_controller.py | 14 ++++++-------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js index be429689b5a..dd8758e68a3 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js @@ -399,6 +399,8 @@ erpnext.accounts.PurchaseInvoice = class PurchaseInvoice extends erpnext.buying. hide_fields(this.frm.doc); if (cint(this.frm.doc.is_paid)) { this.frm.set_value("allocate_advances_automatically", 0); + this.frm.set_value("payment_terms_template", ""); + this.frm.set_value("payment_schedule", []); if (!this.frm.doc.company) { this.frm.set_value("is_paid", 0); frappe.msgprint(__("Please specify Company to proceed")); diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 20b5885bfdc..c09475db9bd 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -464,10 +464,14 @@ class AccountsController(TransactionBase): ) def validate_invoice_documents_schedule(self): - if self.is_return: + if ( + self.is_return + or (self.doctype == "Purchase Invoice" and self.is_paid) + or (self.doctype == "Sales Invoice" and self.is_pos) + or self.get("is_opening") == "Yes" + ): self.payment_terms_template = "" self.payment_schedule = [] - return self.validate_payment_schedule_dates() self.set_due_date() @@ -2342,9 +2346,6 @@ class AccountsController(TransactionBase): dates = [] li = [] - if self.doctype == "Sales Invoice" and self.is_pos: - return - for d in self.get("payment_schedule"): if self.doctype == "Sales Order" and getdate(d.due_date) < getdate(self.transaction_date): frappe.throw( @@ -2361,9 +2362,6 @@ class AccountsController(TransactionBase): frappe.throw(_("Rows with duplicate due dates in other rows were found: {0}").format(duplicates)) def validate_payment_schedule_amount(self): - if (self.doctype == "Sales Invoice" and self.is_pos) or self.get("is_opening") == "Yes": - return - party_account_currency = self.get("party_account_currency") if not party_account_currency: party_type, party = self.get_party() From 508435ac9feb2ca429430766bfea5cafa916378e Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Fri, 27 Dec 2024 12:48:25 +0530 Subject: [PATCH 0755/1614] refactor: early return is always better validate_advance_entries() has a heavy IO bound operation. Early return on unwanted cases is always better. (cherry picked from commit 0589fa7f3efcc826d856be71c20c7ad684f1c822) --- erpnext/controllers/accounts_controller.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index c09475db9bd..d87a11f79f4 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -473,6 +473,9 @@ class AccountsController(TransactionBase): self.payment_terms_template = "" self.payment_schedule = [] + if self.is_return: + return + self.validate_payment_schedule_dates() self.set_due_date() self.set_payment_schedule() @@ -2346,6 +2349,9 @@ class AccountsController(TransactionBase): dates = [] li = [] + if self.doctype == "Sales Invoice" and self.is_pos: + return + for d in self.get("payment_schedule"): if self.doctype == "Sales Order" and getdate(d.due_date) < getdate(self.transaction_date): frappe.throw( @@ -2362,6 +2368,9 @@ class AccountsController(TransactionBase): frappe.throw(_("Rows with duplicate due dates in other rows were found: {0}").format(duplicates)) def validate_payment_schedule_amount(self): + if (self.doctype == "Sales Invoice" and self.is_pos) or self.get("is_opening") == "Yes": + return + party_account_currency = self.get("party_account_currency") if not party_account_currency: party_type, party = self.get_party() From 6c206c1cb324133195913b5b00cf1a88858dd162 Mon Sep 17 00:00:00 2001 From: Sanket322 Date: Wed, 25 Dec 2024 15:22:53 +0530 Subject: [PATCH 0756/1614] fix: ignore duplicate while creating default templates (cherry picked from commit 9368485594f3f42f201be768aa2c79a21ad72a5d) --- erpnext/setup/setup_wizard/operations/taxes_setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/setup/setup_wizard/operations/taxes_setup.py b/erpnext/setup/setup_wizard/operations/taxes_setup.py index 6561f386c55..f8cd61d50ea 100644 --- a/erpnext/setup/setup_wizard/operations/taxes_setup.py +++ b/erpnext/setup/setup_wizard/operations/taxes_setup.py @@ -292,7 +292,7 @@ def get_or_create_tax_group(company_name, root_type): tax_group_account.flags.ignore_links = True tax_group_account.flags.ignore_validate = True - tax_group_account.insert(ignore_permissions=True) + tax_group_account.insert(ignore_permissions=True, ignore_if_duplicate=True) tax_group_name = tax_group_account.name From 2f279a6eb417af7d43608fc699fe64ae1c9aaae3 Mon Sep 17 00:00:00 2001 From: Navin R C <40256832+navinrc@users.noreply.github.com> Date: Fri, 13 Dec 2024 15:49:38 +0530 Subject: [PATCH 0757/1614] fix: SQL syntax error in Purchase Receipt query for empty filters (#44636) fix(po-analysis): handle SQL error due to empty data in IN() clause Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> (cherry picked from commit 48b49cdea43684b56307e7a353e5bf77e8c32013) --- .../purchase_order_analysis/purchase_order_analysis.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.py b/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.py index 6d2034d1878..75658e28780 100644 --- a/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.py +++ b/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.py @@ -103,6 +103,11 @@ def get_received_amount_data(data): pr = frappe.qb.DocType("Purchase Receipt") pr_item = frappe.qb.DocType("Purchase Receipt Item") + po_items = [row.name for row in data] + + if not po_items: + return frappe._dict() + query = ( frappe.qb.from_(pr) .inner_join(pr_item) @@ -111,12 +116,10 @@ def get_received_amount_data(data): pr_item.purchase_order_item, Sum(pr_item.base_amount).as_("received_qty_amount"), ) - .where((pr_item.parent == pr.name) & (pr.docstatus == 1)) + .where((pr.docstatus == 1) & (pr_item.purchase_order_item.isin(po_items))) .groupby(pr_item.purchase_order_item) ) - query = query.where(pr_item.purchase_order_item.isin([row.name for row in data])) - data = query.run() if not data: From f83112520d4cfd9d8ddcd6d102765b5187659e2f Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 30 Dec 2024 11:01:55 +0530 Subject: [PATCH 0758/1614] refactor(test): make manufacturing test idempotent (cherry picked from commit f3be246df36e3e5295db3e3794c87c8dafe8c0fc) --- erpnext/manufacturing/report/test_reports.py | 102 ++++++++++--------- 1 file changed, 54 insertions(+), 48 deletions(-) diff --git a/erpnext/manufacturing/report/test_reports.py b/erpnext/manufacturing/report/test_reports.py index 3e20f310ff9..f9c3154a63b 100644 --- a/erpnext/manufacturing/report/test_reports.py +++ b/erpnext/manufacturing/report/test_reports.py @@ -4,61 +4,67 @@ import frappe from erpnext.tests.utils import ReportFilters, ReportName, execute_script_report -DEFAULT_FILTERS = { - "company": "_Test Company", - "from_date": "2010-01-01", - "to_date": "2030-01-01", - "warehouse": "_Test Warehouse - _TC", -} - - -REPORT_FILTER_TEST_CASES: list[tuple[ReportName, ReportFilters]] = [ - ("BOM Explorer", {"bom": frappe.get_last_doc("BOM").name}), - ("BOM Operations Time", {}), - ("BOM Stock Calculated", {"bom": frappe.get_last_doc("BOM").name, "qty_to_make": 2}), - ("BOM Stock Report", {"bom": frappe.get_last_doc("BOM").name, "qty_to_produce": 2}), - ("Cost of Poor Quality Report", {"item": "_Test Item", "serial_no": "00"}), - ("Downtime Analysis", {}), - ( - "Exponential Smoothing Forecasting", - { - "based_on_document": "Sales Order", - "based_on_field": "Qty", - "no_of_years": 3, - "periodicity": "Yearly", - "smoothing_constant": 0.3, - }, - ), - ("Job Card Summary", {"fiscal_year": "2021-2022"}), - ("Production Analytics", {"range": "Monthly"}), - ("Quality Inspection Summary", {}), - ("Process Loss Report", {}), - ("Work Order Stock Report", {}), - ("Work Order Summary", {"fiscal_year": "2021-2022", "age": 0}), -] - - -if frappe.db.a_row_exists("Production Plan"): - REPORT_FILTER_TEST_CASES.append( - ("Production Plan Summary", {"production_plan": frappe.get_last_doc("Production Plan").name}) - ) - -OPTIONAL_FILTERS = { - "warehouse": "_Test Warehouse - _TC", - "item": "_Test Item", - "item_group": "_Test Item Group", -} - class TestManufacturingReports(unittest.TestCase): + def setUp(self): + self.setup_default_filters() + + def tearDown(self): + frappe.db.rollback() + + def setup_default_filters(self): + self.last_bom = frappe.get_last_doc("BOM").name + self.DEFAULT_FILTERS = { + "company": "_Test Company", + "from_date": "2010-01-01", + "to_date": "2030-01-01", + "warehouse": "_Test Warehouse - _TC", + } + + self.REPORT_FILTER_TEST_CASES: list[tuple[ReportName, ReportFilters]] = [ + ("BOM Explorer", {"bom": self.last_bom}), + ("BOM Operations Time", {}), + ("BOM Stock Calculated", {"bom": self.last_bom, "qty_to_make": 2}), + ("BOM Stock Report", {"bom": self.last_bom, "qty_to_produce": 2}), + ("Cost of Poor Quality Report", {"item": "_Test Item", "serial_no": "00"}), + ("Downtime Analysis", {}), + ( + "Exponential Smoothing Forecasting", + { + "based_on_document": "Sales Order", + "based_on_field": "Qty", + "no_of_years": 3, + "periodicity": "Yearly", + "smoothing_constant": 0.3, + }, + ), + ("Job Card Summary", {"fiscal_year": "2021-2022"}), + ("Production Analytics", {"range": "Monthly"}), + ("Quality Inspection Summary", {}), + ("Process Loss Report", {}), + ("Work Order Stock Report", {}), + ("Work Order Summary", {"fiscal_year": "2021-2022", "age": 0}), + ] + + if frappe.db.a_row_exists("Production Plan"): + self.REPORT_FILTER_TEST_CASES.append( + ("Production Plan Summary", {"production_plan": frappe.get_last_doc("Production Plan").name}) + ) + + self.OPTIONAL_FILTERS = { + "warehouse": "_Test Warehouse - _TC", + "item": "_Test Item", + "item_group": "_Test Item Group", + } + def test_execute_all_manufacturing_reports(self): """Test that all script report in manufacturing modules are executable with supported filters""" - for report, filter in REPORT_FILTER_TEST_CASES: + for report, filter in self.REPORT_FILTER_TEST_CASES: with self.subTest(report=report): execute_script_report( report_name=report, module="Manufacturing", filters=filter, - default_filters=DEFAULT_FILTERS, - optional_filters=OPTIONAL_FILTERS if filter.get("_optional") else None, + default_filters=self.DEFAULT_FILTERS, + optional_filters=self.OPTIONAL_FILTERS if filter.get("_optional") else None, ) From a11f7d5a8267d7cdace91eae159e74f4391eb9c4 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 30 Dec 2024 12:18:09 +0530 Subject: [PATCH 0759/1614] chore: fix linter --- erpnext/accounts/utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py index b3408a073af..51b4ed248ce 100644 --- a/erpnext/accounts/utils.py +++ b/erpnext/accounts/utils.py @@ -130,7 +130,9 @@ def get_fiscal_years( else: return ((fy.name, fy.year_start_date, fy.year_end_date),) - error_msg = _("""{0} {1} is not in any active Fiscal Year""").format(_(label), formatdate(transaction_date)) + error_msg = _("""{0} {1} is not in any active Fiscal Year""").format( + _(label), formatdate(transaction_date) + ) if company: error_msg = _("""{0} for {1}""").format(error_msg, frappe.bold(company)) From cfa432dbcae7c5bfec6ec8be83229211de9c639c Mon Sep 17 00:00:00 2001 From: Sanket322 Date: Wed, 25 Dec 2024 18:14:10 +0530 Subject: [PATCH 0760/1614] fix: set/update billing address on change of company (cherry picked from commit 0adfebee85c58bf0585b259f28f803ad852af182) --- .../accounts/doctype/purchase_invoice/purchase_invoice.js | 8 ++++++++ erpnext/public/js/controllers/transaction.js | 1 - 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js index dd8758e68a3..4a96c3a84e1 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js @@ -719,6 +719,14 @@ frappe.ui.form.on("Purchase Invoice", { if (response) frm.set_value("credit_to", response.message); }, }); + + frappe.call({ + method: "erpnext.setup.doctype.company.company.get_default_company_address", + args: { name: frm.doc.company }, + callback: (r) => { + frm.set_value("billing_address", r.message || ""); + }, + }); } }, }); diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 18cddd7f7a1..4e573234bb1 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -959,7 +959,6 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe let is_drop_ship = me.frm.doc.items.some(item => item.delivered_by_supplier); if (!is_drop_ship) { - console.log('get_shipping_address'); erpnext.utils.get_shipping_address(this.frm, function() { set_party_account(set_pricing); }); From 98631eb266889a309961747ee3a2c583aa7c8a63 Mon Sep 17 00:00:00 2001 From: Sanket322 Date: Fri, 27 Dec 2024 12:35:36 +0530 Subject: [PATCH 0761/1614] fix: move code from purchase invoice to buying controller (cherry picked from commit cb197fd01f9bd7535dc1dd0a5f8e259e03f13fd5) --- .../doctype/purchase_invoice/purchase_invoice.js | 8 -------- erpnext/public/js/controllers/buying.js | 12 ++++++++++++ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js index 4a96c3a84e1..dd8758e68a3 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js @@ -719,14 +719,6 @@ frappe.ui.form.on("Purchase Invoice", { if (response) frm.set_value("credit_to", response.message); }, }); - - frappe.call({ - method: "erpnext.setup.doctype.company.company.get_default_company_address", - args: { name: frm.doc.company }, - callback: (r) => { - frm.set_value("billing_address", r.message || ""); - }, - }); } }, }); diff --git a/erpnext/public/js/controllers/buying.js b/erpnext/public/js/controllers/buying.js index 202efe157f0..c2c86fca960 100644 --- a/erpnext/public/js/controllers/buying.js +++ b/erpnext/public/js/controllers/buying.js @@ -145,6 +145,18 @@ erpnext.buying = { }); } + company(){ + if(this.frm.doc.doctype == "Material Request") return; + + frappe.call({ + method: "erpnext.setup.doctype.company.company.get_default_company_address", + args: { name: this.frm.doc.company, existing_address:this.frm.doc.billing_address }, + callback: (r) => { + this.frm.set_value("billing_address", r.message || ""); + }, + }); + } + supplier_address() { erpnext.utils.get_address_display(this.frm); erpnext.utils.set_taxes_from_address(this.frm, "supplier_address", "supplier_address", "supplier_address"); From e582ff862e09fdcf024f1df64fbd48945a90002f Mon Sep 17 00:00:00 2001 From: Sanket322 Date: Fri, 27 Dec 2024 12:53:41 +0530 Subject: [PATCH 0762/1614] fix: use meta to check field instead of doctype (cherry picked from commit 187c74ae0928de27d91cd453fc11a97d4797fbba) --- erpnext/public/js/controllers/buying.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/public/js/controllers/buying.js b/erpnext/public/js/controllers/buying.js index c2c86fca960..5a8b63f601f 100644 --- a/erpnext/public/js/controllers/buying.js +++ b/erpnext/public/js/controllers/buying.js @@ -146,7 +146,7 @@ erpnext.buying = { } company(){ - if(this.frm.doc.doctype == "Material Request") return; + if(!frappe.meta.has_field(this.frm.doc.doctype, "billing_address")) return; frappe.call({ method: "erpnext.setup.doctype.company.company.get_default_company_address", From 2feeebb5fbe7972b8b638d65b54f441e5cc16b27 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Thu, 26 Dec 2024 17:18:39 +0530 Subject: [PATCH 0763/1614] fix: get item tax template based on posting date (cherry picked from commit 976e35d5472c1c8cae2b3f3a28dd4487e8ac577e) --- 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 d5d492a2c93..17a8fe2cb6a 100644 --- a/erpnext/stock/get_item_details.py +++ b/erpnext/stock/get_item_details.py @@ -592,7 +592,10 @@ def _get_item_tax_template(args, taxes, out=None, for_validate=False): if tax.valid_from or tax.maximum_net_rate: # In purchase Invoice first preference will be given to supplier invoice date # if supplier date is not present then posting date - validation_date = args.get("bill_date") or args.get("transaction_date") + + validation_date = ( + args.get("bill_date") or args.get("posting_date") or args.get("transaction_date") + ) if getdate(tax.valid_from) <= getdate(validation_date) and is_within_valid_range(args, tax): taxes_with_validity.append(tax) From 7dd2b0c189f2fd0d0c3ab62dc4554dc53521df73 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 30 Dec 2024 13:56:55 +0530 Subject: [PATCH 0764/1614] fix: pos payment using non-default mode of payment (backport #44920) (#44971) fix: pos payment using non-default mode of payment (#44920) * fix: pos payment using non-default mode of payment (#41108) * fix: included css syntax * refactor: created a function to sanitize the class name * refactor: reusing method to sanitize class name * refactor: function rename (cherry picked from commit 98cbb7e900237d6985d97e266e7486a55dea9cc8) Co-authored-by: Diptanil Saha --- .../selling/page/point_of_sale/pos_payment.js | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/erpnext/selling/page/point_of_sale/pos_payment.js b/erpnext/selling/page/point_of_sale/pos_payment.js index bea1918fa20..92349d27aca 100644 --- a/erpnext/selling/page/point_of_sale/pos_payment.js +++ b/erpnext/selling/page/point_of_sale/pos_payment.js @@ -235,7 +235,7 @@ erpnext.PointOfSale.Payment = class { frappe.ui.form.on("Sales Invoice Payment", "amount", (frm, cdt, cdn) => { // for setting correct amount after loyalty points are redeemed const default_mop = locals[cdt][cdn]; - const mode = default_mop.mode_of_payment.replace(/ +/g, "_").toLowerCase(); + const mode = this.sanitize_mode_of_payment(default_mop.mode_of_payment); if (this[`${mode}_control`] && this[`${mode}_control`].get_value() != default_mop.amount) { this[`${mode}_control`].set_value(default_mop.amount); } @@ -388,7 +388,7 @@ erpnext.PointOfSale.Payment = class { this.$payment_modes.html( `${payments .map((p, i) => { - const mode = p.mode_of_payment.replace(/ +/g, "_").toLowerCase(); + const mode = this.sanitize_mode_of_payment(p.mode_of_payment); const payment_type = p.type; const margin = i % 2 === 0 ? "pr-2" : "pl-2"; const amount = p.amount > 0 ? format_currency(p.amount, currency) : ""; @@ -407,7 +407,7 @@ erpnext.PointOfSale.Payment = class { ); payments.forEach((p) => { - const mode = p.mode_of_payment.replace(/ +/g, "_").toLowerCase(); + const mode = this.sanitize_mode_of_payment(p.mode_of_payment); const me = this; this[`${mode}_control`] = frappe.ui.form.make_control({ df: { @@ -442,7 +442,7 @@ erpnext.PointOfSale.Payment = class { const doc = this.events.get_frm().doc; const payments = doc.payments; payments.forEach((p) => { - const mode = p.mode_of_payment.replace(/ +/g, "_").toLowerCase(); + const mode = this.sanitize_mode_of_payment(p.mode_of_payment); if (p.default) { setTimeout(() => { this.$payment_modes.find(`.${mode}.mode-of-payment-control`).parent().click(); @@ -612,4 +612,12 @@ erpnext.PointOfSale.Payment = class { toggle_component(show) { show ? this.$component.css("display", "flex") : this.$component.css("display", "none"); } + + sanitize_mode_of_payment(mode_of_payment) { + return mode_of_payment + .replace(/ +/g, "_") + .replace(/[^\p{L}\p{N}_-]/gu, "") + .replace(/^[^_a-zA-Z\p{L}]+/u, "") + .toLowerCase(); + } }; From 40f46b76fa748417bb4fe03a88e54b01eb0ab739 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 30 Dec 2024 13:58:58 +0530 Subject: [PATCH 0765/1614] fix (pos closing entry): validation for 100 pc discount on pos invoice (backport #44899) (#44930) fix (pos closing entry): validation for 100 pc discount on pos invoice (#44899) (cherry picked from commit cfcc24a3415f6a88b0c1988ad12a5cf2158ab8d9) Co-authored-by: Diptanil Saha <50792171+diptanilsaha@users.noreply.github.com> --- erpnext/accounts/doctype/sales_invoice/sales_invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index dc2b44e7527..cb501c1ffbc 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -507,7 +507,7 @@ class SalesInvoice(SellingController): frappe.throw(_("Total payments amount can't be greater than {}").format(-invoice_total)) def validate_pos_paid_amount(self): - if len(self.payments) == 0 and self.is_pos: + if len(self.payments) == 0 and self.is_pos and flt(self.grand_total) > 0: frappe.throw(_("At least one mode of payment is required for POS invoice.")) def check_if_consolidated_invoice(self): From cc827c8077bd0f358ee23c01e92c2ef168c4b4d8 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 30 Dec 2024 13:59:42 +0530 Subject: [PATCH 0766/1614] fix: fetch advance payment entries on pos invoice (backport #44856) (#44931) fix: fetch advance payment entries on pos invoice (cherry picked from commit a7078e5702aa620e577b51d6062c6908153f2b11) Co-authored-by: Diptanil Saha --- erpnext/controllers/accounts_controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index d87a11f79f4..f9c875477b9 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -1226,7 +1226,7 @@ class AccountsController(TransactionBase): party_account = [] default_advance_account = None - if self.doctype == "Sales Invoice": + if self.doctype in ["Sales Invoice", "POS Invoice"]: party_type = "Customer" party = self.customer amount_field = "credit_in_account_currency" From 28442f34148adcc2cf0b9a301c490a071ec791e5 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 30 Dec 2024 14:00:08 +0530 Subject: [PATCH 0767/1614] fix: limit discount value to 100 in pos cart (backport #44916) (#44932) fix: limit discount value to 100 in pos cart (#44916) * fix: limit discount value to 100 in pos cart * fix: error message on invalid discount (cherry picked from commit ac26622d6e403b956a11f449488b444ef3e65554) Co-authored-by: Diptanil Saha <50792171+diptanilsaha@users.noreply.github.com> --- erpnext/selling/page/point_of_sale/pos_item_cart.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/erpnext/selling/page/point_of_sale/pos_item_cart.js b/erpnext/selling/page/point_of_sale/pos_item_cart.js index 6342b237f6e..325f7b258a9 100644 --- a/erpnext/selling/page/point_of_sale/pos_item_cart.js +++ b/erpnext/selling/page/point_of_sale/pos_item_cart.js @@ -390,6 +390,14 @@ erpnext.PointOfSale.ItemCart = class { input_class: "input-xs", onchange: function () { this.value = flt(this.value); + if (this.value > 100) { + frappe.msgprint({ + title: __("Invalid Discount"), + indicator: "red", + message: __("Discount cannot be greater than 100%."), + }); + this.value = 0; + } frappe.model.set_value( frm.doc.doctype, frm.doc.name, From 583182180a25c94ae4d3ee2eca4db8cad726af6a Mon Sep 17 00:00:00 2001 From: Himanshu Shivhare Date: Thu, 5 Dec 2024 15:46:46 +0530 Subject: [PATCH 0768/1614] refactor: Order Number and Order Date fields to Blanket Order (cherry picked from commit 5a284df51dd171e7c6e62a7257dc456ee754c573) # Conflicts: # erpnext/manufacturing/doctype/blanket_order/blanket_order.json --- .../doctype/blanket_order/blanket_order.json | 18 ++++++++++++++++++ .../doctype/blanket_order/blanket_order.py | 2 ++ 2 files changed, 20 insertions(+) diff --git a/erpnext/manufacturing/doctype/blanket_order/blanket_order.json b/erpnext/manufacturing/doctype/blanket_order/blanket_order.json index a63fc4da69a..38f5a5e8276 100644 --- a/erpnext/manufacturing/doctype/blanket_order/blanket_order.json +++ b/erpnext/manufacturing/doctype/blanket_order/blanket_order.json @@ -13,6 +13,8 @@ "supplier", "supplier_name", "column_break_8", + "order_no", + "order_date", "from_date", "to_date", "company", @@ -129,15 +131,31 @@ "fieldname": "terms", "fieldtype": "Text Editor", "label": "Terms and Conditions Details" + }, + { + "fieldname": "order_no", + "fieldtype": "Data", + "label": "Order No" + }, + { + "depends_on": "eval:doc.order_no", + "fieldname": "order_date", + "fieldtype": "Date", + "label": "Order Date" } ], "index_web_pages_for_search": 1, "is_submittable": 1, "links": [], +<<<<<<< HEAD "modified": "2021-06-29 00:30:30.621636", +======= + "modified": "2024-12-05 15:44:21.520093", +>>>>>>> 5a284df51d (refactor: Order Number and Order Date fields to Blanket Order) "modified_by": "Administrator", "module": "Manufacturing", "name": "Blanket Order", + "naming_rule": "By \"Naming Series\" field", "owner": "Administrator", "permissions": [ { diff --git a/erpnext/manufacturing/doctype/blanket_order/blanket_order.py b/erpnext/manufacturing/doctype/blanket_order/blanket_order.py index 5ecf9d3a9d6..26fce935abb 100644 --- a/erpnext/manufacturing/doctype/blanket_order/blanket_order.py +++ b/erpnext/manufacturing/doctype/blanket_order/blanket_order.py @@ -31,6 +31,8 @@ class BlanketOrder(Document): from_date: DF.Date items: DF.Table[BlanketOrderItem] naming_series: DF.Literal["MFG-BLR-.YYYY.-"] + order_date: DF.Date | None + order_no: DF.Data | None supplier: DF.Link | None supplier_name: DF.Data | None tc_name: DF.Link | None From 7b907424095b38fab9db9902b9d8424d08ee36d6 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 30 Dec 2024 14:50:23 +0530 Subject: [PATCH 0769/1614] chore: resolve conflict --- .../manufacturing/doctype/blanket_order/blanket_order.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/erpnext/manufacturing/doctype/blanket_order/blanket_order.json b/erpnext/manufacturing/doctype/blanket_order/blanket_order.json index 38f5a5e8276..0e2e7273f10 100644 --- a/erpnext/manufacturing/doctype/blanket_order/blanket_order.json +++ b/erpnext/manufacturing/doctype/blanket_order/blanket_order.json @@ -147,11 +147,7 @@ "index_web_pages_for_search": 1, "is_submittable": 1, "links": [], -<<<<<<< HEAD - "modified": "2021-06-29 00:30:30.621636", -======= "modified": "2024-12-05 15:44:21.520093", ->>>>>>> 5a284df51d (refactor: Order Number and Order Date fields to Blanket Order) "modified_by": "Administrator", "module": "Manufacturing", "name": "Blanket Order", From c19725ca74c5a891c08f4f4861794cb2ebea8aa0 Mon Sep 17 00:00:00 2001 From: DHINESH00 <18csa09@karpagamtech.ac.in> Date: Wed, 18 Dec 2024 10:51:04 +0530 Subject: [PATCH 0770/1614] fix: apply discount on qty change (cherry picked from commit 352b82bc0b51dbef98a686348bc346252a8e8b19) --- erpnext/selling/page/point_of_sale/pos_item_details.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/erpnext/selling/page/point_of_sale/pos_item_details.js b/erpnext/selling/page/point_of_sale/pos_item_details.js index ad4b4cd15be..2c93a0d546b 100644 --- a/erpnext/selling/page/point_of_sale/pos_item_details.js +++ b/erpnext/selling/page/point_of_sale/pos_item_details.js @@ -315,8 +315,12 @@ erpnext.PointOfSale.ItemDetails = class { frappe.model.on("POS Invoice Item", "*", (fieldname, value, item_row) => { const field_control = this[`${fieldname}_control`]; const item_row_is_being_edited = this.compare_with_current_item(item_row); - - if (item_row_is_being_edited && field_control && field_control.get_value() !== value) { + if ( + item_row_is_being_edited && + field_control && + field_control.get_value() !== value && + value == item_row[fieldname] + ) { field_control.set_value(value); cur_pos.update_cart_html(item_row); } From d550b433c1e3f32c0c8efee0be026b174511c8f6 Mon Sep 17 00:00:00 2001 From: venkat102 Date: Mon, 30 Dec 2024 14:18:13 +0530 Subject: [PATCH 0771/1614] fix: add company filter to project (cherry picked from commit 1a7b09e576ae47a654606b286d632b26f80fda59) --- .../accounts/doctype/payment_entry/payment_entry.js | 12 ++++++++++++ erpnext/public/js/controllers/buying.js | 8 ++++++++ 2 files changed, 20 insertions(+) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.js b/erpnext/accounts/doctype/payment_entry/payment_entry.js index 8fd5f00b583..4a45007d50a 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.js +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.js @@ -27,6 +27,18 @@ frappe.ui.form.on("Payment Entry", { erpnext.accounts.dimensions.setup_dimension_filters(frm, frm.doctype); + // project excluded in setup_dimension_filters + frm.set_query("project", function (doc) { + let filters = { + company: doc.company, + }; + if (doc.party_type == "Customer") filters.customer = doc.party; + return { + query: "erpnext.controllers.queries.get_project_name", + filters, + }; + }); + if (frm.is_new()) { set_default_party_type(frm); } diff --git a/erpnext/public/js/controllers/buying.js b/erpnext/public/js/controllers/buying.js index 5a8b63f601f..af61d5f0258 100644 --- a/erpnext/public/js/controllers/buying.js +++ b/erpnext/public/js/controllers/buying.js @@ -25,6 +25,14 @@ erpnext.buying = { }; }); + this.frm.set_query("project", function (doc) { + return { + filters: { + company: doc.company, + }, + }; + }); + if (this.frm.doc.__islocal && frappe.meta.has_field(this.frm.doc.doctype, "disable_rounded_total")) { From 74220430e537c40ca6b0af1dffe0412f23ef8c99 Mon Sep 17 00:00:00 2001 From: venkat102 Date: Mon, 30 Dec 2024 14:18:55 +0530 Subject: [PATCH 0772/1614] fix: include company in filter condition (cherry picked from commit b92f8bc5149a8db7d6d095687576325b013df1d9) --- erpnext/controllers/queries.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/erpnext/controllers/queries.py b/erpnext/controllers/queries.py index 463cb859970..03852d3739a 100644 --- a/erpnext/controllers/queries.py +++ b/erpnext/controllers/queries.py @@ -271,10 +271,14 @@ def get_project_name(doctype, txt, searchfield, start, page_len, filters): qb_filter_or_conditions = [] ifelse = CustomFunction("IF", ["condition", "then", "else"]) - if filters and filters.get("customer"): - qb_filter_and_conditions.append( - (proj.customer == filters.get("customer")) | proj.customer.isnull() | proj.customer == "" - ) + if filters: + if filters.get("customer"): + qb_filter_and_conditions.append( + (proj.customer == filters.get("customer")) | proj.customer.isnull() | proj.customer == "" + ) + + if filters.get("company"): + qb_filter_and_conditions.append(proj.company == filters.get("company")) qb_filter_and_conditions.append(proj.status.notin(["Completed", "Cancelled"])) From 1353a14a6b4c58b96916b3bf4f7a27e85716ab79 Mon Sep 17 00:00:00 2001 From: mahsem <137205921+mahsem@users.noreply.github.com> Date: Mon, 23 Dec 2024 11:30:00 +0100 Subject: [PATCH 0773/1614] fix: in_contex_translation_fixes (cherry picked from commit a87e7fde031393607b384138b0927d0b4c36322b) # Conflicts: # erpnext/accounts/utils.py # erpnext/templates/pages/order.html --- .../closing_voucher_details.html | 10 ++--- erpnext/accounts/utils.py | 42 +++++++++++++++++++ erpnext/templates/pages/order.html | 4 ++ 3 files changed, 51 insertions(+), 5 deletions(-) diff --git a/erpnext/accounts/doctype/pos_closing_entry/closing_voucher_details.html b/erpnext/accounts/doctype/pos_closing_entry/closing_voucher_details.html index 983f49563cd..5bc4e7a1587 100644 --- a/erpnext/accounts/doctype/pos_closing_entry/closing_voucher_details.html +++ b/erpnext/accounts/doctype/pos_closing_entry/closing_voucher_details.html @@ -12,15 +12,15 @@ - {{ _('Grand Total') }} + {{ _("Grand Total") }} {{ frappe.utils.fmt_money(data.grand_total or '', currency=currency) }} - {{ _('Net Total') }} + {{ _("Net Total") }} {{ frappe.utils.fmt_money(data.net_total or '', currency=currency) }} - {{ _('Total Quantity') }} + {{ _("Total Quantity") }} {{ data.total_quantity or '' }} @@ -44,7 +44,7 @@ {% for d in data.payment_reconciliation %} - {{ d.mode_of_payment }} + {{ _(d.mode_of_payment) }} {{ frappe.utils.fmt_money(d.expected_amount - d.opening_amount, currency=currency) }} {% endfor %} @@ -63,7 +63,7 @@ {{ _("Account") }} - {{ _("Rate") }} + {{ _(" Tax Rate") }} {{ _("Amount") }} diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py index 51b4ed248ce..96f67613d3f 100644 --- a/erpnext/accounts/utils.py +++ b/erpnext/accounts/utils.py @@ -76,6 +76,48 @@ def get_fiscal_years( as_dict=False, boolean=False, ): +<<<<<<< HEAD +======= + if transaction_date: + transaction_date = getdate(transaction_date) + # backwards compat + if boolean is not None: + raise_on_missing = not boolean + + all_fiscal_years = _get_fiscal_years(company=company) + + # No restricting selectors + if not transaction_date and not fiscal_year: + return all_fiscal_years + + for fy in all_fiscal_years: + if (fiscal_year and fy.name == fiscal_year) or ( + transaction_date + and getdate(fy.year_start_date) <= transaction_date + and getdate(fy.year_end_date) >= transaction_date + ): + if as_dict: + return (fy,) + else: + return ((fy.name, fy.year_start_date, fy.year_end_date),) + + # No match for restricting selectors + if raise_on_missing: + error_msg = _("""{0} {1} is not in any active Fiscal Year""").format( + _(label), formatdate(transaction_date) + ) + if company: + error_msg = _("""{0} for {1}""").format(error_msg, frappe.bold(company)) + + if verbose == 1: + frappe.msgprint(error_msg) + + raise FiscalYearError(error_msg) + return [] + + +def _get_fiscal_years(company=None): +>>>>>>> a87e7fde03 (fix: in_contex_translation_fixes) fiscal_years = frappe.cache().hget("fiscal_years", company) or [] if not fiscal_years: diff --git a/erpnext/templates/pages/order.html b/erpnext/templates/pages/order.html index 388feb9eba9..ec565060191 100644 --- a/erpnext/templates/pages/order.html +++ b/erpnext/templates/pages/order.html @@ -40,7 +40,11 @@

+<<<<<<< HEAD {{ _("Pay") }} {{doc.get_formatted("grand_total") }} +======= + {{ _("Pay", null, "Amount") }} {{ pay_amount }} +>>>>>>> a87e7fde03 (fix: in_contex_translation_fixes)

From 2efc701e4e37127aff69035742b0f415ae4b3505 Mon Sep 17 00:00:00 2001 From: mahsem <137205921+mahsem@users.noreply.github.com> Date: Mon, 23 Dec 2024 17:42:33 +0100 Subject: [PATCH 0774/1614] fix: whitespace (cherry picked from commit 1f4e1811de51b75c765fa87118aafa0b16dedd6f) --- .../doctype/pos_closing_entry/closing_voucher_details.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/pos_closing_entry/closing_voucher_details.html b/erpnext/accounts/doctype/pos_closing_entry/closing_voucher_details.html index 5bc4e7a1587..63e88cf44c2 100644 --- a/erpnext/accounts/doctype/pos_closing_entry/closing_voucher_details.html +++ b/erpnext/accounts/doctype/pos_closing_entry/closing_voucher_details.html @@ -63,7 +63,7 @@ {{ _("Account") }} - {{ _(" Tax Rate") }} + {{ _("Tax Rate") }} {{ _("Amount") }} From 2e9c507dfa70eda65c98558aa6de8078f01681fa Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 30 Dec 2024 16:18:12 +0530 Subject: [PATCH 0775/1614] chore: resolve conflicts --- erpnext/accounts/utils.py | 42 ------------------------------ erpnext/templates/pages/order.html | 4 --- 2 files changed, 46 deletions(-) diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py index 96f67613d3f..51b4ed248ce 100644 --- a/erpnext/accounts/utils.py +++ b/erpnext/accounts/utils.py @@ -76,48 +76,6 @@ def get_fiscal_years( as_dict=False, boolean=False, ): -<<<<<<< HEAD -======= - if transaction_date: - transaction_date = getdate(transaction_date) - # backwards compat - if boolean is not None: - raise_on_missing = not boolean - - all_fiscal_years = _get_fiscal_years(company=company) - - # No restricting selectors - if not transaction_date and not fiscal_year: - return all_fiscal_years - - for fy in all_fiscal_years: - if (fiscal_year and fy.name == fiscal_year) or ( - transaction_date - and getdate(fy.year_start_date) <= transaction_date - and getdate(fy.year_end_date) >= transaction_date - ): - if as_dict: - return (fy,) - else: - return ((fy.name, fy.year_start_date, fy.year_end_date),) - - # No match for restricting selectors - if raise_on_missing: - error_msg = _("""{0} {1} is not in any active Fiscal Year""").format( - _(label), formatdate(transaction_date) - ) - if company: - error_msg = _("""{0} for {1}""").format(error_msg, frappe.bold(company)) - - if verbose == 1: - frappe.msgprint(error_msg) - - raise FiscalYearError(error_msg) - return [] - - -def _get_fiscal_years(company=None): ->>>>>>> a87e7fde03 (fix: in_contex_translation_fixes) fiscal_years = frappe.cache().hget("fiscal_years", company) or [] if not fiscal_years: diff --git a/erpnext/templates/pages/order.html b/erpnext/templates/pages/order.html index ec565060191..ade66dd481f 100644 --- a/erpnext/templates/pages/order.html +++ b/erpnext/templates/pages/order.html @@ -40,11 +40,7 @@

-<<<<<<< HEAD - {{ _("Pay") }} {{doc.get_formatted("grand_total") }} -======= {{ _("Pay", null, "Amount") }} {{ pay_amount }} ->>>>>>> a87e7fde03 (fix: in_contex_translation_fixes)

From 772b7b95ac5e7445020414cd2775fb729a75775d Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 30 Dec 2024 23:37:52 +0530 Subject: [PATCH 0776/1614] fix: ignore inventory dimension for SABB and Pick List (backport #44933) (#44941) fix: ignore inventory dimension for SABB and Pick List (#44933) (cherry picked from commit 303c52f1344c196e656c69103f5c8801d9faa545) Co-authored-by: rohitwaghchaure --- .../stock/doctype/inventory_dimension/inventory_dimension.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/erpnext/stock/doctype/inventory_dimension/inventory_dimension.py b/erpnext/stock/doctype/inventory_dimension/inventory_dimension.py index 661605bdf5f..524c7331bc7 100644 --- a/erpnext/stock/doctype/inventory_dimension/inventory_dimension.py +++ b/erpnext/stock/doctype/inventory_dimension/inventory_dimension.py @@ -237,8 +237,13 @@ class InventoryDimension(Document): custom_fields["Stock Ledger Entry"] = dimension_field filter_custom_fields = {} + ignore_doctypes = ["Serial and Batch Bundle", "Serial and Batch Entry", "Pick List Item"] + if custom_fields: for doctype, fields in custom_fields.items(): + if doctype in ignore_doctypes: + continue + if isinstance(fields, dict): fields = [fields] From c33e07550cbfdbd5adc113cec35109950500a599 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 30 Dec 2024 23:38:14 +0530 Subject: [PATCH 0777/1614] fix: ignore validate while making WO from MR (backport #44939) (#44942) fix: ignore validate while making WO from MR (#44939) (cherry picked from commit 9661c1d0814e8e4b175139e48fa5dd6eb291a287) Co-authored-by: rohitwaghchaure --- erpnext/stock/doctype/material_request/material_request.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/stock/doctype/material_request/material_request.py b/erpnext/stock/doctype/material_request/material_request.py index 23d289170db..f59b60a3f51 100644 --- a/erpnext/stock/doctype/material_request/material_request.py +++ b/erpnext/stock/doctype/material_request/material_request.py @@ -766,6 +766,7 @@ def raise_work_orders(material_request): ) wo_order.set_work_order_operations() + wo_order.flags.ignore_validate = True wo_order.flags.ignore_mandatory = True wo_order.save() From 9853bd9ba128d448999690221cc854ec19da8f29 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 30 Dec 2024 23:38:49 +0530 Subject: [PATCH 0778/1614] fix: incorrect filter for BOM (backport #44954) (#44956) fix: incorrect filter for BOM (#44954) (cherry picked from commit 9fdeb5f8269cfb6ebe8f63bf426250079c95dca5) Co-authored-by: rohitwaghchaure --- erpnext/manufacturing/doctype/bom/bom_list.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/erpnext/manufacturing/doctype/bom/bom_list.js b/erpnext/manufacturing/doctype/bom/bom_list.js index a26df545f85..1b6cba90dbc 100644 --- a/erpnext/manufacturing/doctype/bom/bom_list.js +++ b/erpnext/manufacturing/doctype/bom/bom_list.js @@ -2,13 +2,13 @@ frappe.listview_settings["BOM"] = { add_fields: ["is_active", "is_default", "total_cost", "has_variants"], get_indicator: function (doc) { if (doc.is_active && doc.has_variants) { - return [__("Template"), "orange", "has_variants,=,Yes"]; + return [__("Template"), "orange", "has_variants,=,1"]; } else if (doc.is_default) { - return [__("Default"), "green", "is_default,=,Yes"]; + return [__("Default"), "green", "is_default,=,1"]; } else if (doc.is_active) { - return [__("Active"), "blue", "is_active,=,Yes"]; + return [__("Active"), "blue", "is_active,=,1"]; } else if (!doc.is_active) { - return [__("Not active"), "gray", "is_active,=,No"]; + return [__("Not active"), "gray", "is_active,=,0"]; } }, }; From d6903fbc8d7f011062d56504d5c20b7d2ebfa859 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 31 Dec 2024 12:09:33 +0530 Subject: [PATCH 0779/1614] fix: Validate party on non receivable / payable account (backport #44883) (#44973) * fix: validate party on non receivable / payable account (cherry picked from commit c6a2d86ba6068e9e259f51a510a9c5a2e81bd18f) * test: add unit test to validate on non receivable / payable account (cherry picked from commit a10a15b2c3ffdf0bde9873286da7c054b9af723f) * fix: Set account type payable for advance account (cherry picked from commit 8abbece7c4556399ddc101d8cd903ce7dd74c8db) --------- Co-authored-by: Karuppasamy923 --- erpnext/accounts/doctype/gl_entry/gl_entry.py | 7 ++- .../doctype/gl_entry/test_gl_entry.py | 45 +++++++++++++++++++ .../payment_entry/test_payment_entry.py | 2 +- erpnext/accounts/party.py | 11 +++++ 4 files changed, 63 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/gl_entry/gl_entry.py b/erpnext/accounts/doctype/gl_entry/gl_entry.py index a7e7edb098d..d9d7807a561 100644 --- a/erpnext/accounts/doctype/gl_entry/gl_entry.py +++ b/erpnext/accounts/doctype/gl_entry/gl_entry.py @@ -13,7 +13,11 @@ import erpnext from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import ( get_checks_for_pl_and_bs_accounts, ) -from erpnext.accounts.party import validate_party_frozen_disabled, validate_party_gle_currency +from erpnext.accounts.party import ( + validate_account_party_type, + validate_party_frozen_disabled, + validate_party_gle_currency, +) from erpnext.accounts.utils import get_account_currency, get_fiscal_year from erpnext.exceptions import InvalidAccountCurrency @@ -268,6 +272,7 @@ class GLEntry(Document): def validate_party(self): validate_party_frozen_disabled(self.party_type, self.party) + validate_account_party_type(self) def validate_currency(self): company_currency = erpnext.get_company_currency(self.company) diff --git a/erpnext/accounts/doctype/gl_entry/test_gl_entry.py b/erpnext/accounts/doctype/gl_entry/test_gl_entry.py index 3edfd67b005..f6ed163bff5 100644 --- a/erpnext/accounts/doctype/gl_entry/test_gl_entry.py +++ b/erpnext/accounts/doctype/gl_entry/test_gl_entry.py @@ -79,3 +79,48 @@ class TestGLEntry(unittest.TestCase): "SELECT current from tabSeries where name = %s", naming_series )[0][0] self.assertEqual(old_naming_series_current_value + 2, new_naming_series_current_value) + + def test_validate_account_party_type(self): + jv = make_journal_entry( + "_Test Account Cost for Goods Sold - _TC", + "_Test Bank - _TC", + 100, + "_Test Cost Center - _TC", + save=False, + submit=False, + ) + + for row in jv.accounts: + row.party_type = "Supplier" + break + + jv.save() + try: + jv.submit() + except Exception as e: + self.assertEqual( + str(e), + "Party Type and Party can only be set for Receivable / Payable account_Test Account Cost for Goods Sold - _TC", + ) + + jv1 = make_journal_entry( + "_Test Account Cost for Goods Sold - _TC", + "_Test Bank - _TC", + 100, + "_Test Cost Center - _TC", + save=False, + submit=False, + ) + + for row in jv.accounts: + row.party_type = "Customer" + break + + jv1.save() + try: + jv1.submit() + except Exception as e: + self.assertEqual( + str(e), + "Party Type and Party can only be set for Receivable / Payable account_Test Account Cost for Goods Sold - _TC", + ) diff --git a/erpnext/accounts/doctype/payment_entry/test_payment_entry.py b/erpnext/accounts/doctype/payment_entry/test_payment_entry.py index 312628d9f97..5883d4e2f1f 100644 --- a/erpnext/accounts/doctype/payment_entry/test_payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/test_payment_entry.py @@ -1479,7 +1479,7 @@ class TestPaymentEntry(FrappeTestCase): parent_account="Current Liabilities - _TC", account_name="Advances Paid", company=company, - account_type="Liability", + account_type="Payable", ) frappe.db.set_value( diff --git a/erpnext/accounts/party.py b/erpnext/accounts/party.py index 5be80872db8..3033b8ad087 100644 --- a/erpnext/accounts/party.py +++ b/erpnext/accounts/party.py @@ -759,6 +759,17 @@ def validate_party_frozen_disabled(party_type, party_name): frappe.msgprint(_("{0} {1} is not active").format(party_type, party_name), alert=True) +def validate_account_party_type(self): + if self.party_type and self.party: + account_type = frappe.get_cached_value("Account", self.account, "account_type") + if account_type and (account_type not in ["Receivable", "Payable"]): + frappe.throw( + _( + "Party Type and Party can only be set for Receivable / Payable account

" "{0}" + ).format(self.account) + ) + + def get_dashboard_info(party_type, party, loyalty_program=None): current_fiscal_year = get_fiscal_year(nowdate(), as_dict=True) From 839ffb3f2a88e6e3c9901a943c52ce5e7ce03669 Mon Sep 17 00:00:00 2001 From: Khushi Rawat <142375893+khushi8112@users.noreply.github.com> Date: Tue, 31 Dec 2024 12:35:51 +0530 Subject: [PATCH 0780/1614] fix: copy accounting dimensions to asset and sales invoice (#44964) * fix: copy accounting dimensions to asset and sales invoice * fix: replace sql query with query builder * refactor: reuse function for accounting dimensions * fix: loop handling * fix: use explicit param (cherry picked from commit 079ec864de00b55e1b0378b94883d9bba090f808) # Conflicts: # erpnext/controllers/buying_controller.py --- erpnext/assets/doctype/asset/asset.py | 12 ++++++++++++ erpnext/controllers/buying_controller.py | 19 ++++++++++++++++--- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/erpnext/assets/doctype/asset/asset.py b/erpnext/assets/doctype/asset/asset.py index e499b5e0faa..2e0ba2c8218 100644 --- a/erpnext/assets/doctype/asset/asset.py +++ b/erpnext/assets/doctype/asset/asset.py @@ -19,6 +19,7 @@ from frappe.utils import ( ) import erpnext +from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import get_dimensions from erpnext.accounts.general_ledger import make_reverse_gl_entries from erpnext.assets.doctype.asset.depreciation import ( get_comma_separated_links, @@ -887,6 +888,7 @@ def get_asset_naming_series(): @frappe.whitelist() def make_sales_invoice(asset, item_code, company, serial_no=None): + asset_doc = frappe.get_doc("Asset", asset) si = frappe.new_doc("Sales Invoice") si.company = company si.currency = frappe.get_cached_value("Company", company, "default_currency") @@ -903,6 +905,16 @@ def make_sales_invoice(asset, item_code, company, serial_no=None): "qty": 1, }, ) + + accounting_dimensions = get_dimensions(with_cost_center_and_project=True) + for dimension in accounting_dimensions[0]: + si.update( + { + dimension["fieldname"]: asset_doc.get(dimension["fieldname"]) + or dimension.get("default_dimension") + } + ) + si.set_missing_values() return si diff --git a/erpnext/controllers/buying_controller.py b/erpnext/controllers/buying_controller.py index 6020dce0761..a03c3692b40 100644 --- a/erpnext/controllers/buying_controller.py +++ b/erpnext/controllers/buying_controller.py @@ -9,6 +9,7 @@ from frappe.utils import cint, flt, getdate from frappe.utils.data import nowtime import erpnext +from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import get_dimensions from erpnext.accounts.doctype.budget.budget import validate_expense_against_budget from erpnext.accounts.party import get_party_details from erpnext.buying.utils import update_last_purchase_rate, validate_for_items @@ -744,6 +745,11 @@ class BuyingController(SubcontractingController): def auto_make_assets(self, asset_items): items_data = get_asset_item_details(asset_items) messages = [] +<<<<<<< HEAD +======= + alert = False + accounting_dimensions = get_dimensions(with_cost_center_and_project=True) +>>>>>>> 079ec864de (fix: copy accounting dimensions to asset and sales invoice (#44964)) for d in self.items: if d.is_fixed_asset: @@ -755,11 +761,11 @@ class BuyingController(SubcontractingController): if item_data.get("asset_naming_series"): created_assets = [] if item_data.get("is_grouped_asset"): - asset = self.make_asset(d, is_grouped_asset=True) + asset = self.make_asset(d, accounting_dimensions, is_grouped_asset=True) created_assets.append(asset) else: for _qty in range(cint(d.qty)): - asset = self.make_asset(d) + asset = self.make_asset(d, accounting_dimensions) created_assets.append(asset) if len(created_assets) > 5: @@ -797,7 +803,7 @@ class BuyingController(SubcontractingController): for message in messages: frappe.msgprint(message, title="Success", indicator="green") - def make_asset(self, row, is_grouped_asset=False): + def make_asset(self, row, accounting_dimensions, is_grouped_asset=False): if not row.asset_location: frappe.throw(_("Row {0}: Enter location for the asset item {1}").format(row.idx, row.item_code)) @@ -828,6 +834,13 @@ class BuyingController(SubcontractingController): "purchase_invoice_item": row.name if self.doctype == "Purchase Invoice" else None, } ) + for dimension in accounting_dimensions[0]: + asset.update( + { + dimension["fieldname"]: self.get(dimension["fieldname"]) + or dimension.get("default_dimension") + } + ) asset.flags.ignore_validate = True asset.flags.ignore_mandatory = True From 00ae829d890011df66cf66460e8119d649571c0e Mon Sep 17 00:00:00 2001 From: Khushi Rawat <142375893+khushi8112@users.noreply.github.com> Date: Tue, 31 Dec 2024 12:43:38 +0530 Subject: [PATCH 0781/1614] fix: resolved conflicts --- erpnext/controllers/buying_controller.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/erpnext/controllers/buying_controller.py b/erpnext/controllers/buying_controller.py index a03c3692b40..7a6ff6c0889 100644 --- a/erpnext/controllers/buying_controller.py +++ b/erpnext/controllers/buying_controller.py @@ -745,11 +745,8 @@ class BuyingController(SubcontractingController): def auto_make_assets(self, asset_items): items_data = get_asset_item_details(asset_items) messages = [] -<<<<<<< HEAD -======= alert = False accounting_dimensions = get_dimensions(with_cost_center_and_project=True) ->>>>>>> 079ec864de (fix: copy accounting dimensions to asset and sales invoice (#44964)) for d in self.items: if d.is_fixed_asset: From ea4b6e8dd726e2c8a8a94f7e70bd5cab03ea6876 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 31 Dec 2024 12:52:13 +0530 Subject: [PATCH 0782/1614] fix(report): Purchase Order Analysis pymysql.err (backport #44957) (#44994) fix(report): Purchase Order Analysis pymysql.err (#44957) (cherry picked from commit d6980a9493fb18855918de804f4922c2f70fb5d1) Co-authored-by: Vishnu VS --- .../report/purchase_order_analysis/purchase_order_analysis.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.py b/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.py index 75658e28780..f583ce3e6c8 100644 --- a/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.py +++ b/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.py @@ -18,11 +18,12 @@ def execute(filters=None): columns = get_columns(filters) data = get_data(filters) - update_received_amount(data) if not data: return [], [], None, [] + update_received_amount(data) + data, chart_data = prepare_data(data, filters) return columns, data, None, chart_data From 20efe7bb801be48f5d0df75050d76a715375c8c7 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 31 Dec 2024 12:52:23 +0530 Subject: [PATCH 0783/1614] fix: load customer default price list in pos during item selection (backport #44991) (#44993) fix: load customer default price list in pos during item selection (#44991) fix: load customer default price list in pos (cherry picked from commit d1ae0d784e8998d9146e4377e340301be615197f) Co-authored-by: Diptanil Saha --- erpnext/selling/page/point_of_sale/pos_controller.js | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/selling/page/point_of_sale/pos_controller.js b/erpnext/selling/page/point_of_sale/pos_controller.js index 32cb2bc0525..dc7e992f654 100644 --- a/erpnext/selling/page/point_of_sale/pos_controller.js +++ b/erpnext/selling/page/point_of_sale/pos_controller.js @@ -285,6 +285,7 @@ erpnext.PointOfSale.Controller = class { edit_cart: () => this.payment.edit_cart(), customer_details_updated: (details) => { + this.item_selector.load_items_data(); this.customer_details = details; // will add/remove LP payment method this.payment.render_loyalty_points_payment_mode(); From b8922823a3e3989827f3009ad17621dbda704543 Mon Sep 17 00:00:00 2001 From: Khushi Rawat <142375893+khushi8112@users.noreply.github.com> Date: Tue, 31 Dec 2024 12:55:41 +0530 Subject: [PATCH 0784/1614] fix: remove unused variable --- erpnext/controllers/buying_controller.py | 1 - 1 file changed, 1 deletion(-) diff --git a/erpnext/controllers/buying_controller.py b/erpnext/controllers/buying_controller.py index 7a6ff6c0889..8da22785b94 100644 --- a/erpnext/controllers/buying_controller.py +++ b/erpnext/controllers/buying_controller.py @@ -745,7 +745,6 @@ class BuyingController(SubcontractingController): def auto_make_assets(self, asset_items): items_data = get_asset_item_details(asset_items) messages = [] - alert = False accounting_dimensions = get_dimensions(with_cost_center_and_project=True) for d in self.items: From 6f7138996a0252f919e0ff47f5b19a1dab1ff9d6 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 31 Dec 2024 13:17:18 +0530 Subject: [PATCH 0785/1614] fix: negative stock balance (backport #44990) (#44996) * fix: negative stock balance (#44990) (cherry picked from commit 7c4aecf83464c6f8790041246a086e8f18b533d1) # Conflicts: # erpnext/stock/deprecated_serial_batch.py * chore: fix conflicts --------- Co-authored-by: rohitwaghchaure --- erpnext/stock/deprecated_serial_batch.py | 58 +++++++++++++++++-- .../test_serial_and_batch_bundle.py | 3 +- 2 files changed, 56 insertions(+), 5 deletions(-) diff --git a/erpnext/stock/deprecated_serial_batch.py b/erpnext/stock/deprecated_serial_batch.py index b3f4c2dead4..7611d751fdd 100644 --- a/erpnext/stock/deprecated_serial_batch.py +++ b/erpnext/stock/deprecated_serial_batch.py @@ -181,6 +181,9 @@ class DeprecatedBatchNoValuation: stock_value_change = self.batch_avg_rate[batch_no] * ledger.qty self.stock_value_change += stock_value_change + self.non_batchwise_balance_value[batch_no] -= stock_value_change + self.non_batchwise_balance_qty[batch_no] -= ledger.qty + frappe.db.set_value( "Serial and Batch Entry", ledger.name, @@ -220,7 +223,6 @@ class DeprecatedBatchNoValuation: .select( sle.batch_no, Sum(sle.actual_qty).as_("batch_qty"), - Sum(sle.stock_value_difference).as_("batch_value"), ) .where( (sle.item_code == self.sle.item_code) @@ -237,11 +239,59 @@ class DeprecatedBatchNoValuation: if self.sle.name: query = query.where(sle.name != self.sle.name) - for d in query.run(as_dict=True): - self.non_batchwise_balance_value[d.batch_no] += flt(d.batch_value) - self.non_batchwise_balance_qty[d.batch_no] += flt(d.batch_qty) + batch_data = query.run(as_dict=True) + for d in batch_data: self.available_qty[d.batch_no] += flt(d.batch_qty) + last_sle = self.get_last_sle_for_non_batch() + for d in batch_data: + self.non_batchwise_balance_value[d.batch_no] += flt(last_sle.stock_value) + self.non_batchwise_balance_qty[d.batch_no] += flt(last_sle.qty_after_transaction) + + def get_last_sle_for_non_batch(self): + from erpnext.stock.utils import get_combine_datetime + + sle = frappe.qb.DocType("Stock Ledger Entry") + batch = frappe.qb.DocType("Batch") + + posting_datetime = get_combine_datetime(self.sle.posting_date, self.sle.posting_time) + if not self.sle.creation: + posting_datetime = posting_datetime + datetime.timedelta(milliseconds=1) + + timestamp_condition = sle.posting_datetime < posting_datetime + + if self.sle.creation: + timestamp_condition |= (sle.posting_datetime == posting_datetime) & ( + sle.creation < self.sle.creation + ) + + query = ( + frappe.qb.from_(sle) + .inner_join(batch) + .on(sle.batch_no == batch.name) + .select( + sle.stock_value, + sle.qty_after_transaction, + ) + .where( + (sle.item_code == self.sle.item_code) + & (sle.warehouse == self.sle.warehouse) + & (sle.batch_no.isnotnull()) + & (batch.use_batchwise_valuation == 0) + & (sle.is_cancelled == 0) + ) + .where(timestamp_condition) + .orderby(sle.posting_datetime, order=Order.desc) + .orderby(sle.creation, order=Order.desc) + .limit(1) + ) + + if self.sle.name: + query = query.where(sle.name != self.sle.name) + + data = query.run(as_dict=True) + return data[0] if data else {} + @deprecated def set_balance_value_from_bundle(self) -> None: bundle = frappe.qb.DocType("Serial and Batch Bundle") 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 647082baa68..45a474df2b7 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 @@ -166,7 +166,7 @@ class TestSerialandBatchBundle(FrappeTestCase): for qty, valuation in {10: 100, 20: 200}.items(): stock_queue.append([qty, valuation]) qty_after_transaction += qty - balance_value += qty_after_transaction * valuation + balance_value += qty * valuation doc = frappe.get_doc( { @@ -177,6 +177,7 @@ class TestSerialandBatchBundle(FrappeTestCase): "incoming_rate": valuation, "qty_after_transaction": qty_after_transaction, "stock_value_difference": valuation * qty, + "stock_value": balance_value, "balance_value": balance_value, "valuation_rate": balance_value / qty_after_transaction, "actual_qty": qty, From 8885b071143a64912cd00f2632fe4de0ccd8f8d1 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Tue, 24 Dec 2024 15:15:30 +0530 Subject: [PATCH 0786/1614] fix: update item_tax_rate in backend (cherry picked from commit de54c0b41f6c3367f39e74a5726d757bcedbc79f) # Conflicts: # erpnext/controllers/taxes_and_totals.py --- .../doctype/sales_invoice/test_sales_invoice.py | 14 ++++++++++++++ erpnext/controllers/taxes_and_totals.py | 14 ++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py index 57eb84caaa4..763fea7a260 100644 --- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py @@ -43,6 +43,7 @@ from erpnext.stock.doctype.stock_entry.test_stock_entry import ( from erpnext.stock.doctype.stock_reconciliation.test_stock_reconciliation import ( create_stock_reconciliation, ) +from erpnext.stock.get_item_details import get_item_tax_map from erpnext.stock.utils import get_incoming_rate, get_stock_balance @@ -2873,13 +2874,26 @@ class TestSalesInvoice(FrappeTestCase): item.save() sales_invoice = create_sales_invoice(item="T Shirt", rate=700, do_not_submit=True) + item_tax_map = get_item_tax_map( + doc=sales_invoice, + tax_template=sales_invoice.items[0].item_tax_template, + ) + self.assertEqual(sales_invoice.items[0].item_tax_template, "_Test Account Excise Duty @ 12 - _TC") + self.assertEqual(sales_invoice.items[0].item_tax_rate, item_tax_map) # Apply discount sales_invoice.apply_discount_on = "Net Total" sales_invoice.discount_amount = 300 sales_invoice.save() + + item_tax_map = get_item_tax_map( + doc=sales_invoice, + tax_template=sales_invoice.items[0].item_tax_template, + ) + self.assertEqual(sales_invoice.items[0].item_tax_template, "_Test Account Excise Duty @ 10 - _TC") + self.assertEqual(sales_invoice.items[0].item_tax_rate, item_tax_map) @change_settings("Selling Settings", {"enable_discount_accounting": 1}) def test_sales_invoice_with_discount_accounting_enabled(self): diff --git a/erpnext/controllers/taxes_and_totals.py b/erpnext/controllers/taxes_and_totals.py index bf5beab1a82..2ebe8270cad 100644 --- a/erpnext/controllers/taxes_and_totals.py +++ b/erpnext/controllers/taxes_and_totals.py @@ -18,7 +18,12 @@ from erpnext.controllers.accounts_controller import ( validate_inclusive_tax, validate_taxes_and_charges, ) +<<<<<<< HEAD from erpnext.stock.get_item_details import _get_item_tax_template +======= +from erpnext.deprecation_dumpster import deprecated +from erpnext.stock.get_item_details import ItemDetailsCtx, _get_item_tax_template, get_item_tax_map +>>>>>>> de54c0b41f (fix: update item_tax_rate in backend) from erpnext.utilities.regional import temporary_flag @@ -70,6 +75,7 @@ class calculate_taxes_and_totals: self.validate_conversion_rate() self.calculate_item_values() self.validate_item_tax_template() + self.update_item_tax_map() self.initialize_taxes() self.determine_exclusive_rate() self.calculate_net_total() @@ -134,6 +140,14 @@ class calculate_taxes_and_totals: ) ) + def update_item_tax_map(self): + for item in self.doc.items: + item.item_tax_rate = get_item_tax_map( + doc=self.doc, + tax_template=item.item_tax_template, + as_json=True, + ) + def validate_conversion_rate(self): # validate conversion rate company_currency = erpnext.get_company_currency(self.doc.company) From 6703a457fe51024f557c898668eefedc2d3b60f7 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Fri, 27 Dec 2024 14:21:00 +0530 Subject: [PATCH 0787/1614] fix: set paid amount in party currency in bank reco payment entry (cherry picked from commit 70b10772869d104d92af4cd2f9ef618e3a9e6c6e) --- .../bank_reconciliation_tool.py | 69 ++++++++++--------- 1 file changed, 36 insertions(+), 33 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 28038e9212a..f798d68c3c7 100644 --- a/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py +++ b/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py @@ -12,6 +12,7 @@ from frappe.utils import cint, flt from erpnext import get_default_cost_center from erpnext.accounts.doctype.bank_transaction.bank_transaction import get_total_allocated_amount +from erpnext.accounts.party import get_party_account from erpnext.accounts.report.bank_reconciliation_statement.bank_reconciliation_statement import ( get_amounts_not_reflected_in_system, get_entries, @@ -304,54 +305,56 @@ def create_payment_entry_bts( bank_transaction = frappe.db.get_values( "Bank Transaction", bank_transaction_name, - fieldname=["name", "unallocated_amount", "deposit", "bank_account"], + fieldname=["name", "unallocated_amount", "deposit", "bank_account", "currency"], as_dict=True, )[0] - paid_amount = bank_transaction.unallocated_amount + payment_type = "Receive" if bank_transaction.deposit > 0.0 else "Pay" - company_account = frappe.get_value("Bank Account", bank_transaction.bank_account, "account") - company = frappe.get_value("Account", company_account, "company") - payment_entry_dict = { - "company": company, - "payment_type": payment_type, - "reference_no": reference_number, - "reference_date": reference_date, - "party_type": party_type, - "party": party, - "posting_date": posting_date, - "paid_amount": paid_amount, - "received_amount": paid_amount, - } - payment_entry = frappe.new_doc("Payment Entry") + bank_account = frappe.get_cached_value("Bank Account", bank_transaction.bank_account, "account") + company = frappe.get_cached_value("Account", bank_account, "company") + party_account = get_party_account(party_type, party, company) - payment_entry.update(payment_entry_dict) + bank_currency = bank_transaction.currency + party_currency = frappe.get_cached_value("Account", party_account, "account_currency") - if mode_of_payment: - payment_entry.mode_of_payment = mode_of_payment - if project: - payment_entry.project = project - if cost_center: - payment_entry.cost_center = cost_center - if payment_type == "Receive": - payment_entry.paid_to = company_account - else: - payment_entry.paid_from = company_account + exc_rate = get_exchange_rate(bank_currency, party_currency, posting_date) - payment_entry.validate() + amt_in_bank_acc_currency = bank_transaction.unallocated_amount + amount_in_party_currency = bank_transaction.unallocated_amount * exc_rate + + pe = frappe.new_doc("Payment Entry") + pe.payment_type = payment_type + pe.company = company + pe.reference_no = reference_number + pe.reference_date = reference_date + pe.party_type = party_type + pe.party = party + pe.posting_date = posting_date + pe.paid_from = party_account if payment_type == "Receive" else bank_account + pe.paid_to = party_account if payment_type == "Pay" else bank_account + pe.paid_from_account_currency = party_currency if payment_type == "Receive" else bank_currency + pe.paid_to_account_currency = party_currency if payment_type == "Pay" else bank_currency + pe.paid_amount = amount_in_party_currency if payment_type == "Receive" else amt_in_bank_acc_currency + pe.received_amount = amount_in_party_currency if payment_type == "Pay" else amt_in_bank_acc_currency + pe.mode_of_payment = mode_of_payment + pe.project = project + pe.cost_center = cost_center + + pe.validate() if allow_edit: - return payment_entry + return pe - payment_entry.insert() + pe.insert() + pe.submit() - payment_entry.submit() vouchers = json.dumps( [ { "payment_doctype": "Payment Entry", - "payment_name": payment_entry.name, - "amount": paid_amount, + "payment_name": pe.name, + "amount": amt_in_bank_acc_currency, } ] ) From 885dd31c5c2f1d70812c16ac52c1d18ae32009db Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 31 Dec 2024 15:54:06 +0530 Subject: [PATCH 0788/1614] chore: resolve conflict --- erpnext/controllers/taxes_and_totals.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/erpnext/controllers/taxes_and_totals.py b/erpnext/controllers/taxes_and_totals.py index 2ebe8270cad..53d0ce0ee2f 100644 --- a/erpnext/controllers/taxes_and_totals.py +++ b/erpnext/controllers/taxes_and_totals.py @@ -18,12 +18,7 @@ from erpnext.controllers.accounts_controller import ( validate_inclusive_tax, validate_taxes_and_charges, ) -<<<<<<< HEAD -from erpnext.stock.get_item_details import _get_item_tax_template -======= -from erpnext.deprecation_dumpster import deprecated -from erpnext.stock.get_item_details import ItemDetailsCtx, _get_item_tax_template, get_item_tax_map ->>>>>>> de54c0b41f (fix: update item_tax_rate in backend) +from erpnext.stock.get_item_details import _get_item_tax_template, get_item_tax_map from erpnext.utilities.regional import temporary_flag From b135a684a5a86b6dcfc0896705f482cebace55df Mon Sep 17 00:00:00 2001 From: DHINESH00 <18csa09@karpagamtech.ac.in> Date: Fri, 27 Dec 2024 16:07:18 +0530 Subject: [PATCH 0789/1614] fix: fetch amount in company currency (cherry picked from commit a984aaae362f2055b6073e75748e73fda247a00b) --- .../bank_reconciliation_tool/bank_reconciliation_tool.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 28038e9212a..162b595078a 100644 --- a/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py +++ b/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py @@ -723,7 +723,7 @@ def get_pe_matching_query( (ref_rank + amount_rank + party_rank + 1).as_("rank"), ConstantColumn("Payment Entry").as_("doctype"), pe.name, - pe.paid_amount_after_tax.as_("paid_amount"), + pe.base_paid_amount_after_tax.as_("paid_amount"), pe.reference_no, pe.reference_date, pe.party, From e09fb8759751942e2eb2b1c927f2a18cb8bea566 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 31 Dec 2024 16:57:16 +0530 Subject: [PATCH 0790/1614] refactor: use existing method parameters --- .../accounts/doctype/sales_invoice/test_sales_invoice.py | 8 ++++---- erpnext/controllers/taxes_and_totals.py | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py index 763fea7a260..439fc5639e5 100644 --- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py @@ -2875,8 +2875,8 @@ class TestSalesInvoice(FrappeTestCase): sales_invoice = create_sales_invoice(item="T Shirt", rate=700, do_not_submit=True) item_tax_map = get_item_tax_map( - doc=sales_invoice, - tax_template=sales_invoice.items[0].item_tax_template, + company=sales_invoice.company, + item_tax_template=sales_invoice.items[0].item_tax_template, ) self.assertEqual(sales_invoice.items[0].item_tax_template, "_Test Account Excise Duty @ 12 - _TC") @@ -2888,8 +2888,8 @@ class TestSalesInvoice(FrappeTestCase): sales_invoice.save() item_tax_map = get_item_tax_map( - doc=sales_invoice, - tax_template=sales_invoice.items[0].item_tax_template, + company=sales_invoice.company, + item_tax_template=sales_invoice.items[0].item_tax_template, ) self.assertEqual(sales_invoice.items[0].item_tax_template, "_Test Account Excise Duty @ 10 - _TC") diff --git a/erpnext/controllers/taxes_and_totals.py b/erpnext/controllers/taxes_and_totals.py index 53d0ce0ee2f..8fecb177295 100644 --- a/erpnext/controllers/taxes_and_totals.py +++ b/erpnext/controllers/taxes_and_totals.py @@ -138,8 +138,8 @@ class calculate_taxes_and_totals: def update_item_tax_map(self): for item in self.doc.items: item.item_tax_rate = get_item_tax_map( - doc=self.doc, - tax_template=item.item_tax_template, + company=self.doc.get("company"), + item_tax_template=item.item_tax_template, as_json=True, ) From 8d650e56ba9777c2f0df324a15215cac51641719 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Wed, 1 Jan 2025 08:29:02 +0530 Subject: [PATCH 0791/1614] fix: duplicate validate for closing stock balance (#45015) --- .../doctype/closing_stock_balance/closing_stock_balance.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/closing_stock_balance/closing_stock_balance.py b/erpnext/stock/doctype/closing_stock_balance/closing_stock_balance.py index 8aa49f7cfd8..f6510c04fe9 100644 --- a/erpnext/stock/doctype/closing_stock_balance/closing_stock_balance.py +++ b/erpnext/stock/doctype/closing_stock_balance/closing_stock_balance.py @@ -65,7 +65,7 @@ class ClosingStockBalance(Document): & ( (table.from_date.between(self.from_date, self.to_date)) | (table.to_date.between(self.from_date, self.to_date)) - | ((table.from_date >= self.from_date) & (table.to_date >= self.to_date)) + | ((self.from_date >= table.from_date) & (table.from_date >= self.to_date)) ) ) ) From 52bdf5b17041edda8a021f04f9d8a03f8c011bf3 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 1 Jan 2025 09:08:16 +0530 Subject: [PATCH 0792/1614] fix: precision issue (backport #45013) (#45019) fix: precision issue (#45013) (cherry picked from commit 7db9bcaeacd51bc2cd3dc1ef87e2cad81c7fd269) Co-authored-by: rohitwaghchaure --- erpnext/stock/doctype/stock_entry/stock_entry.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index febc814b978..78f69b1ce62 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -3289,8 +3289,10 @@ def create_serial_and_batch_bundle(parent_doc, row, child, type_of_transaction=N doc.append("entries", {"serial_no": serial_no, "warehouse": row.warehouse, "qty": -1}) elif row.batches_to_be_consume: + precision = frappe.get_precision("Serial and Batch Entry", "qty") doc.has_batch_no = 1 for batch_no, qty in row.batches_to_be_consume.items(): + qty = flt(qty, precision) doc.append("entries", {"batch_no": batch_no, "warehouse": row.warehouse, "qty": qty * -1}) if not doc.entries: From 0a2cc6bcd73ab0c98040cb8b4d247a8176bf9aaf Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 1 Jan 2025 09:24:48 +0530 Subject: [PATCH 0793/1614] fix: incorrect quality inspection linked in purchase receipt (backport #44985) (#45020) * fix: incorrect quality inspection linked in purchase receipt (#44985) (cherry picked from commit b84c8ff960784723458a0fcc50bcf8ffb01b7c23) # Conflicts: # erpnext/stock/doctype/quality_inspection/quality_inspection.json * chore: fix conflicts --------- Co-authored-by: rohitwaghchaure --- erpnext/public/js/controllers/transaction.js | 10 +- .../quality_inspection.json | 14 ++- .../quality_inspection/quality_inspection.py | 102 ++++++++++++++---- 3 files changed, 102 insertions(+), 24 deletions(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 4e573234bb1..b3389b27e84 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -2309,6 +2309,12 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe fieldname: "batch_no", label: __("Batch No"), hidden: true + }, + { + fieldtype: "Data", + fieldname: "child_row_reference", + label: __("Child Row Reference"), + hidden: true } ] } @@ -2352,14 +2358,14 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe if (this.has_inspection_required(item)) { let dialog_items = dialog.fields_dict.items; dialog_items.df.data.push({ - "docname": item.name, "item_code": item.item_code, "item_name": item.item_name, "qty": item.qty, "description": item.description, "serial_no": item.serial_no, "batch_no": item.batch_no, - "sample_size": item.sample_quantity + "sample_size": item.sample_quantity, + "child_row_reference": item.name, }); dialog_items.grid.refresh(); } diff --git a/erpnext/stock/doctype/quality_inspection/quality_inspection.json b/erpnext/stock/doctype/quality_inspection/quality_inspection.json index 914a9f3c21f..56017c4fee2 100644 --- a/erpnext/stock/doctype/quality_inspection/quality_inspection.json +++ b/erpnext/stock/doctype/quality_inspection/quality_inspection.json @@ -15,6 +15,7 @@ "inspection_type", "reference_type", "reference_name", + "child_row_reference", "section_break_7", "item_code", "item_serial_no", @@ -238,6 +239,15 @@ "fieldname": "manual_inspection", "fieldtype": "Check", "label": "Manual Inspection" + }, + { + "fieldname": "child_row_reference", + "fieldtype": "Data", + "hidden": 1, + "label": "Child Row Reference", + "no_copy": 1, + "print_hide": 1, + "read_only": 1 } ], "icon": "fa fa-search", @@ -245,7 +255,7 @@ "index_web_pages_for_search": 1, "is_submittable": 1, "links": [], - "modified": "2023-08-23 11:56:50.282878", + "modified": "2024-12-30 19:08:16.611192", "modified_by": "Administrator", "module": "Stock", "name": "Quality Inspection", @@ -272,4 +282,4 @@ "sort_field": "modified", "sort_order": "ASC", "states": [] -} \ No newline at end of file +} diff --git a/erpnext/stock/doctype/quality_inspection/quality_inspection.py b/erpnext/stock/doctype/quality_inspection/quality_inspection.py index 6890256dc04..d3b5e65ea9f 100644 --- a/erpnext/stock/doctype/quality_inspection/quality_inspection.py +++ b/erpnext/stock/doctype/quality_inspection/quality_inspection.py @@ -29,6 +29,7 @@ class QualityInspection(Document): amended_from: DF.Link | None batch_no: DF.Link | None bom_no: DF.Link | None + child_row_reference: DF.Data | None description: DF.SmallText | None inspected_by: DF.Link inspection_type: DF.Literal["", "Incoming", "Outgoing", "In Process"] @@ -74,6 +75,64 @@ class QualityInspection(Document): self.inspect_and_set_status() self.validate_inspection_required() + self.set_child_row_reference() + + def set_child_row_reference(self): + if self.child_row_reference: + return + + if not (self.reference_type and self.reference_name): + return + + doctype = self.reference_type + " Item" + if self.reference_type == "Stock Entry": + doctype = "Stock Entry Detail" + + child_row_references = frappe.get_all( + doctype, + filters={"parent": self.reference_name, "item_code": self.item_code}, + pluck="name", + ) + + if not child_row_references: + return + + if len(child_row_references) == 1: + self.child_row_reference = child_row_references[0] + else: + self.distribute_child_row_reference(child_row_references) + + def distribute_child_row_reference(self, child_row_references): + quality_inspections = frappe.get_all( + "Quality Inspection", + filters={ + "reference_name": self.reference_name, + "item_code": self.item_code, + "docstatus": ("<", 2), + }, + fields=["name", "child_row_reference", "docstatus"], + order_by="child_row_reference desc", + ) + + for row in quality_inspections: + if not child_row_references: + break + + if row.child_row_reference and row.child_row_reference in child_row_references: + child_row_references.remove(row.child_row_reference) + continue + + if row.docstatus == 1: + continue + + if row.name == self.name: + self.child_row_reference = child_row_references[0] + else: + frappe.db.set_value( + "Quality Inspection", row.name, "child_row_reference", child_row_references[0] + ) + + child_row_references.remove(child_row_references[0]) def validate_inspection_required(self): if self.reference_type in ["Purchase Receipt", "Purchase Invoice"] and not frappe.get_cached_value( @@ -157,35 +216,38 @@ class QualityInspection(Document): ) else: - args = [quality_inspection, self.modified, self.reference_name, self.item_code] doctype = self.reference_type + " Item" if self.reference_type == "Stock Entry": doctype = "Stock Entry Detail" - if self.reference_type and self.reference_name: - conditions = "" + if doctype and self.reference_name: + child_doc = frappe.qb.DocType(doctype) + + query = ( + frappe.qb.update(child_doc) + .set(child_doc.quality_inspection, quality_inspection) + .where( + (child_doc.parent == self.reference_name) & (child_doc.item_code == self.item_code) + ) + ) + if self.batch_no and self.docstatus == 1: - conditions += " and t1.batch_no = %s" - args.append(self.batch_no) + query = query.where(child_doc.batch_no == self.batch_no) if self.docstatus == 2: # if cancel, then remove qi link wherever same name - conditions += " and t1.quality_inspection = %s" - args.append(self.name) + query = query.where(child_doc.quality_inspection == self.name) - frappe.db.sql( - f""" - UPDATE - `tab{doctype}` t1, `tab{self.reference_type}` t2 - SET - t1.quality_inspection = %s, t2.modified = %s - WHERE - t1.parent = %s - and t1.item_code = %s - and t1.parent = t2.name - {conditions} - """, - args, + if self.child_row_reference: + query = query.where(child_doc.name == self.child_row_reference) + + query.run() + + frappe.db.set_value( + self.reference_type, + self.reference_name, + "modified", + self.modified, ) def inspect_and_set_status(self): From f09acc784f76c82151eca18e7d40437baf262368 Mon Sep 17 00:00:00 2001 From: DHINESH00 <18csa09@karpagamtech.ac.in> Date: Mon, 30 Dec 2024 22:47:37 +0530 Subject: [PATCH 0794/1614] fix: apply apply_pricing_rule date change (cherry picked from commit 2cbab9b87590f9d49cbb5bdacde4113d87609389) --- erpnext/public/js/controllers/transaction.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index b3389b27e84..db866bd3b76 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -813,6 +813,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe } validate() { + this.apply_pricing_rule() this.calculate_taxes_and_totals(false); } @@ -974,6 +975,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe } transaction_date() { + this.apply_pricing_rule() if (this.frm.doc.transaction_date) { this.frm.transaction_date = this.frm.doc.transaction_date; frappe.ui.form.trigger(this.frm.doc.doctype, "currency"); @@ -982,6 +984,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe posting_date() { var me = this; + me.apply_pricing_rule() if (this.frm.doc.posting_date) { this.frm.posting_date = this.frm.doc.posting_date; From 3a5959e0237fa51afc5242dcc5818710ac9ae43f Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Wed, 1 Jan 2025 08:37:05 +0000 Subject: [PATCH 0795/1614] chore(release): Bumped to Version 15.47.2 ## [15.47.2](https://github.com/frappe/erpnext/compare/v15.47.1...v15.47.2) (2025-01-01) ### Bug Fixes * add company filter to project ([d550b43](https://github.com/frappe/erpnext/commit/d550b433c1e3f32c0c8efee0be026b174511c8f6)) * allow zero valuation rate (backport [#44902](https://github.com/frappe/erpnext/issues/44902)) ([#44910](https://github.com/frappe/erpnext/issues/44910)) ([9060e4c](https://github.com/frappe/erpnext/commit/9060e4ce57499b5aed335e3fc4b27cd27f452cef)) * apply apply_pricing_rule date change ([f09acc7](https://github.com/frappe/erpnext/commit/f09acc784f76c82151eca18e7d40437baf262368)) * apply discount on qty change ([c19725c](https://github.com/frappe/erpnext/commit/c19725ca74c5a891c08f4f4861794cb2ebea8aa0)) * clear payment schedule in purchase invoice for is_paid ([6cc7060](https://github.com/frappe/erpnext/commit/6cc70605fa4d4b61b329a323aec49b6005ad7af4)) * copy accounting dimensions to asset and sales invoice ([#44964](https://github.com/frappe/erpnext/issues/44964)) ([839ffb3](https://github.com/frappe/erpnext/commit/839ffb3f2a88e6e3c9901a943c52ce5e7ce03669)) * duplicate validate for closing stock balance ([#45015](https://github.com/frappe/erpnext/issues/45015)) ([8d650e5](https://github.com/frappe/erpnext/commit/8d650e56ba9777c2f0df324a15215cac51641719)) * failing tests fixed ([61367ee](https://github.com/frappe/erpnext/commit/61367ee1edb5ebff648750fd1f2886c58acf4198)) * fetch advance payment entries on pos invoice (backport [#44856](https://github.com/frappe/erpnext/issues/44856)) ([#44931](https://github.com/frappe/erpnext/issues/44931)) ([cc827c8](https://github.com/frappe/erpnext/commit/cc827c8077bd0f358ee23c01e92c2ef168c4b4d8)) * fetch amount in company currency ([b135a68](https://github.com/frappe/erpnext/commit/b135a684a5a86b6dcfc0896705f482cebace55df)) * get item tax template based on posting date ([2feeebb](https://github.com/frappe/erpnext/commit/2feeebb5fbe7972b8b638d65b54f441e5cc16b27)) * ignore duplicate while creating default templates ([6c206c1](https://github.com/frappe/erpnext/commit/6c206c1cb324133195913b5b00cf1a88858dd162)) * ignore inventory dimension for SABB and Pick List (backport [#44933](https://github.com/frappe/erpnext/issues/44933)) ([#44941](https://github.com/frappe/erpnext/issues/44941)) ([772b7b9](https://github.com/frappe/erpnext/commit/772b7b95ac5e7445020414cd2775fb729a75775d)) * ignore validate while making WO from MR (backport [#44939](https://github.com/frappe/erpnext/issues/44939)) ([#44942](https://github.com/frappe/erpnext/issues/44942)) ([c33e075](https://github.com/frappe/erpnext/commit/c33e07550cbfdbd5adc113cec35109950500a599)) * in_contex_translation_fixes ([1353a14](https://github.com/frappe/erpnext/commit/1353a14a6b4c58b96916b3bf4f7a27e85716ab79)) * include company in filter condition ([7422043](https://github.com/frappe/erpnext/commit/74220430e537c40ca6b0af1dffe0412f23ef8c99)) * incorrect filter for BOM (backport [#44954](https://github.com/frappe/erpnext/issues/44954)) ([#44956](https://github.com/frappe/erpnext/issues/44956)) ([9853bd9](https://github.com/frappe/erpnext/commit/9853bd9ba128d448999690221cc854ec19da8f29)) * incorrect quality inspection linked in purchase receipt (backport [#44985](https://github.com/frappe/erpnext/issues/44985)) ([#45020](https://github.com/frappe/erpnext/issues/45020)) ([0a2cc6b](https://github.com/frappe/erpnext/commit/0a2cc6bcd73ab0c98040cb8b4d247a8176bf9aaf)) * limit discount value to 100 in pos cart (backport [#44916](https://github.com/frappe/erpnext/issues/44916)) ([#44932](https://github.com/frappe/erpnext/issues/44932)) ([28442f3](https://github.com/frappe/erpnext/commit/28442f34148adcc2cf0b9a301c490a071ec791e5)) * load customer default price list in pos during item selection (backport [#44991](https://github.com/frappe/erpnext/issues/44991)) ([#44993](https://github.com/frappe/erpnext/issues/44993)) ([20efe7b](https://github.com/frappe/erpnext/commit/20efe7bb801be48f5d0df75050d76a715375c8c7)) * material request status (backport [#44917](https://github.com/frappe/erpnext/issues/44917)) ([#44918](https://github.com/frappe/erpnext/issues/44918)) ([042d12b](https://github.com/frappe/erpnext/commit/042d12b2c14ab689d8676803bc6136f897f57932)) * move code from purchase invoice to buying controller ([98631eb](https://github.com/frappe/erpnext/commit/98631eb266889a309961747ee3a2c583aa7c8a63)) * negative stock balance (backport [#44990](https://github.com/frappe/erpnext/issues/44990)) ([#44996](https://github.com/frappe/erpnext/issues/44996)) ([6f71389](https://github.com/frappe/erpnext/commit/6f7138996a0252f919e0ff47f5b19a1dab1ff9d6)) * not able to make purchase receipt from SCR (backport [#44919](https://github.com/frappe/erpnext/issues/44919)) ([#44925](https://github.com/frappe/erpnext/issues/44925)) ([c241262](https://github.com/frappe/erpnext/commit/c24126226660889427bb169d5460e04fa5be7a45)) * pos payment using non-default mode of payment (backport [#44920](https://github.com/frappe/erpnext/issues/44920)) ([#44971](https://github.com/frappe/erpnext/issues/44971)) ([7dd2b0c](https://github.com/frappe/erpnext/commit/7dd2b0c189f2fd0d0c3ab62dc4554dc53521df73)), closes [#41108](https://github.com/frappe/erpnext/issues/41108) * precision issue (backport [#45013](https://github.com/frappe/erpnext/issues/45013)) ([#45019](https://github.com/frappe/erpnext/issues/45019)) ([52bdf5b](https://github.com/frappe/erpnext/commit/52bdf5b17041edda8a021f04f9d8a03f8c011bf3)) * refactor query in get_total_allocated_amount in bank_transaction ([944dc96](https://github.com/frappe/erpnext/commit/944dc966bc2c26bf11986d52d5186f4e89fd11cc)) * relabel rate to tax rate ([991a336](https://github.com/frappe/erpnext/commit/991a3366a8e19cd9ba4f52fe4e911167842b4786)) * remove unused variable ([b892282](https://github.com/frappe/erpnext/commit/b8922823a3e3989827f3009ad17621dbda704543)) * **report:** Purchase Order Analysis pymysql.err (backport [#44957](https://github.com/frappe/erpnext/issues/44957)) ([#44994](https://github.com/frappe/erpnext/issues/44994)) ([ea4b6e8](https://github.com/frappe/erpnext/commit/ea4b6e8dd726e2c8a8a94f7e70bd5cab03ea6876)) * resolved conflicts ([00ae829](https://github.com/frappe/erpnext/commit/00ae829d890011df66cf66460e8119d649571c0e)) * set paid amount in party currency in bank reco payment entry ([6703a45](https://github.com/frappe/erpnext/commit/6703a457fe51024f557c898668eefedc2d3b60f7)) * set/update billing address on change of company ([cfa432d](https://github.com/frappe/erpnext/commit/cfa432dbcae7c5bfec6ec8be83229211de9c639c)) * Show order tax amount in customer currency on the portal (backport [#44915](https://github.com/frappe/erpnext/issues/44915)) ([#44923](https://github.com/frappe/erpnext/issues/44923)) ([5cc9e10](https://github.com/frappe/erpnext/commit/5cc9e10923a1687bf5ee41e7036acd88de397f26)) * SQL syntax error in Purchase Receipt query for empty filters ([#44636](https://github.com/frappe/erpnext/issues/44636)) ([2f279a6](https://github.com/frappe/erpnext/commit/2f279a6eb417af7d43608fc699fe64ae1c9aaae3)) * strings for translation (backport [#44816](https://github.com/frappe/erpnext/issues/44816)) ([#44927](https://github.com/frappe/erpnext/issues/44927)) ([488d808](https://github.com/frappe/erpnext/commit/488d8080c8cd416adcc3249c5f88e505436c805d)) * update item_tax_rate in backend ([8885b07](https://github.com/frappe/erpnext/commit/8885b071143a64912cd00f2632fe4de0ccd8f8d1)) * use meta to check field instead of doctype ([e582ff8](https://github.com/frappe/erpnext/commit/e582ff862e09fdcf024f1df64fbd48945a90002f)) * Validate party on non receivable / payable account (backport [#44883](https://github.com/frappe/erpnext/issues/44883)) ([#44973](https://github.com/frappe/erpnext/issues/44973)) ([d6903fb](https://github.com/frappe/erpnext/commit/d6903fbc8d7f011062d56504d5c20b7d2ebfa859)) * whitespace ([2efc701](https://github.com/frappe/erpnext/commit/2efc701e4e37127aff69035742b0f415ae4b3505)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 5b93888b84e..1b3d96320dc 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.47.1" +__version__ = "15.47.2" def get_default_company(user=None): From 85ba96e0f3377b48da6ac9085de7a7becf70a814 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 1 Jan 2025 15:11:01 +0530 Subject: [PATCH 0796/1614] fix: slow stock transactions (backport #45025) (#45027) fix: slow stock transactions (#45025) (cherry picked from commit e92af10f146491b6e559a61db66dca29311ae7c4) Co-authored-by: rohitwaghchaure --- erpnext/stock/stock_balance.py | 2 +- erpnext/stock/stock_ledger.py | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/erpnext/stock/stock_balance.py b/erpnext/stock/stock_balance.py index 23c21ed096e..6a2f818f7ae 100644 --- a/erpnext/stock/stock_balance.py +++ b/erpnext/stock/stock_balance.py @@ -80,7 +80,7 @@ def get_balance_qty_from_sle(item_code, warehouse): balance_qty = frappe.db.sql( """select qty_after_transaction from `tabStock Ledger Entry` where item_code=%s and warehouse=%s and is_cancelled=0 - order by posting_date desc, posting_time desc, creation desc + order by posting_datetime desc, creation desc limit 1""", (item_code, warehouse), ) diff --git a/erpnext/stock/stock_ledger.py b/erpnext/stock/stock_ledger.py index 5aaf30c9889..1b299b52dd6 100644 --- a/erpnext/stock/stock_ledger.py +++ b/erpnext/stock/stock_ledger.py @@ -1570,7 +1570,7 @@ def get_previous_sle_of_current_voucher(args, operator="<", exclude_current_vouc and ( posting_datetime {operator} %(posting_datetime)s ) - order by posting_date desc, posting_time desc, creation desc + order by posting_datetime desc, creation desc limit 1 for update""", { @@ -1664,7 +1664,7 @@ def get_stock_ledger_entries( where item_code = %(item_code)s and is_cancelled = 0 {conditions} - order by posting_date {order}, posting_time {order}, creation {order} + order by posting_datetime {order}, creation {order} {limit} {for_update}""".format( conditions=conditions, limit=limit or "", @@ -1786,7 +1786,7 @@ def get_valuation_rate( AND valuation_rate >= 0 AND is_cancelled = 0 AND NOT (voucher_no = %s AND voucher_type = %s) - order by posting_date desc, posting_time desc, name desc limit 1""", + order by posting_datetime desc, creation desc limit 1""", (item_code, warehouse, voucher_no, voucher_type), ): return flt(last_valuation_rate[0][0]) @@ -2037,7 +2037,7 @@ def get_future_sle_with_negative_qty(sle_args): and posting_datetime >= %(posting_datetime)s and is_cancelled = 0 and qty_after_transaction < 0 - order by posting_date asc, posting_time asc + order by posting_datetime asc, creation asc limit 1 """, sle_args, @@ -2051,14 +2051,14 @@ def get_future_sle_with_negative_batch_qty(sle_args): with batch_ledger as ( select posting_date, posting_time, posting_datetime, voucher_type, voucher_no, - sum(actual_qty) over (order by posting_date, posting_time, creation) as cumulative_total + sum(actual_qty) over (order by posting_datetime, creation) as cumulative_total from `tabStock Ledger Entry` where item_code = %(item_code)s and warehouse = %(warehouse)s and batch_no=%(batch_no)s and is_cancelled = 0 - order by posting_date, posting_time, creation + order by posting_datetime, creation ) select * from batch_ledger where From bb75adb59c690d0e0831aa546d2e7d589894beb3 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 1 Jan 2025 15:11:01 +0530 Subject: [PATCH 0797/1614] fix: slow stock transactions (backport #45025) (#45027) fix: slow stock transactions (#45025) (cherry picked from commit e92af10f146491b6e559a61db66dca29311ae7c4) Co-authored-by: rohitwaghchaure (cherry picked from commit 85ba96e0f3377b48da6ac9085de7a7becf70a814) --- erpnext/stock/stock_balance.py | 2 +- erpnext/stock/stock_ledger.py | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/erpnext/stock/stock_balance.py b/erpnext/stock/stock_balance.py index 23c21ed096e..6a2f818f7ae 100644 --- a/erpnext/stock/stock_balance.py +++ b/erpnext/stock/stock_balance.py @@ -80,7 +80,7 @@ def get_balance_qty_from_sle(item_code, warehouse): balance_qty = frappe.db.sql( """select qty_after_transaction from `tabStock Ledger Entry` where item_code=%s and warehouse=%s and is_cancelled=0 - order by posting_date desc, posting_time desc, creation desc + order by posting_datetime desc, creation desc limit 1""", (item_code, warehouse), ) diff --git a/erpnext/stock/stock_ledger.py b/erpnext/stock/stock_ledger.py index 5aaf30c9889..1b299b52dd6 100644 --- a/erpnext/stock/stock_ledger.py +++ b/erpnext/stock/stock_ledger.py @@ -1570,7 +1570,7 @@ def get_previous_sle_of_current_voucher(args, operator="<", exclude_current_vouc and ( posting_datetime {operator} %(posting_datetime)s ) - order by posting_date desc, posting_time desc, creation desc + order by posting_datetime desc, creation desc limit 1 for update""", { @@ -1664,7 +1664,7 @@ def get_stock_ledger_entries( where item_code = %(item_code)s and is_cancelled = 0 {conditions} - order by posting_date {order}, posting_time {order}, creation {order} + order by posting_datetime {order}, creation {order} {limit} {for_update}""".format( conditions=conditions, limit=limit or "", @@ -1786,7 +1786,7 @@ def get_valuation_rate( AND valuation_rate >= 0 AND is_cancelled = 0 AND NOT (voucher_no = %s AND voucher_type = %s) - order by posting_date desc, posting_time desc, name desc limit 1""", + order by posting_datetime desc, creation desc limit 1""", (item_code, warehouse, voucher_no, voucher_type), ): return flt(last_valuation_rate[0][0]) @@ -2037,7 +2037,7 @@ def get_future_sle_with_negative_qty(sle_args): and posting_datetime >= %(posting_datetime)s and is_cancelled = 0 and qty_after_transaction < 0 - order by posting_date asc, posting_time asc + order by posting_datetime asc, creation asc limit 1 """, sle_args, @@ -2051,14 +2051,14 @@ def get_future_sle_with_negative_batch_qty(sle_args): with batch_ledger as ( select posting_date, posting_time, posting_datetime, voucher_type, voucher_no, - sum(actual_qty) over (order by posting_date, posting_time, creation) as cumulative_total + sum(actual_qty) over (order by posting_datetime, creation) as cumulative_total from `tabStock Ledger Entry` where item_code = %(item_code)s and warehouse = %(warehouse)s and batch_no=%(batch_no)s and is_cancelled = 0 - order by posting_date, posting_time, creation + order by posting_datetime, creation ) select * from batch_ledger where From 005df08656b99c891f511e1a0ea122d0b4895016 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Wed, 1 Jan 2025 10:00:40 +0000 Subject: [PATCH 0798/1614] chore(release): Bumped to Version 15.47.3 ## [15.47.3](https://github.com/frappe/erpnext/compare/v15.47.2...v15.47.3) (2025-01-01) ### Bug Fixes * slow stock transactions (backport [#45025](https://github.com/frappe/erpnext/issues/45025)) ([#45027](https://github.com/frappe/erpnext/issues/45027)) ([bb75adb](https://github.com/frappe/erpnext/commit/bb75adb59c690d0e0831aa546d2e7d589894beb3)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 1b3d96320dc..0c79c64e174 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.47.2" +__version__ = "15.47.3" def get_default_company(user=None): From 66544bfa109bd65763cc682211fed2ae00affec3 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Tue, 31 Dec 2024 12:53:30 +0530 Subject: [PATCH 0799/1614] fix: Added patch and fallback code to prevent future issues similiar to helpdesk ticket 28246 (cherry picked from commit 65dc3505c405b4fe8c237bcb55c38d8cef6bf684) # Conflicts: # erpnext/patches.txt --- .../controllers/subcontracting_controller.py | 10 +++++++ erpnext/patches.txt | 5 ++++ .../patches/set_sc_conversion_factor.py | 26 +++++++++++++++++++ 3 files changed, 41 insertions(+) create mode 100644 erpnext/subcontracting/doctype/subcontracting_order/patches/set_sc_conversion_factor.py diff --git a/erpnext/controllers/subcontracting_controller.py b/erpnext/controllers/subcontracting_controller.py index 75cb5516348..5a8fa03d814 100644 --- a/erpnext/controllers/subcontracting_controller.py +++ b/erpnext/controllers/subcontracting_controller.py @@ -103,6 +103,16 @@ class SubcontractingController(StockController): _("Row {0}: Item {1} must be a subcontracted item.").format(item.idx, item.item_name) ) + if ( + not item.sc_conversion_factor + ): # this condition will only be true if user has recently updated from develop branch + service_item_qty = frappe.get_value( + "Subcontracting Order Service Item", + filters={"purchase_order_item": item.purchase_order_item, "parent": self.name}, + fieldname=["qty"], + ) + item.sc_conversion_factor = service_item_qty / item.qty + if ( self.doctype not in "Subcontracting Receipt" and item.qty diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 7e03ef9394c..075a1f4b8a7 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -386,3 +386,8 @@ erpnext.patches.v14_0.update_stock_uom_in_work_order_item erpnext.patches.v15_0.set_is_exchange_gain_loss_in_payment_entry_deductions erpnext.patches.v15_0.enable_allow_existing_serial_no erpnext.patches.v15_0.update_cc_in_process_statement_of_accounts +<<<<<<< HEAD +======= +erpnext.patches.v15_0.refactor_closing_stock_balance #5 +erpnext.subcontracting.doctype.subcontracting_order.patches.set_sc_conversion_factor +>>>>>>> 65dc3505c4 (fix: Added patch and fallback code to prevent future issues similiar to helpdesk ticket 28246) diff --git a/erpnext/subcontracting/doctype/subcontracting_order/patches/set_sc_conversion_factor.py b/erpnext/subcontracting/doctype/subcontracting_order/patches/set_sc_conversion_factor.py new file mode 100644 index 00000000000..1b23c9565bf --- /dev/null +++ b/erpnext/subcontracting/doctype/subcontracting_order/patches/set_sc_conversion_factor.py @@ -0,0 +1,26 @@ +import frappe + + +def execute(): + # Calculate and set sc_conversion_factor for draft Subcontracting Orders if value is 0 + + subcontracting_order_items = frappe.get_all( + "Subcontracting Order Item", + filters={"docstatus": 0, "sc_conversion_factor": 0}, + fields=["name", "parent", "purchase_order_item", "qty"], + ) + for subcontracting_order_item in subcontracting_order_items: + service_item_qty = frappe.get_value( + "Subcontracting Order Service Item", + filters={ + "purchase_order_item": subcontracting_order_item.purchase_order_item, + "parent": subcontracting_order_item.parent, + }, + fieldname=["qty"], + ) + frappe.set_value( + "Subcontracting Order Item", + subcontracting_order_item.name, + "sc_conversion_factor", + service_item_qty / subcontracting_order_item.qty, + ) From b3b808335f34ee73df494d8ef015001388d0bca1 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Tue, 31 Dec 2024 20:33:05 +0530 Subject: [PATCH 0800/1614] fix: Fixed logic in if condition causing tests to fail (cherry picked from commit 575fb43f9cd5852b37f1a3fe17db3206df596608) --- erpnext/controllers/subcontracting_controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/controllers/subcontracting_controller.py b/erpnext/controllers/subcontracting_controller.py index 5a8fa03d814..0f9431ab440 100644 --- a/erpnext/controllers/subcontracting_controller.py +++ b/erpnext/controllers/subcontracting_controller.py @@ -104,7 +104,7 @@ class SubcontractingController(StockController): ) if ( - not item.sc_conversion_factor + self.doctype == "Subcontracting Order" and not item.sc_conversion_factor ): # this condition will only be true if user has recently updated from develop branch service_item_qty = frappe.get_value( "Subcontracting Order Service Item", From 163af91c377bfd2398b892e7e3abd9033e401f49 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Wed, 1 Jan 2025 13:49:49 +0530 Subject: [PATCH 0801/1614] fix: Removed patch as instructed by mentor (cherry picked from commit d1d01482dfb006a956e010f0e27b322632072804) # Conflicts: # erpnext/patches.txt --- erpnext/patches.txt | 4 +++ .../patches/set_sc_conversion_factor.py | 26 ------------------- 2 files changed, 4 insertions(+), 26 deletions(-) delete mode 100644 erpnext/subcontracting/doctype/subcontracting_order/patches/set_sc_conversion_factor.py diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 075a1f4b8a7..d712933a898 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -387,7 +387,11 @@ erpnext.patches.v15_0.set_is_exchange_gain_loss_in_payment_entry_deductions erpnext.patches.v15_0.enable_allow_existing_serial_no erpnext.patches.v15_0.update_cc_in_process_statement_of_accounts <<<<<<< HEAD +<<<<<<< HEAD ======= erpnext.patches.v15_0.refactor_closing_stock_balance #5 erpnext.subcontracting.doctype.subcontracting_order.patches.set_sc_conversion_factor >>>>>>> 65dc3505c4 (fix: Added patch and fallback code to prevent future issues similiar to helpdesk ticket 28246) +======= +erpnext.patches.v15_0.refactor_closing_stock_balance #5 +>>>>>>> d1d01482df (fix: Removed patch as instructed by mentor) diff --git a/erpnext/subcontracting/doctype/subcontracting_order/patches/set_sc_conversion_factor.py b/erpnext/subcontracting/doctype/subcontracting_order/patches/set_sc_conversion_factor.py deleted file mode 100644 index 1b23c9565bf..00000000000 --- a/erpnext/subcontracting/doctype/subcontracting_order/patches/set_sc_conversion_factor.py +++ /dev/null @@ -1,26 +0,0 @@ -import frappe - - -def execute(): - # Calculate and set sc_conversion_factor for draft Subcontracting Orders if value is 0 - - subcontracting_order_items = frappe.get_all( - "Subcontracting Order Item", - filters={"docstatus": 0, "sc_conversion_factor": 0}, - fields=["name", "parent", "purchase_order_item", "qty"], - ) - for subcontracting_order_item in subcontracting_order_items: - service_item_qty = frappe.get_value( - "Subcontracting Order Service Item", - filters={ - "purchase_order_item": subcontracting_order_item.purchase_order_item, - "parent": subcontracting_order_item.parent, - }, - fieldname=["qty"], - ) - frappe.set_value( - "Subcontracting Order Item", - subcontracting_order_item.name, - "sc_conversion_factor", - service_item_qty / subcontracting_order_item.qty, - ) From ab87265395c99b12ef0a2fd764930fa909ce8ab7 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Tue, 31 Dec 2024 12:53:30 +0530 Subject: [PATCH 0802/1614] fix: Added patch and fallback code to prevent future issues similiar to helpdesk ticket 28246 --- erpnext/patches.txt | 8 ------ .../patches/set_sc_conversion_factor.py | 26 +++++++++++++++++++ 2 files changed, 26 insertions(+), 8 deletions(-) create mode 100644 erpnext/subcontracting/doctype/subcontracting_order/patches/set_sc_conversion_factor.py diff --git a/erpnext/patches.txt b/erpnext/patches.txt index d712933a898..cb240acf4b8 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -386,12 +386,4 @@ erpnext.patches.v14_0.update_stock_uom_in_work_order_item erpnext.patches.v15_0.set_is_exchange_gain_loss_in_payment_entry_deductions erpnext.patches.v15_0.enable_allow_existing_serial_no erpnext.patches.v15_0.update_cc_in_process_statement_of_accounts -<<<<<<< HEAD -<<<<<<< HEAD -======= erpnext.patches.v15_0.refactor_closing_stock_balance #5 -erpnext.subcontracting.doctype.subcontracting_order.patches.set_sc_conversion_factor ->>>>>>> 65dc3505c4 (fix: Added patch and fallback code to prevent future issues similiar to helpdesk ticket 28246) -======= -erpnext.patches.v15_0.refactor_closing_stock_balance #5 ->>>>>>> d1d01482df (fix: Removed patch as instructed by mentor) diff --git a/erpnext/subcontracting/doctype/subcontracting_order/patches/set_sc_conversion_factor.py b/erpnext/subcontracting/doctype/subcontracting_order/patches/set_sc_conversion_factor.py new file mode 100644 index 00000000000..1b23c9565bf --- /dev/null +++ b/erpnext/subcontracting/doctype/subcontracting_order/patches/set_sc_conversion_factor.py @@ -0,0 +1,26 @@ +import frappe + + +def execute(): + # Calculate and set sc_conversion_factor for draft Subcontracting Orders if value is 0 + + subcontracting_order_items = frappe.get_all( + "Subcontracting Order Item", + filters={"docstatus": 0, "sc_conversion_factor": 0}, + fields=["name", "parent", "purchase_order_item", "qty"], + ) + for subcontracting_order_item in subcontracting_order_items: + service_item_qty = frappe.get_value( + "Subcontracting Order Service Item", + filters={ + "purchase_order_item": subcontracting_order_item.purchase_order_item, + "parent": subcontracting_order_item.parent, + }, + fieldname=["qty"], + ) + frappe.set_value( + "Subcontracting Order Item", + subcontracting_order_item.name, + "sc_conversion_factor", + service_item_qty / subcontracting_order_item.qty, + ) From 3049027f437ade49db2fa0cf9fcc1c67c11fb750 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Wed, 1 Jan 2025 13:49:49 +0530 Subject: [PATCH 0803/1614] fix: Removed patch as instructed by mentor --- .../patches/set_sc_conversion_factor.py | 26 ------------------- 1 file changed, 26 deletions(-) delete mode 100644 erpnext/subcontracting/doctype/subcontracting_order/patches/set_sc_conversion_factor.py diff --git a/erpnext/subcontracting/doctype/subcontracting_order/patches/set_sc_conversion_factor.py b/erpnext/subcontracting/doctype/subcontracting_order/patches/set_sc_conversion_factor.py deleted file mode 100644 index 1b23c9565bf..00000000000 --- a/erpnext/subcontracting/doctype/subcontracting_order/patches/set_sc_conversion_factor.py +++ /dev/null @@ -1,26 +0,0 @@ -import frappe - - -def execute(): - # Calculate and set sc_conversion_factor for draft Subcontracting Orders if value is 0 - - subcontracting_order_items = frappe.get_all( - "Subcontracting Order Item", - filters={"docstatus": 0, "sc_conversion_factor": 0}, - fields=["name", "parent", "purchase_order_item", "qty"], - ) - for subcontracting_order_item in subcontracting_order_items: - service_item_qty = frappe.get_value( - "Subcontracting Order Service Item", - filters={ - "purchase_order_item": subcontracting_order_item.purchase_order_item, - "parent": subcontracting_order_item.parent, - }, - fieldname=["qty"], - ) - frappe.set_value( - "Subcontracting Order Item", - subcontracting_order_item.name, - "sc_conversion_factor", - service_item_qty / subcontracting_order_item.qty, - ) From 00102a15e3870888bcf74a5215141e77d1aaf8b0 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Thu, 2 Jan 2025 09:44:32 +0530 Subject: [PATCH 0804/1614] fix: BOM cost update issue (cherry picked from commit 28ea3ddd51e3ec3c0043722b5477386a77b5357e) --- .../doctype/bom_update_tool/bom_update_tool.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/erpnext/manufacturing/doctype/bom_update_tool/bom_update_tool.py b/erpnext/manufacturing/doctype/bom_update_tool/bom_update_tool.py index 2e8dba1ccfe..983dd2d4cd8 100644 --- a/erpnext/manufacturing/doctype/bom_update_tool/bom_update_tool.py +++ b/erpnext/manufacturing/doctype/bom_update_tool/bom_update_tool.py @@ -9,6 +9,7 @@ if TYPE_CHECKING: import frappe from frappe.model.document import Document +from frappe.utils import date_diff, get_datetime, now class BOMUpdateTool(Document): @@ -50,13 +51,21 @@ def auto_update_latest_price_in_all_boms() -> None: if frappe.db.get_single_value("Manufacturing Settings", "update_bom_costs_automatically"): wip_log = frappe.get_all( "BOM Update Log", - {"update_type": "Update Cost", "status": ["in", ["Queued", "In Progress"]]}, + fields=["creation", "status"], + filters={"update_type": "Update Cost", "status": ["in", ["Queued", "In Progress"]]}, limit_page_length=1, + order_by="creation desc", ) - if not wip_log: + + if not wip_log or is_older_log(wip_log[0]): create_bom_update_log(update_type="Update Cost") +def is_older_log(log: dict) -> bool: + no_of_days = date_diff(get_datetime(now()), get_datetime(log.creation)) + return no_of_days > 10 + + def create_bom_update_log( boms: dict[str, str] | None = None, update_type: Literal["Replace BOM", "Update Cost"] = "Replace BOM", From f9d038ee4a255dc1e1e34b178d119b7e79936b62 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Thu, 2 Jan 2025 10:51:11 +0530 Subject: [PATCH 0805/1614] fix: removed unknown patch? --- erpnext/patches.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/erpnext/patches.txt b/erpnext/patches.txt index cb240acf4b8..7e03ef9394c 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -386,4 +386,3 @@ erpnext.patches.v14_0.update_stock_uom_in_work_order_item erpnext.patches.v15_0.set_is_exchange_gain_loss_in_payment_entry_deductions erpnext.patches.v15_0.enable_allow_existing_serial_no erpnext.patches.v15_0.update_cc_in_process_statement_of_accounts -erpnext.patches.v15_0.refactor_closing_stock_balance #5 From d31b0a507f6b6793890f3984be3d03207e3e67c6 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Thu, 2 Jan 2025 10:26:51 +0530 Subject: [PATCH 0806/1614] fix: removed unused code (cherry picked from commit dc5f2d35ac4367e7e7c17e4b16edf57b169d0aba) --- .../stock/doctype/stock_entry/stock_entry.py | 35 ------------------- 1 file changed, 35 deletions(-) diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index 78f69b1ce62..8232cbe8e5f 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -201,7 +201,6 @@ class StockEntry(StockController): self.validate_purpose() self.validate_item() self.validate_customer_provided_item() - self.validate_qty() self.set_transfer_qty() self.validate_uom_is_integer("uom", "qty") self.validate_uom_is_integer("stock_uom", "transfer_qty") @@ -463,40 +462,6 @@ class StockEntry(StockController): flt(item.qty) * flt(item.conversion_factor), self.precision("transfer_qty", item) ) - def validate_qty(self): - manufacture_purpose = ["Manufacture", "Material Consumption for Manufacture"] - - if self.purpose in manufacture_purpose and self.work_order: - if not frappe.get_value("Work Order", self.work_order, "skip_transfer"): - item_code = [] - for item in self.items: - if cstr(item.t_warehouse) == "": - req_items = frappe.get_all( - "Work Order Item", - filters={"parent": self.work_order, "item_code": item.item_code}, - fields=["item_code"], - ) - - transferred_materials = frappe.db.sql( - """ - select - sum(sed.qty) as qty - from `tabStock Entry` se,`tabStock Entry Detail` sed - where - se.name = sed.parent and se.docstatus=1 and - (se.purpose='Material Transfer for Manufacture' or se.purpose='Manufacture') - and sed.item_code=%s and se.work_order= %s and ifnull(sed.t_warehouse, '') != '' - """, - (item.item_code, self.work_order), - as_dict=1, - ) - - stock_qty = flt(item.qty) - trans_qty = flt(transferred_materials[0].qty) - if req_items: - if stock_qty > trans_qty: - item_code.append(item.item_code) - def validate_fg_completed_qty(self): item_wise_qty = {} if self.purpose == "Manufacture" and self.work_order: From b5f6926140711407d83516b7aa1081e59f640fac Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Thu, 2 Jan 2025 13:11:19 +0530 Subject: [PATCH 0807/1614] fix: validate components and their qty as per BOM in the stock entry (cherry picked from commit b1de82ddad62bc19c249e26c910654384fbfdb2c) --- .../manufacturing_settings.json | 6 +-- .../doctype/work_order/test_work_order.py | 50 +++++++++++++++++++ .../stock/doctype/stock_entry/stock_entry.py | 31 ++++++++---- 3 files changed, 74 insertions(+), 13 deletions(-) diff --git a/erpnext/manufacturing/doctype/manufacturing_settings/manufacturing_settings.json b/erpnext/manufacturing/doctype/manufacturing_settings/manufacturing_settings.json index 26cbc03eeb2..618ccdf8fc8 100644 --- a/erpnext/manufacturing/doctype/manufacturing_settings/manufacturing_settings.json +++ b/erpnext/manufacturing/doctype/manufacturing_settings/manufacturing_settings.json @@ -242,14 +242,14 @@ "depends_on": "eval:doc.backflush_raw_materials_based_on == \"BOM\"", "fieldname": "validate_components_quantities_per_bom", "fieldtype": "Check", - "label": "Validate Components Quantities Per BOM" + "label": "Validate Components and Quantities Per BOM" } ], "icon": "icon-wrench", "index_web_pages_for_search": 1, "issingle": 1, "links": [], - "modified": "2024-09-02 12:12:03.132567", + "modified": "2025-01-02 12:46:33.520853", "modified_by": "Administrator", "module": "Manufacturing", "name": "Manufacturing Settings", @@ -267,4 +267,4 @@ "sort_order": "DESC", "states": [], "track_changes": 1 -} +} \ No newline at end of file diff --git a/erpnext/manufacturing/doctype/work_order/test_work_order.py b/erpnext/manufacturing/doctype/work_order/test_work_order.py index f8ddf007428..86a03e7919c 100644 --- a/erpnext/manufacturing/doctype/work_order/test_work_order.py +++ b/erpnext/manufacturing/doctype/work_order/test_work_order.py @@ -2401,6 +2401,56 @@ class TestWorkOrder(FrappeTestCase): frappe.db.set_single_value("Manufacturing Settings", "validate_components_quantities_per_bom", 0) + def test_components_as_per_bom_for_manufacture_entry(self): + frappe.db.set_single_value("Manufacturing Settings", "backflush_raw_materials_based_on", "BOM") + frappe.db.set_single_value("Manufacturing Settings", "validate_components_quantities_per_bom", 1) + + fg_item = "Test FG Item For Component Validation 1" + source_warehouse = "Stores - _TC" + raw_materials = ["Test Component Validation RM Item 11", "Test Component Validation RM Item 12"] + + make_item(fg_item, {"is_stock_item": 1}) + for item in raw_materials: + make_item(item, {"is_stock_item": 1}) + test_stock_entry.make_stock_entry( + item_code=item, + target=source_warehouse, + qty=10, + basic_rate=100, + ) + + make_bom(item=fg_item, source_warehouse=source_warehouse, raw_materials=raw_materials) + + wo = make_wo_order_test_record( + item=fg_item, + qty=10, + source_warehouse=source_warehouse, + ) + + transfer_entry = frappe.get_doc(make_stock_entry(wo.name, "Material Transfer for Manufacture", 10)) + transfer_entry.save() + transfer_entry.remove(transfer_entry.items[0]) + + self.assertRaises(frappe.ValidationError, transfer_entry.save) + + transfer_entry = frappe.get_doc(make_stock_entry(wo.name, "Material Transfer for Manufacture", 10)) + transfer_entry.save() + transfer_entry.submit() + + manufacture_entry = frappe.get_doc(make_stock_entry(wo.name, "Manufacture", 10)) + manufacture_entry.save() + + manufacture_entry.remove(manufacture_entry.items[0]) + + self.assertRaises(frappe.ValidationError, manufacture_entry.save) + manufacture_entry.delete() + + manufacture_entry = frappe.get_doc(make_stock_entry(wo.name, "Manufacture", 10)) + manufacture_entry.save() + manufacture_entry.submit() + + frappe.db.set_single_value("Manufacturing Settings", "validate_components_quantities_per_bom", 0) + def make_operation(**kwargs): kwargs = frappe._dict(kwargs) diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index 8232cbe8e5f..4b4ee6ad0f1 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -231,7 +231,7 @@ class StockEntry(StockController): self.validate_serialized_batch() self.calculate_rate_and_amount() self.validate_putaway_capacity() - self.validate_component_quantities() + self.validate_component_and_quantities() if not self.get("purpose") == "Manufacture": # ignore scrap item wh difference and empty source/target wh @@ -713,7 +713,7 @@ class StockEntry(StockController): title=_("Insufficient Stock"), ) - def validate_component_quantities(self): + def validate_component_and_quantities(self): if self.purpose not in ["Manufacture", "Material Transfer for Manufacture"]: return @@ -726,20 +726,31 @@ class StockEntry(StockController): raw_materials = self.get_bom_raw_materials(self.fg_completed_qty) precision = frappe.get_precision("Stock Entry Detail", "qty") - for row in self.items: - if not row.s_warehouse: - continue - - if details := raw_materials.get(row.item_code): - if flt(details.get("qty"), precision) != flt(row.qty, precision): + for item_code, details in raw_materials.items(): + if matched_item := self.get_matched_items(item_code): + if flt(details.get("qty"), precision) != flt(matched_item.qty, precision): frappe.throw( _("For the item {0}, the quantity should be {1} according to the BOM {2}.").format( - frappe.bold(row.item_code), - flt(details.get("qty"), precision), + frappe.bold(item_code), + flt(details.get("qty")), get_link_to_form("BOM", self.bom_no), ), title=_("Incorrect Component Quantity"), ) + else: + frappe.throw( + _("According to the BOM {0}, the Item '{1}' is missing in the stock entry.").format( + get_link_to_form("BOM", self.bom_no), frappe.bold(item_code) + ), + title=_("Missing Item"), + ) + + def get_matched_items(self, item_code): + for row in self.items: + if row.item_code == item_code: + return row + + return {} @frappe.whitelist() def get_stock_and_rate(self): From 6247d5aadb73c216f36646919b6883f7a582fa87 Mon Sep 17 00:00:00 2001 From: sokumon Date: Thu, 2 Jan 2025 17:37:46 +0530 Subject: [PATCH 0808/1614] fix(style): set image width in BOM (cherry picked from commit b634ba7f54f9cfe5481097ba8392af8082f1de12) --- erpnext/manufacturing/doctype/bom/bom_item_preview.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/bom/bom_item_preview.html b/erpnext/manufacturing/doctype/bom/bom_item_preview.html index eb4135e03ac..2c0f091da58 100644 --- a/erpnext/manufacturing/doctype/bom/bom_item_preview.html +++ b/erpnext/manufacturing/doctype/bom/bom_item_preview.html @@ -3,7 +3,7 @@
{% if data.image %}
- +
{% endif %}
From 4dfc5a664a728aa54f892f6207a1c8f1696ddf6e Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 2 Jan 2025 20:50:28 +0530 Subject: [PATCH 0809/1614] chore: partial revert #44989 (cherry picked from commit 63d547fb4af311cdb061a029a4e6ca0ae41bbaed) --- erpnext/public/js/controllers/transaction.js | 1 - 1 file changed, 1 deletion(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index db866bd3b76..f6d124de23d 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -813,7 +813,6 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe } validate() { - this.apply_pricing_rule() this.calculate_taxes_and_totals(false); } From a5a219cd6ec01abcd546e206c7be19c9b7d63a58 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 2 Jan 2025 20:50:28 +0530 Subject: [PATCH 0810/1614] chore: partial revert #44989 (cherry picked from commit 63d547fb4af311cdb061a029a4e6ca0ae41bbaed) --- erpnext/public/js/controllers/transaction.js | 1 - 1 file changed, 1 deletion(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index db866bd3b76..f6d124de23d 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -813,7 +813,6 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe } validate() { - this.apply_pricing_rule() this.calculate_taxes_and_totals(false); } From c3d1e122be58203d4294fa62b419c6811355c504 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Fri, 3 Jan 2025 01:24:44 +0000 Subject: [PATCH 0811/1614] chore(release): Bumped to Version 15.47.4 ## [15.47.4](https://github.com/frappe/erpnext/compare/v15.47.3...v15.47.4) (2025-01-03) ### Bug Fixes * Added patch and fallback code to prevent future issues similiar to helpdesk ticket 28246 ([ab87265](https://github.com/frappe/erpnext/commit/ab87265395c99b12ef0a2fd764930fa909ce8ab7)) * Added patch and fallback code to prevent future issues similiar to helpdesk ticket 28246 ([66544bf](https://github.com/frappe/erpnext/commit/66544bfa109bd65763cc682211fed2ae00affec3)) * BOM cost update issue ([00102a1](https://github.com/frappe/erpnext/commit/00102a15e3870888bcf74a5215141e77d1aaf8b0)) * Fixed logic in if condition causing tests to fail ([b3b8083](https://github.com/frappe/erpnext/commit/b3b808335f34ee73df494d8ef015001388d0bca1)) * Removed patch as instructed by mentor ([3049027](https://github.com/frappe/erpnext/commit/3049027f437ade49db2fa0cf9fcc1c67c11fb750)) * Removed patch as instructed by mentor ([163af91](https://github.com/frappe/erpnext/commit/163af91c377bfd2398b892e7e3abd9033e401f49)) * removed unknown patch? ([f9d038e](https://github.com/frappe/erpnext/commit/f9d038ee4a255dc1e1e34b178d119b7e79936b62)) * removed unused code ([d31b0a5](https://github.com/frappe/erpnext/commit/d31b0a507f6b6793890f3984be3d03207e3e67c6)) * slow stock transactions (backport [#45025](https://github.com/frappe/erpnext/issues/45025)) ([#45027](https://github.com/frappe/erpnext/issues/45027)) ([85ba96e](https://github.com/frappe/erpnext/commit/85ba96e0f3377b48da6ac9085de7a7becf70a814)) * **style:** set image width in BOM ([6247d5a](https://github.com/frappe/erpnext/commit/6247d5aadb73c216f36646919b6883f7a582fa87)) * validate components and their qty as per BOM in the stock entry ([b5f6926](https://github.com/frappe/erpnext/commit/b5f6926140711407d83516b7aa1081e59f640fac)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 0c79c64e174..b66aaef899b 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.47.3" +__version__ = "15.47.4" def get_default_company(user=None): From 500deff3e9e695d6cc80320d8bce4fad0739a91d Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 3 Jan 2025 13:19:34 +0100 Subject: [PATCH 0812/1614] feat: validate discount date in payment schedule (backport #44646) (#44727) Co-authored-by: barredterra <14891507+barredterra@users.noreply.github.com> --- erpnext/controllers/accounts_controller.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index f9c875477b9..19df2d0489c 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -2353,6 +2353,7 @@ class AccountsController(TransactionBase): return for d in self.get("payment_schedule"): + d.validate_from_to_dates("discount_date", "due_date") if self.doctype == "Sales Order" and getdate(d.due_date) < getdate(self.transaction_date): frappe.throw( _("Row {0}: Due Date in the Payment Terms table cannot be before Posting Date").format( From 03b06fc3ff1ab13956f53841c0f7b601a3703a57 Mon Sep 17 00:00:00 2001 From: Sanket322 Date: Mon, 30 Dec 2024 17:56:17 +0530 Subject: [PATCH 0813/1614] fix: add monthly distributation and write query in qb (cherry picked from commit 27195c7c9640b06eb548a8505dd6f83e623d552d) --- erpnext/accounts/doctype/budget/budget.py | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/erpnext/accounts/doctype/budget/budget.py b/erpnext/accounts/doctype/budget/budget.py index 145480138d6..fa711e2edbf 100644 --- a/erpnext/accounts/doctype/budget/budget.py +++ b/erpnext/accounts/doctype/budget/budget.py @@ -490,13 +490,19 @@ def get_actual_expense(args): def get_accumulated_monthly_budget(monthly_distribution, posting_date, fiscal_year, annual_budget): distribution = {} if monthly_distribution: - for d in frappe.db.sql( - """select mdp.month, mdp.percentage_allocation - from `tabMonthly Distribution Percentage` mdp, `tabMonthly Distribution` md - where mdp.parent=md.name and md.fiscal_year=%s""", - fiscal_year, - as_dict=1, - ): + mdp = frappe.qb.DocType("Monthly Distribution Percentage") + md = frappe.qb.DocType("Monthly Distribution") + + query = ( + frappe.qb.from_(mdp) + .join(md) + .on(mdp.parent == md.name) + .select(mdp.month, mdp.percentage_allocation) + .where(md.fiscal_year == fiscal_year) + .where(md.name == monthly_distribution) + ) + + for d in query.run(as_dict=True): distribution.setdefault(d.month, d.percentage_allocation) dt = frappe.get_cached_value("Fiscal Year", fiscal_year, "year_start_date") From 2e67a3341228207bcdde6132d9faecbf77661674 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 31 Dec 2024 17:04:37 +0530 Subject: [PATCH 0814/1614] refactor: store result in variable before enumeration helps to inspect result while debugging (cherry picked from commit b60bd17d1ddc9cc61d9fba44eb495bec174d66b2) --- erpnext/accounts/doctype/budget/budget.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/budget/budget.py b/erpnext/accounts/doctype/budget/budget.py index fa711e2edbf..2f2b549cf46 100644 --- a/erpnext/accounts/doctype/budget/budget.py +++ b/erpnext/accounts/doctype/budget/budget.py @@ -493,16 +493,17 @@ def get_accumulated_monthly_budget(monthly_distribution, posting_date, fiscal_ye mdp = frappe.qb.DocType("Monthly Distribution Percentage") md = frappe.qb.DocType("Monthly Distribution") - query = ( + res = ( frappe.qb.from_(mdp) .join(md) .on(mdp.parent == md.name) .select(mdp.month, mdp.percentage_allocation) .where(md.fiscal_year == fiscal_year) .where(md.name == monthly_distribution) + .run(as_dict=True) ) - for d in query.run(as_dict=True): + for d in res: distribution.setdefault(d.month, d.percentage_allocation) dt = frappe.get_cached_value("Fiscal Year", fiscal_year, "year_start_date") From cfa062df861481f0ef8d4d97bee85192c69fdadc Mon Sep 17 00:00:00 2001 From: Joseph Mania <60258622+maniamartial@users.noreply.github.com> Date: Sat, 4 Jan 2025 02:53:41 +0300 Subject: [PATCH 0815/1614] refactor: phone number field when channel is phone on Payment Request (#44949) Co-authored-by: maniamartial --- .../doctype/payment_request/payment_request.json | 16 ++++++++++++++-- .../doctype/payment_request/payment_request.py | 2 ++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/payment_request/payment_request.json b/erpnext/accounts/doctype/payment_request/payment_request.json index 2eef429cd3a..5a19a080484 100644 --- a/erpnext/accounts/doctype/payment_request/payment_request.json +++ b/erpnext/accounts/doctype/payment_request/payment_request.json @@ -58,7 +58,9 @@ "payment_account", "payment_channel", "payment_order", - "amended_from" + "amended_from", + "column_break_iiuv", + "phone_number" ], "fields": [ { @@ -376,6 +378,7 @@ "read_only": 1 }, { + "depends_on": "eval: doc.payment_channel==\"Phone\"", "fetch_from": "payment_gateway_account.payment_channel", "fieldname": "payment_channel", "fieldtype": "Select", @@ -429,13 +432,22 @@ "fieldtype": "Data", "label": "Party Name", "read_only": 1 + }, + { + "fieldname": "column_break_iiuv", + "fieldtype": "Column Break" + }, + { + "fieldname": "phone_number", + "fieldtype": "Data", + "label": "Phone Number" } ], "in_create": 1, "index_web_pages_for_search": 1, "is_submittable": 1, "links": [], - "modified": "2024-10-23 12:23:40.117336", + "modified": "2024-12-27 21:29:10.361894", "modified_by": "Administrator", "module": "Accounts", "name": "Payment Request", diff --git a/erpnext/accounts/doctype/payment_request/payment_request.py b/erpnext/accounts/doctype/payment_request/payment_request.py index 61bb2932d2b..f84f094e464 100644 --- a/erpnext/accounts/doctype/payment_request/payment_request.py +++ b/erpnext/accounts/doctype/payment_request/payment_request.py @@ -224,6 +224,7 @@ class PaymentRequest(Document): sender=self.email_to, currency=self.currency, payment_gateway=self.payment_gateway, + phone_number=self.phone_number, ) controller.validate_transaction_currency(self.currency) @@ -635,6 +636,7 @@ def make_payment_request(**args): "party": args.get("party") or ref_doc.get("customer"), "bank_account": bank_account, "party_name": args.get("party_name") or ref_doc.get("customer_name"), + "phone_number": args.get("phone_number") if args.get("phone_number") else None, } ) From c924feb0d0ad206423fc959b83ce4aa948ece592 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Sat, 4 Jan 2025 12:58:07 +0530 Subject: [PATCH 0816/1614] fix: consider expired batches in stock reco (cherry picked from commit f51c9f578c04965a856de9da78e0a24cf33620f0) --- .../stock/doctype/stock_reconciliation/stock_reconciliation.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py index 12773a5555d..9e23270ca71 100644 --- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py +++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py @@ -1093,6 +1093,7 @@ class StockReconciliation(StockController): posting_date=doc.posting_date, posting_time=doc.posting_time, ignore_voucher_nos=[doc.voucher_no], + for_stock_levels=True, ) or 0 ) * -1 From 9daabfca8a3dc4d940d02bf218cfd02605dbde0f Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Sat, 4 Jan 2025 19:59:19 +0530 Subject: [PATCH 0817/1614] fix: invoice against purchase receipt with returned quantity (cherry picked from commit d5babf4237661a11787db69e41001d6099e785c2) # Conflicts: # erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py --- .../purchase_invoice/test_purchase_invoice.py | 49 +++++++++++++++++++ .../purchase_receipt/purchase_receipt.py | 3 ++ 2 files changed, 52 insertions(+) diff --git a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py index 76fbfd2f4e2..b07dbc3bcbf 100644 --- a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py @@ -2494,6 +2494,55 @@ class TestPurchaseInvoice(FrappeTestCase, StockTestMixin): self.assertEqual(len(actual), 3) self.assertEqual(expected, actual) +<<<<<<< HEAD +======= + def test_last_purchase_rate(self): + item = create_item("_Test Item For Last Purchase Rate from PI", is_stock_item=1) + pi1 = make_purchase_invoice(item_code=item.item_code, qty=10, rate=100) + item.reload() + self.assertEqual(item.last_purchase_rate, 100) + + pi2 = make_purchase_invoice(item_code=item.item_code, qty=10, rate=200) + item.reload() + self.assertEqual(item.last_purchase_rate, 200) + + pi2.cancel() + item.reload() + self.assertEqual(item.last_purchase_rate, 100) + + pi1.cancel() + item.reload() + self.assertEqual(item.last_purchase_rate, 0) + + def test_invoice_against_returned_pr(self): + from erpnext.stock.doctype.item.test_item import make_item + from erpnext.stock.doctype.purchase_receipt.purchase_receipt import ( + make_purchase_invoice as make_purchase_invoice_from_pr, + ) + from erpnext.stock.doctype.purchase_receipt.purchase_receipt import ( + make_purchase_return_against_rejected_warehouse, + ) + + item = make_item("_Test Item For Invoice Against Returned PR", properties={"is_stock_item": 1}).name + + original_value = frappe.db.get_single_value( + "Buying Settings", "bill_for_rejected_quantity_in_purchase_invoice" + ) + frappe.db.set_single_value("Buying Settings", "bill_for_rejected_quantity_in_purchase_invoice", 0) + + pr = make_purchase_receipt(item_code=item, qty=5, rejected_qty=5, rate=100) + pr_return = make_purchase_return_against_rejected_warehouse(pr.name) + pr_return.submit() + + pi = make_purchase_invoice_from_pr(pr.name) + pi.save() + self.assertEqual(pi.items[0].qty, 5.0) + + frappe.db.set_single_value( + "Buying Settings", "bill_for_rejected_quantity_in_purchase_invoice", original_value + ) + +>>>>>>> d5babf4237 (fix: invoice against purchase receipt with returned quantity) def set_advance_flag(company, flag, default_account): frappe.db.set_value( diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py index 22d7012cc8b..44e0145ea6c 100644 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py @@ -1183,6 +1183,9 @@ def make_purchase_invoice(source_name, target_doc=None, args=None): return pending_qty, 0 returned_qty = flt(returned_qty_map.get(item_row.name, 0)) + if item_row.rejected_qty and returned_qty: + returned_qty -= item_row.rejected_qty + if returned_qty: if returned_qty >= pending_qty: pending_qty = 0 From 90b8860a40804a650c07ded8752eeeac7c89e7c4 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Sun, 5 Jan 2025 16:24:15 +0530 Subject: [PATCH 0818/1614] chore: fix conflicts --- .../purchase_invoice/test_purchase_invoice.py | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py index b07dbc3bcbf..4d62c0d354d 100644 --- a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py @@ -2494,26 +2494,6 @@ class TestPurchaseInvoice(FrappeTestCase, StockTestMixin): self.assertEqual(len(actual), 3) self.assertEqual(expected, actual) -<<<<<<< HEAD -======= - def test_last_purchase_rate(self): - item = create_item("_Test Item For Last Purchase Rate from PI", is_stock_item=1) - pi1 = make_purchase_invoice(item_code=item.item_code, qty=10, rate=100) - item.reload() - self.assertEqual(item.last_purchase_rate, 100) - - pi2 = make_purchase_invoice(item_code=item.item_code, qty=10, rate=200) - item.reload() - self.assertEqual(item.last_purchase_rate, 200) - - pi2.cancel() - item.reload() - self.assertEqual(item.last_purchase_rate, 100) - - pi1.cancel() - item.reload() - self.assertEqual(item.last_purchase_rate, 0) - def test_invoice_against_returned_pr(self): from erpnext.stock.doctype.item.test_item import make_item from erpnext.stock.doctype.purchase_receipt.purchase_receipt import ( @@ -2542,7 +2522,6 @@ class TestPurchaseInvoice(FrappeTestCase, StockTestMixin): "Buying Settings", "bill_for_rejected_quantity_in_purchase_invoice", original_value ) ->>>>>>> d5babf4237 (fix: invoice against purchase receipt with returned quantity) def set_advance_flag(company, flag, default_account): frappe.db.set_value( From 8874f4a9e44ea249a11c9c2b7ca55c06a7602ef1 Mon Sep 17 00:00:00 2001 From: venkat102 Date: Thu, 2 Jan 2025 16:10:12 +0530 Subject: [PATCH 0819/1614] fix: ignore currency validation while canceling the voucher (cherry picked from commit 15d488b9aa97cf91aa7ac97b1870e4f5cd49acc8) --- erpnext/accounts/doctype/gl_entry/gl_entry.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/accounts/doctype/gl_entry/gl_entry.py b/erpnext/accounts/doctype/gl_entry/gl_entry.py index d9d7807a561..c77a201ab51 100644 --- a/erpnext/accounts/doctype/gl_entry/gl_entry.py +++ b/erpnext/accounts/doctype/gl_entry/gl_entry.py @@ -275,6 +275,9 @@ class GLEntry(Document): validate_account_party_type(self) def validate_currency(self): + if self.is_cancelled: + return + company_currency = erpnext.get_company_currency(self.company) account_currency = get_account_currency(self.account) From 0f1c6ff1c9ca7e6a573b94ccc21789b3616951bb Mon Sep 17 00:00:00 2001 From: venkat102 Date: Thu, 2 Jan 2025 17:27:34 +0530 Subject: [PATCH 0820/1614] fix: ignore party account validation while canceling the voucher (cherry picked from commit 49885f8eae8c95e1b319c4e48ca64005ffa5b93d) --- erpnext/accounts/party.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/accounts/party.py b/erpnext/accounts/party.py index 3033b8ad087..396c814dff6 100644 --- a/erpnext/accounts/party.py +++ b/erpnext/accounts/party.py @@ -760,6 +760,9 @@ def validate_party_frozen_disabled(party_type, party_name): def validate_account_party_type(self): + if self.is_cancelled: + return + if self.party_type and self.party: account_type = frappe.get_cached_value("Account", self.account, "account_type") if account_type and (account_type not in ["Receivable", "Payable"]): From 807694206b96ec937b2d2e8e96f809e2e17b59c8 Mon Sep 17 00:00:00 2001 From: venkat102 Date: Thu, 2 Jan 2025 16:10:12 +0530 Subject: [PATCH 0821/1614] fix: ignore currency validation while canceling the voucher (cherry picked from commit 15d488b9aa97cf91aa7ac97b1870e4f5cd49acc8) --- erpnext/accounts/doctype/gl_entry/gl_entry.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/accounts/doctype/gl_entry/gl_entry.py b/erpnext/accounts/doctype/gl_entry/gl_entry.py index d9d7807a561..c77a201ab51 100644 --- a/erpnext/accounts/doctype/gl_entry/gl_entry.py +++ b/erpnext/accounts/doctype/gl_entry/gl_entry.py @@ -275,6 +275,9 @@ class GLEntry(Document): validate_account_party_type(self) def validate_currency(self): + if self.is_cancelled: + return + company_currency = erpnext.get_company_currency(self.company) account_currency = get_account_currency(self.account) From bc0be5a00a321c657e86a96d33afa36f5f12d193 Mon Sep 17 00:00:00 2001 From: venkat102 Date: Thu, 2 Jan 2025 17:27:34 +0530 Subject: [PATCH 0822/1614] fix: ignore party account validation while canceling the voucher (cherry picked from commit 49885f8eae8c95e1b319c4e48ca64005ffa5b93d) --- erpnext/accounts/party.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/accounts/party.py b/erpnext/accounts/party.py index 3033b8ad087..396c814dff6 100644 --- a/erpnext/accounts/party.py +++ b/erpnext/accounts/party.py @@ -760,6 +760,9 @@ def validate_party_frozen_disabled(party_type, party_name): def validate_account_party_type(self): + if self.is_cancelled: + return + if self.party_type and self.party: account_type = frappe.get_cached_value("Account", self.account, "account_type") if account_type and (account_type not in ["Receivable", "Payable"]): From 9ecafdc6807846be6d739cfedbe9401765d1b5a4 Mon Sep 17 00:00:00 2001 From: mahsem <137205921+mahsem@users.noreply.github.com> Date: Sun, 29 Dec 2024 14:15:52 +0100 Subject: [PATCH 0823/1614] fix: Hold_to_On_Hold (cherry picked from commit 92b1f314ef12686ab17639fd9d4c83877b898a83) --- erpnext/support/web_form/issues/issues.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/support/web_form/issues/issues.json b/erpnext/support/web_form/issues/issues.json index f3834c73a7c..c8a374ecc5b 100644 --- a/erpnext/support/web_form/issues/issues.json +++ b/erpnext/support/web_form/issues/issues.json @@ -54,7 +54,7 @@ "label": "Status", "max_length": 0, "max_value": 0, - "options": "Open\nReplied\nHold\nClosed", + "options": "Open\nReplied\nOn Hold\nClosed", "read_only": 1, "reqd": 0, "show_in_filter": 1 From 08e58e13acf68f49b32e43ec05c4b2d7c4c1ba4f Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Mon, 6 Jan 2025 04:42:56 +0000 Subject: [PATCH 0824/1614] chore(release): Bumped to Version 15.47.5 ## [15.47.5](https://github.com/frappe/erpnext/compare/v15.47.4...v15.47.5) (2025-01-06) ### Bug Fixes * ignore currency validation while canceling the voucher ([8076942](https://github.com/frappe/erpnext/commit/807694206b96ec937b2d2e8e96f809e2e17b59c8)) * ignore party account validation while canceling the voucher ([bc0be5a](https://github.com/frappe/erpnext/commit/bc0be5a00a321c657e86a96d33afa36f5f12d193)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index b66aaef899b..d4763ea5a56 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.47.4" +__version__ = "15.47.5" def get_default_company(user=None): From 622bfa6633cf9b9ac7423811d04e42249b96d30a Mon Sep 17 00:00:00 2001 From: creative-paramu Date: Fri, 27 Dec 2024 17:54:20 +0530 Subject: [PATCH 0825/1614] fix: Bank Reconciliation Statement Report Company Filter (cherry picked from commit 50c92034ba2267562ed7f5fdb312ddb57155c96d) --- .../bank_reconciliation_statement.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py index c7dba16492e..bfc2f2d56ff 100644 --- a/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py +++ b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py @@ -142,7 +142,8 @@ def get_journal_entries(filters): where jvd.parent = jv.name and jv.docstatus=1 and jvd.account = %(account)s and jv.posting_date <= %(report_date)s and ifnull(jv.clearance_date, '4000-01-01') > %(report_date)s - and ifnull(jv.is_opening, 'No') = 'No'""", + and ifnull(jv.is_opening, 'No') = 'No' + and jv.company = %(company)s """, filters, as_dict=1, ) @@ -163,6 +164,7 @@ def get_payment_entries(filters): (paid_from=%(account)s or paid_to=%(account)s) and docstatus=1 and posting_date <= %(report_date)s and ifnull(clearance_date, '4000-01-01') > %(report_date)s + and company = %(company)s """, filters, as_dict=1, @@ -181,6 +183,7 @@ def get_pos_entries(filters): sip.account=%(account)s and si.docstatus=1 and sip.parent = si.name and account.name = sip.account and si.posting_date <= %(report_date)s and ifnull(sip.clearance_date, '4000-01-01') > %(report_date)s + and si.company = %(company)s order by si.posting_date ASC, si.name DESC """, From 3194807a41212c18d2b1578ad91143c54ba5b415 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Sat, 4 Jan 2025 17:22:16 +0530 Subject: [PATCH 0826/1614] fix: Alternative Items button in Work Order (cherry picked from commit e28382afc1c7799918de79a5806b0cacea37ef5c) --- .../doctype/work_order/work_order.js | 54 +++++++++++-------- 1 file changed, 33 insertions(+), 21 deletions(-) diff --git a/erpnext/manufacturing/doctype/work_order/work_order.js b/erpnext/manufacturing/doctype/work_order/work_order.js index df72b1e6b51..fe4768955ec 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order.js +++ b/erpnext/manufacturing/doctype/work_order/work_order.js @@ -1,6 +1,12 @@ // Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt +frappe.ui.form.on("Work Order Item", { + allow_alternative_item(frm, cdt, cdn) { + frm.trigger("allow_alternative_item"); + }, +}); + frappe.ui.form.on("Work Order", { setup: function (frm) { frm.custom_make_buttons = { @@ -130,6 +136,32 @@ frappe.ui.form.on("Work Order", { ); }, + allow_alternative_item: function (frm) { + let has_alternative = false; + if (frm.doc.required_items) { + has_alternative = frm.doc.required_items.find((i) => i.allow_alternative_item === 1); + } + + if (frm.doc.allow_alternative_item && frm.doc.docstatus == 0 && has_alternative) { + frm.add_custom_button(__("Alternate Item"), () => { + erpnext.utils.select_alternate_items({ + frm: frm, + child_docname: "required_items", + warehouse_field: "source_warehouse", + child_doctype: "Work Order Item", + original_item_field: "original_item", + condition: (d) => { + if (d.allow_alternative_item) { + return true; + } + }, + }); + }); + } else { + frm.remove_custom_button(__("Alternate Item")); + } + }, + refresh: function (frm) { erpnext.toggle_naming_series(); erpnext.work_order.set_custom_buttons(frm); @@ -163,26 +195,6 @@ frappe.ui.form.on("Work Order", { } } - if (frm.doc.required_items && frm.doc.allow_alternative_item) { - const has_alternative = frm.doc.required_items.find((i) => i.allow_alternative_item === 1); - if (frm.doc.docstatus == 0 && has_alternative) { - frm.add_custom_button(__("Alternate Item"), () => { - erpnext.utils.select_alternate_items({ - frm: frm, - child_docname: "required_items", - warehouse_field: "source_warehouse", - child_doctype: "Work Order Item", - original_item_field: "original_item", - condition: (d) => { - if (d.allow_alternative_item) { - return true; - } - }, - }); - }); - } - } - if (frm.doc.status == "Completed") { if (frm.doc.__onload.backflush_raw_materials_based_on == "Material Transferred for Manufacture") { frm.add_custom_button( @@ -618,7 +630,7 @@ erpnext.work_order = { set_custom_buttons: function (frm) { var doc = frm.doc; - if (doc.status !== "Closed") { + if (doc.docstatus === 1 && doc.status !== "Closed") { frm.add_custom_button( __("Close"), function () { From 642b89782d5d1a2d53c12ed192e2e3dd62e65365 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Mon, 6 Jan 2025 11:22:06 +0530 Subject: [PATCH 0827/1614] fix: Alternative Item button dissapearing on Save event (cherry picked from commit b8838bd9b9845aa14b6cd756b1238ab6646bb3bd) --- .../manufacturing/doctype/work_order/work_order.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/erpnext/manufacturing/doctype/work_order/work_order.js b/erpnext/manufacturing/doctype/work_order/work_order.js index fe4768955ec..6da3d803358 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order.js +++ b/erpnext/manufacturing/doctype/work_order/work_order.js @@ -1,12 +1,6 @@ // Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -frappe.ui.form.on("Work Order Item", { - allow_alternative_item(frm, cdt, cdn) { - frm.trigger("allow_alternative_item"); - }, -}); - frappe.ui.form.on("Work Order", { setup: function (frm) { frm.custom_make_buttons = { @@ -142,7 +136,7 @@ frappe.ui.form.on("Work Order", { has_alternative = frm.doc.required_items.find((i) => i.allow_alternative_item === 1); } - if (frm.doc.allow_alternative_item && frm.doc.docstatus == 0 && has_alternative) { + if (frm.doc.allow_alternative_item && frm.doc.docstatus === 0 && has_alternative) { frm.add_custom_button(__("Alternate Item"), () => { erpnext.utils.select_alternate_items({ frm: frm, @@ -222,6 +216,7 @@ frappe.ui.form.on("Work Order", { } frm.trigger("add_custom_button_to_return_components"); + frm.trigger("allow_alternative_item"); }, add_custom_button_to_return_components: function (frm) { @@ -552,6 +547,9 @@ frappe.ui.form.on("Work Order", { }); frappe.ui.form.on("Work Order Item", { + allow_alternative_item(frm) { + frm.trigger("allow_alternative_item"); + }, source_warehouse: function (frm, cdt, cdn) { var row = locals[cdt][cdn]; if (!row.item_code) { From 89155f529e757296ad4ff97dee6fe54b3a090cb4 Mon Sep 17 00:00:00 2001 From: sokumon Date: Mon, 6 Jan 2025 12:26:06 +0530 Subject: [PATCH 0828/1614] fix: show new button in coa if create access (cherry picked from commit 3125bc8a16cff321cbaa9516cb3076fc61b581ca) --- .../accounts/doctype/account/account_tree.js | 29 ++++++++++--------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/erpnext/accounts/doctype/account/account_tree.js b/erpnext/accounts/doctype/account/account_tree.js index 49d5396c0f3..a61fcb4f530 100644 --- a/erpnext/accounts/doctype/account/account_tree.js +++ b/erpnext/accounts/doctype/account/account_tree.js @@ -237,19 +237,22 @@ frappe.treeview_settings["Account"] = { }, post_render: function (treeview) { frappe.treeview_settings["Account"].treeview["tree"] = treeview.tree; - treeview.page.set_primary_action( - __("New"), - function () { - let root_company = treeview.page.fields_dict.root_company.get_value(); - - if (root_company) { - frappe.throw(__("Please add the account to root level Company - {0}"), [root_company]); - } else { - treeview.new_node(); - } - }, - "add" - ); + if (treeview.can_create) { + treeview.page.set_primary_action( + __("New"), + function () { + let root_company = treeview.page.fields_dict.root_company.get_value(); + if (root_company) { + frappe.throw(__("Please add the account to root level Company - {0}"), [ + root_company, + ]); + } else { + treeview.new_node(); + } + }, + "add" + ); + } }, toolbar: [ { From 452dffab48cedcf44949caaf2036084196b6522e Mon Sep 17 00:00:00 2001 From: diptanilsaha Date: Tue, 31 Dec 2024 13:22:18 +0530 Subject: [PATCH 0829/1614] fix: load price list rate for pos search term (cherry picked from commit 4b6cae156e2ece905158eaa649a9812d92bc87dd) --- .../selling/page/point_of_sale/point_of_sale.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/erpnext/selling/page/point_of_sale/point_of_sale.py b/erpnext/selling/page/point_of_sale/point_of_sale.py index 206e51bbc5a..f00b7d0fc55 100644 --- a/erpnext/selling/page/point_of_sale/point_of_sale.py +++ b/erpnext/selling/page/point_of_sale/point_of_sale.py @@ -58,13 +58,17 @@ def search_by_term(search_term, warehouse, price_list): item_stock_qty = item_stock_qty // item.get("conversion_factor", 1) item.update({"actual_qty": item_stock_qty}) + price_filters = { + "price_list": price_list, + "item_code": item_code, + } + + if batch_no: + price_filters["batch_no"] = batch_no + price = frappe.get_list( doctype="Item Price", - filters={ - "price_list": price_list, - "item_code": item_code, - "batch_no": batch_no, - }, + filters=price_filters, fields=["uom", "currency", "price_list_rate", "batch_no"], ) From 59af144e298dbdb0ae5dbd4281bc0b2a1e9f615b Mon Sep 17 00:00:00 2001 From: diptanilsaha Date: Tue, 31 Dec 2024 14:55:01 +0530 Subject: [PATCH 0830/1614] fix: load search term price with customer default price list (cherry picked from commit 2beb485d7753e8b0cf399cf9025ea349a5857a3e) --- erpnext/selling/page/point_of_sale/pos_item_selector.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/erpnext/selling/page/point_of_sale/pos_item_selector.js b/erpnext/selling/page/point_of_sale/pos_item_selector.js index 9882c2d201e..909d1bb9c2d 100644 --- a/erpnext/selling/page/point_of_sale/pos_item_selector.js +++ b/erpnext/selling/page/point_of_sale/pos_item_selector.js @@ -328,13 +328,16 @@ erpnext.PointOfSale.ItemSelector = class { } filter_items({ search_term = "" } = {}) { + const selling_price_list = this.events.get_frm().doc.selling_price_list; + if (search_term) { search_term = search_term.toLowerCase(); // memoize this.search_index = this.search_index || {}; - if (this.search_index[search_term]) { - const items = this.search_index[search_term]; + this.search_index[selling_price_list] = this.search_index[selling_price_list] || {}; + if (this.search_index[selling_price_list][search_term]) { + const items = this.search_index[selling_price_list][search_term]; this.items = items; this.render_item_list(items); this.auto_add_item && this.items.length == 1 && this.add_filtered_item_to_cart(); @@ -346,7 +349,7 @@ erpnext.PointOfSale.ItemSelector = class { // eslint-disable-next-line no-unused-vars const { items, serial_no, batch_no, barcode } = message; if (search_term && !barcode) { - this.search_index[search_term] = items; + this.search_index[selling_price_list][search_term] = items; } this.items = items; this.render_item_list(items); From 01254da4e06b6e0114ecfc56e89aacdf5bab027b Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 6 Jan 2025 15:01:23 +0530 Subject: [PATCH 0831/1614] fix: update customer contact details on pos (backport #45071) (#45106) fix: update customer contact details on pos (#45071) * fix: update customer contact details on pos * refactor: removed console log statement (cherry picked from commit d79e5612484a547cbe6828476d60a87a815568fd) Co-authored-by: Diptanil Saha --- erpnext/selling/page/point_of_sale/pos_item_cart.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/erpnext/selling/page/point_of_sale/pos_item_cart.js b/erpnext/selling/page/point_of_sale/pos_item_cart.js index 325f7b258a9..28cb1aef339 100644 --- a/erpnext/selling/page/point_of_sale/pos_item_cart.js +++ b/erpnext/selling/page/point_of_sale/pos_item_cart.js @@ -928,10 +928,13 @@ erpnext.PointOfSale.ItemCart = class { const me = this; dfs.forEach((df) => { this[`customer_${df.fieldname}_field`] = frappe.ui.form.make_control({ - df: { ...df, onchange: handle_customer_field_change }, + df: df, parent: $customer_form.find(`.${df.fieldname}-field`), render_input: true, }); + this[`customer_${df.fieldname}_field`].$input?.on("blur", () => { + handle_customer_field_change.apply(this[`customer_${df.fieldname}_field`]); + }); this[`customer_${df.fieldname}_field`].set_value(this.customer_info[df.fieldname]); }); From f7b501b29bcaa39e486638cf442c385d7e7e39f1 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Mon, 6 Jan 2025 15:23:57 +0530 Subject: [PATCH 0832/1614] fix: Returned Qty in Work Order Consumed Materials report (cherry picked from commit 30d68a31e09553421ac91af78b1dfdeded81d6f5) --- .../work_order_consumed_materials.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/erpnext/manufacturing/report/work_order_consumed_materials/work_order_consumed_materials.py b/erpnext/manufacturing/report/work_order_consumed_materials/work_order_consumed_materials.py index 64363e20e39..a5690c477e4 100644 --- a/erpnext/manufacturing/report/work_order_consumed_materials/work_order_consumed_materials.py +++ b/erpnext/manufacturing/report/work_order_consumed_materials/work_order_consumed_materials.py @@ -50,7 +50,11 @@ def get_returned_materials(work_orders): raw_materials = frappe.get_all( "Stock Entry", - fields=["`tabStock Entry Detail`.`item_code`", "`tabStock Entry Detail`.`qty`"], + fields=[ + "`tabStock Entry`.`work_order`", + "`tabStock Entry Detail`.`item_code`", + "`tabStock Entry Detail`.`qty`", + ], filters=[ ["Stock Entry", "is_return", "=", 1], ["Stock Entry Detail", "docstatus", "=", 1], @@ -59,12 +63,14 @@ def get_returned_materials(work_orders): ) for d in raw_materials: - raw_materials_qty[d.item_code] += d.qty + key = (d.work_order, d.item_code) + raw_materials_qty[key] += d.qty for row in work_orders: row.returned_qty = 0.0 - if raw_materials_qty.get(row.raw_material_item_code): - row.returned_qty = raw_materials_qty.get(row.raw_material_item_code) + key = (row.parent, row.raw_material_item_code) + if raw_materials_qty.get(key): + row.returned_qty = raw_materials_qty.get(key) def get_fields(): From 0abace79112063e86eade3f5c25f6ff831566895 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 6 Jan 2025 23:04:30 +0100 Subject: [PATCH 0833/1614] refactor(Project): extract custom button function (backport #45116) (#45117) Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com> --- erpnext/projects/doctype/project/project.js | 41 +++++++++++---------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/erpnext/projects/doctype/project/project.js b/erpnext/projects/doctype/project/project.js index 643e3b21782..e609e35111f 100644 --- a/erpnext/projects/doctype/project/project.js +++ b/erpnext/projects/doctype/project/project.js @@ -147,29 +147,32 @@ frappe.ui.form.on("Project", { set_project_status_button: function (frm) { frm.add_custom_button( __("Set Project Status"), - () => { - let d = new frappe.ui.Dialog({ - title: __("Set Project Status"), - fields: [ - { - fieldname: "status", - fieldtype: "Select", - label: "Status", - reqd: 1, - options: "Completed\nCancelled", - }, - ], - primary_action: function () { - frm.events.set_status(frm, d.get_values().status); - d.hide(); - }, - primary_action_label: __("Set Project Status"), - }).show(); - }, + () => frm.events.get_project_status_dialog(frm).show(), __("Actions") ); }, + get_project_status_dialog: function (frm) { + const dialog = new frappe.ui.Dialog({ + title: __("Set Project Status"), + fields: [ + { + fieldname: "status", + fieldtype: "Select", + label: "Status", + reqd: 1, + options: "Completed\nCancelled", + }, + ], + primary_action: function () { + frm.events.set_status(frm, dialog.get_values().status); + dialog.hide(); + }, + primary_action_label: __("Set Project Status"), + }); + return dialog; + }, + create_duplicate: function (frm) { return new Promise((resolve) => { frappe.prompt("Project Name", (data) => { From 0001d868c7f3bf79b296111291608e20340bb261 Mon Sep 17 00:00:00 2001 From: Raffael Meyer <14891507+barredterra@users.noreply.github.com> Date: Mon, 6 Jan 2025 23:12:53 +0100 Subject: [PATCH 0834/1614] fix(Project): make status in confirmation dialog translatable (#45118) (cherry picked from commit 9eede907f892dbf2c03d976270164e318091dcfa) --- erpnext/projects/doctype/project/project.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/projects/doctype/project/project.js b/erpnext/projects/doctype/project/project.js index e609e35111f..45baff562ce 100644 --- a/erpnext/projects/doctype/project/project.js +++ b/erpnext/projects/doctype/project/project.js @@ -191,7 +191,7 @@ frappe.ui.form.on("Project", { }, set_status: function (frm, status) { - frappe.confirm(__("Set Project and all Tasks to status {0}?", [status.bold()]), () => { + frappe.confirm(__("Set Project and all Tasks to status {0}?", [__(status).bold()]), () => { frappe .xcall("erpnext.projects.doctype.project.project.set_project_status", { project: frm.doc.name, From af5338116338ac9eb88e9c440528cff248aa03d4 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 7 Jan 2025 11:14:42 +0530 Subject: [PATCH 0835/1614] fix: discount resetting on date change revert #44989 (cherry picked from commit 886281f81a2c1d39f736aea5100a61d6ddd08325) --- erpnext/public/js/controllers/transaction.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index f6d124de23d..b3389b27e84 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -974,7 +974,6 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe } transaction_date() { - this.apply_pricing_rule() if (this.frm.doc.transaction_date) { this.frm.transaction_date = this.frm.doc.transaction_date; frappe.ui.form.trigger(this.frm.doc.doctype, "currency"); @@ -983,7 +982,6 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe posting_date() { var me = this; - me.apply_pricing_rule() if (this.frm.doc.posting_date) { this.frm.posting_date = this.frm.doc.posting_date; From f654c2d156e9fab1c74683fc264ab72d14cf0c88 Mon Sep 17 00:00:00 2001 From: Ejaaz Khan <67804911+iamejaaz@users.noreply.github.com> Date: Tue, 7 Jan 2025 17:17:59 +0530 Subject: [PATCH 0836/1614] refactor: change sales invoice button position (#45130) (cherry picked from commit a0f17f8e7381c31dc2f704ecc238983179ef4c5f) --- .../doctype/sales_invoice/sales_invoice.js | 84 ++++++++++--------- erpnext/public/js/controllers/transaction.js | 3 +- 2 files changed, 45 insertions(+), 42 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js index 75c71ef6eb3..c07e2a392ae 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js @@ -994,47 +994,51 @@ frappe.ui.form.on("Sales Invoice", { refresh: function (frm) { if (frm.doc.docstatus === 0 && !frm.doc.is_return) { - frm.add_custom_button(__("Fetch Timesheet"), function () { - let d = new frappe.ui.Dialog({ - title: __("Fetch Timesheet"), - fields: [ - { - label: __("From"), - fieldname: "from_time", - fieldtype: "Date", - reqd: 1, + frm.add_custom_button( + __("Timesheet"), + function () { + let d = new frappe.ui.Dialog({ + title: __("Fetch Timesheet"), + fields: [ + { + label: __("From"), + fieldname: "from_time", + fieldtype: "Date", + reqd: 1, + }, + { + fieldtype: "Column Break", + fieldname: "col_break_1", + }, + { + label: __("To"), + fieldname: "to_time", + fieldtype: "Date", + reqd: 1, + }, + { + label: __("Project"), + fieldname: "project", + fieldtype: "Link", + options: "Project", + default: frm.doc.project, + }, + ], + primary_action: function () { + const data = d.get_values(); + frm.events.add_timesheet_data(frm, { + from_time: data.from_time, + to_time: data.to_time, + project: data.project, + }); + d.hide(); }, - { - fieldtype: "Column Break", - fieldname: "col_break_1", - }, - { - label: __("To"), - fieldname: "to_time", - fieldtype: "Date", - reqd: 1, - }, - { - label: __("Project"), - fieldname: "project", - fieldtype: "Link", - options: "Project", - default: frm.doc.project, - }, - ], - primary_action: function () { - const data = d.get_values(); - frm.events.add_timesheet_data(frm, { - from_time: data.from_time, - to_time: data.to_time, - project: data.project, - }); - d.hide(); - }, - primary_action_label: __("Get Timesheets"), - }); - d.show(); - }); + primary_action_label: __("Get Timesheets"), + }); + d.show(); + }, + __("Get Items From") + ); } if (frm.doc.is_debit_note) { diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index b3389b27e84..9e3a76b12ca 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -303,11 +303,10 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe } const me = this; - if (!this.frm.is_new() && this.frm.doc.docstatus === 0 && frappe.model.can_create("Quality Inspection")) { + if (!this.frm.is_new() && this.frm.doc.docstatus === 0 && frappe.model.can_create("Quality Inspection") && this.frm.doc.update_stock) { this.frm.add_custom_button(__("Quality Inspection(s)"), () => { me.make_quality_inspection(); }, __("Create")); - this.frm.page.set_inner_btn_group_as_primary(__('Create')); } const inspection_type = ["Purchase Receipt", "Purchase Invoice", "Subcontracting Receipt"].includes(this.frm.doc.doctype) From 296d5d2295ca55e4a18b80e0176af63b1f9e24c9 Mon Sep 17 00:00:00 2001 From: Diptanil Saha Date: Tue, 7 Jan 2025 17:28:46 +0530 Subject: [PATCH 0837/1614] chore: removal of tally migration feature (#45100) (cherry picked from commit 9f77793f1673ff9f55b8d181dc3dff7a68136da9) # Conflicts: # erpnext/erpnext_integrations/doctype/tally_migration/tally_migration.json # erpnext/erpnext_integrations/doctype/tally_migration/tally_migration.py # erpnext/erpnext_integrations/doctype/tally_migration/test_tally_migration.py --- .../doctype/tally_migration/__init__.py | 0 .../tally_migration/tally_migration.js | 364 ------------------ 2 files changed, 364 deletions(-) delete mode 100644 erpnext/erpnext_integrations/doctype/tally_migration/__init__.py delete mode 100644 erpnext/erpnext_integrations/doctype/tally_migration/tally_migration.js diff --git a/erpnext/erpnext_integrations/doctype/tally_migration/__init__.py b/erpnext/erpnext_integrations/doctype/tally_migration/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/erpnext/erpnext_integrations/doctype/tally_migration/tally_migration.js b/erpnext/erpnext_integrations/doctype/tally_migration/tally_migration.js deleted file mode 100644 index 556c332634d..00000000000 --- a/erpnext/erpnext_integrations/doctype/tally_migration/tally_migration.js +++ /dev/null @@ -1,364 +0,0 @@ -// Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors -// For license information, please see license.txt - -frappe.provide("erpnext.tally_migration"); - -frappe.ui.form.on("Tally Migration", { - onload: function (frm) { - let reload_status = true; - frappe.realtime.on("tally_migration_progress_update", function (data) { - if (reload_status) { - frappe.model.with_doc(frm.doc.doctype, frm.doc.name, () => { - frm.refresh_header(); - }); - reload_status = false; - } - frm.dashboard.show_progress(data.title, (data.count / data.total) * 100, data.message); - let error_occurred = data.count === -1; - if (data.count == data.total || error_occurred) { - window.setTimeout( - (title) => { - frm.dashboard.hide_progress(title); - frm.reload_doc(); - if (error_occurred) { - frappe.msgprint({ - message: __("An error has occurred during {0}. Check {1} for more details", [ - repl( - "%(tally_document)s", - { - tally_document: frm.docname, - } - ), - "Error Log", - ]), - title: __("Tally Migration Error"), - indicator: "red", - }); - } - }, - 2000, - data.title - ); - } - }); - }, - - refresh: function (frm) { - frm.trigger("show_logs_preview"); - erpnext.tally_migration.failed_import_log = JSON.parse(frm.doc.failed_import_log); - erpnext.tally_migration.fixed_errors_log = JSON.parse(frm.doc.fixed_errors_log); - - ["default_round_off_account", "default_warehouse", "default_cost_center"].forEach((account) => { - frm.toggle_reqd(account, frm.doc.is_master_data_imported === 1); - frm.toggle_enable(account, frm.doc.is_day_book_data_processed != 1); - }); - - if (frm.doc.master_data && !frm.doc.is_master_data_imported) { - if (frm.doc.is_master_data_processed) { - if (frm.doc.status != "Importing Master Data") { - frm.events.add_button(frm, __("Import Master Data"), "import_master_data"); - } - } else { - if (frm.doc.status != "Processing Master Data") { - frm.events.add_button(frm, __("Process Master Data"), "process_master_data"); - } - } - } - - if (frm.doc.day_book_data && !frm.doc.is_day_book_data_imported) { - if (frm.doc.is_day_book_data_processed) { - if (frm.doc.status != "Importing Day Book Data") { - frm.events.add_button(frm, __("Import Day Book Data"), "import_day_book_data"); - } - } else { - if (frm.doc.status != "Processing Day Book Data") { - frm.events.add_button(frm, __("Process Day Book Data"), "process_day_book_data"); - } - } - } - }, - - erpnext_company: function (frm) { - frappe.db.exists("Company", frm.doc.erpnext_company).then((exists) => { - if (exists) { - frappe.msgprint( - __( - "Company {0} already exists. Continuing will overwrite the Company and Chart of Accounts", - [frm.doc.erpnext_company] - ) - ); - } - }); - }, - - add_button: function (frm, label, method) { - frm.add_custom_button(label, () => { - frm.call({ - doc: frm.doc, - method: method, - freeze: true, - }); - frm.reload_doc(); - }); - }, - - render_html_table(frm, shown_logs, hidden_logs, field) { - if (shown_logs && shown_logs.length > 0) { - frm.toggle_display(field, true); - } else { - frm.toggle_display(field, false); - return; - } - let rows = erpnext.tally_migration.get_html_rows(shown_logs, field); - let rows_head, table_caption; - - let table_footer = - hidden_logs && hidden_logs.length > 0 - ? ` - And ${hidden_logs.length} more others - ` - : ""; - - if (field === "fixed_error_log_preview") { - rows_head = `${__("Meta Data")} - ${__("Unresolve")}`; - table_caption = "Resolved Issues"; - } else { - rows_head = `${__("Error Message")} - ${__("Create")}`; - table_caption = "Error Log"; - } - - frm.get_field(field).$wrapper.html(` - - - - - - ${rows_head} - - ${rows} - ${table_footer} -
${table_caption}
${__("#")}${__("DocType")}
- `); - }, - - show_error_summary(frm) { - let summary = erpnext.tally_migration.failed_import_log.reduce((summary, row) => { - if (row.doc) { - if (summary[row.doc.doctype]) { - summary[row.doc.doctype] += 1; - } else { - summary[row.doc.doctype] = 1; - } - } - return summary; - }, {}); - console.table(summary); - }, - - show_logs_preview(frm) { - let empty = "[]"; - let import_log = frm.doc.failed_import_log || empty; - let completed_log = frm.doc.fixed_errors_log || empty; - let render_section = !(import_log === completed_log && import_log === empty); - - frm.toggle_display("import_log_section", render_section); - if (render_section) { - frm.trigger("show_error_summary"); - frm.trigger("show_errored_import_log"); - frm.trigger("show_fixed_errors_log"); - } - }, - - show_errored_import_log(frm) { - let import_log = erpnext.tally_migration.failed_import_log; - let logs = import_log.slice(0, 20); - let hidden_logs = import_log.slice(20); - - frm.events.render_html_table(frm, logs, hidden_logs, "failed_import_preview"); - }, - - show_fixed_errors_log(frm) { - let completed_log = erpnext.tally_migration.fixed_errors_log; - let logs = completed_log.slice(0, 20); - let hidden_logs = completed_log.slice(20); - - frm.events.render_html_table(frm, logs, hidden_logs, "fixed_error_log_preview"); - }, -}); - -erpnext.tally_migration.getError = (traceback) => { - /* Extracts the Error Message from the Python Traceback or Solved error */ - let is_multiline = traceback.trim().indexOf("\n") != -1; - let message; - - if (is_multiline) { - let exc_error_idx = traceback.trim().lastIndexOf("\n") + 1; - let error_line = traceback.substr(exc_error_idx); - let split_str_idx = error_line.indexOf(":") > 0 ? error_line.indexOf(":") + 1 : 0; - message = error_line.slice(split_str_idx).trim(); - } else { - message = traceback; - } - - return message; -}; - -erpnext.tally_migration.cleanDoc = (obj) => { - /* Strips all null and empty values of your JSON object */ - let temp = obj; - $.each(temp, function (key, value) { - if (value === "" || value === null) { - delete obj[key]; - } else if (Object.prototype.toString.call(value) === "[object Object]") { - erpnext.tally_migration.cleanDoc(value); - } else if ($.isArray(value)) { - $.each(value, function (k, v) { - erpnext.tally_migration.cleanDoc(v); - }); - } - }); - return temp; -}; - -erpnext.tally_migration.unresolve = (document) => { - /* Mark document migration as unresolved ie. move to failed error log */ - let frm = cur_frm; - let failed_log = erpnext.tally_migration.failed_import_log; - let fixed_log = erpnext.tally_migration.fixed_errors_log; - - let modified_fixed_log = fixed_log.filter((row) => { - if (!frappe.utils.deep_equal(erpnext.tally_migration.cleanDoc(row.doc), document)) { - return row; - } - }); - - failed_log.push({ doc: document, exc: `Marked unresolved on ${Date()}` }); - - frm.doc.failed_import_log = JSON.stringify(failed_log); - frm.doc.fixed_errors_log = JSON.stringify(modified_fixed_log); - - frm.dirty(); - frm.save(); -}; - -erpnext.tally_migration.resolve = (document) => { - /* Mark document migration as resolved ie. move to fixed error log */ - let frm = cur_frm; - let failed_log = erpnext.tally_migration.failed_import_log; - let fixed_log = erpnext.tally_migration.fixed_errors_log; - - let modified_failed_log = failed_log.filter((row) => { - if (!frappe.utils.deep_equal(erpnext.tally_migration.cleanDoc(row.doc), document)) { - return row; - } - }); - fixed_log.push({ doc: document, exc: `Solved on ${Date()}` }); - - frm.doc.failed_import_log = JSON.stringify(modified_failed_log); - frm.doc.fixed_errors_log = JSON.stringify(fixed_log); - - frm.dirty(); - frm.save(); -}; - -erpnext.tally_migration.create_new_doc = (document) => { - /* Mark as resolved and create new document */ - erpnext.tally_migration.resolve(document); - return frappe.call({ - type: "POST", - method: "erpnext.erpnext_integrations.doctype.tally_migration.tally_migration.new_doc", - args: { - document, - }, - freeze: true, - callback: function (r) { - if (!r.exc) { - frappe.model.sync(r.message); - frappe.get_doc(r.message.doctype, r.message.name).__run_link_triggers = true; - frappe.set_route("Form", r.message.doctype, r.message.name); - } - }, - }); -}; - -erpnext.tally_migration.get_html_rows = (logs, field) => { - let index = 0; - let rows = logs - .map(({ doc, exc }) => { - let id = frappe.dom.get_unique_id(); - let traceback = exc; - - let error_message = erpnext.tally_migration.getError(traceback); - index++; - - let show_traceback = ` - -
-
-
${traceback}
-
-
`; - - let show_doc = ` - -
-
-
${JSON.stringify(erpnext.tally_migration.cleanDoc(doc), null, 1)}
-
-
`; - - let create_button = ` - `; - - let mark_as_unresolved = ` - `; - - if (field === "fixed_error_log_preview") { - return ` - ${index} - -
${doc.doctype}
- - -
${error_message}
-
${show_doc}
- - -
${mark_as_unresolved}
- - `; - } else { - return ` - ${index} - -
${doc.doctype}
- - -
${error_message}
-
${show_traceback}
-
${show_doc}
- - -
${create_button}
- - `; - } - }) - .join(""); - - return rows; -}; From 54e3a749365c6979fb83b2cb962fd4db8f04cd60 Mon Sep 17 00:00:00 2001 From: Diptanil Saha Date: Tue, 7 Jan 2025 18:06:02 +0530 Subject: [PATCH 0838/1614] fix: serial and batch no. buttons on pos (#45048) (cherry picked from commit 31dd32dcdfcb054595cfa04ad1efa43377783656) --- .../page/point_of_sale/pos_item_details.js | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/erpnext/selling/page/point_of_sale/pos_item_details.js b/erpnext/selling/page/point_of_sale/pos_item_details.js index 2c93a0d546b..333b50810c9 100644 --- a/erpnext/selling/page/point_of_sale/pos_item_details.js +++ b/erpnext/selling/page/point_of_sale/pos_item_details.js @@ -210,10 +210,21 @@ erpnext.PointOfSale.ItemDetails = class { make_auto_serial_selection_btn(item) { if (item.has_serial_no || item.has_batch_no) { - const label = item.has_serial_no ? __("Select Serial No") : __("Select Batch No"); - this.$form_container.append( - `
${label}
` - ); + if (item.has_serial_no && item.has_batch_no) { + this.$form_container.append( + `
${__( + "Select Serial No / Batch No" + )}
` + ); + } else { + const classname = item.has_serial_no ? ".serial_no-control" : ".batch_no-control"; + const label = item.has_serial_no ? __("Select Serial No") : __("Select Batch No"); + this.$form_container + .find(classname) + .append( + `
${label}
` + ); + } this.$form_container.find(".serial_no-control").find("textarea").css("height", "6rem"); } } From 87405f0753d78655d621f3324003ac2b3ee743ca Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Tue, 7 Jan 2025 17:29:35 +0530 Subject: [PATCH 0839/1614] fix: issue in returning components against the SCO (cherry picked from commit 729ce1dc50a408a6eea74fefd80ecf4cb4b5c8e5) --- .../controllers/subcontracting_controller.py | 6 +- .../tests/test_subcontracting_controller.py | 73 +++++++++++++++++++ .../serial_and_batch_bundle.py | 2 +- .../report/stock_balance/stock_balance.py | 1 - 4 files changed, 79 insertions(+), 3 deletions(-) diff --git a/erpnext/controllers/subcontracting_controller.py b/erpnext/controllers/subcontracting_controller.py index 0f9431ab440..349a15703fb 100644 --- a/erpnext/controllers/subcontracting_controller.py +++ b/erpnext/controllers/subcontracting_controller.py @@ -1257,6 +1257,7 @@ def add_items_in_ste(ste_doc, row, qty, rm_details, rm_detail_field="sco_rm_deta "item_code": row.item_details["rm_item_code"], "subcontracted_item": row.item_details["main_item_code"], "serial_no": "\n".join(row.serial_no) if row.serial_no else "", + "use_serial_batch_fields": 1, } ) @@ -1297,10 +1298,13 @@ def make_return_stock_entry_for_subcontract( if not value.qty: continue + if item_details := value.get("item_details"): + item_details["serial_and_batch_bundle"] = None + if value.batch_no: for batch_no, qty in value.batch_no.items(): if qty > 0: - add_items_in_ste(ste_doc, value, value.qty, rm_details, rm_detail_field, batch_no) + add_items_in_ste(ste_doc, value, qty, rm_details, rm_detail_field, batch_no) else: add_items_in_ste(ste_doc, value, value.qty, rm_details, rm_detail_field) diff --git a/erpnext/controllers/tests/test_subcontracting_controller.py b/erpnext/controllers/tests/test_subcontracting_controller.py index 0bc348e8876..3b11a0f8029 100644 --- a/erpnext/controllers/tests/test_subcontracting_controller.py +++ b/erpnext/controllers/tests/test_subcontracting_controller.py @@ -282,6 +282,79 @@ class TestSubcontractingController(FrappeTestCase): frappe.db.set_single_value("Stock Settings", "use_serial_batch_fields", 1) + def test_return_non_consumed_batch_materials(self): + """ + - Set backflush based on Material Transfer. + - Create SCO for item Subcontracted Item SA2. + - Transfer the batched components from Stores to Supplier warehouse with serial nos. + - Transfer extra qty of component for the subcontracted item Subcontracted Item SA2. + - Create SCR for full qty against the SCO and change the qty of raw material. + - After that return the non consumed material back to the store from supplier's warehouse. + """ + + frappe.db.set_single_value("Stock Settings", "use_serial_batch_fields", 0) + set_backflush_based_on("Material Transferred for Subcontract") + service_item = make_item("Subcontracted Service FG Item A", properties={"is_stock_item": 0}).name + fg_item = make_item( + "Subcontracted FG Item SA2", properties={"is_stock_item": 1, "is_sub_contracted_item": 1} + ).name + rm_item = make_item( + "Subcontracted Batch RM Item SA2", + properties={ + "is_stock_item": 1, + "create_new_batch": 1, + "has_batch_no": 1, + "batch_number_series": "BATCH-RM-IRM-.####", + }, + ).name + + make_bom(item=fg_item, raw_materials=[rm_item], rate=100, currency="INR") + + service_items = [ + { + "warehouse": "_Test Warehouse - _TC", + "item_code": service_item, + "qty": 5, + "rate": 100, + "fg_item": fg_item, + "fg_item_qty": 5, + }, + ] + sco = get_subcontracting_order(service_items=service_items) + rm_items = get_rm_items(sco.supplied_items) + rm_items[0]["qty"] += 1 + itemwise_details = make_stock_in_entry(rm_items=rm_items) + + for item in rm_items: + item["sco_rm_detail"] = sco.items[0].name + + make_stock_transfer_entry( + sco_no=sco.name, + rm_items=rm_items, + itemwise_details=copy.deepcopy(itemwise_details), + ) + + scr1 = make_subcontracting_receipt(sco.name) + scr1.save() + scr1.supplied_items[0].consumed_qty = 5 + scr1.submit() + + for key, value in get_supplied_items(scr1).items(): + transferred_detais = itemwise_details.get(key) + self.assertEqual(value.qty, 5) + self.assertEqual(sorted(value.serial_no), sorted(transferred_detais.get("serial_no")[0:5])) + + sco.load_from_db() + self.assertEqual(sco.supplied_items[0].consumed_qty, 5) + doc = get_materials_from_supplier(sco.name, [d.name for d in sco.supplied_items]) + doc.save() + self.assertEqual(doc.items[0].qty, 1) + self.assertEqual(doc.items[0].s_warehouse, "_Test Warehouse 1 - _TC") + self.assertEqual(doc.items[0].t_warehouse, "_Test Warehouse - _TC") + self.assertTrue(doc.items[0].batch_no) + self.assertTrue(doc.items[0].use_serial_batch_fields) + frappe.db.set_single_value("Stock Settings", "use_serial_batch_fields", 1) + def test_return_non_consumed_materials(self): """ - Set backflush based on Material Transfer. 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 af378ca2f0b..00076e8ca16 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 @@ -1557,7 +1557,7 @@ def get_type_of_transaction(parent_doc, child_row): elif parent_doc.get("doctype") == "Stock Reconciliation": type_of_transaction = "Inward" - if parent_doc.get("is_return"): + if parent_doc.get("is_return") and parent_doc.get("doctype") != "Stock Entry": type_of_transaction = "Inward" if ( parent_doc.get("doctype") in ["Purchase Receipt", "Purchase Invoice"] diff --git a/erpnext/stock/report/stock_balance/stock_balance.py b/erpnext/stock/report/stock_balance/stock_balance.py index 8ea07338cf1..6b5a3661a37 100644 --- a/erpnext/stock/report/stock_balance/stock_balance.py +++ b/erpnext/stock/report/stock_balance/stock_balance.py @@ -317,7 +317,6 @@ class StockBalanceReport: .where((sle.docstatus < 2) & (sle.is_cancelled == 0)) .orderby(sle.posting_datetime) .orderby(sle.creation) - .orderby(sle.actual_qty) ) query = self.apply_inventory_dimensions_filters(query, sle) From 1ea36bba886ecae907aa0a09e5a6e86e77899cb9 Mon Sep 17 00:00:00 2001 From: Khushi Rawat <142375893+khushi8112@users.noreply.github.com> Date: Tue, 7 Jan 2025 17:38:21 +0530 Subject: [PATCH 0840/1614] feat: work in progress status for asset (#45066) * feat: work in progress status for asset * fix: test case correction * fix(patch): added patch to update status of assets * fix: updated tests (cherry picked from commit 6850019649ca2b357c19d244cf2b1bd0054c7617) # Conflicts: # erpnext/assets/doctype/asset/asset.json # erpnext/patches.txt --- erpnext/assets/doctype/asset/asset.json | 6 +++++- erpnext/assets/doctype/asset/asset.py | 1 + erpnext/assets/doctype/asset/asset_list.js | 7 +++++-- erpnext/assets/doctype/asset/test_asset.py | 4 ++++ .../asset_capitalization/asset_capitalization.py | 6 ++++-- .../asset_capitalization/test_asset_capitalization.py | 2 ++ .../asset_depreciation_schedule.py | 5 +++-- erpnext/patches.txt | 5 +++++ .../v15_0/update_asset_status_to_work_in_progress.py | 11 +++++++++++ 9 files changed, 40 insertions(+), 7 deletions(-) create mode 100644 erpnext/patches/v15_0/update_asset_status_to_work_in_progress.py diff --git a/erpnext/assets/doctype/asset/asset.json b/erpnext/assets/doctype/asset/asset.json index 55932e9b787..6bf3333d4d3 100644 --- a/erpnext/assets/doctype/asset/asset.json +++ b/erpnext/assets/doctype/asset/asset.json @@ -378,7 +378,7 @@ "in_standard_filter": 1, "label": "Status", "no_copy": 1, - "options": "Draft\nSubmitted\nPartially Depreciated\nFully Depreciated\nSold\nScrapped\nIn Maintenance\nOut of Order\nIssue\nReceipt\nCapitalized\nDecapitalized", + "options": "Draft\nSubmitted\nPartially Depreciated\nFully Depreciated\nSold\nScrapped\nIn Maintenance\nOut of Order\nIssue\nReceipt\nCapitalized\nDecapitalized\nWork In Progress", "read_only": 1 }, { @@ -595,7 +595,11 @@ "link_fieldname": "target_asset" } ], +<<<<<<< HEAD "modified": "2024-08-26 23:28:29.095139", +======= + "modified": "2024-12-26 14:23:20.968882", +>>>>>>> 6850019649 (feat: work in progress status for asset (#45066)) "modified_by": "Administrator", "module": "Assets", "name": "Asset", diff --git a/erpnext/assets/doctype/asset/asset.py b/erpnext/assets/doctype/asset/asset.py index 2e0ba2c8218..8aa8c0ba6ac 100644 --- a/erpnext/assets/doctype/asset/asset.py +++ b/erpnext/assets/doctype/asset/asset.py @@ -112,6 +112,7 @@ class Asset(AccountsController): "Receipt", "Capitalized", "Decapitalized", + "Work In Progress", ] supplier: DF.Link | None total_asset_cost: DF.Currency diff --git a/erpnext/assets/doctype/asset/asset_list.js b/erpnext/assets/doctype/asset/asset_list.js index 712958adcfc..0086333a96b 100644 --- a/erpnext/assets/doctype/asset/asset_list.js +++ b/erpnext/assets/doctype/asset/asset_list.js @@ -1,5 +1,6 @@ frappe.listview_settings["Asset"] = { - add_fields: ["status"], + add_fields: ["status", "docstatus"], + has_indicator_for_draft: 1, get_indicator: function (doc) { if (doc.status === "Fully Depreciated") { return [__("Fully Depreciated"), "green", "status,=,Fully Depreciated"]; @@ -7,6 +8,8 @@ frappe.listview_settings["Asset"] = { return [__("Partially Depreciated"), "grey", "status,=,Partially Depreciated"]; } else if (doc.status === "Sold") { return [__("Sold"), "green", "status,=,Sold"]; + } else if (doc.status === "Work In Progress") { + return [__("Work In Progress"), "orange", "status,=,Work In Progress"]; } else if (["Capitalized", "Decapitalized"].includes(doc.status)) { return [__(doc.status), "grey", "status,=," + doc.status]; } else if (doc.status === "Scrapped") { @@ -21,7 +24,7 @@ frappe.listview_settings["Asset"] = { return [__("Receipt"), "green", "status,=,Receipt"]; } else if (doc.status === "Submitted") { return [__("Submitted"), "blue", "status,=,Submitted"]; - } else if (doc.status === "Draft") { + } else if (doc.status === "Draft" || doc.docstatus === 0) { return [__("Draft"), "red", "status,=,Draft"]; } }, diff --git a/erpnext/assets/doctype/asset/test_asset.py b/erpnext/assets/doctype/asset/test_asset.py index 8a320d617ff..9c8db82f41b 100644 --- a/erpnext/assets/doctype/asset/test_asset.py +++ b/erpnext/assets/doctype/asset/test_asset.py @@ -1725,6 +1725,10 @@ def create_asset(**args): }, ) + if asset.is_composite_asset: + asset.gross_purchase_amount = 0 + asset.purchase_amount = 0 + if not args.do_not_save: try: asset.insert(ignore_if_duplicate=True) diff --git a/erpnext/assets/doctype/asset_capitalization/asset_capitalization.py b/erpnext/assets/doctype/asset_capitalization/asset_capitalization.py index b38bd952bca..d33d5c4df73 100644 --- a/erpnext/assets/doctype/asset_capitalization/asset_capitalization.py +++ b/erpnext/assets/doctype/asset_capitalization/asset_capitalization.py @@ -638,6 +638,7 @@ class AssetCapitalization(StockController): self.target_fixed_asset_account = get_asset_category_account( "fixed_asset_account", item=self.target_item_code, company=asset_doc.company ) + asset_doc.set_status("Work In Progress") add_asset_activity( asset_doc.name, @@ -662,8 +663,9 @@ class AssetCapitalization(StockController): total_target_asset_value = flt(self.total_value, self.precision("total_value")) asset_doc = frappe.get_doc("Asset", self.target_asset) - asset_doc.gross_purchase_amount = total_target_asset_value - asset_doc.purchase_amount = total_target_asset_value + asset_doc.gross_purchase_amount += total_target_asset_value + asset_doc.purchase_amount += total_target_asset_value + asset_doc.set_status("Work In Progress") asset_doc.flags.ignore_validate = True asset_doc.save() diff --git a/erpnext/assets/doctype/asset_capitalization/test_asset_capitalization.py b/erpnext/assets/doctype/asset_capitalization/test_asset_capitalization.py index 86293fac765..ba1c5fc2444 100644 --- a/erpnext/assets/doctype/asset_capitalization/test_asset_capitalization.py +++ b/erpnext/assets/doctype/asset_capitalization/test_asset_capitalization.py @@ -96,6 +96,7 @@ class TestAssetCapitalization(unittest.TestCase): target_asset = frappe.get_doc("Asset", asset_capitalization.target_asset) self.assertEqual(target_asset.gross_purchase_amount, total_amount) self.assertEqual(target_asset.purchase_amount, total_amount) + self.assertEqual(target_asset.status, "Work In Progress") # Test Consumed Asset values self.assertEqual(consumed_asset.db_get("status"), "Capitalized") @@ -270,6 +271,7 @@ class TestAssetCapitalization(unittest.TestCase): target_asset = frappe.get_doc("Asset", asset_capitalization.target_asset) self.assertEqual(target_asset.gross_purchase_amount, total_amount) self.assertEqual(target_asset.purchase_amount, total_amount) + self.assertEqual(target_asset.status, "Work In Progress") # Test General Ledger Entries expected_gle = { diff --git a/erpnext/assets/doctype/asset_depreciation_schedule/asset_depreciation_schedule.py b/erpnext/assets/doctype/asset_depreciation_schedule/asset_depreciation_schedule.py index a60478ac8a1..c3c9ef2321b 100644 --- a/erpnext/assets/doctype/asset_depreciation_schedule/asset_depreciation_schedule.py +++ b/erpnext/assets/doctype/asset_depreciation_schedule/asset_depreciation_schedule.py @@ -13,6 +13,7 @@ from frappe.utils import ( flt, get_first_day, get_last_day, + get_link_to_form, getdate, is_last_day_of_the_month, month_diff, @@ -1062,7 +1063,7 @@ def make_new_active_asset_depr_schedules_and_cancel_current_ones( if not current_asset_depr_schedule_doc: frappe.throw( _("Asset Depreciation Schedule not found for Asset {0} and Finance Book {1}").format( - asset_doc.name, row.finance_book + get_link_to_form("Asset", asset_doc.name), row.finance_book ) ) @@ -1108,7 +1109,7 @@ def get_temp_asset_depr_schedule_doc( if not current_asset_depr_schedule_doc: frappe.throw( _("Asset Depreciation Schedule not found for Asset {0} and Finance Book {1}").format( - asset_doc.name, row.finance_book + get_link_to_form("Asset", asset_doc.name), row.finance_book ) ) diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 7e03ef9394c..4f50a3a6c07 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -386,3 +386,8 @@ erpnext.patches.v14_0.update_stock_uom_in_work_order_item erpnext.patches.v15_0.set_is_exchange_gain_loss_in_payment_entry_deductions erpnext.patches.v15_0.enable_allow_existing_serial_no erpnext.patches.v15_0.update_cc_in_process_statement_of_accounts +<<<<<<< HEAD +======= +erpnext.patches.v15_0.refactor_closing_stock_balance #5 +erpnext.patches.v15_0.update_asset_status_to_work_in_progress +>>>>>>> 6850019649 (feat: work in progress status for asset (#45066)) diff --git a/erpnext/patches/v15_0/update_asset_status_to_work_in_progress.py b/erpnext/patches/v15_0/update_asset_status_to_work_in_progress.py new file mode 100644 index 00000000000..3ac7f25da15 --- /dev/null +++ b/erpnext/patches/v15_0/update_asset_status_to_work_in_progress.py @@ -0,0 +1,11 @@ +import frappe + + +def execute(): + Asset = frappe.qb.DocType("Asset") + query = ( + frappe.qb.update(Asset) + .set(Asset.status, "Work In Progress") + .where((Asset.docstatus == 0) & (Asset.is_composite_asset == 1)) + ) + query.run() From 931b5166a86d235e709734f79065d6cab57c8547 Mon Sep 17 00:00:00 2001 From: marination Date: Mon, 6 Jan 2025 20:27:06 +0530 Subject: [PATCH 0841/1614] fix: Missing company filter breaks `get_account_balance` in Bank Reco (cherry picked from commit 8de0fe78eaa3c6798a9fa002513ee912852f661c) --- .../bank_reconciliation_tool.js | 2 ++ .../bank_reconciliation_tool.py | 26 ++++++++++--------- .../data_table_manager.js | 3 ++- 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.js b/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.js index b15745d834c..7a653e12c72 100644 --- a/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.js +++ b/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.js @@ -120,6 +120,7 @@ frappe.ui.form.on("Bank Reconciliation Tool", { args: { bank_account: frm.doc.bank_account, till_date: frappe.datetime.add_days(frm.doc.bank_statement_from_date, -1), + company: frm.doc.company, }, callback: (response) => { frm.set_value("account_opening_balance", response.message); @@ -135,6 +136,7 @@ frappe.ui.form.on("Bank Reconciliation Tool", { args: { bank_account: frm.doc.bank_account, till_date: frm.doc.bank_statement_to_date, + company: frm.doc.company, }, callback: (response) => { frm.cleared_balance = response.message; 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 ce7e9436ad5..4b677d56f1f 100644 --- a/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py +++ b/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py @@ -5,11 +5,6 @@ import json import frappe -from frappe import _ -from frappe.model.document import Document -from frappe.query_builder.custom import ConstantColumn -from frappe.utils import cint, flt - from erpnext import get_default_cost_center from erpnext.accounts.doctype.bank_transaction.bank_transaction import get_total_allocated_amount from erpnext.accounts.party import get_party_account @@ -19,6 +14,10 @@ from erpnext.accounts.report.bank_reconciliation_statement.bank_reconciliation_s ) from erpnext.accounts.utils import get_account_currency, get_balance_on from erpnext.setup.utils import get_exchange_rate +from frappe import _ +from frappe.model.document import Document +from frappe.query_builder.custom import ConstantColumn +from frappe.utils import cint, flt class BankReconciliationTool(Document): @@ -79,10 +78,17 @@ def get_bank_transactions(bank_account, from_date=None, to_date=None): @frappe.whitelist() -def get_account_balance(bank_account, till_date): +def get_account_balance(bank_account, till_date, company): # returns account balance till the specified date account = frappe.db.get_value("Bank Account", bank_account, "account") - filters = frappe._dict({"account": account, "report_date": till_date, "include_pos_transactions": 1}) + filters = frappe._dict( + { + "account": account, + "report_date": till_date, + "include_pos_transactions": 1, + "company": company, + } + ) data = get_entries(filters) balance_as_per_system = get_balance_on(filters["account"], filters["report_date"]) @@ -94,11 +100,7 @@ def get_account_balance(bank_account, till_date): amounts_not_reflected_in_system = get_amounts_not_reflected_in_system(filters) - bank_bal = ( - flt(balance_as_per_system) - flt(total_debit) + flt(total_credit) + amounts_not_reflected_in_system - ) - - return bank_bal + return flt(balance_as_per_system) - flt(total_debit) + flt(total_credit) + amounts_not_reflected_in_system @frappe.whitelist() diff --git a/erpnext/public/js/bank_reconciliation_tool/data_table_manager.js b/erpnext/public/js/bank_reconciliation_tool/data_table_manager.js index 4aa087e99cf..ad5fd528cda 100644 --- a/erpnext/public/js/bank_reconciliation_tool/data_table_manager.js +++ b/erpnext/public/js/bank_reconciliation_tool/data_table_manager.js @@ -16,7 +16,7 @@ erpnext.accounts.bank_reconciliation.DataTableManager = class DataTableManager { } make_dt() { - var me = this; + const me = this; frappe.call({ method: "erpnext.accounts.doctype.bank_reconciliation_tool.bank_reconciliation_tool.get_bank_transactions", args: { @@ -193,6 +193,7 @@ erpnext.accounts.bank_reconciliation.DataTableManager = class DataTableManager { args: { bank_account: this.bank_account, till_date: this.bank_statement_to_date, + company: this.company, }, callback: (response) => (this.cleared_balance = response.message), }); From 754845a935d735a5e074b7de42f1df40cf8cf2e7 Mon Sep 17 00:00:00 2001 From: marination Date: Mon, 6 Jan 2025 21:14:41 +0530 Subject: [PATCH 0842/1614] fix: Override pre-commit behaviour due to conflicts with CI (cherry picked from commit d7bf73cffa5628c185f4ceabd6020c7e4daf54a6) --- .../bank_reconciliation_tool/bank_reconciliation_tool.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 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 4b677d56f1f..62a4c74a933 100644 --- a/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py +++ b/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py @@ -5,6 +5,11 @@ import json import frappe +from frappe import _ +from frappe.model.document import Document +from frappe.query_builder.custom import ConstantColumn +from frappe.utils import cint, flt + from erpnext import get_default_cost_center from erpnext.accounts.doctype.bank_transaction.bank_transaction import get_total_allocated_amount from erpnext.accounts.party import get_party_account @@ -14,10 +19,6 @@ from erpnext.accounts.report.bank_reconciliation_statement.bank_reconciliation_s ) from erpnext.accounts.utils import get_account_currency, get_balance_on from erpnext.setup.utils import get_exchange_rate -from frappe import _ -from frappe.model.document import Document -from frappe.query_builder.custom import ConstantColumn -from frappe.utils import cint, flt class BankReconciliationTool(Document): From acd66fa00c087c6d023675679b31a2c96fcde220 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Wed, 8 Jan 2025 08:22:37 +0530 Subject: [PATCH 0843/1614] chore: remove 'Experimental' tag (cherry picked from commit 4620025dcd5833d3a60b5787120f641e463a489b) # Conflicts: # erpnext/accounts/doctype/process_payment_reconciliation_log/process_payment_reconciliation_log.json --- .../process_payment_reconciliation.json | 5 ++--- .../process_payment_reconciliation.py | 2 +- .../process_payment_reconciliation_log.json | 5 ++++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/erpnext/accounts/doctype/process_payment_reconciliation/process_payment_reconciliation.json b/erpnext/accounts/doctype/process_payment_reconciliation/process_payment_reconciliation.json index 0511571d754..bfd4e0ad63a 100644 --- a/erpnext/accounts/doctype/process_payment_reconciliation/process_payment_reconciliation.json +++ b/erpnext/accounts/doctype/process_payment_reconciliation/process_payment_reconciliation.json @@ -1,7 +1,6 @@ { "actions": [], "autoname": "format:ACC-PPR-{#####}", - "beta": 1, "creation": "2023-03-30 21:28:39.793927", "default_view": "List", "doctype": "DocType", @@ -158,7 +157,7 @@ "index_web_pages_for_search": 1, "is_submittable": 1, "links": [], - "modified": "2024-08-27 14:48:56.715320", + "modified": "2025-01-08 08:22:14.798085", "modified_by": "Administrator", "module": "Accounts", "name": "Process Payment Reconciliation", @@ -192,4 +191,4 @@ "sort_order": "DESC", "states": [], "title_field": "company" -} +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/process_payment_reconciliation/process_payment_reconciliation.py b/erpnext/accounts/doctype/process_payment_reconciliation/process_payment_reconciliation.py index 882a2c4ad1c..35f1e31af34 100644 --- a/erpnext/accounts/doctype/process_payment_reconciliation/process_payment_reconciliation.py +++ b/erpnext/accounts/doctype/process_payment_reconciliation/process_payment_reconciliation.py @@ -212,7 +212,7 @@ def trigger_reconciliation_for_queued_docs(): unique_filters = set() queue_size = 5 - fields = ["company", "party_type", "party", "receivable_payable_account"] + fields = ["company", "party_type", "party", "receivable_payable_account", "default_advance_account"] def get_filters_as_tuple(fields, doc): filters = () diff --git a/erpnext/accounts/doctype/process_payment_reconciliation_log/process_payment_reconciliation_log.json b/erpnext/accounts/doctype/process_payment_reconciliation_log/process_payment_reconciliation_log.json index b4ac9812cbf..d5e52a72df5 100644 --- a/erpnext/accounts/doctype/process_payment_reconciliation_log/process_payment_reconciliation_log.json +++ b/erpnext/accounts/doctype/process_payment_reconciliation_log/process_payment_reconciliation_log.json @@ -1,7 +1,6 @@ { "actions": [], "autoname": "format:PPR-LOG-{##}", - "beta": 1, "creation": "2023-03-13 15:00:09.149681", "default_view": "List", "doctype": "DocType", @@ -110,7 +109,11 @@ "in_create": 1, "index_web_pages_for_search": 1, "links": [], +<<<<<<< HEAD "modified": "2023-11-02 11:32:12.254018", +======= + "modified": "2025-01-08 08:22:19.104975", +>>>>>>> 4620025dcd (chore: remove 'Experimental' tag) "modified_by": "Administrator", "module": "Accounts", "name": "Process Payment Reconciliation Log", From e578ab2c86e2c4d7c541026616d767370adbec1b Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Wed, 8 Jan 2025 09:16:53 +0530 Subject: [PATCH 0844/1614] refactor: remove tally migration doctype --- .../tally_migration/tally_migration.json | 279 ------- .../tally_migration/tally_migration.py | 768 ------------------ .../tally_migration/test_tally_migration.py | 8 - 3 files changed, 1055 deletions(-) delete mode 100644 erpnext/erpnext_integrations/doctype/tally_migration/tally_migration.json delete mode 100644 erpnext/erpnext_integrations/doctype/tally_migration/tally_migration.py delete mode 100644 erpnext/erpnext_integrations/doctype/tally_migration/test_tally_migration.py diff --git a/erpnext/erpnext_integrations/doctype/tally_migration/tally_migration.json b/erpnext/erpnext_integrations/doctype/tally_migration/tally_migration.json deleted file mode 100644 index 417d9437926..00000000000 --- a/erpnext/erpnext_integrations/doctype/tally_migration/tally_migration.json +++ /dev/null @@ -1,279 +0,0 @@ -{ - "actions": [], - "beta": 1, - "creation": "2019-02-01 14:27:09.485238", - "doctype": "DocType", - "editable_grid": 1, - "engine": "InnoDB", - "field_order": [ - "status", - "master_data", - "is_master_data_processed", - "is_master_data_imported", - "column_break_2", - "tally_creditors_account", - "tally_debtors_account", - "company_section", - "tally_company", - "default_uom", - "column_break_8", - "erpnext_company", - "processed_files_section", - "chart_of_accounts", - "parties", - "addresses", - "column_break_17", - "uoms", - "items", - "vouchers", - "accounts_section", - "default_warehouse", - "default_round_off_account", - "column_break_21", - "default_cost_center", - "day_book_section", - "day_book_data", - "column_break_27", - "is_day_book_data_processed", - "is_day_book_data_imported", - "import_log_section", - "failed_import_log", - "fixed_errors_log", - "failed_import_preview", - "fixed_error_log_preview" - ], - "fields": [ - { - "fieldname": "status", - "fieldtype": "Data", - "hidden": 1, - "label": "Status" - }, - { - "description": "Data exported from Tally that consists of the Chart of Accounts, Customers, Suppliers, Addresses, Items and UOMs", - "fieldname": "master_data", - "fieldtype": "Attach", - "in_list_view": 1, - "label": "Master Data" - }, - { - "default": "Sundry Creditors", - "description": "Creditors Account set in Tally", - "fieldname": "tally_creditors_account", - "fieldtype": "Data", - "label": "Tally Creditors Account", - "read_only_depends_on": "eval:doc.is_master_data_processed==1", - "reqd": 1 - }, - { - "fieldname": "column_break_2", - "fieldtype": "Column Break" - }, - { - "default": "Sundry Debtors", - "description": "Debtors Account set in Tally", - "fieldname": "tally_debtors_account", - "fieldtype": "Data", - "label": "Tally Debtors Account", - "read_only_depends_on": "eval:doc.is_master_data_processed==1", - "reqd": 1 - }, - { - "depends_on": "is_master_data_processed", - "fieldname": "company_section", - "fieldtype": "Section Break" - }, - { - "description": "Company Name as per Imported Tally Data", - "fieldname": "tally_company", - "fieldtype": "Data", - "label": "Tally Company", - "read_only": 1 - }, - { - "fieldname": "column_break_8", - "fieldtype": "Column Break" - }, - { - "description": "Your Company set in ERPNext", - "fieldname": "erpnext_company", - "fieldtype": "Data", - "label": "ERPNext Company", - "read_only_depends_on": "eval:doc.is_master_data_processed==1" - }, - { - "fieldname": "processed_files_section", - "fieldtype": "Section Break", - "hidden": 1, - "label": "Processed Files" - }, - { - "fieldname": "chart_of_accounts", - "fieldtype": "Attach", - "label": "Chart of Accounts" - }, - { - "fieldname": "parties", - "fieldtype": "Attach", - "label": "Parties" - }, - { - "fieldname": "addresses", - "fieldtype": "Attach", - "label": "Addresses" - }, - { - "fieldname": "column_break_17", - "fieldtype": "Column Break" - }, - { - "fieldname": "uoms", - "fieldtype": "Attach", - "label": "UOMs" - }, - { - "fieldname": "items", - "fieldtype": "Attach", - "label": "Items" - }, - { - "fieldname": "vouchers", - "fieldtype": "Attach", - "label": "Vouchers" - }, - { - "depends_on": "is_master_data_imported", - "description": "The accounts are set by the system automatically but do confirm these defaults", - "fieldname": "accounts_section", - "fieldtype": "Section Break", - "label": "Accounts" - }, - { - "fieldname": "default_warehouse", - "fieldtype": "Link", - "label": "Default Warehouse", - "options": "Warehouse" - }, - { - "fieldname": "column_break_21", - "fieldtype": "Column Break" - }, - { - "fieldname": "default_cost_center", - "fieldtype": "Link", - "label": "Default Cost Center", - "options": "Cost Center" - }, - { - "default": "0", - "fieldname": "is_master_data_processed", - "fieldtype": "Check", - "label": "Is Master Data Processed", - "read_only": 1 - }, - { - "default": "0", - "fieldname": "is_day_book_data_processed", - "fieldtype": "Check", - "label": "Is Day Book Data Processed", - "read_only": 1 - }, - { - "default": "0", - "fieldname": "is_day_book_data_imported", - "fieldtype": "Check", - "label": "Is Day Book Data Imported", - "read_only": 1 - }, - { - "default": "0", - "fieldname": "is_master_data_imported", - "fieldtype": "Check", - "label": "Is Master Data Imported", - "read_only": 1 - }, - { - "depends_on": "is_master_data_imported", - "fieldname": "day_book_section", - "fieldtype": "Section Break" - }, - { - "fieldname": "column_break_27", - "fieldtype": "Column Break" - }, - { - "description": "Day Book Data exported from Tally that consists of all historic transactions", - "fieldname": "day_book_data", - "fieldtype": "Attach", - "in_list_view": 1, - "label": "Day Book Data" - }, - { - "default": "Unit", - "description": "UOM in case unspecified in imported data", - "fieldname": "default_uom", - "fieldtype": "Link", - "label": "Default UOM", - "options": "UOM", - "read_only_depends_on": "eval:doc.is_master_data_imported==1" - }, - { - "default": "[]", - "fieldname": "failed_import_log", - "fieldtype": "Code", - "hidden": 1, - "options": "JSON" - }, - { - "fieldname": "failed_import_preview", - "fieldtype": "HTML", - "label": "Failed Import Log" - }, - { - "fieldname": "import_log_section", - "fieldtype": "Section Break", - "label": "Import Log" - }, - { - "fieldname": "default_round_off_account", - "fieldtype": "Link", - "label": "Default Round Off Account", - "options": "Account" - }, - { - "default": "[]", - "fieldname": "fixed_errors_log", - "fieldtype": "Code", - "hidden": 1, - "options": "JSON" - }, - { - "fieldname": "fixed_error_log_preview", - "fieldtype": "HTML", - "label": "Fixed Error Log" - } - ], - "links": [], - "modified": "2020-04-28 00:29:18.039826", - "modified_by": "Administrator", - "module": "ERPNext Integrations", - "name": "Tally Migration", - "owner": "Administrator", - "permissions": [ - { - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "System Manager", - "share": 1, - "write": 1 - } - ], - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 1 -} \ No newline at end of file diff --git a/erpnext/erpnext_integrations/doctype/tally_migration/tally_migration.py b/erpnext/erpnext_integrations/doctype/tally_migration/tally_migration.py deleted file mode 100644 index d41818a4454..00000000000 --- a/erpnext/erpnext_integrations/doctype/tally_migration/tally_migration.py +++ /dev/null @@ -1,768 +0,0 @@ -# Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -import json -import re -import sys -import traceback -import zipfile -from decimal import Decimal - -import frappe -from bs4 import BeautifulSoup as bs -from frappe import _ -from frappe.custom.doctype.custom_field.custom_field import ( - create_custom_fields as _create_custom_fields, -) -from frappe.model.document import Document -from frappe.utils.data import format_datetime - -from erpnext import encode_company_abbr -from erpnext.accounts.doctype.account.chart_of_accounts.chart_of_accounts import create_charts -from erpnext.accounts.doctype.chart_of_accounts_importer.chart_of_accounts_importer import ( - unset_existing_data, -) - -PRIMARY_ACCOUNT = "Primary" -VOUCHER_CHUNK_SIZE = 500 - - -@frappe.whitelist() -def new_doc(document): - document = json.loads(document) - doctype = document.pop("doctype") - document.pop("name", None) - doc = frappe.new_doc(doctype) - doc.update(document) - - return doc - - -class TallyMigration(Document): - # begin: auto-generated types - # This code is auto-generated. Do not modify anything in this block. - - from typing import TYPE_CHECKING - - if TYPE_CHECKING: - from frappe.types import DF - - addresses: DF.Attach | None - chart_of_accounts: DF.Attach | None - day_book_data: DF.Attach | None - default_cost_center: DF.Link | None - default_round_off_account: DF.Link | None - default_uom: DF.Link | None - default_warehouse: DF.Link | None - erpnext_company: DF.Data | None - failed_import_log: DF.Code | None - fixed_errors_log: DF.Code | None - is_day_book_data_imported: DF.Check - is_day_book_data_processed: DF.Check - is_master_data_imported: DF.Check - is_master_data_processed: DF.Check - items: DF.Attach | None - master_data: DF.Attach | None - parties: DF.Attach | None - status: DF.Data | None - tally_company: DF.Data | None - tally_creditors_account: DF.Data - tally_debtors_account: DF.Data - uoms: DF.Attach | None - vouchers: DF.Attach | None - # end: auto-generated types - - def validate(self): - failed_import_log = json.loads(self.failed_import_log) - sorted_failed_import_log = sorted(failed_import_log, key=lambda row: row["doc"]["creation"]) - self.failed_import_log = json.dumps(sorted_failed_import_log) - - def autoname(self): - if not self.name: - self.name = "Tally Migration on " + format_datetime(self.creation) - - def get_collection(self, data_file): - def sanitize(string): - return re.sub("", "", string) - - def emptify(string): - string = re.sub(r"<\w+/>", "", string) - string = re.sub(r"<([\w.]+)>\s*<\/\1>", "", string) - string = re.sub(r"\r\n", "", string) - return string - - master_file = frappe.get_doc("File", {"file_url": data_file}) - master_file_path = master_file.get_full_path() - - if zipfile.is_zipfile(master_file_path): - with zipfile.ZipFile(master_file_path) as zf: - encoded_content = zf.read(zf.namelist()[0]) - try: - content = encoded_content.decode("utf-8-sig") - except UnicodeDecodeError: - content = encoded_content.decode("utf-16") - - master = bs(sanitize(emptify(content)), "xml") - collection = master.BODY.IMPORTDATA.REQUESTDATA - return collection - - def dump_processed_data(self, data): - for key, value in data.items(): - f = frappe.get_doc( - { - "doctype": "File", - "file_name": key + ".json", - "attached_to_doctype": self.doctype, - "attached_to_name": self.name, - "content": json.dumps(value), - "is_private": True, - } - ) - try: - f.insert(ignore_if_duplicate=True) - except frappe.DuplicateEntryError: - pass - setattr(self, key, f.file_url) - - def set_account_defaults(self): - self.default_cost_center, self.default_round_off_account = frappe.db.get_value( - "Company", self.erpnext_company, ["cost_center", "round_off_account"] - ) - self.default_warehouse = frappe.db.get_value("Stock Settings", "Stock Settings", "default_warehouse") - - def _process_master_data(self): - def get_company_name(collection): - return collection.find_all("REMOTECMPINFO.LIST")[0].REMOTECMPNAME.string.strip() - - def get_coa_customers_suppliers(collection): - root_type_map = { - "Application of Funds (Assets)": "Asset", - "Expenses": "Expense", - "Income": "Income", - "Source of Funds (Liabilities)": "Liability", - } - roots = set(root_type_map.keys()) - accounts = list(get_groups(collection.find_all("GROUP"))) + list( - get_ledgers(collection.find_all("LEDGER")) - ) - children, parents = get_children_and_parent_dict(accounts) - group_set = [acc[1] for acc in accounts if acc[2]] - children, customers, suppliers = remove_parties(parents, children, group_set) - - try: - coa = traverse({}, children, roots, roots, group_set) - except RecursionError: - self.log( - _( - "Error occured while parsing Chart of Accounts: Please make sure that no two accounts have the same name" - ) - ) - - for account in coa: - coa[account]["root_type"] = root_type_map[account] - - return coa, customers, suppliers - - def get_groups(accounts): - for account in accounts: - if account["NAME"] in (self.tally_creditors_account, self.tally_debtors_account): - yield get_parent(account), account["NAME"], 0 - else: - yield get_parent(account), account["NAME"], 1 - - def get_ledgers(accounts): - for account in accounts: - # If Ledger doesn't have PARENT field then don't create Account - # For example "Profit & Loss A/c" - if account.PARENT: - yield account.PARENT.string.strip(), account["NAME"], 0 - - def get_parent(account): - if account.PARENT: - return account.PARENT.string.strip() - return { - ("Yes", "No"): "Application of Funds (Assets)", - ("Yes", "Yes"): "Expenses", - ("No", "Yes"): "Income", - ("No", "No"): "Source of Funds (Liabilities)", - }[(account.ISDEEMEDPOSITIVE.string.strip(), account.ISREVENUE.string.strip())] - - def get_children_and_parent_dict(accounts): - children, parents = {}, {} - for parent, account, _is_group in accounts: - children.setdefault(parent, set()).add(account) - parents.setdefault(account, set()).add(parent) - parents[account].update(parents.get(parent, [])) - return children, parents - - def remove_parties(parents, children, group_set): - customers, suppliers = set(), set() - for account in parents: - found = False - if self.tally_creditors_account in parents[account]: - found = True - if account not in group_set: - suppliers.add(account) - if self.tally_debtors_account in parents[account]: - found = True - if account not in group_set: - customers.add(account) - if found: - children.pop(account, None) - - return children, customers, suppliers - - def traverse(tree, children, accounts, roots, group_set): - for account in accounts: - if account in group_set or account in roots: - if account in children: - tree[account] = traverse({}, children, children[account], roots, group_set) - else: - tree[account] = {"is_group": 1} - else: - tree[account] = {} - return tree - - def get_parties_addresses(collection, customers, suppliers): - parties, addresses = [], [] - for account in collection.find_all("LEDGER"): - party_type = None - links = [] - if account.NAME.string.strip() in customers: - party_type = "Customer" - parties.append( - { - "doctype": party_type, - "customer_name": account.NAME.string.strip(), - "tax_id": account.INCOMETAXNUMBER.string.strip() - if account.INCOMETAXNUMBER - else None, - "customer_group": "All Customer Groups", - "territory": "All Territories", - "customer_type": "Individual", - } - ) - links.append({"link_doctype": party_type, "link_name": account["NAME"]}) - - if account.NAME.string.strip() in suppliers: - party_type = "Supplier" - parties.append( - { - "doctype": party_type, - "supplier_name": account.NAME.string.strip(), - "pan": account.INCOMETAXNUMBER.string.strip() - if account.INCOMETAXNUMBER - else None, - "supplier_group": "All Supplier Groups", - "supplier_type": "Individual", - } - ) - links.append({"link_doctype": party_type, "link_name": account["NAME"]}) - - if party_type: - address = "\n".join([a.string.strip() for a in account.find_all("ADDRESS")]) - addresses.append( - { - "doctype": "Address", - "address_line1": address[:140].strip(), - "address_line2": address[140:].strip(), - "country": account.COUNTRYNAME.string.strip() if account.COUNTRYNAME else None, - "state": account.LEDSTATENAME.string.strip() if account.LEDSTATENAME else None, - "gst_state": account.LEDSTATENAME.string.strip() - if account.LEDSTATENAME - else None, - "pin_code": account.PINCODE.string.strip() if account.PINCODE else None, - "mobile": account.LEDGERPHONE.string.strip() if account.LEDGERPHONE else None, - "phone": account.LEDGERPHONE.string.strip() if account.LEDGERPHONE else None, - "gstin": account.PARTYGSTIN.string.strip() if account.PARTYGSTIN else None, - "links": links, - } - ) - return parties, addresses - - def get_stock_items_uoms(collection): - uoms = [] - for uom in collection.find_all("UNIT"): - uoms.append({"doctype": "UOM", "uom_name": uom.NAME.string.strip()}) - - items = [] - for item in collection.find_all("STOCKITEM"): - stock_uom = item.BASEUNITS.string.strip() if item.BASEUNITS else self.default_uom - items.append( - { - "doctype": "Item", - "item_code": item.NAME.string.strip(), - "stock_uom": stock_uom.strip(), - "is_stock_item": 0, - "item_group": "All Item Groups", - "item_defaults": [{"company": self.erpnext_company}], - } - ) - - return items, uoms - - try: - self.publish("Process Master Data", _("Reading Uploaded File"), 1, 5) - collection = self.get_collection(self.master_data) - company = get_company_name(collection) - self.tally_company = company - self.erpnext_company = company - - self.publish("Process Master Data", _("Processing Chart of Accounts and Parties"), 2, 5) - chart_of_accounts, customers, suppliers = get_coa_customers_suppliers(collection) - - self.publish("Process Master Data", _("Processing Party Addresses"), 3, 5) - parties, addresses = get_parties_addresses(collection, customers, suppliers) - - self.publish("Process Master Data", _("Processing Items and UOMs"), 4, 5) - items, uoms = get_stock_items_uoms(collection) - data = { - "chart_of_accounts": chart_of_accounts, - "parties": parties, - "addresses": addresses, - "items": items, - "uoms": uoms, - } - - self.publish("Process Master Data", _("Done"), 5, 5) - self.dump_processed_data(data) - - self.is_master_data_processed = 1 - - except Exception: - self.publish("Process Master Data", _("Process Failed"), -1, 5) - self.log() - - finally: - self.set_status() - - def publish(self, title, message, count, total): - frappe.publish_realtime( - "tally_migration_progress_update", - {"title": title, "message": message, "count": count, "total": total}, - user=self.modified_by, - ) - - def _import_master_data(self): - def create_company_and_coa(coa_file_url): - coa_file = frappe.get_doc("File", {"file_url": coa_file_url}) - frappe.local.flags.ignore_chart_of_accounts = True - - try: - company = frappe.get_doc( - { - "doctype": "Company", - "company_name": self.erpnext_company, - "default_currency": "INR", - "enable_perpetual_inventory": 0, - } - ).insert() - except frappe.DuplicateEntryError: - company = frappe.get_doc("Company", self.erpnext_company) - unset_existing_data(self.erpnext_company) - - frappe.local.flags.ignore_chart_of_accounts = False - create_charts(company.name, custom_chart=json.loads(coa_file.get_content())) - company.create_default_warehouses() - - def create_parties_and_addresses(parties_file_url, addresses_file_url): - parties_file = frappe.get_doc("File", {"file_url": parties_file_url}) - for party in json.loads(parties_file.get_content()): - try: - party_doc = frappe.get_doc(party) - party_doc.insert() - except Exception: - self.log(party_doc) - addresses_file = frappe.get_doc("File", {"file_url": addresses_file_url}) - for address in json.loads(addresses_file.get_content()): - try: - address_doc = frappe.get_doc(address) - address_doc.insert(ignore_mandatory=True) - except Exception: - self.log(address_doc) - - def create_items_uoms(items_file_url, uoms_file_url): - uoms_file = frappe.get_doc("File", {"file_url": uoms_file_url}) - for uom in json.loads(uoms_file.get_content()): - if not frappe.db.exists(uom): - try: - uom_doc = frappe.get_doc(uom) - uom_doc.insert() - except Exception: - self.log(uom_doc) - - items_file = frappe.get_doc("File", {"file_url": items_file_url}) - for item in json.loads(items_file.get_content()): - try: - item_doc = frappe.get_doc(item) - item_doc.insert() - except Exception: - self.log(item_doc) - - try: - self.publish("Import Master Data", _("Creating Company and Importing Chart of Accounts"), 1, 4) - create_company_and_coa(self.chart_of_accounts) - - self.publish("Import Master Data", _("Importing Parties and Addresses"), 2, 4) - create_parties_and_addresses(self.parties, self.addresses) - - self.publish("Import Master Data", _("Importing Items and UOMs"), 3, 4) - create_items_uoms(self.items, self.uoms) - - self.publish("Import Master Data", _("Done"), 4, 4) - - self.set_account_defaults() - self.is_master_data_imported = 1 - frappe.db.commit() - - except Exception: - self.publish("Import Master Data", _("Process Failed"), -1, 5) - frappe.db.rollback() - self.log() - - finally: - self.set_status() - - def _process_day_book_data(self): - def get_vouchers(collection): - vouchers = [] - for voucher in collection.find_all("VOUCHER"): - if voucher.ISCANCELLED.string.strip() == "Yes": - continue - inventory_entries = ( - voucher.find_all("INVENTORYENTRIES.LIST") - + voucher.find_all("ALLINVENTORYENTRIES.LIST") - + voucher.find_all("INVENTORYENTRIESIN.LIST") - + voucher.find_all("INVENTORYENTRIESOUT.LIST") - ) - if ( - voucher.VOUCHERTYPENAME.string.strip() not in ["Journal", "Receipt", "Payment", "Contra"] - and inventory_entries - ): - function = voucher_to_invoice - else: - function = voucher_to_journal_entry - try: - processed_voucher = function(voucher) - if processed_voucher: - vouchers.append(processed_voucher) - frappe.db.commit() - except Exception: - frappe.db.rollback() - self.log(voucher) - return vouchers - - def voucher_to_journal_entry(voucher): - accounts = [] - ledger_entries = voucher.find_all("ALLLEDGERENTRIES.LIST") + voucher.find_all( - "LEDGERENTRIES.LIST" - ) - for entry in ledger_entries: - account = { - "account": encode_company_abbr(entry.LEDGERNAME.string.strip(), self.erpnext_company), - "cost_center": self.default_cost_center, - } - if entry.ISPARTYLEDGER.string.strip() == "Yes": - party_details = get_party(entry.LEDGERNAME.string.strip()) - if party_details: - party_type, party_account = party_details - account["party_type"] = party_type - account["account"] = party_account - account["party"] = entry.LEDGERNAME.string.strip() - amount = Decimal(entry.AMOUNT.string.strip()) - if amount > 0: - account["credit_in_account_currency"] = str(abs(amount)) - else: - account["debit_in_account_currency"] = str(abs(amount)) - accounts.append(account) - - journal_entry = { - "doctype": "Journal Entry", - "tally_guid": voucher.GUID.string.strip(), - "tally_voucher_no": voucher.VOUCHERNUMBER.string.strip() if voucher.VOUCHERNUMBER else "", - "posting_date": voucher.DATE.string.strip(), - "company": self.erpnext_company, - "accounts": accounts, - } - return journal_entry - - def voucher_to_invoice(voucher): - if voucher.VOUCHERTYPENAME.string.strip() in ["Sales", "Credit Note"]: - doctype = "Sales Invoice" - party_field = "customer" - account_field = "debit_to" - account_name = encode_company_abbr(self.tally_debtors_account, self.erpnext_company) - price_list_field = "selling_price_list" - elif voucher.VOUCHERTYPENAME.string.strip() in ["Purchase", "Debit Note"]: - doctype = "Purchase Invoice" - party_field = "supplier" - account_field = "credit_to" - account_name = encode_company_abbr(self.tally_creditors_account, self.erpnext_company) - price_list_field = "buying_price_list" - else: - # Do not handle vouchers other than "Purchase", "Debit Note", "Sales" and "Credit Note" - # Do not handle Custom Vouchers either - return - - invoice = { - "doctype": doctype, - party_field: voucher.PARTYNAME.string.strip(), - "tally_guid": voucher.GUID.string.strip(), - "tally_voucher_no": voucher.VOUCHERNUMBER.string.strip() if voucher.VOUCHERNUMBER else "", - "posting_date": voucher.DATE.string.strip(), - "due_date": voucher.DATE.string.strip(), - "items": get_voucher_items(voucher, doctype), - "taxes": get_voucher_taxes(voucher), - account_field: account_name, - price_list_field: "Tally Price List", - "set_posting_time": 1, - "disable_rounded_total": 1, - "company": self.erpnext_company, - } - return invoice - - def get_voucher_items(voucher, doctype): - inventory_entries = ( - voucher.find_all("INVENTORYENTRIES.LIST") - + voucher.find_all("ALLINVENTORYENTRIES.LIST") - + voucher.find_all("INVENTORYENTRIESIN.LIST") - + voucher.find_all("INVENTORYENTRIESOUT.LIST") - ) - if doctype == "Sales Invoice": - account_field = "income_account" - elif doctype == "Purchase Invoice": - account_field = "expense_account" - items = [] - for entry in inventory_entries: - qty, uom = entry.ACTUALQTY.string.strip().split() - items.append( - { - "item_code": entry.STOCKITEMNAME.string.strip(), - "description": entry.STOCKITEMNAME.string.strip(), - "qty": qty.strip(), - "uom": uom.strip(), - "conversion_factor": 1, - "price_list_rate": entry.RATE.string.strip().split("/")[0], - "cost_center": self.default_cost_center, - "warehouse": self.default_warehouse, - account_field: encode_company_abbr( - entry.find_all("ACCOUNTINGALLOCATIONS.LIST")[0].LEDGERNAME.string.strip(), - self.erpnext_company, - ), - } - ) - return items - - def get_voucher_taxes(voucher): - ledger_entries = voucher.find_all("ALLLEDGERENTRIES.LIST") + voucher.find_all( - "LEDGERENTRIES.LIST" - ) - taxes = [] - for entry in ledger_entries: - if entry.ISPARTYLEDGER.string.strip() == "No": - tax_account = encode_company_abbr(entry.LEDGERNAME.string.strip(), self.erpnext_company) - taxes.append( - { - "charge_type": "Actual", - "account_head": tax_account, - "description": tax_account, - "tax_amount": entry.AMOUNT.string.strip(), - "cost_center": self.default_cost_center, - } - ) - return taxes - - def get_party(party): - if frappe.db.exists({"doctype": "Supplier", "supplier_name": party}): - return "Supplier", encode_company_abbr(self.tally_creditors_account, self.erpnext_company) - elif frappe.db.exists({"doctype": "Customer", "customer_name": party}): - return "Customer", encode_company_abbr(self.tally_debtors_account, self.erpnext_company) - - try: - self.publish("Process Day Book Data", _("Reading Uploaded File"), 1, 3) - collection = self.get_collection(self.day_book_data) - - self.publish("Process Day Book Data", _("Processing Vouchers"), 2, 3) - vouchers = get_vouchers(collection) - - self.publish("Process Day Book Data", _("Done"), 3, 3) - self.dump_processed_data({"vouchers": vouchers}) - - self.is_day_book_data_processed = 1 - - except Exception: - self.publish("Process Day Book Data", _("Process Failed"), -1, 5) - self.log() - - finally: - self.set_status() - - def _import_day_book_data(self): - def create_fiscal_years(vouchers): - from frappe.utils.data import add_years, getdate - - earliest_date = getdate(min(voucher["posting_date"] for voucher in vouchers)) - oldest_year = frappe.get_all( - "Fiscal Year", fields=["year_start_date", "year_end_date"], order_by="year_start_date" - )[0] - while earliest_date < oldest_year.year_start_date: - new_year = frappe.get_doc({"doctype": "Fiscal Year"}) - new_year.year_start_date = add_years(oldest_year.year_start_date, -1) - new_year.year_end_date = add_years(oldest_year.year_end_date, -1) - if new_year.year_start_date.year == new_year.year_end_date.year: - new_year.year = new_year.year_start_date.year - else: - new_year.year = f"{new_year.year_start_date.year}-{new_year.year_end_date.year}" - new_year.save() - oldest_year = new_year - - def create_custom_fields(): - _create_custom_fields( - { - ("Journal Entry", "Purchase Invoice", "Sales Invoice"): [ - { - "fieldtype": "Data", - "fieldname": "tally_guid", - "read_only": 1, - "label": "Tally GUID", - }, - { - "fieldtype": "Data", - "fieldname": "tally_voucher_no", - "read_only": 1, - "label": "Tally Voucher Number", - }, - ] - } - ) - - def create_price_list(): - frappe.get_doc( - { - "doctype": "Price List", - "price_list_name": "Tally Price List", - "selling": 1, - "buying": 1, - "enabled": 1, - "currency": "INR", - } - ).insert() - - try: - frappe.db.set_value( - "Account", - encode_company_abbr(self.tally_creditors_account, self.erpnext_company), - "account_type", - "Payable", - ) - frappe.db.set_value( - "Account", - encode_company_abbr(self.tally_debtors_account, self.erpnext_company), - "account_type", - "Receivable", - ) - frappe.db.set_value( - "Company", self.erpnext_company, "round_off_account", self.default_round_off_account - ) - - vouchers_file = frappe.get_doc("File", {"file_url": self.vouchers}) - vouchers = json.loads(vouchers_file.get_content()) - - create_fiscal_years(vouchers) - create_price_list() - create_custom_fields() - - total = len(vouchers) - is_last = False - - for index in range(0, total, VOUCHER_CHUNK_SIZE): - if index + VOUCHER_CHUNK_SIZE >= total: - is_last = True - frappe.enqueue_doc( - self.doctype, - self.name, - "_import_vouchers", - queue="long", - timeout=3600, - start=index + 1, - total=total, - is_last=is_last, - ) - - except Exception: - self.log() - - finally: - self.set_status() - - def _import_vouchers(self, start, total, is_last=False): - frappe.flags.in_migrate = True - vouchers_file = frappe.get_doc("File", {"file_url": self.vouchers}) - vouchers = json.loads(vouchers_file.get_content()) - chunk = vouchers[start : start + VOUCHER_CHUNK_SIZE] - - for index, voucher in enumerate(chunk, start=start): - try: - voucher_doc = frappe.get_doc(voucher) - voucher_doc.insert() - voucher_doc.submit() - self.publish("Importing Vouchers", _("{} of {}").format(index, total), index, total) - frappe.db.commit() - except Exception: - frappe.db.rollback() - self.log(voucher_doc) - - if is_last: - self.status = "" - self.is_day_book_data_imported = 1 - self.save() - frappe.db.set_value("Price List", "Tally Price List", "enabled", 0) - frappe.flags.in_migrate = False - - @frappe.whitelist() - def process_master_data(self): - self.set_status("Processing Master Data") - frappe.enqueue_doc(self.doctype, self.name, "_process_master_data", queue="long", timeout=3600) - - @frappe.whitelist() - def import_master_data(self): - self.set_status("Importing Master Data") - frappe.enqueue_doc(self.doctype, self.name, "_import_master_data", queue="long", timeout=3600) - - @frappe.whitelist() - def process_day_book_data(self): - self.set_status("Processing Day Book Data") - frappe.enqueue_doc(self.doctype, self.name, "_process_day_book_data", queue="long", timeout=3600) - - @frappe.whitelist() - def import_day_book_data(self): - self.set_status("Importing Day Book Data") - frappe.enqueue_doc(self.doctype, self.name, "_import_day_book_data", queue="long", timeout=3600) - - def log(self, data=None): - if isinstance(data, frappe.model.document.Document): - if sys.exc_info()[1].__class__ != frappe.DuplicateEntryError: - failed_import_log = json.loads(self.failed_import_log) - doc = data.as_dict() - failed_import_log.append({"doc": doc, "exc": traceback.format_exc()}) - self.failed_import_log = json.dumps(failed_import_log, separators=(",", ":")) - self.save() - frappe.db.commit() - - else: - data = data or self.status - message = "\n".join( - [ - "Data:", - json.dumps(data, default=str, indent=4), - "--" * 50, - "\nException:", - traceback.format_exc(), - ] - ) - return frappe.log_error(title="Tally Migration Error", message=message) - - def set_status(self, status=""): - self.status = status - self.save() diff --git a/erpnext/erpnext_integrations/doctype/tally_migration/test_tally_migration.py b/erpnext/erpnext_integrations/doctype/tally_migration/test_tally_migration.py deleted file mode 100644 index 7a61abaee63..00000000000 --- a/erpnext/erpnext_integrations/doctype/tally_migration/test_tally_migration.py +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt - -import unittest - - -class TestTallyMigration(unittest.TestCase): - pass From 36dbb867ed23f8e66bcdf839096fcfeaf7d0e896 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Wed, 8 Jan 2025 09:19:53 +0530 Subject: [PATCH 0845/1614] chore: resolve conflict --- .../process_payment_reconciliation_log.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/erpnext/accounts/doctype/process_payment_reconciliation_log/process_payment_reconciliation_log.json b/erpnext/accounts/doctype/process_payment_reconciliation_log/process_payment_reconciliation_log.json index d5e52a72df5..3e3e231fe1d 100644 --- a/erpnext/accounts/doctype/process_payment_reconciliation_log/process_payment_reconciliation_log.json +++ b/erpnext/accounts/doctype/process_payment_reconciliation_log/process_payment_reconciliation_log.json @@ -109,11 +109,7 @@ "in_create": 1, "index_web_pages_for_search": 1, "links": [], -<<<<<<< HEAD - "modified": "2023-11-02 11:32:12.254018", -======= "modified": "2025-01-08 08:22:19.104975", ->>>>>>> 4620025dcd (chore: remove 'Experimental' tag) "modified_by": "Administrator", "module": "Accounts", "name": "Process Payment Reconciliation Log", From 7318748a4ccc51c69fb6f86ef49c9cc8d9df1d83 Mon Sep 17 00:00:00 2001 From: Khushi Rawat <142375893+khushi8112@users.noreply.github.com> Date: Wed, 8 Jan 2025 11:07:30 +0530 Subject: [PATCH 0846/1614] fix: resolved conflicts --- erpnext/assets/doctype/asset/asset.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/erpnext/assets/doctype/asset/asset.json b/erpnext/assets/doctype/asset/asset.json index 6bf3333d4d3..fca0cf7877a 100644 --- a/erpnext/assets/doctype/asset/asset.json +++ b/erpnext/assets/doctype/asset/asset.json @@ -595,11 +595,7 @@ "link_fieldname": "target_asset" } ], -<<<<<<< HEAD - "modified": "2024-08-26 23:28:29.095139", -======= "modified": "2024-12-26 14:23:20.968882", ->>>>>>> 6850019649 (feat: work in progress status for asset (#45066)) "modified_by": "Administrator", "module": "Assets", "name": "Asset", From e9be8583b0f374e5c2b5b655377c4397bb130288 Mon Sep 17 00:00:00 2001 From: Khushi Rawat <142375893+khushi8112@users.noreply.github.com> Date: Wed, 8 Jan 2025 11:08:27 +0530 Subject: [PATCH 0847/1614] fix: resolved conflicts --- erpnext/patches.txt | 3 --- 1 file changed, 3 deletions(-) diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 4f50a3a6c07..d553fd12bb5 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -386,8 +386,5 @@ erpnext.patches.v14_0.update_stock_uom_in_work_order_item erpnext.patches.v15_0.set_is_exchange_gain_loss_in_payment_entry_deductions erpnext.patches.v15_0.enable_allow_existing_serial_no erpnext.patches.v15_0.update_cc_in_process_statement_of_accounts -<<<<<<< HEAD -======= erpnext.patches.v15_0.refactor_closing_stock_balance #5 erpnext.patches.v15_0.update_asset_status_to_work_in_progress ->>>>>>> 6850019649 (feat: work in progress status for asset (#45066)) From 4227d76f082496b79ef2ae4ebf2bab2502f63e5e Mon Sep 17 00:00:00 2001 From: Khushi Rawat <142375893+khushi8112@users.noreply.github.com> Date: Wed, 8 Jan 2025 11:23:38 +0530 Subject: [PATCH 0848/1614] fix: removed unmerged patches --- erpnext/patches.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/erpnext/patches.txt b/erpnext/patches.txt index d553fd12bb5..cfc8be90b4b 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -386,5 +386,4 @@ erpnext.patches.v14_0.update_stock_uom_in_work_order_item erpnext.patches.v15_0.set_is_exchange_gain_loss_in_payment_entry_deductions erpnext.patches.v15_0.enable_allow_existing_serial_no erpnext.patches.v15_0.update_cc_in_process_statement_of_accounts -erpnext.patches.v15_0.refactor_closing_stock_balance #5 erpnext.patches.v15_0.update_asset_status_to_work_in_progress From 6a869139a6470b706adfbaa89f029ae7d2e2bd23 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Wed, 8 Jan 2025 10:29:45 +0000 Subject: [PATCH 0849/1614] chore(release): Bumped to Version 15.48.0 # [15.48.0](https://github.com/frappe/erpnext/compare/v15.47.5...v15.48.0) (2025-01-08) ### Bug Fixes * add monthly distributation and write query in qb ([03b06fc](https://github.com/frappe/erpnext/commit/03b06fc3ff1ab13956f53841c0f7b601a3703a57)) * Alternative Item button dissapearing on Save event ([642b897](https://github.com/frappe/erpnext/commit/642b89782d5d1a2d53c12ed192e2e3dd62e65365)) * Alternative Items button in Work Order ([3194807](https://github.com/frappe/erpnext/commit/3194807a41212c18d2b1578ad91143c54ba5b415)) * Bank Reconciliation Statement Report Company Filter ([622bfa6](https://github.com/frappe/erpnext/commit/622bfa6633cf9b9ac7423811d04e42249b96d30a)) * consider expired batches in stock reco ([c924feb](https://github.com/frappe/erpnext/commit/c924feb0d0ad206423fc959b83ce4aa948ece592)) * discount resetting on date change ([af53381](https://github.com/frappe/erpnext/commit/af5338116338ac9eb88e9c440528cff248aa03d4)), closes [#44989](https://github.com/frappe/erpnext/issues/44989) * Hold_to_On_Hold ([9ecafdc](https://github.com/frappe/erpnext/commit/9ecafdc6807846be6d739cfedbe9401765d1b5a4)) * ignore currency validation while canceling the voucher ([8874f4a](https://github.com/frappe/erpnext/commit/8874f4a9e44ea249a11c9c2b7ca55c06a7602ef1)) * ignore party account validation while canceling the voucher ([0f1c6ff](https://github.com/frappe/erpnext/commit/0f1c6ff1c9ca7e6a573b94ccc21789b3616951bb)) * invoice against purchase receipt with returned quantity ([9daabfc](https://github.com/frappe/erpnext/commit/9daabfca8a3dc4d940d02bf218cfd02605dbde0f)) * issue in returning components against the SCO ([87405f0](https://github.com/frappe/erpnext/commit/87405f0753d78655d621f3324003ac2b3ee743ca)) * load price list rate for pos search term ([452dffa](https://github.com/frappe/erpnext/commit/452dffab48cedcf44949caaf2036084196b6522e)) * load search term price with customer default price list ([59af144](https://github.com/frappe/erpnext/commit/59af144e298dbdb0ae5dbd4281bc0b2a1e9f615b)) * Missing company filter breaks `get_account_balance` in Bank Reco ([931b516](https://github.com/frappe/erpnext/commit/931b5166a86d235e709734f79065d6cab57c8547)) * Override pre-commit behaviour due to conflicts with CI ([754845a](https://github.com/frappe/erpnext/commit/754845a935d735a5e074b7de42f1df40cf8cf2e7)) * **Project:** make status in confirmation dialog translatable ([#45118](https://github.com/frappe/erpnext/issues/45118)) ([0001d86](https://github.com/frappe/erpnext/commit/0001d868c7f3bf79b296111291608e20340bb261)) * removed unmerged patches ([4227d76](https://github.com/frappe/erpnext/commit/4227d76f082496b79ef2ae4ebf2bab2502f63e5e)) * resolved conflicts ([e9be858](https://github.com/frappe/erpnext/commit/e9be8583b0f374e5c2b5b655377c4397bb130288)) * resolved conflicts ([7318748](https://github.com/frappe/erpnext/commit/7318748a4ccc51c69fb6f86ef49c9cc8d9df1d83)) * Returned Qty in Work Order Consumed Materials report ([f7b501b](https://github.com/frappe/erpnext/commit/f7b501b29bcaa39e486638cf442c385d7e7e39f1)) * serial and batch no. buttons on pos ([#45048](https://github.com/frappe/erpnext/issues/45048)) ([54e3a74](https://github.com/frappe/erpnext/commit/54e3a749365c6979fb83b2cb962fd4db8f04cd60)) * show new button in coa if create access ([89155f5](https://github.com/frappe/erpnext/commit/89155f529e757296ad4ff97dee6fe54b3a090cb4)) * update customer contact details on pos (backport [#45071](https://github.com/frappe/erpnext/issues/45071)) ([#45106](https://github.com/frappe/erpnext/issues/45106)) ([01254da](https://github.com/frappe/erpnext/commit/01254da4e06b6e0114ecfc56e89aacdf5bab027b)) ### Features * validate discount date in payment schedule (backport [#44646](https://github.com/frappe/erpnext/issues/44646)) ([#44727](https://github.com/frappe/erpnext/issues/44727)) ([500deff](https://github.com/frappe/erpnext/commit/500deff3e9e695d6cc80320d8bce4fad0739a91d)) * work in progress status for asset ([#45066](https://github.com/frappe/erpnext/issues/45066)) ([1ea36bb](https://github.com/frappe/erpnext/commit/1ea36bba886ecae907aa0a09e5a6e86e77899cb9)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index d4763ea5a56..7354e28f238 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.47.5" +__version__ = "15.48.0" def get_default_company(user=None): From 122b966a7b78f78e1cd1a645824f33c0d5d797ff Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Thu, 9 Jan 2025 13:10:00 +0530 Subject: [PATCH 0850/1614] fix: timeout error for work order (cherry picked from commit b4ceda6f2c88b0bd08e5cdf3f5a3f125442ac76d) --- .../manufacturing/doctype/job_card/job_card.py | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/erpnext/manufacturing/doctype/job_card/job_card.py b/erpnext/manufacturing/doctype/job_card/job_card.py index 011df3258ee..bc1076d1340 100644 --- a/erpnext/manufacturing/doctype/job_card/job_card.py +++ b/erpnext/manufacturing/doctype/job_card/job_card.py @@ -309,6 +309,9 @@ class JobCard(Document): return overlap def get_time_logs(self, args, doctype, open_job_cards=None): + if get_datetime(args.from_time) >= get_datetime(args.to_time): + args.to_time = add_to_date(args.from_time, minutes=args.remaining_time_in_mins) + jc = frappe.qb.DocType("Job Card") jctl = frappe.qb.DocType(doctype) @@ -354,8 +357,10 @@ class JobCard(Document): else: query = query.where(jc.name.isin(open_job_cards)) - if doctype != "Job Card Time Log": - query = query.where(jc.total_time_in_mins == 0) + if doctype == "Job Card Time Log": + query = query.where(jc.docstatus < 2) + else: + query = query.where((jc.docstatus == 0) & (jc.total_time_in_mins == 0)) time_logs = query.run(as_dict=True) @@ -412,7 +417,13 @@ class JobCard(Document): def schedule_time_logs(self, row): row.remaining_time_in_mins = row.time_in_mins while row.remaining_time_in_mins > 0: - args = frappe._dict({"from_time": row.planned_start_time, "to_time": row.planned_end_time}) + args = frappe._dict( + { + "from_time": row.planned_start_time, + "to_time": row.planned_end_time, + "remaining_time_in_mins": row.remaining_time_in_mins, + } + ) self.validate_overlap_for_workstation(args, row) self.check_workstation_time(row) From a79cae1fefb31e85b59bc2993ef5497d1e2bab31 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Thu, 9 Jan 2025 14:31:01 +0530 Subject: [PATCH 0851/1614] fix: not able to see create Quality Inspection button (cherry picked from commit b291835ccda4b7696ba5aee05628f2c647be667f) --- erpnext/public/js/controllers/transaction.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 9e3a76b12ca..79ed7d0a836 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -302,8 +302,13 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe return; } + let show_qc_button = true; + if (["Sales Invoice", "Purchase Invoice"].includes(this.frm.doc.doctype)) { + show_qc_button = this.frm.doc.update_stock; + } + const me = this; - if (!this.frm.is_new() && this.frm.doc.docstatus === 0 && frappe.model.can_create("Quality Inspection") && this.frm.doc.update_stock) { + if (!this.frm.is_new() && this.frm.doc.docstatus === 0 && frappe.model.can_create("Quality Inspection") && show_qc_button) { this.frm.add_custom_button(__("Quality Inspection(s)"), () => { me.make_quality_inspection(); }, __("Create")); From f414fa4981da572d1ef07d44b2aba006c2d03c81 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Thu, 9 Jan 2025 13:52:34 +0530 Subject: [PATCH 0852/1614] fix: do not add ordered items from Quotation to new Sales Order (cherry picked from commit 2e930eb97b893a72c2b549ecbf0fcd525caec155) --- .../selling/doctype/quotation/quotation.py | 6 +++- .../doctype/quotation/test_quotation.py | 32 +++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/erpnext/selling/doctype/quotation/quotation.py b/erpnext/selling/doctype/quotation/quotation.py index 55a14c912c2..48614671da2 100644 --- a/erpnext/selling/doctype/quotation/quotation.py +++ b/erpnext/selling/doctype/quotation/quotation.py @@ -411,7 +411,11 @@ def _make_sales_order(source_name, target_doc=None, ignore_permissions=False): 2. If selections: Is Alternative Item/Has Alternative Item: Map if selected and adequate qty 3. If selections: Simple row: Map if adequate qty """ - has_qty = item.qty > 0 + balance_qty = item.qty - ordered_items.get(item.item_code, 0.0) + if balance_qty <= 0: + return False + + has_qty = balance_qty if not selected_rows: return not item.is_alternative diff --git a/erpnext/selling/doctype/quotation/test_quotation.py b/erpnext/selling/doctype/quotation/test_quotation.py index 05f43f26559..b41637143e5 100644 --- a/erpnext/selling/doctype/quotation/test_quotation.py +++ b/erpnext/selling/doctype/quotation/test_quotation.py @@ -30,6 +30,38 @@ class TestQuotation(FrappeTestCase): self.assertTrue(sales_order.get("payment_schedule")) + def test_do_not_add_ordered_items_in_new_sales_order(self): + from erpnext.selling.doctype.quotation.quotation import make_sales_order + from erpnext.stock.doctype.item.test_item import make_item + + item = make_item("_Test Item for Quotation for SO", {"is_stock_item": 1}) + + quotation = make_quotation(qty=5, do_not_submit=True) + quotation.append( + "items", + { + "item_code": item.name, + "qty": 5, + "rate": 100, + "conversion_factor": 1, + "uom": item.stock_uom, + "warehouse": "_Test Warehouse - _TC", + "stock_uom": item.stock_uom, + }, + ) + quotation.submit() + + sales_order = make_sales_order(quotation.name) + sales_order.delivery_date = nowdate() + self.assertEqual(len(sales_order.items), 2) + sales_order.remove(sales_order.items[1]) + sales_order.submit() + + sales_order = make_sales_order(quotation.name) + self.assertEqual(len(sales_order.items), 1) + self.assertEqual(sales_order.items[0].item_code, item.name) + self.assertEqual(sales_order.items[0].qty, 5.0) + def test_gross_profit(self): from erpnext.stock.doctype.item.test_item import make_item from erpnext.stock.doctype.stock_entry.stock_entry_utils import make_stock_entry From 5d7a3b59799f1871ac978438c7cac3003fcbd6a1 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Thu, 9 Jan 2025 14:31:01 +0530 Subject: [PATCH 0853/1614] fix: not able to see create Quality Inspection button (cherry picked from commit b291835ccda4b7696ba5aee05628f2c647be667f) (cherry picked from commit a79cae1fefb31e85b59bc2993ef5497d1e2bab31) --- erpnext/public/js/controllers/transaction.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 9e3a76b12ca..79ed7d0a836 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -302,8 +302,13 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe return; } + let show_qc_button = true; + if (["Sales Invoice", "Purchase Invoice"].includes(this.frm.doc.doctype)) { + show_qc_button = this.frm.doc.update_stock; + } + const me = this; - if (!this.frm.is_new() && this.frm.doc.docstatus === 0 && frappe.model.can_create("Quality Inspection") && this.frm.doc.update_stock) { + if (!this.frm.is_new() && this.frm.doc.docstatus === 0 && frappe.model.can_create("Quality Inspection") && show_qc_button) { this.frm.add_custom_button(__("Quality Inspection(s)"), () => { me.make_quality_inspection(); }, __("Create")); From 246f4373b55d4ae47b891238acf63a42a36c6735 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Thu, 9 Jan 2025 09:31:15 +0000 Subject: [PATCH 0854/1614] chore(release): Bumped to Version 15.48.1 ## [15.48.1](https://github.com/frappe/erpnext/compare/v15.48.0...v15.48.1) (2025-01-09) ### Bug Fixes * not able to see create Quality Inspection button ([5d7a3b5](https://github.com/frappe/erpnext/commit/5d7a3b59799f1871ac978438c7cac3003fcbd6a1)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 7354e28f238..67248b1c1d6 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.48.0" +__version__ = "15.48.1" def get_default_company(user=None): From d84601b2a3a96be811c6360e869b0864857c5fb7 Mon Sep 17 00:00:00 2001 From: FATHIH MOHAMMED <99068504+FathihMohammed@users.noreply.github.com> Date: Thu, 9 Jan 2025 13:27:27 +0000 Subject: [PATCH 0855/1614] fix: precision loss causing process loss variance --- erpnext/stock/doctype/stock_entry/stock_entry.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index 4b4ee6ad0f1..5dee819ad11 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -483,7 +483,7 @@ class StockEntry(StockController): if self.process_loss_qty: total += flt(self.process_loss_qty, precision) - if self.fg_completed_qty != total: + if self.fg_completed_qty != flt(total, precision): frappe.throw( _( "The finished product {0} quantity {1} and For Quantity {2} cannot be different" @@ -610,7 +610,9 @@ class StockEntry(StockController): completed_qty = ( d.completed_qty + d.process_loss_qty + (allowance_percentage / 100 * d.completed_qty) ) - if total_completed_qty > flt(completed_qty): + if flt(total_completed_qty, self.precision("fg_completed_qty")) > flt( + completed_qty, self.precision("fg_completed_qty") + ): job_card = frappe.db.get_value("Job Card", {"operation_id": d.name}, "name") if not job_card: frappe.throw( From ac18c56a0bd13823d6aadae3b9461045647fb510 Mon Sep 17 00:00:00 2001 From: FATHIH MOHAMMED <99068504+FathihMohammed@users.noreply.github.com> Date: Thu, 9 Jan 2025 13:27:27 +0000 Subject: [PATCH 0856/1614] fix: precision loss causing process loss variance (cherry picked from commit d84601b2a3a96be811c6360e869b0864857c5fb7) --- erpnext/stock/doctype/stock_entry/stock_entry.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index 4b4ee6ad0f1..5dee819ad11 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -483,7 +483,7 @@ class StockEntry(StockController): if self.process_loss_qty: total += flt(self.process_loss_qty, precision) - if self.fg_completed_qty != total: + if self.fg_completed_qty != flt(total, precision): frappe.throw( _( "The finished product {0} quantity {1} and For Quantity {2} cannot be different" @@ -610,7 +610,9 @@ class StockEntry(StockController): completed_qty = ( d.completed_qty + d.process_loss_qty + (allowance_percentage / 100 * d.completed_qty) ) - if total_completed_qty > flt(completed_qty): + if flt(total_completed_qty, self.precision("fg_completed_qty")) > flt( + completed_qty, self.precision("fg_completed_qty") + ): job_card = frappe.db.get_value("Job Card", {"operation_id": d.name}, "name") if not job_card: frappe.throw( From d6614f284869eb87f30dfa5afd50ccdcbed64bd5 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Thu, 9 Jan 2025 13:10:00 +0530 Subject: [PATCH 0857/1614] fix: timeout error for work order (cherry picked from commit b4ceda6f2c88b0bd08e5cdf3f5a3f125442ac76d) (cherry picked from commit 122b966a7b78f78e1cd1a645824f33c0d5d797ff) --- .../manufacturing/doctype/job_card/job_card.py | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/erpnext/manufacturing/doctype/job_card/job_card.py b/erpnext/manufacturing/doctype/job_card/job_card.py index 011df3258ee..bc1076d1340 100644 --- a/erpnext/manufacturing/doctype/job_card/job_card.py +++ b/erpnext/manufacturing/doctype/job_card/job_card.py @@ -309,6 +309,9 @@ class JobCard(Document): return overlap def get_time_logs(self, args, doctype, open_job_cards=None): + if get_datetime(args.from_time) >= get_datetime(args.to_time): + args.to_time = add_to_date(args.from_time, minutes=args.remaining_time_in_mins) + jc = frappe.qb.DocType("Job Card") jctl = frappe.qb.DocType(doctype) @@ -354,8 +357,10 @@ class JobCard(Document): else: query = query.where(jc.name.isin(open_job_cards)) - if doctype != "Job Card Time Log": - query = query.where(jc.total_time_in_mins == 0) + if doctype == "Job Card Time Log": + query = query.where(jc.docstatus < 2) + else: + query = query.where((jc.docstatus == 0) & (jc.total_time_in_mins == 0)) time_logs = query.run(as_dict=True) @@ -412,7 +417,13 @@ class JobCard(Document): def schedule_time_logs(self, row): row.remaining_time_in_mins = row.time_in_mins while row.remaining_time_in_mins > 0: - args = frappe._dict({"from_time": row.planned_start_time, "to_time": row.planned_end_time}) + args = frappe._dict( + { + "from_time": row.planned_start_time, + "to_time": row.planned_end_time, + "remaining_time_in_mins": row.remaining_time_in_mins, + } + ) self.validate_overlap_for_workstation(args, row) self.check_workstation_time(row) From 625ff4b2760c25ee207cfff68cae3e7a65776c41 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Fri, 10 Jan 2025 06:31:50 +0000 Subject: [PATCH 0858/1614] chore(release): Bumped to Version 15.48.2 ## [15.48.2](https://github.com/frappe/erpnext/compare/v15.48.1...v15.48.2) (2025-01-10) ### Bug Fixes * precision loss causing process loss variance ([ac18c56](https://github.com/frappe/erpnext/commit/ac18c56a0bd13823d6aadae3b9461045647fb510)) * timeout error for work order ([d6614f2](https://github.com/frappe/erpnext/commit/d6614f284869eb87f30dfa5afd50ccdcbed64bd5)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 67248b1c1d6..da80a88a542 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.48.1" +__version__ = "15.48.2" def get_default_company(user=None): From 0df18080c7277bb773134f7fbcfab0fb0c6a1ba4 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Fri, 10 Jan 2025 18:19:48 +0530 Subject: [PATCH 0859/1614] fix: delivery_document_no column issue (cherry picked from commit 61efb2bb39a720b2d0fc98ff714b4477fcaa6dc5) # Conflicts: # erpnext/accounts/doctype/sales_invoice/sales_invoice.py # erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.py --- .../doctype/sales_invoice/sales_invoice.py | 7 ++-- .../sales_invoice_item/sales_invoice_item.py | 38 +++++++++++++++++++ .../doctype/delivery_note/delivery_note.py | 6 --- erpnext/stock/doctype/serial_no/serial_no.py | 15 -------- 4 files changed, 42 insertions(+), 24 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index cb501c1ffbc..ee18410a57b 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -321,9 +321,7 @@ class SalesInvoice(SellingController): self.set_against_income_account() self.validate_time_sheets_are_submitted() self.validate_multiple_billing("Delivery Note", "dn_detail", "amount") - if not self.is_return: - self.validate_serial_numbers() - else: + if self.is_return: self.timesheets = [] self.update_packing_list() self.set_billing_hours_and_amount() @@ -1706,6 +1704,7 @@ class SalesInvoice(SellingController): self.set("write_off_amount", reference_doc.get("write_off_amount")) self.due_date = None +<<<<<<< HEAD def validate_serial_numbers(self): """ validate serial number agains Delivery Note and Sales Invoice @@ -1753,6 +1752,8 @@ class SalesInvoice(SellingController): ) ) +======= +>>>>>>> 61efb2bb39 (fix: delivery_document_no column issue) def update_project(self): unique_projects = list(set([d.project for d in self.get("items") if d.project])) if self.project and self.project not in unique_projects: diff --git a/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.py b/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.py index b7b0873c76b..b96445e2c3a 100644 --- a/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.py +++ b/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.py @@ -3,6 +3,13 @@ from frappe.model.document import Document +<<<<<<< HEAD +======= +from frappe.utils.data import cint + +from erpnext.assets.doctype.asset.depreciation import get_disposal_account_and_cost_center +from erpnext.stock.doctype.serial_no.serial_no import get_serial_nos +>>>>>>> 61efb2bb39 (fix: delivery_document_no column issue) class SalesInvoiceItem(Document): @@ -93,4 +100,35 @@ class SalesInvoiceItem(Document): weight_uom: DF.Link | None # end: auto-generated types +<<<<<<< HEAD pass +======= + def validate_cost_center(self, company: str): + cost_center_company = frappe.get_cached_value("Cost Center", self.cost_center, "company") + if cost_center_company != company: + frappe.throw( + _("Row #{0}: Cost Center {1} does not belong to company {2}").format( + frappe.bold(self.idx), frappe.bold(self.cost_center), frappe.bold(company) + ) + ) + + def set_actual_qty(self): + if self.item_code and self.warehouse: + self.actual_qty = ( + frappe.db.get_value( + "Bin", {"item_code": self.item_code, "warehouse": self.warehouse}, "actual_qty" + ) + or 0 + ) + + def set_income_account_for_fixed_asset(self, company: str): + """Set income account for fixed asset item based on company's disposal account and cost center.""" + if not self.is_fixed_asset: + return + + disposal_account, depreciation_cost_center = get_disposal_account_and_cost_center(company) + + self.income_account = disposal_account + if not self.cost_center: + self.cost_center = depreciation_cost_center +>>>>>>> 61efb2bb39 (fix: delivery_document_no column issue) diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.py b/erpnext/stock/doctype/delivery_note/delivery_note.py index 2b4dad137c2..76e5b4ea972 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note.py +++ b/erpnext/stock/doctype/delivery_note/delivery_note.py @@ -12,7 +12,6 @@ from frappe.utils import cint, flt from erpnext.controllers.accounts_controller import get_taxes_and_charges, merge_taxes from erpnext.controllers.selling_controller import SellingController -from erpnext.stock.doctype.serial_no.serial_no import get_delivery_note_serial_no form_grid_templates = {"items": "templates/form_grid/item_grid.html"} @@ -980,11 +979,6 @@ def make_sales_invoice(source_name, target_doc=None, args=None): def update_item(source_doc, target_doc, source_parent): target_doc.qty = to_make_invoice_qty_map[source_doc.name] - if source_doc.serial_no and source_parent.per_billed > 0 and not source_parent.is_return: - target_doc.serial_no = get_delivery_note_serial_no( - source_doc.item_code, target_doc.qty, source_parent.name - ) - def get_pending_qty(item_row): pending_qty = item_row.qty - invoiced_qty_map.get(item_row.name, 0) diff --git a/erpnext/stock/doctype/serial_no/serial_no.py b/erpnext/stock/doctype/serial_no/serial_no.py index 4c693d8efec..54f96fb7b10 100644 --- a/erpnext/stock/doctype/serial_no/serial_no.py +++ b/erpnext/stock/doctype/serial_no/serial_no.py @@ -169,21 +169,6 @@ def update_maintenance_status(): frappe.db.set_value("Serial No", doc.name, "maintenance_status", doc.maintenance_status) -def get_delivery_note_serial_no(item_code, qty, delivery_note): - serial_nos = "" - dn_serial_nos = frappe.db.sql_list( - f""" select name from `tabSerial No` - where item_code = %(item_code)s and delivery_document_no = %(delivery_note)s - and sales_invoice is null limit {cint(qty)}""", - {"item_code": item_code, "delivery_note": delivery_note}, - ) - - if dn_serial_nos and len(dn_serial_nos) > 0: - serial_nos = "\n".join(dn_serial_nos) - - return serial_nos - - @frappe.whitelist() def auto_fetch_serial_number( qty: int, From f7e3854641246a16d33f1699c450fc975ddc8ba4 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Fri, 10 Jan 2025 14:20:48 +0530 Subject: [PATCH 0860/1614] fix: incorrect valuation rate for PI based revaluation (cherry picked from commit 14ce2337dff30616aa648c47fe827b16063a3e26) --- erpnext/stock/stock_ledger.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/erpnext/stock/stock_ledger.py b/erpnext/stock/stock_ledger.py index 1b299b52dd6..37e91080d5d 100644 --- a/erpnext/stock/stock_ledger.py +++ b/erpnext/stock/stock_ledger.py @@ -1039,7 +1039,7 @@ class update_entries_after: def get_dynamic_incoming_outgoing_rate(self, sle): # Get updated incoming/outgoing rate from transaction - if sle.recalculate_rate: + if sle.recalculate_rate or self.has_landed_cost_based_on_pi(sle): rate = self.get_incoming_outgoing_rate_from_transaction(sle) if flt(sle.actual_qty) >= 0: @@ -1047,6 +1047,14 @@ class update_entries_after: else: sle.outgoing_rate = rate + def has_landed_cost_based_on_pi(self, sle): + if sle.voucher_type == "Purchase Receipt" and frappe.db.get_single_value( + "Buying Settings", "set_landed_cost_based_on_purchase_invoice_rate" + ): + return True + + return False + def get_incoming_outgoing_rate_from_transaction(self, sle): rate = 0 # Material Transfer, Repack, Manufacturing From 9426a3218465a9fac751b48a7d83b170f6d259f3 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Sat, 11 Jan 2025 10:59:26 +0530 Subject: [PATCH 0861/1614] chore: fix conflicts --- .../sales_invoice_item/sales_invoice_item.py | 38 ------------------- 1 file changed, 38 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.py b/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.py index b96445e2c3a..b7b0873c76b 100644 --- a/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.py +++ b/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.py @@ -3,13 +3,6 @@ from frappe.model.document import Document -<<<<<<< HEAD -======= -from frappe.utils.data import cint - -from erpnext.assets.doctype.asset.depreciation import get_disposal_account_and_cost_center -from erpnext.stock.doctype.serial_no.serial_no import get_serial_nos ->>>>>>> 61efb2bb39 (fix: delivery_document_no column issue) class SalesInvoiceItem(Document): @@ -100,35 +93,4 @@ class SalesInvoiceItem(Document): weight_uom: DF.Link | None # end: auto-generated types -<<<<<<< HEAD pass -======= - def validate_cost_center(self, company: str): - cost_center_company = frappe.get_cached_value("Cost Center", self.cost_center, "company") - if cost_center_company != company: - frappe.throw( - _("Row #{0}: Cost Center {1} does not belong to company {2}").format( - frappe.bold(self.idx), frappe.bold(self.cost_center), frappe.bold(company) - ) - ) - - def set_actual_qty(self): - if self.item_code and self.warehouse: - self.actual_qty = ( - frappe.db.get_value( - "Bin", {"item_code": self.item_code, "warehouse": self.warehouse}, "actual_qty" - ) - or 0 - ) - - def set_income_account_for_fixed_asset(self, company: str): - """Set income account for fixed asset item based on company's disposal account and cost center.""" - if not self.is_fixed_asset: - return - - disposal_account, depreciation_cost_center = get_disposal_account_and_cost_center(company) - - self.income_account = disposal_account - if not self.cost_center: - self.cost_center = depreciation_cost_center ->>>>>>> 61efb2bb39 (fix: delivery_document_no column issue) From bb170c024fcce26ef64e0afc2c30344f2b63e98a Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Sat, 11 Jan 2025 11:00:20 +0530 Subject: [PATCH 0862/1614] chore: fix conflicts --- .../doctype/sales_invoice/sales_invoice.py | 50 ------------------- 1 file changed, 50 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index ee18410a57b..174a80d4d75 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -1704,56 +1704,6 @@ class SalesInvoice(SellingController): self.set("write_off_amount", reference_doc.get("write_off_amount")) self.due_date = None -<<<<<<< HEAD - def validate_serial_numbers(self): - """ - validate serial number agains Delivery Note and Sales Invoice - """ - self.set_serial_no_against_delivery_note() - self.validate_serial_against_delivery_note() - - def set_serial_no_against_delivery_note(self): - for item in self.items: - if item.serial_no and item.delivery_note and item.qty != len(get_serial_nos(item.serial_no)): - item.serial_no = get_delivery_note_serial_no(item.item_code, item.qty, item.delivery_note) - - def validate_serial_against_delivery_note(self): - """ - validate if the serial numbers in Sales Invoice Items are same as in - Delivery Note Item - """ - - for item in self.items: - if not item.delivery_note or not item.dn_detail: - continue - - serial_nos = frappe.db.get_value("Delivery Note Item", item.dn_detail, "serial_no") or "" - dn_serial_nos = set(get_serial_nos(serial_nos)) - - serial_nos = item.serial_no or "" - si_serial_nos = set(get_serial_nos(serial_nos)) - serial_no_diff = si_serial_nos - dn_serial_nos - - if serial_no_diff: - dn_link = frappe.utils.get_link_to_form("Delivery Note", item.delivery_note) - serial_no_msg = ", ".join(frappe.bold(d) for d in serial_no_diff) - - msg = _("Row #{0}: The following Serial Nos are not present in Delivery Note {1}:").format( - item.idx, dn_link - ) - msg += " " + serial_no_msg - - frappe.throw(msg=msg, title=_("Serial Nos Mismatch")) - - if item.serial_no and cint(item.qty) != len(si_serial_nos): - frappe.throw( - _("Row #{0}: {1} Serial numbers required for Item {2}. You have provided {3}.").format( - item.idx, item.qty, item.item_code, len(si_serial_nos) - ) - ) - -======= ->>>>>>> 61efb2bb39 (fix: delivery_document_no column issue) def update_project(self): unique_projects = list(set([d.project for d in self.get("items") if d.project])) if self.project and self.project not in unique_projects: From 7d66e4efb0bdb7c109347ea7504b09f08858bfcb Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Sat, 11 Jan 2025 11:06:13 +0530 Subject: [PATCH 0863/1614] fix: test case --- erpnext/accounts/doctype/sales_invoice/sales_invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 174a80d4d75..c9a36e4aece 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -39,7 +39,7 @@ from erpnext.controllers.selling_controller import SellingController from erpnext.projects.doctype.timesheet.timesheet import get_projectwise_timesheet_data from erpnext.setup.doctype.company.company import update_company_current_month_sales from erpnext.stock.doctype.delivery_note.delivery_note import update_billed_amount_based_on_so -from erpnext.stock.doctype.serial_no.serial_no import get_delivery_note_serial_no, get_serial_nos +from erpnext.stock.doctype.serial_no.serial_no import get_serial_nos form_grid_templates = {"items": "templates/form_grid/item_grid.html"} From 0665bc4a28c5dc1444fb2e85491ee62c782fd866 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 11:58:53 +0530 Subject: [PATCH 0864/1614] chore: removal of decapitalization feature (backport #45162) (#45173) * chore: removal of decapitalization feature (#45162) * chore: removal of decapitalization feature * fix: rearrangement of asset capitalization doctype fields (cherry picked from commit 7ea73d826501d062a65544f81a8b38773ab2cdff) # Conflicts: # erpnext/assets/doctype/asset_capitalization/asset_capitalization.json * fix: resolved conflicts --------- Co-authored-by: Khushi Rawat <142375893+khushi8112@users.noreply.github.com> --- .../doctype/sales_invoice/sales_invoice.py | 2 +- erpnext/assets/doctype/asset/asset.json | 2 +- erpnext/assets/doctype/asset/asset.py | 1 - erpnext/assets/doctype/asset/asset_list.js | 4 +- erpnext/assets/doctype/asset/depreciation.py | 2 +- .../asset_capitalization.js | 8 +- .../asset_capitalization.json | 85 ++++--------- .../asset_capitalization.py | 104 +++------------- .../test_asset_capitalization.py | 114 ------------------ .../fixed_asset_register.py | 8 +- 10 files changed, 49 insertions(+), 281 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index cb501c1ffbc..279cee19501 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -367,7 +367,7 @@ class SalesInvoice(SellingController): if self.update_stock: frappe.throw(_("'Update Stock' cannot be checked for fixed asset sale")) - elif asset.status in ("Scrapped", "Cancelled", "Capitalized", "Decapitalized") or ( + elif asset.status in ("Scrapped", "Cancelled", "Capitalized") or ( asset.status == "Sold" and not self.is_return ): frappe.throw( diff --git a/erpnext/assets/doctype/asset/asset.json b/erpnext/assets/doctype/asset/asset.json index fca0cf7877a..e28eab9ed13 100644 --- a/erpnext/assets/doctype/asset/asset.json +++ b/erpnext/assets/doctype/asset/asset.json @@ -378,7 +378,7 @@ "in_standard_filter": 1, "label": "Status", "no_copy": 1, - "options": "Draft\nSubmitted\nPartially Depreciated\nFully Depreciated\nSold\nScrapped\nIn Maintenance\nOut of Order\nIssue\nReceipt\nCapitalized\nDecapitalized\nWork In Progress", + "options": "Draft\nSubmitted\nPartially Depreciated\nFully Depreciated\nSold\nScrapped\nIn Maintenance\nOut of Order\nIssue\nReceipt\nCapitalized\nWork In Progress", "read_only": 1 }, { diff --git a/erpnext/assets/doctype/asset/asset.py b/erpnext/assets/doctype/asset/asset.py index 8aa8c0ba6ac..994f36ae1f2 100644 --- a/erpnext/assets/doctype/asset/asset.py +++ b/erpnext/assets/doctype/asset/asset.py @@ -111,7 +111,6 @@ class Asset(AccountsController): "Issue", "Receipt", "Capitalized", - "Decapitalized", "Work In Progress", ] supplier: DF.Link | None diff --git a/erpnext/assets/doctype/asset/asset_list.js b/erpnext/assets/doctype/asset/asset_list.js index 0086333a96b..8b0d289dab0 100644 --- a/erpnext/assets/doctype/asset/asset_list.js +++ b/erpnext/assets/doctype/asset/asset_list.js @@ -10,8 +10,8 @@ frappe.listview_settings["Asset"] = { return [__("Sold"), "green", "status,=,Sold"]; } else if (doc.status === "Work In Progress") { return [__("Work In Progress"), "orange", "status,=,Work In Progress"]; - } else if (["Capitalized", "Decapitalized"].includes(doc.status)) { - return [__(doc.status), "grey", "status,=," + doc.status]; + } else if (doc.status === "Capitalized") { + return [__("Capitalized"), "grey", "status,=,Capitalized"]; } else if (doc.status === "Scrapped") { return [__("Scrapped"), "grey", "status,=,Scrapped"]; } else if (doc.status === "In Maintenance") { diff --git a/erpnext/assets/doctype/asset/depreciation.py b/erpnext/assets/doctype/asset/depreciation.py index cc8defc5fe6..6ad0631135a 100644 --- a/erpnext/assets/doctype/asset/depreciation.py +++ b/erpnext/assets/doctype/asset/depreciation.py @@ -436,7 +436,7 @@ def scrap_asset(asset_name): if asset.docstatus != 1: frappe.throw(_("Asset {0} must be submitted").format(asset.name)) - elif asset.status in ("Cancelled", "Sold", "Scrapped", "Capitalized", "Decapitalized"): + elif asset.status in ("Cancelled", "Sold", "Scrapped", "Capitalized"): frappe.throw(_("Asset {0} cannot be scrapped, as it is already {1}").format(asset.name, asset.status)) date = today() diff --git a/erpnext/assets/doctype/asset_capitalization/asset_capitalization.js b/erpnext/assets/doctype/asset_capitalization/asset_capitalization.js index d9f2231b313..28a8b81f3ad 100644 --- a/erpnext/assets/doctype/asset_capitalization/asset_capitalization.js +++ b/erpnext/assets/doctype/asset_capitalization/asset_capitalization.js @@ -36,11 +36,7 @@ erpnext.assets.AssetCapitalization = class AssetCapitalization extends erpnext.s me.setup_warehouse_query(); me.frm.set_query("target_item_code", function () { - if (me.frm.doc.entry_type == "Capitalization") { - return erpnext.queries.item({ is_stock_item: 0, is_fixed_asset: 1 }); - } else { - return erpnext.queries.item({ is_stock_item: 1, is_fixed_asset: 0 }); - } + return erpnext.queries.item({ is_stock_item: 0, is_fixed_asset: 1 }); }); me.frm.set_query("target_asset", function () { @@ -51,7 +47,7 @@ erpnext.assets.AssetCapitalization = class AssetCapitalization extends erpnext.s me.frm.set_query("asset", "asset_items", function () { var filters = { - status: ["not in", ["Draft", "Scrapped", "Sold", "Capitalized", "Decapitalized"]], + status: ["not in", ["Draft", "Scrapped", "Sold", "Capitalized"]], docstatus: 1, }; diff --git a/erpnext/assets/doctype/asset_capitalization/asset_capitalization.json b/erpnext/assets/doctype/asset_capitalization/asset_capitalization.json index 9ddc44212f6..a6796e55f82 100644 --- a/erpnext/assets/doctype/asset_capitalization/asset_capitalization.json +++ b/erpnext/assets/doctype/asset_capitalization/asset_capitalization.json @@ -8,30 +8,26 @@ "engine": "InnoDB", "field_order": [ "title", - "company", "naming_series", - "entry_type", - "target_item_name", - "target_is_fixed_asset", - "target_has_batch_no", - "target_has_serial_no", - "column_break_9", "capitalization_method", "target_item_code", - "target_asset_location", + "target_item_name", "target_asset", "target_asset_name", - "target_warehouse", "target_qty", - "target_stock_uom", - "target_batch_no", - "target_serial_no", - "column_break_5", - "finance_book", + "target_asset_location", + "column_break_9", + "company", "posting_date", "posting_time", "set_posting_time", + "finance_book", + "target_batch_no", + "target_serial_no", "amended_from", + "target_is_fixed_asset", + "target_has_batch_no", + "target_has_serial_no", "section_break_16", "stock_items", "stock_items_total", @@ -58,12 +54,12 @@ "label": "Title" }, { - "depends_on": "eval:(doc.target_item_code && !doc.__islocal && doc.capitalization_method !== 'Choose a WIP composite asset') || ((doc.entry_type=='Capitalization' && doc.capitalization_method=='Create a new composite asset') || doc.entry_type=='Decapitalization')", + "depends_on": "eval:(doc.target_item_code && !doc.__islocal && doc.capitalization_method !== 'Choose a WIP composite asset') || doc.capitalization_method=='Create a new composite asset'", "fieldname": "target_item_code", "fieldtype": "Link", "in_standard_filter": 1, "label": "Target Item Code", - "mandatory_depends_on": "eval:(doc.entry_type=='Capitalization' && doc.capitalization_method=='Create a new composite asset') || doc.entry_type=='Decapitalization'", + "mandatory_depends_on": "eval:doc.capitalization_method=='Create a new composite asset'", "options": "Item" }, { @@ -84,22 +80,18 @@ "read_only": 1 }, { - "fieldname": "column_break_5", - "fieldtype": "Column Break" - }, - { - "depends_on": "eval:(doc.target_asset && !doc.__islocal) || (doc.entry_type=='Capitalization' && doc.capitalization_method=='Choose a WIP composite asset')", + "depends_on": "eval:(doc.target_asset && !doc.__islocal) || doc.capitalization_method=='Choose a WIP composite asset'", "fieldname": "target_asset", "fieldtype": "Link", "in_standard_filter": 1, "label": "Target Asset", - "mandatory_depends_on": "eval:doc.entry_type=='Capitalization' && doc.capitalization_method=='Choose a WIP composite asset'", + "mandatory_depends_on": "eval:doc.capitalization_method=='Choose a WIP composite asset'", "no_copy": 1, "options": "Asset", - "read_only_depends_on": "eval:(doc.entry_type=='Decapitalization') || (doc.entry_type=='Capitalization' && doc.capitalization_method=='Create a new composite asset')" + "read_only_depends_on": "eval:doc.capitalization_method=='Create a new composite asset'" }, { - "depends_on": "eval:(doc.target_asset_name && !doc.__islocal) || (doc.target_asset && doc.entry_type=='Capitalization' && doc.capitalization_method=='Choose a WIP composite asset')", + "depends_on": "eval:(doc.target_asset_name && !doc.__islocal) || (doc.target_asset && doc.capitalization_method=='Choose a WIP composite asset')", "fetch_from": "target_asset.asset_name", "fieldname": "target_asset_name", "fieldtype": "Data", @@ -162,7 +154,7 @@ "read_only": 1 }, { - "depends_on": "eval:doc.entry_type=='Capitalization' && (doc.docstatus == 0 || (doc.stock_items && doc.stock_items.length))", + "depends_on": "eval:doc.docstatus == 0 || (doc.stock_items && doc.stock_items.length)", "fieldname": "section_break_16", "fieldtype": "Section Break", "label": "Consumed Stock Items" @@ -173,14 +165,6 @@ "label": "Stock Items", "options": "Asset Capitalization Stock Item" }, - { - "depends_on": "eval:doc.entry_type=='Decapitalization'", - "fieldname": "target_warehouse", - "fieldtype": "Link", - "label": "Target Warehouse", - "mandatory_depends_on": "eval:doc.entry_type=='Decapitalization'", - "options": "Warehouse" - }, { "depends_on": "target_has_batch_no", "fieldname": "target_batch_no", @@ -190,20 +174,9 @@ }, { "default": "1", - "depends_on": "eval:doc.entry_type=='Decapitalization'", "fieldname": "target_qty", "fieldtype": "Float", - "label": "Target Qty", - "read_only_depends_on": "eval:doc.entry_type=='Capitalization'" - }, - { - "depends_on": "eval:doc.entry_type=='Decapitalization'", - "fetch_from": "target_item_code.stock_uom", - "fieldname": "target_stock_uom", - "fieldtype": "Link", - "label": "Stock UOM", - "options": "UOM", - "read_only": 1 + "label": "Target Qty" }, { "default": "0", @@ -241,16 +214,6 @@ "label": "Assets", "options": "Asset Capitalization Asset Item" }, - { - "default": "Capitalization", - "fieldname": "entry_type", - "fieldtype": "Select", - "in_list_view": 1, - "in_standard_filter": 1, - "label": "Entry Type", - "options": "Capitalization\nDecapitalization", - "reqd": 1 - }, { "fieldname": "stock_items_total", "fieldtype": "Currency", @@ -272,7 +235,7 @@ "options": "Finance Book" }, { - "depends_on": "eval:doc.entry_type=='Capitalization' && (doc.docstatus == 0 || (doc.service_items && doc.service_items.length))", + "depends_on": "eval:doc.docstatus == 0 || (doc.service_items && doc.service_items.length)", "fieldname": "service_expenses_section", "fieldtype": "Section Break", "label": "Service Expenses" @@ -337,26 +300,24 @@ "read_only": 1 }, { - "depends_on": "eval:doc.entry_type=='Capitalization' && doc.capitalization_method=='Create a new composite asset'", + "depends_on": "eval:doc.capitalization_method=='Create a new composite asset'", "fieldname": "target_asset_location", "fieldtype": "Link", "label": "Target Asset Location", - "mandatory_depends_on": "eval:doc.entry_type=='Capitalization' && doc.capitalization_method=='Create a new composite asset'", + "mandatory_depends_on": "eval:doc.capitalization_method=='Create a new composite asset'", "options": "Location" }, { - "depends_on": "eval:doc.entry_type=='Capitalization'", "fieldname": "capitalization_method", "fieldtype": "Select", "label": "Capitalization Method", - "mandatory_depends_on": "eval:doc.entry_type=='Capitalization'", "options": "\nCreate a new composite asset\nChoose a WIP composite asset" } ], "index_web_pages_for_search": 1, "is_submittable": 1, "links": [], - "modified": "2023-10-03 22:55:59.461456", + "modified": "2025-01-08 13:14:33.008458", "modified_by": "Administrator", "module": "Assets", "name": "Asset Capitalization", @@ -400,4 +361,4 @@ "title_field": "title", "track_changes": 1, "track_seen": 1 -} \ No newline at end of file +} diff --git a/erpnext/assets/doctype/asset_capitalization/asset_capitalization.py b/erpnext/assets/doctype/asset_capitalization/asset_capitalization.py index d33d5c4df73..bed6cda43ed 100644 --- a/erpnext/assets/doctype/asset_capitalization/asset_capitalization.py +++ b/erpnext/assets/doctype/asset_capitalization/asset_capitalization.py @@ -41,7 +41,6 @@ force_fields = [ "target_is_fixed_asset", "target_has_serial_no", "target_has_batch_no", - "target_stock_uom", "stock_uom", "fixed_asset_account", "valuation_rate", @@ -73,7 +72,6 @@ class AssetCapitalization(StockController): capitalization_method: DF.Literal["", "Create a new composite asset", "Choose a WIP composite asset"] company: DF.Link cost_center: DF.Link | None - entry_type: DF.Literal["Capitalization", "Decapitalization"] finance_book: DF.Link | None naming_series: DF.Literal["ACC-ASC-.YYYY.-"] posting_date: DF.Date @@ -96,8 +94,6 @@ class AssetCapitalization(StockController): target_item_name: DF.Data | None target_qty: DF.Float target_serial_no: DF.SmallText | None - target_stock_uom: DF.Link | None - target_warehouse: DF.Link | None title: DF.Data | None total_value: DF.Currency # end: auto-generated types @@ -190,31 +186,18 @@ class AssetCapitalization(StockController): def validate_target_item(self): target_item = frappe.get_cached_doc("Item", self.target_item_code) - if not target_item.is_fixed_asset and not target_item.is_stock_item: - frappe.throw( - _("Target Item {0} is neither a Fixed Asset nor a Stock Item").format(target_item.name) - ) - - if self.entry_type == "Capitalization" and not target_item.is_fixed_asset: + if not target_item.is_fixed_asset: frappe.throw(_("Target Item {0} must be a Fixed Asset item").format(target_item.name)) - elif self.entry_type == "Decapitalization" and not target_item.is_stock_item: - frappe.throw(_("Target Item {0} must be a Stock Item").format(target_item.name)) if target_item.is_fixed_asset: self.target_qty = 1 if flt(self.target_qty) <= 0: frappe.throw(_("Target Qty must be a positive number")) - - if not target_item.is_stock_item: - self.target_warehouse = None if not target_item.has_batch_no: self.target_batch_no = None if not target_item.has_serial_no: self.target_serial_no = "" - if target_item.is_stock_item and not self.target_warehouse: - frappe.throw(_("Target Warehouse is mandatory for Decapitalization")) - self.validate_item(target_item) def validate_target_asset(self): @@ -231,7 +214,7 @@ class AssetCapitalization(StockController): ) ) - if target_asset.status in ("Scrapped", "Sold", "Capitalized", "Decapitalized"): + if target_asset.status in ("Scrapped", "Sold", "Capitalized"): frappe.throw( _("Target Asset {0} cannot be {1}").format(target_asset.name, target_asset.status) ) @@ -273,7 +256,7 @@ class AssetCapitalization(StockController): asset = self.get_asset_for_validation(d.asset) - if asset.status in ("Draft", "Scrapped", "Sold", "Capitalized", "Decapitalized"): + if asset.status in ("Draft", "Scrapped", "Sold", "Capitalized"): frappe.throw( _("Row #{0}: Consumed Asset {1} cannot be {2}").format( d.idx, asset.name, asset.status @@ -314,9 +297,6 @@ class AssetCapitalization(StockController): d.cost_center = frappe.get_cached_value("Company", self.company, "cost_center") def validate_source_mandatory(self): - if not self.target_is_fixed_asset and not self.get("asset_items"): - frappe.throw(_("Consumed Asset Items is mandatory for Decapitalization")) - if self.capitalization_method == "Create a new composite asset" and not ( self.get("stock_items") or self.get("asset_items") ): @@ -420,18 +400,6 @@ class AssetCapitalization(StockController): ) sl_entries.append(sle) - if self.entry_type == "Decapitalization" and not self.target_is_fixed_asset: - sle = self.get_sl_entries( - self, - { - "item_code": self.target_item_code, - "warehouse": self.target_warehouse, - "actual_qty": flt(self.target_qty), - "incoming_rate": flt(self.target_incoming_rate), - }, - ) - sl_entries.append(sle) - # reverse sl entries if cancel if self.docstatus == 2: sl_entries.reverse() @@ -474,21 +442,18 @@ class AssetCapitalization(StockController): return gl_entries def get_target_account(self): - if self.target_is_fixed_asset: - from erpnext.assets.doctype.asset.asset import is_cwip_accounting_enabled + from erpnext.assets.doctype.asset.asset import is_cwip_accounting_enabled - asset_category = frappe.get_cached_value("Asset", self.target_asset, "asset_category") - if is_cwip_accounting_enabled(asset_category): - target_account = get_asset_category_account( - "capital_work_in_progress_account", - asset_category=asset_category, - company=self.company, - ) - return target_account if target_account else self.target_fixed_asset_account - else: - return self.target_fixed_asset_account + asset_category = frappe.get_cached_value("Asset", self.target_asset, "asset_category") + if is_cwip_accounting_enabled(asset_category): + target_account = get_asset_category_account( + "capital_work_in_progress_account", + asset_category=asset_category, + company=self.company, + ) + return target_account if target_account else self.target_fixed_asset_account else: - return self.warehouse_account[self.target_warehouse]["account"] + return self.target_fixed_asset_account def get_gl_entries_for_consumed_stock_items(self, gl_entries, target_account, target_against, precision): # Consumed Stock Items @@ -589,33 +554,9 @@ class AssetCapitalization(StockController): item=self, ) ) - else: - # Target Stock Item - sle_list = self.sle_map.get(self.name) - for sle in sle_list: - stock_value_difference = flt(sle.stock_value_difference, precision) - account = self.warehouse_account[sle.warehouse]["account"] - - gl_entries.append( - self.get_gl_dict( - { - "account": account, - "against": ", ".join(target_against), - "cost_center": self.cost_center, - "project": self.get("project"), - "remarks": self.get("remarks") or "Accounting Entry for Stock", - "debit": stock_value_difference, - }, - self.warehouse_account[sle.warehouse]["account_currency"], - item=self, - ) - ) def create_target_asset(self): - if ( - self.entry_type != "Capitalization" - or self.capitalization_method != "Create a new composite asset" - ): + if self.capitalization_method != "Create a new composite asset": return total_target_asset_value = flt(self.total_value, self.precision("total_value")) @@ -654,10 +595,7 @@ class AssetCapitalization(StockController): ) def update_target_asset(self): - if ( - self.entry_type != "Capitalization" - or self.capitalization_method != "Choose a WIP composite asset" - ): + if self.capitalization_method != "Choose a WIP composite asset": return total_target_asset_value = flt(self.total_value, self.precision("total_value")) @@ -700,14 +638,6 @@ class AssetCapitalization(StockController): get_link_to_form("Asset Capitalization", self.name) ), ) - else: - asset.set_status("Decapitalized") - add_asset_activity( - asset.name, - _("Asset decapitalized after Asset Capitalization {0} was submitted").format( - get_link_to_form("Asset Capitalization", self.name) - ), - ) else: asset.set_status() add_asset_activity( @@ -729,16 +659,12 @@ def get_target_item_details(item_code=None, company=None): # Set Item Details out.target_item_name = item.item_name - out.target_stock_uom = item.stock_uom out.target_is_fixed_asset = cint(item.is_fixed_asset) out.target_has_batch_no = cint(item.has_batch_no) out.target_has_serial_no = cint(item.has_serial_no) if out.target_is_fixed_asset: out.target_qty = 1 - out.target_warehouse = None - else: - out.target_asset = None if not out.target_has_batch_no: out.target_batch_no = None diff --git a/erpnext/assets/doctype/asset_capitalization/test_asset_capitalization.py b/erpnext/assets/doctype/asset_capitalization/test_asset_capitalization.py index ba1c5fc2444..e0ff6102046 100644 --- a/erpnext/assets/doctype/asset_capitalization/test_asset_capitalization.py +++ b/erpnext/assets/doctype/asset_capitalization/test_asset_capitalization.py @@ -61,7 +61,6 @@ class TestAssetCapitalization(unittest.TestCase): # Create and submit Asset Captitalization asset_capitalization = create_asset_capitalization( - entry_type="Capitalization", capitalization_method="Create a new composite asset", target_item_code="Macbook Pro", target_asset_location="Test Location", @@ -76,7 +75,6 @@ class TestAssetCapitalization(unittest.TestCase): ) # Test Asset Capitalization values - self.assertEqual(asset_capitalization.entry_type, "Capitalization") self.assertEqual(asset_capitalization.target_qty, 1) self.assertEqual(asset_capitalization.stock_items[0].valuation_rate, stock_rate) @@ -152,7 +150,6 @@ class TestAssetCapitalization(unittest.TestCase): # Create and submit Asset Captitalization asset_capitalization = create_asset_capitalization( - entry_type="Capitalization", capitalization_method="Create a new composite asset", target_item_code="Macbook Pro", target_asset_location="Test Location", @@ -167,7 +164,6 @@ class TestAssetCapitalization(unittest.TestCase): ) # Test Asset Capitalization values - self.assertEqual(asset_capitalization.entry_type, "Capitalization") self.assertEqual(asset_capitalization.target_qty, 1) self.assertEqual(asset_capitalization.stock_items[0].valuation_rate, stock_rate) @@ -244,7 +240,6 @@ class TestAssetCapitalization(unittest.TestCase): # Create and submit Asset Captitalization asset_capitalization = create_asset_capitalization( - entry_type="Capitalization", capitalization_method="Choose a WIP composite asset", target_asset=wip_composite_asset.name, target_asset_location="Test Location", @@ -256,7 +251,6 @@ class TestAssetCapitalization(unittest.TestCase): ) # Test Asset Capitalization values - self.assertEqual(asset_capitalization.entry_type, "Capitalization") self.assertEqual(asset_capitalization.capitalization_method, "Choose a WIP composite asset") self.assertEqual(asset_capitalization.target_qty, 1) @@ -297,110 +291,6 @@ class TestAssetCapitalization(unittest.TestCase): self.assertFalse(get_actual_gle_dict(asset_capitalization.name)) self.assertFalse(get_actual_sle_dict(asset_capitalization.name)) - def test_decapitalization_with_depreciation(self): - # Variables - purchase_date = "2020-01-01" - depreciation_start_date = "2020-12-31" - capitalization_date = "2021-06-30" - - total_number_of_depreciations = 3 - expected_value_after_useful_life = 10_000 - consumed_asset_purchase_value = 100_000 - consumed_asset_current_value = 70_000 - consumed_asset_value_before_disposal = 55_000 - - target_qty = 10 - target_incoming_rate = 5500 - - depreciation_before_disposal_amount = 15_000 - accumulated_depreciation = 45_000 - - # to accomodate for depreciation on disposal calculation minor difference - consumed_asset_value_before_disposal = 55_123.29 - target_incoming_rate = 5512.329 - depreciation_before_disposal_amount = 14_876.71 - accumulated_depreciation = 44_876.71 - - # Create assets - consumed_asset = create_depreciation_asset( - asset_name="Asset Capitalization Consumable Asset", - asset_value=consumed_asset_purchase_value, - purchase_date=purchase_date, - depreciation_start_date=depreciation_start_date, - depreciation_method="Straight Line", - total_number_of_depreciations=total_number_of_depreciations, - frequency_of_depreciation=12, - expected_value_after_useful_life=expected_value_after_useful_life, - company="_Test Company with perpetual inventory", - submit=1, - ) - - first_asset_depr_schedule = get_asset_depr_schedule_doc(consumed_asset.name, "Active") - self.assertEqual(first_asset_depr_schedule.status, "Active") - - # Create and submit Asset Captitalization - asset_capitalization = create_asset_capitalization( - entry_type="Decapitalization", - posting_date=capitalization_date, # half a year - target_item_code="Capitalization Target Stock Item", - target_qty=target_qty, - consumed_asset=consumed_asset.name, - company="_Test Company with perpetual inventory", - submit=1, - ) - - # Test Asset Capitalization values - self.assertEqual(asset_capitalization.entry_type, "Decapitalization") - - self.assertEqual( - asset_capitalization.asset_items[0].current_asset_value, consumed_asset_current_value - ) - self.assertEqual( - asset_capitalization.asset_items[0].asset_value, consumed_asset_value_before_disposal - ) - self.assertEqual(asset_capitalization.asset_items_total, consumed_asset_value_before_disposal) - - self.assertEqual(asset_capitalization.total_value, consumed_asset_value_before_disposal) - self.assertEqual(asset_capitalization.target_incoming_rate, target_incoming_rate) - - # Test Consumed Asset values - consumed_asset.reload() - self.assertEqual(consumed_asset.status, "Decapitalized") - - first_asset_depr_schedule.load_from_db() - - second_asset_depr_schedule = get_asset_depr_schedule_doc(consumed_asset.name, "Active") - self.assertEqual(second_asset_depr_schedule.status, "Active") - self.assertEqual(first_asset_depr_schedule.status, "Cancelled") - - depr_schedule_of_consumed_asset = second_asset_depr_schedule.get("depreciation_schedule") - - consumed_depreciation_schedule = [ - d - for d in depr_schedule_of_consumed_asset - if getdate(d.schedule_date) == getdate(capitalization_date) - ] - self.assertTrue(consumed_depreciation_schedule and consumed_depreciation_schedule[0].journal_entry) - self.assertEqual( - consumed_depreciation_schedule[0].depreciation_amount, depreciation_before_disposal_amount - ) - - # Test General Ledger Entries - expected_gle = { - "_Test Warehouse - TCP1": consumed_asset_value_before_disposal, - "_Test Accumulated Depreciations - TCP1": accumulated_depreciation, - "_Test Fixed Asset - TCP1": -consumed_asset_purchase_value, - } - actual_gle = get_actual_gle_dict(asset_capitalization.name) - self.assertEqual(actual_gle, expected_gle) - - # Cancel Asset Capitalization and make test entries and status are reversed - asset_capitalization.reload() - asset_capitalization.cancel() - self.assertEqual(consumed_asset.db_get("status"), "Partially Depreciated") - self.assertFalse(get_actual_gle_dict(asset_capitalization.name)) - self.assertFalse(get_actual_sle_dict(asset_capitalization.name)) - def test_capitalize_only_service_item(self): company = "_Test Company" # Variables @@ -420,7 +310,6 @@ class TestAssetCapitalization(unittest.TestCase): # Create and submit Asset Captitalization asset_capitalization = create_asset_capitalization( - entry_type="Capitalization", capitalization_method="Choose a WIP composite asset", target_asset=wip_composite_asset.name, target_asset_location="Test Location", @@ -468,13 +357,11 @@ def create_asset_capitalization(**args): target_item_code = target_asset.item_code or args.target_item_code company = target_asset.company or args.company or "_Test Company" warehouse = args.warehouse or create_warehouse("_Test Warehouse", company=company) - target_warehouse = args.target_warehouse or warehouse source_warehouse = args.source_warehouse or warehouse asset_capitalization = frappe.new_doc("Asset Capitalization") asset_capitalization.update( { - "entry_type": args.entry_type or "Capitalization", "capitalization_method": args.capitalization_method or None, "company": company, "posting_date": args.posting_date or now.strftime("%Y-%m-%d"), @@ -482,7 +369,6 @@ def create_asset_capitalization(**args): "target_item_code": target_item_code, "target_asset": target_asset.name, "target_asset_location": "Test Location", - "target_warehouse": target_warehouse, "target_qty": flt(args.target_qty) or 1, "target_batch_no": args.target_batch_no, "target_serial_no": args.target_serial_no, diff --git a/erpnext/assets/report/fixed_asset_register/fixed_asset_register.py b/erpnext/assets/report/fixed_asset_register/fixed_asset_register.py index 8ebf9d6d389..2b4c55d6ec8 100644 --- a/erpnext/assets/report/fixed_asset_register/fixed_asset_register.py +++ b/erpnext/assets/report/fixed_asset_register/fixed_asset_register.py @@ -66,12 +66,12 @@ def get_conditions(filters): conditions["cost_center"] = filters.get("cost_center") if status: - # In Store assets are those that are not sold or scrapped or capitalized or decapitalized + # In Store assets are those that are not sold or scrapped or capitalized operand = "not in" if status not in "In Location": operand = "in" - conditions["status"] = (operand, ["Sold", "Scrapped", "Capitalized", "Decapitalized"]) + conditions["status"] = (operand, ["Sold", "Scrapped", "Capitalized"]) return conditions @@ -272,9 +272,9 @@ def get_asset_depreciation_amount_map(filters, finance_book): query = query.where(asset.cost_center == filters.cost_center) if filters.status: if filters.status == "In Location": - query = query.where(asset.status.notin(["Sold", "Scrapped", "Capitalized", "Decapitalized"])) + query = query.where(asset.status.notin(["Sold", "Scrapped", "Capitalized"])) else: - query = query.where(asset.status.isin(["Sold", "Scrapped", "Capitalized", "Decapitalized"])) + query = query.where(asset.status.isin(["Sold", "Scrapped", "Capitalized"])) if finance_book: query = query.where((gle.finance_book.isin([cstr(finance_book), ""])) | (gle.finance_book.isnull())) else: From 47c6e5a931c8f16198f4be76a1ca1f97323857f3 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 11:59:27 +0530 Subject: [PATCH 0865/1614] fix: typo in manufacturing settings (backport #45190) (#45193) fix: typo in manufacturing settings (cherry picked from commit a9b761f86261f350fa9cc9652b3c8e1d9170bf30) Co-authored-by: diptanilsaha --- .../manufacturing_settings/manufacturing_settings.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/manufacturing/doctype/manufacturing_settings/manufacturing_settings.json b/erpnext/manufacturing/doctype/manufacturing_settings/manufacturing_settings.json index 618ccdf8fc8..f92df9894a9 100644 --- a/erpnext/manufacturing/doctype/manufacturing_settings/manufacturing_settings.json +++ b/erpnext/manufacturing/doctype/manufacturing_settings/manufacturing_settings.json @@ -207,7 +207,7 @@ "description": "In the case of 'Use Multi-Level BOM' in a work order, if the user wishes to add sub-assembly costs to Finished Goods items without using a job card as well the scrap items, then this option needs to be enable.", "fieldname": "set_op_cost_and_scrape_from_sub_assemblies", "fieldtype": "Check", - "label": "Set Operating Cost / Scrape Items From Sub-assemblies" + "label": "Set Operating Cost / Scrap Items From Sub-assemblies" }, { "default": "0", @@ -249,7 +249,7 @@ "index_web_pages_for_search": 1, "issingle": 1, "links": [], - "modified": "2025-01-02 12:46:33.520853", + "modified": "2025-01-09 16:02:23.326763", "modified_by": "Administrator", "module": "Manufacturing", "name": "Manufacturing Settings", From fe5c458c4525915939369466bac222aa6b9bbd54 Mon Sep 17 00:00:00 2001 From: Diptanil Saha Date: Mon, 13 Jan 2025 12:06:46 +0530 Subject: [PATCH 0866/1614] fix: batch number search on pos (#45209) * fix: price of items with batch number not having seperate item price on pos search bar * fix: introduced batch number based sorting (cherry picked from commit e529f82392a92ae927d326ca3ab1fc7a08eb7924) --- .../page/point_of_sale/point_of_sale.py | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/erpnext/selling/page/point_of_sale/point_of_sale.py b/erpnext/selling/page/point_of_sale/point_of_sale.py index f00b7d0fc55..b86a87983d5 100644 --- a/erpnext/selling/page/point_of_sale/point_of_sale.py +++ b/erpnext/selling/page/point_of_sale/point_of_sale.py @@ -64,7 +64,7 @@ def search_by_term(search_term, warehouse, price_list): } if batch_no: - price_filters["batch_no"] = batch_no + price_filters["batch_no"] = ["in", [batch_no, ""]] price = frappe.get_list( doctype="Item Price", @@ -74,15 +74,25 @@ def search_by_term(search_term, warehouse, price_list): def __sort(p): p_uom = p.get("uom") + p_batch = p.get("batch_no") + batch_no = item.get("batch_no") + + if batch_no and p_batch and p_batch == batch_no: + if p_uom == item.get("uom"): + return 0 + elif p_uom == item.get("stock_uom"): + return 1 + else: + return 2 if p_uom == item.get("uom"): - return 0 + return 3 elif p_uom == item.get("stock_uom"): - return 1 + return 4 else: - return 2 + return 5 - # sort by fallback preference. always pick exact uom match if available + # sort by fallback preference. always pick exact uom and batch number match if available price = sorted(price, key=__sort) if len(price) > 0: From f7448c6f793148e3f197cbef4d0ada6d0e9d2bc6 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 12:08:17 +0530 Subject: [PATCH 0867/1614] fix(Timesheet): ignore permissions when updating Task and Project (backport #45168) (#45170) * fix(Timesheet): ignore permissions when updating Task and Project (#45168) (cherry picked from commit 9e760e54a53679480982f2d2afc6638d07acf18a) # Conflicts: # erpnext/projects/doctype/timesheet/timesheet.py * chore: resolve conflicts --------- Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com> --- erpnext/projects/doctype/timesheet/timesheet.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/projects/doctype/timesheet/timesheet.py b/erpnext/projects/doctype/timesheet/timesheet.py index 7ab661c8822..09fdfad66ba 100644 --- a/erpnext/projects/doctype/timesheet/timesheet.py +++ b/erpnext/projects/doctype/timesheet/timesheet.py @@ -166,7 +166,7 @@ class Timesheet(Document): if data.task and data.task not in tasks: task = frappe.get_doc("Task", data.task) task.update_time_and_costing() - task.save() + task.save(ignore_permissions=True) tasks.append(data.task) if data.project and data.project not in projects: @@ -175,7 +175,7 @@ class Timesheet(Document): for project in projects: project_doc = frappe.get_doc("Project", project) project_doc.update_project() - project_doc.save() + project_doc.save(ignore_permissions=True) def validate_dates(self): for data in self.time_logs: From 23b846ef39e1ddc0d7e0b44102d6e814d262cc0b Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Fri, 10 Jan 2025 14:20:48 +0530 Subject: [PATCH 0868/1614] fix: incorrect valuation rate for PI based revaluation (cherry picked from commit 14ce2337dff30616aa648c47fe827b16063a3e26) (cherry picked from commit f7e3854641246a16d33f1699c450fc975ddc8ba4) --- erpnext/stock/stock_ledger.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/erpnext/stock/stock_ledger.py b/erpnext/stock/stock_ledger.py index 1b299b52dd6..37e91080d5d 100644 --- a/erpnext/stock/stock_ledger.py +++ b/erpnext/stock/stock_ledger.py @@ -1039,7 +1039,7 @@ class update_entries_after: def get_dynamic_incoming_outgoing_rate(self, sle): # Get updated incoming/outgoing rate from transaction - if sle.recalculate_rate: + if sle.recalculate_rate or self.has_landed_cost_based_on_pi(sle): rate = self.get_incoming_outgoing_rate_from_transaction(sle) if flt(sle.actual_qty) >= 0: @@ -1047,6 +1047,14 @@ class update_entries_after: else: sle.outgoing_rate = rate + def has_landed_cost_based_on_pi(self, sle): + if sle.voucher_type == "Purchase Receipt" and frappe.db.get_single_value( + "Buying Settings", "set_landed_cost_based_on_purchase_invoice_rate" + ): + return True + + return False + def get_incoming_outgoing_rate_from_transaction(self, sle): rate = 0 # Material Transfer, Repack, Manufacturing From 47a622d0cb14f896cfc58154d37976cb6e729436 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Fri, 10 Jan 2025 18:19:48 +0530 Subject: [PATCH 0869/1614] fix: delivery_document_no column issue (cherry picked from commit 61efb2bb39a720b2d0fc98ff714b4477fcaa6dc5) # Conflicts: # erpnext/accounts/doctype/sales_invoice/sales_invoice.py # erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.py (cherry picked from commit 0df18080c7277bb773134f7fbcfab0fb0c6a1ba4) --- .../doctype/sales_invoice/sales_invoice.py | 7 ++-- .../sales_invoice_item/sales_invoice_item.py | 38 +++++++++++++++++++ .../doctype/delivery_note/delivery_note.py | 6 --- erpnext/stock/doctype/serial_no/serial_no.py | 15 -------- 4 files changed, 42 insertions(+), 24 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index cb501c1ffbc..ee18410a57b 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -321,9 +321,7 @@ class SalesInvoice(SellingController): self.set_against_income_account() self.validate_time_sheets_are_submitted() self.validate_multiple_billing("Delivery Note", "dn_detail", "amount") - if not self.is_return: - self.validate_serial_numbers() - else: + if self.is_return: self.timesheets = [] self.update_packing_list() self.set_billing_hours_and_amount() @@ -1706,6 +1704,7 @@ class SalesInvoice(SellingController): self.set("write_off_amount", reference_doc.get("write_off_amount")) self.due_date = None +<<<<<<< HEAD def validate_serial_numbers(self): """ validate serial number agains Delivery Note and Sales Invoice @@ -1753,6 +1752,8 @@ class SalesInvoice(SellingController): ) ) +======= +>>>>>>> 61efb2bb39 (fix: delivery_document_no column issue) def update_project(self): unique_projects = list(set([d.project for d in self.get("items") if d.project])) if self.project and self.project not in unique_projects: diff --git a/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.py b/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.py index b7b0873c76b..b96445e2c3a 100644 --- a/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.py +++ b/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.py @@ -3,6 +3,13 @@ from frappe.model.document import Document +<<<<<<< HEAD +======= +from frappe.utils.data import cint + +from erpnext.assets.doctype.asset.depreciation import get_disposal_account_and_cost_center +from erpnext.stock.doctype.serial_no.serial_no import get_serial_nos +>>>>>>> 61efb2bb39 (fix: delivery_document_no column issue) class SalesInvoiceItem(Document): @@ -93,4 +100,35 @@ class SalesInvoiceItem(Document): weight_uom: DF.Link | None # end: auto-generated types +<<<<<<< HEAD pass +======= + def validate_cost_center(self, company: str): + cost_center_company = frappe.get_cached_value("Cost Center", self.cost_center, "company") + if cost_center_company != company: + frappe.throw( + _("Row #{0}: Cost Center {1} does not belong to company {2}").format( + frappe.bold(self.idx), frappe.bold(self.cost_center), frappe.bold(company) + ) + ) + + def set_actual_qty(self): + if self.item_code and self.warehouse: + self.actual_qty = ( + frappe.db.get_value( + "Bin", {"item_code": self.item_code, "warehouse": self.warehouse}, "actual_qty" + ) + or 0 + ) + + def set_income_account_for_fixed_asset(self, company: str): + """Set income account for fixed asset item based on company's disposal account and cost center.""" + if not self.is_fixed_asset: + return + + disposal_account, depreciation_cost_center = get_disposal_account_and_cost_center(company) + + self.income_account = disposal_account + if not self.cost_center: + self.cost_center = depreciation_cost_center +>>>>>>> 61efb2bb39 (fix: delivery_document_no column issue) diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.py b/erpnext/stock/doctype/delivery_note/delivery_note.py index 2b4dad137c2..76e5b4ea972 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note.py +++ b/erpnext/stock/doctype/delivery_note/delivery_note.py @@ -12,7 +12,6 @@ from frappe.utils import cint, flt from erpnext.controllers.accounts_controller import get_taxes_and_charges, merge_taxes from erpnext.controllers.selling_controller import SellingController -from erpnext.stock.doctype.serial_no.serial_no import get_delivery_note_serial_no form_grid_templates = {"items": "templates/form_grid/item_grid.html"} @@ -980,11 +979,6 @@ def make_sales_invoice(source_name, target_doc=None, args=None): def update_item(source_doc, target_doc, source_parent): target_doc.qty = to_make_invoice_qty_map[source_doc.name] - if source_doc.serial_no and source_parent.per_billed > 0 and not source_parent.is_return: - target_doc.serial_no = get_delivery_note_serial_no( - source_doc.item_code, target_doc.qty, source_parent.name - ) - def get_pending_qty(item_row): pending_qty = item_row.qty - invoiced_qty_map.get(item_row.name, 0) diff --git a/erpnext/stock/doctype/serial_no/serial_no.py b/erpnext/stock/doctype/serial_no/serial_no.py index 4c693d8efec..54f96fb7b10 100644 --- a/erpnext/stock/doctype/serial_no/serial_no.py +++ b/erpnext/stock/doctype/serial_no/serial_no.py @@ -169,21 +169,6 @@ def update_maintenance_status(): frappe.db.set_value("Serial No", doc.name, "maintenance_status", doc.maintenance_status) -def get_delivery_note_serial_no(item_code, qty, delivery_note): - serial_nos = "" - dn_serial_nos = frappe.db.sql_list( - f""" select name from `tabSerial No` - where item_code = %(item_code)s and delivery_document_no = %(delivery_note)s - and sales_invoice is null limit {cint(qty)}""", - {"item_code": item_code, "delivery_note": delivery_note}, - ) - - if dn_serial_nos and len(dn_serial_nos) > 0: - serial_nos = "\n".join(dn_serial_nos) - - return serial_nos - - @frappe.whitelist() def auto_fetch_serial_number( qty: int, From 120bccdad3c19ae88f0e1bbf159d9995c87084a1 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Sat, 11 Jan 2025 10:59:26 +0530 Subject: [PATCH 0870/1614] chore: fix conflicts (cherry picked from commit 9426a3218465a9fac751b48a7d83b170f6d259f3) --- .../sales_invoice_item/sales_invoice_item.py | 38 ------------------- 1 file changed, 38 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.py b/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.py index b96445e2c3a..b7b0873c76b 100644 --- a/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.py +++ b/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.py @@ -3,13 +3,6 @@ from frappe.model.document import Document -<<<<<<< HEAD -======= -from frappe.utils.data import cint - -from erpnext.assets.doctype.asset.depreciation import get_disposal_account_and_cost_center -from erpnext.stock.doctype.serial_no.serial_no import get_serial_nos ->>>>>>> 61efb2bb39 (fix: delivery_document_no column issue) class SalesInvoiceItem(Document): @@ -100,35 +93,4 @@ class SalesInvoiceItem(Document): weight_uom: DF.Link | None # end: auto-generated types -<<<<<<< HEAD pass -======= - def validate_cost_center(self, company: str): - cost_center_company = frappe.get_cached_value("Cost Center", self.cost_center, "company") - if cost_center_company != company: - frappe.throw( - _("Row #{0}: Cost Center {1} does not belong to company {2}").format( - frappe.bold(self.idx), frappe.bold(self.cost_center), frappe.bold(company) - ) - ) - - def set_actual_qty(self): - if self.item_code and self.warehouse: - self.actual_qty = ( - frappe.db.get_value( - "Bin", {"item_code": self.item_code, "warehouse": self.warehouse}, "actual_qty" - ) - or 0 - ) - - def set_income_account_for_fixed_asset(self, company: str): - """Set income account for fixed asset item based on company's disposal account and cost center.""" - if not self.is_fixed_asset: - return - - disposal_account, depreciation_cost_center = get_disposal_account_and_cost_center(company) - - self.income_account = disposal_account - if not self.cost_center: - self.cost_center = depreciation_cost_center ->>>>>>> 61efb2bb39 (fix: delivery_document_no column issue) From 85c2d32de69bc87322e34f4dca876860ac9c282c Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Sat, 11 Jan 2025 11:00:20 +0530 Subject: [PATCH 0871/1614] chore: fix conflicts (cherry picked from commit bb170c024fcce26ef64e0afc2c30344f2b63e98a) --- .../doctype/sales_invoice/sales_invoice.py | 50 ------------------- 1 file changed, 50 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index ee18410a57b..174a80d4d75 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -1704,56 +1704,6 @@ class SalesInvoice(SellingController): self.set("write_off_amount", reference_doc.get("write_off_amount")) self.due_date = None -<<<<<<< HEAD - def validate_serial_numbers(self): - """ - validate serial number agains Delivery Note and Sales Invoice - """ - self.set_serial_no_against_delivery_note() - self.validate_serial_against_delivery_note() - - def set_serial_no_against_delivery_note(self): - for item in self.items: - if item.serial_no and item.delivery_note and item.qty != len(get_serial_nos(item.serial_no)): - item.serial_no = get_delivery_note_serial_no(item.item_code, item.qty, item.delivery_note) - - def validate_serial_against_delivery_note(self): - """ - validate if the serial numbers in Sales Invoice Items are same as in - Delivery Note Item - """ - - for item in self.items: - if not item.delivery_note or not item.dn_detail: - continue - - serial_nos = frappe.db.get_value("Delivery Note Item", item.dn_detail, "serial_no") or "" - dn_serial_nos = set(get_serial_nos(serial_nos)) - - serial_nos = item.serial_no or "" - si_serial_nos = set(get_serial_nos(serial_nos)) - serial_no_diff = si_serial_nos - dn_serial_nos - - if serial_no_diff: - dn_link = frappe.utils.get_link_to_form("Delivery Note", item.delivery_note) - serial_no_msg = ", ".join(frappe.bold(d) for d in serial_no_diff) - - msg = _("Row #{0}: The following Serial Nos are not present in Delivery Note {1}:").format( - item.idx, dn_link - ) - msg += " " + serial_no_msg - - frappe.throw(msg=msg, title=_("Serial Nos Mismatch")) - - if item.serial_no and cint(item.qty) != len(si_serial_nos): - frappe.throw( - _("Row #{0}: {1} Serial numbers required for Item {2}. You have provided {3}.").format( - item.idx, item.qty, item.item_code, len(si_serial_nos) - ) - ) - -======= ->>>>>>> 61efb2bb39 (fix: delivery_document_no column issue) def update_project(self): unique_projects = list(set([d.project for d in self.get("items") if d.project])) if self.project and self.project not in unique_projects: From b75c7364d605c0ac88f633d22d4e3d25d09c555c Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Sat, 11 Jan 2025 11:06:13 +0530 Subject: [PATCH 0872/1614] fix: test case (cherry picked from commit 7d66e4efb0bdb7c109347ea7504b09f08858bfcb) --- erpnext/accounts/doctype/sales_invoice/sales_invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 174a80d4d75..c9a36e4aece 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -39,7 +39,7 @@ from erpnext.controllers.selling_controller import SellingController from erpnext.projects.doctype.timesheet.timesheet import get_projectwise_timesheet_data from erpnext.setup.doctype.company.company import update_company_current_month_sales from erpnext.stock.doctype.delivery_note.delivery_note import update_billed_amount_based_on_so -from erpnext.stock.doctype.serial_no.serial_no import get_delivery_note_serial_no, get_serial_nos +from erpnext.stock.doctype.serial_no.serial_no import get_serial_nos form_grid_templates = {"items": "templates/form_grid/item_grid.html"} From 74650217c1ffb0cf37ff2a604e1ce882796c017d Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Mon, 13 Jan 2025 08:20:40 +0000 Subject: [PATCH 0873/1614] chore(release): Bumped to Version 15.48.3 ## [15.48.3](https://github.com/frappe/erpnext/compare/v15.48.2...v15.48.3) (2025-01-13) ### Bug Fixes * delivery_document_no column issue ([47a622d](https://github.com/frappe/erpnext/commit/47a622d0cb14f896cfc58154d37976cb6e729436)) * incorrect valuation rate for PI based revaluation ([23b846e](https://github.com/frappe/erpnext/commit/23b846ef39e1ddc0d7e0b44102d6e814d262cc0b)) * test case ([b75c736](https://github.com/frappe/erpnext/commit/b75c7364d605c0ac88f633d22d4e3d25d09c555c)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index da80a88a542..d08d8de1832 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.48.2" +__version__ = "15.48.3" def get_default_company(user=None): From 38cb5a98bfb7cd85f09f9363c6fbfe823c253a28 Mon Sep 17 00:00:00 2001 From: DHINESH00 <18csa09@karpagamtech.ac.in> Date: Thu, 19 Dec 2024 17:15:11 +0530 Subject: [PATCH 0874/1614] fix: update discounting on mixed conditions (cherry picked from commit d541259da9ddd0c32ec6307c879b129d3df304e3) --- erpnext/public/js/controllers/transaction.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 79ed7d0a836..e1714dae308 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -1825,18 +1825,16 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe apply_rule_on_other_items(args) { const me = this; - const fields = ["discount_percentage", "pricing_rules", "discount_amount", "rate"]; + const fields = ["pricing_rules"]; for(var k in args) { let data = args[k]; if (data && data.apply_rule_on_other_items && JSON.parse(data.apply_rule_on_other_items)) { + fields.push(frappe.scrub(data.pricing_rule_for)) me.frm.doc.items.forEach(d => { - if (in_list(JSON.parse(data.apply_rule_on_other_items), d[data.apply_rule_on]) && d.item_code === data.item_code) { + if (in_list(JSON.parse(data.apply_rule_on_other_items), d[data.apply_rule_on])) { for(var k in data) { - if (data.pricing_rule_for == "Discount Percentage" && data.apply_rule_on_other_items && k == "discount_amount") { - continue; - } if (in_list(fields, k) && data[k] && (data.price_or_product_discount === 'Price' || k === 'pricing_rules')) { frappe.model.set_value(d.doctype, d.name, k, data[k]); From 1d5a73a325b5d3c7c2cd7660ec066e3cf95f32e4 Mon Sep 17 00:00:00 2001 From: DHINESH00 <18csa09@karpagamtech.ac.in> Date: Mon, 23 Dec 2024 11:23:23 +0530 Subject: [PATCH 0875/1614] fix: Semgrep rules (cherry picked from commit 547c8004ebc51a0cb1efbe7b20b58a4963377db8) --- erpnext/public/js/controllers/transaction.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index e1714dae308..fb43cb46860 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -1833,7 +1833,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe if (data && data.apply_rule_on_other_items && JSON.parse(data.apply_rule_on_other_items)) { fields.push(frappe.scrub(data.pricing_rule_for)) me.frm.doc.items.forEach(d => { - if (in_list(JSON.parse(data.apply_rule_on_other_items), d[data.apply_rule_on])) { + if (JSON.parse(data.apply_rule_on_other_items).includes(d[data.apply_rule_on])) { for(var k in data) { if (in_list(fields, k) && data[k] && (data.price_or_product_discount === 'Price' || k === 'pricing_rules')) { From 07c3605905d9490dd890645a1872e47eb3edd631 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Tue, 31 Dec 2024 13:46:50 +0530 Subject: [PATCH 0876/1614] fix: deduct tds on excess amount if checked (cherry picked from commit a203e3ffaf7c2c9fcc9b8b79af5a4c490b692885) --- .../tax_withholding_category.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py index cde1d24e5b4..325fefed804 100644 --- a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py +++ b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py @@ -555,9 +555,11 @@ def get_tds_amount(ldc, parties, inv, tax_details, vouchers): else: tax_withholding_net_total = inv.get("tax_withholding_net_total", 0) - if (threshold and tax_withholding_net_total >= threshold) or ( + has_cumulative_threshold_breached = ( cumulative_threshold and (supp_credit_amt + supp_inv_credit_amt) >= cumulative_threshold - ): + ) + + if (threshold and tax_withholding_net_total >= threshold) or (has_cumulative_threshold_breached): # Get net total again as TDS is calculated on net total # Grand is used to just check for threshold breach net_total = ( @@ -565,9 +567,7 @@ def get_tds_amount(ldc, parties, inv, tax_details, vouchers): ) supp_credit_amt += net_total - if (cumulative_threshold and supp_credit_amt >= cumulative_threshold) and cint( - tax_details.tax_on_excess_amount - ): + if has_cumulative_threshold_breached and cint(tax_details.tax_on_excess_amount): supp_credit_amt = net_total + tax_withholding_net_total - cumulative_threshold if ldc and is_valid_certificate(ldc, inv.get("posting_date") or inv.get("transaction_date"), 0): From 42eb88f5f60ddb556ba7582d253b75abbd601c6e Mon Sep 17 00:00:00 2001 From: Sanket322 Date: Fri, 3 Jan 2025 16:44:24 +0530 Subject: [PATCH 0877/1614] fix: set billing and shipping address on change of company (cherry picked from commit f46f1bead4a0df94e8ab5b2b8c8479b007147ddf) --- erpnext/public/js/controllers/buying.js | 7 +++++-- erpnext/setup/doctype/company/company.py | 8 ++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/erpnext/public/js/controllers/buying.js b/erpnext/public/js/controllers/buying.js index af61d5f0258..8bf679c68c3 100644 --- a/erpnext/public/js/controllers/buying.js +++ b/erpnext/public/js/controllers/buying.js @@ -157,10 +157,13 @@ erpnext.buying = { if(!frappe.meta.has_field(this.frm.doc.doctype, "billing_address")) return; frappe.call({ - method: "erpnext.setup.doctype.company.company.get_default_company_address", + method: "erpnext.setup.doctype.company.company.get_billing_shipping_address", args: { name: this.frm.doc.company, existing_address:this.frm.doc.billing_address }, callback: (r) => { - this.frm.set_value("billing_address", r.message || ""); + this.frm.set_value("billing_address", r.message.primary_address || ""); + + if(!frappe.meta.has_field(this.frm.doc.doctype, "shipping_address")) return; + this.frm.set_value("shipping_address", r.message.shipping_address || ""); }, }); } diff --git a/erpnext/setup/doctype/company/company.py b/erpnext/setup/doctype/company/company.py index d781288c8bd..1929ce22334 100644 --- a/erpnext/setup/doctype/company/company.py +++ b/erpnext/setup/doctype/company/company.py @@ -914,6 +914,14 @@ def get_default_company_address(name, sort_key="is_primary_address", existing_ad return None +@frappe.whitelist() +def get_billing_shipping_address(name, existing_address=None): + primart_address = get_default_company_address(name, "is_primary_address", existing_address) + shipping_address = get_default_company_address(name, "is_shipping_address", existing_address) + + return {"primary_address": primart_address, "shipping_address": shipping_address} + + @frappe.whitelist() def create_transaction_deletion_request(company): from erpnext.setup.doctype.transaction_deletion_record.transaction_deletion_record import ( From 80e6112549e4464c8d736c385113966672109359 Mon Sep 17 00:00:00 2001 From: Sanket322 Date: Fri, 3 Jan 2025 18:04:56 +0530 Subject: [PATCH 0878/1614] fix: pass right existing address (cherry picked from commit ce9976477220c8f2e72b27f507a61437c43d6a51) --- erpnext/public/js/controllers/buying.js | 6 +++++- erpnext/setup/doctype/company/company.py | 8 ++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/erpnext/public/js/controllers/buying.js b/erpnext/public/js/controllers/buying.js index 8bf679c68c3..a705ce62f2b 100644 --- a/erpnext/public/js/controllers/buying.js +++ b/erpnext/public/js/controllers/buying.js @@ -158,7 +158,11 @@ erpnext.buying = { frappe.call({ method: "erpnext.setup.doctype.company.company.get_billing_shipping_address", - args: { name: this.frm.doc.company, existing_address:this.frm.doc.billing_address }, + args: { + name: this.frm.doc.company, + billing_address:this.frm.doc.billing_address, + shipping_address: this.frm.doc.shipping_address + }, callback: (r) => { this.frm.set_value("billing_address", r.message.primary_address || ""); diff --git a/erpnext/setup/doctype/company/company.py b/erpnext/setup/doctype/company/company.py index 1929ce22334..27005d99301 100644 --- a/erpnext/setup/doctype/company/company.py +++ b/erpnext/setup/doctype/company/company.py @@ -915,11 +915,11 @@ def get_default_company_address(name, sort_key="is_primary_address", existing_ad @frappe.whitelist() -def get_billing_shipping_address(name, existing_address=None): - primart_address = get_default_company_address(name, "is_primary_address", existing_address) - shipping_address = get_default_company_address(name, "is_shipping_address", existing_address) +def get_billing_shipping_address(name, billing_address=None, shipping_address=None): + primary_address = get_default_company_address(name, "is_primary_address", billing_address) + shipping_address = get_default_company_address(name, "is_shipping_address", shipping_address) - return {"primary_address": primart_address, "shipping_address": shipping_address} + return {"primary_address": primary_address, "shipping_address": shipping_address} @frappe.whitelist() From 3f6d7741d9c939c5242de26256b138c711e65680 Mon Sep 17 00:00:00 2001 From: Sanket322 Date: Fri, 3 Jan 2025 17:44:05 +0530 Subject: [PATCH 0879/1614] fix: don't create invoice if invoice start date is in future (cherry picked from commit 058fdca981ea0674585b13b1ddaa426508fcd932) --- erpnext/accounts/doctype/subscription/subscription.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/subscription/subscription.py b/erpnext/accounts/doctype/subscription/subscription.py index d57f1de4379..9b8c9b51859 100644 --- a/erpnext/accounts/doctype/subscription/subscription.py +++ b/erpnext/accounts/doctype/subscription/subscription.py @@ -697,7 +697,7 @@ class Subscription(Document): self.status = "Cancelled" self.cancelation_date = nowdate() - if to_generate_invoice: + if to_generate_invoice and nowdate() >= self.current_invoice_start: self.generate_invoice(self.current_invoice_start, self.cancelation_date) self.save() From abfcfdfe7e9ba2782fe035f0f7e0a3a73f5cac0e Mon Sep 17 00:00:00 2001 From: Sanket322 Date: Tue, 7 Jan 2025 12:44:29 +0530 Subject: [PATCH 0880/1614] fix: minor update for readability (cherry picked from commit 61d4593236f478db2e9965edfac620ea7b127b00) --- erpnext/accounts/doctype/subscription/subscription.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/subscription/subscription.py b/erpnext/accounts/doctype/subscription/subscription.py index 9b8c9b51859..9309950cce6 100644 --- a/erpnext/accounts/doctype/subscription/subscription.py +++ b/erpnext/accounts/doctype/subscription/subscription.py @@ -697,7 +697,7 @@ class Subscription(Document): self.status = "Cancelled" self.cancelation_date = nowdate() - if to_generate_invoice and nowdate() >= self.current_invoice_start: + if to_generate_invoice and self.cancelation_date >= self.current_invoice_start: self.generate_invoice(self.current_invoice_start, self.cancelation_date) self.save() From 7a3687ca8e0e674a107893356d70a159e0ffe12d Mon Sep 17 00:00:00 2001 From: mahsem <137205921+mahsem@users.noreply.github.com> Date: Tue, 14 Jan 2025 07:26:01 +0100 Subject: [PATCH 0881/1614] fix: change string to be able to translate (#45090) * fix: change_string_to_translate * fix: debit note translation * chore: update 'modified' field --------- Co-authored-by: ruthra kumar (cherry picked from commit a3165c5719d2a782a737c51f8c091a6318aa1734) --- .../accounts/doctype/purchase_invoice/purchase_invoice.json | 4 ++-- erpnext/accounts/doctype/sales_invoice/sales_invoice.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json index 6b21ec5b678..0584b6026a7 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json @@ -1623,7 +1623,7 @@ { "default": "1", "depends_on": "eval: doc.is_return && doc.return_against", - "description": "Debit Note will update it's own outstanding amount, even if \"Return Against\" is specified.", + "description": "Debit Note will update it's own outstanding amount, even if 'Return Against' is specified.", "fieldname": "update_outstanding_for_self", "fieldtype": "Check", "label": "Update Outstanding for Self" @@ -1633,7 +1633,7 @@ "idx": 204, "is_submittable": 1, "links": [], - "modified": "2024-10-25 18:13:01.944477", + "modified": "2025-01-14 11:39:04.564610", "modified_by": "Administrator", "module": "Accounts", "name": "Purchase Invoice", diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json index cb861e68cdc..4c6d9a85aa1 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json @@ -2161,7 +2161,7 @@ { "default": "1", "depends_on": "eval: doc.is_return && doc.return_against", - "description": "Credit Note will update it's own outstanding amount, even if \"Return Against\" is specified.", + "description": "Credit Note will update it's own outstanding amount, even if 'Return Against' is specified.", "fieldname": "update_outstanding_for_self", "fieldtype": "Check", "label": "Update Outstanding for Self", @@ -2186,7 +2186,7 @@ "link_fieldname": "consolidated_invoice" } ], - "modified": "2024-11-26 12:34:09.110690", + "modified": "2025-01-14 11:38:30.446370", "modified_by": "Administrator", "module": "Accounts", "name": "Sales Invoice", From 2f2554e9e55c8ab8c758800dc2dc75ab4246ef78 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Mon, 13 Jan 2025 16:34:08 +0530 Subject: [PATCH 0882/1614] fix: auto fetch batch and serial no for draft stock transactions (cherry picked from commit 88ab9be79c5e094769645b142e71c6e5a2241409) # Conflicts: # erpnext/stock/get_item_details.py --- erpnext/controllers/accounts_controller.py | 9 +- erpnext/public/js/controllers/transaction.js | 2 + erpnext/stock/doctype/batch/batch.py | 9 +- .../delivery_note/test_delivery_note.py | 71 ++++++++++++ erpnext/stock/get_item_details.py | 104 ++++++++++++++++++ 5 files changed, 191 insertions(+), 4 deletions(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 19df2d0489c..7074710dfee 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -777,7 +777,14 @@ class AccountsController(TransactionBase): ret = get_item_details(args, self, for_validate=for_validate, overwrite_warehouse=False) for fieldname, value in ret.items(): if item.meta.get_field(fieldname) and value is not None: - if item.get(fieldname) is None or fieldname in force_item_fields: + if ( + item.get(fieldname) is None + or fieldname in force_item_fields + or ( + fieldname in ["serial_no", "batch_no"] + and item.get("use_serial_batch_fields") + ) + ): item.set(fieldname, value) elif fieldname in ["cost_center", "conversion_factor"] and not item.get( diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index fb43cb46860..d63461c23e0 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -579,6 +579,8 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe child_doctype: item.doctype, child_docname: item.name, is_old_subcontracting_flow: me.frm.doc.is_old_subcontracting_flow, + use_serial_batch_fields: item.use_serial_batch_fields, + serial_and_batch_bundle: item.serial_and_batch_bundle, } }, diff --git a/erpnext/stock/doctype/batch/batch.py b/erpnext/stock/doctype/batch/batch.py index 5d71ca06cb4..3882e5b2424 100644 --- a/erpnext/stock/doctype/batch/batch.py +++ b/erpnext/stock/doctype/batch/batch.py @@ -2,7 +2,7 @@ # License: GNU General Public License v3. See license.txt -from collections import defaultdict +from collections import OrderedDict, defaultdict import frappe from frappe import _ @@ -449,11 +449,14 @@ def get_available_batches(kwargs): get_auto_batch_nos, ) - batchwise_qty = defaultdict(float) + batchwise_qty = OrderedDict() batches = get_auto_batch_nos(kwargs) for batch in batches: - batchwise_qty[batch.get("batch_no")] += batch.get("qty") + if batch.get("batch_no") not in batchwise_qty: + batchwise_qty[batch.get("batch_no")] = batch.get("qty") + else: + batchwise_qty[batch.get("batch_no")] += batch.get("qty") return batchwise_qty diff --git a/erpnext/stock/doctype/delivery_note/test_delivery_note.py b/erpnext/stock/doctype/delivery_note/test_delivery_note.py index 9acdce8bebc..667710fee1b 100644 --- a/erpnext/stock/doctype/delivery_note/test_delivery_note.py +++ b/erpnext/stock/doctype/delivery_note/test_delivery_note.py @@ -2339,6 +2339,77 @@ class TestDeliveryNote(FrappeTestCase): for d in bundle_data: self.assertEqual(d.incoming_rate, serial_no_valuation[d.serial_no]) + def test_auto_set_serial_batch_for_draft_dn(self): + frappe.db.set_single_value("Stock Settings", "auto_create_serial_and_batch_bundle_for_outward", 1) + frappe.db.set_single_value("Stock Settings", "pick_serial_and_batch_based_on", "FIFO") + + batch_item = make_item( + "_Test Auto Set Serial Batch Draft DN", + properties={ + "has_batch_no": 1, + "create_new_batch": 1, + "is_stock_item": 1, + "batch_number_series": "TAS-BASD-.#####", + }, + ) + + serial_item = make_item( + "_Test Auto Set Serial Batch Draft DN Serial Item", + properties={"has_serial_no": 1, "is_stock_item": 1, "serial_no_series": "TAS-SASD-.#####"}, + ) + + batch_serial_item = make_item( + "_Test Auto Set Serial Batch Draft DN Batch Serial Item", + properties={ + "has_batch_no": 1, + "has_serial_no": 1, + "is_stock_item": 1, + "create_new_batch": 1, + "batch_number_series": "TAS-BSD-.#####", + "serial_no_series": "TAS-SSD-.#####", + }, + ) + + for item in [batch_item, serial_item, batch_serial_item]: + make_stock_entry(item_code=item.name, target="_Test Warehouse - _TC", qty=5, basic_rate=100) + + dn = create_delivery_note( + item_code=batch_item, + qty=5, + rate=500, + use_serial_batch_fields=1, + do_not_submit=True, + ) + + for item in [serial_item, batch_serial_item]: + dn.append( + "items", + { + "item_code": item.name, + "qty": 5, + "rate": 500, + "base_rate": 500, + "item_name": item.name, + "uom": "Nos", + "stock_uom": "Nos", + "conversion_factor": 1, + "warehouse": dn.items[0].warehouse, + "use_serial_batch_fields": 1, + }, + ) + + dn.save() + for row in dn.items: + if row.item_code == batch_item.name: + self.assertTrue(row.batch_no) + + if row.item_code == serial_item.name: + self.assertTrue(row.serial_no) + + if row.item_code == batch_serial_item.name: + self.assertTrue(row.batch_no) + self.assertTrue(row.serial_no) + def create_delivery_note(**args): dn = frappe.new_doc("Delivery Note") diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py index 17a8fe2cb6a..d4415540105 100644 --- a/erpnext/stock/get_item_details.py +++ b/erpnext/stock/get_item_details.py @@ -115,8 +115,20 @@ def get_item_details(args, doc=None, for_validate=False, overwrite_warehouse=Tru out.update(data) +<<<<<<< HEAD if args.transaction_date and item.lead_time_days: out.schedule_date = out.lead_time_date = add_days(args.transaction_date, item.lead_time_days) +======= + if ( + frappe.db.get_single_value("Stock Settings", "auto_create_serial_and_batch_bundle_for_outward") + and not ctx.get("serial_and_batch_bundle") + and (ctx.get("use_serial_batch_fields") or ctx.get("doctype") == "POS Invoice") + ): + update_stock(ctx, out, doc) + + if ctx.transaction_date and item.lead_time_days: + out.schedule_date = out.lead_time_date = add_days(ctx.transaction_date, item.lead_time_days) +>>>>>>> 88ab9be79c (fix: auto fetch batch and serial no for draft stock transactions) if args.get("is_subcontracted"): out.bom = args.get("bom") or get_default_bom(args.item_code) @@ -155,9 +167,101 @@ def set_valuation_rate(out, args): out.update(get_valuation_rate(args.item_code, args.company, out.get("warehouse"))) +<<<<<<< HEAD def update_bin_details(args, out, doc): if args.get("doctype") == "Material Request" and args.get("material_request_type") == "Material Transfer": out.update(get_bin_details(args.item_code, args.get("from_warehouse"))) +======= +def update_stock(ctx, out, doc=None): + from erpnext.stock.doctype.batch.batch import get_available_batches + from erpnext.stock.doctype.serial_no.serial_no import get_serial_nos_for_outward + + if ( + ( + ctx.get("doctype") in ["Delivery Note", "POS Invoice"] + or (ctx.get("doctype") == "Sales Invoice" and ctx.get("update_stock")) + ) + and out.warehouse + and out.stock_qty > 0 + ): + kwargs = frappe._dict( + { + "item_code": ctx.item_code, + "warehouse": ctx.warehouse, + "based_on": frappe.db.get_single_value("Stock Settings", "pick_serial_and_batch_based_on"), + } + ) + + if ctx.get("ignore_serial_nos"): + kwargs["ignore_serial_nos"] = ctx.get("ignore_serial_nos") + + qty = out.stock_qty + batches = [] + if out.has_batch_no and not ctx.get("batch_no"): + batches = get_available_batches(kwargs) + if doc: + filter_batches(batches, doc) + + for batch_no, batch_qty in batches.items(): + if batch_qty >= qty: + out.update({"batch_no": batch_no, "actual_batch_qty": qty}) + break + else: + qty -= batch_qty + + out.update({"batch_no": batch_no, "actual_batch_qty": batch_qty}) + + if out.has_serial_no and out.has_batch_no and has_incorrect_serial_nos(ctx, out): + kwargs["batches"] = [ctx.get("batch_no")] if ctx.get("batch_no") else [out.get("batch_no")] + serial_nos = get_serial_nos_for_outward(kwargs) + serial_nos = get_filtered_serial_nos(serial_nos, doc) + + out["serial_no"] = "\n".join(serial_nos[: cint(out.stock_qty)]) + + elif out.has_serial_no and not ctx.get("serial_no"): + serial_nos = get_serial_nos_for_outward(kwargs) + serial_nos = get_filtered_serial_nos(serial_nos, doc) + + out["serial_no"] = "\n".join(serial_nos[: cint(out.stock_qty)]) + + +def has_incorrect_serial_nos(ctx, out): + from erpnext.stock.doctype.serial_no.serial_no import get_serial_nos + + if not ctx.get("serial_no"): + return True + + serial_nos = get_serial_nos(ctx.get("serial_no")) + if len(serial_nos) != out.get("stock_qty"): + return True + + return False + + +def filter_batches(batches, doc): + for row in doc.get("items"): + if row.get("batch_no") in batches: + batches[row.get("batch_no")] -= row.get("qty") + if batches[row.get("batch_no")] <= 0: + del batches[row.get("batch_no")] + + +def get_filtered_serial_nos(serial_nos, doc): + from erpnext.stock.doctype.serial_no.serial_no import get_serial_nos + + for row in doc.get("items"): + if row.get("serial_no"): + for serial_no in get_serial_nos(row.get("serial_no")): + if serial_no in serial_nos: + serial_nos.remove(serial_no) + + return serial_nos + + +def update_bin_details(ctx: ItemDetailsCtx, out: ItemDetails, doc): + if ctx.doctype == "Material Request" and ctx.material_request_type == "Material Transfer": + out.update(get_bin_details(ctx.item_code, ctx.from_warehouse)) +>>>>>>> 88ab9be79c (fix: auto fetch batch and serial no for draft stock transactions) elif out.get("warehouse"): company = args.company if (doc and doc.get("doctype") == "Purchase Order") else None From 2676e0ea1f7f01d7e89620301f5d1292b95bdc05 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Tue, 14 Jan 2025 12:49:17 +0530 Subject: [PATCH 0883/1614] chore: fix conflicts --- erpnext/stock/get_item_details.py | 43 ++++++++++++------------------- 1 file changed, 16 insertions(+), 27 deletions(-) diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py index d4415540105..32a8bca4186 100644 --- a/erpnext/stock/get_item_details.py +++ b/erpnext/stock/get_item_details.py @@ -115,20 +115,15 @@ def get_item_details(args, doc=None, for_validate=False, overwrite_warehouse=Tru out.update(data) -<<<<<<< HEAD - if args.transaction_date and item.lead_time_days: - out.schedule_date = out.lead_time_date = add_days(args.transaction_date, item.lead_time_days) -======= if ( frappe.db.get_single_value("Stock Settings", "auto_create_serial_and_batch_bundle_for_outward") - and not ctx.get("serial_and_batch_bundle") - and (ctx.get("use_serial_batch_fields") or ctx.get("doctype") == "POS Invoice") + and not args.get("serial_and_batch_bundle") + and (args.get("use_serial_batch_fields") or args.get("doctype") == "POS Invoice") ): - update_stock(ctx, out, doc) - - if ctx.transaction_date and item.lead_time_days: - out.schedule_date = out.lead_time_date = add_days(ctx.transaction_date, item.lead_time_days) ->>>>>>> 88ab9be79c (fix: auto fetch batch and serial no for draft stock transactions) + update_stock(args, out, doc) + + if args.transaction_date and item.lead_time_days: + out.schedule_date = out.lead_time_date = add_days(args.transaction_date, item.lead_time_days) if args.get("is_subcontracted"): out.bom = args.get("bom") or get_default_bom(args.item_code) @@ -167,11 +162,19 @@ def set_valuation_rate(out, args): out.update(get_valuation_rate(args.item_code, args.company, out.get("warehouse"))) -<<<<<<< HEAD def update_bin_details(args, out, doc): if args.get("doctype") == "Material Request" and args.get("material_request_type") == "Material Transfer": out.update(get_bin_details(args.item_code, args.get("from_warehouse"))) -======= + + elif out.get("warehouse"): + company = args.company if (doc and doc.get("doctype") == "Purchase Order") else None + + # calculate company_total_stock only for po + bin_details = get_bin_details(args.item_code, out.warehouse, company, include_child_warehouses=True) + + out.update(bin_details) + + def update_stock(ctx, out, doc=None): from erpnext.stock.doctype.batch.batch import get_available_batches from erpnext.stock.doctype.serial_no.serial_no import get_serial_nos_for_outward @@ -258,20 +261,6 @@ def get_filtered_serial_nos(serial_nos, doc): return serial_nos -def update_bin_details(ctx: ItemDetailsCtx, out: ItemDetails, doc): - if ctx.doctype == "Material Request" and ctx.material_request_type == "Material Transfer": - out.update(get_bin_details(ctx.item_code, ctx.from_warehouse)) ->>>>>>> 88ab9be79c (fix: auto fetch batch and serial no for draft stock transactions) - - elif out.get("warehouse"): - company = args.company if (doc and doc.get("doctype") == "Purchase Order") else None - - # calculate company_total_stock only for po - bin_details = get_bin_details(args.item_code, out.warehouse, company, include_child_warehouses=True) - - out.update(bin_details) - - def process_args(args): if isinstance(args, str): args = json.loads(args) From 36d1fbd6a31f21f17b000ed16a2314fa1119cfe1 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 14 Jan 2025 13:34:12 +0530 Subject: [PATCH 0884/1614] fix: incorrect label in Item-wise sales register (cherry picked from commit d9013e1054466a276b13323bcc48cc7dcd52824c) --- .../report/item_wise_sales_register/item_wise_sales_register.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py b/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py index f7a2e40b4ba..604c0a6569d 100644 --- a/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py +++ b/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py @@ -318,7 +318,7 @@ def get_columns(additional_table_columns, filters): "width": 100, }, { - "label": _("Tax Rate"), + "label": _("Rate"), "fieldname": "rate", "fieldtype": "Float", "options": "currency", From ad9e5d41b25bd83b9100e72be2f31c909adb40f8 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 9 Jan 2025 20:02:59 +0530 Subject: [PATCH 0885/1614] refactor: introduce select fields in company and payment entry (cherry picked from commit 8b2c981fc3241a6cd48663e80089993e02adff76) # Conflicts: # erpnext/accounts/doctype/payment_entry/payment_entry.py --- .../doctype/payment_entry/payment_entry.json | 11 ++- .../doctype/payment_entry/payment_entry.py | 92 +++++++++++++++++++ erpnext/setup/doctype/company/company.json | 10 +- erpnext/setup/doctype/company/company.py | 3 + 4 files changed, 114 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.json b/erpnext/accounts/doctype/payment_entry/payment_entry.json index 69debbec5c7..df9508793a7 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.json +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.json @@ -21,6 +21,7 @@ "party_name", "book_advance_payments_in_separate_party_account", "reconcile_on_advance_payment_date", + "advance_reconciliation_takes_effect_on", "column_break_11", "bank_account", "party_bank_account", @@ -782,6 +783,14 @@ "options": "No\nYes", "print_hide": 1, "search_index": 1 + }, + { + "default": "Oldest Of Invoice Or Advance", + "fetch_from": "company.reconciliation_takes_effect_on", + "fieldname": "advance_reconciliation_takes_effect_on", + "fieldtype": "Select", + "label": "Advance Reconciliation Takes Effect On", + "options": "Advance Payment Date\nOldest Of Invoice Or Advance\nReconciliation Date" } ], "index_web_pages_for_search": 1, @@ -795,7 +804,7 @@ "table_fieldname": "payment_entries" } ], - "modified": "2024-11-07 11:19:19.320883", + "modified": "2025-01-09 20:02:33.402163", "modified_by": "Administrator", "module": "Accounts", "name": "Payment Entry", diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index 7e3d8a5833b..acc0b55b158 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -53,6 +53,98 @@ class InvalidPaymentEntry(ValidationError): class PaymentEntry(AccountsController): +<<<<<<< HEAD +======= + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + from erpnext.accounts.doctype.advance_taxes_and_charges.advance_taxes_and_charges import ( + AdvanceTaxesandCharges, + ) + from erpnext.accounts.doctype.payment_entry_deduction.payment_entry_deduction import ( + PaymentEntryDeduction, + ) + from erpnext.accounts.doctype.payment_entry_reference.payment_entry_reference import ( + PaymentEntryReference, + ) + + advance_reconciliation_takes_effect_on: DF.Literal[ + "Advance Payment Date", "Oldest Of Invoice Or Advance", "Reconciliation Date" + ] + amended_from: DF.Link | None + apply_tax_withholding_amount: DF.Check + auto_repeat: DF.Link | None + bank: DF.ReadOnly | None + bank_account: DF.Link | None + bank_account_no: DF.ReadOnly | None + base_in_words: DF.SmallText | None + base_paid_amount: DF.Currency + base_paid_amount_after_tax: DF.Currency + base_received_amount: DF.Currency + base_received_amount_after_tax: DF.Currency + base_total_allocated_amount: DF.Currency + base_total_taxes_and_charges: DF.Currency + book_advance_payments_in_separate_party_account: DF.Check + clearance_date: DF.Date | None + company: DF.Link + contact_email: DF.Data | None + contact_person: DF.Link | None + cost_center: DF.Link | None + custom_remarks: DF.Check + deductions: DF.Table[PaymentEntryDeduction] + difference_amount: DF.Currency + in_words: DF.SmallText | None + is_opening: DF.Literal["No", "Yes"] + letter_head: DF.Link | None + mode_of_payment: DF.Link | None + naming_series: DF.Literal["ACC-PAY-.YYYY.-"] + paid_amount: DF.Currency + paid_amount_after_tax: DF.Currency + paid_from: DF.Link + paid_from_account_balance: DF.Currency + paid_from_account_currency: DF.Link + paid_from_account_type: DF.Data | None + paid_to: DF.Link + paid_to_account_balance: DF.Currency + paid_to_account_currency: DF.Link + paid_to_account_type: DF.Data | None + party: DF.DynamicLink | None + party_balance: DF.Currency + party_bank_account: DF.Link | None + party_name: DF.Data | None + party_type: DF.Link | None + payment_order: DF.Link | None + payment_order_status: DF.Literal["Initiated", "Payment Ordered"] + payment_type: DF.Literal["Receive", "Pay", "Internal Transfer"] + posting_date: DF.Date + print_heading: DF.Link | None + project: DF.Link | None + purchase_taxes_and_charges_template: DF.Link | None + received_amount: DF.Currency + received_amount_after_tax: DF.Currency + reconcile_on_advance_payment_date: DF.Check + reference_date: DF.Date | None + reference_no: DF.Data | None + references: DF.Table[PaymentEntryReference] + remarks: DF.SmallText | None + sales_taxes_and_charges_template: DF.Link | None + source_exchange_rate: DF.Float + status: DF.Literal["", "Draft", "Submitted", "Cancelled"] + target_exchange_rate: DF.Float + tax_withholding_category: DF.Link | None + taxes: DF.Table[AdvanceTaxesandCharges] + title: DF.Data | None + total_allocated_amount: DF.Currency + total_taxes_and_charges: DF.Currency + unallocated_amount: DF.Currency + # end: auto-generated types + +>>>>>>> 8b2c981fc3 (refactor: introduce select fields in company and payment entry) def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) if not self.is_new(): diff --git a/erpnext/setup/doctype/company/company.json b/erpnext/setup/doctype/company/company.json index 271b440fbda..39fae1fcba1 100644 --- a/erpnext/setup/doctype/company/company.json +++ b/erpnext/setup/doctype/company/company.json @@ -75,6 +75,7 @@ "advance_payments_section", "book_advance_payments_in_separate_party_account", "reconcile_on_advance_payment_date", + "reconciliation_takes_effect_on", "column_break_fwcf", "default_advance_received_account", "default_advance_paid_account", @@ -841,6 +842,13 @@ { "fieldname": "column_break_dcdl", "fieldtype": "Column Break" + }, + { + "default": "Oldest Of Invoice Or Advance", + "fieldname": "reconciliation_takes_effect_on", + "fieldtype": "Select", + "label": "Reconciliation Takes Effect On", + "options": "Advance Payment Date\nOldest Of Invoice Or Advance\nReconciliation Date" } ], "icon": "fa fa-building", @@ -848,7 +856,7 @@ "image_field": "company_logo", "is_tree": 1, "links": [], - "modified": "2024-12-02 15:37:32.723176", + "modified": "2025-01-09 20:01:14.818688", "modified_by": "Administrator", "module": "Setup", "name": "Company", diff --git a/erpnext/setup/doctype/company/company.py b/erpnext/setup/doctype/company/company.py index 27005d99301..8ae843abc24 100644 --- a/erpnext/setup/doctype/company/company.py +++ b/erpnext/setup/doctype/company/company.py @@ -87,6 +87,9 @@ class Company(NestedSet): payment_terms: DF.Link | None phone_no: DF.Data | None reconcile_on_advance_payment_date: DF.Check + reconciliation_takes_effect_on: DF.Literal[ + "Advance Payment Date", "Oldest Of Invoice Or Advance", "Reconciliation Date" + ] registration_details: DF.Code | None rgt: DF.Int round_off_account: DF.Link | None From 55d699ee010c4b1d4a4e5d5d8c863ced4fdb6a59 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 9 Jan 2025 20:05:30 +0530 Subject: [PATCH 0886/1614] refactor: patch to migrate checkbox to select (cherry picked from commit a8a8ac71b62b14617cb19ef8ca2596c77a56fac9) # Conflicts: # erpnext/patches.txt --- erpnext/patches.txt | 6 ++++++ ...kbox_to_select_for_reconciliation_effect.py | 18 ++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 erpnext/patches/v15_0/migrate_checkbox_to_select_for_reconciliation_effect.py diff --git a/erpnext/patches.txt b/erpnext/patches.txt index cfc8be90b4b..c1b626502ac 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -386,4 +386,10 @@ erpnext.patches.v14_0.update_stock_uom_in_work_order_item erpnext.patches.v15_0.set_is_exchange_gain_loss_in_payment_entry_deductions erpnext.patches.v15_0.enable_allow_existing_serial_no erpnext.patches.v15_0.update_cc_in_process_statement_of_accounts +<<<<<<< HEAD erpnext.patches.v15_0.update_asset_status_to_work_in_progress +======= +erpnext.patches.v15_0.refactor_closing_stock_balance #5 +erpnext.patches.v15_0.update_asset_status_to_work_in_progress +erpnext.patches.v15_0.migrate_checkbox_to_select_for_reconciliation_effect +>>>>>>> a8a8ac71b6 (refactor: patch to migrate checkbox to select) diff --git a/erpnext/patches/v15_0/migrate_checkbox_to_select_for_reconciliation_effect.py b/erpnext/patches/v15_0/migrate_checkbox_to_select_for_reconciliation_effect.py new file mode 100644 index 00000000000..883921cfdf8 --- /dev/null +++ b/erpnext/patches/v15_0/migrate_checkbox_to_select_for_reconciliation_effect.py @@ -0,0 +1,18 @@ +import frappe + + +def execute(): + """ + A New select field 'reconciliation_takes_effect_on' has been added to control Advance Payment Reconciliation dates. + Migrate old checkbox configuration to new select field on 'Company' and 'Payment Entry' + """ + companies = frappe.db.get_all("Company", fields=["name", "reconciliation_takes_effect_on"]) + for x in companies: + new_value = ( + "Advance Payment Date" if x.reconcile_on_advance_payment_date else "Oldest Of Invoice Or Advance" + ) + frappe.db.set_value("Company", x.name, "reconciliation_takes_effect_on", new_value) + + frappe.db.sql( + """update `tabPayment Entry` set advance_reconciliation_takes_effect_on = if(reconcile_on_advance_payment_date = 0, 'Oldest Of Invoice Or Advance', 'Advance Payment Date')""" + ) From 34b336ca80d1feafe236fafdc605e55661ba117f Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 9 Jan 2025 20:07:13 +0530 Subject: [PATCH 0887/1614] refactor: test cases updated (cherry picked from commit fb6c72a247432028701048a342cd432ad69730cb) --- .../payment_reconciliation/test_payment_reconciliation.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/payment_reconciliation/test_payment_reconciliation.py b/erpnext/accounts/doctype/payment_reconciliation/test_payment_reconciliation.py index 3f0fb29d671..696398c717d 100644 --- a/erpnext/accounts/doctype/payment_reconciliation/test_payment_reconciliation.py +++ b/erpnext/accounts/doctype/payment_reconciliation/test_payment_reconciliation.py @@ -1671,7 +1671,7 @@ class TestPaymentReconciliation(FrappeTestCase): { "book_advance_payments_in_separate_party_account": 1, "default_advance_paid_account": self.advance_payable_account, - "reconcile_on_advance_payment_date": 1, + "reconciliation_takes_effect_on": "Advance Payment Date", }, ) @@ -1720,7 +1720,7 @@ class TestPaymentReconciliation(FrappeTestCase): { "book_advance_payments_in_separate_party_account": 1, "default_advance_received_account": self.advance_receivable_account, - "reconcile_on_advance_payment_date": 0, + "reconciliation_takes_effect_on": "Oldest Of Invoice Or Advance", }, ) amount = 200.0 @@ -1829,7 +1829,7 @@ class TestPaymentReconciliation(FrappeTestCase): { "book_advance_payments_in_separate_party_account": 1, "default_advance_paid_account": self.advance_payable_account, - "reconcile_on_advance_payment_date": 0, + "reconciliation_takes_effect_on": "Oldest Of Invoice Or Advance", }, ) amount = 200.0 From 74f00bb51b9a40fb8b1b4b3879cd56183c940a19 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 9 Jan 2025 20:09:20 +0530 Subject: [PATCH 0888/1614] refactor: payment entry to handle posting date on configuation (cherry picked from commit bb8d2c994cd445308d7da66f89cca18043cbf793) --- erpnext/accounts/doctype/payment_entry/payment_entry.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index acc0b55b158..48ed975cf37 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -1493,9 +1493,9 @@ class PaymentEntry(AccountsController): "voucher_detail_no": invoice.name, } - if self.reconcile_on_advance_payment_date: + if self.advance_reconciliation_takes_effect_on == "Advance Payment Date": posting_date = self.posting_date - else: + elif self.advance_reconciliation_takes_effect_on == "Oldest Of Invoice Or Advance": date_field = "posting_date" if invoice.reference_doctype in ["Sales Order", "Purchase Order"]: date_field = "transaction_date" @@ -1503,6 +1503,8 @@ class PaymentEntry(AccountsController): if getdate(posting_date) < getdate(self.posting_date): posting_date = self.posting_date + elif self.advance_reconciliation_takes_effect_on == "Reconciliation Date": + posting_date = nowdate() dr_or_cr, account = self.get_dr_and_account_for_advances(invoice) args_dict["account"] = account From be8e1c05200332ce2f6c32ed5f00bca4c748455c Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 9 Jan 2025 20:12:51 +0530 Subject: [PATCH 0889/1614] refactor: hide old checkbox (cherry picked from commit c8e93e7a61ef95ab3735f235784857a2a02ed2a6) --- erpnext/setup/doctype/company/company.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/setup/doctype/company/company.json b/erpnext/setup/doctype/company/company.json index 39fae1fcba1..ae473e15917 100644 --- a/erpnext/setup/doctype/company/company.json +++ b/erpnext/setup/doctype/company/company.json @@ -797,6 +797,7 @@ "description": "If Enabled - Reconciliation happens on the Advance Payment posting date
\nIf Disabled - Reconciliation happens on oldest of 2 Dates: Invoice Date or the Advance Payment posting date
\n", "fieldname": "reconcile_on_advance_payment_date", "fieldtype": "Check", + "hidden": 1, "label": "Reconcile on Advance Payment Date" }, { @@ -856,7 +857,7 @@ "image_field": "company_logo", "is_tree": 1, "links": [], - "modified": "2025-01-09 20:01:14.818688", + "modified": "2025-01-09 20:12:25.471544", "modified_by": "Administrator", "module": "Setup", "name": "Company", From 2cdfa9172583738eb177627ff82b60289c0f6d78 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Fri, 10 Jan 2025 12:17:13 +0530 Subject: [PATCH 0890/1614] test: ensure reconciliation date config takes effect (cherry picked from commit e0517852bc54cac3363388b0cdd73da3ba38ddf8) --- .../test_payment_reconciliation.py | 97 +++++++++++++++++++ 1 file changed, 97 insertions(+) diff --git a/erpnext/accounts/doctype/payment_reconciliation/test_payment_reconciliation.py b/erpnext/accounts/doctype/payment_reconciliation/test_payment_reconciliation.py index 696398c717d..061bbf556fc 100644 --- a/erpnext/accounts/doctype/payment_reconciliation/test_payment_reconciliation.py +++ b/erpnext/accounts/doctype/payment_reconciliation/test_payment_reconciliation.py @@ -6,6 +6,7 @@ import frappe from frappe import qb from frappe.tests.utils import FrappeTestCase, change_settings from frappe.utils import add_days, add_years, flt, getdate, nowdate, today +from frappe.utils.data import getdate as convert_to_date from erpnext import get_default_cost_center from erpnext.accounts.doctype.payment_entry.payment_entry import get_payment_entry @@ -2048,6 +2049,102 @@ class TestPaymentReconciliation(FrappeTestCase): self.assertEqual(pr.get("invoices"), []) self.assertEqual(pr.get("payments"), []) + def test_advance_reconciliation_effect_on_same_date(self): + frappe.db.set_value( + "Company", + self.company, + { + "book_advance_payments_in_separate_party_account": 1, + "default_advance_received_account": self.advance_receivable_account, + "reconciliation_takes_effect_on": "Reconciliation Date", + }, + ) + inv_date = convert_to_date(add_days(nowdate(), -1)) + adv_date = convert_to_date(add_days(nowdate(), -2)) + + si = self.create_sales_invoice(posting_date=inv_date, qty=1, rate=200) + pe = self.create_payment_entry(posting_date=adv_date, amount=80).save().submit() + + pr = self.create_payment_reconciliation() + pr.from_invoice_date = add_days(nowdate(), -1) + pr.to_invoice_date = nowdate() + pr.from_payment_date = add_days(nowdate(), -2) + pr.to_payment_date = nowdate() + pr.default_advance_account = self.advance_receivable_account + + # reconcile multiple payments against invoice + pr.get_unreconciled_entries() + invoices = [x.as_dict() for x in pr.get("invoices")] + payments = [x.as_dict() for x in pr.get("payments")] + pr.allocate_entries(frappe._dict({"invoices": invoices, "payments": payments})) + + # Difference amount should not be calculated for base currency accounts + for row in pr.allocation: + self.assertEqual(flt(row.get("difference_amount")), 0.0) + + pr.reconcile() + + si.reload() + self.assertEqual(si.status, "Partly Paid") + # check PR tool output post reconciliation + self.assertEqual(len(pr.get("invoices")), 1) + self.assertEqual(pr.get("invoices")[0].get("outstanding_amount"), 120) + self.assertEqual(pr.get("payments"), []) + + # Assert Ledger Entries + gl_entries = frappe.db.get_all( + "GL Entry", + filters={"voucher_no": pe.name}, + fields=["account", "posting_date", "voucher_no", "against_voucher", "debit", "credit"], + order_by="account, against_voucher, debit", + ) + + expected_gl = [ + { + "account": self.advance_receivable_account, + "posting_date": adv_date, + "voucher_no": pe.name, + "against_voucher": pe.name, + "debit": 0.0, + "credit": 80.0, + }, + { + "account": self.advance_receivable_account, + "posting_date": convert_to_date(nowdate()), + "voucher_no": pe.name, + "against_voucher": pe.name, + "debit": 80.0, + "credit": 0.0, + }, + { + "account": self.debit_to, + "posting_date": convert_to_date(nowdate()), + "voucher_no": pe.name, + "against_voucher": si.name, + "debit": 0.0, + "credit": 80.0, + }, + { + "account": self.bank, + "posting_date": adv_date, + "voucher_no": pe.name, + "against_voucher": None, + "debit": 80.0, + "credit": 0.0, + }, + ] + + self.assertEqual(expected_gl, gl_entries) + + # cancel PE + pe.reload() + pe.cancel() + pr.get_unreconciled_entries() + # check PR tool output + self.assertEqual(len(pr.get("invoices")), 1) + self.assertEqual(len(pr.get("payments")), 0) + self.assertEqual(pr.get("invoices")[0].get("outstanding_amount"), 200) + def make_customer(customer_name, currency=None): if not frappe.db.exists("Customer", customer_name): From a43852054975f7c2670e86e26927937b74b0cff5 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 13 Jan 2025 15:56:41 +0530 Subject: [PATCH 0891/1614] refactor: store reconciliation date in reference Helps with reposting (cherry picked from commit 7e7775aa44b88fd440d157457e22e59ad9d5a1b0) --- .../payment_entry_reference/payment_entry_reference.json | 9 ++++++++- .../payment_entry_reference/payment_entry_reference.py | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/payment_entry_reference/payment_entry_reference.json b/erpnext/accounts/doctype/payment_entry_reference/payment_entry_reference.json index 361f516b830..57e401275fd 100644 --- a/erpnext/accounts/doctype/payment_entry_reference/payment_entry_reference.json +++ b/erpnext/accounts/doctype/payment_entry_reference/payment_entry_reference.json @@ -13,6 +13,7 @@ "payment_term_outstanding", "account_type", "payment_type", + "reconcile_effect_on", "column_break_4", "total_amount", "outstanding_amount", @@ -144,12 +145,18 @@ "is_virtual": 1, "label": "Payment Request Outstanding", "read_only": 1 + }, + { + "fieldname": "reconcile_effect_on", + "fieldtype": "Date", + "label": "Reconcile Effect On", + "read_only": 1 } ], "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2024-09-16 18:11:50.019343", + "modified": "2025-01-13 15:56:18.895082", "modified_by": "Administrator", "module": "Accounts", "name": "Payment Entry Reference", diff --git a/erpnext/accounts/doctype/payment_entry_reference/payment_entry_reference.py b/erpnext/accounts/doctype/payment_entry_reference/payment_entry_reference.py index 2ac92ba4a84..1d869b92715 100644 --- a/erpnext/accounts/doctype/payment_entry_reference/payment_entry_reference.py +++ b/erpnext/accounts/doctype/payment_entry_reference/payment_entry_reference.py @@ -30,6 +30,7 @@ class PaymentEntryReference(Document): payment_term: DF.Link | None payment_term_outstanding: DF.Float payment_type: DF.Data | None + reconcile_effect_on: DF.Date | None reference_doctype: DF.Link reference_name: DF.DynamicLink total_amount: DF.Float From e7571c1a32b21be1e8094baa82baecc44a108ef2 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 13 Jan 2025 16:20:58 +0530 Subject: [PATCH 0892/1614] refactor: save reconcile effect on reference table (cherry picked from commit a4271aa5d1b4cc6572ecb5ff083fb9b58d3b0468) --- .../doctype/payment_entry/payment_entry.json | 4 +++- .../doctype/payment_entry/payment_entry.py | 14 +------------- erpnext/accounts/utils.py | 16 ++++++++++++++++ 3 files changed, 20 insertions(+), 14 deletions(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.json b/erpnext/accounts/doctype/payment_entry/payment_entry.json index df9508793a7..5f191e4800a 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.json +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.json @@ -789,7 +789,9 @@ "fetch_from": "company.reconciliation_takes_effect_on", "fieldname": "advance_reconciliation_takes_effect_on", "fieldtype": "Select", + "hidden": 1, "label": "Advance Reconciliation Takes Effect On", + "no_copy": 1, "options": "Advance Payment Date\nOldest Of Invoice Or Advance\nReconciliation Date" } ], @@ -804,7 +806,7 @@ "table_fieldname": "payment_entries" } ], - "modified": "2025-01-09 20:02:33.402163", + "modified": "2025-01-13 16:03:47.169699", "modified_by": "Administrator", "module": "Accounts", "name": "Payment Entry", diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index 48ed975cf37..a7a3aeda84b 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -1493,19 +1493,7 @@ class PaymentEntry(AccountsController): "voucher_detail_no": invoice.name, } - if self.advance_reconciliation_takes_effect_on == "Advance Payment Date": - posting_date = self.posting_date - elif self.advance_reconciliation_takes_effect_on == "Oldest Of Invoice Or Advance": - date_field = "posting_date" - if invoice.reference_doctype in ["Sales Order", "Purchase Order"]: - date_field = "transaction_date" - posting_date = frappe.db.get_value(invoice.reference_doctype, invoice.reference_name, date_field) - - if getdate(posting_date) < getdate(self.posting_date): - posting_date = self.posting_date - elif self.advance_reconciliation_takes_effect_on == "Reconciliation Date": - posting_date = nowdate() - + posting_date = invoice.reconcile_effect_on dr_or_cr, account = self.get_dr_and_account_for_advances(invoice) args_dict["account"] = account args_dict[dr_or_cr] = self.calculate_base_allocated_amount_for_reference(invoice) diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py index 51b4ed248ce..bbf911083a9 100644 --- a/erpnext/accounts/utils.py +++ b/erpnext/accounts/utils.py @@ -712,6 +712,22 @@ def update_reference_in_payment_entry( } update_advance_paid = [] + # Update Reconciliation effect date in reference + if payment_entry.advance_reconciliation_takes_effect_on == "Advance Payment Date": + reconcile_on = payment_entry.posting_date + elif payment_entry.advance_reconciliation_takes_effect_on == "Oldest Of Invoice Or Advance": + date_field = "posting_date" + if d.against_voucher_type in ["Sales Order", "Purchase Order"]: + date_field = "transaction_date" + reconcile_on = frappe.db.get_value(d.against_voucher_type, d.against_voucher, date_field) + + if getdate(reconcile_on) < getdate(payment_entry.posting_date): + reconcile_on = payment_entry.posting_date + elif payment_entry.advance_reconciliation_takes_effect_on == "Reconciliation Date": + reconcile_on = nowdate() + + reference_details.update({"reconcile_effect_on": reconcile_on}) + if d.voucher_detail_no: existing_row = payment_entry.get("references", {"name": d["voucher_detail_no"]})[0] From 8f431041f84cc600386087adc69de90a376569f2 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 13 Jan 2025 17:17:18 +0530 Subject: [PATCH 0893/1614] refactor: backwards compatibility (cherry picked from commit 9fa1865cb7864184176e415fb5502d0bf9ed2eaa) --- .../doctype/payment_entry/payment_entry.py | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index a7a3aeda84b..3b8dc5e0ad0 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -1493,7 +1493,27 @@ class PaymentEntry(AccountsController): "voucher_detail_no": invoice.name, } - posting_date = invoice.reconcile_effect_on + if invoice.reconcile_effect_on: + posting_date = invoice.reconcile_effect_on + else: + # For backwards compatibility + # Supporting reposting on payment entries reconciled before select field introduction + if self.advance_reconciliation_takes_effect_on == "Advance Payment Date": + posting_date = self.posting_date + elif self.advance_reconciliation_takes_effect_on == "Oldest Of Invoice Or Advance": + date_field = "posting_date" + if invoice.reference_doctype in ["Sales Order", "Purchase Order"]: + date_field = "transaction_date" + posting_date = frappe.db.get_value( + invoice.reference_doctype, invoice.reference_name, date_field + ) + + if getdate(posting_date) < getdate(self.posting_date): + posting_date = self.posting_date + elif self.advance_reconciliation_takes_effect_on == "Reconciliation Date": + posting_date = nowdate() + frappe.db.set_value("Payment Entry Reference", invoice.name, "reconcile_effect_on", posting_date) + dr_or_cr, account = self.get_dr_and_account_for_advances(invoice) args_dict["account"] = account args_dict[dr_or_cr] = self.calculate_base_allocated_amount_for_reference(invoice) From 18946f84955286b89708860e5e4f9884b87477bf Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 14 Jan 2025 13:52:21 +0530 Subject: [PATCH 0894/1614] refactor: only update `reconcile_effect_on` advance in separate acc (cherry picked from commit 9ee5fcc602f1dae492d06b85220564c889f49c3a) --- erpnext/accounts/utils.py | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py index bbf911083a9..ae90819b409 100644 --- a/erpnext/accounts/utils.py +++ b/erpnext/accounts/utils.py @@ -713,20 +713,21 @@ def update_reference_in_payment_entry( update_advance_paid = [] # Update Reconciliation effect date in reference - if payment_entry.advance_reconciliation_takes_effect_on == "Advance Payment Date": - reconcile_on = payment_entry.posting_date - elif payment_entry.advance_reconciliation_takes_effect_on == "Oldest Of Invoice Or Advance": - date_field = "posting_date" - if d.against_voucher_type in ["Sales Order", "Purchase Order"]: - date_field = "transaction_date" - reconcile_on = frappe.db.get_value(d.against_voucher_type, d.against_voucher, date_field) - - if getdate(reconcile_on) < getdate(payment_entry.posting_date): + if payment_entry.book_advance_payments_in_separate_party_account: + if payment_entry.advance_reconciliation_takes_effect_on == "Advance Payment Date": reconcile_on = payment_entry.posting_date - elif payment_entry.advance_reconciliation_takes_effect_on == "Reconciliation Date": - reconcile_on = nowdate() + elif payment_entry.advance_reconciliation_takes_effect_on == "Oldest Of Invoice Or Advance": + date_field = "posting_date" + if d.against_voucher_type in ["Sales Order", "Purchase Order"]: + date_field = "transaction_date" + reconcile_on = frappe.db.get_value(d.against_voucher_type, d.against_voucher, date_field) - reference_details.update({"reconcile_effect_on": reconcile_on}) + if getdate(reconcile_on) < getdate(payment_entry.posting_date): + reconcile_on = payment_entry.posting_date + elif payment_entry.advance_reconciliation_takes_effect_on == "Reconciliation Date": + reconcile_on = nowdate() + + reference_details.update({"reconcile_effect_on": reconcile_on}) if d.voucher_detail_no: existing_row = payment_entry.get("references", {"name": d["voucher_detail_no"]})[0] From 14d1f67ba9f503bcff0960344565996cc018f280 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 14 Jan 2025 15:24:24 +0530 Subject: [PATCH 0895/1614] chore: resolve conflicts --- .../doctype/payment_entry/payment_entry.py | 92 ------------------- erpnext/patches.txt | 5 - 2 files changed, 97 deletions(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index 3b8dc5e0ad0..d714df0927b 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -53,98 +53,6 @@ class InvalidPaymentEntry(ValidationError): class PaymentEntry(AccountsController): -<<<<<<< HEAD -======= - # begin: auto-generated types - # This code is auto-generated. Do not modify anything in this block. - - from typing import TYPE_CHECKING - - if TYPE_CHECKING: - from frappe.types import DF - - from erpnext.accounts.doctype.advance_taxes_and_charges.advance_taxes_and_charges import ( - AdvanceTaxesandCharges, - ) - from erpnext.accounts.doctype.payment_entry_deduction.payment_entry_deduction import ( - PaymentEntryDeduction, - ) - from erpnext.accounts.doctype.payment_entry_reference.payment_entry_reference import ( - PaymentEntryReference, - ) - - advance_reconciliation_takes_effect_on: DF.Literal[ - "Advance Payment Date", "Oldest Of Invoice Or Advance", "Reconciliation Date" - ] - amended_from: DF.Link | None - apply_tax_withholding_amount: DF.Check - auto_repeat: DF.Link | None - bank: DF.ReadOnly | None - bank_account: DF.Link | None - bank_account_no: DF.ReadOnly | None - base_in_words: DF.SmallText | None - base_paid_amount: DF.Currency - base_paid_amount_after_tax: DF.Currency - base_received_amount: DF.Currency - base_received_amount_after_tax: DF.Currency - base_total_allocated_amount: DF.Currency - base_total_taxes_and_charges: DF.Currency - book_advance_payments_in_separate_party_account: DF.Check - clearance_date: DF.Date | None - company: DF.Link - contact_email: DF.Data | None - contact_person: DF.Link | None - cost_center: DF.Link | None - custom_remarks: DF.Check - deductions: DF.Table[PaymentEntryDeduction] - difference_amount: DF.Currency - in_words: DF.SmallText | None - is_opening: DF.Literal["No", "Yes"] - letter_head: DF.Link | None - mode_of_payment: DF.Link | None - naming_series: DF.Literal["ACC-PAY-.YYYY.-"] - paid_amount: DF.Currency - paid_amount_after_tax: DF.Currency - paid_from: DF.Link - paid_from_account_balance: DF.Currency - paid_from_account_currency: DF.Link - paid_from_account_type: DF.Data | None - paid_to: DF.Link - paid_to_account_balance: DF.Currency - paid_to_account_currency: DF.Link - paid_to_account_type: DF.Data | None - party: DF.DynamicLink | None - party_balance: DF.Currency - party_bank_account: DF.Link | None - party_name: DF.Data | None - party_type: DF.Link | None - payment_order: DF.Link | None - payment_order_status: DF.Literal["Initiated", "Payment Ordered"] - payment_type: DF.Literal["Receive", "Pay", "Internal Transfer"] - posting_date: DF.Date - print_heading: DF.Link | None - project: DF.Link | None - purchase_taxes_and_charges_template: DF.Link | None - received_amount: DF.Currency - received_amount_after_tax: DF.Currency - reconcile_on_advance_payment_date: DF.Check - reference_date: DF.Date | None - reference_no: DF.Data | None - references: DF.Table[PaymentEntryReference] - remarks: DF.SmallText | None - sales_taxes_and_charges_template: DF.Link | None - source_exchange_rate: DF.Float - status: DF.Literal["", "Draft", "Submitted", "Cancelled"] - target_exchange_rate: DF.Float - tax_withholding_category: DF.Link | None - taxes: DF.Table[AdvanceTaxesandCharges] - title: DF.Data | None - total_allocated_amount: DF.Currency - total_taxes_and_charges: DF.Currency - unallocated_amount: DF.Currency - # end: auto-generated types - ->>>>>>> 8b2c981fc3 (refactor: introduce select fields in company and payment entry) def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) if not self.is_new(): diff --git a/erpnext/patches.txt b/erpnext/patches.txt index c1b626502ac..a16f87de0dc 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -386,10 +386,5 @@ erpnext.patches.v14_0.update_stock_uom_in_work_order_item erpnext.patches.v15_0.set_is_exchange_gain_loss_in_payment_entry_deductions erpnext.patches.v15_0.enable_allow_existing_serial_no erpnext.patches.v15_0.update_cc_in_process_statement_of_accounts -<<<<<<< HEAD -erpnext.patches.v15_0.update_asset_status_to_work_in_progress -======= -erpnext.patches.v15_0.refactor_closing_stock_balance #5 erpnext.patches.v15_0.update_asset_status_to_work_in_progress erpnext.patches.v15_0.migrate_checkbox_to_select_for_reconciliation_effect ->>>>>>> a8a8ac71b6 (refactor: patch to migrate checkbox to select) From e1405a5c4f23ed6c011e510b9c537926439f6669 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 14 Jan 2025 16:59:15 +0530 Subject: [PATCH 0896/1614] refactor: allow users to configure interval for Semi-Auto payment reconciliation (#45211) * refactor: configurable interval for reconciliation trigger * refactor: set default value for interval * refactor: configurable queue size * refactor: use patch to setup default cron job * refactor: use 'after_migrate' to setup cron for reconciliation User specified interval will be used * chore: type casting * refactor: use scheduler_event to persist cron * chore: rename field * chore: use configured queue size * chore: remove unwanted field (cherry picked from commit ce9c606f718835a76916ee4bc8634ce0168de34c) --- .../accounts_settings/accounts_settings.json | 30 ++++++++++++++-- .../accounts_settings/accounts_settings.py | 19 ++++++++++ .../process_payment_reconciliation.py | 2 +- erpnext/accounts/utils.py | 35 +++++++++++++++++++ erpnext/hooks.py | 1 - erpnext/patches.txt | 1 + .../v15_0/sync_auto_reconcile_config.py | 26 ++++++++++++++ 7 files changed, 110 insertions(+), 4 deletions(-) create mode 100644 erpnext/patches/v15_0/sync_auto_reconcile_config.py diff --git a/erpnext/accounts/doctype/accounts_settings/accounts_settings.json b/erpnext/accounts/doctype/accounts_settings/accounts_settings.json index e9b383776f3..98007e963ea 100644 --- a/erpnext/accounts/doctype/accounts_settings/accounts_settings.json +++ b/erpnext/accounts/doctype/accounts_settings/accounts_settings.json @@ -40,9 +40,13 @@ "show_payment_schedule_in_print", "currency_exchange_section", "allow_stale", + "column_break_yuug", + "stale_days", "section_break_jpd0", "auto_reconcile_payments", - "stale_days", + "auto_reconciliation_job_trigger", + "reconciliation_queue_size", + "column_break_resa", "invoicing_settings_tab", "accounts_transactions_settings_section", "over_billing_allowance", @@ -489,6 +493,28 @@ "fieldname": "create_pr_in_draft_status", "fieldtype": "Check", "label": "Create in Draft Status" + }, + { + "fieldname": "column_break_yuug", + "fieldtype": "Column Break" + }, + { + "fieldname": "column_break_resa", + "fieldtype": "Column Break" + }, + { + "default": "15", + "description": "Interval should be between 1 to 59 MInutes", + "fieldname": "auto_reconciliation_job_trigger", + "fieldtype": "Int", + "label": "Auto Reconciliation Job Trigger" + }, + { + "default": "5", + "description": "Documents Processed on each trigger. Queue Size should be between 5 and 100", + "fieldname": "reconciliation_queue_size", + "fieldtype": "Int", + "label": "Reconciliation Queue Size" } ], "icon": "icon-cog", @@ -496,7 +522,7 @@ "index_web_pages_for_search": 1, "issingle": 1, "links": [], - "modified": "2024-07-26 06:48:52.714630", + "modified": "2025-01-13 17:38:39.661320", "modified_by": "Administrator", "module": "Accounts", "name": "Accounts Settings", diff --git a/erpnext/accounts/doctype/accounts_settings/accounts_settings.py b/erpnext/accounts/doctype/accounts_settings/accounts_settings.py index 608b3a96f2f..c2dafafc251 100644 --- a/erpnext/accounts/doctype/accounts_settings/accounts_settings.py +++ b/erpnext/accounts/doctype/accounts_settings/accounts_settings.py @@ -10,6 +10,7 @@ from frappe.custom.doctype.property_setter.property_setter import make_property_ from frappe.model.document import Document from frappe.utils import cint +from erpnext.accounts.utils import sync_auto_reconcile_config from erpnext.stock.utils import check_pending_reposting @@ -27,6 +28,7 @@ class AccountsSettings(Document): allow_multi_currency_invoices_against_single_party_account: DF.Check allow_stale: DF.Check auto_reconcile_payments: DF.Check + auto_reconciliation_job_trigger: DF.Int automatically_fetch_payment_terms: DF.Check automatically_process_deferred_accounting_entry: DF.Check book_asset_depreciation_entry_automatically: DF.Check @@ -51,6 +53,7 @@ class AccountsSettings(Document): over_billing_allowance: DF.Currency post_change_gl_entries: DF.Check receivable_payable_remarks_length: DF.Int + reconciliation_queue_size: DF.Int role_allowed_to_over_bill: DF.Link | None round_row_wise_tax: DF.Check show_balance_in_coa: DF.Check @@ -90,6 +93,8 @@ class AccountsSettings(Document): if clear_cache: frappe.clear_cache() + self.validate_and_sync_auto_reconcile_config() + def validate_stale_days(self): if not self.allow_stale and cint(self.stale_days) <= 0: frappe.msgprint( @@ -114,3 +119,17 @@ class AccountsSettings(Document): def validate_pending_reposts(self): if self.acc_frozen_upto: check_pending_reposting(self.acc_frozen_upto) + + def validate_and_sync_auto_reconcile_config(self): + if self.has_value_changed("auto_reconciliation_job_trigger"): + if ( + cint(self.auto_reconciliation_job_trigger) > 0 + and cint(self.auto_reconciliation_job_trigger) < 60 + ): + sync_auto_reconcile_config(self.auto_reconciliation_job_trigger) + else: + frappe.throw(_("Cron Interval should be between 1 and 59 Min")) + + if self.has_value_changed("reconciliation_queue_size"): + if cint(self.reconciliation_queue_size) < 5 or cint(self.reconciliation_queue_size) > 100: + frappe.throw(_("Queue Size should be between 5 and 100")) diff --git a/erpnext/accounts/doctype/process_payment_reconciliation/process_payment_reconciliation.py b/erpnext/accounts/doctype/process_payment_reconciliation/process_payment_reconciliation.py index 35f1e31af34..c4c75913d65 100644 --- a/erpnext/accounts/doctype/process_payment_reconciliation/process_payment_reconciliation.py +++ b/erpnext/accounts/doctype/process_payment_reconciliation/process_payment_reconciliation.py @@ -210,7 +210,7 @@ def trigger_reconciliation_for_queued_docs(): docs_to_trigger = [] unique_filters = set() - queue_size = 5 + queue_size = frappe.db.get_single_value("Accounts Settings", "reconciliation_queue_size") or 5 fields = ["company", "party_type", "party", "receivable_payable_account", "default_advance_account"] diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py index ae90819b409..a7f8581e0f8 100644 --- a/erpnext/accounts/utils.py +++ b/erpnext/accounts/utils.py @@ -2250,3 +2250,38 @@ def run_ledger_health_checks(): doc.general_and_payment_ledger_mismatch = True doc.checked_on = run_date doc.save() + + +def sync_auto_reconcile_config(auto_reconciliation_job_trigger: int = 15): + auto_reconciliation_job_trigger = auto_reconciliation_job_trigger or frappe.db.get_single_value( + "Accounts Settings", "auto_reconciliation_job_trigger" + ) + method = "erpnext.accounts.doctype.process_payment_reconciliation.process_payment_reconciliation.trigger_reconciliation_for_queued_docs" + + sch_event = frappe.get_doc( + "Scheduler Event", {"scheduled_against": "Process Payment Reconciliation", "method": method} + ) + if frappe.db.get_value("Scheduled Job Type", {"method": method}): + frappe.get_doc( + "Scheduled Job Type", + { + "method": method, + }, + ).update( + { + "cron_format": f"0/{auto_reconciliation_job_trigger} * * * *", + "scheduler_event": sch_event.name, + } + ).save() + else: + frappe.get_doc( + { + "doctype": "Scheduled Job Type", + "method": method, + "scheduler_event": sch_event.name, + "cron_format": f"0/{auto_reconciliation_job_trigger} * * * *", + "create_log": True, + "stopped": False, + "frequency": "Cron", + } + ).save() diff --git a/erpnext/hooks.py b/erpnext/hooks.py index 882adec4d51..d5c43f5060d 100644 --- a/erpnext/hooks.py +++ b/erpnext/hooks.py @@ -412,7 +412,6 @@ scheduler_events = { "cron": { "0/15 * * * *": [ "erpnext.manufacturing.doctype.bom_update_log.bom_update_log.resume_bom_cost_update_jobs", - "erpnext.accounts.doctype.process_payment_reconciliation.process_payment_reconciliation.trigger_reconciliation_for_queued_docs", ], "0/30 * * * *": [ "erpnext.utilities.doctype.video.video.update_youtube_data", diff --git a/erpnext/patches.txt b/erpnext/patches.txt index a16f87de0dc..ad8400da318 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -388,3 +388,4 @@ erpnext.patches.v15_0.enable_allow_existing_serial_no erpnext.patches.v15_0.update_cc_in_process_statement_of_accounts erpnext.patches.v15_0.update_asset_status_to_work_in_progress erpnext.patches.v15_0.migrate_checkbox_to_select_for_reconciliation_effect +erpnext.patches.v15_0.sync_auto_reconcile_config diff --git a/erpnext/patches/v15_0/sync_auto_reconcile_config.py b/erpnext/patches/v15_0/sync_auto_reconcile_config.py new file mode 100644 index 00000000000..721364dcaa6 --- /dev/null +++ b/erpnext/patches/v15_0/sync_auto_reconcile_config.py @@ -0,0 +1,26 @@ +import frappe + +from erpnext.accounts.utils import sync_auto_reconcile_config + + +def execute(): + """ + Set default Cron Interval and Queue size + """ + frappe.db.set_single_value("Accounts Settings", "auto_reconciliation_job_trigger", 15) + frappe.db.set_single_value("Accounts Settings", "reconciliation_queue_size", 5) + + # Create Scheduler Event record if it doesn't exist + method = "erpnext.accounts.doctype.process_payment_reconciliation.process_payment_reconciliation.trigger_reconciliation_for_queued_docs" + if not frappe.db.get_all( + "Scheduler Event", {"scheduled_against": "Process Payment Reconciliation", "method": method} + ): + frappe.get_doc( + { + "doctype": "Scheduler Event", + "scheduled_against": "Process Payment Reconciliation", + "method": method, + } + ).save() + + sync_auto_reconcile_config(15) From af21bca2318089bfee543fdf2180e9d55c7f2833 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Tue, 14 Jan 2025 17:15:23 +0530 Subject: [PATCH 0897/1614] fix: linter issue --- erpnext/stock/doctype/delivery_note/test_delivery_note.py | 4 ---- erpnext/stock/get_item_details.py | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/erpnext/stock/doctype/delivery_note/test_delivery_note.py b/erpnext/stock/doctype/delivery_note/test_delivery_note.py index 667710fee1b..b5d5136cb1f 100644 --- a/erpnext/stock/doctype/delivery_note/test_delivery_note.py +++ b/erpnext/stock/doctype/delivery_note/test_delivery_note.py @@ -2406,10 +2406,6 @@ class TestDeliveryNote(FrappeTestCase): if row.item_code == serial_item.name: self.assertTrue(row.serial_no) - if row.item_code == batch_serial_item.name: - self.assertTrue(row.batch_no) - self.assertTrue(row.serial_no) - def create_delivery_note(**args): dn = frappe.new_doc("Delivery Note") diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py index 32a8bca4186..c604c4cd87c 100644 --- a/erpnext/stock/get_item_details.py +++ b/erpnext/stock/get_item_details.py @@ -121,7 +121,7 @@ def get_item_details(args, doc=None, for_validate=False, overwrite_warehouse=Tru and (args.get("use_serial_batch_fields") or args.get("doctype") == "POS Invoice") ): update_stock(args, out, doc) - + if args.transaction_date and item.lead_time_days: out.schedule_date = out.lead_time_date = add_days(args.transaction_date, item.lead_time_days) From 9ee5651848cd46782d8c33d567ffc404ee4f060f Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Tue, 14 Jan 2025 12:36:22 +0530 Subject: [PATCH 0898/1614] fix: incorrect valuation for sales return with different warhouse (cherry picked from commit 3a2e8167597c06523f94f32843668164ab3eaca8) # Conflicts: # erpnext/stock/doctype/delivery_note/test_delivery_note.py --- .../delivery_note/test_delivery_note.py | 77 +++++++++++++++++++ .../serial_and_batch_bundle.py | 41 +++++++--- 2 files changed, 109 insertions(+), 9 deletions(-) diff --git a/erpnext/stock/doctype/delivery_note/test_delivery_note.py b/erpnext/stock/doctype/delivery_note/test_delivery_note.py index b5d5136cb1f..a0d2bce1647 100644 --- a/erpnext/stock/doctype/delivery_note/test_delivery_note.py +++ b/erpnext/stock/doctype/delivery_note/test_delivery_note.py @@ -2406,6 +2406,83 @@ class TestDeliveryNote(FrappeTestCase): if row.item_code == serial_item.name: self.assertTrue(row.serial_no) +<<<<<<< HEAD +======= + if row.item_code == batch_serial_item.name: + self.assertTrue(row.batch_no) + self.assertTrue(row.serial_no) + + def test_delivery_note_return_for_batch_item_with_different_warehouse(self): + from erpnext.stock.doctype.delivery_note.delivery_note import make_sales_return + from erpnext.stock.doctype.warehouse.test_warehouse import create_warehouse + + batch_item = make_item( + "_Test Delivery Note Return Valuation WITH Batch Item", + properties={ + "has_batch_no": 1, + "create_new_batch": 1, + "is_stock_item": 1, + "batch_number_series": "BRTN-DNN-BIW-.#####", + }, + ).name + + batches = [] + for qty, rate in {5: 300}.items(): + se = make_stock_entry( + item_code=batch_item, target="_Test Warehouse - _TC", qty=qty, basic_rate=rate + ) + batches.append(get_batch_from_bundle(se.items[0].serial_and_batch_bundle)) + + warehouse = create_warehouse("Sales Return Test Warehouse 1", company="_Test Company") + + dn = create_delivery_note( + item_code=batch_item, + qty=5, + rate=1000, + use_serial_batch_fields=1, + batch_no=batches[0], + do_not_submit=True, + ) + + self.assertEqual(dn.items[0].warehouse, "_Test Warehouse - _TC") + + dn.save() + dn.submit() + dn.reload() + + batch_no_valuation = defaultdict(float) + + for row in dn.items: + if row.serial_and_batch_bundle: + bundle_data = frappe.get_all( + "Serial and Batch Entry", + filters={"parent": row.serial_and_batch_bundle}, + fields=["incoming_rate", "serial_no", "batch_no"], + ) + + for d in bundle_data: + if d.batch_no: + batch_no_valuation[d.batch_no] = d.incoming_rate + + return_entry = make_sales_return(dn.name) + return_entry.items[0].warehouse = warehouse + + return_entry.save() + return_entry.submit() + return_entry.reload() + + for row in return_entry.items: + self.assertEqual(row.warehouse, warehouse) + bundle_data = frappe.get_all( + "Serial and Batch Entry", + filters={"parent": row.serial_and_batch_bundle}, + fields=["incoming_rate", "batch_no"], + ) + + for d in bundle_data: + self.assertEqual(d.incoming_rate, batch_no_valuation[d.batch_no]) + +>>>>>>> 3a2e816759 (fix: incorrect valuation for sales return with different warhouse) def create_delivery_note(**args): dn = frappe.new_doc("Delivery Note") 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 00076e8ca16..ff29b38a827 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 @@ -251,7 +251,7 @@ class SerialandBatchBundle(Document): return if return_against := self.get_return_against(parent=parent): - self.set_valuation_rate_for_return_entry(return_against, save) + self.set_valuation_rate_for_return_entry(return_against, row, save) elif self.type_of_transaction == "Outward": self.set_incoming_rate_for_outward_transaction( row, save, allow_negative_stock=allow_negative_stock @@ -259,7 +259,7 @@ class SerialandBatchBundle(Document): else: self.set_incoming_rate_for_inward_transaction(row, save) - def set_valuation_rate_for_return_entry(self, return_against, save=False): + def set_valuation_rate_for_return_entry(self, return_against, row, save=False): if valuation_details := self.get_valuation_rate_for_return_entry(return_against): for row in self.entries: if valuation_details: @@ -281,6 +281,9 @@ class SerialandBatchBundle(Document): } ) + elif self.type_of_transaction == "Inward": + self.set_incoming_rate_for_inward_transaction(row, save) + def validate_returned_serial_batch_no(self, return_against, row, original_inv_details): if row.serial_no and row.serial_no not in original_inv_details["serial_nos"]: self.throw_error_message( @@ -297,6 +300,9 @@ class SerialandBatchBundle(Document): ) def get_valuation_rate_for_return_entry(self, return_against): + if not self.voucher_detail_no: + return {} + valuation_details = frappe._dict( { "serial_nos": defaultdict(float), @@ -304,6 +310,29 @@ class SerialandBatchBundle(Document): } ) + field = { + "Sales Invoice": "sales_invoice_item", + "Purchase Invoice": "purchase_invoice_item", + "Delivery Note": "dn_detail", + "Purchase Receipt": "purchase_receipt_item", + }.get(self.voucher_type) + + return_against_voucher_detail_no = frappe.db.get_value( + self.child_table, self.voucher_detail_no, field + ) + + filters = [ + ["Serial and Batch Bundle", "voucher_no", "=", return_against], + ["Serial and Batch Entry", "docstatus", "=", 1], + ["Serial and Batch Bundle", "is_cancelled", "=", 0], + ["Serial and Batch Bundle", "item_code", "=", self.item_code], + ["Serial and Batch Bundle", "voucher_detail_no", "=", return_against_voucher_detail_no], + ] + + if self.voucher_type in ["Purchase Receipt", "Purchase Invoice"]: + # Added to handle rejected warehouse case + filters.append(["Serial and Batch Entry", "warehouse", "=", self.warehouse]) + bundle_data = frappe.get_all( "Serial and Batch Bundle", fields=[ @@ -311,13 +340,7 @@ class SerialandBatchBundle(Document): "`tabSerial and Batch Entry`.`batch_no`", "`tabSerial and Batch Entry`.`incoming_rate`", ], - filters=[ - ["Serial and Batch Bundle", "voucher_no", "=", return_against], - ["Serial and Batch Entry", "docstatus", "=", 1], - ["Serial and Batch Bundle", "is_cancelled", "=", 0], - ["Serial and Batch Bundle", "item_code", "=", self.item_code], - ["Serial and Batch Bundle", "warehouse", "=", self.warehouse], - ], + filters=filters, order_by="`tabSerial and Batch Bundle`.`creation`, `tabSerial and Batch Entry`.`idx`", ) From 1c6fe9da3bb7b55c9042bcb95c8c47c1aad62acd Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Tue, 14 Jan 2025 18:36:27 +0530 Subject: [PATCH 0899/1614] chore: fix conflicts --- erpnext/stock/doctype/delivery_note/test_delivery_note.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/erpnext/stock/doctype/delivery_note/test_delivery_note.py b/erpnext/stock/doctype/delivery_note/test_delivery_note.py index a0d2bce1647..4afaffe6fd4 100644 --- a/erpnext/stock/doctype/delivery_note/test_delivery_note.py +++ b/erpnext/stock/doctype/delivery_note/test_delivery_note.py @@ -2406,12 +2406,6 @@ class TestDeliveryNote(FrappeTestCase): if row.item_code == serial_item.name: self.assertTrue(row.serial_no) -<<<<<<< HEAD -======= - if row.item_code == batch_serial_item.name: - self.assertTrue(row.batch_no) - self.assertTrue(row.serial_no) - def test_delivery_note_return_for_batch_item_with_different_warehouse(self): from erpnext.stock.doctype.delivery_note.delivery_note import make_sales_return from erpnext.stock.doctype.warehouse.test_warehouse import create_warehouse @@ -2482,7 +2476,6 @@ class TestDeliveryNote(FrappeTestCase): for d in bundle_data: self.assertEqual(d.incoming_rate, batch_no_valuation[d.batch_no]) ->>>>>>> 3a2e816759 (fix: incorrect valuation for sales return with different warhouse) def create_delivery_note(**args): dn = frappe.new_doc("Delivery Note") From a27eac1ef648d540bebb0b752b69132664b7153d Mon Sep 17 00:00:00 2001 From: Lakshit Jain <108322669+ljain112@users.noreply.github.com> Date: Wed, 15 Jan 2025 14:52:25 +0530 Subject: [PATCH 0900/1614] fix: use currency defined in plan for subscription invoice (#45104) (cherry picked from commit a4453fb77b458dfde91b5330a798d44024da722f) --- .../doctype/subscription/subscription.py | 4 +-- .../doctype/subscription/test_subscription.py | 28 +++++++++++++++++++ 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/subscription/subscription.py b/erpnext/accounts/doctype/subscription/subscription.py index 9309950cce6..a3bcdc37c30 100644 --- a/erpnext/accounts/doctype/subscription/subscription.py +++ b/erpnext/accounts/doctype/subscription/subscription.py @@ -414,8 +414,8 @@ class Subscription(Document): if frappe.db.get_value("Supplier", self.party, "tax_withholding_category"): invoice.apply_tds = 1 - # Add party currency to invoice - invoice.currency = get_party_account_currency(self.party_type, self.party, self.company) + # Add currency to invoice + invoice.currency = frappe.db.get_value("Subscription Plan", {"name": self.plans[0].plan}, "currency") # Add dimensions in invoice for subscription: accounting_dimensions = get_accounting_dimensions() diff --git a/erpnext/accounts/doctype/subscription/test_subscription.py b/erpnext/accounts/doctype/subscription/test_subscription.py index 8d4ec3dd084..f3e3e9c8862 100644 --- a/erpnext/accounts/doctype/subscription/test_subscription.py +++ b/erpnext/accounts/doctype/subscription/test_subscription.py @@ -470,6 +470,28 @@ class TestSubscription(FrappeTestCase): currency = frappe.db.get_value("Sales Invoice", subscription.invoices[0].name, "currency") self.assertEqual(currency, "USD") + @IntegrationTestCase.change_settings( + "Accounts Settings", + {"allow_multi_currency_invoices_against_single_party_account": 1}, + ) + def test_multi_currency_subscription_with_default_company_currency(self): + party = "Test Subscription Customer Multi Currency" + frappe.db.set_value("Customer", party, "default_currency", "USD") + subscription = create_subscription( + start_date="2018-01-01", + generate_invoice_at="Beginning of the current subscription period", + plans=[{"plan": "_Test Plan Multicurrency", "qty": 1, "currency": "USD"}], + party=party, + ) + + subscription.process(posting_date="2018-01-01") + self.assertEqual(len(subscription.invoices), 1) + self.assertEqual(subscription.status, "Unpaid") + + # Check the currency of the created invoice + currency = frappe.db.get_value("Sales Invoice", subscription.invoices[0].name, "currency") + self.assertEqual(currency, "USD") + def test_subscription_recovery(self): """Test if Subscription recovers when start/end date run out of sync with created invoices.""" subscription = create_subscription( @@ -581,6 +603,12 @@ def create_parties(): customer.append("accounts", {"company": "_Test Company", "account": "_Test Receivable USD - _TC"}) customer.insert() + if not frappe.db.exists("Customer", "_Test Subscription Customer Multi Currency"): + customer = frappe.new_doc("Customer") + customer.customer_name = "Test Subscription Customer Multi Currency" + customer.default_currency = "USD" + customer.insert() + if not frappe.db.exists("Customer", "_Test Subscription Customer John Doe"): customer = frappe.new_doc("Customer") customer.customer_name = "_Test Subscription Customer John Doe" From bb0695a8833ed16b3e7e0a5fd1511c419b6274e2 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Mon, 13 Jan 2025 17:04:15 +0530 Subject: [PATCH 0901/1614] fix: Skip WIP Warehouse transfer (cherry picked from commit bbb5f8056b01f181d3644faed4c1ae2f1da029ee) --- erpnext/manufacturing/doctype/work_order/work_order.js | 7 +++++++ erpnext/manufacturing/doctype/work_order/work_order.py | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/erpnext/manufacturing/doctype/work_order/work_order.js b/erpnext/manufacturing/doctype/work_order/work_order.js index 6da3d803358..9f1726b4d6b 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order.js +++ b/erpnext/manufacturing/doctype/work_order/work_order.js @@ -544,6 +544,13 @@ frappe.ui.form.on("Work Order", { erpnext.work_order.calculate_cost(frm.doc); erpnext.work_order.calculate_total_cost(frm); }, + + skip_transfer: function (frm) { + if (frm.doc.skip_transfer && !frm.doc.from_wip_warehouse) { + frm.set_value("wip_warehouse", null); + frm.refresh_field("wip_warehouse"); + } + }, }); frappe.ui.form.on("Work Order Item", { diff --git a/erpnext/manufacturing/doctype/work_order/work_order.py b/erpnext/manufacturing/doctype/work_order/work_order.py index 9af3403ffa3..d303411b81f 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order.py +++ b/erpnext/manufacturing/doctype/work_order/work_order.py @@ -152,6 +152,7 @@ class WorkOrder(Document): self.validate_sales_order() self.set_default_warehouse() self.validate_warehouse_belongs_to_company() + self.check_wip_warehouse_skip() self.calculate_operating_cost() self.validate_qty() self.validate_transfer_against() @@ -251,6 +252,10 @@ class WorkOrder(Document): if not self.fg_warehouse: self.fg_warehouse = frappe.db.get_single_value("Manufacturing Settings", "default_fg_warehouse") + def check_wip_warehouse_skip(self): + if self.skip_transfer and not self.from_wip_warehouse: + self.wip_warehouse = None + def validate_warehouse_belongs_to_company(self): warehouses = [self.fg_warehouse, self.wip_warehouse] for d in self.get("required_items"): From 8ba42cfbf09fec58f4ac360ecfb8e9cce36933c9 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Tue, 14 Jan 2025 16:27:49 +0530 Subject: [PATCH 0902/1614] fix: tests (cherry picked from commit 09d26a835fa7b34402e9767f50dc8cb7b51bf1fa) --- .../doctype/production_plan/test_production_plan.py | 8 ++++---- .../doctype/work_order/test_work_order.py | 10 +++++++++- erpnext/manufacturing/doctype/work_order/work_order.py | 6 +++++- .../selling/doctype/sales_order/test_sales_order.py | 4 ++-- 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/erpnext/manufacturing/doctype/production_plan/test_production_plan.py b/erpnext/manufacturing/doctype/production_plan/test_production_plan.py index 71d9b59c677..c7228823bed 100644 --- a/erpnext/manufacturing/doctype/production_plan/test_production_plan.py +++ b/erpnext/manufacturing/doctype/production_plan/test_production_plan.py @@ -744,9 +744,9 @@ class TestProductionPlan(FrappeTestCase): """ from erpnext.manufacturing.doctype.work_order.test_work_order import make_wo_order_test_record - make_stock_entry(item_code="_Test Item", target="Work In Progress - _TC", qty=2, basic_rate=100) + make_stock_entry(item_code="_Test Item", target="_Test Warehouse - _TC", qty=2, basic_rate=100) make_stock_entry( - item_code="_Test Item Home Desktop 100", target="Work In Progress - _TC", qty=4, basic_rate=100 + item_code="_Test Item Home Desktop 100", target="_Test Warehouse - _TC", qty=4, basic_rate=100 ) item = "_Test FG Item" @@ -794,10 +794,10 @@ class TestProductionPlan(FrappeTestCase): from erpnext.manufacturing.doctype.work_order.test_work_order import make_wo_order_test_record make_stock_entry( - item_code="Raw Material Item 1", target="Work In Progress - _TC", qty=2, basic_rate=100 + item_code="Raw Material Item 1", target="_Test Warehouse - _TC", qty=2, basic_rate=100 ) make_stock_entry( - item_code="Raw Material Item 2", target="Work In Progress - _TC", qty=2, basic_rate=100 + item_code="Raw Material Item 2", target="_Test Warehouse - _TC", qty=2, basic_rate=100 ) pln = create_production_plan(item_code="Test Production Item 1", skip_getting_mr_items=True) diff --git a/erpnext/manufacturing/doctype/work_order/test_work_order.py b/erpnext/manufacturing/doctype/work_order/test_work_order.py index 86a03e7919c..9834fc93a64 100644 --- a/erpnext/manufacturing/doctype/work_order/test_work_order.py +++ b/erpnext/manufacturing/doctype/work_order/test_work_order.py @@ -714,7 +714,12 @@ class TestWorkOrder(FrappeTestCase): self.assertEqual(row.item_code, fg_item) work_order = make_wo_order_test_record( - item=fg_item, skip_transfer=True, planned_start_date=now(), qty=30, do_not_save=True + item=fg_item, + skip_transfer=True, + planned_start_date=now(), + qty=30, + do_not_save=True, + source_warehouse="_Test Warehouse - _TC", ) work_order.batch_size = 10 work_order.insert() @@ -931,11 +936,13 @@ class TestWorkOrder(FrappeTestCase): wip_warehouse=wip_warehouse, qty=qty, skip_transfer=1, + source_warehouse=wip_warehouse, stock_uom=fg_item_non_whole.stock_uom, ) se = frappe.get_doc(make_stock_entry(wo.name, "Material Transfer for Manufacture", qty)) se.get("items")[0].s_warehouse = "Stores - _TC" + se.get("items")[0].t_warehouse = wip_warehouse se.insert() se.submit() @@ -2045,6 +2052,7 @@ class TestWorkOrder(FrappeTestCase): bom_no=bom_doc.name, qty=1, skip_transfer=1, + source_warehouse="_Test Warehouse - _TC", ) job_cards = frappe.get_all("Job Card", filters={"work_order": wo.name}) diff --git a/erpnext/manufacturing/doctype/work_order/work_order.py b/erpnext/manufacturing/doctype/work_order/work_order.py index d303411b81f..8a324cf7acb 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order.py +++ b/erpnext/manufacturing/doctype/work_order/work_order.py @@ -1426,7 +1426,11 @@ def make_stock_entry(work_order_id, purpose, qty=None, target_warehouse=None): stock_entry.to_warehouse = wip_warehouse stock_entry.project = work_order.project else: - stock_entry.from_warehouse = wip_warehouse + stock_entry.from_warehouse = ( + work_order.source_warehouse + if work_order.skip_transfer and not work_order.from_wip_warehouse + else wip_warehouse + ) stock_entry.to_warehouse = work_order.fg_warehouse stock_entry.project = work_order.project diff --git a/erpnext/selling/doctype/sales_order/test_sales_order.py b/erpnext/selling/doctype/sales_order/test_sales_order.py index 244a6b1ddad..47d42b0a9d5 100644 --- a/erpnext/selling/doctype/sales_order/test_sales_order.py +++ b/erpnext/selling/doctype/sales_order/test_sales_order.py @@ -1687,13 +1687,13 @@ class TestSalesOrder(AccountsTestMixin, FrappeTestCase): wo.submit() make_stock_entry( item_code="_Test Item", - target="Work In Progress - _TC", + target="_Test Warehouse - _TC", qty=4, basic_rate=100, # Stock RM ) make_stock_entry( item_code="_Test Item Home Desktop 100", # Stock RM - target="Work In Progress - _TC", + target="_Test Warehouse - _TC", qty=4, basic_rate=100, ) From 4e1d4005d9da724139900710d3de411b35e138ec Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Wed, 15 Jan 2025 13:49:11 +0530 Subject: [PATCH 0903/1614] test: Added new test to check wip skip (cherry picked from commit 6edb454eeaec19d2b83455cd01d3b102e58a1290) --- .../doctype/work_order/test_work_order.py | 31 +++++++++++++++++++ .../doctype/work_order/work_order.js | 7 ----- 2 files changed, 31 insertions(+), 7 deletions(-) diff --git a/erpnext/manufacturing/doctype/work_order/test_work_order.py b/erpnext/manufacturing/doctype/work_order/test_work_order.py index 9834fc93a64..9f18763acf3 100644 --- a/erpnext/manufacturing/doctype/work_order/test_work_order.py +++ b/erpnext/manufacturing/doctype/work_order/test_work_order.py @@ -2459,6 +2459,37 @@ class TestWorkOrder(FrappeTestCase): frappe.db.set_single_value("Manufacturing Settings", "validate_components_quantities_per_bom", 0) + def test_wip_skip(self): + wo = make_wo_order_test_record( + item="_Test FG Item", + qty=10, + source_warehouse="_Test Warehouse - _TC", + wip_warehouse="Stores - _TC", + ) + manufacture_entry = frappe.get_doc(make_stock_entry(wo.name, "Manufacture", 10)) + self.assertEqual(manufacture_entry.items[0].s_warehouse, "Stores - _TC") + + wo = make_wo_order_test_record( + item="_Test FG Item", + qty=10, + source_warehouse="_Test Warehouse - _TC", + wip_warehouse="Stores - _TC", + skip_transfer=1, + ) + manufacture_entry = frappe.get_doc(make_stock_entry(wo.name, "Manufacture", 10)) + self.assertEqual(manufacture_entry.items[0].s_warehouse, "_Test Warehouse - _TC") + + wo = make_wo_order_test_record( + item="_Test FG Item", + qty=10, + source_warehouse="_Test Warehouse - _TC", + wip_warehouse="Stores - _TC", + skip_transfer=1, + from_wip_warehouse=1, + ) + manufacture_entry = frappe.get_doc(make_stock_entry(wo.name, "Manufacture", 10)) + self.assertEqual(manufacture_entry.items[0].s_warehouse, "Stores - _TC") + def make_operation(**kwargs): kwargs = frappe._dict(kwargs) diff --git a/erpnext/manufacturing/doctype/work_order/work_order.js b/erpnext/manufacturing/doctype/work_order/work_order.js index 9f1726b4d6b..6da3d803358 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order.js +++ b/erpnext/manufacturing/doctype/work_order/work_order.js @@ -544,13 +544,6 @@ frappe.ui.form.on("Work Order", { erpnext.work_order.calculate_cost(frm.doc); erpnext.work_order.calculate_total_cost(frm); }, - - skip_transfer: function (frm) { - if (frm.doc.skip_transfer && !frm.doc.from_wip_warehouse) { - frm.set_value("wip_warehouse", null); - frm.refresh_field("wip_warehouse"); - } - }, }); frappe.ui.form.on("Work Order Item", { From ade8799358896043fdd77869dd03b0c90f45c536 Mon Sep 17 00:00:00 2001 From: Lakshit Jain <108322669+ljain112@users.noreply.github.com> Date: Wed, 15 Jan 2025 15:31:56 +0530 Subject: [PATCH 0904/1614] fix: check if tds deducted based on Purchase Taxes and Charges (#45161) (cherry picked from commit 37a5767be5aa120dc61d8d9e3965e3ae1866f05c) --- .../tax_withholding_category.py | 16 ++++++ .../test_tax_withholding_category.py | 53 +++++++++++++++++++ 2 files changed, 69 insertions(+) diff --git a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py index 325fefed804..ace139ce15a 100644 --- a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py +++ b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py @@ -302,6 +302,10 @@ def get_tax_amount(party_type, parties, inv, tax_details, posting_date, pan_no=N tax_amount = 0 if party_type == "Supplier": + # if tds account is changed. + if not tax_deducted: + tax_deducted = is_tax_deducted_on_the_basis_of_inv(vouchers) + ldc = get_lower_deduction_certificate(inv.company, posting_date, tax_details, pan_no) if tax_deducted: net_total = inv.tax_withholding_net_total @@ -336,6 +340,18 @@ def get_tax_amount(party_type, parties, inv, tax_details, posting_date, pan_no=N return tax_amount, tax_deducted, tax_deducted_on_advances, voucher_wise_amount +def is_tax_deducted_on_the_basis_of_inv(vouchers): + return frappe.db.exists( + "Purchase Taxes and Charges", + { + "parent": ["in", vouchers], + "is_tax_withholding_account": 1, + "parenttype": "Purchase Invoice", + "base_tax_amount_after_discount_amount": [">", 0], + }, + ) + + def get_invoice_vouchers(parties, tax_details, company, party_type="Supplier"): doctype = "Purchase Invoice" if party_type == "Supplier" else "Sales Invoice" field = ( diff --git a/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py b/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py index f9f34380d55..f2ebfc60cd7 100644 --- a/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py +++ b/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py @@ -61,6 +61,49 @@ class TestTaxWithholdingCategory(FrappeTestCase): for d in reversed(invoices): d.cancel() + def test_tds_with_account_changed(self): + frappe.db.set_value( + "Supplier", "Test TDS Supplier", "tax_withholding_category", "Multi Account TDS Category" + ) + invoices = [] + + # create invoices for lower than single threshold tax rate + for _ in range(2): + pi = create_purchase_invoice(supplier="Test TDS Supplier") + pi.submit() + invoices.append(pi) + + # create another invoice whose total when added to previously created invoice, + # surpasses cumulative threshhold + pi = create_purchase_invoice(supplier="Test TDS Supplier") + pi.submit() + + # assert equal tax deduction on total invoice amount until now + self.assertEqual(pi.taxes_and_charges_deducted, 3000) + self.assertEqual(pi.grand_total, 7000) + invoices.append(pi) + + # account changed + + frappe.db.set_value( + "Tax Withholding Account", + {"parent": "Multi Account TDS Category"}, + "account", + "_Test Account VAT - _TC", + ) + + # TDS should be on invoice only even though account is changed + pi = create_purchase_invoice(supplier="Test TDS Supplier", rate=5000) + pi.submit() + + # assert equal tax deduction on total invoice amount until now + self.assertEqual(pi.taxes_and_charges_deducted, 500) + invoices.append(pi) + + # delete invoices to avoid clashing + for d in reversed(invoices): + d.cancel() + def test_single_threshold_tds(self): invoices = [] frappe.db.set_value( @@ -1061,6 +1104,16 @@ def create_tax_withholding_category_records(): consider_party_ledger_amount=1, ) + create_tax_withholding_category( + category_name="Multi Account TDS Category", + rate=10, + from_date=from_date, + to_date=to_date, + account="TDS - _TC", + single_threshold=0, + cumulative_threshold=30000, + ) + def create_tax_withholding_category( category_name, From bdaf3761c064150f8705a61234261d01c00788b6 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Wed, 15 Jan 2025 15:39:48 +0530 Subject: [PATCH 0905/1614] fix: conflict --- erpnext/accounts/doctype/subscription/test_subscription.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/subscription/test_subscription.py b/erpnext/accounts/doctype/subscription/test_subscription.py index f3e3e9c8862..b1e5653e8da 100644 --- a/erpnext/accounts/doctype/subscription/test_subscription.py +++ b/erpnext/accounts/doctype/subscription/test_subscription.py @@ -3,7 +3,7 @@ import frappe -from frappe.tests.utils import FrappeTestCase +from frappe.tests.utils import FrappeTestCase, change_settings from frappe.utils.data import ( add_days, add_months, @@ -470,7 +470,7 @@ class TestSubscription(FrappeTestCase): currency = frappe.db.get_value("Sales Invoice", subscription.invoices[0].name, "currency") self.assertEqual(currency, "USD") - @IntegrationTestCase.change_settings( + @change_settings( "Accounts Settings", {"allow_multi_currency_invoices_against_single_party_account": 1}, ) From f5667f56e41a023b5e9b9e6ed26570314e2bc907 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Wed, 15 Jan 2025 16:20:17 +0530 Subject: [PATCH 0906/1614] fix: test case --- .../doctype/job_card/test_job_card.py | 1 + .../doctype/work_order/test_work_order.py | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/erpnext/manufacturing/doctype/job_card/test_job_card.py b/erpnext/manufacturing/doctype/job_card/test_job_card.py index b0644b4e8d2..d6d3775111d 100644 --- a/erpnext/manufacturing/doctype/job_card/test_job_card.py +++ b/erpnext/manufacturing/doctype/job_card/test_job_card.py @@ -522,6 +522,7 @@ class TestJobCard(FrappeTestCase): production_item=item_code, bom_no=bom_doc.name, skip_transfer=1, + from_wip_warehouse=1, wip_warehouse=warehouse, source_warehouse=warehouse, ) diff --git a/erpnext/manufacturing/doctype/work_order/test_work_order.py b/erpnext/manufacturing/doctype/work_order/test_work_order.py index 9f18763acf3..307981f4294 100644 --- a/erpnext/manufacturing/doctype/work_order/test_work_order.py +++ b/erpnext/manufacturing/doctype/work_order/test_work_order.py @@ -1014,7 +1014,12 @@ class TestWorkOrder(FrappeTestCase): bom.submit() wo_order = make_wo_order_test_record( - item=item, company=company, planned_start_date=now(), qty=20, skip_transfer=1 + item=item, + company=company, + planned_start_date=now(), + qty=20, + skip_transfer=1, + from_wip_warehouse=1, ) job_card = frappe.db.get_value("Job Card", {"work_order": wo_order.name}, "name") update_job_card(job_card) @@ -1026,7 +1031,12 @@ class TestWorkOrder(FrappeTestCase): # Partial Job Card 1 with qty 10 wo_order = make_wo_order_test_record( - item=item, company=company, planned_start_date=add_days(now(), 60), qty=20, skip_transfer=1 + item=item, + company=company, + planned_start_date=add_days(now(), 60), + qty=20, + skip_transfer=1, + from_wip_warehouse=1, ) job_card = frappe.db.get_value("Job Card", {"work_order": wo_order.name}, "name") update_job_card(job_card, 10, 1) @@ -2052,6 +2062,7 @@ class TestWorkOrder(FrappeTestCase): bom_no=bom_doc.name, qty=1, skip_transfer=1, + from_wip_warehouse=1, source_warehouse="_Test Warehouse - _TC", ) From d1fee96f75efedd45024e4d6d581c9c3f687594a Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Wed, 15 Jan 2025 12:28:46 +0000 Subject: [PATCH 0907/1614] chore(release): Bumped to Version 15.48.4 ## [15.48.4](https://github.com/frappe/erpnext/compare/v15.48.3...v15.48.4) (2025-01-15) ### Bug Fixes * auto fetch batch and serial no for draft stock transactions ([2f2554e](https://github.com/frappe/erpnext/commit/2f2554e9e55c8ab8c758800dc2dc75ab4246ef78)) * batch number search on pos ([#45209](https://github.com/frappe/erpnext/issues/45209)) ([fe5c458](https://github.com/frappe/erpnext/commit/fe5c458c4525915939369466bac222aa6b9bbd54)) * change string to be able to translate ([#45090](https://github.com/frappe/erpnext/issues/45090)) ([7a3687c](https://github.com/frappe/erpnext/commit/7a3687ca8e0e674a107893356d70a159e0ffe12d)) * deduct tds on excess amount if checked ([07c3605](https://github.com/frappe/erpnext/commit/07c3605905d9490dd890645a1872e47eb3edd631)) * delivery_document_no column issue ([0df1808](https://github.com/frappe/erpnext/commit/0df18080c7277bb773134f7fbcfab0fb0c6a1ba4)) * do not add ordered items from Quotation to new Sales Order ([f414fa4](https://github.com/frappe/erpnext/commit/f414fa4981da572d1ef07d44b2aba006c2d03c81)) * don't create invoice if invoice start date is in future ([3f6d774](https://github.com/frappe/erpnext/commit/3f6d7741d9c939c5242de26256b138c711e65680)) * incorrect label in Item-wise sales register ([36d1fbd](https://github.com/frappe/erpnext/commit/36d1fbd6a31f21f17b000ed16a2314fa1119cfe1)) * incorrect valuation for sales return with different warhouse ([9ee5651](https://github.com/frappe/erpnext/commit/9ee5651848cd46782d8c33d567ffc404ee4f060f)) * incorrect valuation rate for PI based revaluation ([f7e3854](https://github.com/frappe/erpnext/commit/f7e3854641246a16d33f1699c450fc975ddc8ba4)) * linter issue ([af21bca](https://github.com/frappe/erpnext/commit/af21bca2318089bfee543fdf2180e9d55c7f2833)) * minor update for readability ([abfcfdf](https://github.com/frappe/erpnext/commit/abfcfdfe7e9ba2782fe035f0f7e0a3a73f5cac0e)) * not able to see create Quality Inspection button ([a79cae1](https://github.com/frappe/erpnext/commit/a79cae1fefb31e85b59bc2993ef5497d1e2bab31)) * pass right existing address ([80e6112](https://github.com/frappe/erpnext/commit/80e6112549e4464c8d736c385113966672109359)) * precision loss causing process loss variance ([d84601b](https://github.com/frappe/erpnext/commit/d84601b2a3a96be811c6360e869b0864857c5fb7)) * Semgrep rules ([1d5a73a](https://github.com/frappe/erpnext/commit/1d5a73a325b5d3c7c2cd7660ec066e3cf95f32e4)) * set billing and shipping address on change of company ([42eb88f](https://github.com/frappe/erpnext/commit/42eb88f5f60ddb556ba7582d253b75abbd601c6e)) * Skip WIP Warehouse transfer ([bb0695a](https://github.com/frappe/erpnext/commit/bb0695a8833ed16b3e7e0a5fd1511c419b6274e2)) * test case ([f5667f5](https://github.com/frappe/erpnext/commit/f5667f56e41a023b5e9b9e6ed26570314e2bc907)) * test case ([7d66e4e](https://github.com/frappe/erpnext/commit/7d66e4efb0bdb7c109347ea7504b09f08858bfcb)) * tests ([8ba42cf](https://github.com/frappe/erpnext/commit/8ba42cfbf09fec58f4ac360ecfb8e9cce36933c9)) * timeout error for work order ([122b966](https://github.com/frappe/erpnext/commit/122b966a7b78f78e1cd1a645824f33c0d5d797ff)) * **Timesheet:** ignore permissions when updating Task and Project (backport [#45168](https://github.com/frappe/erpnext/issues/45168)) ([#45170](https://github.com/frappe/erpnext/issues/45170)) ([f7448c6](https://github.com/frappe/erpnext/commit/f7448c6f793148e3f197cbef4d0ada6d0e9d2bc6)) * typo in manufacturing settings (backport [#45190](https://github.com/frappe/erpnext/issues/45190)) ([#45193](https://github.com/frappe/erpnext/issues/45193)) ([47c6e5a](https://github.com/frappe/erpnext/commit/47c6e5a931c8f16198f4be76a1ca1f97323857f3)) * update discounting on mixed conditions ([38cb5a9](https://github.com/frappe/erpnext/commit/38cb5a98bfb7cd85f09f9363c6fbfe823c253a28)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index d08d8de1832..98fb6684f2d 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.48.3" +__version__ = "15.48.4" def get_default_company(user=None): From d956051e69d441797ef08ebb193b70c167f2556e Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Wed, 15 Jan 2025 16:12:51 +0530 Subject: [PATCH 0908/1614] fix: status of the serial no for the raw materials (cherry picked from commit 9607b16dcf38088cb8e499992b617834e97251e6) # Conflicts: # erpnext/stock/doctype/serial_no/serial_no.json --- .../doctype/work_order/test_work_order.py | 47 +++++++++++++++++++ .../stock/doctype/serial_no/serial_no.json | 6 ++- erpnext/stock/doctype/serial_no/serial_no.py | 2 +- .../doctype/stock_entry/test_stock_entry.py | 2 +- erpnext/stock/serial_batch_bundle.py | 9 ++++ erpnext/stock/stock_ledger.py | 5 +- 6 files changed, 64 insertions(+), 7 deletions(-) diff --git a/erpnext/manufacturing/doctype/work_order/test_work_order.py b/erpnext/manufacturing/doctype/work_order/test_work_order.py index 307981f4294..3e67fd08033 100644 --- a/erpnext/manufacturing/doctype/work_order/test_work_order.py +++ b/erpnext/manufacturing/doctype/work_order/test_work_order.py @@ -2501,6 +2501,53 @@ class TestWorkOrder(FrappeTestCase): manufacture_entry = frappe.get_doc(make_stock_entry(wo.name, "Manufacture", 10)) self.assertEqual(manufacture_entry.items[0].s_warehouse, "Stores - _TC") + def test_serial_no_status_for_stock_entry(self): + items = { + "Finished Good Test Item 1": {"is_stock_item": 1}, + "_Test RM Item with Serial No": { + "is_stock_item": 1, + "has_serial_no": 1, + "serial_no_series": "SN-FCG-NO-.####", + }, + } + for item, properties in items.items(): + make_item(item, properties) + + fg_item = "Finished Good Test Item 1" + rec_se = test_stock_entry.make_stock_entry( + item_code="_Test RM Item with Serial No", target="_Test Warehouse - _TC", qty=4, basic_rate=100 + ) + + if not frappe.db.get_value("BOM", {"item": fg_item, "docstatus": 1}): + bom = make_bom( + item=fg_item, + rate=1000, + raw_materials=["_Test RM Item with Serial No"], + do_not_save=True, + ) + bom.rm_cost_as_per = "Price List" # non stock item won't have valuation rate + bom.buying_price_list = "_Test Price List India" + bom.currency = "INR" + bom.save() + + wo = make_wo_order_test_record( + production_item=fg_item, skip_transfer=1, source_warehouse="_Test Warehouse - _TC" + ) + + ste = frappe.get_doc(make_stock_entry(wo.name, "Manufacture", 4)) + ste.items[0].use_serial_batch_fields = 1 + ste.items[0].serial_no = "\n".join( + get_serial_nos_from_bundle(rec_se.items[0].serial_and_batch_bundle) + ) + ste.insert() + ste.submit() + + ste.reload() + serial_nos = get_serial_nos_from_bundle(ste.items[0].serial_and_batch_bundle) + for row in serial_nos: + status = frappe.db.get_value("Serial No", row, "status") + self.assertEqual(status, "Consumed") + def make_operation(**kwargs): kwargs = frappe._dict(kwargs) diff --git a/erpnext/stock/doctype/serial_no/serial_no.json b/erpnext/stock/doctype/serial_no/serial_no.json index 2d7fcac89a0..3ed4289ca96 100644 --- a/erpnext/stock/doctype/serial_no/serial_no.json +++ b/erpnext/stock/doctype/serial_no/serial_no.json @@ -254,7 +254,7 @@ "in_list_view": 1, "in_standard_filter": 1, "label": "Status", - "options": "\nActive\nInactive\nDelivered\nExpired", + "options": "\nActive\nInactive\nConsumed\nDelivered\nExpired", "read_only": 1 }, { @@ -272,7 +272,11 @@ "icon": "fa fa-barcode", "idx": 1, "links": [], +<<<<<<< HEAD "modified": "2023-12-17 10:52:55.767839", +======= + "modified": "2025-01-15 15:22:49.873889", +>>>>>>> 9607b16dcf (fix: status of the serial no for the raw materials) "modified_by": "Administrator", "module": "Stock", "name": "Serial No", diff --git a/erpnext/stock/doctype/serial_no/serial_no.py b/erpnext/stock/doctype/serial_no/serial_no.py index 54f96fb7b10..274ce0f0d9d 100644 --- a/erpnext/stock/doctype/serial_no/serial_no.py +++ b/erpnext/stock/doctype/serial_no/serial_no.py @@ -50,7 +50,7 @@ class SerialNo(StockController): purchase_document_no: DF.Data | None purchase_rate: DF.Float serial_no: DF.Data - status: DF.Literal["", "Active", "Inactive", "Delivered", "Expired"] + status: DF.Literal["", "Active", "Inactive", "Consumed", "Delivered", "Expired"] warehouse: DF.Link | None warranty_expiry_date: DF.Date | None warranty_period: DF.Int diff --git a/erpnext/stock/doctype/stock_entry/test_stock_entry.py b/erpnext/stock/doctype/stock_entry/test_stock_entry.py index 05661d3a83a..fea807264f8 100644 --- a/erpnext/stock/doctype/stock_entry/test_stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/test_stock_entry.py @@ -1802,7 +1802,7 @@ class TestStockEntry(FrappeTestCase): for serial_no in serial_nos: self.assertTrue(frappe.db.exists("Serial No", serial_no)) - self.assertEqual(frappe.db.get_value("Serial No", serial_no, "status"), "Delivered") + self.assertEqual(frappe.db.get_value("Serial No", serial_no, "status"), "Consumed") def test_serial_batch_bundle_type_of_transaction(self): item = make_item( diff --git a/erpnext/stock/serial_batch_bundle.py b/erpnext/stock/serial_batch_bundle.py index c450bf1a086..59c299de352 100644 --- a/erpnext/stock/serial_batch_bundle.py +++ b/erpnext/stock/serial_batch_bundle.py @@ -351,6 +351,15 @@ class SerialBatchBundle: status = "Inactive" if self.sle.actual_qty < 0: status = "Delivered" + if self.sle.voucher_type == "Stock Entry": + purpose = frappe.get_cached_value("Stock Entry", self.sle.voucher_no, "purpose") + if purpose in [ + "Manufacture", + "Material Issue", + "Repack", + "Material Consumption for Manufacture", + ]: + status = "Consumed" sn_table = frappe.qb.DocType("Serial No") diff --git a/erpnext/stock/stock_ledger.py b/erpnext/stock/stock_ledger.py index 37e91080d5d..91d10b3a9ac 100644 --- a/erpnext/stock/stock_ledger.py +++ b/erpnext/stock/stock_ledger.py @@ -622,15 +622,12 @@ class update_entries_after: if sle.dependant_sle_voucher_detail_no: entries_to_fix = self.get_dependent_entries_to_fix(entries_to_fix, sle) - if self.has_stock_reco_with_serial_batch(sle): - break - if self.exceptions: self.raise_exceptions() def has_stock_reco_with_serial_batch(self, sle): if ( - sle.vocher_type == "Stock Reconciliation" + sle.voucher_type == "Stock Reconciliation" and frappe.db.get_value(sle.voucher_type, sle.voucher_no, "set_posting_time") == 1 ): return not (sle.batch_no or sle.serial_no or sle.serial_and_batch_bundle) From e2d711540f6a277a111fde030052131d76351392 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Wed, 15 Jan 2025 18:17:04 +0530 Subject: [PATCH 0909/1614] chore: fix conflicts --- erpnext/stock/doctype/serial_no/serial_no.json | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/erpnext/stock/doctype/serial_no/serial_no.json b/erpnext/stock/doctype/serial_no/serial_no.json index 3ed4289ca96..89c77d46b1e 100644 --- a/erpnext/stock/doctype/serial_no/serial_no.json +++ b/erpnext/stock/doctype/serial_no/serial_no.json @@ -272,11 +272,7 @@ "icon": "fa fa-barcode", "idx": 1, "links": [], -<<<<<<< HEAD - "modified": "2023-12-17 10:52:55.767839", -======= - "modified": "2025-01-15 15:22:49.873889", ->>>>>>> 9607b16dcf (fix: status of the serial no for the raw materials) + "modified": "2025-01-15 16:22:49.873889", "modified_by": "Administrator", "module": "Stock", "name": "Serial No", @@ -320,4 +316,4 @@ "sort_order": "DESC", "states": [], "track_changes": 1 -} \ No newline at end of file +} From d3c9092266180f8b233ea0d93b8616187c0ff28a Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Wed, 15 Jan 2025 18:15:52 +0530 Subject: [PATCH 0910/1614] fix: Does not allow to create Sub-Asseblies of Sub Assemblies (cherry picked from commit 318a945d66307fa1afacf228cb26298ccf739f78) --- .../doctype/bom_creator/bom_creator.py | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/erpnext/manufacturing/doctype/bom_creator/bom_creator.py b/erpnext/manufacturing/doctype/bom_creator/bom_creator.py index 4062235a32e..45407e12fe9 100644 --- a/erpnext/manufacturing/doctype/bom_creator/bom_creator.py +++ b/erpnext/manufacturing/doctype/bom_creator/bom_creator.py @@ -365,12 +365,6 @@ def get_children(doctype=None, parent=None, **kwargs): return frappe.get_all("BOM Creator Item", fields=fields, filters=query_filters, order_by="idx") -def get_parent_row_no(doc, name): - for row in doc.items: - if row.name == name: - return row.idx - - @frappe.whitelist() def add_item(**kwargs): if isinstance(kwargs, str): @@ -418,6 +412,8 @@ def add_sub_assembly(**kwargs): parent_row_no = "" if not kwargs.convert_to_sub_assembly: item_info = get_item_details(bom_item.item_code) + parent_row_no = get_parent_row_no(doc, kwargs.fg_reference_id) + item_row = doc.append( "items", { @@ -426,6 +422,7 @@ def add_sub_assembly(**kwargs): "uom": item_info.stock_uom, "fg_item": kwargs.fg_item, "conversion_factor": 1, + "parent_row_no": parent_row_no, "fg_reference_id": name, "stock_qty": bom_item.qty, "do_not_explode": 1, @@ -437,9 +434,7 @@ def add_sub_assembly(**kwargs): parent_row_no = item_row.idx name = "" else: - parent_row_no = [row.idx for row in doc.items if row.name == kwargs.fg_reference_id] - if parent_row_no: - parent_row_no = parent_row_no[0] + parent_row_no = get_parent_row_no(doc, kwargs.fg_reference_id) for row in bom_item.get("items"): row = frappe._dict(row) @@ -471,6 +466,14 @@ def get_item_details(item_code): ) +def get_parent_row_no(doc, name): + for row in doc.items: + if row.name == name: + return row.idx + + frappe.msgprint(_("Parent Row No not found for {0}").format(name)) + + @frappe.whitelist() def delete_node(**kwargs): if isinstance(kwargs, str): From e965b6ef4584181ab8582901d1cfff6365421cd4 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Fri, 17 Jan 2025 16:35:59 +0530 Subject: [PATCH 0911/1614] fix: sales return for multi-uom (#45303) (cherry picked from commit 9163f6019115c1b3d9c167a9bca91fc7189801d9) --- erpnext/controllers/sales_and_purchase_return.py | 4 ++-- .../serial_and_batch_bundle/serial_and_batch_bundle.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/controllers/sales_and_purchase_return.py b/erpnext/controllers/sales_and_purchase_return.py index 5c8f5a6fbd7..586afdbc53e 100644 --- a/erpnext/controllers/sales_and_purchase_return.py +++ b/erpnext/controllers/sales_and_purchase_return.py @@ -1020,7 +1020,7 @@ def get_serial_and_batch_bundle(field, doctype, reference_ids, is_rejected=False def filter_serial_batches(parent_doc, data, row, warehouse_field=None, qty_field=None): if not qty_field: - qty_field = "qty" + qty_field = "stock_qty" if not warehouse_field: warehouse_field = "warehouse" @@ -1109,7 +1109,7 @@ def make_serial_batch_bundle_for_return(data, child_doc, parent_doc, warehouse_f warehouse_field = "warehouse" if not qty_field: - qty_field = "qty" + qty_field = "stock_qty" warehouse = child_doc.get(warehouse_field) if parent_doc.get("is_internal_customer"): 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 ff29b38a827..21e08ac93b2 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 @@ -350,7 +350,7 @@ class SerialandBatchBundle(Document): for row in bundle_data: if row.serial_no: valuation_details["serial_nos"][row.serial_no] = row.incoming_rate - else: + if row.batch_no: valuation_details["batches"][row.batch_no] = row.incoming_rate return valuation_details From c94430a4722e99b9ab4530872408b5261eda36e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Ei=C3=9Fler?= <77415730+PatrickDEissler@users.noreply.github.com> Date: Fri, 17 Jan 2025 12:17:32 +0100 Subject: [PATCH 0912/1614] fix(Project): re-phrase welcome email (#45175) (cherry picked from commit 8d661428651fa1ce47f5f3b217cfadad47e060a6) --- erpnext/projects/doctype/project/project.py | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/erpnext/projects/doctype/project/project.py b/erpnext/projects/doctype/project/project.py index f1512501e76..ffef99379fd 100644 --- a/erpnext/projects/doctype/project/project.py +++ b/erpnext/projects/doctype/project/project.py @@ -9,7 +9,7 @@ from frappe.desk.reportview import get_match_cond from frappe.model.document import Document from frappe.query_builder import Interval from frappe.query_builder.functions import Count, CurDate, Date, Sum, UnixTimestamp -from frappe.utils import add_days, flt, get_datetime, get_time, get_url, nowtime, today +from frappe.utils import add_days, flt, get_datetime, get_link_to_form, get_time, get_url, nowtime, today from frappe.utils.user import is_website_user from erpnext import get_default_company @@ -341,24 +341,19 @@ class Project(Document): frappe.db.set_value("Project", new_name, "copied_from", new_name) def send_welcome_email(self): - url = get_url(f"/project/?name={self.name}") - messages = ( - _("You have been invited to collaborate on the project: {0}").format(self.name), - url, - _("Join"), - ) + label = f"{self.project_name} ({self.name})" + url = get_link_to_form(self.doctype, self.name, label) - content = """ -

{0}.

-

{2}

- """ + content = "

{}

".format( + _("You have been invited to collaborate on the project {0}.").format(url) + ) for user in self.users: if user.welcome_email_sent == 0: frappe.sendmail( user.user, subject=_("Project Collaboration Invitation"), - content=content.format(*messages), + content=content, ) user.welcome_email_sent = 1 From 3c10d809b0f88d372793c5dd8be218c0dc01be73 Mon Sep 17 00:00:00 2001 From: Lakshit Jain <108322669+ljain112@users.noreply.github.com> Date: Fri, 17 Jan 2025 16:50:15 +0530 Subject: [PATCH 0913/1614] fix: round off tax withholding amount (#45271) (cherry picked from commit ada272a29bf5b0c1ab2115a3d72b3d8a80bec11a) --- .../tax_withholding_category/tax_withholding_category.py | 3 +++ erpnext/controllers/taxes_and_totals.py | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py index ace139ce15a..53a2e279a4d 100644 --- a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py +++ b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py @@ -156,6 +156,9 @@ def get_party_tax_withholding_details(inv, tax_withholding_category=None): } ) + if cint(tax_details.round_off_tax_amount): + inv.round_off_applicable_accounts_for_tax_withholding = tax_details.account_head + if inv.doctype == "Purchase Invoice": return tax_row, tax_deducted_on_advances, voucher_wise_amount else: diff --git a/erpnext/controllers/taxes_and_totals.py b/erpnext/controllers/taxes_and_totals.py index 8fecb177295..b6315df3246 100644 --- a/erpnext/controllers/taxes_and_totals.py +++ b/erpnext/controllers/taxes_and_totals.py @@ -30,6 +30,11 @@ class calculate_taxes_and_totals: "Accounts Settings", "round_row_wise_tax" ) + if doc.get("round_off_applicable_accounts_for_tax_withholding"): + frappe.flags.round_off_applicable_accounts.append( + doc.round_off_applicable_accounts_for_tax_withholding + ) + self._items = self.filter_rows() if self.doc.doctype == "Quotation" else self.doc.get("items") get_round_off_applicable_accounts(self.doc.company, frappe.flags.round_off_applicable_accounts) From 842d72f7c442cd473c100fc3890c956a4e7ae33c Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 17 Jan 2025 16:51:07 +0530 Subject: [PATCH 0914/1614] fix: Ambiguous column error while creating Sales Return (#45275) (cherry picked from commit ec487c14d9a68629c86fe814d9f83eebe9f5f8eb) --- erpnext/controllers/sales_and_purchase_return.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/controllers/sales_and_purchase_return.py b/erpnext/controllers/sales_and_purchase_return.py index 5c8f5a6fbd7..88935a6b245 100644 --- a/erpnext/controllers/sales_and_purchase_return.py +++ b/erpnext/controllers/sales_and_purchase_return.py @@ -259,7 +259,7 @@ def get_already_returned_items(doc): ) data = frappe.db.sql( f""" - select {column}, {field} + select {column}, child.{field} from `tab{doc.doctype} Item` child, `tab{doc.doctype}` par where From 7fc19e19be0e9d8c3ac4ac0c26edf1483f9c7b1f Mon Sep 17 00:00:00 2001 From: Diptanil Saha Date: Fri, 17 Jan 2025 16:53:06 +0530 Subject: [PATCH 0915/1614] fix: fetching items from blanket order to sales/purchase order (#45262) * fix: blanket order with zero item quantity * fix: item quantity validation * refactor: resolve linter issue (cherry picked from commit 98d401bee4d9bed01f63b99d68cf3fa6b3332030) --- .../doctype/blanket_order/blanket_order.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/erpnext/manufacturing/doctype/blanket_order/blanket_order.py b/erpnext/manufacturing/doctype/blanket_order/blanket_order.py index 26fce935abb..988dce7122a 100644 --- a/erpnext/manufacturing/doctype/blanket_order/blanket_order.py +++ b/erpnext/manufacturing/doctype/blanket_order/blanket_order.py @@ -43,6 +43,7 @@ class BlanketOrder(Document): def validate(self): self.validate_dates() self.validate_duplicate_items() + self.validate_item_qty() self.set_party_item_code() def validate_dates(self): @@ -117,6 +118,11 @@ class BlanketOrder(Document): for d in self.items: d.db_set("ordered_qty", item_ordered_qty.get(d.item_code, 0)) + def validate_item_qty(self): + for d in self.items: + if d.qty < 0: + frappe.throw(_("Row {0}: Quantity cannot be negative.").format(d.idx)) + @frappe.whitelist() def make_order(source_name): @@ -148,7 +154,7 @@ def make_order(source_name): "doctype": doctype + " Item", "field_map": {"rate": "blanket_order_rate", "parent": "blanket_order"}, "postprocess": update_item, - "condition": lambda item: (flt(item.qty) - flt(item.ordered_qty)) > 0, + "condition": lambda item: not (flt(item.qty)) or (flt(item.qty) - flt(item.ordered_qty)) > 0, }, }, ) @@ -186,7 +192,7 @@ def validate_against_blanket_order(order_doc): if item.item_code in item_data: remaining_qty = item.qty - item.ordered_qty allowed_qty = remaining_qty + (remaining_qty * (allowance / 100)) - if allowed_qty < item_data[item.item_code]: + if item.qty and allowed_qty < item_data[item.item_code]: frappe.throw( _( "Item {0} cannot be ordered more than {1} against Blanket Order {2}." From dd58e4cb536503427beb14fb619a10648694dc8c Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 17 Jan 2025 16:56:58 +0530 Subject: [PATCH 0916/1614] =?UTF-8?q?feat:=20Added=20valuation=20of=20quan?= =?UTF-8?q?tity=20for=20each=20age=20group=20in=20stock=20ageing=20?= =?UTF-8?q?=E2=80=A6=20(backport=20#45076)=20(#45208)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Added valuation of quantity for each age group in stock ageing report (cherry picked from commit 2f80c4dee508ec6eaed01622f684d908aa1bf2b3) * fix: Test case for ageing report (cherry picked from commit 839b79ffd0545650a2225dbc23b9db58efbe3147) * fix: Fixed more test cases (cherry picked from commit f996f71d16f425f0af00970088e084bf4773c870) * fix: Fixed final test case (cherry picked from commit 1f2d7da426defbac58513aa478e5bd439b8976c9) * test: Valuation of ageing stock (cherry picked from commit dbb572eec17191fba5c44db91207c2b049ca67aa) --------- Co-authored-by: Mihir Kandoi --- .../stock/report/stock_ageing/stock_ageing.py | 48 ++++-- .../report/stock_ageing/test_stock_ageing.py | 146 ++++++++++++++++++ 2 files changed, 183 insertions(+), 11 deletions(-) diff --git a/erpnext/stock/report/stock_ageing/stock_ageing.py b/erpnext/stock/report/stock_ageing/stock_ageing.py index c7e0af6cd38..feaa0ba766d 100644 --- a/erpnext/stock/report/stock_ageing/stock_ageing.py +++ b/erpnext/stock/report/stock_ageing/stock_ageing.py @@ -89,18 +89,22 @@ def get_average_age(fifo_queue: list, to_date: str) -> float: def get_range_age(filters: Filters, fifo_queue: list, to_date: str, item_dict: dict) -> list: precision = cint(frappe.db.get_single_value("System Settings", "float_precision", cache=True)) - range_values = [0.0] * (len(filters.ranges) + 1) + range_values = [0.0] * ((len(filters.ranges) * 2) + 2) for item in fifo_queue: age = flt(date_diff(to_date, item[1])) qty = flt(item[0]) if not item_dict["has_serial_no"] else 1.0 + stock_value = flt(item[2]) for i, age_limit in enumerate(filters.ranges): if age <= flt(age_limit): + i *= 2 range_values[i] = flt(range_values[i] + qty, precision) + range_values[i + 1] = flt(range_values[i + 1] + stock_value, precision) break else: - range_values[-1] = flt(range_values[-1] + qty, precision) + range_values[-2] = flt(range_values[-2] + qty, precision) + range_values[-1] = flt(range_values[-1] + stock_value, precision) return range_values @@ -199,6 +203,7 @@ def setup_ageing_columns(filters: Filters, range_columns: list): for i, label in enumerate(ranges): fieldname = "range" + str(i + 1) add_column(range_columns, label=_("Age ({0})").format(label), fieldname=fieldname) + add_column(range_columns, label=_("Value ({0})").format(label), fieldname=fieldname + "value") def add_column(range_columns: list, label: str, fieldname: str, fieldtype: str = "Float", width: int = 140): @@ -298,16 +303,22 @@ class FIFOSlots: # neutralize 0/negative stock by adding positive stock fifo_queue[0][0] += flt(row.actual_qty) fifo_queue[0][1] = row.posting_date + fifo_queue[0][2] += flt(row.stock_value_difference) else: - fifo_queue.append([flt(row.actual_qty), row.posting_date]) + fifo_queue.append( + [flt(row.actual_qty), row.posting_date, flt(row.stock_value_difference)] + ) return + valuation = row.stock_value_difference / row.actual_qty for serial_no in serial_nos: if self.serial_no_batch_purchase_details.get(serial_no): - fifo_queue.append([serial_no, self.serial_no_batch_purchase_details.get(serial_no)]) + fifo_queue.append( + [serial_no, self.serial_no_batch_purchase_details.get(serial_no), valuation] + ) else: self.serial_no_batch_purchase_details.setdefault(serial_no, row.posting_date) - fifo_queue.append([serial_no, row.posting_date]) + fifo_queue.append([serial_no, row.posting_date, valuation]) def __compute_outgoing_stock(self, row: dict, fifo_queue: list, transfer_key: tuple, serial_nos: list): "Update FIFO Queue on outward stock." @@ -316,34 +327,44 @@ class FIFOSlots: return qty_to_pop = abs(row.actual_qty) + stock_value = abs(row.stock_value_difference) + while qty_to_pop: - slot = fifo_queue[0] if fifo_queue else [0, None] + slot = fifo_queue[0] if fifo_queue else [0, None, 0] if 0 < flt(slot[0]) <= qty_to_pop: # qty to pop >= slot qty # if +ve and not enough or exactly same balance in current slot, consume whole slot qty_to_pop -= flt(slot[0]) + stock_value -= flt(slot[2]) self.transferred_item_details[transfer_key].append(fifo_queue.pop(0)) elif not fifo_queue: # negative stock, no balance but qty yet to consume - fifo_queue.append([-(qty_to_pop), row.posting_date]) - self.transferred_item_details[transfer_key].append([qty_to_pop, row.posting_date]) + fifo_queue.append([-(qty_to_pop), row.posting_date, -(stock_value)]) + self.transferred_item_details[transfer_key].append( + [qty_to_pop, row.posting_date, stock_value] + ) qty_to_pop = 0 + stock_value = 0 else: # qty to pop < slot qty, ample balance # consume actual_qty from first slot slot[0] = flt(slot[0]) - qty_to_pop - self.transferred_item_details[transfer_key].append([qty_to_pop, slot[1]]) + slot[2] = flt(slot[2]) - stock_value + self.transferred_item_details[transfer_key].append([qty_to_pop, slot[1], stock_value]) qty_to_pop = 0 + stock_value = 0 def __adjust_incoming_transfer_qty(self, transfer_data: dict, fifo_queue: list, row: dict): "Add previously removed stock back to FIFO Queue." transfer_qty_to_pop = flt(row.actual_qty) + stock_value = flt(row.stock_value_difference) def add_to_fifo_queue(slot): if fifo_queue and flt(fifo_queue[0][0]) <= 0: # neutralize 0/negative stock by adding positive stock fifo_queue[0][0] += flt(slot[0]) fifo_queue[0][1] = slot[1] + fifo_queue[0][2] += flt(slot[2]) else: fifo_queue.append(slot) @@ -351,16 +372,20 @@ class FIFOSlots: if transfer_data and 0 < transfer_data[0][0] <= transfer_qty_to_pop: # bucket qty is not enough, consume whole transfer_qty_to_pop -= transfer_data[0][0] + stock_value -= transfer_data[0][2] add_to_fifo_queue(transfer_data.pop(0)) elif not transfer_data: # transfer bucket is empty, extra incoming qty - add_to_fifo_queue([transfer_qty_to_pop, row.posting_date]) + add_to_fifo_queue([transfer_qty_to_pop, row.posting_date, stock_value]) transfer_qty_to_pop = 0 + stock_value = 0 else: # ample bucket qty to consume transfer_data[0][0] -= transfer_qty_to_pop - add_to_fifo_queue([transfer_qty_to_pop, transfer_data[0][1]]) + transfer_data[0][2] -= stock_value + add_to_fifo_queue([transfer_qty_to_pop, transfer_data[0][1], stock_value]) transfer_qty_to_pop = 0 + stock_value = 0 def __update_balances(self, row: dict, key: tuple | str): self.item_details[key]["qty_after_transaction"] = row.qty_after_transaction @@ -412,6 +437,7 @@ class FIFOSlots: item.stock_uom, item.has_serial_no, sle.actual_qty, + sle.stock_value_difference, sle.posting_date, sle.voucher_type, sle.voucher_no, diff --git a/erpnext/stock/report/stock_ageing/test_stock_ageing.py b/erpnext/stock/report/stock_ageing/test_stock_ageing.py index c0c007e5015..61616f71d80 100644 --- a/erpnext/stock/report/stock_ageing/test_stock_ageing.py +++ b/erpnext/stock/report/stock_ageing/test_stock_ageing.py @@ -18,6 +18,7 @@ class TestStockAgeing(FrappeTestCase): name="Flask Item", actual_qty=30, qty_after_transaction=30, + stock_value_difference=30, warehouse="WH 1", posting_date="2021-12-01", voucher_type="Stock Entry", @@ -29,6 +30,7 @@ class TestStockAgeing(FrappeTestCase): name="Flask Item", actual_qty=20, qty_after_transaction=50, + stock_value_difference=20, warehouse="WH 1", posting_date="2021-12-02", voucher_type="Stock Entry", @@ -40,6 +42,7 @@ class TestStockAgeing(FrappeTestCase): name="Flask Item", actual_qty=(-10), qty_after_transaction=40, + stock_value_difference=(-10), warehouse="WH 1", posting_date="2021-12-03", voucher_type="Stock Entry", @@ -57,6 +60,8 @@ class TestStockAgeing(FrappeTestCase): self.assertEqual(result["qty_after_transaction"], result["total_qty"]) self.assertEqual(queue[0][0], 20.0) + data = format_report_data(self.filters, slots, self.filters["to_date"]) + self.assertEqual(data[0][8], 40.0) # valuating for stock value between age 0-30 def test_insufficient_balance(self): "Reference: Case 3 in stock_ageing_fifo_logic.md (same wh)" @@ -65,6 +70,7 @@ class TestStockAgeing(FrappeTestCase): name="Flask Item", actual_qty=(-30), qty_after_transaction=(-30), + stock_value_difference=0, warehouse="WH 1", posting_date="2021-12-01", voucher_type="Stock Entry", @@ -76,6 +82,7 @@ class TestStockAgeing(FrappeTestCase): name="Flask Item", actual_qty=20, qty_after_transaction=(-10), + stock_value_difference=0, warehouse="WH 1", posting_date="2021-12-02", voucher_type="Stock Entry", @@ -87,6 +94,7 @@ class TestStockAgeing(FrappeTestCase): name="Flask Item", actual_qty=20, qty_after_transaction=10, + stock_value_difference=0, warehouse="WH 1", posting_date="2021-12-03", voucher_type="Stock Entry", @@ -98,6 +106,7 @@ class TestStockAgeing(FrappeTestCase): name="Flask Item", actual_qty=10, qty_after_transaction=20, + stock_value_difference=0, warehouse="WH 1", posting_date="2021-12-03", voucher_type="Stock Entry", @@ -126,6 +135,7 @@ class TestStockAgeing(FrappeTestCase): name="Flask Item", actual_qty=30, qty_after_transaction=30, + stock_value_difference=0, warehouse="WH 1", posting_date="2021-12-01", voucher_type="Stock Entry", @@ -137,6 +147,7 @@ class TestStockAgeing(FrappeTestCase): name="Flask Item", actual_qty=0, qty_after_transaction=50, + stock_value_difference=0, warehouse="WH 1", posting_date="2021-12-02", voucher_type="Stock Reconciliation", @@ -148,6 +159,7 @@ class TestStockAgeing(FrappeTestCase): name="Flask Item", actual_qty=(-10), qty_after_transaction=40, + stock_value_difference=0, warehouse="WH 1", posting_date="2021-12-03", voucher_type="Stock Entry", @@ -178,6 +190,7 @@ class TestStockAgeing(FrappeTestCase): name="Flask Item", actual_qty=0, qty_after_transaction=1000, + stock_value_difference=0, warehouse="WH 1", posting_date="2021-12-01", voucher_type="Stock Reconciliation", @@ -189,6 +202,7 @@ class TestStockAgeing(FrappeTestCase): name="Flask Item", actual_qty=0, qty_after_transaction=400, + stock_value_difference=0, warehouse="WH 1", posting_date="2021-12-02", voucher_type="Stock Reconciliation", @@ -200,6 +214,7 @@ class TestStockAgeing(FrappeTestCase): name="Flask Item", actual_qty=(-10), qty_after_transaction=390, + stock_value_difference=0, warehouse="WH 1", posting_date="2021-12-03", voucher_type="Stock Entry", @@ -233,6 +248,7 @@ class TestStockAgeing(FrappeTestCase): name="Flask Item", actual_qty=0, qty_after_transaction=1000, + stock_value_difference=0, warehouse="WH 1", posting_date="2021-12-01", voucher_type="Stock Reconciliation", @@ -244,6 +260,7 @@ class TestStockAgeing(FrappeTestCase): name="Flask Item", actual_qty=0, qty_after_transaction=400, + stock_value_difference=0, warehouse="WH 2", posting_date="2021-12-02", voucher_type="Stock Reconciliation", @@ -255,6 +272,7 @@ class TestStockAgeing(FrappeTestCase): name="Flask Item", actual_qty=(-10), qty_after_transaction=990, + stock_value_difference=0, warehouse="WH 1", posting_date="2021-12-03", voucher_type="Stock Entry", @@ -301,6 +319,7 @@ class TestStockAgeing(FrappeTestCase): name="Flask Item", actual_qty=500, qty_after_transaction=500, + stock_value_difference=0, warehouse="WH 1", posting_date="2021-12-03", voucher_type="Stock Entry", @@ -312,6 +331,7 @@ class TestStockAgeing(FrappeTestCase): name="Flask Item", actual_qty=(-50), qty_after_transaction=450, + stock_value_difference=0, warehouse="WH 1", posting_date="2021-12-04", voucher_type="Stock Entry", @@ -323,6 +343,7 @@ class TestStockAgeing(FrappeTestCase): name="Flask Item", actual_qty=(-50), qty_after_transaction=400, + stock_value_difference=0, warehouse="WH 1", posting_date="2021-12-04", voucher_type="Stock Entry", @@ -334,6 +355,7 @@ class TestStockAgeing(FrappeTestCase): name="Flask Item", actual_qty=100, qty_after_transaction=500, + stock_value_difference=0, warehouse="WH 1", posting_date="2021-12-04", voucher_type="Stock Entry", @@ -370,6 +392,7 @@ class TestStockAgeing(FrappeTestCase): name="Flask Item", actual_qty=500, qty_after_transaction=500, + stock_value_difference=0, warehouse="WH 1", posting_date="2021-12-03", voucher_type="Stock Entry", @@ -381,6 +404,7 @@ class TestStockAgeing(FrappeTestCase): name="Flask Item", actual_qty=(-100), qty_after_transaction=400, + stock_value_difference=0, warehouse="WH 1", posting_date="2021-12-04", voucher_type="Stock Entry", @@ -392,6 +416,7 @@ class TestStockAgeing(FrappeTestCase): name="Flask Item", actual_qty=50, qty_after_transaction=450, + stock_value_difference=0, warehouse="WH 1", posting_date="2021-12-04", voucher_type="Stock Entry", @@ -426,6 +451,7 @@ class TestStockAgeing(FrappeTestCase): name="Flask Item", actual_qty=20, qty_after_transaction=20, + stock_value_difference=0, warehouse="WH 1", posting_date="2021-12-03", voucher_type="Stock Entry", @@ -437,6 +463,7 @@ class TestStockAgeing(FrappeTestCase): name="Flask Item", actual_qty=(-50), qty_after_transaction=(-30), + stock_value_difference=0, warehouse="WH 1", posting_date="2021-12-04", voucher_type="Stock Entry", @@ -448,6 +475,7 @@ class TestStockAgeing(FrappeTestCase): name="Flask Item", actual_qty=(-50), qty_after_transaction=(-80), + stock_value_difference=0, warehouse="WH 1", posting_date="2021-12-04", voucher_type="Stock Entry", @@ -459,6 +487,7 @@ class TestStockAgeing(FrappeTestCase): name="Flask Item", actual_qty=50, qty_after_transaction=(-30), + stock_value_difference=0, warehouse="WH 1", posting_date="2021-12-04", voucher_type="Stock Entry", @@ -496,6 +525,7 @@ class TestStockAgeing(FrappeTestCase): name="Flask Item", actual_qty=500, qty_after_transaction=500, + stock_value_difference=0, warehouse="WH 1", posting_date="2021-12-03", voucher_type="Stock Entry", @@ -507,6 +537,7 @@ class TestStockAgeing(FrappeTestCase): name="Flask Item", actual_qty=(-50), qty_after_transaction=450, + stock_value_difference=0, warehouse="WH 1", posting_date="2021-12-04", voucher_type="Stock Entry", @@ -518,6 +549,7 @@ class TestStockAgeing(FrappeTestCase): name="Flask Item", actual_qty=100, qty_after_transaction=550, + stock_value_difference=0, warehouse="WH 1", posting_date="2021-12-04", voucher_type="Stock Entry", @@ -553,6 +585,7 @@ class TestStockAgeing(FrappeTestCase): name="Flask Item", actual_qty=20, qty_after_transaction=20, + stock_value_difference=0, warehouse="WH 1", posting_date="2021-12-03", voucher_type="Stock Entry", @@ -564,6 +597,7 @@ class TestStockAgeing(FrappeTestCase): name="Flask Item", actual_qty=(-50), qty_after_transaction=(-30), + stock_value_difference=0, warehouse="WH 1", posting_date="2021-12-04", voucher_type="Stock Entry", @@ -575,6 +609,7 @@ class TestStockAgeing(FrappeTestCase): name="Flask Item", actual_qty=50, qty_after_transaction=20, + stock_value_difference=0, warehouse="WH 1", posting_date="2021-12-04", voucher_type="Stock Entry", @@ -586,6 +621,7 @@ class TestStockAgeing(FrappeTestCase): name="Flask Item", actual_qty=50, qty_after_transaction=70, + stock_value_difference=0, warehouse="WH 1", posting_date="2021-12-04", voucher_type="Stock Entry", @@ -623,6 +659,7 @@ class TestStockAgeing(FrappeTestCase): name="Flask Item", actual_qty=(-50), qty_after_transaction=(-50), + stock_value_difference=0, warehouse="WH 1", posting_date="2021-12-01", voucher_type="Stock Entry", @@ -634,6 +671,7 @@ class TestStockAgeing(FrappeTestCase): name="Flask Item", actual_qty=(-50), qty_after_transaction=(-100), + stock_value_difference=0, warehouse="WH 1", posting_date="2021-12-01", voucher_type="Stock Entry", @@ -645,6 +683,7 @@ class TestStockAgeing(FrappeTestCase): name="Flask Item", actual_qty=30, qty_after_transaction=(-70), + stock_value_difference=0, warehouse="WH 1", posting_date="2021-12-01", voucher_type="Stock Entry", @@ -722,6 +761,113 @@ class TestStockAgeing(FrappeTestCase): self.assertEqual(bal_qty, 0.9) self.assertEqual(bal_qty, range_qty_sum) + def test_ageing_stock_valuation(self): + "Test stock valuation for each time bucket." + sle = [ + frappe._dict( + name="Flask Item", + actual_qty=10, + qty_after_transaction=10, + stock_value_difference=10, + warehouse="WH 1", + posting_date="2021-12-01", + voucher_type="Stock Entry", + voucher_no="001", + has_serial_no=False, + serial_no=None, + ), + frappe._dict( + name="Flask Item", + actual_qty=20, + qty_after_transaction=30, + stock_value_difference=20, + warehouse="WH 1", + posting_date="2021-12-02", + voucher_type="Stock Entry", + voucher_no="002", + has_serial_no=False, + serial_no=None, + ), + frappe._dict( + name="Flask Item", + actual_qty=(-10), + qty_after_transaction=20, + stock_value_difference=(-10), + warehouse="WH 1", + posting_date="2021-12-03", + voucher_type="Stock Entry", + voucher_no="003", + has_serial_no=False, + serial_no=None, + ), + frappe._dict( + name="Flask Item", + actual_qty=10, + qty_after_transaction=30, + stock_value_difference=20, + warehouse="WH 1", + posting_date="2022-01-01", + voucher_type="Stock Entry", + voucher_no="004", + has_serial_no=False, + serial_no=None, + ), + frappe._dict( + name="Flask Item", + actual_qty=(-15), + qty_after_transaction=15, + stock_value_difference=(-15), + warehouse="WH 1", + posting_date="2022-01-02", + voucher_type="Stock Entry", + voucher_no="005", + has_serial_no=False, + serial_no=None, + ), + frappe._dict( + name="Flask Item", + actual_qty=10, + qty_after_transaction=25, + stock_value_difference=5, + warehouse="WH 1", + posting_date="2022-02-01", + voucher_type="Stock Entry", + voucher_no="006", + has_serial_no=False, + serial_no=None, + ), + frappe._dict( + name="Flask Item", + actual_qty=5, + qty_after_transaction=30, + stock_value_difference=2.5, + warehouse="WH 1", + posting_date="2022-02-02", + voucher_type="Stock Entry", + voucher_no="007", + has_serial_no=False, + serial_no=None, + ), + frappe._dict( + name="Flask Item", + actual_qty=5, + qty_after_transaction=35, + stock_value_difference=15, + warehouse="WH 1", + posting_date="2022-03-01", + voucher_type="Stock Entry", + voucher_no="008", + has_serial_no=False, + serial_no=None, + ), + ] + + slots = FIFOSlots(self.filters, sle).generate() + report_data = format_report_data(self.filters, slots, "2022-03-31") + range_values = report_data[0][7:15] + range_valuations = range_values[1::2] + self.assertEqual(range_valuations, [15, 7.5, 20, 5]) + def generate_item_and_item_wh_wise_slots(filters, sle): "Return results with and without 'show_warehouse_wise_stock'" From afab5be63fbe58ff169d0b941cc096455db9756a Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 17 Jan 2025 17:01:28 +0530 Subject: [PATCH 0917/1614] fix: ignore crm deal in tax_rule search filter (backport #45134) (#45138) fix: ignore crm deal in tax_rule search filter (#45134) (cherry picked from commit dc5bff90089617befa2e42c7d413daa352c3327d) Co-authored-by: Venkatesh <47534423+venkat102@users.noreply.github.com> --- erpnext/accounts/party.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/party.py b/erpnext/accounts/party.py index 396c814dff6..0df9dcb0683 100644 --- a/erpnext/accounts/party.py +++ b/erpnext/accounts/party.py @@ -676,7 +676,7 @@ def set_taxes( ): from erpnext.accounts.doctype.tax_rule.tax_rule import get_party_details, get_tax_template - args = {party_type.lower(): party, "company": company} + args = {frappe.scrub(party_type): party, "company": company} if tax_category: args["tax_category"] = tax_category @@ -696,10 +696,10 @@ def set_taxes( else: args.update(get_party_details(party, party_type)) - if party_type in ("Customer", "Lead", "Prospect"): + if party_type in ("Customer", "Lead", "Prospect", "CRM Deal"): args.update({"tax_type": "Sales"}) - if party_type in ["Lead", "Prospect"]: + if party_type in ["Lead", "Prospect", "CRM Deal"]: args["customer"] = None del args[frappe.scrub(party_type)] else: From fcd914cfa0117a60309d991f51b2f9f99c1be7fb Mon Sep 17 00:00:00 2001 From: Sagar Vora Date: Fri, 20 Dec 2024 14:32:24 +0530 Subject: [PATCH 0918/1614] fix: ensure multiple PCVs in same fiscal year are considered in patch (cherry picked from commit 84e0b41c4f8e36d3bd5881433237046a599b2acc) --- erpnext/patches.txt | 2 +- .../patches/v14_0/update_closing_balances.py | 140 +++++++++++------- 2 files changed, 84 insertions(+), 58 deletions(-) diff --git a/erpnext/patches.txt b/erpnext/patches.txt index ad8400da318..7097a29e61d 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -315,7 +315,7 @@ erpnext.patches.v15_0.update_asset_value_for_manual_depr_entries erpnext.patches.v15_0.update_gpa_and_ndb_for_assdeprsch erpnext.patches.v14_0.create_accounting_dimensions_for_closing_balance erpnext.patches.v14_0.set_period_start_end_date_in_pcv -erpnext.patches.v14_0.update_closing_balances #08-11-2024 +erpnext.patches.v14_0.update_closing_balances #20-12-2024 execute:frappe.db.set_single_value("Accounts Settings", "merge_similar_account_heads", 0) erpnext.patches.v14_0.update_reference_type_in_journal_entry_accounts erpnext.patches.v14_0.update_subscription_details diff --git a/erpnext/patches/v14_0/update_closing_balances.py b/erpnext/patches/v14_0/update_closing_balances.py index 31c7e85d875..e6544485252 100644 --- a/erpnext/patches/v14_0/update_closing_balances.py +++ b/erpnext/patches/v14_0/update_closing_balances.py @@ -1,6 +1,7 @@ # Copyright (c) 2023, Frappe Technologies Pvt. Ltd. and Contributors # License: MIT. See LICENSE +import itertools import frappe @@ -10,34 +11,91 @@ from erpnext.accounts.doctype.account_closing_balance.account_closing_balance im from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import ( get_accounting_dimensions, ) -from erpnext.accounts.utils import get_fiscal_year def execute(): + # clear balances, they will be recalculated frappe.db.truncate("Account Closing Balance") - gle_fields = get_gle_fields() + pcv_list = get_period_closing_vouchers() + gl_entries = get_gl_entries(pcv_list) - for company in frappe.get_all("Company", pluck="name"): - i = 0 - company_wise_order = {} - for pcv in get_period_closing_vouchers(company): - company_wise_order.setdefault(pcv.company, []) - if pcv.period_end_date not in company_wise_order[pcv.company]: - pcv_doc = frappe.get_doc("Period Closing Voucher", pcv.name) - pcv_doc.pl_accounts_reverse_gle = get_pcv_gl_entries_for_pl_accounts(pcv, gle_fields) - pcv_doc.closing_account_gle = get_pcv_gl_entries_for_closing_accounts(pcv, gle_fields) - closing_entries = pcv_doc.get_account_closing_balances() - make_closing_entries(closing_entries, pcv.name, pcv.company, pcv.period_end_date) + for _, pcvs in itertools.groupby(pcv_list, key=lambda pcv: (pcv.company, pcv.period_start_date)): + process_grouped_pcvs(list(pcvs), gl_entries) - company_wise_order[pcv.company].append(pcv.period_end_date) - i += 1 + +def process_grouped_pcvs(pcvs, gl_entries): + pl_account_entries = [] + closing_account_entries = [] + first_pcv = pcvs[0] + + for pcv in pcvs: + pcv_entries = gl_entries.get(pcv.name) or [] + for entry in pcv_entries: + entry["closing_date"] = first_pcv.period_end_date + entry["period_closing_voucher"] = first_pcv.name + entry["voucher_no"] = first_pcv.name + + list_to_update = ( + pl_account_entries if entry.account != pcv.closing_account_head else closing_account_entries + ) + list_to_update.append(entry) + + # hacky!! + if to_cancel := pcvs[1:]: + to_cancel = [pcv.name for pcv in to_cancel] + + # update voucher number + gle_to_update = [entry.name for entry in closing_account_entries + pl_account_entries] + frappe.db.set_value( + "GL Entry", + { + "name": ("in", gle_to_update), + "voucher_no": ("in", to_cancel), + }, + "voucher_no", + first_pcv.name, + update_modified=False, + ) + + # mark as cancelled + frappe.db.set_value( + "Period Closing Voucher", + {"name": ("in", to_cancel)}, + "docstatus", + 2, + update_modified=False, + ) + + pcv_doc = frappe.get_doc("Period Closing Voucher", first_pcv.name) + pcv_doc.pl_accounts_reverse_gle = pl_account_entries + pcv_doc.closing_account_gle = closing_account_entries + closing_entries = pcv_doc.get_account_closing_balances() + make_closing_entries(closing_entries, pcv_doc.name, pcv_doc.company, pcv_doc.period_end_date) + + +def get_period_closing_vouchers(): + return frappe.db.get_all( + "Period Closing Voucher", + fields=["name", "closing_account_head", "period_start_date", "period_end_date", "company"], + filters={"docstatus": 1}, + order_by="period_start_date asc, period_end_date desc", + ) + + +def get_gl_entries(pcv_list): + gl_entries = frappe.get_all( + "GL Entry", + filters={"voucher_no": ("in", [pcv.name for pcv in pcv_list]), "is_cancelled": 0}, + fields=get_gle_fields(), + update={"is_period_closing_voucher_entry": 1}, + ) + + return {k: list(v) for k, v in itertools.groupby(gl_entries, key=lambda gle: gle.voucher_no)} def get_gle_fields(): - default_diemnsion_fields = ["cost_center", "finance_book", "project"] - accounting_dimension_fields = get_accounting_dimensions() - gle_fields = [ + return [ "name", "company", "posting_date", @@ -47,43 +105,11 @@ def get_gle_fields(): "credit", "debit_in_account_currency", "credit_in_account_currency", - *default_diemnsion_fields, - *accounting_dimension_fields, + "voucher_no", + # default dimension fields + "cost_center", + "finance_book", + "project", + # accounting dimensions + *get_accounting_dimensions(), ] - - return gle_fields - - -def get_period_closing_vouchers(company): - return frappe.db.get_all( - "Period Closing Voucher", - fields=["name", "closing_account_head", "period_start_date", "period_end_date", "company"], - filters={"docstatus": 1, "company": company}, - order_by="period_end_date", - ) - - -def get_pcv_gl_entries_for_pl_accounts(pcv, gle_fields): - return get_gl_entries(pcv, gle_fields, {"account": ["!=", pcv.closing_account_head]}) - - -def get_pcv_gl_entries_for_closing_accounts(pcv, gle_fields): - return get_gl_entries(pcv, gle_fields, {"account": pcv.closing_account_head}) - - -def get_gl_entries(pcv, gle_fields, accounts_filter=None): - filters = {"voucher_no": pcv.name, "is_cancelled": 0} - if accounts_filter: - filters.update(accounts_filter) - - gl_entries = frappe.db.get_all( - "GL Entry", - filters=filters, - fields=gle_fields, - ) - for entry in gl_entries: - entry["is_period_closing_voucher_entry"] = 1 - entry["closing_date"] = pcv.period_end_date - entry["period_closing_voucher"] = pcv.name - - return gl_entries From 7641627b717ead4e2bcb35030ba654be6ca0f714 Mon Sep 17 00:00:00 2001 From: Diptanil Saha Date: Fri, 17 Jan 2025 17:24:39 +0530 Subject: [PATCH 0919/1614] fix: fixed typo in manufacturing settings and field rename (#45238) * chore: field rename and patch entry * chore: patch file rename and description improvement --------- Co-authored-by: Nabin Hait (cherry picked from commit 97e37708728691f60f61789a131e567736040d2a) --- .../manufacturing_settings.json | 18 +++++++++--------- .../manufacturing_settings.py | 2 +- .../doctype/work_order/test_work_order.py | 4 ++-- erpnext/patches.txt | 1 + .../rename_manufacturing_settings_field.py | 9 +++++++++ .../stock/doctype/stock_entry/stock_entry.py | 4 ++-- 6 files changed, 24 insertions(+), 14 deletions(-) create mode 100644 erpnext/patches/v15_0/rename_manufacturing_settings_field.py diff --git a/erpnext/manufacturing/doctype/manufacturing_settings/manufacturing_settings.json b/erpnext/manufacturing/doctype/manufacturing_settings/manufacturing_settings.json index f92df9894a9..4f588b8d231 100644 --- a/erpnext/manufacturing/doctype/manufacturing_settings/manufacturing_settings.json +++ b/erpnext/manufacturing/doctype/manufacturing_settings/manufacturing_settings.json @@ -37,7 +37,7 @@ "capacity_planning_for_days", "mins_between_operations", "other_settings_section", - "set_op_cost_and_scrape_from_sub_assemblies", + "set_op_cost_and_scrap_from_sub_assemblies", "column_break_23", "make_serial_no_batch_from_work_order" ], @@ -202,13 +202,6 @@ "fieldtype": "Check", "label": "Allow Excess Material Transfer" }, - { - "default": "0", - "description": "In the case of 'Use Multi-Level BOM' in a work order, if the user wishes to add sub-assembly costs to Finished Goods items without using a job card as well the scrap items, then this option needs to be enable.", - "fieldname": "set_op_cost_and_scrape_from_sub_assemblies", - "fieldtype": "Check", - "label": "Set Operating Cost / Scrap Items From Sub-assemblies" - }, { "default": "0", "depends_on": "eval: doc.material_consumption", @@ -243,13 +236,20 @@ "fieldname": "validate_components_quantities_per_bom", "fieldtype": "Check", "label": "Validate Components and Quantities Per BOM" + }, + { + "default": "0", + "description": "To include sub-assembly costs and scrap items in Finished Goods on a work order without using a job card, when the 'Use Multi-Level BOM' option is enabled.", + "fieldname": "set_op_cost_and_scrap_from_sub_assemblies", + "fieldtype": "Check", + "label": "Set Operating Cost / Scrap Items From Sub-assemblies" } ], "icon": "icon-wrench", "index_web_pages_for_search": 1, "issingle": 1, "links": [], - "modified": "2025-01-09 16:02:23.326763", + "modified": "2025-01-13 12:07:03.089977", "modified_by": "Administrator", "module": "Manufacturing", "name": "Manufacturing Settings", diff --git a/erpnext/manufacturing/doctype/manufacturing_settings/manufacturing_settings.py b/erpnext/manufacturing/doctype/manufacturing_settings/manufacturing_settings.py index cb2916c8ac5..04aebf23743 100644 --- a/erpnext/manufacturing/doctype/manufacturing_settings/manufacturing_settings.py +++ b/erpnext/manufacturing/doctype/manufacturing_settings/manufacturing_settings.py @@ -34,7 +34,7 @@ class ManufacturingSettings(Document): mins_between_operations: DF.Int overproduction_percentage_for_sales_order: DF.Percent overproduction_percentage_for_work_order: DF.Percent - set_op_cost_and_scrape_from_sub_assemblies: DF.Check + set_op_cost_and_scrap_from_sub_assemblies: DF.Check update_bom_costs_automatically: DF.Check validate_components_quantities_per_bom: DF.Check # end: auto-generated types diff --git a/erpnext/manufacturing/doctype/work_order/test_work_order.py b/erpnext/manufacturing/doctype/work_order/test_work_order.py index 3e67fd08033..f94e4a56c7c 100644 --- a/erpnext/manufacturing/doctype/work_order/test_work_order.py +++ b/erpnext/manufacturing/doctype/work_order/test_work_order.py @@ -2091,7 +2091,7 @@ class TestWorkOrder(FrappeTestCase): def test_op_cost_and_scrap_based_on_sub_assemblies(self): # Make Sub Assembly BOM 1 - frappe.db.set_single_value("Manufacturing Settings", "set_op_cost_and_scrape_from_sub_assemblies", 1) + frappe.db.set_single_value("Manufacturing Settings", "set_op_cost_and_scrap_from_sub_assemblies", 1) items = { "Test Final FG Item": 0, @@ -2132,7 +2132,7 @@ class TestWorkOrder(FrappeTestCase): for row in se_doc.additional_costs: self.assertEqual(row.amount, 3000) - frappe.db.set_single_value("Manufacturing Settings", "set_op_cost_and_scrape_from_sub_assemblies", 0) + frappe.db.set_single_value("Manufacturing Settings", "set_op_cost_and_scrap_from_sub_assemblies", 0) @change_settings( "Manufacturing Settings", {"material_consumption": 1, "get_rm_cost_from_consumption_entry": 1} diff --git a/erpnext/patches.txt b/erpnext/patches.txt index ad8400da318..a52ec24ccd2 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -387,5 +387,6 @@ erpnext.patches.v15_0.set_is_exchange_gain_loss_in_payment_entry_deductions erpnext.patches.v15_0.enable_allow_existing_serial_no erpnext.patches.v15_0.update_cc_in_process_statement_of_accounts erpnext.patches.v15_0.update_asset_status_to_work_in_progress +erpnext.patches.v15_0.rename_manufacturing_settings_field erpnext.patches.v15_0.migrate_checkbox_to_select_for_reconciliation_effect erpnext.patches.v15_0.sync_auto_reconcile_config diff --git a/erpnext/patches/v15_0/rename_manufacturing_settings_field.py b/erpnext/patches/v15_0/rename_manufacturing_settings_field.py new file mode 100644 index 00000000000..af178753a73 --- /dev/null +++ b/erpnext/patches/v15_0/rename_manufacturing_settings_field.py @@ -0,0 +1,9 @@ +from frappe.model.utils.rename_field import rename_field + + +def execute(): + rename_field( + "Manufacturing Settings", + "set_op_cost_and_scrape_from_sub_assemblies", + "set_op_cost_and_scrap_from_sub_assemblies", + ) diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index 5dee819ad11..c95de8b48a2 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -2040,7 +2040,7 @@ class StockEntry(StockController): from erpnext.manufacturing.doctype.bom.bom import get_bom_items_as_dict if ( - frappe.db.get_single_value("Manufacturing Settings", "set_op_cost_and_scrape_from_sub_assemblies") + frappe.db.get_single_value("Manufacturing Settings", "set_op_cost_and_scrap_from_sub_assemblies") and self.work_order and frappe.get_cached_value("Work Order", self.work_order, "use_multi_level_bom") ): @@ -2847,7 +2847,7 @@ def get_operating_cost_per_unit(work_order=None, bom_no=None): if ( bom_no and frappe.db.get_single_value( - "Manufacturing Settings", "set_op_cost_and_scrape_from_sub_assemblies" + "Manufacturing Settings", "set_op_cost_and_scrap_from_sub_assemblies" ) and frappe.get_cached_value("Work Order", work_order, "use_multi_level_bom") ): From 93e3847e36ee865580d707aeb3fa3640a32145f6 Mon Sep 17 00:00:00 2001 From: barredterra <14891507+barredterra@users.noreply.github.com> Date: Fri, 17 Jan 2025 14:34:44 +0100 Subject: [PATCH 0920/1614] revert: avoid change to translatable string --- erpnext/projects/doctype/project/project.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/projects/doctype/project/project.py b/erpnext/projects/doctype/project/project.py index ffef99379fd..5253cd0eae5 100644 --- a/erpnext/projects/doctype/project/project.py +++ b/erpnext/projects/doctype/project/project.py @@ -345,7 +345,7 @@ class Project(Document): url = get_link_to_form(self.doctype, self.name, label) content = "

{}

".format( - _("You have been invited to collaborate on the project {0}.").format(url) + _("You have been invited to collaborate on the project: {0}").format(url) ) for user in self.users: From c0cf1fed0058f6ce90871275a99fc7cb83a0c627 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Thu, 16 Jan 2025 17:33:21 +0530 Subject: [PATCH 0921/1614] fix: company in quality inspection (cherry picked from commit 397cd79e1e8dbe34b7de316dac43754ab5de7c90) --- .../quality_inspection/quality_inspection.js | 22 +++++++++++++++---- .../quality_inspection.json | 13 ++++++++--- .../quality_inspection/quality_inspection.py | 8 +++++++ 3 files changed, 36 insertions(+), 7 deletions(-) diff --git a/erpnext/stock/doctype/quality_inspection/quality_inspection.js b/erpnext/stock/doctype/quality_inspection/quality_inspection.js index 99e25bf5eb6..d9216fbb9a1 100644 --- a/erpnext/stock/doctype/quality_inspection/quality_inspection.js +++ b/erpnext/stock/doctype/quality_inspection/quality_inspection.js @@ -4,12 +4,26 @@ cur_frm.cscript.refresh = cur_frm.cscript.inspection_type; frappe.ui.form.on("Quality Inspection", { + onload(frm) { + frm.trigger("set_default_company"); + }, + + set_default_company(frm) { + if (!frm.doc.company) { + frm.set_value("company", frappe.defaults.get_default("company")); + } + }, + setup: function (frm) { - frm.set_query("reference_name", function () { + frm.set_query("reference_name", function (doc) { + let filters = { docstatus: ["!=", 2] }; + + if (doc.company) { + filters["company"] = doc.company; + } + return { - filters: { - docstatus: ["!=", 2], - }, + filters: filters, }; }); diff --git a/erpnext/stock/doctype/quality_inspection/quality_inspection.json b/erpnext/stock/doctype/quality_inspection/quality_inspection.json index 56017c4fee2..ebedd5b864b 100644 --- a/erpnext/stock/doctype/quality_inspection/quality_inspection.json +++ b/erpnext/stock/doctype/quality_inspection/quality_inspection.json @@ -8,14 +8,14 @@ "engine": "InnoDB", "field_order": [ "naming_series", + "company", "report_date", "status", - "manual_inspection", + "child_row_reference", "column_break_4", "inspection_type", "reference_type", "reference_name", - "child_row_reference", "section_break_7", "item_code", "item_serial_no", @@ -27,6 +27,7 @@ "bom_no", "specification_details", "quality_inspection_template", + "manual_inspection", "readings", "section_break_14", "inspected_by", @@ -248,6 +249,12 @@ "no_copy": 1, "print_hide": 1, "read_only": 1 + }, + { + "fieldname": "company", + "fieldtype": "Link", + "label": "Company", + "options": "Company" } ], "icon": "fa fa-search", @@ -255,7 +262,7 @@ "index_web_pages_for_search": 1, "is_submittable": 1, "links": [], - "modified": "2024-12-30 19:08:16.611192", + "modified": "2025-01-16 17:00:48.774532", "modified_by": "Administrator", "module": "Stock", "name": "Quality Inspection", diff --git a/erpnext/stock/doctype/quality_inspection/quality_inspection.py b/erpnext/stock/doctype/quality_inspection/quality_inspection.py index d3b5e65ea9f..1eb565b5338 100644 --- a/erpnext/stock/doctype/quality_inspection/quality_inspection.py +++ b/erpnext/stock/doctype/quality_inspection/quality_inspection.py @@ -30,6 +30,7 @@ class QualityInspection(Document): batch_no: DF.Link | None bom_no: DF.Link | None child_row_reference: DF.Data | None + company: DF.Link | None description: DF.SmallText | None inspected_by: DF.Link inspection_type: DF.Literal["", "Incoming", "Outgoing", "In Process"] @@ -76,6 +77,13 @@ class QualityInspection(Document): self.validate_inspection_required() self.set_child_row_reference() + self.set_company() + + def set_company(self): + if self.reference_type and self.reference_name: + company = frappe.get_cached_value(self.reference_type, self.reference_name, "company") + if company != self.company: + self.company = company def set_child_row_reference(self): if self.child_row_reference: From fd83b5251302a83eba332d35198f60d9aec2a6a2 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Wed, 18 Dec 2024 20:53:56 +0530 Subject: [PATCH 0922/1614] fix: do not reset picked items (cherry picked from commit 34a80bfcd30b4f03be5886a286b2c8056a9931e1) --- erpnext/stock/doctype/pick_list/pick_list.py | 39 +++++++++++---- .../stock/doctype/pick_list/test_pick_list.py | 48 +++++++++++++++++-- 2 files changed, 73 insertions(+), 14 deletions(-) diff --git a/erpnext/stock/doctype/pick_list/pick_list.py b/erpnext/stock/doctype/pick_list/pick_list.py index b48d479560d..4550d71677a 100644 --- a/erpnext/stock/doctype/pick_list/pick_list.py +++ b/erpnext/stock/doctype/pick_list/pick_list.py @@ -74,9 +74,8 @@ class PickList(Document): def validate(self): self.validate_for_qty() - if self.pick_manually and self.get("locations"): - self.validate_stock_qty() - self.check_serial_no_status() + self.validate_stock_qty() + self.check_serial_no_status() def before_save(self): self.update_status() @@ -90,14 +89,24 @@ class PickList(Document): from erpnext.stock.doctype.batch.batch import get_batch_qty for row in self.get("locations"): - if row.batch_no and not row.qty: + if not row.picked_qty: + continue + + if row.batch_no and row.picked_qty: batch_qty = get_batch_qty(row.batch_no, row.warehouse, row.item_code) - if row.qty > batch_qty: + if row.picked_qty > batch_qty: frappe.throw( _( - "At Row #{0}: The picked quantity {1} for the item {2} is greater than available stock {3} for the batch {4} in the warehouse {5}." - ).format(row.idx, row.item_code, batch_qty, row.batch_no, bold(row.warehouse)), + "At Row #{0}: The picked quantity {1} for the item {2} is greater than available stock {3} for the batch {4} in the warehouse {5}. Please restock the item." + ).format( + row.idx, + row.picked_qty, + row.item_code, + batch_qty, + row.batch_no, + bold(row.warehouse), + ), title=_("Insufficient Stock"), ) @@ -109,11 +118,11 @@ class PickList(Document): "actual_qty", ) - if row.qty > flt(bin_qty): + if row.picked_qty > flt(bin_qty): frappe.throw( _( "At Row #{0}: The picked quantity {1} for the item {2} is greater than available stock {3} in the warehouse {4}." - ).format(row.idx, row.qty, bold(row.item_code), bin_qty, bold(row.warehouse)), + ).format(row.idx, row.picked_qty, bold(row.item_code), bin_qty, bold(row.warehouse)), title=_("Insufficient Stock"), ) @@ -429,7 +438,14 @@ class PickList(Document): locations_replica = self.get("locations") # reset - self.delete_key("locations") + reset_rows = [] + for row in self.get("locations"): + if not row.picked_qty: + reset_rows.append(row) + + for row in reset_rows: + self.remove(row) + updated_locations = frappe._dict() for item_doc in items: item_code = item_doc.item_code @@ -499,6 +515,9 @@ class PickList(Document): # aggregate qty for same item item_map = OrderedDict() for item in locations: + if item.picked_qty: + continue + if not item.item_code: frappe.throw(f"Row #{item.idx}: Item Code is Mandatory") if not cint( diff --git a/erpnext/stock/doctype/pick_list/test_pick_list.py b/erpnext/stock/doctype/pick_list/test_pick_list.py index ef74ec9d627..624b169b5ae 100644 --- a/erpnext/stock/doctype/pick_list/test_pick_list.py +++ b/erpnext/stock/doctype/pick_list/test_pick_list.py @@ -870,7 +870,7 @@ class TestPickList(FrappeTestCase): so = make_sales_order(item_code=item, qty=4, rate=100) pl = create_pick_list(so.name) - self.assertFalse(hasattr(pl, "locations")) + self.assertFalse(pl.locations) def test_pick_list_validation_for_serial_no(self): warehouse = "_Test Warehouse - _TC" @@ -901,7 +901,7 @@ class TestPickList(FrappeTestCase): so = make_sales_order(item_code=item, qty=4, rate=100) pl = create_pick_list(so.name) - self.assertFalse(hasattr(pl, "locations")) + self.assertFalse(pl.locations) def test_pick_list_validation_for_batch_no(self): warehouse = "_Test Warehouse - _TC" @@ -937,7 +937,7 @@ class TestPickList(FrappeTestCase): so = make_sales_order(item_code=item, qty=4, rate=100) pl = create_pick_list(so.name) - self.assertFalse(hasattr(pl, "locations")) + self.assertFalse(pl.locations) def test_pick_list_validation_for_batch_no_and_serial_item(self): warehouse = "_Test Warehouse - _TC" @@ -977,7 +977,7 @@ class TestPickList(FrappeTestCase): so = make_sales_order(item_code=item, qty=4, rate=100) pl = create_pick_list(so.name) - self.assertFalse(hasattr(pl, "locations")) + self.assertFalse(pl.locations) def test_pick_list_validation_for_multiple_batches_and_sales_order(self): warehouse = "_Test Warehouse - _TC" @@ -1172,6 +1172,7 @@ class TestPickList(FrappeTestCase): for row in pl.locations: row.qty = row.qty + 10 + row.picked_qty = row.qty self.assertRaises(frappe.ValidationError, pl.save) @@ -1266,3 +1267,42 @@ class TestPickList(FrappeTestCase): delivery_note = create_delivery_note(pl.name) self.assertEqual(len(delivery_note.items), 1) + + def test_pick_list_not_reset_batch(self): + warehouse = "_Test Warehouse - _TC" + item = make_item( + "Test Do Not Reset Picked Item", + properties={ + "is_stock_item": 1, + "has_batch_no": 1, + "create_new_batch": 1, + "batch_number_series": "BTH-PICKLT-.######", + }, + ).name + + se = make_stock_entry(item=item, to_warehouse=warehouse, qty=10) + batch1 = get_batch_from_bundle(se.items[0].serial_and_batch_bundle) + se = make_stock_entry(item=item, to_warehouse=warehouse, qty=10) + batch2 = get_batch_from_bundle(se.items[0].serial_and_batch_bundle) + + so = make_sales_order(item_code=item, qty=10, rate=100) + + pl = create_pick_list(so.name) + pl.save() + + for loc in pl.locations: + self.assertEqual(loc.batch_no, batch1) + loc.batch_no = batch2 + loc.picked_qty = 0.0 + + pl.save() + + for loc in pl.locations: + self.assertEqual(loc.batch_no, batch1) + loc.batch_no = batch2 + loc.picked_qty = 10.0 + + pl.save() + + for loc in pl.locations: + self.assertEqual(loc.batch_no, batch2) From 85910ec2f99f9bcb7c7ab1ffbe6fe01ecf312d9c Mon Sep 17 00:00:00 2001 From: Sudharsanan11 Date: Wed, 8 Jan 2025 13:51:33 +0530 Subject: [PATCH 0923/1614] fix: validate linked sales person (cherry picked from commit e614f0779553005d4b7947b8a40aaffad0159816) --- .../doctype/sales_person/sales_person.py | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/erpnext/setup/doctype/sales_person/sales_person.py b/erpnext/setup/doctype/sales_person/sales_person.py index b0e42de36d5..43c5afa313e 100644 --- a/erpnext/setup/doctype/sales_person/sales_person.py +++ b/erpnext/setup/doctype/sales_person/sales_person.py @@ -10,6 +10,7 @@ from frappe import _ from frappe.query_builder import Interval from frappe.query_builder.functions import Count, CurDate, UnixTimestamp from frappe.utils import flt +from frappe.utils.data import get_url_to_list from frappe.utils.nestedset import NestedSet, get_root_of from erpnext import get_default_currency @@ -42,6 +43,9 @@ class SalesPerson(NestedSet): nsm_parent_field = "parent_sales_person" def validate(self): + if not self.enabled: + self.validate_sales_person() + if not self.parent_sales_person: self.parent_sales_person = get_root_of("Sales Person") @@ -83,6 +87,25 @@ class SalesPerson(NestedSet): super().on_update() self.validate_one_root() + def validate_sales_person(self): + sales_team = frappe.qb.DocType("Sales Team") + + query = ( + frappe.qb.from_(sales_team) + .select(sales_team.sales_person) + .where((sales_team.sales_person == self.name) & (sales_team.parenttype == "Customer")) + .groupby(sales_team.sales_person) + ).run(as_dict=True) + + if query: + frappe.throw( + _("The Sales Person is linked with {0}").format( + frappe.bold( + f"""{"Customers"}""" + ) + ) + ) + def get_email_id(self): if self.employee: user = frappe.db.get_value("Employee", self.employee, "user_id") From 26676491e5b57245fa9cd30bceb5758a334434cf Mon Sep 17 00:00:00 2001 From: Nelly Traore Date: Sat, 30 Nov 2024 19:51:48 +0000 Subject: [PATCH 0924/1614] feat: add Syscohada charts of accounts (cherry picked from commit aa8254963c43f8b2ec8588f55fadef0d8f4fc1de) --- .../verified/bf_plan_comptable.json | 1919 ++++++++ .../verified/bf_plan_comptable_avec_code.json | 4208 ++++++++++++++++ .../verified/bj_plan_comptable.json | 1919 ++++++++ .../verified/bj_plan_comptable_avec_code.json | 4208 ++++++++++++++++ .../verified/cd_plan_comptable.json | 1919 ++++++++ .../verified/cd_plan_comptable_avec_code.json | 4208 ++++++++++++++++ .../verified/cf_plan_comptable.json | 1919 ++++++++ .../verified/cf_plan_comptable_avec_code.json | 4208 ++++++++++++++++ .../verified/cg_plan_comptable.json | 1919 ++++++++ .../verified/cg_plan_comptable_avec_code.json | 4208 ++++++++++++++++ .../verified/ci_plan_comptable.json | 1919 ++++++++ .../verified/ci_plan_comptable_avec_code.json | 4208 ++++++++++++++++ .../verified/cm_plan_comptable.json | 1919 ++++++++ .../verified/cm_plan_comptable_avec_code.json | 4208 ++++++++++++++++ .../verified/ga_plan_comptable.json | 1919 ++++++++ .../verified/ga_plan_comptable_avec_code.json | 4208 ++++++++++++++++ .../verified/gn_plan_comptable.json | 1919 ++++++++ .../verified/gn_plan_comptable_avec_code.json | 4208 ++++++++++++++++ .../verified/gq_plan_comptable.json | 1919 ++++++++ .../verified/gq_plan_comptable_avec_code.json | 4208 ++++++++++++++++ .../verified/gw_plan_comptable.json | 1919 ++++++++ .../verified/gw_plan_comptable_avec_code.json | 4208 ++++++++++++++++ .../verified/km_plan_comptable.json | 1919 ++++++++ .../verified/km_plan_comptable_avec_code.json | 4208 ++++++++++++++++ .../verified/ml_plan_comptable.json | 1919 ++++++++ .../verified/ml_plan_comptable_avec_code.json | 4208 ++++++++++++++++ .../verified/ne_plan_comptable.json | 1919 ++++++++ .../verified/ne_plan_comptable_avec_code.json | 4208 ++++++++++++++++ .../verified/sn_plan_comptable.json | 1919 ++++++++ .../verified/sn_plan_comptable_avec_code.json | 4208 ++++++++++++++++ .../verified/syscohada_chart_of_accounts.py | 34 + .../verified/syscohada_plan_comptable.json | 2892 +++++++++++ .../syscohada_plan_comptable_avec_code.json | 4209 +++++++++++++++++ .../verified/td_plan_comptable.json | 1919 ++++++++ .../verified/td_plan_comptable_avec_code.json | 4208 ++++++++++++++++ .../verified/tg_plan_comptable.json | 1919 ++++++++ .../verified/tg_plan_comptable_avec_code.json | 4208 ++++++++++++++++ 37 files changed, 111294 insertions(+) create mode 100644 erpnext/accounts/doctype/account/chart_of_accounts/verified/bf_plan_comptable.json create mode 100644 erpnext/accounts/doctype/account/chart_of_accounts/verified/bf_plan_comptable_avec_code.json create mode 100644 erpnext/accounts/doctype/account/chart_of_accounts/verified/bj_plan_comptable.json create mode 100644 erpnext/accounts/doctype/account/chart_of_accounts/verified/bj_plan_comptable_avec_code.json create mode 100644 erpnext/accounts/doctype/account/chart_of_accounts/verified/cd_plan_comptable.json create mode 100644 erpnext/accounts/doctype/account/chart_of_accounts/verified/cd_plan_comptable_avec_code.json create mode 100644 erpnext/accounts/doctype/account/chart_of_accounts/verified/cf_plan_comptable.json create mode 100644 erpnext/accounts/doctype/account/chart_of_accounts/verified/cf_plan_comptable_avec_code.json create mode 100644 erpnext/accounts/doctype/account/chart_of_accounts/verified/cg_plan_comptable.json create mode 100644 erpnext/accounts/doctype/account/chart_of_accounts/verified/cg_plan_comptable_avec_code.json create mode 100644 erpnext/accounts/doctype/account/chart_of_accounts/verified/ci_plan_comptable.json create mode 100644 erpnext/accounts/doctype/account/chart_of_accounts/verified/ci_plan_comptable_avec_code.json create mode 100644 erpnext/accounts/doctype/account/chart_of_accounts/verified/cm_plan_comptable.json create mode 100644 erpnext/accounts/doctype/account/chart_of_accounts/verified/cm_plan_comptable_avec_code.json create mode 100644 erpnext/accounts/doctype/account/chart_of_accounts/verified/ga_plan_comptable.json create mode 100644 erpnext/accounts/doctype/account/chart_of_accounts/verified/ga_plan_comptable_avec_code.json create mode 100644 erpnext/accounts/doctype/account/chart_of_accounts/verified/gn_plan_comptable.json create mode 100644 erpnext/accounts/doctype/account/chart_of_accounts/verified/gn_plan_comptable_avec_code.json create mode 100644 erpnext/accounts/doctype/account/chart_of_accounts/verified/gq_plan_comptable.json create mode 100644 erpnext/accounts/doctype/account/chart_of_accounts/verified/gq_plan_comptable_avec_code.json create mode 100644 erpnext/accounts/doctype/account/chart_of_accounts/verified/gw_plan_comptable.json create mode 100644 erpnext/accounts/doctype/account/chart_of_accounts/verified/gw_plan_comptable_avec_code.json create mode 100644 erpnext/accounts/doctype/account/chart_of_accounts/verified/km_plan_comptable.json create mode 100644 erpnext/accounts/doctype/account/chart_of_accounts/verified/km_plan_comptable_avec_code.json create mode 100644 erpnext/accounts/doctype/account/chart_of_accounts/verified/ml_plan_comptable.json create mode 100644 erpnext/accounts/doctype/account/chart_of_accounts/verified/ml_plan_comptable_avec_code.json create mode 100644 erpnext/accounts/doctype/account/chart_of_accounts/verified/ne_plan_comptable.json create mode 100644 erpnext/accounts/doctype/account/chart_of_accounts/verified/ne_plan_comptable_avec_code.json create mode 100644 erpnext/accounts/doctype/account/chart_of_accounts/verified/sn_plan_comptable.json create mode 100644 erpnext/accounts/doctype/account/chart_of_accounts/verified/sn_plan_comptable_avec_code.json create mode 100644 erpnext/accounts/doctype/account/chart_of_accounts/verified/syscohada_chart_of_accounts.py create mode 100644 erpnext/accounts/doctype/account/chart_of_accounts/verified/syscohada_plan_comptable.json create mode 100644 erpnext/accounts/doctype/account/chart_of_accounts/verified/syscohada_plan_comptable_avec_code.json create mode 100644 erpnext/accounts/doctype/account/chart_of_accounts/verified/td_plan_comptable.json create mode 100644 erpnext/accounts/doctype/account/chart_of_accounts/verified/td_plan_comptable_avec_code.json create mode 100644 erpnext/accounts/doctype/account/chart_of_accounts/verified/tg_plan_comptable.json create mode 100644 erpnext/accounts/doctype/account/chart_of_accounts/verified/tg_plan_comptable_avec_code.json diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/bf_plan_comptable.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/bf_plan_comptable.json new file mode 100644 index 00000000000..b7fcc55bd42 --- /dev/null +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/bf_plan_comptable.json @@ -0,0 +1,1919 @@ +{ + "country_code": "bf", + "name": "Syscohada - Plan Comptable", + "tree": { + "1-Comptes de ressources durables": { + "10-Capital": { + "101-Capital social": { + "1011-Capital souscrit, non appel\u00e9": {}, + "1012-Capital souscrit, appel\u00e9, non vers\u00e9": {}, + "1013-Capital souscrit, appel\u00e9, vers\u00e9, non amorti": {}, + "1014-Capital souscrit, appel\u00e9, vers\u00e9, amorti": {}, + "1018-Capital souscrit soumis \u00e0 des conditions particuli\u00e8res": {} + }, + "102-Capital par dotation": { + "1021-Dotation initiale": {}, + "1022-Dotations compl\u00e9mentaires": {}, + "1028-Autres dotations": {} + }, + "103-Capital personnel": {}, + "104-Compte de l\u2019exploitant": { + "1041-Apports temporaires": {}, + "1042-Op\u00e9rations courantes": {}, + "1043-R\u00e9mun\u00e9rations, imp\u00f4ts et autres charges personnelles": {}, + "1047-Pr\u00e9l\u00e8vements d\u2019autoconsommation": {}, + "1048-Autres pr\u00e9l\u00e8vements": {} + }, + "105-Primes li\u00e9es au capital social": { + "1051-Primes d\u2019\u00e9mission": {}, + "1052-Primes d\u2019apport": {}, + "1053-Primes de fusion": {}, + "1054-Primes de conversion": {}, + "1058-Autres primes": {} + }, + "106-\u00c9carts de r\u00e9\u00e9valuation": { + "1061-\u00c9carts de r\u00e9\u00e9valuation l\u00e9gale": {}, + "1062-\u00c9carts de r\u00e9\u00e9valuation libre": {} + }, + "109-Apporteurs, capital souscrit, non appel\u00e9": {} + }, + "11-R\u00e9serves": { + "111-R\u00e9serve l\u00e9gale": {}, + "112-R\u00e9serves statutaires ou contractuelles": {}, + "113-R\u00e9serves r\u00e9glement\u00e9es": { + "1131-R\u00e9serves de plus-values nettes \u00e0 long terme": {}, + "1132-R\u00e9serves d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": {}, + "1133-R\u00e9serves cons\u00e9cutives \u00e0 l\u2019octroi de subventions d\u2019investissement": {}, + "1134-R\u00e9serves des valeurs mobili\u00e8res donnant acc\u00e8s au capital": {}, + "1135-Autres r\u00e9serves r\u00e9glement\u00e9es": {} + }, + "118-Autres r\u00e9serves": { + "1181-R\u00e9serves facultatives": {}, + "1188-R\u00e9serves diverses": {} + } + }, + "12-Report \u00e0 nouveau": { + "121-Report \u00e0 nouveau cr\u00e9diteur": {}, + "129-Report \u00e0 nouveau d\u00e9biteur": { + "1291-Perte nette \u00e0 reporter": {}, + "1292-Perte Amortissements r\u00e9put\u00e9s diff\u00e9r\u00e9s": {} + } + }, + "13-R\u00e9sultat net de l\u2019exercice": { + "130-R\u00e9sultat en instance d\u2019affectation": { + "1301-R\u00e9sultat en instance d\u2019affectation : b\u00e9n\u00e9fice": {}, + "1309-R\u00e9sultat en instance d\u2019affectation : perte": {} + }, + "131-R\u00e9sultat net : b\u00e9n\u00e9fice": {}, + "132-Marge commerciale (MC)": {}, + "133-Valeur ajout\u00e9e (VA)": {}, + "134-Exc\u00e9dent brut d\u2019exploitation (EBE)": {}, + "135-R\u00e9sultat d\u2019exploitation (RE)": {}, + "136-R\u00e9sultat financier (RF)": {}, + "137-R\u00e9sultat des activit\u00e9s ordinaires (RAO)": {}, + "138-R\u00e9sultat hors activit\u00e9s ordinaires (RHAO)": { + "1381-R\u00e9sultat de fusion": {}, + "1382-R\u00e9sultat d\u2019apport partiel d\u2019actif": {}, + "1383-R\u00e9sultat de scission": {}, + "1384-R\u00e9sultat de liquidation": {} + }, + "139-R\u00e9sultat net : perte": {} + }, + "14-Subventions d\u2019investissement": { + "141-Subventions d\u2019\u00e9quipement": { + "1411-\u00c9tat": {}, + "1412-R\u00e9gions": {}, + "1413-D\u00e9partements": {}, + "1414-Communes et collectivit\u00e9s publiques d\u00e9centralis\u00e9es": {}, + "1415-Entit\u00e9s publiques ou mixtes": {}, + "1416-Entit\u00e9s et organismes priv\u00e9s": {}, + "1417-Organismes internationaux": {}, + "1418-Autres": {} + }, + "148-Autres subventions d\u2019investissement": {} + }, + "15-Provisions r\u00e9glement\u00e9es et fonds assimil\u00e9s": { + "151-Amortissements d\u00e9rogatoires": {}, + "152-Plus-values de cession \u00e0 r\u00e9investir": {}, + "153-Fonds r\u00e9glement\u00e9s": { + "1531-Fonds National": {}, + "1532-Pr\u00e9l\u00e8vement pour le Budget": {} + }, + "154-Provisions sp\u00e9ciales de r\u00e9\u00e9valuation": {}, + "155-Provisions r\u00e9glement\u00e9es relatives aux immobilisations": { + "1551-Reconstitution des gisements miniers et p\u00e9troliers": {} + }, + "156-Provisions r\u00e9glement\u00e9es relatives aux stocks": { + "1561-Hausse de prix": {}, + "1562-Fluctuation des cours": {} + }, + "157-Provisions pour investissement": {}, + "158-Autres provisions et fonds r\u00e9glement\u00e9s": {} + }, + "16-Emprunts et dettes assimil\u00e9es": { + "161-Emprunts obligataires": { + "1611-Emprunts obligataires ordinaires": {}, + "1612-Emprunts obligataires convertibles en actions": {}, + "1613-Emprunts obligataires remboursables en actions": {}, + "1618-Autres emprunts obligataires": {} + }, + "162-Emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": {}, + "163-Avances re\u00e7ues de l\u2019\u00c9tat": {}, + "164-Avances re\u00e7ues et comptes courants bloqu\u00e9s": {}, + "165-D\u00e9p\u00f4ts et cautionnements re\u00e7us": { + "1651-D\u00e9p\u00f4ts": {}, + "1652-Cautionnements": {} + }, + "166-Int\u00e9r\u00eats courus": { + "1661-Sur emprunts obligataires": {}, + "1662-Sur emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": {}, + "1663-Sur avances re\u00e7ues de l\u2019\u00c9tat": {}, + "1664-Sur avances re\u00e7ues et comptes courants bloqu\u00e9s": {}, + "1665-Sur d\u00e9p\u00f4ts et cautionnements re\u00e7us": {}, + "1667-Sur avances assorties de conditions particuli\u00e8res": {}, + "1668-Sur autres emprunts et dettes": {} + }, + "167-Avances assorties de conditions particuli\u00e8res": { + "1671-Avances bloqu\u00e9es pour augmentation du capital": {}, + "1672-Avances conditionn\u00e9es par l\u2019\u00c9tat": {}, + "1673-Avances conditionn\u00e9es par les autres organismes africains": {}, + "1674-Avances conditionn\u00e9es par les organismes internationaux": {} + }, + "168-Autres emprunts et dettes": { + "1681-Rentes viag\u00e8res capitalis\u00e9es": {}, + "1682-Billets de fonds": {}, + "1683-Dettes cons\u00e9cutives \u00e0 des titres emprunt\u00e9s": {}, + "1684-Emprunts participatifs": {}, + "1685-Participation des travailleurs aux b\u00e9n\u00e9fices": {}, + "1686-Emprunts et dettes contract\u00e9s aupr\u00e8s des autres tiers": {} + } + }, + "17-Dettes de location acquisition": { + "172-Dettes de location acquisition / cr\u00e9dit bail immobilier": {}, + "173-Dettes de location acquisition / cr\u00e9dit bail mobilier": {}, + "174-Dettes de location acquisition / location de vente": {}, + "176-Int\u00e9r\u00eats courus": { + "1762-Sur dettes de location acquisition / cr\u00e9dit-bail immobilier": {}, + "1763-Sur dettes de location acquisition / cr\u00e9dit-bail mobilier": {}, + "1764-Sur dettes de location acquisition / location-vente": {}, + "1768-Sur autres dettes de location acquisition": {} + }, + "178-Autres dettes de location acquisition": {} + }, + "18-Dettes li\u00e9es \u00e0 des participations et comptes de liaison des \u00e9tablissements et soci\u00e9t\u00e9s en participation": { + "181-Dettes li\u00e9es \u00e0 des participations": { + "1811-Dettes li\u00e9es \u00e0 des participations (groupe)": {}, + "1812-Dettes li\u00e9es \u00e0 des participations (hors groupe)": {} + }, + "182-Dettes li\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": {}, + "183-Int\u00e9r\u00eats courus sur dettes li\u00e9es \u00e0 des participations": {}, + "184-Comptes permanents bloqu\u00e9s des \u00e9tablissements et succursales": {}, + "185-Comptes permanents non bloqu\u00e9s des \u00e9tablissements et succursales": {}, + "186-Comptes de liaison charges": {}, + "187-Comptes de liaison produits": {}, + "188-Comptes de liaison des soci\u00e9t\u00e9s en participation": {} + }, + "19-Provisions pour risques et charges": { + "191-Provisions pour litiges": {}, + "192-Provisions pour garanties donn\u00e9es aux clients": {}, + "193-Provisions pour pertes sur march\u00e9s \u00e0 ach\u00e8vement futur": {}, + "194-Provisions pour pertes de change": {}, + "195-Provisions pour imp\u00f4ts": {}, + "196-Provisions pour pensions et obligations similaires": { + "1961-Provisions pour pensions et obligations similaires engagement de retraite": {}, + "1962-Actif du r\u00e9gime de retraite": {} + }, + "197-Provisions pour restructuration": {}, + "198-Autres provisions pour risques et charges": { + "1981-Provisions pour amendes et p\u00e9nalit\u00e9s": {}, + "1983-Provisions pour propre assureur": {}, + "1984-Provisions pour d\u00e9mant\u00e8lement et remise en \u00e9tat": {}, + "1985-Provisions pour droits \u00e0 r\u00e9duction ou avantage en nature (ch\u00e8ques cadeau, cartes de fid\u00e9lit\u00e9...)": {}, + "1988-Provisions pour divers risques et charges": {} + } + }, + "root_type": "Equity" + }, + "2-Comptes d\u2019actif immobilis\u00e9": { + "21-Immobilisations incorporelles": { + "account_type": "Fixed Asset", + "211-Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset" + }, + "212-Brevets, licences, concessions et droits similaires": { + "account_type": "Fixed Asset", + "2121-Brevets": { + "account_type": "Fixed Asset" + }, + "2122-Licences": { + "account_type": "Fixed Asset" + }, + "2123-Concessions de service public": { + "account_type": "Fixed Asset" + }, + "2128-Autres concessions et droits similaires": { + "account_type": "Fixed Asset" + } + }, + "213-Logiciels et sites internet": { + "account_type": "Fixed Asset", + "2131-Logiciels": { + "account_type": "Fixed Asset" + }, + "2132-Sites internet": { + "account_type": "Fixed Asset" + } + }, + "214-Marques": { + "account_type": "Fixed Asset" + }, + "215-Fonds commercial": { + "account_type": "Fixed Asset" + }, + "216-Droit au bail": { + "account_type": "Fixed Asset" + }, + "217-Investissements de cr\u00e9ation": { + "account_type": "Fixed Asset" + }, + "218-Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset", + "2181-Frais de prospection et d\u2019\u00e9valuation de ressources min\u00e9rales": { + "account_type": "Fixed Asset" + }, + "2182-Co\u00fbts d\u2019obtention du contrat": { + "account_type": "Fixed Asset" + }, + "2183-Fichiers clients, notices, titres de journaux et magazines": { + "account_type": "Fixed Asset" + }, + "2184-Co\u00fbts des franchises": { + "account_type": "Fixed Asset" + }, + "2188-Divers droits et valeurs incorporelles": { + "account_type": "Fixed Asset" + } + }, + "219-Immobilisations incorporelles en cours": { + "account_type": "Fixed Asset", + "2191-Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset" + }, + "2193-Logiciels et internet": { + "account_type": "Fixed Asset" + }, + "2198-Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset" + } + } + }, + "22-Terrains": { + "account_type": "Fixed Asset", + "221-Terrains agricoles et forestiers": { + "account_type": "Fixed Asset", + "2211-Terrains d\u2019exploitation agricole": { + "account_type": "Fixed Asset" + }, + "2212-Terrains d\u2019exploitation foresti\u00e8re": { + "account_type": "Fixed Asset" + }, + "2218-Autres terrains": { + "account_type": "Fixed Asset" + } + }, + "222-Terrains nus": { + "account_type": "Fixed Asset", + "2221-Terrains \u00e0 b\u00e2tir": { + "account_type": "Fixed Asset" + }, + "2228-Autres terrains nus": { + "account_type": "Fixed Asset" + } + }, + "223-Terrains b\u00e2tis": { + "account_type": "Fixed Asset", + "2231-Pour b\u00e2timents industriels et agricoles": { + "account_type": "Fixed Asset" + }, + "2232-Pour b\u00e2timents administratifs et commerciaux": { + "account_type": "Fixed Asset" + }, + "2234-Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations professionnelles": { + "account_type": "Fixed Asset" + }, + "2235-Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations non professionnelles": { + "account_type": "Fixed Asset" + }, + "2238-Autres terrains b\u00e2tis": { + "account_type": "Fixed Asset" + } + }, + "224-Travaux de mise en valeur des terrains": { + "account_type": "Fixed Asset", + "2241-Plantation d\u2019arbres et d\u2019arbustes": { + "account_type": "Fixed Asset" + }, + "2245-Am\u00e9liorations du fonds": { + "account_type": "Fixed Asset" + }, + "2248-Autres travaux": { + "account_type": "Fixed Asset" + } + }, + "225-Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset", + "2251-Carri\u00e8res": { + "account_type": "Fixed Asset" + } + }, + "226-Terrains am\u00e9nag\u00e9s": { + "account_type": "Fixed Asset", + "2261-Parkings": { + "account_type": "Fixed Asset" + } + }, + "227-Terrains mis en concession": { + "account_type": "Fixed Asset" + }, + "228-Autres terrains": { + "account_type": "Fixed Asset", + "2281-Terrains immeubles de placement": { + "account_type": "Fixed Asset" + }, + "2285-Terrains des logements affect\u00e9s au personnel": { + "account_type": "Fixed Asset" + }, + "2286-Terrains de location acquisition": { + "account_type": "Fixed Asset" + }, + "2288-Divers terrains": { + "account_type": "Fixed Asset" + } + }, + "229-Am\u00e9nagements de terrains en cours": { + "account_type": "Fixed Asset", + "2291-Terrains agricoles et forestiers": { + "account_type": "Fixed Asset" + }, + "2292-Terrains nus": { + "account_type": "Fixed Asset" + }, + "2295-Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset" + }, + "2298-Autres terrains": { + "account_type": "Fixed Asset" + } + } + }, + "23-B\u00e2timents, installations techniques et agencements": { + "231-B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "2311-B\u00e2timents industriels": {}, + "2312-B\u00e2timents agricoles": {}, + "2313-B\u00e2timents administratifs et commerciaux": {}, + "2314-B\u00e2timents affect\u00e9s au logement du personnel": {}, + "2315-B\u00e2timents immeubles de placement": {}, + "2316-B\u00e2timents de location acquisition": {} + }, + "232-B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "2321-B\u00e2timents industriels": {}, + "2322-B\u00e2timents agricoles": {}, + "2323-B\u00e2timents administratifs et commerciaux": {}, + "2324-B\u00e2timents affect\u00e9s au logement du personnel": {}, + "2325-B\u00e2timents immeubles de placement": {}, + "2326-B\u00e2timents de location acquisition": {} + }, + "233-Ouvrages d\u2019infrastructure": { + "2331-Voies de terre": {}, + "2332-Voies de fer": {}, + "2333-Voies d\u2019eau": {}, + "2334-Barrages, Digues": {}, + "2335-Pistes d\u2019a\u00e9rodrome": {}, + "2338-Autres ouvrages d\u2019infrastructures": {} + }, + "234-Am\u00e9nagements, agencements et installations techniques": { + "2341-Installations complexes sp\u00e9cialis\u00e9es sur sol propre": {}, + "2342-Installations complexes sp\u00e9cialis\u00e9es sur sol d\u2019autrui": {}, + "2343-Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol propre": {}, + "2344-Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol d\u2019autrui": {}, + "2345-Am\u00e9nagements et agencements des b\u00e2timents": {} + }, + "235-Am\u00e9nagements de bureaux": { + "2351-Installations g\u00e9n\u00e9rales": {}, + "2358-Autres am\u00e9nagements de bureaux": {} + }, + "237-B\u00e2timents industriels, agricoles et commerciaux mis en concession": {}, + "238-Autres installations et agencements": {}, + "239-B\u00e2timents am\u00e9nagements, agencements et installations en cours": { + "2391-B\u00e2timents en cours": {}, + "2392-Installations en cours": {}, + "2393-Ouvrages d\u2019infrastructure en cours": {}, + "2394-Am\u00e9nagements et agencements et installations techniques en cours": {}, + "2395-Am\u00e9nagements de bureaux en cours": {}, + "2398-Autres installations et agencements en cours": {} + } + }, + "24-Mat\u00e9riel, mobilier et actifs biologiques": { + "241-Mat\u00e9riel et outillage industriel et commercial": { + "2411-Mat\u00e9riel industriel": {}, + "2412-Outillage industriel": {}, + "2413-Mat\u00e9riel commercial": {}, + "2414-Outillage commercial": {}, + "2416-Mat\u00e9riel & outillage industriel et commercial de location-acquisition": {} + }, + "242-Mat\u00e9riel et outillage agricole": { + "2421-Mat\u00e9riel agricole": {}, + "2422-Outillage agricole": {}, + "2426-Mat\u00e9riel & outillage agricole de location-acquisition": {} + }, + "243-Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "244-Mat\u00e9riel et mobilier": { + "2441-Mat\u00e9riel de bureau": {}, + "2442-Mat\u00e9riel informatique": {}, + "2443-Mat\u00e9riel bureautique": {}, + "2444-Mobilier de bureau": {}, + "2445-Mat\u00e9riel et mobilier immeubles de placement": {}, + "2446-Mat\u00e9riel et mobilier de location acquisition": {}, + "2447-Mat\u00e9riel et mobilier des logements du personnel": {} + }, + "245-Mat\u00e9riel de transport": { + "2451-Mat\u00e9riel automobile": {}, + "2452-Mat\u00e9riel ferroviaire": {}, + "2453-Mat\u00e9riel fluvial, lagunaire": {}, + "2454-Mat\u00e9riel naval": {}, + "2455-Mat\u00e9riel a\u00e9rien": {}, + "2456-Mat\u00e9riel de transport de location-acquisition": {}, + "2457-Mat\u00e9riel hippomobile": {}, + "2458-Autres mat\u00e9riels de transport": {} + }, + "246-Actifs biologiques": { + "2461-Cheptel, animaux de trait": {}, + "2462-Cheptel, animaux reproducteurs": {}, + "2463-Animaux de garde": {}, + "2465-Plantations agricoles": {}, + "2468-Autres actifs biologiques": {} + }, + "247-Agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "2471-Agencements et am\u00e9nagements du mat\u00e9riel": {}, + "2472-Agencements et am\u00e9nagements des actifs biologiques": {}, + "2478-Autres agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": {} + }, + "248-Autres mat\u00e9riels et mobiliers": { + "2481-Collections et \u0153uvres d\u2019art": {}, + "2488-Divers mat\u00e9riels mobiliers": {} + }, + "249-Mat\u00e9riels et actifs biologiques en cours": { + "2491-Mat\u00e9riel et outillage industriel et commercial": {}, + "2492-Mat\u00e9riel et outillage agricole": {}, + "2493-Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "2494-Mat\u00e9riel et mobilier de bureau": {}, + "2495-Mat\u00e9riel de transport": {}, + "2496-Actifs biologiques": {}, + "2497-Agencements am\u00e9nagements du mat\u00e9riel et actifs biologiques": {}, + "2498-Autres mat\u00e9riels et actifs biologiques en cours": {} + } + }, + "25-Avances et acomptes vers\u00e9s sur immobilisations": { + "251-Avances et acomptes vers\u00e9s sur immobilisations incorporelles": {}, + "252-Avances et acomptes vers\u00e9s sur immobilisations corporelles": {} + }, + "26-Titres de participation": { + "261-Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": {}, + "262-Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le conjoint": {}, + "263-Titres de participation dans des soci\u00e9t\u00e9s conf\u00e9rant une influence notable": {}, + "265-Participations dans des organismes professionnels": {}, + "266-Parts dans des groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": {}, + "268-Autres titres de participation": {} + }, + "27-Autres immobilisations financi\u00e8res": { + "271-Pr\u00eats et cr\u00e9ances": { + "2711-Pr\u00eats participatifs": {}, + "2712-Pr\u00eats aux associ\u00e9s": {}, + "2713-Billets de fonds": {}, + "2714-Titres pr\u00eat\u00e9s": {}, + "2718-Autres pr\u00eats et cr\u00e9ances": {} + }, + "272-Pr\u00eats au personnel": { + "2721-Pr\u00eats immobiliers": {}, + "2722-Pr\u00eats mobiliers et d\u2019installation": {}, + "2728-Autres pr\u00eats au personnel": {} + }, + "273-Cr\u00e9ances sur l\u2019\u00c9tat": { + "2731-Retenues de garantie": {}, + "2733-Fonds r\u00e9glement\u00e9": {}, + "2734-Cr\u00e9ances sur le conc\u00e9dant": {}, + "2738-Autres cr\u00e9ances sur l\u2019\u00c9tat": {} + }, + "274-Titres immobilis\u00e9s": { + "2741-Titres immobilis\u00e9s de l\u2019activit\u00e9 de portefeuille (TIAP)": {}, + "2742-Titres participatifs": {}, + "2743-Certificats d\u2019investissement": {}, + "2744-Parts de fonds commun de placement (FCP)": {}, + "2745-Obligations": {}, + "2746-Actions ou parts propres": {}, + "2748-Autres titres immobilis\u00e9s": {} + }, + "275-D\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "2751-D\u00e9p\u00f4ts pour loyers d\u2019avance": {}, + "2752-D\u00e9p\u00f4ts pour l\u2019\u00e9lectricit\u00e9": {}, + "2753-D\u00e9p\u00f4ts pour l\u2019eau": {}, + "2754-D\u00e9p\u00f4ts pour le gaz": {}, + "2755-D\u00e9p\u00f4ts pour le t\u00e9l\u00e9phone, le t\u00e9lex, la t\u00e9l\u00e9copie": {}, + "2756-Cautionnements sur march\u00e9s publics": {}, + "2757-Cautionnements sur autres op\u00e9rations": {}, + "2758-Autres d\u00e9p\u00f4ts et cautionnements": {} + }, + "276-Int\u00e9r\u00eats courus": { + "2761-Pr\u00eats et cr\u00e9ances non commerciales": {}, + "2762-Pr\u00eats au personnel": {}, + "2763-Cr\u00e9ances sur l\u2019\u00c9tat": {}, + "2764-Titres immobilis\u00e9s": {}, + "2765-D\u00e9p\u00f4ts et cautionnements vers\u00e9s": {}, + "2767-Cr\u00e9ances rattach\u00e9es \u00e0 des participations": {}, + "2768-Immobilisations financi\u00e8res diverses": {} + }, + "277-Cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": { + "2771-Cr\u00e9ances rattach\u00e9es \u00e0 des participations (groupe)": {}, + "2772-Cr\u00e9ances rattach\u00e9es \u00e0 des participations (hors groupe)": {}, + "2773-Cr\u00e9ances rattach\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": {}, + "2774-Avances \u00e0 des Groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": {} + }, + "278-Immobilisations financi\u00e8res diverses": { + "2781-Cr\u00e9ances diverses groupe": {}, + "2782-Cr\u00e9ances diverses hors groupe": {}, + "2784-Banques d\u00e9p\u00f4ts \u00e0 terme": {}, + "2785-Or et m\u00e9taux pr\u00e9cieux": {}, + "2788-Autres immobilisations financi\u00e8res": {} + } + }, + "28-Amortissements": { + "account_type": "Accumulated Depreciation", + "281-Amortissements des immobilisations corporelles": { + "account_type": "Accumulated Depreciation", + "2811-Amortissements des frais de d\u00e9veloppement": { + "account_type": "Accumulated Depreciation" + }, + "2812-Amortissements des brevets, licences, concessions et droits similaires": { + "account_type": "Accumulated Depreciation" + }, + "2813-Amortissements des logiciels et sites internet": { + "account_type": "Accumulated Depreciation" + }, + "2814-Amortissements des marques": { + "account_type": "Accumulated Depreciation" + }, + "2815-Amortissements du fonds commercial": { + "account_type": "Accumulated Depreciation" + }, + "2816-Amortissements du droit au bail": { + "account_type": "Accumulated Depreciation" + }, + "2817-Amortissements des investissements de cr\u00e9ation": { + "account_type": "Accumulated Depreciation" + }, + "2818-Amortissements des autres droits et valeurs incorporels": { + "account_type": "Accumulated Depreciation" + } + }, + "282-Amortissements des terrains": { + "2824-Amortissements des travaux de mise en valeur des terrains": {} + }, + "283-Amortissements des b\u00e2timents, installations techniques et agencements": { + "2831-Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": {}, + "2832-Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": {}, + "2833-Amortissements des ouvrages d\u2019infrastructure": {}, + "2834-Amortissements des am\u00e9nagements, agencements et installations techniques": {}, + "2835-Amortissements des am\u00e9nagements de bureaux": {}, + "2837-Amortissements des b\u00e2timents industriels, agricoles et commerciaux mis en concession": {}, + "2838-Amortissements des autres installations et agencements": {} + }, + "284-Amortissements du mat\u00e9riel": { + "2841-Amortissements du mat\u00e9riel et outillage industriel et commercial": {}, + "2842-Amortissements du mat\u00e9riel et outillage agricole": {}, + "2843-Amortissements du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "2844-Amortissements du mat\u00e9riel et mobilier": {}, + "2845-Amortissements du mat\u00e9riel de transport": {}, + "2846-Amortissements des actifs biologiques": {}, + "2847-Amortissements des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": {}, + "2848-Amortissements des autres mat\u00e9riels": {} + } + }, + "29-D\u00e9pr\u00e9ciations des immobilisations": { + "291-D\u00e9pr\u00e9ciations des immobilisations incorporelles": { + "2911-D\u00e9pr\u00e9ciations des frais de d\u00e9veloppement": {}, + "2912-D\u00e9pr\u00e9ciations des brevets, licences, concessions et droits similaires": {}, + "2913-D\u00e9pr\u00e9ciations des logiciels et sites internet": {}, + "2914-D\u00e9pr\u00e9ciations des marques": {}, + "2915-D\u00e9pr\u00e9ciations du fonds commercial": {}, + "2916-D\u00e9pr\u00e9ciations du droit au bail": {}, + "2917-D\u00e9pr\u00e9ciations des investissements de cr\u00e9ation": {}, + "2918-D\u00e9pr\u00e9ciations des autres droits et valeurs incorporels": {}, + "2919-D\u00e9pr\u00e9ciations des immobilisations incorporelles en cours": {} + }, + "292-D\u00e9pr\u00e9ciations des terrains": { + "2921-D\u00e9pr\u00e9ciations des terrains agricoles et forestiers": {}, + "2922-D\u00e9pr\u00e9ciations des terrains nus": {}, + "2923-D\u00e9pr\u00e9ciations des terrains b\u00e2tis": {}, + "2924-D\u00e9pr\u00e9ciations des travaux de mise en valeur des terrains": {}, + "2925-D\u00e9pr\u00e9ciations des terrains de gisement": {}, + "2926-D\u00e9pr\u00e9ciations des terrains am\u00e9nag\u00e9s": {}, + "2927-D\u00e9pr\u00e9ciations des terrains mis en concession": {}, + "2928-D\u00e9pr\u00e9ciations des autres terrains": {}, + "2929-D\u00e9pr\u00e9ciations des am\u00e9nagements de terrains en cours": {} + }, + "293-D\u00e9pr\u00e9ciations des b\u00e2timents, installations techniques et agencements": { + "2931-D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": {}, + "2932-D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": {}, + "2933-D\u00e9pr\u00e9ciations des ouvrages d\u2019infrastructures": {}, + "2934-D\u00e9pr\u00e9ciations des am\u00e9nagements, agencements et installations techniques": {}, + "2935-D\u00e9pr\u00e9ciations des am\u00e9nagements de bureaux": {}, + "2937-D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles et commerciaux mis en concession": {}, + "2938-D\u00e9pr\u00e9ciations des autres installations et agencements": {}, + "2939-D\u00e9pr\u00e9ciations des b\u00e2timents et installations en cours": {} + }, + "294-D\u00e9pr\u00e9ciations de mat\u00e9riel, du mobilier et de l\u2019actif biologique": { + "2941-D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage industriel et commercial": {}, + "2942-D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage agricole": {}, + "2943-D\u00e9pr\u00e9ciations du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "2944-D\u00e9pr\u00e9ciations du mat\u00e9riel et mobilier": {}, + "2945-D\u00e9pr\u00e9ciations du mat\u00e9riel de transport": {}, + "2946-D\u00e9pr\u00e9ciations des actifs biologiques": {}, + "2947-D\u00e9pr\u00e9ciations des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": {}, + "2948-D\u00e9pr\u00e9ciations des autres mat\u00e9riels": {}, + "2949-D\u00e9pr\u00e9ciations de mat\u00e9riel en cours": {} + }, + "295-D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations": { + "2951-D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations incorporelles": {}, + "2952-D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations corporelles": {} + }, + "296-D\u00e9pr\u00e9ciations des titres de participation": { + "2961-D\u00e9pr\u00e9ciations des titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": {}, + "2962-D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s sous contr\u00f4le conjoint": {}, + "2963-D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s conf\u00e9rant une influence notable": {}, + "2965-D\u00e9pr\u00e9ciations des participations dans des organismes professionnels": {}, + "2966-D\u00e9pr\u00e9ciations des parts dans des GIE": {}, + "2968-D\u00e9pr\u00e9ciations des autres titres de participation": {} + }, + "297-D\u00e9pr\u00e9ciations des autres immobilisations financi\u00e8res": { + "2971-D\u00e9pr\u00e9ciations des pr\u00eats et cr\u00e9ances": {}, + "2972-D\u00e9pr\u00e9ciations des pr\u00eats au personnel": {}, + "2973-D\u00e9pr\u00e9ciations des cr\u00e9ances sur l\u2019\u00c9tat": {}, + "2974-D\u00e9pr\u00e9ciations des titres immobilis\u00e9s": {}, + "2975-D\u00e9pr\u00e9ciations des d\u00e9p\u00f4ts et cautionnements vers\u00e9s": {}, + "2977-D\u00e9pr\u00e9ciations des cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": {}, + "2978-D\u00e9pr\u00e9ciations des cr\u00e9ances financi\u00e8res diverses": {} + } + }, + "root_type": "Asset" + }, + "3-Comptes de Stocks": { + "31-Marchandises": { + "311-Marchandises A": { + "3111-Marchandises A1": {}, + "3112-Marchandises A2": {} + }, + "312-Marchandises B": { + "3121-Marchandises B1": {}, + "3122-Marchandises B2": {} + }, + "313-Actifs biologiques": { + "3131-Animaux": {}, + "3132-V\u00e9g\u00e9taux": {} + }, + "318-Marchandises hors activit\u00e9s ordinaires (HAO)": {} + }, + "32-Mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "321-Mati\u00e8res A": {}, + "322-Mati\u00e8res B": {}, + "323-Fournitures (A, B)": {} + }, + "33-Autres approvisionnements": { + "331-Mati\u00e8res consommables": {}, + "332-Fournitures d\u2019atelier et d\u2019usine": {}, + "333-Fournitures de magasin": {}, + "334-Fournitures de bureau": {}, + "335-Emballages": { + "3351-Emballages perdus": {}, + "3352-Emballages r\u00e9cup\u00e9rables non identifiables": {}, + "3353-Emballages \u00e0 usage mixte": {}, + "3358-Autres emballages": {} + }, + "338-Autres mati\u00e8res": {} + }, + "34-Produits en cours": { + "341-Produits en cours": { + "3411-Produits en cours P1": {}, + "3412-Produits en cours P2": {} + }, + "342-Travaux en cours": { + "3421-Travaux en cours T1": {}, + "3422-Travaux en cours T2": {} + }, + "343-Produits interm\u00e9diaires en cours": { + "3431-Produits interm\u00e9diaires A": {}, + "3432-Produits interm\u00e9diaires B": {} + }, + "344-Produits r\u00e9siduels en cours": { + "3441-Produits r\u00e9siduels A": {}, + "3442-Produits r\u00e9siduels B": {} + }, + "345-Actifs biologiques en cours": { + "3451-Animaux": {}, + "3452-V\u00e9g\u00e9taux": {} + } + }, + "35-Services en cours": { + "351-\u00c9tudes en cours": { + "3511-\u00c9tudes en cours E1": {}, + "3512-\u00c9tudes en cours E2": {} + }, + "352-Prestations de services en cours": { + "3521-Prestations de services S1": {}, + "3522-Prestations de services S2": {} + } + }, + "36-Produits finis": { + "361-Produits finis A": {}, + "362-Produits finis B": {}, + "363-Actifs biologiques": { + "3631-Animaux": {}, + "3632-V\u00e9g\u00e9taux": {}, + "3638-Autres stocks (activit\u00e9s annexes)": {} + } + }, + "37-Produits interm\u00e9diaires et r\u00e9siduels": { + "371-Produits interm\u00e9diaires": { + "3711-Produits interm\u00e9diaires A": {}, + "3712-Produits interm\u00e9diaires B": {} + }, + "372-Produits r\u00e9siduels": { + "3721-D\u00e9chets": {}, + "3722-Rebuts": {}, + "3723-Mati\u00e8res de R\u00e9cup\u00e9ration": {} + }, + "373-Actifs biologiques": { + "3731-Animaux": {}, + "3732-V\u00e9g\u00e9taux": {}, + "3738-Autres stocks (activit\u00e9s annexes)": {} + } + }, + "38-Stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": { + "account_type": "Stock", + "381-Marchandises en cours de route": {}, + "382-Mati\u00e8res premi\u00e8res et fournitures li\u00e9es en cours de route": {}, + "383-Autres approvisionnements en cours de route": {}, + "386-Produits finis en cours de route": {}, + "387-Stock en consignation ou en d\u00e9p\u00f4t": { + "3871-Stock en consignation": {}, + "3872-Stock en d\u00e9p\u00f4t": {} + }, + "388-Stock provenant d\u2019immobilisations mises hors service ou au rebut": {} + }, + "39-D\u00e9pr\u00e9ciations des stocks et encours de production": { + "391-D\u00e9pr\u00e9ciations des stocks de marchandises": {}, + "392-D\u00e9pr\u00e9ciations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": {}, + "393-D\u00e9pr\u00e9ciations des stocks d\u2019autres approvisionnements": {}, + "394-D\u00e9pr\u00e9ciations des productions en cours": {}, + "395-D\u00e9pr\u00e9ciations des services en cours": {}, + "396-D\u00e9pr\u00e9ciations des stocks de produits finis": {}, + "397-D\u00e9pr\u00e9ciations des stocks de produits interm\u00e9diaires et r\u00e9siduels": {}, + "398-D\u00e9pr\u00e9ciations des stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": {} + }, + "root_type": "Asset" + }, + "4-Comptes de Tiers (ACTIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (ACTIF)": { + "409-Fournisseurs d\u00e9biteurs": { + "4091-Fournisseurs Avances et acomptes vers\u00e9s": {}, + "4092-Fournisseurs Groupe avances et acomptes vers\u00e9s": {}, + "4093-Fournisseurs Sous-traitants avances et acomptes vers\u00e9s": {}, + "4094-Fournisseurs Cr\u00e9ances pour emballages et mat\u00e9riels \u00e0 rendre": {}, + "4098-Fournisseurs Rabais, remises, ristournes et autres avoirs \u00e0 obtenir": {} + } + }, + "41-Clients et comptes rattach\u00e9s (ACTIF)": { + "411-Clients": { + "4111-Clients": { + "account_type": "Receivable" + }, + "4112-Clients groupe": { + "account_type": "Receivable" + }, + "4114-Clients, \u00c9tat et Collectivit\u00e9s publiques": { + "account_type": "Receivable" + }, + "4115-Clients, organismes internationaux": { + "account_type": "Receivable" + }, + "4116-Clients, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Receivable" + }, + "4117-Client, retenues de garantie": { + "account_type": "Receivable" + }, + "4118-Clients, d\u00e9gr\u00e8vement de taxes sur la valeur ajout\u00e9e (TVA)": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "412-Clients, effets \u00e0 recevoir en portefeuille": { + "4121-Clients, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "4122-Clients Groupe, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "4124-\u00c9tat et Collectivit\u00e9s publiques, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "4125-Organismes Internationaux, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "413-Clients, ch\u00e8ques, effets et autres valeurs impay\u00e9es": { + "4131-Clients, ch\u00e8ques impay\u00e9s": { + "account_type": "Receivable" + }, + "4132-Clients, effets impay\u00e9s": { + "account_type": "Receivable" + }, + "4133-Clients, cartes de cr\u00e9dit impay\u00e9es": { + "account_type": "Receivable" + }, + "4138-Clients, autres valeurs impay\u00e9es": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "414-Cr\u00e9ances sur cessions courantes d\u2019immobilisations": { + "4141-Cr\u00e9ances en compte, immobilisations incorporelles": { + "account_type": "Receivable" + }, + "4142-Cr\u00e9ances en compte, immobilisations corporelles": { + "account_type": "Receivable" + }, + "4146-Effets \u00e0 recevoir, immobilisations incorporelles": { + "account_type": "Receivable" + }, + "4147-Effets \u00e0 recevoir, immobilisations corporelles": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "415-Clients, effets escompt\u00e9s non \u00e9chus": { + "account_type": "Receivable" + }, + "416-Cr\u00e9ances clients litigieuses ou douteuses": { + "4161-Cr\u00e9ances litigieuses": { + "account_type": "Receivable" + }, + "4162-Cr\u00e9ances douteuses": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "418-Clients, produits \u00e0 recevoir": { + "4181-Clients, factures \u00e0 \u00e9tablir": { + "account_type": "Receivable" + }, + "4186-Clients, int\u00e9r\u00eats courus": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "42-Personnel (ACTIF)": { + "421-Personnel, avances et acomptes": { + "4211-Personnel, avances": {}, + "4212-Personnel, acomptes": {}, + "4213-Frais avanc\u00e9s et fournitures au personnel": {} + } + }, + "43-Organismes sociaux (ACTIF)": { + "431-S\u00e9curit\u00e9 sociale": { + "4311-Prestations familiales": {}, + "4312-Accidents de travail": {}, + "4313-Caisse de retraite obligatoire": {}, + "4314-Caisse de retraite facultative": {}, + "4318-Autres cotisations sociales": {} + }, + "432-Caisses de retraite compl\u00e9mentaire": {}, + "433-Autres organismes sociaux": { + "4331-Mutuelle": {}, + "4332-Assurances retraite": {}, + "4333-Assurances et organismes de sant\u00e9": {} + }, + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "4387-Produits \u00e0 recevoir": {} + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (ACTIF)": { + "443-\u00c9tat, TVA factur\u00e9e": { + "4431-TVA factur\u00e9e sur ventes": {}, + "4432-TVA factur\u00e9e sur prestations de services": {}, + "4433-TVA factur\u00e9e sur travaux": {}, + "4434-TVA factur\u00e9e sur production livr\u00e9e \u00e0 soi-m\u00eame": {}, + "4435-TVA sur factures \u00e0 \u00e9tablir": {} + }, + "445-\u00c9tat, TVA r\u00e9cup\u00e9rable": { + "4451-TVA r\u00e9cup\u00e9rable sur immobilisations": {}, + "4452-TVA r\u00e9cup\u00e9rable sur achats": {}, + "4453-TVA r\u00e9cup\u00e9rable sur transport": {}, + "4454-TVA r\u00e9cup\u00e9rable sur services ext\u00e9rieurs et autres charges": {}, + "4455-TVA r\u00e9cup\u00e9rable sur factures non parvenues": {}, + "4456-TVA transf\u00e9r\u00e9e par d\u2019autres entit\u00e9s": {} + }, + "448-\u00c9tat, charges \u00e0 payer et produits \u00e0 recevoir": { + "4486-Charges \u00e0 payer": {}, + "4487-Produits \u00e0 recevoir": {} + }, + "449-\u00c9tat, cr\u00e9ances et dettes diverses": { + "4491-\u00c9tat, obligations cautionn\u00e9es": {}, + "4492-\u00c9tat, avances et acomptes vers\u00e9s sur imp\u00f4ts": {}, + "4493-\u00c9tat, fonds de dotation \u00e0 recevoir": {}, + "4494-\u00c9tat, subventions investissement \u00e0 recevoir": {}, + "4495-\u00c9tat, subventions d\u2019exploitation \u00e0 recevoir": {}, + "4496-\u00c9tat, subventions d\u2019\u00e9quilibre \u00e0 recevoir": {}, + "4497-\u00c9tat, avances sur subventions": {}, + "4499-\u00c9tat, fonds r\u00e9glement\u00e9s provisionn\u00e9s": {} + } + }, + "45-Organismes internationaux (ACTIF)": { + "451-Op\u00e9rations avec les organismes africains": {}, + "452-Op\u00e9rations avec les autres organismes internationaux": {}, + "458-Organismes internationaux, fonds de dotation et subventions \u00e0 recevoir": { + "4581-Organismes internationaux, fonds de dotation \u00e0 recevoir": {}, + "4582-Organismes internationaux, subventions \u00e0 recevoir": {} + } + }, + "46-Apporteurs, associ\u00e9s et groupe (ACTIF)": { + "461-Apporteurs, op\u00e9rations sur le capital": { + "4613-Apporteurs, capital appel\u00e9, non vers\u00e9": {}, + "4614-Apporteurs, compte d\u2019apport, op\u00e9rations de restructuration (fusion...)": {}, + "4618-Apporteurs, titres \u00e0 \u00e9changer": {} + }, + "467-Apporteurs, restant d\u00fb sur capital appel\u00e9": {} + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (ACTIF)": { + "472-Cr\u00e9ances et dettes sur titres de placement": { + "4721-Cr\u00e9ances sur cessions de titres de placement": {}, + "4726-Versements restant \u00e0 effectuer sur titres de placement non lib\u00e9r\u00e9s": {} + }, + "473-Interm\u00e9diaires Op\u00e9rations faites pour compte de tiers": { + "4731-Mandants": {}, + "4732-Mandataires": {}, + "4733-Commettants": {}, + "4734-Commissionnaires": {}, + "4739-\u00c9tat, Collectivit\u00e9s publiques, fonds global d\u2019allocation": {} + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits": { + "4747-Compte de r\u00e9partition p\u00e9riodique des produits": {} + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA": { + "4751-Compte actif": { + "account_type": "Temporary" + } + }, + "476-Charges constat\u00e9es d\u2019avance": {}, + "478-\u00c9carts de conversion actif": { + "4781-Diminution des cr\u00e9ances d\u2019exploitation": {}, + "4782-Diminution des cr\u00e9ances financi\u00e8res": {}, + "4783-Augmentation des dettes d\u2019exploitation": {}, + "4784-Augmentation des dettes financi\u00e8res": {}, + "4786-Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": {}, + "4788-Diff\u00e9rences compens\u00e9es par couverture de change": {} + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (ACTIF)": { + "485-Cr\u00e9ances sur cessions d\u2019immobilisations": { + "4851-En compte, immobilisations incorporelles": {}, + "4852-En compte, immobilisations corporelles": {}, + "4853-Effets \u00e0 recevoir, immobilisations incorporelles": {}, + "4854-Effets \u00e0 recevoir, immobilisations corporelles": {}, + "4855-Effets escompt\u00e9s non \u00e9chus": {}, + "4857-Retenues de garantie": {}, + "4858-Factures \u00e0 \u00e9tablir": {} + }, + "488-Autres cr\u00e9ances hors activit\u00e9s ordinaires (HAO)": {} + }, + "49-D\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme (tiers) (ACTIF)": { + "491-D\u00e9pr\u00e9ciations des comptes clients": { + "4911-Cr\u00e9ances litigieuses": {}, + "4912-Cr\u00e9ances douteuses": {} + }, + "495-D\u00e9pr\u00e9ciations des comptes organismes internationaux": {}, + "496-D\u00e9pr\u00e9ciations des comptes apporteurs, associ\u00e9s et groupe": { + "4962-Associ\u00e9s, comptes courants": {}, + "4963-Associ\u00e9s, op\u00e9rations faites en commun": {}, + "4966-Groupe, comptes courants": {} + }, + "497-D\u00e9pr\u00e9ciations des comptes d\u00e9biteurs divers": {}, + "498-D\u00e9pr\u00e9ciations des comptes de cr\u00e9ances HAO": { + "4985-Cr\u00e9ances sur cessions d\u2019immobilisations": {}, + "4986-Cr\u00e9ances sur cessions de titres de placement": {}, + "4988-Autres cr\u00e9ances HAO": {} + }, + "499-Provisions pour risques \u00e0 court terme": { + "4991-Sur op\u00e9rations d\u2019exploitation": {}, + "4997-Sur op\u00e9rations financi\u00e8res": {}, + "4998-Sur op\u00e9rations HAO": {} + } + }, + "root_type": "Asset" + }, + "4-Comptes de Tiers (PASSIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (PASSIF)": { + "401-Fournisseurs, dettes en compte": { + "4011-Fournisseurs": { + "account_type": "Payable" + }, + "4012-Fournisseurs groupe": { + "account_type": "Payable" + }, + "4013-Fournisseurs sous-traitants": { + "account_type": "Payable" + }, + "4016-Fournisseurs, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Payable" + }, + "4017-Fournisseur, retenues de garantie": { + "account_type": "Payable" + }, + "account_type": "Payable" + }, + "402-Fournisseurs, effets \u00e0 payer": { + "4021-Fournisseurs Effets \u00e0 payer": { + "account_type": "Payable" + }, + "4022-Fournisseurs Groupe, effets \u00e0 payer": { + "account_type": "Payable" + }, + "4023-Fournisseurs Sous-traitants, effets \u00e0 payer": { + "account_type": "Payable" + }, + "account_type": "Payable" + }, + "404-Fournisseurs, acquisitions courantes d\u2019immobilisations": { + "4041-Fournisseurs Dettes en comptes, immobilisations incorporelles": { + "account_type": "Payable" + }, + "4042-Fournisseurs Dettes en comptes, immobilisations corporelles": { + "account_type": "Payable" + }, + "4046-Fournisseurs Effets \u00e0 payer, immobilisations incorporelles": { + "account_type": "Payable" + }, + "4047-Fournisseurs Effets \u00e0 payer, immobilisations corporelles": { + "account_type": "Payable" + }, + "account_type": "Payable" + }, + "408-Fournisseurs, factures non parvenues": { + "4081-Fournisseurs": { + "account_type": "Stock Received But Not Billed" + }, + "4082-Fournisseurs groupe": { + "account_type": "Stock Received But Not Billed" + }, + "4083-Fournisseurs sous-traitants": { + "account_type": "Stock Received But Not Billed" + }, + "4086-Fournisseurs, int\u00e9r\u00eats courus": { + "account_type": "Stock Received But Not Billed" + }, + "account_type": "Stock Received But Not Billed" + }, + "account_type": "Payable" + }, + "41-Clients et comptes rattach\u00e9s (PASSIF)": { + "419-Clients cr\u00e9diteurs": { + "4191-Clients, avances et acomptes re\u00e7us": {}, + "4192-Clients groupe, avances et acomptes re\u00e7us": {}, + "4194-Clients, dettes pour emballages et mat\u00e9riels consign\u00e9s": {}, + "4198-Clients, rabais, remises, ristournes et autres avoirs \u00e0 accorder": {} + } + }, + "42-Personnel (PASSIF)": { + "422-Personnel, r\u00e9mun\u00e9rations dues": {}, + "423-Personnel, oppositions, saisies-arr\u00eats": { + "4231-Personnel, oppositions": {}, + "4232-Personnel, saisies-arr\u00eats": {}, + "4233-Personnel, avis \u00e0 tiers d\u00e9tenteur": {} + }, + "424-Personnel, \u0153uvres sociales internes": { + "4241-Assistance m\u00e9dicale": {}, + "4242-Allocations familiales": {}, + "4245-Organismes sociaux rattach\u00e9s \u00e0 l\u2019entit\u00e9": {}, + "4248-Autres \u0153uvres sociales internes": {} + }, + "425-Repr\u00e9sentants du personnel": { + "4251-D\u00e9l\u00e9gu\u00e9s du personnel": {}, + "4252-Syndicats et Comit\u00e9s d\u2019entreprises, d\u2019\u00c9tablissement": {}, + "4258-Autres repr\u00e9sentants du personnel": {} + }, + "426-Personnel, participation aux b\u00e9n\u00e9fices et au capital": { + "4261-Participation aux b\u00e9n\u00e9fices": {}, + "4264-Participation au capital": {} + }, + "427-Personnel d\u00e9p\u00f4ts": {}, + "428-Personnel, charges \u00e0 payer et produits \u00e0 recevoir": { + "4281-Dettes provisionn\u00e9es pour cong\u00e9s \u00e0 payer": {}, + "4286-Autres charges \u00e0 payer": {}, + "4287-Produits \u00e0 recevoir": {} + } + }, + "43-Organismes sociaux (PASSIF)": { + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "4381-Charges sociales sur gratifications \u00e0 payer": {}, + "4382-Charges sociales sur cong\u00e9s \u00e0 payer": {}, + "4386-Autres charges \u00e0 payer": {} + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (PASSIF)": { + "441-\u00c9tat, imp\u00f4t sur les b\u00e9n\u00e9fices": {}, + "442-\u00c9tat, autres imp\u00f4ts et taxes": { + "4421-Imp\u00f4ts et taxes d\u2019\u00c9tat": {}, + "4422-Imp\u00f4ts et taxes pour les collectivit\u00e9s publiques": {}, + "4423-Imp\u00f4ts et taxes recouvrables sur des obligataires": {}, + "4424-Imp\u00f4ts et taxes recouvrables sur des associ\u00e9s": {}, + "4426-Droits de douane": {}, + "4428-Autres imp\u00f4ts et taxes": {} + }, + "444-\u00c9tat, TVA due ou cr\u00e9dit de TVA": { + "4441-\u00c9tat, TVA due": {}, + "4449-\u00c9tat, cr\u00e9dit de TVA \u00e0 reporter": {} + }, + "446-\u00c9tat, autres taxes sur le chiffre d\u2019affaires": {}, + "447-\u00c9tat, imp\u00f4ts retenus \u00e0 la source": { + "4471-Imp\u00f4t G\u00e9n\u00e9ral sur le revenu": {}, + "4472-Imp\u00f4ts sur salaires": {}, + "4473-Contribution nationale": {}, + "4474-Contribution nationale de solidarit\u00e9": {}, + "4478-Autres imp\u00f4ts et contributions": {} + } + }, + "46-Apporteurs, associ\u00e9s et groupe (PASSIF)": { + "461-Apporteurs, op\u00e9rations sur le capital (PASSIF)": { + "4611-Apporteurs, apports en nature": {}, + "4612-Apporteurs, apports en num\u00e9raire": {}, + "4615-Apporteurs, versements re\u00e7us sur augmentation de capital": {}, + "4616-Apporteurs, versements anticip\u00e9s": {}, + "4617-Apporteurs d\u00e9faillants": {}, + "4619-Apporteurs, capital \u00e0 rembourser": {} + }, + "462-Associ\u00e9s, comptes courants": { + "4621-Principal": {}, + "4626-Int\u00e9r\u00eats courus": {} + }, + "463-Associ\u00e9s, op\u00e9rations faites en commun et GIE": { + "4631-Op\u00e9rations courantes": {}, + "4636-Int\u00e9r\u00eats courus": {} + }, + "465-Associ\u00e9s, dividendes \u00e0 payer": {}, + "466-Groupe, comptes courants": {} + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (PASSIF)": { + "471-D\u00e9biteurs et cr\u00e9diteurs divers": { + "4711-D\u00e9biteurs divers": {}, + "4712-Cr\u00e9diteurs divers": {}, + "4713-Obligataires": {}, + "4715-R\u00e9mun\u00e9rations d\u2019administrateurs": {}, + "4716-Compte d\u2019affacturage": {}, + "4717-D\u00e9biteurs divers retenues de garantie": {}, + "4718-Apport, compte de fusion et op\u00e9rations assimil\u00e9es": {}, + "4719-Bons de souscription d\u2019actions et d\u2019obligations": {} + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits (PASSIF)": { + "4746-Compte de r\u00e9partition p\u00e9riodique des charges": {} + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA (PASSIF)": { + "4752-Compte passif": {} + }, + "477-Produits constat\u00e9s d\u2019avance": {}, + "479-\u00c9carts de conversion passif": { + "4791-Augmentation des cr\u00e9ances d\u2019exploitation": {}, + "4792-Augmentation des cr\u00e9ances financi\u00e8res": {}, + "4793-Diminution des dettes d\u2019exploitation": {}, + "4794-Diminution des dettes financi\u00e8res": {}, + "4797-Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": {}, + "4798-Diff\u00e9rences compens\u00e9es par couverture de change": {} + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (HAO) (PASSIF)": { + "481-Fournisseurs d\u2019investissements": { + "4811-Immobilisations incorporelles": {}, + "4812-Immobilisations corporelles": {}, + "4813-Versements restant \u00e0 effectuer sur titres de participation et titres immobilis\u00e9s non lib\u00e9r\u00e9s": {}, + "4816-R\u00e9serve de propri\u00e9t\u00e9": {}, + "4817-Retenues de garantie": {}, + "4818-Factures non parvenues": {} + }, + "482-Fournisseurs d\u2019investissements, effets \u00e0 payer": { + "4821-Immobilisations incorporelles": {}, + "4822-Immobilisations corporelles": {} + }, + "484-Autres dettes hors activit\u00e9s ordinaires (HAO)": { + "4887-Produits": {} + } + }, + "49-D\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme (tiers) (PASSIF)": { + "490-D\u00e9pr\u00e9ciations des comptes fournisseurs": {}, + "492-D\u00e9pr\u00e9ciations des comptes personnel": {}, + "493-D\u00e9pr\u00e9ciations des comptes organismes sociaux": {}, + "494-D\u00e9pr\u00e9ciations des comptes \u00c9tat et collectivit\u00e9s publiques": {}, + "495-D\u00e9pr\u00e9ciations des comptes organismes internationaux": {} + }, + "root_type": "Liability" + }, + "5-Comptes de tr\u00e9sorerie": { + "50-Titres de placement": { + "501-Titres du tr\u00e9sor et bons de caisse \u00e0 court terme": { + "5011-Titres du Tr\u00e9sor \u00e0 court terme": {}, + "5012-Titres d\u2019organismes financiers": {}, + "5013-Bons de caisse \u00e0 court terme": {}, + "5016-Frais d\u2019acquisition des titres de tr\u00e9sor et bons de caisse": {} + }, + "502-Actions": { + "5021-Actions ou parts propres": {}, + "5022-Actions cot\u00e9es": {}, + "5023-Actions non cot\u00e9es": {}, + "5024-Actions d\u00e9membr\u00e9es (certificats d\u2019investissement, droits de vote)": {}, + "5025-Autres actions": {}, + "5026-Frais d\u2019acquisition des actions": {} + }, + "503-Obligations": { + "5031-Obligations \u00e9mises par la soci\u00e9t\u00e9 et rachet\u00e9es par elle": {}, + "5032-Obligations cot\u00e9es": {}, + "5033-Obligations non cot\u00e9es": {}, + "5035-Autres obligations": {}, + "5036-Frais d\u2019acquisition des obligations": {} + }, + "504-Bons de souscription": { + "5042-Bons de souscription d\u2019actions": {}, + "5043-Bons de souscription d\u2019obligations": {} + }, + "505-Titres n\u00e9gociables hors r\u00e9gion": {}, + "506-Int\u00e9r\u00eats courus": { + "5061-Titres du Tr\u00e9sor et bons de caisse \u00e0 court terme": {}, + "5062-Actions": {}, + "5063-Obligations": {} + }, + "508-Autres titres de placement et cr\u00e9ances assimil\u00e9es": {} + }, + "51-Valeurs \u00e0 encaisser": { + "511-Effets \u00e0 encaisser": {}, + "512-Effets \u00e0 l\u2019encaissement": {}, + "513-Ch\u00e8ques \u00e0 encaisser": {}, + "514-Ch\u00e8ques \u00e0 l\u2019encaissement": {}, + "515-Cartes de cr\u00e9dit \u00e0 encaisser": {}, + "518-Autres valeurs \u00e0 l\u2019encaissement": { + "5181-Warrants": {}, + "5182-Billets de fonds": {}, + "5185-Ch\u00e8ques de voyage": {}, + "5186-Coupons \u00e9chus": {}, + "5187-Int\u00e9r\u00eats \u00e9chus des obligations": {} + } + }, + "52-Banques": { + "521-Banques locales": { + "5211-Banques en monnaie nationale": { + "account_type": "Bank" + }, + "5215-Banques en devises": { + "account_type": "Bank" + }, + "account_type": "Bank" + }, + "522-Banques autres \u00c9tats r\u00e9gion": {}, + "523-Banques autres \u00c9tats zone mon\u00e9taire": {}, + "524-Banques hors zone mon\u00e9taire": {}, + "525-Banques d\u00e9p\u00f4t \u00e0 terme": {}, + "526-Banques, int\u00e9r\u00eats courus": { + "5261-Banque, int\u00e9r\u00eats courus, charges \u00e0 payer": {}, + "5267-Banque, int\u00e9r\u00eats courus, produits \u00e0 recevoir": {} + } + }, + "53-\u00c9tablissements financiers et assimil\u00e9s": { + "531-Ch\u00e8ques postaux": {}, + "532-Tr\u00e9sor": {}, + "533-Soci\u00e9t\u00e9s de gestion et d\u2019interm\u00e9diation (SGI)": {}, + "536-\u00c9tablissements financiers, int\u00e9r\u00eats courus": {}, + "538-Autres organismes financiers": {} + }, + "54-Instruments de tr\u00e9sorerie": { + "541-Options de taux d\u2019int\u00e9r\u00eat": {}, + "542-Options de taux de change": {}, + "543-Options de taux boursiers": {}, + "544-Instruments de march\u00e9s \u00e0 terme": {}, + "545-Avoirs d\u2019or et autres m\u00e9taux pr\u00e9cieux": {} + }, + "55-Instruments de monnaie \u00e9lectronique": { + "551-Monnaie \u00e9lectronique carte carburant": {}, + "552-Monnaie \u00e9lectronique t\u00e9l\u00e9phone portable": {}, + "553-Monnaie \u00e9lectronique carte p\u00e9age": {}, + "554-Porte-monnaie \u00e9lectronique": {}, + "558-Autres instruments de monnaies \u00e9lectroniques": {} + }, + "56-Banques, cr\u00e9dits de tr\u00e9sorerie et d\u2019escompte": { + "561-Cr\u00e9dits de tr\u00e9sorerie": {}, + "564-Escompte de cr\u00e9dits de campagne": {}, + "565-Escompte de cr\u00e9dits ordinaires": {}, + "566-Banques, cr\u00e9dits de tr\u00e9sorerie, int\u00e9r\u00eats courus": {} + }, + "57-Caisse": { + "571-Caisse si\u00e8ge social": { + "5711-Caisse en monnaie nationale": {}, + "5712-Caisse en devises": {} + }, + "572-Caisse succursale A": { + "5721-En monnaie nationale": {}, + "5722-En devises": {} + }, + "573-Caisse succursale B": { + "5731-En monnaie nationale": {}, + "5732-En devises": {} + } + }, + "58-R\u00e9gies d\u2019avances, accr\u00e9ditifs et virements internes": { + "581-R\u00e9gies d\u2019avance": {}, + "582-Accr\u00e9ditifs": {}, + "585-Virements de fonds": {}, + "588-Autres virements internes": {} + }, + "59-D\u00e9pr\u00e9ciations et provisions pour risque \u00e0 court terme": { + "590-D\u00e9pr\u00e9ciations des titres de placement": {}, + "591-D\u00e9pr\u00e9ciations des titres et valeurs \u00e0 encaisser": {}, + "592-D\u00e9pr\u00e9ciations des comptes banques": {}, + "593-D\u00e9pr\u00e9ciations des comptes \u00e9tablissements financiers et assimil\u00e9s": {}, + "594-D\u00e9pr\u00e9ciations des comptes d\u2019instruments de tr\u00e9sorerie": {}, + "599-Provisions pour risque \u00e0 court terme \u00e0 caract\u00e8re financier": {} + }, + "root_type": "Asset" + }, + "6-Comptes de charges des activit\u00e9s ordinaires": { + "60-Achats et variations de stocks": { + "601-Achats de marchandises": { + "6011-Dans la R\u00e9gion": {}, + "6012-Hors R\u00e9gion": {}, + "6013-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "6014-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "6015-Frais sur achats": {}, + "6019-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "602-Achats de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "6021-Dans la R\u00e9gion": {}, + "6022-Hors R\u00e9gion": {}, + "6023-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "6024-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "6025-Frais sur achats": {}, + "6029-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "603-Variations des stocks de biens achet\u00e9s": { + "6031-Variations des stocks de marchandises": {}, + "6032-Variations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": {}, + "6033-Variations des stocks d\u2019autres approvisionnements": {} + }, + "604-Achats stock\u00e9s de mati\u00e8res et fournitures consommables": { + "6041-Mati\u00e8res consommables": {}, + "6042-Mati\u00e8res combustibles": {}, + "6043-Produits d\u2019entretien": {}, + "6044-Fournitures d\u2019atelier et d\u2019usine": {}, + "6045-Frais sur achat": {}, + "6046-Fournitures de magasin": {}, + "6047-Fournitures de bureau": {}, + "6049-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "605-Autres achats": { + "6051-Fournitures non stockables Eau": {}, + "6052-Fournitures non stockables \u00c9lectricit\u00e9": {}, + "6053-Fournitures non stockables Autres \u00e9nergies": {}, + "6054-Fournitures d\u2019entretien non stockables": {}, + "6055-Fournitures de bureau non stockables": {}, + "6056-Achats de petit mat\u00e9riel et outillage": {}, + "6057-Achats d\u2019\u00e9tudes et prestations de services": {}, + "6058-Achats de travaux, mat\u00e9riels et \u00e9quipements": {}, + "6059-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "608-Achats d\u2019emballages": { + "6081-Emballages perdus": {}, + "6082-Emballages r\u00e9cup\u00e9rables non identifiables": {}, + "6083-Emballages \u00e0 usage mixte": {}, + "6085-Frais sur achats": {}, + "6089-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + } + }, + "61-Transports": { + "612-Transports sur ventes": {}, + "613-Transports pour le compte de tiers": {}, + "614-Transports du personnel": {}, + "616-Transports de plis": {}, + "618-Autres frais de transport": { + "6181-Voyages et d\u00e9placements": {}, + "6182-Transports entre \u00e9tablissements ou chantiers": {}, + "6183-Transports administratifs": {} + } + }, + "62-Services ext\u00e9rieurs": { + "621-Sous-traitance g\u00e9n\u00e9rale": {}, + "622-Locations, charges locatives": { + "6221-Locations de terrains": {}, + "6222-Locations de b\u00e2timents": {}, + "6223-Locations de mat\u00e9riels et outillages": {}, + "6224-Malis sur emballages": {}, + "6225-Locations d\u2019emballages": {}, + "6226-Fermages et loyers du foncier": {}, + "6228-Locations et charges locatives diverses": {} + }, + "623-Redevances de location acquisition": { + "6232-Cr\u00e9dit-bail immobilier": {}, + "6233-Cr\u00e9dit-bail mobilier": {}, + "6234-Location-vente": {}, + "6238-Autres contrats de location acquisition": {} + }, + "624-Entretien, r\u00e9parations, remise en \u00e9tat et maintenance": { + "6241-Entretien et r\u00e9parations des biens immobiliers": {}, + "6242-Entretien et r\u00e9parations des biens mobiliers": {}, + "6243-Maintenance": {}, + "6244-Charges de d\u00e9mant\u00e8lement et remise en \u00e9tat": {}, + "6248-Autres entretiens et r\u00e9parations": {} + }, + "625-Primes d\u2019assurance": { + "6251-Assurances multirisques": {}, + "6252-Assurances mat\u00e9riel de transport": {}, + "6253-Assurances risques d\u2019exploitation": {}, + "6254-Assurances responsabilit\u00e9 du producteur": {}, + "6255-Assurances insolvabilit\u00e9 clients": {}, + "6257-Assurances transport sur ventes": {}, + "6258-Autres primes d\u2019assurances": {} + }, + "626-\u00c9tudes, recherches et documentation": { + "6261-\u00c9tudes et recherches": {}, + "6265-Documentation g\u00e9n\u00e9rale": {}, + "6266-Documentation technique": {} + }, + "627-Publicit\u00e9, publications, relations publiques": { + "6271-Annonces, insertions": {}, + "6272-Catalogues, imprim\u00e9s publicitaires": {}, + "6273-\u00c9chantillons": {}, + "6274-Foires et expositions": {}, + "6275-Publications": {}, + "6276-Cadeaux \u00e0 la client\u00e8le": {}, + "6277-Frais de colloques, s\u00e9minaires, conf\u00e9rences": {}, + "6278-Autres charges de publicit\u00e9 et relations publiques": {} + }, + "628-Frais de t\u00e9l\u00e9communications": { + "6281-Frais de t\u00e9l\u00e9phone": {}, + "6282-Frais de t\u00e9lex": {}, + "6283-Frais de t\u00e9l\u00e9copie": {}, + "6288-Autres frais de t\u00e9l\u00e9communications": {} + } + }, + "63-Autres services ext\u00e9rieurs": { + "631-Frais bancaires": { + "6311-Frais sur titres (vente, garde)": {}, + "6312-Frais sur effets": {}, + "6313-Location de coffres": {}, + "6314-Commissions d\u2019affacturage": {}, + "6315-Commissions sur cartes de cr\u00e9dit": {}, + "6316-Frais d\u2019\u00e9mission d\u2019emprunts": {}, + "6317-Frais sur instruments monnaie \u00e9lectronique": {}, + "6318-Autres frais bancaires": {} + }, + "632-R\u00e9mun\u00e9rations d\u2019interm\u00e9diaires et de conseils": { + "6322-Commissions et courtages sur ventes": {}, + "6324-Honoraires des professions r\u00e9glement\u00e9es": {}, + "6325-Frais d\u2019actes et de contentieux": {}, + "6326-R\u00e9mun\u00e9rations d\u2019affacturage": {}, + "6327-R\u00e9mun\u00e9rations des autres prestataires de services": {}, + "6328-Divers frais": {} + }, + "633-Frais de formation du personnel": {}, + "634-Redevances pour brevets, licences, logiciels, concessions et droits et valeurs similaires": { + "6342-Redevances pour brevets, licences": {}, + "6343-Redevances pour logiciels": {}, + "6344-Redevances pour marques": {}, + "6345-Redevances pour sites internet": {}, + "6346-Redevances pour concessions, droits et valeurs similaires": {} + }, + "635-Cotisations": { + "6351-Cotisations": {}, + "6358-Concours divers": {} + }, + "637-R\u00e9mun\u00e9rations de personnel ext\u00e9rieur \u00e0 l\u2019entit\u00e9": { + "6371-Personnel int\u00e9rimaire": {}, + "6372-Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": {} + }, + "638-Autres charges externes": { + "6381-Frais de recrutement du personnel": {}, + "6382-Frais de d\u00e9m\u00e9nagement": {}, + "6383-R\u00e9ceptions": {}, + "6384-Missions": {}, + "6385-Charges de copropri\u00e9t\u00e9": {} + } + }, + "64-Imp\u00f4ts et taxes": { + "641-Imp\u00f4ts et taxes directs": { + "6411-Imp\u00f4ts fonciers et taxes annexes": {}, + "6412-Patentes, licences et taxes annexes": {}, + "6413-Taxes sur appointements et salaires": {}, + "6414-Taxes d\u2019apprentissage": {}, + "6415-Formation professionnelle continue": {}, + "6418-Autres imp\u00f4ts et taxes directs": {} + }, + "645-Imp\u00f4ts et taxes indirects": {}, + "646-Droits d\u2019enregistrement": { + "6461-Droits de mutation": {}, + "6462-Droits de timbre": {}, + "6463-Taxes sur les v\u00e9hicules de soci\u00e9t\u00e9": {}, + "6464-Vignettes": {}, + "6468-Autres droits": {} + }, + "647-P\u00e9nalit\u00e9s, amendes fiscales": { + "6471-P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts directs": {}, + "6472-P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts indirects": {}, + "6473-P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts directs": {}, + "6474-P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts indirects": {}, + "6478-Autres p\u00e9nalit\u00e9s et amendes fiscales": {} + }, + "648-Autres imp\u00f4ts et taxes": {} + }, + "65-Autres charges": { + "651-Pertes sur cr\u00e9ances clients et autres d\u00e9biteurs": { + "6511-Clients": {}, + "6515-Autres d\u00e9biteurs": {} + }, + "652-Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "6521-Quote-part transf\u00e9r\u00e9e de b\u00e9n\u00e9fices (comptabilit\u00e9 du g\u00e9rant)": {}, + "6525-Pertes imput\u00e9es par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": {} + }, + "654-Valeurs comptables des cessions courantes d\u2019immobilisations": { + "6541-Immobilisations incorporelles": {}, + "6542-Immobilisations corporelles": {} + }, + "656-Perte de change sur cr\u00e9ances et dettes commerciale": {}, + "657-P\u00e9nalit\u00e9s et amendes p\u00e9nales": {}, + "658-Charges diverses": { + "6581-Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": {}, + "6582-Dons": {}, + "6583-M\u00e9c\u00e9nat": {}, + "6588-Autres charges diverses": {} + }, + "659-Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "6591-Sur risques \u00e0 court terme": {}, + "6593-Sur stocks": {}, + "6594-Sur cr\u00e9ances": {}, + "6598-Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme": {} + } + }, + "66-Charges de personnel": { + "661-R\u00e9mun\u00e9rations directes vers\u00e9es au personnel national": { + "6611-Appointements salaires et commissions": {}, + "6612-Primes et gratifications": {}, + "6613-Cong\u00e9s pay\u00e9s": {}, + "6614-Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": {}, + "6615-Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": {}, + "6616-Suppl\u00e9ment familial": {}, + "6617-Avantages en nature": {}, + "6618-Autres r\u00e9mun\u00e9rations directes": {} + }, + "662-R\u00e9mun\u00e9rations directes vers\u00e9es au personnel non national": { + "6621-Appointements salaires et commissions": {}, + "6622-Primes et gratifications": {}, + "6623-Cong\u00e9s pay\u00e9s": {}, + "6624-Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": {}, + "6625-Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": {}, + "6626-Suppl\u00e9ment familial": {}, + "6627-Avantages en nature": {}, + "6628-Autres r\u00e9mun\u00e9rations directes": {} + }, + "663-Indemnit\u00e9s forfaitaires vers\u00e9es au personnel": { + "6631-Indemnit\u00e9s de logement": {}, + "6632-Indemnit\u00e9s de repr\u00e9sentation": {}, + "6633-Indemnit\u00e9s d\u2019expatriation": {}, + "6634-Indemnit\u00e9s de transport": {}, + "6638-Autres indemnit\u00e9s et avantages divers": {} + }, + "664-Charges sociales": { + "6641-Charges sociales sur r\u00e9mun\u00e9ration du personnel national": {}, + "6642-Charges sociales sur r\u00e9mun\u00e9ration du personnel non national": {} + }, + "666-R\u00e9mun\u00e9rations et charges sociales de l\u2019exploitant individuel": { + "6661-R\u00e9mun\u00e9ration du travail de l\u2019exploitant": {}, + "6662-Charges sociales": {} + }, + "667-R\u00e9mun\u00e9ration transf\u00e9r\u00e9e de personnel ext\u00e9rieur": { + "6671-Personnel int\u00e9rimaire": {}, + "6672-Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": {} + }, + "668-Autres charges sociales": { + "6681-Versements aux syndicats et comit\u00e9s d\u2019entreprise, d\u2019\u00e9tablissement": {}, + "6682-Versements aux comit\u00e9s d\u2019hygi\u00e8ne et de s\u00e9curit\u00e9": {}, + "6683-Versements et contributions aux autres \u0153uvres sociales": {}, + "6684-M\u00e9decine du travail et pharmacie": {}, + "6685-Assurances et organismes de sant\u00e9": {}, + "6686-Assurances retraite et fonds de pension": {}, + "6687-Majorations et p\u00e9nalit\u00e9s sociales": {}, + "6688-Charges sociales diverses": {} + } + }, + "67-Frais financiers et charges assimil\u00e9es": { + "671-Int\u00e9r\u00eats des emprunts": { + "6711-Emprunts obligataires": {}, + "6712-Emprunts aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": {}, + "6713-Dettes li\u00e9es \u00e0 des participations": {}, + "6714-Primes de remboursement des obligations": {} + }, + "672-Int\u00e9r\u00eats dans loyers de location acquisition": { + "6722-Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail immobilier": {}, + "6723-Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail mobilier": {}, + "6724-Int\u00e9r\u00eats dans loyers de location acquisition / location-vente": {}, + "6728-Int\u00e9r\u00eats dans loyers des autres locations acquisition": {} + }, + "673-Escomptes accord\u00e9s": {}, + "674-Autres int\u00e9r\u00eats": { + "6741-Avances re\u00e7ues et d\u00e9p\u00f4ts cr\u00e9diteurs": {}, + "6742-Comptes courants bloqu\u00e9s": {}, + "6743-Int\u00e9r\u00eats sur obligations cautionn\u00e9es": {}, + "6744-Int\u00e9r\u00eats sur dettes commerciales": {}, + "6745-Int\u00e9r\u00eats bancaires et sur op\u00e9rations de financement (escompte...)": {}, + "6748-Int\u00e9r\u00eats sur dettes diverses": {} + }, + "675-Escomptes des effets de commerce": {}, + "676-Pertes de change financi\u00e8res": {}, + "677-Pertes sur titres de placement": { + "6771-Pertes sur cessions de titres de placement": {}, + "6772-Mali provenant d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": {} + }, + "678-Pertes et charges sur risques financiers": { + "6781-Sur rentes viag\u00e8res": {}, + "6782-Sur op\u00e9rations financi\u00e8res": {}, + "6784-Sur instruments de tr\u00e9sorerie": {} + }, + "679-Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "6791-Sur risques financiers": {}, + "6795-Sur titres de placement": {}, + "6798-Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": {} + } + }, + "68-Dotations aux amortissements": { + "681-Dotations aux amortissements d\u2019exploitation": { + "6812-Dotations aux amortissements des immobilisations incorporelles": {}, + "6813-Dotations aux amortissements des immobilisations corporelles": {} + } + }, + "69-Dotations aux provisions et aux d\u00e9pr\u00e9ciations": { + "691-Dotations aux provisions et aux d\u00e9pr\u00e9ciations d\u2019exploitation": { + "6911-Dotations aux provisions pour risques et charges": {}, + "6913-Dotations aux d\u00e9pr\u00e9ciations des immobilisations incorporelles": {}, + "6914-Dotations aux d\u00e9pr\u00e9ciations des immobilisations corporelles": {} + }, + "697-Dotations aux provisions et aux d\u00e9pr\u00e9ciations financi\u00e8res": { + "6971-Dotations aux provisions pour risques et charges": {}, + "6972-Dotations aux d\u00e9pr\u00e9ciations des immobilisations financi\u00e8res": {} + } + }, + "root_type": "Expense" + }, + "7-Comptes de produits des activit\u00e9s ordinaires": { + "70-Ventes": { + "701-Ventes de marchandises": { + "7011-Dans la R\u00e9gion": {}, + "7012-Hors R\u00e9gion": {}, + "7013-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7014-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7015-Sur internet": {}, + "7019-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "702-Ventes de produits finis": { + "7021-Dans la R\u00e9gion": {}, + "7022-Hors R\u00e9gion": {}, + "7023-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7024-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7025-Sur internet": {}, + "7029-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "703-Ventes de produits interm\u00e9diaires": { + "7031-Dans la R\u00e9gion": {}, + "7032-Hors R\u00e9gion": {}, + "7033-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7034-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7035-Sur internet": {}, + "7039-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "704-Ventes de produits r\u00e9siduels": { + "7041-Dans la R\u00e9gion": {}, + "7042-Hors R\u00e9gion": {}, + "7043-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7044-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7045-Sur internet": {}, + "7049-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "705-Travaux factur\u00e9s": { + "7051-Dans la R\u00e9gion": {}, + "7052-Hors R\u00e9gion": {}, + "7053-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7054-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7055-Sur internet": {}, + "7059-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "706-Services vendus": { + "7061-Dans la R\u00e9gion": {}, + "7062-Hors R\u00e9gion": {}, + "7063-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7064-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7065-Sur internet": {}, + "7069-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "707-Produits accessoires": { + "7071-Ports, emballages perdus et autres frais factur\u00e9s": {}, + "7072-Commissions et courtages": {}, + "7073-Locations": {}, + "7074-Bonis sur reprises et cessions d\u2019emballages": {}, + "7075-Mise \u00e0 disposition de personnel": {}, + "7076-Redevances pour brevets, logiciels, marques et droits similaires": {}, + "7077-Services exploit\u00e9s dans l\u2019int\u00e9r\u00eat du personnel": {}, + "7078-Autres produits accessoires": {} + } + }, + "71-Subventions d\u2019exploitation": { + "711-Sur produits \u00e0 l\u2019exportation": {}, + "712-Sur produits \u00e0 l\u2019importation": {}, + "713-Sur produits de p\u00e9r\u00e9quation": {}, + "714-Indemnit\u00e9s et subventions d\u2019exploitation (entit\u00e9 agricole)": {}, + "718-Autres subventions d\u2019exploitation": { + "7181-Vers\u00e9es par l\u2019\u00c9tat et les collectivit\u00e9s publiques": {}, + "7182-Vers\u00e9es par les organismes internationaux": {}, + "7183-Vers\u00e9es par des tiers": {} + } + }, + "72-Production immobilis\u00e9e": { + "721-Immobilisations incorporelles": {}, + "722-Immobilisations corporelles": { + "7221-Immobilisations corporelles (hors actifs biologiques)": {}, + "7222-Immobilisations corporelles (actifs biologiques)": {} + }, + "724-Production auto-consomm\u00e9e": {}, + "726-Immobilisations financi\u00e8res": {} + }, + "73-Variations des stocks de biens et de services produits": { + "734-Variations des stocks de produits en cours": { + "7341-Produits en cours": {}, + "7342-Travaux en cours": {} + }, + "735-Variations des en-cours de services": { + "7351-\u00c9tudes en cours": {}, + "7352-Prestations de services en cours": {} + }, + "736-Variations des stocks de produits finis": {}, + "737-Variations des stocks de produits interm\u00e9diaires et r\u00e9siduels": { + "7371-Produits interm\u00e9diaires": {}, + "7372-Produits r\u00e9siduels": {} + } + }, + "75-Autres produits": { + "751-Profits sur cr\u00e9ances clients et autres d\u00e9biteurs": {}, + "752-Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "7521-Quote-part transf\u00e9r\u00e9e de pertes (comptabilit\u00e9 du g\u00e9rant)": {}, + "7525-B\u00e9n\u00e9fices attribu\u00e9s par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": {} + }, + "754-Produits des cessions courantes d\u2019immobilisations": { + "7541-Immobilisations incorporelles": {}, + "7542-Immobilisations corporelles": {} + }, + "756-Gains de change sur cr\u00e9ances et dettes commerciales": {}, + "758-Produits divers": { + "7581-Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": {}, + "7582-Indemnit\u00e9s d\u2019assurances re\u00e7ues": {}, + "7588-Autres produits divers": {} + }, + "759-Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "7591-Sur risques \u00e0 court terme": {}, + "7593-Sur stocks": {}, + "7594-Sur cr\u00e9ances": {}, + "7598-Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": {} + } + }, + "77-Revenus financiers et produits assimil\u00e9s": { + "771-Int\u00e9r\u00eats de pr\u00eats et cr\u00e9ances diverses": { + "7712-Int\u00e9r\u00eats de pr\u00eats": {}, + "7713-Int\u00e9r\u00eats sur cr\u00e9ances diverses": {} + }, + "772-Revenus de participations et autres titres immobilis\u00e9s": { + "7721-Revenus des titres de participation": {}, + "7722-Revenus autres titres immobilis\u00e9s": {} + }, + "773-Escomptes obtenus": {}, + "774-Revenus de placement": { + "7745-Revenus des obligations": {}, + "7746-Revenus des titres de placement": {} + }, + "775-Int\u00e9r\u00eats dans loyers de location acquisition": {}, + "776-Gains de change financiers": {}, + "777-Gains sur cessions de titres de placement": {}, + "778-Gains sur risques financiers": { + "7781-Sur rentes viag\u00e8res": {}, + "7782-Sur op\u00e9rations financi\u00e8res": {}, + "7784-Sur instruments de tr\u00e9sorerie": {} + }, + "779-Reprises de charges pour d\u00e9pr\u00e9ciations et provisions \u00e0 court terme financi\u00e8res": { + "7791-Sur risques financiers": {}, + "7795-Sur titres de placement": {}, + "7798-Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": {} + } + }, + "78-Transferts de charges": { + "781-Transferts de charges d\u2019exploitation": {}, + "787-Transferts de charges financi\u00e8res": {} + }, + "79-Reprises de provisions, de d\u00e9pr\u00e9ciations et autres": { + "791-Reprises de provisions et d\u00e9pr\u00e9ciations d\u2019exploitation": { + "7911-Pour risques et charges": {}, + "7913-Des immobilisations incorporelles": {}, + "7914-Des immobilisations corporelles": {} + }, + "797-Reprises de provisions et d\u00e9pr\u00e9ciations financi\u00e8res": { + "7971-Pour risques et charges": {}, + "7972-Des immobilisations financi\u00e8res": {} + }, + "798-Reprises d\u2019amortissements": {}, + "799-Reprises de subventions d\u2019investissement": {} + }, + "root_type": "Income" + }, + "8-Comptes des autres charges et des autres produits (CHARGES)": { + "81-Valeurs comptables des cessions d\u2019immobilisations": { + "811-Immobilisations incorporelles": {}, + "812-Immobilisations corporelles": {}, + "816-Immobilisations financi\u00e8res": {} + }, + "83-Charges hors activit\u00e9s ordinaires": { + "831-Charges HAO constat\u00e9es": {}, + "833-Charges li\u00e9es aux op\u00e9rations de restructuration": {}, + "834-Pertes sur cr\u00e9ances HAO": {}, + "835-Dons et lib\u00e9ralit\u00e9s accord\u00e9s": {}, + "836-Abandons de cr\u00e9ances consentis": {}, + "837-Charges li\u00e9es aux op\u00e9rations de liquidation": {}, + "839-Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": {} + }, + "85-Dotations hors activit\u00e9s ordinaires": { + "851-Dotations aux provisions r\u00e9glement\u00e9es": {}, + "852-Dotations aux amortissements HAO": {}, + "853-Dotations aux d\u00e9pr\u00e9ciations HAO": {}, + "854-Dotations aux provisions pour risques et charges HAO": {}, + "858-Autres dotations HAO": {} + }, + "87-Participation des travailleurs": { + "871-Participation l\u00e9gale aux b\u00e9n\u00e9fices": {}, + "874-Participation contractuelle aux b\u00e9n\u00e9fices": {}, + "878-Autres participations": {} + }, + "89-Imp\u00f4ts sur le r\u00e9sultat": { + "891-Imp\u00f4ts sur les b\u00e9n\u00e9fices de l\u2019exercice": { + "8911-Activit\u00e9s exerc\u00e9es dans l\u2019\u00c9tat": {}, + "8912-Activit\u00e9s exerc\u00e9es dans les autres \u00c9tats de la R\u00e9gion": {}, + "8913-Activit\u00e9s exerc\u00e9es hors R\u00e9gion": {} + }, + "892-Rappel d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": {}, + "895-Imp\u00f4t minimum forfaitaire IMF": {}, + "899-D\u00e9gr\u00e8vements et annulations d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": { + "8991-D\u00e9gr\u00e8vements": {}, + "8994-Annulations pour pertes r\u00e9troactives": {} + } + }, + "root_type": "Expense" + }, + "8-Comptes des autres charges et des autres produits (PRODUITS)": { + "82-Produits des cessions d\u2019immobilisations": { + "821-Immobilisations incorporelles": {}, + "822-Immobilisations corporelles": {}, + "826-Immobilisations financi\u00e8res": {} + }, + "84-Produits hors activit\u00e9s ordinaires": { + "841-Produits HAO constat\u00e9s": {}, + "843-Produits li\u00e9s aux op\u00e9rations de restructuration": {}, + "844-Indemnit\u00e9s et subventions HAO (entit\u00e9 agricole)": {}, + "845-Dons et lib\u00e9ralit\u00e9s obtenus": {}, + "846-Abandons de cr\u00e9ances obtenus": {}, + "847-Produits li\u00e9s aux op\u00e9rations de liquidation": {}, + "848-Transferts de charges HAO": {}, + "849-Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": {} + }, + "86-Reprises de charges, provisions et d\u00e9pr\u00e9ciations HAO": { + "861-Reprises de provisions r\u00e9glement\u00e9es": {}, + "862-Reprises d\u2019amortissements HAO": {}, + "863-Reprises de d\u00e9pr\u00e9ciations HAO": {}, + "864-Reprises de provisions pour risques et charges HAO": {}, + "868-Autres reprises HAO": {} + }, + "88-Subventions d\u2019\u00e9quilibre": { + "881-\u00c9tat": {}, + "884-Collectivit\u00e9s publiques": {}, + "886-Groupe": {}, + "888-Autres": {} + }, + "root_type": "Income" + } + } +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/bf_plan_comptable_avec_code.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/bf_plan_comptable_avec_code.json new file mode 100644 index 00000000000..59a6e348116 --- /dev/null +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/bf_plan_comptable_avec_code.json @@ -0,0 +1,4208 @@ +{ + "country_code": "bf", + "name": "Syscohada - Plan Comptable avec code", + "tree": { + "Comptes de ressources durables": { + "Capital": { + "Capital social": { + "Capital souscrit, non appel\u00e9": { + "account_number": "1011" + }, + "Capital souscrit, appel\u00e9, non vers\u00e9": { + "account_number": "1012" + }, + "Capital souscrit, appel\u00e9, vers\u00e9, non amorti": { + "account_number": "1013" + }, + "Capital souscrit, appel\u00e9, vers\u00e9, amorti": { + "account_number": "1014" + }, + "Capital souscrit soumis \u00e0 des conditions particuli\u00e8res": { + "account_number": "1018" + }, + "account_number": "101" + }, + "Capital par dotation": { + "Dotation initiale": { + "account_number": "1021" + }, + "Dotations compl\u00e9mentaires": { + "account_number": "1022" + }, + "Autres dotations": { + "account_number": "1028" + }, + "account_number": "102" + }, + "Capital personnel": { + "account_number": "103" + }, + "Compte de l\u2019exploitant": { + "Apports temporaires": { + "account_number": "1041" + }, + "Op\u00e9rations courantes": { + "account_number": "1042" + }, + "R\u00e9mun\u00e9rations, imp\u00f4ts et autres charges personnelles": { + "account_number": "1043" + }, + "Pr\u00e9l\u00e8vements d\u2019autoconsommation": { + "account_number": "1047" + }, + "Autres pr\u00e9l\u00e8vements": { + "account_number": "1048" + }, + "account_number": "104" + }, + "Primes li\u00e9es au capital social": { + "Primes d\u2019\u00e9mission": { + "account_number": "1051" + }, + "Primes d\u2019apport": { + "account_number": "1052" + }, + "Primes de fusion": { + "account_number": "1053" + }, + "Primes de conversion": { + "account_number": "1054" + }, + "Autres primes": { + "account_number": "1058" + }, + "account_number": "105" + }, + "\u00c9carts de r\u00e9\u00e9valuation": { + "\u00c9carts de r\u00e9\u00e9valuation l\u00e9gale": { + "account_number": "1061" + }, + "\u00c9carts de r\u00e9\u00e9valuation libre": { + "account_number": "1062" + }, + "account_number": "106" + }, + "Apporteurs, capital souscrit, non appel\u00e9": { + "account_number": "109" + }, + "account_number": "10" + }, + "R\u00e9serves": { + "R\u00e9serve l\u00e9gale": { + "account_number": "111" + }, + "R\u00e9serves statutaires ou contractuelles": { + "account_number": "112" + }, + "R\u00e9serves r\u00e9glement\u00e9es": { + "R\u00e9serves de plus-values nettes \u00e0 long terme": { + "account_number": "1131" + }, + "R\u00e9serves d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": { + "account_number": "1132" + }, + "R\u00e9serves cons\u00e9cutives \u00e0 l\u2019octroi de subventions d\u2019investissement": { + "account_number": "1133" + }, + "R\u00e9serves des valeurs mobili\u00e8res donnant acc\u00e8s au capital": { + "account_number": "1134" + }, + "Autres r\u00e9serves r\u00e9glement\u00e9es": { + "account_number": "1135" + }, + "account_number": "113" + }, + "Autres r\u00e9serves": { + "R\u00e9serves facultatives": { + "account_number": "1181" + }, + "R\u00e9serves diverses": { + "account_number": "1188" + }, + "account_number": "118" + }, + "account_number": "11" + }, + "Report \u00e0 nouveau": { + "Report \u00e0 nouveau cr\u00e9diteur": { + "account_number": "121" + }, + "Report \u00e0 nouveau d\u00e9biteur": { + "Perte nette \u00e0 reporter": { + "account_number": "1291" + }, + "Perte Amortissements r\u00e9put\u00e9s diff\u00e9r\u00e9s": { + "account_number": "1292" + }, + "account_number": "129" + }, + "account_number": "12" + }, + "R\u00e9sultat net de l\u2019exercice": { + "R\u00e9sultat en instance d\u2019affectation": { + "R\u00e9sultat en instance d\u2019affectation : b\u00e9n\u00e9fice": { + "account_number": "1301" + }, + "R\u00e9sultat en instance d\u2019affectation : perte": { + "account_number": "1309" + }, + "account_number": "130" + }, + "R\u00e9sultat net : b\u00e9n\u00e9fice": { + "account_number": "131" + }, + "Marge commerciale (MC)": { + "account_number": "132" + }, + "Valeur ajout\u00e9e (VA)": { + "account_number": "133" + }, + "Exc\u00e9dent brut d\u2019exploitation (EBE)": { + "account_number": "134" + }, + "R\u00e9sultat d\u2019exploitation (RE)": { + "account_number": "135" + }, + "R\u00e9sultat financier (RF)": { + "account_number": "136" + }, + "R\u00e9sultat des activit\u00e9s ordinaires (RAO)": { + "account_number": "137" + }, + "R\u00e9sultat hors activit\u00e9s ordinaires (RHAO)": { + "R\u00e9sultat de fusion": { + "account_number": "1381" + }, + "R\u00e9sultat d\u2019apport partiel d\u2019actif": { + "account_number": "1382" + }, + "R\u00e9sultat de scission": { + "account_number": "1383" + }, + "R\u00e9sultat de liquidation": { + "account_number": "1384" + }, + "account_number": "138" + }, + "R\u00e9sultat net : perte": { + "account_number": "139" + }, + "account_number": "13" + }, + "Subventions d\u2019investissement": { + "Subventions d\u2019\u00e9quipement": { + "\u00c9tat": { + "account_number": "1411" + }, + "R\u00e9gions": { + "account_number": "1412" + }, + "D\u00e9partements": { + "account_number": "1413" + }, + "Communes et collectivit\u00e9s publiques d\u00e9centralis\u00e9es": { + "account_number": "1414" + }, + "Entit\u00e9s publiques ou mixtes": { + "account_number": "1415" + }, + "Entit\u00e9s et organismes priv\u00e9s": { + "account_number": "1416" + }, + "Organismes internationaux": { + "account_number": "1417" + }, + "Autres": { + "account_number": "1418" + }, + "account_number": "141" + }, + "Autres subventions d\u2019investissement": { + "account_number": "148" + }, + "account_number": "14" + }, + "Provisions r\u00e9glement\u00e9es et fonds assimil\u00e9s": { + "Amortissements d\u00e9rogatoires": { + "account_number": "151" + }, + "Plus-values de cession \u00e0 r\u00e9investir": { + "account_number": "152" + }, + "Fonds r\u00e9glement\u00e9s": { + "Fonds National": { + "account_number": "1531" + }, + "Pr\u00e9l\u00e8vement pour le Budget": { + "account_number": "1532" + }, + "account_number": "153" + }, + "Provisions sp\u00e9ciales de r\u00e9\u00e9valuation": { + "account_number": "154" + }, + "Provisions r\u00e9glement\u00e9es relatives aux immobilisations": { + "Reconstitution des gisements miniers et p\u00e9troliers": { + "account_number": "1551" + }, + "account_number": "155" + }, + "Provisions r\u00e9glement\u00e9es relatives aux stocks": { + "Hausse de prix": { + "account_number": "1561" + }, + "Fluctuation des cours": { + "account_number": "1562" + }, + "account_number": "156" + }, + "Provisions pour investissement": { + "account_number": "157" + }, + "Autres provisions et fonds r\u00e9glement\u00e9s": { + "account_number": "158" + }, + "account_number": "15" + }, + "Emprunts et dettes assimil\u00e9es": { + "Emprunts obligataires": { + "Emprunts obligataires ordinaires": { + "account_number": "1611" + }, + "Emprunts obligataires convertibles en actions": { + "account_number": "1612" + }, + "Emprunts obligataires remboursables en actions": { + "account_number": "1613" + }, + "Autres emprunts obligataires": { + "account_number": "1618" + }, + "account_number": "161" + }, + "Emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": { + "account_number": "162" + }, + "Avances re\u00e7ues de l\u2019\u00c9tat": { + "account_number": "163" + }, + "Avances re\u00e7ues et comptes courants bloqu\u00e9s": { + "account_number": "164" + }, + "D\u00e9p\u00f4ts et cautionnements re\u00e7us": { + "D\u00e9p\u00f4ts": { + "account_number": "1651" + }, + "Cautionnements": { + "account_number": "1652" + }, + "account_number": "165" + }, + "Int\u00e9r\u00eats courus": { + "Sur emprunts obligataires": { + "account_number": "1661" + }, + "Sur emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": { + "account_number": "1662" + }, + "Sur avances re\u00e7ues de l\u2019\u00c9tat": { + "account_number": "1663" + }, + "Sur avances re\u00e7ues et comptes courants bloqu\u00e9s": { + "account_number": "1664" + }, + "Sur d\u00e9p\u00f4ts et cautionnements re\u00e7us": { + "account_number": "1665" + }, + "Sur avances assorties de conditions particuli\u00e8res": { + "account_number": "1667" + }, + "Sur autres emprunts et dettes": { + "account_number": "1668" + }, + "account_number": "166" + }, + "Avances assorties de conditions particuli\u00e8res": { + "Avances bloqu\u00e9es pour augmentation du capital": { + "account_number": "1671" + }, + "Avances conditionn\u00e9es par l\u2019\u00c9tat": { + "account_number": "1672" + }, + "Avances conditionn\u00e9es par les autres organismes africains": { + "account_number": "1673" + }, + "Avances conditionn\u00e9es par les organismes internationaux": { + "account_number": "1674" + }, + "account_number": "167" + }, + "Autres emprunts et dettes": { + "Rentes viag\u00e8res capitalis\u00e9es": { + "account_number": "1681" + }, + "Billets de fonds": { + "account_number": "1682" + }, + "Dettes cons\u00e9cutives \u00e0 des titres emprunt\u00e9s": { + "account_number": "1683" + }, + "Emprunts participatifs": { + "account_number": "1684" + }, + "Participation des travailleurs aux b\u00e9n\u00e9fices": { + "account_number": "1685" + }, + "Emprunts et dettes contract\u00e9s aupr\u00e8s des autres tiers": { + "account_number": "1686" + }, + "account_number": "168" + }, + "account_number": "16" + }, + "Dettes de location acquisition": { + "Dettes de location acquisition / cr\u00e9dit bail immobilier": { + "account_number": "172" + }, + "Dettes de location acquisition / cr\u00e9dit bail mobilier": { + "account_number": "173" + }, + "Dettes de location acquisition / location de vente": { + "account_number": "174" + }, + "Int\u00e9r\u00eats courus": { + "Sur dettes de location acquisition / cr\u00e9dit-bail immobilier": { + "account_number": "1762" + }, + "Sur dettes de location acquisition / cr\u00e9dit-bail mobilier": { + "account_number": "1763" + }, + "Sur dettes de location acquisition / location-vente": { + "account_number": "1764" + }, + "Sur autres dettes de location acquisition": { + "account_number": "1768" + }, + "account_number": "176" + }, + "Autres dettes de location acquisition": { + "account_number": "178" + }, + "account_number": "17" + }, + "Dettes li\u00e9es \u00e0 des participations et comptes de liaison des \u00e9tablissements et soci\u00e9t\u00e9s en participation": { + "Dettes li\u00e9es \u00e0 des participations": { + "Dettes li\u00e9es \u00e0 des participations (groupe)": { + "account_number": "1811" + }, + "Dettes li\u00e9es \u00e0 des participations (hors groupe)": { + "account_number": "1812" + }, + "account_number": "181" + }, + "Dettes li\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": { + "account_number": "182" + }, + "Int\u00e9r\u00eats courus sur dettes li\u00e9es \u00e0 des participations": { + "account_number": "183" + }, + "Comptes permanents bloqu\u00e9s des \u00e9tablissements et succursales": { + "account_number": "184" + }, + "Comptes permanents non bloqu\u00e9s des \u00e9tablissements et succursales": { + "account_number": "185" + }, + "Comptes de liaison charges": { + "account_number": "186" + }, + "Comptes de liaison produits": { + "account_number": "187" + }, + "Comptes de liaison des soci\u00e9t\u00e9s en participation": { + "account_number": "188" + }, + "account_number": "18" + }, + "Provisions pour risques et charges": { + "Provisions pour litiges": { + "account_number": "191" + }, + "Provisions pour garanties donn\u00e9es aux clients": { + "account_number": "192" + }, + "Provisions pour pertes sur march\u00e9s \u00e0 ach\u00e8vement futur": { + "account_number": "193" + }, + "Provisions pour pertes de change": { + "account_number": "194" + }, + "Provisions pour imp\u00f4ts": { + "account_number": "195" + }, + "Provisions pour pensions et obligations similaires": { + "Provisions pour pensions et obligations similaires engagement de retraite": { + "account_number": "1961" + }, + "Actif du r\u00e9gime de retraite": { + "account_number": "1962" + }, + "account_number": "196" + }, + "Provisions pour restructuration": { + "account_number": "197" + }, + "Autres provisions pour risques et charges": { + "Provisions pour amendes et p\u00e9nalit\u00e9s": { + "account_number": "1981" + }, + "Provisions pour propre assureur": { + "account_number": "1983" + }, + "Provisions pour d\u00e9mant\u00e8lement et remise en \u00e9tat": { + "account_number": "1984" + }, + "Provisions pour droits \u00e0 r\u00e9duction ou avantage en nature (ch\u00e8ques cadeau, cartes de fid\u00e9lit\u00e9...)": { + "account_number": "1985" + }, + "Provisions pour divers risques et charges": { + "account_number": "1988" + }, + "account_number": "198" + }, + "account_number": "19" + }, + "root_type": "Equity", + "account_number": "1" + }, + "Comptes d\u2019actif immobilis\u00e9": { + "Immobilisations incorporelles": { + "account_type": "Fixed Asset", + "Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset", + "account_number": "211" + }, + "Brevets, licences, concessions et droits similaires": { + "account_type": "Fixed Asset", + "Brevets": { + "account_type": "Fixed Asset", + "account_number": "2121" + }, + "Licences": { + "account_type": "Fixed Asset", + "account_number": "2122" + }, + "Concessions de service public": { + "account_type": "Fixed Asset", + "account_number": "2123" + }, + "Autres concessions et droits similaires": { + "account_type": "Fixed Asset", + "account_number": "2128" + }, + "account_number": "212" + }, + "Logiciels et sites internet": { + "account_type": "Fixed Asset", + "Logiciels": { + "account_type": "Fixed Asset", + "account_number": "2131" + }, + "Sites internet": { + "account_type": "Fixed Asset", + "account_number": "2132" + }, + "account_number": "213" + }, + "Marques": { + "account_type": "Fixed Asset", + "account_number": "214" + }, + "Fonds commercial": { + "account_type": "Fixed Asset", + "account_number": "215" + }, + "Droit au bail": { + "account_type": "Fixed Asset", + "account_number": "216" + }, + "Investissements de cr\u00e9ation": { + "account_type": "Fixed Asset", + "account_number": "217" + }, + "Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset", + "Frais de prospection et d\u2019\u00e9valuation de ressources min\u00e9rales": { + "account_type": "Fixed Asset", + "account_number": "2181" + }, + "Co\u00fbts d\u2019obtention du contrat": { + "account_type": "Fixed Asset", + "account_number": "2182" + }, + "Fichiers clients, notices, titres de journaux et magazines": { + "account_type": "Fixed Asset", + "account_number": "2183" + }, + "Co\u00fbts des franchises": { + "account_type": "Fixed Asset", + "account_number": "2184" + }, + "Divers droits et valeurs incorporelles": { + "account_type": "Fixed Asset", + "account_number": "2188" + }, + "account_number": "218" + }, + "Immobilisations incorporelles en cours": { + "account_type": "Fixed Asset", + "Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset", + "account_number": "2191" + }, + "Logiciels et internet": { + "account_type": "Fixed Asset", + "account_number": "2193" + }, + "Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset", + "account_number": "2198" + }, + "account_number": "219" + }, + "account_number": "21" + }, + "Terrains": { + "account_type": "Fixed Asset", + "Terrains agricoles et forestiers": { + "account_type": "Fixed Asset", + "Terrains d\u2019exploitation agricole": { + "account_type": "Fixed Asset", + "account_number": "2211" + }, + "Terrains d\u2019exploitation foresti\u00e8re": { + "account_type": "Fixed Asset", + "account_number": "2212" + }, + "Autres terrains": { + "account_type": "Fixed Asset", + "account_number": "2218" + }, + "account_number": "221" + }, + "Terrains nus": { + "account_type": "Fixed Asset", + "Terrains \u00e0 b\u00e2tir": { + "account_type": "Fixed Asset", + "account_number": "2221" + }, + "Autres terrains nus": { + "account_type": "Fixed Asset", + "account_number": "2228" + }, + "account_number": "222" + }, + "Terrains b\u00e2tis": { + "account_type": "Fixed Asset", + "Pour b\u00e2timents industriels et agricoles": { + "account_type": "Fixed Asset", + "account_number": "2231" + }, + "Pour b\u00e2timents administratifs et commerciaux": { + "account_type": "Fixed Asset", + "account_number": "2232" + }, + "Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations professionnelles": { + "account_type": "Fixed Asset", + "account_number": "2234" + }, + "Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations non professionnelles": { + "account_type": "Fixed Asset", + "account_number": "2235" + }, + "Autres terrains b\u00e2tis": { + "account_type": "Fixed Asset", + "account_number": "2238" + }, + "account_number": "223" + }, + "Travaux de mise en valeur des terrains": { + "account_type": "Fixed Asset", + "Plantation d\u2019arbres et d\u2019arbustes": { + "account_type": "Fixed Asset", + "account_number": "2241" + }, + "Am\u00e9liorations du fonds": { + "account_type": "Fixed Asset", + "account_number": "2245" + }, + "Autres travaux": { + "account_type": "Fixed Asset", + "account_number": "2248" + }, + "account_number": "224" + }, + "Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset", + "Carri\u00e8res": { + "account_type": "Fixed Asset", + "account_number": "2251" + }, + "account_number": "225" + }, + "Terrains am\u00e9nag\u00e9s": { + "account_type": "Fixed Asset", + "Parkings": { + "account_type": "Fixed Asset", + "account_number": "2261" + }, + "account_number": "226" + }, + "Terrains mis en concession": { + "account_type": "Fixed Asset", + "account_number": "227" + }, + "Autres terrains": { + "account_type": "Fixed Asset", + "Terrains immeubles de placement": { + "account_type": "Fixed Asset", + "account_number": "2281" + }, + "Terrains des logements affect\u00e9s au personnel": { + "account_type": "Fixed Asset", + "account_number": "2285" + }, + "Terrains de location acquisition": { + "account_type": "Fixed Asset", + "account_number": "2286" + }, + "Divers terrains": { + "account_type": "Fixed Asset", + "account_number": "2288" + }, + "account_number": "228" + }, + "Am\u00e9nagements de terrains en cours": { + "account_type": "Fixed Asset", + "Terrains agricoles et forestiers": { + "account_type": "Fixed Asset", + "account_number": "2291" + }, + "Terrains nus": { + "account_type": "Fixed Asset", + "account_number": "2292" + }, + "Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset", + "account_number": "2295" + }, + "Autres terrains": { + "account_type": "Fixed Asset", + "account_number": "2298" + }, + "account_number": "229" + }, + "account_number": "22" + }, + "B\u00e2timents, installations techniques et agencements": { + "B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "B\u00e2timents industriels": { + "account_number": "2311" + }, + "B\u00e2timents agricoles": { + "account_number": "2312" + }, + "B\u00e2timents administratifs et commerciaux": { + "account_number": "2313" + }, + "B\u00e2timents affect\u00e9s au logement du personnel": { + "account_number": "2314" + }, + "B\u00e2timents immeubles de placement": { + "account_number": "2315" + }, + "B\u00e2timents de location acquisition": { + "account_number": "2316" + }, + "account_number": "231" + }, + "B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "B\u00e2timents industriels": { + "account_number": "2321" + }, + "B\u00e2timents agricoles": { + "account_number": "2322" + }, + "B\u00e2timents administratifs et commerciaux": { + "account_number": "2323" + }, + "B\u00e2timents affect\u00e9s au logement du personnel": { + "account_number": "2324" + }, + "B\u00e2timents immeubles de placement": { + "account_number": "2325" + }, + "B\u00e2timents de location acquisition": { + "account_number": "2326" + }, + "account_number": "232" + }, + "Ouvrages d\u2019infrastructure": { + "Voies de terre": { + "account_number": "2331" + }, + "Voies de fer": { + "account_number": "2332" + }, + "Voies d\u2019eau": { + "account_number": "2333" + }, + "Barrages, Digues": { + "account_number": "2334" + }, + "Pistes d\u2019a\u00e9rodrome": { + "account_number": "2335" + }, + "Autres ouvrages d\u2019infrastructures": { + "account_number": "2338" + }, + "account_number": "233" + }, + "Am\u00e9nagements, agencements et installations techniques": { + "Installations complexes sp\u00e9cialis\u00e9es sur sol propre": { + "account_number": "2341" + }, + "Installations complexes sp\u00e9cialis\u00e9es sur sol d\u2019autrui": { + "account_number": "2342" + }, + "Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol propre": { + "account_number": "2343" + }, + "Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol d\u2019autrui": { + "account_number": "2344" + }, + "Am\u00e9nagements et agencements des b\u00e2timents": { + "account_number": "2345" + }, + "account_number": "234" + }, + "Am\u00e9nagements de bureaux": { + "Installations g\u00e9n\u00e9rales": { + "account_number": "2351" + }, + "Autres am\u00e9nagements de bureaux": { + "account_number": "2358" + }, + "account_number": "235" + }, + "B\u00e2timents industriels, agricoles et commerciaux mis en concession": { + "account_number": "237" + }, + "Autres installations et agencements": { + "account_number": "238" + }, + "B\u00e2timents am\u00e9nagements, agencements et installations en cours": { + "B\u00e2timents en cours": { + "account_number": "2391" + }, + "Installations en cours": { + "account_number": "2392" + }, + "Ouvrages d\u2019infrastructure en cours": { + "account_number": "2393" + }, + "Am\u00e9nagements et agencements et installations techniques en cours": { + "account_number": "2394" + }, + "Am\u00e9nagements de bureaux en cours": { + "account_number": "2395" + }, + "Autres installations et agencements en cours": { + "account_number": "2398" + }, + "account_number": "239" + }, + "account_number": "23" + }, + "Mat\u00e9riel, mobilier et actifs biologiques": { + "Mat\u00e9riel et outillage industriel et commercial": { + "Mat\u00e9riel industriel": { + "account_number": "2411" + }, + "Outillage industriel": { + "account_number": "2412" + }, + "Mat\u00e9riel commercial": { + "account_number": "2413" + }, + "Outillage commercial": { + "account_number": "2414" + }, + "Mat\u00e9riel & outillage industriel et commercial de location-acquisition": { + "account_number": "2416" + }, + "account_number": "241" + }, + "Mat\u00e9riel et outillage agricole": { + "Mat\u00e9riel agricole": { + "account_number": "2421" + }, + "Outillage agricole": { + "account_number": "2422" + }, + "Mat\u00e9riel & outillage agricole de location-acquisition": { + "account_number": "2426" + }, + "account_number": "242" + }, + "Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "243" + }, + "Mat\u00e9riel et mobilier": { + "Mat\u00e9riel de bureau": { + "account_number": "2441" + }, + "Mat\u00e9riel informatique": { + "account_number": "2442" + }, + "Mat\u00e9riel bureautique": { + "account_number": "2443" + }, + "Mobilier de bureau": { + "account_number": "2444" + }, + "Mat\u00e9riel et mobilier immeubles de placement": { + "account_number": "2445" + }, + "Mat\u00e9riel et mobilier de location acquisition": { + "account_number": "2446" + }, + "Mat\u00e9riel et mobilier des logements du personnel": { + "account_number": "2447" + }, + "account_number": "244" + }, + "Mat\u00e9riel de transport": { + "Mat\u00e9riel automobile": { + "account_number": "2451" + }, + "Mat\u00e9riel ferroviaire": { + "account_number": "2452" + }, + "Mat\u00e9riel fluvial, lagunaire": { + "account_number": "2453" + }, + "Mat\u00e9riel naval": { + "account_number": "2454" + }, + "Mat\u00e9riel a\u00e9rien": { + "account_number": "2455" + }, + "Mat\u00e9riel de transport de location-acquisition": { + "account_number": "2456" + }, + "Mat\u00e9riel hippomobile": { + "account_number": "2457" + }, + "Autres mat\u00e9riels de transport": { + "account_number": "2458" + }, + "account_number": "245" + }, + "Actifs biologiques": { + "Cheptel, animaux de trait": { + "account_number": "2461" + }, + "Cheptel, animaux reproducteurs": { + "account_number": "2462" + }, + "Animaux de garde": { + "account_number": "2463" + }, + "Plantations agricoles": { + "account_number": "2465" + }, + "Autres actifs biologiques": { + "account_number": "2468" + }, + "account_number": "246" + }, + "Agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "Agencements et am\u00e9nagements du mat\u00e9riel": { + "account_number": "2471" + }, + "Agencements et am\u00e9nagements des actifs biologiques": { + "account_number": "2472" + }, + "Autres agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "account_number": "2478" + }, + "account_number": "247" + }, + "Autres mat\u00e9riels et mobiliers": { + "Collections et \u0153uvres d\u2019art": { + "account_number": "2481" + }, + "Divers mat\u00e9riels mobiliers": { + "account_number": "2488" + }, + "account_number": "248" + }, + "Mat\u00e9riels et actifs biologiques en cours": { + "Mat\u00e9riel et outillage industriel et commercial": { + "account_number": "2491" + }, + "Mat\u00e9riel et outillage agricole": { + "account_number": "2492" + }, + "Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "2493" + }, + "Mat\u00e9riel et mobilier de bureau": { + "account_number": "2494" + }, + "Mat\u00e9riel de transport": { + "account_number": "2495" + }, + "Actifs biologiques": { + "account_number": "2496" + }, + "Agencements am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "account_number": "2497" + }, + "Autres mat\u00e9riels et actifs biologiques en cours": { + "account_number": "2498" + }, + "account_number": "249" + }, + "account_number": "24" + }, + "Avances et acomptes vers\u00e9s sur immobilisations": { + "Avances et acomptes vers\u00e9s sur immobilisations incorporelles": { + "account_number": "251" + }, + "Avances et acomptes vers\u00e9s sur immobilisations corporelles": { + "account_number": "252" + }, + "account_number": "25" + }, + "Titres de participation": { + "Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": { + "account_number": "261" + }, + "Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le conjoint": { + "account_number": "262" + }, + "Titres de participation dans des soci\u00e9t\u00e9s conf\u00e9rant une influence notable": { + "account_number": "263" + }, + "Participations dans des organismes professionnels": { + "account_number": "265" + }, + "Parts dans des groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": { + "account_number": "266" + }, + "Autres titres de participation": { + "account_number": "268" + }, + "account_number": "26" + }, + "Autres immobilisations financi\u00e8res": { + "Pr\u00eats et cr\u00e9ances": { + "Pr\u00eats participatifs": { + "account_number": "2711" + }, + "Pr\u00eats aux associ\u00e9s": { + "account_number": "2712" + }, + "Billets de fonds": { + "account_number": "2713" + }, + "Titres pr\u00eat\u00e9s": { + "account_number": "2714" + }, + "Autres pr\u00eats et cr\u00e9ances": { + "account_number": "2718" + }, + "account_number": "271" + }, + "Pr\u00eats au personnel": { + "Pr\u00eats immobiliers": { + "account_number": "2721" + }, + "Pr\u00eats mobiliers et d\u2019installation": { + "account_number": "2722" + }, + "Autres pr\u00eats au personnel": { + "account_number": "2728" + }, + "account_number": "272" + }, + "Cr\u00e9ances sur l\u2019\u00c9tat": { + "Retenues de garantie": { + "account_number": "2731" + }, + "Fonds r\u00e9glement\u00e9": { + "account_number": "2733" + }, + "Cr\u00e9ances sur le conc\u00e9dant": { + "account_number": "2734" + }, + "Autres cr\u00e9ances sur l\u2019\u00c9tat": { + "account_number": "2738" + }, + "account_number": "273" + }, + "Titres immobilis\u00e9s": { + "Titres immobilis\u00e9s de l\u2019activit\u00e9 de portefeuille (TIAP)": { + "account_number": "2741" + }, + "Titres participatifs": { + "account_number": "2742" + }, + "Certificats d\u2019investissement": { + "account_number": "2743" + }, + "Parts de fonds commun de placement (FCP)": { + "account_number": "2744" + }, + "Obligations": { + "account_number": "2745" + }, + "Actions ou parts propres": { + "account_number": "2746" + }, + "Autres titres immobilis\u00e9s": { + "account_number": "2748" + }, + "account_number": "274" + }, + "D\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "D\u00e9p\u00f4ts pour loyers d\u2019avance": { + "account_number": "2751" + }, + "D\u00e9p\u00f4ts pour l\u2019\u00e9lectricit\u00e9": { + "account_number": "2752" + }, + "D\u00e9p\u00f4ts pour l\u2019eau": { + "account_number": "2753" + }, + "D\u00e9p\u00f4ts pour le gaz": { + "account_number": "2754" + }, + "D\u00e9p\u00f4ts pour le t\u00e9l\u00e9phone, le t\u00e9lex, la t\u00e9l\u00e9copie": { + "account_number": "2755" + }, + "Cautionnements sur march\u00e9s publics": { + "account_number": "2756" + }, + "Cautionnements sur autres op\u00e9rations": { + "account_number": "2757" + }, + "Autres d\u00e9p\u00f4ts et cautionnements": { + "account_number": "2758" + }, + "account_number": "275" + }, + "Int\u00e9r\u00eats courus": { + "Pr\u00eats et cr\u00e9ances non commerciales": { + "account_number": "2761" + }, + "Pr\u00eats au personnel": { + "account_number": "2762" + }, + "Cr\u00e9ances sur l\u2019\u00c9tat": { + "account_number": "2763" + }, + "Titres immobilis\u00e9s": { + "account_number": "2764" + }, + "D\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "account_number": "2765" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations": { + "account_number": "2767" + }, + "Immobilisations financi\u00e8res diverses": { + "account_number": "2768" + }, + "account_number": "276" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": { + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations (groupe)": { + "account_number": "2771" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations (hors groupe)": { + "account_number": "2772" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": { + "account_number": "2773" + }, + "Avances \u00e0 des Groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": { + "account_number": "2774" + }, + "account_number": "277" + }, + "Immobilisations financi\u00e8res diverses": { + "Cr\u00e9ances diverses groupe": { + "account_number": "2781" + }, + "Cr\u00e9ances diverses hors groupe": { + "account_number": "2782" + }, + "Banques d\u00e9p\u00f4ts \u00e0 terme": { + "account_number": "2784" + }, + "Or et m\u00e9taux pr\u00e9cieux": { + "account_number": "2785" + }, + "Autres immobilisations financi\u00e8res": { + "account_number": "2788" + }, + "account_number": "278" + }, + "account_number": "27" + }, + "Amortissements": { + "account_type": "Accumulated Depreciation", + "Amortissements des immobilisations corporelles": { + "account_type": "Accumulated Depreciation", + "Amortissements des frais de d\u00e9veloppement": { + "account_type": "Accumulated Depreciation", + "account_number": "2811" + }, + "Amortissements des brevets, licences, concessions et droits similaires": { + "account_type": "Accumulated Depreciation", + "account_number": "2812" + }, + "Amortissements des logiciels et sites internet": { + "account_type": "Accumulated Depreciation", + "account_number": "2813" + }, + "Amortissements des marques": { + "account_type": "Accumulated Depreciation", + "account_number": "2814" + }, + "Amortissements du fonds commercial": { + "account_type": "Accumulated Depreciation", + "account_number": "2815" + }, + "Amortissements du droit au bail": { + "account_type": "Accumulated Depreciation", + "account_number": "2816" + }, + "Amortissements des investissements de cr\u00e9ation": { + "account_type": "Accumulated Depreciation", + "account_number": "2817" + }, + "Amortissements des autres droits et valeurs incorporels": { + "account_type": "Accumulated Depreciation", + "account_number": "2818" + }, + "account_number": "281" + }, + "Amortissements des terrains": { + "Amortissements des travaux de mise en valeur des terrains": { + "account_number": "2824" + }, + "account_number": "282" + }, + "Amortissements des b\u00e2timents, installations techniques et agencements": { + "Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "account_number": "2831" + }, + "Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "account_number": "2832" + }, + "Amortissements des ouvrages d\u2019infrastructure": { + "account_number": "2833" + }, + "Amortissements des am\u00e9nagements, agencements et installations techniques": { + "account_number": "2834" + }, + "Amortissements des am\u00e9nagements de bureaux": { + "account_number": "2835" + }, + "Amortissements des b\u00e2timents industriels, agricoles et commerciaux mis en concession": { + "account_number": "2837" + }, + "Amortissements des autres installations et agencements": { + "account_number": "2838" + }, + "account_number": "283" + }, + "Amortissements du mat\u00e9riel": { + "Amortissements du mat\u00e9riel et outillage industriel et commercial": { + "account_number": "2841" + }, + "Amortissements du mat\u00e9riel et outillage agricole": { + "account_number": "2842" + }, + "Amortissements du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "2843" + }, + "Amortissements du mat\u00e9riel et mobilier": { + "account_number": "2844" + }, + "Amortissements du mat\u00e9riel de transport": { + "account_number": "2845" + }, + "Amortissements des actifs biologiques": { + "account_number": "2846" + }, + "Amortissements des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": { + "account_number": "2847" + }, + "Amortissements des autres mat\u00e9riels": { + "account_number": "2848" + }, + "account_number": "284" + }, + "account_number": "28" + }, + "D\u00e9pr\u00e9ciations des immobilisations": { + "D\u00e9pr\u00e9ciations des immobilisations incorporelles": { + "D\u00e9pr\u00e9ciations des frais de d\u00e9veloppement": { + "account_number": "2911" + }, + "D\u00e9pr\u00e9ciations des brevets, licences, concessions et droits similaires": { + "account_number": "2912" + }, + "D\u00e9pr\u00e9ciations des logiciels et sites internet": { + "account_number": "2913" + }, + "D\u00e9pr\u00e9ciations des marques": { + "account_number": "2914" + }, + "D\u00e9pr\u00e9ciations du fonds commercial": { + "account_number": "2915" + }, + "D\u00e9pr\u00e9ciations du droit au bail": { + "account_number": "2916" + }, + "D\u00e9pr\u00e9ciations des investissements de cr\u00e9ation": { + "account_number": "2917" + }, + "D\u00e9pr\u00e9ciations des autres droits et valeurs incorporels": { + "account_number": "2918" + }, + "D\u00e9pr\u00e9ciations des immobilisations incorporelles en cours": { + "account_number": "2919" + }, + "account_number": "291" + }, + "D\u00e9pr\u00e9ciations des terrains": { + "D\u00e9pr\u00e9ciations des terrains agricoles et forestiers": { + "account_number": "2921" + }, + "D\u00e9pr\u00e9ciations des terrains nus": { + "account_number": "2922" + }, + "D\u00e9pr\u00e9ciations des terrains b\u00e2tis": { + "account_number": "2923" + }, + "D\u00e9pr\u00e9ciations des travaux de mise en valeur des terrains": { + "account_number": "2924" + }, + "D\u00e9pr\u00e9ciations des terrains de gisement": { + "account_number": "2925" + }, + "D\u00e9pr\u00e9ciations des terrains am\u00e9nag\u00e9s": { + "account_number": "2926" + }, + "D\u00e9pr\u00e9ciations des terrains mis en concession": { + "account_number": "2927" + }, + "D\u00e9pr\u00e9ciations des autres terrains": { + "account_number": "2928" + }, + "D\u00e9pr\u00e9ciations des am\u00e9nagements de terrains en cours": { + "account_number": "2929" + }, + "account_number": "292" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents, installations techniques et agencements": { + "D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "account_number": "2931" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "account_number": "2932" + }, + "D\u00e9pr\u00e9ciations des ouvrages d\u2019infrastructures": { + "account_number": "2933" + }, + "D\u00e9pr\u00e9ciations des am\u00e9nagements, agencements et installations techniques": { + "account_number": "2934" + }, + "D\u00e9pr\u00e9ciations des am\u00e9nagements de bureaux": { + "account_number": "2935" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles et commerciaux mis en concession": { + "account_number": "2937" + }, + "D\u00e9pr\u00e9ciations des autres installations et agencements": { + "account_number": "2938" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents et installations en cours": { + "account_number": "2939" + }, + "account_number": "293" + }, + "D\u00e9pr\u00e9ciations de mat\u00e9riel, du mobilier et de l\u2019actif biologique": { + "D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage industriel et commercial": { + "account_number": "2941" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage agricole": { + "account_number": "2942" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "2943" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel et mobilier": { + "account_number": "2944" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel de transport": { + "account_number": "2945" + }, + "D\u00e9pr\u00e9ciations des actifs biologiques": { + "account_number": "2946" + }, + "D\u00e9pr\u00e9ciations des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": { + "account_number": "2947" + }, + "D\u00e9pr\u00e9ciations des autres mat\u00e9riels": { + "account_number": "2948" + }, + "D\u00e9pr\u00e9ciations de mat\u00e9riel en cours": { + "account_number": "2949" + }, + "account_number": "294" + }, + "D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations": { + "D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations incorporelles": { + "account_number": "2951" + }, + "D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations corporelles": { + "account_number": "2952" + }, + "account_number": "295" + }, + "D\u00e9pr\u00e9ciations des titres de participation": { + "D\u00e9pr\u00e9ciations des titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": { + "account_number": "2961" + }, + "D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s sous contr\u00f4le conjoint": { + "account_number": "2962" + }, + "D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s conf\u00e9rant une influence notable": { + "account_number": "2963" + }, + "D\u00e9pr\u00e9ciations des participations dans des organismes professionnels": { + "account_number": "2965" + }, + "D\u00e9pr\u00e9ciations des parts dans des GIE": { + "account_number": "2966" + }, + "D\u00e9pr\u00e9ciations des autres titres de participation": { + "account_number": "2968" + }, + "account_number": "296" + }, + "D\u00e9pr\u00e9ciations des autres immobilisations financi\u00e8res": { + "D\u00e9pr\u00e9ciations des pr\u00eats et cr\u00e9ances": { + "account_number": "2971" + }, + "D\u00e9pr\u00e9ciations des pr\u00eats au personnel": { + "account_number": "2972" + }, + "D\u00e9pr\u00e9ciations des cr\u00e9ances sur l\u2019\u00c9tat": { + "account_number": "2973" + }, + "D\u00e9pr\u00e9ciations des titres immobilis\u00e9s": { + "account_number": "2974" + }, + "D\u00e9pr\u00e9ciations des d\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "account_number": "2975" + }, + "D\u00e9pr\u00e9ciations des cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": { + "account_number": "2977" + }, + "D\u00e9pr\u00e9ciations des cr\u00e9ances financi\u00e8res diverses": { + "account_number": "2978" + }, + "account_number": "297" + }, + "account_number": "29" + }, + "root_type": "Asset", + "account_number": "2" + }, + "Comptes de Stocks": { + "Marchandises": { + "Marchandises A": { + "Marchandises A1": { + "account_number": "3111" + }, + "Marchandises A2": { + "account_number": "3112" + }, + "account_number": "311" + }, + "Marchandises B": { + "Marchandises B1": { + "account_number": "3121" + }, + "Marchandises B2": { + "account_number": "3122" + }, + "account_number": "312" + }, + "Actifs biologiques": { + "Animaux": { + "account_number": "3131" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3132" + }, + "account_number": "313" + }, + "Marchandises hors activit\u00e9s ordinaires (HAO)": { + "account_number": "318" + }, + "account_number": "31" + }, + "Mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "Mati\u00e8res A": { + "account_number": "321" + }, + "Mati\u00e8res B": { + "account_number": "322" + }, + "Fournitures (A, B)": { + "account_number": "323" + }, + "account_number": "32" + }, + "Autres approvisionnements": { + "Mati\u00e8res consommables": { + "account_number": "331" + }, + "Fournitures d\u2019atelier et d\u2019usine": { + "account_number": "332" + }, + "Fournitures de magasin": { + "account_number": "333" + }, + "Fournitures de bureau": { + "account_number": "334" + }, + "Emballages": { + "Emballages perdus": { + "account_number": "3351" + }, + "Emballages r\u00e9cup\u00e9rables non identifiables": { + "account_number": "3352" + }, + "Emballages \u00e0 usage mixte": { + "account_number": "3353" + }, + "Autres emballages": { + "account_number": "3358" + }, + "account_number": "335" + }, + "Autres mati\u00e8res": { + "account_number": "338" + }, + "account_number": "33" + }, + "Produits en cours": { + "Produits en cours": { + "Produits en cours P1": { + "account_number": "3411" + }, + "Produits en cours P2": { + "account_number": "3412" + }, + "account_number": "341" + }, + "Travaux en cours": { + "Travaux en cours T1": { + "account_number": "3421" + }, + "Travaux en cours T2": { + "account_number": "3422" + }, + "account_number": "342" + }, + "Produits interm\u00e9diaires en cours": { + "Produits interm\u00e9diaires A": { + "account_number": "3431" + }, + "Produits interm\u00e9diaires B": { + "account_number": "3432" + }, + "account_number": "343" + }, + "Produits r\u00e9siduels en cours": { + "Produits r\u00e9siduels A": { + "account_number": "3441" + }, + "Produits r\u00e9siduels B": { + "account_number": "3442" + }, + "account_number": "344" + }, + "Actifs biologiques en cours": { + "Animaux": { + "account_number": "3451" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3452" + }, + "account_number": "345" + }, + "account_number": "34" + }, + "Services en cours": { + "\u00c9tudes en cours": { + "\u00c9tudes en cours E1": { + "account_number": "3511" + }, + "\u00c9tudes en cours E2": { + "account_number": "3512" + }, + "account_number": "351" + }, + "Prestations de services en cours": { + "Prestations de services S1": { + "account_number": "3521" + }, + "Prestations de services S2": { + "account_number": "3522" + } + }, + "account_number": "35" + }, + "Produits finis": { + "Produits finis A": { + "account_number": "361" + }, + "Produits finis B": { + "account_number": "362" + }, + "Actifs biologiques": { + "Animaux": { + "account_number": "3631" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3632" + }, + "Autres stocks (activit\u00e9s annexes)": { + "account_number": "3638" + }, + "account_number": "363" + }, + "account_number": "36" + }, + "Produits interm\u00e9diaires et r\u00e9siduels": { + "Produits interm\u00e9diaires": { + "Produits interm\u00e9diaires A": { + "account_number": "3711" + }, + "Produits interm\u00e9diaires B": { + "account_number": "3712" + }, + "account_number": "371" + }, + "Produits r\u00e9siduels": { + "D\u00e9chets": { + "account_number": "3721" + }, + "Rebuts": { + "account_number": "3722" + }, + "Mati\u00e8res de R\u00e9cup\u00e9ration": { + "account_number": "3723" + }, + "account_number": "372" + }, + "Actifs biologiques": { + "Animaux": { + "account_number": "3731" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3732" + }, + "Autres stocks (activit\u00e9s annexes)": { + "account_number": "3738" + }, + "account_number": "373" + }, + "account_number": "37" + }, + "Stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": { + "account_type": "Stock", + "Marchandises en cours de route": { + "account_number": "381" + }, + "Mati\u00e8res premi\u00e8res et fournitures li\u00e9es en cours de route": { + "account_number": "382" + }, + "Autres approvisionnements en cours de route": { + "account_number": "383" + }, + "Produits finis en cours de route": { + "account_number": "386" + }, + "Stock en consignation ou en d\u00e9p\u00f4t": { + "Stock en consignation": { + "account_number": "3871" + }, + "Stock en d\u00e9p\u00f4t": { + "account_number": "3872" + }, + "account_number": "387" + }, + "Stock provenant d\u2019immobilisations mises hors service ou au rebut": { + "account_number": "388" + }, + "account_number": "38" + }, + "D\u00e9pr\u00e9ciations des stocks et encours de production": { + "D\u00e9pr\u00e9ciations des stocks de marchandises": { + "account_number": "391" + }, + "D\u00e9pr\u00e9ciations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "account_number": "392" + }, + "D\u00e9pr\u00e9ciations des stocks d\u2019autres approvisionnements": { + "account_number": "393" + }, + "D\u00e9pr\u00e9ciations des productions en cours": { + "account_number": "394" + }, + "D\u00e9pr\u00e9ciations des services en cours": { + "account_number": "395" + }, + "D\u00e9pr\u00e9ciations des stocks de produits finis": { + "account_number": "396" + }, + "D\u00e9pr\u00e9ciations des stocks de produits interm\u00e9diaires et r\u00e9siduels": { + "account_number": "397" + }, + "D\u00e9pr\u00e9ciations des stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": { + "account_number": "398" + }, + "account_number": "39" + }, + "root_type": "Asset", + "account_number": "3" + }, + "4-Comptes de Tiers (ACTIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (ACTIF)": { + "Fournisseurs d\u00e9biteurs": { + "Fournisseurs Avances et acomptes vers\u00e9s": { + "account_number": "4091" + }, + "Fournisseurs Groupe avances et acomptes vers\u00e9s": { + "account_number": "4092" + }, + "Fournisseurs Sous-traitants avances et acomptes vers\u00e9s": { + "account_number": "4093" + }, + "Fournisseurs Cr\u00e9ances pour emballages et mat\u00e9riels \u00e0 rendre": { + "account_number": "4094" + }, + "Fournisseurs Rabais, remises, ristournes et autres avoirs \u00e0 obtenir": { + "account_number": "4098" + }, + "account_number": "409" + } + }, + "41-Clients et comptes rattach\u00e9s (ACTIF)": { + "Clients": { + "Clients": { + "account_type": "Receivable", + "account_number": "4111" + }, + "Clients groupe": { + "account_type": "Receivable", + "account_number": "4112" + }, + "Clients, \u00c9tat et Collectivit\u00e9s publiques": { + "account_type": "Receivable", + "account_number": "4114" + }, + "Clients, organismes internationaux": { + "account_type": "Receivable", + "account_number": "4115" + }, + "Clients, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Receivable", + "account_number": "4116" + }, + "Client, retenues de garantie": { + "account_type": "Receivable", + "account_number": "4117" + }, + "Clients, d\u00e9gr\u00e8vement de taxes sur la valeur ajout\u00e9e (TVA)": { + "account_type": "Receivable", + "account_number": "4118" + }, + "account_type": "Receivable", + "account_number": "411" + }, + "Clients, effets \u00e0 recevoir en portefeuille": { + "Clients, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4121" + }, + "Clients Groupe, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4122" + }, + "\u00c9tat et Collectivit\u00e9s publiques, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4124" + }, + "Organismes Internationaux, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4125" + }, + "account_type": "Receivable", + "account_number": "412" + }, + "Clients, ch\u00e8ques, effets et autres valeurs impay\u00e9es": { + "Clients, ch\u00e8ques impay\u00e9s": { + "account_type": "Receivable", + "account_number": "4131" + }, + "Clients, effets impay\u00e9s": { + "account_type": "Receivable", + "account_number": "4132" + }, + "Clients, cartes de cr\u00e9dit impay\u00e9es": { + "account_type": "Receivable", + "account_number": "4133" + }, + "Clients, autres valeurs impay\u00e9es": { + "account_type": "Receivable", + "account_number": "4138" + }, + "account_type": "Receivable", + "account_number": "413" + }, + "Cr\u00e9ances sur cessions courantes d\u2019immobilisations": { + "Cr\u00e9ances en compte, immobilisations incorporelles": { + "account_type": "Receivable", + "account_number": "4141" + }, + "Cr\u00e9ances en compte, immobilisations corporelles": { + "account_type": "Receivable", + "account_number": "4142" + }, + "Effets \u00e0 recevoir, immobilisations incorporelles": { + "account_type": "Receivable", + "account_number": "4146" + }, + "Effets \u00e0 recevoir, immobilisations corporelles": { + "account_type": "Receivable", + "account_number": "4147" + }, + "account_type": "Receivable", + "account_number": "414" + }, + "Clients, effets escompt\u00e9s non \u00e9chus": { + "account_type": "Receivable", + "account_number": "415" + }, + "Cr\u00e9ances clients litigieuses ou douteuses": { + "Cr\u00e9ances litigieuses": { + "account_type": "Receivable", + "account_number": "4161" + }, + "Cr\u00e9ances douteuses": { + "account_type": "Receivable", + "account_number": "4162" + }, + "account_type": "Receivable", + "account_number": "416" + }, + "Clients, produits \u00e0 recevoir": { + "Clients, factures \u00e0 \u00e9tablir": { + "account_type": "Receivable", + "account_number": "4181" + }, + "Clients, int\u00e9r\u00eats courus": { + "account_type": "Receivable", + "account_number": "4186" + }, + "account_type": "Receivable", + "account_number": "418" + }, + "account_type": "Receivable" + }, + "42-Personnel (ACTIF)": { + "Personnel, avances et acomptes": { + "Personnel, avances": { + "account_number": "4211" + }, + "Personnel, acomptes": { + "account_number": "4212" + }, + "Frais avanc\u00e9s et fournitures au personnel": { + "account_number": "4213" + }, + "account_number": "421" + } + }, + "43-Organismes sociaux (ACTIF)": { + "431-S\u00e9curit\u00e9 sociale": { + "Prestations familiales": { + "account_number": "4311" + }, + "Accidents de travail": { + "account_number": "4312" + }, + "Caisse de retraite obligatoire": { + "account_number": "4313" + }, + "Caisse de retraite facultative": { + "account_number": "4314" + }, + "Autres cotisations sociales": { + "account_number": "4318" + } + }, + "432-Caisses de retraite compl\u00e9mentaire": {}, + "433-Autres organismes sociaux": { + "Mutuelle": { + "account_number": "4331" + }, + "Assurances retraite": { + "account_number": "4332" + }, + "Assurances et organismes de sant\u00e9": { + "account_number": "4333" + } + }, + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "Produits \u00e0 recevoir": { + "account_number": "4387" + } + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (ACTIF)": { + "\u00c9tat, TVA factur\u00e9e": { + "TVA factur\u00e9e sur ventes": { + "account_number": "4431" + }, + "TVA factur\u00e9e sur prestations de services": { + "account_number": "4432" + }, + "TVA factur\u00e9e sur travaux": { + "account_number": "4433" + }, + "TVA factur\u00e9e sur production livr\u00e9e \u00e0 soi-m\u00eame": { + "account_number": "4434" + }, + "TVA sur factures \u00e0 \u00e9tablir": { + "account_number": "4435" + }, + "account_number": "443" + }, + "\u00c9tat, TVA r\u00e9cup\u00e9rable": { + "TVA r\u00e9cup\u00e9rable sur immobilisations": { + "account_number": "4451" + }, + "TVA r\u00e9cup\u00e9rable sur achats": { + "account_number": "4452" + }, + "TVA r\u00e9cup\u00e9rable sur transport": { + "account_number": "4453" + }, + "TVA r\u00e9cup\u00e9rable sur services ext\u00e9rieurs et autres charges": { + "account_number": "4454" + }, + "TVA r\u00e9cup\u00e9rable sur factures non parvenues": { + "account_number": "4455" + }, + "TVA transf\u00e9r\u00e9e par d\u2019autres entit\u00e9s": { + "account_number": "4456" + }, + "account_number": "445" + }, + "\u00c9tat, charges \u00e0 payer et produits \u00e0 recevoir": { + "Charges \u00e0 payer": { + "account_number": "4486" + }, + "Produits \u00e0 recevoir": { + "account_number": "4487" + }, + "account_number": "448" + }, + "\u00c9tat, cr\u00e9ances et dettes diverses": { + "\u00c9tat, obligations cautionn\u00e9es": { + "account_number": "4491" + }, + "\u00c9tat, avances et acomptes vers\u00e9s sur imp\u00f4ts": { + "account_number": "4492" + }, + "\u00c9tat, fonds de dotation \u00e0 recevoir": { + "account_number": "4493" + }, + "\u00c9tat, subventions investissement \u00e0 recevoir": { + "account_number": "4494" + }, + "\u00c9tat, subventions d\u2019exploitation \u00e0 recevoir": { + "account_number": "4495" + }, + "\u00c9tat, subventions d\u2019\u00e9quilibre \u00e0 recevoir": { + "account_number": "4496" + }, + "\u00c9tat, avances sur subventions": { + "account_number": "4497" + }, + "\u00c9tat, fonds r\u00e9glement\u00e9s provisionn\u00e9s": { + "account_number": "4499" + }, + "account_number": "449" + } + }, + "45-Organismes internationaux (ACTIF)": { + "Op\u00e9rations avec les organismes africains": { + "account_number": "451" + }, + "Op\u00e9rations avec les autres organismes internationaux": { + "account_number": "452" + }, + "Organismes internationaux, fonds de dotation et subventions \u00e0 recevoir": { + "Organismes internationaux, fonds de dotation \u00e0 recevoir": { + "account_number": "4581" + }, + "Organismes internationaux, subventions \u00e0 recevoir": { + "account_number": "4582" + }, + "account_number": "458" + } + }, + "46-Apporteurs, associ\u00e9s et groupe (ACTIF)": { + "461-Apporteurs, op\u00e9rations sur le capital": { + "Apporteurs, capital appel\u00e9, non vers\u00e9": { + "account_number": "4613" + }, + "Apporteurs, compte d\u2019apport, op\u00e9rations de restructuration (fusion...)": { + "account_number": "4614" + }, + "Apporteurs, titres \u00e0 \u00e9changer": { + "account_number": "4618" + } + }, + "Apporteurs, restant d\u00fb sur capital appel\u00e9": { + "account_number": "467" + } + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (ACTIF)": { + "472-Cr\u00e9ances et dettes sur titres de placement": { + "Cr\u00e9ances sur cessions de titres de placement": { + "account_number": "4721" + }, + "Versements restant \u00e0 effectuer sur titres de placement non lib\u00e9r\u00e9s": { + "account_number": "4726" + } + }, + "473-Interm\u00e9diaires Op\u00e9rations faites pour compte de tiers": { + "Mandants": { + "account_number": "4731" + }, + "Mandataires": { + "account_number": "4732" + }, + "Commettants": { + "account_number": "4733" + }, + "Commissionnaires": { + "account_number": "4734" + }, + "\u00c9tat, Collectivit\u00e9s publiques, fonds global d\u2019allocation": { + "account_number": "4739" + } + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits": { + "Compte de r\u00e9partition p\u00e9riodique des produits": { + "account_number": "4747" + } + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA": { + "Compte actif": { + "account_type": "Temporary", + "account_number": "4751" + } + }, + "Charges constat\u00e9es d\u2019avance": { + "account_number": "476" + }, + "478-\u00c9carts de conversion actif": { + "Diminution des cr\u00e9ances d\u2019exploitation": { + "account_number": "4781" + }, + "Diminution des cr\u00e9ances financi\u00e8res": { + "account_number": "4782" + }, + "Augmentation des dettes d\u2019exploitation": { + "account_number": "4783" + }, + "Augmentation des dettes financi\u00e8res": { + "account_number": "4784" + }, + "Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": { + "account_number": "4786" + }, + "Diff\u00e9rences compens\u00e9es par couverture de change": { + "account_number": "4788" + } + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (ACTIF)": { + "Cr\u00e9ances sur cessions d\u2019immobilisations": { + "En compte, immobilisations incorporelles": { + "account_number": "4851" + }, + "En compte, immobilisations corporelles": { + "account_number": "4852" + }, + "Effets \u00e0 recevoir, immobilisations incorporelles": { + "account_number": "4853" + }, + "Effets \u00e0 recevoir, immobilisations corporelles": { + "account_number": "4854" + }, + "Effets escompt\u00e9s non \u00e9chus": { + "account_number": "4855" + }, + "Retenues de garantie": { + "account_number": "4857" + }, + "Factures \u00e0 \u00e9tablir": { + "account_number": "4858" + }, + "account_number": "485" + }, + "Autres cr\u00e9ances hors activit\u00e9s ordinaires (HAO)": { + "account_number": "488" + } + }, + "49-D\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme (tiers) (ACTIF)": { + "D\u00e9pr\u00e9ciations des comptes clients": { + "Cr\u00e9ances litigieuses": { + "account_number": "4911" + }, + "Cr\u00e9ances douteuses": { + "account_number": "4912" + }, + "account_number": "491" + }, + "D\u00e9pr\u00e9ciations des comptes organismes internationaux": { + "account_number": "495" + }, + "D\u00e9pr\u00e9ciations des comptes apporteurs, associ\u00e9s et groupe": { + "Associ\u00e9s, comptes courants": { + "account_number": "4962" + }, + "Associ\u00e9s, op\u00e9rations faites en commun": { + "account_number": "4963" + }, + "Groupe, comptes courants": { + "account_number": "4966" + }, + "account_number": "496" + }, + "D\u00e9pr\u00e9ciations des comptes d\u00e9biteurs divers": { + "account_number": "497" + }, + "D\u00e9pr\u00e9ciations des comptes de cr\u00e9ances HAO": { + "Cr\u00e9ances sur cessions d\u2019immobilisations": { + "account_number": "4985" + }, + "Cr\u00e9ances sur cessions de titres de placement": { + "account_number": "4986" + }, + "Autres cr\u00e9ances HAO": { + "account_number": "4988" + }, + "account_number": "498" + }, + "Provisions pour risques \u00e0 court terme": { + "Sur op\u00e9rations d\u2019exploitation": { + "account_number": "4991" + }, + "Sur op\u00e9rations financi\u00e8res": { + "account_number": "4997" + }, + "Sur op\u00e9rations HAO": { + "account_number": "4998" + }, + "account_number": "499" + } + }, + "root_type": "Asset" + }, + "4-Comptes de Tiers (PASSIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (PASSIF)": { + "Fournisseurs, dettes en compte": { + "Fournisseurs": { + "account_type": "Payable", + "account_number": "4011" + }, + "Fournisseurs groupe": { + "account_type": "Payable", + "account_number": "4012" + }, + "Fournisseurs sous-traitants": { + "account_type": "Payable", + "account_number": "4013" + }, + "Fournisseurs, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Payable", + "account_number": "4016" + }, + "Fournisseur, retenues de garantie": { + "account_type": "Payable", + "account_number": "4017" + }, + "account_type": "Payable", + "account_number": "401" + }, + "Fournisseurs, effets \u00e0 payer": { + "Fournisseurs Effets \u00e0 payer": { + "account_type": "Payable", + "account_number": "4021" + }, + "Fournisseurs Groupe, effets \u00e0 payer": { + "account_type": "Payable", + "account_number": "4022" + }, + "Fournisseurs Sous-traitants, effets \u00e0 payer": { + "account_type": "Payable", + "account_number": "4023" + }, + "account_type": "Payable", + "account_number": "402" + }, + "Fournisseurs, acquisitions courantes d\u2019immobilisations": { + "Fournisseurs Dettes en comptes, immobilisations incorporelles": { + "account_type": "Payable", + "account_number": "4041" + }, + "Fournisseurs Dettes en comptes, immobilisations corporelles": { + "account_type": "Payable", + "account_number": "4042" + }, + "Fournisseurs Effets \u00e0 payer, immobilisations incorporelles": { + "account_type": "Payable", + "account_number": "4046" + }, + "Fournisseurs Effets \u00e0 payer, immobilisations corporelles": { + "account_type": "Payable", + "account_number": "4047" + }, + "account_type": "Payable", + "account_number": "404" + }, + "Fournisseurs, factures non parvenues": { + "Fournisseurs": { + "account_type": "Stock Received But Not Billed", + "account_number": "4081" + }, + "Fournisseurs groupe": { + "account_type": "Stock Received But Not Billed", + "account_number": "4082" + }, + "Fournisseurs sous-traitants": { + "account_type": "Stock Received But Not Billed", + "account_number": "4083" + }, + "Fournisseurs, int\u00e9r\u00eats courus": { + "account_type": "Stock Received But Not Billed", + "account_number": "4086" + }, + "account_type": "Stock Received But Not Billed", + "account_number": "408" + }, + "account_type": "Payable" + }, + "41-Clients et comptes rattach\u00e9s (PASSIF)": { + "Clients cr\u00e9diteurs": { + "Clients, avances et acomptes re\u00e7us": { + "account_number": "4191" + }, + "Clients groupe, avances et acomptes re\u00e7us": { + "account_number": "4192" + }, + "Clients, dettes pour emballages et mat\u00e9riels consign\u00e9s": { + "account_number": "4194" + }, + "Clients, rabais, remises, ristournes et autres avoirs \u00e0 accorder": { + "account_number": "4198" + }, + "account_number": "419" + } + }, + "42-Personnel (PASSIF)": { + "Personnel, r\u00e9mun\u00e9rations dues": { + "account_number": "422" + }, + "Personnel, oppositions, saisies-arr\u00eats": { + "Personnel, oppositions": { + "account_number": "4231" + }, + "Personnel, saisies-arr\u00eats": { + "account_number": "4232" + }, + "Personnel, avis \u00e0 tiers d\u00e9tenteur": { + "account_number": "4233" + }, + "account_number": "423" + }, + "Personnel, \u0153uvres sociales internes": { + "Assistance m\u00e9dicale": { + "account_number": "4241" + }, + "Allocations familiales": { + "account_number": "4242" + }, + "Organismes sociaux rattach\u00e9s \u00e0 l\u2019entit\u00e9": { + "account_number": "4245" + }, + "Autres \u0153uvres sociales internes": { + "account_number": "4248" + }, + "account_number": "424" + }, + "Repr\u00e9sentants du personnel": { + "D\u00e9l\u00e9gu\u00e9s du personnel": { + "account_number": "4251" + }, + "Syndicats et Comit\u00e9s d\u2019entreprises, d\u2019\u00c9tablissement": { + "account_number": "4252" + }, + "Autres repr\u00e9sentants du personnel": { + "account_number": "4258" + }, + "account_number": "425" + }, + "Personnel, participation aux b\u00e9n\u00e9fices et au capital": { + "Participation aux b\u00e9n\u00e9fices": { + "account_number": "4261" + }, + "Participation au capital": { + "account_number": "4264" + }, + "account_number": "426" + }, + "Personnel d\u00e9p\u00f4ts": { + "account_number": "427" + }, + "Personnel, charges \u00e0 payer et produits \u00e0 recevoir": { + "Dettes provisionn\u00e9es pour cong\u00e9s \u00e0 payer": { + "account_number": "4281" + }, + "Autres charges \u00e0 payer": { + "account_number": "4286" + }, + "Produits \u00e0 recevoir": { + "account_number": "4287" + }, + "account_number": "428" + } + }, + "43-Organismes sociaux (PASSIF)": { + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "Charges sociales sur gratifications \u00e0 payer": { + "account_number": "4381" + }, + "Charges sociales sur cong\u00e9s \u00e0 payer": { + "account_number": "4382" + }, + "Autres charges \u00e0 payer": { + "account_number": "4386" + } + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (PASSIF)": { + "\u00c9tat, imp\u00f4t sur les b\u00e9n\u00e9fices": { + "account_number": "441" + }, + "\u00c9tat, autres imp\u00f4ts et taxes": { + "Imp\u00f4ts et taxes d\u2019\u00c9tat": { + "account_number": "4421" + }, + "Imp\u00f4ts et taxes pour les collectivit\u00e9s publiques": { + "account_number": "4422" + }, + "Imp\u00f4ts et taxes recouvrables sur des obligataires": { + "account_number": "4423" + }, + "Imp\u00f4ts et taxes recouvrables sur des associ\u00e9s": { + "account_number": "4424" + }, + "Droits de douane": { + "account_number": "4426" + }, + "Autres imp\u00f4ts et taxes": { + "account_number": "4428" + }, + "account_number": "442" + }, + "\u00c9tat, TVA due ou cr\u00e9dit de TVA": { + "\u00c9tat, TVA due": { + "account_number": "4441" + }, + "\u00c9tat, cr\u00e9dit de TVA \u00e0 reporter": { + "account_number": "4449" + }, + "account_number": "444" + }, + "\u00c9tat, autres taxes sur le chiffre d\u2019affaires": { + "account_number": "446" + }, + "\u00c9tat, imp\u00f4ts retenus \u00e0 la source": { + "Imp\u00f4t G\u00e9n\u00e9ral sur le revenu": { + "account_number": "4471" + }, + "Imp\u00f4ts sur salaires": { + "account_number": "4472" + }, + "Contribution nationale": { + "account_number": "4473" + }, + "Contribution nationale de solidarit\u00e9": { + "account_number": "4474" + }, + "Autres imp\u00f4ts et contributions": { + "account_number": "4478" + }, + "account_number": "447" + } + }, + "46-Apporteurs, associ\u00e9s et groupe (PASSIF)": { + "461-Apporteurs, op\u00e9rations sur le capital (PASSIF)": { + "Apporteurs, apports en nature": { + "account_number": "4611" + }, + "Apporteurs, apports en num\u00e9raire": { + "account_number": "4612" + }, + "Apporteurs, versements re\u00e7us sur augmentation de capital": { + "account_number": "4615" + }, + "Apporteurs, versements anticip\u00e9s": { + "account_number": "4616" + }, + "Apporteurs d\u00e9faillants": { + "account_number": "4617" + }, + "Apporteurs, capital \u00e0 rembourser": { + "account_number": "4619" + } + }, + "462-Associ\u00e9s, comptes courants": { + "Principal": { + "account_number": "4621" + }, + "Int\u00e9r\u00eats courus": { + "account_number": "4626" + } + }, + "463-Associ\u00e9s, op\u00e9rations faites en commun et GIE": { + "Op\u00e9rations courantes": { + "account_number": "4631" + }, + "Int\u00e9r\u00eats courus": { + "account_number": "4636" + } + }, + "Associ\u00e9s, dividendes \u00e0 payer": { + "account_number": "465" + }, + "Groupe, comptes courants": { + "account_number": "466" + } + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (PASSIF)": { + "471-D\u00e9biteurs et cr\u00e9diteurs divers": { + "D\u00e9biteurs divers": { + "account_number": "4711" + }, + "Cr\u00e9diteurs divers": { + "account_number": "4712" + }, + "Obligataires": { + "account_number": "4713" + }, + "R\u00e9mun\u00e9rations d\u2019administrateurs": { + "account_number": "4715" + }, + "Compte d\u2019affacturage": { + "account_number": "4716" + }, + "D\u00e9biteurs divers retenues de garantie": { + "account_number": "4717" + }, + "Apport, compte de fusion et op\u00e9rations assimil\u00e9es": { + "account_number": "4718" + }, + "Bons de souscription d\u2019actions et d\u2019obligations": { + "account_number": "4719" + } + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits (PASSIF)": { + "Compte de r\u00e9partition p\u00e9riodique des charges": { + "account_number": "4746" + } + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA (PASSIF)": { + "Compte passif": { + "account_number": "4752" + } + }, + "Produits constat\u00e9s d\u2019avance": { + "account_number": "477" + }, + "479-\u00c9carts de conversion passif": { + "Augmentation des cr\u00e9ances d\u2019exploitation": { + "account_number": "4791" + }, + "Augmentation des cr\u00e9ances financi\u00e8res": { + "account_number": "4792" + }, + "Diminution des dettes d\u2019exploitation": { + "account_number": "4793" + }, + "Diminution des dettes financi\u00e8res": { + "account_number": "4794" + }, + "Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": { + "account_number": "4797" + }, + "Diff\u00e9rences compens\u00e9es par couverture de change": { + "account_number": "4798" + } + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (HAO) (PASSIF)": { + "Fournisseurs d\u2019investissements": { + "Immobilisations incorporelles": { + "account_number": "4811" + }, + "Immobilisations corporelles": { + "account_number": "4812" + }, + "Versements restant \u00e0 effectuer sur titres de participation et titres immobilis\u00e9s non lib\u00e9r\u00e9s": { + "account_number": "4813" + }, + "R\u00e9serve de propri\u00e9t\u00e9": { + "account_number": "4816" + }, + "Retenues de garantie": { + "account_number": "4817" + }, + "Factures non parvenues": { + "account_number": "4818" + }, + "account_number": "481" + }, + "Fournisseurs d\u2019investissements, effets \u00e0 payer": { + "Immobilisations incorporelles": { + "account_number": "4821" + }, + "Immobilisations corporelles": { + "account_number": "4822" + }, + "account_number": "482" + }, + "Autres dettes hors activit\u00e9s ordinaires (HAO)": { + "Produits": { + "account_number": "4887" + }, + "account_number": "484" + } + }, + "root_type": "Liability" + }, + "Comptes de tr\u00e9sorerie": { + "Titres de placement": { + "Titres du tr\u00e9sor et bons de caisse \u00e0 court terme": { + "Titres du Tr\u00e9sor \u00e0 court terme": { + "account_number": "5011" + }, + "Titres d\u2019organismes financiers": { + "account_number": "5012" + }, + "Bons de caisse \u00e0 court terme": { + "account_number": "5013" + }, + "Frais d\u2019acquisition des titres de tr\u00e9sor et bons de caisse": { + "account_number": "5016" + }, + "account_number": "501" + }, + "Actions": { + "Actions ou parts propres": { + "account_number": "5021" + }, + "Actions cot\u00e9es": { + "account_number": "5022" + }, + "Actions non cot\u00e9es": { + "account_number": "5023" + }, + "Actions d\u00e9membr\u00e9es (certificats d\u2019investissement, droits de vote)": { + "account_number": "5024" + }, + "Autres actions": { + "account_number": "5025" + }, + "Frais d\u2019acquisition des actions": { + "account_number": "5026" + }, + "account_number": "502" + }, + "Obligations": { + "Obligations \u00e9mises par la soci\u00e9t\u00e9 et rachet\u00e9es par elle": { + "account_number": "5031" + }, + "Obligations cot\u00e9es": { + "account_number": "5032" + }, + "Obligations non cot\u00e9es": { + "account_number": "5033" + }, + "Autres obligations": { + "account_number": "5035" + }, + "Frais d\u2019acquisition des obligations": { + "account_number": "5036" + }, + "account_number": "503" + }, + "Bons de souscription": { + "Bons de souscription d\u2019actions": { + "account_number": "5042" + }, + "Bons de souscription d\u2019obligations": { + "account_number": "5043" + }, + "account_number": "504" + }, + "Titres n\u00e9gociables hors r\u00e9gion": { + "account_number": "505" + }, + "Int\u00e9r\u00eats courus": { + "Titres du Tr\u00e9sor et bons de caisse \u00e0 court terme": { + "account_number": "5061" + }, + "Actions": { + "account_number": "5062" + }, + "Obligations": { + "account_number": "5063" + }, + "account_number": "506" + }, + "Autres titres de placement et cr\u00e9ances assimil\u00e9es": { + "account_number": "508" + }, + "account_number": "50" + }, + "Valeurs \u00e0 encaisser": { + "Effets \u00e0 encaisser": { + "account_number": "511" + }, + "Effets \u00e0 l\u2019encaissement": { + "account_number": "512" + }, + "Ch\u00e8ques \u00e0 encaisser": { + "account_number": "513" + }, + "Ch\u00e8ques \u00e0 l\u2019encaissement": { + "account_number": "514" + }, + "Cartes de cr\u00e9dit \u00e0 encaisser": { + "account_number": "515" + }, + "Autres valeurs \u00e0 l\u2019encaissement": { + "Warrants": { + "account_number": "5181" + }, + "Billets de fonds": { + "account_number": "5182" + }, + "Ch\u00e8ques de voyage": { + "account_number": "5185" + }, + "Coupons \u00e9chus": { + "account_number": "5186" + }, + "Int\u00e9r\u00eats \u00e9chus des obligations": { + "account_number": "5187" + }, + "account_number": "518" + }, + "account_number": "51" + }, + "Banques": { + "Banques locales": { + "Banques en monnaie nationale": { + "account_type": "Bank", + "account_number": "5211" + }, + "Banques en devises": { + "account_type": "Bank", + "account_number": "5215" + }, + "account_type": "Bank", + "account_number": "521" + }, + "Banques autres \u00c9tats r\u00e9gion": { + "account_number": "522" + }, + "Banques autres \u00c9tats zone mon\u00e9taire": { + "account_number": "523" + }, + "Banques hors zone mon\u00e9taire": { + "account_number": "524" + }, + "Banques d\u00e9p\u00f4t \u00e0 terme": { + "account_number": "525" + }, + "Banques, int\u00e9r\u00eats courus": { + "Banque, int\u00e9r\u00eats courus, charges \u00e0 payer": { + "account_number": "5261" + }, + "Banque, int\u00e9r\u00eats courus, produits \u00e0 recevoir": { + "account_number": "5267" + }, + "account_number": "526" + }, + "account_number": "52" + }, + "\u00c9tablissements financiers et assimil\u00e9s": { + "Ch\u00e8ques postaux": { + "account_number": "531" + }, + "Tr\u00e9sor": { + "account_number": "532" + }, + "Soci\u00e9t\u00e9s de gestion et d\u2019interm\u00e9diation (SGI)": { + "account_number": "533" + }, + "\u00c9tablissements financiers, int\u00e9r\u00eats courus": { + "account_number": "536" + }, + "Autres organismes financiers": { + "account_number": "538" + }, + "account_number": "53" + }, + "Instruments de tr\u00e9sorerie": { + "Options de taux d\u2019int\u00e9r\u00eat": { + "account_number": "541" + }, + "Options de taux de change": { + "account_number": "542" + }, + "Options de taux boursiers": { + "account_number": "543" + }, + "Instruments de march\u00e9s \u00e0 terme": { + "account_number": "544" + }, + "Avoirs d\u2019or et autres m\u00e9taux pr\u00e9cieux": { + "account_number": "545" + }, + "account_number": "54" + }, + "Instruments de monnaie \u00e9lectronique": { + "Monnaie \u00e9lectronique carte carburant": { + "account_number": "551" + }, + "Monnaie \u00e9lectronique t\u00e9l\u00e9phone portable": { + "account_number": "552" + }, + "Monnaie \u00e9lectronique carte p\u00e9age": { + "account_number": "553" + }, + "Porte-monnaie \u00e9lectronique": { + "account_number": "554" + }, + "Autres instruments de monnaies \u00e9lectroniques": { + "account_number": "558" + }, + "account_number": "55" + }, + "Banques, cr\u00e9dits de tr\u00e9sorerie et d\u2019escompte": { + "Cr\u00e9dits de tr\u00e9sorerie": { + "account_number": "561" + }, + "Escompte de cr\u00e9dits de campagne": { + "account_number": "564" + }, + "Escompte de cr\u00e9dits ordinaires": { + "account_number": "565" + }, + "Banques, cr\u00e9dits de tr\u00e9sorerie, int\u00e9r\u00eats courus": { + "account_number": "566" + }, + "account_number": "56" + }, + "Caisse": { + "Caisse si\u00e8ge social": { + "Caisse en monnaie nationale": { + "account_number": "5711" + }, + "Caisse en devises": { + "account_number": "5712" + }, + "account_number": "571" + }, + "Caisse succursale A": { + "En monnaie nationale": { + "account_number": "5721" + }, + "En devises": { + "account_number": "5722" + }, + "account_number": "572" + }, + "Caisse succursale B": { + "En monnaie nationale": { + "account_number": "5731" + }, + "En devises": { + "account_number": "5732" + }, + "account_number": "573" + }, + "account_number": "57" + }, + "R\u00e9gies d\u2019avances, accr\u00e9ditifs et virements internes": { + "R\u00e9gies d\u2019avance": { + "account_number": "581" + }, + "Accr\u00e9ditifs": { + "account_number": "582" + }, + "Virements de fonds": { + "account_number": "585" + }, + "Autres virements internes": { + "account_number": "588" + }, + "account_number": "58" + }, + "D\u00e9pr\u00e9ciations et provisions pour risque \u00e0 court terme": { + "D\u00e9pr\u00e9ciations des titres de placement": { + "account_number": "590" + }, + "D\u00e9pr\u00e9ciations des titres et valeurs \u00e0 encaisser": { + "account_number": "591" + }, + "D\u00e9pr\u00e9ciations des comptes banques": { + "account_number": "592" + }, + "D\u00e9pr\u00e9ciations des comptes \u00e9tablissements financiers et assimil\u00e9s": { + "account_number": "593" + }, + "D\u00e9pr\u00e9ciations des comptes d\u2019instruments de tr\u00e9sorerie": { + "account_number": "594" + }, + "Provisions pour risque \u00e0 court terme \u00e0 caract\u00e8re financier": { + "account_number": "599" + }, + "account_number": "59" + }, + "root_type": "Asset", + "account_number": "5" + }, + "Comptes de charges des activit\u00e9s ordinaires": { + "Achats et variations de stocks": { + "Achats de marchandises": { + "Dans la R\u00e9gion": { + "account_number": "6011" + }, + "Hors R\u00e9gion": { + "account_number": "6012" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "6013" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "6014" + }, + "Frais sur achats": { + "account_number": "6015" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6019" + }, + "account_number": "601" + }, + "Achats de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "Dans la R\u00e9gion": { + "account_number": "6021" + }, + "Hors R\u00e9gion": { + "account_number": "6022" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "6023" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "6024" + }, + "Frais sur achats": { + "account_number": "6025" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6029" + }, + "account_number": "602" + }, + "Variations des stocks de biens achet\u00e9s": { + "Variations des stocks de marchandises": { + "account_number": "6031" + }, + "Variations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "account_number": "6032" + }, + "Variations des stocks d\u2019autres approvisionnements": { + "account_number": "6033" + }, + "account_number": "603" + }, + "Achats stock\u00e9s de mati\u00e8res et fournitures consommables": { + "Mati\u00e8res consommables": { + "account_number": "6041" + }, + "Mati\u00e8res combustibles": { + "account_number": "6042" + }, + "Produits d\u2019entretien": { + "account_number": "6043" + }, + "Fournitures d\u2019atelier et d\u2019usine": { + "account_number": "6044" + }, + "Frais sur achat": { + "account_number": "6045" + }, + "Fournitures de magasin": { + "account_number": "6046" + }, + "Fournitures de bureau": { + "account_number": "6047" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6049" + }, + "account_number": "604" + }, + "Autres achats": { + "Fournitures non stockables Eau": { + "account_number": "6051" + }, + "Fournitures non stockables \u00c9lectricit\u00e9": { + "account_number": "6052" + }, + "Fournitures non stockables Autres \u00e9nergies": { + "account_number": "6053" + }, + "Fournitures d\u2019entretien non stockables": { + "account_number": "6054" + }, + "Fournitures de bureau non stockables": { + "account_number": "6055" + }, + "Achats de petit mat\u00e9riel et outillage": { + "account_number": "6056" + }, + "Achats d\u2019\u00e9tudes et prestations de services": { + "account_number": "6057" + }, + "Achats de travaux, mat\u00e9riels et \u00e9quipements": { + "account_number": "6058" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6059" + }, + "account_number": "605" + }, + "Achats d\u2019emballages": { + "Emballages perdus": { + "account_number": "6081" + }, + "Emballages r\u00e9cup\u00e9rables non identifiables": { + "account_number": "6082" + }, + "Emballages \u00e0 usage mixte": { + "account_number": "6083" + }, + "Frais sur achats": { + "account_number": "6085" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6089" + }, + "account_number": "608" + }, + "account_number": "60" + }, + "Transports": { + "Transports sur ventes": { + "account_number": "612" + }, + "Transports pour le compte de tiers": { + "account_number": "613" + }, + "Transports du personnel": { + "account_number": "614" + }, + "Transports de plis": { + "account_number": "616" + }, + "Autres frais de transport": { + "Voyages et d\u00e9placements": { + "account_number": "6181" + }, + "Transports entre \u00e9tablissements ou chantiers": { + "account_number": "6182" + }, + "Transports administratifs": { + "account_number": "6183" + }, + "account_number": "618" + }, + "account_number": "61" + }, + "Services ext\u00e9rieurs": { + "Sous-traitance g\u00e9n\u00e9rale": { + "account_number": "621" + }, + "Locations, charges locatives": { + "Locations de terrains": { + "account_number": "6221" + }, + "Locations de b\u00e2timents": { + "account_number": "6222" + }, + "Locations de mat\u00e9riels et outillages": { + "account_number": "6223" + }, + "Malis sur emballages": { + "account_number": "6224" + }, + "Locations d\u2019emballages": { + "account_number": "6225" + }, + "Fermages et loyers du foncier": { + "account_number": "6226" + }, + "Locations et charges locatives diverses": { + "account_number": "6228" + }, + "account_number": "622" + }, + "Redevances de location acquisition": { + "Cr\u00e9dit-bail immobilier": { + "account_number": "6232" + }, + "Cr\u00e9dit-bail mobilier": { + "account_number": "6233" + }, + "Location-vente": { + "account_number": "6234" + }, + "Autres contrats de location acquisition": { + "account_number": "6238" + }, + "account_number": "623" + }, + "Entretien, r\u00e9parations, remise en \u00e9tat et maintenance": { + "Entretien et r\u00e9parations des biens immobiliers": { + "account_number": "6241" + }, + "Entretien et r\u00e9parations des biens mobiliers": { + "account_number": "6242" + }, + "Maintenance": { + "account_number": "6243" + }, + "Charges de d\u00e9mant\u00e8lement et remise en \u00e9tat": { + "account_number": "6244" + }, + "Autres entretiens et r\u00e9parations": { + "account_number": "6248" + }, + "account_number": "624" + }, + "Primes d\u2019assurance": { + "Assurances multirisques": { + "account_number": "6251" + }, + "Assurances mat\u00e9riel de transport": { + "account_number": "6252" + }, + "Assurances risques d\u2019exploitation": { + "account_number": "6253" + }, + "Assurances responsabilit\u00e9 du producteur": { + "account_number": "6254" + }, + "Assurances insolvabilit\u00e9 clients": { + "account_number": "6255" + }, + "Assurances transport sur ventes": { + "account_number": "6257" + }, + "Autres primes d\u2019assurances": { + "account_number": "6258" + }, + "account_number": "625" + }, + "\u00c9tudes, recherches et documentation": { + "\u00c9tudes et recherches": { + "account_number": "6261" + }, + "Documentation g\u00e9n\u00e9rale": { + "account_number": "6265" + }, + "Documentation technique": { + "account_number": "6266" + }, + "account_number": "626" + }, + "Publicit\u00e9, publications, relations publiques": { + "Annonces, insertions": { + "account_number": "6271" + }, + "Catalogues, imprim\u00e9s publicitaires": { + "account_number": "6272" + }, + "\u00c9chantillons": { + "account_number": "6273" + }, + "Foires et expositions": { + "account_number": "6274" + }, + "Publications": { + "account_number": "6275" + }, + "Cadeaux \u00e0 la client\u00e8le": { + "account_number": "6276" + }, + "Frais de colloques, s\u00e9minaires, conf\u00e9rences": { + "account_number": "6277" + }, + "Autres charges de publicit\u00e9 et relations publiques": { + "account_number": "6278" + }, + "account_number": "627" + }, + "Frais de t\u00e9l\u00e9communications": { + "Frais de t\u00e9l\u00e9phone": { + "account_number": "6281" + }, + "Frais de t\u00e9lex": { + "account_number": "6282" + }, + "Frais de t\u00e9l\u00e9copie": { + "account_number": "6283" + }, + "Autres frais de t\u00e9l\u00e9communications": { + "account_number": "6288" + }, + "account_number": "628" + }, + "account_number": "62" + }, + "Autres services ext\u00e9rieurs": { + "Frais bancaires": { + "Frais sur titres (vente, garde)": { + "account_number": "6311" + }, + "Frais sur effets": { + "account_number": "6312" + }, + "Location de coffres": { + "account_number": "6313" + }, + "Commissions d\u2019affacturage": { + "account_number": "6314" + }, + "Commissions sur cartes de cr\u00e9dit": { + "account_number": "6315" + }, + "Frais d\u2019\u00e9mission d\u2019emprunts": { + "account_number": "6316" + }, + "Frais sur instruments monnaie \u00e9lectronique": { + "account_number": "6317" + }, + "Autres frais bancaires": { + "account_number": "6318" + }, + "account_number": "631" + }, + "R\u00e9mun\u00e9rations d\u2019interm\u00e9diaires et de conseils": { + "Commissions et courtages sur ventes": { + "account_number": "6322" + }, + "Honoraires des professions r\u00e9glement\u00e9es": { + "account_number": "6324" + }, + "Frais d\u2019actes et de contentieux": { + "account_number": "6325" + }, + "R\u00e9mun\u00e9rations d\u2019affacturage": { + "account_number": "6326" + }, + "R\u00e9mun\u00e9rations des autres prestataires de services": { + "account_number": "6327" + }, + "Divers frais": { + "account_number": "6328" + }, + "account_number": "632" + }, + "Frais de formation du personnel": { + "account_number": "633" + }, + "Redevances pour brevets, licences, logiciels, concessions et droits et valeurs similaires": { + "Redevances pour brevets, licences": { + "account_number": "6342" + }, + "Redevances pour logiciels": { + "account_number": "6343" + }, + "Redevances pour marques": { + "account_number": "6344" + }, + "Redevances pour sites internet": { + "account_number": "6345" + }, + "Redevances pour concessions, droits et valeurs similaires": { + "account_number": "6346" + }, + "account_number": "634" + }, + "Cotisations": { + "Cotisations": { + "account_number": "6351" + }, + "Concours divers": { + "account_number": "6358" + }, + "account_number": "635" + }, + "R\u00e9mun\u00e9rations de personnel ext\u00e9rieur \u00e0 l\u2019entit\u00e9": { + "Personnel int\u00e9rimaire": { + "account_number": "6371" + }, + "Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": { + "account_number": "6372" + }, + "account_number": "637" + }, + "Autres charges externes": { + "Frais de recrutement du personnel": { + "account_number": "6381" + }, + "Frais de d\u00e9m\u00e9nagement": { + "account_number": "6382" + }, + "R\u00e9ceptions": { + "account_number": "6383" + }, + "Missions": { + "account_number": "6384" + }, + "Charges de copropri\u00e9t\u00e9": { + "account_number": "6385" + }, + "account_number": "638" + }, + "account_number": "63" + }, + "Imp\u00f4ts et taxes": { + "Imp\u00f4ts et taxes directs": { + "Imp\u00f4ts fonciers et taxes annexes": { + "account_number": "6411" + }, + "Patentes, licences et taxes annexes": { + "account_number": "6412" + }, + "Taxes sur appointements et salaires": { + "account_number": "6413" + }, + "Taxes d\u2019apprentissage": { + "account_number": "6414" + }, + "Formation professionnelle continue": { + "account_number": "6415" + }, + "Autres imp\u00f4ts et taxes directs": { + "account_number": "6418" + }, + "account_number": "641" + }, + "Imp\u00f4ts et taxes indirects": { + "account_number": "645" + }, + "Droits d\u2019enregistrement": { + "Droits de mutation": { + "account_number": "6461" + }, + "Droits de timbre": { + "account_number": "6462" + }, + "Taxes sur les v\u00e9hicules de soci\u00e9t\u00e9": { + "account_number": "6463" + }, + "Vignettes": { + "account_number": "6464" + }, + "Autres droits": { + "account_number": "6468" + }, + "account_number": "646" + }, + "P\u00e9nalit\u00e9s, amendes fiscales": { + "P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts directs": { + "account_number": "6471" + }, + "P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts indirects": { + "account_number": "6472" + }, + "P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts directs": { + "account_number": "6473" + }, + "P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts indirects": { + "account_number": "6474" + }, + "Autres p\u00e9nalit\u00e9s et amendes fiscales": { + "account_number": "6478" + }, + "account_number": "647" + }, + "Autres imp\u00f4ts et taxes": { + "account_number": "648" + }, + "account_number": "64" + }, + "Autres charges": { + "Pertes sur cr\u00e9ances clients et autres d\u00e9biteurs": { + "Clients": { + "account_number": "6511" + }, + "Autres d\u00e9biteurs": { + "account_number": "6515" + }, + "account_number": "651" + }, + "Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "Quote-part transf\u00e9r\u00e9e de b\u00e9n\u00e9fices (comptabilit\u00e9 du g\u00e9rant)": { + "account_number": "6521" + }, + "Pertes imput\u00e9es par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": { + "account_number": "6525" + }, + "account_number": "652" + }, + "Valeurs comptables des cessions courantes d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "6541" + }, + "Immobilisations corporelles": { + "account_number": "6542" + }, + "account_number": "654" + }, + "Perte de change sur cr\u00e9ances et dettes commerciale": { + "account_number": "656" + }, + "P\u00e9nalit\u00e9s et amendes p\u00e9nales": { + "account_number": "657" + }, + "Charges diverses": { + "Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": { + "account_number": "6581" + }, + "Dons": { + "account_number": "6582" + }, + "M\u00e9c\u00e9nat": { + "account_number": "6583" + }, + "Autres charges diverses": { + "account_number": "6588" + }, + "account_number": "658" + }, + "Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "Sur risques \u00e0 court terme": { + "account_number": "6591" + }, + "Sur stocks": { + "account_number": "6593" + }, + "Sur cr\u00e9ances": { + "account_number": "6594" + }, + "Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme": { + "account_number": "6598" + }, + "account_number": "659" + }, + "account_number": "65" + }, + "Charges de personnel": { + "R\u00e9mun\u00e9rations directes vers\u00e9es au personnel national": { + "Appointements salaires et commissions": { + "account_number": "6611" + }, + "Primes et gratifications": { + "account_number": "6612" + }, + "Cong\u00e9s pay\u00e9s": { + "account_number": "6613" + }, + "Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": { + "account_number": "6614" + }, + "Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": { + "account_number": "6615" + }, + "Suppl\u00e9ment familial": { + "account_number": "6616" + }, + "Avantages en nature": { + "account_number": "6617" + }, + "Autres r\u00e9mun\u00e9rations directes": { + "account_number": "6618" + }, + "account_number": "661" + }, + "R\u00e9mun\u00e9rations directes vers\u00e9es au personnel non national": { + "Appointements salaires et commissions": { + "account_number": "6621" + }, + "Primes et gratifications": { + "account_number": "6622" + }, + "Cong\u00e9s pay\u00e9s": { + "account_number": "6623" + }, + "Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": { + "account_number": "6624" + }, + "Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": { + "account_number": "6625" + }, + "Suppl\u00e9ment familial": { + "account_number": "6626" + }, + "Avantages en nature": { + "account_number": "6627" + }, + "Autres r\u00e9mun\u00e9rations directes": { + "account_number": "6628" + }, + "account_number": "662" + }, + "Indemnit\u00e9s forfaitaires vers\u00e9es au personnel": { + "Indemnit\u00e9s de logement": { + "account_number": "6631" + }, + "Indemnit\u00e9s de repr\u00e9sentation": { + "account_number": "6632" + }, + "Indemnit\u00e9s d\u2019expatriation": { + "account_number": "6633" + }, + "Indemnit\u00e9s de transport": { + "account_number": "6634" + }, + "Autres indemnit\u00e9s et avantages divers": { + "account_number": "6638" + }, + "account_number": "663" + }, + "Charges sociales": { + "Charges sociales sur r\u00e9mun\u00e9ration du personnel national": { + "account_number": "6641" + }, + "Charges sociales sur r\u00e9mun\u00e9ration du personnel non national": { + "account_number": "6642" + }, + "account_number": "664" + }, + "R\u00e9mun\u00e9rations et charges sociales de l\u2019exploitant individuel": { + "R\u00e9mun\u00e9ration du travail de l\u2019exploitant": { + "account_number": "6661" + }, + "Charges sociales": { + "account_number": "6662" + }, + "account_number": "666" + }, + "R\u00e9mun\u00e9ration transf\u00e9r\u00e9e de personnel ext\u00e9rieur": { + "Personnel int\u00e9rimaire": { + "account_number": "6671" + }, + "Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": { + "account_number": "6672" + }, + "account_number": "667" + }, + "Autres charges sociales": { + "Versements aux syndicats et comit\u00e9s d\u2019entreprise, d\u2019\u00e9tablissement": { + "account_number": "6681" + }, + "Versements aux comit\u00e9s d\u2019hygi\u00e8ne et de s\u00e9curit\u00e9": { + "account_number": "6682" + }, + "Versements et contributions aux autres \u0153uvres sociales": { + "account_number": "6683" + }, + "M\u00e9decine du travail et pharmacie": { + "account_number": "6684" + }, + "Assurances et organismes de sant\u00e9": { + "account_number": "6685" + }, + "Assurances retraite et fonds de pension": { + "account_number": "6686" + }, + "Majorations et p\u00e9nalit\u00e9s sociales": { + "account_number": "6687" + }, + "Charges sociales diverses": { + "account_number": "6688" + }, + "account_number": "668" + }, + "account_number": "66" + }, + "Frais financiers et charges assimil\u00e9es": { + "Int\u00e9r\u00eats des emprunts": { + "Emprunts obligataires": { + "account_number": "6711" + }, + "Emprunts aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": { + "account_number": "6712" + }, + "Dettes li\u00e9es \u00e0 des participations": { + "account_number": "6713" + }, + "Primes de remboursement des obligations": { + "account_number": "6714" + }, + "account_number": "671" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition": { + "Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail immobilier": { + "account_number": "6722" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail mobilier": { + "account_number": "6723" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition / location-vente": { + "account_number": "6724" + }, + "Int\u00e9r\u00eats dans loyers des autres locations acquisition": { + "account_number": "6728" + }, + "account_number": "672" + }, + "Escomptes accord\u00e9s": { + "account_number": "673" + }, + "Autres int\u00e9r\u00eats": { + "Avances re\u00e7ues et d\u00e9p\u00f4ts cr\u00e9diteurs": { + "account_number": "6741" + }, + "Comptes courants bloqu\u00e9s": { + "account_number": "6742" + }, + "Int\u00e9r\u00eats sur obligations cautionn\u00e9es": { + "account_number": "6743" + }, + "Int\u00e9r\u00eats sur dettes commerciales": { + "account_number": "6744" + }, + "Int\u00e9r\u00eats bancaires et sur op\u00e9rations de financement (escompte...)": { + "account_number": "6745" + }, + "Int\u00e9r\u00eats sur dettes diverses": { + "account_number": "6748" + }, + "account_number": "674" + }, + "Escomptes des effets de commerce": { + "account_number": "675" + }, + "Pertes de change financi\u00e8res": { + "account_number": "676" + }, + "Pertes sur titres de placement": { + "Pertes sur cessions de titres de placement": { + "account_number": "6771" + }, + "Mali provenant d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": { + "account_number": "6772" + }, + "account_number": "677" + }, + "Pertes et charges sur risques financiers": { + "Sur rentes viag\u00e8res": { + "account_number": "6781" + }, + "Sur op\u00e9rations financi\u00e8res": { + "account_number": "6782" + }, + "Sur instruments de tr\u00e9sorerie": { + "account_number": "6784" + }, + "account_number": "678" + }, + "Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "Sur risques financiers": { + "account_number": "6791" + }, + "Sur titres de placement": { + "account_number": "6795" + }, + "Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "account_number": "6798" + }, + "account_number": "679" + }, + "account_number": "67" + }, + "Dotations aux amortissements": { + "Dotations aux amortissements d\u2019exploitation": { + "Dotations aux amortissements des immobilisations incorporelles": { + "account_number": "6812" + }, + "Dotations aux amortissements des immobilisations corporelles": { + "account_number": "6813" + }, + "account_number": "681" + }, + "account_number": "68" + }, + "Dotations aux provisions et aux d\u00e9pr\u00e9ciations": { + "Dotations aux provisions et aux d\u00e9pr\u00e9ciations d\u2019exploitation": { + "Dotations aux provisions pour risques et charges": { + "account_number": "6911" + }, + "Dotations aux d\u00e9pr\u00e9ciations des immobilisations incorporelles": { + "account_number": "6913" + }, + "Dotations aux d\u00e9pr\u00e9ciations des immobilisations corporelles": { + "account_number": "6914" + }, + "account_number": "691" + }, + "Dotations aux provisions et aux d\u00e9pr\u00e9ciations financi\u00e8res": { + "Dotations aux provisions pour risques et charges": { + "account_number": "6971" + }, + "Dotations aux d\u00e9pr\u00e9ciations des immobilisations financi\u00e8res": { + "account_number": "6972" + }, + "account_number": "697" + }, + "account_number": "69" + }, + "root_type": "Expense", + "account_number": "6" + }, + "Comptes de produits des activit\u00e9s ordinaires": { + "Ventes": { + "Ventes de marchandises": { + "Dans la R\u00e9gion": { + "account_number": "7011" + }, + "Hors R\u00e9gion": { + "account_number": "7012" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7013" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7014" + }, + "Sur internet": { + "account_number": "7015" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7019" + }, + "account_number": "701" + }, + "Ventes de produits finis": { + "Dans la R\u00e9gion": { + "account_number": "7021" + }, + "Hors R\u00e9gion": { + "account_number": "7022" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7023" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7024" + }, + "Sur internet": { + "account_number": "7025" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7029" + }, + "account_number": "702" + }, + "Ventes de produits interm\u00e9diaires": { + "Dans la R\u00e9gion": { + "account_number": "7031" + }, + "Hors R\u00e9gion": { + "account_number": "7032" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7033" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7034" + }, + "Sur internet": { + "account_number": "7035" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7039" + }, + "account_number": "703" + }, + "Ventes de produits r\u00e9siduels": { + "Dans la R\u00e9gion": { + "account_number": "7041" + }, + "Hors R\u00e9gion": { + "account_number": "7042" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7043" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7044" + }, + "Sur internet": { + "account_number": "7045" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7049" + }, + "account_number": "704" + }, + "Travaux factur\u00e9s": { + "Dans la R\u00e9gion": { + "account_number": "7051" + }, + "Hors R\u00e9gion": { + "account_number": "7052" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7053" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7054" + }, + "Sur internet": { + "account_number": "7055" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7059" + }, + "account_number": "705" + }, + "Services vendus": { + "Dans la R\u00e9gion": { + "account_number": "7061" + }, + "Hors R\u00e9gion": { + "account_number": "7062" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7063" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7064" + }, + "Sur internet": { + "account_number": "7065" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7069" + }, + "account_number": "706" + }, + "Produits accessoires": { + "Ports, emballages perdus et autres frais factur\u00e9s": { + "account_number": "7071" + }, + "Commissions et courtages": { + "account_number": "7072" + }, + "Locations": { + "account_number": "7073" + }, + "Bonis sur reprises et cessions d\u2019emballages": { + "account_number": "7074" + }, + "Mise \u00e0 disposition de personnel": { + "account_number": "7075" + }, + "Redevances pour brevets, logiciels, marques et droits similaires": { + "account_number": "7076" + }, + "Services exploit\u00e9s dans l\u2019int\u00e9r\u00eat du personnel": { + "account_number": "7077" + }, + "Autres produits accessoires": { + "account_number": "7078" + }, + "account_number": "707" + }, + "account_number": "70" + }, + "Subventions d\u2019exploitation": { + "Sur produits \u00e0 l\u2019exportation": { + "account_number": "711" + }, + "Sur produits \u00e0 l\u2019importation": { + "account_number": "712" + }, + "Sur produits de p\u00e9r\u00e9quation": { + "account_number": "713" + }, + "Indemnit\u00e9s et subventions d\u2019exploitation (entit\u00e9 agricole)": { + "account_number": "714" + }, + "Autres subventions d\u2019exploitation": { + "Vers\u00e9es par l\u2019\u00c9tat et les collectivit\u00e9s publiques": { + "account_number": "7181" + }, + "Vers\u00e9es par les organismes internationaux": { + "account_number": "7182" + }, + "Vers\u00e9es par des tiers": { + "account_number": "7183" + }, + "account_number": "718" + }, + "account_number": "71" + }, + "Production immobilis\u00e9e": { + "Immobilisations incorporelles": { + "account_number": "721" + }, + "Immobilisations corporelles": { + "Immobilisations corporelles (hors actifs biologiques)": { + "account_number": "7221" + }, + "Immobilisations corporelles (actifs biologiques)": { + "account_number": "7222" + }, + "account_number": "722" + }, + "Production auto-consomm\u00e9e": { + "account_number": "724" + }, + "Immobilisations financi\u00e8res": { + "account_number": "726" + }, + "account_number": "72" + }, + "Variations des stocks de biens et de services produits": { + "Variations des stocks de produits en cours": { + "Produits en cours": { + "account_number": "7341" + }, + "Travaux en cours": { + "account_number": "7342" + }, + "account_number": "734" + }, + "Variations des en-cours de services": { + "\u00c9tudes en cours": { + "account_number": "7351" + }, + "Prestations de services en cours": { + "account_number": "7352" + }, + "account_number": "735" + }, + "Variations des stocks de produits finis": { + "account_number": "736" + }, + "Variations des stocks de produits interm\u00e9diaires et r\u00e9siduels": { + "Produits interm\u00e9diaires": { + "account_number": "7371" + }, + "Produits r\u00e9siduels": { + "account_number": "7372" + }, + "account_number": "737" + }, + "account_number": "73" + }, + "Autres produits": { + "Profits sur cr\u00e9ances clients et autres d\u00e9biteurs": { + "account_number": "751" + }, + "Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "Quote-part transf\u00e9r\u00e9e de pertes (comptabilit\u00e9 du g\u00e9rant)": { + "account_number": "7521" + }, + "B\u00e9n\u00e9fices attribu\u00e9s par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": { + "account_number": "7525" + }, + "account_number": "752" + }, + "Produits des cessions courantes d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "7541" + }, + "Immobilisations corporelles": { + "account_number": "7542" + }, + "account_number": "754" + }, + "Gains de change sur cr\u00e9ances et dettes commerciales": { + "account_number": "756" + }, + "Produits divers": { + "Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": { + "account_number": "7581" + }, + "Indemnit\u00e9s d\u2019assurances re\u00e7ues": { + "account_number": "7582" + }, + "Autres produits divers": { + "account_number": "7588" + }, + "account_number": "758" + }, + "Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "Sur risques \u00e0 court terme": { + "account_number": "7591" + }, + "Sur stocks": { + "account_number": "7593" + }, + "Sur cr\u00e9ances": { + "account_number": "7594" + }, + "Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "account_number": "7598" + }, + "account_number": "759" + }, + "account_number": "75" + }, + "Revenus financiers et produits assimil\u00e9s": { + "Int\u00e9r\u00eats de pr\u00eats et cr\u00e9ances diverses": { + "Int\u00e9r\u00eats de pr\u00eats": { + "account_number": "7712" + }, + "Int\u00e9r\u00eats sur cr\u00e9ances diverses": { + "account_number": "7713" + }, + "account_number": "771" + }, + "Revenus de participations et autres titres immobilis\u00e9s": { + "Revenus des titres de participation": { + "account_number": "7721" + }, + "Revenus autres titres immobilis\u00e9s": { + "account_number": "7722" + }, + "account_number": "772" + }, + "Escomptes obtenus": { + "account_number": "773" + }, + "Revenus de placement": { + "Revenus des obligations": { + "account_number": "7745" + }, + "Revenus des titres de placement": { + "account_number": "7746" + }, + "account_number": "774" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition": { + "account_number": "775" + }, + "Gains de change financiers": { + "account_number": "776" + }, + "Gains sur cessions de titres de placement": { + "account_number": "777" + }, + "Gains sur risques financiers": { + "Sur rentes viag\u00e8res": { + "account_number": "7781" + }, + "Sur op\u00e9rations financi\u00e8res": { + "account_number": "7782" + }, + "Sur instruments de tr\u00e9sorerie": { + "account_number": "7784" + }, + "account_number": "778" + }, + "Reprises de charges pour d\u00e9pr\u00e9ciations et provisions \u00e0 court terme financi\u00e8res": { + "Sur risques financiers": { + "account_number": "7791" + }, + "Sur titres de placement": { + "account_number": "7795" + }, + "Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "account_number": "7798" + }, + "account_number": "779" + }, + "account_number": "77" + }, + "Transferts de charges": { + "Transferts de charges d\u2019exploitation": { + "account_number": "781" + }, + "Transferts de charges financi\u00e8res": { + "account_number": "787" + }, + "account_number": "78" + }, + "Reprises de provisions, de d\u00e9pr\u00e9ciations et autres": { + "Reprises de provisions et d\u00e9pr\u00e9ciations d\u2019exploitation": { + "Pour risques et charges": { + "account_number": "7911" + }, + "Des immobilisations incorporelles": { + "account_number": "7913" + }, + "Des immobilisations corporelles": { + "account_number": "7914" + }, + "account_number": "791" + }, + "Reprises de provisions et d\u00e9pr\u00e9ciations financi\u00e8res": { + "Pour risques et charges": { + "account_number": "7971" + }, + "Des immobilisations financi\u00e8res": { + "account_number": "7972" + }, + "account_number": "797" + }, + "Reprises d\u2019amortissements": { + "account_number": "798" + }, + "Reprises de subventions d\u2019investissement": { + "account_number": "799" + }, + "account_number": "79" + }, + "root_type": "Income", + "account_number": "7" + }, + "8-Comptes des autres charges et des autres produits (CHARGES)": { + "Valeurs comptables des cessions d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "811" + }, + "Immobilisations corporelles": { + "account_number": "812" + }, + "Immobilisations financi\u00e8res": { + "account_number": "816" + }, + "account_number": "81" + }, + "Charges hors activit\u00e9s ordinaires": { + "Charges HAO constat\u00e9es": { + "account_number": "831" + }, + "Charges li\u00e9es aux op\u00e9rations de restructuration": { + "account_number": "833" + }, + "Pertes sur cr\u00e9ances HAO": { + "account_number": "834" + }, + "Dons et lib\u00e9ralit\u00e9s accord\u00e9s": { + "account_number": "835" + }, + "Abandons de cr\u00e9ances consentis": { + "account_number": "836" + }, + "Charges li\u00e9es aux op\u00e9rations de liquidation": { + "account_number": "837" + }, + "Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": { + "account_number": "839" + }, + "account_number": "83" + }, + "Dotations hors activit\u00e9s ordinaires": { + "Dotations aux provisions r\u00e9glement\u00e9es": { + "account_number": "851" + }, + "Dotations aux amortissements HAO": { + "account_number": "852" + }, + "Dotations aux d\u00e9pr\u00e9ciations HAO": { + "account_number": "853" + }, + "Dotations aux provisions pour risques et charges HAO": { + "account_number": "854" + }, + "Autres dotations HAO": { + "account_number": "858" + }, + "account_number": "85" + }, + "Participation des travailleurs": { + "Participation l\u00e9gale aux b\u00e9n\u00e9fices": { + "account_number": "871" + }, + "Participation contractuelle aux b\u00e9n\u00e9fices": { + "account_number": "874" + }, + "Autres participations": { + "account_number": "878" + }, + "account_number": "87" + }, + "Imp\u00f4ts sur le r\u00e9sultat": { + "Imp\u00f4ts sur les b\u00e9n\u00e9fices de l\u2019exercice": { + "Activit\u00e9s exerc\u00e9es dans l\u2019\u00c9tat": { + "account_number": "8911" + }, + "Activit\u00e9s exerc\u00e9es dans les autres \u00c9tats de la R\u00e9gion": { + "account_number": "8912" + }, + "Activit\u00e9s exerc\u00e9es hors R\u00e9gion": { + "account_number": "8913" + }, + "account_number": "891" + }, + "Rappel d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": { + "account_number": "892" + }, + "Imp\u00f4t minimum forfaitaire IMF": { + "account_number": "895" + }, + "D\u00e9gr\u00e8vements et annulations d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": { + "D\u00e9gr\u00e8vements": { + "account_number": "8991" + }, + "Annulations pour pertes r\u00e9troactives": { + "account_number": "8994" + }, + "account_number": "899" + }, + "account_number": "89" + }, + "root_type": "Expense" + }, + "8-Comptes des autres charges et des autres produits (PRODUITS)": { + "Produits des cessions d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "821" + }, + "Immobilisations corporelles": { + "account_number": "822" + }, + "Immobilisations financi\u00e8res": { + "account_number": "826" + }, + "account_number": "82" + }, + "Produits hors activit\u00e9s ordinaires": { + "Produits HAO constat\u00e9s": { + "account_number": "841" + }, + "Produits li\u00e9s aux op\u00e9rations de restructuration": { + "account_number": "843" + }, + "Indemnit\u00e9s et subventions HAO (entit\u00e9 agricole)": { + "account_number": "844" + }, + "Dons et lib\u00e9ralit\u00e9s obtenus": { + "account_number": "845" + }, + "Abandons de cr\u00e9ances obtenus": { + "account_number": "846" + }, + "Produits li\u00e9s aux op\u00e9rations de liquidation": { + "account_number": "847" + }, + "Transferts de charges HAO": { + "account_number": "848" + }, + "Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": { + "account_number": "849" + }, + "account_number": "84" + }, + "Reprises de charges, provisions et d\u00e9pr\u00e9ciations HAO": { + "Reprises de provisions r\u00e9glement\u00e9es": { + "account_number": "861" + }, + "Reprises d\u2019amortissements HAO": { + "account_number": "862" + }, + "Reprises de d\u00e9pr\u00e9ciations HAO": { + "account_number": "863" + }, + "Reprises de provisions pour risques et charges HAO": { + "account_number": "864" + }, + "Autres reprises HAO": { + "account_number": "868" + }, + "account_number": "86" + }, + "Subventions d\u2019\u00e9quilibre": { + "\u00c9tat": { + "account_number": "881" + }, + "Collectivit\u00e9s publiques": { + "account_number": "884" + }, + "Groupe": { + "account_number": "886" + }, + "Autres": { + "account_number": "888" + }, + "account_number": "88" + }, + "root_type": "Income" + } + } +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/bj_plan_comptable.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/bj_plan_comptable.json new file mode 100644 index 00000000000..4381e21b0c4 --- /dev/null +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/bj_plan_comptable.json @@ -0,0 +1,1919 @@ +{ + "country_code": "bj", + "name": "Syscohada - Plan Comptable", + "tree": { + "1-Comptes de ressources durables": { + "10-Capital": { + "101-Capital social": { + "1011-Capital souscrit, non appel\u00e9": {}, + "1012-Capital souscrit, appel\u00e9, non vers\u00e9": {}, + "1013-Capital souscrit, appel\u00e9, vers\u00e9, non amorti": {}, + "1014-Capital souscrit, appel\u00e9, vers\u00e9, amorti": {}, + "1018-Capital souscrit soumis \u00e0 des conditions particuli\u00e8res": {} + }, + "102-Capital par dotation": { + "1021-Dotation initiale": {}, + "1022-Dotations compl\u00e9mentaires": {}, + "1028-Autres dotations": {} + }, + "103-Capital personnel": {}, + "104-Compte de l\u2019exploitant": { + "1041-Apports temporaires": {}, + "1042-Op\u00e9rations courantes": {}, + "1043-R\u00e9mun\u00e9rations, imp\u00f4ts et autres charges personnelles": {}, + "1047-Pr\u00e9l\u00e8vements d\u2019autoconsommation": {}, + "1048-Autres pr\u00e9l\u00e8vements": {} + }, + "105-Primes li\u00e9es au capital social": { + "1051-Primes d\u2019\u00e9mission": {}, + "1052-Primes d\u2019apport": {}, + "1053-Primes de fusion": {}, + "1054-Primes de conversion": {}, + "1058-Autres primes": {} + }, + "106-\u00c9carts de r\u00e9\u00e9valuation": { + "1061-\u00c9carts de r\u00e9\u00e9valuation l\u00e9gale": {}, + "1062-\u00c9carts de r\u00e9\u00e9valuation libre": {} + }, + "109-Apporteurs, capital souscrit, non appel\u00e9": {} + }, + "11-R\u00e9serves": { + "111-R\u00e9serve l\u00e9gale": {}, + "112-R\u00e9serves statutaires ou contractuelles": {}, + "113-R\u00e9serves r\u00e9glement\u00e9es": { + "1131-R\u00e9serves de plus-values nettes \u00e0 long terme": {}, + "1132-R\u00e9serves d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": {}, + "1133-R\u00e9serves cons\u00e9cutives \u00e0 l\u2019octroi de subventions d\u2019investissement": {}, + "1134-R\u00e9serves des valeurs mobili\u00e8res donnant acc\u00e8s au capital": {}, + "1135-Autres r\u00e9serves r\u00e9glement\u00e9es": {} + }, + "118-Autres r\u00e9serves": { + "1181-R\u00e9serves facultatives": {}, + "1188-R\u00e9serves diverses": {} + } + }, + "12-Report \u00e0 nouveau": { + "121-Report \u00e0 nouveau cr\u00e9diteur": {}, + "129-Report \u00e0 nouveau d\u00e9biteur": { + "1291-Perte nette \u00e0 reporter": {}, + "1292-Perte Amortissements r\u00e9put\u00e9s diff\u00e9r\u00e9s": {} + } + }, + "13-R\u00e9sultat net de l\u2019exercice": { + "130-R\u00e9sultat en instance d\u2019affectation": { + "1301-R\u00e9sultat en instance d\u2019affectation : b\u00e9n\u00e9fice": {}, + "1309-R\u00e9sultat en instance d\u2019affectation : perte": {} + }, + "131-R\u00e9sultat net : b\u00e9n\u00e9fice": {}, + "132-Marge commerciale (MC)": {}, + "133-Valeur ajout\u00e9e (VA)": {}, + "134-Exc\u00e9dent brut d\u2019exploitation (EBE)": {}, + "135-R\u00e9sultat d\u2019exploitation (RE)": {}, + "136-R\u00e9sultat financier (RF)": {}, + "137-R\u00e9sultat des activit\u00e9s ordinaires (RAO)": {}, + "138-R\u00e9sultat hors activit\u00e9s ordinaires (RHAO)": { + "1381-R\u00e9sultat de fusion": {}, + "1382-R\u00e9sultat d\u2019apport partiel d\u2019actif": {}, + "1383-R\u00e9sultat de scission": {}, + "1384-R\u00e9sultat de liquidation": {} + }, + "139-R\u00e9sultat net : perte": {} + }, + "14-Subventions d\u2019investissement": { + "141-Subventions d\u2019\u00e9quipement": { + "1411-\u00c9tat": {}, + "1412-R\u00e9gions": {}, + "1413-D\u00e9partements": {}, + "1414-Communes et collectivit\u00e9s publiques d\u00e9centralis\u00e9es": {}, + "1415-Entit\u00e9s publiques ou mixtes": {}, + "1416-Entit\u00e9s et organismes priv\u00e9s": {}, + "1417-Organismes internationaux": {}, + "1418-Autres": {} + }, + "148-Autres subventions d\u2019investissement": {} + }, + "15-Provisions r\u00e9glement\u00e9es et fonds assimil\u00e9s": { + "151-Amortissements d\u00e9rogatoires": {}, + "152-Plus-values de cession \u00e0 r\u00e9investir": {}, + "153-Fonds r\u00e9glement\u00e9s": { + "1531-Fonds National": {}, + "1532-Pr\u00e9l\u00e8vement pour le Budget": {} + }, + "154-Provisions sp\u00e9ciales de r\u00e9\u00e9valuation": {}, + "155-Provisions r\u00e9glement\u00e9es relatives aux immobilisations": { + "1551-Reconstitution des gisements miniers et p\u00e9troliers": {} + }, + "156-Provisions r\u00e9glement\u00e9es relatives aux stocks": { + "1561-Hausse de prix": {}, + "1562-Fluctuation des cours": {} + }, + "157-Provisions pour investissement": {}, + "158-Autres provisions et fonds r\u00e9glement\u00e9s": {} + }, + "16-Emprunts et dettes assimil\u00e9es": { + "161-Emprunts obligataires": { + "1611-Emprunts obligataires ordinaires": {}, + "1612-Emprunts obligataires convertibles en actions": {}, + "1613-Emprunts obligataires remboursables en actions": {}, + "1618-Autres emprunts obligataires": {} + }, + "162-Emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": {}, + "163-Avances re\u00e7ues de l\u2019\u00c9tat": {}, + "164-Avances re\u00e7ues et comptes courants bloqu\u00e9s": {}, + "165-D\u00e9p\u00f4ts et cautionnements re\u00e7us": { + "1651-D\u00e9p\u00f4ts": {}, + "1652-Cautionnements": {} + }, + "166-Int\u00e9r\u00eats courus": { + "1661-Sur emprunts obligataires": {}, + "1662-Sur emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": {}, + "1663-Sur avances re\u00e7ues de l\u2019\u00c9tat": {}, + "1664-Sur avances re\u00e7ues et comptes courants bloqu\u00e9s": {}, + "1665-Sur d\u00e9p\u00f4ts et cautionnements re\u00e7us": {}, + "1667-Sur avances assorties de conditions particuli\u00e8res": {}, + "1668-Sur autres emprunts et dettes": {} + }, + "167-Avances assorties de conditions particuli\u00e8res": { + "1671-Avances bloqu\u00e9es pour augmentation du capital": {}, + "1672-Avances conditionn\u00e9es par l\u2019\u00c9tat": {}, + "1673-Avances conditionn\u00e9es par les autres organismes africains": {}, + "1674-Avances conditionn\u00e9es par les organismes internationaux": {} + }, + "168-Autres emprunts et dettes": { + "1681-Rentes viag\u00e8res capitalis\u00e9es": {}, + "1682-Billets de fonds": {}, + "1683-Dettes cons\u00e9cutives \u00e0 des titres emprunt\u00e9s": {}, + "1684-Emprunts participatifs": {}, + "1685-Participation des travailleurs aux b\u00e9n\u00e9fices": {}, + "1686-Emprunts et dettes contract\u00e9s aupr\u00e8s des autres tiers": {} + } + }, + "17-Dettes de location acquisition": { + "172-Dettes de location acquisition / cr\u00e9dit bail immobilier": {}, + "173-Dettes de location acquisition / cr\u00e9dit bail mobilier": {}, + "174-Dettes de location acquisition / location de vente": {}, + "176-Int\u00e9r\u00eats courus": { + "1762-Sur dettes de location acquisition / cr\u00e9dit-bail immobilier": {}, + "1763-Sur dettes de location acquisition / cr\u00e9dit-bail mobilier": {}, + "1764-Sur dettes de location acquisition / location-vente": {}, + "1768-Sur autres dettes de location acquisition": {} + }, + "178-Autres dettes de location acquisition": {} + }, + "18-Dettes li\u00e9es \u00e0 des participations et comptes de liaison des \u00e9tablissements et soci\u00e9t\u00e9s en participation": { + "181-Dettes li\u00e9es \u00e0 des participations": { + "1811-Dettes li\u00e9es \u00e0 des participations (groupe)": {}, + "1812-Dettes li\u00e9es \u00e0 des participations (hors groupe)": {} + }, + "182-Dettes li\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": {}, + "183-Int\u00e9r\u00eats courus sur dettes li\u00e9es \u00e0 des participations": {}, + "184-Comptes permanents bloqu\u00e9s des \u00e9tablissements et succursales": {}, + "185-Comptes permanents non bloqu\u00e9s des \u00e9tablissements et succursales": {}, + "186-Comptes de liaison charges": {}, + "187-Comptes de liaison produits": {}, + "188-Comptes de liaison des soci\u00e9t\u00e9s en participation": {} + }, + "19-Provisions pour risques et charges": { + "191-Provisions pour litiges": {}, + "192-Provisions pour garanties donn\u00e9es aux clients": {}, + "193-Provisions pour pertes sur march\u00e9s \u00e0 ach\u00e8vement futur": {}, + "194-Provisions pour pertes de change": {}, + "195-Provisions pour imp\u00f4ts": {}, + "196-Provisions pour pensions et obligations similaires": { + "1961-Provisions pour pensions et obligations similaires engagement de retraite": {}, + "1962-Actif du r\u00e9gime de retraite": {} + }, + "197-Provisions pour restructuration": {}, + "198-Autres provisions pour risques et charges": { + "1981-Provisions pour amendes et p\u00e9nalit\u00e9s": {}, + "1983-Provisions pour propre assureur": {}, + "1984-Provisions pour d\u00e9mant\u00e8lement et remise en \u00e9tat": {}, + "1985-Provisions pour droits \u00e0 r\u00e9duction ou avantage en nature (ch\u00e8ques cadeau, cartes de fid\u00e9lit\u00e9...)": {}, + "1988-Provisions pour divers risques et charges": {} + } + }, + "root_type": "Equity" + }, + "2-Comptes d\u2019actif immobilis\u00e9": { + "21-Immobilisations incorporelles": { + "account_type": "Fixed Asset", + "211-Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset" + }, + "212-Brevets, licences, concessions et droits similaires": { + "account_type": "Fixed Asset", + "2121-Brevets": { + "account_type": "Fixed Asset" + }, + "2122-Licences": { + "account_type": "Fixed Asset" + }, + "2123-Concessions de service public": { + "account_type": "Fixed Asset" + }, + "2128-Autres concessions et droits similaires": { + "account_type": "Fixed Asset" + } + }, + "213-Logiciels et sites internet": { + "account_type": "Fixed Asset", + "2131-Logiciels": { + "account_type": "Fixed Asset" + }, + "2132-Sites internet": { + "account_type": "Fixed Asset" + } + }, + "214-Marques": { + "account_type": "Fixed Asset" + }, + "215-Fonds commercial": { + "account_type": "Fixed Asset" + }, + "216-Droit au bail": { + "account_type": "Fixed Asset" + }, + "217-Investissements de cr\u00e9ation": { + "account_type": "Fixed Asset" + }, + "218-Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset", + "2181-Frais de prospection et d\u2019\u00e9valuation de ressources min\u00e9rales": { + "account_type": "Fixed Asset" + }, + "2182-Co\u00fbts d\u2019obtention du contrat": { + "account_type": "Fixed Asset" + }, + "2183-Fichiers clients, notices, titres de journaux et magazines": { + "account_type": "Fixed Asset" + }, + "2184-Co\u00fbts des franchises": { + "account_type": "Fixed Asset" + }, + "2188-Divers droits et valeurs incorporelles": { + "account_type": "Fixed Asset" + } + }, + "219-Immobilisations incorporelles en cours": { + "account_type": "Fixed Asset", + "2191-Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset" + }, + "2193-Logiciels et internet": { + "account_type": "Fixed Asset" + }, + "2198-Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset" + } + } + }, + "22-Terrains": { + "account_type": "Fixed Asset", + "221-Terrains agricoles et forestiers": { + "account_type": "Fixed Asset", + "2211-Terrains d\u2019exploitation agricole": { + "account_type": "Fixed Asset" + }, + "2212-Terrains d\u2019exploitation foresti\u00e8re": { + "account_type": "Fixed Asset" + }, + "2218-Autres terrains": { + "account_type": "Fixed Asset" + } + }, + "222-Terrains nus": { + "account_type": "Fixed Asset", + "2221-Terrains \u00e0 b\u00e2tir": { + "account_type": "Fixed Asset" + }, + "2228-Autres terrains nus": { + "account_type": "Fixed Asset" + } + }, + "223-Terrains b\u00e2tis": { + "account_type": "Fixed Asset", + "2231-Pour b\u00e2timents industriels et agricoles": { + "account_type": "Fixed Asset" + }, + "2232-Pour b\u00e2timents administratifs et commerciaux": { + "account_type": "Fixed Asset" + }, + "2234-Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations professionnelles": { + "account_type": "Fixed Asset" + }, + "2235-Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations non professionnelles": { + "account_type": "Fixed Asset" + }, + "2238-Autres terrains b\u00e2tis": { + "account_type": "Fixed Asset" + } + }, + "224-Travaux de mise en valeur des terrains": { + "account_type": "Fixed Asset", + "2241-Plantation d\u2019arbres et d\u2019arbustes": { + "account_type": "Fixed Asset" + }, + "2245-Am\u00e9liorations du fonds": { + "account_type": "Fixed Asset" + }, + "2248-Autres travaux": { + "account_type": "Fixed Asset" + } + }, + "225-Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset", + "2251-Carri\u00e8res": { + "account_type": "Fixed Asset" + } + }, + "226-Terrains am\u00e9nag\u00e9s": { + "account_type": "Fixed Asset", + "2261-Parkings": { + "account_type": "Fixed Asset" + } + }, + "227-Terrains mis en concession": { + "account_type": "Fixed Asset" + }, + "228-Autres terrains": { + "account_type": "Fixed Asset", + "2281-Terrains immeubles de placement": { + "account_type": "Fixed Asset" + }, + "2285-Terrains des logements affect\u00e9s au personnel": { + "account_type": "Fixed Asset" + }, + "2286-Terrains de location acquisition": { + "account_type": "Fixed Asset" + }, + "2288-Divers terrains": { + "account_type": "Fixed Asset" + } + }, + "229-Am\u00e9nagements de terrains en cours": { + "account_type": "Fixed Asset", + "2291-Terrains agricoles et forestiers": { + "account_type": "Fixed Asset" + }, + "2292-Terrains nus": { + "account_type": "Fixed Asset" + }, + "2295-Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset" + }, + "2298-Autres terrains": { + "account_type": "Fixed Asset" + } + } + }, + "23-B\u00e2timents, installations techniques et agencements": { + "231-B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "2311-B\u00e2timents industriels": {}, + "2312-B\u00e2timents agricoles": {}, + "2313-B\u00e2timents administratifs et commerciaux": {}, + "2314-B\u00e2timents affect\u00e9s au logement du personnel": {}, + "2315-B\u00e2timents immeubles de placement": {}, + "2316-B\u00e2timents de location acquisition": {} + }, + "232-B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "2321-B\u00e2timents industriels": {}, + "2322-B\u00e2timents agricoles": {}, + "2323-B\u00e2timents administratifs et commerciaux": {}, + "2324-B\u00e2timents affect\u00e9s au logement du personnel": {}, + "2325-B\u00e2timents immeubles de placement": {}, + "2326-B\u00e2timents de location acquisition": {} + }, + "233-Ouvrages d\u2019infrastructure": { + "2331-Voies de terre": {}, + "2332-Voies de fer": {}, + "2333-Voies d\u2019eau": {}, + "2334-Barrages, Digues": {}, + "2335-Pistes d\u2019a\u00e9rodrome": {}, + "2338-Autres ouvrages d\u2019infrastructures": {} + }, + "234-Am\u00e9nagements, agencements et installations techniques": { + "2341-Installations complexes sp\u00e9cialis\u00e9es sur sol propre": {}, + "2342-Installations complexes sp\u00e9cialis\u00e9es sur sol d\u2019autrui": {}, + "2343-Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol propre": {}, + "2344-Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol d\u2019autrui": {}, + "2345-Am\u00e9nagements et agencements des b\u00e2timents": {} + }, + "235-Am\u00e9nagements de bureaux": { + "2351-Installations g\u00e9n\u00e9rales": {}, + "2358-Autres am\u00e9nagements de bureaux": {} + }, + "237-B\u00e2timents industriels, agricoles et commerciaux mis en concession": {}, + "238-Autres installations et agencements": {}, + "239-B\u00e2timents am\u00e9nagements, agencements et installations en cours": { + "2391-B\u00e2timents en cours": {}, + "2392-Installations en cours": {}, + "2393-Ouvrages d\u2019infrastructure en cours": {}, + "2394-Am\u00e9nagements et agencements et installations techniques en cours": {}, + "2395-Am\u00e9nagements de bureaux en cours": {}, + "2398-Autres installations et agencements en cours": {} + } + }, + "24-Mat\u00e9riel, mobilier et actifs biologiques": { + "241-Mat\u00e9riel et outillage industriel et commercial": { + "2411-Mat\u00e9riel industriel": {}, + "2412-Outillage industriel": {}, + "2413-Mat\u00e9riel commercial": {}, + "2414-Outillage commercial": {}, + "2416-Mat\u00e9riel & outillage industriel et commercial de location-acquisition": {} + }, + "242-Mat\u00e9riel et outillage agricole": { + "2421-Mat\u00e9riel agricole": {}, + "2422-Outillage agricole": {}, + "2426-Mat\u00e9riel & outillage agricole de location-acquisition": {} + }, + "243-Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "244-Mat\u00e9riel et mobilier": { + "2441-Mat\u00e9riel de bureau": {}, + "2442-Mat\u00e9riel informatique": {}, + "2443-Mat\u00e9riel bureautique": {}, + "2444-Mobilier de bureau": {}, + "2445-Mat\u00e9riel et mobilier immeubles de placement": {}, + "2446-Mat\u00e9riel et mobilier de location acquisition": {}, + "2447-Mat\u00e9riel et mobilier des logements du personnel": {} + }, + "245-Mat\u00e9riel de transport": { + "2451-Mat\u00e9riel automobile": {}, + "2452-Mat\u00e9riel ferroviaire": {}, + "2453-Mat\u00e9riel fluvial, lagunaire": {}, + "2454-Mat\u00e9riel naval": {}, + "2455-Mat\u00e9riel a\u00e9rien": {}, + "2456-Mat\u00e9riel de transport de location-acquisition": {}, + "2457-Mat\u00e9riel hippomobile": {}, + "2458-Autres mat\u00e9riels de transport": {} + }, + "246-Actifs biologiques": { + "2461-Cheptel, animaux de trait": {}, + "2462-Cheptel, animaux reproducteurs": {}, + "2463-Animaux de garde": {}, + "2465-Plantations agricoles": {}, + "2468-Autres actifs biologiques": {} + }, + "247-Agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "2471-Agencements et am\u00e9nagements du mat\u00e9riel": {}, + "2472-Agencements et am\u00e9nagements des actifs biologiques": {}, + "2478-Autres agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": {} + }, + "248-Autres mat\u00e9riels et mobiliers": { + "2481-Collections et \u0153uvres d\u2019art": {}, + "2488-Divers mat\u00e9riels mobiliers": {} + }, + "249-Mat\u00e9riels et actifs biologiques en cours": { + "2491-Mat\u00e9riel et outillage industriel et commercial": {}, + "2492-Mat\u00e9riel et outillage agricole": {}, + "2493-Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "2494-Mat\u00e9riel et mobilier de bureau": {}, + "2495-Mat\u00e9riel de transport": {}, + "2496-Actifs biologiques": {}, + "2497-Agencements am\u00e9nagements du mat\u00e9riel et actifs biologiques": {}, + "2498-Autres mat\u00e9riels et actifs biologiques en cours": {} + } + }, + "25-Avances et acomptes vers\u00e9s sur immobilisations": { + "251-Avances et acomptes vers\u00e9s sur immobilisations incorporelles": {}, + "252-Avances et acomptes vers\u00e9s sur immobilisations corporelles": {} + }, + "26-Titres de participation": { + "261-Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": {}, + "262-Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le conjoint": {}, + "263-Titres de participation dans des soci\u00e9t\u00e9s conf\u00e9rant une influence notable": {}, + "265-Participations dans des organismes professionnels": {}, + "266-Parts dans des groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": {}, + "268-Autres titres de participation": {} + }, + "27-Autres immobilisations financi\u00e8res": { + "271-Pr\u00eats et cr\u00e9ances": { + "2711-Pr\u00eats participatifs": {}, + "2712-Pr\u00eats aux associ\u00e9s": {}, + "2713-Billets de fonds": {}, + "2714-Titres pr\u00eat\u00e9s": {}, + "2718-Autres pr\u00eats et cr\u00e9ances": {} + }, + "272-Pr\u00eats au personnel": { + "2721-Pr\u00eats immobiliers": {}, + "2722-Pr\u00eats mobiliers et d\u2019installation": {}, + "2728-Autres pr\u00eats au personnel": {} + }, + "273-Cr\u00e9ances sur l\u2019\u00c9tat": { + "2731-Retenues de garantie": {}, + "2733-Fonds r\u00e9glement\u00e9": {}, + "2734-Cr\u00e9ances sur le conc\u00e9dant": {}, + "2738-Autres cr\u00e9ances sur l\u2019\u00c9tat": {} + }, + "274-Titres immobilis\u00e9s": { + "2741-Titres immobilis\u00e9s de l\u2019activit\u00e9 de portefeuille (TIAP)": {}, + "2742-Titres participatifs": {}, + "2743-Certificats d\u2019investissement": {}, + "2744-Parts de fonds commun de placement (FCP)": {}, + "2745-Obligations": {}, + "2746-Actions ou parts propres": {}, + "2748-Autres titres immobilis\u00e9s": {} + }, + "275-D\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "2751-D\u00e9p\u00f4ts pour loyers d\u2019avance": {}, + "2752-D\u00e9p\u00f4ts pour l\u2019\u00e9lectricit\u00e9": {}, + "2753-D\u00e9p\u00f4ts pour l\u2019eau": {}, + "2754-D\u00e9p\u00f4ts pour le gaz": {}, + "2755-D\u00e9p\u00f4ts pour le t\u00e9l\u00e9phone, le t\u00e9lex, la t\u00e9l\u00e9copie": {}, + "2756-Cautionnements sur march\u00e9s publics": {}, + "2757-Cautionnements sur autres op\u00e9rations": {}, + "2758-Autres d\u00e9p\u00f4ts et cautionnements": {} + }, + "276-Int\u00e9r\u00eats courus": { + "2761-Pr\u00eats et cr\u00e9ances non commerciales": {}, + "2762-Pr\u00eats au personnel": {}, + "2763-Cr\u00e9ances sur l\u2019\u00c9tat": {}, + "2764-Titres immobilis\u00e9s": {}, + "2765-D\u00e9p\u00f4ts et cautionnements vers\u00e9s": {}, + "2767-Cr\u00e9ances rattach\u00e9es \u00e0 des participations": {}, + "2768-Immobilisations financi\u00e8res diverses": {} + }, + "277-Cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": { + "2771-Cr\u00e9ances rattach\u00e9es \u00e0 des participations (groupe)": {}, + "2772-Cr\u00e9ances rattach\u00e9es \u00e0 des participations (hors groupe)": {}, + "2773-Cr\u00e9ances rattach\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": {}, + "2774-Avances \u00e0 des Groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": {} + }, + "278-Immobilisations financi\u00e8res diverses": { + "2781-Cr\u00e9ances diverses groupe": {}, + "2782-Cr\u00e9ances diverses hors groupe": {}, + "2784-Banques d\u00e9p\u00f4ts \u00e0 terme": {}, + "2785-Or et m\u00e9taux pr\u00e9cieux": {}, + "2788-Autres immobilisations financi\u00e8res": {} + } + }, + "28-Amortissements": { + "account_type": "Accumulated Depreciation", + "281-Amortissements des immobilisations corporelles": { + "account_type": "Accumulated Depreciation", + "2811-Amortissements des frais de d\u00e9veloppement": { + "account_type": "Accumulated Depreciation" + }, + "2812-Amortissements des brevets, licences, concessions et droits similaires": { + "account_type": "Accumulated Depreciation" + }, + "2813-Amortissements des logiciels et sites internet": { + "account_type": "Accumulated Depreciation" + }, + "2814-Amortissements des marques": { + "account_type": "Accumulated Depreciation" + }, + "2815-Amortissements du fonds commercial": { + "account_type": "Accumulated Depreciation" + }, + "2816-Amortissements du droit au bail": { + "account_type": "Accumulated Depreciation" + }, + "2817-Amortissements des investissements de cr\u00e9ation": { + "account_type": "Accumulated Depreciation" + }, + "2818-Amortissements des autres droits et valeurs incorporels": { + "account_type": "Accumulated Depreciation" + } + }, + "282-Amortissements des terrains": { + "2824-Amortissements des travaux de mise en valeur des terrains": {} + }, + "283-Amortissements des b\u00e2timents, installations techniques et agencements": { + "2831-Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": {}, + "2832-Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": {}, + "2833-Amortissements des ouvrages d\u2019infrastructure": {}, + "2834-Amortissements des am\u00e9nagements, agencements et installations techniques": {}, + "2835-Amortissements des am\u00e9nagements de bureaux": {}, + "2837-Amortissements des b\u00e2timents industriels, agricoles et commerciaux mis en concession": {}, + "2838-Amortissements des autres installations et agencements": {} + }, + "284-Amortissements du mat\u00e9riel": { + "2841-Amortissements du mat\u00e9riel et outillage industriel et commercial": {}, + "2842-Amortissements du mat\u00e9riel et outillage agricole": {}, + "2843-Amortissements du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "2844-Amortissements du mat\u00e9riel et mobilier": {}, + "2845-Amortissements du mat\u00e9riel de transport": {}, + "2846-Amortissements des actifs biologiques": {}, + "2847-Amortissements des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": {}, + "2848-Amortissements des autres mat\u00e9riels": {} + } + }, + "29-D\u00e9pr\u00e9ciations des immobilisations": { + "291-D\u00e9pr\u00e9ciations des immobilisations incorporelles": { + "2911-D\u00e9pr\u00e9ciations des frais de d\u00e9veloppement": {}, + "2912-D\u00e9pr\u00e9ciations des brevets, licences, concessions et droits similaires": {}, + "2913-D\u00e9pr\u00e9ciations des logiciels et sites internet": {}, + "2914-D\u00e9pr\u00e9ciations des marques": {}, + "2915-D\u00e9pr\u00e9ciations du fonds commercial": {}, + "2916-D\u00e9pr\u00e9ciations du droit au bail": {}, + "2917-D\u00e9pr\u00e9ciations des investissements de cr\u00e9ation": {}, + "2918-D\u00e9pr\u00e9ciations des autres droits et valeurs incorporels": {}, + "2919-D\u00e9pr\u00e9ciations des immobilisations incorporelles en cours": {} + }, + "292-D\u00e9pr\u00e9ciations des terrains": { + "2921-D\u00e9pr\u00e9ciations des terrains agricoles et forestiers": {}, + "2922-D\u00e9pr\u00e9ciations des terrains nus": {}, + "2923-D\u00e9pr\u00e9ciations des terrains b\u00e2tis": {}, + "2924-D\u00e9pr\u00e9ciations des travaux de mise en valeur des terrains": {}, + "2925-D\u00e9pr\u00e9ciations des terrains de gisement": {}, + "2926-D\u00e9pr\u00e9ciations des terrains am\u00e9nag\u00e9s": {}, + "2927-D\u00e9pr\u00e9ciations des terrains mis en concession": {}, + "2928-D\u00e9pr\u00e9ciations des autres terrains": {}, + "2929-D\u00e9pr\u00e9ciations des am\u00e9nagements de terrains en cours": {} + }, + "293-D\u00e9pr\u00e9ciations des b\u00e2timents, installations techniques et agencements": { + "2931-D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": {}, + "2932-D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": {}, + "2933-D\u00e9pr\u00e9ciations des ouvrages d\u2019infrastructures": {}, + "2934-D\u00e9pr\u00e9ciations des am\u00e9nagements, agencements et installations techniques": {}, + "2935-D\u00e9pr\u00e9ciations des am\u00e9nagements de bureaux": {}, + "2937-D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles et commerciaux mis en concession": {}, + "2938-D\u00e9pr\u00e9ciations des autres installations et agencements": {}, + "2939-D\u00e9pr\u00e9ciations des b\u00e2timents et installations en cours": {} + }, + "294-D\u00e9pr\u00e9ciations de mat\u00e9riel, du mobilier et de l\u2019actif biologique": { + "2941-D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage industriel et commercial": {}, + "2942-D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage agricole": {}, + "2943-D\u00e9pr\u00e9ciations du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "2944-D\u00e9pr\u00e9ciations du mat\u00e9riel et mobilier": {}, + "2945-D\u00e9pr\u00e9ciations du mat\u00e9riel de transport": {}, + "2946-D\u00e9pr\u00e9ciations des actifs biologiques": {}, + "2947-D\u00e9pr\u00e9ciations des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": {}, + "2948-D\u00e9pr\u00e9ciations des autres mat\u00e9riels": {}, + "2949-D\u00e9pr\u00e9ciations de mat\u00e9riel en cours": {} + }, + "295-D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations": { + "2951-D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations incorporelles": {}, + "2952-D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations corporelles": {} + }, + "296-D\u00e9pr\u00e9ciations des titres de participation": { + "2961-D\u00e9pr\u00e9ciations des titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": {}, + "2962-D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s sous contr\u00f4le conjoint": {}, + "2963-D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s conf\u00e9rant une influence notable": {}, + "2965-D\u00e9pr\u00e9ciations des participations dans des organismes professionnels": {}, + "2966-D\u00e9pr\u00e9ciations des parts dans des GIE": {}, + "2968-D\u00e9pr\u00e9ciations des autres titres de participation": {} + }, + "297-D\u00e9pr\u00e9ciations des autres immobilisations financi\u00e8res": { + "2971-D\u00e9pr\u00e9ciations des pr\u00eats et cr\u00e9ances": {}, + "2972-D\u00e9pr\u00e9ciations des pr\u00eats au personnel": {}, + "2973-D\u00e9pr\u00e9ciations des cr\u00e9ances sur l\u2019\u00c9tat": {}, + "2974-D\u00e9pr\u00e9ciations des titres immobilis\u00e9s": {}, + "2975-D\u00e9pr\u00e9ciations des d\u00e9p\u00f4ts et cautionnements vers\u00e9s": {}, + "2977-D\u00e9pr\u00e9ciations des cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": {}, + "2978-D\u00e9pr\u00e9ciations des cr\u00e9ances financi\u00e8res diverses": {} + } + }, + "root_type": "Asset" + }, + "3-Comptes de Stocks": { + "31-Marchandises": { + "311-Marchandises A": { + "3111-Marchandises A1": {}, + "3112-Marchandises A2": {} + }, + "312-Marchandises B": { + "3121-Marchandises B1": {}, + "3122-Marchandises B2": {} + }, + "313-Actifs biologiques": { + "3131-Animaux": {}, + "3132-V\u00e9g\u00e9taux": {} + }, + "318-Marchandises hors activit\u00e9s ordinaires (HAO)": {} + }, + "32-Mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "321-Mati\u00e8res A": {}, + "322-Mati\u00e8res B": {}, + "323-Fournitures (A, B)": {} + }, + "33-Autres approvisionnements": { + "331-Mati\u00e8res consommables": {}, + "332-Fournitures d\u2019atelier et d\u2019usine": {}, + "333-Fournitures de magasin": {}, + "334-Fournitures de bureau": {}, + "335-Emballages": { + "3351-Emballages perdus": {}, + "3352-Emballages r\u00e9cup\u00e9rables non identifiables": {}, + "3353-Emballages \u00e0 usage mixte": {}, + "3358-Autres emballages": {} + }, + "338-Autres mati\u00e8res": {} + }, + "34-Produits en cours": { + "341-Produits en cours": { + "3411-Produits en cours P1": {}, + "3412-Produits en cours P2": {} + }, + "342-Travaux en cours": { + "3421-Travaux en cours T1": {}, + "3422-Travaux en cours T2": {} + }, + "343-Produits interm\u00e9diaires en cours": { + "3431-Produits interm\u00e9diaires A": {}, + "3432-Produits interm\u00e9diaires B": {} + }, + "344-Produits r\u00e9siduels en cours": { + "3441-Produits r\u00e9siduels A": {}, + "3442-Produits r\u00e9siduels B": {} + }, + "345-Actifs biologiques en cours": { + "3451-Animaux": {}, + "3452-V\u00e9g\u00e9taux": {} + } + }, + "35-Services en cours": { + "351-\u00c9tudes en cours": { + "3511-\u00c9tudes en cours E1": {}, + "3512-\u00c9tudes en cours E2": {} + }, + "352-Prestations de services en cours": { + "3521-Prestations de services S1": {}, + "3522-Prestations de services S2": {} + } + }, + "36-Produits finis": { + "361-Produits finis A": {}, + "362-Produits finis B": {}, + "363-Actifs biologiques": { + "3631-Animaux": {}, + "3632-V\u00e9g\u00e9taux": {}, + "3638-Autres stocks (activit\u00e9s annexes)": {} + } + }, + "37-Produits interm\u00e9diaires et r\u00e9siduels": { + "371-Produits interm\u00e9diaires": { + "3711-Produits interm\u00e9diaires A": {}, + "3712-Produits interm\u00e9diaires B": {} + }, + "372-Produits r\u00e9siduels": { + "3721-D\u00e9chets": {}, + "3722-Rebuts": {}, + "3723-Mati\u00e8res de R\u00e9cup\u00e9ration": {} + }, + "373-Actifs biologiques": { + "3731-Animaux": {}, + "3732-V\u00e9g\u00e9taux": {}, + "3738-Autres stocks (activit\u00e9s annexes)": {} + } + }, + "38-Stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": { + "account_type": "Stock", + "381-Marchandises en cours de route": {}, + "382-Mati\u00e8res premi\u00e8res et fournitures li\u00e9es en cours de route": {}, + "383-Autres approvisionnements en cours de route": {}, + "386-Produits finis en cours de route": {}, + "387-Stock en consignation ou en d\u00e9p\u00f4t": { + "3871-Stock en consignation": {}, + "3872-Stock en d\u00e9p\u00f4t": {} + }, + "388-Stock provenant d\u2019immobilisations mises hors service ou au rebut": {} + }, + "39-D\u00e9pr\u00e9ciations des stocks et encours de production": { + "391-D\u00e9pr\u00e9ciations des stocks de marchandises": {}, + "392-D\u00e9pr\u00e9ciations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": {}, + "393-D\u00e9pr\u00e9ciations des stocks d\u2019autres approvisionnements": {}, + "394-D\u00e9pr\u00e9ciations des productions en cours": {}, + "395-D\u00e9pr\u00e9ciations des services en cours": {}, + "396-D\u00e9pr\u00e9ciations des stocks de produits finis": {}, + "397-D\u00e9pr\u00e9ciations des stocks de produits interm\u00e9diaires et r\u00e9siduels": {}, + "398-D\u00e9pr\u00e9ciations des stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": {} + }, + "root_type": "Asset" + }, + "4-Comptes de Tiers (ACTIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (ACTIF)": { + "409-Fournisseurs d\u00e9biteurs": { + "4091-Fournisseurs Avances et acomptes vers\u00e9s": {}, + "4092-Fournisseurs Groupe avances et acomptes vers\u00e9s": {}, + "4093-Fournisseurs Sous-traitants avances et acomptes vers\u00e9s": {}, + "4094-Fournisseurs Cr\u00e9ances pour emballages et mat\u00e9riels \u00e0 rendre": {}, + "4098-Fournisseurs Rabais, remises, ristournes et autres avoirs \u00e0 obtenir": {} + } + }, + "41-Clients et comptes rattach\u00e9s (ACTIF)": { + "411-Clients": { + "4111-Clients": { + "account_type": "Receivable" + }, + "4112-Clients groupe": { + "account_type": "Receivable" + }, + "4114-Clients, \u00c9tat et Collectivit\u00e9s publiques": { + "account_type": "Receivable" + }, + "4115-Clients, organismes internationaux": { + "account_type": "Receivable" + }, + "4116-Clients, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Receivable" + }, + "4117-Client, retenues de garantie": { + "account_type": "Receivable" + }, + "4118-Clients, d\u00e9gr\u00e8vement de taxes sur la valeur ajout\u00e9e (TVA)": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "412-Clients, effets \u00e0 recevoir en portefeuille": { + "4121-Clients, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "4122-Clients Groupe, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "4124-\u00c9tat et Collectivit\u00e9s publiques, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "4125-Organismes Internationaux, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "413-Clients, ch\u00e8ques, effets et autres valeurs impay\u00e9es": { + "4131-Clients, ch\u00e8ques impay\u00e9s": { + "account_type": "Receivable" + }, + "4132-Clients, effets impay\u00e9s": { + "account_type": "Receivable" + }, + "4133-Clients, cartes de cr\u00e9dit impay\u00e9es": { + "account_type": "Receivable" + }, + "4138-Clients, autres valeurs impay\u00e9es": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "414-Cr\u00e9ances sur cessions courantes d\u2019immobilisations": { + "4141-Cr\u00e9ances en compte, immobilisations incorporelles": { + "account_type": "Receivable" + }, + "4142-Cr\u00e9ances en compte, immobilisations corporelles": { + "account_type": "Receivable" + }, + "4146-Effets \u00e0 recevoir, immobilisations incorporelles": { + "account_type": "Receivable" + }, + "4147-Effets \u00e0 recevoir, immobilisations corporelles": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "415-Clients, effets escompt\u00e9s non \u00e9chus": { + "account_type": "Receivable" + }, + "416-Cr\u00e9ances clients litigieuses ou douteuses": { + "4161-Cr\u00e9ances litigieuses": { + "account_type": "Receivable" + }, + "4162-Cr\u00e9ances douteuses": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "418-Clients, produits \u00e0 recevoir": { + "4181-Clients, factures \u00e0 \u00e9tablir": { + "account_type": "Receivable" + }, + "4186-Clients, int\u00e9r\u00eats courus": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "42-Personnel (ACTIF)": { + "421-Personnel, avances et acomptes": { + "4211-Personnel, avances": {}, + "4212-Personnel, acomptes": {}, + "4213-Frais avanc\u00e9s et fournitures au personnel": {} + } + }, + "43-Organismes sociaux (ACTIF)": { + "431-S\u00e9curit\u00e9 sociale": { + "4311-Prestations familiales": {}, + "4312-Accidents de travail": {}, + "4313-Caisse de retraite obligatoire": {}, + "4314-Caisse de retraite facultative": {}, + "4318-Autres cotisations sociales": {} + }, + "432-Caisses de retraite compl\u00e9mentaire": {}, + "433-Autres organismes sociaux": { + "4331-Mutuelle": {}, + "4332-Assurances retraite": {}, + "4333-Assurances et organismes de sant\u00e9": {} + }, + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "4387-Produits \u00e0 recevoir": {} + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (ACTIF)": { + "443-\u00c9tat, TVA factur\u00e9e": { + "4431-TVA factur\u00e9e sur ventes": {}, + "4432-TVA factur\u00e9e sur prestations de services": {}, + "4433-TVA factur\u00e9e sur travaux": {}, + "4434-TVA factur\u00e9e sur production livr\u00e9e \u00e0 soi-m\u00eame": {}, + "4435-TVA sur factures \u00e0 \u00e9tablir": {} + }, + "445-\u00c9tat, TVA r\u00e9cup\u00e9rable": { + "4451-TVA r\u00e9cup\u00e9rable sur immobilisations": {}, + "4452-TVA r\u00e9cup\u00e9rable sur achats": {}, + "4453-TVA r\u00e9cup\u00e9rable sur transport": {}, + "4454-TVA r\u00e9cup\u00e9rable sur services ext\u00e9rieurs et autres charges": {}, + "4455-TVA r\u00e9cup\u00e9rable sur factures non parvenues": {}, + "4456-TVA transf\u00e9r\u00e9e par d\u2019autres entit\u00e9s": {} + }, + "448-\u00c9tat, charges \u00e0 payer et produits \u00e0 recevoir": { + "4486-Charges \u00e0 payer": {}, + "4487-Produits \u00e0 recevoir": {} + }, + "449-\u00c9tat, cr\u00e9ances et dettes diverses": { + "4491-\u00c9tat, obligations cautionn\u00e9es": {}, + "4492-\u00c9tat, avances et acomptes vers\u00e9s sur imp\u00f4ts": {}, + "4493-\u00c9tat, fonds de dotation \u00e0 recevoir": {}, + "4494-\u00c9tat, subventions investissement \u00e0 recevoir": {}, + "4495-\u00c9tat, subventions d\u2019exploitation \u00e0 recevoir": {}, + "4496-\u00c9tat, subventions d\u2019\u00e9quilibre \u00e0 recevoir": {}, + "4497-\u00c9tat, avances sur subventions": {}, + "4499-\u00c9tat, fonds r\u00e9glement\u00e9s provisionn\u00e9s": {} + } + }, + "45-Organismes internationaux (ACTIF)": { + "451-Op\u00e9rations avec les organismes africains": {}, + "452-Op\u00e9rations avec les autres organismes internationaux": {}, + "458-Organismes internationaux, fonds de dotation et subventions \u00e0 recevoir": { + "4581-Organismes internationaux, fonds de dotation \u00e0 recevoir": {}, + "4582-Organismes internationaux, subventions \u00e0 recevoir": {} + } + }, + "46-Apporteurs, associ\u00e9s et groupe (ACTIF)": { + "461-Apporteurs, op\u00e9rations sur le capital": { + "4613-Apporteurs, capital appel\u00e9, non vers\u00e9": {}, + "4614-Apporteurs, compte d\u2019apport, op\u00e9rations de restructuration (fusion...)": {}, + "4618-Apporteurs, titres \u00e0 \u00e9changer": {} + }, + "467-Apporteurs, restant d\u00fb sur capital appel\u00e9": {} + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (ACTIF)": { + "472-Cr\u00e9ances et dettes sur titres de placement": { + "4721-Cr\u00e9ances sur cessions de titres de placement": {}, + "4726-Versements restant \u00e0 effectuer sur titres de placement non lib\u00e9r\u00e9s": {} + }, + "473-Interm\u00e9diaires Op\u00e9rations faites pour compte de tiers": { + "4731-Mandants": {}, + "4732-Mandataires": {}, + "4733-Commettants": {}, + "4734-Commissionnaires": {}, + "4739-\u00c9tat, Collectivit\u00e9s publiques, fonds global d\u2019allocation": {} + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits": { + "4747-Compte de r\u00e9partition p\u00e9riodique des produits": {} + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA": { + "4751-Compte actif": { + "account_type": "Temporary" + } + }, + "476-Charges constat\u00e9es d\u2019avance": {}, + "478-\u00c9carts de conversion actif": { + "4781-Diminution des cr\u00e9ances d\u2019exploitation": {}, + "4782-Diminution des cr\u00e9ances financi\u00e8res": {}, + "4783-Augmentation des dettes d\u2019exploitation": {}, + "4784-Augmentation des dettes financi\u00e8res": {}, + "4786-Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": {}, + "4788-Diff\u00e9rences compens\u00e9es par couverture de change": {} + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (ACTIF)": { + "485-Cr\u00e9ances sur cessions d\u2019immobilisations": { + "4851-En compte, immobilisations incorporelles": {}, + "4852-En compte, immobilisations corporelles": {}, + "4853-Effets \u00e0 recevoir, immobilisations incorporelles": {}, + "4854-Effets \u00e0 recevoir, immobilisations corporelles": {}, + "4855-Effets escompt\u00e9s non \u00e9chus": {}, + "4857-Retenues de garantie": {}, + "4858-Factures \u00e0 \u00e9tablir": {} + }, + "488-Autres cr\u00e9ances hors activit\u00e9s ordinaires (HAO)": {} + }, + "49-D\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme (tiers) (ACTIF)": { + "491-D\u00e9pr\u00e9ciations des comptes clients": { + "4911-Cr\u00e9ances litigieuses": {}, + "4912-Cr\u00e9ances douteuses": {} + }, + "495-D\u00e9pr\u00e9ciations des comptes organismes internationaux": {}, + "496-D\u00e9pr\u00e9ciations des comptes apporteurs, associ\u00e9s et groupe": { + "4962-Associ\u00e9s, comptes courants": {}, + "4963-Associ\u00e9s, op\u00e9rations faites en commun": {}, + "4966-Groupe, comptes courants": {} + }, + "497-D\u00e9pr\u00e9ciations des comptes d\u00e9biteurs divers": {}, + "498-D\u00e9pr\u00e9ciations des comptes de cr\u00e9ances HAO": { + "4985-Cr\u00e9ances sur cessions d\u2019immobilisations": {}, + "4986-Cr\u00e9ances sur cessions de titres de placement": {}, + "4988-Autres cr\u00e9ances HAO": {} + }, + "499-Provisions pour risques \u00e0 court terme": { + "4991-Sur op\u00e9rations d\u2019exploitation": {}, + "4997-Sur op\u00e9rations financi\u00e8res": {}, + "4998-Sur op\u00e9rations HAO": {} + } + }, + "root_type": "Asset" + }, + "4-Comptes de Tiers (PASSIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (PASSIF)": { + "401-Fournisseurs, dettes en compte": { + "4011-Fournisseurs": { + "account_type": "Payable" + }, + "4012-Fournisseurs groupe": { + "account_type": "Payable" + }, + "4013-Fournisseurs sous-traitants": { + "account_type": "Payable" + }, + "4016-Fournisseurs, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Payable" + }, + "4017-Fournisseur, retenues de garantie": { + "account_type": "Payable" + }, + "account_type": "Payable" + }, + "402-Fournisseurs, effets \u00e0 payer": { + "4021-Fournisseurs Effets \u00e0 payer": { + "account_type": "Payable" + }, + "4022-Fournisseurs Groupe, effets \u00e0 payer": { + "account_type": "Payable" + }, + "4023-Fournisseurs Sous-traitants, effets \u00e0 payer": { + "account_type": "Payable" + }, + "account_type": "Payable" + }, + "404-Fournisseurs, acquisitions courantes d\u2019immobilisations": { + "4041-Fournisseurs Dettes en comptes, immobilisations incorporelles": { + "account_type": "Payable" + }, + "4042-Fournisseurs Dettes en comptes, immobilisations corporelles": { + "account_type": "Payable" + }, + "4046-Fournisseurs Effets \u00e0 payer, immobilisations incorporelles": { + "account_type": "Payable" + }, + "4047-Fournisseurs Effets \u00e0 payer, immobilisations corporelles": { + "account_type": "Payable" + }, + "account_type": "Payable" + }, + "408-Fournisseurs, factures non parvenues": { + "4081-Fournisseurs": { + "account_type": "Stock Received But Not Billed" + }, + "4082-Fournisseurs groupe": { + "account_type": "Stock Received But Not Billed" + }, + "4083-Fournisseurs sous-traitants": { + "account_type": "Stock Received But Not Billed" + }, + "4086-Fournisseurs, int\u00e9r\u00eats courus": { + "account_type": "Stock Received But Not Billed" + }, + "account_type": "Stock Received But Not Billed" + }, + "account_type": "Payable" + }, + "41-Clients et comptes rattach\u00e9s (PASSIF)": { + "419-Clients cr\u00e9diteurs": { + "4191-Clients, avances et acomptes re\u00e7us": {}, + "4192-Clients groupe, avances et acomptes re\u00e7us": {}, + "4194-Clients, dettes pour emballages et mat\u00e9riels consign\u00e9s": {}, + "4198-Clients, rabais, remises, ristournes et autres avoirs \u00e0 accorder": {} + } + }, + "42-Personnel (PASSIF)": { + "422-Personnel, r\u00e9mun\u00e9rations dues": {}, + "423-Personnel, oppositions, saisies-arr\u00eats": { + "4231-Personnel, oppositions": {}, + "4232-Personnel, saisies-arr\u00eats": {}, + "4233-Personnel, avis \u00e0 tiers d\u00e9tenteur": {} + }, + "424-Personnel, \u0153uvres sociales internes": { + "4241-Assistance m\u00e9dicale": {}, + "4242-Allocations familiales": {}, + "4245-Organismes sociaux rattach\u00e9s \u00e0 l\u2019entit\u00e9": {}, + "4248-Autres \u0153uvres sociales internes": {} + }, + "425-Repr\u00e9sentants du personnel": { + "4251-D\u00e9l\u00e9gu\u00e9s du personnel": {}, + "4252-Syndicats et Comit\u00e9s d\u2019entreprises, d\u2019\u00c9tablissement": {}, + "4258-Autres repr\u00e9sentants du personnel": {} + }, + "426-Personnel, participation aux b\u00e9n\u00e9fices et au capital": { + "4261-Participation aux b\u00e9n\u00e9fices": {}, + "4264-Participation au capital": {} + }, + "427-Personnel d\u00e9p\u00f4ts": {}, + "428-Personnel, charges \u00e0 payer et produits \u00e0 recevoir": { + "4281-Dettes provisionn\u00e9es pour cong\u00e9s \u00e0 payer": {}, + "4286-Autres charges \u00e0 payer": {}, + "4287-Produits \u00e0 recevoir": {} + } + }, + "43-Organismes sociaux (PASSIF)": { + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "4381-Charges sociales sur gratifications \u00e0 payer": {}, + "4382-Charges sociales sur cong\u00e9s \u00e0 payer": {}, + "4386-Autres charges \u00e0 payer": {} + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (PASSIF)": { + "441-\u00c9tat, imp\u00f4t sur les b\u00e9n\u00e9fices": {}, + "442-\u00c9tat, autres imp\u00f4ts et taxes": { + "4421-Imp\u00f4ts et taxes d\u2019\u00c9tat": {}, + "4422-Imp\u00f4ts et taxes pour les collectivit\u00e9s publiques": {}, + "4423-Imp\u00f4ts et taxes recouvrables sur des obligataires": {}, + "4424-Imp\u00f4ts et taxes recouvrables sur des associ\u00e9s": {}, + "4426-Droits de douane": {}, + "4428-Autres imp\u00f4ts et taxes": {} + }, + "444-\u00c9tat, TVA due ou cr\u00e9dit de TVA": { + "4441-\u00c9tat, TVA due": {}, + "4449-\u00c9tat, cr\u00e9dit de TVA \u00e0 reporter": {} + }, + "446-\u00c9tat, autres taxes sur le chiffre d\u2019affaires": {}, + "447-\u00c9tat, imp\u00f4ts retenus \u00e0 la source": { + "4471-Imp\u00f4t G\u00e9n\u00e9ral sur le revenu": {}, + "4472-Imp\u00f4ts sur salaires": {}, + "4473-Contribution nationale": {}, + "4474-Contribution nationale de solidarit\u00e9": {}, + "4478-Autres imp\u00f4ts et contributions": {} + } + }, + "46-Apporteurs, associ\u00e9s et groupe (PASSIF)": { + "461-Apporteurs, op\u00e9rations sur le capital (PASSIF)": { + "4611-Apporteurs, apports en nature": {}, + "4612-Apporteurs, apports en num\u00e9raire": {}, + "4615-Apporteurs, versements re\u00e7us sur augmentation de capital": {}, + "4616-Apporteurs, versements anticip\u00e9s": {}, + "4617-Apporteurs d\u00e9faillants": {}, + "4619-Apporteurs, capital \u00e0 rembourser": {} + }, + "462-Associ\u00e9s, comptes courants": { + "4621-Principal": {}, + "4626-Int\u00e9r\u00eats courus": {} + }, + "463-Associ\u00e9s, op\u00e9rations faites en commun et GIE": { + "4631-Op\u00e9rations courantes": {}, + "4636-Int\u00e9r\u00eats courus": {} + }, + "465-Associ\u00e9s, dividendes \u00e0 payer": {}, + "466-Groupe, comptes courants": {} + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (PASSIF)": { + "471-D\u00e9biteurs et cr\u00e9diteurs divers": { + "4711-D\u00e9biteurs divers": {}, + "4712-Cr\u00e9diteurs divers": {}, + "4713-Obligataires": {}, + "4715-R\u00e9mun\u00e9rations d\u2019administrateurs": {}, + "4716-Compte d\u2019affacturage": {}, + "4717-D\u00e9biteurs divers retenues de garantie": {}, + "4718-Apport, compte de fusion et op\u00e9rations assimil\u00e9es": {}, + "4719-Bons de souscription d\u2019actions et d\u2019obligations": {} + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits (PASSIF)": { + "4746-Compte de r\u00e9partition p\u00e9riodique des charges": {} + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA (PASSIF)": { + "4752-Compte passif": {} + }, + "477-Produits constat\u00e9s d\u2019avance": {}, + "479-\u00c9carts de conversion passif": { + "4791-Augmentation des cr\u00e9ances d\u2019exploitation": {}, + "4792-Augmentation des cr\u00e9ances financi\u00e8res": {}, + "4793-Diminution des dettes d\u2019exploitation": {}, + "4794-Diminution des dettes financi\u00e8res": {}, + "4797-Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": {}, + "4798-Diff\u00e9rences compens\u00e9es par couverture de change": {} + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (HAO) (PASSIF)": { + "481-Fournisseurs d\u2019investissements": { + "4811-Immobilisations incorporelles": {}, + "4812-Immobilisations corporelles": {}, + "4813-Versements restant \u00e0 effectuer sur titres de participation et titres immobilis\u00e9s non lib\u00e9r\u00e9s": {}, + "4816-R\u00e9serve de propri\u00e9t\u00e9": {}, + "4817-Retenues de garantie": {}, + "4818-Factures non parvenues": {} + }, + "482-Fournisseurs d\u2019investissements, effets \u00e0 payer": { + "4821-Immobilisations incorporelles": {}, + "4822-Immobilisations corporelles": {} + }, + "484-Autres dettes hors activit\u00e9s ordinaires (HAO)": { + "4887-Produits": {} + } + }, + "49-D\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme (tiers) (PASSIF)": { + "490-D\u00e9pr\u00e9ciations des comptes fournisseurs": {}, + "492-D\u00e9pr\u00e9ciations des comptes personnel": {}, + "493-D\u00e9pr\u00e9ciations des comptes organismes sociaux": {}, + "494-D\u00e9pr\u00e9ciations des comptes \u00c9tat et collectivit\u00e9s publiques": {}, + "495-D\u00e9pr\u00e9ciations des comptes organismes internationaux": {} + }, + "root_type": "Liability" + }, + "5-Comptes de tr\u00e9sorerie": { + "50-Titres de placement": { + "501-Titres du tr\u00e9sor et bons de caisse \u00e0 court terme": { + "5011-Titres du Tr\u00e9sor \u00e0 court terme": {}, + "5012-Titres d\u2019organismes financiers": {}, + "5013-Bons de caisse \u00e0 court terme": {}, + "5016-Frais d\u2019acquisition des titres de tr\u00e9sor et bons de caisse": {} + }, + "502-Actions": { + "5021-Actions ou parts propres": {}, + "5022-Actions cot\u00e9es": {}, + "5023-Actions non cot\u00e9es": {}, + "5024-Actions d\u00e9membr\u00e9es (certificats d\u2019investissement, droits de vote)": {}, + "5025-Autres actions": {}, + "5026-Frais d\u2019acquisition des actions": {} + }, + "503-Obligations": { + "5031-Obligations \u00e9mises par la soci\u00e9t\u00e9 et rachet\u00e9es par elle": {}, + "5032-Obligations cot\u00e9es": {}, + "5033-Obligations non cot\u00e9es": {}, + "5035-Autres obligations": {}, + "5036-Frais d\u2019acquisition des obligations": {} + }, + "504-Bons de souscription": { + "5042-Bons de souscription d\u2019actions": {}, + "5043-Bons de souscription d\u2019obligations": {} + }, + "505-Titres n\u00e9gociables hors r\u00e9gion": {}, + "506-Int\u00e9r\u00eats courus": { + "5061-Titres du Tr\u00e9sor et bons de caisse \u00e0 court terme": {}, + "5062-Actions": {}, + "5063-Obligations": {} + }, + "508-Autres titres de placement et cr\u00e9ances assimil\u00e9es": {} + }, + "51-Valeurs \u00e0 encaisser": { + "511-Effets \u00e0 encaisser": {}, + "512-Effets \u00e0 l\u2019encaissement": {}, + "513-Ch\u00e8ques \u00e0 encaisser": {}, + "514-Ch\u00e8ques \u00e0 l\u2019encaissement": {}, + "515-Cartes de cr\u00e9dit \u00e0 encaisser": {}, + "518-Autres valeurs \u00e0 l\u2019encaissement": { + "5181-Warrants": {}, + "5182-Billets de fonds": {}, + "5185-Ch\u00e8ques de voyage": {}, + "5186-Coupons \u00e9chus": {}, + "5187-Int\u00e9r\u00eats \u00e9chus des obligations": {} + } + }, + "52-Banques": { + "521-Banques locales": { + "5211-Banques en monnaie nationale": { + "account_type": "Bank" + }, + "5215-Banques en devises": { + "account_type": "Bank" + }, + "account_type": "Bank" + }, + "522-Banques autres \u00c9tats r\u00e9gion": {}, + "523-Banques autres \u00c9tats zone mon\u00e9taire": {}, + "524-Banques hors zone mon\u00e9taire": {}, + "525-Banques d\u00e9p\u00f4t \u00e0 terme": {}, + "526-Banques, int\u00e9r\u00eats courus": { + "5261-Banque, int\u00e9r\u00eats courus, charges \u00e0 payer": {}, + "5267-Banque, int\u00e9r\u00eats courus, produits \u00e0 recevoir": {} + } + }, + "53-\u00c9tablissements financiers et assimil\u00e9s": { + "531-Ch\u00e8ques postaux": {}, + "532-Tr\u00e9sor": {}, + "533-Soci\u00e9t\u00e9s de gestion et d\u2019interm\u00e9diation (SGI)": {}, + "536-\u00c9tablissements financiers, int\u00e9r\u00eats courus": {}, + "538-Autres organismes financiers": {} + }, + "54-Instruments de tr\u00e9sorerie": { + "541-Options de taux d\u2019int\u00e9r\u00eat": {}, + "542-Options de taux de change": {}, + "543-Options de taux boursiers": {}, + "544-Instruments de march\u00e9s \u00e0 terme": {}, + "545-Avoirs d\u2019or et autres m\u00e9taux pr\u00e9cieux": {} + }, + "55-Instruments de monnaie \u00e9lectronique": { + "551-Monnaie \u00e9lectronique carte carburant": {}, + "552-Monnaie \u00e9lectronique t\u00e9l\u00e9phone portable": {}, + "553-Monnaie \u00e9lectronique carte p\u00e9age": {}, + "554-Porte-monnaie \u00e9lectronique": {}, + "558-Autres instruments de monnaies \u00e9lectroniques": {} + }, + "56-Banques, cr\u00e9dits de tr\u00e9sorerie et d\u2019escompte": { + "561-Cr\u00e9dits de tr\u00e9sorerie": {}, + "564-Escompte de cr\u00e9dits de campagne": {}, + "565-Escompte de cr\u00e9dits ordinaires": {}, + "566-Banques, cr\u00e9dits de tr\u00e9sorerie, int\u00e9r\u00eats courus": {} + }, + "57-Caisse": { + "571-Caisse si\u00e8ge social": { + "5711-Caisse en monnaie nationale": {}, + "5712-Caisse en devises": {} + }, + "572-Caisse succursale A": { + "5721-En monnaie nationale": {}, + "5722-En devises": {} + }, + "573-Caisse succursale B": { + "5731-En monnaie nationale": {}, + "5732-En devises": {} + } + }, + "58-R\u00e9gies d\u2019avances, accr\u00e9ditifs et virements internes": { + "581-R\u00e9gies d\u2019avance": {}, + "582-Accr\u00e9ditifs": {}, + "585-Virements de fonds": {}, + "588-Autres virements internes": {} + }, + "59-D\u00e9pr\u00e9ciations et provisions pour risque \u00e0 court terme": { + "590-D\u00e9pr\u00e9ciations des titres de placement": {}, + "591-D\u00e9pr\u00e9ciations des titres et valeurs \u00e0 encaisser": {}, + "592-D\u00e9pr\u00e9ciations des comptes banques": {}, + "593-D\u00e9pr\u00e9ciations des comptes \u00e9tablissements financiers et assimil\u00e9s": {}, + "594-D\u00e9pr\u00e9ciations des comptes d\u2019instruments de tr\u00e9sorerie": {}, + "599-Provisions pour risque \u00e0 court terme \u00e0 caract\u00e8re financier": {} + }, + "root_type": "Asset" + }, + "6-Comptes de charges des activit\u00e9s ordinaires": { + "60-Achats et variations de stocks": { + "601-Achats de marchandises": { + "6011-Dans la R\u00e9gion": {}, + "6012-Hors R\u00e9gion": {}, + "6013-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "6014-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "6015-Frais sur achats": {}, + "6019-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "602-Achats de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "6021-Dans la R\u00e9gion": {}, + "6022-Hors R\u00e9gion": {}, + "6023-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "6024-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "6025-Frais sur achats": {}, + "6029-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "603-Variations des stocks de biens achet\u00e9s": { + "6031-Variations des stocks de marchandises": {}, + "6032-Variations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": {}, + "6033-Variations des stocks d\u2019autres approvisionnements": {} + }, + "604-Achats stock\u00e9s de mati\u00e8res et fournitures consommables": { + "6041-Mati\u00e8res consommables": {}, + "6042-Mati\u00e8res combustibles": {}, + "6043-Produits d\u2019entretien": {}, + "6044-Fournitures d\u2019atelier et d\u2019usine": {}, + "6045-Frais sur achat": {}, + "6046-Fournitures de magasin": {}, + "6047-Fournitures de bureau": {}, + "6049-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "605-Autres achats": { + "6051-Fournitures non stockables Eau": {}, + "6052-Fournitures non stockables \u00c9lectricit\u00e9": {}, + "6053-Fournitures non stockables Autres \u00e9nergies": {}, + "6054-Fournitures d\u2019entretien non stockables": {}, + "6055-Fournitures de bureau non stockables": {}, + "6056-Achats de petit mat\u00e9riel et outillage": {}, + "6057-Achats d\u2019\u00e9tudes et prestations de services": {}, + "6058-Achats de travaux, mat\u00e9riels et \u00e9quipements": {}, + "6059-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "608-Achats d\u2019emballages": { + "6081-Emballages perdus": {}, + "6082-Emballages r\u00e9cup\u00e9rables non identifiables": {}, + "6083-Emballages \u00e0 usage mixte": {}, + "6085-Frais sur achats": {}, + "6089-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + } + }, + "61-Transports": { + "612-Transports sur ventes": {}, + "613-Transports pour le compte de tiers": {}, + "614-Transports du personnel": {}, + "616-Transports de plis": {}, + "618-Autres frais de transport": { + "6181-Voyages et d\u00e9placements": {}, + "6182-Transports entre \u00e9tablissements ou chantiers": {}, + "6183-Transports administratifs": {} + } + }, + "62-Services ext\u00e9rieurs": { + "621-Sous-traitance g\u00e9n\u00e9rale": {}, + "622-Locations, charges locatives": { + "6221-Locations de terrains": {}, + "6222-Locations de b\u00e2timents": {}, + "6223-Locations de mat\u00e9riels et outillages": {}, + "6224-Malis sur emballages": {}, + "6225-Locations d\u2019emballages": {}, + "6226-Fermages et loyers du foncier": {}, + "6228-Locations et charges locatives diverses": {} + }, + "623-Redevances de location acquisition": { + "6232-Cr\u00e9dit-bail immobilier": {}, + "6233-Cr\u00e9dit-bail mobilier": {}, + "6234-Location-vente": {}, + "6238-Autres contrats de location acquisition": {} + }, + "624-Entretien, r\u00e9parations, remise en \u00e9tat et maintenance": { + "6241-Entretien et r\u00e9parations des biens immobiliers": {}, + "6242-Entretien et r\u00e9parations des biens mobiliers": {}, + "6243-Maintenance": {}, + "6244-Charges de d\u00e9mant\u00e8lement et remise en \u00e9tat": {}, + "6248-Autres entretiens et r\u00e9parations": {} + }, + "625-Primes d\u2019assurance": { + "6251-Assurances multirisques": {}, + "6252-Assurances mat\u00e9riel de transport": {}, + "6253-Assurances risques d\u2019exploitation": {}, + "6254-Assurances responsabilit\u00e9 du producteur": {}, + "6255-Assurances insolvabilit\u00e9 clients": {}, + "6257-Assurances transport sur ventes": {}, + "6258-Autres primes d\u2019assurances": {} + }, + "626-\u00c9tudes, recherches et documentation": { + "6261-\u00c9tudes et recherches": {}, + "6265-Documentation g\u00e9n\u00e9rale": {}, + "6266-Documentation technique": {} + }, + "627-Publicit\u00e9, publications, relations publiques": { + "6271-Annonces, insertions": {}, + "6272-Catalogues, imprim\u00e9s publicitaires": {}, + "6273-\u00c9chantillons": {}, + "6274-Foires et expositions": {}, + "6275-Publications": {}, + "6276-Cadeaux \u00e0 la client\u00e8le": {}, + "6277-Frais de colloques, s\u00e9minaires, conf\u00e9rences": {}, + "6278-Autres charges de publicit\u00e9 et relations publiques": {} + }, + "628-Frais de t\u00e9l\u00e9communications": { + "6281-Frais de t\u00e9l\u00e9phone": {}, + "6282-Frais de t\u00e9lex": {}, + "6283-Frais de t\u00e9l\u00e9copie": {}, + "6288-Autres frais de t\u00e9l\u00e9communications": {} + } + }, + "63-Autres services ext\u00e9rieurs": { + "631-Frais bancaires": { + "6311-Frais sur titres (vente, garde)": {}, + "6312-Frais sur effets": {}, + "6313-Location de coffres": {}, + "6314-Commissions d\u2019affacturage": {}, + "6315-Commissions sur cartes de cr\u00e9dit": {}, + "6316-Frais d\u2019\u00e9mission d\u2019emprunts": {}, + "6317-Frais sur instruments monnaie \u00e9lectronique": {}, + "6318-Autres frais bancaires": {} + }, + "632-R\u00e9mun\u00e9rations d\u2019interm\u00e9diaires et de conseils": { + "6322-Commissions et courtages sur ventes": {}, + "6324-Honoraires des professions r\u00e9glement\u00e9es": {}, + "6325-Frais d\u2019actes et de contentieux": {}, + "6326-R\u00e9mun\u00e9rations d\u2019affacturage": {}, + "6327-R\u00e9mun\u00e9rations des autres prestataires de services": {}, + "6328-Divers frais": {} + }, + "633-Frais de formation du personnel": {}, + "634-Redevances pour brevets, licences, logiciels, concessions et droits et valeurs similaires": { + "6342-Redevances pour brevets, licences": {}, + "6343-Redevances pour logiciels": {}, + "6344-Redevances pour marques": {}, + "6345-Redevances pour sites internet": {}, + "6346-Redevances pour concessions, droits et valeurs similaires": {} + }, + "635-Cotisations": { + "6351-Cotisations": {}, + "6358-Concours divers": {} + }, + "637-R\u00e9mun\u00e9rations de personnel ext\u00e9rieur \u00e0 l\u2019entit\u00e9": { + "6371-Personnel int\u00e9rimaire": {}, + "6372-Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": {} + }, + "638-Autres charges externes": { + "6381-Frais de recrutement du personnel": {}, + "6382-Frais de d\u00e9m\u00e9nagement": {}, + "6383-R\u00e9ceptions": {}, + "6384-Missions": {}, + "6385-Charges de copropri\u00e9t\u00e9": {} + } + }, + "64-Imp\u00f4ts et taxes": { + "641-Imp\u00f4ts et taxes directs": { + "6411-Imp\u00f4ts fonciers et taxes annexes": {}, + "6412-Patentes, licences et taxes annexes": {}, + "6413-Taxes sur appointements et salaires": {}, + "6414-Taxes d\u2019apprentissage": {}, + "6415-Formation professionnelle continue": {}, + "6418-Autres imp\u00f4ts et taxes directs": {} + }, + "645-Imp\u00f4ts et taxes indirects": {}, + "646-Droits d\u2019enregistrement": { + "6461-Droits de mutation": {}, + "6462-Droits de timbre": {}, + "6463-Taxes sur les v\u00e9hicules de soci\u00e9t\u00e9": {}, + "6464-Vignettes": {}, + "6468-Autres droits": {} + }, + "647-P\u00e9nalit\u00e9s, amendes fiscales": { + "6471-P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts directs": {}, + "6472-P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts indirects": {}, + "6473-P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts directs": {}, + "6474-P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts indirects": {}, + "6478-Autres p\u00e9nalit\u00e9s et amendes fiscales": {} + }, + "648-Autres imp\u00f4ts et taxes": {} + }, + "65-Autres charges": { + "651-Pertes sur cr\u00e9ances clients et autres d\u00e9biteurs": { + "6511-Clients": {}, + "6515-Autres d\u00e9biteurs": {} + }, + "652-Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "6521-Quote-part transf\u00e9r\u00e9e de b\u00e9n\u00e9fices (comptabilit\u00e9 du g\u00e9rant)": {}, + "6525-Pertes imput\u00e9es par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": {} + }, + "654-Valeurs comptables des cessions courantes d\u2019immobilisations": { + "6541-Immobilisations incorporelles": {}, + "6542-Immobilisations corporelles": {} + }, + "656-Perte de change sur cr\u00e9ances et dettes commerciale": {}, + "657-P\u00e9nalit\u00e9s et amendes p\u00e9nales": {}, + "658-Charges diverses": { + "6581-Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": {}, + "6582-Dons": {}, + "6583-M\u00e9c\u00e9nat": {}, + "6588-Autres charges diverses": {} + }, + "659-Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "6591-Sur risques \u00e0 court terme": {}, + "6593-Sur stocks": {}, + "6594-Sur cr\u00e9ances": {}, + "6598-Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme": {} + } + }, + "66-Charges de personnel": { + "661-R\u00e9mun\u00e9rations directes vers\u00e9es au personnel national": { + "6611-Appointements salaires et commissions": {}, + "6612-Primes et gratifications": {}, + "6613-Cong\u00e9s pay\u00e9s": {}, + "6614-Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": {}, + "6615-Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": {}, + "6616-Suppl\u00e9ment familial": {}, + "6617-Avantages en nature": {}, + "6618-Autres r\u00e9mun\u00e9rations directes": {} + }, + "662-R\u00e9mun\u00e9rations directes vers\u00e9es au personnel non national": { + "6621-Appointements salaires et commissions": {}, + "6622-Primes et gratifications": {}, + "6623-Cong\u00e9s pay\u00e9s": {}, + "6624-Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": {}, + "6625-Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": {}, + "6626-Suppl\u00e9ment familial": {}, + "6627-Avantages en nature": {}, + "6628-Autres r\u00e9mun\u00e9rations directes": {} + }, + "663-Indemnit\u00e9s forfaitaires vers\u00e9es au personnel": { + "6631-Indemnit\u00e9s de logement": {}, + "6632-Indemnit\u00e9s de repr\u00e9sentation": {}, + "6633-Indemnit\u00e9s d\u2019expatriation": {}, + "6634-Indemnit\u00e9s de transport": {}, + "6638-Autres indemnit\u00e9s et avantages divers": {} + }, + "664-Charges sociales": { + "6641-Charges sociales sur r\u00e9mun\u00e9ration du personnel national": {}, + "6642-Charges sociales sur r\u00e9mun\u00e9ration du personnel non national": {} + }, + "666-R\u00e9mun\u00e9rations et charges sociales de l\u2019exploitant individuel": { + "6661-R\u00e9mun\u00e9ration du travail de l\u2019exploitant": {}, + "6662-Charges sociales": {} + }, + "667-R\u00e9mun\u00e9ration transf\u00e9r\u00e9e de personnel ext\u00e9rieur": { + "6671-Personnel int\u00e9rimaire": {}, + "6672-Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": {} + }, + "668-Autres charges sociales": { + "6681-Versements aux syndicats et comit\u00e9s d\u2019entreprise, d\u2019\u00e9tablissement": {}, + "6682-Versements aux comit\u00e9s d\u2019hygi\u00e8ne et de s\u00e9curit\u00e9": {}, + "6683-Versements et contributions aux autres \u0153uvres sociales": {}, + "6684-M\u00e9decine du travail et pharmacie": {}, + "6685-Assurances et organismes de sant\u00e9": {}, + "6686-Assurances retraite et fonds de pension": {}, + "6687-Majorations et p\u00e9nalit\u00e9s sociales": {}, + "6688-Charges sociales diverses": {} + } + }, + "67-Frais financiers et charges assimil\u00e9es": { + "671-Int\u00e9r\u00eats des emprunts": { + "6711-Emprunts obligataires": {}, + "6712-Emprunts aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": {}, + "6713-Dettes li\u00e9es \u00e0 des participations": {}, + "6714-Primes de remboursement des obligations": {} + }, + "672-Int\u00e9r\u00eats dans loyers de location acquisition": { + "6722-Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail immobilier": {}, + "6723-Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail mobilier": {}, + "6724-Int\u00e9r\u00eats dans loyers de location acquisition / location-vente": {}, + "6728-Int\u00e9r\u00eats dans loyers des autres locations acquisition": {} + }, + "673-Escomptes accord\u00e9s": {}, + "674-Autres int\u00e9r\u00eats": { + "6741-Avances re\u00e7ues et d\u00e9p\u00f4ts cr\u00e9diteurs": {}, + "6742-Comptes courants bloqu\u00e9s": {}, + "6743-Int\u00e9r\u00eats sur obligations cautionn\u00e9es": {}, + "6744-Int\u00e9r\u00eats sur dettes commerciales": {}, + "6745-Int\u00e9r\u00eats bancaires et sur op\u00e9rations de financement (escompte...)": {}, + "6748-Int\u00e9r\u00eats sur dettes diverses": {} + }, + "675-Escomptes des effets de commerce": {}, + "676-Pertes de change financi\u00e8res": {}, + "677-Pertes sur titres de placement": { + "6771-Pertes sur cessions de titres de placement": {}, + "6772-Mali provenant d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": {} + }, + "678-Pertes et charges sur risques financiers": { + "6781-Sur rentes viag\u00e8res": {}, + "6782-Sur op\u00e9rations financi\u00e8res": {}, + "6784-Sur instruments de tr\u00e9sorerie": {} + }, + "679-Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "6791-Sur risques financiers": {}, + "6795-Sur titres de placement": {}, + "6798-Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": {} + } + }, + "68-Dotations aux amortissements": { + "681-Dotations aux amortissements d\u2019exploitation": { + "6812-Dotations aux amortissements des immobilisations incorporelles": {}, + "6813-Dotations aux amortissements des immobilisations corporelles": {} + } + }, + "69-Dotations aux provisions et aux d\u00e9pr\u00e9ciations": { + "691-Dotations aux provisions et aux d\u00e9pr\u00e9ciations d\u2019exploitation": { + "6911-Dotations aux provisions pour risques et charges": {}, + "6913-Dotations aux d\u00e9pr\u00e9ciations des immobilisations incorporelles": {}, + "6914-Dotations aux d\u00e9pr\u00e9ciations des immobilisations corporelles": {} + }, + "697-Dotations aux provisions et aux d\u00e9pr\u00e9ciations financi\u00e8res": { + "6971-Dotations aux provisions pour risques et charges": {}, + "6972-Dotations aux d\u00e9pr\u00e9ciations des immobilisations financi\u00e8res": {} + } + }, + "root_type": "Expense" + }, + "7-Comptes de produits des activit\u00e9s ordinaires": { + "70-Ventes": { + "701-Ventes de marchandises": { + "7011-Dans la R\u00e9gion": {}, + "7012-Hors R\u00e9gion": {}, + "7013-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7014-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7015-Sur internet": {}, + "7019-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "702-Ventes de produits finis": { + "7021-Dans la R\u00e9gion": {}, + "7022-Hors R\u00e9gion": {}, + "7023-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7024-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7025-Sur internet": {}, + "7029-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "703-Ventes de produits interm\u00e9diaires": { + "7031-Dans la R\u00e9gion": {}, + "7032-Hors R\u00e9gion": {}, + "7033-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7034-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7035-Sur internet": {}, + "7039-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "704-Ventes de produits r\u00e9siduels": { + "7041-Dans la R\u00e9gion": {}, + "7042-Hors R\u00e9gion": {}, + "7043-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7044-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7045-Sur internet": {}, + "7049-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "705-Travaux factur\u00e9s": { + "7051-Dans la R\u00e9gion": {}, + "7052-Hors R\u00e9gion": {}, + "7053-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7054-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7055-Sur internet": {}, + "7059-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "706-Services vendus": { + "7061-Dans la R\u00e9gion": {}, + "7062-Hors R\u00e9gion": {}, + "7063-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7064-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7065-Sur internet": {}, + "7069-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "707-Produits accessoires": { + "7071-Ports, emballages perdus et autres frais factur\u00e9s": {}, + "7072-Commissions et courtages": {}, + "7073-Locations": {}, + "7074-Bonis sur reprises et cessions d\u2019emballages": {}, + "7075-Mise \u00e0 disposition de personnel": {}, + "7076-Redevances pour brevets, logiciels, marques et droits similaires": {}, + "7077-Services exploit\u00e9s dans l\u2019int\u00e9r\u00eat du personnel": {}, + "7078-Autres produits accessoires": {} + } + }, + "71-Subventions d\u2019exploitation": { + "711-Sur produits \u00e0 l\u2019exportation": {}, + "712-Sur produits \u00e0 l\u2019importation": {}, + "713-Sur produits de p\u00e9r\u00e9quation": {}, + "714-Indemnit\u00e9s et subventions d\u2019exploitation (entit\u00e9 agricole)": {}, + "718-Autres subventions d\u2019exploitation": { + "7181-Vers\u00e9es par l\u2019\u00c9tat et les collectivit\u00e9s publiques": {}, + "7182-Vers\u00e9es par les organismes internationaux": {}, + "7183-Vers\u00e9es par des tiers": {} + } + }, + "72-Production immobilis\u00e9e": { + "721-Immobilisations incorporelles": {}, + "722-Immobilisations corporelles": { + "7221-Immobilisations corporelles (hors actifs biologiques)": {}, + "7222-Immobilisations corporelles (actifs biologiques)": {} + }, + "724-Production auto-consomm\u00e9e": {}, + "726-Immobilisations financi\u00e8res": {} + }, + "73-Variations des stocks de biens et de services produits": { + "734-Variations des stocks de produits en cours": { + "7341-Produits en cours": {}, + "7342-Travaux en cours": {} + }, + "735-Variations des en-cours de services": { + "7351-\u00c9tudes en cours": {}, + "7352-Prestations de services en cours": {} + }, + "736-Variations des stocks de produits finis": {}, + "737-Variations des stocks de produits interm\u00e9diaires et r\u00e9siduels": { + "7371-Produits interm\u00e9diaires": {}, + "7372-Produits r\u00e9siduels": {} + } + }, + "75-Autres produits": { + "751-Profits sur cr\u00e9ances clients et autres d\u00e9biteurs": {}, + "752-Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "7521-Quote-part transf\u00e9r\u00e9e de pertes (comptabilit\u00e9 du g\u00e9rant)": {}, + "7525-B\u00e9n\u00e9fices attribu\u00e9s par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": {} + }, + "754-Produits des cessions courantes d\u2019immobilisations": { + "7541-Immobilisations incorporelles": {}, + "7542-Immobilisations corporelles": {} + }, + "756-Gains de change sur cr\u00e9ances et dettes commerciales": {}, + "758-Produits divers": { + "7581-Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": {}, + "7582-Indemnit\u00e9s d\u2019assurances re\u00e7ues": {}, + "7588-Autres produits divers": {} + }, + "759-Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "7591-Sur risques \u00e0 court terme": {}, + "7593-Sur stocks": {}, + "7594-Sur cr\u00e9ances": {}, + "7598-Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": {} + } + }, + "77-Revenus financiers et produits assimil\u00e9s": { + "771-Int\u00e9r\u00eats de pr\u00eats et cr\u00e9ances diverses": { + "7712-Int\u00e9r\u00eats de pr\u00eats": {}, + "7713-Int\u00e9r\u00eats sur cr\u00e9ances diverses": {} + }, + "772-Revenus de participations et autres titres immobilis\u00e9s": { + "7721-Revenus des titres de participation": {}, + "7722-Revenus autres titres immobilis\u00e9s": {} + }, + "773-Escomptes obtenus": {}, + "774-Revenus de placement": { + "7745-Revenus des obligations": {}, + "7746-Revenus des titres de placement": {} + }, + "775-Int\u00e9r\u00eats dans loyers de location acquisition": {}, + "776-Gains de change financiers": {}, + "777-Gains sur cessions de titres de placement": {}, + "778-Gains sur risques financiers": { + "7781-Sur rentes viag\u00e8res": {}, + "7782-Sur op\u00e9rations financi\u00e8res": {}, + "7784-Sur instruments de tr\u00e9sorerie": {} + }, + "779-Reprises de charges pour d\u00e9pr\u00e9ciations et provisions \u00e0 court terme financi\u00e8res": { + "7791-Sur risques financiers": {}, + "7795-Sur titres de placement": {}, + "7798-Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": {} + } + }, + "78-Transferts de charges": { + "781-Transferts de charges d\u2019exploitation": {}, + "787-Transferts de charges financi\u00e8res": {} + }, + "79-Reprises de provisions, de d\u00e9pr\u00e9ciations et autres": { + "791-Reprises de provisions et d\u00e9pr\u00e9ciations d\u2019exploitation": { + "7911-Pour risques et charges": {}, + "7913-Des immobilisations incorporelles": {}, + "7914-Des immobilisations corporelles": {} + }, + "797-Reprises de provisions et d\u00e9pr\u00e9ciations financi\u00e8res": { + "7971-Pour risques et charges": {}, + "7972-Des immobilisations financi\u00e8res": {} + }, + "798-Reprises d\u2019amortissements": {}, + "799-Reprises de subventions d\u2019investissement": {} + }, + "root_type": "Income" + }, + "8-Comptes des autres charges et des autres produits (CHARGES)": { + "81-Valeurs comptables des cessions d\u2019immobilisations": { + "811-Immobilisations incorporelles": {}, + "812-Immobilisations corporelles": {}, + "816-Immobilisations financi\u00e8res": {} + }, + "83-Charges hors activit\u00e9s ordinaires": { + "831-Charges HAO constat\u00e9es": {}, + "833-Charges li\u00e9es aux op\u00e9rations de restructuration": {}, + "834-Pertes sur cr\u00e9ances HAO": {}, + "835-Dons et lib\u00e9ralit\u00e9s accord\u00e9s": {}, + "836-Abandons de cr\u00e9ances consentis": {}, + "837-Charges li\u00e9es aux op\u00e9rations de liquidation": {}, + "839-Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": {} + }, + "85-Dotations hors activit\u00e9s ordinaires": { + "851-Dotations aux provisions r\u00e9glement\u00e9es": {}, + "852-Dotations aux amortissements HAO": {}, + "853-Dotations aux d\u00e9pr\u00e9ciations HAO": {}, + "854-Dotations aux provisions pour risques et charges HAO": {}, + "858-Autres dotations HAO": {} + }, + "87-Participation des travailleurs": { + "871-Participation l\u00e9gale aux b\u00e9n\u00e9fices": {}, + "874-Participation contractuelle aux b\u00e9n\u00e9fices": {}, + "878-Autres participations": {} + }, + "89-Imp\u00f4ts sur le r\u00e9sultat": { + "891-Imp\u00f4ts sur les b\u00e9n\u00e9fices de l\u2019exercice": { + "8911-Activit\u00e9s exerc\u00e9es dans l\u2019\u00c9tat": {}, + "8912-Activit\u00e9s exerc\u00e9es dans les autres \u00c9tats de la R\u00e9gion": {}, + "8913-Activit\u00e9s exerc\u00e9es hors R\u00e9gion": {} + }, + "892-Rappel d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": {}, + "895-Imp\u00f4t minimum forfaitaire IMF": {}, + "899-D\u00e9gr\u00e8vements et annulations d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": { + "8991-D\u00e9gr\u00e8vements": {}, + "8994-Annulations pour pertes r\u00e9troactives": {} + } + }, + "root_type": "Expense" + }, + "8-Comptes des autres charges et des autres produits (PRODUITS)": { + "82-Produits des cessions d\u2019immobilisations": { + "821-Immobilisations incorporelles": {}, + "822-Immobilisations corporelles": {}, + "826-Immobilisations financi\u00e8res": {} + }, + "84-Produits hors activit\u00e9s ordinaires": { + "841-Produits HAO constat\u00e9s": {}, + "843-Produits li\u00e9s aux op\u00e9rations de restructuration": {}, + "844-Indemnit\u00e9s et subventions HAO (entit\u00e9 agricole)": {}, + "845-Dons et lib\u00e9ralit\u00e9s obtenus": {}, + "846-Abandons de cr\u00e9ances obtenus": {}, + "847-Produits li\u00e9s aux op\u00e9rations de liquidation": {}, + "848-Transferts de charges HAO": {}, + "849-Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": {} + }, + "86-Reprises de charges, provisions et d\u00e9pr\u00e9ciations HAO": { + "861-Reprises de provisions r\u00e9glement\u00e9es": {}, + "862-Reprises d\u2019amortissements HAO": {}, + "863-Reprises de d\u00e9pr\u00e9ciations HAO": {}, + "864-Reprises de provisions pour risques et charges HAO": {}, + "868-Autres reprises HAO": {} + }, + "88-Subventions d\u2019\u00e9quilibre": { + "881-\u00c9tat": {}, + "884-Collectivit\u00e9s publiques": {}, + "886-Groupe": {}, + "888-Autres": {} + }, + "root_type": "Income" + } + } +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/bj_plan_comptable_avec_code.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/bj_plan_comptable_avec_code.json new file mode 100644 index 00000000000..9b7d9a4fcab --- /dev/null +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/bj_plan_comptable_avec_code.json @@ -0,0 +1,4208 @@ +{ + "country_code": "bj", + "name": "Syscohada - Plan Comptable avec code", + "tree": { + "Comptes de ressources durables": { + "Capital": { + "Capital social": { + "Capital souscrit, non appel\u00e9": { + "account_number": "1011" + }, + "Capital souscrit, appel\u00e9, non vers\u00e9": { + "account_number": "1012" + }, + "Capital souscrit, appel\u00e9, vers\u00e9, non amorti": { + "account_number": "1013" + }, + "Capital souscrit, appel\u00e9, vers\u00e9, amorti": { + "account_number": "1014" + }, + "Capital souscrit soumis \u00e0 des conditions particuli\u00e8res": { + "account_number": "1018" + }, + "account_number": "101" + }, + "Capital par dotation": { + "Dotation initiale": { + "account_number": "1021" + }, + "Dotations compl\u00e9mentaires": { + "account_number": "1022" + }, + "Autres dotations": { + "account_number": "1028" + }, + "account_number": "102" + }, + "Capital personnel": { + "account_number": "103" + }, + "Compte de l\u2019exploitant": { + "Apports temporaires": { + "account_number": "1041" + }, + "Op\u00e9rations courantes": { + "account_number": "1042" + }, + "R\u00e9mun\u00e9rations, imp\u00f4ts et autres charges personnelles": { + "account_number": "1043" + }, + "Pr\u00e9l\u00e8vements d\u2019autoconsommation": { + "account_number": "1047" + }, + "Autres pr\u00e9l\u00e8vements": { + "account_number": "1048" + }, + "account_number": "104" + }, + "Primes li\u00e9es au capital social": { + "Primes d\u2019\u00e9mission": { + "account_number": "1051" + }, + "Primes d\u2019apport": { + "account_number": "1052" + }, + "Primes de fusion": { + "account_number": "1053" + }, + "Primes de conversion": { + "account_number": "1054" + }, + "Autres primes": { + "account_number": "1058" + }, + "account_number": "105" + }, + "\u00c9carts de r\u00e9\u00e9valuation": { + "\u00c9carts de r\u00e9\u00e9valuation l\u00e9gale": { + "account_number": "1061" + }, + "\u00c9carts de r\u00e9\u00e9valuation libre": { + "account_number": "1062" + }, + "account_number": "106" + }, + "Apporteurs, capital souscrit, non appel\u00e9": { + "account_number": "109" + }, + "account_number": "10" + }, + "R\u00e9serves": { + "R\u00e9serve l\u00e9gale": { + "account_number": "111" + }, + "R\u00e9serves statutaires ou contractuelles": { + "account_number": "112" + }, + "R\u00e9serves r\u00e9glement\u00e9es": { + "R\u00e9serves de plus-values nettes \u00e0 long terme": { + "account_number": "1131" + }, + "R\u00e9serves d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": { + "account_number": "1132" + }, + "R\u00e9serves cons\u00e9cutives \u00e0 l\u2019octroi de subventions d\u2019investissement": { + "account_number": "1133" + }, + "R\u00e9serves des valeurs mobili\u00e8res donnant acc\u00e8s au capital": { + "account_number": "1134" + }, + "Autres r\u00e9serves r\u00e9glement\u00e9es": { + "account_number": "1135" + }, + "account_number": "113" + }, + "Autres r\u00e9serves": { + "R\u00e9serves facultatives": { + "account_number": "1181" + }, + "R\u00e9serves diverses": { + "account_number": "1188" + }, + "account_number": "118" + }, + "account_number": "11" + }, + "Report \u00e0 nouveau": { + "Report \u00e0 nouveau cr\u00e9diteur": { + "account_number": "121" + }, + "Report \u00e0 nouveau d\u00e9biteur": { + "Perte nette \u00e0 reporter": { + "account_number": "1291" + }, + "Perte Amortissements r\u00e9put\u00e9s diff\u00e9r\u00e9s": { + "account_number": "1292" + }, + "account_number": "129" + }, + "account_number": "12" + }, + "R\u00e9sultat net de l\u2019exercice": { + "R\u00e9sultat en instance d\u2019affectation": { + "R\u00e9sultat en instance d\u2019affectation : b\u00e9n\u00e9fice": { + "account_number": "1301" + }, + "R\u00e9sultat en instance d\u2019affectation : perte": { + "account_number": "1309" + }, + "account_number": "130" + }, + "R\u00e9sultat net : b\u00e9n\u00e9fice": { + "account_number": "131" + }, + "Marge commerciale (MC)": { + "account_number": "132" + }, + "Valeur ajout\u00e9e (VA)": { + "account_number": "133" + }, + "Exc\u00e9dent brut d\u2019exploitation (EBE)": { + "account_number": "134" + }, + "R\u00e9sultat d\u2019exploitation (RE)": { + "account_number": "135" + }, + "R\u00e9sultat financier (RF)": { + "account_number": "136" + }, + "R\u00e9sultat des activit\u00e9s ordinaires (RAO)": { + "account_number": "137" + }, + "R\u00e9sultat hors activit\u00e9s ordinaires (RHAO)": { + "R\u00e9sultat de fusion": { + "account_number": "1381" + }, + "R\u00e9sultat d\u2019apport partiel d\u2019actif": { + "account_number": "1382" + }, + "R\u00e9sultat de scission": { + "account_number": "1383" + }, + "R\u00e9sultat de liquidation": { + "account_number": "1384" + }, + "account_number": "138" + }, + "R\u00e9sultat net : perte": { + "account_number": "139" + }, + "account_number": "13" + }, + "Subventions d\u2019investissement": { + "Subventions d\u2019\u00e9quipement": { + "\u00c9tat": { + "account_number": "1411" + }, + "R\u00e9gions": { + "account_number": "1412" + }, + "D\u00e9partements": { + "account_number": "1413" + }, + "Communes et collectivit\u00e9s publiques d\u00e9centralis\u00e9es": { + "account_number": "1414" + }, + "Entit\u00e9s publiques ou mixtes": { + "account_number": "1415" + }, + "Entit\u00e9s et organismes priv\u00e9s": { + "account_number": "1416" + }, + "Organismes internationaux": { + "account_number": "1417" + }, + "Autres": { + "account_number": "1418" + }, + "account_number": "141" + }, + "Autres subventions d\u2019investissement": { + "account_number": "148" + }, + "account_number": "14" + }, + "Provisions r\u00e9glement\u00e9es et fonds assimil\u00e9s": { + "Amortissements d\u00e9rogatoires": { + "account_number": "151" + }, + "Plus-values de cession \u00e0 r\u00e9investir": { + "account_number": "152" + }, + "Fonds r\u00e9glement\u00e9s": { + "Fonds National": { + "account_number": "1531" + }, + "Pr\u00e9l\u00e8vement pour le Budget": { + "account_number": "1532" + }, + "account_number": "153" + }, + "Provisions sp\u00e9ciales de r\u00e9\u00e9valuation": { + "account_number": "154" + }, + "Provisions r\u00e9glement\u00e9es relatives aux immobilisations": { + "Reconstitution des gisements miniers et p\u00e9troliers": { + "account_number": "1551" + }, + "account_number": "155" + }, + "Provisions r\u00e9glement\u00e9es relatives aux stocks": { + "Hausse de prix": { + "account_number": "1561" + }, + "Fluctuation des cours": { + "account_number": "1562" + }, + "account_number": "156" + }, + "Provisions pour investissement": { + "account_number": "157" + }, + "Autres provisions et fonds r\u00e9glement\u00e9s": { + "account_number": "158" + }, + "account_number": "15" + }, + "Emprunts et dettes assimil\u00e9es": { + "Emprunts obligataires": { + "Emprunts obligataires ordinaires": { + "account_number": "1611" + }, + "Emprunts obligataires convertibles en actions": { + "account_number": "1612" + }, + "Emprunts obligataires remboursables en actions": { + "account_number": "1613" + }, + "Autres emprunts obligataires": { + "account_number": "1618" + }, + "account_number": "161" + }, + "Emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": { + "account_number": "162" + }, + "Avances re\u00e7ues de l\u2019\u00c9tat": { + "account_number": "163" + }, + "Avances re\u00e7ues et comptes courants bloqu\u00e9s": { + "account_number": "164" + }, + "D\u00e9p\u00f4ts et cautionnements re\u00e7us": { + "D\u00e9p\u00f4ts": { + "account_number": "1651" + }, + "Cautionnements": { + "account_number": "1652" + }, + "account_number": "165" + }, + "Int\u00e9r\u00eats courus": { + "Sur emprunts obligataires": { + "account_number": "1661" + }, + "Sur emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": { + "account_number": "1662" + }, + "Sur avances re\u00e7ues de l\u2019\u00c9tat": { + "account_number": "1663" + }, + "Sur avances re\u00e7ues et comptes courants bloqu\u00e9s": { + "account_number": "1664" + }, + "Sur d\u00e9p\u00f4ts et cautionnements re\u00e7us": { + "account_number": "1665" + }, + "Sur avances assorties de conditions particuli\u00e8res": { + "account_number": "1667" + }, + "Sur autres emprunts et dettes": { + "account_number": "1668" + }, + "account_number": "166" + }, + "Avances assorties de conditions particuli\u00e8res": { + "Avances bloqu\u00e9es pour augmentation du capital": { + "account_number": "1671" + }, + "Avances conditionn\u00e9es par l\u2019\u00c9tat": { + "account_number": "1672" + }, + "Avances conditionn\u00e9es par les autres organismes africains": { + "account_number": "1673" + }, + "Avances conditionn\u00e9es par les organismes internationaux": { + "account_number": "1674" + }, + "account_number": "167" + }, + "Autres emprunts et dettes": { + "Rentes viag\u00e8res capitalis\u00e9es": { + "account_number": "1681" + }, + "Billets de fonds": { + "account_number": "1682" + }, + "Dettes cons\u00e9cutives \u00e0 des titres emprunt\u00e9s": { + "account_number": "1683" + }, + "Emprunts participatifs": { + "account_number": "1684" + }, + "Participation des travailleurs aux b\u00e9n\u00e9fices": { + "account_number": "1685" + }, + "Emprunts et dettes contract\u00e9s aupr\u00e8s des autres tiers": { + "account_number": "1686" + }, + "account_number": "168" + }, + "account_number": "16" + }, + "Dettes de location acquisition": { + "Dettes de location acquisition / cr\u00e9dit bail immobilier": { + "account_number": "172" + }, + "Dettes de location acquisition / cr\u00e9dit bail mobilier": { + "account_number": "173" + }, + "Dettes de location acquisition / location de vente": { + "account_number": "174" + }, + "Int\u00e9r\u00eats courus": { + "Sur dettes de location acquisition / cr\u00e9dit-bail immobilier": { + "account_number": "1762" + }, + "Sur dettes de location acquisition / cr\u00e9dit-bail mobilier": { + "account_number": "1763" + }, + "Sur dettes de location acquisition / location-vente": { + "account_number": "1764" + }, + "Sur autres dettes de location acquisition": { + "account_number": "1768" + }, + "account_number": "176" + }, + "Autres dettes de location acquisition": { + "account_number": "178" + }, + "account_number": "17" + }, + "Dettes li\u00e9es \u00e0 des participations et comptes de liaison des \u00e9tablissements et soci\u00e9t\u00e9s en participation": { + "Dettes li\u00e9es \u00e0 des participations": { + "Dettes li\u00e9es \u00e0 des participations (groupe)": { + "account_number": "1811" + }, + "Dettes li\u00e9es \u00e0 des participations (hors groupe)": { + "account_number": "1812" + }, + "account_number": "181" + }, + "Dettes li\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": { + "account_number": "182" + }, + "Int\u00e9r\u00eats courus sur dettes li\u00e9es \u00e0 des participations": { + "account_number": "183" + }, + "Comptes permanents bloqu\u00e9s des \u00e9tablissements et succursales": { + "account_number": "184" + }, + "Comptes permanents non bloqu\u00e9s des \u00e9tablissements et succursales": { + "account_number": "185" + }, + "Comptes de liaison charges": { + "account_number": "186" + }, + "Comptes de liaison produits": { + "account_number": "187" + }, + "Comptes de liaison des soci\u00e9t\u00e9s en participation": { + "account_number": "188" + }, + "account_number": "18" + }, + "Provisions pour risques et charges": { + "Provisions pour litiges": { + "account_number": "191" + }, + "Provisions pour garanties donn\u00e9es aux clients": { + "account_number": "192" + }, + "Provisions pour pertes sur march\u00e9s \u00e0 ach\u00e8vement futur": { + "account_number": "193" + }, + "Provisions pour pertes de change": { + "account_number": "194" + }, + "Provisions pour imp\u00f4ts": { + "account_number": "195" + }, + "Provisions pour pensions et obligations similaires": { + "Provisions pour pensions et obligations similaires engagement de retraite": { + "account_number": "1961" + }, + "Actif du r\u00e9gime de retraite": { + "account_number": "1962" + }, + "account_number": "196" + }, + "Provisions pour restructuration": { + "account_number": "197" + }, + "Autres provisions pour risques et charges": { + "Provisions pour amendes et p\u00e9nalit\u00e9s": { + "account_number": "1981" + }, + "Provisions pour propre assureur": { + "account_number": "1983" + }, + "Provisions pour d\u00e9mant\u00e8lement et remise en \u00e9tat": { + "account_number": "1984" + }, + "Provisions pour droits \u00e0 r\u00e9duction ou avantage en nature (ch\u00e8ques cadeau, cartes de fid\u00e9lit\u00e9...)": { + "account_number": "1985" + }, + "Provisions pour divers risques et charges": { + "account_number": "1988" + }, + "account_number": "198" + }, + "account_number": "19" + }, + "root_type": "Equity", + "account_number": "1" + }, + "Comptes d\u2019actif immobilis\u00e9": { + "Immobilisations incorporelles": { + "account_type": "Fixed Asset", + "Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset", + "account_number": "211" + }, + "Brevets, licences, concessions et droits similaires": { + "account_type": "Fixed Asset", + "Brevets": { + "account_type": "Fixed Asset", + "account_number": "2121" + }, + "Licences": { + "account_type": "Fixed Asset", + "account_number": "2122" + }, + "Concessions de service public": { + "account_type": "Fixed Asset", + "account_number": "2123" + }, + "Autres concessions et droits similaires": { + "account_type": "Fixed Asset", + "account_number": "2128" + }, + "account_number": "212" + }, + "Logiciels et sites internet": { + "account_type": "Fixed Asset", + "Logiciels": { + "account_type": "Fixed Asset", + "account_number": "2131" + }, + "Sites internet": { + "account_type": "Fixed Asset", + "account_number": "2132" + }, + "account_number": "213" + }, + "Marques": { + "account_type": "Fixed Asset", + "account_number": "214" + }, + "Fonds commercial": { + "account_type": "Fixed Asset", + "account_number": "215" + }, + "Droit au bail": { + "account_type": "Fixed Asset", + "account_number": "216" + }, + "Investissements de cr\u00e9ation": { + "account_type": "Fixed Asset", + "account_number": "217" + }, + "Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset", + "Frais de prospection et d\u2019\u00e9valuation de ressources min\u00e9rales": { + "account_type": "Fixed Asset", + "account_number": "2181" + }, + "Co\u00fbts d\u2019obtention du contrat": { + "account_type": "Fixed Asset", + "account_number": "2182" + }, + "Fichiers clients, notices, titres de journaux et magazines": { + "account_type": "Fixed Asset", + "account_number": "2183" + }, + "Co\u00fbts des franchises": { + "account_type": "Fixed Asset", + "account_number": "2184" + }, + "Divers droits et valeurs incorporelles": { + "account_type": "Fixed Asset", + "account_number": "2188" + }, + "account_number": "218" + }, + "Immobilisations incorporelles en cours": { + "account_type": "Fixed Asset", + "Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset", + "account_number": "2191" + }, + "Logiciels et internet": { + "account_type": "Fixed Asset", + "account_number": "2193" + }, + "Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset", + "account_number": "2198" + }, + "account_number": "219" + }, + "account_number": "21" + }, + "Terrains": { + "account_type": "Fixed Asset", + "Terrains agricoles et forestiers": { + "account_type": "Fixed Asset", + "Terrains d\u2019exploitation agricole": { + "account_type": "Fixed Asset", + "account_number": "2211" + }, + "Terrains d\u2019exploitation foresti\u00e8re": { + "account_type": "Fixed Asset", + "account_number": "2212" + }, + "Autres terrains": { + "account_type": "Fixed Asset", + "account_number": "2218" + }, + "account_number": "221" + }, + "Terrains nus": { + "account_type": "Fixed Asset", + "Terrains \u00e0 b\u00e2tir": { + "account_type": "Fixed Asset", + "account_number": "2221" + }, + "Autres terrains nus": { + "account_type": "Fixed Asset", + "account_number": "2228" + }, + "account_number": "222" + }, + "Terrains b\u00e2tis": { + "account_type": "Fixed Asset", + "Pour b\u00e2timents industriels et agricoles": { + "account_type": "Fixed Asset", + "account_number": "2231" + }, + "Pour b\u00e2timents administratifs et commerciaux": { + "account_type": "Fixed Asset", + "account_number": "2232" + }, + "Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations professionnelles": { + "account_type": "Fixed Asset", + "account_number": "2234" + }, + "Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations non professionnelles": { + "account_type": "Fixed Asset", + "account_number": "2235" + }, + "Autres terrains b\u00e2tis": { + "account_type": "Fixed Asset", + "account_number": "2238" + }, + "account_number": "223" + }, + "Travaux de mise en valeur des terrains": { + "account_type": "Fixed Asset", + "Plantation d\u2019arbres et d\u2019arbustes": { + "account_type": "Fixed Asset", + "account_number": "2241" + }, + "Am\u00e9liorations du fonds": { + "account_type": "Fixed Asset", + "account_number": "2245" + }, + "Autres travaux": { + "account_type": "Fixed Asset", + "account_number": "2248" + }, + "account_number": "224" + }, + "Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset", + "Carri\u00e8res": { + "account_type": "Fixed Asset", + "account_number": "2251" + }, + "account_number": "225" + }, + "Terrains am\u00e9nag\u00e9s": { + "account_type": "Fixed Asset", + "Parkings": { + "account_type": "Fixed Asset", + "account_number": "2261" + }, + "account_number": "226" + }, + "Terrains mis en concession": { + "account_type": "Fixed Asset", + "account_number": "227" + }, + "Autres terrains": { + "account_type": "Fixed Asset", + "Terrains immeubles de placement": { + "account_type": "Fixed Asset", + "account_number": "2281" + }, + "Terrains des logements affect\u00e9s au personnel": { + "account_type": "Fixed Asset", + "account_number": "2285" + }, + "Terrains de location acquisition": { + "account_type": "Fixed Asset", + "account_number": "2286" + }, + "Divers terrains": { + "account_type": "Fixed Asset", + "account_number": "2288" + }, + "account_number": "228" + }, + "Am\u00e9nagements de terrains en cours": { + "account_type": "Fixed Asset", + "Terrains agricoles et forestiers": { + "account_type": "Fixed Asset", + "account_number": "2291" + }, + "Terrains nus": { + "account_type": "Fixed Asset", + "account_number": "2292" + }, + "Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset", + "account_number": "2295" + }, + "Autres terrains": { + "account_type": "Fixed Asset", + "account_number": "2298" + }, + "account_number": "229" + }, + "account_number": "22" + }, + "B\u00e2timents, installations techniques et agencements": { + "B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "B\u00e2timents industriels": { + "account_number": "2311" + }, + "B\u00e2timents agricoles": { + "account_number": "2312" + }, + "B\u00e2timents administratifs et commerciaux": { + "account_number": "2313" + }, + "B\u00e2timents affect\u00e9s au logement du personnel": { + "account_number": "2314" + }, + "B\u00e2timents immeubles de placement": { + "account_number": "2315" + }, + "B\u00e2timents de location acquisition": { + "account_number": "2316" + }, + "account_number": "231" + }, + "B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "B\u00e2timents industriels": { + "account_number": "2321" + }, + "B\u00e2timents agricoles": { + "account_number": "2322" + }, + "B\u00e2timents administratifs et commerciaux": { + "account_number": "2323" + }, + "B\u00e2timents affect\u00e9s au logement du personnel": { + "account_number": "2324" + }, + "B\u00e2timents immeubles de placement": { + "account_number": "2325" + }, + "B\u00e2timents de location acquisition": { + "account_number": "2326" + }, + "account_number": "232" + }, + "Ouvrages d\u2019infrastructure": { + "Voies de terre": { + "account_number": "2331" + }, + "Voies de fer": { + "account_number": "2332" + }, + "Voies d\u2019eau": { + "account_number": "2333" + }, + "Barrages, Digues": { + "account_number": "2334" + }, + "Pistes d\u2019a\u00e9rodrome": { + "account_number": "2335" + }, + "Autres ouvrages d\u2019infrastructures": { + "account_number": "2338" + }, + "account_number": "233" + }, + "Am\u00e9nagements, agencements et installations techniques": { + "Installations complexes sp\u00e9cialis\u00e9es sur sol propre": { + "account_number": "2341" + }, + "Installations complexes sp\u00e9cialis\u00e9es sur sol d\u2019autrui": { + "account_number": "2342" + }, + "Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol propre": { + "account_number": "2343" + }, + "Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol d\u2019autrui": { + "account_number": "2344" + }, + "Am\u00e9nagements et agencements des b\u00e2timents": { + "account_number": "2345" + }, + "account_number": "234" + }, + "Am\u00e9nagements de bureaux": { + "Installations g\u00e9n\u00e9rales": { + "account_number": "2351" + }, + "Autres am\u00e9nagements de bureaux": { + "account_number": "2358" + }, + "account_number": "235" + }, + "B\u00e2timents industriels, agricoles et commerciaux mis en concession": { + "account_number": "237" + }, + "Autres installations et agencements": { + "account_number": "238" + }, + "B\u00e2timents am\u00e9nagements, agencements et installations en cours": { + "B\u00e2timents en cours": { + "account_number": "2391" + }, + "Installations en cours": { + "account_number": "2392" + }, + "Ouvrages d\u2019infrastructure en cours": { + "account_number": "2393" + }, + "Am\u00e9nagements et agencements et installations techniques en cours": { + "account_number": "2394" + }, + "Am\u00e9nagements de bureaux en cours": { + "account_number": "2395" + }, + "Autres installations et agencements en cours": { + "account_number": "2398" + }, + "account_number": "239" + }, + "account_number": "23" + }, + "Mat\u00e9riel, mobilier et actifs biologiques": { + "Mat\u00e9riel et outillage industriel et commercial": { + "Mat\u00e9riel industriel": { + "account_number": "2411" + }, + "Outillage industriel": { + "account_number": "2412" + }, + "Mat\u00e9riel commercial": { + "account_number": "2413" + }, + "Outillage commercial": { + "account_number": "2414" + }, + "Mat\u00e9riel & outillage industriel et commercial de location-acquisition": { + "account_number": "2416" + }, + "account_number": "241" + }, + "Mat\u00e9riel et outillage agricole": { + "Mat\u00e9riel agricole": { + "account_number": "2421" + }, + "Outillage agricole": { + "account_number": "2422" + }, + "Mat\u00e9riel & outillage agricole de location-acquisition": { + "account_number": "2426" + }, + "account_number": "242" + }, + "Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "243" + }, + "Mat\u00e9riel et mobilier": { + "Mat\u00e9riel de bureau": { + "account_number": "2441" + }, + "Mat\u00e9riel informatique": { + "account_number": "2442" + }, + "Mat\u00e9riel bureautique": { + "account_number": "2443" + }, + "Mobilier de bureau": { + "account_number": "2444" + }, + "Mat\u00e9riel et mobilier immeubles de placement": { + "account_number": "2445" + }, + "Mat\u00e9riel et mobilier de location acquisition": { + "account_number": "2446" + }, + "Mat\u00e9riel et mobilier des logements du personnel": { + "account_number": "2447" + }, + "account_number": "244" + }, + "Mat\u00e9riel de transport": { + "Mat\u00e9riel automobile": { + "account_number": "2451" + }, + "Mat\u00e9riel ferroviaire": { + "account_number": "2452" + }, + "Mat\u00e9riel fluvial, lagunaire": { + "account_number": "2453" + }, + "Mat\u00e9riel naval": { + "account_number": "2454" + }, + "Mat\u00e9riel a\u00e9rien": { + "account_number": "2455" + }, + "Mat\u00e9riel de transport de location-acquisition": { + "account_number": "2456" + }, + "Mat\u00e9riel hippomobile": { + "account_number": "2457" + }, + "Autres mat\u00e9riels de transport": { + "account_number": "2458" + }, + "account_number": "245" + }, + "Actifs biologiques": { + "Cheptel, animaux de trait": { + "account_number": "2461" + }, + "Cheptel, animaux reproducteurs": { + "account_number": "2462" + }, + "Animaux de garde": { + "account_number": "2463" + }, + "Plantations agricoles": { + "account_number": "2465" + }, + "Autres actifs biologiques": { + "account_number": "2468" + }, + "account_number": "246" + }, + "Agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "Agencements et am\u00e9nagements du mat\u00e9riel": { + "account_number": "2471" + }, + "Agencements et am\u00e9nagements des actifs biologiques": { + "account_number": "2472" + }, + "Autres agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "account_number": "2478" + }, + "account_number": "247" + }, + "Autres mat\u00e9riels et mobiliers": { + "Collections et \u0153uvres d\u2019art": { + "account_number": "2481" + }, + "Divers mat\u00e9riels mobiliers": { + "account_number": "2488" + }, + "account_number": "248" + }, + "Mat\u00e9riels et actifs biologiques en cours": { + "Mat\u00e9riel et outillage industriel et commercial": { + "account_number": "2491" + }, + "Mat\u00e9riel et outillage agricole": { + "account_number": "2492" + }, + "Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "2493" + }, + "Mat\u00e9riel et mobilier de bureau": { + "account_number": "2494" + }, + "Mat\u00e9riel de transport": { + "account_number": "2495" + }, + "Actifs biologiques": { + "account_number": "2496" + }, + "Agencements am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "account_number": "2497" + }, + "Autres mat\u00e9riels et actifs biologiques en cours": { + "account_number": "2498" + }, + "account_number": "249" + }, + "account_number": "24" + }, + "Avances et acomptes vers\u00e9s sur immobilisations": { + "Avances et acomptes vers\u00e9s sur immobilisations incorporelles": { + "account_number": "251" + }, + "Avances et acomptes vers\u00e9s sur immobilisations corporelles": { + "account_number": "252" + }, + "account_number": "25" + }, + "Titres de participation": { + "Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": { + "account_number": "261" + }, + "Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le conjoint": { + "account_number": "262" + }, + "Titres de participation dans des soci\u00e9t\u00e9s conf\u00e9rant une influence notable": { + "account_number": "263" + }, + "Participations dans des organismes professionnels": { + "account_number": "265" + }, + "Parts dans des groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": { + "account_number": "266" + }, + "Autres titres de participation": { + "account_number": "268" + }, + "account_number": "26" + }, + "Autres immobilisations financi\u00e8res": { + "Pr\u00eats et cr\u00e9ances": { + "Pr\u00eats participatifs": { + "account_number": "2711" + }, + "Pr\u00eats aux associ\u00e9s": { + "account_number": "2712" + }, + "Billets de fonds": { + "account_number": "2713" + }, + "Titres pr\u00eat\u00e9s": { + "account_number": "2714" + }, + "Autres pr\u00eats et cr\u00e9ances": { + "account_number": "2718" + }, + "account_number": "271" + }, + "Pr\u00eats au personnel": { + "Pr\u00eats immobiliers": { + "account_number": "2721" + }, + "Pr\u00eats mobiliers et d\u2019installation": { + "account_number": "2722" + }, + "Autres pr\u00eats au personnel": { + "account_number": "2728" + }, + "account_number": "272" + }, + "Cr\u00e9ances sur l\u2019\u00c9tat": { + "Retenues de garantie": { + "account_number": "2731" + }, + "Fonds r\u00e9glement\u00e9": { + "account_number": "2733" + }, + "Cr\u00e9ances sur le conc\u00e9dant": { + "account_number": "2734" + }, + "Autres cr\u00e9ances sur l\u2019\u00c9tat": { + "account_number": "2738" + }, + "account_number": "273" + }, + "Titres immobilis\u00e9s": { + "Titres immobilis\u00e9s de l\u2019activit\u00e9 de portefeuille (TIAP)": { + "account_number": "2741" + }, + "Titres participatifs": { + "account_number": "2742" + }, + "Certificats d\u2019investissement": { + "account_number": "2743" + }, + "Parts de fonds commun de placement (FCP)": { + "account_number": "2744" + }, + "Obligations": { + "account_number": "2745" + }, + "Actions ou parts propres": { + "account_number": "2746" + }, + "Autres titres immobilis\u00e9s": { + "account_number": "2748" + }, + "account_number": "274" + }, + "D\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "D\u00e9p\u00f4ts pour loyers d\u2019avance": { + "account_number": "2751" + }, + "D\u00e9p\u00f4ts pour l\u2019\u00e9lectricit\u00e9": { + "account_number": "2752" + }, + "D\u00e9p\u00f4ts pour l\u2019eau": { + "account_number": "2753" + }, + "D\u00e9p\u00f4ts pour le gaz": { + "account_number": "2754" + }, + "D\u00e9p\u00f4ts pour le t\u00e9l\u00e9phone, le t\u00e9lex, la t\u00e9l\u00e9copie": { + "account_number": "2755" + }, + "Cautionnements sur march\u00e9s publics": { + "account_number": "2756" + }, + "Cautionnements sur autres op\u00e9rations": { + "account_number": "2757" + }, + "Autres d\u00e9p\u00f4ts et cautionnements": { + "account_number": "2758" + }, + "account_number": "275" + }, + "Int\u00e9r\u00eats courus": { + "Pr\u00eats et cr\u00e9ances non commerciales": { + "account_number": "2761" + }, + "Pr\u00eats au personnel": { + "account_number": "2762" + }, + "Cr\u00e9ances sur l\u2019\u00c9tat": { + "account_number": "2763" + }, + "Titres immobilis\u00e9s": { + "account_number": "2764" + }, + "D\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "account_number": "2765" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations": { + "account_number": "2767" + }, + "Immobilisations financi\u00e8res diverses": { + "account_number": "2768" + }, + "account_number": "276" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": { + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations (groupe)": { + "account_number": "2771" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations (hors groupe)": { + "account_number": "2772" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": { + "account_number": "2773" + }, + "Avances \u00e0 des Groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": { + "account_number": "2774" + }, + "account_number": "277" + }, + "Immobilisations financi\u00e8res diverses": { + "Cr\u00e9ances diverses groupe": { + "account_number": "2781" + }, + "Cr\u00e9ances diverses hors groupe": { + "account_number": "2782" + }, + "Banques d\u00e9p\u00f4ts \u00e0 terme": { + "account_number": "2784" + }, + "Or et m\u00e9taux pr\u00e9cieux": { + "account_number": "2785" + }, + "Autres immobilisations financi\u00e8res": { + "account_number": "2788" + }, + "account_number": "278" + }, + "account_number": "27" + }, + "Amortissements": { + "account_type": "Accumulated Depreciation", + "Amortissements des immobilisations corporelles": { + "account_type": "Accumulated Depreciation", + "Amortissements des frais de d\u00e9veloppement": { + "account_type": "Accumulated Depreciation", + "account_number": "2811" + }, + "Amortissements des brevets, licences, concessions et droits similaires": { + "account_type": "Accumulated Depreciation", + "account_number": "2812" + }, + "Amortissements des logiciels et sites internet": { + "account_type": "Accumulated Depreciation", + "account_number": "2813" + }, + "Amortissements des marques": { + "account_type": "Accumulated Depreciation", + "account_number": "2814" + }, + "Amortissements du fonds commercial": { + "account_type": "Accumulated Depreciation", + "account_number": "2815" + }, + "Amortissements du droit au bail": { + "account_type": "Accumulated Depreciation", + "account_number": "2816" + }, + "Amortissements des investissements de cr\u00e9ation": { + "account_type": "Accumulated Depreciation", + "account_number": "2817" + }, + "Amortissements des autres droits et valeurs incorporels": { + "account_type": "Accumulated Depreciation", + "account_number": "2818" + }, + "account_number": "281" + }, + "Amortissements des terrains": { + "Amortissements des travaux de mise en valeur des terrains": { + "account_number": "2824" + }, + "account_number": "282" + }, + "Amortissements des b\u00e2timents, installations techniques et agencements": { + "Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "account_number": "2831" + }, + "Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "account_number": "2832" + }, + "Amortissements des ouvrages d\u2019infrastructure": { + "account_number": "2833" + }, + "Amortissements des am\u00e9nagements, agencements et installations techniques": { + "account_number": "2834" + }, + "Amortissements des am\u00e9nagements de bureaux": { + "account_number": "2835" + }, + "Amortissements des b\u00e2timents industriels, agricoles et commerciaux mis en concession": { + "account_number": "2837" + }, + "Amortissements des autres installations et agencements": { + "account_number": "2838" + }, + "account_number": "283" + }, + "Amortissements du mat\u00e9riel": { + "Amortissements du mat\u00e9riel et outillage industriel et commercial": { + "account_number": "2841" + }, + "Amortissements du mat\u00e9riel et outillage agricole": { + "account_number": "2842" + }, + "Amortissements du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "2843" + }, + "Amortissements du mat\u00e9riel et mobilier": { + "account_number": "2844" + }, + "Amortissements du mat\u00e9riel de transport": { + "account_number": "2845" + }, + "Amortissements des actifs biologiques": { + "account_number": "2846" + }, + "Amortissements des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": { + "account_number": "2847" + }, + "Amortissements des autres mat\u00e9riels": { + "account_number": "2848" + }, + "account_number": "284" + }, + "account_number": "28" + }, + "D\u00e9pr\u00e9ciations des immobilisations": { + "D\u00e9pr\u00e9ciations des immobilisations incorporelles": { + "D\u00e9pr\u00e9ciations des frais de d\u00e9veloppement": { + "account_number": "2911" + }, + "D\u00e9pr\u00e9ciations des brevets, licences, concessions et droits similaires": { + "account_number": "2912" + }, + "D\u00e9pr\u00e9ciations des logiciels et sites internet": { + "account_number": "2913" + }, + "D\u00e9pr\u00e9ciations des marques": { + "account_number": "2914" + }, + "D\u00e9pr\u00e9ciations du fonds commercial": { + "account_number": "2915" + }, + "D\u00e9pr\u00e9ciations du droit au bail": { + "account_number": "2916" + }, + "D\u00e9pr\u00e9ciations des investissements de cr\u00e9ation": { + "account_number": "2917" + }, + "D\u00e9pr\u00e9ciations des autres droits et valeurs incorporels": { + "account_number": "2918" + }, + "D\u00e9pr\u00e9ciations des immobilisations incorporelles en cours": { + "account_number": "2919" + }, + "account_number": "291" + }, + "D\u00e9pr\u00e9ciations des terrains": { + "D\u00e9pr\u00e9ciations des terrains agricoles et forestiers": { + "account_number": "2921" + }, + "D\u00e9pr\u00e9ciations des terrains nus": { + "account_number": "2922" + }, + "D\u00e9pr\u00e9ciations des terrains b\u00e2tis": { + "account_number": "2923" + }, + "D\u00e9pr\u00e9ciations des travaux de mise en valeur des terrains": { + "account_number": "2924" + }, + "D\u00e9pr\u00e9ciations des terrains de gisement": { + "account_number": "2925" + }, + "D\u00e9pr\u00e9ciations des terrains am\u00e9nag\u00e9s": { + "account_number": "2926" + }, + "D\u00e9pr\u00e9ciations des terrains mis en concession": { + "account_number": "2927" + }, + "D\u00e9pr\u00e9ciations des autres terrains": { + "account_number": "2928" + }, + "D\u00e9pr\u00e9ciations des am\u00e9nagements de terrains en cours": { + "account_number": "2929" + }, + "account_number": "292" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents, installations techniques et agencements": { + "D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "account_number": "2931" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "account_number": "2932" + }, + "D\u00e9pr\u00e9ciations des ouvrages d\u2019infrastructures": { + "account_number": "2933" + }, + "D\u00e9pr\u00e9ciations des am\u00e9nagements, agencements et installations techniques": { + "account_number": "2934" + }, + "D\u00e9pr\u00e9ciations des am\u00e9nagements de bureaux": { + "account_number": "2935" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles et commerciaux mis en concession": { + "account_number": "2937" + }, + "D\u00e9pr\u00e9ciations des autres installations et agencements": { + "account_number": "2938" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents et installations en cours": { + "account_number": "2939" + }, + "account_number": "293" + }, + "D\u00e9pr\u00e9ciations de mat\u00e9riel, du mobilier et de l\u2019actif biologique": { + "D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage industriel et commercial": { + "account_number": "2941" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage agricole": { + "account_number": "2942" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "2943" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel et mobilier": { + "account_number": "2944" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel de transport": { + "account_number": "2945" + }, + "D\u00e9pr\u00e9ciations des actifs biologiques": { + "account_number": "2946" + }, + "D\u00e9pr\u00e9ciations des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": { + "account_number": "2947" + }, + "D\u00e9pr\u00e9ciations des autres mat\u00e9riels": { + "account_number": "2948" + }, + "D\u00e9pr\u00e9ciations de mat\u00e9riel en cours": { + "account_number": "2949" + }, + "account_number": "294" + }, + "D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations": { + "D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations incorporelles": { + "account_number": "2951" + }, + "D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations corporelles": { + "account_number": "2952" + }, + "account_number": "295" + }, + "D\u00e9pr\u00e9ciations des titres de participation": { + "D\u00e9pr\u00e9ciations des titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": { + "account_number": "2961" + }, + "D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s sous contr\u00f4le conjoint": { + "account_number": "2962" + }, + "D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s conf\u00e9rant une influence notable": { + "account_number": "2963" + }, + "D\u00e9pr\u00e9ciations des participations dans des organismes professionnels": { + "account_number": "2965" + }, + "D\u00e9pr\u00e9ciations des parts dans des GIE": { + "account_number": "2966" + }, + "D\u00e9pr\u00e9ciations des autres titres de participation": { + "account_number": "2968" + }, + "account_number": "296" + }, + "D\u00e9pr\u00e9ciations des autres immobilisations financi\u00e8res": { + "D\u00e9pr\u00e9ciations des pr\u00eats et cr\u00e9ances": { + "account_number": "2971" + }, + "D\u00e9pr\u00e9ciations des pr\u00eats au personnel": { + "account_number": "2972" + }, + "D\u00e9pr\u00e9ciations des cr\u00e9ances sur l\u2019\u00c9tat": { + "account_number": "2973" + }, + "D\u00e9pr\u00e9ciations des titres immobilis\u00e9s": { + "account_number": "2974" + }, + "D\u00e9pr\u00e9ciations des d\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "account_number": "2975" + }, + "D\u00e9pr\u00e9ciations des cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": { + "account_number": "2977" + }, + "D\u00e9pr\u00e9ciations des cr\u00e9ances financi\u00e8res diverses": { + "account_number": "2978" + }, + "account_number": "297" + }, + "account_number": "29" + }, + "root_type": "Asset", + "account_number": "2" + }, + "Comptes de Stocks": { + "Marchandises": { + "Marchandises A": { + "Marchandises A1": { + "account_number": "3111" + }, + "Marchandises A2": { + "account_number": "3112" + }, + "account_number": "311" + }, + "Marchandises B": { + "Marchandises B1": { + "account_number": "3121" + }, + "Marchandises B2": { + "account_number": "3122" + }, + "account_number": "312" + }, + "Actifs biologiques": { + "Animaux": { + "account_number": "3131" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3132" + }, + "account_number": "313" + }, + "Marchandises hors activit\u00e9s ordinaires (HAO)": { + "account_number": "318" + }, + "account_number": "31" + }, + "Mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "Mati\u00e8res A": { + "account_number": "321" + }, + "Mati\u00e8res B": { + "account_number": "322" + }, + "Fournitures (A, B)": { + "account_number": "323" + }, + "account_number": "32" + }, + "Autres approvisionnements": { + "Mati\u00e8res consommables": { + "account_number": "331" + }, + "Fournitures d\u2019atelier et d\u2019usine": { + "account_number": "332" + }, + "Fournitures de magasin": { + "account_number": "333" + }, + "Fournitures de bureau": { + "account_number": "334" + }, + "Emballages": { + "Emballages perdus": { + "account_number": "3351" + }, + "Emballages r\u00e9cup\u00e9rables non identifiables": { + "account_number": "3352" + }, + "Emballages \u00e0 usage mixte": { + "account_number": "3353" + }, + "Autres emballages": { + "account_number": "3358" + }, + "account_number": "335" + }, + "Autres mati\u00e8res": { + "account_number": "338" + }, + "account_number": "33" + }, + "Produits en cours": { + "Produits en cours": { + "Produits en cours P1": { + "account_number": "3411" + }, + "Produits en cours P2": { + "account_number": "3412" + }, + "account_number": "341" + }, + "Travaux en cours": { + "Travaux en cours T1": { + "account_number": "3421" + }, + "Travaux en cours T2": { + "account_number": "3422" + }, + "account_number": "342" + }, + "Produits interm\u00e9diaires en cours": { + "Produits interm\u00e9diaires A": { + "account_number": "3431" + }, + "Produits interm\u00e9diaires B": { + "account_number": "3432" + }, + "account_number": "343" + }, + "Produits r\u00e9siduels en cours": { + "Produits r\u00e9siduels A": { + "account_number": "3441" + }, + "Produits r\u00e9siduels B": { + "account_number": "3442" + }, + "account_number": "344" + }, + "Actifs biologiques en cours": { + "Animaux": { + "account_number": "3451" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3452" + }, + "account_number": "345" + }, + "account_number": "34" + }, + "Services en cours": { + "\u00c9tudes en cours": { + "\u00c9tudes en cours E1": { + "account_number": "3511" + }, + "\u00c9tudes en cours E2": { + "account_number": "3512" + }, + "account_number": "351" + }, + "Prestations de services en cours": { + "Prestations de services S1": { + "account_number": "3521" + }, + "Prestations de services S2": { + "account_number": "3522" + } + }, + "account_number": "35" + }, + "Produits finis": { + "Produits finis A": { + "account_number": "361" + }, + "Produits finis B": { + "account_number": "362" + }, + "Actifs biologiques": { + "Animaux": { + "account_number": "3631" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3632" + }, + "Autres stocks (activit\u00e9s annexes)": { + "account_number": "3638" + }, + "account_number": "363" + }, + "account_number": "36" + }, + "Produits interm\u00e9diaires et r\u00e9siduels": { + "Produits interm\u00e9diaires": { + "Produits interm\u00e9diaires A": { + "account_number": "3711" + }, + "Produits interm\u00e9diaires B": { + "account_number": "3712" + }, + "account_number": "371" + }, + "Produits r\u00e9siduels": { + "D\u00e9chets": { + "account_number": "3721" + }, + "Rebuts": { + "account_number": "3722" + }, + "Mati\u00e8res de R\u00e9cup\u00e9ration": { + "account_number": "3723" + }, + "account_number": "372" + }, + "Actifs biologiques": { + "Animaux": { + "account_number": "3731" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3732" + }, + "Autres stocks (activit\u00e9s annexes)": { + "account_number": "3738" + }, + "account_number": "373" + }, + "account_number": "37" + }, + "Stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": { + "account_type": "Stock", + "Marchandises en cours de route": { + "account_number": "381" + }, + "Mati\u00e8res premi\u00e8res et fournitures li\u00e9es en cours de route": { + "account_number": "382" + }, + "Autres approvisionnements en cours de route": { + "account_number": "383" + }, + "Produits finis en cours de route": { + "account_number": "386" + }, + "Stock en consignation ou en d\u00e9p\u00f4t": { + "Stock en consignation": { + "account_number": "3871" + }, + "Stock en d\u00e9p\u00f4t": { + "account_number": "3872" + }, + "account_number": "387" + }, + "Stock provenant d\u2019immobilisations mises hors service ou au rebut": { + "account_number": "388" + }, + "account_number": "38" + }, + "D\u00e9pr\u00e9ciations des stocks et encours de production": { + "D\u00e9pr\u00e9ciations des stocks de marchandises": { + "account_number": "391" + }, + "D\u00e9pr\u00e9ciations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "account_number": "392" + }, + "D\u00e9pr\u00e9ciations des stocks d\u2019autres approvisionnements": { + "account_number": "393" + }, + "D\u00e9pr\u00e9ciations des productions en cours": { + "account_number": "394" + }, + "D\u00e9pr\u00e9ciations des services en cours": { + "account_number": "395" + }, + "D\u00e9pr\u00e9ciations des stocks de produits finis": { + "account_number": "396" + }, + "D\u00e9pr\u00e9ciations des stocks de produits interm\u00e9diaires et r\u00e9siduels": { + "account_number": "397" + }, + "D\u00e9pr\u00e9ciations des stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": { + "account_number": "398" + }, + "account_number": "39" + }, + "root_type": "Asset", + "account_number": "3" + }, + "4-Comptes de Tiers (ACTIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (ACTIF)": { + "Fournisseurs d\u00e9biteurs": { + "Fournisseurs Avances et acomptes vers\u00e9s": { + "account_number": "4091" + }, + "Fournisseurs Groupe avances et acomptes vers\u00e9s": { + "account_number": "4092" + }, + "Fournisseurs Sous-traitants avances et acomptes vers\u00e9s": { + "account_number": "4093" + }, + "Fournisseurs Cr\u00e9ances pour emballages et mat\u00e9riels \u00e0 rendre": { + "account_number": "4094" + }, + "Fournisseurs Rabais, remises, ristournes et autres avoirs \u00e0 obtenir": { + "account_number": "4098" + }, + "account_number": "409" + } + }, + "41-Clients et comptes rattach\u00e9s (ACTIF)": { + "Clients": { + "Clients": { + "account_type": "Receivable", + "account_number": "4111" + }, + "Clients groupe": { + "account_type": "Receivable", + "account_number": "4112" + }, + "Clients, \u00c9tat et Collectivit\u00e9s publiques": { + "account_type": "Receivable", + "account_number": "4114" + }, + "Clients, organismes internationaux": { + "account_type": "Receivable", + "account_number": "4115" + }, + "Clients, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Receivable", + "account_number": "4116" + }, + "Client, retenues de garantie": { + "account_type": "Receivable", + "account_number": "4117" + }, + "Clients, d\u00e9gr\u00e8vement de taxes sur la valeur ajout\u00e9e (TVA)": { + "account_type": "Receivable", + "account_number": "4118" + }, + "account_type": "Receivable", + "account_number": "411" + }, + "Clients, effets \u00e0 recevoir en portefeuille": { + "Clients, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4121" + }, + "Clients Groupe, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4122" + }, + "\u00c9tat et Collectivit\u00e9s publiques, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4124" + }, + "Organismes Internationaux, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4125" + }, + "account_type": "Receivable", + "account_number": "412" + }, + "Clients, ch\u00e8ques, effets et autres valeurs impay\u00e9es": { + "Clients, ch\u00e8ques impay\u00e9s": { + "account_type": "Receivable", + "account_number": "4131" + }, + "Clients, effets impay\u00e9s": { + "account_type": "Receivable", + "account_number": "4132" + }, + "Clients, cartes de cr\u00e9dit impay\u00e9es": { + "account_type": "Receivable", + "account_number": "4133" + }, + "Clients, autres valeurs impay\u00e9es": { + "account_type": "Receivable", + "account_number": "4138" + }, + "account_type": "Receivable", + "account_number": "413" + }, + "Cr\u00e9ances sur cessions courantes d\u2019immobilisations": { + "Cr\u00e9ances en compte, immobilisations incorporelles": { + "account_type": "Receivable", + "account_number": "4141" + }, + "Cr\u00e9ances en compte, immobilisations corporelles": { + "account_type": "Receivable", + "account_number": "4142" + }, + "Effets \u00e0 recevoir, immobilisations incorporelles": { + "account_type": "Receivable", + "account_number": "4146" + }, + "Effets \u00e0 recevoir, immobilisations corporelles": { + "account_type": "Receivable", + "account_number": "4147" + }, + "account_type": "Receivable", + "account_number": "414" + }, + "Clients, effets escompt\u00e9s non \u00e9chus": { + "account_type": "Receivable", + "account_number": "415" + }, + "Cr\u00e9ances clients litigieuses ou douteuses": { + "Cr\u00e9ances litigieuses": { + "account_type": "Receivable", + "account_number": "4161" + }, + "Cr\u00e9ances douteuses": { + "account_type": "Receivable", + "account_number": "4162" + }, + "account_type": "Receivable", + "account_number": "416" + }, + "Clients, produits \u00e0 recevoir": { + "Clients, factures \u00e0 \u00e9tablir": { + "account_type": "Receivable", + "account_number": "4181" + }, + "Clients, int\u00e9r\u00eats courus": { + "account_type": "Receivable", + "account_number": "4186" + }, + "account_type": "Receivable", + "account_number": "418" + }, + "account_type": "Receivable" + }, + "42-Personnel (ACTIF)": { + "Personnel, avances et acomptes": { + "Personnel, avances": { + "account_number": "4211" + }, + "Personnel, acomptes": { + "account_number": "4212" + }, + "Frais avanc\u00e9s et fournitures au personnel": { + "account_number": "4213" + }, + "account_number": "421" + } + }, + "43-Organismes sociaux (ACTIF)": { + "431-S\u00e9curit\u00e9 sociale": { + "Prestations familiales": { + "account_number": "4311" + }, + "Accidents de travail": { + "account_number": "4312" + }, + "Caisse de retraite obligatoire": { + "account_number": "4313" + }, + "Caisse de retraite facultative": { + "account_number": "4314" + }, + "Autres cotisations sociales": { + "account_number": "4318" + } + }, + "432-Caisses de retraite compl\u00e9mentaire": {}, + "433-Autres organismes sociaux": { + "Mutuelle": { + "account_number": "4331" + }, + "Assurances retraite": { + "account_number": "4332" + }, + "Assurances et organismes de sant\u00e9": { + "account_number": "4333" + } + }, + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "Produits \u00e0 recevoir": { + "account_number": "4387" + } + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (ACTIF)": { + "\u00c9tat, TVA factur\u00e9e": { + "TVA factur\u00e9e sur ventes": { + "account_number": "4431" + }, + "TVA factur\u00e9e sur prestations de services": { + "account_number": "4432" + }, + "TVA factur\u00e9e sur travaux": { + "account_number": "4433" + }, + "TVA factur\u00e9e sur production livr\u00e9e \u00e0 soi-m\u00eame": { + "account_number": "4434" + }, + "TVA sur factures \u00e0 \u00e9tablir": { + "account_number": "4435" + }, + "account_number": "443" + }, + "\u00c9tat, TVA r\u00e9cup\u00e9rable": { + "TVA r\u00e9cup\u00e9rable sur immobilisations": { + "account_number": "4451" + }, + "TVA r\u00e9cup\u00e9rable sur achats": { + "account_number": "4452" + }, + "TVA r\u00e9cup\u00e9rable sur transport": { + "account_number": "4453" + }, + "TVA r\u00e9cup\u00e9rable sur services ext\u00e9rieurs et autres charges": { + "account_number": "4454" + }, + "TVA r\u00e9cup\u00e9rable sur factures non parvenues": { + "account_number": "4455" + }, + "TVA transf\u00e9r\u00e9e par d\u2019autres entit\u00e9s": { + "account_number": "4456" + }, + "account_number": "445" + }, + "\u00c9tat, charges \u00e0 payer et produits \u00e0 recevoir": { + "Charges \u00e0 payer": { + "account_number": "4486" + }, + "Produits \u00e0 recevoir": { + "account_number": "4487" + }, + "account_number": "448" + }, + "\u00c9tat, cr\u00e9ances et dettes diverses": { + "\u00c9tat, obligations cautionn\u00e9es": { + "account_number": "4491" + }, + "\u00c9tat, avances et acomptes vers\u00e9s sur imp\u00f4ts": { + "account_number": "4492" + }, + "\u00c9tat, fonds de dotation \u00e0 recevoir": { + "account_number": "4493" + }, + "\u00c9tat, subventions investissement \u00e0 recevoir": { + "account_number": "4494" + }, + "\u00c9tat, subventions d\u2019exploitation \u00e0 recevoir": { + "account_number": "4495" + }, + "\u00c9tat, subventions d\u2019\u00e9quilibre \u00e0 recevoir": { + "account_number": "4496" + }, + "\u00c9tat, avances sur subventions": { + "account_number": "4497" + }, + "\u00c9tat, fonds r\u00e9glement\u00e9s provisionn\u00e9s": { + "account_number": "4499" + }, + "account_number": "449" + } + }, + "45-Organismes internationaux (ACTIF)": { + "Op\u00e9rations avec les organismes africains": { + "account_number": "451" + }, + "Op\u00e9rations avec les autres organismes internationaux": { + "account_number": "452" + }, + "Organismes internationaux, fonds de dotation et subventions \u00e0 recevoir": { + "Organismes internationaux, fonds de dotation \u00e0 recevoir": { + "account_number": "4581" + }, + "Organismes internationaux, subventions \u00e0 recevoir": { + "account_number": "4582" + }, + "account_number": "458" + } + }, + "46-Apporteurs, associ\u00e9s et groupe (ACTIF)": { + "461-Apporteurs, op\u00e9rations sur le capital": { + "Apporteurs, capital appel\u00e9, non vers\u00e9": { + "account_number": "4613" + }, + "Apporteurs, compte d\u2019apport, op\u00e9rations de restructuration (fusion...)": { + "account_number": "4614" + }, + "Apporteurs, titres \u00e0 \u00e9changer": { + "account_number": "4618" + } + }, + "Apporteurs, restant d\u00fb sur capital appel\u00e9": { + "account_number": "467" + } + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (ACTIF)": { + "472-Cr\u00e9ances et dettes sur titres de placement": { + "Cr\u00e9ances sur cessions de titres de placement": { + "account_number": "4721" + }, + "Versements restant \u00e0 effectuer sur titres de placement non lib\u00e9r\u00e9s": { + "account_number": "4726" + } + }, + "473-Interm\u00e9diaires Op\u00e9rations faites pour compte de tiers": { + "Mandants": { + "account_number": "4731" + }, + "Mandataires": { + "account_number": "4732" + }, + "Commettants": { + "account_number": "4733" + }, + "Commissionnaires": { + "account_number": "4734" + }, + "\u00c9tat, Collectivit\u00e9s publiques, fonds global d\u2019allocation": { + "account_number": "4739" + } + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits": { + "Compte de r\u00e9partition p\u00e9riodique des produits": { + "account_number": "4747" + } + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA": { + "Compte actif": { + "account_type": "Temporary", + "account_number": "4751" + } + }, + "Charges constat\u00e9es d\u2019avance": { + "account_number": "476" + }, + "478-\u00c9carts de conversion actif": { + "Diminution des cr\u00e9ances d\u2019exploitation": { + "account_number": "4781" + }, + "Diminution des cr\u00e9ances financi\u00e8res": { + "account_number": "4782" + }, + "Augmentation des dettes d\u2019exploitation": { + "account_number": "4783" + }, + "Augmentation des dettes financi\u00e8res": { + "account_number": "4784" + }, + "Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": { + "account_number": "4786" + }, + "Diff\u00e9rences compens\u00e9es par couverture de change": { + "account_number": "4788" + } + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (ACTIF)": { + "Cr\u00e9ances sur cessions d\u2019immobilisations": { + "En compte, immobilisations incorporelles": { + "account_number": "4851" + }, + "En compte, immobilisations corporelles": { + "account_number": "4852" + }, + "Effets \u00e0 recevoir, immobilisations incorporelles": { + "account_number": "4853" + }, + "Effets \u00e0 recevoir, immobilisations corporelles": { + "account_number": "4854" + }, + "Effets escompt\u00e9s non \u00e9chus": { + "account_number": "4855" + }, + "Retenues de garantie": { + "account_number": "4857" + }, + "Factures \u00e0 \u00e9tablir": { + "account_number": "4858" + }, + "account_number": "485" + }, + "Autres cr\u00e9ances hors activit\u00e9s ordinaires (HAO)": { + "account_number": "488" + } + }, + "49-D\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme (tiers) (ACTIF)": { + "D\u00e9pr\u00e9ciations des comptes clients": { + "Cr\u00e9ances litigieuses": { + "account_number": "4911" + }, + "Cr\u00e9ances douteuses": { + "account_number": "4912" + }, + "account_number": "491" + }, + "D\u00e9pr\u00e9ciations des comptes organismes internationaux": { + "account_number": "495" + }, + "D\u00e9pr\u00e9ciations des comptes apporteurs, associ\u00e9s et groupe": { + "Associ\u00e9s, comptes courants": { + "account_number": "4962" + }, + "Associ\u00e9s, op\u00e9rations faites en commun": { + "account_number": "4963" + }, + "Groupe, comptes courants": { + "account_number": "4966" + }, + "account_number": "496" + }, + "D\u00e9pr\u00e9ciations des comptes d\u00e9biteurs divers": { + "account_number": "497" + }, + "D\u00e9pr\u00e9ciations des comptes de cr\u00e9ances HAO": { + "Cr\u00e9ances sur cessions d\u2019immobilisations": { + "account_number": "4985" + }, + "Cr\u00e9ances sur cessions de titres de placement": { + "account_number": "4986" + }, + "Autres cr\u00e9ances HAO": { + "account_number": "4988" + }, + "account_number": "498" + }, + "Provisions pour risques \u00e0 court terme": { + "Sur op\u00e9rations d\u2019exploitation": { + "account_number": "4991" + }, + "Sur op\u00e9rations financi\u00e8res": { + "account_number": "4997" + }, + "Sur op\u00e9rations HAO": { + "account_number": "4998" + }, + "account_number": "499" + } + }, + "root_type": "Asset" + }, + "4-Comptes de Tiers (PASSIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (PASSIF)": { + "Fournisseurs, dettes en compte": { + "Fournisseurs": { + "account_type": "Payable", + "account_number": "4011" + }, + "Fournisseurs groupe": { + "account_type": "Payable", + "account_number": "4012" + }, + "Fournisseurs sous-traitants": { + "account_type": "Payable", + "account_number": "4013" + }, + "Fournisseurs, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Payable", + "account_number": "4016" + }, + "Fournisseur, retenues de garantie": { + "account_type": "Payable", + "account_number": "4017" + }, + "account_type": "Payable", + "account_number": "401" + }, + "Fournisseurs, effets \u00e0 payer": { + "Fournisseurs Effets \u00e0 payer": { + "account_type": "Payable", + "account_number": "4021" + }, + "Fournisseurs Groupe, effets \u00e0 payer": { + "account_type": "Payable", + "account_number": "4022" + }, + "Fournisseurs Sous-traitants, effets \u00e0 payer": { + "account_type": "Payable", + "account_number": "4023" + }, + "account_type": "Payable", + "account_number": "402" + }, + "Fournisseurs, acquisitions courantes d\u2019immobilisations": { + "Fournisseurs Dettes en comptes, immobilisations incorporelles": { + "account_type": "Payable", + "account_number": "4041" + }, + "Fournisseurs Dettes en comptes, immobilisations corporelles": { + "account_type": "Payable", + "account_number": "4042" + }, + "Fournisseurs Effets \u00e0 payer, immobilisations incorporelles": { + "account_type": "Payable", + "account_number": "4046" + }, + "Fournisseurs Effets \u00e0 payer, immobilisations corporelles": { + "account_type": "Payable", + "account_number": "4047" + }, + "account_type": "Payable", + "account_number": "404" + }, + "Fournisseurs, factures non parvenues": { + "Fournisseurs": { + "account_type": "Stock Received But Not Billed", + "account_number": "4081" + }, + "Fournisseurs groupe": { + "account_type": "Stock Received But Not Billed", + "account_number": "4082" + }, + "Fournisseurs sous-traitants": { + "account_type": "Stock Received But Not Billed", + "account_number": "4083" + }, + "Fournisseurs, int\u00e9r\u00eats courus": { + "account_type": "Stock Received But Not Billed", + "account_number": "4086" + }, + "account_type": "Stock Received But Not Billed", + "account_number": "408" + }, + "account_type": "Payable" + }, + "41-Clients et comptes rattach\u00e9s (PASSIF)": { + "Clients cr\u00e9diteurs": { + "Clients, avances et acomptes re\u00e7us": { + "account_number": "4191" + }, + "Clients groupe, avances et acomptes re\u00e7us": { + "account_number": "4192" + }, + "Clients, dettes pour emballages et mat\u00e9riels consign\u00e9s": { + "account_number": "4194" + }, + "Clients, rabais, remises, ristournes et autres avoirs \u00e0 accorder": { + "account_number": "4198" + }, + "account_number": "419" + } + }, + "42-Personnel (PASSIF)": { + "Personnel, r\u00e9mun\u00e9rations dues": { + "account_number": "422" + }, + "Personnel, oppositions, saisies-arr\u00eats": { + "Personnel, oppositions": { + "account_number": "4231" + }, + "Personnel, saisies-arr\u00eats": { + "account_number": "4232" + }, + "Personnel, avis \u00e0 tiers d\u00e9tenteur": { + "account_number": "4233" + }, + "account_number": "423" + }, + "Personnel, \u0153uvres sociales internes": { + "Assistance m\u00e9dicale": { + "account_number": "4241" + }, + "Allocations familiales": { + "account_number": "4242" + }, + "Organismes sociaux rattach\u00e9s \u00e0 l\u2019entit\u00e9": { + "account_number": "4245" + }, + "Autres \u0153uvres sociales internes": { + "account_number": "4248" + }, + "account_number": "424" + }, + "Repr\u00e9sentants du personnel": { + "D\u00e9l\u00e9gu\u00e9s du personnel": { + "account_number": "4251" + }, + "Syndicats et Comit\u00e9s d\u2019entreprises, d\u2019\u00c9tablissement": { + "account_number": "4252" + }, + "Autres repr\u00e9sentants du personnel": { + "account_number": "4258" + }, + "account_number": "425" + }, + "Personnel, participation aux b\u00e9n\u00e9fices et au capital": { + "Participation aux b\u00e9n\u00e9fices": { + "account_number": "4261" + }, + "Participation au capital": { + "account_number": "4264" + }, + "account_number": "426" + }, + "Personnel d\u00e9p\u00f4ts": { + "account_number": "427" + }, + "Personnel, charges \u00e0 payer et produits \u00e0 recevoir": { + "Dettes provisionn\u00e9es pour cong\u00e9s \u00e0 payer": { + "account_number": "4281" + }, + "Autres charges \u00e0 payer": { + "account_number": "4286" + }, + "Produits \u00e0 recevoir": { + "account_number": "4287" + }, + "account_number": "428" + } + }, + "43-Organismes sociaux (PASSIF)": { + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "Charges sociales sur gratifications \u00e0 payer": { + "account_number": "4381" + }, + "Charges sociales sur cong\u00e9s \u00e0 payer": { + "account_number": "4382" + }, + "Autres charges \u00e0 payer": { + "account_number": "4386" + } + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (PASSIF)": { + "\u00c9tat, imp\u00f4t sur les b\u00e9n\u00e9fices": { + "account_number": "441" + }, + "\u00c9tat, autres imp\u00f4ts et taxes": { + "Imp\u00f4ts et taxes d\u2019\u00c9tat": { + "account_number": "4421" + }, + "Imp\u00f4ts et taxes pour les collectivit\u00e9s publiques": { + "account_number": "4422" + }, + "Imp\u00f4ts et taxes recouvrables sur des obligataires": { + "account_number": "4423" + }, + "Imp\u00f4ts et taxes recouvrables sur des associ\u00e9s": { + "account_number": "4424" + }, + "Droits de douane": { + "account_number": "4426" + }, + "Autres imp\u00f4ts et taxes": { + "account_number": "4428" + }, + "account_number": "442" + }, + "\u00c9tat, TVA due ou cr\u00e9dit de TVA": { + "\u00c9tat, TVA due": { + "account_number": "4441" + }, + "\u00c9tat, cr\u00e9dit de TVA \u00e0 reporter": { + "account_number": "4449" + }, + "account_number": "444" + }, + "\u00c9tat, autres taxes sur le chiffre d\u2019affaires": { + "account_number": "446" + }, + "\u00c9tat, imp\u00f4ts retenus \u00e0 la source": { + "Imp\u00f4t G\u00e9n\u00e9ral sur le revenu": { + "account_number": "4471" + }, + "Imp\u00f4ts sur salaires": { + "account_number": "4472" + }, + "Contribution nationale": { + "account_number": "4473" + }, + "Contribution nationale de solidarit\u00e9": { + "account_number": "4474" + }, + "Autres imp\u00f4ts et contributions": { + "account_number": "4478" + }, + "account_number": "447" + } + }, + "46-Apporteurs, associ\u00e9s et groupe (PASSIF)": { + "461-Apporteurs, op\u00e9rations sur le capital (PASSIF)": { + "Apporteurs, apports en nature": { + "account_number": "4611" + }, + "Apporteurs, apports en num\u00e9raire": { + "account_number": "4612" + }, + "Apporteurs, versements re\u00e7us sur augmentation de capital": { + "account_number": "4615" + }, + "Apporteurs, versements anticip\u00e9s": { + "account_number": "4616" + }, + "Apporteurs d\u00e9faillants": { + "account_number": "4617" + }, + "Apporteurs, capital \u00e0 rembourser": { + "account_number": "4619" + } + }, + "462-Associ\u00e9s, comptes courants": { + "Principal": { + "account_number": "4621" + }, + "Int\u00e9r\u00eats courus": { + "account_number": "4626" + } + }, + "463-Associ\u00e9s, op\u00e9rations faites en commun et GIE": { + "Op\u00e9rations courantes": { + "account_number": "4631" + }, + "Int\u00e9r\u00eats courus": { + "account_number": "4636" + } + }, + "Associ\u00e9s, dividendes \u00e0 payer": { + "account_number": "465" + }, + "Groupe, comptes courants": { + "account_number": "466" + } + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (PASSIF)": { + "471-D\u00e9biteurs et cr\u00e9diteurs divers": { + "D\u00e9biteurs divers": { + "account_number": "4711" + }, + "Cr\u00e9diteurs divers": { + "account_number": "4712" + }, + "Obligataires": { + "account_number": "4713" + }, + "R\u00e9mun\u00e9rations d\u2019administrateurs": { + "account_number": "4715" + }, + "Compte d\u2019affacturage": { + "account_number": "4716" + }, + "D\u00e9biteurs divers retenues de garantie": { + "account_number": "4717" + }, + "Apport, compte de fusion et op\u00e9rations assimil\u00e9es": { + "account_number": "4718" + }, + "Bons de souscription d\u2019actions et d\u2019obligations": { + "account_number": "4719" + } + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits (PASSIF)": { + "Compte de r\u00e9partition p\u00e9riodique des charges": { + "account_number": "4746" + } + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA (PASSIF)": { + "Compte passif": { + "account_number": "4752" + } + }, + "Produits constat\u00e9s d\u2019avance": { + "account_number": "477" + }, + "479-\u00c9carts de conversion passif": { + "Augmentation des cr\u00e9ances d\u2019exploitation": { + "account_number": "4791" + }, + "Augmentation des cr\u00e9ances financi\u00e8res": { + "account_number": "4792" + }, + "Diminution des dettes d\u2019exploitation": { + "account_number": "4793" + }, + "Diminution des dettes financi\u00e8res": { + "account_number": "4794" + }, + "Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": { + "account_number": "4797" + }, + "Diff\u00e9rences compens\u00e9es par couverture de change": { + "account_number": "4798" + } + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (HAO) (PASSIF)": { + "Fournisseurs d\u2019investissements": { + "Immobilisations incorporelles": { + "account_number": "4811" + }, + "Immobilisations corporelles": { + "account_number": "4812" + }, + "Versements restant \u00e0 effectuer sur titres de participation et titres immobilis\u00e9s non lib\u00e9r\u00e9s": { + "account_number": "4813" + }, + "R\u00e9serve de propri\u00e9t\u00e9": { + "account_number": "4816" + }, + "Retenues de garantie": { + "account_number": "4817" + }, + "Factures non parvenues": { + "account_number": "4818" + }, + "account_number": "481" + }, + "Fournisseurs d\u2019investissements, effets \u00e0 payer": { + "Immobilisations incorporelles": { + "account_number": "4821" + }, + "Immobilisations corporelles": { + "account_number": "4822" + }, + "account_number": "482" + }, + "Autres dettes hors activit\u00e9s ordinaires (HAO)": { + "Produits": { + "account_number": "4887" + }, + "account_number": "484" + } + }, + "root_type": "Liability" + }, + "Comptes de tr\u00e9sorerie": { + "Titres de placement": { + "Titres du tr\u00e9sor et bons de caisse \u00e0 court terme": { + "Titres du Tr\u00e9sor \u00e0 court terme": { + "account_number": "5011" + }, + "Titres d\u2019organismes financiers": { + "account_number": "5012" + }, + "Bons de caisse \u00e0 court terme": { + "account_number": "5013" + }, + "Frais d\u2019acquisition des titres de tr\u00e9sor et bons de caisse": { + "account_number": "5016" + }, + "account_number": "501" + }, + "Actions": { + "Actions ou parts propres": { + "account_number": "5021" + }, + "Actions cot\u00e9es": { + "account_number": "5022" + }, + "Actions non cot\u00e9es": { + "account_number": "5023" + }, + "Actions d\u00e9membr\u00e9es (certificats d\u2019investissement, droits de vote)": { + "account_number": "5024" + }, + "Autres actions": { + "account_number": "5025" + }, + "Frais d\u2019acquisition des actions": { + "account_number": "5026" + }, + "account_number": "502" + }, + "Obligations": { + "Obligations \u00e9mises par la soci\u00e9t\u00e9 et rachet\u00e9es par elle": { + "account_number": "5031" + }, + "Obligations cot\u00e9es": { + "account_number": "5032" + }, + "Obligations non cot\u00e9es": { + "account_number": "5033" + }, + "Autres obligations": { + "account_number": "5035" + }, + "Frais d\u2019acquisition des obligations": { + "account_number": "5036" + }, + "account_number": "503" + }, + "Bons de souscription": { + "Bons de souscription d\u2019actions": { + "account_number": "5042" + }, + "Bons de souscription d\u2019obligations": { + "account_number": "5043" + }, + "account_number": "504" + }, + "Titres n\u00e9gociables hors r\u00e9gion": { + "account_number": "505" + }, + "Int\u00e9r\u00eats courus": { + "Titres du Tr\u00e9sor et bons de caisse \u00e0 court terme": { + "account_number": "5061" + }, + "Actions": { + "account_number": "5062" + }, + "Obligations": { + "account_number": "5063" + }, + "account_number": "506" + }, + "Autres titres de placement et cr\u00e9ances assimil\u00e9es": { + "account_number": "508" + }, + "account_number": "50" + }, + "Valeurs \u00e0 encaisser": { + "Effets \u00e0 encaisser": { + "account_number": "511" + }, + "Effets \u00e0 l\u2019encaissement": { + "account_number": "512" + }, + "Ch\u00e8ques \u00e0 encaisser": { + "account_number": "513" + }, + "Ch\u00e8ques \u00e0 l\u2019encaissement": { + "account_number": "514" + }, + "Cartes de cr\u00e9dit \u00e0 encaisser": { + "account_number": "515" + }, + "Autres valeurs \u00e0 l\u2019encaissement": { + "Warrants": { + "account_number": "5181" + }, + "Billets de fonds": { + "account_number": "5182" + }, + "Ch\u00e8ques de voyage": { + "account_number": "5185" + }, + "Coupons \u00e9chus": { + "account_number": "5186" + }, + "Int\u00e9r\u00eats \u00e9chus des obligations": { + "account_number": "5187" + }, + "account_number": "518" + }, + "account_number": "51" + }, + "Banques": { + "Banques locales": { + "Banques en monnaie nationale": { + "account_type": "Bank", + "account_number": "5211" + }, + "Banques en devises": { + "account_type": "Bank", + "account_number": "5215" + }, + "account_type": "Bank", + "account_number": "521" + }, + "Banques autres \u00c9tats r\u00e9gion": { + "account_number": "522" + }, + "Banques autres \u00c9tats zone mon\u00e9taire": { + "account_number": "523" + }, + "Banques hors zone mon\u00e9taire": { + "account_number": "524" + }, + "Banques d\u00e9p\u00f4t \u00e0 terme": { + "account_number": "525" + }, + "Banques, int\u00e9r\u00eats courus": { + "Banque, int\u00e9r\u00eats courus, charges \u00e0 payer": { + "account_number": "5261" + }, + "Banque, int\u00e9r\u00eats courus, produits \u00e0 recevoir": { + "account_number": "5267" + }, + "account_number": "526" + }, + "account_number": "52" + }, + "\u00c9tablissements financiers et assimil\u00e9s": { + "Ch\u00e8ques postaux": { + "account_number": "531" + }, + "Tr\u00e9sor": { + "account_number": "532" + }, + "Soci\u00e9t\u00e9s de gestion et d\u2019interm\u00e9diation (SGI)": { + "account_number": "533" + }, + "\u00c9tablissements financiers, int\u00e9r\u00eats courus": { + "account_number": "536" + }, + "Autres organismes financiers": { + "account_number": "538" + }, + "account_number": "53" + }, + "Instruments de tr\u00e9sorerie": { + "Options de taux d\u2019int\u00e9r\u00eat": { + "account_number": "541" + }, + "Options de taux de change": { + "account_number": "542" + }, + "Options de taux boursiers": { + "account_number": "543" + }, + "Instruments de march\u00e9s \u00e0 terme": { + "account_number": "544" + }, + "Avoirs d\u2019or et autres m\u00e9taux pr\u00e9cieux": { + "account_number": "545" + }, + "account_number": "54" + }, + "Instruments de monnaie \u00e9lectronique": { + "Monnaie \u00e9lectronique carte carburant": { + "account_number": "551" + }, + "Monnaie \u00e9lectronique t\u00e9l\u00e9phone portable": { + "account_number": "552" + }, + "Monnaie \u00e9lectronique carte p\u00e9age": { + "account_number": "553" + }, + "Porte-monnaie \u00e9lectronique": { + "account_number": "554" + }, + "Autres instruments de monnaies \u00e9lectroniques": { + "account_number": "558" + }, + "account_number": "55" + }, + "Banques, cr\u00e9dits de tr\u00e9sorerie et d\u2019escompte": { + "Cr\u00e9dits de tr\u00e9sorerie": { + "account_number": "561" + }, + "Escompte de cr\u00e9dits de campagne": { + "account_number": "564" + }, + "Escompte de cr\u00e9dits ordinaires": { + "account_number": "565" + }, + "Banques, cr\u00e9dits de tr\u00e9sorerie, int\u00e9r\u00eats courus": { + "account_number": "566" + }, + "account_number": "56" + }, + "Caisse": { + "Caisse si\u00e8ge social": { + "Caisse en monnaie nationale": { + "account_number": "5711" + }, + "Caisse en devises": { + "account_number": "5712" + }, + "account_number": "571" + }, + "Caisse succursale A": { + "En monnaie nationale": { + "account_number": "5721" + }, + "En devises": { + "account_number": "5722" + }, + "account_number": "572" + }, + "Caisse succursale B": { + "En monnaie nationale": { + "account_number": "5731" + }, + "En devises": { + "account_number": "5732" + }, + "account_number": "573" + }, + "account_number": "57" + }, + "R\u00e9gies d\u2019avances, accr\u00e9ditifs et virements internes": { + "R\u00e9gies d\u2019avance": { + "account_number": "581" + }, + "Accr\u00e9ditifs": { + "account_number": "582" + }, + "Virements de fonds": { + "account_number": "585" + }, + "Autres virements internes": { + "account_number": "588" + }, + "account_number": "58" + }, + "D\u00e9pr\u00e9ciations et provisions pour risque \u00e0 court terme": { + "D\u00e9pr\u00e9ciations des titres de placement": { + "account_number": "590" + }, + "D\u00e9pr\u00e9ciations des titres et valeurs \u00e0 encaisser": { + "account_number": "591" + }, + "D\u00e9pr\u00e9ciations des comptes banques": { + "account_number": "592" + }, + "D\u00e9pr\u00e9ciations des comptes \u00e9tablissements financiers et assimil\u00e9s": { + "account_number": "593" + }, + "D\u00e9pr\u00e9ciations des comptes d\u2019instruments de tr\u00e9sorerie": { + "account_number": "594" + }, + "Provisions pour risque \u00e0 court terme \u00e0 caract\u00e8re financier": { + "account_number": "599" + }, + "account_number": "59" + }, + "root_type": "Asset", + "account_number": "5" + }, + "Comptes de charges des activit\u00e9s ordinaires": { + "Achats et variations de stocks": { + "Achats de marchandises": { + "Dans la R\u00e9gion": { + "account_number": "6011" + }, + "Hors R\u00e9gion": { + "account_number": "6012" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "6013" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "6014" + }, + "Frais sur achats": { + "account_number": "6015" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6019" + }, + "account_number": "601" + }, + "Achats de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "Dans la R\u00e9gion": { + "account_number": "6021" + }, + "Hors R\u00e9gion": { + "account_number": "6022" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "6023" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "6024" + }, + "Frais sur achats": { + "account_number": "6025" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6029" + }, + "account_number": "602" + }, + "Variations des stocks de biens achet\u00e9s": { + "Variations des stocks de marchandises": { + "account_number": "6031" + }, + "Variations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "account_number": "6032" + }, + "Variations des stocks d\u2019autres approvisionnements": { + "account_number": "6033" + }, + "account_number": "603" + }, + "Achats stock\u00e9s de mati\u00e8res et fournitures consommables": { + "Mati\u00e8res consommables": { + "account_number": "6041" + }, + "Mati\u00e8res combustibles": { + "account_number": "6042" + }, + "Produits d\u2019entretien": { + "account_number": "6043" + }, + "Fournitures d\u2019atelier et d\u2019usine": { + "account_number": "6044" + }, + "Frais sur achat": { + "account_number": "6045" + }, + "Fournitures de magasin": { + "account_number": "6046" + }, + "Fournitures de bureau": { + "account_number": "6047" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6049" + }, + "account_number": "604" + }, + "Autres achats": { + "Fournitures non stockables Eau": { + "account_number": "6051" + }, + "Fournitures non stockables \u00c9lectricit\u00e9": { + "account_number": "6052" + }, + "Fournitures non stockables Autres \u00e9nergies": { + "account_number": "6053" + }, + "Fournitures d\u2019entretien non stockables": { + "account_number": "6054" + }, + "Fournitures de bureau non stockables": { + "account_number": "6055" + }, + "Achats de petit mat\u00e9riel et outillage": { + "account_number": "6056" + }, + "Achats d\u2019\u00e9tudes et prestations de services": { + "account_number": "6057" + }, + "Achats de travaux, mat\u00e9riels et \u00e9quipements": { + "account_number": "6058" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6059" + }, + "account_number": "605" + }, + "Achats d\u2019emballages": { + "Emballages perdus": { + "account_number": "6081" + }, + "Emballages r\u00e9cup\u00e9rables non identifiables": { + "account_number": "6082" + }, + "Emballages \u00e0 usage mixte": { + "account_number": "6083" + }, + "Frais sur achats": { + "account_number": "6085" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6089" + }, + "account_number": "608" + }, + "account_number": "60" + }, + "Transports": { + "Transports sur ventes": { + "account_number": "612" + }, + "Transports pour le compte de tiers": { + "account_number": "613" + }, + "Transports du personnel": { + "account_number": "614" + }, + "Transports de plis": { + "account_number": "616" + }, + "Autres frais de transport": { + "Voyages et d\u00e9placements": { + "account_number": "6181" + }, + "Transports entre \u00e9tablissements ou chantiers": { + "account_number": "6182" + }, + "Transports administratifs": { + "account_number": "6183" + }, + "account_number": "618" + }, + "account_number": "61" + }, + "Services ext\u00e9rieurs": { + "Sous-traitance g\u00e9n\u00e9rale": { + "account_number": "621" + }, + "Locations, charges locatives": { + "Locations de terrains": { + "account_number": "6221" + }, + "Locations de b\u00e2timents": { + "account_number": "6222" + }, + "Locations de mat\u00e9riels et outillages": { + "account_number": "6223" + }, + "Malis sur emballages": { + "account_number": "6224" + }, + "Locations d\u2019emballages": { + "account_number": "6225" + }, + "Fermages et loyers du foncier": { + "account_number": "6226" + }, + "Locations et charges locatives diverses": { + "account_number": "6228" + }, + "account_number": "622" + }, + "Redevances de location acquisition": { + "Cr\u00e9dit-bail immobilier": { + "account_number": "6232" + }, + "Cr\u00e9dit-bail mobilier": { + "account_number": "6233" + }, + "Location-vente": { + "account_number": "6234" + }, + "Autres contrats de location acquisition": { + "account_number": "6238" + }, + "account_number": "623" + }, + "Entretien, r\u00e9parations, remise en \u00e9tat et maintenance": { + "Entretien et r\u00e9parations des biens immobiliers": { + "account_number": "6241" + }, + "Entretien et r\u00e9parations des biens mobiliers": { + "account_number": "6242" + }, + "Maintenance": { + "account_number": "6243" + }, + "Charges de d\u00e9mant\u00e8lement et remise en \u00e9tat": { + "account_number": "6244" + }, + "Autres entretiens et r\u00e9parations": { + "account_number": "6248" + }, + "account_number": "624" + }, + "Primes d\u2019assurance": { + "Assurances multirisques": { + "account_number": "6251" + }, + "Assurances mat\u00e9riel de transport": { + "account_number": "6252" + }, + "Assurances risques d\u2019exploitation": { + "account_number": "6253" + }, + "Assurances responsabilit\u00e9 du producteur": { + "account_number": "6254" + }, + "Assurances insolvabilit\u00e9 clients": { + "account_number": "6255" + }, + "Assurances transport sur ventes": { + "account_number": "6257" + }, + "Autres primes d\u2019assurances": { + "account_number": "6258" + }, + "account_number": "625" + }, + "\u00c9tudes, recherches et documentation": { + "\u00c9tudes et recherches": { + "account_number": "6261" + }, + "Documentation g\u00e9n\u00e9rale": { + "account_number": "6265" + }, + "Documentation technique": { + "account_number": "6266" + }, + "account_number": "626" + }, + "Publicit\u00e9, publications, relations publiques": { + "Annonces, insertions": { + "account_number": "6271" + }, + "Catalogues, imprim\u00e9s publicitaires": { + "account_number": "6272" + }, + "\u00c9chantillons": { + "account_number": "6273" + }, + "Foires et expositions": { + "account_number": "6274" + }, + "Publications": { + "account_number": "6275" + }, + "Cadeaux \u00e0 la client\u00e8le": { + "account_number": "6276" + }, + "Frais de colloques, s\u00e9minaires, conf\u00e9rences": { + "account_number": "6277" + }, + "Autres charges de publicit\u00e9 et relations publiques": { + "account_number": "6278" + }, + "account_number": "627" + }, + "Frais de t\u00e9l\u00e9communications": { + "Frais de t\u00e9l\u00e9phone": { + "account_number": "6281" + }, + "Frais de t\u00e9lex": { + "account_number": "6282" + }, + "Frais de t\u00e9l\u00e9copie": { + "account_number": "6283" + }, + "Autres frais de t\u00e9l\u00e9communications": { + "account_number": "6288" + }, + "account_number": "628" + }, + "account_number": "62" + }, + "Autres services ext\u00e9rieurs": { + "Frais bancaires": { + "Frais sur titres (vente, garde)": { + "account_number": "6311" + }, + "Frais sur effets": { + "account_number": "6312" + }, + "Location de coffres": { + "account_number": "6313" + }, + "Commissions d\u2019affacturage": { + "account_number": "6314" + }, + "Commissions sur cartes de cr\u00e9dit": { + "account_number": "6315" + }, + "Frais d\u2019\u00e9mission d\u2019emprunts": { + "account_number": "6316" + }, + "Frais sur instruments monnaie \u00e9lectronique": { + "account_number": "6317" + }, + "Autres frais bancaires": { + "account_number": "6318" + }, + "account_number": "631" + }, + "R\u00e9mun\u00e9rations d\u2019interm\u00e9diaires et de conseils": { + "Commissions et courtages sur ventes": { + "account_number": "6322" + }, + "Honoraires des professions r\u00e9glement\u00e9es": { + "account_number": "6324" + }, + "Frais d\u2019actes et de contentieux": { + "account_number": "6325" + }, + "R\u00e9mun\u00e9rations d\u2019affacturage": { + "account_number": "6326" + }, + "R\u00e9mun\u00e9rations des autres prestataires de services": { + "account_number": "6327" + }, + "Divers frais": { + "account_number": "6328" + }, + "account_number": "632" + }, + "Frais de formation du personnel": { + "account_number": "633" + }, + "Redevances pour brevets, licences, logiciels, concessions et droits et valeurs similaires": { + "Redevances pour brevets, licences": { + "account_number": "6342" + }, + "Redevances pour logiciels": { + "account_number": "6343" + }, + "Redevances pour marques": { + "account_number": "6344" + }, + "Redevances pour sites internet": { + "account_number": "6345" + }, + "Redevances pour concessions, droits et valeurs similaires": { + "account_number": "6346" + }, + "account_number": "634" + }, + "Cotisations": { + "Cotisations": { + "account_number": "6351" + }, + "Concours divers": { + "account_number": "6358" + }, + "account_number": "635" + }, + "R\u00e9mun\u00e9rations de personnel ext\u00e9rieur \u00e0 l\u2019entit\u00e9": { + "Personnel int\u00e9rimaire": { + "account_number": "6371" + }, + "Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": { + "account_number": "6372" + }, + "account_number": "637" + }, + "Autres charges externes": { + "Frais de recrutement du personnel": { + "account_number": "6381" + }, + "Frais de d\u00e9m\u00e9nagement": { + "account_number": "6382" + }, + "R\u00e9ceptions": { + "account_number": "6383" + }, + "Missions": { + "account_number": "6384" + }, + "Charges de copropri\u00e9t\u00e9": { + "account_number": "6385" + }, + "account_number": "638" + }, + "account_number": "63" + }, + "Imp\u00f4ts et taxes": { + "Imp\u00f4ts et taxes directs": { + "Imp\u00f4ts fonciers et taxes annexes": { + "account_number": "6411" + }, + "Patentes, licences et taxes annexes": { + "account_number": "6412" + }, + "Taxes sur appointements et salaires": { + "account_number": "6413" + }, + "Taxes d\u2019apprentissage": { + "account_number": "6414" + }, + "Formation professionnelle continue": { + "account_number": "6415" + }, + "Autres imp\u00f4ts et taxes directs": { + "account_number": "6418" + }, + "account_number": "641" + }, + "Imp\u00f4ts et taxes indirects": { + "account_number": "645" + }, + "Droits d\u2019enregistrement": { + "Droits de mutation": { + "account_number": "6461" + }, + "Droits de timbre": { + "account_number": "6462" + }, + "Taxes sur les v\u00e9hicules de soci\u00e9t\u00e9": { + "account_number": "6463" + }, + "Vignettes": { + "account_number": "6464" + }, + "Autres droits": { + "account_number": "6468" + }, + "account_number": "646" + }, + "P\u00e9nalit\u00e9s, amendes fiscales": { + "P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts directs": { + "account_number": "6471" + }, + "P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts indirects": { + "account_number": "6472" + }, + "P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts directs": { + "account_number": "6473" + }, + "P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts indirects": { + "account_number": "6474" + }, + "Autres p\u00e9nalit\u00e9s et amendes fiscales": { + "account_number": "6478" + }, + "account_number": "647" + }, + "Autres imp\u00f4ts et taxes": { + "account_number": "648" + }, + "account_number": "64" + }, + "Autres charges": { + "Pertes sur cr\u00e9ances clients et autres d\u00e9biteurs": { + "Clients": { + "account_number": "6511" + }, + "Autres d\u00e9biteurs": { + "account_number": "6515" + }, + "account_number": "651" + }, + "Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "Quote-part transf\u00e9r\u00e9e de b\u00e9n\u00e9fices (comptabilit\u00e9 du g\u00e9rant)": { + "account_number": "6521" + }, + "Pertes imput\u00e9es par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": { + "account_number": "6525" + }, + "account_number": "652" + }, + "Valeurs comptables des cessions courantes d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "6541" + }, + "Immobilisations corporelles": { + "account_number": "6542" + }, + "account_number": "654" + }, + "Perte de change sur cr\u00e9ances et dettes commerciale": { + "account_number": "656" + }, + "P\u00e9nalit\u00e9s et amendes p\u00e9nales": { + "account_number": "657" + }, + "Charges diverses": { + "Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": { + "account_number": "6581" + }, + "Dons": { + "account_number": "6582" + }, + "M\u00e9c\u00e9nat": { + "account_number": "6583" + }, + "Autres charges diverses": { + "account_number": "6588" + }, + "account_number": "658" + }, + "Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "Sur risques \u00e0 court terme": { + "account_number": "6591" + }, + "Sur stocks": { + "account_number": "6593" + }, + "Sur cr\u00e9ances": { + "account_number": "6594" + }, + "Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme": { + "account_number": "6598" + }, + "account_number": "659" + }, + "account_number": "65" + }, + "Charges de personnel": { + "R\u00e9mun\u00e9rations directes vers\u00e9es au personnel national": { + "Appointements salaires et commissions": { + "account_number": "6611" + }, + "Primes et gratifications": { + "account_number": "6612" + }, + "Cong\u00e9s pay\u00e9s": { + "account_number": "6613" + }, + "Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": { + "account_number": "6614" + }, + "Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": { + "account_number": "6615" + }, + "Suppl\u00e9ment familial": { + "account_number": "6616" + }, + "Avantages en nature": { + "account_number": "6617" + }, + "Autres r\u00e9mun\u00e9rations directes": { + "account_number": "6618" + }, + "account_number": "661" + }, + "R\u00e9mun\u00e9rations directes vers\u00e9es au personnel non national": { + "Appointements salaires et commissions": { + "account_number": "6621" + }, + "Primes et gratifications": { + "account_number": "6622" + }, + "Cong\u00e9s pay\u00e9s": { + "account_number": "6623" + }, + "Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": { + "account_number": "6624" + }, + "Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": { + "account_number": "6625" + }, + "Suppl\u00e9ment familial": { + "account_number": "6626" + }, + "Avantages en nature": { + "account_number": "6627" + }, + "Autres r\u00e9mun\u00e9rations directes": { + "account_number": "6628" + }, + "account_number": "662" + }, + "Indemnit\u00e9s forfaitaires vers\u00e9es au personnel": { + "Indemnit\u00e9s de logement": { + "account_number": "6631" + }, + "Indemnit\u00e9s de repr\u00e9sentation": { + "account_number": "6632" + }, + "Indemnit\u00e9s d\u2019expatriation": { + "account_number": "6633" + }, + "Indemnit\u00e9s de transport": { + "account_number": "6634" + }, + "Autres indemnit\u00e9s et avantages divers": { + "account_number": "6638" + }, + "account_number": "663" + }, + "Charges sociales": { + "Charges sociales sur r\u00e9mun\u00e9ration du personnel national": { + "account_number": "6641" + }, + "Charges sociales sur r\u00e9mun\u00e9ration du personnel non national": { + "account_number": "6642" + }, + "account_number": "664" + }, + "R\u00e9mun\u00e9rations et charges sociales de l\u2019exploitant individuel": { + "R\u00e9mun\u00e9ration du travail de l\u2019exploitant": { + "account_number": "6661" + }, + "Charges sociales": { + "account_number": "6662" + }, + "account_number": "666" + }, + "R\u00e9mun\u00e9ration transf\u00e9r\u00e9e de personnel ext\u00e9rieur": { + "Personnel int\u00e9rimaire": { + "account_number": "6671" + }, + "Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": { + "account_number": "6672" + }, + "account_number": "667" + }, + "Autres charges sociales": { + "Versements aux syndicats et comit\u00e9s d\u2019entreprise, d\u2019\u00e9tablissement": { + "account_number": "6681" + }, + "Versements aux comit\u00e9s d\u2019hygi\u00e8ne et de s\u00e9curit\u00e9": { + "account_number": "6682" + }, + "Versements et contributions aux autres \u0153uvres sociales": { + "account_number": "6683" + }, + "M\u00e9decine du travail et pharmacie": { + "account_number": "6684" + }, + "Assurances et organismes de sant\u00e9": { + "account_number": "6685" + }, + "Assurances retraite et fonds de pension": { + "account_number": "6686" + }, + "Majorations et p\u00e9nalit\u00e9s sociales": { + "account_number": "6687" + }, + "Charges sociales diverses": { + "account_number": "6688" + }, + "account_number": "668" + }, + "account_number": "66" + }, + "Frais financiers et charges assimil\u00e9es": { + "Int\u00e9r\u00eats des emprunts": { + "Emprunts obligataires": { + "account_number": "6711" + }, + "Emprunts aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": { + "account_number": "6712" + }, + "Dettes li\u00e9es \u00e0 des participations": { + "account_number": "6713" + }, + "Primes de remboursement des obligations": { + "account_number": "6714" + }, + "account_number": "671" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition": { + "Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail immobilier": { + "account_number": "6722" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail mobilier": { + "account_number": "6723" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition / location-vente": { + "account_number": "6724" + }, + "Int\u00e9r\u00eats dans loyers des autres locations acquisition": { + "account_number": "6728" + }, + "account_number": "672" + }, + "Escomptes accord\u00e9s": { + "account_number": "673" + }, + "Autres int\u00e9r\u00eats": { + "Avances re\u00e7ues et d\u00e9p\u00f4ts cr\u00e9diteurs": { + "account_number": "6741" + }, + "Comptes courants bloqu\u00e9s": { + "account_number": "6742" + }, + "Int\u00e9r\u00eats sur obligations cautionn\u00e9es": { + "account_number": "6743" + }, + "Int\u00e9r\u00eats sur dettes commerciales": { + "account_number": "6744" + }, + "Int\u00e9r\u00eats bancaires et sur op\u00e9rations de financement (escompte...)": { + "account_number": "6745" + }, + "Int\u00e9r\u00eats sur dettes diverses": { + "account_number": "6748" + }, + "account_number": "674" + }, + "Escomptes des effets de commerce": { + "account_number": "675" + }, + "Pertes de change financi\u00e8res": { + "account_number": "676" + }, + "Pertes sur titres de placement": { + "Pertes sur cessions de titres de placement": { + "account_number": "6771" + }, + "Mali provenant d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": { + "account_number": "6772" + }, + "account_number": "677" + }, + "Pertes et charges sur risques financiers": { + "Sur rentes viag\u00e8res": { + "account_number": "6781" + }, + "Sur op\u00e9rations financi\u00e8res": { + "account_number": "6782" + }, + "Sur instruments de tr\u00e9sorerie": { + "account_number": "6784" + }, + "account_number": "678" + }, + "Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "Sur risques financiers": { + "account_number": "6791" + }, + "Sur titres de placement": { + "account_number": "6795" + }, + "Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "account_number": "6798" + }, + "account_number": "679" + }, + "account_number": "67" + }, + "Dotations aux amortissements": { + "Dotations aux amortissements d\u2019exploitation": { + "Dotations aux amortissements des immobilisations incorporelles": { + "account_number": "6812" + }, + "Dotations aux amortissements des immobilisations corporelles": { + "account_number": "6813" + }, + "account_number": "681" + }, + "account_number": "68" + }, + "Dotations aux provisions et aux d\u00e9pr\u00e9ciations": { + "Dotations aux provisions et aux d\u00e9pr\u00e9ciations d\u2019exploitation": { + "Dotations aux provisions pour risques et charges": { + "account_number": "6911" + }, + "Dotations aux d\u00e9pr\u00e9ciations des immobilisations incorporelles": { + "account_number": "6913" + }, + "Dotations aux d\u00e9pr\u00e9ciations des immobilisations corporelles": { + "account_number": "6914" + }, + "account_number": "691" + }, + "Dotations aux provisions et aux d\u00e9pr\u00e9ciations financi\u00e8res": { + "Dotations aux provisions pour risques et charges": { + "account_number": "6971" + }, + "Dotations aux d\u00e9pr\u00e9ciations des immobilisations financi\u00e8res": { + "account_number": "6972" + }, + "account_number": "697" + }, + "account_number": "69" + }, + "root_type": "Expense", + "account_number": "6" + }, + "Comptes de produits des activit\u00e9s ordinaires": { + "Ventes": { + "Ventes de marchandises": { + "Dans la R\u00e9gion": { + "account_number": "7011" + }, + "Hors R\u00e9gion": { + "account_number": "7012" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7013" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7014" + }, + "Sur internet": { + "account_number": "7015" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7019" + }, + "account_number": "701" + }, + "Ventes de produits finis": { + "Dans la R\u00e9gion": { + "account_number": "7021" + }, + "Hors R\u00e9gion": { + "account_number": "7022" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7023" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7024" + }, + "Sur internet": { + "account_number": "7025" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7029" + }, + "account_number": "702" + }, + "Ventes de produits interm\u00e9diaires": { + "Dans la R\u00e9gion": { + "account_number": "7031" + }, + "Hors R\u00e9gion": { + "account_number": "7032" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7033" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7034" + }, + "Sur internet": { + "account_number": "7035" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7039" + }, + "account_number": "703" + }, + "Ventes de produits r\u00e9siduels": { + "Dans la R\u00e9gion": { + "account_number": "7041" + }, + "Hors R\u00e9gion": { + "account_number": "7042" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7043" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7044" + }, + "Sur internet": { + "account_number": "7045" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7049" + }, + "account_number": "704" + }, + "Travaux factur\u00e9s": { + "Dans la R\u00e9gion": { + "account_number": "7051" + }, + "Hors R\u00e9gion": { + "account_number": "7052" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7053" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7054" + }, + "Sur internet": { + "account_number": "7055" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7059" + }, + "account_number": "705" + }, + "Services vendus": { + "Dans la R\u00e9gion": { + "account_number": "7061" + }, + "Hors R\u00e9gion": { + "account_number": "7062" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7063" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7064" + }, + "Sur internet": { + "account_number": "7065" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7069" + }, + "account_number": "706" + }, + "Produits accessoires": { + "Ports, emballages perdus et autres frais factur\u00e9s": { + "account_number": "7071" + }, + "Commissions et courtages": { + "account_number": "7072" + }, + "Locations": { + "account_number": "7073" + }, + "Bonis sur reprises et cessions d\u2019emballages": { + "account_number": "7074" + }, + "Mise \u00e0 disposition de personnel": { + "account_number": "7075" + }, + "Redevances pour brevets, logiciels, marques et droits similaires": { + "account_number": "7076" + }, + "Services exploit\u00e9s dans l\u2019int\u00e9r\u00eat du personnel": { + "account_number": "7077" + }, + "Autres produits accessoires": { + "account_number": "7078" + }, + "account_number": "707" + }, + "account_number": "70" + }, + "Subventions d\u2019exploitation": { + "Sur produits \u00e0 l\u2019exportation": { + "account_number": "711" + }, + "Sur produits \u00e0 l\u2019importation": { + "account_number": "712" + }, + "Sur produits de p\u00e9r\u00e9quation": { + "account_number": "713" + }, + "Indemnit\u00e9s et subventions d\u2019exploitation (entit\u00e9 agricole)": { + "account_number": "714" + }, + "Autres subventions d\u2019exploitation": { + "Vers\u00e9es par l\u2019\u00c9tat et les collectivit\u00e9s publiques": { + "account_number": "7181" + }, + "Vers\u00e9es par les organismes internationaux": { + "account_number": "7182" + }, + "Vers\u00e9es par des tiers": { + "account_number": "7183" + }, + "account_number": "718" + }, + "account_number": "71" + }, + "Production immobilis\u00e9e": { + "Immobilisations incorporelles": { + "account_number": "721" + }, + "Immobilisations corporelles": { + "Immobilisations corporelles (hors actifs biologiques)": { + "account_number": "7221" + }, + "Immobilisations corporelles (actifs biologiques)": { + "account_number": "7222" + }, + "account_number": "722" + }, + "Production auto-consomm\u00e9e": { + "account_number": "724" + }, + "Immobilisations financi\u00e8res": { + "account_number": "726" + }, + "account_number": "72" + }, + "Variations des stocks de biens et de services produits": { + "Variations des stocks de produits en cours": { + "Produits en cours": { + "account_number": "7341" + }, + "Travaux en cours": { + "account_number": "7342" + }, + "account_number": "734" + }, + "Variations des en-cours de services": { + "\u00c9tudes en cours": { + "account_number": "7351" + }, + "Prestations de services en cours": { + "account_number": "7352" + }, + "account_number": "735" + }, + "Variations des stocks de produits finis": { + "account_number": "736" + }, + "Variations des stocks de produits interm\u00e9diaires et r\u00e9siduels": { + "Produits interm\u00e9diaires": { + "account_number": "7371" + }, + "Produits r\u00e9siduels": { + "account_number": "7372" + }, + "account_number": "737" + }, + "account_number": "73" + }, + "Autres produits": { + "Profits sur cr\u00e9ances clients et autres d\u00e9biteurs": { + "account_number": "751" + }, + "Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "Quote-part transf\u00e9r\u00e9e de pertes (comptabilit\u00e9 du g\u00e9rant)": { + "account_number": "7521" + }, + "B\u00e9n\u00e9fices attribu\u00e9s par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": { + "account_number": "7525" + }, + "account_number": "752" + }, + "Produits des cessions courantes d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "7541" + }, + "Immobilisations corporelles": { + "account_number": "7542" + }, + "account_number": "754" + }, + "Gains de change sur cr\u00e9ances et dettes commerciales": { + "account_number": "756" + }, + "Produits divers": { + "Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": { + "account_number": "7581" + }, + "Indemnit\u00e9s d\u2019assurances re\u00e7ues": { + "account_number": "7582" + }, + "Autres produits divers": { + "account_number": "7588" + }, + "account_number": "758" + }, + "Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "Sur risques \u00e0 court terme": { + "account_number": "7591" + }, + "Sur stocks": { + "account_number": "7593" + }, + "Sur cr\u00e9ances": { + "account_number": "7594" + }, + "Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "account_number": "7598" + }, + "account_number": "759" + }, + "account_number": "75" + }, + "Revenus financiers et produits assimil\u00e9s": { + "Int\u00e9r\u00eats de pr\u00eats et cr\u00e9ances diverses": { + "Int\u00e9r\u00eats de pr\u00eats": { + "account_number": "7712" + }, + "Int\u00e9r\u00eats sur cr\u00e9ances diverses": { + "account_number": "7713" + }, + "account_number": "771" + }, + "Revenus de participations et autres titres immobilis\u00e9s": { + "Revenus des titres de participation": { + "account_number": "7721" + }, + "Revenus autres titres immobilis\u00e9s": { + "account_number": "7722" + }, + "account_number": "772" + }, + "Escomptes obtenus": { + "account_number": "773" + }, + "Revenus de placement": { + "Revenus des obligations": { + "account_number": "7745" + }, + "Revenus des titres de placement": { + "account_number": "7746" + }, + "account_number": "774" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition": { + "account_number": "775" + }, + "Gains de change financiers": { + "account_number": "776" + }, + "Gains sur cessions de titres de placement": { + "account_number": "777" + }, + "Gains sur risques financiers": { + "Sur rentes viag\u00e8res": { + "account_number": "7781" + }, + "Sur op\u00e9rations financi\u00e8res": { + "account_number": "7782" + }, + "Sur instruments de tr\u00e9sorerie": { + "account_number": "7784" + }, + "account_number": "778" + }, + "Reprises de charges pour d\u00e9pr\u00e9ciations et provisions \u00e0 court terme financi\u00e8res": { + "Sur risques financiers": { + "account_number": "7791" + }, + "Sur titres de placement": { + "account_number": "7795" + }, + "Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "account_number": "7798" + }, + "account_number": "779" + }, + "account_number": "77" + }, + "Transferts de charges": { + "Transferts de charges d\u2019exploitation": { + "account_number": "781" + }, + "Transferts de charges financi\u00e8res": { + "account_number": "787" + }, + "account_number": "78" + }, + "Reprises de provisions, de d\u00e9pr\u00e9ciations et autres": { + "Reprises de provisions et d\u00e9pr\u00e9ciations d\u2019exploitation": { + "Pour risques et charges": { + "account_number": "7911" + }, + "Des immobilisations incorporelles": { + "account_number": "7913" + }, + "Des immobilisations corporelles": { + "account_number": "7914" + }, + "account_number": "791" + }, + "Reprises de provisions et d\u00e9pr\u00e9ciations financi\u00e8res": { + "Pour risques et charges": { + "account_number": "7971" + }, + "Des immobilisations financi\u00e8res": { + "account_number": "7972" + }, + "account_number": "797" + }, + "Reprises d\u2019amortissements": { + "account_number": "798" + }, + "Reprises de subventions d\u2019investissement": { + "account_number": "799" + }, + "account_number": "79" + }, + "root_type": "Income", + "account_number": "7" + }, + "8-Comptes des autres charges et des autres produits (CHARGES)": { + "Valeurs comptables des cessions d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "811" + }, + "Immobilisations corporelles": { + "account_number": "812" + }, + "Immobilisations financi\u00e8res": { + "account_number": "816" + }, + "account_number": "81" + }, + "Charges hors activit\u00e9s ordinaires": { + "Charges HAO constat\u00e9es": { + "account_number": "831" + }, + "Charges li\u00e9es aux op\u00e9rations de restructuration": { + "account_number": "833" + }, + "Pertes sur cr\u00e9ances HAO": { + "account_number": "834" + }, + "Dons et lib\u00e9ralit\u00e9s accord\u00e9s": { + "account_number": "835" + }, + "Abandons de cr\u00e9ances consentis": { + "account_number": "836" + }, + "Charges li\u00e9es aux op\u00e9rations de liquidation": { + "account_number": "837" + }, + "Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": { + "account_number": "839" + }, + "account_number": "83" + }, + "Dotations hors activit\u00e9s ordinaires": { + "Dotations aux provisions r\u00e9glement\u00e9es": { + "account_number": "851" + }, + "Dotations aux amortissements HAO": { + "account_number": "852" + }, + "Dotations aux d\u00e9pr\u00e9ciations HAO": { + "account_number": "853" + }, + "Dotations aux provisions pour risques et charges HAO": { + "account_number": "854" + }, + "Autres dotations HAO": { + "account_number": "858" + }, + "account_number": "85" + }, + "Participation des travailleurs": { + "Participation l\u00e9gale aux b\u00e9n\u00e9fices": { + "account_number": "871" + }, + "Participation contractuelle aux b\u00e9n\u00e9fices": { + "account_number": "874" + }, + "Autres participations": { + "account_number": "878" + }, + "account_number": "87" + }, + "Imp\u00f4ts sur le r\u00e9sultat": { + "Imp\u00f4ts sur les b\u00e9n\u00e9fices de l\u2019exercice": { + "Activit\u00e9s exerc\u00e9es dans l\u2019\u00c9tat": { + "account_number": "8911" + }, + "Activit\u00e9s exerc\u00e9es dans les autres \u00c9tats de la R\u00e9gion": { + "account_number": "8912" + }, + "Activit\u00e9s exerc\u00e9es hors R\u00e9gion": { + "account_number": "8913" + }, + "account_number": "891" + }, + "Rappel d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": { + "account_number": "892" + }, + "Imp\u00f4t minimum forfaitaire IMF": { + "account_number": "895" + }, + "D\u00e9gr\u00e8vements et annulations d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": { + "D\u00e9gr\u00e8vements": { + "account_number": "8991" + }, + "Annulations pour pertes r\u00e9troactives": { + "account_number": "8994" + }, + "account_number": "899" + }, + "account_number": "89" + }, + "root_type": "Expense" + }, + "8-Comptes des autres charges et des autres produits (PRODUITS)": { + "Produits des cessions d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "821" + }, + "Immobilisations corporelles": { + "account_number": "822" + }, + "Immobilisations financi\u00e8res": { + "account_number": "826" + }, + "account_number": "82" + }, + "Produits hors activit\u00e9s ordinaires": { + "Produits HAO constat\u00e9s": { + "account_number": "841" + }, + "Produits li\u00e9s aux op\u00e9rations de restructuration": { + "account_number": "843" + }, + "Indemnit\u00e9s et subventions HAO (entit\u00e9 agricole)": { + "account_number": "844" + }, + "Dons et lib\u00e9ralit\u00e9s obtenus": { + "account_number": "845" + }, + "Abandons de cr\u00e9ances obtenus": { + "account_number": "846" + }, + "Produits li\u00e9s aux op\u00e9rations de liquidation": { + "account_number": "847" + }, + "Transferts de charges HAO": { + "account_number": "848" + }, + "Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": { + "account_number": "849" + }, + "account_number": "84" + }, + "Reprises de charges, provisions et d\u00e9pr\u00e9ciations HAO": { + "Reprises de provisions r\u00e9glement\u00e9es": { + "account_number": "861" + }, + "Reprises d\u2019amortissements HAO": { + "account_number": "862" + }, + "Reprises de d\u00e9pr\u00e9ciations HAO": { + "account_number": "863" + }, + "Reprises de provisions pour risques et charges HAO": { + "account_number": "864" + }, + "Autres reprises HAO": { + "account_number": "868" + }, + "account_number": "86" + }, + "Subventions d\u2019\u00e9quilibre": { + "\u00c9tat": { + "account_number": "881" + }, + "Collectivit\u00e9s publiques": { + "account_number": "884" + }, + "Groupe": { + "account_number": "886" + }, + "Autres": { + "account_number": "888" + }, + "account_number": "88" + }, + "root_type": "Income" + } + } +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/cd_plan_comptable.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/cd_plan_comptable.json new file mode 100644 index 00000000000..569eab35c51 --- /dev/null +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/cd_plan_comptable.json @@ -0,0 +1,1919 @@ +{ + "country_code": "cd", + "name": "Syscohada - Plan Comptable", + "tree": { + "1-Comptes de ressources durables": { + "10-Capital": { + "101-Capital social": { + "1011-Capital souscrit, non appel\u00e9": {}, + "1012-Capital souscrit, appel\u00e9, non vers\u00e9": {}, + "1013-Capital souscrit, appel\u00e9, vers\u00e9, non amorti": {}, + "1014-Capital souscrit, appel\u00e9, vers\u00e9, amorti": {}, + "1018-Capital souscrit soumis \u00e0 des conditions particuli\u00e8res": {} + }, + "102-Capital par dotation": { + "1021-Dotation initiale": {}, + "1022-Dotations compl\u00e9mentaires": {}, + "1028-Autres dotations": {} + }, + "103-Capital personnel": {}, + "104-Compte de l\u2019exploitant": { + "1041-Apports temporaires": {}, + "1042-Op\u00e9rations courantes": {}, + "1043-R\u00e9mun\u00e9rations, imp\u00f4ts et autres charges personnelles": {}, + "1047-Pr\u00e9l\u00e8vements d\u2019autoconsommation": {}, + "1048-Autres pr\u00e9l\u00e8vements": {} + }, + "105-Primes li\u00e9es au capital social": { + "1051-Primes d\u2019\u00e9mission": {}, + "1052-Primes d\u2019apport": {}, + "1053-Primes de fusion": {}, + "1054-Primes de conversion": {}, + "1058-Autres primes": {} + }, + "106-\u00c9carts de r\u00e9\u00e9valuation": { + "1061-\u00c9carts de r\u00e9\u00e9valuation l\u00e9gale": {}, + "1062-\u00c9carts de r\u00e9\u00e9valuation libre": {} + }, + "109-Apporteurs, capital souscrit, non appel\u00e9": {} + }, + "11-R\u00e9serves": { + "111-R\u00e9serve l\u00e9gale": {}, + "112-R\u00e9serves statutaires ou contractuelles": {}, + "113-R\u00e9serves r\u00e9glement\u00e9es": { + "1131-R\u00e9serves de plus-values nettes \u00e0 long terme": {}, + "1132-R\u00e9serves d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": {}, + "1133-R\u00e9serves cons\u00e9cutives \u00e0 l\u2019octroi de subventions d\u2019investissement": {}, + "1134-R\u00e9serves des valeurs mobili\u00e8res donnant acc\u00e8s au capital": {}, + "1135-Autres r\u00e9serves r\u00e9glement\u00e9es": {} + }, + "118-Autres r\u00e9serves": { + "1181-R\u00e9serves facultatives": {}, + "1188-R\u00e9serves diverses": {} + } + }, + "12-Report \u00e0 nouveau": { + "121-Report \u00e0 nouveau cr\u00e9diteur": {}, + "129-Report \u00e0 nouveau d\u00e9biteur": { + "1291-Perte nette \u00e0 reporter": {}, + "1292-Perte Amortissements r\u00e9put\u00e9s diff\u00e9r\u00e9s": {} + } + }, + "13-R\u00e9sultat net de l\u2019exercice": { + "130-R\u00e9sultat en instance d\u2019affectation": { + "1301-R\u00e9sultat en instance d\u2019affectation : b\u00e9n\u00e9fice": {}, + "1309-R\u00e9sultat en instance d\u2019affectation : perte": {} + }, + "131-R\u00e9sultat net : b\u00e9n\u00e9fice": {}, + "132-Marge commerciale (MC)": {}, + "133-Valeur ajout\u00e9e (VA)": {}, + "134-Exc\u00e9dent brut d\u2019exploitation (EBE)": {}, + "135-R\u00e9sultat d\u2019exploitation (RE)": {}, + "136-R\u00e9sultat financier (RF)": {}, + "137-R\u00e9sultat des activit\u00e9s ordinaires (RAO)": {}, + "138-R\u00e9sultat hors activit\u00e9s ordinaires (RHAO)": { + "1381-R\u00e9sultat de fusion": {}, + "1382-R\u00e9sultat d\u2019apport partiel d\u2019actif": {}, + "1383-R\u00e9sultat de scission": {}, + "1384-R\u00e9sultat de liquidation": {} + }, + "139-R\u00e9sultat net : perte": {} + }, + "14-Subventions d\u2019investissement": { + "141-Subventions d\u2019\u00e9quipement": { + "1411-\u00c9tat": {}, + "1412-R\u00e9gions": {}, + "1413-D\u00e9partements": {}, + "1414-Communes et collectivit\u00e9s publiques d\u00e9centralis\u00e9es": {}, + "1415-Entit\u00e9s publiques ou mixtes": {}, + "1416-Entit\u00e9s et organismes priv\u00e9s": {}, + "1417-Organismes internationaux": {}, + "1418-Autres": {} + }, + "148-Autres subventions d\u2019investissement": {} + }, + "15-Provisions r\u00e9glement\u00e9es et fonds assimil\u00e9s": { + "151-Amortissements d\u00e9rogatoires": {}, + "152-Plus-values de cession \u00e0 r\u00e9investir": {}, + "153-Fonds r\u00e9glement\u00e9s": { + "1531-Fonds National": {}, + "1532-Pr\u00e9l\u00e8vement pour le Budget": {} + }, + "154-Provisions sp\u00e9ciales de r\u00e9\u00e9valuation": {}, + "155-Provisions r\u00e9glement\u00e9es relatives aux immobilisations": { + "1551-Reconstitution des gisements miniers et p\u00e9troliers": {} + }, + "156-Provisions r\u00e9glement\u00e9es relatives aux stocks": { + "1561-Hausse de prix": {}, + "1562-Fluctuation des cours": {} + }, + "157-Provisions pour investissement": {}, + "158-Autres provisions et fonds r\u00e9glement\u00e9s": {} + }, + "16-Emprunts et dettes assimil\u00e9es": { + "161-Emprunts obligataires": { + "1611-Emprunts obligataires ordinaires": {}, + "1612-Emprunts obligataires convertibles en actions": {}, + "1613-Emprunts obligataires remboursables en actions": {}, + "1618-Autres emprunts obligataires": {} + }, + "162-Emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": {}, + "163-Avances re\u00e7ues de l\u2019\u00c9tat": {}, + "164-Avances re\u00e7ues et comptes courants bloqu\u00e9s": {}, + "165-D\u00e9p\u00f4ts et cautionnements re\u00e7us": { + "1651-D\u00e9p\u00f4ts": {}, + "1652-Cautionnements": {} + }, + "166-Int\u00e9r\u00eats courus": { + "1661-Sur emprunts obligataires": {}, + "1662-Sur emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": {}, + "1663-Sur avances re\u00e7ues de l\u2019\u00c9tat": {}, + "1664-Sur avances re\u00e7ues et comptes courants bloqu\u00e9s": {}, + "1665-Sur d\u00e9p\u00f4ts et cautionnements re\u00e7us": {}, + "1667-Sur avances assorties de conditions particuli\u00e8res": {}, + "1668-Sur autres emprunts et dettes": {} + }, + "167-Avances assorties de conditions particuli\u00e8res": { + "1671-Avances bloqu\u00e9es pour augmentation du capital": {}, + "1672-Avances conditionn\u00e9es par l\u2019\u00c9tat": {}, + "1673-Avances conditionn\u00e9es par les autres organismes africains": {}, + "1674-Avances conditionn\u00e9es par les organismes internationaux": {} + }, + "168-Autres emprunts et dettes": { + "1681-Rentes viag\u00e8res capitalis\u00e9es": {}, + "1682-Billets de fonds": {}, + "1683-Dettes cons\u00e9cutives \u00e0 des titres emprunt\u00e9s": {}, + "1684-Emprunts participatifs": {}, + "1685-Participation des travailleurs aux b\u00e9n\u00e9fices": {}, + "1686-Emprunts et dettes contract\u00e9s aupr\u00e8s des autres tiers": {} + } + }, + "17-Dettes de location acquisition": { + "172-Dettes de location acquisition / cr\u00e9dit bail immobilier": {}, + "173-Dettes de location acquisition / cr\u00e9dit bail mobilier": {}, + "174-Dettes de location acquisition / location de vente": {}, + "176-Int\u00e9r\u00eats courus": { + "1762-Sur dettes de location acquisition / cr\u00e9dit-bail immobilier": {}, + "1763-Sur dettes de location acquisition / cr\u00e9dit-bail mobilier": {}, + "1764-Sur dettes de location acquisition / location-vente": {}, + "1768-Sur autres dettes de location acquisition": {} + }, + "178-Autres dettes de location acquisition": {} + }, + "18-Dettes li\u00e9es \u00e0 des participations et comptes de liaison des \u00e9tablissements et soci\u00e9t\u00e9s en participation": { + "181-Dettes li\u00e9es \u00e0 des participations": { + "1811-Dettes li\u00e9es \u00e0 des participations (groupe)": {}, + "1812-Dettes li\u00e9es \u00e0 des participations (hors groupe)": {} + }, + "182-Dettes li\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": {}, + "183-Int\u00e9r\u00eats courus sur dettes li\u00e9es \u00e0 des participations": {}, + "184-Comptes permanents bloqu\u00e9s des \u00e9tablissements et succursales": {}, + "185-Comptes permanents non bloqu\u00e9s des \u00e9tablissements et succursales": {}, + "186-Comptes de liaison charges": {}, + "187-Comptes de liaison produits": {}, + "188-Comptes de liaison des soci\u00e9t\u00e9s en participation": {} + }, + "19-Provisions pour risques et charges": { + "191-Provisions pour litiges": {}, + "192-Provisions pour garanties donn\u00e9es aux clients": {}, + "193-Provisions pour pertes sur march\u00e9s \u00e0 ach\u00e8vement futur": {}, + "194-Provisions pour pertes de change": {}, + "195-Provisions pour imp\u00f4ts": {}, + "196-Provisions pour pensions et obligations similaires": { + "1961-Provisions pour pensions et obligations similaires engagement de retraite": {}, + "1962-Actif du r\u00e9gime de retraite": {} + }, + "197-Provisions pour restructuration": {}, + "198-Autres provisions pour risques et charges": { + "1981-Provisions pour amendes et p\u00e9nalit\u00e9s": {}, + "1983-Provisions pour propre assureur": {}, + "1984-Provisions pour d\u00e9mant\u00e8lement et remise en \u00e9tat": {}, + "1985-Provisions pour droits \u00e0 r\u00e9duction ou avantage en nature (ch\u00e8ques cadeau, cartes de fid\u00e9lit\u00e9...)": {}, + "1988-Provisions pour divers risques et charges": {} + } + }, + "root_type": "Equity" + }, + "2-Comptes d\u2019actif immobilis\u00e9": { + "21-Immobilisations incorporelles": { + "account_type": "Fixed Asset", + "211-Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset" + }, + "212-Brevets, licences, concessions et droits similaires": { + "account_type": "Fixed Asset", + "2121-Brevets": { + "account_type": "Fixed Asset" + }, + "2122-Licences": { + "account_type": "Fixed Asset" + }, + "2123-Concessions de service public": { + "account_type": "Fixed Asset" + }, + "2128-Autres concessions et droits similaires": { + "account_type": "Fixed Asset" + } + }, + "213-Logiciels et sites internet": { + "account_type": "Fixed Asset", + "2131-Logiciels": { + "account_type": "Fixed Asset" + }, + "2132-Sites internet": { + "account_type": "Fixed Asset" + } + }, + "214-Marques": { + "account_type": "Fixed Asset" + }, + "215-Fonds commercial": { + "account_type": "Fixed Asset" + }, + "216-Droit au bail": { + "account_type": "Fixed Asset" + }, + "217-Investissements de cr\u00e9ation": { + "account_type": "Fixed Asset" + }, + "218-Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset", + "2181-Frais de prospection et d\u2019\u00e9valuation de ressources min\u00e9rales": { + "account_type": "Fixed Asset" + }, + "2182-Co\u00fbts d\u2019obtention du contrat": { + "account_type": "Fixed Asset" + }, + "2183-Fichiers clients, notices, titres de journaux et magazines": { + "account_type": "Fixed Asset" + }, + "2184-Co\u00fbts des franchises": { + "account_type": "Fixed Asset" + }, + "2188-Divers droits et valeurs incorporelles": { + "account_type": "Fixed Asset" + } + }, + "219-Immobilisations incorporelles en cours": { + "account_type": "Fixed Asset", + "2191-Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset" + }, + "2193-Logiciels et internet": { + "account_type": "Fixed Asset" + }, + "2198-Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset" + } + } + }, + "22-Terrains": { + "account_type": "Fixed Asset", + "221-Terrains agricoles et forestiers": { + "account_type": "Fixed Asset", + "2211-Terrains d\u2019exploitation agricole": { + "account_type": "Fixed Asset" + }, + "2212-Terrains d\u2019exploitation foresti\u00e8re": { + "account_type": "Fixed Asset" + }, + "2218-Autres terrains": { + "account_type": "Fixed Asset" + } + }, + "222-Terrains nus": { + "account_type": "Fixed Asset", + "2221-Terrains \u00e0 b\u00e2tir": { + "account_type": "Fixed Asset" + }, + "2228-Autres terrains nus": { + "account_type": "Fixed Asset" + } + }, + "223-Terrains b\u00e2tis": { + "account_type": "Fixed Asset", + "2231-Pour b\u00e2timents industriels et agricoles": { + "account_type": "Fixed Asset" + }, + "2232-Pour b\u00e2timents administratifs et commerciaux": { + "account_type": "Fixed Asset" + }, + "2234-Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations professionnelles": { + "account_type": "Fixed Asset" + }, + "2235-Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations non professionnelles": { + "account_type": "Fixed Asset" + }, + "2238-Autres terrains b\u00e2tis": { + "account_type": "Fixed Asset" + } + }, + "224-Travaux de mise en valeur des terrains": { + "account_type": "Fixed Asset", + "2241-Plantation d\u2019arbres et d\u2019arbustes": { + "account_type": "Fixed Asset" + }, + "2245-Am\u00e9liorations du fonds": { + "account_type": "Fixed Asset" + }, + "2248-Autres travaux": { + "account_type": "Fixed Asset" + } + }, + "225-Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset", + "2251-Carri\u00e8res": { + "account_type": "Fixed Asset" + } + }, + "226-Terrains am\u00e9nag\u00e9s": { + "account_type": "Fixed Asset", + "2261-Parkings": { + "account_type": "Fixed Asset" + } + }, + "227-Terrains mis en concession": { + "account_type": "Fixed Asset" + }, + "228-Autres terrains": { + "account_type": "Fixed Asset", + "2281-Terrains immeubles de placement": { + "account_type": "Fixed Asset" + }, + "2285-Terrains des logements affect\u00e9s au personnel": { + "account_type": "Fixed Asset" + }, + "2286-Terrains de location acquisition": { + "account_type": "Fixed Asset" + }, + "2288-Divers terrains": { + "account_type": "Fixed Asset" + } + }, + "229-Am\u00e9nagements de terrains en cours": { + "account_type": "Fixed Asset", + "2291-Terrains agricoles et forestiers": { + "account_type": "Fixed Asset" + }, + "2292-Terrains nus": { + "account_type": "Fixed Asset" + }, + "2295-Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset" + }, + "2298-Autres terrains": { + "account_type": "Fixed Asset" + } + } + }, + "23-B\u00e2timents, installations techniques et agencements": { + "231-B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "2311-B\u00e2timents industriels": {}, + "2312-B\u00e2timents agricoles": {}, + "2313-B\u00e2timents administratifs et commerciaux": {}, + "2314-B\u00e2timents affect\u00e9s au logement du personnel": {}, + "2315-B\u00e2timents immeubles de placement": {}, + "2316-B\u00e2timents de location acquisition": {} + }, + "232-B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "2321-B\u00e2timents industriels": {}, + "2322-B\u00e2timents agricoles": {}, + "2323-B\u00e2timents administratifs et commerciaux": {}, + "2324-B\u00e2timents affect\u00e9s au logement du personnel": {}, + "2325-B\u00e2timents immeubles de placement": {}, + "2326-B\u00e2timents de location acquisition": {} + }, + "233-Ouvrages d\u2019infrastructure": { + "2331-Voies de terre": {}, + "2332-Voies de fer": {}, + "2333-Voies d\u2019eau": {}, + "2334-Barrages, Digues": {}, + "2335-Pistes d\u2019a\u00e9rodrome": {}, + "2338-Autres ouvrages d\u2019infrastructures": {} + }, + "234-Am\u00e9nagements, agencements et installations techniques": { + "2341-Installations complexes sp\u00e9cialis\u00e9es sur sol propre": {}, + "2342-Installations complexes sp\u00e9cialis\u00e9es sur sol d\u2019autrui": {}, + "2343-Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol propre": {}, + "2344-Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol d\u2019autrui": {}, + "2345-Am\u00e9nagements et agencements des b\u00e2timents": {} + }, + "235-Am\u00e9nagements de bureaux": { + "2351-Installations g\u00e9n\u00e9rales": {}, + "2358-Autres am\u00e9nagements de bureaux": {} + }, + "237-B\u00e2timents industriels, agricoles et commerciaux mis en concession": {}, + "238-Autres installations et agencements": {}, + "239-B\u00e2timents am\u00e9nagements, agencements et installations en cours": { + "2391-B\u00e2timents en cours": {}, + "2392-Installations en cours": {}, + "2393-Ouvrages d\u2019infrastructure en cours": {}, + "2394-Am\u00e9nagements et agencements et installations techniques en cours": {}, + "2395-Am\u00e9nagements de bureaux en cours": {}, + "2398-Autres installations et agencements en cours": {} + } + }, + "24-Mat\u00e9riel, mobilier et actifs biologiques": { + "241-Mat\u00e9riel et outillage industriel et commercial": { + "2411-Mat\u00e9riel industriel": {}, + "2412-Outillage industriel": {}, + "2413-Mat\u00e9riel commercial": {}, + "2414-Outillage commercial": {}, + "2416-Mat\u00e9riel & outillage industriel et commercial de location-acquisition": {} + }, + "242-Mat\u00e9riel et outillage agricole": { + "2421-Mat\u00e9riel agricole": {}, + "2422-Outillage agricole": {}, + "2426-Mat\u00e9riel & outillage agricole de location-acquisition": {} + }, + "243-Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "244-Mat\u00e9riel et mobilier": { + "2441-Mat\u00e9riel de bureau": {}, + "2442-Mat\u00e9riel informatique": {}, + "2443-Mat\u00e9riel bureautique": {}, + "2444-Mobilier de bureau": {}, + "2445-Mat\u00e9riel et mobilier immeubles de placement": {}, + "2446-Mat\u00e9riel et mobilier de location acquisition": {}, + "2447-Mat\u00e9riel et mobilier des logements du personnel": {} + }, + "245-Mat\u00e9riel de transport": { + "2451-Mat\u00e9riel automobile": {}, + "2452-Mat\u00e9riel ferroviaire": {}, + "2453-Mat\u00e9riel fluvial, lagunaire": {}, + "2454-Mat\u00e9riel naval": {}, + "2455-Mat\u00e9riel a\u00e9rien": {}, + "2456-Mat\u00e9riel de transport de location-acquisition": {}, + "2457-Mat\u00e9riel hippomobile": {}, + "2458-Autres mat\u00e9riels de transport": {} + }, + "246-Actifs biologiques": { + "2461-Cheptel, animaux de trait": {}, + "2462-Cheptel, animaux reproducteurs": {}, + "2463-Animaux de garde": {}, + "2465-Plantations agricoles": {}, + "2468-Autres actifs biologiques": {} + }, + "247-Agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "2471-Agencements et am\u00e9nagements du mat\u00e9riel": {}, + "2472-Agencements et am\u00e9nagements des actifs biologiques": {}, + "2478-Autres agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": {} + }, + "248-Autres mat\u00e9riels et mobiliers": { + "2481-Collections et \u0153uvres d\u2019art": {}, + "2488-Divers mat\u00e9riels mobiliers": {} + }, + "249-Mat\u00e9riels et actifs biologiques en cours": { + "2491-Mat\u00e9riel et outillage industriel et commercial": {}, + "2492-Mat\u00e9riel et outillage agricole": {}, + "2493-Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "2494-Mat\u00e9riel et mobilier de bureau": {}, + "2495-Mat\u00e9riel de transport": {}, + "2496-Actifs biologiques": {}, + "2497-Agencements am\u00e9nagements du mat\u00e9riel et actifs biologiques": {}, + "2498-Autres mat\u00e9riels et actifs biologiques en cours": {} + } + }, + "25-Avances et acomptes vers\u00e9s sur immobilisations": { + "251-Avances et acomptes vers\u00e9s sur immobilisations incorporelles": {}, + "252-Avances et acomptes vers\u00e9s sur immobilisations corporelles": {} + }, + "26-Titres de participation": { + "261-Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": {}, + "262-Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le conjoint": {}, + "263-Titres de participation dans des soci\u00e9t\u00e9s conf\u00e9rant une influence notable": {}, + "265-Participations dans des organismes professionnels": {}, + "266-Parts dans des groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": {}, + "268-Autres titres de participation": {} + }, + "27-Autres immobilisations financi\u00e8res": { + "271-Pr\u00eats et cr\u00e9ances": { + "2711-Pr\u00eats participatifs": {}, + "2712-Pr\u00eats aux associ\u00e9s": {}, + "2713-Billets de fonds": {}, + "2714-Titres pr\u00eat\u00e9s": {}, + "2718-Autres pr\u00eats et cr\u00e9ances": {} + }, + "272-Pr\u00eats au personnel": { + "2721-Pr\u00eats immobiliers": {}, + "2722-Pr\u00eats mobiliers et d\u2019installation": {}, + "2728-Autres pr\u00eats au personnel": {} + }, + "273-Cr\u00e9ances sur l\u2019\u00c9tat": { + "2731-Retenues de garantie": {}, + "2733-Fonds r\u00e9glement\u00e9": {}, + "2734-Cr\u00e9ances sur le conc\u00e9dant": {}, + "2738-Autres cr\u00e9ances sur l\u2019\u00c9tat": {} + }, + "274-Titres immobilis\u00e9s": { + "2741-Titres immobilis\u00e9s de l\u2019activit\u00e9 de portefeuille (TIAP)": {}, + "2742-Titres participatifs": {}, + "2743-Certificats d\u2019investissement": {}, + "2744-Parts de fonds commun de placement (FCP)": {}, + "2745-Obligations": {}, + "2746-Actions ou parts propres": {}, + "2748-Autres titres immobilis\u00e9s": {} + }, + "275-D\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "2751-D\u00e9p\u00f4ts pour loyers d\u2019avance": {}, + "2752-D\u00e9p\u00f4ts pour l\u2019\u00e9lectricit\u00e9": {}, + "2753-D\u00e9p\u00f4ts pour l\u2019eau": {}, + "2754-D\u00e9p\u00f4ts pour le gaz": {}, + "2755-D\u00e9p\u00f4ts pour le t\u00e9l\u00e9phone, le t\u00e9lex, la t\u00e9l\u00e9copie": {}, + "2756-Cautionnements sur march\u00e9s publics": {}, + "2757-Cautionnements sur autres op\u00e9rations": {}, + "2758-Autres d\u00e9p\u00f4ts et cautionnements": {} + }, + "276-Int\u00e9r\u00eats courus": { + "2761-Pr\u00eats et cr\u00e9ances non commerciales": {}, + "2762-Pr\u00eats au personnel": {}, + "2763-Cr\u00e9ances sur l\u2019\u00c9tat": {}, + "2764-Titres immobilis\u00e9s": {}, + "2765-D\u00e9p\u00f4ts et cautionnements vers\u00e9s": {}, + "2767-Cr\u00e9ances rattach\u00e9es \u00e0 des participations": {}, + "2768-Immobilisations financi\u00e8res diverses": {} + }, + "277-Cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": { + "2771-Cr\u00e9ances rattach\u00e9es \u00e0 des participations (groupe)": {}, + "2772-Cr\u00e9ances rattach\u00e9es \u00e0 des participations (hors groupe)": {}, + "2773-Cr\u00e9ances rattach\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": {}, + "2774-Avances \u00e0 des Groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": {} + }, + "278-Immobilisations financi\u00e8res diverses": { + "2781-Cr\u00e9ances diverses groupe": {}, + "2782-Cr\u00e9ances diverses hors groupe": {}, + "2784-Banques d\u00e9p\u00f4ts \u00e0 terme": {}, + "2785-Or et m\u00e9taux pr\u00e9cieux": {}, + "2788-Autres immobilisations financi\u00e8res": {} + } + }, + "28-Amortissements": { + "account_type": "Accumulated Depreciation", + "281-Amortissements des immobilisations corporelles": { + "account_type": "Accumulated Depreciation", + "2811-Amortissements des frais de d\u00e9veloppement": { + "account_type": "Accumulated Depreciation" + }, + "2812-Amortissements des brevets, licences, concessions et droits similaires": { + "account_type": "Accumulated Depreciation" + }, + "2813-Amortissements des logiciels et sites internet": { + "account_type": "Accumulated Depreciation" + }, + "2814-Amortissements des marques": { + "account_type": "Accumulated Depreciation" + }, + "2815-Amortissements du fonds commercial": { + "account_type": "Accumulated Depreciation" + }, + "2816-Amortissements du droit au bail": { + "account_type": "Accumulated Depreciation" + }, + "2817-Amortissements des investissements de cr\u00e9ation": { + "account_type": "Accumulated Depreciation" + }, + "2818-Amortissements des autres droits et valeurs incorporels": { + "account_type": "Accumulated Depreciation" + } + }, + "282-Amortissements des terrains": { + "2824-Amortissements des travaux de mise en valeur des terrains": {} + }, + "283-Amortissements des b\u00e2timents, installations techniques et agencements": { + "2831-Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": {}, + "2832-Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": {}, + "2833-Amortissements des ouvrages d\u2019infrastructure": {}, + "2834-Amortissements des am\u00e9nagements, agencements et installations techniques": {}, + "2835-Amortissements des am\u00e9nagements de bureaux": {}, + "2837-Amortissements des b\u00e2timents industriels, agricoles et commerciaux mis en concession": {}, + "2838-Amortissements des autres installations et agencements": {} + }, + "284-Amortissements du mat\u00e9riel": { + "2841-Amortissements du mat\u00e9riel et outillage industriel et commercial": {}, + "2842-Amortissements du mat\u00e9riel et outillage agricole": {}, + "2843-Amortissements du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "2844-Amortissements du mat\u00e9riel et mobilier": {}, + "2845-Amortissements du mat\u00e9riel de transport": {}, + "2846-Amortissements des actifs biologiques": {}, + "2847-Amortissements des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": {}, + "2848-Amortissements des autres mat\u00e9riels": {} + } + }, + "29-D\u00e9pr\u00e9ciations des immobilisations": { + "291-D\u00e9pr\u00e9ciations des immobilisations incorporelles": { + "2911-D\u00e9pr\u00e9ciations des frais de d\u00e9veloppement": {}, + "2912-D\u00e9pr\u00e9ciations des brevets, licences, concessions et droits similaires": {}, + "2913-D\u00e9pr\u00e9ciations des logiciels et sites internet": {}, + "2914-D\u00e9pr\u00e9ciations des marques": {}, + "2915-D\u00e9pr\u00e9ciations du fonds commercial": {}, + "2916-D\u00e9pr\u00e9ciations du droit au bail": {}, + "2917-D\u00e9pr\u00e9ciations des investissements de cr\u00e9ation": {}, + "2918-D\u00e9pr\u00e9ciations des autres droits et valeurs incorporels": {}, + "2919-D\u00e9pr\u00e9ciations des immobilisations incorporelles en cours": {} + }, + "292-D\u00e9pr\u00e9ciations des terrains": { + "2921-D\u00e9pr\u00e9ciations des terrains agricoles et forestiers": {}, + "2922-D\u00e9pr\u00e9ciations des terrains nus": {}, + "2923-D\u00e9pr\u00e9ciations des terrains b\u00e2tis": {}, + "2924-D\u00e9pr\u00e9ciations des travaux de mise en valeur des terrains": {}, + "2925-D\u00e9pr\u00e9ciations des terrains de gisement": {}, + "2926-D\u00e9pr\u00e9ciations des terrains am\u00e9nag\u00e9s": {}, + "2927-D\u00e9pr\u00e9ciations des terrains mis en concession": {}, + "2928-D\u00e9pr\u00e9ciations des autres terrains": {}, + "2929-D\u00e9pr\u00e9ciations des am\u00e9nagements de terrains en cours": {} + }, + "293-D\u00e9pr\u00e9ciations des b\u00e2timents, installations techniques et agencements": { + "2931-D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": {}, + "2932-D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": {}, + "2933-D\u00e9pr\u00e9ciations des ouvrages d\u2019infrastructures": {}, + "2934-D\u00e9pr\u00e9ciations des am\u00e9nagements, agencements et installations techniques": {}, + "2935-D\u00e9pr\u00e9ciations des am\u00e9nagements de bureaux": {}, + "2937-D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles et commerciaux mis en concession": {}, + "2938-D\u00e9pr\u00e9ciations des autres installations et agencements": {}, + "2939-D\u00e9pr\u00e9ciations des b\u00e2timents et installations en cours": {} + }, + "294-D\u00e9pr\u00e9ciations de mat\u00e9riel, du mobilier et de l\u2019actif biologique": { + "2941-D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage industriel et commercial": {}, + "2942-D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage agricole": {}, + "2943-D\u00e9pr\u00e9ciations du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "2944-D\u00e9pr\u00e9ciations du mat\u00e9riel et mobilier": {}, + "2945-D\u00e9pr\u00e9ciations du mat\u00e9riel de transport": {}, + "2946-D\u00e9pr\u00e9ciations des actifs biologiques": {}, + "2947-D\u00e9pr\u00e9ciations des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": {}, + "2948-D\u00e9pr\u00e9ciations des autres mat\u00e9riels": {}, + "2949-D\u00e9pr\u00e9ciations de mat\u00e9riel en cours": {} + }, + "295-D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations": { + "2951-D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations incorporelles": {}, + "2952-D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations corporelles": {} + }, + "296-D\u00e9pr\u00e9ciations des titres de participation": { + "2961-D\u00e9pr\u00e9ciations des titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": {}, + "2962-D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s sous contr\u00f4le conjoint": {}, + "2963-D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s conf\u00e9rant une influence notable": {}, + "2965-D\u00e9pr\u00e9ciations des participations dans des organismes professionnels": {}, + "2966-D\u00e9pr\u00e9ciations des parts dans des GIE": {}, + "2968-D\u00e9pr\u00e9ciations des autres titres de participation": {} + }, + "297-D\u00e9pr\u00e9ciations des autres immobilisations financi\u00e8res": { + "2971-D\u00e9pr\u00e9ciations des pr\u00eats et cr\u00e9ances": {}, + "2972-D\u00e9pr\u00e9ciations des pr\u00eats au personnel": {}, + "2973-D\u00e9pr\u00e9ciations des cr\u00e9ances sur l\u2019\u00c9tat": {}, + "2974-D\u00e9pr\u00e9ciations des titres immobilis\u00e9s": {}, + "2975-D\u00e9pr\u00e9ciations des d\u00e9p\u00f4ts et cautionnements vers\u00e9s": {}, + "2977-D\u00e9pr\u00e9ciations des cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": {}, + "2978-D\u00e9pr\u00e9ciations des cr\u00e9ances financi\u00e8res diverses": {} + } + }, + "root_type": "Asset" + }, + "3-Comptes de Stocks": { + "31-Marchandises": { + "311-Marchandises A": { + "3111-Marchandises A1": {}, + "3112-Marchandises A2": {} + }, + "312-Marchandises B": { + "3121-Marchandises B1": {}, + "3122-Marchandises B2": {} + }, + "313-Actifs biologiques": { + "3131-Animaux": {}, + "3132-V\u00e9g\u00e9taux": {} + }, + "318-Marchandises hors activit\u00e9s ordinaires (HAO)": {} + }, + "32-Mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "321-Mati\u00e8res A": {}, + "322-Mati\u00e8res B": {}, + "323-Fournitures (A, B)": {} + }, + "33-Autres approvisionnements": { + "331-Mati\u00e8res consommables": {}, + "332-Fournitures d\u2019atelier et d\u2019usine": {}, + "333-Fournitures de magasin": {}, + "334-Fournitures de bureau": {}, + "335-Emballages": { + "3351-Emballages perdus": {}, + "3352-Emballages r\u00e9cup\u00e9rables non identifiables": {}, + "3353-Emballages \u00e0 usage mixte": {}, + "3358-Autres emballages": {} + }, + "338-Autres mati\u00e8res": {} + }, + "34-Produits en cours": { + "341-Produits en cours": { + "3411-Produits en cours P1": {}, + "3412-Produits en cours P2": {} + }, + "342-Travaux en cours": { + "3421-Travaux en cours T1": {}, + "3422-Travaux en cours T2": {} + }, + "343-Produits interm\u00e9diaires en cours": { + "3431-Produits interm\u00e9diaires A": {}, + "3432-Produits interm\u00e9diaires B": {} + }, + "344-Produits r\u00e9siduels en cours": { + "3441-Produits r\u00e9siduels A": {}, + "3442-Produits r\u00e9siduels B": {} + }, + "345-Actifs biologiques en cours": { + "3451-Animaux": {}, + "3452-V\u00e9g\u00e9taux": {} + } + }, + "35-Services en cours": { + "351-\u00c9tudes en cours": { + "3511-\u00c9tudes en cours E1": {}, + "3512-\u00c9tudes en cours E2": {} + }, + "352-Prestations de services en cours": { + "3521-Prestations de services S1": {}, + "3522-Prestations de services S2": {} + } + }, + "36-Produits finis": { + "361-Produits finis A": {}, + "362-Produits finis B": {}, + "363-Actifs biologiques": { + "3631-Animaux": {}, + "3632-V\u00e9g\u00e9taux": {}, + "3638-Autres stocks (activit\u00e9s annexes)": {} + } + }, + "37-Produits interm\u00e9diaires et r\u00e9siduels": { + "371-Produits interm\u00e9diaires": { + "3711-Produits interm\u00e9diaires A": {}, + "3712-Produits interm\u00e9diaires B": {} + }, + "372-Produits r\u00e9siduels": { + "3721-D\u00e9chets": {}, + "3722-Rebuts": {}, + "3723-Mati\u00e8res de R\u00e9cup\u00e9ration": {} + }, + "373-Actifs biologiques": { + "3731-Animaux": {}, + "3732-V\u00e9g\u00e9taux": {}, + "3738-Autres stocks (activit\u00e9s annexes)": {} + } + }, + "38-Stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": { + "account_type": "Stock", + "381-Marchandises en cours de route": {}, + "382-Mati\u00e8res premi\u00e8res et fournitures li\u00e9es en cours de route": {}, + "383-Autres approvisionnements en cours de route": {}, + "386-Produits finis en cours de route": {}, + "387-Stock en consignation ou en d\u00e9p\u00f4t": { + "3871-Stock en consignation": {}, + "3872-Stock en d\u00e9p\u00f4t": {} + }, + "388-Stock provenant d\u2019immobilisations mises hors service ou au rebut": {} + }, + "39-D\u00e9pr\u00e9ciations des stocks et encours de production": { + "391-D\u00e9pr\u00e9ciations des stocks de marchandises": {}, + "392-D\u00e9pr\u00e9ciations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": {}, + "393-D\u00e9pr\u00e9ciations des stocks d\u2019autres approvisionnements": {}, + "394-D\u00e9pr\u00e9ciations des productions en cours": {}, + "395-D\u00e9pr\u00e9ciations des services en cours": {}, + "396-D\u00e9pr\u00e9ciations des stocks de produits finis": {}, + "397-D\u00e9pr\u00e9ciations des stocks de produits interm\u00e9diaires et r\u00e9siduels": {}, + "398-D\u00e9pr\u00e9ciations des stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": {} + }, + "root_type": "Asset" + }, + "4-Comptes de Tiers (ACTIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (ACTIF)": { + "409-Fournisseurs d\u00e9biteurs": { + "4091-Fournisseurs Avances et acomptes vers\u00e9s": {}, + "4092-Fournisseurs Groupe avances et acomptes vers\u00e9s": {}, + "4093-Fournisseurs Sous-traitants avances et acomptes vers\u00e9s": {}, + "4094-Fournisseurs Cr\u00e9ances pour emballages et mat\u00e9riels \u00e0 rendre": {}, + "4098-Fournisseurs Rabais, remises, ristournes et autres avoirs \u00e0 obtenir": {} + } + }, + "41-Clients et comptes rattach\u00e9s (ACTIF)": { + "411-Clients": { + "4111-Clients": { + "account_type": "Receivable" + }, + "4112-Clients groupe": { + "account_type": "Receivable" + }, + "4114-Clients, \u00c9tat et Collectivit\u00e9s publiques": { + "account_type": "Receivable" + }, + "4115-Clients, organismes internationaux": { + "account_type": "Receivable" + }, + "4116-Clients, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Receivable" + }, + "4117-Client, retenues de garantie": { + "account_type": "Receivable" + }, + "4118-Clients, d\u00e9gr\u00e8vement de taxes sur la valeur ajout\u00e9e (TVA)": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "412-Clients, effets \u00e0 recevoir en portefeuille": { + "4121-Clients, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "4122-Clients Groupe, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "4124-\u00c9tat et Collectivit\u00e9s publiques, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "4125-Organismes Internationaux, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "413-Clients, ch\u00e8ques, effets et autres valeurs impay\u00e9es": { + "4131-Clients, ch\u00e8ques impay\u00e9s": { + "account_type": "Receivable" + }, + "4132-Clients, effets impay\u00e9s": { + "account_type": "Receivable" + }, + "4133-Clients, cartes de cr\u00e9dit impay\u00e9es": { + "account_type": "Receivable" + }, + "4138-Clients, autres valeurs impay\u00e9es": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "414-Cr\u00e9ances sur cessions courantes d\u2019immobilisations": { + "4141-Cr\u00e9ances en compte, immobilisations incorporelles": { + "account_type": "Receivable" + }, + "4142-Cr\u00e9ances en compte, immobilisations corporelles": { + "account_type": "Receivable" + }, + "4146-Effets \u00e0 recevoir, immobilisations incorporelles": { + "account_type": "Receivable" + }, + "4147-Effets \u00e0 recevoir, immobilisations corporelles": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "415-Clients, effets escompt\u00e9s non \u00e9chus": { + "account_type": "Receivable" + }, + "416-Cr\u00e9ances clients litigieuses ou douteuses": { + "4161-Cr\u00e9ances litigieuses": { + "account_type": "Receivable" + }, + "4162-Cr\u00e9ances douteuses": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "418-Clients, produits \u00e0 recevoir": { + "4181-Clients, factures \u00e0 \u00e9tablir": { + "account_type": "Receivable" + }, + "4186-Clients, int\u00e9r\u00eats courus": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "42-Personnel (ACTIF)": { + "421-Personnel, avances et acomptes": { + "4211-Personnel, avances": {}, + "4212-Personnel, acomptes": {}, + "4213-Frais avanc\u00e9s et fournitures au personnel": {} + } + }, + "43-Organismes sociaux (ACTIF)": { + "431-S\u00e9curit\u00e9 sociale": { + "4311-Prestations familiales": {}, + "4312-Accidents de travail": {}, + "4313-Caisse de retraite obligatoire": {}, + "4314-Caisse de retraite facultative": {}, + "4318-Autres cotisations sociales": {} + }, + "432-Caisses de retraite compl\u00e9mentaire": {}, + "433-Autres organismes sociaux": { + "4331-Mutuelle": {}, + "4332-Assurances retraite": {}, + "4333-Assurances et organismes de sant\u00e9": {} + }, + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "4387-Produits \u00e0 recevoir": {} + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (ACTIF)": { + "443-\u00c9tat, TVA factur\u00e9e": { + "4431-TVA factur\u00e9e sur ventes": {}, + "4432-TVA factur\u00e9e sur prestations de services": {}, + "4433-TVA factur\u00e9e sur travaux": {}, + "4434-TVA factur\u00e9e sur production livr\u00e9e \u00e0 soi-m\u00eame": {}, + "4435-TVA sur factures \u00e0 \u00e9tablir": {} + }, + "445-\u00c9tat, TVA r\u00e9cup\u00e9rable": { + "4451-TVA r\u00e9cup\u00e9rable sur immobilisations": {}, + "4452-TVA r\u00e9cup\u00e9rable sur achats": {}, + "4453-TVA r\u00e9cup\u00e9rable sur transport": {}, + "4454-TVA r\u00e9cup\u00e9rable sur services ext\u00e9rieurs et autres charges": {}, + "4455-TVA r\u00e9cup\u00e9rable sur factures non parvenues": {}, + "4456-TVA transf\u00e9r\u00e9e par d\u2019autres entit\u00e9s": {} + }, + "448-\u00c9tat, charges \u00e0 payer et produits \u00e0 recevoir": { + "4486-Charges \u00e0 payer": {}, + "4487-Produits \u00e0 recevoir": {} + }, + "449-\u00c9tat, cr\u00e9ances et dettes diverses": { + "4491-\u00c9tat, obligations cautionn\u00e9es": {}, + "4492-\u00c9tat, avances et acomptes vers\u00e9s sur imp\u00f4ts": {}, + "4493-\u00c9tat, fonds de dotation \u00e0 recevoir": {}, + "4494-\u00c9tat, subventions investissement \u00e0 recevoir": {}, + "4495-\u00c9tat, subventions d\u2019exploitation \u00e0 recevoir": {}, + "4496-\u00c9tat, subventions d\u2019\u00e9quilibre \u00e0 recevoir": {}, + "4497-\u00c9tat, avances sur subventions": {}, + "4499-\u00c9tat, fonds r\u00e9glement\u00e9s provisionn\u00e9s": {} + } + }, + "45-Organismes internationaux (ACTIF)": { + "451-Op\u00e9rations avec les organismes africains": {}, + "452-Op\u00e9rations avec les autres organismes internationaux": {}, + "458-Organismes internationaux, fonds de dotation et subventions \u00e0 recevoir": { + "4581-Organismes internationaux, fonds de dotation \u00e0 recevoir": {}, + "4582-Organismes internationaux, subventions \u00e0 recevoir": {} + } + }, + "46-Apporteurs, associ\u00e9s et groupe (ACTIF)": { + "461-Apporteurs, op\u00e9rations sur le capital": { + "4613-Apporteurs, capital appel\u00e9, non vers\u00e9": {}, + "4614-Apporteurs, compte d\u2019apport, op\u00e9rations de restructuration (fusion...)": {}, + "4618-Apporteurs, titres \u00e0 \u00e9changer": {} + }, + "467-Apporteurs, restant d\u00fb sur capital appel\u00e9": {} + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (ACTIF)": { + "472-Cr\u00e9ances et dettes sur titres de placement": { + "4721-Cr\u00e9ances sur cessions de titres de placement": {}, + "4726-Versements restant \u00e0 effectuer sur titres de placement non lib\u00e9r\u00e9s": {} + }, + "473-Interm\u00e9diaires Op\u00e9rations faites pour compte de tiers": { + "4731-Mandants": {}, + "4732-Mandataires": {}, + "4733-Commettants": {}, + "4734-Commissionnaires": {}, + "4739-\u00c9tat, Collectivit\u00e9s publiques, fonds global d\u2019allocation": {} + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits": { + "4747-Compte de r\u00e9partition p\u00e9riodique des produits": {} + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA": { + "4751-Compte actif": { + "account_type": "Temporary" + } + }, + "476-Charges constat\u00e9es d\u2019avance": {}, + "478-\u00c9carts de conversion actif": { + "4781-Diminution des cr\u00e9ances d\u2019exploitation": {}, + "4782-Diminution des cr\u00e9ances financi\u00e8res": {}, + "4783-Augmentation des dettes d\u2019exploitation": {}, + "4784-Augmentation des dettes financi\u00e8res": {}, + "4786-Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": {}, + "4788-Diff\u00e9rences compens\u00e9es par couverture de change": {} + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (ACTIF)": { + "485-Cr\u00e9ances sur cessions d\u2019immobilisations": { + "4851-En compte, immobilisations incorporelles": {}, + "4852-En compte, immobilisations corporelles": {}, + "4853-Effets \u00e0 recevoir, immobilisations incorporelles": {}, + "4854-Effets \u00e0 recevoir, immobilisations corporelles": {}, + "4855-Effets escompt\u00e9s non \u00e9chus": {}, + "4857-Retenues de garantie": {}, + "4858-Factures \u00e0 \u00e9tablir": {} + }, + "488-Autres cr\u00e9ances hors activit\u00e9s ordinaires (HAO)": {} + }, + "49-D\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme (tiers) (ACTIF)": { + "491-D\u00e9pr\u00e9ciations des comptes clients": { + "4911-Cr\u00e9ances litigieuses": {}, + "4912-Cr\u00e9ances douteuses": {} + }, + "495-D\u00e9pr\u00e9ciations des comptes organismes internationaux": {}, + "496-D\u00e9pr\u00e9ciations des comptes apporteurs, associ\u00e9s et groupe": { + "4962-Associ\u00e9s, comptes courants": {}, + "4963-Associ\u00e9s, op\u00e9rations faites en commun": {}, + "4966-Groupe, comptes courants": {} + }, + "497-D\u00e9pr\u00e9ciations des comptes d\u00e9biteurs divers": {}, + "498-D\u00e9pr\u00e9ciations des comptes de cr\u00e9ances HAO": { + "4985-Cr\u00e9ances sur cessions d\u2019immobilisations": {}, + "4986-Cr\u00e9ances sur cessions de titres de placement": {}, + "4988-Autres cr\u00e9ances HAO": {} + }, + "499-Provisions pour risques \u00e0 court terme": { + "4991-Sur op\u00e9rations d\u2019exploitation": {}, + "4997-Sur op\u00e9rations financi\u00e8res": {}, + "4998-Sur op\u00e9rations HAO": {} + } + }, + "root_type": "Asset" + }, + "4-Comptes de Tiers (PASSIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (PASSIF)": { + "401-Fournisseurs, dettes en compte": { + "4011-Fournisseurs": { + "account_type": "Payable" + }, + "4012-Fournisseurs groupe": { + "account_type": "Payable" + }, + "4013-Fournisseurs sous-traitants": { + "account_type": "Payable" + }, + "4016-Fournisseurs, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Payable" + }, + "4017-Fournisseur, retenues de garantie": { + "account_type": "Payable" + }, + "account_type": "Payable" + }, + "402-Fournisseurs, effets \u00e0 payer": { + "4021-Fournisseurs Effets \u00e0 payer": { + "account_type": "Payable" + }, + "4022-Fournisseurs Groupe, effets \u00e0 payer": { + "account_type": "Payable" + }, + "4023-Fournisseurs Sous-traitants, effets \u00e0 payer": { + "account_type": "Payable" + }, + "account_type": "Payable" + }, + "404-Fournisseurs, acquisitions courantes d\u2019immobilisations": { + "4041-Fournisseurs Dettes en comptes, immobilisations incorporelles": { + "account_type": "Payable" + }, + "4042-Fournisseurs Dettes en comptes, immobilisations corporelles": { + "account_type": "Payable" + }, + "4046-Fournisseurs Effets \u00e0 payer, immobilisations incorporelles": { + "account_type": "Payable" + }, + "4047-Fournisseurs Effets \u00e0 payer, immobilisations corporelles": { + "account_type": "Payable" + }, + "account_type": "Payable" + }, + "408-Fournisseurs, factures non parvenues": { + "4081-Fournisseurs": { + "account_type": "Stock Received But Not Billed" + }, + "4082-Fournisseurs groupe": { + "account_type": "Stock Received But Not Billed" + }, + "4083-Fournisseurs sous-traitants": { + "account_type": "Stock Received But Not Billed" + }, + "4086-Fournisseurs, int\u00e9r\u00eats courus": { + "account_type": "Stock Received But Not Billed" + }, + "account_type": "Stock Received But Not Billed" + }, + "account_type": "Payable" + }, + "41-Clients et comptes rattach\u00e9s (PASSIF)": { + "419-Clients cr\u00e9diteurs": { + "4191-Clients, avances et acomptes re\u00e7us": {}, + "4192-Clients groupe, avances et acomptes re\u00e7us": {}, + "4194-Clients, dettes pour emballages et mat\u00e9riels consign\u00e9s": {}, + "4198-Clients, rabais, remises, ristournes et autres avoirs \u00e0 accorder": {} + } + }, + "42-Personnel (PASSIF)": { + "422-Personnel, r\u00e9mun\u00e9rations dues": {}, + "423-Personnel, oppositions, saisies-arr\u00eats": { + "4231-Personnel, oppositions": {}, + "4232-Personnel, saisies-arr\u00eats": {}, + "4233-Personnel, avis \u00e0 tiers d\u00e9tenteur": {} + }, + "424-Personnel, \u0153uvres sociales internes": { + "4241-Assistance m\u00e9dicale": {}, + "4242-Allocations familiales": {}, + "4245-Organismes sociaux rattach\u00e9s \u00e0 l\u2019entit\u00e9": {}, + "4248-Autres \u0153uvres sociales internes": {} + }, + "425-Repr\u00e9sentants du personnel": { + "4251-D\u00e9l\u00e9gu\u00e9s du personnel": {}, + "4252-Syndicats et Comit\u00e9s d\u2019entreprises, d\u2019\u00c9tablissement": {}, + "4258-Autres repr\u00e9sentants du personnel": {} + }, + "426-Personnel, participation aux b\u00e9n\u00e9fices et au capital": { + "4261-Participation aux b\u00e9n\u00e9fices": {}, + "4264-Participation au capital": {} + }, + "427-Personnel d\u00e9p\u00f4ts": {}, + "428-Personnel, charges \u00e0 payer et produits \u00e0 recevoir": { + "4281-Dettes provisionn\u00e9es pour cong\u00e9s \u00e0 payer": {}, + "4286-Autres charges \u00e0 payer": {}, + "4287-Produits \u00e0 recevoir": {} + } + }, + "43-Organismes sociaux (PASSIF)": { + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "4381-Charges sociales sur gratifications \u00e0 payer": {}, + "4382-Charges sociales sur cong\u00e9s \u00e0 payer": {}, + "4386-Autres charges \u00e0 payer": {} + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (PASSIF)": { + "441-\u00c9tat, imp\u00f4t sur les b\u00e9n\u00e9fices": {}, + "442-\u00c9tat, autres imp\u00f4ts et taxes": { + "4421-Imp\u00f4ts et taxes d\u2019\u00c9tat": {}, + "4422-Imp\u00f4ts et taxes pour les collectivit\u00e9s publiques": {}, + "4423-Imp\u00f4ts et taxes recouvrables sur des obligataires": {}, + "4424-Imp\u00f4ts et taxes recouvrables sur des associ\u00e9s": {}, + "4426-Droits de douane": {}, + "4428-Autres imp\u00f4ts et taxes": {} + }, + "444-\u00c9tat, TVA due ou cr\u00e9dit de TVA": { + "4441-\u00c9tat, TVA due": {}, + "4449-\u00c9tat, cr\u00e9dit de TVA \u00e0 reporter": {} + }, + "446-\u00c9tat, autres taxes sur le chiffre d\u2019affaires": {}, + "447-\u00c9tat, imp\u00f4ts retenus \u00e0 la source": { + "4471-Imp\u00f4t G\u00e9n\u00e9ral sur le revenu": {}, + "4472-Imp\u00f4ts sur salaires": {}, + "4473-Contribution nationale": {}, + "4474-Contribution nationale de solidarit\u00e9": {}, + "4478-Autres imp\u00f4ts et contributions": {} + } + }, + "46-Apporteurs, associ\u00e9s et groupe (PASSIF)": { + "461-Apporteurs, op\u00e9rations sur le capital (PASSIF)": { + "4611-Apporteurs, apports en nature": {}, + "4612-Apporteurs, apports en num\u00e9raire": {}, + "4615-Apporteurs, versements re\u00e7us sur augmentation de capital": {}, + "4616-Apporteurs, versements anticip\u00e9s": {}, + "4617-Apporteurs d\u00e9faillants": {}, + "4619-Apporteurs, capital \u00e0 rembourser": {} + }, + "462-Associ\u00e9s, comptes courants": { + "4621-Principal": {}, + "4626-Int\u00e9r\u00eats courus": {} + }, + "463-Associ\u00e9s, op\u00e9rations faites en commun et GIE": { + "4631-Op\u00e9rations courantes": {}, + "4636-Int\u00e9r\u00eats courus": {} + }, + "465-Associ\u00e9s, dividendes \u00e0 payer": {}, + "466-Groupe, comptes courants": {} + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (PASSIF)": { + "471-D\u00e9biteurs et cr\u00e9diteurs divers": { + "4711-D\u00e9biteurs divers": {}, + "4712-Cr\u00e9diteurs divers": {}, + "4713-Obligataires": {}, + "4715-R\u00e9mun\u00e9rations d\u2019administrateurs": {}, + "4716-Compte d\u2019affacturage": {}, + "4717-D\u00e9biteurs divers retenues de garantie": {}, + "4718-Apport, compte de fusion et op\u00e9rations assimil\u00e9es": {}, + "4719-Bons de souscription d\u2019actions et d\u2019obligations": {} + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits (PASSIF)": { + "4746-Compte de r\u00e9partition p\u00e9riodique des charges": {} + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA (PASSIF)": { + "4752-Compte passif": {} + }, + "477-Produits constat\u00e9s d\u2019avance": {}, + "479-\u00c9carts de conversion passif": { + "4791-Augmentation des cr\u00e9ances d\u2019exploitation": {}, + "4792-Augmentation des cr\u00e9ances financi\u00e8res": {}, + "4793-Diminution des dettes d\u2019exploitation": {}, + "4794-Diminution des dettes financi\u00e8res": {}, + "4797-Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": {}, + "4798-Diff\u00e9rences compens\u00e9es par couverture de change": {} + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (HAO) (PASSIF)": { + "481-Fournisseurs d\u2019investissements": { + "4811-Immobilisations incorporelles": {}, + "4812-Immobilisations corporelles": {}, + "4813-Versements restant \u00e0 effectuer sur titres de participation et titres immobilis\u00e9s non lib\u00e9r\u00e9s": {}, + "4816-R\u00e9serve de propri\u00e9t\u00e9": {}, + "4817-Retenues de garantie": {}, + "4818-Factures non parvenues": {} + }, + "482-Fournisseurs d\u2019investissements, effets \u00e0 payer": { + "4821-Immobilisations incorporelles": {}, + "4822-Immobilisations corporelles": {} + }, + "484-Autres dettes hors activit\u00e9s ordinaires (HAO)": { + "4887-Produits": {} + } + }, + "49-D\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme (tiers) (PASSIF)": { + "490-D\u00e9pr\u00e9ciations des comptes fournisseurs": {}, + "492-D\u00e9pr\u00e9ciations des comptes personnel": {}, + "493-D\u00e9pr\u00e9ciations des comptes organismes sociaux": {}, + "494-D\u00e9pr\u00e9ciations des comptes \u00c9tat et collectivit\u00e9s publiques": {}, + "495-D\u00e9pr\u00e9ciations des comptes organismes internationaux": {} + }, + "root_type": "Liability" + }, + "5-Comptes de tr\u00e9sorerie": { + "50-Titres de placement": { + "501-Titres du tr\u00e9sor et bons de caisse \u00e0 court terme": { + "5011-Titres du Tr\u00e9sor \u00e0 court terme": {}, + "5012-Titres d\u2019organismes financiers": {}, + "5013-Bons de caisse \u00e0 court terme": {}, + "5016-Frais d\u2019acquisition des titres de tr\u00e9sor et bons de caisse": {} + }, + "502-Actions": { + "5021-Actions ou parts propres": {}, + "5022-Actions cot\u00e9es": {}, + "5023-Actions non cot\u00e9es": {}, + "5024-Actions d\u00e9membr\u00e9es (certificats d\u2019investissement, droits de vote)": {}, + "5025-Autres actions": {}, + "5026-Frais d\u2019acquisition des actions": {} + }, + "503-Obligations": { + "5031-Obligations \u00e9mises par la soci\u00e9t\u00e9 et rachet\u00e9es par elle": {}, + "5032-Obligations cot\u00e9es": {}, + "5033-Obligations non cot\u00e9es": {}, + "5035-Autres obligations": {}, + "5036-Frais d\u2019acquisition des obligations": {} + }, + "504-Bons de souscription": { + "5042-Bons de souscription d\u2019actions": {}, + "5043-Bons de souscription d\u2019obligations": {} + }, + "505-Titres n\u00e9gociables hors r\u00e9gion": {}, + "506-Int\u00e9r\u00eats courus": { + "5061-Titres du Tr\u00e9sor et bons de caisse \u00e0 court terme": {}, + "5062-Actions": {}, + "5063-Obligations": {} + }, + "508-Autres titres de placement et cr\u00e9ances assimil\u00e9es": {} + }, + "51-Valeurs \u00e0 encaisser": { + "511-Effets \u00e0 encaisser": {}, + "512-Effets \u00e0 l\u2019encaissement": {}, + "513-Ch\u00e8ques \u00e0 encaisser": {}, + "514-Ch\u00e8ques \u00e0 l\u2019encaissement": {}, + "515-Cartes de cr\u00e9dit \u00e0 encaisser": {}, + "518-Autres valeurs \u00e0 l\u2019encaissement": { + "5181-Warrants": {}, + "5182-Billets de fonds": {}, + "5185-Ch\u00e8ques de voyage": {}, + "5186-Coupons \u00e9chus": {}, + "5187-Int\u00e9r\u00eats \u00e9chus des obligations": {} + } + }, + "52-Banques": { + "521-Banques locales": { + "5211-Banques en monnaie nationale": { + "account_type": "Bank" + }, + "5215-Banques en devises": { + "account_type": "Bank" + }, + "account_type": "Bank" + }, + "522-Banques autres \u00c9tats r\u00e9gion": {}, + "523-Banques autres \u00c9tats zone mon\u00e9taire": {}, + "524-Banques hors zone mon\u00e9taire": {}, + "525-Banques d\u00e9p\u00f4t \u00e0 terme": {}, + "526-Banques, int\u00e9r\u00eats courus": { + "5261-Banque, int\u00e9r\u00eats courus, charges \u00e0 payer": {}, + "5267-Banque, int\u00e9r\u00eats courus, produits \u00e0 recevoir": {} + } + }, + "53-\u00c9tablissements financiers et assimil\u00e9s": { + "531-Ch\u00e8ques postaux": {}, + "532-Tr\u00e9sor": {}, + "533-Soci\u00e9t\u00e9s de gestion et d\u2019interm\u00e9diation (SGI)": {}, + "536-\u00c9tablissements financiers, int\u00e9r\u00eats courus": {}, + "538-Autres organismes financiers": {} + }, + "54-Instruments de tr\u00e9sorerie": { + "541-Options de taux d\u2019int\u00e9r\u00eat": {}, + "542-Options de taux de change": {}, + "543-Options de taux boursiers": {}, + "544-Instruments de march\u00e9s \u00e0 terme": {}, + "545-Avoirs d\u2019or et autres m\u00e9taux pr\u00e9cieux": {} + }, + "55-Instruments de monnaie \u00e9lectronique": { + "551-Monnaie \u00e9lectronique carte carburant": {}, + "552-Monnaie \u00e9lectronique t\u00e9l\u00e9phone portable": {}, + "553-Monnaie \u00e9lectronique carte p\u00e9age": {}, + "554-Porte-monnaie \u00e9lectronique": {}, + "558-Autres instruments de monnaies \u00e9lectroniques": {} + }, + "56-Banques, cr\u00e9dits de tr\u00e9sorerie et d\u2019escompte": { + "561-Cr\u00e9dits de tr\u00e9sorerie": {}, + "564-Escompte de cr\u00e9dits de campagne": {}, + "565-Escompte de cr\u00e9dits ordinaires": {}, + "566-Banques, cr\u00e9dits de tr\u00e9sorerie, int\u00e9r\u00eats courus": {} + }, + "57-Caisse": { + "571-Caisse si\u00e8ge social": { + "5711-Caisse en monnaie nationale": {}, + "5712-Caisse en devises": {} + }, + "572-Caisse succursale A": { + "5721-En monnaie nationale": {}, + "5722-En devises": {} + }, + "573-Caisse succursale B": { + "5731-En monnaie nationale": {}, + "5732-En devises": {} + } + }, + "58-R\u00e9gies d\u2019avances, accr\u00e9ditifs et virements internes": { + "581-R\u00e9gies d\u2019avance": {}, + "582-Accr\u00e9ditifs": {}, + "585-Virements de fonds": {}, + "588-Autres virements internes": {} + }, + "59-D\u00e9pr\u00e9ciations et provisions pour risque \u00e0 court terme": { + "590-D\u00e9pr\u00e9ciations des titres de placement": {}, + "591-D\u00e9pr\u00e9ciations des titres et valeurs \u00e0 encaisser": {}, + "592-D\u00e9pr\u00e9ciations des comptes banques": {}, + "593-D\u00e9pr\u00e9ciations des comptes \u00e9tablissements financiers et assimil\u00e9s": {}, + "594-D\u00e9pr\u00e9ciations des comptes d\u2019instruments de tr\u00e9sorerie": {}, + "599-Provisions pour risque \u00e0 court terme \u00e0 caract\u00e8re financier": {} + }, + "root_type": "Asset" + }, + "6-Comptes de charges des activit\u00e9s ordinaires": { + "60-Achats et variations de stocks": { + "601-Achats de marchandises": { + "6011-Dans la R\u00e9gion": {}, + "6012-Hors R\u00e9gion": {}, + "6013-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "6014-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "6015-Frais sur achats": {}, + "6019-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "602-Achats de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "6021-Dans la R\u00e9gion": {}, + "6022-Hors R\u00e9gion": {}, + "6023-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "6024-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "6025-Frais sur achats": {}, + "6029-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "603-Variations des stocks de biens achet\u00e9s": { + "6031-Variations des stocks de marchandises": {}, + "6032-Variations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": {}, + "6033-Variations des stocks d\u2019autres approvisionnements": {} + }, + "604-Achats stock\u00e9s de mati\u00e8res et fournitures consommables": { + "6041-Mati\u00e8res consommables": {}, + "6042-Mati\u00e8res combustibles": {}, + "6043-Produits d\u2019entretien": {}, + "6044-Fournitures d\u2019atelier et d\u2019usine": {}, + "6045-Frais sur achat": {}, + "6046-Fournitures de magasin": {}, + "6047-Fournitures de bureau": {}, + "6049-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "605-Autres achats": { + "6051-Fournitures non stockables Eau": {}, + "6052-Fournitures non stockables \u00c9lectricit\u00e9": {}, + "6053-Fournitures non stockables Autres \u00e9nergies": {}, + "6054-Fournitures d\u2019entretien non stockables": {}, + "6055-Fournitures de bureau non stockables": {}, + "6056-Achats de petit mat\u00e9riel et outillage": {}, + "6057-Achats d\u2019\u00e9tudes et prestations de services": {}, + "6058-Achats de travaux, mat\u00e9riels et \u00e9quipements": {}, + "6059-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "608-Achats d\u2019emballages": { + "6081-Emballages perdus": {}, + "6082-Emballages r\u00e9cup\u00e9rables non identifiables": {}, + "6083-Emballages \u00e0 usage mixte": {}, + "6085-Frais sur achats": {}, + "6089-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + } + }, + "61-Transports": { + "612-Transports sur ventes": {}, + "613-Transports pour le compte de tiers": {}, + "614-Transports du personnel": {}, + "616-Transports de plis": {}, + "618-Autres frais de transport": { + "6181-Voyages et d\u00e9placements": {}, + "6182-Transports entre \u00e9tablissements ou chantiers": {}, + "6183-Transports administratifs": {} + } + }, + "62-Services ext\u00e9rieurs": { + "621-Sous-traitance g\u00e9n\u00e9rale": {}, + "622-Locations, charges locatives": { + "6221-Locations de terrains": {}, + "6222-Locations de b\u00e2timents": {}, + "6223-Locations de mat\u00e9riels et outillages": {}, + "6224-Malis sur emballages": {}, + "6225-Locations d\u2019emballages": {}, + "6226-Fermages et loyers du foncier": {}, + "6228-Locations et charges locatives diverses": {} + }, + "623-Redevances de location acquisition": { + "6232-Cr\u00e9dit-bail immobilier": {}, + "6233-Cr\u00e9dit-bail mobilier": {}, + "6234-Location-vente": {}, + "6238-Autres contrats de location acquisition": {} + }, + "624-Entretien, r\u00e9parations, remise en \u00e9tat et maintenance": { + "6241-Entretien et r\u00e9parations des biens immobiliers": {}, + "6242-Entretien et r\u00e9parations des biens mobiliers": {}, + "6243-Maintenance": {}, + "6244-Charges de d\u00e9mant\u00e8lement et remise en \u00e9tat": {}, + "6248-Autres entretiens et r\u00e9parations": {} + }, + "625-Primes d\u2019assurance": { + "6251-Assurances multirisques": {}, + "6252-Assurances mat\u00e9riel de transport": {}, + "6253-Assurances risques d\u2019exploitation": {}, + "6254-Assurances responsabilit\u00e9 du producteur": {}, + "6255-Assurances insolvabilit\u00e9 clients": {}, + "6257-Assurances transport sur ventes": {}, + "6258-Autres primes d\u2019assurances": {} + }, + "626-\u00c9tudes, recherches et documentation": { + "6261-\u00c9tudes et recherches": {}, + "6265-Documentation g\u00e9n\u00e9rale": {}, + "6266-Documentation technique": {} + }, + "627-Publicit\u00e9, publications, relations publiques": { + "6271-Annonces, insertions": {}, + "6272-Catalogues, imprim\u00e9s publicitaires": {}, + "6273-\u00c9chantillons": {}, + "6274-Foires et expositions": {}, + "6275-Publications": {}, + "6276-Cadeaux \u00e0 la client\u00e8le": {}, + "6277-Frais de colloques, s\u00e9minaires, conf\u00e9rences": {}, + "6278-Autres charges de publicit\u00e9 et relations publiques": {} + }, + "628-Frais de t\u00e9l\u00e9communications": { + "6281-Frais de t\u00e9l\u00e9phone": {}, + "6282-Frais de t\u00e9lex": {}, + "6283-Frais de t\u00e9l\u00e9copie": {}, + "6288-Autres frais de t\u00e9l\u00e9communications": {} + } + }, + "63-Autres services ext\u00e9rieurs": { + "631-Frais bancaires": { + "6311-Frais sur titres (vente, garde)": {}, + "6312-Frais sur effets": {}, + "6313-Location de coffres": {}, + "6314-Commissions d\u2019affacturage": {}, + "6315-Commissions sur cartes de cr\u00e9dit": {}, + "6316-Frais d\u2019\u00e9mission d\u2019emprunts": {}, + "6317-Frais sur instruments monnaie \u00e9lectronique": {}, + "6318-Autres frais bancaires": {} + }, + "632-R\u00e9mun\u00e9rations d\u2019interm\u00e9diaires et de conseils": { + "6322-Commissions et courtages sur ventes": {}, + "6324-Honoraires des professions r\u00e9glement\u00e9es": {}, + "6325-Frais d\u2019actes et de contentieux": {}, + "6326-R\u00e9mun\u00e9rations d\u2019affacturage": {}, + "6327-R\u00e9mun\u00e9rations des autres prestataires de services": {}, + "6328-Divers frais": {} + }, + "633-Frais de formation du personnel": {}, + "634-Redevances pour brevets, licences, logiciels, concessions et droits et valeurs similaires": { + "6342-Redevances pour brevets, licences": {}, + "6343-Redevances pour logiciels": {}, + "6344-Redevances pour marques": {}, + "6345-Redevances pour sites internet": {}, + "6346-Redevances pour concessions, droits et valeurs similaires": {} + }, + "635-Cotisations": { + "6351-Cotisations": {}, + "6358-Concours divers": {} + }, + "637-R\u00e9mun\u00e9rations de personnel ext\u00e9rieur \u00e0 l\u2019entit\u00e9": { + "6371-Personnel int\u00e9rimaire": {}, + "6372-Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": {} + }, + "638-Autres charges externes": { + "6381-Frais de recrutement du personnel": {}, + "6382-Frais de d\u00e9m\u00e9nagement": {}, + "6383-R\u00e9ceptions": {}, + "6384-Missions": {}, + "6385-Charges de copropri\u00e9t\u00e9": {} + } + }, + "64-Imp\u00f4ts et taxes": { + "641-Imp\u00f4ts et taxes directs": { + "6411-Imp\u00f4ts fonciers et taxes annexes": {}, + "6412-Patentes, licences et taxes annexes": {}, + "6413-Taxes sur appointements et salaires": {}, + "6414-Taxes d\u2019apprentissage": {}, + "6415-Formation professionnelle continue": {}, + "6418-Autres imp\u00f4ts et taxes directs": {} + }, + "645-Imp\u00f4ts et taxes indirects": {}, + "646-Droits d\u2019enregistrement": { + "6461-Droits de mutation": {}, + "6462-Droits de timbre": {}, + "6463-Taxes sur les v\u00e9hicules de soci\u00e9t\u00e9": {}, + "6464-Vignettes": {}, + "6468-Autres droits": {} + }, + "647-P\u00e9nalit\u00e9s, amendes fiscales": { + "6471-P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts directs": {}, + "6472-P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts indirects": {}, + "6473-P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts directs": {}, + "6474-P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts indirects": {}, + "6478-Autres p\u00e9nalit\u00e9s et amendes fiscales": {} + }, + "648-Autres imp\u00f4ts et taxes": {} + }, + "65-Autres charges": { + "651-Pertes sur cr\u00e9ances clients et autres d\u00e9biteurs": { + "6511-Clients": {}, + "6515-Autres d\u00e9biteurs": {} + }, + "652-Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "6521-Quote-part transf\u00e9r\u00e9e de b\u00e9n\u00e9fices (comptabilit\u00e9 du g\u00e9rant)": {}, + "6525-Pertes imput\u00e9es par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": {} + }, + "654-Valeurs comptables des cessions courantes d\u2019immobilisations": { + "6541-Immobilisations incorporelles": {}, + "6542-Immobilisations corporelles": {} + }, + "656-Perte de change sur cr\u00e9ances et dettes commerciale": {}, + "657-P\u00e9nalit\u00e9s et amendes p\u00e9nales": {}, + "658-Charges diverses": { + "6581-Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": {}, + "6582-Dons": {}, + "6583-M\u00e9c\u00e9nat": {}, + "6588-Autres charges diverses": {} + }, + "659-Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "6591-Sur risques \u00e0 court terme": {}, + "6593-Sur stocks": {}, + "6594-Sur cr\u00e9ances": {}, + "6598-Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme": {} + } + }, + "66-Charges de personnel": { + "661-R\u00e9mun\u00e9rations directes vers\u00e9es au personnel national": { + "6611-Appointements salaires et commissions": {}, + "6612-Primes et gratifications": {}, + "6613-Cong\u00e9s pay\u00e9s": {}, + "6614-Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": {}, + "6615-Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": {}, + "6616-Suppl\u00e9ment familial": {}, + "6617-Avantages en nature": {}, + "6618-Autres r\u00e9mun\u00e9rations directes": {} + }, + "662-R\u00e9mun\u00e9rations directes vers\u00e9es au personnel non national": { + "6621-Appointements salaires et commissions": {}, + "6622-Primes et gratifications": {}, + "6623-Cong\u00e9s pay\u00e9s": {}, + "6624-Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": {}, + "6625-Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": {}, + "6626-Suppl\u00e9ment familial": {}, + "6627-Avantages en nature": {}, + "6628-Autres r\u00e9mun\u00e9rations directes": {} + }, + "663-Indemnit\u00e9s forfaitaires vers\u00e9es au personnel": { + "6631-Indemnit\u00e9s de logement": {}, + "6632-Indemnit\u00e9s de repr\u00e9sentation": {}, + "6633-Indemnit\u00e9s d\u2019expatriation": {}, + "6634-Indemnit\u00e9s de transport": {}, + "6638-Autres indemnit\u00e9s et avantages divers": {} + }, + "664-Charges sociales": { + "6641-Charges sociales sur r\u00e9mun\u00e9ration du personnel national": {}, + "6642-Charges sociales sur r\u00e9mun\u00e9ration du personnel non national": {} + }, + "666-R\u00e9mun\u00e9rations et charges sociales de l\u2019exploitant individuel": { + "6661-R\u00e9mun\u00e9ration du travail de l\u2019exploitant": {}, + "6662-Charges sociales": {} + }, + "667-R\u00e9mun\u00e9ration transf\u00e9r\u00e9e de personnel ext\u00e9rieur": { + "6671-Personnel int\u00e9rimaire": {}, + "6672-Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": {} + }, + "668-Autres charges sociales": { + "6681-Versements aux syndicats et comit\u00e9s d\u2019entreprise, d\u2019\u00e9tablissement": {}, + "6682-Versements aux comit\u00e9s d\u2019hygi\u00e8ne et de s\u00e9curit\u00e9": {}, + "6683-Versements et contributions aux autres \u0153uvres sociales": {}, + "6684-M\u00e9decine du travail et pharmacie": {}, + "6685-Assurances et organismes de sant\u00e9": {}, + "6686-Assurances retraite et fonds de pension": {}, + "6687-Majorations et p\u00e9nalit\u00e9s sociales": {}, + "6688-Charges sociales diverses": {} + } + }, + "67-Frais financiers et charges assimil\u00e9es": { + "671-Int\u00e9r\u00eats des emprunts": { + "6711-Emprunts obligataires": {}, + "6712-Emprunts aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": {}, + "6713-Dettes li\u00e9es \u00e0 des participations": {}, + "6714-Primes de remboursement des obligations": {} + }, + "672-Int\u00e9r\u00eats dans loyers de location acquisition": { + "6722-Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail immobilier": {}, + "6723-Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail mobilier": {}, + "6724-Int\u00e9r\u00eats dans loyers de location acquisition / location-vente": {}, + "6728-Int\u00e9r\u00eats dans loyers des autres locations acquisition": {} + }, + "673-Escomptes accord\u00e9s": {}, + "674-Autres int\u00e9r\u00eats": { + "6741-Avances re\u00e7ues et d\u00e9p\u00f4ts cr\u00e9diteurs": {}, + "6742-Comptes courants bloqu\u00e9s": {}, + "6743-Int\u00e9r\u00eats sur obligations cautionn\u00e9es": {}, + "6744-Int\u00e9r\u00eats sur dettes commerciales": {}, + "6745-Int\u00e9r\u00eats bancaires et sur op\u00e9rations de financement (escompte...)": {}, + "6748-Int\u00e9r\u00eats sur dettes diverses": {} + }, + "675-Escomptes des effets de commerce": {}, + "676-Pertes de change financi\u00e8res": {}, + "677-Pertes sur titres de placement": { + "6771-Pertes sur cessions de titres de placement": {}, + "6772-Mali provenant d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": {} + }, + "678-Pertes et charges sur risques financiers": { + "6781-Sur rentes viag\u00e8res": {}, + "6782-Sur op\u00e9rations financi\u00e8res": {}, + "6784-Sur instruments de tr\u00e9sorerie": {} + }, + "679-Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "6791-Sur risques financiers": {}, + "6795-Sur titres de placement": {}, + "6798-Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": {} + } + }, + "68-Dotations aux amortissements": { + "681-Dotations aux amortissements d\u2019exploitation": { + "6812-Dotations aux amortissements des immobilisations incorporelles": {}, + "6813-Dotations aux amortissements des immobilisations corporelles": {} + } + }, + "69-Dotations aux provisions et aux d\u00e9pr\u00e9ciations": { + "691-Dotations aux provisions et aux d\u00e9pr\u00e9ciations d\u2019exploitation": { + "6911-Dotations aux provisions pour risques et charges": {}, + "6913-Dotations aux d\u00e9pr\u00e9ciations des immobilisations incorporelles": {}, + "6914-Dotations aux d\u00e9pr\u00e9ciations des immobilisations corporelles": {} + }, + "697-Dotations aux provisions et aux d\u00e9pr\u00e9ciations financi\u00e8res": { + "6971-Dotations aux provisions pour risques et charges": {}, + "6972-Dotations aux d\u00e9pr\u00e9ciations des immobilisations financi\u00e8res": {} + } + }, + "root_type": "Expense" + }, + "7-Comptes de produits des activit\u00e9s ordinaires": { + "70-Ventes": { + "701-Ventes de marchandises": { + "7011-Dans la R\u00e9gion": {}, + "7012-Hors R\u00e9gion": {}, + "7013-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7014-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7015-Sur internet": {}, + "7019-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "702-Ventes de produits finis": { + "7021-Dans la R\u00e9gion": {}, + "7022-Hors R\u00e9gion": {}, + "7023-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7024-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7025-Sur internet": {}, + "7029-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "703-Ventes de produits interm\u00e9diaires": { + "7031-Dans la R\u00e9gion": {}, + "7032-Hors R\u00e9gion": {}, + "7033-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7034-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7035-Sur internet": {}, + "7039-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "704-Ventes de produits r\u00e9siduels": { + "7041-Dans la R\u00e9gion": {}, + "7042-Hors R\u00e9gion": {}, + "7043-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7044-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7045-Sur internet": {}, + "7049-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "705-Travaux factur\u00e9s": { + "7051-Dans la R\u00e9gion": {}, + "7052-Hors R\u00e9gion": {}, + "7053-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7054-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7055-Sur internet": {}, + "7059-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "706-Services vendus": { + "7061-Dans la R\u00e9gion": {}, + "7062-Hors R\u00e9gion": {}, + "7063-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7064-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7065-Sur internet": {}, + "7069-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "707-Produits accessoires": { + "7071-Ports, emballages perdus et autres frais factur\u00e9s": {}, + "7072-Commissions et courtages": {}, + "7073-Locations": {}, + "7074-Bonis sur reprises et cessions d\u2019emballages": {}, + "7075-Mise \u00e0 disposition de personnel": {}, + "7076-Redevances pour brevets, logiciels, marques et droits similaires": {}, + "7077-Services exploit\u00e9s dans l\u2019int\u00e9r\u00eat du personnel": {}, + "7078-Autres produits accessoires": {} + } + }, + "71-Subventions d\u2019exploitation": { + "711-Sur produits \u00e0 l\u2019exportation": {}, + "712-Sur produits \u00e0 l\u2019importation": {}, + "713-Sur produits de p\u00e9r\u00e9quation": {}, + "714-Indemnit\u00e9s et subventions d\u2019exploitation (entit\u00e9 agricole)": {}, + "718-Autres subventions d\u2019exploitation": { + "7181-Vers\u00e9es par l\u2019\u00c9tat et les collectivit\u00e9s publiques": {}, + "7182-Vers\u00e9es par les organismes internationaux": {}, + "7183-Vers\u00e9es par des tiers": {} + } + }, + "72-Production immobilis\u00e9e": { + "721-Immobilisations incorporelles": {}, + "722-Immobilisations corporelles": { + "7221-Immobilisations corporelles (hors actifs biologiques)": {}, + "7222-Immobilisations corporelles (actifs biologiques)": {} + }, + "724-Production auto-consomm\u00e9e": {}, + "726-Immobilisations financi\u00e8res": {} + }, + "73-Variations des stocks de biens et de services produits": { + "734-Variations des stocks de produits en cours": { + "7341-Produits en cours": {}, + "7342-Travaux en cours": {} + }, + "735-Variations des en-cours de services": { + "7351-\u00c9tudes en cours": {}, + "7352-Prestations de services en cours": {} + }, + "736-Variations des stocks de produits finis": {}, + "737-Variations des stocks de produits interm\u00e9diaires et r\u00e9siduels": { + "7371-Produits interm\u00e9diaires": {}, + "7372-Produits r\u00e9siduels": {} + } + }, + "75-Autres produits": { + "751-Profits sur cr\u00e9ances clients et autres d\u00e9biteurs": {}, + "752-Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "7521-Quote-part transf\u00e9r\u00e9e de pertes (comptabilit\u00e9 du g\u00e9rant)": {}, + "7525-B\u00e9n\u00e9fices attribu\u00e9s par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": {} + }, + "754-Produits des cessions courantes d\u2019immobilisations": { + "7541-Immobilisations incorporelles": {}, + "7542-Immobilisations corporelles": {} + }, + "756-Gains de change sur cr\u00e9ances et dettes commerciales": {}, + "758-Produits divers": { + "7581-Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": {}, + "7582-Indemnit\u00e9s d\u2019assurances re\u00e7ues": {}, + "7588-Autres produits divers": {} + }, + "759-Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "7591-Sur risques \u00e0 court terme": {}, + "7593-Sur stocks": {}, + "7594-Sur cr\u00e9ances": {}, + "7598-Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": {} + } + }, + "77-Revenus financiers et produits assimil\u00e9s": { + "771-Int\u00e9r\u00eats de pr\u00eats et cr\u00e9ances diverses": { + "7712-Int\u00e9r\u00eats de pr\u00eats": {}, + "7713-Int\u00e9r\u00eats sur cr\u00e9ances diverses": {} + }, + "772-Revenus de participations et autres titres immobilis\u00e9s": { + "7721-Revenus des titres de participation": {}, + "7722-Revenus autres titres immobilis\u00e9s": {} + }, + "773-Escomptes obtenus": {}, + "774-Revenus de placement": { + "7745-Revenus des obligations": {}, + "7746-Revenus des titres de placement": {} + }, + "775-Int\u00e9r\u00eats dans loyers de location acquisition": {}, + "776-Gains de change financiers": {}, + "777-Gains sur cessions de titres de placement": {}, + "778-Gains sur risques financiers": { + "7781-Sur rentes viag\u00e8res": {}, + "7782-Sur op\u00e9rations financi\u00e8res": {}, + "7784-Sur instruments de tr\u00e9sorerie": {} + }, + "779-Reprises de charges pour d\u00e9pr\u00e9ciations et provisions \u00e0 court terme financi\u00e8res": { + "7791-Sur risques financiers": {}, + "7795-Sur titres de placement": {}, + "7798-Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": {} + } + }, + "78-Transferts de charges": { + "781-Transferts de charges d\u2019exploitation": {}, + "787-Transferts de charges financi\u00e8res": {} + }, + "79-Reprises de provisions, de d\u00e9pr\u00e9ciations et autres": { + "791-Reprises de provisions et d\u00e9pr\u00e9ciations d\u2019exploitation": { + "7911-Pour risques et charges": {}, + "7913-Des immobilisations incorporelles": {}, + "7914-Des immobilisations corporelles": {} + }, + "797-Reprises de provisions et d\u00e9pr\u00e9ciations financi\u00e8res": { + "7971-Pour risques et charges": {}, + "7972-Des immobilisations financi\u00e8res": {} + }, + "798-Reprises d\u2019amortissements": {}, + "799-Reprises de subventions d\u2019investissement": {} + }, + "root_type": "Income" + }, + "8-Comptes des autres charges et des autres produits (CHARGES)": { + "81-Valeurs comptables des cessions d\u2019immobilisations": { + "811-Immobilisations incorporelles": {}, + "812-Immobilisations corporelles": {}, + "816-Immobilisations financi\u00e8res": {} + }, + "83-Charges hors activit\u00e9s ordinaires": { + "831-Charges HAO constat\u00e9es": {}, + "833-Charges li\u00e9es aux op\u00e9rations de restructuration": {}, + "834-Pertes sur cr\u00e9ances HAO": {}, + "835-Dons et lib\u00e9ralit\u00e9s accord\u00e9s": {}, + "836-Abandons de cr\u00e9ances consentis": {}, + "837-Charges li\u00e9es aux op\u00e9rations de liquidation": {}, + "839-Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": {} + }, + "85-Dotations hors activit\u00e9s ordinaires": { + "851-Dotations aux provisions r\u00e9glement\u00e9es": {}, + "852-Dotations aux amortissements HAO": {}, + "853-Dotations aux d\u00e9pr\u00e9ciations HAO": {}, + "854-Dotations aux provisions pour risques et charges HAO": {}, + "858-Autres dotations HAO": {} + }, + "87-Participation des travailleurs": { + "871-Participation l\u00e9gale aux b\u00e9n\u00e9fices": {}, + "874-Participation contractuelle aux b\u00e9n\u00e9fices": {}, + "878-Autres participations": {} + }, + "89-Imp\u00f4ts sur le r\u00e9sultat": { + "891-Imp\u00f4ts sur les b\u00e9n\u00e9fices de l\u2019exercice": { + "8911-Activit\u00e9s exerc\u00e9es dans l\u2019\u00c9tat": {}, + "8912-Activit\u00e9s exerc\u00e9es dans les autres \u00c9tats de la R\u00e9gion": {}, + "8913-Activit\u00e9s exerc\u00e9es hors R\u00e9gion": {} + }, + "892-Rappel d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": {}, + "895-Imp\u00f4t minimum forfaitaire IMF": {}, + "899-D\u00e9gr\u00e8vements et annulations d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": { + "8991-D\u00e9gr\u00e8vements": {}, + "8994-Annulations pour pertes r\u00e9troactives": {} + } + }, + "root_type": "Expense" + }, + "8-Comptes des autres charges et des autres produits (PRODUITS)": { + "82-Produits des cessions d\u2019immobilisations": { + "821-Immobilisations incorporelles": {}, + "822-Immobilisations corporelles": {}, + "826-Immobilisations financi\u00e8res": {} + }, + "84-Produits hors activit\u00e9s ordinaires": { + "841-Produits HAO constat\u00e9s": {}, + "843-Produits li\u00e9s aux op\u00e9rations de restructuration": {}, + "844-Indemnit\u00e9s et subventions HAO (entit\u00e9 agricole)": {}, + "845-Dons et lib\u00e9ralit\u00e9s obtenus": {}, + "846-Abandons de cr\u00e9ances obtenus": {}, + "847-Produits li\u00e9s aux op\u00e9rations de liquidation": {}, + "848-Transferts de charges HAO": {}, + "849-Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": {} + }, + "86-Reprises de charges, provisions et d\u00e9pr\u00e9ciations HAO": { + "861-Reprises de provisions r\u00e9glement\u00e9es": {}, + "862-Reprises d\u2019amortissements HAO": {}, + "863-Reprises de d\u00e9pr\u00e9ciations HAO": {}, + "864-Reprises de provisions pour risques et charges HAO": {}, + "868-Autres reprises HAO": {} + }, + "88-Subventions d\u2019\u00e9quilibre": { + "881-\u00c9tat": {}, + "884-Collectivit\u00e9s publiques": {}, + "886-Groupe": {}, + "888-Autres": {} + }, + "root_type": "Income" + } + } +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/cd_plan_comptable_avec_code.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/cd_plan_comptable_avec_code.json new file mode 100644 index 00000000000..a8d2ad848db --- /dev/null +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/cd_plan_comptable_avec_code.json @@ -0,0 +1,4208 @@ +{ + "country_code": "cd", + "name": "Syscohada - Plan Comptable avec code", + "tree": { + "Comptes de ressources durables": { + "Capital": { + "Capital social": { + "Capital souscrit, non appel\u00e9": { + "account_number": "1011" + }, + "Capital souscrit, appel\u00e9, non vers\u00e9": { + "account_number": "1012" + }, + "Capital souscrit, appel\u00e9, vers\u00e9, non amorti": { + "account_number": "1013" + }, + "Capital souscrit, appel\u00e9, vers\u00e9, amorti": { + "account_number": "1014" + }, + "Capital souscrit soumis \u00e0 des conditions particuli\u00e8res": { + "account_number": "1018" + }, + "account_number": "101" + }, + "Capital par dotation": { + "Dotation initiale": { + "account_number": "1021" + }, + "Dotations compl\u00e9mentaires": { + "account_number": "1022" + }, + "Autres dotations": { + "account_number": "1028" + }, + "account_number": "102" + }, + "Capital personnel": { + "account_number": "103" + }, + "Compte de l\u2019exploitant": { + "Apports temporaires": { + "account_number": "1041" + }, + "Op\u00e9rations courantes": { + "account_number": "1042" + }, + "R\u00e9mun\u00e9rations, imp\u00f4ts et autres charges personnelles": { + "account_number": "1043" + }, + "Pr\u00e9l\u00e8vements d\u2019autoconsommation": { + "account_number": "1047" + }, + "Autres pr\u00e9l\u00e8vements": { + "account_number": "1048" + }, + "account_number": "104" + }, + "Primes li\u00e9es au capital social": { + "Primes d\u2019\u00e9mission": { + "account_number": "1051" + }, + "Primes d\u2019apport": { + "account_number": "1052" + }, + "Primes de fusion": { + "account_number": "1053" + }, + "Primes de conversion": { + "account_number": "1054" + }, + "Autres primes": { + "account_number": "1058" + }, + "account_number": "105" + }, + "\u00c9carts de r\u00e9\u00e9valuation": { + "\u00c9carts de r\u00e9\u00e9valuation l\u00e9gale": { + "account_number": "1061" + }, + "\u00c9carts de r\u00e9\u00e9valuation libre": { + "account_number": "1062" + }, + "account_number": "106" + }, + "Apporteurs, capital souscrit, non appel\u00e9": { + "account_number": "109" + }, + "account_number": "10" + }, + "R\u00e9serves": { + "R\u00e9serve l\u00e9gale": { + "account_number": "111" + }, + "R\u00e9serves statutaires ou contractuelles": { + "account_number": "112" + }, + "R\u00e9serves r\u00e9glement\u00e9es": { + "R\u00e9serves de plus-values nettes \u00e0 long terme": { + "account_number": "1131" + }, + "R\u00e9serves d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": { + "account_number": "1132" + }, + "R\u00e9serves cons\u00e9cutives \u00e0 l\u2019octroi de subventions d\u2019investissement": { + "account_number": "1133" + }, + "R\u00e9serves des valeurs mobili\u00e8res donnant acc\u00e8s au capital": { + "account_number": "1134" + }, + "Autres r\u00e9serves r\u00e9glement\u00e9es": { + "account_number": "1135" + }, + "account_number": "113" + }, + "Autres r\u00e9serves": { + "R\u00e9serves facultatives": { + "account_number": "1181" + }, + "R\u00e9serves diverses": { + "account_number": "1188" + }, + "account_number": "118" + }, + "account_number": "11" + }, + "Report \u00e0 nouveau": { + "Report \u00e0 nouveau cr\u00e9diteur": { + "account_number": "121" + }, + "Report \u00e0 nouveau d\u00e9biteur": { + "Perte nette \u00e0 reporter": { + "account_number": "1291" + }, + "Perte Amortissements r\u00e9put\u00e9s diff\u00e9r\u00e9s": { + "account_number": "1292" + }, + "account_number": "129" + }, + "account_number": "12" + }, + "R\u00e9sultat net de l\u2019exercice": { + "R\u00e9sultat en instance d\u2019affectation": { + "R\u00e9sultat en instance d\u2019affectation : b\u00e9n\u00e9fice": { + "account_number": "1301" + }, + "R\u00e9sultat en instance d\u2019affectation : perte": { + "account_number": "1309" + }, + "account_number": "130" + }, + "R\u00e9sultat net : b\u00e9n\u00e9fice": { + "account_number": "131" + }, + "Marge commerciale (MC)": { + "account_number": "132" + }, + "Valeur ajout\u00e9e (VA)": { + "account_number": "133" + }, + "Exc\u00e9dent brut d\u2019exploitation (EBE)": { + "account_number": "134" + }, + "R\u00e9sultat d\u2019exploitation (RE)": { + "account_number": "135" + }, + "R\u00e9sultat financier (RF)": { + "account_number": "136" + }, + "R\u00e9sultat des activit\u00e9s ordinaires (RAO)": { + "account_number": "137" + }, + "R\u00e9sultat hors activit\u00e9s ordinaires (RHAO)": { + "R\u00e9sultat de fusion": { + "account_number": "1381" + }, + "R\u00e9sultat d\u2019apport partiel d\u2019actif": { + "account_number": "1382" + }, + "R\u00e9sultat de scission": { + "account_number": "1383" + }, + "R\u00e9sultat de liquidation": { + "account_number": "1384" + }, + "account_number": "138" + }, + "R\u00e9sultat net : perte": { + "account_number": "139" + }, + "account_number": "13" + }, + "Subventions d\u2019investissement": { + "Subventions d\u2019\u00e9quipement": { + "\u00c9tat": { + "account_number": "1411" + }, + "R\u00e9gions": { + "account_number": "1412" + }, + "D\u00e9partements": { + "account_number": "1413" + }, + "Communes et collectivit\u00e9s publiques d\u00e9centralis\u00e9es": { + "account_number": "1414" + }, + "Entit\u00e9s publiques ou mixtes": { + "account_number": "1415" + }, + "Entit\u00e9s et organismes priv\u00e9s": { + "account_number": "1416" + }, + "Organismes internationaux": { + "account_number": "1417" + }, + "Autres": { + "account_number": "1418" + }, + "account_number": "141" + }, + "Autres subventions d\u2019investissement": { + "account_number": "148" + }, + "account_number": "14" + }, + "Provisions r\u00e9glement\u00e9es et fonds assimil\u00e9s": { + "Amortissements d\u00e9rogatoires": { + "account_number": "151" + }, + "Plus-values de cession \u00e0 r\u00e9investir": { + "account_number": "152" + }, + "Fonds r\u00e9glement\u00e9s": { + "Fonds National": { + "account_number": "1531" + }, + "Pr\u00e9l\u00e8vement pour le Budget": { + "account_number": "1532" + }, + "account_number": "153" + }, + "Provisions sp\u00e9ciales de r\u00e9\u00e9valuation": { + "account_number": "154" + }, + "Provisions r\u00e9glement\u00e9es relatives aux immobilisations": { + "Reconstitution des gisements miniers et p\u00e9troliers": { + "account_number": "1551" + }, + "account_number": "155" + }, + "Provisions r\u00e9glement\u00e9es relatives aux stocks": { + "Hausse de prix": { + "account_number": "1561" + }, + "Fluctuation des cours": { + "account_number": "1562" + }, + "account_number": "156" + }, + "Provisions pour investissement": { + "account_number": "157" + }, + "Autres provisions et fonds r\u00e9glement\u00e9s": { + "account_number": "158" + }, + "account_number": "15" + }, + "Emprunts et dettes assimil\u00e9es": { + "Emprunts obligataires": { + "Emprunts obligataires ordinaires": { + "account_number": "1611" + }, + "Emprunts obligataires convertibles en actions": { + "account_number": "1612" + }, + "Emprunts obligataires remboursables en actions": { + "account_number": "1613" + }, + "Autres emprunts obligataires": { + "account_number": "1618" + }, + "account_number": "161" + }, + "Emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": { + "account_number": "162" + }, + "Avances re\u00e7ues de l\u2019\u00c9tat": { + "account_number": "163" + }, + "Avances re\u00e7ues et comptes courants bloqu\u00e9s": { + "account_number": "164" + }, + "D\u00e9p\u00f4ts et cautionnements re\u00e7us": { + "D\u00e9p\u00f4ts": { + "account_number": "1651" + }, + "Cautionnements": { + "account_number": "1652" + }, + "account_number": "165" + }, + "Int\u00e9r\u00eats courus": { + "Sur emprunts obligataires": { + "account_number": "1661" + }, + "Sur emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": { + "account_number": "1662" + }, + "Sur avances re\u00e7ues de l\u2019\u00c9tat": { + "account_number": "1663" + }, + "Sur avances re\u00e7ues et comptes courants bloqu\u00e9s": { + "account_number": "1664" + }, + "Sur d\u00e9p\u00f4ts et cautionnements re\u00e7us": { + "account_number": "1665" + }, + "Sur avances assorties de conditions particuli\u00e8res": { + "account_number": "1667" + }, + "Sur autres emprunts et dettes": { + "account_number": "1668" + }, + "account_number": "166" + }, + "Avances assorties de conditions particuli\u00e8res": { + "Avances bloqu\u00e9es pour augmentation du capital": { + "account_number": "1671" + }, + "Avances conditionn\u00e9es par l\u2019\u00c9tat": { + "account_number": "1672" + }, + "Avances conditionn\u00e9es par les autres organismes africains": { + "account_number": "1673" + }, + "Avances conditionn\u00e9es par les organismes internationaux": { + "account_number": "1674" + }, + "account_number": "167" + }, + "Autres emprunts et dettes": { + "Rentes viag\u00e8res capitalis\u00e9es": { + "account_number": "1681" + }, + "Billets de fonds": { + "account_number": "1682" + }, + "Dettes cons\u00e9cutives \u00e0 des titres emprunt\u00e9s": { + "account_number": "1683" + }, + "Emprunts participatifs": { + "account_number": "1684" + }, + "Participation des travailleurs aux b\u00e9n\u00e9fices": { + "account_number": "1685" + }, + "Emprunts et dettes contract\u00e9s aupr\u00e8s des autres tiers": { + "account_number": "1686" + }, + "account_number": "168" + }, + "account_number": "16" + }, + "Dettes de location acquisition": { + "Dettes de location acquisition / cr\u00e9dit bail immobilier": { + "account_number": "172" + }, + "Dettes de location acquisition / cr\u00e9dit bail mobilier": { + "account_number": "173" + }, + "Dettes de location acquisition / location de vente": { + "account_number": "174" + }, + "Int\u00e9r\u00eats courus": { + "Sur dettes de location acquisition / cr\u00e9dit-bail immobilier": { + "account_number": "1762" + }, + "Sur dettes de location acquisition / cr\u00e9dit-bail mobilier": { + "account_number": "1763" + }, + "Sur dettes de location acquisition / location-vente": { + "account_number": "1764" + }, + "Sur autres dettes de location acquisition": { + "account_number": "1768" + }, + "account_number": "176" + }, + "Autres dettes de location acquisition": { + "account_number": "178" + }, + "account_number": "17" + }, + "Dettes li\u00e9es \u00e0 des participations et comptes de liaison des \u00e9tablissements et soci\u00e9t\u00e9s en participation": { + "Dettes li\u00e9es \u00e0 des participations": { + "Dettes li\u00e9es \u00e0 des participations (groupe)": { + "account_number": "1811" + }, + "Dettes li\u00e9es \u00e0 des participations (hors groupe)": { + "account_number": "1812" + }, + "account_number": "181" + }, + "Dettes li\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": { + "account_number": "182" + }, + "Int\u00e9r\u00eats courus sur dettes li\u00e9es \u00e0 des participations": { + "account_number": "183" + }, + "Comptes permanents bloqu\u00e9s des \u00e9tablissements et succursales": { + "account_number": "184" + }, + "Comptes permanents non bloqu\u00e9s des \u00e9tablissements et succursales": { + "account_number": "185" + }, + "Comptes de liaison charges": { + "account_number": "186" + }, + "Comptes de liaison produits": { + "account_number": "187" + }, + "Comptes de liaison des soci\u00e9t\u00e9s en participation": { + "account_number": "188" + }, + "account_number": "18" + }, + "Provisions pour risques et charges": { + "Provisions pour litiges": { + "account_number": "191" + }, + "Provisions pour garanties donn\u00e9es aux clients": { + "account_number": "192" + }, + "Provisions pour pertes sur march\u00e9s \u00e0 ach\u00e8vement futur": { + "account_number": "193" + }, + "Provisions pour pertes de change": { + "account_number": "194" + }, + "Provisions pour imp\u00f4ts": { + "account_number": "195" + }, + "Provisions pour pensions et obligations similaires": { + "Provisions pour pensions et obligations similaires engagement de retraite": { + "account_number": "1961" + }, + "Actif du r\u00e9gime de retraite": { + "account_number": "1962" + }, + "account_number": "196" + }, + "Provisions pour restructuration": { + "account_number": "197" + }, + "Autres provisions pour risques et charges": { + "Provisions pour amendes et p\u00e9nalit\u00e9s": { + "account_number": "1981" + }, + "Provisions pour propre assureur": { + "account_number": "1983" + }, + "Provisions pour d\u00e9mant\u00e8lement et remise en \u00e9tat": { + "account_number": "1984" + }, + "Provisions pour droits \u00e0 r\u00e9duction ou avantage en nature (ch\u00e8ques cadeau, cartes de fid\u00e9lit\u00e9...)": { + "account_number": "1985" + }, + "Provisions pour divers risques et charges": { + "account_number": "1988" + }, + "account_number": "198" + }, + "account_number": "19" + }, + "root_type": "Equity", + "account_number": "1" + }, + "Comptes d\u2019actif immobilis\u00e9": { + "Immobilisations incorporelles": { + "account_type": "Fixed Asset", + "Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset", + "account_number": "211" + }, + "Brevets, licences, concessions et droits similaires": { + "account_type": "Fixed Asset", + "Brevets": { + "account_type": "Fixed Asset", + "account_number": "2121" + }, + "Licences": { + "account_type": "Fixed Asset", + "account_number": "2122" + }, + "Concessions de service public": { + "account_type": "Fixed Asset", + "account_number": "2123" + }, + "Autres concessions et droits similaires": { + "account_type": "Fixed Asset", + "account_number": "2128" + }, + "account_number": "212" + }, + "Logiciels et sites internet": { + "account_type": "Fixed Asset", + "Logiciels": { + "account_type": "Fixed Asset", + "account_number": "2131" + }, + "Sites internet": { + "account_type": "Fixed Asset", + "account_number": "2132" + }, + "account_number": "213" + }, + "Marques": { + "account_type": "Fixed Asset", + "account_number": "214" + }, + "Fonds commercial": { + "account_type": "Fixed Asset", + "account_number": "215" + }, + "Droit au bail": { + "account_type": "Fixed Asset", + "account_number": "216" + }, + "Investissements de cr\u00e9ation": { + "account_type": "Fixed Asset", + "account_number": "217" + }, + "Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset", + "Frais de prospection et d\u2019\u00e9valuation de ressources min\u00e9rales": { + "account_type": "Fixed Asset", + "account_number": "2181" + }, + "Co\u00fbts d\u2019obtention du contrat": { + "account_type": "Fixed Asset", + "account_number": "2182" + }, + "Fichiers clients, notices, titres de journaux et magazines": { + "account_type": "Fixed Asset", + "account_number": "2183" + }, + "Co\u00fbts des franchises": { + "account_type": "Fixed Asset", + "account_number": "2184" + }, + "Divers droits et valeurs incorporelles": { + "account_type": "Fixed Asset", + "account_number": "2188" + }, + "account_number": "218" + }, + "Immobilisations incorporelles en cours": { + "account_type": "Fixed Asset", + "Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset", + "account_number": "2191" + }, + "Logiciels et internet": { + "account_type": "Fixed Asset", + "account_number": "2193" + }, + "Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset", + "account_number": "2198" + }, + "account_number": "219" + }, + "account_number": "21" + }, + "Terrains": { + "account_type": "Fixed Asset", + "Terrains agricoles et forestiers": { + "account_type": "Fixed Asset", + "Terrains d\u2019exploitation agricole": { + "account_type": "Fixed Asset", + "account_number": "2211" + }, + "Terrains d\u2019exploitation foresti\u00e8re": { + "account_type": "Fixed Asset", + "account_number": "2212" + }, + "Autres terrains": { + "account_type": "Fixed Asset", + "account_number": "2218" + }, + "account_number": "221" + }, + "Terrains nus": { + "account_type": "Fixed Asset", + "Terrains \u00e0 b\u00e2tir": { + "account_type": "Fixed Asset", + "account_number": "2221" + }, + "Autres terrains nus": { + "account_type": "Fixed Asset", + "account_number": "2228" + }, + "account_number": "222" + }, + "Terrains b\u00e2tis": { + "account_type": "Fixed Asset", + "Pour b\u00e2timents industriels et agricoles": { + "account_type": "Fixed Asset", + "account_number": "2231" + }, + "Pour b\u00e2timents administratifs et commerciaux": { + "account_type": "Fixed Asset", + "account_number": "2232" + }, + "Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations professionnelles": { + "account_type": "Fixed Asset", + "account_number": "2234" + }, + "Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations non professionnelles": { + "account_type": "Fixed Asset", + "account_number": "2235" + }, + "Autres terrains b\u00e2tis": { + "account_type": "Fixed Asset", + "account_number": "2238" + }, + "account_number": "223" + }, + "Travaux de mise en valeur des terrains": { + "account_type": "Fixed Asset", + "Plantation d\u2019arbres et d\u2019arbustes": { + "account_type": "Fixed Asset", + "account_number": "2241" + }, + "Am\u00e9liorations du fonds": { + "account_type": "Fixed Asset", + "account_number": "2245" + }, + "Autres travaux": { + "account_type": "Fixed Asset", + "account_number": "2248" + }, + "account_number": "224" + }, + "Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset", + "Carri\u00e8res": { + "account_type": "Fixed Asset", + "account_number": "2251" + }, + "account_number": "225" + }, + "Terrains am\u00e9nag\u00e9s": { + "account_type": "Fixed Asset", + "Parkings": { + "account_type": "Fixed Asset", + "account_number": "2261" + }, + "account_number": "226" + }, + "Terrains mis en concession": { + "account_type": "Fixed Asset", + "account_number": "227" + }, + "Autres terrains": { + "account_type": "Fixed Asset", + "Terrains immeubles de placement": { + "account_type": "Fixed Asset", + "account_number": "2281" + }, + "Terrains des logements affect\u00e9s au personnel": { + "account_type": "Fixed Asset", + "account_number": "2285" + }, + "Terrains de location acquisition": { + "account_type": "Fixed Asset", + "account_number": "2286" + }, + "Divers terrains": { + "account_type": "Fixed Asset", + "account_number": "2288" + }, + "account_number": "228" + }, + "Am\u00e9nagements de terrains en cours": { + "account_type": "Fixed Asset", + "Terrains agricoles et forestiers": { + "account_type": "Fixed Asset", + "account_number": "2291" + }, + "Terrains nus": { + "account_type": "Fixed Asset", + "account_number": "2292" + }, + "Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset", + "account_number": "2295" + }, + "Autres terrains": { + "account_type": "Fixed Asset", + "account_number": "2298" + }, + "account_number": "229" + }, + "account_number": "22" + }, + "B\u00e2timents, installations techniques et agencements": { + "B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "B\u00e2timents industriels": { + "account_number": "2311" + }, + "B\u00e2timents agricoles": { + "account_number": "2312" + }, + "B\u00e2timents administratifs et commerciaux": { + "account_number": "2313" + }, + "B\u00e2timents affect\u00e9s au logement du personnel": { + "account_number": "2314" + }, + "B\u00e2timents immeubles de placement": { + "account_number": "2315" + }, + "B\u00e2timents de location acquisition": { + "account_number": "2316" + }, + "account_number": "231" + }, + "B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "B\u00e2timents industriels": { + "account_number": "2321" + }, + "B\u00e2timents agricoles": { + "account_number": "2322" + }, + "B\u00e2timents administratifs et commerciaux": { + "account_number": "2323" + }, + "B\u00e2timents affect\u00e9s au logement du personnel": { + "account_number": "2324" + }, + "B\u00e2timents immeubles de placement": { + "account_number": "2325" + }, + "B\u00e2timents de location acquisition": { + "account_number": "2326" + }, + "account_number": "232" + }, + "Ouvrages d\u2019infrastructure": { + "Voies de terre": { + "account_number": "2331" + }, + "Voies de fer": { + "account_number": "2332" + }, + "Voies d\u2019eau": { + "account_number": "2333" + }, + "Barrages, Digues": { + "account_number": "2334" + }, + "Pistes d\u2019a\u00e9rodrome": { + "account_number": "2335" + }, + "Autres ouvrages d\u2019infrastructures": { + "account_number": "2338" + }, + "account_number": "233" + }, + "Am\u00e9nagements, agencements et installations techniques": { + "Installations complexes sp\u00e9cialis\u00e9es sur sol propre": { + "account_number": "2341" + }, + "Installations complexes sp\u00e9cialis\u00e9es sur sol d\u2019autrui": { + "account_number": "2342" + }, + "Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol propre": { + "account_number": "2343" + }, + "Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol d\u2019autrui": { + "account_number": "2344" + }, + "Am\u00e9nagements et agencements des b\u00e2timents": { + "account_number": "2345" + }, + "account_number": "234" + }, + "Am\u00e9nagements de bureaux": { + "Installations g\u00e9n\u00e9rales": { + "account_number": "2351" + }, + "Autres am\u00e9nagements de bureaux": { + "account_number": "2358" + }, + "account_number": "235" + }, + "B\u00e2timents industriels, agricoles et commerciaux mis en concession": { + "account_number": "237" + }, + "Autres installations et agencements": { + "account_number": "238" + }, + "B\u00e2timents am\u00e9nagements, agencements et installations en cours": { + "B\u00e2timents en cours": { + "account_number": "2391" + }, + "Installations en cours": { + "account_number": "2392" + }, + "Ouvrages d\u2019infrastructure en cours": { + "account_number": "2393" + }, + "Am\u00e9nagements et agencements et installations techniques en cours": { + "account_number": "2394" + }, + "Am\u00e9nagements de bureaux en cours": { + "account_number": "2395" + }, + "Autres installations et agencements en cours": { + "account_number": "2398" + }, + "account_number": "239" + }, + "account_number": "23" + }, + "Mat\u00e9riel, mobilier et actifs biologiques": { + "Mat\u00e9riel et outillage industriel et commercial": { + "Mat\u00e9riel industriel": { + "account_number": "2411" + }, + "Outillage industriel": { + "account_number": "2412" + }, + "Mat\u00e9riel commercial": { + "account_number": "2413" + }, + "Outillage commercial": { + "account_number": "2414" + }, + "Mat\u00e9riel & outillage industriel et commercial de location-acquisition": { + "account_number": "2416" + }, + "account_number": "241" + }, + "Mat\u00e9riel et outillage agricole": { + "Mat\u00e9riel agricole": { + "account_number": "2421" + }, + "Outillage agricole": { + "account_number": "2422" + }, + "Mat\u00e9riel & outillage agricole de location-acquisition": { + "account_number": "2426" + }, + "account_number": "242" + }, + "Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "243" + }, + "Mat\u00e9riel et mobilier": { + "Mat\u00e9riel de bureau": { + "account_number": "2441" + }, + "Mat\u00e9riel informatique": { + "account_number": "2442" + }, + "Mat\u00e9riel bureautique": { + "account_number": "2443" + }, + "Mobilier de bureau": { + "account_number": "2444" + }, + "Mat\u00e9riel et mobilier immeubles de placement": { + "account_number": "2445" + }, + "Mat\u00e9riel et mobilier de location acquisition": { + "account_number": "2446" + }, + "Mat\u00e9riel et mobilier des logements du personnel": { + "account_number": "2447" + }, + "account_number": "244" + }, + "Mat\u00e9riel de transport": { + "Mat\u00e9riel automobile": { + "account_number": "2451" + }, + "Mat\u00e9riel ferroviaire": { + "account_number": "2452" + }, + "Mat\u00e9riel fluvial, lagunaire": { + "account_number": "2453" + }, + "Mat\u00e9riel naval": { + "account_number": "2454" + }, + "Mat\u00e9riel a\u00e9rien": { + "account_number": "2455" + }, + "Mat\u00e9riel de transport de location-acquisition": { + "account_number": "2456" + }, + "Mat\u00e9riel hippomobile": { + "account_number": "2457" + }, + "Autres mat\u00e9riels de transport": { + "account_number": "2458" + }, + "account_number": "245" + }, + "Actifs biologiques": { + "Cheptel, animaux de trait": { + "account_number": "2461" + }, + "Cheptel, animaux reproducteurs": { + "account_number": "2462" + }, + "Animaux de garde": { + "account_number": "2463" + }, + "Plantations agricoles": { + "account_number": "2465" + }, + "Autres actifs biologiques": { + "account_number": "2468" + }, + "account_number": "246" + }, + "Agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "Agencements et am\u00e9nagements du mat\u00e9riel": { + "account_number": "2471" + }, + "Agencements et am\u00e9nagements des actifs biologiques": { + "account_number": "2472" + }, + "Autres agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "account_number": "2478" + }, + "account_number": "247" + }, + "Autres mat\u00e9riels et mobiliers": { + "Collections et \u0153uvres d\u2019art": { + "account_number": "2481" + }, + "Divers mat\u00e9riels mobiliers": { + "account_number": "2488" + }, + "account_number": "248" + }, + "Mat\u00e9riels et actifs biologiques en cours": { + "Mat\u00e9riel et outillage industriel et commercial": { + "account_number": "2491" + }, + "Mat\u00e9riel et outillage agricole": { + "account_number": "2492" + }, + "Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "2493" + }, + "Mat\u00e9riel et mobilier de bureau": { + "account_number": "2494" + }, + "Mat\u00e9riel de transport": { + "account_number": "2495" + }, + "Actifs biologiques": { + "account_number": "2496" + }, + "Agencements am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "account_number": "2497" + }, + "Autres mat\u00e9riels et actifs biologiques en cours": { + "account_number": "2498" + }, + "account_number": "249" + }, + "account_number": "24" + }, + "Avances et acomptes vers\u00e9s sur immobilisations": { + "Avances et acomptes vers\u00e9s sur immobilisations incorporelles": { + "account_number": "251" + }, + "Avances et acomptes vers\u00e9s sur immobilisations corporelles": { + "account_number": "252" + }, + "account_number": "25" + }, + "Titres de participation": { + "Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": { + "account_number": "261" + }, + "Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le conjoint": { + "account_number": "262" + }, + "Titres de participation dans des soci\u00e9t\u00e9s conf\u00e9rant une influence notable": { + "account_number": "263" + }, + "Participations dans des organismes professionnels": { + "account_number": "265" + }, + "Parts dans des groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": { + "account_number": "266" + }, + "Autres titres de participation": { + "account_number": "268" + }, + "account_number": "26" + }, + "Autres immobilisations financi\u00e8res": { + "Pr\u00eats et cr\u00e9ances": { + "Pr\u00eats participatifs": { + "account_number": "2711" + }, + "Pr\u00eats aux associ\u00e9s": { + "account_number": "2712" + }, + "Billets de fonds": { + "account_number": "2713" + }, + "Titres pr\u00eat\u00e9s": { + "account_number": "2714" + }, + "Autres pr\u00eats et cr\u00e9ances": { + "account_number": "2718" + }, + "account_number": "271" + }, + "Pr\u00eats au personnel": { + "Pr\u00eats immobiliers": { + "account_number": "2721" + }, + "Pr\u00eats mobiliers et d\u2019installation": { + "account_number": "2722" + }, + "Autres pr\u00eats au personnel": { + "account_number": "2728" + }, + "account_number": "272" + }, + "Cr\u00e9ances sur l\u2019\u00c9tat": { + "Retenues de garantie": { + "account_number": "2731" + }, + "Fonds r\u00e9glement\u00e9": { + "account_number": "2733" + }, + "Cr\u00e9ances sur le conc\u00e9dant": { + "account_number": "2734" + }, + "Autres cr\u00e9ances sur l\u2019\u00c9tat": { + "account_number": "2738" + }, + "account_number": "273" + }, + "Titres immobilis\u00e9s": { + "Titres immobilis\u00e9s de l\u2019activit\u00e9 de portefeuille (TIAP)": { + "account_number": "2741" + }, + "Titres participatifs": { + "account_number": "2742" + }, + "Certificats d\u2019investissement": { + "account_number": "2743" + }, + "Parts de fonds commun de placement (FCP)": { + "account_number": "2744" + }, + "Obligations": { + "account_number": "2745" + }, + "Actions ou parts propres": { + "account_number": "2746" + }, + "Autres titres immobilis\u00e9s": { + "account_number": "2748" + }, + "account_number": "274" + }, + "D\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "D\u00e9p\u00f4ts pour loyers d\u2019avance": { + "account_number": "2751" + }, + "D\u00e9p\u00f4ts pour l\u2019\u00e9lectricit\u00e9": { + "account_number": "2752" + }, + "D\u00e9p\u00f4ts pour l\u2019eau": { + "account_number": "2753" + }, + "D\u00e9p\u00f4ts pour le gaz": { + "account_number": "2754" + }, + "D\u00e9p\u00f4ts pour le t\u00e9l\u00e9phone, le t\u00e9lex, la t\u00e9l\u00e9copie": { + "account_number": "2755" + }, + "Cautionnements sur march\u00e9s publics": { + "account_number": "2756" + }, + "Cautionnements sur autres op\u00e9rations": { + "account_number": "2757" + }, + "Autres d\u00e9p\u00f4ts et cautionnements": { + "account_number": "2758" + }, + "account_number": "275" + }, + "Int\u00e9r\u00eats courus": { + "Pr\u00eats et cr\u00e9ances non commerciales": { + "account_number": "2761" + }, + "Pr\u00eats au personnel": { + "account_number": "2762" + }, + "Cr\u00e9ances sur l\u2019\u00c9tat": { + "account_number": "2763" + }, + "Titres immobilis\u00e9s": { + "account_number": "2764" + }, + "D\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "account_number": "2765" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations": { + "account_number": "2767" + }, + "Immobilisations financi\u00e8res diverses": { + "account_number": "2768" + }, + "account_number": "276" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": { + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations (groupe)": { + "account_number": "2771" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations (hors groupe)": { + "account_number": "2772" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": { + "account_number": "2773" + }, + "Avances \u00e0 des Groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": { + "account_number": "2774" + }, + "account_number": "277" + }, + "Immobilisations financi\u00e8res diverses": { + "Cr\u00e9ances diverses groupe": { + "account_number": "2781" + }, + "Cr\u00e9ances diverses hors groupe": { + "account_number": "2782" + }, + "Banques d\u00e9p\u00f4ts \u00e0 terme": { + "account_number": "2784" + }, + "Or et m\u00e9taux pr\u00e9cieux": { + "account_number": "2785" + }, + "Autres immobilisations financi\u00e8res": { + "account_number": "2788" + }, + "account_number": "278" + }, + "account_number": "27" + }, + "Amortissements": { + "account_type": "Accumulated Depreciation", + "Amortissements des immobilisations corporelles": { + "account_type": "Accumulated Depreciation", + "Amortissements des frais de d\u00e9veloppement": { + "account_type": "Accumulated Depreciation", + "account_number": "2811" + }, + "Amortissements des brevets, licences, concessions et droits similaires": { + "account_type": "Accumulated Depreciation", + "account_number": "2812" + }, + "Amortissements des logiciels et sites internet": { + "account_type": "Accumulated Depreciation", + "account_number": "2813" + }, + "Amortissements des marques": { + "account_type": "Accumulated Depreciation", + "account_number": "2814" + }, + "Amortissements du fonds commercial": { + "account_type": "Accumulated Depreciation", + "account_number": "2815" + }, + "Amortissements du droit au bail": { + "account_type": "Accumulated Depreciation", + "account_number": "2816" + }, + "Amortissements des investissements de cr\u00e9ation": { + "account_type": "Accumulated Depreciation", + "account_number": "2817" + }, + "Amortissements des autres droits et valeurs incorporels": { + "account_type": "Accumulated Depreciation", + "account_number": "2818" + }, + "account_number": "281" + }, + "Amortissements des terrains": { + "Amortissements des travaux de mise en valeur des terrains": { + "account_number": "2824" + }, + "account_number": "282" + }, + "Amortissements des b\u00e2timents, installations techniques et agencements": { + "Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "account_number": "2831" + }, + "Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "account_number": "2832" + }, + "Amortissements des ouvrages d\u2019infrastructure": { + "account_number": "2833" + }, + "Amortissements des am\u00e9nagements, agencements et installations techniques": { + "account_number": "2834" + }, + "Amortissements des am\u00e9nagements de bureaux": { + "account_number": "2835" + }, + "Amortissements des b\u00e2timents industriels, agricoles et commerciaux mis en concession": { + "account_number": "2837" + }, + "Amortissements des autres installations et agencements": { + "account_number": "2838" + }, + "account_number": "283" + }, + "Amortissements du mat\u00e9riel": { + "Amortissements du mat\u00e9riel et outillage industriel et commercial": { + "account_number": "2841" + }, + "Amortissements du mat\u00e9riel et outillage agricole": { + "account_number": "2842" + }, + "Amortissements du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "2843" + }, + "Amortissements du mat\u00e9riel et mobilier": { + "account_number": "2844" + }, + "Amortissements du mat\u00e9riel de transport": { + "account_number": "2845" + }, + "Amortissements des actifs biologiques": { + "account_number": "2846" + }, + "Amortissements des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": { + "account_number": "2847" + }, + "Amortissements des autres mat\u00e9riels": { + "account_number": "2848" + }, + "account_number": "284" + }, + "account_number": "28" + }, + "D\u00e9pr\u00e9ciations des immobilisations": { + "D\u00e9pr\u00e9ciations des immobilisations incorporelles": { + "D\u00e9pr\u00e9ciations des frais de d\u00e9veloppement": { + "account_number": "2911" + }, + "D\u00e9pr\u00e9ciations des brevets, licences, concessions et droits similaires": { + "account_number": "2912" + }, + "D\u00e9pr\u00e9ciations des logiciels et sites internet": { + "account_number": "2913" + }, + "D\u00e9pr\u00e9ciations des marques": { + "account_number": "2914" + }, + "D\u00e9pr\u00e9ciations du fonds commercial": { + "account_number": "2915" + }, + "D\u00e9pr\u00e9ciations du droit au bail": { + "account_number": "2916" + }, + "D\u00e9pr\u00e9ciations des investissements de cr\u00e9ation": { + "account_number": "2917" + }, + "D\u00e9pr\u00e9ciations des autres droits et valeurs incorporels": { + "account_number": "2918" + }, + "D\u00e9pr\u00e9ciations des immobilisations incorporelles en cours": { + "account_number": "2919" + }, + "account_number": "291" + }, + "D\u00e9pr\u00e9ciations des terrains": { + "D\u00e9pr\u00e9ciations des terrains agricoles et forestiers": { + "account_number": "2921" + }, + "D\u00e9pr\u00e9ciations des terrains nus": { + "account_number": "2922" + }, + "D\u00e9pr\u00e9ciations des terrains b\u00e2tis": { + "account_number": "2923" + }, + "D\u00e9pr\u00e9ciations des travaux de mise en valeur des terrains": { + "account_number": "2924" + }, + "D\u00e9pr\u00e9ciations des terrains de gisement": { + "account_number": "2925" + }, + "D\u00e9pr\u00e9ciations des terrains am\u00e9nag\u00e9s": { + "account_number": "2926" + }, + "D\u00e9pr\u00e9ciations des terrains mis en concession": { + "account_number": "2927" + }, + "D\u00e9pr\u00e9ciations des autres terrains": { + "account_number": "2928" + }, + "D\u00e9pr\u00e9ciations des am\u00e9nagements de terrains en cours": { + "account_number": "2929" + }, + "account_number": "292" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents, installations techniques et agencements": { + "D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "account_number": "2931" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "account_number": "2932" + }, + "D\u00e9pr\u00e9ciations des ouvrages d\u2019infrastructures": { + "account_number": "2933" + }, + "D\u00e9pr\u00e9ciations des am\u00e9nagements, agencements et installations techniques": { + "account_number": "2934" + }, + "D\u00e9pr\u00e9ciations des am\u00e9nagements de bureaux": { + "account_number": "2935" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles et commerciaux mis en concession": { + "account_number": "2937" + }, + "D\u00e9pr\u00e9ciations des autres installations et agencements": { + "account_number": "2938" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents et installations en cours": { + "account_number": "2939" + }, + "account_number": "293" + }, + "D\u00e9pr\u00e9ciations de mat\u00e9riel, du mobilier et de l\u2019actif biologique": { + "D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage industriel et commercial": { + "account_number": "2941" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage agricole": { + "account_number": "2942" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "2943" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel et mobilier": { + "account_number": "2944" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel de transport": { + "account_number": "2945" + }, + "D\u00e9pr\u00e9ciations des actifs biologiques": { + "account_number": "2946" + }, + "D\u00e9pr\u00e9ciations des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": { + "account_number": "2947" + }, + "D\u00e9pr\u00e9ciations des autres mat\u00e9riels": { + "account_number": "2948" + }, + "D\u00e9pr\u00e9ciations de mat\u00e9riel en cours": { + "account_number": "2949" + }, + "account_number": "294" + }, + "D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations": { + "D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations incorporelles": { + "account_number": "2951" + }, + "D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations corporelles": { + "account_number": "2952" + }, + "account_number": "295" + }, + "D\u00e9pr\u00e9ciations des titres de participation": { + "D\u00e9pr\u00e9ciations des titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": { + "account_number": "2961" + }, + "D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s sous contr\u00f4le conjoint": { + "account_number": "2962" + }, + "D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s conf\u00e9rant une influence notable": { + "account_number": "2963" + }, + "D\u00e9pr\u00e9ciations des participations dans des organismes professionnels": { + "account_number": "2965" + }, + "D\u00e9pr\u00e9ciations des parts dans des GIE": { + "account_number": "2966" + }, + "D\u00e9pr\u00e9ciations des autres titres de participation": { + "account_number": "2968" + }, + "account_number": "296" + }, + "D\u00e9pr\u00e9ciations des autres immobilisations financi\u00e8res": { + "D\u00e9pr\u00e9ciations des pr\u00eats et cr\u00e9ances": { + "account_number": "2971" + }, + "D\u00e9pr\u00e9ciations des pr\u00eats au personnel": { + "account_number": "2972" + }, + "D\u00e9pr\u00e9ciations des cr\u00e9ances sur l\u2019\u00c9tat": { + "account_number": "2973" + }, + "D\u00e9pr\u00e9ciations des titres immobilis\u00e9s": { + "account_number": "2974" + }, + "D\u00e9pr\u00e9ciations des d\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "account_number": "2975" + }, + "D\u00e9pr\u00e9ciations des cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": { + "account_number": "2977" + }, + "D\u00e9pr\u00e9ciations des cr\u00e9ances financi\u00e8res diverses": { + "account_number": "2978" + }, + "account_number": "297" + }, + "account_number": "29" + }, + "root_type": "Asset", + "account_number": "2" + }, + "Comptes de Stocks": { + "Marchandises": { + "Marchandises A": { + "Marchandises A1": { + "account_number": "3111" + }, + "Marchandises A2": { + "account_number": "3112" + }, + "account_number": "311" + }, + "Marchandises B": { + "Marchandises B1": { + "account_number": "3121" + }, + "Marchandises B2": { + "account_number": "3122" + }, + "account_number": "312" + }, + "Actifs biologiques": { + "Animaux": { + "account_number": "3131" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3132" + }, + "account_number": "313" + }, + "Marchandises hors activit\u00e9s ordinaires (HAO)": { + "account_number": "318" + }, + "account_number": "31" + }, + "Mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "Mati\u00e8res A": { + "account_number": "321" + }, + "Mati\u00e8res B": { + "account_number": "322" + }, + "Fournitures (A, B)": { + "account_number": "323" + }, + "account_number": "32" + }, + "Autres approvisionnements": { + "Mati\u00e8res consommables": { + "account_number": "331" + }, + "Fournitures d\u2019atelier et d\u2019usine": { + "account_number": "332" + }, + "Fournitures de magasin": { + "account_number": "333" + }, + "Fournitures de bureau": { + "account_number": "334" + }, + "Emballages": { + "Emballages perdus": { + "account_number": "3351" + }, + "Emballages r\u00e9cup\u00e9rables non identifiables": { + "account_number": "3352" + }, + "Emballages \u00e0 usage mixte": { + "account_number": "3353" + }, + "Autres emballages": { + "account_number": "3358" + }, + "account_number": "335" + }, + "Autres mati\u00e8res": { + "account_number": "338" + }, + "account_number": "33" + }, + "Produits en cours": { + "Produits en cours": { + "Produits en cours P1": { + "account_number": "3411" + }, + "Produits en cours P2": { + "account_number": "3412" + }, + "account_number": "341" + }, + "Travaux en cours": { + "Travaux en cours T1": { + "account_number": "3421" + }, + "Travaux en cours T2": { + "account_number": "3422" + }, + "account_number": "342" + }, + "Produits interm\u00e9diaires en cours": { + "Produits interm\u00e9diaires A": { + "account_number": "3431" + }, + "Produits interm\u00e9diaires B": { + "account_number": "3432" + }, + "account_number": "343" + }, + "Produits r\u00e9siduels en cours": { + "Produits r\u00e9siduels A": { + "account_number": "3441" + }, + "Produits r\u00e9siduels B": { + "account_number": "3442" + }, + "account_number": "344" + }, + "Actifs biologiques en cours": { + "Animaux": { + "account_number": "3451" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3452" + }, + "account_number": "345" + }, + "account_number": "34" + }, + "Services en cours": { + "\u00c9tudes en cours": { + "\u00c9tudes en cours E1": { + "account_number": "3511" + }, + "\u00c9tudes en cours E2": { + "account_number": "3512" + }, + "account_number": "351" + }, + "Prestations de services en cours": { + "Prestations de services S1": { + "account_number": "3521" + }, + "Prestations de services S2": { + "account_number": "3522" + } + }, + "account_number": "35" + }, + "Produits finis": { + "Produits finis A": { + "account_number": "361" + }, + "Produits finis B": { + "account_number": "362" + }, + "Actifs biologiques": { + "Animaux": { + "account_number": "3631" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3632" + }, + "Autres stocks (activit\u00e9s annexes)": { + "account_number": "3638" + }, + "account_number": "363" + }, + "account_number": "36" + }, + "Produits interm\u00e9diaires et r\u00e9siduels": { + "Produits interm\u00e9diaires": { + "Produits interm\u00e9diaires A": { + "account_number": "3711" + }, + "Produits interm\u00e9diaires B": { + "account_number": "3712" + }, + "account_number": "371" + }, + "Produits r\u00e9siduels": { + "D\u00e9chets": { + "account_number": "3721" + }, + "Rebuts": { + "account_number": "3722" + }, + "Mati\u00e8res de R\u00e9cup\u00e9ration": { + "account_number": "3723" + }, + "account_number": "372" + }, + "Actifs biologiques": { + "Animaux": { + "account_number": "3731" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3732" + }, + "Autres stocks (activit\u00e9s annexes)": { + "account_number": "3738" + }, + "account_number": "373" + }, + "account_number": "37" + }, + "Stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": { + "account_type": "Stock", + "Marchandises en cours de route": { + "account_number": "381" + }, + "Mati\u00e8res premi\u00e8res et fournitures li\u00e9es en cours de route": { + "account_number": "382" + }, + "Autres approvisionnements en cours de route": { + "account_number": "383" + }, + "Produits finis en cours de route": { + "account_number": "386" + }, + "Stock en consignation ou en d\u00e9p\u00f4t": { + "Stock en consignation": { + "account_number": "3871" + }, + "Stock en d\u00e9p\u00f4t": { + "account_number": "3872" + }, + "account_number": "387" + }, + "Stock provenant d\u2019immobilisations mises hors service ou au rebut": { + "account_number": "388" + }, + "account_number": "38" + }, + "D\u00e9pr\u00e9ciations des stocks et encours de production": { + "D\u00e9pr\u00e9ciations des stocks de marchandises": { + "account_number": "391" + }, + "D\u00e9pr\u00e9ciations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "account_number": "392" + }, + "D\u00e9pr\u00e9ciations des stocks d\u2019autres approvisionnements": { + "account_number": "393" + }, + "D\u00e9pr\u00e9ciations des productions en cours": { + "account_number": "394" + }, + "D\u00e9pr\u00e9ciations des services en cours": { + "account_number": "395" + }, + "D\u00e9pr\u00e9ciations des stocks de produits finis": { + "account_number": "396" + }, + "D\u00e9pr\u00e9ciations des stocks de produits interm\u00e9diaires et r\u00e9siduels": { + "account_number": "397" + }, + "D\u00e9pr\u00e9ciations des stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": { + "account_number": "398" + }, + "account_number": "39" + }, + "root_type": "Asset", + "account_number": "3" + }, + "4-Comptes de Tiers (ACTIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (ACTIF)": { + "Fournisseurs d\u00e9biteurs": { + "Fournisseurs Avances et acomptes vers\u00e9s": { + "account_number": "4091" + }, + "Fournisseurs Groupe avances et acomptes vers\u00e9s": { + "account_number": "4092" + }, + "Fournisseurs Sous-traitants avances et acomptes vers\u00e9s": { + "account_number": "4093" + }, + "Fournisseurs Cr\u00e9ances pour emballages et mat\u00e9riels \u00e0 rendre": { + "account_number": "4094" + }, + "Fournisseurs Rabais, remises, ristournes et autres avoirs \u00e0 obtenir": { + "account_number": "4098" + }, + "account_number": "409" + } + }, + "41-Clients et comptes rattach\u00e9s (ACTIF)": { + "Clients": { + "Clients": { + "account_type": "Receivable", + "account_number": "4111" + }, + "Clients groupe": { + "account_type": "Receivable", + "account_number": "4112" + }, + "Clients, \u00c9tat et Collectivit\u00e9s publiques": { + "account_type": "Receivable", + "account_number": "4114" + }, + "Clients, organismes internationaux": { + "account_type": "Receivable", + "account_number": "4115" + }, + "Clients, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Receivable", + "account_number": "4116" + }, + "Client, retenues de garantie": { + "account_type": "Receivable", + "account_number": "4117" + }, + "Clients, d\u00e9gr\u00e8vement de taxes sur la valeur ajout\u00e9e (TVA)": { + "account_type": "Receivable", + "account_number": "4118" + }, + "account_type": "Receivable", + "account_number": "411" + }, + "Clients, effets \u00e0 recevoir en portefeuille": { + "Clients, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4121" + }, + "Clients Groupe, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4122" + }, + "\u00c9tat et Collectivit\u00e9s publiques, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4124" + }, + "Organismes Internationaux, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4125" + }, + "account_type": "Receivable", + "account_number": "412" + }, + "Clients, ch\u00e8ques, effets et autres valeurs impay\u00e9es": { + "Clients, ch\u00e8ques impay\u00e9s": { + "account_type": "Receivable", + "account_number": "4131" + }, + "Clients, effets impay\u00e9s": { + "account_type": "Receivable", + "account_number": "4132" + }, + "Clients, cartes de cr\u00e9dit impay\u00e9es": { + "account_type": "Receivable", + "account_number": "4133" + }, + "Clients, autres valeurs impay\u00e9es": { + "account_type": "Receivable", + "account_number": "4138" + }, + "account_type": "Receivable", + "account_number": "413" + }, + "Cr\u00e9ances sur cessions courantes d\u2019immobilisations": { + "Cr\u00e9ances en compte, immobilisations incorporelles": { + "account_type": "Receivable", + "account_number": "4141" + }, + "Cr\u00e9ances en compte, immobilisations corporelles": { + "account_type": "Receivable", + "account_number": "4142" + }, + "Effets \u00e0 recevoir, immobilisations incorporelles": { + "account_type": "Receivable", + "account_number": "4146" + }, + "Effets \u00e0 recevoir, immobilisations corporelles": { + "account_type": "Receivable", + "account_number": "4147" + }, + "account_type": "Receivable", + "account_number": "414" + }, + "Clients, effets escompt\u00e9s non \u00e9chus": { + "account_type": "Receivable", + "account_number": "415" + }, + "Cr\u00e9ances clients litigieuses ou douteuses": { + "Cr\u00e9ances litigieuses": { + "account_type": "Receivable", + "account_number": "4161" + }, + "Cr\u00e9ances douteuses": { + "account_type": "Receivable", + "account_number": "4162" + }, + "account_type": "Receivable", + "account_number": "416" + }, + "Clients, produits \u00e0 recevoir": { + "Clients, factures \u00e0 \u00e9tablir": { + "account_type": "Receivable", + "account_number": "4181" + }, + "Clients, int\u00e9r\u00eats courus": { + "account_type": "Receivable", + "account_number": "4186" + }, + "account_type": "Receivable", + "account_number": "418" + }, + "account_type": "Receivable" + }, + "42-Personnel (ACTIF)": { + "Personnel, avances et acomptes": { + "Personnel, avances": { + "account_number": "4211" + }, + "Personnel, acomptes": { + "account_number": "4212" + }, + "Frais avanc\u00e9s et fournitures au personnel": { + "account_number": "4213" + }, + "account_number": "421" + } + }, + "43-Organismes sociaux (ACTIF)": { + "431-S\u00e9curit\u00e9 sociale": { + "Prestations familiales": { + "account_number": "4311" + }, + "Accidents de travail": { + "account_number": "4312" + }, + "Caisse de retraite obligatoire": { + "account_number": "4313" + }, + "Caisse de retraite facultative": { + "account_number": "4314" + }, + "Autres cotisations sociales": { + "account_number": "4318" + } + }, + "432-Caisses de retraite compl\u00e9mentaire": {}, + "433-Autres organismes sociaux": { + "Mutuelle": { + "account_number": "4331" + }, + "Assurances retraite": { + "account_number": "4332" + }, + "Assurances et organismes de sant\u00e9": { + "account_number": "4333" + } + }, + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "Produits \u00e0 recevoir": { + "account_number": "4387" + } + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (ACTIF)": { + "\u00c9tat, TVA factur\u00e9e": { + "TVA factur\u00e9e sur ventes": { + "account_number": "4431" + }, + "TVA factur\u00e9e sur prestations de services": { + "account_number": "4432" + }, + "TVA factur\u00e9e sur travaux": { + "account_number": "4433" + }, + "TVA factur\u00e9e sur production livr\u00e9e \u00e0 soi-m\u00eame": { + "account_number": "4434" + }, + "TVA sur factures \u00e0 \u00e9tablir": { + "account_number": "4435" + }, + "account_number": "443" + }, + "\u00c9tat, TVA r\u00e9cup\u00e9rable": { + "TVA r\u00e9cup\u00e9rable sur immobilisations": { + "account_number": "4451" + }, + "TVA r\u00e9cup\u00e9rable sur achats": { + "account_number": "4452" + }, + "TVA r\u00e9cup\u00e9rable sur transport": { + "account_number": "4453" + }, + "TVA r\u00e9cup\u00e9rable sur services ext\u00e9rieurs et autres charges": { + "account_number": "4454" + }, + "TVA r\u00e9cup\u00e9rable sur factures non parvenues": { + "account_number": "4455" + }, + "TVA transf\u00e9r\u00e9e par d\u2019autres entit\u00e9s": { + "account_number": "4456" + }, + "account_number": "445" + }, + "\u00c9tat, charges \u00e0 payer et produits \u00e0 recevoir": { + "Charges \u00e0 payer": { + "account_number": "4486" + }, + "Produits \u00e0 recevoir": { + "account_number": "4487" + }, + "account_number": "448" + }, + "\u00c9tat, cr\u00e9ances et dettes diverses": { + "\u00c9tat, obligations cautionn\u00e9es": { + "account_number": "4491" + }, + "\u00c9tat, avances et acomptes vers\u00e9s sur imp\u00f4ts": { + "account_number": "4492" + }, + "\u00c9tat, fonds de dotation \u00e0 recevoir": { + "account_number": "4493" + }, + "\u00c9tat, subventions investissement \u00e0 recevoir": { + "account_number": "4494" + }, + "\u00c9tat, subventions d\u2019exploitation \u00e0 recevoir": { + "account_number": "4495" + }, + "\u00c9tat, subventions d\u2019\u00e9quilibre \u00e0 recevoir": { + "account_number": "4496" + }, + "\u00c9tat, avances sur subventions": { + "account_number": "4497" + }, + "\u00c9tat, fonds r\u00e9glement\u00e9s provisionn\u00e9s": { + "account_number": "4499" + }, + "account_number": "449" + } + }, + "45-Organismes internationaux (ACTIF)": { + "Op\u00e9rations avec les organismes africains": { + "account_number": "451" + }, + "Op\u00e9rations avec les autres organismes internationaux": { + "account_number": "452" + }, + "Organismes internationaux, fonds de dotation et subventions \u00e0 recevoir": { + "Organismes internationaux, fonds de dotation \u00e0 recevoir": { + "account_number": "4581" + }, + "Organismes internationaux, subventions \u00e0 recevoir": { + "account_number": "4582" + }, + "account_number": "458" + } + }, + "46-Apporteurs, associ\u00e9s et groupe (ACTIF)": { + "461-Apporteurs, op\u00e9rations sur le capital": { + "Apporteurs, capital appel\u00e9, non vers\u00e9": { + "account_number": "4613" + }, + "Apporteurs, compte d\u2019apport, op\u00e9rations de restructuration (fusion...)": { + "account_number": "4614" + }, + "Apporteurs, titres \u00e0 \u00e9changer": { + "account_number": "4618" + } + }, + "Apporteurs, restant d\u00fb sur capital appel\u00e9": { + "account_number": "467" + } + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (ACTIF)": { + "472-Cr\u00e9ances et dettes sur titres de placement": { + "Cr\u00e9ances sur cessions de titres de placement": { + "account_number": "4721" + }, + "Versements restant \u00e0 effectuer sur titres de placement non lib\u00e9r\u00e9s": { + "account_number": "4726" + } + }, + "473-Interm\u00e9diaires Op\u00e9rations faites pour compte de tiers": { + "Mandants": { + "account_number": "4731" + }, + "Mandataires": { + "account_number": "4732" + }, + "Commettants": { + "account_number": "4733" + }, + "Commissionnaires": { + "account_number": "4734" + }, + "\u00c9tat, Collectivit\u00e9s publiques, fonds global d\u2019allocation": { + "account_number": "4739" + } + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits": { + "Compte de r\u00e9partition p\u00e9riodique des produits": { + "account_number": "4747" + } + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA": { + "Compte actif": { + "account_type": "Temporary", + "account_number": "4751" + } + }, + "Charges constat\u00e9es d\u2019avance": { + "account_number": "476" + }, + "478-\u00c9carts de conversion actif": { + "Diminution des cr\u00e9ances d\u2019exploitation": { + "account_number": "4781" + }, + "Diminution des cr\u00e9ances financi\u00e8res": { + "account_number": "4782" + }, + "Augmentation des dettes d\u2019exploitation": { + "account_number": "4783" + }, + "Augmentation des dettes financi\u00e8res": { + "account_number": "4784" + }, + "Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": { + "account_number": "4786" + }, + "Diff\u00e9rences compens\u00e9es par couverture de change": { + "account_number": "4788" + } + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (ACTIF)": { + "Cr\u00e9ances sur cessions d\u2019immobilisations": { + "En compte, immobilisations incorporelles": { + "account_number": "4851" + }, + "En compte, immobilisations corporelles": { + "account_number": "4852" + }, + "Effets \u00e0 recevoir, immobilisations incorporelles": { + "account_number": "4853" + }, + "Effets \u00e0 recevoir, immobilisations corporelles": { + "account_number": "4854" + }, + "Effets escompt\u00e9s non \u00e9chus": { + "account_number": "4855" + }, + "Retenues de garantie": { + "account_number": "4857" + }, + "Factures \u00e0 \u00e9tablir": { + "account_number": "4858" + }, + "account_number": "485" + }, + "Autres cr\u00e9ances hors activit\u00e9s ordinaires (HAO)": { + "account_number": "488" + } + }, + "49-D\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme (tiers) (ACTIF)": { + "D\u00e9pr\u00e9ciations des comptes clients": { + "Cr\u00e9ances litigieuses": { + "account_number": "4911" + }, + "Cr\u00e9ances douteuses": { + "account_number": "4912" + }, + "account_number": "491" + }, + "D\u00e9pr\u00e9ciations des comptes organismes internationaux": { + "account_number": "495" + }, + "D\u00e9pr\u00e9ciations des comptes apporteurs, associ\u00e9s et groupe": { + "Associ\u00e9s, comptes courants": { + "account_number": "4962" + }, + "Associ\u00e9s, op\u00e9rations faites en commun": { + "account_number": "4963" + }, + "Groupe, comptes courants": { + "account_number": "4966" + }, + "account_number": "496" + }, + "D\u00e9pr\u00e9ciations des comptes d\u00e9biteurs divers": { + "account_number": "497" + }, + "D\u00e9pr\u00e9ciations des comptes de cr\u00e9ances HAO": { + "Cr\u00e9ances sur cessions d\u2019immobilisations": { + "account_number": "4985" + }, + "Cr\u00e9ances sur cessions de titres de placement": { + "account_number": "4986" + }, + "Autres cr\u00e9ances HAO": { + "account_number": "4988" + }, + "account_number": "498" + }, + "Provisions pour risques \u00e0 court terme": { + "Sur op\u00e9rations d\u2019exploitation": { + "account_number": "4991" + }, + "Sur op\u00e9rations financi\u00e8res": { + "account_number": "4997" + }, + "Sur op\u00e9rations HAO": { + "account_number": "4998" + }, + "account_number": "499" + } + }, + "root_type": "Asset" + }, + "4-Comptes de Tiers (PASSIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (PASSIF)": { + "Fournisseurs, dettes en compte": { + "Fournisseurs": { + "account_type": "Payable", + "account_number": "4011" + }, + "Fournisseurs groupe": { + "account_type": "Payable", + "account_number": "4012" + }, + "Fournisseurs sous-traitants": { + "account_type": "Payable", + "account_number": "4013" + }, + "Fournisseurs, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Payable", + "account_number": "4016" + }, + "Fournisseur, retenues de garantie": { + "account_type": "Payable", + "account_number": "4017" + }, + "account_type": "Payable", + "account_number": "401" + }, + "Fournisseurs, effets \u00e0 payer": { + "Fournisseurs Effets \u00e0 payer": { + "account_type": "Payable", + "account_number": "4021" + }, + "Fournisseurs Groupe, effets \u00e0 payer": { + "account_type": "Payable", + "account_number": "4022" + }, + "Fournisseurs Sous-traitants, effets \u00e0 payer": { + "account_type": "Payable", + "account_number": "4023" + }, + "account_type": "Payable", + "account_number": "402" + }, + "Fournisseurs, acquisitions courantes d\u2019immobilisations": { + "Fournisseurs Dettes en comptes, immobilisations incorporelles": { + "account_type": "Payable", + "account_number": "4041" + }, + "Fournisseurs Dettes en comptes, immobilisations corporelles": { + "account_type": "Payable", + "account_number": "4042" + }, + "Fournisseurs Effets \u00e0 payer, immobilisations incorporelles": { + "account_type": "Payable", + "account_number": "4046" + }, + "Fournisseurs Effets \u00e0 payer, immobilisations corporelles": { + "account_type": "Payable", + "account_number": "4047" + }, + "account_type": "Payable", + "account_number": "404" + }, + "Fournisseurs, factures non parvenues": { + "Fournisseurs": { + "account_type": "Stock Received But Not Billed", + "account_number": "4081" + }, + "Fournisseurs groupe": { + "account_type": "Stock Received But Not Billed", + "account_number": "4082" + }, + "Fournisseurs sous-traitants": { + "account_type": "Stock Received But Not Billed", + "account_number": "4083" + }, + "Fournisseurs, int\u00e9r\u00eats courus": { + "account_type": "Stock Received But Not Billed", + "account_number": "4086" + }, + "account_type": "Stock Received But Not Billed", + "account_number": "408" + }, + "account_type": "Payable" + }, + "41-Clients et comptes rattach\u00e9s (PASSIF)": { + "Clients cr\u00e9diteurs": { + "Clients, avances et acomptes re\u00e7us": { + "account_number": "4191" + }, + "Clients groupe, avances et acomptes re\u00e7us": { + "account_number": "4192" + }, + "Clients, dettes pour emballages et mat\u00e9riels consign\u00e9s": { + "account_number": "4194" + }, + "Clients, rabais, remises, ristournes et autres avoirs \u00e0 accorder": { + "account_number": "4198" + }, + "account_number": "419" + } + }, + "42-Personnel (PASSIF)": { + "Personnel, r\u00e9mun\u00e9rations dues": { + "account_number": "422" + }, + "Personnel, oppositions, saisies-arr\u00eats": { + "Personnel, oppositions": { + "account_number": "4231" + }, + "Personnel, saisies-arr\u00eats": { + "account_number": "4232" + }, + "Personnel, avis \u00e0 tiers d\u00e9tenteur": { + "account_number": "4233" + }, + "account_number": "423" + }, + "Personnel, \u0153uvres sociales internes": { + "Assistance m\u00e9dicale": { + "account_number": "4241" + }, + "Allocations familiales": { + "account_number": "4242" + }, + "Organismes sociaux rattach\u00e9s \u00e0 l\u2019entit\u00e9": { + "account_number": "4245" + }, + "Autres \u0153uvres sociales internes": { + "account_number": "4248" + }, + "account_number": "424" + }, + "Repr\u00e9sentants du personnel": { + "D\u00e9l\u00e9gu\u00e9s du personnel": { + "account_number": "4251" + }, + "Syndicats et Comit\u00e9s d\u2019entreprises, d\u2019\u00c9tablissement": { + "account_number": "4252" + }, + "Autres repr\u00e9sentants du personnel": { + "account_number": "4258" + }, + "account_number": "425" + }, + "Personnel, participation aux b\u00e9n\u00e9fices et au capital": { + "Participation aux b\u00e9n\u00e9fices": { + "account_number": "4261" + }, + "Participation au capital": { + "account_number": "4264" + }, + "account_number": "426" + }, + "Personnel d\u00e9p\u00f4ts": { + "account_number": "427" + }, + "Personnel, charges \u00e0 payer et produits \u00e0 recevoir": { + "Dettes provisionn\u00e9es pour cong\u00e9s \u00e0 payer": { + "account_number": "4281" + }, + "Autres charges \u00e0 payer": { + "account_number": "4286" + }, + "Produits \u00e0 recevoir": { + "account_number": "4287" + }, + "account_number": "428" + } + }, + "43-Organismes sociaux (PASSIF)": { + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "Charges sociales sur gratifications \u00e0 payer": { + "account_number": "4381" + }, + "Charges sociales sur cong\u00e9s \u00e0 payer": { + "account_number": "4382" + }, + "Autres charges \u00e0 payer": { + "account_number": "4386" + } + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (PASSIF)": { + "\u00c9tat, imp\u00f4t sur les b\u00e9n\u00e9fices": { + "account_number": "441" + }, + "\u00c9tat, autres imp\u00f4ts et taxes": { + "Imp\u00f4ts et taxes d\u2019\u00c9tat": { + "account_number": "4421" + }, + "Imp\u00f4ts et taxes pour les collectivit\u00e9s publiques": { + "account_number": "4422" + }, + "Imp\u00f4ts et taxes recouvrables sur des obligataires": { + "account_number": "4423" + }, + "Imp\u00f4ts et taxes recouvrables sur des associ\u00e9s": { + "account_number": "4424" + }, + "Droits de douane": { + "account_number": "4426" + }, + "Autres imp\u00f4ts et taxes": { + "account_number": "4428" + }, + "account_number": "442" + }, + "\u00c9tat, TVA due ou cr\u00e9dit de TVA": { + "\u00c9tat, TVA due": { + "account_number": "4441" + }, + "\u00c9tat, cr\u00e9dit de TVA \u00e0 reporter": { + "account_number": "4449" + }, + "account_number": "444" + }, + "\u00c9tat, autres taxes sur le chiffre d\u2019affaires": { + "account_number": "446" + }, + "\u00c9tat, imp\u00f4ts retenus \u00e0 la source": { + "Imp\u00f4t G\u00e9n\u00e9ral sur le revenu": { + "account_number": "4471" + }, + "Imp\u00f4ts sur salaires": { + "account_number": "4472" + }, + "Contribution nationale": { + "account_number": "4473" + }, + "Contribution nationale de solidarit\u00e9": { + "account_number": "4474" + }, + "Autres imp\u00f4ts et contributions": { + "account_number": "4478" + }, + "account_number": "447" + } + }, + "46-Apporteurs, associ\u00e9s et groupe (PASSIF)": { + "461-Apporteurs, op\u00e9rations sur le capital (PASSIF)": { + "Apporteurs, apports en nature": { + "account_number": "4611" + }, + "Apporteurs, apports en num\u00e9raire": { + "account_number": "4612" + }, + "Apporteurs, versements re\u00e7us sur augmentation de capital": { + "account_number": "4615" + }, + "Apporteurs, versements anticip\u00e9s": { + "account_number": "4616" + }, + "Apporteurs d\u00e9faillants": { + "account_number": "4617" + }, + "Apporteurs, capital \u00e0 rembourser": { + "account_number": "4619" + } + }, + "462-Associ\u00e9s, comptes courants": { + "Principal": { + "account_number": "4621" + }, + "Int\u00e9r\u00eats courus": { + "account_number": "4626" + } + }, + "463-Associ\u00e9s, op\u00e9rations faites en commun et GIE": { + "Op\u00e9rations courantes": { + "account_number": "4631" + }, + "Int\u00e9r\u00eats courus": { + "account_number": "4636" + } + }, + "Associ\u00e9s, dividendes \u00e0 payer": { + "account_number": "465" + }, + "Groupe, comptes courants": { + "account_number": "466" + } + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (PASSIF)": { + "471-D\u00e9biteurs et cr\u00e9diteurs divers": { + "D\u00e9biteurs divers": { + "account_number": "4711" + }, + "Cr\u00e9diteurs divers": { + "account_number": "4712" + }, + "Obligataires": { + "account_number": "4713" + }, + "R\u00e9mun\u00e9rations d\u2019administrateurs": { + "account_number": "4715" + }, + "Compte d\u2019affacturage": { + "account_number": "4716" + }, + "D\u00e9biteurs divers retenues de garantie": { + "account_number": "4717" + }, + "Apport, compte de fusion et op\u00e9rations assimil\u00e9es": { + "account_number": "4718" + }, + "Bons de souscription d\u2019actions et d\u2019obligations": { + "account_number": "4719" + } + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits (PASSIF)": { + "Compte de r\u00e9partition p\u00e9riodique des charges": { + "account_number": "4746" + } + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA (PASSIF)": { + "Compte passif": { + "account_number": "4752" + } + }, + "Produits constat\u00e9s d\u2019avance": { + "account_number": "477" + }, + "479-\u00c9carts de conversion passif": { + "Augmentation des cr\u00e9ances d\u2019exploitation": { + "account_number": "4791" + }, + "Augmentation des cr\u00e9ances financi\u00e8res": { + "account_number": "4792" + }, + "Diminution des dettes d\u2019exploitation": { + "account_number": "4793" + }, + "Diminution des dettes financi\u00e8res": { + "account_number": "4794" + }, + "Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": { + "account_number": "4797" + }, + "Diff\u00e9rences compens\u00e9es par couverture de change": { + "account_number": "4798" + } + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (HAO) (PASSIF)": { + "Fournisseurs d\u2019investissements": { + "Immobilisations incorporelles": { + "account_number": "4811" + }, + "Immobilisations corporelles": { + "account_number": "4812" + }, + "Versements restant \u00e0 effectuer sur titres de participation et titres immobilis\u00e9s non lib\u00e9r\u00e9s": { + "account_number": "4813" + }, + "R\u00e9serve de propri\u00e9t\u00e9": { + "account_number": "4816" + }, + "Retenues de garantie": { + "account_number": "4817" + }, + "Factures non parvenues": { + "account_number": "4818" + }, + "account_number": "481" + }, + "Fournisseurs d\u2019investissements, effets \u00e0 payer": { + "Immobilisations incorporelles": { + "account_number": "4821" + }, + "Immobilisations corporelles": { + "account_number": "4822" + }, + "account_number": "482" + }, + "Autres dettes hors activit\u00e9s ordinaires (HAO)": { + "Produits": { + "account_number": "4887" + }, + "account_number": "484" + } + }, + "root_type": "Liability" + }, + "Comptes de tr\u00e9sorerie": { + "Titres de placement": { + "Titres du tr\u00e9sor et bons de caisse \u00e0 court terme": { + "Titres du Tr\u00e9sor \u00e0 court terme": { + "account_number": "5011" + }, + "Titres d\u2019organismes financiers": { + "account_number": "5012" + }, + "Bons de caisse \u00e0 court terme": { + "account_number": "5013" + }, + "Frais d\u2019acquisition des titres de tr\u00e9sor et bons de caisse": { + "account_number": "5016" + }, + "account_number": "501" + }, + "Actions": { + "Actions ou parts propres": { + "account_number": "5021" + }, + "Actions cot\u00e9es": { + "account_number": "5022" + }, + "Actions non cot\u00e9es": { + "account_number": "5023" + }, + "Actions d\u00e9membr\u00e9es (certificats d\u2019investissement, droits de vote)": { + "account_number": "5024" + }, + "Autres actions": { + "account_number": "5025" + }, + "Frais d\u2019acquisition des actions": { + "account_number": "5026" + }, + "account_number": "502" + }, + "Obligations": { + "Obligations \u00e9mises par la soci\u00e9t\u00e9 et rachet\u00e9es par elle": { + "account_number": "5031" + }, + "Obligations cot\u00e9es": { + "account_number": "5032" + }, + "Obligations non cot\u00e9es": { + "account_number": "5033" + }, + "Autres obligations": { + "account_number": "5035" + }, + "Frais d\u2019acquisition des obligations": { + "account_number": "5036" + }, + "account_number": "503" + }, + "Bons de souscription": { + "Bons de souscription d\u2019actions": { + "account_number": "5042" + }, + "Bons de souscription d\u2019obligations": { + "account_number": "5043" + }, + "account_number": "504" + }, + "Titres n\u00e9gociables hors r\u00e9gion": { + "account_number": "505" + }, + "Int\u00e9r\u00eats courus": { + "Titres du Tr\u00e9sor et bons de caisse \u00e0 court terme": { + "account_number": "5061" + }, + "Actions": { + "account_number": "5062" + }, + "Obligations": { + "account_number": "5063" + }, + "account_number": "506" + }, + "Autres titres de placement et cr\u00e9ances assimil\u00e9es": { + "account_number": "508" + }, + "account_number": "50" + }, + "Valeurs \u00e0 encaisser": { + "Effets \u00e0 encaisser": { + "account_number": "511" + }, + "Effets \u00e0 l\u2019encaissement": { + "account_number": "512" + }, + "Ch\u00e8ques \u00e0 encaisser": { + "account_number": "513" + }, + "Ch\u00e8ques \u00e0 l\u2019encaissement": { + "account_number": "514" + }, + "Cartes de cr\u00e9dit \u00e0 encaisser": { + "account_number": "515" + }, + "Autres valeurs \u00e0 l\u2019encaissement": { + "Warrants": { + "account_number": "5181" + }, + "Billets de fonds": { + "account_number": "5182" + }, + "Ch\u00e8ques de voyage": { + "account_number": "5185" + }, + "Coupons \u00e9chus": { + "account_number": "5186" + }, + "Int\u00e9r\u00eats \u00e9chus des obligations": { + "account_number": "5187" + }, + "account_number": "518" + }, + "account_number": "51" + }, + "Banques": { + "Banques locales": { + "Banques en monnaie nationale": { + "account_type": "Bank", + "account_number": "5211" + }, + "Banques en devises": { + "account_type": "Bank", + "account_number": "5215" + }, + "account_type": "Bank", + "account_number": "521" + }, + "Banques autres \u00c9tats r\u00e9gion": { + "account_number": "522" + }, + "Banques autres \u00c9tats zone mon\u00e9taire": { + "account_number": "523" + }, + "Banques hors zone mon\u00e9taire": { + "account_number": "524" + }, + "Banques d\u00e9p\u00f4t \u00e0 terme": { + "account_number": "525" + }, + "Banques, int\u00e9r\u00eats courus": { + "Banque, int\u00e9r\u00eats courus, charges \u00e0 payer": { + "account_number": "5261" + }, + "Banque, int\u00e9r\u00eats courus, produits \u00e0 recevoir": { + "account_number": "5267" + }, + "account_number": "526" + }, + "account_number": "52" + }, + "\u00c9tablissements financiers et assimil\u00e9s": { + "Ch\u00e8ques postaux": { + "account_number": "531" + }, + "Tr\u00e9sor": { + "account_number": "532" + }, + "Soci\u00e9t\u00e9s de gestion et d\u2019interm\u00e9diation (SGI)": { + "account_number": "533" + }, + "\u00c9tablissements financiers, int\u00e9r\u00eats courus": { + "account_number": "536" + }, + "Autres organismes financiers": { + "account_number": "538" + }, + "account_number": "53" + }, + "Instruments de tr\u00e9sorerie": { + "Options de taux d\u2019int\u00e9r\u00eat": { + "account_number": "541" + }, + "Options de taux de change": { + "account_number": "542" + }, + "Options de taux boursiers": { + "account_number": "543" + }, + "Instruments de march\u00e9s \u00e0 terme": { + "account_number": "544" + }, + "Avoirs d\u2019or et autres m\u00e9taux pr\u00e9cieux": { + "account_number": "545" + }, + "account_number": "54" + }, + "Instruments de monnaie \u00e9lectronique": { + "Monnaie \u00e9lectronique carte carburant": { + "account_number": "551" + }, + "Monnaie \u00e9lectronique t\u00e9l\u00e9phone portable": { + "account_number": "552" + }, + "Monnaie \u00e9lectronique carte p\u00e9age": { + "account_number": "553" + }, + "Porte-monnaie \u00e9lectronique": { + "account_number": "554" + }, + "Autres instruments de monnaies \u00e9lectroniques": { + "account_number": "558" + }, + "account_number": "55" + }, + "Banques, cr\u00e9dits de tr\u00e9sorerie et d\u2019escompte": { + "Cr\u00e9dits de tr\u00e9sorerie": { + "account_number": "561" + }, + "Escompte de cr\u00e9dits de campagne": { + "account_number": "564" + }, + "Escompte de cr\u00e9dits ordinaires": { + "account_number": "565" + }, + "Banques, cr\u00e9dits de tr\u00e9sorerie, int\u00e9r\u00eats courus": { + "account_number": "566" + }, + "account_number": "56" + }, + "Caisse": { + "Caisse si\u00e8ge social": { + "Caisse en monnaie nationale": { + "account_number": "5711" + }, + "Caisse en devises": { + "account_number": "5712" + }, + "account_number": "571" + }, + "Caisse succursale A": { + "En monnaie nationale": { + "account_number": "5721" + }, + "En devises": { + "account_number": "5722" + }, + "account_number": "572" + }, + "Caisse succursale B": { + "En monnaie nationale": { + "account_number": "5731" + }, + "En devises": { + "account_number": "5732" + }, + "account_number": "573" + }, + "account_number": "57" + }, + "R\u00e9gies d\u2019avances, accr\u00e9ditifs et virements internes": { + "R\u00e9gies d\u2019avance": { + "account_number": "581" + }, + "Accr\u00e9ditifs": { + "account_number": "582" + }, + "Virements de fonds": { + "account_number": "585" + }, + "Autres virements internes": { + "account_number": "588" + }, + "account_number": "58" + }, + "D\u00e9pr\u00e9ciations et provisions pour risque \u00e0 court terme": { + "D\u00e9pr\u00e9ciations des titres de placement": { + "account_number": "590" + }, + "D\u00e9pr\u00e9ciations des titres et valeurs \u00e0 encaisser": { + "account_number": "591" + }, + "D\u00e9pr\u00e9ciations des comptes banques": { + "account_number": "592" + }, + "D\u00e9pr\u00e9ciations des comptes \u00e9tablissements financiers et assimil\u00e9s": { + "account_number": "593" + }, + "D\u00e9pr\u00e9ciations des comptes d\u2019instruments de tr\u00e9sorerie": { + "account_number": "594" + }, + "Provisions pour risque \u00e0 court terme \u00e0 caract\u00e8re financier": { + "account_number": "599" + }, + "account_number": "59" + }, + "root_type": "Asset", + "account_number": "5" + }, + "Comptes de charges des activit\u00e9s ordinaires": { + "Achats et variations de stocks": { + "Achats de marchandises": { + "Dans la R\u00e9gion": { + "account_number": "6011" + }, + "Hors R\u00e9gion": { + "account_number": "6012" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "6013" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "6014" + }, + "Frais sur achats": { + "account_number": "6015" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6019" + }, + "account_number": "601" + }, + "Achats de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "Dans la R\u00e9gion": { + "account_number": "6021" + }, + "Hors R\u00e9gion": { + "account_number": "6022" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "6023" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "6024" + }, + "Frais sur achats": { + "account_number": "6025" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6029" + }, + "account_number": "602" + }, + "Variations des stocks de biens achet\u00e9s": { + "Variations des stocks de marchandises": { + "account_number": "6031" + }, + "Variations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "account_number": "6032" + }, + "Variations des stocks d\u2019autres approvisionnements": { + "account_number": "6033" + }, + "account_number": "603" + }, + "Achats stock\u00e9s de mati\u00e8res et fournitures consommables": { + "Mati\u00e8res consommables": { + "account_number": "6041" + }, + "Mati\u00e8res combustibles": { + "account_number": "6042" + }, + "Produits d\u2019entretien": { + "account_number": "6043" + }, + "Fournitures d\u2019atelier et d\u2019usine": { + "account_number": "6044" + }, + "Frais sur achat": { + "account_number": "6045" + }, + "Fournitures de magasin": { + "account_number": "6046" + }, + "Fournitures de bureau": { + "account_number": "6047" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6049" + }, + "account_number": "604" + }, + "Autres achats": { + "Fournitures non stockables Eau": { + "account_number": "6051" + }, + "Fournitures non stockables \u00c9lectricit\u00e9": { + "account_number": "6052" + }, + "Fournitures non stockables Autres \u00e9nergies": { + "account_number": "6053" + }, + "Fournitures d\u2019entretien non stockables": { + "account_number": "6054" + }, + "Fournitures de bureau non stockables": { + "account_number": "6055" + }, + "Achats de petit mat\u00e9riel et outillage": { + "account_number": "6056" + }, + "Achats d\u2019\u00e9tudes et prestations de services": { + "account_number": "6057" + }, + "Achats de travaux, mat\u00e9riels et \u00e9quipements": { + "account_number": "6058" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6059" + }, + "account_number": "605" + }, + "Achats d\u2019emballages": { + "Emballages perdus": { + "account_number": "6081" + }, + "Emballages r\u00e9cup\u00e9rables non identifiables": { + "account_number": "6082" + }, + "Emballages \u00e0 usage mixte": { + "account_number": "6083" + }, + "Frais sur achats": { + "account_number": "6085" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6089" + }, + "account_number": "608" + }, + "account_number": "60" + }, + "Transports": { + "Transports sur ventes": { + "account_number": "612" + }, + "Transports pour le compte de tiers": { + "account_number": "613" + }, + "Transports du personnel": { + "account_number": "614" + }, + "Transports de plis": { + "account_number": "616" + }, + "Autres frais de transport": { + "Voyages et d\u00e9placements": { + "account_number": "6181" + }, + "Transports entre \u00e9tablissements ou chantiers": { + "account_number": "6182" + }, + "Transports administratifs": { + "account_number": "6183" + }, + "account_number": "618" + }, + "account_number": "61" + }, + "Services ext\u00e9rieurs": { + "Sous-traitance g\u00e9n\u00e9rale": { + "account_number": "621" + }, + "Locations, charges locatives": { + "Locations de terrains": { + "account_number": "6221" + }, + "Locations de b\u00e2timents": { + "account_number": "6222" + }, + "Locations de mat\u00e9riels et outillages": { + "account_number": "6223" + }, + "Malis sur emballages": { + "account_number": "6224" + }, + "Locations d\u2019emballages": { + "account_number": "6225" + }, + "Fermages et loyers du foncier": { + "account_number": "6226" + }, + "Locations et charges locatives diverses": { + "account_number": "6228" + }, + "account_number": "622" + }, + "Redevances de location acquisition": { + "Cr\u00e9dit-bail immobilier": { + "account_number": "6232" + }, + "Cr\u00e9dit-bail mobilier": { + "account_number": "6233" + }, + "Location-vente": { + "account_number": "6234" + }, + "Autres contrats de location acquisition": { + "account_number": "6238" + }, + "account_number": "623" + }, + "Entretien, r\u00e9parations, remise en \u00e9tat et maintenance": { + "Entretien et r\u00e9parations des biens immobiliers": { + "account_number": "6241" + }, + "Entretien et r\u00e9parations des biens mobiliers": { + "account_number": "6242" + }, + "Maintenance": { + "account_number": "6243" + }, + "Charges de d\u00e9mant\u00e8lement et remise en \u00e9tat": { + "account_number": "6244" + }, + "Autres entretiens et r\u00e9parations": { + "account_number": "6248" + }, + "account_number": "624" + }, + "Primes d\u2019assurance": { + "Assurances multirisques": { + "account_number": "6251" + }, + "Assurances mat\u00e9riel de transport": { + "account_number": "6252" + }, + "Assurances risques d\u2019exploitation": { + "account_number": "6253" + }, + "Assurances responsabilit\u00e9 du producteur": { + "account_number": "6254" + }, + "Assurances insolvabilit\u00e9 clients": { + "account_number": "6255" + }, + "Assurances transport sur ventes": { + "account_number": "6257" + }, + "Autres primes d\u2019assurances": { + "account_number": "6258" + }, + "account_number": "625" + }, + "\u00c9tudes, recherches et documentation": { + "\u00c9tudes et recherches": { + "account_number": "6261" + }, + "Documentation g\u00e9n\u00e9rale": { + "account_number": "6265" + }, + "Documentation technique": { + "account_number": "6266" + }, + "account_number": "626" + }, + "Publicit\u00e9, publications, relations publiques": { + "Annonces, insertions": { + "account_number": "6271" + }, + "Catalogues, imprim\u00e9s publicitaires": { + "account_number": "6272" + }, + "\u00c9chantillons": { + "account_number": "6273" + }, + "Foires et expositions": { + "account_number": "6274" + }, + "Publications": { + "account_number": "6275" + }, + "Cadeaux \u00e0 la client\u00e8le": { + "account_number": "6276" + }, + "Frais de colloques, s\u00e9minaires, conf\u00e9rences": { + "account_number": "6277" + }, + "Autres charges de publicit\u00e9 et relations publiques": { + "account_number": "6278" + }, + "account_number": "627" + }, + "Frais de t\u00e9l\u00e9communications": { + "Frais de t\u00e9l\u00e9phone": { + "account_number": "6281" + }, + "Frais de t\u00e9lex": { + "account_number": "6282" + }, + "Frais de t\u00e9l\u00e9copie": { + "account_number": "6283" + }, + "Autres frais de t\u00e9l\u00e9communications": { + "account_number": "6288" + }, + "account_number": "628" + }, + "account_number": "62" + }, + "Autres services ext\u00e9rieurs": { + "Frais bancaires": { + "Frais sur titres (vente, garde)": { + "account_number": "6311" + }, + "Frais sur effets": { + "account_number": "6312" + }, + "Location de coffres": { + "account_number": "6313" + }, + "Commissions d\u2019affacturage": { + "account_number": "6314" + }, + "Commissions sur cartes de cr\u00e9dit": { + "account_number": "6315" + }, + "Frais d\u2019\u00e9mission d\u2019emprunts": { + "account_number": "6316" + }, + "Frais sur instruments monnaie \u00e9lectronique": { + "account_number": "6317" + }, + "Autres frais bancaires": { + "account_number": "6318" + }, + "account_number": "631" + }, + "R\u00e9mun\u00e9rations d\u2019interm\u00e9diaires et de conseils": { + "Commissions et courtages sur ventes": { + "account_number": "6322" + }, + "Honoraires des professions r\u00e9glement\u00e9es": { + "account_number": "6324" + }, + "Frais d\u2019actes et de contentieux": { + "account_number": "6325" + }, + "R\u00e9mun\u00e9rations d\u2019affacturage": { + "account_number": "6326" + }, + "R\u00e9mun\u00e9rations des autres prestataires de services": { + "account_number": "6327" + }, + "Divers frais": { + "account_number": "6328" + }, + "account_number": "632" + }, + "Frais de formation du personnel": { + "account_number": "633" + }, + "Redevances pour brevets, licences, logiciels, concessions et droits et valeurs similaires": { + "Redevances pour brevets, licences": { + "account_number": "6342" + }, + "Redevances pour logiciels": { + "account_number": "6343" + }, + "Redevances pour marques": { + "account_number": "6344" + }, + "Redevances pour sites internet": { + "account_number": "6345" + }, + "Redevances pour concessions, droits et valeurs similaires": { + "account_number": "6346" + }, + "account_number": "634" + }, + "Cotisations": { + "Cotisations": { + "account_number": "6351" + }, + "Concours divers": { + "account_number": "6358" + }, + "account_number": "635" + }, + "R\u00e9mun\u00e9rations de personnel ext\u00e9rieur \u00e0 l\u2019entit\u00e9": { + "Personnel int\u00e9rimaire": { + "account_number": "6371" + }, + "Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": { + "account_number": "6372" + }, + "account_number": "637" + }, + "Autres charges externes": { + "Frais de recrutement du personnel": { + "account_number": "6381" + }, + "Frais de d\u00e9m\u00e9nagement": { + "account_number": "6382" + }, + "R\u00e9ceptions": { + "account_number": "6383" + }, + "Missions": { + "account_number": "6384" + }, + "Charges de copropri\u00e9t\u00e9": { + "account_number": "6385" + }, + "account_number": "638" + }, + "account_number": "63" + }, + "Imp\u00f4ts et taxes": { + "Imp\u00f4ts et taxes directs": { + "Imp\u00f4ts fonciers et taxes annexes": { + "account_number": "6411" + }, + "Patentes, licences et taxes annexes": { + "account_number": "6412" + }, + "Taxes sur appointements et salaires": { + "account_number": "6413" + }, + "Taxes d\u2019apprentissage": { + "account_number": "6414" + }, + "Formation professionnelle continue": { + "account_number": "6415" + }, + "Autres imp\u00f4ts et taxes directs": { + "account_number": "6418" + }, + "account_number": "641" + }, + "Imp\u00f4ts et taxes indirects": { + "account_number": "645" + }, + "Droits d\u2019enregistrement": { + "Droits de mutation": { + "account_number": "6461" + }, + "Droits de timbre": { + "account_number": "6462" + }, + "Taxes sur les v\u00e9hicules de soci\u00e9t\u00e9": { + "account_number": "6463" + }, + "Vignettes": { + "account_number": "6464" + }, + "Autres droits": { + "account_number": "6468" + }, + "account_number": "646" + }, + "P\u00e9nalit\u00e9s, amendes fiscales": { + "P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts directs": { + "account_number": "6471" + }, + "P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts indirects": { + "account_number": "6472" + }, + "P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts directs": { + "account_number": "6473" + }, + "P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts indirects": { + "account_number": "6474" + }, + "Autres p\u00e9nalit\u00e9s et amendes fiscales": { + "account_number": "6478" + }, + "account_number": "647" + }, + "Autres imp\u00f4ts et taxes": { + "account_number": "648" + }, + "account_number": "64" + }, + "Autres charges": { + "Pertes sur cr\u00e9ances clients et autres d\u00e9biteurs": { + "Clients": { + "account_number": "6511" + }, + "Autres d\u00e9biteurs": { + "account_number": "6515" + }, + "account_number": "651" + }, + "Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "Quote-part transf\u00e9r\u00e9e de b\u00e9n\u00e9fices (comptabilit\u00e9 du g\u00e9rant)": { + "account_number": "6521" + }, + "Pertes imput\u00e9es par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": { + "account_number": "6525" + }, + "account_number": "652" + }, + "Valeurs comptables des cessions courantes d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "6541" + }, + "Immobilisations corporelles": { + "account_number": "6542" + }, + "account_number": "654" + }, + "Perte de change sur cr\u00e9ances et dettes commerciale": { + "account_number": "656" + }, + "P\u00e9nalit\u00e9s et amendes p\u00e9nales": { + "account_number": "657" + }, + "Charges diverses": { + "Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": { + "account_number": "6581" + }, + "Dons": { + "account_number": "6582" + }, + "M\u00e9c\u00e9nat": { + "account_number": "6583" + }, + "Autres charges diverses": { + "account_number": "6588" + }, + "account_number": "658" + }, + "Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "Sur risques \u00e0 court terme": { + "account_number": "6591" + }, + "Sur stocks": { + "account_number": "6593" + }, + "Sur cr\u00e9ances": { + "account_number": "6594" + }, + "Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme": { + "account_number": "6598" + }, + "account_number": "659" + }, + "account_number": "65" + }, + "Charges de personnel": { + "R\u00e9mun\u00e9rations directes vers\u00e9es au personnel national": { + "Appointements salaires et commissions": { + "account_number": "6611" + }, + "Primes et gratifications": { + "account_number": "6612" + }, + "Cong\u00e9s pay\u00e9s": { + "account_number": "6613" + }, + "Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": { + "account_number": "6614" + }, + "Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": { + "account_number": "6615" + }, + "Suppl\u00e9ment familial": { + "account_number": "6616" + }, + "Avantages en nature": { + "account_number": "6617" + }, + "Autres r\u00e9mun\u00e9rations directes": { + "account_number": "6618" + }, + "account_number": "661" + }, + "R\u00e9mun\u00e9rations directes vers\u00e9es au personnel non national": { + "Appointements salaires et commissions": { + "account_number": "6621" + }, + "Primes et gratifications": { + "account_number": "6622" + }, + "Cong\u00e9s pay\u00e9s": { + "account_number": "6623" + }, + "Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": { + "account_number": "6624" + }, + "Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": { + "account_number": "6625" + }, + "Suppl\u00e9ment familial": { + "account_number": "6626" + }, + "Avantages en nature": { + "account_number": "6627" + }, + "Autres r\u00e9mun\u00e9rations directes": { + "account_number": "6628" + }, + "account_number": "662" + }, + "Indemnit\u00e9s forfaitaires vers\u00e9es au personnel": { + "Indemnit\u00e9s de logement": { + "account_number": "6631" + }, + "Indemnit\u00e9s de repr\u00e9sentation": { + "account_number": "6632" + }, + "Indemnit\u00e9s d\u2019expatriation": { + "account_number": "6633" + }, + "Indemnit\u00e9s de transport": { + "account_number": "6634" + }, + "Autres indemnit\u00e9s et avantages divers": { + "account_number": "6638" + }, + "account_number": "663" + }, + "Charges sociales": { + "Charges sociales sur r\u00e9mun\u00e9ration du personnel national": { + "account_number": "6641" + }, + "Charges sociales sur r\u00e9mun\u00e9ration du personnel non national": { + "account_number": "6642" + }, + "account_number": "664" + }, + "R\u00e9mun\u00e9rations et charges sociales de l\u2019exploitant individuel": { + "R\u00e9mun\u00e9ration du travail de l\u2019exploitant": { + "account_number": "6661" + }, + "Charges sociales": { + "account_number": "6662" + }, + "account_number": "666" + }, + "R\u00e9mun\u00e9ration transf\u00e9r\u00e9e de personnel ext\u00e9rieur": { + "Personnel int\u00e9rimaire": { + "account_number": "6671" + }, + "Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": { + "account_number": "6672" + }, + "account_number": "667" + }, + "Autres charges sociales": { + "Versements aux syndicats et comit\u00e9s d\u2019entreprise, d\u2019\u00e9tablissement": { + "account_number": "6681" + }, + "Versements aux comit\u00e9s d\u2019hygi\u00e8ne et de s\u00e9curit\u00e9": { + "account_number": "6682" + }, + "Versements et contributions aux autres \u0153uvres sociales": { + "account_number": "6683" + }, + "M\u00e9decine du travail et pharmacie": { + "account_number": "6684" + }, + "Assurances et organismes de sant\u00e9": { + "account_number": "6685" + }, + "Assurances retraite et fonds de pension": { + "account_number": "6686" + }, + "Majorations et p\u00e9nalit\u00e9s sociales": { + "account_number": "6687" + }, + "Charges sociales diverses": { + "account_number": "6688" + }, + "account_number": "668" + }, + "account_number": "66" + }, + "Frais financiers et charges assimil\u00e9es": { + "Int\u00e9r\u00eats des emprunts": { + "Emprunts obligataires": { + "account_number": "6711" + }, + "Emprunts aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": { + "account_number": "6712" + }, + "Dettes li\u00e9es \u00e0 des participations": { + "account_number": "6713" + }, + "Primes de remboursement des obligations": { + "account_number": "6714" + }, + "account_number": "671" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition": { + "Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail immobilier": { + "account_number": "6722" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail mobilier": { + "account_number": "6723" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition / location-vente": { + "account_number": "6724" + }, + "Int\u00e9r\u00eats dans loyers des autres locations acquisition": { + "account_number": "6728" + }, + "account_number": "672" + }, + "Escomptes accord\u00e9s": { + "account_number": "673" + }, + "Autres int\u00e9r\u00eats": { + "Avances re\u00e7ues et d\u00e9p\u00f4ts cr\u00e9diteurs": { + "account_number": "6741" + }, + "Comptes courants bloqu\u00e9s": { + "account_number": "6742" + }, + "Int\u00e9r\u00eats sur obligations cautionn\u00e9es": { + "account_number": "6743" + }, + "Int\u00e9r\u00eats sur dettes commerciales": { + "account_number": "6744" + }, + "Int\u00e9r\u00eats bancaires et sur op\u00e9rations de financement (escompte...)": { + "account_number": "6745" + }, + "Int\u00e9r\u00eats sur dettes diverses": { + "account_number": "6748" + }, + "account_number": "674" + }, + "Escomptes des effets de commerce": { + "account_number": "675" + }, + "Pertes de change financi\u00e8res": { + "account_number": "676" + }, + "Pertes sur titres de placement": { + "Pertes sur cessions de titres de placement": { + "account_number": "6771" + }, + "Mali provenant d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": { + "account_number": "6772" + }, + "account_number": "677" + }, + "Pertes et charges sur risques financiers": { + "Sur rentes viag\u00e8res": { + "account_number": "6781" + }, + "Sur op\u00e9rations financi\u00e8res": { + "account_number": "6782" + }, + "Sur instruments de tr\u00e9sorerie": { + "account_number": "6784" + }, + "account_number": "678" + }, + "Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "Sur risques financiers": { + "account_number": "6791" + }, + "Sur titres de placement": { + "account_number": "6795" + }, + "Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "account_number": "6798" + }, + "account_number": "679" + }, + "account_number": "67" + }, + "Dotations aux amortissements": { + "Dotations aux amortissements d\u2019exploitation": { + "Dotations aux amortissements des immobilisations incorporelles": { + "account_number": "6812" + }, + "Dotations aux amortissements des immobilisations corporelles": { + "account_number": "6813" + }, + "account_number": "681" + }, + "account_number": "68" + }, + "Dotations aux provisions et aux d\u00e9pr\u00e9ciations": { + "Dotations aux provisions et aux d\u00e9pr\u00e9ciations d\u2019exploitation": { + "Dotations aux provisions pour risques et charges": { + "account_number": "6911" + }, + "Dotations aux d\u00e9pr\u00e9ciations des immobilisations incorporelles": { + "account_number": "6913" + }, + "Dotations aux d\u00e9pr\u00e9ciations des immobilisations corporelles": { + "account_number": "6914" + }, + "account_number": "691" + }, + "Dotations aux provisions et aux d\u00e9pr\u00e9ciations financi\u00e8res": { + "Dotations aux provisions pour risques et charges": { + "account_number": "6971" + }, + "Dotations aux d\u00e9pr\u00e9ciations des immobilisations financi\u00e8res": { + "account_number": "6972" + }, + "account_number": "697" + }, + "account_number": "69" + }, + "root_type": "Expense", + "account_number": "6" + }, + "Comptes de produits des activit\u00e9s ordinaires": { + "Ventes": { + "Ventes de marchandises": { + "Dans la R\u00e9gion": { + "account_number": "7011" + }, + "Hors R\u00e9gion": { + "account_number": "7012" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7013" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7014" + }, + "Sur internet": { + "account_number": "7015" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7019" + }, + "account_number": "701" + }, + "Ventes de produits finis": { + "Dans la R\u00e9gion": { + "account_number": "7021" + }, + "Hors R\u00e9gion": { + "account_number": "7022" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7023" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7024" + }, + "Sur internet": { + "account_number": "7025" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7029" + }, + "account_number": "702" + }, + "Ventes de produits interm\u00e9diaires": { + "Dans la R\u00e9gion": { + "account_number": "7031" + }, + "Hors R\u00e9gion": { + "account_number": "7032" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7033" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7034" + }, + "Sur internet": { + "account_number": "7035" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7039" + }, + "account_number": "703" + }, + "Ventes de produits r\u00e9siduels": { + "Dans la R\u00e9gion": { + "account_number": "7041" + }, + "Hors R\u00e9gion": { + "account_number": "7042" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7043" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7044" + }, + "Sur internet": { + "account_number": "7045" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7049" + }, + "account_number": "704" + }, + "Travaux factur\u00e9s": { + "Dans la R\u00e9gion": { + "account_number": "7051" + }, + "Hors R\u00e9gion": { + "account_number": "7052" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7053" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7054" + }, + "Sur internet": { + "account_number": "7055" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7059" + }, + "account_number": "705" + }, + "Services vendus": { + "Dans la R\u00e9gion": { + "account_number": "7061" + }, + "Hors R\u00e9gion": { + "account_number": "7062" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7063" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7064" + }, + "Sur internet": { + "account_number": "7065" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7069" + }, + "account_number": "706" + }, + "Produits accessoires": { + "Ports, emballages perdus et autres frais factur\u00e9s": { + "account_number": "7071" + }, + "Commissions et courtages": { + "account_number": "7072" + }, + "Locations": { + "account_number": "7073" + }, + "Bonis sur reprises et cessions d\u2019emballages": { + "account_number": "7074" + }, + "Mise \u00e0 disposition de personnel": { + "account_number": "7075" + }, + "Redevances pour brevets, logiciels, marques et droits similaires": { + "account_number": "7076" + }, + "Services exploit\u00e9s dans l\u2019int\u00e9r\u00eat du personnel": { + "account_number": "7077" + }, + "Autres produits accessoires": { + "account_number": "7078" + }, + "account_number": "707" + }, + "account_number": "70" + }, + "Subventions d\u2019exploitation": { + "Sur produits \u00e0 l\u2019exportation": { + "account_number": "711" + }, + "Sur produits \u00e0 l\u2019importation": { + "account_number": "712" + }, + "Sur produits de p\u00e9r\u00e9quation": { + "account_number": "713" + }, + "Indemnit\u00e9s et subventions d\u2019exploitation (entit\u00e9 agricole)": { + "account_number": "714" + }, + "Autres subventions d\u2019exploitation": { + "Vers\u00e9es par l\u2019\u00c9tat et les collectivit\u00e9s publiques": { + "account_number": "7181" + }, + "Vers\u00e9es par les organismes internationaux": { + "account_number": "7182" + }, + "Vers\u00e9es par des tiers": { + "account_number": "7183" + }, + "account_number": "718" + }, + "account_number": "71" + }, + "Production immobilis\u00e9e": { + "Immobilisations incorporelles": { + "account_number": "721" + }, + "Immobilisations corporelles": { + "Immobilisations corporelles (hors actifs biologiques)": { + "account_number": "7221" + }, + "Immobilisations corporelles (actifs biologiques)": { + "account_number": "7222" + }, + "account_number": "722" + }, + "Production auto-consomm\u00e9e": { + "account_number": "724" + }, + "Immobilisations financi\u00e8res": { + "account_number": "726" + }, + "account_number": "72" + }, + "Variations des stocks de biens et de services produits": { + "Variations des stocks de produits en cours": { + "Produits en cours": { + "account_number": "7341" + }, + "Travaux en cours": { + "account_number": "7342" + }, + "account_number": "734" + }, + "Variations des en-cours de services": { + "\u00c9tudes en cours": { + "account_number": "7351" + }, + "Prestations de services en cours": { + "account_number": "7352" + }, + "account_number": "735" + }, + "Variations des stocks de produits finis": { + "account_number": "736" + }, + "Variations des stocks de produits interm\u00e9diaires et r\u00e9siduels": { + "Produits interm\u00e9diaires": { + "account_number": "7371" + }, + "Produits r\u00e9siduels": { + "account_number": "7372" + }, + "account_number": "737" + }, + "account_number": "73" + }, + "Autres produits": { + "Profits sur cr\u00e9ances clients et autres d\u00e9biteurs": { + "account_number": "751" + }, + "Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "Quote-part transf\u00e9r\u00e9e de pertes (comptabilit\u00e9 du g\u00e9rant)": { + "account_number": "7521" + }, + "B\u00e9n\u00e9fices attribu\u00e9s par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": { + "account_number": "7525" + }, + "account_number": "752" + }, + "Produits des cessions courantes d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "7541" + }, + "Immobilisations corporelles": { + "account_number": "7542" + }, + "account_number": "754" + }, + "Gains de change sur cr\u00e9ances et dettes commerciales": { + "account_number": "756" + }, + "Produits divers": { + "Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": { + "account_number": "7581" + }, + "Indemnit\u00e9s d\u2019assurances re\u00e7ues": { + "account_number": "7582" + }, + "Autres produits divers": { + "account_number": "7588" + }, + "account_number": "758" + }, + "Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "Sur risques \u00e0 court terme": { + "account_number": "7591" + }, + "Sur stocks": { + "account_number": "7593" + }, + "Sur cr\u00e9ances": { + "account_number": "7594" + }, + "Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "account_number": "7598" + }, + "account_number": "759" + }, + "account_number": "75" + }, + "Revenus financiers et produits assimil\u00e9s": { + "Int\u00e9r\u00eats de pr\u00eats et cr\u00e9ances diverses": { + "Int\u00e9r\u00eats de pr\u00eats": { + "account_number": "7712" + }, + "Int\u00e9r\u00eats sur cr\u00e9ances diverses": { + "account_number": "7713" + }, + "account_number": "771" + }, + "Revenus de participations et autres titres immobilis\u00e9s": { + "Revenus des titres de participation": { + "account_number": "7721" + }, + "Revenus autres titres immobilis\u00e9s": { + "account_number": "7722" + }, + "account_number": "772" + }, + "Escomptes obtenus": { + "account_number": "773" + }, + "Revenus de placement": { + "Revenus des obligations": { + "account_number": "7745" + }, + "Revenus des titres de placement": { + "account_number": "7746" + }, + "account_number": "774" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition": { + "account_number": "775" + }, + "Gains de change financiers": { + "account_number": "776" + }, + "Gains sur cessions de titres de placement": { + "account_number": "777" + }, + "Gains sur risques financiers": { + "Sur rentes viag\u00e8res": { + "account_number": "7781" + }, + "Sur op\u00e9rations financi\u00e8res": { + "account_number": "7782" + }, + "Sur instruments de tr\u00e9sorerie": { + "account_number": "7784" + }, + "account_number": "778" + }, + "Reprises de charges pour d\u00e9pr\u00e9ciations et provisions \u00e0 court terme financi\u00e8res": { + "Sur risques financiers": { + "account_number": "7791" + }, + "Sur titres de placement": { + "account_number": "7795" + }, + "Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "account_number": "7798" + }, + "account_number": "779" + }, + "account_number": "77" + }, + "Transferts de charges": { + "Transferts de charges d\u2019exploitation": { + "account_number": "781" + }, + "Transferts de charges financi\u00e8res": { + "account_number": "787" + }, + "account_number": "78" + }, + "Reprises de provisions, de d\u00e9pr\u00e9ciations et autres": { + "Reprises de provisions et d\u00e9pr\u00e9ciations d\u2019exploitation": { + "Pour risques et charges": { + "account_number": "7911" + }, + "Des immobilisations incorporelles": { + "account_number": "7913" + }, + "Des immobilisations corporelles": { + "account_number": "7914" + }, + "account_number": "791" + }, + "Reprises de provisions et d\u00e9pr\u00e9ciations financi\u00e8res": { + "Pour risques et charges": { + "account_number": "7971" + }, + "Des immobilisations financi\u00e8res": { + "account_number": "7972" + }, + "account_number": "797" + }, + "Reprises d\u2019amortissements": { + "account_number": "798" + }, + "Reprises de subventions d\u2019investissement": { + "account_number": "799" + }, + "account_number": "79" + }, + "root_type": "Income", + "account_number": "7" + }, + "8-Comptes des autres charges et des autres produits (CHARGES)": { + "Valeurs comptables des cessions d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "811" + }, + "Immobilisations corporelles": { + "account_number": "812" + }, + "Immobilisations financi\u00e8res": { + "account_number": "816" + }, + "account_number": "81" + }, + "Charges hors activit\u00e9s ordinaires": { + "Charges HAO constat\u00e9es": { + "account_number": "831" + }, + "Charges li\u00e9es aux op\u00e9rations de restructuration": { + "account_number": "833" + }, + "Pertes sur cr\u00e9ances HAO": { + "account_number": "834" + }, + "Dons et lib\u00e9ralit\u00e9s accord\u00e9s": { + "account_number": "835" + }, + "Abandons de cr\u00e9ances consentis": { + "account_number": "836" + }, + "Charges li\u00e9es aux op\u00e9rations de liquidation": { + "account_number": "837" + }, + "Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": { + "account_number": "839" + }, + "account_number": "83" + }, + "Dotations hors activit\u00e9s ordinaires": { + "Dotations aux provisions r\u00e9glement\u00e9es": { + "account_number": "851" + }, + "Dotations aux amortissements HAO": { + "account_number": "852" + }, + "Dotations aux d\u00e9pr\u00e9ciations HAO": { + "account_number": "853" + }, + "Dotations aux provisions pour risques et charges HAO": { + "account_number": "854" + }, + "Autres dotations HAO": { + "account_number": "858" + }, + "account_number": "85" + }, + "Participation des travailleurs": { + "Participation l\u00e9gale aux b\u00e9n\u00e9fices": { + "account_number": "871" + }, + "Participation contractuelle aux b\u00e9n\u00e9fices": { + "account_number": "874" + }, + "Autres participations": { + "account_number": "878" + }, + "account_number": "87" + }, + "Imp\u00f4ts sur le r\u00e9sultat": { + "Imp\u00f4ts sur les b\u00e9n\u00e9fices de l\u2019exercice": { + "Activit\u00e9s exerc\u00e9es dans l\u2019\u00c9tat": { + "account_number": "8911" + }, + "Activit\u00e9s exerc\u00e9es dans les autres \u00c9tats de la R\u00e9gion": { + "account_number": "8912" + }, + "Activit\u00e9s exerc\u00e9es hors R\u00e9gion": { + "account_number": "8913" + }, + "account_number": "891" + }, + "Rappel d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": { + "account_number": "892" + }, + "Imp\u00f4t minimum forfaitaire IMF": { + "account_number": "895" + }, + "D\u00e9gr\u00e8vements et annulations d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": { + "D\u00e9gr\u00e8vements": { + "account_number": "8991" + }, + "Annulations pour pertes r\u00e9troactives": { + "account_number": "8994" + }, + "account_number": "899" + }, + "account_number": "89" + }, + "root_type": "Expense" + }, + "8-Comptes des autres charges et des autres produits (PRODUITS)": { + "Produits des cessions d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "821" + }, + "Immobilisations corporelles": { + "account_number": "822" + }, + "Immobilisations financi\u00e8res": { + "account_number": "826" + }, + "account_number": "82" + }, + "Produits hors activit\u00e9s ordinaires": { + "Produits HAO constat\u00e9s": { + "account_number": "841" + }, + "Produits li\u00e9s aux op\u00e9rations de restructuration": { + "account_number": "843" + }, + "Indemnit\u00e9s et subventions HAO (entit\u00e9 agricole)": { + "account_number": "844" + }, + "Dons et lib\u00e9ralit\u00e9s obtenus": { + "account_number": "845" + }, + "Abandons de cr\u00e9ances obtenus": { + "account_number": "846" + }, + "Produits li\u00e9s aux op\u00e9rations de liquidation": { + "account_number": "847" + }, + "Transferts de charges HAO": { + "account_number": "848" + }, + "Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": { + "account_number": "849" + }, + "account_number": "84" + }, + "Reprises de charges, provisions et d\u00e9pr\u00e9ciations HAO": { + "Reprises de provisions r\u00e9glement\u00e9es": { + "account_number": "861" + }, + "Reprises d\u2019amortissements HAO": { + "account_number": "862" + }, + "Reprises de d\u00e9pr\u00e9ciations HAO": { + "account_number": "863" + }, + "Reprises de provisions pour risques et charges HAO": { + "account_number": "864" + }, + "Autres reprises HAO": { + "account_number": "868" + }, + "account_number": "86" + }, + "Subventions d\u2019\u00e9quilibre": { + "\u00c9tat": { + "account_number": "881" + }, + "Collectivit\u00e9s publiques": { + "account_number": "884" + }, + "Groupe": { + "account_number": "886" + }, + "Autres": { + "account_number": "888" + }, + "account_number": "88" + }, + "root_type": "Income" + } + } +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/cf_plan_comptable.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/cf_plan_comptable.json new file mode 100644 index 00000000000..4871d5387af --- /dev/null +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/cf_plan_comptable.json @@ -0,0 +1,1919 @@ +{ + "country_code": "cf", + "name": "Syscohada - Plan Comptable", + "tree": { + "1-Comptes de ressources durables": { + "10-Capital": { + "101-Capital social": { + "1011-Capital souscrit, non appel\u00e9": {}, + "1012-Capital souscrit, appel\u00e9, non vers\u00e9": {}, + "1013-Capital souscrit, appel\u00e9, vers\u00e9, non amorti": {}, + "1014-Capital souscrit, appel\u00e9, vers\u00e9, amorti": {}, + "1018-Capital souscrit soumis \u00e0 des conditions particuli\u00e8res": {} + }, + "102-Capital par dotation": { + "1021-Dotation initiale": {}, + "1022-Dotations compl\u00e9mentaires": {}, + "1028-Autres dotations": {} + }, + "103-Capital personnel": {}, + "104-Compte de l\u2019exploitant": { + "1041-Apports temporaires": {}, + "1042-Op\u00e9rations courantes": {}, + "1043-R\u00e9mun\u00e9rations, imp\u00f4ts et autres charges personnelles": {}, + "1047-Pr\u00e9l\u00e8vements d\u2019autoconsommation": {}, + "1048-Autres pr\u00e9l\u00e8vements": {} + }, + "105-Primes li\u00e9es au capital social": { + "1051-Primes d\u2019\u00e9mission": {}, + "1052-Primes d\u2019apport": {}, + "1053-Primes de fusion": {}, + "1054-Primes de conversion": {}, + "1058-Autres primes": {} + }, + "106-\u00c9carts de r\u00e9\u00e9valuation": { + "1061-\u00c9carts de r\u00e9\u00e9valuation l\u00e9gale": {}, + "1062-\u00c9carts de r\u00e9\u00e9valuation libre": {} + }, + "109-Apporteurs, capital souscrit, non appel\u00e9": {} + }, + "11-R\u00e9serves": { + "111-R\u00e9serve l\u00e9gale": {}, + "112-R\u00e9serves statutaires ou contractuelles": {}, + "113-R\u00e9serves r\u00e9glement\u00e9es": { + "1131-R\u00e9serves de plus-values nettes \u00e0 long terme": {}, + "1132-R\u00e9serves d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": {}, + "1133-R\u00e9serves cons\u00e9cutives \u00e0 l\u2019octroi de subventions d\u2019investissement": {}, + "1134-R\u00e9serves des valeurs mobili\u00e8res donnant acc\u00e8s au capital": {}, + "1135-Autres r\u00e9serves r\u00e9glement\u00e9es": {} + }, + "118-Autres r\u00e9serves": { + "1181-R\u00e9serves facultatives": {}, + "1188-R\u00e9serves diverses": {} + } + }, + "12-Report \u00e0 nouveau": { + "121-Report \u00e0 nouveau cr\u00e9diteur": {}, + "129-Report \u00e0 nouveau d\u00e9biteur": { + "1291-Perte nette \u00e0 reporter": {}, + "1292-Perte Amortissements r\u00e9put\u00e9s diff\u00e9r\u00e9s": {} + } + }, + "13-R\u00e9sultat net de l\u2019exercice": { + "130-R\u00e9sultat en instance d\u2019affectation": { + "1301-R\u00e9sultat en instance d\u2019affectation : b\u00e9n\u00e9fice": {}, + "1309-R\u00e9sultat en instance d\u2019affectation : perte": {} + }, + "131-R\u00e9sultat net : b\u00e9n\u00e9fice": {}, + "132-Marge commerciale (MC)": {}, + "133-Valeur ajout\u00e9e (VA)": {}, + "134-Exc\u00e9dent brut d\u2019exploitation (EBE)": {}, + "135-R\u00e9sultat d\u2019exploitation (RE)": {}, + "136-R\u00e9sultat financier (RF)": {}, + "137-R\u00e9sultat des activit\u00e9s ordinaires (RAO)": {}, + "138-R\u00e9sultat hors activit\u00e9s ordinaires (RHAO)": { + "1381-R\u00e9sultat de fusion": {}, + "1382-R\u00e9sultat d\u2019apport partiel d\u2019actif": {}, + "1383-R\u00e9sultat de scission": {}, + "1384-R\u00e9sultat de liquidation": {} + }, + "139-R\u00e9sultat net : perte": {} + }, + "14-Subventions d\u2019investissement": { + "141-Subventions d\u2019\u00e9quipement": { + "1411-\u00c9tat": {}, + "1412-R\u00e9gions": {}, + "1413-D\u00e9partements": {}, + "1414-Communes et collectivit\u00e9s publiques d\u00e9centralis\u00e9es": {}, + "1415-Entit\u00e9s publiques ou mixtes": {}, + "1416-Entit\u00e9s et organismes priv\u00e9s": {}, + "1417-Organismes internationaux": {}, + "1418-Autres": {} + }, + "148-Autres subventions d\u2019investissement": {} + }, + "15-Provisions r\u00e9glement\u00e9es et fonds assimil\u00e9s": { + "151-Amortissements d\u00e9rogatoires": {}, + "152-Plus-values de cession \u00e0 r\u00e9investir": {}, + "153-Fonds r\u00e9glement\u00e9s": { + "1531-Fonds National": {}, + "1532-Pr\u00e9l\u00e8vement pour le Budget": {} + }, + "154-Provisions sp\u00e9ciales de r\u00e9\u00e9valuation": {}, + "155-Provisions r\u00e9glement\u00e9es relatives aux immobilisations": { + "1551-Reconstitution des gisements miniers et p\u00e9troliers": {} + }, + "156-Provisions r\u00e9glement\u00e9es relatives aux stocks": { + "1561-Hausse de prix": {}, + "1562-Fluctuation des cours": {} + }, + "157-Provisions pour investissement": {}, + "158-Autres provisions et fonds r\u00e9glement\u00e9s": {} + }, + "16-Emprunts et dettes assimil\u00e9es": { + "161-Emprunts obligataires": { + "1611-Emprunts obligataires ordinaires": {}, + "1612-Emprunts obligataires convertibles en actions": {}, + "1613-Emprunts obligataires remboursables en actions": {}, + "1618-Autres emprunts obligataires": {} + }, + "162-Emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": {}, + "163-Avances re\u00e7ues de l\u2019\u00c9tat": {}, + "164-Avances re\u00e7ues et comptes courants bloqu\u00e9s": {}, + "165-D\u00e9p\u00f4ts et cautionnements re\u00e7us": { + "1651-D\u00e9p\u00f4ts": {}, + "1652-Cautionnements": {} + }, + "166-Int\u00e9r\u00eats courus": { + "1661-Sur emprunts obligataires": {}, + "1662-Sur emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": {}, + "1663-Sur avances re\u00e7ues de l\u2019\u00c9tat": {}, + "1664-Sur avances re\u00e7ues et comptes courants bloqu\u00e9s": {}, + "1665-Sur d\u00e9p\u00f4ts et cautionnements re\u00e7us": {}, + "1667-Sur avances assorties de conditions particuli\u00e8res": {}, + "1668-Sur autres emprunts et dettes": {} + }, + "167-Avances assorties de conditions particuli\u00e8res": { + "1671-Avances bloqu\u00e9es pour augmentation du capital": {}, + "1672-Avances conditionn\u00e9es par l\u2019\u00c9tat": {}, + "1673-Avances conditionn\u00e9es par les autres organismes africains": {}, + "1674-Avances conditionn\u00e9es par les organismes internationaux": {} + }, + "168-Autres emprunts et dettes": { + "1681-Rentes viag\u00e8res capitalis\u00e9es": {}, + "1682-Billets de fonds": {}, + "1683-Dettes cons\u00e9cutives \u00e0 des titres emprunt\u00e9s": {}, + "1684-Emprunts participatifs": {}, + "1685-Participation des travailleurs aux b\u00e9n\u00e9fices": {}, + "1686-Emprunts et dettes contract\u00e9s aupr\u00e8s des autres tiers": {} + } + }, + "17-Dettes de location acquisition": { + "172-Dettes de location acquisition / cr\u00e9dit bail immobilier": {}, + "173-Dettes de location acquisition / cr\u00e9dit bail mobilier": {}, + "174-Dettes de location acquisition / location de vente": {}, + "176-Int\u00e9r\u00eats courus": { + "1762-Sur dettes de location acquisition / cr\u00e9dit-bail immobilier": {}, + "1763-Sur dettes de location acquisition / cr\u00e9dit-bail mobilier": {}, + "1764-Sur dettes de location acquisition / location-vente": {}, + "1768-Sur autres dettes de location acquisition": {} + }, + "178-Autres dettes de location acquisition": {} + }, + "18-Dettes li\u00e9es \u00e0 des participations et comptes de liaison des \u00e9tablissements et soci\u00e9t\u00e9s en participation": { + "181-Dettes li\u00e9es \u00e0 des participations": { + "1811-Dettes li\u00e9es \u00e0 des participations (groupe)": {}, + "1812-Dettes li\u00e9es \u00e0 des participations (hors groupe)": {} + }, + "182-Dettes li\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": {}, + "183-Int\u00e9r\u00eats courus sur dettes li\u00e9es \u00e0 des participations": {}, + "184-Comptes permanents bloqu\u00e9s des \u00e9tablissements et succursales": {}, + "185-Comptes permanents non bloqu\u00e9s des \u00e9tablissements et succursales": {}, + "186-Comptes de liaison charges": {}, + "187-Comptes de liaison produits": {}, + "188-Comptes de liaison des soci\u00e9t\u00e9s en participation": {} + }, + "19-Provisions pour risques et charges": { + "191-Provisions pour litiges": {}, + "192-Provisions pour garanties donn\u00e9es aux clients": {}, + "193-Provisions pour pertes sur march\u00e9s \u00e0 ach\u00e8vement futur": {}, + "194-Provisions pour pertes de change": {}, + "195-Provisions pour imp\u00f4ts": {}, + "196-Provisions pour pensions et obligations similaires": { + "1961-Provisions pour pensions et obligations similaires engagement de retraite": {}, + "1962-Actif du r\u00e9gime de retraite": {} + }, + "197-Provisions pour restructuration": {}, + "198-Autres provisions pour risques et charges": { + "1981-Provisions pour amendes et p\u00e9nalit\u00e9s": {}, + "1983-Provisions pour propre assureur": {}, + "1984-Provisions pour d\u00e9mant\u00e8lement et remise en \u00e9tat": {}, + "1985-Provisions pour droits \u00e0 r\u00e9duction ou avantage en nature (ch\u00e8ques cadeau, cartes de fid\u00e9lit\u00e9...)": {}, + "1988-Provisions pour divers risques et charges": {} + } + }, + "root_type": "Equity" + }, + "2-Comptes d\u2019actif immobilis\u00e9": { + "21-Immobilisations incorporelles": { + "account_type": "Fixed Asset", + "211-Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset" + }, + "212-Brevets, licences, concessions et droits similaires": { + "account_type": "Fixed Asset", + "2121-Brevets": { + "account_type": "Fixed Asset" + }, + "2122-Licences": { + "account_type": "Fixed Asset" + }, + "2123-Concessions de service public": { + "account_type": "Fixed Asset" + }, + "2128-Autres concessions et droits similaires": { + "account_type": "Fixed Asset" + } + }, + "213-Logiciels et sites internet": { + "account_type": "Fixed Asset", + "2131-Logiciels": { + "account_type": "Fixed Asset" + }, + "2132-Sites internet": { + "account_type": "Fixed Asset" + } + }, + "214-Marques": { + "account_type": "Fixed Asset" + }, + "215-Fonds commercial": { + "account_type": "Fixed Asset" + }, + "216-Droit au bail": { + "account_type": "Fixed Asset" + }, + "217-Investissements de cr\u00e9ation": { + "account_type": "Fixed Asset" + }, + "218-Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset", + "2181-Frais de prospection et d\u2019\u00e9valuation de ressources min\u00e9rales": { + "account_type": "Fixed Asset" + }, + "2182-Co\u00fbts d\u2019obtention du contrat": { + "account_type": "Fixed Asset" + }, + "2183-Fichiers clients, notices, titres de journaux et magazines": { + "account_type": "Fixed Asset" + }, + "2184-Co\u00fbts des franchises": { + "account_type": "Fixed Asset" + }, + "2188-Divers droits et valeurs incorporelles": { + "account_type": "Fixed Asset" + } + }, + "219-Immobilisations incorporelles en cours": { + "account_type": "Fixed Asset", + "2191-Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset" + }, + "2193-Logiciels et internet": { + "account_type": "Fixed Asset" + }, + "2198-Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset" + } + } + }, + "22-Terrains": { + "account_type": "Fixed Asset", + "221-Terrains agricoles et forestiers": { + "account_type": "Fixed Asset", + "2211-Terrains d\u2019exploitation agricole": { + "account_type": "Fixed Asset" + }, + "2212-Terrains d\u2019exploitation foresti\u00e8re": { + "account_type": "Fixed Asset" + }, + "2218-Autres terrains": { + "account_type": "Fixed Asset" + } + }, + "222-Terrains nus": { + "account_type": "Fixed Asset", + "2221-Terrains \u00e0 b\u00e2tir": { + "account_type": "Fixed Asset" + }, + "2228-Autres terrains nus": { + "account_type": "Fixed Asset" + } + }, + "223-Terrains b\u00e2tis": { + "account_type": "Fixed Asset", + "2231-Pour b\u00e2timents industriels et agricoles": { + "account_type": "Fixed Asset" + }, + "2232-Pour b\u00e2timents administratifs et commerciaux": { + "account_type": "Fixed Asset" + }, + "2234-Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations professionnelles": { + "account_type": "Fixed Asset" + }, + "2235-Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations non professionnelles": { + "account_type": "Fixed Asset" + }, + "2238-Autres terrains b\u00e2tis": { + "account_type": "Fixed Asset" + } + }, + "224-Travaux de mise en valeur des terrains": { + "account_type": "Fixed Asset", + "2241-Plantation d\u2019arbres et d\u2019arbustes": { + "account_type": "Fixed Asset" + }, + "2245-Am\u00e9liorations du fonds": { + "account_type": "Fixed Asset" + }, + "2248-Autres travaux": { + "account_type": "Fixed Asset" + } + }, + "225-Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset", + "2251-Carri\u00e8res": { + "account_type": "Fixed Asset" + } + }, + "226-Terrains am\u00e9nag\u00e9s": { + "account_type": "Fixed Asset", + "2261-Parkings": { + "account_type": "Fixed Asset" + } + }, + "227-Terrains mis en concession": { + "account_type": "Fixed Asset" + }, + "228-Autres terrains": { + "account_type": "Fixed Asset", + "2281-Terrains immeubles de placement": { + "account_type": "Fixed Asset" + }, + "2285-Terrains des logements affect\u00e9s au personnel": { + "account_type": "Fixed Asset" + }, + "2286-Terrains de location acquisition": { + "account_type": "Fixed Asset" + }, + "2288-Divers terrains": { + "account_type": "Fixed Asset" + } + }, + "229-Am\u00e9nagements de terrains en cours": { + "account_type": "Fixed Asset", + "2291-Terrains agricoles et forestiers": { + "account_type": "Fixed Asset" + }, + "2292-Terrains nus": { + "account_type": "Fixed Asset" + }, + "2295-Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset" + }, + "2298-Autres terrains": { + "account_type": "Fixed Asset" + } + } + }, + "23-B\u00e2timents, installations techniques et agencements": { + "231-B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "2311-B\u00e2timents industriels": {}, + "2312-B\u00e2timents agricoles": {}, + "2313-B\u00e2timents administratifs et commerciaux": {}, + "2314-B\u00e2timents affect\u00e9s au logement du personnel": {}, + "2315-B\u00e2timents immeubles de placement": {}, + "2316-B\u00e2timents de location acquisition": {} + }, + "232-B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "2321-B\u00e2timents industriels": {}, + "2322-B\u00e2timents agricoles": {}, + "2323-B\u00e2timents administratifs et commerciaux": {}, + "2324-B\u00e2timents affect\u00e9s au logement du personnel": {}, + "2325-B\u00e2timents immeubles de placement": {}, + "2326-B\u00e2timents de location acquisition": {} + }, + "233-Ouvrages d\u2019infrastructure": { + "2331-Voies de terre": {}, + "2332-Voies de fer": {}, + "2333-Voies d\u2019eau": {}, + "2334-Barrages, Digues": {}, + "2335-Pistes d\u2019a\u00e9rodrome": {}, + "2338-Autres ouvrages d\u2019infrastructures": {} + }, + "234-Am\u00e9nagements, agencements et installations techniques": { + "2341-Installations complexes sp\u00e9cialis\u00e9es sur sol propre": {}, + "2342-Installations complexes sp\u00e9cialis\u00e9es sur sol d\u2019autrui": {}, + "2343-Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol propre": {}, + "2344-Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol d\u2019autrui": {}, + "2345-Am\u00e9nagements et agencements des b\u00e2timents": {} + }, + "235-Am\u00e9nagements de bureaux": { + "2351-Installations g\u00e9n\u00e9rales": {}, + "2358-Autres am\u00e9nagements de bureaux": {} + }, + "237-B\u00e2timents industriels, agricoles et commerciaux mis en concession": {}, + "238-Autres installations et agencements": {}, + "239-B\u00e2timents am\u00e9nagements, agencements et installations en cours": { + "2391-B\u00e2timents en cours": {}, + "2392-Installations en cours": {}, + "2393-Ouvrages d\u2019infrastructure en cours": {}, + "2394-Am\u00e9nagements et agencements et installations techniques en cours": {}, + "2395-Am\u00e9nagements de bureaux en cours": {}, + "2398-Autres installations et agencements en cours": {} + } + }, + "24-Mat\u00e9riel, mobilier et actifs biologiques": { + "241-Mat\u00e9riel et outillage industriel et commercial": { + "2411-Mat\u00e9riel industriel": {}, + "2412-Outillage industriel": {}, + "2413-Mat\u00e9riel commercial": {}, + "2414-Outillage commercial": {}, + "2416-Mat\u00e9riel & outillage industriel et commercial de location-acquisition": {} + }, + "242-Mat\u00e9riel et outillage agricole": { + "2421-Mat\u00e9riel agricole": {}, + "2422-Outillage agricole": {}, + "2426-Mat\u00e9riel & outillage agricole de location-acquisition": {} + }, + "243-Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "244-Mat\u00e9riel et mobilier": { + "2441-Mat\u00e9riel de bureau": {}, + "2442-Mat\u00e9riel informatique": {}, + "2443-Mat\u00e9riel bureautique": {}, + "2444-Mobilier de bureau": {}, + "2445-Mat\u00e9riel et mobilier immeubles de placement": {}, + "2446-Mat\u00e9riel et mobilier de location acquisition": {}, + "2447-Mat\u00e9riel et mobilier des logements du personnel": {} + }, + "245-Mat\u00e9riel de transport": { + "2451-Mat\u00e9riel automobile": {}, + "2452-Mat\u00e9riel ferroviaire": {}, + "2453-Mat\u00e9riel fluvial, lagunaire": {}, + "2454-Mat\u00e9riel naval": {}, + "2455-Mat\u00e9riel a\u00e9rien": {}, + "2456-Mat\u00e9riel de transport de location-acquisition": {}, + "2457-Mat\u00e9riel hippomobile": {}, + "2458-Autres mat\u00e9riels de transport": {} + }, + "246-Actifs biologiques": { + "2461-Cheptel, animaux de trait": {}, + "2462-Cheptel, animaux reproducteurs": {}, + "2463-Animaux de garde": {}, + "2465-Plantations agricoles": {}, + "2468-Autres actifs biologiques": {} + }, + "247-Agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "2471-Agencements et am\u00e9nagements du mat\u00e9riel": {}, + "2472-Agencements et am\u00e9nagements des actifs biologiques": {}, + "2478-Autres agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": {} + }, + "248-Autres mat\u00e9riels et mobiliers": { + "2481-Collections et \u0153uvres d\u2019art": {}, + "2488-Divers mat\u00e9riels mobiliers": {} + }, + "249-Mat\u00e9riels et actifs biologiques en cours": { + "2491-Mat\u00e9riel et outillage industriel et commercial": {}, + "2492-Mat\u00e9riel et outillage agricole": {}, + "2493-Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "2494-Mat\u00e9riel et mobilier de bureau": {}, + "2495-Mat\u00e9riel de transport": {}, + "2496-Actifs biologiques": {}, + "2497-Agencements am\u00e9nagements du mat\u00e9riel et actifs biologiques": {}, + "2498-Autres mat\u00e9riels et actifs biologiques en cours": {} + } + }, + "25-Avances et acomptes vers\u00e9s sur immobilisations": { + "251-Avances et acomptes vers\u00e9s sur immobilisations incorporelles": {}, + "252-Avances et acomptes vers\u00e9s sur immobilisations corporelles": {} + }, + "26-Titres de participation": { + "261-Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": {}, + "262-Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le conjoint": {}, + "263-Titres de participation dans des soci\u00e9t\u00e9s conf\u00e9rant une influence notable": {}, + "265-Participations dans des organismes professionnels": {}, + "266-Parts dans des groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": {}, + "268-Autres titres de participation": {} + }, + "27-Autres immobilisations financi\u00e8res": { + "271-Pr\u00eats et cr\u00e9ances": { + "2711-Pr\u00eats participatifs": {}, + "2712-Pr\u00eats aux associ\u00e9s": {}, + "2713-Billets de fonds": {}, + "2714-Titres pr\u00eat\u00e9s": {}, + "2718-Autres pr\u00eats et cr\u00e9ances": {} + }, + "272-Pr\u00eats au personnel": { + "2721-Pr\u00eats immobiliers": {}, + "2722-Pr\u00eats mobiliers et d\u2019installation": {}, + "2728-Autres pr\u00eats au personnel": {} + }, + "273-Cr\u00e9ances sur l\u2019\u00c9tat": { + "2731-Retenues de garantie": {}, + "2733-Fonds r\u00e9glement\u00e9": {}, + "2734-Cr\u00e9ances sur le conc\u00e9dant": {}, + "2738-Autres cr\u00e9ances sur l\u2019\u00c9tat": {} + }, + "274-Titres immobilis\u00e9s": { + "2741-Titres immobilis\u00e9s de l\u2019activit\u00e9 de portefeuille (TIAP)": {}, + "2742-Titres participatifs": {}, + "2743-Certificats d\u2019investissement": {}, + "2744-Parts de fonds commun de placement (FCP)": {}, + "2745-Obligations": {}, + "2746-Actions ou parts propres": {}, + "2748-Autres titres immobilis\u00e9s": {} + }, + "275-D\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "2751-D\u00e9p\u00f4ts pour loyers d\u2019avance": {}, + "2752-D\u00e9p\u00f4ts pour l\u2019\u00e9lectricit\u00e9": {}, + "2753-D\u00e9p\u00f4ts pour l\u2019eau": {}, + "2754-D\u00e9p\u00f4ts pour le gaz": {}, + "2755-D\u00e9p\u00f4ts pour le t\u00e9l\u00e9phone, le t\u00e9lex, la t\u00e9l\u00e9copie": {}, + "2756-Cautionnements sur march\u00e9s publics": {}, + "2757-Cautionnements sur autres op\u00e9rations": {}, + "2758-Autres d\u00e9p\u00f4ts et cautionnements": {} + }, + "276-Int\u00e9r\u00eats courus": { + "2761-Pr\u00eats et cr\u00e9ances non commerciales": {}, + "2762-Pr\u00eats au personnel": {}, + "2763-Cr\u00e9ances sur l\u2019\u00c9tat": {}, + "2764-Titres immobilis\u00e9s": {}, + "2765-D\u00e9p\u00f4ts et cautionnements vers\u00e9s": {}, + "2767-Cr\u00e9ances rattach\u00e9es \u00e0 des participations": {}, + "2768-Immobilisations financi\u00e8res diverses": {} + }, + "277-Cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": { + "2771-Cr\u00e9ances rattach\u00e9es \u00e0 des participations (groupe)": {}, + "2772-Cr\u00e9ances rattach\u00e9es \u00e0 des participations (hors groupe)": {}, + "2773-Cr\u00e9ances rattach\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": {}, + "2774-Avances \u00e0 des Groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": {} + }, + "278-Immobilisations financi\u00e8res diverses": { + "2781-Cr\u00e9ances diverses groupe": {}, + "2782-Cr\u00e9ances diverses hors groupe": {}, + "2784-Banques d\u00e9p\u00f4ts \u00e0 terme": {}, + "2785-Or et m\u00e9taux pr\u00e9cieux": {}, + "2788-Autres immobilisations financi\u00e8res": {} + } + }, + "28-Amortissements": { + "account_type": "Accumulated Depreciation", + "281-Amortissements des immobilisations corporelles": { + "account_type": "Accumulated Depreciation", + "2811-Amortissements des frais de d\u00e9veloppement": { + "account_type": "Accumulated Depreciation" + }, + "2812-Amortissements des brevets, licences, concessions et droits similaires": { + "account_type": "Accumulated Depreciation" + }, + "2813-Amortissements des logiciels et sites internet": { + "account_type": "Accumulated Depreciation" + }, + "2814-Amortissements des marques": { + "account_type": "Accumulated Depreciation" + }, + "2815-Amortissements du fonds commercial": { + "account_type": "Accumulated Depreciation" + }, + "2816-Amortissements du droit au bail": { + "account_type": "Accumulated Depreciation" + }, + "2817-Amortissements des investissements de cr\u00e9ation": { + "account_type": "Accumulated Depreciation" + }, + "2818-Amortissements des autres droits et valeurs incorporels": { + "account_type": "Accumulated Depreciation" + } + }, + "282-Amortissements des terrains": { + "2824-Amortissements des travaux de mise en valeur des terrains": {} + }, + "283-Amortissements des b\u00e2timents, installations techniques et agencements": { + "2831-Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": {}, + "2832-Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": {}, + "2833-Amortissements des ouvrages d\u2019infrastructure": {}, + "2834-Amortissements des am\u00e9nagements, agencements et installations techniques": {}, + "2835-Amortissements des am\u00e9nagements de bureaux": {}, + "2837-Amortissements des b\u00e2timents industriels, agricoles et commerciaux mis en concession": {}, + "2838-Amortissements des autres installations et agencements": {} + }, + "284-Amortissements du mat\u00e9riel": { + "2841-Amortissements du mat\u00e9riel et outillage industriel et commercial": {}, + "2842-Amortissements du mat\u00e9riel et outillage agricole": {}, + "2843-Amortissements du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "2844-Amortissements du mat\u00e9riel et mobilier": {}, + "2845-Amortissements du mat\u00e9riel de transport": {}, + "2846-Amortissements des actifs biologiques": {}, + "2847-Amortissements des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": {}, + "2848-Amortissements des autres mat\u00e9riels": {} + } + }, + "29-D\u00e9pr\u00e9ciations des immobilisations": { + "291-D\u00e9pr\u00e9ciations des immobilisations incorporelles": { + "2911-D\u00e9pr\u00e9ciations des frais de d\u00e9veloppement": {}, + "2912-D\u00e9pr\u00e9ciations des brevets, licences, concessions et droits similaires": {}, + "2913-D\u00e9pr\u00e9ciations des logiciels et sites internet": {}, + "2914-D\u00e9pr\u00e9ciations des marques": {}, + "2915-D\u00e9pr\u00e9ciations du fonds commercial": {}, + "2916-D\u00e9pr\u00e9ciations du droit au bail": {}, + "2917-D\u00e9pr\u00e9ciations des investissements de cr\u00e9ation": {}, + "2918-D\u00e9pr\u00e9ciations des autres droits et valeurs incorporels": {}, + "2919-D\u00e9pr\u00e9ciations des immobilisations incorporelles en cours": {} + }, + "292-D\u00e9pr\u00e9ciations des terrains": { + "2921-D\u00e9pr\u00e9ciations des terrains agricoles et forestiers": {}, + "2922-D\u00e9pr\u00e9ciations des terrains nus": {}, + "2923-D\u00e9pr\u00e9ciations des terrains b\u00e2tis": {}, + "2924-D\u00e9pr\u00e9ciations des travaux de mise en valeur des terrains": {}, + "2925-D\u00e9pr\u00e9ciations des terrains de gisement": {}, + "2926-D\u00e9pr\u00e9ciations des terrains am\u00e9nag\u00e9s": {}, + "2927-D\u00e9pr\u00e9ciations des terrains mis en concession": {}, + "2928-D\u00e9pr\u00e9ciations des autres terrains": {}, + "2929-D\u00e9pr\u00e9ciations des am\u00e9nagements de terrains en cours": {} + }, + "293-D\u00e9pr\u00e9ciations des b\u00e2timents, installations techniques et agencements": { + "2931-D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": {}, + "2932-D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": {}, + "2933-D\u00e9pr\u00e9ciations des ouvrages d\u2019infrastructures": {}, + "2934-D\u00e9pr\u00e9ciations des am\u00e9nagements, agencements et installations techniques": {}, + "2935-D\u00e9pr\u00e9ciations des am\u00e9nagements de bureaux": {}, + "2937-D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles et commerciaux mis en concession": {}, + "2938-D\u00e9pr\u00e9ciations des autres installations et agencements": {}, + "2939-D\u00e9pr\u00e9ciations des b\u00e2timents et installations en cours": {} + }, + "294-D\u00e9pr\u00e9ciations de mat\u00e9riel, du mobilier et de l\u2019actif biologique": { + "2941-D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage industriel et commercial": {}, + "2942-D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage agricole": {}, + "2943-D\u00e9pr\u00e9ciations du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "2944-D\u00e9pr\u00e9ciations du mat\u00e9riel et mobilier": {}, + "2945-D\u00e9pr\u00e9ciations du mat\u00e9riel de transport": {}, + "2946-D\u00e9pr\u00e9ciations des actifs biologiques": {}, + "2947-D\u00e9pr\u00e9ciations des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": {}, + "2948-D\u00e9pr\u00e9ciations des autres mat\u00e9riels": {}, + "2949-D\u00e9pr\u00e9ciations de mat\u00e9riel en cours": {} + }, + "295-D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations": { + "2951-D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations incorporelles": {}, + "2952-D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations corporelles": {} + }, + "296-D\u00e9pr\u00e9ciations des titres de participation": { + "2961-D\u00e9pr\u00e9ciations des titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": {}, + "2962-D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s sous contr\u00f4le conjoint": {}, + "2963-D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s conf\u00e9rant une influence notable": {}, + "2965-D\u00e9pr\u00e9ciations des participations dans des organismes professionnels": {}, + "2966-D\u00e9pr\u00e9ciations des parts dans des GIE": {}, + "2968-D\u00e9pr\u00e9ciations des autres titres de participation": {} + }, + "297-D\u00e9pr\u00e9ciations des autres immobilisations financi\u00e8res": { + "2971-D\u00e9pr\u00e9ciations des pr\u00eats et cr\u00e9ances": {}, + "2972-D\u00e9pr\u00e9ciations des pr\u00eats au personnel": {}, + "2973-D\u00e9pr\u00e9ciations des cr\u00e9ances sur l\u2019\u00c9tat": {}, + "2974-D\u00e9pr\u00e9ciations des titres immobilis\u00e9s": {}, + "2975-D\u00e9pr\u00e9ciations des d\u00e9p\u00f4ts et cautionnements vers\u00e9s": {}, + "2977-D\u00e9pr\u00e9ciations des cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": {}, + "2978-D\u00e9pr\u00e9ciations des cr\u00e9ances financi\u00e8res diverses": {} + } + }, + "root_type": "Asset" + }, + "3-Comptes de Stocks": { + "31-Marchandises": { + "311-Marchandises A": { + "3111-Marchandises A1": {}, + "3112-Marchandises A2": {} + }, + "312-Marchandises B": { + "3121-Marchandises B1": {}, + "3122-Marchandises B2": {} + }, + "313-Actifs biologiques": { + "3131-Animaux": {}, + "3132-V\u00e9g\u00e9taux": {} + }, + "318-Marchandises hors activit\u00e9s ordinaires (HAO)": {} + }, + "32-Mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "321-Mati\u00e8res A": {}, + "322-Mati\u00e8res B": {}, + "323-Fournitures (A, B)": {} + }, + "33-Autres approvisionnements": { + "331-Mati\u00e8res consommables": {}, + "332-Fournitures d\u2019atelier et d\u2019usine": {}, + "333-Fournitures de magasin": {}, + "334-Fournitures de bureau": {}, + "335-Emballages": { + "3351-Emballages perdus": {}, + "3352-Emballages r\u00e9cup\u00e9rables non identifiables": {}, + "3353-Emballages \u00e0 usage mixte": {}, + "3358-Autres emballages": {} + }, + "338-Autres mati\u00e8res": {} + }, + "34-Produits en cours": { + "341-Produits en cours": { + "3411-Produits en cours P1": {}, + "3412-Produits en cours P2": {} + }, + "342-Travaux en cours": { + "3421-Travaux en cours T1": {}, + "3422-Travaux en cours T2": {} + }, + "343-Produits interm\u00e9diaires en cours": { + "3431-Produits interm\u00e9diaires A": {}, + "3432-Produits interm\u00e9diaires B": {} + }, + "344-Produits r\u00e9siduels en cours": { + "3441-Produits r\u00e9siduels A": {}, + "3442-Produits r\u00e9siduels B": {} + }, + "345-Actifs biologiques en cours": { + "3451-Animaux": {}, + "3452-V\u00e9g\u00e9taux": {} + } + }, + "35-Services en cours": { + "351-\u00c9tudes en cours": { + "3511-\u00c9tudes en cours E1": {}, + "3512-\u00c9tudes en cours E2": {} + }, + "352-Prestations de services en cours": { + "3521-Prestations de services S1": {}, + "3522-Prestations de services S2": {} + } + }, + "36-Produits finis": { + "361-Produits finis A": {}, + "362-Produits finis B": {}, + "363-Actifs biologiques": { + "3631-Animaux": {}, + "3632-V\u00e9g\u00e9taux": {}, + "3638-Autres stocks (activit\u00e9s annexes)": {} + } + }, + "37-Produits interm\u00e9diaires et r\u00e9siduels": { + "371-Produits interm\u00e9diaires": { + "3711-Produits interm\u00e9diaires A": {}, + "3712-Produits interm\u00e9diaires B": {} + }, + "372-Produits r\u00e9siduels": { + "3721-D\u00e9chets": {}, + "3722-Rebuts": {}, + "3723-Mati\u00e8res de R\u00e9cup\u00e9ration": {} + }, + "373-Actifs biologiques": { + "3731-Animaux": {}, + "3732-V\u00e9g\u00e9taux": {}, + "3738-Autres stocks (activit\u00e9s annexes)": {} + } + }, + "38-Stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": { + "account_type": "Stock", + "381-Marchandises en cours de route": {}, + "382-Mati\u00e8res premi\u00e8res et fournitures li\u00e9es en cours de route": {}, + "383-Autres approvisionnements en cours de route": {}, + "386-Produits finis en cours de route": {}, + "387-Stock en consignation ou en d\u00e9p\u00f4t": { + "3871-Stock en consignation": {}, + "3872-Stock en d\u00e9p\u00f4t": {} + }, + "388-Stock provenant d\u2019immobilisations mises hors service ou au rebut": {} + }, + "39-D\u00e9pr\u00e9ciations des stocks et encours de production": { + "391-D\u00e9pr\u00e9ciations des stocks de marchandises": {}, + "392-D\u00e9pr\u00e9ciations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": {}, + "393-D\u00e9pr\u00e9ciations des stocks d\u2019autres approvisionnements": {}, + "394-D\u00e9pr\u00e9ciations des productions en cours": {}, + "395-D\u00e9pr\u00e9ciations des services en cours": {}, + "396-D\u00e9pr\u00e9ciations des stocks de produits finis": {}, + "397-D\u00e9pr\u00e9ciations des stocks de produits interm\u00e9diaires et r\u00e9siduels": {}, + "398-D\u00e9pr\u00e9ciations des stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": {} + }, + "root_type": "Asset" + }, + "4-Comptes de Tiers (ACTIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (ACTIF)": { + "409-Fournisseurs d\u00e9biteurs": { + "4091-Fournisseurs Avances et acomptes vers\u00e9s": {}, + "4092-Fournisseurs Groupe avances et acomptes vers\u00e9s": {}, + "4093-Fournisseurs Sous-traitants avances et acomptes vers\u00e9s": {}, + "4094-Fournisseurs Cr\u00e9ances pour emballages et mat\u00e9riels \u00e0 rendre": {}, + "4098-Fournisseurs Rabais, remises, ristournes et autres avoirs \u00e0 obtenir": {} + } + }, + "41-Clients et comptes rattach\u00e9s (ACTIF)": { + "411-Clients": { + "4111-Clients": { + "account_type": "Receivable" + }, + "4112-Clients groupe": { + "account_type": "Receivable" + }, + "4114-Clients, \u00c9tat et Collectivit\u00e9s publiques": { + "account_type": "Receivable" + }, + "4115-Clients, organismes internationaux": { + "account_type": "Receivable" + }, + "4116-Clients, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Receivable" + }, + "4117-Client, retenues de garantie": { + "account_type": "Receivable" + }, + "4118-Clients, d\u00e9gr\u00e8vement de taxes sur la valeur ajout\u00e9e (TVA)": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "412-Clients, effets \u00e0 recevoir en portefeuille": { + "4121-Clients, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "4122-Clients Groupe, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "4124-\u00c9tat et Collectivit\u00e9s publiques, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "4125-Organismes Internationaux, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "413-Clients, ch\u00e8ques, effets et autres valeurs impay\u00e9es": { + "4131-Clients, ch\u00e8ques impay\u00e9s": { + "account_type": "Receivable" + }, + "4132-Clients, effets impay\u00e9s": { + "account_type": "Receivable" + }, + "4133-Clients, cartes de cr\u00e9dit impay\u00e9es": { + "account_type": "Receivable" + }, + "4138-Clients, autres valeurs impay\u00e9es": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "414-Cr\u00e9ances sur cessions courantes d\u2019immobilisations": { + "4141-Cr\u00e9ances en compte, immobilisations incorporelles": { + "account_type": "Receivable" + }, + "4142-Cr\u00e9ances en compte, immobilisations corporelles": { + "account_type": "Receivable" + }, + "4146-Effets \u00e0 recevoir, immobilisations incorporelles": { + "account_type": "Receivable" + }, + "4147-Effets \u00e0 recevoir, immobilisations corporelles": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "415-Clients, effets escompt\u00e9s non \u00e9chus": { + "account_type": "Receivable" + }, + "416-Cr\u00e9ances clients litigieuses ou douteuses": { + "4161-Cr\u00e9ances litigieuses": { + "account_type": "Receivable" + }, + "4162-Cr\u00e9ances douteuses": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "418-Clients, produits \u00e0 recevoir": { + "4181-Clients, factures \u00e0 \u00e9tablir": { + "account_type": "Receivable" + }, + "4186-Clients, int\u00e9r\u00eats courus": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "42-Personnel (ACTIF)": { + "421-Personnel, avances et acomptes": { + "4211-Personnel, avances": {}, + "4212-Personnel, acomptes": {}, + "4213-Frais avanc\u00e9s et fournitures au personnel": {} + } + }, + "43-Organismes sociaux (ACTIF)": { + "431-S\u00e9curit\u00e9 sociale": { + "4311-Prestations familiales": {}, + "4312-Accidents de travail": {}, + "4313-Caisse de retraite obligatoire": {}, + "4314-Caisse de retraite facultative": {}, + "4318-Autres cotisations sociales": {} + }, + "432-Caisses de retraite compl\u00e9mentaire": {}, + "433-Autres organismes sociaux": { + "4331-Mutuelle": {}, + "4332-Assurances retraite": {}, + "4333-Assurances et organismes de sant\u00e9": {} + }, + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "4387-Produits \u00e0 recevoir": {} + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (ACTIF)": { + "443-\u00c9tat, TVA factur\u00e9e": { + "4431-TVA factur\u00e9e sur ventes": {}, + "4432-TVA factur\u00e9e sur prestations de services": {}, + "4433-TVA factur\u00e9e sur travaux": {}, + "4434-TVA factur\u00e9e sur production livr\u00e9e \u00e0 soi-m\u00eame": {}, + "4435-TVA sur factures \u00e0 \u00e9tablir": {} + }, + "445-\u00c9tat, TVA r\u00e9cup\u00e9rable": { + "4451-TVA r\u00e9cup\u00e9rable sur immobilisations": {}, + "4452-TVA r\u00e9cup\u00e9rable sur achats": {}, + "4453-TVA r\u00e9cup\u00e9rable sur transport": {}, + "4454-TVA r\u00e9cup\u00e9rable sur services ext\u00e9rieurs et autres charges": {}, + "4455-TVA r\u00e9cup\u00e9rable sur factures non parvenues": {}, + "4456-TVA transf\u00e9r\u00e9e par d\u2019autres entit\u00e9s": {} + }, + "448-\u00c9tat, charges \u00e0 payer et produits \u00e0 recevoir": { + "4486-Charges \u00e0 payer": {}, + "4487-Produits \u00e0 recevoir": {} + }, + "449-\u00c9tat, cr\u00e9ances et dettes diverses": { + "4491-\u00c9tat, obligations cautionn\u00e9es": {}, + "4492-\u00c9tat, avances et acomptes vers\u00e9s sur imp\u00f4ts": {}, + "4493-\u00c9tat, fonds de dotation \u00e0 recevoir": {}, + "4494-\u00c9tat, subventions investissement \u00e0 recevoir": {}, + "4495-\u00c9tat, subventions d\u2019exploitation \u00e0 recevoir": {}, + "4496-\u00c9tat, subventions d\u2019\u00e9quilibre \u00e0 recevoir": {}, + "4497-\u00c9tat, avances sur subventions": {}, + "4499-\u00c9tat, fonds r\u00e9glement\u00e9s provisionn\u00e9s": {} + } + }, + "45-Organismes internationaux (ACTIF)": { + "451-Op\u00e9rations avec les organismes africains": {}, + "452-Op\u00e9rations avec les autres organismes internationaux": {}, + "458-Organismes internationaux, fonds de dotation et subventions \u00e0 recevoir": { + "4581-Organismes internationaux, fonds de dotation \u00e0 recevoir": {}, + "4582-Organismes internationaux, subventions \u00e0 recevoir": {} + } + }, + "46-Apporteurs, associ\u00e9s et groupe (ACTIF)": { + "461-Apporteurs, op\u00e9rations sur le capital": { + "4613-Apporteurs, capital appel\u00e9, non vers\u00e9": {}, + "4614-Apporteurs, compte d\u2019apport, op\u00e9rations de restructuration (fusion...)": {}, + "4618-Apporteurs, titres \u00e0 \u00e9changer": {} + }, + "467-Apporteurs, restant d\u00fb sur capital appel\u00e9": {} + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (ACTIF)": { + "472-Cr\u00e9ances et dettes sur titres de placement": { + "4721-Cr\u00e9ances sur cessions de titres de placement": {}, + "4726-Versements restant \u00e0 effectuer sur titres de placement non lib\u00e9r\u00e9s": {} + }, + "473-Interm\u00e9diaires Op\u00e9rations faites pour compte de tiers": { + "4731-Mandants": {}, + "4732-Mandataires": {}, + "4733-Commettants": {}, + "4734-Commissionnaires": {}, + "4739-\u00c9tat, Collectivit\u00e9s publiques, fonds global d\u2019allocation": {} + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits": { + "4747-Compte de r\u00e9partition p\u00e9riodique des produits": {} + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA": { + "4751-Compte actif": { + "account_type": "Temporary" + } + }, + "476-Charges constat\u00e9es d\u2019avance": {}, + "478-\u00c9carts de conversion actif": { + "4781-Diminution des cr\u00e9ances d\u2019exploitation": {}, + "4782-Diminution des cr\u00e9ances financi\u00e8res": {}, + "4783-Augmentation des dettes d\u2019exploitation": {}, + "4784-Augmentation des dettes financi\u00e8res": {}, + "4786-Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": {}, + "4788-Diff\u00e9rences compens\u00e9es par couverture de change": {} + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (ACTIF)": { + "485-Cr\u00e9ances sur cessions d\u2019immobilisations": { + "4851-En compte, immobilisations incorporelles": {}, + "4852-En compte, immobilisations corporelles": {}, + "4853-Effets \u00e0 recevoir, immobilisations incorporelles": {}, + "4854-Effets \u00e0 recevoir, immobilisations corporelles": {}, + "4855-Effets escompt\u00e9s non \u00e9chus": {}, + "4857-Retenues de garantie": {}, + "4858-Factures \u00e0 \u00e9tablir": {} + }, + "488-Autres cr\u00e9ances hors activit\u00e9s ordinaires (HAO)": {} + }, + "49-D\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme (tiers) (ACTIF)": { + "491-D\u00e9pr\u00e9ciations des comptes clients": { + "4911-Cr\u00e9ances litigieuses": {}, + "4912-Cr\u00e9ances douteuses": {} + }, + "495-D\u00e9pr\u00e9ciations des comptes organismes internationaux": {}, + "496-D\u00e9pr\u00e9ciations des comptes apporteurs, associ\u00e9s et groupe": { + "4962-Associ\u00e9s, comptes courants": {}, + "4963-Associ\u00e9s, op\u00e9rations faites en commun": {}, + "4966-Groupe, comptes courants": {} + }, + "497-D\u00e9pr\u00e9ciations des comptes d\u00e9biteurs divers": {}, + "498-D\u00e9pr\u00e9ciations des comptes de cr\u00e9ances HAO": { + "4985-Cr\u00e9ances sur cessions d\u2019immobilisations": {}, + "4986-Cr\u00e9ances sur cessions de titres de placement": {}, + "4988-Autres cr\u00e9ances HAO": {} + }, + "499-Provisions pour risques \u00e0 court terme": { + "4991-Sur op\u00e9rations d\u2019exploitation": {}, + "4997-Sur op\u00e9rations financi\u00e8res": {}, + "4998-Sur op\u00e9rations HAO": {} + } + }, + "root_type": "Asset" + }, + "4-Comptes de Tiers (PASSIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (PASSIF)": { + "401-Fournisseurs, dettes en compte": { + "4011-Fournisseurs": { + "account_type": "Payable" + }, + "4012-Fournisseurs groupe": { + "account_type": "Payable" + }, + "4013-Fournisseurs sous-traitants": { + "account_type": "Payable" + }, + "4016-Fournisseurs, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Payable" + }, + "4017-Fournisseur, retenues de garantie": { + "account_type": "Payable" + }, + "account_type": "Payable" + }, + "402-Fournisseurs, effets \u00e0 payer": { + "4021-Fournisseurs Effets \u00e0 payer": { + "account_type": "Payable" + }, + "4022-Fournisseurs Groupe, effets \u00e0 payer": { + "account_type": "Payable" + }, + "4023-Fournisseurs Sous-traitants, effets \u00e0 payer": { + "account_type": "Payable" + }, + "account_type": "Payable" + }, + "404-Fournisseurs, acquisitions courantes d\u2019immobilisations": { + "4041-Fournisseurs Dettes en comptes, immobilisations incorporelles": { + "account_type": "Payable" + }, + "4042-Fournisseurs Dettes en comptes, immobilisations corporelles": { + "account_type": "Payable" + }, + "4046-Fournisseurs Effets \u00e0 payer, immobilisations incorporelles": { + "account_type": "Payable" + }, + "4047-Fournisseurs Effets \u00e0 payer, immobilisations corporelles": { + "account_type": "Payable" + }, + "account_type": "Payable" + }, + "408-Fournisseurs, factures non parvenues": { + "4081-Fournisseurs": { + "account_type": "Stock Received But Not Billed" + }, + "4082-Fournisseurs groupe": { + "account_type": "Stock Received But Not Billed" + }, + "4083-Fournisseurs sous-traitants": { + "account_type": "Stock Received But Not Billed" + }, + "4086-Fournisseurs, int\u00e9r\u00eats courus": { + "account_type": "Stock Received But Not Billed" + }, + "account_type": "Stock Received But Not Billed" + }, + "account_type": "Payable" + }, + "41-Clients et comptes rattach\u00e9s (PASSIF)": { + "419-Clients cr\u00e9diteurs": { + "4191-Clients, avances et acomptes re\u00e7us": {}, + "4192-Clients groupe, avances et acomptes re\u00e7us": {}, + "4194-Clients, dettes pour emballages et mat\u00e9riels consign\u00e9s": {}, + "4198-Clients, rabais, remises, ristournes et autres avoirs \u00e0 accorder": {} + } + }, + "42-Personnel (PASSIF)": { + "422-Personnel, r\u00e9mun\u00e9rations dues": {}, + "423-Personnel, oppositions, saisies-arr\u00eats": { + "4231-Personnel, oppositions": {}, + "4232-Personnel, saisies-arr\u00eats": {}, + "4233-Personnel, avis \u00e0 tiers d\u00e9tenteur": {} + }, + "424-Personnel, \u0153uvres sociales internes": { + "4241-Assistance m\u00e9dicale": {}, + "4242-Allocations familiales": {}, + "4245-Organismes sociaux rattach\u00e9s \u00e0 l\u2019entit\u00e9": {}, + "4248-Autres \u0153uvres sociales internes": {} + }, + "425-Repr\u00e9sentants du personnel": { + "4251-D\u00e9l\u00e9gu\u00e9s du personnel": {}, + "4252-Syndicats et Comit\u00e9s d\u2019entreprises, d\u2019\u00c9tablissement": {}, + "4258-Autres repr\u00e9sentants du personnel": {} + }, + "426-Personnel, participation aux b\u00e9n\u00e9fices et au capital": { + "4261-Participation aux b\u00e9n\u00e9fices": {}, + "4264-Participation au capital": {} + }, + "427-Personnel d\u00e9p\u00f4ts": {}, + "428-Personnel, charges \u00e0 payer et produits \u00e0 recevoir": { + "4281-Dettes provisionn\u00e9es pour cong\u00e9s \u00e0 payer": {}, + "4286-Autres charges \u00e0 payer": {}, + "4287-Produits \u00e0 recevoir": {} + } + }, + "43-Organismes sociaux (PASSIF)": { + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "4381-Charges sociales sur gratifications \u00e0 payer": {}, + "4382-Charges sociales sur cong\u00e9s \u00e0 payer": {}, + "4386-Autres charges \u00e0 payer": {} + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (PASSIF)": { + "441-\u00c9tat, imp\u00f4t sur les b\u00e9n\u00e9fices": {}, + "442-\u00c9tat, autres imp\u00f4ts et taxes": { + "4421-Imp\u00f4ts et taxes d\u2019\u00c9tat": {}, + "4422-Imp\u00f4ts et taxes pour les collectivit\u00e9s publiques": {}, + "4423-Imp\u00f4ts et taxes recouvrables sur des obligataires": {}, + "4424-Imp\u00f4ts et taxes recouvrables sur des associ\u00e9s": {}, + "4426-Droits de douane": {}, + "4428-Autres imp\u00f4ts et taxes": {} + }, + "444-\u00c9tat, TVA due ou cr\u00e9dit de TVA": { + "4441-\u00c9tat, TVA due": {}, + "4449-\u00c9tat, cr\u00e9dit de TVA \u00e0 reporter": {} + }, + "446-\u00c9tat, autres taxes sur le chiffre d\u2019affaires": {}, + "447-\u00c9tat, imp\u00f4ts retenus \u00e0 la source": { + "4471-Imp\u00f4t G\u00e9n\u00e9ral sur le revenu": {}, + "4472-Imp\u00f4ts sur salaires": {}, + "4473-Contribution nationale": {}, + "4474-Contribution nationale de solidarit\u00e9": {}, + "4478-Autres imp\u00f4ts et contributions": {} + } + }, + "46-Apporteurs, associ\u00e9s et groupe (PASSIF)": { + "461-Apporteurs, op\u00e9rations sur le capital (PASSIF)": { + "4611-Apporteurs, apports en nature": {}, + "4612-Apporteurs, apports en num\u00e9raire": {}, + "4615-Apporteurs, versements re\u00e7us sur augmentation de capital": {}, + "4616-Apporteurs, versements anticip\u00e9s": {}, + "4617-Apporteurs d\u00e9faillants": {}, + "4619-Apporteurs, capital \u00e0 rembourser": {} + }, + "462-Associ\u00e9s, comptes courants": { + "4621-Principal": {}, + "4626-Int\u00e9r\u00eats courus": {} + }, + "463-Associ\u00e9s, op\u00e9rations faites en commun et GIE": { + "4631-Op\u00e9rations courantes": {}, + "4636-Int\u00e9r\u00eats courus": {} + }, + "465-Associ\u00e9s, dividendes \u00e0 payer": {}, + "466-Groupe, comptes courants": {} + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (PASSIF)": { + "471-D\u00e9biteurs et cr\u00e9diteurs divers": { + "4711-D\u00e9biteurs divers": {}, + "4712-Cr\u00e9diteurs divers": {}, + "4713-Obligataires": {}, + "4715-R\u00e9mun\u00e9rations d\u2019administrateurs": {}, + "4716-Compte d\u2019affacturage": {}, + "4717-D\u00e9biteurs divers retenues de garantie": {}, + "4718-Apport, compte de fusion et op\u00e9rations assimil\u00e9es": {}, + "4719-Bons de souscription d\u2019actions et d\u2019obligations": {} + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits (PASSIF)": { + "4746-Compte de r\u00e9partition p\u00e9riodique des charges": {} + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA (PASSIF)": { + "4752-Compte passif": {} + }, + "477-Produits constat\u00e9s d\u2019avance": {}, + "479-\u00c9carts de conversion passif": { + "4791-Augmentation des cr\u00e9ances d\u2019exploitation": {}, + "4792-Augmentation des cr\u00e9ances financi\u00e8res": {}, + "4793-Diminution des dettes d\u2019exploitation": {}, + "4794-Diminution des dettes financi\u00e8res": {}, + "4797-Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": {}, + "4798-Diff\u00e9rences compens\u00e9es par couverture de change": {} + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (HAO) (PASSIF)": { + "481-Fournisseurs d\u2019investissements": { + "4811-Immobilisations incorporelles": {}, + "4812-Immobilisations corporelles": {}, + "4813-Versements restant \u00e0 effectuer sur titres de participation et titres immobilis\u00e9s non lib\u00e9r\u00e9s": {}, + "4816-R\u00e9serve de propri\u00e9t\u00e9": {}, + "4817-Retenues de garantie": {}, + "4818-Factures non parvenues": {} + }, + "482-Fournisseurs d\u2019investissements, effets \u00e0 payer": { + "4821-Immobilisations incorporelles": {}, + "4822-Immobilisations corporelles": {} + }, + "484-Autres dettes hors activit\u00e9s ordinaires (HAO)": { + "4887-Produits": {} + } + }, + "49-D\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme (tiers) (PASSIF)": { + "490-D\u00e9pr\u00e9ciations des comptes fournisseurs": {}, + "492-D\u00e9pr\u00e9ciations des comptes personnel": {}, + "493-D\u00e9pr\u00e9ciations des comptes organismes sociaux": {}, + "494-D\u00e9pr\u00e9ciations des comptes \u00c9tat et collectivit\u00e9s publiques": {}, + "495-D\u00e9pr\u00e9ciations des comptes organismes internationaux": {} + }, + "root_type": "Liability" + }, + "5-Comptes de tr\u00e9sorerie": { + "50-Titres de placement": { + "501-Titres du tr\u00e9sor et bons de caisse \u00e0 court terme": { + "5011-Titres du Tr\u00e9sor \u00e0 court terme": {}, + "5012-Titres d\u2019organismes financiers": {}, + "5013-Bons de caisse \u00e0 court terme": {}, + "5016-Frais d\u2019acquisition des titres de tr\u00e9sor et bons de caisse": {} + }, + "502-Actions": { + "5021-Actions ou parts propres": {}, + "5022-Actions cot\u00e9es": {}, + "5023-Actions non cot\u00e9es": {}, + "5024-Actions d\u00e9membr\u00e9es (certificats d\u2019investissement, droits de vote)": {}, + "5025-Autres actions": {}, + "5026-Frais d\u2019acquisition des actions": {} + }, + "503-Obligations": { + "5031-Obligations \u00e9mises par la soci\u00e9t\u00e9 et rachet\u00e9es par elle": {}, + "5032-Obligations cot\u00e9es": {}, + "5033-Obligations non cot\u00e9es": {}, + "5035-Autres obligations": {}, + "5036-Frais d\u2019acquisition des obligations": {} + }, + "504-Bons de souscription": { + "5042-Bons de souscription d\u2019actions": {}, + "5043-Bons de souscription d\u2019obligations": {} + }, + "505-Titres n\u00e9gociables hors r\u00e9gion": {}, + "506-Int\u00e9r\u00eats courus": { + "5061-Titres du Tr\u00e9sor et bons de caisse \u00e0 court terme": {}, + "5062-Actions": {}, + "5063-Obligations": {} + }, + "508-Autres titres de placement et cr\u00e9ances assimil\u00e9es": {} + }, + "51-Valeurs \u00e0 encaisser": { + "511-Effets \u00e0 encaisser": {}, + "512-Effets \u00e0 l\u2019encaissement": {}, + "513-Ch\u00e8ques \u00e0 encaisser": {}, + "514-Ch\u00e8ques \u00e0 l\u2019encaissement": {}, + "515-Cartes de cr\u00e9dit \u00e0 encaisser": {}, + "518-Autres valeurs \u00e0 l\u2019encaissement": { + "5181-Warrants": {}, + "5182-Billets de fonds": {}, + "5185-Ch\u00e8ques de voyage": {}, + "5186-Coupons \u00e9chus": {}, + "5187-Int\u00e9r\u00eats \u00e9chus des obligations": {} + } + }, + "52-Banques": { + "521-Banques locales": { + "5211-Banques en monnaie nationale": { + "account_type": "Bank" + }, + "5215-Banques en devises": { + "account_type": "Bank" + }, + "account_type": "Bank" + }, + "522-Banques autres \u00c9tats r\u00e9gion": {}, + "523-Banques autres \u00c9tats zone mon\u00e9taire": {}, + "524-Banques hors zone mon\u00e9taire": {}, + "525-Banques d\u00e9p\u00f4t \u00e0 terme": {}, + "526-Banques, int\u00e9r\u00eats courus": { + "5261-Banque, int\u00e9r\u00eats courus, charges \u00e0 payer": {}, + "5267-Banque, int\u00e9r\u00eats courus, produits \u00e0 recevoir": {} + } + }, + "53-\u00c9tablissements financiers et assimil\u00e9s": { + "531-Ch\u00e8ques postaux": {}, + "532-Tr\u00e9sor": {}, + "533-Soci\u00e9t\u00e9s de gestion et d\u2019interm\u00e9diation (SGI)": {}, + "536-\u00c9tablissements financiers, int\u00e9r\u00eats courus": {}, + "538-Autres organismes financiers": {} + }, + "54-Instruments de tr\u00e9sorerie": { + "541-Options de taux d\u2019int\u00e9r\u00eat": {}, + "542-Options de taux de change": {}, + "543-Options de taux boursiers": {}, + "544-Instruments de march\u00e9s \u00e0 terme": {}, + "545-Avoirs d\u2019or et autres m\u00e9taux pr\u00e9cieux": {} + }, + "55-Instruments de monnaie \u00e9lectronique": { + "551-Monnaie \u00e9lectronique carte carburant": {}, + "552-Monnaie \u00e9lectronique t\u00e9l\u00e9phone portable": {}, + "553-Monnaie \u00e9lectronique carte p\u00e9age": {}, + "554-Porte-monnaie \u00e9lectronique": {}, + "558-Autres instruments de monnaies \u00e9lectroniques": {} + }, + "56-Banques, cr\u00e9dits de tr\u00e9sorerie et d\u2019escompte": { + "561-Cr\u00e9dits de tr\u00e9sorerie": {}, + "564-Escompte de cr\u00e9dits de campagne": {}, + "565-Escompte de cr\u00e9dits ordinaires": {}, + "566-Banques, cr\u00e9dits de tr\u00e9sorerie, int\u00e9r\u00eats courus": {} + }, + "57-Caisse": { + "571-Caisse si\u00e8ge social": { + "5711-Caisse en monnaie nationale": {}, + "5712-Caisse en devises": {} + }, + "572-Caisse succursale A": { + "5721-En monnaie nationale": {}, + "5722-En devises": {} + }, + "573-Caisse succursale B": { + "5731-En monnaie nationale": {}, + "5732-En devises": {} + } + }, + "58-R\u00e9gies d\u2019avances, accr\u00e9ditifs et virements internes": { + "581-R\u00e9gies d\u2019avance": {}, + "582-Accr\u00e9ditifs": {}, + "585-Virements de fonds": {}, + "588-Autres virements internes": {} + }, + "59-D\u00e9pr\u00e9ciations et provisions pour risque \u00e0 court terme": { + "590-D\u00e9pr\u00e9ciations des titres de placement": {}, + "591-D\u00e9pr\u00e9ciations des titres et valeurs \u00e0 encaisser": {}, + "592-D\u00e9pr\u00e9ciations des comptes banques": {}, + "593-D\u00e9pr\u00e9ciations des comptes \u00e9tablissements financiers et assimil\u00e9s": {}, + "594-D\u00e9pr\u00e9ciations des comptes d\u2019instruments de tr\u00e9sorerie": {}, + "599-Provisions pour risque \u00e0 court terme \u00e0 caract\u00e8re financier": {} + }, + "root_type": "Asset" + }, + "6-Comptes de charges des activit\u00e9s ordinaires": { + "60-Achats et variations de stocks": { + "601-Achats de marchandises": { + "6011-Dans la R\u00e9gion": {}, + "6012-Hors R\u00e9gion": {}, + "6013-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "6014-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "6015-Frais sur achats": {}, + "6019-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "602-Achats de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "6021-Dans la R\u00e9gion": {}, + "6022-Hors R\u00e9gion": {}, + "6023-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "6024-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "6025-Frais sur achats": {}, + "6029-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "603-Variations des stocks de biens achet\u00e9s": { + "6031-Variations des stocks de marchandises": {}, + "6032-Variations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": {}, + "6033-Variations des stocks d\u2019autres approvisionnements": {} + }, + "604-Achats stock\u00e9s de mati\u00e8res et fournitures consommables": { + "6041-Mati\u00e8res consommables": {}, + "6042-Mati\u00e8res combustibles": {}, + "6043-Produits d\u2019entretien": {}, + "6044-Fournitures d\u2019atelier et d\u2019usine": {}, + "6045-Frais sur achat": {}, + "6046-Fournitures de magasin": {}, + "6047-Fournitures de bureau": {}, + "6049-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "605-Autres achats": { + "6051-Fournitures non stockables Eau": {}, + "6052-Fournitures non stockables \u00c9lectricit\u00e9": {}, + "6053-Fournitures non stockables Autres \u00e9nergies": {}, + "6054-Fournitures d\u2019entretien non stockables": {}, + "6055-Fournitures de bureau non stockables": {}, + "6056-Achats de petit mat\u00e9riel et outillage": {}, + "6057-Achats d\u2019\u00e9tudes et prestations de services": {}, + "6058-Achats de travaux, mat\u00e9riels et \u00e9quipements": {}, + "6059-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "608-Achats d\u2019emballages": { + "6081-Emballages perdus": {}, + "6082-Emballages r\u00e9cup\u00e9rables non identifiables": {}, + "6083-Emballages \u00e0 usage mixte": {}, + "6085-Frais sur achats": {}, + "6089-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + } + }, + "61-Transports": { + "612-Transports sur ventes": {}, + "613-Transports pour le compte de tiers": {}, + "614-Transports du personnel": {}, + "616-Transports de plis": {}, + "618-Autres frais de transport": { + "6181-Voyages et d\u00e9placements": {}, + "6182-Transports entre \u00e9tablissements ou chantiers": {}, + "6183-Transports administratifs": {} + } + }, + "62-Services ext\u00e9rieurs": { + "621-Sous-traitance g\u00e9n\u00e9rale": {}, + "622-Locations, charges locatives": { + "6221-Locations de terrains": {}, + "6222-Locations de b\u00e2timents": {}, + "6223-Locations de mat\u00e9riels et outillages": {}, + "6224-Malis sur emballages": {}, + "6225-Locations d\u2019emballages": {}, + "6226-Fermages et loyers du foncier": {}, + "6228-Locations et charges locatives diverses": {} + }, + "623-Redevances de location acquisition": { + "6232-Cr\u00e9dit-bail immobilier": {}, + "6233-Cr\u00e9dit-bail mobilier": {}, + "6234-Location-vente": {}, + "6238-Autres contrats de location acquisition": {} + }, + "624-Entretien, r\u00e9parations, remise en \u00e9tat et maintenance": { + "6241-Entretien et r\u00e9parations des biens immobiliers": {}, + "6242-Entretien et r\u00e9parations des biens mobiliers": {}, + "6243-Maintenance": {}, + "6244-Charges de d\u00e9mant\u00e8lement et remise en \u00e9tat": {}, + "6248-Autres entretiens et r\u00e9parations": {} + }, + "625-Primes d\u2019assurance": { + "6251-Assurances multirisques": {}, + "6252-Assurances mat\u00e9riel de transport": {}, + "6253-Assurances risques d\u2019exploitation": {}, + "6254-Assurances responsabilit\u00e9 du producteur": {}, + "6255-Assurances insolvabilit\u00e9 clients": {}, + "6257-Assurances transport sur ventes": {}, + "6258-Autres primes d\u2019assurances": {} + }, + "626-\u00c9tudes, recherches et documentation": { + "6261-\u00c9tudes et recherches": {}, + "6265-Documentation g\u00e9n\u00e9rale": {}, + "6266-Documentation technique": {} + }, + "627-Publicit\u00e9, publications, relations publiques": { + "6271-Annonces, insertions": {}, + "6272-Catalogues, imprim\u00e9s publicitaires": {}, + "6273-\u00c9chantillons": {}, + "6274-Foires et expositions": {}, + "6275-Publications": {}, + "6276-Cadeaux \u00e0 la client\u00e8le": {}, + "6277-Frais de colloques, s\u00e9minaires, conf\u00e9rences": {}, + "6278-Autres charges de publicit\u00e9 et relations publiques": {} + }, + "628-Frais de t\u00e9l\u00e9communications": { + "6281-Frais de t\u00e9l\u00e9phone": {}, + "6282-Frais de t\u00e9lex": {}, + "6283-Frais de t\u00e9l\u00e9copie": {}, + "6288-Autres frais de t\u00e9l\u00e9communications": {} + } + }, + "63-Autres services ext\u00e9rieurs": { + "631-Frais bancaires": { + "6311-Frais sur titres (vente, garde)": {}, + "6312-Frais sur effets": {}, + "6313-Location de coffres": {}, + "6314-Commissions d\u2019affacturage": {}, + "6315-Commissions sur cartes de cr\u00e9dit": {}, + "6316-Frais d\u2019\u00e9mission d\u2019emprunts": {}, + "6317-Frais sur instruments monnaie \u00e9lectronique": {}, + "6318-Autres frais bancaires": {} + }, + "632-R\u00e9mun\u00e9rations d\u2019interm\u00e9diaires et de conseils": { + "6322-Commissions et courtages sur ventes": {}, + "6324-Honoraires des professions r\u00e9glement\u00e9es": {}, + "6325-Frais d\u2019actes et de contentieux": {}, + "6326-R\u00e9mun\u00e9rations d\u2019affacturage": {}, + "6327-R\u00e9mun\u00e9rations des autres prestataires de services": {}, + "6328-Divers frais": {} + }, + "633-Frais de formation du personnel": {}, + "634-Redevances pour brevets, licences, logiciels, concessions et droits et valeurs similaires": { + "6342-Redevances pour brevets, licences": {}, + "6343-Redevances pour logiciels": {}, + "6344-Redevances pour marques": {}, + "6345-Redevances pour sites internet": {}, + "6346-Redevances pour concessions, droits et valeurs similaires": {} + }, + "635-Cotisations": { + "6351-Cotisations": {}, + "6358-Concours divers": {} + }, + "637-R\u00e9mun\u00e9rations de personnel ext\u00e9rieur \u00e0 l\u2019entit\u00e9": { + "6371-Personnel int\u00e9rimaire": {}, + "6372-Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": {} + }, + "638-Autres charges externes": { + "6381-Frais de recrutement du personnel": {}, + "6382-Frais de d\u00e9m\u00e9nagement": {}, + "6383-R\u00e9ceptions": {}, + "6384-Missions": {}, + "6385-Charges de copropri\u00e9t\u00e9": {} + } + }, + "64-Imp\u00f4ts et taxes": { + "641-Imp\u00f4ts et taxes directs": { + "6411-Imp\u00f4ts fonciers et taxes annexes": {}, + "6412-Patentes, licences et taxes annexes": {}, + "6413-Taxes sur appointements et salaires": {}, + "6414-Taxes d\u2019apprentissage": {}, + "6415-Formation professionnelle continue": {}, + "6418-Autres imp\u00f4ts et taxes directs": {} + }, + "645-Imp\u00f4ts et taxes indirects": {}, + "646-Droits d\u2019enregistrement": { + "6461-Droits de mutation": {}, + "6462-Droits de timbre": {}, + "6463-Taxes sur les v\u00e9hicules de soci\u00e9t\u00e9": {}, + "6464-Vignettes": {}, + "6468-Autres droits": {} + }, + "647-P\u00e9nalit\u00e9s, amendes fiscales": { + "6471-P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts directs": {}, + "6472-P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts indirects": {}, + "6473-P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts directs": {}, + "6474-P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts indirects": {}, + "6478-Autres p\u00e9nalit\u00e9s et amendes fiscales": {} + }, + "648-Autres imp\u00f4ts et taxes": {} + }, + "65-Autres charges": { + "651-Pertes sur cr\u00e9ances clients et autres d\u00e9biteurs": { + "6511-Clients": {}, + "6515-Autres d\u00e9biteurs": {} + }, + "652-Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "6521-Quote-part transf\u00e9r\u00e9e de b\u00e9n\u00e9fices (comptabilit\u00e9 du g\u00e9rant)": {}, + "6525-Pertes imput\u00e9es par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": {} + }, + "654-Valeurs comptables des cessions courantes d\u2019immobilisations": { + "6541-Immobilisations incorporelles": {}, + "6542-Immobilisations corporelles": {} + }, + "656-Perte de change sur cr\u00e9ances et dettes commerciale": {}, + "657-P\u00e9nalit\u00e9s et amendes p\u00e9nales": {}, + "658-Charges diverses": { + "6581-Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": {}, + "6582-Dons": {}, + "6583-M\u00e9c\u00e9nat": {}, + "6588-Autres charges diverses": {} + }, + "659-Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "6591-Sur risques \u00e0 court terme": {}, + "6593-Sur stocks": {}, + "6594-Sur cr\u00e9ances": {}, + "6598-Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme": {} + } + }, + "66-Charges de personnel": { + "661-R\u00e9mun\u00e9rations directes vers\u00e9es au personnel national": { + "6611-Appointements salaires et commissions": {}, + "6612-Primes et gratifications": {}, + "6613-Cong\u00e9s pay\u00e9s": {}, + "6614-Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": {}, + "6615-Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": {}, + "6616-Suppl\u00e9ment familial": {}, + "6617-Avantages en nature": {}, + "6618-Autres r\u00e9mun\u00e9rations directes": {} + }, + "662-R\u00e9mun\u00e9rations directes vers\u00e9es au personnel non national": { + "6621-Appointements salaires et commissions": {}, + "6622-Primes et gratifications": {}, + "6623-Cong\u00e9s pay\u00e9s": {}, + "6624-Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": {}, + "6625-Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": {}, + "6626-Suppl\u00e9ment familial": {}, + "6627-Avantages en nature": {}, + "6628-Autres r\u00e9mun\u00e9rations directes": {} + }, + "663-Indemnit\u00e9s forfaitaires vers\u00e9es au personnel": { + "6631-Indemnit\u00e9s de logement": {}, + "6632-Indemnit\u00e9s de repr\u00e9sentation": {}, + "6633-Indemnit\u00e9s d\u2019expatriation": {}, + "6634-Indemnit\u00e9s de transport": {}, + "6638-Autres indemnit\u00e9s et avantages divers": {} + }, + "664-Charges sociales": { + "6641-Charges sociales sur r\u00e9mun\u00e9ration du personnel national": {}, + "6642-Charges sociales sur r\u00e9mun\u00e9ration du personnel non national": {} + }, + "666-R\u00e9mun\u00e9rations et charges sociales de l\u2019exploitant individuel": { + "6661-R\u00e9mun\u00e9ration du travail de l\u2019exploitant": {}, + "6662-Charges sociales": {} + }, + "667-R\u00e9mun\u00e9ration transf\u00e9r\u00e9e de personnel ext\u00e9rieur": { + "6671-Personnel int\u00e9rimaire": {}, + "6672-Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": {} + }, + "668-Autres charges sociales": { + "6681-Versements aux syndicats et comit\u00e9s d\u2019entreprise, d\u2019\u00e9tablissement": {}, + "6682-Versements aux comit\u00e9s d\u2019hygi\u00e8ne et de s\u00e9curit\u00e9": {}, + "6683-Versements et contributions aux autres \u0153uvres sociales": {}, + "6684-M\u00e9decine du travail et pharmacie": {}, + "6685-Assurances et organismes de sant\u00e9": {}, + "6686-Assurances retraite et fonds de pension": {}, + "6687-Majorations et p\u00e9nalit\u00e9s sociales": {}, + "6688-Charges sociales diverses": {} + } + }, + "67-Frais financiers et charges assimil\u00e9es": { + "671-Int\u00e9r\u00eats des emprunts": { + "6711-Emprunts obligataires": {}, + "6712-Emprunts aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": {}, + "6713-Dettes li\u00e9es \u00e0 des participations": {}, + "6714-Primes de remboursement des obligations": {} + }, + "672-Int\u00e9r\u00eats dans loyers de location acquisition": { + "6722-Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail immobilier": {}, + "6723-Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail mobilier": {}, + "6724-Int\u00e9r\u00eats dans loyers de location acquisition / location-vente": {}, + "6728-Int\u00e9r\u00eats dans loyers des autres locations acquisition": {} + }, + "673-Escomptes accord\u00e9s": {}, + "674-Autres int\u00e9r\u00eats": { + "6741-Avances re\u00e7ues et d\u00e9p\u00f4ts cr\u00e9diteurs": {}, + "6742-Comptes courants bloqu\u00e9s": {}, + "6743-Int\u00e9r\u00eats sur obligations cautionn\u00e9es": {}, + "6744-Int\u00e9r\u00eats sur dettes commerciales": {}, + "6745-Int\u00e9r\u00eats bancaires et sur op\u00e9rations de financement (escompte...)": {}, + "6748-Int\u00e9r\u00eats sur dettes diverses": {} + }, + "675-Escomptes des effets de commerce": {}, + "676-Pertes de change financi\u00e8res": {}, + "677-Pertes sur titres de placement": { + "6771-Pertes sur cessions de titres de placement": {}, + "6772-Mali provenant d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": {} + }, + "678-Pertes et charges sur risques financiers": { + "6781-Sur rentes viag\u00e8res": {}, + "6782-Sur op\u00e9rations financi\u00e8res": {}, + "6784-Sur instruments de tr\u00e9sorerie": {} + }, + "679-Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "6791-Sur risques financiers": {}, + "6795-Sur titres de placement": {}, + "6798-Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": {} + } + }, + "68-Dotations aux amortissements": { + "681-Dotations aux amortissements d\u2019exploitation": { + "6812-Dotations aux amortissements des immobilisations incorporelles": {}, + "6813-Dotations aux amortissements des immobilisations corporelles": {} + } + }, + "69-Dotations aux provisions et aux d\u00e9pr\u00e9ciations": { + "691-Dotations aux provisions et aux d\u00e9pr\u00e9ciations d\u2019exploitation": { + "6911-Dotations aux provisions pour risques et charges": {}, + "6913-Dotations aux d\u00e9pr\u00e9ciations des immobilisations incorporelles": {}, + "6914-Dotations aux d\u00e9pr\u00e9ciations des immobilisations corporelles": {} + }, + "697-Dotations aux provisions et aux d\u00e9pr\u00e9ciations financi\u00e8res": { + "6971-Dotations aux provisions pour risques et charges": {}, + "6972-Dotations aux d\u00e9pr\u00e9ciations des immobilisations financi\u00e8res": {} + } + }, + "root_type": "Expense" + }, + "7-Comptes de produits des activit\u00e9s ordinaires": { + "70-Ventes": { + "701-Ventes de marchandises": { + "7011-Dans la R\u00e9gion": {}, + "7012-Hors R\u00e9gion": {}, + "7013-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7014-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7015-Sur internet": {}, + "7019-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "702-Ventes de produits finis": { + "7021-Dans la R\u00e9gion": {}, + "7022-Hors R\u00e9gion": {}, + "7023-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7024-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7025-Sur internet": {}, + "7029-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "703-Ventes de produits interm\u00e9diaires": { + "7031-Dans la R\u00e9gion": {}, + "7032-Hors R\u00e9gion": {}, + "7033-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7034-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7035-Sur internet": {}, + "7039-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "704-Ventes de produits r\u00e9siduels": { + "7041-Dans la R\u00e9gion": {}, + "7042-Hors R\u00e9gion": {}, + "7043-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7044-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7045-Sur internet": {}, + "7049-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "705-Travaux factur\u00e9s": { + "7051-Dans la R\u00e9gion": {}, + "7052-Hors R\u00e9gion": {}, + "7053-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7054-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7055-Sur internet": {}, + "7059-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "706-Services vendus": { + "7061-Dans la R\u00e9gion": {}, + "7062-Hors R\u00e9gion": {}, + "7063-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7064-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7065-Sur internet": {}, + "7069-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "707-Produits accessoires": { + "7071-Ports, emballages perdus et autres frais factur\u00e9s": {}, + "7072-Commissions et courtages": {}, + "7073-Locations": {}, + "7074-Bonis sur reprises et cessions d\u2019emballages": {}, + "7075-Mise \u00e0 disposition de personnel": {}, + "7076-Redevances pour brevets, logiciels, marques et droits similaires": {}, + "7077-Services exploit\u00e9s dans l\u2019int\u00e9r\u00eat du personnel": {}, + "7078-Autres produits accessoires": {} + } + }, + "71-Subventions d\u2019exploitation": { + "711-Sur produits \u00e0 l\u2019exportation": {}, + "712-Sur produits \u00e0 l\u2019importation": {}, + "713-Sur produits de p\u00e9r\u00e9quation": {}, + "714-Indemnit\u00e9s et subventions d\u2019exploitation (entit\u00e9 agricole)": {}, + "718-Autres subventions d\u2019exploitation": { + "7181-Vers\u00e9es par l\u2019\u00c9tat et les collectivit\u00e9s publiques": {}, + "7182-Vers\u00e9es par les organismes internationaux": {}, + "7183-Vers\u00e9es par des tiers": {} + } + }, + "72-Production immobilis\u00e9e": { + "721-Immobilisations incorporelles": {}, + "722-Immobilisations corporelles": { + "7221-Immobilisations corporelles (hors actifs biologiques)": {}, + "7222-Immobilisations corporelles (actifs biologiques)": {} + }, + "724-Production auto-consomm\u00e9e": {}, + "726-Immobilisations financi\u00e8res": {} + }, + "73-Variations des stocks de biens et de services produits": { + "734-Variations des stocks de produits en cours": { + "7341-Produits en cours": {}, + "7342-Travaux en cours": {} + }, + "735-Variations des en-cours de services": { + "7351-\u00c9tudes en cours": {}, + "7352-Prestations de services en cours": {} + }, + "736-Variations des stocks de produits finis": {}, + "737-Variations des stocks de produits interm\u00e9diaires et r\u00e9siduels": { + "7371-Produits interm\u00e9diaires": {}, + "7372-Produits r\u00e9siduels": {} + } + }, + "75-Autres produits": { + "751-Profits sur cr\u00e9ances clients et autres d\u00e9biteurs": {}, + "752-Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "7521-Quote-part transf\u00e9r\u00e9e de pertes (comptabilit\u00e9 du g\u00e9rant)": {}, + "7525-B\u00e9n\u00e9fices attribu\u00e9s par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": {} + }, + "754-Produits des cessions courantes d\u2019immobilisations": { + "7541-Immobilisations incorporelles": {}, + "7542-Immobilisations corporelles": {} + }, + "756-Gains de change sur cr\u00e9ances et dettes commerciales": {}, + "758-Produits divers": { + "7581-Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": {}, + "7582-Indemnit\u00e9s d\u2019assurances re\u00e7ues": {}, + "7588-Autres produits divers": {} + }, + "759-Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "7591-Sur risques \u00e0 court terme": {}, + "7593-Sur stocks": {}, + "7594-Sur cr\u00e9ances": {}, + "7598-Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": {} + } + }, + "77-Revenus financiers et produits assimil\u00e9s": { + "771-Int\u00e9r\u00eats de pr\u00eats et cr\u00e9ances diverses": { + "7712-Int\u00e9r\u00eats de pr\u00eats": {}, + "7713-Int\u00e9r\u00eats sur cr\u00e9ances diverses": {} + }, + "772-Revenus de participations et autres titres immobilis\u00e9s": { + "7721-Revenus des titres de participation": {}, + "7722-Revenus autres titres immobilis\u00e9s": {} + }, + "773-Escomptes obtenus": {}, + "774-Revenus de placement": { + "7745-Revenus des obligations": {}, + "7746-Revenus des titres de placement": {} + }, + "775-Int\u00e9r\u00eats dans loyers de location acquisition": {}, + "776-Gains de change financiers": {}, + "777-Gains sur cessions de titres de placement": {}, + "778-Gains sur risques financiers": { + "7781-Sur rentes viag\u00e8res": {}, + "7782-Sur op\u00e9rations financi\u00e8res": {}, + "7784-Sur instruments de tr\u00e9sorerie": {} + }, + "779-Reprises de charges pour d\u00e9pr\u00e9ciations et provisions \u00e0 court terme financi\u00e8res": { + "7791-Sur risques financiers": {}, + "7795-Sur titres de placement": {}, + "7798-Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": {} + } + }, + "78-Transferts de charges": { + "781-Transferts de charges d\u2019exploitation": {}, + "787-Transferts de charges financi\u00e8res": {} + }, + "79-Reprises de provisions, de d\u00e9pr\u00e9ciations et autres": { + "791-Reprises de provisions et d\u00e9pr\u00e9ciations d\u2019exploitation": { + "7911-Pour risques et charges": {}, + "7913-Des immobilisations incorporelles": {}, + "7914-Des immobilisations corporelles": {} + }, + "797-Reprises de provisions et d\u00e9pr\u00e9ciations financi\u00e8res": { + "7971-Pour risques et charges": {}, + "7972-Des immobilisations financi\u00e8res": {} + }, + "798-Reprises d\u2019amortissements": {}, + "799-Reprises de subventions d\u2019investissement": {} + }, + "root_type": "Income" + }, + "8-Comptes des autres charges et des autres produits (CHARGES)": { + "81-Valeurs comptables des cessions d\u2019immobilisations": { + "811-Immobilisations incorporelles": {}, + "812-Immobilisations corporelles": {}, + "816-Immobilisations financi\u00e8res": {} + }, + "83-Charges hors activit\u00e9s ordinaires": { + "831-Charges HAO constat\u00e9es": {}, + "833-Charges li\u00e9es aux op\u00e9rations de restructuration": {}, + "834-Pertes sur cr\u00e9ances HAO": {}, + "835-Dons et lib\u00e9ralit\u00e9s accord\u00e9s": {}, + "836-Abandons de cr\u00e9ances consentis": {}, + "837-Charges li\u00e9es aux op\u00e9rations de liquidation": {}, + "839-Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": {} + }, + "85-Dotations hors activit\u00e9s ordinaires": { + "851-Dotations aux provisions r\u00e9glement\u00e9es": {}, + "852-Dotations aux amortissements HAO": {}, + "853-Dotations aux d\u00e9pr\u00e9ciations HAO": {}, + "854-Dotations aux provisions pour risques et charges HAO": {}, + "858-Autres dotations HAO": {} + }, + "87-Participation des travailleurs": { + "871-Participation l\u00e9gale aux b\u00e9n\u00e9fices": {}, + "874-Participation contractuelle aux b\u00e9n\u00e9fices": {}, + "878-Autres participations": {} + }, + "89-Imp\u00f4ts sur le r\u00e9sultat": { + "891-Imp\u00f4ts sur les b\u00e9n\u00e9fices de l\u2019exercice": { + "8911-Activit\u00e9s exerc\u00e9es dans l\u2019\u00c9tat": {}, + "8912-Activit\u00e9s exerc\u00e9es dans les autres \u00c9tats de la R\u00e9gion": {}, + "8913-Activit\u00e9s exerc\u00e9es hors R\u00e9gion": {} + }, + "892-Rappel d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": {}, + "895-Imp\u00f4t minimum forfaitaire IMF": {}, + "899-D\u00e9gr\u00e8vements et annulations d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": { + "8991-D\u00e9gr\u00e8vements": {}, + "8994-Annulations pour pertes r\u00e9troactives": {} + } + }, + "root_type": "Expense" + }, + "8-Comptes des autres charges et des autres produits (PRODUITS)": { + "82-Produits des cessions d\u2019immobilisations": { + "821-Immobilisations incorporelles": {}, + "822-Immobilisations corporelles": {}, + "826-Immobilisations financi\u00e8res": {} + }, + "84-Produits hors activit\u00e9s ordinaires": { + "841-Produits HAO constat\u00e9s": {}, + "843-Produits li\u00e9s aux op\u00e9rations de restructuration": {}, + "844-Indemnit\u00e9s et subventions HAO (entit\u00e9 agricole)": {}, + "845-Dons et lib\u00e9ralit\u00e9s obtenus": {}, + "846-Abandons de cr\u00e9ances obtenus": {}, + "847-Produits li\u00e9s aux op\u00e9rations de liquidation": {}, + "848-Transferts de charges HAO": {}, + "849-Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": {} + }, + "86-Reprises de charges, provisions et d\u00e9pr\u00e9ciations HAO": { + "861-Reprises de provisions r\u00e9glement\u00e9es": {}, + "862-Reprises d\u2019amortissements HAO": {}, + "863-Reprises de d\u00e9pr\u00e9ciations HAO": {}, + "864-Reprises de provisions pour risques et charges HAO": {}, + "868-Autres reprises HAO": {} + }, + "88-Subventions d\u2019\u00e9quilibre": { + "881-\u00c9tat": {}, + "884-Collectivit\u00e9s publiques": {}, + "886-Groupe": {}, + "888-Autres": {} + }, + "root_type": "Income" + } + } +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/cf_plan_comptable_avec_code.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/cf_plan_comptable_avec_code.json new file mode 100644 index 00000000000..5913ed65476 --- /dev/null +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/cf_plan_comptable_avec_code.json @@ -0,0 +1,4208 @@ +{ + "country_code": "cf", + "name": "Syscohada - Plan Comptable avec code", + "tree": { + "Comptes de ressources durables": { + "Capital": { + "Capital social": { + "Capital souscrit, non appel\u00e9": { + "account_number": "1011" + }, + "Capital souscrit, appel\u00e9, non vers\u00e9": { + "account_number": "1012" + }, + "Capital souscrit, appel\u00e9, vers\u00e9, non amorti": { + "account_number": "1013" + }, + "Capital souscrit, appel\u00e9, vers\u00e9, amorti": { + "account_number": "1014" + }, + "Capital souscrit soumis \u00e0 des conditions particuli\u00e8res": { + "account_number": "1018" + }, + "account_number": "101" + }, + "Capital par dotation": { + "Dotation initiale": { + "account_number": "1021" + }, + "Dotations compl\u00e9mentaires": { + "account_number": "1022" + }, + "Autres dotations": { + "account_number": "1028" + }, + "account_number": "102" + }, + "Capital personnel": { + "account_number": "103" + }, + "Compte de l\u2019exploitant": { + "Apports temporaires": { + "account_number": "1041" + }, + "Op\u00e9rations courantes": { + "account_number": "1042" + }, + "R\u00e9mun\u00e9rations, imp\u00f4ts et autres charges personnelles": { + "account_number": "1043" + }, + "Pr\u00e9l\u00e8vements d\u2019autoconsommation": { + "account_number": "1047" + }, + "Autres pr\u00e9l\u00e8vements": { + "account_number": "1048" + }, + "account_number": "104" + }, + "Primes li\u00e9es au capital social": { + "Primes d\u2019\u00e9mission": { + "account_number": "1051" + }, + "Primes d\u2019apport": { + "account_number": "1052" + }, + "Primes de fusion": { + "account_number": "1053" + }, + "Primes de conversion": { + "account_number": "1054" + }, + "Autres primes": { + "account_number": "1058" + }, + "account_number": "105" + }, + "\u00c9carts de r\u00e9\u00e9valuation": { + "\u00c9carts de r\u00e9\u00e9valuation l\u00e9gale": { + "account_number": "1061" + }, + "\u00c9carts de r\u00e9\u00e9valuation libre": { + "account_number": "1062" + }, + "account_number": "106" + }, + "Apporteurs, capital souscrit, non appel\u00e9": { + "account_number": "109" + }, + "account_number": "10" + }, + "R\u00e9serves": { + "R\u00e9serve l\u00e9gale": { + "account_number": "111" + }, + "R\u00e9serves statutaires ou contractuelles": { + "account_number": "112" + }, + "R\u00e9serves r\u00e9glement\u00e9es": { + "R\u00e9serves de plus-values nettes \u00e0 long terme": { + "account_number": "1131" + }, + "R\u00e9serves d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": { + "account_number": "1132" + }, + "R\u00e9serves cons\u00e9cutives \u00e0 l\u2019octroi de subventions d\u2019investissement": { + "account_number": "1133" + }, + "R\u00e9serves des valeurs mobili\u00e8res donnant acc\u00e8s au capital": { + "account_number": "1134" + }, + "Autres r\u00e9serves r\u00e9glement\u00e9es": { + "account_number": "1135" + }, + "account_number": "113" + }, + "Autres r\u00e9serves": { + "R\u00e9serves facultatives": { + "account_number": "1181" + }, + "R\u00e9serves diverses": { + "account_number": "1188" + }, + "account_number": "118" + }, + "account_number": "11" + }, + "Report \u00e0 nouveau": { + "Report \u00e0 nouveau cr\u00e9diteur": { + "account_number": "121" + }, + "Report \u00e0 nouveau d\u00e9biteur": { + "Perte nette \u00e0 reporter": { + "account_number": "1291" + }, + "Perte Amortissements r\u00e9put\u00e9s diff\u00e9r\u00e9s": { + "account_number": "1292" + }, + "account_number": "129" + }, + "account_number": "12" + }, + "R\u00e9sultat net de l\u2019exercice": { + "R\u00e9sultat en instance d\u2019affectation": { + "R\u00e9sultat en instance d\u2019affectation : b\u00e9n\u00e9fice": { + "account_number": "1301" + }, + "R\u00e9sultat en instance d\u2019affectation : perte": { + "account_number": "1309" + }, + "account_number": "130" + }, + "R\u00e9sultat net : b\u00e9n\u00e9fice": { + "account_number": "131" + }, + "Marge commerciale (MC)": { + "account_number": "132" + }, + "Valeur ajout\u00e9e (VA)": { + "account_number": "133" + }, + "Exc\u00e9dent brut d\u2019exploitation (EBE)": { + "account_number": "134" + }, + "R\u00e9sultat d\u2019exploitation (RE)": { + "account_number": "135" + }, + "R\u00e9sultat financier (RF)": { + "account_number": "136" + }, + "R\u00e9sultat des activit\u00e9s ordinaires (RAO)": { + "account_number": "137" + }, + "R\u00e9sultat hors activit\u00e9s ordinaires (RHAO)": { + "R\u00e9sultat de fusion": { + "account_number": "1381" + }, + "R\u00e9sultat d\u2019apport partiel d\u2019actif": { + "account_number": "1382" + }, + "R\u00e9sultat de scission": { + "account_number": "1383" + }, + "R\u00e9sultat de liquidation": { + "account_number": "1384" + }, + "account_number": "138" + }, + "R\u00e9sultat net : perte": { + "account_number": "139" + }, + "account_number": "13" + }, + "Subventions d\u2019investissement": { + "Subventions d\u2019\u00e9quipement": { + "\u00c9tat": { + "account_number": "1411" + }, + "R\u00e9gions": { + "account_number": "1412" + }, + "D\u00e9partements": { + "account_number": "1413" + }, + "Communes et collectivit\u00e9s publiques d\u00e9centralis\u00e9es": { + "account_number": "1414" + }, + "Entit\u00e9s publiques ou mixtes": { + "account_number": "1415" + }, + "Entit\u00e9s et organismes priv\u00e9s": { + "account_number": "1416" + }, + "Organismes internationaux": { + "account_number": "1417" + }, + "Autres": { + "account_number": "1418" + }, + "account_number": "141" + }, + "Autres subventions d\u2019investissement": { + "account_number": "148" + }, + "account_number": "14" + }, + "Provisions r\u00e9glement\u00e9es et fonds assimil\u00e9s": { + "Amortissements d\u00e9rogatoires": { + "account_number": "151" + }, + "Plus-values de cession \u00e0 r\u00e9investir": { + "account_number": "152" + }, + "Fonds r\u00e9glement\u00e9s": { + "Fonds National": { + "account_number": "1531" + }, + "Pr\u00e9l\u00e8vement pour le Budget": { + "account_number": "1532" + }, + "account_number": "153" + }, + "Provisions sp\u00e9ciales de r\u00e9\u00e9valuation": { + "account_number": "154" + }, + "Provisions r\u00e9glement\u00e9es relatives aux immobilisations": { + "Reconstitution des gisements miniers et p\u00e9troliers": { + "account_number": "1551" + }, + "account_number": "155" + }, + "Provisions r\u00e9glement\u00e9es relatives aux stocks": { + "Hausse de prix": { + "account_number": "1561" + }, + "Fluctuation des cours": { + "account_number": "1562" + }, + "account_number": "156" + }, + "Provisions pour investissement": { + "account_number": "157" + }, + "Autres provisions et fonds r\u00e9glement\u00e9s": { + "account_number": "158" + }, + "account_number": "15" + }, + "Emprunts et dettes assimil\u00e9es": { + "Emprunts obligataires": { + "Emprunts obligataires ordinaires": { + "account_number": "1611" + }, + "Emprunts obligataires convertibles en actions": { + "account_number": "1612" + }, + "Emprunts obligataires remboursables en actions": { + "account_number": "1613" + }, + "Autres emprunts obligataires": { + "account_number": "1618" + }, + "account_number": "161" + }, + "Emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": { + "account_number": "162" + }, + "Avances re\u00e7ues de l\u2019\u00c9tat": { + "account_number": "163" + }, + "Avances re\u00e7ues et comptes courants bloqu\u00e9s": { + "account_number": "164" + }, + "D\u00e9p\u00f4ts et cautionnements re\u00e7us": { + "D\u00e9p\u00f4ts": { + "account_number": "1651" + }, + "Cautionnements": { + "account_number": "1652" + }, + "account_number": "165" + }, + "Int\u00e9r\u00eats courus": { + "Sur emprunts obligataires": { + "account_number": "1661" + }, + "Sur emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": { + "account_number": "1662" + }, + "Sur avances re\u00e7ues de l\u2019\u00c9tat": { + "account_number": "1663" + }, + "Sur avances re\u00e7ues et comptes courants bloqu\u00e9s": { + "account_number": "1664" + }, + "Sur d\u00e9p\u00f4ts et cautionnements re\u00e7us": { + "account_number": "1665" + }, + "Sur avances assorties de conditions particuli\u00e8res": { + "account_number": "1667" + }, + "Sur autres emprunts et dettes": { + "account_number": "1668" + }, + "account_number": "166" + }, + "Avances assorties de conditions particuli\u00e8res": { + "Avances bloqu\u00e9es pour augmentation du capital": { + "account_number": "1671" + }, + "Avances conditionn\u00e9es par l\u2019\u00c9tat": { + "account_number": "1672" + }, + "Avances conditionn\u00e9es par les autres organismes africains": { + "account_number": "1673" + }, + "Avances conditionn\u00e9es par les organismes internationaux": { + "account_number": "1674" + }, + "account_number": "167" + }, + "Autres emprunts et dettes": { + "Rentes viag\u00e8res capitalis\u00e9es": { + "account_number": "1681" + }, + "Billets de fonds": { + "account_number": "1682" + }, + "Dettes cons\u00e9cutives \u00e0 des titres emprunt\u00e9s": { + "account_number": "1683" + }, + "Emprunts participatifs": { + "account_number": "1684" + }, + "Participation des travailleurs aux b\u00e9n\u00e9fices": { + "account_number": "1685" + }, + "Emprunts et dettes contract\u00e9s aupr\u00e8s des autres tiers": { + "account_number": "1686" + }, + "account_number": "168" + }, + "account_number": "16" + }, + "Dettes de location acquisition": { + "Dettes de location acquisition / cr\u00e9dit bail immobilier": { + "account_number": "172" + }, + "Dettes de location acquisition / cr\u00e9dit bail mobilier": { + "account_number": "173" + }, + "Dettes de location acquisition / location de vente": { + "account_number": "174" + }, + "Int\u00e9r\u00eats courus": { + "Sur dettes de location acquisition / cr\u00e9dit-bail immobilier": { + "account_number": "1762" + }, + "Sur dettes de location acquisition / cr\u00e9dit-bail mobilier": { + "account_number": "1763" + }, + "Sur dettes de location acquisition / location-vente": { + "account_number": "1764" + }, + "Sur autres dettes de location acquisition": { + "account_number": "1768" + }, + "account_number": "176" + }, + "Autres dettes de location acquisition": { + "account_number": "178" + }, + "account_number": "17" + }, + "Dettes li\u00e9es \u00e0 des participations et comptes de liaison des \u00e9tablissements et soci\u00e9t\u00e9s en participation": { + "Dettes li\u00e9es \u00e0 des participations": { + "Dettes li\u00e9es \u00e0 des participations (groupe)": { + "account_number": "1811" + }, + "Dettes li\u00e9es \u00e0 des participations (hors groupe)": { + "account_number": "1812" + }, + "account_number": "181" + }, + "Dettes li\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": { + "account_number": "182" + }, + "Int\u00e9r\u00eats courus sur dettes li\u00e9es \u00e0 des participations": { + "account_number": "183" + }, + "Comptes permanents bloqu\u00e9s des \u00e9tablissements et succursales": { + "account_number": "184" + }, + "Comptes permanents non bloqu\u00e9s des \u00e9tablissements et succursales": { + "account_number": "185" + }, + "Comptes de liaison charges": { + "account_number": "186" + }, + "Comptes de liaison produits": { + "account_number": "187" + }, + "Comptes de liaison des soci\u00e9t\u00e9s en participation": { + "account_number": "188" + }, + "account_number": "18" + }, + "Provisions pour risques et charges": { + "Provisions pour litiges": { + "account_number": "191" + }, + "Provisions pour garanties donn\u00e9es aux clients": { + "account_number": "192" + }, + "Provisions pour pertes sur march\u00e9s \u00e0 ach\u00e8vement futur": { + "account_number": "193" + }, + "Provisions pour pertes de change": { + "account_number": "194" + }, + "Provisions pour imp\u00f4ts": { + "account_number": "195" + }, + "Provisions pour pensions et obligations similaires": { + "Provisions pour pensions et obligations similaires engagement de retraite": { + "account_number": "1961" + }, + "Actif du r\u00e9gime de retraite": { + "account_number": "1962" + }, + "account_number": "196" + }, + "Provisions pour restructuration": { + "account_number": "197" + }, + "Autres provisions pour risques et charges": { + "Provisions pour amendes et p\u00e9nalit\u00e9s": { + "account_number": "1981" + }, + "Provisions pour propre assureur": { + "account_number": "1983" + }, + "Provisions pour d\u00e9mant\u00e8lement et remise en \u00e9tat": { + "account_number": "1984" + }, + "Provisions pour droits \u00e0 r\u00e9duction ou avantage en nature (ch\u00e8ques cadeau, cartes de fid\u00e9lit\u00e9...)": { + "account_number": "1985" + }, + "Provisions pour divers risques et charges": { + "account_number": "1988" + }, + "account_number": "198" + }, + "account_number": "19" + }, + "root_type": "Equity", + "account_number": "1" + }, + "Comptes d\u2019actif immobilis\u00e9": { + "Immobilisations incorporelles": { + "account_type": "Fixed Asset", + "Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset", + "account_number": "211" + }, + "Brevets, licences, concessions et droits similaires": { + "account_type": "Fixed Asset", + "Brevets": { + "account_type": "Fixed Asset", + "account_number": "2121" + }, + "Licences": { + "account_type": "Fixed Asset", + "account_number": "2122" + }, + "Concessions de service public": { + "account_type": "Fixed Asset", + "account_number": "2123" + }, + "Autres concessions et droits similaires": { + "account_type": "Fixed Asset", + "account_number": "2128" + }, + "account_number": "212" + }, + "Logiciels et sites internet": { + "account_type": "Fixed Asset", + "Logiciels": { + "account_type": "Fixed Asset", + "account_number": "2131" + }, + "Sites internet": { + "account_type": "Fixed Asset", + "account_number": "2132" + }, + "account_number": "213" + }, + "Marques": { + "account_type": "Fixed Asset", + "account_number": "214" + }, + "Fonds commercial": { + "account_type": "Fixed Asset", + "account_number": "215" + }, + "Droit au bail": { + "account_type": "Fixed Asset", + "account_number": "216" + }, + "Investissements de cr\u00e9ation": { + "account_type": "Fixed Asset", + "account_number": "217" + }, + "Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset", + "Frais de prospection et d\u2019\u00e9valuation de ressources min\u00e9rales": { + "account_type": "Fixed Asset", + "account_number": "2181" + }, + "Co\u00fbts d\u2019obtention du contrat": { + "account_type": "Fixed Asset", + "account_number": "2182" + }, + "Fichiers clients, notices, titres de journaux et magazines": { + "account_type": "Fixed Asset", + "account_number": "2183" + }, + "Co\u00fbts des franchises": { + "account_type": "Fixed Asset", + "account_number": "2184" + }, + "Divers droits et valeurs incorporelles": { + "account_type": "Fixed Asset", + "account_number": "2188" + }, + "account_number": "218" + }, + "Immobilisations incorporelles en cours": { + "account_type": "Fixed Asset", + "Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset", + "account_number": "2191" + }, + "Logiciels et internet": { + "account_type": "Fixed Asset", + "account_number": "2193" + }, + "Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset", + "account_number": "2198" + }, + "account_number": "219" + }, + "account_number": "21" + }, + "Terrains": { + "account_type": "Fixed Asset", + "Terrains agricoles et forestiers": { + "account_type": "Fixed Asset", + "Terrains d\u2019exploitation agricole": { + "account_type": "Fixed Asset", + "account_number": "2211" + }, + "Terrains d\u2019exploitation foresti\u00e8re": { + "account_type": "Fixed Asset", + "account_number": "2212" + }, + "Autres terrains": { + "account_type": "Fixed Asset", + "account_number": "2218" + }, + "account_number": "221" + }, + "Terrains nus": { + "account_type": "Fixed Asset", + "Terrains \u00e0 b\u00e2tir": { + "account_type": "Fixed Asset", + "account_number": "2221" + }, + "Autres terrains nus": { + "account_type": "Fixed Asset", + "account_number": "2228" + }, + "account_number": "222" + }, + "Terrains b\u00e2tis": { + "account_type": "Fixed Asset", + "Pour b\u00e2timents industriels et agricoles": { + "account_type": "Fixed Asset", + "account_number": "2231" + }, + "Pour b\u00e2timents administratifs et commerciaux": { + "account_type": "Fixed Asset", + "account_number": "2232" + }, + "Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations professionnelles": { + "account_type": "Fixed Asset", + "account_number": "2234" + }, + "Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations non professionnelles": { + "account_type": "Fixed Asset", + "account_number": "2235" + }, + "Autres terrains b\u00e2tis": { + "account_type": "Fixed Asset", + "account_number": "2238" + }, + "account_number": "223" + }, + "Travaux de mise en valeur des terrains": { + "account_type": "Fixed Asset", + "Plantation d\u2019arbres et d\u2019arbustes": { + "account_type": "Fixed Asset", + "account_number": "2241" + }, + "Am\u00e9liorations du fonds": { + "account_type": "Fixed Asset", + "account_number": "2245" + }, + "Autres travaux": { + "account_type": "Fixed Asset", + "account_number": "2248" + }, + "account_number": "224" + }, + "Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset", + "Carri\u00e8res": { + "account_type": "Fixed Asset", + "account_number": "2251" + }, + "account_number": "225" + }, + "Terrains am\u00e9nag\u00e9s": { + "account_type": "Fixed Asset", + "Parkings": { + "account_type": "Fixed Asset", + "account_number": "2261" + }, + "account_number": "226" + }, + "Terrains mis en concession": { + "account_type": "Fixed Asset", + "account_number": "227" + }, + "Autres terrains": { + "account_type": "Fixed Asset", + "Terrains immeubles de placement": { + "account_type": "Fixed Asset", + "account_number": "2281" + }, + "Terrains des logements affect\u00e9s au personnel": { + "account_type": "Fixed Asset", + "account_number": "2285" + }, + "Terrains de location acquisition": { + "account_type": "Fixed Asset", + "account_number": "2286" + }, + "Divers terrains": { + "account_type": "Fixed Asset", + "account_number": "2288" + }, + "account_number": "228" + }, + "Am\u00e9nagements de terrains en cours": { + "account_type": "Fixed Asset", + "Terrains agricoles et forestiers": { + "account_type": "Fixed Asset", + "account_number": "2291" + }, + "Terrains nus": { + "account_type": "Fixed Asset", + "account_number": "2292" + }, + "Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset", + "account_number": "2295" + }, + "Autres terrains": { + "account_type": "Fixed Asset", + "account_number": "2298" + }, + "account_number": "229" + }, + "account_number": "22" + }, + "B\u00e2timents, installations techniques et agencements": { + "B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "B\u00e2timents industriels": { + "account_number": "2311" + }, + "B\u00e2timents agricoles": { + "account_number": "2312" + }, + "B\u00e2timents administratifs et commerciaux": { + "account_number": "2313" + }, + "B\u00e2timents affect\u00e9s au logement du personnel": { + "account_number": "2314" + }, + "B\u00e2timents immeubles de placement": { + "account_number": "2315" + }, + "B\u00e2timents de location acquisition": { + "account_number": "2316" + }, + "account_number": "231" + }, + "B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "B\u00e2timents industriels": { + "account_number": "2321" + }, + "B\u00e2timents agricoles": { + "account_number": "2322" + }, + "B\u00e2timents administratifs et commerciaux": { + "account_number": "2323" + }, + "B\u00e2timents affect\u00e9s au logement du personnel": { + "account_number": "2324" + }, + "B\u00e2timents immeubles de placement": { + "account_number": "2325" + }, + "B\u00e2timents de location acquisition": { + "account_number": "2326" + }, + "account_number": "232" + }, + "Ouvrages d\u2019infrastructure": { + "Voies de terre": { + "account_number": "2331" + }, + "Voies de fer": { + "account_number": "2332" + }, + "Voies d\u2019eau": { + "account_number": "2333" + }, + "Barrages, Digues": { + "account_number": "2334" + }, + "Pistes d\u2019a\u00e9rodrome": { + "account_number": "2335" + }, + "Autres ouvrages d\u2019infrastructures": { + "account_number": "2338" + }, + "account_number": "233" + }, + "Am\u00e9nagements, agencements et installations techniques": { + "Installations complexes sp\u00e9cialis\u00e9es sur sol propre": { + "account_number": "2341" + }, + "Installations complexes sp\u00e9cialis\u00e9es sur sol d\u2019autrui": { + "account_number": "2342" + }, + "Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol propre": { + "account_number": "2343" + }, + "Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol d\u2019autrui": { + "account_number": "2344" + }, + "Am\u00e9nagements et agencements des b\u00e2timents": { + "account_number": "2345" + }, + "account_number": "234" + }, + "Am\u00e9nagements de bureaux": { + "Installations g\u00e9n\u00e9rales": { + "account_number": "2351" + }, + "Autres am\u00e9nagements de bureaux": { + "account_number": "2358" + }, + "account_number": "235" + }, + "B\u00e2timents industriels, agricoles et commerciaux mis en concession": { + "account_number": "237" + }, + "Autres installations et agencements": { + "account_number": "238" + }, + "B\u00e2timents am\u00e9nagements, agencements et installations en cours": { + "B\u00e2timents en cours": { + "account_number": "2391" + }, + "Installations en cours": { + "account_number": "2392" + }, + "Ouvrages d\u2019infrastructure en cours": { + "account_number": "2393" + }, + "Am\u00e9nagements et agencements et installations techniques en cours": { + "account_number": "2394" + }, + "Am\u00e9nagements de bureaux en cours": { + "account_number": "2395" + }, + "Autres installations et agencements en cours": { + "account_number": "2398" + }, + "account_number": "239" + }, + "account_number": "23" + }, + "Mat\u00e9riel, mobilier et actifs biologiques": { + "Mat\u00e9riel et outillage industriel et commercial": { + "Mat\u00e9riel industriel": { + "account_number": "2411" + }, + "Outillage industriel": { + "account_number": "2412" + }, + "Mat\u00e9riel commercial": { + "account_number": "2413" + }, + "Outillage commercial": { + "account_number": "2414" + }, + "Mat\u00e9riel & outillage industriel et commercial de location-acquisition": { + "account_number": "2416" + }, + "account_number": "241" + }, + "Mat\u00e9riel et outillage agricole": { + "Mat\u00e9riel agricole": { + "account_number": "2421" + }, + "Outillage agricole": { + "account_number": "2422" + }, + "Mat\u00e9riel & outillage agricole de location-acquisition": { + "account_number": "2426" + }, + "account_number": "242" + }, + "Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "243" + }, + "Mat\u00e9riel et mobilier": { + "Mat\u00e9riel de bureau": { + "account_number": "2441" + }, + "Mat\u00e9riel informatique": { + "account_number": "2442" + }, + "Mat\u00e9riel bureautique": { + "account_number": "2443" + }, + "Mobilier de bureau": { + "account_number": "2444" + }, + "Mat\u00e9riel et mobilier immeubles de placement": { + "account_number": "2445" + }, + "Mat\u00e9riel et mobilier de location acquisition": { + "account_number": "2446" + }, + "Mat\u00e9riel et mobilier des logements du personnel": { + "account_number": "2447" + }, + "account_number": "244" + }, + "Mat\u00e9riel de transport": { + "Mat\u00e9riel automobile": { + "account_number": "2451" + }, + "Mat\u00e9riel ferroviaire": { + "account_number": "2452" + }, + "Mat\u00e9riel fluvial, lagunaire": { + "account_number": "2453" + }, + "Mat\u00e9riel naval": { + "account_number": "2454" + }, + "Mat\u00e9riel a\u00e9rien": { + "account_number": "2455" + }, + "Mat\u00e9riel de transport de location-acquisition": { + "account_number": "2456" + }, + "Mat\u00e9riel hippomobile": { + "account_number": "2457" + }, + "Autres mat\u00e9riels de transport": { + "account_number": "2458" + }, + "account_number": "245" + }, + "Actifs biologiques": { + "Cheptel, animaux de trait": { + "account_number": "2461" + }, + "Cheptel, animaux reproducteurs": { + "account_number": "2462" + }, + "Animaux de garde": { + "account_number": "2463" + }, + "Plantations agricoles": { + "account_number": "2465" + }, + "Autres actifs biologiques": { + "account_number": "2468" + }, + "account_number": "246" + }, + "Agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "Agencements et am\u00e9nagements du mat\u00e9riel": { + "account_number": "2471" + }, + "Agencements et am\u00e9nagements des actifs biologiques": { + "account_number": "2472" + }, + "Autres agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "account_number": "2478" + }, + "account_number": "247" + }, + "Autres mat\u00e9riels et mobiliers": { + "Collections et \u0153uvres d\u2019art": { + "account_number": "2481" + }, + "Divers mat\u00e9riels mobiliers": { + "account_number": "2488" + }, + "account_number": "248" + }, + "Mat\u00e9riels et actifs biologiques en cours": { + "Mat\u00e9riel et outillage industriel et commercial": { + "account_number": "2491" + }, + "Mat\u00e9riel et outillage agricole": { + "account_number": "2492" + }, + "Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "2493" + }, + "Mat\u00e9riel et mobilier de bureau": { + "account_number": "2494" + }, + "Mat\u00e9riel de transport": { + "account_number": "2495" + }, + "Actifs biologiques": { + "account_number": "2496" + }, + "Agencements am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "account_number": "2497" + }, + "Autres mat\u00e9riels et actifs biologiques en cours": { + "account_number": "2498" + }, + "account_number": "249" + }, + "account_number": "24" + }, + "Avances et acomptes vers\u00e9s sur immobilisations": { + "Avances et acomptes vers\u00e9s sur immobilisations incorporelles": { + "account_number": "251" + }, + "Avances et acomptes vers\u00e9s sur immobilisations corporelles": { + "account_number": "252" + }, + "account_number": "25" + }, + "Titres de participation": { + "Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": { + "account_number": "261" + }, + "Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le conjoint": { + "account_number": "262" + }, + "Titres de participation dans des soci\u00e9t\u00e9s conf\u00e9rant une influence notable": { + "account_number": "263" + }, + "Participations dans des organismes professionnels": { + "account_number": "265" + }, + "Parts dans des groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": { + "account_number": "266" + }, + "Autres titres de participation": { + "account_number": "268" + }, + "account_number": "26" + }, + "Autres immobilisations financi\u00e8res": { + "Pr\u00eats et cr\u00e9ances": { + "Pr\u00eats participatifs": { + "account_number": "2711" + }, + "Pr\u00eats aux associ\u00e9s": { + "account_number": "2712" + }, + "Billets de fonds": { + "account_number": "2713" + }, + "Titres pr\u00eat\u00e9s": { + "account_number": "2714" + }, + "Autres pr\u00eats et cr\u00e9ances": { + "account_number": "2718" + }, + "account_number": "271" + }, + "Pr\u00eats au personnel": { + "Pr\u00eats immobiliers": { + "account_number": "2721" + }, + "Pr\u00eats mobiliers et d\u2019installation": { + "account_number": "2722" + }, + "Autres pr\u00eats au personnel": { + "account_number": "2728" + }, + "account_number": "272" + }, + "Cr\u00e9ances sur l\u2019\u00c9tat": { + "Retenues de garantie": { + "account_number": "2731" + }, + "Fonds r\u00e9glement\u00e9": { + "account_number": "2733" + }, + "Cr\u00e9ances sur le conc\u00e9dant": { + "account_number": "2734" + }, + "Autres cr\u00e9ances sur l\u2019\u00c9tat": { + "account_number": "2738" + }, + "account_number": "273" + }, + "Titres immobilis\u00e9s": { + "Titres immobilis\u00e9s de l\u2019activit\u00e9 de portefeuille (TIAP)": { + "account_number": "2741" + }, + "Titres participatifs": { + "account_number": "2742" + }, + "Certificats d\u2019investissement": { + "account_number": "2743" + }, + "Parts de fonds commun de placement (FCP)": { + "account_number": "2744" + }, + "Obligations": { + "account_number": "2745" + }, + "Actions ou parts propres": { + "account_number": "2746" + }, + "Autres titres immobilis\u00e9s": { + "account_number": "2748" + }, + "account_number": "274" + }, + "D\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "D\u00e9p\u00f4ts pour loyers d\u2019avance": { + "account_number": "2751" + }, + "D\u00e9p\u00f4ts pour l\u2019\u00e9lectricit\u00e9": { + "account_number": "2752" + }, + "D\u00e9p\u00f4ts pour l\u2019eau": { + "account_number": "2753" + }, + "D\u00e9p\u00f4ts pour le gaz": { + "account_number": "2754" + }, + "D\u00e9p\u00f4ts pour le t\u00e9l\u00e9phone, le t\u00e9lex, la t\u00e9l\u00e9copie": { + "account_number": "2755" + }, + "Cautionnements sur march\u00e9s publics": { + "account_number": "2756" + }, + "Cautionnements sur autres op\u00e9rations": { + "account_number": "2757" + }, + "Autres d\u00e9p\u00f4ts et cautionnements": { + "account_number": "2758" + }, + "account_number": "275" + }, + "Int\u00e9r\u00eats courus": { + "Pr\u00eats et cr\u00e9ances non commerciales": { + "account_number": "2761" + }, + "Pr\u00eats au personnel": { + "account_number": "2762" + }, + "Cr\u00e9ances sur l\u2019\u00c9tat": { + "account_number": "2763" + }, + "Titres immobilis\u00e9s": { + "account_number": "2764" + }, + "D\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "account_number": "2765" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations": { + "account_number": "2767" + }, + "Immobilisations financi\u00e8res diverses": { + "account_number": "2768" + }, + "account_number": "276" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": { + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations (groupe)": { + "account_number": "2771" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations (hors groupe)": { + "account_number": "2772" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": { + "account_number": "2773" + }, + "Avances \u00e0 des Groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": { + "account_number": "2774" + }, + "account_number": "277" + }, + "Immobilisations financi\u00e8res diverses": { + "Cr\u00e9ances diverses groupe": { + "account_number": "2781" + }, + "Cr\u00e9ances diverses hors groupe": { + "account_number": "2782" + }, + "Banques d\u00e9p\u00f4ts \u00e0 terme": { + "account_number": "2784" + }, + "Or et m\u00e9taux pr\u00e9cieux": { + "account_number": "2785" + }, + "Autres immobilisations financi\u00e8res": { + "account_number": "2788" + }, + "account_number": "278" + }, + "account_number": "27" + }, + "Amortissements": { + "account_type": "Accumulated Depreciation", + "Amortissements des immobilisations corporelles": { + "account_type": "Accumulated Depreciation", + "Amortissements des frais de d\u00e9veloppement": { + "account_type": "Accumulated Depreciation", + "account_number": "2811" + }, + "Amortissements des brevets, licences, concessions et droits similaires": { + "account_type": "Accumulated Depreciation", + "account_number": "2812" + }, + "Amortissements des logiciels et sites internet": { + "account_type": "Accumulated Depreciation", + "account_number": "2813" + }, + "Amortissements des marques": { + "account_type": "Accumulated Depreciation", + "account_number": "2814" + }, + "Amortissements du fonds commercial": { + "account_type": "Accumulated Depreciation", + "account_number": "2815" + }, + "Amortissements du droit au bail": { + "account_type": "Accumulated Depreciation", + "account_number": "2816" + }, + "Amortissements des investissements de cr\u00e9ation": { + "account_type": "Accumulated Depreciation", + "account_number": "2817" + }, + "Amortissements des autres droits et valeurs incorporels": { + "account_type": "Accumulated Depreciation", + "account_number": "2818" + }, + "account_number": "281" + }, + "Amortissements des terrains": { + "Amortissements des travaux de mise en valeur des terrains": { + "account_number": "2824" + }, + "account_number": "282" + }, + "Amortissements des b\u00e2timents, installations techniques et agencements": { + "Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "account_number": "2831" + }, + "Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "account_number": "2832" + }, + "Amortissements des ouvrages d\u2019infrastructure": { + "account_number": "2833" + }, + "Amortissements des am\u00e9nagements, agencements et installations techniques": { + "account_number": "2834" + }, + "Amortissements des am\u00e9nagements de bureaux": { + "account_number": "2835" + }, + "Amortissements des b\u00e2timents industriels, agricoles et commerciaux mis en concession": { + "account_number": "2837" + }, + "Amortissements des autres installations et agencements": { + "account_number": "2838" + }, + "account_number": "283" + }, + "Amortissements du mat\u00e9riel": { + "Amortissements du mat\u00e9riel et outillage industriel et commercial": { + "account_number": "2841" + }, + "Amortissements du mat\u00e9riel et outillage agricole": { + "account_number": "2842" + }, + "Amortissements du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "2843" + }, + "Amortissements du mat\u00e9riel et mobilier": { + "account_number": "2844" + }, + "Amortissements du mat\u00e9riel de transport": { + "account_number": "2845" + }, + "Amortissements des actifs biologiques": { + "account_number": "2846" + }, + "Amortissements des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": { + "account_number": "2847" + }, + "Amortissements des autres mat\u00e9riels": { + "account_number": "2848" + }, + "account_number": "284" + }, + "account_number": "28" + }, + "D\u00e9pr\u00e9ciations des immobilisations": { + "D\u00e9pr\u00e9ciations des immobilisations incorporelles": { + "D\u00e9pr\u00e9ciations des frais de d\u00e9veloppement": { + "account_number": "2911" + }, + "D\u00e9pr\u00e9ciations des brevets, licences, concessions et droits similaires": { + "account_number": "2912" + }, + "D\u00e9pr\u00e9ciations des logiciels et sites internet": { + "account_number": "2913" + }, + "D\u00e9pr\u00e9ciations des marques": { + "account_number": "2914" + }, + "D\u00e9pr\u00e9ciations du fonds commercial": { + "account_number": "2915" + }, + "D\u00e9pr\u00e9ciations du droit au bail": { + "account_number": "2916" + }, + "D\u00e9pr\u00e9ciations des investissements de cr\u00e9ation": { + "account_number": "2917" + }, + "D\u00e9pr\u00e9ciations des autres droits et valeurs incorporels": { + "account_number": "2918" + }, + "D\u00e9pr\u00e9ciations des immobilisations incorporelles en cours": { + "account_number": "2919" + }, + "account_number": "291" + }, + "D\u00e9pr\u00e9ciations des terrains": { + "D\u00e9pr\u00e9ciations des terrains agricoles et forestiers": { + "account_number": "2921" + }, + "D\u00e9pr\u00e9ciations des terrains nus": { + "account_number": "2922" + }, + "D\u00e9pr\u00e9ciations des terrains b\u00e2tis": { + "account_number": "2923" + }, + "D\u00e9pr\u00e9ciations des travaux de mise en valeur des terrains": { + "account_number": "2924" + }, + "D\u00e9pr\u00e9ciations des terrains de gisement": { + "account_number": "2925" + }, + "D\u00e9pr\u00e9ciations des terrains am\u00e9nag\u00e9s": { + "account_number": "2926" + }, + "D\u00e9pr\u00e9ciations des terrains mis en concession": { + "account_number": "2927" + }, + "D\u00e9pr\u00e9ciations des autres terrains": { + "account_number": "2928" + }, + "D\u00e9pr\u00e9ciations des am\u00e9nagements de terrains en cours": { + "account_number": "2929" + }, + "account_number": "292" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents, installations techniques et agencements": { + "D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "account_number": "2931" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "account_number": "2932" + }, + "D\u00e9pr\u00e9ciations des ouvrages d\u2019infrastructures": { + "account_number": "2933" + }, + "D\u00e9pr\u00e9ciations des am\u00e9nagements, agencements et installations techniques": { + "account_number": "2934" + }, + "D\u00e9pr\u00e9ciations des am\u00e9nagements de bureaux": { + "account_number": "2935" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles et commerciaux mis en concession": { + "account_number": "2937" + }, + "D\u00e9pr\u00e9ciations des autres installations et agencements": { + "account_number": "2938" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents et installations en cours": { + "account_number": "2939" + }, + "account_number": "293" + }, + "D\u00e9pr\u00e9ciations de mat\u00e9riel, du mobilier et de l\u2019actif biologique": { + "D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage industriel et commercial": { + "account_number": "2941" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage agricole": { + "account_number": "2942" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "2943" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel et mobilier": { + "account_number": "2944" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel de transport": { + "account_number": "2945" + }, + "D\u00e9pr\u00e9ciations des actifs biologiques": { + "account_number": "2946" + }, + "D\u00e9pr\u00e9ciations des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": { + "account_number": "2947" + }, + "D\u00e9pr\u00e9ciations des autres mat\u00e9riels": { + "account_number": "2948" + }, + "D\u00e9pr\u00e9ciations de mat\u00e9riel en cours": { + "account_number": "2949" + }, + "account_number": "294" + }, + "D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations": { + "D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations incorporelles": { + "account_number": "2951" + }, + "D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations corporelles": { + "account_number": "2952" + }, + "account_number": "295" + }, + "D\u00e9pr\u00e9ciations des titres de participation": { + "D\u00e9pr\u00e9ciations des titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": { + "account_number": "2961" + }, + "D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s sous contr\u00f4le conjoint": { + "account_number": "2962" + }, + "D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s conf\u00e9rant une influence notable": { + "account_number": "2963" + }, + "D\u00e9pr\u00e9ciations des participations dans des organismes professionnels": { + "account_number": "2965" + }, + "D\u00e9pr\u00e9ciations des parts dans des GIE": { + "account_number": "2966" + }, + "D\u00e9pr\u00e9ciations des autres titres de participation": { + "account_number": "2968" + }, + "account_number": "296" + }, + "D\u00e9pr\u00e9ciations des autres immobilisations financi\u00e8res": { + "D\u00e9pr\u00e9ciations des pr\u00eats et cr\u00e9ances": { + "account_number": "2971" + }, + "D\u00e9pr\u00e9ciations des pr\u00eats au personnel": { + "account_number": "2972" + }, + "D\u00e9pr\u00e9ciations des cr\u00e9ances sur l\u2019\u00c9tat": { + "account_number": "2973" + }, + "D\u00e9pr\u00e9ciations des titres immobilis\u00e9s": { + "account_number": "2974" + }, + "D\u00e9pr\u00e9ciations des d\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "account_number": "2975" + }, + "D\u00e9pr\u00e9ciations des cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": { + "account_number": "2977" + }, + "D\u00e9pr\u00e9ciations des cr\u00e9ances financi\u00e8res diverses": { + "account_number": "2978" + }, + "account_number": "297" + }, + "account_number": "29" + }, + "root_type": "Asset", + "account_number": "2" + }, + "Comptes de Stocks": { + "Marchandises": { + "Marchandises A": { + "Marchandises A1": { + "account_number": "3111" + }, + "Marchandises A2": { + "account_number": "3112" + }, + "account_number": "311" + }, + "Marchandises B": { + "Marchandises B1": { + "account_number": "3121" + }, + "Marchandises B2": { + "account_number": "3122" + }, + "account_number": "312" + }, + "Actifs biologiques": { + "Animaux": { + "account_number": "3131" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3132" + }, + "account_number": "313" + }, + "Marchandises hors activit\u00e9s ordinaires (HAO)": { + "account_number": "318" + }, + "account_number": "31" + }, + "Mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "Mati\u00e8res A": { + "account_number": "321" + }, + "Mati\u00e8res B": { + "account_number": "322" + }, + "Fournitures (A, B)": { + "account_number": "323" + }, + "account_number": "32" + }, + "Autres approvisionnements": { + "Mati\u00e8res consommables": { + "account_number": "331" + }, + "Fournitures d\u2019atelier et d\u2019usine": { + "account_number": "332" + }, + "Fournitures de magasin": { + "account_number": "333" + }, + "Fournitures de bureau": { + "account_number": "334" + }, + "Emballages": { + "Emballages perdus": { + "account_number": "3351" + }, + "Emballages r\u00e9cup\u00e9rables non identifiables": { + "account_number": "3352" + }, + "Emballages \u00e0 usage mixte": { + "account_number": "3353" + }, + "Autres emballages": { + "account_number": "3358" + }, + "account_number": "335" + }, + "Autres mati\u00e8res": { + "account_number": "338" + }, + "account_number": "33" + }, + "Produits en cours": { + "Produits en cours": { + "Produits en cours P1": { + "account_number": "3411" + }, + "Produits en cours P2": { + "account_number": "3412" + }, + "account_number": "341" + }, + "Travaux en cours": { + "Travaux en cours T1": { + "account_number": "3421" + }, + "Travaux en cours T2": { + "account_number": "3422" + }, + "account_number": "342" + }, + "Produits interm\u00e9diaires en cours": { + "Produits interm\u00e9diaires A": { + "account_number": "3431" + }, + "Produits interm\u00e9diaires B": { + "account_number": "3432" + }, + "account_number": "343" + }, + "Produits r\u00e9siduels en cours": { + "Produits r\u00e9siduels A": { + "account_number": "3441" + }, + "Produits r\u00e9siduels B": { + "account_number": "3442" + }, + "account_number": "344" + }, + "Actifs biologiques en cours": { + "Animaux": { + "account_number": "3451" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3452" + }, + "account_number": "345" + }, + "account_number": "34" + }, + "Services en cours": { + "\u00c9tudes en cours": { + "\u00c9tudes en cours E1": { + "account_number": "3511" + }, + "\u00c9tudes en cours E2": { + "account_number": "3512" + }, + "account_number": "351" + }, + "Prestations de services en cours": { + "Prestations de services S1": { + "account_number": "3521" + }, + "Prestations de services S2": { + "account_number": "3522" + } + }, + "account_number": "35" + }, + "Produits finis": { + "Produits finis A": { + "account_number": "361" + }, + "Produits finis B": { + "account_number": "362" + }, + "Actifs biologiques": { + "Animaux": { + "account_number": "3631" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3632" + }, + "Autres stocks (activit\u00e9s annexes)": { + "account_number": "3638" + }, + "account_number": "363" + }, + "account_number": "36" + }, + "Produits interm\u00e9diaires et r\u00e9siduels": { + "Produits interm\u00e9diaires": { + "Produits interm\u00e9diaires A": { + "account_number": "3711" + }, + "Produits interm\u00e9diaires B": { + "account_number": "3712" + }, + "account_number": "371" + }, + "Produits r\u00e9siduels": { + "D\u00e9chets": { + "account_number": "3721" + }, + "Rebuts": { + "account_number": "3722" + }, + "Mati\u00e8res de R\u00e9cup\u00e9ration": { + "account_number": "3723" + }, + "account_number": "372" + }, + "Actifs biologiques": { + "Animaux": { + "account_number": "3731" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3732" + }, + "Autres stocks (activit\u00e9s annexes)": { + "account_number": "3738" + }, + "account_number": "373" + }, + "account_number": "37" + }, + "Stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": { + "account_type": "Stock", + "Marchandises en cours de route": { + "account_number": "381" + }, + "Mati\u00e8res premi\u00e8res et fournitures li\u00e9es en cours de route": { + "account_number": "382" + }, + "Autres approvisionnements en cours de route": { + "account_number": "383" + }, + "Produits finis en cours de route": { + "account_number": "386" + }, + "Stock en consignation ou en d\u00e9p\u00f4t": { + "Stock en consignation": { + "account_number": "3871" + }, + "Stock en d\u00e9p\u00f4t": { + "account_number": "3872" + }, + "account_number": "387" + }, + "Stock provenant d\u2019immobilisations mises hors service ou au rebut": { + "account_number": "388" + }, + "account_number": "38" + }, + "D\u00e9pr\u00e9ciations des stocks et encours de production": { + "D\u00e9pr\u00e9ciations des stocks de marchandises": { + "account_number": "391" + }, + "D\u00e9pr\u00e9ciations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "account_number": "392" + }, + "D\u00e9pr\u00e9ciations des stocks d\u2019autres approvisionnements": { + "account_number": "393" + }, + "D\u00e9pr\u00e9ciations des productions en cours": { + "account_number": "394" + }, + "D\u00e9pr\u00e9ciations des services en cours": { + "account_number": "395" + }, + "D\u00e9pr\u00e9ciations des stocks de produits finis": { + "account_number": "396" + }, + "D\u00e9pr\u00e9ciations des stocks de produits interm\u00e9diaires et r\u00e9siduels": { + "account_number": "397" + }, + "D\u00e9pr\u00e9ciations des stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": { + "account_number": "398" + }, + "account_number": "39" + }, + "root_type": "Asset", + "account_number": "3" + }, + "4-Comptes de Tiers (ACTIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (ACTIF)": { + "Fournisseurs d\u00e9biteurs": { + "Fournisseurs Avances et acomptes vers\u00e9s": { + "account_number": "4091" + }, + "Fournisseurs Groupe avances et acomptes vers\u00e9s": { + "account_number": "4092" + }, + "Fournisseurs Sous-traitants avances et acomptes vers\u00e9s": { + "account_number": "4093" + }, + "Fournisseurs Cr\u00e9ances pour emballages et mat\u00e9riels \u00e0 rendre": { + "account_number": "4094" + }, + "Fournisseurs Rabais, remises, ristournes et autres avoirs \u00e0 obtenir": { + "account_number": "4098" + }, + "account_number": "409" + } + }, + "41-Clients et comptes rattach\u00e9s (ACTIF)": { + "Clients": { + "Clients": { + "account_type": "Receivable", + "account_number": "4111" + }, + "Clients groupe": { + "account_type": "Receivable", + "account_number": "4112" + }, + "Clients, \u00c9tat et Collectivit\u00e9s publiques": { + "account_type": "Receivable", + "account_number": "4114" + }, + "Clients, organismes internationaux": { + "account_type": "Receivable", + "account_number": "4115" + }, + "Clients, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Receivable", + "account_number": "4116" + }, + "Client, retenues de garantie": { + "account_type": "Receivable", + "account_number": "4117" + }, + "Clients, d\u00e9gr\u00e8vement de taxes sur la valeur ajout\u00e9e (TVA)": { + "account_type": "Receivable", + "account_number": "4118" + }, + "account_type": "Receivable", + "account_number": "411" + }, + "Clients, effets \u00e0 recevoir en portefeuille": { + "Clients, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4121" + }, + "Clients Groupe, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4122" + }, + "\u00c9tat et Collectivit\u00e9s publiques, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4124" + }, + "Organismes Internationaux, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4125" + }, + "account_type": "Receivable", + "account_number": "412" + }, + "Clients, ch\u00e8ques, effets et autres valeurs impay\u00e9es": { + "Clients, ch\u00e8ques impay\u00e9s": { + "account_type": "Receivable", + "account_number": "4131" + }, + "Clients, effets impay\u00e9s": { + "account_type": "Receivable", + "account_number": "4132" + }, + "Clients, cartes de cr\u00e9dit impay\u00e9es": { + "account_type": "Receivable", + "account_number": "4133" + }, + "Clients, autres valeurs impay\u00e9es": { + "account_type": "Receivable", + "account_number": "4138" + }, + "account_type": "Receivable", + "account_number": "413" + }, + "Cr\u00e9ances sur cessions courantes d\u2019immobilisations": { + "Cr\u00e9ances en compte, immobilisations incorporelles": { + "account_type": "Receivable", + "account_number": "4141" + }, + "Cr\u00e9ances en compte, immobilisations corporelles": { + "account_type": "Receivable", + "account_number": "4142" + }, + "Effets \u00e0 recevoir, immobilisations incorporelles": { + "account_type": "Receivable", + "account_number": "4146" + }, + "Effets \u00e0 recevoir, immobilisations corporelles": { + "account_type": "Receivable", + "account_number": "4147" + }, + "account_type": "Receivable", + "account_number": "414" + }, + "Clients, effets escompt\u00e9s non \u00e9chus": { + "account_type": "Receivable", + "account_number": "415" + }, + "Cr\u00e9ances clients litigieuses ou douteuses": { + "Cr\u00e9ances litigieuses": { + "account_type": "Receivable", + "account_number": "4161" + }, + "Cr\u00e9ances douteuses": { + "account_type": "Receivable", + "account_number": "4162" + }, + "account_type": "Receivable", + "account_number": "416" + }, + "Clients, produits \u00e0 recevoir": { + "Clients, factures \u00e0 \u00e9tablir": { + "account_type": "Receivable", + "account_number": "4181" + }, + "Clients, int\u00e9r\u00eats courus": { + "account_type": "Receivable", + "account_number": "4186" + }, + "account_type": "Receivable", + "account_number": "418" + }, + "account_type": "Receivable" + }, + "42-Personnel (ACTIF)": { + "Personnel, avances et acomptes": { + "Personnel, avances": { + "account_number": "4211" + }, + "Personnel, acomptes": { + "account_number": "4212" + }, + "Frais avanc\u00e9s et fournitures au personnel": { + "account_number": "4213" + }, + "account_number": "421" + } + }, + "43-Organismes sociaux (ACTIF)": { + "431-S\u00e9curit\u00e9 sociale": { + "Prestations familiales": { + "account_number": "4311" + }, + "Accidents de travail": { + "account_number": "4312" + }, + "Caisse de retraite obligatoire": { + "account_number": "4313" + }, + "Caisse de retraite facultative": { + "account_number": "4314" + }, + "Autres cotisations sociales": { + "account_number": "4318" + } + }, + "432-Caisses de retraite compl\u00e9mentaire": {}, + "433-Autres organismes sociaux": { + "Mutuelle": { + "account_number": "4331" + }, + "Assurances retraite": { + "account_number": "4332" + }, + "Assurances et organismes de sant\u00e9": { + "account_number": "4333" + } + }, + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "Produits \u00e0 recevoir": { + "account_number": "4387" + } + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (ACTIF)": { + "\u00c9tat, TVA factur\u00e9e": { + "TVA factur\u00e9e sur ventes": { + "account_number": "4431" + }, + "TVA factur\u00e9e sur prestations de services": { + "account_number": "4432" + }, + "TVA factur\u00e9e sur travaux": { + "account_number": "4433" + }, + "TVA factur\u00e9e sur production livr\u00e9e \u00e0 soi-m\u00eame": { + "account_number": "4434" + }, + "TVA sur factures \u00e0 \u00e9tablir": { + "account_number": "4435" + }, + "account_number": "443" + }, + "\u00c9tat, TVA r\u00e9cup\u00e9rable": { + "TVA r\u00e9cup\u00e9rable sur immobilisations": { + "account_number": "4451" + }, + "TVA r\u00e9cup\u00e9rable sur achats": { + "account_number": "4452" + }, + "TVA r\u00e9cup\u00e9rable sur transport": { + "account_number": "4453" + }, + "TVA r\u00e9cup\u00e9rable sur services ext\u00e9rieurs et autres charges": { + "account_number": "4454" + }, + "TVA r\u00e9cup\u00e9rable sur factures non parvenues": { + "account_number": "4455" + }, + "TVA transf\u00e9r\u00e9e par d\u2019autres entit\u00e9s": { + "account_number": "4456" + }, + "account_number": "445" + }, + "\u00c9tat, charges \u00e0 payer et produits \u00e0 recevoir": { + "Charges \u00e0 payer": { + "account_number": "4486" + }, + "Produits \u00e0 recevoir": { + "account_number": "4487" + }, + "account_number": "448" + }, + "\u00c9tat, cr\u00e9ances et dettes diverses": { + "\u00c9tat, obligations cautionn\u00e9es": { + "account_number": "4491" + }, + "\u00c9tat, avances et acomptes vers\u00e9s sur imp\u00f4ts": { + "account_number": "4492" + }, + "\u00c9tat, fonds de dotation \u00e0 recevoir": { + "account_number": "4493" + }, + "\u00c9tat, subventions investissement \u00e0 recevoir": { + "account_number": "4494" + }, + "\u00c9tat, subventions d\u2019exploitation \u00e0 recevoir": { + "account_number": "4495" + }, + "\u00c9tat, subventions d\u2019\u00e9quilibre \u00e0 recevoir": { + "account_number": "4496" + }, + "\u00c9tat, avances sur subventions": { + "account_number": "4497" + }, + "\u00c9tat, fonds r\u00e9glement\u00e9s provisionn\u00e9s": { + "account_number": "4499" + }, + "account_number": "449" + } + }, + "45-Organismes internationaux (ACTIF)": { + "Op\u00e9rations avec les organismes africains": { + "account_number": "451" + }, + "Op\u00e9rations avec les autres organismes internationaux": { + "account_number": "452" + }, + "Organismes internationaux, fonds de dotation et subventions \u00e0 recevoir": { + "Organismes internationaux, fonds de dotation \u00e0 recevoir": { + "account_number": "4581" + }, + "Organismes internationaux, subventions \u00e0 recevoir": { + "account_number": "4582" + }, + "account_number": "458" + } + }, + "46-Apporteurs, associ\u00e9s et groupe (ACTIF)": { + "461-Apporteurs, op\u00e9rations sur le capital": { + "Apporteurs, capital appel\u00e9, non vers\u00e9": { + "account_number": "4613" + }, + "Apporteurs, compte d\u2019apport, op\u00e9rations de restructuration (fusion...)": { + "account_number": "4614" + }, + "Apporteurs, titres \u00e0 \u00e9changer": { + "account_number": "4618" + } + }, + "Apporteurs, restant d\u00fb sur capital appel\u00e9": { + "account_number": "467" + } + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (ACTIF)": { + "472-Cr\u00e9ances et dettes sur titres de placement": { + "Cr\u00e9ances sur cessions de titres de placement": { + "account_number": "4721" + }, + "Versements restant \u00e0 effectuer sur titres de placement non lib\u00e9r\u00e9s": { + "account_number": "4726" + } + }, + "473-Interm\u00e9diaires Op\u00e9rations faites pour compte de tiers": { + "Mandants": { + "account_number": "4731" + }, + "Mandataires": { + "account_number": "4732" + }, + "Commettants": { + "account_number": "4733" + }, + "Commissionnaires": { + "account_number": "4734" + }, + "\u00c9tat, Collectivit\u00e9s publiques, fonds global d\u2019allocation": { + "account_number": "4739" + } + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits": { + "Compte de r\u00e9partition p\u00e9riodique des produits": { + "account_number": "4747" + } + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA": { + "Compte actif": { + "account_type": "Temporary", + "account_number": "4751" + } + }, + "Charges constat\u00e9es d\u2019avance": { + "account_number": "476" + }, + "478-\u00c9carts de conversion actif": { + "Diminution des cr\u00e9ances d\u2019exploitation": { + "account_number": "4781" + }, + "Diminution des cr\u00e9ances financi\u00e8res": { + "account_number": "4782" + }, + "Augmentation des dettes d\u2019exploitation": { + "account_number": "4783" + }, + "Augmentation des dettes financi\u00e8res": { + "account_number": "4784" + }, + "Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": { + "account_number": "4786" + }, + "Diff\u00e9rences compens\u00e9es par couverture de change": { + "account_number": "4788" + } + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (ACTIF)": { + "Cr\u00e9ances sur cessions d\u2019immobilisations": { + "En compte, immobilisations incorporelles": { + "account_number": "4851" + }, + "En compte, immobilisations corporelles": { + "account_number": "4852" + }, + "Effets \u00e0 recevoir, immobilisations incorporelles": { + "account_number": "4853" + }, + "Effets \u00e0 recevoir, immobilisations corporelles": { + "account_number": "4854" + }, + "Effets escompt\u00e9s non \u00e9chus": { + "account_number": "4855" + }, + "Retenues de garantie": { + "account_number": "4857" + }, + "Factures \u00e0 \u00e9tablir": { + "account_number": "4858" + }, + "account_number": "485" + }, + "Autres cr\u00e9ances hors activit\u00e9s ordinaires (HAO)": { + "account_number": "488" + } + }, + "49-D\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme (tiers) (ACTIF)": { + "D\u00e9pr\u00e9ciations des comptes clients": { + "Cr\u00e9ances litigieuses": { + "account_number": "4911" + }, + "Cr\u00e9ances douteuses": { + "account_number": "4912" + }, + "account_number": "491" + }, + "D\u00e9pr\u00e9ciations des comptes organismes internationaux": { + "account_number": "495" + }, + "D\u00e9pr\u00e9ciations des comptes apporteurs, associ\u00e9s et groupe": { + "Associ\u00e9s, comptes courants": { + "account_number": "4962" + }, + "Associ\u00e9s, op\u00e9rations faites en commun": { + "account_number": "4963" + }, + "Groupe, comptes courants": { + "account_number": "4966" + }, + "account_number": "496" + }, + "D\u00e9pr\u00e9ciations des comptes d\u00e9biteurs divers": { + "account_number": "497" + }, + "D\u00e9pr\u00e9ciations des comptes de cr\u00e9ances HAO": { + "Cr\u00e9ances sur cessions d\u2019immobilisations": { + "account_number": "4985" + }, + "Cr\u00e9ances sur cessions de titres de placement": { + "account_number": "4986" + }, + "Autres cr\u00e9ances HAO": { + "account_number": "4988" + }, + "account_number": "498" + }, + "Provisions pour risques \u00e0 court terme": { + "Sur op\u00e9rations d\u2019exploitation": { + "account_number": "4991" + }, + "Sur op\u00e9rations financi\u00e8res": { + "account_number": "4997" + }, + "Sur op\u00e9rations HAO": { + "account_number": "4998" + }, + "account_number": "499" + } + }, + "root_type": "Asset" + }, + "4-Comptes de Tiers (PASSIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (PASSIF)": { + "Fournisseurs, dettes en compte": { + "Fournisseurs": { + "account_type": "Payable", + "account_number": "4011" + }, + "Fournisseurs groupe": { + "account_type": "Payable", + "account_number": "4012" + }, + "Fournisseurs sous-traitants": { + "account_type": "Payable", + "account_number": "4013" + }, + "Fournisseurs, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Payable", + "account_number": "4016" + }, + "Fournisseur, retenues de garantie": { + "account_type": "Payable", + "account_number": "4017" + }, + "account_type": "Payable", + "account_number": "401" + }, + "Fournisseurs, effets \u00e0 payer": { + "Fournisseurs Effets \u00e0 payer": { + "account_type": "Payable", + "account_number": "4021" + }, + "Fournisseurs Groupe, effets \u00e0 payer": { + "account_type": "Payable", + "account_number": "4022" + }, + "Fournisseurs Sous-traitants, effets \u00e0 payer": { + "account_type": "Payable", + "account_number": "4023" + }, + "account_type": "Payable", + "account_number": "402" + }, + "Fournisseurs, acquisitions courantes d\u2019immobilisations": { + "Fournisseurs Dettes en comptes, immobilisations incorporelles": { + "account_type": "Payable", + "account_number": "4041" + }, + "Fournisseurs Dettes en comptes, immobilisations corporelles": { + "account_type": "Payable", + "account_number": "4042" + }, + "Fournisseurs Effets \u00e0 payer, immobilisations incorporelles": { + "account_type": "Payable", + "account_number": "4046" + }, + "Fournisseurs Effets \u00e0 payer, immobilisations corporelles": { + "account_type": "Payable", + "account_number": "4047" + }, + "account_type": "Payable", + "account_number": "404" + }, + "Fournisseurs, factures non parvenues": { + "Fournisseurs": { + "account_type": "Stock Received But Not Billed", + "account_number": "4081" + }, + "Fournisseurs groupe": { + "account_type": "Stock Received But Not Billed", + "account_number": "4082" + }, + "Fournisseurs sous-traitants": { + "account_type": "Stock Received But Not Billed", + "account_number": "4083" + }, + "Fournisseurs, int\u00e9r\u00eats courus": { + "account_type": "Stock Received But Not Billed", + "account_number": "4086" + }, + "account_type": "Stock Received But Not Billed", + "account_number": "408" + }, + "account_type": "Payable" + }, + "41-Clients et comptes rattach\u00e9s (PASSIF)": { + "Clients cr\u00e9diteurs": { + "Clients, avances et acomptes re\u00e7us": { + "account_number": "4191" + }, + "Clients groupe, avances et acomptes re\u00e7us": { + "account_number": "4192" + }, + "Clients, dettes pour emballages et mat\u00e9riels consign\u00e9s": { + "account_number": "4194" + }, + "Clients, rabais, remises, ristournes et autres avoirs \u00e0 accorder": { + "account_number": "4198" + }, + "account_number": "419" + } + }, + "42-Personnel (PASSIF)": { + "Personnel, r\u00e9mun\u00e9rations dues": { + "account_number": "422" + }, + "Personnel, oppositions, saisies-arr\u00eats": { + "Personnel, oppositions": { + "account_number": "4231" + }, + "Personnel, saisies-arr\u00eats": { + "account_number": "4232" + }, + "Personnel, avis \u00e0 tiers d\u00e9tenteur": { + "account_number": "4233" + }, + "account_number": "423" + }, + "Personnel, \u0153uvres sociales internes": { + "Assistance m\u00e9dicale": { + "account_number": "4241" + }, + "Allocations familiales": { + "account_number": "4242" + }, + "Organismes sociaux rattach\u00e9s \u00e0 l\u2019entit\u00e9": { + "account_number": "4245" + }, + "Autres \u0153uvres sociales internes": { + "account_number": "4248" + }, + "account_number": "424" + }, + "Repr\u00e9sentants du personnel": { + "D\u00e9l\u00e9gu\u00e9s du personnel": { + "account_number": "4251" + }, + "Syndicats et Comit\u00e9s d\u2019entreprises, d\u2019\u00c9tablissement": { + "account_number": "4252" + }, + "Autres repr\u00e9sentants du personnel": { + "account_number": "4258" + }, + "account_number": "425" + }, + "Personnel, participation aux b\u00e9n\u00e9fices et au capital": { + "Participation aux b\u00e9n\u00e9fices": { + "account_number": "4261" + }, + "Participation au capital": { + "account_number": "4264" + }, + "account_number": "426" + }, + "Personnel d\u00e9p\u00f4ts": { + "account_number": "427" + }, + "Personnel, charges \u00e0 payer et produits \u00e0 recevoir": { + "Dettes provisionn\u00e9es pour cong\u00e9s \u00e0 payer": { + "account_number": "4281" + }, + "Autres charges \u00e0 payer": { + "account_number": "4286" + }, + "Produits \u00e0 recevoir": { + "account_number": "4287" + }, + "account_number": "428" + } + }, + "43-Organismes sociaux (PASSIF)": { + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "Charges sociales sur gratifications \u00e0 payer": { + "account_number": "4381" + }, + "Charges sociales sur cong\u00e9s \u00e0 payer": { + "account_number": "4382" + }, + "Autres charges \u00e0 payer": { + "account_number": "4386" + } + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (PASSIF)": { + "\u00c9tat, imp\u00f4t sur les b\u00e9n\u00e9fices": { + "account_number": "441" + }, + "\u00c9tat, autres imp\u00f4ts et taxes": { + "Imp\u00f4ts et taxes d\u2019\u00c9tat": { + "account_number": "4421" + }, + "Imp\u00f4ts et taxes pour les collectivit\u00e9s publiques": { + "account_number": "4422" + }, + "Imp\u00f4ts et taxes recouvrables sur des obligataires": { + "account_number": "4423" + }, + "Imp\u00f4ts et taxes recouvrables sur des associ\u00e9s": { + "account_number": "4424" + }, + "Droits de douane": { + "account_number": "4426" + }, + "Autres imp\u00f4ts et taxes": { + "account_number": "4428" + }, + "account_number": "442" + }, + "\u00c9tat, TVA due ou cr\u00e9dit de TVA": { + "\u00c9tat, TVA due": { + "account_number": "4441" + }, + "\u00c9tat, cr\u00e9dit de TVA \u00e0 reporter": { + "account_number": "4449" + }, + "account_number": "444" + }, + "\u00c9tat, autres taxes sur le chiffre d\u2019affaires": { + "account_number": "446" + }, + "\u00c9tat, imp\u00f4ts retenus \u00e0 la source": { + "Imp\u00f4t G\u00e9n\u00e9ral sur le revenu": { + "account_number": "4471" + }, + "Imp\u00f4ts sur salaires": { + "account_number": "4472" + }, + "Contribution nationale": { + "account_number": "4473" + }, + "Contribution nationale de solidarit\u00e9": { + "account_number": "4474" + }, + "Autres imp\u00f4ts et contributions": { + "account_number": "4478" + }, + "account_number": "447" + } + }, + "46-Apporteurs, associ\u00e9s et groupe (PASSIF)": { + "461-Apporteurs, op\u00e9rations sur le capital (PASSIF)": { + "Apporteurs, apports en nature": { + "account_number": "4611" + }, + "Apporteurs, apports en num\u00e9raire": { + "account_number": "4612" + }, + "Apporteurs, versements re\u00e7us sur augmentation de capital": { + "account_number": "4615" + }, + "Apporteurs, versements anticip\u00e9s": { + "account_number": "4616" + }, + "Apporteurs d\u00e9faillants": { + "account_number": "4617" + }, + "Apporteurs, capital \u00e0 rembourser": { + "account_number": "4619" + } + }, + "462-Associ\u00e9s, comptes courants": { + "Principal": { + "account_number": "4621" + }, + "Int\u00e9r\u00eats courus": { + "account_number": "4626" + } + }, + "463-Associ\u00e9s, op\u00e9rations faites en commun et GIE": { + "Op\u00e9rations courantes": { + "account_number": "4631" + }, + "Int\u00e9r\u00eats courus": { + "account_number": "4636" + } + }, + "Associ\u00e9s, dividendes \u00e0 payer": { + "account_number": "465" + }, + "Groupe, comptes courants": { + "account_number": "466" + } + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (PASSIF)": { + "471-D\u00e9biteurs et cr\u00e9diteurs divers": { + "D\u00e9biteurs divers": { + "account_number": "4711" + }, + "Cr\u00e9diteurs divers": { + "account_number": "4712" + }, + "Obligataires": { + "account_number": "4713" + }, + "R\u00e9mun\u00e9rations d\u2019administrateurs": { + "account_number": "4715" + }, + "Compte d\u2019affacturage": { + "account_number": "4716" + }, + "D\u00e9biteurs divers retenues de garantie": { + "account_number": "4717" + }, + "Apport, compte de fusion et op\u00e9rations assimil\u00e9es": { + "account_number": "4718" + }, + "Bons de souscription d\u2019actions et d\u2019obligations": { + "account_number": "4719" + } + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits (PASSIF)": { + "Compte de r\u00e9partition p\u00e9riodique des charges": { + "account_number": "4746" + } + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA (PASSIF)": { + "Compte passif": { + "account_number": "4752" + } + }, + "Produits constat\u00e9s d\u2019avance": { + "account_number": "477" + }, + "479-\u00c9carts de conversion passif": { + "Augmentation des cr\u00e9ances d\u2019exploitation": { + "account_number": "4791" + }, + "Augmentation des cr\u00e9ances financi\u00e8res": { + "account_number": "4792" + }, + "Diminution des dettes d\u2019exploitation": { + "account_number": "4793" + }, + "Diminution des dettes financi\u00e8res": { + "account_number": "4794" + }, + "Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": { + "account_number": "4797" + }, + "Diff\u00e9rences compens\u00e9es par couverture de change": { + "account_number": "4798" + } + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (HAO) (PASSIF)": { + "Fournisseurs d\u2019investissements": { + "Immobilisations incorporelles": { + "account_number": "4811" + }, + "Immobilisations corporelles": { + "account_number": "4812" + }, + "Versements restant \u00e0 effectuer sur titres de participation et titres immobilis\u00e9s non lib\u00e9r\u00e9s": { + "account_number": "4813" + }, + "R\u00e9serve de propri\u00e9t\u00e9": { + "account_number": "4816" + }, + "Retenues de garantie": { + "account_number": "4817" + }, + "Factures non parvenues": { + "account_number": "4818" + }, + "account_number": "481" + }, + "Fournisseurs d\u2019investissements, effets \u00e0 payer": { + "Immobilisations incorporelles": { + "account_number": "4821" + }, + "Immobilisations corporelles": { + "account_number": "4822" + }, + "account_number": "482" + }, + "Autres dettes hors activit\u00e9s ordinaires (HAO)": { + "Produits": { + "account_number": "4887" + }, + "account_number": "484" + } + }, + "root_type": "Liability" + }, + "Comptes de tr\u00e9sorerie": { + "Titres de placement": { + "Titres du tr\u00e9sor et bons de caisse \u00e0 court terme": { + "Titres du Tr\u00e9sor \u00e0 court terme": { + "account_number": "5011" + }, + "Titres d\u2019organismes financiers": { + "account_number": "5012" + }, + "Bons de caisse \u00e0 court terme": { + "account_number": "5013" + }, + "Frais d\u2019acquisition des titres de tr\u00e9sor et bons de caisse": { + "account_number": "5016" + }, + "account_number": "501" + }, + "Actions": { + "Actions ou parts propres": { + "account_number": "5021" + }, + "Actions cot\u00e9es": { + "account_number": "5022" + }, + "Actions non cot\u00e9es": { + "account_number": "5023" + }, + "Actions d\u00e9membr\u00e9es (certificats d\u2019investissement, droits de vote)": { + "account_number": "5024" + }, + "Autres actions": { + "account_number": "5025" + }, + "Frais d\u2019acquisition des actions": { + "account_number": "5026" + }, + "account_number": "502" + }, + "Obligations": { + "Obligations \u00e9mises par la soci\u00e9t\u00e9 et rachet\u00e9es par elle": { + "account_number": "5031" + }, + "Obligations cot\u00e9es": { + "account_number": "5032" + }, + "Obligations non cot\u00e9es": { + "account_number": "5033" + }, + "Autres obligations": { + "account_number": "5035" + }, + "Frais d\u2019acquisition des obligations": { + "account_number": "5036" + }, + "account_number": "503" + }, + "Bons de souscription": { + "Bons de souscription d\u2019actions": { + "account_number": "5042" + }, + "Bons de souscription d\u2019obligations": { + "account_number": "5043" + }, + "account_number": "504" + }, + "Titres n\u00e9gociables hors r\u00e9gion": { + "account_number": "505" + }, + "Int\u00e9r\u00eats courus": { + "Titres du Tr\u00e9sor et bons de caisse \u00e0 court terme": { + "account_number": "5061" + }, + "Actions": { + "account_number": "5062" + }, + "Obligations": { + "account_number": "5063" + }, + "account_number": "506" + }, + "Autres titres de placement et cr\u00e9ances assimil\u00e9es": { + "account_number": "508" + }, + "account_number": "50" + }, + "Valeurs \u00e0 encaisser": { + "Effets \u00e0 encaisser": { + "account_number": "511" + }, + "Effets \u00e0 l\u2019encaissement": { + "account_number": "512" + }, + "Ch\u00e8ques \u00e0 encaisser": { + "account_number": "513" + }, + "Ch\u00e8ques \u00e0 l\u2019encaissement": { + "account_number": "514" + }, + "Cartes de cr\u00e9dit \u00e0 encaisser": { + "account_number": "515" + }, + "Autres valeurs \u00e0 l\u2019encaissement": { + "Warrants": { + "account_number": "5181" + }, + "Billets de fonds": { + "account_number": "5182" + }, + "Ch\u00e8ques de voyage": { + "account_number": "5185" + }, + "Coupons \u00e9chus": { + "account_number": "5186" + }, + "Int\u00e9r\u00eats \u00e9chus des obligations": { + "account_number": "5187" + }, + "account_number": "518" + }, + "account_number": "51" + }, + "Banques": { + "Banques locales": { + "Banques en monnaie nationale": { + "account_type": "Bank", + "account_number": "5211" + }, + "Banques en devises": { + "account_type": "Bank", + "account_number": "5215" + }, + "account_type": "Bank", + "account_number": "521" + }, + "Banques autres \u00c9tats r\u00e9gion": { + "account_number": "522" + }, + "Banques autres \u00c9tats zone mon\u00e9taire": { + "account_number": "523" + }, + "Banques hors zone mon\u00e9taire": { + "account_number": "524" + }, + "Banques d\u00e9p\u00f4t \u00e0 terme": { + "account_number": "525" + }, + "Banques, int\u00e9r\u00eats courus": { + "Banque, int\u00e9r\u00eats courus, charges \u00e0 payer": { + "account_number": "5261" + }, + "Banque, int\u00e9r\u00eats courus, produits \u00e0 recevoir": { + "account_number": "5267" + }, + "account_number": "526" + }, + "account_number": "52" + }, + "\u00c9tablissements financiers et assimil\u00e9s": { + "Ch\u00e8ques postaux": { + "account_number": "531" + }, + "Tr\u00e9sor": { + "account_number": "532" + }, + "Soci\u00e9t\u00e9s de gestion et d\u2019interm\u00e9diation (SGI)": { + "account_number": "533" + }, + "\u00c9tablissements financiers, int\u00e9r\u00eats courus": { + "account_number": "536" + }, + "Autres organismes financiers": { + "account_number": "538" + }, + "account_number": "53" + }, + "Instruments de tr\u00e9sorerie": { + "Options de taux d\u2019int\u00e9r\u00eat": { + "account_number": "541" + }, + "Options de taux de change": { + "account_number": "542" + }, + "Options de taux boursiers": { + "account_number": "543" + }, + "Instruments de march\u00e9s \u00e0 terme": { + "account_number": "544" + }, + "Avoirs d\u2019or et autres m\u00e9taux pr\u00e9cieux": { + "account_number": "545" + }, + "account_number": "54" + }, + "Instruments de monnaie \u00e9lectronique": { + "Monnaie \u00e9lectronique carte carburant": { + "account_number": "551" + }, + "Monnaie \u00e9lectronique t\u00e9l\u00e9phone portable": { + "account_number": "552" + }, + "Monnaie \u00e9lectronique carte p\u00e9age": { + "account_number": "553" + }, + "Porte-monnaie \u00e9lectronique": { + "account_number": "554" + }, + "Autres instruments de monnaies \u00e9lectroniques": { + "account_number": "558" + }, + "account_number": "55" + }, + "Banques, cr\u00e9dits de tr\u00e9sorerie et d\u2019escompte": { + "Cr\u00e9dits de tr\u00e9sorerie": { + "account_number": "561" + }, + "Escompte de cr\u00e9dits de campagne": { + "account_number": "564" + }, + "Escompte de cr\u00e9dits ordinaires": { + "account_number": "565" + }, + "Banques, cr\u00e9dits de tr\u00e9sorerie, int\u00e9r\u00eats courus": { + "account_number": "566" + }, + "account_number": "56" + }, + "Caisse": { + "Caisse si\u00e8ge social": { + "Caisse en monnaie nationale": { + "account_number": "5711" + }, + "Caisse en devises": { + "account_number": "5712" + }, + "account_number": "571" + }, + "Caisse succursale A": { + "En monnaie nationale": { + "account_number": "5721" + }, + "En devises": { + "account_number": "5722" + }, + "account_number": "572" + }, + "Caisse succursale B": { + "En monnaie nationale": { + "account_number": "5731" + }, + "En devises": { + "account_number": "5732" + }, + "account_number": "573" + }, + "account_number": "57" + }, + "R\u00e9gies d\u2019avances, accr\u00e9ditifs et virements internes": { + "R\u00e9gies d\u2019avance": { + "account_number": "581" + }, + "Accr\u00e9ditifs": { + "account_number": "582" + }, + "Virements de fonds": { + "account_number": "585" + }, + "Autres virements internes": { + "account_number": "588" + }, + "account_number": "58" + }, + "D\u00e9pr\u00e9ciations et provisions pour risque \u00e0 court terme": { + "D\u00e9pr\u00e9ciations des titres de placement": { + "account_number": "590" + }, + "D\u00e9pr\u00e9ciations des titres et valeurs \u00e0 encaisser": { + "account_number": "591" + }, + "D\u00e9pr\u00e9ciations des comptes banques": { + "account_number": "592" + }, + "D\u00e9pr\u00e9ciations des comptes \u00e9tablissements financiers et assimil\u00e9s": { + "account_number": "593" + }, + "D\u00e9pr\u00e9ciations des comptes d\u2019instruments de tr\u00e9sorerie": { + "account_number": "594" + }, + "Provisions pour risque \u00e0 court terme \u00e0 caract\u00e8re financier": { + "account_number": "599" + }, + "account_number": "59" + }, + "root_type": "Asset", + "account_number": "5" + }, + "Comptes de charges des activit\u00e9s ordinaires": { + "Achats et variations de stocks": { + "Achats de marchandises": { + "Dans la R\u00e9gion": { + "account_number": "6011" + }, + "Hors R\u00e9gion": { + "account_number": "6012" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "6013" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "6014" + }, + "Frais sur achats": { + "account_number": "6015" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6019" + }, + "account_number": "601" + }, + "Achats de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "Dans la R\u00e9gion": { + "account_number": "6021" + }, + "Hors R\u00e9gion": { + "account_number": "6022" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "6023" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "6024" + }, + "Frais sur achats": { + "account_number": "6025" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6029" + }, + "account_number": "602" + }, + "Variations des stocks de biens achet\u00e9s": { + "Variations des stocks de marchandises": { + "account_number": "6031" + }, + "Variations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "account_number": "6032" + }, + "Variations des stocks d\u2019autres approvisionnements": { + "account_number": "6033" + }, + "account_number": "603" + }, + "Achats stock\u00e9s de mati\u00e8res et fournitures consommables": { + "Mati\u00e8res consommables": { + "account_number": "6041" + }, + "Mati\u00e8res combustibles": { + "account_number": "6042" + }, + "Produits d\u2019entretien": { + "account_number": "6043" + }, + "Fournitures d\u2019atelier et d\u2019usine": { + "account_number": "6044" + }, + "Frais sur achat": { + "account_number": "6045" + }, + "Fournitures de magasin": { + "account_number": "6046" + }, + "Fournitures de bureau": { + "account_number": "6047" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6049" + }, + "account_number": "604" + }, + "Autres achats": { + "Fournitures non stockables Eau": { + "account_number": "6051" + }, + "Fournitures non stockables \u00c9lectricit\u00e9": { + "account_number": "6052" + }, + "Fournitures non stockables Autres \u00e9nergies": { + "account_number": "6053" + }, + "Fournitures d\u2019entretien non stockables": { + "account_number": "6054" + }, + "Fournitures de bureau non stockables": { + "account_number": "6055" + }, + "Achats de petit mat\u00e9riel et outillage": { + "account_number": "6056" + }, + "Achats d\u2019\u00e9tudes et prestations de services": { + "account_number": "6057" + }, + "Achats de travaux, mat\u00e9riels et \u00e9quipements": { + "account_number": "6058" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6059" + }, + "account_number": "605" + }, + "Achats d\u2019emballages": { + "Emballages perdus": { + "account_number": "6081" + }, + "Emballages r\u00e9cup\u00e9rables non identifiables": { + "account_number": "6082" + }, + "Emballages \u00e0 usage mixte": { + "account_number": "6083" + }, + "Frais sur achats": { + "account_number": "6085" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6089" + }, + "account_number": "608" + }, + "account_number": "60" + }, + "Transports": { + "Transports sur ventes": { + "account_number": "612" + }, + "Transports pour le compte de tiers": { + "account_number": "613" + }, + "Transports du personnel": { + "account_number": "614" + }, + "Transports de plis": { + "account_number": "616" + }, + "Autres frais de transport": { + "Voyages et d\u00e9placements": { + "account_number": "6181" + }, + "Transports entre \u00e9tablissements ou chantiers": { + "account_number": "6182" + }, + "Transports administratifs": { + "account_number": "6183" + }, + "account_number": "618" + }, + "account_number": "61" + }, + "Services ext\u00e9rieurs": { + "Sous-traitance g\u00e9n\u00e9rale": { + "account_number": "621" + }, + "Locations, charges locatives": { + "Locations de terrains": { + "account_number": "6221" + }, + "Locations de b\u00e2timents": { + "account_number": "6222" + }, + "Locations de mat\u00e9riels et outillages": { + "account_number": "6223" + }, + "Malis sur emballages": { + "account_number": "6224" + }, + "Locations d\u2019emballages": { + "account_number": "6225" + }, + "Fermages et loyers du foncier": { + "account_number": "6226" + }, + "Locations et charges locatives diverses": { + "account_number": "6228" + }, + "account_number": "622" + }, + "Redevances de location acquisition": { + "Cr\u00e9dit-bail immobilier": { + "account_number": "6232" + }, + "Cr\u00e9dit-bail mobilier": { + "account_number": "6233" + }, + "Location-vente": { + "account_number": "6234" + }, + "Autres contrats de location acquisition": { + "account_number": "6238" + }, + "account_number": "623" + }, + "Entretien, r\u00e9parations, remise en \u00e9tat et maintenance": { + "Entretien et r\u00e9parations des biens immobiliers": { + "account_number": "6241" + }, + "Entretien et r\u00e9parations des biens mobiliers": { + "account_number": "6242" + }, + "Maintenance": { + "account_number": "6243" + }, + "Charges de d\u00e9mant\u00e8lement et remise en \u00e9tat": { + "account_number": "6244" + }, + "Autres entretiens et r\u00e9parations": { + "account_number": "6248" + }, + "account_number": "624" + }, + "Primes d\u2019assurance": { + "Assurances multirisques": { + "account_number": "6251" + }, + "Assurances mat\u00e9riel de transport": { + "account_number": "6252" + }, + "Assurances risques d\u2019exploitation": { + "account_number": "6253" + }, + "Assurances responsabilit\u00e9 du producteur": { + "account_number": "6254" + }, + "Assurances insolvabilit\u00e9 clients": { + "account_number": "6255" + }, + "Assurances transport sur ventes": { + "account_number": "6257" + }, + "Autres primes d\u2019assurances": { + "account_number": "6258" + }, + "account_number": "625" + }, + "\u00c9tudes, recherches et documentation": { + "\u00c9tudes et recherches": { + "account_number": "6261" + }, + "Documentation g\u00e9n\u00e9rale": { + "account_number": "6265" + }, + "Documentation technique": { + "account_number": "6266" + }, + "account_number": "626" + }, + "Publicit\u00e9, publications, relations publiques": { + "Annonces, insertions": { + "account_number": "6271" + }, + "Catalogues, imprim\u00e9s publicitaires": { + "account_number": "6272" + }, + "\u00c9chantillons": { + "account_number": "6273" + }, + "Foires et expositions": { + "account_number": "6274" + }, + "Publications": { + "account_number": "6275" + }, + "Cadeaux \u00e0 la client\u00e8le": { + "account_number": "6276" + }, + "Frais de colloques, s\u00e9minaires, conf\u00e9rences": { + "account_number": "6277" + }, + "Autres charges de publicit\u00e9 et relations publiques": { + "account_number": "6278" + }, + "account_number": "627" + }, + "Frais de t\u00e9l\u00e9communications": { + "Frais de t\u00e9l\u00e9phone": { + "account_number": "6281" + }, + "Frais de t\u00e9lex": { + "account_number": "6282" + }, + "Frais de t\u00e9l\u00e9copie": { + "account_number": "6283" + }, + "Autres frais de t\u00e9l\u00e9communications": { + "account_number": "6288" + }, + "account_number": "628" + }, + "account_number": "62" + }, + "Autres services ext\u00e9rieurs": { + "Frais bancaires": { + "Frais sur titres (vente, garde)": { + "account_number": "6311" + }, + "Frais sur effets": { + "account_number": "6312" + }, + "Location de coffres": { + "account_number": "6313" + }, + "Commissions d\u2019affacturage": { + "account_number": "6314" + }, + "Commissions sur cartes de cr\u00e9dit": { + "account_number": "6315" + }, + "Frais d\u2019\u00e9mission d\u2019emprunts": { + "account_number": "6316" + }, + "Frais sur instruments monnaie \u00e9lectronique": { + "account_number": "6317" + }, + "Autres frais bancaires": { + "account_number": "6318" + }, + "account_number": "631" + }, + "R\u00e9mun\u00e9rations d\u2019interm\u00e9diaires et de conseils": { + "Commissions et courtages sur ventes": { + "account_number": "6322" + }, + "Honoraires des professions r\u00e9glement\u00e9es": { + "account_number": "6324" + }, + "Frais d\u2019actes et de contentieux": { + "account_number": "6325" + }, + "R\u00e9mun\u00e9rations d\u2019affacturage": { + "account_number": "6326" + }, + "R\u00e9mun\u00e9rations des autres prestataires de services": { + "account_number": "6327" + }, + "Divers frais": { + "account_number": "6328" + }, + "account_number": "632" + }, + "Frais de formation du personnel": { + "account_number": "633" + }, + "Redevances pour brevets, licences, logiciels, concessions et droits et valeurs similaires": { + "Redevances pour brevets, licences": { + "account_number": "6342" + }, + "Redevances pour logiciels": { + "account_number": "6343" + }, + "Redevances pour marques": { + "account_number": "6344" + }, + "Redevances pour sites internet": { + "account_number": "6345" + }, + "Redevances pour concessions, droits et valeurs similaires": { + "account_number": "6346" + }, + "account_number": "634" + }, + "Cotisations": { + "Cotisations": { + "account_number": "6351" + }, + "Concours divers": { + "account_number": "6358" + }, + "account_number": "635" + }, + "R\u00e9mun\u00e9rations de personnel ext\u00e9rieur \u00e0 l\u2019entit\u00e9": { + "Personnel int\u00e9rimaire": { + "account_number": "6371" + }, + "Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": { + "account_number": "6372" + }, + "account_number": "637" + }, + "Autres charges externes": { + "Frais de recrutement du personnel": { + "account_number": "6381" + }, + "Frais de d\u00e9m\u00e9nagement": { + "account_number": "6382" + }, + "R\u00e9ceptions": { + "account_number": "6383" + }, + "Missions": { + "account_number": "6384" + }, + "Charges de copropri\u00e9t\u00e9": { + "account_number": "6385" + }, + "account_number": "638" + }, + "account_number": "63" + }, + "Imp\u00f4ts et taxes": { + "Imp\u00f4ts et taxes directs": { + "Imp\u00f4ts fonciers et taxes annexes": { + "account_number": "6411" + }, + "Patentes, licences et taxes annexes": { + "account_number": "6412" + }, + "Taxes sur appointements et salaires": { + "account_number": "6413" + }, + "Taxes d\u2019apprentissage": { + "account_number": "6414" + }, + "Formation professionnelle continue": { + "account_number": "6415" + }, + "Autres imp\u00f4ts et taxes directs": { + "account_number": "6418" + }, + "account_number": "641" + }, + "Imp\u00f4ts et taxes indirects": { + "account_number": "645" + }, + "Droits d\u2019enregistrement": { + "Droits de mutation": { + "account_number": "6461" + }, + "Droits de timbre": { + "account_number": "6462" + }, + "Taxes sur les v\u00e9hicules de soci\u00e9t\u00e9": { + "account_number": "6463" + }, + "Vignettes": { + "account_number": "6464" + }, + "Autres droits": { + "account_number": "6468" + }, + "account_number": "646" + }, + "P\u00e9nalit\u00e9s, amendes fiscales": { + "P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts directs": { + "account_number": "6471" + }, + "P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts indirects": { + "account_number": "6472" + }, + "P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts directs": { + "account_number": "6473" + }, + "P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts indirects": { + "account_number": "6474" + }, + "Autres p\u00e9nalit\u00e9s et amendes fiscales": { + "account_number": "6478" + }, + "account_number": "647" + }, + "Autres imp\u00f4ts et taxes": { + "account_number": "648" + }, + "account_number": "64" + }, + "Autres charges": { + "Pertes sur cr\u00e9ances clients et autres d\u00e9biteurs": { + "Clients": { + "account_number": "6511" + }, + "Autres d\u00e9biteurs": { + "account_number": "6515" + }, + "account_number": "651" + }, + "Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "Quote-part transf\u00e9r\u00e9e de b\u00e9n\u00e9fices (comptabilit\u00e9 du g\u00e9rant)": { + "account_number": "6521" + }, + "Pertes imput\u00e9es par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": { + "account_number": "6525" + }, + "account_number": "652" + }, + "Valeurs comptables des cessions courantes d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "6541" + }, + "Immobilisations corporelles": { + "account_number": "6542" + }, + "account_number": "654" + }, + "Perte de change sur cr\u00e9ances et dettes commerciale": { + "account_number": "656" + }, + "P\u00e9nalit\u00e9s et amendes p\u00e9nales": { + "account_number": "657" + }, + "Charges diverses": { + "Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": { + "account_number": "6581" + }, + "Dons": { + "account_number": "6582" + }, + "M\u00e9c\u00e9nat": { + "account_number": "6583" + }, + "Autres charges diverses": { + "account_number": "6588" + }, + "account_number": "658" + }, + "Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "Sur risques \u00e0 court terme": { + "account_number": "6591" + }, + "Sur stocks": { + "account_number": "6593" + }, + "Sur cr\u00e9ances": { + "account_number": "6594" + }, + "Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme": { + "account_number": "6598" + }, + "account_number": "659" + }, + "account_number": "65" + }, + "Charges de personnel": { + "R\u00e9mun\u00e9rations directes vers\u00e9es au personnel national": { + "Appointements salaires et commissions": { + "account_number": "6611" + }, + "Primes et gratifications": { + "account_number": "6612" + }, + "Cong\u00e9s pay\u00e9s": { + "account_number": "6613" + }, + "Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": { + "account_number": "6614" + }, + "Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": { + "account_number": "6615" + }, + "Suppl\u00e9ment familial": { + "account_number": "6616" + }, + "Avantages en nature": { + "account_number": "6617" + }, + "Autres r\u00e9mun\u00e9rations directes": { + "account_number": "6618" + }, + "account_number": "661" + }, + "R\u00e9mun\u00e9rations directes vers\u00e9es au personnel non national": { + "Appointements salaires et commissions": { + "account_number": "6621" + }, + "Primes et gratifications": { + "account_number": "6622" + }, + "Cong\u00e9s pay\u00e9s": { + "account_number": "6623" + }, + "Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": { + "account_number": "6624" + }, + "Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": { + "account_number": "6625" + }, + "Suppl\u00e9ment familial": { + "account_number": "6626" + }, + "Avantages en nature": { + "account_number": "6627" + }, + "Autres r\u00e9mun\u00e9rations directes": { + "account_number": "6628" + }, + "account_number": "662" + }, + "Indemnit\u00e9s forfaitaires vers\u00e9es au personnel": { + "Indemnit\u00e9s de logement": { + "account_number": "6631" + }, + "Indemnit\u00e9s de repr\u00e9sentation": { + "account_number": "6632" + }, + "Indemnit\u00e9s d\u2019expatriation": { + "account_number": "6633" + }, + "Indemnit\u00e9s de transport": { + "account_number": "6634" + }, + "Autres indemnit\u00e9s et avantages divers": { + "account_number": "6638" + }, + "account_number": "663" + }, + "Charges sociales": { + "Charges sociales sur r\u00e9mun\u00e9ration du personnel national": { + "account_number": "6641" + }, + "Charges sociales sur r\u00e9mun\u00e9ration du personnel non national": { + "account_number": "6642" + }, + "account_number": "664" + }, + "R\u00e9mun\u00e9rations et charges sociales de l\u2019exploitant individuel": { + "R\u00e9mun\u00e9ration du travail de l\u2019exploitant": { + "account_number": "6661" + }, + "Charges sociales": { + "account_number": "6662" + }, + "account_number": "666" + }, + "R\u00e9mun\u00e9ration transf\u00e9r\u00e9e de personnel ext\u00e9rieur": { + "Personnel int\u00e9rimaire": { + "account_number": "6671" + }, + "Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": { + "account_number": "6672" + }, + "account_number": "667" + }, + "Autres charges sociales": { + "Versements aux syndicats et comit\u00e9s d\u2019entreprise, d\u2019\u00e9tablissement": { + "account_number": "6681" + }, + "Versements aux comit\u00e9s d\u2019hygi\u00e8ne et de s\u00e9curit\u00e9": { + "account_number": "6682" + }, + "Versements et contributions aux autres \u0153uvres sociales": { + "account_number": "6683" + }, + "M\u00e9decine du travail et pharmacie": { + "account_number": "6684" + }, + "Assurances et organismes de sant\u00e9": { + "account_number": "6685" + }, + "Assurances retraite et fonds de pension": { + "account_number": "6686" + }, + "Majorations et p\u00e9nalit\u00e9s sociales": { + "account_number": "6687" + }, + "Charges sociales diverses": { + "account_number": "6688" + }, + "account_number": "668" + }, + "account_number": "66" + }, + "Frais financiers et charges assimil\u00e9es": { + "Int\u00e9r\u00eats des emprunts": { + "Emprunts obligataires": { + "account_number": "6711" + }, + "Emprunts aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": { + "account_number": "6712" + }, + "Dettes li\u00e9es \u00e0 des participations": { + "account_number": "6713" + }, + "Primes de remboursement des obligations": { + "account_number": "6714" + }, + "account_number": "671" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition": { + "Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail immobilier": { + "account_number": "6722" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail mobilier": { + "account_number": "6723" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition / location-vente": { + "account_number": "6724" + }, + "Int\u00e9r\u00eats dans loyers des autres locations acquisition": { + "account_number": "6728" + }, + "account_number": "672" + }, + "Escomptes accord\u00e9s": { + "account_number": "673" + }, + "Autres int\u00e9r\u00eats": { + "Avances re\u00e7ues et d\u00e9p\u00f4ts cr\u00e9diteurs": { + "account_number": "6741" + }, + "Comptes courants bloqu\u00e9s": { + "account_number": "6742" + }, + "Int\u00e9r\u00eats sur obligations cautionn\u00e9es": { + "account_number": "6743" + }, + "Int\u00e9r\u00eats sur dettes commerciales": { + "account_number": "6744" + }, + "Int\u00e9r\u00eats bancaires et sur op\u00e9rations de financement (escompte...)": { + "account_number": "6745" + }, + "Int\u00e9r\u00eats sur dettes diverses": { + "account_number": "6748" + }, + "account_number": "674" + }, + "Escomptes des effets de commerce": { + "account_number": "675" + }, + "Pertes de change financi\u00e8res": { + "account_number": "676" + }, + "Pertes sur titres de placement": { + "Pertes sur cessions de titres de placement": { + "account_number": "6771" + }, + "Mali provenant d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": { + "account_number": "6772" + }, + "account_number": "677" + }, + "Pertes et charges sur risques financiers": { + "Sur rentes viag\u00e8res": { + "account_number": "6781" + }, + "Sur op\u00e9rations financi\u00e8res": { + "account_number": "6782" + }, + "Sur instruments de tr\u00e9sorerie": { + "account_number": "6784" + }, + "account_number": "678" + }, + "Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "Sur risques financiers": { + "account_number": "6791" + }, + "Sur titres de placement": { + "account_number": "6795" + }, + "Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "account_number": "6798" + }, + "account_number": "679" + }, + "account_number": "67" + }, + "Dotations aux amortissements": { + "Dotations aux amortissements d\u2019exploitation": { + "Dotations aux amortissements des immobilisations incorporelles": { + "account_number": "6812" + }, + "Dotations aux amortissements des immobilisations corporelles": { + "account_number": "6813" + }, + "account_number": "681" + }, + "account_number": "68" + }, + "Dotations aux provisions et aux d\u00e9pr\u00e9ciations": { + "Dotations aux provisions et aux d\u00e9pr\u00e9ciations d\u2019exploitation": { + "Dotations aux provisions pour risques et charges": { + "account_number": "6911" + }, + "Dotations aux d\u00e9pr\u00e9ciations des immobilisations incorporelles": { + "account_number": "6913" + }, + "Dotations aux d\u00e9pr\u00e9ciations des immobilisations corporelles": { + "account_number": "6914" + }, + "account_number": "691" + }, + "Dotations aux provisions et aux d\u00e9pr\u00e9ciations financi\u00e8res": { + "Dotations aux provisions pour risques et charges": { + "account_number": "6971" + }, + "Dotations aux d\u00e9pr\u00e9ciations des immobilisations financi\u00e8res": { + "account_number": "6972" + }, + "account_number": "697" + }, + "account_number": "69" + }, + "root_type": "Expense", + "account_number": "6" + }, + "Comptes de produits des activit\u00e9s ordinaires": { + "Ventes": { + "Ventes de marchandises": { + "Dans la R\u00e9gion": { + "account_number": "7011" + }, + "Hors R\u00e9gion": { + "account_number": "7012" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7013" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7014" + }, + "Sur internet": { + "account_number": "7015" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7019" + }, + "account_number": "701" + }, + "Ventes de produits finis": { + "Dans la R\u00e9gion": { + "account_number": "7021" + }, + "Hors R\u00e9gion": { + "account_number": "7022" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7023" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7024" + }, + "Sur internet": { + "account_number": "7025" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7029" + }, + "account_number": "702" + }, + "Ventes de produits interm\u00e9diaires": { + "Dans la R\u00e9gion": { + "account_number": "7031" + }, + "Hors R\u00e9gion": { + "account_number": "7032" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7033" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7034" + }, + "Sur internet": { + "account_number": "7035" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7039" + }, + "account_number": "703" + }, + "Ventes de produits r\u00e9siduels": { + "Dans la R\u00e9gion": { + "account_number": "7041" + }, + "Hors R\u00e9gion": { + "account_number": "7042" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7043" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7044" + }, + "Sur internet": { + "account_number": "7045" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7049" + }, + "account_number": "704" + }, + "Travaux factur\u00e9s": { + "Dans la R\u00e9gion": { + "account_number": "7051" + }, + "Hors R\u00e9gion": { + "account_number": "7052" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7053" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7054" + }, + "Sur internet": { + "account_number": "7055" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7059" + }, + "account_number": "705" + }, + "Services vendus": { + "Dans la R\u00e9gion": { + "account_number": "7061" + }, + "Hors R\u00e9gion": { + "account_number": "7062" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7063" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7064" + }, + "Sur internet": { + "account_number": "7065" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7069" + }, + "account_number": "706" + }, + "Produits accessoires": { + "Ports, emballages perdus et autres frais factur\u00e9s": { + "account_number": "7071" + }, + "Commissions et courtages": { + "account_number": "7072" + }, + "Locations": { + "account_number": "7073" + }, + "Bonis sur reprises et cessions d\u2019emballages": { + "account_number": "7074" + }, + "Mise \u00e0 disposition de personnel": { + "account_number": "7075" + }, + "Redevances pour brevets, logiciels, marques et droits similaires": { + "account_number": "7076" + }, + "Services exploit\u00e9s dans l\u2019int\u00e9r\u00eat du personnel": { + "account_number": "7077" + }, + "Autres produits accessoires": { + "account_number": "7078" + }, + "account_number": "707" + }, + "account_number": "70" + }, + "Subventions d\u2019exploitation": { + "Sur produits \u00e0 l\u2019exportation": { + "account_number": "711" + }, + "Sur produits \u00e0 l\u2019importation": { + "account_number": "712" + }, + "Sur produits de p\u00e9r\u00e9quation": { + "account_number": "713" + }, + "Indemnit\u00e9s et subventions d\u2019exploitation (entit\u00e9 agricole)": { + "account_number": "714" + }, + "Autres subventions d\u2019exploitation": { + "Vers\u00e9es par l\u2019\u00c9tat et les collectivit\u00e9s publiques": { + "account_number": "7181" + }, + "Vers\u00e9es par les organismes internationaux": { + "account_number": "7182" + }, + "Vers\u00e9es par des tiers": { + "account_number": "7183" + }, + "account_number": "718" + }, + "account_number": "71" + }, + "Production immobilis\u00e9e": { + "Immobilisations incorporelles": { + "account_number": "721" + }, + "Immobilisations corporelles": { + "Immobilisations corporelles (hors actifs biologiques)": { + "account_number": "7221" + }, + "Immobilisations corporelles (actifs biologiques)": { + "account_number": "7222" + }, + "account_number": "722" + }, + "Production auto-consomm\u00e9e": { + "account_number": "724" + }, + "Immobilisations financi\u00e8res": { + "account_number": "726" + }, + "account_number": "72" + }, + "Variations des stocks de biens et de services produits": { + "Variations des stocks de produits en cours": { + "Produits en cours": { + "account_number": "7341" + }, + "Travaux en cours": { + "account_number": "7342" + }, + "account_number": "734" + }, + "Variations des en-cours de services": { + "\u00c9tudes en cours": { + "account_number": "7351" + }, + "Prestations de services en cours": { + "account_number": "7352" + }, + "account_number": "735" + }, + "Variations des stocks de produits finis": { + "account_number": "736" + }, + "Variations des stocks de produits interm\u00e9diaires et r\u00e9siduels": { + "Produits interm\u00e9diaires": { + "account_number": "7371" + }, + "Produits r\u00e9siduels": { + "account_number": "7372" + }, + "account_number": "737" + }, + "account_number": "73" + }, + "Autres produits": { + "Profits sur cr\u00e9ances clients et autres d\u00e9biteurs": { + "account_number": "751" + }, + "Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "Quote-part transf\u00e9r\u00e9e de pertes (comptabilit\u00e9 du g\u00e9rant)": { + "account_number": "7521" + }, + "B\u00e9n\u00e9fices attribu\u00e9s par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": { + "account_number": "7525" + }, + "account_number": "752" + }, + "Produits des cessions courantes d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "7541" + }, + "Immobilisations corporelles": { + "account_number": "7542" + }, + "account_number": "754" + }, + "Gains de change sur cr\u00e9ances et dettes commerciales": { + "account_number": "756" + }, + "Produits divers": { + "Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": { + "account_number": "7581" + }, + "Indemnit\u00e9s d\u2019assurances re\u00e7ues": { + "account_number": "7582" + }, + "Autres produits divers": { + "account_number": "7588" + }, + "account_number": "758" + }, + "Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "Sur risques \u00e0 court terme": { + "account_number": "7591" + }, + "Sur stocks": { + "account_number": "7593" + }, + "Sur cr\u00e9ances": { + "account_number": "7594" + }, + "Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "account_number": "7598" + }, + "account_number": "759" + }, + "account_number": "75" + }, + "Revenus financiers et produits assimil\u00e9s": { + "Int\u00e9r\u00eats de pr\u00eats et cr\u00e9ances diverses": { + "Int\u00e9r\u00eats de pr\u00eats": { + "account_number": "7712" + }, + "Int\u00e9r\u00eats sur cr\u00e9ances diverses": { + "account_number": "7713" + }, + "account_number": "771" + }, + "Revenus de participations et autres titres immobilis\u00e9s": { + "Revenus des titres de participation": { + "account_number": "7721" + }, + "Revenus autres titres immobilis\u00e9s": { + "account_number": "7722" + }, + "account_number": "772" + }, + "Escomptes obtenus": { + "account_number": "773" + }, + "Revenus de placement": { + "Revenus des obligations": { + "account_number": "7745" + }, + "Revenus des titres de placement": { + "account_number": "7746" + }, + "account_number": "774" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition": { + "account_number": "775" + }, + "Gains de change financiers": { + "account_number": "776" + }, + "Gains sur cessions de titres de placement": { + "account_number": "777" + }, + "Gains sur risques financiers": { + "Sur rentes viag\u00e8res": { + "account_number": "7781" + }, + "Sur op\u00e9rations financi\u00e8res": { + "account_number": "7782" + }, + "Sur instruments de tr\u00e9sorerie": { + "account_number": "7784" + }, + "account_number": "778" + }, + "Reprises de charges pour d\u00e9pr\u00e9ciations et provisions \u00e0 court terme financi\u00e8res": { + "Sur risques financiers": { + "account_number": "7791" + }, + "Sur titres de placement": { + "account_number": "7795" + }, + "Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "account_number": "7798" + }, + "account_number": "779" + }, + "account_number": "77" + }, + "Transferts de charges": { + "Transferts de charges d\u2019exploitation": { + "account_number": "781" + }, + "Transferts de charges financi\u00e8res": { + "account_number": "787" + }, + "account_number": "78" + }, + "Reprises de provisions, de d\u00e9pr\u00e9ciations et autres": { + "Reprises de provisions et d\u00e9pr\u00e9ciations d\u2019exploitation": { + "Pour risques et charges": { + "account_number": "7911" + }, + "Des immobilisations incorporelles": { + "account_number": "7913" + }, + "Des immobilisations corporelles": { + "account_number": "7914" + }, + "account_number": "791" + }, + "Reprises de provisions et d\u00e9pr\u00e9ciations financi\u00e8res": { + "Pour risques et charges": { + "account_number": "7971" + }, + "Des immobilisations financi\u00e8res": { + "account_number": "7972" + }, + "account_number": "797" + }, + "Reprises d\u2019amortissements": { + "account_number": "798" + }, + "Reprises de subventions d\u2019investissement": { + "account_number": "799" + }, + "account_number": "79" + }, + "root_type": "Income", + "account_number": "7" + }, + "8-Comptes des autres charges et des autres produits (CHARGES)": { + "Valeurs comptables des cessions d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "811" + }, + "Immobilisations corporelles": { + "account_number": "812" + }, + "Immobilisations financi\u00e8res": { + "account_number": "816" + }, + "account_number": "81" + }, + "Charges hors activit\u00e9s ordinaires": { + "Charges HAO constat\u00e9es": { + "account_number": "831" + }, + "Charges li\u00e9es aux op\u00e9rations de restructuration": { + "account_number": "833" + }, + "Pertes sur cr\u00e9ances HAO": { + "account_number": "834" + }, + "Dons et lib\u00e9ralit\u00e9s accord\u00e9s": { + "account_number": "835" + }, + "Abandons de cr\u00e9ances consentis": { + "account_number": "836" + }, + "Charges li\u00e9es aux op\u00e9rations de liquidation": { + "account_number": "837" + }, + "Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": { + "account_number": "839" + }, + "account_number": "83" + }, + "Dotations hors activit\u00e9s ordinaires": { + "Dotations aux provisions r\u00e9glement\u00e9es": { + "account_number": "851" + }, + "Dotations aux amortissements HAO": { + "account_number": "852" + }, + "Dotations aux d\u00e9pr\u00e9ciations HAO": { + "account_number": "853" + }, + "Dotations aux provisions pour risques et charges HAO": { + "account_number": "854" + }, + "Autres dotations HAO": { + "account_number": "858" + }, + "account_number": "85" + }, + "Participation des travailleurs": { + "Participation l\u00e9gale aux b\u00e9n\u00e9fices": { + "account_number": "871" + }, + "Participation contractuelle aux b\u00e9n\u00e9fices": { + "account_number": "874" + }, + "Autres participations": { + "account_number": "878" + }, + "account_number": "87" + }, + "Imp\u00f4ts sur le r\u00e9sultat": { + "Imp\u00f4ts sur les b\u00e9n\u00e9fices de l\u2019exercice": { + "Activit\u00e9s exerc\u00e9es dans l\u2019\u00c9tat": { + "account_number": "8911" + }, + "Activit\u00e9s exerc\u00e9es dans les autres \u00c9tats de la R\u00e9gion": { + "account_number": "8912" + }, + "Activit\u00e9s exerc\u00e9es hors R\u00e9gion": { + "account_number": "8913" + }, + "account_number": "891" + }, + "Rappel d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": { + "account_number": "892" + }, + "Imp\u00f4t minimum forfaitaire IMF": { + "account_number": "895" + }, + "D\u00e9gr\u00e8vements et annulations d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": { + "D\u00e9gr\u00e8vements": { + "account_number": "8991" + }, + "Annulations pour pertes r\u00e9troactives": { + "account_number": "8994" + }, + "account_number": "899" + }, + "account_number": "89" + }, + "root_type": "Expense" + }, + "8-Comptes des autres charges et des autres produits (PRODUITS)": { + "Produits des cessions d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "821" + }, + "Immobilisations corporelles": { + "account_number": "822" + }, + "Immobilisations financi\u00e8res": { + "account_number": "826" + }, + "account_number": "82" + }, + "Produits hors activit\u00e9s ordinaires": { + "Produits HAO constat\u00e9s": { + "account_number": "841" + }, + "Produits li\u00e9s aux op\u00e9rations de restructuration": { + "account_number": "843" + }, + "Indemnit\u00e9s et subventions HAO (entit\u00e9 agricole)": { + "account_number": "844" + }, + "Dons et lib\u00e9ralit\u00e9s obtenus": { + "account_number": "845" + }, + "Abandons de cr\u00e9ances obtenus": { + "account_number": "846" + }, + "Produits li\u00e9s aux op\u00e9rations de liquidation": { + "account_number": "847" + }, + "Transferts de charges HAO": { + "account_number": "848" + }, + "Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": { + "account_number": "849" + }, + "account_number": "84" + }, + "Reprises de charges, provisions et d\u00e9pr\u00e9ciations HAO": { + "Reprises de provisions r\u00e9glement\u00e9es": { + "account_number": "861" + }, + "Reprises d\u2019amortissements HAO": { + "account_number": "862" + }, + "Reprises de d\u00e9pr\u00e9ciations HAO": { + "account_number": "863" + }, + "Reprises de provisions pour risques et charges HAO": { + "account_number": "864" + }, + "Autres reprises HAO": { + "account_number": "868" + }, + "account_number": "86" + }, + "Subventions d\u2019\u00e9quilibre": { + "\u00c9tat": { + "account_number": "881" + }, + "Collectivit\u00e9s publiques": { + "account_number": "884" + }, + "Groupe": { + "account_number": "886" + }, + "Autres": { + "account_number": "888" + }, + "account_number": "88" + }, + "root_type": "Income" + } + } +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/cg_plan_comptable.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/cg_plan_comptable.json new file mode 100644 index 00000000000..ee65f15920a --- /dev/null +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/cg_plan_comptable.json @@ -0,0 +1,1919 @@ +{ + "country_code": "cg", + "name": "Syscohada - Plan Comptable", + "tree": { + "1-Comptes de ressources durables": { + "10-Capital": { + "101-Capital social": { + "1011-Capital souscrit, non appel\u00e9": {}, + "1012-Capital souscrit, appel\u00e9, non vers\u00e9": {}, + "1013-Capital souscrit, appel\u00e9, vers\u00e9, non amorti": {}, + "1014-Capital souscrit, appel\u00e9, vers\u00e9, amorti": {}, + "1018-Capital souscrit soumis \u00e0 des conditions particuli\u00e8res": {} + }, + "102-Capital par dotation": { + "1021-Dotation initiale": {}, + "1022-Dotations compl\u00e9mentaires": {}, + "1028-Autres dotations": {} + }, + "103-Capital personnel": {}, + "104-Compte de l\u2019exploitant": { + "1041-Apports temporaires": {}, + "1042-Op\u00e9rations courantes": {}, + "1043-R\u00e9mun\u00e9rations, imp\u00f4ts et autres charges personnelles": {}, + "1047-Pr\u00e9l\u00e8vements d\u2019autoconsommation": {}, + "1048-Autres pr\u00e9l\u00e8vements": {} + }, + "105-Primes li\u00e9es au capital social": { + "1051-Primes d\u2019\u00e9mission": {}, + "1052-Primes d\u2019apport": {}, + "1053-Primes de fusion": {}, + "1054-Primes de conversion": {}, + "1058-Autres primes": {} + }, + "106-\u00c9carts de r\u00e9\u00e9valuation": { + "1061-\u00c9carts de r\u00e9\u00e9valuation l\u00e9gale": {}, + "1062-\u00c9carts de r\u00e9\u00e9valuation libre": {} + }, + "109-Apporteurs, capital souscrit, non appel\u00e9": {} + }, + "11-R\u00e9serves": { + "111-R\u00e9serve l\u00e9gale": {}, + "112-R\u00e9serves statutaires ou contractuelles": {}, + "113-R\u00e9serves r\u00e9glement\u00e9es": { + "1131-R\u00e9serves de plus-values nettes \u00e0 long terme": {}, + "1132-R\u00e9serves d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": {}, + "1133-R\u00e9serves cons\u00e9cutives \u00e0 l\u2019octroi de subventions d\u2019investissement": {}, + "1134-R\u00e9serves des valeurs mobili\u00e8res donnant acc\u00e8s au capital": {}, + "1135-Autres r\u00e9serves r\u00e9glement\u00e9es": {} + }, + "118-Autres r\u00e9serves": { + "1181-R\u00e9serves facultatives": {}, + "1188-R\u00e9serves diverses": {} + } + }, + "12-Report \u00e0 nouveau": { + "121-Report \u00e0 nouveau cr\u00e9diteur": {}, + "129-Report \u00e0 nouveau d\u00e9biteur": { + "1291-Perte nette \u00e0 reporter": {}, + "1292-Perte Amortissements r\u00e9put\u00e9s diff\u00e9r\u00e9s": {} + } + }, + "13-R\u00e9sultat net de l\u2019exercice": { + "130-R\u00e9sultat en instance d\u2019affectation": { + "1301-R\u00e9sultat en instance d\u2019affectation : b\u00e9n\u00e9fice": {}, + "1309-R\u00e9sultat en instance d\u2019affectation : perte": {} + }, + "131-R\u00e9sultat net : b\u00e9n\u00e9fice": {}, + "132-Marge commerciale (MC)": {}, + "133-Valeur ajout\u00e9e (VA)": {}, + "134-Exc\u00e9dent brut d\u2019exploitation (EBE)": {}, + "135-R\u00e9sultat d\u2019exploitation (RE)": {}, + "136-R\u00e9sultat financier (RF)": {}, + "137-R\u00e9sultat des activit\u00e9s ordinaires (RAO)": {}, + "138-R\u00e9sultat hors activit\u00e9s ordinaires (RHAO)": { + "1381-R\u00e9sultat de fusion": {}, + "1382-R\u00e9sultat d\u2019apport partiel d\u2019actif": {}, + "1383-R\u00e9sultat de scission": {}, + "1384-R\u00e9sultat de liquidation": {} + }, + "139-R\u00e9sultat net : perte": {} + }, + "14-Subventions d\u2019investissement": { + "141-Subventions d\u2019\u00e9quipement": { + "1411-\u00c9tat": {}, + "1412-R\u00e9gions": {}, + "1413-D\u00e9partements": {}, + "1414-Communes et collectivit\u00e9s publiques d\u00e9centralis\u00e9es": {}, + "1415-Entit\u00e9s publiques ou mixtes": {}, + "1416-Entit\u00e9s et organismes priv\u00e9s": {}, + "1417-Organismes internationaux": {}, + "1418-Autres": {} + }, + "148-Autres subventions d\u2019investissement": {} + }, + "15-Provisions r\u00e9glement\u00e9es et fonds assimil\u00e9s": { + "151-Amortissements d\u00e9rogatoires": {}, + "152-Plus-values de cession \u00e0 r\u00e9investir": {}, + "153-Fonds r\u00e9glement\u00e9s": { + "1531-Fonds National": {}, + "1532-Pr\u00e9l\u00e8vement pour le Budget": {} + }, + "154-Provisions sp\u00e9ciales de r\u00e9\u00e9valuation": {}, + "155-Provisions r\u00e9glement\u00e9es relatives aux immobilisations": { + "1551-Reconstitution des gisements miniers et p\u00e9troliers": {} + }, + "156-Provisions r\u00e9glement\u00e9es relatives aux stocks": { + "1561-Hausse de prix": {}, + "1562-Fluctuation des cours": {} + }, + "157-Provisions pour investissement": {}, + "158-Autres provisions et fonds r\u00e9glement\u00e9s": {} + }, + "16-Emprunts et dettes assimil\u00e9es": { + "161-Emprunts obligataires": { + "1611-Emprunts obligataires ordinaires": {}, + "1612-Emprunts obligataires convertibles en actions": {}, + "1613-Emprunts obligataires remboursables en actions": {}, + "1618-Autres emprunts obligataires": {} + }, + "162-Emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": {}, + "163-Avances re\u00e7ues de l\u2019\u00c9tat": {}, + "164-Avances re\u00e7ues et comptes courants bloqu\u00e9s": {}, + "165-D\u00e9p\u00f4ts et cautionnements re\u00e7us": { + "1651-D\u00e9p\u00f4ts": {}, + "1652-Cautionnements": {} + }, + "166-Int\u00e9r\u00eats courus": { + "1661-Sur emprunts obligataires": {}, + "1662-Sur emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": {}, + "1663-Sur avances re\u00e7ues de l\u2019\u00c9tat": {}, + "1664-Sur avances re\u00e7ues et comptes courants bloqu\u00e9s": {}, + "1665-Sur d\u00e9p\u00f4ts et cautionnements re\u00e7us": {}, + "1667-Sur avances assorties de conditions particuli\u00e8res": {}, + "1668-Sur autres emprunts et dettes": {} + }, + "167-Avances assorties de conditions particuli\u00e8res": { + "1671-Avances bloqu\u00e9es pour augmentation du capital": {}, + "1672-Avances conditionn\u00e9es par l\u2019\u00c9tat": {}, + "1673-Avances conditionn\u00e9es par les autres organismes africains": {}, + "1674-Avances conditionn\u00e9es par les organismes internationaux": {} + }, + "168-Autres emprunts et dettes": { + "1681-Rentes viag\u00e8res capitalis\u00e9es": {}, + "1682-Billets de fonds": {}, + "1683-Dettes cons\u00e9cutives \u00e0 des titres emprunt\u00e9s": {}, + "1684-Emprunts participatifs": {}, + "1685-Participation des travailleurs aux b\u00e9n\u00e9fices": {}, + "1686-Emprunts et dettes contract\u00e9s aupr\u00e8s des autres tiers": {} + } + }, + "17-Dettes de location acquisition": { + "172-Dettes de location acquisition / cr\u00e9dit bail immobilier": {}, + "173-Dettes de location acquisition / cr\u00e9dit bail mobilier": {}, + "174-Dettes de location acquisition / location de vente": {}, + "176-Int\u00e9r\u00eats courus": { + "1762-Sur dettes de location acquisition / cr\u00e9dit-bail immobilier": {}, + "1763-Sur dettes de location acquisition / cr\u00e9dit-bail mobilier": {}, + "1764-Sur dettes de location acquisition / location-vente": {}, + "1768-Sur autres dettes de location acquisition": {} + }, + "178-Autres dettes de location acquisition": {} + }, + "18-Dettes li\u00e9es \u00e0 des participations et comptes de liaison des \u00e9tablissements et soci\u00e9t\u00e9s en participation": { + "181-Dettes li\u00e9es \u00e0 des participations": { + "1811-Dettes li\u00e9es \u00e0 des participations (groupe)": {}, + "1812-Dettes li\u00e9es \u00e0 des participations (hors groupe)": {} + }, + "182-Dettes li\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": {}, + "183-Int\u00e9r\u00eats courus sur dettes li\u00e9es \u00e0 des participations": {}, + "184-Comptes permanents bloqu\u00e9s des \u00e9tablissements et succursales": {}, + "185-Comptes permanents non bloqu\u00e9s des \u00e9tablissements et succursales": {}, + "186-Comptes de liaison charges": {}, + "187-Comptes de liaison produits": {}, + "188-Comptes de liaison des soci\u00e9t\u00e9s en participation": {} + }, + "19-Provisions pour risques et charges": { + "191-Provisions pour litiges": {}, + "192-Provisions pour garanties donn\u00e9es aux clients": {}, + "193-Provisions pour pertes sur march\u00e9s \u00e0 ach\u00e8vement futur": {}, + "194-Provisions pour pertes de change": {}, + "195-Provisions pour imp\u00f4ts": {}, + "196-Provisions pour pensions et obligations similaires": { + "1961-Provisions pour pensions et obligations similaires engagement de retraite": {}, + "1962-Actif du r\u00e9gime de retraite": {} + }, + "197-Provisions pour restructuration": {}, + "198-Autres provisions pour risques et charges": { + "1981-Provisions pour amendes et p\u00e9nalit\u00e9s": {}, + "1983-Provisions pour propre assureur": {}, + "1984-Provisions pour d\u00e9mant\u00e8lement et remise en \u00e9tat": {}, + "1985-Provisions pour droits \u00e0 r\u00e9duction ou avantage en nature (ch\u00e8ques cadeau, cartes de fid\u00e9lit\u00e9...)": {}, + "1988-Provisions pour divers risques et charges": {} + } + }, + "root_type": "Equity" + }, + "2-Comptes d\u2019actif immobilis\u00e9": { + "21-Immobilisations incorporelles": { + "account_type": "Fixed Asset", + "211-Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset" + }, + "212-Brevets, licences, concessions et droits similaires": { + "account_type": "Fixed Asset", + "2121-Brevets": { + "account_type": "Fixed Asset" + }, + "2122-Licences": { + "account_type": "Fixed Asset" + }, + "2123-Concessions de service public": { + "account_type": "Fixed Asset" + }, + "2128-Autres concessions et droits similaires": { + "account_type": "Fixed Asset" + } + }, + "213-Logiciels et sites internet": { + "account_type": "Fixed Asset", + "2131-Logiciels": { + "account_type": "Fixed Asset" + }, + "2132-Sites internet": { + "account_type": "Fixed Asset" + } + }, + "214-Marques": { + "account_type": "Fixed Asset" + }, + "215-Fonds commercial": { + "account_type": "Fixed Asset" + }, + "216-Droit au bail": { + "account_type": "Fixed Asset" + }, + "217-Investissements de cr\u00e9ation": { + "account_type": "Fixed Asset" + }, + "218-Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset", + "2181-Frais de prospection et d\u2019\u00e9valuation de ressources min\u00e9rales": { + "account_type": "Fixed Asset" + }, + "2182-Co\u00fbts d\u2019obtention du contrat": { + "account_type": "Fixed Asset" + }, + "2183-Fichiers clients, notices, titres de journaux et magazines": { + "account_type": "Fixed Asset" + }, + "2184-Co\u00fbts des franchises": { + "account_type": "Fixed Asset" + }, + "2188-Divers droits et valeurs incorporelles": { + "account_type": "Fixed Asset" + } + }, + "219-Immobilisations incorporelles en cours": { + "account_type": "Fixed Asset", + "2191-Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset" + }, + "2193-Logiciels et internet": { + "account_type": "Fixed Asset" + }, + "2198-Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset" + } + } + }, + "22-Terrains": { + "account_type": "Fixed Asset", + "221-Terrains agricoles et forestiers": { + "account_type": "Fixed Asset", + "2211-Terrains d\u2019exploitation agricole": { + "account_type": "Fixed Asset" + }, + "2212-Terrains d\u2019exploitation foresti\u00e8re": { + "account_type": "Fixed Asset" + }, + "2218-Autres terrains": { + "account_type": "Fixed Asset" + } + }, + "222-Terrains nus": { + "account_type": "Fixed Asset", + "2221-Terrains \u00e0 b\u00e2tir": { + "account_type": "Fixed Asset" + }, + "2228-Autres terrains nus": { + "account_type": "Fixed Asset" + } + }, + "223-Terrains b\u00e2tis": { + "account_type": "Fixed Asset", + "2231-Pour b\u00e2timents industriels et agricoles": { + "account_type": "Fixed Asset" + }, + "2232-Pour b\u00e2timents administratifs et commerciaux": { + "account_type": "Fixed Asset" + }, + "2234-Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations professionnelles": { + "account_type": "Fixed Asset" + }, + "2235-Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations non professionnelles": { + "account_type": "Fixed Asset" + }, + "2238-Autres terrains b\u00e2tis": { + "account_type": "Fixed Asset" + } + }, + "224-Travaux de mise en valeur des terrains": { + "account_type": "Fixed Asset", + "2241-Plantation d\u2019arbres et d\u2019arbustes": { + "account_type": "Fixed Asset" + }, + "2245-Am\u00e9liorations du fonds": { + "account_type": "Fixed Asset" + }, + "2248-Autres travaux": { + "account_type": "Fixed Asset" + } + }, + "225-Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset", + "2251-Carri\u00e8res": { + "account_type": "Fixed Asset" + } + }, + "226-Terrains am\u00e9nag\u00e9s": { + "account_type": "Fixed Asset", + "2261-Parkings": { + "account_type": "Fixed Asset" + } + }, + "227-Terrains mis en concession": { + "account_type": "Fixed Asset" + }, + "228-Autres terrains": { + "account_type": "Fixed Asset", + "2281-Terrains immeubles de placement": { + "account_type": "Fixed Asset" + }, + "2285-Terrains des logements affect\u00e9s au personnel": { + "account_type": "Fixed Asset" + }, + "2286-Terrains de location acquisition": { + "account_type": "Fixed Asset" + }, + "2288-Divers terrains": { + "account_type": "Fixed Asset" + } + }, + "229-Am\u00e9nagements de terrains en cours": { + "account_type": "Fixed Asset", + "2291-Terrains agricoles et forestiers": { + "account_type": "Fixed Asset" + }, + "2292-Terrains nus": { + "account_type": "Fixed Asset" + }, + "2295-Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset" + }, + "2298-Autres terrains": { + "account_type": "Fixed Asset" + } + } + }, + "23-B\u00e2timents, installations techniques et agencements": { + "231-B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "2311-B\u00e2timents industriels": {}, + "2312-B\u00e2timents agricoles": {}, + "2313-B\u00e2timents administratifs et commerciaux": {}, + "2314-B\u00e2timents affect\u00e9s au logement du personnel": {}, + "2315-B\u00e2timents immeubles de placement": {}, + "2316-B\u00e2timents de location acquisition": {} + }, + "232-B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "2321-B\u00e2timents industriels": {}, + "2322-B\u00e2timents agricoles": {}, + "2323-B\u00e2timents administratifs et commerciaux": {}, + "2324-B\u00e2timents affect\u00e9s au logement du personnel": {}, + "2325-B\u00e2timents immeubles de placement": {}, + "2326-B\u00e2timents de location acquisition": {} + }, + "233-Ouvrages d\u2019infrastructure": { + "2331-Voies de terre": {}, + "2332-Voies de fer": {}, + "2333-Voies d\u2019eau": {}, + "2334-Barrages, Digues": {}, + "2335-Pistes d\u2019a\u00e9rodrome": {}, + "2338-Autres ouvrages d\u2019infrastructures": {} + }, + "234-Am\u00e9nagements, agencements et installations techniques": { + "2341-Installations complexes sp\u00e9cialis\u00e9es sur sol propre": {}, + "2342-Installations complexes sp\u00e9cialis\u00e9es sur sol d\u2019autrui": {}, + "2343-Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol propre": {}, + "2344-Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol d\u2019autrui": {}, + "2345-Am\u00e9nagements et agencements des b\u00e2timents": {} + }, + "235-Am\u00e9nagements de bureaux": { + "2351-Installations g\u00e9n\u00e9rales": {}, + "2358-Autres am\u00e9nagements de bureaux": {} + }, + "237-B\u00e2timents industriels, agricoles et commerciaux mis en concession": {}, + "238-Autres installations et agencements": {}, + "239-B\u00e2timents am\u00e9nagements, agencements et installations en cours": { + "2391-B\u00e2timents en cours": {}, + "2392-Installations en cours": {}, + "2393-Ouvrages d\u2019infrastructure en cours": {}, + "2394-Am\u00e9nagements et agencements et installations techniques en cours": {}, + "2395-Am\u00e9nagements de bureaux en cours": {}, + "2398-Autres installations et agencements en cours": {} + } + }, + "24-Mat\u00e9riel, mobilier et actifs biologiques": { + "241-Mat\u00e9riel et outillage industriel et commercial": { + "2411-Mat\u00e9riel industriel": {}, + "2412-Outillage industriel": {}, + "2413-Mat\u00e9riel commercial": {}, + "2414-Outillage commercial": {}, + "2416-Mat\u00e9riel & outillage industriel et commercial de location-acquisition": {} + }, + "242-Mat\u00e9riel et outillage agricole": { + "2421-Mat\u00e9riel agricole": {}, + "2422-Outillage agricole": {}, + "2426-Mat\u00e9riel & outillage agricole de location-acquisition": {} + }, + "243-Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "244-Mat\u00e9riel et mobilier": { + "2441-Mat\u00e9riel de bureau": {}, + "2442-Mat\u00e9riel informatique": {}, + "2443-Mat\u00e9riel bureautique": {}, + "2444-Mobilier de bureau": {}, + "2445-Mat\u00e9riel et mobilier immeubles de placement": {}, + "2446-Mat\u00e9riel et mobilier de location acquisition": {}, + "2447-Mat\u00e9riel et mobilier des logements du personnel": {} + }, + "245-Mat\u00e9riel de transport": { + "2451-Mat\u00e9riel automobile": {}, + "2452-Mat\u00e9riel ferroviaire": {}, + "2453-Mat\u00e9riel fluvial, lagunaire": {}, + "2454-Mat\u00e9riel naval": {}, + "2455-Mat\u00e9riel a\u00e9rien": {}, + "2456-Mat\u00e9riel de transport de location-acquisition": {}, + "2457-Mat\u00e9riel hippomobile": {}, + "2458-Autres mat\u00e9riels de transport": {} + }, + "246-Actifs biologiques": { + "2461-Cheptel, animaux de trait": {}, + "2462-Cheptel, animaux reproducteurs": {}, + "2463-Animaux de garde": {}, + "2465-Plantations agricoles": {}, + "2468-Autres actifs biologiques": {} + }, + "247-Agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "2471-Agencements et am\u00e9nagements du mat\u00e9riel": {}, + "2472-Agencements et am\u00e9nagements des actifs biologiques": {}, + "2478-Autres agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": {} + }, + "248-Autres mat\u00e9riels et mobiliers": { + "2481-Collections et \u0153uvres d\u2019art": {}, + "2488-Divers mat\u00e9riels mobiliers": {} + }, + "249-Mat\u00e9riels et actifs biologiques en cours": { + "2491-Mat\u00e9riel et outillage industriel et commercial": {}, + "2492-Mat\u00e9riel et outillage agricole": {}, + "2493-Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "2494-Mat\u00e9riel et mobilier de bureau": {}, + "2495-Mat\u00e9riel de transport": {}, + "2496-Actifs biologiques": {}, + "2497-Agencements am\u00e9nagements du mat\u00e9riel et actifs biologiques": {}, + "2498-Autres mat\u00e9riels et actifs biologiques en cours": {} + } + }, + "25-Avances et acomptes vers\u00e9s sur immobilisations": { + "251-Avances et acomptes vers\u00e9s sur immobilisations incorporelles": {}, + "252-Avances et acomptes vers\u00e9s sur immobilisations corporelles": {} + }, + "26-Titres de participation": { + "261-Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": {}, + "262-Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le conjoint": {}, + "263-Titres de participation dans des soci\u00e9t\u00e9s conf\u00e9rant une influence notable": {}, + "265-Participations dans des organismes professionnels": {}, + "266-Parts dans des groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": {}, + "268-Autres titres de participation": {} + }, + "27-Autres immobilisations financi\u00e8res": { + "271-Pr\u00eats et cr\u00e9ances": { + "2711-Pr\u00eats participatifs": {}, + "2712-Pr\u00eats aux associ\u00e9s": {}, + "2713-Billets de fonds": {}, + "2714-Titres pr\u00eat\u00e9s": {}, + "2718-Autres pr\u00eats et cr\u00e9ances": {} + }, + "272-Pr\u00eats au personnel": { + "2721-Pr\u00eats immobiliers": {}, + "2722-Pr\u00eats mobiliers et d\u2019installation": {}, + "2728-Autres pr\u00eats au personnel": {} + }, + "273-Cr\u00e9ances sur l\u2019\u00c9tat": { + "2731-Retenues de garantie": {}, + "2733-Fonds r\u00e9glement\u00e9": {}, + "2734-Cr\u00e9ances sur le conc\u00e9dant": {}, + "2738-Autres cr\u00e9ances sur l\u2019\u00c9tat": {} + }, + "274-Titres immobilis\u00e9s": { + "2741-Titres immobilis\u00e9s de l\u2019activit\u00e9 de portefeuille (TIAP)": {}, + "2742-Titres participatifs": {}, + "2743-Certificats d\u2019investissement": {}, + "2744-Parts de fonds commun de placement (FCP)": {}, + "2745-Obligations": {}, + "2746-Actions ou parts propres": {}, + "2748-Autres titres immobilis\u00e9s": {} + }, + "275-D\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "2751-D\u00e9p\u00f4ts pour loyers d\u2019avance": {}, + "2752-D\u00e9p\u00f4ts pour l\u2019\u00e9lectricit\u00e9": {}, + "2753-D\u00e9p\u00f4ts pour l\u2019eau": {}, + "2754-D\u00e9p\u00f4ts pour le gaz": {}, + "2755-D\u00e9p\u00f4ts pour le t\u00e9l\u00e9phone, le t\u00e9lex, la t\u00e9l\u00e9copie": {}, + "2756-Cautionnements sur march\u00e9s publics": {}, + "2757-Cautionnements sur autres op\u00e9rations": {}, + "2758-Autres d\u00e9p\u00f4ts et cautionnements": {} + }, + "276-Int\u00e9r\u00eats courus": { + "2761-Pr\u00eats et cr\u00e9ances non commerciales": {}, + "2762-Pr\u00eats au personnel": {}, + "2763-Cr\u00e9ances sur l\u2019\u00c9tat": {}, + "2764-Titres immobilis\u00e9s": {}, + "2765-D\u00e9p\u00f4ts et cautionnements vers\u00e9s": {}, + "2767-Cr\u00e9ances rattach\u00e9es \u00e0 des participations": {}, + "2768-Immobilisations financi\u00e8res diverses": {} + }, + "277-Cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": { + "2771-Cr\u00e9ances rattach\u00e9es \u00e0 des participations (groupe)": {}, + "2772-Cr\u00e9ances rattach\u00e9es \u00e0 des participations (hors groupe)": {}, + "2773-Cr\u00e9ances rattach\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": {}, + "2774-Avances \u00e0 des Groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": {} + }, + "278-Immobilisations financi\u00e8res diverses": { + "2781-Cr\u00e9ances diverses groupe": {}, + "2782-Cr\u00e9ances diverses hors groupe": {}, + "2784-Banques d\u00e9p\u00f4ts \u00e0 terme": {}, + "2785-Or et m\u00e9taux pr\u00e9cieux": {}, + "2788-Autres immobilisations financi\u00e8res": {} + } + }, + "28-Amortissements": { + "account_type": "Accumulated Depreciation", + "281-Amortissements des immobilisations corporelles": { + "account_type": "Accumulated Depreciation", + "2811-Amortissements des frais de d\u00e9veloppement": { + "account_type": "Accumulated Depreciation" + }, + "2812-Amortissements des brevets, licences, concessions et droits similaires": { + "account_type": "Accumulated Depreciation" + }, + "2813-Amortissements des logiciels et sites internet": { + "account_type": "Accumulated Depreciation" + }, + "2814-Amortissements des marques": { + "account_type": "Accumulated Depreciation" + }, + "2815-Amortissements du fonds commercial": { + "account_type": "Accumulated Depreciation" + }, + "2816-Amortissements du droit au bail": { + "account_type": "Accumulated Depreciation" + }, + "2817-Amortissements des investissements de cr\u00e9ation": { + "account_type": "Accumulated Depreciation" + }, + "2818-Amortissements des autres droits et valeurs incorporels": { + "account_type": "Accumulated Depreciation" + } + }, + "282-Amortissements des terrains": { + "2824-Amortissements des travaux de mise en valeur des terrains": {} + }, + "283-Amortissements des b\u00e2timents, installations techniques et agencements": { + "2831-Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": {}, + "2832-Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": {}, + "2833-Amortissements des ouvrages d\u2019infrastructure": {}, + "2834-Amortissements des am\u00e9nagements, agencements et installations techniques": {}, + "2835-Amortissements des am\u00e9nagements de bureaux": {}, + "2837-Amortissements des b\u00e2timents industriels, agricoles et commerciaux mis en concession": {}, + "2838-Amortissements des autres installations et agencements": {} + }, + "284-Amortissements du mat\u00e9riel": { + "2841-Amortissements du mat\u00e9riel et outillage industriel et commercial": {}, + "2842-Amortissements du mat\u00e9riel et outillage agricole": {}, + "2843-Amortissements du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "2844-Amortissements du mat\u00e9riel et mobilier": {}, + "2845-Amortissements du mat\u00e9riel de transport": {}, + "2846-Amortissements des actifs biologiques": {}, + "2847-Amortissements des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": {}, + "2848-Amortissements des autres mat\u00e9riels": {} + } + }, + "29-D\u00e9pr\u00e9ciations des immobilisations": { + "291-D\u00e9pr\u00e9ciations des immobilisations incorporelles": { + "2911-D\u00e9pr\u00e9ciations des frais de d\u00e9veloppement": {}, + "2912-D\u00e9pr\u00e9ciations des brevets, licences, concessions et droits similaires": {}, + "2913-D\u00e9pr\u00e9ciations des logiciels et sites internet": {}, + "2914-D\u00e9pr\u00e9ciations des marques": {}, + "2915-D\u00e9pr\u00e9ciations du fonds commercial": {}, + "2916-D\u00e9pr\u00e9ciations du droit au bail": {}, + "2917-D\u00e9pr\u00e9ciations des investissements de cr\u00e9ation": {}, + "2918-D\u00e9pr\u00e9ciations des autres droits et valeurs incorporels": {}, + "2919-D\u00e9pr\u00e9ciations des immobilisations incorporelles en cours": {} + }, + "292-D\u00e9pr\u00e9ciations des terrains": { + "2921-D\u00e9pr\u00e9ciations des terrains agricoles et forestiers": {}, + "2922-D\u00e9pr\u00e9ciations des terrains nus": {}, + "2923-D\u00e9pr\u00e9ciations des terrains b\u00e2tis": {}, + "2924-D\u00e9pr\u00e9ciations des travaux de mise en valeur des terrains": {}, + "2925-D\u00e9pr\u00e9ciations des terrains de gisement": {}, + "2926-D\u00e9pr\u00e9ciations des terrains am\u00e9nag\u00e9s": {}, + "2927-D\u00e9pr\u00e9ciations des terrains mis en concession": {}, + "2928-D\u00e9pr\u00e9ciations des autres terrains": {}, + "2929-D\u00e9pr\u00e9ciations des am\u00e9nagements de terrains en cours": {} + }, + "293-D\u00e9pr\u00e9ciations des b\u00e2timents, installations techniques et agencements": { + "2931-D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": {}, + "2932-D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": {}, + "2933-D\u00e9pr\u00e9ciations des ouvrages d\u2019infrastructures": {}, + "2934-D\u00e9pr\u00e9ciations des am\u00e9nagements, agencements et installations techniques": {}, + "2935-D\u00e9pr\u00e9ciations des am\u00e9nagements de bureaux": {}, + "2937-D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles et commerciaux mis en concession": {}, + "2938-D\u00e9pr\u00e9ciations des autres installations et agencements": {}, + "2939-D\u00e9pr\u00e9ciations des b\u00e2timents et installations en cours": {} + }, + "294-D\u00e9pr\u00e9ciations de mat\u00e9riel, du mobilier et de l\u2019actif biologique": { + "2941-D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage industriel et commercial": {}, + "2942-D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage agricole": {}, + "2943-D\u00e9pr\u00e9ciations du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "2944-D\u00e9pr\u00e9ciations du mat\u00e9riel et mobilier": {}, + "2945-D\u00e9pr\u00e9ciations du mat\u00e9riel de transport": {}, + "2946-D\u00e9pr\u00e9ciations des actifs biologiques": {}, + "2947-D\u00e9pr\u00e9ciations des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": {}, + "2948-D\u00e9pr\u00e9ciations des autres mat\u00e9riels": {}, + "2949-D\u00e9pr\u00e9ciations de mat\u00e9riel en cours": {} + }, + "295-D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations": { + "2951-D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations incorporelles": {}, + "2952-D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations corporelles": {} + }, + "296-D\u00e9pr\u00e9ciations des titres de participation": { + "2961-D\u00e9pr\u00e9ciations des titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": {}, + "2962-D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s sous contr\u00f4le conjoint": {}, + "2963-D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s conf\u00e9rant une influence notable": {}, + "2965-D\u00e9pr\u00e9ciations des participations dans des organismes professionnels": {}, + "2966-D\u00e9pr\u00e9ciations des parts dans des GIE": {}, + "2968-D\u00e9pr\u00e9ciations des autres titres de participation": {} + }, + "297-D\u00e9pr\u00e9ciations des autres immobilisations financi\u00e8res": { + "2971-D\u00e9pr\u00e9ciations des pr\u00eats et cr\u00e9ances": {}, + "2972-D\u00e9pr\u00e9ciations des pr\u00eats au personnel": {}, + "2973-D\u00e9pr\u00e9ciations des cr\u00e9ances sur l\u2019\u00c9tat": {}, + "2974-D\u00e9pr\u00e9ciations des titres immobilis\u00e9s": {}, + "2975-D\u00e9pr\u00e9ciations des d\u00e9p\u00f4ts et cautionnements vers\u00e9s": {}, + "2977-D\u00e9pr\u00e9ciations des cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": {}, + "2978-D\u00e9pr\u00e9ciations des cr\u00e9ances financi\u00e8res diverses": {} + } + }, + "root_type": "Asset" + }, + "3-Comptes de Stocks": { + "31-Marchandises": { + "311-Marchandises A": { + "3111-Marchandises A1": {}, + "3112-Marchandises A2": {} + }, + "312-Marchandises B": { + "3121-Marchandises B1": {}, + "3122-Marchandises B2": {} + }, + "313-Actifs biologiques": { + "3131-Animaux": {}, + "3132-V\u00e9g\u00e9taux": {} + }, + "318-Marchandises hors activit\u00e9s ordinaires (HAO)": {} + }, + "32-Mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "321-Mati\u00e8res A": {}, + "322-Mati\u00e8res B": {}, + "323-Fournitures (A, B)": {} + }, + "33-Autres approvisionnements": { + "331-Mati\u00e8res consommables": {}, + "332-Fournitures d\u2019atelier et d\u2019usine": {}, + "333-Fournitures de magasin": {}, + "334-Fournitures de bureau": {}, + "335-Emballages": { + "3351-Emballages perdus": {}, + "3352-Emballages r\u00e9cup\u00e9rables non identifiables": {}, + "3353-Emballages \u00e0 usage mixte": {}, + "3358-Autres emballages": {} + }, + "338-Autres mati\u00e8res": {} + }, + "34-Produits en cours": { + "341-Produits en cours": { + "3411-Produits en cours P1": {}, + "3412-Produits en cours P2": {} + }, + "342-Travaux en cours": { + "3421-Travaux en cours T1": {}, + "3422-Travaux en cours T2": {} + }, + "343-Produits interm\u00e9diaires en cours": { + "3431-Produits interm\u00e9diaires A": {}, + "3432-Produits interm\u00e9diaires B": {} + }, + "344-Produits r\u00e9siduels en cours": { + "3441-Produits r\u00e9siduels A": {}, + "3442-Produits r\u00e9siduels B": {} + }, + "345-Actifs biologiques en cours": { + "3451-Animaux": {}, + "3452-V\u00e9g\u00e9taux": {} + } + }, + "35-Services en cours": { + "351-\u00c9tudes en cours": { + "3511-\u00c9tudes en cours E1": {}, + "3512-\u00c9tudes en cours E2": {} + }, + "352-Prestations de services en cours": { + "3521-Prestations de services S1": {}, + "3522-Prestations de services S2": {} + } + }, + "36-Produits finis": { + "361-Produits finis A": {}, + "362-Produits finis B": {}, + "363-Actifs biologiques": { + "3631-Animaux": {}, + "3632-V\u00e9g\u00e9taux": {}, + "3638-Autres stocks (activit\u00e9s annexes)": {} + } + }, + "37-Produits interm\u00e9diaires et r\u00e9siduels": { + "371-Produits interm\u00e9diaires": { + "3711-Produits interm\u00e9diaires A": {}, + "3712-Produits interm\u00e9diaires B": {} + }, + "372-Produits r\u00e9siduels": { + "3721-D\u00e9chets": {}, + "3722-Rebuts": {}, + "3723-Mati\u00e8res de R\u00e9cup\u00e9ration": {} + }, + "373-Actifs biologiques": { + "3731-Animaux": {}, + "3732-V\u00e9g\u00e9taux": {}, + "3738-Autres stocks (activit\u00e9s annexes)": {} + } + }, + "38-Stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": { + "account_type": "Stock", + "381-Marchandises en cours de route": {}, + "382-Mati\u00e8res premi\u00e8res et fournitures li\u00e9es en cours de route": {}, + "383-Autres approvisionnements en cours de route": {}, + "386-Produits finis en cours de route": {}, + "387-Stock en consignation ou en d\u00e9p\u00f4t": { + "3871-Stock en consignation": {}, + "3872-Stock en d\u00e9p\u00f4t": {} + }, + "388-Stock provenant d\u2019immobilisations mises hors service ou au rebut": {} + }, + "39-D\u00e9pr\u00e9ciations des stocks et encours de production": { + "391-D\u00e9pr\u00e9ciations des stocks de marchandises": {}, + "392-D\u00e9pr\u00e9ciations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": {}, + "393-D\u00e9pr\u00e9ciations des stocks d\u2019autres approvisionnements": {}, + "394-D\u00e9pr\u00e9ciations des productions en cours": {}, + "395-D\u00e9pr\u00e9ciations des services en cours": {}, + "396-D\u00e9pr\u00e9ciations des stocks de produits finis": {}, + "397-D\u00e9pr\u00e9ciations des stocks de produits interm\u00e9diaires et r\u00e9siduels": {}, + "398-D\u00e9pr\u00e9ciations des stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": {} + }, + "root_type": "Asset" + }, + "4-Comptes de Tiers (ACTIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (ACTIF)": { + "409-Fournisseurs d\u00e9biteurs": { + "4091-Fournisseurs Avances et acomptes vers\u00e9s": {}, + "4092-Fournisseurs Groupe avances et acomptes vers\u00e9s": {}, + "4093-Fournisseurs Sous-traitants avances et acomptes vers\u00e9s": {}, + "4094-Fournisseurs Cr\u00e9ances pour emballages et mat\u00e9riels \u00e0 rendre": {}, + "4098-Fournisseurs Rabais, remises, ristournes et autres avoirs \u00e0 obtenir": {} + } + }, + "41-Clients et comptes rattach\u00e9s (ACTIF)": { + "411-Clients": { + "4111-Clients": { + "account_type": "Receivable" + }, + "4112-Clients groupe": { + "account_type": "Receivable" + }, + "4114-Clients, \u00c9tat et Collectivit\u00e9s publiques": { + "account_type": "Receivable" + }, + "4115-Clients, organismes internationaux": { + "account_type": "Receivable" + }, + "4116-Clients, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Receivable" + }, + "4117-Client, retenues de garantie": { + "account_type": "Receivable" + }, + "4118-Clients, d\u00e9gr\u00e8vement de taxes sur la valeur ajout\u00e9e (TVA)": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "412-Clients, effets \u00e0 recevoir en portefeuille": { + "4121-Clients, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "4122-Clients Groupe, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "4124-\u00c9tat et Collectivit\u00e9s publiques, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "4125-Organismes Internationaux, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "413-Clients, ch\u00e8ques, effets et autres valeurs impay\u00e9es": { + "4131-Clients, ch\u00e8ques impay\u00e9s": { + "account_type": "Receivable" + }, + "4132-Clients, effets impay\u00e9s": { + "account_type": "Receivable" + }, + "4133-Clients, cartes de cr\u00e9dit impay\u00e9es": { + "account_type": "Receivable" + }, + "4138-Clients, autres valeurs impay\u00e9es": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "414-Cr\u00e9ances sur cessions courantes d\u2019immobilisations": { + "4141-Cr\u00e9ances en compte, immobilisations incorporelles": { + "account_type": "Receivable" + }, + "4142-Cr\u00e9ances en compte, immobilisations corporelles": { + "account_type": "Receivable" + }, + "4146-Effets \u00e0 recevoir, immobilisations incorporelles": { + "account_type": "Receivable" + }, + "4147-Effets \u00e0 recevoir, immobilisations corporelles": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "415-Clients, effets escompt\u00e9s non \u00e9chus": { + "account_type": "Receivable" + }, + "416-Cr\u00e9ances clients litigieuses ou douteuses": { + "4161-Cr\u00e9ances litigieuses": { + "account_type": "Receivable" + }, + "4162-Cr\u00e9ances douteuses": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "418-Clients, produits \u00e0 recevoir": { + "4181-Clients, factures \u00e0 \u00e9tablir": { + "account_type": "Receivable" + }, + "4186-Clients, int\u00e9r\u00eats courus": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "42-Personnel (ACTIF)": { + "421-Personnel, avances et acomptes": { + "4211-Personnel, avances": {}, + "4212-Personnel, acomptes": {}, + "4213-Frais avanc\u00e9s et fournitures au personnel": {} + } + }, + "43-Organismes sociaux (ACTIF)": { + "431-S\u00e9curit\u00e9 sociale": { + "4311-Prestations familiales": {}, + "4312-Accidents de travail": {}, + "4313-Caisse de retraite obligatoire": {}, + "4314-Caisse de retraite facultative": {}, + "4318-Autres cotisations sociales": {} + }, + "432-Caisses de retraite compl\u00e9mentaire": {}, + "433-Autres organismes sociaux": { + "4331-Mutuelle": {}, + "4332-Assurances retraite": {}, + "4333-Assurances et organismes de sant\u00e9": {} + }, + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "4387-Produits \u00e0 recevoir": {} + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (ACTIF)": { + "443-\u00c9tat, TVA factur\u00e9e": { + "4431-TVA factur\u00e9e sur ventes": {}, + "4432-TVA factur\u00e9e sur prestations de services": {}, + "4433-TVA factur\u00e9e sur travaux": {}, + "4434-TVA factur\u00e9e sur production livr\u00e9e \u00e0 soi-m\u00eame": {}, + "4435-TVA sur factures \u00e0 \u00e9tablir": {} + }, + "445-\u00c9tat, TVA r\u00e9cup\u00e9rable": { + "4451-TVA r\u00e9cup\u00e9rable sur immobilisations": {}, + "4452-TVA r\u00e9cup\u00e9rable sur achats": {}, + "4453-TVA r\u00e9cup\u00e9rable sur transport": {}, + "4454-TVA r\u00e9cup\u00e9rable sur services ext\u00e9rieurs et autres charges": {}, + "4455-TVA r\u00e9cup\u00e9rable sur factures non parvenues": {}, + "4456-TVA transf\u00e9r\u00e9e par d\u2019autres entit\u00e9s": {} + }, + "448-\u00c9tat, charges \u00e0 payer et produits \u00e0 recevoir": { + "4486-Charges \u00e0 payer": {}, + "4487-Produits \u00e0 recevoir": {} + }, + "449-\u00c9tat, cr\u00e9ances et dettes diverses": { + "4491-\u00c9tat, obligations cautionn\u00e9es": {}, + "4492-\u00c9tat, avances et acomptes vers\u00e9s sur imp\u00f4ts": {}, + "4493-\u00c9tat, fonds de dotation \u00e0 recevoir": {}, + "4494-\u00c9tat, subventions investissement \u00e0 recevoir": {}, + "4495-\u00c9tat, subventions d\u2019exploitation \u00e0 recevoir": {}, + "4496-\u00c9tat, subventions d\u2019\u00e9quilibre \u00e0 recevoir": {}, + "4497-\u00c9tat, avances sur subventions": {}, + "4499-\u00c9tat, fonds r\u00e9glement\u00e9s provisionn\u00e9s": {} + } + }, + "45-Organismes internationaux (ACTIF)": { + "451-Op\u00e9rations avec les organismes africains": {}, + "452-Op\u00e9rations avec les autres organismes internationaux": {}, + "458-Organismes internationaux, fonds de dotation et subventions \u00e0 recevoir": { + "4581-Organismes internationaux, fonds de dotation \u00e0 recevoir": {}, + "4582-Organismes internationaux, subventions \u00e0 recevoir": {} + } + }, + "46-Apporteurs, associ\u00e9s et groupe (ACTIF)": { + "461-Apporteurs, op\u00e9rations sur le capital": { + "4613-Apporteurs, capital appel\u00e9, non vers\u00e9": {}, + "4614-Apporteurs, compte d\u2019apport, op\u00e9rations de restructuration (fusion...)": {}, + "4618-Apporteurs, titres \u00e0 \u00e9changer": {} + }, + "467-Apporteurs, restant d\u00fb sur capital appel\u00e9": {} + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (ACTIF)": { + "472-Cr\u00e9ances et dettes sur titres de placement": { + "4721-Cr\u00e9ances sur cessions de titres de placement": {}, + "4726-Versements restant \u00e0 effectuer sur titres de placement non lib\u00e9r\u00e9s": {} + }, + "473-Interm\u00e9diaires Op\u00e9rations faites pour compte de tiers": { + "4731-Mandants": {}, + "4732-Mandataires": {}, + "4733-Commettants": {}, + "4734-Commissionnaires": {}, + "4739-\u00c9tat, Collectivit\u00e9s publiques, fonds global d\u2019allocation": {} + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits": { + "4747-Compte de r\u00e9partition p\u00e9riodique des produits": {} + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA": { + "4751-Compte actif": { + "account_type": "Temporary" + } + }, + "476-Charges constat\u00e9es d\u2019avance": {}, + "478-\u00c9carts de conversion actif": { + "4781-Diminution des cr\u00e9ances d\u2019exploitation": {}, + "4782-Diminution des cr\u00e9ances financi\u00e8res": {}, + "4783-Augmentation des dettes d\u2019exploitation": {}, + "4784-Augmentation des dettes financi\u00e8res": {}, + "4786-Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": {}, + "4788-Diff\u00e9rences compens\u00e9es par couverture de change": {} + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (ACTIF)": { + "485-Cr\u00e9ances sur cessions d\u2019immobilisations": { + "4851-En compte, immobilisations incorporelles": {}, + "4852-En compte, immobilisations corporelles": {}, + "4853-Effets \u00e0 recevoir, immobilisations incorporelles": {}, + "4854-Effets \u00e0 recevoir, immobilisations corporelles": {}, + "4855-Effets escompt\u00e9s non \u00e9chus": {}, + "4857-Retenues de garantie": {}, + "4858-Factures \u00e0 \u00e9tablir": {} + }, + "488-Autres cr\u00e9ances hors activit\u00e9s ordinaires (HAO)": {} + }, + "49-D\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme (tiers) (ACTIF)": { + "491-D\u00e9pr\u00e9ciations des comptes clients": { + "4911-Cr\u00e9ances litigieuses": {}, + "4912-Cr\u00e9ances douteuses": {} + }, + "495-D\u00e9pr\u00e9ciations des comptes organismes internationaux": {}, + "496-D\u00e9pr\u00e9ciations des comptes apporteurs, associ\u00e9s et groupe": { + "4962-Associ\u00e9s, comptes courants": {}, + "4963-Associ\u00e9s, op\u00e9rations faites en commun": {}, + "4966-Groupe, comptes courants": {} + }, + "497-D\u00e9pr\u00e9ciations des comptes d\u00e9biteurs divers": {}, + "498-D\u00e9pr\u00e9ciations des comptes de cr\u00e9ances HAO": { + "4985-Cr\u00e9ances sur cessions d\u2019immobilisations": {}, + "4986-Cr\u00e9ances sur cessions de titres de placement": {}, + "4988-Autres cr\u00e9ances HAO": {} + }, + "499-Provisions pour risques \u00e0 court terme": { + "4991-Sur op\u00e9rations d\u2019exploitation": {}, + "4997-Sur op\u00e9rations financi\u00e8res": {}, + "4998-Sur op\u00e9rations HAO": {} + } + }, + "root_type": "Asset" + }, + "4-Comptes de Tiers (PASSIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (PASSIF)": { + "401-Fournisseurs, dettes en compte": { + "4011-Fournisseurs": { + "account_type": "Payable" + }, + "4012-Fournisseurs groupe": { + "account_type": "Payable" + }, + "4013-Fournisseurs sous-traitants": { + "account_type": "Payable" + }, + "4016-Fournisseurs, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Payable" + }, + "4017-Fournisseur, retenues de garantie": { + "account_type": "Payable" + }, + "account_type": "Payable" + }, + "402-Fournisseurs, effets \u00e0 payer": { + "4021-Fournisseurs Effets \u00e0 payer": { + "account_type": "Payable" + }, + "4022-Fournisseurs Groupe, effets \u00e0 payer": { + "account_type": "Payable" + }, + "4023-Fournisseurs Sous-traitants, effets \u00e0 payer": { + "account_type": "Payable" + }, + "account_type": "Payable" + }, + "404-Fournisseurs, acquisitions courantes d\u2019immobilisations": { + "4041-Fournisseurs Dettes en comptes, immobilisations incorporelles": { + "account_type": "Payable" + }, + "4042-Fournisseurs Dettes en comptes, immobilisations corporelles": { + "account_type": "Payable" + }, + "4046-Fournisseurs Effets \u00e0 payer, immobilisations incorporelles": { + "account_type": "Payable" + }, + "4047-Fournisseurs Effets \u00e0 payer, immobilisations corporelles": { + "account_type": "Payable" + }, + "account_type": "Payable" + }, + "408-Fournisseurs, factures non parvenues": { + "4081-Fournisseurs": { + "account_type": "Stock Received But Not Billed" + }, + "4082-Fournisseurs groupe": { + "account_type": "Stock Received But Not Billed" + }, + "4083-Fournisseurs sous-traitants": { + "account_type": "Stock Received But Not Billed" + }, + "4086-Fournisseurs, int\u00e9r\u00eats courus": { + "account_type": "Stock Received But Not Billed" + }, + "account_type": "Stock Received But Not Billed" + }, + "account_type": "Payable" + }, + "41-Clients et comptes rattach\u00e9s (PASSIF)": { + "419-Clients cr\u00e9diteurs": { + "4191-Clients, avances et acomptes re\u00e7us": {}, + "4192-Clients groupe, avances et acomptes re\u00e7us": {}, + "4194-Clients, dettes pour emballages et mat\u00e9riels consign\u00e9s": {}, + "4198-Clients, rabais, remises, ristournes et autres avoirs \u00e0 accorder": {} + } + }, + "42-Personnel (PASSIF)": { + "422-Personnel, r\u00e9mun\u00e9rations dues": {}, + "423-Personnel, oppositions, saisies-arr\u00eats": { + "4231-Personnel, oppositions": {}, + "4232-Personnel, saisies-arr\u00eats": {}, + "4233-Personnel, avis \u00e0 tiers d\u00e9tenteur": {} + }, + "424-Personnel, \u0153uvres sociales internes": { + "4241-Assistance m\u00e9dicale": {}, + "4242-Allocations familiales": {}, + "4245-Organismes sociaux rattach\u00e9s \u00e0 l\u2019entit\u00e9": {}, + "4248-Autres \u0153uvres sociales internes": {} + }, + "425-Repr\u00e9sentants du personnel": { + "4251-D\u00e9l\u00e9gu\u00e9s du personnel": {}, + "4252-Syndicats et Comit\u00e9s d\u2019entreprises, d\u2019\u00c9tablissement": {}, + "4258-Autres repr\u00e9sentants du personnel": {} + }, + "426-Personnel, participation aux b\u00e9n\u00e9fices et au capital": { + "4261-Participation aux b\u00e9n\u00e9fices": {}, + "4264-Participation au capital": {} + }, + "427-Personnel d\u00e9p\u00f4ts": {}, + "428-Personnel, charges \u00e0 payer et produits \u00e0 recevoir": { + "4281-Dettes provisionn\u00e9es pour cong\u00e9s \u00e0 payer": {}, + "4286-Autres charges \u00e0 payer": {}, + "4287-Produits \u00e0 recevoir": {} + } + }, + "43-Organismes sociaux (PASSIF)": { + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "4381-Charges sociales sur gratifications \u00e0 payer": {}, + "4382-Charges sociales sur cong\u00e9s \u00e0 payer": {}, + "4386-Autres charges \u00e0 payer": {} + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (PASSIF)": { + "441-\u00c9tat, imp\u00f4t sur les b\u00e9n\u00e9fices": {}, + "442-\u00c9tat, autres imp\u00f4ts et taxes": { + "4421-Imp\u00f4ts et taxes d\u2019\u00c9tat": {}, + "4422-Imp\u00f4ts et taxes pour les collectivit\u00e9s publiques": {}, + "4423-Imp\u00f4ts et taxes recouvrables sur des obligataires": {}, + "4424-Imp\u00f4ts et taxes recouvrables sur des associ\u00e9s": {}, + "4426-Droits de douane": {}, + "4428-Autres imp\u00f4ts et taxes": {} + }, + "444-\u00c9tat, TVA due ou cr\u00e9dit de TVA": { + "4441-\u00c9tat, TVA due": {}, + "4449-\u00c9tat, cr\u00e9dit de TVA \u00e0 reporter": {} + }, + "446-\u00c9tat, autres taxes sur le chiffre d\u2019affaires": {}, + "447-\u00c9tat, imp\u00f4ts retenus \u00e0 la source": { + "4471-Imp\u00f4t G\u00e9n\u00e9ral sur le revenu": {}, + "4472-Imp\u00f4ts sur salaires": {}, + "4473-Contribution nationale": {}, + "4474-Contribution nationale de solidarit\u00e9": {}, + "4478-Autres imp\u00f4ts et contributions": {} + } + }, + "46-Apporteurs, associ\u00e9s et groupe (PASSIF)": { + "461-Apporteurs, op\u00e9rations sur le capital (PASSIF)": { + "4611-Apporteurs, apports en nature": {}, + "4612-Apporteurs, apports en num\u00e9raire": {}, + "4615-Apporteurs, versements re\u00e7us sur augmentation de capital": {}, + "4616-Apporteurs, versements anticip\u00e9s": {}, + "4617-Apporteurs d\u00e9faillants": {}, + "4619-Apporteurs, capital \u00e0 rembourser": {} + }, + "462-Associ\u00e9s, comptes courants": { + "4621-Principal": {}, + "4626-Int\u00e9r\u00eats courus": {} + }, + "463-Associ\u00e9s, op\u00e9rations faites en commun et GIE": { + "4631-Op\u00e9rations courantes": {}, + "4636-Int\u00e9r\u00eats courus": {} + }, + "465-Associ\u00e9s, dividendes \u00e0 payer": {}, + "466-Groupe, comptes courants": {} + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (PASSIF)": { + "471-D\u00e9biteurs et cr\u00e9diteurs divers": { + "4711-D\u00e9biteurs divers": {}, + "4712-Cr\u00e9diteurs divers": {}, + "4713-Obligataires": {}, + "4715-R\u00e9mun\u00e9rations d\u2019administrateurs": {}, + "4716-Compte d\u2019affacturage": {}, + "4717-D\u00e9biteurs divers retenues de garantie": {}, + "4718-Apport, compte de fusion et op\u00e9rations assimil\u00e9es": {}, + "4719-Bons de souscription d\u2019actions et d\u2019obligations": {} + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits (PASSIF)": { + "4746-Compte de r\u00e9partition p\u00e9riodique des charges": {} + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA (PASSIF)": { + "4752-Compte passif": {} + }, + "477-Produits constat\u00e9s d\u2019avance": {}, + "479-\u00c9carts de conversion passif": { + "4791-Augmentation des cr\u00e9ances d\u2019exploitation": {}, + "4792-Augmentation des cr\u00e9ances financi\u00e8res": {}, + "4793-Diminution des dettes d\u2019exploitation": {}, + "4794-Diminution des dettes financi\u00e8res": {}, + "4797-Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": {}, + "4798-Diff\u00e9rences compens\u00e9es par couverture de change": {} + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (HAO) (PASSIF)": { + "481-Fournisseurs d\u2019investissements": { + "4811-Immobilisations incorporelles": {}, + "4812-Immobilisations corporelles": {}, + "4813-Versements restant \u00e0 effectuer sur titres de participation et titres immobilis\u00e9s non lib\u00e9r\u00e9s": {}, + "4816-R\u00e9serve de propri\u00e9t\u00e9": {}, + "4817-Retenues de garantie": {}, + "4818-Factures non parvenues": {} + }, + "482-Fournisseurs d\u2019investissements, effets \u00e0 payer": { + "4821-Immobilisations incorporelles": {}, + "4822-Immobilisations corporelles": {} + }, + "484-Autres dettes hors activit\u00e9s ordinaires (HAO)": { + "4887-Produits": {} + } + }, + "49-D\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme (tiers) (PASSIF)": { + "490-D\u00e9pr\u00e9ciations des comptes fournisseurs": {}, + "492-D\u00e9pr\u00e9ciations des comptes personnel": {}, + "493-D\u00e9pr\u00e9ciations des comptes organismes sociaux": {}, + "494-D\u00e9pr\u00e9ciations des comptes \u00c9tat et collectivit\u00e9s publiques": {}, + "495-D\u00e9pr\u00e9ciations des comptes organismes internationaux": {} + }, + "root_type": "Liability" + }, + "5-Comptes de tr\u00e9sorerie": { + "50-Titres de placement": { + "501-Titres du tr\u00e9sor et bons de caisse \u00e0 court terme": { + "5011-Titres du Tr\u00e9sor \u00e0 court terme": {}, + "5012-Titres d\u2019organismes financiers": {}, + "5013-Bons de caisse \u00e0 court terme": {}, + "5016-Frais d\u2019acquisition des titres de tr\u00e9sor et bons de caisse": {} + }, + "502-Actions": { + "5021-Actions ou parts propres": {}, + "5022-Actions cot\u00e9es": {}, + "5023-Actions non cot\u00e9es": {}, + "5024-Actions d\u00e9membr\u00e9es (certificats d\u2019investissement, droits de vote)": {}, + "5025-Autres actions": {}, + "5026-Frais d\u2019acquisition des actions": {} + }, + "503-Obligations": { + "5031-Obligations \u00e9mises par la soci\u00e9t\u00e9 et rachet\u00e9es par elle": {}, + "5032-Obligations cot\u00e9es": {}, + "5033-Obligations non cot\u00e9es": {}, + "5035-Autres obligations": {}, + "5036-Frais d\u2019acquisition des obligations": {} + }, + "504-Bons de souscription": { + "5042-Bons de souscription d\u2019actions": {}, + "5043-Bons de souscription d\u2019obligations": {} + }, + "505-Titres n\u00e9gociables hors r\u00e9gion": {}, + "506-Int\u00e9r\u00eats courus": { + "5061-Titres du Tr\u00e9sor et bons de caisse \u00e0 court terme": {}, + "5062-Actions": {}, + "5063-Obligations": {} + }, + "508-Autres titres de placement et cr\u00e9ances assimil\u00e9es": {} + }, + "51-Valeurs \u00e0 encaisser": { + "511-Effets \u00e0 encaisser": {}, + "512-Effets \u00e0 l\u2019encaissement": {}, + "513-Ch\u00e8ques \u00e0 encaisser": {}, + "514-Ch\u00e8ques \u00e0 l\u2019encaissement": {}, + "515-Cartes de cr\u00e9dit \u00e0 encaisser": {}, + "518-Autres valeurs \u00e0 l\u2019encaissement": { + "5181-Warrants": {}, + "5182-Billets de fonds": {}, + "5185-Ch\u00e8ques de voyage": {}, + "5186-Coupons \u00e9chus": {}, + "5187-Int\u00e9r\u00eats \u00e9chus des obligations": {} + } + }, + "52-Banques": { + "521-Banques locales": { + "5211-Banques en monnaie nationale": { + "account_type": "Bank" + }, + "5215-Banques en devises": { + "account_type": "Bank" + }, + "account_type": "Bank" + }, + "522-Banques autres \u00c9tats r\u00e9gion": {}, + "523-Banques autres \u00c9tats zone mon\u00e9taire": {}, + "524-Banques hors zone mon\u00e9taire": {}, + "525-Banques d\u00e9p\u00f4t \u00e0 terme": {}, + "526-Banques, int\u00e9r\u00eats courus": { + "5261-Banque, int\u00e9r\u00eats courus, charges \u00e0 payer": {}, + "5267-Banque, int\u00e9r\u00eats courus, produits \u00e0 recevoir": {} + } + }, + "53-\u00c9tablissements financiers et assimil\u00e9s": { + "531-Ch\u00e8ques postaux": {}, + "532-Tr\u00e9sor": {}, + "533-Soci\u00e9t\u00e9s de gestion et d\u2019interm\u00e9diation (SGI)": {}, + "536-\u00c9tablissements financiers, int\u00e9r\u00eats courus": {}, + "538-Autres organismes financiers": {} + }, + "54-Instruments de tr\u00e9sorerie": { + "541-Options de taux d\u2019int\u00e9r\u00eat": {}, + "542-Options de taux de change": {}, + "543-Options de taux boursiers": {}, + "544-Instruments de march\u00e9s \u00e0 terme": {}, + "545-Avoirs d\u2019or et autres m\u00e9taux pr\u00e9cieux": {} + }, + "55-Instruments de monnaie \u00e9lectronique": { + "551-Monnaie \u00e9lectronique carte carburant": {}, + "552-Monnaie \u00e9lectronique t\u00e9l\u00e9phone portable": {}, + "553-Monnaie \u00e9lectronique carte p\u00e9age": {}, + "554-Porte-monnaie \u00e9lectronique": {}, + "558-Autres instruments de monnaies \u00e9lectroniques": {} + }, + "56-Banques, cr\u00e9dits de tr\u00e9sorerie et d\u2019escompte": { + "561-Cr\u00e9dits de tr\u00e9sorerie": {}, + "564-Escompte de cr\u00e9dits de campagne": {}, + "565-Escompte de cr\u00e9dits ordinaires": {}, + "566-Banques, cr\u00e9dits de tr\u00e9sorerie, int\u00e9r\u00eats courus": {} + }, + "57-Caisse": { + "571-Caisse si\u00e8ge social": { + "5711-Caisse en monnaie nationale": {}, + "5712-Caisse en devises": {} + }, + "572-Caisse succursale A": { + "5721-En monnaie nationale": {}, + "5722-En devises": {} + }, + "573-Caisse succursale B": { + "5731-En monnaie nationale": {}, + "5732-En devises": {} + } + }, + "58-R\u00e9gies d\u2019avances, accr\u00e9ditifs et virements internes": { + "581-R\u00e9gies d\u2019avance": {}, + "582-Accr\u00e9ditifs": {}, + "585-Virements de fonds": {}, + "588-Autres virements internes": {} + }, + "59-D\u00e9pr\u00e9ciations et provisions pour risque \u00e0 court terme": { + "590-D\u00e9pr\u00e9ciations des titres de placement": {}, + "591-D\u00e9pr\u00e9ciations des titres et valeurs \u00e0 encaisser": {}, + "592-D\u00e9pr\u00e9ciations des comptes banques": {}, + "593-D\u00e9pr\u00e9ciations des comptes \u00e9tablissements financiers et assimil\u00e9s": {}, + "594-D\u00e9pr\u00e9ciations des comptes d\u2019instruments de tr\u00e9sorerie": {}, + "599-Provisions pour risque \u00e0 court terme \u00e0 caract\u00e8re financier": {} + }, + "root_type": "Asset" + }, + "6-Comptes de charges des activit\u00e9s ordinaires": { + "60-Achats et variations de stocks": { + "601-Achats de marchandises": { + "6011-Dans la R\u00e9gion": {}, + "6012-Hors R\u00e9gion": {}, + "6013-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "6014-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "6015-Frais sur achats": {}, + "6019-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "602-Achats de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "6021-Dans la R\u00e9gion": {}, + "6022-Hors R\u00e9gion": {}, + "6023-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "6024-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "6025-Frais sur achats": {}, + "6029-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "603-Variations des stocks de biens achet\u00e9s": { + "6031-Variations des stocks de marchandises": {}, + "6032-Variations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": {}, + "6033-Variations des stocks d\u2019autres approvisionnements": {} + }, + "604-Achats stock\u00e9s de mati\u00e8res et fournitures consommables": { + "6041-Mati\u00e8res consommables": {}, + "6042-Mati\u00e8res combustibles": {}, + "6043-Produits d\u2019entretien": {}, + "6044-Fournitures d\u2019atelier et d\u2019usine": {}, + "6045-Frais sur achat": {}, + "6046-Fournitures de magasin": {}, + "6047-Fournitures de bureau": {}, + "6049-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "605-Autres achats": { + "6051-Fournitures non stockables Eau": {}, + "6052-Fournitures non stockables \u00c9lectricit\u00e9": {}, + "6053-Fournitures non stockables Autres \u00e9nergies": {}, + "6054-Fournitures d\u2019entretien non stockables": {}, + "6055-Fournitures de bureau non stockables": {}, + "6056-Achats de petit mat\u00e9riel et outillage": {}, + "6057-Achats d\u2019\u00e9tudes et prestations de services": {}, + "6058-Achats de travaux, mat\u00e9riels et \u00e9quipements": {}, + "6059-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "608-Achats d\u2019emballages": { + "6081-Emballages perdus": {}, + "6082-Emballages r\u00e9cup\u00e9rables non identifiables": {}, + "6083-Emballages \u00e0 usage mixte": {}, + "6085-Frais sur achats": {}, + "6089-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + } + }, + "61-Transports": { + "612-Transports sur ventes": {}, + "613-Transports pour le compte de tiers": {}, + "614-Transports du personnel": {}, + "616-Transports de plis": {}, + "618-Autres frais de transport": { + "6181-Voyages et d\u00e9placements": {}, + "6182-Transports entre \u00e9tablissements ou chantiers": {}, + "6183-Transports administratifs": {} + } + }, + "62-Services ext\u00e9rieurs": { + "621-Sous-traitance g\u00e9n\u00e9rale": {}, + "622-Locations, charges locatives": { + "6221-Locations de terrains": {}, + "6222-Locations de b\u00e2timents": {}, + "6223-Locations de mat\u00e9riels et outillages": {}, + "6224-Malis sur emballages": {}, + "6225-Locations d\u2019emballages": {}, + "6226-Fermages et loyers du foncier": {}, + "6228-Locations et charges locatives diverses": {} + }, + "623-Redevances de location acquisition": { + "6232-Cr\u00e9dit-bail immobilier": {}, + "6233-Cr\u00e9dit-bail mobilier": {}, + "6234-Location-vente": {}, + "6238-Autres contrats de location acquisition": {} + }, + "624-Entretien, r\u00e9parations, remise en \u00e9tat et maintenance": { + "6241-Entretien et r\u00e9parations des biens immobiliers": {}, + "6242-Entretien et r\u00e9parations des biens mobiliers": {}, + "6243-Maintenance": {}, + "6244-Charges de d\u00e9mant\u00e8lement et remise en \u00e9tat": {}, + "6248-Autres entretiens et r\u00e9parations": {} + }, + "625-Primes d\u2019assurance": { + "6251-Assurances multirisques": {}, + "6252-Assurances mat\u00e9riel de transport": {}, + "6253-Assurances risques d\u2019exploitation": {}, + "6254-Assurances responsabilit\u00e9 du producteur": {}, + "6255-Assurances insolvabilit\u00e9 clients": {}, + "6257-Assurances transport sur ventes": {}, + "6258-Autres primes d\u2019assurances": {} + }, + "626-\u00c9tudes, recherches et documentation": { + "6261-\u00c9tudes et recherches": {}, + "6265-Documentation g\u00e9n\u00e9rale": {}, + "6266-Documentation technique": {} + }, + "627-Publicit\u00e9, publications, relations publiques": { + "6271-Annonces, insertions": {}, + "6272-Catalogues, imprim\u00e9s publicitaires": {}, + "6273-\u00c9chantillons": {}, + "6274-Foires et expositions": {}, + "6275-Publications": {}, + "6276-Cadeaux \u00e0 la client\u00e8le": {}, + "6277-Frais de colloques, s\u00e9minaires, conf\u00e9rences": {}, + "6278-Autres charges de publicit\u00e9 et relations publiques": {} + }, + "628-Frais de t\u00e9l\u00e9communications": { + "6281-Frais de t\u00e9l\u00e9phone": {}, + "6282-Frais de t\u00e9lex": {}, + "6283-Frais de t\u00e9l\u00e9copie": {}, + "6288-Autres frais de t\u00e9l\u00e9communications": {} + } + }, + "63-Autres services ext\u00e9rieurs": { + "631-Frais bancaires": { + "6311-Frais sur titres (vente, garde)": {}, + "6312-Frais sur effets": {}, + "6313-Location de coffres": {}, + "6314-Commissions d\u2019affacturage": {}, + "6315-Commissions sur cartes de cr\u00e9dit": {}, + "6316-Frais d\u2019\u00e9mission d\u2019emprunts": {}, + "6317-Frais sur instruments monnaie \u00e9lectronique": {}, + "6318-Autres frais bancaires": {} + }, + "632-R\u00e9mun\u00e9rations d\u2019interm\u00e9diaires et de conseils": { + "6322-Commissions et courtages sur ventes": {}, + "6324-Honoraires des professions r\u00e9glement\u00e9es": {}, + "6325-Frais d\u2019actes et de contentieux": {}, + "6326-R\u00e9mun\u00e9rations d\u2019affacturage": {}, + "6327-R\u00e9mun\u00e9rations des autres prestataires de services": {}, + "6328-Divers frais": {} + }, + "633-Frais de formation du personnel": {}, + "634-Redevances pour brevets, licences, logiciels, concessions et droits et valeurs similaires": { + "6342-Redevances pour brevets, licences": {}, + "6343-Redevances pour logiciels": {}, + "6344-Redevances pour marques": {}, + "6345-Redevances pour sites internet": {}, + "6346-Redevances pour concessions, droits et valeurs similaires": {} + }, + "635-Cotisations": { + "6351-Cotisations": {}, + "6358-Concours divers": {} + }, + "637-R\u00e9mun\u00e9rations de personnel ext\u00e9rieur \u00e0 l\u2019entit\u00e9": { + "6371-Personnel int\u00e9rimaire": {}, + "6372-Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": {} + }, + "638-Autres charges externes": { + "6381-Frais de recrutement du personnel": {}, + "6382-Frais de d\u00e9m\u00e9nagement": {}, + "6383-R\u00e9ceptions": {}, + "6384-Missions": {}, + "6385-Charges de copropri\u00e9t\u00e9": {} + } + }, + "64-Imp\u00f4ts et taxes": { + "641-Imp\u00f4ts et taxes directs": { + "6411-Imp\u00f4ts fonciers et taxes annexes": {}, + "6412-Patentes, licences et taxes annexes": {}, + "6413-Taxes sur appointements et salaires": {}, + "6414-Taxes d\u2019apprentissage": {}, + "6415-Formation professionnelle continue": {}, + "6418-Autres imp\u00f4ts et taxes directs": {} + }, + "645-Imp\u00f4ts et taxes indirects": {}, + "646-Droits d\u2019enregistrement": { + "6461-Droits de mutation": {}, + "6462-Droits de timbre": {}, + "6463-Taxes sur les v\u00e9hicules de soci\u00e9t\u00e9": {}, + "6464-Vignettes": {}, + "6468-Autres droits": {} + }, + "647-P\u00e9nalit\u00e9s, amendes fiscales": { + "6471-P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts directs": {}, + "6472-P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts indirects": {}, + "6473-P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts directs": {}, + "6474-P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts indirects": {}, + "6478-Autres p\u00e9nalit\u00e9s et amendes fiscales": {} + }, + "648-Autres imp\u00f4ts et taxes": {} + }, + "65-Autres charges": { + "651-Pertes sur cr\u00e9ances clients et autres d\u00e9biteurs": { + "6511-Clients": {}, + "6515-Autres d\u00e9biteurs": {} + }, + "652-Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "6521-Quote-part transf\u00e9r\u00e9e de b\u00e9n\u00e9fices (comptabilit\u00e9 du g\u00e9rant)": {}, + "6525-Pertes imput\u00e9es par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": {} + }, + "654-Valeurs comptables des cessions courantes d\u2019immobilisations": { + "6541-Immobilisations incorporelles": {}, + "6542-Immobilisations corporelles": {} + }, + "656-Perte de change sur cr\u00e9ances et dettes commerciale": {}, + "657-P\u00e9nalit\u00e9s et amendes p\u00e9nales": {}, + "658-Charges diverses": { + "6581-Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": {}, + "6582-Dons": {}, + "6583-M\u00e9c\u00e9nat": {}, + "6588-Autres charges diverses": {} + }, + "659-Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "6591-Sur risques \u00e0 court terme": {}, + "6593-Sur stocks": {}, + "6594-Sur cr\u00e9ances": {}, + "6598-Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme": {} + } + }, + "66-Charges de personnel": { + "661-R\u00e9mun\u00e9rations directes vers\u00e9es au personnel national": { + "6611-Appointements salaires et commissions": {}, + "6612-Primes et gratifications": {}, + "6613-Cong\u00e9s pay\u00e9s": {}, + "6614-Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": {}, + "6615-Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": {}, + "6616-Suppl\u00e9ment familial": {}, + "6617-Avantages en nature": {}, + "6618-Autres r\u00e9mun\u00e9rations directes": {} + }, + "662-R\u00e9mun\u00e9rations directes vers\u00e9es au personnel non national": { + "6621-Appointements salaires et commissions": {}, + "6622-Primes et gratifications": {}, + "6623-Cong\u00e9s pay\u00e9s": {}, + "6624-Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": {}, + "6625-Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": {}, + "6626-Suppl\u00e9ment familial": {}, + "6627-Avantages en nature": {}, + "6628-Autres r\u00e9mun\u00e9rations directes": {} + }, + "663-Indemnit\u00e9s forfaitaires vers\u00e9es au personnel": { + "6631-Indemnit\u00e9s de logement": {}, + "6632-Indemnit\u00e9s de repr\u00e9sentation": {}, + "6633-Indemnit\u00e9s d\u2019expatriation": {}, + "6634-Indemnit\u00e9s de transport": {}, + "6638-Autres indemnit\u00e9s et avantages divers": {} + }, + "664-Charges sociales": { + "6641-Charges sociales sur r\u00e9mun\u00e9ration du personnel national": {}, + "6642-Charges sociales sur r\u00e9mun\u00e9ration du personnel non national": {} + }, + "666-R\u00e9mun\u00e9rations et charges sociales de l\u2019exploitant individuel": { + "6661-R\u00e9mun\u00e9ration du travail de l\u2019exploitant": {}, + "6662-Charges sociales": {} + }, + "667-R\u00e9mun\u00e9ration transf\u00e9r\u00e9e de personnel ext\u00e9rieur": { + "6671-Personnel int\u00e9rimaire": {}, + "6672-Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": {} + }, + "668-Autres charges sociales": { + "6681-Versements aux syndicats et comit\u00e9s d\u2019entreprise, d\u2019\u00e9tablissement": {}, + "6682-Versements aux comit\u00e9s d\u2019hygi\u00e8ne et de s\u00e9curit\u00e9": {}, + "6683-Versements et contributions aux autres \u0153uvres sociales": {}, + "6684-M\u00e9decine du travail et pharmacie": {}, + "6685-Assurances et organismes de sant\u00e9": {}, + "6686-Assurances retraite et fonds de pension": {}, + "6687-Majorations et p\u00e9nalit\u00e9s sociales": {}, + "6688-Charges sociales diverses": {} + } + }, + "67-Frais financiers et charges assimil\u00e9es": { + "671-Int\u00e9r\u00eats des emprunts": { + "6711-Emprunts obligataires": {}, + "6712-Emprunts aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": {}, + "6713-Dettes li\u00e9es \u00e0 des participations": {}, + "6714-Primes de remboursement des obligations": {} + }, + "672-Int\u00e9r\u00eats dans loyers de location acquisition": { + "6722-Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail immobilier": {}, + "6723-Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail mobilier": {}, + "6724-Int\u00e9r\u00eats dans loyers de location acquisition / location-vente": {}, + "6728-Int\u00e9r\u00eats dans loyers des autres locations acquisition": {} + }, + "673-Escomptes accord\u00e9s": {}, + "674-Autres int\u00e9r\u00eats": { + "6741-Avances re\u00e7ues et d\u00e9p\u00f4ts cr\u00e9diteurs": {}, + "6742-Comptes courants bloqu\u00e9s": {}, + "6743-Int\u00e9r\u00eats sur obligations cautionn\u00e9es": {}, + "6744-Int\u00e9r\u00eats sur dettes commerciales": {}, + "6745-Int\u00e9r\u00eats bancaires et sur op\u00e9rations de financement (escompte...)": {}, + "6748-Int\u00e9r\u00eats sur dettes diverses": {} + }, + "675-Escomptes des effets de commerce": {}, + "676-Pertes de change financi\u00e8res": {}, + "677-Pertes sur titres de placement": { + "6771-Pertes sur cessions de titres de placement": {}, + "6772-Mali provenant d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": {} + }, + "678-Pertes et charges sur risques financiers": { + "6781-Sur rentes viag\u00e8res": {}, + "6782-Sur op\u00e9rations financi\u00e8res": {}, + "6784-Sur instruments de tr\u00e9sorerie": {} + }, + "679-Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "6791-Sur risques financiers": {}, + "6795-Sur titres de placement": {}, + "6798-Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": {} + } + }, + "68-Dotations aux amortissements": { + "681-Dotations aux amortissements d\u2019exploitation": { + "6812-Dotations aux amortissements des immobilisations incorporelles": {}, + "6813-Dotations aux amortissements des immobilisations corporelles": {} + } + }, + "69-Dotations aux provisions et aux d\u00e9pr\u00e9ciations": { + "691-Dotations aux provisions et aux d\u00e9pr\u00e9ciations d\u2019exploitation": { + "6911-Dotations aux provisions pour risques et charges": {}, + "6913-Dotations aux d\u00e9pr\u00e9ciations des immobilisations incorporelles": {}, + "6914-Dotations aux d\u00e9pr\u00e9ciations des immobilisations corporelles": {} + }, + "697-Dotations aux provisions et aux d\u00e9pr\u00e9ciations financi\u00e8res": { + "6971-Dotations aux provisions pour risques et charges": {}, + "6972-Dotations aux d\u00e9pr\u00e9ciations des immobilisations financi\u00e8res": {} + } + }, + "root_type": "Expense" + }, + "7-Comptes de produits des activit\u00e9s ordinaires": { + "70-Ventes": { + "701-Ventes de marchandises": { + "7011-Dans la R\u00e9gion": {}, + "7012-Hors R\u00e9gion": {}, + "7013-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7014-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7015-Sur internet": {}, + "7019-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "702-Ventes de produits finis": { + "7021-Dans la R\u00e9gion": {}, + "7022-Hors R\u00e9gion": {}, + "7023-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7024-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7025-Sur internet": {}, + "7029-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "703-Ventes de produits interm\u00e9diaires": { + "7031-Dans la R\u00e9gion": {}, + "7032-Hors R\u00e9gion": {}, + "7033-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7034-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7035-Sur internet": {}, + "7039-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "704-Ventes de produits r\u00e9siduels": { + "7041-Dans la R\u00e9gion": {}, + "7042-Hors R\u00e9gion": {}, + "7043-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7044-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7045-Sur internet": {}, + "7049-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "705-Travaux factur\u00e9s": { + "7051-Dans la R\u00e9gion": {}, + "7052-Hors R\u00e9gion": {}, + "7053-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7054-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7055-Sur internet": {}, + "7059-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "706-Services vendus": { + "7061-Dans la R\u00e9gion": {}, + "7062-Hors R\u00e9gion": {}, + "7063-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7064-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7065-Sur internet": {}, + "7069-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "707-Produits accessoires": { + "7071-Ports, emballages perdus et autres frais factur\u00e9s": {}, + "7072-Commissions et courtages": {}, + "7073-Locations": {}, + "7074-Bonis sur reprises et cessions d\u2019emballages": {}, + "7075-Mise \u00e0 disposition de personnel": {}, + "7076-Redevances pour brevets, logiciels, marques et droits similaires": {}, + "7077-Services exploit\u00e9s dans l\u2019int\u00e9r\u00eat du personnel": {}, + "7078-Autres produits accessoires": {} + } + }, + "71-Subventions d\u2019exploitation": { + "711-Sur produits \u00e0 l\u2019exportation": {}, + "712-Sur produits \u00e0 l\u2019importation": {}, + "713-Sur produits de p\u00e9r\u00e9quation": {}, + "714-Indemnit\u00e9s et subventions d\u2019exploitation (entit\u00e9 agricole)": {}, + "718-Autres subventions d\u2019exploitation": { + "7181-Vers\u00e9es par l\u2019\u00c9tat et les collectivit\u00e9s publiques": {}, + "7182-Vers\u00e9es par les organismes internationaux": {}, + "7183-Vers\u00e9es par des tiers": {} + } + }, + "72-Production immobilis\u00e9e": { + "721-Immobilisations incorporelles": {}, + "722-Immobilisations corporelles": { + "7221-Immobilisations corporelles (hors actifs biologiques)": {}, + "7222-Immobilisations corporelles (actifs biologiques)": {} + }, + "724-Production auto-consomm\u00e9e": {}, + "726-Immobilisations financi\u00e8res": {} + }, + "73-Variations des stocks de biens et de services produits": { + "734-Variations des stocks de produits en cours": { + "7341-Produits en cours": {}, + "7342-Travaux en cours": {} + }, + "735-Variations des en-cours de services": { + "7351-\u00c9tudes en cours": {}, + "7352-Prestations de services en cours": {} + }, + "736-Variations des stocks de produits finis": {}, + "737-Variations des stocks de produits interm\u00e9diaires et r\u00e9siduels": { + "7371-Produits interm\u00e9diaires": {}, + "7372-Produits r\u00e9siduels": {} + } + }, + "75-Autres produits": { + "751-Profits sur cr\u00e9ances clients et autres d\u00e9biteurs": {}, + "752-Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "7521-Quote-part transf\u00e9r\u00e9e de pertes (comptabilit\u00e9 du g\u00e9rant)": {}, + "7525-B\u00e9n\u00e9fices attribu\u00e9s par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": {} + }, + "754-Produits des cessions courantes d\u2019immobilisations": { + "7541-Immobilisations incorporelles": {}, + "7542-Immobilisations corporelles": {} + }, + "756-Gains de change sur cr\u00e9ances et dettes commerciales": {}, + "758-Produits divers": { + "7581-Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": {}, + "7582-Indemnit\u00e9s d\u2019assurances re\u00e7ues": {}, + "7588-Autres produits divers": {} + }, + "759-Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "7591-Sur risques \u00e0 court terme": {}, + "7593-Sur stocks": {}, + "7594-Sur cr\u00e9ances": {}, + "7598-Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": {} + } + }, + "77-Revenus financiers et produits assimil\u00e9s": { + "771-Int\u00e9r\u00eats de pr\u00eats et cr\u00e9ances diverses": { + "7712-Int\u00e9r\u00eats de pr\u00eats": {}, + "7713-Int\u00e9r\u00eats sur cr\u00e9ances diverses": {} + }, + "772-Revenus de participations et autres titres immobilis\u00e9s": { + "7721-Revenus des titres de participation": {}, + "7722-Revenus autres titres immobilis\u00e9s": {} + }, + "773-Escomptes obtenus": {}, + "774-Revenus de placement": { + "7745-Revenus des obligations": {}, + "7746-Revenus des titres de placement": {} + }, + "775-Int\u00e9r\u00eats dans loyers de location acquisition": {}, + "776-Gains de change financiers": {}, + "777-Gains sur cessions de titres de placement": {}, + "778-Gains sur risques financiers": { + "7781-Sur rentes viag\u00e8res": {}, + "7782-Sur op\u00e9rations financi\u00e8res": {}, + "7784-Sur instruments de tr\u00e9sorerie": {} + }, + "779-Reprises de charges pour d\u00e9pr\u00e9ciations et provisions \u00e0 court terme financi\u00e8res": { + "7791-Sur risques financiers": {}, + "7795-Sur titres de placement": {}, + "7798-Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": {} + } + }, + "78-Transferts de charges": { + "781-Transferts de charges d\u2019exploitation": {}, + "787-Transferts de charges financi\u00e8res": {} + }, + "79-Reprises de provisions, de d\u00e9pr\u00e9ciations et autres": { + "791-Reprises de provisions et d\u00e9pr\u00e9ciations d\u2019exploitation": { + "7911-Pour risques et charges": {}, + "7913-Des immobilisations incorporelles": {}, + "7914-Des immobilisations corporelles": {} + }, + "797-Reprises de provisions et d\u00e9pr\u00e9ciations financi\u00e8res": { + "7971-Pour risques et charges": {}, + "7972-Des immobilisations financi\u00e8res": {} + }, + "798-Reprises d\u2019amortissements": {}, + "799-Reprises de subventions d\u2019investissement": {} + }, + "root_type": "Income" + }, + "8-Comptes des autres charges et des autres produits (CHARGES)": { + "81-Valeurs comptables des cessions d\u2019immobilisations": { + "811-Immobilisations incorporelles": {}, + "812-Immobilisations corporelles": {}, + "816-Immobilisations financi\u00e8res": {} + }, + "83-Charges hors activit\u00e9s ordinaires": { + "831-Charges HAO constat\u00e9es": {}, + "833-Charges li\u00e9es aux op\u00e9rations de restructuration": {}, + "834-Pertes sur cr\u00e9ances HAO": {}, + "835-Dons et lib\u00e9ralit\u00e9s accord\u00e9s": {}, + "836-Abandons de cr\u00e9ances consentis": {}, + "837-Charges li\u00e9es aux op\u00e9rations de liquidation": {}, + "839-Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": {} + }, + "85-Dotations hors activit\u00e9s ordinaires": { + "851-Dotations aux provisions r\u00e9glement\u00e9es": {}, + "852-Dotations aux amortissements HAO": {}, + "853-Dotations aux d\u00e9pr\u00e9ciations HAO": {}, + "854-Dotations aux provisions pour risques et charges HAO": {}, + "858-Autres dotations HAO": {} + }, + "87-Participation des travailleurs": { + "871-Participation l\u00e9gale aux b\u00e9n\u00e9fices": {}, + "874-Participation contractuelle aux b\u00e9n\u00e9fices": {}, + "878-Autres participations": {} + }, + "89-Imp\u00f4ts sur le r\u00e9sultat": { + "891-Imp\u00f4ts sur les b\u00e9n\u00e9fices de l\u2019exercice": { + "8911-Activit\u00e9s exerc\u00e9es dans l\u2019\u00c9tat": {}, + "8912-Activit\u00e9s exerc\u00e9es dans les autres \u00c9tats de la R\u00e9gion": {}, + "8913-Activit\u00e9s exerc\u00e9es hors R\u00e9gion": {} + }, + "892-Rappel d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": {}, + "895-Imp\u00f4t minimum forfaitaire IMF": {}, + "899-D\u00e9gr\u00e8vements et annulations d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": { + "8991-D\u00e9gr\u00e8vements": {}, + "8994-Annulations pour pertes r\u00e9troactives": {} + } + }, + "root_type": "Expense" + }, + "8-Comptes des autres charges et des autres produits (PRODUITS)": { + "82-Produits des cessions d\u2019immobilisations": { + "821-Immobilisations incorporelles": {}, + "822-Immobilisations corporelles": {}, + "826-Immobilisations financi\u00e8res": {} + }, + "84-Produits hors activit\u00e9s ordinaires": { + "841-Produits HAO constat\u00e9s": {}, + "843-Produits li\u00e9s aux op\u00e9rations de restructuration": {}, + "844-Indemnit\u00e9s et subventions HAO (entit\u00e9 agricole)": {}, + "845-Dons et lib\u00e9ralit\u00e9s obtenus": {}, + "846-Abandons de cr\u00e9ances obtenus": {}, + "847-Produits li\u00e9s aux op\u00e9rations de liquidation": {}, + "848-Transferts de charges HAO": {}, + "849-Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": {} + }, + "86-Reprises de charges, provisions et d\u00e9pr\u00e9ciations HAO": { + "861-Reprises de provisions r\u00e9glement\u00e9es": {}, + "862-Reprises d\u2019amortissements HAO": {}, + "863-Reprises de d\u00e9pr\u00e9ciations HAO": {}, + "864-Reprises de provisions pour risques et charges HAO": {}, + "868-Autres reprises HAO": {} + }, + "88-Subventions d\u2019\u00e9quilibre": { + "881-\u00c9tat": {}, + "884-Collectivit\u00e9s publiques": {}, + "886-Groupe": {}, + "888-Autres": {} + }, + "root_type": "Income" + } + } +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/cg_plan_comptable_avec_code.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/cg_plan_comptable_avec_code.json new file mode 100644 index 00000000000..8abdaf2bfbf --- /dev/null +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/cg_plan_comptable_avec_code.json @@ -0,0 +1,4208 @@ +{ + "country_code": "cg", + "name": "Syscohada - Plan Comptable avec code", + "tree": { + "Comptes de ressources durables": { + "Capital": { + "Capital social": { + "Capital souscrit, non appel\u00e9": { + "account_number": "1011" + }, + "Capital souscrit, appel\u00e9, non vers\u00e9": { + "account_number": "1012" + }, + "Capital souscrit, appel\u00e9, vers\u00e9, non amorti": { + "account_number": "1013" + }, + "Capital souscrit, appel\u00e9, vers\u00e9, amorti": { + "account_number": "1014" + }, + "Capital souscrit soumis \u00e0 des conditions particuli\u00e8res": { + "account_number": "1018" + }, + "account_number": "101" + }, + "Capital par dotation": { + "Dotation initiale": { + "account_number": "1021" + }, + "Dotations compl\u00e9mentaires": { + "account_number": "1022" + }, + "Autres dotations": { + "account_number": "1028" + }, + "account_number": "102" + }, + "Capital personnel": { + "account_number": "103" + }, + "Compte de l\u2019exploitant": { + "Apports temporaires": { + "account_number": "1041" + }, + "Op\u00e9rations courantes": { + "account_number": "1042" + }, + "R\u00e9mun\u00e9rations, imp\u00f4ts et autres charges personnelles": { + "account_number": "1043" + }, + "Pr\u00e9l\u00e8vements d\u2019autoconsommation": { + "account_number": "1047" + }, + "Autres pr\u00e9l\u00e8vements": { + "account_number": "1048" + }, + "account_number": "104" + }, + "Primes li\u00e9es au capital social": { + "Primes d\u2019\u00e9mission": { + "account_number": "1051" + }, + "Primes d\u2019apport": { + "account_number": "1052" + }, + "Primes de fusion": { + "account_number": "1053" + }, + "Primes de conversion": { + "account_number": "1054" + }, + "Autres primes": { + "account_number": "1058" + }, + "account_number": "105" + }, + "\u00c9carts de r\u00e9\u00e9valuation": { + "\u00c9carts de r\u00e9\u00e9valuation l\u00e9gale": { + "account_number": "1061" + }, + "\u00c9carts de r\u00e9\u00e9valuation libre": { + "account_number": "1062" + }, + "account_number": "106" + }, + "Apporteurs, capital souscrit, non appel\u00e9": { + "account_number": "109" + }, + "account_number": "10" + }, + "R\u00e9serves": { + "R\u00e9serve l\u00e9gale": { + "account_number": "111" + }, + "R\u00e9serves statutaires ou contractuelles": { + "account_number": "112" + }, + "R\u00e9serves r\u00e9glement\u00e9es": { + "R\u00e9serves de plus-values nettes \u00e0 long terme": { + "account_number": "1131" + }, + "R\u00e9serves d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": { + "account_number": "1132" + }, + "R\u00e9serves cons\u00e9cutives \u00e0 l\u2019octroi de subventions d\u2019investissement": { + "account_number": "1133" + }, + "R\u00e9serves des valeurs mobili\u00e8res donnant acc\u00e8s au capital": { + "account_number": "1134" + }, + "Autres r\u00e9serves r\u00e9glement\u00e9es": { + "account_number": "1135" + }, + "account_number": "113" + }, + "Autres r\u00e9serves": { + "R\u00e9serves facultatives": { + "account_number": "1181" + }, + "R\u00e9serves diverses": { + "account_number": "1188" + }, + "account_number": "118" + }, + "account_number": "11" + }, + "Report \u00e0 nouveau": { + "Report \u00e0 nouveau cr\u00e9diteur": { + "account_number": "121" + }, + "Report \u00e0 nouveau d\u00e9biteur": { + "Perte nette \u00e0 reporter": { + "account_number": "1291" + }, + "Perte Amortissements r\u00e9put\u00e9s diff\u00e9r\u00e9s": { + "account_number": "1292" + }, + "account_number": "129" + }, + "account_number": "12" + }, + "R\u00e9sultat net de l\u2019exercice": { + "R\u00e9sultat en instance d\u2019affectation": { + "R\u00e9sultat en instance d\u2019affectation : b\u00e9n\u00e9fice": { + "account_number": "1301" + }, + "R\u00e9sultat en instance d\u2019affectation : perte": { + "account_number": "1309" + }, + "account_number": "130" + }, + "R\u00e9sultat net : b\u00e9n\u00e9fice": { + "account_number": "131" + }, + "Marge commerciale (MC)": { + "account_number": "132" + }, + "Valeur ajout\u00e9e (VA)": { + "account_number": "133" + }, + "Exc\u00e9dent brut d\u2019exploitation (EBE)": { + "account_number": "134" + }, + "R\u00e9sultat d\u2019exploitation (RE)": { + "account_number": "135" + }, + "R\u00e9sultat financier (RF)": { + "account_number": "136" + }, + "R\u00e9sultat des activit\u00e9s ordinaires (RAO)": { + "account_number": "137" + }, + "R\u00e9sultat hors activit\u00e9s ordinaires (RHAO)": { + "R\u00e9sultat de fusion": { + "account_number": "1381" + }, + "R\u00e9sultat d\u2019apport partiel d\u2019actif": { + "account_number": "1382" + }, + "R\u00e9sultat de scission": { + "account_number": "1383" + }, + "R\u00e9sultat de liquidation": { + "account_number": "1384" + }, + "account_number": "138" + }, + "R\u00e9sultat net : perte": { + "account_number": "139" + }, + "account_number": "13" + }, + "Subventions d\u2019investissement": { + "Subventions d\u2019\u00e9quipement": { + "\u00c9tat": { + "account_number": "1411" + }, + "R\u00e9gions": { + "account_number": "1412" + }, + "D\u00e9partements": { + "account_number": "1413" + }, + "Communes et collectivit\u00e9s publiques d\u00e9centralis\u00e9es": { + "account_number": "1414" + }, + "Entit\u00e9s publiques ou mixtes": { + "account_number": "1415" + }, + "Entit\u00e9s et organismes priv\u00e9s": { + "account_number": "1416" + }, + "Organismes internationaux": { + "account_number": "1417" + }, + "Autres": { + "account_number": "1418" + }, + "account_number": "141" + }, + "Autres subventions d\u2019investissement": { + "account_number": "148" + }, + "account_number": "14" + }, + "Provisions r\u00e9glement\u00e9es et fonds assimil\u00e9s": { + "Amortissements d\u00e9rogatoires": { + "account_number": "151" + }, + "Plus-values de cession \u00e0 r\u00e9investir": { + "account_number": "152" + }, + "Fonds r\u00e9glement\u00e9s": { + "Fonds National": { + "account_number": "1531" + }, + "Pr\u00e9l\u00e8vement pour le Budget": { + "account_number": "1532" + }, + "account_number": "153" + }, + "Provisions sp\u00e9ciales de r\u00e9\u00e9valuation": { + "account_number": "154" + }, + "Provisions r\u00e9glement\u00e9es relatives aux immobilisations": { + "Reconstitution des gisements miniers et p\u00e9troliers": { + "account_number": "1551" + }, + "account_number": "155" + }, + "Provisions r\u00e9glement\u00e9es relatives aux stocks": { + "Hausse de prix": { + "account_number": "1561" + }, + "Fluctuation des cours": { + "account_number": "1562" + }, + "account_number": "156" + }, + "Provisions pour investissement": { + "account_number": "157" + }, + "Autres provisions et fonds r\u00e9glement\u00e9s": { + "account_number": "158" + }, + "account_number": "15" + }, + "Emprunts et dettes assimil\u00e9es": { + "Emprunts obligataires": { + "Emprunts obligataires ordinaires": { + "account_number": "1611" + }, + "Emprunts obligataires convertibles en actions": { + "account_number": "1612" + }, + "Emprunts obligataires remboursables en actions": { + "account_number": "1613" + }, + "Autres emprunts obligataires": { + "account_number": "1618" + }, + "account_number": "161" + }, + "Emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": { + "account_number": "162" + }, + "Avances re\u00e7ues de l\u2019\u00c9tat": { + "account_number": "163" + }, + "Avances re\u00e7ues et comptes courants bloqu\u00e9s": { + "account_number": "164" + }, + "D\u00e9p\u00f4ts et cautionnements re\u00e7us": { + "D\u00e9p\u00f4ts": { + "account_number": "1651" + }, + "Cautionnements": { + "account_number": "1652" + }, + "account_number": "165" + }, + "Int\u00e9r\u00eats courus": { + "Sur emprunts obligataires": { + "account_number": "1661" + }, + "Sur emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": { + "account_number": "1662" + }, + "Sur avances re\u00e7ues de l\u2019\u00c9tat": { + "account_number": "1663" + }, + "Sur avances re\u00e7ues et comptes courants bloqu\u00e9s": { + "account_number": "1664" + }, + "Sur d\u00e9p\u00f4ts et cautionnements re\u00e7us": { + "account_number": "1665" + }, + "Sur avances assorties de conditions particuli\u00e8res": { + "account_number": "1667" + }, + "Sur autres emprunts et dettes": { + "account_number": "1668" + }, + "account_number": "166" + }, + "Avances assorties de conditions particuli\u00e8res": { + "Avances bloqu\u00e9es pour augmentation du capital": { + "account_number": "1671" + }, + "Avances conditionn\u00e9es par l\u2019\u00c9tat": { + "account_number": "1672" + }, + "Avances conditionn\u00e9es par les autres organismes africains": { + "account_number": "1673" + }, + "Avances conditionn\u00e9es par les organismes internationaux": { + "account_number": "1674" + }, + "account_number": "167" + }, + "Autres emprunts et dettes": { + "Rentes viag\u00e8res capitalis\u00e9es": { + "account_number": "1681" + }, + "Billets de fonds": { + "account_number": "1682" + }, + "Dettes cons\u00e9cutives \u00e0 des titres emprunt\u00e9s": { + "account_number": "1683" + }, + "Emprunts participatifs": { + "account_number": "1684" + }, + "Participation des travailleurs aux b\u00e9n\u00e9fices": { + "account_number": "1685" + }, + "Emprunts et dettes contract\u00e9s aupr\u00e8s des autres tiers": { + "account_number": "1686" + }, + "account_number": "168" + }, + "account_number": "16" + }, + "Dettes de location acquisition": { + "Dettes de location acquisition / cr\u00e9dit bail immobilier": { + "account_number": "172" + }, + "Dettes de location acquisition / cr\u00e9dit bail mobilier": { + "account_number": "173" + }, + "Dettes de location acquisition / location de vente": { + "account_number": "174" + }, + "Int\u00e9r\u00eats courus": { + "Sur dettes de location acquisition / cr\u00e9dit-bail immobilier": { + "account_number": "1762" + }, + "Sur dettes de location acquisition / cr\u00e9dit-bail mobilier": { + "account_number": "1763" + }, + "Sur dettes de location acquisition / location-vente": { + "account_number": "1764" + }, + "Sur autres dettes de location acquisition": { + "account_number": "1768" + }, + "account_number": "176" + }, + "Autres dettes de location acquisition": { + "account_number": "178" + }, + "account_number": "17" + }, + "Dettes li\u00e9es \u00e0 des participations et comptes de liaison des \u00e9tablissements et soci\u00e9t\u00e9s en participation": { + "Dettes li\u00e9es \u00e0 des participations": { + "Dettes li\u00e9es \u00e0 des participations (groupe)": { + "account_number": "1811" + }, + "Dettes li\u00e9es \u00e0 des participations (hors groupe)": { + "account_number": "1812" + }, + "account_number": "181" + }, + "Dettes li\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": { + "account_number": "182" + }, + "Int\u00e9r\u00eats courus sur dettes li\u00e9es \u00e0 des participations": { + "account_number": "183" + }, + "Comptes permanents bloqu\u00e9s des \u00e9tablissements et succursales": { + "account_number": "184" + }, + "Comptes permanents non bloqu\u00e9s des \u00e9tablissements et succursales": { + "account_number": "185" + }, + "Comptes de liaison charges": { + "account_number": "186" + }, + "Comptes de liaison produits": { + "account_number": "187" + }, + "Comptes de liaison des soci\u00e9t\u00e9s en participation": { + "account_number": "188" + }, + "account_number": "18" + }, + "Provisions pour risques et charges": { + "Provisions pour litiges": { + "account_number": "191" + }, + "Provisions pour garanties donn\u00e9es aux clients": { + "account_number": "192" + }, + "Provisions pour pertes sur march\u00e9s \u00e0 ach\u00e8vement futur": { + "account_number": "193" + }, + "Provisions pour pertes de change": { + "account_number": "194" + }, + "Provisions pour imp\u00f4ts": { + "account_number": "195" + }, + "Provisions pour pensions et obligations similaires": { + "Provisions pour pensions et obligations similaires engagement de retraite": { + "account_number": "1961" + }, + "Actif du r\u00e9gime de retraite": { + "account_number": "1962" + }, + "account_number": "196" + }, + "Provisions pour restructuration": { + "account_number": "197" + }, + "Autres provisions pour risques et charges": { + "Provisions pour amendes et p\u00e9nalit\u00e9s": { + "account_number": "1981" + }, + "Provisions pour propre assureur": { + "account_number": "1983" + }, + "Provisions pour d\u00e9mant\u00e8lement et remise en \u00e9tat": { + "account_number": "1984" + }, + "Provisions pour droits \u00e0 r\u00e9duction ou avantage en nature (ch\u00e8ques cadeau, cartes de fid\u00e9lit\u00e9...)": { + "account_number": "1985" + }, + "Provisions pour divers risques et charges": { + "account_number": "1988" + }, + "account_number": "198" + }, + "account_number": "19" + }, + "root_type": "Equity", + "account_number": "1" + }, + "Comptes d\u2019actif immobilis\u00e9": { + "Immobilisations incorporelles": { + "account_type": "Fixed Asset", + "Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset", + "account_number": "211" + }, + "Brevets, licences, concessions et droits similaires": { + "account_type": "Fixed Asset", + "Brevets": { + "account_type": "Fixed Asset", + "account_number": "2121" + }, + "Licences": { + "account_type": "Fixed Asset", + "account_number": "2122" + }, + "Concessions de service public": { + "account_type": "Fixed Asset", + "account_number": "2123" + }, + "Autres concessions et droits similaires": { + "account_type": "Fixed Asset", + "account_number": "2128" + }, + "account_number": "212" + }, + "Logiciels et sites internet": { + "account_type": "Fixed Asset", + "Logiciels": { + "account_type": "Fixed Asset", + "account_number": "2131" + }, + "Sites internet": { + "account_type": "Fixed Asset", + "account_number": "2132" + }, + "account_number": "213" + }, + "Marques": { + "account_type": "Fixed Asset", + "account_number": "214" + }, + "Fonds commercial": { + "account_type": "Fixed Asset", + "account_number": "215" + }, + "Droit au bail": { + "account_type": "Fixed Asset", + "account_number": "216" + }, + "Investissements de cr\u00e9ation": { + "account_type": "Fixed Asset", + "account_number": "217" + }, + "Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset", + "Frais de prospection et d\u2019\u00e9valuation de ressources min\u00e9rales": { + "account_type": "Fixed Asset", + "account_number": "2181" + }, + "Co\u00fbts d\u2019obtention du contrat": { + "account_type": "Fixed Asset", + "account_number": "2182" + }, + "Fichiers clients, notices, titres de journaux et magazines": { + "account_type": "Fixed Asset", + "account_number": "2183" + }, + "Co\u00fbts des franchises": { + "account_type": "Fixed Asset", + "account_number": "2184" + }, + "Divers droits et valeurs incorporelles": { + "account_type": "Fixed Asset", + "account_number": "2188" + }, + "account_number": "218" + }, + "Immobilisations incorporelles en cours": { + "account_type": "Fixed Asset", + "Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset", + "account_number": "2191" + }, + "Logiciels et internet": { + "account_type": "Fixed Asset", + "account_number": "2193" + }, + "Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset", + "account_number": "2198" + }, + "account_number": "219" + }, + "account_number": "21" + }, + "Terrains": { + "account_type": "Fixed Asset", + "Terrains agricoles et forestiers": { + "account_type": "Fixed Asset", + "Terrains d\u2019exploitation agricole": { + "account_type": "Fixed Asset", + "account_number": "2211" + }, + "Terrains d\u2019exploitation foresti\u00e8re": { + "account_type": "Fixed Asset", + "account_number": "2212" + }, + "Autres terrains": { + "account_type": "Fixed Asset", + "account_number": "2218" + }, + "account_number": "221" + }, + "Terrains nus": { + "account_type": "Fixed Asset", + "Terrains \u00e0 b\u00e2tir": { + "account_type": "Fixed Asset", + "account_number": "2221" + }, + "Autres terrains nus": { + "account_type": "Fixed Asset", + "account_number": "2228" + }, + "account_number": "222" + }, + "Terrains b\u00e2tis": { + "account_type": "Fixed Asset", + "Pour b\u00e2timents industriels et agricoles": { + "account_type": "Fixed Asset", + "account_number": "2231" + }, + "Pour b\u00e2timents administratifs et commerciaux": { + "account_type": "Fixed Asset", + "account_number": "2232" + }, + "Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations professionnelles": { + "account_type": "Fixed Asset", + "account_number": "2234" + }, + "Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations non professionnelles": { + "account_type": "Fixed Asset", + "account_number": "2235" + }, + "Autres terrains b\u00e2tis": { + "account_type": "Fixed Asset", + "account_number": "2238" + }, + "account_number": "223" + }, + "Travaux de mise en valeur des terrains": { + "account_type": "Fixed Asset", + "Plantation d\u2019arbres et d\u2019arbustes": { + "account_type": "Fixed Asset", + "account_number": "2241" + }, + "Am\u00e9liorations du fonds": { + "account_type": "Fixed Asset", + "account_number": "2245" + }, + "Autres travaux": { + "account_type": "Fixed Asset", + "account_number": "2248" + }, + "account_number": "224" + }, + "Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset", + "Carri\u00e8res": { + "account_type": "Fixed Asset", + "account_number": "2251" + }, + "account_number": "225" + }, + "Terrains am\u00e9nag\u00e9s": { + "account_type": "Fixed Asset", + "Parkings": { + "account_type": "Fixed Asset", + "account_number": "2261" + }, + "account_number": "226" + }, + "Terrains mis en concession": { + "account_type": "Fixed Asset", + "account_number": "227" + }, + "Autres terrains": { + "account_type": "Fixed Asset", + "Terrains immeubles de placement": { + "account_type": "Fixed Asset", + "account_number": "2281" + }, + "Terrains des logements affect\u00e9s au personnel": { + "account_type": "Fixed Asset", + "account_number": "2285" + }, + "Terrains de location acquisition": { + "account_type": "Fixed Asset", + "account_number": "2286" + }, + "Divers terrains": { + "account_type": "Fixed Asset", + "account_number": "2288" + }, + "account_number": "228" + }, + "Am\u00e9nagements de terrains en cours": { + "account_type": "Fixed Asset", + "Terrains agricoles et forestiers": { + "account_type": "Fixed Asset", + "account_number": "2291" + }, + "Terrains nus": { + "account_type": "Fixed Asset", + "account_number": "2292" + }, + "Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset", + "account_number": "2295" + }, + "Autres terrains": { + "account_type": "Fixed Asset", + "account_number": "2298" + }, + "account_number": "229" + }, + "account_number": "22" + }, + "B\u00e2timents, installations techniques et agencements": { + "B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "B\u00e2timents industriels": { + "account_number": "2311" + }, + "B\u00e2timents agricoles": { + "account_number": "2312" + }, + "B\u00e2timents administratifs et commerciaux": { + "account_number": "2313" + }, + "B\u00e2timents affect\u00e9s au logement du personnel": { + "account_number": "2314" + }, + "B\u00e2timents immeubles de placement": { + "account_number": "2315" + }, + "B\u00e2timents de location acquisition": { + "account_number": "2316" + }, + "account_number": "231" + }, + "B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "B\u00e2timents industriels": { + "account_number": "2321" + }, + "B\u00e2timents agricoles": { + "account_number": "2322" + }, + "B\u00e2timents administratifs et commerciaux": { + "account_number": "2323" + }, + "B\u00e2timents affect\u00e9s au logement du personnel": { + "account_number": "2324" + }, + "B\u00e2timents immeubles de placement": { + "account_number": "2325" + }, + "B\u00e2timents de location acquisition": { + "account_number": "2326" + }, + "account_number": "232" + }, + "Ouvrages d\u2019infrastructure": { + "Voies de terre": { + "account_number": "2331" + }, + "Voies de fer": { + "account_number": "2332" + }, + "Voies d\u2019eau": { + "account_number": "2333" + }, + "Barrages, Digues": { + "account_number": "2334" + }, + "Pistes d\u2019a\u00e9rodrome": { + "account_number": "2335" + }, + "Autres ouvrages d\u2019infrastructures": { + "account_number": "2338" + }, + "account_number": "233" + }, + "Am\u00e9nagements, agencements et installations techniques": { + "Installations complexes sp\u00e9cialis\u00e9es sur sol propre": { + "account_number": "2341" + }, + "Installations complexes sp\u00e9cialis\u00e9es sur sol d\u2019autrui": { + "account_number": "2342" + }, + "Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol propre": { + "account_number": "2343" + }, + "Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol d\u2019autrui": { + "account_number": "2344" + }, + "Am\u00e9nagements et agencements des b\u00e2timents": { + "account_number": "2345" + }, + "account_number": "234" + }, + "Am\u00e9nagements de bureaux": { + "Installations g\u00e9n\u00e9rales": { + "account_number": "2351" + }, + "Autres am\u00e9nagements de bureaux": { + "account_number": "2358" + }, + "account_number": "235" + }, + "B\u00e2timents industriels, agricoles et commerciaux mis en concession": { + "account_number": "237" + }, + "Autres installations et agencements": { + "account_number": "238" + }, + "B\u00e2timents am\u00e9nagements, agencements et installations en cours": { + "B\u00e2timents en cours": { + "account_number": "2391" + }, + "Installations en cours": { + "account_number": "2392" + }, + "Ouvrages d\u2019infrastructure en cours": { + "account_number": "2393" + }, + "Am\u00e9nagements et agencements et installations techniques en cours": { + "account_number": "2394" + }, + "Am\u00e9nagements de bureaux en cours": { + "account_number": "2395" + }, + "Autres installations et agencements en cours": { + "account_number": "2398" + }, + "account_number": "239" + }, + "account_number": "23" + }, + "Mat\u00e9riel, mobilier et actifs biologiques": { + "Mat\u00e9riel et outillage industriel et commercial": { + "Mat\u00e9riel industriel": { + "account_number": "2411" + }, + "Outillage industriel": { + "account_number": "2412" + }, + "Mat\u00e9riel commercial": { + "account_number": "2413" + }, + "Outillage commercial": { + "account_number": "2414" + }, + "Mat\u00e9riel & outillage industriel et commercial de location-acquisition": { + "account_number": "2416" + }, + "account_number": "241" + }, + "Mat\u00e9riel et outillage agricole": { + "Mat\u00e9riel agricole": { + "account_number": "2421" + }, + "Outillage agricole": { + "account_number": "2422" + }, + "Mat\u00e9riel & outillage agricole de location-acquisition": { + "account_number": "2426" + }, + "account_number": "242" + }, + "Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "243" + }, + "Mat\u00e9riel et mobilier": { + "Mat\u00e9riel de bureau": { + "account_number": "2441" + }, + "Mat\u00e9riel informatique": { + "account_number": "2442" + }, + "Mat\u00e9riel bureautique": { + "account_number": "2443" + }, + "Mobilier de bureau": { + "account_number": "2444" + }, + "Mat\u00e9riel et mobilier immeubles de placement": { + "account_number": "2445" + }, + "Mat\u00e9riel et mobilier de location acquisition": { + "account_number": "2446" + }, + "Mat\u00e9riel et mobilier des logements du personnel": { + "account_number": "2447" + }, + "account_number": "244" + }, + "Mat\u00e9riel de transport": { + "Mat\u00e9riel automobile": { + "account_number": "2451" + }, + "Mat\u00e9riel ferroviaire": { + "account_number": "2452" + }, + "Mat\u00e9riel fluvial, lagunaire": { + "account_number": "2453" + }, + "Mat\u00e9riel naval": { + "account_number": "2454" + }, + "Mat\u00e9riel a\u00e9rien": { + "account_number": "2455" + }, + "Mat\u00e9riel de transport de location-acquisition": { + "account_number": "2456" + }, + "Mat\u00e9riel hippomobile": { + "account_number": "2457" + }, + "Autres mat\u00e9riels de transport": { + "account_number": "2458" + }, + "account_number": "245" + }, + "Actifs biologiques": { + "Cheptel, animaux de trait": { + "account_number": "2461" + }, + "Cheptel, animaux reproducteurs": { + "account_number": "2462" + }, + "Animaux de garde": { + "account_number": "2463" + }, + "Plantations agricoles": { + "account_number": "2465" + }, + "Autres actifs biologiques": { + "account_number": "2468" + }, + "account_number": "246" + }, + "Agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "Agencements et am\u00e9nagements du mat\u00e9riel": { + "account_number": "2471" + }, + "Agencements et am\u00e9nagements des actifs biologiques": { + "account_number": "2472" + }, + "Autres agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "account_number": "2478" + }, + "account_number": "247" + }, + "Autres mat\u00e9riels et mobiliers": { + "Collections et \u0153uvres d\u2019art": { + "account_number": "2481" + }, + "Divers mat\u00e9riels mobiliers": { + "account_number": "2488" + }, + "account_number": "248" + }, + "Mat\u00e9riels et actifs biologiques en cours": { + "Mat\u00e9riel et outillage industriel et commercial": { + "account_number": "2491" + }, + "Mat\u00e9riel et outillage agricole": { + "account_number": "2492" + }, + "Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "2493" + }, + "Mat\u00e9riel et mobilier de bureau": { + "account_number": "2494" + }, + "Mat\u00e9riel de transport": { + "account_number": "2495" + }, + "Actifs biologiques": { + "account_number": "2496" + }, + "Agencements am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "account_number": "2497" + }, + "Autres mat\u00e9riels et actifs biologiques en cours": { + "account_number": "2498" + }, + "account_number": "249" + }, + "account_number": "24" + }, + "Avances et acomptes vers\u00e9s sur immobilisations": { + "Avances et acomptes vers\u00e9s sur immobilisations incorporelles": { + "account_number": "251" + }, + "Avances et acomptes vers\u00e9s sur immobilisations corporelles": { + "account_number": "252" + }, + "account_number": "25" + }, + "Titres de participation": { + "Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": { + "account_number": "261" + }, + "Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le conjoint": { + "account_number": "262" + }, + "Titres de participation dans des soci\u00e9t\u00e9s conf\u00e9rant une influence notable": { + "account_number": "263" + }, + "Participations dans des organismes professionnels": { + "account_number": "265" + }, + "Parts dans des groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": { + "account_number": "266" + }, + "Autres titres de participation": { + "account_number": "268" + }, + "account_number": "26" + }, + "Autres immobilisations financi\u00e8res": { + "Pr\u00eats et cr\u00e9ances": { + "Pr\u00eats participatifs": { + "account_number": "2711" + }, + "Pr\u00eats aux associ\u00e9s": { + "account_number": "2712" + }, + "Billets de fonds": { + "account_number": "2713" + }, + "Titres pr\u00eat\u00e9s": { + "account_number": "2714" + }, + "Autres pr\u00eats et cr\u00e9ances": { + "account_number": "2718" + }, + "account_number": "271" + }, + "Pr\u00eats au personnel": { + "Pr\u00eats immobiliers": { + "account_number": "2721" + }, + "Pr\u00eats mobiliers et d\u2019installation": { + "account_number": "2722" + }, + "Autres pr\u00eats au personnel": { + "account_number": "2728" + }, + "account_number": "272" + }, + "Cr\u00e9ances sur l\u2019\u00c9tat": { + "Retenues de garantie": { + "account_number": "2731" + }, + "Fonds r\u00e9glement\u00e9": { + "account_number": "2733" + }, + "Cr\u00e9ances sur le conc\u00e9dant": { + "account_number": "2734" + }, + "Autres cr\u00e9ances sur l\u2019\u00c9tat": { + "account_number": "2738" + }, + "account_number": "273" + }, + "Titres immobilis\u00e9s": { + "Titres immobilis\u00e9s de l\u2019activit\u00e9 de portefeuille (TIAP)": { + "account_number": "2741" + }, + "Titres participatifs": { + "account_number": "2742" + }, + "Certificats d\u2019investissement": { + "account_number": "2743" + }, + "Parts de fonds commun de placement (FCP)": { + "account_number": "2744" + }, + "Obligations": { + "account_number": "2745" + }, + "Actions ou parts propres": { + "account_number": "2746" + }, + "Autres titres immobilis\u00e9s": { + "account_number": "2748" + }, + "account_number": "274" + }, + "D\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "D\u00e9p\u00f4ts pour loyers d\u2019avance": { + "account_number": "2751" + }, + "D\u00e9p\u00f4ts pour l\u2019\u00e9lectricit\u00e9": { + "account_number": "2752" + }, + "D\u00e9p\u00f4ts pour l\u2019eau": { + "account_number": "2753" + }, + "D\u00e9p\u00f4ts pour le gaz": { + "account_number": "2754" + }, + "D\u00e9p\u00f4ts pour le t\u00e9l\u00e9phone, le t\u00e9lex, la t\u00e9l\u00e9copie": { + "account_number": "2755" + }, + "Cautionnements sur march\u00e9s publics": { + "account_number": "2756" + }, + "Cautionnements sur autres op\u00e9rations": { + "account_number": "2757" + }, + "Autres d\u00e9p\u00f4ts et cautionnements": { + "account_number": "2758" + }, + "account_number": "275" + }, + "Int\u00e9r\u00eats courus": { + "Pr\u00eats et cr\u00e9ances non commerciales": { + "account_number": "2761" + }, + "Pr\u00eats au personnel": { + "account_number": "2762" + }, + "Cr\u00e9ances sur l\u2019\u00c9tat": { + "account_number": "2763" + }, + "Titres immobilis\u00e9s": { + "account_number": "2764" + }, + "D\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "account_number": "2765" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations": { + "account_number": "2767" + }, + "Immobilisations financi\u00e8res diverses": { + "account_number": "2768" + }, + "account_number": "276" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": { + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations (groupe)": { + "account_number": "2771" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations (hors groupe)": { + "account_number": "2772" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": { + "account_number": "2773" + }, + "Avances \u00e0 des Groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": { + "account_number": "2774" + }, + "account_number": "277" + }, + "Immobilisations financi\u00e8res diverses": { + "Cr\u00e9ances diverses groupe": { + "account_number": "2781" + }, + "Cr\u00e9ances diverses hors groupe": { + "account_number": "2782" + }, + "Banques d\u00e9p\u00f4ts \u00e0 terme": { + "account_number": "2784" + }, + "Or et m\u00e9taux pr\u00e9cieux": { + "account_number": "2785" + }, + "Autres immobilisations financi\u00e8res": { + "account_number": "2788" + }, + "account_number": "278" + }, + "account_number": "27" + }, + "Amortissements": { + "account_type": "Accumulated Depreciation", + "Amortissements des immobilisations corporelles": { + "account_type": "Accumulated Depreciation", + "Amortissements des frais de d\u00e9veloppement": { + "account_type": "Accumulated Depreciation", + "account_number": "2811" + }, + "Amortissements des brevets, licences, concessions et droits similaires": { + "account_type": "Accumulated Depreciation", + "account_number": "2812" + }, + "Amortissements des logiciels et sites internet": { + "account_type": "Accumulated Depreciation", + "account_number": "2813" + }, + "Amortissements des marques": { + "account_type": "Accumulated Depreciation", + "account_number": "2814" + }, + "Amortissements du fonds commercial": { + "account_type": "Accumulated Depreciation", + "account_number": "2815" + }, + "Amortissements du droit au bail": { + "account_type": "Accumulated Depreciation", + "account_number": "2816" + }, + "Amortissements des investissements de cr\u00e9ation": { + "account_type": "Accumulated Depreciation", + "account_number": "2817" + }, + "Amortissements des autres droits et valeurs incorporels": { + "account_type": "Accumulated Depreciation", + "account_number": "2818" + }, + "account_number": "281" + }, + "Amortissements des terrains": { + "Amortissements des travaux de mise en valeur des terrains": { + "account_number": "2824" + }, + "account_number": "282" + }, + "Amortissements des b\u00e2timents, installations techniques et agencements": { + "Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "account_number": "2831" + }, + "Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "account_number": "2832" + }, + "Amortissements des ouvrages d\u2019infrastructure": { + "account_number": "2833" + }, + "Amortissements des am\u00e9nagements, agencements et installations techniques": { + "account_number": "2834" + }, + "Amortissements des am\u00e9nagements de bureaux": { + "account_number": "2835" + }, + "Amortissements des b\u00e2timents industriels, agricoles et commerciaux mis en concession": { + "account_number": "2837" + }, + "Amortissements des autres installations et agencements": { + "account_number": "2838" + }, + "account_number": "283" + }, + "Amortissements du mat\u00e9riel": { + "Amortissements du mat\u00e9riel et outillage industriel et commercial": { + "account_number": "2841" + }, + "Amortissements du mat\u00e9riel et outillage agricole": { + "account_number": "2842" + }, + "Amortissements du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "2843" + }, + "Amortissements du mat\u00e9riel et mobilier": { + "account_number": "2844" + }, + "Amortissements du mat\u00e9riel de transport": { + "account_number": "2845" + }, + "Amortissements des actifs biologiques": { + "account_number": "2846" + }, + "Amortissements des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": { + "account_number": "2847" + }, + "Amortissements des autres mat\u00e9riels": { + "account_number": "2848" + }, + "account_number": "284" + }, + "account_number": "28" + }, + "D\u00e9pr\u00e9ciations des immobilisations": { + "D\u00e9pr\u00e9ciations des immobilisations incorporelles": { + "D\u00e9pr\u00e9ciations des frais de d\u00e9veloppement": { + "account_number": "2911" + }, + "D\u00e9pr\u00e9ciations des brevets, licences, concessions et droits similaires": { + "account_number": "2912" + }, + "D\u00e9pr\u00e9ciations des logiciels et sites internet": { + "account_number": "2913" + }, + "D\u00e9pr\u00e9ciations des marques": { + "account_number": "2914" + }, + "D\u00e9pr\u00e9ciations du fonds commercial": { + "account_number": "2915" + }, + "D\u00e9pr\u00e9ciations du droit au bail": { + "account_number": "2916" + }, + "D\u00e9pr\u00e9ciations des investissements de cr\u00e9ation": { + "account_number": "2917" + }, + "D\u00e9pr\u00e9ciations des autres droits et valeurs incorporels": { + "account_number": "2918" + }, + "D\u00e9pr\u00e9ciations des immobilisations incorporelles en cours": { + "account_number": "2919" + }, + "account_number": "291" + }, + "D\u00e9pr\u00e9ciations des terrains": { + "D\u00e9pr\u00e9ciations des terrains agricoles et forestiers": { + "account_number": "2921" + }, + "D\u00e9pr\u00e9ciations des terrains nus": { + "account_number": "2922" + }, + "D\u00e9pr\u00e9ciations des terrains b\u00e2tis": { + "account_number": "2923" + }, + "D\u00e9pr\u00e9ciations des travaux de mise en valeur des terrains": { + "account_number": "2924" + }, + "D\u00e9pr\u00e9ciations des terrains de gisement": { + "account_number": "2925" + }, + "D\u00e9pr\u00e9ciations des terrains am\u00e9nag\u00e9s": { + "account_number": "2926" + }, + "D\u00e9pr\u00e9ciations des terrains mis en concession": { + "account_number": "2927" + }, + "D\u00e9pr\u00e9ciations des autres terrains": { + "account_number": "2928" + }, + "D\u00e9pr\u00e9ciations des am\u00e9nagements de terrains en cours": { + "account_number": "2929" + }, + "account_number": "292" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents, installations techniques et agencements": { + "D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "account_number": "2931" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "account_number": "2932" + }, + "D\u00e9pr\u00e9ciations des ouvrages d\u2019infrastructures": { + "account_number": "2933" + }, + "D\u00e9pr\u00e9ciations des am\u00e9nagements, agencements et installations techniques": { + "account_number": "2934" + }, + "D\u00e9pr\u00e9ciations des am\u00e9nagements de bureaux": { + "account_number": "2935" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles et commerciaux mis en concession": { + "account_number": "2937" + }, + "D\u00e9pr\u00e9ciations des autres installations et agencements": { + "account_number": "2938" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents et installations en cours": { + "account_number": "2939" + }, + "account_number": "293" + }, + "D\u00e9pr\u00e9ciations de mat\u00e9riel, du mobilier et de l\u2019actif biologique": { + "D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage industriel et commercial": { + "account_number": "2941" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage agricole": { + "account_number": "2942" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "2943" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel et mobilier": { + "account_number": "2944" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel de transport": { + "account_number": "2945" + }, + "D\u00e9pr\u00e9ciations des actifs biologiques": { + "account_number": "2946" + }, + "D\u00e9pr\u00e9ciations des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": { + "account_number": "2947" + }, + "D\u00e9pr\u00e9ciations des autres mat\u00e9riels": { + "account_number": "2948" + }, + "D\u00e9pr\u00e9ciations de mat\u00e9riel en cours": { + "account_number": "2949" + }, + "account_number": "294" + }, + "D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations": { + "D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations incorporelles": { + "account_number": "2951" + }, + "D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations corporelles": { + "account_number": "2952" + }, + "account_number": "295" + }, + "D\u00e9pr\u00e9ciations des titres de participation": { + "D\u00e9pr\u00e9ciations des titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": { + "account_number": "2961" + }, + "D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s sous contr\u00f4le conjoint": { + "account_number": "2962" + }, + "D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s conf\u00e9rant une influence notable": { + "account_number": "2963" + }, + "D\u00e9pr\u00e9ciations des participations dans des organismes professionnels": { + "account_number": "2965" + }, + "D\u00e9pr\u00e9ciations des parts dans des GIE": { + "account_number": "2966" + }, + "D\u00e9pr\u00e9ciations des autres titres de participation": { + "account_number": "2968" + }, + "account_number": "296" + }, + "D\u00e9pr\u00e9ciations des autres immobilisations financi\u00e8res": { + "D\u00e9pr\u00e9ciations des pr\u00eats et cr\u00e9ances": { + "account_number": "2971" + }, + "D\u00e9pr\u00e9ciations des pr\u00eats au personnel": { + "account_number": "2972" + }, + "D\u00e9pr\u00e9ciations des cr\u00e9ances sur l\u2019\u00c9tat": { + "account_number": "2973" + }, + "D\u00e9pr\u00e9ciations des titres immobilis\u00e9s": { + "account_number": "2974" + }, + "D\u00e9pr\u00e9ciations des d\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "account_number": "2975" + }, + "D\u00e9pr\u00e9ciations des cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": { + "account_number": "2977" + }, + "D\u00e9pr\u00e9ciations des cr\u00e9ances financi\u00e8res diverses": { + "account_number": "2978" + }, + "account_number": "297" + }, + "account_number": "29" + }, + "root_type": "Asset", + "account_number": "2" + }, + "Comptes de Stocks": { + "Marchandises": { + "Marchandises A": { + "Marchandises A1": { + "account_number": "3111" + }, + "Marchandises A2": { + "account_number": "3112" + }, + "account_number": "311" + }, + "Marchandises B": { + "Marchandises B1": { + "account_number": "3121" + }, + "Marchandises B2": { + "account_number": "3122" + }, + "account_number": "312" + }, + "Actifs biologiques": { + "Animaux": { + "account_number": "3131" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3132" + }, + "account_number": "313" + }, + "Marchandises hors activit\u00e9s ordinaires (HAO)": { + "account_number": "318" + }, + "account_number": "31" + }, + "Mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "Mati\u00e8res A": { + "account_number": "321" + }, + "Mati\u00e8res B": { + "account_number": "322" + }, + "Fournitures (A, B)": { + "account_number": "323" + }, + "account_number": "32" + }, + "Autres approvisionnements": { + "Mati\u00e8res consommables": { + "account_number": "331" + }, + "Fournitures d\u2019atelier et d\u2019usine": { + "account_number": "332" + }, + "Fournitures de magasin": { + "account_number": "333" + }, + "Fournitures de bureau": { + "account_number": "334" + }, + "Emballages": { + "Emballages perdus": { + "account_number": "3351" + }, + "Emballages r\u00e9cup\u00e9rables non identifiables": { + "account_number": "3352" + }, + "Emballages \u00e0 usage mixte": { + "account_number": "3353" + }, + "Autres emballages": { + "account_number": "3358" + }, + "account_number": "335" + }, + "Autres mati\u00e8res": { + "account_number": "338" + }, + "account_number": "33" + }, + "Produits en cours": { + "Produits en cours": { + "Produits en cours P1": { + "account_number": "3411" + }, + "Produits en cours P2": { + "account_number": "3412" + }, + "account_number": "341" + }, + "Travaux en cours": { + "Travaux en cours T1": { + "account_number": "3421" + }, + "Travaux en cours T2": { + "account_number": "3422" + }, + "account_number": "342" + }, + "Produits interm\u00e9diaires en cours": { + "Produits interm\u00e9diaires A": { + "account_number": "3431" + }, + "Produits interm\u00e9diaires B": { + "account_number": "3432" + }, + "account_number": "343" + }, + "Produits r\u00e9siduels en cours": { + "Produits r\u00e9siduels A": { + "account_number": "3441" + }, + "Produits r\u00e9siduels B": { + "account_number": "3442" + }, + "account_number": "344" + }, + "Actifs biologiques en cours": { + "Animaux": { + "account_number": "3451" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3452" + }, + "account_number": "345" + }, + "account_number": "34" + }, + "Services en cours": { + "\u00c9tudes en cours": { + "\u00c9tudes en cours E1": { + "account_number": "3511" + }, + "\u00c9tudes en cours E2": { + "account_number": "3512" + }, + "account_number": "351" + }, + "Prestations de services en cours": { + "Prestations de services S1": { + "account_number": "3521" + }, + "Prestations de services S2": { + "account_number": "3522" + } + }, + "account_number": "35" + }, + "Produits finis": { + "Produits finis A": { + "account_number": "361" + }, + "Produits finis B": { + "account_number": "362" + }, + "Actifs biologiques": { + "Animaux": { + "account_number": "3631" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3632" + }, + "Autres stocks (activit\u00e9s annexes)": { + "account_number": "3638" + }, + "account_number": "363" + }, + "account_number": "36" + }, + "Produits interm\u00e9diaires et r\u00e9siduels": { + "Produits interm\u00e9diaires": { + "Produits interm\u00e9diaires A": { + "account_number": "3711" + }, + "Produits interm\u00e9diaires B": { + "account_number": "3712" + }, + "account_number": "371" + }, + "Produits r\u00e9siduels": { + "D\u00e9chets": { + "account_number": "3721" + }, + "Rebuts": { + "account_number": "3722" + }, + "Mati\u00e8res de R\u00e9cup\u00e9ration": { + "account_number": "3723" + }, + "account_number": "372" + }, + "Actifs biologiques": { + "Animaux": { + "account_number": "3731" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3732" + }, + "Autres stocks (activit\u00e9s annexes)": { + "account_number": "3738" + }, + "account_number": "373" + }, + "account_number": "37" + }, + "Stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": { + "account_type": "Stock", + "Marchandises en cours de route": { + "account_number": "381" + }, + "Mati\u00e8res premi\u00e8res et fournitures li\u00e9es en cours de route": { + "account_number": "382" + }, + "Autres approvisionnements en cours de route": { + "account_number": "383" + }, + "Produits finis en cours de route": { + "account_number": "386" + }, + "Stock en consignation ou en d\u00e9p\u00f4t": { + "Stock en consignation": { + "account_number": "3871" + }, + "Stock en d\u00e9p\u00f4t": { + "account_number": "3872" + }, + "account_number": "387" + }, + "Stock provenant d\u2019immobilisations mises hors service ou au rebut": { + "account_number": "388" + }, + "account_number": "38" + }, + "D\u00e9pr\u00e9ciations des stocks et encours de production": { + "D\u00e9pr\u00e9ciations des stocks de marchandises": { + "account_number": "391" + }, + "D\u00e9pr\u00e9ciations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "account_number": "392" + }, + "D\u00e9pr\u00e9ciations des stocks d\u2019autres approvisionnements": { + "account_number": "393" + }, + "D\u00e9pr\u00e9ciations des productions en cours": { + "account_number": "394" + }, + "D\u00e9pr\u00e9ciations des services en cours": { + "account_number": "395" + }, + "D\u00e9pr\u00e9ciations des stocks de produits finis": { + "account_number": "396" + }, + "D\u00e9pr\u00e9ciations des stocks de produits interm\u00e9diaires et r\u00e9siduels": { + "account_number": "397" + }, + "D\u00e9pr\u00e9ciations des stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": { + "account_number": "398" + }, + "account_number": "39" + }, + "root_type": "Asset", + "account_number": "3" + }, + "4-Comptes de Tiers (ACTIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (ACTIF)": { + "Fournisseurs d\u00e9biteurs": { + "Fournisseurs Avances et acomptes vers\u00e9s": { + "account_number": "4091" + }, + "Fournisseurs Groupe avances et acomptes vers\u00e9s": { + "account_number": "4092" + }, + "Fournisseurs Sous-traitants avances et acomptes vers\u00e9s": { + "account_number": "4093" + }, + "Fournisseurs Cr\u00e9ances pour emballages et mat\u00e9riels \u00e0 rendre": { + "account_number": "4094" + }, + "Fournisseurs Rabais, remises, ristournes et autres avoirs \u00e0 obtenir": { + "account_number": "4098" + }, + "account_number": "409" + } + }, + "41-Clients et comptes rattach\u00e9s (ACTIF)": { + "Clients": { + "Clients": { + "account_type": "Receivable", + "account_number": "4111" + }, + "Clients groupe": { + "account_type": "Receivable", + "account_number": "4112" + }, + "Clients, \u00c9tat et Collectivit\u00e9s publiques": { + "account_type": "Receivable", + "account_number": "4114" + }, + "Clients, organismes internationaux": { + "account_type": "Receivable", + "account_number": "4115" + }, + "Clients, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Receivable", + "account_number": "4116" + }, + "Client, retenues de garantie": { + "account_type": "Receivable", + "account_number": "4117" + }, + "Clients, d\u00e9gr\u00e8vement de taxes sur la valeur ajout\u00e9e (TVA)": { + "account_type": "Receivable", + "account_number": "4118" + }, + "account_type": "Receivable", + "account_number": "411" + }, + "Clients, effets \u00e0 recevoir en portefeuille": { + "Clients, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4121" + }, + "Clients Groupe, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4122" + }, + "\u00c9tat et Collectivit\u00e9s publiques, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4124" + }, + "Organismes Internationaux, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4125" + }, + "account_type": "Receivable", + "account_number": "412" + }, + "Clients, ch\u00e8ques, effets et autres valeurs impay\u00e9es": { + "Clients, ch\u00e8ques impay\u00e9s": { + "account_type": "Receivable", + "account_number": "4131" + }, + "Clients, effets impay\u00e9s": { + "account_type": "Receivable", + "account_number": "4132" + }, + "Clients, cartes de cr\u00e9dit impay\u00e9es": { + "account_type": "Receivable", + "account_number": "4133" + }, + "Clients, autres valeurs impay\u00e9es": { + "account_type": "Receivable", + "account_number": "4138" + }, + "account_type": "Receivable", + "account_number": "413" + }, + "Cr\u00e9ances sur cessions courantes d\u2019immobilisations": { + "Cr\u00e9ances en compte, immobilisations incorporelles": { + "account_type": "Receivable", + "account_number": "4141" + }, + "Cr\u00e9ances en compte, immobilisations corporelles": { + "account_type": "Receivable", + "account_number": "4142" + }, + "Effets \u00e0 recevoir, immobilisations incorporelles": { + "account_type": "Receivable", + "account_number": "4146" + }, + "Effets \u00e0 recevoir, immobilisations corporelles": { + "account_type": "Receivable", + "account_number": "4147" + }, + "account_type": "Receivable", + "account_number": "414" + }, + "Clients, effets escompt\u00e9s non \u00e9chus": { + "account_type": "Receivable", + "account_number": "415" + }, + "Cr\u00e9ances clients litigieuses ou douteuses": { + "Cr\u00e9ances litigieuses": { + "account_type": "Receivable", + "account_number": "4161" + }, + "Cr\u00e9ances douteuses": { + "account_type": "Receivable", + "account_number": "4162" + }, + "account_type": "Receivable", + "account_number": "416" + }, + "Clients, produits \u00e0 recevoir": { + "Clients, factures \u00e0 \u00e9tablir": { + "account_type": "Receivable", + "account_number": "4181" + }, + "Clients, int\u00e9r\u00eats courus": { + "account_type": "Receivable", + "account_number": "4186" + }, + "account_type": "Receivable", + "account_number": "418" + }, + "account_type": "Receivable" + }, + "42-Personnel (ACTIF)": { + "Personnel, avances et acomptes": { + "Personnel, avances": { + "account_number": "4211" + }, + "Personnel, acomptes": { + "account_number": "4212" + }, + "Frais avanc\u00e9s et fournitures au personnel": { + "account_number": "4213" + }, + "account_number": "421" + } + }, + "43-Organismes sociaux (ACTIF)": { + "431-S\u00e9curit\u00e9 sociale": { + "Prestations familiales": { + "account_number": "4311" + }, + "Accidents de travail": { + "account_number": "4312" + }, + "Caisse de retraite obligatoire": { + "account_number": "4313" + }, + "Caisse de retraite facultative": { + "account_number": "4314" + }, + "Autres cotisations sociales": { + "account_number": "4318" + } + }, + "432-Caisses de retraite compl\u00e9mentaire": {}, + "433-Autres organismes sociaux": { + "Mutuelle": { + "account_number": "4331" + }, + "Assurances retraite": { + "account_number": "4332" + }, + "Assurances et organismes de sant\u00e9": { + "account_number": "4333" + } + }, + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "Produits \u00e0 recevoir": { + "account_number": "4387" + } + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (ACTIF)": { + "\u00c9tat, TVA factur\u00e9e": { + "TVA factur\u00e9e sur ventes": { + "account_number": "4431" + }, + "TVA factur\u00e9e sur prestations de services": { + "account_number": "4432" + }, + "TVA factur\u00e9e sur travaux": { + "account_number": "4433" + }, + "TVA factur\u00e9e sur production livr\u00e9e \u00e0 soi-m\u00eame": { + "account_number": "4434" + }, + "TVA sur factures \u00e0 \u00e9tablir": { + "account_number": "4435" + }, + "account_number": "443" + }, + "\u00c9tat, TVA r\u00e9cup\u00e9rable": { + "TVA r\u00e9cup\u00e9rable sur immobilisations": { + "account_number": "4451" + }, + "TVA r\u00e9cup\u00e9rable sur achats": { + "account_number": "4452" + }, + "TVA r\u00e9cup\u00e9rable sur transport": { + "account_number": "4453" + }, + "TVA r\u00e9cup\u00e9rable sur services ext\u00e9rieurs et autres charges": { + "account_number": "4454" + }, + "TVA r\u00e9cup\u00e9rable sur factures non parvenues": { + "account_number": "4455" + }, + "TVA transf\u00e9r\u00e9e par d\u2019autres entit\u00e9s": { + "account_number": "4456" + }, + "account_number": "445" + }, + "\u00c9tat, charges \u00e0 payer et produits \u00e0 recevoir": { + "Charges \u00e0 payer": { + "account_number": "4486" + }, + "Produits \u00e0 recevoir": { + "account_number": "4487" + }, + "account_number": "448" + }, + "\u00c9tat, cr\u00e9ances et dettes diverses": { + "\u00c9tat, obligations cautionn\u00e9es": { + "account_number": "4491" + }, + "\u00c9tat, avances et acomptes vers\u00e9s sur imp\u00f4ts": { + "account_number": "4492" + }, + "\u00c9tat, fonds de dotation \u00e0 recevoir": { + "account_number": "4493" + }, + "\u00c9tat, subventions investissement \u00e0 recevoir": { + "account_number": "4494" + }, + "\u00c9tat, subventions d\u2019exploitation \u00e0 recevoir": { + "account_number": "4495" + }, + "\u00c9tat, subventions d\u2019\u00e9quilibre \u00e0 recevoir": { + "account_number": "4496" + }, + "\u00c9tat, avances sur subventions": { + "account_number": "4497" + }, + "\u00c9tat, fonds r\u00e9glement\u00e9s provisionn\u00e9s": { + "account_number": "4499" + }, + "account_number": "449" + } + }, + "45-Organismes internationaux (ACTIF)": { + "Op\u00e9rations avec les organismes africains": { + "account_number": "451" + }, + "Op\u00e9rations avec les autres organismes internationaux": { + "account_number": "452" + }, + "Organismes internationaux, fonds de dotation et subventions \u00e0 recevoir": { + "Organismes internationaux, fonds de dotation \u00e0 recevoir": { + "account_number": "4581" + }, + "Organismes internationaux, subventions \u00e0 recevoir": { + "account_number": "4582" + }, + "account_number": "458" + } + }, + "46-Apporteurs, associ\u00e9s et groupe (ACTIF)": { + "461-Apporteurs, op\u00e9rations sur le capital": { + "Apporteurs, capital appel\u00e9, non vers\u00e9": { + "account_number": "4613" + }, + "Apporteurs, compte d\u2019apport, op\u00e9rations de restructuration (fusion...)": { + "account_number": "4614" + }, + "Apporteurs, titres \u00e0 \u00e9changer": { + "account_number": "4618" + } + }, + "Apporteurs, restant d\u00fb sur capital appel\u00e9": { + "account_number": "467" + } + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (ACTIF)": { + "472-Cr\u00e9ances et dettes sur titres de placement": { + "Cr\u00e9ances sur cessions de titres de placement": { + "account_number": "4721" + }, + "Versements restant \u00e0 effectuer sur titres de placement non lib\u00e9r\u00e9s": { + "account_number": "4726" + } + }, + "473-Interm\u00e9diaires Op\u00e9rations faites pour compte de tiers": { + "Mandants": { + "account_number": "4731" + }, + "Mandataires": { + "account_number": "4732" + }, + "Commettants": { + "account_number": "4733" + }, + "Commissionnaires": { + "account_number": "4734" + }, + "\u00c9tat, Collectivit\u00e9s publiques, fonds global d\u2019allocation": { + "account_number": "4739" + } + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits": { + "Compte de r\u00e9partition p\u00e9riodique des produits": { + "account_number": "4747" + } + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA": { + "Compte actif": { + "account_type": "Temporary", + "account_number": "4751" + } + }, + "Charges constat\u00e9es d\u2019avance": { + "account_number": "476" + }, + "478-\u00c9carts de conversion actif": { + "Diminution des cr\u00e9ances d\u2019exploitation": { + "account_number": "4781" + }, + "Diminution des cr\u00e9ances financi\u00e8res": { + "account_number": "4782" + }, + "Augmentation des dettes d\u2019exploitation": { + "account_number": "4783" + }, + "Augmentation des dettes financi\u00e8res": { + "account_number": "4784" + }, + "Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": { + "account_number": "4786" + }, + "Diff\u00e9rences compens\u00e9es par couverture de change": { + "account_number": "4788" + } + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (ACTIF)": { + "Cr\u00e9ances sur cessions d\u2019immobilisations": { + "En compte, immobilisations incorporelles": { + "account_number": "4851" + }, + "En compte, immobilisations corporelles": { + "account_number": "4852" + }, + "Effets \u00e0 recevoir, immobilisations incorporelles": { + "account_number": "4853" + }, + "Effets \u00e0 recevoir, immobilisations corporelles": { + "account_number": "4854" + }, + "Effets escompt\u00e9s non \u00e9chus": { + "account_number": "4855" + }, + "Retenues de garantie": { + "account_number": "4857" + }, + "Factures \u00e0 \u00e9tablir": { + "account_number": "4858" + }, + "account_number": "485" + }, + "Autres cr\u00e9ances hors activit\u00e9s ordinaires (HAO)": { + "account_number": "488" + } + }, + "49-D\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme (tiers) (ACTIF)": { + "D\u00e9pr\u00e9ciations des comptes clients": { + "Cr\u00e9ances litigieuses": { + "account_number": "4911" + }, + "Cr\u00e9ances douteuses": { + "account_number": "4912" + }, + "account_number": "491" + }, + "D\u00e9pr\u00e9ciations des comptes organismes internationaux": { + "account_number": "495" + }, + "D\u00e9pr\u00e9ciations des comptes apporteurs, associ\u00e9s et groupe": { + "Associ\u00e9s, comptes courants": { + "account_number": "4962" + }, + "Associ\u00e9s, op\u00e9rations faites en commun": { + "account_number": "4963" + }, + "Groupe, comptes courants": { + "account_number": "4966" + }, + "account_number": "496" + }, + "D\u00e9pr\u00e9ciations des comptes d\u00e9biteurs divers": { + "account_number": "497" + }, + "D\u00e9pr\u00e9ciations des comptes de cr\u00e9ances HAO": { + "Cr\u00e9ances sur cessions d\u2019immobilisations": { + "account_number": "4985" + }, + "Cr\u00e9ances sur cessions de titres de placement": { + "account_number": "4986" + }, + "Autres cr\u00e9ances HAO": { + "account_number": "4988" + }, + "account_number": "498" + }, + "Provisions pour risques \u00e0 court terme": { + "Sur op\u00e9rations d\u2019exploitation": { + "account_number": "4991" + }, + "Sur op\u00e9rations financi\u00e8res": { + "account_number": "4997" + }, + "Sur op\u00e9rations HAO": { + "account_number": "4998" + }, + "account_number": "499" + } + }, + "root_type": "Asset" + }, + "4-Comptes de Tiers (PASSIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (PASSIF)": { + "Fournisseurs, dettes en compte": { + "Fournisseurs": { + "account_type": "Payable", + "account_number": "4011" + }, + "Fournisseurs groupe": { + "account_type": "Payable", + "account_number": "4012" + }, + "Fournisseurs sous-traitants": { + "account_type": "Payable", + "account_number": "4013" + }, + "Fournisseurs, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Payable", + "account_number": "4016" + }, + "Fournisseur, retenues de garantie": { + "account_type": "Payable", + "account_number": "4017" + }, + "account_type": "Payable", + "account_number": "401" + }, + "Fournisseurs, effets \u00e0 payer": { + "Fournisseurs Effets \u00e0 payer": { + "account_type": "Payable", + "account_number": "4021" + }, + "Fournisseurs Groupe, effets \u00e0 payer": { + "account_type": "Payable", + "account_number": "4022" + }, + "Fournisseurs Sous-traitants, effets \u00e0 payer": { + "account_type": "Payable", + "account_number": "4023" + }, + "account_type": "Payable", + "account_number": "402" + }, + "Fournisseurs, acquisitions courantes d\u2019immobilisations": { + "Fournisseurs Dettes en comptes, immobilisations incorporelles": { + "account_type": "Payable", + "account_number": "4041" + }, + "Fournisseurs Dettes en comptes, immobilisations corporelles": { + "account_type": "Payable", + "account_number": "4042" + }, + "Fournisseurs Effets \u00e0 payer, immobilisations incorporelles": { + "account_type": "Payable", + "account_number": "4046" + }, + "Fournisseurs Effets \u00e0 payer, immobilisations corporelles": { + "account_type": "Payable", + "account_number": "4047" + }, + "account_type": "Payable", + "account_number": "404" + }, + "Fournisseurs, factures non parvenues": { + "Fournisseurs": { + "account_type": "Stock Received But Not Billed", + "account_number": "4081" + }, + "Fournisseurs groupe": { + "account_type": "Stock Received But Not Billed", + "account_number": "4082" + }, + "Fournisseurs sous-traitants": { + "account_type": "Stock Received But Not Billed", + "account_number": "4083" + }, + "Fournisseurs, int\u00e9r\u00eats courus": { + "account_type": "Stock Received But Not Billed", + "account_number": "4086" + }, + "account_type": "Stock Received But Not Billed", + "account_number": "408" + }, + "account_type": "Payable" + }, + "41-Clients et comptes rattach\u00e9s (PASSIF)": { + "Clients cr\u00e9diteurs": { + "Clients, avances et acomptes re\u00e7us": { + "account_number": "4191" + }, + "Clients groupe, avances et acomptes re\u00e7us": { + "account_number": "4192" + }, + "Clients, dettes pour emballages et mat\u00e9riels consign\u00e9s": { + "account_number": "4194" + }, + "Clients, rabais, remises, ristournes et autres avoirs \u00e0 accorder": { + "account_number": "4198" + }, + "account_number": "419" + } + }, + "42-Personnel (PASSIF)": { + "Personnel, r\u00e9mun\u00e9rations dues": { + "account_number": "422" + }, + "Personnel, oppositions, saisies-arr\u00eats": { + "Personnel, oppositions": { + "account_number": "4231" + }, + "Personnel, saisies-arr\u00eats": { + "account_number": "4232" + }, + "Personnel, avis \u00e0 tiers d\u00e9tenteur": { + "account_number": "4233" + }, + "account_number": "423" + }, + "Personnel, \u0153uvres sociales internes": { + "Assistance m\u00e9dicale": { + "account_number": "4241" + }, + "Allocations familiales": { + "account_number": "4242" + }, + "Organismes sociaux rattach\u00e9s \u00e0 l\u2019entit\u00e9": { + "account_number": "4245" + }, + "Autres \u0153uvres sociales internes": { + "account_number": "4248" + }, + "account_number": "424" + }, + "Repr\u00e9sentants du personnel": { + "D\u00e9l\u00e9gu\u00e9s du personnel": { + "account_number": "4251" + }, + "Syndicats et Comit\u00e9s d\u2019entreprises, d\u2019\u00c9tablissement": { + "account_number": "4252" + }, + "Autres repr\u00e9sentants du personnel": { + "account_number": "4258" + }, + "account_number": "425" + }, + "Personnel, participation aux b\u00e9n\u00e9fices et au capital": { + "Participation aux b\u00e9n\u00e9fices": { + "account_number": "4261" + }, + "Participation au capital": { + "account_number": "4264" + }, + "account_number": "426" + }, + "Personnel d\u00e9p\u00f4ts": { + "account_number": "427" + }, + "Personnel, charges \u00e0 payer et produits \u00e0 recevoir": { + "Dettes provisionn\u00e9es pour cong\u00e9s \u00e0 payer": { + "account_number": "4281" + }, + "Autres charges \u00e0 payer": { + "account_number": "4286" + }, + "Produits \u00e0 recevoir": { + "account_number": "4287" + }, + "account_number": "428" + } + }, + "43-Organismes sociaux (PASSIF)": { + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "Charges sociales sur gratifications \u00e0 payer": { + "account_number": "4381" + }, + "Charges sociales sur cong\u00e9s \u00e0 payer": { + "account_number": "4382" + }, + "Autres charges \u00e0 payer": { + "account_number": "4386" + } + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (PASSIF)": { + "\u00c9tat, imp\u00f4t sur les b\u00e9n\u00e9fices": { + "account_number": "441" + }, + "\u00c9tat, autres imp\u00f4ts et taxes": { + "Imp\u00f4ts et taxes d\u2019\u00c9tat": { + "account_number": "4421" + }, + "Imp\u00f4ts et taxes pour les collectivit\u00e9s publiques": { + "account_number": "4422" + }, + "Imp\u00f4ts et taxes recouvrables sur des obligataires": { + "account_number": "4423" + }, + "Imp\u00f4ts et taxes recouvrables sur des associ\u00e9s": { + "account_number": "4424" + }, + "Droits de douane": { + "account_number": "4426" + }, + "Autres imp\u00f4ts et taxes": { + "account_number": "4428" + }, + "account_number": "442" + }, + "\u00c9tat, TVA due ou cr\u00e9dit de TVA": { + "\u00c9tat, TVA due": { + "account_number": "4441" + }, + "\u00c9tat, cr\u00e9dit de TVA \u00e0 reporter": { + "account_number": "4449" + }, + "account_number": "444" + }, + "\u00c9tat, autres taxes sur le chiffre d\u2019affaires": { + "account_number": "446" + }, + "\u00c9tat, imp\u00f4ts retenus \u00e0 la source": { + "Imp\u00f4t G\u00e9n\u00e9ral sur le revenu": { + "account_number": "4471" + }, + "Imp\u00f4ts sur salaires": { + "account_number": "4472" + }, + "Contribution nationale": { + "account_number": "4473" + }, + "Contribution nationale de solidarit\u00e9": { + "account_number": "4474" + }, + "Autres imp\u00f4ts et contributions": { + "account_number": "4478" + }, + "account_number": "447" + } + }, + "46-Apporteurs, associ\u00e9s et groupe (PASSIF)": { + "461-Apporteurs, op\u00e9rations sur le capital (PASSIF)": { + "Apporteurs, apports en nature": { + "account_number": "4611" + }, + "Apporteurs, apports en num\u00e9raire": { + "account_number": "4612" + }, + "Apporteurs, versements re\u00e7us sur augmentation de capital": { + "account_number": "4615" + }, + "Apporteurs, versements anticip\u00e9s": { + "account_number": "4616" + }, + "Apporteurs d\u00e9faillants": { + "account_number": "4617" + }, + "Apporteurs, capital \u00e0 rembourser": { + "account_number": "4619" + } + }, + "462-Associ\u00e9s, comptes courants": { + "Principal": { + "account_number": "4621" + }, + "Int\u00e9r\u00eats courus": { + "account_number": "4626" + } + }, + "463-Associ\u00e9s, op\u00e9rations faites en commun et GIE": { + "Op\u00e9rations courantes": { + "account_number": "4631" + }, + "Int\u00e9r\u00eats courus": { + "account_number": "4636" + } + }, + "Associ\u00e9s, dividendes \u00e0 payer": { + "account_number": "465" + }, + "Groupe, comptes courants": { + "account_number": "466" + } + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (PASSIF)": { + "471-D\u00e9biteurs et cr\u00e9diteurs divers": { + "D\u00e9biteurs divers": { + "account_number": "4711" + }, + "Cr\u00e9diteurs divers": { + "account_number": "4712" + }, + "Obligataires": { + "account_number": "4713" + }, + "R\u00e9mun\u00e9rations d\u2019administrateurs": { + "account_number": "4715" + }, + "Compte d\u2019affacturage": { + "account_number": "4716" + }, + "D\u00e9biteurs divers retenues de garantie": { + "account_number": "4717" + }, + "Apport, compte de fusion et op\u00e9rations assimil\u00e9es": { + "account_number": "4718" + }, + "Bons de souscription d\u2019actions et d\u2019obligations": { + "account_number": "4719" + } + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits (PASSIF)": { + "Compte de r\u00e9partition p\u00e9riodique des charges": { + "account_number": "4746" + } + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA (PASSIF)": { + "Compte passif": { + "account_number": "4752" + } + }, + "Produits constat\u00e9s d\u2019avance": { + "account_number": "477" + }, + "479-\u00c9carts de conversion passif": { + "Augmentation des cr\u00e9ances d\u2019exploitation": { + "account_number": "4791" + }, + "Augmentation des cr\u00e9ances financi\u00e8res": { + "account_number": "4792" + }, + "Diminution des dettes d\u2019exploitation": { + "account_number": "4793" + }, + "Diminution des dettes financi\u00e8res": { + "account_number": "4794" + }, + "Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": { + "account_number": "4797" + }, + "Diff\u00e9rences compens\u00e9es par couverture de change": { + "account_number": "4798" + } + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (HAO) (PASSIF)": { + "Fournisseurs d\u2019investissements": { + "Immobilisations incorporelles": { + "account_number": "4811" + }, + "Immobilisations corporelles": { + "account_number": "4812" + }, + "Versements restant \u00e0 effectuer sur titres de participation et titres immobilis\u00e9s non lib\u00e9r\u00e9s": { + "account_number": "4813" + }, + "R\u00e9serve de propri\u00e9t\u00e9": { + "account_number": "4816" + }, + "Retenues de garantie": { + "account_number": "4817" + }, + "Factures non parvenues": { + "account_number": "4818" + }, + "account_number": "481" + }, + "Fournisseurs d\u2019investissements, effets \u00e0 payer": { + "Immobilisations incorporelles": { + "account_number": "4821" + }, + "Immobilisations corporelles": { + "account_number": "4822" + }, + "account_number": "482" + }, + "Autres dettes hors activit\u00e9s ordinaires (HAO)": { + "Produits": { + "account_number": "4887" + }, + "account_number": "484" + } + }, + "root_type": "Liability" + }, + "Comptes de tr\u00e9sorerie": { + "Titres de placement": { + "Titres du tr\u00e9sor et bons de caisse \u00e0 court terme": { + "Titres du Tr\u00e9sor \u00e0 court terme": { + "account_number": "5011" + }, + "Titres d\u2019organismes financiers": { + "account_number": "5012" + }, + "Bons de caisse \u00e0 court terme": { + "account_number": "5013" + }, + "Frais d\u2019acquisition des titres de tr\u00e9sor et bons de caisse": { + "account_number": "5016" + }, + "account_number": "501" + }, + "Actions": { + "Actions ou parts propres": { + "account_number": "5021" + }, + "Actions cot\u00e9es": { + "account_number": "5022" + }, + "Actions non cot\u00e9es": { + "account_number": "5023" + }, + "Actions d\u00e9membr\u00e9es (certificats d\u2019investissement, droits de vote)": { + "account_number": "5024" + }, + "Autres actions": { + "account_number": "5025" + }, + "Frais d\u2019acquisition des actions": { + "account_number": "5026" + }, + "account_number": "502" + }, + "Obligations": { + "Obligations \u00e9mises par la soci\u00e9t\u00e9 et rachet\u00e9es par elle": { + "account_number": "5031" + }, + "Obligations cot\u00e9es": { + "account_number": "5032" + }, + "Obligations non cot\u00e9es": { + "account_number": "5033" + }, + "Autres obligations": { + "account_number": "5035" + }, + "Frais d\u2019acquisition des obligations": { + "account_number": "5036" + }, + "account_number": "503" + }, + "Bons de souscription": { + "Bons de souscription d\u2019actions": { + "account_number": "5042" + }, + "Bons de souscription d\u2019obligations": { + "account_number": "5043" + }, + "account_number": "504" + }, + "Titres n\u00e9gociables hors r\u00e9gion": { + "account_number": "505" + }, + "Int\u00e9r\u00eats courus": { + "Titres du Tr\u00e9sor et bons de caisse \u00e0 court terme": { + "account_number": "5061" + }, + "Actions": { + "account_number": "5062" + }, + "Obligations": { + "account_number": "5063" + }, + "account_number": "506" + }, + "Autres titres de placement et cr\u00e9ances assimil\u00e9es": { + "account_number": "508" + }, + "account_number": "50" + }, + "Valeurs \u00e0 encaisser": { + "Effets \u00e0 encaisser": { + "account_number": "511" + }, + "Effets \u00e0 l\u2019encaissement": { + "account_number": "512" + }, + "Ch\u00e8ques \u00e0 encaisser": { + "account_number": "513" + }, + "Ch\u00e8ques \u00e0 l\u2019encaissement": { + "account_number": "514" + }, + "Cartes de cr\u00e9dit \u00e0 encaisser": { + "account_number": "515" + }, + "Autres valeurs \u00e0 l\u2019encaissement": { + "Warrants": { + "account_number": "5181" + }, + "Billets de fonds": { + "account_number": "5182" + }, + "Ch\u00e8ques de voyage": { + "account_number": "5185" + }, + "Coupons \u00e9chus": { + "account_number": "5186" + }, + "Int\u00e9r\u00eats \u00e9chus des obligations": { + "account_number": "5187" + }, + "account_number": "518" + }, + "account_number": "51" + }, + "Banques": { + "Banques locales": { + "Banques en monnaie nationale": { + "account_type": "Bank", + "account_number": "5211" + }, + "Banques en devises": { + "account_type": "Bank", + "account_number": "5215" + }, + "account_type": "Bank", + "account_number": "521" + }, + "Banques autres \u00c9tats r\u00e9gion": { + "account_number": "522" + }, + "Banques autres \u00c9tats zone mon\u00e9taire": { + "account_number": "523" + }, + "Banques hors zone mon\u00e9taire": { + "account_number": "524" + }, + "Banques d\u00e9p\u00f4t \u00e0 terme": { + "account_number": "525" + }, + "Banques, int\u00e9r\u00eats courus": { + "Banque, int\u00e9r\u00eats courus, charges \u00e0 payer": { + "account_number": "5261" + }, + "Banque, int\u00e9r\u00eats courus, produits \u00e0 recevoir": { + "account_number": "5267" + }, + "account_number": "526" + }, + "account_number": "52" + }, + "\u00c9tablissements financiers et assimil\u00e9s": { + "Ch\u00e8ques postaux": { + "account_number": "531" + }, + "Tr\u00e9sor": { + "account_number": "532" + }, + "Soci\u00e9t\u00e9s de gestion et d\u2019interm\u00e9diation (SGI)": { + "account_number": "533" + }, + "\u00c9tablissements financiers, int\u00e9r\u00eats courus": { + "account_number": "536" + }, + "Autres organismes financiers": { + "account_number": "538" + }, + "account_number": "53" + }, + "Instruments de tr\u00e9sorerie": { + "Options de taux d\u2019int\u00e9r\u00eat": { + "account_number": "541" + }, + "Options de taux de change": { + "account_number": "542" + }, + "Options de taux boursiers": { + "account_number": "543" + }, + "Instruments de march\u00e9s \u00e0 terme": { + "account_number": "544" + }, + "Avoirs d\u2019or et autres m\u00e9taux pr\u00e9cieux": { + "account_number": "545" + }, + "account_number": "54" + }, + "Instruments de monnaie \u00e9lectronique": { + "Monnaie \u00e9lectronique carte carburant": { + "account_number": "551" + }, + "Monnaie \u00e9lectronique t\u00e9l\u00e9phone portable": { + "account_number": "552" + }, + "Monnaie \u00e9lectronique carte p\u00e9age": { + "account_number": "553" + }, + "Porte-monnaie \u00e9lectronique": { + "account_number": "554" + }, + "Autres instruments de monnaies \u00e9lectroniques": { + "account_number": "558" + }, + "account_number": "55" + }, + "Banques, cr\u00e9dits de tr\u00e9sorerie et d\u2019escompte": { + "Cr\u00e9dits de tr\u00e9sorerie": { + "account_number": "561" + }, + "Escompte de cr\u00e9dits de campagne": { + "account_number": "564" + }, + "Escompte de cr\u00e9dits ordinaires": { + "account_number": "565" + }, + "Banques, cr\u00e9dits de tr\u00e9sorerie, int\u00e9r\u00eats courus": { + "account_number": "566" + }, + "account_number": "56" + }, + "Caisse": { + "Caisse si\u00e8ge social": { + "Caisse en monnaie nationale": { + "account_number": "5711" + }, + "Caisse en devises": { + "account_number": "5712" + }, + "account_number": "571" + }, + "Caisse succursale A": { + "En monnaie nationale": { + "account_number": "5721" + }, + "En devises": { + "account_number": "5722" + }, + "account_number": "572" + }, + "Caisse succursale B": { + "En monnaie nationale": { + "account_number": "5731" + }, + "En devises": { + "account_number": "5732" + }, + "account_number": "573" + }, + "account_number": "57" + }, + "R\u00e9gies d\u2019avances, accr\u00e9ditifs et virements internes": { + "R\u00e9gies d\u2019avance": { + "account_number": "581" + }, + "Accr\u00e9ditifs": { + "account_number": "582" + }, + "Virements de fonds": { + "account_number": "585" + }, + "Autres virements internes": { + "account_number": "588" + }, + "account_number": "58" + }, + "D\u00e9pr\u00e9ciations et provisions pour risque \u00e0 court terme": { + "D\u00e9pr\u00e9ciations des titres de placement": { + "account_number": "590" + }, + "D\u00e9pr\u00e9ciations des titres et valeurs \u00e0 encaisser": { + "account_number": "591" + }, + "D\u00e9pr\u00e9ciations des comptes banques": { + "account_number": "592" + }, + "D\u00e9pr\u00e9ciations des comptes \u00e9tablissements financiers et assimil\u00e9s": { + "account_number": "593" + }, + "D\u00e9pr\u00e9ciations des comptes d\u2019instruments de tr\u00e9sorerie": { + "account_number": "594" + }, + "Provisions pour risque \u00e0 court terme \u00e0 caract\u00e8re financier": { + "account_number": "599" + }, + "account_number": "59" + }, + "root_type": "Asset", + "account_number": "5" + }, + "Comptes de charges des activit\u00e9s ordinaires": { + "Achats et variations de stocks": { + "Achats de marchandises": { + "Dans la R\u00e9gion": { + "account_number": "6011" + }, + "Hors R\u00e9gion": { + "account_number": "6012" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "6013" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "6014" + }, + "Frais sur achats": { + "account_number": "6015" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6019" + }, + "account_number": "601" + }, + "Achats de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "Dans la R\u00e9gion": { + "account_number": "6021" + }, + "Hors R\u00e9gion": { + "account_number": "6022" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "6023" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "6024" + }, + "Frais sur achats": { + "account_number": "6025" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6029" + }, + "account_number": "602" + }, + "Variations des stocks de biens achet\u00e9s": { + "Variations des stocks de marchandises": { + "account_number": "6031" + }, + "Variations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "account_number": "6032" + }, + "Variations des stocks d\u2019autres approvisionnements": { + "account_number": "6033" + }, + "account_number": "603" + }, + "Achats stock\u00e9s de mati\u00e8res et fournitures consommables": { + "Mati\u00e8res consommables": { + "account_number": "6041" + }, + "Mati\u00e8res combustibles": { + "account_number": "6042" + }, + "Produits d\u2019entretien": { + "account_number": "6043" + }, + "Fournitures d\u2019atelier et d\u2019usine": { + "account_number": "6044" + }, + "Frais sur achat": { + "account_number": "6045" + }, + "Fournitures de magasin": { + "account_number": "6046" + }, + "Fournitures de bureau": { + "account_number": "6047" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6049" + }, + "account_number": "604" + }, + "Autres achats": { + "Fournitures non stockables Eau": { + "account_number": "6051" + }, + "Fournitures non stockables \u00c9lectricit\u00e9": { + "account_number": "6052" + }, + "Fournitures non stockables Autres \u00e9nergies": { + "account_number": "6053" + }, + "Fournitures d\u2019entretien non stockables": { + "account_number": "6054" + }, + "Fournitures de bureau non stockables": { + "account_number": "6055" + }, + "Achats de petit mat\u00e9riel et outillage": { + "account_number": "6056" + }, + "Achats d\u2019\u00e9tudes et prestations de services": { + "account_number": "6057" + }, + "Achats de travaux, mat\u00e9riels et \u00e9quipements": { + "account_number": "6058" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6059" + }, + "account_number": "605" + }, + "Achats d\u2019emballages": { + "Emballages perdus": { + "account_number": "6081" + }, + "Emballages r\u00e9cup\u00e9rables non identifiables": { + "account_number": "6082" + }, + "Emballages \u00e0 usage mixte": { + "account_number": "6083" + }, + "Frais sur achats": { + "account_number": "6085" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6089" + }, + "account_number": "608" + }, + "account_number": "60" + }, + "Transports": { + "Transports sur ventes": { + "account_number": "612" + }, + "Transports pour le compte de tiers": { + "account_number": "613" + }, + "Transports du personnel": { + "account_number": "614" + }, + "Transports de plis": { + "account_number": "616" + }, + "Autres frais de transport": { + "Voyages et d\u00e9placements": { + "account_number": "6181" + }, + "Transports entre \u00e9tablissements ou chantiers": { + "account_number": "6182" + }, + "Transports administratifs": { + "account_number": "6183" + }, + "account_number": "618" + }, + "account_number": "61" + }, + "Services ext\u00e9rieurs": { + "Sous-traitance g\u00e9n\u00e9rale": { + "account_number": "621" + }, + "Locations, charges locatives": { + "Locations de terrains": { + "account_number": "6221" + }, + "Locations de b\u00e2timents": { + "account_number": "6222" + }, + "Locations de mat\u00e9riels et outillages": { + "account_number": "6223" + }, + "Malis sur emballages": { + "account_number": "6224" + }, + "Locations d\u2019emballages": { + "account_number": "6225" + }, + "Fermages et loyers du foncier": { + "account_number": "6226" + }, + "Locations et charges locatives diverses": { + "account_number": "6228" + }, + "account_number": "622" + }, + "Redevances de location acquisition": { + "Cr\u00e9dit-bail immobilier": { + "account_number": "6232" + }, + "Cr\u00e9dit-bail mobilier": { + "account_number": "6233" + }, + "Location-vente": { + "account_number": "6234" + }, + "Autres contrats de location acquisition": { + "account_number": "6238" + }, + "account_number": "623" + }, + "Entretien, r\u00e9parations, remise en \u00e9tat et maintenance": { + "Entretien et r\u00e9parations des biens immobiliers": { + "account_number": "6241" + }, + "Entretien et r\u00e9parations des biens mobiliers": { + "account_number": "6242" + }, + "Maintenance": { + "account_number": "6243" + }, + "Charges de d\u00e9mant\u00e8lement et remise en \u00e9tat": { + "account_number": "6244" + }, + "Autres entretiens et r\u00e9parations": { + "account_number": "6248" + }, + "account_number": "624" + }, + "Primes d\u2019assurance": { + "Assurances multirisques": { + "account_number": "6251" + }, + "Assurances mat\u00e9riel de transport": { + "account_number": "6252" + }, + "Assurances risques d\u2019exploitation": { + "account_number": "6253" + }, + "Assurances responsabilit\u00e9 du producteur": { + "account_number": "6254" + }, + "Assurances insolvabilit\u00e9 clients": { + "account_number": "6255" + }, + "Assurances transport sur ventes": { + "account_number": "6257" + }, + "Autres primes d\u2019assurances": { + "account_number": "6258" + }, + "account_number": "625" + }, + "\u00c9tudes, recherches et documentation": { + "\u00c9tudes et recherches": { + "account_number": "6261" + }, + "Documentation g\u00e9n\u00e9rale": { + "account_number": "6265" + }, + "Documentation technique": { + "account_number": "6266" + }, + "account_number": "626" + }, + "Publicit\u00e9, publications, relations publiques": { + "Annonces, insertions": { + "account_number": "6271" + }, + "Catalogues, imprim\u00e9s publicitaires": { + "account_number": "6272" + }, + "\u00c9chantillons": { + "account_number": "6273" + }, + "Foires et expositions": { + "account_number": "6274" + }, + "Publications": { + "account_number": "6275" + }, + "Cadeaux \u00e0 la client\u00e8le": { + "account_number": "6276" + }, + "Frais de colloques, s\u00e9minaires, conf\u00e9rences": { + "account_number": "6277" + }, + "Autres charges de publicit\u00e9 et relations publiques": { + "account_number": "6278" + }, + "account_number": "627" + }, + "Frais de t\u00e9l\u00e9communications": { + "Frais de t\u00e9l\u00e9phone": { + "account_number": "6281" + }, + "Frais de t\u00e9lex": { + "account_number": "6282" + }, + "Frais de t\u00e9l\u00e9copie": { + "account_number": "6283" + }, + "Autres frais de t\u00e9l\u00e9communications": { + "account_number": "6288" + }, + "account_number": "628" + }, + "account_number": "62" + }, + "Autres services ext\u00e9rieurs": { + "Frais bancaires": { + "Frais sur titres (vente, garde)": { + "account_number": "6311" + }, + "Frais sur effets": { + "account_number": "6312" + }, + "Location de coffres": { + "account_number": "6313" + }, + "Commissions d\u2019affacturage": { + "account_number": "6314" + }, + "Commissions sur cartes de cr\u00e9dit": { + "account_number": "6315" + }, + "Frais d\u2019\u00e9mission d\u2019emprunts": { + "account_number": "6316" + }, + "Frais sur instruments monnaie \u00e9lectronique": { + "account_number": "6317" + }, + "Autres frais bancaires": { + "account_number": "6318" + }, + "account_number": "631" + }, + "R\u00e9mun\u00e9rations d\u2019interm\u00e9diaires et de conseils": { + "Commissions et courtages sur ventes": { + "account_number": "6322" + }, + "Honoraires des professions r\u00e9glement\u00e9es": { + "account_number": "6324" + }, + "Frais d\u2019actes et de contentieux": { + "account_number": "6325" + }, + "R\u00e9mun\u00e9rations d\u2019affacturage": { + "account_number": "6326" + }, + "R\u00e9mun\u00e9rations des autres prestataires de services": { + "account_number": "6327" + }, + "Divers frais": { + "account_number": "6328" + }, + "account_number": "632" + }, + "Frais de formation du personnel": { + "account_number": "633" + }, + "Redevances pour brevets, licences, logiciels, concessions et droits et valeurs similaires": { + "Redevances pour brevets, licences": { + "account_number": "6342" + }, + "Redevances pour logiciels": { + "account_number": "6343" + }, + "Redevances pour marques": { + "account_number": "6344" + }, + "Redevances pour sites internet": { + "account_number": "6345" + }, + "Redevances pour concessions, droits et valeurs similaires": { + "account_number": "6346" + }, + "account_number": "634" + }, + "Cotisations": { + "Cotisations": { + "account_number": "6351" + }, + "Concours divers": { + "account_number": "6358" + }, + "account_number": "635" + }, + "R\u00e9mun\u00e9rations de personnel ext\u00e9rieur \u00e0 l\u2019entit\u00e9": { + "Personnel int\u00e9rimaire": { + "account_number": "6371" + }, + "Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": { + "account_number": "6372" + }, + "account_number": "637" + }, + "Autres charges externes": { + "Frais de recrutement du personnel": { + "account_number": "6381" + }, + "Frais de d\u00e9m\u00e9nagement": { + "account_number": "6382" + }, + "R\u00e9ceptions": { + "account_number": "6383" + }, + "Missions": { + "account_number": "6384" + }, + "Charges de copropri\u00e9t\u00e9": { + "account_number": "6385" + }, + "account_number": "638" + }, + "account_number": "63" + }, + "Imp\u00f4ts et taxes": { + "Imp\u00f4ts et taxes directs": { + "Imp\u00f4ts fonciers et taxes annexes": { + "account_number": "6411" + }, + "Patentes, licences et taxes annexes": { + "account_number": "6412" + }, + "Taxes sur appointements et salaires": { + "account_number": "6413" + }, + "Taxes d\u2019apprentissage": { + "account_number": "6414" + }, + "Formation professionnelle continue": { + "account_number": "6415" + }, + "Autres imp\u00f4ts et taxes directs": { + "account_number": "6418" + }, + "account_number": "641" + }, + "Imp\u00f4ts et taxes indirects": { + "account_number": "645" + }, + "Droits d\u2019enregistrement": { + "Droits de mutation": { + "account_number": "6461" + }, + "Droits de timbre": { + "account_number": "6462" + }, + "Taxes sur les v\u00e9hicules de soci\u00e9t\u00e9": { + "account_number": "6463" + }, + "Vignettes": { + "account_number": "6464" + }, + "Autres droits": { + "account_number": "6468" + }, + "account_number": "646" + }, + "P\u00e9nalit\u00e9s, amendes fiscales": { + "P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts directs": { + "account_number": "6471" + }, + "P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts indirects": { + "account_number": "6472" + }, + "P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts directs": { + "account_number": "6473" + }, + "P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts indirects": { + "account_number": "6474" + }, + "Autres p\u00e9nalit\u00e9s et amendes fiscales": { + "account_number": "6478" + }, + "account_number": "647" + }, + "Autres imp\u00f4ts et taxes": { + "account_number": "648" + }, + "account_number": "64" + }, + "Autres charges": { + "Pertes sur cr\u00e9ances clients et autres d\u00e9biteurs": { + "Clients": { + "account_number": "6511" + }, + "Autres d\u00e9biteurs": { + "account_number": "6515" + }, + "account_number": "651" + }, + "Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "Quote-part transf\u00e9r\u00e9e de b\u00e9n\u00e9fices (comptabilit\u00e9 du g\u00e9rant)": { + "account_number": "6521" + }, + "Pertes imput\u00e9es par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": { + "account_number": "6525" + }, + "account_number": "652" + }, + "Valeurs comptables des cessions courantes d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "6541" + }, + "Immobilisations corporelles": { + "account_number": "6542" + }, + "account_number": "654" + }, + "Perte de change sur cr\u00e9ances et dettes commerciale": { + "account_number": "656" + }, + "P\u00e9nalit\u00e9s et amendes p\u00e9nales": { + "account_number": "657" + }, + "Charges diverses": { + "Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": { + "account_number": "6581" + }, + "Dons": { + "account_number": "6582" + }, + "M\u00e9c\u00e9nat": { + "account_number": "6583" + }, + "Autres charges diverses": { + "account_number": "6588" + }, + "account_number": "658" + }, + "Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "Sur risques \u00e0 court terme": { + "account_number": "6591" + }, + "Sur stocks": { + "account_number": "6593" + }, + "Sur cr\u00e9ances": { + "account_number": "6594" + }, + "Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme": { + "account_number": "6598" + }, + "account_number": "659" + }, + "account_number": "65" + }, + "Charges de personnel": { + "R\u00e9mun\u00e9rations directes vers\u00e9es au personnel national": { + "Appointements salaires et commissions": { + "account_number": "6611" + }, + "Primes et gratifications": { + "account_number": "6612" + }, + "Cong\u00e9s pay\u00e9s": { + "account_number": "6613" + }, + "Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": { + "account_number": "6614" + }, + "Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": { + "account_number": "6615" + }, + "Suppl\u00e9ment familial": { + "account_number": "6616" + }, + "Avantages en nature": { + "account_number": "6617" + }, + "Autres r\u00e9mun\u00e9rations directes": { + "account_number": "6618" + }, + "account_number": "661" + }, + "R\u00e9mun\u00e9rations directes vers\u00e9es au personnel non national": { + "Appointements salaires et commissions": { + "account_number": "6621" + }, + "Primes et gratifications": { + "account_number": "6622" + }, + "Cong\u00e9s pay\u00e9s": { + "account_number": "6623" + }, + "Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": { + "account_number": "6624" + }, + "Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": { + "account_number": "6625" + }, + "Suppl\u00e9ment familial": { + "account_number": "6626" + }, + "Avantages en nature": { + "account_number": "6627" + }, + "Autres r\u00e9mun\u00e9rations directes": { + "account_number": "6628" + }, + "account_number": "662" + }, + "Indemnit\u00e9s forfaitaires vers\u00e9es au personnel": { + "Indemnit\u00e9s de logement": { + "account_number": "6631" + }, + "Indemnit\u00e9s de repr\u00e9sentation": { + "account_number": "6632" + }, + "Indemnit\u00e9s d\u2019expatriation": { + "account_number": "6633" + }, + "Indemnit\u00e9s de transport": { + "account_number": "6634" + }, + "Autres indemnit\u00e9s et avantages divers": { + "account_number": "6638" + }, + "account_number": "663" + }, + "Charges sociales": { + "Charges sociales sur r\u00e9mun\u00e9ration du personnel national": { + "account_number": "6641" + }, + "Charges sociales sur r\u00e9mun\u00e9ration du personnel non national": { + "account_number": "6642" + }, + "account_number": "664" + }, + "R\u00e9mun\u00e9rations et charges sociales de l\u2019exploitant individuel": { + "R\u00e9mun\u00e9ration du travail de l\u2019exploitant": { + "account_number": "6661" + }, + "Charges sociales": { + "account_number": "6662" + }, + "account_number": "666" + }, + "R\u00e9mun\u00e9ration transf\u00e9r\u00e9e de personnel ext\u00e9rieur": { + "Personnel int\u00e9rimaire": { + "account_number": "6671" + }, + "Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": { + "account_number": "6672" + }, + "account_number": "667" + }, + "Autres charges sociales": { + "Versements aux syndicats et comit\u00e9s d\u2019entreprise, d\u2019\u00e9tablissement": { + "account_number": "6681" + }, + "Versements aux comit\u00e9s d\u2019hygi\u00e8ne et de s\u00e9curit\u00e9": { + "account_number": "6682" + }, + "Versements et contributions aux autres \u0153uvres sociales": { + "account_number": "6683" + }, + "M\u00e9decine du travail et pharmacie": { + "account_number": "6684" + }, + "Assurances et organismes de sant\u00e9": { + "account_number": "6685" + }, + "Assurances retraite et fonds de pension": { + "account_number": "6686" + }, + "Majorations et p\u00e9nalit\u00e9s sociales": { + "account_number": "6687" + }, + "Charges sociales diverses": { + "account_number": "6688" + }, + "account_number": "668" + }, + "account_number": "66" + }, + "Frais financiers et charges assimil\u00e9es": { + "Int\u00e9r\u00eats des emprunts": { + "Emprunts obligataires": { + "account_number": "6711" + }, + "Emprunts aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": { + "account_number": "6712" + }, + "Dettes li\u00e9es \u00e0 des participations": { + "account_number": "6713" + }, + "Primes de remboursement des obligations": { + "account_number": "6714" + }, + "account_number": "671" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition": { + "Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail immobilier": { + "account_number": "6722" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail mobilier": { + "account_number": "6723" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition / location-vente": { + "account_number": "6724" + }, + "Int\u00e9r\u00eats dans loyers des autres locations acquisition": { + "account_number": "6728" + }, + "account_number": "672" + }, + "Escomptes accord\u00e9s": { + "account_number": "673" + }, + "Autres int\u00e9r\u00eats": { + "Avances re\u00e7ues et d\u00e9p\u00f4ts cr\u00e9diteurs": { + "account_number": "6741" + }, + "Comptes courants bloqu\u00e9s": { + "account_number": "6742" + }, + "Int\u00e9r\u00eats sur obligations cautionn\u00e9es": { + "account_number": "6743" + }, + "Int\u00e9r\u00eats sur dettes commerciales": { + "account_number": "6744" + }, + "Int\u00e9r\u00eats bancaires et sur op\u00e9rations de financement (escompte...)": { + "account_number": "6745" + }, + "Int\u00e9r\u00eats sur dettes diverses": { + "account_number": "6748" + }, + "account_number": "674" + }, + "Escomptes des effets de commerce": { + "account_number": "675" + }, + "Pertes de change financi\u00e8res": { + "account_number": "676" + }, + "Pertes sur titres de placement": { + "Pertes sur cessions de titres de placement": { + "account_number": "6771" + }, + "Mali provenant d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": { + "account_number": "6772" + }, + "account_number": "677" + }, + "Pertes et charges sur risques financiers": { + "Sur rentes viag\u00e8res": { + "account_number": "6781" + }, + "Sur op\u00e9rations financi\u00e8res": { + "account_number": "6782" + }, + "Sur instruments de tr\u00e9sorerie": { + "account_number": "6784" + }, + "account_number": "678" + }, + "Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "Sur risques financiers": { + "account_number": "6791" + }, + "Sur titres de placement": { + "account_number": "6795" + }, + "Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "account_number": "6798" + }, + "account_number": "679" + }, + "account_number": "67" + }, + "Dotations aux amortissements": { + "Dotations aux amortissements d\u2019exploitation": { + "Dotations aux amortissements des immobilisations incorporelles": { + "account_number": "6812" + }, + "Dotations aux amortissements des immobilisations corporelles": { + "account_number": "6813" + }, + "account_number": "681" + }, + "account_number": "68" + }, + "Dotations aux provisions et aux d\u00e9pr\u00e9ciations": { + "Dotations aux provisions et aux d\u00e9pr\u00e9ciations d\u2019exploitation": { + "Dotations aux provisions pour risques et charges": { + "account_number": "6911" + }, + "Dotations aux d\u00e9pr\u00e9ciations des immobilisations incorporelles": { + "account_number": "6913" + }, + "Dotations aux d\u00e9pr\u00e9ciations des immobilisations corporelles": { + "account_number": "6914" + }, + "account_number": "691" + }, + "Dotations aux provisions et aux d\u00e9pr\u00e9ciations financi\u00e8res": { + "Dotations aux provisions pour risques et charges": { + "account_number": "6971" + }, + "Dotations aux d\u00e9pr\u00e9ciations des immobilisations financi\u00e8res": { + "account_number": "6972" + }, + "account_number": "697" + }, + "account_number": "69" + }, + "root_type": "Expense", + "account_number": "6" + }, + "Comptes de produits des activit\u00e9s ordinaires": { + "Ventes": { + "Ventes de marchandises": { + "Dans la R\u00e9gion": { + "account_number": "7011" + }, + "Hors R\u00e9gion": { + "account_number": "7012" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7013" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7014" + }, + "Sur internet": { + "account_number": "7015" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7019" + }, + "account_number": "701" + }, + "Ventes de produits finis": { + "Dans la R\u00e9gion": { + "account_number": "7021" + }, + "Hors R\u00e9gion": { + "account_number": "7022" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7023" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7024" + }, + "Sur internet": { + "account_number": "7025" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7029" + }, + "account_number": "702" + }, + "Ventes de produits interm\u00e9diaires": { + "Dans la R\u00e9gion": { + "account_number": "7031" + }, + "Hors R\u00e9gion": { + "account_number": "7032" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7033" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7034" + }, + "Sur internet": { + "account_number": "7035" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7039" + }, + "account_number": "703" + }, + "Ventes de produits r\u00e9siduels": { + "Dans la R\u00e9gion": { + "account_number": "7041" + }, + "Hors R\u00e9gion": { + "account_number": "7042" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7043" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7044" + }, + "Sur internet": { + "account_number": "7045" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7049" + }, + "account_number": "704" + }, + "Travaux factur\u00e9s": { + "Dans la R\u00e9gion": { + "account_number": "7051" + }, + "Hors R\u00e9gion": { + "account_number": "7052" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7053" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7054" + }, + "Sur internet": { + "account_number": "7055" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7059" + }, + "account_number": "705" + }, + "Services vendus": { + "Dans la R\u00e9gion": { + "account_number": "7061" + }, + "Hors R\u00e9gion": { + "account_number": "7062" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7063" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7064" + }, + "Sur internet": { + "account_number": "7065" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7069" + }, + "account_number": "706" + }, + "Produits accessoires": { + "Ports, emballages perdus et autres frais factur\u00e9s": { + "account_number": "7071" + }, + "Commissions et courtages": { + "account_number": "7072" + }, + "Locations": { + "account_number": "7073" + }, + "Bonis sur reprises et cessions d\u2019emballages": { + "account_number": "7074" + }, + "Mise \u00e0 disposition de personnel": { + "account_number": "7075" + }, + "Redevances pour brevets, logiciels, marques et droits similaires": { + "account_number": "7076" + }, + "Services exploit\u00e9s dans l\u2019int\u00e9r\u00eat du personnel": { + "account_number": "7077" + }, + "Autres produits accessoires": { + "account_number": "7078" + }, + "account_number": "707" + }, + "account_number": "70" + }, + "Subventions d\u2019exploitation": { + "Sur produits \u00e0 l\u2019exportation": { + "account_number": "711" + }, + "Sur produits \u00e0 l\u2019importation": { + "account_number": "712" + }, + "Sur produits de p\u00e9r\u00e9quation": { + "account_number": "713" + }, + "Indemnit\u00e9s et subventions d\u2019exploitation (entit\u00e9 agricole)": { + "account_number": "714" + }, + "Autres subventions d\u2019exploitation": { + "Vers\u00e9es par l\u2019\u00c9tat et les collectivit\u00e9s publiques": { + "account_number": "7181" + }, + "Vers\u00e9es par les organismes internationaux": { + "account_number": "7182" + }, + "Vers\u00e9es par des tiers": { + "account_number": "7183" + }, + "account_number": "718" + }, + "account_number": "71" + }, + "Production immobilis\u00e9e": { + "Immobilisations incorporelles": { + "account_number": "721" + }, + "Immobilisations corporelles": { + "Immobilisations corporelles (hors actifs biologiques)": { + "account_number": "7221" + }, + "Immobilisations corporelles (actifs biologiques)": { + "account_number": "7222" + }, + "account_number": "722" + }, + "Production auto-consomm\u00e9e": { + "account_number": "724" + }, + "Immobilisations financi\u00e8res": { + "account_number": "726" + }, + "account_number": "72" + }, + "Variations des stocks de biens et de services produits": { + "Variations des stocks de produits en cours": { + "Produits en cours": { + "account_number": "7341" + }, + "Travaux en cours": { + "account_number": "7342" + }, + "account_number": "734" + }, + "Variations des en-cours de services": { + "\u00c9tudes en cours": { + "account_number": "7351" + }, + "Prestations de services en cours": { + "account_number": "7352" + }, + "account_number": "735" + }, + "Variations des stocks de produits finis": { + "account_number": "736" + }, + "Variations des stocks de produits interm\u00e9diaires et r\u00e9siduels": { + "Produits interm\u00e9diaires": { + "account_number": "7371" + }, + "Produits r\u00e9siduels": { + "account_number": "7372" + }, + "account_number": "737" + }, + "account_number": "73" + }, + "Autres produits": { + "Profits sur cr\u00e9ances clients et autres d\u00e9biteurs": { + "account_number": "751" + }, + "Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "Quote-part transf\u00e9r\u00e9e de pertes (comptabilit\u00e9 du g\u00e9rant)": { + "account_number": "7521" + }, + "B\u00e9n\u00e9fices attribu\u00e9s par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": { + "account_number": "7525" + }, + "account_number": "752" + }, + "Produits des cessions courantes d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "7541" + }, + "Immobilisations corporelles": { + "account_number": "7542" + }, + "account_number": "754" + }, + "Gains de change sur cr\u00e9ances et dettes commerciales": { + "account_number": "756" + }, + "Produits divers": { + "Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": { + "account_number": "7581" + }, + "Indemnit\u00e9s d\u2019assurances re\u00e7ues": { + "account_number": "7582" + }, + "Autres produits divers": { + "account_number": "7588" + }, + "account_number": "758" + }, + "Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "Sur risques \u00e0 court terme": { + "account_number": "7591" + }, + "Sur stocks": { + "account_number": "7593" + }, + "Sur cr\u00e9ances": { + "account_number": "7594" + }, + "Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "account_number": "7598" + }, + "account_number": "759" + }, + "account_number": "75" + }, + "Revenus financiers et produits assimil\u00e9s": { + "Int\u00e9r\u00eats de pr\u00eats et cr\u00e9ances diverses": { + "Int\u00e9r\u00eats de pr\u00eats": { + "account_number": "7712" + }, + "Int\u00e9r\u00eats sur cr\u00e9ances diverses": { + "account_number": "7713" + }, + "account_number": "771" + }, + "Revenus de participations et autres titres immobilis\u00e9s": { + "Revenus des titres de participation": { + "account_number": "7721" + }, + "Revenus autres titres immobilis\u00e9s": { + "account_number": "7722" + }, + "account_number": "772" + }, + "Escomptes obtenus": { + "account_number": "773" + }, + "Revenus de placement": { + "Revenus des obligations": { + "account_number": "7745" + }, + "Revenus des titres de placement": { + "account_number": "7746" + }, + "account_number": "774" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition": { + "account_number": "775" + }, + "Gains de change financiers": { + "account_number": "776" + }, + "Gains sur cessions de titres de placement": { + "account_number": "777" + }, + "Gains sur risques financiers": { + "Sur rentes viag\u00e8res": { + "account_number": "7781" + }, + "Sur op\u00e9rations financi\u00e8res": { + "account_number": "7782" + }, + "Sur instruments de tr\u00e9sorerie": { + "account_number": "7784" + }, + "account_number": "778" + }, + "Reprises de charges pour d\u00e9pr\u00e9ciations et provisions \u00e0 court terme financi\u00e8res": { + "Sur risques financiers": { + "account_number": "7791" + }, + "Sur titres de placement": { + "account_number": "7795" + }, + "Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "account_number": "7798" + }, + "account_number": "779" + }, + "account_number": "77" + }, + "Transferts de charges": { + "Transferts de charges d\u2019exploitation": { + "account_number": "781" + }, + "Transferts de charges financi\u00e8res": { + "account_number": "787" + }, + "account_number": "78" + }, + "Reprises de provisions, de d\u00e9pr\u00e9ciations et autres": { + "Reprises de provisions et d\u00e9pr\u00e9ciations d\u2019exploitation": { + "Pour risques et charges": { + "account_number": "7911" + }, + "Des immobilisations incorporelles": { + "account_number": "7913" + }, + "Des immobilisations corporelles": { + "account_number": "7914" + }, + "account_number": "791" + }, + "Reprises de provisions et d\u00e9pr\u00e9ciations financi\u00e8res": { + "Pour risques et charges": { + "account_number": "7971" + }, + "Des immobilisations financi\u00e8res": { + "account_number": "7972" + }, + "account_number": "797" + }, + "Reprises d\u2019amortissements": { + "account_number": "798" + }, + "Reprises de subventions d\u2019investissement": { + "account_number": "799" + }, + "account_number": "79" + }, + "root_type": "Income", + "account_number": "7" + }, + "8-Comptes des autres charges et des autres produits (CHARGES)": { + "Valeurs comptables des cessions d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "811" + }, + "Immobilisations corporelles": { + "account_number": "812" + }, + "Immobilisations financi\u00e8res": { + "account_number": "816" + }, + "account_number": "81" + }, + "Charges hors activit\u00e9s ordinaires": { + "Charges HAO constat\u00e9es": { + "account_number": "831" + }, + "Charges li\u00e9es aux op\u00e9rations de restructuration": { + "account_number": "833" + }, + "Pertes sur cr\u00e9ances HAO": { + "account_number": "834" + }, + "Dons et lib\u00e9ralit\u00e9s accord\u00e9s": { + "account_number": "835" + }, + "Abandons de cr\u00e9ances consentis": { + "account_number": "836" + }, + "Charges li\u00e9es aux op\u00e9rations de liquidation": { + "account_number": "837" + }, + "Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": { + "account_number": "839" + }, + "account_number": "83" + }, + "Dotations hors activit\u00e9s ordinaires": { + "Dotations aux provisions r\u00e9glement\u00e9es": { + "account_number": "851" + }, + "Dotations aux amortissements HAO": { + "account_number": "852" + }, + "Dotations aux d\u00e9pr\u00e9ciations HAO": { + "account_number": "853" + }, + "Dotations aux provisions pour risques et charges HAO": { + "account_number": "854" + }, + "Autres dotations HAO": { + "account_number": "858" + }, + "account_number": "85" + }, + "Participation des travailleurs": { + "Participation l\u00e9gale aux b\u00e9n\u00e9fices": { + "account_number": "871" + }, + "Participation contractuelle aux b\u00e9n\u00e9fices": { + "account_number": "874" + }, + "Autres participations": { + "account_number": "878" + }, + "account_number": "87" + }, + "Imp\u00f4ts sur le r\u00e9sultat": { + "Imp\u00f4ts sur les b\u00e9n\u00e9fices de l\u2019exercice": { + "Activit\u00e9s exerc\u00e9es dans l\u2019\u00c9tat": { + "account_number": "8911" + }, + "Activit\u00e9s exerc\u00e9es dans les autres \u00c9tats de la R\u00e9gion": { + "account_number": "8912" + }, + "Activit\u00e9s exerc\u00e9es hors R\u00e9gion": { + "account_number": "8913" + }, + "account_number": "891" + }, + "Rappel d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": { + "account_number": "892" + }, + "Imp\u00f4t minimum forfaitaire IMF": { + "account_number": "895" + }, + "D\u00e9gr\u00e8vements et annulations d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": { + "D\u00e9gr\u00e8vements": { + "account_number": "8991" + }, + "Annulations pour pertes r\u00e9troactives": { + "account_number": "8994" + }, + "account_number": "899" + }, + "account_number": "89" + }, + "root_type": "Expense" + }, + "8-Comptes des autres charges et des autres produits (PRODUITS)": { + "Produits des cessions d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "821" + }, + "Immobilisations corporelles": { + "account_number": "822" + }, + "Immobilisations financi\u00e8res": { + "account_number": "826" + }, + "account_number": "82" + }, + "Produits hors activit\u00e9s ordinaires": { + "Produits HAO constat\u00e9s": { + "account_number": "841" + }, + "Produits li\u00e9s aux op\u00e9rations de restructuration": { + "account_number": "843" + }, + "Indemnit\u00e9s et subventions HAO (entit\u00e9 agricole)": { + "account_number": "844" + }, + "Dons et lib\u00e9ralit\u00e9s obtenus": { + "account_number": "845" + }, + "Abandons de cr\u00e9ances obtenus": { + "account_number": "846" + }, + "Produits li\u00e9s aux op\u00e9rations de liquidation": { + "account_number": "847" + }, + "Transferts de charges HAO": { + "account_number": "848" + }, + "Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": { + "account_number": "849" + }, + "account_number": "84" + }, + "Reprises de charges, provisions et d\u00e9pr\u00e9ciations HAO": { + "Reprises de provisions r\u00e9glement\u00e9es": { + "account_number": "861" + }, + "Reprises d\u2019amortissements HAO": { + "account_number": "862" + }, + "Reprises de d\u00e9pr\u00e9ciations HAO": { + "account_number": "863" + }, + "Reprises de provisions pour risques et charges HAO": { + "account_number": "864" + }, + "Autres reprises HAO": { + "account_number": "868" + }, + "account_number": "86" + }, + "Subventions d\u2019\u00e9quilibre": { + "\u00c9tat": { + "account_number": "881" + }, + "Collectivit\u00e9s publiques": { + "account_number": "884" + }, + "Groupe": { + "account_number": "886" + }, + "Autres": { + "account_number": "888" + }, + "account_number": "88" + }, + "root_type": "Income" + } + } +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/ci_plan_comptable.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/ci_plan_comptable.json new file mode 100644 index 00000000000..cacde3de336 --- /dev/null +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/ci_plan_comptable.json @@ -0,0 +1,1919 @@ +{ + "country_code": "ci", + "name": "Syscohada - Plan Comptable", + "tree": { + "1-Comptes de ressources durables": { + "10-Capital": { + "101-Capital social": { + "1011-Capital souscrit, non appel\u00e9": {}, + "1012-Capital souscrit, appel\u00e9, non vers\u00e9": {}, + "1013-Capital souscrit, appel\u00e9, vers\u00e9, non amorti": {}, + "1014-Capital souscrit, appel\u00e9, vers\u00e9, amorti": {}, + "1018-Capital souscrit soumis \u00e0 des conditions particuli\u00e8res": {} + }, + "102-Capital par dotation": { + "1021-Dotation initiale": {}, + "1022-Dotations compl\u00e9mentaires": {}, + "1028-Autres dotations": {} + }, + "103-Capital personnel": {}, + "104-Compte de l\u2019exploitant": { + "1041-Apports temporaires": {}, + "1042-Op\u00e9rations courantes": {}, + "1043-R\u00e9mun\u00e9rations, imp\u00f4ts et autres charges personnelles": {}, + "1047-Pr\u00e9l\u00e8vements d\u2019autoconsommation": {}, + "1048-Autres pr\u00e9l\u00e8vements": {} + }, + "105-Primes li\u00e9es au capital social": { + "1051-Primes d\u2019\u00e9mission": {}, + "1052-Primes d\u2019apport": {}, + "1053-Primes de fusion": {}, + "1054-Primes de conversion": {}, + "1058-Autres primes": {} + }, + "106-\u00c9carts de r\u00e9\u00e9valuation": { + "1061-\u00c9carts de r\u00e9\u00e9valuation l\u00e9gale": {}, + "1062-\u00c9carts de r\u00e9\u00e9valuation libre": {} + }, + "109-Apporteurs, capital souscrit, non appel\u00e9": {} + }, + "11-R\u00e9serves": { + "111-R\u00e9serve l\u00e9gale": {}, + "112-R\u00e9serves statutaires ou contractuelles": {}, + "113-R\u00e9serves r\u00e9glement\u00e9es": { + "1131-R\u00e9serves de plus-values nettes \u00e0 long terme": {}, + "1132-R\u00e9serves d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": {}, + "1133-R\u00e9serves cons\u00e9cutives \u00e0 l\u2019octroi de subventions d\u2019investissement": {}, + "1134-R\u00e9serves des valeurs mobili\u00e8res donnant acc\u00e8s au capital": {}, + "1135-Autres r\u00e9serves r\u00e9glement\u00e9es": {} + }, + "118-Autres r\u00e9serves": { + "1181-R\u00e9serves facultatives": {}, + "1188-R\u00e9serves diverses": {} + } + }, + "12-Report \u00e0 nouveau": { + "121-Report \u00e0 nouveau cr\u00e9diteur": {}, + "129-Report \u00e0 nouveau d\u00e9biteur": { + "1291-Perte nette \u00e0 reporter": {}, + "1292-Perte Amortissements r\u00e9put\u00e9s diff\u00e9r\u00e9s": {} + } + }, + "13-R\u00e9sultat net de l\u2019exercice": { + "130-R\u00e9sultat en instance d\u2019affectation": { + "1301-R\u00e9sultat en instance d\u2019affectation : b\u00e9n\u00e9fice": {}, + "1309-R\u00e9sultat en instance d\u2019affectation : perte": {} + }, + "131-R\u00e9sultat net : b\u00e9n\u00e9fice": {}, + "132-Marge commerciale (MC)": {}, + "133-Valeur ajout\u00e9e (VA)": {}, + "134-Exc\u00e9dent brut d\u2019exploitation (EBE)": {}, + "135-R\u00e9sultat d\u2019exploitation (RE)": {}, + "136-R\u00e9sultat financier (RF)": {}, + "137-R\u00e9sultat des activit\u00e9s ordinaires (RAO)": {}, + "138-R\u00e9sultat hors activit\u00e9s ordinaires (RHAO)": { + "1381-R\u00e9sultat de fusion": {}, + "1382-R\u00e9sultat d\u2019apport partiel d\u2019actif": {}, + "1383-R\u00e9sultat de scission": {}, + "1384-R\u00e9sultat de liquidation": {} + }, + "139-R\u00e9sultat net : perte": {} + }, + "14-Subventions d\u2019investissement": { + "141-Subventions d\u2019\u00e9quipement": { + "1411-\u00c9tat": {}, + "1412-R\u00e9gions": {}, + "1413-D\u00e9partements": {}, + "1414-Communes et collectivit\u00e9s publiques d\u00e9centralis\u00e9es": {}, + "1415-Entit\u00e9s publiques ou mixtes": {}, + "1416-Entit\u00e9s et organismes priv\u00e9s": {}, + "1417-Organismes internationaux": {}, + "1418-Autres": {} + }, + "148-Autres subventions d\u2019investissement": {} + }, + "15-Provisions r\u00e9glement\u00e9es et fonds assimil\u00e9s": { + "151-Amortissements d\u00e9rogatoires": {}, + "152-Plus-values de cession \u00e0 r\u00e9investir": {}, + "153-Fonds r\u00e9glement\u00e9s": { + "1531-Fonds National": {}, + "1532-Pr\u00e9l\u00e8vement pour le Budget": {} + }, + "154-Provisions sp\u00e9ciales de r\u00e9\u00e9valuation": {}, + "155-Provisions r\u00e9glement\u00e9es relatives aux immobilisations": { + "1551-Reconstitution des gisements miniers et p\u00e9troliers": {} + }, + "156-Provisions r\u00e9glement\u00e9es relatives aux stocks": { + "1561-Hausse de prix": {}, + "1562-Fluctuation des cours": {} + }, + "157-Provisions pour investissement": {}, + "158-Autres provisions et fonds r\u00e9glement\u00e9s": {} + }, + "16-Emprunts et dettes assimil\u00e9es": { + "161-Emprunts obligataires": { + "1611-Emprunts obligataires ordinaires": {}, + "1612-Emprunts obligataires convertibles en actions": {}, + "1613-Emprunts obligataires remboursables en actions": {}, + "1618-Autres emprunts obligataires": {} + }, + "162-Emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": {}, + "163-Avances re\u00e7ues de l\u2019\u00c9tat": {}, + "164-Avances re\u00e7ues et comptes courants bloqu\u00e9s": {}, + "165-D\u00e9p\u00f4ts et cautionnements re\u00e7us": { + "1651-D\u00e9p\u00f4ts": {}, + "1652-Cautionnements": {} + }, + "166-Int\u00e9r\u00eats courus": { + "1661-Sur emprunts obligataires": {}, + "1662-Sur emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": {}, + "1663-Sur avances re\u00e7ues de l\u2019\u00c9tat": {}, + "1664-Sur avances re\u00e7ues et comptes courants bloqu\u00e9s": {}, + "1665-Sur d\u00e9p\u00f4ts et cautionnements re\u00e7us": {}, + "1667-Sur avances assorties de conditions particuli\u00e8res": {}, + "1668-Sur autres emprunts et dettes": {} + }, + "167-Avances assorties de conditions particuli\u00e8res": { + "1671-Avances bloqu\u00e9es pour augmentation du capital": {}, + "1672-Avances conditionn\u00e9es par l\u2019\u00c9tat": {}, + "1673-Avances conditionn\u00e9es par les autres organismes africains": {}, + "1674-Avances conditionn\u00e9es par les organismes internationaux": {} + }, + "168-Autres emprunts et dettes": { + "1681-Rentes viag\u00e8res capitalis\u00e9es": {}, + "1682-Billets de fonds": {}, + "1683-Dettes cons\u00e9cutives \u00e0 des titres emprunt\u00e9s": {}, + "1684-Emprunts participatifs": {}, + "1685-Participation des travailleurs aux b\u00e9n\u00e9fices": {}, + "1686-Emprunts et dettes contract\u00e9s aupr\u00e8s des autres tiers": {} + } + }, + "17-Dettes de location acquisition": { + "172-Dettes de location acquisition / cr\u00e9dit bail immobilier": {}, + "173-Dettes de location acquisition / cr\u00e9dit bail mobilier": {}, + "174-Dettes de location acquisition / location de vente": {}, + "176-Int\u00e9r\u00eats courus": { + "1762-Sur dettes de location acquisition / cr\u00e9dit-bail immobilier": {}, + "1763-Sur dettes de location acquisition / cr\u00e9dit-bail mobilier": {}, + "1764-Sur dettes de location acquisition / location-vente": {}, + "1768-Sur autres dettes de location acquisition": {} + }, + "178-Autres dettes de location acquisition": {} + }, + "18-Dettes li\u00e9es \u00e0 des participations et comptes de liaison des \u00e9tablissements et soci\u00e9t\u00e9s en participation": { + "181-Dettes li\u00e9es \u00e0 des participations": { + "1811-Dettes li\u00e9es \u00e0 des participations (groupe)": {}, + "1812-Dettes li\u00e9es \u00e0 des participations (hors groupe)": {} + }, + "182-Dettes li\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": {}, + "183-Int\u00e9r\u00eats courus sur dettes li\u00e9es \u00e0 des participations": {}, + "184-Comptes permanents bloqu\u00e9s des \u00e9tablissements et succursales": {}, + "185-Comptes permanents non bloqu\u00e9s des \u00e9tablissements et succursales": {}, + "186-Comptes de liaison charges": {}, + "187-Comptes de liaison produits": {}, + "188-Comptes de liaison des soci\u00e9t\u00e9s en participation": {} + }, + "19-Provisions pour risques et charges": { + "191-Provisions pour litiges": {}, + "192-Provisions pour garanties donn\u00e9es aux clients": {}, + "193-Provisions pour pertes sur march\u00e9s \u00e0 ach\u00e8vement futur": {}, + "194-Provisions pour pertes de change": {}, + "195-Provisions pour imp\u00f4ts": {}, + "196-Provisions pour pensions et obligations similaires": { + "1961-Provisions pour pensions et obligations similaires engagement de retraite": {}, + "1962-Actif du r\u00e9gime de retraite": {} + }, + "197-Provisions pour restructuration": {}, + "198-Autres provisions pour risques et charges": { + "1981-Provisions pour amendes et p\u00e9nalit\u00e9s": {}, + "1983-Provisions pour propre assureur": {}, + "1984-Provisions pour d\u00e9mant\u00e8lement et remise en \u00e9tat": {}, + "1985-Provisions pour droits \u00e0 r\u00e9duction ou avantage en nature (ch\u00e8ques cadeau, cartes de fid\u00e9lit\u00e9...)": {}, + "1988-Provisions pour divers risques et charges": {} + } + }, + "root_type": "Equity" + }, + "2-Comptes d\u2019actif immobilis\u00e9": { + "21-Immobilisations incorporelles": { + "account_type": "Fixed Asset", + "211-Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset" + }, + "212-Brevets, licences, concessions et droits similaires": { + "account_type": "Fixed Asset", + "2121-Brevets": { + "account_type": "Fixed Asset" + }, + "2122-Licences": { + "account_type": "Fixed Asset" + }, + "2123-Concessions de service public": { + "account_type": "Fixed Asset" + }, + "2128-Autres concessions et droits similaires": { + "account_type": "Fixed Asset" + } + }, + "213-Logiciels et sites internet": { + "account_type": "Fixed Asset", + "2131-Logiciels": { + "account_type": "Fixed Asset" + }, + "2132-Sites internet": { + "account_type": "Fixed Asset" + } + }, + "214-Marques": { + "account_type": "Fixed Asset" + }, + "215-Fonds commercial": { + "account_type": "Fixed Asset" + }, + "216-Droit au bail": { + "account_type": "Fixed Asset" + }, + "217-Investissements de cr\u00e9ation": { + "account_type": "Fixed Asset" + }, + "218-Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset", + "2181-Frais de prospection et d\u2019\u00e9valuation de ressources min\u00e9rales": { + "account_type": "Fixed Asset" + }, + "2182-Co\u00fbts d\u2019obtention du contrat": { + "account_type": "Fixed Asset" + }, + "2183-Fichiers clients, notices, titres de journaux et magazines": { + "account_type": "Fixed Asset" + }, + "2184-Co\u00fbts des franchises": { + "account_type": "Fixed Asset" + }, + "2188-Divers droits et valeurs incorporelles": { + "account_type": "Fixed Asset" + } + }, + "219-Immobilisations incorporelles en cours": { + "account_type": "Fixed Asset", + "2191-Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset" + }, + "2193-Logiciels et internet": { + "account_type": "Fixed Asset" + }, + "2198-Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset" + } + } + }, + "22-Terrains": { + "account_type": "Fixed Asset", + "221-Terrains agricoles et forestiers": { + "account_type": "Fixed Asset", + "2211-Terrains d\u2019exploitation agricole": { + "account_type": "Fixed Asset" + }, + "2212-Terrains d\u2019exploitation foresti\u00e8re": { + "account_type": "Fixed Asset" + }, + "2218-Autres terrains": { + "account_type": "Fixed Asset" + } + }, + "222-Terrains nus": { + "account_type": "Fixed Asset", + "2221-Terrains \u00e0 b\u00e2tir": { + "account_type": "Fixed Asset" + }, + "2228-Autres terrains nus": { + "account_type": "Fixed Asset" + } + }, + "223-Terrains b\u00e2tis": { + "account_type": "Fixed Asset", + "2231-Pour b\u00e2timents industriels et agricoles": { + "account_type": "Fixed Asset" + }, + "2232-Pour b\u00e2timents administratifs et commerciaux": { + "account_type": "Fixed Asset" + }, + "2234-Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations professionnelles": { + "account_type": "Fixed Asset" + }, + "2235-Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations non professionnelles": { + "account_type": "Fixed Asset" + }, + "2238-Autres terrains b\u00e2tis": { + "account_type": "Fixed Asset" + } + }, + "224-Travaux de mise en valeur des terrains": { + "account_type": "Fixed Asset", + "2241-Plantation d\u2019arbres et d\u2019arbustes": { + "account_type": "Fixed Asset" + }, + "2245-Am\u00e9liorations du fonds": { + "account_type": "Fixed Asset" + }, + "2248-Autres travaux": { + "account_type": "Fixed Asset" + } + }, + "225-Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset", + "2251-Carri\u00e8res": { + "account_type": "Fixed Asset" + } + }, + "226-Terrains am\u00e9nag\u00e9s": { + "account_type": "Fixed Asset", + "2261-Parkings": { + "account_type": "Fixed Asset" + } + }, + "227-Terrains mis en concession": { + "account_type": "Fixed Asset" + }, + "228-Autres terrains": { + "account_type": "Fixed Asset", + "2281-Terrains immeubles de placement": { + "account_type": "Fixed Asset" + }, + "2285-Terrains des logements affect\u00e9s au personnel": { + "account_type": "Fixed Asset" + }, + "2286-Terrains de location acquisition": { + "account_type": "Fixed Asset" + }, + "2288-Divers terrains": { + "account_type": "Fixed Asset" + } + }, + "229-Am\u00e9nagements de terrains en cours": { + "account_type": "Fixed Asset", + "2291-Terrains agricoles et forestiers": { + "account_type": "Fixed Asset" + }, + "2292-Terrains nus": { + "account_type": "Fixed Asset" + }, + "2295-Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset" + }, + "2298-Autres terrains": { + "account_type": "Fixed Asset" + } + } + }, + "23-B\u00e2timents, installations techniques et agencements": { + "231-B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "2311-B\u00e2timents industriels": {}, + "2312-B\u00e2timents agricoles": {}, + "2313-B\u00e2timents administratifs et commerciaux": {}, + "2314-B\u00e2timents affect\u00e9s au logement du personnel": {}, + "2315-B\u00e2timents immeubles de placement": {}, + "2316-B\u00e2timents de location acquisition": {} + }, + "232-B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "2321-B\u00e2timents industriels": {}, + "2322-B\u00e2timents agricoles": {}, + "2323-B\u00e2timents administratifs et commerciaux": {}, + "2324-B\u00e2timents affect\u00e9s au logement du personnel": {}, + "2325-B\u00e2timents immeubles de placement": {}, + "2326-B\u00e2timents de location acquisition": {} + }, + "233-Ouvrages d\u2019infrastructure": { + "2331-Voies de terre": {}, + "2332-Voies de fer": {}, + "2333-Voies d\u2019eau": {}, + "2334-Barrages, Digues": {}, + "2335-Pistes d\u2019a\u00e9rodrome": {}, + "2338-Autres ouvrages d\u2019infrastructures": {} + }, + "234-Am\u00e9nagements, agencements et installations techniques": { + "2341-Installations complexes sp\u00e9cialis\u00e9es sur sol propre": {}, + "2342-Installations complexes sp\u00e9cialis\u00e9es sur sol d\u2019autrui": {}, + "2343-Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol propre": {}, + "2344-Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol d\u2019autrui": {}, + "2345-Am\u00e9nagements et agencements des b\u00e2timents": {} + }, + "235-Am\u00e9nagements de bureaux": { + "2351-Installations g\u00e9n\u00e9rales": {}, + "2358-Autres am\u00e9nagements de bureaux": {} + }, + "237-B\u00e2timents industriels, agricoles et commerciaux mis en concession": {}, + "238-Autres installations et agencements": {}, + "239-B\u00e2timents am\u00e9nagements, agencements et installations en cours": { + "2391-B\u00e2timents en cours": {}, + "2392-Installations en cours": {}, + "2393-Ouvrages d\u2019infrastructure en cours": {}, + "2394-Am\u00e9nagements et agencements et installations techniques en cours": {}, + "2395-Am\u00e9nagements de bureaux en cours": {}, + "2398-Autres installations et agencements en cours": {} + } + }, + "24-Mat\u00e9riel, mobilier et actifs biologiques": { + "241-Mat\u00e9riel et outillage industriel et commercial": { + "2411-Mat\u00e9riel industriel": {}, + "2412-Outillage industriel": {}, + "2413-Mat\u00e9riel commercial": {}, + "2414-Outillage commercial": {}, + "2416-Mat\u00e9riel & outillage industriel et commercial de location-acquisition": {} + }, + "242-Mat\u00e9riel et outillage agricole": { + "2421-Mat\u00e9riel agricole": {}, + "2422-Outillage agricole": {}, + "2426-Mat\u00e9riel & outillage agricole de location-acquisition": {} + }, + "243-Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "244-Mat\u00e9riel et mobilier": { + "2441-Mat\u00e9riel de bureau": {}, + "2442-Mat\u00e9riel informatique": {}, + "2443-Mat\u00e9riel bureautique": {}, + "2444-Mobilier de bureau": {}, + "2445-Mat\u00e9riel et mobilier immeubles de placement": {}, + "2446-Mat\u00e9riel et mobilier de location acquisition": {}, + "2447-Mat\u00e9riel et mobilier des logements du personnel": {} + }, + "245-Mat\u00e9riel de transport": { + "2451-Mat\u00e9riel automobile": {}, + "2452-Mat\u00e9riel ferroviaire": {}, + "2453-Mat\u00e9riel fluvial, lagunaire": {}, + "2454-Mat\u00e9riel naval": {}, + "2455-Mat\u00e9riel a\u00e9rien": {}, + "2456-Mat\u00e9riel de transport de location-acquisition": {}, + "2457-Mat\u00e9riel hippomobile": {}, + "2458-Autres mat\u00e9riels de transport": {} + }, + "246-Actifs biologiques": { + "2461-Cheptel, animaux de trait": {}, + "2462-Cheptel, animaux reproducteurs": {}, + "2463-Animaux de garde": {}, + "2465-Plantations agricoles": {}, + "2468-Autres actifs biologiques": {} + }, + "247-Agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "2471-Agencements et am\u00e9nagements du mat\u00e9riel": {}, + "2472-Agencements et am\u00e9nagements des actifs biologiques": {}, + "2478-Autres agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": {} + }, + "248-Autres mat\u00e9riels et mobiliers": { + "2481-Collections et \u0153uvres d\u2019art": {}, + "2488-Divers mat\u00e9riels mobiliers": {} + }, + "249-Mat\u00e9riels et actifs biologiques en cours": { + "2491-Mat\u00e9riel et outillage industriel et commercial": {}, + "2492-Mat\u00e9riel et outillage agricole": {}, + "2493-Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "2494-Mat\u00e9riel et mobilier de bureau": {}, + "2495-Mat\u00e9riel de transport": {}, + "2496-Actifs biologiques": {}, + "2497-Agencements am\u00e9nagements du mat\u00e9riel et actifs biologiques": {}, + "2498-Autres mat\u00e9riels et actifs biologiques en cours": {} + } + }, + "25-Avances et acomptes vers\u00e9s sur immobilisations": { + "251-Avances et acomptes vers\u00e9s sur immobilisations incorporelles": {}, + "252-Avances et acomptes vers\u00e9s sur immobilisations corporelles": {} + }, + "26-Titres de participation": { + "261-Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": {}, + "262-Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le conjoint": {}, + "263-Titres de participation dans des soci\u00e9t\u00e9s conf\u00e9rant une influence notable": {}, + "265-Participations dans des organismes professionnels": {}, + "266-Parts dans des groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": {}, + "268-Autres titres de participation": {} + }, + "27-Autres immobilisations financi\u00e8res": { + "271-Pr\u00eats et cr\u00e9ances": { + "2711-Pr\u00eats participatifs": {}, + "2712-Pr\u00eats aux associ\u00e9s": {}, + "2713-Billets de fonds": {}, + "2714-Titres pr\u00eat\u00e9s": {}, + "2718-Autres pr\u00eats et cr\u00e9ances": {} + }, + "272-Pr\u00eats au personnel": { + "2721-Pr\u00eats immobiliers": {}, + "2722-Pr\u00eats mobiliers et d\u2019installation": {}, + "2728-Autres pr\u00eats au personnel": {} + }, + "273-Cr\u00e9ances sur l\u2019\u00c9tat": { + "2731-Retenues de garantie": {}, + "2733-Fonds r\u00e9glement\u00e9": {}, + "2734-Cr\u00e9ances sur le conc\u00e9dant": {}, + "2738-Autres cr\u00e9ances sur l\u2019\u00c9tat": {} + }, + "274-Titres immobilis\u00e9s": { + "2741-Titres immobilis\u00e9s de l\u2019activit\u00e9 de portefeuille (TIAP)": {}, + "2742-Titres participatifs": {}, + "2743-Certificats d\u2019investissement": {}, + "2744-Parts de fonds commun de placement (FCP)": {}, + "2745-Obligations": {}, + "2746-Actions ou parts propres": {}, + "2748-Autres titres immobilis\u00e9s": {} + }, + "275-D\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "2751-D\u00e9p\u00f4ts pour loyers d\u2019avance": {}, + "2752-D\u00e9p\u00f4ts pour l\u2019\u00e9lectricit\u00e9": {}, + "2753-D\u00e9p\u00f4ts pour l\u2019eau": {}, + "2754-D\u00e9p\u00f4ts pour le gaz": {}, + "2755-D\u00e9p\u00f4ts pour le t\u00e9l\u00e9phone, le t\u00e9lex, la t\u00e9l\u00e9copie": {}, + "2756-Cautionnements sur march\u00e9s publics": {}, + "2757-Cautionnements sur autres op\u00e9rations": {}, + "2758-Autres d\u00e9p\u00f4ts et cautionnements": {} + }, + "276-Int\u00e9r\u00eats courus": { + "2761-Pr\u00eats et cr\u00e9ances non commerciales": {}, + "2762-Pr\u00eats au personnel": {}, + "2763-Cr\u00e9ances sur l\u2019\u00c9tat": {}, + "2764-Titres immobilis\u00e9s": {}, + "2765-D\u00e9p\u00f4ts et cautionnements vers\u00e9s": {}, + "2767-Cr\u00e9ances rattach\u00e9es \u00e0 des participations": {}, + "2768-Immobilisations financi\u00e8res diverses": {} + }, + "277-Cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": { + "2771-Cr\u00e9ances rattach\u00e9es \u00e0 des participations (groupe)": {}, + "2772-Cr\u00e9ances rattach\u00e9es \u00e0 des participations (hors groupe)": {}, + "2773-Cr\u00e9ances rattach\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": {}, + "2774-Avances \u00e0 des Groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": {} + }, + "278-Immobilisations financi\u00e8res diverses": { + "2781-Cr\u00e9ances diverses groupe": {}, + "2782-Cr\u00e9ances diverses hors groupe": {}, + "2784-Banques d\u00e9p\u00f4ts \u00e0 terme": {}, + "2785-Or et m\u00e9taux pr\u00e9cieux": {}, + "2788-Autres immobilisations financi\u00e8res": {} + } + }, + "28-Amortissements": { + "account_type": "Accumulated Depreciation", + "281-Amortissements des immobilisations corporelles": { + "account_type": "Accumulated Depreciation", + "2811-Amortissements des frais de d\u00e9veloppement": { + "account_type": "Accumulated Depreciation" + }, + "2812-Amortissements des brevets, licences, concessions et droits similaires": { + "account_type": "Accumulated Depreciation" + }, + "2813-Amortissements des logiciels et sites internet": { + "account_type": "Accumulated Depreciation" + }, + "2814-Amortissements des marques": { + "account_type": "Accumulated Depreciation" + }, + "2815-Amortissements du fonds commercial": { + "account_type": "Accumulated Depreciation" + }, + "2816-Amortissements du droit au bail": { + "account_type": "Accumulated Depreciation" + }, + "2817-Amortissements des investissements de cr\u00e9ation": { + "account_type": "Accumulated Depreciation" + }, + "2818-Amortissements des autres droits et valeurs incorporels": { + "account_type": "Accumulated Depreciation" + } + }, + "282-Amortissements des terrains": { + "2824-Amortissements des travaux de mise en valeur des terrains": {} + }, + "283-Amortissements des b\u00e2timents, installations techniques et agencements": { + "2831-Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": {}, + "2832-Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": {}, + "2833-Amortissements des ouvrages d\u2019infrastructure": {}, + "2834-Amortissements des am\u00e9nagements, agencements et installations techniques": {}, + "2835-Amortissements des am\u00e9nagements de bureaux": {}, + "2837-Amortissements des b\u00e2timents industriels, agricoles et commerciaux mis en concession": {}, + "2838-Amortissements des autres installations et agencements": {} + }, + "284-Amortissements du mat\u00e9riel": { + "2841-Amortissements du mat\u00e9riel et outillage industriel et commercial": {}, + "2842-Amortissements du mat\u00e9riel et outillage agricole": {}, + "2843-Amortissements du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "2844-Amortissements du mat\u00e9riel et mobilier": {}, + "2845-Amortissements du mat\u00e9riel de transport": {}, + "2846-Amortissements des actifs biologiques": {}, + "2847-Amortissements des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": {}, + "2848-Amortissements des autres mat\u00e9riels": {} + } + }, + "29-D\u00e9pr\u00e9ciations des immobilisations": { + "291-D\u00e9pr\u00e9ciations des immobilisations incorporelles": { + "2911-D\u00e9pr\u00e9ciations des frais de d\u00e9veloppement": {}, + "2912-D\u00e9pr\u00e9ciations des brevets, licences, concessions et droits similaires": {}, + "2913-D\u00e9pr\u00e9ciations des logiciels et sites internet": {}, + "2914-D\u00e9pr\u00e9ciations des marques": {}, + "2915-D\u00e9pr\u00e9ciations du fonds commercial": {}, + "2916-D\u00e9pr\u00e9ciations du droit au bail": {}, + "2917-D\u00e9pr\u00e9ciations des investissements de cr\u00e9ation": {}, + "2918-D\u00e9pr\u00e9ciations des autres droits et valeurs incorporels": {}, + "2919-D\u00e9pr\u00e9ciations des immobilisations incorporelles en cours": {} + }, + "292-D\u00e9pr\u00e9ciations des terrains": { + "2921-D\u00e9pr\u00e9ciations des terrains agricoles et forestiers": {}, + "2922-D\u00e9pr\u00e9ciations des terrains nus": {}, + "2923-D\u00e9pr\u00e9ciations des terrains b\u00e2tis": {}, + "2924-D\u00e9pr\u00e9ciations des travaux de mise en valeur des terrains": {}, + "2925-D\u00e9pr\u00e9ciations des terrains de gisement": {}, + "2926-D\u00e9pr\u00e9ciations des terrains am\u00e9nag\u00e9s": {}, + "2927-D\u00e9pr\u00e9ciations des terrains mis en concession": {}, + "2928-D\u00e9pr\u00e9ciations des autres terrains": {}, + "2929-D\u00e9pr\u00e9ciations des am\u00e9nagements de terrains en cours": {} + }, + "293-D\u00e9pr\u00e9ciations des b\u00e2timents, installations techniques et agencements": { + "2931-D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": {}, + "2932-D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": {}, + "2933-D\u00e9pr\u00e9ciations des ouvrages d\u2019infrastructures": {}, + "2934-D\u00e9pr\u00e9ciations des am\u00e9nagements, agencements et installations techniques": {}, + "2935-D\u00e9pr\u00e9ciations des am\u00e9nagements de bureaux": {}, + "2937-D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles et commerciaux mis en concession": {}, + "2938-D\u00e9pr\u00e9ciations des autres installations et agencements": {}, + "2939-D\u00e9pr\u00e9ciations des b\u00e2timents et installations en cours": {} + }, + "294-D\u00e9pr\u00e9ciations de mat\u00e9riel, du mobilier et de l\u2019actif biologique": { + "2941-D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage industriel et commercial": {}, + "2942-D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage agricole": {}, + "2943-D\u00e9pr\u00e9ciations du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "2944-D\u00e9pr\u00e9ciations du mat\u00e9riel et mobilier": {}, + "2945-D\u00e9pr\u00e9ciations du mat\u00e9riel de transport": {}, + "2946-D\u00e9pr\u00e9ciations des actifs biologiques": {}, + "2947-D\u00e9pr\u00e9ciations des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": {}, + "2948-D\u00e9pr\u00e9ciations des autres mat\u00e9riels": {}, + "2949-D\u00e9pr\u00e9ciations de mat\u00e9riel en cours": {} + }, + "295-D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations": { + "2951-D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations incorporelles": {}, + "2952-D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations corporelles": {} + }, + "296-D\u00e9pr\u00e9ciations des titres de participation": { + "2961-D\u00e9pr\u00e9ciations des titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": {}, + "2962-D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s sous contr\u00f4le conjoint": {}, + "2963-D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s conf\u00e9rant une influence notable": {}, + "2965-D\u00e9pr\u00e9ciations des participations dans des organismes professionnels": {}, + "2966-D\u00e9pr\u00e9ciations des parts dans des GIE": {}, + "2968-D\u00e9pr\u00e9ciations des autres titres de participation": {} + }, + "297-D\u00e9pr\u00e9ciations des autres immobilisations financi\u00e8res": { + "2971-D\u00e9pr\u00e9ciations des pr\u00eats et cr\u00e9ances": {}, + "2972-D\u00e9pr\u00e9ciations des pr\u00eats au personnel": {}, + "2973-D\u00e9pr\u00e9ciations des cr\u00e9ances sur l\u2019\u00c9tat": {}, + "2974-D\u00e9pr\u00e9ciations des titres immobilis\u00e9s": {}, + "2975-D\u00e9pr\u00e9ciations des d\u00e9p\u00f4ts et cautionnements vers\u00e9s": {}, + "2977-D\u00e9pr\u00e9ciations des cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": {}, + "2978-D\u00e9pr\u00e9ciations des cr\u00e9ances financi\u00e8res diverses": {} + } + }, + "root_type": "Asset" + }, + "3-Comptes de Stocks": { + "31-Marchandises": { + "311-Marchandises A": { + "3111-Marchandises A1": {}, + "3112-Marchandises A2": {} + }, + "312-Marchandises B": { + "3121-Marchandises B1": {}, + "3122-Marchandises B2": {} + }, + "313-Actifs biologiques": { + "3131-Animaux": {}, + "3132-V\u00e9g\u00e9taux": {} + }, + "318-Marchandises hors activit\u00e9s ordinaires (HAO)": {} + }, + "32-Mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "321-Mati\u00e8res A": {}, + "322-Mati\u00e8res B": {}, + "323-Fournitures (A, B)": {} + }, + "33-Autres approvisionnements": { + "331-Mati\u00e8res consommables": {}, + "332-Fournitures d\u2019atelier et d\u2019usine": {}, + "333-Fournitures de magasin": {}, + "334-Fournitures de bureau": {}, + "335-Emballages": { + "3351-Emballages perdus": {}, + "3352-Emballages r\u00e9cup\u00e9rables non identifiables": {}, + "3353-Emballages \u00e0 usage mixte": {}, + "3358-Autres emballages": {} + }, + "338-Autres mati\u00e8res": {} + }, + "34-Produits en cours": { + "341-Produits en cours": { + "3411-Produits en cours P1": {}, + "3412-Produits en cours P2": {} + }, + "342-Travaux en cours": { + "3421-Travaux en cours T1": {}, + "3422-Travaux en cours T2": {} + }, + "343-Produits interm\u00e9diaires en cours": { + "3431-Produits interm\u00e9diaires A": {}, + "3432-Produits interm\u00e9diaires B": {} + }, + "344-Produits r\u00e9siduels en cours": { + "3441-Produits r\u00e9siduels A": {}, + "3442-Produits r\u00e9siduels B": {} + }, + "345-Actifs biologiques en cours": { + "3451-Animaux": {}, + "3452-V\u00e9g\u00e9taux": {} + } + }, + "35-Services en cours": { + "351-\u00c9tudes en cours": { + "3511-\u00c9tudes en cours E1": {}, + "3512-\u00c9tudes en cours E2": {} + }, + "352-Prestations de services en cours": { + "3521-Prestations de services S1": {}, + "3522-Prestations de services S2": {} + } + }, + "36-Produits finis": { + "361-Produits finis A": {}, + "362-Produits finis B": {}, + "363-Actifs biologiques": { + "3631-Animaux": {}, + "3632-V\u00e9g\u00e9taux": {}, + "3638-Autres stocks (activit\u00e9s annexes)": {} + } + }, + "37-Produits interm\u00e9diaires et r\u00e9siduels": { + "371-Produits interm\u00e9diaires": { + "3711-Produits interm\u00e9diaires A": {}, + "3712-Produits interm\u00e9diaires B": {} + }, + "372-Produits r\u00e9siduels": { + "3721-D\u00e9chets": {}, + "3722-Rebuts": {}, + "3723-Mati\u00e8res de R\u00e9cup\u00e9ration": {} + }, + "373-Actifs biologiques": { + "3731-Animaux": {}, + "3732-V\u00e9g\u00e9taux": {}, + "3738-Autres stocks (activit\u00e9s annexes)": {} + } + }, + "38-Stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": { + "account_type": "Stock", + "381-Marchandises en cours de route": {}, + "382-Mati\u00e8res premi\u00e8res et fournitures li\u00e9es en cours de route": {}, + "383-Autres approvisionnements en cours de route": {}, + "386-Produits finis en cours de route": {}, + "387-Stock en consignation ou en d\u00e9p\u00f4t": { + "3871-Stock en consignation": {}, + "3872-Stock en d\u00e9p\u00f4t": {} + }, + "388-Stock provenant d\u2019immobilisations mises hors service ou au rebut": {} + }, + "39-D\u00e9pr\u00e9ciations des stocks et encours de production": { + "391-D\u00e9pr\u00e9ciations des stocks de marchandises": {}, + "392-D\u00e9pr\u00e9ciations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": {}, + "393-D\u00e9pr\u00e9ciations des stocks d\u2019autres approvisionnements": {}, + "394-D\u00e9pr\u00e9ciations des productions en cours": {}, + "395-D\u00e9pr\u00e9ciations des services en cours": {}, + "396-D\u00e9pr\u00e9ciations des stocks de produits finis": {}, + "397-D\u00e9pr\u00e9ciations des stocks de produits interm\u00e9diaires et r\u00e9siduels": {}, + "398-D\u00e9pr\u00e9ciations des stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": {} + }, + "root_type": "Asset" + }, + "4-Comptes de Tiers (ACTIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (ACTIF)": { + "409-Fournisseurs d\u00e9biteurs": { + "4091-Fournisseurs Avances et acomptes vers\u00e9s": {}, + "4092-Fournisseurs Groupe avances et acomptes vers\u00e9s": {}, + "4093-Fournisseurs Sous-traitants avances et acomptes vers\u00e9s": {}, + "4094-Fournisseurs Cr\u00e9ances pour emballages et mat\u00e9riels \u00e0 rendre": {}, + "4098-Fournisseurs Rabais, remises, ristournes et autres avoirs \u00e0 obtenir": {} + } + }, + "41-Clients et comptes rattach\u00e9s (ACTIF)": { + "411-Clients": { + "4111-Clients": { + "account_type": "Receivable" + }, + "4112-Clients groupe": { + "account_type": "Receivable" + }, + "4114-Clients, \u00c9tat et Collectivit\u00e9s publiques": { + "account_type": "Receivable" + }, + "4115-Clients, organismes internationaux": { + "account_type": "Receivable" + }, + "4116-Clients, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Receivable" + }, + "4117-Client, retenues de garantie": { + "account_type": "Receivable" + }, + "4118-Clients, d\u00e9gr\u00e8vement de taxes sur la valeur ajout\u00e9e (TVA)": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "412-Clients, effets \u00e0 recevoir en portefeuille": { + "4121-Clients, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "4122-Clients Groupe, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "4124-\u00c9tat et Collectivit\u00e9s publiques, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "4125-Organismes Internationaux, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "413-Clients, ch\u00e8ques, effets et autres valeurs impay\u00e9es": { + "4131-Clients, ch\u00e8ques impay\u00e9s": { + "account_type": "Receivable" + }, + "4132-Clients, effets impay\u00e9s": { + "account_type": "Receivable" + }, + "4133-Clients, cartes de cr\u00e9dit impay\u00e9es": { + "account_type": "Receivable" + }, + "4138-Clients, autres valeurs impay\u00e9es": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "414-Cr\u00e9ances sur cessions courantes d\u2019immobilisations": { + "4141-Cr\u00e9ances en compte, immobilisations incorporelles": { + "account_type": "Receivable" + }, + "4142-Cr\u00e9ances en compte, immobilisations corporelles": { + "account_type": "Receivable" + }, + "4146-Effets \u00e0 recevoir, immobilisations incorporelles": { + "account_type": "Receivable" + }, + "4147-Effets \u00e0 recevoir, immobilisations corporelles": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "415-Clients, effets escompt\u00e9s non \u00e9chus": { + "account_type": "Receivable" + }, + "416-Cr\u00e9ances clients litigieuses ou douteuses": { + "4161-Cr\u00e9ances litigieuses": { + "account_type": "Receivable" + }, + "4162-Cr\u00e9ances douteuses": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "418-Clients, produits \u00e0 recevoir": { + "4181-Clients, factures \u00e0 \u00e9tablir": { + "account_type": "Receivable" + }, + "4186-Clients, int\u00e9r\u00eats courus": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "42-Personnel (ACTIF)": { + "421-Personnel, avances et acomptes": { + "4211-Personnel, avances": {}, + "4212-Personnel, acomptes": {}, + "4213-Frais avanc\u00e9s et fournitures au personnel": {} + } + }, + "43-Organismes sociaux (ACTIF)": { + "431-S\u00e9curit\u00e9 sociale": { + "4311-Prestations familiales": {}, + "4312-Accidents de travail": {}, + "4313-Caisse de retraite obligatoire": {}, + "4314-Caisse de retraite facultative": {}, + "4318-Autres cotisations sociales": {} + }, + "432-Caisses de retraite compl\u00e9mentaire": {}, + "433-Autres organismes sociaux": { + "4331-Mutuelle": {}, + "4332-Assurances retraite": {}, + "4333-Assurances et organismes de sant\u00e9": {} + }, + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "4387-Produits \u00e0 recevoir": {} + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (ACTIF)": { + "443-\u00c9tat, TVA factur\u00e9e": { + "4431-TVA factur\u00e9e sur ventes": {}, + "4432-TVA factur\u00e9e sur prestations de services": {}, + "4433-TVA factur\u00e9e sur travaux": {}, + "4434-TVA factur\u00e9e sur production livr\u00e9e \u00e0 soi-m\u00eame": {}, + "4435-TVA sur factures \u00e0 \u00e9tablir": {} + }, + "445-\u00c9tat, TVA r\u00e9cup\u00e9rable": { + "4451-TVA r\u00e9cup\u00e9rable sur immobilisations": {}, + "4452-TVA r\u00e9cup\u00e9rable sur achats": {}, + "4453-TVA r\u00e9cup\u00e9rable sur transport": {}, + "4454-TVA r\u00e9cup\u00e9rable sur services ext\u00e9rieurs et autres charges": {}, + "4455-TVA r\u00e9cup\u00e9rable sur factures non parvenues": {}, + "4456-TVA transf\u00e9r\u00e9e par d\u2019autres entit\u00e9s": {} + }, + "448-\u00c9tat, charges \u00e0 payer et produits \u00e0 recevoir": { + "4486-Charges \u00e0 payer": {}, + "4487-Produits \u00e0 recevoir": {} + }, + "449-\u00c9tat, cr\u00e9ances et dettes diverses": { + "4491-\u00c9tat, obligations cautionn\u00e9es": {}, + "4492-\u00c9tat, avances et acomptes vers\u00e9s sur imp\u00f4ts": {}, + "4493-\u00c9tat, fonds de dotation \u00e0 recevoir": {}, + "4494-\u00c9tat, subventions investissement \u00e0 recevoir": {}, + "4495-\u00c9tat, subventions d\u2019exploitation \u00e0 recevoir": {}, + "4496-\u00c9tat, subventions d\u2019\u00e9quilibre \u00e0 recevoir": {}, + "4497-\u00c9tat, avances sur subventions": {}, + "4499-\u00c9tat, fonds r\u00e9glement\u00e9s provisionn\u00e9s": {} + } + }, + "45-Organismes internationaux (ACTIF)": { + "451-Op\u00e9rations avec les organismes africains": {}, + "452-Op\u00e9rations avec les autres organismes internationaux": {}, + "458-Organismes internationaux, fonds de dotation et subventions \u00e0 recevoir": { + "4581-Organismes internationaux, fonds de dotation \u00e0 recevoir": {}, + "4582-Organismes internationaux, subventions \u00e0 recevoir": {} + } + }, + "46-Apporteurs, associ\u00e9s et groupe (ACTIF)": { + "461-Apporteurs, op\u00e9rations sur le capital": { + "4613-Apporteurs, capital appel\u00e9, non vers\u00e9": {}, + "4614-Apporteurs, compte d\u2019apport, op\u00e9rations de restructuration (fusion...)": {}, + "4618-Apporteurs, titres \u00e0 \u00e9changer": {} + }, + "467-Apporteurs, restant d\u00fb sur capital appel\u00e9": {} + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (ACTIF)": { + "472-Cr\u00e9ances et dettes sur titres de placement": { + "4721-Cr\u00e9ances sur cessions de titres de placement": {}, + "4726-Versements restant \u00e0 effectuer sur titres de placement non lib\u00e9r\u00e9s": {} + }, + "473-Interm\u00e9diaires Op\u00e9rations faites pour compte de tiers": { + "4731-Mandants": {}, + "4732-Mandataires": {}, + "4733-Commettants": {}, + "4734-Commissionnaires": {}, + "4739-\u00c9tat, Collectivit\u00e9s publiques, fonds global d\u2019allocation": {} + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits": { + "4747-Compte de r\u00e9partition p\u00e9riodique des produits": {} + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA": { + "4751-Compte actif": { + "account_type": "Temporary" + } + }, + "476-Charges constat\u00e9es d\u2019avance": {}, + "478-\u00c9carts de conversion actif": { + "4781-Diminution des cr\u00e9ances d\u2019exploitation": {}, + "4782-Diminution des cr\u00e9ances financi\u00e8res": {}, + "4783-Augmentation des dettes d\u2019exploitation": {}, + "4784-Augmentation des dettes financi\u00e8res": {}, + "4786-Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": {}, + "4788-Diff\u00e9rences compens\u00e9es par couverture de change": {} + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (ACTIF)": { + "485-Cr\u00e9ances sur cessions d\u2019immobilisations": { + "4851-En compte, immobilisations incorporelles": {}, + "4852-En compte, immobilisations corporelles": {}, + "4853-Effets \u00e0 recevoir, immobilisations incorporelles": {}, + "4854-Effets \u00e0 recevoir, immobilisations corporelles": {}, + "4855-Effets escompt\u00e9s non \u00e9chus": {}, + "4857-Retenues de garantie": {}, + "4858-Factures \u00e0 \u00e9tablir": {} + }, + "488-Autres cr\u00e9ances hors activit\u00e9s ordinaires (HAO)": {} + }, + "49-D\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme (tiers) (ACTIF)": { + "491-D\u00e9pr\u00e9ciations des comptes clients": { + "4911-Cr\u00e9ances litigieuses": {}, + "4912-Cr\u00e9ances douteuses": {} + }, + "495-D\u00e9pr\u00e9ciations des comptes organismes internationaux": {}, + "496-D\u00e9pr\u00e9ciations des comptes apporteurs, associ\u00e9s et groupe": { + "4962-Associ\u00e9s, comptes courants": {}, + "4963-Associ\u00e9s, op\u00e9rations faites en commun": {}, + "4966-Groupe, comptes courants": {} + }, + "497-D\u00e9pr\u00e9ciations des comptes d\u00e9biteurs divers": {}, + "498-D\u00e9pr\u00e9ciations des comptes de cr\u00e9ances HAO": { + "4985-Cr\u00e9ances sur cessions d\u2019immobilisations": {}, + "4986-Cr\u00e9ances sur cessions de titres de placement": {}, + "4988-Autres cr\u00e9ances HAO": {} + }, + "499-Provisions pour risques \u00e0 court terme": { + "4991-Sur op\u00e9rations d\u2019exploitation": {}, + "4997-Sur op\u00e9rations financi\u00e8res": {}, + "4998-Sur op\u00e9rations HAO": {} + } + }, + "root_type": "Asset" + }, + "4-Comptes de Tiers (PASSIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (PASSIF)": { + "401-Fournisseurs, dettes en compte": { + "4011-Fournisseurs": { + "account_type": "Payable" + }, + "4012-Fournisseurs groupe": { + "account_type": "Payable" + }, + "4013-Fournisseurs sous-traitants": { + "account_type": "Payable" + }, + "4016-Fournisseurs, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Payable" + }, + "4017-Fournisseur, retenues de garantie": { + "account_type": "Payable" + }, + "account_type": "Payable" + }, + "402-Fournisseurs, effets \u00e0 payer": { + "4021-Fournisseurs Effets \u00e0 payer": { + "account_type": "Payable" + }, + "4022-Fournisseurs Groupe, effets \u00e0 payer": { + "account_type": "Payable" + }, + "4023-Fournisseurs Sous-traitants, effets \u00e0 payer": { + "account_type": "Payable" + }, + "account_type": "Payable" + }, + "404-Fournisseurs, acquisitions courantes d\u2019immobilisations": { + "4041-Fournisseurs Dettes en comptes, immobilisations incorporelles": { + "account_type": "Payable" + }, + "4042-Fournisseurs Dettes en comptes, immobilisations corporelles": { + "account_type": "Payable" + }, + "4046-Fournisseurs Effets \u00e0 payer, immobilisations incorporelles": { + "account_type": "Payable" + }, + "4047-Fournisseurs Effets \u00e0 payer, immobilisations corporelles": { + "account_type": "Payable" + }, + "account_type": "Payable" + }, + "408-Fournisseurs, factures non parvenues": { + "4081-Fournisseurs": { + "account_type": "Stock Received But Not Billed" + }, + "4082-Fournisseurs groupe": { + "account_type": "Stock Received But Not Billed" + }, + "4083-Fournisseurs sous-traitants": { + "account_type": "Stock Received But Not Billed" + }, + "4086-Fournisseurs, int\u00e9r\u00eats courus": { + "account_type": "Stock Received But Not Billed" + }, + "account_type": "Stock Received But Not Billed" + }, + "account_type": "Payable" + }, + "41-Clients et comptes rattach\u00e9s (PASSIF)": { + "419-Clients cr\u00e9diteurs": { + "4191-Clients, avances et acomptes re\u00e7us": {}, + "4192-Clients groupe, avances et acomptes re\u00e7us": {}, + "4194-Clients, dettes pour emballages et mat\u00e9riels consign\u00e9s": {}, + "4198-Clients, rabais, remises, ristournes et autres avoirs \u00e0 accorder": {} + } + }, + "42-Personnel (PASSIF)": { + "422-Personnel, r\u00e9mun\u00e9rations dues": {}, + "423-Personnel, oppositions, saisies-arr\u00eats": { + "4231-Personnel, oppositions": {}, + "4232-Personnel, saisies-arr\u00eats": {}, + "4233-Personnel, avis \u00e0 tiers d\u00e9tenteur": {} + }, + "424-Personnel, \u0153uvres sociales internes": { + "4241-Assistance m\u00e9dicale": {}, + "4242-Allocations familiales": {}, + "4245-Organismes sociaux rattach\u00e9s \u00e0 l\u2019entit\u00e9": {}, + "4248-Autres \u0153uvres sociales internes": {} + }, + "425-Repr\u00e9sentants du personnel": { + "4251-D\u00e9l\u00e9gu\u00e9s du personnel": {}, + "4252-Syndicats et Comit\u00e9s d\u2019entreprises, d\u2019\u00c9tablissement": {}, + "4258-Autres repr\u00e9sentants du personnel": {} + }, + "426-Personnel, participation aux b\u00e9n\u00e9fices et au capital": { + "4261-Participation aux b\u00e9n\u00e9fices": {}, + "4264-Participation au capital": {} + }, + "427-Personnel d\u00e9p\u00f4ts": {}, + "428-Personnel, charges \u00e0 payer et produits \u00e0 recevoir": { + "4281-Dettes provisionn\u00e9es pour cong\u00e9s \u00e0 payer": {}, + "4286-Autres charges \u00e0 payer": {}, + "4287-Produits \u00e0 recevoir": {} + } + }, + "43-Organismes sociaux (PASSIF)": { + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "4381-Charges sociales sur gratifications \u00e0 payer": {}, + "4382-Charges sociales sur cong\u00e9s \u00e0 payer": {}, + "4386-Autres charges \u00e0 payer": {} + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (PASSIF)": { + "441-\u00c9tat, imp\u00f4t sur les b\u00e9n\u00e9fices": {}, + "442-\u00c9tat, autres imp\u00f4ts et taxes": { + "4421-Imp\u00f4ts et taxes d\u2019\u00c9tat": {}, + "4422-Imp\u00f4ts et taxes pour les collectivit\u00e9s publiques": {}, + "4423-Imp\u00f4ts et taxes recouvrables sur des obligataires": {}, + "4424-Imp\u00f4ts et taxes recouvrables sur des associ\u00e9s": {}, + "4426-Droits de douane": {}, + "4428-Autres imp\u00f4ts et taxes": {} + }, + "444-\u00c9tat, TVA due ou cr\u00e9dit de TVA": { + "4441-\u00c9tat, TVA due": {}, + "4449-\u00c9tat, cr\u00e9dit de TVA \u00e0 reporter": {} + }, + "446-\u00c9tat, autres taxes sur le chiffre d\u2019affaires": {}, + "447-\u00c9tat, imp\u00f4ts retenus \u00e0 la source": { + "4471-Imp\u00f4t G\u00e9n\u00e9ral sur le revenu": {}, + "4472-Imp\u00f4ts sur salaires": {}, + "4473-Contribution nationale": {}, + "4474-Contribution nationale de solidarit\u00e9": {}, + "4478-Autres imp\u00f4ts et contributions": {} + } + }, + "46-Apporteurs, associ\u00e9s et groupe (PASSIF)": { + "461-Apporteurs, op\u00e9rations sur le capital (PASSIF)": { + "4611-Apporteurs, apports en nature": {}, + "4612-Apporteurs, apports en num\u00e9raire": {}, + "4615-Apporteurs, versements re\u00e7us sur augmentation de capital": {}, + "4616-Apporteurs, versements anticip\u00e9s": {}, + "4617-Apporteurs d\u00e9faillants": {}, + "4619-Apporteurs, capital \u00e0 rembourser": {} + }, + "462-Associ\u00e9s, comptes courants": { + "4621-Principal": {}, + "4626-Int\u00e9r\u00eats courus": {} + }, + "463-Associ\u00e9s, op\u00e9rations faites en commun et GIE": { + "4631-Op\u00e9rations courantes": {}, + "4636-Int\u00e9r\u00eats courus": {} + }, + "465-Associ\u00e9s, dividendes \u00e0 payer": {}, + "466-Groupe, comptes courants": {} + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (PASSIF)": { + "471-D\u00e9biteurs et cr\u00e9diteurs divers": { + "4711-D\u00e9biteurs divers": {}, + "4712-Cr\u00e9diteurs divers": {}, + "4713-Obligataires": {}, + "4715-R\u00e9mun\u00e9rations d\u2019administrateurs": {}, + "4716-Compte d\u2019affacturage": {}, + "4717-D\u00e9biteurs divers retenues de garantie": {}, + "4718-Apport, compte de fusion et op\u00e9rations assimil\u00e9es": {}, + "4719-Bons de souscription d\u2019actions et d\u2019obligations": {} + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits (PASSIF)": { + "4746-Compte de r\u00e9partition p\u00e9riodique des charges": {} + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA (PASSIF)": { + "4752-Compte passif": {} + }, + "477-Produits constat\u00e9s d\u2019avance": {}, + "479-\u00c9carts de conversion passif": { + "4791-Augmentation des cr\u00e9ances d\u2019exploitation": {}, + "4792-Augmentation des cr\u00e9ances financi\u00e8res": {}, + "4793-Diminution des dettes d\u2019exploitation": {}, + "4794-Diminution des dettes financi\u00e8res": {}, + "4797-Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": {}, + "4798-Diff\u00e9rences compens\u00e9es par couverture de change": {} + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (HAO) (PASSIF)": { + "481-Fournisseurs d\u2019investissements": { + "4811-Immobilisations incorporelles": {}, + "4812-Immobilisations corporelles": {}, + "4813-Versements restant \u00e0 effectuer sur titres de participation et titres immobilis\u00e9s non lib\u00e9r\u00e9s": {}, + "4816-R\u00e9serve de propri\u00e9t\u00e9": {}, + "4817-Retenues de garantie": {}, + "4818-Factures non parvenues": {} + }, + "482-Fournisseurs d\u2019investissements, effets \u00e0 payer": { + "4821-Immobilisations incorporelles": {}, + "4822-Immobilisations corporelles": {} + }, + "484-Autres dettes hors activit\u00e9s ordinaires (HAO)": { + "4887-Produits": {} + } + }, + "49-D\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme (tiers) (PASSIF)": { + "490-D\u00e9pr\u00e9ciations des comptes fournisseurs": {}, + "492-D\u00e9pr\u00e9ciations des comptes personnel": {}, + "493-D\u00e9pr\u00e9ciations des comptes organismes sociaux": {}, + "494-D\u00e9pr\u00e9ciations des comptes \u00c9tat et collectivit\u00e9s publiques": {}, + "495-D\u00e9pr\u00e9ciations des comptes organismes internationaux": {} + }, + "root_type": "Liability" + }, + "5-Comptes de tr\u00e9sorerie": { + "50-Titres de placement": { + "501-Titres du tr\u00e9sor et bons de caisse \u00e0 court terme": { + "5011-Titres du Tr\u00e9sor \u00e0 court terme": {}, + "5012-Titres d\u2019organismes financiers": {}, + "5013-Bons de caisse \u00e0 court terme": {}, + "5016-Frais d\u2019acquisition des titres de tr\u00e9sor et bons de caisse": {} + }, + "502-Actions": { + "5021-Actions ou parts propres": {}, + "5022-Actions cot\u00e9es": {}, + "5023-Actions non cot\u00e9es": {}, + "5024-Actions d\u00e9membr\u00e9es (certificats d\u2019investissement, droits de vote)": {}, + "5025-Autres actions": {}, + "5026-Frais d\u2019acquisition des actions": {} + }, + "503-Obligations": { + "5031-Obligations \u00e9mises par la soci\u00e9t\u00e9 et rachet\u00e9es par elle": {}, + "5032-Obligations cot\u00e9es": {}, + "5033-Obligations non cot\u00e9es": {}, + "5035-Autres obligations": {}, + "5036-Frais d\u2019acquisition des obligations": {} + }, + "504-Bons de souscription": { + "5042-Bons de souscription d\u2019actions": {}, + "5043-Bons de souscription d\u2019obligations": {} + }, + "505-Titres n\u00e9gociables hors r\u00e9gion": {}, + "506-Int\u00e9r\u00eats courus": { + "5061-Titres du Tr\u00e9sor et bons de caisse \u00e0 court terme": {}, + "5062-Actions": {}, + "5063-Obligations": {} + }, + "508-Autres titres de placement et cr\u00e9ances assimil\u00e9es": {} + }, + "51-Valeurs \u00e0 encaisser": { + "511-Effets \u00e0 encaisser": {}, + "512-Effets \u00e0 l\u2019encaissement": {}, + "513-Ch\u00e8ques \u00e0 encaisser": {}, + "514-Ch\u00e8ques \u00e0 l\u2019encaissement": {}, + "515-Cartes de cr\u00e9dit \u00e0 encaisser": {}, + "518-Autres valeurs \u00e0 l\u2019encaissement": { + "5181-Warrants": {}, + "5182-Billets de fonds": {}, + "5185-Ch\u00e8ques de voyage": {}, + "5186-Coupons \u00e9chus": {}, + "5187-Int\u00e9r\u00eats \u00e9chus des obligations": {} + } + }, + "52-Banques": { + "521-Banques locales": { + "5211-Banques en monnaie nationale": { + "account_type": "Bank" + }, + "5215-Banques en devises": { + "account_type": "Bank" + }, + "account_type": "Bank" + }, + "522-Banques autres \u00c9tats r\u00e9gion": {}, + "523-Banques autres \u00c9tats zone mon\u00e9taire": {}, + "524-Banques hors zone mon\u00e9taire": {}, + "525-Banques d\u00e9p\u00f4t \u00e0 terme": {}, + "526-Banques, int\u00e9r\u00eats courus": { + "5261-Banque, int\u00e9r\u00eats courus, charges \u00e0 payer": {}, + "5267-Banque, int\u00e9r\u00eats courus, produits \u00e0 recevoir": {} + } + }, + "53-\u00c9tablissements financiers et assimil\u00e9s": { + "531-Ch\u00e8ques postaux": {}, + "532-Tr\u00e9sor": {}, + "533-Soci\u00e9t\u00e9s de gestion et d\u2019interm\u00e9diation (SGI)": {}, + "536-\u00c9tablissements financiers, int\u00e9r\u00eats courus": {}, + "538-Autres organismes financiers": {} + }, + "54-Instruments de tr\u00e9sorerie": { + "541-Options de taux d\u2019int\u00e9r\u00eat": {}, + "542-Options de taux de change": {}, + "543-Options de taux boursiers": {}, + "544-Instruments de march\u00e9s \u00e0 terme": {}, + "545-Avoirs d\u2019or et autres m\u00e9taux pr\u00e9cieux": {} + }, + "55-Instruments de monnaie \u00e9lectronique": { + "551-Monnaie \u00e9lectronique carte carburant": {}, + "552-Monnaie \u00e9lectronique t\u00e9l\u00e9phone portable": {}, + "553-Monnaie \u00e9lectronique carte p\u00e9age": {}, + "554-Porte-monnaie \u00e9lectronique": {}, + "558-Autres instruments de monnaies \u00e9lectroniques": {} + }, + "56-Banques, cr\u00e9dits de tr\u00e9sorerie et d\u2019escompte": { + "561-Cr\u00e9dits de tr\u00e9sorerie": {}, + "564-Escompte de cr\u00e9dits de campagne": {}, + "565-Escompte de cr\u00e9dits ordinaires": {}, + "566-Banques, cr\u00e9dits de tr\u00e9sorerie, int\u00e9r\u00eats courus": {} + }, + "57-Caisse": { + "571-Caisse si\u00e8ge social": { + "5711-Caisse en monnaie nationale": {}, + "5712-Caisse en devises": {} + }, + "572-Caisse succursale A": { + "5721-En monnaie nationale": {}, + "5722-En devises": {} + }, + "573-Caisse succursale B": { + "5731-En monnaie nationale": {}, + "5732-En devises": {} + } + }, + "58-R\u00e9gies d\u2019avances, accr\u00e9ditifs et virements internes": { + "581-R\u00e9gies d\u2019avance": {}, + "582-Accr\u00e9ditifs": {}, + "585-Virements de fonds": {}, + "588-Autres virements internes": {} + }, + "59-D\u00e9pr\u00e9ciations et provisions pour risque \u00e0 court terme": { + "590-D\u00e9pr\u00e9ciations des titres de placement": {}, + "591-D\u00e9pr\u00e9ciations des titres et valeurs \u00e0 encaisser": {}, + "592-D\u00e9pr\u00e9ciations des comptes banques": {}, + "593-D\u00e9pr\u00e9ciations des comptes \u00e9tablissements financiers et assimil\u00e9s": {}, + "594-D\u00e9pr\u00e9ciations des comptes d\u2019instruments de tr\u00e9sorerie": {}, + "599-Provisions pour risque \u00e0 court terme \u00e0 caract\u00e8re financier": {} + }, + "root_type": "Asset" + }, + "6-Comptes de charges des activit\u00e9s ordinaires": { + "60-Achats et variations de stocks": { + "601-Achats de marchandises": { + "6011-Dans la R\u00e9gion": {}, + "6012-Hors R\u00e9gion": {}, + "6013-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "6014-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "6015-Frais sur achats": {}, + "6019-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "602-Achats de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "6021-Dans la R\u00e9gion": {}, + "6022-Hors R\u00e9gion": {}, + "6023-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "6024-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "6025-Frais sur achats": {}, + "6029-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "603-Variations des stocks de biens achet\u00e9s": { + "6031-Variations des stocks de marchandises": {}, + "6032-Variations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": {}, + "6033-Variations des stocks d\u2019autres approvisionnements": {} + }, + "604-Achats stock\u00e9s de mati\u00e8res et fournitures consommables": { + "6041-Mati\u00e8res consommables": {}, + "6042-Mati\u00e8res combustibles": {}, + "6043-Produits d\u2019entretien": {}, + "6044-Fournitures d\u2019atelier et d\u2019usine": {}, + "6045-Frais sur achat": {}, + "6046-Fournitures de magasin": {}, + "6047-Fournitures de bureau": {}, + "6049-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "605-Autres achats": { + "6051-Fournitures non stockables Eau": {}, + "6052-Fournitures non stockables \u00c9lectricit\u00e9": {}, + "6053-Fournitures non stockables Autres \u00e9nergies": {}, + "6054-Fournitures d\u2019entretien non stockables": {}, + "6055-Fournitures de bureau non stockables": {}, + "6056-Achats de petit mat\u00e9riel et outillage": {}, + "6057-Achats d\u2019\u00e9tudes et prestations de services": {}, + "6058-Achats de travaux, mat\u00e9riels et \u00e9quipements": {}, + "6059-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "608-Achats d\u2019emballages": { + "6081-Emballages perdus": {}, + "6082-Emballages r\u00e9cup\u00e9rables non identifiables": {}, + "6083-Emballages \u00e0 usage mixte": {}, + "6085-Frais sur achats": {}, + "6089-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + } + }, + "61-Transports": { + "612-Transports sur ventes": {}, + "613-Transports pour le compte de tiers": {}, + "614-Transports du personnel": {}, + "616-Transports de plis": {}, + "618-Autres frais de transport": { + "6181-Voyages et d\u00e9placements": {}, + "6182-Transports entre \u00e9tablissements ou chantiers": {}, + "6183-Transports administratifs": {} + } + }, + "62-Services ext\u00e9rieurs": { + "621-Sous-traitance g\u00e9n\u00e9rale": {}, + "622-Locations, charges locatives": { + "6221-Locations de terrains": {}, + "6222-Locations de b\u00e2timents": {}, + "6223-Locations de mat\u00e9riels et outillages": {}, + "6224-Malis sur emballages": {}, + "6225-Locations d\u2019emballages": {}, + "6226-Fermages et loyers du foncier": {}, + "6228-Locations et charges locatives diverses": {} + }, + "623-Redevances de location acquisition": { + "6232-Cr\u00e9dit-bail immobilier": {}, + "6233-Cr\u00e9dit-bail mobilier": {}, + "6234-Location-vente": {}, + "6238-Autres contrats de location acquisition": {} + }, + "624-Entretien, r\u00e9parations, remise en \u00e9tat et maintenance": { + "6241-Entretien et r\u00e9parations des biens immobiliers": {}, + "6242-Entretien et r\u00e9parations des biens mobiliers": {}, + "6243-Maintenance": {}, + "6244-Charges de d\u00e9mant\u00e8lement et remise en \u00e9tat": {}, + "6248-Autres entretiens et r\u00e9parations": {} + }, + "625-Primes d\u2019assurance": { + "6251-Assurances multirisques": {}, + "6252-Assurances mat\u00e9riel de transport": {}, + "6253-Assurances risques d\u2019exploitation": {}, + "6254-Assurances responsabilit\u00e9 du producteur": {}, + "6255-Assurances insolvabilit\u00e9 clients": {}, + "6257-Assurances transport sur ventes": {}, + "6258-Autres primes d\u2019assurances": {} + }, + "626-\u00c9tudes, recherches et documentation": { + "6261-\u00c9tudes et recherches": {}, + "6265-Documentation g\u00e9n\u00e9rale": {}, + "6266-Documentation technique": {} + }, + "627-Publicit\u00e9, publications, relations publiques": { + "6271-Annonces, insertions": {}, + "6272-Catalogues, imprim\u00e9s publicitaires": {}, + "6273-\u00c9chantillons": {}, + "6274-Foires et expositions": {}, + "6275-Publications": {}, + "6276-Cadeaux \u00e0 la client\u00e8le": {}, + "6277-Frais de colloques, s\u00e9minaires, conf\u00e9rences": {}, + "6278-Autres charges de publicit\u00e9 et relations publiques": {} + }, + "628-Frais de t\u00e9l\u00e9communications": { + "6281-Frais de t\u00e9l\u00e9phone": {}, + "6282-Frais de t\u00e9lex": {}, + "6283-Frais de t\u00e9l\u00e9copie": {}, + "6288-Autres frais de t\u00e9l\u00e9communications": {} + } + }, + "63-Autres services ext\u00e9rieurs": { + "631-Frais bancaires": { + "6311-Frais sur titres (vente, garde)": {}, + "6312-Frais sur effets": {}, + "6313-Location de coffres": {}, + "6314-Commissions d\u2019affacturage": {}, + "6315-Commissions sur cartes de cr\u00e9dit": {}, + "6316-Frais d\u2019\u00e9mission d\u2019emprunts": {}, + "6317-Frais sur instruments monnaie \u00e9lectronique": {}, + "6318-Autres frais bancaires": {} + }, + "632-R\u00e9mun\u00e9rations d\u2019interm\u00e9diaires et de conseils": { + "6322-Commissions et courtages sur ventes": {}, + "6324-Honoraires des professions r\u00e9glement\u00e9es": {}, + "6325-Frais d\u2019actes et de contentieux": {}, + "6326-R\u00e9mun\u00e9rations d\u2019affacturage": {}, + "6327-R\u00e9mun\u00e9rations des autres prestataires de services": {}, + "6328-Divers frais": {} + }, + "633-Frais de formation du personnel": {}, + "634-Redevances pour brevets, licences, logiciels, concessions et droits et valeurs similaires": { + "6342-Redevances pour brevets, licences": {}, + "6343-Redevances pour logiciels": {}, + "6344-Redevances pour marques": {}, + "6345-Redevances pour sites internet": {}, + "6346-Redevances pour concessions, droits et valeurs similaires": {} + }, + "635-Cotisations": { + "6351-Cotisations": {}, + "6358-Concours divers": {} + }, + "637-R\u00e9mun\u00e9rations de personnel ext\u00e9rieur \u00e0 l\u2019entit\u00e9": { + "6371-Personnel int\u00e9rimaire": {}, + "6372-Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": {} + }, + "638-Autres charges externes": { + "6381-Frais de recrutement du personnel": {}, + "6382-Frais de d\u00e9m\u00e9nagement": {}, + "6383-R\u00e9ceptions": {}, + "6384-Missions": {}, + "6385-Charges de copropri\u00e9t\u00e9": {} + } + }, + "64-Imp\u00f4ts et taxes": { + "641-Imp\u00f4ts et taxes directs": { + "6411-Imp\u00f4ts fonciers et taxes annexes": {}, + "6412-Patentes, licences et taxes annexes": {}, + "6413-Taxes sur appointements et salaires": {}, + "6414-Taxes d\u2019apprentissage": {}, + "6415-Formation professionnelle continue": {}, + "6418-Autres imp\u00f4ts et taxes directs": {} + }, + "645-Imp\u00f4ts et taxes indirects": {}, + "646-Droits d\u2019enregistrement": { + "6461-Droits de mutation": {}, + "6462-Droits de timbre": {}, + "6463-Taxes sur les v\u00e9hicules de soci\u00e9t\u00e9": {}, + "6464-Vignettes": {}, + "6468-Autres droits": {} + }, + "647-P\u00e9nalit\u00e9s, amendes fiscales": { + "6471-P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts directs": {}, + "6472-P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts indirects": {}, + "6473-P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts directs": {}, + "6474-P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts indirects": {}, + "6478-Autres p\u00e9nalit\u00e9s et amendes fiscales": {} + }, + "648-Autres imp\u00f4ts et taxes": {} + }, + "65-Autres charges": { + "651-Pertes sur cr\u00e9ances clients et autres d\u00e9biteurs": { + "6511-Clients": {}, + "6515-Autres d\u00e9biteurs": {} + }, + "652-Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "6521-Quote-part transf\u00e9r\u00e9e de b\u00e9n\u00e9fices (comptabilit\u00e9 du g\u00e9rant)": {}, + "6525-Pertes imput\u00e9es par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": {} + }, + "654-Valeurs comptables des cessions courantes d\u2019immobilisations": { + "6541-Immobilisations incorporelles": {}, + "6542-Immobilisations corporelles": {} + }, + "656-Perte de change sur cr\u00e9ances et dettes commerciale": {}, + "657-P\u00e9nalit\u00e9s et amendes p\u00e9nales": {}, + "658-Charges diverses": { + "6581-Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": {}, + "6582-Dons": {}, + "6583-M\u00e9c\u00e9nat": {}, + "6588-Autres charges diverses": {} + }, + "659-Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "6591-Sur risques \u00e0 court terme": {}, + "6593-Sur stocks": {}, + "6594-Sur cr\u00e9ances": {}, + "6598-Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme": {} + } + }, + "66-Charges de personnel": { + "661-R\u00e9mun\u00e9rations directes vers\u00e9es au personnel national": { + "6611-Appointements salaires et commissions": {}, + "6612-Primes et gratifications": {}, + "6613-Cong\u00e9s pay\u00e9s": {}, + "6614-Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": {}, + "6615-Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": {}, + "6616-Suppl\u00e9ment familial": {}, + "6617-Avantages en nature": {}, + "6618-Autres r\u00e9mun\u00e9rations directes": {} + }, + "662-R\u00e9mun\u00e9rations directes vers\u00e9es au personnel non national": { + "6621-Appointements salaires et commissions": {}, + "6622-Primes et gratifications": {}, + "6623-Cong\u00e9s pay\u00e9s": {}, + "6624-Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": {}, + "6625-Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": {}, + "6626-Suppl\u00e9ment familial": {}, + "6627-Avantages en nature": {}, + "6628-Autres r\u00e9mun\u00e9rations directes": {} + }, + "663-Indemnit\u00e9s forfaitaires vers\u00e9es au personnel": { + "6631-Indemnit\u00e9s de logement": {}, + "6632-Indemnit\u00e9s de repr\u00e9sentation": {}, + "6633-Indemnit\u00e9s d\u2019expatriation": {}, + "6634-Indemnit\u00e9s de transport": {}, + "6638-Autres indemnit\u00e9s et avantages divers": {} + }, + "664-Charges sociales": { + "6641-Charges sociales sur r\u00e9mun\u00e9ration du personnel national": {}, + "6642-Charges sociales sur r\u00e9mun\u00e9ration du personnel non national": {} + }, + "666-R\u00e9mun\u00e9rations et charges sociales de l\u2019exploitant individuel": { + "6661-R\u00e9mun\u00e9ration du travail de l\u2019exploitant": {}, + "6662-Charges sociales": {} + }, + "667-R\u00e9mun\u00e9ration transf\u00e9r\u00e9e de personnel ext\u00e9rieur": { + "6671-Personnel int\u00e9rimaire": {}, + "6672-Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": {} + }, + "668-Autres charges sociales": { + "6681-Versements aux syndicats et comit\u00e9s d\u2019entreprise, d\u2019\u00e9tablissement": {}, + "6682-Versements aux comit\u00e9s d\u2019hygi\u00e8ne et de s\u00e9curit\u00e9": {}, + "6683-Versements et contributions aux autres \u0153uvres sociales": {}, + "6684-M\u00e9decine du travail et pharmacie": {}, + "6685-Assurances et organismes de sant\u00e9": {}, + "6686-Assurances retraite et fonds de pension": {}, + "6687-Majorations et p\u00e9nalit\u00e9s sociales": {}, + "6688-Charges sociales diverses": {} + } + }, + "67-Frais financiers et charges assimil\u00e9es": { + "671-Int\u00e9r\u00eats des emprunts": { + "6711-Emprunts obligataires": {}, + "6712-Emprunts aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": {}, + "6713-Dettes li\u00e9es \u00e0 des participations": {}, + "6714-Primes de remboursement des obligations": {} + }, + "672-Int\u00e9r\u00eats dans loyers de location acquisition": { + "6722-Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail immobilier": {}, + "6723-Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail mobilier": {}, + "6724-Int\u00e9r\u00eats dans loyers de location acquisition / location-vente": {}, + "6728-Int\u00e9r\u00eats dans loyers des autres locations acquisition": {} + }, + "673-Escomptes accord\u00e9s": {}, + "674-Autres int\u00e9r\u00eats": { + "6741-Avances re\u00e7ues et d\u00e9p\u00f4ts cr\u00e9diteurs": {}, + "6742-Comptes courants bloqu\u00e9s": {}, + "6743-Int\u00e9r\u00eats sur obligations cautionn\u00e9es": {}, + "6744-Int\u00e9r\u00eats sur dettes commerciales": {}, + "6745-Int\u00e9r\u00eats bancaires et sur op\u00e9rations de financement (escompte...)": {}, + "6748-Int\u00e9r\u00eats sur dettes diverses": {} + }, + "675-Escomptes des effets de commerce": {}, + "676-Pertes de change financi\u00e8res": {}, + "677-Pertes sur titres de placement": { + "6771-Pertes sur cessions de titres de placement": {}, + "6772-Mali provenant d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": {} + }, + "678-Pertes et charges sur risques financiers": { + "6781-Sur rentes viag\u00e8res": {}, + "6782-Sur op\u00e9rations financi\u00e8res": {}, + "6784-Sur instruments de tr\u00e9sorerie": {} + }, + "679-Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "6791-Sur risques financiers": {}, + "6795-Sur titres de placement": {}, + "6798-Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": {} + } + }, + "68-Dotations aux amortissements": { + "681-Dotations aux amortissements d\u2019exploitation": { + "6812-Dotations aux amortissements des immobilisations incorporelles": {}, + "6813-Dotations aux amortissements des immobilisations corporelles": {} + } + }, + "69-Dotations aux provisions et aux d\u00e9pr\u00e9ciations": { + "691-Dotations aux provisions et aux d\u00e9pr\u00e9ciations d\u2019exploitation": { + "6911-Dotations aux provisions pour risques et charges": {}, + "6913-Dotations aux d\u00e9pr\u00e9ciations des immobilisations incorporelles": {}, + "6914-Dotations aux d\u00e9pr\u00e9ciations des immobilisations corporelles": {} + }, + "697-Dotations aux provisions et aux d\u00e9pr\u00e9ciations financi\u00e8res": { + "6971-Dotations aux provisions pour risques et charges": {}, + "6972-Dotations aux d\u00e9pr\u00e9ciations des immobilisations financi\u00e8res": {} + } + }, + "root_type": "Expense" + }, + "7-Comptes de produits des activit\u00e9s ordinaires": { + "70-Ventes": { + "701-Ventes de marchandises": { + "7011-Dans la R\u00e9gion": {}, + "7012-Hors R\u00e9gion": {}, + "7013-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7014-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7015-Sur internet": {}, + "7019-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "702-Ventes de produits finis": { + "7021-Dans la R\u00e9gion": {}, + "7022-Hors R\u00e9gion": {}, + "7023-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7024-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7025-Sur internet": {}, + "7029-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "703-Ventes de produits interm\u00e9diaires": { + "7031-Dans la R\u00e9gion": {}, + "7032-Hors R\u00e9gion": {}, + "7033-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7034-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7035-Sur internet": {}, + "7039-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "704-Ventes de produits r\u00e9siduels": { + "7041-Dans la R\u00e9gion": {}, + "7042-Hors R\u00e9gion": {}, + "7043-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7044-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7045-Sur internet": {}, + "7049-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "705-Travaux factur\u00e9s": { + "7051-Dans la R\u00e9gion": {}, + "7052-Hors R\u00e9gion": {}, + "7053-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7054-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7055-Sur internet": {}, + "7059-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "706-Services vendus": { + "7061-Dans la R\u00e9gion": {}, + "7062-Hors R\u00e9gion": {}, + "7063-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7064-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7065-Sur internet": {}, + "7069-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "707-Produits accessoires": { + "7071-Ports, emballages perdus et autres frais factur\u00e9s": {}, + "7072-Commissions et courtages": {}, + "7073-Locations": {}, + "7074-Bonis sur reprises et cessions d\u2019emballages": {}, + "7075-Mise \u00e0 disposition de personnel": {}, + "7076-Redevances pour brevets, logiciels, marques et droits similaires": {}, + "7077-Services exploit\u00e9s dans l\u2019int\u00e9r\u00eat du personnel": {}, + "7078-Autres produits accessoires": {} + } + }, + "71-Subventions d\u2019exploitation": { + "711-Sur produits \u00e0 l\u2019exportation": {}, + "712-Sur produits \u00e0 l\u2019importation": {}, + "713-Sur produits de p\u00e9r\u00e9quation": {}, + "714-Indemnit\u00e9s et subventions d\u2019exploitation (entit\u00e9 agricole)": {}, + "718-Autres subventions d\u2019exploitation": { + "7181-Vers\u00e9es par l\u2019\u00c9tat et les collectivit\u00e9s publiques": {}, + "7182-Vers\u00e9es par les organismes internationaux": {}, + "7183-Vers\u00e9es par des tiers": {} + } + }, + "72-Production immobilis\u00e9e": { + "721-Immobilisations incorporelles": {}, + "722-Immobilisations corporelles": { + "7221-Immobilisations corporelles (hors actifs biologiques)": {}, + "7222-Immobilisations corporelles (actifs biologiques)": {} + }, + "724-Production auto-consomm\u00e9e": {}, + "726-Immobilisations financi\u00e8res": {} + }, + "73-Variations des stocks de biens et de services produits": { + "734-Variations des stocks de produits en cours": { + "7341-Produits en cours": {}, + "7342-Travaux en cours": {} + }, + "735-Variations des en-cours de services": { + "7351-\u00c9tudes en cours": {}, + "7352-Prestations de services en cours": {} + }, + "736-Variations des stocks de produits finis": {}, + "737-Variations des stocks de produits interm\u00e9diaires et r\u00e9siduels": { + "7371-Produits interm\u00e9diaires": {}, + "7372-Produits r\u00e9siduels": {} + } + }, + "75-Autres produits": { + "751-Profits sur cr\u00e9ances clients et autres d\u00e9biteurs": {}, + "752-Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "7521-Quote-part transf\u00e9r\u00e9e de pertes (comptabilit\u00e9 du g\u00e9rant)": {}, + "7525-B\u00e9n\u00e9fices attribu\u00e9s par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": {} + }, + "754-Produits des cessions courantes d\u2019immobilisations": { + "7541-Immobilisations incorporelles": {}, + "7542-Immobilisations corporelles": {} + }, + "756-Gains de change sur cr\u00e9ances et dettes commerciales": {}, + "758-Produits divers": { + "7581-Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": {}, + "7582-Indemnit\u00e9s d\u2019assurances re\u00e7ues": {}, + "7588-Autres produits divers": {} + }, + "759-Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "7591-Sur risques \u00e0 court terme": {}, + "7593-Sur stocks": {}, + "7594-Sur cr\u00e9ances": {}, + "7598-Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": {} + } + }, + "77-Revenus financiers et produits assimil\u00e9s": { + "771-Int\u00e9r\u00eats de pr\u00eats et cr\u00e9ances diverses": { + "7712-Int\u00e9r\u00eats de pr\u00eats": {}, + "7713-Int\u00e9r\u00eats sur cr\u00e9ances diverses": {} + }, + "772-Revenus de participations et autres titres immobilis\u00e9s": { + "7721-Revenus des titres de participation": {}, + "7722-Revenus autres titres immobilis\u00e9s": {} + }, + "773-Escomptes obtenus": {}, + "774-Revenus de placement": { + "7745-Revenus des obligations": {}, + "7746-Revenus des titres de placement": {} + }, + "775-Int\u00e9r\u00eats dans loyers de location acquisition": {}, + "776-Gains de change financiers": {}, + "777-Gains sur cessions de titres de placement": {}, + "778-Gains sur risques financiers": { + "7781-Sur rentes viag\u00e8res": {}, + "7782-Sur op\u00e9rations financi\u00e8res": {}, + "7784-Sur instruments de tr\u00e9sorerie": {} + }, + "779-Reprises de charges pour d\u00e9pr\u00e9ciations et provisions \u00e0 court terme financi\u00e8res": { + "7791-Sur risques financiers": {}, + "7795-Sur titres de placement": {}, + "7798-Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": {} + } + }, + "78-Transferts de charges": { + "781-Transferts de charges d\u2019exploitation": {}, + "787-Transferts de charges financi\u00e8res": {} + }, + "79-Reprises de provisions, de d\u00e9pr\u00e9ciations et autres": { + "791-Reprises de provisions et d\u00e9pr\u00e9ciations d\u2019exploitation": { + "7911-Pour risques et charges": {}, + "7913-Des immobilisations incorporelles": {}, + "7914-Des immobilisations corporelles": {} + }, + "797-Reprises de provisions et d\u00e9pr\u00e9ciations financi\u00e8res": { + "7971-Pour risques et charges": {}, + "7972-Des immobilisations financi\u00e8res": {} + }, + "798-Reprises d\u2019amortissements": {}, + "799-Reprises de subventions d\u2019investissement": {} + }, + "root_type": "Income" + }, + "8-Comptes des autres charges et des autres produits (CHARGES)": { + "81-Valeurs comptables des cessions d\u2019immobilisations": { + "811-Immobilisations incorporelles": {}, + "812-Immobilisations corporelles": {}, + "816-Immobilisations financi\u00e8res": {} + }, + "83-Charges hors activit\u00e9s ordinaires": { + "831-Charges HAO constat\u00e9es": {}, + "833-Charges li\u00e9es aux op\u00e9rations de restructuration": {}, + "834-Pertes sur cr\u00e9ances HAO": {}, + "835-Dons et lib\u00e9ralit\u00e9s accord\u00e9s": {}, + "836-Abandons de cr\u00e9ances consentis": {}, + "837-Charges li\u00e9es aux op\u00e9rations de liquidation": {}, + "839-Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": {} + }, + "85-Dotations hors activit\u00e9s ordinaires": { + "851-Dotations aux provisions r\u00e9glement\u00e9es": {}, + "852-Dotations aux amortissements HAO": {}, + "853-Dotations aux d\u00e9pr\u00e9ciations HAO": {}, + "854-Dotations aux provisions pour risques et charges HAO": {}, + "858-Autres dotations HAO": {} + }, + "87-Participation des travailleurs": { + "871-Participation l\u00e9gale aux b\u00e9n\u00e9fices": {}, + "874-Participation contractuelle aux b\u00e9n\u00e9fices": {}, + "878-Autres participations": {} + }, + "89-Imp\u00f4ts sur le r\u00e9sultat": { + "891-Imp\u00f4ts sur les b\u00e9n\u00e9fices de l\u2019exercice": { + "8911-Activit\u00e9s exerc\u00e9es dans l\u2019\u00c9tat": {}, + "8912-Activit\u00e9s exerc\u00e9es dans les autres \u00c9tats de la R\u00e9gion": {}, + "8913-Activit\u00e9s exerc\u00e9es hors R\u00e9gion": {} + }, + "892-Rappel d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": {}, + "895-Imp\u00f4t minimum forfaitaire IMF": {}, + "899-D\u00e9gr\u00e8vements et annulations d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": { + "8991-D\u00e9gr\u00e8vements": {}, + "8994-Annulations pour pertes r\u00e9troactives": {} + } + }, + "root_type": "Expense" + }, + "8-Comptes des autres charges et des autres produits (PRODUITS)": { + "82-Produits des cessions d\u2019immobilisations": { + "821-Immobilisations incorporelles": {}, + "822-Immobilisations corporelles": {}, + "826-Immobilisations financi\u00e8res": {} + }, + "84-Produits hors activit\u00e9s ordinaires": { + "841-Produits HAO constat\u00e9s": {}, + "843-Produits li\u00e9s aux op\u00e9rations de restructuration": {}, + "844-Indemnit\u00e9s et subventions HAO (entit\u00e9 agricole)": {}, + "845-Dons et lib\u00e9ralit\u00e9s obtenus": {}, + "846-Abandons de cr\u00e9ances obtenus": {}, + "847-Produits li\u00e9s aux op\u00e9rations de liquidation": {}, + "848-Transferts de charges HAO": {}, + "849-Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": {} + }, + "86-Reprises de charges, provisions et d\u00e9pr\u00e9ciations HAO": { + "861-Reprises de provisions r\u00e9glement\u00e9es": {}, + "862-Reprises d\u2019amortissements HAO": {}, + "863-Reprises de d\u00e9pr\u00e9ciations HAO": {}, + "864-Reprises de provisions pour risques et charges HAO": {}, + "868-Autres reprises HAO": {} + }, + "88-Subventions d\u2019\u00e9quilibre": { + "881-\u00c9tat": {}, + "884-Collectivit\u00e9s publiques": {}, + "886-Groupe": {}, + "888-Autres": {} + }, + "root_type": "Income" + } + } +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/ci_plan_comptable_avec_code.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/ci_plan_comptable_avec_code.json new file mode 100644 index 00000000000..782082f0bfc --- /dev/null +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/ci_plan_comptable_avec_code.json @@ -0,0 +1,4208 @@ +{ + "country_code": "ci", + "name": "Syscohada - Plan Comptable avec code", + "tree": { + "Comptes de ressources durables": { + "Capital": { + "Capital social": { + "Capital souscrit, non appel\u00e9": { + "account_number": "1011" + }, + "Capital souscrit, appel\u00e9, non vers\u00e9": { + "account_number": "1012" + }, + "Capital souscrit, appel\u00e9, vers\u00e9, non amorti": { + "account_number": "1013" + }, + "Capital souscrit, appel\u00e9, vers\u00e9, amorti": { + "account_number": "1014" + }, + "Capital souscrit soumis \u00e0 des conditions particuli\u00e8res": { + "account_number": "1018" + }, + "account_number": "101" + }, + "Capital par dotation": { + "Dotation initiale": { + "account_number": "1021" + }, + "Dotations compl\u00e9mentaires": { + "account_number": "1022" + }, + "Autres dotations": { + "account_number": "1028" + }, + "account_number": "102" + }, + "Capital personnel": { + "account_number": "103" + }, + "Compte de l\u2019exploitant": { + "Apports temporaires": { + "account_number": "1041" + }, + "Op\u00e9rations courantes": { + "account_number": "1042" + }, + "R\u00e9mun\u00e9rations, imp\u00f4ts et autres charges personnelles": { + "account_number": "1043" + }, + "Pr\u00e9l\u00e8vements d\u2019autoconsommation": { + "account_number": "1047" + }, + "Autres pr\u00e9l\u00e8vements": { + "account_number": "1048" + }, + "account_number": "104" + }, + "Primes li\u00e9es au capital social": { + "Primes d\u2019\u00e9mission": { + "account_number": "1051" + }, + "Primes d\u2019apport": { + "account_number": "1052" + }, + "Primes de fusion": { + "account_number": "1053" + }, + "Primes de conversion": { + "account_number": "1054" + }, + "Autres primes": { + "account_number": "1058" + }, + "account_number": "105" + }, + "\u00c9carts de r\u00e9\u00e9valuation": { + "\u00c9carts de r\u00e9\u00e9valuation l\u00e9gale": { + "account_number": "1061" + }, + "\u00c9carts de r\u00e9\u00e9valuation libre": { + "account_number": "1062" + }, + "account_number": "106" + }, + "Apporteurs, capital souscrit, non appel\u00e9": { + "account_number": "109" + }, + "account_number": "10" + }, + "R\u00e9serves": { + "R\u00e9serve l\u00e9gale": { + "account_number": "111" + }, + "R\u00e9serves statutaires ou contractuelles": { + "account_number": "112" + }, + "R\u00e9serves r\u00e9glement\u00e9es": { + "R\u00e9serves de plus-values nettes \u00e0 long terme": { + "account_number": "1131" + }, + "R\u00e9serves d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": { + "account_number": "1132" + }, + "R\u00e9serves cons\u00e9cutives \u00e0 l\u2019octroi de subventions d\u2019investissement": { + "account_number": "1133" + }, + "R\u00e9serves des valeurs mobili\u00e8res donnant acc\u00e8s au capital": { + "account_number": "1134" + }, + "Autres r\u00e9serves r\u00e9glement\u00e9es": { + "account_number": "1135" + }, + "account_number": "113" + }, + "Autres r\u00e9serves": { + "R\u00e9serves facultatives": { + "account_number": "1181" + }, + "R\u00e9serves diverses": { + "account_number": "1188" + }, + "account_number": "118" + }, + "account_number": "11" + }, + "Report \u00e0 nouveau": { + "Report \u00e0 nouveau cr\u00e9diteur": { + "account_number": "121" + }, + "Report \u00e0 nouveau d\u00e9biteur": { + "Perte nette \u00e0 reporter": { + "account_number": "1291" + }, + "Perte Amortissements r\u00e9put\u00e9s diff\u00e9r\u00e9s": { + "account_number": "1292" + }, + "account_number": "129" + }, + "account_number": "12" + }, + "R\u00e9sultat net de l\u2019exercice": { + "R\u00e9sultat en instance d\u2019affectation": { + "R\u00e9sultat en instance d\u2019affectation : b\u00e9n\u00e9fice": { + "account_number": "1301" + }, + "R\u00e9sultat en instance d\u2019affectation : perte": { + "account_number": "1309" + }, + "account_number": "130" + }, + "R\u00e9sultat net : b\u00e9n\u00e9fice": { + "account_number": "131" + }, + "Marge commerciale (MC)": { + "account_number": "132" + }, + "Valeur ajout\u00e9e (VA)": { + "account_number": "133" + }, + "Exc\u00e9dent brut d\u2019exploitation (EBE)": { + "account_number": "134" + }, + "R\u00e9sultat d\u2019exploitation (RE)": { + "account_number": "135" + }, + "R\u00e9sultat financier (RF)": { + "account_number": "136" + }, + "R\u00e9sultat des activit\u00e9s ordinaires (RAO)": { + "account_number": "137" + }, + "R\u00e9sultat hors activit\u00e9s ordinaires (RHAO)": { + "R\u00e9sultat de fusion": { + "account_number": "1381" + }, + "R\u00e9sultat d\u2019apport partiel d\u2019actif": { + "account_number": "1382" + }, + "R\u00e9sultat de scission": { + "account_number": "1383" + }, + "R\u00e9sultat de liquidation": { + "account_number": "1384" + }, + "account_number": "138" + }, + "R\u00e9sultat net : perte": { + "account_number": "139" + }, + "account_number": "13" + }, + "Subventions d\u2019investissement": { + "Subventions d\u2019\u00e9quipement": { + "\u00c9tat": { + "account_number": "1411" + }, + "R\u00e9gions": { + "account_number": "1412" + }, + "D\u00e9partements": { + "account_number": "1413" + }, + "Communes et collectivit\u00e9s publiques d\u00e9centralis\u00e9es": { + "account_number": "1414" + }, + "Entit\u00e9s publiques ou mixtes": { + "account_number": "1415" + }, + "Entit\u00e9s et organismes priv\u00e9s": { + "account_number": "1416" + }, + "Organismes internationaux": { + "account_number": "1417" + }, + "Autres": { + "account_number": "1418" + }, + "account_number": "141" + }, + "Autres subventions d\u2019investissement": { + "account_number": "148" + }, + "account_number": "14" + }, + "Provisions r\u00e9glement\u00e9es et fonds assimil\u00e9s": { + "Amortissements d\u00e9rogatoires": { + "account_number": "151" + }, + "Plus-values de cession \u00e0 r\u00e9investir": { + "account_number": "152" + }, + "Fonds r\u00e9glement\u00e9s": { + "Fonds National": { + "account_number": "1531" + }, + "Pr\u00e9l\u00e8vement pour le Budget": { + "account_number": "1532" + }, + "account_number": "153" + }, + "Provisions sp\u00e9ciales de r\u00e9\u00e9valuation": { + "account_number": "154" + }, + "Provisions r\u00e9glement\u00e9es relatives aux immobilisations": { + "Reconstitution des gisements miniers et p\u00e9troliers": { + "account_number": "1551" + }, + "account_number": "155" + }, + "Provisions r\u00e9glement\u00e9es relatives aux stocks": { + "Hausse de prix": { + "account_number": "1561" + }, + "Fluctuation des cours": { + "account_number": "1562" + }, + "account_number": "156" + }, + "Provisions pour investissement": { + "account_number": "157" + }, + "Autres provisions et fonds r\u00e9glement\u00e9s": { + "account_number": "158" + }, + "account_number": "15" + }, + "Emprunts et dettes assimil\u00e9es": { + "Emprunts obligataires": { + "Emprunts obligataires ordinaires": { + "account_number": "1611" + }, + "Emprunts obligataires convertibles en actions": { + "account_number": "1612" + }, + "Emprunts obligataires remboursables en actions": { + "account_number": "1613" + }, + "Autres emprunts obligataires": { + "account_number": "1618" + }, + "account_number": "161" + }, + "Emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": { + "account_number": "162" + }, + "Avances re\u00e7ues de l\u2019\u00c9tat": { + "account_number": "163" + }, + "Avances re\u00e7ues et comptes courants bloqu\u00e9s": { + "account_number": "164" + }, + "D\u00e9p\u00f4ts et cautionnements re\u00e7us": { + "D\u00e9p\u00f4ts": { + "account_number": "1651" + }, + "Cautionnements": { + "account_number": "1652" + }, + "account_number": "165" + }, + "Int\u00e9r\u00eats courus": { + "Sur emprunts obligataires": { + "account_number": "1661" + }, + "Sur emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": { + "account_number": "1662" + }, + "Sur avances re\u00e7ues de l\u2019\u00c9tat": { + "account_number": "1663" + }, + "Sur avances re\u00e7ues et comptes courants bloqu\u00e9s": { + "account_number": "1664" + }, + "Sur d\u00e9p\u00f4ts et cautionnements re\u00e7us": { + "account_number": "1665" + }, + "Sur avances assorties de conditions particuli\u00e8res": { + "account_number": "1667" + }, + "Sur autres emprunts et dettes": { + "account_number": "1668" + }, + "account_number": "166" + }, + "Avances assorties de conditions particuli\u00e8res": { + "Avances bloqu\u00e9es pour augmentation du capital": { + "account_number": "1671" + }, + "Avances conditionn\u00e9es par l\u2019\u00c9tat": { + "account_number": "1672" + }, + "Avances conditionn\u00e9es par les autres organismes africains": { + "account_number": "1673" + }, + "Avances conditionn\u00e9es par les organismes internationaux": { + "account_number": "1674" + }, + "account_number": "167" + }, + "Autres emprunts et dettes": { + "Rentes viag\u00e8res capitalis\u00e9es": { + "account_number": "1681" + }, + "Billets de fonds": { + "account_number": "1682" + }, + "Dettes cons\u00e9cutives \u00e0 des titres emprunt\u00e9s": { + "account_number": "1683" + }, + "Emprunts participatifs": { + "account_number": "1684" + }, + "Participation des travailleurs aux b\u00e9n\u00e9fices": { + "account_number": "1685" + }, + "Emprunts et dettes contract\u00e9s aupr\u00e8s des autres tiers": { + "account_number": "1686" + }, + "account_number": "168" + }, + "account_number": "16" + }, + "Dettes de location acquisition": { + "Dettes de location acquisition / cr\u00e9dit bail immobilier": { + "account_number": "172" + }, + "Dettes de location acquisition / cr\u00e9dit bail mobilier": { + "account_number": "173" + }, + "Dettes de location acquisition / location de vente": { + "account_number": "174" + }, + "Int\u00e9r\u00eats courus": { + "Sur dettes de location acquisition / cr\u00e9dit-bail immobilier": { + "account_number": "1762" + }, + "Sur dettes de location acquisition / cr\u00e9dit-bail mobilier": { + "account_number": "1763" + }, + "Sur dettes de location acquisition / location-vente": { + "account_number": "1764" + }, + "Sur autres dettes de location acquisition": { + "account_number": "1768" + }, + "account_number": "176" + }, + "Autres dettes de location acquisition": { + "account_number": "178" + }, + "account_number": "17" + }, + "Dettes li\u00e9es \u00e0 des participations et comptes de liaison des \u00e9tablissements et soci\u00e9t\u00e9s en participation": { + "Dettes li\u00e9es \u00e0 des participations": { + "Dettes li\u00e9es \u00e0 des participations (groupe)": { + "account_number": "1811" + }, + "Dettes li\u00e9es \u00e0 des participations (hors groupe)": { + "account_number": "1812" + }, + "account_number": "181" + }, + "Dettes li\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": { + "account_number": "182" + }, + "Int\u00e9r\u00eats courus sur dettes li\u00e9es \u00e0 des participations": { + "account_number": "183" + }, + "Comptes permanents bloqu\u00e9s des \u00e9tablissements et succursales": { + "account_number": "184" + }, + "Comptes permanents non bloqu\u00e9s des \u00e9tablissements et succursales": { + "account_number": "185" + }, + "Comptes de liaison charges": { + "account_number": "186" + }, + "Comptes de liaison produits": { + "account_number": "187" + }, + "Comptes de liaison des soci\u00e9t\u00e9s en participation": { + "account_number": "188" + }, + "account_number": "18" + }, + "Provisions pour risques et charges": { + "Provisions pour litiges": { + "account_number": "191" + }, + "Provisions pour garanties donn\u00e9es aux clients": { + "account_number": "192" + }, + "Provisions pour pertes sur march\u00e9s \u00e0 ach\u00e8vement futur": { + "account_number": "193" + }, + "Provisions pour pertes de change": { + "account_number": "194" + }, + "Provisions pour imp\u00f4ts": { + "account_number": "195" + }, + "Provisions pour pensions et obligations similaires": { + "Provisions pour pensions et obligations similaires engagement de retraite": { + "account_number": "1961" + }, + "Actif du r\u00e9gime de retraite": { + "account_number": "1962" + }, + "account_number": "196" + }, + "Provisions pour restructuration": { + "account_number": "197" + }, + "Autres provisions pour risques et charges": { + "Provisions pour amendes et p\u00e9nalit\u00e9s": { + "account_number": "1981" + }, + "Provisions pour propre assureur": { + "account_number": "1983" + }, + "Provisions pour d\u00e9mant\u00e8lement et remise en \u00e9tat": { + "account_number": "1984" + }, + "Provisions pour droits \u00e0 r\u00e9duction ou avantage en nature (ch\u00e8ques cadeau, cartes de fid\u00e9lit\u00e9...)": { + "account_number": "1985" + }, + "Provisions pour divers risques et charges": { + "account_number": "1988" + }, + "account_number": "198" + }, + "account_number": "19" + }, + "root_type": "Equity", + "account_number": "1" + }, + "Comptes d\u2019actif immobilis\u00e9": { + "Immobilisations incorporelles": { + "account_type": "Fixed Asset", + "Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset", + "account_number": "211" + }, + "Brevets, licences, concessions et droits similaires": { + "account_type": "Fixed Asset", + "Brevets": { + "account_type": "Fixed Asset", + "account_number": "2121" + }, + "Licences": { + "account_type": "Fixed Asset", + "account_number": "2122" + }, + "Concessions de service public": { + "account_type": "Fixed Asset", + "account_number": "2123" + }, + "Autres concessions et droits similaires": { + "account_type": "Fixed Asset", + "account_number": "2128" + }, + "account_number": "212" + }, + "Logiciels et sites internet": { + "account_type": "Fixed Asset", + "Logiciels": { + "account_type": "Fixed Asset", + "account_number": "2131" + }, + "Sites internet": { + "account_type": "Fixed Asset", + "account_number": "2132" + }, + "account_number": "213" + }, + "Marques": { + "account_type": "Fixed Asset", + "account_number": "214" + }, + "Fonds commercial": { + "account_type": "Fixed Asset", + "account_number": "215" + }, + "Droit au bail": { + "account_type": "Fixed Asset", + "account_number": "216" + }, + "Investissements de cr\u00e9ation": { + "account_type": "Fixed Asset", + "account_number": "217" + }, + "Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset", + "Frais de prospection et d\u2019\u00e9valuation de ressources min\u00e9rales": { + "account_type": "Fixed Asset", + "account_number": "2181" + }, + "Co\u00fbts d\u2019obtention du contrat": { + "account_type": "Fixed Asset", + "account_number": "2182" + }, + "Fichiers clients, notices, titres de journaux et magazines": { + "account_type": "Fixed Asset", + "account_number": "2183" + }, + "Co\u00fbts des franchises": { + "account_type": "Fixed Asset", + "account_number": "2184" + }, + "Divers droits et valeurs incorporelles": { + "account_type": "Fixed Asset", + "account_number": "2188" + }, + "account_number": "218" + }, + "Immobilisations incorporelles en cours": { + "account_type": "Fixed Asset", + "Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset", + "account_number": "2191" + }, + "Logiciels et internet": { + "account_type": "Fixed Asset", + "account_number": "2193" + }, + "Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset", + "account_number": "2198" + }, + "account_number": "219" + }, + "account_number": "21" + }, + "Terrains": { + "account_type": "Fixed Asset", + "Terrains agricoles et forestiers": { + "account_type": "Fixed Asset", + "Terrains d\u2019exploitation agricole": { + "account_type": "Fixed Asset", + "account_number": "2211" + }, + "Terrains d\u2019exploitation foresti\u00e8re": { + "account_type": "Fixed Asset", + "account_number": "2212" + }, + "Autres terrains": { + "account_type": "Fixed Asset", + "account_number": "2218" + }, + "account_number": "221" + }, + "Terrains nus": { + "account_type": "Fixed Asset", + "Terrains \u00e0 b\u00e2tir": { + "account_type": "Fixed Asset", + "account_number": "2221" + }, + "Autres terrains nus": { + "account_type": "Fixed Asset", + "account_number": "2228" + }, + "account_number": "222" + }, + "Terrains b\u00e2tis": { + "account_type": "Fixed Asset", + "Pour b\u00e2timents industriels et agricoles": { + "account_type": "Fixed Asset", + "account_number": "2231" + }, + "Pour b\u00e2timents administratifs et commerciaux": { + "account_type": "Fixed Asset", + "account_number": "2232" + }, + "Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations professionnelles": { + "account_type": "Fixed Asset", + "account_number": "2234" + }, + "Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations non professionnelles": { + "account_type": "Fixed Asset", + "account_number": "2235" + }, + "Autres terrains b\u00e2tis": { + "account_type": "Fixed Asset", + "account_number": "2238" + }, + "account_number": "223" + }, + "Travaux de mise en valeur des terrains": { + "account_type": "Fixed Asset", + "Plantation d\u2019arbres et d\u2019arbustes": { + "account_type": "Fixed Asset", + "account_number": "2241" + }, + "Am\u00e9liorations du fonds": { + "account_type": "Fixed Asset", + "account_number": "2245" + }, + "Autres travaux": { + "account_type": "Fixed Asset", + "account_number": "2248" + }, + "account_number": "224" + }, + "Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset", + "Carri\u00e8res": { + "account_type": "Fixed Asset", + "account_number": "2251" + }, + "account_number": "225" + }, + "Terrains am\u00e9nag\u00e9s": { + "account_type": "Fixed Asset", + "Parkings": { + "account_type": "Fixed Asset", + "account_number": "2261" + }, + "account_number": "226" + }, + "Terrains mis en concession": { + "account_type": "Fixed Asset", + "account_number": "227" + }, + "Autres terrains": { + "account_type": "Fixed Asset", + "Terrains immeubles de placement": { + "account_type": "Fixed Asset", + "account_number": "2281" + }, + "Terrains des logements affect\u00e9s au personnel": { + "account_type": "Fixed Asset", + "account_number": "2285" + }, + "Terrains de location acquisition": { + "account_type": "Fixed Asset", + "account_number": "2286" + }, + "Divers terrains": { + "account_type": "Fixed Asset", + "account_number": "2288" + }, + "account_number": "228" + }, + "Am\u00e9nagements de terrains en cours": { + "account_type": "Fixed Asset", + "Terrains agricoles et forestiers": { + "account_type": "Fixed Asset", + "account_number": "2291" + }, + "Terrains nus": { + "account_type": "Fixed Asset", + "account_number": "2292" + }, + "Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset", + "account_number": "2295" + }, + "Autres terrains": { + "account_type": "Fixed Asset", + "account_number": "2298" + }, + "account_number": "229" + }, + "account_number": "22" + }, + "B\u00e2timents, installations techniques et agencements": { + "B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "B\u00e2timents industriels": { + "account_number": "2311" + }, + "B\u00e2timents agricoles": { + "account_number": "2312" + }, + "B\u00e2timents administratifs et commerciaux": { + "account_number": "2313" + }, + "B\u00e2timents affect\u00e9s au logement du personnel": { + "account_number": "2314" + }, + "B\u00e2timents immeubles de placement": { + "account_number": "2315" + }, + "B\u00e2timents de location acquisition": { + "account_number": "2316" + }, + "account_number": "231" + }, + "B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "B\u00e2timents industriels": { + "account_number": "2321" + }, + "B\u00e2timents agricoles": { + "account_number": "2322" + }, + "B\u00e2timents administratifs et commerciaux": { + "account_number": "2323" + }, + "B\u00e2timents affect\u00e9s au logement du personnel": { + "account_number": "2324" + }, + "B\u00e2timents immeubles de placement": { + "account_number": "2325" + }, + "B\u00e2timents de location acquisition": { + "account_number": "2326" + }, + "account_number": "232" + }, + "Ouvrages d\u2019infrastructure": { + "Voies de terre": { + "account_number": "2331" + }, + "Voies de fer": { + "account_number": "2332" + }, + "Voies d\u2019eau": { + "account_number": "2333" + }, + "Barrages, Digues": { + "account_number": "2334" + }, + "Pistes d\u2019a\u00e9rodrome": { + "account_number": "2335" + }, + "Autres ouvrages d\u2019infrastructures": { + "account_number": "2338" + }, + "account_number": "233" + }, + "Am\u00e9nagements, agencements et installations techniques": { + "Installations complexes sp\u00e9cialis\u00e9es sur sol propre": { + "account_number": "2341" + }, + "Installations complexes sp\u00e9cialis\u00e9es sur sol d\u2019autrui": { + "account_number": "2342" + }, + "Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol propre": { + "account_number": "2343" + }, + "Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol d\u2019autrui": { + "account_number": "2344" + }, + "Am\u00e9nagements et agencements des b\u00e2timents": { + "account_number": "2345" + }, + "account_number": "234" + }, + "Am\u00e9nagements de bureaux": { + "Installations g\u00e9n\u00e9rales": { + "account_number": "2351" + }, + "Autres am\u00e9nagements de bureaux": { + "account_number": "2358" + }, + "account_number": "235" + }, + "B\u00e2timents industriels, agricoles et commerciaux mis en concession": { + "account_number": "237" + }, + "Autres installations et agencements": { + "account_number": "238" + }, + "B\u00e2timents am\u00e9nagements, agencements et installations en cours": { + "B\u00e2timents en cours": { + "account_number": "2391" + }, + "Installations en cours": { + "account_number": "2392" + }, + "Ouvrages d\u2019infrastructure en cours": { + "account_number": "2393" + }, + "Am\u00e9nagements et agencements et installations techniques en cours": { + "account_number": "2394" + }, + "Am\u00e9nagements de bureaux en cours": { + "account_number": "2395" + }, + "Autres installations et agencements en cours": { + "account_number": "2398" + }, + "account_number": "239" + }, + "account_number": "23" + }, + "Mat\u00e9riel, mobilier et actifs biologiques": { + "Mat\u00e9riel et outillage industriel et commercial": { + "Mat\u00e9riel industriel": { + "account_number": "2411" + }, + "Outillage industriel": { + "account_number": "2412" + }, + "Mat\u00e9riel commercial": { + "account_number": "2413" + }, + "Outillage commercial": { + "account_number": "2414" + }, + "Mat\u00e9riel & outillage industriel et commercial de location-acquisition": { + "account_number": "2416" + }, + "account_number": "241" + }, + "Mat\u00e9riel et outillage agricole": { + "Mat\u00e9riel agricole": { + "account_number": "2421" + }, + "Outillage agricole": { + "account_number": "2422" + }, + "Mat\u00e9riel & outillage agricole de location-acquisition": { + "account_number": "2426" + }, + "account_number": "242" + }, + "Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "243" + }, + "Mat\u00e9riel et mobilier": { + "Mat\u00e9riel de bureau": { + "account_number": "2441" + }, + "Mat\u00e9riel informatique": { + "account_number": "2442" + }, + "Mat\u00e9riel bureautique": { + "account_number": "2443" + }, + "Mobilier de bureau": { + "account_number": "2444" + }, + "Mat\u00e9riel et mobilier immeubles de placement": { + "account_number": "2445" + }, + "Mat\u00e9riel et mobilier de location acquisition": { + "account_number": "2446" + }, + "Mat\u00e9riel et mobilier des logements du personnel": { + "account_number": "2447" + }, + "account_number": "244" + }, + "Mat\u00e9riel de transport": { + "Mat\u00e9riel automobile": { + "account_number": "2451" + }, + "Mat\u00e9riel ferroviaire": { + "account_number": "2452" + }, + "Mat\u00e9riel fluvial, lagunaire": { + "account_number": "2453" + }, + "Mat\u00e9riel naval": { + "account_number": "2454" + }, + "Mat\u00e9riel a\u00e9rien": { + "account_number": "2455" + }, + "Mat\u00e9riel de transport de location-acquisition": { + "account_number": "2456" + }, + "Mat\u00e9riel hippomobile": { + "account_number": "2457" + }, + "Autres mat\u00e9riels de transport": { + "account_number": "2458" + }, + "account_number": "245" + }, + "Actifs biologiques": { + "Cheptel, animaux de trait": { + "account_number": "2461" + }, + "Cheptel, animaux reproducteurs": { + "account_number": "2462" + }, + "Animaux de garde": { + "account_number": "2463" + }, + "Plantations agricoles": { + "account_number": "2465" + }, + "Autres actifs biologiques": { + "account_number": "2468" + }, + "account_number": "246" + }, + "Agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "Agencements et am\u00e9nagements du mat\u00e9riel": { + "account_number": "2471" + }, + "Agencements et am\u00e9nagements des actifs biologiques": { + "account_number": "2472" + }, + "Autres agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "account_number": "2478" + }, + "account_number": "247" + }, + "Autres mat\u00e9riels et mobiliers": { + "Collections et \u0153uvres d\u2019art": { + "account_number": "2481" + }, + "Divers mat\u00e9riels mobiliers": { + "account_number": "2488" + }, + "account_number": "248" + }, + "Mat\u00e9riels et actifs biologiques en cours": { + "Mat\u00e9riel et outillage industriel et commercial": { + "account_number": "2491" + }, + "Mat\u00e9riel et outillage agricole": { + "account_number": "2492" + }, + "Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "2493" + }, + "Mat\u00e9riel et mobilier de bureau": { + "account_number": "2494" + }, + "Mat\u00e9riel de transport": { + "account_number": "2495" + }, + "Actifs biologiques": { + "account_number": "2496" + }, + "Agencements am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "account_number": "2497" + }, + "Autres mat\u00e9riels et actifs biologiques en cours": { + "account_number": "2498" + }, + "account_number": "249" + }, + "account_number": "24" + }, + "Avances et acomptes vers\u00e9s sur immobilisations": { + "Avances et acomptes vers\u00e9s sur immobilisations incorporelles": { + "account_number": "251" + }, + "Avances et acomptes vers\u00e9s sur immobilisations corporelles": { + "account_number": "252" + }, + "account_number": "25" + }, + "Titres de participation": { + "Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": { + "account_number": "261" + }, + "Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le conjoint": { + "account_number": "262" + }, + "Titres de participation dans des soci\u00e9t\u00e9s conf\u00e9rant une influence notable": { + "account_number": "263" + }, + "Participations dans des organismes professionnels": { + "account_number": "265" + }, + "Parts dans des groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": { + "account_number": "266" + }, + "Autres titres de participation": { + "account_number": "268" + }, + "account_number": "26" + }, + "Autres immobilisations financi\u00e8res": { + "Pr\u00eats et cr\u00e9ances": { + "Pr\u00eats participatifs": { + "account_number": "2711" + }, + "Pr\u00eats aux associ\u00e9s": { + "account_number": "2712" + }, + "Billets de fonds": { + "account_number": "2713" + }, + "Titres pr\u00eat\u00e9s": { + "account_number": "2714" + }, + "Autres pr\u00eats et cr\u00e9ances": { + "account_number": "2718" + }, + "account_number": "271" + }, + "Pr\u00eats au personnel": { + "Pr\u00eats immobiliers": { + "account_number": "2721" + }, + "Pr\u00eats mobiliers et d\u2019installation": { + "account_number": "2722" + }, + "Autres pr\u00eats au personnel": { + "account_number": "2728" + }, + "account_number": "272" + }, + "Cr\u00e9ances sur l\u2019\u00c9tat": { + "Retenues de garantie": { + "account_number": "2731" + }, + "Fonds r\u00e9glement\u00e9": { + "account_number": "2733" + }, + "Cr\u00e9ances sur le conc\u00e9dant": { + "account_number": "2734" + }, + "Autres cr\u00e9ances sur l\u2019\u00c9tat": { + "account_number": "2738" + }, + "account_number": "273" + }, + "Titres immobilis\u00e9s": { + "Titres immobilis\u00e9s de l\u2019activit\u00e9 de portefeuille (TIAP)": { + "account_number": "2741" + }, + "Titres participatifs": { + "account_number": "2742" + }, + "Certificats d\u2019investissement": { + "account_number": "2743" + }, + "Parts de fonds commun de placement (FCP)": { + "account_number": "2744" + }, + "Obligations": { + "account_number": "2745" + }, + "Actions ou parts propres": { + "account_number": "2746" + }, + "Autres titres immobilis\u00e9s": { + "account_number": "2748" + }, + "account_number": "274" + }, + "D\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "D\u00e9p\u00f4ts pour loyers d\u2019avance": { + "account_number": "2751" + }, + "D\u00e9p\u00f4ts pour l\u2019\u00e9lectricit\u00e9": { + "account_number": "2752" + }, + "D\u00e9p\u00f4ts pour l\u2019eau": { + "account_number": "2753" + }, + "D\u00e9p\u00f4ts pour le gaz": { + "account_number": "2754" + }, + "D\u00e9p\u00f4ts pour le t\u00e9l\u00e9phone, le t\u00e9lex, la t\u00e9l\u00e9copie": { + "account_number": "2755" + }, + "Cautionnements sur march\u00e9s publics": { + "account_number": "2756" + }, + "Cautionnements sur autres op\u00e9rations": { + "account_number": "2757" + }, + "Autres d\u00e9p\u00f4ts et cautionnements": { + "account_number": "2758" + }, + "account_number": "275" + }, + "Int\u00e9r\u00eats courus": { + "Pr\u00eats et cr\u00e9ances non commerciales": { + "account_number": "2761" + }, + "Pr\u00eats au personnel": { + "account_number": "2762" + }, + "Cr\u00e9ances sur l\u2019\u00c9tat": { + "account_number": "2763" + }, + "Titres immobilis\u00e9s": { + "account_number": "2764" + }, + "D\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "account_number": "2765" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations": { + "account_number": "2767" + }, + "Immobilisations financi\u00e8res diverses": { + "account_number": "2768" + }, + "account_number": "276" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": { + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations (groupe)": { + "account_number": "2771" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations (hors groupe)": { + "account_number": "2772" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": { + "account_number": "2773" + }, + "Avances \u00e0 des Groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": { + "account_number": "2774" + }, + "account_number": "277" + }, + "Immobilisations financi\u00e8res diverses": { + "Cr\u00e9ances diverses groupe": { + "account_number": "2781" + }, + "Cr\u00e9ances diverses hors groupe": { + "account_number": "2782" + }, + "Banques d\u00e9p\u00f4ts \u00e0 terme": { + "account_number": "2784" + }, + "Or et m\u00e9taux pr\u00e9cieux": { + "account_number": "2785" + }, + "Autres immobilisations financi\u00e8res": { + "account_number": "2788" + }, + "account_number": "278" + }, + "account_number": "27" + }, + "Amortissements": { + "account_type": "Accumulated Depreciation", + "Amortissements des immobilisations corporelles": { + "account_type": "Accumulated Depreciation", + "Amortissements des frais de d\u00e9veloppement": { + "account_type": "Accumulated Depreciation", + "account_number": "2811" + }, + "Amortissements des brevets, licences, concessions et droits similaires": { + "account_type": "Accumulated Depreciation", + "account_number": "2812" + }, + "Amortissements des logiciels et sites internet": { + "account_type": "Accumulated Depreciation", + "account_number": "2813" + }, + "Amortissements des marques": { + "account_type": "Accumulated Depreciation", + "account_number": "2814" + }, + "Amortissements du fonds commercial": { + "account_type": "Accumulated Depreciation", + "account_number": "2815" + }, + "Amortissements du droit au bail": { + "account_type": "Accumulated Depreciation", + "account_number": "2816" + }, + "Amortissements des investissements de cr\u00e9ation": { + "account_type": "Accumulated Depreciation", + "account_number": "2817" + }, + "Amortissements des autres droits et valeurs incorporels": { + "account_type": "Accumulated Depreciation", + "account_number": "2818" + }, + "account_number": "281" + }, + "Amortissements des terrains": { + "Amortissements des travaux de mise en valeur des terrains": { + "account_number": "2824" + }, + "account_number": "282" + }, + "Amortissements des b\u00e2timents, installations techniques et agencements": { + "Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "account_number": "2831" + }, + "Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "account_number": "2832" + }, + "Amortissements des ouvrages d\u2019infrastructure": { + "account_number": "2833" + }, + "Amortissements des am\u00e9nagements, agencements et installations techniques": { + "account_number": "2834" + }, + "Amortissements des am\u00e9nagements de bureaux": { + "account_number": "2835" + }, + "Amortissements des b\u00e2timents industriels, agricoles et commerciaux mis en concession": { + "account_number": "2837" + }, + "Amortissements des autres installations et agencements": { + "account_number": "2838" + }, + "account_number": "283" + }, + "Amortissements du mat\u00e9riel": { + "Amortissements du mat\u00e9riel et outillage industriel et commercial": { + "account_number": "2841" + }, + "Amortissements du mat\u00e9riel et outillage agricole": { + "account_number": "2842" + }, + "Amortissements du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "2843" + }, + "Amortissements du mat\u00e9riel et mobilier": { + "account_number": "2844" + }, + "Amortissements du mat\u00e9riel de transport": { + "account_number": "2845" + }, + "Amortissements des actifs biologiques": { + "account_number": "2846" + }, + "Amortissements des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": { + "account_number": "2847" + }, + "Amortissements des autres mat\u00e9riels": { + "account_number": "2848" + }, + "account_number": "284" + }, + "account_number": "28" + }, + "D\u00e9pr\u00e9ciations des immobilisations": { + "D\u00e9pr\u00e9ciations des immobilisations incorporelles": { + "D\u00e9pr\u00e9ciations des frais de d\u00e9veloppement": { + "account_number": "2911" + }, + "D\u00e9pr\u00e9ciations des brevets, licences, concessions et droits similaires": { + "account_number": "2912" + }, + "D\u00e9pr\u00e9ciations des logiciels et sites internet": { + "account_number": "2913" + }, + "D\u00e9pr\u00e9ciations des marques": { + "account_number": "2914" + }, + "D\u00e9pr\u00e9ciations du fonds commercial": { + "account_number": "2915" + }, + "D\u00e9pr\u00e9ciations du droit au bail": { + "account_number": "2916" + }, + "D\u00e9pr\u00e9ciations des investissements de cr\u00e9ation": { + "account_number": "2917" + }, + "D\u00e9pr\u00e9ciations des autres droits et valeurs incorporels": { + "account_number": "2918" + }, + "D\u00e9pr\u00e9ciations des immobilisations incorporelles en cours": { + "account_number": "2919" + }, + "account_number": "291" + }, + "D\u00e9pr\u00e9ciations des terrains": { + "D\u00e9pr\u00e9ciations des terrains agricoles et forestiers": { + "account_number": "2921" + }, + "D\u00e9pr\u00e9ciations des terrains nus": { + "account_number": "2922" + }, + "D\u00e9pr\u00e9ciations des terrains b\u00e2tis": { + "account_number": "2923" + }, + "D\u00e9pr\u00e9ciations des travaux de mise en valeur des terrains": { + "account_number": "2924" + }, + "D\u00e9pr\u00e9ciations des terrains de gisement": { + "account_number": "2925" + }, + "D\u00e9pr\u00e9ciations des terrains am\u00e9nag\u00e9s": { + "account_number": "2926" + }, + "D\u00e9pr\u00e9ciations des terrains mis en concession": { + "account_number": "2927" + }, + "D\u00e9pr\u00e9ciations des autres terrains": { + "account_number": "2928" + }, + "D\u00e9pr\u00e9ciations des am\u00e9nagements de terrains en cours": { + "account_number": "2929" + }, + "account_number": "292" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents, installations techniques et agencements": { + "D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "account_number": "2931" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "account_number": "2932" + }, + "D\u00e9pr\u00e9ciations des ouvrages d\u2019infrastructures": { + "account_number": "2933" + }, + "D\u00e9pr\u00e9ciations des am\u00e9nagements, agencements et installations techniques": { + "account_number": "2934" + }, + "D\u00e9pr\u00e9ciations des am\u00e9nagements de bureaux": { + "account_number": "2935" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles et commerciaux mis en concession": { + "account_number": "2937" + }, + "D\u00e9pr\u00e9ciations des autres installations et agencements": { + "account_number": "2938" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents et installations en cours": { + "account_number": "2939" + }, + "account_number": "293" + }, + "D\u00e9pr\u00e9ciations de mat\u00e9riel, du mobilier et de l\u2019actif biologique": { + "D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage industriel et commercial": { + "account_number": "2941" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage agricole": { + "account_number": "2942" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "2943" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel et mobilier": { + "account_number": "2944" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel de transport": { + "account_number": "2945" + }, + "D\u00e9pr\u00e9ciations des actifs biologiques": { + "account_number": "2946" + }, + "D\u00e9pr\u00e9ciations des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": { + "account_number": "2947" + }, + "D\u00e9pr\u00e9ciations des autres mat\u00e9riels": { + "account_number": "2948" + }, + "D\u00e9pr\u00e9ciations de mat\u00e9riel en cours": { + "account_number": "2949" + }, + "account_number": "294" + }, + "D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations": { + "D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations incorporelles": { + "account_number": "2951" + }, + "D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations corporelles": { + "account_number": "2952" + }, + "account_number": "295" + }, + "D\u00e9pr\u00e9ciations des titres de participation": { + "D\u00e9pr\u00e9ciations des titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": { + "account_number": "2961" + }, + "D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s sous contr\u00f4le conjoint": { + "account_number": "2962" + }, + "D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s conf\u00e9rant une influence notable": { + "account_number": "2963" + }, + "D\u00e9pr\u00e9ciations des participations dans des organismes professionnels": { + "account_number": "2965" + }, + "D\u00e9pr\u00e9ciations des parts dans des GIE": { + "account_number": "2966" + }, + "D\u00e9pr\u00e9ciations des autres titres de participation": { + "account_number": "2968" + }, + "account_number": "296" + }, + "D\u00e9pr\u00e9ciations des autres immobilisations financi\u00e8res": { + "D\u00e9pr\u00e9ciations des pr\u00eats et cr\u00e9ances": { + "account_number": "2971" + }, + "D\u00e9pr\u00e9ciations des pr\u00eats au personnel": { + "account_number": "2972" + }, + "D\u00e9pr\u00e9ciations des cr\u00e9ances sur l\u2019\u00c9tat": { + "account_number": "2973" + }, + "D\u00e9pr\u00e9ciations des titres immobilis\u00e9s": { + "account_number": "2974" + }, + "D\u00e9pr\u00e9ciations des d\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "account_number": "2975" + }, + "D\u00e9pr\u00e9ciations des cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": { + "account_number": "2977" + }, + "D\u00e9pr\u00e9ciations des cr\u00e9ances financi\u00e8res diverses": { + "account_number": "2978" + }, + "account_number": "297" + }, + "account_number": "29" + }, + "root_type": "Asset", + "account_number": "2" + }, + "Comptes de Stocks": { + "Marchandises": { + "Marchandises A": { + "Marchandises A1": { + "account_number": "3111" + }, + "Marchandises A2": { + "account_number": "3112" + }, + "account_number": "311" + }, + "Marchandises B": { + "Marchandises B1": { + "account_number": "3121" + }, + "Marchandises B2": { + "account_number": "3122" + }, + "account_number": "312" + }, + "Actifs biologiques": { + "Animaux": { + "account_number": "3131" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3132" + }, + "account_number": "313" + }, + "Marchandises hors activit\u00e9s ordinaires (HAO)": { + "account_number": "318" + }, + "account_number": "31" + }, + "Mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "Mati\u00e8res A": { + "account_number": "321" + }, + "Mati\u00e8res B": { + "account_number": "322" + }, + "Fournitures (A, B)": { + "account_number": "323" + }, + "account_number": "32" + }, + "Autres approvisionnements": { + "Mati\u00e8res consommables": { + "account_number": "331" + }, + "Fournitures d\u2019atelier et d\u2019usine": { + "account_number": "332" + }, + "Fournitures de magasin": { + "account_number": "333" + }, + "Fournitures de bureau": { + "account_number": "334" + }, + "Emballages": { + "Emballages perdus": { + "account_number": "3351" + }, + "Emballages r\u00e9cup\u00e9rables non identifiables": { + "account_number": "3352" + }, + "Emballages \u00e0 usage mixte": { + "account_number": "3353" + }, + "Autres emballages": { + "account_number": "3358" + }, + "account_number": "335" + }, + "Autres mati\u00e8res": { + "account_number": "338" + }, + "account_number": "33" + }, + "Produits en cours": { + "Produits en cours": { + "Produits en cours P1": { + "account_number": "3411" + }, + "Produits en cours P2": { + "account_number": "3412" + }, + "account_number": "341" + }, + "Travaux en cours": { + "Travaux en cours T1": { + "account_number": "3421" + }, + "Travaux en cours T2": { + "account_number": "3422" + }, + "account_number": "342" + }, + "Produits interm\u00e9diaires en cours": { + "Produits interm\u00e9diaires A": { + "account_number": "3431" + }, + "Produits interm\u00e9diaires B": { + "account_number": "3432" + }, + "account_number": "343" + }, + "Produits r\u00e9siduels en cours": { + "Produits r\u00e9siduels A": { + "account_number": "3441" + }, + "Produits r\u00e9siduels B": { + "account_number": "3442" + }, + "account_number": "344" + }, + "Actifs biologiques en cours": { + "Animaux": { + "account_number": "3451" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3452" + }, + "account_number": "345" + }, + "account_number": "34" + }, + "Services en cours": { + "\u00c9tudes en cours": { + "\u00c9tudes en cours E1": { + "account_number": "3511" + }, + "\u00c9tudes en cours E2": { + "account_number": "3512" + }, + "account_number": "351" + }, + "Prestations de services en cours": { + "Prestations de services S1": { + "account_number": "3521" + }, + "Prestations de services S2": { + "account_number": "3522" + } + }, + "account_number": "35" + }, + "Produits finis": { + "Produits finis A": { + "account_number": "361" + }, + "Produits finis B": { + "account_number": "362" + }, + "Actifs biologiques": { + "Animaux": { + "account_number": "3631" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3632" + }, + "Autres stocks (activit\u00e9s annexes)": { + "account_number": "3638" + }, + "account_number": "363" + }, + "account_number": "36" + }, + "Produits interm\u00e9diaires et r\u00e9siduels": { + "Produits interm\u00e9diaires": { + "Produits interm\u00e9diaires A": { + "account_number": "3711" + }, + "Produits interm\u00e9diaires B": { + "account_number": "3712" + }, + "account_number": "371" + }, + "Produits r\u00e9siduels": { + "D\u00e9chets": { + "account_number": "3721" + }, + "Rebuts": { + "account_number": "3722" + }, + "Mati\u00e8res de R\u00e9cup\u00e9ration": { + "account_number": "3723" + }, + "account_number": "372" + }, + "Actifs biologiques": { + "Animaux": { + "account_number": "3731" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3732" + }, + "Autres stocks (activit\u00e9s annexes)": { + "account_number": "3738" + }, + "account_number": "373" + }, + "account_number": "37" + }, + "Stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": { + "account_type": "Stock", + "Marchandises en cours de route": { + "account_number": "381" + }, + "Mati\u00e8res premi\u00e8res et fournitures li\u00e9es en cours de route": { + "account_number": "382" + }, + "Autres approvisionnements en cours de route": { + "account_number": "383" + }, + "Produits finis en cours de route": { + "account_number": "386" + }, + "Stock en consignation ou en d\u00e9p\u00f4t": { + "Stock en consignation": { + "account_number": "3871" + }, + "Stock en d\u00e9p\u00f4t": { + "account_number": "3872" + }, + "account_number": "387" + }, + "Stock provenant d\u2019immobilisations mises hors service ou au rebut": { + "account_number": "388" + }, + "account_number": "38" + }, + "D\u00e9pr\u00e9ciations des stocks et encours de production": { + "D\u00e9pr\u00e9ciations des stocks de marchandises": { + "account_number": "391" + }, + "D\u00e9pr\u00e9ciations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "account_number": "392" + }, + "D\u00e9pr\u00e9ciations des stocks d\u2019autres approvisionnements": { + "account_number": "393" + }, + "D\u00e9pr\u00e9ciations des productions en cours": { + "account_number": "394" + }, + "D\u00e9pr\u00e9ciations des services en cours": { + "account_number": "395" + }, + "D\u00e9pr\u00e9ciations des stocks de produits finis": { + "account_number": "396" + }, + "D\u00e9pr\u00e9ciations des stocks de produits interm\u00e9diaires et r\u00e9siduels": { + "account_number": "397" + }, + "D\u00e9pr\u00e9ciations des stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": { + "account_number": "398" + }, + "account_number": "39" + }, + "root_type": "Asset", + "account_number": "3" + }, + "4-Comptes de Tiers (ACTIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (ACTIF)": { + "Fournisseurs d\u00e9biteurs": { + "Fournisseurs Avances et acomptes vers\u00e9s": { + "account_number": "4091" + }, + "Fournisseurs Groupe avances et acomptes vers\u00e9s": { + "account_number": "4092" + }, + "Fournisseurs Sous-traitants avances et acomptes vers\u00e9s": { + "account_number": "4093" + }, + "Fournisseurs Cr\u00e9ances pour emballages et mat\u00e9riels \u00e0 rendre": { + "account_number": "4094" + }, + "Fournisseurs Rabais, remises, ristournes et autres avoirs \u00e0 obtenir": { + "account_number": "4098" + }, + "account_number": "409" + } + }, + "41-Clients et comptes rattach\u00e9s (ACTIF)": { + "Clients": { + "Clients": { + "account_type": "Receivable", + "account_number": "4111" + }, + "Clients groupe": { + "account_type": "Receivable", + "account_number": "4112" + }, + "Clients, \u00c9tat et Collectivit\u00e9s publiques": { + "account_type": "Receivable", + "account_number": "4114" + }, + "Clients, organismes internationaux": { + "account_type": "Receivable", + "account_number": "4115" + }, + "Clients, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Receivable", + "account_number": "4116" + }, + "Client, retenues de garantie": { + "account_type": "Receivable", + "account_number": "4117" + }, + "Clients, d\u00e9gr\u00e8vement de taxes sur la valeur ajout\u00e9e (TVA)": { + "account_type": "Receivable", + "account_number": "4118" + }, + "account_type": "Receivable", + "account_number": "411" + }, + "Clients, effets \u00e0 recevoir en portefeuille": { + "Clients, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4121" + }, + "Clients Groupe, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4122" + }, + "\u00c9tat et Collectivit\u00e9s publiques, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4124" + }, + "Organismes Internationaux, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4125" + }, + "account_type": "Receivable", + "account_number": "412" + }, + "Clients, ch\u00e8ques, effets et autres valeurs impay\u00e9es": { + "Clients, ch\u00e8ques impay\u00e9s": { + "account_type": "Receivable", + "account_number": "4131" + }, + "Clients, effets impay\u00e9s": { + "account_type": "Receivable", + "account_number": "4132" + }, + "Clients, cartes de cr\u00e9dit impay\u00e9es": { + "account_type": "Receivable", + "account_number": "4133" + }, + "Clients, autres valeurs impay\u00e9es": { + "account_type": "Receivable", + "account_number": "4138" + }, + "account_type": "Receivable", + "account_number": "413" + }, + "Cr\u00e9ances sur cessions courantes d\u2019immobilisations": { + "Cr\u00e9ances en compte, immobilisations incorporelles": { + "account_type": "Receivable", + "account_number": "4141" + }, + "Cr\u00e9ances en compte, immobilisations corporelles": { + "account_type": "Receivable", + "account_number": "4142" + }, + "Effets \u00e0 recevoir, immobilisations incorporelles": { + "account_type": "Receivable", + "account_number": "4146" + }, + "Effets \u00e0 recevoir, immobilisations corporelles": { + "account_type": "Receivable", + "account_number": "4147" + }, + "account_type": "Receivable", + "account_number": "414" + }, + "Clients, effets escompt\u00e9s non \u00e9chus": { + "account_type": "Receivable", + "account_number": "415" + }, + "Cr\u00e9ances clients litigieuses ou douteuses": { + "Cr\u00e9ances litigieuses": { + "account_type": "Receivable", + "account_number": "4161" + }, + "Cr\u00e9ances douteuses": { + "account_type": "Receivable", + "account_number": "4162" + }, + "account_type": "Receivable", + "account_number": "416" + }, + "Clients, produits \u00e0 recevoir": { + "Clients, factures \u00e0 \u00e9tablir": { + "account_type": "Receivable", + "account_number": "4181" + }, + "Clients, int\u00e9r\u00eats courus": { + "account_type": "Receivable", + "account_number": "4186" + }, + "account_type": "Receivable", + "account_number": "418" + }, + "account_type": "Receivable" + }, + "42-Personnel (ACTIF)": { + "Personnel, avances et acomptes": { + "Personnel, avances": { + "account_number": "4211" + }, + "Personnel, acomptes": { + "account_number": "4212" + }, + "Frais avanc\u00e9s et fournitures au personnel": { + "account_number": "4213" + }, + "account_number": "421" + } + }, + "43-Organismes sociaux (ACTIF)": { + "431-S\u00e9curit\u00e9 sociale": { + "Prestations familiales": { + "account_number": "4311" + }, + "Accidents de travail": { + "account_number": "4312" + }, + "Caisse de retraite obligatoire": { + "account_number": "4313" + }, + "Caisse de retraite facultative": { + "account_number": "4314" + }, + "Autres cotisations sociales": { + "account_number": "4318" + } + }, + "432-Caisses de retraite compl\u00e9mentaire": {}, + "433-Autres organismes sociaux": { + "Mutuelle": { + "account_number": "4331" + }, + "Assurances retraite": { + "account_number": "4332" + }, + "Assurances et organismes de sant\u00e9": { + "account_number": "4333" + } + }, + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "Produits \u00e0 recevoir": { + "account_number": "4387" + } + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (ACTIF)": { + "\u00c9tat, TVA factur\u00e9e": { + "TVA factur\u00e9e sur ventes": { + "account_number": "4431" + }, + "TVA factur\u00e9e sur prestations de services": { + "account_number": "4432" + }, + "TVA factur\u00e9e sur travaux": { + "account_number": "4433" + }, + "TVA factur\u00e9e sur production livr\u00e9e \u00e0 soi-m\u00eame": { + "account_number": "4434" + }, + "TVA sur factures \u00e0 \u00e9tablir": { + "account_number": "4435" + }, + "account_number": "443" + }, + "\u00c9tat, TVA r\u00e9cup\u00e9rable": { + "TVA r\u00e9cup\u00e9rable sur immobilisations": { + "account_number": "4451" + }, + "TVA r\u00e9cup\u00e9rable sur achats": { + "account_number": "4452" + }, + "TVA r\u00e9cup\u00e9rable sur transport": { + "account_number": "4453" + }, + "TVA r\u00e9cup\u00e9rable sur services ext\u00e9rieurs et autres charges": { + "account_number": "4454" + }, + "TVA r\u00e9cup\u00e9rable sur factures non parvenues": { + "account_number": "4455" + }, + "TVA transf\u00e9r\u00e9e par d\u2019autres entit\u00e9s": { + "account_number": "4456" + }, + "account_number": "445" + }, + "\u00c9tat, charges \u00e0 payer et produits \u00e0 recevoir": { + "Charges \u00e0 payer": { + "account_number": "4486" + }, + "Produits \u00e0 recevoir": { + "account_number": "4487" + }, + "account_number": "448" + }, + "\u00c9tat, cr\u00e9ances et dettes diverses": { + "\u00c9tat, obligations cautionn\u00e9es": { + "account_number": "4491" + }, + "\u00c9tat, avances et acomptes vers\u00e9s sur imp\u00f4ts": { + "account_number": "4492" + }, + "\u00c9tat, fonds de dotation \u00e0 recevoir": { + "account_number": "4493" + }, + "\u00c9tat, subventions investissement \u00e0 recevoir": { + "account_number": "4494" + }, + "\u00c9tat, subventions d\u2019exploitation \u00e0 recevoir": { + "account_number": "4495" + }, + "\u00c9tat, subventions d\u2019\u00e9quilibre \u00e0 recevoir": { + "account_number": "4496" + }, + "\u00c9tat, avances sur subventions": { + "account_number": "4497" + }, + "\u00c9tat, fonds r\u00e9glement\u00e9s provisionn\u00e9s": { + "account_number": "4499" + }, + "account_number": "449" + } + }, + "45-Organismes internationaux (ACTIF)": { + "Op\u00e9rations avec les organismes africains": { + "account_number": "451" + }, + "Op\u00e9rations avec les autres organismes internationaux": { + "account_number": "452" + }, + "Organismes internationaux, fonds de dotation et subventions \u00e0 recevoir": { + "Organismes internationaux, fonds de dotation \u00e0 recevoir": { + "account_number": "4581" + }, + "Organismes internationaux, subventions \u00e0 recevoir": { + "account_number": "4582" + }, + "account_number": "458" + } + }, + "46-Apporteurs, associ\u00e9s et groupe (ACTIF)": { + "461-Apporteurs, op\u00e9rations sur le capital": { + "Apporteurs, capital appel\u00e9, non vers\u00e9": { + "account_number": "4613" + }, + "Apporteurs, compte d\u2019apport, op\u00e9rations de restructuration (fusion...)": { + "account_number": "4614" + }, + "Apporteurs, titres \u00e0 \u00e9changer": { + "account_number": "4618" + } + }, + "Apporteurs, restant d\u00fb sur capital appel\u00e9": { + "account_number": "467" + } + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (ACTIF)": { + "472-Cr\u00e9ances et dettes sur titres de placement": { + "Cr\u00e9ances sur cessions de titres de placement": { + "account_number": "4721" + }, + "Versements restant \u00e0 effectuer sur titres de placement non lib\u00e9r\u00e9s": { + "account_number": "4726" + } + }, + "473-Interm\u00e9diaires Op\u00e9rations faites pour compte de tiers": { + "Mandants": { + "account_number": "4731" + }, + "Mandataires": { + "account_number": "4732" + }, + "Commettants": { + "account_number": "4733" + }, + "Commissionnaires": { + "account_number": "4734" + }, + "\u00c9tat, Collectivit\u00e9s publiques, fonds global d\u2019allocation": { + "account_number": "4739" + } + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits": { + "Compte de r\u00e9partition p\u00e9riodique des produits": { + "account_number": "4747" + } + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA": { + "Compte actif": { + "account_type": "Temporary", + "account_number": "4751" + } + }, + "Charges constat\u00e9es d\u2019avance": { + "account_number": "476" + }, + "478-\u00c9carts de conversion actif": { + "Diminution des cr\u00e9ances d\u2019exploitation": { + "account_number": "4781" + }, + "Diminution des cr\u00e9ances financi\u00e8res": { + "account_number": "4782" + }, + "Augmentation des dettes d\u2019exploitation": { + "account_number": "4783" + }, + "Augmentation des dettes financi\u00e8res": { + "account_number": "4784" + }, + "Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": { + "account_number": "4786" + }, + "Diff\u00e9rences compens\u00e9es par couverture de change": { + "account_number": "4788" + } + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (ACTIF)": { + "Cr\u00e9ances sur cessions d\u2019immobilisations": { + "En compte, immobilisations incorporelles": { + "account_number": "4851" + }, + "En compte, immobilisations corporelles": { + "account_number": "4852" + }, + "Effets \u00e0 recevoir, immobilisations incorporelles": { + "account_number": "4853" + }, + "Effets \u00e0 recevoir, immobilisations corporelles": { + "account_number": "4854" + }, + "Effets escompt\u00e9s non \u00e9chus": { + "account_number": "4855" + }, + "Retenues de garantie": { + "account_number": "4857" + }, + "Factures \u00e0 \u00e9tablir": { + "account_number": "4858" + }, + "account_number": "485" + }, + "Autres cr\u00e9ances hors activit\u00e9s ordinaires (HAO)": { + "account_number": "488" + } + }, + "49-D\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme (tiers) (ACTIF)": { + "D\u00e9pr\u00e9ciations des comptes clients": { + "Cr\u00e9ances litigieuses": { + "account_number": "4911" + }, + "Cr\u00e9ances douteuses": { + "account_number": "4912" + }, + "account_number": "491" + }, + "D\u00e9pr\u00e9ciations des comptes organismes internationaux": { + "account_number": "495" + }, + "D\u00e9pr\u00e9ciations des comptes apporteurs, associ\u00e9s et groupe": { + "Associ\u00e9s, comptes courants": { + "account_number": "4962" + }, + "Associ\u00e9s, op\u00e9rations faites en commun": { + "account_number": "4963" + }, + "Groupe, comptes courants": { + "account_number": "4966" + }, + "account_number": "496" + }, + "D\u00e9pr\u00e9ciations des comptes d\u00e9biteurs divers": { + "account_number": "497" + }, + "D\u00e9pr\u00e9ciations des comptes de cr\u00e9ances HAO": { + "Cr\u00e9ances sur cessions d\u2019immobilisations": { + "account_number": "4985" + }, + "Cr\u00e9ances sur cessions de titres de placement": { + "account_number": "4986" + }, + "Autres cr\u00e9ances HAO": { + "account_number": "4988" + }, + "account_number": "498" + }, + "Provisions pour risques \u00e0 court terme": { + "Sur op\u00e9rations d\u2019exploitation": { + "account_number": "4991" + }, + "Sur op\u00e9rations financi\u00e8res": { + "account_number": "4997" + }, + "Sur op\u00e9rations HAO": { + "account_number": "4998" + }, + "account_number": "499" + } + }, + "root_type": "Asset" + }, + "4-Comptes de Tiers (PASSIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (PASSIF)": { + "Fournisseurs, dettes en compte": { + "Fournisseurs": { + "account_type": "Payable", + "account_number": "4011" + }, + "Fournisseurs groupe": { + "account_type": "Payable", + "account_number": "4012" + }, + "Fournisseurs sous-traitants": { + "account_type": "Payable", + "account_number": "4013" + }, + "Fournisseurs, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Payable", + "account_number": "4016" + }, + "Fournisseur, retenues de garantie": { + "account_type": "Payable", + "account_number": "4017" + }, + "account_type": "Payable", + "account_number": "401" + }, + "Fournisseurs, effets \u00e0 payer": { + "Fournisseurs Effets \u00e0 payer": { + "account_type": "Payable", + "account_number": "4021" + }, + "Fournisseurs Groupe, effets \u00e0 payer": { + "account_type": "Payable", + "account_number": "4022" + }, + "Fournisseurs Sous-traitants, effets \u00e0 payer": { + "account_type": "Payable", + "account_number": "4023" + }, + "account_type": "Payable", + "account_number": "402" + }, + "Fournisseurs, acquisitions courantes d\u2019immobilisations": { + "Fournisseurs Dettes en comptes, immobilisations incorporelles": { + "account_type": "Payable", + "account_number": "4041" + }, + "Fournisseurs Dettes en comptes, immobilisations corporelles": { + "account_type": "Payable", + "account_number": "4042" + }, + "Fournisseurs Effets \u00e0 payer, immobilisations incorporelles": { + "account_type": "Payable", + "account_number": "4046" + }, + "Fournisseurs Effets \u00e0 payer, immobilisations corporelles": { + "account_type": "Payable", + "account_number": "4047" + }, + "account_type": "Payable", + "account_number": "404" + }, + "Fournisseurs, factures non parvenues": { + "Fournisseurs": { + "account_type": "Stock Received But Not Billed", + "account_number": "4081" + }, + "Fournisseurs groupe": { + "account_type": "Stock Received But Not Billed", + "account_number": "4082" + }, + "Fournisseurs sous-traitants": { + "account_type": "Stock Received But Not Billed", + "account_number": "4083" + }, + "Fournisseurs, int\u00e9r\u00eats courus": { + "account_type": "Stock Received But Not Billed", + "account_number": "4086" + }, + "account_type": "Stock Received But Not Billed", + "account_number": "408" + }, + "account_type": "Payable" + }, + "41-Clients et comptes rattach\u00e9s (PASSIF)": { + "Clients cr\u00e9diteurs": { + "Clients, avances et acomptes re\u00e7us": { + "account_number": "4191" + }, + "Clients groupe, avances et acomptes re\u00e7us": { + "account_number": "4192" + }, + "Clients, dettes pour emballages et mat\u00e9riels consign\u00e9s": { + "account_number": "4194" + }, + "Clients, rabais, remises, ristournes et autres avoirs \u00e0 accorder": { + "account_number": "4198" + }, + "account_number": "419" + } + }, + "42-Personnel (PASSIF)": { + "Personnel, r\u00e9mun\u00e9rations dues": { + "account_number": "422" + }, + "Personnel, oppositions, saisies-arr\u00eats": { + "Personnel, oppositions": { + "account_number": "4231" + }, + "Personnel, saisies-arr\u00eats": { + "account_number": "4232" + }, + "Personnel, avis \u00e0 tiers d\u00e9tenteur": { + "account_number": "4233" + }, + "account_number": "423" + }, + "Personnel, \u0153uvres sociales internes": { + "Assistance m\u00e9dicale": { + "account_number": "4241" + }, + "Allocations familiales": { + "account_number": "4242" + }, + "Organismes sociaux rattach\u00e9s \u00e0 l\u2019entit\u00e9": { + "account_number": "4245" + }, + "Autres \u0153uvres sociales internes": { + "account_number": "4248" + }, + "account_number": "424" + }, + "Repr\u00e9sentants du personnel": { + "D\u00e9l\u00e9gu\u00e9s du personnel": { + "account_number": "4251" + }, + "Syndicats et Comit\u00e9s d\u2019entreprises, d\u2019\u00c9tablissement": { + "account_number": "4252" + }, + "Autres repr\u00e9sentants du personnel": { + "account_number": "4258" + }, + "account_number": "425" + }, + "Personnel, participation aux b\u00e9n\u00e9fices et au capital": { + "Participation aux b\u00e9n\u00e9fices": { + "account_number": "4261" + }, + "Participation au capital": { + "account_number": "4264" + }, + "account_number": "426" + }, + "Personnel d\u00e9p\u00f4ts": { + "account_number": "427" + }, + "Personnel, charges \u00e0 payer et produits \u00e0 recevoir": { + "Dettes provisionn\u00e9es pour cong\u00e9s \u00e0 payer": { + "account_number": "4281" + }, + "Autres charges \u00e0 payer": { + "account_number": "4286" + }, + "Produits \u00e0 recevoir": { + "account_number": "4287" + }, + "account_number": "428" + } + }, + "43-Organismes sociaux (PASSIF)": { + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "Charges sociales sur gratifications \u00e0 payer": { + "account_number": "4381" + }, + "Charges sociales sur cong\u00e9s \u00e0 payer": { + "account_number": "4382" + }, + "Autres charges \u00e0 payer": { + "account_number": "4386" + } + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (PASSIF)": { + "\u00c9tat, imp\u00f4t sur les b\u00e9n\u00e9fices": { + "account_number": "441" + }, + "\u00c9tat, autres imp\u00f4ts et taxes": { + "Imp\u00f4ts et taxes d\u2019\u00c9tat": { + "account_number": "4421" + }, + "Imp\u00f4ts et taxes pour les collectivit\u00e9s publiques": { + "account_number": "4422" + }, + "Imp\u00f4ts et taxes recouvrables sur des obligataires": { + "account_number": "4423" + }, + "Imp\u00f4ts et taxes recouvrables sur des associ\u00e9s": { + "account_number": "4424" + }, + "Droits de douane": { + "account_number": "4426" + }, + "Autres imp\u00f4ts et taxes": { + "account_number": "4428" + }, + "account_number": "442" + }, + "\u00c9tat, TVA due ou cr\u00e9dit de TVA": { + "\u00c9tat, TVA due": { + "account_number": "4441" + }, + "\u00c9tat, cr\u00e9dit de TVA \u00e0 reporter": { + "account_number": "4449" + }, + "account_number": "444" + }, + "\u00c9tat, autres taxes sur le chiffre d\u2019affaires": { + "account_number": "446" + }, + "\u00c9tat, imp\u00f4ts retenus \u00e0 la source": { + "Imp\u00f4t G\u00e9n\u00e9ral sur le revenu": { + "account_number": "4471" + }, + "Imp\u00f4ts sur salaires": { + "account_number": "4472" + }, + "Contribution nationale": { + "account_number": "4473" + }, + "Contribution nationale de solidarit\u00e9": { + "account_number": "4474" + }, + "Autres imp\u00f4ts et contributions": { + "account_number": "4478" + }, + "account_number": "447" + } + }, + "46-Apporteurs, associ\u00e9s et groupe (PASSIF)": { + "461-Apporteurs, op\u00e9rations sur le capital (PASSIF)": { + "Apporteurs, apports en nature": { + "account_number": "4611" + }, + "Apporteurs, apports en num\u00e9raire": { + "account_number": "4612" + }, + "Apporteurs, versements re\u00e7us sur augmentation de capital": { + "account_number": "4615" + }, + "Apporteurs, versements anticip\u00e9s": { + "account_number": "4616" + }, + "Apporteurs d\u00e9faillants": { + "account_number": "4617" + }, + "Apporteurs, capital \u00e0 rembourser": { + "account_number": "4619" + } + }, + "462-Associ\u00e9s, comptes courants": { + "Principal": { + "account_number": "4621" + }, + "Int\u00e9r\u00eats courus": { + "account_number": "4626" + } + }, + "463-Associ\u00e9s, op\u00e9rations faites en commun et GIE": { + "Op\u00e9rations courantes": { + "account_number": "4631" + }, + "Int\u00e9r\u00eats courus": { + "account_number": "4636" + } + }, + "Associ\u00e9s, dividendes \u00e0 payer": { + "account_number": "465" + }, + "Groupe, comptes courants": { + "account_number": "466" + } + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (PASSIF)": { + "471-D\u00e9biteurs et cr\u00e9diteurs divers": { + "D\u00e9biteurs divers": { + "account_number": "4711" + }, + "Cr\u00e9diteurs divers": { + "account_number": "4712" + }, + "Obligataires": { + "account_number": "4713" + }, + "R\u00e9mun\u00e9rations d\u2019administrateurs": { + "account_number": "4715" + }, + "Compte d\u2019affacturage": { + "account_number": "4716" + }, + "D\u00e9biteurs divers retenues de garantie": { + "account_number": "4717" + }, + "Apport, compte de fusion et op\u00e9rations assimil\u00e9es": { + "account_number": "4718" + }, + "Bons de souscription d\u2019actions et d\u2019obligations": { + "account_number": "4719" + } + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits (PASSIF)": { + "Compte de r\u00e9partition p\u00e9riodique des charges": { + "account_number": "4746" + } + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA (PASSIF)": { + "Compte passif": { + "account_number": "4752" + } + }, + "Produits constat\u00e9s d\u2019avance": { + "account_number": "477" + }, + "479-\u00c9carts de conversion passif": { + "Augmentation des cr\u00e9ances d\u2019exploitation": { + "account_number": "4791" + }, + "Augmentation des cr\u00e9ances financi\u00e8res": { + "account_number": "4792" + }, + "Diminution des dettes d\u2019exploitation": { + "account_number": "4793" + }, + "Diminution des dettes financi\u00e8res": { + "account_number": "4794" + }, + "Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": { + "account_number": "4797" + }, + "Diff\u00e9rences compens\u00e9es par couverture de change": { + "account_number": "4798" + } + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (HAO) (PASSIF)": { + "Fournisseurs d\u2019investissements": { + "Immobilisations incorporelles": { + "account_number": "4811" + }, + "Immobilisations corporelles": { + "account_number": "4812" + }, + "Versements restant \u00e0 effectuer sur titres de participation et titres immobilis\u00e9s non lib\u00e9r\u00e9s": { + "account_number": "4813" + }, + "R\u00e9serve de propri\u00e9t\u00e9": { + "account_number": "4816" + }, + "Retenues de garantie": { + "account_number": "4817" + }, + "Factures non parvenues": { + "account_number": "4818" + }, + "account_number": "481" + }, + "Fournisseurs d\u2019investissements, effets \u00e0 payer": { + "Immobilisations incorporelles": { + "account_number": "4821" + }, + "Immobilisations corporelles": { + "account_number": "4822" + }, + "account_number": "482" + }, + "Autres dettes hors activit\u00e9s ordinaires (HAO)": { + "Produits": { + "account_number": "4887" + }, + "account_number": "484" + } + }, + "root_type": "Liability" + }, + "Comptes de tr\u00e9sorerie": { + "Titres de placement": { + "Titres du tr\u00e9sor et bons de caisse \u00e0 court terme": { + "Titres du Tr\u00e9sor \u00e0 court terme": { + "account_number": "5011" + }, + "Titres d\u2019organismes financiers": { + "account_number": "5012" + }, + "Bons de caisse \u00e0 court terme": { + "account_number": "5013" + }, + "Frais d\u2019acquisition des titres de tr\u00e9sor et bons de caisse": { + "account_number": "5016" + }, + "account_number": "501" + }, + "Actions": { + "Actions ou parts propres": { + "account_number": "5021" + }, + "Actions cot\u00e9es": { + "account_number": "5022" + }, + "Actions non cot\u00e9es": { + "account_number": "5023" + }, + "Actions d\u00e9membr\u00e9es (certificats d\u2019investissement, droits de vote)": { + "account_number": "5024" + }, + "Autres actions": { + "account_number": "5025" + }, + "Frais d\u2019acquisition des actions": { + "account_number": "5026" + }, + "account_number": "502" + }, + "Obligations": { + "Obligations \u00e9mises par la soci\u00e9t\u00e9 et rachet\u00e9es par elle": { + "account_number": "5031" + }, + "Obligations cot\u00e9es": { + "account_number": "5032" + }, + "Obligations non cot\u00e9es": { + "account_number": "5033" + }, + "Autres obligations": { + "account_number": "5035" + }, + "Frais d\u2019acquisition des obligations": { + "account_number": "5036" + }, + "account_number": "503" + }, + "Bons de souscription": { + "Bons de souscription d\u2019actions": { + "account_number": "5042" + }, + "Bons de souscription d\u2019obligations": { + "account_number": "5043" + }, + "account_number": "504" + }, + "Titres n\u00e9gociables hors r\u00e9gion": { + "account_number": "505" + }, + "Int\u00e9r\u00eats courus": { + "Titres du Tr\u00e9sor et bons de caisse \u00e0 court terme": { + "account_number": "5061" + }, + "Actions": { + "account_number": "5062" + }, + "Obligations": { + "account_number": "5063" + }, + "account_number": "506" + }, + "Autres titres de placement et cr\u00e9ances assimil\u00e9es": { + "account_number": "508" + }, + "account_number": "50" + }, + "Valeurs \u00e0 encaisser": { + "Effets \u00e0 encaisser": { + "account_number": "511" + }, + "Effets \u00e0 l\u2019encaissement": { + "account_number": "512" + }, + "Ch\u00e8ques \u00e0 encaisser": { + "account_number": "513" + }, + "Ch\u00e8ques \u00e0 l\u2019encaissement": { + "account_number": "514" + }, + "Cartes de cr\u00e9dit \u00e0 encaisser": { + "account_number": "515" + }, + "Autres valeurs \u00e0 l\u2019encaissement": { + "Warrants": { + "account_number": "5181" + }, + "Billets de fonds": { + "account_number": "5182" + }, + "Ch\u00e8ques de voyage": { + "account_number": "5185" + }, + "Coupons \u00e9chus": { + "account_number": "5186" + }, + "Int\u00e9r\u00eats \u00e9chus des obligations": { + "account_number": "5187" + }, + "account_number": "518" + }, + "account_number": "51" + }, + "Banques": { + "Banques locales": { + "Banques en monnaie nationale": { + "account_type": "Bank", + "account_number": "5211" + }, + "Banques en devises": { + "account_type": "Bank", + "account_number": "5215" + }, + "account_type": "Bank", + "account_number": "521" + }, + "Banques autres \u00c9tats r\u00e9gion": { + "account_number": "522" + }, + "Banques autres \u00c9tats zone mon\u00e9taire": { + "account_number": "523" + }, + "Banques hors zone mon\u00e9taire": { + "account_number": "524" + }, + "Banques d\u00e9p\u00f4t \u00e0 terme": { + "account_number": "525" + }, + "Banques, int\u00e9r\u00eats courus": { + "Banque, int\u00e9r\u00eats courus, charges \u00e0 payer": { + "account_number": "5261" + }, + "Banque, int\u00e9r\u00eats courus, produits \u00e0 recevoir": { + "account_number": "5267" + }, + "account_number": "526" + }, + "account_number": "52" + }, + "\u00c9tablissements financiers et assimil\u00e9s": { + "Ch\u00e8ques postaux": { + "account_number": "531" + }, + "Tr\u00e9sor": { + "account_number": "532" + }, + "Soci\u00e9t\u00e9s de gestion et d\u2019interm\u00e9diation (SGI)": { + "account_number": "533" + }, + "\u00c9tablissements financiers, int\u00e9r\u00eats courus": { + "account_number": "536" + }, + "Autres organismes financiers": { + "account_number": "538" + }, + "account_number": "53" + }, + "Instruments de tr\u00e9sorerie": { + "Options de taux d\u2019int\u00e9r\u00eat": { + "account_number": "541" + }, + "Options de taux de change": { + "account_number": "542" + }, + "Options de taux boursiers": { + "account_number": "543" + }, + "Instruments de march\u00e9s \u00e0 terme": { + "account_number": "544" + }, + "Avoirs d\u2019or et autres m\u00e9taux pr\u00e9cieux": { + "account_number": "545" + }, + "account_number": "54" + }, + "Instruments de monnaie \u00e9lectronique": { + "Monnaie \u00e9lectronique carte carburant": { + "account_number": "551" + }, + "Monnaie \u00e9lectronique t\u00e9l\u00e9phone portable": { + "account_number": "552" + }, + "Monnaie \u00e9lectronique carte p\u00e9age": { + "account_number": "553" + }, + "Porte-monnaie \u00e9lectronique": { + "account_number": "554" + }, + "Autres instruments de monnaies \u00e9lectroniques": { + "account_number": "558" + }, + "account_number": "55" + }, + "Banques, cr\u00e9dits de tr\u00e9sorerie et d\u2019escompte": { + "Cr\u00e9dits de tr\u00e9sorerie": { + "account_number": "561" + }, + "Escompte de cr\u00e9dits de campagne": { + "account_number": "564" + }, + "Escompte de cr\u00e9dits ordinaires": { + "account_number": "565" + }, + "Banques, cr\u00e9dits de tr\u00e9sorerie, int\u00e9r\u00eats courus": { + "account_number": "566" + }, + "account_number": "56" + }, + "Caisse": { + "Caisse si\u00e8ge social": { + "Caisse en monnaie nationale": { + "account_number": "5711" + }, + "Caisse en devises": { + "account_number": "5712" + }, + "account_number": "571" + }, + "Caisse succursale A": { + "En monnaie nationale": { + "account_number": "5721" + }, + "En devises": { + "account_number": "5722" + }, + "account_number": "572" + }, + "Caisse succursale B": { + "En monnaie nationale": { + "account_number": "5731" + }, + "En devises": { + "account_number": "5732" + }, + "account_number": "573" + }, + "account_number": "57" + }, + "R\u00e9gies d\u2019avances, accr\u00e9ditifs et virements internes": { + "R\u00e9gies d\u2019avance": { + "account_number": "581" + }, + "Accr\u00e9ditifs": { + "account_number": "582" + }, + "Virements de fonds": { + "account_number": "585" + }, + "Autres virements internes": { + "account_number": "588" + }, + "account_number": "58" + }, + "D\u00e9pr\u00e9ciations et provisions pour risque \u00e0 court terme": { + "D\u00e9pr\u00e9ciations des titres de placement": { + "account_number": "590" + }, + "D\u00e9pr\u00e9ciations des titres et valeurs \u00e0 encaisser": { + "account_number": "591" + }, + "D\u00e9pr\u00e9ciations des comptes banques": { + "account_number": "592" + }, + "D\u00e9pr\u00e9ciations des comptes \u00e9tablissements financiers et assimil\u00e9s": { + "account_number": "593" + }, + "D\u00e9pr\u00e9ciations des comptes d\u2019instruments de tr\u00e9sorerie": { + "account_number": "594" + }, + "Provisions pour risque \u00e0 court terme \u00e0 caract\u00e8re financier": { + "account_number": "599" + }, + "account_number": "59" + }, + "root_type": "Asset", + "account_number": "5" + }, + "Comptes de charges des activit\u00e9s ordinaires": { + "Achats et variations de stocks": { + "Achats de marchandises": { + "Dans la R\u00e9gion": { + "account_number": "6011" + }, + "Hors R\u00e9gion": { + "account_number": "6012" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "6013" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "6014" + }, + "Frais sur achats": { + "account_number": "6015" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6019" + }, + "account_number": "601" + }, + "Achats de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "Dans la R\u00e9gion": { + "account_number": "6021" + }, + "Hors R\u00e9gion": { + "account_number": "6022" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "6023" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "6024" + }, + "Frais sur achats": { + "account_number": "6025" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6029" + }, + "account_number": "602" + }, + "Variations des stocks de biens achet\u00e9s": { + "Variations des stocks de marchandises": { + "account_number": "6031" + }, + "Variations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "account_number": "6032" + }, + "Variations des stocks d\u2019autres approvisionnements": { + "account_number": "6033" + }, + "account_number": "603" + }, + "Achats stock\u00e9s de mati\u00e8res et fournitures consommables": { + "Mati\u00e8res consommables": { + "account_number": "6041" + }, + "Mati\u00e8res combustibles": { + "account_number": "6042" + }, + "Produits d\u2019entretien": { + "account_number": "6043" + }, + "Fournitures d\u2019atelier et d\u2019usine": { + "account_number": "6044" + }, + "Frais sur achat": { + "account_number": "6045" + }, + "Fournitures de magasin": { + "account_number": "6046" + }, + "Fournitures de bureau": { + "account_number": "6047" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6049" + }, + "account_number": "604" + }, + "Autres achats": { + "Fournitures non stockables Eau": { + "account_number": "6051" + }, + "Fournitures non stockables \u00c9lectricit\u00e9": { + "account_number": "6052" + }, + "Fournitures non stockables Autres \u00e9nergies": { + "account_number": "6053" + }, + "Fournitures d\u2019entretien non stockables": { + "account_number": "6054" + }, + "Fournitures de bureau non stockables": { + "account_number": "6055" + }, + "Achats de petit mat\u00e9riel et outillage": { + "account_number": "6056" + }, + "Achats d\u2019\u00e9tudes et prestations de services": { + "account_number": "6057" + }, + "Achats de travaux, mat\u00e9riels et \u00e9quipements": { + "account_number": "6058" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6059" + }, + "account_number": "605" + }, + "Achats d\u2019emballages": { + "Emballages perdus": { + "account_number": "6081" + }, + "Emballages r\u00e9cup\u00e9rables non identifiables": { + "account_number": "6082" + }, + "Emballages \u00e0 usage mixte": { + "account_number": "6083" + }, + "Frais sur achats": { + "account_number": "6085" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6089" + }, + "account_number": "608" + }, + "account_number": "60" + }, + "Transports": { + "Transports sur ventes": { + "account_number": "612" + }, + "Transports pour le compte de tiers": { + "account_number": "613" + }, + "Transports du personnel": { + "account_number": "614" + }, + "Transports de plis": { + "account_number": "616" + }, + "Autres frais de transport": { + "Voyages et d\u00e9placements": { + "account_number": "6181" + }, + "Transports entre \u00e9tablissements ou chantiers": { + "account_number": "6182" + }, + "Transports administratifs": { + "account_number": "6183" + }, + "account_number": "618" + }, + "account_number": "61" + }, + "Services ext\u00e9rieurs": { + "Sous-traitance g\u00e9n\u00e9rale": { + "account_number": "621" + }, + "Locations, charges locatives": { + "Locations de terrains": { + "account_number": "6221" + }, + "Locations de b\u00e2timents": { + "account_number": "6222" + }, + "Locations de mat\u00e9riels et outillages": { + "account_number": "6223" + }, + "Malis sur emballages": { + "account_number": "6224" + }, + "Locations d\u2019emballages": { + "account_number": "6225" + }, + "Fermages et loyers du foncier": { + "account_number": "6226" + }, + "Locations et charges locatives diverses": { + "account_number": "6228" + }, + "account_number": "622" + }, + "Redevances de location acquisition": { + "Cr\u00e9dit-bail immobilier": { + "account_number": "6232" + }, + "Cr\u00e9dit-bail mobilier": { + "account_number": "6233" + }, + "Location-vente": { + "account_number": "6234" + }, + "Autres contrats de location acquisition": { + "account_number": "6238" + }, + "account_number": "623" + }, + "Entretien, r\u00e9parations, remise en \u00e9tat et maintenance": { + "Entretien et r\u00e9parations des biens immobiliers": { + "account_number": "6241" + }, + "Entretien et r\u00e9parations des biens mobiliers": { + "account_number": "6242" + }, + "Maintenance": { + "account_number": "6243" + }, + "Charges de d\u00e9mant\u00e8lement et remise en \u00e9tat": { + "account_number": "6244" + }, + "Autres entretiens et r\u00e9parations": { + "account_number": "6248" + }, + "account_number": "624" + }, + "Primes d\u2019assurance": { + "Assurances multirisques": { + "account_number": "6251" + }, + "Assurances mat\u00e9riel de transport": { + "account_number": "6252" + }, + "Assurances risques d\u2019exploitation": { + "account_number": "6253" + }, + "Assurances responsabilit\u00e9 du producteur": { + "account_number": "6254" + }, + "Assurances insolvabilit\u00e9 clients": { + "account_number": "6255" + }, + "Assurances transport sur ventes": { + "account_number": "6257" + }, + "Autres primes d\u2019assurances": { + "account_number": "6258" + }, + "account_number": "625" + }, + "\u00c9tudes, recherches et documentation": { + "\u00c9tudes et recherches": { + "account_number": "6261" + }, + "Documentation g\u00e9n\u00e9rale": { + "account_number": "6265" + }, + "Documentation technique": { + "account_number": "6266" + }, + "account_number": "626" + }, + "Publicit\u00e9, publications, relations publiques": { + "Annonces, insertions": { + "account_number": "6271" + }, + "Catalogues, imprim\u00e9s publicitaires": { + "account_number": "6272" + }, + "\u00c9chantillons": { + "account_number": "6273" + }, + "Foires et expositions": { + "account_number": "6274" + }, + "Publications": { + "account_number": "6275" + }, + "Cadeaux \u00e0 la client\u00e8le": { + "account_number": "6276" + }, + "Frais de colloques, s\u00e9minaires, conf\u00e9rences": { + "account_number": "6277" + }, + "Autres charges de publicit\u00e9 et relations publiques": { + "account_number": "6278" + }, + "account_number": "627" + }, + "Frais de t\u00e9l\u00e9communications": { + "Frais de t\u00e9l\u00e9phone": { + "account_number": "6281" + }, + "Frais de t\u00e9lex": { + "account_number": "6282" + }, + "Frais de t\u00e9l\u00e9copie": { + "account_number": "6283" + }, + "Autres frais de t\u00e9l\u00e9communications": { + "account_number": "6288" + }, + "account_number": "628" + }, + "account_number": "62" + }, + "Autres services ext\u00e9rieurs": { + "Frais bancaires": { + "Frais sur titres (vente, garde)": { + "account_number": "6311" + }, + "Frais sur effets": { + "account_number": "6312" + }, + "Location de coffres": { + "account_number": "6313" + }, + "Commissions d\u2019affacturage": { + "account_number": "6314" + }, + "Commissions sur cartes de cr\u00e9dit": { + "account_number": "6315" + }, + "Frais d\u2019\u00e9mission d\u2019emprunts": { + "account_number": "6316" + }, + "Frais sur instruments monnaie \u00e9lectronique": { + "account_number": "6317" + }, + "Autres frais bancaires": { + "account_number": "6318" + }, + "account_number": "631" + }, + "R\u00e9mun\u00e9rations d\u2019interm\u00e9diaires et de conseils": { + "Commissions et courtages sur ventes": { + "account_number": "6322" + }, + "Honoraires des professions r\u00e9glement\u00e9es": { + "account_number": "6324" + }, + "Frais d\u2019actes et de contentieux": { + "account_number": "6325" + }, + "R\u00e9mun\u00e9rations d\u2019affacturage": { + "account_number": "6326" + }, + "R\u00e9mun\u00e9rations des autres prestataires de services": { + "account_number": "6327" + }, + "Divers frais": { + "account_number": "6328" + }, + "account_number": "632" + }, + "Frais de formation du personnel": { + "account_number": "633" + }, + "Redevances pour brevets, licences, logiciels, concessions et droits et valeurs similaires": { + "Redevances pour brevets, licences": { + "account_number": "6342" + }, + "Redevances pour logiciels": { + "account_number": "6343" + }, + "Redevances pour marques": { + "account_number": "6344" + }, + "Redevances pour sites internet": { + "account_number": "6345" + }, + "Redevances pour concessions, droits et valeurs similaires": { + "account_number": "6346" + }, + "account_number": "634" + }, + "Cotisations": { + "Cotisations": { + "account_number": "6351" + }, + "Concours divers": { + "account_number": "6358" + }, + "account_number": "635" + }, + "R\u00e9mun\u00e9rations de personnel ext\u00e9rieur \u00e0 l\u2019entit\u00e9": { + "Personnel int\u00e9rimaire": { + "account_number": "6371" + }, + "Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": { + "account_number": "6372" + }, + "account_number": "637" + }, + "Autres charges externes": { + "Frais de recrutement du personnel": { + "account_number": "6381" + }, + "Frais de d\u00e9m\u00e9nagement": { + "account_number": "6382" + }, + "R\u00e9ceptions": { + "account_number": "6383" + }, + "Missions": { + "account_number": "6384" + }, + "Charges de copropri\u00e9t\u00e9": { + "account_number": "6385" + }, + "account_number": "638" + }, + "account_number": "63" + }, + "Imp\u00f4ts et taxes": { + "Imp\u00f4ts et taxes directs": { + "Imp\u00f4ts fonciers et taxes annexes": { + "account_number": "6411" + }, + "Patentes, licences et taxes annexes": { + "account_number": "6412" + }, + "Taxes sur appointements et salaires": { + "account_number": "6413" + }, + "Taxes d\u2019apprentissage": { + "account_number": "6414" + }, + "Formation professionnelle continue": { + "account_number": "6415" + }, + "Autres imp\u00f4ts et taxes directs": { + "account_number": "6418" + }, + "account_number": "641" + }, + "Imp\u00f4ts et taxes indirects": { + "account_number": "645" + }, + "Droits d\u2019enregistrement": { + "Droits de mutation": { + "account_number": "6461" + }, + "Droits de timbre": { + "account_number": "6462" + }, + "Taxes sur les v\u00e9hicules de soci\u00e9t\u00e9": { + "account_number": "6463" + }, + "Vignettes": { + "account_number": "6464" + }, + "Autres droits": { + "account_number": "6468" + }, + "account_number": "646" + }, + "P\u00e9nalit\u00e9s, amendes fiscales": { + "P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts directs": { + "account_number": "6471" + }, + "P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts indirects": { + "account_number": "6472" + }, + "P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts directs": { + "account_number": "6473" + }, + "P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts indirects": { + "account_number": "6474" + }, + "Autres p\u00e9nalit\u00e9s et amendes fiscales": { + "account_number": "6478" + }, + "account_number": "647" + }, + "Autres imp\u00f4ts et taxes": { + "account_number": "648" + }, + "account_number": "64" + }, + "Autres charges": { + "Pertes sur cr\u00e9ances clients et autres d\u00e9biteurs": { + "Clients": { + "account_number": "6511" + }, + "Autres d\u00e9biteurs": { + "account_number": "6515" + }, + "account_number": "651" + }, + "Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "Quote-part transf\u00e9r\u00e9e de b\u00e9n\u00e9fices (comptabilit\u00e9 du g\u00e9rant)": { + "account_number": "6521" + }, + "Pertes imput\u00e9es par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": { + "account_number": "6525" + }, + "account_number": "652" + }, + "Valeurs comptables des cessions courantes d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "6541" + }, + "Immobilisations corporelles": { + "account_number": "6542" + }, + "account_number": "654" + }, + "Perte de change sur cr\u00e9ances et dettes commerciale": { + "account_number": "656" + }, + "P\u00e9nalit\u00e9s et amendes p\u00e9nales": { + "account_number": "657" + }, + "Charges diverses": { + "Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": { + "account_number": "6581" + }, + "Dons": { + "account_number": "6582" + }, + "M\u00e9c\u00e9nat": { + "account_number": "6583" + }, + "Autres charges diverses": { + "account_number": "6588" + }, + "account_number": "658" + }, + "Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "Sur risques \u00e0 court terme": { + "account_number": "6591" + }, + "Sur stocks": { + "account_number": "6593" + }, + "Sur cr\u00e9ances": { + "account_number": "6594" + }, + "Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme": { + "account_number": "6598" + }, + "account_number": "659" + }, + "account_number": "65" + }, + "Charges de personnel": { + "R\u00e9mun\u00e9rations directes vers\u00e9es au personnel national": { + "Appointements salaires et commissions": { + "account_number": "6611" + }, + "Primes et gratifications": { + "account_number": "6612" + }, + "Cong\u00e9s pay\u00e9s": { + "account_number": "6613" + }, + "Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": { + "account_number": "6614" + }, + "Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": { + "account_number": "6615" + }, + "Suppl\u00e9ment familial": { + "account_number": "6616" + }, + "Avantages en nature": { + "account_number": "6617" + }, + "Autres r\u00e9mun\u00e9rations directes": { + "account_number": "6618" + }, + "account_number": "661" + }, + "R\u00e9mun\u00e9rations directes vers\u00e9es au personnel non national": { + "Appointements salaires et commissions": { + "account_number": "6621" + }, + "Primes et gratifications": { + "account_number": "6622" + }, + "Cong\u00e9s pay\u00e9s": { + "account_number": "6623" + }, + "Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": { + "account_number": "6624" + }, + "Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": { + "account_number": "6625" + }, + "Suppl\u00e9ment familial": { + "account_number": "6626" + }, + "Avantages en nature": { + "account_number": "6627" + }, + "Autres r\u00e9mun\u00e9rations directes": { + "account_number": "6628" + }, + "account_number": "662" + }, + "Indemnit\u00e9s forfaitaires vers\u00e9es au personnel": { + "Indemnit\u00e9s de logement": { + "account_number": "6631" + }, + "Indemnit\u00e9s de repr\u00e9sentation": { + "account_number": "6632" + }, + "Indemnit\u00e9s d\u2019expatriation": { + "account_number": "6633" + }, + "Indemnit\u00e9s de transport": { + "account_number": "6634" + }, + "Autres indemnit\u00e9s et avantages divers": { + "account_number": "6638" + }, + "account_number": "663" + }, + "Charges sociales": { + "Charges sociales sur r\u00e9mun\u00e9ration du personnel national": { + "account_number": "6641" + }, + "Charges sociales sur r\u00e9mun\u00e9ration du personnel non national": { + "account_number": "6642" + }, + "account_number": "664" + }, + "R\u00e9mun\u00e9rations et charges sociales de l\u2019exploitant individuel": { + "R\u00e9mun\u00e9ration du travail de l\u2019exploitant": { + "account_number": "6661" + }, + "Charges sociales": { + "account_number": "6662" + }, + "account_number": "666" + }, + "R\u00e9mun\u00e9ration transf\u00e9r\u00e9e de personnel ext\u00e9rieur": { + "Personnel int\u00e9rimaire": { + "account_number": "6671" + }, + "Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": { + "account_number": "6672" + }, + "account_number": "667" + }, + "Autres charges sociales": { + "Versements aux syndicats et comit\u00e9s d\u2019entreprise, d\u2019\u00e9tablissement": { + "account_number": "6681" + }, + "Versements aux comit\u00e9s d\u2019hygi\u00e8ne et de s\u00e9curit\u00e9": { + "account_number": "6682" + }, + "Versements et contributions aux autres \u0153uvres sociales": { + "account_number": "6683" + }, + "M\u00e9decine du travail et pharmacie": { + "account_number": "6684" + }, + "Assurances et organismes de sant\u00e9": { + "account_number": "6685" + }, + "Assurances retraite et fonds de pension": { + "account_number": "6686" + }, + "Majorations et p\u00e9nalit\u00e9s sociales": { + "account_number": "6687" + }, + "Charges sociales diverses": { + "account_number": "6688" + }, + "account_number": "668" + }, + "account_number": "66" + }, + "Frais financiers et charges assimil\u00e9es": { + "Int\u00e9r\u00eats des emprunts": { + "Emprunts obligataires": { + "account_number": "6711" + }, + "Emprunts aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": { + "account_number": "6712" + }, + "Dettes li\u00e9es \u00e0 des participations": { + "account_number": "6713" + }, + "Primes de remboursement des obligations": { + "account_number": "6714" + }, + "account_number": "671" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition": { + "Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail immobilier": { + "account_number": "6722" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail mobilier": { + "account_number": "6723" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition / location-vente": { + "account_number": "6724" + }, + "Int\u00e9r\u00eats dans loyers des autres locations acquisition": { + "account_number": "6728" + }, + "account_number": "672" + }, + "Escomptes accord\u00e9s": { + "account_number": "673" + }, + "Autres int\u00e9r\u00eats": { + "Avances re\u00e7ues et d\u00e9p\u00f4ts cr\u00e9diteurs": { + "account_number": "6741" + }, + "Comptes courants bloqu\u00e9s": { + "account_number": "6742" + }, + "Int\u00e9r\u00eats sur obligations cautionn\u00e9es": { + "account_number": "6743" + }, + "Int\u00e9r\u00eats sur dettes commerciales": { + "account_number": "6744" + }, + "Int\u00e9r\u00eats bancaires et sur op\u00e9rations de financement (escompte...)": { + "account_number": "6745" + }, + "Int\u00e9r\u00eats sur dettes diverses": { + "account_number": "6748" + }, + "account_number": "674" + }, + "Escomptes des effets de commerce": { + "account_number": "675" + }, + "Pertes de change financi\u00e8res": { + "account_number": "676" + }, + "Pertes sur titres de placement": { + "Pertes sur cessions de titres de placement": { + "account_number": "6771" + }, + "Mali provenant d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": { + "account_number": "6772" + }, + "account_number": "677" + }, + "Pertes et charges sur risques financiers": { + "Sur rentes viag\u00e8res": { + "account_number": "6781" + }, + "Sur op\u00e9rations financi\u00e8res": { + "account_number": "6782" + }, + "Sur instruments de tr\u00e9sorerie": { + "account_number": "6784" + }, + "account_number": "678" + }, + "Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "Sur risques financiers": { + "account_number": "6791" + }, + "Sur titres de placement": { + "account_number": "6795" + }, + "Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "account_number": "6798" + }, + "account_number": "679" + }, + "account_number": "67" + }, + "Dotations aux amortissements": { + "Dotations aux amortissements d\u2019exploitation": { + "Dotations aux amortissements des immobilisations incorporelles": { + "account_number": "6812" + }, + "Dotations aux amortissements des immobilisations corporelles": { + "account_number": "6813" + }, + "account_number": "681" + }, + "account_number": "68" + }, + "Dotations aux provisions et aux d\u00e9pr\u00e9ciations": { + "Dotations aux provisions et aux d\u00e9pr\u00e9ciations d\u2019exploitation": { + "Dotations aux provisions pour risques et charges": { + "account_number": "6911" + }, + "Dotations aux d\u00e9pr\u00e9ciations des immobilisations incorporelles": { + "account_number": "6913" + }, + "Dotations aux d\u00e9pr\u00e9ciations des immobilisations corporelles": { + "account_number": "6914" + }, + "account_number": "691" + }, + "Dotations aux provisions et aux d\u00e9pr\u00e9ciations financi\u00e8res": { + "Dotations aux provisions pour risques et charges": { + "account_number": "6971" + }, + "Dotations aux d\u00e9pr\u00e9ciations des immobilisations financi\u00e8res": { + "account_number": "6972" + }, + "account_number": "697" + }, + "account_number": "69" + }, + "root_type": "Expense", + "account_number": "6" + }, + "Comptes de produits des activit\u00e9s ordinaires": { + "Ventes": { + "Ventes de marchandises": { + "Dans la R\u00e9gion": { + "account_number": "7011" + }, + "Hors R\u00e9gion": { + "account_number": "7012" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7013" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7014" + }, + "Sur internet": { + "account_number": "7015" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7019" + }, + "account_number": "701" + }, + "Ventes de produits finis": { + "Dans la R\u00e9gion": { + "account_number": "7021" + }, + "Hors R\u00e9gion": { + "account_number": "7022" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7023" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7024" + }, + "Sur internet": { + "account_number": "7025" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7029" + }, + "account_number": "702" + }, + "Ventes de produits interm\u00e9diaires": { + "Dans la R\u00e9gion": { + "account_number": "7031" + }, + "Hors R\u00e9gion": { + "account_number": "7032" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7033" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7034" + }, + "Sur internet": { + "account_number": "7035" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7039" + }, + "account_number": "703" + }, + "Ventes de produits r\u00e9siduels": { + "Dans la R\u00e9gion": { + "account_number": "7041" + }, + "Hors R\u00e9gion": { + "account_number": "7042" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7043" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7044" + }, + "Sur internet": { + "account_number": "7045" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7049" + }, + "account_number": "704" + }, + "Travaux factur\u00e9s": { + "Dans la R\u00e9gion": { + "account_number": "7051" + }, + "Hors R\u00e9gion": { + "account_number": "7052" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7053" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7054" + }, + "Sur internet": { + "account_number": "7055" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7059" + }, + "account_number": "705" + }, + "Services vendus": { + "Dans la R\u00e9gion": { + "account_number": "7061" + }, + "Hors R\u00e9gion": { + "account_number": "7062" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7063" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7064" + }, + "Sur internet": { + "account_number": "7065" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7069" + }, + "account_number": "706" + }, + "Produits accessoires": { + "Ports, emballages perdus et autres frais factur\u00e9s": { + "account_number": "7071" + }, + "Commissions et courtages": { + "account_number": "7072" + }, + "Locations": { + "account_number": "7073" + }, + "Bonis sur reprises et cessions d\u2019emballages": { + "account_number": "7074" + }, + "Mise \u00e0 disposition de personnel": { + "account_number": "7075" + }, + "Redevances pour brevets, logiciels, marques et droits similaires": { + "account_number": "7076" + }, + "Services exploit\u00e9s dans l\u2019int\u00e9r\u00eat du personnel": { + "account_number": "7077" + }, + "Autres produits accessoires": { + "account_number": "7078" + }, + "account_number": "707" + }, + "account_number": "70" + }, + "Subventions d\u2019exploitation": { + "Sur produits \u00e0 l\u2019exportation": { + "account_number": "711" + }, + "Sur produits \u00e0 l\u2019importation": { + "account_number": "712" + }, + "Sur produits de p\u00e9r\u00e9quation": { + "account_number": "713" + }, + "Indemnit\u00e9s et subventions d\u2019exploitation (entit\u00e9 agricole)": { + "account_number": "714" + }, + "Autres subventions d\u2019exploitation": { + "Vers\u00e9es par l\u2019\u00c9tat et les collectivit\u00e9s publiques": { + "account_number": "7181" + }, + "Vers\u00e9es par les organismes internationaux": { + "account_number": "7182" + }, + "Vers\u00e9es par des tiers": { + "account_number": "7183" + }, + "account_number": "718" + }, + "account_number": "71" + }, + "Production immobilis\u00e9e": { + "Immobilisations incorporelles": { + "account_number": "721" + }, + "Immobilisations corporelles": { + "Immobilisations corporelles (hors actifs biologiques)": { + "account_number": "7221" + }, + "Immobilisations corporelles (actifs biologiques)": { + "account_number": "7222" + }, + "account_number": "722" + }, + "Production auto-consomm\u00e9e": { + "account_number": "724" + }, + "Immobilisations financi\u00e8res": { + "account_number": "726" + }, + "account_number": "72" + }, + "Variations des stocks de biens et de services produits": { + "Variations des stocks de produits en cours": { + "Produits en cours": { + "account_number": "7341" + }, + "Travaux en cours": { + "account_number": "7342" + }, + "account_number": "734" + }, + "Variations des en-cours de services": { + "\u00c9tudes en cours": { + "account_number": "7351" + }, + "Prestations de services en cours": { + "account_number": "7352" + }, + "account_number": "735" + }, + "Variations des stocks de produits finis": { + "account_number": "736" + }, + "Variations des stocks de produits interm\u00e9diaires et r\u00e9siduels": { + "Produits interm\u00e9diaires": { + "account_number": "7371" + }, + "Produits r\u00e9siduels": { + "account_number": "7372" + }, + "account_number": "737" + }, + "account_number": "73" + }, + "Autres produits": { + "Profits sur cr\u00e9ances clients et autres d\u00e9biteurs": { + "account_number": "751" + }, + "Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "Quote-part transf\u00e9r\u00e9e de pertes (comptabilit\u00e9 du g\u00e9rant)": { + "account_number": "7521" + }, + "B\u00e9n\u00e9fices attribu\u00e9s par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": { + "account_number": "7525" + }, + "account_number": "752" + }, + "Produits des cessions courantes d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "7541" + }, + "Immobilisations corporelles": { + "account_number": "7542" + }, + "account_number": "754" + }, + "Gains de change sur cr\u00e9ances et dettes commerciales": { + "account_number": "756" + }, + "Produits divers": { + "Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": { + "account_number": "7581" + }, + "Indemnit\u00e9s d\u2019assurances re\u00e7ues": { + "account_number": "7582" + }, + "Autres produits divers": { + "account_number": "7588" + }, + "account_number": "758" + }, + "Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "Sur risques \u00e0 court terme": { + "account_number": "7591" + }, + "Sur stocks": { + "account_number": "7593" + }, + "Sur cr\u00e9ances": { + "account_number": "7594" + }, + "Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "account_number": "7598" + }, + "account_number": "759" + }, + "account_number": "75" + }, + "Revenus financiers et produits assimil\u00e9s": { + "Int\u00e9r\u00eats de pr\u00eats et cr\u00e9ances diverses": { + "Int\u00e9r\u00eats de pr\u00eats": { + "account_number": "7712" + }, + "Int\u00e9r\u00eats sur cr\u00e9ances diverses": { + "account_number": "7713" + }, + "account_number": "771" + }, + "Revenus de participations et autres titres immobilis\u00e9s": { + "Revenus des titres de participation": { + "account_number": "7721" + }, + "Revenus autres titres immobilis\u00e9s": { + "account_number": "7722" + }, + "account_number": "772" + }, + "Escomptes obtenus": { + "account_number": "773" + }, + "Revenus de placement": { + "Revenus des obligations": { + "account_number": "7745" + }, + "Revenus des titres de placement": { + "account_number": "7746" + }, + "account_number": "774" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition": { + "account_number": "775" + }, + "Gains de change financiers": { + "account_number": "776" + }, + "Gains sur cessions de titres de placement": { + "account_number": "777" + }, + "Gains sur risques financiers": { + "Sur rentes viag\u00e8res": { + "account_number": "7781" + }, + "Sur op\u00e9rations financi\u00e8res": { + "account_number": "7782" + }, + "Sur instruments de tr\u00e9sorerie": { + "account_number": "7784" + }, + "account_number": "778" + }, + "Reprises de charges pour d\u00e9pr\u00e9ciations et provisions \u00e0 court terme financi\u00e8res": { + "Sur risques financiers": { + "account_number": "7791" + }, + "Sur titres de placement": { + "account_number": "7795" + }, + "Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "account_number": "7798" + }, + "account_number": "779" + }, + "account_number": "77" + }, + "Transferts de charges": { + "Transferts de charges d\u2019exploitation": { + "account_number": "781" + }, + "Transferts de charges financi\u00e8res": { + "account_number": "787" + }, + "account_number": "78" + }, + "Reprises de provisions, de d\u00e9pr\u00e9ciations et autres": { + "Reprises de provisions et d\u00e9pr\u00e9ciations d\u2019exploitation": { + "Pour risques et charges": { + "account_number": "7911" + }, + "Des immobilisations incorporelles": { + "account_number": "7913" + }, + "Des immobilisations corporelles": { + "account_number": "7914" + }, + "account_number": "791" + }, + "Reprises de provisions et d\u00e9pr\u00e9ciations financi\u00e8res": { + "Pour risques et charges": { + "account_number": "7971" + }, + "Des immobilisations financi\u00e8res": { + "account_number": "7972" + }, + "account_number": "797" + }, + "Reprises d\u2019amortissements": { + "account_number": "798" + }, + "Reprises de subventions d\u2019investissement": { + "account_number": "799" + }, + "account_number": "79" + }, + "root_type": "Income", + "account_number": "7" + }, + "8-Comptes des autres charges et des autres produits (CHARGES)": { + "Valeurs comptables des cessions d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "811" + }, + "Immobilisations corporelles": { + "account_number": "812" + }, + "Immobilisations financi\u00e8res": { + "account_number": "816" + }, + "account_number": "81" + }, + "Charges hors activit\u00e9s ordinaires": { + "Charges HAO constat\u00e9es": { + "account_number": "831" + }, + "Charges li\u00e9es aux op\u00e9rations de restructuration": { + "account_number": "833" + }, + "Pertes sur cr\u00e9ances HAO": { + "account_number": "834" + }, + "Dons et lib\u00e9ralit\u00e9s accord\u00e9s": { + "account_number": "835" + }, + "Abandons de cr\u00e9ances consentis": { + "account_number": "836" + }, + "Charges li\u00e9es aux op\u00e9rations de liquidation": { + "account_number": "837" + }, + "Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": { + "account_number": "839" + }, + "account_number": "83" + }, + "Dotations hors activit\u00e9s ordinaires": { + "Dotations aux provisions r\u00e9glement\u00e9es": { + "account_number": "851" + }, + "Dotations aux amortissements HAO": { + "account_number": "852" + }, + "Dotations aux d\u00e9pr\u00e9ciations HAO": { + "account_number": "853" + }, + "Dotations aux provisions pour risques et charges HAO": { + "account_number": "854" + }, + "Autres dotations HAO": { + "account_number": "858" + }, + "account_number": "85" + }, + "Participation des travailleurs": { + "Participation l\u00e9gale aux b\u00e9n\u00e9fices": { + "account_number": "871" + }, + "Participation contractuelle aux b\u00e9n\u00e9fices": { + "account_number": "874" + }, + "Autres participations": { + "account_number": "878" + }, + "account_number": "87" + }, + "Imp\u00f4ts sur le r\u00e9sultat": { + "Imp\u00f4ts sur les b\u00e9n\u00e9fices de l\u2019exercice": { + "Activit\u00e9s exerc\u00e9es dans l\u2019\u00c9tat": { + "account_number": "8911" + }, + "Activit\u00e9s exerc\u00e9es dans les autres \u00c9tats de la R\u00e9gion": { + "account_number": "8912" + }, + "Activit\u00e9s exerc\u00e9es hors R\u00e9gion": { + "account_number": "8913" + }, + "account_number": "891" + }, + "Rappel d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": { + "account_number": "892" + }, + "Imp\u00f4t minimum forfaitaire IMF": { + "account_number": "895" + }, + "D\u00e9gr\u00e8vements et annulations d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": { + "D\u00e9gr\u00e8vements": { + "account_number": "8991" + }, + "Annulations pour pertes r\u00e9troactives": { + "account_number": "8994" + }, + "account_number": "899" + }, + "account_number": "89" + }, + "root_type": "Expense" + }, + "8-Comptes des autres charges et des autres produits (PRODUITS)": { + "Produits des cessions d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "821" + }, + "Immobilisations corporelles": { + "account_number": "822" + }, + "Immobilisations financi\u00e8res": { + "account_number": "826" + }, + "account_number": "82" + }, + "Produits hors activit\u00e9s ordinaires": { + "Produits HAO constat\u00e9s": { + "account_number": "841" + }, + "Produits li\u00e9s aux op\u00e9rations de restructuration": { + "account_number": "843" + }, + "Indemnit\u00e9s et subventions HAO (entit\u00e9 agricole)": { + "account_number": "844" + }, + "Dons et lib\u00e9ralit\u00e9s obtenus": { + "account_number": "845" + }, + "Abandons de cr\u00e9ances obtenus": { + "account_number": "846" + }, + "Produits li\u00e9s aux op\u00e9rations de liquidation": { + "account_number": "847" + }, + "Transferts de charges HAO": { + "account_number": "848" + }, + "Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": { + "account_number": "849" + }, + "account_number": "84" + }, + "Reprises de charges, provisions et d\u00e9pr\u00e9ciations HAO": { + "Reprises de provisions r\u00e9glement\u00e9es": { + "account_number": "861" + }, + "Reprises d\u2019amortissements HAO": { + "account_number": "862" + }, + "Reprises de d\u00e9pr\u00e9ciations HAO": { + "account_number": "863" + }, + "Reprises de provisions pour risques et charges HAO": { + "account_number": "864" + }, + "Autres reprises HAO": { + "account_number": "868" + }, + "account_number": "86" + }, + "Subventions d\u2019\u00e9quilibre": { + "\u00c9tat": { + "account_number": "881" + }, + "Collectivit\u00e9s publiques": { + "account_number": "884" + }, + "Groupe": { + "account_number": "886" + }, + "Autres": { + "account_number": "888" + }, + "account_number": "88" + }, + "root_type": "Income" + } + } +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/cm_plan_comptable.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/cm_plan_comptable.json new file mode 100644 index 00000000000..7ca9888457e --- /dev/null +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/cm_plan_comptable.json @@ -0,0 +1,1919 @@ +{ + "country_code": "cm", + "name": "Syscohada - Plan Comptable", + "tree": { + "1-Comptes de ressources durables": { + "10-Capital": { + "101-Capital social": { + "1011-Capital souscrit, non appel\u00e9": {}, + "1012-Capital souscrit, appel\u00e9, non vers\u00e9": {}, + "1013-Capital souscrit, appel\u00e9, vers\u00e9, non amorti": {}, + "1014-Capital souscrit, appel\u00e9, vers\u00e9, amorti": {}, + "1018-Capital souscrit soumis \u00e0 des conditions particuli\u00e8res": {} + }, + "102-Capital par dotation": { + "1021-Dotation initiale": {}, + "1022-Dotations compl\u00e9mentaires": {}, + "1028-Autres dotations": {} + }, + "103-Capital personnel": {}, + "104-Compte de l\u2019exploitant": { + "1041-Apports temporaires": {}, + "1042-Op\u00e9rations courantes": {}, + "1043-R\u00e9mun\u00e9rations, imp\u00f4ts et autres charges personnelles": {}, + "1047-Pr\u00e9l\u00e8vements d\u2019autoconsommation": {}, + "1048-Autres pr\u00e9l\u00e8vements": {} + }, + "105-Primes li\u00e9es au capital social": { + "1051-Primes d\u2019\u00e9mission": {}, + "1052-Primes d\u2019apport": {}, + "1053-Primes de fusion": {}, + "1054-Primes de conversion": {}, + "1058-Autres primes": {} + }, + "106-\u00c9carts de r\u00e9\u00e9valuation": { + "1061-\u00c9carts de r\u00e9\u00e9valuation l\u00e9gale": {}, + "1062-\u00c9carts de r\u00e9\u00e9valuation libre": {} + }, + "109-Apporteurs, capital souscrit, non appel\u00e9": {} + }, + "11-R\u00e9serves": { + "111-R\u00e9serve l\u00e9gale": {}, + "112-R\u00e9serves statutaires ou contractuelles": {}, + "113-R\u00e9serves r\u00e9glement\u00e9es": { + "1131-R\u00e9serves de plus-values nettes \u00e0 long terme": {}, + "1132-R\u00e9serves d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": {}, + "1133-R\u00e9serves cons\u00e9cutives \u00e0 l\u2019octroi de subventions d\u2019investissement": {}, + "1134-R\u00e9serves des valeurs mobili\u00e8res donnant acc\u00e8s au capital": {}, + "1135-Autres r\u00e9serves r\u00e9glement\u00e9es": {} + }, + "118-Autres r\u00e9serves": { + "1181-R\u00e9serves facultatives": {}, + "1188-R\u00e9serves diverses": {} + } + }, + "12-Report \u00e0 nouveau": { + "121-Report \u00e0 nouveau cr\u00e9diteur": {}, + "129-Report \u00e0 nouveau d\u00e9biteur": { + "1291-Perte nette \u00e0 reporter": {}, + "1292-Perte Amortissements r\u00e9put\u00e9s diff\u00e9r\u00e9s": {} + } + }, + "13-R\u00e9sultat net de l\u2019exercice": { + "130-R\u00e9sultat en instance d\u2019affectation": { + "1301-R\u00e9sultat en instance d\u2019affectation : b\u00e9n\u00e9fice": {}, + "1309-R\u00e9sultat en instance d\u2019affectation : perte": {} + }, + "131-R\u00e9sultat net : b\u00e9n\u00e9fice": {}, + "132-Marge commerciale (MC)": {}, + "133-Valeur ajout\u00e9e (VA)": {}, + "134-Exc\u00e9dent brut d\u2019exploitation (EBE)": {}, + "135-R\u00e9sultat d\u2019exploitation (RE)": {}, + "136-R\u00e9sultat financier (RF)": {}, + "137-R\u00e9sultat des activit\u00e9s ordinaires (RAO)": {}, + "138-R\u00e9sultat hors activit\u00e9s ordinaires (RHAO)": { + "1381-R\u00e9sultat de fusion": {}, + "1382-R\u00e9sultat d\u2019apport partiel d\u2019actif": {}, + "1383-R\u00e9sultat de scission": {}, + "1384-R\u00e9sultat de liquidation": {} + }, + "139-R\u00e9sultat net : perte": {} + }, + "14-Subventions d\u2019investissement": { + "141-Subventions d\u2019\u00e9quipement": { + "1411-\u00c9tat": {}, + "1412-R\u00e9gions": {}, + "1413-D\u00e9partements": {}, + "1414-Communes et collectivit\u00e9s publiques d\u00e9centralis\u00e9es": {}, + "1415-Entit\u00e9s publiques ou mixtes": {}, + "1416-Entit\u00e9s et organismes priv\u00e9s": {}, + "1417-Organismes internationaux": {}, + "1418-Autres": {} + }, + "148-Autres subventions d\u2019investissement": {} + }, + "15-Provisions r\u00e9glement\u00e9es et fonds assimil\u00e9s": { + "151-Amortissements d\u00e9rogatoires": {}, + "152-Plus-values de cession \u00e0 r\u00e9investir": {}, + "153-Fonds r\u00e9glement\u00e9s": { + "1531-Fonds National": {}, + "1532-Pr\u00e9l\u00e8vement pour le Budget": {} + }, + "154-Provisions sp\u00e9ciales de r\u00e9\u00e9valuation": {}, + "155-Provisions r\u00e9glement\u00e9es relatives aux immobilisations": { + "1551-Reconstitution des gisements miniers et p\u00e9troliers": {} + }, + "156-Provisions r\u00e9glement\u00e9es relatives aux stocks": { + "1561-Hausse de prix": {}, + "1562-Fluctuation des cours": {} + }, + "157-Provisions pour investissement": {}, + "158-Autres provisions et fonds r\u00e9glement\u00e9s": {} + }, + "16-Emprunts et dettes assimil\u00e9es": { + "161-Emprunts obligataires": { + "1611-Emprunts obligataires ordinaires": {}, + "1612-Emprunts obligataires convertibles en actions": {}, + "1613-Emprunts obligataires remboursables en actions": {}, + "1618-Autres emprunts obligataires": {} + }, + "162-Emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": {}, + "163-Avances re\u00e7ues de l\u2019\u00c9tat": {}, + "164-Avances re\u00e7ues et comptes courants bloqu\u00e9s": {}, + "165-D\u00e9p\u00f4ts et cautionnements re\u00e7us": { + "1651-D\u00e9p\u00f4ts": {}, + "1652-Cautionnements": {} + }, + "166-Int\u00e9r\u00eats courus": { + "1661-Sur emprunts obligataires": {}, + "1662-Sur emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": {}, + "1663-Sur avances re\u00e7ues de l\u2019\u00c9tat": {}, + "1664-Sur avances re\u00e7ues et comptes courants bloqu\u00e9s": {}, + "1665-Sur d\u00e9p\u00f4ts et cautionnements re\u00e7us": {}, + "1667-Sur avances assorties de conditions particuli\u00e8res": {}, + "1668-Sur autres emprunts et dettes": {} + }, + "167-Avances assorties de conditions particuli\u00e8res": { + "1671-Avances bloqu\u00e9es pour augmentation du capital": {}, + "1672-Avances conditionn\u00e9es par l\u2019\u00c9tat": {}, + "1673-Avances conditionn\u00e9es par les autres organismes africains": {}, + "1674-Avances conditionn\u00e9es par les organismes internationaux": {} + }, + "168-Autres emprunts et dettes": { + "1681-Rentes viag\u00e8res capitalis\u00e9es": {}, + "1682-Billets de fonds": {}, + "1683-Dettes cons\u00e9cutives \u00e0 des titres emprunt\u00e9s": {}, + "1684-Emprunts participatifs": {}, + "1685-Participation des travailleurs aux b\u00e9n\u00e9fices": {}, + "1686-Emprunts et dettes contract\u00e9s aupr\u00e8s des autres tiers": {} + } + }, + "17-Dettes de location acquisition": { + "172-Dettes de location acquisition / cr\u00e9dit bail immobilier": {}, + "173-Dettes de location acquisition / cr\u00e9dit bail mobilier": {}, + "174-Dettes de location acquisition / location de vente": {}, + "176-Int\u00e9r\u00eats courus": { + "1762-Sur dettes de location acquisition / cr\u00e9dit-bail immobilier": {}, + "1763-Sur dettes de location acquisition / cr\u00e9dit-bail mobilier": {}, + "1764-Sur dettes de location acquisition / location-vente": {}, + "1768-Sur autres dettes de location acquisition": {} + }, + "178-Autres dettes de location acquisition": {} + }, + "18-Dettes li\u00e9es \u00e0 des participations et comptes de liaison des \u00e9tablissements et soci\u00e9t\u00e9s en participation": { + "181-Dettes li\u00e9es \u00e0 des participations": { + "1811-Dettes li\u00e9es \u00e0 des participations (groupe)": {}, + "1812-Dettes li\u00e9es \u00e0 des participations (hors groupe)": {} + }, + "182-Dettes li\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": {}, + "183-Int\u00e9r\u00eats courus sur dettes li\u00e9es \u00e0 des participations": {}, + "184-Comptes permanents bloqu\u00e9s des \u00e9tablissements et succursales": {}, + "185-Comptes permanents non bloqu\u00e9s des \u00e9tablissements et succursales": {}, + "186-Comptes de liaison charges": {}, + "187-Comptes de liaison produits": {}, + "188-Comptes de liaison des soci\u00e9t\u00e9s en participation": {} + }, + "19-Provisions pour risques et charges": { + "191-Provisions pour litiges": {}, + "192-Provisions pour garanties donn\u00e9es aux clients": {}, + "193-Provisions pour pertes sur march\u00e9s \u00e0 ach\u00e8vement futur": {}, + "194-Provisions pour pertes de change": {}, + "195-Provisions pour imp\u00f4ts": {}, + "196-Provisions pour pensions et obligations similaires": { + "1961-Provisions pour pensions et obligations similaires engagement de retraite": {}, + "1962-Actif du r\u00e9gime de retraite": {} + }, + "197-Provisions pour restructuration": {}, + "198-Autres provisions pour risques et charges": { + "1981-Provisions pour amendes et p\u00e9nalit\u00e9s": {}, + "1983-Provisions pour propre assureur": {}, + "1984-Provisions pour d\u00e9mant\u00e8lement et remise en \u00e9tat": {}, + "1985-Provisions pour droits \u00e0 r\u00e9duction ou avantage en nature (ch\u00e8ques cadeau, cartes de fid\u00e9lit\u00e9...)": {}, + "1988-Provisions pour divers risques et charges": {} + } + }, + "root_type": "Equity" + }, + "2-Comptes d\u2019actif immobilis\u00e9": { + "21-Immobilisations incorporelles": { + "account_type": "Fixed Asset", + "211-Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset" + }, + "212-Brevets, licences, concessions et droits similaires": { + "account_type": "Fixed Asset", + "2121-Brevets": { + "account_type": "Fixed Asset" + }, + "2122-Licences": { + "account_type": "Fixed Asset" + }, + "2123-Concessions de service public": { + "account_type": "Fixed Asset" + }, + "2128-Autres concessions et droits similaires": { + "account_type": "Fixed Asset" + } + }, + "213-Logiciels et sites internet": { + "account_type": "Fixed Asset", + "2131-Logiciels": { + "account_type": "Fixed Asset" + }, + "2132-Sites internet": { + "account_type": "Fixed Asset" + } + }, + "214-Marques": { + "account_type": "Fixed Asset" + }, + "215-Fonds commercial": { + "account_type": "Fixed Asset" + }, + "216-Droit au bail": { + "account_type": "Fixed Asset" + }, + "217-Investissements de cr\u00e9ation": { + "account_type": "Fixed Asset" + }, + "218-Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset", + "2181-Frais de prospection et d\u2019\u00e9valuation de ressources min\u00e9rales": { + "account_type": "Fixed Asset" + }, + "2182-Co\u00fbts d\u2019obtention du contrat": { + "account_type": "Fixed Asset" + }, + "2183-Fichiers clients, notices, titres de journaux et magazines": { + "account_type": "Fixed Asset" + }, + "2184-Co\u00fbts des franchises": { + "account_type": "Fixed Asset" + }, + "2188-Divers droits et valeurs incorporelles": { + "account_type": "Fixed Asset" + } + }, + "219-Immobilisations incorporelles en cours": { + "account_type": "Fixed Asset", + "2191-Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset" + }, + "2193-Logiciels et internet": { + "account_type": "Fixed Asset" + }, + "2198-Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset" + } + } + }, + "22-Terrains": { + "account_type": "Fixed Asset", + "221-Terrains agricoles et forestiers": { + "account_type": "Fixed Asset", + "2211-Terrains d\u2019exploitation agricole": { + "account_type": "Fixed Asset" + }, + "2212-Terrains d\u2019exploitation foresti\u00e8re": { + "account_type": "Fixed Asset" + }, + "2218-Autres terrains": { + "account_type": "Fixed Asset" + } + }, + "222-Terrains nus": { + "account_type": "Fixed Asset", + "2221-Terrains \u00e0 b\u00e2tir": { + "account_type": "Fixed Asset" + }, + "2228-Autres terrains nus": { + "account_type": "Fixed Asset" + } + }, + "223-Terrains b\u00e2tis": { + "account_type": "Fixed Asset", + "2231-Pour b\u00e2timents industriels et agricoles": { + "account_type": "Fixed Asset" + }, + "2232-Pour b\u00e2timents administratifs et commerciaux": { + "account_type": "Fixed Asset" + }, + "2234-Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations professionnelles": { + "account_type": "Fixed Asset" + }, + "2235-Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations non professionnelles": { + "account_type": "Fixed Asset" + }, + "2238-Autres terrains b\u00e2tis": { + "account_type": "Fixed Asset" + } + }, + "224-Travaux de mise en valeur des terrains": { + "account_type": "Fixed Asset", + "2241-Plantation d\u2019arbres et d\u2019arbustes": { + "account_type": "Fixed Asset" + }, + "2245-Am\u00e9liorations du fonds": { + "account_type": "Fixed Asset" + }, + "2248-Autres travaux": { + "account_type": "Fixed Asset" + } + }, + "225-Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset", + "2251-Carri\u00e8res": { + "account_type": "Fixed Asset" + } + }, + "226-Terrains am\u00e9nag\u00e9s": { + "account_type": "Fixed Asset", + "2261-Parkings": { + "account_type": "Fixed Asset" + } + }, + "227-Terrains mis en concession": { + "account_type": "Fixed Asset" + }, + "228-Autres terrains": { + "account_type": "Fixed Asset", + "2281-Terrains immeubles de placement": { + "account_type": "Fixed Asset" + }, + "2285-Terrains des logements affect\u00e9s au personnel": { + "account_type": "Fixed Asset" + }, + "2286-Terrains de location acquisition": { + "account_type": "Fixed Asset" + }, + "2288-Divers terrains": { + "account_type": "Fixed Asset" + } + }, + "229-Am\u00e9nagements de terrains en cours": { + "account_type": "Fixed Asset", + "2291-Terrains agricoles et forestiers": { + "account_type": "Fixed Asset" + }, + "2292-Terrains nus": { + "account_type": "Fixed Asset" + }, + "2295-Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset" + }, + "2298-Autres terrains": { + "account_type": "Fixed Asset" + } + } + }, + "23-B\u00e2timents, installations techniques et agencements": { + "231-B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "2311-B\u00e2timents industriels": {}, + "2312-B\u00e2timents agricoles": {}, + "2313-B\u00e2timents administratifs et commerciaux": {}, + "2314-B\u00e2timents affect\u00e9s au logement du personnel": {}, + "2315-B\u00e2timents immeubles de placement": {}, + "2316-B\u00e2timents de location acquisition": {} + }, + "232-B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "2321-B\u00e2timents industriels": {}, + "2322-B\u00e2timents agricoles": {}, + "2323-B\u00e2timents administratifs et commerciaux": {}, + "2324-B\u00e2timents affect\u00e9s au logement du personnel": {}, + "2325-B\u00e2timents immeubles de placement": {}, + "2326-B\u00e2timents de location acquisition": {} + }, + "233-Ouvrages d\u2019infrastructure": { + "2331-Voies de terre": {}, + "2332-Voies de fer": {}, + "2333-Voies d\u2019eau": {}, + "2334-Barrages, Digues": {}, + "2335-Pistes d\u2019a\u00e9rodrome": {}, + "2338-Autres ouvrages d\u2019infrastructures": {} + }, + "234-Am\u00e9nagements, agencements et installations techniques": { + "2341-Installations complexes sp\u00e9cialis\u00e9es sur sol propre": {}, + "2342-Installations complexes sp\u00e9cialis\u00e9es sur sol d\u2019autrui": {}, + "2343-Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol propre": {}, + "2344-Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol d\u2019autrui": {}, + "2345-Am\u00e9nagements et agencements des b\u00e2timents": {} + }, + "235-Am\u00e9nagements de bureaux": { + "2351-Installations g\u00e9n\u00e9rales": {}, + "2358-Autres am\u00e9nagements de bureaux": {} + }, + "237-B\u00e2timents industriels, agricoles et commerciaux mis en concession": {}, + "238-Autres installations et agencements": {}, + "239-B\u00e2timents am\u00e9nagements, agencements et installations en cours": { + "2391-B\u00e2timents en cours": {}, + "2392-Installations en cours": {}, + "2393-Ouvrages d\u2019infrastructure en cours": {}, + "2394-Am\u00e9nagements et agencements et installations techniques en cours": {}, + "2395-Am\u00e9nagements de bureaux en cours": {}, + "2398-Autres installations et agencements en cours": {} + } + }, + "24-Mat\u00e9riel, mobilier et actifs biologiques": { + "241-Mat\u00e9riel et outillage industriel et commercial": { + "2411-Mat\u00e9riel industriel": {}, + "2412-Outillage industriel": {}, + "2413-Mat\u00e9riel commercial": {}, + "2414-Outillage commercial": {}, + "2416-Mat\u00e9riel & outillage industriel et commercial de location-acquisition": {} + }, + "242-Mat\u00e9riel et outillage agricole": { + "2421-Mat\u00e9riel agricole": {}, + "2422-Outillage agricole": {}, + "2426-Mat\u00e9riel & outillage agricole de location-acquisition": {} + }, + "243-Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "244-Mat\u00e9riel et mobilier": { + "2441-Mat\u00e9riel de bureau": {}, + "2442-Mat\u00e9riel informatique": {}, + "2443-Mat\u00e9riel bureautique": {}, + "2444-Mobilier de bureau": {}, + "2445-Mat\u00e9riel et mobilier immeubles de placement": {}, + "2446-Mat\u00e9riel et mobilier de location acquisition": {}, + "2447-Mat\u00e9riel et mobilier des logements du personnel": {} + }, + "245-Mat\u00e9riel de transport": { + "2451-Mat\u00e9riel automobile": {}, + "2452-Mat\u00e9riel ferroviaire": {}, + "2453-Mat\u00e9riel fluvial, lagunaire": {}, + "2454-Mat\u00e9riel naval": {}, + "2455-Mat\u00e9riel a\u00e9rien": {}, + "2456-Mat\u00e9riel de transport de location-acquisition": {}, + "2457-Mat\u00e9riel hippomobile": {}, + "2458-Autres mat\u00e9riels de transport": {} + }, + "246-Actifs biologiques": { + "2461-Cheptel, animaux de trait": {}, + "2462-Cheptel, animaux reproducteurs": {}, + "2463-Animaux de garde": {}, + "2465-Plantations agricoles": {}, + "2468-Autres actifs biologiques": {} + }, + "247-Agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "2471-Agencements et am\u00e9nagements du mat\u00e9riel": {}, + "2472-Agencements et am\u00e9nagements des actifs biologiques": {}, + "2478-Autres agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": {} + }, + "248-Autres mat\u00e9riels et mobiliers": { + "2481-Collections et \u0153uvres d\u2019art": {}, + "2488-Divers mat\u00e9riels mobiliers": {} + }, + "249-Mat\u00e9riels et actifs biologiques en cours": { + "2491-Mat\u00e9riel et outillage industriel et commercial": {}, + "2492-Mat\u00e9riel et outillage agricole": {}, + "2493-Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "2494-Mat\u00e9riel et mobilier de bureau": {}, + "2495-Mat\u00e9riel de transport": {}, + "2496-Actifs biologiques": {}, + "2497-Agencements am\u00e9nagements du mat\u00e9riel et actifs biologiques": {}, + "2498-Autres mat\u00e9riels et actifs biologiques en cours": {} + } + }, + "25-Avances et acomptes vers\u00e9s sur immobilisations": { + "251-Avances et acomptes vers\u00e9s sur immobilisations incorporelles": {}, + "252-Avances et acomptes vers\u00e9s sur immobilisations corporelles": {} + }, + "26-Titres de participation": { + "261-Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": {}, + "262-Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le conjoint": {}, + "263-Titres de participation dans des soci\u00e9t\u00e9s conf\u00e9rant une influence notable": {}, + "265-Participations dans des organismes professionnels": {}, + "266-Parts dans des groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": {}, + "268-Autres titres de participation": {} + }, + "27-Autres immobilisations financi\u00e8res": { + "271-Pr\u00eats et cr\u00e9ances": { + "2711-Pr\u00eats participatifs": {}, + "2712-Pr\u00eats aux associ\u00e9s": {}, + "2713-Billets de fonds": {}, + "2714-Titres pr\u00eat\u00e9s": {}, + "2718-Autres pr\u00eats et cr\u00e9ances": {} + }, + "272-Pr\u00eats au personnel": { + "2721-Pr\u00eats immobiliers": {}, + "2722-Pr\u00eats mobiliers et d\u2019installation": {}, + "2728-Autres pr\u00eats au personnel": {} + }, + "273-Cr\u00e9ances sur l\u2019\u00c9tat": { + "2731-Retenues de garantie": {}, + "2733-Fonds r\u00e9glement\u00e9": {}, + "2734-Cr\u00e9ances sur le conc\u00e9dant": {}, + "2738-Autres cr\u00e9ances sur l\u2019\u00c9tat": {} + }, + "274-Titres immobilis\u00e9s": { + "2741-Titres immobilis\u00e9s de l\u2019activit\u00e9 de portefeuille (TIAP)": {}, + "2742-Titres participatifs": {}, + "2743-Certificats d\u2019investissement": {}, + "2744-Parts de fonds commun de placement (FCP)": {}, + "2745-Obligations": {}, + "2746-Actions ou parts propres": {}, + "2748-Autres titres immobilis\u00e9s": {} + }, + "275-D\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "2751-D\u00e9p\u00f4ts pour loyers d\u2019avance": {}, + "2752-D\u00e9p\u00f4ts pour l\u2019\u00e9lectricit\u00e9": {}, + "2753-D\u00e9p\u00f4ts pour l\u2019eau": {}, + "2754-D\u00e9p\u00f4ts pour le gaz": {}, + "2755-D\u00e9p\u00f4ts pour le t\u00e9l\u00e9phone, le t\u00e9lex, la t\u00e9l\u00e9copie": {}, + "2756-Cautionnements sur march\u00e9s publics": {}, + "2757-Cautionnements sur autres op\u00e9rations": {}, + "2758-Autres d\u00e9p\u00f4ts et cautionnements": {} + }, + "276-Int\u00e9r\u00eats courus": { + "2761-Pr\u00eats et cr\u00e9ances non commerciales": {}, + "2762-Pr\u00eats au personnel": {}, + "2763-Cr\u00e9ances sur l\u2019\u00c9tat": {}, + "2764-Titres immobilis\u00e9s": {}, + "2765-D\u00e9p\u00f4ts et cautionnements vers\u00e9s": {}, + "2767-Cr\u00e9ances rattach\u00e9es \u00e0 des participations": {}, + "2768-Immobilisations financi\u00e8res diverses": {} + }, + "277-Cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": { + "2771-Cr\u00e9ances rattach\u00e9es \u00e0 des participations (groupe)": {}, + "2772-Cr\u00e9ances rattach\u00e9es \u00e0 des participations (hors groupe)": {}, + "2773-Cr\u00e9ances rattach\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": {}, + "2774-Avances \u00e0 des Groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": {} + }, + "278-Immobilisations financi\u00e8res diverses": { + "2781-Cr\u00e9ances diverses groupe": {}, + "2782-Cr\u00e9ances diverses hors groupe": {}, + "2784-Banques d\u00e9p\u00f4ts \u00e0 terme": {}, + "2785-Or et m\u00e9taux pr\u00e9cieux": {}, + "2788-Autres immobilisations financi\u00e8res": {} + } + }, + "28-Amortissements": { + "account_type": "Accumulated Depreciation", + "281-Amortissements des immobilisations corporelles": { + "account_type": "Accumulated Depreciation", + "2811-Amortissements des frais de d\u00e9veloppement": { + "account_type": "Accumulated Depreciation" + }, + "2812-Amortissements des brevets, licences, concessions et droits similaires": { + "account_type": "Accumulated Depreciation" + }, + "2813-Amortissements des logiciels et sites internet": { + "account_type": "Accumulated Depreciation" + }, + "2814-Amortissements des marques": { + "account_type": "Accumulated Depreciation" + }, + "2815-Amortissements du fonds commercial": { + "account_type": "Accumulated Depreciation" + }, + "2816-Amortissements du droit au bail": { + "account_type": "Accumulated Depreciation" + }, + "2817-Amortissements des investissements de cr\u00e9ation": { + "account_type": "Accumulated Depreciation" + }, + "2818-Amortissements des autres droits et valeurs incorporels": { + "account_type": "Accumulated Depreciation" + } + }, + "282-Amortissements des terrains": { + "2824-Amortissements des travaux de mise en valeur des terrains": {} + }, + "283-Amortissements des b\u00e2timents, installations techniques et agencements": { + "2831-Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": {}, + "2832-Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": {}, + "2833-Amortissements des ouvrages d\u2019infrastructure": {}, + "2834-Amortissements des am\u00e9nagements, agencements et installations techniques": {}, + "2835-Amortissements des am\u00e9nagements de bureaux": {}, + "2837-Amortissements des b\u00e2timents industriels, agricoles et commerciaux mis en concession": {}, + "2838-Amortissements des autres installations et agencements": {} + }, + "284-Amortissements du mat\u00e9riel": { + "2841-Amortissements du mat\u00e9riel et outillage industriel et commercial": {}, + "2842-Amortissements du mat\u00e9riel et outillage agricole": {}, + "2843-Amortissements du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "2844-Amortissements du mat\u00e9riel et mobilier": {}, + "2845-Amortissements du mat\u00e9riel de transport": {}, + "2846-Amortissements des actifs biologiques": {}, + "2847-Amortissements des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": {}, + "2848-Amortissements des autres mat\u00e9riels": {} + } + }, + "29-D\u00e9pr\u00e9ciations des immobilisations": { + "291-D\u00e9pr\u00e9ciations des immobilisations incorporelles": { + "2911-D\u00e9pr\u00e9ciations des frais de d\u00e9veloppement": {}, + "2912-D\u00e9pr\u00e9ciations des brevets, licences, concessions et droits similaires": {}, + "2913-D\u00e9pr\u00e9ciations des logiciels et sites internet": {}, + "2914-D\u00e9pr\u00e9ciations des marques": {}, + "2915-D\u00e9pr\u00e9ciations du fonds commercial": {}, + "2916-D\u00e9pr\u00e9ciations du droit au bail": {}, + "2917-D\u00e9pr\u00e9ciations des investissements de cr\u00e9ation": {}, + "2918-D\u00e9pr\u00e9ciations des autres droits et valeurs incorporels": {}, + "2919-D\u00e9pr\u00e9ciations des immobilisations incorporelles en cours": {} + }, + "292-D\u00e9pr\u00e9ciations des terrains": { + "2921-D\u00e9pr\u00e9ciations des terrains agricoles et forestiers": {}, + "2922-D\u00e9pr\u00e9ciations des terrains nus": {}, + "2923-D\u00e9pr\u00e9ciations des terrains b\u00e2tis": {}, + "2924-D\u00e9pr\u00e9ciations des travaux de mise en valeur des terrains": {}, + "2925-D\u00e9pr\u00e9ciations des terrains de gisement": {}, + "2926-D\u00e9pr\u00e9ciations des terrains am\u00e9nag\u00e9s": {}, + "2927-D\u00e9pr\u00e9ciations des terrains mis en concession": {}, + "2928-D\u00e9pr\u00e9ciations des autres terrains": {}, + "2929-D\u00e9pr\u00e9ciations des am\u00e9nagements de terrains en cours": {} + }, + "293-D\u00e9pr\u00e9ciations des b\u00e2timents, installations techniques et agencements": { + "2931-D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": {}, + "2932-D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": {}, + "2933-D\u00e9pr\u00e9ciations des ouvrages d\u2019infrastructures": {}, + "2934-D\u00e9pr\u00e9ciations des am\u00e9nagements, agencements et installations techniques": {}, + "2935-D\u00e9pr\u00e9ciations des am\u00e9nagements de bureaux": {}, + "2937-D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles et commerciaux mis en concession": {}, + "2938-D\u00e9pr\u00e9ciations des autres installations et agencements": {}, + "2939-D\u00e9pr\u00e9ciations des b\u00e2timents et installations en cours": {} + }, + "294-D\u00e9pr\u00e9ciations de mat\u00e9riel, du mobilier et de l\u2019actif biologique": { + "2941-D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage industriel et commercial": {}, + "2942-D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage agricole": {}, + "2943-D\u00e9pr\u00e9ciations du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "2944-D\u00e9pr\u00e9ciations du mat\u00e9riel et mobilier": {}, + "2945-D\u00e9pr\u00e9ciations du mat\u00e9riel de transport": {}, + "2946-D\u00e9pr\u00e9ciations des actifs biologiques": {}, + "2947-D\u00e9pr\u00e9ciations des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": {}, + "2948-D\u00e9pr\u00e9ciations des autres mat\u00e9riels": {}, + "2949-D\u00e9pr\u00e9ciations de mat\u00e9riel en cours": {} + }, + "295-D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations": { + "2951-D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations incorporelles": {}, + "2952-D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations corporelles": {} + }, + "296-D\u00e9pr\u00e9ciations des titres de participation": { + "2961-D\u00e9pr\u00e9ciations des titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": {}, + "2962-D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s sous contr\u00f4le conjoint": {}, + "2963-D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s conf\u00e9rant une influence notable": {}, + "2965-D\u00e9pr\u00e9ciations des participations dans des organismes professionnels": {}, + "2966-D\u00e9pr\u00e9ciations des parts dans des GIE": {}, + "2968-D\u00e9pr\u00e9ciations des autres titres de participation": {} + }, + "297-D\u00e9pr\u00e9ciations des autres immobilisations financi\u00e8res": { + "2971-D\u00e9pr\u00e9ciations des pr\u00eats et cr\u00e9ances": {}, + "2972-D\u00e9pr\u00e9ciations des pr\u00eats au personnel": {}, + "2973-D\u00e9pr\u00e9ciations des cr\u00e9ances sur l\u2019\u00c9tat": {}, + "2974-D\u00e9pr\u00e9ciations des titres immobilis\u00e9s": {}, + "2975-D\u00e9pr\u00e9ciations des d\u00e9p\u00f4ts et cautionnements vers\u00e9s": {}, + "2977-D\u00e9pr\u00e9ciations des cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": {}, + "2978-D\u00e9pr\u00e9ciations des cr\u00e9ances financi\u00e8res diverses": {} + } + }, + "root_type": "Asset" + }, + "3-Comptes de Stocks": { + "31-Marchandises": { + "311-Marchandises A": { + "3111-Marchandises A1": {}, + "3112-Marchandises A2": {} + }, + "312-Marchandises B": { + "3121-Marchandises B1": {}, + "3122-Marchandises B2": {} + }, + "313-Actifs biologiques": { + "3131-Animaux": {}, + "3132-V\u00e9g\u00e9taux": {} + }, + "318-Marchandises hors activit\u00e9s ordinaires (HAO)": {} + }, + "32-Mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "321-Mati\u00e8res A": {}, + "322-Mati\u00e8res B": {}, + "323-Fournitures (A, B)": {} + }, + "33-Autres approvisionnements": { + "331-Mati\u00e8res consommables": {}, + "332-Fournitures d\u2019atelier et d\u2019usine": {}, + "333-Fournitures de magasin": {}, + "334-Fournitures de bureau": {}, + "335-Emballages": { + "3351-Emballages perdus": {}, + "3352-Emballages r\u00e9cup\u00e9rables non identifiables": {}, + "3353-Emballages \u00e0 usage mixte": {}, + "3358-Autres emballages": {} + }, + "338-Autres mati\u00e8res": {} + }, + "34-Produits en cours": { + "341-Produits en cours": { + "3411-Produits en cours P1": {}, + "3412-Produits en cours P2": {} + }, + "342-Travaux en cours": { + "3421-Travaux en cours T1": {}, + "3422-Travaux en cours T2": {} + }, + "343-Produits interm\u00e9diaires en cours": { + "3431-Produits interm\u00e9diaires A": {}, + "3432-Produits interm\u00e9diaires B": {} + }, + "344-Produits r\u00e9siduels en cours": { + "3441-Produits r\u00e9siduels A": {}, + "3442-Produits r\u00e9siduels B": {} + }, + "345-Actifs biologiques en cours": { + "3451-Animaux": {}, + "3452-V\u00e9g\u00e9taux": {} + } + }, + "35-Services en cours": { + "351-\u00c9tudes en cours": { + "3511-\u00c9tudes en cours E1": {}, + "3512-\u00c9tudes en cours E2": {} + }, + "352-Prestations de services en cours": { + "3521-Prestations de services S1": {}, + "3522-Prestations de services S2": {} + } + }, + "36-Produits finis": { + "361-Produits finis A": {}, + "362-Produits finis B": {}, + "363-Actifs biologiques": { + "3631-Animaux": {}, + "3632-V\u00e9g\u00e9taux": {}, + "3638-Autres stocks (activit\u00e9s annexes)": {} + } + }, + "37-Produits interm\u00e9diaires et r\u00e9siduels": { + "371-Produits interm\u00e9diaires": { + "3711-Produits interm\u00e9diaires A": {}, + "3712-Produits interm\u00e9diaires B": {} + }, + "372-Produits r\u00e9siduels": { + "3721-D\u00e9chets": {}, + "3722-Rebuts": {}, + "3723-Mati\u00e8res de R\u00e9cup\u00e9ration": {} + }, + "373-Actifs biologiques": { + "3731-Animaux": {}, + "3732-V\u00e9g\u00e9taux": {}, + "3738-Autres stocks (activit\u00e9s annexes)": {} + } + }, + "38-Stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": { + "account_type": "Stock", + "381-Marchandises en cours de route": {}, + "382-Mati\u00e8res premi\u00e8res et fournitures li\u00e9es en cours de route": {}, + "383-Autres approvisionnements en cours de route": {}, + "386-Produits finis en cours de route": {}, + "387-Stock en consignation ou en d\u00e9p\u00f4t": { + "3871-Stock en consignation": {}, + "3872-Stock en d\u00e9p\u00f4t": {} + }, + "388-Stock provenant d\u2019immobilisations mises hors service ou au rebut": {} + }, + "39-D\u00e9pr\u00e9ciations des stocks et encours de production": { + "391-D\u00e9pr\u00e9ciations des stocks de marchandises": {}, + "392-D\u00e9pr\u00e9ciations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": {}, + "393-D\u00e9pr\u00e9ciations des stocks d\u2019autres approvisionnements": {}, + "394-D\u00e9pr\u00e9ciations des productions en cours": {}, + "395-D\u00e9pr\u00e9ciations des services en cours": {}, + "396-D\u00e9pr\u00e9ciations des stocks de produits finis": {}, + "397-D\u00e9pr\u00e9ciations des stocks de produits interm\u00e9diaires et r\u00e9siduels": {}, + "398-D\u00e9pr\u00e9ciations des stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": {} + }, + "root_type": "Asset" + }, + "4-Comptes de Tiers (ACTIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (ACTIF)": { + "409-Fournisseurs d\u00e9biteurs": { + "4091-Fournisseurs Avances et acomptes vers\u00e9s": {}, + "4092-Fournisseurs Groupe avances et acomptes vers\u00e9s": {}, + "4093-Fournisseurs Sous-traitants avances et acomptes vers\u00e9s": {}, + "4094-Fournisseurs Cr\u00e9ances pour emballages et mat\u00e9riels \u00e0 rendre": {}, + "4098-Fournisseurs Rabais, remises, ristournes et autres avoirs \u00e0 obtenir": {} + } + }, + "41-Clients et comptes rattach\u00e9s (ACTIF)": { + "411-Clients": { + "4111-Clients": { + "account_type": "Receivable" + }, + "4112-Clients groupe": { + "account_type": "Receivable" + }, + "4114-Clients, \u00c9tat et Collectivit\u00e9s publiques": { + "account_type": "Receivable" + }, + "4115-Clients, organismes internationaux": { + "account_type": "Receivable" + }, + "4116-Clients, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Receivable" + }, + "4117-Client, retenues de garantie": { + "account_type": "Receivable" + }, + "4118-Clients, d\u00e9gr\u00e8vement de taxes sur la valeur ajout\u00e9e (TVA)": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "412-Clients, effets \u00e0 recevoir en portefeuille": { + "4121-Clients, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "4122-Clients Groupe, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "4124-\u00c9tat et Collectivit\u00e9s publiques, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "4125-Organismes Internationaux, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "413-Clients, ch\u00e8ques, effets et autres valeurs impay\u00e9es": { + "4131-Clients, ch\u00e8ques impay\u00e9s": { + "account_type": "Receivable" + }, + "4132-Clients, effets impay\u00e9s": { + "account_type": "Receivable" + }, + "4133-Clients, cartes de cr\u00e9dit impay\u00e9es": { + "account_type": "Receivable" + }, + "4138-Clients, autres valeurs impay\u00e9es": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "414-Cr\u00e9ances sur cessions courantes d\u2019immobilisations": { + "4141-Cr\u00e9ances en compte, immobilisations incorporelles": { + "account_type": "Receivable" + }, + "4142-Cr\u00e9ances en compte, immobilisations corporelles": { + "account_type": "Receivable" + }, + "4146-Effets \u00e0 recevoir, immobilisations incorporelles": { + "account_type": "Receivable" + }, + "4147-Effets \u00e0 recevoir, immobilisations corporelles": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "415-Clients, effets escompt\u00e9s non \u00e9chus": { + "account_type": "Receivable" + }, + "416-Cr\u00e9ances clients litigieuses ou douteuses": { + "4161-Cr\u00e9ances litigieuses": { + "account_type": "Receivable" + }, + "4162-Cr\u00e9ances douteuses": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "418-Clients, produits \u00e0 recevoir": { + "4181-Clients, factures \u00e0 \u00e9tablir": { + "account_type": "Receivable" + }, + "4186-Clients, int\u00e9r\u00eats courus": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "42-Personnel (ACTIF)": { + "421-Personnel, avances et acomptes": { + "4211-Personnel, avances": {}, + "4212-Personnel, acomptes": {}, + "4213-Frais avanc\u00e9s et fournitures au personnel": {} + } + }, + "43-Organismes sociaux (ACTIF)": { + "431-S\u00e9curit\u00e9 sociale": { + "4311-Prestations familiales": {}, + "4312-Accidents de travail": {}, + "4313-Caisse de retraite obligatoire": {}, + "4314-Caisse de retraite facultative": {}, + "4318-Autres cotisations sociales": {} + }, + "432-Caisses de retraite compl\u00e9mentaire": {}, + "433-Autres organismes sociaux": { + "4331-Mutuelle": {}, + "4332-Assurances retraite": {}, + "4333-Assurances et organismes de sant\u00e9": {} + }, + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "4387-Produits \u00e0 recevoir": {} + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (ACTIF)": { + "443-\u00c9tat, TVA factur\u00e9e": { + "4431-TVA factur\u00e9e sur ventes": {}, + "4432-TVA factur\u00e9e sur prestations de services": {}, + "4433-TVA factur\u00e9e sur travaux": {}, + "4434-TVA factur\u00e9e sur production livr\u00e9e \u00e0 soi-m\u00eame": {}, + "4435-TVA sur factures \u00e0 \u00e9tablir": {} + }, + "445-\u00c9tat, TVA r\u00e9cup\u00e9rable": { + "4451-TVA r\u00e9cup\u00e9rable sur immobilisations": {}, + "4452-TVA r\u00e9cup\u00e9rable sur achats": {}, + "4453-TVA r\u00e9cup\u00e9rable sur transport": {}, + "4454-TVA r\u00e9cup\u00e9rable sur services ext\u00e9rieurs et autres charges": {}, + "4455-TVA r\u00e9cup\u00e9rable sur factures non parvenues": {}, + "4456-TVA transf\u00e9r\u00e9e par d\u2019autres entit\u00e9s": {} + }, + "448-\u00c9tat, charges \u00e0 payer et produits \u00e0 recevoir": { + "4486-Charges \u00e0 payer": {}, + "4487-Produits \u00e0 recevoir": {} + }, + "449-\u00c9tat, cr\u00e9ances et dettes diverses": { + "4491-\u00c9tat, obligations cautionn\u00e9es": {}, + "4492-\u00c9tat, avances et acomptes vers\u00e9s sur imp\u00f4ts": {}, + "4493-\u00c9tat, fonds de dotation \u00e0 recevoir": {}, + "4494-\u00c9tat, subventions investissement \u00e0 recevoir": {}, + "4495-\u00c9tat, subventions d\u2019exploitation \u00e0 recevoir": {}, + "4496-\u00c9tat, subventions d\u2019\u00e9quilibre \u00e0 recevoir": {}, + "4497-\u00c9tat, avances sur subventions": {}, + "4499-\u00c9tat, fonds r\u00e9glement\u00e9s provisionn\u00e9s": {} + } + }, + "45-Organismes internationaux (ACTIF)": { + "451-Op\u00e9rations avec les organismes africains": {}, + "452-Op\u00e9rations avec les autres organismes internationaux": {}, + "458-Organismes internationaux, fonds de dotation et subventions \u00e0 recevoir": { + "4581-Organismes internationaux, fonds de dotation \u00e0 recevoir": {}, + "4582-Organismes internationaux, subventions \u00e0 recevoir": {} + } + }, + "46-Apporteurs, associ\u00e9s et groupe (ACTIF)": { + "461-Apporteurs, op\u00e9rations sur le capital": { + "4613-Apporteurs, capital appel\u00e9, non vers\u00e9": {}, + "4614-Apporteurs, compte d\u2019apport, op\u00e9rations de restructuration (fusion...)": {}, + "4618-Apporteurs, titres \u00e0 \u00e9changer": {} + }, + "467-Apporteurs, restant d\u00fb sur capital appel\u00e9": {} + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (ACTIF)": { + "472-Cr\u00e9ances et dettes sur titres de placement": { + "4721-Cr\u00e9ances sur cessions de titres de placement": {}, + "4726-Versements restant \u00e0 effectuer sur titres de placement non lib\u00e9r\u00e9s": {} + }, + "473-Interm\u00e9diaires Op\u00e9rations faites pour compte de tiers": { + "4731-Mandants": {}, + "4732-Mandataires": {}, + "4733-Commettants": {}, + "4734-Commissionnaires": {}, + "4739-\u00c9tat, Collectivit\u00e9s publiques, fonds global d\u2019allocation": {} + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits": { + "4747-Compte de r\u00e9partition p\u00e9riodique des produits": {} + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA": { + "4751-Compte actif": { + "account_type": "Temporary" + } + }, + "476-Charges constat\u00e9es d\u2019avance": {}, + "478-\u00c9carts de conversion actif": { + "4781-Diminution des cr\u00e9ances d\u2019exploitation": {}, + "4782-Diminution des cr\u00e9ances financi\u00e8res": {}, + "4783-Augmentation des dettes d\u2019exploitation": {}, + "4784-Augmentation des dettes financi\u00e8res": {}, + "4786-Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": {}, + "4788-Diff\u00e9rences compens\u00e9es par couverture de change": {} + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (ACTIF)": { + "485-Cr\u00e9ances sur cessions d\u2019immobilisations": { + "4851-En compte, immobilisations incorporelles": {}, + "4852-En compte, immobilisations corporelles": {}, + "4853-Effets \u00e0 recevoir, immobilisations incorporelles": {}, + "4854-Effets \u00e0 recevoir, immobilisations corporelles": {}, + "4855-Effets escompt\u00e9s non \u00e9chus": {}, + "4857-Retenues de garantie": {}, + "4858-Factures \u00e0 \u00e9tablir": {} + }, + "488-Autres cr\u00e9ances hors activit\u00e9s ordinaires (HAO)": {} + }, + "49-D\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme (tiers) (ACTIF)": { + "491-D\u00e9pr\u00e9ciations des comptes clients": { + "4911-Cr\u00e9ances litigieuses": {}, + "4912-Cr\u00e9ances douteuses": {} + }, + "495-D\u00e9pr\u00e9ciations des comptes organismes internationaux": {}, + "496-D\u00e9pr\u00e9ciations des comptes apporteurs, associ\u00e9s et groupe": { + "4962-Associ\u00e9s, comptes courants": {}, + "4963-Associ\u00e9s, op\u00e9rations faites en commun": {}, + "4966-Groupe, comptes courants": {} + }, + "497-D\u00e9pr\u00e9ciations des comptes d\u00e9biteurs divers": {}, + "498-D\u00e9pr\u00e9ciations des comptes de cr\u00e9ances HAO": { + "4985-Cr\u00e9ances sur cessions d\u2019immobilisations": {}, + "4986-Cr\u00e9ances sur cessions de titres de placement": {}, + "4988-Autres cr\u00e9ances HAO": {} + }, + "499-Provisions pour risques \u00e0 court terme": { + "4991-Sur op\u00e9rations d\u2019exploitation": {}, + "4997-Sur op\u00e9rations financi\u00e8res": {}, + "4998-Sur op\u00e9rations HAO": {} + } + }, + "root_type": "Asset" + }, + "4-Comptes de Tiers (PASSIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (PASSIF)": { + "401-Fournisseurs, dettes en compte": { + "4011-Fournisseurs": { + "account_type": "Payable" + }, + "4012-Fournisseurs groupe": { + "account_type": "Payable" + }, + "4013-Fournisseurs sous-traitants": { + "account_type": "Payable" + }, + "4016-Fournisseurs, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Payable" + }, + "4017-Fournisseur, retenues de garantie": { + "account_type": "Payable" + }, + "account_type": "Payable" + }, + "402-Fournisseurs, effets \u00e0 payer": { + "4021-Fournisseurs Effets \u00e0 payer": { + "account_type": "Payable" + }, + "4022-Fournisseurs Groupe, effets \u00e0 payer": { + "account_type": "Payable" + }, + "4023-Fournisseurs Sous-traitants, effets \u00e0 payer": { + "account_type": "Payable" + }, + "account_type": "Payable" + }, + "404-Fournisseurs, acquisitions courantes d\u2019immobilisations": { + "4041-Fournisseurs Dettes en comptes, immobilisations incorporelles": { + "account_type": "Payable" + }, + "4042-Fournisseurs Dettes en comptes, immobilisations corporelles": { + "account_type": "Payable" + }, + "4046-Fournisseurs Effets \u00e0 payer, immobilisations incorporelles": { + "account_type": "Payable" + }, + "4047-Fournisseurs Effets \u00e0 payer, immobilisations corporelles": { + "account_type": "Payable" + }, + "account_type": "Payable" + }, + "408-Fournisseurs, factures non parvenues": { + "4081-Fournisseurs": { + "account_type": "Stock Received But Not Billed" + }, + "4082-Fournisseurs groupe": { + "account_type": "Stock Received But Not Billed" + }, + "4083-Fournisseurs sous-traitants": { + "account_type": "Stock Received But Not Billed" + }, + "4086-Fournisseurs, int\u00e9r\u00eats courus": { + "account_type": "Stock Received But Not Billed" + }, + "account_type": "Stock Received But Not Billed" + }, + "account_type": "Payable" + }, + "41-Clients et comptes rattach\u00e9s (PASSIF)": { + "419-Clients cr\u00e9diteurs": { + "4191-Clients, avances et acomptes re\u00e7us": {}, + "4192-Clients groupe, avances et acomptes re\u00e7us": {}, + "4194-Clients, dettes pour emballages et mat\u00e9riels consign\u00e9s": {}, + "4198-Clients, rabais, remises, ristournes et autres avoirs \u00e0 accorder": {} + } + }, + "42-Personnel (PASSIF)": { + "422-Personnel, r\u00e9mun\u00e9rations dues": {}, + "423-Personnel, oppositions, saisies-arr\u00eats": { + "4231-Personnel, oppositions": {}, + "4232-Personnel, saisies-arr\u00eats": {}, + "4233-Personnel, avis \u00e0 tiers d\u00e9tenteur": {} + }, + "424-Personnel, \u0153uvres sociales internes": { + "4241-Assistance m\u00e9dicale": {}, + "4242-Allocations familiales": {}, + "4245-Organismes sociaux rattach\u00e9s \u00e0 l\u2019entit\u00e9": {}, + "4248-Autres \u0153uvres sociales internes": {} + }, + "425-Repr\u00e9sentants du personnel": { + "4251-D\u00e9l\u00e9gu\u00e9s du personnel": {}, + "4252-Syndicats et Comit\u00e9s d\u2019entreprises, d\u2019\u00c9tablissement": {}, + "4258-Autres repr\u00e9sentants du personnel": {} + }, + "426-Personnel, participation aux b\u00e9n\u00e9fices et au capital": { + "4261-Participation aux b\u00e9n\u00e9fices": {}, + "4264-Participation au capital": {} + }, + "427-Personnel d\u00e9p\u00f4ts": {}, + "428-Personnel, charges \u00e0 payer et produits \u00e0 recevoir": { + "4281-Dettes provisionn\u00e9es pour cong\u00e9s \u00e0 payer": {}, + "4286-Autres charges \u00e0 payer": {}, + "4287-Produits \u00e0 recevoir": {} + } + }, + "43-Organismes sociaux (PASSIF)": { + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "4381-Charges sociales sur gratifications \u00e0 payer": {}, + "4382-Charges sociales sur cong\u00e9s \u00e0 payer": {}, + "4386-Autres charges \u00e0 payer": {} + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (PASSIF)": { + "441-\u00c9tat, imp\u00f4t sur les b\u00e9n\u00e9fices": {}, + "442-\u00c9tat, autres imp\u00f4ts et taxes": { + "4421-Imp\u00f4ts et taxes d\u2019\u00c9tat": {}, + "4422-Imp\u00f4ts et taxes pour les collectivit\u00e9s publiques": {}, + "4423-Imp\u00f4ts et taxes recouvrables sur des obligataires": {}, + "4424-Imp\u00f4ts et taxes recouvrables sur des associ\u00e9s": {}, + "4426-Droits de douane": {}, + "4428-Autres imp\u00f4ts et taxes": {} + }, + "444-\u00c9tat, TVA due ou cr\u00e9dit de TVA": { + "4441-\u00c9tat, TVA due": {}, + "4449-\u00c9tat, cr\u00e9dit de TVA \u00e0 reporter": {} + }, + "446-\u00c9tat, autres taxes sur le chiffre d\u2019affaires": {}, + "447-\u00c9tat, imp\u00f4ts retenus \u00e0 la source": { + "4471-Imp\u00f4t G\u00e9n\u00e9ral sur le revenu": {}, + "4472-Imp\u00f4ts sur salaires": {}, + "4473-Contribution nationale": {}, + "4474-Contribution nationale de solidarit\u00e9": {}, + "4478-Autres imp\u00f4ts et contributions": {} + } + }, + "46-Apporteurs, associ\u00e9s et groupe (PASSIF)": { + "461-Apporteurs, op\u00e9rations sur le capital (PASSIF)": { + "4611-Apporteurs, apports en nature": {}, + "4612-Apporteurs, apports en num\u00e9raire": {}, + "4615-Apporteurs, versements re\u00e7us sur augmentation de capital": {}, + "4616-Apporteurs, versements anticip\u00e9s": {}, + "4617-Apporteurs d\u00e9faillants": {}, + "4619-Apporteurs, capital \u00e0 rembourser": {} + }, + "462-Associ\u00e9s, comptes courants": { + "4621-Principal": {}, + "4626-Int\u00e9r\u00eats courus": {} + }, + "463-Associ\u00e9s, op\u00e9rations faites en commun et GIE": { + "4631-Op\u00e9rations courantes": {}, + "4636-Int\u00e9r\u00eats courus": {} + }, + "465-Associ\u00e9s, dividendes \u00e0 payer": {}, + "466-Groupe, comptes courants": {} + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (PASSIF)": { + "471-D\u00e9biteurs et cr\u00e9diteurs divers": { + "4711-D\u00e9biteurs divers": {}, + "4712-Cr\u00e9diteurs divers": {}, + "4713-Obligataires": {}, + "4715-R\u00e9mun\u00e9rations d\u2019administrateurs": {}, + "4716-Compte d\u2019affacturage": {}, + "4717-D\u00e9biteurs divers retenues de garantie": {}, + "4718-Apport, compte de fusion et op\u00e9rations assimil\u00e9es": {}, + "4719-Bons de souscription d\u2019actions et d\u2019obligations": {} + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits (PASSIF)": { + "4746-Compte de r\u00e9partition p\u00e9riodique des charges": {} + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA (PASSIF)": { + "4752-Compte passif": {} + }, + "477-Produits constat\u00e9s d\u2019avance": {}, + "479-\u00c9carts de conversion passif": { + "4791-Augmentation des cr\u00e9ances d\u2019exploitation": {}, + "4792-Augmentation des cr\u00e9ances financi\u00e8res": {}, + "4793-Diminution des dettes d\u2019exploitation": {}, + "4794-Diminution des dettes financi\u00e8res": {}, + "4797-Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": {}, + "4798-Diff\u00e9rences compens\u00e9es par couverture de change": {} + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (HAO) (PASSIF)": { + "481-Fournisseurs d\u2019investissements": { + "4811-Immobilisations incorporelles": {}, + "4812-Immobilisations corporelles": {}, + "4813-Versements restant \u00e0 effectuer sur titres de participation et titres immobilis\u00e9s non lib\u00e9r\u00e9s": {}, + "4816-R\u00e9serve de propri\u00e9t\u00e9": {}, + "4817-Retenues de garantie": {}, + "4818-Factures non parvenues": {} + }, + "482-Fournisseurs d\u2019investissements, effets \u00e0 payer": { + "4821-Immobilisations incorporelles": {}, + "4822-Immobilisations corporelles": {} + }, + "484-Autres dettes hors activit\u00e9s ordinaires (HAO)": { + "4887-Produits": {} + } + }, + "49-D\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme (tiers) (PASSIF)": { + "490-D\u00e9pr\u00e9ciations des comptes fournisseurs": {}, + "492-D\u00e9pr\u00e9ciations des comptes personnel": {}, + "493-D\u00e9pr\u00e9ciations des comptes organismes sociaux": {}, + "494-D\u00e9pr\u00e9ciations des comptes \u00c9tat et collectivit\u00e9s publiques": {}, + "495-D\u00e9pr\u00e9ciations des comptes organismes internationaux": {} + }, + "root_type": "Liability" + }, + "5-Comptes de tr\u00e9sorerie": { + "50-Titres de placement": { + "501-Titres du tr\u00e9sor et bons de caisse \u00e0 court terme": { + "5011-Titres du Tr\u00e9sor \u00e0 court terme": {}, + "5012-Titres d\u2019organismes financiers": {}, + "5013-Bons de caisse \u00e0 court terme": {}, + "5016-Frais d\u2019acquisition des titres de tr\u00e9sor et bons de caisse": {} + }, + "502-Actions": { + "5021-Actions ou parts propres": {}, + "5022-Actions cot\u00e9es": {}, + "5023-Actions non cot\u00e9es": {}, + "5024-Actions d\u00e9membr\u00e9es (certificats d\u2019investissement, droits de vote)": {}, + "5025-Autres actions": {}, + "5026-Frais d\u2019acquisition des actions": {} + }, + "503-Obligations": { + "5031-Obligations \u00e9mises par la soci\u00e9t\u00e9 et rachet\u00e9es par elle": {}, + "5032-Obligations cot\u00e9es": {}, + "5033-Obligations non cot\u00e9es": {}, + "5035-Autres obligations": {}, + "5036-Frais d\u2019acquisition des obligations": {} + }, + "504-Bons de souscription": { + "5042-Bons de souscription d\u2019actions": {}, + "5043-Bons de souscription d\u2019obligations": {} + }, + "505-Titres n\u00e9gociables hors r\u00e9gion": {}, + "506-Int\u00e9r\u00eats courus": { + "5061-Titres du Tr\u00e9sor et bons de caisse \u00e0 court terme": {}, + "5062-Actions": {}, + "5063-Obligations": {} + }, + "508-Autres titres de placement et cr\u00e9ances assimil\u00e9es": {} + }, + "51-Valeurs \u00e0 encaisser": { + "511-Effets \u00e0 encaisser": {}, + "512-Effets \u00e0 l\u2019encaissement": {}, + "513-Ch\u00e8ques \u00e0 encaisser": {}, + "514-Ch\u00e8ques \u00e0 l\u2019encaissement": {}, + "515-Cartes de cr\u00e9dit \u00e0 encaisser": {}, + "518-Autres valeurs \u00e0 l\u2019encaissement": { + "5181-Warrants": {}, + "5182-Billets de fonds": {}, + "5185-Ch\u00e8ques de voyage": {}, + "5186-Coupons \u00e9chus": {}, + "5187-Int\u00e9r\u00eats \u00e9chus des obligations": {} + } + }, + "52-Banques": { + "521-Banques locales": { + "5211-Banques en monnaie nationale": { + "account_type": "Bank" + }, + "5215-Banques en devises": { + "account_type": "Bank" + }, + "account_type": "Bank" + }, + "522-Banques autres \u00c9tats r\u00e9gion": {}, + "523-Banques autres \u00c9tats zone mon\u00e9taire": {}, + "524-Banques hors zone mon\u00e9taire": {}, + "525-Banques d\u00e9p\u00f4t \u00e0 terme": {}, + "526-Banques, int\u00e9r\u00eats courus": { + "5261-Banque, int\u00e9r\u00eats courus, charges \u00e0 payer": {}, + "5267-Banque, int\u00e9r\u00eats courus, produits \u00e0 recevoir": {} + } + }, + "53-\u00c9tablissements financiers et assimil\u00e9s": { + "531-Ch\u00e8ques postaux": {}, + "532-Tr\u00e9sor": {}, + "533-Soci\u00e9t\u00e9s de gestion et d\u2019interm\u00e9diation (SGI)": {}, + "536-\u00c9tablissements financiers, int\u00e9r\u00eats courus": {}, + "538-Autres organismes financiers": {} + }, + "54-Instruments de tr\u00e9sorerie": { + "541-Options de taux d\u2019int\u00e9r\u00eat": {}, + "542-Options de taux de change": {}, + "543-Options de taux boursiers": {}, + "544-Instruments de march\u00e9s \u00e0 terme": {}, + "545-Avoirs d\u2019or et autres m\u00e9taux pr\u00e9cieux": {} + }, + "55-Instruments de monnaie \u00e9lectronique": { + "551-Monnaie \u00e9lectronique carte carburant": {}, + "552-Monnaie \u00e9lectronique t\u00e9l\u00e9phone portable": {}, + "553-Monnaie \u00e9lectronique carte p\u00e9age": {}, + "554-Porte-monnaie \u00e9lectronique": {}, + "558-Autres instruments de monnaies \u00e9lectroniques": {} + }, + "56-Banques, cr\u00e9dits de tr\u00e9sorerie et d\u2019escompte": { + "561-Cr\u00e9dits de tr\u00e9sorerie": {}, + "564-Escompte de cr\u00e9dits de campagne": {}, + "565-Escompte de cr\u00e9dits ordinaires": {}, + "566-Banques, cr\u00e9dits de tr\u00e9sorerie, int\u00e9r\u00eats courus": {} + }, + "57-Caisse": { + "571-Caisse si\u00e8ge social": { + "5711-Caisse en monnaie nationale": {}, + "5712-Caisse en devises": {} + }, + "572-Caisse succursale A": { + "5721-En monnaie nationale": {}, + "5722-En devises": {} + }, + "573-Caisse succursale B": { + "5731-En monnaie nationale": {}, + "5732-En devises": {} + } + }, + "58-R\u00e9gies d\u2019avances, accr\u00e9ditifs et virements internes": { + "581-R\u00e9gies d\u2019avance": {}, + "582-Accr\u00e9ditifs": {}, + "585-Virements de fonds": {}, + "588-Autres virements internes": {} + }, + "59-D\u00e9pr\u00e9ciations et provisions pour risque \u00e0 court terme": { + "590-D\u00e9pr\u00e9ciations des titres de placement": {}, + "591-D\u00e9pr\u00e9ciations des titres et valeurs \u00e0 encaisser": {}, + "592-D\u00e9pr\u00e9ciations des comptes banques": {}, + "593-D\u00e9pr\u00e9ciations des comptes \u00e9tablissements financiers et assimil\u00e9s": {}, + "594-D\u00e9pr\u00e9ciations des comptes d\u2019instruments de tr\u00e9sorerie": {}, + "599-Provisions pour risque \u00e0 court terme \u00e0 caract\u00e8re financier": {} + }, + "root_type": "Asset" + }, + "6-Comptes de charges des activit\u00e9s ordinaires": { + "60-Achats et variations de stocks": { + "601-Achats de marchandises": { + "6011-Dans la R\u00e9gion": {}, + "6012-Hors R\u00e9gion": {}, + "6013-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "6014-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "6015-Frais sur achats": {}, + "6019-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "602-Achats de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "6021-Dans la R\u00e9gion": {}, + "6022-Hors R\u00e9gion": {}, + "6023-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "6024-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "6025-Frais sur achats": {}, + "6029-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "603-Variations des stocks de biens achet\u00e9s": { + "6031-Variations des stocks de marchandises": {}, + "6032-Variations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": {}, + "6033-Variations des stocks d\u2019autres approvisionnements": {} + }, + "604-Achats stock\u00e9s de mati\u00e8res et fournitures consommables": { + "6041-Mati\u00e8res consommables": {}, + "6042-Mati\u00e8res combustibles": {}, + "6043-Produits d\u2019entretien": {}, + "6044-Fournitures d\u2019atelier et d\u2019usine": {}, + "6045-Frais sur achat": {}, + "6046-Fournitures de magasin": {}, + "6047-Fournitures de bureau": {}, + "6049-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "605-Autres achats": { + "6051-Fournitures non stockables Eau": {}, + "6052-Fournitures non stockables \u00c9lectricit\u00e9": {}, + "6053-Fournitures non stockables Autres \u00e9nergies": {}, + "6054-Fournitures d\u2019entretien non stockables": {}, + "6055-Fournitures de bureau non stockables": {}, + "6056-Achats de petit mat\u00e9riel et outillage": {}, + "6057-Achats d\u2019\u00e9tudes et prestations de services": {}, + "6058-Achats de travaux, mat\u00e9riels et \u00e9quipements": {}, + "6059-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "608-Achats d\u2019emballages": { + "6081-Emballages perdus": {}, + "6082-Emballages r\u00e9cup\u00e9rables non identifiables": {}, + "6083-Emballages \u00e0 usage mixte": {}, + "6085-Frais sur achats": {}, + "6089-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + } + }, + "61-Transports": { + "612-Transports sur ventes": {}, + "613-Transports pour le compte de tiers": {}, + "614-Transports du personnel": {}, + "616-Transports de plis": {}, + "618-Autres frais de transport": { + "6181-Voyages et d\u00e9placements": {}, + "6182-Transports entre \u00e9tablissements ou chantiers": {}, + "6183-Transports administratifs": {} + } + }, + "62-Services ext\u00e9rieurs": { + "621-Sous-traitance g\u00e9n\u00e9rale": {}, + "622-Locations, charges locatives": { + "6221-Locations de terrains": {}, + "6222-Locations de b\u00e2timents": {}, + "6223-Locations de mat\u00e9riels et outillages": {}, + "6224-Malis sur emballages": {}, + "6225-Locations d\u2019emballages": {}, + "6226-Fermages et loyers du foncier": {}, + "6228-Locations et charges locatives diverses": {} + }, + "623-Redevances de location acquisition": { + "6232-Cr\u00e9dit-bail immobilier": {}, + "6233-Cr\u00e9dit-bail mobilier": {}, + "6234-Location-vente": {}, + "6238-Autres contrats de location acquisition": {} + }, + "624-Entretien, r\u00e9parations, remise en \u00e9tat et maintenance": { + "6241-Entretien et r\u00e9parations des biens immobiliers": {}, + "6242-Entretien et r\u00e9parations des biens mobiliers": {}, + "6243-Maintenance": {}, + "6244-Charges de d\u00e9mant\u00e8lement et remise en \u00e9tat": {}, + "6248-Autres entretiens et r\u00e9parations": {} + }, + "625-Primes d\u2019assurance": { + "6251-Assurances multirisques": {}, + "6252-Assurances mat\u00e9riel de transport": {}, + "6253-Assurances risques d\u2019exploitation": {}, + "6254-Assurances responsabilit\u00e9 du producteur": {}, + "6255-Assurances insolvabilit\u00e9 clients": {}, + "6257-Assurances transport sur ventes": {}, + "6258-Autres primes d\u2019assurances": {} + }, + "626-\u00c9tudes, recherches et documentation": { + "6261-\u00c9tudes et recherches": {}, + "6265-Documentation g\u00e9n\u00e9rale": {}, + "6266-Documentation technique": {} + }, + "627-Publicit\u00e9, publications, relations publiques": { + "6271-Annonces, insertions": {}, + "6272-Catalogues, imprim\u00e9s publicitaires": {}, + "6273-\u00c9chantillons": {}, + "6274-Foires et expositions": {}, + "6275-Publications": {}, + "6276-Cadeaux \u00e0 la client\u00e8le": {}, + "6277-Frais de colloques, s\u00e9minaires, conf\u00e9rences": {}, + "6278-Autres charges de publicit\u00e9 et relations publiques": {} + }, + "628-Frais de t\u00e9l\u00e9communications": { + "6281-Frais de t\u00e9l\u00e9phone": {}, + "6282-Frais de t\u00e9lex": {}, + "6283-Frais de t\u00e9l\u00e9copie": {}, + "6288-Autres frais de t\u00e9l\u00e9communications": {} + } + }, + "63-Autres services ext\u00e9rieurs": { + "631-Frais bancaires": { + "6311-Frais sur titres (vente, garde)": {}, + "6312-Frais sur effets": {}, + "6313-Location de coffres": {}, + "6314-Commissions d\u2019affacturage": {}, + "6315-Commissions sur cartes de cr\u00e9dit": {}, + "6316-Frais d\u2019\u00e9mission d\u2019emprunts": {}, + "6317-Frais sur instruments monnaie \u00e9lectronique": {}, + "6318-Autres frais bancaires": {} + }, + "632-R\u00e9mun\u00e9rations d\u2019interm\u00e9diaires et de conseils": { + "6322-Commissions et courtages sur ventes": {}, + "6324-Honoraires des professions r\u00e9glement\u00e9es": {}, + "6325-Frais d\u2019actes et de contentieux": {}, + "6326-R\u00e9mun\u00e9rations d\u2019affacturage": {}, + "6327-R\u00e9mun\u00e9rations des autres prestataires de services": {}, + "6328-Divers frais": {} + }, + "633-Frais de formation du personnel": {}, + "634-Redevances pour brevets, licences, logiciels, concessions et droits et valeurs similaires": { + "6342-Redevances pour brevets, licences": {}, + "6343-Redevances pour logiciels": {}, + "6344-Redevances pour marques": {}, + "6345-Redevances pour sites internet": {}, + "6346-Redevances pour concessions, droits et valeurs similaires": {} + }, + "635-Cotisations": { + "6351-Cotisations": {}, + "6358-Concours divers": {} + }, + "637-R\u00e9mun\u00e9rations de personnel ext\u00e9rieur \u00e0 l\u2019entit\u00e9": { + "6371-Personnel int\u00e9rimaire": {}, + "6372-Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": {} + }, + "638-Autres charges externes": { + "6381-Frais de recrutement du personnel": {}, + "6382-Frais de d\u00e9m\u00e9nagement": {}, + "6383-R\u00e9ceptions": {}, + "6384-Missions": {}, + "6385-Charges de copropri\u00e9t\u00e9": {} + } + }, + "64-Imp\u00f4ts et taxes": { + "641-Imp\u00f4ts et taxes directs": { + "6411-Imp\u00f4ts fonciers et taxes annexes": {}, + "6412-Patentes, licences et taxes annexes": {}, + "6413-Taxes sur appointements et salaires": {}, + "6414-Taxes d\u2019apprentissage": {}, + "6415-Formation professionnelle continue": {}, + "6418-Autres imp\u00f4ts et taxes directs": {} + }, + "645-Imp\u00f4ts et taxes indirects": {}, + "646-Droits d\u2019enregistrement": { + "6461-Droits de mutation": {}, + "6462-Droits de timbre": {}, + "6463-Taxes sur les v\u00e9hicules de soci\u00e9t\u00e9": {}, + "6464-Vignettes": {}, + "6468-Autres droits": {} + }, + "647-P\u00e9nalit\u00e9s, amendes fiscales": { + "6471-P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts directs": {}, + "6472-P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts indirects": {}, + "6473-P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts directs": {}, + "6474-P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts indirects": {}, + "6478-Autres p\u00e9nalit\u00e9s et amendes fiscales": {} + }, + "648-Autres imp\u00f4ts et taxes": {} + }, + "65-Autres charges": { + "651-Pertes sur cr\u00e9ances clients et autres d\u00e9biteurs": { + "6511-Clients": {}, + "6515-Autres d\u00e9biteurs": {} + }, + "652-Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "6521-Quote-part transf\u00e9r\u00e9e de b\u00e9n\u00e9fices (comptabilit\u00e9 du g\u00e9rant)": {}, + "6525-Pertes imput\u00e9es par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": {} + }, + "654-Valeurs comptables des cessions courantes d\u2019immobilisations": { + "6541-Immobilisations incorporelles": {}, + "6542-Immobilisations corporelles": {} + }, + "656-Perte de change sur cr\u00e9ances et dettes commerciale": {}, + "657-P\u00e9nalit\u00e9s et amendes p\u00e9nales": {}, + "658-Charges diverses": { + "6581-Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": {}, + "6582-Dons": {}, + "6583-M\u00e9c\u00e9nat": {}, + "6588-Autres charges diverses": {} + }, + "659-Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "6591-Sur risques \u00e0 court terme": {}, + "6593-Sur stocks": {}, + "6594-Sur cr\u00e9ances": {}, + "6598-Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme": {} + } + }, + "66-Charges de personnel": { + "661-R\u00e9mun\u00e9rations directes vers\u00e9es au personnel national": { + "6611-Appointements salaires et commissions": {}, + "6612-Primes et gratifications": {}, + "6613-Cong\u00e9s pay\u00e9s": {}, + "6614-Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": {}, + "6615-Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": {}, + "6616-Suppl\u00e9ment familial": {}, + "6617-Avantages en nature": {}, + "6618-Autres r\u00e9mun\u00e9rations directes": {} + }, + "662-R\u00e9mun\u00e9rations directes vers\u00e9es au personnel non national": { + "6621-Appointements salaires et commissions": {}, + "6622-Primes et gratifications": {}, + "6623-Cong\u00e9s pay\u00e9s": {}, + "6624-Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": {}, + "6625-Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": {}, + "6626-Suppl\u00e9ment familial": {}, + "6627-Avantages en nature": {}, + "6628-Autres r\u00e9mun\u00e9rations directes": {} + }, + "663-Indemnit\u00e9s forfaitaires vers\u00e9es au personnel": { + "6631-Indemnit\u00e9s de logement": {}, + "6632-Indemnit\u00e9s de repr\u00e9sentation": {}, + "6633-Indemnit\u00e9s d\u2019expatriation": {}, + "6634-Indemnit\u00e9s de transport": {}, + "6638-Autres indemnit\u00e9s et avantages divers": {} + }, + "664-Charges sociales": { + "6641-Charges sociales sur r\u00e9mun\u00e9ration du personnel national": {}, + "6642-Charges sociales sur r\u00e9mun\u00e9ration du personnel non national": {} + }, + "666-R\u00e9mun\u00e9rations et charges sociales de l\u2019exploitant individuel": { + "6661-R\u00e9mun\u00e9ration du travail de l\u2019exploitant": {}, + "6662-Charges sociales": {} + }, + "667-R\u00e9mun\u00e9ration transf\u00e9r\u00e9e de personnel ext\u00e9rieur": { + "6671-Personnel int\u00e9rimaire": {}, + "6672-Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": {} + }, + "668-Autres charges sociales": { + "6681-Versements aux syndicats et comit\u00e9s d\u2019entreprise, d\u2019\u00e9tablissement": {}, + "6682-Versements aux comit\u00e9s d\u2019hygi\u00e8ne et de s\u00e9curit\u00e9": {}, + "6683-Versements et contributions aux autres \u0153uvres sociales": {}, + "6684-M\u00e9decine du travail et pharmacie": {}, + "6685-Assurances et organismes de sant\u00e9": {}, + "6686-Assurances retraite et fonds de pension": {}, + "6687-Majorations et p\u00e9nalit\u00e9s sociales": {}, + "6688-Charges sociales diverses": {} + } + }, + "67-Frais financiers et charges assimil\u00e9es": { + "671-Int\u00e9r\u00eats des emprunts": { + "6711-Emprunts obligataires": {}, + "6712-Emprunts aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": {}, + "6713-Dettes li\u00e9es \u00e0 des participations": {}, + "6714-Primes de remboursement des obligations": {} + }, + "672-Int\u00e9r\u00eats dans loyers de location acquisition": { + "6722-Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail immobilier": {}, + "6723-Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail mobilier": {}, + "6724-Int\u00e9r\u00eats dans loyers de location acquisition / location-vente": {}, + "6728-Int\u00e9r\u00eats dans loyers des autres locations acquisition": {} + }, + "673-Escomptes accord\u00e9s": {}, + "674-Autres int\u00e9r\u00eats": { + "6741-Avances re\u00e7ues et d\u00e9p\u00f4ts cr\u00e9diteurs": {}, + "6742-Comptes courants bloqu\u00e9s": {}, + "6743-Int\u00e9r\u00eats sur obligations cautionn\u00e9es": {}, + "6744-Int\u00e9r\u00eats sur dettes commerciales": {}, + "6745-Int\u00e9r\u00eats bancaires et sur op\u00e9rations de financement (escompte...)": {}, + "6748-Int\u00e9r\u00eats sur dettes diverses": {} + }, + "675-Escomptes des effets de commerce": {}, + "676-Pertes de change financi\u00e8res": {}, + "677-Pertes sur titres de placement": { + "6771-Pertes sur cessions de titres de placement": {}, + "6772-Mali provenant d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": {} + }, + "678-Pertes et charges sur risques financiers": { + "6781-Sur rentes viag\u00e8res": {}, + "6782-Sur op\u00e9rations financi\u00e8res": {}, + "6784-Sur instruments de tr\u00e9sorerie": {} + }, + "679-Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "6791-Sur risques financiers": {}, + "6795-Sur titres de placement": {}, + "6798-Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": {} + } + }, + "68-Dotations aux amortissements": { + "681-Dotations aux amortissements d\u2019exploitation": { + "6812-Dotations aux amortissements des immobilisations incorporelles": {}, + "6813-Dotations aux amortissements des immobilisations corporelles": {} + } + }, + "69-Dotations aux provisions et aux d\u00e9pr\u00e9ciations": { + "691-Dotations aux provisions et aux d\u00e9pr\u00e9ciations d\u2019exploitation": { + "6911-Dotations aux provisions pour risques et charges": {}, + "6913-Dotations aux d\u00e9pr\u00e9ciations des immobilisations incorporelles": {}, + "6914-Dotations aux d\u00e9pr\u00e9ciations des immobilisations corporelles": {} + }, + "697-Dotations aux provisions et aux d\u00e9pr\u00e9ciations financi\u00e8res": { + "6971-Dotations aux provisions pour risques et charges": {}, + "6972-Dotations aux d\u00e9pr\u00e9ciations des immobilisations financi\u00e8res": {} + } + }, + "root_type": "Expense" + }, + "7-Comptes de produits des activit\u00e9s ordinaires": { + "70-Ventes": { + "701-Ventes de marchandises": { + "7011-Dans la R\u00e9gion": {}, + "7012-Hors R\u00e9gion": {}, + "7013-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7014-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7015-Sur internet": {}, + "7019-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "702-Ventes de produits finis": { + "7021-Dans la R\u00e9gion": {}, + "7022-Hors R\u00e9gion": {}, + "7023-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7024-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7025-Sur internet": {}, + "7029-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "703-Ventes de produits interm\u00e9diaires": { + "7031-Dans la R\u00e9gion": {}, + "7032-Hors R\u00e9gion": {}, + "7033-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7034-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7035-Sur internet": {}, + "7039-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "704-Ventes de produits r\u00e9siduels": { + "7041-Dans la R\u00e9gion": {}, + "7042-Hors R\u00e9gion": {}, + "7043-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7044-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7045-Sur internet": {}, + "7049-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "705-Travaux factur\u00e9s": { + "7051-Dans la R\u00e9gion": {}, + "7052-Hors R\u00e9gion": {}, + "7053-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7054-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7055-Sur internet": {}, + "7059-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "706-Services vendus": { + "7061-Dans la R\u00e9gion": {}, + "7062-Hors R\u00e9gion": {}, + "7063-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7064-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7065-Sur internet": {}, + "7069-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "707-Produits accessoires": { + "7071-Ports, emballages perdus et autres frais factur\u00e9s": {}, + "7072-Commissions et courtages": {}, + "7073-Locations": {}, + "7074-Bonis sur reprises et cessions d\u2019emballages": {}, + "7075-Mise \u00e0 disposition de personnel": {}, + "7076-Redevances pour brevets, logiciels, marques et droits similaires": {}, + "7077-Services exploit\u00e9s dans l\u2019int\u00e9r\u00eat du personnel": {}, + "7078-Autres produits accessoires": {} + } + }, + "71-Subventions d\u2019exploitation": { + "711-Sur produits \u00e0 l\u2019exportation": {}, + "712-Sur produits \u00e0 l\u2019importation": {}, + "713-Sur produits de p\u00e9r\u00e9quation": {}, + "714-Indemnit\u00e9s et subventions d\u2019exploitation (entit\u00e9 agricole)": {}, + "718-Autres subventions d\u2019exploitation": { + "7181-Vers\u00e9es par l\u2019\u00c9tat et les collectivit\u00e9s publiques": {}, + "7182-Vers\u00e9es par les organismes internationaux": {}, + "7183-Vers\u00e9es par des tiers": {} + } + }, + "72-Production immobilis\u00e9e": { + "721-Immobilisations incorporelles": {}, + "722-Immobilisations corporelles": { + "7221-Immobilisations corporelles (hors actifs biologiques)": {}, + "7222-Immobilisations corporelles (actifs biologiques)": {} + }, + "724-Production auto-consomm\u00e9e": {}, + "726-Immobilisations financi\u00e8res": {} + }, + "73-Variations des stocks de biens et de services produits": { + "734-Variations des stocks de produits en cours": { + "7341-Produits en cours": {}, + "7342-Travaux en cours": {} + }, + "735-Variations des en-cours de services": { + "7351-\u00c9tudes en cours": {}, + "7352-Prestations de services en cours": {} + }, + "736-Variations des stocks de produits finis": {}, + "737-Variations des stocks de produits interm\u00e9diaires et r\u00e9siduels": { + "7371-Produits interm\u00e9diaires": {}, + "7372-Produits r\u00e9siduels": {} + } + }, + "75-Autres produits": { + "751-Profits sur cr\u00e9ances clients et autres d\u00e9biteurs": {}, + "752-Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "7521-Quote-part transf\u00e9r\u00e9e de pertes (comptabilit\u00e9 du g\u00e9rant)": {}, + "7525-B\u00e9n\u00e9fices attribu\u00e9s par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": {} + }, + "754-Produits des cessions courantes d\u2019immobilisations": { + "7541-Immobilisations incorporelles": {}, + "7542-Immobilisations corporelles": {} + }, + "756-Gains de change sur cr\u00e9ances et dettes commerciales": {}, + "758-Produits divers": { + "7581-Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": {}, + "7582-Indemnit\u00e9s d\u2019assurances re\u00e7ues": {}, + "7588-Autres produits divers": {} + }, + "759-Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "7591-Sur risques \u00e0 court terme": {}, + "7593-Sur stocks": {}, + "7594-Sur cr\u00e9ances": {}, + "7598-Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": {} + } + }, + "77-Revenus financiers et produits assimil\u00e9s": { + "771-Int\u00e9r\u00eats de pr\u00eats et cr\u00e9ances diverses": { + "7712-Int\u00e9r\u00eats de pr\u00eats": {}, + "7713-Int\u00e9r\u00eats sur cr\u00e9ances diverses": {} + }, + "772-Revenus de participations et autres titres immobilis\u00e9s": { + "7721-Revenus des titres de participation": {}, + "7722-Revenus autres titres immobilis\u00e9s": {} + }, + "773-Escomptes obtenus": {}, + "774-Revenus de placement": { + "7745-Revenus des obligations": {}, + "7746-Revenus des titres de placement": {} + }, + "775-Int\u00e9r\u00eats dans loyers de location acquisition": {}, + "776-Gains de change financiers": {}, + "777-Gains sur cessions de titres de placement": {}, + "778-Gains sur risques financiers": { + "7781-Sur rentes viag\u00e8res": {}, + "7782-Sur op\u00e9rations financi\u00e8res": {}, + "7784-Sur instruments de tr\u00e9sorerie": {} + }, + "779-Reprises de charges pour d\u00e9pr\u00e9ciations et provisions \u00e0 court terme financi\u00e8res": { + "7791-Sur risques financiers": {}, + "7795-Sur titres de placement": {}, + "7798-Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": {} + } + }, + "78-Transferts de charges": { + "781-Transferts de charges d\u2019exploitation": {}, + "787-Transferts de charges financi\u00e8res": {} + }, + "79-Reprises de provisions, de d\u00e9pr\u00e9ciations et autres": { + "791-Reprises de provisions et d\u00e9pr\u00e9ciations d\u2019exploitation": { + "7911-Pour risques et charges": {}, + "7913-Des immobilisations incorporelles": {}, + "7914-Des immobilisations corporelles": {} + }, + "797-Reprises de provisions et d\u00e9pr\u00e9ciations financi\u00e8res": { + "7971-Pour risques et charges": {}, + "7972-Des immobilisations financi\u00e8res": {} + }, + "798-Reprises d\u2019amortissements": {}, + "799-Reprises de subventions d\u2019investissement": {} + }, + "root_type": "Income" + }, + "8-Comptes des autres charges et des autres produits (CHARGES)": { + "81-Valeurs comptables des cessions d\u2019immobilisations": { + "811-Immobilisations incorporelles": {}, + "812-Immobilisations corporelles": {}, + "816-Immobilisations financi\u00e8res": {} + }, + "83-Charges hors activit\u00e9s ordinaires": { + "831-Charges HAO constat\u00e9es": {}, + "833-Charges li\u00e9es aux op\u00e9rations de restructuration": {}, + "834-Pertes sur cr\u00e9ances HAO": {}, + "835-Dons et lib\u00e9ralit\u00e9s accord\u00e9s": {}, + "836-Abandons de cr\u00e9ances consentis": {}, + "837-Charges li\u00e9es aux op\u00e9rations de liquidation": {}, + "839-Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": {} + }, + "85-Dotations hors activit\u00e9s ordinaires": { + "851-Dotations aux provisions r\u00e9glement\u00e9es": {}, + "852-Dotations aux amortissements HAO": {}, + "853-Dotations aux d\u00e9pr\u00e9ciations HAO": {}, + "854-Dotations aux provisions pour risques et charges HAO": {}, + "858-Autres dotations HAO": {} + }, + "87-Participation des travailleurs": { + "871-Participation l\u00e9gale aux b\u00e9n\u00e9fices": {}, + "874-Participation contractuelle aux b\u00e9n\u00e9fices": {}, + "878-Autres participations": {} + }, + "89-Imp\u00f4ts sur le r\u00e9sultat": { + "891-Imp\u00f4ts sur les b\u00e9n\u00e9fices de l\u2019exercice": { + "8911-Activit\u00e9s exerc\u00e9es dans l\u2019\u00c9tat": {}, + "8912-Activit\u00e9s exerc\u00e9es dans les autres \u00c9tats de la R\u00e9gion": {}, + "8913-Activit\u00e9s exerc\u00e9es hors R\u00e9gion": {} + }, + "892-Rappel d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": {}, + "895-Imp\u00f4t minimum forfaitaire IMF": {}, + "899-D\u00e9gr\u00e8vements et annulations d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": { + "8991-D\u00e9gr\u00e8vements": {}, + "8994-Annulations pour pertes r\u00e9troactives": {} + } + }, + "root_type": "Expense" + }, + "8-Comptes des autres charges et des autres produits (PRODUITS)": { + "82-Produits des cessions d\u2019immobilisations": { + "821-Immobilisations incorporelles": {}, + "822-Immobilisations corporelles": {}, + "826-Immobilisations financi\u00e8res": {} + }, + "84-Produits hors activit\u00e9s ordinaires": { + "841-Produits HAO constat\u00e9s": {}, + "843-Produits li\u00e9s aux op\u00e9rations de restructuration": {}, + "844-Indemnit\u00e9s et subventions HAO (entit\u00e9 agricole)": {}, + "845-Dons et lib\u00e9ralit\u00e9s obtenus": {}, + "846-Abandons de cr\u00e9ances obtenus": {}, + "847-Produits li\u00e9s aux op\u00e9rations de liquidation": {}, + "848-Transferts de charges HAO": {}, + "849-Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": {} + }, + "86-Reprises de charges, provisions et d\u00e9pr\u00e9ciations HAO": { + "861-Reprises de provisions r\u00e9glement\u00e9es": {}, + "862-Reprises d\u2019amortissements HAO": {}, + "863-Reprises de d\u00e9pr\u00e9ciations HAO": {}, + "864-Reprises de provisions pour risques et charges HAO": {}, + "868-Autres reprises HAO": {} + }, + "88-Subventions d\u2019\u00e9quilibre": { + "881-\u00c9tat": {}, + "884-Collectivit\u00e9s publiques": {}, + "886-Groupe": {}, + "888-Autres": {} + }, + "root_type": "Income" + } + } +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/cm_plan_comptable_avec_code.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/cm_plan_comptable_avec_code.json new file mode 100644 index 00000000000..0ce48d28d3d --- /dev/null +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/cm_plan_comptable_avec_code.json @@ -0,0 +1,4208 @@ +{ + "country_code": "cm", + "name": "Syscohada - Plan Comptable avec code", + "tree": { + "Comptes de ressources durables": { + "Capital": { + "Capital social": { + "Capital souscrit, non appel\u00e9": { + "account_number": "1011" + }, + "Capital souscrit, appel\u00e9, non vers\u00e9": { + "account_number": "1012" + }, + "Capital souscrit, appel\u00e9, vers\u00e9, non amorti": { + "account_number": "1013" + }, + "Capital souscrit, appel\u00e9, vers\u00e9, amorti": { + "account_number": "1014" + }, + "Capital souscrit soumis \u00e0 des conditions particuli\u00e8res": { + "account_number": "1018" + }, + "account_number": "101" + }, + "Capital par dotation": { + "Dotation initiale": { + "account_number": "1021" + }, + "Dotations compl\u00e9mentaires": { + "account_number": "1022" + }, + "Autres dotations": { + "account_number": "1028" + }, + "account_number": "102" + }, + "Capital personnel": { + "account_number": "103" + }, + "Compte de l\u2019exploitant": { + "Apports temporaires": { + "account_number": "1041" + }, + "Op\u00e9rations courantes": { + "account_number": "1042" + }, + "R\u00e9mun\u00e9rations, imp\u00f4ts et autres charges personnelles": { + "account_number": "1043" + }, + "Pr\u00e9l\u00e8vements d\u2019autoconsommation": { + "account_number": "1047" + }, + "Autres pr\u00e9l\u00e8vements": { + "account_number": "1048" + }, + "account_number": "104" + }, + "Primes li\u00e9es au capital social": { + "Primes d\u2019\u00e9mission": { + "account_number": "1051" + }, + "Primes d\u2019apport": { + "account_number": "1052" + }, + "Primes de fusion": { + "account_number": "1053" + }, + "Primes de conversion": { + "account_number": "1054" + }, + "Autres primes": { + "account_number": "1058" + }, + "account_number": "105" + }, + "\u00c9carts de r\u00e9\u00e9valuation": { + "\u00c9carts de r\u00e9\u00e9valuation l\u00e9gale": { + "account_number": "1061" + }, + "\u00c9carts de r\u00e9\u00e9valuation libre": { + "account_number": "1062" + }, + "account_number": "106" + }, + "Apporteurs, capital souscrit, non appel\u00e9": { + "account_number": "109" + }, + "account_number": "10" + }, + "R\u00e9serves": { + "R\u00e9serve l\u00e9gale": { + "account_number": "111" + }, + "R\u00e9serves statutaires ou contractuelles": { + "account_number": "112" + }, + "R\u00e9serves r\u00e9glement\u00e9es": { + "R\u00e9serves de plus-values nettes \u00e0 long terme": { + "account_number": "1131" + }, + "R\u00e9serves d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": { + "account_number": "1132" + }, + "R\u00e9serves cons\u00e9cutives \u00e0 l\u2019octroi de subventions d\u2019investissement": { + "account_number": "1133" + }, + "R\u00e9serves des valeurs mobili\u00e8res donnant acc\u00e8s au capital": { + "account_number": "1134" + }, + "Autres r\u00e9serves r\u00e9glement\u00e9es": { + "account_number": "1135" + }, + "account_number": "113" + }, + "Autres r\u00e9serves": { + "R\u00e9serves facultatives": { + "account_number": "1181" + }, + "R\u00e9serves diverses": { + "account_number": "1188" + }, + "account_number": "118" + }, + "account_number": "11" + }, + "Report \u00e0 nouveau": { + "Report \u00e0 nouveau cr\u00e9diteur": { + "account_number": "121" + }, + "Report \u00e0 nouveau d\u00e9biteur": { + "Perte nette \u00e0 reporter": { + "account_number": "1291" + }, + "Perte Amortissements r\u00e9put\u00e9s diff\u00e9r\u00e9s": { + "account_number": "1292" + }, + "account_number": "129" + }, + "account_number": "12" + }, + "R\u00e9sultat net de l\u2019exercice": { + "R\u00e9sultat en instance d\u2019affectation": { + "R\u00e9sultat en instance d\u2019affectation : b\u00e9n\u00e9fice": { + "account_number": "1301" + }, + "R\u00e9sultat en instance d\u2019affectation : perte": { + "account_number": "1309" + }, + "account_number": "130" + }, + "R\u00e9sultat net : b\u00e9n\u00e9fice": { + "account_number": "131" + }, + "Marge commerciale (MC)": { + "account_number": "132" + }, + "Valeur ajout\u00e9e (VA)": { + "account_number": "133" + }, + "Exc\u00e9dent brut d\u2019exploitation (EBE)": { + "account_number": "134" + }, + "R\u00e9sultat d\u2019exploitation (RE)": { + "account_number": "135" + }, + "R\u00e9sultat financier (RF)": { + "account_number": "136" + }, + "R\u00e9sultat des activit\u00e9s ordinaires (RAO)": { + "account_number": "137" + }, + "R\u00e9sultat hors activit\u00e9s ordinaires (RHAO)": { + "R\u00e9sultat de fusion": { + "account_number": "1381" + }, + "R\u00e9sultat d\u2019apport partiel d\u2019actif": { + "account_number": "1382" + }, + "R\u00e9sultat de scission": { + "account_number": "1383" + }, + "R\u00e9sultat de liquidation": { + "account_number": "1384" + }, + "account_number": "138" + }, + "R\u00e9sultat net : perte": { + "account_number": "139" + }, + "account_number": "13" + }, + "Subventions d\u2019investissement": { + "Subventions d\u2019\u00e9quipement": { + "\u00c9tat": { + "account_number": "1411" + }, + "R\u00e9gions": { + "account_number": "1412" + }, + "D\u00e9partements": { + "account_number": "1413" + }, + "Communes et collectivit\u00e9s publiques d\u00e9centralis\u00e9es": { + "account_number": "1414" + }, + "Entit\u00e9s publiques ou mixtes": { + "account_number": "1415" + }, + "Entit\u00e9s et organismes priv\u00e9s": { + "account_number": "1416" + }, + "Organismes internationaux": { + "account_number": "1417" + }, + "Autres": { + "account_number": "1418" + }, + "account_number": "141" + }, + "Autres subventions d\u2019investissement": { + "account_number": "148" + }, + "account_number": "14" + }, + "Provisions r\u00e9glement\u00e9es et fonds assimil\u00e9s": { + "Amortissements d\u00e9rogatoires": { + "account_number": "151" + }, + "Plus-values de cession \u00e0 r\u00e9investir": { + "account_number": "152" + }, + "Fonds r\u00e9glement\u00e9s": { + "Fonds National": { + "account_number": "1531" + }, + "Pr\u00e9l\u00e8vement pour le Budget": { + "account_number": "1532" + }, + "account_number": "153" + }, + "Provisions sp\u00e9ciales de r\u00e9\u00e9valuation": { + "account_number": "154" + }, + "Provisions r\u00e9glement\u00e9es relatives aux immobilisations": { + "Reconstitution des gisements miniers et p\u00e9troliers": { + "account_number": "1551" + }, + "account_number": "155" + }, + "Provisions r\u00e9glement\u00e9es relatives aux stocks": { + "Hausse de prix": { + "account_number": "1561" + }, + "Fluctuation des cours": { + "account_number": "1562" + }, + "account_number": "156" + }, + "Provisions pour investissement": { + "account_number": "157" + }, + "Autres provisions et fonds r\u00e9glement\u00e9s": { + "account_number": "158" + }, + "account_number": "15" + }, + "Emprunts et dettes assimil\u00e9es": { + "Emprunts obligataires": { + "Emprunts obligataires ordinaires": { + "account_number": "1611" + }, + "Emprunts obligataires convertibles en actions": { + "account_number": "1612" + }, + "Emprunts obligataires remboursables en actions": { + "account_number": "1613" + }, + "Autres emprunts obligataires": { + "account_number": "1618" + }, + "account_number": "161" + }, + "Emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": { + "account_number": "162" + }, + "Avances re\u00e7ues de l\u2019\u00c9tat": { + "account_number": "163" + }, + "Avances re\u00e7ues et comptes courants bloqu\u00e9s": { + "account_number": "164" + }, + "D\u00e9p\u00f4ts et cautionnements re\u00e7us": { + "D\u00e9p\u00f4ts": { + "account_number": "1651" + }, + "Cautionnements": { + "account_number": "1652" + }, + "account_number": "165" + }, + "Int\u00e9r\u00eats courus": { + "Sur emprunts obligataires": { + "account_number": "1661" + }, + "Sur emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": { + "account_number": "1662" + }, + "Sur avances re\u00e7ues de l\u2019\u00c9tat": { + "account_number": "1663" + }, + "Sur avances re\u00e7ues et comptes courants bloqu\u00e9s": { + "account_number": "1664" + }, + "Sur d\u00e9p\u00f4ts et cautionnements re\u00e7us": { + "account_number": "1665" + }, + "Sur avances assorties de conditions particuli\u00e8res": { + "account_number": "1667" + }, + "Sur autres emprunts et dettes": { + "account_number": "1668" + }, + "account_number": "166" + }, + "Avances assorties de conditions particuli\u00e8res": { + "Avances bloqu\u00e9es pour augmentation du capital": { + "account_number": "1671" + }, + "Avances conditionn\u00e9es par l\u2019\u00c9tat": { + "account_number": "1672" + }, + "Avances conditionn\u00e9es par les autres organismes africains": { + "account_number": "1673" + }, + "Avances conditionn\u00e9es par les organismes internationaux": { + "account_number": "1674" + }, + "account_number": "167" + }, + "Autres emprunts et dettes": { + "Rentes viag\u00e8res capitalis\u00e9es": { + "account_number": "1681" + }, + "Billets de fonds": { + "account_number": "1682" + }, + "Dettes cons\u00e9cutives \u00e0 des titres emprunt\u00e9s": { + "account_number": "1683" + }, + "Emprunts participatifs": { + "account_number": "1684" + }, + "Participation des travailleurs aux b\u00e9n\u00e9fices": { + "account_number": "1685" + }, + "Emprunts et dettes contract\u00e9s aupr\u00e8s des autres tiers": { + "account_number": "1686" + }, + "account_number": "168" + }, + "account_number": "16" + }, + "Dettes de location acquisition": { + "Dettes de location acquisition / cr\u00e9dit bail immobilier": { + "account_number": "172" + }, + "Dettes de location acquisition / cr\u00e9dit bail mobilier": { + "account_number": "173" + }, + "Dettes de location acquisition / location de vente": { + "account_number": "174" + }, + "Int\u00e9r\u00eats courus": { + "Sur dettes de location acquisition / cr\u00e9dit-bail immobilier": { + "account_number": "1762" + }, + "Sur dettes de location acquisition / cr\u00e9dit-bail mobilier": { + "account_number": "1763" + }, + "Sur dettes de location acquisition / location-vente": { + "account_number": "1764" + }, + "Sur autres dettes de location acquisition": { + "account_number": "1768" + }, + "account_number": "176" + }, + "Autres dettes de location acquisition": { + "account_number": "178" + }, + "account_number": "17" + }, + "Dettes li\u00e9es \u00e0 des participations et comptes de liaison des \u00e9tablissements et soci\u00e9t\u00e9s en participation": { + "Dettes li\u00e9es \u00e0 des participations": { + "Dettes li\u00e9es \u00e0 des participations (groupe)": { + "account_number": "1811" + }, + "Dettes li\u00e9es \u00e0 des participations (hors groupe)": { + "account_number": "1812" + }, + "account_number": "181" + }, + "Dettes li\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": { + "account_number": "182" + }, + "Int\u00e9r\u00eats courus sur dettes li\u00e9es \u00e0 des participations": { + "account_number": "183" + }, + "Comptes permanents bloqu\u00e9s des \u00e9tablissements et succursales": { + "account_number": "184" + }, + "Comptes permanents non bloqu\u00e9s des \u00e9tablissements et succursales": { + "account_number": "185" + }, + "Comptes de liaison charges": { + "account_number": "186" + }, + "Comptes de liaison produits": { + "account_number": "187" + }, + "Comptes de liaison des soci\u00e9t\u00e9s en participation": { + "account_number": "188" + }, + "account_number": "18" + }, + "Provisions pour risques et charges": { + "Provisions pour litiges": { + "account_number": "191" + }, + "Provisions pour garanties donn\u00e9es aux clients": { + "account_number": "192" + }, + "Provisions pour pertes sur march\u00e9s \u00e0 ach\u00e8vement futur": { + "account_number": "193" + }, + "Provisions pour pertes de change": { + "account_number": "194" + }, + "Provisions pour imp\u00f4ts": { + "account_number": "195" + }, + "Provisions pour pensions et obligations similaires": { + "Provisions pour pensions et obligations similaires engagement de retraite": { + "account_number": "1961" + }, + "Actif du r\u00e9gime de retraite": { + "account_number": "1962" + }, + "account_number": "196" + }, + "Provisions pour restructuration": { + "account_number": "197" + }, + "Autres provisions pour risques et charges": { + "Provisions pour amendes et p\u00e9nalit\u00e9s": { + "account_number": "1981" + }, + "Provisions pour propre assureur": { + "account_number": "1983" + }, + "Provisions pour d\u00e9mant\u00e8lement et remise en \u00e9tat": { + "account_number": "1984" + }, + "Provisions pour droits \u00e0 r\u00e9duction ou avantage en nature (ch\u00e8ques cadeau, cartes de fid\u00e9lit\u00e9...)": { + "account_number": "1985" + }, + "Provisions pour divers risques et charges": { + "account_number": "1988" + }, + "account_number": "198" + }, + "account_number": "19" + }, + "root_type": "Equity", + "account_number": "1" + }, + "Comptes d\u2019actif immobilis\u00e9": { + "Immobilisations incorporelles": { + "account_type": "Fixed Asset", + "Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset", + "account_number": "211" + }, + "Brevets, licences, concessions et droits similaires": { + "account_type": "Fixed Asset", + "Brevets": { + "account_type": "Fixed Asset", + "account_number": "2121" + }, + "Licences": { + "account_type": "Fixed Asset", + "account_number": "2122" + }, + "Concessions de service public": { + "account_type": "Fixed Asset", + "account_number": "2123" + }, + "Autres concessions et droits similaires": { + "account_type": "Fixed Asset", + "account_number": "2128" + }, + "account_number": "212" + }, + "Logiciels et sites internet": { + "account_type": "Fixed Asset", + "Logiciels": { + "account_type": "Fixed Asset", + "account_number": "2131" + }, + "Sites internet": { + "account_type": "Fixed Asset", + "account_number": "2132" + }, + "account_number": "213" + }, + "Marques": { + "account_type": "Fixed Asset", + "account_number": "214" + }, + "Fonds commercial": { + "account_type": "Fixed Asset", + "account_number": "215" + }, + "Droit au bail": { + "account_type": "Fixed Asset", + "account_number": "216" + }, + "Investissements de cr\u00e9ation": { + "account_type": "Fixed Asset", + "account_number": "217" + }, + "Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset", + "Frais de prospection et d\u2019\u00e9valuation de ressources min\u00e9rales": { + "account_type": "Fixed Asset", + "account_number": "2181" + }, + "Co\u00fbts d\u2019obtention du contrat": { + "account_type": "Fixed Asset", + "account_number": "2182" + }, + "Fichiers clients, notices, titres de journaux et magazines": { + "account_type": "Fixed Asset", + "account_number": "2183" + }, + "Co\u00fbts des franchises": { + "account_type": "Fixed Asset", + "account_number": "2184" + }, + "Divers droits et valeurs incorporelles": { + "account_type": "Fixed Asset", + "account_number": "2188" + }, + "account_number": "218" + }, + "Immobilisations incorporelles en cours": { + "account_type": "Fixed Asset", + "Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset", + "account_number": "2191" + }, + "Logiciels et internet": { + "account_type": "Fixed Asset", + "account_number": "2193" + }, + "Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset", + "account_number": "2198" + }, + "account_number": "219" + }, + "account_number": "21" + }, + "Terrains": { + "account_type": "Fixed Asset", + "Terrains agricoles et forestiers": { + "account_type": "Fixed Asset", + "Terrains d\u2019exploitation agricole": { + "account_type": "Fixed Asset", + "account_number": "2211" + }, + "Terrains d\u2019exploitation foresti\u00e8re": { + "account_type": "Fixed Asset", + "account_number": "2212" + }, + "Autres terrains": { + "account_type": "Fixed Asset", + "account_number": "2218" + }, + "account_number": "221" + }, + "Terrains nus": { + "account_type": "Fixed Asset", + "Terrains \u00e0 b\u00e2tir": { + "account_type": "Fixed Asset", + "account_number": "2221" + }, + "Autres terrains nus": { + "account_type": "Fixed Asset", + "account_number": "2228" + }, + "account_number": "222" + }, + "Terrains b\u00e2tis": { + "account_type": "Fixed Asset", + "Pour b\u00e2timents industriels et agricoles": { + "account_type": "Fixed Asset", + "account_number": "2231" + }, + "Pour b\u00e2timents administratifs et commerciaux": { + "account_type": "Fixed Asset", + "account_number": "2232" + }, + "Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations professionnelles": { + "account_type": "Fixed Asset", + "account_number": "2234" + }, + "Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations non professionnelles": { + "account_type": "Fixed Asset", + "account_number": "2235" + }, + "Autres terrains b\u00e2tis": { + "account_type": "Fixed Asset", + "account_number": "2238" + }, + "account_number": "223" + }, + "Travaux de mise en valeur des terrains": { + "account_type": "Fixed Asset", + "Plantation d\u2019arbres et d\u2019arbustes": { + "account_type": "Fixed Asset", + "account_number": "2241" + }, + "Am\u00e9liorations du fonds": { + "account_type": "Fixed Asset", + "account_number": "2245" + }, + "Autres travaux": { + "account_type": "Fixed Asset", + "account_number": "2248" + }, + "account_number": "224" + }, + "Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset", + "Carri\u00e8res": { + "account_type": "Fixed Asset", + "account_number": "2251" + }, + "account_number": "225" + }, + "Terrains am\u00e9nag\u00e9s": { + "account_type": "Fixed Asset", + "Parkings": { + "account_type": "Fixed Asset", + "account_number": "2261" + }, + "account_number": "226" + }, + "Terrains mis en concession": { + "account_type": "Fixed Asset", + "account_number": "227" + }, + "Autres terrains": { + "account_type": "Fixed Asset", + "Terrains immeubles de placement": { + "account_type": "Fixed Asset", + "account_number": "2281" + }, + "Terrains des logements affect\u00e9s au personnel": { + "account_type": "Fixed Asset", + "account_number": "2285" + }, + "Terrains de location acquisition": { + "account_type": "Fixed Asset", + "account_number": "2286" + }, + "Divers terrains": { + "account_type": "Fixed Asset", + "account_number": "2288" + }, + "account_number": "228" + }, + "Am\u00e9nagements de terrains en cours": { + "account_type": "Fixed Asset", + "Terrains agricoles et forestiers": { + "account_type": "Fixed Asset", + "account_number": "2291" + }, + "Terrains nus": { + "account_type": "Fixed Asset", + "account_number": "2292" + }, + "Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset", + "account_number": "2295" + }, + "Autres terrains": { + "account_type": "Fixed Asset", + "account_number": "2298" + }, + "account_number": "229" + }, + "account_number": "22" + }, + "B\u00e2timents, installations techniques et agencements": { + "B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "B\u00e2timents industriels": { + "account_number": "2311" + }, + "B\u00e2timents agricoles": { + "account_number": "2312" + }, + "B\u00e2timents administratifs et commerciaux": { + "account_number": "2313" + }, + "B\u00e2timents affect\u00e9s au logement du personnel": { + "account_number": "2314" + }, + "B\u00e2timents immeubles de placement": { + "account_number": "2315" + }, + "B\u00e2timents de location acquisition": { + "account_number": "2316" + }, + "account_number": "231" + }, + "B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "B\u00e2timents industriels": { + "account_number": "2321" + }, + "B\u00e2timents agricoles": { + "account_number": "2322" + }, + "B\u00e2timents administratifs et commerciaux": { + "account_number": "2323" + }, + "B\u00e2timents affect\u00e9s au logement du personnel": { + "account_number": "2324" + }, + "B\u00e2timents immeubles de placement": { + "account_number": "2325" + }, + "B\u00e2timents de location acquisition": { + "account_number": "2326" + }, + "account_number": "232" + }, + "Ouvrages d\u2019infrastructure": { + "Voies de terre": { + "account_number": "2331" + }, + "Voies de fer": { + "account_number": "2332" + }, + "Voies d\u2019eau": { + "account_number": "2333" + }, + "Barrages, Digues": { + "account_number": "2334" + }, + "Pistes d\u2019a\u00e9rodrome": { + "account_number": "2335" + }, + "Autres ouvrages d\u2019infrastructures": { + "account_number": "2338" + }, + "account_number": "233" + }, + "Am\u00e9nagements, agencements et installations techniques": { + "Installations complexes sp\u00e9cialis\u00e9es sur sol propre": { + "account_number": "2341" + }, + "Installations complexes sp\u00e9cialis\u00e9es sur sol d\u2019autrui": { + "account_number": "2342" + }, + "Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol propre": { + "account_number": "2343" + }, + "Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol d\u2019autrui": { + "account_number": "2344" + }, + "Am\u00e9nagements et agencements des b\u00e2timents": { + "account_number": "2345" + }, + "account_number": "234" + }, + "Am\u00e9nagements de bureaux": { + "Installations g\u00e9n\u00e9rales": { + "account_number": "2351" + }, + "Autres am\u00e9nagements de bureaux": { + "account_number": "2358" + }, + "account_number": "235" + }, + "B\u00e2timents industriels, agricoles et commerciaux mis en concession": { + "account_number": "237" + }, + "Autres installations et agencements": { + "account_number": "238" + }, + "B\u00e2timents am\u00e9nagements, agencements et installations en cours": { + "B\u00e2timents en cours": { + "account_number": "2391" + }, + "Installations en cours": { + "account_number": "2392" + }, + "Ouvrages d\u2019infrastructure en cours": { + "account_number": "2393" + }, + "Am\u00e9nagements et agencements et installations techniques en cours": { + "account_number": "2394" + }, + "Am\u00e9nagements de bureaux en cours": { + "account_number": "2395" + }, + "Autres installations et agencements en cours": { + "account_number": "2398" + }, + "account_number": "239" + }, + "account_number": "23" + }, + "Mat\u00e9riel, mobilier et actifs biologiques": { + "Mat\u00e9riel et outillage industriel et commercial": { + "Mat\u00e9riel industriel": { + "account_number": "2411" + }, + "Outillage industriel": { + "account_number": "2412" + }, + "Mat\u00e9riel commercial": { + "account_number": "2413" + }, + "Outillage commercial": { + "account_number": "2414" + }, + "Mat\u00e9riel & outillage industriel et commercial de location-acquisition": { + "account_number": "2416" + }, + "account_number": "241" + }, + "Mat\u00e9riel et outillage agricole": { + "Mat\u00e9riel agricole": { + "account_number": "2421" + }, + "Outillage agricole": { + "account_number": "2422" + }, + "Mat\u00e9riel & outillage agricole de location-acquisition": { + "account_number": "2426" + }, + "account_number": "242" + }, + "Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "243" + }, + "Mat\u00e9riel et mobilier": { + "Mat\u00e9riel de bureau": { + "account_number": "2441" + }, + "Mat\u00e9riel informatique": { + "account_number": "2442" + }, + "Mat\u00e9riel bureautique": { + "account_number": "2443" + }, + "Mobilier de bureau": { + "account_number": "2444" + }, + "Mat\u00e9riel et mobilier immeubles de placement": { + "account_number": "2445" + }, + "Mat\u00e9riel et mobilier de location acquisition": { + "account_number": "2446" + }, + "Mat\u00e9riel et mobilier des logements du personnel": { + "account_number": "2447" + }, + "account_number": "244" + }, + "Mat\u00e9riel de transport": { + "Mat\u00e9riel automobile": { + "account_number": "2451" + }, + "Mat\u00e9riel ferroviaire": { + "account_number": "2452" + }, + "Mat\u00e9riel fluvial, lagunaire": { + "account_number": "2453" + }, + "Mat\u00e9riel naval": { + "account_number": "2454" + }, + "Mat\u00e9riel a\u00e9rien": { + "account_number": "2455" + }, + "Mat\u00e9riel de transport de location-acquisition": { + "account_number": "2456" + }, + "Mat\u00e9riel hippomobile": { + "account_number": "2457" + }, + "Autres mat\u00e9riels de transport": { + "account_number": "2458" + }, + "account_number": "245" + }, + "Actifs biologiques": { + "Cheptel, animaux de trait": { + "account_number": "2461" + }, + "Cheptel, animaux reproducteurs": { + "account_number": "2462" + }, + "Animaux de garde": { + "account_number": "2463" + }, + "Plantations agricoles": { + "account_number": "2465" + }, + "Autres actifs biologiques": { + "account_number": "2468" + }, + "account_number": "246" + }, + "Agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "Agencements et am\u00e9nagements du mat\u00e9riel": { + "account_number": "2471" + }, + "Agencements et am\u00e9nagements des actifs biologiques": { + "account_number": "2472" + }, + "Autres agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "account_number": "2478" + }, + "account_number": "247" + }, + "Autres mat\u00e9riels et mobiliers": { + "Collections et \u0153uvres d\u2019art": { + "account_number": "2481" + }, + "Divers mat\u00e9riels mobiliers": { + "account_number": "2488" + }, + "account_number": "248" + }, + "Mat\u00e9riels et actifs biologiques en cours": { + "Mat\u00e9riel et outillage industriel et commercial": { + "account_number": "2491" + }, + "Mat\u00e9riel et outillage agricole": { + "account_number": "2492" + }, + "Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "2493" + }, + "Mat\u00e9riel et mobilier de bureau": { + "account_number": "2494" + }, + "Mat\u00e9riel de transport": { + "account_number": "2495" + }, + "Actifs biologiques": { + "account_number": "2496" + }, + "Agencements am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "account_number": "2497" + }, + "Autres mat\u00e9riels et actifs biologiques en cours": { + "account_number": "2498" + }, + "account_number": "249" + }, + "account_number": "24" + }, + "Avances et acomptes vers\u00e9s sur immobilisations": { + "Avances et acomptes vers\u00e9s sur immobilisations incorporelles": { + "account_number": "251" + }, + "Avances et acomptes vers\u00e9s sur immobilisations corporelles": { + "account_number": "252" + }, + "account_number": "25" + }, + "Titres de participation": { + "Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": { + "account_number": "261" + }, + "Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le conjoint": { + "account_number": "262" + }, + "Titres de participation dans des soci\u00e9t\u00e9s conf\u00e9rant une influence notable": { + "account_number": "263" + }, + "Participations dans des organismes professionnels": { + "account_number": "265" + }, + "Parts dans des groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": { + "account_number": "266" + }, + "Autres titres de participation": { + "account_number": "268" + }, + "account_number": "26" + }, + "Autres immobilisations financi\u00e8res": { + "Pr\u00eats et cr\u00e9ances": { + "Pr\u00eats participatifs": { + "account_number": "2711" + }, + "Pr\u00eats aux associ\u00e9s": { + "account_number": "2712" + }, + "Billets de fonds": { + "account_number": "2713" + }, + "Titres pr\u00eat\u00e9s": { + "account_number": "2714" + }, + "Autres pr\u00eats et cr\u00e9ances": { + "account_number": "2718" + }, + "account_number": "271" + }, + "Pr\u00eats au personnel": { + "Pr\u00eats immobiliers": { + "account_number": "2721" + }, + "Pr\u00eats mobiliers et d\u2019installation": { + "account_number": "2722" + }, + "Autres pr\u00eats au personnel": { + "account_number": "2728" + }, + "account_number": "272" + }, + "Cr\u00e9ances sur l\u2019\u00c9tat": { + "Retenues de garantie": { + "account_number": "2731" + }, + "Fonds r\u00e9glement\u00e9": { + "account_number": "2733" + }, + "Cr\u00e9ances sur le conc\u00e9dant": { + "account_number": "2734" + }, + "Autres cr\u00e9ances sur l\u2019\u00c9tat": { + "account_number": "2738" + }, + "account_number": "273" + }, + "Titres immobilis\u00e9s": { + "Titres immobilis\u00e9s de l\u2019activit\u00e9 de portefeuille (TIAP)": { + "account_number": "2741" + }, + "Titres participatifs": { + "account_number": "2742" + }, + "Certificats d\u2019investissement": { + "account_number": "2743" + }, + "Parts de fonds commun de placement (FCP)": { + "account_number": "2744" + }, + "Obligations": { + "account_number": "2745" + }, + "Actions ou parts propres": { + "account_number": "2746" + }, + "Autres titres immobilis\u00e9s": { + "account_number": "2748" + }, + "account_number": "274" + }, + "D\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "D\u00e9p\u00f4ts pour loyers d\u2019avance": { + "account_number": "2751" + }, + "D\u00e9p\u00f4ts pour l\u2019\u00e9lectricit\u00e9": { + "account_number": "2752" + }, + "D\u00e9p\u00f4ts pour l\u2019eau": { + "account_number": "2753" + }, + "D\u00e9p\u00f4ts pour le gaz": { + "account_number": "2754" + }, + "D\u00e9p\u00f4ts pour le t\u00e9l\u00e9phone, le t\u00e9lex, la t\u00e9l\u00e9copie": { + "account_number": "2755" + }, + "Cautionnements sur march\u00e9s publics": { + "account_number": "2756" + }, + "Cautionnements sur autres op\u00e9rations": { + "account_number": "2757" + }, + "Autres d\u00e9p\u00f4ts et cautionnements": { + "account_number": "2758" + }, + "account_number": "275" + }, + "Int\u00e9r\u00eats courus": { + "Pr\u00eats et cr\u00e9ances non commerciales": { + "account_number": "2761" + }, + "Pr\u00eats au personnel": { + "account_number": "2762" + }, + "Cr\u00e9ances sur l\u2019\u00c9tat": { + "account_number": "2763" + }, + "Titres immobilis\u00e9s": { + "account_number": "2764" + }, + "D\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "account_number": "2765" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations": { + "account_number": "2767" + }, + "Immobilisations financi\u00e8res diverses": { + "account_number": "2768" + }, + "account_number": "276" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": { + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations (groupe)": { + "account_number": "2771" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations (hors groupe)": { + "account_number": "2772" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": { + "account_number": "2773" + }, + "Avances \u00e0 des Groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": { + "account_number": "2774" + }, + "account_number": "277" + }, + "Immobilisations financi\u00e8res diverses": { + "Cr\u00e9ances diverses groupe": { + "account_number": "2781" + }, + "Cr\u00e9ances diverses hors groupe": { + "account_number": "2782" + }, + "Banques d\u00e9p\u00f4ts \u00e0 terme": { + "account_number": "2784" + }, + "Or et m\u00e9taux pr\u00e9cieux": { + "account_number": "2785" + }, + "Autres immobilisations financi\u00e8res": { + "account_number": "2788" + }, + "account_number": "278" + }, + "account_number": "27" + }, + "Amortissements": { + "account_type": "Accumulated Depreciation", + "Amortissements des immobilisations corporelles": { + "account_type": "Accumulated Depreciation", + "Amortissements des frais de d\u00e9veloppement": { + "account_type": "Accumulated Depreciation", + "account_number": "2811" + }, + "Amortissements des brevets, licences, concessions et droits similaires": { + "account_type": "Accumulated Depreciation", + "account_number": "2812" + }, + "Amortissements des logiciels et sites internet": { + "account_type": "Accumulated Depreciation", + "account_number": "2813" + }, + "Amortissements des marques": { + "account_type": "Accumulated Depreciation", + "account_number": "2814" + }, + "Amortissements du fonds commercial": { + "account_type": "Accumulated Depreciation", + "account_number": "2815" + }, + "Amortissements du droit au bail": { + "account_type": "Accumulated Depreciation", + "account_number": "2816" + }, + "Amortissements des investissements de cr\u00e9ation": { + "account_type": "Accumulated Depreciation", + "account_number": "2817" + }, + "Amortissements des autres droits et valeurs incorporels": { + "account_type": "Accumulated Depreciation", + "account_number": "2818" + }, + "account_number": "281" + }, + "Amortissements des terrains": { + "Amortissements des travaux de mise en valeur des terrains": { + "account_number": "2824" + }, + "account_number": "282" + }, + "Amortissements des b\u00e2timents, installations techniques et agencements": { + "Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "account_number": "2831" + }, + "Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "account_number": "2832" + }, + "Amortissements des ouvrages d\u2019infrastructure": { + "account_number": "2833" + }, + "Amortissements des am\u00e9nagements, agencements et installations techniques": { + "account_number": "2834" + }, + "Amortissements des am\u00e9nagements de bureaux": { + "account_number": "2835" + }, + "Amortissements des b\u00e2timents industriels, agricoles et commerciaux mis en concession": { + "account_number": "2837" + }, + "Amortissements des autres installations et agencements": { + "account_number": "2838" + }, + "account_number": "283" + }, + "Amortissements du mat\u00e9riel": { + "Amortissements du mat\u00e9riel et outillage industriel et commercial": { + "account_number": "2841" + }, + "Amortissements du mat\u00e9riel et outillage agricole": { + "account_number": "2842" + }, + "Amortissements du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "2843" + }, + "Amortissements du mat\u00e9riel et mobilier": { + "account_number": "2844" + }, + "Amortissements du mat\u00e9riel de transport": { + "account_number": "2845" + }, + "Amortissements des actifs biologiques": { + "account_number": "2846" + }, + "Amortissements des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": { + "account_number": "2847" + }, + "Amortissements des autres mat\u00e9riels": { + "account_number": "2848" + }, + "account_number": "284" + }, + "account_number": "28" + }, + "D\u00e9pr\u00e9ciations des immobilisations": { + "D\u00e9pr\u00e9ciations des immobilisations incorporelles": { + "D\u00e9pr\u00e9ciations des frais de d\u00e9veloppement": { + "account_number": "2911" + }, + "D\u00e9pr\u00e9ciations des brevets, licences, concessions et droits similaires": { + "account_number": "2912" + }, + "D\u00e9pr\u00e9ciations des logiciels et sites internet": { + "account_number": "2913" + }, + "D\u00e9pr\u00e9ciations des marques": { + "account_number": "2914" + }, + "D\u00e9pr\u00e9ciations du fonds commercial": { + "account_number": "2915" + }, + "D\u00e9pr\u00e9ciations du droit au bail": { + "account_number": "2916" + }, + "D\u00e9pr\u00e9ciations des investissements de cr\u00e9ation": { + "account_number": "2917" + }, + "D\u00e9pr\u00e9ciations des autres droits et valeurs incorporels": { + "account_number": "2918" + }, + "D\u00e9pr\u00e9ciations des immobilisations incorporelles en cours": { + "account_number": "2919" + }, + "account_number": "291" + }, + "D\u00e9pr\u00e9ciations des terrains": { + "D\u00e9pr\u00e9ciations des terrains agricoles et forestiers": { + "account_number": "2921" + }, + "D\u00e9pr\u00e9ciations des terrains nus": { + "account_number": "2922" + }, + "D\u00e9pr\u00e9ciations des terrains b\u00e2tis": { + "account_number": "2923" + }, + "D\u00e9pr\u00e9ciations des travaux de mise en valeur des terrains": { + "account_number": "2924" + }, + "D\u00e9pr\u00e9ciations des terrains de gisement": { + "account_number": "2925" + }, + "D\u00e9pr\u00e9ciations des terrains am\u00e9nag\u00e9s": { + "account_number": "2926" + }, + "D\u00e9pr\u00e9ciations des terrains mis en concession": { + "account_number": "2927" + }, + "D\u00e9pr\u00e9ciations des autres terrains": { + "account_number": "2928" + }, + "D\u00e9pr\u00e9ciations des am\u00e9nagements de terrains en cours": { + "account_number": "2929" + }, + "account_number": "292" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents, installations techniques et agencements": { + "D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "account_number": "2931" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "account_number": "2932" + }, + "D\u00e9pr\u00e9ciations des ouvrages d\u2019infrastructures": { + "account_number": "2933" + }, + "D\u00e9pr\u00e9ciations des am\u00e9nagements, agencements et installations techniques": { + "account_number": "2934" + }, + "D\u00e9pr\u00e9ciations des am\u00e9nagements de bureaux": { + "account_number": "2935" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles et commerciaux mis en concession": { + "account_number": "2937" + }, + "D\u00e9pr\u00e9ciations des autres installations et agencements": { + "account_number": "2938" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents et installations en cours": { + "account_number": "2939" + }, + "account_number": "293" + }, + "D\u00e9pr\u00e9ciations de mat\u00e9riel, du mobilier et de l\u2019actif biologique": { + "D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage industriel et commercial": { + "account_number": "2941" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage agricole": { + "account_number": "2942" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "2943" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel et mobilier": { + "account_number": "2944" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel de transport": { + "account_number": "2945" + }, + "D\u00e9pr\u00e9ciations des actifs biologiques": { + "account_number": "2946" + }, + "D\u00e9pr\u00e9ciations des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": { + "account_number": "2947" + }, + "D\u00e9pr\u00e9ciations des autres mat\u00e9riels": { + "account_number": "2948" + }, + "D\u00e9pr\u00e9ciations de mat\u00e9riel en cours": { + "account_number": "2949" + }, + "account_number": "294" + }, + "D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations": { + "D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations incorporelles": { + "account_number": "2951" + }, + "D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations corporelles": { + "account_number": "2952" + }, + "account_number": "295" + }, + "D\u00e9pr\u00e9ciations des titres de participation": { + "D\u00e9pr\u00e9ciations des titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": { + "account_number": "2961" + }, + "D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s sous contr\u00f4le conjoint": { + "account_number": "2962" + }, + "D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s conf\u00e9rant une influence notable": { + "account_number": "2963" + }, + "D\u00e9pr\u00e9ciations des participations dans des organismes professionnels": { + "account_number": "2965" + }, + "D\u00e9pr\u00e9ciations des parts dans des GIE": { + "account_number": "2966" + }, + "D\u00e9pr\u00e9ciations des autres titres de participation": { + "account_number": "2968" + }, + "account_number": "296" + }, + "D\u00e9pr\u00e9ciations des autres immobilisations financi\u00e8res": { + "D\u00e9pr\u00e9ciations des pr\u00eats et cr\u00e9ances": { + "account_number": "2971" + }, + "D\u00e9pr\u00e9ciations des pr\u00eats au personnel": { + "account_number": "2972" + }, + "D\u00e9pr\u00e9ciations des cr\u00e9ances sur l\u2019\u00c9tat": { + "account_number": "2973" + }, + "D\u00e9pr\u00e9ciations des titres immobilis\u00e9s": { + "account_number": "2974" + }, + "D\u00e9pr\u00e9ciations des d\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "account_number": "2975" + }, + "D\u00e9pr\u00e9ciations des cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": { + "account_number": "2977" + }, + "D\u00e9pr\u00e9ciations des cr\u00e9ances financi\u00e8res diverses": { + "account_number": "2978" + }, + "account_number": "297" + }, + "account_number": "29" + }, + "root_type": "Asset", + "account_number": "2" + }, + "Comptes de Stocks": { + "Marchandises": { + "Marchandises A": { + "Marchandises A1": { + "account_number": "3111" + }, + "Marchandises A2": { + "account_number": "3112" + }, + "account_number": "311" + }, + "Marchandises B": { + "Marchandises B1": { + "account_number": "3121" + }, + "Marchandises B2": { + "account_number": "3122" + }, + "account_number": "312" + }, + "Actifs biologiques": { + "Animaux": { + "account_number": "3131" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3132" + }, + "account_number": "313" + }, + "Marchandises hors activit\u00e9s ordinaires (HAO)": { + "account_number": "318" + }, + "account_number": "31" + }, + "Mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "Mati\u00e8res A": { + "account_number": "321" + }, + "Mati\u00e8res B": { + "account_number": "322" + }, + "Fournitures (A, B)": { + "account_number": "323" + }, + "account_number": "32" + }, + "Autres approvisionnements": { + "Mati\u00e8res consommables": { + "account_number": "331" + }, + "Fournitures d\u2019atelier et d\u2019usine": { + "account_number": "332" + }, + "Fournitures de magasin": { + "account_number": "333" + }, + "Fournitures de bureau": { + "account_number": "334" + }, + "Emballages": { + "Emballages perdus": { + "account_number": "3351" + }, + "Emballages r\u00e9cup\u00e9rables non identifiables": { + "account_number": "3352" + }, + "Emballages \u00e0 usage mixte": { + "account_number": "3353" + }, + "Autres emballages": { + "account_number": "3358" + }, + "account_number": "335" + }, + "Autres mati\u00e8res": { + "account_number": "338" + }, + "account_number": "33" + }, + "Produits en cours": { + "Produits en cours": { + "Produits en cours P1": { + "account_number": "3411" + }, + "Produits en cours P2": { + "account_number": "3412" + }, + "account_number": "341" + }, + "Travaux en cours": { + "Travaux en cours T1": { + "account_number": "3421" + }, + "Travaux en cours T2": { + "account_number": "3422" + }, + "account_number": "342" + }, + "Produits interm\u00e9diaires en cours": { + "Produits interm\u00e9diaires A": { + "account_number": "3431" + }, + "Produits interm\u00e9diaires B": { + "account_number": "3432" + }, + "account_number": "343" + }, + "Produits r\u00e9siduels en cours": { + "Produits r\u00e9siduels A": { + "account_number": "3441" + }, + "Produits r\u00e9siduels B": { + "account_number": "3442" + }, + "account_number": "344" + }, + "Actifs biologiques en cours": { + "Animaux": { + "account_number": "3451" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3452" + }, + "account_number": "345" + }, + "account_number": "34" + }, + "Services en cours": { + "\u00c9tudes en cours": { + "\u00c9tudes en cours E1": { + "account_number": "3511" + }, + "\u00c9tudes en cours E2": { + "account_number": "3512" + }, + "account_number": "351" + }, + "Prestations de services en cours": { + "Prestations de services S1": { + "account_number": "3521" + }, + "Prestations de services S2": { + "account_number": "3522" + } + }, + "account_number": "35" + }, + "Produits finis": { + "Produits finis A": { + "account_number": "361" + }, + "Produits finis B": { + "account_number": "362" + }, + "Actifs biologiques": { + "Animaux": { + "account_number": "3631" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3632" + }, + "Autres stocks (activit\u00e9s annexes)": { + "account_number": "3638" + }, + "account_number": "363" + }, + "account_number": "36" + }, + "Produits interm\u00e9diaires et r\u00e9siduels": { + "Produits interm\u00e9diaires": { + "Produits interm\u00e9diaires A": { + "account_number": "3711" + }, + "Produits interm\u00e9diaires B": { + "account_number": "3712" + }, + "account_number": "371" + }, + "Produits r\u00e9siduels": { + "D\u00e9chets": { + "account_number": "3721" + }, + "Rebuts": { + "account_number": "3722" + }, + "Mati\u00e8res de R\u00e9cup\u00e9ration": { + "account_number": "3723" + }, + "account_number": "372" + }, + "Actifs biologiques": { + "Animaux": { + "account_number": "3731" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3732" + }, + "Autres stocks (activit\u00e9s annexes)": { + "account_number": "3738" + }, + "account_number": "373" + }, + "account_number": "37" + }, + "Stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": { + "account_type": "Stock", + "Marchandises en cours de route": { + "account_number": "381" + }, + "Mati\u00e8res premi\u00e8res et fournitures li\u00e9es en cours de route": { + "account_number": "382" + }, + "Autres approvisionnements en cours de route": { + "account_number": "383" + }, + "Produits finis en cours de route": { + "account_number": "386" + }, + "Stock en consignation ou en d\u00e9p\u00f4t": { + "Stock en consignation": { + "account_number": "3871" + }, + "Stock en d\u00e9p\u00f4t": { + "account_number": "3872" + }, + "account_number": "387" + }, + "Stock provenant d\u2019immobilisations mises hors service ou au rebut": { + "account_number": "388" + }, + "account_number": "38" + }, + "D\u00e9pr\u00e9ciations des stocks et encours de production": { + "D\u00e9pr\u00e9ciations des stocks de marchandises": { + "account_number": "391" + }, + "D\u00e9pr\u00e9ciations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "account_number": "392" + }, + "D\u00e9pr\u00e9ciations des stocks d\u2019autres approvisionnements": { + "account_number": "393" + }, + "D\u00e9pr\u00e9ciations des productions en cours": { + "account_number": "394" + }, + "D\u00e9pr\u00e9ciations des services en cours": { + "account_number": "395" + }, + "D\u00e9pr\u00e9ciations des stocks de produits finis": { + "account_number": "396" + }, + "D\u00e9pr\u00e9ciations des stocks de produits interm\u00e9diaires et r\u00e9siduels": { + "account_number": "397" + }, + "D\u00e9pr\u00e9ciations des stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": { + "account_number": "398" + }, + "account_number": "39" + }, + "root_type": "Asset", + "account_number": "3" + }, + "4-Comptes de Tiers (ACTIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (ACTIF)": { + "Fournisseurs d\u00e9biteurs": { + "Fournisseurs Avances et acomptes vers\u00e9s": { + "account_number": "4091" + }, + "Fournisseurs Groupe avances et acomptes vers\u00e9s": { + "account_number": "4092" + }, + "Fournisseurs Sous-traitants avances et acomptes vers\u00e9s": { + "account_number": "4093" + }, + "Fournisseurs Cr\u00e9ances pour emballages et mat\u00e9riels \u00e0 rendre": { + "account_number": "4094" + }, + "Fournisseurs Rabais, remises, ristournes et autres avoirs \u00e0 obtenir": { + "account_number": "4098" + }, + "account_number": "409" + } + }, + "41-Clients et comptes rattach\u00e9s (ACTIF)": { + "Clients": { + "Clients": { + "account_type": "Receivable", + "account_number": "4111" + }, + "Clients groupe": { + "account_type": "Receivable", + "account_number": "4112" + }, + "Clients, \u00c9tat et Collectivit\u00e9s publiques": { + "account_type": "Receivable", + "account_number": "4114" + }, + "Clients, organismes internationaux": { + "account_type": "Receivable", + "account_number": "4115" + }, + "Clients, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Receivable", + "account_number": "4116" + }, + "Client, retenues de garantie": { + "account_type": "Receivable", + "account_number": "4117" + }, + "Clients, d\u00e9gr\u00e8vement de taxes sur la valeur ajout\u00e9e (TVA)": { + "account_type": "Receivable", + "account_number": "4118" + }, + "account_type": "Receivable", + "account_number": "411" + }, + "Clients, effets \u00e0 recevoir en portefeuille": { + "Clients, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4121" + }, + "Clients Groupe, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4122" + }, + "\u00c9tat et Collectivit\u00e9s publiques, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4124" + }, + "Organismes Internationaux, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4125" + }, + "account_type": "Receivable", + "account_number": "412" + }, + "Clients, ch\u00e8ques, effets et autres valeurs impay\u00e9es": { + "Clients, ch\u00e8ques impay\u00e9s": { + "account_type": "Receivable", + "account_number": "4131" + }, + "Clients, effets impay\u00e9s": { + "account_type": "Receivable", + "account_number": "4132" + }, + "Clients, cartes de cr\u00e9dit impay\u00e9es": { + "account_type": "Receivable", + "account_number": "4133" + }, + "Clients, autres valeurs impay\u00e9es": { + "account_type": "Receivable", + "account_number": "4138" + }, + "account_type": "Receivable", + "account_number": "413" + }, + "Cr\u00e9ances sur cessions courantes d\u2019immobilisations": { + "Cr\u00e9ances en compte, immobilisations incorporelles": { + "account_type": "Receivable", + "account_number": "4141" + }, + "Cr\u00e9ances en compte, immobilisations corporelles": { + "account_type": "Receivable", + "account_number": "4142" + }, + "Effets \u00e0 recevoir, immobilisations incorporelles": { + "account_type": "Receivable", + "account_number": "4146" + }, + "Effets \u00e0 recevoir, immobilisations corporelles": { + "account_type": "Receivable", + "account_number": "4147" + }, + "account_type": "Receivable", + "account_number": "414" + }, + "Clients, effets escompt\u00e9s non \u00e9chus": { + "account_type": "Receivable", + "account_number": "415" + }, + "Cr\u00e9ances clients litigieuses ou douteuses": { + "Cr\u00e9ances litigieuses": { + "account_type": "Receivable", + "account_number": "4161" + }, + "Cr\u00e9ances douteuses": { + "account_type": "Receivable", + "account_number": "4162" + }, + "account_type": "Receivable", + "account_number": "416" + }, + "Clients, produits \u00e0 recevoir": { + "Clients, factures \u00e0 \u00e9tablir": { + "account_type": "Receivable", + "account_number": "4181" + }, + "Clients, int\u00e9r\u00eats courus": { + "account_type": "Receivable", + "account_number": "4186" + }, + "account_type": "Receivable", + "account_number": "418" + }, + "account_type": "Receivable" + }, + "42-Personnel (ACTIF)": { + "Personnel, avances et acomptes": { + "Personnel, avances": { + "account_number": "4211" + }, + "Personnel, acomptes": { + "account_number": "4212" + }, + "Frais avanc\u00e9s et fournitures au personnel": { + "account_number": "4213" + }, + "account_number": "421" + } + }, + "43-Organismes sociaux (ACTIF)": { + "431-S\u00e9curit\u00e9 sociale": { + "Prestations familiales": { + "account_number": "4311" + }, + "Accidents de travail": { + "account_number": "4312" + }, + "Caisse de retraite obligatoire": { + "account_number": "4313" + }, + "Caisse de retraite facultative": { + "account_number": "4314" + }, + "Autres cotisations sociales": { + "account_number": "4318" + } + }, + "432-Caisses de retraite compl\u00e9mentaire": {}, + "433-Autres organismes sociaux": { + "Mutuelle": { + "account_number": "4331" + }, + "Assurances retraite": { + "account_number": "4332" + }, + "Assurances et organismes de sant\u00e9": { + "account_number": "4333" + } + }, + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "Produits \u00e0 recevoir": { + "account_number": "4387" + } + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (ACTIF)": { + "\u00c9tat, TVA factur\u00e9e": { + "TVA factur\u00e9e sur ventes": { + "account_number": "4431" + }, + "TVA factur\u00e9e sur prestations de services": { + "account_number": "4432" + }, + "TVA factur\u00e9e sur travaux": { + "account_number": "4433" + }, + "TVA factur\u00e9e sur production livr\u00e9e \u00e0 soi-m\u00eame": { + "account_number": "4434" + }, + "TVA sur factures \u00e0 \u00e9tablir": { + "account_number": "4435" + }, + "account_number": "443" + }, + "\u00c9tat, TVA r\u00e9cup\u00e9rable": { + "TVA r\u00e9cup\u00e9rable sur immobilisations": { + "account_number": "4451" + }, + "TVA r\u00e9cup\u00e9rable sur achats": { + "account_number": "4452" + }, + "TVA r\u00e9cup\u00e9rable sur transport": { + "account_number": "4453" + }, + "TVA r\u00e9cup\u00e9rable sur services ext\u00e9rieurs et autres charges": { + "account_number": "4454" + }, + "TVA r\u00e9cup\u00e9rable sur factures non parvenues": { + "account_number": "4455" + }, + "TVA transf\u00e9r\u00e9e par d\u2019autres entit\u00e9s": { + "account_number": "4456" + }, + "account_number": "445" + }, + "\u00c9tat, charges \u00e0 payer et produits \u00e0 recevoir": { + "Charges \u00e0 payer": { + "account_number": "4486" + }, + "Produits \u00e0 recevoir": { + "account_number": "4487" + }, + "account_number": "448" + }, + "\u00c9tat, cr\u00e9ances et dettes diverses": { + "\u00c9tat, obligations cautionn\u00e9es": { + "account_number": "4491" + }, + "\u00c9tat, avances et acomptes vers\u00e9s sur imp\u00f4ts": { + "account_number": "4492" + }, + "\u00c9tat, fonds de dotation \u00e0 recevoir": { + "account_number": "4493" + }, + "\u00c9tat, subventions investissement \u00e0 recevoir": { + "account_number": "4494" + }, + "\u00c9tat, subventions d\u2019exploitation \u00e0 recevoir": { + "account_number": "4495" + }, + "\u00c9tat, subventions d\u2019\u00e9quilibre \u00e0 recevoir": { + "account_number": "4496" + }, + "\u00c9tat, avances sur subventions": { + "account_number": "4497" + }, + "\u00c9tat, fonds r\u00e9glement\u00e9s provisionn\u00e9s": { + "account_number": "4499" + }, + "account_number": "449" + } + }, + "45-Organismes internationaux (ACTIF)": { + "Op\u00e9rations avec les organismes africains": { + "account_number": "451" + }, + "Op\u00e9rations avec les autres organismes internationaux": { + "account_number": "452" + }, + "Organismes internationaux, fonds de dotation et subventions \u00e0 recevoir": { + "Organismes internationaux, fonds de dotation \u00e0 recevoir": { + "account_number": "4581" + }, + "Organismes internationaux, subventions \u00e0 recevoir": { + "account_number": "4582" + }, + "account_number": "458" + } + }, + "46-Apporteurs, associ\u00e9s et groupe (ACTIF)": { + "461-Apporteurs, op\u00e9rations sur le capital": { + "Apporteurs, capital appel\u00e9, non vers\u00e9": { + "account_number": "4613" + }, + "Apporteurs, compte d\u2019apport, op\u00e9rations de restructuration (fusion...)": { + "account_number": "4614" + }, + "Apporteurs, titres \u00e0 \u00e9changer": { + "account_number": "4618" + } + }, + "Apporteurs, restant d\u00fb sur capital appel\u00e9": { + "account_number": "467" + } + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (ACTIF)": { + "472-Cr\u00e9ances et dettes sur titres de placement": { + "Cr\u00e9ances sur cessions de titres de placement": { + "account_number": "4721" + }, + "Versements restant \u00e0 effectuer sur titres de placement non lib\u00e9r\u00e9s": { + "account_number": "4726" + } + }, + "473-Interm\u00e9diaires Op\u00e9rations faites pour compte de tiers": { + "Mandants": { + "account_number": "4731" + }, + "Mandataires": { + "account_number": "4732" + }, + "Commettants": { + "account_number": "4733" + }, + "Commissionnaires": { + "account_number": "4734" + }, + "\u00c9tat, Collectivit\u00e9s publiques, fonds global d\u2019allocation": { + "account_number": "4739" + } + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits": { + "Compte de r\u00e9partition p\u00e9riodique des produits": { + "account_number": "4747" + } + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA": { + "Compte actif": { + "account_type": "Temporary", + "account_number": "4751" + } + }, + "Charges constat\u00e9es d\u2019avance": { + "account_number": "476" + }, + "478-\u00c9carts de conversion actif": { + "Diminution des cr\u00e9ances d\u2019exploitation": { + "account_number": "4781" + }, + "Diminution des cr\u00e9ances financi\u00e8res": { + "account_number": "4782" + }, + "Augmentation des dettes d\u2019exploitation": { + "account_number": "4783" + }, + "Augmentation des dettes financi\u00e8res": { + "account_number": "4784" + }, + "Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": { + "account_number": "4786" + }, + "Diff\u00e9rences compens\u00e9es par couverture de change": { + "account_number": "4788" + } + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (ACTIF)": { + "Cr\u00e9ances sur cessions d\u2019immobilisations": { + "En compte, immobilisations incorporelles": { + "account_number": "4851" + }, + "En compte, immobilisations corporelles": { + "account_number": "4852" + }, + "Effets \u00e0 recevoir, immobilisations incorporelles": { + "account_number": "4853" + }, + "Effets \u00e0 recevoir, immobilisations corporelles": { + "account_number": "4854" + }, + "Effets escompt\u00e9s non \u00e9chus": { + "account_number": "4855" + }, + "Retenues de garantie": { + "account_number": "4857" + }, + "Factures \u00e0 \u00e9tablir": { + "account_number": "4858" + }, + "account_number": "485" + }, + "Autres cr\u00e9ances hors activit\u00e9s ordinaires (HAO)": { + "account_number": "488" + } + }, + "49-D\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme (tiers) (ACTIF)": { + "D\u00e9pr\u00e9ciations des comptes clients": { + "Cr\u00e9ances litigieuses": { + "account_number": "4911" + }, + "Cr\u00e9ances douteuses": { + "account_number": "4912" + }, + "account_number": "491" + }, + "D\u00e9pr\u00e9ciations des comptes organismes internationaux": { + "account_number": "495" + }, + "D\u00e9pr\u00e9ciations des comptes apporteurs, associ\u00e9s et groupe": { + "Associ\u00e9s, comptes courants": { + "account_number": "4962" + }, + "Associ\u00e9s, op\u00e9rations faites en commun": { + "account_number": "4963" + }, + "Groupe, comptes courants": { + "account_number": "4966" + }, + "account_number": "496" + }, + "D\u00e9pr\u00e9ciations des comptes d\u00e9biteurs divers": { + "account_number": "497" + }, + "D\u00e9pr\u00e9ciations des comptes de cr\u00e9ances HAO": { + "Cr\u00e9ances sur cessions d\u2019immobilisations": { + "account_number": "4985" + }, + "Cr\u00e9ances sur cessions de titres de placement": { + "account_number": "4986" + }, + "Autres cr\u00e9ances HAO": { + "account_number": "4988" + }, + "account_number": "498" + }, + "Provisions pour risques \u00e0 court terme": { + "Sur op\u00e9rations d\u2019exploitation": { + "account_number": "4991" + }, + "Sur op\u00e9rations financi\u00e8res": { + "account_number": "4997" + }, + "Sur op\u00e9rations HAO": { + "account_number": "4998" + }, + "account_number": "499" + } + }, + "root_type": "Asset" + }, + "4-Comptes de Tiers (PASSIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (PASSIF)": { + "Fournisseurs, dettes en compte": { + "Fournisseurs": { + "account_type": "Payable", + "account_number": "4011" + }, + "Fournisseurs groupe": { + "account_type": "Payable", + "account_number": "4012" + }, + "Fournisseurs sous-traitants": { + "account_type": "Payable", + "account_number": "4013" + }, + "Fournisseurs, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Payable", + "account_number": "4016" + }, + "Fournisseur, retenues de garantie": { + "account_type": "Payable", + "account_number": "4017" + }, + "account_type": "Payable", + "account_number": "401" + }, + "Fournisseurs, effets \u00e0 payer": { + "Fournisseurs Effets \u00e0 payer": { + "account_type": "Payable", + "account_number": "4021" + }, + "Fournisseurs Groupe, effets \u00e0 payer": { + "account_type": "Payable", + "account_number": "4022" + }, + "Fournisseurs Sous-traitants, effets \u00e0 payer": { + "account_type": "Payable", + "account_number": "4023" + }, + "account_type": "Payable", + "account_number": "402" + }, + "Fournisseurs, acquisitions courantes d\u2019immobilisations": { + "Fournisseurs Dettes en comptes, immobilisations incorporelles": { + "account_type": "Payable", + "account_number": "4041" + }, + "Fournisseurs Dettes en comptes, immobilisations corporelles": { + "account_type": "Payable", + "account_number": "4042" + }, + "Fournisseurs Effets \u00e0 payer, immobilisations incorporelles": { + "account_type": "Payable", + "account_number": "4046" + }, + "Fournisseurs Effets \u00e0 payer, immobilisations corporelles": { + "account_type": "Payable", + "account_number": "4047" + }, + "account_type": "Payable", + "account_number": "404" + }, + "Fournisseurs, factures non parvenues": { + "Fournisseurs": { + "account_type": "Stock Received But Not Billed", + "account_number": "4081" + }, + "Fournisseurs groupe": { + "account_type": "Stock Received But Not Billed", + "account_number": "4082" + }, + "Fournisseurs sous-traitants": { + "account_type": "Stock Received But Not Billed", + "account_number": "4083" + }, + "Fournisseurs, int\u00e9r\u00eats courus": { + "account_type": "Stock Received But Not Billed", + "account_number": "4086" + }, + "account_type": "Stock Received But Not Billed", + "account_number": "408" + }, + "account_type": "Payable" + }, + "41-Clients et comptes rattach\u00e9s (PASSIF)": { + "Clients cr\u00e9diteurs": { + "Clients, avances et acomptes re\u00e7us": { + "account_number": "4191" + }, + "Clients groupe, avances et acomptes re\u00e7us": { + "account_number": "4192" + }, + "Clients, dettes pour emballages et mat\u00e9riels consign\u00e9s": { + "account_number": "4194" + }, + "Clients, rabais, remises, ristournes et autres avoirs \u00e0 accorder": { + "account_number": "4198" + }, + "account_number": "419" + } + }, + "42-Personnel (PASSIF)": { + "Personnel, r\u00e9mun\u00e9rations dues": { + "account_number": "422" + }, + "Personnel, oppositions, saisies-arr\u00eats": { + "Personnel, oppositions": { + "account_number": "4231" + }, + "Personnel, saisies-arr\u00eats": { + "account_number": "4232" + }, + "Personnel, avis \u00e0 tiers d\u00e9tenteur": { + "account_number": "4233" + }, + "account_number": "423" + }, + "Personnel, \u0153uvres sociales internes": { + "Assistance m\u00e9dicale": { + "account_number": "4241" + }, + "Allocations familiales": { + "account_number": "4242" + }, + "Organismes sociaux rattach\u00e9s \u00e0 l\u2019entit\u00e9": { + "account_number": "4245" + }, + "Autres \u0153uvres sociales internes": { + "account_number": "4248" + }, + "account_number": "424" + }, + "Repr\u00e9sentants du personnel": { + "D\u00e9l\u00e9gu\u00e9s du personnel": { + "account_number": "4251" + }, + "Syndicats et Comit\u00e9s d\u2019entreprises, d\u2019\u00c9tablissement": { + "account_number": "4252" + }, + "Autres repr\u00e9sentants du personnel": { + "account_number": "4258" + }, + "account_number": "425" + }, + "Personnel, participation aux b\u00e9n\u00e9fices et au capital": { + "Participation aux b\u00e9n\u00e9fices": { + "account_number": "4261" + }, + "Participation au capital": { + "account_number": "4264" + }, + "account_number": "426" + }, + "Personnel d\u00e9p\u00f4ts": { + "account_number": "427" + }, + "Personnel, charges \u00e0 payer et produits \u00e0 recevoir": { + "Dettes provisionn\u00e9es pour cong\u00e9s \u00e0 payer": { + "account_number": "4281" + }, + "Autres charges \u00e0 payer": { + "account_number": "4286" + }, + "Produits \u00e0 recevoir": { + "account_number": "4287" + }, + "account_number": "428" + } + }, + "43-Organismes sociaux (PASSIF)": { + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "Charges sociales sur gratifications \u00e0 payer": { + "account_number": "4381" + }, + "Charges sociales sur cong\u00e9s \u00e0 payer": { + "account_number": "4382" + }, + "Autres charges \u00e0 payer": { + "account_number": "4386" + } + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (PASSIF)": { + "\u00c9tat, imp\u00f4t sur les b\u00e9n\u00e9fices": { + "account_number": "441" + }, + "\u00c9tat, autres imp\u00f4ts et taxes": { + "Imp\u00f4ts et taxes d\u2019\u00c9tat": { + "account_number": "4421" + }, + "Imp\u00f4ts et taxes pour les collectivit\u00e9s publiques": { + "account_number": "4422" + }, + "Imp\u00f4ts et taxes recouvrables sur des obligataires": { + "account_number": "4423" + }, + "Imp\u00f4ts et taxes recouvrables sur des associ\u00e9s": { + "account_number": "4424" + }, + "Droits de douane": { + "account_number": "4426" + }, + "Autres imp\u00f4ts et taxes": { + "account_number": "4428" + }, + "account_number": "442" + }, + "\u00c9tat, TVA due ou cr\u00e9dit de TVA": { + "\u00c9tat, TVA due": { + "account_number": "4441" + }, + "\u00c9tat, cr\u00e9dit de TVA \u00e0 reporter": { + "account_number": "4449" + }, + "account_number": "444" + }, + "\u00c9tat, autres taxes sur le chiffre d\u2019affaires": { + "account_number": "446" + }, + "\u00c9tat, imp\u00f4ts retenus \u00e0 la source": { + "Imp\u00f4t G\u00e9n\u00e9ral sur le revenu": { + "account_number": "4471" + }, + "Imp\u00f4ts sur salaires": { + "account_number": "4472" + }, + "Contribution nationale": { + "account_number": "4473" + }, + "Contribution nationale de solidarit\u00e9": { + "account_number": "4474" + }, + "Autres imp\u00f4ts et contributions": { + "account_number": "4478" + }, + "account_number": "447" + } + }, + "46-Apporteurs, associ\u00e9s et groupe (PASSIF)": { + "461-Apporteurs, op\u00e9rations sur le capital (PASSIF)": { + "Apporteurs, apports en nature": { + "account_number": "4611" + }, + "Apporteurs, apports en num\u00e9raire": { + "account_number": "4612" + }, + "Apporteurs, versements re\u00e7us sur augmentation de capital": { + "account_number": "4615" + }, + "Apporteurs, versements anticip\u00e9s": { + "account_number": "4616" + }, + "Apporteurs d\u00e9faillants": { + "account_number": "4617" + }, + "Apporteurs, capital \u00e0 rembourser": { + "account_number": "4619" + } + }, + "462-Associ\u00e9s, comptes courants": { + "Principal": { + "account_number": "4621" + }, + "Int\u00e9r\u00eats courus": { + "account_number": "4626" + } + }, + "463-Associ\u00e9s, op\u00e9rations faites en commun et GIE": { + "Op\u00e9rations courantes": { + "account_number": "4631" + }, + "Int\u00e9r\u00eats courus": { + "account_number": "4636" + } + }, + "Associ\u00e9s, dividendes \u00e0 payer": { + "account_number": "465" + }, + "Groupe, comptes courants": { + "account_number": "466" + } + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (PASSIF)": { + "471-D\u00e9biteurs et cr\u00e9diteurs divers": { + "D\u00e9biteurs divers": { + "account_number": "4711" + }, + "Cr\u00e9diteurs divers": { + "account_number": "4712" + }, + "Obligataires": { + "account_number": "4713" + }, + "R\u00e9mun\u00e9rations d\u2019administrateurs": { + "account_number": "4715" + }, + "Compte d\u2019affacturage": { + "account_number": "4716" + }, + "D\u00e9biteurs divers retenues de garantie": { + "account_number": "4717" + }, + "Apport, compte de fusion et op\u00e9rations assimil\u00e9es": { + "account_number": "4718" + }, + "Bons de souscription d\u2019actions et d\u2019obligations": { + "account_number": "4719" + } + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits (PASSIF)": { + "Compte de r\u00e9partition p\u00e9riodique des charges": { + "account_number": "4746" + } + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA (PASSIF)": { + "Compte passif": { + "account_number": "4752" + } + }, + "Produits constat\u00e9s d\u2019avance": { + "account_number": "477" + }, + "479-\u00c9carts de conversion passif": { + "Augmentation des cr\u00e9ances d\u2019exploitation": { + "account_number": "4791" + }, + "Augmentation des cr\u00e9ances financi\u00e8res": { + "account_number": "4792" + }, + "Diminution des dettes d\u2019exploitation": { + "account_number": "4793" + }, + "Diminution des dettes financi\u00e8res": { + "account_number": "4794" + }, + "Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": { + "account_number": "4797" + }, + "Diff\u00e9rences compens\u00e9es par couverture de change": { + "account_number": "4798" + } + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (HAO) (PASSIF)": { + "Fournisseurs d\u2019investissements": { + "Immobilisations incorporelles": { + "account_number": "4811" + }, + "Immobilisations corporelles": { + "account_number": "4812" + }, + "Versements restant \u00e0 effectuer sur titres de participation et titres immobilis\u00e9s non lib\u00e9r\u00e9s": { + "account_number": "4813" + }, + "R\u00e9serve de propri\u00e9t\u00e9": { + "account_number": "4816" + }, + "Retenues de garantie": { + "account_number": "4817" + }, + "Factures non parvenues": { + "account_number": "4818" + }, + "account_number": "481" + }, + "Fournisseurs d\u2019investissements, effets \u00e0 payer": { + "Immobilisations incorporelles": { + "account_number": "4821" + }, + "Immobilisations corporelles": { + "account_number": "4822" + }, + "account_number": "482" + }, + "Autres dettes hors activit\u00e9s ordinaires (HAO)": { + "Produits": { + "account_number": "4887" + }, + "account_number": "484" + } + }, + "root_type": "Liability" + }, + "Comptes de tr\u00e9sorerie": { + "Titres de placement": { + "Titres du tr\u00e9sor et bons de caisse \u00e0 court terme": { + "Titres du Tr\u00e9sor \u00e0 court terme": { + "account_number": "5011" + }, + "Titres d\u2019organismes financiers": { + "account_number": "5012" + }, + "Bons de caisse \u00e0 court terme": { + "account_number": "5013" + }, + "Frais d\u2019acquisition des titres de tr\u00e9sor et bons de caisse": { + "account_number": "5016" + }, + "account_number": "501" + }, + "Actions": { + "Actions ou parts propres": { + "account_number": "5021" + }, + "Actions cot\u00e9es": { + "account_number": "5022" + }, + "Actions non cot\u00e9es": { + "account_number": "5023" + }, + "Actions d\u00e9membr\u00e9es (certificats d\u2019investissement, droits de vote)": { + "account_number": "5024" + }, + "Autres actions": { + "account_number": "5025" + }, + "Frais d\u2019acquisition des actions": { + "account_number": "5026" + }, + "account_number": "502" + }, + "Obligations": { + "Obligations \u00e9mises par la soci\u00e9t\u00e9 et rachet\u00e9es par elle": { + "account_number": "5031" + }, + "Obligations cot\u00e9es": { + "account_number": "5032" + }, + "Obligations non cot\u00e9es": { + "account_number": "5033" + }, + "Autres obligations": { + "account_number": "5035" + }, + "Frais d\u2019acquisition des obligations": { + "account_number": "5036" + }, + "account_number": "503" + }, + "Bons de souscription": { + "Bons de souscription d\u2019actions": { + "account_number": "5042" + }, + "Bons de souscription d\u2019obligations": { + "account_number": "5043" + }, + "account_number": "504" + }, + "Titres n\u00e9gociables hors r\u00e9gion": { + "account_number": "505" + }, + "Int\u00e9r\u00eats courus": { + "Titres du Tr\u00e9sor et bons de caisse \u00e0 court terme": { + "account_number": "5061" + }, + "Actions": { + "account_number": "5062" + }, + "Obligations": { + "account_number": "5063" + }, + "account_number": "506" + }, + "Autres titres de placement et cr\u00e9ances assimil\u00e9es": { + "account_number": "508" + }, + "account_number": "50" + }, + "Valeurs \u00e0 encaisser": { + "Effets \u00e0 encaisser": { + "account_number": "511" + }, + "Effets \u00e0 l\u2019encaissement": { + "account_number": "512" + }, + "Ch\u00e8ques \u00e0 encaisser": { + "account_number": "513" + }, + "Ch\u00e8ques \u00e0 l\u2019encaissement": { + "account_number": "514" + }, + "Cartes de cr\u00e9dit \u00e0 encaisser": { + "account_number": "515" + }, + "Autres valeurs \u00e0 l\u2019encaissement": { + "Warrants": { + "account_number": "5181" + }, + "Billets de fonds": { + "account_number": "5182" + }, + "Ch\u00e8ques de voyage": { + "account_number": "5185" + }, + "Coupons \u00e9chus": { + "account_number": "5186" + }, + "Int\u00e9r\u00eats \u00e9chus des obligations": { + "account_number": "5187" + }, + "account_number": "518" + }, + "account_number": "51" + }, + "Banques": { + "Banques locales": { + "Banques en monnaie nationale": { + "account_type": "Bank", + "account_number": "5211" + }, + "Banques en devises": { + "account_type": "Bank", + "account_number": "5215" + }, + "account_type": "Bank", + "account_number": "521" + }, + "Banques autres \u00c9tats r\u00e9gion": { + "account_number": "522" + }, + "Banques autres \u00c9tats zone mon\u00e9taire": { + "account_number": "523" + }, + "Banques hors zone mon\u00e9taire": { + "account_number": "524" + }, + "Banques d\u00e9p\u00f4t \u00e0 terme": { + "account_number": "525" + }, + "Banques, int\u00e9r\u00eats courus": { + "Banque, int\u00e9r\u00eats courus, charges \u00e0 payer": { + "account_number": "5261" + }, + "Banque, int\u00e9r\u00eats courus, produits \u00e0 recevoir": { + "account_number": "5267" + }, + "account_number": "526" + }, + "account_number": "52" + }, + "\u00c9tablissements financiers et assimil\u00e9s": { + "Ch\u00e8ques postaux": { + "account_number": "531" + }, + "Tr\u00e9sor": { + "account_number": "532" + }, + "Soci\u00e9t\u00e9s de gestion et d\u2019interm\u00e9diation (SGI)": { + "account_number": "533" + }, + "\u00c9tablissements financiers, int\u00e9r\u00eats courus": { + "account_number": "536" + }, + "Autres organismes financiers": { + "account_number": "538" + }, + "account_number": "53" + }, + "Instruments de tr\u00e9sorerie": { + "Options de taux d\u2019int\u00e9r\u00eat": { + "account_number": "541" + }, + "Options de taux de change": { + "account_number": "542" + }, + "Options de taux boursiers": { + "account_number": "543" + }, + "Instruments de march\u00e9s \u00e0 terme": { + "account_number": "544" + }, + "Avoirs d\u2019or et autres m\u00e9taux pr\u00e9cieux": { + "account_number": "545" + }, + "account_number": "54" + }, + "Instruments de monnaie \u00e9lectronique": { + "Monnaie \u00e9lectronique carte carburant": { + "account_number": "551" + }, + "Monnaie \u00e9lectronique t\u00e9l\u00e9phone portable": { + "account_number": "552" + }, + "Monnaie \u00e9lectronique carte p\u00e9age": { + "account_number": "553" + }, + "Porte-monnaie \u00e9lectronique": { + "account_number": "554" + }, + "Autres instruments de monnaies \u00e9lectroniques": { + "account_number": "558" + }, + "account_number": "55" + }, + "Banques, cr\u00e9dits de tr\u00e9sorerie et d\u2019escompte": { + "Cr\u00e9dits de tr\u00e9sorerie": { + "account_number": "561" + }, + "Escompte de cr\u00e9dits de campagne": { + "account_number": "564" + }, + "Escompte de cr\u00e9dits ordinaires": { + "account_number": "565" + }, + "Banques, cr\u00e9dits de tr\u00e9sorerie, int\u00e9r\u00eats courus": { + "account_number": "566" + }, + "account_number": "56" + }, + "Caisse": { + "Caisse si\u00e8ge social": { + "Caisse en monnaie nationale": { + "account_number": "5711" + }, + "Caisse en devises": { + "account_number": "5712" + }, + "account_number": "571" + }, + "Caisse succursale A": { + "En monnaie nationale": { + "account_number": "5721" + }, + "En devises": { + "account_number": "5722" + }, + "account_number": "572" + }, + "Caisse succursale B": { + "En monnaie nationale": { + "account_number": "5731" + }, + "En devises": { + "account_number": "5732" + }, + "account_number": "573" + }, + "account_number": "57" + }, + "R\u00e9gies d\u2019avances, accr\u00e9ditifs et virements internes": { + "R\u00e9gies d\u2019avance": { + "account_number": "581" + }, + "Accr\u00e9ditifs": { + "account_number": "582" + }, + "Virements de fonds": { + "account_number": "585" + }, + "Autres virements internes": { + "account_number": "588" + }, + "account_number": "58" + }, + "D\u00e9pr\u00e9ciations et provisions pour risque \u00e0 court terme": { + "D\u00e9pr\u00e9ciations des titres de placement": { + "account_number": "590" + }, + "D\u00e9pr\u00e9ciations des titres et valeurs \u00e0 encaisser": { + "account_number": "591" + }, + "D\u00e9pr\u00e9ciations des comptes banques": { + "account_number": "592" + }, + "D\u00e9pr\u00e9ciations des comptes \u00e9tablissements financiers et assimil\u00e9s": { + "account_number": "593" + }, + "D\u00e9pr\u00e9ciations des comptes d\u2019instruments de tr\u00e9sorerie": { + "account_number": "594" + }, + "Provisions pour risque \u00e0 court terme \u00e0 caract\u00e8re financier": { + "account_number": "599" + }, + "account_number": "59" + }, + "root_type": "Asset", + "account_number": "5" + }, + "Comptes de charges des activit\u00e9s ordinaires": { + "Achats et variations de stocks": { + "Achats de marchandises": { + "Dans la R\u00e9gion": { + "account_number": "6011" + }, + "Hors R\u00e9gion": { + "account_number": "6012" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "6013" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "6014" + }, + "Frais sur achats": { + "account_number": "6015" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6019" + }, + "account_number": "601" + }, + "Achats de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "Dans la R\u00e9gion": { + "account_number": "6021" + }, + "Hors R\u00e9gion": { + "account_number": "6022" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "6023" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "6024" + }, + "Frais sur achats": { + "account_number": "6025" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6029" + }, + "account_number": "602" + }, + "Variations des stocks de biens achet\u00e9s": { + "Variations des stocks de marchandises": { + "account_number": "6031" + }, + "Variations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "account_number": "6032" + }, + "Variations des stocks d\u2019autres approvisionnements": { + "account_number": "6033" + }, + "account_number": "603" + }, + "Achats stock\u00e9s de mati\u00e8res et fournitures consommables": { + "Mati\u00e8res consommables": { + "account_number": "6041" + }, + "Mati\u00e8res combustibles": { + "account_number": "6042" + }, + "Produits d\u2019entretien": { + "account_number": "6043" + }, + "Fournitures d\u2019atelier et d\u2019usine": { + "account_number": "6044" + }, + "Frais sur achat": { + "account_number": "6045" + }, + "Fournitures de magasin": { + "account_number": "6046" + }, + "Fournitures de bureau": { + "account_number": "6047" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6049" + }, + "account_number": "604" + }, + "Autres achats": { + "Fournitures non stockables Eau": { + "account_number": "6051" + }, + "Fournitures non stockables \u00c9lectricit\u00e9": { + "account_number": "6052" + }, + "Fournitures non stockables Autres \u00e9nergies": { + "account_number": "6053" + }, + "Fournitures d\u2019entretien non stockables": { + "account_number": "6054" + }, + "Fournitures de bureau non stockables": { + "account_number": "6055" + }, + "Achats de petit mat\u00e9riel et outillage": { + "account_number": "6056" + }, + "Achats d\u2019\u00e9tudes et prestations de services": { + "account_number": "6057" + }, + "Achats de travaux, mat\u00e9riels et \u00e9quipements": { + "account_number": "6058" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6059" + }, + "account_number": "605" + }, + "Achats d\u2019emballages": { + "Emballages perdus": { + "account_number": "6081" + }, + "Emballages r\u00e9cup\u00e9rables non identifiables": { + "account_number": "6082" + }, + "Emballages \u00e0 usage mixte": { + "account_number": "6083" + }, + "Frais sur achats": { + "account_number": "6085" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6089" + }, + "account_number": "608" + }, + "account_number": "60" + }, + "Transports": { + "Transports sur ventes": { + "account_number": "612" + }, + "Transports pour le compte de tiers": { + "account_number": "613" + }, + "Transports du personnel": { + "account_number": "614" + }, + "Transports de plis": { + "account_number": "616" + }, + "Autres frais de transport": { + "Voyages et d\u00e9placements": { + "account_number": "6181" + }, + "Transports entre \u00e9tablissements ou chantiers": { + "account_number": "6182" + }, + "Transports administratifs": { + "account_number": "6183" + }, + "account_number": "618" + }, + "account_number": "61" + }, + "Services ext\u00e9rieurs": { + "Sous-traitance g\u00e9n\u00e9rale": { + "account_number": "621" + }, + "Locations, charges locatives": { + "Locations de terrains": { + "account_number": "6221" + }, + "Locations de b\u00e2timents": { + "account_number": "6222" + }, + "Locations de mat\u00e9riels et outillages": { + "account_number": "6223" + }, + "Malis sur emballages": { + "account_number": "6224" + }, + "Locations d\u2019emballages": { + "account_number": "6225" + }, + "Fermages et loyers du foncier": { + "account_number": "6226" + }, + "Locations et charges locatives diverses": { + "account_number": "6228" + }, + "account_number": "622" + }, + "Redevances de location acquisition": { + "Cr\u00e9dit-bail immobilier": { + "account_number": "6232" + }, + "Cr\u00e9dit-bail mobilier": { + "account_number": "6233" + }, + "Location-vente": { + "account_number": "6234" + }, + "Autres contrats de location acquisition": { + "account_number": "6238" + }, + "account_number": "623" + }, + "Entretien, r\u00e9parations, remise en \u00e9tat et maintenance": { + "Entretien et r\u00e9parations des biens immobiliers": { + "account_number": "6241" + }, + "Entretien et r\u00e9parations des biens mobiliers": { + "account_number": "6242" + }, + "Maintenance": { + "account_number": "6243" + }, + "Charges de d\u00e9mant\u00e8lement et remise en \u00e9tat": { + "account_number": "6244" + }, + "Autres entretiens et r\u00e9parations": { + "account_number": "6248" + }, + "account_number": "624" + }, + "Primes d\u2019assurance": { + "Assurances multirisques": { + "account_number": "6251" + }, + "Assurances mat\u00e9riel de transport": { + "account_number": "6252" + }, + "Assurances risques d\u2019exploitation": { + "account_number": "6253" + }, + "Assurances responsabilit\u00e9 du producteur": { + "account_number": "6254" + }, + "Assurances insolvabilit\u00e9 clients": { + "account_number": "6255" + }, + "Assurances transport sur ventes": { + "account_number": "6257" + }, + "Autres primes d\u2019assurances": { + "account_number": "6258" + }, + "account_number": "625" + }, + "\u00c9tudes, recherches et documentation": { + "\u00c9tudes et recherches": { + "account_number": "6261" + }, + "Documentation g\u00e9n\u00e9rale": { + "account_number": "6265" + }, + "Documentation technique": { + "account_number": "6266" + }, + "account_number": "626" + }, + "Publicit\u00e9, publications, relations publiques": { + "Annonces, insertions": { + "account_number": "6271" + }, + "Catalogues, imprim\u00e9s publicitaires": { + "account_number": "6272" + }, + "\u00c9chantillons": { + "account_number": "6273" + }, + "Foires et expositions": { + "account_number": "6274" + }, + "Publications": { + "account_number": "6275" + }, + "Cadeaux \u00e0 la client\u00e8le": { + "account_number": "6276" + }, + "Frais de colloques, s\u00e9minaires, conf\u00e9rences": { + "account_number": "6277" + }, + "Autres charges de publicit\u00e9 et relations publiques": { + "account_number": "6278" + }, + "account_number": "627" + }, + "Frais de t\u00e9l\u00e9communications": { + "Frais de t\u00e9l\u00e9phone": { + "account_number": "6281" + }, + "Frais de t\u00e9lex": { + "account_number": "6282" + }, + "Frais de t\u00e9l\u00e9copie": { + "account_number": "6283" + }, + "Autres frais de t\u00e9l\u00e9communications": { + "account_number": "6288" + }, + "account_number": "628" + }, + "account_number": "62" + }, + "Autres services ext\u00e9rieurs": { + "Frais bancaires": { + "Frais sur titres (vente, garde)": { + "account_number": "6311" + }, + "Frais sur effets": { + "account_number": "6312" + }, + "Location de coffres": { + "account_number": "6313" + }, + "Commissions d\u2019affacturage": { + "account_number": "6314" + }, + "Commissions sur cartes de cr\u00e9dit": { + "account_number": "6315" + }, + "Frais d\u2019\u00e9mission d\u2019emprunts": { + "account_number": "6316" + }, + "Frais sur instruments monnaie \u00e9lectronique": { + "account_number": "6317" + }, + "Autres frais bancaires": { + "account_number": "6318" + }, + "account_number": "631" + }, + "R\u00e9mun\u00e9rations d\u2019interm\u00e9diaires et de conseils": { + "Commissions et courtages sur ventes": { + "account_number": "6322" + }, + "Honoraires des professions r\u00e9glement\u00e9es": { + "account_number": "6324" + }, + "Frais d\u2019actes et de contentieux": { + "account_number": "6325" + }, + "R\u00e9mun\u00e9rations d\u2019affacturage": { + "account_number": "6326" + }, + "R\u00e9mun\u00e9rations des autres prestataires de services": { + "account_number": "6327" + }, + "Divers frais": { + "account_number": "6328" + }, + "account_number": "632" + }, + "Frais de formation du personnel": { + "account_number": "633" + }, + "Redevances pour brevets, licences, logiciels, concessions et droits et valeurs similaires": { + "Redevances pour brevets, licences": { + "account_number": "6342" + }, + "Redevances pour logiciels": { + "account_number": "6343" + }, + "Redevances pour marques": { + "account_number": "6344" + }, + "Redevances pour sites internet": { + "account_number": "6345" + }, + "Redevances pour concessions, droits et valeurs similaires": { + "account_number": "6346" + }, + "account_number": "634" + }, + "Cotisations": { + "Cotisations": { + "account_number": "6351" + }, + "Concours divers": { + "account_number": "6358" + }, + "account_number": "635" + }, + "R\u00e9mun\u00e9rations de personnel ext\u00e9rieur \u00e0 l\u2019entit\u00e9": { + "Personnel int\u00e9rimaire": { + "account_number": "6371" + }, + "Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": { + "account_number": "6372" + }, + "account_number": "637" + }, + "Autres charges externes": { + "Frais de recrutement du personnel": { + "account_number": "6381" + }, + "Frais de d\u00e9m\u00e9nagement": { + "account_number": "6382" + }, + "R\u00e9ceptions": { + "account_number": "6383" + }, + "Missions": { + "account_number": "6384" + }, + "Charges de copropri\u00e9t\u00e9": { + "account_number": "6385" + }, + "account_number": "638" + }, + "account_number": "63" + }, + "Imp\u00f4ts et taxes": { + "Imp\u00f4ts et taxes directs": { + "Imp\u00f4ts fonciers et taxes annexes": { + "account_number": "6411" + }, + "Patentes, licences et taxes annexes": { + "account_number": "6412" + }, + "Taxes sur appointements et salaires": { + "account_number": "6413" + }, + "Taxes d\u2019apprentissage": { + "account_number": "6414" + }, + "Formation professionnelle continue": { + "account_number": "6415" + }, + "Autres imp\u00f4ts et taxes directs": { + "account_number": "6418" + }, + "account_number": "641" + }, + "Imp\u00f4ts et taxes indirects": { + "account_number": "645" + }, + "Droits d\u2019enregistrement": { + "Droits de mutation": { + "account_number": "6461" + }, + "Droits de timbre": { + "account_number": "6462" + }, + "Taxes sur les v\u00e9hicules de soci\u00e9t\u00e9": { + "account_number": "6463" + }, + "Vignettes": { + "account_number": "6464" + }, + "Autres droits": { + "account_number": "6468" + }, + "account_number": "646" + }, + "P\u00e9nalit\u00e9s, amendes fiscales": { + "P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts directs": { + "account_number": "6471" + }, + "P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts indirects": { + "account_number": "6472" + }, + "P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts directs": { + "account_number": "6473" + }, + "P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts indirects": { + "account_number": "6474" + }, + "Autres p\u00e9nalit\u00e9s et amendes fiscales": { + "account_number": "6478" + }, + "account_number": "647" + }, + "Autres imp\u00f4ts et taxes": { + "account_number": "648" + }, + "account_number": "64" + }, + "Autres charges": { + "Pertes sur cr\u00e9ances clients et autres d\u00e9biteurs": { + "Clients": { + "account_number": "6511" + }, + "Autres d\u00e9biteurs": { + "account_number": "6515" + }, + "account_number": "651" + }, + "Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "Quote-part transf\u00e9r\u00e9e de b\u00e9n\u00e9fices (comptabilit\u00e9 du g\u00e9rant)": { + "account_number": "6521" + }, + "Pertes imput\u00e9es par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": { + "account_number": "6525" + }, + "account_number": "652" + }, + "Valeurs comptables des cessions courantes d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "6541" + }, + "Immobilisations corporelles": { + "account_number": "6542" + }, + "account_number": "654" + }, + "Perte de change sur cr\u00e9ances et dettes commerciale": { + "account_number": "656" + }, + "P\u00e9nalit\u00e9s et amendes p\u00e9nales": { + "account_number": "657" + }, + "Charges diverses": { + "Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": { + "account_number": "6581" + }, + "Dons": { + "account_number": "6582" + }, + "M\u00e9c\u00e9nat": { + "account_number": "6583" + }, + "Autres charges diverses": { + "account_number": "6588" + }, + "account_number": "658" + }, + "Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "Sur risques \u00e0 court terme": { + "account_number": "6591" + }, + "Sur stocks": { + "account_number": "6593" + }, + "Sur cr\u00e9ances": { + "account_number": "6594" + }, + "Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme": { + "account_number": "6598" + }, + "account_number": "659" + }, + "account_number": "65" + }, + "Charges de personnel": { + "R\u00e9mun\u00e9rations directes vers\u00e9es au personnel national": { + "Appointements salaires et commissions": { + "account_number": "6611" + }, + "Primes et gratifications": { + "account_number": "6612" + }, + "Cong\u00e9s pay\u00e9s": { + "account_number": "6613" + }, + "Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": { + "account_number": "6614" + }, + "Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": { + "account_number": "6615" + }, + "Suppl\u00e9ment familial": { + "account_number": "6616" + }, + "Avantages en nature": { + "account_number": "6617" + }, + "Autres r\u00e9mun\u00e9rations directes": { + "account_number": "6618" + }, + "account_number": "661" + }, + "R\u00e9mun\u00e9rations directes vers\u00e9es au personnel non national": { + "Appointements salaires et commissions": { + "account_number": "6621" + }, + "Primes et gratifications": { + "account_number": "6622" + }, + "Cong\u00e9s pay\u00e9s": { + "account_number": "6623" + }, + "Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": { + "account_number": "6624" + }, + "Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": { + "account_number": "6625" + }, + "Suppl\u00e9ment familial": { + "account_number": "6626" + }, + "Avantages en nature": { + "account_number": "6627" + }, + "Autres r\u00e9mun\u00e9rations directes": { + "account_number": "6628" + }, + "account_number": "662" + }, + "Indemnit\u00e9s forfaitaires vers\u00e9es au personnel": { + "Indemnit\u00e9s de logement": { + "account_number": "6631" + }, + "Indemnit\u00e9s de repr\u00e9sentation": { + "account_number": "6632" + }, + "Indemnit\u00e9s d\u2019expatriation": { + "account_number": "6633" + }, + "Indemnit\u00e9s de transport": { + "account_number": "6634" + }, + "Autres indemnit\u00e9s et avantages divers": { + "account_number": "6638" + }, + "account_number": "663" + }, + "Charges sociales": { + "Charges sociales sur r\u00e9mun\u00e9ration du personnel national": { + "account_number": "6641" + }, + "Charges sociales sur r\u00e9mun\u00e9ration du personnel non national": { + "account_number": "6642" + }, + "account_number": "664" + }, + "R\u00e9mun\u00e9rations et charges sociales de l\u2019exploitant individuel": { + "R\u00e9mun\u00e9ration du travail de l\u2019exploitant": { + "account_number": "6661" + }, + "Charges sociales": { + "account_number": "6662" + }, + "account_number": "666" + }, + "R\u00e9mun\u00e9ration transf\u00e9r\u00e9e de personnel ext\u00e9rieur": { + "Personnel int\u00e9rimaire": { + "account_number": "6671" + }, + "Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": { + "account_number": "6672" + }, + "account_number": "667" + }, + "Autres charges sociales": { + "Versements aux syndicats et comit\u00e9s d\u2019entreprise, d\u2019\u00e9tablissement": { + "account_number": "6681" + }, + "Versements aux comit\u00e9s d\u2019hygi\u00e8ne et de s\u00e9curit\u00e9": { + "account_number": "6682" + }, + "Versements et contributions aux autres \u0153uvres sociales": { + "account_number": "6683" + }, + "M\u00e9decine du travail et pharmacie": { + "account_number": "6684" + }, + "Assurances et organismes de sant\u00e9": { + "account_number": "6685" + }, + "Assurances retraite et fonds de pension": { + "account_number": "6686" + }, + "Majorations et p\u00e9nalit\u00e9s sociales": { + "account_number": "6687" + }, + "Charges sociales diverses": { + "account_number": "6688" + }, + "account_number": "668" + }, + "account_number": "66" + }, + "Frais financiers et charges assimil\u00e9es": { + "Int\u00e9r\u00eats des emprunts": { + "Emprunts obligataires": { + "account_number": "6711" + }, + "Emprunts aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": { + "account_number": "6712" + }, + "Dettes li\u00e9es \u00e0 des participations": { + "account_number": "6713" + }, + "Primes de remboursement des obligations": { + "account_number": "6714" + }, + "account_number": "671" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition": { + "Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail immobilier": { + "account_number": "6722" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail mobilier": { + "account_number": "6723" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition / location-vente": { + "account_number": "6724" + }, + "Int\u00e9r\u00eats dans loyers des autres locations acquisition": { + "account_number": "6728" + }, + "account_number": "672" + }, + "Escomptes accord\u00e9s": { + "account_number": "673" + }, + "Autres int\u00e9r\u00eats": { + "Avances re\u00e7ues et d\u00e9p\u00f4ts cr\u00e9diteurs": { + "account_number": "6741" + }, + "Comptes courants bloqu\u00e9s": { + "account_number": "6742" + }, + "Int\u00e9r\u00eats sur obligations cautionn\u00e9es": { + "account_number": "6743" + }, + "Int\u00e9r\u00eats sur dettes commerciales": { + "account_number": "6744" + }, + "Int\u00e9r\u00eats bancaires et sur op\u00e9rations de financement (escompte...)": { + "account_number": "6745" + }, + "Int\u00e9r\u00eats sur dettes diverses": { + "account_number": "6748" + }, + "account_number": "674" + }, + "Escomptes des effets de commerce": { + "account_number": "675" + }, + "Pertes de change financi\u00e8res": { + "account_number": "676" + }, + "Pertes sur titres de placement": { + "Pertes sur cessions de titres de placement": { + "account_number": "6771" + }, + "Mali provenant d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": { + "account_number": "6772" + }, + "account_number": "677" + }, + "Pertes et charges sur risques financiers": { + "Sur rentes viag\u00e8res": { + "account_number": "6781" + }, + "Sur op\u00e9rations financi\u00e8res": { + "account_number": "6782" + }, + "Sur instruments de tr\u00e9sorerie": { + "account_number": "6784" + }, + "account_number": "678" + }, + "Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "Sur risques financiers": { + "account_number": "6791" + }, + "Sur titres de placement": { + "account_number": "6795" + }, + "Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "account_number": "6798" + }, + "account_number": "679" + }, + "account_number": "67" + }, + "Dotations aux amortissements": { + "Dotations aux amortissements d\u2019exploitation": { + "Dotations aux amortissements des immobilisations incorporelles": { + "account_number": "6812" + }, + "Dotations aux amortissements des immobilisations corporelles": { + "account_number": "6813" + }, + "account_number": "681" + }, + "account_number": "68" + }, + "Dotations aux provisions et aux d\u00e9pr\u00e9ciations": { + "Dotations aux provisions et aux d\u00e9pr\u00e9ciations d\u2019exploitation": { + "Dotations aux provisions pour risques et charges": { + "account_number": "6911" + }, + "Dotations aux d\u00e9pr\u00e9ciations des immobilisations incorporelles": { + "account_number": "6913" + }, + "Dotations aux d\u00e9pr\u00e9ciations des immobilisations corporelles": { + "account_number": "6914" + }, + "account_number": "691" + }, + "Dotations aux provisions et aux d\u00e9pr\u00e9ciations financi\u00e8res": { + "Dotations aux provisions pour risques et charges": { + "account_number": "6971" + }, + "Dotations aux d\u00e9pr\u00e9ciations des immobilisations financi\u00e8res": { + "account_number": "6972" + }, + "account_number": "697" + }, + "account_number": "69" + }, + "root_type": "Expense", + "account_number": "6" + }, + "Comptes de produits des activit\u00e9s ordinaires": { + "Ventes": { + "Ventes de marchandises": { + "Dans la R\u00e9gion": { + "account_number": "7011" + }, + "Hors R\u00e9gion": { + "account_number": "7012" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7013" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7014" + }, + "Sur internet": { + "account_number": "7015" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7019" + }, + "account_number": "701" + }, + "Ventes de produits finis": { + "Dans la R\u00e9gion": { + "account_number": "7021" + }, + "Hors R\u00e9gion": { + "account_number": "7022" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7023" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7024" + }, + "Sur internet": { + "account_number": "7025" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7029" + }, + "account_number": "702" + }, + "Ventes de produits interm\u00e9diaires": { + "Dans la R\u00e9gion": { + "account_number": "7031" + }, + "Hors R\u00e9gion": { + "account_number": "7032" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7033" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7034" + }, + "Sur internet": { + "account_number": "7035" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7039" + }, + "account_number": "703" + }, + "Ventes de produits r\u00e9siduels": { + "Dans la R\u00e9gion": { + "account_number": "7041" + }, + "Hors R\u00e9gion": { + "account_number": "7042" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7043" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7044" + }, + "Sur internet": { + "account_number": "7045" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7049" + }, + "account_number": "704" + }, + "Travaux factur\u00e9s": { + "Dans la R\u00e9gion": { + "account_number": "7051" + }, + "Hors R\u00e9gion": { + "account_number": "7052" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7053" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7054" + }, + "Sur internet": { + "account_number": "7055" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7059" + }, + "account_number": "705" + }, + "Services vendus": { + "Dans la R\u00e9gion": { + "account_number": "7061" + }, + "Hors R\u00e9gion": { + "account_number": "7062" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7063" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7064" + }, + "Sur internet": { + "account_number": "7065" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7069" + }, + "account_number": "706" + }, + "Produits accessoires": { + "Ports, emballages perdus et autres frais factur\u00e9s": { + "account_number": "7071" + }, + "Commissions et courtages": { + "account_number": "7072" + }, + "Locations": { + "account_number": "7073" + }, + "Bonis sur reprises et cessions d\u2019emballages": { + "account_number": "7074" + }, + "Mise \u00e0 disposition de personnel": { + "account_number": "7075" + }, + "Redevances pour brevets, logiciels, marques et droits similaires": { + "account_number": "7076" + }, + "Services exploit\u00e9s dans l\u2019int\u00e9r\u00eat du personnel": { + "account_number": "7077" + }, + "Autres produits accessoires": { + "account_number": "7078" + }, + "account_number": "707" + }, + "account_number": "70" + }, + "Subventions d\u2019exploitation": { + "Sur produits \u00e0 l\u2019exportation": { + "account_number": "711" + }, + "Sur produits \u00e0 l\u2019importation": { + "account_number": "712" + }, + "Sur produits de p\u00e9r\u00e9quation": { + "account_number": "713" + }, + "Indemnit\u00e9s et subventions d\u2019exploitation (entit\u00e9 agricole)": { + "account_number": "714" + }, + "Autres subventions d\u2019exploitation": { + "Vers\u00e9es par l\u2019\u00c9tat et les collectivit\u00e9s publiques": { + "account_number": "7181" + }, + "Vers\u00e9es par les organismes internationaux": { + "account_number": "7182" + }, + "Vers\u00e9es par des tiers": { + "account_number": "7183" + }, + "account_number": "718" + }, + "account_number": "71" + }, + "Production immobilis\u00e9e": { + "Immobilisations incorporelles": { + "account_number": "721" + }, + "Immobilisations corporelles": { + "Immobilisations corporelles (hors actifs biologiques)": { + "account_number": "7221" + }, + "Immobilisations corporelles (actifs biologiques)": { + "account_number": "7222" + }, + "account_number": "722" + }, + "Production auto-consomm\u00e9e": { + "account_number": "724" + }, + "Immobilisations financi\u00e8res": { + "account_number": "726" + }, + "account_number": "72" + }, + "Variations des stocks de biens et de services produits": { + "Variations des stocks de produits en cours": { + "Produits en cours": { + "account_number": "7341" + }, + "Travaux en cours": { + "account_number": "7342" + }, + "account_number": "734" + }, + "Variations des en-cours de services": { + "\u00c9tudes en cours": { + "account_number": "7351" + }, + "Prestations de services en cours": { + "account_number": "7352" + }, + "account_number": "735" + }, + "Variations des stocks de produits finis": { + "account_number": "736" + }, + "Variations des stocks de produits interm\u00e9diaires et r\u00e9siduels": { + "Produits interm\u00e9diaires": { + "account_number": "7371" + }, + "Produits r\u00e9siduels": { + "account_number": "7372" + }, + "account_number": "737" + }, + "account_number": "73" + }, + "Autres produits": { + "Profits sur cr\u00e9ances clients et autres d\u00e9biteurs": { + "account_number": "751" + }, + "Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "Quote-part transf\u00e9r\u00e9e de pertes (comptabilit\u00e9 du g\u00e9rant)": { + "account_number": "7521" + }, + "B\u00e9n\u00e9fices attribu\u00e9s par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": { + "account_number": "7525" + }, + "account_number": "752" + }, + "Produits des cessions courantes d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "7541" + }, + "Immobilisations corporelles": { + "account_number": "7542" + }, + "account_number": "754" + }, + "Gains de change sur cr\u00e9ances et dettes commerciales": { + "account_number": "756" + }, + "Produits divers": { + "Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": { + "account_number": "7581" + }, + "Indemnit\u00e9s d\u2019assurances re\u00e7ues": { + "account_number": "7582" + }, + "Autres produits divers": { + "account_number": "7588" + }, + "account_number": "758" + }, + "Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "Sur risques \u00e0 court terme": { + "account_number": "7591" + }, + "Sur stocks": { + "account_number": "7593" + }, + "Sur cr\u00e9ances": { + "account_number": "7594" + }, + "Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "account_number": "7598" + }, + "account_number": "759" + }, + "account_number": "75" + }, + "Revenus financiers et produits assimil\u00e9s": { + "Int\u00e9r\u00eats de pr\u00eats et cr\u00e9ances diverses": { + "Int\u00e9r\u00eats de pr\u00eats": { + "account_number": "7712" + }, + "Int\u00e9r\u00eats sur cr\u00e9ances diverses": { + "account_number": "7713" + }, + "account_number": "771" + }, + "Revenus de participations et autres titres immobilis\u00e9s": { + "Revenus des titres de participation": { + "account_number": "7721" + }, + "Revenus autres titres immobilis\u00e9s": { + "account_number": "7722" + }, + "account_number": "772" + }, + "Escomptes obtenus": { + "account_number": "773" + }, + "Revenus de placement": { + "Revenus des obligations": { + "account_number": "7745" + }, + "Revenus des titres de placement": { + "account_number": "7746" + }, + "account_number": "774" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition": { + "account_number": "775" + }, + "Gains de change financiers": { + "account_number": "776" + }, + "Gains sur cessions de titres de placement": { + "account_number": "777" + }, + "Gains sur risques financiers": { + "Sur rentes viag\u00e8res": { + "account_number": "7781" + }, + "Sur op\u00e9rations financi\u00e8res": { + "account_number": "7782" + }, + "Sur instruments de tr\u00e9sorerie": { + "account_number": "7784" + }, + "account_number": "778" + }, + "Reprises de charges pour d\u00e9pr\u00e9ciations et provisions \u00e0 court terme financi\u00e8res": { + "Sur risques financiers": { + "account_number": "7791" + }, + "Sur titres de placement": { + "account_number": "7795" + }, + "Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "account_number": "7798" + }, + "account_number": "779" + }, + "account_number": "77" + }, + "Transferts de charges": { + "Transferts de charges d\u2019exploitation": { + "account_number": "781" + }, + "Transferts de charges financi\u00e8res": { + "account_number": "787" + }, + "account_number": "78" + }, + "Reprises de provisions, de d\u00e9pr\u00e9ciations et autres": { + "Reprises de provisions et d\u00e9pr\u00e9ciations d\u2019exploitation": { + "Pour risques et charges": { + "account_number": "7911" + }, + "Des immobilisations incorporelles": { + "account_number": "7913" + }, + "Des immobilisations corporelles": { + "account_number": "7914" + }, + "account_number": "791" + }, + "Reprises de provisions et d\u00e9pr\u00e9ciations financi\u00e8res": { + "Pour risques et charges": { + "account_number": "7971" + }, + "Des immobilisations financi\u00e8res": { + "account_number": "7972" + }, + "account_number": "797" + }, + "Reprises d\u2019amortissements": { + "account_number": "798" + }, + "Reprises de subventions d\u2019investissement": { + "account_number": "799" + }, + "account_number": "79" + }, + "root_type": "Income", + "account_number": "7" + }, + "8-Comptes des autres charges et des autres produits (CHARGES)": { + "Valeurs comptables des cessions d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "811" + }, + "Immobilisations corporelles": { + "account_number": "812" + }, + "Immobilisations financi\u00e8res": { + "account_number": "816" + }, + "account_number": "81" + }, + "Charges hors activit\u00e9s ordinaires": { + "Charges HAO constat\u00e9es": { + "account_number": "831" + }, + "Charges li\u00e9es aux op\u00e9rations de restructuration": { + "account_number": "833" + }, + "Pertes sur cr\u00e9ances HAO": { + "account_number": "834" + }, + "Dons et lib\u00e9ralit\u00e9s accord\u00e9s": { + "account_number": "835" + }, + "Abandons de cr\u00e9ances consentis": { + "account_number": "836" + }, + "Charges li\u00e9es aux op\u00e9rations de liquidation": { + "account_number": "837" + }, + "Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": { + "account_number": "839" + }, + "account_number": "83" + }, + "Dotations hors activit\u00e9s ordinaires": { + "Dotations aux provisions r\u00e9glement\u00e9es": { + "account_number": "851" + }, + "Dotations aux amortissements HAO": { + "account_number": "852" + }, + "Dotations aux d\u00e9pr\u00e9ciations HAO": { + "account_number": "853" + }, + "Dotations aux provisions pour risques et charges HAO": { + "account_number": "854" + }, + "Autres dotations HAO": { + "account_number": "858" + }, + "account_number": "85" + }, + "Participation des travailleurs": { + "Participation l\u00e9gale aux b\u00e9n\u00e9fices": { + "account_number": "871" + }, + "Participation contractuelle aux b\u00e9n\u00e9fices": { + "account_number": "874" + }, + "Autres participations": { + "account_number": "878" + }, + "account_number": "87" + }, + "Imp\u00f4ts sur le r\u00e9sultat": { + "Imp\u00f4ts sur les b\u00e9n\u00e9fices de l\u2019exercice": { + "Activit\u00e9s exerc\u00e9es dans l\u2019\u00c9tat": { + "account_number": "8911" + }, + "Activit\u00e9s exerc\u00e9es dans les autres \u00c9tats de la R\u00e9gion": { + "account_number": "8912" + }, + "Activit\u00e9s exerc\u00e9es hors R\u00e9gion": { + "account_number": "8913" + }, + "account_number": "891" + }, + "Rappel d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": { + "account_number": "892" + }, + "Imp\u00f4t minimum forfaitaire IMF": { + "account_number": "895" + }, + "D\u00e9gr\u00e8vements et annulations d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": { + "D\u00e9gr\u00e8vements": { + "account_number": "8991" + }, + "Annulations pour pertes r\u00e9troactives": { + "account_number": "8994" + }, + "account_number": "899" + }, + "account_number": "89" + }, + "root_type": "Expense" + }, + "8-Comptes des autres charges et des autres produits (PRODUITS)": { + "Produits des cessions d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "821" + }, + "Immobilisations corporelles": { + "account_number": "822" + }, + "Immobilisations financi\u00e8res": { + "account_number": "826" + }, + "account_number": "82" + }, + "Produits hors activit\u00e9s ordinaires": { + "Produits HAO constat\u00e9s": { + "account_number": "841" + }, + "Produits li\u00e9s aux op\u00e9rations de restructuration": { + "account_number": "843" + }, + "Indemnit\u00e9s et subventions HAO (entit\u00e9 agricole)": { + "account_number": "844" + }, + "Dons et lib\u00e9ralit\u00e9s obtenus": { + "account_number": "845" + }, + "Abandons de cr\u00e9ances obtenus": { + "account_number": "846" + }, + "Produits li\u00e9s aux op\u00e9rations de liquidation": { + "account_number": "847" + }, + "Transferts de charges HAO": { + "account_number": "848" + }, + "Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": { + "account_number": "849" + }, + "account_number": "84" + }, + "Reprises de charges, provisions et d\u00e9pr\u00e9ciations HAO": { + "Reprises de provisions r\u00e9glement\u00e9es": { + "account_number": "861" + }, + "Reprises d\u2019amortissements HAO": { + "account_number": "862" + }, + "Reprises de d\u00e9pr\u00e9ciations HAO": { + "account_number": "863" + }, + "Reprises de provisions pour risques et charges HAO": { + "account_number": "864" + }, + "Autres reprises HAO": { + "account_number": "868" + }, + "account_number": "86" + }, + "Subventions d\u2019\u00e9quilibre": { + "\u00c9tat": { + "account_number": "881" + }, + "Collectivit\u00e9s publiques": { + "account_number": "884" + }, + "Groupe": { + "account_number": "886" + }, + "Autres": { + "account_number": "888" + }, + "account_number": "88" + }, + "root_type": "Income" + } + } +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/ga_plan_comptable.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/ga_plan_comptable.json new file mode 100644 index 00000000000..fe31f87a47b --- /dev/null +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/ga_plan_comptable.json @@ -0,0 +1,1919 @@ +{ + "country_code": "ga", + "name": "Syscohada - Plan Comptable", + "tree": { + "1-Comptes de ressources durables": { + "10-Capital": { + "101-Capital social": { + "1011-Capital souscrit, non appel\u00e9": {}, + "1012-Capital souscrit, appel\u00e9, non vers\u00e9": {}, + "1013-Capital souscrit, appel\u00e9, vers\u00e9, non amorti": {}, + "1014-Capital souscrit, appel\u00e9, vers\u00e9, amorti": {}, + "1018-Capital souscrit soumis \u00e0 des conditions particuli\u00e8res": {} + }, + "102-Capital par dotation": { + "1021-Dotation initiale": {}, + "1022-Dotations compl\u00e9mentaires": {}, + "1028-Autres dotations": {} + }, + "103-Capital personnel": {}, + "104-Compte de l\u2019exploitant": { + "1041-Apports temporaires": {}, + "1042-Op\u00e9rations courantes": {}, + "1043-R\u00e9mun\u00e9rations, imp\u00f4ts et autres charges personnelles": {}, + "1047-Pr\u00e9l\u00e8vements d\u2019autoconsommation": {}, + "1048-Autres pr\u00e9l\u00e8vements": {} + }, + "105-Primes li\u00e9es au capital social": { + "1051-Primes d\u2019\u00e9mission": {}, + "1052-Primes d\u2019apport": {}, + "1053-Primes de fusion": {}, + "1054-Primes de conversion": {}, + "1058-Autres primes": {} + }, + "106-\u00c9carts de r\u00e9\u00e9valuation": { + "1061-\u00c9carts de r\u00e9\u00e9valuation l\u00e9gale": {}, + "1062-\u00c9carts de r\u00e9\u00e9valuation libre": {} + }, + "109-Apporteurs, capital souscrit, non appel\u00e9": {} + }, + "11-R\u00e9serves": { + "111-R\u00e9serve l\u00e9gale": {}, + "112-R\u00e9serves statutaires ou contractuelles": {}, + "113-R\u00e9serves r\u00e9glement\u00e9es": { + "1131-R\u00e9serves de plus-values nettes \u00e0 long terme": {}, + "1132-R\u00e9serves d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": {}, + "1133-R\u00e9serves cons\u00e9cutives \u00e0 l\u2019octroi de subventions d\u2019investissement": {}, + "1134-R\u00e9serves des valeurs mobili\u00e8res donnant acc\u00e8s au capital": {}, + "1135-Autres r\u00e9serves r\u00e9glement\u00e9es": {} + }, + "118-Autres r\u00e9serves": { + "1181-R\u00e9serves facultatives": {}, + "1188-R\u00e9serves diverses": {} + } + }, + "12-Report \u00e0 nouveau": { + "121-Report \u00e0 nouveau cr\u00e9diteur": {}, + "129-Report \u00e0 nouveau d\u00e9biteur": { + "1291-Perte nette \u00e0 reporter": {}, + "1292-Perte Amortissements r\u00e9put\u00e9s diff\u00e9r\u00e9s": {} + } + }, + "13-R\u00e9sultat net de l\u2019exercice": { + "130-R\u00e9sultat en instance d\u2019affectation": { + "1301-R\u00e9sultat en instance d\u2019affectation : b\u00e9n\u00e9fice": {}, + "1309-R\u00e9sultat en instance d\u2019affectation : perte": {} + }, + "131-R\u00e9sultat net : b\u00e9n\u00e9fice": {}, + "132-Marge commerciale (MC)": {}, + "133-Valeur ajout\u00e9e (VA)": {}, + "134-Exc\u00e9dent brut d\u2019exploitation (EBE)": {}, + "135-R\u00e9sultat d\u2019exploitation (RE)": {}, + "136-R\u00e9sultat financier (RF)": {}, + "137-R\u00e9sultat des activit\u00e9s ordinaires (RAO)": {}, + "138-R\u00e9sultat hors activit\u00e9s ordinaires (RHAO)": { + "1381-R\u00e9sultat de fusion": {}, + "1382-R\u00e9sultat d\u2019apport partiel d\u2019actif": {}, + "1383-R\u00e9sultat de scission": {}, + "1384-R\u00e9sultat de liquidation": {} + }, + "139-R\u00e9sultat net : perte": {} + }, + "14-Subventions d\u2019investissement": { + "141-Subventions d\u2019\u00e9quipement": { + "1411-\u00c9tat": {}, + "1412-R\u00e9gions": {}, + "1413-D\u00e9partements": {}, + "1414-Communes et collectivit\u00e9s publiques d\u00e9centralis\u00e9es": {}, + "1415-Entit\u00e9s publiques ou mixtes": {}, + "1416-Entit\u00e9s et organismes priv\u00e9s": {}, + "1417-Organismes internationaux": {}, + "1418-Autres": {} + }, + "148-Autres subventions d\u2019investissement": {} + }, + "15-Provisions r\u00e9glement\u00e9es et fonds assimil\u00e9s": { + "151-Amortissements d\u00e9rogatoires": {}, + "152-Plus-values de cession \u00e0 r\u00e9investir": {}, + "153-Fonds r\u00e9glement\u00e9s": { + "1531-Fonds National": {}, + "1532-Pr\u00e9l\u00e8vement pour le Budget": {} + }, + "154-Provisions sp\u00e9ciales de r\u00e9\u00e9valuation": {}, + "155-Provisions r\u00e9glement\u00e9es relatives aux immobilisations": { + "1551-Reconstitution des gisements miniers et p\u00e9troliers": {} + }, + "156-Provisions r\u00e9glement\u00e9es relatives aux stocks": { + "1561-Hausse de prix": {}, + "1562-Fluctuation des cours": {} + }, + "157-Provisions pour investissement": {}, + "158-Autres provisions et fonds r\u00e9glement\u00e9s": {} + }, + "16-Emprunts et dettes assimil\u00e9es": { + "161-Emprunts obligataires": { + "1611-Emprunts obligataires ordinaires": {}, + "1612-Emprunts obligataires convertibles en actions": {}, + "1613-Emprunts obligataires remboursables en actions": {}, + "1618-Autres emprunts obligataires": {} + }, + "162-Emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": {}, + "163-Avances re\u00e7ues de l\u2019\u00c9tat": {}, + "164-Avances re\u00e7ues et comptes courants bloqu\u00e9s": {}, + "165-D\u00e9p\u00f4ts et cautionnements re\u00e7us": { + "1651-D\u00e9p\u00f4ts": {}, + "1652-Cautionnements": {} + }, + "166-Int\u00e9r\u00eats courus": { + "1661-Sur emprunts obligataires": {}, + "1662-Sur emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": {}, + "1663-Sur avances re\u00e7ues de l\u2019\u00c9tat": {}, + "1664-Sur avances re\u00e7ues et comptes courants bloqu\u00e9s": {}, + "1665-Sur d\u00e9p\u00f4ts et cautionnements re\u00e7us": {}, + "1667-Sur avances assorties de conditions particuli\u00e8res": {}, + "1668-Sur autres emprunts et dettes": {} + }, + "167-Avances assorties de conditions particuli\u00e8res": { + "1671-Avances bloqu\u00e9es pour augmentation du capital": {}, + "1672-Avances conditionn\u00e9es par l\u2019\u00c9tat": {}, + "1673-Avances conditionn\u00e9es par les autres organismes africains": {}, + "1674-Avances conditionn\u00e9es par les organismes internationaux": {} + }, + "168-Autres emprunts et dettes": { + "1681-Rentes viag\u00e8res capitalis\u00e9es": {}, + "1682-Billets de fonds": {}, + "1683-Dettes cons\u00e9cutives \u00e0 des titres emprunt\u00e9s": {}, + "1684-Emprunts participatifs": {}, + "1685-Participation des travailleurs aux b\u00e9n\u00e9fices": {}, + "1686-Emprunts et dettes contract\u00e9s aupr\u00e8s des autres tiers": {} + } + }, + "17-Dettes de location acquisition": { + "172-Dettes de location acquisition / cr\u00e9dit bail immobilier": {}, + "173-Dettes de location acquisition / cr\u00e9dit bail mobilier": {}, + "174-Dettes de location acquisition / location de vente": {}, + "176-Int\u00e9r\u00eats courus": { + "1762-Sur dettes de location acquisition / cr\u00e9dit-bail immobilier": {}, + "1763-Sur dettes de location acquisition / cr\u00e9dit-bail mobilier": {}, + "1764-Sur dettes de location acquisition / location-vente": {}, + "1768-Sur autres dettes de location acquisition": {} + }, + "178-Autres dettes de location acquisition": {} + }, + "18-Dettes li\u00e9es \u00e0 des participations et comptes de liaison des \u00e9tablissements et soci\u00e9t\u00e9s en participation": { + "181-Dettes li\u00e9es \u00e0 des participations": { + "1811-Dettes li\u00e9es \u00e0 des participations (groupe)": {}, + "1812-Dettes li\u00e9es \u00e0 des participations (hors groupe)": {} + }, + "182-Dettes li\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": {}, + "183-Int\u00e9r\u00eats courus sur dettes li\u00e9es \u00e0 des participations": {}, + "184-Comptes permanents bloqu\u00e9s des \u00e9tablissements et succursales": {}, + "185-Comptes permanents non bloqu\u00e9s des \u00e9tablissements et succursales": {}, + "186-Comptes de liaison charges": {}, + "187-Comptes de liaison produits": {}, + "188-Comptes de liaison des soci\u00e9t\u00e9s en participation": {} + }, + "19-Provisions pour risques et charges": { + "191-Provisions pour litiges": {}, + "192-Provisions pour garanties donn\u00e9es aux clients": {}, + "193-Provisions pour pertes sur march\u00e9s \u00e0 ach\u00e8vement futur": {}, + "194-Provisions pour pertes de change": {}, + "195-Provisions pour imp\u00f4ts": {}, + "196-Provisions pour pensions et obligations similaires": { + "1961-Provisions pour pensions et obligations similaires engagement de retraite": {}, + "1962-Actif du r\u00e9gime de retraite": {} + }, + "197-Provisions pour restructuration": {}, + "198-Autres provisions pour risques et charges": { + "1981-Provisions pour amendes et p\u00e9nalit\u00e9s": {}, + "1983-Provisions pour propre assureur": {}, + "1984-Provisions pour d\u00e9mant\u00e8lement et remise en \u00e9tat": {}, + "1985-Provisions pour droits \u00e0 r\u00e9duction ou avantage en nature (ch\u00e8ques cadeau, cartes de fid\u00e9lit\u00e9...)": {}, + "1988-Provisions pour divers risques et charges": {} + } + }, + "root_type": "Equity" + }, + "2-Comptes d\u2019actif immobilis\u00e9": { + "21-Immobilisations incorporelles": { + "account_type": "Fixed Asset", + "211-Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset" + }, + "212-Brevets, licences, concessions et droits similaires": { + "account_type": "Fixed Asset", + "2121-Brevets": { + "account_type": "Fixed Asset" + }, + "2122-Licences": { + "account_type": "Fixed Asset" + }, + "2123-Concessions de service public": { + "account_type": "Fixed Asset" + }, + "2128-Autres concessions et droits similaires": { + "account_type": "Fixed Asset" + } + }, + "213-Logiciels et sites internet": { + "account_type": "Fixed Asset", + "2131-Logiciels": { + "account_type": "Fixed Asset" + }, + "2132-Sites internet": { + "account_type": "Fixed Asset" + } + }, + "214-Marques": { + "account_type": "Fixed Asset" + }, + "215-Fonds commercial": { + "account_type": "Fixed Asset" + }, + "216-Droit au bail": { + "account_type": "Fixed Asset" + }, + "217-Investissements de cr\u00e9ation": { + "account_type": "Fixed Asset" + }, + "218-Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset", + "2181-Frais de prospection et d\u2019\u00e9valuation de ressources min\u00e9rales": { + "account_type": "Fixed Asset" + }, + "2182-Co\u00fbts d\u2019obtention du contrat": { + "account_type": "Fixed Asset" + }, + "2183-Fichiers clients, notices, titres de journaux et magazines": { + "account_type": "Fixed Asset" + }, + "2184-Co\u00fbts des franchises": { + "account_type": "Fixed Asset" + }, + "2188-Divers droits et valeurs incorporelles": { + "account_type": "Fixed Asset" + } + }, + "219-Immobilisations incorporelles en cours": { + "account_type": "Fixed Asset", + "2191-Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset" + }, + "2193-Logiciels et internet": { + "account_type": "Fixed Asset" + }, + "2198-Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset" + } + } + }, + "22-Terrains": { + "account_type": "Fixed Asset", + "221-Terrains agricoles et forestiers": { + "account_type": "Fixed Asset", + "2211-Terrains d\u2019exploitation agricole": { + "account_type": "Fixed Asset" + }, + "2212-Terrains d\u2019exploitation foresti\u00e8re": { + "account_type": "Fixed Asset" + }, + "2218-Autres terrains": { + "account_type": "Fixed Asset" + } + }, + "222-Terrains nus": { + "account_type": "Fixed Asset", + "2221-Terrains \u00e0 b\u00e2tir": { + "account_type": "Fixed Asset" + }, + "2228-Autres terrains nus": { + "account_type": "Fixed Asset" + } + }, + "223-Terrains b\u00e2tis": { + "account_type": "Fixed Asset", + "2231-Pour b\u00e2timents industriels et agricoles": { + "account_type": "Fixed Asset" + }, + "2232-Pour b\u00e2timents administratifs et commerciaux": { + "account_type": "Fixed Asset" + }, + "2234-Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations professionnelles": { + "account_type": "Fixed Asset" + }, + "2235-Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations non professionnelles": { + "account_type": "Fixed Asset" + }, + "2238-Autres terrains b\u00e2tis": { + "account_type": "Fixed Asset" + } + }, + "224-Travaux de mise en valeur des terrains": { + "account_type": "Fixed Asset", + "2241-Plantation d\u2019arbres et d\u2019arbustes": { + "account_type": "Fixed Asset" + }, + "2245-Am\u00e9liorations du fonds": { + "account_type": "Fixed Asset" + }, + "2248-Autres travaux": { + "account_type": "Fixed Asset" + } + }, + "225-Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset", + "2251-Carri\u00e8res": { + "account_type": "Fixed Asset" + } + }, + "226-Terrains am\u00e9nag\u00e9s": { + "account_type": "Fixed Asset", + "2261-Parkings": { + "account_type": "Fixed Asset" + } + }, + "227-Terrains mis en concession": { + "account_type": "Fixed Asset" + }, + "228-Autres terrains": { + "account_type": "Fixed Asset", + "2281-Terrains immeubles de placement": { + "account_type": "Fixed Asset" + }, + "2285-Terrains des logements affect\u00e9s au personnel": { + "account_type": "Fixed Asset" + }, + "2286-Terrains de location acquisition": { + "account_type": "Fixed Asset" + }, + "2288-Divers terrains": { + "account_type": "Fixed Asset" + } + }, + "229-Am\u00e9nagements de terrains en cours": { + "account_type": "Fixed Asset", + "2291-Terrains agricoles et forestiers": { + "account_type": "Fixed Asset" + }, + "2292-Terrains nus": { + "account_type": "Fixed Asset" + }, + "2295-Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset" + }, + "2298-Autres terrains": { + "account_type": "Fixed Asset" + } + } + }, + "23-B\u00e2timents, installations techniques et agencements": { + "231-B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "2311-B\u00e2timents industriels": {}, + "2312-B\u00e2timents agricoles": {}, + "2313-B\u00e2timents administratifs et commerciaux": {}, + "2314-B\u00e2timents affect\u00e9s au logement du personnel": {}, + "2315-B\u00e2timents immeubles de placement": {}, + "2316-B\u00e2timents de location acquisition": {} + }, + "232-B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "2321-B\u00e2timents industriels": {}, + "2322-B\u00e2timents agricoles": {}, + "2323-B\u00e2timents administratifs et commerciaux": {}, + "2324-B\u00e2timents affect\u00e9s au logement du personnel": {}, + "2325-B\u00e2timents immeubles de placement": {}, + "2326-B\u00e2timents de location acquisition": {} + }, + "233-Ouvrages d\u2019infrastructure": { + "2331-Voies de terre": {}, + "2332-Voies de fer": {}, + "2333-Voies d\u2019eau": {}, + "2334-Barrages, Digues": {}, + "2335-Pistes d\u2019a\u00e9rodrome": {}, + "2338-Autres ouvrages d\u2019infrastructures": {} + }, + "234-Am\u00e9nagements, agencements et installations techniques": { + "2341-Installations complexes sp\u00e9cialis\u00e9es sur sol propre": {}, + "2342-Installations complexes sp\u00e9cialis\u00e9es sur sol d\u2019autrui": {}, + "2343-Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol propre": {}, + "2344-Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol d\u2019autrui": {}, + "2345-Am\u00e9nagements et agencements des b\u00e2timents": {} + }, + "235-Am\u00e9nagements de bureaux": { + "2351-Installations g\u00e9n\u00e9rales": {}, + "2358-Autres am\u00e9nagements de bureaux": {} + }, + "237-B\u00e2timents industriels, agricoles et commerciaux mis en concession": {}, + "238-Autres installations et agencements": {}, + "239-B\u00e2timents am\u00e9nagements, agencements et installations en cours": { + "2391-B\u00e2timents en cours": {}, + "2392-Installations en cours": {}, + "2393-Ouvrages d\u2019infrastructure en cours": {}, + "2394-Am\u00e9nagements et agencements et installations techniques en cours": {}, + "2395-Am\u00e9nagements de bureaux en cours": {}, + "2398-Autres installations et agencements en cours": {} + } + }, + "24-Mat\u00e9riel, mobilier et actifs biologiques": { + "241-Mat\u00e9riel et outillage industriel et commercial": { + "2411-Mat\u00e9riel industriel": {}, + "2412-Outillage industriel": {}, + "2413-Mat\u00e9riel commercial": {}, + "2414-Outillage commercial": {}, + "2416-Mat\u00e9riel & outillage industriel et commercial de location-acquisition": {} + }, + "242-Mat\u00e9riel et outillage agricole": { + "2421-Mat\u00e9riel agricole": {}, + "2422-Outillage agricole": {}, + "2426-Mat\u00e9riel & outillage agricole de location-acquisition": {} + }, + "243-Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "244-Mat\u00e9riel et mobilier": { + "2441-Mat\u00e9riel de bureau": {}, + "2442-Mat\u00e9riel informatique": {}, + "2443-Mat\u00e9riel bureautique": {}, + "2444-Mobilier de bureau": {}, + "2445-Mat\u00e9riel et mobilier immeubles de placement": {}, + "2446-Mat\u00e9riel et mobilier de location acquisition": {}, + "2447-Mat\u00e9riel et mobilier des logements du personnel": {} + }, + "245-Mat\u00e9riel de transport": { + "2451-Mat\u00e9riel automobile": {}, + "2452-Mat\u00e9riel ferroviaire": {}, + "2453-Mat\u00e9riel fluvial, lagunaire": {}, + "2454-Mat\u00e9riel naval": {}, + "2455-Mat\u00e9riel a\u00e9rien": {}, + "2456-Mat\u00e9riel de transport de location-acquisition": {}, + "2457-Mat\u00e9riel hippomobile": {}, + "2458-Autres mat\u00e9riels de transport": {} + }, + "246-Actifs biologiques": { + "2461-Cheptel, animaux de trait": {}, + "2462-Cheptel, animaux reproducteurs": {}, + "2463-Animaux de garde": {}, + "2465-Plantations agricoles": {}, + "2468-Autres actifs biologiques": {} + }, + "247-Agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "2471-Agencements et am\u00e9nagements du mat\u00e9riel": {}, + "2472-Agencements et am\u00e9nagements des actifs biologiques": {}, + "2478-Autres agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": {} + }, + "248-Autres mat\u00e9riels et mobiliers": { + "2481-Collections et \u0153uvres d\u2019art": {}, + "2488-Divers mat\u00e9riels mobiliers": {} + }, + "249-Mat\u00e9riels et actifs biologiques en cours": { + "2491-Mat\u00e9riel et outillage industriel et commercial": {}, + "2492-Mat\u00e9riel et outillage agricole": {}, + "2493-Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "2494-Mat\u00e9riel et mobilier de bureau": {}, + "2495-Mat\u00e9riel de transport": {}, + "2496-Actifs biologiques": {}, + "2497-Agencements am\u00e9nagements du mat\u00e9riel et actifs biologiques": {}, + "2498-Autres mat\u00e9riels et actifs biologiques en cours": {} + } + }, + "25-Avances et acomptes vers\u00e9s sur immobilisations": { + "251-Avances et acomptes vers\u00e9s sur immobilisations incorporelles": {}, + "252-Avances et acomptes vers\u00e9s sur immobilisations corporelles": {} + }, + "26-Titres de participation": { + "261-Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": {}, + "262-Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le conjoint": {}, + "263-Titres de participation dans des soci\u00e9t\u00e9s conf\u00e9rant une influence notable": {}, + "265-Participations dans des organismes professionnels": {}, + "266-Parts dans des groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": {}, + "268-Autres titres de participation": {} + }, + "27-Autres immobilisations financi\u00e8res": { + "271-Pr\u00eats et cr\u00e9ances": { + "2711-Pr\u00eats participatifs": {}, + "2712-Pr\u00eats aux associ\u00e9s": {}, + "2713-Billets de fonds": {}, + "2714-Titres pr\u00eat\u00e9s": {}, + "2718-Autres pr\u00eats et cr\u00e9ances": {} + }, + "272-Pr\u00eats au personnel": { + "2721-Pr\u00eats immobiliers": {}, + "2722-Pr\u00eats mobiliers et d\u2019installation": {}, + "2728-Autres pr\u00eats au personnel": {} + }, + "273-Cr\u00e9ances sur l\u2019\u00c9tat": { + "2731-Retenues de garantie": {}, + "2733-Fonds r\u00e9glement\u00e9": {}, + "2734-Cr\u00e9ances sur le conc\u00e9dant": {}, + "2738-Autres cr\u00e9ances sur l\u2019\u00c9tat": {} + }, + "274-Titres immobilis\u00e9s": { + "2741-Titres immobilis\u00e9s de l\u2019activit\u00e9 de portefeuille (TIAP)": {}, + "2742-Titres participatifs": {}, + "2743-Certificats d\u2019investissement": {}, + "2744-Parts de fonds commun de placement (FCP)": {}, + "2745-Obligations": {}, + "2746-Actions ou parts propres": {}, + "2748-Autres titres immobilis\u00e9s": {} + }, + "275-D\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "2751-D\u00e9p\u00f4ts pour loyers d\u2019avance": {}, + "2752-D\u00e9p\u00f4ts pour l\u2019\u00e9lectricit\u00e9": {}, + "2753-D\u00e9p\u00f4ts pour l\u2019eau": {}, + "2754-D\u00e9p\u00f4ts pour le gaz": {}, + "2755-D\u00e9p\u00f4ts pour le t\u00e9l\u00e9phone, le t\u00e9lex, la t\u00e9l\u00e9copie": {}, + "2756-Cautionnements sur march\u00e9s publics": {}, + "2757-Cautionnements sur autres op\u00e9rations": {}, + "2758-Autres d\u00e9p\u00f4ts et cautionnements": {} + }, + "276-Int\u00e9r\u00eats courus": { + "2761-Pr\u00eats et cr\u00e9ances non commerciales": {}, + "2762-Pr\u00eats au personnel": {}, + "2763-Cr\u00e9ances sur l\u2019\u00c9tat": {}, + "2764-Titres immobilis\u00e9s": {}, + "2765-D\u00e9p\u00f4ts et cautionnements vers\u00e9s": {}, + "2767-Cr\u00e9ances rattach\u00e9es \u00e0 des participations": {}, + "2768-Immobilisations financi\u00e8res diverses": {} + }, + "277-Cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": { + "2771-Cr\u00e9ances rattach\u00e9es \u00e0 des participations (groupe)": {}, + "2772-Cr\u00e9ances rattach\u00e9es \u00e0 des participations (hors groupe)": {}, + "2773-Cr\u00e9ances rattach\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": {}, + "2774-Avances \u00e0 des Groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": {} + }, + "278-Immobilisations financi\u00e8res diverses": { + "2781-Cr\u00e9ances diverses groupe": {}, + "2782-Cr\u00e9ances diverses hors groupe": {}, + "2784-Banques d\u00e9p\u00f4ts \u00e0 terme": {}, + "2785-Or et m\u00e9taux pr\u00e9cieux": {}, + "2788-Autres immobilisations financi\u00e8res": {} + } + }, + "28-Amortissements": { + "account_type": "Accumulated Depreciation", + "281-Amortissements des immobilisations corporelles": { + "account_type": "Accumulated Depreciation", + "2811-Amortissements des frais de d\u00e9veloppement": { + "account_type": "Accumulated Depreciation" + }, + "2812-Amortissements des brevets, licences, concessions et droits similaires": { + "account_type": "Accumulated Depreciation" + }, + "2813-Amortissements des logiciels et sites internet": { + "account_type": "Accumulated Depreciation" + }, + "2814-Amortissements des marques": { + "account_type": "Accumulated Depreciation" + }, + "2815-Amortissements du fonds commercial": { + "account_type": "Accumulated Depreciation" + }, + "2816-Amortissements du droit au bail": { + "account_type": "Accumulated Depreciation" + }, + "2817-Amortissements des investissements de cr\u00e9ation": { + "account_type": "Accumulated Depreciation" + }, + "2818-Amortissements des autres droits et valeurs incorporels": { + "account_type": "Accumulated Depreciation" + } + }, + "282-Amortissements des terrains": { + "2824-Amortissements des travaux de mise en valeur des terrains": {} + }, + "283-Amortissements des b\u00e2timents, installations techniques et agencements": { + "2831-Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": {}, + "2832-Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": {}, + "2833-Amortissements des ouvrages d\u2019infrastructure": {}, + "2834-Amortissements des am\u00e9nagements, agencements et installations techniques": {}, + "2835-Amortissements des am\u00e9nagements de bureaux": {}, + "2837-Amortissements des b\u00e2timents industriels, agricoles et commerciaux mis en concession": {}, + "2838-Amortissements des autres installations et agencements": {} + }, + "284-Amortissements du mat\u00e9riel": { + "2841-Amortissements du mat\u00e9riel et outillage industriel et commercial": {}, + "2842-Amortissements du mat\u00e9riel et outillage agricole": {}, + "2843-Amortissements du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "2844-Amortissements du mat\u00e9riel et mobilier": {}, + "2845-Amortissements du mat\u00e9riel de transport": {}, + "2846-Amortissements des actifs biologiques": {}, + "2847-Amortissements des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": {}, + "2848-Amortissements des autres mat\u00e9riels": {} + } + }, + "29-D\u00e9pr\u00e9ciations des immobilisations": { + "291-D\u00e9pr\u00e9ciations des immobilisations incorporelles": { + "2911-D\u00e9pr\u00e9ciations des frais de d\u00e9veloppement": {}, + "2912-D\u00e9pr\u00e9ciations des brevets, licences, concessions et droits similaires": {}, + "2913-D\u00e9pr\u00e9ciations des logiciels et sites internet": {}, + "2914-D\u00e9pr\u00e9ciations des marques": {}, + "2915-D\u00e9pr\u00e9ciations du fonds commercial": {}, + "2916-D\u00e9pr\u00e9ciations du droit au bail": {}, + "2917-D\u00e9pr\u00e9ciations des investissements de cr\u00e9ation": {}, + "2918-D\u00e9pr\u00e9ciations des autres droits et valeurs incorporels": {}, + "2919-D\u00e9pr\u00e9ciations des immobilisations incorporelles en cours": {} + }, + "292-D\u00e9pr\u00e9ciations des terrains": { + "2921-D\u00e9pr\u00e9ciations des terrains agricoles et forestiers": {}, + "2922-D\u00e9pr\u00e9ciations des terrains nus": {}, + "2923-D\u00e9pr\u00e9ciations des terrains b\u00e2tis": {}, + "2924-D\u00e9pr\u00e9ciations des travaux de mise en valeur des terrains": {}, + "2925-D\u00e9pr\u00e9ciations des terrains de gisement": {}, + "2926-D\u00e9pr\u00e9ciations des terrains am\u00e9nag\u00e9s": {}, + "2927-D\u00e9pr\u00e9ciations des terrains mis en concession": {}, + "2928-D\u00e9pr\u00e9ciations des autres terrains": {}, + "2929-D\u00e9pr\u00e9ciations des am\u00e9nagements de terrains en cours": {} + }, + "293-D\u00e9pr\u00e9ciations des b\u00e2timents, installations techniques et agencements": { + "2931-D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": {}, + "2932-D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": {}, + "2933-D\u00e9pr\u00e9ciations des ouvrages d\u2019infrastructures": {}, + "2934-D\u00e9pr\u00e9ciations des am\u00e9nagements, agencements et installations techniques": {}, + "2935-D\u00e9pr\u00e9ciations des am\u00e9nagements de bureaux": {}, + "2937-D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles et commerciaux mis en concession": {}, + "2938-D\u00e9pr\u00e9ciations des autres installations et agencements": {}, + "2939-D\u00e9pr\u00e9ciations des b\u00e2timents et installations en cours": {} + }, + "294-D\u00e9pr\u00e9ciations de mat\u00e9riel, du mobilier et de l\u2019actif biologique": { + "2941-D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage industriel et commercial": {}, + "2942-D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage agricole": {}, + "2943-D\u00e9pr\u00e9ciations du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "2944-D\u00e9pr\u00e9ciations du mat\u00e9riel et mobilier": {}, + "2945-D\u00e9pr\u00e9ciations du mat\u00e9riel de transport": {}, + "2946-D\u00e9pr\u00e9ciations des actifs biologiques": {}, + "2947-D\u00e9pr\u00e9ciations des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": {}, + "2948-D\u00e9pr\u00e9ciations des autres mat\u00e9riels": {}, + "2949-D\u00e9pr\u00e9ciations de mat\u00e9riel en cours": {} + }, + "295-D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations": { + "2951-D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations incorporelles": {}, + "2952-D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations corporelles": {} + }, + "296-D\u00e9pr\u00e9ciations des titres de participation": { + "2961-D\u00e9pr\u00e9ciations des titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": {}, + "2962-D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s sous contr\u00f4le conjoint": {}, + "2963-D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s conf\u00e9rant une influence notable": {}, + "2965-D\u00e9pr\u00e9ciations des participations dans des organismes professionnels": {}, + "2966-D\u00e9pr\u00e9ciations des parts dans des GIE": {}, + "2968-D\u00e9pr\u00e9ciations des autres titres de participation": {} + }, + "297-D\u00e9pr\u00e9ciations des autres immobilisations financi\u00e8res": { + "2971-D\u00e9pr\u00e9ciations des pr\u00eats et cr\u00e9ances": {}, + "2972-D\u00e9pr\u00e9ciations des pr\u00eats au personnel": {}, + "2973-D\u00e9pr\u00e9ciations des cr\u00e9ances sur l\u2019\u00c9tat": {}, + "2974-D\u00e9pr\u00e9ciations des titres immobilis\u00e9s": {}, + "2975-D\u00e9pr\u00e9ciations des d\u00e9p\u00f4ts et cautionnements vers\u00e9s": {}, + "2977-D\u00e9pr\u00e9ciations des cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": {}, + "2978-D\u00e9pr\u00e9ciations des cr\u00e9ances financi\u00e8res diverses": {} + } + }, + "root_type": "Asset" + }, + "3-Comptes de Stocks": { + "31-Marchandises": { + "311-Marchandises A": { + "3111-Marchandises A1": {}, + "3112-Marchandises A2": {} + }, + "312-Marchandises B": { + "3121-Marchandises B1": {}, + "3122-Marchandises B2": {} + }, + "313-Actifs biologiques": { + "3131-Animaux": {}, + "3132-V\u00e9g\u00e9taux": {} + }, + "318-Marchandises hors activit\u00e9s ordinaires (HAO)": {} + }, + "32-Mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "321-Mati\u00e8res A": {}, + "322-Mati\u00e8res B": {}, + "323-Fournitures (A, B)": {} + }, + "33-Autres approvisionnements": { + "331-Mati\u00e8res consommables": {}, + "332-Fournitures d\u2019atelier et d\u2019usine": {}, + "333-Fournitures de magasin": {}, + "334-Fournitures de bureau": {}, + "335-Emballages": { + "3351-Emballages perdus": {}, + "3352-Emballages r\u00e9cup\u00e9rables non identifiables": {}, + "3353-Emballages \u00e0 usage mixte": {}, + "3358-Autres emballages": {} + }, + "338-Autres mati\u00e8res": {} + }, + "34-Produits en cours": { + "341-Produits en cours": { + "3411-Produits en cours P1": {}, + "3412-Produits en cours P2": {} + }, + "342-Travaux en cours": { + "3421-Travaux en cours T1": {}, + "3422-Travaux en cours T2": {} + }, + "343-Produits interm\u00e9diaires en cours": { + "3431-Produits interm\u00e9diaires A": {}, + "3432-Produits interm\u00e9diaires B": {} + }, + "344-Produits r\u00e9siduels en cours": { + "3441-Produits r\u00e9siduels A": {}, + "3442-Produits r\u00e9siduels B": {} + }, + "345-Actifs biologiques en cours": { + "3451-Animaux": {}, + "3452-V\u00e9g\u00e9taux": {} + } + }, + "35-Services en cours": { + "351-\u00c9tudes en cours": { + "3511-\u00c9tudes en cours E1": {}, + "3512-\u00c9tudes en cours E2": {} + }, + "352-Prestations de services en cours": { + "3521-Prestations de services S1": {}, + "3522-Prestations de services S2": {} + } + }, + "36-Produits finis": { + "361-Produits finis A": {}, + "362-Produits finis B": {}, + "363-Actifs biologiques": { + "3631-Animaux": {}, + "3632-V\u00e9g\u00e9taux": {}, + "3638-Autres stocks (activit\u00e9s annexes)": {} + } + }, + "37-Produits interm\u00e9diaires et r\u00e9siduels": { + "371-Produits interm\u00e9diaires": { + "3711-Produits interm\u00e9diaires A": {}, + "3712-Produits interm\u00e9diaires B": {} + }, + "372-Produits r\u00e9siduels": { + "3721-D\u00e9chets": {}, + "3722-Rebuts": {}, + "3723-Mati\u00e8res de R\u00e9cup\u00e9ration": {} + }, + "373-Actifs biologiques": { + "3731-Animaux": {}, + "3732-V\u00e9g\u00e9taux": {}, + "3738-Autres stocks (activit\u00e9s annexes)": {} + } + }, + "38-Stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": { + "account_type": "Stock", + "381-Marchandises en cours de route": {}, + "382-Mati\u00e8res premi\u00e8res et fournitures li\u00e9es en cours de route": {}, + "383-Autres approvisionnements en cours de route": {}, + "386-Produits finis en cours de route": {}, + "387-Stock en consignation ou en d\u00e9p\u00f4t": { + "3871-Stock en consignation": {}, + "3872-Stock en d\u00e9p\u00f4t": {} + }, + "388-Stock provenant d\u2019immobilisations mises hors service ou au rebut": {} + }, + "39-D\u00e9pr\u00e9ciations des stocks et encours de production": { + "391-D\u00e9pr\u00e9ciations des stocks de marchandises": {}, + "392-D\u00e9pr\u00e9ciations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": {}, + "393-D\u00e9pr\u00e9ciations des stocks d\u2019autres approvisionnements": {}, + "394-D\u00e9pr\u00e9ciations des productions en cours": {}, + "395-D\u00e9pr\u00e9ciations des services en cours": {}, + "396-D\u00e9pr\u00e9ciations des stocks de produits finis": {}, + "397-D\u00e9pr\u00e9ciations des stocks de produits interm\u00e9diaires et r\u00e9siduels": {}, + "398-D\u00e9pr\u00e9ciations des stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": {} + }, + "root_type": "Asset" + }, + "4-Comptes de Tiers (ACTIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (ACTIF)": { + "409-Fournisseurs d\u00e9biteurs": { + "4091-Fournisseurs Avances et acomptes vers\u00e9s": {}, + "4092-Fournisseurs Groupe avances et acomptes vers\u00e9s": {}, + "4093-Fournisseurs Sous-traitants avances et acomptes vers\u00e9s": {}, + "4094-Fournisseurs Cr\u00e9ances pour emballages et mat\u00e9riels \u00e0 rendre": {}, + "4098-Fournisseurs Rabais, remises, ristournes et autres avoirs \u00e0 obtenir": {} + } + }, + "41-Clients et comptes rattach\u00e9s (ACTIF)": { + "411-Clients": { + "4111-Clients": { + "account_type": "Receivable" + }, + "4112-Clients groupe": { + "account_type": "Receivable" + }, + "4114-Clients, \u00c9tat et Collectivit\u00e9s publiques": { + "account_type": "Receivable" + }, + "4115-Clients, organismes internationaux": { + "account_type": "Receivable" + }, + "4116-Clients, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Receivable" + }, + "4117-Client, retenues de garantie": { + "account_type": "Receivable" + }, + "4118-Clients, d\u00e9gr\u00e8vement de taxes sur la valeur ajout\u00e9e (TVA)": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "412-Clients, effets \u00e0 recevoir en portefeuille": { + "4121-Clients, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "4122-Clients Groupe, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "4124-\u00c9tat et Collectivit\u00e9s publiques, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "4125-Organismes Internationaux, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "413-Clients, ch\u00e8ques, effets et autres valeurs impay\u00e9es": { + "4131-Clients, ch\u00e8ques impay\u00e9s": { + "account_type": "Receivable" + }, + "4132-Clients, effets impay\u00e9s": { + "account_type": "Receivable" + }, + "4133-Clients, cartes de cr\u00e9dit impay\u00e9es": { + "account_type": "Receivable" + }, + "4138-Clients, autres valeurs impay\u00e9es": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "414-Cr\u00e9ances sur cessions courantes d\u2019immobilisations": { + "4141-Cr\u00e9ances en compte, immobilisations incorporelles": { + "account_type": "Receivable" + }, + "4142-Cr\u00e9ances en compte, immobilisations corporelles": { + "account_type": "Receivable" + }, + "4146-Effets \u00e0 recevoir, immobilisations incorporelles": { + "account_type": "Receivable" + }, + "4147-Effets \u00e0 recevoir, immobilisations corporelles": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "415-Clients, effets escompt\u00e9s non \u00e9chus": { + "account_type": "Receivable" + }, + "416-Cr\u00e9ances clients litigieuses ou douteuses": { + "4161-Cr\u00e9ances litigieuses": { + "account_type": "Receivable" + }, + "4162-Cr\u00e9ances douteuses": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "418-Clients, produits \u00e0 recevoir": { + "4181-Clients, factures \u00e0 \u00e9tablir": { + "account_type": "Receivable" + }, + "4186-Clients, int\u00e9r\u00eats courus": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "42-Personnel (ACTIF)": { + "421-Personnel, avances et acomptes": { + "4211-Personnel, avances": {}, + "4212-Personnel, acomptes": {}, + "4213-Frais avanc\u00e9s et fournitures au personnel": {} + } + }, + "43-Organismes sociaux (ACTIF)": { + "431-S\u00e9curit\u00e9 sociale": { + "4311-Prestations familiales": {}, + "4312-Accidents de travail": {}, + "4313-Caisse de retraite obligatoire": {}, + "4314-Caisse de retraite facultative": {}, + "4318-Autres cotisations sociales": {} + }, + "432-Caisses de retraite compl\u00e9mentaire": {}, + "433-Autres organismes sociaux": { + "4331-Mutuelle": {}, + "4332-Assurances retraite": {}, + "4333-Assurances et organismes de sant\u00e9": {} + }, + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "4387-Produits \u00e0 recevoir": {} + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (ACTIF)": { + "443-\u00c9tat, TVA factur\u00e9e": { + "4431-TVA factur\u00e9e sur ventes": {}, + "4432-TVA factur\u00e9e sur prestations de services": {}, + "4433-TVA factur\u00e9e sur travaux": {}, + "4434-TVA factur\u00e9e sur production livr\u00e9e \u00e0 soi-m\u00eame": {}, + "4435-TVA sur factures \u00e0 \u00e9tablir": {} + }, + "445-\u00c9tat, TVA r\u00e9cup\u00e9rable": { + "4451-TVA r\u00e9cup\u00e9rable sur immobilisations": {}, + "4452-TVA r\u00e9cup\u00e9rable sur achats": {}, + "4453-TVA r\u00e9cup\u00e9rable sur transport": {}, + "4454-TVA r\u00e9cup\u00e9rable sur services ext\u00e9rieurs et autres charges": {}, + "4455-TVA r\u00e9cup\u00e9rable sur factures non parvenues": {}, + "4456-TVA transf\u00e9r\u00e9e par d\u2019autres entit\u00e9s": {} + }, + "448-\u00c9tat, charges \u00e0 payer et produits \u00e0 recevoir": { + "4486-Charges \u00e0 payer": {}, + "4487-Produits \u00e0 recevoir": {} + }, + "449-\u00c9tat, cr\u00e9ances et dettes diverses": { + "4491-\u00c9tat, obligations cautionn\u00e9es": {}, + "4492-\u00c9tat, avances et acomptes vers\u00e9s sur imp\u00f4ts": {}, + "4493-\u00c9tat, fonds de dotation \u00e0 recevoir": {}, + "4494-\u00c9tat, subventions investissement \u00e0 recevoir": {}, + "4495-\u00c9tat, subventions d\u2019exploitation \u00e0 recevoir": {}, + "4496-\u00c9tat, subventions d\u2019\u00e9quilibre \u00e0 recevoir": {}, + "4497-\u00c9tat, avances sur subventions": {}, + "4499-\u00c9tat, fonds r\u00e9glement\u00e9s provisionn\u00e9s": {} + } + }, + "45-Organismes internationaux (ACTIF)": { + "451-Op\u00e9rations avec les organismes africains": {}, + "452-Op\u00e9rations avec les autres organismes internationaux": {}, + "458-Organismes internationaux, fonds de dotation et subventions \u00e0 recevoir": { + "4581-Organismes internationaux, fonds de dotation \u00e0 recevoir": {}, + "4582-Organismes internationaux, subventions \u00e0 recevoir": {} + } + }, + "46-Apporteurs, associ\u00e9s et groupe (ACTIF)": { + "461-Apporteurs, op\u00e9rations sur le capital": { + "4613-Apporteurs, capital appel\u00e9, non vers\u00e9": {}, + "4614-Apporteurs, compte d\u2019apport, op\u00e9rations de restructuration (fusion...)": {}, + "4618-Apporteurs, titres \u00e0 \u00e9changer": {} + }, + "467-Apporteurs, restant d\u00fb sur capital appel\u00e9": {} + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (ACTIF)": { + "472-Cr\u00e9ances et dettes sur titres de placement": { + "4721-Cr\u00e9ances sur cessions de titres de placement": {}, + "4726-Versements restant \u00e0 effectuer sur titres de placement non lib\u00e9r\u00e9s": {} + }, + "473-Interm\u00e9diaires Op\u00e9rations faites pour compte de tiers": { + "4731-Mandants": {}, + "4732-Mandataires": {}, + "4733-Commettants": {}, + "4734-Commissionnaires": {}, + "4739-\u00c9tat, Collectivit\u00e9s publiques, fonds global d\u2019allocation": {} + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits": { + "4747-Compte de r\u00e9partition p\u00e9riodique des produits": {} + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA": { + "4751-Compte actif": { + "account_type": "Temporary" + } + }, + "476-Charges constat\u00e9es d\u2019avance": {}, + "478-\u00c9carts de conversion actif": { + "4781-Diminution des cr\u00e9ances d\u2019exploitation": {}, + "4782-Diminution des cr\u00e9ances financi\u00e8res": {}, + "4783-Augmentation des dettes d\u2019exploitation": {}, + "4784-Augmentation des dettes financi\u00e8res": {}, + "4786-Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": {}, + "4788-Diff\u00e9rences compens\u00e9es par couverture de change": {} + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (ACTIF)": { + "485-Cr\u00e9ances sur cessions d\u2019immobilisations": { + "4851-En compte, immobilisations incorporelles": {}, + "4852-En compte, immobilisations corporelles": {}, + "4853-Effets \u00e0 recevoir, immobilisations incorporelles": {}, + "4854-Effets \u00e0 recevoir, immobilisations corporelles": {}, + "4855-Effets escompt\u00e9s non \u00e9chus": {}, + "4857-Retenues de garantie": {}, + "4858-Factures \u00e0 \u00e9tablir": {} + }, + "488-Autres cr\u00e9ances hors activit\u00e9s ordinaires (HAO)": {} + }, + "49-D\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme (tiers) (ACTIF)": { + "491-D\u00e9pr\u00e9ciations des comptes clients": { + "4911-Cr\u00e9ances litigieuses": {}, + "4912-Cr\u00e9ances douteuses": {} + }, + "495-D\u00e9pr\u00e9ciations des comptes organismes internationaux": {}, + "496-D\u00e9pr\u00e9ciations des comptes apporteurs, associ\u00e9s et groupe": { + "4962-Associ\u00e9s, comptes courants": {}, + "4963-Associ\u00e9s, op\u00e9rations faites en commun": {}, + "4966-Groupe, comptes courants": {} + }, + "497-D\u00e9pr\u00e9ciations des comptes d\u00e9biteurs divers": {}, + "498-D\u00e9pr\u00e9ciations des comptes de cr\u00e9ances HAO": { + "4985-Cr\u00e9ances sur cessions d\u2019immobilisations": {}, + "4986-Cr\u00e9ances sur cessions de titres de placement": {}, + "4988-Autres cr\u00e9ances HAO": {} + }, + "499-Provisions pour risques \u00e0 court terme": { + "4991-Sur op\u00e9rations d\u2019exploitation": {}, + "4997-Sur op\u00e9rations financi\u00e8res": {}, + "4998-Sur op\u00e9rations HAO": {} + } + }, + "root_type": "Asset" + }, + "4-Comptes de Tiers (PASSIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (PASSIF)": { + "401-Fournisseurs, dettes en compte": { + "4011-Fournisseurs": { + "account_type": "Payable" + }, + "4012-Fournisseurs groupe": { + "account_type": "Payable" + }, + "4013-Fournisseurs sous-traitants": { + "account_type": "Payable" + }, + "4016-Fournisseurs, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Payable" + }, + "4017-Fournisseur, retenues de garantie": { + "account_type": "Payable" + }, + "account_type": "Payable" + }, + "402-Fournisseurs, effets \u00e0 payer": { + "4021-Fournisseurs Effets \u00e0 payer": { + "account_type": "Payable" + }, + "4022-Fournisseurs Groupe, effets \u00e0 payer": { + "account_type": "Payable" + }, + "4023-Fournisseurs Sous-traitants, effets \u00e0 payer": { + "account_type": "Payable" + }, + "account_type": "Payable" + }, + "404-Fournisseurs, acquisitions courantes d\u2019immobilisations": { + "4041-Fournisseurs Dettes en comptes, immobilisations incorporelles": { + "account_type": "Payable" + }, + "4042-Fournisseurs Dettes en comptes, immobilisations corporelles": { + "account_type": "Payable" + }, + "4046-Fournisseurs Effets \u00e0 payer, immobilisations incorporelles": { + "account_type": "Payable" + }, + "4047-Fournisseurs Effets \u00e0 payer, immobilisations corporelles": { + "account_type": "Payable" + }, + "account_type": "Payable" + }, + "408-Fournisseurs, factures non parvenues": { + "4081-Fournisseurs": { + "account_type": "Stock Received But Not Billed" + }, + "4082-Fournisseurs groupe": { + "account_type": "Stock Received But Not Billed" + }, + "4083-Fournisseurs sous-traitants": { + "account_type": "Stock Received But Not Billed" + }, + "4086-Fournisseurs, int\u00e9r\u00eats courus": { + "account_type": "Stock Received But Not Billed" + }, + "account_type": "Stock Received But Not Billed" + }, + "account_type": "Payable" + }, + "41-Clients et comptes rattach\u00e9s (PASSIF)": { + "419-Clients cr\u00e9diteurs": { + "4191-Clients, avances et acomptes re\u00e7us": {}, + "4192-Clients groupe, avances et acomptes re\u00e7us": {}, + "4194-Clients, dettes pour emballages et mat\u00e9riels consign\u00e9s": {}, + "4198-Clients, rabais, remises, ristournes et autres avoirs \u00e0 accorder": {} + } + }, + "42-Personnel (PASSIF)": { + "422-Personnel, r\u00e9mun\u00e9rations dues": {}, + "423-Personnel, oppositions, saisies-arr\u00eats": { + "4231-Personnel, oppositions": {}, + "4232-Personnel, saisies-arr\u00eats": {}, + "4233-Personnel, avis \u00e0 tiers d\u00e9tenteur": {} + }, + "424-Personnel, \u0153uvres sociales internes": { + "4241-Assistance m\u00e9dicale": {}, + "4242-Allocations familiales": {}, + "4245-Organismes sociaux rattach\u00e9s \u00e0 l\u2019entit\u00e9": {}, + "4248-Autres \u0153uvres sociales internes": {} + }, + "425-Repr\u00e9sentants du personnel": { + "4251-D\u00e9l\u00e9gu\u00e9s du personnel": {}, + "4252-Syndicats et Comit\u00e9s d\u2019entreprises, d\u2019\u00c9tablissement": {}, + "4258-Autres repr\u00e9sentants du personnel": {} + }, + "426-Personnel, participation aux b\u00e9n\u00e9fices et au capital": { + "4261-Participation aux b\u00e9n\u00e9fices": {}, + "4264-Participation au capital": {} + }, + "427-Personnel d\u00e9p\u00f4ts": {}, + "428-Personnel, charges \u00e0 payer et produits \u00e0 recevoir": { + "4281-Dettes provisionn\u00e9es pour cong\u00e9s \u00e0 payer": {}, + "4286-Autres charges \u00e0 payer": {}, + "4287-Produits \u00e0 recevoir": {} + } + }, + "43-Organismes sociaux (PASSIF)": { + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "4381-Charges sociales sur gratifications \u00e0 payer": {}, + "4382-Charges sociales sur cong\u00e9s \u00e0 payer": {}, + "4386-Autres charges \u00e0 payer": {} + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (PASSIF)": { + "441-\u00c9tat, imp\u00f4t sur les b\u00e9n\u00e9fices": {}, + "442-\u00c9tat, autres imp\u00f4ts et taxes": { + "4421-Imp\u00f4ts et taxes d\u2019\u00c9tat": {}, + "4422-Imp\u00f4ts et taxes pour les collectivit\u00e9s publiques": {}, + "4423-Imp\u00f4ts et taxes recouvrables sur des obligataires": {}, + "4424-Imp\u00f4ts et taxes recouvrables sur des associ\u00e9s": {}, + "4426-Droits de douane": {}, + "4428-Autres imp\u00f4ts et taxes": {} + }, + "444-\u00c9tat, TVA due ou cr\u00e9dit de TVA": { + "4441-\u00c9tat, TVA due": {}, + "4449-\u00c9tat, cr\u00e9dit de TVA \u00e0 reporter": {} + }, + "446-\u00c9tat, autres taxes sur le chiffre d\u2019affaires": {}, + "447-\u00c9tat, imp\u00f4ts retenus \u00e0 la source": { + "4471-Imp\u00f4t G\u00e9n\u00e9ral sur le revenu": {}, + "4472-Imp\u00f4ts sur salaires": {}, + "4473-Contribution nationale": {}, + "4474-Contribution nationale de solidarit\u00e9": {}, + "4478-Autres imp\u00f4ts et contributions": {} + } + }, + "46-Apporteurs, associ\u00e9s et groupe (PASSIF)": { + "461-Apporteurs, op\u00e9rations sur le capital (PASSIF)": { + "4611-Apporteurs, apports en nature": {}, + "4612-Apporteurs, apports en num\u00e9raire": {}, + "4615-Apporteurs, versements re\u00e7us sur augmentation de capital": {}, + "4616-Apporteurs, versements anticip\u00e9s": {}, + "4617-Apporteurs d\u00e9faillants": {}, + "4619-Apporteurs, capital \u00e0 rembourser": {} + }, + "462-Associ\u00e9s, comptes courants": { + "4621-Principal": {}, + "4626-Int\u00e9r\u00eats courus": {} + }, + "463-Associ\u00e9s, op\u00e9rations faites en commun et GIE": { + "4631-Op\u00e9rations courantes": {}, + "4636-Int\u00e9r\u00eats courus": {} + }, + "465-Associ\u00e9s, dividendes \u00e0 payer": {}, + "466-Groupe, comptes courants": {} + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (PASSIF)": { + "471-D\u00e9biteurs et cr\u00e9diteurs divers": { + "4711-D\u00e9biteurs divers": {}, + "4712-Cr\u00e9diteurs divers": {}, + "4713-Obligataires": {}, + "4715-R\u00e9mun\u00e9rations d\u2019administrateurs": {}, + "4716-Compte d\u2019affacturage": {}, + "4717-D\u00e9biteurs divers retenues de garantie": {}, + "4718-Apport, compte de fusion et op\u00e9rations assimil\u00e9es": {}, + "4719-Bons de souscription d\u2019actions et d\u2019obligations": {} + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits (PASSIF)": { + "4746-Compte de r\u00e9partition p\u00e9riodique des charges": {} + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA (PASSIF)": { + "4752-Compte passif": {} + }, + "477-Produits constat\u00e9s d\u2019avance": {}, + "479-\u00c9carts de conversion passif": { + "4791-Augmentation des cr\u00e9ances d\u2019exploitation": {}, + "4792-Augmentation des cr\u00e9ances financi\u00e8res": {}, + "4793-Diminution des dettes d\u2019exploitation": {}, + "4794-Diminution des dettes financi\u00e8res": {}, + "4797-Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": {}, + "4798-Diff\u00e9rences compens\u00e9es par couverture de change": {} + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (HAO) (PASSIF)": { + "481-Fournisseurs d\u2019investissements": { + "4811-Immobilisations incorporelles": {}, + "4812-Immobilisations corporelles": {}, + "4813-Versements restant \u00e0 effectuer sur titres de participation et titres immobilis\u00e9s non lib\u00e9r\u00e9s": {}, + "4816-R\u00e9serve de propri\u00e9t\u00e9": {}, + "4817-Retenues de garantie": {}, + "4818-Factures non parvenues": {} + }, + "482-Fournisseurs d\u2019investissements, effets \u00e0 payer": { + "4821-Immobilisations incorporelles": {}, + "4822-Immobilisations corporelles": {} + }, + "484-Autres dettes hors activit\u00e9s ordinaires (HAO)": { + "4887-Produits": {} + } + }, + "49-D\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme (tiers) (PASSIF)": { + "490-D\u00e9pr\u00e9ciations des comptes fournisseurs": {}, + "492-D\u00e9pr\u00e9ciations des comptes personnel": {}, + "493-D\u00e9pr\u00e9ciations des comptes organismes sociaux": {}, + "494-D\u00e9pr\u00e9ciations des comptes \u00c9tat et collectivit\u00e9s publiques": {}, + "495-D\u00e9pr\u00e9ciations des comptes organismes internationaux": {} + }, + "root_type": "Liability" + }, + "5-Comptes de tr\u00e9sorerie": { + "50-Titres de placement": { + "501-Titres du tr\u00e9sor et bons de caisse \u00e0 court terme": { + "5011-Titres du Tr\u00e9sor \u00e0 court terme": {}, + "5012-Titres d\u2019organismes financiers": {}, + "5013-Bons de caisse \u00e0 court terme": {}, + "5016-Frais d\u2019acquisition des titres de tr\u00e9sor et bons de caisse": {} + }, + "502-Actions": { + "5021-Actions ou parts propres": {}, + "5022-Actions cot\u00e9es": {}, + "5023-Actions non cot\u00e9es": {}, + "5024-Actions d\u00e9membr\u00e9es (certificats d\u2019investissement, droits de vote)": {}, + "5025-Autres actions": {}, + "5026-Frais d\u2019acquisition des actions": {} + }, + "503-Obligations": { + "5031-Obligations \u00e9mises par la soci\u00e9t\u00e9 et rachet\u00e9es par elle": {}, + "5032-Obligations cot\u00e9es": {}, + "5033-Obligations non cot\u00e9es": {}, + "5035-Autres obligations": {}, + "5036-Frais d\u2019acquisition des obligations": {} + }, + "504-Bons de souscription": { + "5042-Bons de souscription d\u2019actions": {}, + "5043-Bons de souscription d\u2019obligations": {} + }, + "505-Titres n\u00e9gociables hors r\u00e9gion": {}, + "506-Int\u00e9r\u00eats courus": { + "5061-Titres du Tr\u00e9sor et bons de caisse \u00e0 court terme": {}, + "5062-Actions": {}, + "5063-Obligations": {} + }, + "508-Autres titres de placement et cr\u00e9ances assimil\u00e9es": {} + }, + "51-Valeurs \u00e0 encaisser": { + "511-Effets \u00e0 encaisser": {}, + "512-Effets \u00e0 l\u2019encaissement": {}, + "513-Ch\u00e8ques \u00e0 encaisser": {}, + "514-Ch\u00e8ques \u00e0 l\u2019encaissement": {}, + "515-Cartes de cr\u00e9dit \u00e0 encaisser": {}, + "518-Autres valeurs \u00e0 l\u2019encaissement": { + "5181-Warrants": {}, + "5182-Billets de fonds": {}, + "5185-Ch\u00e8ques de voyage": {}, + "5186-Coupons \u00e9chus": {}, + "5187-Int\u00e9r\u00eats \u00e9chus des obligations": {} + } + }, + "52-Banques": { + "521-Banques locales": { + "5211-Banques en monnaie nationale": { + "account_type": "Bank" + }, + "5215-Banques en devises": { + "account_type": "Bank" + }, + "account_type": "Bank" + }, + "522-Banques autres \u00c9tats r\u00e9gion": {}, + "523-Banques autres \u00c9tats zone mon\u00e9taire": {}, + "524-Banques hors zone mon\u00e9taire": {}, + "525-Banques d\u00e9p\u00f4t \u00e0 terme": {}, + "526-Banques, int\u00e9r\u00eats courus": { + "5261-Banque, int\u00e9r\u00eats courus, charges \u00e0 payer": {}, + "5267-Banque, int\u00e9r\u00eats courus, produits \u00e0 recevoir": {} + } + }, + "53-\u00c9tablissements financiers et assimil\u00e9s": { + "531-Ch\u00e8ques postaux": {}, + "532-Tr\u00e9sor": {}, + "533-Soci\u00e9t\u00e9s de gestion et d\u2019interm\u00e9diation (SGI)": {}, + "536-\u00c9tablissements financiers, int\u00e9r\u00eats courus": {}, + "538-Autres organismes financiers": {} + }, + "54-Instruments de tr\u00e9sorerie": { + "541-Options de taux d\u2019int\u00e9r\u00eat": {}, + "542-Options de taux de change": {}, + "543-Options de taux boursiers": {}, + "544-Instruments de march\u00e9s \u00e0 terme": {}, + "545-Avoirs d\u2019or et autres m\u00e9taux pr\u00e9cieux": {} + }, + "55-Instruments de monnaie \u00e9lectronique": { + "551-Monnaie \u00e9lectronique carte carburant": {}, + "552-Monnaie \u00e9lectronique t\u00e9l\u00e9phone portable": {}, + "553-Monnaie \u00e9lectronique carte p\u00e9age": {}, + "554-Porte-monnaie \u00e9lectronique": {}, + "558-Autres instruments de monnaies \u00e9lectroniques": {} + }, + "56-Banques, cr\u00e9dits de tr\u00e9sorerie et d\u2019escompte": { + "561-Cr\u00e9dits de tr\u00e9sorerie": {}, + "564-Escompte de cr\u00e9dits de campagne": {}, + "565-Escompte de cr\u00e9dits ordinaires": {}, + "566-Banques, cr\u00e9dits de tr\u00e9sorerie, int\u00e9r\u00eats courus": {} + }, + "57-Caisse": { + "571-Caisse si\u00e8ge social": { + "5711-Caisse en monnaie nationale": {}, + "5712-Caisse en devises": {} + }, + "572-Caisse succursale A": { + "5721-En monnaie nationale": {}, + "5722-En devises": {} + }, + "573-Caisse succursale B": { + "5731-En monnaie nationale": {}, + "5732-En devises": {} + } + }, + "58-R\u00e9gies d\u2019avances, accr\u00e9ditifs et virements internes": { + "581-R\u00e9gies d\u2019avance": {}, + "582-Accr\u00e9ditifs": {}, + "585-Virements de fonds": {}, + "588-Autres virements internes": {} + }, + "59-D\u00e9pr\u00e9ciations et provisions pour risque \u00e0 court terme": { + "590-D\u00e9pr\u00e9ciations des titres de placement": {}, + "591-D\u00e9pr\u00e9ciations des titres et valeurs \u00e0 encaisser": {}, + "592-D\u00e9pr\u00e9ciations des comptes banques": {}, + "593-D\u00e9pr\u00e9ciations des comptes \u00e9tablissements financiers et assimil\u00e9s": {}, + "594-D\u00e9pr\u00e9ciations des comptes d\u2019instruments de tr\u00e9sorerie": {}, + "599-Provisions pour risque \u00e0 court terme \u00e0 caract\u00e8re financier": {} + }, + "root_type": "Asset" + }, + "6-Comptes de charges des activit\u00e9s ordinaires": { + "60-Achats et variations de stocks": { + "601-Achats de marchandises": { + "6011-Dans la R\u00e9gion": {}, + "6012-Hors R\u00e9gion": {}, + "6013-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "6014-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "6015-Frais sur achats": {}, + "6019-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "602-Achats de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "6021-Dans la R\u00e9gion": {}, + "6022-Hors R\u00e9gion": {}, + "6023-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "6024-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "6025-Frais sur achats": {}, + "6029-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "603-Variations des stocks de biens achet\u00e9s": { + "6031-Variations des stocks de marchandises": {}, + "6032-Variations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": {}, + "6033-Variations des stocks d\u2019autres approvisionnements": {} + }, + "604-Achats stock\u00e9s de mati\u00e8res et fournitures consommables": { + "6041-Mati\u00e8res consommables": {}, + "6042-Mati\u00e8res combustibles": {}, + "6043-Produits d\u2019entretien": {}, + "6044-Fournitures d\u2019atelier et d\u2019usine": {}, + "6045-Frais sur achat": {}, + "6046-Fournitures de magasin": {}, + "6047-Fournitures de bureau": {}, + "6049-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "605-Autres achats": { + "6051-Fournitures non stockables Eau": {}, + "6052-Fournitures non stockables \u00c9lectricit\u00e9": {}, + "6053-Fournitures non stockables Autres \u00e9nergies": {}, + "6054-Fournitures d\u2019entretien non stockables": {}, + "6055-Fournitures de bureau non stockables": {}, + "6056-Achats de petit mat\u00e9riel et outillage": {}, + "6057-Achats d\u2019\u00e9tudes et prestations de services": {}, + "6058-Achats de travaux, mat\u00e9riels et \u00e9quipements": {}, + "6059-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "608-Achats d\u2019emballages": { + "6081-Emballages perdus": {}, + "6082-Emballages r\u00e9cup\u00e9rables non identifiables": {}, + "6083-Emballages \u00e0 usage mixte": {}, + "6085-Frais sur achats": {}, + "6089-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + } + }, + "61-Transports": { + "612-Transports sur ventes": {}, + "613-Transports pour le compte de tiers": {}, + "614-Transports du personnel": {}, + "616-Transports de plis": {}, + "618-Autres frais de transport": { + "6181-Voyages et d\u00e9placements": {}, + "6182-Transports entre \u00e9tablissements ou chantiers": {}, + "6183-Transports administratifs": {} + } + }, + "62-Services ext\u00e9rieurs": { + "621-Sous-traitance g\u00e9n\u00e9rale": {}, + "622-Locations, charges locatives": { + "6221-Locations de terrains": {}, + "6222-Locations de b\u00e2timents": {}, + "6223-Locations de mat\u00e9riels et outillages": {}, + "6224-Malis sur emballages": {}, + "6225-Locations d\u2019emballages": {}, + "6226-Fermages et loyers du foncier": {}, + "6228-Locations et charges locatives diverses": {} + }, + "623-Redevances de location acquisition": { + "6232-Cr\u00e9dit-bail immobilier": {}, + "6233-Cr\u00e9dit-bail mobilier": {}, + "6234-Location-vente": {}, + "6238-Autres contrats de location acquisition": {} + }, + "624-Entretien, r\u00e9parations, remise en \u00e9tat et maintenance": { + "6241-Entretien et r\u00e9parations des biens immobiliers": {}, + "6242-Entretien et r\u00e9parations des biens mobiliers": {}, + "6243-Maintenance": {}, + "6244-Charges de d\u00e9mant\u00e8lement et remise en \u00e9tat": {}, + "6248-Autres entretiens et r\u00e9parations": {} + }, + "625-Primes d\u2019assurance": { + "6251-Assurances multirisques": {}, + "6252-Assurances mat\u00e9riel de transport": {}, + "6253-Assurances risques d\u2019exploitation": {}, + "6254-Assurances responsabilit\u00e9 du producteur": {}, + "6255-Assurances insolvabilit\u00e9 clients": {}, + "6257-Assurances transport sur ventes": {}, + "6258-Autres primes d\u2019assurances": {} + }, + "626-\u00c9tudes, recherches et documentation": { + "6261-\u00c9tudes et recherches": {}, + "6265-Documentation g\u00e9n\u00e9rale": {}, + "6266-Documentation technique": {} + }, + "627-Publicit\u00e9, publications, relations publiques": { + "6271-Annonces, insertions": {}, + "6272-Catalogues, imprim\u00e9s publicitaires": {}, + "6273-\u00c9chantillons": {}, + "6274-Foires et expositions": {}, + "6275-Publications": {}, + "6276-Cadeaux \u00e0 la client\u00e8le": {}, + "6277-Frais de colloques, s\u00e9minaires, conf\u00e9rences": {}, + "6278-Autres charges de publicit\u00e9 et relations publiques": {} + }, + "628-Frais de t\u00e9l\u00e9communications": { + "6281-Frais de t\u00e9l\u00e9phone": {}, + "6282-Frais de t\u00e9lex": {}, + "6283-Frais de t\u00e9l\u00e9copie": {}, + "6288-Autres frais de t\u00e9l\u00e9communications": {} + } + }, + "63-Autres services ext\u00e9rieurs": { + "631-Frais bancaires": { + "6311-Frais sur titres (vente, garde)": {}, + "6312-Frais sur effets": {}, + "6313-Location de coffres": {}, + "6314-Commissions d\u2019affacturage": {}, + "6315-Commissions sur cartes de cr\u00e9dit": {}, + "6316-Frais d\u2019\u00e9mission d\u2019emprunts": {}, + "6317-Frais sur instruments monnaie \u00e9lectronique": {}, + "6318-Autres frais bancaires": {} + }, + "632-R\u00e9mun\u00e9rations d\u2019interm\u00e9diaires et de conseils": { + "6322-Commissions et courtages sur ventes": {}, + "6324-Honoraires des professions r\u00e9glement\u00e9es": {}, + "6325-Frais d\u2019actes et de contentieux": {}, + "6326-R\u00e9mun\u00e9rations d\u2019affacturage": {}, + "6327-R\u00e9mun\u00e9rations des autres prestataires de services": {}, + "6328-Divers frais": {} + }, + "633-Frais de formation du personnel": {}, + "634-Redevances pour brevets, licences, logiciels, concessions et droits et valeurs similaires": { + "6342-Redevances pour brevets, licences": {}, + "6343-Redevances pour logiciels": {}, + "6344-Redevances pour marques": {}, + "6345-Redevances pour sites internet": {}, + "6346-Redevances pour concessions, droits et valeurs similaires": {} + }, + "635-Cotisations": { + "6351-Cotisations": {}, + "6358-Concours divers": {} + }, + "637-R\u00e9mun\u00e9rations de personnel ext\u00e9rieur \u00e0 l\u2019entit\u00e9": { + "6371-Personnel int\u00e9rimaire": {}, + "6372-Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": {} + }, + "638-Autres charges externes": { + "6381-Frais de recrutement du personnel": {}, + "6382-Frais de d\u00e9m\u00e9nagement": {}, + "6383-R\u00e9ceptions": {}, + "6384-Missions": {}, + "6385-Charges de copropri\u00e9t\u00e9": {} + } + }, + "64-Imp\u00f4ts et taxes": { + "641-Imp\u00f4ts et taxes directs": { + "6411-Imp\u00f4ts fonciers et taxes annexes": {}, + "6412-Patentes, licences et taxes annexes": {}, + "6413-Taxes sur appointements et salaires": {}, + "6414-Taxes d\u2019apprentissage": {}, + "6415-Formation professionnelle continue": {}, + "6418-Autres imp\u00f4ts et taxes directs": {} + }, + "645-Imp\u00f4ts et taxes indirects": {}, + "646-Droits d\u2019enregistrement": { + "6461-Droits de mutation": {}, + "6462-Droits de timbre": {}, + "6463-Taxes sur les v\u00e9hicules de soci\u00e9t\u00e9": {}, + "6464-Vignettes": {}, + "6468-Autres droits": {} + }, + "647-P\u00e9nalit\u00e9s, amendes fiscales": { + "6471-P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts directs": {}, + "6472-P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts indirects": {}, + "6473-P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts directs": {}, + "6474-P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts indirects": {}, + "6478-Autres p\u00e9nalit\u00e9s et amendes fiscales": {} + }, + "648-Autres imp\u00f4ts et taxes": {} + }, + "65-Autres charges": { + "651-Pertes sur cr\u00e9ances clients et autres d\u00e9biteurs": { + "6511-Clients": {}, + "6515-Autres d\u00e9biteurs": {} + }, + "652-Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "6521-Quote-part transf\u00e9r\u00e9e de b\u00e9n\u00e9fices (comptabilit\u00e9 du g\u00e9rant)": {}, + "6525-Pertes imput\u00e9es par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": {} + }, + "654-Valeurs comptables des cessions courantes d\u2019immobilisations": { + "6541-Immobilisations incorporelles": {}, + "6542-Immobilisations corporelles": {} + }, + "656-Perte de change sur cr\u00e9ances et dettes commerciale": {}, + "657-P\u00e9nalit\u00e9s et amendes p\u00e9nales": {}, + "658-Charges diverses": { + "6581-Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": {}, + "6582-Dons": {}, + "6583-M\u00e9c\u00e9nat": {}, + "6588-Autres charges diverses": {} + }, + "659-Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "6591-Sur risques \u00e0 court terme": {}, + "6593-Sur stocks": {}, + "6594-Sur cr\u00e9ances": {}, + "6598-Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme": {} + } + }, + "66-Charges de personnel": { + "661-R\u00e9mun\u00e9rations directes vers\u00e9es au personnel national": { + "6611-Appointements salaires et commissions": {}, + "6612-Primes et gratifications": {}, + "6613-Cong\u00e9s pay\u00e9s": {}, + "6614-Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": {}, + "6615-Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": {}, + "6616-Suppl\u00e9ment familial": {}, + "6617-Avantages en nature": {}, + "6618-Autres r\u00e9mun\u00e9rations directes": {} + }, + "662-R\u00e9mun\u00e9rations directes vers\u00e9es au personnel non national": { + "6621-Appointements salaires et commissions": {}, + "6622-Primes et gratifications": {}, + "6623-Cong\u00e9s pay\u00e9s": {}, + "6624-Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": {}, + "6625-Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": {}, + "6626-Suppl\u00e9ment familial": {}, + "6627-Avantages en nature": {}, + "6628-Autres r\u00e9mun\u00e9rations directes": {} + }, + "663-Indemnit\u00e9s forfaitaires vers\u00e9es au personnel": { + "6631-Indemnit\u00e9s de logement": {}, + "6632-Indemnit\u00e9s de repr\u00e9sentation": {}, + "6633-Indemnit\u00e9s d\u2019expatriation": {}, + "6634-Indemnit\u00e9s de transport": {}, + "6638-Autres indemnit\u00e9s et avantages divers": {} + }, + "664-Charges sociales": { + "6641-Charges sociales sur r\u00e9mun\u00e9ration du personnel national": {}, + "6642-Charges sociales sur r\u00e9mun\u00e9ration du personnel non national": {} + }, + "666-R\u00e9mun\u00e9rations et charges sociales de l\u2019exploitant individuel": { + "6661-R\u00e9mun\u00e9ration du travail de l\u2019exploitant": {}, + "6662-Charges sociales": {} + }, + "667-R\u00e9mun\u00e9ration transf\u00e9r\u00e9e de personnel ext\u00e9rieur": { + "6671-Personnel int\u00e9rimaire": {}, + "6672-Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": {} + }, + "668-Autres charges sociales": { + "6681-Versements aux syndicats et comit\u00e9s d\u2019entreprise, d\u2019\u00e9tablissement": {}, + "6682-Versements aux comit\u00e9s d\u2019hygi\u00e8ne et de s\u00e9curit\u00e9": {}, + "6683-Versements et contributions aux autres \u0153uvres sociales": {}, + "6684-M\u00e9decine du travail et pharmacie": {}, + "6685-Assurances et organismes de sant\u00e9": {}, + "6686-Assurances retraite et fonds de pension": {}, + "6687-Majorations et p\u00e9nalit\u00e9s sociales": {}, + "6688-Charges sociales diverses": {} + } + }, + "67-Frais financiers et charges assimil\u00e9es": { + "671-Int\u00e9r\u00eats des emprunts": { + "6711-Emprunts obligataires": {}, + "6712-Emprunts aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": {}, + "6713-Dettes li\u00e9es \u00e0 des participations": {}, + "6714-Primes de remboursement des obligations": {} + }, + "672-Int\u00e9r\u00eats dans loyers de location acquisition": { + "6722-Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail immobilier": {}, + "6723-Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail mobilier": {}, + "6724-Int\u00e9r\u00eats dans loyers de location acquisition / location-vente": {}, + "6728-Int\u00e9r\u00eats dans loyers des autres locations acquisition": {} + }, + "673-Escomptes accord\u00e9s": {}, + "674-Autres int\u00e9r\u00eats": { + "6741-Avances re\u00e7ues et d\u00e9p\u00f4ts cr\u00e9diteurs": {}, + "6742-Comptes courants bloqu\u00e9s": {}, + "6743-Int\u00e9r\u00eats sur obligations cautionn\u00e9es": {}, + "6744-Int\u00e9r\u00eats sur dettes commerciales": {}, + "6745-Int\u00e9r\u00eats bancaires et sur op\u00e9rations de financement (escompte...)": {}, + "6748-Int\u00e9r\u00eats sur dettes diverses": {} + }, + "675-Escomptes des effets de commerce": {}, + "676-Pertes de change financi\u00e8res": {}, + "677-Pertes sur titres de placement": { + "6771-Pertes sur cessions de titres de placement": {}, + "6772-Mali provenant d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": {} + }, + "678-Pertes et charges sur risques financiers": { + "6781-Sur rentes viag\u00e8res": {}, + "6782-Sur op\u00e9rations financi\u00e8res": {}, + "6784-Sur instruments de tr\u00e9sorerie": {} + }, + "679-Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "6791-Sur risques financiers": {}, + "6795-Sur titres de placement": {}, + "6798-Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": {} + } + }, + "68-Dotations aux amortissements": { + "681-Dotations aux amortissements d\u2019exploitation": { + "6812-Dotations aux amortissements des immobilisations incorporelles": {}, + "6813-Dotations aux amortissements des immobilisations corporelles": {} + } + }, + "69-Dotations aux provisions et aux d\u00e9pr\u00e9ciations": { + "691-Dotations aux provisions et aux d\u00e9pr\u00e9ciations d\u2019exploitation": { + "6911-Dotations aux provisions pour risques et charges": {}, + "6913-Dotations aux d\u00e9pr\u00e9ciations des immobilisations incorporelles": {}, + "6914-Dotations aux d\u00e9pr\u00e9ciations des immobilisations corporelles": {} + }, + "697-Dotations aux provisions et aux d\u00e9pr\u00e9ciations financi\u00e8res": { + "6971-Dotations aux provisions pour risques et charges": {}, + "6972-Dotations aux d\u00e9pr\u00e9ciations des immobilisations financi\u00e8res": {} + } + }, + "root_type": "Expense" + }, + "7-Comptes de produits des activit\u00e9s ordinaires": { + "70-Ventes": { + "701-Ventes de marchandises": { + "7011-Dans la R\u00e9gion": {}, + "7012-Hors R\u00e9gion": {}, + "7013-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7014-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7015-Sur internet": {}, + "7019-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "702-Ventes de produits finis": { + "7021-Dans la R\u00e9gion": {}, + "7022-Hors R\u00e9gion": {}, + "7023-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7024-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7025-Sur internet": {}, + "7029-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "703-Ventes de produits interm\u00e9diaires": { + "7031-Dans la R\u00e9gion": {}, + "7032-Hors R\u00e9gion": {}, + "7033-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7034-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7035-Sur internet": {}, + "7039-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "704-Ventes de produits r\u00e9siduels": { + "7041-Dans la R\u00e9gion": {}, + "7042-Hors R\u00e9gion": {}, + "7043-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7044-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7045-Sur internet": {}, + "7049-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "705-Travaux factur\u00e9s": { + "7051-Dans la R\u00e9gion": {}, + "7052-Hors R\u00e9gion": {}, + "7053-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7054-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7055-Sur internet": {}, + "7059-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "706-Services vendus": { + "7061-Dans la R\u00e9gion": {}, + "7062-Hors R\u00e9gion": {}, + "7063-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7064-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7065-Sur internet": {}, + "7069-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "707-Produits accessoires": { + "7071-Ports, emballages perdus et autres frais factur\u00e9s": {}, + "7072-Commissions et courtages": {}, + "7073-Locations": {}, + "7074-Bonis sur reprises et cessions d\u2019emballages": {}, + "7075-Mise \u00e0 disposition de personnel": {}, + "7076-Redevances pour brevets, logiciels, marques et droits similaires": {}, + "7077-Services exploit\u00e9s dans l\u2019int\u00e9r\u00eat du personnel": {}, + "7078-Autres produits accessoires": {} + } + }, + "71-Subventions d\u2019exploitation": { + "711-Sur produits \u00e0 l\u2019exportation": {}, + "712-Sur produits \u00e0 l\u2019importation": {}, + "713-Sur produits de p\u00e9r\u00e9quation": {}, + "714-Indemnit\u00e9s et subventions d\u2019exploitation (entit\u00e9 agricole)": {}, + "718-Autres subventions d\u2019exploitation": { + "7181-Vers\u00e9es par l\u2019\u00c9tat et les collectivit\u00e9s publiques": {}, + "7182-Vers\u00e9es par les organismes internationaux": {}, + "7183-Vers\u00e9es par des tiers": {} + } + }, + "72-Production immobilis\u00e9e": { + "721-Immobilisations incorporelles": {}, + "722-Immobilisations corporelles": { + "7221-Immobilisations corporelles (hors actifs biologiques)": {}, + "7222-Immobilisations corporelles (actifs biologiques)": {} + }, + "724-Production auto-consomm\u00e9e": {}, + "726-Immobilisations financi\u00e8res": {} + }, + "73-Variations des stocks de biens et de services produits": { + "734-Variations des stocks de produits en cours": { + "7341-Produits en cours": {}, + "7342-Travaux en cours": {} + }, + "735-Variations des en-cours de services": { + "7351-\u00c9tudes en cours": {}, + "7352-Prestations de services en cours": {} + }, + "736-Variations des stocks de produits finis": {}, + "737-Variations des stocks de produits interm\u00e9diaires et r\u00e9siduels": { + "7371-Produits interm\u00e9diaires": {}, + "7372-Produits r\u00e9siduels": {} + } + }, + "75-Autres produits": { + "751-Profits sur cr\u00e9ances clients et autres d\u00e9biteurs": {}, + "752-Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "7521-Quote-part transf\u00e9r\u00e9e de pertes (comptabilit\u00e9 du g\u00e9rant)": {}, + "7525-B\u00e9n\u00e9fices attribu\u00e9s par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": {} + }, + "754-Produits des cessions courantes d\u2019immobilisations": { + "7541-Immobilisations incorporelles": {}, + "7542-Immobilisations corporelles": {} + }, + "756-Gains de change sur cr\u00e9ances et dettes commerciales": {}, + "758-Produits divers": { + "7581-Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": {}, + "7582-Indemnit\u00e9s d\u2019assurances re\u00e7ues": {}, + "7588-Autres produits divers": {} + }, + "759-Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "7591-Sur risques \u00e0 court terme": {}, + "7593-Sur stocks": {}, + "7594-Sur cr\u00e9ances": {}, + "7598-Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": {} + } + }, + "77-Revenus financiers et produits assimil\u00e9s": { + "771-Int\u00e9r\u00eats de pr\u00eats et cr\u00e9ances diverses": { + "7712-Int\u00e9r\u00eats de pr\u00eats": {}, + "7713-Int\u00e9r\u00eats sur cr\u00e9ances diverses": {} + }, + "772-Revenus de participations et autres titres immobilis\u00e9s": { + "7721-Revenus des titres de participation": {}, + "7722-Revenus autres titres immobilis\u00e9s": {} + }, + "773-Escomptes obtenus": {}, + "774-Revenus de placement": { + "7745-Revenus des obligations": {}, + "7746-Revenus des titres de placement": {} + }, + "775-Int\u00e9r\u00eats dans loyers de location acquisition": {}, + "776-Gains de change financiers": {}, + "777-Gains sur cessions de titres de placement": {}, + "778-Gains sur risques financiers": { + "7781-Sur rentes viag\u00e8res": {}, + "7782-Sur op\u00e9rations financi\u00e8res": {}, + "7784-Sur instruments de tr\u00e9sorerie": {} + }, + "779-Reprises de charges pour d\u00e9pr\u00e9ciations et provisions \u00e0 court terme financi\u00e8res": { + "7791-Sur risques financiers": {}, + "7795-Sur titres de placement": {}, + "7798-Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": {} + } + }, + "78-Transferts de charges": { + "781-Transferts de charges d\u2019exploitation": {}, + "787-Transferts de charges financi\u00e8res": {} + }, + "79-Reprises de provisions, de d\u00e9pr\u00e9ciations et autres": { + "791-Reprises de provisions et d\u00e9pr\u00e9ciations d\u2019exploitation": { + "7911-Pour risques et charges": {}, + "7913-Des immobilisations incorporelles": {}, + "7914-Des immobilisations corporelles": {} + }, + "797-Reprises de provisions et d\u00e9pr\u00e9ciations financi\u00e8res": { + "7971-Pour risques et charges": {}, + "7972-Des immobilisations financi\u00e8res": {} + }, + "798-Reprises d\u2019amortissements": {}, + "799-Reprises de subventions d\u2019investissement": {} + }, + "root_type": "Income" + }, + "8-Comptes des autres charges et des autres produits (CHARGES)": { + "81-Valeurs comptables des cessions d\u2019immobilisations": { + "811-Immobilisations incorporelles": {}, + "812-Immobilisations corporelles": {}, + "816-Immobilisations financi\u00e8res": {} + }, + "83-Charges hors activit\u00e9s ordinaires": { + "831-Charges HAO constat\u00e9es": {}, + "833-Charges li\u00e9es aux op\u00e9rations de restructuration": {}, + "834-Pertes sur cr\u00e9ances HAO": {}, + "835-Dons et lib\u00e9ralit\u00e9s accord\u00e9s": {}, + "836-Abandons de cr\u00e9ances consentis": {}, + "837-Charges li\u00e9es aux op\u00e9rations de liquidation": {}, + "839-Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": {} + }, + "85-Dotations hors activit\u00e9s ordinaires": { + "851-Dotations aux provisions r\u00e9glement\u00e9es": {}, + "852-Dotations aux amortissements HAO": {}, + "853-Dotations aux d\u00e9pr\u00e9ciations HAO": {}, + "854-Dotations aux provisions pour risques et charges HAO": {}, + "858-Autres dotations HAO": {} + }, + "87-Participation des travailleurs": { + "871-Participation l\u00e9gale aux b\u00e9n\u00e9fices": {}, + "874-Participation contractuelle aux b\u00e9n\u00e9fices": {}, + "878-Autres participations": {} + }, + "89-Imp\u00f4ts sur le r\u00e9sultat": { + "891-Imp\u00f4ts sur les b\u00e9n\u00e9fices de l\u2019exercice": { + "8911-Activit\u00e9s exerc\u00e9es dans l\u2019\u00c9tat": {}, + "8912-Activit\u00e9s exerc\u00e9es dans les autres \u00c9tats de la R\u00e9gion": {}, + "8913-Activit\u00e9s exerc\u00e9es hors R\u00e9gion": {} + }, + "892-Rappel d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": {}, + "895-Imp\u00f4t minimum forfaitaire IMF": {}, + "899-D\u00e9gr\u00e8vements et annulations d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": { + "8991-D\u00e9gr\u00e8vements": {}, + "8994-Annulations pour pertes r\u00e9troactives": {} + } + }, + "root_type": "Expense" + }, + "8-Comptes des autres charges et des autres produits (PRODUITS)": { + "82-Produits des cessions d\u2019immobilisations": { + "821-Immobilisations incorporelles": {}, + "822-Immobilisations corporelles": {}, + "826-Immobilisations financi\u00e8res": {} + }, + "84-Produits hors activit\u00e9s ordinaires": { + "841-Produits HAO constat\u00e9s": {}, + "843-Produits li\u00e9s aux op\u00e9rations de restructuration": {}, + "844-Indemnit\u00e9s et subventions HAO (entit\u00e9 agricole)": {}, + "845-Dons et lib\u00e9ralit\u00e9s obtenus": {}, + "846-Abandons de cr\u00e9ances obtenus": {}, + "847-Produits li\u00e9s aux op\u00e9rations de liquidation": {}, + "848-Transferts de charges HAO": {}, + "849-Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": {} + }, + "86-Reprises de charges, provisions et d\u00e9pr\u00e9ciations HAO": { + "861-Reprises de provisions r\u00e9glement\u00e9es": {}, + "862-Reprises d\u2019amortissements HAO": {}, + "863-Reprises de d\u00e9pr\u00e9ciations HAO": {}, + "864-Reprises de provisions pour risques et charges HAO": {}, + "868-Autres reprises HAO": {} + }, + "88-Subventions d\u2019\u00e9quilibre": { + "881-\u00c9tat": {}, + "884-Collectivit\u00e9s publiques": {}, + "886-Groupe": {}, + "888-Autres": {} + }, + "root_type": "Income" + } + } +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/ga_plan_comptable_avec_code.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/ga_plan_comptable_avec_code.json new file mode 100644 index 00000000000..ddee95dad46 --- /dev/null +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/ga_plan_comptable_avec_code.json @@ -0,0 +1,4208 @@ +{ + "country_code": "ga", + "name": "Syscohada - Plan Comptable avec code", + "tree": { + "Comptes de ressources durables": { + "Capital": { + "Capital social": { + "Capital souscrit, non appel\u00e9": { + "account_number": "1011" + }, + "Capital souscrit, appel\u00e9, non vers\u00e9": { + "account_number": "1012" + }, + "Capital souscrit, appel\u00e9, vers\u00e9, non amorti": { + "account_number": "1013" + }, + "Capital souscrit, appel\u00e9, vers\u00e9, amorti": { + "account_number": "1014" + }, + "Capital souscrit soumis \u00e0 des conditions particuli\u00e8res": { + "account_number": "1018" + }, + "account_number": "101" + }, + "Capital par dotation": { + "Dotation initiale": { + "account_number": "1021" + }, + "Dotations compl\u00e9mentaires": { + "account_number": "1022" + }, + "Autres dotations": { + "account_number": "1028" + }, + "account_number": "102" + }, + "Capital personnel": { + "account_number": "103" + }, + "Compte de l\u2019exploitant": { + "Apports temporaires": { + "account_number": "1041" + }, + "Op\u00e9rations courantes": { + "account_number": "1042" + }, + "R\u00e9mun\u00e9rations, imp\u00f4ts et autres charges personnelles": { + "account_number": "1043" + }, + "Pr\u00e9l\u00e8vements d\u2019autoconsommation": { + "account_number": "1047" + }, + "Autres pr\u00e9l\u00e8vements": { + "account_number": "1048" + }, + "account_number": "104" + }, + "Primes li\u00e9es au capital social": { + "Primes d\u2019\u00e9mission": { + "account_number": "1051" + }, + "Primes d\u2019apport": { + "account_number": "1052" + }, + "Primes de fusion": { + "account_number": "1053" + }, + "Primes de conversion": { + "account_number": "1054" + }, + "Autres primes": { + "account_number": "1058" + }, + "account_number": "105" + }, + "\u00c9carts de r\u00e9\u00e9valuation": { + "\u00c9carts de r\u00e9\u00e9valuation l\u00e9gale": { + "account_number": "1061" + }, + "\u00c9carts de r\u00e9\u00e9valuation libre": { + "account_number": "1062" + }, + "account_number": "106" + }, + "Apporteurs, capital souscrit, non appel\u00e9": { + "account_number": "109" + }, + "account_number": "10" + }, + "R\u00e9serves": { + "R\u00e9serve l\u00e9gale": { + "account_number": "111" + }, + "R\u00e9serves statutaires ou contractuelles": { + "account_number": "112" + }, + "R\u00e9serves r\u00e9glement\u00e9es": { + "R\u00e9serves de plus-values nettes \u00e0 long terme": { + "account_number": "1131" + }, + "R\u00e9serves d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": { + "account_number": "1132" + }, + "R\u00e9serves cons\u00e9cutives \u00e0 l\u2019octroi de subventions d\u2019investissement": { + "account_number": "1133" + }, + "R\u00e9serves des valeurs mobili\u00e8res donnant acc\u00e8s au capital": { + "account_number": "1134" + }, + "Autres r\u00e9serves r\u00e9glement\u00e9es": { + "account_number": "1135" + }, + "account_number": "113" + }, + "Autres r\u00e9serves": { + "R\u00e9serves facultatives": { + "account_number": "1181" + }, + "R\u00e9serves diverses": { + "account_number": "1188" + }, + "account_number": "118" + }, + "account_number": "11" + }, + "Report \u00e0 nouveau": { + "Report \u00e0 nouveau cr\u00e9diteur": { + "account_number": "121" + }, + "Report \u00e0 nouveau d\u00e9biteur": { + "Perte nette \u00e0 reporter": { + "account_number": "1291" + }, + "Perte Amortissements r\u00e9put\u00e9s diff\u00e9r\u00e9s": { + "account_number": "1292" + }, + "account_number": "129" + }, + "account_number": "12" + }, + "R\u00e9sultat net de l\u2019exercice": { + "R\u00e9sultat en instance d\u2019affectation": { + "R\u00e9sultat en instance d\u2019affectation : b\u00e9n\u00e9fice": { + "account_number": "1301" + }, + "R\u00e9sultat en instance d\u2019affectation : perte": { + "account_number": "1309" + }, + "account_number": "130" + }, + "R\u00e9sultat net : b\u00e9n\u00e9fice": { + "account_number": "131" + }, + "Marge commerciale (MC)": { + "account_number": "132" + }, + "Valeur ajout\u00e9e (VA)": { + "account_number": "133" + }, + "Exc\u00e9dent brut d\u2019exploitation (EBE)": { + "account_number": "134" + }, + "R\u00e9sultat d\u2019exploitation (RE)": { + "account_number": "135" + }, + "R\u00e9sultat financier (RF)": { + "account_number": "136" + }, + "R\u00e9sultat des activit\u00e9s ordinaires (RAO)": { + "account_number": "137" + }, + "R\u00e9sultat hors activit\u00e9s ordinaires (RHAO)": { + "R\u00e9sultat de fusion": { + "account_number": "1381" + }, + "R\u00e9sultat d\u2019apport partiel d\u2019actif": { + "account_number": "1382" + }, + "R\u00e9sultat de scission": { + "account_number": "1383" + }, + "R\u00e9sultat de liquidation": { + "account_number": "1384" + }, + "account_number": "138" + }, + "R\u00e9sultat net : perte": { + "account_number": "139" + }, + "account_number": "13" + }, + "Subventions d\u2019investissement": { + "Subventions d\u2019\u00e9quipement": { + "\u00c9tat": { + "account_number": "1411" + }, + "R\u00e9gions": { + "account_number": "1412" + }, + "D\u00e9partements": { + "account_number": "1413" + }, + "Communes et collectivit\u00e9s publiques d\u00e9centralis\u00e9es": { + "account_number": "1414" + }, + "Entit\u00e9s publiques ou mixtes": { + "account_number": "1415" + }, + "Entit\u00e9s et organismes priv\u00e9s": { + "account_number": "1416" + }, + "Organismes internationaux": { + "account_number": "1417" + }, + "Autres": { + "account_number": "1418" + }, + "account_number": "141" + }, + "Autres subventions d\u2019investissement": { + "account_number": "148" + }, + "account_number": "14" + }, + "Provisions r\u00e9glement\u00e9es et fonds assimil\u00e9s": { + "Amortissements d\u00e9rogatoires": { + "account_number": "151" + }, + "Plus-values de cession \u00e0 r\u00e9investir": { + "account_number": "152" + }, + "Fonds r\u00e9glement\u00e9s": { + "Fonds National": { + "account_number": "1531" + }, + "Pr\u00e9l\u00e8vement pour le Budget": { + "account_number": "1532" + }, + "account_number": "153" + }, + "Provisions sp\u00e9ciales de r\u00e9\u00e9valuation": { + "account_number": "154" + }, + "Provisions r\u00e9glement\u00e9es relatives aux immobilisations": { + "Reconstitution des gisements miniers et p\u00e9troliers": { + "account_number": "1551" + }, + "account_number": "155" + }, + "Provisions r\u00e9glement\u00e9es relatives aux stocks": { + "Hausse de prix": { + "account_number": "1561" + }, + "Fluctuation des cours": { + "account_number": "1562" + }, + "account_number": "156" + }, + "Provisions pour investissement": { + "account_number": "157" + }, + "Autres provisions et fonds r\u00e9glement\u00e9s": { + "account_number": "158" + }, + "account_number": "15" + }, + "Emprunts et dettes assimil\u00e9es": { + "Emprunts obligataires": { + "Emprunts obligataires ordinaires": { + "account_number": "1611" + }, + "Emprunts obligataires convertibles en actions": { + "account_number": "1612" + }, + "Emprunts obligataires remboursables en actions": { + "account_number": "1613" + }, + "Autres emprunts obligataires": { + "account_number": "1618" + }, + "account_number": "161" + }, + "Emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": { + "account_number": "162" + }, + "Avances re\u00e7ues de l\u2019\u00c9tat": { + "account_number": "163" + }, + "Avances re\u00e7ues et comptes courants bloqu\u00e9s": { + "account_number": "164" + }, + "D\u00e9p\u00f4ts et cautionnements re\u00e7us": { + "D\u00e9p\u00f4ts": { + "account_number": "1651" + }, + "Cautionnements": { + "account_number": "1652" + }, + "account_number": "165" + }, + "Int\u00e9r\u00eats courus": { + "Sur emprunts obligataires": { + "account_number": "1661" + }, + "Sur emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": { + "account_number": "1662" + }, + "Sur avances re\u00e7ues de l\u2019\u00c9tat": { + "account_number": "1663" + }, + "Sur avances re\u00e7ues et comptes courants bloqu\u00e9s": { + "account_number": "1664" + }, + "Sur d\u00e9p\u00f4ts et cautionnements re\u00e7us": { + "account_number": "1665" + }, + "Sur avances assorties de conditions particuli\u00e8res": { + "account_number": "1667" + }, + "Sur autres emprunts et dettes": { + "account_number": "1668" + }, + "account_number": "166" + }, + "Avances assorties de conditions particuli\u00e8res": { + "Avances bloqu\u00e9es pour augmentation du capital": { + "account_number": "1671" + }, + "Avances conditionn\u00e9es par l\u2019\u00c9tat": { + "account_number": "1672" + }, + "Avances conditionn\u00e9es par les autres organismes africains": { + "account_number": "1673" + }, + "Avances conditionn\u00e9es par les organismes internationaux": { + "account_number": "1674" + }, + "account_number": "167" + }, + "Autres emprunts et dettes": { + "Rentes viag\u00e8res capitalis\u00e9es": { + "account_number": "1681" + }, + "Billets de fonds": { + "account_number": "1682" + }, + "Dettes cons\u00e9cutives \u00e0 des titres emprunt\u00e9s": { + "account_number": "1683" + }, + "Emprunts participatifs": { + "account_number": "1684" + }, + "Participation des travailleurs aux b\u00e9n\u00e9fices": { + "account_number": "1685" + }, + "Emprunts et dettes contract\u00e9s aupr\u00e8s des autres tiers": { + "account_number": "1686" + }, + "account_number": "168" + }, + "account_number": "16" + }, + "Dettes de location acquisition": { + "Dettes de location acquisition / cr\u00e9dit bail immobilier": { + "account_number": "172" + }, + "Dettes de location acquisition / cr\u00e9dit bail mobilier": { + "account_number": "173" + }, + "Dettes de location acquisition / location de vente": { + "account_number": "174" + }, + "Int\u00e9r\u00eats courus": { + "Sur dettes de location acquisition / cr\u00e9dit-bail immobilier": { + "account_number": "1762" + }, + "Sur dettes de location acquisition / cr\u00e9dit-bail mobilier": { + "account_number": "1763" + }, + "Sur dettes de location acquisition / location-vente": { + "account_number": "1764" + }, + "Sur autres dettes de location acquisition": { + "account_number": "1768" + }, + "account_number": "176" + }, + "Autres dettes de location acquisition": { + "account_number": "178" + }, + "account_number": "17" + }, + "Dettes li\u00e9es \u00e0 des participations et comptes de liaison des \u00e9tablissements et soci\u00e9t\u00e9s en participation": { + "Dettes li\u00e9es \u00e0 des participations": { + "Dettes li\u00e9es \u00e0 des participations (groupe)": { + "account_number": "1811" + }, + "Dettes li\u00e9es \u00e0 des participations (hors groupe)": { + "account_number": "1812" + }, + "account_number": "181" + }, + "Dettes li\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": { + "account_number": "182" + }, + "Int\u00e9r\u00eats courus sur dettes li\u00e9es \u00e0 des participations": { + "account_number": "183" + }, + "Comptes permanents bloqu\u00e9s des \u00e9tablissements et succursales": { + "account_number": "184" + }, + "Comptes permanents non bloqu\u00e9s des \u00e9tablissements et succursales": { + "account_number": "185" + }, + "Comptes de liaison charges": { + "account_number": "186" + }, + "Comptes de liaison produits": { + "account_number": "187" + }, + "Comptes de liaison des soci\u00e9t\u00e9s en participation": { + "account_number": "188" + }, + "account_number": "18" + }, + "Provisions pour risques et charges": { + "Provisions pour litiges": { + "account_number": "191" + }, + "Provisions pour garanties donn\u00e9es aux clients": { + "account_number": "192" + }, + "Provisions pour pertes sur march\u00e9s \u00e0 ach\u00e8vement futur": { + "account_number": "193" + }, + "Provisions pour pertes de change": { + "account_number": "194" + }, + "Provisions pour imp\u00f4ts": { + "account_number": "195" + }, + "Provisions pour pensions et obligations similaires": { + "Provisions pour pensions et obligations similaires engagement de retraite": { + "account_number": "1961" + }, + "Actif du r\u00e9gime de retraite": { + "account_number": "1962" + }, + "account_number": "196" + }, + "Provisions pour restructuration": { + "account_number": "197" + }, + "Autres provisions pour risques et charges": { + "Provisions pour amendes et p\u00e9nalit\u00e9s": { + "account_number": "1981" + }, + "Provisions pour propre assureur": { + "account_number": "1983" + }, + "Provisions pour d\u00e9mant\u00e8lement et remise en \u00e9tat": { + "account_number": "1984" + }, + "Provisions pour droits \u00e0 r\u00e9duction ou avantage en nature (ch\u00e8ques cadeau, cartes de fid\u00e9lit\u00e9...)": { + "account_number": "1985" + }, + "Provisions pour divers risques et charges": { + "account_number": "1988" + }, + "account_number": "198" + }, + "account_number": "19" + }, + "root_type": "Equity", + "account_number": "1" + }, + "Comptes d\u2019actif immobilis\u00e9": { + "Immobilisations incorporelles": { + "account_type": "Fixed Asset", + "Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset", + "account_number": "211" + }, + "Brevets, licences, concessions et droits similaires": { + "account_type": "Fixed Asset", + "Brevets": { + "account_type": "Fixed Asset", + "account_number": "2121" + }, + "Licences": { + "account_type": "Fixed Asset", + "account_number": "2122" + }, + "Concessions de service public": { + "account_type": "Fixed Asset", + "account_number": "2123" + }, + "Autres concessions et droits similaires": { + "account_type": "Fixed Asset", + "account_number": "2128" + }, + "account_number": "212" + }, + "Logiciels et sites internet": { + "account_type": "Fixed Asset", + "Logiciels": { + "account_type": "Fixed Asset", + "account_number": "2131" + }, + "Sites internet": { + "account_type": "Fixed Asset", + "account_number": "2132" + }, + "account_number": "213" + }, + "Marques": { + "account_type": "Fixed Asset", + "account_number": "214" + }, + "Fonds commercial": { + "account_type": "Fixed Asset", + "account_number": "215" + }, + "Droit au bail": { + "account_type": "Fixed Asset", + "account_number": "216" + }, + "Investissements de cr\u00e9ation": { + "account_type": "Fixed Asset", + "account_number": "217" + }, + "Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset", + "Frais de prospection et d\u2019\u00e9valuation de ressources min\u00e9rales": { + "account_type": "Fixed Asset", + "account_number": "2181" + }, + "Co\u00fbts d\u2019obtention du contrat": { + "account_type": "Fixed Asset", + "account_number": "2182" + }, + "Fichiers clients, notices, titres de journaux et magazines": { + "account_type": "Fixed Asset", + "account_number": "2183" + }, + "Co\u00fbts des franchises": { + "account_type": "Fixed Asset", + "account_number": "2184" + }, + "Divers droits et valeurs incorporelles": { + "account_type": "Fixed Asset", + "account_number": "2188" + }, + "account_number": "218" + }, + "Immobilisations incorporelles en cours": { + "account_type": "Fixed Asset", + "Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset", + "account_number": "2191" + }, + "Logiciels et internet": { + "account_type": "Fixed Asset", + "account_number": "2193" + }, + "Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset", + "account_number": "2198" + }, + "account_number": "219" + }, + "account_number": "21" + }, + "Terrains": { + "account_type": "Fixed Asset", + "Terrains agricoles et forestiers": { + "account_type": "Fixed Asset", + "Terrains d\u2019exploitation agricole": { + "account_type": "Fixed Asset", + "account_number": "2211" + }, + "Terrains d\u2019exploitation foresti\u00e8re": { + "account_type": "Fixed Asset", + "account_number": "2212" + }, + "Autres terrains": { + "account_type": "Fixed Asset", + "account_number": "2218" + }, + "account_number": "221" + }, + "Terrains nus": { + "account_type": "Fixed Asset", + "Terrains \u00e0 b\u00e2tir": { + "account_type": "Fixed Asset", + "account_number": "2221" + }, + "Autres terrains nus": { + "account_type": "Fixed Asset", + "account_number": "2228" + }, + "account_number": "222" + }, + "Terrains b\u00e2tis": { + "account_type": "Fixed Asset", + "Pour b\u00e2timents industriels et agricoles": { + "account_type": "Fixed Asset", + "account_number": "2231" + }, + "Pour b\u00e2timents administratifs et commerciaux": { + "account_type": "Fixed Asset", + "account_number": "2232" + }, + "Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations professionnelles": { + "account_type": "Fixed Asset", + "account_number": "2234" + }, + "Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations non professionnelles": { + "account_type": "Fixed Asset", + "account_number": "2235" + }, + "Autres terrains b\u00e2tis": { + "account_type": "Fixed Asset", + "account_number": "2238" + }, + "account_number": "223" + }, + "Travaux de mise en valeur des terrains": { + "account_type": "Fixed Asset", + "Plantation d\u2019arbres et d\u2019arbustes": { + "account_type": "Fixed Asset", + "account_number": "2241" + }, + "Am\u00e9liorations du fonds": { + "account_type": "Fixed Asset", + "account_number": "2245" + }, + "Autres travaux": { + "account_type": "Fixed Asset", + "account_number": "2248" + }, + "account_number": "224" + }, + "Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset", + "Carri\u00e8res": { + "account_type": "Fixed Asset", + "account_number": "2251" + }, + "account_number": "225" + }, + "Terrains am\u00e9nag\u00e9s": { + "account_type": "Fixed Asset", + "Parkings": { + "account_type": "Fixed Asset", + "account_number": "2261" + }, + "account_number": "226" + }, + "Terrains mis en concession": { + "account_type": "Fixed Asset", + "account_number": "227" + }, + "Autres terrains": { + "account_type": "Fixed Asset", + "Terrains immeubles de placement": { + "account_type": "Fixed Asset", + "account_number": "2281" + }, + "Terrains des logements affect\u00e9s au personnel": { + "account_type": "Fixed Asset", + "account_number": "2285" + }, + "Terrains de location acquisition": { + "account_type": "Fixed Asset", + "account_number": "2286" + }, + "Divers terrains": { + "account_type": "Fixed Asset", + "account_number": "2288" + }, + "account_number": "228" + }, + "Am\u00e9nagements de terrains en cours": { + "account_type": "Fixed Asset", + "Terrains agricoles et forestiers": { + "account_type": "Fixed Asset", + "account_number": "2291" + }, + "Terrains nus": { + "account_type": "Fixed Asset", + "account_number": "2292" + }, + "Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset", + "account_number": "2295" + }, + "Autres terrains": { + "account_type": "Fixed Asset", + "account_number": "2298" + }, + "account_number": "229" + }, + "account_number": "22" + }, + "B\u00e2timents, installations techniques et agencements": { + "B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "B\u00e2timents industriels": { + "account_number": "2311" + }, + "B\u00e2timents agricoles": { + "account_number": "2312" + }, + "B\u00e2timents administratifs et commerciaux": { + "account_number": "2313" + }, + "B\u00e2timents affect\u00e9s au logement du personnel": { + "account_number": "2314" + }, + "B\u00e2timents immeubles de placement": { + "account_number": "2315" + }, + "B\u00e2timents de location acquisition": { + "account_number": "2316" + }, + "account_number": "231" + }, + "B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "B\u00e2timents industriels": { + "account_number": "2321" + }, + "B\u00e2timents agricoles": { + "account_number": "2322" + }, + "B\u00e2timents administratifs et commerciaux": { + "account_number": "2323" + }, + "B\u00e2timents affect\u00e9s au logement du personnel": { + "account_number": "2324" + }, + "B\u00e2timents immeubles de placement": { + "account_number": "2325" + }, + "B\u00e2timents de location acquisition": { + "account_number": "2326" + }, + "account_number": "232" + }, + "Ouvrages d\u2019infrastructure": { + "Voies de terre": { + "account_number": "2331" + }, + "Voies de fer": { + "account_number": "2332" + }, + "Voies d\u2019eau": { + "account_number": "2333" + }, + "Barrages, Digues": { + "account_number": "2334" + }, + "Pistes d\u2019a\u00e9rodrome": { + "account_number": "2335" + }, + "Autres ouvrages d\u2019infrastructures": { + "account_number": "2338" + }, + "account_number": "233" + }, + "Am\u00e9nagements, agencements et installations techniques": { + "Installations complexes sp\u00e9cialis\u00e9es sur sol propre": { + "account_number": "2341" + }, + "Installations complexes sp\u00e9cialis\u00e9es sur sol d\u2019autrui": { + "account_number": "2342" + }, + "Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol propre": { + "account_number": "2343" + }, + "Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol d\u2019autrui": { + "account_number": "2344" + }, + "Am\u00e9nagements et agencements des b\u00e2timents": { + "account_number": "2345" + }, + "account_number": "234" + }, + "Am\u00e9nagements de bureaux": { + "Installations g\u00e9n\u00e9rales": { + "account_number": "2351" + }, + "Autres am\u00e9nagements de bureaux": { + "account_number": "2358" + }, + "account_number": "235" + }, + "B\u00e2timents industriels, agricoles et commerciaux mis en concession": { + "account_number": "237" + }, + "Autres installations et agencements": { + "account_number": "238" + }, + "B\u00e2timents am\u00e9nagements, agencements et installations en cours": { + "B\u00e2timents en cours": { + "account_number": "2391" + }, + "Installations en cours": { + "account_number": "2392" + }, + "Ouvrages d\u2019infrastructure en cours": { + "account_number": "2393" + }, + "Am\u00e9nagements et agencements et installations techniques en cours": { + "account_number": "2394" + }, + "Am\u00e9nagements de bureaux en cours": { + "account_number": "2395" + }, + "Autres installations et agencements en cours": { + "account_number": "2398" + }, + "account_number": "239" + }, + "account_number": "23" + }, + "Mat\u00e9riel, mobilier et actifs biologiques": { + "Mat\u00e9riel et outillage industriel et commercial": { + "Mat\u00e9riel industriel": { + "account_number": "2411" + }, + "Outillage industriel": { + "account_number": "2412" + }, + "Mat\u00e9riel commercial": { + "account_number": "2413" + }, + "Outillage commercial": { + "account_number": "2414" + }, + "Mat\u00e9riel & outillage industriel et commercial de location-acquisition": { + "account_number": "2416" + }, + "account_number": "241" + }, + "Mat\u00e9riel et outillage agricole": { + "Mat\u00e9riel agricole": { + "account_number": "2421" + }, + "Outillage agricole": { + "account_number": "2422" + }, + "Mat\u00e9riel & outillage agricole de location-acquisition": { + "account_number": "2426" + }, + "account_number": "242" + }, + "Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "243" + }, + "Mat\u00e9riel et mobilier": { + "Mat\u00e9riel de bureau": { + "account_number": "2441" + }, + "Mat\u00e9riel informatique": { + "account_number": "2442" + }, + "Mat\u00e9riel bureautique": { + "account_number": "2443" + }, + "Mobilier de bureau": { + "account_number": "2444" + }, + "Mat\u00e9riel et mobilier immeubles de placement": { + "account_number": "2445" + }, + "Mat\u00e9riel et mobilier de location acquisition": { + "account_number": "2446" + }, + "Mat\u00e9riel et mobilier des logements du personnel": { + "account_number": "2447" + }, + "account_number": "244" + }, + "Mat\u00e9riel de transport": { + "Mat\u00e9riel automobile": { + "account_number": "2451" + }, + "Mat\u00e9riel ferroviaire": { + "account_number": "2452" + }, + "Mat\u00e9riel fluvial, lagunaire": { + "account_number": "2453" + }, + "Mat\u00e9riel naval": { + "account_number": "2454" + }, + "Mat\u00e9riel a\u00e9rien": { + "account_number": "2455" + }, + "Mat\u00e9riel de transport de location-acquisition": { + "account_number": "2456" + }, + "Mat\u00e9riel hippomobile": { + "account_number": "2457" + }, + "Autres mat\u00e9riels de transport": { + "account_number": "2458" + }, + "account_number": "245" + }, + "Actifs biologiques": { + "Cheptel, animaux de trait": { + "account_number": "2461" + }, + "Cheptel, animaux reproducteurs": { + "account_number": "2462" + }, + "Animaux de garde": { + "account_number": "2463" + }, + "Plantations agricoles": { + "account_number": "2465" + }, + "Autres actifs biologiques": { + "account_number": "2468" + }, + "account_number": "246" + }, + "Agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "Agencements et am\u00e9nagements du mat\u00e9riel": { + "account_number": "2471" + }, + "Agencements et am\u00e9nagements des actifs biologiques": { + "account_number": "2472" + }, + "Autres agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "account_number": "2478" + }, + "account_number": "247" + }, + "Autres mat\u00e9riels et mobiliers": { + "Collections et \u0153uvres d\u2019art": { + "account_number": "2481" + }, + "Divers mat\u00e9riels mobiliers": { + "account_number": "2488" + }, + "account_number": "248" + }, + "Mat\u00e9riels et actifs biologiques en cours": { + "Mat\u00e9riel et outillage industriel et commercial": { + "account_number": "2491" + }, + "Mat\u00e9riel et outillage agricole": { + "account_number": "2492" + }, + "Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "2493" + }, + "Mat\u00e9riel et mobilier de bureau": { + "account_number": "2494" + }, + "Mat\u00e9riel de transport": { + "account_number": "2495" + }, + "Actifs biologiques": { + "account_number": "2496" + }, + "Agencements am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "account_number": "2497" + }, + "Autres mat\u00e9riels et actifs biologiques en cours": { + "account_number": "2498" + }, + "account_number": "249" + }, + "account_number": "24" + }, + "Avances et acomptes vers\u00e9s sur immobilisations": { + "Avances et acomptes vers\u00e9s sur immobilisations incorporelles": { + "account_number": "251" + }, + "Avances et acomptes vers\u00e9s sur immobilisations corporelles": { + "account_number": "252" + }, + "account_number": "25" + }, + "Titres de participation": { + "Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": { + "account_number": "261" + }, + "Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le conjoint": { + "account_number": "262" + }, + "Titres de participation dans des soci\u00e9t\u00e9s conf\u00e9rant une influence notable": { + "account_number": "263" + }, + "Participations dans des organismes professionnels": { + "account_number": "265" + }, + "Parts dans des groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": { + "account_number": "266" + }, + "Autres titres de participation": { + "account_number": "268" + }, + "account_number": "26" + }, + "Autres immobilisations financi\u00e8res": { + "Pr\u00eats et cr\u00e9ances": { + "Pr\u00eats participatifs": { + "account_number": "2711" + }, + "Pr\u00eats aux associ\u00e9s": { + "account_number": "2712" + }, + "Billets de fonds": { + "account_number": "2713" + }, + "Titres pr\u00eat\u00e9s": { + "account_number": "2714" + }, + "Autres pr\u00eats et cr\u00e9ances": { + "account_number": "2718" + }, + "account_number": "271" + }, + "Pr\u00eats au personnel": { + "Pr\u00eats immobiliers": { + "account_number": "2721" + }, + "Pr\u00eats mobiliers et d\u2019installation": { + "account_number": "2722" + }, + "Autres pr\u00eats au personnel": { + "account_number": "2728" + }, + "account_number": "272" + }, + "Cr\u00e9ances sur l\u2019\u00c9tat": { + "Retenues de garantie": { + "account_number": "2731" + }, + "Fonds r\u00e9glement\u00e9": { + "account_number": "2733" + }, + "Cr\u00e9ances sur le conc\u00e9dant": { + "account_number": "2734" + }, + "Autres cr\u00e9ances sur l\u2019\u00c9tat": { + "account_number": "2738" + }, + "account_number": "273" + }, + "Titres immobilis\u00e9s": { + "Titres immobilis\u00e9s de l\u2019activit\u00e9 de portefeuille (TIAP)": { + "account_number": "2741" + }, + "Titres participatifs": { + "account_number": "2742" + }, + "Certificats d\u2019investissement": { + "account_number": "2743" + }, + "Parts de fonds commun de placement (FCP)": { + "account_number": "2744" + }, + "Obligations": { + "account_number": "2745" + }, + "Actions ou parts propres": { + "account_number": "2746" + }, + "Autres titres immobilis\u00e9s": { + "account_number": "2748" + }, + "account_number": "274" + }, + "D\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "D\u00e9p\u00f4ts pour loyers d\u2019avance": { + "account_number": "2751" + }, + "D\u00e9p\u00f4ts pour l\u2019\u00e9lectricit\u00e9": { + "account_number": "2752" + }, + "D\u00e9p\u00f4ts pour l\u2019eau": { + "account_number": "2753" + }, + "D\u00e9p\u00f4ts pour le gaz": { + "account_number": "2754" + }, + "D\u00e9p\u00f4ts pour le t\u00e9l\u00e9phone, le t\u00e9lex, la t\u00e9l\u00e9copie": { + "account_number": "2755" + }, + "Cautionnements sur march\u00e9s publics": { + "account_number": "2756" + }, + "Cautionnements sur autres op\u00e9rations": { + "account_number": "2757" + }, + "Autres d\u00e9p\u00f4ts et cautionnements": { + "account_number": "2758" + }, + "account_number": "275" + }, + "Int\u00e9r\u00eats courus": { + "Pr\u00eats et cr\u00e9ances non commerciales": { + "account_number": "2761" + }, + "Pr\u00eats au personnel": { + "account_number": "2762" + }, + "Cr\u00e9ances sur l\u2019\u00c9tat": { + "account_number": "2763" + }, + "Titres immobilis\u00e9s": { + "account_number": "2764" + }, + "D\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "account_number": "2765" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations": { + "account_number": "2767" + }, + "Immobilisations financi\u00e8res diverses": { + "account_number": "2768" + }, + "account_number": "276" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": { + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations (groupe)": { + "account_number": "2771" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations (hors groupe)": { + "account_number": "2772" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": { + "account_number": "2773" + }, + "Avances \u00e0 des Groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": { + "account_number": "2774" + }, + "account_number": "277" + }, + "Immobilisations financi\u00e8res diverses": { + "Cr\u00e9ances diverses groupe": { + "account_number": "2781" + }, + "Cr\u00e9ances diverses hors groupe": { + "account_number": "2782" + }, + "Banques d\u00e9p\u00f4ts \u00e0 terme": { + "account_number": "2784" + }, + "Or et m\u00e9taux pr\u00e9cieux": { + "account_number": "2785" + }, + "Autres immobilisations financi\u00e8res": { + "account_number": "2788" + }, + "account_number": "278" + }, + "account_number": "27" + }, + "Amortissements": { + "account_type": "Accumulated Depreciation", + "Amortissements des immobilisations corporelles": { + "account_type": "Accumulated Depreciation", + "Amortissements des frais de d\u00e9veloppement": { + "account_type": "Accumulated Depreciation", + "account_number": "2811" + }, + "Amortissements des brevets, licences, concessions et droits similaires": { + "account_type": "Accumulated Depreciation", + "account_number": "2812" + }, + "Amortissements des logiciels et sites internet": { + "account_type": "Accumulated Depreciation", + "account_number": "2813" + }, + "Amortissements des marques": { + "account_type": "Accumulated Depreciation", + "account_number": "2814" + }, + "Amortissements du fonds commercial": { + "account_type": "Accumulated Depreciation", + "account_number": "2815" + }, + "Amortissements du droit au bail": { + "account_type": "Accumulated Depreciation", + "account_number": "2816" + }, + "Amortissements des investissements de cr\u00e9ation": { + "account_type": "Accumulated Depreciation", + "account_number": "2817" + }, + "Amortissements des autres droits et valeurs incorporels": { + "account_type": "Accumulated Depreciation", + "account_number": "2818" + }, + "account_number": "281" + }, + "Amortissements des terrains": { + "Amortissements des travaux de mise en valeur des terrains": { + "account_number": "2824" + }, + "account_number": "282" + }, + "Amortissements des b\u00e2timents, installations techniques et agencements": { + "Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "account_number": "2831" + }, + "Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "account_number": "2832" + }, + "Amortissements des ouvrages d\u2019infrastructure": { + "account_number": "2833" + }, + "Amortissements des am\u00e9nagements, agencements et installations techniques": { + "account_number": "2834" + }, + "Amortissements des am\u00e9nagements de bureaux": { + "account_number": "2835" + }, + "Amortissements des b\u00e2timents industriels, agricoles et commerciaux mis en concession": { + "account_number": "2837" + }, + "Amortissements des autres installations et agencements": { + "account_number": "2838" + }, + "account_number": "283" + }, + "Amortissements du mat\u00e9riel": { + "Amortissements du mat\u00e9riel et outillage industriel et commercial": { + "account_number": "2841" + }, + "Amortissements du mat\u00e9riel et outillage agricole": { + "account_number": "2842" + }, + "Amortissements du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "2843" + }, + "Amortissements du mat\u00e9riel et mobilier": { + "account_number": "2844" + }, + "Amortissements du mat\u00e9riel de transport": { + "account_number": "2845" + }, + "Amortissements des actifs biologiques": { + "account_number": "2846" + }, + "Amortissements des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": { + "account_number": "2847" + }, + "Amortissements des autres mat\u00e9riels": { + "account_number": "2848" + }, + "account_number": "284" + }, + "account_number": "28" + }, + "D\u00e9pr\u00e9ciations des immobilisations": { + "D\u00e9pr\u00e9ciations des immobilisations incorporelles": { + "D\u00e9pr\u00e9ciations des frais de d\u00e9veloppement": { + "account_number": "2911" + }, + "D\u00e9pr\u00e9ciations des brevets, licences, concessions et droits similaires": { + "account_number": "2912" + }, + "D\u00e9pr\u00e9ciations des logiciels et sites internet": { + "account_number": "2913" + }, + "D\u00e9pr\u00e9ciations des marques": { + "account_number": "2914" + }, + "D\u00e9pr\u00e9ciations du fonds commercial": { + "account_number": "2915" + }, + "D\u00e9pr\u00e9ciations du droit au bail": { + "account_number": "2916" + }, + "D\u00e9pr\u00e9ciations des investissements de cr\u00e9ation": { + "account_number": "2917" + }, + "D\u00e9pr\u00e9ciations des autres droits et valeurs incorporels": { + "account_number": "2918" + }, + "D\u00e9pr\u00e9ciations des immobilisations incorporelles en cours": { + "account_number": "2919" + }, + "account_number": "291" + }, + "D\u00e9pr\u00e9ciations des terrains": { + "D\u00e9pr\u00e9ciations des terrains agricoles et forestiers": { + "account_number": "2921" + }, + "D\u00e9pr\u00e9ciations des terrains nus": { + "account_number": "2922" + }, + "D\u00e9pr\u00e9ciations des terrains b\u00e2tis": { + "account_number": "2923" + }, + "D\u00e9pr\u00e9ciations des travaux de mise en valeur des terrains": { + "account_number": "2924" + }, + "D\u00e9pr\u00e9ciations des terrains de gisement": { + "account_number": "2925" + }, + "D\u00e9pr\u00e9ciations des terrains am\u00e9nag\u00e9s": { + "account_number": "2926" + }, + "D\u00e9pr\u00e9ciations des terrains mis en concession": { + "account_number": "2927" + }, + "D\u00e9pr\u00e9ciations des autres terrains": { + "account_number": "2928" + }, + "D\u00e9pr\u00e9ciations des am\u00e9nagements de terrains en cours": { + "account_number": "2929" + }, + "account_number": "292" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents, installations techniques et agencements": { + "D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "account_number": "2931" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "account_number": "2932" + }, + "D\u00e9pr\u00e9ciations des ouvrages d\u2019infrastructures": { + "account_number": "2933" + }, + "D\u00e9pr\u00e9ciations des am\u00e9nagements, agencements et installations techniques": { + "account_number": "2934" + }, + "D\u00e9pr\u00e9ciations des am\u00e9nagements de bureaux": { + "account_number": "2935" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles et commerciaux mis en concession": { + "account_number": "2937" + }, + "D\u00e9pr\u00e9ciations des autres installations et agencements": { + "account_number": "2938" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents et installations en cours": { + "account_number": "2939" + }, + "account_number": "293" + }, + "D\u00e9pr\u00e9ciations de mat\u00e9riel, du mobilier et de l\u2019actif biologique": { + "D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage industriel et commercial": { + "account_number": "2941" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage agricole": { + "account_number": "2942" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "2943" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel et mobilier": { + "account_number": "2944" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel de transport": { + "account_number": "2945" + }, + "D\u00e9pr\u00e9ciations des actifs biologiques": { + "account_number": "2946" + }, + "D\u00e9pr\u00e9ciations des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": { + "account_number": "2947" + }, + "D\u00e9pr\u00e9ciations des autres mat\u00e9riels": { + "account_number": "2948" + }, + "D\u00e9pr\u00e9ciations de mat\u00e9riel en cours": { + "account_number": "2949" + }, + "account_number": "294" + }, + "D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations": { + "D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations incorporelles": { + "account_number": "2951" + }, + "D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations corporelles": { + "account_number": "2952" + }, + "account_number": "295" + }, + "D\u00e9pr\u00e9ciations des titres de participation": { + "D\u00e9pr\u00e9ciations des titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": { + "account_number": "2961" + }, + "D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s sous contr\u00f4le conjoint": { + "account_number": "2962" + }, + "D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s conf\u00e9rant une influence notable": { + "account_number": "2963" + }, + "D\u00e9pr\u00e9ciations des participations dans des organismes professionnels": { + "account_number": "2965" + }, + "D\u00e9pr\u00e9ciations des parts dans des GIE": { + "account_number": "2966" + }, + "D\u00e9pr\u00e9ciations des autres titres de participation": { + "account_number": "2968" + }, + "account_number": "296" + }, + "D\u00e9pr\u00e9ciations des autres immobilisations financi\u00e8res": { + "D\u00e9pr\u00e9ciations des pr\u00eats et cr\u00e9ances": { + "account_number": "2971" + }, + "D\u00e9pr\u00e9ciations des pr\u00eats au personnel": { + "account_number": "2972" + }, + "D\u00e9pr\u00e9ciations des cr\u00e9ances sur l\u2019\u00c9tat": { + "account_number": "2973" + }, + "D\u00e9pr\u00e9ciations des titres immobilis\u00e9s": { + "account_number": "2974" + }, + "D\u00e9pr\u00e9ciations des d\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "account_number": "2975" + }, + "D\u00e9pr\u00e9ciations des cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": { + "account_number": "2977" + }, + "D\u00e9pr\u00e9ciations des cr\u00e9ances financi\u00e8res diverses": { + "account_number": "2978" + }, + "account_number": "297" + }, + "account_number": "29" + }, + "root_type": "Asset", + "account_number": "2" + }, + "Comptes de Stocks": { + "Marchandises": { + "Marchandises A": { + "Marchandises A1": { + "account_number": "3111" + }, + "Marchandises A2": { + "account_number": "3112" + }, + "account_number": "311" + }, + "Marchandises B": { + "Marchandises B1": { + "account_number": "3121" + }, + "Marchandises B2": { + "account_number": "3122" + }, + "account_number": "312" + }, + "Actifs biologiques": { + "Animaux": { + "account_number": "3131" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3132" + }, + "account_number": "313" + }, + "Marchandises hors activit\u00e9s ordinaires (HAO)": { + "account_number": "318" + }, + "account_number": "31" + }, + "Mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "Mati\u00e8res A": { + "account_number": "321" + }, + "Mati\u00e8res B": { + "account_number": "322" + }, + "Fournitures (A, B)": { + "account_number": "323" + }, + "account_number": "32" + }, + "Autres approvisionnements": { + "Mati\u00e8res consommables": { + "account_number": "331" + }, + "Fournitures d\u2019atelier et d\u2019usine": { + "account_number": "332" + }, + "Fournitures de magasin": { + "account_number": "333" + }, + "Fournitures de bureau": { + "account_number": "334" + }, + "Emballages": { + "Emballages perdus": { + "account_number": "3351" + }, + "Emballages r\u00e9cup\u00e9rables non identifiables": { + "account_number": "3352" + }, + "Emballages \u00e0 usage mixte": { + "account_number": "3353" + }, + "Autres emballages": { + "account_number": "3358" + }, + "account_number": "335" + }, + "Autres mati\u00e8res": { + "account_number": "338" + }, + "account_number": "33" + }, + "Produits en cours": { + "Produits en cours": { + "Produits en cours P1": { + "account_number": "3411" + }, + "Produits en cours P2": { + "account_number": "3412" + }, + "account_number": "341" + }, + "Travaux en cours": { + "Travaux en cours T1": { + "account_number": "3421" + }, + "Travaux en cours T2": { + "account_number": "3422" + }, + "account_number": "342" + }, + "Produits interm\u00e9diaires en cours": { + "Produits interm\u00e9diaires A": { + "account_number": "3431" + }, + "Produits interm\u00e9diaires B": { + "account_number": "3432" + }, + "account_number": "343" + }, + "Produits r\u00e9siduels en cours": { + "Produits r\u00e9siduels A": { + "account_number": "3441" + }, + "Produits r\u00e9siduels B": { + "account_number": "3442" + }, + "account_number": "344" + }, + "Actifs biologiques en cours": { + "Animaux": { + "account_number": "3451" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3452" + }, + "account_number": "345" + }, + "account_number": "34" + }, + "Services en cours": { + "\u00c9tudes en cours": { + "\u00c9tudes en cours E1": { + "account_number": "3511" + }, + "\u00c9tudes en cours E2": { + "account_number": "3512" + }, + "account_number": "351" + }, + "Prestations de services en cours": { + "Prestations de services S1": { + "account_number": "3521" + }, + "Prestations de services S2": { + "account_number": "3522" + } + }, + "account_number": "35" + }, + "Produits finis": { + "Produits finis A": { + "account_number": "361" + }, + "Produits finis B": { + "account_number": "362" + }, + "Actifs biologiques": { + "Animaux": { + "account_number": "3631" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3632" + }, + "Autres stocks (activit\u00e9s annexes)": { + "account_number": "3638" + }, + "account_number": "363" + }, + "account_number": "36" + }, + "Produits interm\u00e9diaires et r\u00e9siduels": { + "Produits interm\u00e9diaires": { + "Produits interm\u00e9diaires A": { + "account_number": "3711" + }, + "Produits interm\u00e9diaires B": { + "account_number": "3712" + }, + "account_number": "371" + }, + "Produits r\u00e9siduels": { + "D\u00e9chets": { + "account_number": "3721" + }, + "Rebuts": { + "account_number": "3722" + }, + "Mati\u00e8res de R\u00e9cup\u00e9ration": { + "account_number": "3723" + }, + "account_number": "372" + }, + "Actifs biologiques": { + "Animaux": { + "account_number": "3731" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3732" + }, + "Autres stocks (activit\u00e9s annexes)": { + "account_number": "3738" + }, + "account_number": "373" + }, + "account_number": "37" + }, + "Stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": { + "account_type": "Stock", + "Marchandises en cours de route": { + "account_number": "381" + }, + "Mati\u00e8res premi\u00e8res et fournitures li\u00e9es en cours de route": { + "account_number": "382" + }, + "Autres approvisionnements en cours de route": { + "account_number": "383" + }, + "Produits finis en cours de route": { + "account_number": "386" + }, + "Stock en consignation ou en d\u00e9p\u00f4t": { + "Stock en consignation": { + "account_number": "3871" + }, + "Stock en d\u00e9p\u00f4t": { + "account_number": "3872" + }, + "account_number": "387" + }, + "Stock provenant d\u2019immobilisations mises hors service ou au rebut": { + "account_number": "388" + }, + "account_number": "38" + }, + "D\u00e9pr\u00e9ciations des stocks et encours de production": { + "D\u00e9pr\u00e9ciations des stocks de marchandises": { + "account_number": "391" + }, + "D\u00e9pr\u00e9ciations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "account_number": "392" + }, + "D\u00e9pr\u00e9ciations des stocks d\u2019autres approvisionnements": { + "account_number": "393" + }, + "D\u00e9pr\u00e9ciations des productions en cours": { + "account_number": "394" + }, + "D\u00e9pr\u00e9ciations des services en cours": { + "account_number": "395" + }, + "D\u00e9pr\u00e9ciations des stocks de produits finis": { + "account_number": "396" + }, + "D\u00e9pr\u00e9ciations des stocks de produits interm\u00e9diaires et r\u00e9siduels": { + "account_number": "397" + }, + "D\u00e9pr\u00e9ciations des stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": { + "account_number": "398" + }, + "account_number": "39" + }, + "root_type": "Asset", + "account_number": "3" + }, + "4-Comptes de Tiers (ACTIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (ACTIF)": { + "Fournisseurs d\u00e9biteurs": { + "Fournisseurs Avances et acomptes vers\u00e9s": { + "account_number": "4091" + }, + "Fournisseurs Groupe avances et acomptes vers\u00e9s": { + "account_number": "4092" + }, + "Fournisseurs Sous-traitants avances et acomptes vers\u00e9s": { + "account_number": "4093" + }, + "Fournisseurs Cr\u00e9ances pour emballages et mat\u00e9riels \u00e0 rendre": { + "account_number": "4094" + }, + "Fournisseurs Rabais, remises, ristournes et autres avoirs \u00e0 obtenir": { + "account_number": "4098" + }, + "account_number": "409" + } + }, + "41-Clients et comptes rattach\u00e9s (ACTIF)": { + "Clients": { + "Clients": { + "account_type": "Receivable", + "account_number": "4111" + }, + "Clients groupe": { + "account_type": "Receivable", + "account_number": "4112" + }, + "Clients, \u00c9tat et Collectivit\u00e9s publiques": { + "account_type": "Receivable", + "account_number": "4114" + }, + "Clients, organismes internationaux": { + "account_type": "Receivable", + "account_number": "4115" + }, + "Clients, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Receivable", + "account_number": "4116" + }, + "Client, retenues de garantie": { + "account_type": "Receivable", + "account_number": "4117" + }, + "Clients, d\u00e9gr\u00e8vement de taxes sur la valeur ajout\u00e9e (TVA)": { + "account_type": "Receivable", + "account_number": "4118" + }, + "account_type": "Receivable", + "account_number": "411" + }, + "Clients, effets \u00e0 recevoir en portefeuille": { + "Clients, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4121" + }, + "Clients Groupe, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4122" + }, + "\u00c9tat et Collectivit\u00e9s publiques, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4124" + }, + "Organismes Internationaux, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4125" + }, + "account_type": "Receivable", + "account_number": "412" + }, + "Clients, ch\u00e8ques, effets et autres valeurs impay\u00e9es": { + "Clients, ch\u00e8ques impay\u00e9s": { + "account_type": "Receivable", + "account_number": "4131" + }, + "Clients, effets impay\u00e9s": { + "account_type": "Receivable", + "account_number": "4132" + }, + "Clients, cartes de cr\u00e9dit impay\u00e9es": { + "account_type": "Receivable", + "account_number": "4133" + }, + "Clients, autres valeurs impay\u00e9es": { + "account_type": "Receivable", + "account_number": "4138" + }, + "account_type": "Receivable", + "account_number": "413" + }, + "Cr\u00e9ances sur cessions courantes d\u2019immobilisations": { + "Cr\u00e9ances en compte, immobilisations incorporelles": { + "account_type": "Receivable", + "account_number": "4141" + }, + "Cr\u00e9ances en compte, immobilisations corporelles": { + "account_type": "Receivable", + "account_number": "4142" + }, + "Effets \u00e0 recevoir, immobilisations incorporelles": { + "account_type": "Receivable", + "account_number": "4146" + }, + "Effets \u00e0 recevoir, immobilisations corporelles": { + "account_type": "Receivable", + "account_number": "4147" + }, + "account_type": "Receivable", + "account_number": "414" + }, + "Clients, effets escompt\u00e9s non \u00e9chus": { + "account_type": "Receivable", + "account_number": "415" + }, + "Cr\u00e9ances clients litigieuses ou douteuses": { + "Cr\u00e9ances litigieuses": { + "account_type": "Receivable", + "account_number": "4161" + }, + "Cr\u00e9ances douteuses": { + "account_type": "Receivable", + "account_number": "4162" + }, + "account_type": "Receivable", + "account_number": "416" + }, + "Clients, produits \u00e0 recevoir": { + "Clients, factures \u00e0 \u00e9tablir": { + "account_type": "Receivable", + "account_number": "4181" + }, + "Clients, int\u00e9r\u00eats courus": { + "account_type": "Receivable", + "account_number": "4186" + }, + "account_type": "Receivable", + "account_number": "418" + }, + "account_type": "Receivable" + }, + "42-Personnel (ACTIF)": { + "Personnel, avances et acomptes": { + "Personnel, avances": { + "account_number": "4211" + }, + "Personnel, acomptes": { + "account_number": "4212" + }, + "Frais avanc\u00e9s et fournitures au personnel": { + "account_number": "4213" + }, + "account_number": "421" + } + }, + "43-Organismes sociaux (ACTIF)": { + "431-S\u00e9curit\u00e9 sociale": { + "Prestations familiales": { + "account_number": "4311" + }, + "Accidents de travail": { + "account_number": "4312" + }, + "Caisse de retraite obligatoire": { + "account_number": "4313" + }, + "Caisse de retraite facultative": { + "account_number": "4314" + }, + "Autres cotisations sociales": { + "account_number": "4318" + } + }, + "432-Caisses de retraite compl\u00e9mentaire": {}, + "433-Autres organismes sociaux": { + "Mutuelle": { + "account_number": "4331" + }, + "Assurances retraite": { + "account_number": "4332" + }, + "Assurances et organismes de sant\u00e9": { + "account_number": "4333" + } + }, + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "Produits \u00e0 recevoir": { + "account_number": "4387" + } + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (ACTIF)": { + "\u00c9tat, TVA factur\u00e9e": { + "TVA factur\u00e9e sur ventes": { + "account_number": "4431" + }, + "TVA factur\u00e9e sur prestations de services": { + "account_number": "4432" + }, + "TVA factur\u00e9e sur travaux": { + "account_number": "4433" + }, + "TVA factur\u00e9e sur production livr\u00e9e \u00e0 soi-m\u00eame": { + "account_number": "4434" + }, + "TVA sur factures \u00e0 \u00e9tablir": { + "account_number": "4435" + }, + "account_number": "443" + }, + "\u00c9tat, TVA r\u00e9cup\u00e9rable": { + "TVA r\u00e9cup\u00e9rable sur immobilisations": { + "account_number": "4451" + }, + "TVA r\u00e9cup\u00e9rable sur achats": { + "account_number": "4452" + }, + "TVA r\u00e9cup\u00e9rable sur transport": { + "account_number": "4453" + }, + "TVA r\u00e9cup\u00e9rable sur services ext\u00e9rieurs et autres charges": { + "account_number": "4454" + }, + "TVA r\u00e9cup\u00e9rable sur factures non parvenues": { + "account_number": "4455" + }, + "TVA transf\u00e9r\u00e9e par d\u2019autres entit\u00e9s": { + "account_number": "4456" + }, + "account_number": "445" + }, + "\u00c9tat, charges \u00e0 payer et produits \u00e0 recevoir": { + "Charges \u00e0 payer": { + "account_number": "4486" + }, + "Produits \u00e0 recevoir": { + "account_number": "4487" + }, + "account_number": "448" + }, + "\u00c9tat, cr\u00e9ances et dettes diverses": { + "\u00c9tat, obligations cautionn\u00e9es": { + "account_number": "4491" + }, + "\u00c9tat, avances et acomptes vers\u00e9s sur imp\u00f4ts": { + "account_number": "4492" + }, + "\u00c9tat, fonds de dotation \u00e0 recevoir": { + "account_number": "4493" + }, + "\u00c9tat, subventions investissement \u00e0 recevoir": { + "account_number": "4494" + }, + "\u00c9tat, subventions d\u2019exploitation \u00e0 recevoir": { + "account_number": "4495" + }, + "\u00c9tat, subventions d\u2019\u00e9quilibre \u00e0 recevoir": { + "account_number": "4496" + }, + "\u00c9tat, avances sur subventions": { + "account_number": "4497" + }, + "\u00c9tat, fonds r\u00e9glement\u00e9s provisionn\u00e9s": { + "account_number": "4499" + }, + "account_number": "449" + } + }, + "45-Organismes internationaux (ACTIF)": { + "Op\u00e9rations avec les organismes africains": { + "account_number": "451" + }, + "Op\u00e9rations avec les autres organismes internationaux": { + "account_number": "452" + }, + "Organismes internationaux, fonds de dotation et subventions \u00e0 recevoir": { + "Organismes internationaux, fonds de dotation \u00e0 recevoir": { + "account_number": "4581" + }, + "Organismes internationaux, subventions \u00e0 recevoir": { + "account_number": "4582" + }, + "account_number": "458" + } + }, + "46-Apporteurs, associ\u00e9s et groupe (ACTIF)": { + "461-Apporteurs, op\u00e9rations sur le capital": { + "Apporteurs, capital appel\u00e9, non vers\u00e9": { + "account_number": "4613" + }, + "Apporteurs, compte d\u2019apport, op\u00e9rations de restructuration (fusion...)": { + "account_number": "4614" + }, + "Apporteurs, titres \u00e0 \u00e9changer": { + "account_number": "4618" + } + }, + "Apporteurs, restant d\u00fb sur capital appel\u00e9": { + "account_number": "467" + } + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (ACTIF)": { + "472-Cr\u00e9ances et dettes sur titres de placement": { + "Cr\u00e9ances sur cessions de titres de placement": { + "account_number": "4721" + }, + "Versements restant \u00e0 effectuer sur titres de placement non lib\u00e9r\u00e9s": { + "account_number": "4726" + } + }, + "473-Interm\u00e9diaires Op\u00e9rations faites pour compte de tiers": { + "Mandants": { + "account_number": "4731" + }, + "Mandataires": { + "account_number": "4732" + }, + "Commettants": { + "account_number": "4733" + }, + "Commissionnaires": { + "account_number": "4734" + }, + "\u00c9tat, Collectivit\u00e9s publiques, fonds global d\u2019allocation": { + "account_number": "4739" + } + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits": { + "Compte de r\u00e9partition p\u00e9riodique des produits": { + "account_number": "4747" + } + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA": { + "Compte actif": { + "account_type": "Temporary", + "account_number": "4751" + } + }, + "Charges constat\u00e9es d\u2019avance": { + "account_number": "476" + }, + "478-\u00c9carts de conversion actif": { + "Diminution des cr\u00e9ances d\u2019exploitation": { + "account_number": "4781" + }, + "Diminution des cr\u00e9ances financi\u00e8res": { + "account_number": "4782" + }, + "Augmentation des dettes d\u2019exploitation": { + "account_number": "4783" + }, + "Augmentation des dettes financi\u00e8res": { + "account_number": "4784" + }, + "Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": { + "account_number": "4786" + }, + "Diff\u00e9rences compens\u00e9es par couverture de change": { + "account_number": "4788" + } + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (ACTIF)": { + "Cr\u00e9ances sur cessions d\u2019immobilisations": { + "En compte, immobilisations incorporelles": { + "account_number": "4851" + }, + "En compte, immobilisations corporelles": { + "account_number": "4852" + }, + "Effets \u00e0 recevoir, immobilisations incorporelles": { + "account_number": "4853" + }, + "Effets \u00e0 recevoir, immobilisations corporelles": { + "account_number": "4854" + }, + "Effets escompt\u00e9s non \u00e9chus": { + "account_number": "4855" + }, + "Retenues de garantie": { + "account_number": "4857" + }, + "Factures \u00e0 \u00e9tablir": { + "account_number": "4858" + }, + "account_number": "485" + }, + "Autres cr\u00e9ances hors activit\u00e9s ordinaires (HAO)": { + "account_number": "488" + } + }, + "49-D\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme (tiers) (ACTIF)": { + "D\u00e9pr\u00e9ciations des comptes clients": { + "Cr\u00e9ances litigieuses": { + "account_number": "4911" + }, + "Cr\u00e9ances douteuses": { + "account_number": "4912" + }, + "account_number": "491" + }, + "D\u00e9pr\u00e9ciations des comptes organismes internationaux": { + "account_number": "495" + }, + "D\u00e9pr\u00e9ciations des comptes apporteurs, associ\u00e9s et groupe": { + "Associ\u00e9s, comptes courants": { + "account_number": "4962" + }, + "Associ\u00e9s, op\u00e9rations faites en commun": { + "account_number": "4963" + }, + "Groupe, comptes courants": { + "account_number": "4966" + }, + "account_number": "496" + }, + "D\u00e9pr\u00e9ciations des comptes d\u00e9biteurs divers": { + "account_number": "497" + }, + "D\u00e9pr\u00e9ciations des comptes de cr\u00e9ances HAO": { + "Cr\u00e9ances sur cessions d\u2019immobilisations": { + "account_number": "4985" + }, + "Cr\u00e9ances sur cessions de titres de placement": { + "account_number": "4986" + }, + "Autres cr\u00e9ances HAO": { + "account_number": "4988" + }, + "account_number": "498" + }, + "Provisions pour risques \u00e0 court terme": { + "Sur op\u00e9rations d\u2019exploitation": { + "account_number": "4991" + }, + "Sur op\u00e9rations financi\u00e8res": { + "account_number": "4997" + }, + "Sur op\u00e9rations HAO": { + "account_number": "4998" + }, + "account_number": "499" + } + }, + "root_type": "Asset" + }, + "4-Comptes de Tiers (PASSIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (PASSIF)": { + "Fournisseurs, dettes en compte": { + "Fournisseurs": { + "account_type": "Payable", + "account_number": "4011" + }, + "Fournisseurs groupe": { + "account_type": "Payable", + "account_number": "4012" + }, + "Fournisseurs sous-traitants": { + "account_type": "Payable", + "account_number": "4013" + }, + "Fournisseurs, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Payable", + "account_number": "4016" + }, + "Fournisseur, retenues de garantie": { + "account_type": "Payable", + "account_number": "4017" + }, + "account_type": "Payable", + "account_number": "401" + }, + "Fournisseurs, effets \u00e0 payer": { + "Fournisseurs Effets \u00e0 payer": { + "account_type": "Payable", + "account_number": "4021" + }, + "Fournisseurs Groupe, effets \u00e0 payer": { + "account_type": "Payable", + "account_number": "4022" + }, + "Fournisseurs Sous-traitants, effets \u00e0 payer": { + "account_type": "Payable", + "account_number": "4023" + }, + "account_type": "Payable", + "account_number": "402" + }, + "Fournisseurs, acquisitions courantes d\u2019immobilisations": { + "Fournisseurs Dettes en comptes, immobilisations incorporelles": { + "account_type": "Payable", + "account_number": "4041" + }, + "Fournisseurs Dettes en comptes, immobilisations corporelles": { + "account_type": "Payable", + "account_number": "4042" + }, + "Fournisseurs Effets \u00e0 payer, immobilisations incorporelles": { + "account_type": "Payable", + "account_number": "4046" + }, + "Fournisseurs Effets \u00e0 payer, immobilisations corporelles": { + "account_type": "Payable", + "account_number": "4047" + }, + "account_type": "Payable", + "account_number": "404" + }, + "Fournisseurs, factures non parvenues": { + "Fournisseurs": { + "account_type": "Stock Received But Not Billed", + "account_number": "4081" + }, + "Fournisseurs groupe": { + "account_type": "Stock Received But Not Billed", + "account_number": "4082" + }, + "Fournisseurs sous-traitants": { + "account_type": "Stock Received But Not Billed", + "account_number": "4083" + }, + "Fournisseurs, int\u00e9r\u00eats courus": { + "account_type": "Stock Received But Not Billed", + "account_number": "4086" + }, + "account_type": "Stock Received But Not Billed", + "account_number": "408" + }, + "account_type": "Payable" + }, + "41-Clients et comptes rattach\u00e9s (PASSIF)": { + "Clients cr\u00e9diteurs": { + "Clients, avances et acomptes re\u00e7us": { + "account_number": "4191" + }, + "Clients groupe, avances et acomptes re\u00e7us": { + "account_number": "4192" + }, + "Clients, dettes pour emballages et mat\u00e9riels consign\u00e9s": { + "account_number": "4194" + }, + "Clients, rabais, remises, ristournes et autres avoirs \u00e0 accorder": { + "account_number": "4198" + }, + "account_number": "419" + } + }, + "42-Personnel (PASSIF)": { + "Personnel, r\u00e9mun\u00e9rations dues": { + "account_number": "422" + }, + "Personnel, oppositions, saisies-arr\u00eats": { + "Personnel, oppositions": { + "account_number": "4231" + }, + "Personnel, saisies-arr\u00eats": { + "account_number": "4232" + }, + "Personnel, avis \u00e0 tiers d\u00e9tenteur": { + "account_number": "4233" + }, + "account_number": "423" + }, + "Personnel, \u0153uvres sociales internes": { + "Assistance m\u00e9dicale": { + "account_number": "4241" + }, + "Allocations familiales": { + "account_number": "4242" + }, + "Organismes sociaux rattach\u00e9s \u00e0 l\u2019entit\u00e9": { + "account_number": "4245" + }, + "Autres \u0153uvres sociales internes": { + "account_number": "4248" + }, + "account_number": "424" + }, + "Repr\u00e9sentants du personnel": { + "D\u00e9l\u00e9gu\u00e9s du personnel": { + "account_number": "4251" + }, + "Syndicats et Comit\u00e9s d\u2019entreprises, d\u2019\u00c9tablissement": { + "account_number": "4252" + }, + "Autres repr\u00e9sentants du personnel": { + "account_number": "4258" + }, + "account_number": "425" + }, + "Personnel, participation aux b\u00e9n\u00e9fices et au capital": { + "Participation aux b\u00e9n\u00e9fices": { + "account_number": "4261" + }, + "Participation au capital": { + "account_number": "4264" + }, + "account_number": "426" + }, + "Personnel d\u00e9p\u00f4ts": { + "account_number": "427" + }, + "Personnel, charges \u00e0 payer et produits \u00e0 recevoir": { + "Dettes provisionn\u00e9es pour cong\u00e9s \u00e0 payer": { + "account_number": "4281" + }, + "Autres charges \u00e0 payer": { + "account_number": "4286" + }, + "Produits \u00e0 recevoir": { + "account_number": "4287" + }, + "account_number": "428" + } + }, + "43-Organismes sociaux (PASSIF)": { + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "Charges sociales sur gratifications \u00e0 payer": { + "account_number": "4381" + }, + "Charges sociales sur cong\u00e9s \u00e0 payer": { + "account_number": "4382" + }, + "Autres charges \u00e0 payer": { + "account_number": "4386" + } + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (PASSIF)": { + "\u00c9tat, imp\u00f4t sur les b\u00e9n\u00e9fices": { + "account_number": "441" + }, + "\u00c9tat, autres imp\u00f4ts et taxes": { + "Imp\u00f4ts et taxes d\u2019\u00c9tat": { + "account_number": "4421" + }, + "Imp\u00f4ts et taxes pour les collectivit\u00e9s publiques": { + "account_number": "4422" + }, + "Imp\u00f4ts et taxes recouvrables sur des obligataires": { + "account_number": "4423" + }, + "Imp\u00f4ts et taxes recouvrables sur des associ\u00e9s": { + "account_number": "4424" + }, + "Droits de douane": { + "account_number": "4426" + }, + "Autres imp\u00f4ts et taxes": { + "account_number": "4428" + }, + "account_number": "442" + }, + "\u00c9tat, TVA due ou cr\u00e9dit de TVA": { + "\u00c9tat, TVA due": { + "account_number": "4441" + }, + "\u00c9tat, cr\u00e9dit de TVA \u00e0 reporter": { + "account_number": "4449" + }, + "account_number": "444" + }, + "\u00c9tat, autres taxes sur le chiffre d\u2019affaires": { + "account_number": "446" + }, + "\u00c9tat, imp\u00f4ts retenus \u00e0 la source": { + "Imp\u00f4t G\u00e9n\u00e9ral sur le revenu": { + "account_number": "4471" + }, + "Imp\u00f4ts sur salaires": { + "account_number": "4472" + }, + "Contribution nationale": { + "account_number": "4473" + }, + "Contribution nationale de solidarit\u00e9": { + "account_number": "4474" + }, + "Autres imp\u00f4ts et contributions": { + "account_number": "4478" + }, + "account_number": "447" + } + }, + "46-Apporteurs, associ\u00e9s et groupe (PASSIF)": { + "461-Apporteurs, op\u00e9rations sur le capital (PASSIF)": { + "Apporteurs, apports en nature": { + "account_number": "4611" + }, + "Apporteurs, apports en num\u00e9raire": { + "account_number": "4612" + }, + "Apporteurs, versements re\u00e7us sur augmentation de capital": { + "account_number": "4615" + }, + "Apporteurs, versements anticip\u00e9s": { + "account_number": "4616" + }, + "Apporteurs d\u00e9faillants": { + "account_number": "4617" + }, + "Apporteurs, capital \u00e0 rembourser": { + "account_number": "4619" + } + }, + "462-Associ\u00e9s, comptes courants": { + "Principal": { + "account_number": "4621" + }, + "Int\u00e9r\u00eats courus": { + "account_number": "4626" + } + }, + "463-Associ\u00e9s, op\u00e9rations faites en commun et GIE": { + "Op\u00e9rations courantes": { + "account_number": "4631" + }, + "Int\u00e9r\u00eats courus": { + "account_number": "4636" + } + }, + "Associ\u00e9s, dividendes \u00e0 payer": { + "account_number": "465" + }, + "Groupe, comptes courants": { + "account_number": "466" + } + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (PASSIF)": { + "471-D\u00e9biteurs et cr\u00e9diteurs divers": { + "D\u00e9biteurs divers": { + "account_number": "4711" + }, + "Cr\u00e9diteurs divers": { + "account_number": "4712" + }, + "Obligataires": { + "account_number": "4713" + }, + "R\u00e9mun\u00e9rations d\u2019administrateurs": { + "account_number": "4715" + }, + "Compte d\u2019affacturage": { + "account_number": "4716" + }, + "D\u00e9biteurs divers retenues de garantie": { + "account_number": "4717" + }, + "Apport, compte de fusion et op\u00e9rations assimil\u00e9es": { + "account_number": "4718" + }, + "Bons de souscription d\u2019actions et d\u2019obligations": { + "account_number": "4719" + } + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits (PASSIF)": { + "Compte de r\u00e9partition p\u00e9riodique des charges": { + "account_number": "4746" + } + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA (PASSIF)": { + "Compte passif": { + "account_number": "4752" + } + }, + "Produits constat\u00e9s d\u2019avance": { + "account_number": "477" + }, + "479-\u00c9carts de conversion passif": { + "Augmentation des cr\u00e9ances d\u2019exploitation": { + "account_number": "4791" + }, + "Augmentation des cr\u00e9ances financi\u00e8res": { + "account_number": "4792" + }, + "Diminution des dettes d\u2019exploitation": { + "account_number": "4793" + }, + "Diminution des dettes financi\u00e8res": { + "account_number": "4794" + }, + "Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": { + "account_number": "4797" + }, + "Diff\u00e9rences compens\u00e9es par couverture de change": { + "account_number": "4798" + } + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (HAO) (PASSIF)": { + "Fournisseurs d\u2019investissements": { + "Immobilisations incorporelles": { + "account_number": "4811" + }, + "Immobilisations corporelles": { + "account_number": "4812" + }, + "Versements restant \u00e0 effectuer sur titres de participation et titres immobilis\u00e9s non lib\u00e9r\u00e9s": { + "account_number": "4813" + }, + "R\u00e9serve de propri\u00e9t\u00e9": { + "account_number": "4816" + }, + "Retenues de garantie": { + "account_number": "4817" + }, + "Factures non parvenues": { + "account_number": "4818" + }, + "account_number": "481" + }, + "Fournisseurs d\u2019investissements, effets \u00e0 payer": { + "Immobilisations incorporelles": { + "account_number": "4821" + }, + "Immobilisations corporelles": { + "account_number": "4822" + }, + "account_number": "482" + }, + "Autres dettes hors activit\u00e9s ordinaires (HAO)": { + "Produits": { + "account_number": "4887" + }, + "account_number": "484" + } + }, + "root_type": "Liability" + }, + "Comptes de tr\u00e9sorerie": { + "Titres de placement": { + "Titres du tr\u00e9sor et bons de caisse \u00e0 court terme": { + "Titres du Tr\u00e9sor \u00e0 court terme": { + "account_number": "5011" + }, + "Titres d\u2019organismes financiers": { + "account_number": "5012" + }, + "Bons de caisse \u00e0 court terme": { + "account_number": "5013" + }, + "Frais d\u2019acquisition des titres de tr\u00e9sor et bons de caisse": { + "account_number": "5016" + }, + "account_number": "501" + }, + "Actions": { + "Actions ou parts propres": { + "account_number": "5021" + }, + "Actions cot\u00e9es": { + "account_number": "5022" + }, + "Actions non cot\u00e9es": { + "account_number": "5023" + }, + "Actions d\u00e9membr\u00e9es (certificats d\u2019investissement, droits de vote)": { + "account_number": "5024" + }, + "Autres actions": { + "account_number": "5025" + }, + "Frais d\u2019acquisition des actions": { + "account_number": "5026" + }, + "account_number": "502" + }, + "Obligations": { + "Obligations \u00e9mises par la soci\u00e9t\u00e9 et rachet\u00e9es par elle": { + "account_number": "5031" + }, + "Obligations cot\u00e9es": { + "account_number": "5032" + }, + "Obligations non cot\u00e9es": { + "account_number": "5033" + }, + "Autres obligations": { + "account_number": "5035" + }, + "Frais d\u2019acquisition des obligations": { + "account_number": "5036" + }, + "account_number": "503" + }, + "Bons de souscription": { + "Bons de souscription d\u2019actions": { + "account_number": "5042" + }, + "Bons de souscription d\u2019obligations": { + "account_number": "5043" + }, + "account_number": "504" + }, + "Titres n\u00e9gociables hors r\u00e9gion": { + "account_number": "505" + }, + "Int\u00e9r\u00eats courus": { + "Titres du Tr\u00e9sor et bons de caisse \u00e0 court terme": { + "account_number": "5061" + }, + "Actions": { + "account_number": "5062" + }, + "Obligations": { + "account_number": "5063" + }, + "account_number": "506" + }, + "Autres titres de placement et cr\u00e9ances assimil\u00e9es": { + "account_number": "508" + }, + "account_number": "50" + }, + "Valeurs \u00e0 encaisser": { + "Effets \u00e0 encaisser": { + "account_number": "511" + }, + "Effets \u00e0 l\u2019encaissement": { + "account_number": "512" + }, + "Ch\u00e8ques \u00e0 encaisser": { + "account_number": "513" + }, + "Ch\u00e8ques \u00e0 l\u2019encaissement": { + "account_number": "514" + }, + "Cartes de cr\u00e9dit \u00e0 encaisser": { + "account_number": "515" + }, + "Autres valeurs \u00e0 l\u2019encaissement": { + "Warrants": { + "account_number": "5181" + }, + "Billets de fonds": { + "account_number": "5182" + }, + "Ch\u00e8ques de voyage": { + "account_number": "5185" + }, + "Coupons \u00e9chus": { + "account_number": "5186" + }, + "Int\u00e9r\u00eats \u00e9chus des obligations": { + "account_number": "5187" + }, + "account_number": "518" + }, + "account_number": "51" + }, + "Banques": { + "Banques locales": { + "Banques en monnaie nationale": { + "account_type": "Bank", + "account_number": "5211" + }, + "Banques en devises": { + "account_type": "Bank", + "account_number": "5215" + }, + "account_type": "Bank", + "account_number": "521" + }, + "Banques autres \u00c9tats r\u00e9gion": { + "account_number": "522" + }, + "Banques autres \u00c9tats zone mon\u00e9taire": { + "account_number": "523" + }, + "Banques hors zone mon\u00e9taire": { + "account_number": "524" + }, + "Banques d\u00e9p\u00f4t \u00e0 terme": { + "account_number": "525" + }, + "Banques, int\u00e9r\u00eats courus": { + "Banque, int\u00e9r\u00eats courus, charges \u00e0 payer": { + "account_number": "5261" + }, + "Banque, int\u00e9r\u00eats courus, produits \u00e0 recevoir": { + "account_number": "5267" + }, + "account_number": "526" + }, + "account_number": "52" + }, + "\u00c9tablissements financiers et assimil\u00e9s": { + "Ch\u00e8ques postaux": { + "account_number": "531" + }, + "Tr\u00e9sor": { + "account_number": "532" + }, + "Soci\u00e9t\u00e9s de gestion et d\u2019interm\u00e9diation (SGI)": { + "account_number": "533" + }, + "\u00c9tablissements financiers, int\u00e9r\u00eats courus": { + "account_number": "536" + }, + "Autres organismes financiers": { + "account_number": "538" + }, + "account_number": "53" + }, + "Instruments de tr\u00e9sorerie": { + "Options de taux d\u2019int\u00e9r\u00eat": { + "account_number": "541" + }, + "Options de taux de change": { + "account_number": "542" + }, + "Options de taux boursiers": { + "account_number": "543" + }, + "Instruments de march\u00e9s \u00e0 terme": { + "account_number": "544" + }, + "Avoirs d\u2019or et autres m\u00e9taux pr\u00e9cieux": { + "account_number": "545" + }, + "account_number": "54" + }, + "Instruments de monnaie \u00e9lectronique": { + "Monnaie \u00e9lectronique carte carburant": { + "account_number": "551" + }, + "Monnaie \u00e9lectronique t\u00e9l\u00e9phone portable": { + "account_number": "552" + }, + "Monnaie \u00e9lectronique carte p\u00e9age": { + "account_number": "553" + }, + "Porte-monnaie \u00e9lectronique": { + "account_number": "554" + }, + "Autres instruments de monnaies \u00e9lectroniques": { + "account_number": "558" + }, + "account_number": "55" + }, + "Banques, cr\u00e9dits de tr\u00e9sorerie et d\u2019escompte": { + "Cr\u00e9dits de tr\u00e9sorerie": { + "account_number": "561" + }, + "Escompte de cr\u00e9dits de campagne": { + "account_number": "564" + }, + "Escompte de cr\u00e9dits ordinaires": { + "account_number": "565" + }, + "Banques, cr\u00e9dits de tr\u00e9sorerie, int\u00e9r\u00eats courus": { + "account_number": "566" + }, + "account_number": "56" + }, + "Caisse": { + "Caisse si\u00e8ge social": { + "Caisse en monnaie nationale": { + "account_number": "5711" + }, + "Caisse en devises": { + "account_number": "5712" + }, + "account_number": "571" + }, + "Caisse succursale A": { + "En monnaie nationale": { + "account_number": "5721" + }, + "En devises": { + "account_number": "5722" + }, + "account_number": "572" + }, + "Caisse succursale B": { + "En monnaie nationale": { + "account_number": "5731" + }, + "En devises": { + "account_number": "5732" + }, + "account_number": "573" + }, + "account_number": "57" + }, + "R\u00e9gies d\u2019avances, accr\u00e9ditifs et virements internes": { + "R\u00e9gies d\u2019avance": { + "account_number": "581" + }, + "Accr\u00e9ditifs": { + "account_number": "582" + }, + "Virements de fonds": { + "account_number": "585" + }, + "Autres virements internes": { + "account_number": "588" + }, + "account_number": "58" + }, + "D\u00e9pr\u00e9ciations et provisions pour risque \u00e0 court terme": { + "D\u00e9pr\u00e9ciations des titres de placement": { + "account_number": "590" + }, + "D\u00e9pr\u00e9ciations des titres et valeurs \u00e0 encaisser": { + "account_number": "591" + }, + "D\u00e9pr\u00e9ciations des comptes banques": { + "account_number": "592" + }, + "D\u00e9pr\u00e9ciations des comptes \u00e9tablissements financiers et assimil\u00e9s": { + "account_number": "593" + }, + "D\u00e9pr\u00e9ciations des comptes d\u2019instruments de tr\u00e9sorerie": { + "account_number": "594" + }, + "Provisions pour risque \u00e0 court terme \u00e0 caract\u00e8re financier": { + "account_number": "599" + }, + "account_number": "59" + }, + "root_type": "Asset", + "account_number": "5" + }, + "Comptes de charges des activit\u00e9s ordinaires": { + "Achats et variations de stocks": { + "Achats de marchandises": { + "Dans la R\u00e9gion": { + "account_number": "6011" + }, + "Hors R\u00e9gion": { + "account_number": "6012" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "6013" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "6014" + }, + "Frais sur achats": { + "account_number": "6015" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6019" + }, + "account_number": "601" + }, + "Achats de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "Dans la R\u00e9gion": { + "account_number": "6021" + }, + "Hors R\u00e9gion": { + "account_number": "6022" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "6023" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "6024" + }, + "Frais sur achats": { + "account_number": "6025" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6029" + }, + "account_number": "602" + }, + "Variations des stocks de biens achet\u00e9s": { + "Variations des stocks de marchandises": { + "account_number": "6031" + }, + "Variations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "account_number": "6032" + }, + "Variations des stocks d\u2019autres approvisionnements": { + "account_number": "6033" + }, + "account_number": "603" + }, + "Achats stock\u00e9s de mati\u00e8res et fournitures consommables": { + "Mati\u00e8res consommables": { + "account_number": "6041" + }, + "Mati\u00e8res combustibles": { + "account_number": "6042" + }, + "Produits d\u2019entretien": { + "account_number": "6043" + }, + "Fournitures d\u2019atelier et d\u2019usine": { + "account_number": "6044" + }, + "Frais sur achat": { + "account_number": "6045" + }, + "Fournitures de magasin": { + "account_number": "6046" + }, + "Fournitures de bureau": { + "account_number": "6047" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6049" + }, + "account_number": "604" + }, + "Autres achats": { + "Fournitures non stockables Eau": { + "account_number": "6051" + }, + "Fournitures non stockables \u00c9lectricit\u00e9": { + "account_number": "6052" + }, + "Fournitures non stockables Autres \u00e9nergies": { + "account_number": "6053" + }, + "Fournitures d\u2019entretien non stockables": { + "account_number": "6054" + }, + "Fournitures de bureau non stockables": { + "account_number": "6055" + }, + "Achats de petit mat\u00e9riel et outillage": { + "account_number": "6056" + }, + "Achats d\u2019\u00e9tudes et prestations de services": { + "account_number": "6057" + }, + "Achats de travaux, mat\u00e9riels et \u00e9quipements": { + "account_number": "6058" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6059" + }, + "account_number": "605" + }, + "Achats d\u2019emballages": { + "Emballages perdus": { + "account_number": "6081" + }, + "Emballages r\u00e9cup\u00e9rables non identifiables": { + "account_number": "6082" + }, + "Emballages \u00e0 usage mixte": { + "account_number": "6083" + }, + "Frais sur achats": { + "account_number": "6085" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6089" + }, + "account_number": "608" + }, + "account_number": "60" + }, + "Transports": { + "Transports sur ventes": { + "account_number": "612" + }, + "Transports pour le compte de tiers": { + "account_number": "613" + }, + "Transports du personnel": { + "account_number": "614" + }, + "Transports de plis": { + "account_number": "616" + }, + "Autres frais de transport": { + "Voyages et d\u00e9placements": { + "account_number": "6181" + }, + "Transports entre \u00e9tablissements ou chantiers": { + "account_number": "6182" + }, + "Transports administratifs": { + "account_number": "6183" + }, + "account_number": "618" + }, + "account_number": "61" + }, + "Services ext\u00e9rieurs": { + "Sous-traitance g\u00e9n\u00e9rale": { + "account_number": "621" + }, + "Locations, charges locatives": { + "Locations de terrains": { + "account_number": "6221" + }, + "Locations de b\u00e2timents": { + "account_number": "6222" + }, + "Locations de mat\u00e9riels et outillages": { + "account_number": "6223" + }, + "Malis sur emballages": { + "account_number": "6224" + }, + "Locations d\u2019emballages": { + "account_number": "6225" + }, + "Fermages et loyers du foncier": { + "account_number": "6226" + }, + "Locations et charges locatives diverses": { + "account_number": "6228" + }, + "account_number": "622" + }, + "Redevances de location acquisition": { + "Cr\u00e9dit-bail immobilier": { + "account_number": "6232" + }, + "Cr\u00e9dit-bail mobilier": { + "account_number": "6233" + }, + "Location-vente": { + "account_number": "6234" + }, + "Autres contrats de location acquisition": { + "account_number": "6238" + }, + "account_number": "623" + }, + "Entretien, r\u00e9parations, remise en \u00e9tat et maintenance": { + "Entretien et r\u00e9parations des biens immobiliers": { + "account_number": "6241" + }, + "Entretien et r\u00e9parations des biens mobiliers": { + "account_number": "6242" + }, + "Maintenance": { + "account_number": "6243" + }, + "Charges de d\u00e9mant\u00e8lement et remise en \u00e9tat": { + "account_number": "6244" + }, + "Autres entretiens et r\u00e9parations": { + "account_number": "6248" + }, + "account_number": "624" + }, + "Primes d\u2019assurance": { + "Assurances multirisques": { + "account_number": "6251" + }, + "Assurances mat\u00e9riel de transport": { + "account_number": "6252" + }, + "Assurances risques d\u2019exploitation": { + "account_number": "6253" + }, + "Assurances responsabilit\u00e9 du producteur": { + "account_number": "6254" + }, + "Assurances insolvabilit\u00e9 clients": { + "account_number": "6255" + }, + "Assurances transport sur ventes": { + "account_number": "6257" + }, + "Autres primes d\u2019assurances": { + "account_number": "6258" + }, + "account_number": "625" + }, + "\u00c9tudes, recherches et documentation": { + "\u00c9tudes et recherches": { + "account_number": "6261" + }, + "Documentation g\u00e9n\u00e9rale": { + "account_number": "6265" + }, + "Documentation technique": { + "account_number": "6266" + }, + "account_number": "626" + }, + "Publicit\u00e9, publications, relations publiques": { + "Annonces, insertions": { + "account_number": "6271" + }, + "Catalogues, imprim\u00e9s publicitaires": { + "account_number": "6272" + }, + "\u00c9chantillons": { + "account_number": "6273" + }, + "Foires et expositions": { + "account_number": "6274" + }, + "Publications": { + "account_number": "6275" + }, + "Cadeaux \u00e0 la client\u00e8le": { + "account_number": "6276" + }, + "Frais de colloques, s\u00e9minaires, conf\u00e9rences": { + "account_number": "6277" + }, + "Autres charges de publicit\u00e9 et relations publiques": { + "account_number": "6278" + }, + "account_number": "627" + }, + "Frais de t\u00e9l\u00e9communications": { + "Frais de t\u00e9l\u00e9phone": { + "account_number": "6281" + }, + "Frais de t\u00e9lex": { + "account_number": "6282" + }, + "Frais de t\u00e9l\u00e9copie": { + "account_number": "6283" + }, + "Autres frais de t\u00e9l\u00e9communications": { + "account_number": "6288" + }, + "account_number": "628" + }, + "account_number": "62" + }, + "Autres services ext\u00e9rieurs": { + "Frais bancaires": { + "Frais sur titres (vente, garde)": { + "account_number": "6311" + }, + "Frais sur effets": { + "account_number": "6312" + }, + "Location de coffres": { + "account_number": "6313" + }, + "Commissions d\u2019affacturage": { + "account_number": "6314" + }, + "Commissions sur cartes de cr\u00e9dit": { + "account_number": "6315" + }, + "Frais d\u2019\u00e9mission d\u2019emprunts": { + "account_number": "6316" + }, + "Frais sur instruments monnaie \u00e9lectronique": { + "account_number": "6317" + }, + "Autres frais bancaires": { + "account_number": "6318" + }, + "account_number": "631" + }, + "R\u00e9mun\u00e9rations d\u2019interm\u00e9diaires et de conseils": { + "Commissions et courtages sur ventes": { + "account_number": "6322" + }, + "Honoraires des professions r\u00e9glement\u00e9es": { + "account_number": "6324" + }, + "Frais d\u2019actes et de contentieux": { + "account_number": "6325" + }, + "R\u00e9mun\u00e9rations d\u2019affacturage": { + "account_number": "6326" + }, + "R\u00e9mun\u00e9rations des autres prestataires de services": { + "account_number": "6327" + }, + "Divers frais": { + "account_number": "6328" + }, + "account_number": "632" + }, + "Frais de formation du personnel": { + "account_number": "633" + }, + "Redevances pour brevets, licences, logiciels, concessions et droits et valeurs similaires": { + "Redevances pour brevets, licences": { + "account_number": "6342" + }, + "Redevances pour logiciels": { + "account_number": "6343" + }, + "Redevances pour marques": { + "account_number": "6344" + }, + "Redevances pour sites internet": { + "account_number": "6345" + }, + "Redevances pour concessions, droits et valeurs similaires": { + "account_number": "6346" + }, + "account_number": "634" + }, + "Cotisations": { + "Cotisations": { + "account_number": "6351" + }, + "Concours divers": { + "account_number": "6358" + }, + "account_number": "635" + }, + "R\u00e9mun\u00e9rations de personnel ext\u00e9rieur \u00e0 l\u2019entit\u00e9": { + "Personnel int\u00e9rimaire": { + "account_number": "6371" + }, + "Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": { + "account_number": "6372" + }, + "account_number": "637" + }, + "Autres charges externes": { + "Frais de recrutement du personnel": { + "account_number": "6381" + }, + "Frais de d\u00e9m\u00e9nagement": { + "account_number": "6382" + }, + "R\u00e9ceptions": { + "account_number": "6383" + }, + "Missions": { + "account_number": "6384" + }, + "Charges de copropri\u00e9t\u00e9": { + "account_number": "6385" + }, + "account_number": "638" + }, + "account_number": "63" + }, + "Imp\u00f4ts et taxes": { + "Imp\u00f4ts et taxes directs": { + "Imp\u00f4ts fonciers et taxes annexes": { + "account_number": "6411" + }, + "Patentes, licences et taxes annexes": { + "account_number": "6412" + }, + "Taxes sur appointements et salaires": { + "account_number": "6413" + }, + "Taxes d\u2019apprentissage": { + "account_number": "6414" + }, + "Formation professionnelle continue": { + "account_number": "6415" + }, + "Autres imp\u00f4ts et taxes directs": { + "account_number": "6418" + }, + "account_number": "641" + }, + "Imp\u00f4ts et taxes indirects": { + "account_number": "645" + }, + "Droits d\u2019enregistrement": { + "Droits de mutation": { + "account_number": "6461" + }, + "Droits de timbre": { + "account_number": "6462" + }, + "Taxes sur les v\u00e9hicules de soci\u00e9t\u00e9": { + "account_number": "6463" + }, + "Vignettes": { + "account_number": "6464" + }, + "Autres droits": { + "account_number": "6468" + }, + "account_number": "646" + }, + "P\u00e9nalit\u00e9s, amendes fiscales": { + "P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts directs": { + "account_number": "6471" + }, + "P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts indirects": { + "account_number": "6472" + }, + "P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts directs": { + "account_number": "6473" + }, + "P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts indirects": { + "account_number": "6474" + }, + "Autres p\u00e9nalit\u00e9s et amendes fiscales": { + "account_number": "6478" + }, + "account_number": "647" + }, + "Autres imp\u00f4ts et taxes": { + "account_number": "648" + }, + "account_number": "64" + }, + "Autres charges": { + "Pertes sur cr\u00e9ances clients et autres d\u00e9biteurs": { + "Clients": { + "account_number": "6511" + }, + "Autres d\u00e9biteurs": { + "account_number": "6515" + }, + "account_number": "651" + }, + "Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "Quote-part transf\u00e9r\u00e9e de b\u00e9n\u00e9fices (comptabilit\u00e9 du g\u00e9rant)": { + "account_number": "6521" + }, + "Pertes imput\u00e9es par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": { + "account_number": "6525" + }, + "account_number": "652" + }, + "Valeurs comptables des cessions courantes d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "6541" + }, + "Immobilisations corporelles": { + "account_number": "6542" + }, + "account_number": "654" + }, + "Perte de change sur cr\u00e9ances et dettes commerciale": { + "account_number": "656" + }, + "P\u00e9nalit\u00e9s et amendes p\u00e9nales": { + "account_number": "657" + }, + "Charges diverses": { + "Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": { + "account_number": "6581" + }, + "Dons": { + "account_number": "6582" + }, + "M\u00e9c\u00e9nat": { + "account_number": "6583" + }, + "Autres charges diverses": { + "account_number": "6588" + }, + "account_number": "658" + }, + "Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "Sur risques \u00e0 court terme": { + "account_number": "6591" + }, + "Sur stocks": { + "account_number": "6593" + }, + "Sur cr\u00e9ances": { + "account_number": "6594" + }, + "Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme": { + "account_number": "6598" + }, + "account_number": "659" + }, + "account_number": "65" + }, + "Charges de personnel": { + "R\u00e9mun\u00e9rations directes vers\u00e9es au personnel national": { + "Appointements salaires et commissions": { + "account_number": "6611" + }, + "Primes et gratifications": { + "account_number": "6612" + }, + "Cong\u00e9s pay\u00e9s": { + "account_number": "6613" + }, + "Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": { + "account_number": "6614" + }, + "Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": { + "account_number": "6615" + }, + "Suppl\u00e9ment familial": { + "account_number": "6616" + }, + "Avantages en nature": { + "account_number": "6617" + }, + "Autres r\u00e9mun\u00e9rations directes": { + "account_number": "6618" + }, + "account_number": "661" + }, + "R\u00e9mun\u00e9rations directes vers\u00e9es au personnel non national": { + "Appointements salaires et commissions": { + "account_number": "6621" + }, + "Primes et gratifications": { + "account_number": "6622" + }, + "Cong\u00e9s pay\u00e9s": { + "account_number": "6623" + }, + "Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": { + "account_number": "6624" + }, + "Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": { + "account_number": "6625" + }, + "Suppl\u00e9ment familial": { + "account_number": "6626" + }, + "Avantages en nature": { + "account_number": "6627" + }, + "Autres r\u00e9mun\u00e9rations directes": { + "account_number": "6628" + }, + "account_number": "662" + }, + "Indemnit\u00e9s forfaitaires vers\u00e9es au personnel": { + "Indemnit\u00e9s de logement": { + "account_number": "6631" + }, + "Indemnit\u00e9s de repr\u00e9sentation": { + "account_number": "6632" + }, + "Indemnit\u00e9s d\u2019expatriation": { + "account_number": "6633" + }, + "Indemnit\u00e9s de transport": { + "account_number": "6634" + }, + "Autres indemnit\u00e9s et avantages divers": { + "account_number": "6638" + }, + "account_number": "663" + }, + "Charges sociales": { + "Charges sociales sur r\u00e9mun\u00e9ration du personnel national": { + "account_number": "6641" + }, + "Charges sociales sur r\u00e9mun\u00e9ration du personnel non national": { + "account_number": "6642" + }, + "account_number": "664" + }, + "R\u00e9mun\u00e9rations et charges sociales de l\u2019exploitant individuel": { + "R\u00e9mun\u00e9ration du travail de l\u2019exploitant": { + "account_number": "6661" + }, + "Charges sociales": { + "account_number": "6662" + }, + "account_number": "666" + }, + "R\u00e9mun\u00e9ration transf\u00e9r\u00e9e de personnel ext\u00e9rieur": { + "Personnel int\u00e9rimaire": { + "account_number": "6671" + }, + "Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": { + "account_number": "6672" + }, + "account_number": "667" + }, + "Autres charges sociales": { + "Versements aux syndicats et comit\u00e9s d\u2019entreprise, d\u2019\u00e9tablissement": { + "account_number": "6681" + }, + "Versements aux comit\u00e9s d\u2019hygi\u00e8ne et de s\u00e9curit\u00e9": { + "account_number": "6682" + }, + "Versements et contributions aux autres \u0153uvres sociales": { + "account_number": "6683" + }, + "M\u00e9decine du travail et pharmacie": { + "account_number": "6684" + }, + "Assurances et organismes de sant\u00e9": { + "account_number": "6685" + }, + "Assurances retraite et fonds de pension": { + "account_number": "6686" + }, + "Majorations et p\u00e9nalit\u00e9s sociales": { + "account_number": "6687" + }, + "Charges sociales diverses": { + "account_number": "6688" + }, + "account_number": "668" + }, + "account_number": "66" + }, + "Frais financiers et charges assimil\u00e9es": { + "Int\u00e9r\u00eats des emprunts": { + "Emprunts obligataires": { + "account_number": "6711" + }, + "Emprunts aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": { + "account_number": "6712" + }, + "Dettes li\u00e9es \u00e0 des participations": { + "account_number": "6713" + }, + "Primes de remboursement des obligations": { + "account_number": "6714" + }, + "account_number": "671" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition": { + "Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail immobilier": { + "account_number": "6722" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail mobilier": { + "account_number": "6723" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition / location-vente": { + "account_number": "6724" + }, + "Int\u00e9r\u00eats dans loyers des autres locations acquisition": { + "account_number": "6728" + }, + "account_number": "672" + }, + "Escomptes accord\u00e9s": { + "account_number": "673" + }, + "Autres int\u00e9r\u00eats": { + "Avances re\u00e7ues et d\u00e9p\u00f4ts cr\u00e9diteurs": { + "account_number": "6741" + }, + "Comptes courants bloqu\u00e9s": { + "account_number": "6742" + }, + "Int\u00e9r\u00eats sur obligations cautionn\u00e9es": { + "account_number": "6743" + }, + "Int\u00e9r\u00eats sur dettes commerciales": { + "account_number": "6744" + }, + "Int\u00e9r\u00eats bancaires et sur op\u00e9rations de financement (escompte...)": { + "account_number": "6745" + }, + "Int\u00e9r\u00eats sur dettes diverses": { + "account_number": "6748" + }, + "account_number": "674" + }, + "Escomptes des effets de commerce": { + "account_number": "675" + }, + "Pertes de change financi\u00e8res": { + "account_number": "676" + }, + "Pertes sur titres de placement": { + "Pertes sur cessions de titres de placement": { + "account_number": "6771" + }, + "Mali provenant d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": { + "account_number": "6772" + }, + "account_number": "677" + }, + "Pertes et charges sur risques financiers": { + "Sur rentes viag\u00e8res": { + "account_number": "6781" + }, + "Sur op\u00e9rations financi\u00e8res": { + "account_number": "6782" + }, + "Sur instruments de tr\u00e9sorerie": { + "account_number": "6784" + }, + "account_number": "678" + }, + "Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "Sur risques financiers": { + "account_number": "6791" + }, + "Sur titres de placement": { + "account_number": "6795" + }, + "Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "account_number": "6798" + }, + "account_number": "679" + }, + "account_number": "67" + }, + "Dotations aux amortissements": { + "Dotations aux amortissements d\u2019exploitation": { + "Dotations aux amortissements des immobilisations incorporelles": { + "account_number": "6812" + }, + "Dotations aux amortissements des immobilisations corporelles": { + "account_number": "6813" + }, + "account_number": "681" + }, + "account_number": "68" + }, + "Dotations aux provisions et aux d\u00e9pr\u00e9ciations": { + "Dotations aux provisions et aux d\u00e9pr\u00e9ciations d\u2019exploitation": { + "Dotations aux provisions pour risques et charges": { + "account_number": "6911" + }, + "Dotations aux d\u00e9pr\u00e9ciations des immobilisations incorporelles": { + "account_number": "6913" + }, + "Dotations aux d\u00e9pr\u00e9ciations des immobilisations corporelles": { + "account_number": "6914" + }, + "account_number": "691" + }, + "Dotations aux provisions et aux d\u00e9pr\u00e9ciations financi\u00e8res": { + "Dotations aux provisions pour risques et charges": { + "account_number": "6971" + }, + "Dotations aux d\u00e9pr\u00e9ciations des immobilisations financi\u00e8res": { + "account_number": "6972" + }, + "account_number": "697" + }, + "account_number": "69" + }, + "root_type": "Expense", + "account_number": "6" + }, + "Comptes de produits des activit\u00e9s ordinaires": { + "Ventes": { + "Ventes de marchandises": { + "Dans la R\u00e9gion": { + "account_number": "7011" + }, + "Hors R\u00e9gion": { + "account_number": "7012" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7013" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7014" + }, + "Sur internet": { + "account_number": "7015" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7019" + }, + "account_number": "701" + }, + "Ventes de produits finis": { + "Dans la R\u00e9gion": { + "account_number": "7021" + }, + "Hors R\u00e9gion": { + "account_number": "7022" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7023" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7024" + }, + "Sur internet": { + "account_number": "7025" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7029" + }, + "account_number": "702" + }, + "Ventes de produits interm\u00e9diaires": { + "Dans la R\u00e9gion": { + "account_number": "7031" + }, + "Hors R\u00e9gion": { + "account_number": "7032" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7033" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7034" + }, + "Sur internet": { + "account_number": "7035" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7039" + }, + "account_number": "703" + }, + "Ventes de produits r\u00e9siduels": { + "Dans la R\u00e9gion": { + "account_number": "7041" + }, + "Hors R\u00e9gion": { + "account_number": "7042" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7043" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7044" + }, + "Sur internet": { + "account_number": "7045" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7049" + }, + "account_number": "704" + }, + "Travaux factur\u00e9s": { + "Dans la R\u00e9gion": { + "account_number": "7051" + }, + "Hors R\u00e9gion": { + "account_number": "7052" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7053" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7054" + }, + "Sur internet": { + "account_number": "7055" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7059" + }, + "account_number": "705" + }, + "Services vendus": { + "Dans la R\u00e9gion": { + "account_number": "7061" + }, + "Hors R\u00e9gion": { + "account_number": "7062" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7063" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7064" + }, + "Sur internet": { + "account_number": "7065" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7069" + }, + "account_number": "706" + }, + "Produits accessoires": { + "Ports, emballages perdus et autres frais factur\u00e9s": { + "account_number": "7071" + }, + "Commissions et courtages": { + "account_number": "7072" + }, + "Locations": { + "account_number": "7073" + }, + "Bonis sur reprises et cessions d\u2019emballages": { + "account_number": "7074" + }, + "Mise \u00e0 disposition de personnel": { + "account_number": "7075" + }, + "Redevances pour brevets, logiciels, marques et droits similaires": { + "account_number": "7076" + }, + "Services exploit\u00e9s dans l\u2019int\u00e9r\u00eat du personnel": { + "account_number": "7077" + }, + "Autres produits accessoires": { + "account_number": "7078" + }, + "account_number": "707" + }, + "account_number": "70" + }, + "Subventions d\u2019exploitation": { + "Sur produits \u00e0 l\u2019exportation": { + "account_number": "711" + }, + "Sur produits \u00e0 l\u2019importation": { + "account_number": "712" + }, + "Sur produits de p\u00e9r\u00e9quation": { + "account_number": "713" + }, + "Indemnit\u00e9s et subventions d\u2019exploitation (entit\u00e9 agricole)": { + "account_number": "714" + }, + "Autres subventions d\u2019exploitation": { + "Vers\u00e9es par l\u2019\u00c9tat et les collectivit\u00e9s publiques": { + "account_number": "7181" + }, + "Vers\u00e9es par les organismes internationaux": { + "account_number": "7182" + }, + "Vers\u00e9es par des tiers": { + "account_number": "7183" + }, + "account_number": "718" + }, + "account_number": "71" + }, + "Production immobilis\u00e9e": { + "Immobilisations incorporelles": { + "account_number": "721" + }, + "Immobilisations corporelles": { + "Immobilisations corporelles (hors actifs biologiques)": { + "account_number": "7221" + }, + "Immobilisations corporelles (actifs biologiques)": { + "account_number": "7222" + }, + "account_number": "722" + }, + "Production auto-consomm\u00e9e": { + "account_number": "724" + }, + "Immobilisations financi\u00e8res": { + "account_number": "726" + }, + "account_number": "72" + }, + "Variations des stocks de biens et de services produits": { + "Variations des stocks de produits en cours": { + "Produits en cours": { + "account_number": "7341" + }, + "Travaux en cours": { + "account_number": "7342" + }, + "account_number": "734" + }, + "Variations des en-cours de services": { + "\u00c9tudes en cours": { + "account_number": "7351" + }, + "Prestations de services en cours": { + "account_number": "7352" + }, + "account_number": "735" + }, + "Variations des stocks de produits finis": { + "account_number": "736" + }, + "Variations des stocks de produits interm\u00e9diaires et r\u00e9siduels": { + "Produits interm\u00e9diaires": { + "account_number": "7371" + }, + "Produits r\u00e9siduels": { + "account_number": "7372" + }, + "account_number": "737" + }, + "account_number": "73" + }, + "Autres produits": { + "Profits sur cr\u00e9ances clients et autres d\u00e9biteurs": { + "account_number": "751" + }, + "Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "Quote-part transf\u00e9r\u00e9e de pertes (comptabilit\u00e9 du g\u00e9rant)": { + "account_number": "7521" + }, + "B\u00e9n\u00e9fices attribu\u00e9s par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": { + "account_number": "7525" + }, + "account_number": "752" + }, + "Produits des cessions courantes d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "7541" + }, + "Immobilisations corporelles": { + "account_number": "7542" + }, + "account_number": "754" + }, + "Gains de change sur cr\u00e9ances et dettes commerciales": { + "account_number": "756" + }, + "Produits divers": { + "Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": { + "account_number": "7581" + }, + "Indemnit\u00e9s d\u2019assurances re\u00e7ues": { + "account_number": "7582" + }, + "Autres produits divers": { + "account_number": "7588" + }, + "account_number": "758" + }, + "Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "Sur risques \u00e0 court terme": { + "account_number": "7591" + }, + "Sur stocks": { + "account_number": "7593" + }, + "Sur cr\u00e9ances": { + "account_number": "7594" + }, + "Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "account_number": "7598" + }, + "account_number": "759" + }, + "account_number": "75" + }, + "Revenus financiers et produits assimil\u00e9s": { + "Int\u00e9r\u00eats de pr\u00eats et cr\u00e9ances diverses": { + "Int\u00e9r\u00eats de pr\u00eats": { + "account_number": "7712" + }, + "Int\u00e9r\u00eats sur cr\u00e9ances diverses": { + "account_number": "7713" + }, + "account_number": "771" + }, + "Revenus de participations et autres titres immobilis\u00e9s": { + "Revenus des titres de participation": { + "account_number": "7721" + }, + "Revenus autres titres immobilis\u00e9s": { + "account_number": "7722" + }, + "account_number": "772" + }, + "Escomptes obtenus": { + "account_number": "773" + }, + "Revenus de placement": { + "Revenus des obligations": { + "account_number": "7745" + }, + "Revenus des titres de placement": { + "account_number": "7746" + }, + "account_number": "774" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition": { + "account_number": "775" + }, + "Gains de change financiers": { + "account_number": "776" + }, + "Gains sur cessions de titres de placement": { + "account_number": "777" + }, + "Gains sur risques financiers": { + "Sur rentes viag\u00e8res": { + "account_number": "7781" + }, + "Sur op\u00e9rations financi\u00e8res": { + "account_number": "7782" + }, + "Sur instruments de tr\u00e9sorerie": { + "account_number": "7784" + }, + "account_number": "778" + }, + "Reprises de charges pour d\u00e9pr\u00e9ciations et provisions \u00e0 court terme financi\u00e8res": { + "Sur risques financiers": { + "account_number": "7791" + }, + "Sur titres de placement": { + "account_number": "7795" + }, + "Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "account_number": "7798" + }, + "account_number": "779" + }, + "account_number": "77" + }, + "Transferts de charges": { + "Transferts de charges d\u2019exploitation": { + "account_number": "781" + }, + "Transferts de charges financi\u00e8res": { + "account_number": "787" + }, + "account_number": "78" + }, + "Reprises de provisions, de d\u00e9pr\u00e9ciations et autres": { + "Reprises de provisions et d\u00e9pr\u00e9ciations d\u2019exploitation": { + "Pour risques et charges": { + "account_number": "7911" + }, + "Des immobilisations incorporelles": { + "account_number": "7913" + }, + "Des immobilisations corporelles": { + "account_number": "7914" + }, + "account_number": "791" + }, + "Reprises de provisions et d\u00e9pr\u00e9ciations financi\u00e8res": { + "Pour risques et charges": { + "account_number": "7971" + }, + "Des immobilisations financi\u00e8res": { + "account_number": "7972" + }, + "account_number": "797" + }, + "Reprises d\u2019amortissements": { + "account_number": "798" + }, + "Reprises de subventions d\u2019investissement": { + "account_number": "799" + }, + "account_number": "79" + }, + "root_type": "Income", + "account_number": "7" + }, + "8-Comptes des autres charges et des autres produits (CHARGES)": { + "Valeurs comptables des cessions d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "811" + }, + "Immobilisations corporelles": { + "account_number": "812" + }, + "Immobilisations financi\u00e8res": { + "account_number": "816" + }, + "account_number": "81" + }, + "Charges hors activit\u00e9s ordinaires": { + "Charges HAO constat\u00e9es": { + "account_number": "831" + }, + "Charges li\u00e9es aux op\u00e9rations de restructuration": { + "account_number": "833" + }, + "Pertes sur cr\u00e9ances HAO": { + "account_number": "834" + }, + "Dons et lib\u00e9ralit\u00e9s accord\u00e9s": { + "account_number": "835" + }, + "Abandons de cr\u00e9ances consentis": { + "account_number": "836" + }, + "Charges li\u00e9es aux op\u00e9rations de liquidation": { + "account_number": "837" + }, + "Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": { + "account_number": "839" + }, + "account_number": "83" + }, + "Dotations hors activit\u00e9s ordinaires": { + "Dotations aux provisions r\u00e9glement\u00e9es": { + "account_number": "851" + }, + "Dotations aux amortissements HAO": { + "account_number": "852" + }, + "Dotations aux d\u00e9pr\u00e9ciations HAO": { + "account_number": "853" + }, + "Dotations aux provisions pour risques et charges HAO": { + "account_number": "854" + }, + "Autres dotations HAO": { + "account_number": "858" + }, + "account_number": "85" + }, + "Participation des travailleurs": { + "Participation l\u00e9gale aux b\u00e9n\u00e9fices": { + "account_number": "871" + }, + "Participation contractuelle aux b\u00e9n\u00e9fices": { + "account_number": "874" + }, + "Autres participations": { + "account_number": "878" + }, + "account_number": "87" + }, + "Imp\u00f4ts sur le r\u00e9sultat": { + "Imp\u00f4ts sur les b\u00e9n\u00e9fices de l\u2019exercice": { + "Activit\u00e9s exerc\u00e9es dans l\u2019\u00c9tat": { + "account_number": "8911" + }, + "Activit\u00e9s exerc\u00e9es dans les autres \u00c9tats de la R\u00e9gion": { + "account_number": "8912" + }, + "Activit\u00e9s exerc\u00e9es hors R\u00e9gion": { + "account_number": "8913" + }, + "account_number": "891" + }, + "Rappel d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": { + "account_number": "892" + }, + "Imp\u00f4t minimum forfaitaire IMF": { + "account_number": "895" + }, + "D\u00e9gr\u00e8vements et annulations d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": { + "D\u00e9gr\u00e8vements": { + "account_number": "8991" + }, + "Annulations pour pertes r\u00e9troactives": { + "account_number": "8994" + }, + "account_number": "899" + }, + "account_number": "89" + }, + "root_type": "Expense" + }, + "8-Comptes des autres charges et des autres produits (PRODUITS)": { + "Produits des cessions d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "821" + }, + "Immobilisations corporelles": { + "account_number": "822" + }, + "Immobilisations financi\u00e8res": { + "account_number": "826" + }, + "account_number": "82" + }, + "Produits hors activit\u00e9s ordinaires": { + "Produits HAO constat\u00e9s": { + "account_number": "841" + }, + "Produits li\u00e9s aux op\u00e9rations de restructuration": { + "account_number": "843" + }, + "Indemnit\u00e9s et subventions HAO (entit\u00e9 agricole)": { + "account_number": "844" + }, + "Dons et lib\u00e9ralit\u00e9s obtenus": { + "account_number": "845" + }, + "Abandons de cr\u00e9ances obtenus": { + "account_number": "846" + }, + "Produits li\u00e9s aux op\u00e9rations de liquidation": { + "account_number": "847" + }, + "Transferts de charges HAO": { + "account_number": "848" + }, + "Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": { + "account_number": "849" + }, + "account_number": "84" + }, + "Reprises de charges, provisions et d\u00e9pr\u00e9ciations HAO": { + "Reprises de provisions r\u00e9glement\u00e9es": { + "account_number": "861" + }, + "Reprises d\u2019amortissements HAO": { + "account_number": "862" + }, + "Reprises de d\u00e9pr\u00e9ciations HAO": { + "account_number": "863" + }, + "Reprises de provisions pour risques et charges HAO": { + "account_number": "864" + }, + "Autres reprises HAO": { + "account_number": "868" + }, + "account_number": "86" + }, + "Subventions d\u2019\u00e9quilibre": { + "\u00c9tat": { + "account_number": "881" + }, + "Collectivit\u00e9s publiques": { + "account_number": "884" + }, + "Groupe": { + "account_number": "886" + }, + "Autres": { + "account_number": "888" + }, + "account_number": "88" + }, + "root_type": "Income" + } + } +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/gn_plan_comptable.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/gn_plan_comptable.json new file mode 100644 index 00000000000..54742c1fbc6 --- /dev/null +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/gn_plan_comptable.json @@ -0,0 +1,1919 @@ +{ + "country_code": "gn", + "name": "Syscohada - Plan Comptable", + "tree": { + "1-Comptes de ressources durables": { + "10-Capital": { + "101-Capital social": { + "1011-Capital souscrit, non appel\u00e9": {}, + "1012-Capital souscrit, appel\u00e9, non vers\u00e9": {}, + "1013-Capital souscrit, appel\u00e9, vers\u00e9, non amorti": {}, + "1014-Capital souscrit, appel\u00e9, vers\u00e9, amorti": {}, + "1018-Capital souscrit soumis \u00e0 des conditions particuli\u00e8res": {} + }, + "102-Capital par dotation": { + "1021-Dotation initiale": {}, + "1022-Dotations compl\u00e9mentaires": {}, + "1028-Autres dotations": {} + }, + "103-Capital personnel": {}, + "104-Compte de l\u2019exploitant": { + "1041-Apports temporaires": {}, + "1042-Op\u00e9rations courantes": {}, + "1043-R\u00e9mun\u00e9rations, imp\u00f4ts et autres charges personnelles": {}, + "1047-Pr\u00e9l\u00e8vements d\u2019autoconsommation": {}, + "1048-Autres pr\u00e9l\u00e8vements": {} + }, + "105-Primes li\u00e9es au capital social": { + "1051-Primes d\u2019\u00e9mission": {}, + "1052-Primes d\u2019apport": {}, + "1053-Primes de fusion": {}, + "1054-Primes de conversion": {}, + "1058-Autres primes": {} + }, + "106-\u00c9carts de r\u00e9\u00e9valuation": { + "1061-\u00c9carts de r\u00e9\u00e9valuation l\u00e9gale": {}, + "1062-\u00c9carts de r\u00e9\u00e9valuation libre": {} + }, + "109-Apporteurs, capital souscrit, non appel\u00e9": {} + }, + "11-R\u00e9serves": { + "111-R\u00e9serve l\u00e9gale": {}, + "112-R\u00e9serves statutaires ou contractuelles": {}, + "113-R\u00e9serves r\u00e9glement\u00e9es": { + "1131-R\u00e9serves de plus-values nettes \u00e0 long terme": {}, + "1132-R\u00e9serves d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": {}, + "1133-R\u00e9serves cons\u00e9cutives \u00e0 l\u2019octroi de subventions d\u2019investissement": {}, + "1134-R\u00e9serves des valeurs mobili\u00e8res donnant acc\u00e8s au capital": {}, + "1135-Autres r\u00e9serves r\u00e9glement\u00e9es": {} + }, + "118-Autres r\u00e9serves": { + "1181-R\u00e9serves facultatives": {}, + "1188-R\u00e9serves diverses": {} + } + }, + "12-Report \u00e0 nouveau": { + "121-Report \u00e0 nouveau cr\u00e9diteur": {}, + "129-Report \u00e0 nouveau d\u00e9biteur": { + "1291-Perte nette \u00e0 reporter": {}, + "1292-Perte Amortissements r\u00e9put\u00e9s diff\u00e9r\u00e9s": {} + } + }, + "13-R\u00e9sultat net de l\u2019exercice": { + "130-R\u00e9sultat en instance d\u2019affectation": { + "1301-R\u00e9sultat en instance d\u2019affectation : b\u00e9n\u00e9fice": {}, + "1309-R\u00e9sultat en instance d\u2019affectation : perte": {} + }, + "131-R\u00e9sultat net : b\u00e9n\u00e9fice": {}, + "132-Marge commerciale (MC)": {}, + "133-Valeur ajout\u00e9e (VA)": {}, + "134-Exc\u00e9dent brut d\u2019exploitation (EBE)": {}, + "135-R\u00e9sultat d\u2019exploitation (RE)": {}, + "136-R\u00e9sultat financier (RF)": {}, + "137-R\u00e9sultat des activit\u00e9s ordinaires (RAO)": {}, + "138-R\u00e9sultat hors activit\u00e9s ordinaires (RHAO)": { + "1381-R\u00e9sultat de fusion": {}, + "1382-R\u00e9sultat d\u2019apport partiel d\u2019actif": {}, + "1383-R\u00e9sultat de scission": {}, + "1384-R\u00e9sultat de liquidation": {} + }, + "139-R\u00e9sultat net : perte": {} + }, + "14-Subventions d\u2019investissement": { + "141-Subventions d\u2019\u00e9quipement": { + "1411-\u00c9tat": {}, + "1412-R\u00e9gions": {}, + "1413-D\u00e9partements": {}, + "1414-Communes et collectivit\u00e9s publiques d\u00e9centralis\u00e9es": {}, + "1415-Entit\u00e9s publiques ou mixtes": {}, + "1416-Entit\u00e9s et organismes priv\u00e9s": {}, + "1417-Organismes internationaux": {}, + "1418-Autres": {} + }, + "148-Autres subventions d\u2019investissement": {} + }, + "15-Provisions r\u00e9glement\u00e9es et fonds assimil\u00e9s": { + "151-Amortissements d\u00e9rogatoires": {}, + "152-Plus-values de cession \u00e0 r\u00e9investir": {}, + "153-Fonds r\u00e9glement\u00e9s": { + "1531-Fonds National": {}, + "1532-Pr\u00e9l\u00e8vement pour le Budget": {} + }, + "154-Provisions sp\u00e9ciales de r\u00e9\u00e9valuation": {}, + "155-Provisions r\u00e9glement\u00e9es relatives aux immobilisations": { + "1551-Reconstitution des gisements miniers et p\u00e9troliers": {} + }, + "156-Provisions r\u00e9glement\u00e9es relatives aux stocks": { + "1561-Hausse de prix": {}, + "1562-Fluctuation des cours": {} + }, + "157-Provisions pour investissement": {}, + "158-Autres provisions et fonds r\u00e9glement\u00e9s": {} + }, + "16-Emprunts et dettes assimil\u00e9es": { + "161-Emprunts obligataires": { + "1611-Emprunts obligataires ordinaires": {}, + "1612-Emprunts obligataires convertibles en actions": {}, + "1613-Emprunts obligataires remboursables en actions": {}, + "1618-Autres emprunts obligataires": {} + }, + "162-Emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": {}, + "163-Avances re\u00e7ues de l\u2019\u00c9tat": {}, + "164-Avances re\u00e7ues et comptes courants bloqu\u00e9s": {}, + "165-D\u00e9p\u00f4ts et cautionnements re\u00e7us": { + "1651-D\u00e9p\u00f4ts": {}, + "1652-Cautionnements": {} + }, + "166-Int\u00e9r\u00eats courus": { + "1661-Sur emprunts obligataires": {}, + "1662-Sur emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": {}, + "1663-Sur avances re\u00e7ues de l\u2019\u00c9tat": {}, + "1664-Sur avances re\u00e7ues et comptes courants bloqu\u00e9s": {}, + "1665-Sur d\u00e9p\u00f4ts et cautionnements re\u00e7us": {}, + "1667-Sur avances assorties de conditions particuli\u00e8res": {}, + "1668-Sur autres emprunts et dettes": {} + }, + "167-Avances assorties de conditions particuli\u00e8res": { + "1671-Avances bloqu\u00e9es pour augmentation du capital": {}, + "1672-Avances conditionn\u00e9es par l\u2019\u00c9tat": {}, + "1673-Avances conditionn\u00e9es par les autres organismes africains": {}, + "1674-Avances conditionn\u00e9es par les organismes internationaux": {} + }, + "168-Autres emprunts et dettes": { + "1681-Rentes viag\u00e8res capitalis\u00e9es": {}, + "1682-Billets de fonds": {}, + "1683-Dettes cons\u00e9cutives \u00e0 des titres emprunt\u00e9s": {}, + "1684-Emprunts participatifs": {}, + "1685-Participation des travailleurs aux b\u00e9n\u00e9fices": {}, + "1686-Emprunts et dettes contract\u00e9s aupr\u00e8s des autres tiers": {} + } + }, + "17-Dettes de location acquisition": { + "172-Dettes de location acquisition / cr\u00e9dit bail immobilier": {}, + "173-Dettes de location acquisition / cr\u00e9dit bail mobilier": {}, + "174-Dettes de location acquisition / location de vente": {}, + "176-Int\u00e9r\u00eats courus": { + "1762-Sur dettes de location acquisition / cr\u00e9dit-bail immobilier": {}, + "1763-Sur dettes de location acquisition / cr\u00e9dit-bail mobilier": {}, + "1764-Sur dettes de location acquisition / location-vente": {}, + "1768-Sur autres dettes de location acquisition": {} + }, + "178-Autres dettes de location acquisition": {} + }, + "18-Dettes li\u00e9es \u00e0 des participations et comptes de liaison des \u00e9tablissements et soci\u00e9t\u00e9s en participation": { + "181-Dettes li\u00e9es \u00e0 des participations": { + "1811-Dettes li\u00e9es \u00e0 des participations (groupe)": {}, + "1812-Dettes li\u00e9es \u00e0 des participations (hors groupe)": {} + }, + "182-Dettes li\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": {}, + "183-Int\u00e9r\u00eats courus sur dettes li\u00e9es \u00e0 des participations": {}, + "184-Comptes permanents bloqu\u00e9s des \u00e9tablissements et succursales": {}, + "185-Comptes permanents non bloqu\u00e9s des \u00e9tablissements et succursales": {}, + "186-Comptes de liaison charges": {}, + "187-Comptes de liaison produits": {}, + "188-Comptes de liaison des soci\u00e9t\u00e9s en participation": {} + }, + "19-Provisions pour risques et charges": { + "191-Provisions pour litiges": {}, + "192-Provisions pour garanties donn\u00e9es aux clients": {}, + "193-Provisions pour pertes sur march\u00e9s \u00e0 ach\u00e8vement futur": {}, + "194-Provisions pour pertes de change": {}, + "195-Provisions pour imp\u00f4ts": {}, + "196-Provisions pour pensions et obligations similaires": { + "1961-Provisions pour pensions et obligations similaires engagement de retraite": {}, + "1962-Actif du r\u00e9gime de retraite": {} + }, + "197-Provisions pour restructuration": {}, + "198-Autres provisions pour risques et charges": { + "1981-Provisions pour amendes et p\u00e9nalit\u00e9s": {}, + "1983-Provisions pour propre assureur": {}, + "1984-Provisions pour d\u00e9mant\u00e8lement et remise en \u00e9tat": {}, + "1985-Provisions pour droits \u00e0 r\u00e9duction ou avantage en nature (ch\u00e8ques cadeau, cartes de fid\u00e9lit\u00e9...)": {}, + "1988-Provisions pour divers risques et charges": {} + } + }, + "root_type": "Equity" + }, + "2-Comptes d\u2019actif immobilis\u00e9": { + "21-Immobilisations incorporelles": { + "account_type": "Fixed Asset", + "211-Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset" + }, + "212-Brevets, licences, concessions et droits similaires": { + "account_type": "Fixed Asset", + "2121-Brevets": { + "account_type": "Fixed Asset" + }, + "2122-Licences": { + "account_type": "Fixed Asset" + }, + "2123-Concessions de service public": { + "account_type": "Fixed Asset" + }, + "2128-Autres concessions et droits similaires": { + "account_type": "Fixed Asset" + } + }, + "213-Logiciels et sites internet": { + "account_type": "Fixed Asset", + "2131-Logiciels": { + "account_type": "Fixed Asset" + }, + "2132-Sites internet": { + "account_type": "Fixed Asset" + } + }, + "214-Marques": { + "account_type": "Fixed Asset" + }, + "215-Fonds commercial": { + "account_type": "Fixed Asset" + }, + "216-Droit au bail": { + "account_type": "Fixed Asset" + }, + "217-Investissements de cr\u00e9ation": { + "account_type": "Fixed Asset" + }, + "218-Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset", + "2181-Frais de prospection et d\u2019\u00e9valuation de ressources min\u00e9rales": { + "account_type": "Fixed Asset" + }, + "2182-Co\u00fbts d\u2019obtention du contrat": { + "account_type": "Fixed Asset" + }, + "2183-Fichiers clients, notices, titres de journaux et magazines": { + "account_type": "Fixed Asset" + }, + "2184-Co\u00fbts des franchises": { + "account_type": "Fixed Asset" + }, + "2188-Divers droits et valeurs incorporelles": { + "account_type": "Fixed Asset" + } + }, + "219-Immobilisations incorporelles en cours": { + "account_type": "Fixed Asset", + "2191-Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset" + }, + "2193-Logiciels et internet": { + "account_type": "Fixed Asset" + }, + "2198-Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset" + } + } + }, + "22-Terrains": { + "account_type": "Fixed Asset", + "221-Terrains agricoles et forestiers": { + "account_type": "Fixed Asset", + "2211-Terrains d\u2019exploitation agricole": { + "account_type": "Fixed Asset" + }, + "2212-Terrains d\u2019exploitation foresti\u00e8re": { + "account_type": "Fixed Asset" + }, + "2218-Autres terrains": { + "account_type": "Fixed Asset" + } + }, + "222-Terrains nus": { + "account_type": "Fixed Asset", + "2221-Terrains \u00e0 b\u00e2tir": { + "account_type": "Fixed Asset" + }, + "2228-Autres terrains nus": { + "account_type": "Fixed Asset" + } + }, + "223-Terrains b\u00e2tis": { + "account_type": "Fixed Asset", + "2231-Pour b\u00e2timents industriels et agricoles": { + "account_type": "Fixed Asset" + }, + "2232-Pour b\u00e2timents administratifs et commerciaux": { + "account_type": "Fixed Asset" + }, + "2234-Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations professionnelles": { + "account_type": "Fixed Asset" + }, + "2235-Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations non professionnelles": { + "account_type": "Fixed Asset" + }, + "2238-Autres terrains b\u00e2tis": { + "account_type": "Fixed Asset" + } + }, + "224-Travaux de mise en valeur des terrains": { + "account_type": "Fixed Asset", + "2241-Plantation d\u2019arbres et d\u2019arbustes": { + "account_type": "Fixed Asset" + }, + "2245-Am\u00e9liorations du fonds": { + "account_type": "Fixed Asset" + }, + "2248-Autres travaux": { + "account_type": "Fixed Asset" + } + }, + "225-Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset", + "2251-Carri\u00e8res": { + "account_type": "Fixed Asset" + } + }, + "226-Terrains am\u00e9nag\u00e9s": { + "account_type": "Fixed Asset", + "2261-Parkings": { + "account_type": "Fixed Asset" + } + }, + "227-Terrains mis en concession": { + "account_type": "Fixed Asset" + }, + "228-Autres terrains": { + "account_type": "Fixed Asset", + "2281-Terrains immeubles de placement": { + "account_type": "Fixed Asset" + }, + "2285-Terrains des logements affect\u00e9s au personnel": { + "account_type": "Fixed Asset" + }, + "2286-Terrains de location acquisition": { + "account_type": "Fixed Asset" + }, + "2288-Divers terrains": { + "account_type": "Fixed Asset" + } + }, + "229-Am\u00e9nagements de terrains en cours": { + "account_type": "Fixed Asset", + "2291-Terrains agricoles et forestiers": { + "account_type": "Fixed Asset" + }, + "2292-Terrains nus": { + "account_type": "Fixed Asset" + }, + "2295-Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset" + }, + "2298-Autres terrains": { + "account_type": "Fixed Asset" + } + } + }, + "23-B\u00e2timents, installations techniques et agencements": { + "231-B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "2311-B\u00e2timents industriels": {}, + "2312-B\u00e2timents agricoles": {}, + "2313-B\u00e2timents administratifs et commerciaux": {}, + "2314-B\u00e2timents affect\u00e9s au logement du personnel": {}, + "2315-B\u00e2timents immeubles de placement": {}, + "2316-B\u00e2timents de location acquisition": {} + }, + "232-B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "2321-B\u00e2timents industriels": {}, + "2322-B\u00e2timents agricoles": {}, + "2323-B\u00e2timents administratifs et commerciaux": {}, + "2324-B\u00e2timents affect\u00e9s au logement du personnel": {}, + "2325-B\u00e2timents immeubles de placement": {}, + "2326-B\u00e2timents de location acquisition": {} + }, + "233-Ouvrages d\u2019infrastructure": { + "2331-Voies de terre": {}, + "2332-Voies de fer": {}, + "2333-Voies d\u2019eau": {}, + "2334-Barrages, Digues": {}, + "2335-Pistes d\u2019a\u00e9rodrome": {}, + "2338-Autres ouvrages d\u2019infrastructures": {} + }, + "234-Am\u00e9nagements, agencements et installations techniques": { + "2341-Installations complexes sp\u00e9cialis\u00e9es sur sol propre": {}, + "2342-Installations complexes sp\u00e9cialis\u00e9es sur sol d\u2019autrui": {}, + "2343-Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol propre": {}, + "2344-Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol d\u2019autrui": {}, + "2345-Am\u00e9nagements et agencements des b\u00e2timents": {} + }, + "235-Am\u00e9nagements de bureaux": { + "2351-Installations g\u00e9n\u00e9rales": {}, + "2358-Autres am\u00e9nagements de bureaux": {} + }, + "237-B\u00e2timents industriels, agricoles et commerciaux mis en concession": {}, + "238-Autres installations et agencements": {}, + "239-B\u00e2timents am\u00e9nagements, agencements et installations en cours": { + "2391-B\u00e2timents en cours": {}, + "2392-Installations en cours": {}, + "2393-Ouvrages d\u2019infrastructure en cours": {}, + "2394-Am\u00e9nagements et agencements et installations techniques en cours": {}, + "2395-Am\u00e9nagements de bureaux en cours": {}, + "2398-Autres installations et agencements en cours": {} + } + }, + "24-Mat\u00e9riel, mobilier et actifs biologiques": { + "241-Mat\u00e9riel et outillage industriel et commercial": { + "2411-Mat\u00e9riel industriel": {}, + "2412-Outillage industriel": {}, + "2413-Mat\u00e9riel commercial": {}, + "2414-Outillage commercial": {}, + "2416-Mat\u00e9riel & outillage industriel et commercial de location-acquisition": {} + }, + "242-Mat\u00e9riel et outillage agricole": { + "2421-Mat\u00e9riel agricole": {}, + "2422-Outillage agricole": {}, + "2426-Mat\u00e9riel & outillage agricole de location-acquisition": {} + }, + "243-Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "244-Mat\u00e9riel et mobilier": { + "2441-Mat\u00e9riel de bureau": {}, + "2442-Mat\u00e9riel informatique": {}, + "2443-Mat\u00e9riel bureautique": {}, + "2444-Mobilier de bureau": {}, + "2445-Mat\u00e9riel et mobilier immeubles de placement": {}, + "2446-Mat\u00e9riel et mobilier de location acquisition": {}, + "2447-Mat\u00e9riel et mobilier des logements du personnel": {} + }, + "245-Mat\u00e9riel de transport": { + "2451-Mat\u00e9riel automobile": {}, + "2452-Mat\u00e9riel ferroviaire": {}, + "2453-Mat\u00e9riel fluvial, lagunaire": {}, + "2454-Mat\u00e9riel naval": {}, + "2455-Mat\u00e9riel a\u00e9rien": {}, + "2456-Mat\u00e9riel de transport de location-acquisition": {}, + "2457-Mat\u00e9riel hippomobile": {}, + "2458-Autres mat\u00e9riels de transport": {} + }, + "246-Actifs biologiques": { + "2461-Cheptel, animaux de trait": {}, + "2462-Cheptel, animaux reproducteurs": {}, + "2463-Animaux de garde": {}, + "2465-Plantations agricoles": {}, + "2468-Autres actifs biologiques": {} + }, + "247-Agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "2471-Agencements et am\u00e9nagements du mat\u00e9riel": {}, + "2472-Agencements et am\u00e9nagements des actifs biologiques": {}, + "2478-Autres agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": {} + }, + "248-Autres mat\u00e9riels et mobiliers": { + "2481-Collections et \u0153uvres d\u2019art": {}, + "2488-Divers mat\u00e9riels mobiliers": {} + }, + "249-Mat\u00e9riels et actifs biologiques en cours": { + "2491-Mat\u00e9riel et outillage industriel et commercial": {}, + "2492-Mat\u00e9riel et outillage agricole": {}, + "2493-Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "2494-Mat\u00e9riel et mobilier de bureau": {}, + "2495-Mat\u00e9riel de transport": {}, + "2496-Actifs biologiques": {}, + "2497-Agencements am\u00e9nagements du mat\u00e9riel et actifs biologiques": {}, + "2498-Autres mat\u00e9riels et actifs biologiques en cours": {} + } + }, + "25-Avances et acomptes vers\u00e9s sur immobilisations": { + "251-Avances et acomptes vers\u00e9s sur immobilisations incorporelles": {}, + "252-Avances et acomptes vers\u00e9s sur immobilisations corporelles": {} + }, + "26-Titres de participation": { + "261-Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": {}, + "262-Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le conjoint": {}, + "263-Titres de participation dans des soci\u00e9t\u00e9s conf\u00e9rant une influence notable": {}, + "265-Participations dans des organismes professionnels": {}, + "266-Parts dans des groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": {}, + "268-Autres titres de participation": {} + }, + "27-Autres immobilisations financi\u00e8res": { + "271-Pr\u00eats et cr\u00e9ances": { + "2711-Pr\u00eats participatifs": {}, + "2712-Pr\u00eats aux associ\u00e9s": {}, + "2713-Billets de fonds": {}, + "2714-Titres pr\u00eat\u00e9s": {}, + "2718-Autres pr\u00eats et cr\u00e9ances": {} + }, + "272-Pr\u00eats au personnel": { + "2721-Pr\u00eats immobiliers": {}, + "2722-Pr\u00eats mobiliers et d\u2019installation": {}, + "2728-Autres pr\u00eats au personnel": {} + }, + "273-Cr\u00e9ances sur l\u2019\u00c9tat": { + "2731-Retenues de garantie": {}, + "2733-Fonds r\u00e9glement\u00e9": {}, + "2734-Cr\u00e9ances sur le conc\u00e9dant": {}, + "2738-Autres cr\u00e9ances sur l\u2019\u00c9tat": {} + }, + "274-Titres immobilis\u00e9s": { + "2741-Titres immobilis\u00e9s de l\u2019activit\u00e9 de portefeuille (TIAP)": {}, + "2742-Titres participatifs": {}, + "2743-Certificats d\u2019investissement": {}, + "2744-Parts de fonds commun de placement (FCP)": {}, + "2745-Obligations": {}, + "2746-Actions ou parts propres": {}, + "2748-Autres titres immobilis\u00e9s": {} + }, + "275-D\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "2751-D\u00e9p\u00f4ts pour loyers d\u2019avance": {}, + "2752-D\u00e9p\u00f4ts pour l\u2019\u00e9lectricit\u00e9": {}, + "2753-D\u00e9p\u00f4ts pour l\u2019eau": {}, + "2754-D\u00e9p\u00f4ts pour le gaz": {}, + "2755-D\u00e9p\u00f4ts pour le t\u00e9l\u00e9phone, le t\u00e9lex, la t\u00e9l\u00e9copie": {}, + "2756-Cautionnements sur march\u00e9s publics": {}, + "2757-Cautionnements sur autres op\u00e9rations": {}, + "2758-Autres d\u00e9p\u00f4ts et cautionnements": {} + }, + "276-Int\u00e9r\u00eats courus": { + "2761-Pr\u00eats et cr\u00e9ances non commerciales": {}, + "2762-Pr\u00eats au personnel": {}, + "2763-Cr\u00e9ances sur l\u2019\u00c9tat": {}, + "2764-Titres immobilis\u00e9s": {}, + "2765-D\u00e9p\u00f4ts et cautionnements vers\u00e9s": {}, + "2767-Cr\u00e9ances rattach\u00e9es \u00e0 des participations": {}, + "2768-Immobilisations financi\u00e8res diverses": {} + }, + "277-Cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": { + "2771-Cr\u00e9ances rattach\u00e9es \u00e0 des participations (groupe)": {}, + "2772-Cr\u00e9ances rattach\u00e9es \u00e0 des participations (hors groupe)": {}, + "2773-Cr\u00e9ances rattach\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": {}, + "2774-Avances \u00e0 des Groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": {} + }, + "278-Immobilisations financi\u00e8res diverses": { + "2781-Cr\u00e9ances diverses groupe": {}, + "2782-Cr\u00e9ances diverses hors groupe": {}, + "2784-Banques d\u00e9p\u00f4ts \u00e0 terme": {}, + "2785-Or et m\u00e9taux pr\u00e9cieux": {}, + "2788-Autres immobilisations financi\u00e8res": {} + } + }, + "28-Amortissements": { + "account_type": "Accumulated Depreciation", + "281-Amortissements des immobilisations corporelles": { + "account_type": "Accumulated Depreciation", + "2811-Amortissements des frais de d\u00e9veloppement": { + "account_type": "Accumulated Depreciation" + }, + "2812-Amortissements des brevets, licences, concessions et droits similaires": { + "account_type": "Accumulated Depreciation" + }, + "2813-Amortissements des logiciels et sites internet": { + "account_type": "Accumulated Depreciation" + }, + "2814-Amortissements des marques": { + "account_type": "Accumulated Depreciation" + }, + "2815-Amortissements du fonds commercial": { + "account_type": "Accumulated Depreciation" + }, + "2816-Amortissements du droit au bail": { + "account_type": "Accumulated Depreciation" + }, + "2817-Amortissements des investissements de cr\u00e9ation": { + "account_type": "Accumulated Depreciation" + }, + "2818-Amortissements des autres droits et valeurs incorporels": { + "account_type": "Accumulated Depreciation" + } + }, + "282-Amortissements des terrains": { + "2824-Amortissements des travaux de mise en valeur des terrains": {} + }, + "283-Amortissements des b\u00e2timents, installations techniques et agencements": { + "2831-Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": {}, + "2832-Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": {}, + "2833-Amortissements des ouvrages d\u2019infrastructure": {}, + "2834-Amortissements des am\u00e9nagements, agencements et installations techniques": {}, + "2835-Amortissements des am\u00e9nagements de bureaux": {}, + "2837-Amortissements des b\u00e2timents industriels, agricoles et commerciaux mis en concession": {}, + "2838-Amortissements des autres installations et agencements": {} + }, + "284-Amortissements du mat\u00e9riel": { + "2841-Amortissements du mat\u00e9riel et outillage industriel et commercial": {}, + "2842-Amortissements du mat\u00e9riel et outillage agricole": {}, + "2843-Amortissements du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "2844-Amortissements du mat\u00e9riel et mobilier": {}, + "2845-Amortissements du mat\u00e9riel de transport": {}, + "2846-Amortissements des actifs biologiques": {}, + "2847-Amortissements des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": {}, + "2848-Amortissements des autres mat\u00e9riels": {} + } + }, + "29-D\u00e9pr\u00e9ciations des immobilisations": { + "291-D\u00e9pr\u00e9ciations des immobilisations incorporelles": { + "2911-D\u00e9pr\u00e9ciations des frais de d\u00e9veloppement": {}, + "2912-D\u00e9pr\u00e9ciations des brevets, licences, concessions et droits similaires": {}, + "2913-D\u00e9pr\u00e9ciations des logiciels et sites internet": {}, + "2914-D\u00e9pr\u00e9ciations des marques": {}, + "2915-D\u00e9pr\u00e9ciations du fonds commercial": {}, + "2916-D\u00e9pr\u00e9ciations du droit au bail": {}, + "2917-D\u00e9pr\u00e9ciations des investissements de cr\u00e9ation": {}, + "2918-D\u00e9pr\u00e9ciations des autres droits et valeurs incorporels": {}, + "2919-D\u00e9pr\u00e9ciations des immobilisations incorporelles en cours": {} + }, + "292-D\u00e9pr\u00e9ciations des terrains": { + "2921-D\u00e9pr\u00e9ciations des terrains agricoles et forestiers": {}, + "2922-D\u00e9pr\u00e9ciations des terrains nus": {}, + "2923-D\u00e9pr\u00e9ciations des terrains b\u00e2tis": {}, + "2924-D\u00e9pr\u00e9ciations des travaux de mise en valeur des terrains": {}, + "2925-D\u00e9pr\u00e9ciations des terrains de gisement": {}, + "2926-D\u00e9pr\u00e9ciations des terrains am\u00e9nag\u00e9s": {}, + "2927-D\u00e9pr\u00e9ciations des terrains mis en concession": {}, + "2928-D\u00e9pr\u00e9ciations des autres terrains": {}, + "2929-D\u00e9pr\u00e9ciations des am\u00e9nagements de terrains en cours": {} + }, + "293-D\u00e9pr\u00e9ciations des b\u00e2timents, installations techniques et agencements": { + "2931-D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": {}, + "2932-D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": {}, + "2933-D\u00e9pr\u00e9ciations des ouvrages d\u2019infrastructures": {}, + "2934-D\u00e9pr\u00e9ciations des am\u00e9nagements, agencements et installations techniques": {}, + "2935-D\u00e9pr\u00e9ciations des am\u00e9nagements de bureaux": {}, + "2937-D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles et commerciaux mis en concession": {}, + "2938-D\u00e9pr\u00e9ciations des autres installations et agencements": {}, + "2939-D\u00e9pr\u00e9ciations des b\u00e2timents et installations en cours": {} + }, + "294-D\u00e9pr\u00e9ciations de mat\u00e9riel, du mobilier et de l\u2019actif biologique": { + "2941-D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage industriel et commercial": {}, + "2942-D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage agricole": {}, + "2943-D\u00e9pr\u00e9ciations du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "2944-D\u00e9pr\u00e9ciations du mat\u00e9riel et mobilier": {}, + "2945-D\u00e9pr\u00e9ciations du mat\u00e9riel de transport": {}, + "2946-D\u00e9pr\u00e9ciations des actifs biologiques": {}, + "2947-D\u00e9pr\u00e9ciations des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": {}, + "2948-D\u00e9pr\u00e9ciations des autres mat\u00e9riels": {}, + "2949-D\u00e9pr\u00e9ciations de mat\u00e9riel en cours": {} + }, + "295-D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations": { + "2951-D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations incorporelles": {}, + "2952-D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations corporelles": {} + }, + "296-D\u00e9pr\u00e9ciations des titres de participation": { + "2961-D\u00e9pr\u00e9ciations des titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": {}, + "2962-D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s sous contr\u00f4le conjoint": {}, + "2963-D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s conf\u00e9rant une influence notable": {}, + "2965-D\u00e9pr\u00e9ciations des participations dans des organismes professionnels": {}, + "2966-D\u00e9pr\u00e9ciations des parts dans des GIE": {}, + "2968-D\u00e9pr\u00e9ciations des autres titres de participation": {} + }, + "297-D\u00e9pr\u00e9ciations des autres immobilisations financi\u00e8res": { + "2971-D\u00e9pr\u00e9ciations des pr\u00eats et cr\u00e9ances": {}, + "2972-D\u00e9pr\u00e9ciations des pr\u00eats au personnel": {}, + "2973-D\u00e9pr\u00e9ciations des cr\u00e9ances sur l\u2019\u00c9tat": {}, + "2974-D\u00e9pr\u00e9ciations des titres immobilis\u00e9s": {}, + "2975-D\u00e9pr\u00e9ciations des d\u00e9p\u00f4ts et cautionnements vers\u00e9s": {}, + "2977-D\u00e9pr\u00e9ciations des cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": {}, + "2978-D\u00e9pr\u00e9ciations des cr\u00e9ances financi\u00e8res diverses": {} + } + }, + "root_type": "Asset" + }, + "3-Comptes de Stocks": { + "31-Marchandises": { + "311-Marchandises A": { + "3111-Marchandises A1": {}, + "3112-Marchandises A2": {} + }, + "312-Marchandises B": { + "3121-Marchandises B1": {}, + "3122-Marchandises B2": {} + }, + "313-Actifs biologiques": { + "3131-Animaux": {}, + "3132-V\u00e9g\u00e9taux": {} + }, + "318-Marchandises hors activit\u00e9s ordinaires (HAO)": {} + }, + "32-Mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "321-Mati\u00e8res A": {}, + "322-Mati\u00e8res B": {}, + "323-Fournitures (A, B)": {} + }, + "33-Autres approvisionnements": { + "331-Mati\u00e8res consommables": {}, + "332-Fournitures d\u2019atelier et d\u2019usine": {}, + "333-Fournitures de magasin": {}, + "334-Fournitures de bureau": {}, + "335-Emballages": { + "3351-Emballages perdus": {}, + "3352-Emballages r\u00e9cup\u00e9rables non identifiables": {}, + "3353-Emballages \u00e0 usage mixte": {}, + "3358-Autres emballages": {} + }, + "338-Autres mati\u00e8res": {} + }, + "34-Produits en cours": { + "341-Produits en cours": { + "3411-Produits en cours P1": {}, + "3412-Produits en cours P2": {} + }, + "342-Travaux en cours": { + "3421-Travaux en cours T1": {}, + "3422-Travaux en cours T2": {} + }, + "343-Produits interm\u00e9diaires en cours": { + "3431-Produits interm\u00e9diaires A": {}, + "3432-Produits interm\u00e9diaires B": {} + }, + "344-Produits r\u00e9siduels en cours": { + "3441-Produits r\u00e9siduels A": {}, + "3442-Produits r\u00e9siduels B": {} + }, + "345-Actifs biologiques en cours": { + "3451-Animaux": {}, + "3452-V\u00e9g\u00e9taux": {} + } + }, + "35-Services en cours": { + "351-\u00c9tudes en cours": { + "3511-\u00c9tudes en cours E1": {}, + "3512-\u00c9tudes en cours E2": {} + }, + "352-Prestations de services en cours": { + "3521-Prestations de services S1": {}, + "3522-Prestations de services S2": {} + } + }, + "36-Produits finis": { + "361-Produits finis A": {}, + "362-Produits finis B": {}, + "363-Actifs biologiques": { + "3631-Animaux": {}, + "3632-V\u00e9g\u00e9taux": {}, + "3638-Autres stocks (activit\u00e9s annexes)": {} + } + }, + "37-Produits interm\u00e9diaires et r\u00e9siduels": { + "371-Produits interm\u00e9diaires": { + "3711-Produits interm\u00e9diaires A": {}, + "3712-Produits interm\u00e9diaires B": {} + }, + "372-Produits r\u00e9siduels": { + "3721-D\u00e9chets": {}, + "3722-Rebuts": {}, + "3723-Mati\u00e8res de R\u00e9cup\u00e9ration": {} + }, + "373-Actifs biologiques": { + "3731-Animaux": {}, + "3732-V\u00e9g\u00e9taux": {}, + "3738-Autres stocks (activit\u00e9s annexes)": {} + } + }, + "38-Stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": { + "account_type": "Stock", + "381-Marchandises en cours de route": {}, + "382-Mati\u00e8res premi\u00e8res et fournitures li\u00e9es en cours de route": {}, + "383-Autres approvisionnements en cours de route": {}, + "386-Produits finis en cours de route": {}, + "387-Stock en consignation ou en d\u00e9p\u00f4t": { + "3871-Stock en consignation": {}, + "3872-Stock en d\u00e9p\u00f4t": {} + }, + "388-Stock provenant d\u2019immobilisations mises hors service ou au rebut": {} + }, + "39-D\u00e9pr\u00e9ciations des stocks et encours de production": { + "391-D\u00e9pr\u00e9ciations des stocks de marchandises": {}, + "392-D\u00e9pr\u00e9ciations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": {}, + "393-D\u00e9pr\u00e9ciations des stocks d\u2019autres approvisionnements": {}, + "394-D\u00e9pr\u00e9ciations des productions en cours": {}, + "395-D\u00e9pr\u00e9ciations des services en cours": {}, + "396-D\u00e9pr\u00e9ciations des stocks de produits finis": {}, + "397-D\u00e9pr\u00e9ciations des stocks de produits interm\u00e9diaires et r\u00e9siduels": {}, + "398-D\u00e9pr\u00e9ciations des stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": {} + }, + "root_type": "Asset" + }, + "4-Comptes de Tiers (ACTIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (ACTIF)": { + "409-Fournisseurs d\u00e9biteurs": { + "4091-Fournisseurs Avances et acomptes vers\u00e9s": {}, + "4092-Fournisseurs Groupe avances et acomptes vers\u00e9s": {}, + "4093-Fournisseurs Sous-traitants avances et acomptes vers\u00e9s": {}, + "4094-Fournisseurs Cr\u00e9ances pour emballages et mat\u00e9riels \u00e0 rendre": {}, + "4098-Fournisseurs Rabais, remises, ristournes et autres avoirs \u00e0 obtenir": {} + } + }, + "41-Clients et comptes rattach\u00e9s (ACTIF)": { + "411-Clients": { + "4111-Clients": { + "account_type": "Receivable" + }, + "4112-Clients groupe": { + "account_type": "Receivable" + }, + "4114-Clients, \u00c9tat et Collectivit\u00e9s publiques": { + "account_type": "Receivable" + }, + "4115-Clients, organismes internationaux": { + "account_type": "Receivable" + }, + "4116-Clients, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Receivable" + }, + "4117-Client, retenues de garantie": { + "account_type": "Receivable" + }, + "4118-Clients, d\u00e9gr\u00e8vement de taxes sur la valeur ajout\u00e9e (TVA)": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "412-Clients, effets \u00e0 recevoir en portefeuille": { + "4121-Clients, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "4122-Clients Groupe, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "4124-\u00c9tat et Collectivit\u00e9s publiques, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "4125-Organismes Internationaux, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "413-Clients, ch\u00e8ques, effets et autres valeurs impay\u00e9es": { + "4131-Clients, ch\u00e8ques impay\u00e9s": { + "account_type": "Receivable" + }, + "4132-Clients, effets impay\u00e9s": { + "account_type": "Receivable" + }, + "4133-Clients, cartes de cr\u00e9dit impay\u00e9es": { + "account_type": "Receivable" + }, + "4138-Clients, autres valeurs impay\u00e9es": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "414-Cr\u00e9ances sur cessions courantes d\u2019immobilisations": { + "4141-Cr\u00e9ances en compte, immobilisations incorporelles": { + "account_type": "Receivable" + }, + "4142-Cr\u00e9ances en compte, immobilisations corporelles": { + "account_type": "Receivable" + }, + "4146-Effets \u00e0 recevoir, immobilisations incorporelles": { + "account_type": "Receivable" + }, + "4147-Effets \u00e0 recevoir, immobilisations corporelles": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "415-Clients, effets escompt\u00e9s non \u00e9chus": { + "account_type": "Receivable" + }, + "416-Cr\u00e9ances clients litigieuses ou douteuses": { + "4161-Cr\u00e9ances litigieuses": { + "account_type": "Receivable" + }, + "4162-Cr\u00e9ances douteuses": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "418-Clients, produits \u00e0 recevoir": { + "4181-Clients, factures \u00e0 \u00e9tablir": { + "account_type": "Receivable" + }, + "4186-Clients, int\u00e9r\u00eats courus": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "42-Personnel (ACTIF)": { + "421-Personnel, avances et acomptes": { + "4211-Personnel, avances": {}, + "4212-Personnel, acomptes": {}, + "4213-Frais avanc\u00e9s et fournitures au personnel": {} + } + }, + "43-Organismes sociaux (ACTIF)": { + "431-S\u00e9curit\u00e9 sociale": { + "4311-Prestations familiales": {}, + "4312-Accidents de travail": {}, + "4313-Caisse de retraite obligatoire": {}, + "4314-Caisse de retraite facultative": {}, + "4318-Autres cotisations sociales": {} + }, + "432-Caisses de retraite compl\u00e9mentaire": {}, + "433-Autres organismes sociaux": { + "4331-Mutuelle": {}, + "4332-Assurances retraite": {}, + "4333-Assurances et organismes de sant\u00e9": {} + }, + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "4387-Produits \u00e0 recevoir": {} + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (ACTIF)": { + "443-\u00c9tat, TVA factur\u00e9e": { + "4431-TVA factur\u00e9e sur ventes": {}, + "4432-TVA factur\u00e9e sur prestations de services": {}, + "4433-TVA factur\u00e9e sur travaux": {}, + "4434-TVA factur\u00e9e sur production livr\u00e9e \u00e0 soi-m\u00eame": {}, + "4435-TVA sur factures \u00e0 \u00e9tablir": {} + }, + "445-\u00c9tat, TVA r\u00e9cup\u00e9rable": { + "4451-TVA r\u00e9cup\u00e9rable sur immobilisations": {}, + "4452-TVA r\u00e9cup\u00e9rable sur achats": {}, + "4453-TVA r\u00e9cup\u00e9rable sur transport": {}, + "4454-TVA r\u00e9cup\u00e9rable sur services ext\u00e9rieurs et autres charges": {}, + "4455-TVA r\u00e9cup\u00e9rable sur factures non parvenues": {}, + "4456-TVA transf\u00e9r\u00e9e par d\u2019autres entit\u00e9s": {} + }, + "448-\u00c9tat, charges \u00e0 payer et produits \u00e0 recevoir": { + "4486-Charges \u00e0 payer": {}, + "4487-Produits \u00e0 recevoir": {} + }, + "449-\u00c9tat, cr\u00e9ances et dettes diverses": { + "4491-\u00c9tat, obligations cautionn\u00e9es": {}, + "4492-\u00c9tat, avances et acomptes vers\u00e9s sur imp\u00f4ts": {}, + "4493-\u00c9tat, fonds de dotation \u00e0 recevoir": {}, + "4494-\u00c9tat, subventions investissement \u00e0 recevoir": {}, + "4495-\u00c9tat, subventions d\u2019exploitation \u00e0 recevoir": {}, + "4496-\u00c9tat, subventions d\u2019\u00e9quilibre \u00e0 recevoir": {}, + "4497-\u00c9tat, avances sur subventions": {}, + "4499-\u00c9tat, fonds r\u00e9glement\u00e9s provisionn\u00e9s": {} + } + }, + "45-Organismes internationaux (ACTIF)": { + "451-Op\u00e9rations avec les organismes africains": {}, + "452-Op\u00e9rations avec les autres organismes internationaux": {}, + "458-Organismes internationaux, fonds de dotation et subventions \u00e0 recevoir": { + "4581-Organismes internationaux, fonds de dotation \u00e0 recevoir": {}, + "4582-Organismes internationaux, subventions \u00e0 recevoir": {} + } + }, + "46-Apporteurs, associ\u00e9s et groupe (ACTIF)": { + "461-Apporteurs, op\u00e9rations sur le capital": { + "4613-Apporteurs, capital appel\u00e9, non vers\u00e9": {}, + "4614-Apporteurs, compte d\u2019apport, op\u00e9rations de restructuration (fusion...)": {}, + "4618-Apporteurs, titres \u00e0 \u00e9changer": {} + }, + "467-Apporteurs, restant d\u00fb sur capital appel\u00e9": {} + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (ACTIF)": { + "472-Cr\u00e9ances et dettes sur titres de placement": { + "4721-Cr\u00e9ances sur cessions de titres de placement": {}, + "4726-Versements restant \u00e0 effectuer sur titres de placement non lib\u00e9r\u00e9s": {} + }, + "473-Interm\u00e9diaires Op\u00e9rations faites pour compte de tiers": { + "4731-Mandants": {}, + "4732-Mandataires": {}, + "4733-Commettants": {}, + "4734-Commissionnaires": {}, + "4739-\u00c9tat, Collectivit\u00e9s publiques, fonds global d\u2019allocation": {} + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits": { + "4747-Compte de r\u00e9partition p\u00e9riodique des produits": {} + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA": { + "4751-Compte actif": { + "account_type": "Temporary" + } + }, + "476-Charges constat\u00e9es d\u2019avance": {}, + "478-\u00c9carts de conversion actif": { + "4781-Diminution des cr\u00e9ances d\u2019exploitation": {}, + "4782-Diminution des cr\u00e9ances financi\u00e8res": {}, + "4783-Augmentation des dettes d\u2019exploitation": {}, + "4784-Augmentation des dettes financi\u00e8res": {}, + "4786-Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": {}, + "4788-Diff\u00e9rences compens\u00e9es par couverture de change": {} + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (ACTIF)": { + "485-Cr\u00e9ances sur cessions d\u2019immobilisations": { + "4851-En compte, immobilisations incorporelles": {}, + "4852-En compte, immobilisations corporelles": {}, + "4853-Effets \u00e0 recevoir, immobilisations incorporelles": {}, + "4854-Effets \u00e0 recevoir, immobilisations corporelles": {}, + "4855-Effets escompt\u00e9s non \u00e9chus": {}, + "4857-Retenues de garantie": {}, + "4858-Factures \u00e0 \u00e9tablir": {} + }, + "488-Autres cr\u00e9ances hors activit\u00e9s ordinaires (HAO)": {} + }, + "49-D\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme (tiers) (ACTIF)": { + "491-D\u00e9pr\u00e9ciations des comptes clients": { + "4911-Cr\u00e9ances litigieuses": {}, + "4912-Cr\u00e9ances douteuses": {} + }, + "495-D\u00e9pr\u00e9ciations des comptes organismes internationaux": {}, + "496-D\u00e9pr\u00e9ciations des comptes apporteurs, associ\u00e9s et groupe": { + "4962-Associ\u00e9s, comptes courants": {}, + "4963-Associ\u00e9s, op\u00e9rations faites en commun": {}, + "4966-Groupe, comptes courants": {} + }, + "497-D\u00e9pr\u00e9ciations des comptes d\u00e9biteurs divers": {}, + "498-D\u00e9pr\u00e9ciations des comptes de cr\u00e9ances HAO": { + "4985-Cr\u00e9ances sur cessions d\u2019immobilisations": {}, + "4986-Cr\u00e9ances sur cessions de titres de placement": {}, + "4988-Autres cr\u00e9ances HAO": {} + }, + "499-Provisions pour risques \u00e0 court terme": { + "4991-Sur op\u00e9rations d\u2019exploitation": {}, + "4997-Sur op\u00e9rations financi\u00e8res": {}, + "4998-Sur op\u00e9rations HAO": {} + } + }, + "root_type": "Asset" + }, + "4-Comptes de Tiers (PASSIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (PASSIF)": { + "401-Fournisseurs, dettes en compte": { + "4011-Fournisseurs": { + "account_type": "Payable" + }, + "4012-Fournisseurs groupe": { + "account_type": "Payable" + }, + "4013-Fournisseurs sous-traitants": { + "account_type": "Payable" + }, + "4016-Fournisseurs, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Payable" + }, + "4017-Fournisseur, retenues de garantie": { + "account_type": "Payable" + }, + "account_type": "Payable" + }, + "402-Fournisseurs, effets \u00e0 payer": { + "4021-Fournisseurs Effets \u00e0 payer": { + "account_type": "Payable" + }, + "4022-Fournisseurs Groupe, effets \u00e0 payer": { + "account_type": "Payable" + }, + "4023-Fournisseurs Sous-traitants, effets \u00e0 payer": { + "account_type": "Payable" + }, + "account_type": "Payable" + }, + "404-Fournisseurs, acquisitions courantes d\u2019immobilisations": { + "4041-Fournisseurs Dettes en comptes, immobilisations incorporelles": { + "account_type": "Payable" + }, + "4042-Fournisseurs Dettes en comptes, immobilisations corporelles": { + "account_type": "Payable" + }, + "4046-Fournisseurs Effets \u00e0 payer, immobilisations incorporelles": { + "account_type": "Payable" + }, + "4047-Fournisseurs Effets \u00e0 payer, immobilisations corporelles": { + "account_type": "Payable" + }, + "account_type": "Payable" + }, + "408-Fournisseurs, factures non parvenues": { + "4081-Fournisseurs": { + "account_type": "Stock Received But Not Billed" + }, + "4082-Fournisseurs groupe": { + "account_type": "Stock Received But Not Billed" + }, + "4083-Fournisseurs sous-traitants": { + "account_type": "Stock Received But Not Billed" + }, + "4086-Fournisseurs, int\u00e9r\u00eats courus": { + "account_type": "Stock Received But Not Billed" + }, + "account_type": "Stock Received But Not Billed" + }, + "account_type": "Payable" + }, + "41-Clients et comptes rattach\u00e9s (PASSIF)": { + "419-Clients cr\u00e9diteurs": { + "4191-Clients, avances et acomptes re\u00e7us": {}, + "4192-Clients groupe, avances et acomptes re\u00e7us": {}, + "4194-Clients, dettes pour emballages et mat\u00e9riels consign\u00e9s": {}, + "4198-Clients, rabais, remises, ristournes et autres avoirs \u00e0 accorder": {} + } + }, + "42-Personnel (PASSIF)": { + "422-Personnel, r\u00e9mun\u00e9rations dues": {}, + "423-Personnel, oppositions, saisies-arr\u00eats": { + "4231-Personnel, oppositions": {}, + "4232-Personnel, saisies-arr\u00eats": {}, + "4233-Personnel, avis \u00e0 tiers d\u00e9tenteur": {} + }, + "424-Personnel, \u0153uvres sociales internes": { + "4241-Assistance m\u00e9dicale": {}, + "4242-Allocations familiales": {}, + "4245-Organismes sociaux rattach\u00e9s \u00e0 l\u2019entit\u00e9": {}, + "4248-Autres \u0153uvres sociales internes": {} + }, + "425-Repr\u00e9sentants du personnel": { + "4251-D\u00e9l\u00e9gu\u00e9s du personnel": {}, + "4252-Syndicats et Comit\u00e9s d\u2019entreprises, d\u2019\u00c9tablissement": {}, + "4258-Autres repr\u00e9sentants du personnel": {} + }, + "426-Personnel, participation aux b\u00e9n\u00e9fices et au capital": { + "4261-Participation aux b\u00e9n\u00e9fices": {}, + "4264-Participation au capital": {} + }, + "427-Personnel d\u00e9p\u00f4ts": {}, + "428-Personnel, charges \u00e0 payer et produits \u00e0 recevoir": { + "4281-Dettes provisionn\u00e9es pour cong\u00e9s \u00e0 payer": {}, + "4286-Autres charges \u00e0 payer": {}, + "4287-Produits \u00e0 recevoir": {} + } + }, + "43-Organismes sociaux (PASSIF)": { + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "4381-Charges sociales sur gratifications \u00e0 payer": {}, + "4382-Charges sociales sur cong\u00e9s \u00e0 payer": {}, + "4386-Autres charges \u00e0 payer": {} + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (PASSIF)": { + "441-\u00c9tat, imp\u00f4t sur les b\u00e9n\u00e9fices": {}, + "442-\u00c9tat, autres imp\u00f4ts et taxes": { + "4421-Imp\u00f4ts et taxes d\u2019\u00c9tat": {}, + "4422-Imp\u00f4ts et taxes pour les collectivit\u00e9s publiques": {}, + "4423-Imp\u00f4ts et taxes recouvrables sur des obligataires": {}, + "4424-Imp\u00f4ts et taxes recouvrables sur des associ\u00e9s": {}, + "4426-Droits de douane": {}, + "4428-Autres imp\u00f4ts et taxes": {} + }, + "444-\u00c9tat, TVA due ou cr\u00e9dit de TVA": { + "4441-\u00c9tat, TVA due": {}, + "4449-\u00c9tat, cr\u00e9dit de TVA \u00e0 reporter": {} + }, + "446-\u00c9tat, autres taxes sur le chiffre d\u2019affaires": {}, + "447-\u00c9tat, imp\u00f4ts retenus \u00e0 la source": { + "4471-Imp\u00f4t G\u00e9n\u00e9ral sur le revenu": {}, + "4472-Imp\u00f4ts sur salaires": {}, + "4473-Contribution nationale": {}, + "4474-Contribution nationale de solidarit\u00e9": {}, + "4478-Autres imp\u00f4ts et contributions": {} + } + }, + "46-Apporteurs, associ\u00e9s et groupe (PASSIF)": { + "461-Apporteurs, op\u00e9rations sur le capital (PASSIF)": { + "4611-Apporteurs, apports en nature": {}, + "4612-Apporteurs, apports en num\u00e9raire": {}, + "4615-Apporteurs, versements re\u00e7us sur augmentation de capital": {}, + "4616-Apporteurs, versements anticip\u00e9s": {}, + "4617-Apporteurs d\u00e9faillants": {}, + "4619-Apporteurs, capital \u00e0 rembourser": {} + }, + "462-Associ\u00e9s, comptes courants": { + "4621-Principal": {}, + "4626-Int\u00e9r\u00eats courus": {} + }, + "463-Associ\u00e9s, op\u00e9rations faites en commun et GIE": { + "4631-Op\u00e9rations courantes": {}, + "4636-Int\u00e9r\u00eats courus": {} + }, + "465-Associ\u00e9s, dividendes \u00e0 payer": {}, + "466-Groupe, comptes courants": {} + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (PASSIF)": { + "471-D\u00e9biteurs et cr\u00e9diteurs divers": { + "4711-D\u00e9biteurs divers": {}, + "4712-Cr\u00e9diteurs divers": {}, + "4713-Obligataires": {}, + "4715-R\u00e9mun\u00e9rations d\u2019administrateurs": {}, + "4716-Compte d\u2019affacturage": {}, + "4717-D\u00e9biteurs divers retenues de garantie": {}, + "4718-Apport, compte de fusion et op\u00e9rations assimil\u00e9es": {}, + "4719-Bons de souscription d\u2019actions et d\u2019obligations": {} + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits (PASSIF)": { + "4746-Compte de r\u00e9partition p\u00e9riodique des charges": {} + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA (PASSIF)": { + "4752-Compte passif": {} + }, + "477-Produits constat\u00e9s d\u2019avance": {}, + "479-\u00c9carts de conversion passif": { + "4791-Augmentation des cr\u00e9ances d\u2019exploitation": {}, + "4792-Augmentation des cr\u00e9ances financi\u00e8res": {}, + "4793-Diminution des dettes d\u2019exploitation": {}, + "4794-Diminution des dettes financi\u00e8res": {}, + "4797-Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": {}, + "4798-Diff\u00e9rences compens\u00e9es par couverture de change": {} + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (HAO) (PASSIF)": { + "481-Fournisseurs d\u2019investissements": { + "4811-Immobilisations incorporelles": {}, + "4812-Immobilisations corporelles": {}, + "4813-Versements restant \u00e0 effectuer sur titres de participation et titres immobilis\u00e9s non lib\u00e9r\u00e9s": {}, + "4816-R\u00e9serve de propri\u00e9t\u00e9": {}, + "4817-Retenues de garantie": {}, + "4818-Factures non parvenues": {} + }, + "482-Fournisseurs d\u2019investissements, effets \u00e0 payer": { + "4821-Immobilisations incorporelles": {}, + "4822-Immobilisations corporelles": {} + }, + "484-Autres dettes hors activit\u00e9s ordinaires (HAO)": { + "4887-Produits": {} + } + }, + "49-D\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme (tiers) (PASSIF)": { + "490-D\u00e9pr\u00e9ciations des comptes fournisseurs": {}, + "492-D\u00e9pr\u00e9ciations des comptes personnel": {}, + "493-D\u00e9pr\u00e9ciations des comptes organismes sociaux": {}, + "494-D\u00e9pr\u00e9ciations des comptes \u00c9tat et collectivit\u00e9s publiques": {}, + "495-D\u00e9pr\u00e9ciations des comptes organismes internationaux": {} + }, + "root_type": "Liability" + }, + "5-Comptes de tr\u00e9sorerie": { + "50-Titres de placement": { + "501-Titres du tr\u00e9sor et bons de caisse \u00e0 court terme": { + "5011-Titres du Tr\u00e9sor \u00e0 court terme": {}, + "5012-Titres d\u2019organismes financiers": {}, + "5013-Bons de caisse \u00e0 court terme": {}, + "5016-Frais d\u2019acquisition des titres de tr\u00e9sor et bons de caisse": {} + }, + "502-Actions": { + "5021-Actions ou parts propres": {}, + "5022-Actions cot\u00e9es": {}, + "5023-Actions non cot\u00e9es": {}, + "5024-Actions d\u00e9membr\u00e9es (certificats d\u2019investissement, droits de vote)": {}, + "5025-Autres actions": {}, + "5026-Frais d\u2019acquisition des actions": {} + }, + "503-Obligations": { + "5031-Obligations \u00e9mises par la soci\u00e9t\u00e9 et rachet\u00e9es par elle": {}, + "5032-Obligations cot\u00e9es": {}, + "5033-Obligations non cot\u00e9es": {}, + "5035-Autres obligations": {}, + "5036-Frais d\u2019acquisition des obligations": {} + }, + "504-Bons de souscription": { + "5042-Bons de souscription d\u2019actions": {}, + "5043-Bons de souscription d\u2019obligations": {} + }, + "505-Titres n\u00e9gociables hors r\u00e9gion": {}, + "506-Int\u00e9r\u00eats courus": { + "5061-Titres du Tr\u00e9sor et bons de caisse \u00e0 court terme": {}, + "5062-Actions": {}, + "5063-Obligations": {} + }, + "508-Autres titres de placement et cr\u00e9ances assimil\u00e9es": {} + }, + "51-Valeurs \u00e0 encaisser": { + "511-Effets \u00e0 encaisser": {}, + "512-Effets \u00e0 l\u2019encaissement": {}, + "513-Ch\u00e8ques \u00e0 encaisser": {}, + "514-Ch\u00e8ques \u00e0 l\u2019encaissement": {}, + "515-Cartes de cr\u00e9dit \u00e0 encaisser": {}, + "518-Autres valeurs \u00e0 l\u2019encaissement": { + "5181-Warrants": {}, + "5182-Billets de fonds": {}, + "5185-Ch\u00e8ques de voyage": {}, + "5186-Coupons \u00e9chus": {}, + "5187-Int\u00e9r\u00eats \u00e9chus des obligations": {} + } + }, + "52-Banques": { + "521-Banques locales": { + "5211-Banques en monnaie nationale": { + "account_type": "Bank" + }, + "5215-Banques en devises": { + "account_type": "Bank" + }, + "account_type": "Bank" + }, + "522-Banques autres \u00c9tats r\u00e9gion": {}, + "523-Banques autres \u00c9tats zone mon\u00e9taire": {}, + "524-Banques hors zone mon\u00e9taire": {}, + "525-Banques d\u00e9p\u00f4t \u00e0 terme": {}, + "526-Banques, int\u00e9r\u00eats courus": { + "5261-Banque, int\u00e9r\u00eats courus, charges \u00e0 payer": {}, + "5267-Banque, int\u00e9r\u00eats courus, produits \u00e0 recevoir": {} + } + }, + "53-\u00c9tablissements financiers et assimil\u00e9s": { + "531-Ch\u00e8ques postaux": {}, + "532-Tr\u00e9sor": {}, + "533-Soci\u00e9t\u00e9s de gestion et d\u2019interm\u00e9diation (SGI)": {}, + "536-\u00c9tablissements financiers, int\u00e9r\u00eats courus": {}, + "538-Autres organismes financiers": {} + }, + "54-Instruments de tr\u00e9sorerie": { + "541-Options de taux d\u2019int\u00e9r\u00eat": {}, + "542-Options de taux de change": {}, + "543-Options de taux boursiers": {}, + "544-Instruments de march\u00e9s \u00e0 terme": {}, + "545-Avoirs d\u2019or et autres m\u00e9taux pr\u00e9cieux": {} + }, + "55-Instruments de monnaie \u00e9lectronique": { + "551-Monnaie \u00e9lectronique carte carburant": {}, + "552-Monnaie \u00e9lectronique t\u00e9l\u00e9phone portable": {}, + "553-Monnaie \u00e9lectronique carte p\u00e9age": {}, + "554-Porte-monnaie \u00e9lectronique": {}, + "558-Autres instruments de monnaies \u00e9lectroniques": {} + }, + "56-Banques, cr\u00e9dits de tr\u00e9sorerie et d\u2019escompte": { + "561-Cr\u00e9dits de tr\u00e9sorerie": {}, + "564-Escompte de cr\u00e9dits de campagne": {}, + "565-Escompte de cr\u00e9dits ordinaires": {}, + "566-Banques, cr\u00e9dits de tr\u00e9sorerie, int\u00e9r\u00eats courus": {} + }, + "57-Caisse": { + "571-Caisse si\u00e8ge social": { + "5711-Caisse en monnaie nationale": {}, + "5712-Caisse en devises": {} + }, + "572-Caisse succursale A": { + "5721-En monnaie nationale": {}, + "5722-En devises": {} + }, + "573-Caisse succursale B": { + "5731-En monnaie nationale": {}, + "5732-En devises": {} + } + }, + "58-R\u00e9gies d\u2019avances, accr\u00e9ditifs et virements internes": { + "581-R\u00e9gies d\u2019avance": {}, + "582-Accr\u00e9ditifs": {}, + "585-Virements de fonds": {}, + "588-Autres virements internes": {} + }, + "59-D\u00e9pr\u00e9ciations et provisions pour risque \u00e0 court terme": { + "590-D\u00e9pr\u00e9ciations des titres de placement": {}, + "591-D\u00e9pr\u00e9ciations des titres et valeurs \u00e0 encaisser": {}, + "592-D\u00e9pr\u00e9ciations des comptes banques": {}, + "593-D\u00e9pr\u00e9ciations des comptes \u00e9tablissements financiers et assimil\u00e9s": {}, + "594-D\u00e9pr\u00e9ciations des comptes d\u2019instruments de tr\u00e9sorerie": {}, + "599-Provisions pour risque \u00e0 court terme \u00e0 caract\u00e8re financier": {} + }, + "root_type": "Asset" + }, + "6-Comptes de charges des activit\u00e9s ordinaires": { + "60-Achats et variations de stocks": { + "601-Achats de marchandises": { + "6011-Dans la R\u00e9gion": {}, + "6012-Hors R\u00e9gion": {}, + "6013-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "6014-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "6015-Frais sur achats": {}, + "6019-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "602-Achats de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "6021-Dans la R\u00e9gion": {}, + "6022-Hors R\u00e9gion": {}, + "6023-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "6024-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "6025-Frais sur achats": {}, + "6029-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "603-Variations des stocks de biens achet\u00e9s": { + "6031-Variations des stocks de marchandises": {}, + "6032-Variations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": {}, + "6033-Variations des stocks d\u2019autres approvisionnements": {} + }, + "604-Achats stock\u00e9s de mati\u00e8res et fournitures consommables": { + "6041-Mati\u00e8res consommables": {}, + "6042-Mati\u00e8res combustibles": {}, + "6043-Produits d\u2019entretien": {}, + "6044-Fournitures d\u2019atelier et d\u2019usine": {}, + "6045-Frais sur achat": {}, + "6046-Fournitures de magasin": {}, + "6047-Fournitures de bureau": {}, + "6049-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "605-Autres achats": { + "6051-Fournitures non stockables Eau": {}, + "6052-Fournitures non stockables \u00c9lectricit\u00e9": {}, + "6053-Fournitures non stockables Autres \u00e9nergies": {}, + "6054-Fournitures d\u2019entretien non stockables": {}, + "6055-Fournitures de bureau non stockables": {}, + "6056-Achats de petit mat\u00e9riel et outillage": {}, + "6057-Achats d\u2019\u00e9tudes et prestations de services": {}, + "6058-Achats de travaux, mat\u00e9riels et \u00e9quipements": {}, + "6059-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "608-Achats d\u2019emballages": { + "6081-Emballages perdus": {}, + "6082-Emballages r\u00e9cup\u00e9rables non identifiables": {}, + "6083-Emballages \u00e0 usage mixte": {}, + "6085-Frais sur achats": {}, + "6089-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + } + }, + "61-Transports": { + "612-Transports sur ventes": {}, + "613-Transports pour le compte de tiers": {}, + "614-Transports du personnel": {}, + "616-Transports de plis": {}, + "618-Autres frais de transport": { + "6181-Voyages et d\u00e9placements": {}, + "6182-Transports entre \u00e9tablissements ou chantiers": {}, + "6183-Transports administratifs": {} + } + }, + "62-Services ext\u00e9rieurs": { + "621-Sous-traitance g\u00e9n\u00e9rale": {}, + "622-Locations, charges locatives": { + "6221-Locations de terrains": {}, + "6222-Locations de b\u00e2timents": {}, + "6223-Locations de mat\u00e9riels et outillages": {}, + "6224-Malis sur emballages": {}, + "6225-Locations d\u2019emballages": {}, + "6226-Fermages et loyers du foncier": {}, + "6228-Locations et charges locatives diverses": {} + }, + "623-Redevances de location acquisition": { + "6232-Cr\u00e9dit-bail immobilier": {}, + "6233-Cr\u00e9dit-bail mobilier": {}, + "6234-Location-vente": {}, + "6238-Autres contrats de location acquisition": {} + }, + "624-Entretien, r\u00e9parations, remise en \u00e9tat et maintenance": { + "6241-Entretien et r\u00e9parations des biens immobiliers": {}, + "6242-Entretien et r\u00e9parations des biens mobiliers": {}, + "6243-Maintenance": {}, + "6244-Charges de d\u00e9mant\u00e8lement et remise en \u00e9tat": {}, + "6248-Autres entretiens et r\u00e9parations": {} + }, + "625-Primes d\u2019assurance": { + "6251-Assurances multirisques": {}, + "6252-Assurances mat\u00e9riel de transport": {}, + "6253-Assurances risques d\u2019exploitation": {}, + "6254-Assurances responsabilit\u00e9 du producteur": {}, + "6255-Assurances insolvabilit\u00e9 clients": {}, + "6257-Assurances transport sur ventes": {}, + "6258-Autres primes d\u2019assurances": {} + }, + "626-\u00c9tudes, recherches et documentation": { + "6261-\u00c9tudes et recherches": {}, + "6265-Documentation g\u00e9n\u00e9rale": {}, + "6266-Documentation technique": {} + }, + "627-Publicit\u00e9, publications, relations publiques": { + "6271-Annonces, insertions": {}, + "6272-Catalogues, imprim\u00e9s publicitaires": {}, + "6273-\u00c9chantillons": {}, + "6274-Foires et expositions": {}, + "6275-Publications": {}, + "6276-Cadeaux \u00e0 la client\u00e8le": {}, + "6277-Frais de colloques, s\u00e9minaires, conf\u00e9rences": {}, + "6278-Autres charges de publicit\u00e9 et relations publiques": {} + }, + "628-Frais de t\u00e9l\u00e9communications": { + "6281-Frais de t\u00e9l\u00e9phone": {}, + "6282-Frais de t\u00e9lex": {}, + "6283-Frais de t\u00e9l\u00e9copie": {}, + "6288-Autres frais de t\u00e9l\u00e9communications": {} + } + }, + "63-Autres services ext\u00e9rieurs": { + "631-Frais bancaires": { + "6311-Frais sur titres (vente, garde)": {}, + "6312-Frais sur effets": {}, + "6313-Location de coffres": {}, + "6314-Commissions d\u2019affacturage": {}, + "6315-Commissions sur cartes de cr\u00e9dit": {}, + "6316-Frais d\u2019\u00e9mission d\u2019emprunts": {}, + "6317-Frais sur instruments monnaie \u00e9lectronique": {}, + "6318-Autres frais bancaires": {} + }, + "632-R\u00e9mun\u00e9rations d\u2019interm\u00e9diaires et de conseils": { + "6322-Commissions et courtages sur ventes": {}, + "6324-Honoraires des professions r\u00e9glement\u00e9es": {}, + "6325-Frais d\u2019actes et de contentieux": {}, + "6326-R\u00e9mun\u00e9rations d\u2019affacturage": {}, + "6327-R\u00e9mun\u00e9rations des autres prestataires de services": {}, + "6328-Divers frais": {} + }, + "633-Frais de formation du personnel": {}, + "634-Redevances pour brevets, licences, logiciels, concessions et droits et valeurs similaires": { + "6342-Redevances pour brevets, licences": {}, + "6343-Redevances pour logiciels": {}, + "6344-Redevances pour marques": {}, + "6345-Redevances pour sites internet": {}, + "6346-Redevances pour concessions, droits et valeurs similaires": {} + }, + "635-Cotisations": { + "6351-Cotisations": {}, + "6358-Concours divers": {} + }, + "637-R\u00e9mun\u00e9rations de personnel ext\u00e9rieur \u00e0 l\u2019entit\u00e9": { + "6371-Personnel int\u00e9rimaire": {}, + "6372-Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": {} + }, + "638-Autres charges externes": { + "6381-Frais de recrutement du personnel": {}, + "6382-Frais de d\u00e9m\u00e9nagement": {}, + "6383-R\u00e9ceptions": {}, + "6384-Missions": {}, + "6385-Charges de copropri\u00e9t\u00e9": {} + } + }, + "64-Imp\u00f4ts et taxes": { + "641-Imp\u00f4ts et taxes directs": { + "6411-Imp\u00f4ts fonciers et taxes annexes": {}, + "6412-Patentes, licences et taxes annexes": {}, + "6413-Taxes sur appointements et salaires": {}, + "6414-Taxes d\u2019apprentissage": {}, + "6415-Formation professionnelle continue": {}, + "6418-Autres imp\u00f4ts et taxes directs": {} + }, + "645-Imp\u00f4ts et taxes indirects": {}, + "646-Droits d\u2019enregistrement": { + "6461-Droits de mutation": {}, + "6462-Droits de timbre": {}, + "6463-Taxes sur les v\u00e9hicules de soci\u00e9t\u00e9": {}, + "6464-Vignettes": {}, + "6468-Autres droits": {} + }, + "647-P\u00e9nalit\u00e9s, amendes fiscales": { + "6471-P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts directs": {}, + "6472-P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts indirects": {}, + "6473-P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts directs": {}, + "6474-P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts indirects": {}, + "6478-Autres p\u00e9nalit\u00e9s et amendes fiscales": {} + }, + "648-Autres imp\u00f4ts et taxes": {} + }, + "65-Autres charges": { + "651-Pertes sur cr\u00e9ances clients et autres d\u00e9biteurs": { + "6511-Clients": {}, + "6515-Autres d\u00e9biteurs": {} + }, + "652-Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "6521-Quote-part transf\u00e9r\u00e9e de b\u00e9n\u00e9fices (comptabilit\u00e9 du g\u00e9rant)": {}, + "6525-Pertes imput\u00e9es par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": {} + }, + "654-Valeurs comptables des cessions courantes d\u2019immobilisations": { + "6541-Immobilisations incorporelles": {}, + "6542-Immobilisations corporelles": {} + }, + "656-Perte de change sur cr\u00e9ances et dettes commerciale": {}, + "657-P\u00e9nalit\u00e9s et amendes p\u00e9nales": {}, + "658-Charges diverses": { + "6581-Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": {}, + "6582-Dons": {}, + "6583-M\u00e9c\u00e9nat": {}, + "6588-Autres charges diverses": {} + }, + "659-Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "6591-Sur risques \u00e0 court terme": {}, + "6593-Sur stocks": {}, + "6594-Sur cr\u00e9ances": {}, + "6598-Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme": {} + } + }, + "66-Charges de personnel": { + "661-R\u00e9mun\u00e9rations directes vers\u00e9es au personnel national": { + "6611-Appointements salaires et commissions": {}, + "6612-Primes et gratifications": {}, + "6613-Cong\u00e9s pay\u00e9s": {}, + "6614-Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": {}, + "6615-Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": {}, + "6616-Suppl\u00e9ment familial": {}, + "6617-Avantages en nature": {}, + "6618-Autres r\u00e9mun\u00e9rations directes": {} + }, + "662-R\u00e9mun\u00e9rations directes vers\u00e9es au personnel non national": { + "6621-Appointements salaires et commissions": {}, + "6622-Primes et gratifications": {}, + "6623-Cong\u00e9s pay\u00e9s": {}, + "6624-Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": {}, + "6625-Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": {}, + "6626-Suppl\u00e9ment familial": {}, + "6627-Avantages en nature": {}, + "6628-Autres r\u00e9mun\u00e9rations directes": {} + }, + "663-Indemnit\u00e9s forfaitaires vers\u00e9es au personnel": { + "6631-Indemnit\u00e9s de logement": {}, + "6632-Indemnit\u00e9s de repr\u00e9sentation": {}, + "6633-Indemnit\u00e9s d\u2019expatriation": {}, + "6634-Indemnit\u00e9s de transport": {}, + "6638-Autres indemnit\u00e9s et avantages divers": {} + }, + "664-Charges sociales": { + "6641-Charges sociales sur r\u00e9mun\u00e9ration du personnel national": {}, + "6642-Charges sociales sur r\u00e9mun\u00e9ration du personnel non national": {} + }, + "666-R\u00e9mun\u00e9rations et charges sociales de l\u2019exploitant individuel": { + "6661-R\u00e9mun\u00e9ration du travail de l\u2019exploitant": {}, + "6662-Charges sociales": {} + }, + "667-R\u00e9mun\u00e9ration transf\u00e9r\u00e9e de personnel ext\u00e9rieur": { + "6671-Personnel int\u00e9rimaire": {}, + "6672-Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": {} + }, + "668-Autres charges sociales": { + "6681-Versements aux syndicats et comit\u00e9s d\u2019entreprise, d\u2019\u00e9tablissement": {}, + "6682-Versements aux comit\u00e9s d\u2019hygi\u00e8ne et de s\u00e9curit\u00e9": {}, + "6683-Versements et contributions aux autres \u0153uvres sociales": {}, + "6684-M\u00e9decine du travail et pharmacie": {}, + "6685-Assurances et organismes de sant\u00e9": {}, + "6686-Assurances retraite et fonds de pension": {}, + "6687-Majorations et p\u00e9nalit\u00e9s sociales": {}, + "6688-Charges sociales diverses": {} + } + }, + "67-Frais financiers et charges assimil\u00e9es": { + "671-Int\u00e9r\u00eats des emprunts": { + "6711-Emprunts obligataires": {}, + "6712-Emprunts aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": {}, + "6713-Dettes li\u00e9es \u00e0 des participations": {}, + "6714-Primes de remboursement des obligations": {} + }, + "672-Int\u00e9r\u00eats dans loyers de location acquisition": { + "6722-Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail immobilier": {}, + "6723-Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail mobilier": {}, + "6724-Int\u00e9r\u00eats dans loyers de location acquisition / location-vente": {}, + "6728-Int\u00e9r\u00eats dans loyers des autres locations acquisition": {} + }, + "673-Escomptes accord\u00e9s": {}, + "674-Autres int\u00e9r\u00eats": { + "6741-Avances re\u00e7ues et d\u00e9p\u00f4ts cr\u00e9diteurs": {}, + "6742-Comptes courants bloqu\u00e9s": {}, + "6743-Int\u00e9r\u00eats sur obligations cautionn\u00e9es": {}, + "6744-Int\u00e9r\u00eats sur dettes commerciales": {}, + "6745-Int\u00e9r\u00eats bancaires et sur op\u00e9rations de financement (escompte...)": {}, + "6748-Int\u00e9r\u00eats sur dettes diverses": {} + }, + "675-Escomptes des effets de commerce": {}, + "676-Pertes de change financi\u00e8res": {}, + "677-Pertes sur titres de placement": { + "6771-Pertes sur cessions de titres de placement": {}, + "6772-Mali provenant d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": {} + }, + "678-Pertes et charges sur risques financiers": { + "6781-Sur rentes viag\u00e8res": {}, + "6782-Sur op\u00e9rations financi\u00e8res": {}, + "6784-Sur instruments de tr\u00e9sorerie": {} + }, + "679-Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "6791-Sur risques financiers": {}, + "6795-Sur titres de placement": {}, + "6798-Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": {} + } + }, + "68-Dotations aux amortissements": { + "681-Dotations aux amortissements d\u2019exploitation": { + "6812-Dotations aux amortissements des immobilisations incorporelles": {}, + "6813-Dotations aux amortissements des immobilisations corporelles": {} + } + }, + "69-Dotations aux provisions et aux d\u00e9pr\u00e9ciations": { + "691-Dotations aux provisions et aux d\u00e9pr\u00e9ciations d\u2019exploitation": { + "6911-Dotations aux provisions pour risques et charges": {}, + "6913-Dotations aux d\u00e9pr\u00e9ciations des immobilisations incorporelles": {}, + "6914-Dotations aux d\u00e9pr\u00e9ciations des immobilisations corporelles": {} + }, + "697-Dotations aux provisions et aux d\u00e9pr\u00e9ciations financi\u00e8res": { + "6971-Dotations aux provisions pour risques et charges": {}, + "6972-Dotations aux d\u00e9pr\u00e9ciations des immobilisations financi\u00e8res": {} + } + }, + "root_type": "Expense" + }, + "7-Comptes de produits des activit\u00e9s ordinaires": { + "70-Ventes": { + "701-Ventes de marchandises": { + "7011-Dans la R\u00e9gion": {}, + "7012-Hors R\u00e9gion": {}, + "7013-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7014-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7015-Sur internet": {}, + "7019-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "702-Ventes de produits finis": { + "7021-Dans la R\u00e9gion": {}, + "7022-Hors R\u00e9gion": {}, + "7023-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7024-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7025-Sur internet": {}, + "7029-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "703-Ventes de produits interm\u00e9diaires": { + "7031-Dans la R\u00e9gion": {}, + "7032-Hors R\u00e9gion": {}, + "7033-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7034-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7035-Sur internet": {}, + "7039-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "704-Ventes de produits r\u00e9siduels": { + "7041-Dans la R\u00e9gion": {}, + "7042-Hors R\u00e9gion": {}, + "7043-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7044-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7045-Sur internet": {}, + "7049-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "705-Travaux factur\u00e9s": { + "7051-Dans la R\u00e9gion": {}, + "7052-Hors R\u00e9gion": {}, + "7053-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7054-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7055-Sur internet": {}, + "7059-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "706-Services vendus": { + "7061-Dans la R\u00e9gion": {}, + "7062-Hors R\u00e9gion": {}, + "7063-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7064-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7065-Sur internet": {}, + "7069-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "707-Produits accessoires": { + "7071-Ports, emballages perdus et autres frais factur\u00e9s": {}, + "7072-Commissions et courtages": {}, + "7073-Locations": {}, + "7074-Bonis sur reprises et cessions d\u2019emballages": {}, + "7075-Mise \u00e0 disposition de personnel": {}, + "7076-Redevances pour brevets, logiciels, marques et droits similaires": {}, + "7077-Services exploit\u00e9s dans l\u2019int\u00e9r\u00eat du personnel": {}, + "7078-Autres produits accessoires": {} + } + }, + "71-Subventions d\u2019exploitation": { + "711-Sur produits \u00e0 l\u2019exportation": {}, + "712-Sur produits \u00e0 l\u2019importation": {}, + "713-Sur produits de p\u00e9r\u00e9quation": {}, + "714-Indemnit\u00e9s et subventions d\u2019exploitation (entit\u00e9 agricole)": {}, + "718-Autres subventions d\u2019exploitation": { + "7181-Vers\u00e9es par l\u2019\u00c9tat et les collectivit\u00e9s publiques": {}, + "7182-Vers\u00e9es par les organismes internationaux": {}, + "7183-Vers\u00e9es par des tiers": {} + } + }, + "72-Production immobilis\u00e9e": { + "721-Immobilisations incorporelles": {}, + "722-Immobilisations corporelles": { + "7221-Immobilisations corporelles (hors actifs biologiques)": {}, + "7222-Immobilisations corporelles (actifs biologiques)": {} + }, + "724-Production auto-consomm\u00e9e": {}, + "726-Immobilisations financi\u00e8res": {} + }, + "73-Variations des stocks de biens et de services produits": { + "734-Variations des stocks de produits en cours": { + "7341-Produits en cours": {}, + "7342-Travaux en cours": {} + }, + "735-Variations des en-cours de services": { + "7351-\u00c9tudes en cours": {}, + "7352-Prestations de services en cours": {} + }, + "736-Variations des stocks de produits finis": {}, + "737-Variations des stocks de produits interm\u00e9diaires et r\u00e9siduels": { + "7371-Produits interm\u00e9diaires": {}, + "7372-Produits r\u00e9siduels": {} + } + }, + "75-Autres produits": { + "751-Profits sur cr\u00e9ances clients et autres d\u00e9biteurs": {}, + "752-Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "7521-Quote-part transf\u00e9r\u00e9e de pertes (comptabilit\u00e9 du g\u00e9rant)": {}, + "7525-B\u00e9n\u00e9fices attribu\u00e9s par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": {} + }, + "754-Produits des cessions courantes d\u2019immobilisations": { + "7541-Immobilisations incorporelles": {}, + "7542-Immobilisations corporelles": {} + }, + "756-Gains de change sur cr\u00e9ances et dettes commerciales": {}, + "758-Produits divers": { + "7581-Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": {}, + "7582-Indemnit\u00e9s d\u2019assurances re\u00e7ues": {}, + "7588-Autres produits divers": {} + }, + "759-Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "7591-Sur risques \u00e0 court terme": {}, + "7593-Sur stocks": {}, + "7594-Sur cr\u00e9ances": {}, + "7598-Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": {} + } + }, + "77-Revenus financiers et produits assimil\u00e9s": { + "771-Int\u00e9r\u00eats de pr\u00eats et cr\u00e9ances diverses": { + "7712-Int\u00e9r\u00eats de pr\u00eats": {}, + "7713-Int\u00e9r\u00eats sur cr\u00e9ances diverses": {} + }, + "772-Revenus de participations et autres titres immobilis\u00e9s": { + "7721-Revenus des titres de participation": {}, + "7722-Revenus autres titres immobilis\u00e9s": {} + }, + "773-Escomptes obtenus": {}, + "774-Revenus de placement": { + "7745-Revenus des obligations": {}, + "7746-Revenus des titres de placement": {} + }, + "775-Int\u00e9r\u00eats dans loyers de location acquisition": {}, + "776-Gains de change financiers": {}, + "777-Gains sur cessions de titres de placement": {}, + "778-Gains sur risques financiers": { + "7781-Sur rentes viag\u00e8res": {}, + "7782-Sur op\u00e9rations financi\u00e8res": {}, + "7784-Sur instruments de tr\u00e9sorerie": {} + }, + "779-Reprises de charges pour d\u00e9pr\u00e9ciations et provisions \u00e0 court terme financi\u00e8res": { + "7791-Sur risques financiers": {}, + "7795-Sur titres de placement": {}, + "7798-Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": {} + } + }, + "78-Transferts de charges": { + "781-Transferts de charges d\u2019exploitation": {}, + "787-Transferts de charges financi\u00e8res": {} + }, + "79-Reprises de provisions, de d\u00e9pr\u00e9ciations et autres": { + "791-Reprises de provisions et d\u00e9pr\u00e9ciations d\u2019exploitation": { + "7911-Pour risques et charges": {}, + "7913-Des immobilisations incorporelles": {}, + "7914-Des immobilisations corporelles": {} + }, + "797-Reprises de provisions et d\u00e9pr\u00e9ciations financi\u00e8res": { + "7971-Pour risques et charges": {}, + "7972-Des immobilisations financi\u00e8res": {} + }, + "798-Reprises d\u2019amortissements": {}, + "799-Reprises de subventions d\u2019investissement": {} + }, + "root_type": "Income" + }, + "8-Comptes des autres charges et des autres produits (CHARGES)": { + "81-Valeurs comptables des cessions d\u2019immobilisations": { + "811-Immobilisations incorporelles": {}, + "812-Immobilisations corporelles": {}, + "816-Immobilisations financi\u00e8res": {} + }, + "83-Charges hors activit\u00e9s ordinaires": { + "831-Charges HAO constat\u00e9es": {}, + "833-Charges li\u00e9es aux op\u00e9rations de restructuration": {}, + "834-Pertes sur cr\u00e9ances HAO": {}, + "835-Dons et lib\u00e9ralit\u00e9s accord\u00e9s": {}, + "836-Abandons de cr\u00e9ances consentis": {}, + "837-Charges li\u00e9es aux op\u00e9rations de liquidation": {}, + "839-Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": {} + }, + "85-Dotations hors activit\u00e9s ordinaires": { + "851-Dotations aux provisions r\u00e9glement\u00e9es": {}, + "852-Dotations aux amortissements HAO": {}, + "853-Dotations aux d\u00e9pr\u00e9ciations HAO": {}, + "854-Dotations aux provisions pour risques et charges HAO": {}, + "858-Autres dotations HAO": {} + }, + "87-Participation des travailleurs": { + "871-Participation l\u00e9gale aux b\u00e9n\u00e9fices": {}, + "874-Participation contractuelle aux b\u00e9n\u00e9fices": {}, + "878-Autres participations": {} + }, + "89-Imp\u00f4ts sur le r\u00e9sultat": { + "891-Imp\u00f4ts sur les b\u00e9n\u00e9fices de l\u2019exercice": { + "8911-Activit\u00e9s exerc\u00e9es dans l\u2019\u00c9tat": {}, + "8912-Activit\u00e9s exerc\u00e9es dans les autres \u00c9tats de la R\u00e9gion": {}, + "8913-Activit\u00e9s exerc\u00e9es hors R\u00e9gion": {} + }, + "892-Rappel d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": {}, + "895-Imp\u00f4t minimum forfaitaire IMF": {}, + "899-D\u00e9gr\u00e8vements et annulations d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": { + "8991-D\u00e9gr\u00e8vements": {}, + "8994-Annulations pour pertes r\u00e9troactives": {} + } + }, + "root_type": "Expense" + }, + "8-Comptes des autres charges et des autres produits (PRODUITS)": { + "82-Produits des cessions d\u2019immobilisations": { + "821-Immobilisations incorporelles": {}, + "822-Immobilisations corporelles": {}, + "826-Immobilisations financi\u00e8res": {} + }, + "84-Produits hors activit\u00e9s ordinaires": { + "841-Produits HAO constat\u00e9s": {}, + "843-Produits li\u00e9s aux op\u00e9rations de restructuration": {}, + "844-Indemnit\u00e9s et subventions HAO (entit\u00e9 agricole)": {}, + "845-Dons et lib\u00e9ralit\u00e9s obtenus": {}, + "846-Abandons de cr\u00e9ances obtenus": {}, + "847-Produits li\u00e9s aux op\u00e9rations de liquidation": {}, + "848-Transferts de charges HAO": {}, + "849-Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": {} + }, + "86-Reprises de charges, provisions et d\u00e9pr\u00e9ciations HAO": { + "861-Reprises de provisions r\u00e9glement\u00e9es": {}, + "862-Reprises d\u2019amortissements HAO": {}, + "863-Reprises de d\u00e9pr\u00e9ciations HAO": {}, + "864-Reprises de provisions pour risques et charges HAO": {}, + "868-Autres reprises HAO": {} + }, + "88-Subventions d\u2019\u00e9quilibre": { + "881-\u00c9tat": {}, + "884-Collectivit\u00e9s publiques": {}, + "886-Groupe": {}, + "888-Autres": {} + }, + "root_type": "Income" + } + } +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/gn_plan_comptable_avec_code.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/gn_plan_comptable_avec_code.json new file mode 100644 index 00000000000..948a4357932 --- /dev/null +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/gn_plan_comptable_avec_code.json @@ -0,0 +1,4208 @@ +{ + "country_code": "gn", + "name": "Syscohada - Plan Comptable avec code", + "tree": { + "Comptes de ressources durables": { + "Capital": { + "Capital social": { + "Capital souscrit, non appel\u00e9": { + "account_number": "1011" + }, + "Capital souscrit, appel\u00e9, non vers\u00e9": { + "account_number": "1012" + }, + "Capital souscrit, appel\u00e9, vers\u00e9, non amorti": { + "account_number": "1013" + }, + "Capital souscrit, appel\u00e9, vers\u00e9, amorti": { + "account_number": "1014" + }, + "Capital souscrit soumis \u00e0 des conditions particuli\u00e8res": { + "account_number": "1018" + }, + "account_number": "101" + }, + "Capital par dotation": { + "Dotation initiale": { + "account_number": "1021" + }, + "Dotations compl\u00e9mentaires": { + "account_number": "1022" + }, + "Autres dotations": { + "account_number": "1028" + }, + "account_number": "102" + }, + "Capital personnel": { + "account_number": "103" + }, + "Compte de l\u2019exploitant": { + "Apports temporaires": { + "account_number": "1041" + }, + "Op\u00e9rations courantes": { + "account_number": "1042" + }, + "R\u00e9mun\u00e9rations, imp\u00f4ts et autres charges personnelles": { + "account_number": "1043" + }, + "Pr\u00e9l\u00e8vements d\u2019autoconsommation": { + "account_number": "1047" + }, + "Autres pr\u00e9l\u00e8vements": { + "account_number": "1048" + }, + "account_number": "104" + }, + "Primes li\u00e9es au capital social": { + "Primes d\u2019\u00e9mission": { + "account_number": "1051" + }, + "Primes d\u2019apport": { + "account_number": "1052" + }, + "Primes de fusion": { + "account_number": "1053" + }, + "Primes de conversion": { + "account_number": "1054" + }, + "Autres primes": { + "account_number": "1058" + }, + "account_number": "105" + }, + "\u00c9carts de r\u00e9\u00e9valuation": { + "\u00c9carts de r\u00e9\u00e9valuation l\u00e9gale": { + "account_number": "1061" + }, + "\u00c9carts de r\u00e9\u00e9valuation libre": { + "account_number": "1062" + }, + "account_number": "106" + }, + "Apporteurs, capital souscrit, non appel\u00e9": { + "account_number": "109" + }, + "account_number": "10" + }, + "R\u00e9serves": { + "R\u00e9serve l\u00e9gale": { + "account_number": "111" + }, + "R\u00e9serves statutaires ou contractuelles": { + "account_number": "112" + }, + "R\u00e9serves r\u00e9glement\u00e9es": { + "R\u00e9serves de plus-values nettes \u00e0 long terme": { + "account_number": "1131" + }, + "R\u00e9serves d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": { + "account_number": "1132" + }, + "R\u00e9serves cons\u00e9cutives \u00e0 l\u2019octroi de subventions d\u2019investissement": { + "account_number": "1133" + }, + "R\u00e9serves des valeurs mobili\u00e8res donnant acc\u00e8s au capital": { + "account_number": "1134" + }, + "Autres r\u00e9serves r\u00e9glement\u00e9es": { + "account_number": "1135" + }, + "account_number": "113" + }, + "Autres r\u00e9serves": { + "R\u00e9serves facultatives": { + "account_number": "1181" + }, + "R\u00e9serves diverses": { + "account_number": "1188" + }, + "account_number": "118" + }, + "account_number": "11" + }, + "Report \u00e0 nouveau": { + "Report \u00e0 nouveau cr\u00e9diteur": { + "account_number": "121" + }, + "Report \u00e0 nouveau d\u00e9biteur": { + "Perte nette \u00e0 reporter": { + "account_number": "1291" + }, + "Perte Amortissements r\u00e9put\u00e9s diff\u00e9r\u00e9s": { + "account_number": "1292" + }, + "account_number": "129" + }, + "account_number": "12" + }, + "R\u00e9sultat net de l\u2019exercice": { + "R\u00e9sultat en instance d\u2019affectation": { + "R\u00e9sultat en instance d\u2019affectation : b\u00e9n\u00e9fice": { + "account_number": "1301" + }, + "R\u00e9sultat en instance d\u2019affectation : perte": { + "account_number": "1309" + }, + "account_number": "130" + }, + "R\u00e9sultat net : b\u00e9n\u00e9fice": { + "account_number": "131" + }, + "Marge commerciale (MC)": { + "account_number": "132" + }, + "Valeur ajout\u00e9e (VA)": { + "account_number": "133" + }, + "Exc\u00e9dent brut d\u2019exploitation (EBE)": { + "account_number": "134" + }, + "R\u00e9sultat d\u2019exploitation (RE)": { + "account_number": "135" + }, + "R\u00e9sultat financier (RF)": { + "account_number": "136" + }, + "R\u00e9sultat des activit\u00e9s ordinaires (RAO)": { + "account_number": "137" + }, + "R\u00e9sultat hors activit\u00e9s ordinaires (RHAO)": { + "R\u00e9sultat de fusion": { + "account_number": "1381" + }, + "R\u00e9sultat d\u2019apport partiel d\u2019actif": { + "account_number": "1382" + }, + "R\u00e9sultat de scission": { + "account_number": "1383" + }, + "R\u00e9sultat de liquidation": { + "account_number": "1384" + }, + "account_number": "138" + }, + "R\u00e9sultat net : perte": { + "account_number": "139" + }, + "account_number": "13" + }, + "Subventions d\u2019investissement": { + "Subventions d\u2019\u00e9quipement": { + "\u00c9tat": { + "account_number": "1411" + }, + "R\u00e9gions": { + "account_number": "1412" + }, + "D\u00e9partements": { + "account_number": "1413" + }, + "Communes et collectivit\u00e9s publiques d\u00e9centralis\u00e9es": { + "account_number": "1414" + }, + "Entit\u00e9s publiques ou mixtes": { + "account_number": "1415" + }, + "Entit\u00e9s et organismes priv\u00e9s": { + "account_number": "1416" + }, + "Organismes internationaux": { + "account_number": "1417" + }, + "Autres": { + "account_number": "1418" + }, + "account_number": "141" + }, + "Autres subventions d\u2019investissement": { + "account_number": "148" + }, + "account_number": "14" + }, + "Provisions r\u00e9glement\u00e9es et fonds assimil\u00e9s": { + "Amortissements d\u00e9rogatoires": { + "account_number": "151" + }, + "Plus-values de cession \u00e0 r\u00e9investir": { + "account_number": "152" + }, + "Fonds r\u00e9glement\u00e9s": { + "Fonds National": { + "account_number": "1531" + }, + "Pr\u00e9l\u00e8vement pour le Budget": { + "account_number": "1532" + }, + "account_number": "153" + }, + "Provisions sp\u00e9ciales de r\u00e9\u00e9valuation": { + "account_number": "154" + }, + "Provisions r\u00e9glement\u00e9es relatives aux immobilisations": { + "Reconstitution des gisements miniers et p\u00e9troliers": { + "account_number": "1551" + }, + "account_number": "155" + }, + "Provisions r\u00e9glement\u00e9es relatives aux stocks": { + "Hausse de prix": { + "account_number": "1561" + }, + "Fluctuation des cours": { + "account_number": "1562" + }, + "account_number": "156" + }, + "Provisions pour investissement": { + "account_number": "157" + }, + "Autres provisions et fonds r\u00e9glement\u00e9s": { + "account_number": "158" + }, + "account_number": "15" + }, + "Emprunts et dettes assimil\u00e9es": { + "Emprunts obligataires": { + "Emprunts obligataires ordinaires": { + "account_number": "1611" + }, + "Emprunts obligataires convertibles en actions": { + "account_number": "1612" + }, + "Emprunts obligataires remboursables en actions": { + "account_number": "1613" + }, + "Autres emprunts obligataires": { + "account_number": "1618" + }, + "account_number": "161" + }, + "Emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": { + "account_number": "162" + }, + "Avances re\u00e7ues de l\u2019\u00c9tat": { + "account_number": "163" + }, + "Avances re\u00e7ues et comptes courants bloqu\u00e9s": { + "account_number": "164" + }, + "D\u00e9p\u00f4ts et cautionnements re\u00e7us": { + "D\u00e9p\u00f4ts": { + "account_number": "1651" + }, + "Cautionnements": { + "account_number": "1652" + }, + "account_number": "165" + }, + "Int\u00e9r\u00eats courus": { + "Sur emprunts obligataires": { + "account_number": "1661" + }, + "Sur emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": { + "account_number": "1662" + }, + "Sur avances re\u00e7ues de l\u2019\u00c9tat": { + "account_number": "1663" + }, + "Sur avances re\u00e7ues et comptes courants bloqu\u00e9s": { + "account_number": "1664" + }, + "Sur d\u00e9p\u00f4ts et cautionnements re\u00e7us": { + "account_number": "1665" + }, + "Sur avances assorties de conditions particuli\u00e8res": { + "account_number": "1667" + }, + "Sur autres emprunts et dettes": { + "account_number": "1668" + }, + "account_number": "166" + }, + "Avances assorties de conditions particuli\u00e8res": { + "Avances bloqu\u00e9es pour augmentation du capital": { + "account_number": "1671" + }, + "Avances conditionn\u00e9es par l\u2019\u00c9tat": { + "account_number": "1672" + }, + "Avances conditionn\u00e9es par les autres organismes africains": { + "account_number": "1673" + }, + "Avances conditionn\u00e9es par les organismes internationaux": { + "account_number": "1674" + }, + "account_number": "167" + }, + "Autres emprunts et dettes": { + "Rentes viag\u00e8res capitalis\u00e9es": { + "account_number": "1681" + }, + "Billets de fonds": { + "account_number": "1682" + }, + "Dettes cons\u00e9cutives \u00e0 des titres emprunt\u00e9s": { + "account_number": "1683" + }, + "Emprunts participatifs": { + "account_number": "1684" + }, + "Participation des travailleurs aux b\u00e9n\u00e9fices": { + "account_number": "1685" + }, + "Emprunts et dettes contract\u00e9s aupr\u00e8s des autres tiers": { + "account_number": "1686" + }, + "account_number": "168" + }, + "account_number": "16" + }, + "Dettes de location acquisition": { + "Dettes de location acquisition / cr\u00e9dit bail immobilier": { + "account_number": "172" + }, + "Dettes de location acquisition / cr\u00e9dit bail mobilier": { + "account_number": "173" + }, + "Dettes de location acquisition / location de vente": { + "account_number": "174" + }, + "Int\u00e9r\u00eats courus": { + "Sur dettes de location acquisition / cr\u00e9dit-bail immobilier": { + "account_number": "1762" + }, + "Sur dettes de location acquisition / cr\u00e9dit-bail mobilier": { + "account_number": "1763" + }, + "Sur dettes de location acquisition / location-vente": { + "account_number": "1764" + }, + "Sur autres dettes de location acquisition": { + "account_number": "1768" + }, + "account_number": "176" + }, + "Autres dettes de location acquisition": { + "account_number": "178" + }, + "account_number": "17" + }, + "Dettes li\u00e9es \u00e0 des participations et comptes de liaison des \u00e9tablissements et soci\u00e9t\u00e9s en participation": { + "Dettes li\u00e9es \u00e0 des participations": { + "Dettes li\u00e9es \u00e0 des participations (groupe)": { + "account_number": "1811" + }, + "Dettes li\u00e9es \u00e0 des participations (hors groupe)": { + "account_number": "1812" + }, + "account_number": "181" + }, + "Dettes li\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": { + "account_number": "182" + }, + "Int\u00e9r\u00eats courus sur dettes li\u00e9es \u00e0 des participations": { + "account_number": "183" + }, + "Comptes permanents bloqu\u00e9s des \u00e9tablissements et succursales": { + "account_number": "184" + }, + "Comptes permanents non bloqu\u00e9s des \u00e9tablissements et succursales": { + "account_number": "185" + }, + "Comptes de liaison charges": { + "account_number": "186" + }, + "Comptes de liaison produits": { + "account_number": "187" + }, + "Comptes de liaison des soci\u00e9t\u00e9s en participation": { + "account_number": "188" + }, + "account_number": "18" + }, + "Provisions pour risques et charges": { + "Provisions pour litiges": { + "account_number": "191" + }, + "Provisions pour garanties donn\u00e9es aux clients": { + "account_number": "192" + }, + "Provisions pour pertes sur march\u00e9s \u00e0 ach\u00e8vement futur": { + "account_number": "193" + }, + "Provisions pour pertes de change": { + "account_number": "194" + }, + "Provisions pour imp\u00f4ts": { + "account_number": "195" + }, + "Provisions pour pensions et obligations similaires": { + "Provisions pour pensions et obligations similaires engagement de retraite": { + "account_number": "1961" + }, + "Actif du r\u00e9gime de retraite": { + "account_number": "1962" + }, + "account_number": "196" + }, + "Provisions pour restructuration": { + "account_number": "197" + }, + "Autres provisions pour risques et charges": { + "Provisions pour amendes et p\u00e9nalit\u00e9s": { + "account_number": "1981" + }, + "Provisions pour propre assureur": { + "account_number": "1983" + }, + "Provisions pour d\u00e9mant\u00e8lement et remise en \u00e9tat": { + "account_number": "1984" + }, + "Provisions pour droits \u00e0 r\u00e9duction ou avantage en nature (ch\u00e8ques cadeau, cartes de fid\u00e9lit\u00e9...)": { + "account_number": "1985" + }, + "Provisions pour divers risques et charges": { + "account_number": "1988" + }, + "account_number": "198" + }, + "account_number": "19" + }, + "root_type": "Equity", + "account_number": "1" + }, + "Comptes d\u2019actif immobilis\u00e9": { + "Immobilisations incorporelles": { + "account_type": "Fixed Asset", + "Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset", + "account_number": "211" + }, + "Brevets, licences, concessions et droits similaires": { + "account_type": "Fixed Asset", + "Brevets": { + "account_type": "Fixed Asset", + "account_number": "2121" + }, + "Licences": { + "account_type": "Fixed Asset", + "account_number": "2122" + }, + "Concessions de service public": { + "account_type": "Fixed Asset", + "account_number": "2123" + }, + "Autres concessions et droits similaires": { + "account_type": "Fixed Asset", + "account_number": "2128" + }, + "account_number": "212" + }, + "Logiciels et sites internet": { + "account_type": "Fixed Asset", + "Logiciels": { + "account_type": "Fixed Asset", + "account_number": "2131" + }, + "Sites internet": { + "account_type": "Fixed Asset", + "account_number": "2132" + }, + "account_number": "213" + }, + "Marques": { + "account_type": "Fixed Asset", + "account_number": "214" + }, + "Fonds commercial": { + "account_type": "Fixed Asset", + "account_number": "215" + }, + "Droit au bail": { + "account_type": "Fixed Asset", + "account_number": "216" + }, + "Investissements de cr\u00e9ation": { + "account_type": "Fixed Asset", + "account_number": "217" + }, + "Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset", + "Frais de prospection et d\u2019\u00e9valuation de ressources min\u00e9rales": { + "account_type": "Fixed Asset", + "account_number": "2181" + }, + "Co\u00fbts d\u2019obtention du contrat": { + "account_type": "Fixed Asset", + "account_number": "2182" + }, + "Fichiers clients, notices, titres de journaux et magazines": { + "account_type": "Fixed Asset", + "account_number": "2183" + }, + "Co\u00fbts des franchises": { + "account_type": "Fixed Asset", + "account_number": "2184" + }, + "Divers droits et valeurs incorporelles": { + "account_type": "Fixed Asset", + "account_number": "2188" + }, + "account_number": "218" + }, + "Immobilisations incorporelles en cours": { + "account_type": "Fixed Asset", + "Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset", + "account_number": "2191" + }, + "Logiciels et internet": { + "account_type": "Fixed Asset", + "account_number": "2193" + }, + "Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset", + "account_number": "2198" + }, + "account_number": "219" + }, + "account_number": "21" + }, + "Terrains": { + "account_type": "Fixed Asset", + "Terrains agricoles et forestiers": { + "account_type": "Fixed Asset", + "Terrains d\u2019exploitation agricole": { + "account_type": "Fixed Asset", + "account_number": "2211" + }, + "Terrains d\u2019exploitation foresti\u00e8re": { + "account_type": "Fixed Asset", + "account_number": "2212" + }, + "Autres terrains": { + "account_type": "Fixed Asset", + "account_number": "2218" + }, + "account_number": "221" + }, + "Terrains nus": { + "account_type": "Fixed Asset", + "Terrains \u00e0 b\u00e2tir": { + "account_type": "Fixed Asset", + "account_number": "2221" + }, + "Autres terrains nus": { + "account_type": "Fixed Asset", + "account_number": "2228" + }, + "account_number": "222" + }, + "Terrains b\u00e2tis": { + "account_type": "Fixed Asset", + "Pour b\u00e2timents industriels et agricoles": { + "account_type": "Fixed Asset", + "account_number": "2231" + }, + "Pour b\u00e2timents administratifs et commerciaux": { + "account_type": "Fixed Asset", + "account_number": "2232" + }, + "Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations professionnelles": { + "account_type": "Fixed Asset", + "account_number": "2234" + }, + "Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations non professionnelles": { + "account_type": "Fixed Asset", + "account_number": "2235" + }, + "Autres terrains b\u00e2tis": { + "account_type": "Fixed Asset", + "account_number": "2238" + }, + "account_number": "223" + }, + "Travaux de mise en valeur des terrains": { + "account_type": "Fixed Asset", + "Plantation d\u2019arbres et d\u2019arbustes": { + "account_type": "Fixed Asset", + "account_number": "2241" + }, + "Am\u00e9liorations du fonds": { + "account_type": "Fixed Asset", + "account_number": "2245" + }, + "Autres travaux": { + "account_type": "Fixed Asset", + "account_number": "2248" + }, + "account_number": "224" + }, + "Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset", + "Carri\u00e8res": { + "account_type": "Fixed Asset", + "account_number": "2251" + }, + "account_number": "225" + }, + "Terrains am\u00e9nag\u00e9s": { + "account_type": "Fixed Asset", + "Parkings": { + "account_type": "Fixed Asset", + "account_number": "2261" + }, + "account_number": "226" + }, + "Terrains mis en concession": { + "account_type": "Fixed Asset", + "account_number": "227" + }, + "Autres terrains": { + "account_type": "Fixed Asset", + "Terrains immeubles de placement": { + "account_type": "Fixed Asset", + "account_number": "2281" + }, + "Terrains des logements affect\u00e9s au personnel": { + "account_type": "Fixed Asset", + "account_number": "2285" + }, + "Terrains de location acquisition": { + "account_type": "Fixed Asset", + "account_number": "2286" + }, + "Divers terrains": { + "account_type": "Fixed Asset", + "account_number": "2288" + }, + "account_number": "228" + }, + "Am\u00e9nagements de terrains en cours": { + "account_type": "Fixed Asset", + "Terrains agricoles et forestiers": { + "account_type": "Fixed Asset", + "account_number": "2291" + }, + "Terrains nus": { + "account_type": "Fixed Asset", + "account_number": "2292" + }, + "Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset", + "account_number": "2295" + }, + "Autres terrains": { + "account_type": "Fixed Asset", + "account_number": "2298" + }, + "account_number": "229" + }, + "account_number": "22" + }, + "B\u00e2timents, installations techniques et agencements": { + "B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "B\u00e2timents industriels": { + "account_number": "2311" + }, + "B\u00e2timents agricoles": { + "account_number": "2312" + }, + "B\u00e2timents administratifs et commerciaux": { + "account_number": "2313" + }, + "B\u00e2timents affect\u00e9s au logement du personnel": { + "account_number": "2314" + }, + "B\u00e2timents immeubles de placement": { + "account_number": "2315" + }, + "B\u00e2timents de location acquisition": { + "account_number": "2316" + }, + "account_number": "231" + }, + "B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "B\u00e2timents industriels": { + "account_number": "2321" + }, + "B\u00e2timents agricoles": { + "account_number": "2322" + }, + "B\u00e2timents administratifs et commerciaux": { + "account_number": "2323" + }, + "B\u00e2timents affect\u00e9s au logement du personnel": { + "account_number": "2324" + }, + "B\u00e2timents immeubles de placement": { + "account_number": "2325" + }, + "B\u00e2timents de location acquisition": { + "account_number": "2326" + }, + "account_number": "232" + }, + "Ouvrages d\u2019infrastructure": { + "Voies de terre": { + "account_number": "2331" + }, + "Voies de fer": { + "account_number": "2332" + }, + "Voies d\u2019eau": { + "account_number": "2333" + }, + "Barrages, Digues": { + "account_number": "2334" + }, + "Pistes d\u2019a\u00e9rodrome": { + "account_number": "2335" + }, + "Autres ouvrages d\u2019infrastructures": { + "account_number": "2338" + }, + "account_number": "233" + }, + "Am\u00e9nagements, agencements et installations techniques": { + "Installations complexes sp\u00e9cialis\u00e9es sur sol propre": { + "account_number": "2341" + }, + "Installations complexes sp\u00e9cialis\u00e9es sur sol d\u2019autrui": { + "account_number": "2342" + }, + "Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol propre": { + "account_number": "2343" + }, + "Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol d\u2019autrui": { + "account_number": "2344" + }, + "Am\u00e9nagements et agencements des b\u00e2timents": { + "account_number": "2345" + }, + "account_number": "234" + }, + "Am\u00e9nagements de bureaux": { + "Installations g\u00e9n\u00e9rales": { + "account_number": "2351" + }, + "Autres am\u00e9nagements de bureaux": { + "account_number": "2358" + }, + "account_number": "235" + }, + "B\u00e2timents industriels, agricoles et commerciaux mis en concession": { + "account_number": "237" + }, + "Autres installations et agencements": { + "account_number": "238" + }, + "B\u00e2timents am\u00e9nagements, agencements et installations en cours": { + "B\u00e2timents en cours": { + "account_number": "2391" + }, + "Installations en cours": { + "account_number": "2392" + }, + "Ouvrages d\u2019infrastructure en cours": { + "account_number": "2393" + }, + "Am\u00e9nagements et agencements et installations techniques en cours": { + "account_number": "2394" + }, + "Am\u00e9nagements de bureaux en cours": { + "account_number": "2395" + }, + "Autres installations et agencements en cours": { + "account_number": "2398" + }, + "account_number": "239" + }, + "account_number": "23" + }, + "Mat\u00e9riel, mobilier et actifs biologiques": { + "Mat\u00e9riel et outillage industriel et commercial": { + "Mat\u00e9riel industriel": { + "account_number": "2411" + }, + "Outillage industriel": { + "account_number": "2412" + }, + "Mat\u00e9riel commercial": { + "account_number": "2413" + }, + "Outillage commercial": { + "account_number": "2414" + }, + "Mat\u00e9riel & outillage industriel et commercial de location-acquisition": { + "account_number": "2416" + }, + "account_number": "241" + }, + "Mat\u00e9riel et outillage agricole": { + "Mat\u00e9riel agricole": { + "account_number": "2421" + }, + "Outillage agricole": { + "account_number": "2422" + }, + "Mat\u00e9riel & outillage agricole de location-acquisition": { + "account_number": "2426" + }, + "account_number": "242" + }, + "Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "243" + }, + "Mat\u00e9riel et mobilier": { + "Mat\u00e9riel de bureau": { + "account_number": "2441" + }, + "Mat\u00e9riel informatique": { + "account_number": "2442" + }, + "Mat\u00e9riel bureautique": { + "account_number": "2443" + }, + "Mobilier de bureau": { + "account_number": "2444" + }, + "Mat\u00e9riel et mobilier immeubles de placement": { + "account_number": "2445" + }, + "Mat\u00e9riel et mobilier de location acquisition": { + "account_number": "2446" + }, + "Mat\u00e9riel et mobilier des logements du personnel": { + "account_number": "2447" + }, + "account_number": "244" + }, + "Mat\u00e9riel de transport": { + "Mat\u00e9riel automobile": { + "account_number": "2451" + }, + "Mat\u00e9riel ferroviaire": { + "account_number": "2452" + }, + "Mat\u00e9riel fluvial, lagunaire": { + "account_number": "2453" + }, + "Mat\u00e9riel naval": { + "account_number": "2454" + }, + "Mat\u00e9riel a\u00e9rien": { + "account_number": "2455" + }, + "Mat\u00e9riel de transport de location-acquisition": { + "account_number": "2456" + }, + "Mat\u00e9riel hippomobile": { + "account_number": "2457" + }, + "Autres mat\u00e9riels de transport": { + "account_number": "2458" + }, + "account_number": "245" + }, + "Actifs biologiques": { + "Cheptel, animaux de trait": { + "account_number": "2461" + }, + "Cheptel, animaux reproducteurs": { + "account_number": "2462" + }, + "Animaux de garde": { + "account_number": "2463" + }, + "Plantations agricoles": { + "account_number": "2465" + }, + "Autres actifs biologiques": { + "account_number": "2468" + }, + "account_number": "246" + }, + "Agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "Agencements et am\u00e9nagements du mat\u00e9riel": { + "account_number": "2471" + }, + "Agencements et am\u00e9nagements des actifs biologiques": { + "account_number": "2472" + }, + "Autres agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "account_number": "2478" + }, + "account_number": "247" + }, + "Autres mat\u00e9riels et mobiliers": { + "Collections et \u0153uvres d\u2019art": { + "account_number": "2481" + }, + "Divers mat\u00e9riels mobiliers": { + "account_number": "2488" + }, + "account_number": "248" + }, + "Mat\u00e9riels et actifs biologiques en cours": { + "Mat\u00e9riel et outillage industriel et commercial": { + "account_number": "2491" + }, + "Mat\u00e9riel et outillage agricole": { + "account_number": "2492" + }, + "Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "2493" + }, + "Mat\u00e9riel et mobilier de bureau": { + "account_number": "2494" + }, + "Mat\u00e9riel de transport": { + "account_number": "2495" + }, + "Actifs biologiques": { + "account_number": "2496" + }, + "Agencements am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "account_number": "2497" + }, + "Autres mat\u00e9riels et actifs biologiques en cours": { + "account_number": "2498" + }, + "account_number": "249" + }, + "account_number": "24" + }, + "Avances et acomptes vers\u00e9s sur immobilisations": { + "Avances et acomptes vers\u00e9s sur immobilisations incorporelles": { + "account_number": "251" + }, + "Avances et acomptes vers\u00e9s sur immobilisations corporelles": { + "account_number": "252" + }, + "account_number": "25" + }, + "Titres de participation": { + "Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": { + "account_number": "261" + }, + "Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le conjoint": { + "account_number": "262" + }, + "Titres de participation dans des soci\u00e9t\u00e9s conf\u00e9rant une influence notable": { + "account_number": "263" + }, + "Participations dans des organismes professionnels": { + "account_number": "265" + }, + "Parts dans des groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": { + "account_number": "266" + }, + "Autres titres de participation": { + "account_number": "268" + }, + "account_number": "26" + }, + "Autres immobilisations financi\u00e8res": { + "Pr\u00eats et cr\u00e9ances": { + "Pr\u00eats participatifs": { + "account_number": "2711" + }, + "Pr\u00eats aux associ\u00e9s": { + "account_number": "2712" + }, + "Billets de fonds": { + "account_number": "2713" + }, + "Titres pr\u00eat\u00e9s": { + "account_number": "2714" + }, + "Autres pr\u00eats et cr\u00e9ances": { + "account_number": "2718" + }, + "account_number": "271" + }, + "Pr\u00eats au personnel": { + "Pr\u00eats immobiliers": { + "account_number": "2721" + }, + "Pr\u00eats mobiliers et d\u2019installation": { + "account_number": "2722" + }, + "Autres pr\u00eats au personnel": { + "account_number": "2728" + }, + "account_number": "272" + }, + "Cr\u00e9ances sur l\u2019\u00c9tat": { + "Retenues de garantie": { + "account_number": "2731" + }, + "Fonds r\u00e9glement\u00e9": { + "account_number": "2733" + }, + "Cr\u00e9ances sur le conc\u00e9dant": { + "account_number": "2734" + }, + "Autres cr\u00e9ances sur l\u2019\u00c9tat": { + "account_number": "2738" + }, + "account_number": "273" + }, + "Titres immobilis\u00e9s": { + "Titres immobilis\u00e9s de l\u2019activit\u00e9 de portefeuille (TIAP)": { + "account_number": "2741" + }, + "Titres participatifs": { + "account_number": "2742" + }, + "Certificats d\u2019investissement": { + "account_number": "2743" + }, + "Parts de fonds commun de placement (FCP)": { + "account_number": "2744" + }, + "Obligations": { + "account_number": "2745" + }, + "Actions ou parts propres": { + "account_number": "2746" + }, + "Autres titres immobilis\u00e9s": { + "account_number": "2748" + }, + "account_number": "274" + }, + "D\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "D\u00e9p\u00f4ts pour loyers d\u2019avance": { + "account_number": "2751" + }, + "D\u00e9p\u00f4ts pour l\u2019\u00e9lectricit\u00e9": { + "account_number": "2752" + }, + "D\u00e9p\u00f4ts pour l\u2019eau": { + "account_number": "2753" + }, + "D\u00e9p\u00f4ts pour le gaz": { + "account_number": "2754" + }, + "D\u00e9p\u00f4ts pour le t\u00e9l\u00e9phone, le t\u00e9lex, la t\u00e9l\u00e9copie": { + "account_number": "2755" + }, + "Cautionnements sur march\u00e9s publics": { + "account_number": "2756" + }, + "Cautionnements sur autres op\u00e9rations": { + "account_number": "2757" + }, + "Autres d\u00e9p\u00f4ts et cautionnements": { + "account_number": "2758" + }, + "account_number": "275" + }, + "Int\u00e9r\u00eats courus": { + "Pr\u00eats et cr\u00e9ances non commerciales": { + "account_number": "2761" + }, + "Pr\u00eats au personnel": { + "account_number": "2762" + }, + "Cr\u00e9ances sur l\u2019\u00c9tat": { + "account_number": "2763" + }, + "Titres immobilis\u00e9s": { + "account_number": "2764" + }, + "D\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "account_number": "2765" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations": { + "account_number": "2767" + }, + "Immobilisations financi\u00e8res diverses": { + "account_number": "2768" + }, + "account_number": "276" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": { + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations (groupe)": { + "account_number": "2771" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations (hors groupe)": { + "account_number": "2772" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": { + "account_number": "2773" + }, + "Avances \u00e0 des Groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": { + "account_number": "2774" + }, + "account_number": "277" + }, + "Immobilisations financi\u00e8res diverses": { + "Cr\u00e9ances diverses groupe": { + "account_number": "2781" + }, + "Cr\u00e9ances diverses hors groupe": { + "account_number": "2782" + }, + "Banques d\u00e9p\u00f4ts \u00e0 terme": { + "account_number": "2784" + }, + "Or et m\u00e9taux pr\u00e9cieux": { + "account_number": "2785" + }, + "Autres immobilisations financi\u00e8res": { + "account_number": "2788" + }, + "account_number": "278" + }, + "account_number": "27" + }, + "Amortissements": { + "account_type": "Accumulated Depreciation", + "Amortissements des immobilisations corporelles": { + "account_type": "Accumulated Depreciation", + "Amortissements des frais de d\u00e9veloppement": { + "account_type": "Accumulated Depreciation", + "account_number": "2811" + }, + "Amortissements des brevets, licences, concessions et droits similaires": { + "account_type": "Accumulated Depreciation", + "account_number": "2812" + }, + "Amortissements des logiciels et sites internet": { + "account_type": "Accumulated Depreciation", + "account_number": "2813" + }, + "Amortissements des marques": { + "account_type": "Accumulated Depreciation", + "account_number": "2814" + }, + "Amortissements du fonds commercial": { + "account_type": "Accumulated Depreciation", + "account_number": "2815" + }, + "Amortissements du droit au bail": { + "account_type": "Accumulated Depreciation", + "account_number": "2816" + }, + "Amortissements des investissements de cr\u00e9ation": { + "account_type": "Accumulated Depreciation", + "account_number": "2817" + }, + "Amortissements des autres droits et valeurs incorporels": { + "account_type": "Accumulated Depreciation", + "account_number": "2818" + }, + "account_number": "281" + }, + "Amortissements des terrains": { + "Amortissements des travaux de mise en valeur des terrains": { + "account_number": "2824" + }, + "account_number": "282" + }, + "Amortissements des b\u00e2timents, installations techniques et agencements": { + "Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "account_number": "2831" + }, + "Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "account_number": "2832" + }, + "Amortissements des ouvrages d\u2019infrastructure": { + "account_number": "2833" + }, + "Amortissements des am\u00e9nagements, agencements et installations techniques": { + "account_number": "2834" + }, + "Amortissements des am\u00e9nagements de bureaux": { + "account_number": "2835" + }, + "Amortissements des b\u00e2timents industriels, agricoles et commerciaux mis en concession": { + "account_number": "2837" + }, + "Amortissements des autres installations et agencements": { + "account_number": "2838" + }, + "account_number": "283" + }, + "Amortissements du mat\u00e9riel": { + "Amortissements du mat\u00e9riel et outillage industriel et commercial": { + "account_number": "2841" + }, + "Amortissements du mat\u00e9riel et outillage agricole": { + "account_number": "2842" + }, + "Amortissements du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "2843" + }, + "Amortissements du mat\u00e9riel et mobilier": { + "account_number": "2844" + }, + "Amortissements du mat\u00e9riel de transport": { + "account_number": "2845" + }, + "Amortissements des actifs biologiques": { + "account_number": "2846" + }, + "Amortissements des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": { + "account_number": "2847" + }, + "Amortissements des autres mat\u00e9riels": { + "account_number": "2848" + }, + "account_number": "284" + }, + "account_number": "28" + }, + "D\u00e9pr\u00e9ciations des immobilisations": { + "D\u00e9pr\u00e9ciations des immobilisations incorporelles": { + "D\u00e9pr\u00e9ciations des frais de d\u00e9veloppement": { + "account_number": "2911" + }, + "D\u00e9pr\u00e9ciations des brevets, licences, concessions et droits similaires": { + "account_number": "2912" + }, + "D\u00e9pr\u00e9ciations des logiciels et sites internet": { + "account_number": "2913" + }, + "D\u00e9pr\u00e9ciations des marques": { + "account_number": "2914" + }, + "D\u00e9pr\u00e9ciations du fonds commercial": { + "account_number": "2915" + }, + "D\u00e9pr\u00e9ciations du droit au bail": { + "account_number": "2916" + }, + "D\u00e9pr\u00e9ciations des investissements de cr\u00e9ation": { + "account_number": "2917" + }, + "D\u00e9pr\u00e9ciations des autres droits et valeurs incorporels": { + "account_number": "2918" + }, + "D\u00e9pr\u00e9ciations des immobilisations incorporelles en cours": { + "account_number": "2919" + }, + "account_number": "291" + }, + "D\u00e9pr\u00e9ciations des terrains": { + "D\u00e9pr\u00e9ciations des terrains agricoles et forestiers": { + "account_number": "2921" + }, + "D\u00e9pr\u00e9ciations des terrains nus": { + "account_number": "2922" + }, + "D\u00e9pr\u00e9ciations des terrains b\u00e2tis": { + "account_number": "2923" + }, + "D\u00e9pr\u00e9ciations des travaux de mise en valeur des terrains": { + "account_number": "2924" + }, + "D\u00e9pr\u00e9ciations des terrains de gisement": { + "account_number": "2925" + }, + "D\u00e9pr\u00e9ciations des terrains am\u00e9nag\u00e9s": { + "account_number": "2926" + }, + "D\u00e9pr\u00e9ciations des terrains mis en concession": { + "account_number": "2927" + }, + "D\u00e9pr\u00e9ciations des autres terrains": { + "account_number": "2928" + }, + "D\u00e9pr\u00e9ciations des am\u00e9nagements de terrains en cours": { + "account_number": "2929" + }, + "account_number": "292" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents, installations techniques et agencements": { + "D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "account_number": "2931" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "account_number": "2932" + }, + "D\u00e9pr\u00e9ciations des ouvrages d\u2019infrastructures": { + "account_number": "2933" + }, + "D\u00e9pr\u00e9ciations des am\u00e9nagements, agencements et installations techniques": { + "account_number": "2934" + }, + "D\u00e9pr\u00e9ciations des am\u00e9nagements de bureaux": { + "account_number": "2935" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles et commerciaux mis en concession": { + "account_number": "2937" + }, + "D\u00e9pr\u00e9ciations des autres installations et agencements": { + "account_number": "2938" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents et installations en cours": { + "account_number": "2939" + }, + "account_number": "293" + }, + "D\u00e9pr\u00e9ciations de mat\u00e9riel, du mobilier et de l\u2019actif biologique": { + "D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage industriel et commercial": { + "account_number": "2941" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage agricole": { + "account_number": "2942" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "2943" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel et mobilier": { + "account_number": "2944" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel de transport": { + "account_number": "2945" + }, + "D\u00e9pr\u00e9ciations des actifs biologiques": { + "account_number": "2946" + }, + "D\u00e9pr\u00e9ciations des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": { + "account_number": "2947" + }, + "D\u00e9pr\u00e9ciations des autres mat\u00e9riels": { + "account_number": "2948" + }, + "D\u00e9pr\u00e9ciations de mat\u00e9riel en cours": { + "account_number": "2949" + }, + "account_number": "294" + }, + "D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations": { + "D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations incorporelles": { + "account_number": "2951" + }, + "D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations corporelles": { + "account_number": "2952" + }, + "account_number": "295" + }, + "D\u00e9pr\u00e9ciations des titres de participation": { + "D\u00e9pr\u00e9ciations des titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": { + "account_number": "2961" + }, + "D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s sous contr\u00f4le conjoint": { + "account_number": "2962" + }, + "D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s conf\u00e9rant une influence notable": { + "account_number": "2963" + }, + "D\u00e9pr\u00e9ciations des participations dans des organismes professionnels": { + "account_number": "2965" + }, + "D\u00e9pr\u00e9ciations des parts dans des GIE": { + "account_number": "2966" + }, + "D\u00e9pr\u00e9ciations des autres titres de participation": { + "account_number": "2968" + }, + "account_number": "296" + }, + "D\u00e9pr\u00e9ciations des autres immobilisations financi\u00e8res": { + "D\u00e9pr\u00e9ciations des pr\u00eats et cr\u00e9ances": { + "account_number": "2971" + }, + "D\u00e9pr\u00e9ciations des pr\u00eats au personnel": { + "account_number": "2972" + }, + "D\u00e9pr\u00e9ciations des cr\u00e9ances sur l\u2019\u00c9tat": { + "account_number": "2973" + }, + "D\u00e9pr\u00e9ciations des titres immobilis\u00e9s": { + "account_number": "2974" + }, + "D\u00e9pr\u00e9ciations des d\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "account_number": "2975" + }, + "D\u00e9pr\u00e9ciations des cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": { + "account_number": "2977" + }, + "D\u00e9pr\u00e9ciations des cr\u00e9ances financi\u00e8res diverses": { + "account_number": "2978" + }, + "account_number": "297" + }, + "account_number": "29" + }, + "root_type": "Asset", + "account_number": "2" + }, + "Comptes de Stocks": { + "Marchandises": { + "Marchandises A": { + "Marchandises A1": { + "account_number": "3111" + }, + "Marchandises A2": { + "account_number": "3112" + }, + "account_number": "311" + }, + "Marchandises B": { + "Marchandises B1": { + "account_number": "3121" + }, + "Marchandises B2": { + "account_number": "3122" + }, + "account_number": "312" + }, + "Actifs biologiques": { + "Animaux": { + "account_number": "3131" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3132" + }, + "account_number": "313" + }, + "Marchandises hors activit\u00e9s ordinaires (HAO)": { + "account_number": "318" + }, + "account_number": "31" + }, + "Mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "Mati\u00e8res A": { + "account_number": "321" + }, + "Mati\u00e8res B": { + "account_number": "322" + }, + "Fournitures (A, B)": { + "account_number": "323" + }, + "account_number": "32" + }, + "Autres approvisionnements": { + "Mati\u00e8res consommables": { + "account_number": "331" + }, + "Fournitures d\u2019atelier et d\u2019usine": { + "account_number": "332" + }, + "Fournitures de magasin": { + "account_number": "333" + }, + "Fournitures de bureau": { + "account_number": "334" + }, + "Emballages": { + "Emballages perdus": { + "account_number": "3351" + }, + "Emballages r\u00e9cup\u00e9rables non identifiables": { + "account_number": "3352" + }, + "Emballages \u00e0 usage mixte": { + "account_number": "3353" + }, + "Autres emballages": { + "account_number": "3358" + }, + "account_number": "335" + }, + "Autres mati\u00e8res": { + "account_number": "338" + }, + "account_number": "33" + }, + "Produits en cours": { + "Produits en cours": { + "Produits en cours P1": { + "account_number": "3411" + }, + "Produits en cours P2": { + "account_number": "3412" + }, + "account_number": "341" + }, + "Travaux en cours": { + "Travaux en cours T1": { + "account_number": "3421" + }, + "Travaux en cours T2": { + "account_number": "3422" + }, + "account_number": "342" + }, + "Produits interm\u00e9diaires en cours": { + "Produits interm\u00e9diaires A": { + "account_number": "3431" + }, + "Produits interm\u00e9diaires B": { + "account_number": "3432" + }, + "account_number": "343" + }, + "Produits r\u00e9siduels en cours": { + "Produits r\u00e9siduels A": { + "account_number": "3441" + }, + "Produits r\u00e9siduels B": { + "account_number": "3442" + }, + "account_number": "344" + }, + "Actifs biologiques en cours": { + "Animaux": { + "account_number": "3451" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3452" + }, + "account_number": "345" + }, + "account_number": "34" + }, + "Services en cours": { + "\u00c9tudes en cours": { + "\u00c9tudes en cours E1": { + "account_number": "3511" + }, + "\u00c9tudes en cours E2": { + "account_number": "3512" + }, + "account_number": "351" + }, + "Prestations de services en cours": { + "Prestations de services S1": { + "account_number": "3521" + }, + "Prestations de services S2": { + "account_number": "3522" + } + }, + "account_number": "35" + }, + "Produits finis": { + "Produits finis A": { + "account_number": "361" + }, + "Produits finis B": { + "account_number": "362" + }, + "Actifs biologiques": { + "Animaux": { + "account_number": "3631" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3632" + }, + "Autres stocks (activit\u00e9s annexes)": { + "account_number": "3638" + }, + "account_number": "363" + }, + "account_number": "36" + }, + "Produits interm\u00e9diaires et r\u00e9siduels": { + "Produits interm\u00e9diaires": { + "Produits interm\u00e9diaires A": { + "account_number": "3711" + }, + "Produits interm\u00e9diaires B": { + "account_number": "3712" + }, + "account_number": "371" + }, + "Produits r\u00e9siduels": { + "D\u00e9chets": { + "account_number": "3721" + }, + "Rebuts": { + "account_number": "3722" + }, + "Mati\u00e8res de R\u00e9cup\u00e9ration": { + "account_number": "3723" + }, + "account_number": "372" + }, + "Actifs biologiques": { + "Animaux": { + "account_number": "3731" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3732" + }, + "Autres stocks (activit\u00e9s annexes)": { + "account_number": "3738" + }, + "account_number": "373" + }, + "account_number": "37" + }, + "Stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": { + "account_type": "Stock", + "Marchandises en cours de route": { + "account_number": "381" + }, + "Mati\u00e8res premi\u00e8res et fournitures li\u00e9es en cours de route": { + "account_number": "382" + }, + "Autres approvisionnements en cours de route": { + "account_number": "383" + }, + "Produits finis en cours de route": { + "account_number": "386" + }, + "Stock en consignation ou en d\u00e9p\u00f4t": { + "Stock en consignation": { + "account_number": "3871" + }, + "Stock en d\u00e9p\u00f4t": { + "account_number": "3872" + }, + "account_number": "387" + }, + "Stock provenant d\u2019immobilisations mises hors service ou au rebut": { + "account_number": "388" + }, + "account_number": "38" + }, + "D\u00e9pr\u00e9ciations des stocks et encours de production": { + "D\u00e9pr\u00e9ciations des stocks de marchandises": { + "account_number": "391" + }, + "D\u00e9pr\u00e9ciations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "account_number": "392" + }, + "D\u00e9pr\u00e9ciations des stocks d\u2019autres approvisionnements": { + "account_number": "393" + }, + "D\u00e9pr\u00e9ciations des productions en cours": { + "account_number": "394" + }, + "D\u00e9pr\u00e9ciations des services en cours": { + "account_number": "395" + }, + "D\u00e9pr\u00e9ciations des stocks de produits finis": { + "account_number": "396" + }, + "D\u00e9pr\u00e9ciations des stocks de produits interm\u00e9diaires et r\u00e9siduels": { + "account_number": "397" + }, + "D\u00e9pr\u00e9ciations des stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": { + "account_number": "398" + }, + "account_number": "39" + }, + "root_type": "Asset", + "account_number": "3" + }, + "4-Comptes de Tiers (ACTIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (ACTIF)": { + "Fournisseurs d\u00e9biteurs": { + "Fournisseurs Avances et acomptes vers\u00e9s": { + "account_number": "4091" + }, + "Fournisseurs Groupe avances et acomptes vers\u00e9s": { + "account_number": "4092" + }, + "Fournisseurs Sous-traitants avances et acomptes vers\u00e9s": { + "account_number": "4093" + }, + "Fournisseurs Cr\u00e9ances pour emballages et mat\u00e9riels \u00e0 rendre": { + "account_number": "4094" + }, + "Fournisseurs Rabais, remises, ristournes et autres avoirs \u00e0 obtenir": { + "account_number": "4098" + }, + "account_number": "409" + } + }, + "41-Clients et comptes rattach\u00e9s (ACTIF)": { + "Clients": { + "Clients": { + "account_type": "Receivable", + "account_number": "4111" + }, + "Clients groupe": { + "account_type": "Receivable", + "account_number": "4112" + }, + "Clients, \u00c9tat et Collectivit\u00e9s publiques": { + "account_type": "Receivable", + "account_number": "4114" + }, + "Clients, organismes internationaux": { + "account_type": "Receivable", + "account_number": "4115" + }, + "Clients, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Receivable", + "account_number": "4116" + }, + "Client, retenues de garantie": { + "account_type": "Receivable", + "account_number": "4117" + }, + "Clients, d\u00e9gr\u00e8vement de taxes sur la valeur ajout\u00e9e (TVA)": { + "account_type": "Receivable", + "account_number": "4118" + }, + "account_type": "Receivable", + "account_number": "411" + }, + "Clients, effets \u00e0 recevoir en portefeuille": { + "Clients, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4121" + }, + "Clients Groupe, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4122" + }, + "\u00c9tat et Collectivit\u00e9s publiques, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4124" + }, + "Organismes Internationaux, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4125" + }, + "account_type": "Receivable", + "account_number": "412" + }, + "Clients, ch\u00e8ques, effets et autres valeurs impay\u00e9es": { + "Clients, ch\u00e8ques impay\u00e9s": { + "account_type": "Receivable", + "account_number": "4131" + }, + "Clients, effets impay\u00e9s": { + "account_type": "Receivable", + "account_number": "4132" + }, + "Clients, cartes de cr\u00e9dit impay\u00e9es": { + "account_type": "Receivable", + "account_number": "4133" + }, + "Clients, autres valeurs impay\u00e9es": { + "account_type": "Receivable", + "account_number": "4138" + }, + "account_type": "Receivable", + "account_number": "413" + }, + "Cr\u00e9ances sur cessions courantes d\u2019immobilisations": { + "Cr\u00e9ances en compte, immobilisations incorporelles": { + "account_type": "Receivable", + "account_number": "4141" + }, + "Cr\u00e9ances en compte, immobilisations corporelles": { + "account_type": "Receivable", + "account_number": "4142" + }, + "Effets \u00e0 recevoir, immobilisations incorporelles": { + "account_type": "Receivable", + "account_number": "4146" + }, + "Effets \u00e0 recevoir, immobilisations corporelles": { + "account_type": "Receivable", + "account_number": "4147" + }, + "account_type": "Receivable", + "account_number": "414" + }, + "Clients, effets escompt\u00e9s non \u00e9chus": { + "account_type": "Receivable", + "account_number": "415" + }, + "Cr\u00e9ances clients litigieuses ou douteuses": { + "Cr\u00e9ances litigieuses": { + "account_type": "Receivable", + "account_number": "4161" + }, + "Cr\u00e9ances douteuses": { + "account_type": "Receivable", + "account_number": "4162" + }, + "account_type": "Receivable", + "account_number": "416" + }, + "Clients, produits \u00e0 recevoir": { + "Clients, factures \u00e0 \u00e9tablir": { + "account_type": "Receivable", + "account_number": "4181" + }, + "Clients, int\u00e9r\u00eats courus": { + "account_type": "Receivable", + "account_number": "4186" + }, + "account_type": "Receivable", + "account_number": "418" + }, + "account_type": "Receivable" + }, + "42-Personnel (ACTIF)": { + "Personnel, avances et acomptes": { + "Personnel, avances": { + "account_number": "4211" + }, + "Personnel, acomptes": { + "account_number": "4212" + }, + "Frais avanc\u00e9s et fournitures au personnel": { + "account_number": "4213" + }, + "account_number": "421" + } + }, + "43-Organismes sociaux (ACTIF)": { + "431-S\u00e9curit\u00e9 sociale": { + "Prestations familiales": { + "account_number": "4311" + }, + "Accidents de travail": { + "account_number": "4312" + }, + "Caisse de retraite obligatoire": { + "account_number": "4313" + }, + "Caisse de retraite facultative": { + "account_number": "4314" + }, + "Autres cotisations sociales": { + "account_number": "4318" + } + }, + "432-Caisses de retraite compl\u00e9mentaire": {}, + "433-Autres organismes sociaux": { + "Mutuelle": { + "account_number": "4331" + }, + "Assurances retraite": { + "account_number": "4332" + }, + "Assurances et organismes de sant\u00e9": { + "account_number": "4333" + } + }, + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "Produits \u00e0 recevoir": { + "account_number": "4387" + } + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (ACTIF)": { + "\u00c9tat, TVA factur\u00e9e": { + "TVA factur\u00e9e sur ventes": { + "account_number": "4431" + }, + "TVA factur\u00e9e sur prestations de services": { + "account_number": "4432" + }, + "TVA factur\u00e9e sur travaux": { + "account_number": "4433" + }, + "TVA factur\u00e9e sur production livr\u00e9e \u00e0 soi-m\u00eame": { + "account_number": "4434" + }, + "TVA sur factures \u00e0 \u00e9tablir": { + "account_number": "4435" + }, + "account_number": "443" + }, + "\u00c9tat, TVA r\u00e9cup\u00e9rable": { + "TVA r\u00e9cup\u00e9rable sur immobilisations": { + "account_number": "4451" + }, + "TVA r\u00e9cup\u00e9rable sur achats": { + "account_number": "4452" + }, + "TVA r\u00e9cup\u00e9rable sur transport": { + "account_number": "4453" + }, + "TVA r\u00e9cup\u00e9rable sur services ext\u00e9rieurs et autres charges": { + "account_number": "4454" + }, + "TVA r\u00e9cup\u00e9rable sur factures non parvenues": { + "account_number": "4455" + }, + "TVA transf\u00e9r\u00e9e par d\u2019autres entit\u00e9s": { + "account_number": "4456" + }, + "account_number": "445" + }, + "\u00c9tat, charges \u00e0 payer et produits \u00e0 recevoir": { + "Charges \u00e0 payer": { + "account_number": "4486" + }, + "Produits \u00e0 recevoir": { + "account_number": "4487" + }, + "account_number": "448" + }, + "\u00c9tat, cr\u00e9ances et dettes diverses": { + "\u00c9tat, obligations cautionn\u00e9es": { + "account_number": "4491" + }, + "\u00c9tat, avances et acomptes vers\u00e9s sur imp\u00f4ts": { + "account_number": "4492" + }, + "\u00c9tat, fonds de dotation \u00e0 recevoir": { + "account_number": "4493" + }, + "\u00c9tat, subventions investissement \u00e0 recevoir": { + "account_number": "4494" + }, + "\u00c9tat, subventions d\u2019exploitation \u00e0 recevoir": { + "account_number": "4495" + }, + "\u00c9tat, subventions d\u2019\u00e9quilibre \u00e0 recevoir": { + "account_number": "4496" + }, + "\u00c9tat, avances sur subventions": { + "account_number": "4497" + }, + "\u00c9tat, fonds r\u00e9glement\u00e9s provisionn\u00e9s": { + "account_number": "4499" + }, + "account_number": "449" + } + }, + "45-Organismes internationaux (ACTIF)": { + "Op\u00e9rations avec les organismes africains": { + "account_number": "451" + }, + "Op\u00e9rations avec les autres organismes internationaux": { + "account_number": "452" + }, + "Organismes internationaux, fonds de dotation et subventions \u00e0 recevoir": { + "Organismes internationaux, fonds de dotation \u00e0 recevoir": { + "account_number": "4581" + }, + "Organismes internationaux, subventions \u00e0 recevoir": { + "account_number": "4582" + }, + "account_number": "458" + } + }, + "46-Apporteurs, associ\u00e9s et groupe (ACTIF)": { + "461-Apporteurs, op\u00e9rations sur le capital": { + "Apporteurs, capital appel\u00e9, non vers\u00e9": { + "account_number": "4613" + }, + "Apporteurs, compte d\u2019apport, op\u00e9rations de restructuration (fusion...)": { + "account_number": "4614" + }, + "Apporteurs, titres \u00e0 \u00e9changer": { + "account_number": "4618" + } + }, + "Apporteurs, restant d\u00fb sur capital appel\u00e9": { + "account_number": "467" + } + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (ACTIF)": { + "472-Cr\u00e9ances et dettes sur titres de placement": { + "Cr\u00e9ances sur cessions de titres de placement": { + "account_number": "4721" + }, + "Versements restant \u00e0 effectuer sur titres de placement non lib\u00e9r\u00e9s": { + "account_number": "4726" + } + }, + "473-Interm\u00e9diaires Op\u00e9rations faites pour compte de tiers": { + "Mandants": { + "account_number": "4731" + }, + "Mandataires": { + "account_number": "4732" + }, + "Commettants": { + "account_number": "4733" + }, + "Commissionnaires": { + "account_number": "4734" + }, + "\u00c9tat, Collectivit\u00e9s publiques, fonds global d\u2019allocation": { + "account_number": "4739" + } + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits": { + "Compte de r\u00e9partition p\u00e9riodique des produits": { + "account_number": "4747" + } + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA": { + "Compte actif": { + "account_type": "Temporary", + "account_number": "4751" + } + }, + "Charges constat\u00e9es d\u2019avance": { + "account_number": "476" + }, + "478-\u00c9carts de conversion actif": { + "Diminution des cr\u00e9ances d\u2019exploitation": { + "account_number": "4781" + }, + "Diminution des cr\u00e9ances financi\u00e8res": { + "account_number": "4782" + }, + "Augmentation des dettes d\u2019exploitation": { + "account_number": "4783" + }, + "Augmentation des dettes financi\u00e8res": { + "account_number": "4784" + }, + "Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": { + "account_number": "4786" + }, + "Diff\u00e9rences compens\u00e9es par couverture de change": { + "account_number": "4788" + } + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (ACTIF)": { + "Cr\u00e9ances sur cessions d\u2019immobilisations": { + "En compte, immobilisations incorporelles": { + "account_number": "4851" + }, + "En compte, immobilisations corporelles": { + "account_number": "4852" + }, + "Effets \u00e0 recevoir, immobilisations incorporelles": { + "account_number": "4853" + }, + "Effets \u00e0 recevoir, immobilisations corporelles": { + "account_number": "4854" + }, + "Effets escompt\u00e9s non \u00e9chus": { + "account_number": "4855" + }, + "Retenues de garantie": { + "account_number": "4857" + }, + "Factures \u00e0 \u00e9tablir": { + "account_number": "4858" + }, + "account_number": "485" + }, + "Autres cr\u00e9ances hors activit\u00e9s ordinaires (HAO)": { + "account_number": "488" + } + }, + "49-D\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme (tiers) (ACTIF)": { + "D\u00e9pr\u00e9ciations des comptes clients": { + "Cr\u00e9ances litigieuses": { + "account_number": "4911" + }, + "Cr\u00e9ances douteuses": { + "account_number": "4912" + }, + "account_number": "491" + }, + "D\u00e9pr\u00e9ciations des comptes organismes internationaux": { + "account_number": "495" + }, + "D\u00e9pr\u00e9ciations des comptes apporteurs, associ\u00e9s et groupe": { + "Associ\u00e9s, comptes courants": { + "account_number": "4962" + }, + "Associ\u00e9s, op\u00e9rations faites en commun": { + "account_number": "4963" + }, + "Groupe, comptes courants": { + "account_number": "4966" + }, + "account_number": "496" + }, + "D\u00e9pr\u00e9ciations des comptes d\u00e9biteurs divers": { + "account_number": "497" + }, + "D\u00e9pr\u00e9ciations des comptes de cr\u00e9ances HAO": { + "Cr\u00e9ances sur cessions d\u2019immobilisations": { + "account_number": "4985" + }, + "Cr\u00e9ances sur cessions de titres de placement": { + "account_number": "4986" + }, + "Autres cr\u00e9ances HAO": { + "account_number": "4988" + }, + "account_number": "498" + }, + "Provisions pour risques \u00e0 court terme": { + "Sur op\u00e9rations d\u2019exploitation": { + "account_number": "4991" + }, + "Sur op\u00e9rations financi\u00e8res": { + "account_number": "4997" + }, + "Sur op\u00e9rations HAO": { + "account_number": "4998" + }, + "account_number": "499" + } + }, + "root_type": "Asset" + }, + "4-Comptes de Tiers (PASSIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (PASSIF)": { + "Fournisseurs, dettes en compte": { + "Fournisseurs": { + "account_type": "Payable", + "account_number": "4011" + }, + "Fournisseurs groupe": { + "account_type": "Payable", + "account_number": "4012" + }, + "Fournisseurs sous-traitants": { + "account_type": "Payable", + "account_number": "4013" + }, + "Fournisseurs, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Payable", + "account_number": "4016" + }, + "Fournisseur, retenues de garantie": { + "account_type": "Payable", + "account_number": "4017" + }, + "account_type": "Payable", + "account_number": "401" + }, + "Fournisseurs, effets \u00e0 payer": { + "Fournisseurs Effets \u00e0 payer": { + "account_type": "Payable", + "account_number": "4021" + }, + "Fournisseurs Groupe, effets \u00e0 payer": { + "account_type": "Payable", + "account_number": "4022" + }, + "Fournisseurs Sous-traitants, effets \u00e0 payer": { + "account_type": "Payable", + "account_number": "4023" + }, + "account_type": "Payable", + "account_number": "402" + }, + "Fournisseurs, acquisitions courantes d\u2019immobilisations": { + "Fournisseurs Dettes en comptes, immobilisations incorporelles": { + "account_type": "Payable", + "account_number": "4041" + }, + "Fournisseurs Dettes en comptes, immobilisations corporelles": { + "account_type": "Payable", + "account_number": "4042" + }, + "Fournisseurs Effets \u00e0 payer, immobilisations incorporelles": { + "account_type": "Payable", + "account_number": "4046" + }, + "Fournisseurs Effets \u00e0 payer, immobilisations corporelles": { + "account_type": "Payable", + "account_number": "4047" + }, + "account_type": "Payable", + "account_number": "404" + }, + "Fournisseurs, factures non parvenues": { + "Fournisseurs": { + "account_type": "Stock Received But Not Billed", + "account_number": "4081" + }, + "Fournisseurs groupe": { + "account_type": "Stock Received But Not Billed", + "account_number": "4082" + }, + "Fournisseurs sous-traitants": { + "account_type": "Stock Received But Not Billed", + "account_number": "4083" + }, + "Fournisseurs, int\u00e9r\u00eats courus": { + "account_type": "Stock Received But Not Billed", + "account_number": "4086" + }, + "account_type": "Stock Received But Not Billed", + "account_number": "408" + }, + "account_type": "Payable" + }, + "41-Clients et comptes rattach\u00e9s (PASSIF)": { + "Clients cr\u00e9diteurs": { + "Clients, avances et acomptes re\u00e7us": { + "account_number": "4191" + }, + "Clients groupe, avances et acomptes re\u00e7us": { + "account_number": "4192" + }, + "Clients, dettes pour emballages et mat\u00e9riels consign\u00e9s": { + "account_number": "4194" + }, + "Clients, rabais, remises, ristournes et autres avoirs \u00e0 accorder": { + "account_number": "4198" + }, + "account_number": "419" + } + }, + "42-Personnel (PASSIF)": { + "Personnel, r\u00e9mun\u00e9rations dues": { + "account_number": "422" + }, + "Personnel, oppositions, saisies-arr\u00eats": { + "Personnel, oppositions": { + "account_number": "4231" + }, + "Personnel, saisies-arr\u00eats": { + "account_number": "4232" + }, + "Personnel, avis \u00e0 tiers d\u00e9tenteur": { + "account_number": "4233" + }, + "account_number": "423" + }, + "Personnel, \u0153uvres sociales internes": { + "Assistance m\u00e9dicale": { + "account_number": "4241" + }, + "Allocations familiales": { + "account_number": "4242" + }, + "Organismes sociaux rattach\u00e9s \u00e0 l\u2019entit\u00e9": { + "account_number": "4245" + }, + "Autres \u0153uvres sociales internes": { + "account_number": "4248" + }, + "account_number": "424" + }, + "Repr\u00e9sentants du personnel": { + "D\u00e9l\u00e9gu\u00e9s du personnel": { + "account_number": "4251" + }, + "Syndicats et Comit\u00e9s d\u2019entreprises, d\u2019\u00c9tablissement": { + "account_number": "4252" + }, + "Autres repr\u00e9sentants du personnel": { + "account_number": "4258" + }, + "account_number": "425" + }, + "Personnel, participation aux b\u00e9n\u00e9fices et au capital": { + "Participation aux b\u00e9n\u00e9fices": { + "account_number": "4261" + }, + "Participation au capital": { + "account_number": "4264" + }, + "account_number": "426" + }, + "Personnel d\u00e9p\u00f4ts": { + "account_number": "427" + }, + "Personnel, charges \u00e0 payer et produits \u00e0 recevoir": { + "Dettes provisionn\u00e9es pour cong\u00e9s \u00e0 payer": { + "account_number": "4281" + }, + "Autres charges \u00e0 payer": { + "account_number": "4286" + }, + "Produits \u00e0 recevoir": { + "account_number": "4287" + }, + "account_number": "428" + } + }, + "43-Organismes sociaux (PASSIF)": { + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "Charges sociales sur gratifications \u00e0 payer": { + "account_number": "4381" + }, + "Charges sociales sur cong\u00e9s \u00e0 payer": { + "account_number": "4382" + }, + "Autres charges \u00e0 payer": { + "account_number": "4386" + } + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (PASSIF)": { + "\u00c9tat, imp\u00f4t sur les b\u00e9n\u00e9fices": { + "account_number": "441" + }, + "\u00c9tat, autres imp\u00f4ts et taxes": { + "Imp\u00f4ts et taxes d\u2019\u00c9tat": { + "account_number": "4421" + }, + "Imp\u00f4ts et taxes pour les collectivit\u00e9s publiques": { + "account_number": "4422" + }, + "Imp\u00f4ts et taxes recouvrables sur des obligataires": { + "account_number": "4423" + }, + "Imp\u00f4ts et taxes recouvrables sur des associ\u00e9s": { + "account_number": "4424" + }, + "Droits de douane": { + "account_number": "4426" + }, + "Autres imp\u00f4ts et taxes": { + "account_number": "4428" + }, + "account_number": "442" + }, + "\u00c9tat, TVA due ou cr\u00e9dit de TVA": { + "\u00c9tat, TVA due": { + "account_number": "4441" + }, + "\u00c9tat, cr\u00e9dit de TVA \u00e0 reporter": { + "account_number": "4449" + }, + "account_number": "444" + }, + "\u00c9tat, autres taxes sur le chiffre d\u2019affaires": { + "account_number": "446" + }, + "\u00c9tat, imp\u00f4ts retenus \u00e0 la source": { + "Imp\u00f4t G\u00e9n\u00e9ral sur le revenu": { + "account_number": "4471" + }, + "Imp\u00f4ts sur salaires": { + "account_number": "4472" + }, + "Contribution nationale": { + "account_number": "4473" + }, + "Contribution nationale de solidarit\u00e9": { + "account_number": "4474" + }, + "Autres imp\u00f4ts et contributions": { + "account_number": "4478" + }, + "account_number": "447" + } + }, + "46-Apporteurs, associ\u00e9s et groupe (PASSIF)": { + "461-Apporteurs, op\u00e9rations sur le capital (PASSIF)": { + "Apporteurs, apports en nature": { + "account_number": "4611" + }, + "Apporteurs, apports en num\u00e9raire": { + "account_number": "4612" + }, + "Apporteurs, versements re\u00e7us sur augmentation de capital": { + "account_number": "4615" + }, + "Apporteurs, versements anticip\u00e9s": { + "account_number": "4616" + }, + "Apporteurs d\u00e9faillants": { + "account_number": "4617" + }, + "Apporteurs, capital \u00e0 rembourser": { + "account_number": "4619" + } + }, + "462-Associ\u00e9s, comptes courants": { + "Principal": { + "account_number": "4621" + }, + "Int\u00e9r\u00eats courus": { + "account_number": "4626" + } + }, + "463-Associ\u00e9s, op\u00e9rations faites en commun et GIE": { + "Op\u00e9rations courantes": { + "account_number": "4631" + }, + "Int\u00e9r\u00eats courus": { + "account_number": "4636" + } + }, + "Associ\u00e9s, dividendes \u00e0 payer": { + "account_number": "465" + }, + "Groupe, comptes courants": { + "account_number": "466" + } + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (PASSIF)": { + "471-D\u00e9biteurs et cr\u00e9diteurs divers": { + "D\u00e9biteurs divers": { + "account_number": "4711" + }, + "Cr\u00e9diteurs divers": { + "account_number": "4712" + }, + "Obligataires": { + "account_number": "4713" + }, + "R\u00e9mun\u00e9rations d\u2019administrateurs": { + "account_number": "4715" + }, + "Compte d\u2019affacturage": { + "account_number": "4716" + }, + "D\u00e9biteurs divers retenues de garantie": { + "account_number": "4717" + }, + "Apport, compte de fusion et op\u00e9rations assimil\u00e9es": { + "account_number": "4718" + }, + "Bons de souscription d\u2019actions et d\u2019obligations": { + "account_number": "4719" + } + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits (PASSIF)": { + "Compte de r\u00e9partition p\u00e9riodique des charges": { + "account_number": "4746" + } + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA (PASSIF)": { + "Compte passif": { + "account_number": "4752" + } + }, + "Produits constat\u00e9s d\u2019avance": { + "account_number": "477" + }, + "479-\u00c9carts de conversion passif": { + "Augmentation des cr\u00e9ances d\u2019exploitation": { + "account_number": "4791" + }, + "Augmentation des cr\u00e9ances financi\u00e8res": { + "account_number": "4792" + }, + "Diminution des dettes d\u2019exploitation": { + "account_number": "4793" + }, + "Diminution des dettes financi\u00e8res": { + "account_number": "4794" + }, + "Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": { + "account_number": "4797" + }, + "Diff\u00e9rences compens\u00e9es par couverture de change": { + "account_number": "4798" + } + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (HAO) (PASSIF)": { + "Fournisseurs d\u2019investissements": { + "Immobilisations incorporelles": { + "account_number": "4811" + }, + "Immobilisations corporelles": { + "account_number": "4812" + }, + "Versements restant \u00e0 effectuer sur titres de participation et titres immobilis\u00e9s non lib\u00e9r\u00e9s": { + "account_number": "4813" + }, + "R\u00e9serve de propri\u00e9t\u00e9": { + "account_number": "4816" + }, + "Retenues de garantie": { + "account_number": "4817" + }, + "Factures non parvenues": { + "account_number": "4818" + }, + "account_number": "481" + }, + "Fournisseurs d\u2019investissements, effets \u00e0 payer": { + "Immobilisations incorporelles": { + "account_number": "4821" + }, + "Immobilisations corporelles": { + "account_number": "4822" + }, + "account_number": "482" + }, + "Autres dettes hors activit\u00e9s ordinaires (HAO)": { + "Produits": { + "account_number": "4887" + }, + "account_number": "484" + } + }, + "root_type": "Liability" + }, + "Comptes de tr\u00e9sorerie": { + "Titres de placement": { + "Titres du tr\u00e9sor et bons de caisse \u00e0 court terme": { + "Titres du Tr\u00e9sor \u00e0 court terme": { + "account_number": "5011" + }, + "Titres d\u2019organismes financiers": { + "account_number": "5012" + }, + "Bons de caisse \u00e0 court terme": { + "account_number": "5013" + }, + "Frais d\u2019acquisition des titres de tr\u00e9sor et bons de caisse": { + "account_number": "5016" + }, + "account_number": "501" + }, + "Actions": { + "Actions ou parts propres": { + "account_number": "5021" + }, + "Actions cot\u00e9es": { + "account_number": "5022" + }, + "Actions non cot\u00e9es": { + "account_number": "5023" + }, + "Actions d\u00e9membr\u00e9es (certificats d\u2019investissement, droits de vote)": { + "account_number": "5024" + }, + "Autres actions": { + "account_number": "5025" + }, + "Frais d\u2019acquisition des actions": { + "account_number": "5026" + }, + "account_number": "502" + }, + "Obligations": { + "Obligations \u00e9mises par la soci\u00e9t\u00e9 et rachet\u00e9es par elle": { + "account_number": "5031" + }, + "Obligations cot\u00e9es": { + "account_number": "5032" + }, + "Obligations non cot\u00e9es": { + "account_number": "5033" + }, + "Autres obligations": { + "account_number": "5035" + }, + "Frais d\u2019acquisition des obligations": { + "account_number": "5036" + }, + "account_number": "503" + }, + "Bons de souscription": { + "Bons de souscription d\u2019actions": { + "account_number": "5042" + }, + "Bons de souscription d\u2019obligations": { + "account_number": "5043" + }, + "account_number": "504" + }, + "Titres n\u00e9gociables hors r\u00e9gion": { + "account_number": "505" + }, + "Int\u00e9r\u00eats courus": { + "Titres du Tr\u00e9sor et bons de caisse \u00e0 court terme": { + "account_number": "5061" + }, + "Actions": { + "account_number": "5062" + }, + "Obligations": { + "account_number": "5063" + }, + "account_number": "506" + }, + "Autres titres de placement et cr\u00e9ances assimil\u00e9es": { + "account_number": "508" + }, + "account_number": "50" + }, + "Valeurs \u00e0 encaisser": { + "Effets \u00e0 encaisser": { + "account_number": "511" + }, + "Effets \u00e0 l\u2019encaissement": { + "account_number": "512" + }, + "Ch\u00e8ques \u00e0 encaisser": { + "account_number": "513" + }, + "Ch\u00e8ques \u00e0 l\u2019encaissement": { + "account_number": "514" + }, + "Cartes de cr\u00e9dit \u00e0 encaisser": { + "account_number": "515" + }, + "Autres valeurs \u00e0 l\u2019encaissement": { + "Warrants": { + "account_number": "5181" + }, + "Billets de fonds": { + "account_number": "5182" + }, + "Ch\u00e8ques de voyage": { + "account_number": "5185" + }, + "Coupons \u00e9chus": { + "account_number": "5186" + }, + "Int\u00e9r\u00eats \u00e9chus des obligations": { + "account_number": "5187" + }, + "account_number": "518" + }, + "account_number": "51" + }, + "Banques": { + "Banques locales": { + "Banques en monnaie nationale": { + "account_type": "Bank", + "account_number": "5211" + }, + "Banques en devises": { + "account_type": "Bank", + "account_number": "5215" + }, + "account_type": "Bank", + "account_number": "521" + }, + "Banques autres \u00c9tats r\u00e9gion": { + "account_number": "522" + }, + "Banques autres \u00c9tats zone mon\u00e9taire": { + "account_number": "523" + }, + "Banques hors zone mon\u00e9taire": { + "account_number": "524" + }, + "Banques d\u00e9p\u00f4t \u00e0 terme": { + "account_number": "525" + }, + "Banques, int\u00e9r\u00eats courus": { + "Banque, int\u00e9r\u00eats courus, charges \u00e0 payer": { + "account_number": "5261" + }, + "Banque, int\u00e9r\u00eats courus, produits \u00e0 recevoir": { + "account_number": "5267" + }, + "account_number": "526" + }, + "account_number": "52" + }, + "\u00c9tablissements financiers et assimil\u00e9s": { + "Ch\u00e8ques postaux": { + "account_number": "531" + }, + "Tr\u00e9sor": { + "account_number": "532" + }, + "Soci\u00e9t\u00e9s de gestion et d\u2019interm\u00e9diation (SGI)": { + "account_number": "533" + }, + "\u00c9tablissements financiers, int\u00e9r\u00eats courus": { + "account_number": "536" + }, + "Autres organismes financiers": { + "account_number": "538" + }, + "account_number": "53" + }, + "Instruments de tr\u00e9sorerie": { + "Options de taux d\u2019int\u00e9r\u00eat": { + "account_number": "541" + }, + "Options de taux de change": { + "account_number": "542" + }, + "Options de taux boursiers": { + "account_number": "543" + }, + "Instruments de march\u00e9s \u00e0 terme": { + "account_number": "544" + }, + "Avoirs d\u2019or et autres m\u00e9taux pr\u00e9cieux": { + "account_number": "545" + }, + "account_number": "54" + }, + "Instruments de monnaie \u00e9lectronique": { + "Monnaie \u00e9lectronique carte carburant": { + "account_number": "551" + }, + "Monnaie \u00e9lectronique t\u00e9l\u00e9phone portable": { + "account_number": "552" + }, + "Monnaie \u00e9lectronique carte p\u00e9age": { + "account_number": "553" + }, + "Porte-monnaie \u00e9lectronique": { + "account_number": "554" + }, + "Autres instruments de monnaies \u00e9lectroniques": { + "account_number": "558" + }, + "account_number": "55" + }, + "Banques, cr\u00e9dits de tr\u00e9sorerie et d\u2019escompte": { + "Cr\u00e9dits de tr\u00e9sorerie": { + "account_number": "561" + }, + "Escompte de cr\u00e9dits de campagne": { + "account_number": "564" + }, + "Escompte de cr\u00e9dits ordinaires": { + "account_number": "565" + }, + "Banques, cr\u00e9dits de tr\u00e9sorerie, int\u00e9r\u00eats courus": { + "account_number": "566" + }, + "account_number": "56" + }, + "Caisse": { + "Caisse si\u00e8ge social": { + "Caisse en monnaie nationale": { + "account_number": "5711" + }, + "Caisse en devises": { + "account_number": "5712" + }, + "account_number": "571" + }, + "Caisse succursale A": { + "En monnaie nationale": { + "account_number": "5721" + }, + "En devises": { + "account_number": "5722" + }, + "account_number": "572" + }, + "Caisse succursale B": { + "En monnaie nationale": { + "account_number": "5731" + }, + "En devises": { + "account_number": "5732" + }, + "account_number": "573" + }, + "account_number": "57" + }, + "R\u00e9gies d\u2019avances, accr\u00e9ditifs et virements internes": { + "R\u00e9gies d\u2019avance": { + "account_number": "581" + }, + "Accr\u00e9ditifs": { + "account_number": "582" + }, + "Virements de fonds": { + "account_number": "585" + }, + "Autres virements internes": { + "account_number": "588" + }, + "account_number": "58" + }, + "D\u00e9pr\u00e9ciations et provisions pour risque \u00e0 court terme": { + "D\u00e9pr\u00e9ciations des titres de placement": { + "account_number": "590" + }, + "D\u00e9pr\u00e9ciations des titres et valeurs \u00e0 encaisser": { + "account_number": "591" + }, + "D\u00e9pr\u00e9ciations des comptes banques": { + "account_number": "592" + }, + "D\u00e9pr\u00e9ciations des comptes \u00e9tablissements financiers et assimil\u00e9s": { + "account_number": "593" + }, + "D\u00e9pr\u00e9ciations des comptes d\u2019instruments de tr\u00e9sorerie": { + "account_number": "594" + }, + "Provisions pour risque \u00e0 court terme \u00e0 caract\u00e8re financier": { + "account_number": "599" + }, + "account_number": "59" + }, + "root_type": "Asset", + "account_number": "5" + }, + "Comptes de charges des activit\u00e9s ordinaires": { + "Achats et variations de stocks": { + "Achats de marchandises": { + "Dans la R\u00e9gion": { + "account_number": "6011" + }, + "Hors R\u00e9gion": { + "account_number": "6012" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "6013" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "6014" + }, + "Frais sur achats": { + "account_number": "6015" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6019" + }, + "account_number": "601" + }, + "Achats de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "Dans la R\u00e9gion": { + "account_number": "6021" + }, + "Hors R\u00e9gion": { + "account_number": "6022" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "6023" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "6024" + }, + "Frais sur achats": { + "account_number": "6025" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6029" + }, + "account_number": "602" + }, + "Variations des stocks de biens achet\u00e9s": { + "Variations des stocks de marchandises": { + "account_number": "6031" + }, + "Variations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "account_number": "6032" + }, + "Variations des stocks d\u2019autres approvisionnements": { + "account_number": "6033" + }, + "account_number": "603" + }, + "Achats stock\u00e9s de mati\u00e8res et fournitures consommables": { + "Mati\u00e8res consommables": { + "account_number": "6041" + }, + "Mati\u00e8res combustibles": { + "account_number": "6042" + }, + "Produits d\u2019entretien": { + "account_number": "6043" + }, + "Fournitures d\u2019atelier et d\u2019usine": { + "account_number": "6044" + }, + "Frais sur achat": { + "account_number": "6045" + }, + "Fournitures de magasin": { + "account_number": "6046" + }, + "Fournitures de bureau": { + "account_number": "6047" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6049" + }, + "account_number": "604" + }, + "Autres achats": { + "Fournitures non stockables Eau": { + "account_number": "6051" + }, + "Fournitures non stockables \u00c9lectricit\u00e9": { + "account_number": "6052" + }, + "Fournitures non stockables Autres \u00e9nergies": { + "account_number": "6053" + }, + "Fournitures d\u2019entretien non stockables": { + "account_number": "6054" + }, + "Fournitures de bureau non stockables": { + "account_number": "6055" + }, + "Achats de petit mat\u00e9riel et outillage": { + "account_number": "6056" + }, + "Achats d\u2019\u00e9tudes et prestations de services": { + "account_number": "6057" + }, + "Achats de travaux, mat\u00e9riels et \u00e9quipements": { + "account_number": "6058" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6059" + }, + "account_number": "605" + }, + "Achats d\u2019emballages": { + "Emballages perdus": { + "account_number": "6081" + }, + "Emballages r\u00e9cup\u00e9rables non identifiables": { + "account_number": "6082" + }, + "Emballages \u00e0 usage mixte": { + "account_number": "6083" + }, + "Frais sur achats": { + "account_number": "6085" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6089" + }, + "account_number": "608" + }, + "account_number": "60" + }, + "Transports": { + "Transports sur ventes": { + "account_number": "612" + }, + "Transports pour le compte de tiers": { + "account_number": "613" + }, + "Transports du personnel": { + "account_number": "614" + }, + "Transports de plis": { + "account_number": "616" + }, + "Autres frais de transport": { + "Voyages et d\u00e9placements": { + "account_number": "6181" + }, + "Transports entre \u00e9tablissements ou chantiers": { + "account_number": "6182" + }, + "Transports administratifs": { + "account_number": "6183" + }, + "account_number": "618" + }, + "account_number": "61" + }, + "Services ext\u00e9rieurs": { + "Sous-traitance g\u00e9n\u00e9rale": { + "account_number": "621" + }, + "Locations, charges locatives": { + "Locations de terrains": { + "account_number": "6221" + }, + "Locations de b\u00e2timents": { + "account_number": "6222" + }, + "Locations de mat\u00e9riels et outillages": { + "account_number": "6223" + }, + "Malis sur emballages": { + "account_number": "6224" + }, + "Locations d\u2019emballages": { + "account_number": "6225" + }, + "Fermages et loyers du foncier": { + "account_number": "6226" + }, + "Locations et charges locatives diverses": { + "account_number": "6228" + }, + "account_number": "622" + }, + "Redevances de location acquisition": { + "Cr\u00e9dit-bail immobilier": { + "account_number": "6232" + }, + "Cr\u00e9dit-bail mobilier": { + "account_number": "6233" + }, + "Location-vente": { + "account_number": "6234" + }, + "Autres contrats de location acquisition": { + "account_number": "6238" + }, + "account_number": "623" + }, + "Entretien, r\u00e9parations, remise en \u00e9tat et maintenance": { + "Entretien et r\u00e9parations des biens immobiliers": { + "account_number": "6241" + }, + "Entretien et r\u00e9parations des biens mobiliers": { + "account_number": "6242" + }, + "Maintenance": { + "account_number": "6243" + }, + "Charges de d\u00e9mant\u00e8lement et remise en \u00e9tat": { + "account_number": "6244" + }, + "Autres entretiens et r\u00e9parations": { + "account_number": "6248" + }, + "account_number": "624" + }, + "Primes d\u2019assurance": { + "Assurances multirisques": { + "account_number": "6251" + }, + "Assurances mat\u00e9riel de transport": { + "account_number": "6252" + }, + "Assurances risques d\u2019exploitation": { + "account_number": "6253" + }, + "Assurances responsabilit\u00e9 du producteur": { + "account_number": "6254" + }, + "Assurances insolvabilit\u00e9 clients": { + "account_number": "6255" + }, + "Assurances transport sur ventes": { + "account_number": "6257" + }, + "Autres primes d\u2019assurances": { + "account_number": "6258" + }, + "account_number": "625" + }, + "\u00c9tudes, recherches et documentation": { + "\u00c9tudes et recherches": { + "account_number": "6261" + }, + "Documentation g\u00e9n\u00e9rale": { + "account_number": "6265" + }, + "Documentation technique": { + "account_number": "6266" + }, + "account_number": "626" + }, + "Publicit\u00e9, publications, relations publiques": { + "Annonces, insertions": { + "account_number": "6271" + }, + "Catalogues, imprim\u00e9s publicitaires": { + "account_number": "6272" + }, + "\u00c9chantillons": { + "account_number": "6273" + }, + "Foires et expositions": { + "account_number": "6274" + }, + "Publications": { + "account_number": "6275" + }, + "Cadeaux \u00e0 la client\u00e8le": { + "account_number": "6276" + }, + "Frais de colloques, s\u00e9minaires, conf\u00e9rences": { + "account_number": "6277" + }, + "Autres charges de publicit\u00e9 et relations publiques": { + "account_number": "6278" + }, + "account_number": "627" + }, + "Frais de t\u00e9l\u00e9communications": { + "Frais de t\u00e9l\u00e9phone": { + "account_number": "6281" + }, + "Frais de t\u00e9lex": { + "account_number": "6282" + }, + "Frais de t\u00e9l\u00e9copie": { + "account_number": "6283" + }, + "Autres frais de t\u00e9l\u00e9communications": { + "account_number": "6288" + }, + "account_number": "628" + }, + "account_number": "62" + }, + "Autres services ext\u00e9rieurs": { + "Frais bancaires": { + "Frais sur titres (vente, garde)": { + "account_number": "6311" + }, + "Frais sur effets": { + "account_number": "6312" + }, + "Location de coffres": { + "account_number": "6313" + }, + "Commissions d\u2019affacturage": { + "account_number": "6314" + }, + "Commissions sur cartes de cr\u00e9dit": { + "account_number": "6315" + }, + "Frais d\u2019\u00e9mission d\u2019emprunts": { + "account_number": "6316" + }, + "Frais sur instruments monnaie \u00e9lectronique": { + "account_number": "6317" + }, + "Autres frais bancaires": { + "account_number": "6318" + }, + "account_number": "631" + }, + "R\u00e9mun\u00e9rations d\u2019interm\u00e9diaires et de conseils": { + "Commissions et courtages sur ventes": { + "account_number": "6322" + }, + "Honoraires des professions r\u00e9glement\u00e9es": { + "account_number": "6324" + }, + "Frais d\u2019actes et de contentieux": { + "account_number": "6325" + }, + "R\u00e9mun\u00e9rations d\u2019affacturage": { + "account_number": "6326" + }, + "R\u00e9mun\u00e9rations des autres prestataires de services": { + "account_number": "6327" + }, + "Divers frais": { + "account_number": "6328" + }, + "account_number": "632" + }, + "Frais de formation du personnel": { + "account_number": "633" + }, + "Redevances pour brevets, licences, logiciels, concessions et droits et valeurs similaires": { + "Redevances pour brevets, licences": { + "account_number": "6342" + }, + "Redevances pour logiciels": { + "account_number": "6343" + }, + "Redevances pour marques": { + "account_number": "6344" + }, + "Redevances pour sites internet": { + "account_number": "6345" + }, + "Redevances pour concessions, droits et valeurs similaires": { + "account_number": "6346" + }, + "account_number": "634" + }, + "Cotisations": { + "Cotisations": { + "account_number": "6351" + }, + "Concours divers": { + "account_number": "6358" + }, + "account_number": "635" + }, + "R\u00e9mun\u00e9rations de personnel ext\u00e9rieur \u00e0 l\u2019entit\u00e9": { + "Personnel int\u00e9rimaire": { + "account_number": "6371" + }, + "Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": { + "account_number": "6372" + }, + "account_number": "637" + }, + "Autres charges externes": { + "Frais de recrutement du personnel": { + "account_number": "6381" + }, + "Frais de d\u00e9m\u00e9nagement": { + "account_number": "6382" + }, + "R\u00e9ceptions": { + "account_number": "6383" + }, + "Missions": { + "account_number": "6384" + }, + "Charges de copropri\u00e9t\u00e9": { + "account_number": "6385" + }, + "account_number": "638" + }, + "account_number": "63" + }, + "Imp\u00f4ts et taxes": { + "Imp\u00f4ts et taxes directs": { + "Imp\u00f4ts fonciers et taxes annexes": { + "account_number": "6411" + }, + "Patentes, licences et taxes annexes": { + "account_number": "6412" + }, + "Taxes sur appointements et salaires": { + "account_number": "6413" + }, + "Taxes d\u2019apprentissage": { + "account_number": "6414" + }, + "Formation professionnelle continue": { + "account_number": "6415" + }, + "Autres imp\u00f4ts et taxes directs": { + "account_number": "6418" + }, + "account_number": "641" + }, + "Imp\u00f4ts et taxes indirects": { + "account_number": "645" + }, + "Droits d\u2019enregistrement": { + "Droits de mutation": { + "account_number": "6461" + }, + "Droits de timbre": { + "account_number": "6462" + }, + "Taxes sur les v\u00e9hicules de soci\u00e9t\u00e9": { + "account_number": "6463" + }, + "Vignettes": { + "account_number": "6464" + }, + "Autres droits": { + "account_number": "6468" + }, + "account_number": "646" + }, + "P\u00e9nalit\u00e9s, amendes fiscales": { + "P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts directs": { + "account_number": "6471" + }, + "P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts indirects": { + "account_number": "6472" + }, + "P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts directs": { + "account_number": "6473" + }, + "P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts indirects": { + "account_number": "6474" + }, + "Autres p\u00e9nalit\u00e9s et amendes fiscales": { + "account_number": "6478" + }, + "account_number": "647" + }, + "Autres imp\u00f4ts et taxes": { + "account_number": "648" + }, + "account_number": "64" + }, + "Autres charges": { + "Pertes sur cr\u00e9ances clients et autres d\u00e9biteurs": { + "Clients": { + "account_number": "6511" + }, + "Autres d\u00e9biteurs": { + "account_number": "6515" + }, + "account_number": "651" + }, + "Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "Quote-part transf\u00e9r\u00e9e de b\u00e9n\u00e9fices (comptabilit\u00e9 du g\u00e9rant)": { + "account_number": "6521" + }, + "Pertes imput\u00e9es par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": { + "account_number": "6525" + }, + "account_number": "652" + }, + "Valeurs comptables des cessions courantes d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "6541" + }, + "Immobilisations corporelles": { + "account_number": "6542" + }, + "account_number": "654" + }, + "Perte de change sur cr\u00e9ances et dettes commerciale": { + "account_number": "656" + }, + "P\u00e9nalit\u00e9s et amendes p\u00e9nales": { + "account_number": "657" + }, + "Charges diverses": { + "Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": { + "account_number": "6581" + }, + "Dons": { + "account_number": "6582" + }, + "M\u00e9c\u00e9nat": { + "account_number": "6583" + }, + "Autres charges diverses": { + "account_number": "6588" + }, + "account_number": "658" + }, + "Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "Sur risques \u00e0 court terme": { + "account_number": "6591" + }, + "Sur stocks": { + "account_number": "6593" + }, + "Sur cr\u00e9ances": { + "account_number": "6594" + }, + "Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme": { + "account_number": "6598" + }, + "account_number": "659" + }, + "account_number": "65" + }, + "Charges de personnel": { + "R\u00e9mun\u00e9rations directes vers\u00e9es au personnel national": { + "Appointements salaires et commissions": { + "account_number": "6611" + }, + "Primes et gratifications": { + "account_number": "6612" + }, + "Cong\u00e9s pay\u00e9s": { + "account_number": "6613" + }, + "Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": { + "account_number": "6614" + }, + "Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": { + "account_number": "6615" + }, + "Suppl\u00e9ment familial": { + "account_number": "6616" + }, + "Avantages en nature": { + "account_number": "6617" + }, + "Autres r\u00e9mun\u00e9rations directes": { + "account_number": "6618" + }, + "account_number": "661" + }, + "R\u00e9mun\u00e9rations directes vers\u00e9es au personnel non national": { + "Appointements salaires et commissions": { + "account_number": "6621" + }, + "Primes et gratifications": { + "account_number": "6622" + }, + "Cong\u00e9s pay\u00e9s": { + "account_number": "6623" + }, + "Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": { + "account_number": "6624" + }, + "Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": { + "account_number": "6625" + }, + "Suppl\u00e9ment familial": { + "account_number": "6626" + }, + "Avantages en nature": { + "account_number": "6627" + }, + "Autres r\u00e9mun\u00e9rations directes": { + "account_number": "6628" + }, + "account_number": "662" + }, + "Indemnit\u00e9s forfaitaires vers\u00e9es au personnel": { + "Indemnit\u00e9s de logement": { + "account_number": "6631" + }, + "Indemnit\u00e9s de repr\u00e9sentation": { + "account_number": "6632" + }, + "Indemnit\u00e9s d\u2019expatriation": { + "account_number": "6633" + }, + "Indemnit\u00e9s de transport": { + "account_number": "6634" + }, + "Autres indemnit\u00e9s et avantages divers": { + "account_number": "6638" + }, + "account_number": "663" + }, + "Charges sociales": { + "Charges sociales sur r\u00e9mun\u00e9ration du personnel national": { + "account_number": "6641" + }, + "Charges sociales sur r\u00e9mun\u00e9ration du personnel non national": { + "account_number": "6642" + }, + "account_number": "664" + }, + "R\u00e9mun\u00e9rations et charges sociales de l\u2019exploitant individuel": { + "R\u00e9mun\u00e9ration du travail de l\u2019exploitant": { + "account_number": "6661" + }, + "Charges sociales": { + "account_number": "6662" + }, + "account_number": "666" + }, + "R\u00e9mun\u00e9ration transf\u00e9r\u00e9e de personnel ext\u00e9rieur": { + "Personnel int\u00e9rimaire": { + "account_number": "6671" + }, + "Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": { + "account_number": "6672" + }, + "account_number": "667" + }, + "Autres charges sociales": { + "Versements aux syndicats et comit\u00e9s d\u2019entreprise, d\u2019\u00e9tablissement": { + "account_number": "6681" + }, + "Versements aux comit\u00e9s d\u2019hygi\u00e8ne et de s\u00e9curit\u00e9": { + "account_number": "6682" + }, + "Versements et contributions aux autres \u0153uvres sociales": { + "account_number": "6683" + }, + "M\u00e9decine du travail et pharmacie": { + "account_number": "6684" + }, + "Assurances et organismes de sant\u00e9": { + "account_number": "6685" + }, + "Assurances retraite et fonds de pension": { + "account_number": "6686" + }, + "Majorations et p\u00e9nalit\u00e9s sociales": { + "account_number": "6687" + }, + "Charges sociales diverses": { + "account_number": "6688" + }, + "account_number": "668" + }, + "account_number": "66" + }, + "Frais financiers et charges assimil\u00e9es": { + "Int\u00e9r\u00eats des emprunts": { + "Emprunts obligataires": { + "account_number": "6711" + }, + "Emprunts aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": { + "account_number": "6712" + }, + "Dettes li\u00e9es \u00e0 des participations": { + "account_number": "6713" + }, + "Primes de remboursement des obligations": { + "account_number": "6714" + }, + "account_number": "671" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition": { + "Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail immobilier": { + "account_number": "6722" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail mobilier": { + "account_number": "6723" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition / location-vente": { + "account_number": "6724" + }, + "Int\u00e9r\u00eats dans loyers des autres locations acquisition": { + "account_number": "6728" + }, + "account_number": "672" + }, + "Escomptes accord\u00e9s": { + "account_number": "673" + }, + "Autres int\u00e9r\u00eats": { + "Avances re\u00e7ues et d\u00e9p\u00f4ts cr\u00e9diteurs": { + "account_number": "6741" + }, + "Comptes courants bloqu\u00e9s": { + "account_number": "6742" + }, + "Int\u00e9r\u00eats sur obligations cautionn\u00e9es": { + "account_number": "6743" + }, + "Int\u00e9r\u00eats sur dettes commerciales": { + "account_number": "6744" + }, + "Int\u00e9r\u00eats bancaires et sur op\u00e9rations de financement (escompte...)": { + "account_number": "6745" + }, + "Int\u00e9r\u00eats sur dettes diverses": { + "account_number": "6748" + }, + "account_number": "674" + }, + "Escomptes des effets de commerce": { + "account_number": "675" + }, + "Pertes de change financi\u00e8res": { + "account_number": "676" + }, + "Pertes sur titres de placement": { + "Pertes sur cessions de titres de placement": { + "account_number": "6771" + }, + "Mali provenant d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": { + "account_number": "6772" + }, + "account_number": "677" + }, + "Pertes et charges sur risques financiers": { + "Sur rentes viag\u00e8res": { + "account_number": "6781" + }, + "Sur op\u00e9rations financi\u00e8res": { + "account_number": "6782" + }, + "Sur instruments de tr\u00e9sorerie": { + "account_number": "6784" + }, + "account_number": "678" + }, + "Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "Sur risques financiers": { + "account_number": "6791" + }, + "Sur titres de placement": { + "account_number": "6795" + }, + "Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "account_number": "6798" + }, + "account_number": "679" + }, + "account_number": "67" + }, + "Dotations aux amortissements": { + "Dotations aux amortissements d\u2019exploitation": { + "Dotations aux amortissements des immobilisations incorporelles": { + "account_number": "6812" + }, + "Dotations aux amortissements des immobilisations corporelles": { + "account_number": "6813" + }, + "account_number": "681" + }, + "account_number": "68" + }, + "Dotations aux provisions et aux d\u00e9pr\u00e9ciations": { + "Dotations aux provisions et aux d\u00e9pr\u00e9ciations d\u2019exploitation": { + "Dotations aux provisions pour risques et charges": { + "account_number": "6911" + }, + "Dotations aux d\u00e9pr\u00e9ciations des immobilisations incorporelles": { + "account_number": "6913" + }, + "Dotations aux d\u00e9pr\u00e9ciations des immobilisations corporelles": { + "account_number": "6914" + }, + "account_number": "691" + }, + "Dotations aux provisions et aux d\u00e9pr\u00e9ciations financi\u00e8res": { + "Dotations aux provisions pour risques et charges": { + "account_number": "6971" + }, + "Dotations aux d\u00e9pr\u00e9ciations des immobilisations financi\u00e8res": { + "account_number": "6972" + }, + "account_number": "697" + }, + "account_number": "69" + }, + "root_type": "Expense", + "account_number": "6" + }, + "Comptes de produits des activit\u00e9s ordinaires": { + "Ventes": { + "Ventes de marchandises": { + "Dans la R\u00e9gion": { + "account_number": "7011" + }, + "Hors R\u00e9gion": { + "account_number": "7012" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7013" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7014" + }, + "Sur internet": { + "account_number": "7015" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7019" + }, + "account_number": "701" + }, + "Ventes de produits finis": { + "Dans la R\u00e9gion": { + "account_number": "7021" + }, + "Hors R\u00e9gion": { + "account_number": "7022" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7023" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7024" + }, + "Sur internet": { + "account_number": "7025" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7029" + }, + "account_number": "702" + }, + "Ventes de produits interm\u00e9diaires": { + "Dans la R\u00e9gion": { + "account_number": "7031" + }, + "Hors R\u00e9gion": { + "account_number": "7032" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7033" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7034" + }, + "Sur internet": { + "account_number": "7035" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7039" + }, + "account_number": "703" + }, + "Ventes de produits r\u00e9siduels": { + "Dans la R\u00e9gion": { + "account_number": "7041" + }, + "Hors R\u00e9gion": { + "account_number": "7042" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7043" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7044" + }, + "Sur internet": { + "account_number": "7045" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7049" + }, + "account_number": "704" + }, + "Travaux factur\u00e9s": { + "Dans la R\u00e9gion": { + "account_number": "7051" + }, + "Hors R\u00e9gion": { + "account_number": "7052" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7053" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7054" + }, + "Sur internet": { + "account_number": "7055" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7059" + }, + "account_number": "705" + }, + "Services vendus": { + "Dans la R\u00e9gion": { + "account_number": "7061" + }, + "Hors R\u00e9gion": { + "account_number": "7062" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7063" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7064" + }, + "Sur internet": { + "account_number": "7065" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7069" + }, + "account_number": "706" + }, + "Produits accessoires": { + "Ports, emballages perdus et autres frais factur\u00e9s": { + "account_number": "7071" + }, + "Commissions et courtages": { + "account_number": "7072" + }, + "Locations": { + "account_number": "7073" + }, + "Bonis sur reprises et cessions d\u2019emballages": { + "account_number": "7074" + }, + "Mise \u00e0 disposition de personnel": { + "account_number": "7075" + }, + "Redevances pour brevets, logiciels, marques et droits similaires": { + "account_number": "7076" + }, + "Services exploit\u00e9s dans l\u2019int\u00e9r\u00eat du personnel": { + "account_number": "7077" + }, + "Autres produits accessoires": { + "account_number": "7078" + }, + "account_number": "707" + }, + "account_number": "70" + }, + "Subventions d\u2019exploitation": { + "Sur produits \u00e0 l\u2019exportation": { + "account_number": "711" + }, + "Sur produits \u00e0 l\u2019importation": { + "account_number": "712" + }, + "Sur produits de p\u00e9r\u00e9quation": { + "account_number": "713" + }, + "Indemnit\u00e9s et subventions d\u2019exploitation (entit\u00e9 agricole)": { + "account_number": "714" + }, + "Autres subventions d\u2019exploitation": { + "Vers\u00e9es par l\u2019\u00c9tat et les collectivit\u00e9s publiques": { + "account_number": "7181" + }, + "Vers\u00e9es par les organismes internationaux": { + "account_number": "7182" + }, + "Vers\u00e9es par des tiers": { + "account_number": "7183" + }, + "account_number": "718" + }, + "account_number": "71" + }, + "Production immobilis\u00e9e": { + "Immobilisations incorporelles": { + "account_number": "721" + }, + "Immobilisations corporelles": { + "Immobilisations corporelles (hors actifs biologiques)": { + "account_number": "7221" + }, + "Immobilisations corporelles (actifs biologiques)": { + "account_number": "7222" + }, + "account_number": "722" + }, + "Production auto-consomm\u00e9e": { + "account_number": "724" + }, + "Immobilisations financi\u00e8res": { + "account_number": "726" + }, + "account_number": "72" + }, + "Variations des stocks de biens et de services produits": { + "Variations des stocks de produits en cours": { + "Produits en cours": { + "account_number": "7341" + }, + "Travaux en cours": { + "account_number": "7342" + }, + "account_number": "734" + }, + "Variations des en-cours de services": { + "\u00c9tudes en cours": { + "account_number": "7351" + }, + "Prestations de services en cours": { + "account_number": "7352" + }, + "account_number": "735" + }, + "Variations des stocks de produits finis": { + "account_number": "736" + }, + "Variations des stocks de produits interm\u00e9diaires et r\u00e9siduels": { + "Produits interm\u00e9diaires": { + "account_number": "7371" + }, + "Produits r\u00e9siduels": { + "account_number": "7372" + }, + "account_number": "737" + }, + "account_number": "73" + }, + "Autres produits": { + "Profits sur cr\u00e9ances clients et autres d\u00e9biteurs": { + "account_number": "751" + }, + "Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "Quote-part transf\u00e9r\u00e9e de pertes (comptabilit\u00e9 du g\u00e9rant)": { + "account_number": "7521" + }, + "B\u00e9n\u00e9fices attribu\u00e9s par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": { + "account_number": "7525" + }, + "account_number": "752" + }, + "Produits des cessions courantes d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "7541" + }, + "Immobilisations corporelles": { + "account_number": "7542" + }, + "account_number": "754" + }, + "Gains de change sur cr\u00e9ances et dettes commerciales": { + "account_number": "756" + }, + "Produits divers": { + "Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": { + "account_number": "7581" + }, + "Indemnit\u00e9s d\u2019assurances re\u00e7ues": { + "account_number": "7582" + }, + "Autres produits divers": { + "account_number": "7588" + }, + "account_number": "758" + }, + "Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "Sur risques \u00e0 court terme": { + "account_number": "7591" + }, + "Sur stocks": { + "account_number": "7593" + }, + "Sur cr\u00e9ances": { + "account_number": "7594" + }, + "Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "account_number": "7598" + }, + "account_number": "759" + }, + "account_number": "75" + }, + "Revenus financiers et produits assimil\u00e9s": { + "Int\u00e9r\u00eats de pr\u00eats et cr\u00e9ances diverses": { + "Int\u00e9r\u00eats de pr\u00eats": { + "account_number": "7712" + }, + "Int\u00e9r\u00eats sur cr\u00e9ances diverses": { + "account_number": "7713" + }, + "account_number": "771" + }, + "Revenus de participations et autres titres immobilis\u00e9s": { + "Revenus des titres de participation": { + "account_number": "7721" + }, + "Revenus autres titres immobilis\u00e9s": { + "account_number": "7722" + }, + "account_number": "772" + }, + "Escomptes obtenus": { + "account_number": "773" + }, + "Revenus de placement": { + "Revenus des obligations": { + "account_number": "7745" + }, + "Revenus des titres de placement": { + "account_number": "7746" + }, + "account_number": "774" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition": { + "account_number": "775" + }, + "Gains de change financiers": { + "account_number": "776" + }, + "Gains sur cessions de titres de placement": { + "account_number": "777" + }, + "Gains sur risques financiers": { + "Sur rentes viag\u00e8res": { + "account_number": "7781" + }, + "Sur op\u00e9rations financi\u00e8res": { + "account_number": "7782" + }, + "Sur instruments de tr\u00e9sorerie": { + "account_number": "7784" + }, + "account_number": "778" + }, + "Reprises de charges pour d\u00e9pr\u00e9ciations et provisions \u00e0 court terme financi\u00e8res": { + "Sur risques financiers": { + "account_number": "7791" + }, + "Sur titres de placement": { + "account_number": "7795" + }, + "Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "account_number": "7798" + }, + "account_number": "779" + }, + "account_number": "77" + }, + "Transferts de charges": { + "Transferts de charges d\u2019exploitation": { + "account_number": "781" + }, + "Transferts de charges financi\u00e8res": { + "account_number": "787" + }, + "account_number": "78" + }, + "Reprises de provisions, de d\u00e9pr\u00e9ciations et autres": { + "Reprises de provisions et d\u00e9pr\u00e9ciations d\u2019exploitation": { + "Pour risques et charges": { + "account_number": "7911" + }, + "Des immobilisations incorporelles": { + "account_number": "7913" + }, + "Des immobilisations corporelles": { + "account_number": "7914" + }, + "account_number": "791" + }, + "Reprises de provisions et d\u00e9pr\u00e9ciations financi\u00e8res": { + "Pour risques et charges": { + "account_number": "7971" + }, + "Des immobilisations financi\u00e8res": { + "account_number": "7972" + }, + "account_number": "797" + }, + "Reprises d\u2019amortissements": { + "account_number": "798" + }, + "Reprises de subventions d\u2019investissement": { + "account_number": "799" + }, + "account_number": "79" + }, + "root_type": "Income", + "account_number": "7" + }, + "8-Comptes des autres charges et des autres produits (CHARGES)": { + "Valeurs comptables des cessions d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "811" + }, + "Immobilisations corporelles": { + "account_number": "812" + }, + "Immobilisations financi\u00e8res": { + "account_number": "816" + }, + "account_number": "81" + }, + "Charges hors activit\u00e9s ordinaires": { + "Charges HAO constat\u00e9es": { + "account_number": "831" + }, + "Charges li\u00e9es aux op\u00e9rations de restructuration": { + "account_number": "833" + }, + "Pertes sur cr\u00e9ances HAO": { + "account_number": "834" + }, + "Dons et lib\u00e9ralit\u00e9s accord\u00e9s": { + "account_number": "835" + }, + "Abandons de cr\u00e9ances consentis": { + "account_number": "836" + }, + "Charges li\u00e9es aux op\u00e9rations de liquidation": { + "account_number": "837" + }, + "Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": { + "account_number": "839" + }, + "account_number": "83" + }, + "Dotations hors activit\u00e9s ordinaires": { + "Dotations aux provisions r\u00e9glement\u00e9es": { + "account_number": "851" + }, + "Dotations aux amortissements HAO": { + "account_number": "852" + }, + "Dotations aux d\u00e9pr\u00e9ciations HAO": { + "account_number": "853" + }, + "Dotations aux provisions pour risques et charges HAO": { + "account_number": "854" + }, + "Autres dotations HAO": { + "account_number": "858" + }, + "account_number": "85" + }, + "Participation des travailleurs": { + "Participation l\u00e9gale aux b\u00e9n\u00e9fices": { + "account_number": "871" + }, + "Participation contractuelle aux b\u00e9n\u00e9fices": { + "account_number": "874" + }, + "Autres participations": { + "account_number": "878" + }, + "account_number": "87" + }, + "Imp\u00f4ts sur le r\u00e9sultat": { + "Imp\u00f4ts sur les b\u00e9n\u00e9fices de l\u2019exercice": { + "Activit\u00e9s exerc\u00e9es dans l\u2019\u00c9tat": { + "account_number": "8911" + }, + "Activit\u00e9s exerc\u00e9es dans les autres \u00c9tats de la R\u00e9gion": { + "account_number": "8912" + }, + "Activit\u00e9s exerc\u00e9es hors R\u00e9gion": { + "account_number": "8913" + }, + "account_number": "891" + }, + "Rappel d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": { + "account_number": "892" + }, + "Imp\u00f4t minimum forfaitaire IMF": { + "account_number": "895" + }, + "D\u00e9gr\u00e8vements et annulations d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": { + "D\u00e9gr\u00e8vements": { + "account_number": "8991" + }, + "Annulations pour pertes r\u00e9troactives": { + "account_number": "8994" + }, + "account_number": "899" + }, + "account_number": "89" + }, + "root_type": "Expense" + }, + "8-Comptes des autres charges et des autres produits (PRODUITS)": { + "Produits des cessions d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "821" + }, + "Immobilisations corporelles": { + "account_number": "822" + }, + "Immobilisations financi\u00e8res": { + "account_number": "826" + }, + "account_number": "82" + }, + "Produits hors activit\u00e9s ordinaires": { + "Produits HAO constat\u00e9s": { + "account_number": "841" + }, + "Produits li\u00e9s aux op\u00e9rations de restructuration": { + "account_number": "843" + }, + "Indemnit\u00e9s et subventions HAO (entit\u00e9 agricole)": { + "account_number": "844" + }, + "Dons et lib\u00e9ralit\u00e9s obtenus": { + "account_number": "845" + }, + "Abandons de cr\u00e9ances obtenus": { + "account_number": "846" + }, + "Produits li\u00e9s aux op\u00e9rations de liquidation": { + "account_number": "847" + }, + "Transferts de charges HAO": { + "account_number": "848" + }, + "Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": { + "account_number": "849" + }, + "account_number": "84" + }, + "Reprises de charges, provisions et d\u00e9pr\u00e9ciations HAO": { + "Reprises de provisions r\u00e9glement\u00e9es": { + "account_number": "861" + }, + "Reprises d\u2019amortissements HAO": { + "account_number": "862" + }, + "Reprises de d\u00e9pr\u00e9ciations HAO": { + "account_number": "863" + }, + "Reprises de provisions pour risques et charges HAO": { + "account_number": "864" + }, + "Autres reprises HAO": { + "account_number": "868" + }, + "account_number": "86" + }, + "Subventions d\u2019\u00e9quilibre": { + "\u00c9tat": { + "account_number": "881" + }, + "Collectivit\u00e9s publiques": { + "account_number": "884" + }, + "Groupe": { + "account_number": "886" + }, + "Autres": { + "account_number": "888" + }, + "account_number": "88" + }, + "root_type": "Income" + } + } +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/gq_plan_comptable.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/gq_plan_comptable.json new file mode 100644 index 00000000000..ba2d8c7650b --- /dev/null +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/gq_plan_comptable.json @@ -0,0 +1,1919 @@ +{ + "country_code": "gq", + "name": "Syscohada - Plan Comptable", + "tree": { + "1-Comptes de ressources durables": { + "10-Capital": { + "101-Capital social": { + "1011-Capital souscrit, non appel\u00e9": {}, + "1012-Capital souscrit, appel\u00e9, non vers\u00e9": {}, + "1013-Capital souscrit, appel\u00e9, vers\u00e9, non amorti": {}, + "1014-Capital souscrit, appel\u00e9, vers\u00e9, amorti": {}, + "1018-Capital souscrit soumis \u00e0 des conditions particuli\u00e8res": {} + }, + "102-Capital par dotation": { + "1021-Dotation initiale": {}, + "1022-Dotations compl\u00e9mentaires": {}, + "1028-Autres dotations": {} + }, + "103-Capital personnel": {}, + "104-Compte de l\u2019exploitant": { + "1041-Apports temporaires": {}, + "1042-Op\u00e9rations courantes": {}, + "1043-R\u00e9mun\u00e9rations, imp\u00f4ts et autres charges personnelles": {}, + "1047-Pr\u00e9l\u00e8vements d\u2019autoconsommation": {}, + "1048-Autres pr\u00e9l\u00e8vements": {} + }, + "105-Primes li\u00e9es au capital social": { + "1051-Primes d\u2019\u00e9mission": {}, + "1052-Primes d\u2019apport": {}, + "1053-Primes de fusion": {}, + "1054-Primes de conversion": {}, + "1058-Autres primes": {} + }, + "106-\u00c9carts de r\u00e9\u00e9valuation": { + "1061-\u00c9carts de r\u00e9\u00e9valuation l\u00e9gale": {}, + "1062-\u00c9carts de r\u00e9\u00e9valuation libre": {} + }, + "109-Apporteurs, capital souscrit, non appel\u00e9": {} + }, + "11-R\u00e9serves": { + "111-R\u00e9serve l\u00e9gale": {}, + "112-R\u00e9serves statutaires ou contractuelles": {}, + "113-R\u00e9serves r\u00e9glement\u00e9es": { + "1131-R\u00e9serves de plus-values nettes \u00e0 long terme": {}, + "1132-R\u00e9serves d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": {}, + "1133-R\u00e9serves cons\u00e9cutives \u00e0 l\u2019octroi de subventions d\u2019investissement": {}, + "1134-R\u00e9serves des valeurs mobili\u00e8res donnant acc\u00e8s au capital": {}, + "1135-Autres r\u00e9serves r\u00e9glement\u00e9es": {} + }, + "118-Autres r\u00e9serves": { + "1181-R\u00e9serves facultatives": {}, + "1188-R\u00e9serves diverses": {} + } + }, + "12-Report \u00e0 nouveau": { + "121-Report \u00e0 nouveau cr\u00e9diteur": {}, + "129-Report \u00e0 nouveau d\u00e9biteur": { + "1291-Perte nette \u00e0 reporter": {}, + "1292-Perte Amortissements r\u00e9put\u00e9s diff\u00e9r\u00e9s": {} + } + }, + "13-R\u00e9sultat net de l\u2019exercice": { + "130-R\u00e9sultat en instance d\u2019affectation": { + "1301-R\u00e9sultat en instance d\u2019affectation : b\u00e9n\u00e9fice": {}, + "1309-R\u00e9sultat en instance d\u2019affectation : perte": {} + }, + "131-R\u00e9sultat net : b\u00e9n\u00e9fice": {}, + "132-Marge commerciale (MC)": {}, + "133-Valeur ajout\u00e9e (VA)": {}, + "134-Exc\u00e9dent brut d\u2019exploitation (EBE)": {}, + "135-R\u00e9sultat d\u2019exploitation (RE)": {}, + "136-R\u00e9sultat financier (RF)": {}, + "137-R\u00e9sultat des activit\u00e9s ordinaires (RAO)": {}, + "138-R\u00e9sultat hors activit\u00e9s ordinaires (RHAO)": { + "1381-R\u00e9sultat de fusion": {}, + "1382-R\u00e9sultat d\u2019apport partiel d\u2019actif": {}, + "1383-R\u00e9sultat de scission": {}, + "1384-R\u00e9sultat de liquidation": {} + }, + "139-R\u00e9sultat net : perte": {} + }, + "14-Subventions d\u2019investissement": { + "141-Subventions d\u2019\u00e9quipement": { + "1411-\u00c9tat": {}, + "1412-R\u00e9gions": {}, + "1413-D\u00e9partements": {}, + "1414-Communes et collectivit\u00e9s publiques d\u00e9centralis\u00e9es": {}, + "1415-Entit\u00e9s publiques ou mixtes": {}, + "1416-Entit\u00e9s et organismes priv\u00e9s": {}, + "1417-Organismes internationaux": {}, + "1418-Autres": {} + }, + "148-Autres subventions d\u2019investissement": {} + }, + "15-Provisions r\u00e9glement\u00e9es et fonds assimil\u00e9s": { + "151-Amortissements d\u00e9rogatoires": {}, + "152-Plus-values de cession \u00e0 r\u00e9investir": {}, + "153-Fonds r\u00e9glement\u00e9s": { + "1531-Fonds National": {}, + "1532-Pr\u00e9l\u00e8vement pour le Budget": {} + }, + "154-Provisions sp\u00e9ciales de r\u00e9\u00e9valuation": {}, + "155-Provisions r\u00e9glement\u00e9es relatives aux immobilisations": { + "1551-Reconstitution des gisements miniers et p\u00e9troliers": {} + }, + "156-Provisions r\u00e9glement\u00e9es relatives aux stocks": { + "1561-Hausse de prix": {}, + "1562-Fluctuation des cours": {} + }, + "157-Provisions pour investissement": {}, + "158-Autres provisions et fonds r\u00e9glement\u00e9s": {} + }, + "16-Emprunts et dettes assimil\u00e9es": { + "161-Emprunts obligataires": { + "1611-Emprunts obligataires ordinaires": {}, + "1612-Emprunts obligataires convertibles en actions": {}, + "1613-Emprunts obligataires remboursables en actions": {}, + "1618-Autres emprunts obligataires": {} + }, + "162-Emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": {}, + "163-Avances re\u00e7ues de l\u2019\u00c9tat": {}, + "164-Avances re\u00e7ues et comptes courants bloqu\u00e9s": {}, + "165-D\u00e9p\u00f4ts et cautionnements re\u00e7us": { + "1651-D\u00e9p\u00f4ts": {}, + "1652-Cautionnements": {} + }, + "166-Int\u00e9r\u00eats courus": { + "1661-Sur emprunts obligataires": {}, + "1662-Sur emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": {}, + "1663-Sur avances re\u00e7ues de l\u2019\u00c9tat": {}, + "1664-Sur avances re\u00e7ues et comptes courants bloqu\u00e9s": {}, + "1665-Sur d\u00e9p\u00f4ts et cautionnements re\u00e7us": {}, + "1667-Sur avances assorties de conditions particuli\u00e8res": {}, + "1668-Sur autres emprunts et dettes": {} + }, + "167-Avances assorties de conditions particuli\u00e8res": { + "1671-Avances bloqu\u00e9es pour augmentation du capital": {}, + "1672-Avances conditionn\u00e9es par l\u2019\u00c9tat": {}, + "1673-Avances conditionn\u00e9es par les autres organismes africains": {}, + "1674-Avances conditionn\u00e9es par les organismes internationaux": {} + }, + "168-Autres emprunts et dettes": { + "1681-Rentes viag\u00e8res capitalis\u00e9es": {}, + "1682-Billets de fonds": {}, + "1683-Dettes cons\u00e9cutives \u00e0 des titres emprunt\u00e9s": {}, + "1684-Emprunts participatifs": {}, + "1685-Participation des travailleurs aux b\u00e9n\u00e9fices": {}, + "1686-Emprunts et dettes contract\u00e9s aupr\u00e8s des autres tiers": {} + } + }, + "17-Dettes de location acquisition": { + "172-Dettes de location acquisition / cr\u00e9dit bail immobilier": {}, + "173-Dettes de location acquisition / cr\u00e9dit bail mobilier": {}, + "174-Dettes de location acquisition / location de vente": {}, + "176-Int\u00e9r\u00eats courus": { + "1762-Sur dettes de location acquisition / cr\u00e9dit-bail immobilier": {}, + "1763-Sur dettes de location acquisition / cr\u00e9dit-bail mobilier": {}, + "1764-Sur dettes de location acquisition / location-vente": {}, + "1768-Sur autres dettes de location acquisition": {} + }, + "178-Autres dettes de location acquisition": {} + }, + "18-Dettes li\u00e9es \u00e0 des participations et comptes de liaison des \u00e9tablissements et soci\u00e9t\u00e9s en participation": { + "181-Dettes li\u00e9es \u00e0 des participations": { + "1811-Dettes li\u00e9es \u00e0 des participations (groupe)": {}, + "1812-Dettes li\u00e9es \u00e0 des participations (hors groupe)": {} + }, + "182-Dettes li\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": {}, + "183-Int\u00e9r\u00eats courus sur dettes li\u00e9es \u00e0 des participations": {}, + "184-Comptes permanents bloqu\u00e9s des \u00e9tablissements et succursales": {}, + "185-Comptes permanents non bloqu\u00e9s des \u00e9tablissements et succursales": {}, + "186-Comptes de liaison charges": {}, + "187-Comptes de liaison produits": {}, + "188-Comptes de liaison des soci\u00e9t\u00e9s en participation": {} + }, + "19-Provisions pour risques et charges": { + "191-Provisions pour litiges": {}, + "192-Provisions pour garanties donn\u00e9es aux clients": {}, + "193-Provisions pour pertes sur march\u00e9s \u00e0 ach\u00e8vement futur": {}, + "194-Provisions pour pertes de change": {}, + "195-Provisions pour imp\u00f4ts": {}, + "196-Provisions pour pensions et obligations similaires": { + "1961-Provisions pour pensions et obligations similaires engagement de retraite": {}, + "1962-Actif du r\u00e9gime de retraite": {} + }, + "197-Provisions pour restructuration": {}, + "198-Autres provisions pour risques et charges": { + "1981-Provisions pour amendes et p\u00e9nalit\u00e9s": {}, + "1983-Provisions pour propre assureur": {}, + "1984-Provisions pour d\u00e9mant\u00e8lement et remise en \u00e9tat": {}, + "1985-Provisions pour droits \u00e0 r\u00e9duction ou avantage en nature (ch\u00e8ques cadeau, cartes de fid\u00e9lit\u00e9...)": {}, + "1988-Provisions pour divers risques et charges": {} + } + }, + "root_type": "Equity" + }, + "2-Comptes d\u2019actif immobilis\u00e9": { + "21-Immobilisations incorporelles": { + "account_type": "Fixed Asset", + "211-Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset" + }, + "212-Brevets, licences, concessions et droits similaires": { + "account_type": "Fixed Asset", + "2121-Brevets": { + "account_type": "Fixed Asset" + }, + "2122-Licences": { + "account_type": "Fixed Asset" + }, + "2123-Concessions de service public": { + "account_type": "Fixed Asset" + }, + "2128-Autres concessions et droits similaires": { + "account_type": "Fixed Asset" + } + }, + "213-Logiciels et sites internet": { + "account_type": "Fixed Asset", + "2131-Logiciels": { + "account_type": "Fixed Asset" + }, + "2132-Sites internet": { + "account_type": "Fixed Asset" + } + }, + "214-Marques": { + "account_type": "Fixed Asset" + }, + "215-Fonds commercial": { + "account_type": "Fixed Asset" + }, + "216-Droit au bail": { + "account_type": "Fixed Asset" + }, + "217-Investissements de cr\u00e9ation": { + "account_type": "Fixed Asset" + }, + "218-Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset", + "2181-Frais de prospection et d\u2019\u00e9valuation de ressources min\u00e9rales": { + "account_type": "Fixed Asset" + }, + "2182-Co\u00fbts d\u2019obtention du contrat": { + "account_type": "Fixed Asset" + }, + "2183-Fichiers clients, notices, titres de journaux et magazines": { + "account_type": "Fixed Asset" + }, + "2184-Co\u00fbts des franchises": { + "account_type": "Fixed Asset" + }, + "2188-Divers droits et valeurs incorporelles": { + "account_type": "Fixed Asset" + } + }, + "219-Immobilisations incorporelles en cours": { + "account_type": "Fixed Asset", + "2191-Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset" + }, + "2193-Logiciels et internet": { + "account_type": "Fixed Asset" + }, + "2198-Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset" + } + } + }, + "22-Terrains": { + "account_type": "Fixed Asset", + "221-Terrains agricoles et forestiers": { + "account_type": "Fixed Asset", + "2211-Terrains d\u2019exploitation agricole": { + "account_type": "Fixed Asset" + }, + "2212-Terrains d\u2019exploitation foresti\u00e8re": { + "account_type": "Fixed Asset" + }, + "2218-Autres terrains": { + "account_type": "Fixed Asset" + } + }, + "222-Terrains nus": { + "account_type": "Fixed Asset", + "2221-Terrains \u00e0 b\u00e2tir": { + "account_type": "Fixed Asset" + }, + "2228-Autres terrains nus": { + "account_type": "Fixed Asset" + } + }, + "223-Terrains b\u00e2tis": { + "account_type": "Fixed Asset", + "2231-Pour b\u00e2timents industriels et agricoles": { + "account_type": "Fixed Asset" + }, + "2232-Pour b\u00e2timents administratifs et commerciaux": { + "account_type": "Fixed Asset" + }, + "2234-Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations professionnelles": { + "account_type": "Fixed Asset" + }, + "2235-Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations non professionnelles": { + "account_type": "Fixed Asset" + }, + "2238-Autres terrains b\u00e2tis": { + "account_type": "Fixed Asset" + } + }, + "224-Travaux de mise en valeur des terrains": { + "account_type": "Fixed Asset", + "2241-Plantation d\u2019arbres et d\u2019arbustes": { + "account_type": "Fixed Asset" + }, + "2245-Am\u00e9liorations du fonds": { + "account_type": "Fixed Asset" + }, + "2248-Autres travaux": { + "account_type": "Fixed Asset" + } + }, + "225-Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset", + "2251-Carri\u00e8res": { + "account_type": "Fixed Asset" + } + }, + "226-Terrains am\u00e9nag\u00e9s": { + "account_type": "Fixed Asset", + "2261-Parkings": { + "account_type": "Fixed Asset" + } + }, + "227-Terrains mis en concession": { + "account_type": "Fixed Asset" + }, + "228-Autres terrains": { + "account_type": "Fixed Asset", + "2281-Terrains immeubles de placement": { + "account_type": "Fixed Asset" + }, + "2285-Terrains des logements affect\u00e9s au personnel": { + "account_type": "Fixed Asset" + }, + "2286-Terrains de location acquisition": { + "account_type": "Fixed Asset" + }, + "2288-Divers terrains": { + "account_type": "Fixed Asset" + } + }, + "229-Am\u00e9nagements de terrains en cours": { + "account_type": "Fixed Asset", + "2291-Terrains agricoles et forestiers": { + "account_type": "Fixed Asset" + }, + "2292-Terrains nus": { + "account_type": "Fixed Asset" + }, + "2295-Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset" + }, + "2298-Autres terrains": { + "account_type": "Fixed Asset" + } + } + }, + "23-B\u00e2timents, installations techniques et agencements": { + "231-B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "2311-B\u00e2timents industriels": {}, + "2312-B\u00e2timents agricoles": {}, + "2313-B\u00e2timents administratifs et commerciaux": {}, + "2314-B\u00e2timents affect\u00e9s au logement du personnel": {}, + "2315-B\u00e2timents immeubles de placement": {}, + "2316-B\u00e2timents de location acquisition": {} + }, + "232-B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "2321-B\u00e2timents industriels": {}, + "2322-B\u00e2timents agricoles": {}, + "2323-B\u00e2timents administratifs et commerciaux": {}, + "2324-B\u00e2timents affect\u00e9s au logement du personnel": {}, + "2325-B\u00e2timents immeubles de placement": {}, + "2326-B\u00e2timents de location acquisition": {} + }, + "233-Ouvrages d\u2019infrastructure": { + "2331-Voies de terre": {}, + "2332-Voies de fer": {}, + "2333-Voies d\u2019eau": {}, + "2334-Barrages, Digues": {}, + "2335-Pistes d\u2019a\u00e9rodrome": {}, + "2338-Autres ouvrages d\u2019infrastructures": {} + }, + "234-Am\u00e9nagements, agencements et installations techniques": { + "2341-Installations complexes sp\u00e9cialis\u00e9es sur sol propre": {}, + "2342-Installations complexes sp\u00e9cialis\u00e9es sur sol d\u2019autrui": {}, + "2343-Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol propre": {}, + "2344-Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol d\u2019autrui": {}, + "2345-Am\u00e9nagements et agencements des b\u00e2timents": {} + }, + "235-Am\u00e9nagements de bureaux": { + "2351-Installations g\u00e9n\u00e9rales": {}, + "2358-Autres am\u00e9nagements de bureaux": {} + }, + "237-B\u00e2timents industriels, agricoles et commerciaux mis en concession": {}, + "238-Autres installations et agencements": {}, + "239-B\u00e2timents am\u00e9nagements, agencements et installations en cours": { + "2391-B\u00e2timents en cours": {}, + "2392-Installations en cours": {}, + "2393-Ouvrages d\u2019infrastructure en cours": {}, + "2394-Am\u00e9nagements et agencements et installations techniques en cours": {}, + "2395-Am\u00e9nagements de bureaux en cours": {}, + "2398-Autres installations et agencements en cours": {} + } + }, + "24-Mat\u00e9riel, mobilier et actifs biologiques": { + "241-Mat\u00e9riel et outillage industriel et commercial": { + "2411-Mat\u00e9riel industriel": {}, + "2412-Outillage industriel": {}, + "2413-Mat\u00e9riel commercial": {}, + "2414-Outillage commercial": {}, + "2416-Mat\u00e9riel & outillage industriel et commercial de location-acquisition": {} + }, + "242-Mat\u00e9riel et outillage agricole": { + "2421-Mat\u00e9riel agricole": {}, + "2422-Outillage agricole": {}, + "2426-Mat\u00e9riel & outillage agricole de location-acquisition": {} + }, + "243-Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "244-Mat\u00e9riel et mobilier": { + "2441-Mat\u00e9riel de bureau": {}, + "2442-Mat\u00e9riel informatique": {}, + "2443-Mat\u00e9riel bureautique": {}, + "2444-Mobilier de bureau": {}, + "2445-Mat\u00e9riel et mobilier immeubles de placement": {}, + "2446-Mat\u00e9riel et mobilier de location acquisition": {}, + "2447-Mat\u00e9riel et mobilier des logements du personnel": {} + }, + "245-Mat\u00e9riel de transport": { + "2451-Mat\u00e9riel automobile": {}, + "2452-Mat\u00e9riel ferroviaire": {}, + "2453-Mat\u00e9riel fluvial, lagunaire": {}, + "2454-Mat\u00e9riel naval": {}, + "2455-Mat\u00e9riel a\u00e9rien": {}, + "2456-Mat\u00e9riel de transport de location-acquisition": {}, + "2457-Mat\u00e9riel hippomobile": {}, + "2458-Autres mat\u00e9riels de transport": {} + }, + "246-Actifs biologiques": { + "2461-Cheptel, animaux de trait": {}, + "2462-Cheptel, animaux reproducteurs": {}, + "2463-Animaux de garde": {}, + "2465-Plantations agricoles": {}, + "2468-Autres actifs biologiques": {} + }, + "247-Agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "2471-Agencements et am\u00e9nagements du mat\u00e9riel": {}, + "2472-Agencements et am\u00e9nagements des actifs biologiques": {}, + "2478-Autres agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": {} + }, + "248-Autres mat\u00e9riels et mobiliers": { + "2481-Collections et \u0153uvres d\u2019art": {}, + "2488-Divers mat\u00e9riels mobiliers": {} + }, + "249-Mat\u00e9riels et actifs biologiques en cours": { + "2491-Mat\u00e9riel et outillage industriel et commercial": {}, + "2492-Mat\u00e9riel et outillage agricole": {}, + "2493-Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "2494-Mat\u00e9riel et mobilier de bureau": {}, + "2495-Mat\u00e9riel de transport": {}, + "2496-Actifs biologiques": {}, + "2497-Agencements am\u00e9nagements du mat\u00e9riel et actifs biologiques": {}, + "2498-Autres mat\u00e9riels et actifs biologiques en cours": {} + } + }, + "25-Avances et acomptes vers\u00e9s sur immobilisations": { + "251-Avances et acomptes vers\u00e9s sur immobilisations incorporelles": {}, + "252-Avances et acomptes vers\u00e9s sur immobilisations corporelles": {} + }, + "26-Titres de participation": { + "261-Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": {}, + "262-Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le conjoint": {}, + "263-Titres de participation dans des soci\u00e9t\u00e9s conf\u00e9rant une influence notable": {}, + "265-Participations dans des organismes professionnels": {}, + "266-Parts dans des groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": {}, + "268-Autres titres de participation": {} + }, + "27-Autres immobilisations financi\u00e8res": { + "271-Pr\u00eats et cr\u00e9ances": { + "2711-Pr\u00eats participatifs": {}, + "2712-Pr\u00eats aux associ\u00e9s": {}, + "2713-Billets de fonds": {}, + "2714-Titres pr\u00eat\u00e9s": {}, + "2718-Autres pr\u00eats et cr\u00e9ances": {} + }, + "272-Pr\u00eats au personnel": { + "2721-Pr\u00eats immobiliers": {}, + "2722-Pr\u00eats mobiliers et d\u2019installation": {}, + "2728-Autres pr\u00eats au personnel": {} + }, + "273-Cr\u00e9ances sur l\u2019\u00c9tat": { + "2731-Retenues de garantie": {}, + "2733-Fonds r\u00e9glement\u00e9": {}, + "2734-Cr\u00e9ances sur le conc\u00e9dant": {}, + "2738-Autres cr\u00e9ances sur l\u2019\u00c9tat": {} + }, + "274-Titres immobilis\u00e9s": { + "2741-Titres immobilis\u00e9s de l\u2019activit\u00e9 de portefeuille (TIAP)": {}, + "2742-Titres participatifs": {}, + "2743-Certificats d\u2019investissement": {}, + "2744-Parts de fonds commun de placement (FCP)": {}, + "2745-Obligations": {}, + "2746-Actions ou parts propres": {}, + "2748-Autres titres immobilis\u00e9s": {} + }, + "275-D\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "2751-D\u00e9p\u00f4ts pour loyers d\u2019avance": {}, + "2752-D\u00e9p\u00f4ts pour l\u2019\u00e9lectricit\u00e9": {}, + "2753-D\u00e9p\u00f4ts pour l\u2019eau": {}, + "2754-D\u00e9p\u00f4ts pour le gaz": {}, + "2755-D\u00e9p\u00f4ts pour le t\u00e9l\u00e9phone, le t\u00e9lex, la t\u00e9l\u00e9copie": {}, + "2756-Cautionnements sur march\u00e9s publics": {}, + "2757-Cautionnements sur autres op\u00e9rations": {}, + "2758-Autres d\u00e9p\u00f4ts et cautionnements": {} + }, + "276-Int\u00e9r\u00eats courus": { + "2761-Pr\u00eats et cr\u00e9ances non commerciales": {}, + "2762-Pr\u00eats au personnel": {}, + "2763-Cr\u00e9ances sur l\u2019\u00c9tat": {}, + "2764-Titres immobilis\u00e9s": {}, + "2765-D\u00e9p\u00f4ts et cautionnements vers\u00e9s": {}, + "2767-Cr\u00e9ances rattach\u00e9es \u00e0 des participations": {}, + "2768-Immobilisations financi\u00e8res diverses": {} + }, + "277-Cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": { + "2771-Cr\u00e9ances rattach\u00e9es \u00e0 des participations (groupe)": {}, + "2772-Cr\u00e9ances rattach\u00e9es \u00e0 des participations (hors groupe)": {}, + "2773-Cr\u00e9ances rattach\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": {}, + "2774-Avances \u00e0 des Groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": {} + }, + "278-Immobilisations financi\u00e8res diverses": { + "2781-Cr\u00e9ances diverses groupe": {}, + "2782-Cr\u00e9ances diverses hors groupe": {}, + "2784-Banques d\u00e9p\u00f4ts \u00e0 terme": {}, + "2785-Or et m\u00e9taux pr\u00e9cieux": {}, + "2788-Autres immobilisations financi\u00e8res": {} + } + }, + "28-Amortissements": { + "account_type": "Accumulated Depreciation", + "281-Amortissements des immobilisations corporelles": { + "account_type": "Accumulated Depreciation", + "2811-Amortissements des frais de d\u00e9veloppement": { + "account_type": "Accumulated Depreciation" + }, + "2812-Amortissements des brevets, licences, concessions et droits similaires": { + "account_type": "Accumulated Depreciation" + }, + "2813-Amortissements des logiciels et sites internet": { + "account_type": "Accumulated Depreciation" + }, + "2814-Amortissements des marques": { + "account_type": "Accumulated Depreciation" + }, + "2815-Amortissements du fonds commercial": { + "account_type": "Accumulated Depreciation" + }, + "2816-Amortissements du droit au bail": { + "account_type": "Accumulated Depreciation" + }, + "2817-Amortissements des investissements de cr\u00e9ation": { + "account_type": "Accumulated Depreciation" + }, + "2818-Amortissements des autres droits et valeurs incorporels": { + "account_type": "Accumulated Depreciation" + } + }, + "282-Amortissements des terrains": { + "2824-Amortissements des travaux de mise en valeur des terrains": {} + }, + "283-Amortissements des b\u00e2timents, installations techniques et agencements": { + "2831-Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": {}, + "2832-Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": {}, + "2833-Amortissements des ouvrages d\u2019infrastructure": {}, + "2834-Amortissements des am\u00e9nagements, agencements et installations techniques": {}, + "2835-Amortissements des am\u00e9nagements de bureaux": {}, + "2837-Amortissements des b\u00e2timents industriels, agricoles et commerciaux mis en concession": {}, + "2838-Amortissements des autres installations et agencements": {} + }, + "284-Amortissements du mat\u00e9riel": { + "2841-Amortissements du mat\u00e9riel et outillage industriel et commercial": {}, + "2842-Amortissements du mat\u00e9riel et outillage agricole": {}, + "2843-Amortissements du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "2844-Amortissements du mat\u00e9riel et mobilier": {}, + "2845-Amortissements du mat\u00e9riel de transport": {}, + "2846-Amortissements des actifs biologiques": {}, + "2847-Amortissements des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": {}, + "2848-Amortissements des autres mat\u00e9riels": {} + } + }, + "29-D\u00e9pr\u00e9ciations des immobilisations": { + "291-D\u00e9pr\u00e9ciations des immobilisations incorporelles": { + "2911-D\u00e9pr\u00e9ciations des frais de d\u00e9veloppement": {}, + "2912-D\u00e9pr\u00e9ciations des brevets, licences, concessions et droits similaires": {}, + "2913-D\u00e9pr\u00e9ciations des logiciels et sites internet": {}, + "2914-D\u00e9pr\u00e9ciations des marques": {}, + "2915-D\u00e9pr\u00e9ciations du fonds commercial": {}, + "2916-D\u00e9pr\u00e9ciations du droit au bail": {}, + "2917-D\u00e9pr\u00e9ciations des investissements de cr\u00e9ation": {}, + "2918-D\u00e9pr\u00e9ciations des autres droits et valeurs incorporels": {}, + "2919-D\u00e9pr\u00e9ciations des immobilisations incorporelles en cours": {} + }, + "292-D\u00e9pr\u00e9ciations des terrains": { + "2921-D\u00e9pr\u00e9ciations des terrains agricoles et forestiers": {}, + "2922-D\u00e9pr\u00e9ciations des terrains nus": {}, + "2923-D\u00e9pr\u00e9ciations des terrains b\u00e2tis": {}, + "2924-D\u00e9pr\u00e9ciations des travaux de mise en valeur des terrains": {}, + "2925-D\u00e9pr\u00e9ciations des terrains de gisement": {}, + "2926-D\u00e9pr\u00e9ciations des terrains am\u00e9nag\u00e9s": {}, + "2927-D\u00e9pr\u00e9ciations des terrains mis en concession": {}, + "2928-D\u00e9pr\u00e9ciations des autres terrains": {}, + "2929-D\u00e9pr\u00e9ciations des am\u00e9nagements de terrains en cours": {} + }, + "293-D\u00e9pr\u00e9ciations des b\u00e2timents, installations techniques et agencements": { + "2931-D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": {}, + "2932-D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": {}, + "2933-D\u00e9pr\u00e9ciations des ouvrages d\u2019infrastructures": {}, + "2934-D\u00e9pr\u00e9ciations des am\u00e9nagements, agencements et installations techniques": {}, + "2935-D\u00e9pr\u00e9ciations des am\u00e9nagements de bureaux": {}, + "2937-D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles et commerciaux mis en concession": {}, + "2938-D\u00e9pr\u00e9ciations des autres installations et agencements": {}, + "2939-D\u00e9pr\u00e9ciations des b\u00e2timents et installations en cours": {} + }, + "294-D\u00e9pr\u00e9ciations de mat\u00e9riel, du mobilier et de l\u2019actif biologique": { + "2941-D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage industriel et commercial": {}, + "2942-D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage agricole": {}, + "2943-D\u00e9pr\u00e9ciations du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "2944-D\u00e9pr\u00e9ciations du mat\u00e9riel et mobilier": {}, + "2945-D\u00e9pr\u00e9ciations du mat\u00e9riel de transport": {}, + "2946-D\u00e9pr\u00e9ciations des actifs biologiques": {}, + "2947-D\u00e9pr\u00e9ciations des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": {}, + "2948-D\u00e9pr\u00e9ciations des autres mat\u00e9riels": {}, + "2949-D\u00e9pr\u00e9ciations de mat\u00e9riel en cours": {} + }, + "295-D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations": { + "2951-D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations incorporelles": {}, + "2952-D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations corporelles": {} + }, + "296-D\u00e9pr\u00e9ciations des titres de participation": { + "2961-D\u00e9pr\u00e9ciations des titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": {}, + "2962-D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s sous contr\u00f4le conjoint": {}, + "2963-D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s conf\u00e9rant une influence notable": {}, + "2965-D\u00e9pr\u00e9ciations des participations dans des organismes professionnels": {}, + "2966-D\u00e9pr\u00e9ciations des parts dans des GIE": {}, + "2968-D\u00e9pr\u00e9ciations des autres titres de participation": {} + }, + "297-D\u00e9pr\u00e9ciations des autres immobilisations financi\u00e8res": { + "2971-D\u00e9pr\u00e9ciations des pr\u00eats et cr\u00e9ances": {}, + "2972-D\u00e9pr\u00e9ciations des pr\u00eats au personnel": {}, + "2973-D\u00e9pr\u00e9ciations des cr\u00e9ances sur l\u2019\u00c9tat": {}, + "2974-D\u00e9pr\u00e9ciations des titres immobilis\u00e9s": {}, + "2975-D\u00e9pr\u00e9ciations des d\u00e9p\u00f4ts et cautionnements vers\u00e9s": {}, + "2977-D\u00e9pr\u00e9ciations des cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": {}, + "2978-D\u00e9pr\u00e9ciations des cr\u00e9ances financi\u00e8res diverses": {} + } + }, + "root_type": "Asset" + }, + "3-Comptes de Stocks": { + "31-Marchandises": { + "311-Marchandises A": { + "3111-Marchandises A1": {}, + "3112-Marchandises A2": {} + }, + "312-Marchandises B": { + "3121-Marchandises B1": {}, + "3122-Marchandises B2": {} + }, + "313-Actifs biologiques": { + "3131-Animaux": {}, + "3132-V\u00e9g\u00e9taux": {} + }, + "318-Marchandises hors activit\u00e9s ordinaires (HAO)": {} + }, + "32-Mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "321-Mati\u00e8res A": {}, + "322-Mati\u00e8res B": {}, + "323-Fournitures (A, B)": {} + }, + "33-Autres approvisionnements": { + "331-Mati\u00e8res consommables": {}, + "332-Fournitures d\u2019atelier et d\u2019usine": {}, + "333-Fournitures de magasin": {}, + "334-Fournitures de bureau": {}, + "335-Emballages": { + "3351-Emballages perdus": {}, + "3352-Emballages r\u00e9cup\u00e9rables non identifiables": {}, + "3353-Emballages \u00e0 usage mixte": {}, + "3358-Autres emballages": {} + }, + "338-Autres mati\u00e8res": {} + }, + "34-Produits en cours": { + "341-Produits en cours": { + "3411-Produits en cours P1": {}, + "3412-Produits en cours P2": {} + }, + "342-Travaux en cours": { + "3421-Travaux en cours T1": {}, + "3422-Travaux en cours T2": {} + }, + "343-Produits interm\u00e9diaires en cours": { + "3431-Produits interm\u00e9diaires A": {}, + "3432-Produits interm\u00e9diaires B": {} + }, + "344-Produits r\u00e9siduels en cours": { + "3441-Produits r\u00e9siduels A": {}, + "3442-Produits r\u00e9siduels B": {} + }, + "345-Actifs biologiques en cours": { + "3451-Animaux": {}, + "3452-V\u00e9g\u00e9taux": {} + } + }, + "35-Services en cours": { + "351-\u00c9tudes en cours": { + "3511-\u00c9tudes en cours E1": {}, + "3512-\u00c9tudes en cours E2": {} + }, + "352-Prestations de services en cours": { + "3521-Prestations de services S1": {}, + "3522-Prestations de services S2": {} + } + }, + "36-Produits finis": { + "361-Produits finis A": {}, + "362-Produits finis B": {}, + "363-Actifs biologiques": { + "3631-Animaux": {}, + "3632-V\u00e9g\u00e9taux": {}, + "3638-Autres stocks (activit\u00e9s annexes)": {} + } + }, + "37-Produits interm\u00e9diaires et r\u00e9siduels": { + "371-Produits interm\u00e9diaires": { + "3711-Produits interm\u00e9diaires A": {}, + "3712-Produits interm\u00e9diaires B": {} + }, + "372-Produits r\u00e9siduels": { + "3721-D\u00e9chets": {}, + "3722-Rebuts": {}, + "3723-Mati\u00e8res de R\u00e9cup\u00e9ration": {} + }, + "373-Actifs biologiques": { + "3731-Animaux": {}, + "3732-V\u00e9g\u00e9taux": {}, + "3738-Autres stocks (activit\u00e9s annexes)": {} + } + }, + "38-Stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": { + "account_type": "Stock", + "381-Marchandises en cours de route": {}, + "382-Mati\u00e8res premi\u00e8res et fournitures li\u00e9es en cours de route": {}, + "383-Autres approvisionnements en cours de route": {}, + "386-Produits finis en cours de route": {}, + "387-Stock en consignation ou en d\u00e9p\u00f4t": { + "3871-Stock en consignation": {}, + "3872-Stock en d\u00e9p\u00f4t": {} + }, + "388-Stock provenant d\u2019immobilisations mises hors service ou au rebut": {} + }, + "39-D\u00e9pr\u00e9ciations des stocks et encours de production": { + "391-D\u00e9pr\u00e9ciations des stocks de marchandises": {}, + "392-D\u00e9pr\u00e9ciations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": {}, + "393-D\u00e9pr\u00e9ciations des stocks d\u2019autres approvisionnements": {}, + "394-D\u00e9pr\u00e9ciations des productions en cours": {}, + "395-D\u00e9pr\u00e9ciations des services en cours": {}, + "396-D\u00e9pr\u00e9ciations des stocks de produits finis": {}, + "397-D\u00e9pr\u00e9ciations des stocks de produits interm\u00e9diaires et r\u00e9siduels": {}, + "398-D\u00e9pr\u00e9ciations des stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": {} + }, + "root_type": "Asset" + }, + "4-Comptes de Tiers (ACTIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (ACTIF)": { + "409-Fournisseurs d\u00e9biteurs": { + "4091-Fournisseurs Avances et acomptes vers\u00e9s": {}, + "4092-Fournisseurs Groupe avances et acomptes vers\u00e9s": {}, + "4093-Fournisseurs Sous-traitants avances et acomptes vers\u00e9s": {}, + "4094-Fournisseurs Cr\u00e9ances pour emballages et mat\u00e9riels \u00e0 rendre": {}, + "4098-Fournisseurs Rabais, remises, ristournes et autres avoirs \u00e0 obtenir": {} + } + }, + "41-Clients et comptes rattach\u00e9s (ACTIF)": { + "411-Clients": { + "4111-Clients": { + "account_type": "Receivable" + }, + "4112-Clients groupe": { + "account_type": "Receivable" + }, + "4114-Clients, \u00c9tat et Collectivit\u00e9s publiques": { + "account_type": "Receivable" + }, + "4115-Clients, organismes internationaux": { + "account_type": "Receivable" + }, + "4116-Clients, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Receivable" + }, + "4117-Client, retenues de garantie": { + "account_type": "Receivable" + }, + "4118-Clients, d\u00e9gr\u00e8vement de taxes sur la valeur ajout\u00e9e (TVA)": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "412-Clients, effets \u00e0 recevoir en portefeuille": { + "4121-Clients, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "4122-Clients Groupe, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "4124-\u00c9tat et Collectivit\u00e9s publiques, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "4125-Organismes Internationaux, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "413-Clients, ch\u00e8ques, effets et autres valeurs impay\u00e9es": { + "4131-Clients, ch\u00e8ques impay\u00e9s": { + "account_type": "Receivable" + }, + "4132-Clients, effets impay\u00e9s": { + "account_type": "Receivable" + }, + "4133-Clients, cartes de cr\u00e9dit impay\u00e9es": { + "account_type": "Receivable" + }, + "4138-Clients, autres valeurs impay\u00e9es": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "414-Cr\u00e9ances sur cessions courantes d\u2019immobilisations": { + "4141-Cr\u00e9ances en compte, immobilisations incorporelles": { + "account_type": "Receivable" + }, + "4142-Cr\u00e9ances en compte, immobilisations corporelles": { + "account_type": "Receivable" + }, + "4146-Effets \u00e0 recevoir, immobilisations incorporelles": { + "account_type": "Receivable" + }, + "4147-Effets \u00e0 recevoir, immobilisations corporelles": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "415-Clients, effets escompt\u00e9s non \u00e9chus": { + "account_type": "Receivable" + }, + "416-Cr\u00e9ances clients litigieuses ou douteuses": { + "4161-Cr\u00e9ances litigieuses": { + "account_type": "Receivable" + }, + "4162-Cr\u00e9ances douteuses": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "418-Clients, produits \u00e0 recevoir": { + "4181-Clients, factures \u00e0 \u00e9tablir": { + "account_type": "Receivable" + }, + "4186-Clients, int\u00e9r\u00eats courus": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "42-Personnel (ACTIF)": { + "421-Personnel, avances et acomptes": { + "4211-Personnel, avances": {}, + "4212-Personnel, acomptes": {}, + "4213-Frais avanc\u00e9s et fournitures au personnel": {} + } + }, + "43-Organismes sociaux (ACTIF)": { + "431-S\u00e9curit\u00e9 sociale": { + "4311-Prestations familiales": {}, + "4312-Accidents de travail": {}, + "4313-Caisse de retraite obligatoire": {}, + "4314-Caisse de retraite facultative": {}, + "4318-Autres cotisations sociales": {} + }, + "432-Caisses de retraite compl\u00e9mentaire": {}, + "433-Autres organismes sociaux": { + "4331-Mutuelle": {}, + "4332-Assurances retraite": {}, + "4333-Assurances et organismes de sant\u00e9": {} + }, + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "4387-Produits \u00e0 recevoir": {} + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (ACTIF)": { + "443-\u00c9tat, TVA factur\u00e9e": { + "4431-TVA factur\u00e9e sur ventes": {}, + "4432-TVA factur\u00e9e sur prestations de services": {}, + "4433-TVA factur\u00e9e sur travaux": {}, + "4434-TVA factur\u00e9e sur production livr\u00e9e \u00e0 soi-m\u00eame": {}, + "4435-TVA sur factures \u00e0 \u00e9tablir": {} + }, + "445-\u00c9tat, TVA r\u00e9cup\u00e9rable": { + "4451-TVA r\u00e9cup\u00e9rable sur immobilisations": {}, + "4452-TVA r\u00e9cup\u00e9rable sur achats": {}, + "4453-TVA r\u00e9cup\u00e9rable sur transport": {}, + "4454-TVA r\u00e9cup\u00e9rable sur services ext\u00e9rieurs et autres charges": {}, + "4455-TVA r\u00e9cup\u00e9rable sur factures non parvenues": {}, + "4456-TVA transf\u00e9r\u00e9e par d\u2019autres entit\u00e9s": {} + }, + "448-\u00c9tat, charges \u00e0 payer et produits \u00e0 recevoir": { + "4486-Charges \u00e0 payer": {}, + "4487-Produits \u00e0 recevoir": {} + }, + "449-\u00c9tat, cr\u00e9ances et dettes diverses": { + "4491-\u00c9tat, obligations cautionn\u00e9es": {}, + "4492-\u00c9tat, avances et acomptes vers\u00e9s sur imp\u00f4ts": {}, + "4493-\u00c9tat, fonds de dotation \u00e0 recevoir": {}, + "4494-\u00c9tat, subventions investissement \u00e0 recevoir": {}, + "4495-\u00c9tat, subventions d\u2019exploitation \u00e0 recevoir": {}, + "4496-\u00c9tat, subventions d\u2019\u00e9quilibre \u00e0 recevoir": {}, + "4497-\u00c9tat, avances sur subventions": {}, + "4499-\u00c9tat, fonds r\u00e9glement\u00e9s provisionn\u00e9s": {} + } + }, + "45-Organismes internationaux (ACTIF)": { + "451-Op\u00e9rations avec les organismes africains": {}, + "452-Op\u00e9rations avec les autres organismes internationaux": {}, + "458-Organismes internationaux, fonds de dotation et subventions \u00e0 recevoir": { + "4581-Organismes internationaux, fonds de dotation \u00e0 recevoir": {}, + "4582-Organismes internationaux, subventions \u00e0 recevoir": {} + } + }, + "46-Apporteurs, associ\u00e9s et groupe (ACTIF)": { + "461-Apporteurs, op\u00e9rations sur le capital": { + "4613-Apporteurs, capital appel\u00e9, non vers\u00e9": {}, + "4614-Apporteurs, compte d\u2019apport, op\u00e9rations de restructuration (fusion...)": {}, + "4618-Apporteurs, titres \u00e0 \u00e9changer": {} + }, + "467-Apporteurs, restant d\u00fb sur capital appel\u00e9": {} + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (ACTIF)": { + "472-Cr\u00e9ances et dettes sur titres de placement": { + "4721-Cr\u00e9ances sur cessions de titres de placement": {}, + "4726-Versements restant \u00e0 effectuer sur titres de placement non lib\u00e9r\u00e9s": {} + }, + "473-Interm\u00e9diaires Op\u00e9rations faites pour compte de tiers": { + "4731-Mandants": {}, + "4732-Mandataires": {}, + "4733-Commettants": {}, + "4734-Commissionnaires": {}, + "4739-\u00c9tat, Collectivit\u00e9s publiques, fonds global d\u2019allocation": {} + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits": { + "4747-Compte de r\u00e9partition p\u00e9riodique des produits": {} + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA": { + "4751-Compte actif": { + "account_type": "Temporary" + } + }, + "476-Charges constat\u00e9es d\u2019avance": {}, + "478-\u00c9carts de conversion actif": { + "4781-Diminution des cr\u00e9ances d\u2019exploitation": {}, + "4782-Diminution des cr\u00e9ances financi\u00e8res": {}, + "4783-Augmentation des dettes d\u2019exploitation": {}, + "4784-Augmentation des dettes financi\u00e8res": {}, + "4786-Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": {}, + "4788-Diff\u00e9rences compens\u00e9es par couverture de change": {} + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (ACTIF)": { + "485-Cr\u00e9ances sur cessions d\u2019immobilisations": { + "4851-En compte, immobilisations incorporelles": {}, + "4852-En compte, immobilisations corporelles": {}, + "4853-Effets \u00e0 recevoir, immobilisations incorporelles": {}, + "4854-Effets \u00e0 recevoir, immobilisations corporelles": {}, + "4855-Effets escompt\u00e9s non \u00e9chus": {}, + "4857-Retenues de garantie": {}, + "4858-Factures \u00e0 \u00e9tablir": {} + }, + "488-Autres cr\u00e9ances hors activit\u00e9s ordinaires (HAO)": {} + }, + "49-D\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme (tiers) (ACTIF)": { + "491-D\u00e9pr\u00e9ciations des comptes clients": { + "4911-Cr\u00e9ances litigieuses": {}, + "4912-Cr\u00e9ances douteuses": {} + }, + "495-D\u00e9pr\u00e9ciations des comptes organismes internationaux": {}, + "496-D\u00e9pr\u00e9ciations des comptes apporteurs, associ\u00e9s et groupe": { + "4962-Associ\u00e9s, comptes courants": {}, + "4963-Associ\u00e9s, op\u00e9rations faites en commun": {}, + "4966-Groupe, comptes courants": {} + }, + "497-D\u00e9pr\u00e9ciations des comptes d\u00e9biteurs divers": {}, + "498-D\u00e9pr\u00e9ciations des comptes de cr\u00e9ances HAO": { + "4985-Cr\u00e9ances sur cessions d\u2019immobilisations": {}, + "4986-Cr\u00e9ances sur cessions de titres de placement": {}, + "4988-Autres cr\u00e9ances HAO": {} + }, + "499-Provisions pour risques \u00e0 court terme": { + "4991-Sur op\u00e9rations d\u2019exploitation": {}, + "4997-Sur op\u00e9rations financi\u00e8res": {}, + "4998-Sur op\u00e9rations HAO": {} + } + }, + "root_type": "Asset" + }, + "4-Comptes de Tiers (PASSIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (PASSIF)": { + "401-Fournisseurs, dettes en compte": { + "4011-Fournisseurs": { + "account_type": "Payable" + }, + "4012-Fournisseurs groupe": { + "account_type": "Payable" + }, + "4013-Fournisseurs sous-traitants": { + "account_type": "Payable" + }, + "4016-Fournisseurs, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Payable" + }, + "4017-Fournisseur, retenues de garantie": { + "account_type": "Payable" + }, + "account_type": "Payable" + }, + "402-Fournisseurs, effets \u00e0 payer": { + "4021-Fournisseurs Effets \u00e0 payer": { + "account_type": "Payable" + }, + "4022-Fournisseurs Groupe, effets \u00e0 payer": { + "account_type": "Payable" + }, + "4023-Fournisseurs Sous-traitants, effets \u00e0 payer": { + "account_type": "Payable" + }, + "account_type": "Payable" + }, + "404-Fournisseurs, acquisitions courantes d\u2019immobilisations": { + "4041-Fournisseurs Dettes en comptes, immobilisations incorporelles": { + "account_type": "Payable" + }, + "4042-Fournisseurs Dettes en comptes, immobilisations corporelles": { + "account_type": "Payable" + }, + "4046-Fournisseurs Effets \u00e0 payer, immobilisations incorporelles": { + "account_type": "Payable" + }, + "4047-Fournisseurs Effets \u00e0 payer, immobilisations corporelles": { + "account_type": "Payable" + }, + "account_type": "Payable" + }, + "408-Fournisseurs, factures non parvenues": { + "4081-Fournisseurs": { + "account_type": "Stock Received But Not Billed" + }, + "4082-Fournisseurs groupe": { + "account_type": "Stock Received But Not Billed" + }, + "4083-Fournisseurs sous-traitants": { + "account_type": "Stock Received But Not Billed" + }, + "4086-Fournisseurs, int\u00e9r\u00eats courus": { + "account_type": "Stock Received But Not Billed" + }, + "account_type": "Stock Received But Not Billed" + }, + "account_type": "Payable" + }, + "41-Clients et comptes rattach\u00e9s (PASSIF)": { + "419-Clients cr\u00e9diteurs": { + "4191-Clients, avances et acomptes re\u00e7us": {}, + "4192-Clients groupe, avances et acomptes re\u00e7us": {}, + "4194-Clients, dettes pour emballages et mat\u00e9riels consign\u00e9s": {}, + "4198-Clients, rabais, remises, ristournes et autres avoirs \u00e0 accorder": {} + } + }, + "42-Personnel (PASSIF)": { + "422-Personnel, r\u00e9mun\u00e9rations dues": {}, + "423-Personnel, oppositions, saisies-arr\u00eats": { + "4231-Personnel, oppositions": {}, + "4232-Personnel, saisies-arr\u00eats": {}, + "4233-Personnel, avis \u00e0 tiers d\u00e9tenteur": {} + }, + "424-Personnel, \u0153uvres sociales internes": { + "4241-Assistance m\u00e9dicale": {}, + "4242-Allocations familiales": {}, + "4245-Organismes sociaux rattach\u00e9s \u00e0 l\u2019entit\u00e9": {}, + "4248-Autres \u0153uvres sociales internes": {} + }, + "425-Repr\u00e9sentants du personnel": { + "4251-D\u00e9l\u00e9gu\u00e9s du personnel": {}, + "4252-Syndicats et Comit\u00e9s d\u2019entreprises, d\u2019\u00c9tablissement": {}, + "4258-Autres repr\u00e9sentants du personnel": {} + }, + "426-Personnel, participation aux b\u00e9n\u00e9fices et au capital": { + "4261-Participation aux b\u00e9n\u00e9fices": {}, + "4264-Participation au capital": {} + }, + "427-Personnel d\u00e9p\u00f4ts": {}, + "428-Personnel, charges \u00e0 payer et produits \u00e0 recevoir": { + "4281-Dettes provisionn\u00e9es pour cong\u00e9s \u00e0 payer": {}, + "4286-Autres charges \u00e0 payer": {}, + "4287-Produits \u00e0 recevoir": {} + } + }, + "43-Organismes sociaux (PASSIF)": { + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "4381-Charges sociales sur gratifications \u00e0 payer": {}, + "4382-Charges sociales sur cong\u00e9s \u00e0 payer": {}, + "4386-Autres charges \u00e0 payer": {} + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (PASSIF)": { + "441-\u00c9tat, imp\u00f4t sur les b\u00e9n\u00e9fices": {}, + "442-\u00c9tat, autres imp\u00f4ts et taxes": { + "4421-Imp\u00f4ts et taxes d\u2019\u00c9tat": {}, + "4422-Imp\u00f4ts et taxes pour les collectivit\u00e9s publiques": {}, + "4423-Imp\u00f4ts et taxes recouvrables sur des obligataires": {}, + "4424-Imp\u00f4ts et taxes recouvrables sur des associ\u00e9s": {}, + "4426-Droits de douane": {}, + "4428-Autres imp\u00f4ts et taxes": {} + }, + "444-\u00c9tat, TVA due ou cr\u00e9dit de TVA": { + "4441-\u00c9tat, TVA due": {}, + "4449-\u00c9tat, cr\u00e9dit de TVA \u00e0 reporter": {} + }, + "446-\u00c9tat, autres taxes sur le chiffre d\u2019affaires": {}, + "447-\u00c9tat, imp\u00f4ts retenus \u00e0 la source": { + "4471-Imp\u00f4t G\u00e9n\u00e9ral sur le revenu": {}, + "4472-Imp\u00f4ts sur salaires": {}, + "4473-Contribution nationale": {}, + "4474-Contribution nationale de solidarit\u00e9": {}, + "4478-Autres imp\u00f4ts et contributions": {} + } + }, + "46-Apporteurs, associ\u00e9s et groupe (PASSIF)": { + "461-Apporteurs, op\u00e9rations sur le capital (PASSIF)": { + "4611-Apporteurs, apports en nature": {}, + "4612-Apporteurs, apports en num\u00e9raire": {}, + "4615-Apporteurs, versements re\u00e7us sur augmentation de capital": {}, + "4616-Apporteurs, versements anticip\u00e9s": {}, + "4617-Apporteurs d\u00e9faillants": {}, + "4619-Apporteurs, capital \u00e0 rembourser": {} + }, + "462-Associ\u00e9s, comptes courants": { + "4621-Principal": {}, + "4626-Int\u00e9r\u00eats courus": {} + }, + "463-Associ\u00e9s, op\u00e9rations faites en commun et GIE": { + "4631-Op\u00e9rations courantes": {}, + "4636-Int\u00e9r\u00eats courus": {} + }, + "465-Associ\u00e9s, dividendes \u00e0 payer": {}, + "466-Groupe, comptes courants": {} + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (PASSIF)": { + "471-D\u00e9biteurs et cr\u00e9diteurs divers": { + "4711-D\u00e9biteurs divers": {}, + "4712-Cr\u00e9diteurs divers": {}, + "4713-Obligataires": {}, + "4715-R\u00e9mun\u00e9rations d\u2019administrateurs": {}, + "4716-Compte d\u2019affacturage": {}, + "4717-D\u00e9biteurs divers retenues de garantie": {}, + "4718-Apport, compte de fusion et op\u00e9rations assimil\u00e9es": {}, + "4719-Bons de souscription d\u2019actions et d\u2019obligations": {} + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits (PASSIF)": { + "4746-Compte de r\u00e9partition p\u00e9riodique des charges": {} + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA (PASSIF)": { + "4752-Compte passif": {} + }, + "477-Produits constat\u00e9s d\u2019avance": {}, + "479-\u00c9carts de conversion passif": { + "4791-Augmentation des cr\u00e9ances d\u2019exploitation": {}, + "4792-Augmentation des cr\u00e9ances financi\u00e8res": {}, + "4793-Diminution des dettes d\u2019exploitation": {}, + "4794-Diminution des dettes financi\u00e8res": {}, + "4797-Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": {}, + "4798-Diff\u00e9rences compens\u00e9es par couverture de change": {} + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (HAO) (PASSIF)": { + "481-Fournisseurs d\u2019investissements": { + "4811-Immobilisations incorporelles": {}, + "4812-Immobilisations corporelles": {}, + "4813-Versements restant \u00e0 effectuer sur titres de participation et titres immobilis\u00e9s non lib\u00e9r\u00e9s": {}, + "4816-R\u00e9serve de propri\u00e9t\u00e9": {}, + "4817-Retenues de garantie": {}, + "4818-Factures non parvenues": {} + }, + "482-Fournisseurs d\u2019investissements, effets \u00e0 payer": { + "4821-Immobilisations incorporelles": {}, + "4822-Immobilisations corporelles": {} + }, + "484-Autres dettes hors activit\u00e9s ordinaires (HAO)": { + "4887-Produits": {} + } + }, + "49-D\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme (tiers) (PASSIF)": { + "490-D\u00e9pr\u00e9ciations des comptes fournisseurs": {}, + "492-D\u00e9pr\u00e9ciations des comptes personnel": {}, + "493-D\u00e9pr\u00e9ciations des comptes organismes sociaux": {}, + "494-D\u00e9pr\u00e9ciations des comptes \u00c9tat et collectivit\u00e9s publiques": {}, + "495-D\u00e9pr\u00e9ciations des comptes organismes internationaux": {} + }, + "root_type": "Liability" + }, + "5-Comptes de tr\u00e9sorerie": { + "50-Titres de placement": { + "501-Titres du tr\u00e9sor et bons de caisse \u00e0 court terme": { + "5011-Titres du Tr\u00e9sor \u00e0 court terme": {}, + "5012-Titres d\u2019organismes financiers": {}, + "5013-Bons de caisse \u00e0 court terme": {}, + "5016-Frais d\u2019acquisition des titres de tr\u00e9sor et bons de caisse": {} + }, + "502-Actions": { + "5021-Actions ou parts propres": {}, + "5022-Actions cot\u00e9es": {}, + "5023-Actions non cot\u00e9es": {}, + "5024-Actions d\u00e9membr\u00e9es (certificats d\u2019investissement, droits de vote)": {}, + "5025-Autres actions": {}, + "5026-Frais d\u2019acquisition des actions": {} + }, + "503-Obligations": { + "5031-Obligations \u00e9mises par la soci\u00e9t\u00e9 et rachet\u00e9es par elle": {}, + "5032-Obligations cot\u00e9es": {}, + "5033-Obligations non cot\u00e9es": {}, + "5035-Autres obligations": {}, + "5036-Frais d\u2019acquisition des obligations": {} + }, + "504-Bons de souscription": { + "5042-Bons de souscription d\u2019actions": {}, + "5043-Bons de souscription d\u2019obligations": {} + }, + "505-Titres n\u00e9gociables hors r\u00e9gion": {}, + "506-Int\u00e9r\u00eats courus": { + "5061-Titres du Tr\u00e9sor et bons de caisse \u00e0 court terme": {}, + "5062-Actions": {}, + "5063-Obligations": {} + }, + "508-Autres titres de placement et cr\u00e9ances assimil\u00e9es": {} + }, + "51-Valeurs \u00e0 encaisser": { + "511-Effets \u00e0 encaisser": {}, + "512-Effets \u00e0 l\u2019encaissement": {}, + "513-Ch\u00e8ques \u00e0 encaisser": {}, + "514-Ch\u00e8ques \u00e0 l\u2019encaissement": {}, + "515-Cartes de cr\u00e9dit \u00e0 encaisser": {}, + "518-Autres valeurs \u00e0 l\u2019encaissement": { + "5181-Warrants": {}, + "5182-Billets de fonds": {}, + "5185-Ch\u00e8ques de voyage": {}, + "5186-Coupons \u00e9chus": {}, + "5187-Int\u00e9r\u00eats \u00e9chus des obligations": {} + } + }, + "52-Banques": { + "521-Banques locales": { + "5211-Banques en monnaie nationale": { + "account_type": "Bank" + }, + "5215-Banques en devises": { + "account_type": "Bank" + }, + "account_type": "Bank" + }, + "522-Banques autres \u00c9tats r\u00e9gion": {}, + "523-Banques autres \u00c9tats zone mon\u00e9taire": {}, + "524-Banques hors zone mon\u00e9taire": {}, + "525-Banques d\u00e9p\u00f4t \u00e0 terme": {}, + "526-Banques, int\u00e9r\u00eats courus": { + "5261-Banque, int\u00e9r\u00eats courus, charges \u00e0 payer": {}, + "5267-Banque, int\u00e9r\u00eats courus, produits \u00e0 recevoir": {} + } + }, + "53-\u00c9tablissements financiers et assimil\u00e9s": { + "531-Ch\u00e8ques postaux": {}, + "532-Tr\u00e9sor": {}, + "533-Soci\u00e9t\u00e9s de gestion et d\u2019interm\u00e9diation (SGI)": {}, + "536-\u00c9tablissements financiers, int\u00e9r\u00eats courus": {}, + "538-Autres organismes financiers": {} + }, + "54-Instruments de tr\u00e9sorerie": { + "541-Options de taux d\u2019int\u00e9r\u00eat": {}, + "542-Options de taux de change": {}, + "543-Options de taux boursiers": {}, + "544-Instruments de march\u00e9s \u00e0 terme": {}, + "545-Avoirs d\u2019or et autres m\u00e9taux pr\u00e9cieux": {} + }, + "55-Instruments de monnaie \u00e9lectronique": { + "551-Monnaie \u00e9lectronique carte carburant": {}, + "552-Monnaie \u00e9lectronique t\u00e9l\u00e9phone portable": {}, + "553-Monnaie \u00e9lectronique carte p\u00e9age": {}, + "554-Porte-monnaie \u00e9lectronique": {}, + "558-Autres instruments de monnaies \u00e9lectroniques": {} + }, + "56-Banques, cr\u00e9dits de tr\u00e9sorerie et d\u2019escompte": { + "561-Cr\u00e9dits de tr\u00e9sorerie": {}, + "564-Escompte de cr\u00e9dits de campagne": {}, + "565-Escompte de cr\u00e9dits ordinaires": {}, + "566-Banques, cr\u00e9dits de tr\u00e9sorerie, int\u00e9r\u00eats courus": {} + }, + "57-Caisse": { + "571-Caisse si\u00e8ge social": { + "5711-Caisse en monnaie nationale": {}, + "5712-Caisse en devises": {} + }, + "572-Caisse succursale A": { + "5721-En monnaie nationale": {}, + "5722-En devises": {} + }, + "573-Caisse succursale B": { + "5731-En monnaie nationale": {}, + "5732-En devises": {} + } + }, + "58-R\u00e9gies d\u2019avances, accr\u00e9ditifs et virements internes": { + "581-R\u00e9gies d\u2019avance": {}, + "582-Accr\u00e9ditifs": {}, + "585-Virements de fonds": {}, + "588-Autres virements internes": {} + }, + "59-D\u00e9pr\u00e9ciations et provisions pour risque \u00e0 court terme": { + "590-D\u00e9pr\u00e9ciations des titres de placement": {}, + "591-D\u00e9pr\u00e9ciations des titres et valeurs \u00e0 encaisser": {}, + "592-D\u00e9pr\u00e9ciations des comptes banques": {}, + "593-D\u00e9pr\u00e9ciations des comptes \u00e9tablissements financiers et assimil\u00e9s": {}, + "594-D\u00e9pr\u00e9ciations des comptes d\u2019instruments de tr\u00e9sorerie": {}, + "599-Provisions pour risque \u00e0 court terme \u00e0 caract\u00e8re financier": {} + }, + "root_type": "Asset" + }, + "6-Comptes de charges des activit\u00e9s ordinaires": { + "60-Achats et variations de stocks": { + "601-Achats de marchandises": { + "6011-Dans la R\u00e9gion": {}, + "6012-Hors R\u00e9gion": {}, + "6013-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "6014-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "6015-Frais sur achats": {}, + "6019-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "602-Achats de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "6021-Dans la R\u00e9gion": {}, + "6022-Hors R\u00e9gion": {}, + "6023-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "6024-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "6025-Frais sur achats": {}, + "6029-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "603-Variations des stocks de biens achet\u00e9s": { + "6031-Variations des stocks de marchandises": {}, + "6032-Variations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": {}, + "6033-Variations des stocks d\u2019autres approvisionnements": {} + }, + "604-Achats stock\u00e9s de mati\u00e8res et fournitures consommables": { + "6041-Mati\u00e8res consommables": {}, + "6042-Mati\u00e8res combustibles": {}, + "6043-Produits d\u2019entretien": {}, + "6044-Fournitures d\u2019atelier et d\u2019usine": {}, + "6045-Frais sur achat": {}, + "6046-Fournitures de magasin": {}, + "6047-Fournitures de bureau": {}, + "6049-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "605-Autres achats": { + "6051-Fournitures non stockables Eau": {}, + "6052-Fournitures non stockables \u00c9lectricit\u00e9": {}, + "6053-Fournitures non stockables Autres \u00e9nergies": {}, + "6054-Fournitures d\u2019entretien non stockables": {}, + "6055-Fournitures de bureau non stockables": {}, + "6056-Achats de petit mat\u00e9riel et outillage": {}, + "6057-Achats d\u2019\u00e9tudes et prestations de services": {}, + "6058-Achats de travaux, mat\u00e9riels et \u00e9quipements": {}, + "6059-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "608-Achats d\u2019emballages": { + "6081-Emballages perdus": {}, + "6082-Emballages r\u00e9cup\u00e9rables non identifiables": {}, + "6083-Emballages \u00e0 usage mixte": {}, + "6085-Frais sur achats": {}, + "6089-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + } + }, + "61-Transports": { + "612-Transports sur ventes": {}, + "613-Transports pour le compte de tiers": {}, + "614-Transports du personnel": {}, + "616-Transports de plis": {}, + "618-Autres frais de transport": { + "6181-Voyages et d\u00e9placements": {}, + "6182-Transports entre \u00e9tablissements ou chantiers": {}, + "6183-Transports administratifs": {} + } + }, + "62-Services ext\u00e9rieurs": { + "621-Sous-traitance g\u00e9n\u00e9rale": {}, + "622-Locations, charges locatives": { + "6221-Locations de terrains": {}, + "6222-Locations de b\u00e2timents": {}, + "6223-Locations de mat\u00e9riels et outillages": {}, + "6224-Malis sur emballages": {}, + "6225-Locations d\u2019emballages": {}, + "6226-Fermages et loyers du foncier": {}, + "6228-Locations et charges locatives diverses": {} + }, + "623-Redevances de location acquisition": { + "6232-Cr\u00e9dit-bail immobilier": {}, + "6233-Cr\u00e9dit-bail mobilier": {}, + "6234-Location-vente": {}, + "6238-Autres contrats de location acquisition": {} + }, + "624-Entretien, r\u00e9parations, remise en \u00e9tat et maintenance": { + "6241-Entretien et r\u00e9parations des biens immobiliers": {}, + "6242-Entretien et r\u00e9parations des biens mobiliers": {}, + "6243-Maintenance": {}, + "6244-Charges de d\u00e9mant\u00e8lement et remise en \u00e9tat": {}, + "6248-Autres entretiens et r\u00e9parations": {} + }, + "625-Primes d\u2019assurance": { + "6251-Assurances multirisques": {}, + "6252-Assurances mat\u00e9riel de transport": {}, + "6253-Assurances risques d\u2019exploitation": {}, + "6254-Assurances responsabilit\u00e9 du producteur": {}, + "6255-Assurances insolvabilit\u00e9 clients": {}, + "6257-Assurances transport sur ventes": {}, + "6258-Autres primes d\u2019assurances": {} + }, + "626-\u00c9tudes, recherches et documentation": { + "6261-\u00c9tudes et recherches": {}, + "6265-Documentation g\u00e9n\u00e9rale": {}, + "6266-Documentation technique": {} + }, + "627-Publicit\u00e9, publications, relations publiques": { + "6271-Annonces, insertions": {}, + "6272-Catalogues, imprim\u00e9s publicitaires": {}, + "6273-\u00c9chantillons": {}, + "6274-Foires et expositions": {}, + "6275-Publications": {}, + "6276-Cadeaux \u00e0 la client\u00e8le": {}, + "6277-Frais de colloques, s\u00e9minaires, conf\u00e9rences": {}, + "6278-Autres charges de publicit\u00e9 et relations publiques": {} + }, + "628-Frais de t\u00e9l\u00e9communications": { + "6281-Frais de t\u00e9l\u00e9phone": {}, + "6282-Frais de t\u00e9lex": {}, + "6283-Frais de t\u00e9l\u00e9copie": {}, + "6288-Autres frais de t\u00e9l\u00e9communications": {} + } + }, + "63-Autres services ext\u00e9rieurs": { + "631-Frais bancaires": { + "6311-Frais sur titres (vente, garde)": {}, + "6312-Frais sur effets": {}, + "6313-Location de coffres": {}, + "6314-Commissions d\u2019affacturage": {}, + "6315-Commissions sur cartes de cr\u00e9dit": {}, + "6316-Frais d\u2019\u00e9mission d\u2019emprunts": {}, + "6317-Frais sur instruments monnaie \u00e9lectronique": {}, + "6318-Autres frais bancaires": {} + }, + "632-R\u00e9mun\u00e9rations d\u2019interm\u00e9diaires et de conseils": { + "6322-Commissions et courtages sur ventes": {}, + "6324-Honoraires des professions r\u00e9glement\u00e9es": {}, + "6325-Frais d\u2019actes et de contentieux": {}, + "6326-R\u00e9mun\u00e9rations d\u2019affacturage": {}, + "6327-R\u00e9mun\u00e9rations des autres prestataires de services": {}, + "6328-Divers frais": {} + }, + "633-Frais de formation du personnel": {}, + "634-Redevances pour brevets, licences, logiciels, concessions et droits et valeurs similaires": { + "6342-Redevances pour brevets, licences": {}, + "6343-Redevances pour logiciels": {}, + "6344-Redevances pour marques": {}, + "6345-Redevances pour sites internet": {}, + "6346-Redevances pour concessions, droits et valeurs similaires": {} + }, + "635-Cotisations": { + "6351-Cotisations": {}, + "6358-Concours divers": {} + }, + "637-R\u00e9mun\u00e9rations de personnel ext\u00e9rieur \u00e0 l\u2019entit\u00e9": { + "6371-Personnel int\u00e9rimaire": {}, + "6372-Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": {} + }, + "638-Autres charges externes": { + "6381-Frais de recrutement du personnel": {}, + "6382-Frais de d\u00e9m\u00e9nagement": {}, + "6383-R\u00e9ceptions": {}, + "6384-Missions": {}, + "6385-Charges de copropri\u00e9t\u00e9": {} + } + }, + "64-Imp\u00f4ts et taxes": { + "641-Imp\u00f4ts et taxes directs": { + "6411-Imp\u00f4ts fonciers et taxes annexes": {}, + "6412-Patentes, licences et taxes annexes": {}, + "6413-Taxes sur appointements et salaires": {}, + "6414-Taxes d\u2019apprentissage": {}, + "6415-Formation professionnelle continue": {}, + "6418-Autres imp\u00f4ts et taxes directs": {} + }, + "645-Imp\u00f4ts et taxes indirects": {}, + "646-Droits d\u2019enregistrement": { + "6461-Droits de mutation": {}, + "6462-Droits de timbre": {}, + "6463-Taxes sur les v\u00e9hicules de soci\u00e9t\u00e9": {}, + "6464-Vignettes": {}, + "6468-Autres droits": {} + }, + "647-P\u00e9nalit\u00e9s, amendes fiscales": { + "6471-P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts directs": {}, + "6472-P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts indirects": {}, + "6473-P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts directs": {}, + "6474-P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts indirects": {}, + "6478-Autres p\u00e9nalit\u00e9s et amendes fiscales": {} + }, + "648-Autres imp\u00f4ts et taxes": {} + }, + "65-Autres charges": { + "651-Pertes sur cr\u00e9ances clients et autres d\u00e9biteurs": { + "6511-Clients": {}, + "6515-Autres d\u00e9biteurs": {} + }, + "652-Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "6521-Quote-part transf\u00e9r\u00e9e de b\u00e9n\u00e9fices (comptabilit\u00e9 du g\u00e9rant)": {}, + "6525-Pertes imput\u00e9es par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": {} + }, + "654-Valeurs comptables des cessions courantes d\u2019immobilisations": { + "6541-Immobilisations incorporelles": {}, + "6542-Immobilisations corporelles": {} + }, + "656-Perte de change sur cr\u00e9ances et dettes commerciale": {}, + "657-P\u00e9nalit\u00e9s et amendes p\u00e9nales": {}, + "658-Charges diverses": { + "6581-Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": {}, + "6582-Dons": {}, + "6583-M\u00e9c\u00e9nat": {}, + "6588-Autres charges diverses": {} + }, + "659-Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "6591-Sur risques \u00e0 court terme": {}, + "6593-Sur stocks": {}, + "6594-Sur cr\u00e9ances": {}, + "6598-Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme": {} + } + }, + "66-Charges de personnel": { + "661-R\u00e9mun\u00e9rations directes vers\u00e9es au personnel national": { + "6611-Appointements salaires et commissions": {}, + "6612-Primes et gratifications": {}, + "6613-Cong\u00e9s pay\u00e9s": {}, + "6614-Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": {}, + "6615-Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": {}, + "6616-Suppl\u00e9ment familial": {}, + "6617-Avantages en nature": {}, + "6618-Autres r\u00e9mun\u00e9rations directes": {} + }, + "662-R\u00e9mun\u00e9rations directes vers\u00e9es au personnel non national": { + "6621-Appointements salaires et commissions": {}, + "6622-Primes et gratifications": {}, + "6623-Cong\u00e9s pay\u00e9s": {}, + "6624-Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": {}, + "6625-Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": {}, + "6626-Suppl\u00e9ment familial": {}, + "6627-Avantages en nature": {}, + "6628-Autres r\u00e9mun\u00e9rations directes": {} + }, + "663-Indemnit\u00e9s forfaitaires vers\u00e9es au personnel": { + "6631-Indemnit\u00e9s de logement": {}, + "6632-Indemnit\u00e9s de repr\u00e9sentation": {}, + "6633-Indemnit\u00e9s d\u2019expatriation": {}, + "6634-Indemnit\u00e9s de transport": {}, + "6638-Autres indemnit\u00e9s et avantages divers": {} + }, + "664-Charges sociales": { + "6641-Charges sociales sur r\u00e9mun\u00e9ration du personnel national": {}, + "6642-Charges sociales sur r\u00e9mun\u00e9ration du personnel non national": {} + }, + "666-R\u00e9mun\u00e9rations et charges sociales de l\u2019exploitant individuel": { + "6661-R\u00e9mun\u00e9ration du travail de l\u2019exploitant": {}, + "6662-Charges sociales": {} + }, + "667-R\u00e9mun\u00e9ration transf\u00e9r\u00e9e de personnel ext\u00e9rieur": { + "6671-Personnel int\u00e9rimaire": {}, + "6672-Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": {} + }, + "668-Autres charges sociales": { + "6681-Versements aux syndicats et comit\u00e9s d\u2019entreprise, d\u2019\u00e9tablissement": {}, + "6682-Versements aux comit\u00e9s d\u2019hygi\u00e8ne et de s\u00e9curit\u00e9": {}, + "6683-Versements et contributions aux autres \u0153uvres sociales": {}, + "6684-M\u00e9decine du travail et pharmacie": {}, + "6685-Assurances et organismes de sant\u00e9": {}, + "6686-Assurances retraite et fonds de pension": {}, + "6687-Majorations et p\u00e9nalit\u00e9s sociales": {}, + "6688-Charges sociales diverses": {} + } + }, + "67-Frais financiers et charges assimil\u00e9es": { + "671-Int\u00e9r\u00eats des emprunts": { + "6711-Emprunts obligataires": {}, + "6712-Emprunts aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": {}, + "6713-Dettes li\u00e9es \u00e0 des participations": {}, + "6714-Primes de remboursement des obligations": {} + }, + "672-Int\u00e9r\u00eats dans loyers de location acquisition": { + "6722-Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail immobilier": {}, + "6723-Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail mobilier": {}, + "6724-Int\u00e9r\u00eats dans loyers de location acquisition / location-vente": {}, + "6728-Int\u00e9r\u00eats dans loyers des autres locations acquisition": {} + }, + "673-Escomptes accord\u00e9s": {}, + "674-Autres int\u00e9r\u00eats": { + "6741-Avances re\u00e7ues et d\u00e9p\u00f4ts cr\u00e9diteurs": {}, + "6742-Comptes courants bloqu\u00e9s": {}, + "6743-Int\u00e9r\u00eats sur obligations cautionn\u00e9es": {}, + "6744-Int\u00e9r\u00eats sur dettes commerciales": {}, + "6745-Int\u00e9r\u00eats bancaires et sur op\u00e9rations de financement (escompte...)": {}, + "6748-Int\u00e9r\u00eats sur dettes diverses": {} + }, + "675-Escomptes des effets de commerce": {}, + "676-Pertes de change financi\u00e8res": {}, + "677-Pertes sur titres de placement": { + "6771-Pertes sur cessions de titres de placement": {}, + "6772-Mali provenant d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": {} + }, + "678-Pertes et charges sur risques financiers": { + "6781-Sur rentes viag\u00e8res": {}, + "6782-Sur op\u00e9rations financi\u00e8res": {}, + "6784-Sur instruments de tr\u00e9sorerie": {} + }, + "679-Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "6791-Sur risques financiers": {}, + "6795-Sur titres de placement": {}, + "6798-Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": {} + } + }, + "68-Dotations aux amortissements": { + "681-Dotations aux amortissements d\u2019exploitation": { + "6812-Dotations aux amortissements des immobilisations incorporelles": {}, + "6813-Dotations aux amortissements des immobilisations corporelles": {} + } + }, + "69-Dotations aux provisions et aux d\u00e9pr\u00e9ciations": { + "691-Dotations aux provisions et aux d\u00e9pr\u00e9ciations d\u2019exploitation": { + "6911-Dotations aux provisions pour risques et charges": {}, + "6913-Dotations aux d\u00e9pr\u00e9ciations des immobilisations incorporelles": {}, + "6914-Dotations aux d\u00e9pr\u00e9ciations des immobilisations corporelles": {} + }, + "697-Dotations aux provisions et aux d\u00e9pr\u00e9ciations financi\u00e8res": { + "6971-Dotations aux provisions pour risques et charges": {}, + "6972-Dotations aux d\u00e9pr\u00e9ciations des immobilisations financi\u00e8res": {} + } + }, + "root_type": "Expense" + }, + "7-Comptes de produits des activit\u00e9s ordinaires": { + "70-Ventes": { + "701-Ventes de marchandises": { + "7011-Dans la R\u00e9gion": {}, + "7012-Hors R\u00e9gion": {}, + "7013-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7014-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7015-Sur internet": {}, + "7019-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "702-Ventes de produits finis": { + "7021-Dans la R\u00e9gion": {}, + "7022-Hors R\u00e9gion": {}, + "7023-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7024-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7025-Sur internet": {}, + "7029-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "703-Ventes de produits interm\u00e9diaires": { + "7031-Dans la R\u00e9gion": {}, + "7032-Hors R\u00e9gion": {}, + "7033-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7034-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7035-Sur internet": {}, + "7039-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "704-Ventes de produits r\u00e9siduels": { + "7041-Dans la R\u00e9gion": {}, + "7042-Hors R\u00e9gion": {}, + "7043-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7044-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7045-Sur internet": {}, + "7049-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "705-Travaux factur\u00e9s": { + "7051-Dans la R\u00e9gion": {}, + "7052-Hors R\u00e9gion": {}, + "7053-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7054-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7055-Sur internet": {}, + "7059-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "706-Services vendus": { + "7061-Dans la R\u00e9gion": {}, + "7062-Hors R\u00e9gion": {}, + "7063-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7064-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7065-Sur internet": {}, + "7069-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "707-Produits accessoires": { + "7071-Ports, emballages perdus et autres frais factur\u00e9s": {}, + "7072-Commissions et courtages": {}, + "7073-Locations": {}, + "7074-Bonis sur reprises et cessions d\u2019emballages": {}, + "7075-Mise \u00e0 disposition de personnel": {}, + "7076-Redevances pour brevets, logiciels, marques et droits similaires": {}, + "7077-Services exploit\u00e9s dans l\u2019int\u00e9r\u00eat du personnel": {}, + "7078-Autres produits accessoires": {} + } + }, + "71-Subventions d\u2019exploitation": { + "711-Sur produits \u00e0 l\u2019exportation": {}, + "712-Sur produits \u00e0 l\u2019importation": {}, + "713-Sur produits de p\u00e9r\u00e9quation": {}, + "714-Indemnit\u00e9s et subventions d\u2019exploitation (entit\u00e9 agricole)": {}, + "718-Autres subventions d\u2019exploitation": { + "7181-Vers\u00e9es par l\u2019\u00c9tat et les collectivit\u00e9s publiques": {}, + "7182-Vers\u00e9es par les organismes internationaux": {}, + "7183-Vers\u00e9es par des tiers": {} + } + }, + "72-Production immobilis\u00e9e": { + "721-Immobilisations incorporelles": {}, + "722-Immobilisations corporelles": { + "7221-Immobilisations corporelles (hors actifs biologiques)": {}, + "7222-Immobilisations corporelles (actifs biologiques)": {} + }, + "724-Production auto-consomm\u00e9e": {}, + "726-Immobilisations financi\u00e8res": {} + }, + "73-Variations des stocks de biens et de services produits": { + "734-Variations des stocks de produits en cours": { + "7341-Produits en cours": {}, + "7342-Travaux en cours": {} + }, + "735-Variations des en-cours de services": { + "7351-\u00c9tudes en cours": {}, + "7352-Prestations de services en cours": {} + }, + "736-Variations des stocks de produits finis": {}, + "737-Variations des stocks de produits interm\u00e9diaires et r\u00e9siduels": { + "7371-Produits interm\u00e9diaires": {}, + "7372-Produits r\u00e9siduels": {} + } + }, + "75-Autres produits": { + "751-Profits sur cr\u00e9ances clients et autres d\u00e9biteurs": {}, + "752-Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "7521-Quote-part transf\u00e9r\u00e9e de pertes (comptabilit\u00e9 du g\u00e9rant)": {}, + "7525-B\u00e9n\u00e9fices attribu\u00e9s par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": {} + }, + "754-Produits des cessions courantes d\u2019immobilisations": { + "7541-Immobilisations incorporelles": {}, + "7542-Immobilisations corporelles": {} + }, + "756-Gains de change sur cr\u00e9ances et dettes commerciales": {}, + "758-Produits divers": { + "7581-Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": {}, + "7582-Indemnit\u00e9s d\u2019assurances re\u00e7ues": {}, + "7588-Autres produits divers": {} + }, + "759-Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "7591-Sur risques \u00e0 court terme": {}, + "7593-Sur stocks": {}, + "7594-Sur cr\u00e9ances": {}, + "7598-Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": {} + } + }, + "77-Revenus financiers et produits assimil\u00e9s": { + "771-Int\u00e9r\u00eats de pr\u00eats et cr\u00e9ances diverses": { + "7712-Int\u00e9r\u00eats de pr\u00eats": {}, + "7713-Int\u00e9r\u00eats sur cr\u00e9ances diverses": {} + }, + "772-Revenus de participations et autres titres immobilis\u00e9s": { + "7721-Revenus des titres de participation": {}, + "7722-Revenus autres titres immobilis\u00e9s": {} + }, + "773-Escomptes obtenus": {}, + "774-Revenus de placement": { + "7745-Revenus des obligations": {}, + "7746-Revenus des titres de placement": {} + }, + "775-Int\u00e9r\u00eats dans loyers de location acquisition": {}, + "776-Gains de change financiers": {}, + "777-Gains sur cessions de titres de placement": {}, + "778-Gains sur risques financiers": { + "7781-Sur rentes viag\u00e8res": {}, + "7782-Sur op\u00e9rations financi\u00e8res": {}, + "7784-Sur instruments de tr\u00e9sorerie": {} + }, + "779-Reprises de charges pour d\u00e9pr\u00e9ciations et provisions \u00e0 court terme financi\u00e8res": { + "7791-Sur risques financiers": {}, + "7795-Sur titres de placement": {}, + "7798-Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": {} + } + }, + "78-Transferts de charges": { + "781-Transferts de charges d\u2019exploitation": {}, + "787-Transferts de charges financi\u00e8res": {} + }, + "79-Reprises de provisions, de d\u00e9pr\u00e9ciations et autres": { + "791-Reprises de provisions et d\u00e9pr\u00e9ciations d\u2019exploitation": { + "7911-Pour risques et charges": {}, + "7913-Des immobilisations incorporelles": {}, + "7914-Des immobilisations corporelles": {} + }, + "797-Reprises de provisions et d\u00e9pr\u00e9ciations financi\u00e8res": { + "7971-Pour risques et charges": {}, + "7972-Des immobilisations financi\u00e8res": {} + }, + "798-Reprises d\u2019amortissements": {}, + "799-Reprises de subventions d\u2019investissement": {} + }, + "root_type": "Income" + }, + "8-Comptes des autres charges et des autres produits (CHARGES)": { + "81-Valeurs comptables des cessions d\u2019immobilisations": { + "811-Immobilisations incorporelles": {}, + "812-Immobilisations corporelles": {}, + "816-Immobilisations financi\u00e8res": {} + }, + "83-Charges hors activit\u00e9s ordinaires": { + "831-Charges HAO constat\u00e9es": {}, + "833-Charges li\u00e9es aux op\u00e9rations de restructuration": {}, + "834-Pertes sur cr\u00e9ances HAO": {}, + "835-Dons et lib\u00e9ralit\u00e9s accord\u00e9s": {}, + "836-Abandons de cr\u00e9ances consentis": {}, + "837-Charges li\u00e9es aux op\u00e9rations de liquidation": {}, + "839-Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": {} + }, + "85-Dotations hors activit\u00e9s ordinaires": { + "851-Dotations aux provisions r\u00e9glement\u00e9es": {}, + "852-Dotations aux amortissements HAO": {}, + "853-Dotations aux d\u00e9pr\u00e9ciations HAO": {}, + "854-Dotations aux provisions pour risques et charges HAO": {}, + "858-Autres dotations HAO": {} + }, + "87-Participation des travailleurs": { + "871-Participation l\u00e9gale aux b\u00e9n\u00e9fices": {}, + "874-Participation contractuelle aux b\u00e9n\u00e9fices": {}, + "878-Autres participations": {} + }, + "89-Imp\u00f4ts sur le r\u00e9sultat": { + "891-Imp\u00f4ts sur les b\u00e9n\u00e9fices de l\u2019exercice": { + "8911-Activit\u00e9s exerc\u00e9es dans l\u2019\u00c9tat": {}, + "8912-Activit\u00e9s exerc\u00e9es dans les autres \u00c9tats de la R\u00e9gion": {}, + "8913-Activit\u00e9s exerc\u00e9es hors R\u00e9gion": {} + }, + "892-Rappel d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": {}, + "895-Imp\u00f4t minimum forfaitaire IMF": {}, + "899-D\u00e9gr\u00e8vements et annulations d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": { + "8991-D\u00e9gr\u00e8vements": {}, + "8994-Annulations pour pertes r\u00e9troactives": {} + } + }, + "root_type": "Expense" + }, + "8-Comptes des autres charges et des autres produits (PRODUITS)": { + "82-Produits des cessions d\u2019immobilisations": { + "821-Immobilisations incorporelles": {}, + "822-Immobilisations corporelles": {}, + "826-Immobilisations financi\u00e8res": {} + }, + "84-Produits hors activit\u00e9s ordinaires": { + "841-Produits HAO constat\u00e9s": {}, + "843-Produits li\u00e9s aux op\u00e9rations de restructuration": {}, + "844-Indemnit\u00e9s et subventions HAO (entit\u00e9 agricole)": {}, + "845-Dons et lib\u00e9ralit\u00e9s obtenus": {}, + "846-Abandons de cr\u00e9ances obtenus": {}, + "847-Produits li\u00e9s aux op\u00e9rations de liquidation": {}, + "848-Transferts de charges HAO": {}, + "849-Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": {} + }, + "86-Reprises de charges, provisions et d\u00e9pr\u00e9ciations HAO": { + "861-Reprises de provisions r\u00e9glement\u00e9es": {}, + "862-Reprises d\u2019amortissements HAO": {}, + "863-Reprises de d\u00e9pr\u00e9ciations HAO": {}, + "864-Reprises de provisions pour risques et charges HAO": {}, + "868-Autres reprises HAO": {} + }, + "88-Subventions d\u2019\u00e9quilibre": { + "881-\u00c9tat": {}, + "884-Collectivit\u00e9s publiques": {}, + "886-Groupe": {}, + "888-Autres": {} + }, + "root_type": "Income" + } + } +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/gq_plan_comptable_avec_code.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/gq_plan_comptable_avec_code.json new file mode 100644 index 00000000000..4219e6aa220 --- /dev/null +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/gq_plan_comptable_avec_code.json @@ -0,0 +1,4208 @@ +{ + "country_code": "gq", + "name": "Syscohada - Plan Comptable avec code", + "tree": { + "Comptes de ressources durables": { + "Capital": { + "Capital social": { + "Capital souscrit, non appel\u00e9": { + "account_number": "1011" + }, + "Capital souscrit, appel\u00e9, non vers\u00e9": { + "account_number": "1012" + }, + "Capital souscrit, appel\u00e9, vers\u00e9, non amorti": { + "account_number": "1013" + }, + "Capital souscrit, appel\u00e9, vers\u00e9, amorti": { + "account_number": "1014" + }, + "Capital souscrit soumis \u00e0 des conditions particuli\u00e8res": { + "account_number": "1018" + }, + "account_number": "101" + }, + "Capital par dotation": { + "Dotation initiale": { + "account_number": "1021" + }, + "Dotations compl\u00e9mentaires": { + "account_number": "1022" + }, + "Autres dotations": { + "account_number": "1028" + }, + "account_number": "102" + }, + "Capital personnel": { + "account_number": "103" + }, + "Compte de l\u2019exploitant": { + "Apports temporaires": { + "account_number": "1041" + }, + "Op\u00e9rations courantes": { + "account_number": "1042" + }, + "R\u00e9mun\u00e9rations, imp\u00f4ts et autres charges personnelles": { + "account_number": "1043" + }, + "Pr\u00e9l\u00e8vements d\u2019autoconsommation": { + "account_number": "1047" + }, + "Autres pr\u00e9l\u00e8vements": { + "account_number": "1048" + }, + "account_number": "104" + }, + "Primes li\u00e9es au capital social": { + "Primes d\u2019\u00e9mission": { + "account_number": "1051" + }, + "Primes d\u2019apport": { + "account_number": "1052" + }, + "Primes de fusion": { + "account_number": "1053" + }, + "Primes de conversion": { + "account_number": "1054" + }, + "Autres primes": { + "account_number": "1058" + }, + "account_number": "105" + }, + "\u00c9carts de r\u00e9\u00e9valuation": { + "\u00c9carts de r\u00e9\u00e9valuation l\u00e9gale": { + "account_number": "1061" + }, + "\u00c9carts de r\u00e9\u00e9valuation libre": { + "account_number": "1062" + }, + "account_number": "106" + }, + "Apporteurs, capital souscrit, non appel\u00e9": { + "account_number": "109" + }, + "account_number": "10" + }, + "R\u00e9serves": { + "R\u00e9serve l\u00e9gale": { + "account_number": "111" + }, + "R\u00e9serves statutaires ou contractuelles": { + "account_number": "112" + }, + "R\u00e9serves r\u00e9glement\u00e9es": { + "R\u00e9serves de plus-values nettes \u00e0 long terme": { + "account_number": "1131" + }, + "R\u00e9serves d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": { + "account_number": "1132" + }, + "R\u00e9serves cons\u00e9cutives \u00e0 l\u2019octroi de subventions d\u2019investissement": { + "account_number": "1133" + }, + "R\u00e9serves des valeurs mobili\u00e8res donnant acc\u00e8s au capital": { + "account_number": "1134" + }, + "Autres r\u00e9serves r\u00e9glement\u00e9es": { + "account_number": "1135" + }, + "account_number": "113" + }, + "Autres r\u00e9serves": { + "R\u00e9serves facultatives": { + "account_number": "1181" + }, + "R\u00e9serves diverses": { + "account_number": "1188" + }, + "account_number": "118" + }, + "account_number": "11" + }, + "Report \u00e0 nouveau": { + "Report \u00e0 nouveau cr\u00e9diteur": { + "account_number": "121" + }, + "Report \u00e0 nouveau d\u00e9biteur": { + "Perte nette \u00e0 reporter": { + "account_number": "1291" + }, + "Perte Amortissements r\u00e9put\u00e9s diff\u00e9r\u00e9s": { + "account_number": "1292" + }, + "account_number": "129" + }, + "account_number": "12" + }, + "R\u00e9sultat net de l\u2019exercice": { + "R\u00e9sultat en instance d\u2019affectation": { + "R\u00e9sultat en instance d\u2019affectation : b\u00e9n\u00e9fice": { + "account_number": "1301" + }, + "R\u00e9sultat en instance d\u2019affectation : perte": { + "account_number": "1309" + }, + "account_number": "130" + }, + "R\u00e9sultat net : b\u00e9n\u00e9fice": { + "account_number": "131" + }, + "Marge commerciale (MC)": { + "account_number": "132" + }, + "Valeur ajout\u00e9e (VA)": { + "account_number": "133" + }, + "Exc\u00e9dent brut d\u2019exploitation (EBE)": { + "account_number": "134" + }, + "R\u00e9sultat d\u2019exploitation (RE)": { + "account_number": "135" + }, + "R\u00e9sultat financier (RF)": { + "account_number": "136" + }, + "R\u00e9sultat des activit\u00e9s ordinaires (RAO)": { + "account_number": "137" + }, + "R\u00e9sultat hors activit\u00e9s ordinaires (RHAO)": { + "R\u00e9sultat de fusion": { + "account_number": "1381" + }, + "R\u00e9sultat d\u2019apport partiel d\u2019actif": { + "account_number": "1382" + }, + "R\u00e9sultat de scission": { + "account_number": "1383" + }, + "R\u00e9sultat de liquidation": { + "account_number": "1384" + }, + "account_number": "138" + }, + "R\u00e9sultat net : perte": { + "account_number": "139" + }, + "account_number": "13" + }, + "Subventions d\u2019investissement": { + "Subventions d\u2019\u00e9quipement": { + "\u00c9tat": { + "account_number": "1411" + }, + "R\u00e9gions": { + "account_number": "1412" + }, + "D\u00e9partements": { + "account_number": "1413" + }, + "Communes et collectivit\u00e9s publiques d\u00e9centralis\u00e9es": { + "account_number": "1414" + }, + "Entit\u00e9s publiques ou mixtes": { + "account_number": "1415" + }, + "Entit\u00e9s et organismes priv\u00e9s": { + "account_number": "1416" + }, + "Organismes internationaux": { + "account_number": "1417" + }, + "Autres": { + "account_number": "1418" + }, + "account_number": "141" + }, + "Autres subventions d\u2019investissement": { + "account_number": "148" + }, + "account_number": "14" + }, + "Provisions r\u00e9glement\u00e9es et fonds assimil\u00e9s": { + "Amortissements d\u00e9rogatoires": { + "account_number": "151" + }, + "Plus-values de cession \u00e0 r\u00e9investir": { + "account_number": "152" + }, + "Fonds r\u00e9glement\u00e9s": { + "Fonds National": { + "account_number": "1531" + }, + "Pr\u00e9l\u00e8vement pour le Budget": { + "account_number": "1532" + }, + "account_number": "153" + }, + "Provisions sp\u00e9ciales de r\u00e9\u00e9valuation": { + "account_number": "154" + }, + "Provisions r\u00e9glement\u00e9es relatives aux immobilisations": { + "Reconstitution des gisements miniers et p\u00e9troliers": { + "account_number": "1551" + }, + "account_number": "155" + }, + "Provisions r\u00e9glement\u00e9es relatives aux stocks": { + "Hausse de prix": { + "account_number": "1561" + }, + "Fluctuation des cours": { + "account_number": "1562" + }, + "account_number": "156" + }, + "Provisions pour investissement": { + "account_number": "157" + }, + "Autres provisions et fonds r\u00e9glement\u00e9s": { + "account_number": "158" + }, + "account_number": "15" + }, + "Emprunts et dettes assimil\u00e9es": { + "Emprunts obligataires": { + "Emprunts obligataires ordinaires": { + "account_number": "1611" + }, + "Emprunts obligataires convertibles en actions": { + "account_number": "1612" + }, + "Emprunts obligataires remboursables en actions": { + "account_number": "1613" + }, + "Autres emprunts obligataires": { + "account_number": "1618" + }, + "account_number": "161" + }, + "Emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": { + "account_number": "162" + }, + "Avances re\u00e7ues de l\u2019\u00c9tat": { + "account_number": "163" + }, + "Avances re\u00e7ues et comptes courants bloqu\u00e9s": { + "account_number": "164" + }, + "D\u00e9p\u00f4ts et cautionnements re\u00e7us": { + "D\u00e9p\u00f4ts": { + "account_number": "1651" + }, + "Cautionnements": { + "account_number": "1652" + }, + "account_number": "165" + }, + "Int\u00e9r\u00eats courus": { + "Sur emprunts obligataires": { + "account_number": "1661" + }, + "Sur emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": { + "account_number": "1662" + }, + "Sur avances re\u00e7ues de l\u2019\u00c9tat": { + "account_number": "1663" + }, + "Sur avances re\u00e7ues et comptes courants bloqu\u00e9s": { + "account_number": "1664" + }, + "Sur d\u00e9p\u00f4ts et cautionnements re\u00e7us": { + "account_number": "1665" + }, + "Sur avances assorties de conditions particuli\u00e8res": { + "account_number": "1667" + }, + "Sur autres emprunts et dettes": { + "account_number": "1668" + }, + "account_number": "166" + }, + "Avances assorties de conditions particuli\u00e8res": { + "Avances bloqu\u00e9es pour augmentation du capital": { + "account_number": "1671" + }, + "Avances conditionn\u00e9es par l\u2019\u00c9tat": { + "account_number": "1672" + }, + "Avances conditionn\u00e9es par les autres organismes africains": { + "account_number": "1673" + }, + "Avances conditionn\u00e9es par les organismes internationaux": { + "account_number": "1674" + }, + "account_number": "167" + }, + "Autres emprunts et dettes": { + "Rentes viag\u00e8res capitalis\u00e9es": { + "account_number": "1681" + }, + "Billets de fonds": { + "account_number": "1682" + }, + "Dettes cons\u00e9cutives \u00e0 des titres emprunt\u00e9s": { + "account_number": "1683" + }, + "Emprunts participatifs": { + "account_number": "1684" + }, + "Participation des travailleurs aux b\u00e9n\u00e9fices": { + "account_number": "1685" + }, + "Emprunts et dettes contract\u00e9s aupr\u00e8s des autres tiers": { + "account_number": "1686" + }, + "account_number": "168" + }, + "account_number": "16" + }, + "Dettes de location acquisition": { + "Dettes de location acquisition / cr\u00e9dit bail immobilier": { + "account_number": "172" + }, + "Dettes de location acquisition / cr\u00e9dit bail mobilier": { + "account_number": "173" + }, + "Dettes de location acquisition / location de vente": { + "account_number": "174" + }, + "Int\u00e9r\u00eats courus": { + "Sur dettes de location acquisition / cr\u00e9dit-bail immobilier": { + "account_number": "1762" + }, + "Sur dettes de location acquisition / cr\u00e9dit-bail mobilier": { + "account_number": "1763" + }, + "Sur dettes de location acquisition / location-vente": { + "account_number": "1764" + }, + "Sur autres dettes de location acquisition": { + "account_number": "1768" + }, + "account_number": "176" + }, + "Autres dettes de location acquisition": { + "account_number": "178" + }, + "account_number": "17" + }, + "Dettes li\u00e9es \u00e0 des participations et comptes de liaison des \u00e9tablissements et soci\u00e9t\u00e9s en participation": { + "Dettes li\u00e9es \u00e0 des participations": { + "Dettes li\u00e9es \u00e0 des participations (groupe)": { + "account_number": "1811" + }, + "Dettes li\u00e9es \u00e0 des participations (hors groupe)": { + "account_number": "1812" + }, + "account_number": "181" + }, + "Dettes li\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": { + "account_number": "182" + }, + "Int\u00e9r\u00eats courus sur dettes li\u00e9es \u00e0 des participations": { + "account_number": "183" + }, + "Comptes permanents bloqu\u00e9s des \u00e9tablissements et succursales": { + "account_number": "184" + }, + "Comptes permanents non bloqu\u00e9s des \u00e9tablissements et succursales": { + "account_number": "185" + }, + "Comptes de liaison charges": { + "account_number": "186" + }, + "Comptes de liaison produits": { + "account_number": "187" + }, + "Comptes de liaison des soci\u00e9t\u00e9s en participation": { + "account_number": "188" + }, + "account_number": "18" + }, + "Provisions pour risques et charges": { + "Provisions pour litiges": { + "account_number": "191" + }, + "Provisions pour garanties donn\u00e9es aux clients": { + "account_number": "192" + }, + "Provisions pour pertes sur march\u00e9s \u00e0 ach\u00e8vement futur": { + "account_number": "193" + }, + "Provisions pour pertes de change": { + "account_number": "194" + }, + "Provisions pour imp\u00f4ts": { + "account_number": "195" + }, + "Provisions pour pensions et obligations similaires": { + "Provisions pour pensions et obligations similaires engagement de retraite": { + "account_number": "1961" + }, + "Actif du r\u00e9gime de retraite": { + "account_number": "1962" + }, + "account_number": "196" + }, + "Provisions pour restructuration": { + "account_number": "197" + }, + "Autres provisions pour risques et charges": { + "Provisions pour amendes et p\u00e9nalit\u00e9s": { + "account_number": "1981" + }, + "Provisions pour propre assureur": { + "account_number": "1983" + }, + "Provisions pour d\u00e9mant\u00e8lement et remise en \u00e9tat": { + "account_number": "1984" + }, + "Provisions pour droits \u00e0 r\u00e9duction ou avantage en nature (ch\u00e8ques cadeau, cartes de fid\u00e9lit\u00e9...)": { + "account_number": "1985" + }, + "Provisions pour divers risques et charges": { + "account_number": "1988" + }, + "account_number": "198" + }, + "account_number": "19" + }, + "root_type": "Equity", + "account_number": "1" + }, + "Comptes d\u2019actif immobilis\u00e9": { + "Immobilisations incorporelles": { + "account_type": "Fixed Asset", + "Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset", + "account_number": "211" + }, + "Brevets, licences, concessions et droits similaires": { + "account_type": "Fixed Asset", + "Brevets": { + "account_type": "Fixed Asset", + "account_number": "2121" + }, + "Licences": { + "account_type": "Fixed Asset", + "account_number": "2122" + }, + "Concessions de service public": { + "account_type": "Fixed Asset", + "account_number": "2123" + }, + "Autres concessions et droits similaires": { + "account_type": "Fixed Asset", + "account_number": "2128" + }, + "account_number": "212" + }, + "Logiciels et sites internet": { + "account_type": "Fixed Asset", + "Logiciels": { + "account_type": "Fixed Asset", + "account_number": "2131" + }, + "Sites internet": { + "account_type": "Fixed Asset", + "account_number": "2132" + }, + "account_number": "213" + }, + "Marques": { + "account_type": "Fixed Asset", + "account_number": "214" + }, + "Fonds commercial": { + "account_type": "Fixed Asset", + "account_number": "215" + }, + "Droit au bail": { + "account_type": "Fixed Asset", + "account_number": "216" + }, + "Investissements de cr\u00e9ation": { + "account_type": "Fixed Asset", + "account_number": "217" + }, + "Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset", + "Frais de prospection et d\u2019\u00e9valuation de ressources min\u00e9rales": { + "account_type": "Fixed Asset", + "account_number": "2181" + }, + "Co\u00fbts d\u2019obtention du contrat": { + "account_type": "Fixed Asset", + "account_number": "2182" + }, + "Fichiers clients, notices, titres de journaux et magazines": { + "account_type": "Fixed Asset", + "account_number": "2183" + }, + "Co\u00fbts des franchises": { + "account_type": "Fixed Asset", + "account_number": "2184" + }, + "Divers droits et valeurs incorporelles": { + "account_type": "Fixed Asset", + "account_number": "2188" + }, + "account_number": "218" + }, + "Immobilisations incorporelles en cours": { + "account_type": "Fixed Asset", + "Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset", + "account_number": "2191" + }, + "Logiciels et internet": { + "account_type": "Fixed Asset", + "account_number": "2193" + }, + "Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset", + "account_number": "2198" + }, + "account_number": "219" + }, + "account_number": "21" + }, + "Terrains": { + "account_type": "Fixed Asset", + "Terrains agricoles et forestiers": { + "account_type": "Fixed Asset", + "Terrains d\u2019exploitation agricole": { + "account_type": "Fixed Asset", + "account_number": "2211" + }, + "Terrains d\u2019exploitation foresti\u00e8re": { + "account_type": "Fixed Asset", + "account_number": "2212" + }, + "Autres terrains": { + "account_type": "Fixed Asset", + "account_number": "2218" + }, + "account_number": "221" + }, + "Terrains nus": { + "account_type": "Fixed Asset", + "Terrains \u00e0 b\u00e2tir": { + "account_type": "Fixed Asset", + "account_number": "2221" + }, + "Autres terrains nus": { + "account_type": "Fixed Asset", + "account_number": "2228" + }, + "account_number": "222" + }, + "Terrains b\u00e2tis": { + "account_type": "Fixed Asset", + "Pour b\u00e2timents industriels et agricoles": { + "account_type": "Fixed Asset", + "account_number": "2231" + }, + "Pour b\u00e2timents administratifs et commerciaux": { + "account_type": "Fixed Asset", + "account_number": "2232" + }, + "Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations professionnelles": { + "account_type": "Fixed Asset", + "account_number": "2234" + }, + "Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations non professionnelles": { + "account_type": "Fixed Asset", + "account_number": "2235" + }, + "Autres terrains b\u00e2tis": { + "account_type": "Fixed Asset", + "account_number": "2238" + }, + "account_number": "223" + }, + "Travaux de mise en valeur des terrains": { + "account_type": "Fixed Asset", + "Plantation d\u2019arbres et d\u2019arbustes": { + "account_type": "Fixed Asset", + "account_number": "2241" + }, + "Am\u00e9liorations du fonds": { + "account_type": "Fixed Asset", + "account_number": "2245" + }, + "Autres travaux": { + "account_type": "Fixed Asset", + "account_number": "2248" + }, + "account_number": "224" + }, + "Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset", + "Carri\u00e8res": { + "account_type": "Fixed Asset", + "account_number": "2251" + }, + "account_number": "225" + }, + "Terrains am\u00e9nag\u00e9s": { + "account_type": "Fixed Asset", + "Parkings": { + "account_type": "Fixed Asset", + "account_number": "2261" + }, + "account_number": "226" + }, + "Terrains mis en concession": { + "account_type": "Fixed Asset", + "account_number": "227" + }, + "Autres terrains": { + "account_type": "Fixed Asset", + "Terrains immeubles de placement": { + "account_type": "Fixed Asset", + "account_number": "2281" + }, + "Terrains des logements affect\u00e9s au personnel": { + "account_type": "Fixed Asset", + "account_number": "2285" + }, + "Terrains de location acquisition": { + "account_type": "Fixed Asset", + "account_number": "2286" + }, + "Divers terrains": { + "account_type": "Fixed Asset", + "account_number": "2288" + }, + "account_number": "228" + }, + "Am\u00e9nagements de terrains en cours": { + "account_type": "Fixed Asset", + "Terrains agricoles et forestiers": { + "account_type": "Fixed Asset", + "account_number": "2291" + }, + "Terrains nus": { + "account_type": "Fixed Asset", + "account_number": "2292" + }, + "Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset", + "account_number": "2295" + }, + "Autres terrains": { + "account_type": "Fixed Asset", + "account_number": "2298" + }, + "account_number": "229" + }, + "account_number": "22" + }, + "B\u00e2timents, installations techniques et agencements": { + "B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "B\u00e2timents industriels": { + "account_number": "2311" + }, + "B\u00e2timents agricoles": { + "account_number": "2312" + }, + "B\u00e2timents administratifs et commerciaux": { + "account_number": "2313" + }, + "B\u00e2timents affect\u00e9s au logement du personnel": { + "account_number": "2314" + }, + "B\u00e2timents immeubles de placement": { + "account_number": "2315" + }, + "B\u00e2timents de location acquisition": { + "account_number": "2316" + }, + "account_number": "231" + }, + "B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "B\u00e2timents industriels": { + "account_number": "2321" + }, + "B\u00e2timents agricoles": { + "account_number": "2322" + }, + "B\u00e2timents administratifs et commerciaux": { + "account_number": "2323" + }, + "B\u00e2timents affect\u00e9s au logement du personnel": { + "account_number": "2324" + }, + "B\u00e2timents immeubles de placement": { + "account_number": "2325" + }, + "B\u00e2timents de location acquisition": { + "account_number": "2326" + }, + "account_number": "232" + }, + "Ouvrages d\u2019infrastructure": { + "Voies de terre": { + "account_number": "2331" + }, + "Voies de fer": { + "account_number": "2332" + }, + "Voies d\u2019eau": { + "account_number": "2333" + }, + "Barrages, Digues": { + "account_number": "2334" + }, + "Pistes d\u2019a\u00e9rodrome": { + "account_number": "2335" + }, + "Autres ouvrages d\u2019infrastructures": { + "account_number": "2338" + }, + "account_number": "233" + }, + "Am\u00e9nagements, agencements et installations techniques": { + "Installations complexes sp\u00e9cialis\u00e9es sur sol propre": { + "account_number": "2341" + }, + "Installations complexes sp\u00e9cialis\u00e9es sur sol d\u2019autrui": { + "account_number": "2342" + }, + "Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol propre": { + "account_number": "2343" + }, + "Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol d\u2019autrui": { + "account_number": "2344" + }, + "Am\u00e9nagements et agencements des b\u00e2timents": { + "account_number": "2345" + }, + "account_number": "234" + }, + "Am\u00e9nagements de bureaux": { + "Installations g\u00e9n\u00e9rales": { + "account_number": "2351" + }, + "Autres am\u00e9nagements de bureaux": { + "account_number": "2358" + }, + "account_number": "235" + }, + "B\u00e2timents industriels, agricoles et commerciaux mis en concession": { + "account_number": "237" + }, + "Autres installations et agencements": { + "account_number": "238" + }, + "B\u00e2timents am\u00e9nagements, agencements et installations en cours": { + "B\u00e2timents en cours": { + "account_number": "2391" + }, + "Installations en cours": { + "account_number": "2392" + }, + "Ouvrages d\u2019infrastructure en cours": { + "account_number": "2393" + }, + "Am\u00e9nagements et agencements et installations techniques en cours": { + "account_number": "2394" + }, + "Am\u00e9nagements de bureaux en cours": { + "account_number": "2395" + }, + "Autres installations et agencements en cours": { + "account_number": "2398" + }, + "account_number": "239" + }, + "account_number": "23" + }, + "Mat\u00e9riel, mobilier et actifs biologiques": { + "Mat\u00e9riel et outillage industriel et commercial": { + "Mat\u00e9riel industriel": { + "account_number": "2411" + }, + "Outillage industriel": { + "account_number": "2412" + }, + "Mat\u00e9riel commercial": { + "account_number": "2413" + }, + "Outillage commercial": { + "account_number": "2414" + }, + "Mat\u00e9riel & outillage industriel et commercial de location-acquisition": { + "account_number": "2416" + }, + "account_number": "241" + }, + "Mat\u00e9riel et outillage agricole": { + "Mat\u00e9riel agricole": { + "account_number": "2421" + }, + "Outillage agricole": { + "account_number": "2422" + }, + "Mat\u00e9riel & outillage agricole de location-acquisition": { + "account_number": "2426" + }, + "account_number": "242" + }, + "Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "243" + }, + "Mat\u00e9riel et mobilier": { + "Mat\u00e9riel de bureau": { + "account_number": "2441" + }, + "Mat\u00e9riel informatique": { + "account_number": "2442" + }, + "Mat\u00e9riel bureautique": { + "account_number": "2443" + }, + "Mobilier de bureau": { + "account_number": "2444" + }, + "Mat\u00e9riel et mobilier immeubles de placement": { + "account_number": "2445" + }, + "Mat\u00e9riel et mobilier de location acquisition": { + "account_number": "2446" + }, + "Mat\u00e9riel et mobilier des logements du personnel": { + "account_number": "2447" + }, + "account_number": "244" + }, + "Mat\u00e9riel de transport": { + "Mat\u00e9riel automobile": { + "account_number": "2451" + }, + "Mat\u00e9riel ferroviaire": { + "account_number": "2452" + }, + "Mat\u00e9riel fluvial, lagunaire": { + "account_number": "2453" + }, + "Mat\u00e9riel naval": { + "account_number": "2454" + }, + "Mat\u00e9riel a\u00e9rien": { + "account_number": "2455" + }, + "Mat\u00e9riel de transport de location-acquisition": { + "account_number": "2456" + }, + "Mat\u00e9riel hippomobile": { + "account_number": "2457" + }, + "Autres mat\u00e9riels de transport": { + "account_number": "2458" + }, + "account_number": "245" + }, + "Actifs biologiques": { + "Cheptel, animaux de trait": { + "account_number": "2461" + }, + "Cheptel, animaux reproducteurs": { + "account_number": "2462" + }, + "Animaux de garde": { + "account_number": "2463" + }, + "Plantations agricoles": { + "account_number": "2465" + }, + "Autres actifs biologiques": { + "account_number": "2468" + }, + "account_number": "246" + }, + "Agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "Agencements et am\u00e9nagements du mat\u00e9riel": { + "account_number": "2471" + }, + "Agencements et am\u00e9nagements des actifs biologiques": { + "account_number": "2472" + }, + "Autres agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "account_number": "2478" + }, + "account_number": "247" + }, + "Autres mat\u00e9riels et mobiliers": { + "Collections et \u0153uvres d\u2019art": { + "account_number": "2481" + }, + "Divers mat\u00e9riels mobiliers": { + "account_number": "2488" + }, + "account_number": "248" + }, + "Mat\u00e9riels et actifs biologiques en cours": { + "Mat\u00e9riel et outillage industriel et commercial": { + "account_number": "2491" + }, + "Mat\u00e9riel et outillage agricole": { + "account_number": "2492" + }, + "Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "2493" + }, + "Mat\u00e9riel et mobilier de bureau": { + "account_number": "2494" + }, + "Mat\u00e9riel de transport": { + "account_number": "2495" + }, + "Actifs biologiques": { + "account_number": "2496" + }, + "Agencements am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "account_number": "2497" + }, + "Autres mat\u00e9riels et actifs biologiques en cours": { + "account_number": "2498" + }, + "account_number": "249" + }, + "account_number": "24" + }, + "Avances et acomptes vers\u00e9s sur immobilisations": { + "Avances et acomptes vers\u00e9s sur immobilisations incorporelles": { + "account_number": "251" + }, + "Avances et acomptes vers\u00e9s sur immobilisations corporelles": { + "account_number": "252" + }, + "account_number": "25" + }, + "Titres de participation": { + "Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": { + "account_number": "261" + }, + "Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le conjoint": { + "account_number": "262" + }, + "Titres de participation dans des soci\u00e9t\u00e9s conf\u00e9rant une influence notable": { + "account_number": "263" + }, + "Participations dans des organismes professionnels": { + "account_number": "265" + }, + "Parts dans des groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": { + "account_number": "266" + }, + "Autres titres de participation": { + "account_number": "268" + }, + "account_number": "26" + }, + "Autres immobilisations financi\u00e8res": { + "Pr\u00eats et cr\u00e9ances": { + "Pr\u00eats participatifs": { + "account_number": "2711" + }, + "Pr\u00eats aux associ\u00e9s": { + "account_number": "2712" + }, + "Billets de fonds": { + "account_number": "2713" + }, + "Titres pr\u00eat\u00e9s": { + "account_number": "2714" + }, + "Autres pr\u00eats et cr\u00e9ances": { + "account_number": "2718" + }, + "account_number": "271" + }, + "Pr\u00eats au personnel": { + "Pr\u00eats immobiliers": { + "account_number": "2721" + }, + "Pr\u00eats mobiliers et d\u2019installation": { + "account_number": "2722" + }, + "Autres pr\u00eats au personnel": { + "account_number": "2728" + }, + "account_number": "272" + }, + "Cr\u00e9ances sur l\u2019\u00c9tat": { + "Retenues de garantie": { + "account_number": "2731" + }, + "Fonds r\u00e9glement\u00e9": { + "account_number": "2733" + }, + "Cr\u00e9ances sur le conc\u00e9dant": { + "account_number": "2734" + }, + "Autres cr\u00e9ances sur l\u2019\u00c9tat": { + "account_number": "2738" + }, + "account_number": "273" + }, + "Titres immobilis\u00e9s": { + "Titres immobilis\u00e9s de l\u2019activit\u00e9 de portefeuille (TIAP)": { + "account_number": "2741" + }, + "Titres participatifs": { + "account_number": "2742" + }, + "Certificats d\u2019investissement": { + "account_number": "2743" + }, + "Parts de fonds commun de placement (FCP)": { + "account_number": "2744" + }, + "Obligations": { + "account_number": "2745" + }, + "Actions ou parts propres": { + "account_number": "2746" + }, + "Autres titres immobilis\u00e9s": { + "account_number": "2748" + }, + "account_number": "274" + }, + "D\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "D\u00e9p\u00f4ts pour loyers d\u2019avance": { + "account_number": "2751" + }, + "D\u00e9p\u00f4ts pour l\u2019\u00e9lectricit\u00e9": { + "account_number": "2752" + }, + "D\u00e9p\u00f4ts pour l\u2019eau": { + "account_number": "2753" + }, + "D\u00e9p\u00f4ts pour le gaz": { + "account_number": "2754" + }, + "D\u00e9p\u00f4ts pour le t\u00e9l\u00e9phone, le t\u00e9lex, la t\u00e9l\u00e9copie": { + "account_number": "2755" + }, + "Cautionnements sur march\u00e9s publics": { + "account_number": "2756" + }, + "Cautionnements sur autres op\u00e9rations": { + "account_number": "2757" + }, + "Autres d\u00e9p\u00f4ts et cautionnements": { + "account_number": "2758" + }, + "account_number": "275" + }, + "Int\u00e9r\u00eats courus": { + "Pr\u00eats et cr\u00e9ances non commerciales": { + "account_number": "2761" + }, + "Pr\u00eats au personnel": { + "account_number": "2762" + }, + "Cr\u00e9ances sur l\u2019\u00c9tat": { + "account_number": "2763" + }, + "Titres immobilis\u00e9s": { + "account_number": "2764" + }, + "D\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "account_number": "2765" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations": { + "account_number": "2767" + }, + "Immobilisations financi\u00e8res diverses": { + "account_number": "2768" + }, + "account_number": "276" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": { + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations (groupe)": { + "account_number": "2771" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations (hors groupe)": { + "account_number": "2772" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": { + "account_number": "2773" + }, + "Avances \u00e0 des Groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": { + "account_number": "2774" + }, + "account_number": "277" + }, + "Immobilisations financi\u00e8res diverses": { + "Cr\u00e9ances diverses groupe": { + "account_number": "2781" + }, + "Cr\u00e9ances diverses hors groupe": { + "account_number": "2782" + }, + "Banques d\u00e9p\u00f4ts \u00e0 terme": { + "account_number": "2784" + }, + "Or et m\u00e9taux pr\u00e9cieux": { + "account_number": "2785" + }, + "Autres immobilisations financi\u00e8res": { + "account_number": "2788" + }, + "account_number": "278" + }, + "account_number": "27" + }, + "Amortissements": { + "account_type": "Accumulated Depreciation", + "Amortissements des immobilisations corporelles": { + "account_type": "Accumulated Depreciation", + "Amortissements des frais de d\u00e9veloppement": { + "account_type": "Accumulated Depreciation", + "account_number": "2811" + }, + "Amortissements des brevets, licences, concessions et droits similaires": { + "account_type": "Accumulated Depreciation", + "account_number": "2812" + }, + "Amortissements des logiciels et sites internet": { + "account_type": "Accumulated Depreciation", + "account_number": "2813" + }, + "Amortissements des marques": { + "account_type": "Accumulated Depreciation", + "account_number": "2814" + }, + "Amortissements du fonds commercial": { + "account_type": "Accumulated Depreciation", + "account_number": "2815" + }, + "Amortissements du droit au bail": { + "account_type": "Accumulated Depreciation", + "account_number": "2816" + }, + "Amortissements des investissements de cr\u00e9ation": { + "account_type": "Accumulated Depreciation", + "account_number": "2817" + }, + "Amortissements des autres droits et valeurs incorporels": { + "account_type": "Accumulated Depreciation", + "account_number": "2818" + }, + "account_number": "281" + }, + "Amortissements des terrains": { + "Amortissements des travaux de mise en valeur des terrains": { + "account_number": "2824" + }, + "account_number": "282" + }, + "Amortissements des b\u00e2timents, installations techniques et agencements": { + "Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "account_number": "2831" + }, + "Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "account_number": "2832" + }, + "Amortissements des ouvrages d\u2019infrastructure": { + "account_number": "2833" + }, + "Amortissements des am\u00e9nagements, agencements et installations techniques": { + "account_number": "2834" + }, + "Amortissements des am\u00e9nagements de bureaux": { + "account_number": "2835" + }, + "Amortissements des b\u00e2timents industriels, agricoles et commerciaux mis en concession": { + "account_number": "2837" + }, + "Amortissements des autres installations et agencements": { + "account_number": "2838" + }, + "account_number": "283" + }, + "Amortissements du mat\u00e9riel": { + "Amortissements du mat\u00e9riel et outillage industriel et commercial": { + "account_number": "2841" + }, + "Amortissements du mat\u00e9riel et outillage agricole": { + "account_number": "2842" + }, + "Amortissements du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "2843" + }, + "Amortissements du mat\u00e9riel et mobilier": { + "account_number": "2844" + }, + "Amortissements du mat\u00e9riel de transport": { + "account_number": "2845" + }, + "Amortissements des actifs biologiques": { + "account_number": "2846" + }, + "Amortissements des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": { + "account_number": "2847" + }, + "Amortissements des autres mat\u00e9riels": { + "account_number": "2848" + }, + "account_number": "284" + }, + "account_number": "28" + }, + "D\u00e9pr\u00e9ciations des immobilisations": { + "D\u00e9pr\u00e9ciations des immobilisations incorporelles": { + "D\u00e9pr\u00e9ciations des frais de d\u00e9veloppement": { + "account_number": "2911" + }, + "D\u00e9pr\u00e9ciations des brevets, licences, concessions et droits similaires": { + "account_number": "2912" + }, + "D\u00e9pr\u00e9ciations des logiciels et sites internet": { + "account_number": "2913" + }, + "D\u00e9pr\u00e9ciations des marques": { + "account_number": "2914" + }, + "D\u00e9pr\u00e9ciations du fonds commercial": { + "account_number": "2915" + }, + "D\u00e9pr\u00e9ciations du droit au bail": { + "account_number": "2916" + }, + "D\u00e9pr\u00e9ciations des investissements de cr\u00e9ation": { + "account_number": "2917" + }, + "D\u00e9pr\u00e9ciations des autres droits et valeurs incorporels": { + "account_number": "2918" + }, + "D\u00e9pr\u00e9ciations des immobilisations incorporelles en cours": { + "account_number": "2919" + }, + "account_number": "291" + }, + "D\u00e9pr\u00e9ciations des terrains": { + "D\u00e9pr\u00e9ciations des terrains agricoles et forestiers": { + "account_number": "2921" + }, + "D\u00e9pr\u00e9ciations des terrains nus": { + "account_number": "2922" + }, + "D\u00e9pr\u00e9ciations des terrains b\u00e2tis": { + "account_number": "2923" + }, + "D\u00e9pr\u00e9ciations des travaux de mise en valeur des terrains": { + "account_number": "2924" + }, + "D\u00e9pr\u00e9ciations des terrains de gisement": { + "account_number": "2925" + }, + "D\u00e9pr\u00e9ciations des terrains am\u00e9nag\u00e9s": { + "account_number": "2926" + }, + "D\u00e9pr\u00e9ciations des terrains mis en concession": { + "account_number": "2927" + }, + "D\u00e9pr\u00e9ciations des autres terrains": { + "account_number": "2928" + }, + "D\u00e9pr\u00e9ciations des am\u00e9nagements de terrains en cours": { + "account_number": "2929" + }, + "account_number": "292" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents, installations techniques et agencements": { + "D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "account_number": "2931" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "account_number": "2932" + }, + "D\u00e9pr\u00e9ciations des ouvrages d\u2019infrastructures": { + "account_number": "2933" + }, + "D\u00e9pr\u00e9ciations des am\u00e9nagements, agencements et installations techniques": { + "account_number": "2934" + }, + "D\u00e9pr\u00e9ciations des am\u00e9nagements de bureaux": { + "account_number": "2935" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles et commerciaux mis en concession": { + "account_number": "2937" + }, + "D\u00e9pr\u00e9ciations des autres installations et agencements": { + "account_number": "2938" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents et installations en cours": { + "account_number": "2939" + }, + "account_number": "293" + }, + "D\u00e9pr\u00e9ciations de mat\u00e9riel, du mobilier et de l\u2019actif biologique": { + "D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage industriel et commercial": { + "account_number": "2941" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage agricole": { + "account_number": "2942" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "2943" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel et mobilier": { + "account_number": "2944" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel de transport": { + "account_number": "2945" + }, + "D\u00e9pr\u00e9ciations des actifs biologiques": { + "account_number": "2946" + }, + "D\u00e9pr\u00e9ciations des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": { + "account_number": "2947" + }, + "D\u00e9pr\u00e9ciations des autres mat\u00e9riels": { + "account_number": "2948" + }, + "D\u00e9pr\u00e9ciations de mat\u00e9riel en cours": { + "account_number": "2949" + }, + "account_number": "294" + }, + "D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations": { + "D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations incorporelles": { + "account_number": "2951" + }, + "D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations corporelles": { + "account_number": "2952" + }, + "account_number": "295" + }, + "D\u00e9pr\u00e9ciations des titres de participation": { + "D\u00e9pr\u00e9ciations des titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": { + "account_number": "2961" + }, + "D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s sous contr\u00f4le conjoint": { + "account_number": "2962" + }, + "D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s conf\u00e9rant une influence notable": { + "account_number": "2963" + }, + "D\u00e9pr\u00e9ciations des participations dans des organismes professionnels": { + "account_number": "2965" + }, + "D\u00e9pr\u00e9ciations des parts dans des GIE": { + "account_number": "2966" + }, + "D\u00e9pr\u00e9ciations des autres titres de participation": { + "account_number": "2968" + }, + "account_number": "296" + }, + "D\u00e9pr\u00e9ciations des autres immobilisations financi\u00e8res": { + "D\u00e9pr\u00e9ciations des pr\u00eats et cr\u00e9ances": { + "account_number": "2971" + }, + "D\u00e9pr\u00e9ciations des pr\u00eats au personnel": { + "account_number": "2972" + }, + "D\u00e9pr\u00e9ciations des cr\u00e9ances sur l\u2019\u00c9tat": { + "account_number": "2973" + }, + "D\u00e9pr\u00e9ciations des titres immobilis\u00e9s": { + "account_number": "2974" + }, + "D\u00e9pr\u00e9ciations des d\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "account_number": "2975" + }, + "D\u00e9pr\u00e9ciations des cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": { + "account_number": "2977" + }, + "D\u00e9pr\u00e9ciations des cr\u00e9ances financi\u00e8res diverses": { + "account_number": "2978" + }, + "account_number": "297" + }, + "account_number": "29" + }, + "root_type": "Asset", + "account_number": "2" + }, + "Comptes de Stocks": { + "Marchandises": { + "Marchandises A": { + "Marchandises A1": { + "account_number": "3111" + }, + "Marchandises A2": { + "account_number": "3112" + }, + "account_number": "311" + }, + "Marchandises B": { + "Marchandises B1": { + "account_number": "3121" + }, + "Marchandises B2": { + "account_number": "3122" + }, + "account_number": "312" + }, + "Actifs biologiques": { + "Animaux": { + "account_number": "3131" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3132" + }, + "account_number": "313" + }, + "Marchandises hors activit\u00e9s ordinaires (HAO)": { + "account_number": "318" + }, + "account_number": "31" + }, + "Mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "Mati\u00e8res A": { + "account_number": "321" + }, + "Mati\u00e8res B": { + "account_number": "322" + }, + "Fournitures (A, B)": { + "account_number": "323" + }, + "account_number": "32" + }, + "Autres approvisionnements": { + "Mati\u00e8res consommables": { + "account_number": "331" + }, + "Fournitures d\u2019atelier et d\u2019usine": { + "account_number": "332" + }, + "Fournitures de magasin": { + "account_number": "333" + }, + "Fournitures de bureau": { + "account_number": "334" + }, + "Emballages": { + "Emballages perdus": { + "account_number": "3351" + }, + "Emballages r\u00e9cup\u00e9rables non identifiables": { + "account_number": "3352" + }, + "Emballages \u00e0 usage mixte": { + "account_number": "3353" + }, + "Autres emballages": { + "account_number": "3358" + }, + "account_number": "335" + }, + "Autres mati\u00e8res": { + "account_number": "338" + }, + "account_number": "33" + }, + "Produits en cours": { + "Produits en cours": { + "Produits en cours P1": { + "account_number": "3411" + }, + "Produits en cours P2": { + "account_number": "3412" + }, + "account_number": "341" + }, + "Travaux en cours": { + "Travaux en cours T1": { + "account_number": "3421" + }, + "Travaux en cours T2": { + "account_number": "3422" + }, + "account_number": "342" + }, + "Produits interm\u00e9diaires en cours": { + "Produits interm\u00e9diaires A": { + "account_number": "3431" + }, + "Produits interm\u00e9diaires B": { + "account_number": "3432" + }, + "account_number": "343" + }, + "Produits r\u00e9siduels en cours": { + "Produits r\u00e9siduels A": { + "account_number": "3441" + }, + "Produits r\u00e9siduels B": { + "account_number": "3442" + }, + "account_number": "344" + }, + "Actifs biologiques en cours": { + "Animaux": { + "account_number": "3451" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3452" + }, + "account_number": "345" + }, + "account_number": "34" + }, + "Services en cours": { + "\u00c9tudes en cours": { + "\u00c9tudes en cours E1": { + "account_number": "3511" + }, + "\u00c9tudes en cours E2": { + "account_number": "3512" + }, + "account_number": "351" + }, + "Prestations de services en cours": { + "Prestations de services S1": { + "account_number": "3521" + }, + "Prestations de services S2": { + "account_number": "3522" + } + }, + "account_number": "35" + }, + "Produits finis": { + "Produits finis A": { + "account_number": "361" + }, + "Produits finis B": { + "account_number": "362" + }, + "Actifs biologiques": { + "Animaux": { + "account_number": "3631" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3632" + }, + "Autres stocks (activit\u00e9s annexes)": { + "account_number": "3638" + }, + "account_number": "363" + }, + "account_number": "36" + }, + "Produits interm\u00e9diaires et r\u00e9siduels": { + "Produits interm\u00e9diaires": { + "Produits interm\u00e9diaires A": { + "account_number": "3711" + }, + "Produits interm\u00e9diaires B": { + "account_number": "3712" + }, + "account_number": "371" + }, + "Produits r\u00e9siduels": { + "D\u00e9chets": { + "account_number": "3721" + }, + "Rebuts": { + "account_number": "3722" + }, + "Mati\u00e8res de R\u00e9cup\u00e9ration": { + "account_number": "3723" + }, + "account_number": "372" + }, + "Actifs biologiques": { + "Animaux": { + "account_number": "3731" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3732" + }, + "Autres stocks (activit\u00e9s annexes)": { + "account_number": "3738" + }, + "account_number": "373" + }, + "account_number": "37" + }, + "Stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": { + "account_type": "Stock", + "Marchandises en cours de route": { + "account_number": "381" + }, + "Mati\u00e8res premi\u00e8res et fournitures li\u00e9es en cours de route": { + "account_number": "382" + }, + "Autres approvisionnements en cours de route": { + "account_number": "383" + }, + "Produits finis en cours de route": { + "account_number": "386" + }, + "Stock en consignation ou en d\u00e9p\u00f4t": { + "Stock en consignation": { + "account_number": "3871" + }, + "Stock en d\u00e9p\u00f4t": { + "account_number": "3872" + }, + "account_number": "387" + }, + "Stock provenant d\u2019immobilisations mises hors service ou au rebut": { + "account_number": "388" + }, + "account_number": "38" + }, + "D\u00e9pr\u00e9ciations des stocks et encours de production": { + "D\u00e9pr\u00e9ciations des stocks de marchandises": { + "account_number": "391" + }, + "D\u00e9pr\u00e9ciations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "account_number": "392" + }, + "D\u00e9pr\u00e9ciations des stocks d\u2019autres approvisionnements": { + "account_number": "393" + }, + "D\u00e9pr\u00e9ciations des productions en cours": { + "account_number": "394" + }, + "D\u00e9pr\u00e9ciations des services en cours": { + "account_number": "395" + }, + "D\u00e9pr\u00e9ciations des stocks de produits finis": { + "account_number": "396" + }, + "D\u00e9pr\u00e9ciations des stocks de produits interm\u00e9diaires et r\u00e9siduels": { + "account_number": "397" + }, + "D\u00e9pr\u00e9ciations des stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": { + "account_number": "398" + }, + "account_number": "39" + }, + "root_type": "Asset", + "account_number": "3" + }, + "4-Comptes de Tiers (ACTIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (ACTIF)": { + "Fournisseurs d\u00e9biteurs": { + "Fournisseurs Avances et acomptes vers\u00e9s": { + "account_number": "4091" + }, + "Fournisseurs Groupe avances et acomptes vers\u00e9s": { + "account_number": "4092" + }, + "Fournisseurs Sous-traitants avances et acomptes vers\u00e9s": { + "account_number": "4093" + }, + "Fournisseurs Cr\u00e9ances pour emballages et mat\u00e9riels \u00e0 rendre": { + "account_number": "4094" + }, + "Fournisseurs Rabais, remises, ristournes et autres avoirs \u00e0 obtenir": { + "account_number": "4098" + }, + "account_number": "409" + } + }, + "41-Clients et comptes rattach\u00e9s (ACTIF)": { + "Clients": { + "Clients": { + "account_type": "Receivable", + "account_number": "4111" + }, + "Clients groupe": { + "account_type": "Receivable", + "account_number": "4112" + }, + "Clients, \u00c9tat et Collectivit\u00e9s publiques": { + "account_type": "Receivable", + "account_number": "4114" + }, + "Clients, organismes internationaux": { + "account_type": "Receivable", + "account_number": "4115" + }, + "Clients, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Receivable", + "account_number": "4116" + }, + "Client, retenues de garantie": { + "account_type": "Receivable", + "account_number": "4117" + }, + "Clients, d\u00e9gr\u00e8vement de taxes sur la valeur ajout\u00e9e (TVA)": { + "account_type": "Receivable", + "account_number": "4118" + }, + "account_type": "Receivable", + "account_number": "411" + }, + "Clients, effets \u00e0 recevoir en portefeuille": { + "Clients, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4121" + }, + "Clients Groupe, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4122" + }, + "\u00c9tat et Collectivit\u00e9s publiques, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4124" + }, + "Organismes Internationaux, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4125" + }, + "account_type": "Receivable", + "account_number": "412" + }, + "Clients, ch\u00e8ques, effets et autres valeurs impay\u00e9es": { + "Clients, ch\u00e8ques impay\u00e9s": { + "account_type": "Receivable", + "account_number": "4131" + }, + "Clients, effets impay\u00e9s": { + "account_type": "Receivable", + "account_number": "4132" + }, + "Clients, cartes de cr\u00e9dit impay\u00e9es": { + "account_type": "Receivable", + "account_number": "4133" + }, + "Clients, autres valeurs impay\u00e9es": { + "account_type": "Receivable", + "account_number": "4138" + }, + "account_type": "Receivable", + "account_number": "413" + }, + "Cr\u00e9ances sur cessions courantes d\u2019immobilisations": { + "Cr\u00e9ances en compte, immobilisations incorporelles": { + "account_type": "Receivable", + "account_number": "4141" + }, + "Cr\u00e9ances en compte, immobilisations corporelles": { + "account_type": "Receivable", + "account_number": "4142" + }, + "Effets \u00e0 recevoir, immobilisations incorporelles": { + "account_type": "Receivable", + "account_number": "4146" + }, + "Effets \u00e0 recevoir, immobilisations corporelles": { + "account_type": "Receivable", + "account_number": "4147" + }, + "account_type": "Receivable", + "account_number": "414" + }, + "Clients, effets escompt\u00e9s non \u00e9chus": { + "account_type": "Receivable", + "account_number": "415" + }, + "Cr\u00e9ances clients litigieuses ou douteuses": { + "Cr\u00e9ances litigieuses": { + "account_type": "Receivable", + "account_number": "4161" + }, + "Cr\u00e9ances douteuses": { + "account_type": "Receivable", + "account_number": "4162" + }, + "account_type": "Receivable", + "account_number": "416" + }, + "Clients, produits \u00e0 recevoir": { + "Clients, factures \u00e0 \u00e9tablir": { + "account_type": "Receivable", + "account_number": "4181" + }, + "Clients, int\u00e9r\u00eats courus": { + "account_type": "Receivable", + "account_number": "4186" + }, + "account_type": "Receivable", + "account_number": "418" + }, + "account_type": "Receivable" + }, + "42-Personnel (ACTIF)": { + "Personnel, avances et acomptes": { + "Personnel, avances": { + "account_number": "4211" + }, + "Personnel, acomptes": { + "account_number": "4212" + }, + "Frais avanc\u00e9s et fournitures au personnel": { + "account_number": "4213" + }, + "account_number": "421" + } + }, + "43-Organismes sociaux (ACTIF)": { + "431-S\u00e9curit\u00e9 sociale": { + "Prestations familiales": { + "account_number": "4311" + }, + "Accidents de travail": { + "account_number": "4312" + }, + "Caisse de retraite obligatoire": { + "account_number": "4313" + }, + "Caisse de retraite facultative": { + "account_number": "4314" + }, + "Autres cotisations sociales": { + "account_number": "4318" + } + }, + "432-Caisses de retraite compl\u00e9mentaire": {}, + "433-Autres organismes sociaux": { + "Mutuelle": { + "account_number": "4331" + }, + "Assurances retraite": { + "account_number": "4332" + }, + "Assurances et organismes de sant\u00e9": { + "account_number": "4333" + } + }, + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "Produits \u00e0 recevoir": { + "account_number": "4387" + } + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (ACTIF)": { + "\u00c9tat, TVA factur\u00e9e": { + "TVA factur\u00e9e sur ventes": { + "account_number": "4431" + }, + "TVA factur\u00e9e sur prestations de services": { + "account_number": "4432" + }, + "TVA factur\u00e9e sur travaux": { + "account_number": "4433" + }, + "TVA factur\u00e9e sur production livr\u00e9e \u00e0 soi-m\u00eame": { + "account_number": "4434" + }, + "TVA sur factures \u00e0 \u00e9tablir": { + "account_number": "4435" + }, + "account_number": "443" + }, + "\u00c9tat, TVA r\u00e9cup\u00e9rable": { + "TVA r\u00e9cup\u00e9rable sur immobilisations": { + "account_number": "4451" + }, + "TVA r\u00e9cup\u00e9rable sur achats": { + "account_number": "4452" + }, + "TVA r\u00e9cup\u00e9rable sur transport": { + "account_number": "4453" + }, + "TVA r\u00e9cup\u00e9rable sur services ext\u00e9rieurs et autres charges": { + "account_number": "4454" + }, + "TVA r\u00e9cup\u00e9rable sur factures non parvenues": { + "account_number": "4455" + }, + "TVA transf\u00e9r\u00e9e par d\u2019autres entit\u00e9s": { + "account_number": "4456" + }, + "account_number": "445" + }, + "\u00c9tat, charges \u00e0 payer et produits \u00e0 recevoir": { + "Charges \u00e0 payer": { + "account_number": "4486" + }, + "Produits \u00e0 recevoir": { + "account_number": "4487" + }, + "account_number": "448" + }, + "\u00c9tat, cr\u00e9ances et dettes diverses": { + "\u00c9tat, obligations cautionn\u00e9es": { + "account_number": "4491" + }, + "\u00c9tat, avances et acomptes vers\u00e9s sur imp\u00f4ts": { + "account_number": "4492" + }, + "\u00c9tat, fonds de dotation \u00e0 recevoir": { + "account_number": "4493" + }, + "\u00c9tat, subventions investissement \u00e0 recevoir": { + "account_number": "4494" + }, + "\u00c9tat, subventions d\u2019exploitation \u00e0 recevoir": { + "account_number": "4495" + }, + "\u00c9tat, subventions d\u2019\u00e9quilibre \u00e0 recevoir": { + "account_number": "4496" + }, + "\u00c9tat, avances sur subventions": { + "account_number": "4497" + }, + "\u00c9tat, fonds r\u00e9glement\u00e9s provisionn\u00e9s": { + "account_number": "4499" + }, + "account_number": "449" + } + }, + "45-Organismes internationaux (ACTIF)": { + "Op\u00e9rations avec les organismes africains": { + "account_number": "451" + }, + "Op\u00e9rations avec les autres organismes internationaux": { + "account_number": "452" + }, + "Organismes internationaux, fonds de dotation et subventions \u00e0 recevoir": { + "Organismes internationaux, fonds de dotation \u00e0 recevoir": { + "account_number": "4581" + }, + "Organismes internationaux, subventions \u00e0 recevoir": { + "account_number": "4582" + }, + "account_number": "458" + } + }, + "46-Apporteurs, associ\u00e9s et groupe (ACTIF)": { + "461-Apporteurs, op\u00e9rations sur le capital": { + "Apporteurs, capital appel\u00e9, non vers\u00e9": { + "account_number": "4613" + }, + "Apporteurs, compte d\u2019apport, op\u00e9rations de restructuration (fusion...)": { + "account_number": "4614" + }, + "Apporteurs, titres \u00e0 \u00e9changer": { + "account_number": "4618" + } + }, + "Apporteurs, restant d\u00fb sur capital appel\u00e9": { + "account_number": "467" + } + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (ACTIF)": { + "472-Cr\u00e9ances et dettes sur titres de placement": { + "Cr\u00e9ances sur cessions de titres de placement": { + "account_number": "4721" + }, + "Versements restant \u00e0 effectuer sur titres de placement non lib\u00e9r\u00e9s": { + "account_number": "4726" + } + }, + "473-Interm\u00e9diaires Op\u00e9rations faites pour compte de tiers": { + "Mandants": { + "account_number": "4731" + }, + "Mandataires": { + "account_number": "4732" + }, + "Commettants": { + "account_number": "4733" + }, + "Commissionnaires": { + "account_number": "4734" + }, + "\u00c9tat, Collectivit\u00e9s publiques, fonds global d\u2019allocation": { + "account_number": "4739" + } + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits": { + "Compte de r\u00e9partition p\u00e9riodique des produits": { + "account_number": "4747" + } + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA": { + "Compte actif": { + "account_type": "Temporary", + "account_number": "4751" + } + }, + "Charges constat\u00e9es d\u2019avance": { + "account_number": "476" + }, + "478-\u00c9carts de conversion actif": { + "Diminution des cr\u00e9ances d\u2019exploitation": { + "account_number": "4781" + }, + "Diminution des cr\u00e9ances financi\u00e8res": { + "account_number": "4782" + }, + "Augmentation des dettes d\u2019exploitation": { + "account_number": "4783" + }, + "Augmentation des dettes financi\u00e8res": { + "account_number": "4784" + }, + "Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": { + "account_number": "4786" + }, + "Diff\u00e9rences compens\u00e9es par couverture de change": { + "account_number": "4788" + } + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (ACTIF)": { + "Cr\u00e9ances sur cessions d\u2019immobilisations": { + "En compte, immobilisations incorporelles": { + "account_number": "4851" + }, + "En compte, immobilisations corporelles": { + "account_number": "4852" + }, + "Effets \u00e0 recevoir, immobilisations incorporelles": { + "account_number": "4853" + }, + "Effets \u00e0 recevoir, immobilisations corporelles": { + "account_number": "4854" + }, + "Effets escompt\u00e9s non \u00e9chus": { + "account_number": "4855" + }, + "Retenues de garantie": { + "account_number": "4857" + }, + "Factures \u00e0 \u00e9tablir": { + "account_number": "4858" + }, + "account_number": "485" + }, + "Autres cr\u00e9ances hors activit\u00e9s ordinaires (HAO)": { + "account_number": "488" + } + }, + "49-D\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme (tiers) (ACTIF)": { + "D\u00e9pr\u00e9ciations des comptes clients": { + "Cr\u00e9ances litigieuses": { + "account_number": "4911" + }, + "Cr\u00e9ances douteuses": { + "account_number": "4912" + }, + "account_number": "491" + }, + "D\u00e9pr\u00e9ciations des comptes organismes internationaux": { + "account_number": "495" + }, + "D\u00e9pr\u00e9ciations des comptes apporteurs, associ\u00e9s et groupe": { + "Associ\u00e9s, comptes courants": { + "account_number": "4962" + }, + "Associ\u00e9s, op\u00e9rations faites en commun": { + "account_number": "4963" + }, + "Groupe, comptes courants": { + "account_number": "4966" + }, + "account_number": "496" + }, + "D\u00e9pr\u00e9ciations des comptes d\u00e9biteurs divers": { + "account_number": "497" + }, + "D\u00e9pr\u00e9ciations des comptes de cr\u00e9ances HAO": { + "Cr\u00e9ances sur cessions d\u2019immobilisations": { + "account_number": "4985" + }, + "Cr\u00e9ances sur cessions de titres de placement": { + "account_number": "4986" + }, + "Autres cr\u00e9ances HAO": { + "account_number": "4988" + }, + "account_number": "498" + }, + "Provisions pour risques \u00e0 court terme": { + "Sur op\u00e9rations d\u2019exploitation": { + "account_number": "4991" + }, + "Sur op\u00e9rations financi\u00e8res": { + "account_number": "4997" + }, + "Sur op\u00e9rations HAO": { + "account_number": "4998" + }, + "account_number": "499" + } + }, + "root_type": "Asset" + }, + "4-Comptes de Tiers (PASSIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (PASSIF)": { + "Fournisseurs, dettes en compte": { + "Fournisseurs": { + "account_type": "Payable", + "account_number": "4011" + }, + "Fournisseurs groupe": { + "account_type": "Payable", + "account_number": "4012" + }, + "Fournisseurs sous-traitants": { + "account_type": "Payable", + "account_number": "4013" + }, + "Fournisseurs, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Payable", + "account_number": "4016" + }, + "Fournisseur, retenues de garantie": { + "account_type": "Payable", + "account_number": "4017" + }, + "account_type": "Payable", + "account_number": "401" + }, + "Fournisseurs, effets \u00e0 payer": { + "Fournisseurs Effets \u00e0 payer": { + "account_type": "Payable", + "account_number": "4021" + }, + "Fournisseurs Groupe, effets \u00e0 payer": { + "account_type": "Payable", + "account_number": "4022" + }, + "Fournisseurs Sous-traitants, effets \u00e0 payer": { + "account_type": "Payable", + "account_number": "4023" + }, + "account_type": "Payable", + "account_number": "402" + }, + "Fournisseurs, acquisitions courantes d\u2019immobilisations": { + "Fournisseurs Dettes en comptes, immobilisations incorporelles": { + "account_type": "Payable", + "account_number": "4041" + }, + "Fournisseurs Dettes en comptes, immobilisations corporelles": { + "account_type": "Payable", + "account_number": "4042" + }, + "Fournisseurs Effets \u00e0 payer, immobilisations incorporelles": { + "account_type": "Payable", + "account_number": "4046" + }, + "Fournisseurs Effets \u00e0 payer, immobilisations corporelles": { + "account_type": "Payable", + "account_number": "4047" + }, + "account_type": "Payable", + "account_number": "404" + }, + "Fournisseurs, factures non parvenues": { + "Fournisseurs": { + "account_type": "Stock Received But Not Billed", + "account_number": "4081" + }, + "Fournisseurs groupe": { + "account_type": "Stock Received But Not Billed", + "account_number": "4082" + }, + "Fournisseurs sous-traitants": { + "account_type": "Stock Received But Not Billed", + "account_number": "4083" + }, + "Fournisseurs, int\u00e9r\u00eats courus": { + "account_type": "Stock Received But Not Billed", + "account_number": "4086" + }, + "account_type": "Stock Received But Not Billed", + "account_number": "408" + }, + "account_type": "Payable" + }, + "41-Clients et comptes rattach\u00e9s (PASSIF)": { + "Clients cr\u00e9diteurs": { + "Clients, avances et acomptes re\u00e7us": { + "account_number": "4191" + }, + "Clients groupe, avances et acomptes re\u00e7us": { + "account_number": "4192" + }, + "Clients, dettes pour emballages et mat\u00e9riels consign\u00e9s": { + "account_number": "4194" + }, + "Clients, rabais, remises, ristournes et autres avoirs \u00e0 accorder": { + "account_number": "4198" + }, + "account_number": "419" + } + }, + "42-Personnel (PASSIF)": { + "Personnel, r\u00e9mun\u00e9rations dues": { + "account_number": "422" + }, + "Personnel, oppositions, saisies-arr\u00eats": { + "Personnel, oppositions": { + "account_number": "4231" + }, + "Personnel, saisies-arr\u00eats": { + "account_number": "4232" + }, + "Personnel, avis \u00e0 tiers d\u00e9tenteur": { + "account_number": "4233" + }, + "account_number": "423" + }, + "Personnel, \u0153uvres sociales internes": { + "Assistance m\u00e9dicale": { + "account_number": "4241" + }, + "Allocations familiales": { + "account_number": "4242" + }, + "Organismes sociaux rattach\u00e9s \u00e0 l\u2019entit\u00e9": { + "account_number": "4245" + }, + "Autres \u0153uvres sociales internes": { + "account_number": "4248" + }, + "account_number": "424" + }, + "Repr\u00e9sentants du personnel": { + "D\u00e9l\u00e9gu\u00e9s du personnel": { + "account_number": "4251" + }, + "Syndicats et Comit\u00e9s d\u2019entreprises, d\u2019\u00c9tablissement": { + "account_number": "4252" + }, + "Autres repr\u00e9sentants du personnel": { + "account_number": "4258" + }, + "account_number": "425" + }, + "Personnel, participation aux b\u00e9n\u00e9fices et au capital": { + "Participation aux b\u00e9n\u00e9fices": { + "account_number": "4261" + }, + "Participation au capital": { + "account_number": "4264" + }, + "account_number": "426" + }, + "Personnel d\u00e9p\u00f4ts": { + "account_number": "427" + }, + "Personnel, charges \u00e0 payer et produits \u00e0 recevoir": { + "Dettes provisionn\u00e9es pour cong\u00e9s \u00e0 payer": { + "account_number": "4281" + }, + "Autres charges \u00e0 payer": { + "account_number": "4286" + }, + "Produits \u00e0 recevoir": { + "account_number": "4287" + }, + "account_number": "428" + } + }, + "43-Organismes sociaux (PASSIF)": { + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "Charges sociales sur gratifications \u00e0 payer": { + "account_number": "4381" + }, + "Charges sociales sur cong\u00e9s \u00e0 payer": { + "account_number": "4382" + }, + "Autres charges \u00e0 payer": { + "account_number": "4386" + } + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (PASSIF)": { + "\u00c9tat, imp\u00f4t sur les b\u00e9n\u00e9fices": { + "account_number": "441" + }, + "\u00c9tat, autres imp\u00f4ts et taxes": { + "Imp\u00f4ts et taxes d\u2019\u00c9tat": { + "account_number": "4421" + }, + "Imp\u00f4ts et taxes pour les collectivit\u00e9s publiques": { + "account_number": "4422" + }, + "Imp\u00f4ts et taxes recouvrables sur des obligataires": { + "account_number": "4423" + }, + "Imp\u00f4ts et taxes recouvrables sur des associ\u00e9s": { + "account_number": "4424" + }, + "Droits de douane": { + "account_number": "4426" + }, + "Autres imp\u00f4ts et taxes": { + "account_number": "4428" + }, + "account_number": "442" + }, + "\u00c9tat, TVA due ou cr\u00e9dit de TVA": { + "\u00c9tat, TVA due": { + "account_number": "4441" + }, + "\u00c9tat, cr\u00e9dit de TVA \u00e0 reporter": { + "account_number": "4449" + }, + "account_number": "444" + }, + "\u00c9tat, autres taxes sur le chiffre d\u2019affaires": { + "account_number": "446" + }, + "\u00c9tat, imp\u00f4ts retenus \u00e0 la source": { + "Imp\u00f4t G\u00e9n\u00e9ral sur le revenu": { + "account_number": "4471" + }, + "Imp\u00f4ts sur salaires": { + "account_number": "4472" + }, + "Contribution nationale": { + "account_number": "4473" + }, + "Contribution nationale de solidarit\u00e9": { + "account_number": "4474" + }, + "Autres imp\u00f4ts et contributions": { + "account_number": "4478" + }, + "account_number": "447" + } + }, + "46-Apporteurs, associ\u00e9s et groupe (PASSIF)": { + "461-Apporteurs, op\u00e9rations sur le capital (PASSIF)": { + "Apporteurs, apports en nature": { + "account_number": "4611" + }, + "Apporteurs, apports en num\u00e9raire": { + "account_number": "4612" + }, + "Apporteurs, versements re\u00e7us sur augmentation de capital": { + "account_number": "4615" + }, + "Apporteurs, versements anticip\u00e9s": { + "account_number": "4616" + }, + "Apporteurs d\u00e9faillants": { + "account_number": "4617" + }, + "Apporteurs, capital \u00e0 rembourser": { + "account_number": "4619" + } + }, + "462-Associ\u00e9s, comptes courants": { + "Principal": { + "account_number": "4621" + }, + "Int\u00e9r\u00eats courus": { + "account_number": "4626" + } + }, + "463-Associ\u00e9s, op\u00e9rations faites en commun et GIE": { + "Op\u00e9rations courantes": { + "account_number": "4631" + }, + "Int\u00e9r\u00eats courus": { + "account_number": "4636" + } + }, + "Associ\u00e9s, dividendes \u00e0 payer": { + "account_number": "465" + }, + "Groupe, comptes courants": { + "account_number": "466" + } + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (PASSIF)": { + "471-D\u00e9biteurs et cr\u00e9diteurs divers": { + "D\u00e9biteurs divers": { + "account_number": "4711" + }, + "Cr\u00e9diteurs divers": { + "account_number": "4712" + }, + "Obligataires": { + "account_number": "4713" + }, + "R\u00e9mun\u00e9rations d\u2019administrateurs": { + "account_number": "4715" + }, + "Compte d\u2019affacturage": { + "account_number": "4716" + }, + "D\u00e9biteurs divers retenues de garantie": { + "account_number": "4717" + }, + "Apport, compte de fusion et op\u00e9rations assimil\u00e9es": { + "account_number": "4718" + }, + "Bons de souscription d\u2019actions et d\u2019obligations": { + "account_number": "4719" + } + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits (PASSIF)": { + "Compte de r\u00e9partition p\u00e9riodique des charges": { + "account_number": "4746" + } + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA (PASSIF)": { + "Compte passif": { + "account_number": "4752" + } + }, + "Produits constat\u00e9s d\u2019avance": { + "account_number": "477" + }, + "479-\u00c9carts de conversion passif": { + "Augmentation des cr\u00e9ances d\u2019exploitation": { + "account_number": "4791" + }, + "Augmentation des cr\u00e9ances financi\u00e8res": { + "account_number": "4792" + }, + "Diminution des dettes d\u2019exploitation": { + "account_number": "4793" + }, + "Diminution des dettes financi\u00e8res": { + "account_number": "4794" + }, + "Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": { + "account_number": "4797" + }, + "Diff\u00e9rences compens\u00e9es par couverture de change": { + "account_number": "4798" + } + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (HAO) (PASSIF)": { + "Fournisseurs d\u2019investissements": { + "Immobilisations incorporelles": { + "account_number": "4811" + }, + "Immobilisations corporelles": { + "account_number": "4812" + }, + "Versements restant \u00e0 effectuer sur titres de participation et titres immobilis\u00e9s non lib\u00e9r\u00e9s": { + "account_number": "4813" + }, + "R\u00e9serve de propri\u00e9t\u00e9": { + "account_number": "4816" + }, + "Retenues de garantie": { + "account_number": "4817" + }, + "Factures non parvenues": { + "account_number": "4818" + }, + "account_number": "481" + }, + "Fournisseurs d\u2019investissements, effets \u00e0 payer": { + "Immobilisations incorporelles": { + "account_number": "4821" + }, + "Immobilisations corporelles": { + "account_number": "4822" + }, + "account_number": "482" + }, + "Autres dettes hors activit\u00e9s ordinaires (HAO)": { + "Produits": { + "account_number": "4887" + }, + "account_number": "484" + } + }, + "root_type": "Liability" + }, + "Comptes de tr\u00e9sorerie": { + "Titres de placement": { + "Titres du tr\u00e9sor et bons de caisse \u00e0 court terme": { + "Titres du Tr\u00e9sor \u00e0 court terme": { + "account_number": "5011" + }, + "Titres d\u2019organismes financiers": { + "account_number": "5012" + }, + "Bons de caisse \u00e0 court terme": { + "account_number": "5013" + }, + "Frais d\u2019acquisition des titres de tr\u00e9sor et bons de caisse": { + "account_number": "5016" + }, + "account_number": "501" + }, + "Actions": { + "Actions ou parts propres": { + "account_number": "5021" + }, + "Actions cot\u00e9es": { + "account_number": "5022" + }, + "Actions non cot\u00e9es": { + "account_number": "5023" + }, + "Actions d\u00e9membr\u00e9es (certificats d\u2019investissement, droits de vote)": { + "account_number": "5024" + }, + "Autres actions": { + "account_number": "5025" + }, + "Frais d\u2019acquisition des actions": { + "account_number": "5026" + }, + "account_number": "502" + }, + "Obligations": { + "Obligations \u00e9mises par la soci\u00e9t\u00e9 et rachet\u00e9es par elle": { + "account_number": "5031" + }, + "Obligations cot\u00e9es": { + "account_number": "5032" + }, + "Obligations non cot\u00e9es": { + "account_number": "5033" + }, + "Autres obligations": { + "account_number": "5035" + }, + "Frais d\u2019acquisition des obligations": { + "account_number": "5036" + }, + "account_number": "503" + }, + "Bons de souscription": { + "Bons de souscription d\u2019actions": { + "account_number": "5042" + }, + "Bons de souscription d\u2019obligations": { + "account_number": "5043" + }, + "account_number": "504" + }, + "Titres n\u00e9gociables hors r\u00e9gion": { + "account_number": "505" + }, + "Int\u00e9r\u00eats courus": { + "Titres du Tr\u00e9sor et bons de caisse \u00e0 court terme": { + "account_number": "5061" + }, + "Actions": { + "account_number": "5062" + }, + "Obligations": { + "account_number": "5063" + }, + "account_number": "506" + }, + "Autres titres de placement et cr\u00e9ances assimil\u00e9es": { + "account_number": "508" + }, + "account_number": "50" + }, + "Valeurs \u00e0 encaisser": { + "Effets \u00e0 encaisser": { + "account_number": "511" + }, + "Effets \u00e0 l\u2019encaissement": { + "account_number": "512" + }, + "Ch\u00e8ques \u00e0 encaisser": { + "account_number": "513" + }, + "Ch\u00e8ques \u00e0 l\u2019encaissement": { + "account_number": "514" + }, + "Cartes de cr\u00e9dit \u00e0 encaisser": { + "account_number": "515" + }, + "Autres valeurs \u00e0 l\u2019encaissement": { + "Warrants": { + "account_number": "5181" + }, + "Billets de fonds": { + "account_number": "5182" + }, + "Ch\u00e8ques de voyage": { + "account_number": "5185" + }, + "Coupons \u00e9chus": { + "account_number": "5186" + }, + "Int\u00e9r\u00eats \u00e9chus des obligations": { + "account_number": "5187" + }, + "account_number": "518" + }, + "account_number": "51" + }, + "Banques": { + "Banques locales": { + "Banques en monnaie nationale": { + "account_type": "Bank", + "account_number": "5211" + }, + "Banques en devises": { + "account_type": "Bank", + "account_number": "5215" + }, + "account_type": "Bank", + "account_number": "521" + }, + "Banques autres \u00c9tats r\u00e9gion": { + "account_number": "522" + }, + "Banques autres \u00c9tats zone mon\u00e9taire": { + "account_number": "523" + }, + "Banques hors zone mon\u00e9taire": { + "account_number": "524" + }, + "Banques d\u00e9p\u00f4t \u00e0 terme": { + "account_number": "525" + }, + "Banques, int\u00e9r\u00eats courus": { + "Banque, int\u00e9r\u00eats courus, charges \u00e0 payer": { + "account_number": "5261" + }, + "Banque, int\u00e9r\u00eats courus, produits \u00e0 recevoir": { + "account_number": "5267" + }, + "account_number": "526" + }, + "account_number": "52" + }, + "\u00c9tablissements financiers et assimil\u00e9s": { + "Ch\u00e8ques postaux": { + "account_number": "531" + }, + "Tr\u00e9sor": { + "account_number": "532" + }, + "Soci\u00e9t\u00e9s de gestion et d\u2019interm\u00e9diation (SGI)": { + "account_number": "533" + }, + "\u00c9tablissements financiers, int\u00e9r\u00eats courus": { + "account_number": "536" + }, + "Autres organismes financiers": { + "account_number": "538" + }, + "account_number": "53" + }, + "Instruments de tr\u00e9sorerie": { + "Options de taux d\u2019int\u00e9r\u00eat": { + "account_number": "541" + }, + "Options de taux de change": { + "account_number": "542" + }, + "Options de taux boursiers": { + "account_number": "543" + }, + "Instruments de march\u00e9s \u00e0 terme": { + "account_number": "544" + }, + "Avoirs d\u2019or et autres m\u00e9taux pr\u00e9cieux": { + "account_number": "545" + }, + "account_number": "54" + }, + "Instruments de monnaie \u00e9lectronique": { + "Monnaie \u00e9lectronique carte carburant": { + "account_number": "551" + }, + "Monnaie \u00e9lectronique t\u00e9l\u00e9phone portable": { + "account_number": "552" + }, + "Monnaie \u00e9lectronique carte p\u00e9age": { + "account_number": "553" + }, + "Porte-monnaie \u00e9lectronique": { + "account_number": "554" + }, + "Autres instruments de monnaies \u00e9lectroniques": { + "account_number": "558" + }, + "account_number": "55" + }, + "Banques, cr\u00e9dits de tr\u00e9sorerie et d\u2019escompte": { + "Cr\u00e9dits de tr\u00e9sorerie": { + "account_number": "561" + }, + "Escompte de cr\u00e9dits de campagne": { + "account_number": "564" + }, + "Escompte de cr\u00e9dits ordinaires": { + "account_number": "565" + }, + "Banques, cr\u00e9dits de tr\u00e9sorerie, int\u00e9r\u00eats courus": { + "account_number": "566" + }, + "account_number": "56" + }, + "Caisse": { + "Caisse si\u00e8ge social": { + "Caisse en monnaie nationale": { + "account_number": "5711" + }, + "Caisse en devises": { + "account_number": "5712" + }, + "account_number": "571" + }, + "Caisse succursale A": { + "En monnaie nationale": { + "account_number": "5721" + }, + "En devises": { + "account_number": "5722" + }, + "account_number": "572" + }, + "Caisse succursale B": { + "En monnaie nationale": { + "account_number": "5731" + }, + "En devises": { + "account_number": "5732" + }, + "account_number": "573" + }, + "account_number": "57" + }, + "R\u00e9gies d\u2019avances, accr\u00e9ditifs et virements internes": { + "R\u00e9gies d\u2019avance": { + "account_number": "581" + }, + "Accr\u00e9ditifs": { + "account_number": "582" + }, + "Virements de fonds": { + "account_number": "585" + }, + "Autres virements internes": { + "account_number": "588" + }, + "account_number": "58" + }, + "D\u00e9pr\u00e9ciations et provisions pour risque \u00e0 court terme": { + "D\u00e9pr\u00e9ciations des titres de placement": { + "account_number": "590" + }, + "D\u00e9pr\u00e9ciations des titres et valeurs \u00e0 encaisser": { + "account_number": "591" + }, + "D\u00e9pr\u00e9ciations des comptes banques": { + "account_number": "592" + }, + "D\u00e9pr\u00e9ciations des comptes \u00e9tablissements financiers et assimil\u00e9s": { + "account_number": "593" + }, + "D\u00e9pr\u00e9ciations des comptes d\u2019instruments de tr\u00e9sorerie": { + "account_number": "594" + }, + "Provisions pour risque \u00e0 court terme \u00e0 caract\u00e8re financier": { + "account_number": "599" + }, + "account_number": "59" + }, + "root_type": "Asset", + "account_number": "5" + }, + "Comptes de charges des activit\u00e9s ordinaires": { + "Achats et variations de stocks": { + "Achats de marchandises": { + "Dans la R\u00e9gion": { + "account_number": "6011" + }, + "Hors R\u00e9gion": { + "account_number": "6012" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "6013" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "6014" + }, + "Frais sur achats": { + "account_number": "6015" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6019" + }, + "account_number": "601" + }, + "Achats de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "Dans la R\u00e9gion": { + "account_number": "6021" + }, + "Hors R\u00e9gion": { + "account_number": "6022" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "6023" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "6024" + }, + "Frais sur achats": { + "account_number": "6025" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6029" + }, + "account_number": "602" + }, + "Variations des stocks de biens achet\u00e9s": { + "Variations des stocks de marchandises": { + "account_number": "6031" + }, + "Variations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "account_number": "6032" + }, + "Variations des stocks d\u2019autres approvisionnements": { + "account_number": "6033" + }, + "account_number": "603" + }, + "Achats stock\u00e9s de mati\u00e8res et fournitures consommables": { + "Mati\u00e8res consommables": { + "account_number": "6041" + }, + "Mati\u00e8res combustibles": { + "account_number": "6042" + }, + "Produits d\u2019entretien": { + "account_number": "6043" + }, + "Fournitures d\u2019atelier et d\u2019usine": { + "account_number": "6044" + }, + "Frais sur achat": { + "account_number": "6045" + }, + "Fournitures de magasin": { + "account_number": "6046" + }, + "Fournitures de bureau": { + "account_number": "6047" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6049" + }, + "account_number": "604" + }, + "Autres achats": { + "Fournitures non stockables Eau": { + "account_number": "6051" + }, + "Fournitures non stockables \u00c9lectricit\u00e9": { + "account_number": "6052" + }, + "Fournitures non stockables Autres \u00e9nergies": { + "account_number": "6053" + }, + "Fournitures d\u2019entretien non stockables": { + "account_number": "6054" + }, + "Fournitures de bureau non stockables": { + "account_number": "6055" + }, + "Achats de petit mat\u00e9riel et outillage": { + "account_number": "6056" + }, + "Achats d\u2019\u00e9tudes et prestations de services": { + "account_number": "6057" + }, + "Achats de travaux, mat\u00e9riels et \u00e9quipements": { + "account_number": "6058" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6059" + }, + "account_number": "605" + }, + "Achats d\u2019emballages": { + "Emballages perdus": { + "account_number": "6081" + }, + "Emballages r\u00e9cup\u00e9rables non identifiables": { + "account_number": "6082" + }, + "Emballages \u00e0 usage mixte": { + "account_number": "6083" + }, + "Frais sur achats": { + "account_number": "6085" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6089" + }, + "account_number": "608" + }, + "account_number": "60" + }, + "Transports": { + "Transports sur ventes": { + "account_number": "612" + }, + "Transports pour le compte de tiers": { + "account_number": "613" + }, + "Transports du personnel": { + "account_number": "614" + }, + "Transports de plis": { + "account_number": "616" + }, + "Autres frais de transport": { + "Voyages et d\u00e9placements": { + "account_number": "6181" + }, + "Transports entre \u00e9tablissements ou chantiers": { + "account_number": "6182" + }, + "Transports administratifs": { + "account_number": "6183" + }, + "account_number": "618" + }, + "account_number": "61" + }, + "Services ext\u00e9rieurs": { + "Sous-traitance g\u00e9n\u00e9rale": { + "account_number": "621" + }, + "Locations, charges locatives": { + "Locations de terrains": { + "account_number": "6221" + }, + "Locations de b\u00e2timents": { + "account_number": "6222" + }, + "Locations de mat\u00e9riels et outillages": { + "account_number": "6223" + }, + "Malis sur emballages": { + "account_number": "6224" + }, + "Locations d\u2019emballages": { + "account_number": "6225" + }, + "Fermages et loyers du foncier": { + "account_number": "6226" + }, + "Locations et charges locatives diverses": { + "account_number": "6228" + }, + "account_number": "622" + }, + "Redevances de location acquisition": { + "Cr\u00e9dit-bail immobilier": { + "account_number": "6232" + }, + "Cr\u00e9dit-bail mobilier": { + "account_number": "6233" + }, + "Location-vente": { + "account_number": "6234" + }, + "Autres contrats de location acquisition": { + "account_number": "6238" + }, + "account_number": "623" + }, + "Entretien, r\u00e9parations, remise en \u00e9tat et maintenance": { + "Entretien et r\u00e9parations des biens immobiliers": { + "account_number": "6241" + }, + "Entretien et r\u00e9parations des biens mobiliers": { + "account_number": "6242" + }, + "Maintenance": { + "account_number": "6243" + }, + "Charges de d\u00e9mant\u00e8lement et remise en \u00e9tat": { + "account_number": "6244" + }, + "Autres entretiens et r\u00e9parations": { + "account_number": "6248" + }, + "account_number": "624" + }, + "Primes d\u2019assurance": { + "Assurances multirisques": { + "account_number": "6251" + }, + "Assurances mat\u00e9riel de transport": { + "account_number": "6252" + }, + "Assurances risques d\u2019exploitation": { + "account_number": "6253" + }, + "Assurances responsabilit\u00e9 du producteur": { + "account_number": "6254" + }, + "Assurances insolvabilit\u00e9 clients": { + "account_number": "6255" + }, + "Assurances transport sur ventes": { + "account_number": "6257" + }, + "Autres primes d\u2019assurances": { + "account_number": "6258" + }, + "account_number": "625" + }, + "\u00c9tudes, recherches et documentation": { + "\u00c9tudes et recherches": { + "account_number": "6261" + }, + "Documentation g\u00e9n\u00e9rale": { + "account_number": "6265" + }, + "Documentation technique": { + "account_number": "6266" + }, + "account_number": "626" + }, + "Publicit\u00e9, publications, relations publiques": { + "Annonces, insertions": { + "account_number": "6271" + }, + "Catalogues, imprim\u00e9s publicitaires": { + "account_number": "6272" + }, + "\u00c9chantillons": { + "account_number": "6273" + }, + "Foires et expositions": { + "account_number": "6274" + }, + "Publications": { + "account_number": "6275" + }, + "Cadeaux \u00e0 la client\u00e8le": { + "account_number": "6276" + }, + "Frais de colloques, s\u00e9minaires, conf\u00e9rences": { + "account_number": "6277" + }, + "Autres charges de publicit\u00e9 et relations publiques": { + "account_number": "6278" + }, + "account_number": "627" + }, + "Frais de t\u00e9l\u00e9communications": { + "Frais de t\u00e9l\u00e9phone": { + "account_number": "6281" + }, + "Frais de t\u00e9lex": { + "account_number": "6282" + }, + "Frais de t\u00e9l\u00e9copie": { + "account_number": "6283" + }, + "Autres frais de t\u00e9l\u00e9communications": { + "account_number": "6288" + }, + "account_number": "628" + }, + "account_number": "62" + }, + "Autres services ext\u00e9rieurs": { + "Frais bancaires": { + "Frais sur titres (vente, garde)": { + "account_number": "6311" + }, + "Frais sur effets": { + "account_number": "6312" + }, + "Location de coffres": { + "account_number": "6313" + }, + "Commissions d\u2019affacturage": { + "account_number": "6314" + }, + "Commissions sur cartes de cr\u00e9dit": { + "account_number": "6315" + }, + "Frais d\u2019\u00e9mission d\u2019emprunts": { + "account_number": "6316" + }, + "Frais sur instruments monnaie \u00e9lectronique": { + "account_number": "6317" + }, + "Autres frais bancaires": { + "account_number": "6318" + }, + "account_number": "631" + }, + "R\u00e9mun\u00e9rations d\u2019interm\u00e9diaires et de conseils": { + "Commissions et courtages sur ventes": { + "account_number": "6322" + }, + "Honoraires des professions r\u00e9glement\u00e9es": { + "account_number": "6324" + }, + "Frais d\u2019actes et de contentieux": { + "account_number": "6325" + }, + "R\u00e9mun\u00e9rations d\u2019affacturage": { + "account_number": "6326" + }, + "R\u00e9mun\u00e9rations des autres prestataires de services": { + "account_number": "6327" + }, + "Divers frais": { + "account_number": "6328" + }, + "account_number": "632" + }, + "Frais de formation du personnel": { + "account_number": "633" + }, + "Redevances pour brevets, licences, logiciels, concessions et droits et valeurs similaires": { + "Redevances pour brevets, licences": { + "account_number": "6342" + }, + "Redevances pour logiciels": { + "account_number": "6343" + }, + "Redevances pour marques": { + "account_number": "6344" + }, + "Redevances pour sites internet": { + "account_number": "6345" + }, + "Redevances pour concessions, droits et valeurs similaires": { + "account_number": "6346" + }, + "account_number": "634" + }, + "Cotisations": { + "Cotisations": { + "account_number": "6351" + }, + "Concours divers": { + "account_number": "6358" + }, + "account_number": "635" + }, + "R\u00e9mun\u00e9rations de personnel ext\u00e9rieur \u00e0 l\u2019entit\u00e9": { + "Personnel int\u00e9rimaire": { + "account_number": "6371" + }, + "Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": { + "account_number": "6372" + }, + "account_number": "637" + }, + "Autres charges externes": { + "Frais de recrutement du personnel": { + "account_number": "6381" + }, + "Frais de d\u00e9m\u00e9nagement": { + "account_number": "6382" + }, + "R\u00e9ceptions": { + "account_number": "6383" + }, + "Missions": { + "account_number": "6384" + }, + "Charges de copropri\u00e9t\u00e9": { + "account_number": "6385" + }, + "account_number": "638" + }, + "account_number": "63" + }, + "Imp\u00f4ts et taxes": { + "Imp\u00f4ts et taxes directs": { + "Imp\u00f4ts fonciers et taxes annexes": { + "account_number": "6411" + }, + "Patentes, licences et taxes annexes": { + "account_number": "6412" + }, + "Taxes sur appointements et salaires": { + "account_number": "6413" + }, + "Taxes d\u2019apprentissage": { + "account_number": "6414" + }, + "Formation professionnelle continue": { + "account_number": "6415" + }, + "Autres imp\u00f4ts et taxes directs": { + "account_number": "6418" + }, + "account_number": "641" + }, + "Imp\u00f4ts et taxes indirects": { + "account_number": "645" + }, + "Droits d\u2019enregistrement": { + "Droits de mutation": { + "account_number": "6461" + }, + "Droits de timbre": { + "account_number": "6462" + }, + "Taxes sur les v\u00e9hicules de soci\u00e9t\u00e9": { + "account_number": "6463" + }, + "Vignettes": { + "account_number": "6464" + }, + "Autres droits": { + "account_number": "6468" + }, + "account_number": "646" + }, + "P\u00e9nalit\u00e9s, amendes fiscales": { + "P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts directs": { + "account_number": "6471" + }, + "P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts indirects": { + "account_number": "6472" + }, + "P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts directs": { + "account_number": "6473" + }, + "P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts indirects": { + "account_number": "6474" + }, + "Autres p\u00e9nalit\u00e9s et amendes fiscales": { + "account_number": "6478" + }, + "account_number": "647" + }, + "Autres imp\u00f4ts et taxes": { + "account_number": "648" + }, + "account_number": "64" + }, + "Autres charges": { + "Pertes sur cr\u00e9ances clients et autres d\u00e9biteurs": { + "Clients": { + "account_number": "6511" + }, + "Autres d\u00e9biteurs": { + "account_number": "6515" + }, + "account_number": "651" + }, + "Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "Quote-part transf\u00e9r\u00e9e de b\u00e9n\u00e9fices (comptabilit\u00e9 du g\u00e9rant)": { + "account_number": "6521" + }, + "Pertes imput\u00e9es par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": { + "account_number": "6525" + }, + "account_number": "652" + }, + "Valeurs comptables des cessions courantes d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "6541" + }, + "Immobilisations corporelles": { + "account_number": "6542" + }, + "account_number": "654" + }, + "Perte de change sur cr\u00e9ances et dettes commerciale": { + "account_number": "656" + }, + "P\u00e9nalit\u00e9s et amendes p\u00e9nales": { + "account_number": "657" + }, + "Charges diverses": { + "Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": { + "account_number": "6581" + }, + "Dons": { + "account_number": "6582" + }, + "M\u00e9c\u00e9nat": { + "account_number": "6583" + }, + "Autres charges diverses": { + "account_number": "6588" + }, + "account_number": "658" + }, + "Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "Sur risques \u00e0 court terme": { + "account_number": "6591" + }, + "Sur stocks": { + "account_number": "6593" + }, + "Sur cr\u00e9ances": { + "account_number": "6594" + }, + "Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme": { + "account_number": "6598" + }, + "account_number": "659" + }, + "account_number": "65" + }, + "Charges de personnel": { + "R\u00e9mun\u00e9rations directes vers\u00e9es au personnel national": { + "Appointements salaires et commissions": { + "account_number": "6611" + }, + "Primes et gratifications": { + "account_number": "6612" + }, + "Cong\u00e9s pay\u00e9s": { + "account_number": "6613" + }, + "Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": { + "account_number": "6614" + }, + "Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": { + "account_number": "6615" + }, + "Suppl\u00e9ment familial": { + "account_number": "6616" + }, + "Avantages en nature": { + "account_number": "6617" + }, + "Autres r\u00e9mun\u00e9rations directes": { + "account_number": "6618" + }, + "account_number": "661" + }, + "R\u00e9mun\u00e9rations directes vers\u00e9es au personnel non national": { + "Appointements salaires et commissions": { + "account_number": "6621" + }, + "Primes et gratifications": { + "account_number": "6622" + }, + "Cong\u00e9s pay\u00e9s": { + "account_number": "6623" + }, + "Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": { + "account_number": "6624" + }, + "Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": { + "account_number": "6625" + }, + "Suppl\u00e9ment familial": { + "account_number": "6626" + }, + "Avantages en nature": { + "account_number": "6627" + }, + "Autres r\u00e9mun\u00e9rations directes": { + "account_number": "6628" + }, + "account_number": "662" + }, + "Indemnit\u00e9s forfaitaires vers\u00e9es au personnel": { + "Indemnit\u00e9s de logement": { + "account_number": "6631" + }, + "Indemnit\u00e9s de repr\u00e9sentation": { + "account_number": "6632" + }, + "Indemnit\u00e9s d\u2019expatriation": { + "account_number": "6633" + }, + "Indemnit\u00e9s de transport": { + "account_number": "6634" + }, + "Autres indemnit\u00e9s et avantages divers": { + "account_number": "6638" + }, + "account_number": "663" + }, + "Charges sociales": { + "Charges sociales sur r\u00e9mun\u00e9ration du personnel national": { + "account_number": "6641" + }, + "Charges sociales sur r\u00e9mun\u00e9ration du personnel non national": { + "account_number": "6642" + }, + "account_number": "664" + }, + "R\u00e9mun\u00e9rations et charges sociales de l\u2019exploitant individuel": { + "R\u00e9mun\u00e9ration du travail de l\u2019exploitant": { + "account_number": "6661" + }, + "Charges sociales": { + "account_number": "6662" + }, + "account_number": "666" + }, + "R\u00e9mun\u00e9ration transf\u00e9r\u00e9e de personnel ext\u00e9rieur": { + "Personnel int\u00e9rimaire": { + "account_number": "6671" + }, + "Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": { + "account_number": "6672" + }, + "account_number": "667" + }, + "Autres charges sociales": { + "Versements aux syndicats et comit\u00e9s d\u2019entreprise, d\u2019\u00e9tablissement": { + "account_number": "6681" + }, + "Versements aux comit\u00e9s d\u2019hygi\u00e8ne et de s\u00e9curit\u00e9": { + "account_number": "6682" + }, + "Versements et contributions aux autres \u0153uvres sociales": { + "account_number": "6683" + }, + "M\u00e9decine du travail et pharmacie": { + "account_number": "6684" + }, + "Assurances et organismes de sant\u00e9": { + "account_number": "6685" + }, + "Assurances retraite et fonds de pension": { + "account_number": "6686" + }, + "Majorations et p\u00e9nalit\u00e9s sociales": { + "account_number": "6687" + }, + "Charges sociales diverses": { + "account_number": "6688" + }, + "account_number": "668" + }, + "account_number": "66" + }, + "Frais financiers et charges assimil\u00e9es": { + "Int\u00e9r\u00eats des emprunts": { + "Emprunts obligataires": { + "account_number": "6711" + }, + "Emprunts aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": { + "account_number": "6712" + }, + "Dettes li\u00e9es \u00e0 des participations": { + "account_number": "6713" + }, + "Primes de remboursement des obligations": { + "account_number": "6714" + }, + "account_number": "671" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition": { + "Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail immobilier": { + "account_number": "6722" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail mobilier": { + "account_number": "6723" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition / location-vente": { + "account_number": "6724" + }, + "Int\u00e9r\u00eats dans loyers des autres locations acquisition": { + "account_number": "6728" + }, + "account_number": "672" + }, + "Escomptes accord\u00e9s": { + "account_number": "673" + }, + "Autres int\u00e9r\u00eats": { + "Avances re\u00e7ues et d\u00e9p\u00f4ts cr\u00e9diteurs": { + "account_number": "6741" + }, + "Comptes courants bloqu\u00e9s": { + "account_number": "6742" + }, + "Int\u00e9r\u00eats sur obligations cautionn\u00e9es": { + "account_number": "6743" + }, + "Int\u00e9r\u00eats sur dettes commerciales": { + "account_number": "6744" + }, + "Int\u00e9r\u00eats bancaires et sur op\u00e9rations de financement (escompte...)": { + "account_number": "6745" + }, + "Int\u00e9r\u00eats sur dettes diverses": { + "account_number": "6748" + }, + "account_number": "674" + }, + "Escomptes des effets de commerce": { + "account_number": "675" + }, + "Pertes de change financi\u00e8res": { + "account_number": "676" + }, + "Pertes sur titres de placement": { + "Pertes sur cessions de titres de placement": { + "account_number": "6771" + }, + "Mali provenant d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": { + "account_number": "6772" + }, + "account_number": "677" + }, + "Pertes et charges sur risques financiers": { + "Sur rentes viag\u00e8res": { + "account_number": "6781" + }, + "Sur op\u00e9rations financi\u00e8res": { + "account_number": "6782" + }, + "Sur instruments de tr\u00e9sorerie": { + "account_number": "6784" + }, + "account_number": "678" + }, + "Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "Sur risques financiers": { + "account_number": "6791" + }, + "Sur titres de placement": { + "account_number": "6795" + }, + "Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "account_number": "6798" + }, + "account_number": "679" + }, + "account_number": "67" + }, + "Dotations aux amortissements": { + "Dotations aux amortissements d\u2019exploitation": { + "Dotations aux amortissements des immobilisations incorporelles": { + "account_number": "6812" + }, + "Dotations aux amortissements des immobilisations corporelles": { + "account_number": "6813" + }, + "account_number": "681" + }, + "account_number": "68" + }, + "Dotations aux provisions et aux d\u00e9pr\u00e9ciations": { + "Dotations aux provisions et aux d\u00e9pr\u00e9ciations d\u2019exploitation": { + "Dotations aux provisions pour risques et charges": { + "account_number": "6911" + }, + "Dotations aux d\u00e9pr\u00e9ciations des immobilisations incorporelles": { + "account_number": "6913" + }, + "Dotations aux d\u00e9pr\u00e9ciations des immobilisations corporelles": { + "account_number": "6914" + }, + "account_number": "691" + }, + "Dotations aux provisions et aux d\u00e9pr\u00e9ciations financi\u00e8res": { + "Dotations aux provisions pour risques et charges": { + "account_number": "6971" + }, + "Dotations aux d\u00e9pr\u00e9ciations des immobilisations financi\u00e8res": { + "account_number": "6972" + }, + "account_number": "697" + }, + "account_number": "69" + }, + "root_type": "Expense", + "account_number": "6" + }, + "Comptes de produits des activit\u00e9s ordinaires": { + "Ventes": { + "Ventes de marchandises": { + "Dans la R\u00e9gion": { + "account_number": "7011" + }, + "Hors R\u00e9gion": { + "account_number": "7012" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7013" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7014" + }, + "Sur internet": { + "account_number": "7015" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7019" + }, + "account_number": "701" + }, + "Ventes de produits finis": { + "Dans la R\u00e9gion": { + "account_number": "7021" + }, + "Hors R\u00e9gion": { + "account_number": "7022" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7023" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7024" + }, + "Sur internet": { + "account_number": "7025" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7029" + }, + "account_number": "702" + }, + "Ventes de produits interm\u00e9diaires": { + "Dans la R\u00e9gion": { + "account_number": "7031" + }, + "Hors R\u00e9gion": { + "account_number": "7032" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7033" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7034" + }, + "Sur internet": { + "account_number": "7035" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7039" + }, + "account_number": "703" + }, + "Ventes de produits r\u00e9siduels": { + "Dans la R\u00e9gion": { + "account_number": "7041" + }, + "Hors R\u00e9gion": { + "account_number": "7042" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7043" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7044" + }, + "Sur internet": { + "account_number": "7045" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7049" + }, + "account_number": "704" + }, + "Travaux factur\u00e9s": { + "Dans la R\u00e9gion": { + "account_number": "7051" + }, + "Hors R\u00e9gion": { + "account_number": "7052" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7053" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7054" + }, + "Sur internet": { + "account_number": "7055" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7059" + }, + "account_number": "705" + }, + "Services vendus": { + "Dans la R\u00e9gion": { + "account_number": "7061" + }, + "Hors R\u00e9gion": { + "account_number": "7062" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7063" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7064" + }, + "Sur internet": { + "account_number": "7065" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7069" + }, + "account_number": "706" + }, + "Produits accessoires": { + "Ports, emballages perdus et autres frais factur\u00e9s": { + "account_number": "7071" + }, + "Commissions et courtages": { + "account_number": "7072" + }, + "Locations": { + "account_number": "7073" + }, + "Bonis sur reprises et cessions d\u2019emballages": { + "account_number": "7074" + }, + "Mise \u00e0 disposition de personnel": { + "account_number": "7075" + }, + "Redevances pour brevets, logiciels, marques et droits similaires": { + "account_number": "7076" + }, + "Services exploit\u00e9s dans l\u2019int\u00e9r\u00eat du personnel": { + "account_number": "7077" + }, + "Autres produits accessoires": { + "account_number": "7078" + }, + "account_number": "707" + }, + "account_number": "70" + }, + "Subventions d\u2019exploitation": { + "Sur produits \u00e0 l\u2019exportation": { + "account_number": "711" + }, + "Sur produits \u00e0 l\u2019importation": { + "account_number": "712" + }, + "Sur produits de p\u00e9r\u00e9quation": { + "account_number": "713" + }, + "Indemnit\u00e9s et subventions d\u2019exploitation (entit\u00e9 agricole)": { + "account_number": "714" + }, + "Autres subventions d\u2019exploitation": { + "Vers\u00e9es par l\u2019\u00c9tat et les collectivit\u00e9s publiques": { + "account_number": "7181" + }, + "Vers\u00e9es par les organismes internationaux": { + "account_number": "7182" + }, + "Vers\u00e9es par des tiers": { + "account_number": "7183" + }, + "account_number": "718" + }, + "account_number": "71" + }, + "Production immobilis\u00e9e": { + "Immobilisations incorporelles": { + "account_number": "721" + }, + "Immobilisations corporelles": { + "Immobilisations corporelles (hors actifs biologiques)": { + "account_number": "7221" + }, + "Immobilisations corporelles (actifs biologiques)": { + "account_number": "7222" + }, + "account_number": "722" + }, + "Production auto-consomm\u00e9e": { + "account_number": "724" + }, + "Immobilisations financi\u00e8res": { + "account_number": "726" + }, + "account_number": "72" + }, + "Variations des stocks de biens et de services produits": { + "Variations des stocks de produits en cours": { + "Produits en cours": { + "account_number": "7341" + }, + "Travaux en cours": { + "account_number": "7342" + }, + "account_number": "734" + }, + "Variations des en-cours de services": { + "\u00c9tudes en cours": { + "account_number": "7351" + }, + "Prestations de services en cours": { + "account_number": "7352" + }, + "account_number": "735" + }, + "Variations des stocks de produits finis": { + "account_number": "736" + }, + "Variations des stocks de produits interm\u00e9diaires et r\u00e9siduels": { + "Produits interm\u00e9diaires": { + "account_number": "7371" + }, + "Produits r\u00e9siduels": { + "account_number": "7372" + }, + "account_number": "737" + }, + "account_number": "73" + }, + "Autres produits": { + "Profits sur cr\u00e9ances clients et autres d\u00e9biteurs": { + "account_number": "751" + }, + "Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "Quote-part transf\u00e9r\u00e9e de pertes (comptabilit\u00e9 du g\u00e9rant)": { + "account_number": "7521" + }, + "B\u00e9n\u00e9fices attribu\u00e9s par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": { + "account_number": "7525" + }, + "account_number": "752" + }, + "Produits des cessions courantes d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "7541" + }, + "Immobilisations corporelles": { + "account_number": "7542" + }, + "account_number": "754" + }, + "Gains de change sur cr\u00e9ances et dettes commerciales": { + "account_number": "756" + }, + "Produits divers": { + "Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": { + "account_number": "7581" + }, + "Indemnit\u00e9s d\u2019assurances re\u00e7ues": { + "account_number": "7582" + }, + "Autres produits divers": { + "account_number": "7588" + }, + "account_number": "758" + }, + "Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "Sur risques \u00e0 court terme": { + "account_number": "7591" + }, + "Sur stocks": { + "account_number": "7593" + }, + "Sur cr\u00e9ances": { + "account_number": "7594" + }, + "Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "account_number": "7598" + }, + "account_number": "759" + }, + "account_number": "75" + }, + "Revenus financiers et produits assimil\u00e9s": { + "Int\u00e9r\u00eats de pr\u00eats et cr\u00e9ances diverses": { + "Int\u00e9r\u00eats de pr\u00eats": { + "account_number": "7712" + }, + "Int\u00e9r\u00eats sur cr\u00e9ances diverses": { + "account_number": "7713" + }, + "account_number": "771" + }, + "Revenus de participations et autres titres immobilis\u00e9s": { + "Revenus des titres de participation": { + "account_number": "7721" + }, + "Revenus autres titres immobilis\u00e9s": { + "account_number": "7722" + }, + "account_number": "772" + }, + "Escomptes obtenus": { + "account_number": "773" + }, + "Revenus de placement": { + "Revenus des obligations": { + "account_number": "7745" + }, + "Revenus des titres de placement": { + "account_number": "7746" + }, + "account_number": "774" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition": { + "account_number": "775" + }, + "Gains de change financiers": { + "account_number": "776" + }, + "Gains sur cessions de titres de placement": { + "account_number": "777" + }, + "Gains sur risques financiers": { + "Sur rentes viag\u00e8res": { + "account_number": "7781" + }, + "Sur op\u00e9rations financi\u00e8res": { + "account_number": "7782" + }, + "Sur instruments de tr\u00e9sorerie": { + "account_number": "7784" + }, + "account_number": "778" + }, + "Reprises de charges pour d\u00e9pr\u00e9ciations et provisions \u00e0 court terme financi\u00e8res": { + "Sur risques financiers": { + "account_number": "7791" + }, + "Sur titres de placement": { + "account_number": "7795" + }, + "Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "account_number": "7798" + }, + "account_number": "779" + }, + "account_number": "77" + }, + "Transferts de charges": { + "Transferts de charges d\u2019exploitation": { + "account_number": "781" + }, + "Transferts de charges financi\u00e8res": { + "account_number": "787" + }, + "account_number": "78" + }, + "Reprises de provisions, de d\u00e9pr\u00e9ciations et autres": { + "Reprises de provisions et d\u00e9pr\u00e9ciations d\u2019exploitation": { + "Pour risques et charges": { + "account_number": "7911" + }, + "Des immobilisations incorporelles": { + "account_number": "7913" + }, + "Des immobilisations corporelles": { + "account_number": "7914" + }, + "account_number": "791" + }, + "Reprises de provisions et d\u00e9pr\u00e9ciations financi\u00e8res": { + "Pour risques et charges": { + "account_number": "7971" + }, + "Des immobilisations financi\u00e8res": { + "account_number": "7972" + }, + "account_number": "797" + }, + "Reprises d\u2019amortissements": { + "account_number": "798" + }, + "Reprises de subventions d\u2019investissement": { + "account_number": "799" + }, + "account_number": "79" + }, + "root_type": "Income", + "account_number": "7" + }, + "8-Comptes des autres charges et des autres produits (CHARGES)": { + "Valeurs comptables des cessions d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "811" + }, + "Immobilisations corporelles": { + "account_number": "812" + }, + "Immobilisations financi\u00e8res": { + "account_number": "816" + }, + "account_number": "81" + }, + "Charges hors activit\u00e9s ordinaires": { + "Charges HAO constat\u00e9es": { + "account_number": "831" + }, + "Charges li\u00e9es aux op\u00e9rations de restructuration": { + "account_number": "833" + }, + "Pertes sur cr\u00e9ances HAO": { + "account_number": "834" + }, + "Dons et lib\u00e9ralit\u00e9s accord\u00e9s": { + "account_number": "835" + }, + "Abandons de cr\u00e9ances consentis": { + "account_number": "836" + }, + "Charges li\u00e9es aux op\u00e9rations de liquidation": { + "account_number": "837" + }, + "Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": { + "account_number": "839" + }, + "account_number": "83" + }, + "Dotations hors activit\u00e9s ordinaires": { + "Dotations aux provisions r\u00e9glement\u00e9es": { + "account_number": "851" + }, + "Dotations aux amortissements HAO": { + "account_number": "852" + }, + "Dotations aux d\u00e9pr\u00e9ciations HAO": { + "account_number": "853" + }, + "Dotations aux provisions pour risques et charges HAO": { + "account_number": "854" + }, + "Autres dotations HAO": { + "account_number": "858" + }, + "account_number": "85" + }, + "Participation des travailleurs": { + "Participation l\u00e9gale aux b\u00e9n\u00e9fices": { + "account_number": "871" + }, + "Participation contractuelle aux b\u00e9n\u00e9fices": { + "account_number": "874" + }, + "Autres participations": { + "account_number": "878" + }, + "account_number": "87" + }, + "Imp\u00f4ts sur le r\u00e9sultat": { + "Imp\u00f4ts sur les b\u00e9n\u00e9fices de l\u2019exercice": { + "Activit\u00e9s exerc\u00e9es dans l\u2019\u00c9tat": { + "account_number": "8911" + }, + "Activit\u00e9s exerc\u00e9es dans les autres \u00c9tats de la R\u00e9gion": { + "account_number": "8912" + }, + "Activit\u00e9s exerc\u00e9es hors R\u00e9gion": { + "account_number": "8913" + }, + "account_number": "891" + }, + "Rappel d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": { + "account_number": "892" + }, + "Imp\u00f4t minimum forfaitaire IMF": { + "account_number": "895" + }, + "D\u00e9gr\u00e8vements et annulations d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": { + "D\u00e9gr\u00e8vements": { + "account_number": "8991" + }, + "Annulations pour pertes r\u00e9troactives": { + "account_number": "8994" + }, + "account_number": "899" + }, + "account_number": "89" + }, + "root_type": "Expense" + }, + "8-Comptes des autres charges et des autres produits (PRODUITS)": { + "Produits des cessions d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "821" + }, + "Immobilisations corporelles": { + "account_number": "822" + }, + "Immobilisations financi\u00e8res": { + "account_number": "826" + }, + "account_number": "82" + }, + "Produits hors activit\u00e9s ordinaires": { + "Produits HAO constat\u00e9s": { + "account_number": "841" + }, + "Produits li\u00e9s aux op\u00e9rations de restructuration": { + "account_number": "843" + }, + "Indemnit\u00e9s et subventions HAO (entit\u00e9 agricole)": { + "account_number": "844" + }, + "Dons et lib\u00e9ralit\u00e9s obtenus": { + "account_number": "845" + }, + "Abandons de cr\u00e9ances obtenus": { + "account_number": "846" + }, + "Produits li\u00e9s aux op\u00e9rations de liquidation": { + "account_number": "847" + }, + "Transferts de charges HAO": { + "account_number": "848" + }, + "Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": { + "account_number": "849" + }, + "account_number": "84" + }, + "Reprises de charges, provisions et d\u00e9pr\u00e9ciations HAO": { + "Reprises de provisions r\u00e9glement\u00e9es": { + "account_number": "861" + }, + "Reprises d\u2019amortissements HAO": { + "account_number": "862" + }, + "Reprises de d\u00e9pr\u00e9ciations HAO": { + "account_number": "863" + }, + "Reprises de provisions pour risques et charges HAO": { + "account_number": "864" + }, + "Autres reprises HAO": { + "account_number": "868" + }, + "account_number": "86" + }, + "Subventions d\u2019\u00e9quilibre": { + "\u00c9tat": { + "account_number": "881" + }, + "Collectivit\u00e9s publiques": { + "account_number": "884" + }, + "Groupe": { + "account_number": "886" + }, + "Autres": { + "account_number": "888" + }, + "account_number": "88" + }, + "root_type": "Income" + } + } +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/gw_plan_comptable.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/gw_plan_comptable.json new file mode 100644 index 00000000000..754b557a1ae --- /dev/null +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/gw_plan_comptable.json @@ -0,0 +1,1919 @@ +{ + "country_code": "gw", + "name": "Syscohada - Plan Comptable", + "tree": { + "1-Comptes de ressources durables": { + "10-Capital": { + "101-Capital social": { + "1011-Capital souscrit, non appel\u00e9": {}, + "1012-Capital souscrit, appel\u00e9, non vers\u00e9": {}, + "1013-Capital souscrit, appel\u00e9, vers\u00e9, non amorti": {}, + "1014-Capital souscrit, appel\u00e9, vers\u00e9, amorti": {}, + "1018-Capital souscrit soumis \u00e0 des conditions particuli\u00e8res": {} + }, + "102-Capital par dotation": { + "1021-Dotation initiale": {}, + "1022-Dotations compl\u00e9mentaires": {}, + "1028-Autres dotations": {} + }, + "103-Capital personnel": {}, + "104-Compte de l\u2019exploitant": { + "1041-Apports temporaires": {}, + "1042-Op\u00e9rations courantes": {}, + "1043-R\u00e9mun\u00e9rations, imp\u00f4ts et autres charges personnelles": {}, + "1047-Pr\u00e9l\u00e8vements d\u2019autoconsommation": {}, + "1048-Autres pr\u00e9l\u00e8vements": {} + }, + "105-Primes li\u00e9es au capital social": { + "1051-Primes d\u2019\u00e9mission": {}, + "1052-Primes d\u2019apport": {}, + "1053-Primes de fusion": {}, + "1054-Primes de conversion": {}, + "1058-Autres primes": {} + }, + "106-\u00c9carts de r\u00e9\u00e9valuation": { + "1061-\u00c9carts de r\u00e9\u00e9valuation l\u00e9gale": {}, + "1062-\u00c9carts de r\u00e9\u00e9valuation libre": {} + }, + "109-Apporteurs, capital souscrit, non appel\u00e9": {} + }, + "11-R\u00e9serves": { + "111-R\u00e9serve l\u00e9gale": {}, + "112-R\u00e9serves statutaires ou contractuelles": {}, + "113-R\u00e9serves r\u00e9glement\u00e9es": { + "1131-R\u00e9serves de plus-values nettes \u00e0 long terme": {}, + "1132-R\u00e9serves d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": {}, + "1133-R\u00e9serves cons\u00e9cutives \u00e0 l\u2019octroi de subventions d\u2019investissement": {}, + "1134-R\u00e9serves des valeurs mobili\u00e8res donnant acc\u00e8s au capital": {}, + "1135-Autres r\u00e9serves r\u00e9glement\u00e9es": {} + }, + "118-Autres r\u00e9serves": { + "1181-R\u00e9serves facultatives": {}, + "1188-R\u00e9serves diverses": {} + } + }, + "12-Report \u00e0 nouveau": { + "121-Report \u00e0 nouveau cr\u00e9diteur": {}, + "129-Report \u00e0 nouveau d\u00e9biteur": { + "1291-Perte nette \u00e0 reporter": {}, + "1292-Perte Amortissements r\u00e9put\u00e9s diff\u00e9r\u00e9s": {} + } + }, + "13-R\u00e9sultat net de l\u2019exercice": { + "130-R\u00e9sultat en instance d\u2019affectation": { + "1301-R\u00e9sultat en instance d\u2019affectation : b\u00e9n\u00e9fice": {}, + "1309-R\u00e9sultat en instance d\u2019affectation : perte": {} + }, + "131-R\u00e9sultat net : b\u00e9n\u00e9fice": {}, + "132-Marge commerciale (MC)": {}, + "133-Valeur ajout\u00e9e (VA)": {}, + "134-Exc\u00e9dent brut d\u2019exploitation (EBE)": {}, + "135-R\u00e9sultat d\u2019exploitation (RE)": {}, + "136-R\u00e9sultat financier (RF)": {}, + "137-R\u00e9sultat des activit\u00e9s ordinaires (RAO)": {}, + "138-R\u00e9sultat hors activit\u00e9s ordinaires (RHAO)": { + "1381-R\u00e9sultat de fusion": {}, + "1382-R\u00e9sultat d\u2019apport partiel d\u2019actif": {}, + "1383-R\u00e9sultat de scission": {}, + "1384-R\u00e9sultat de liquidation": {} + }, + "139-R\u00e9sultat net : perte": {} + }, + "14-Subventions d\u2019investissement": { + "141-Subventions d\u2019\u00e9quipement": { + "1411-\u00c9tat": {}, + "1412-R\u00e9gions": {}, + "1413-D\u00e9partements": {}, + "1414-Communes et collectivit\u00e9s publiques d\u00e9centralis\u00e9es": {}, + "1415-Entit\u00e9s publiques ou mixtes": {}, + "1416-Entit\u00e9s et organismes priv\u00e9s": {}, + "1417-Organismes internationaux": {}, + "1418-Autres": {} + }, + "148-Autres subventions d\u2019investissement": {} + }, + "15-Provisions r\u00e9glement\u00e9es et fonds assimil\u00e9s": { + "151-Amortissements d\u00e9rogatoires": {}, + "152-Plus-values de cession \u00e0 r\u00e9investir": {}, + "153-Fonds r\u00e9glement\u00e9s": { + "1531-Fonds National": {}, + "1532-Pr\u00e9l\u00e8vement pour le Budget": {} + }, + "154-Provisions sp\u00e9ciales de r\u00e9\u00e9valuation": {}, + "155-Provisions r\u00e9glement\u00e9es relatives aux immobilisations": { + "1551-Reconstitution des gisements miniers et p\u00e9troliers": {} + }, + "156-Provisions r\u00e9glement\u00e9es relatives aux stocks": { + "1561-Hausse de prix": {}, + "1562-Fluctuation des cours": {} + }, + "157-Provisions pour investissement": {}, + "158-Autres provisions et fonds r\u00e9glement\u00e9s": {} + }, + "16-Emprunts et dettes assimil\u00e9es": { + "161-Emprunts obligataires": { + "1611-Emprunts obligataires ordinaires": {}, + "1612-Emprunts obligataires convertibles en actions": {}, + "1613-Emprunts obligataires remboursables en actions": {}, + "1618-Autres emprunts obligataires": {} + }, + "162-Emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": {}, + "163-Avances re\u00e7ues de l\u2019\u00c9tat": {}, + "164-Avances re\u00e7ues et comptes courants bloqu\u00e9s": {}, + "165-D\u00e9p\u00f4ts et cautionnements re\u00e7us": { + "1651-D\u00e9p\u00f4ts": {}, + "1652-Cautionnements": {} + }, + "166-Int\u00e9r\u00eats courus": { + "1661-Sur emprunts obligataires": {}, + "1662-Sur emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": {}, + "1663-Sur avances re\u00e7ues de l\u2019\u00c9tat": {}, + "1664-Sur avances re\u00e7ues et comptes courants bloqu\u00e9s": {}, + "1665-Sur d\u00e9p\u00f4ts et cautionnements re\u00e7us": {}, + "1667-Sur avances assorties de conditions particuli\u00e8res": {}, + "1668-Sur autres emprunts et dettes": {} + }, + "167-Avances assorties de conditions particuli\u00e8res": { + "1671-Avances bloqu\u00e9es pour augmentation du capital": {}, + "1672-Avances conditionn\u00e9es par l\u2019\u00c9tat": {}, + "1673-Avances conditionn\u00e9es par les autres organismes africains": {}, + "1674-Avances conditionn\u00e9es par les organismes internationaux": {} + }, + "168-Autres emprunts et dettes": { + "1681-Rentes viag\u00e8res capitalis\u00e9es": {}, + "1682-Billets de fonds": {}, + "1683-Dettes cons\u00e9cutives \u00e0 des titres emprunt\u00e9s": {}, + "1684-Emprunts participatifs": {}, + "1685-Participation des travailleurs aux b\u00e9n\u00e9fices": {}, + "1686-Emprunts et dettes contract\u00e9s aupr\u00e8s des autres tiers": {} + } + }, + "17-Dettes de location acquisition": { + "172-Dettes de location acquisition / cr\u00e9dit bail immobilier": {}, + "173-Dettes de location acquisition / cr\u00e9dit bail mobilier": {}, + "174-Dettes de location acquisition / location de vente": {}, + "176-Int\u00e9r\u00eats courus": { + "1762-Sur dettes de location acquisition / cr\u00e9dit-bail immobilier": {}, + "1763-Sur dettes de location acquisition / cr\u00e9dit-bail mobilier": {}, + "1764-Sur dettes de location acquisition / location-vente": {}, + "1768-Sur autres dettes de location acquisition": {} + }, + "178-Autres dettes de location acquisition": {} + }, + "18-Dettes li\u00e9es \u00e0 des participations et comptes de liaison des \u00e9tablissements et soci\u00e9t\u00e9s en participation": { + "181-Dettes li\u00e9es \u00e0 des participations": { + "1811-Dettes li\u00e9es \u00e0 des participations (groupe)": {}, + "1812-Dettes li\u00e9es \u00e0 des participations (hors groupe)": {} + }, + "182-Dettes li\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": {}, + "183-Int\u00e9r\u00eats courus sur dettes li\u00e9es \u00e0 des participations": {}, + "184-Comptes permanents bloqu\u00e9s des \u00e9tablissements et succursales": {}, + "185-Comptes permanents non bloqu\u00e9s des \u00e9tablissements et succursales": {}, + "186-Comptes de liaison charges": {}, + "187-Comptes de liaison produits": {}, + "188-Comptes de liaison des soci\u00e9t\u00e9s en participation": {} + }, + "19-Provisions pour risques et charges": { + "191-Provisions pour litiges": {}, + "192-Provisions pour garanties donn\u00e9es aux clients": {}, + "193-Provisions pour pertes sur march\u00e9s \u00e0 ach\u00e8vement futur": {}, + "194-Provisions pour pertes de change": {}, + "195-Provisions pour imp\u00f4ts": {}, + "196-Provisions pour pensions et obligations similaires": { + "1961-Provisions pour pensions et obligations similaires engagement de retraite": {}, + "1962-Actif du r\u00e9gime de retraite": {} + }, + "197-Provisions pour restructuration": {}, + "198-Autres provisions pour risques et charges": { + "1981-Provisions pour amendes et p\u00e9nalit\u00e9s": {}, + "1983-Provisions pour propre assureur": {}, + "1984-Provisions pour d\u00e9mant\u00e8lement et remise en \u00e9tat": {}, + "1985-Provisions pour droits \u00e0 r\u00e9duction ou avantage en nature (ch\u00e8ques cadeau, cartes de fid\u00e9lit\u00e9...)": {}, + "1988-Provisions pour divers risques et charges": {} + } + }, + "root_type": "Equity" + }, + "2-Comptes d\u2019actif immobilis\u00e9": { + "21-Immobilisations incorporelles": { + "account_type": "Fixed Asset", + "211-Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset" + }, + "212-Brevets, licences, concessions et droits similaires": { + "account_type": "Fixed Asset", + "2121-Brevets": { + "account_type": "Fixed Asset" + }, + "2122-Licences": { + "account_type": "Fixed Asset" + }, + "2123-Concessions de service public": { + "account_type": "Fixed Asset" + }, + "2128-Autres concessions et droits similaires": { + "account_type": "Fixed Asset" + } + }, + "213-Logiciels et sites internet": { + "account_type": "Fixed Asset", + "2131-Logiciels": { + "account_type": "Fixed Asset" + }, + "2132-Sites internet": { + "account_type": "Fixed Asset" + } + }, + "214-Marques": { + "account_type": "Fixed Asset" + }, + "215-Fonds commercial": { + "account_type": "Fixed Asset" + }, + "216-Droit au bail": { + "account_type": "Fixed Asset" + }, + "217-Investissements de cr\u00e9ation": { + "account_type": "Fixed Asset" + }, + "218-Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset", + "2181-Frais de prospection et d\u2019\u00e9valuation de ressources min\u00e9rales": { + "account_type": "Fixed Asset" + }, + "2182-Co\u00fbts d\u2019obtention du contrat": { + "account_type": "Fixed Asset" + }, + "2183-Fichiers clients, notices, titres de journaux et magazines": { + "account_type": "Fixed Asset" + }, + "2184-Co\u00fbts des franchises": { + "account_type": "Fixed Asset" + }, + "2188-Divers droits et valeurs incorporelles": { + "account_type": "Fixed Asset" + } + }, + "219-Immobilisations incorporelles en cours": { + "account_type": "Fixed Asset", + "2191-Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset" + }, + "2193-Logiciels et internet": { + "account_type": "Fixed Asset" + }, + "2198-Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset" + } + } + }, + "22-Terrains": { + "account_type": "Fixed Asset", + "221-Terrains agricoles et forestiers": { + "account_type": "Fixed Asset", + "2211-Terrains d\u2019exploitation agricole": { + "account_type": "Fixed Asset" + }, + "2212-Terrains d\u2019exploitation foresti\u00e8re": { + "account_type": "Fixed Asset" + }, + "2218-Autres terrains": { + "account_type": "Fixed Asset" + } + }, + "222-Terrains nus": { + "account_type": "Fixed Asset", + "2221-Terrains \u00e0 b\u00e2tir": { + "account_type": "Fixed Asset" + }, + "2228-Autres terrains nus": { + "account_type": "Fixed Asset" + } + }, + "223-Terrains b\u00e2tis": { + "account_type": "Fixed Asset", + "2231-Pour b\u00e2timents industriels et agricoles": { + "account_type": "Fixed Asset" + }, + "2232-Pour b\u00e2timents administratifs et commerciaux": { + "account_type": "Fixed Asset" + }, + "2234-Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations professionnelles": { + "account_type": "Fixed Asset" + }, + "2235-Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations non professionnelles": { + "account_type": "Fixed Asset" + }, + "2238-Autres terrains b\u00e2tis": { + "account_type": "Fixed Asset" + } + }, + "224-Travaux de mise en valeur des terrains": { + "account_type": "Fixed Asset", + "2241-Plantation d\u2019arbres et d\u2019arbustes": { + "account_type": "Fixed Asset" + }, + "2245-Am\u00e9liorations du fonds": { + "account_type": "Fixed Asset" + }, + "2248-Autres travaux": { + "account_type": "Fixed Asset" + } + }, + "225-Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset", + "2251-Carri\u00e8res": { + "account_type": "Fixed Asset" + } + }, + "226-Terrains am\u00e9nag\u00e9s": { + "account_type": "Fixed Asset", + "2261-Parkings": { + "account_type": "Fixed Asset" + } + }, + "227-Terrains mis en concession": { + "account_type": "Fixed Asset" + }, + "228-Autres terrains": { + "account_type": "Fixed Asset", + "2281-Terrains immeubles de placement": { + "account_type": "Fixed Asset" + }, + "2285-Terrains des logements affect\u00e9s au personnel": { + "account_type": "Fixed Asset" + }, + "2286-Terrains de location acquisition": { + "account_type": "Fixed Asset" + }, + "2288-Divers terrains": { + "account_type": "Fixed Asset" + } + }, + "229-Am\u00e9nagements de terrains en cours": { + "account_type": "Fixed Asset", + "2291-Terrains agricoles et forestiers": { + "account_type": "Fixed Asset" + }, + "2292-Terrains nus": { + "account_type": "Fixed Asset" + }, + "2295-Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset" + }, + "2298-Autres terrains": { + "account_type": "Fixed Asset" + } + } + }, + "23-B\u00e2timents, installations techniques et agencements": { + "231-B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "2311-B\u00e2timents industriels": {}, + "2312-B\u00e2timents agricoles": {}, + "2313-B\u00e2timents administratifs et commerciaux": {}, + "2314-B\u00e2timents affect\u00e9s au logement du personnel": {}, + "2315-B\u00e2timents immeubles de placement": {}, + "2316-B\u00e2timents de location acquisition": {} + }, + "232-B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "2321-B\u00e2timents industriels": {}, + "2322-B\u00e2timents agricoles": {}, + "2323-B\u00e2timents administratifs et commerciaux": {}, + "2324-B\u00e2timents affect\u00e9s au logement du personnel": {}, + "2325-B\u00e2timents immeubles de placement": {}, + "2326-B\u00e2timents de location acquisition": {} + }, + "233-Ouvrages d\u2019infrastructure": { + "2331-Voies de terre": {}, + "2332-Voies de fer": {}, + "2333-Voies d\u2019eau": {}, + "2334-Barrages, Digues": {}, + "2335-Pistes d\u2019a\u00e9rodrome": {}, + "2338-Autres ouvrages d\u2019infrastructures": {} + }, + "234-Am\u00e9nagements, agencements et installations techniques": { + "2341-Installations complexes sp\u00e9cialis\u00e9es sur sol propre": {}, + "2342-Installations complexes sp\u00e9cialis\u00e9es sur sol d\u2019autrui": {}, + "2343-Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol propre": {}, + "2344-Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol d\u2019autrui": {}, + "2345-Am\u00e9nagements et agencements des b\u00e2timents": {} + }, + "235-Am\u00e9nagements de bureaux": { + "2351-Installations g\u00e9n\u00e9rales": {}, + "2358-Autres am\u00e9nagements de bureaux": {} + }, + "237-B\u00e2timents industriels, agricoles et commerciaux mis en concession": {}, + "238-Autres installations et agencements": {}, + "239-B\u00e2timents am\u00e9nagements, agencements et installations en cours": { + "2391-B\u00e2timents en cours": {}, + "2392-Installations en cours": {}, + "2393-Ouvrages d\u2019infrastructure en cours": {}, + "2394-Am\u00e9nagements et agencements et installations techniques en cours": {}, + "2395-Am\u00e9nagements de bureaux en cours": {}, + "2398-Autres installations et agencements en cours": {} + } + }, + "24-Mat\u00e9riel, mobilier et actifs biologiques": { + "241-Mat\u00e9riel et outillage industriel et commercial": { + "2411-Mat\u00e9riel industriel": {}, + "2412-Outillage industriel": {}, + "2413-Mat\u00e9riel commercial": {}, + "2414-Outillage commercial": {}, + "2416-Mat\u00e9riel & outillage industriel et commercial de location-acquisition": {} + }, + "242-Mat\u00e9riel et outillage agricole": { + "2421-Mat\u00e9riel agricole": {}, + "2422-Outillage agricole": {}, + "2426-Mat\u00e9riel & outillage agricole de location-acquisition": {} + }, + "243-Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "244-Mat\u00e9riel et mobilier": { + "2441-Mat\u00e9riel de bureau": {}, + "2442-Mat\u00e9riel informatique": {}, + "2443-Mat\u00e9riel bureautique": {}, + "2444-Mobilier de bureau": {}, + "2445-Mat\u00e9riel et mobilier immeubles de placement": {}, + "2446-Mat\u00e9riel et mobilier de location acquisition": {}, + "2447-Mat\u00e9riel et mobilier des logements du personnel": {} + }, + "245-Mat\u00e9riel de transport": { + "2451-Mat\u00e9riel automobile": {}, + "2452-Mat\u00e9riel ferroviaire": {}, + "2453-Mat\u00e9riel fluvial, lagunaire": {}, + "2454-Mat\u00e9riel naval": {}, + "2455-Mat\u00e9riel a\u00e9rien": {}, + "2456-Mat\u00e9riel de transport de location-acquisition": {}, + "2457-Mat\u00e9riel hippomobile": {}, + "2458-Autres mat\u00e9riels de transport": {} + }, + "246-Actifs biologiques": { + "2461-Cheptel, animaux de trait": {}, + "2462-Cheptel, animaux reproducteurs": {}, + "2463-Animaux de garde": {}, + "2465-Plantations agricoles": {}, + "2468-Autres actifs biologiques": {} + }, + "247-Agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "2471-Agencements et am\u00e9nagements du mat\u00e9riel": {}, + "2472-Agencements et am\u00e9nagements des actifs biologiques": {}, + "2478-Autres agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": {} + }, + "248-Autres mat\u00e9riels et mobiliers": { + "2481-Collections et \u0153uvres d\u2019art": {}, + "2488-Divers mat\u00e9riels mobiliers": {} + }, + "249-Mat\u00e9riels et actifs biologiques en cours": { + "2491-Mat\u00e9riel et outillage industriel et commercial": {}, + "2492-Mat\u00e9riel et outillage agricole": {}, + "2493-Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "2494-Mat\u00e9riel et mobilier de bureau": {}, + "2495-Mat\u00e9riel de transport": {}, + "2496-Actifs biologiques": {}, + "2497-Agencements am\u00e9nagements du mat\u00e9riel et actifs biologiques": {}, + "2498-Autres mat\u00e9riels et actifs biologiques en cours": {} + } + }, + "25-Avances et acomptes vers\u00e9s sur immobilisations": { + "251-Avances et acomptes vers\u00e9s sur immobilisations incorporelles": {}, + "252-Avances et acomptes vers\u00e9s sur immobilisations corporelles": {} + }, + "26-Titres de participation": { + "261-Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": {}, + "262-Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le conjoint": {}, + "263-Titres de participation dans des soci\u00e9t\u00e9s conf\u00e9rant une influence notable": {}, + "265-Participations dans des organismes professionnels": {}, + "266-Parts dans des groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": {}, + "268-Autres titres de participation": {} + }, + "27-Autres immobilisations financi\u00e8res": { + "271-Pr\u00eats et cr\u00e9ances": { + "2711-Pr\u00eats participatifs": {}, + "2712-Pr\u00eats aux associ\u00e9s": {}, + "2713-Billets de fonds": {}, + "2714-Titres pr\u00eat\u00e9s": {}, + "2718-Autres pr\u00eats et cr\u00e9ances": {} + }, + "272-Pr\u00eats au personnel": { + "2721-Pr\u00eats immobiliers": {}, + "2722-Pr\u00eats mobiliers et d\u2019installation": {}, + "2728-Autres pr\u00eats au personnel": {} + }, + "273-Cr\u00e9ances sur l\u2019\u00c9tat": { + "2731-Retenues de garantie": {}, + "2733-Fonds r\u00e9glement\u00e9": {}, + "2734-Cr\u00e9ances sur le conc\u00e9dant": {}, + "2738-Autres cr\u00e9ances sur l\u2019\u00c9tat": {} + }, + "274-Titres immobilis\u00e9s": { + "2741-Titres immobilis\u00e9s de l\u2019activit\u00e9 de portefeuille (TIAP)": {}, + "2742-Titres participatifs": {}, + "2743-Certificats d\u2019investissement": {}, + "2744-Parts de fonds commun de placement (FCP)": {}, + "2745-Obligations": {}, + "2746-Actions ou parts propres": {}, + "2748-Autres titres immobilis\u00e9s": {} + }, + "275-D\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "2751-D\u00e9p\u00f4ts pour loyers d\u2019avance": {}, + "2752-D\u00e9p\u00f4ts pour l\u2019\u00e9lectricit\u00e9": {}, + "2753-D\u00e9p\u00f4ts pour l\u2019eau": {}, + "2754-D\u00e9p\u00f4ts pour le gaz": {}, + "2755-D\u00e9p\u00f4ts pour le t\u00e9l\u00e9phone, le t\u00e9lex, la t\u00e9l\u00e9copie": {}, + "2756-Cautionnements sur march\u00e9s publics": {}, + "2757-Cautionnements sur autres op\u00e9rations": {}, + "2758-Autres d\u00e9p\u00f4ts et cautionnements": {} + }, + "276-Int\u00e9r\u00eats courus": { + "2761-Pr\u00eats et cr\u00e9ances non commerciales": {}, + "2762-Pr\u00eats au personnel": {}, + "2763-Cr\u00e9ances sur l\u2019\u00c9tat": {}, + "2764-Titres immobilis\u00e9s": {}, + "2765-D\u00e9p\u00f4ts et cautionnements vers\u00e9s": {}, + "2767-Cr\u00e9ances rattach\u00e9es \u00e0 des participations": {}, + "2768-Immobilisations financi\u00e8res diverses": {} + }, + "277-Cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": { + "2771-Cr\u00e9ances rattach\u00e9es \u00e0 des participations (groupe)": {}, + "2772-Cr\u00e9ances rattach\u00e9es \u00e0 des participations (hors groupe)": {}, + "2773-Cr\u00e9ances rattach\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": {}, + "2774-Avances \u00e0 des Groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": {} + }, + "278-Immobilisations financi\u00e8res diverses": { + "2781-Cr\u00e9ances diverses groupe": {}, + "2782-Cr\u00e9ances diverses hors groupe": {}, + "2784-Banques d\u00e9p\u00f4ts \u00e0 terme": {}, + "2785-Or et m\u00e9taux pr\u00e9cieux": {}, + "2788-Autres immobilisations financi\u00e8res": {} + } + }, + "28-Amortissements": { + "account_type": "Accumulated Depreciation", + "281-Amortissements des immobilisations corporelles": { + "account_type": "Accumulated Depreciation", + "2811-Amortissements des frais de d\u00e9veloppement": { + "account_type": "Accumulated Depreciation" + }, + "2812-Amortissements des brevets, licences, concessions et droits similaires": { + "account_type": "Accumulated Depreciation" + }, + "2813-Amortissements des logiciels et sites internet": { + "account_type": "Accumulated Depreciation" + }, + "2814-Amortissements des marques": { + "account_type": "Accumulated Depreciation" + }, + "2815-Amortissements du fonds commercial": { + "account_type": "Accumulated Depreciation" + }, + "2816-Amortissements du droit au bail": { + "account_type": "Accumulated Depreciation" + }, + "2817-Amortissements des investissements de cr\u00e9ation": { + "account_type": "Accumulated Depreciation" + }, + "2818-Amortissements des autres droits et valeurs incorporels": { + "account_type": "Accumulated Depreciation" + } + }, + "282-Amortissements des terrains": { + "2824-Amortissements des travaux de mise en valeur des terrains": {} + }, + "283-Amortissements des b\u00e2timents, installations techniques et agencements": { + "2831-Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": {}, + "2832-Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": {}, + "2833-Amortissements des ouvrages d\u2019infrastructure": {}, + "2834-Amortissements des am\u00e9nagements, agencements et installations techniques": {}, + "2835-Amortissements des am\u00e9nagements de bureaux": {}, + "2837-Amortissements des b\u00e2timents industriels, agricoles et commerciaux mis en concession": {}, + "2838-Amortissements des autres installations et agencements": {} + }, + "284-Amortissements du mat\u00e9riel": { + "2841-Amortissements du mat\u00e9riel et outillage industriel et commercial": {}, + "2842-Amortissements du mat\u00e9riel et outillage agricole": {}, + "2843-Amortissements du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "2844-Amortissements du mat\u00e9riel et mobilier": {}, + "2845-Amortissements du mat\u00e9riel de transport": {}, + "2846-Amortissements des actifs biologiques": {}, + "2847-Amortissements des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": {}, + "2848-Amortissements des autres mat\u00e9riels": {} + } + }, + "29-D\u00e9pr\u00e9ciations des immobilisations": { + "291-D\u00e9pr\u00e9ciations des immobilisations incorporelles": { + "2911-D\u00e9pr\u00e9ciations des frais de d\u00e9veloppement": {}, + "2912-D\u00e9pr\u00e9ciations des brevets, licences, concessions et droits similaires": {}, + "2913-D\u00e9pr\u00e9ciations des logiciels et sites internet": {}, + "2914-D\u00e9pr\u00e9ciations des marques": {}, + "2915-D\u00e9pr\u00e9ciations du fonds commercial": {}, + "2916-D\u00e9pr\u00e9ciations du droit au bail": {}, + "2917-D\u00e9pr\u00e9ciations des investissements de cr\u00e9ation": {}, + "2918-D\u00e9pr\u00e9ciations des autres droits et valeurs incorporels": {}, + "2919-D\u00e9pr\u00e9ciations des immobilisations incorporelles en cours": {} + }, + "292-D\u00e9pr\u00e9ciations des terrains": { + "2921-D\u00e9pr\u00e9ciations des terrains agricoles et forestiers": {}, + "2922-D\u00e9pr\u00e9ciations des terrains nus": {}, + "2923-D\u00e9pr\u00e9ciations des terrains b\u00e2tis": {}, + "2924-D\u00e9pr\u00e9ciations des travaux de mise en valeur des terrains": {}, + "2925-D\u00e9pr\u00e9ciations des terrains de gisement": {}, + "2926-D\u00e9pr\u00e9ciations des terrains am\u00e9nag\u00e9s": {}, + "2927-D\u00e9pr\u00e9ciations des terrains mis en concession": {}, + "2928-D\u00e9pr\u00e9ciations des autres terrains": {}, + "2929-D\u00e9pr\u00e9ciations des am\u00e9nagements de terrains en cours": {} + }, + "293-D\u00e9pr\u00e9ciations des b\u00e2timents, installations techniques et agencements": { + "2931-D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": {}, + "2932-D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": {}, + "2933-D\u00e9pr\u00e9ciations des ouvrages d\u2019infrastructures": {}, + "2934-D\u00e9pr\u00e9ciations des am\u00e9nagements, agencements et installations techniques": {}, + "2935-D\u00e9pr\u00e9ciations des am\u00e9nagements de bureaux": {}, + "2937-D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles et commerciaux mis en concession": {}, + "2938-D\u00e9pr\u00e9ciations des autres installations et agencements": {}, + "2939-D\u00e9pr\u00e9ciations des b\u00e2timents et installations en cours": {} + }, + "294-D\u00e9pr\u00e9ciations de mat\u00e9riel, du mobilier et de l\u2019actif biologique": { + "2941-D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage industriel et commercial": {}, + "2942-D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage agricole": {}, + "2943-D\u00e9pr\u00e9ciations du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "2944-D\u00e9pr\u00e9ciations du mat\u00e9riel et mobilier": {}, + "2945-D\u00e9pr\u00e9ciations du mat\u00e9riel de transport": {}, + "2946-D\u00e9pr\u00e9ciations des actifs biologiques": {}, + "2947-D\u00e9pr\u00e9ciations des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": {}, + "2948-D\u00e9pr\u00e9ciations des autres mat\u00e9riels": {}, + "2949-D\u00e9pr\u00e9ciations de mat\u00e9riel en cours": {} + }, + "295-D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations": { + "2951-D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations incorporelles": {}, + "2952-D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations corporelles": {} + }, + "296-D\u00e9pr\u00e9ciations des titres de participation": { + "2961-D\u00e9pr\u00e9ciations des titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": {}, + "2962-D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s sous contr\u00f4le conjoint": {}, + "2963-D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s conf\u00e9rant une influence notable": {}, + "2965-D\u00e9pr\u00e9ciations des participations dans des organismes professionnels": {}, + "2966-D\u00e9pr\u00e9ciations des parts dans des GIE": {}, + "2968-D\u00e9pr\u00e9ciations des autres titres de participation": {} + }, + "297-D\u00e9pr\u00e9ciations des autres immobilisations financi\u00e8res": { + "2971-D\u00e9pr\u00e9ciations des pr\u00eats et cr\u00e9ances": {}, + "2972-D\u00e9pr\u00e9ciations des pr\u00eats au personnel": {}, + "2973-D\u00e9pr\u00e9ciations des cr\u00e9ances sur l\u2019\u00c9tat": {}, + "2974-D\u00e9pr\u00e9ciations des titres immobilis\u00e9s": {}, + "2975-D\u00e9pr\u00e9ciations des d\u00e9p\u00f4ts et cautionnements vers\u00e9s": {}, + "2977-D\u00e9pr\u00e9ciations des cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": {}, + "2978-D\u00e9pr\u00e9ciations des cr\u00e9ances financi\u00e8res diverses": {} + } + }, + "root_type": "Asset" + }, + "3-Comptes de Stocks": { + "31-Marchandises": { + "311-Marchandises A": { + "3111-Marchandises A1": {}, + "3112-Marchandises A2": {} + }, + "312-Marchandises B": { + "3121-Marchandises B1": {}, + "3122-Marchandises B2": {} + }, + "313-Actifs biologiques": { + "3131-Animaux": {}, + "3132-V\u00e9g\u00e9taux": {} + }, + "318-Marchandises hors activit\u00e9s ordinaires (HAO)": {} + }, + "32-Mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "321-Mati\u00e8res A": {}, + "322-Mati\u00e8res B": {}, + "323-Fournitures (A, B)": {} + }, + "33-Autres approvisionnements": { + "331-Mati\u00e8res consommables": {}, + "332-Fournitures d\u2019atelier et d\u2019usine": {}, + "333-Fournitures de magasin": {}, + "334-Fournitures de bureau": {}, + "335-Emballages": { + "3351-Emballages perdus": {}, + "3352-Emballages r\u00e9cup\u00e9rables non identifiables": {}, + "3353-Emballages \u00e0 usage mixte": {}, + "3358-Autres emballages": {} + }, + "338-Autres mati\u00e8res": {} + }, + "34-Produits en cours": { + "341-Produits en cours": { + "3411-Produits en cours P1": {}, + "3412-Produits en cours P2": {} + }, + "342-Travaux en cours": { + "3421-Travaux en cours T1": {}, + "3422-Travaux en cours T2": {} + }, + "343-Produits interm\u00e9diaires en cours": { + "3431-Produits interm\u00e9diaires A": {}, + "3432-Produits interm\u00e9diaires B": {} + }, + "344-Produits r\u00e9siduels en cours": { + "3441-Produits r\u00e9siduels A": {}, + "3442-Produits r\u00e9siduels B": {} + }, + "345-Actifs biologiques en cours": { + "3451-Animaux": {}, + "3452-V\u00e9g\u00e9taux": {} + } + }, + "35-Services en cours": { + "351-\u00c9tudes en cours": { + "3511-\u00c9tudes en cours E1": {}, + "3512-\u00c9tudes en cours E2": {} + }, + "352-Prestations de services en cours": { + "3521-Prestations de services S1": {}, + "3522-Prestations de services S2": {} + } + }, + "36-Produits finis": { + "361-Produits finis A": {}, + "362-Produits finis B": {}, + "363-Actifs biologiques": { + "3631-Animaux": {}, + "3632-V\u00e9g\u00e9taux": {}, + "3638-Autres stocks (activit\u00e9s annexes)": {} + } + }, + "37-Produits interm\u00e9diaires et r\u00e9siduels": { + "371-Produits interm\u00e9diaires": { + "3711-Produits interm\u00e9diaires A": {}, + "3712-Produits interm\u00e9diaires B": {} + }, + "372-Produits r\u00e9siduels": { + "3721-D\u00e9chets": {}, + "3722-Rebuts": {}, + "3723-Mati\u00e8res de R\u00e9cup\u00e9ration": {} + }, + "373-Actifs biologiques": { + "3731-Animaux": {}, + "3732-V\u00e9g\u00e9taux": {}, + "3738-Autres stocks (activit\u00e9s annexes)": {} + } + }, + "38-Stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": { + "account_type": "Stock", + "381-Marchandises en cours de route": {}, + "382-Mati\u00e8res premi\u00e8res et fournitures li\u00e9es en cours de route": {}, + "383-Autres approvisionnements en cours de route": {}, + "386-Produits finis en cours de route": {}, + "387-Stock en consignation ou en d\u00e9p\u00f4t": { + "3871-Stock en consignation": {}, + "3872-Stock en d\u00e9p\u00f4t": {} + }, + "388-Stock provenant d\u2019immobilisations mises hors service ou au rebut": {} + }, + "39-D\u00e9pr\u00e9ciations des stocks et encours de production": { + "391-D\u00e9pr\u00e9ciations des stocks de marchandises": {}, + "392-D\u00e9pr\u00e9ciations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": {}, + "393-D\u00e9pr\u00e9ciations des stocks d\u2019autres approvisionnements": {}, + "394-D\u00e9pr\u00e9ciations des productions en cours": {}, + "395-D\u00e9pr\u00e9ciations des services en cours": {}, + "396-D\u00e9pr\u00e9ciations des stocks de produits finis": {}, + "397-D\u00e9pr\u00e9ciations des stocks de produits interm\u00e9diaires et r\u00e9siduels": {}, + "398-D\u00e9pr\u00e9ciations des stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": {} + }, + "root_type": "Asset" + }, + "4-Comptes de Tiers (ACTIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (ACTIF)": { + "409-Fournisseurs d\u00e9biteurs": { + "4091-Fournisseurs Avances et acomptes vers\u00e9s": {}, + "4092-Fournisseurs Groupe avances et acomptes vers\u00e9s": {}, + "4093-Fournisseurs Sous-traitants avances et acomptes vers\u00e9s": {}, + "4094-Fournisseurs Cr\u00e9ances pour emballages et mat\u00e9riels \u00e0 rendre": {}, + "4098-Fournisseurs Rabais, remises, ristournes et autres avoirs \u00e0 obtenir": {} + } + }, + "41-Clients et comptes rattach\u00e9s (ACTIF)": { + "411-Clients": { + "4111-Clients": { + "account_type": "Receivable" + }, + "4112-Clients groupe": { + "account_type": "Receivable" + }, + "4114-Clients, \u00c9tat et Collectivit\u00e9s publiques": { + "account_type": "Receivable" + }, + "4115-Clients, organismes internationaux": { + "account_type": "Receivable" + }, + "4116-Clients, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Receivable" + }, + "4117-Client, retenues de garantie": { + "account_type": "Receivable" + }, + "4118-Clients, d\u00e9gr\u00e8vement de taxes sur la valeur ajout\u00e9e (TVA)": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "412-Clients, effets \u00e0 recevoir en portefeuille": { + "4121-Clients, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "4122-Clients Groupe, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "4124-\u00c9tat et Collectivit\u00e9s publiques, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "4125-Organismes Internationaux, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "413-Clients, ch\u00e8ques, effets et autres valeurs impay\u00e9es": { + "4131-Clients, ch\u00e8ques impay\u00e9s": { + "account_type": "Receivable" + }, + "4132-Clients, effets impay\u00e9s": { + "account_type": "Receivable" + }, + "4133-Clients, cartes de cr\u00e9dit impay\u00e9es": { + "account_type": "Receivable" + }, + "4138-Clients, autres valeurs impay\u00e9es": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "414-Cr\u00e9ances sur cessions courantes d\u2019immobilisations": { + "4141-Cr\u00e9ances en compte, immobilisations incorporelles": { + "account_type": "Receivable" + }, + "4142-Cr\u00e9ances en compte, immobilisations corporelles": { + "account_type": "Receivable" + }, + "4146-Effets \u00e0 recevoir, immobilisations incorporelles": { + "account_type": "Receivable" + }, + "4147-Effets \u00e0 recevoir, immobilisations corporelles": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "415-Clients, effets escompt\u00e9s non \u00e9chus": { + "account_type": "Receivable" + }, + "416-Cr\u00e9ances clients litigieuses ou douteuses": { + "4161-Cr\u00e9ances litigieuses": { + "account_type": "Receivable" + }, + "4162-Cr\u00e9ances douteuses": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "418-Clients, produits \u00e0 recevoir": { + "4181-Clients, factures \u00e0 \u00e9tablir": { + "account_type": "Receivable" + }, + "4186-Clients, int\u00e9r\u00eats courus": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "42-Personnel (ACTIF)": { + "421-Personnel, avances et acomptes": { + "4211-Personnel, avances": {}, + "4212-Personnel, acomptes": {}, + "4213-Frais avanc\u00e9s et fournitures au personnel": {} + } + }, + "43-Organismes sociaux (ACTIF)": { + "431-S\u00e9curit\u00e9 sociale": { + "4311-Prestations familiales": {}, + "4312-Accidents de travail": {}, + "4313-Caisse de retraite obligatoire": {}, + "4314-Caisse de retraite facultative": {}, + "4318-Autres cotisations sociales": {} + }, + "432-Caisses de retraite compl\u00e9mentaire": {}, + "433-Autres organismes sociaux": { + "4331-Mutuelle": {}, + "4332-Assurances retraite": {}, + "4333-Assurances et organismes de sant\u00e9": {} + }, + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "4387-Produits \u00e0 recevoir": {} + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (ACTIF)": { + "443-\u00c9tat, TVA factur\u00e9e": { + "4431-TVA factur\u00e9e sur ventes": {}, + "4432-TVA factur\u00e9e sur prestations de services": {}, + "4433-TVA factur\u00e9e sur travaux": {}, + "4434-TVA factur\u00e9e sur production livr\u00e9e \u00e0 soi-m\u00eame": {}, + "4435-TVA sur factures \u00e0 \u00e9tablir": {} + }, + "445-\u00c9tat, TVA r\u00e9cup\u00e9rable": { + "4451-TVA r\u00e9cup\u00e9rable sur immobilisations": {}, + "4452-TVA r\u00e9cup\u00e9rable sur achats": {}, + "4453-TVA r\u00e9cup\u00e9rable sur transport": {}, + "4454-TVA r\u00e9cup\u00e9rable sur services ext\u00e9rieurs et autres charges": {}, + "4455-TVA r\u00e9cup\u00e9rable sur factures non parvenues": {}, + "4456-TVA transf\u00e9r\u00e9e par d\u2019autres entit\u00e9s": {} + }, + "448-\u00c9tat, charges \u00e0 payer et produits \u00e0 recevoir": { + "4486-Charges \u00e0 payer": {}, + "4487-Produits \u00e0 recevoir": {} + }, + "449-\u00c9tat, cr\u00e9ances et dettes diverses": { + "4491-\u00c9tat, obligations cautionn\u00e9es": {}, + "4492-\u00c9tat, avances et acomptes vers\u00e9s sur imp\u00f4ts": {}, + "4493-\u00c9tat, fonds de dotation \u00e0 recevoir": {}, + "4494-\u00c9tat, subventions investissement \u00e0 recevoir": {}, + "4495-\u00c9tat, subventions d\u2019exploitation \u00e0 recevoir": {}, + "4496-\u00c9tat, subventions d\u2019\u00e9quilibre \u00e0 recevoir": {}, + "4497-\u00c9tat, avances sur subventions": {}, + "4499-\u00c9tat, fonds r\u00e9glement\u00e9s provisionn\u00e9s": {} + } + }, + "45-Organismes internationaux (ACTIF)": { + "451-Op\u00e9rations avec les organismes africains": {}, + "452-Op\u00e9rations avec les autres organismes internationaux": {}, + "458-Organismes internationaux, fonds de dotation et subventions \u00e0 recevoir": { + "4581-Organismes internationaux, fonds de dotation \u00e0 recevoir": {}, + "4582-Organismes internationaux, subventions \u00e0 recevoir": {} + } + }, + "46-Apporteurs, associ\u00e9s et groupe (ACTIF)": { + "461-Apporteurs, op\u00e9rations sur le capital": { + "4613-Apporteurs, capital appel\u00e9, non vers\u00e9": {}, + "4614-Apporteurs, compte d\u2019apport, op\u00e9rations de restructuration (fusion...)": {}, + "4618-Apporteurs, titres \u00e0 \u00e9changer": {} + }, + "467-Apporteurs, restant d\u00fb sur capital appel\u00e9": {} + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (ACTIF)": { + "472-Cr\u00e9ances et dettes sur titres de placement": { + "4721-Cr\u00e9ances sur cessions de titres de placement": {}, + "4726-Versements restant \u00e0 effectuer sur titres de placement non lib\u00e9r\u00e9s": {} + }, + "473-Interm\u00e9diaires Op\u00e9rations faites pour compte de tiers": { + "4731-Mandants": {}, + "4732-Mandataires": {}, + "4733-Commettants": {}, + "4734-Commissionnaires": {}, + "4739-\u00c9tat, Collectivit\u00e9s publiques, fonds global d\u2019allocation": {} + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits": { + "4747-Compte de r\u00e9partition p\u00e9riodique des produits": {} + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA": { + "4751-Compte actif": { + "account_type": "Temporary" + } + }, + "476-Charges constat\u00e9es d\u2019avance": {}, + "478-\u00c9carts de conversion actif": { + "4781-Diminution des cr\u00e9ances d\u2019exploitation": {}, + "4782-Diminution des cr\u00e9ances financi\u00e8res": {}, + "4783-Augmentation des dettes d\u2019exploitation": {}, + "4784-Augmentation des dettes financi\u00e8res": {}, + "4786-Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": {}, + "4788-Diff\u00e9rences compens\u00e9es par couverture de change": {} + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (ACTIF)": { + "485-Cr\u00e9ances sur cessions d\u2019immobilisations": { + "4851-En compte, immobilisations incorporelles": {}, + "4852-En compte, immobilisations corporelles": {}, + "4853-Effets \u00e0 recevoir, immobilisations incorporelles": {}, + "4854-Effets \u00e0 recevoir, immobilisations corporelles": {}, + "4855-Effets escompt\u00e9s non \u00e9chus": {}, + "4857-Retenues de garantie": {}, + "4858-Factures \u00e0 \u00e9tablir": {} + }, + "488-Autres cr\u00e9ances hors activit\u00e9s ordinaires (HAO)": {} + }, + "49-D\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme (tiers) (ACTIF)": { + "491-D\u00e9pr\u00e9ciations des comptes clients": { + "4911-Cr\u00e9ances litigieuses": {}, + "4912-Cr\u00e9ances douteuses": {} + }, + "495-D\u00e9pr\u00e9ciations des comptes organismes internationaux": {}, + "496-D\u00e9pr\u00e9ciations des comptes apporteurs, associ\u00e9s et groupe": { + "4962-Associ\u00e9s, comptes courants": {}, + "4963-Associ\u00e9s, op\u00e9rations faites en commun": {}, + "4966-Groupe, comptes courants": {} + }, + "497-D\u00e9pr\u00e9ciations des comptes d\u00e9biteurs divers": {}, + "498-D\u00e9pr\u00e9ciations des comptes de cr\u00e9ances HAO": { + "4985-Cr\u00e9ances sur cessions d\u2019immobilisations": {}, + "4986-Cr\u00e9ances sur cessions de titres de placement": {}, + "4988-Autres cr\u00e9ances HAO": {} + }, + "499-Provisions pour risques \u00e0 court terme": { + "4991-Sur op\u00e9rations d\u2019exploitation": {}, + "4997-Sur op\u00e9rations financi\u00e8res": {}, + "4998-Sur op\u00e9rations HAO": {} + } + }, + "root_type": "Asset" + }, + "4-Comptes de Tiers (PASSIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (PASSIF)": { + "401-Fournisseurs, dettes en compte": { + "4011-Fournisseurs": { + "account_type": "Payable" + }, + "4012-Fournisseurs groupe": { + "account_type": "Payable" + }, + "4013-Fournisseurs sous-traitants": { + "account_type": "Payable" + }, + "4016-Fournisseurs, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Payable" + }, + "4017-Fournisseur, retenues de garantie": { + "account_type": "Payable" + }, + "account_type": "Payable" + }, + "402-Fournisseurs, effets \u00e0 payer": { + "4021-Fournisseurs Effets \u00e0 payer": { + "account_type": "Payable" + }, + "4022-Fournisseurs Groupe, effets \u00e0 payer": { + "account_type": "Payable" + }, + "4023-Fournisseurs Sous-traitants, effets \u00e0 payer": { + "account_type": "Payable" + }, + "account_type": "Payable" + }, + "404-Fournisseurs, acquisitions courantes d\u2019immobilisations": { + "4041-Fournisseurs Dettes en comptes, immobilisations incorporelles": { + "account_type": "Payable" + }, + "4042-Fournisseurs Dettes en comptes, immobilisations corporelles": { + "account_type": "Payable" + }, + "4046-Fournisseurs Effets \u00e0 payer, immobilisations incorporelles": { + "account_type": "Payable" + }, + "4047-Fournisseurs Effets \u00e0 payer, immobilisations corporelles": { + "account_type": "Payable" + }, + "account_type": "Payable" + }, + "408-Fournisseurs, factures non parvenues": { + "4081-Fournisseurs": { + "account_type": "Stock Received But Not Billed" + }, + "4082-Fournisseurs groupe": { + "account_type": "Stock Received But Not Billed" + }, + "4083-Fournisseurs sous-traitants": { + "account_type": "Stock Received But Not Billed" + }, + "4086-Fournisseurs, int\u00e9r\u00eats courus": { + "account_type": "Stock Received But Not Billed" + }, + "account_type": "Stock Received But Not Billed" + }, + "account_type": "Payable" + }, + "41-Clients et comptes rattach\u00e9s (PASSIF)": { + "419-Clients cr\u00e9diteurs": { + "4191-Clients, avances et acomptes re\u00e7us": {}, + "4192-Clients groupe, avances et acomptes re\u00e7us": {}, + "4194-Clients, dettes pour emballages et mat\u00e9riels consign\u00e9s": {}, + "4198-Clients, rabais, remises, ristournes et autres avoirs \u00e0 accorder": {} + } + }, + "42-Personnel (PASSIF)": { + "422-Personnel, r\u00e9mun\u00e9rations dues": {}, + "423-Personnel, oppositions, saisies-arr\u00eats": { + "4231-Personnel, oppositions": {}, + "4232-Personnel, saisies-arr\u00eats": {}, + "4233-Personnel, avis \u00e0 tiers d\u00e9tenteur": {} + }, + "424-Personnel, \u0153uvres sociales internes": { + "4241-Assistance m\u00e9dicale": {}, + "4242-Allocations familiales": {}, + "4245-Organismes sociaux rattach\u00e9s \u00e0 l\u2019entit\u00e9": {}, + "4248-Autres \u0153uvres sociales internes": {} + }, + "425-Repr\u00e9sentants du personnel": { + "4251-D\u00e9l\u00e9gu\u00e9s du personnel": {}, + "4252-Syndicats et Comit\u00e9s d\u2019entreprises, d\u2019\u00c9tablissement": {}, + "4258-Autres repr\u00e9sentants du personnel": {} + }, + "426-Personnel, participation aux b\u00e9n\u00e9fices et au capital": { + "4261-Participation aux b\u00e9n\u00e9fices": {}, + "4264-Participation au capital": {} + }, + "427-Personnel d\u00e9p\u00f4ts": {}, + "428-Personnel, charges \u00e0 payer et produits \u00e0 recevoir": { + "4281-Dettes provisionn\u00e9es pour cong\u00e9s \u00e0 payer": {}, + "4286-Autres charges \u00e0 payer": {}, + "4287-Produits \u00e0 recevoir": {} + } + }, + "43-Organismes sociaux (PASSIF)": { + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "4381-Charges sociales sur gratifications \u00e0 payer": {}, + "4382-Charges sociales sur cong\u00e9s \u00e0 payer": {}, + "4386-Autres charges \u00e0 payer": {} + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (PASSIF)": { + "441-\u00c9tat, imp\u00f4t sur les b\u00e9n\u00e9fices": {}, + "442-\u00c9tat, autres imp\u00f4ts et taxes": { + "4421-Imp\u00f4ts et taxes d\u2019\u00c9tat": {}, + "4422-Imp\u00f4ts et taxes pour les collectivit\u00e9s publiques": {}, + "4423-Imp\u00f4ts et taxes recouvrables sur des obligataires": {}, + "4424-Imp\u00f4ts et taxes recouvrables sur des associ\u00e9s": {}, + "4426-Droits de douane": {}, + "4428-Autres imp\u00f4ts et taxes": {} + }, + "444-\u00c9tat, TVA due ou cr\u00e9dit de TVA": { + "4441-\u00c9tat, TVA due": {}, + "4449-\u00c9tat, cr\u00e9dit de TVA \u00e0 reporter": {} + }, + "446-\u00c9tat, autres taxes sur le chiffre d\u2019affaires": {}, + "447-\u00c9tat, imp\u00f4ts retenus \u00e0 la source": { + "4471-Imp\u00f4t G\u00e9n\u00e9ral sur le revenu": {}, + "4472-Imp\u00f4ts sur salaires": {}, + "4473-Contribution nationale": {}, + "4474-Contribution nationale de solidarit\u00e9": {}, + "4478-Autres imp\u00f4ts et contributions": {} + } + }, + "46-Apporteurs, associ\u00e9s et groupe (PASSIF)": { + "461-Apporteurs, op\u00e9rations sur le capital (PASSIF)": { + "4611-Apporteurs, apports en nature": {}, + "4612-Apporteurs, apports en num\u00e9raire": {}, + "4615-Apporteurs, versements re\u00e7us sur augmentation de capital": {}, + "4616-Apporteurs, versements anticip\u00e9s": {}, + "4617-Apporteurs d\u00e9faillants": {}, + "4619-Apporteurs, capital \u00e0 rembourser": {} + }, + "462-Associ\u00e9s, comptes courants": { + "4621-Principal": {}, + "4626-Int\u00e9r\u00eats courus": {} + }, + "463-Associ\u00e9s, op\u00e9rations faites en commun et GIE": { + "4631-Op\u00e9rations courantes": {}, + "4636-Int\u00e9r\u00eats courus": {} + }, + "465-Associ\u00e9s, dividendes \u00e0 payer": {}, + "466-Groupe, comptes courants": {} + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (PASSIF)": { + "471-D\u00e9biteurs et cr\u00e9diteurs divers": { + "4711-D\u00e9biteurs divers": {}, + "4712-Cr\u00e9diteurs divers": {}, + "4713-Obligataires": {}, + "4715-R\u00e9mun\u00e9rations d\u2019administrateurs": {}, + "4716-Compte d\u2019affacturage": {}, + "4717-D\u00e9biteurs divers retenues de garantie": {}, + "4718-Apport, compte de fusion et op\u00e9rations assimil\u00e9es": {}, + "4719-Bons de souscription d\u2019actions et d\u2019obligations": {} + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits (PASSIF)": { + "4746-Compte de r\u00e9partition p\u00e9riodique des charges": {} + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA (PASSIF)": { + "4752-Compte passif": {} + }, + "477-Produits constat\u00e9s d\u2019avance": {}, + "479-\u00c9carts de conversion passif": { + "4791-Augmentation des cr\u00e9ances d\u2019exploitation": {}, + "4792-Augmentation des cr\u00e9ances financi\u00e8res": {}, + "4793-Diminution des dettes d\u2019exploitation": {}, + "4794-Diminution des dettes financi\u00e8res": {}, + "4797-Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": {}, + "4798-Diff\u00e9rences compens\u00e9es par couverture de change": {} + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (HAO) (PASSIF)": { + "481-Fournisseurs d\u2019investissements": { + "4811-Immobilisations incorporelles": {}, + "4812-Immobilisations corporelles": {}, + "4813-Versements restant \u00e0 effectuer sur titres de participation et titres immobilis\u00e9s non lib\u00e9r\u00e9s": {}, + "4816-R\u00e9serve de propri\u00e9t\u00e9": {}, + "4817-Retenues de garantie": {}, + "4818-Factures non parvenues": {} + }, + "482-Fournisseurs d\u2019investissements, effets \u00e0 payer": { + "4821-Immobilisations incorporelles": {}, + "4822-Immobilisations corporelles": {} + }, + "484-Autres dettes hors activit\u00e9s ordinaires (HAO)": { + "4887-Produits": {} + } + }, + "49-D\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme (tiers) (PASSIF)": { + "490-D\u00e9pr\u00e9ciations des comptes fournisseurs": {}, + "492-D\u00e9pr\u00e9ciations des comptes personnel": {}, + "493-D\u00e9pr\u00e9ciations des comptes organismes sociaux": {}, + "494-D\u00e9pr\u00e9ciations des comptes \u00c9tat et collectivit\u00e9s publiques": {}, + "495-D\u00e9pr\u00e9ciations des comptes organismes internationaux": {} + }, + "root_type": "Liability" + }, + "5-Comptes de tr\u00e9sorerie": { + "50-Titres de placement": { + "501-Titres du tr\u00e9sor et bons de caisse \u00e0 court terme": { + "5011-Titres du Tr\u00e9sor \u00e0 court terme": {}, + "5012-Titres d\u2019organismes financiers": {}, + "5013-Bons de caisse \u00e0 court terme": {}, + "5016-Frais d\u2019acquisition des titres de tr\u00e9sor et bons de caisse": {} + }, + "502-Actions": { + "5021-Actions ou parts propres": {}, + "5022-Actions cot\u00e9es": {}, + "5023-Actions non cot\u00e9es": {}, + "5024-Actions d\u00e9membr\u00e9es (certificats d\u2019investissement, droits de vote)": {}, + "5025-Autres actions": {}, + "5026-Frais d\u2019acquisition des actions": {} + }, + "503-Obligations": { + "5031-Obligations \u00e9mises par la soci\u00e9t\u00e9 et rachet\u00e9es par elle": {}, + "5032-Obligations cot\u00e9es": {}, + "5033-Obligations non cot\u00e9es": {}, + "5035-Autres obligations": {}, + "5036-Frais d\u2019acquisition des obligations": {} + }, + "504-Bons de souscription": { + "5042-Bons de souscription d\u2019actions": {}, + "5043-Bons de souscription d\u2019obligations": {} + }, + "505-Titres n\u00e9gociables hors r\u00e9gion": {}, + "506-Int\u00e9r\u00eats courus": { + "5061-Titres du Tr\u00e9sor et bons de caisse \u00e0 court terme": {}, + "5062-Actions": {}, + "5063-Obligations": {} + }, + "508-Autres titres de placement et cr\u00e9ances assimil\u00e9es": {} + }, + "51-Valeurs \u00e0 encaisser": { + "511-Effets \u00e0 encaisser": {}, + "512-Effets \u00e0 l\u2019encaissement": {}, + "513-Ch\u00e8ques \u00e0 encaisser": {}, + "514-Ch\u00e8ques \u00e0 l\u2019encaissement": {}, + "515-Cartes de cr\u00e9dit \u00e0 encaisser": {}, + "518-Autres valeurs \u00e0 l\u2019encaissement": { + "5181-Warrants": {}, + "5182-Billets de fonds": {}, + "5185-Ch\u00e8ques de voyage": {}, + "5186-Coupons \u00e9chus": {}, + "5187-Int\u00e9r\u00eats \u00e9chus des obligations": {} + } + }, + "52-Banques": { + "521-Banques locales": { + "5211-Banques en monnaie nationale": { + "account_type": "Bank" + }, + "5215-Banques en devises": { + "account_type": "Bank" + }, + "account_type": "Bank" + }, + "522-Banques autres \u00c9tats r\u00e9gion": {}, + "523-Banques autres \u00c9tats zone mon\u00e9taire": {}, + "524-Banques hors zone mon\u00e9taire": {}, + "525-Banques d\u00e9p\u00f4t \u00e0 terme": {}, + "526-Banques, int\u00e9r\u00eats courus": { + "5261-Banque, int\u00e9r\u00eats courus, charges \u00e0 payer": {}, + "5267-Banque, int\u00e9r\u00eats courus, produits \u00e0 recevoir": {} + } + }, + "53-\u00c9tablissements financiers et assimil\u00e9s": { + "531-Ch\u00e8ques postaux": {}, + "532-Tr\u00e9sor": {}, + "533-Soci\u00e9t\u00e9s de gestion et d\u2019interm\u00e9diation (SGI)": {}, + "536-\u00c9tablissements financiers, int\u00e9r\u00eats courus": {}, + "538-Autres organismes financiers": {} + }, + "54-Instruments de tr\u00e9sorerie": { + "541-Options de taux d\u2019int\u00e9r\u00eat": {}, + "542-Options de taux de change": {}, + "543-Options de taux boursiers": {}, + "544-Instruments de march\u00e9s \u00e0 terme": {}, + "545-Avoirs d\u2019or et autres m\u00e9taux pr\u00e9cieux": {} + }, + "55-Instruments de monnaie \u00e9lectronique": { + "551-Monnaie \u00e9lectronique carte carburant": {}, + "552-Monnaie \u00e9lectronique t\u00e9l\u00e9phone portable": {}, + "553-Monnaie \u00e9lectronique carte p\u00e9age": {}, + "554-Porte-monnaie \u00e9lectronique": {}, + "558-Autres instruments de monnaies \u00e9lectroniques": {} + }, + "56-Banques, cr\u00e9dits de tr\u00e9sorerie et d\u2019escompte": { + "561-Cr\u00e9dits de tr\u00e9sorerie": {}, + "564-Escompte de cr\u00e9dits de campagne": {}, + "565-Escompte de cr\u00e9dits ordinaires": {}, + "566-Banques, cr\u00e9dits de tr\u00e9sorerie, int\u00e9r\u00eats courus": {} + }, + "57-Caisse": { + "571-Caisse si\u00e8ge social": { + "5711-Caisse en monnaie nationale": {}, + "5712-Caisse en devises": {} + }, + "572-Caisse succursale A": { + "5721-En monnaie nationale": {}, + "5722-En devises": {} + }, + "573-Caisse succursale B": { + "5731-En monnaie nationale": {}, + "5732-En devises": {} + } + }, + "58-R\u00e9gies d\u2019avances, accr\u00e9ditifs et virements internes": { + "581-R\u00e9gies d\u2019avance": {}, + "582-Accr\u00e9ditifs": {}, + "585-Virements de fonds": {}, + "588-Autres virements internes": {} + }, + "59-D\u00e9pr\u00e9ciations et provisions pour risque \u00e0 court terme": { + "590-D\u00e9pr\u00e9ciations des titres de placement": {}, + "591-D\u00e9pr\u00e9ciations des titres et valeurs \u00e0 encaisser": {}, + "592-D\u00e9pr\u00e9ciations des comptes banques": {}, + "593-D\u00e9pr\u00e9ciations des comptes \u00e9tablissements financiers et assimil\u00e9s": {}, + "594-D\u00e9pr\u00e9ciations des comptes d\u2019instruments de tr\u00e9sorerie": {}, + "599-Provisions pour risque \u00e0 court terme \u00e0 caract\u00e8re financier": {} + }, + "root_type": "Asset" + }, + "6-Comptes de charges des activit\u00e9s ordinaires": { + "60-Achats et variations de stocks": { + "601-Achats de marchandises": { + "6011-Dans la R\u00e9gion": {}, + "6012-Hors R\u00e9gion": {}, + "6013-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "6014-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "6015-Frais sur achats": {}, + "6019-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "602-Achats de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "6021-Dans la R\u00e9gion": {}, + "6022-Hors R\u00e9gion": {}, + "6023-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "6024-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "6025-Frais sur achats": {}, + "6029-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "603-Variations des stocks de biens achet\u00e9s": { + "6031-Variations des stocks de marchandises": {}, + "6032-Variations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": {}, + "6033-Variations des stocks d\u2019autres approvisionnements": {} + }, + "604-Achats stock\u00e9s de mati\u00e8res et fournitures consommables": { + "6041-Mati\u00e8res consommables": {}, + "6042-Mati\u00e8res combustibles": {}, + "6043-Produits d\u2019entretien": {}, + "6044-Fournitures d\u2019atelier et d\u2019usine": {}, + "6045-Frais sur achat": {}, + "6046-Fournitures de magasin": {}, + "6047-Fournitures de bureau": {}, + "6049-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "605-Autres achats": { + "6051-Fournitures non stockables Eau": {}, + "6052-Fournitures non stockables \u00c9lectricit\u00e9": {}, + "6053-Fournitures non stockables Autres \u00e9nergies": {}, + "6054-Fournitures d\u2019entretien non stockables": {}, + "6055-Fournitures de bureau non stockables": {}, + "6056-Achats de petit mat\u00e9riel et outillage": {}, + "6057-Achats d\u2019\u00e9tudes et prestations de services": {}, + "6058-Achats de travaux, mat\u00e9riels et \u00e9quipements": {}, + "6059-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "608-Achats d\u2019emballages": { + "6081-Emballages perdus": {}, + "6082-Emballages r\u00e9cup\u00e9rables non identifiables": {}, + "6083-Emballages \u00e0 usage mixte": {}, + "6085-Frais sur achats": {}, + "6089-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + } + }, + "61-Transports": { + "612-Transports sur ventes": {}, + "613-Transports pour le compte de tiers": {}, + "614-Transports du personnel": {}, + "616-Transports de plis": {}, + "618-Autres frais de transport": { + "6181-Voyages et d\u00e9placements": {}, + "6182-Transports entre \u00e9tablissements ou chantiers": {}, + "6183-Transports administratifs": {} + } + }, + "62-Services ext\u00e9rieurs": { + "621-Sous-traitance g\u00e9n\u00e9rale": {}, + "622-Locations, charges locatives": { + "6221-Locations de terrains": {}, + "6222-Locations de b\u00e2timents": {}, + "6223-Locations de mat\u00e9riels et outillages": {}, + "6224-Malis sur emballages": {}, + "6225-Locations d\u2019emballages": {}, + "6226-Fermages et loyers du foncier": {}, + "6228-Locations et charges locatives diverses": {} + }, + "623-Redevances de location acquisition": { + "6232-Cr\u00e9dit-bail immobilier": {}, + "6233-Cr\u00e9dit-bail mobilier": {}, + "6234-Location-vente": {}, + "6238-Autres contrats de location acquisition": {} + }, + "624-Entretien, r\u00e9parations, remise en \u00e9tat et maintenance": { + "6241-Entretien et r\u00e9parations des biens immobiliers": {}, + "6242-Entretien et r\u00e9parations des biens mobiliers": {}, + "6243-Maintenance": {}, + "6244-Charges de d\u00e9mant\u00e8lement et remise en \u00e9tat": {}, + "6248-Autres entretiens et r\u00e9parations": {} + }, + "625-Primes d\u2019assurance": { + "6251-Assurances multirisques": {}, + "6252-Assurances mat\u00e9riel de transport": {}, + "6253-Assurances risques d\u2019exploitation": {}, + "6254-Assurances responsabilit\u00e9 du producteur": {}, + "6255-Assurances insolvabilit\u00e9 clients": {}, + "6257-Assurances transport sur ventes": {}, + "6258-Autres primes d\u2019assurances": {} + }, + "626-\u00c9tudes, recherches et documentation": { + "6261-\u00c9tudes et recherches": {}, + "6265-Documentation g\u00e9n\u00e9rale": {}, + "6266-Documentation technique": {} + }, + "627-Publicit\u00e9, publications, relations publiques": { + "6271-Annonces, insertions": {}, + "6272-Catalogues, imprim\u00e9s publicitaires": {}, + "6273-\u00c9chantillons": {}, + "6274-Foires et expositions": {}, + "6275-Publications": {}, + "6276-Cadeaux \u00e0 la client\u00e8le": {}, + "6277-Frais de colloques, s\u00e9minaires, conf\u00e9rences": {}, + "6278-Autres charges de publicit\u00e9 et relations publiques": {} + }, + "628-Frais de t\u00e9l\u00e9communications": { + "6281-Frais de t\u00e9l\u00e9phone": {}, + "6282-Frais de t\u00e9lex": {}, + "6283-Frais de t\u00e9l\u00e9copie": {}, + "6288-Autres frais de t\u00e9l\u00e9communications": {} + } + }, + "63-Autres services ext\u00e9rieurs": { + "631-Frais bancaires": { + "6311-Frais sur titres (vente, garde)": {}, + "6312-Frais sur effets": {}, + "6313-Location de coffres": {}, + "6314-Commissions d\u2019affacturage": {}, + "6315-Commissions sur cartes de cr\u00e9dit": {}, + "6316-Frais d\u2019\u00e9mission d\u2019emprunts": {}, + "6317-Frais sur instruments monnaie \u00e9lectronique": {}, + "6318-Autres frais bancaires": {} + }, + "632-R\u00e9mun\u00e9rations d\u2019interm\u00e9diaires et de conseils": { + "6322-Commissions et courtages sur ventes": {}, + "6324-Honoraires des professions r\u00e9glement\u00e9es": {}, + "6325-Frais d\u2019actes et de contentieux": {}, + "6326-R\u00e9mun\u00e9rations d\u2019affacturage": {}, + "6327-R\u00e9mun\u00e9rations des autres prestataires de services": {}, + "6328-Divers frais": {} + }, + "633-Frais de formation du personnel": {}, + "634-Redevances pour brevets, licences, logiciels, concessions et droits et valeurs similaires": { + "6342-Redevances pour brevets, licences": {}, + "6343-Redevances pour logiciels": {}, + "6344-Redevances pour marques": {}, + "6345-Redevances pour sites internet": {}, + "6346-Redevances pour concessions, droits et valeurs similaires": {} + }, + "635-Cotisations": { + "6351-Cotisations": {}, + "6358-Concours divers": {} + }, + "637-R\u00e9mun\u00e9rations de personnel ext\u00e9rieur \u00e0 l\u2019entit\u00e9": { + "6371-Personnel int\u00e9rimaire": {}, + "6372-Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": {} + }, + "638-Autres charges externes": { + "6381-Frais de recrutement du personnel": {}, + "6382-Frais de d\u00e9m\u00e9nagement": {}, + "6383-R\u00e9ceptions": {}, + "6384-Missions": {}, + "6385-Charges de copropri\u00e9t\u00e9": {} + } + }, + "64-Imp\u00f4ts et taxes": { + "641-Imp\u00f4ts et taxes directs": { + "6411-Imp\u00f4ts fonciers et taxes annexes": {}, + "6412-Patentes, licences et taxes annexes": {}, + "6413-Taxes sur appointements et salaires": {}, + "6414-Taxes d\u2019apprentissage": {}, + "6415-Formation professionnelle continue": {}, + "6418-Autres imp\u00f4ts et taxes directs": {} + }, + "645-Imp\u00f4ts et taxes indirects": {}, + "646-Droits d\u2019enregistrement": { + "6461-Droits de mutation": {}, + "6462-Droits de timbre": {}, + "6463-Taxes sur les v\u00e9hicules de soci\u00e9t\u00e9": {}, + "6464-Vignettes": {}, + "6468-Autres droits": {} + }, + "647-P\u00e9nalit\u00e9s, amendes fiscales": { + "6471-P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts directs": {}, + "6472-P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts indirects": {}, + "6473-P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts directs": {}, + "6474-P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts indirects": {}, + "6478-Autres p\u00e9nalit\u00e9s et amendes fiscales": {} + }, + "648-Autres imp\u00f4ts et taxes": {} + }, + "65-Autres charges": { + "651-Pertes sur cr\u00e9ances clients et autres d\u00e9biteurs": { + "6511-Clients": {}, + "6515-Autres d\u00e9biteurs": {} + }, + "652-Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "6521-Quote-part transf\u00e9r\u00e9e de b\u00e9n\u00e9fices (comptabilit\u00e9 du g\u00e9rant)": {}, + "6525-Pertes imput\u00e9es par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": {} + }, + "654-Valeurs comptables des cessions courantes d\u2019immobilisations": { + "6541-Immobilisations incorporelles": {}, + "6542-Immobilisations corporelles": {} + }, + "656-Perte de change sur cr\u00e9ances et dettes commerciale": {}, + "657-P\u00e9nalit\u00e9s et amendes p\u00e9nales": {}, + "658-Charges diverses": { + "6581-Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": {}, + "6582-Dons": {}, + "6583-M\u00e9c\u00e9nat": {}, + "6588-Autres charges diverses": {} + }, + "659-Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "6591-Sur risques \u00e0 court terme": {}, + "6593-Sur stocks": {}, + "6594-Sur cr\u00e9ances": {}, + "6598-Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme": {} + } + }, + "66-Charges de personnel": { + "661-R\u00e9mun\u00e9rations directes vers\u00e9es au personnel national": { + "6611-Appointements salaires et commissions": {}, + "6612-Primes et gratifications": {}, + "6613-Cong\u00e9s pay\u00e9s": {}, + "6614-Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": {}, + "6615-Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": {}, + "6616-Suppl\u00e9ment familial": {}, + "6617-Avantages en nature": {}, + "6618-Autres r\u00e9mun\u00e9rations directes": {} + }, + "662-R\u00e9mun\u00e9rations directes vers\u00e9es au personnel non national": { + "6621-Appointements salaires et commissions": {}, + "6622-Primes et gratifications": {}, + "6623-Cong\u00e9s pay\u00e9s": {}, + "6624-Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": {}, + "6625-Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": {}, + "6626-Suppl\u00e9ment familial": {}, + "6627-Avantages en nature": {}, + "6628-Autres r\u00e9mun\u00e9rations directes": {} + }, + "663-Indemnit\u00e9s forfaitaires vers\u00e9es au personnel": { + "6631-Indemnit\u00e9s de logement": {}, + "6632-Indemnit\u00e9s de repr\u00e9sentation": {}, + "6633-Indemnit\u00e9s d\u2019expatriation": {}, + "6634-Indemnit\u00e9s de transport": {}, + "6638-Autres indemnit\u00e9s et avantages divers": {} + }, + "664-Charges sociales": { + "6641-Charges sociales sur r\u00e9mun\u00e9ration du personnel national": {}, + "6642-Charges sociales sur r\u00e9mun\u00e9ration du personnel non national": {} + }, + "666-R\u00e9mun\u00e9rations et charges sociales de l\u2019exploitant individuel": { + "6661-R\u00e9mun\u00e9ration du travail de l\u2019exploitant": {}, + "6662-Charges sociales": {} + }, + "667-R\u00e9mun\u00e9ration transf\u00e9r\u00e9e de personnel ext\u00e9rieur": { + "6671-Personnel int\u00e9rimaire": {}, + "6672-Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": {} + }, + "668-Autres charges sociales": { + "6681-Versements aux syndicats et comit\u00e9s d\u2019entreprise, d\u2019\u00e9tablissement": {}, + "6682-Versements aux comit\u00e9s d\u2019hygi\u00e8ne et de s\u00e9curit\u00e9": {}, + "6683-Versements et contributions aux autres \u0153uvres sociales": {}, + "6684-M\u00e9decine du travail et pharmacie": {}, + "6685-Assurances et organismes de sant\u00e9": {}, + "6686-Assurances retraite et fonds de pension": {}, + "6687-Majorations et p\u00e9nalit\u00e9s sociales": {}, + "6688-Charges sociales diverses": {} + } + }, + "67-Frais financiers et charges assimil\u00e9es": { + "671-Int\u00e9r\u00eats des emprunts": { + "6711-Emprunts obligataires": {}, + "6712-Emprunts aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": {}, + "6713-Dettes li\u00e9es \u00e0 des participations": {}, + "6714-Primes de remboursement des obligations": {} + }, + "672-Int\u00e9r\u00eats dans loyers de location acquisition": { + "6722-Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail immobilier": {}, + "6723-Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail mobilier": {}, + "6724-Int\u00e9r\u00eats dans loyers de location acquisition / location-vente": {}, + "6728-Int\u00e9r\u00eats dans loyers des autres locations acquisition": {} + }, + "673-Escomptes accord\u00e9s": {}, + "674-Autres int\u00e9r\u00eats": { + "6741-Avances re\u00e7ues et d\u00e9p\u00f4ts cr\u00e9diteurs": {}, + "6742-Comptes courants bloqu\u00e9s": {}, + "6743-Int\u00e9r\u00eats sur obligations cautionn\u00e9es": {}, + "6744-Int\u00e9r\u00eats sur dettes commerciales": {}, + "6745-Int\u00e9r\u00eats bancaires et sur op\u00e9rations de financement (escompte...)": {}, + "6748-Int\u00e9r\u00eats sur dettes diverses": {} + }, + "675-Escomptes des effets de commerce": {}, + "676-Pertes de change financi\u00e8res": {}, + "677-Pertes sur titres de placement": { + "6771-Pertes sur cessions de titres de placement": {}, + "6772-Mali provenant d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": {} + }, + "678-Pertes et charges sur risques financiers": { + "6781-Sur rentes viag\u00e8res": {}, + "6782-Sur op\u00e9rations financi\u00e8res": {}, + "6784-Sur instruments de tr\u00e9sorerie": {} + }, + "679-Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "6791-Sur risques financiers": {}, + "6795-Sur titres de placement": {}, + "6798-Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": {} + } + }, + "68-Dotations aux amortissements": { + "681-Dotations aux amortissements d\u2019exploitation": { + "6812-Dotations aux amortissements des immobilisations incorporelles": {}, + "6813-Dotations aux amortissements des immobilisations corporelles": {} + } + }, + "69-Dotations aux provisions et aux d\u00e9pr\u00e9ciations": { + "691-Dotations aux provisions et aux d\u00e9pr\u00e9ciations d\u2019exploitation": { + "6911-Dotations aux provisions pour risques et charges": {}, + "6913-Dotations aux d\u00e9pr\u00e9ciations des immobilisations incorporelles": {}, + "6914-Dotations aux d\u00e9pr\u00e9ciations des immobilisations corporelles": {} + }, + "697-Dotations aux provisions et aux d\u00e9pr\u00e9ciations financi\u00e8res": { + "6971-Dotations aux provisions pour risques et charges": {}, + "6972-Dotations aux d\u00e9pr\u00e9ciations des immobilisations financi\u00e8res": {} + } + }, + "root_type": "Expense" + }, + "7-Comptes de produits des activit\u00e9s ordinaires": { + "70-Ventes": { + "701-Ventes de marchandises": { + "7011-Dans la R\u00e9gion": {}, + "7012-Hors R\u00e9gion": {}, + "7013-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7014-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7015-Sur internet": {}, + "7019-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "702-Ventes de produits finis": { + "7021-Dans la R\u00e9gion": {}, + "7022-Hors R\u00e9gion": {}, + "7023-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7024-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7025-Sur internet": {}, + "7029-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "703-Ventes de produits interm\u00e9diaires": { + "7031-Dans la R\u00e9gion": {}, + "7032-Hors R\u00e9gion": {}, + "7033-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7034-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7035-Sur internet": {}, + "7039-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "704-Ventes de produits r\u00e9siduels": { + "7041-Dans la R\u00e9gion": {}, + "7042-Hors R\u00e9gion": {}, + "7043-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7044-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7045-Sur internet": {}, + "7049-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "705-Travaux factur\u00e9s": { + "7051-Dans la R\u00e9gion": {}, + "7052-Hors R\u00e9gion": {}, + "7053-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7054-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7055-Sur internet": {}, + "7059-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "706-Services vendus": { + "7061-Dans la R\u00e9gion": {}, + "7062-Hors R\u00e9gion": {}, + "7063-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7064-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7065-Sur internet": {}, + "7069-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "707-Produits accessoires": { + "7071-Ports, emballages perdus et autres frais factur\u00e9s": {}, + "7072-Commissions et courtages": {}, + "7073-Locations": {}, + "7074-Bonis sur reprises et cessions d\u2019emballages": {}, + "7075-Mise \u00e0 disposition de personnel": {}, + "7076-Redevances pour brevets, logiciels, marques et droits similaires": {}, + "7077-Services exploit\u00e9s dans l\u2019int\u00e9r\u00eat du personnel": {}, + "7078-Autres produits accessoires": {} + } + }, + "71-Subventions d\u2019exploitation": { + "711-Sur produits \u00e0 l\u2019exportation": {}, + "712-Sur produits \u00e0 l\u2019importation": {}, + "713-Sur produits de p\u00e9r\u00e9quation": {}, + "714-Indemnit\u00e9s et subventions d\u2019exploitation (entit\u00e9 agricole)": {}, + "718-Autres subventions d\u2019exploitation": { + "7181-Vers\u00e9es par l\u2019\u00c9tat et les collectivit\u00e9s publiques": {}, + "7182-Vers\u00e9es par les organismes internationaux": {}, + "7183-Vers\u00e9es par des tiers": {} + } + }, + "72-Production immobilis\u00e9e": { + "721-Immobilisations incorporelles": {}, + "722-Immobilisations corporelles": { + "7221-Immobilisations corporelles (hors actifs biologiques)": {}, + "7222-Immobilisations corporelles (actifs biologiques)": {} + }, + "724-Production auto-consomm\u00e9e": {}, + "726-Immobilisations financi\u00e8res": {} + }, + "73-Variations des stocks de biens et de services produits": { + "734-Variations des stocks de produits en cours": { + "7341-Produits en cours": {}, + "7342-Travaux en cours": {} + }, + "735-Variations des en-cours de services": { + "7351-\u00c9tudes en cours": {}, + "7352-Prestations de services en cours": {} + }, + "736-Variations des stocks de produits finis": {}, + "737-Variations des stocks de produits interm\u00e9diaires et r\u00e9siduels": { + "7371-Produits interm\u00e9diaires": {}, + "7372-Produits r\u00e9siduels": {} + } + }, + "75-Autres produits": { + "751-Profits sur cr\u00e9ances clients et autres d\u00e9biteurs": {}, + "752-Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "7521-Quote-part transf\u00e9r\u00e9e de pertes (comptabilit\u00e9 du g\u00e9rant)": {}, + "7525-B\u00e9n\u00e9fices attribu\u00e9s par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": {} + }, + "754-Produits des cessions courantes d\u2019immobilisations": { + "7541-Immobilisations incorporelles": {}, + "7542-Immobilisations corporelles": {} + }, + "756-Gains de change sur cr\u00e9ances et dettes commerciales": {}, + "758-Produits divers": { + "7581-Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": {}, + "7582-Indemnit\u00e9s d\u2019assurances re\u00e7ues": {}, + "7588-Autres produits divers": {} + }, + "759-Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "7591-Sur risques \u00e0 court terme": {}, + "7593-Sur stocks": {}, + "7594-Sur cr\u00e9ances": {}, + "7598-Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": {} + } + }, + "77-Revenus financiers et produits assimil\u00e9s": { + "771-Int\u00e9r\u00eats de pr\u00eats et cr\u00e9ances diverses": { + "7712-Int\u00e9r\u00eats de pr\u00eats": {}, + "7713-Int\u00e9r\u00eats sur cr\u00e9ances diverses": {} + }, + "772-Revenus de participations et autres titres immobilis\u00e9s": { + "7721-Revenus des titres de participation": {}, + "7722-Revenus autres titres immobilis\u00e9s": {} + }, + "773-Escomptes obtenus": {}, + "774-Revenus de placement": { + "7745-Revenus des obligations": {}, + "7746-Revenus des titres de placement": {} + }, + "775-Int\u00e9r\u00eats dans loyers de location acquisition": {}, + "776-Gains de change financiers": {}, + "777-Gains sur cessions de titres de placement": {}, + "778-Gains sur risques financiers": { + "7781-Sur rentes viag\u00e8res": {}, + "7782-Sur op\u00e9rations financi\u00e8res": {}, + "7784-Sur instruments de tr\u00e9sorerie": {} + }, + "779-Reprises de charges pour d\u00e9pr\u00e9ciations et provisions \u00e0 court terme financi\u00e8res": { + "7791-Sur risques financiers": {}, + "7795-Sur titres de placement": {}, + "7798-Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": {} + } + }, + "78-Transferts de charges": { + "781-Transferts de charges d\u2019exploitation": {}, + "787-Transferts de charges financi\u00e8res": {} + }, + "79-Reprises de provisions, de d\u00e9pr\u00e9ciations et autres": { + "791-Reprises de provisions et d\u00e9pr\u00e9ciations d\u2019exploitation": { + "7911-Pour risques et charges": {}, + "7913-Des immobilisations incorporelles": {}, + "7914-Des immobilisations corporelles": {} + }, + "797-Reprises de provisions et d\u00e9pr\u00e9ciations financi\u00e8res": { + "7971-Pour risques et charges": {}, + "7972-Des immobilisations financi\u00e8res": {} + }, + "798-Reprises d\u2019amortissements": {}, + "799-Reprises de subventions d\u2019investissement": {} + }, + "root_type": "Income" + }, + "8-Comptes des autres charges et des autres produits (CHARGES)": { + "81-Valeurs comptables des cessions d\u2019immobilisations": { + "811-Immobilisations incorporelles": {}, + "812-Immobilisations corporelles": {}, + "816-Immobilisations financi\u00e8res": {} + }, + "83-Charges hors activit\u00e9s ordinaires": { + "831-Charges HAO constat\u00e9es": {}, + "833-Charges li\u00e9es aux op\u00e9rations de restructuration": {}, + "834-Pertes sur cr\u00e9ances HAO": {}, + "835-Dons et lib\u00e9ralit\u00e9s accord\u00e9s": {}, + "836-Abandons de cr\u00e9ances consentis": {}, + "837-Charges li\u00e9es aux op\u00e9rations de liquidation": {}, + "839-Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": {} + }, + "85-Dotations hors activit\u00e9s ordinaires": { + "851-Dotations aux provisions r\u00e9glement\u00e9es": {}, + "852-Dotations aux amortissements HAO": {}, + "853-Dotations aux d\u00e9pr\u00e9ciations HAO": {}, + "854-Dotations aux provisions pour risques et charges HAO": {}, + "858-Autres dotations HAO": {} + }, + "87-Participation des travailleurs": { + "871-Participation l\u00e9gale aux b\u00e9n\u00e9fices": {}, + "874-Participation contractuelle aux b\u00e9n\u00e9fices": {}, + "878-Autres participations": {} + }, + "89-Imp\u00f4ts sur le r\u00e9sultat": { + "891-Imp\u00f4ts sur les b\u00e9n\u00e9fices de l\u2019exercice": { + "8911-Activit\u00e9s exerc\u00e9es dans l\u2019\u00c9tat": {}, + "8912-Activit\u00e9s exerc\u00e9es dans les autres \u00c9tats de la R\u00e9gion": {}, + "8913-Activit\u00e9s exerc\u00e9es hors R\u00e9gion": {} + }, + "892-Rappel d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": {}, + "895-Imp\u00f4t minimum forfaitaire IMF": {}, + "899-D\u00e9gr\u00e8vements et annulations d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": { + "8991-D\u00e9gr\u00e8vements": {}, + "8994-Annulations pour pertes r\u00e9troactives": {} + } + }, + "root_type": "Expense" + }, + "8-Comptes des autres charges et des autres produits (PRODUITS)": { + "82-Produits des cessions d\u2019immobilisations": { + "821-Immobilisations incorporelles": {}, + "822-Immobilisations corporelles": {}, + "826-Immobilisations financi\u00e8res": {} + }, + "84-Produits hors activit\u00e9s ordinaires": { + "841-Produits HAO constat\u00e9s": {}, + "843-Produits li\u00e9s aux op\u00e9rations de restructuration": {}, + "844-Indemnit\u00e9s et subventions HAO (entit\u00e9 agricole)": {}, + "845-Dons et lib\u00e9ralit\u00e9s obtenus": {}, + "846-Abandons de cr\u00e9ances obtenus": {}, + "847-Produits li\u00e9s aux op\u00e9rations de liquidation": {}, + "848-Transferts de charges HAO": {}, + "849-Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": {} + }, + "86-Reprises de charges, provisions et d\u00e9pr\u00e9ciations HAO": { + "861-Reprises de provisions r\u00e9glement\u00e9es": {}, + "862-Reprises d\u2019amortissements HAO": {}, + "863-Reprises de d\u00e9pr\u00e9ciations HAO": {}, + "864-Reprises de provisions pour risques et charges HAO": {}, + "868-Autres reprises HAO": {} + }, + "88-Subventions d\u2019\u00e9quilibre": { + "881-\u00c9tat": {}, + "884-Collectivit\u00e9s publiques": {}, + "886-Groupe": {}, + "888-Autres": {} + }, + "root_type": "Income" + } + } +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/gw_plan_comptable_avec_code.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/gw_plan_comptable_avec_code.json new file mode 100644 index 00000000000..b4a817ea4cb --- /dev/null +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/gw_plan_comptable_avec_code.json @@ -0,0 +1,4208 @@ +{ + "country_code": "gw", + "name": "Syscohada - Plan Comptable avec code", + "tree": { + "Comptes de ressources durables": { + "Capital": { + "Capital social": { + "Capital souscrit, non appel\u00e9": { + "account_number": "1011" + }, + "Capital souscrit, appel\u00e9, non vers\u00e9": { + "account_number": "1012" + }, + "Capital souscrit, appel\u00e9, vers\u00e9, non amorti": { + "account_number": "1013" + }, + "Capital souscrit, appel\u00e9, vers\u00e9, amorti": { + "account_number": "1014" + }, + "Capital souscrit soumis \u00e0 des conditions particuli\u00e8res": { + "account_number": "1018" + }, + "account_number": "101" + }, + "Capital par dotation": { + "Dotation initiale": { + "account_number": "1021" + }, + "Dotations compl\u00e9mentaires": { + "account_number": "1022" + }, + "Autres dotations": { + "account_number": "1028" + }, + "account_number": "102" + }, + "Capital personnel": { + "account_number": "103" + }, + "Compte de l\u2019exploitant": { + "Apports temporaires": { + "account_number": "1041" + }, + "Op\u00e9rations courantes": { + "account_number": "1042" + }, + "R\u00e9mun\u00e9rations, imp\u00f4ts et autres charges personnelles": { + "account_number": "1043" + }, + "Pr\u00e9l\u00e8vements d\u2019autoconsommation": { + "account_number": "1047" + }, + "Autres pr\u00e9l\u00e8vements": { + "account_number": "1048" + }, + "account_number": "104" + }, + "Primes li\u00e9es au capital social": { + "Primes d\u2019\u00e9mission": { + "account_number": "1051" + }, + "Primes d\u2019apport": { + "account_number": "1052" + }, + "Primes de fusion": { + "account_number": "1053" + }, + "Primes de conversion": { + "account_number": "1054" + }, + "Autres primes": { + "account_number": "1058" + }, + "account_number": "105" + }, + "\u00c9carts de r\u00e9\u00e9valuation": { + "\u00c9carts de r\u00e9\u00e9valuation l\u00e9gale": { + "account_number": "1061" + }, + "\u00c9carts de r\u00e9\u00e9valuation libre": { + "account_number": "1062" + }, + "account_number": "106" + }, + "Apporteurs, capital souscrit, non appel\u00e9": { + "account_number": "109" + }, + "account_number": "10" + }, + "R\u00e9serves": { + "R\u00e9serve l\u00e9gale": { + "account_number": "111" + }, + "R\u00e9serves statutaires ou contractuelles": { + "account_number": "112" + }, + "R\u00e9serves r\u00e9glement\u00e9es": { + "R\u00e9serves de plus-values nettes \u00e0 long terme": { + "account_number": "1131" + }, + "R\u00e9serves d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": { + "account_number": "1132" + }, + "R\u00e9serves cons\u00e9cutives \u00e0 l\u2019octroi de subventions d\u2019investissement": { + "account_number": "1133" + }, + "R\u00e9serves des valeurs mobili\u00e8res donnant acc\u00e8s au capital": { + "account_number": "1134" + }, + "Autres r\u00e9serves r\u00e9glement\u00e9es": { + "account_number": "1135" + }, + "account_number": "113" + }, + "Autres r\u00e9serves": { + "R\u00e9serves facultatives": { + "account_number": "1181" + }, + "R\u00e9serves diverses": { + "account_number": "1188" + }, + "account_number": "118" + }, + "account_number": "11" + }, + "Report \u00e0 nouveau": { + "Report \u00e0 nouveau cr\u00e9diteur": { + "account_number": "121" + }, + "Report \u00e0 nouveau d\u00e9biteur": { + "Perte nette \u00e0 reporter": { + "account_number": "1291" + }, + "Perte Amortissements r\u00e9put\u00e9s diff\u00e9r\u00e9s": { + "account_number": "1292" + }, + "account_number": "129" + }, + "account_number": "12" + }, + "R\u00e9sultat net de l\u2019exercice": { + "R\u00e9sultat en instance d\u2019affectation": { + "R\u00e9sultat en instance d\u2019affectation : b\u00e9n\u00e9fice": { + "account_number": "1301" + }, + "R\u00e9sultat en instance d\u2019affectation : perte": { + "account_number": "1309" + }, + "account_number": "130" + }, + "R\u00e9sultat net : b\u00e9n\u00e9fice": { + "account_number": "131" + }, + "Marge commerciale (MC)": { + "account_number": "132" + }, + "Valeur ajout\u00e9e (VA)": { + "account_number": "133" + }, + "Exc\u00e9dent brut d\u2019exploitation (EBE)": { + "account_number": "134" + }, + "R\u00e9sultat d\u2019exploitation (RE)": { + "account_number": "135" + }, + "R\u00e9sultat financier (RF)": { + "account_number": "136" + }, + "R\u00e9sultat des activit\u00e9s ordinaires (RAO)": { + "account_number": "137" + }, + "R\u00e9sultat hors activit\u00e9s ordinaires (RHAO)": { + "R\u00e9sultat de fusion": { + "account_number": "1381" + }, + "R\u00e9sultat d\u2019apport partiel d\u2019actif": { + "account_number": "1382" + }, + "R\u00e9sultat de scission": { + "account_number": "1383" + }, + "R\u00e9sultat de liquidation": { + "account_number": "1384" + }, + "account_number": "138" + }, + "R\u00e9sultat net : perte": { + "account_number": "139" + }, + "account_number": "13" + }, + "Subventions d\u2019investissement": { + "Subventions d\u2019\u00e9quipement": { + "\u00c9tat": { + "account_number": "1411" + }, + "R\u00e9gions": { + "account_number": "1412" + }, + "D\u00e9partements": { + "account_number": "1413" + }, + "Communes et collectivit\u00e9s publiques d\u00e9centralis\u00e9es": { + "account_number": "1414" + }, + "Entit\u00e9s publiques ou mixtes": { + "account_number": "1415" + }, + "Entit\u00e9s et organismes priv\u00e9s": { + "account_number": "1416" + }, + "Organismes internationaux": { + "account_number": "1417" + }, + "Autres": { + "account_number": "1418" + }, + "account_number": "141" + }, + "Autres subventions d\u2019investissement": { + "account_number": "148" + }, + "account_number": "14" + }, + "Provisions r\u00e9glement\u00e9es et fonds assimil\u00e9s": { + "Amortissements d\u00e9rogatoires": { + "account_number": "151" + }, + "Plus-values de cession \u00e0 r\u00e9investir": { + "account_number": "152" + }, + "Fonds r\u00e9glement\u00e9s": { + "Fonds National": { + "account_number": "1531" + }, + "Pr\u00e9l\u00e8vement pour le Budget": { + "account_number": "1532" + }, + "account_number": "153" + }, + "Provisions sp\u00e9ciales de r\u00e9\u00e9valuation": { + "account_number": "154" + }, + "Provisions r\u00e9glement\u00e9es relatives aux immobilisations": { + "Reconstitution des gisements miniers et p\u00e9troliers": { + "account_number": "1551" + }, + "account_number": "155" + }, + "Provisions r\u00e9glement\u00e9es relatives aux stocks": { + "Hausse de prix": { + "account_number": "1561" + }, + "Fluctuation des cours": { + "account_number": "1562" + }, + "account_number": "156" + }, + "Provisions pour investissement": { + "account_number": "157" + }, + "Autres provisions et fonds r\u00e9glement\u00e9s": { + "account_number": "158" + }, + "account_number": "15" + }, + "Emprunts et dettes assimil\u00e9es": { + "Emprunts obligataires": { + "Emprunts obligataires ordinaires": { + "account_number": "1611" + }, + "Emprunts obligataires convertibles en actions": { + "account_number": "1612" + }, + "Emprunts obligataires remboursables en actions": { + "account_number": "1613" + }, + "Autres emprunts obligataires": { + "account_number": "1618" + }, + "account_number": "161" + }, + "Emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": { + "account_number": "162" + }, + "Avances re\u00e7ues de l\u2019\u00c9tat": { + "account_number": "163" + }, + "Avances re\u00e7ues et comptes courants bloqu\u00e9s": { + "account_number": "164" + }, + "D\u00e9p\u00f4ts et cautionnements re\u00e7us": { + "D\u00e9p\u00f4ts": { + "account_number": "1651" + }, + "Cautionnements": { + "account_number": "1652" + }, + "account_number": "165" + }, + "Int\u00e9r\u00eats courus": { + "Sur emprunts obligataires": { + "account_number": "1661" + }, + "Sur emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": { + "account_number": "1662" + }, + "Sur avances re\u00e7ues de l\u2019\u00c9tat": { + "account_number": "1663" + }, + "Sur avances re\u00e7ues et comptes courants bloqu\u00e9s": { + "account_number": "1664" + }, + "Sur d\u00e9p\u00f4ts et cautionnements re\u00e7us": { + "account_number": "1665" + }, + "Sur avances assorties de conditions particuli\u00e8res": { + "account_number": "1667" + }, + "Sur autres emprunts et dettes": { + "account_number": "1668" + }, + "account_number": "166" + }, + "Avances assorties de conditions particuli\u00e8res": { + "Avances bloqu\u00e9es pour augmentation du capital": { + "account_number": "1671" + }, + "Avances conditionn\u00e9es par l\u2019\u00c9tat": { + "account_number": "1672" + }, + "Avances conditionn\u00e9es par les autres organismes africains": { + "account_number": "1673" + }, + "Avances conditionn\u00e9es par les organismes internationaux": { + "account_number": "1674" + }, + "account_number": "167" + }, + "Autres emprunts et dettes": { + "Rentes viag\u00e8res capitalis\u00e9es": { + "account_number": "1681" + }, + "Billets de fonds": { + "account_number": "1682" + }, + "Dettes cons\u00e9cutives \u00e0 des titres emprunt\u00e9s": { + "account_number": "1683" + }, + "Emprunts participatifs": { + "account_number": "1684" + }, + "Participation des travailleurs aux b\u00e9n\u00e9fices": { + "account_number": "1685" + }, + "Emprunts et dettes contract\u00e9s aupr\u00e8s des autres tiers": { + "account_number": "1686" + }, + "account_number": "168" + }, + "account_number": "16" + }, + "Dettes de location acquisition": { + "Dettes de location acquisition / cr\u00e9dit bail immobilier": { + "account_number": "172" + }, + "Dettes de location acquisition / cr\u00e9dit bail mobilier": { + "account_number": "173" + }, + "Dettes de location acquisition / location de vente": { + "account_number": "174" + }, + "Int\u00e9r\u00eats courus": { + "Sur dettes de location acquisition / cr\u00e9dit-bail immobilier": { + "account_number": "1762" + }, + "Sur dettes de location acquisition / cr\u00e9dit-bail mobilier": { + "account_number": "1763" + }, + "Sur dettes de location acquisition / location-vente": { + "account_number": "1764" + }, + "Sur autres dettes de location acquisition": { + "account_number": "1768" + }, + "account_number": "176" + }, + "Autres dettes de location acquisition": { + "account_number": "178" + }, + "account_number": "17" + }, + "Dettes li\u00e9es \u00e0 des participations et comptes de liaison des \u00e9tablissements et soci\u00e9t\u00e9s en participation": { + "Dettes li\u00e9es \u00e0 des participations": { + "Dettes li\u00e9es \u00e0 des participations (groupe)": { + "account_number": "1811" + }, + "Dettes li\u00e9es \u00e0 des participations (hors groupe)": { + "account_number": "1812" + }, + "account_number": "181" + }, + "Dettes li\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": { + "account_number": "182" + }, + "Int\u00e9r\u00eats courus sur dettes li\u00e9es \u00e0 des participations": { + "account_number": "183" + }, + "Comptes permanents bloqu\u00e9s des \u00e9tablissements et succursales": { + "account_number": "184" + }, + "Comptes permanents non bloqu\u00e9s des \u00e9tablissements et succursales": { + "account_number": "185" + }, + "Comptes de liaison charges": { + "account_number": "186" + }, + "Comptes de liaison produits": { + "account_number": "187" + }, + "Comptes de liaison des soci\u00e9t\u00e9s en participation": { + "account_number": "188" + }, + "account_number": "18" + }, + "Provisions pour risques et charges": { + "Provisions pour litiges": { + "account_number": "191" + }, + "Provisions pour garanties donn\u00e9es aux clients": { + "account_number": "192" + }, + "Provisions pour pertes sur march\u00e9s \u00e0 ach\u00e8vement futur": { + "account_number": "193" + }, + "Provisions pour pertes de change": { + "account_number": "194" + }, + "Provisions pour imp\u00f4ts": { + "account_number": "195" + }, + "Provisions pour pensions et obligations similaires": { + "Provisions pour pensions et obligations similaires engagement de retraite": { + "account_number": "1961" + }, + "Actif du r\u00e9gime de retraite": { + "account_number": "1962" + }, + "account_number": "196" + }, + "Provisions pour restructuration": { + "account_number": "197" + }, + "Autres provisions pour risques et charges": { + "Provisions pour amendes et p\u00e9nalit\u00e9s": { + "account_number": "1981" + }, + "Provisions pour propre assureur": { + "account_number": "1983" + }, + "Provisions pour d\u00e9mant\u00e8lement et remise en \u00e9tat": { + "account_number": "1984" + }, + "Provisions pour droits \u00e0 r\u00e9duction ou avantage en nature (ch\u00e8ques cadeau, cartes de fid\u00e9lit\u00e9...)": { + "account_number": "1985" + }, + "Provisions pour divers risques et charges": { + "account_number": "1988" + }, + "account_number": "198" + }, + "account_number": "19" + }, + "root_type": "Equity", + "account_number": "1" + }, + "Comptes d\u2019actif immobilis\u00e9": { + "Immobilisations incorporelles": { + "account_type": "Fixed Asset", + "Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset", + "account_number": "211" + }, + "Brevets, licences, concessions et droits similaires": { + "account_type": "Fixed Asset", + "Brevets": { + "account_type": "Fixed Asset", + "account_number": "2121" + }, + "Licences": { + "account_type": "Fixed Asset", + "account_number": "2122" + }, + "Concessions de service public": { + "account_type": "Fixed Asset", + "account_number": "2123" + }, + "Autres concessions et droits similaires": { + "account_type": "Fixed Asset", + "account_number": "2128" + }, + "account_number": "212" + }, + "Logiciels et sites internet": { + "account_type": "Fixed Asset", + "Logiciels": { + "account_type": "Fixed Asset", + "account_number": "2131" + }, + "Sites internet": { + "account_type": "Fixed Asset", + "account_number": "2132" + }, + "account_number": "213" + }, + "Marques": { + "account_type": "Fixed Asset", + "account_number": "214" + }, + "Fonds commercial": { + "account_type": "Fixed Asset", + "account_number": "215" + }, + "Droit au bail": { + "account_type": "Fixed Asset", + "account_number": "216" + }, + "Investissements de cr\u00e9ation": { + "account_type": "Fixed Asset", + "account_number": "217" + }, + "Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset", + "Frais de prospection et d\u2019\u00e9valuation de ressources min\u00e9rales": { + "account_type": "Fixed Asset", + "account_number": "2181" + }, + "Co\u00fbts d\u2019obtention du contrat": { + "account_type": "Fixed Asset", + "account_number": "2182" + }, + "Fichiers clients, notices, titres de journaux et magazines": { + "account_type": "Fixed Asset", + "account_number": "2183" + }, + "Co\u00fbts des franchises": { + "account_type": "Fixed Asset", + "account_number": "2184" + }, + "Divers droits et valeurs incorporelles": { + "account_type": "Fixed Asset", + "account_number": "2188" + }, + "account_number": "218" + }, + "Immobilisations incorporelles en cours": { + "account_type": "Fixed Asset", + "Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset", + "account_number": "2191" + }, + "Logiciels et internet": { + "account_type": "Fixed Asset", + "account_number": "2193" + }, + "Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset", + "account_number": "2198" + }, + "account_number": "219" + }, + "account_number": "21" + }, + "Terrains": { + "account_type": "Fixed Asset", + "Terrains agricoles et forestiers": { + "account_type": "Fixed Asset", + "Terrains d\u2019exploitation agricole": { + "account_type": "Fixed Asset", + "account_number": "2211" + }, + "Terrains d\u2019exploitation foresti\u00e8re": { + "account_type": "Fixed Asset", + "account_number": "2212" + }, + "Autres terrains": { + "account_type": "Fixed Asset", + "account_number": "2218" + }, + "account_number": "221" + }, + "Terrains nus": { + "account_type": "Fixed Asset", + "Terrains \u00e0 b\u00e2tir": { + "account_type": "Fixed Asset", + "account_number": "2221" + }, + "Autres terrains nus": { + "account_type": "Fixed Asset", + "account_number": "2228" + }, + "account_number": "222" + }, + "Terrains b\u00e2tis": { + "account_type": "Fixed Asset", + "Pour b\u00e2timents industriels et agricoles": { + "account_type": "Fixed Asset", + "account_number": "2231" + }, + "Pour b\u00e2timents administratifs et commerciaux": { + "account_type": "Fixed Asset", + "account_number": "2232" + }, + "Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations professionnelles": { + "account_type": "Fixed Asset", + "account_number": "2234" + }, + "Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations non professionnelles": { + "account_type": "Fixed Asset", + "account_number": "2235" + }, + "Autres terrains b\u00e2tis": { + "account_type": "Fixed Asset", + "account_number": "2238" + }, + "account_number": "223" + }, + "Travaux de mise en valeur des terrains": { + "account_type": "Fixed Asset", + "Plantation d\u2019arbres et d\u2019arbustes": { + "account_type": "Fixed Asset", + "account_number": "2241" + }, + "Am\u00e9liorations du fonds": { + "account_type": "Fixed Asset", + "account_number": "2245" + }, + "Autres travaux": { + "account_type": "Fixed Asset", + "account_number": "2248" + }, + "account_number": "224" + }, + "Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset", + "Carri\u00e8res": { + "account_type": "Fixed Asset", + "account_number": "2251" + }, + "account_number": "225" + }, + "Terrains am\u00e9nag\u00e9s": { + "account_type": "Fixed Asset", + "Parkings": { + "account_type": "Fixed Asset", + "account_number": "2261" + }, + "account_number": "226" + }, + "Terrains mis en concession": { + "account_type": "Fixed Asset", + "account_number": "227" + }, + "Autres terrains": { + "account_type": "Fixed Asset", + "Terrains immeubles de placement": { + "account_type": "Fixed Asset", + "account_number": "2281" + }, + "Terrains des logements affect\u00e9s au personnel": { + "account_type": "Fixed Asset", + "account_number": "2285" + }, + "Terrains de location acquisition": { + "account_type": "Fixed Asset", + "account_number": "2286" + }, + "Divers terrains": { + "account_type": "Fixed Asset", + "account_number": "2288" + }, + "account_number": "228" + }, + "Am\u00e9nagements de terrains en cours": { + "account_type": "Fixed Asset", + "Terrains agricoles et forestiers": { + "account_type": "Fixed Asset", + "account_number": "2291" + }, + "Terrains nus": { + "account_type": "Fixed Asset", + "account_number": "2292" + }, + "Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset", + "account_number": "2295" + }, + "Autres terrains": { + "account_type": "Fixed Asset", + "account_number": "2298" + }, + "account_number": "229" + }, + "account_number": "22" + }, + "B\u00e2timents, installations techniques et agencements": { + "B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "B\u00e2timents industriels": { + "account_number": "2311" + }, + "B\u00e2timents agricoles": { + "account_number": "2312" + }, + "B\u00e2timents administratifs et commerciaux": { + "account_number": "2313" + }, + "B\u00e2timents affect\u00e9s au logement du personnel": { + "account_number": "2314" + }, + "B\u00e2timents immeubles de placement": { + "account_number": "2315" + }, + "B\u00e2timents de location acquisition": { + "account_number": "2316" + }, + "account_number": "231" + }, + "B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "B\u00e2timents industriels": { + "account_number": "2321" + }, + "B\u00e2timents agricoles": { + "account_number": "2322" + }, + "B\u00e2timents administratifs et commerciaux": { + "account_number": "2323" + }, + "B\u00e2timents affect\u00e9s au logement du personnel": { + "account_number": "2324" + }, + "B\u00e2timents immeubles de placement": { + "account_number": "2325" + }, + "B\u00e2timents de location acquisition": { + "account_number": "2326" + }, + "account_number": "232" + }, + "Ouvrages d\u2019infrastructure": { + "Voies de terre": { + "account_number": "2331" + }, + "Voies de fer": { + "account_number": "2332" + }, + "Voies d\u2019eau": { + "account_number": "2333" + }, + "Barrages, Digues": { + "account_number": "2334" + }, + "Pistes d\u2019a\u00e9rodrome": { + "account_number": "2335" + }, + "Autres ouvrages d\u2019infrastructures": { + "account_number": "2338" + }, + "account_number": "233" + }, + "Am\u00e9nagements, agencements et installations techniques": { + "Installations complexes sp\u00e9cialis\u00e9es sur sol propre": { + "account_number": "2341" + }, + "Installations complexes sp\u00e9cialis\u00e9es sur sol d\u2019autrui": { + "account_number": "2342" + }, + "Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol propre": { + "account_number": "2343" + }, + "Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol d\u2019autrui": { + "account_number": "2344" + }, + "Am\u00e9nagements et agencements des b\u00e2timents": { + "account_number": "2345" + }, + "account_number": "234" + }, + "Am\u00e9nagements de bureaux": { + "Installations g\u00e9n\u00e9rales": { + "account_number": "2351" + }, + "Autres am\u00e9nagements de bureaux": { + "account_number": "2358" + }, + "account_number": "235" + }, + "B\u00e2timents industriels, agricoles et commerciaux mis en concession": { + "account_number": "237" + }, + "Autres installations et agencements": { + "account_number": "238" + }, + "B\u00e2timents am\u00e9nagements, agencements et installations en cours": { + "B\u00e2timents en cours": { + "account_number": "2391" + }, + "Installations en cours": { + "account_number": "2392" + }, + "Ouvrages d\u2019infrastructure en cours": { + "account_number": "2393" + }, + "Am\u00e9nagements et agencements et installations techniques en cours": { + "account_number": "2394" + }, + "Am\u00e9nagements de bureaux en cours": { + "account_number": "2395" + }, + "Autres installations et agencements en cours": { + "account_number": "2398" + }, + "account_number": "239" + }, + "account_number": "23" + }, + "Mat\u00e9riel, mobilier et actifs biologiques": { + "Mat\u00e9riel et outillage industriel et commercial": { + "Mat\u00e9riel industriel": { + "account_number": "2411" + }, + "Outillage industriel": { + "account_number": "2412" + }, + "Mat\u00e9riel commercial": { + "account_number": "2413" + }, + "Outillage commercial": { + "account_number": "2414" + }, + "Mat\u00e9riel & outillage industriel et commercial de location-acquisition": { + "account_number": "2416" + }, + "account_number": "241" + }, + "Mat\u00e9riel et outillage agricole": { + "Mat\u00e9riel agricole": { + "account_number": "2421" + }, + "Outillage agricole": { + "account_number": "2422" + }, + "Mat\u00e9riel & outillage agricole de location-acquisition": { + "account_number": "2426" + }, + "account_number": "242" + }, + "Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "243" + }, + "Mat\u00e9riel et mobilier": { + "Mat\u00e9riel de bureau": { + "account_number": "2441" + }, + "Mat\u00e9riel informatique": { + "account_number": "2442" + }, + "Mat\u00e9riel bureautique": { + "account_number": "2443" + }, + "Mobilier de bureau": { + "account_number": "2444" + }, + "Mat\u00e9riel et mobilier immeubles de placement": { + "account_number": "2445" + }, + "Mat\u00e9riel et mobilier de location acquisition": { + "account_number": "2446" + }, + "Mat\u00e9riel et mobilier des logements du personnel": { + "account_number": "2447" + }, + "account_number": "244" + }, + "Mat\u00e9riel de transport": { + "Mat\u00e9riel automobile": { + "account_number": "2451" + }, + "Mat\u00e9riel ferroviaire": { + "account_number": "2452" + }, + "Mat\u00e9riel fluvial, lagunaire": { + "account_number": "2453" + }, + "Mat\u00e9riel naval": { + "account_number": "2454" + }, + "Mat\u00e9riel a\u00e9rien": { + "account_number": "2455" + }, + "Mat\u00e9riel de transport de location-acquisition": { + "account_number": "2456" + }, + "Mat\u00e9riel hippomobile": { + "account_number": "2457" + }, + "Autres mat\u00e9riels de transport": { + "account_number": "2458" + }, + "account_number": "245" + }, + "Actifs biologiques": { + "Cheptel, animaux de trait": { + "account_number": "2461" + }, + "Cheptel, animaux reproducteurs": { + "account_number": "2462" + }, + "Animaux de garde": { + "account_number": "2463" + }, + "Plantations agricoles": { + "account_number": "2465" + }, + "Autres actifs biologiques": { + "account_number": "2468" + }, + "account_number": "246" + }, + "Agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "Agencements et am\u00e9nagements du mat\u00e9riel": { + "account_number": "2471" + }, + "Agencements et am\u00e9nagements des actifs biologiques": { + "account_number": "2472" + }, + "Autres agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "account_number": "2478" + }, + "account_number": "247" + }, + "Autres mat\u00e9riels et mobiliers": { + "Collections et \u0153uvres d\u2019art": { + "account_number": "2481" + }, + "Divers mat\u00e9riels mobiliers": { + "account_number": "2488" + }, + "account_number": "248" + }, + "Mat\u00e9riels et actifs biologiques en cours": { + "Mat\u00e9riel et outillage industriel et commercial": { + "account_number": "2491" + }, + "Mat\u00e9riel et outillage agricole": { + "account_number": "2492" + }, + "Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "2493" + }, + "Mat\u00e9riel et mobilier de bureau": { + "account_number": "2494" + }, + "Mat\u00e9riel de transport": { + "account_number": "2495" + }, + "Actifs biologiques": { + "account_number": "2496" + }, + "Agencements am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "account_number": "2497" + }, + "Autres mat\u00e9riels et actifs biologiques en cours": { + "account_number": "2498" + }, + "account_number": "249" + }, + "account_number": "24" + }, + "Avances et acomptes vers\u00e9s sur immobilisations": { + "Avances et acomptes vers\u00e9s sur immobilisations incorporelles": { + "account_number": "251" + }, + "Avances et acomptes vers\u00e9s sur immobilisations corporelles": { + "account_number": "252" + }, + "account_number": "25" + }, + "Titres de participation": { + "Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": { + "account_number": "261" + }, + "Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le conjoint": { + "account_number": "262" + }, + "Titres de participation dans des soci\u00e9t\u00e9s conf\u00e9rant une influence notable": { + "account_number": "263" + }, + "Participations dans des organismes professionnels": { + "account_number": "265" + }, + "Parts dans des groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": { + "account_number": "266" + }, + "Autres titres de participation": { + "account_number": "268" + }, + "account_number": "26" + }, + "Autres immobilisations financi\u00e8res": { + "Pr\u00eats et cr\u00e9ances": { + "Pr\u00eats participatifs": { + "account_number": "2711" + }, + "Pr\u00eats aux associ\u00e9s": { + "account_number": "2712" + }, + "Billets de fonds": { + "account_number": "2713" + }, + "Titres pr\u00eat\u00e9s": { + "account_number": "2714" + }, + "Autres pr\u00eats et cr\u00e9ances": { + "account_number": "2718" + }, + "account_number": "271" + }, + "Pr\u00eats au personnel": { + "Pr\u00eats immobiliers": { + "account_number": "2721" + }, + "Pr\u00eats mobiliers et d\u2019installation": { + "account_number": "2722" + }, + "Autres pr\u00eats au personnel": { + "account_number": "2728" + }, + "account_number": "272" + }, + "Cr\u00e9ances sur l\u2019\u00c9tat": { + "Retenues de garantie": { + "account_number": "2731" + }, + "Fonds r\u00e9glement\u00e9": { + "account_number": "2733" + }, + "Cr\u00e9ances sur le conc\u00e9dant": { + "account_number": "2734" + }, + "Autres cr\u00e9ances sur l\u2019\u00c9tat": { + "account_number": "2738" + }, + "account_number": "273" + }, + "Titres immobilis\u00e9s": { + "Titres immobilis\u00e9s de l\u2019activit\u00e9 de portefeuille (TIAP)": { + "account_number": "2741" + }, + "Titres participatifs": { + "account_number": "2742" + }, + "Certificats d\u2019investissement": { + "account_number": "2743" + }, + "Parts de fonds commun de placement (FCP)": { + "account_number": "2744" + }, + "Obligations": { + "account_number": "2745" + }, + "Actions ou parts propres": { + "account_number": "2746" + }, + "Autres titres immobilis\u00e9s": { + "account_number": "2748" + }, + "account_number": "274" + }, + "D\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "D\u00e9p\u00f4ts pour loyers d\u2019avance": { + "account_number": "2751" + }, + "D\u00e9p\u00f4ts pour l\u2019\u00e9lectricit\u00e9": { + "account_number": "2752" + }, + "D\u00e9p\u00f4ts pour l\u2019eau": { + "account_number": "2753" + }, + "D\u00e9p\u00f4ts pour le gaz": { + "account_number": "2754" + }, + "D\u00e9p\u00f4ts pour le t\u00e9l\u00e9phone, le t\u00e9lex, la t\u00e9l\u00e9copie": { + "account_number": "2755" + }, + "Cautionnements sur march\u00e9s publics": { + "account_number": "2756" + }, + "Cautionnements sur autres op\u00e9rations": { + "account_number": "2757" + }, + "Autres d\u00e9p\u00f4ts et cautionnements": { + "account_number": "2758" + }, + "account_number": "275" + }, + "Int\u00e9r\u00eats courus": { + "Pr\u00eats et cr\u00e9ances non commerciales": { + "account_number": "2761" + }, + "Pr\u00eats au personnel": { + "account_number": "2762" + }, + "Cr\u00e9ances sur l\u2019\u00c9tat": { + "account_number": "2763" + }, + "Titres immobilis\u00e9s": { + "account_number": "2764" + }, + "D\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "account_number": "2765" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations": { + "account_number": "2767" + }, + "Immobilisations financi\u00e8res diverses": { + "account_number": "2768" + }, + "account_number": "276" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": { + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations (groupe)": { + "account_number": "2771" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations (hors groupe)": { + "account_number": "2772" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": { + "account_number": "2773" + }, + "Avances \u00e0 des Groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": { + "account_number": "2774" + }, + "account_number": "277" + }, + "Immobilisations financi\u00e8res diverses": { + "Cr\u00e9ances diverses groupe": { + "account_number": "2781" + }, + "Cr\u00e9ances diverses hors groupe": { + "account_number": "2782" + }, + "Banques d\u00e9p\u00f4ts \u00e0 terme": { + "account_number": "2784" + }, + "Or et m\u00e9taux pr\u00e9cieux": { + "account_number": "2785" + }, + "Autres immobilisations financi\u00e8res": { + "account_number": "2788" + }, + "account_number": "278" + }, + "account_number": "27" + }, + "Amortissements": { + "account_type": "Accumulated Depreciation", + "Amortissements des immobilisations corporelles": { + "account_type": "Accumulated Depreciation", + "Amortissements des frais de d\u00e9veloppement": { + "account_type": "Accumulated Depreciation", + "account_number": "2811" + }, + "Amortissements des brevets, licences, concessions et droits similaires": { + "account_type": "Accumulated Depreciation", + "account_number": "2812" + }, + "Amortissements des logiciels et sites internet": { + "account_type": "Accumulated Depreciation", + "account_number": "2813" + }, + "Amortissements des marques": { + "account_type": "Accumulated Depreciation", + "account_number": "2814" + }, + "Amortissements du fonds commercial": { + "account_type": "Accumulated Depreciation", + "account_number": "2815" + }, + "Amortissements du droit au bail": { + "account_type": "Accumulated Depreciation", + "account_number": "2816" + }, + "Amortissements des investissements de cr\u00e9ation": { + "account_type": "Accumulated Depreciation", + "account_number": "2817" + }, + "Amortissements des autres droits et valeurs incorporels": { + "account_type": "Accumulated Depreciation", + "account_number": "2818" + }, + "account_number": "281" + }, + "Amortissements des terrains": { + "Amortissements des travaux de mise en valeur des terrains": { + "account_number": "2824" + }, + "account_number": "282" + }, + "Amortissements des b\u00e2timents, installations techniques et agencements": { + "Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "account_number": "2831" + }, + "Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "account_number": "2832" + }, + "Amortissements des ouvrages d\u2019infrastructure": { + "account_number": "2833" + }, + "Amortissements des am\u00e9nagements, agencements et installations techniques": { + "account_number": "2834" + }, + "Amortissements des am\u00e9nagements de bureaux": { + "account_number": "2835" + }, + "Amortissements des b\u00e2timents industriels, agricoles et commerciaux mis en concession": { + "account_number": "2837" + }, + "Amortissements des autres installations et agencements": { + "account_number": "2838" + }, + "account_number": "283" + }, + "Amortissements du mat\u00e9riel": { + "Amortissements du mat\u00e9riel et outillage industriel et commercial": { + "account_number": "2841" + }, + "Amortissements du mat\u00e9riel et outillage agricole": { + "account_number": "2842" + }, + "Amortissements du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "2843" + }, + "Amortissements du mat\u00e9riel et mobilier": { + "account_number": "2844" + }, + "Amortissements du mat\u00e9riel de transport": { + "account_number": "2845" + }, + "Amortissements des actifs biologiques": { + "account_number": "2846" + }, + "Amortissements des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": { + "account_number": "2847" + }, + "Amortissements des autres mat\u00e9riels": { + "account_number": "2848" + }, + "account_number": "284" + }, + "account_number": "28" + }, + "D\u00e9pr\u00e9ciations des immobilisations": { + "D\u00e9pr\u00e9ciations des immobilisations incorporelles": { + "D\u00e9pr\u00e9ciations des frais de d\u00e9veloppement": { + "account_number": "2911" + }, + "D\u00e9pr\u00e9ciations des brevets, licences, concessions et droits similaires": { + "account_number": "2912" + }, + "D\u00e9pr\u00e9ciations des logiciels et sites internet": { + "account_number": "2913" + }, + "D\u00e9pr\u00e9ciations des marques": { + "account_number": "2914" + }, + "D\u00e9pr\u00e9ciations du fonds commercial": { + "account_number": "2915" + }, + "D\u00e9pr\u00e9ciations du droit au bail": { + "account_number": "2916" + }, + "D\u00e9pr\u00e9ciations des investissements de cr\u00e9ation": { + "account_number": "2917" + }, + "D\u00e9pr\u00e9ciations des autres droits et valeurs incorporels": { + "account_number": "2918" + }, + "D\u00e9pr\u00e9ciations des immobilisations incorporelles en cours": { + "account_number": "2919" + }, + "account_number": "291" + }, + "D\u00e9pr\u00e9ciations des terrains": { + "D\u00e9pr\u00e9ciations des terrains agricoles et forestiers": { + "account_number": "2921" + }, + "D\u00e9pr\u00e9ciations des terrains nus": { + "account_number": "2922" + }, + "D\u00e9pr\u00e9ciations des terrains b\u00e2tis": { + "account_number": "2923" + }, + "D\u00e9pr\u00e9ciations des travaux de mise en valeur des terrains": { + "account_number": "2924" + }, + "D\u00e9pr\u00e9ciations des terrains de gisement": { + "account_number": "2925" + }, + "D\u00e9pr\u00e9ciations des terrains am\u00e9nag\u00e9s": { + "account_number": "2926" + }, + "D\u00e9pr\u00e9ciations des terrains mis en concession": { + "account_number": "2927" + }, + "D\u00e9pr\u00e9ciations des autres terrains": { + "account_number": "2928" + }, + "D\u00e9pr\u00e9ciations des am\u00e9nagements de terrains en cours": { + "account_number": "2929" + }, + "account_number": "292" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents, installations techniques et agencements": { + "D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "account_number": "2931" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "account_number": "2932" + }, + "D\u00e9pr\u00e9ciations des ouvrages d\u2019infrastructures": { + "account_number": "2933" + }, + "D\u00e9pr\u00e9ciations des am\u00e9nagements, agencements et installations techniques": { + "account_number": "2934" + }, + "D\u00e9pr\u00e9ciations des am\u00e9nagements de bureaux": { + "account_number": "2935" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles et commerciaux mis en concession": { + "account_number": "2937" + }, + "D\u00e9pr\u00e9ciations des autres installations et agencements": { + "account_number": "2938" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents et installations en cours": { + "account_number": "2939" + }, + "account_number": "293" + }, + "D\u00e9pr\u00e9ciations de mat\u00e9riel, du mobilier et de l\u2019actif biologique": { + "D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage industriel et commercial": { + "account_number": "2941" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage agricole": { + "account_number": "2942" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "2943" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel et mobilier": { + "account_number": "2944" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel de transport": { + "account_number": "2945" + }, + "D\u00e9pr\u00e9ciations des actifs biologiques": { + "account_number": "2946" + }, + "D\u00e9pr\u00e9ciations des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": { + "account_number": "2947" + }, + "D\u00e9pr\u00e9ciations des autres mat\u00e9riels": { + "account_number": "2948" + }, + "D\u00e9pr\u00e9ciations de mat\u00e9riel en cours": { + "account_number": "2949" + }, + "account_number": "294" + }, + "D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations": { + "D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations incorporelles": { + "account_number": "2951" + }, + "D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations corporelles": { + "account_number": "2952" + }, + "account_number": "295" + }, + "D\u00e9pr\u00e9ciations des titres de participation": { + "D\u00e9pr\u00e9ciations des titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": { + "account_number": "2961" + }, + "D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s sous contr\u00f4le conjoint": { + "account_number": "2962" + }, + "D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s conf\u00e9rant une influence notable": { + "account_number": "2963" + }, + "D\u00e9pr\u00e9ciations des participations dans des organismes professionnels": { + "account_number": "2965" + }, + "D\u00e9pr\u00e9ciations des parts dans des GIE": { + "account_number": "2966" + }, + "D\u00e9pr\u00e9ciations des autres titres de participation": { + "account_number": "2968" + }, + "account_number": "296" + }, + "D\u00e9pr\u00e9ciations des autres immobilisations financi\u00e8res": { + "D\u00e9pr\u00e9ciations des pr\u00eats et cr\u00e9ances": { + "account_number": "2971" + }, + "D\u00e9pr\u00e9ciations des pr\u00eats au personnel": { + "account_number": "2972" + }, + "D\u00e9pr\u00e9ciations des cr\u00e9ances sur l\u2019\u00c9tat": { + "account_number": "2973" + }, + "D\u00e9pr\u00e9ciations des titres immobilis\u00e9s": { + "account_number": "2974" + }, + "D\u00e9pr\u00e9ciations des d\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "account_number": "2975" + }, + "D\u00e9pr\u00e9ciations des cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": { + "account_number": "2977" + }, + "D\u00e9pr\u00e9ciations des cr\u00e9ances financi\u00e8res diverses": { + "account_number": "2978" + }, + "account_number": "297" + }, + "account_number": "29" + }, + "root_type": "Asset", + "account_number": "2" + }, + "Comptes de Stocks": { + "Marchandises": { + "Marchandises A": { + "Marchandises A1": { + "account_number": "3111" + }, + "Marchandises A2": { + "account_number": "3112" + }, + "account_number": "311" + }, + "Marchandises B": { + "Marchandises B1": { + "account_number": "3121" + }, + "Marchandises B2": { + "account_number": "3122" + }, + "account_number": "312" + }, + "Actifs biologiques": { + "Animaux": { + "account_number": "3131" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3132" + }, + "account_number": "313" + }, + "Marchandises hors activit\u00e9s ordinaires (HAO)": { + "account_number": "318" + }, + "account_number": "31" + }, + "Mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "Mati\u00e8res A": { + "account_number": "321" + }, + "Mati\u00e8res B": { + "account_number": "322" + }, + "Fournitures (A, B)": { + "account_number": "323" + }, + "account_number": "32" + }, + "Autres approvisionnements": { + "Mati\u00e8res consommables": { + "account_number": "331" + }, + "Fournitures d\u2019atelier et d\u2019usine": { + "account_number": "332" + }, + "Fournitures de magasin": { + "account_number": "333" + }, + "Fournitures de bureau": { + "account_number": "334" + }, + "Emballages": { + "Emballages perdus": { + "account_number": "3351" + }, + "Emballages r\u00e9cup\u00e9rables non identifiables": { + "account_number": "3352" + }, + "Emballages \u00e0 usage mixte": { + "account_number": "3353" + }, + "Autres emballages": { + "account_number": "3358" + }, + "account_number": "335" + }, + "Autres mati\u00e8res": { + "account_number": "338" + }, + "account_number": "33" + }, + "Produits en cours": { + "Produits en cours": { + "Produits en cours P1": { + "account_number": "3411" + }, + "Produits en cours P2": { + "account_number": "3412" + }, + "account_number": "341" + }, + "Travaux en cours": { + "Travaux en cours T1": { + "account_number": "3421" + }, + "Travaux en cours T2": { + "account_number": "3422" + }, + "account_number": "342" + }, + "Produits interm\u00e9diaires en cours": { + "Produits interm\u00e9diaires A": { + "account_number": "3431" + }, + "Produits interm\u00e9diaires B": { + "account_number": "3432" + }, + "account_number": "343" + }, + "Produits r\u00e9siduels en cours": { + "Produits r\u00e9siduels A": { + "account_number": "3441" + }, + "Produits r\u00e9siduels B": { + "account_number": "3442" + }, + "account_number": "344" + }, + "Actifs biologiques en cours": { + "Animaux": { + "account_number": "3451" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3452" + }, + "account_number": "345" + }, + "account_number": "34" + }, + "Services en cours": { + "\u00c9tudes en cours": { + "\u00c9tudes en cours E1": { + "account_number": "3511" + }, + "\u00c9tudes en cours E2": { + "account_number": "3512" + }, + "account_number": "351" + }, + "Prestations de services en cours": { + "Prestations de services S1": { + "account_number": "3521" + }, + "Prestations de services S2": { + "account_number": "3522" + } + }, + "account_number": "35" + }, + "Produits finis": { + "Produits finis A": { + "account_number": "361" + }, + "Produits finis B": { + "account_number": "362" + }, + "Actifs biologiques": { + "Animaux": { + "account_number": "3631" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3632" + }, + "Autres stocks (activit\u00e9s annexes)": { + "account_number": "3638" + }, + "account_number": "363" + }, + "account_number": "36" + }, + "Produits interm\u00e9diaires et r\u00e9siduels": { + "Produits interm\u00e9diaires": { + "Produits interm\u00e9diaires A": { + "account_number": "3711" + }, + "Produits interm\u00e9diaires B": { + "account_number": "3712" + }, + "account_number": "371" + }, + "Produits r\u00e9siduels": { + "D\u00e9chets": { + "account_number": "3721" + }, + "Rebuts": { + "account_number": "3722" + }, + "Mati\u00e8res de R\u00e9cup\u00e9ration": { + "account_number": "3723" + }, + "account_number": "372" + }, + "Actifs biologiques": { + "Animaux": { + "account_number": "3731" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3732" + }, + "Autres stocks (activit\u00e9s annexes)": { + "account_number": "3738" + }, + "account_number": "373" + }, + "account_number": "37" + }, + "Stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": { + "account_type": "Stock", + "Marchandises en cours de route": { + "account_number": "381" + }, + "Mati\u00e8res premi\u00e8res et fournitures li\u00e9es en cours de route": { + "account_number": "382" + }, + "Autres approvisionnements en cours de route": { + "account_number": "383" + }, + "Produits finis en cours de route": { + "account_number": "386" + }, + "Stock en consignation ou en d\u00e9p\u00f4t": { + "Stock en consignation": { + "account_number": "3871" + }, + "Stock en d\u00e9p\u00f4t": { + "account_number": "3872" + }, + "account_number": "387" + }, + "Stock provenant d\u2019immobilisations mises hors service ou au rebut": { + "account_number": "388" + }, + "account_number": "38" + }, + "D\u00e9pr\u00e9ciations des stocks et encours de production": { + "D\u00e9pr\u00e9ciations des stocks de marchandises": { + "account_number": "391" + }, + "D\u00e9pr\u00e9ciations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "account_number": "392" + }, + "D\u00e9pr\u00e9ciations des stocks d\u2019autres approvisionnements": { + "account_number": "393" + }, + "D\u00e9pr\u00e9ciations des productions en cours": { + "account_number": "394" + }, + "D\u00e9pr\u00e9ciations des services en cours": { + "account_number": "395" + }, + "D\u00e9pr\u00e9ciations des stocks de produits finis": { + "account_number": "396" + }, + "D\u00e9pr\u00e9ciations des stocks de produits interm\u00e9diaires et r\u00e9siduels": { + "account_number": "397" + }, + "D\u00e9pr\u00e9ciations des stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": { + "account_number": "398" + }, + "account_number": "39" + }, + "root_type": "Asset", + "account_number": "3" + }, + "4-Comptes de Tiers (ACTIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (ACTIF)": { + "Fournisseurs d\u00e9biteurs": { + "Fournisseurs Avances et acomptes vers\u00e9s": { + "account_number": "4091" + }, + "Fournisseurs Groupe avances et acomptes vers\u00e9s": { + "account_number": "4092" + }, + "Fournisseurs Sous-traitants avances et acomptes vers\u00e9s": { + "account_number": "4093" + }, + "Fournisseurs Cr\u00e9ances pour emballages et mat\u00e9riels \u00e0 rendre": { + "account_number": "4094" + }, + "Fournisseurs Rabais, remises, ristournes et autres avoirs \u00e0 obtenir": { + "account_number": "4098" + }, + "account_number": "409" + } + }, + "41-Clients et comptes rattach\u00e9s (ACTIF)": { + "Clients": { + "Clients": { + "account_type": "Receivable", + "account_number": "4111" + }, + "Clients groupe": { + "account_type": "Receivable", + "account_number": "4112" + }, + "Clients, \u00c9tat et Collectivit\u00e9s publiques": { + "account_type": "Receivable", + "account_number": "4114" + }, + "Clients, organismes internationaux": { + "account_type": "Receivable", + "account_number": "4115" + }, + "Clients, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Receivable", + "account_number": "4116" + }, + "Client, retenues de garantie": { + "account_type": "Receivable", + "account_number": "4117" + }, + "Clients, d\u00e9gr\u00e8vement de taxes sur la valeur ajout\u00e9e (TVA)": { + "account_type": "Receivable", + "account_number": "4118" + }, + "account_type": "Receivable", + "account_number": "411" + }, + "Clients, effets \u00e0 recevoir en portefeuille": { + "Clients, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4121" + }, + "Clients Groupe, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4122" + }, + "\u00c9tat et Collectivit\u00e9s publiques, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4124" + }, + "Organismes Internationaux, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4125" + }, + "account_type": "Receivable", + "account_number": "412" + }, + "Clients, ch\u00e8ques, effets et autres valeurs impay\u00e9es": { + "Clients, ch\u00e8ques impay\u00e9s": { + "account_type": "Receivable", + "account_number": "4131" + }, + "Clients, effets impay\u00e9s": { + "account_type": "Receivable", + "account_number": "4132" + }, + "Clients, cartes de cr\u00e9dit impay\u00e9es": { + "account_type": "Receivable", + "account_number": "4133" + }, + "Clients, autres valeurs impay\u00e9es": { + "account_type": "Receivable", + "account_number": "4138" + }, + "account_type": "Receivable", + "account_number": "413" + }, + "Cr\u00e9ances sur cessions courantes d\u2019immobilisations": { + "Cr\u00e9ances en compte, immobilisations incorporelles": { + "account_type": "Receivable", + "account_number": "4141" + }, + "Cr\u00e9ances en compte, immobilisations corporelles": { + "account_type": "Receivable", + "account_number": "4142" + }, + "Effets \u00e0 recevoir, immobilisations incorporelles": { + "account_type": "Receivable", + "account_number": "4146" + }, + "Effets \u00e0 recevoir, immobilisations corporelles": { + "account_type": "Receivable", + "account_number": "4147" + }, + "account_type": "Receivable", + "account_number": "414" + }, + "Clients, effets escompt\u00e9s non \u00e9chus": { + "account_type": "Receivable", + "account_number": "415" + }, + "Cr\u00e9ances clients litigieuses ou douteuses": { + "Cr\u00e9ances litigieuses": { + "account_type": "Receivable", + "account_number": "4161" + }, + "Cr\u00e9ances douteuses": { + "account_type": "Receivable", + "account_number": "4162" + }, + "account_type": "Receivable", + "account_number": "416" + }, + "Clients, produits \u00e0 recevoir": { + "Clients, factures \u00e0 \u00e9tablir": { + "account_type": "Receivable", + "account_number": "4181" + }, + "Clients, int\u00e9r\u00eats courus": { + "account_type": "Receivable", + "account_number": "4186" + }, + "account_type": "Receivable", + "account_number": "418" + }, + "account_type": "Receivable" + }, + "42-Personnel (ACTIF)": { + "Personnel, avances et acomptes": { + "Personnel, avances": { + "account_number": "4211" + }, + "Personnel, acomptes": { + "account_number": "4212" + }, + "Frais avanc\u00e9s et fournitures au personnel": { + "account_number": "4213" + }, + "account_number": "421" + } + }, + "43-Organismes sociaux (ACTIF)": { + "431-S\u00e9curit\u00e9 sociale": { + "Prestations familiales": { + "account_number": "4311" + }, + "Accidents de travail": { + "account_number": "4312" + }, + "Caisse de retraite obligatoire": { + "account_number": "4313" + }, + "Caisse de retraite facultative": { + "account_number": "4314" + }, + "Autres cotisations sociales": { + "account_number": "4318" + } + }, + "432-Caisses de retraite compl\u00e9mentaire": {}, + "433-Autres organismes sociaux": { + "Mutuelle": { + "account_number": "4331" + }, + "Assurances retraite": { + "account_number": "4332" + }, + "Assurances et organismes de sant\u00e9": { + "account_number": "4333" + } + }, + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "Produits \u00e0 recevoir": { + "account_number": "4387" + } + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (ACTIF)": { + "\u00c9tat, TVA factur\u00e9e": { + "TVA factur\u00e9e sur ventes": { + "account_number": "4431" + }, + "TVA factur\u00e9e sur prestations de services": { + "account_number": "4432" + }, + "TVA factur\u00e9e sur travaux": { + "account_number": "4433" + }, + "TVA factur\u00e9e sur production livr\u00e9e \u00e0 soi-m\u00eame": { + "account_number": "4434" + }, + "TVA sur factures \u00e0 \u00e9tablir": { + "account_number": "4435" + }, + "account_number": "443" + }, + "\u00c9tat, TVA r\u00e9cup\u00e9rable": { + "TVA r\u00e9cup\u00e9rable sur immobilisations": { + "account_number": "4451" + }, + "TVA r\u00e9cup\u00e9rable sur achats": { + "account_number": "4452" + }, + "TVA r\u00e9cup\u00e9rable sur transport": { + "account_number": "4453" + }, + "TVA r\u00e9cup\u00e9rable sur services ext\u00e9rieurs et autres charges": { + "account_number": "4454" + }, + "TVA r\u00e9cup\u00e9rable sur factures non parvenues": { + "account_number": "4455" + }, + "TVA transf\u00e9r\u00e9e par d\u2019autres entit\u00e9s": { + "account_number": "4456" + }, + "account_number": "445" + }, + "\u00c9tat, charges \u00e0 payer et produits \u00e0 recevoir": { + "Charges \u00e0 payer": { + "account_number": "4486" + }, + "Produits \u00e0 recevoir": { + "account_number": "4487" + }, + "account_number": "448" + }, + "\u00c9tat, cr\u00e9ances et dettes diverses": { + "\u00c9tat, obligations cautionn\u00e9es": { + "account_number": "4491" + }, + "\u00c9tat, avances et acomptes vers\u00e9s sur imp\u00f4ts": { + "account_number": "4492" + }, + "\u00c9tat, fonds de dotation \u00e0 recevoir": { + "account_number": "4493" + }, + "\u00c9tat, subventions investissement \u00e0 recevoir": { + "account_number": "4494" + }, + "\u00c9tat, subventions d\u2019exploitation \u00e0 recevoir": { + "account_number": "4495" + }, + "\u00c9tat, subventions d\u2019\u00e9quilibre \u00e0 recevoir": { + "account_number": "4496" + }, + "\u00c9tat, avances sur subventions": { + "account_number": "4497" + }, + "\u00c9tat, fonds r\u00e9glement\u00e9s provisionn\u00e9s": { + "account_number": "4499" + }, + "account_number": "449" + } + }, + "45-Organismes internationaux (ACTIF)": { + "Op\u00e9rations avec les organismes africains": { + "account_number": "451" + }, + "Op\u00e9rations avec les autres organismes internationaux": { + "account_number": "452" + }, + "Organismes internationaux, fonds de dotation et subventions \u00e0 recevoir": { + "Organismes internationaux, fonds de dotation \u00e0 recevoir": { + "account_number": "4581" + }, + "Organismes internationaux, subventions \u00e0 recevoir": { + "account_number": "4582" + }, + "account_number": "458" + } + }, + "46-Apporteurs, associ\u00e9s et groupe (ACTIF)": { + "461-Apporteurs, op\u00e9rations sur le capital": { + "Apporteurs, capital appel\u00e9, non vers\u00e9": { + "account_number": "4613" + }, + "Apporteurs, compte d\u2019apport, op\u00e9rations de restructuration (fusion...)": { + "account_number": "4614" + }, + "Apporteurs, titres \u00e0 \u00e9changer": { + "account_number": "4618" + } + }, + "Apporteurs, restant d\u00fb sur capital appel\u00e9": { + "account_number": "467" + } + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (ACTIF)": { + "472-Cr\u00e9ances et dettes sur titres de placement": { + "Cr\u00e9ances sur cessions de titres de placement": { + "account_number": "4721" + }, + "Versements restant \u00e0 effectuer sur titres de placement non lib\u00e9r\u00e9s": { + "account_number": "4726" + } + }, + "473-Interm\u00e9diaires Op\u00e9rations faites pour compte de tiers": { + "Mandants": { + "account_number": "4731" + }, + "Mandataires": { + "account_number": "4732" + }, + "Commettants": { + "account_number": "4733" + }, + "Commissionnaires": { + "account_number": "4734" + }, + "\u00c9tat, Collectivit\u00e9s publiques, fonds global d\u2019allocation": { + "account_number": "4739" + } + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits": { + "Compte de r\u00e9partition p\u00e9riodique des produits": { + "account_number": "4747" + } + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA": { + "Compte actif": { + "account_type": "Temporary", + "account_number": "4751" + } + }, + "Charges constat\u00e9es d\u2019avance": { + "account_number": "476" + }, + "478-\u00c9carts de conversion actif": { + "Diminution des cr\u00e9ances d\u2019exploitation": { + "account_number": "4781" + }, + "Diminution des cr\u00e9ances financi\u00e8res": { + "account_number": "4782" + }, + "Augmentation des dettes d\u2019exploitation": { + "account_number": "4783" + }, + "Augmentation des dettes financi\u00e8res": { + "account_number": "4784" + }, + "Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": { + "account_number": "4786" + }, + "Diff\u00e9rences compens\u00e9es par couverture de change": { + "account_number": "4788" + } + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (ACTIF)": { + "Cr\u00e9ances sur cessions d\u2019immobilisations": { + "En compte, immobilisations incorporelles": { + "account_number": "4851" + }, + "En compte, immobilisations corporelles": { + "account_number": "4852" + }, + "Effets \u00e0 recevoir, immobilisations incorporelles": { + "account_number": "4853" + }, + "Effets \u00e0 recevoir, immobilisations corporelles": { + "account_number": "4854" + }, + "Effets escompt\u00e9s non \u00e9chus": { + "account_number": "4855" + }, + "Retenues de garantie": { + "account_number": "4857" + }, + "Factures \u00e0 \u00e9tablir": { + "account_number": "4858" + }, + "account_number": "485" + }, + "Autres cr\u00e9ances hors activit\u00e9s ordinaires (HAO)": { + "account_number": "488" + } + }, + "49-D\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme (tiers) (ACTIF)": { + "D\u00e9pr\u00e9ciations des comptes clients": { + "Cr\u00e9ances litigieuses": { + "account_number": "4911" + }, + "Cr\u00e9ances douteuses": { + "account_number": "4912" + }, + "account_number": "491" + }, + "D\u00e9pr\u00e9ciations des comptes organismes internationaux": { + "account_number": "495" + }, + "D\u00e9pr\u00e9ciations des comptes apporteurs, associ\u00e9s et groupe": { + "Associ\u00e9s, comptes courants": { + "account_number": "4962" + }, + "Associ\u00e9s, op\u00e9rations faites en commun": { + "account_number": "4963" + }, + "Groupe, comptes courants": { + "account_number": "4966" + }, + "account_number": "496" + }, + "D\u00e9pr\u00e9ciations des comptes d\u00e9biteurs divers": { + "account_number": "497" + }, + "D\u00e9pr\u00e9ciations des comptes de cr\u00e9ances HAO": { + "Cr\u00e9ances sur cessions d\u2019immobilisations": { + "account_number": "4985" + }, + "Cr\u00e9ances sur cessions de titres de placement": { + "account_number": "4986" + }, + "Autres cr\u00e9ances HAO": { + "account_number": "4988" + }, + "account_number": "498" + }, + "Provisions pour risques \u00e0 court terme": { + "Sur op\u00e9rations d\u2019exploitation": { + "account_number": "4991" + }, + "Sur op\u00e9rations financi\u00e8res": { + "account_number": "4997" + }, + "Sur op\u00e9rations HAO": { + "account_number": "4998" + }, + "account_number": "499" + } + }, + "root_type": "Asset" + }, + "4-Comptes de Tiers (PASSIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (PASSIF)": { + "Fournisseurs, dettes en compte": { + "Fournisseurs": { + "account_type": "Payable", + "account_number": "4011" + }, + "Fournisseurs groupe": { + "account_type": "Payable", + "account_number": "4012" + }, + "Fournisseurs sous-traitants": { + "account_type": "Payable", + "account_number": "4013" + }, + "Fournisseurs, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Payable", + "account_number": "4016" + }, + "Fournisseur, retenues de garantie": { + "account_type": "Payable", + "account_number": "4017" + }, + "account_type": "Payable", + "account_number": "401" + }, + "Fournisseurs, effets \u00e0 payer": { + "Fournisseurs Effets \u00e0 payer": { + "account_type": "Payable", + "account_number": "4021" + }, + "Fournisseurs Groupe, effets \u00e0 payer": { + "account_type": "Payable", + "account_number": "4022" + }, + "Fournisseurs Sous-traitants, effets \u00e0 payer": { + "account_type": "Payable", + "account_number": "4023" + }, + "account_type": "Payable", + "account_number": "402" + }, + "Fournisseurs, acquisitions courantes d\u2019immobilisations": { + "Fournisseurs Dettes en comptes, immobilisations incorporelles": { + "account_type": "Payable", + "account_number": "4041" + }, + "Fournisseurs Dettes en comptes, immobilisations corporelles": { + "account_type": "Payable", + "account_number": "4042" + }, + "Fournisseurs Effets \u00e0 payer, immobilisations incorporelles": { + "account_type": "Payable", + "account_number": "4046" + }, + "Fournisseurs Effets \u00e0 payer, immobilisations corporelles": { + "account_type": "Payable", + "account_number": "4047" + }, + "account_type": "Payable", + "account_number": "404" + }, + "Fournisseurs, factures non parvenues": { + "Fournisseurs": { + "account_type": "Stock Received But Not Billed", + "account_number": "4081" + }, + "Fournisseurs groupe": { + "account_type": "Stock Received But Not Billed", + "account_number": "4082" + }, + "Fournisseurs sous-traitants": { + "account_type": "Stock Received But Not Billed", + "account_number": "4083" + }, + "Fournisseurs, int\u00e9r\u00eats courus": { + "account_type": "Stock Received But Not Billed", + "account_number": "4086" + }, + "account_type": "Stock Received But Not Billed", + "account_number": "408" + }, + "account_type": "Payable" + }, + "41-Clients et comptes rattach\u00e9s (PASSIF)": { + "Clients cr\u00e9diteurs": { + "Clients, avances et acomptes re\u00e7us": { + "account_number": "4191" + }, + "Clients groupe, avances et acomptes re\u00e7us": { + "account_number": "4192" + }, + "Clients, dettes pour emballages et mat\u00e9riels consign\u00e9s": { + "account_number": "4194" + }, + "Clients, rabais, remises, ristournes et autres avoirs \u00e0 accorder": { + "account_number": "4198" + }, + "account_number": "419" + } + }, + "42-Personnel (PASSIF)": { + "Personnel, r\u00e9mun\u00e9rations dues": { + "account_number": "422" + }, + "Personnel, oppositions, saisies-arr\u00eats": { + "Personnel, oppositions": { + "account_number": "4231" + }, + "Personnel, saisies-arr\u00eats": { + "account_number": "4232" + }, + "Personnel, avis \u00e0 tiers d\u00e9tenteur": { + "account_number": "4233" + }, + "account_number": "423" + }, + "Personnel, \u0153uvres sociales internes": { + "Assistance m\u00e9dicale": { + "account_number": "4241" + }, + "Allocations familiales": { + "account_number": "4242" + }, + "Organismes sociaux rattach\u00e9s \u00e0 l\u2019entit\u00e9": { + "account_number": "4245" + }, + "Autres \u0153uvres sociales internes": { + "account_number": "4248" + }, + "account_number": "424" + }, + "Repr\u00e9sentants du personnel": { + "D\u00e9l\u00e9gu\u00e9s du personnel": { + "account_number": "4251" + }, + "Syndicats et Comit\u00e9s d\u2019entreprises, d\u2019\u00c9tablissement": { + "account_number": "4252" + }, + "Autres repr\u00e9sentants du personnel": { + "account_number": "4258" + }, + "account_number": "425" + }, + "Personnel, participation aux b\u00e9n\u00e9fices et au capital": { + "Participation aux b\u00e9n\u00e9fices": { + "account_number": "4261" + }, + "Participation au capital": { + "account_number": "4264" + }, + "account_number": "426" + }, + "Personnel d\u00e9p\u00f4ts": { + "account_number": "427" + }, + "Personnel, charges \u00e0 payer et produits \u00e0 recevoir": { + "Dettes provisionn\u00e9es pour cong\u00e9s \u00e0 payer": { + "account_number": "4281" + }, + "Autres charges \u00e0 payer": { + "account_number": "4286" + }, + "Produits \u00e0 recevoir": { + "account_number": "4287" + }, + "account_number": "428" + } + }, + "43-Organismes sociaux (PASSIF)": { + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "Charges sociales sur gratifications \u00e0 payer": { + "account_number": "4381" + }, + "Charges sociales sur cong\u00e9s \u00e0 payer": { + "account_number": "4382" + }, + "Autres charges \u00e0 payer": { + "account_number": "4386" + } + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (PASSIF)": { + "\u00c9tat, imp\u00f4t sur les b\u00e9n\u00e9fices": { + "account_number": "441" + }, + "\u00c9tat, autres imp\u00f4ts et taxes": { + "Imp\u00f4ts et taxes d\u2019\u00c9tat": { + "account_number": "4421" + }, + "Imp\u00f4ts et taxes pour les collectivit\u00e9s publiques": { + "account_number": "4422" + }, + "Imp\u00f4ts et taxes recouvrables sur des obligataires": { + "account_number": "4423" + }, + "Imp\u00f4ts et taxes recouvrables sur des associ\u00e9s": { + "account_number": "4424" + }, + "Droits de douane": { + "account_number": "4426" + }, + "Autres imp\u00f4ts et taxes": { + "account_number": "4428" + }, + "account_number": "442" + }, + "\u00c9tat, TVA due ou cr\u00e9dit de TVA": { + "\u00c9tat, TVA due": { + "account_number": "4441" + }, + "\u00c9tat, cr\u00e9dit de TVA \u00e0 reporter": { + "account_number": "4449" + }, + "account_number": "444" + }, + "\u00c9tat, autres taxes sur le chiffre d\u2019affaires": { + "account_number": "446" + }, + "\u00c9tat, imp\u00f4ts retenus \u00e0 la source": { + "Imp\u00f4t G\u00e9n\u00e9ral sur le revenu": { + "account_number": "4471" + }, + "Imp\u00f4ts sur salaires": { + "account_number": "4472" + }, + "Contribution nationale": { + "account_number": "4473" + }, + "Contribution nationale de solidarit\u00e9": { + "account_number": "4474" + }, + "Autres imp\u00f4ts et contributions": { + "account_number": "4478" + }, + "account_number": "447" + } + }, + "46-Apporteurs, associ\u00e9s et groupe (PASSIF)": { + "461-Apporteurs, op\u00e9rations sur le capital (PASSIF)": { + "Apporteurs, apports en nature": { + "account_number": "4611" + }, + "Apporteurs, apports en num\u00e9raire": { + "account_number": "4612" + }, + "Apporteurs, versements re\u00e7us sur augmentation de capital": { + "account_number": "4615" + }, + "Apporteurs, versements anticip\u00e9s": { + "account_number": "4616" + }, + "Apporteurs d\u00e9faillants": { + "account_number": "4617" + }, + "Apporteurs, capital \u00e0 rembourser": { + "account_number": "4619" + } + }, + "462-Associ\u00e9s, comptes courants": { + "Principal": { + "account_number": "4621" + }, + "Int\u00e9r\u00eats courus": { + "account_number": "4626" + } + }, + "463-Associ\u00e9s, op\u00e9rations faites en commun et GIE": { + "Op\u00e9rations courantes": { + "account_number": "4631" + }, + "Int\u00e9r\u00eats courus": { + "account_number": "4636" + } + }, + "Associ\u00e9s, dividendes \u00e0 payer": { + "account_number": "465" + }, + "Groupe, comptes courants": { + "account_number": "466" + } + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (PASSIF)": { + "471-D\u00e9biteurs et cr\u00e9diteurs divers": { + "D\u00e9biteurs divers": { + "account_number": "4711" + }, + "Cr\u00e9diteurs divers": { + "account_number": "4712" + }, + "Obligataires": { + "account_number": "4713" + }, + "R\u00e9mun\u00e9rations d\u2019administrateurs": { + "account_number": "4715" + }, + "Compte d\u2019affacturage": { + "account_number": "4716" + }, + "D\u00e9biteurs divers retenues de garantie": { + "account_number": "4717" + }, + "Apport, compte de fusion et op\u00e9rations assimil\u00e9es": { + "account_number": "4718" + }, + "Bons de souscription d\u2019actions et d\u2019obligations": { + "account_number": "4719" + } + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits (PASSIF)": { + "Compte de r\u00e9partition p\u00e9riodique des charges": { + "account_number": "4746" + } + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA (PASSIF)": { + "Compte passif": { + "account_number": "4752" + } + }, + "Produits constat\u00e9s d\u2019avance": { + "account_number": "477" + }, + "479-\u00c9carts de conversion passif": { + "Augmentation des cr\u00e9ances d\u2019exploitation": { + "account_number": "4791" + }, + "Augmentation des cr\u00e9ances financi\u00e8res": { + "account_number": "4792" + }, + "Diminution des dettes d\u2019exploitation": { + "account_number": "4793" + }, + "Diminution des dettes financi\u00e8res": { + "account_number": "4794" + }, + "Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": { + "account_number": "4797" + }, + "Diff\u00e9rences compens\u00e9es par couverture de change": { + "account_number": "4798" + } + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (HAO) (PASSIF)": { + "Fournisseurs d\u2019investissements": { + "Immobilisations incorporelles": { + "account_number": "4811" + }, + "Immobilisations corporelles": { + "account_number": "4812" + }, + "Versements restant \u00e0 effectuer sur titres de participation et titres immobilis\u00e9s non lib\u00e9r\u00e9s": { + "account_number": "4813" + }, + "R\u00e9serve de propri\u00e9t\u00e9": { + "account_number": "4816" + }, + "Retenues de garantie": { + "account_number": "4817" + }, + "Factures non parvenues": { + "account_number": "4818" + }, + "account_number": "481" + }, + "Fournisseurs d\u2019investissements, effets \u00e0 payer": { + "Immobilisations incorporelles": { + "account_number": "4821" + }, + "Immobilisations corporelles": { + "account_number": "4822" + }, + "account_number": "482" + }, + "Autres dettes hors activit\u00e9s ordinaires (HAO)": { + "Produits": { + "account_number": "4887" + }, + "account_number": "484" + } + }, + "root_type": "Liability" + }, + "Comptes de tr\u00e9sorerie": { + "Titres de placement": { + "Titres du tr\u00e9sor et bons de caisse \u00e0 court terme": { + "Titres du Tr\u00e9sor \u00e0 court terme": { + "account_number": "5011" + }, + "Titres d\u2019organismes financiers": { + "account_number": "5012" + }, + "Bons de caisse \u00e0 court terme": { + "account_number": "5013" + }, + "Frais d\u2019acquisition des titres de tr\u00e9sor et bons de caisse": { + "account_number": "5016" + }, + "account_number": "501" + }, + "Actions": { + "Actions ou parts propres": { + "account_number": "5021" + }, + "Actions cot\u00e9es": { + "account_number": "5022" + }, + "Actions non cot\u00e9es": { + "account_number": "5023" + }, + "Actions d\u00e9membr\u00e9es (certificats d\u2019investissement, droits de vote)": { + "account_number": "5024" + }, + "Autres actions": { + "account_number": "5025" + }, + "Frais d\u2019acquisition des actions": { + "account_number": "5026" + }, + "account_number": "502" + }, + "Obligations": { + "Obligations \u00e9mises par la soci\u00e9t\u00e9 et rachet\u00e9es par elle": { + "account_number": "5031" + }, + "Obligations cot\u00e9es": { + "account_number": "5032" + }, + "Obligations non cot\u00e9es": { + "account_number": "5033" + }, + "Autres obligations": { + "account_number": "5035" + }, + "Frais d\u2019acquisition des obligations": { + "account_number": "5036" + }, + "account_number": "503" + }, + "Bons de souscription": { + "Bons de souscription d\u2019actions": { + "account_number": "5042" + }, + "Bons de souscription d\u2019obligations": { + "account_number": "5043" + }, + "account_number": "504" + }, + "Titres n\u00e9gociables hors r\u00e9gion": { + "account_number": "505" + }, + "Int\u00e9r\u00eats courus": { + "Titres du Tr\u00e9sor et bons de caisse \u00e0 court terme": { + "account_number": "5061" + }, + "Actions": { + "account_number": "5062" + }, + "Obligations": { + "account_number": "5063" + }, + "account_number": "506" + }, + "Autres titres de placement et cr\u00e9ances assimil\u00e9es": { + "account_number": "508" + }, + "account_number": "50" + }, + "Valeurs \u00e0 encaisser": { + "Effets \u00e0 encaisser": { + "account_number": "511" + }, + "Effets \u00e0 l\u2019encaissement": { + "account_number": "512" + }, + "Ch\u00e8ques \u00e0 encaisser": { + "account_number": "513" + }, + "Ch\u00e8ques \u00e0 l\u2019encaissement": { + "account_number": "514" + }, + "Cartes de cr\u00e9dit \u00e0 encaisser": { + "account_number": "515" + }, + "Autres valeurs \u00e0 l\u2019encaissement": { + "Warrants": { + "account_number": "5181" + }, + "Billets de fonds": { + "account_number": "5182" + }, + "Ch\u00e8ques de voyage": { + "account_number": "5185" + }, + "Coupons \u00e9chus": { + "account_number": "5186" + }, + "Int\u00e9r\u00eats \u00e9chus des obligations": { + "account_number": "5187" + }, + "account_number": "518" + }, + "account_number": "51" + }, + "Banques": { + "Banques locales": { + "Banques en monnaie nationale": { + "account_type": "Bank", + "account_number": "5211" + }, + "Banques en devises": { + "account_type": "Bank", + "account_number": "5215" + }, + "account_type": "Bank", + "account_number": "521" + }, + "Banques autres \u00c9tats r\u00e9gion": { + "account_number": "522" + }, + "Banques autres \u00c9tats zone mon\u00e9taire": { + "account_number": "523" + }, + "Banques hors zone mon\u00e9taire": { + "account_number": "524" + }, + "Banques d\u00e9p\u00f4t \u00e0 terme": { + "account_number": "525" + }, + "Banques, int\u00e9r\u00eats courus": { + "Banque, int\u00e9r\u00eats courus, charges \u00e0 payer": { + "account_number": "5261" + }, + "Banque, int\u00e9r\u00eats courus, produits \u00e0 recevoir": { + "account_number": "5267" + }, + "account_number": "526" + }, + "account_number": "52" + }, + "\u00c9tablissements financiers et assimil\u00e9s": { + "Ch\u00e8ques postaux": { + "account_number": "531" + }, + "Tr\u00e9sor": { + "account_number": "532" + }, + "Soci\u00e9t\u00e9s de gestion et d\u2019interm\u00e9diation (SGI)": { + "account_number": "533" + }, + "\u00c9tablissements financiers, int\u00e9r\u00eats courus": { + "account_number": "536" + }, + "Autres organismes financiers": { + "account_number": "538" + }, + "account_number": "53" + }, + "Instruments de tr\u00e9sorerie": { + "Options de taux d\u2019int\u00e9r\u00eat": { + "account_number": "541" + }, + "Options de taux de change": { + "account_number": "542" + }, + "Options de taux boursiers": { + "account_number": "543" + }, + "Instruments de march\u00e9s \u00e0 terme": { + "account_number": "544" + }, + "Avoirs d\u2019or et autres m\u00e9taux pr\u00e9cieux": { + "account_number": "545" + }, + "account_number": "54" + }, + "Instruments de monnaie \u00e9lectronique": { + "Monnaie \u00e9lectronique carte carburant": { + "account_number": "551" + }, + "Monnaie \u00e9lectronique t\u00e9l\u00e9phone portable": { + "account_number": "552" + }, + "Monnaie \u00e9lectronique carte p\u00e9age": { + "account_number": "553" + }, + "Porte-monnaie \u00e9lectronique": { + "account_number": "554" + }, + "Autres instruments de monnaies \u00e9lectroniques": { + "account_number": "558" + }, + "account_number": "55" + }, + "Banques, cr\u00e9dits de tr\u00e9sorerie et d\u2019escompte": { + "Cr\u00e9dits de tr\u00e9sorerie": { + "account_number": "561" + }, + "Escompte de cr\u00e9dits de campagne": { + "account_number": "564" + }, + "Escompte de cr\u00e9dits ordinaires": { + "account_number": "565" + }, + "Banques, cr\u00e9dits de tr\u00e9sorerie, int\u00e9r\u00eats courus": { + "account_number": "566" + }, + "account_number": "56" + }, + "Caisse": { + "Caisse si\u00e8ge social": { + "Caisse en monnaie nationale": { + "account_number": "5711" + }, + "Caisse en devises": { + "account_number": "5712" + }, + "account_number": "571" + }, + "Caisse succursale A": { + "En monnaie nationale": { + "account_number": "5721" + }, + "En devises": { + "account_number": "5722" + }, + "account_number": "572" + }, + "Caisse succursale B": { + "En monnaie nationale": { + "account_number": "5731" + }, + "En devises": { + "account_number": "5732" + }, + "account_number": "573" + }, + "account_number": "57" + }, + "R\u00e9gies d\u2019avances, accr\u00e9ditifs et virements internes": { + "R\u00e9gies d\u2019avance": { + "account_number": "581" + }, + "Accr\u00e9ditifs": { + "account_number": "582" + }, + "Virements de fonds": { + "account_number": "585" + }, + "Autres virements internes": { + "account_number": "588" + }, + "account_number": "58" + }, + "D\u00e9pr\u00e9ciations et provisions pour risque \u00e0 court terme": { + "D\u00e9pr\u00e9ciations des titres de placement": { + "account_number": "590" + }, + "D\u00e9pr\u00e9ciations des titres et valeurs \u00e0 encaisser": { + "account_number": "591" + }, + "D\u00e9pr\u00e9ciations des comptes banques": { + "account_number": "592" + }, + "D\u00e9pr\u00e9ciations des comptes \u00e9tablissements financiers et assimil\u00e9s": { + "account_number": "593" + }, + "D\u00e9pr\u00e9ciations des comptes d\u2019instruments de tr\u00e9sorerie": { + "account_number": "594" + }, + "Provisions pour risque \u00e0 court terme \u00e0 caract\u00e8re financier": { + "account_number": "599" + }, + "account_number": "59" + }, + "root_type": "Asset", + "account_number": "5" + }, + "Comptes de charges des activit\u00e9s ordinaires": { + "Achats et variations de stocks": { + "Achats de marchandises": { + "Dans la R\u00e9gion": { + "account_number": "6011" + }, + "Hors R\u00e9gion": { + "account_number": "6012" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "6013" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "6014" + }, + "Frais sur achats": { + "account_number": "6015" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6019" + }, + "account_number": "601" + }, + "Achats de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "Dans la R\u00e9gion": { + "account_number": "6021" + }, + "Hors R\u00e9gion": { + "account_number": "6022" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "6023" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "6024" + }, + "Frais sur achats": { + "account_number": "6025" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6029" + }, + "account_number": "602" + }, + "Variations des stocks de biens achet\u00e9s": { + "Variations des stocks de marchandises": { + "account_number": "6031" + }, + "Variations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "account_number": "6032" + }, + "Variations des stocks d\u2019autres approvisionnements": { + "account_number": "6033" + }, + "account_number": "603" + }, + "Achats stock\u00e9s de mati\u00e8res et fournitures consommables": { + "Mati\u00e8res consommables": { + "account_number": "6041" + }, + "Mati\u00e8res combustibles": { + "account_number": "6042" + }, + "Produits d\u2019entretien": { + "account_number": "6043" + }, + "Fournitures d\u2019atelier et d\u2019usine": { + "account_number": "6044" + }, + "Frais sur achat": { + "account_number": "6045" + }, + "Fournitures de magasin": { + "account_number": "6046" + }, + "Fournitures de bureau": { + "account_number": "6047" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6049" + }, + "account_number": "604" + }, + "Autres achats": { + "Fournitures non stockables Eau": { + "account_number": "6051" + }, + "Fournitures non stockables \u00c9lectricit\u00e9": { + "account_number": "6052" + }, + "Fournitures non stockables Autres \u00e9nergies": { + "account_number": "6053" + }, + "Fournitures d\u2019entretien non stockables": { + "account_number": "6054" + }, + "Fournitures de bureau non stockables": { + "account_number": "6055" + }, + "Achats de petit mat\u00e9riel et outillage": { + "account_number": "6056" + }, + "Achats d\u2019\u00e9tudes et prestations de services": { + "account_number": "6057" + }, + "Achats de travaux, mat\u00e9riels et \u00e9quipements": { + "account_number": "6058" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6059" + }, + "account_number": "605" + }, + "Achats d\u2019emballages": { + "Emballages perdus": { + "account_number": "6081" + }, + "Emballages r\u00e9cup\u00e9rables non identifiables": { + "account_number": "6082" + }, + "Emballages \u00e0 usage mixte": { + "account_number": "6083" + }, + "Frais sur achats": { + "account_number": "6085" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6089" + }, + "account_number": "608" + }, + "account_number": "60" + }, + "Transports": { + "Transports sur ventes": { + "account_number": "612" + }, + "Transports pour le compte de tiers": { + "account_number": "613" + }, + "Transports du personnel": { + "account_number": "614" + }, + "Transports de plis": { + "account_number": "616" + }, + "Autres frais de transport": { + "Voyages et d\u00e9placements": { + "account_number": "6181" + }, + "Transports entre \u00e9tablissements ou chantiers": { + "account_number": "6182" + }, + "Transports administratifs": { + "account_number": "6183" + }, + "account_number": "618" + }, + "account_number": "61" + }, + "Services ext\u00e9rieurs": { + "Sous-traitance g\u00e9n\u00e9rale": { + "account_number": "621" + }, + "Locations, charges locatives": { + "Locations de terrains": { + "account_number": "6221" + }, + "Locations de b\u00e2timents": { + "account_number": "6222" + }, + "Locations de mat\u00e9riels et outillages": { + "account_number": "6223" + }, + "Malis sur emballages": { + "account_number": "6224" + }, + "Locations d\u2019emballages": { + "account_number": "6225" + }, + "Fermages et loyers du foncier": { + "account_number": "6226" + }, + "Locations et charges locatives diverses": { + "account_number": "6228" + }, + "account_number": "622" + }, + "Redevances de location acquisition": { + "Cr\u00e9dit-bail immobilier": { + "account_number": "6232" + }, + "Cr\u00e9dit-bail mobilier": { + "account_number": "6233" + }, + "Location-vente": { + "account_number": "6234" + }, + "Autres contrats de location acquisition": { + "account_number": "6238" + }, + "account_number": "623" + }, + "Entretien, r\u00e9parations, remise en \u00e9tat et maintenance": { + "Entretien et r\u00e9parations des biens immobiliers": { + "account_number": "6241" + }, + "Entretien et r\u00e9parations des biens mobiliers": { + "account_number": "6242" + }, + "Maintenance": { + "account_number": "6243" + }, + "Charges de d\u00e9mant\u00e8lement et remise en \u00e9tat": { + "account_number": "6244" + }, + "Autres entretiens et r\u00e9parations": { + "account_number": "6248" + }, + "account_number": "624" + }, + "Primes d\u2019assurance": { + "Assurances multirisques": { + "account_number": "6251" + }, + "Assurances mat\u00e9riel de transport": { + "account_number": "6252" + }, + "Assurances risques d\u2019exploitation": { + "account_number": "6253" + }, + "Assurances responsabilit\u00e9 du producteur": { + "account_number": "6254" + }, + "Assurances insolvabilit\u00e9 clients": { + "account_number": "6255" + }, + "Assurances transport sur ventes": { + "account_number": "6257" + }, + "Autres primes d\u2019assurances": { + "account_number": "6258" + }, + "account_number": "625" + }, + "\u00c9tudes, recherches et documentation": { + "\u00c9tudes et recherches": { + "account_number": "6261" + }, + "Documentation g\u00e9n\u00e9rale": { + "account_number": "6265" + }, + "Documentation technique": { + "account_number": "6266" + }, + "account_number": "626" + }, + "Publicit\u00e9, publications, relations publiques": { + "Annonces, insertions": { + "account_number": "6271" + }, + "Catalogues, imprim\u00e9s publicitaires": { + "account_number": "6272" + }, + "\u00c9chantillons": { + "account_number": "6273" + }, + "Foires et expositions": { + "account_number": "6274" + }, + "Publications": { + "account_number": "6275" + }, + "Cadeaux \u00e0 la client\u00e8le": { + "account_number": "6276" + }, + "Frais de colloques, s\u00e9minaires, conf\u00e9rences": { + "account_number": "6277" + }, + "Autres charges de publicit\u00e9 et relations publiques": { + "account_number": "6278" + }, + "account_number": "627" + }, + "Frais de t\u00e9l\u00e9communications": { + "Frais de t\u00e9l\u00e9phone": { + "account_number": "6281" + }, + "Frais de t\u00e9lex": { + "account_number": "6282" + }, + "Frais de t\u00e9l\u00e9copie": { + "account_number": "6283" + }, + "Autres frais de t\u00e9l\u00e9communications": { + "account_number": "6288" + }, + "account_number": "628" + }, + "account_number": "62" + }, + "Autres services ext\u00e9rieurs": { + "Frais bancaires": { + "Frais sur titres (vente, garde)": { + "account_number": "6311" + }, + "Frais sur effets": { + "account_number": "6312" + }, + "Location de coffres": { + "account_number": "6313" + }, + "Commissions d\u2019affacturage": { + "account_number": "6314" + }, + "Commissions sur cartes de cr\u00e9dit": { + "account_number": "6315" + }, + "Frais d\u2019\u00e9mission d\u2019emprunts": { + "account_number": "6316" + }, + "Frais sur instruments monnaie \u00e9lectronique": { + "account_number": "6317" + }, + "Autres frais bancaires": { + "account_number": "6318" + }, + "account_number": "631" + }, + "R\u00e9mun\u00e9rations d\u2019interm\u00e9diaires et de conseils": { + "Commissions et courtages sur ventes": { + "account_number": "6322" + }, + "Honoraires des professions r\u00e9glement\u00e9es": { + "account_number": "6324" + }, + "Frais d\u2019actes et de contentieux": { + "account_number": "6325" + }, + "R\u00e9mun\u00e9rations d\u2019affacturage": { + "account_number": "6326" + }, + "R\u00e9mun\u00e9rations des autres prestataires de services": { + "account_number": "6327" + }, + "Divers frais": { + "account_number": "6328" + }, + "account_number": "632" + }, + "Frais de formation du personnel": { + "account_number": "633" + }, + "Redevances pour brevets, licences, logiciels, concessions et droits et valeurs similaires": { + "Redevances pour brevets, licences": { + "account_number": "6342" + }, + "Redevances pour logiciels": { + "account_number": "6343" + }, + "Redevances pour marques": { + "account_number": "6344" + }, + "Redevances pour sites internet": { + "account_number": "6345" + }, + "Redevances pour concessions, droits et valeurs similaires": { + "account_number": "6346" + }, + "account_number": "634" + }, + "Cotisations": { + "Cotisations": { + "account_number": "6351" + }, + "Concours divers": { + "account_number": "6358" + }, + "account_number": "635" + }, + "R\u00e9mun\u00e9rations de personnel ext\u00e9rieur \u00e0 l\u2019entit\u00e9": { + "Personnel int\u00e9rimaire": { + "account_number": "6371" + }, + "Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": { + "account_number": "6372" + }, + "account_number": "637" + }, + "Autres charges externes": { + "Frais de recrutement du personnel": { + "account_number": "6381" + }, + "Frais de d\u00e9m\u00e9nagement": { + "account_number": "6382" + }, + "R\u00e9ceptions": { + "account_number": "6383" + }, + "Missions": { + "account_number": "6384" + }, + "Charges de copropri\u00e9t\u00e9": { + "account_number": "6385" + }, + "account_number": "638" + }, + "account_number": "63" + }, + "Imp\u00f4ts et taxes": { + "Imp\u00f4ts et taxes directs": { + "Imp\u00f4ts fonciers et taxes annexes": { + "account_number": "6411" + }, + "Patentes, licences et taxes annexes": { + "account_number": "6412" + }, + "Taxes sur appointements et salaires": { + "account_number": "6413" + }, + "Taxes d\u2019apprentissage": { + "account_number": "6414" + }, + "Formation professionnelle continue": { + "account_number": "6415" + }, + "Autres imp\u00f4ts et taxes directs": { + "account_number": "6418" + }, + "account_number": "641" + }, + "Imp\u00f4ts et taxes indirects": { + "account_number": "645" + }, + "Droits d\u2019enregistrement": { + "Droits de mutation": { + "account_number": "6461" + }, + "Droits de timbre": { + "account_number": "6462" + }, + "Taxes sur les v\u00e9hicules de soci\u00e9t\u00e9": { + "account_number": "6463" + }, + "Vignettes": { + "account_number": "6464" + }, + "Autres droits": { + "account_number": "6468" + }, + "account_number": "646" + }, + "P\u00e9nalit\u00e9s, amendes fiscales": { + "P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts directs": { + "account_number": "6471" + }, + "P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts indirects": { + "account_number": "6472" + }, + "P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts directs": { + "account_number": "6473" + }, + "P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts indirects": { + "account_number": "6474" + }, + "Autres p\u00e9nalit\u00e9s et amendes fiscales": { + "account_number": "6478" + }, + "account_number": "647" + }, + "Autres imp\u00f4ts et taxes": { + "account_number": "648" + }, + "account_number": "64" + }, + "Autres charges": { + "Pertes sur cr\u00e9ances clients et autres d\u00e9biteurs": { + "Clients": { + "account_number": "6511" + }, + "Autres d\u00e9biteurs": { + "account_number": "6515" + }, + "account_number": "651" + }, + "Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "Quote-part transf\u00e9r\u00e9e de b\u00e9n\u00e9fices (comptabilit\u00e9 du g\u00e9rant)": { + "account_number": "6521" + }, + "Pertes imput\u00e9es par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": { + "account_number": "6525" + }, + "account_number": "652" + }, + "Valeurs comptables des cessions courantes d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "6541" + }, + "Immobilisations corporelles": { + "account_number": "6542" + }, + "account_number": "654" + }, + "Perte de change sur cr\u00e9ances et dettes commerciale": { + "account_number": "656" + }, + "P\u00e9nalit\u00e9s et amendes p\u00e9nales": { + "account_number": "657" + }, + "Charges diverses": { + "Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": { + "account_number": "6581" + }, + "Dons": { + "account_number": "6582" + }, + "M\u00e9c\u00e9nat": { + "account_number": "6583" + }, + "Autres charges diverses": { + "account_number": "6588" + }, + "account_number": "658" + }, + "Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "Sur risques \u00e0 court terme": { + "account_number": "6591" + }, + "Sur stocks": { + "account_number": "6593" + }, + "Sur cr\u00e9ances": { + "account_number": "6594" + }, + "Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme": { + "account_number": "6598" + }, + "account_number": "659" + }, + "account_number": "65" + }, + "Charges de personnel": { + "R\u00e9mun\u00e9rations directes vers\u00e9es au personnel national": { + "Appointements salaires et commissions": { + "account_number": "6611" + }, + "Primes et gratifications": { + "account_number": "6612" + }, + "Cong\u00e9s pay\u00e9s": { + "account_number": "6613" + }, + "Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": { + "account_number": "6614" + }, + "Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": { + "account_number": "6615" + }, + "Suppl\u00e9ment familial": { + "account_number": "6616" + }, + "Avantages en nature": { + "account_number": "6617" + }, + "Autres r\u00e9mun\u00e9rations directes": { + "account_number": "6618" + }, + "account_number": "661" + }, + "R\u00e9mun\u00e9rations directes vers\u00e9es au personnel non national": { + "Appointements salaires et commissions": { + "account_number": "6621" + }, + "Primes et gratifications": { + "account_number": "6622" + }, + "Cong\u00e9s pay\u00e9s": { + "account_number": "6623" + }, + "Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": { + "account_number": "6624" + }, + "Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": { + "account_number": "6625" + }, + "Suppl\u00e9ment familial": { + "account_number": "6626" + }, + "Avantages en nature": { + "account_number": "6627" + }, + "Autres r\u00e9mun\u00e9rations directes": { + "account_number": "6628" + }, + "account_number": "662" + }, + "Indemnit\u00e9s forfaitaires vers\u00e9es au personnel": { + "Indemnit\u00e9s de logement": { + "account_number": "6631" + }, + "Indemnit\u00e9s de repr\u00e9sentation": { + "account_number": "6632" + }, + "Indemnit\u00e9s d\u2019expatriation": { + "account_number": "6633" + }, + "Indemnit\u00e9s de transport": { + "account_number": "6634" + }, + "Autres indemnit\u00e9s et avantages divers": { + "account_number": "6638" + }, + "account_number": "663" + }, + "Charges sociales": { + "Charges sociales sur r\u00e9mun\u00e9ration du personnel national": { + "account_number": "6641" + }, + "Charges sociales sur r\u00e9mun\u00e9ration du personnel non national": { + "account_number": "6642" + }, + "account_number": "664" + }, + "R\u00e9mun\u00e9rations et charges sociales de l\u2019exploitant individuel": { + "R\u00e9mun\u00e9ration du travail de l\u2019exploitant": { + "account_number": "6661" + }, + "Charges sociales": { + "account_number": "6662" + }, + "account_number": "666" + }, + "R\u00e9mun\u00e9ration transf\u00e9r\u00e9e de personnel ext\u00e9rieur": { + "Personnel int\u00e9rimaire": { + "account_number": "6671" + }, + "Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": { + "account_number": "6672" + }, + "account_number": "667" + }, + "Autres charges sociales": { + "Versements aux syndicats et comit\u00e9s d\u2019entreprise, d\u2019\u00e9tablissement": { + "account_number": "6681" + }, + "Versements aux comit\u00e9s d\u2019hygi\u00e8ne et de s\u00e9curit\u00e9": { + "account_number": "6682" + }, + "Versements et contributions aux autres \u0153uvres sociales": { + "account_number": "6683" + }, + "M\u00e9decine du travail et pharmacie": { + "account_number": "6684" + }, + "Assurances et organismes de sant\u00e9": { + "account_number": "6685" + }, + "Assurances retraite et fonds de pension": { + "account_number": "6686" + }, + "Majorations et p\u00e9nalit\u00e9s sociales": { + "account_number": "6687" + }, + "Charges sociales diverses": { + "account_number": "6688" + }, + "account_number": "668" + }, + "account_number": "66" + }, + "Frais financiers et charges assimil\u00e9es": { + "Int\u00e9r\u00eats des emprunts": { + "Emprunts obligataires": { + "account_number": "6711" + }, + "Emprunts aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": { + "account_number": "6712" + }, + "Dettes li\u00e9es \u00e0 des participations": { + "account_number": "6713" + }, + "Primes de remboursement des obligations": { + "account_number": "6714" + }, + "account_number": "671" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition": { + "Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail immobilier": { + "account_number": "6722" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail mobilier": { + "account_number": "6723" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition / location-vente": { + "account_number": "6724" + }, + "Int\u00e9r\u00eats dans loyers des autres locations acquisition": { + "account_number": "6728" + }, + "account_number": "672" + }, + "Escomptes accord\u00e9s": { + "account_number": "673" + }, + "Autres int\u00e9r\u00eats": { + "Avances re\u00e7ues et d\u00e9p\u00f4ts cr\u00e9diteurs": { + "account_number": "6741" + }, + "Comptes courants bloqu\u00e9s": { + "account_number": "6742" + }, + "Int\u00e9r\u00eats sur obligations cautionn\u00e9es": { + "account_number": "6743" + }, + "Int\u00e9r\u00eats sur dettes commerciales": { + "account_number": "6744" + }, + "Int\u00e9r\u00eats bancaires et sur op\u00e9rations de financement (escompte...)": { + "account_number": "6745" + }, + "Int\u00e9r\u00eats sur dettes diverses": { + "account_number": "6748" + }, + "account_number": "674" + }, + "Escomptes des effets de commerce": { + "account_number": "675" + }, + "Pertes de change financi\u00e8res": { + "account_number": "676" + }, + "Pertes sur titres de placement": { + "Pertes sur cessions de titres de placement": { + "account_number": "6771" + }, + "Mali provenant d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": { + "account_number": "6772" + }, + "account_number": "677" + }, + "Pertes et charges sur risques financiers": { + "Sur rentes viag\u00e8res": { + "account_number": "6781" + }, + "Sur op\u00e9rations financi\u00e8res": { + "account_number": "6782" + }, + "Sur instruments de tr\u00e9sorerie": { + "account_number": "6784" + }, + "account_number": "678" + }, + "Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "Sur risques financiers": { + "account_number": "6791" + }, + "Sur titres de placement": { + "account_number": "6795" + }, + "Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "account_number": "6798" + }, + "account_number": "679" + }, + "account_number": "67" + }, + "Dotations aux amortissements": { + "Dotations aux amortissements d\u2019exploitation": { + "Dotations aux amortissements des immobilisations incorporelles": { + "account_number": "6812" + }, + "Dotations aux amortissements des immobilisations corporelles": { + "account_number": "6813" + }, + "account_number": "681" + }, + "account_number": "68" + }, + "Dotations aux provisions et aux d\u00e9pr\u00e9ciations": { + "Dotations aux provisions et aux d\u00e9pr\u00e9ciations d\u2019exploitation": { + "Dotations aux provisions pour risques et charges": { + "account_number": "6911" + }, + "Dotations aux d\u00e9pr\u00e9ciations des immobilisations incorporelles": { + "account_number": "6913" + }, + "Dotations aux d\u00e9pr\u00e9ciations des immobilisations corporelles": { + "account_number": "6914" + }, + "account_number": "691" + }, + "Dotations aux provisions et aux d\u00e9pr\u00e9ciations financi\u00e8res": { + "Dotations aux provisions pour risques et charges": { + "account_number": "6971" + }, + "Dotations aux d\u00e9pr\u00e9ciations des immobilisations financi\u00e8res": { + "account_number": "6972" + }, + "account_number": "697" + }, + "account_number": "69" + }, + "root_type": "Expense", + "account_number": "6" + }, + "Comptes de produits des activit\u00e9s ordinaires": { + "Ventes": { + "Ventes de marchandises": { + "Dans la R\u00e9gion": { + "account_number": "7011" + }, + "Hors R\u00e9gion": { + "account_number": "7012" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7013" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7014" + }, + "Sur internet": { + "account_number": "7015" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7019" + }, + "account_number": "701" + }, + "Ventes de produits finis": { + "Dans la R\u00e9gion": { + "account_number": "7021" + }, + "Hors R\u00e9gion": { + "account_number": "7022" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7023" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7024" + }, + "Sur internet": { + "account_number": "7025" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7029" + }, + "account_number": "702" + }, + "Ventes de produits interm\u00e9diaires": { + "Dans la R\u00e9gion": { + "account_number": "7031" + }, + "Hors R\u00e9gion": { + "account_number": "7032" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7033" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7034" + }, + "Sur internet": { + "account_number": "7035" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7039" + }, + "account_number": "703" + }, + "Ventes de produits r\u00e9siduels": { + "Dans la R\u00e9gion": { + "account_number": "7041" + }, + "Hors R\u00e9gion": { + "account_number": "7042" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7043" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7044" + }, + "Sur internet": { + "account_number": "7045" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7049" + }, + "account_number": "704" + }, + "Travaux factur\u00e9s": { + "Dans la R\u00e9gion": { + "account_number": "7051" + }, + "Hors R\u00e9gion": { + "account_number": "7052" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7053" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7054" + }, + "Sur internet": { + "account_number": "7055" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7059" + }, + "account_number": "705" + }, + "Services vendus": { + "Dans la R\u00e9gion": { + "account_number": "7061" + }, + "Hors R\u00e9gion": { + "account_number": "7062" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7063" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7064" + }, + "Sur internet": { + "account_number": "7065" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7069" + }, + "account_number": "706" + }, + "Produits accessoires": { + "Ports, emballages perdus et autres frais factur\u00e9s": { + "account_number": "7071" + }, + "Commissions et courtages": { + "account_number": "7072" + }, + "Locations": { + "account_number": "7073" + }, + "Bonis sur reprises et cessions d\u2019emballages": { + "account_number": "7074" + }, + "Mise \u00e0 disposition de personnel": { + "account_number": "7075" + }, + "Redevances pour brevets, logiciels, marques et droits similaires": { + "account_number": "7076" + }, + "Services exploit\u00e9s dans l\u2019int\u00e9r\u00eat du personnel": { + "account_number": "7077" + }, + "Autres produits accessoires": { + "account_number": "7078" + }, + "account_number": "707" + }, + "account_number": "70" + }, + "Subventions d\u2019exploitation": { + "Sur produits \u00e0 l\u2019exportation": { + "account_number": "711" + }, + "Sur produits \u00e0 l\u2019importation": { + "account_number": "712" + }, + "Sur produits de p\u00e9r\u00e9quation": { + "account_number": "713" + }, + "Indemnit\u00e9s et subventions d\u2019exploitation (entit\u00e9 agricole)": { + "account_number": "714" + }, + "Autres subventions d\u2019exploitation": { + "Vers\u00e9es par l\u2019\u00c9tat et les collectivit\u00e9s publiques": { + "account_number": "7181" + }, + "Vers\u00e9es par les organismes internationaux": { + "account_number": "7182" + }, + "Vers\u00e9es par des tiers": { + "account_number": "7183" + }, + "account_number": "718" + }, + "account_number": "71" + }, + "Production immobilis\u00e9e": { + "Immobilisations incorporelles": { + "account_number": "721" + }, + "Immobilisations corporelles": { + "Immobilisations corporelles (hors actifs biologiques)": { + "account_number": "7221" + }, + "Immobilisations corporelles (actifs biologiques)": { + "account_number": "7222" + }, + "account_number": "722" + }, + "Production auto-consomm\u00e9e": { + "account_number": "724" + }, + "Immobilisations financi\u00e8res": { + "account_number": "726" + }, + "account_number": "72" + }, + "Variations des stocks de biens et de services produits": { + "Variations des stocks de produits en cours": { + "Produits en cours": { + "account_number": "7341" + }, + "Travaux en cours": { + "account_number": "7342" + }, + "account_number": "734" + }, + "Variations des en-cours de services": { + "\u00c9tudes en cours": { + "account_number": "7351" + }, + "Prestations de services en cours": { + "account_number": "7352" + }, + "account_number": "735" + }, + "Variations des stocks de produits finis": { + "account_number": "736" + }, + "Variations des stocks de produits interm\u00e9diaires et r\u00e9siduels": { + "Produits interm\u00e9diaires": { + "account_number": "7371" + }, + "Produits r\u00e9siduels": { + "account_number": "7372" + }, + "account_number": "737" + }, + "account_number": "73" + }, + "Autres produits": { + "Profits sur cr\u00e9ances clients et autres d\u00e9biteurs": { + "account_number": "751" + }, + "Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "Quote-part transf\u00e9r\u00e9e de pertes (comptabilit\u00e9 du g\u00e9rant)": { + "account_number": "7521" + }, + "B\u00e9n\u00e9fices attribu\u00e9s par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": { + "account_number": "7525" + }, + "account_number": "752" + }, + "Produits des cessions courantes d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "7541" + }, + "Immobilisations corporelles": { + "account_number": "7542" + }, + "account_number": "754" + }, + "Gains de change sur cr\u00e9ances et dettes commerciales": { + "account_number": "756" + }, + "Produits divers": { + "Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": { + "account_number": "7581" + }, + "Indemnit\u00e9s d\u2019assurances re\u00e7ues": { + "account_number": "7582" + }, + "Autres produits divers": { + "account_number": "7588" + }, + "account_number": "758" + }, + "Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "Sur risques \u00e0 court terme": { + "account_number": "7591" + }, + "Sur stocks": { + "account_number": "7593" + }, + "Sur cr\u00e9ances": { + "account_number": "7594" + }, + "Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "account_number": "7598" + }, + "account_number": "759" + }, + "account_number": "75" + }, + "Revenus financiers et produits assimil\u00e9s": { + "Int\u00e9r\u00eats de pr\u00eats et cr\u00e9ances diverses": { + "Int\u00e9r\u00eats de pr\u00eats": { + "account_number": "7712" + }, + "Int\u00e9r\u00eats sur cr\u00e9ances diverses": { + "account_number": "7713" + }, + "account_number": "771" + }, + "Revenus de participations et autres titres immobilis\u00e9s": { + "Revenus des titres de participation": { + "account_number": "7721" + }, + "Revenus autres titres immobilis\u00e9s": { + "account_number": "7722" + }, + "account_number": "772" + }, + "Escomptes obtenus": { + "account_number": "773" + }, + "Revenus de placement": { + "Revenus des obligations": { + "account_number": "7745" + }, + "Revenus des titres de placement": { + "account_number": "7746" + }, + "account_number": "774" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition": { + "account_number": "775" + }, + "Gains de change financiers": { + "account_number": "776" + }, + "Gains sur cessions de titres de placement": { + "account_number": "777" + }, + "Gains sur risques financiers": { + "Sur rentes viag\u00e8res": { + "account_number": "7781" + }, + "Sur op\u00e9rations financi\u00e8res": { + "account_number": "7782" + }, + "Sur instruments de tr\u00e9sorerie": { + "account_number": "7784" + }, + "account_number": "778" + }, + "Reprises de charges pour d\u00e9pr\u00e9ciations et provisions \u00e0 court terme financi\u00e8res": { + "Sur risques financiers": { + "account_number": "7791" + }, + "Sur titres de placement": { + "account_number": "7795" + }, + "Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "account_number": "7798" + }, + "account_number": "779" + }, + "account_number": "77" + }, + "Transferts de charges": { + "Transferts de charges d\u2019exploitation": { + "account_number": "781" + }, + "Transferts de charges financi\u00e8res": { + "account_number": "787" + }, + "account_number": "78" + }, + "Reprises de provisions, de d\u00e9pr\u00e9ciations et autres": { + "Reprises de provisions et d\u00e9pr\u00e9ciations d\u2019exploitation": { + "Pour risques et charges": { + "account_number": "7911" + }, + "Des immobilisations incorporelles": { + "account_number": "7913" + }, + "Des immobilisations corporelles": { + "account_number": "7914" + }, + "account_number": "791" + }, + "Reprises de provisions et d\u00e9pr\u00e9ciations financi\u00e8res": { + "Pour risques et charges": { + "account_number": "7971" + }, + "Des immobilisations financi\u00e8res": { + "account_number": "7972" + }, + "account_number": "797" + }, + "Reprises d\u2019amortissements": { + "account_number": "798" + }, + "Reprises de subventions d\u2019investissement": { + "account_number": "799" + }, + "account_number": "79" + }, + "root_type": "Income", + "account_number": "7" + }, + "8-Comptes des autres charges et des autres produits (CHARGES)": { + "Valeurs comptables des cessions d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "811" + }, + "Immobilisations corporelles": { + "account_number": "812" + }, + "Immobilisations financi\u00e8res": { + "account_number": "816" + }, + "account_number": "81" + }, + "Charges hors activit\u00e9s ordinaires": { + "Charges HAO constat\u00e9es": { + "account_number": "831" + }, + "Charges li\u00e9es aux op\u00e9rations de restructuration": { + "account_number": "833" + }, + "Pertes sur cr\u00e9ances HAO": { + "account_number": "834" + }, + "Dons et lib\u00e9ralit\u00e9s accord\u00e9s": { + "account_number": "835" + }, + "Abandons de cr\u00e9ances consentis": { + "account_number": "836" + }, + "Charges li\u00e9es aux op\u00e9rations de liquidation": { + "account_number": "837" + }, + "Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": { + "account_number": "839" + }, + "account_number": "83" + }, + "Dotations hors activit\u00e9s ordinaires": { + "Dotations aux provisions r\u00e9glement\u00e9es": { + "account_number": "851" + }, + "Dotations aux amortissements HAO": { + "account_number": "852" + }, + "Dotations aux d\u00e9pr\u00e9ciations HAO": { + "account_number": "853" + }, + "Dotations aux provisions pour risques et charges HAO": { + "account_number": "854" + }, + "Autres dotations HAO": { + "account_number": "858" + }, + "account_number": "85" + }, + "Participation des travailleurs": { + "Participation l\u00e9gale aux b\u00e9n\u00e9fices": { + "account_number": "871" + }, + "Participation contractuelle aux b\u00e9n\u00e9fices": { + "account_number": "874" + }, + "Autres participations": { + "account_number": "878" + }, + "account_number": "87" + }, + "Imp\u00f4ts sur le r\u00e9sultat": { + "Imp\u00f4ts sur les b\u00e9n\u00e9fices de l\u2019exercice": { + "Activit\u00e9s exerc\u00e9es dans l\u2019\u00c9tat": { + "account_number": "8911" + }, + "Activit\u00e9s exerc\u00e9es dans les autres \u00c9tats de la R\u00e9gion": { + "account_number": "8912" + }, + "Activit\u00e9s exerc\u00e9es hors R\u00e9gion": { + "account_number": "8913" + }, + "account_number": "891" + }, + "Rappel d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": { + "account_number": "892" + }, + "Imp\u00f4t minimum forfaitaire IMF": { + "account_number": "895" + }, + "D\u00e9gr\u00e8vements et annulations d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": { + "D\u00e9gr\u00e8vements": { + "account_number": "8991" + }, + "Annulations pour pertes r\u00e9troactives": { + "account_number": "8994" + }, + "account_number": "899" + }, + "account_number": "89" + }, + "root_type": "Expense" + }, + "8-Comptes des autres charges et des autres produits (PRODUITS)": { + "Produits des cessions d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "821" + }, + "Immobilisations corporelles": { + "account_number": "822" + }, + "Immobilisations financi\u00e8res": { + "account_number": "826" + }, + "account_number": "82" + }, + "Produits hors activit\u00e9s ordinaires": { + "Produits HAO constat\u00e9s": { + "account_number": "841" + }, + "Produits li\u00e9s aux op\u00e9rations de restructuration": { + "account_number": "843" + }, + "Indemnit\u00e9s et subventions HAO (entit\u00e9 agricole)": { + "account_number": "844" + }, + "Dons et lib\u00e9ralit\u00e9s obtenus": { + "account_number": "845" + }, + "Abandons de cr\u00e9ances obtenus": { + "account_number": "846" + }, + "Produits li\u00e9s aux op\u00e9rations de liquidation": { + "account_number": "847" + }, + "Transferts de charges HAO": { + "account_number": "848" + }, + "Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": { + "account_number": "849" + }, + "account_number": "84" + }, + "Reprises de charges, provisions et d\u00e9pr\u00e9ciations HAO": { + "Reprises de provisions r\u00e9glement\u00e9es": { + "account_number": "861" + }, + "Reprises d\u2019amortissements HAO": { + "account_number": "862" + }, + "Reprises de d\u00e9pr\u00e9ciations HAO": { + "account_number": "863" + }, + "Reprises de provisions pour risques et charges HAO": { + "account_number": "864" + }, + "Autres reprises HAO": { + "account_number": "868" + }, + "account_number": "86" + }, + "Subventions d\u2019\u00e9quilibre": { + "\u00c9tat": { + "account_number": "881" + }, + "Collectivit\u00e9s publiques": { + "account_number": "884" + }, + "Groupe": { + "account_number": "886" + }, + "Autres": { + "account_number": "888" + }, + "account_number": "88" + }, + "root_type": "Income" + } + } +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/km_plan_comptable.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/km_plan_comptable.json new file mode 100644 index 00000000000..a401553fa86 --- /dev/null +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/km_plan_comptable.json @@ -0,0 +1,1919 @@ +{ + "country_code": "km", + "name": "Syscohada - Plan Comptable", + "tree": { + "1-Comptes de ressources durables": { + "10-Capital": { + "101-Capital social": { + "1011-Capital souscrit, non appel\u00e9": {}, + "1012-Capital souscrit, appel\u00e9, non vers\u00e9": {}, + "1013-Capital souscrit, appel\u00e9, vers\u00e9, non amorti": {}, + "1014-Capital souscrit, appel\u00e9, vers\u00e9, amorti": {}, + "1018-Capital souscrit soumis \u00e0 des conditions particuli\u00e8res": {} + }, + "102-Capital par dotation": { + "1021-Dotation initiale": {}, + "1022-Dotations compl\u00e9mentaires": {}, + "1028-Autres dotations": {} + }, + "103-Capital personnel": {}, + "104-Compte de l\u2019exploitant": { + "1041-Apports temporaires": {}, + "1042-Op\u00e9rations courantes": {}, + "1043-R\u00e9mun\u00e9rations, imp\u00f4ts et autres charges personnelles": {}, + "1047-Pr\u00e9l\u00e8vements d\u2019autoconsommation": {}, + "1048-Autres pr\u00e9l\u00e8vements": {} + }, + "105-Primes li\u00e9es au capital social": { + "1051-Primes d\u2019\u00e9mission": {}, + "1052-Primes d\u2019apport": {}, + "1053-Primes de fusion": {}, + "1054-Primes de conversion": {}, + "1058-Autres primes": {} + }, + "106-\u00c9carts de r\u00e9\u00e9valuation": { + "1061-\u00c9carts de r\u00e9\u00e9valuation l\u00e9gale": {}, + "1062-\u00c9carts de r\u00e9\u00e9valuation libre": {} + }, + "109-Apporteurs, capital souscrit, non appel\u00e9": {} + }, + "11-R\u00e9serves": { + "111-R\u00e9serve l\u00e9gale": {}, + "112-R\u00e9serves statutaires ou contractuelles": {}, + "113-R\u00e9serves r\u00e9glement\u00e9es": { + "1131-R\u00e9serves de plus-values nettes \u00e0 long terme": {}, + "1132-R\u00e9serves d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": {}, + "1133-R\u00e9serves cons\u00e9cutives \u00e0 l\u2019octroi de subventions d\u2019investissement": {}, + "1134-R\u00e9serves des valeurs mobili\u00e8res donnant acc\u00e8s au capital": {}, + "1135-Autres r\u00e9serves r\u00e9glement\u00e9es": {} + }, + "118-Autres r\u00e9serves": { + "1181-R\u00e9serves facultatives": {}, + "1188-R\u00e9serves diverses": {} + } + }, + "12-Report \u00e0 nouveau": { + "121-Report \u00e0 nouveau cr\u00e9diteur": {}, + "129-Report \u00e0 nouveau d\u00e9biteur": { + "1291-Perte nette \u00e0 reporter": {}, + "1292-Perte Amortissements r\u00e9put\u00e9s diff\u00e9r\u00e9s": {} + } + }, + "13-R\u00e9sultat net de l\u2019exercice": { + "130-R\u00e9sultat en instance d\u2019affectation": { + "1301-R\u00e9sultat en instance d\u2019affectation : b\u00e9n\u00e9fice": {}, + "1309-R\u00e9sultat en instance d\u2019affectation : perte": {} + }, + "131-R\u00e9sultat net : b\u00e9n\u00e9fice": {}, + "132-Marge commerciale (MC)": {}, + "133-Valeur ajout\u00e9e (VA)": {}, + "134-Exc\u00e9dent brut d\u2019exploitation (EBE)": {}, + "135-R\u00e9sultat d\u2019exploitation (RE)": {}, + "136-R\u00e9sultat financier (RF)": {}, + "137-R\u00e9sultat des activit\u00e9s ordinaires (RAO)": {}, + "138-R\u00e9sultat hors activit\u00e9s ordinaires (RHAO)": { + "1381-R\u00e9sultat de fusion": {}, + "1382-R\u00e9sultat d\u2019apport partiel d\u2019actif": {}, + "1383-R\u00e9sultat de scission": {}, + "1384-R\u00e9sultat de liquidation": {} + }, + "139-R\u00e9sultat net : perte": {} + }, + "14-Subventions d\u2019investissement": { + "141-Subventions d\u2019\u00e9quipement": { + "1411-\u00c9tat": {}, + "1412-R\u00e9gions": {}, + "1413-D\u00e9partements": {}, + "1414-Communes et collectivit\u00e9s publiques d\u00e9centralis\u00e9es": {}, + "1415-Entit\u00e9s publiques ou mixtes": {}, + "1416-Entit\u00e9s et organismes priv\u00e9s": {}, + "1417-Organismes internationaux": {}, + "1418-Autres": {} + }, + "148-Autres subventions d\u2019investissement": {} + }, + "15-Provisions r\u00e9glement\u00e9es et fonds assimil\u00e9s": { + "151-Amortissements d\u00e9rogatoires": {}, + "152-Plus-values de cession \u00e0 r\u00e9investir": {}, + "153-Fonds r\u00e9glement\u00e9s": { + "1531-Fonds National": {}, + "1532-Pr\u00e9l\u00e8vement pour le Budget": {} + }, + "154-Provisions sp\u00e9ciales de r\u00e9\u00e9valuation": {}, + "155-Provisions r\u00e9glement\u00e9es relatives aux immobilisations": { + "1551-Reconstitution des gisements miniers et p\u00e9troliers": {} + }, + "156-Provisions r\u00e9glement\u00e9es relatives aux stocks": { + "1561-Hausse de prix": {}, + "1562-Fluctuation des cours": {} + }, + "157-Provisions pour investissement": {}, + "158-Autres provisions et fonds r\u00e9glement\u00e9s": {} + }, + "16-Emprunts et dettes assimil\u00e9es": { + "161-Emprunts obligataires": { + "1611-Emprunts obligataires ordinaires": {}, + "1612-Emprunts obligataires convertibles en actions": {}, + "1613-Emprunts obligataires remboursables en actions": {}, + "1618-Autres emprunts obligataires": {} + }, + "162-Emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": {}, + "163-Avances re\u00e7ues de l\u2019\u00c9tat": {}, + "164-Avances re\u00e7ues et comptes courants bloqu\u00e9s": {}, + "165-D\u00e9p\u00f4ts et cautionnements re\u00e7us": { + "1651-D\u00e9p\u00f4ts": {}, + "1652-Cautionnements": {} + }, + "166-Int\u00e9r\u00eats courus": { + "1661-Sur emprunts obligataires": {}, + "1662-Sur emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": {}, + "1663-Sur avances re\u00e7ues de l\u2019\u00c9tat": {}, + "1664-Sur avances re\u00e7ues et comptes courants bloqu\u00e9s": {}, + "1665-Sur d\u00e9p\u00f4ts et cautionnements re\u00e7us": {}, + "1667-Sur avances assorties de conditions particuli\u00e8res": {}, + "1668-Sur autres emprunts et dettes": {} + }, + "167-Avances assorties de conditions particuli\u00e8res": { + "1671-Avances bloqu\u00e9es pour augmentation du capital": {}, + "1672-Avances conditionn\u00e9es par l\u2019\u00c9tat": {}, + "1673-Avances conditionn\u00e9es par les autres organismes africains": {}, + "1674-Avances conditionn\u00e9es par les organismes internationaux": {} + }, + "168-Autres emprunts et dettes": { + "1681-Rentes viag\u00e8res capitalis\u00e9es": {}, + "1682-Billets de fonds": {}, + "1683-Dettes cons\u00e9cutives \u00e0 des titres emprunt\u00e9s": {}, + "1684-Emprunts participatifs": {}, + "1685-Participation des travailleurs aux b\u00e9n\u00e9fices": {}, + "1686-Emprunts et dettes contract\u00e9s aupr\u00e8s des autres tiers": {} + } + }, + "17-Dettes de location acquisition": { + "172-Dettes de location acquisition / cr\u00e9dit bail immobilier": {}, + "173-Dettes de location acquisition / cr\u00e9dit bail mobilier": {}, + "174-Dettes de location acquisition / location de vente": {}, + "176-Int\u00e9r\u00eats courus": { + "1762-Sur dettes de location acquisition / cr\u00e9dit-bail immobilier": {}, + "1763-Sur dettes de location acquisition / cr\u00e9dit-bail mobilier": {}, + "1764-Sur dettes de location acquisition / location-vente": {}, + "1768-Sur autres dettes de location acquisition": {} + }, + "178-Autres dettes de location acquisition": {} + }, + "18-Dettes li\u00e9es \u00e0 des participations et comptes de liaison des \u00e9tablissements et soci\u00e9t\u00e9s en participation": { + "181-Dettes li\u00e9es \u00e0 des participations": { + "1811-Dettes li\u00e9es \u00e0 des participations (groupe)": {}, + "1812-Dettes li\u00e9es \u00e0 des participations (hors groupe)": {} + }, + "182-Dettes li\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": {}, + "183-Int\u00e9r\u00eats courus sur dettes li\u00e9es \u00e0 des participations": {}, + "184-Comptes permanents bloqu\u00e9s des \u00e9tablissements et succursales": {}, + "185-Comptes permanents non bloqu\u00e9s des \u00e9tablissements et succursales": {}, + "186-Comptes de liaison charges": {}, + "187-Comptes de liaison produits": {}, + "188-Comptes de liaison des soci\u00e9t\u00e9s en participation": {} + }, + "19-Provisions pour risques et charges": { + "191-Provisions pour litiges": {}, + "192-Provisions pour garanties donn\u00e9es aux clients": {}, + "193-Provisions pour pertes sur march\u00e9s \u00e0 ach\u00e8vement futur": {}, + "194-Provisions pour pertes de change": {}, + "195-Provisions pour imp\u00f4ts": {}, + "196-Provisions pour pensions et obligations similaires": { + "1961-Provisions pour pensions et obligations similaires engagement de retraite": {}, + "1962-Actif du r\u00e9gime de retraite": {} + }, + "197-Provisions pour restructuration": {}, + "198-Autres provisions pour risques et charges": { + "1981-Provisions pour amendes et p\u00e9nalit\u00e9s": {}, + "1983-Provisions pour propre assureur": {}, + "1984-Provisions pour d\u00e9mant\u00e8lement et remise en \u00e9tat": {}, + "1985-Provisions pour droits \u00e0 r\u00e9duction ou avantage en nature (ch\u00e8ques cadeau, cartes de fid\u00e9lit\u00e9...)": {}, + "1988-Provisions pour divers risques et charges": {} + } + }, + "root_type": "Equity" + }, + "2-Comptes d\u2019actif immobilis\u00e9": { + "21-Immobilisations incorporelles": { + "account_type": "Fixed Asset", + "211-Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset" + }, + "212-Brevets, licences, concessions et droits similaires": { + "account_type": "Fixed Asset", + "2121-Brevets": { + "account_type": "Fixed Asset" + }, + "2122-Licences": { + "account_type": "Fixed Asset" + }, + "2123-Concessions de service public": { + "account_type": "Fixed Asset" + }, + "2128-Autres concessions et droits similaires": { + "account_type": "Fixed Asset" + } + }, + "213-Logiciels et sites internet": { + "account_type": "Fixed Asset", + "2131-Logiciels": { + "account_type": "Fixed Asset" + }, + "2132-Sites internet": { + "account_type": "Fixed Asset" + } + }, + "214-Marques": { + "account_type": "Fixed Asset" + }, + "215-Fonds commercial": { + "account_type": "Fixed Asset" + }, + "216-Droit au bail": { + "account_type": "Fixed Asset" + }, + "217-Investissements de cr\u00e9ation": { + "account_type": "Fixed Asset" + }, + "218-Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset", + "2181-Frais de prospection et d\u2019\u00e9valuation de ressources min\u00e9rales": { + "account_type": "Fixed Asset" + }, + "2182-Co\u00fbts d\u2019obtention du contrat": { + "account_type": "Fixed Asset" + }, + "2183-Fichiers clients, notices, titres de journaux et magazines": { + "account_type": "Fixed Asset" + }, + "2184-Co\u00fbts des franchises": { + "account_type": "Fixed Asset" + }, + "2188-Divers droits et valeurs incorporelles": { + "account_type": "Fixed Asset" + } + }, + "219-Immobilisations incorporelles en cours": { + "account_type": "Fixed Asset", + "2191-Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset" + }, + "2193-Logiciels et internet": { + "account_type": "Fixed Asset" + }, + "2198-Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset" + } + } + }, + "22-Terrains": { + "account_type": "Fixed Asset", + "221-Terrains agricoles et forestiers": { + "account_type": "Fixed Asset", + "2211-Terrains d\u2019exploitation agricole": { + "account_type": "Fixed Asset" + }, + "2212-Terrains d\u2019exploitation foresti\u00e8re": { + "account_type": "Fixed Asset" + }, + "2218-Autres terrains": { + "account_type": "Fixed Asset" + } + }, + "222-Terrains nus": { + "account_type": "Fixed Asset", + "2221-Terrains \u00e0 b\u00e2tir": { + "account_type": "Fixed Asset" + }, + "2228-Autres terrains nus": { + "account_type": "Fixed Asset" + } + }, + "223-Terrains b\u00e2tis": { + "account_type": "Fixed Asset", + "2231-Pour b\u00e2timents industriels et agricoles": { + "account_type": "Fixed Asset" + }, + "2232-Pour b\u00e2timents administratifs et commerciaux": { + "account_type": "Fixed Asset" + }, + "2234-Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations professionnelles": { + "account_type": "Fixed Asset" + }, + "2235-Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations non professionnelles": { + "account_type": "Fixed Asset" + }, + "2238-Autres terrains b\u00e2tis": { + "account_type": "Fixed Asset" + } + }, + "224-Travaux de mise en valeur des terrains": { + "account_type": "Fixed Asset", + "2241-Plantation d\u2019arbres et d\u2019arbustes": { + "account_type": "Fixed Asset" + }, + "2245-Am\u00e9liorations du fonds": { + "account_type": "Fixed Asset" + }, + "2248-Autres travaux": { + "account_type": "Fixed Asset" + } + }, + "225-Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset", + "2251-Carri\u00e8res": { + "account_type": "Fixed Asset" + } + }, + "226-Terrains am\u00e9nag\u00e9s": { + "account_type": "Fixed Asset", + "2261-Parkings": { + "account_type": "Fixed Asset" + } + }, + "227-Terrains mis en concession": { + "account_type": "Fixed Asset" + }, + "228-Autres terrains": { + "account_type": "Fixed Asset", + "2281-Terrains immeubles de placement": { + "account_type": "Fixed Asset" + }, + "2285-Terrains des logements affect\u00e9s au personnel": { + "account_type": "Fixed Asset" + }, + "2286-Terrains de location acquisition": { + "account_type": "Fixed Asset" + }, + "2288-Divers terrains": { + "account_type": "Fixed Asset" + } + }, + "229-Am\u00e9nagements de terrains en cours": { + "account_type": "Fixed Asset", + "2291-Terrains agricoles et forestiers": { + "account_type": "Fixed Asset" + }, + "2292-Terrains nus": { + "account_type": "Fixed Asset" + }, + "2295-Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset" + }, + "2298-Autres terrains": { + "account_type": "Fixed Asset" + } + } + }, + "23-B\u00e2timents, installations techniques et agencements": { + "231-B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "2311-B\u00e2timents industriels": {}, + "2312-B\u00e2timents agricoles": {}, + "2313-B\u00e2timents administratifs et commerciaux": {}, + "2314-B\u00e2timents affect\u00e9s au logement du personnel": {}, + "2315-B\u00e2timents immeubles de placement": {}, + "2316-B\u00e2timents de location acquisition": {} + }, + "232-B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "2321-B\u00e2timents industriels": {}, + "2322-B\u00e2timents agricoles": {}, + "2323-B\u00e2timents administratifs et commerciaux": {}, + "2324-B\u00e2timents affect\u00e9s au logement du personnel": {}, + "2325-B\u00e2timents immeubles de placement": {}, + "2326-B\u00e2timents de location acquisition": {} + }, + "233-Ouvrages d\u2019infrastructure": { + "2331-Voies de terre": {}, + "2332-Voies de fer": {}, + "2333-Voies d\u2019eau": {}, + "2334-Barrages, Digues": {}, + "2335-Pistes d\u2019a\u00e9rodrome": {}, + "2338-Autres ouvrages d\u2019infrastructures": {} + }, + "234-Am\u00e9nagements, agencements et installations techniques": { + "2341-Installations complexes sp\u00e9cialis\u00e9es sur sol propre": {}, + "2342-Installations complexes sp\u00e9cialis\u00e9es sur sol d\u2019autrui": {}, + "2343-Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol propre": {}, + "2344-Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol d\u2019autrui": {}, + "2345-Am\u00e9nagements et agencements des b\u00e2timents": {} + }, + "235-Am\u00e9nagements de bureaux": { + "2351-Installations g\u00e9n\u00e9rales": {}, + "2358-Autres am\u00e9nagements de bureaux": {} + }, + "237-B\u00e2timents industriels, agricoles et commerciaux mis en concession": {}, + "238-Autres installations et agencements": {}, + "239-B\u00e2timents am\u00e9nagements, agencements et installations en cours": { + "2391-B\u00e2timents en cours": {}, + "2392-Installations en cours": {}, + "2393-Ouvrages d\u2019infrastructure en cours": {}, + "2394-Am\u00e9nagements et agencements et installations techniques en cours": {}, + "2395-Am\u00e9nagements de bureaux en cours": {}, + "2398-Autres installations et agencements en cours": {} + } + }, + "24-Mat\u00e9riel, mobilier et actifs biologiques": { + "241-Mat\u00e9riel et outillage industriel et commercial": { + "2411-Mat\u00e9riel industriel": {}, + "2412-Outillage industriel": {}, + "2413-Mat\u00e9riel commercial": {}, + "2414-Outillage commercial": {}, + "2416-Mat\u00e9riel & outillage industriel et commercial de location-acquisition": {} + }, + "242-Mat\u00e9riel et outillage agricole": { + "2421-Mat\u00e9riel agricole": {}, + "2422-Outillage agricole": {}, + "2426-Mat\u00e9riel & outillage agricole de location-acquisition": {} + }, + "243-Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "244-Mat\u00e9riel et mobilier": { + "2441-Mat\u00e9riel de bureau": {}, + "2442-Mat\u00e9riel informatique": {}, + "2443-Mat\u00e9riel bureautique": {}, + "2444-Mobilier de bureau": {}, + "2445-Mat\u00e9riel et mobilier immeubles de placement": {}, + "2446-Mat\u00e9riel et mobilier de location acquisition": {}, + "2447-Mat\u00e9riel et mobilier des logements du personnel": {} + }, + "245-Mat\u00e9riel de transport": { + "2451-Mat\u00e9riel automobile": {}, + "2452-Mat\u00e9riel ferroviaire": {}, + "2453-Mat\u00e9riel fluvial, lagunaire": {}, + "2454-Mat\u00e9riel naval": {}, + "2455-Mat\u00e9riel a\u00e9rien": {}, + "2456-Mat\u00e9riel de transport de location-acquisition": {}, + "2457-Mat\u00e9riel hippomobile": {}, + "2458-Autres mat\u00e9riels de transport": {} + }, + "246-Actifs biologiques": { + "2461-Cheptel, animaux de trait": {}, + "2462-Cheptel, animaux reproducteurs": {}, + "2463-Animaux de garde": {}, + "2465-Plantations agricoles": {}, + "2468-Autres actifs biologiques": {} + }, + "247-Agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "2471-Agencements et am\u00e9nagements du mat\u00e9riel": {}, + "2472-Agencements et am\u00e9nagements des actifs biologiques": {}, + "2478-Autres agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": {} + }, + "248-Autres mat\u00e9riels et mobiliers": { + "2481-Collections et \u0153uvres d\u2019art": {}, + "2488-Divers mat\u00e9riels mobiliers": {} + }, + "249-Mat\u00e9riels et actifs biologiques en cours": { + "2491-Mat\u00e9riel et outillage industriel et commercial": {}, + "2492-Mat\u00e9riel et outillage agricole": {}, + "2493-Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "2494-Mat\u00e9riel et mobilier de bureau": {}, + "2495-Mat\u00e9riel de transport": {}, + "2496-Actifs biologiques": {}, + "2497-Agencements am\u00e9nagements du mat\u00e9riel et actifs biologiques": {}, + "2498-Autres mat\u00e9riels et actifs biologiques en cours": {} + } + }, + "25-Avances et acomptes vers\u00e9s sur immobilisations": { + "251-Avances et acomptes vers\u00e9s sur immobilisations incorporelles": {}, + "252-Avances et acomptes vers\u00e9s sur immobilisations corporelles": {} + }, + "26-Titres de participation": { + "261-Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": {}, + "262-Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le conjoint": {}, + "263-Titres de participation dans des soci\u00e9t\u00e9s conf\u00e9rant une influence notable": {}, + "265-Participations dans des organismes professionnels": {}, + "266-Parts dans des groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": {}, + "268-Autres titres de participation": {} + }, + "27-Autres immobilisations financi\u00e8res": { + "271-Pr\u00eats et cr\u00e9ances": { + "2711-Pr\u00eats participatifs": {}, + "2712-Pr\u00eats aux associ\u00e9s": {}, + "2713-Billets de fonds": {}, + "2714-Titres pr\u00eat\u00e9s": {}, + "2718-Autres pr\u00eats et cr\u00e9ances": {} + }, + "272-Pr\u00eats au personnel": { + "2721-Pr\u00eats immobiliers": {}, + "2722-Pr\u00eats mobiliers et d\u2019installation": {}, + "2728-Autres pr\u00eats au personnel": {} + }, + "273-Cr\u00e9ances sur l\u2019\u00c9tat": { + "2731-Retenues de garantie": {}, + "2733-Fonds r\u00e9glement\u00e9": {}, + "2734-Cr\u00e9ances sur le conc\u00e9dant": {}, + "2738-Autres cr\u00e9ances sur l\u2019\u00c9tat": {} + }, + "274-Titres immobilis\u00e9s": { + "2741-Titres immobilis\u00e9s de l\u2019activit\u00e9 de portefeuille (TIAP)": {}, + "2742-Titres participatifs": {}, + "2743-Certificats d\u2019investissement": {}, + "2744-Parts de fonds commun de placement (FCP)": {}, + "2745-Obligations": {}, + "2746-Actions ou parts propres": {}, + "2748-Autres titres immobilis\u00e9s": {} + }, + "275-D\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "2751-D\u00e9p\u00f4ts pour loyers d\u2019avance": {}, + "2752-D\u00e9p\u00f4ts pour l\u2019\u00e9lectricit\u00e9": {}, + "2753-D\u00e9p\u00f4ts pour l\u2019eau": {}, + "2754-D\u00e9p\u00f4ts pour le gaz": {}, + "2755-D\u00e9p\u00f4ts pour le t\u00e9l\u00e9phone, le t\u00e9lex, la t\u00e9l\u00e9copie": {}, + "2756-Cautionnements sur march\u00e9s publics": {}, + "2757-Cautionnements sur autres op\u00e9rations": {}, + "2758-Autres d\u00e9p\u00f4ts et cautionnements": {} + }, + "276-Int\u00e9r\u00eats courus": { + "2761-Pr\u00eats et cr\u00e9ances non commerciales": {}, + "2762-Pr\u00eats au personnel": {}, + "2763-Cr\u00e9ances sur l\u2019\u00c9tat": {}, + "2764-Titres immobilis\u00e9s": {}, + "2765-D\u00e9p\u00f4ts et cautionnements vers\u00e9s": {}, + "2767-Cr\u00e9ances rattach\u00e9es \u00e0 des participations": {}, + "2768-Immobilisations financi\u00e8res diverses": {} + }, + "277-Cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": { + "2771-Cr\u00e9ances rattach\u00e9es \u00e0 des participations (groupe)": {}, + "2772-Cr\u00e9ances rattach\u00e9es \u00e0 des participations (hors groupe)": {}, + "2773-Cr\u00e9ances rattach\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": {}, + "2774-Avances \u00e0 des Groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": {} + }, + "278-Immobilisations financi\u00e8res diverses": { + "2781-Cr\u00e9ances diverses groupe": {}, + "2782-Cr\u00e9ances diverses hors groupe": {}, + "2784-Banques d\u00e9p\u00f4ts \u00e0 terme": {}, + "2785-Or et m\u00e9taux pr\u00e9cieux": {}, + "2788-Autres immobilisations financi\u00e8res": {} + } + }, + "28-Amortissements": { + "account_type": "Accumulated Depreciation", + "281-Amortissements des immobilisations corporelles": { + "account_type": "Accumulated Depreciation", + "2811-Amortissements des frais de d\u00e9veloppement": { + "account_type": "Accumulated Depreciation" + }, + "2812-Amortissements des brevets, licences, concessions et droits similaires": { + "account_type": "Accumulated Depreciation" + }, + "2813-Amortissements des logiciels et sites internet": { + "account_type": "Accumulated Depreciation" + }, + "2814-Amortissements des marques": { + "account_type": "Accumulated Depreciation" + }, + "2815-Amortissements du fonds commercial": { + "account_type": "Accumulated Depreciation" + }, + "2816-Amortissements du droit au bail": { + "account_type": "Accumulated Depreciation" + }, + "2817-Amortissements des investissements de cr\u00e9ation": { + "account_type": "Accumulated Depreciation" + }, + "2818-Amortissements des autres droits et valeurs incorporels": { + "account_type": "Accumulated Depreciation" + } + }, + "282-Amortissements des terrains": { + "2824-Amortissements des travaux de mise en valeur des terrains": {} + }, + "283-Amortissements des b\u00e2timents, installations techniques et agencements": { + "2831-Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": {}, + "2832-Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": {}, + "2833-Amortissements des ouvrages d\u2019infrastructure": {}, + "2834-Amortissements des am\u00e9nagements, agencements et installations techniques": {}, + "2835-Amortissements des am\u00e9nagements de bureaux": {}, + "2837-Amortissements des b\u00e2timents industriels, agricoles et commerciaux mis en concession": {}, + "2838-Amortissements des autres installations et agencements": {} + }, + "284-Amortissements du mat\u00e9riel": { + "2841-Amortissements du mat\u00e9riel et outillage industriel et commercial": {}, + "2842-Amortissements du mat\u00e9riel et outillage agricole": {}, + "2843-Amortissements du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "2844-Amortissements du mat\u00e9riel et mobilier": {}, + "2845-Amortissements du mat\u00e9riel de transport": {}, + "2846-Amortissements des actifs biologiques": {}, + "2847-Amortissements des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": {}, + "2848-Amortissements des autres mat\u00e9riels": {} + } + }, + "29-D\u00e9pr\u00e9ciations des immobilisations": { + "291-D\u00e9pr\u00e9ciations des immobilisations incorporelles": { + "2911-D\u00e9pr\u00e9ciations des frais de d\u00e9veloppement": {}, + "2912-D\u00e9pr\u00e9ciations des brevets, licences, concessions et droits similaires": {}, + "2913-D\u00e9pr\u00e9ciations des logiciels et sites internet": {}, + "2914-D\u00e9pr\u00e9ciations des marques": {}, + "2915-D\u00e9pr\u00e9ciations du fonds commercial": {}, + "2916-D\u00e9pr\u00e9ciations du droit au bail": {}, + "2917-D\u00e9pr\u00e9ciations des investissements de cr\u00e9ation": {}, + "2918-D\u00e9pr\u00e9ciations des autres droits et valeurs incorporels": {}, + "2919-D\u00e9pr\u00e9ciations des immobilisations incorporelles en cours": {} + }, + "292-D\u00e9pr\u00e9ciations des terrains": { + "2921-D\u00e9pr\u00e9ciations des terrains agricoles et forestiers": {}, + "2922-D\u00e9pr\u00e9ciations des terrains nus": {}, + "2923-D\u00e9pr\u00e9ciations des terrains b\u00e2tis": {}, + "2924-D\u00e9pr\u00e9ciations des travaux de mise en valeur des terrains": {}, + "2925-D\u00e9pr\u00e9ciations des terrains de gisement": {}, + "2926-D\u00e9pr\u00e9ciations des terrains am\u00e9nag\u00e9s": {}, + "2927-D\u00e9pr\u00e9ciations des terrains mis en concession": {}, + "2928-D\u00e9pr\u00e9ciations des autres terrains": {}, + "2929-D\u00e9pr\u00e9ciations des am\u00e9nagements de terrains en cours": {} + }, + "293-D\u00e9pr\u00e9ciations des b\u00e2timents, installations techniques et agencements": { + "2931-D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": {}, + "2932-D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": {}, + "2933-D\u00e9pr\u00e9ciations des ouvrages d\u2019infrastructures": {}, + "2934-D\u00e9pr\u00e9ciations des am\u00e9nagements, agencements et installations techniques": {}, + "2935-D\u00e9pr\u00e9ciations des am\u00e9nagements de bureaux": {}, + "2937-D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles et commerciaux mis en concession": {}, + "2938-D\u00e9pr\u00e9ciations des autres installations et agencements": {}, + "2939-D\u00e9pr\u00e9ciations des b\u00e2timents et installations en cours": {} + }, + "294-D\u00e9pr\u00e9ciations de mat\u00e9riel, du mobilier et de l\u2019actif biologique": { + "2941-D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage industriel et commercial": {}, + "2942-D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage agricole": {}, + "2943-D\u00e9pr\u00e9ciations du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "2944-D\u00e9pr\u00e9ciations du mat\u00e9riel et mobilier": {}, + "2945-D\u00e9pr\u00e9ciations du mat\u00e9riel de transport": {}, + "2946-D\u00e9pr\u00e9ciations des actifs biologiques": {}, + "2947-D\u00e9pr\u00e9ciations des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": {}, + "2948-D\u00e9pr\u00e9ciations des autres mat\u00e9riels": {}, + "2949-D\u00e9pr\u00e9ciations de mat\u00e9riel en cours": {} + }, + "295-D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations": { + "2951-D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations incorporelles": {}, + "2952-D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations corporelles": {} + }, + "296-D\u00e9pr\u00e9ciations des titres de participation": { + "2961-D\u00e9pr\u00e9ciations des titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": {}, + "2962-D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s sous contr\u00f4le conjoint": {}, + "2963-D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s conf\u00e9rant une influence notable": {}, + "2965-D\u00e9pr\u00e9ciations des participations dans des organismes professionnels": {}, + "2966-D\u00e9pr\u00e9ciations des parts dans des GIE": {}, + "2968-D\u00e9pr\u00e9ciations des autres titres de participation": {} + }, + "297-D\u00e9pr\u00e9ciations des autres immobilisations financi\u00e8res": { + "2971-D\u00e9pr\u00e9ciations des pr\u00eats et cr\u00e9ances": {}, + "2972-D\u00e9pr\u00e9ciations des pr\u00eats au personnel": {}, + "2973-D\u00e9pr\u00e9ciations des cr\u00e9ances sur l\u2019\u00c9tat": {}, + "2974-D\u00e9pr\u00e9ciations des titres immobilis\u00e9s": {}, + "2975-D\u00e9pr\u00e9ciations des d\u00e9p\u00f4ts et cautionnements vers\u00e9s": {}, + "2977-D\u00e9pr\u00e9ciations des cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": {}, + "2978-D\u00e9pr\u00e9ciations des cr\u00e9ances financi\u00e8res diverses": {} + } + }, + "root_type": "Asset" + }, + "3-Comptes de Stocks": { + "31-Marchandises": { + "311-Marchandises A": { + "3111-Marchandises A1": {}, + "3112-Marchandises A2": {} + }, + "312-Marchandises B": { + "3121-Marchandises B1": {}, + "3122-Marchandises B2": {} + }, + "313-Actifs biologiques": { + "3131-Animaux": {}, + "3132-V\u00e9g\u00e9taux": {} + }, + "318-Marchandises hors activit\u00e9s ordinaires (HAO)": {} + }, + "32-Mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "321-Mati\u00e8res A": {}, + "322-Mati\u00e8res B": {}, + "323-Fournitures (A, B)": {} + }, + "33-Autres approvisionnements": { + "331-Mati\u00e8res consommables": {}, + "332-Fournitures d\u2019atelier et d\u2019usine": {}, + "333-Fournitures de magasin": {}, + "334-Fournitures de bureau": {}, + "335-Emballages": { + "3351-Emballages perdus": {}, + "3352-Emballages r\u00e9cup\u00e9rables non identifiables": {}, + "3353-Emballages \u00e0 usage mixte": {}, + "3358-Autres emballages": {} + }, + "338-Autres mati\u00e8res": {} + }, + "34-Produits en cours": { + "341-Produits en cours": { + "3411-Produits en cours P1": {}, + "3412-Produits en cours P2": {} + }, + "342-Travaux en cours": { + "3421-Travaux en cours T1": {}, + "3422-Travaux en cours T2": {} + }, + "343-Produits interm\u00e9diaires en cours": { + "3431-Produits interm\u00e9diaires A": {}, + "3432-Produits interm\u00e9diaires B": {} + }, + "344-Produits r\u00e9siduels en cours": { + "3441-Produits r\u00e9siduels A": {}, + "3442-Produits r\u00e9siduels B": {} + }, + "345-Actifs biologiques en cours": { + "3451-Animaux": {}, + "3452-V\u00e9g\u00e9taux": {} + } + }, + "35-Services en cours": { + "351-\u00c9tudes en cours": { + "3511-\u00c9tudes en cours E1": {}, + "3512-\u00c9tudes en cours E2": {} + }, + "352-Prestations de services en cours": { + "3521-Prestations de services S1": {}, + "3522-Prestations de services S2": {} + } + }, + "36-Produits finis": { + "361-Produits finis A": {}, + "362-Produits finis B": {}, + "363-Actifs biologiques": { + "3631-Animaux": {}, + "3632-V\u00e9g\u00e9taux": {}, + "3638-Autres stocks (activit\u00e9s annexes)": {} + } + }, + "37-Produits interm\u00e9diaires et r\u00e9siduels": { + "371-Produits interm\u00e9diaires": { + "3711-Produits interm\u00e9diaires A": {}, + "3712-Produits interm\u00e9diaires B": {} + }, + "372-Produits r\u00e9siduels": { + "3721-D\u00e9chets": {}, + "3722-Rebuts": {}, + "3723-Mati\u00e8res de R\u00e9cup\u00e9ration": {} + }, + "373-Actifs biologiques": { + "3731-Animaux": {}, + "3732-V\u00e9g\u00e9taux": {}, + "3738-Autres stocks (activit\u00e9s annexes)": {} + } + }, + "38-Stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": { + "account_type": "Stock", + "381-Marchandises en cours de route": {}, + "382-Mati\u00e8res premi\u00e8res et fournitures li\u00e9es en cours de route": {}, + "383-Autres approvisionnements en cours de route": {}, + "386-Produits finis en cours de route": {}, + "387-Stock en consignation ou en d\u00e9p\u00f4t": { + "3871-Stock en consignation": {}, + "3872-Stock en d\u00e9p\u00f4t": {} + }, + "388-Stock provenant d\u2019immobilisations mises hors service ou au rebut": {} + }, + "39-D\u00e9pr\u00e9ciations des stocks et encours de production": { + "391-D\u00e9pr\u00e9ciations des stocks de marchandises": {}, + "392-D\u00e9pr\u00e9ciations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": {}, + "393-D\u00e9pr\u00e9ciations des stocks d\u2019autres approvisionnements": {}, + "394-D\u00e9pr\u00e9ciations des productions en cours": {}, + "395-D\u00e9pr\u00e9ciations des services en cours": {}, + "396-D\u00e9pr\u00e9ciations des stocks de produits finis": {}, + "397-D\u00e9pr\u00e9ciations des stocks de produits interm\u00e9diaires et r\u00e9siduels": {}, + "398-D\u00e9pr\u00e9ciations des stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": {} + }, + "root_type": "Asset" + }, + "4-Comptes de Tiers (ACTIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (ACTIF)": { + "409-Fournisseurs d\u00e9biteurs": { + "4091-Fournisseurs Avances et acomptes vers\u00e9s": {}, + "4092-Fournisseurs Groupe avances et acomptes vers\u00e9s": {}, + "4093-Fournisseurs Sous-traitants avances et acomptes vers\u00e9s": {}, + "4094-Fournisseurs Cr\u00e9ances pour emballages et mat\u00e9riels \u00e0 rendre": {}, + "4098-Fournisseurs Rabais, remises, ristournes et autres avoirs \u00e0 obtenir": {} + } + }, + "41-Clients et comptes rattach\u00e9s (ACTIF)": { + "411-Clients": { + "4111-Clients": { + "account_type": "Receivable" + }, + "4112-Clients groupe": { + "account_type": "Receivable" + }, + "4114-Clients, \u00c9tat et Collectivit\u00e9s publiques": { + "account_type": "Receivable" + }, + "4115-Clients, organismes internationaux": { + "account_type": "Receivable" + }, + "4116-Clients, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Receivable" + }, + "4117-Client, retenues de garantie": { + "account_type": "Receivable" + }, + "4118-Clients, d\u00e9gr\u00e8vement de taxes sur la valeur ajout\u00e9e (TVA)": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "412-Clients, effets \u00e0 recevoir en portefeuille": { + "4121-Clients, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "4122-Clients Groupe, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "4124-\u00c9tat et Collectivit\u00e9s publiques, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "4125-Organismes Internationaux, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "413-Clients, ch\u00e8ques, effets et autres valeurs impay\u00e9es": { + "4131-Clients, ch\u00e8ques impay\u00e9s": { + "account_type": "Receivable" + }, + "4132-Clients, effets impay\u00e9s": { + "account_type": "Receivable" + }, + "4133-Clients, cartes de cr\u00e9dit impay\u00e9es": { + "account_type": "Receivable" + }, + "4138-Clients, autres valeurs impay\u00e9es": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "414-Cr\u00e9ances sur cessions courantes d\u2019immobilisations": { + "4141-Cr\u00e9ances en compte, immobilisations incorporelles": { + "account_type": "Receivable" + }, + "4142-Cr\u00e9ances en compte, immobilisations corporelles": { + "account_type": "Receivable" + }, + "4146-Effets \u00e0 recevoir, immobilisations incorporelles": { + "account_type": "Receivable" + }, + "4147-Effets \u00e0 recevoir, immobilisations corporelles": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "415-Clients, effets escompt\u00e9s non \u00e9chus": { + "account_type": "Receivable" + }, + "416-Cr\u00e9ances clients litigieuses ou douteuses": { + "4161-Cr\u00e9ances litigieuses": { + "account_type": "Receivable" + }, + "4162-Cr\u00e9ances douteuses": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "418-Clients, produits \u00e0 recevoir": { + "4181-Clients, factures \u00e0 \u00e9tablir": { + "account_type": "Receivable" + }, + "4186-Clients, int\u00e9r\u00eats courus": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "42-Personnel (ACTIF)": { + "421-Personnel, avances et acomptes": { + "4211-Personnel, avances": {}, + "4212-Personnel, acomptes": {}, + "4213-Frais avanc\u00e9s et fournitures au personnel": {} + } + }, + "43-Organismes sociaux (ACTIF)": { + "431-S\u00e9curit\u00e9 sociale": { + "4311-Prestations familiales": {}, + "4312-Accidents de travail": {}, + "4313-Caisse de retraite obligatoire": {}, + "4314-Caisse de retraite facultative": {}, + "4318-Autres cotisations sociales": {} + }, + "432-Caisses de retraite compl\u00e9mentaire": {}, + "433-Autres organismes sociaux": { + "4331-Mutuelle": {}, + "4332-Assurances retraite": {}, + "4333-Assurances et organismes de sant\u00e9": {} + }, + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "4387-Produits \u00e0 recevoir": {} + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (ACTIF)": { + "443-\u00c9tat, TVA factur\u00e9e": { + "4431-TVA factur\u00e9e sur ventes": {}, + "4432-TVA factur\u00e9e sur prestations de services": {}, + "4433-TVA factur\u00e9e sur travaux": {}, + "4434-TVA factur\u00e9e sur production livr\u00e9e \u00e0 soi-m\u00eame": {}, + "4435-TVA sur factures \u00e0 \u00e9tablir": {} + }, + "445-\u00c9tat, TVA r\u00e9cup\u00e9rable": { + "4451-TVA r\u00e9cup\u00e9rable sur immobilisations": {}, + "4452-TVA r\u00e9cup\u00e9rable sur achats": {}, + "4453-TVA r\u00e9cup\u00e9rable sur transport": {}, + "4454-TVA r\u00e9cup\u00e9rable sur services ext\u00e9rieurs et autres charges": {}, + "4455-TVA r\u00e9cup\u00e9rable sur factures non parvenues": {}, + "4456-TVA transf\u00e9r\u00e9e par d\u2019autres entit\u00e9s": {} + }, + "448-\u00c9tat, charges \u00e0 payer et produits \u00e0 recevoir": { + "4486-Charges \u00e0 payer": {}, + "4487-Produits \u00e0 recevoir": {} + }, + "449-\u00c9tat, cr\u00e9ances et dettes diverses": { + "4491-\u00c9tat, obligations cautionn\u00e9es": {}, + "4492-\u00c9tat, avances et acomptes vers\u00e9s sur imp\u00f4ts": {}, + "4493-\u00c9tat, fonds de dotation \u00e0 recevoir": {}, + "4494-\u00c9tat, subventions investissement \u00e0 recevoir": {}, + "4495-\u00c9tat, subventions d\u2019exploitation \u00e0 recevoir": {}, + "4496-\u00c9tat, subventions d\u2019\u00e9quilibre \u00e0 recevoir": {}, + "4497-\u00c9tat, avances sur subventions": {}, + "4499-\u00c9tat, fonds r\u00e9glement\u00e9s provisionn\u00e9s": {} + } + }, + "45-Organismes internationaux (ACTIF)": { + "451-Op\u00e9rations avec les organismes africains": {}, + "452-Op\u00e9rations avec les autres organismes internationaux": {}, + "458-Organismes internationaux, fonds de dotation et subventions \u00e0 recevoir": { + "4581-Organismes internationaux, fonds de dotation \u00e0 recevoir": {}, + "4582-Organismes internationaux, subventions \u00e0 recevoir": {} + } + }, + "46-Apporteurs, associ\u00e9s et groupe (ACTIF)": { + "461-Apporteurs, op\u00e9rations sur le capital": { + "4613-Apporteurs, capital appel\u00e9, non vers\u00e9": {}, + "4614-Apporteurs, compte d\u2019apport, op\u00e9rations de restructuration (fusion...)": {}, + "4618-Apporteurs, titres \u00e0 \u00e9changer": {} + }, + "467-Apporteurs, restant d\u00fb sur capital appel\u00e9": {} + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (ACTIF)": { + "472-Cr\u00e9ances et dettes sur titres de placement": { + "4721-Cr\u00e9ances sur cessions de titres de placement": {}, + "4726-Versements restant \u00e0 effectuer sur titres de placement non lib\u00e9r\u00e9s": {} + }, + "473-Interm\u00e9diaires Op\u00e9rations faites pour compte de tiers": { + "4731-Mandants": {}, + "4732-Mandataires": {}, + "4733-Commettants": {}, + "4734-Commissionnaires": {}, + "4739-\u00c9tat, Collectivit\u00e9s publiques, fonds global d\u2019allocation": {} + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits": { + "4747-Compte de r\u00e9partition p\u00e9riodique des produits": {} + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA": { + "4751-Compte actif": { + "account_type": "Temporary" + } + }, + "476-Charges constat\u00e9es d\u2019avance": {}, + "478-\u00c9carts de conversion actif": { + "4781-Diminution des cr\u00e9ances d\u2019exploitation": {}, + "4782-Diminution des cr\u00e9ances financi\u00e8res": {}, + "4783-Augmentation des dettes d\u2019exploitation": {}, + "4784-Augmentation des dettes financi\u00e8res": {}, + "4786-Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": {}, + "4788-Diff\u00e9rences compens\u00e9es par couverture de change": {} + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (ACTIF)": { + "485-Cr\u00e9ances sur cessions d\u2019immobilisations": { + "4851-En compte, immobilisations incorporelles": {}, + "4852-En compte, immobilisations corporelles": {}, + "4853-Effets \u00e0 recevoir, immobilisations incorporelles": {}, + "4854-Effets \u00e0 recevoir, immobilisations corporelles": {}, + "4855-Effets escompt\u00e9s non \u00e9chus": {}, + "4857-Retenues de garantie": {}, + "4858-Factures \u00e0 \u00e9tablir": {} + }, + "488-Autres cr\u00e9ances hors activit\u00e9s ordinaires (HAO)": {} + }, + "49-D\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme (tiers) (ACTIF)": { + "491-D\u00e9pr\u00e9ciations des comptes clients": { + "4911-Cr\u00e9ances litigieuses": {}, + "4912-Cr\u00e9ances douteuses": {} + }, + "495-D\u00e9pr\u00e9ciations des comptes organismes internationaux": {}, + "496-D\u00e9pr\u00e9ciations des comptes apporteurs, associ\u00e9s et groupe": { + "4962-Associ\u00e9s, comptes courants": {}, + "4963-Associ\u00e9s, op\u00e9rations faites en commun": {}, + "4966-Groupe, comptes courants": {} + }, + "497-D\u00e9pr\u00e9ciations des comptes d\u00e9biteurs divers": {}, + "498-D\u00e9pr\u00e9ciations des comptes de cr\u00e9ances HAO": { + "4985-Cr\u00e9ances sur cessions d\u2019immobilisations": {}, + "4986-Cr\u00e9ances sur cessions de titres de placement": {}, + "4988-Autres cr\u00e9ances HAO": {} + }, + "499-Provisions pour risques \u00e0 court terme": { + "4991-Sur op\u00e9rations d\u2019exploitation": {}, + "4997-Sur op\u00e9rations financi\u00e8res": {}, + "4998-Sur op\u00e9rations HAO": {} + } + }, + "root_type": "Asset" + }, + "4-Comptes de Tiers (PASSIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (PASSIF)": { + "401-Fournisseurs, dettes en compte": { + "4011-Fournisseurs": { + "account_type": "Payable" + }, + "4012-Fournisseurs groupe": { + "account_type": "Payable" + }, + "4013-Fournisseurs sous-traitants": { + "account_type": "Payable" + }, + "4016-Fournisseurs, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Payable" + }, + "4017-Fournisseur, retenues de garantie": { + "account_type": "Payable" + }, + "account_type": "Payable" + }, + "402-Fournisseurs, effets \u00e0 payer": { + "4021-Fournisseurs Effets \u00e0 payer": { + "account_type": "Payable" + }, + "4022-Fournisseurs Groupe, effets \u00e0 payer": { + "account_type": "Payable" + }, + "4023-Fournisseurs Sous-traitants, effets \u00e0 payer": { + "account_type": "Payable" + }, + "account_type": "Payable" + }, + "404-Fournisseurs, acquisitions courantes d\u2019immobilisations": { + "4041-Fournisseurs Dettes en comptes, immobilisations incorporelles": { + "account_type": "Payable" + }, + "4042-Fournisseurs Dettes en comptes, immobilisations corporelles": { + "account_type": "Payable" + }, + "4046-Fournisseurs Effets \u00e0 payer, immobilisations incorporelles": { + "account_type": "Payable" + }, + "4047-Fournisseurs Effets \u00e0 payer, immobilisations corporelles": { + "account_type": "Payable" + }, + "account_type": "Payable" + }, + "408-Fournisseurs, factures non parvenues": { + "4081-Fournisseurs": { + "account_type": "Stock Received But Not Billed" + }, + "4082-Fournisseurs groupe": { + "account_type": "Stock Received But Not Billed" + }, + "4083-Fournisseurs sous-traitants": { + "account_type": "Stock Received But Not Billed" + }, + "4086-Fournisseurs, int\u00e9r\u00eats courus": { + "account_type": "Stock Received But Not Billed" + }, + "account_type": "Stock Received But Not Billed" + }, + "account_type": "Payable" + }, + "41-Clients et comptes rattach\u00e9s (PASSIF)": { + "419-Clients cr\u00e9diteurs": { + "4191-Clients, avances et acomptes re\u00e7us": {}, + "4192-Clients groupe, avances et acomptes re\u00e7us": {}, + "4194-Clients, dettes pour emballages et mat\u00e9riels consign\u00e9s": {}, + "4198-Clients, rabais, remises, ristournes et autres avoirs \u00e0 accorder": {} + } + }, + "42-Personnel (PASSIF)": { + "422-Personnel, r\u00e9mun\u00e9rations dues": {}, + "423-Personnel, oppositions, saisies-arr\u00eats": { + "4231-Personnel, oppositions": {}, + "4232-Personnel, saisies-arr\u00eats": {}, + "4233-Personnel, avis \u00e0 tiers d\u00e9tenteur": {} + }, + "424-Personnel, \u0153uvres sociales internes": { + "4241-Assistance m\u00e9dicale": {}, + "4242-Allocations familiales": {}, + "4245-Organismes sociaux rattach\u00e9s \u00e0 l\u2019entit\u00e9": {}, + "4248-Autres \u0153uvres sociales internes": {} + }, + "425-Repr\u00e9sentants du personnel": { + "4251-D\u00e9l\u00e9gu\u00e9s du personnel": {}, + "4252-Syndicats et Comit\u00e9s d\u2019entreprises, d\u2019\u00c9tablissement": {}, + "4258-Autres repr\u00e9sentants du personnel": {} + }, + "426-Personnel, participation aux b\u00e9n\u00e9fices et au capital": { + "4261-Participation aux b\u00e9n\u00e9fices": {}, + "4264-Participation au capital": {} + }, + "427-Personnel d\u00e9p\u00f4ts": {}, + "428-Personnel, charges \u00e0 payer et produits \u00e0 recevoir": { + "4281-Dettes provisionn\u00e9es pour cong\u00e9s \u00e0 payer": {}, + "4286-Autres charges \u00e0 payer": {}, + "4287-Produits \u00e0 recevoir": {} + } + }, + "43-Organismes sociaux (PASSIF)": { + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "4381-Charges sociales sur gratifications \u00e0 payer": {}, + "4382-Charges sociales sur cong\u00e9s \u00e0 payer": {}, + "4386-Autres charges \u00e0 payer": {} + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (PASSIF)": { + "441-\u00c9tat, imp\u00f4t sur les b\u00e9n\u00e9fices": {}, + "442-\u00c9tat, autres imp\u00f4ts et taxes": { + "4421-Imp\u00f4ts et taxes d\u2019\u00c9tat": {}, + "4422-Imp\u00f4ts et taxes pour les collectivit\u00e9s publiques": {}, + "4423-Imp\u00f4ts et taxes recouvrables sur des obligataires": {}, + "4424-Imp\u00f4ts et taxes recouvrables sur des associ\u00e9s": {}, + "4426-Droits de douane": {}, + "4428-Autres imp\u00f4ts et taxes": {} + }, + "444-\u00c9tat, TVA due ou cr\u00e9dit de TVA": { + "4441-\u00c9tat, TVA due": {}, + "4449-\u00c9tat, cr\u00e9dit de TVA \u00e0 reporter": {} + }, + "446-\u00c9tat, autres taxes sur le chiffre d\u2019affaires": {}, + "447-\u00c9tat, imp\u00f4ts retenus \u00e0 la source": { + "4471-Imp\u00f4t G\u00e9n\u00e9ral sur le revenu": {}, + "4472-Imp\u00f4ts sur salaires": {}, + "4473-Contribution nationale": {}, + "4474-Contribution nationale de solidarit\u00e9": {}, + "4478-Autres imp\u00f4ts et contributions": {} + } + }, + "46-Apporteurs, associ\u00e9s et groupe (PASSIF)": { + "461-Apporteurs, op\u00e9rations sur le capital (PASSIF)": { + "4611-Apporteurs, apports en nature": {}, + "4612-Apporteurs, apports en num\u00e9raire": {}, + "4615-Apporteurs, versements re\u00e7us sur augmentation de capital": {}, + "4616-Apporteurs, versements anticip\u00e9s": {}, + "4617-Apporteurs d\u00e9faillants": {}, + "4619-Apporteurs, capital \u00e0 rembourser": {} + }, + "462-Associ\u00e9s, comptes courants": { + "4621-Principal": {}, + "4626-Int\u00e9r\u00eats courus": {} + }, + "463-Associ\u00e9s, op\u00e9rations faites en commun et GIE": { + "4631-Op\u00e9rations courantes": {}, + "4636-Int\u00e9r\u00eats courus": {} + }, + "465-Associ\u00e9s, dividendes \u00e0 payer": {}, + "466-Groupe, comptes courants": {} + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (PASSIF)": { + "471-D\u00e9biteurs et cr\u00e9diteurs divers": { + "4711-D\u00e9biteurs divers": {}, + "4712-Cr\u00e9diteurs divers": {}, + "4713-Obligataires": {}, + "4715-R\u00e9mun\u00e9rations d\u2019administrateurs": {}, + "4716-Compte d\u2019affacturage": {}, + "4717-D\u00e9biteurs divers retenues de garantie": {}, + "4718-Apport, compte de fusion et op\u00e9rations assimil\u00e9es": {}, + "4719-Bons de souscription d\u2019actions et d\u2019obligations": {} + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits (PASSIF)": { + "4746-Compte de r\u00e9partition p\u00e9riodique des charges": {} + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA (PASSIF)": { + "4752-Compte passif": {} + }, + "477-Produits constat\u00e9s d\u2019avance": {}, + "479-\u00c9carts de conversion passif": { + "4791-Augmentation des cr\u00e9ances d\u2019exploitation": {}, + "4792-Augmentation des cr\u00e9ances financi\u00e8res": {}, + "4793-Diminution des dettes d\u2019exploitation": {}, + "4794-Diminution des dettes financi\u00e8res": {}, + "4797-Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": {}, + "4798-Diff\u00e9rences compens\u00e9es par couverture de change": {} + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (HAO) (PASSIF)": { + "481-Fournisseurs d\u2019investissements": { + "4811-Immobilisations incorporelles": {}, + "4812-Immobilisations corporelles": {}, + "4813-Versements restant \u00e0 effectuer sur titres de participation et titres immobilis\u00e9s non lib\u00e9r\u00e9s": {}, + "4816-R\u00e9serve de propri\u00e9t\u00e9": {}, + "4817-Retenues de garantie": {}, + "4818-Factures non parvenues": {} + }, + "482-Fournisseurs d\u2019investissements, effets \u00e0 payer": { + "4821-Immobilisations incorporelles": {}, + "4822-Immobilisations corporelles": {} + }, + "484-Autres dettes hors activit\u00e9s ordinaires (HAO)": { + "4887-Produits": {} + } + }, + "49-D\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme (tiers) (PASSIF)": { + "490-D\u00e9pr\u00e9ciations des comptes fournisseurs": {}, + "492-D\u00e9pr\u00e9ciations des comptes personnel": {}, + "493-D\u00e9pr\u00e9ciations des comptes organismes sociaux": {}, + "494-D\u00e9pr\u00e9ciations des comptes \u00c9tat et collectivit\u00e9s publiques": {}, + "495-D\u00e9pr\u00e9ciations des comptes organismes internationaux": {} + }, + "root_type": "Liability" + }, + "5-Comptes de tr\u00e9sorerie": { + "50-Titres de placement": { + "501-Titres du tr\u00e9sor et bons de caisse \u00e0 court terme": { + "5011-Titres du Tr\u00e9sor \u00e0 court terme": {}, + "5012-Titres d\u2019organismes financiers": {}, + "5013-Bons de caisse \u00e0 court terme": {}, + "5016-Frais d\u2019acquisition des titres de tr\u00e9sor et bons de caisse": {} + }, + "502-Actions": { + "5021-Actions ou parts propres": {}, + "5022-Actions cot\u00e9es": {}, + "5023-Actions non cot\u00e9es": {}, + "5024-Actions d\u00e9membr\u00e9es (certificats d\u2019investissement, droits de vote)": {}, + "5025-Autres actions": {}, + "5026-Frais d\u2019acquisition des actions": {} + }, + "503-Obligations": { + "5031-Obligations \u00e9mises par la soci\u00e9t\u00e9 et rachet\u00e9es par elle": {}, + "5032-Obligations cot\u00e9es": {}, + "5033-Obligations non cot\u00e9es": {}, + "5035-Autres obligations": {}, + "5036-Frais d\u2019acquisition des obligations": {} + }, + "504-Bons de souscription": { + "5042-Bons de souscription d\u2019actions": {}, + "5043-Bons de souscription d\u2019obligations": {} + }, + "505-Titres n\u00e9gociables hors r\u00e9gion": {}, + "506-Int\u00e9r\u00eats courus": { + "5061-Titres du Tr\u00e9sor et bons de caisse \u00e0 court terme": {}, + "5062-Actions": {}, + "5063-Obligations": {} + }, + "508-Autres titres de placement et cr\u00e9ances assimil\u00e9es": {} + }, + "51-Valeurs \u00e0 encaisser": { + "511-Effets \u00e0 encaisser": {}, + "512-Effets \u00e0 l\u2019encaissement": {}, + "513-Ch\u00e8ques \u00e0 encaisser": {}, + "514-Ch\u00e8ques \u00e0 l\u2019encaissement": {}, + "515-Cartes de cr\u00e9dit \u00e0 encaisser": {}, + "518-Autres valeurs \u00e0 l\u2019encaissement": { + "5181-Warrants": {}, + "5182-Billets de fonds": {}, + "5185-Ch\u00e8ques de voyage": {}, + "5186-Coupons \u00e9chus": {}, + "5187-Int\u00e9r\u00eats \u00e9chus des obligations": {} + } + }, + "52-Banques": { + "521-Banques locales": { + "5211-Banques en monnaie nationale": { + "account_type": "Bank" + }, + "5215-Banques en devises": { + "account_type": "Bank" + }, + "account_type": "Bank" + }, + "522-Banques autres \u00c9tats r\u00e9gion": {}, + "523-Banques autres \u00c9tats zone mon\u00e9taire": {}, + "524-Banques hors zone mon\u00e9taire": {}, + "525-Banques d\u00e9p\u00f4t \u00e0 terme": {}, + "526-Banques, int\u00e9r\u00eats courus": { + "5261-Banque, int\u00e9r\u00eats courus, charges \u00e0 payer": {}, + "5267-Banque, int\u00e9r\u00eats courus, produits \u00e0 recevoir": {} + } + }, + "53-\u00c9tablissements financiers et assimil\u00e9s": { + "531-Ch\u00e8ques postaux": {}, + "532-Tr\u00e9sor": {}, + "533-Soci\u00e9t\u00e9s de gestion et d\u2019interm\u00e9diation (SGI)": {}, + "536-\u00c9tablissements financiers, int\u00e9r\u00eats courus": {}, + "538-Autres organismes financiers": {} + }, + "54-Instruments de tr\u00e9sorerie": { + "541-Options de taux d\u2019int\u00e9r\u00eat": {}, + "542-Options de taux de change": {}, + "543-Options de taux boursiers": {}, + "544-Instruments de march\u00e9s \u00e0 terme": {}, + "545-Avoirs d\u2019or et autres m\u00e9taux pr\u00e9cieux": {} + }, + "55-Instruments de monnaie \u00e9lectronique": { + "551-Monnaie \u00e9lectronique carte carburant": {}, + "552-Monnaie \u00e9lectronique t\u00e9l\u00e9phone portable": {}, + "553-Monnaie \u00e9lectronique carte p\u00e9age": {}, + "554-Porte-monnaie \u00e9lectronique": {}, + "558-Autres instruments de monnaies \u00e9lectroniques": {} + }, + "56-Banques, cr\u00e9dits de tr\u00e9sorerie et d\u2019escompte": { + "561-Cr\u00e9dits de tr\u00e9sorerie": {}, + "564-Escompte de cr\u00e9dits de campagne": {}, + "565-Escompte de cr\u00e9dits ordinaires": {}, + "566-Banques, cr\u00e9dits de tr\u00e9sorerie, int\u00e9r\u00eats courus": {} + }, + "57-Caisse": { + "571-Caisse si\u00e8ge social": { + "5711-Caisse en monnaie nationale": {}, + "5712-Caisse en devises": {} + }, + "572-Caisse succursale A": { + "5721-En monnaie nationale": {}, + "5722-En devises": {} + }, + "573-Caisse succursale B": { + "5731-En monnaie nationale": {}, + "5732-En devises": {} + } + }, + "58-R\u00e9gies d\u2019avances, accr\u00e9ditifs et virements internes": { + "581-R\u00e9gies d\u2019avance": {}, + "582-Accr\u00e9ditifs": {}, + "585-Virements de fonds": {}, + "588-Autres virements internes": {} + }, + "59-D\u00e9pr\u00e9ciations et provisions pour risque \u00e0 court terme": { + "590-D\u00e9pr\u00e9ciations des titres de placement": {}, + "591-D\u00e9pr\u00e9ciations des titres et valeurs \u00e0 encaisser": {}, + "592-D\u00e9pr\u00e9ciations des comptes banques": {}, + "593-D\u00e9pr\u00e9ciations des comptes \u00e9tablissements financiers et assimil\u00e9s": {}, + "594-D\u00e9pr\u00e9ciations des comptes d\u2019instruments de tr\u00e9sorerie": {}, + "599-Provisions pour risque \u00e0 court terme \u00e0 caract\u00e8re financier": {} + }, + "root_type": "Asset" + }, + "6-Comptes de charges des activit\u00e9s ordinaires": { + "60-Achats et variations de stocks": { + "601-Achats de marchandises": { + "6011-Dans la R\u00e9gion": {}, + "6012-Hors R\u00e9gion": {}, + "6013-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "6014-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "6015-Frais sur achats": {}, + "6019-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "602-Achats de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "6021-Dans la R\u00e9gion": {}, + "6022-Hors R\u00e9gion": {}, + "6023-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "6024-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "6025-Frais sur achats": {}, + "6029-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "603-Variations des stocks de biens achet\u00e9s": { + "6031-Variations des stocks de marchandises": {}, + "6032-Variations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": {}, + "6033-Variations des stocks d\u2019autres approvisionnements": {} + }, + "604-Achats stock\u00e9s de mati\u00e8res et fournitures consommables": { + "6041-Mati\u00e8res consommables": {}, + "6042-Mati\u00e8res combustibles": {}, + "6043-Produits d\u2019entretien": {}, + "6044-Fournitures d\u2019atelier et d\u2019usine": {}, + "6045-Frais sur achat": {}, + "6046-Fournitures de magasin": {}, + "6047-Fournitures de bureau": {}, + "6049-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "605-Autres achats": { + "6051-Fournitures non stockables Eau": {}, + "6052-Fournitures non stockables \u00c9lectricit\u00e9": {}, + "6053-Fournitures non stockables Autres \u00e9nergies": {}, + "6054-Fournitures d\u2019entretien non stockables": {}, + "6055-Fournitures de bureau non stockables": {}, + "6056-Achats de petit mat\u00e9riel et outillage": {}, + "6057-Achats d\u2019\u00e9tudes et prestations de services": {}, + "6058-Achats de travaux, mat\u00e9riels et \u00e9quipements": {}, + "6059-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "608-Achats d\u2019emballages": { + "6081-Emballages perdus": {}, + "6082-Emballages r\u00e9cup\u00e9rables non identifiables": {}, + "6083-Emballages \u00e0 usage mixte": {}, + "6085-Frais sur achats": {}, + "6089-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + } + }, + "61-Transports": { + "612-Transports sur ventes": {}, + "613-Transports pour le compte de tiers": {}, + "614-Transports du personnel": {}, + "616-Transports de plis": {}, + "618-Autres frais de transport": { + "6181-Voyages et d\u00e9placements": {}, + "6182-Transports entre \u00e9tablissements ou chantiers": {}, + "6183-Transports administratifs": {} + } + }, + "62-Services ext\u00e9rieurs": { + "621-Sous-traitance g\u00e9n\u00e9rale": {}, + "622-Locations, charges locatives": { + "6221-Locations de terrains": {}, + "6222-Locations de b\u00e2timents": {}, + "6223-Locations de mat\u00e9riels et outillages": {}, + "6224-Malis sur emballages": {}, + "6225-Locations d\u2019emballages": {}, + "6226-Fermages et loyers du foncier": {}, + "6228-Locations et charges locatives diverses": {} + }, + "623-Redevances de location acquisition": { + "6232-Cr\u00e9dit-bail immobilier": {}, + "6233-Cr\u00e9dit-bail mobilier": {}, + "6234-Location-vente": {}, + "6238-Autres contrats de location acquisition": {} + }, + "624-Entretien, r\u00e9parations, remise en \u00e9tat et maintenance": { + "6241-Entretien et r\u00e9parations des biens immobiliers": {}, + "6242-Entretien et r\u00e9parations des biens mobiliers": {}, + "6243-Maintenance": {}, + "6244-Charges de d\u00e9mant\u00e8lement et remise en \u00e9tat": {}, + "6248-Autres entretiens et r\u00e9parations": {} + }, + "625-Primes d\u2019assurance": { + "6251-Assurances multirisques": {}, + "6252-Assurances mat\u00e9riel de transport": {}, + "6253-Assurances risques d\u2019exploitation": {}, + "6254-Assurances responsabilit\u00e9 du producteur": {}, + "6255-Assurances insolvabilit\u00e9 clients": {}, + "6257-Assurances transport sur ventes": {}, + "6258-Autres primes d\u2019assurances": {} + }, + "626-\u00c9tudes, recherches et documentation": { + "6261-\u00c9tudes et recherches": {}, + "6265-Documentation g\u00e9n\u00e9rale": {}, + "6266-Documentation technique": {} + }, + "627-Publicit\u00e9, publications, relations publiques": { + "6271-Annonces, insertions": {}, + "6272-Catalogues, imprim\u00e9s publicitaires": {}, + "6273-\u00c9chantillons": {}, + "6274-Foires et expositions": {}, + "6275-Publications": {}, + "6276-Cadeaux \u00e0 la client\u00e8le": {}, + "6277-Frais de colloques, s\u00e9minaires, conf\u00e9rences": {}, + "6278-Autres charges de publicit\u00e9 et relations publiques": {} + }, + "628-Frais de t\u00e9l\u00e9communications": { + "6281-Frais de t\u00e9l\u00e9phone": {}, + "6282-Frais de t\u00e9lex": {}, + "6283-Frais de t\u00e9l\u00e9copie": {}, + "6288-Autres frais de t\u00e9l\u00e9communications": {} + } + }, + "63-Autres services ext\u00e9rieurs": { + "631-Frais bancaires": { + "6311-Frais sur titres (vente, garde)": {}, + "6312-Frais sur effets": {}, + "6313-Location de coffres": {}, + "6314-Commissions d\u2019affacturage": {}, + "6315-Commissions sur cartes de cr\u00e9dit": {}, + "6316-Frais d\u2019\u00e9mission d\u2019emprunts": {}, + "6317-Frais sur instruments monnaie \u00e9lectronique": {}, + "6318-Autres frais bancaires": {} + }, + "632-R\u00e9mun\u00e9rations d\u2019interm\u00e9diaires et de conseils": { + "6322-Commissions et courtages sur ventes": {}, + "6324-Honoraires des professions r\u00e9glement\u00e9es": {}, + "6325-Frais d\u2019actes et de contentieux": {}, + "6326-R\u00e9mun\u00e9rations d\u2019affacturage": {}, + "6327-R\u00e9mun\u00e9rations des autres prestataires de services": {}, + "6328-Divers frais": {} + }, + "633-Frais de formation du personnel": {}, + "634-Redevances pour brevets, licences, logiciels, concessions et droits et valeurs similaires": { + "6342-Redevances pour brevets, licences": {}, + "6343-Redevances pour logiciels": {}, + "6344-Redevances pour marques": {}, + "6345-Redevances pour sites internet": {}, + "6346-Redevances pour concessions, droits et valeurs similaires": {} + }, + "635-Cotisations": { + "6351-Cotisations": {}, + "6358-Concours divers": {} + }, + "637-R\u00e9mun\u00e9rations de personnel ext\u00e9rieur \u00e0 l\u2019entit\u00e9": { + "6371-Personnel int\u00e9rimaire": {}, + "6372-Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": {} + }, + "638-Autres charges externes": { + "6381-Frais de recrutement du personnel": {}, + "6382-Frais de d\u00e9m\u00e9nagement": {}, + "6383-R\u00e9ceptions": {}, + "6384-Missions": {}, + "6385-Charges de copropri\u00e9t\u00e9": {} + } + }, + "64-Imp\u00f4ts et taxes": { + "641-Imp\u00f4ts et taxes directs": { + "6411-Imp\u00f4ts fonciers et taxes annexes": {}, + "6412-Patentes, licences et taxes annexes": {}, + "6413-Taxes sur appointements et salaires": {}, + "6414-Taxes d\u2019apprentissage": {}, + "6415-Formation professionnelle continue": {}, + "6418-Autres imp\u00f4ts et taxes directs": {} + }, + "645-Imp\u00f4ts et taxes indirects": {}, + "646-Droits d\u2019enregistrement": { + "6461-Droits de mutation": {}, + "6462-Droits de timbre": {}, + "6463-Taxes sur les v\u00e9hicules de soci\u00e9t\u00e9": {}, + "6464-Vignettes": {}, + "6468-Autres droits": {} + }, + "647-P\u00e9nalit\u00e9s, amendes fiscales": { + "6471-P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts directs": {}, + "6472-P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts indirects": {}, + "6473-P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts directs": {}, + "6474-P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts indirects": {}, + "6478-Autres p\u00e9nalit\u00e9s et amendes fiscales": {} + }, + "648-Autres imp\u00f4ts et taxes": {} + }, + "65-Autres charges": { + "651-Pertes sur cr\u00e9ances clients et autres d\u00e9biteurs": { + "6511-Clients": {}, + "6515-Autres d\u00e9biteurs": {} + }, + "652-Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "6521-Quote-part transf\u00e9r\u00e9e de b\u00e9n\u00e9fices (comptabilit\u00e9 du g\u00e9rant)": {}, + "6525-Pertes imput\u00e9es par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": {} + }, + "654-Valeurs comptables des cessions courantes d\u2019immobilisations": { + "6541-Immobilisations incorporelles": {}, + "6542-Immobilisations corporelles": {} + }, + "656-Perte de change sur cr\u00e9ances et dettes commerciale": {}, + "657-P\u00e9nalit\u00e9s et amendes p\u00e9nales": {}, + "658-Charges diverses": { + "6581-Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": {}, + "6582-Dons": {}, + "6583-M\u00e9c\u00e9nat": {}, + "6588-Autres charges diverses": {} + }, + "659-Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "6591-Sur risques \u00e0 court terme": {}, + "6593-Sur stocks": {}, + "6594-Sur cr\u00e9ances": {}, + "6598-Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme": {} + } + }, + "66-Charges de personnel": { + "661-R\u00e9mun\u00e9rations directes vers\u00e9es au personnel national": { + "6611-Appointements salaires et commissions": {}, + "6612-Primes et gratifications": {}, + "6613-Cong\u00e9s pay\u00e9s": {}, + "6614-Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": {}, + "6615-Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": {}, + "6616-Suppl\u00e9ment familial": {}, + "6617-Avantages en nature": {}, + "6618-Autres r\u00e9mun\u00e9rations directes": {} + }, + "662-R\u00e9mun\u00e9rations directes vers\u00e9es au personnel non national": { + "6621-Appointements salaires et commissions": {}, + "6622-Primes et gratifications": {}, + "6623-Cong\u00e9s pay\u00e9s": {}, + "6624-Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": {}, + "6625-Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": {}, + "6626-Suppl\u00e9ment familial": {}, + "6627-Avantages en nature": {}, + "6628-Autres r\u00e9mun\u00e9rations directes": {} + }, + "663-Indemnit\u00e9s forfaitaires vers\u00e9es au personnel": { + "6631-Indemnit\u00e9s de logement": {}, + "6632-Indemnit\u00e9s de repr\u00e9sentation": {}, + "6633-Indemnit\u00e9s d\u2019expatriation": {}, + "6634-Indemnit\u00e9s de transport": {}, + "6638-Autres indemnit\u00e9s et avantages divers": {} + }, + "664-Charges sociales": { + "6641-Charges sociales sur r\u00e9mun\u00e9ration du personnel national": {}, + "6642-Charges sociales sur r\u00e9mun\u00e9ration du personnel non national": {} + }, + "666-R\u00e9mun\u00e9rations et charges sociales de l\u2019exploitant individuel": { + "6661-R\u00e9mun\u00e9ration du travail de l\u2019exploitant": {}, + "6662-Charges sociales": {} + }, + "667-R\u00e9mun\u00e9ration transf\u00e9r\u00e9e de personnel ext\u00e9rieur": { + "6671-Personnel int\u00e9rimaire": {}, + "6672-Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": {} + }, + "668-Autres charges sociales": { + "6681-Versements aux syndicats et comit\u00e9s d\u2019entreprise, d\u2019\u00e9tablissement": {}, + "6682-Versements aux comit\u00e9s d\u2019hygi\u00e8ne et de s\u00e9curit\u00e9": {}, + "6683-Versements et contributions aux autres \u0153uvres sociales": {}, + "6684-M\u00e9decine du travail et pharmacie": {}, + "6685-Assurances et organismes de sant\u00e9": {}, + "6686-Assurances retraite et fonds de pension": {}, + "6687-Majorations et p\u00e9nalit\u00e9s sociales": {}, + "6688-Charges sociales diverses": {} + } + }, + "67-Frais financiers et charges assimil\u00e9es": { + "671-Int\u00e9r\u00eats des emprunts": { + "6711-Emprunts obligataires": {}, + "6712-Emprunts aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": {}, + "6713-Dettes li\u00e9es \u00e0 des participations": {}, + "6714-Primes de remboursement des obligations": {} + }, + "672-Int\u00e9r\u00eats dans loyers de location acquisition": { + "6722-Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail immobilier": {}, + "6723-Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail mobilier": {}, + "6724-Int\u00e9r\u00eats dans loyers de location acquisition / location-vente": {}, + "6728-Int\u00e9r\u00eats dans loyers des autres locations acquisition": {} + }, + "673-Escomptes accord\u00e9s": {}, + "674-Autres int\u00e9r\u00eats": { + "6741-Avances re\u00e7ues et d\u00e9p\u00f4ts cr\u00e9diteurs": {}, + "6742-Comptes courants bloqu\u00e9s": {}, + "6743-Int\u00e9r\u00eats sur obligations cautionn\u00e9es": {}, + "6744-Int\u00e9r\u00eats sur dettes commerciales": {}, + "6745-Int\u00e9r\u00eats bancaires et sur op\u00e9rations de financement (escompte...)": {}, + "6748-Int\u00e9r\u00eats sur dettes diverses": {} + }, + "675-Escomptes des effets de commerce": {}, + "676-Pertes de change financi\u00e8res": {}, + "677-Pertes sur titres de placement": { + "6771-Pertes sur cessions de titres de placement": {}, + "6772-Mali provenant d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": {} + }, + "678-Pertes et charges sur risques financiers": { + "6781-Sur rentes viag\u00e8res": {}, + "6782-Sur op\u00e9rations financi\u00e8res": {}, + "6784-Sur instruments de tr\u00e9sorerie": {} + }, + "679-Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "6791-Sur risques financiers": {}, + "6795-Sur titres de placement": {}, + "6798-Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": {} + } + }, + "68-Dotations aux amortissements": { + "681-Dotations aux amortissements d\u2019exploitation": { + "6812-Dotations aux amortissements des immobilisations incorporelles": {}, + "6813-Dotations aux amortissements des immobilisations corporelles": {} + } + }, + "69-Dotations aux provisions et aux d\u00e9pr\u00e9ciations": { + "691-Dotations aux provisions et aux d\u00e9pr\u00e9ciations d\u2019exploitation": { + "6911-Dotations aux provisions pour risques et charges": {}, + "6913-Dotations aux d\u00e9pr\u00e9ciations des immobilisations incorporelles": {}, + "6914-Dotations aux d\u00e9pr\u00e9ciations des immobilisations corporelles": {} + }, + "697-Dotations aux provisions et aux d\u00e9pr\u00e9ciations financi\u00e8res": { + "6971-Dotations aux provisions pour risques et charges": {}, + "6972-Dotations aux d\u00e9pr\u00e9ciations des immobilisations financi\u00e8res": {} + } + }, + "root_type": "Expense" + }, + "7-Comptes de produits des activit\u00e9s ordinaires": { + "70-Ventes": { + "701-Ventes de marchandises": { + "7011-Dans la R\u00e9gion": {}, + "7012-Hors R\u00e9gion": {}, + "7013-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7014-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7015-Sur internet": {}, + "7019-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "702-Ventes de produits finis": { + "7021-Dans la R\u00e9gion": {}, + "7022-Hors R\u00e9gion": {}, + "7023-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7024-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7025-Sur internet": {}, + "7029-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "703-Ventes de produits interm\u00e9diaires": { + "7031-Dans la R\u00e9gion": {}, + "7032-Hors R\u00e9gion": {}, + "7033-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7034-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7035-Sur internet": {}, + "7039-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "704-Ventes de produits r\u00e9siduels": { + "7041-Dans la R\u00e9gion": {}, + "7042-Hors R\u00e9gion": {}, + "7043-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7044-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7045-Sur internet": {}, + "7049-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "705-Travaux factur\u00e9s": { + "7051-Dans la R\u00e9gion": {}, + "7052-Hors R\u00e9gion": {}, + "7053-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7054-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7055-Sur internet": {}, + "7059-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "706-Services vendus": { + "7061-Dans la R\u00e9gion": {}, + "7062-Hors R\u00e9gion": {}, + "7063-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7064-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7065-Sur internet": {}, + "7069-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "707-Produits accessoires": { + "7071-Ports, emballages perdus et autres frais factur\u00e9s": {}, + "7072-Commissions et courtages": {}, + "7073-Locations": {}, + "7074-Bonis sur reprises et cessions d\u2019emballages": {}, + "7075-Mise \u00e0 disposition de personnel": {}, + "7076-Redevances pour brevets, logiciels, marques et droits similaires": {}, + "7077-Services exploit\u00e9s dans l\u2019int\u00e9r\u00eat du personnel": {}, + "7078-Autres produits accessoires": {} + } + }, + "71-Subventions d\u2019exploitation": { + "711-Sur produits \u00e0 l\u2019exportation": {}, + "712-Sur produits \u00e0 l\u2019importation": {}, + "713-Sur produits de p\u00e9r\u00e9quation": {}, + "714-Indemnit\u00e9s et subventions d\u2019exploitation (entit\u00e9 agricole)": {}, + "718-Autres subventions d\u2019exploitation": { + "7181-Vers\u00e9es par l\u2019\u00c9tat et les collectivit\u00e9s publiques": {}, + "7182-Vers\u00e9es par les organismes internationaux": {}, + "7183-Vers\u00e9es par des tiers": {} + } + }, + "72-Production immobilis\u00e9e": { + "721-Immobilisations incorporelles": {}, + "722-Immobilisations corporelles": { + "7221-Immobilisations corporelles (hors actifs biologiques)": {}, + "7222-Immobilisations corporelles (actifs biologiques)": {} + }, + "724-Production auto-consomm\u00e9e": {}, + "726-Immobilisations financi\u00e8res": {} + }, + "73-Variations des stocks de biens et de services produits": { + "734-Variations des stocks de produits en cours": { + "7341-Produits en cours": {}, + "7342-Travaux en cours": {} + }, + "735-Variations des en-cours de services": { + "7351-\u00c9tudes en cours": {}, + "7352-Prestations de services en cours": {} + }, + "736-Variations des stocks de produits finis": {}, + "737-Variations des stocks de produits interm\u00e9diaires et r\u00e9siduels": { + "7371-Produits interm\u00e9diaires": {}, + "7372-Produits r\u00e9siduels": {} + } + }, + "75-Autres produits": { + "751-Profits sur cr\u00e9ances clients et autres d\u00e9biteurs": {}, + "752-Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "7521-Quote-part transf\u00e9r\u00e9e de pertes (comptabilit\u00e9 du g\u00e9rant)": {}, + "7525-B\u00e9n\u00e9fices attribu\u00e9s par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": {} + }, + "754-Produits des cessions courantes d\u2019immobilisations": { + "7541-Immobilisations incorporelles": {}, + "7542-Immobilisations corporelles": {} + }, + "756-Gains de change sur cr\u00e9ances et dettes commerciales": {}, + "758-Produits divers": { + "7581-Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": {}, + "7582-Indemnit\u00e9s d\u2019assurances re\u00e7ues": {}, + "7588-Autres produits divers": {} + }, + "759-Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "7591-Sur risques \u00e0 court terme": {}, + "7593-Sur stocks": {}, + "7594-Sur cr\u00e9ances": {}, + "7598-Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": {} + } + }, + "77-Revenus financiers et produits assimil\u00e9s": { + "771-Int\u00e9r\u00eats de pr\u00eats et cr\u00e9ances diverses": { + "7712-Int\u00e9r\u00eats de pr\u00eats": {}, + "7713-Int\u00e9r\u00eats sur cr\u00e9ances diverses": {} + }, + "772-Revenus de participations et autres titres immobilis\u00e9s": { + "7721-Revenus des titres de participation": {}, + "7722-Revenus autres titres immobilis\u00e9s": {} + }, + "773-Escomptes obtenus": {}, + "774-Revenus de placement": { + "7745-Revenus des obligations": {}, + "7746-Revenus des titres de placement": {} + }, + "775-Int\u00e9r\u00eats dans loyers de location acquisition": {}, + "776-Gains de change financiers": {}, + "777-Gains sur cessions de titres de placement": {}, + "778-Gains sur risques financiers": { + "7781-Sur rentes viag\u00e8res": {}, + "7782-Sur op\u00e9rations financi\u00e8res": {}, + "7784-Sur instruments de tr\u00e9sorerie": {} + }, + "779-Reprises de charges pour d\u00e9pr\u00e9ciations et provisions \u00e0 court terme financi\u00e8res": { + "7791-Sur risques financiers": {}, + "7795-Sur titres de placement": {}, + "7798-Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": {} + } + }, + "78-Transferts de charges": { + "781-Transferts de charges d\u2019exploitation": {}, + "787-Transferts de charges financi\u00e8res": {} + }, + "79-Reprises de provisions, de d\u00e9pr\u00e9ciations et autres": { + "791-Reprises de provisions et d\u00e9pr\u00e9ciations d\u2019exploitation": { + "7911-Pour risques et charges": {}, + "7913-Des immobilisations incorporelles": {}, + "7914-Des immobilisations corporelles": {} + }, + "797-Reprises de provisions et d\u00e9pr\u00e9ciations financi\u00e8res": { + "7971-Pour risques et charges": {}, + "7972-Des immobilisations financi\u00e8res": {} + }, + "798-Reprises d\u2019amortissements": {}, + "799-Reprises de subventions d\u2019investissement": {} + }, + "root_type": "Income" + }, + "8-Comptes des autres charges et des autres produits (CHARGES)": { + "81-Valeurs comptables des cessions d\u2019immobilisations": { + "811-Immobilisations incorporelles": {}, + "812-Immobilisations corporelles": {}, + "816-Immobilisations financi\u00e8res": {} + }, + "83-Charges hors activit\u00e9s ordinaires": { + "831-Charges HAO constat\u00e9es": {}, + "833-Charges li\u00e9es aux op\u00e9rations de restructuration": {}, + "834-Pertes sur cr\u00e9ances HAO": {}, + "835-Dons et lib\u00e9ralit\u00e9s accord\u00e9s": {}, + "836-Abandons de cr\u00e9ances consentis": {}, + "837-Charges li\u00e9es aux op\u00e9rations de liquidation": {}, + "839-Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": {} + }, + "85-Dotations hors activit\u00e9s ordinaires": { + "851-Dotations aux provisions r\u00e9glement\u00e9es": {}, + "852-Dotations aux amortissements HAO": {}, + "853-Dotations aux d\u00e9pr\u00e9ciations HAO": {}, + "854-Dotations aux provisions pour risques et charges HAO": {}, + "858-Autres dotations HAO": {} + }, + "87-Participation des travailleurs": { + "871-Participation l\u00e9gale aux b\u00e9n\u00e9fices": {}, + "874-Participation contractuelle aux b\u00e9n\u00e9fices": {}, + "878-Autres participations": {} + }, + "89-Imp\u00f4ts sur le r\u00e9sultat": { + "891-Imp\u00f4ts sur les b\u00e9n\u00e9fices de l\u2019exercice": { + "8911-Activit\u00e9s exerc\u00e9es dans l\u2019\u00c9tat": {}, + "8912-Activit\u00e9s exerc\u00e9es dans les autres \u00c9tats de la R\u00e9gion": {}, + "8913-Activit\u00e9s exerc\u00e9es hors R\u00e9gion": {} + }, + "892-Rappel d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": {}, + "895-Imp\u00f4t minimum forfaitaire IMF": {}, + "899-D\u00e9gr\u00e8vements et annulations d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": { + "8991-D\u00e9gr\u00e8vements": {}, + "8994-Annulations pour pertes r\u00e9troactives": {} + } + }, + "root_type": "Expense" + }, + "8-Comptes des autres charges et des autres produits (PRODUITS)": { + "82-Produits des cessions d\u2019immobilisations": { + "821-Immobilisations incorporelles": {}, + "822-Immobilisations corporelles": {}, + "826-Immobilisations financi\u00e8res": {} + }, + "84-Produits hors activit\u00e9s ordinaires": { + "841-Produits HAO constat\u00e9s": {}, + "843-Produits li\u00e9s aux op\u00e9rations de restructuration": {}, + "844-Indemnit\u00e9s et subventions HAO (entit\u00e9 agricole)": {}, + "845-Dons et lib\u00e9ralit\u00e9s obtenus": {}, + "846-Abandons de cr\u00e9ances obtenus": {}, + "847-Produits li\u00e9s aux op\u00e9rations de liquidation": {}, + "848-Transferts de charges HAO": {}, + "849-Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": {} + }, + "86-Reprises de charges, provisions et d\u00e9pr\u00e9ciations HAO": { + "861-Reprises de provisions r\u00e9glement\u00e9es": {}, + "862-Reprises d\u2019amortissements HAO": {}, + "863-Reprises de d\u00e9pr\u00e9ciations HAO": {}, + "864-Reprises de provisions pour risques et charges HAO": {}, + "868-Autres reprises HAO": {} + }, + "88-Subventions d\u2019\u00e9quilibre": { + "881-\u00c9tat": {}, + "884-Collectivit\u00e9s publiques": {}, + "886-Groupe": {}, + "888-Autres": {} + }, + "root_type": "Income" + } + } +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/km_plan_comptable_avec_code.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/km_plan_comptable_avec_code.json new file mode 100644 index 00000000000..38f26d5ee4e --- /dev/null +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/km_plan_comptable_avec_code.json @@ -0,0 +1,4208 @@ +{ + "country_code": "km", + "name": "Syscohada - Plan Comptable avec code", + "tree": { + "Comptes de ressources durables": { + "Capital": { + "Capital social": { + "Capital souscrit, non appel\u00e9": { + "account_number": "1011" + }, + "Capital souscrit, appel\u00e9, non vers\u00e9": { + "account_number": "1012" + }, + "Capital souscrit, appel\u00e9, vers\u00e9, non amorti": { + "account_number": "1013" + }, + "Capital souscrit, appel\u00e9, vers\u00e9, amorti": { + "account_number": "1014" + }, + "Capital souscrit soumis \u00e0 des conditions particuli\u00e8res": { + "account_number": "1018" + }, + "account_number": "101" + }, + "Capital par dotation": { + "Dotation initiale": { + "account_number": "1021" + }, + "Dotations compl\u00e9mentaires": { + "account_number": "1022" + }, + "Autres dotations": { + "account_number": "1028" + }, + "account_number": "102" + }, + "Capital personnel": { + "account_number": "103" + }, + "Compte de l\u2019exploitant": { + "Apports temporaires": { + "account_number": "1041" + }, + "Op\u00e9rations courantes": { + "account_number": "1042" + }, + "R\u00e9mun\u00e9rations, imp\u00f4ts et autres charges personnelles": { + "account_number": "1043" + }, + "Pr\u00e9l\u00e8vements d\u2019autoconsommation": { + "account_number": "1047" + }, + "Autres pr\u00e9l\u00e8vements": { + "account_number": "1048" + }, + "account_number": "104" + }, + "Primes li\u00e9es au capital social": { + "Primes d\u2019\u00e9mission": { + "account_number": "1051" + }, + "Primes d\u2019apport": { + "account_number": "1052" + }, + "Primes de fusion": { + "account_number": "1053" + }, + "Primes de conversion": { + "account_number": "1054" + }, + "Autres primes": { + "account_number": "1058" + }, + "account_number": "105" + }, + "\u00c9carts de r\u00e9\u00e9valuation": { + "\u00c9carts de r\u00e9\u00e9valuation l\u00e9gale": { + "account_number": "1061" + }, + "\u00c9carts de r\u00e9\u00e9valuation libre": { + "account_number": "1062" + }, + "account_number": "106" + }, + "Apporteurs, capital souscrit, non appel\u00e9": { + "account_number": "109" + }, + "account_number": "10" + }, + "R\u00e9serves": { + "R\u00e9serve l\u00e9gale": { + "account_number": "111" + }, + "R\u00e9serves statutaires ou contractuelles": { + "account_number": "112" + }, + "R\u00e9serves r\u00e9glement\u00e9es": { + "R\u00e9serves de plus-values nettes \u00e0 long terme": { + "account_number": "1131" + }, + "R\u00e9serves d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": { + "account_number": "1132" + }, + "R\u00e9serves cons\u00e9cutives \u00e0 l\u2019octroi de subventions d\u2019investissement": { + "account_number": "1133" + }, + "R\u00e9serves des valeurs mobili\u00e8res donnant acc\u00e8s au capital": { + "account_number": "1134" + }, + "Autres r\u00e9serves r\u00e9glement\u00e9es": { + "account_number": "1135" + }, + "account_number": "113" + }, + "Autres r\u00e9serves": { + "R\u00e9serves facultatives": { + "account_number": "1181" + }, + "R\u00e9serves diverses": { + "account_number": "1188" + }, + "account_number": "118" + }, + "account_number": "11" + }, + "Report \u00e0 nouveau": { + "Report \u00e0 nouveau cr\u00e9diteur": { + "account_number": "121" + }, + "Report \u00e0 nouveau d\u00e9biteur": { + "Perte nette \u00e0 reporter": { + "account_number": "1291" + }, + "Perte Amortissements r\u00e9put\u00e9s diff\u00e9r\u00e9s": { + "account_number": "1292" + }, + "account_number": "129" + }, + "account_number": "12" + }, + "R\u00e9sultat net de l\u2019exercice": { + "R\u00e9sultat en instance d\u2019affectation": { + "R\u00e9sultat en instance d\u2019affectation : b\u00e9n\u00e9fice": { + "account_number": "1301" + }, + "R\u00e9sultat en instance d\u2019affectation : perte": { + "account_number": "1309" + }, + "account_number": "130" + }, + "R\u00e9sultat net : b\u00e9n\u00e9fice": { + "account_number": "131" + }, + "Marge commerciale (MC)": { + "account_number": "132" + }, + "Valeur ajout\u00e9e (VA)": { + "account_number": "133" + }, + "Exc\u00e9dent brut d\u2019exploitation (EBE)": { + "account_number": "134" + }, + "R\u00e9sultat d\u2019exploitation (RE)": { + "account_number": "135" + }, + "R\u00e9sultat financier (RF)": { + "account_number": "136" + }, + "R\u00e9sultat des activit\u00e9s ordinaires (RAO)": { + "account_number": "137" + }, + "R\u00e9sultat hors activit\u00e9s ordinaires (RHAO)": { + "R\u00e9sultat de fusion": { + "account_number": "1381" + }, + "R\u00e9sultat d\u2019apport partiel d\u2019actif": { + "account_number": "1382" + }, + "R\u00e9sultat de scission": { + "account_number": "1383" + }, + "R\u00e9sultat de liquidation": { + "account_number": "1384" + }, + "account_number": "138" + }, + "R\u00e9sultat net : perte": { + "account_number": "139" + }, + "account_number": "13" + }, + "Subventions d\u2019investissement": { + "Subventions d\u2019\u00e9quipement": { + "\u00c9tat": { + "account_number": "1411" + }, + "R\u00e9gions": { + "account_number": "1412" + }, + "D\u00e9partements": { + "account_number": "1413" + }, + "Communes et collectivit\u00e9s publiques d\u00e9centralis\u00e9es": { + "account_number": "1414" + }, + "Entit\u00e9s publiques ou mixtes": { + "account_number": "1415" + }, + "Entit\u00e9s et organismes priv\u00e9s": { + "account_number": "1416" + }, + "Organismes internationaux": { + "account_number": "1417" + }, + "Autres": { + "account_number": "1418" + }, + "account_number": "141" + }, + "Autres subventions d\u2019investissement": { + "account_number": "148" + }, + "account_number": "14" + }, + "Provisions r\u00e9glement\u00e9es et fonds assimil\u00e9s": { + "Amortissements d\u00e9rogatoires": { + "account_number": "151" + }, + "Plus-values de cession \u00e0 r\u00e9investir": { + "account_number": "152" + }, + "Fonds r\u00e9glement\u00e9s": { + "Fonds National": { + "account_number": "1531" + }, + "Pr\u00e9l\u00e8vement pour le Budget": { + "account_number": "1532" + }, + "account_number": "153" + }, + "Provisions sp\u00e9ciales de r\u00e9\u00e9valuation": { + "account_number": "154" + }, + "Provisions r\u00e9glement\u00e9es relatives aux immobilisations": { + "Reconstitution des gisements miniers et p\u00e9troliers": { + "account_number": "1551" + }, + "account_number": "155" + }, + "Provisions r\u00e9glement\u00e9es relatives aux stocks": { + "Hausse de prix": { + "account_number": "1561" + }, + "Fluctuation des cours": { + "account_number": "1562" + }, + "account_number": "156" + }, + "Provisions pour investissement": { + "account_number": "157" + }, + "Autres provisions et fonds r\u00e9glement\u00e9s": { + "account_number": "158" + }, + "account_number": "15" + }, + "Emprunts et dettes assimil\u00e9es": { + "Emprunts obligataires": { + "Emprunts obligataires ordinaires": { + "account_number": "1611" + }, + "Emprunts obligataires convertibles en actions": { + "account_number": "1612" + }, + "Emprunts obligataires remboursables en actions": { + "account_number": "1613" + }, + "Autres emprunts obligataires": { + "account_number": "1618" + }, + "account_number": "161" + }, + "Emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": { + "account_number": "162" + }, + "Avances re\u00e7ues de l\u2019\u00c9tat": { + "account_number": "163" + }, + "Avances re\u00e7ues et comptes courants bloqu\u00e9s": { + "account_number": "164" + }, + "D\u00e9p\u00f4ts et cautionnements re\u00e7us": { + "D\u00e9p\u00f4ts": { + "account_number": "1651" + }, + "Cautionnements": { + "account_number": "1652" + }, + "account_number": "165" + }, + "Int\u00e9r\u00eats courus": { + "Sur emprunts obligataires": { + "account_number": "1661" + }, + "Sur emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": { + "account_number": "1662" + }, + "Sur avances re\u00e7ues de l\u2019\u00c9tat": { + "account_number": "1663" + }, + "Sur avances re\u00e7ues et comptes courants bloqu\u00e9s": { + "account_number": "1664" + }, + "Sur d\u00e9p\u00f4ts et cautionnements re\u00e7us": { + "account_number": "1665" + }, + "Sur avances assorties de conditions particuli\u00e8res": { + "account_number": "1667" + }, + "Sur autres emprunts et dettes": { + "account_number": "1668" + }, + "account_number": "166" + }, + "Avances assorties de conditions particuli\u00e8res": { + "Avances bloqu\u00e9es pour augmentation du capital": { + "account_number": "1671" + }, + "Avances conditionn\u00e9es par l\u2019\u00c9tat": { + "account_number": "1672" + }, + "Avances conditionn\u00e9es par les autres organismes africains": { + "account_number": "1673" + }, + "Avances conditionn\u00e9es par les organismes internationaux": { + "account_number": "1674" + }, + "account_number": "167" + }, + "Autres emprunts et dettes": { + "Rentes viag\u00e8res capitalis\u00e9es": { + "account_number": "1681" + }, + "Billets de fonds": { + "account_number": "1682" + }, + "Dettes cons\u00e9cutives \u00e0 des titres emprunt\u00e9s": { + "account_number": "1683" + }, + "Emprunts participatifs": { + "account_number": "1684" + }, + "Participation des travailleurs aux b\u00e9n\u00e9fices": { + "account_number": "1685" + }, + "Emprunts et dettes contract\u00e9s aupr\u00e8s des autres tiers": { + "account_number": "1686" + }, + "account_number": "168" + }, + "account_number": "16" + }, + "Dettes de location acquisition": { + "Dettes de location acquisition / cr\u00e9dit bail immobilier": { + "account_number": "172" + }, + "Dettes de location acquisition / cr\u00e9dit bail mobilier": { + "account_number": "173" + }, + "Dettes de location acquisition / location de vente": { + "account_number": "174" + }, + "Int\u00e9r\u00eats courus": { + "Sur dettes de location acquisition / cr\u00e9dit-bail immobilier": { + "account_number": "1762" + }, + "Sur dettes de location acquisition / cr\u00e9dit-bail mobilier": { + "account_number": "1763" + }, + "Sur dettes de location acquisition / location-vente": { + "account_number": "1764" + }, + "Sur autres dettes de location acquisition": { + "account_number": "1768" + }, + "account_number": "176" + }, + "Autres dettes de location acquisition": { + "account_number": "178" + }, + "account_number": "17" + }, + "Dettes li\u00e9es \u00e0 des participations et comptes de liaison des \u00e9tablissements et soci\u00e9t\u00e9s en participation": { + "Dettes li\u00e9es \u00e0 des participations": { + "Dettes li\u00e9es \u00e0 des participations (groupe)": { + "account_number": "1811" + }, + "Dettes li\u00e9es \u00e0 des participations (hors groupe)": { + "account_number": "1812" + }, + "account_number": "181" + }, + "Dettes li\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": { + "account_number": "182" + }, + "Int\u00e9r\u00eats courus sur dettes li\u00e9es \u00e0 des participations": { + "account_number": "183" + }, + "Comptes permanents bloqu\u00e9s des \u00e9tablissements et succursales": { + "account_number": "184" + }, + "Comptes permanents non bloqu\u00e9s des \u00e9tablissements et succursales": { + "account_number": "185" + }, + "Comptes de liaison charges": { + "account_number": "186" + }, + "Comptes de liaison produits": { + "account_number": "187" + }, + "Comptes de liaison des soci\u00e9t\u00e9s en participation": { + "account_number": "188" + }, + "account_number": "18" + }, + "Provisions pour risques et charges": { + "Provisions pour litiges": { + "account_number": "191" + }, + "Provisions pour garanties donn\u00e9es aux clients": { + "account_number": "192" + }, + "Provisions pour pertes sur march\u00e9s \u00e0 ach\u00e8vement futur": { + "account_number": "193" + }, + "Provisions pour pertes de change": { + "account_number": "194" + }, + "Provisions pour imp\u00f4ts": { + "account_number": "195" + }, + "Provisions pour pensions et obligations similaires": { + "Provisions pour pensions et obligations similaires engagement de retraite": { + "account_number": "1961" + }, + "Actif du r\u00e9gime de retraite": { + "account_number": "1962" + }, + "account_number": "196" + }, + "Provisions pour restructuration": { + "account_number": "197" + }, + "Autres provisions pour risques et charges": { + "Provisions pour amendes et p\u00e9nalit\u00e9s": { + "account_number": "1981" + }, + "Provisions pour propre assureur": { + "account_number": "1983" + }, + "Provisions pour d\u00e9mant\u00e8lement et remise en \u00e9tat": { + "account_number": "1984" + }, + "Provisions pour droits \u00e0 r\u00e9duction ou avantage en nature (ch\u00e8ques cadeau, cartes de fid\u00e9lit\u00e9...)": { + "account_number": "1985" + }, + "Provisions pour divers risques et charges": { + "account_number": "1988" + }, + "account_number": "198" + }, + "account_number": "19" + }, + "root_type": "Equity", + "account_number": "1" + }, + "Comptes d\u2019actif immobilis\u00e9": { + "Immobilisations incorporelles": { + "account_type": "Fixed Asset", + "Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset", + "account_number": "211" + }, + "Brevets, licences, concessions et droits similaires": { + "account_type": "Fixed Asset", + "Brevets": { + "account_type": "Fixed Asset", + "account_number": "2121" + }, + "Licences": { + "account_type": "Fixed Asset", + "account_number": "2122" + }, + "Concessions de service public": { + "account_type": "Fixed Asset", + "account_number": "2123" + }, + "Autres concessions et droits similaires": { + "account_type": "Fixed Asset", + "account_number": "2128" + }, + "account_number": "212" + }, + "Logiciels et sites internet": { + "account_type": "Fixed Asset", + "Logiciels": { + "account_type": "Fixed Asset", + "account_number": "2131" + }, + "Sites internet": { + "account_type": "Fixed Asset", + "account_number": "2132" + }, + "account_number": "213" + }, + "Marques": { + "account_type": "Fixed Asset", + "account_number": "214" + }, + "Fonds commercial": { + "account_type": "Fixed Asset", + "account_number": "215" + }, + "Droit au bail": { + "account_type": "Fixed Asset", + "account_number": "216" + }, + "Investissements de cr\u00e9ation": { + "account_type": "Fixed Asset", + "account_number": "217" + }, + "Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset", + "Frais de prospection et d\u2019\u00e9valuation de ressources min\u00e9rales": { + "account_type": "Fixed Asset", + "account_number": "2181" + }, + "Co\u00fbts d\u2019obtention du contrat": { + "account_type": "Fixed Asset", + "account_number": "2182" + }, + "Fichiers clients, notices, titres de journaux et magazines": { + "account_type": "Fixed Asset", + "account_number": "2183" + }, + "Co\u00fbts des franchises": { + "account_type": "Fixed Asset", + "account_number": "2184" + }, + "Divers droits et valeurs incorporelles": { + "account_type": "Fixed Asset", + "account_number": "2188" + }, + "account_number": "218" + }, + "Immobilisations incorporelles en cours": { + "account_type": "Fixed Asset", + "Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset", + "account_number": "2191" + }, + "Logiciels et internet": { + "account_type": "Fixed Asset", + "account_number": "2193" + }, + "Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset", + "account_number": "2198" + }, + "account_number": "219" + }, + "account_number": "21" + }, + "Terrains": { + "account_type": "Fixed Asset", + "Terrains agricoles et forestiers": { + "account_type": "Fixed Asset", + "Terrains d\u2019exploitation agricole": { + "account_type": "Fixed Asset", + "account_number": "2211" + }, + "Terrains d\u2019exploitation foresti\u00e8re": { + "account_type": "Fixed Asset", + "account_number": "2212" + }, + "Autres terrains": { + "account_type": "Fixed Asset", + "account_number": "2218" + }, + "account_number": "221" + }, + "Terrains nus": { + "account_type": "Fixed Asset", + "Terrains \u00e0 b\u00e2tir": { + "account_type": "Fixed Asset", + "account_number": "2221" + }, + "Autres terrains nus": { + "account_type": "Fixed Asset", + "account_number": "2228" + }, + "account_number": "222" + }, + "Terrains b\u00e2tis": { + "account_type": "Fixed Asset", + "Pour b\u00e2timents industriels et agricoles": { + "account_type": "Fixed Asset", + "account_number": "2231" + }, + "Pour b\u00e2timents administratifs et commerciaux": { + "account_type": "Fixed Asset", + "account_number": "2232" + }, + "Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations professionnelles": { + "account_type": "Fixed Asset", + "account_number": "2234" + }, + "Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations non professionnelles": { + "account_type": "Fixed Asset", + "account_number": "2235" + }, + "Autres terrains b\u00e2tis": { + "account_type": "Fixed Asset", + "account_number": "2238" + }, + "account_number": "223" + }, + "Travaux de mise en valeur des terrains": { + "account_type": "Fixed Asset", + "Plantation d\u2019arbres et d\u2019arbustes": { + "account_type": "Fixed Asset", + "account_number": "2241" + }, + "Am\u00e9liorations du fonds": { + "account_type": "Fixed Asset", + "account_number": "2245" + }, + "Autres travaux": { + "account_type": "Fixed Asset", + "account_number": "2248" + }, + "account_number": "224" + }, + "Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset", + "Carri\u00e8res": { + "account_type": "Fixed Asset", + "account_number": "2251" + }, + "account_number": "225" + }, + "Terrains am\u00e9nag\u00e9s": { + "account_type": "Fixed Asset", + "Parkings": { + "account_type": "Fixed Asset", + "account_number": "2261" + }, + "account_number": "226" + }, + "Terrains mis en concession": { + "account_type": "Fixed Asset", + "account_number": "227" + }, + "Autres terrains": { + "account_type": "Fixed Asset", + "Terrains immeubles de placement": { + "account_type": "Fixed Asset", + "account_number": "2281" + }, + "Terrains des logements affect\u00e9s au personnel": { + "account_type": "Fixed Asset", + "account_number": "2285" + }, + "Terrains de location acquisition": { + "account_type": "Fixed Asset", + "account_number": "2286" + }, + "Divers terrains": { + "account_type": "Fixed Asset", + "account_number": "2288" + }, + "account_number": "228" + }, + "Am\u00e9nagements de terrains en cours": { + "account_type": "Fixed Asset", + "Terrains agricoles et forestiers": { + "account_type": "Fixed Asset", + "account_number": "2291" + }, + "Terrains nus": { + "account_type": "Fixed Asset", + "account_number": "2292" + }, + "Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset", + "account_number": "2295" + }, + "Autres terrains": { + "account_type": "Fixed Asset", + "account_number": "2298" + }, + "account_number": "229" + }, + "account_number": "22" + }, + "B\u00e2timents, installations techniques et agencements": { + "B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "B\u00e2timents industriels": { + "account_number": "2311" + }, + "B\u00e2timents agricoles": { + "account_number": "2312" + }, + "B\u00e2timents administratifs et commerciaux": { + "account_number": "2313" + }, + "B\u00e2timents affect\u00e9s au logement du personnel": { + "account_number": "2314" + }, + "B\u00e2timents immeubles de placement": { + "account_number": "2315" + }, + "B\u00e2timents de location acquisition": { + "account_number": "2316" + }, + "account_number": "231" + }, + "B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "B\u00e2timents industriels": { + "account_number": "2321" + }, + "B\u00e2timents agricoles": { + "account_number": "2322" + }, + "B\u00e2timents administratifs et commerciaux": { + "account_number": "2323" + }, + "B\u00e2timents affect\u00e9s au logement du personnel": { + "account_number": "2324" + }, + "B\u00e2timents immeubles de placement": { + "account_number": "2325" + }, + "B\u00e2timents de location acquisition": { + "account_number": "2326" + }, + "account_number": "232" + }, + "Ouvrages d\u2019infrastructure": { + "Voies de terre": { + "account_number": "2331" + }, + "Voies de fer": { + "account_number": "2332" + }, + "Voies d\u2019eau": { + "account_number": "2333" + }, + "Barrages, Digues": { + "account_number": "2334" + }, + "Pistes d\u2019a\u00e9rodrome": { + "account_number": "2335" + }, + "Autres ouvrages d\u2019infrastructures": { + "account_number": "2338" + }, + "account_number": "233" + }, + "Am\u00e9nagements, agencements et installations techniques": { + "Installations complexes sp\u00e9cialis\u00e9es sur sol propre": { + "account_number": "2341" + }, + "Installations complexes sp\u00e9cialis\u00e9es sur sol d\u2019autrui": { + "account_number": "2342" + }, + "Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol propre": { + "account_number": "2343" + }, + "Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol d\u2019autrui": { + "account_number": "2344" + }, + "Am\u00e9nagements et agencements des b\u00e2timents": { + "account_number": "2345" + }, + "account_number": "234" + }, + "Am\u00e9nagements de bureaux": { + "Installations g\u00e9n\u00e9rales": { + "account_number": "2351" + }, + "Autres am\u00e9nagements de bureaux": { + "account_number": "2358" + }, + "account_number": "235" + }, + "B\u00e2timents industriels, agricoles et commerciaux mis en concession": { + "account_number": "237" + }, + "Autres installations et agencements": { + "account_number": "238" + }, + "B\u00e2timents am\u00e9nagements, agencements et installations en cours": { + "B\u00e2timents en cours": { + "account_number": "2391" + }, + "Installations en cours": { + "account_number": "2392" + }, + "Ouvrages d\u2019infrastructure en cours": { + "account_number": "2393" + }, + "Am\u00e9nagements et agencements et installations techniques en cours": { + "account_number": "2394" + }, + "Am\u00e9nagements de bureaux en cours": { + "account_number": "2395" + }, + "Autres installations et agencements en cours": { + "account_number": "2398" + }, + "account_number": "239" + }, + "account_number": "23" + }, + "Mat\u00e9riel, mobilier et actifs biologiques": { + "Mat\u00e9riel et outillage industriel et commercial": { + "Mat\u00e9riel industriel": { + "account_number": "2411" + }, + "Outillage industriel": { + "account_number": "2412" + }, + "Mat\u00e9riel commercial": { + "account_number": "2413" + }, + "Outillage commercial": { + "account_number": "2414" + }, + "Mat\u00e9riel & outillage industriel et commercial de location-acquisition": { + "account_number": "2416" + }, + "account_number": "241" + }, + "Mat\u00e9riel et outillage agricole": { + "Mat\u00e9riel agricole": { + "account_number": "2421" + }, + "Outillage agricole": { + "account_number": "2422" + }, + "Mat\u00e9riel & outillage agricole de location-acquisition": { + "account_number": "2426" + }, + "account_number": "242" + }, + "Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "243" + }, + "Mat\u00e9riel et mobilier": { + "Mat\u00e9riel de bureau": { + "account_number": "2441" + }, + "Mat\u00e9riel informatique": { + "account_number": "2442" + }, + "Mat\u00e9riel bureautique": { + "account_number": "2443" + }, + "Mobilier de bureau": { + "account_number": "2444" + }, + "Mat\u00e9riel et mobilier immeubles de placement": { + "account_number": "2445" + }, + "Mat\u00e9riel et mobilier de location acquisition": { + "account_number": "2446" + }, + "Mat\u00e9riel et mobilier des logements du personnel": { + "account_number": "2447" + }, + "account_number": "244" + }, + "Mat\u00e9riel de transport": { + "Mat\u00e9riel automobile": { + "account_number": "2451" + }, + "Mat\u00e9riel ferroviaire": { + "account_number": "2452" + }, + "Mat\u00e9riel fluvial, lagunaire": { + "account_number": "2453" + }, + "Mat\u00e9riel naval": { + "account_number": "2454" + }, + "Mat\u00e9riel a\u00e9rien": { + "account_number": "2455" + }, + "Mat\u00e9riel de transport de location-acquisition": { + "account_number": "2456" + }, + "Mat\u00e9riel hippomobile": { + "account_number": "2457" + }, + "Autres mat\u00e9riels de transport": { + "account_number": "2458" + }, + "account_number": "245" + }, + "Actifs biologiques": { + "Cheptel, animaux de trait": { + "account_number": "2461" + }, + "Cheptel, animaux reproducteurs": { + "account_number": "2462" + }, + "Animaux de garde": { + "account_number": "2463" + }, + "Plantations agricoles": { + "account_number": "2465" + }, + "Autres actifs biologiques": { + "account_number": "2468" + }, + "account_number": "246" + }, + "Agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "Agencements et am\u00e9nagements du mat\u00e9riel": { + "account_number": "2471" + }, + "Agencements et am\u00e9nagements des actifs biologiques": { + "account_number": "2472" + }, + "Autres agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "account_number": "2478" + }, + "account_number": "247" + }, + "Autres mat\u00e9riels et mobiliers": { + "Collections et \u0153uvres d\u2019art": { + "account_number": "2481" + }, + "Divers mat\u00e9riels mobiliers": { + "account_number": "2488" + }, + "account_number": "248" + }, + "Mat\u00e9riels et actifs biologiques en cours": { + "Mat\u00e9riel et outillage industriel et commercial": { + "account_number": "2491" + }, + "Mat\u00e9riel et outillage agricole": { + "account_number": "2492" + }, + "Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "2493" + }, + "Mat\u00e9riel et mobilier de bureau": { + "account_number": "2494" + }, + "Mat\u00e9riel de transport": { + "account_number": "2495" + }, + "Actifs biologiques": { + "account_number": "2496" + }, + "Agencements am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "account_number": "2497" + }, + "Autres mat\u00e9riels et actifs biologiques en cours": { + "account_number": "2498" + }, + "account_number": "249" + }, + "account_number": "24" + }, + "Avances et acomptes vers\u00e9s sur immobilisations": { + "Avances et acomptes vers\u00e9s sur immobilisations incorporelles": { + "account_number": "251" + }, + "Avances et acomptes vers\u00e9s sur immobilisations corporelles": { + "account_number": "252" + }, + "account_number": "25" + }, + "Titres de participation": { + "Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": { + "account_number": "261" + }, + "Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le conjoint": { + "account_number": "262" + }, + "Titres de participation dans des soci\u00e9t\u00e9s conf\u00e9rant une influence notable": { + "account_number": "263" + }, + "Participations dans des organismes professionnels": { + "account_number": "265" + }, + "Parts dans des groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": { + "account_number": "266" + }, + "Autres titres de participation": { + "account_number": "268" + }, + "account_number": "26" + }, + "Autres immobilisations financi\u00e8res": { + "Pr\u00eats et cr\u00e9ances": { + "Pr\u00eats participatifs": { + "account_number": "2711" + }, + "Pr\u00eats aux associ\u00e9s": { + "account_number": "2712" + }, + "Billets de fonds": { + "account_number": "2713" + }, + "Titres pr\u00eat\u00e9s": { + "account_number": "2714" + }, + "Autres pr\u00eats et cr\u00e9ances": { + "account_number": "2718" + }, + "account_number": "271" + }, + "Pr\u00eats au personnel": { + "Pr\u00eats immobiliers": { + "account_number": "2721" + }, + "Pr\u00eats mobiliers et d\u2019installation": { + "account_number": "2722" + }, + "Autres pr\u00eats au personnel": { + "account_number": "2728" + }, + "account_number": "272" + }, + "Cr\u00e9ances sur l\u2019\u00c9tat": { + "Retenues de garantie": { + "account_number": "2731" + }, + "Fonds r\u00e9glement\u00e9": { + "account_number": "2733" + }, + "Cr\u00e9ances sur le conc\u00e9dant": { + "account_number": "2734" + }, + "Autres cr\u00e9ances sur l\u2019\u00c9tat": { + "account_number": "2738" + }, + "account_number": "273" + }, + "Titres immobilis\u00e9s": { + "Titres immobilis\u00e9s de l\u2019activit\u00e9 de portefeuille (TIAP)": { + "account_number": "2741" + }, + "Titres participatifs": { + "account_number": "2742" + }, + "Certificats d\u2019investissement": { + "account_number": "2743" + }, + "Parts de fonds commun de placement (FCP)": { + "account_number": "2744" + }, + "Obligations": { + "account_number": "2745" + }, + "Actions ou parts propres": { + "account_number": "2746" + }, + "Autres titres immobilis\u00e9s": { + "account_number": "2748" + }, + "account_number": "274" + }, + "D\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "D\u00e9p\u00f4ts pour loyers d\u2019avance": { + "account_number": "2751" + }, + "D\u00e9p\u00f4ts pour l\u2019\u00e9lectricit\u00e9": { + "account_number": "2752" + }, + "D\u00e9p\u00f4ts pour l\u2019eau": { + "account_number": "2753" + }, + "D\u00e9p\u00f4ts pour le gaz": { + "account_number": "2754" + }, + "D\u00e9p\u00f4ts pour le t\u00e9l\u00e9phone, le t\u00e9lex, la t\u00e9l\u00e9copie": { + "account_number": "2755" + }, + "Cautionnements sur march\u00e9s publics": { + "account_number": "2756" + }, + "Cautionnements sur autres op\u00e9rations": { + "account_number": "2757" + }, + "Autres d\u00e9p\u00f4ts et cautionnements": { + "account_number": "2758" + }, + "account_number": "275" + }, + "Int\u00e9r\u00eats courus": { + "Pr\u00eats et cr\u00e9ances non commerciales": { + "account_number": "2761" + }, + "Pr\u00eats au personnel": { + "account_number": "2762" + }, + "Cr\u00e9ances sur l\u2019\u00c9tat": { + "account_number": "2763" + }, + "Titres immobilis\u00e9s": { + "account_number": "2764" + }, + "D\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "account_number": "2765" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations": { + "account_number": "2767" + }, + "Immobilisations financi\u00e8res diverses": { + "account_number": "2768" + }, + "account_number": "276" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": { + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations (groupe)": { + "account_number": "2771" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations (hors groupe)": { + "account_number": "2772" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": { + "account_number": "2773" + }, + "Avances \u00e0 des Groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": { + "account_number": "2774" + }, + "account_number": "277" + }, + "Immobilisations financi\u00e8res diverses": { + "Cr\u00e9ances diverses groupe": { + "account_number": "2781" + }, + "Cr\u00e9ances diverses hors groupe": { + "account_number": "2782" + }, + "Banques d\u00e9p\u00f4ts \u00e0 terme": { + "account_number": "2784" + }, + "Or et m\u00e9taux pr\u00e9cieux": { + "account_number": "2785" + }, + "Autres immobilisations financi\u00e8res": { + "account_number": "2788" + }, + "account_number": "278" + }, + "account_number": "27" + }, + "Amortissements": { + "account_type": "Accumulated Depreciation", + "Amortissements des immobilisations corporelles": { + "account_type": "Accumulated Depreciation", + "Amortissements des frais de d\u00e9veloppement": { + "account_type": "Accumulated Depreciation", + "account_number": "2811" + }, + "Amortissements des brevets, licences, concessions et droits similaires": { + "account_type": "Accumulated Depreciation", + "account_number": "2812" + }, + "Amortissements des logiciels et sites internet": { + "account_type": "Accumulated Depreciation", + "account_number": "2813" + }, + "Amortissements des marques": { + "account_type": "Accumulated Depreciation", + "account_number": "2814" + }, + "Amortissements du fonds commercial": { + "account_type": "Accumulated Depreciation", + "account_number": "2815" + }, + "Amortissements du droit au bail": { + "account_type": "Accumulated Depreciation", + "account_number": "2816" + }, + "Amortissements des investissements de cr\u00e9ation": { + "account_type": "Accumulated Depreciation", + "account_number": "2817" + }, + "Amortissements des autres droits et valeurs incorporels": { + "account_type": "Accumulated Depreciation", + "account_number": "2818" + }, + "account_number": "281" + }, + "Amortissements des terrains": { + "Amortissements des travaux de mise en valeur des terrains": { + "account_number": "2824" + }, + "account_number": "282" + }, + "Amortissements des b\u00e2timents, installations techniques et agencements": { + "Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "account_number": "2831" + }, + "Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "account_number": "2832" + }, + "Amortissements des ouvrages d\u2019infrastructure": { + "account_number": "2833" + }, + "Amortissements des am\u00e9nagements, agencements et installations techniques": { + "account_number": "2834" + }, + "Amortissements des am\u00e9nagements de bureaux": { + "account_number": "2835" + }, + "Amortissements des b\u00e2timents industriels, agricoles et commerciaux mis en concession": { + "account_number": "2837" + }, + "Amortissements des autres installations et agencements": { + "account_number": "2838" + }, + "account_number": "283" + }, + "Amortissements du mat\u00e9riel": { + "Amortissements du mat\u00e9riel et outillage industriel et commercial": { + "account_number": "2841" + }, + "Amortissements du mat\u00e9riel et outillage agricole": { + "account_number": "2842" + }, + "Amortissements du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "2843" + }, + "Amortissements du mat\u00e9riel et mobilier": { + "account_number": "2844" + }, + "Amortissements du mat\u00e9riel de transport": { + "account_number": "2845" + }, + "Amortissements des actifs biologiques": { + "account_number": "2846" + }, + "Amortissements des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": { + "account_number": "2847" + }, + "Amortissements des autres mat\u00e9riels": { + "account_number": "2848" + }, + "account_number": "284" + }, + "account_number": "28" + }, + "D\u00e9pr\u00e9ciations des immobilisations": { + "D\u00e9pr\u00e9ciations des immobilisations incorporelles": { + "D\u00e9pr\u00e9ciations des frais de d\u00e9veloppement": { + "account_number": "2911" + }, + "D\u00e9pr\u00e9ciations des brevets, licences, concessions et droits similaires": { + "account_number": "2912" + }, + "D\u00e9pr\u00e9ciations des logiciels et sites internet": { + "account_number": "2913" + }, + "D\u00e9pr\u00e9ciations des marques": { + "account_number": "2914" + }, + "D\u00e9pr\u00e9ciations du fonds commercial": { + "account_number": "2915" + }, + "D\u00e9pr\u00e9ciations du droit au bail": { + "account_number": "2916" + }, + "D\u00e9pr\u00e9ciations des investissements de cr\u00e9ation": { + "account_number": "2917" + }, + "D\u00e9pr\u00e9ciations des autres droits et valeurs incorporels": { + "account_number": "2918" + }, + "D\u00e9pr\u00e9ciations des immobilisations incorporelles en cours": { + "account_number": "2919" + }, + "account_number": "291" + }, + "D\u00e9pr\u00e9ciations des terrains": { + "D\u00e9pr\u00e9ciations des terrains agricoles et forestiers": { + "account_number": "2921" + }, + "D\u00e9pr\u00e9ciations des terrains nus": { + "account_number": "2922" + }, + "D\u00e9pr\u00e9ciations des terrains b\u00e2tis": { + "account_number": "2923" + }, + "D\u00e9pr\u00e9ciations des travaux de mise en valeur des terrains": { + "account_number": "2924" + }, + "D\u00e9pr\u00e9ciations des terrains de gisement": { + "account_number": "2925" + }, + "D\u00e9pr\u00e9ciations des terrains am\u00e9nag\u00e9s": { + "account_number": "2926" + }, + "D\u00e9pr\u00e9ciations des terrains mis en concession": { + "account_number": "2927" + }, + "D\u00e9pr\u00e9ciations des autres terrains": { + "account_number": "2928" + }, + "D\u00e9pr\u00e9ciations des am\u00e9nagements de terrains en cours": { + "account_number": "2929" + }, + "account_number": "292" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents, installations techniques et agencements": { + "D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "account_number": "2931" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "account_number": "2932" + }, + "D\u00e9pr\u00e9ciations des ouvrages d\u2019infrastructures": { + "account_number": "2933" + }, + "D\u00e9pr\u00e9ciations des am\u00e9nagements, agencements et installations techniques": { + "account_number": "2934" + }, + "D\u00e9pr\u00e9ciations des am\u00e9nagements de bureaux": { + "account_number": "2935" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles et commerciaux mis en concession": { + "account_number": "2937" + }, + "D\u00e9pr\u00e9ciations des autres installations et agencements": { + "account_number": "2938" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents et installations en cours": { + "account_number": "2939" + }, + "account_number": "293" + }, + "D\u00e9pr\u00e9ciations de mat\u00e9riel, du mobilier et de l\u2019actif biologique": { + "D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage industriel et commercial": { + "account_number": "2941" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage agricole": { + "account_number": "2942" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "2943" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel et mobilier": { + "account_number": "2944" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel de transport": { + "account_number": "2945" + }, + "D\u00e9pr\u00e9ciations des actifs biologiques": { + "account_number": "2946" + }, + "D\u00e9pr\u00e9ciations des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": { + "account_number": "2947" + }, + "D\u00e9pr\u00e9ciations des autres mat\u00e9riels": { + "account_number": "2948" + }, + "D\u00e9pr\u00e9ciations de mat\u00e9riel en cours": { + "account_number": "2949" + }, + "account_number": "294" + }, + "D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations": { + "D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations incorporelles": { + "account_number": "2951" + }, + "D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations corporelles": { + "account_number": "2952" + }, + "account_number": "295" + }, + "D\u00e9pr\u00e9ciations des titres de participation": { + "D\u00e9pr\u00e9ciations des titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": { + "account_number": "2961" + }, + "D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s sous contr\u00f4le conjoint": { + "account_number": "2962" + }, + "D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s conf\u00e9rant une influence notable": { + "account_number": "2963" + }, + "D\u00e9pr\u00e9ciations des participations dans des organismes professionnels": { + "account_number": "2965" + }, + "D\u00e9pr\u00e9ciations des parts dans des GIE": { + "account_number": "2966" + }, + "D\u00e9pr\u00e9ciations des autres titres de participation": { + "account_number": "2968" + }, + "account_number": "296" + }, + "D\u00e9pr\u00e9ciations des autres immobilisations financi\u00e8res": { + "D\u00e9pr\u00e9ciations des pr\u00eats et cr\u00e9ances": { + "account_number": "2971" + }, + "D\u00e9pr\u00e9ciations des pr\u00eats au personnel": { + "account_number": "2972" + }, + "D\u00e9pr\u00e9ciations des cr\u00e9ances sur l\u2019\u00c9tat": { + "account_number": "2973" + }, + "D\u00e9pr\u00e9ciations des titres immobilis\u00e9s": { + "account_number": "2974" + }, + "D\u00e9pr\u00e9ciations des d\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "account_number": "2975" + }, + "D\u00e9pr\u00e9ciations des cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": { + "account_number": "2977" + }, + "D\u00e9pr\u00e9ciations des cr\u00e9ances financi\u00e8res diverses": { + "account_number": "2978" + }, + "account_number": "297" + }, + "account_number": "29" + }, + "root_type": "Asset", + "account_number": "2" + }, + "Comptes de Stocks": { + "Marchandises": { + "Marchandises A": { + "Marchandises A1": { + "account_number": "3111" + }, + "Marchandises A2": { + "account_number": "3112" + }, + "account_number": "311" + }, + "Marchandises B": { + "Marchandises B1": { + "account_number": "3121" + }, + "Marchandises B2": { + "account_number": "3122" + }, + "account_number": "312" + }, + "Actifs biologiques": { + "Animaux": { + "account_number": "3131" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3132" + }, + "account_number": "313" + }, + "Marchandises hors activit\u00e9s ordinaires (HAO)": { + "account_number": "318" + }, + "account_number": "31" + }, + "Mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "Mati\u00e8res A": { + "account_number": "321" + }, + "Mati\u00e8res B": { + "account_number": "322" + }, + "Fournitures (A, B)": { + "account_number": "323" + }, + "account_number": "32" + }, + "Autres approvisionnements": { + "Mati\u00e8res consommables": { + "account_number": "331" + }, + "Fournitures d\u2019atelier et d\u2019usine": { + "account_number": "332" + }, + "Fournitures de magasin": { + "account_number": "333" + }, + "Fournitures de bureau": { + "account_number": "334" + }, + "Emballages": { + "Emballages perdus": { + "account_number": "3351" + }, + "Emballages r\u00e9cup\u00e9rables non identifiables": { + "account_number": "3352" + }, + "Emballages \u00e0 usage mixte": { + "account_number": "3353" + }, + "Autres emballages": { + "account_number": "3358" + }, + "account_number": "335" + }, + "Autres mati\u00e8res": { + "account_number": "338" + }, + "account_number": "33" + }, + "Produits en cours": { + "Produits en cours": { + "Produits en cours P1": { + "account_number": "3411" + }, + "Produits en cours P2": { + "account_number": "3412" + }, + "account_number": "341" + }, + "Travaux en cours": { + "Travaux en cours T1": { + "account_number": "3421" + }, + "Travaux en cours T2": { + "account_number": "3422" + }, + "account_number": "342" + }, + "Produits interm\u00e9diaires en cours": { + "Produits interm\u00e9diaires A": { + "account_number": "3431" + }, + "Produits interm\u00e9diaires B": { + "account_number": "3432" + }, + "account_number": "343" + }, + "Produits r\u00e9siduels en cours": { + "Produits r\u00e9siduels A": { + "account_number": "3441" + }, + "Produits r\u00e9siduels B": { + "account_number": "3442" + }, + "account_number": "344" + }, + "Actifs biologiques en cours": { + "Animaux": { + "account_number": "3451" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3452" + }, + "account_number": "345" + }, + "account_number": "34" + }, + "Services en cours": { + "\u00c9tudes en cours": { + "\u00c9tudes en cours E1": { + "account_number": "3511" + }, + "\u00c9tudes en cours E2": { + "account_number": "3512" + }, + "account_number": "351" + }, + "Prestations de services en cours": { + "Prestations de services S1": { + "account_number": "3521" + }, + "Prestations de services S2": { + "account_number": "3522" + } + }, + "account_number": "35" + }, + "Produits finis": { + "Produits finis A": { + "account_number": "361" + }, + "Produits finis B": { + "account_number": "362" + }, + "Actifs biologiques": { + "Animaux": { + "account_number": "3631" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3632" + }, + "Autres stocks (activit\u00e9s annexes)": { + "account_number": "3638" + }, + "account_number": "363" + }, + "account_number": "36" + }, + "Produits interm\u00e9diaires et r\u00e9siduels": { + "Produits interm\u00e9diaires": { + "Produits interm\u00e9diaires A": { + "account_number": "3711" + }, + "Produits interm\u00e9diaires B": { + "account_number": "3712" + }, + "account_number": "371" + }, + "Produits r\u00e9siduels": { + "D\u00e9chets": { + "account_number": "3721" + }, + "Rebuts": { + "account_number": "3722" + }, + "Mati\u00e8res de R\u00e9cup\u00e9ration": { + "account_number": "3723" + }, + "account_number": "372" + }, + "Actifs biologiques": { + "Animaux": { + "account_number": "3731" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3732" + }, + "Autres stocks (activit\u00e9s annexes)": { + "account_number": "3738" + }, + "account_number": "373" + }, + "account_number": "37" + }, + "Stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": { + "account_type": "Stock", + "Marchandises en cours de route": { + "account_number": "381" + }, + "Mati\u00e8res premi\u00e8res et fournitures li\u00e9es en cours de route": { + "account_number": "382" + }, + "Autres approvisionnements en cours de route": { + "account_number": "383" + }, + "Produits finis en cours de route": { + "account_number": "386" + }, + "Stock en consignation ou en d\u00e9p\u00f4t": { + "Stock en consignation": { + "account_number": "3871" + }, + "Stock en d\u00e9p\u00f4t": { + "account_number": "3872" + }, + "account_number": "387" + }, + "Stock provenant d\u2019immobilisations mises hors service ou au rebut": { + "account_number": "388" + }, + "account_number": "38" + }, + "D\u00e9pr\u00e9ciations des stocks et encours de production": { + "D\u00e9pr\u00e9ciations des stocks de marchandises": { + "account_number": "391" + }, + "D\u00e9pr\u00e9ciations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "account_number": "392" + }, + "D\u00e9pr\u00e9ciations des stocks d\u2019autres approvisionnements": { + "account_number": "393" + }, + "D\u00e9pr\u00e9ciations des productions en cours": { + "account_number": "394" + }, + "D\u00e9pr\u00e9ciations des services en cours": { + "account_number": "395" + }, + "D\u00e9pr\u00e9ciations des stocks de produits finis": { + "account_number": "396" + }, + "D\u00e9pr\u00e9ciations des stocks de produits interm\u00e9diaires et r\u00e9siduels": { + "account_number": "397" + }, + "D\u00e9pr\u00e9ciations des stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": { + "account_number": "398" + }, + "account_number": "39" + }, + "root_type": "Asset", + "account_number": "3" + }, + "4-Comptes de Tiers (ACTIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (ACTIF)": { + "Fournisseurs d\u00e9biteurs": { + "Fournisseurs Avances et acomptes vers\u00e9s": { + "account_number": "4091" + }, + "Fournisseurs Groupe avances et acomptes vers\u00e9s": { + "account_number": "4092" + }, + "Fournisseurs Sous-traitants avances et acomptes vers\u00e9s": { + "account_number": "4093" + }, + "Fournisseurs Cr\u00e9ances pour emballages et mat\u00e9riels \u00e0 rendre": { + "account_number": "4094" + }, + "Fournisseurs Rabais, remises, ristournes et autres avoirs \u00e0 obtenir": { + "account_number": "4098" + }, + "account_number": "409" + } + }, + "41-Clients et comptes rattach\u00e9s (ACTIF)": { + "Clients": { + "Clients": { + "account_type": "Receivable", + "account_number": "4111" + }, + "Clients groupe": { + "account_type": "Receivable", + "account_number": "4112" + }, + "Clients, \u00c9tat et Collectivit\u00e9s publiques": { + "account_type": "Receivable", + "account_number": "4114" + }, + "Clients, organismes internationaux": { + "account_type": "Receivable", + "account_number": "4115" + }, + "Clients, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Receivable", + "account_number": "4116" + }, + "Client, retenues de garantie": { + "account_type": "Receivable", + "account_number": "4117" + }, + "Clients, d\u00e9gr\u00e8vement de taxes sur la valeur ajout\u00e9e (TVA)": { + "account_type": "Receivable", + "account_number": "4118" + }, + "account_type": "Receivable", + "account_number": "411" + }, + "Clients, effets \u00e0 recevoir en portefeuille": { + "Clients, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4121" + }, + "Clients Groupe, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4122" + }, + "\u00c9tat et Collectivit\u00e9s publiques, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4124" + }, + "Organismes Internationaux, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4125" + }, + "account_type": "Receivable", + "account_number": "412" + }, + "Clients, ch\u00e8ques, effets et autres valeurs impay\u00e9es": { + "Clients, ch\u00e8ques impay\u00e9s": { + "account_type": "Receivable", + "account_number": "4131" + }, + "Clients, effets impay\u00e9s": { + "account_type": "Receivable", + "account_number": "4132" + }, + "Clients, cartes de cr\u00e9dit impay\u00e9es": { + "account_type": "Receivable", + "account_number": "4133" + }, + "Clients, autres valeurs impay\u00e9es": { + "account_type": "Receivable", + "account_number": "4138" + }, + "account_type": "Receivable", + "account_number": "413" + }, + "Cr\u00e9ances sur cessions courantes d\u2019immobilisations": { + "Cr\u00e9ances en compte, immobilisations incorporelles": { + "account_type": "Receivable", + "account_number": "4141" + }, + "Cr\u00e9ances en compte, immobilisations corporelles": { + "account_type": "Receivable", + "account_number": "4142" + }, + "Effets \u00e0 recevoir, immobilisations incorporelles": { + "account_type": "Receivable", + "account_number": "4146" + }, + "Effets \u00e0 recevoir, immobilisations corporelles": { + "account_type": "Receivable", + "account_number": "4147" + }, + "account_type": "Receivable", + "account_number": "414" + }, + "Clients, effets escompt\u00e9s non \u00e9chus": { + "account_type": "Receivable", + "account_number": "415" + }, + "Cr\u00e9ances clients litigieuses ou douteuses": { + "Cr\u00e9ances litigieuses": { + "account_type": "Receivable", + "account_number": "4161" + }, + "Cr\u00e9ances douteuses": { + "account_type": "Receivable", + "account_number": "4162" + }, + "account_type": "Receivable", + "account_number": "416" + }, + "Clients, produits \u00e0 recevoir": { + "Clients, factures \u00e0 \u00e9tablir": { + "account_type": "Receivable", + "account_number": "4181" + }, + "Clients, int\u00e9r\u00eats courus": { + "account_type": "Receivable", + "account_number": "4186" + }, + "account_type": "Receivable", + "account_number": "418" + }, + "account_type": "Receivable" + }, + "42-Personnel (ACTIF)": { + "Personnel, avances et acomptes": { + "Personnel, avances": { + "account_number": "4211" + }, + "Personnel, acomptes": { + "account_number": "4212" + }, + "Frais avanc\u00e9s et fournitures au personnel": { + "account_number": "4213" + }, + "account_number": "421" + } + }, + "43-Organismes sociaux (ACTIF)": { + "431-S\u00e9curit\u00e9 sociale": { + "Prestations familiales": { + "account_number": "4311" + }, + "Accidents de travail": { + "account_number": "4312" + }, + "Caisse de retraite obligatoire": { + "account_number": "4313" + }, + "Caisse de retraite facultative": { + "account_number": "4314" + }, + "Autres cotisations sociales": { + "account_number": "4318" + } + }, + "432-Caisses de retraite compl\u00e9mentaire": {}, + "433-Autres organismes sociaux": { + "Mutuelle": { + "account_number": "4331" + }, + "Assurances retraite": { + "account_number": "4332" + }, + "Assurances et organismes de sant\u00e9": { + "account_number": "4333" + } + }, + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "Produits \u00e0 recevoir": { + "account_number": "4387" + } + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (ACTIF)": { + "\u00c9tat, TVA factur\u00e9e": { + "TVA factur\u00e9e sur ventes": { + "account_number": "4431" + }, + "TVA factur\u00e9e sur prestations de services": { + "account_number": "4432" + }, + "TVA factur\u00e9e sur travaux": { + "account_number": "4433" + }, + "TVA factur\u00e9e sur production livr\u00e9e \u00e0 soi-m\u00eame": { + "account_number": "4434" + }, + "TVA sur factures \u00e0 \u00e9tablir": { + "account_number": "4435" + }, + "account_number": "443" + }, + "\u00c9tat, TVA r\u00e9cup\u00e9rable": { + "TVA r\u00e9cup\u00e9rable sur immobilisations": { + "account_number": "4451" + }, + "TVA r\u00e9cup\u00e9rable sur achats": { + "account_number": "4452" + }, + "TVA r\u00e9cup\u00e9rable sur transport": { + "account_number": "4453" + }, + "TVA r\u00e9cup\u00e9rable sur services ext\u00e9rieurs et autres charges": { + "account_number": "4454" + }, + "TVA r\u00e9cup\u00e9rable sur factures non parvenues": { + "account_number": "4455" + }, + "TVA transf\u00e9r\u00e9e par d\u2019autres entit\u00e9s": { + "account_number": "4456" + }, + "account_number": "445" + }, + "\u00c9tat, charges \u00e0 payer et produits \u00e0 recevoir": { + "Charges \u00e0 payer": { + "account_number": "4486" + }, + "Produits \u00e0 recevoir": { + "account_number": "4487" + }, + "account_number": "448" + }, + "\u00c9tat, cr\u00e9ances et dettes diverses": { + "\u00c9tat, obligations cautionn\u00e9es": { + "account_number": "4491" + }, + "\u00c9tat, avances et acomptes vers\u00e9s sur imp\u00f4ts": { + "account_number": "4492" + }, + "\u00c9tat, fonds de dotation \u00e0 recevoir": { + "account_number": "4493" + }, + "\u00c9tat, subventions investissement \u00e0 recevoir": { + "account_number": "4494" + }, + "\u00c9tat, subventions d\u2019exploitation \u00e0 recevoir": { + "account_number": "4495" + }, + "\u00c9tat, subventions d\u2019\u00e9quilibre \u00e0 recevoir": { + "account_number": "4496" + }, + "\u00c9tat, avances sur subventions": { + "account_number": "4497" + }, + "\u00c9tat, fonds r\u00e9glement\u00e9s provisionn\u00e9s": { + "account_number": "4499" + }, + "account_number": "449" + } + }, + "45-Organismes internationaux (ACTIF)": { + "Op\u00e9rations avec les organismes africains": { + "account_number": "451" + }, + "Op\u00e9rations avec les autres organismes internationaux": { + "account_number": "452" + }, + "Organismes internationaux, fonds de dotation et subventions \u00e0 recevoir": { + "Organismes internationaux, fonds de dotation \u00e0 recevoir": { + "account_number": "4581" + }, + "Organismes internationaux, subventions \u00e0 recevoir": { + "account_number": "4582" + }, + "account_number": "458" + } + }, + "46-Apporteurs, associ\u00e9s et groupe (ACTIF)": { + "461-Apporteurs, op\u00e9rations sur le capital": { + "Apporteurs, capital appel\u00e9, non vers\u00e9": { + "account_number": "4613" + }, + "Apporteurs, compte d\u2019apport, op\u00e9rations de restructuration (fusion...)": { + "account_number": "4614" + }, + "Apporteurs, titres \u00e0 \u00e9changer": { + "account_number": "4618" + } + }, + "Apporteurs, restant d\u00fb sur capital appel\u00e9": { + "account_number": "467" + } + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (ACTIF)": { + "472-Cr\u00e9ances et dettes sur titres de placement": { + "Cr\u00e9ances sur cessions de titres de placement": { + "account_number": "4721" + }, + "Versements restant \u00e0 effectuer sur titres de placement non lib\u00e9r\u00e9s": { + "account_number": "4726" + } + }, + "473-Interm\u00e9diaires Op\u00e9rations faites pour compte de tiers": { + "Mandants": { + "account_number": "4731" + }, + "Mandataires": { + "account_number": "4732" + }, + "Commettants": { + "account_number": "4733" + }, + "Commissionnaires": { + "account_number": "4734" + }, + "\u00c9tat, Collectivit\u00e9s publiques, fonds global d\u2019allocation": { + "account_number": "4739" + } + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits": { + "Compte de r\u00e9partition p\u00e9riodique des produits": { + "account_number": "4747" + } + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA": { + "Compte actif": { + "account_type": "Temporary", + "account_number": "4751" + } + }, + "Charges constat\u00e9es d\u2019avance": { + "account_number": "476" + }, + "478-\u00c9carts de conversion actif": { + "Diminution des cr\u00e9ances d\u2019exploitation": { + "account_number": "4781" + }, + "Diminution des cr\u00e9ances financi\u00e8res": { + "account_number": "4782" + }, + "Augmentation des dettes d\u2019exploitation": { + "account_number": "4783" + }, + "Augmentation des dettes financi\u00e8res": { + "account_number": "4784" + }, + "Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": { + "account_number": "4786" + }, + "Diff\u00e9rences compens\u00e9es par couverture de change": { + "account_number": "4788" + } + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (ACTIF)": { + "Cr\u00e9ances sur cessions d\u2019immobilisations": { + "En compte, immobilisations incorporelles": { + "account_number": "4851" + }, + "En compte, immobilisations corporelles": { + "account_number": "4852" + }, + "Effets \u00e0 recevoir, immobilisations incorporelles": { + "account_number": "4853" + }, + "Effets \u00e0 recevoir, immobilisations corporelles": { + "account_number": "4854" + }, + "Effets escompt\u00e9s non \u00e9chus": { + "account_number": "4855" + }, + "Retenues de garantie": { + "account_number": "4857" + }, + "Factures \u00e0 \u00e9tablir": { + "account_number": "4858" + }, + "account_number": "485" + }, + "Autres cr\u00e9ances hors activit\u00e9s ordinaires (HAO)": { + "account_number": "488" + } + }, + "49-D\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme (tiers) (ACTIF)": { + "D\u00e9pr\u00e9ciations des comptes clients": { + "Cr\u00e9ances litigieuses": { + "account_number": "4911" + }, + "Cr\u00e9ances douteuses": { + "account_number": "4912" + }, + "account_number": "491" + }, + "D\u00e9pr\u00e9ciations des comptes organismes internationaux": { + "account_number": "495" + }, + "D\u00e9pr\u00e9ciations des comptes apporteurs, associ\u00e9s et groupe": { + "Associ\u00e9s, comptes courants": { + "account_number": "4962" + }, + "Associ\u00e9s, op\u00e9rations faites en commun": { + "account_number": "4963" + }, + "Groupe, comptes courants": { + "account_number": "4966" + }, + "account_number": "496" + }, + "D\u00e9pr\u00e9ciations des comptes d\u00e9biteurs divers": { + "account_number": "497" + }, + "D\u00e9pr\u00e9ciations des comptes de cr\u00e9ances HAO": { + "Cr\u00e9ances sur cessions d\u2019immobilisations": { + "account_number": "4985" + }, + "Cr\u00e9ances sur cessions de titres de placement": { + "account_number": "4986" + }, + "Autres cr\u00e9ances HAO": { + "account_number": "4988" + }, + "account_number": "498" + }, + "Provisions pour risques \u00e0 court terme": { + "Sur op\u00e9rations d\u2019exploitation": { + "account_number": "4991" + }, + "Sur op\u00e9rations financi\u00e8res": { + "account_number": "4997" + }, + "Sur op\u00e9rations HAO": { + "account_number": "4998" + }, + "account_number": "499" + } + }, + "root_type": "Asset" + }, + "4-Comptes de Tiers (PASSIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (PASSIF)": { + "Fournisseurs, dettes en compte": { + "Fournisseurs": { + "account_type": "Payable", + "account_number": "4011" + }, + "Fournisseurs groupe": { + "account_type": "Payable", + "account_number": "4012" + }, + "Fournisseurs sous-traitants": { + "account_type": "Payable", + "account_number": "4013" + }, + "Fournisseurs, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Payable", + "account_number": "4016" + }, + "Fournisseur, retenues de garantie": { + "account_type": "Payable", + "account_number": "4017" + }, + "account_type": "Payable", + "account_number": "401" + }, + "Fournisseurs, effets \u00e0 payer": { + "Fournisseurs Effets \u00e0 payer": { + "account_type": "Payable", + "account_number": "4021" + }, + "Fournisseurs Groupe, effets \u00e0 payer": { + "account_type": "Payable", + "account_number": "4022" + }, + "Fournisseurs Sous-traitants, effets \u00e0 payer": { + "account_type": "Payable", + "account_number": "4023" + }, + "account_type": "Payable", + "account_number": "402" + }, + "Fournisseurs, acquisitions courantes d\u2019immobilisations": { + "Fournisseurs Dettes en comptes, immobilisations incorporelles": { + "account_type": "Payable", + "account_number": "4041" + }, + "Fournisseurs Dettes en comptes, immobilisations corporelles": { + "account_type": "Payable", + "account_number": "4042" + }, + "Fournisseurs Effets \u00e0 payer, immobilisations incorporelles": { + "account_type": "Payable", + "account_number": "4046" + }, + "Fournisseurs Effets \u00e0 payer, immobilisations corporelles": { + "account_type": "Payable", + "account_number": "4047" + }, + "account_type": "Payable", + "account_number": "404" + }, + "Fournisseurs, factures non parvenues": { + "Fournisseurs": { + "account_type": "Stock Received But Not Billed", + "account_number": "4081" + }, + "Fournisseurs groupe": { + "account_type": "Stock Received But Not Billed", + "account_number": "4082" + }, + "Fournisseurs sous-traitants": { + "account_type": "Stock Received But Not Billed", + "account_number": "4083" + }, + "Fournisseurs, int\u00e9r\u00eats courus": { + "account_type": "Stock Received But Not Billed", + "account_number": "4086" + }, + "account_type": "Stock Received But Not Billed", + "account_number": "408" + }, + "account_type": "Payable" + }, + "41-Clients et comptes rattach\u00e9s (PASSIF)": { + "Clients cr\u00e9diteurs": { + "Clients, avances et acomptes re\u00e7us": { + "account_number": "4191" + }, + "Clients groupe, avances et acomptes re\u00e7us": { + "account_number": "4192" + }, + "Clients, dettes pour emballages et mat\u00e9riels consign\u00e9s": { + "account_number": "4194" + }, + "Clients, rabais, remises, ristournes et autres avoirs \u00e0 accorder": { + "account_number": "4198" + }, + "account_number": "419" + } + }, + "42-Personnel (PASSIF)": { + "Personnel, r\u00e9mun\u00e9rations dues": { + "account_number": "422" + }, + "Personnel, oppositions, saisies-arr\u00eats": { + "Personnel, oppositions": { + "account_number": "4231" + }, + "Personnel, saisies-arr\u00eats": { + "account_number": "4232" + }, + "Personnel, avis \u00e0 tiers d\u00e9tenteur": { + "account_number": "4233" + }, + "account_number": "423" + }, + "Personnel, \u0153uvres sociales internes": { + "Assistance m\u00e9dicale": { + "account_number": "4241" + }, + "Allocations familiales": { + "account_number": "4242" + }, + "Organismes sociaux rattach\u00e9s \u00e0 l\u2019entit\u00e9": { + "account_number": "4245" + }, + "Autres \u0153uvres sociales internes": { + "account_number": "4248" + }, + "account_number": "424" + }, + "Repr\u00e9sentants du personnel": { + "D\u00e9l\u00e9gu\u00e9s du personnel": { + "account_number": "4251" + }, + "Syndicats et Comit\u00e9s d\u2019entreprises, d\u2019\u00c9tablissement": { + "account_number": "4252" + }, + "Autres repr\u00e9sentants du personnel": { + "account_number": "4258" + }, + "account_number": "425" + }, + "Personnel, participation aux b\u00e9n\u00e9fices et au capital": { + "Participation aux b\u00e9n\u00e9fices": { + "account_number": "4261" + }, + "Participation au capital": { + "account_number": "4264" + }, + "account_number": "426" + }, + "Personnel d\u00e9p\u00f4ts": { + "account_number": "427" + }, + "Personnel, charges \u00e0 payer et produits \u00e0 recevoir": { + "Dettes provisionn\u00e9es pour cong\u00e9s \u00e0 payer": { + "account_number": "4281" + }, + "Autres charges \u00e0 payer": { + "account_number": "4286" + }, + "Produits \u00e0 recevoir": { + "account_number": "4287" + }, + "account_number": "428" + } + }, + "43-Organismes sociaux (PASSIF)": { + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "Charges sociales sur gratifications \u00e0 payer": { + "account_number": "4381" + }, + "Charges sociales sur cong\u00e9s \u00e0 payer": { + "account_number": "4382" + }, + "Autres charges \u00e0 payer": { + "account_number": "4386" + } + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (PASSIF)": { + "\u00c9tat, imp\u00f4t sur les b\u00e9n\u00e9fices": { + "account_number": "441" + }, + "\u00c9tat, autres imp\u00f4ts et taxes": { + "Imp\u00f4ts et taxes d\u2019\u00c9tat": { + "account_number": "4421" + }, + "Imp\u00f4ts et taxes pour les collectivit\u00e9s publiques": { + "account_number": "4422" + }, + "Imp\u00f4ts et taxes recouvrables sur des obligataires": { + "account_number": "4423" + }, + "Imp\u00f4ts et taxes recouvrables sur des associ\u00e9s": { + "account_number": "4424" + }, + "Droits de douane": { + "account_number": "4426" + }, + "Autres imp\u00f4ts et taxes": { + "account_number": "4428" + }, + "account_number": "442" + }, + "\u00c9tat, TVA due ou cr\u00e9dit de TVA": { + "\u00c9tat, TVA due": { + "account_number": "4441" + }, + "\u00c9tat, cr\u00e9dit de TVA \u00e0 reporter": { + "account_number": "4449" + }, + "account_number": "444" + }, + "\u00c9tat, autres taxes sur le chiffre d\u2019affaires": { + "account_number": "446" + }, + "\u00c9tat, imp\u00f4ts retenus \u00e0 la source": { + "Imp\u00f4t G\u00e9n\u00e9ral sur le revenu": { + "account_number": "4471" + }, + "Imp\u00f4ts sur salaires": { + "account_number": "4472" + }, + "Contribution nationale": { + "account_number": "4473" + }, + "Contribution nationale de solidarit\u00e9": { + "account_number": "4474" + }, + "Autres imp\u00f4ts et contributions": { + "account_number": "4478" + }, + "account_number": "447" + } + }, + "46-Apporteurs, associ\u00e9s et groupe (PASSIF)": { + "461-Apporteurs, op\u00e9rations sur le capital (PASSIF)": { + "Apporteurs, apports en nature": { + "account_number": "4611" + }, + "Apporteurs, apports en num\u00e9raire": { + "account_number": "4612" + }, + "Apporteurs, versements re\u00e7us sur augmentation de capital": { + "account_number": "4615" + }, + "Apporteurs, versements anticip\u00e9s": { + "account_number": "4616" + }, + "Apporteurs d\u00e9faillants": { + "account_number": "4617" + }, + "Apporteurs, capital \u00e0 rembourser": { + "account_number": "4619" + } + }, + "462-Associ\u00e9s, comptes courants": { + "Principal": { + "account_number": "4621" + }, + "Int\u00e9r\u00eats courus": { + "account_number": "4626" + } + }, + "463-Associ\u00e9s, op\u00e9rations faites en commun et GIE": { + "Op\u00e9rations courantes": { + "account_number": "4631" + }, + "Int\u00e9r\u00eats courus": { + "account_number": "4636" + } + }, + "Associ\u00e9s, dividendes \u00e0 payer": { + "account_number": "465" + }, + "Groupe, comptes courants": { + "account_number": "466" + } + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (PASSIF)": { + "471-D\u00e9biteurs et cr\u00e9diteurs divers": { + "D\u00e9biteurs divers": { + "account_number": "4711" + }, + "Cr\u00e9diteurs divers": { + "account_number": "4712" + }, + "Obligataires": { + "account_number": "4713" + }, + "R\u00e9mun\u00e9rations d\u2019administrateurs": { + "account_number": "4715" + }, + "Compte d\u2019affacturage": { + "account_number": "4716" + }, + "D\u00e9biteurs divers retenues de garantie": { + "account_number": "4717" + }, + "Apport, compte de fusion et op\u00e9rations assimil\u00e9es": { + "account_number": "4718" + }, + "Bons de souscription d\u2019actions et d\u2019obligations": { + "account_number": "4719" + } + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits (PASSIF)": { + "Compte de r\u00e9partition p\u00e9riodique des charges": { + "account_number": "4746" + } + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA (PASSIF)": { + "Compte passif": { + "account_number": "4752" + } + }, + "Produits constat\u00e9s d\u2019avance": { + "account_number": "477" + }, + "479-\u00c9carts de conversion passif": { + "Augmentation des cr\u00e9ances d\u2019exploitation": { + "account_number": "4791" + }, + "Augmentation des cr\u00e9ances financi\u00e8res": { + "account_number": "4792" + }, + "Diminution des dettes d\u2019exploitation": { + "account_number": "4793" + }, + "Diminution des dettes financi\u00e8res": { + "account_number": "4794" + }, + "Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": { + "account_number": "4797" + }, + "Diff\u00e9rences compens\u00e9es par couverture de change": { + "account_number": "4798" + } + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (HAO) (PASSIF)": { + "Fournisseurs d\u2019investissements": { + "Immobilisations incorporelles": { + "account_number": "4811" + }, + "Immobilisations corporelles": { + "account_number": "4812" + }, + "Versements restant \u00e0 effectuer sur titres de participation et titres immobilis\u00e9s non lib\u00e9r\u00e9s": { + "account_number": "4813" + }, + "R\u00e9serve de propri\u00e9t\u00e9": { + "account_number": "4816" + }, + "Retenues de garantie": { + "account_number": "4817" + }, + "Factures non parvenues": { + "account_number": "4818" + }, + "account_number": "481" + }, + "Fournisseurs d\u2019investissements, effets \u00e0 payer": { + "Immobilisations incorporelles": { + "account_number": "4821" + }, + "Immobilisations corporelles": { + "account_number": "4822" + }, + "account_number": "482" + }, + "Autres dettes hors activit\u00e9s ordinaires (HAO)": { + "Produits": { + "account_number": "4887" + }, + "account_number": "484" + } + }, + "root_type": "Liability" + }, + "Comptes de tr\u00e9sorerie": { + "Titres de placement": { + "Titres du tr\u00e9sor et bons de caisse \u00e0 court terme": { + "Titres du Tr\u00e9sor \u00e0 court terme": { + "account_number": "5011" + }, + "Titres d\u2019organismes financiers": { + "account_number": "5012" + }, + "Bons de caisse \u00e0 court terme": { + "account_number": "5013" + }, + "Frais d\u2019acquisition des titres de tr\u00e9sor et bons de caisse": { + "account_number": "5016" + }, + "account_number": "501" + }, + "Actions": { + "Actions ou parts propres": { + "account_number": "5021" + }, + "Actions cot\u00e9es": { + "account_number": "5022" + }, + "Actions non cot\u00e9es": { + "account_number": "5023" + }, + "Actions d\u00e9membr\u00e9es (certificats d\u2019investissement, droits de vote)": { + "account_number": "5024" + }, + "Autres actions": { + "account_number": "5025" + }, + "Frais d\u2019acquisition des actions": { + "account_number": "5026" + }, + "account_number": "502" + }, + "Obligations": { + "Obligations \u00e9mises par la soci\u00e9t\u00e9 et rachet\u00e9es par elle": { + "account_number": "5031" + }, + "Obligations cot\u00e9es": { + "account_number": "5032" + }, + "Obligations non cot\u00e9es": { + "account_number": "5033" + }, + "Autres obligations": { + "account_number": "5035" + }, + "Frais d\u2019acquisition des obligations": { + "account_number": "5036" + }, + "account_number": "503" + }, + "Bons de souscription": { + "Bons de souscription d\u2019actions": { + "account_number": "5042" + }, + "Bons de souscription d\u2019obligations": { + "account_number": "5043" + }, + "account_number": "504" + }, + "Titres n\u00e9gociables hors r\u00e9gion": { + "account_number": "505" + }, + "Int\u00e9r\u00eats courus": { + "Titres du Tr\u00e9sor et bons de caisse \u00e0 court terme": { + "account_number": "5061" + }, + "Actions": { + "account_number": "5062" + }, + "Obligations": { + "account_number": "5063" + }, + "account_number": "506" + }, + "Autres titres de placement et cr\u00e9ances assimil\u00e9es": { + "account_number": "508" + }, + "account_number": "50" + }, + "Valeurs \u00e0 encaisser": { + "Effets \u00e0 encaisser": { + "account_number": "511" + }, + "Effets \u00e0 l\u2019encaissement": { + "account_number": "512" + }, + "Ch\u00e8ques \u00e0 encaisser": { + "account_number": "513" + }, + "Ch\u00e8ques \u00e0 l\u2019encaissement": { + "account_number": "514" + }, + "Cartes de cr\u00e9dit \u00e0 encaisser": { + "account_number": "515" + }, + "Autres valeurs \u00e0 l\u2019encaissement": { + "Warrants": { + "account_number": "5181" + }, + "Billets de fonds": { + "account_number": "5182" + }, + "Ch\u00e8ques de voyage": { + "account_number": "5185" + }, + "Coupons \u00e9chus": { + "account_number": "5186" + }, + "Int\u00e9r\u00eats \u00e9chus des obligations": { + "account_number": "5187" + }, + "account_number": "518" + }, + "account_number": "51" + }, + "Banques": { + "Banques locales": { + "Banques en monnaie nationale": { + "account_type": "Bank", + "account_number": "5211" + }, + "Banques en devises": { + "account_type": "Bank", + "account_number": "5215" + }, + "account_type": "Bank", + "account_number": "521" + }, + "Banques autres \u00c9tats r\u00e9gion": { + "account_number": "522" + }, + "Banques autres \u00c9tats zone mon\u00e9taire": { + "account_number": "523" + }, + "Banques hors zone mon\u00e9taire": { + "account_number": "524" + }, + "Banques d\u00e9p\u00f4t \u00e0 terme": { + "account_number": "525" + }, + "Banques, int\u00e9r\u00eats courus": { + "Banque, int\u00e9r\u00eats courus, charges \u00e0 payer": { + "account_number": "5261" + }, + "Banque, int\u00e9r\u00eats courus, produits \u00e0 recevoir": { + "account_number": "5267" + }, + "account_number": "526" + }, + "account_number": "52" + }, + "\u00c9tablissements financiers et assimil\u00e9s": { + "Ch\u00e8ques postaux": { + "account_number": "531" + }, + "Tr\u00e9sor": { + "account_number": "532" + }, + "Soci\u00e9t\u00e9s de gestion et d\u2019interm\u00e9diation (SGI)": { + "account_number": "533" + }, + "\u00c9tablissements financiers, int\u00e9r\u00eats courus": { + "account_number": "536" + }, + "Autres organismes financiers": { + "account_number": "538" + }, + "account_number": "53" + }, + "Instruments de tr\u00e9sorerie": { + "Options de taux d\u2019int\u00e9r\u00eat": { + "account_number": "541" + }, + "Options de taux de change": { + "account_number": "542" + }, + "Options de taux boursiers": { + "account_number": "543" + }, + "Instruments de march\u00e9s \u00e0 terme": { + "account_number": "544" + }, + "Avoirs d\u2019or et autres m\u00e9taux pr\u00e9cieux": { + "account_number": "545" + }, + "account_number": "54" + }, + "Instruments de monnaie \u00e9lectronique": { + "Monnaie \u00e9lectronique carte carburant": { + "account_number": "551" + }, + "Monnaie \u00e9lectronique t\u00e9l\u00e9phone portable": { + "account_number": "552" + }, + "Monnaie \u00e9lectronique carte p\u00e9age": { + "account_number": "553" + }, + "Porte-monnaie \u00e9lectronique": { + "account_number": "554" + }, + "Autres instruments de monnaies \u00e9lectroniques": { + "account_number": "558" + }, + "account_number": "55" + }, + "Banques, cr\u00e9dits de tr\u00e9sorerie et d\u2019escompte": { + "Cr\u00e9dits de tr\u00e9sorerie": { + "account_number": "561" + }, + "Escompte de cr\u00e9dits de campagne": { + "account_number": "564" + }, + "Escompte de cr\u00e9dits ordinaires": { + "account_number": "565" + }, + "Banques, cr\u00e9dits de tr\u00e9sorerie, int\u00e9r\u00eats courus": { + "account_number": "566" + }, + "account_number": "56" + }, + "Caisse": { + "Caisse si\u00e8ge social": { + "Caisse en monnaie nationale": { + "account_number": "5711" + }, + "Caisse en devises": { + "account_number": "5712" + }, + "account_number": "571" + }, + "Caisse succursale A": { + "En monnaie nationale": { + "account_number": "5721" + }, + "En devises": { + "account_number": "5722" + }, + "account_number": "572" + }, + "Caisse succursale B": { + "En monnaie nationale": { + "account_number": "5731" + }, + "En devises": { + "account_number": "5732" + }, + "account_number": "573" + }, + "account_number": "57" + }, + "R\u00e9gies d\u2019avances, accr\u00e9ditifs et virements internes": { + "R\u00e9gies d\u2019avance": { + "account_number": "581" + }, + "Accr\u00e9ditifs": { + "account_number": "582" + }, + "Virements de fonds": { + "account_number": "585" + }, + "Autres virements internes": { + "account_number": "588" + }, + "account_number": "58" + }, + "D\u00e9pr\u00e9ciations et provisions pour risque \u00e0 court terme": { + "D\u00e9pr\u00e9ciations des titres de placement": { + "account_number": "590" + }, + "D\u00e9pr\u00e9ciations des titres et valeurs \u00e0 encaisser": { + "account_number": "591" + }, + "D\u00e9pr\u00e9ciations des comptes banques": { + "account_number": "592" + }, + "D\u00e9pr\u00e9ciations des comptes \u00e9tablissements financiers et assimil\u00e9s": { + "account_number": "593" + }, + "D\u00e9pr\u00e9ciations des comptes d\u2019instruments de tr\u00e9sorerie": { + "account_number": "594" + }, + "Provisions pour risque \u00e0 court terme \u00e0 caract\u00e8re financier": { + "account_number": "599" + }, + "account_number": "59" + }, + "root_type": "Asset", + "account_number": "5" + }, + "Comptes de charges des activit\u00e9s ordinaires": { + "Achats et variations de stocks": { + "Achats de marchandises": { + "Dans la R\u00e9gion": { + "account_number": "6011" + }, + "Hors R\u00e9gion": { + "account_number": "6012" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "6013" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "6014" + }, + "Frais sur achats": { + "account_number": "6015" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6019" + }, + "account_number": "601" + }, + "Achats de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "Dans la R\u00e9gion": { + "account_number": "6021" + }, + "Hors R\u00e9gion": { + "account_number": "6022" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "6023" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "6024" + }, + "Frais sur achats": { + "account_number": "6025" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6029" + }, + "account_number": "602" + }, + "Variations des stocks de biens achet\u00e9s": { + "Variations des stocks de marchandises": { + "account_number": "6031" + }, + "Variations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "account_number": "6032" + }, + "Variations des stocks d\u2019autres approvisionnements": { + "account_number": "6033" + }, + "account_number": "603" + }, + "Achats stock\u00e9s de mati\u00e8res et fournitures consommables": { + "Mati\u00e8res consommables": { + "account_number": "6041" + }, + "Mati\u00e8res combustibles": { + "account_number": "6042" + }, + "Produits d\u2019entretien": { + "account_number": "6043" + }, + "Fournitures d\u2019atelier et d\u2019usine": { + "account_number": "6044" + }, + "Frais sur achat": { + "account_number": "6045" + }, + "Fournitures de magasin": { + "account_number": "6046" + }, + "Fournitures de bureau": { + "account_number": "6047" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6049" + }, + "account_number": "604" + }, + "Autres achats": { + "Fournitures non stockables Eau": { + "account_number": "6051" + }, + "Fournitures non stockables \u00c9lectricit\u00e9": { + "account_number": "6052" + }, + "Fournitures non stockables Autres \u00e9nergies": { + "account_number": "6053" + }, + "Fournitures d\u2019entretien non stockables": { + "account_number": "6054" + }, + "Fournitures de bureau non stockables": { + "account_number": "6055" + }, + "Achats de petit mat\u00e9riel et outillage": { + "account_number": "6056" + }, + "Achats d\u2019\u00e9tudes et prestations de services": { + "account_number": "6057" + }, + "Achats de travaux, mat\u00e9riels et \u00e9quipements": { + "account_number": "6058" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6059" + }, + "account_number": "605" + }, + "Achats d\u2019emballages": { + "Emballages perdus": { + "account_number": "6081" + }, + "Emballages r\u00e9cup\u00e9rables non identifiables": { + "account_number": "6082" + }, + "Emballages \u00e0 usage mixte": { + "account_number": "6083" + }, + "Frais sur achats": { + "account_number": "6085" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6089" + }, + "account_number": "608" + }, + "account_number": "60" + }, + "Transports": { + "Transports sur ventes": { + "account_number": "612" + }, + "Transports pour le compte de tiers": { + "account_number": "613" + }, + "Transports du personnel": { + "account_number": "614" + }, + "Transports de plis": { + "account_number": "616" + }, + "Autres frais de transport": { + "Voyages et d\u00e9placements": { + "account_number": "6181" + }, + "Transports entre \u00e9tablissements ou chantiers": { + "account_number": "6182" + }, + "Transports administratifs": { + "account_number": "6183" + }, + "account_number": "618" + }, + "account_number": "61" + }, + "Services ext\u00e9rieurs": { + "Sous-traitance g\u00e9n\u00e9rale": { + "account_number": "621" + }, + "Locations, charges locatives": { + "Locations de terrains": { + "account_number": "6221" + }, + "Locations de b\u00e2timents": { + "account_number": "6222" + }, + "Locations de mat\u00e9riels et outillages": { + "account_number": "6223" + }, + "Malis sur emballages": { + "account_number": "6224" + }, + "Locations d\u2019emballages": { + "account_number": "6225" + }, + "Fermages et loyers du foncier": { + "account_number": "6226" + }, + "Locations et charges locatives diverses": { + "account_number": "6228" + }, + "account_number": "622" + }, + "Redevances de location acquisition": { + "Cr\u00e9dit-bail immobilier": { + "account_number": "6232" + }, + "Cr\u00e9dit-bail mobilier": { + "account_number": "6233" + }, + "Location-vente": { + "account_number": "6234" + }, + "Autres contrats de location acquisition": { + "account_number": "6238" + }, + "account_number": "623" + }, + "Entretien, r\u00e9parations, remise en \u00e9tat et maintenance": { + "Entretien et r\u00e9parations des biens immobiliers": { + "account_number": "6241" + }, + "Entretien et r\u00e9parations des biens mobiliers": { + "account_number": "6242" + }, + "Maintenance": { + "account_number": "6243" + }, + "Charges de d\u00e9mant\u00e8lement et remise en \u00e9tat": { + "account_number": "6244" + }, + "Autres entretiens et r\u00e9parations": { + "account_number": "6248" + }, + "account_number": "624" + }, + "Primes d\u2019assurance": { + "Assurances multirisques": { + "account_number": "6251" + }, + "Assurances mat\u00e9riel de transport": { + "account_number": "6252" + }, + "Assurances risques d\u2019exploitation": { + "account_number": "6253" + }, + "Assurances responsabilit\u00e9 du producteur": { + "account_number": "6254" + }, + "Assurances insolvabilit\u00e9 clients": { + "account_number": "6255" + }, + "Assurances transport sur ventes": { + "account_number": "6257" + }, + "Autres primes d\u2019assurances": { + "account_number": "6258" + }, + "account_number": "625" + }, + "\u00c9tudes, recherches et documentation": { + "\u00c9tudes et recherches": { + "account_number": "6261" + }, + "Documentation g\u00e9n\u00e9rale": { + "account_number": "6265" + }, + "Documentation technique": { + "account_number": "6266" + }, + "account_number": "626" + }, + "Publicit\u00e9, publications, relations publiques": { + "Annonces, insertions": { + "account_number": "6271" + }, + "Catalogues, imprim\u00e9s publicitaires": { + "account_number": "6272" + }, + "\u00c9chantillons": { + "account_number": "6273" + }, + "Foires et expositions": { + "account_number": "6274" + }, + "Publications": { + "account_number": "6275" + }, + "Cadeaux \u00e0 la client\u00e8le": { + "account_number": "6276" + }, + "Frais de colloques, s\u00e9minaires, conf\u00e9rences": { + "account_number": "6277" + }, + "Autres charges de publicit\u00e9 et relations publiques": { + "account_number": "6278" + }, + "account_number": "627" + }, + "Frais de t\u00e9l\u00e9communications": { + "Frais de t\u00e9l\u00e9phone": { + "account_number": "6281" + }, + "Frais de t\u00e9lex": { + "account_number": "6282" + }, + "Frais de t\u00e9l\u00e9copie": { + "account_number": "6283" + }, + "Autres frais de t\u00e9l\u00e9communications": { + "account_number": "6288" + }, + "account_number": "628" + }, + "account_number": "62" + }, + "Autres services ext\u00e9rieurs": { + "Frais bancaires": { + "Frais sur titres (vente, garde)": { + "account_number": "6311" + }, + "Frais sur effets": { + "account_number": "6312" + }, + "Location de coffres": { + "account_number": "6313" + }, + "Commissions d\u2019affacturage": { + "account_number": "6314" + }, + "Commissions sur cartes de cr\u00e9dit": { + "account_number": "6315" + }, + "Frais d\u2019\u00e9mission d\u2019emprunts": { + "account_number": "6316" + }, + "Frais sur instruments monnaie \u00e9lectronique": { + "account_number": "6317" + }, + "Autres frais bancaires": { + "account_number": "6318" + }, + "account_number": "631" + }, + "R\u00e9mun\u00e9rations d\u2019interm\u00e9diaires et de conseils": { + "Commissions et courtages sur ventes": { + "account_number": "6322" + }, + "Honoraires des professions r\u00e9glement\u00e9es": { + "account_number": "6324" + }, + "Frais d\u2019actes et de contentieux": { + "account_number": "6325" + }, + "R\u00e9mun\u00e9rations d\u2019affacturage": { + "account_number": "6326" + }, + "R\u00e9mun\u00e9rations des autres prestataires de services": { + "account_number": "6327" + }, + "Divers frais": { + "account_number": "6328" + }, + "account_number": "632" + }, + "Frais de formation du personnel": { + "account_number": "633" + }, + "Redevances pour brevets, licences, logiciels, concessions et droits et valeurs similaires": { + "Redevances pour brevets, licences": { + "account_number": "6342" + }, + "Redevances pour logiciels": { + "account_number": "6343" + }, + "Redevances pour marques": { + "account_number": "6344" + }, + "Redevances pour sites internet": { + "account_number": "6345" + }, + "Redevances pour concessions, droits et valeurs similaires": { + "account_number": "6346" + }, + "account_number": "634" + }, + "Cotisations": { + "Cotisations": { + "account_number": "6351" + }, + "Concours divers": { + "account_number": "6358" + }, + "account_number": "635" + }, + "R\u00e9mun\u00e9rations de personnel ext\u00e9rieur \u00e0 l\u2019entit\u00e9": { + "Personnel int\u00e9rimaire": { + "account_number": "6371" + }, + "Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": { + "account_number": "6372" + }, + "account_number": "637" + }, + "Autres charges externes": { + "Frais de recrutement du personnel": { + "account_number": "6381" + }, + "Frais de d\u00e9m\u00e9nagement": { + "account_number": "6382" + }, + "R\u00e9ceptions": { + "account_number": "6383" + }, + "Missions": { + "account_number": "6384" + }, + "Charges de copropri\u00e9t\u00e9": { + "account_number": "6385" + }, + "account_number": "638" + }, + "account_number": "63" + }, + "Imp\u00f4ts et taxes": { + "Imp\u00f4ts et taxes directs": { + "Imp\u00f4ts fonciers et taxes annexes": { + "account_number": "6411" + }, + "Patentes, licences et taxes annexes": { + "account_number": "6412" + }, + "Taxes sur appointements et salaires": { + "account_number": "6413" + }, + "Taxes d\u2019apprentissage": { + "account_number": "6414" + }, + "Formation professionnelle continue": { + "account_number": "6415" + }, + "Autres imp\u00f4ts et taxes directs": { + "account_number": "6418" + }, + "account_number": "641" + }, + "Imp\u00f4ts et taxes indirects": { + "account_number": "645" + }, + "Droits d\u2019enregistrement": { + "Droits de mutation": { + "account_number": "6461" + }, + "Droits de timbre": { + "account_number": "6462" + }, + "Taxes sur les v\u00e9hicules de soci\u00e9t\u00e9": { + "account_number": "6463" + }, + "Vignettes": { + "account_number": "6464" + }, + "Autres droits": { + "account_number": "6468" + }, + "account_number": "646" + }, + "P\u00e9nalit\u00e9s, amendes fiscales": { + "P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts directs": { + "account_number": "6471" + }, + "P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts indirects": { + "account_number": "6472" + }, + "P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts directs": { + "account_number": "6473" + }, + "P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts indirects": { + "account_number": "6474" + }, + "Autres p\u00e9nalit\u00e9s et amendes fiscales": { + "account_number": "6478" + }, + "account_number": "647" + }, + "Autres imp\u00f4ts et taxes": { + "account_number": "648" + }, + "account_number": "64" + }, + "Autres charges": { + "Pertes sur cr\u00e9ances clients et autres d\u00e9biteurs": { + "Clients": { + "account_number": "6511" + }, + "Autres d\u00e9biteurs": { + "account_number": "6515" + }, + "account_number": "651" + }, + "Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "Quote-part transf\u00e9r\u00e9e de b\u00e9n\u00e9fices (comptabilit\u00e9 du g\u00e9rant)": { + "account_number": "6521" + }, + "Pertes imput\u00e9es par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": { + "account_number": "6525" + }, + "account_number": "652" + }, + "Valeurs comptables des cessions courantes d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "6541" + }, + "Immobilisations corporelles": { + "account_number": "6542" + }, + "account_number": "654" + }, + "Perte de change sur cr\u00e9ances et dettes commerciale": { + "account_number": "656" + }, + "P\u00e9nalit\u00e9s et amendes p\u00e9nales": { + "account_number": "657" + }, + "Charges diverses": { + "Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": { + "account_number": "6581" + }, + "Dons": { + "account_number": "6582" + }, + "M\u00e9c\u00e9nat": { + "account_number": "6583" + }, + "Autres charges diverses": { + "account_number": "6588" + }, + "account_number": "658" + }, + "Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "Sur risques \u00e0 court terme": { + "account_number": "6591" + }, + "Sur stocks": { + "account_number": "6593" + }, + "Sur cr\u00e9ances": { + "account_number": "6594" + }, + "Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme": { + "account_number": "6598" + }, + "account_number": "659" + }, + "account_number": "65" + }, + "Charges de personnel": { + "R\u00e9mun\u00e9rations directes vers\u00e9es au personnel national": { + "Appointements salaires et commissions": { + "account_number": "6611" + }, + "Primes et gratifications": { + "account_number": "6612" + }, + "Cong\u00e9s pay\u00e9s": { + "account_number": "6613" + }, + "Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": { + "account_number": "6614" + }, + "Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": { + "account_number": "6615" + }, + "Suppl\u00e9ment familial": { + "account_number": "6616" + }, + "Avantages en nature": { + "account_number": "6617" + }, + "Autres r\u00e9mun\u00e9rations directes": { + "account_number": "6618" + }, + "account_number": "661" + }, + "R\u00e9mun\u00e9rations directes vers\u00e9es au personnel non national": { + "Appointements salaires et commissions": { + "account_number": "6621" + }, + "Primes et gratifications": { + "account_number": "6622" + }, + "Cong\u00e9s pay\u00e9s": { + "account_number": "6623" + }, + "Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": { + "account_number": "6624" + }, + "Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": { + "account_number": "6625" + }, + "Suppl\u00e9ment familial": { + "account_number": "6626" + }, + "Avantages en nature": { + "account_number": "6627" + }, + "Autres r\u00e9mun\u00e9rations directes": { + "account_number": "6628" + }, + "account_number": "662" + }, + "Indemnit\u00e9s forfaitaires vers\u00e9es au personnel": { + "Indemnit\u00e9s de logement": { + "account_number": "6631" + }, + "Indemnit\u00e9s de repr\u00e9sentation": { + "account_number": "6632" + }, + "Indemnit\u00e9s d\u2019expatriation": { + "account_number": "6633" + }, + "Indemnit\u00e9s de transport": { + "account_number": "6634" + }, + "Autres indemnit\u00e9s et avantages divers": { + "account_number": "6638" + }, + "account_number": "663" + }, + "Charges sociales": { + "Charges sociales sur r\u00e9mun\u00e9ration du personnel national": { + "account_number": "6641" + }, + "Charges sociales sur r\u00e9mun\u00e9ration du personnel non national": { + "account_number": "6642" + }, + "account_number": "664" + }, + "R\u00e9mun\u00e9rations et charges sociales de l\u2019exploitant individuel": { + "R\u00e9mun\u00e9ration du travail de l\u2019exploitant": { + "account_number": "6661" + }, + "Charges sociales": { + "account_number": "6662" + }, + "account_number": "666" + }, + "R\u00e9mun\u00e9ration transf\u00e9r\u00e9e de personnel ext\u00e9rieur": { + "Personnel int\u00e9rimaire": { + "account_number": "6671" + }, + "Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": { + "account_number": "6672" + }, + "account_number": "667" + }, + "Autres charges sociales": { + "Versements aux syndicats et comit\u00e9s d\u2019entreprise, d\u2019\u00e9tablissement": { + "account_number": "6681" + }, + "Versements aux comit\u00e9s d\u2019hygi\u00e8ne et de s\u00e9curit\u00e9": { + "account_number": "6682" + }, + "Versements et contributions aux autres \u0153uvres sociales": { + "account_number": "6683" + }, + "M\u00e9decine du travail et pharmacie": { + "account_number": "6684" + }, + "Assurances et organismes de sant\u00e9": { + "account_number": "6685" + }, + "Assurances retraite et fonds de pension": { + "account_number": "6686" + }, + "Majorations et p\u00e9nalit\u00e9s sociales": { + "account_number": "6687" + }, + "Charges sociales diverses": { + "account_number": "6688" + }, + "account_number": "668" + }, + "account_number": "66" + }, + "Frais financiers et charges assimil\u00e9es": { + "Int\u00e9r\u00eats des emprunts": { + "Emprunts obligataires": { + "account_number": "6711" + }, + "Emprunts aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": { + "account_number": "6712" + }, + "Dettes li\u00e9es \u00e0 des participations": { + "account_number": "6713" + }, + "Primes de remboursement des obligations": { + "account_number": "6714" + }, + "account_number": "671" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition": { + "Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail immobilier": { + "account_number": "6722" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail mobilier": { + "account_number": "6723" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition / location-vente": { + "account_number": "6724" + }, + "Int\u00e9r\u00eats dans loyers des autres locations acquisition": { + "account_number": "6728" + }, + "account_number": "672" + }, + "Escomptes accord\u00e9s": { + "account_number": "673" + }, + "Autres int\u00e9r\u00eats": { + "Avances re\u00e7ues et d\u00e9p\u00f4ts cr\u00e9diteurs": { + "account_number": "6741" + }, + "Comptes courants bloqu\u00e9s": { + "account_number": "6742" + }, + "Int\u00e9r\u00eats sur obligations cautionn\u00e9es": { + "account_number": "6743" + }, + "Int\u00e9r\u00eats sur dettes commerciales": { + "account_number": "6744" + }, + "Int\u00e9r\u00eats bancaires et sur op\u00e9rations de financement (escompte...)": { + "account_number": "6745" + }, + "Int\u00e9r\u00eats sur dettes diverses": { + "account_number": "6748" + }, + "account_number": "674" + }, + "Escomptes des effets de commerce": { + "account_number": "675" + }, + "Pertes de change financi\u00e8res": { + "account_number": "676" + }, + "Pertes sur titres de placement": { + "Pertes sur cessions de titres de placement": { + "account_number": "6771" + }, + "Mali provenant d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": { + "account_number": "6772" + }, + "account_number": "677" + }, + "Pertes et charges sur risques financiers": { + "Sur rentes viag\u00e8res": { + "account_number": "6781" + }, + "Sur op\u00e9rations financi\u00e8res": { + "account_number": "6782" + }, + "Sur instruments de tr\u00e9sorerie": { + "account_number": "6784" + }, + "account_number": "678" + }, + "Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "Sur risques financiers": { + "account_number": "6791" + }, + "Sur titres de placement": { + "account_number": "6795" + }, + "Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "account_number": "6798" + }, + "account_number": "679" + }, + "account_number": "67" + }, + "Dotations aux amortissements": { + "Dotations aux amortissements d\u2019exploitation": { + "Dotations aux amortissements des immobilisations incorporelles": { + "account_number": "6812" + }, + "Dotations aux amortissements des immobilisations corporelles": { + "account_number": "6813" + }, + "account_number": "681" + }, + "account_number": "68" + }, + "Dotations aux provisions et aux d\u00e9pr\u00e9ciations": { + "Dotations aux provisions et aux d\u00e9pr\u00e9ciations d\u2019exploitation": { + "Dotations aux provisions pour risques et charges": { + "account_number": "6911" + }, + "Dotations aux d\u00e9pr\u00e9ciations des immobilisations incorporelles": { + "account_number": "6913" + }, + "Dotations aux d\u00e9pr\u00e9ciations des immobilisations corporelles": { + "account_number": "6914" + }, + "account_number": "691" + }, + "Dotations aux provisions et aux d\u00e9pr\u00e9ciations financi\u00e8res": { + "Dotations aux provisions pour risques et charges": { + "account_number": "6971" + }, + "Dotations aux d\u00e9pr\u00e9ciations des immobilisations financi\u00e8res": { + "account_number": "6972" + }, + "account_number": "697" + }, + "account_number": "69" + }, + "root_type": "Expense", + "account_number": "6" + }, + "Comptes de produits des activit\u00e9s ordinaires": { + "Ventes": { + "Ventes de marchandises": { + "Dans la R\u00e9gion": { + "account_number": "7011" + }, + "Hors R\u00e9gion": { + "account_number": "7012" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7013" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7014" + }, + "Sur internet": { + "account_number": "7015" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7019" + }, + "account_number": "701" + }, + "Ventes de produits finis": { + "Dans la R\u00e9gion": { + "account_number": "7021" + }, + "Hors R\u00e9gion": { + "account_number": "7022" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7023" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7024" + }, + "Sur internet": { + "account_number": "7025" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7029" + }, + "account_number": "702" + }, + "Ventes de produits interm\u00e9diaires": { + "Dans la R\u00e9gion": { + "account_number": "7031" + }, + "Hors R\u00e9gion": { + "account_number": "7032" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7033" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7034" + }, + "Sur internet": { + "account_number": "7035" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7039" + }, + "account_number": "703" + }, + "Ventes de produits r\u00e9siduels": { + "Dans la R\u00e9gion": { + "account_number": "7041" + }, + "Hors R\u00e9gion": { + "account_number": "7042" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7043" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7044" + }, + "Sur internet": { + "account_number": "7045" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7049" + }, + "account_number": "704" + }, + "Travaux factur\u00e9s": { + "Dans la R\u00e9gion": { + "account_number": "7051" + }, + "Hors R\u00e9gion": { + "account_number": "7052" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7053" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7054" + }, + "Sur internet": { + "account_number": "7055" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7059" + }, + "account_number": "705" + }, + "Services vendus": { + "Dans la R\u00e9gion": { + "account_number": "7061" + }, + "Hors R\u00e9gion": { + "account_number": "7062" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7063" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7064" + }, + "Sur internet": { + "account_number": "7065" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7069" + }, + "account_number": "706" + }, + "Produits accessoires": { + "Ports, emballages perdus et autres frais factur\u00e9s": { + "account_number": "7071" + }, + "Commissions et courtages": { + "account_number": "7072" + }, + "Locations": { + "account_number": "7073" + }, + "Bonis sur reprises et cessions d\u2019emballages": { + "account_number": "7074" + }, + "Mise \u00e0 disposition de personnel": { + "account_number": "7075" + }, + "Redevances pour brevets, logiciels, marques et droits similaires": { + "account_number": "7076" + }, + "Services exploit\u00e9s dans l\u2019int\u00e9r\u00eat du personnel": { + "account_number": "7077" + }, + "Autres produits accessoires": { + "account_number": "7078" + }, + "account_number": "707" + }, + "account_number": "70" + }, + "Subventions d\u2019exploitation": { + "Sur produits \u00e0 l\u2019exportation": { + "account_number": "711" + }, + "Sur produits \u00e0 l\u2019importation": { + "account_number": "712" + }, + "Sur produits de p\u00e9r\u00e9quation": { + "account_number": "713" + }, + "Indemnit\u00e9s et subventions d\u2019exploitation (entit\u00e9 agricole)": { + "account_number": "714" + }, + "Autres subventions d\u2019exploitation": { + "Vers\u00e9es par l\u2019\u00c9tat et les collectivit\u00e9s publiques": { + "account_number": "7181" + }, + "Vers\u00e9es par les organismes internationaux": { + "account_number": "7182" + }, + "Vers\u00e9es par des tiers": { + "account_number": "7183" + }, + "account_number": "718" + }, + "account_number": "71" + }, + "Production immobilis\u00e9e": { + "Immobilisations incorporelles": { + "account_number": "721" + }, + "Immobilisations corporelles": { + "Immobilisations corporelles (hors actifs biologiques)": { + "account_number": "7221" + }, + "Immobilisations corporelles (actifs biologiques)": { + "account_number": "7222" + }, + "account_number": "722" + }, + "Production auto-consomm\u00e9e": { + "account_number": "724" + }, + "Immobilisations financi\u00e8res": { + "account_number": "726" + }, + "account_number": "72" + }, + "Variations des stocks de biens et de services produits": { + "Variations des stocks de produits en cours": { + "Produits en cours": { + "account_number": "7341" + }, + "Travaux en cours": { + "account_number": "7342" + }, + "account_number": "734" + }, + "Variations des en-cours de services": { + "\u00c9tudes en cours": { + "account_number": "7351" + }, + "Prestations de services en cours": { + "account_number": "7352" + }, + "account_number": "735" + }, + "Variations des stocks de produits finis": { + "account_number": "736" + }, + "Variations des stocks de produits interm\u00e9diaires et r\u00e9siduels": { + "Produits interm\u00e9diaires": { + "account_number": "7371" + }, + "Produits r\u00e9siduels": { + "account_number": "7372" + }, + "account_number": "737" + }, + "account_number": "73" + }, + "Autres produits": { + "Profits sur cr\u00e9ances clients et autres d\u00e9biteurs": { + "account_number": "751" + }, + "Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "Quote-part transf\u00e9r\u00e9e de pertes (comptabilit\u00e9 du g\u00e9rant)": { + "account_number": "7521" + }, + "B\u00e9n\u00e9fices attribu\u00e9s par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": { + "account_number": "7525" + }, + "account_number": "752" + }, + "Produits des cessions courantes d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "7541" + }, + "Immobilisations corporelles": { + "account_number": "7542" + }, + "account_number": "754" + }, + "Gains de change sur cr\u00e9ances et dettes commerciales": { + "account_number": "756" + }, + "Produits divers": { + "Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": { + "account_number": "7581" + }, + "Indemnit\u00e9s d\u2019assurances re\u00e7ues": { + "account_number": "7582" + }, + "Autres produits divers": { + "account_number": "7588" + }, + "account_number": "758" + }, + "Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "Sur risques \u00e0 court terme": { + "account_number": "7591" + }, + "Sur stocks": { + "account_number": "7593" + }, + "Sur cr\u00e9ances": { + "account_number": "7594" + }, + "Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "account_number": "7598" + }, + "account_number": "759" + }, + "account_number": "75" + }, + "Revenus financiers et produits assimil\u00e9s": { + "Int\u00e9r\u00eats de pr\u00eats et cr\u00e9ances diverses": { + "Int\u00e9r\u00eats de pr\u00eats": { + "account_number": "7712" + }, + "Int\u00e9r\u00eats sur cr\u00e9ances diverses": { + "account_number": "7713" + }, + "account_number": "771" + }, + "Revenus de participations et autres titres immobilis\u00e9s": { + "Revenus des titres de participation": { + "account_number": "7721" + }, + "Revenus autres titres immobilis\u00e9s": { + "account_number": "7722" + }, + "account_number": "772" + }, + "Escomptes obtenus": { + "account_number": "773" + }, + "Revenus de placement": { + "Revenus des obligations": { + "account_number": "7745" + }, + "Revenus des titres de placement": { + "account_number": "7746" + }, + "account_number": "774" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition": { + "account_number": "775" + }, + "Gains de change financiers": { + "account_number": "776" + }, + "Gains sur cessions de titres de placement": { + "account_number": "777" + }, + "Gains sur risques financiers": { + "Sur rentes viag\u00e8res": { + "account_number": "7781" + }, + "Sur op\u00e9rations financi\u00e8res": { + "account_number": "7782" + }, + "Sur instruments de tr\u00e9sorerie": { + "account_number": "7784" + }, + "account_number": "778" + }, + "Reprises de charges pour d\u00e9pr\u00e9ciations et provisions \u00e0 court terme financi\u00e8res": { + "Sur risques financiers": { + "account_number": "7791" + }, + "Sur titres de placement": { + "account_number": "7795" + }, + "Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "account_number": "7798" + }, + "account_number": "779" + }, + "account_number": "77" + }, + "Transferts de charges": { + "Transferts de charges d\u2019exploitation": { + "account_number": "781" + }, + "Transferts de charges financi\u00e8res": { + "account_number": "787" + }, + "account_number": "78" + }, + "Reprises de provisions, de d\u00e9pr\u00e9ciations et autres": { + "Reprises de provisions et d\u00e9pr\u00e9ciations d\u2019exploitation": { + "Pour risques et charges": { + "account_number": "7911" + }, + "Des immobilisations incorporelles": { + "account_number": "7913" + }, + "Des immobilisations corporelles": { + "account_number": "7914" + }, + "account_number": "791" + }, + "Reprises de provisions et d\u00e9pr\u00e9ciations financi\u00e8res": { + "Pour risques et charges": { + "account_number": "7971" + }, + "Des immobilisations financi\u00e8res": { + "account_number": "7972" + }, + "account_number": "797" + }, + "Reprises d\u2019amortissements": { + "account_number": "798" + }, + "Reprises de subventions d\u2019investissement": { + "account_number": "799" + }, + "account_number": "79" + }, + "root_type": "Income", + "account_number": "7" + }, + "8-Comptes des autres charges et des autres produits (CHARGES)": { + "Valeurs comptables des cessions d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "811" + }, + "Immobilisations corporelles": { + "account_number": "812" + }, + "Immobilisations financi\u00e8res": { + "account_number": "816" + }, + "account_number": "81" + }, + "Charges hors activit\u00e9s ordinaires": { + "Charges HAO constat\u00e9es": { + "account_number": "831" + }, + "Charges li\u00e9es aux op\u00e9rations de restructuration": { + "account_number": "833" + }, + "Pertes sur cr\u00e9ances HAO": { + "account_number": "834" + }, + "Dons et lib\u00e9ralit\u00e9s accord\u00e9s": { + "account_number": "835" + }, + "Abandons de cr\u00e9ances consentis": { + "account_number": "836" + }, + "Charges li\u00e9es aux op\u00e9rations de liquidation": { + "account_number": "837" + }, + "Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": { + "account_number": "839" + }, + "account_number": "83" + }, + "Dotations hors activit\u00e9s ordinaires": { + "Dotations aux provisions r\u00e9glement\u00e9es": { + "account_number": "851" + }, + "Dotations aux amortissements HAO": { + "account_number": "852" + }, + "Dotations aux d\u00e9pr\u00e9ciations HAO": { + "account_number": "853" + }, + "Dotations aux provisions pour risques et charges HAO": { + "account_number": "854" + }, + "Autres dotations HAO": { + "account_number": "858" + }, + "account_number": "85" + }, + "Participation des travailleurs": { + "Participation l\u00e9gale aux b\u00e9n\u00e9fices": { + "account_number": "871" + }, + "Participation contractuelle aux b\u00e9n\u00e9fices": { + "account_number": "874" + }, + "Autres participations": { + "account_number": "878" + }, + "account_number": "87" + }, + "Imp\u00f4ts sur le r\u00e9sultat": { + "Imp\u00f4ts sur les b\u00e9n\u00e9fices de l\u2019exercice": { + "Activit\u00e9s exerc\u00e9es dans l\u2019\u00c9tat": { + "account_number": "8911" + }, + "Activit\u00e9s exerc\u00e9es dans les autres \u00c9tats de la R\u00e9gion": { + "account_number": "8912" + }, + "Activit\u00e9s exerc\u00e9es hors R\u00e9gion": { + "account_number": "8913" + }, + "account_number": "891" + }, + "Rappel d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": { + "account_number": "892" + }, + "Imp\u00f4t minimum forfaitaire IMF": { + "account_number": "895" + }, + "D\u00e9gr\u00e8vements et annulations d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": { + "D\u00e9gr\u00e8vements": { + "account_number": "8991" + }, + "Annulations pour pertes r\u00e9troactives": { + "account_number": "8994" + }, + "account_number": "899" + }, + "account_number": "89" + }, + "root_type": "Expense" + }, + "8-Comptes des autres charges et des autres produits (PRODUITS)": { + "Produits des cessions d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "821" + }, + "Immobilisations corporelles": { + "account_number": "822" + }, + "Immobilisations financi\u00e8res": { + "account_number": "826" + }, + "account_number": "82" + }, + "Produits hors activit\u00e9s ordinaires": { + "Produits HAO constat\u00e9s": { + "account_number": "841" + }, + "Produits li\u00e9s aux op\u00e9rations de restructuration": { + "account_number": "843" + }, + "Indemnit\u00e9s et subventions HAO (entit\u00e9 agricole)": { + "account_number": "844" + }, + "Dons et lib\u00e9ralit\u00e9s obtenus": { + "account_number": "845" + }, + "Abandons de cr\u00e9ances obtenus": { + "account_number": "846" + }, + "Produits li\u00e9s aux op\u00e9rations de liquidation": { + "account_number": "847" + }, + "Transferts de charges HAO": { + "account_number": "848" + }, + "Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": { + "account_number": "849" + }, + "account_number": "84" + }, + "Reprises de charges, provisions et d\u00e9pr\u00e9ciations HAO": { + "Reprises de provisions r\u00e9glement\u00e9es": { + "account_number": "861" + }, + "Reprises d\u2019amortissements HAO": { + "account_number": "862" + }, + "Reprises de d\u00e9pr\u00e9ciations HAO": { + "account_number": "863" + }, + "Reprises de provisions pour risques et charges HAO": { + "account_number": "864" + }, + "Autres reprises HAO": { + "account_number": "868" + }, + "account_number": "86" + }, + "Subventions d\u2019\u00e9quilibre": { + "\u00c9tat": { + "account_number": "881" + }, + "Collectivit\u00e9s publiques": { + "account_number": "884" + }, + "Groupe": { + "account_number": "886" + }, + "Autres": { + "account_number": "888" + }, + "account_number": "88" + }, + "root_type": "Income" + } + } +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/ml_plan_comptable.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/ml_plan_comptable.json new file mode 100644 index 00000000000..64c8377f949 --- /dev/null +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/ml_plan_comptable.json @@ -0,0 +1,1919 @@ +{ + "country_code": "ml", + "name": "Syscohada - Plan Comptable", + "tree": { + "1-Comptes de ressources durables": { + "10-Capital": { + "101-Capital social": { + "1011-Capital souscrit, non appel\u00e9": {}, + "1012-Capital souscrit, appel\u00e9, non vers\u00e9": {}, + "1013-Capital souscrit, appel\u00e9, vers\u00e9, non amorti": {}, + "1014-Capital souscrit, appel\u00e9, vers\u00e9, amorti": {}, + "1018-Capital souscrit soumis \u00e0 des conditions particuli\u00e8res": {} + }, + "102-Capital par dotation": { + "1021-Dotation initiale": {}, + "1022-Dotations compl\u00e9mentaires": {}, + "1028-Autres dotations": {} + }, + "103-Capital personnel": {}, + "104-Compte de l\u2019exploitant": { + "1041-Apports temporaires": {}, + "1042-Op\u00e9rations courantes": {}, + "1043-R\u00e9mun\u00e9rations, imp\u00f4ts et autres charges personnelles": {}, + "1047-Pr\u00e9l\u00e8vements d\u2019autoconsommation": {}, + "1048-Autres pr\u00e9l\u00e8vements": {} + }, + "105-Primes li\u00e9es au capital social": { + "1051-Primes d\u2019\u00e9mission": {}, + "1052-Primes d\u2019apport": {}, + "1053-Primes de fusion": {}, + "1054-Primes de conversion": {}, + "1058-Autres primes": {} + }, + "106-\u00c9carts de r\u00e9\u00e9valuation": { + "1061-\u00c9carts de r\u00e9\u00e9valuation l\u00e9gale": {}, + "1062-\u00c9carts de r\u00e9\u00e9valuation libre": {} + }, + "109-Apporteurs, capital souscrit, non appel\u00e9": {} + }, + "11-R\u00e9serves": { + "111-R\u00e9serve l\u00e9gale": {}, + "112-R\u00e9serves statutaires ou contractuelles": {}, + "113-R\u00e9serves r\u00e9glement\u00e9es": { + "1131-R\u00e9serves de plus-values nettes \u00e0 long terme": {}, + "1132-R\u00e9serves d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": {}, + "1133-R\u00e9serves cons\u00e9cutives \u00e0 l\u2019octroi de subventions d\u2019investissement": {}, + "1134-R\u00e9serves des valeurs mobili\u00e8res donnant acc\u00e8s au capital": {}, + "1135-Autres r\u00e9serves r\u00e9glement\u00e9es": {} + }, + "118-Autres r\u00e9serves": { + "1181-R\u00e9serves facultatives": {}, + "1188-R\u00e9serves diverses": {} + } + }, + "12-Report \u00e0 nouveau": { + "121-Report \u00e0 nouveau cr\u00e9diteur": {}, + "129-Report \u00e0 nouveau d\u00e9biteur": { + "1291-Perte nette \u00e0 reporter": {}, + "1292-Perte Amortissements r\u00e9put\u00e9s diff\u00e9r\u00e9s": {} + } + }, + "13-R\u00e9sultat net de l\u2019exercice": { + "130-R\u00e9sultat en instance d\u2019affectation": { + "1301-R\u00e9sultat en instance d\u2019affectation : b\u00e9n\u00e9fice": {}, + "1309-R\u00e9sultat en instance d\u2019affectation : perte": {} + }, + "131-R\u00e9sultat net : b\u00e9n\u00e9fice": {}, + "132-Marge commerciale (MC)": {}, + "133-Valeur ajout\u00e9e (VA)": {}, + "134-Exc\u00e9dent brut d\u2019exploitation (EBE)": {}, + "135-R\u00e9sultat d\u2019exploitation (RE)": {}, + "136-R\u00e9sultat financier (RF)": {}, + "137-R\u00e9sultat des activit\u00e9s ordinaires (RAO)": {}, + "138-R\u00e9sultat hors activit\u00e9s ordinaires (RHAO)": { + "1381-R\u00e9sultat de fusion": {}, + "1382-R\u00e9sultat d\u2019apport partiel d\u2019actif": {}, + "1383-R\u00e9sultat de scission": {}, + "1384-R\u00e9sultat de liquidation": {} + }, + "139-R\u00e9sultat net : perte": {} + }, + "14-Subventions d\u2019investissement": { + "141-Subventions d\u2019\u00e9quipement": { + "1411-\u00c9tat": {}, + "1412-R\u00e9gions": {}, + "1413-D\u00e9partements": {}, + "1414-Communes et collectivit\u00e9s publiques d\u00e9centralis\u00e9es": {}, + "1415-Entit\u00e9s publiques ou mixtes": {}, + "1416-Entit\u00e9s et organismes priv\u00e9s": {}, + "1417-Organismes internationaux": {}, + "1418-Autres": {} + }, + "148-Autres subventions d\u2019investissement": {} + }, + "15-Provisions r\u00e9glement\u00e9es et fonds assimil\u00e9s": { + "151-Amortissements d\u00e9rogatoires": {}, + "152-Plus-values de cession \u00e0 r\u00e9investir": {}, + "153-Fonds r\u00e9glement\u00e9s": { + "1531-Fonds National": {}, + "1532-Pr\u00e9l\u00e8vement pour le Budget": {} + }, + "154-Provisions sp\u00e9ciales de r\u00e9\u00e9valuation": {}, + "155-Provisions r\u00e9glement\u00e9es relatives aux immobilisations": { + "1551-Reconstitution des gisements miniers et p\u00e9troliers": {} + }, + "156-Provisions r\u00e9glement\u00e9es relatives aux stocks": { + "1561-Hausse de prix": {}, + "1562-Fluctuation des cours": {} + }, + "157-Provisions pour investissement": {}, + "158-Autres provisions et fonds r\u00e9glement\u00e9s": {} + }, + "16-Emprunts et dettes assimil\u00e9es": { + "161-Emprunts obligataires": { + "1611-Emprunts obligataires ordinaires": {}, + "1612-Emprunts obligataires convertibles en actions": {}, + "1613-Emprunts obligataires remboursables en actions": {}, + "1618-Autres emprunts obligataires": {} + }, + "162-Emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": {}, + "163-Avances re\u00e7ues de l\u2019\u00c9tat": {}, + "164-Avances re\u00e7ues et comptes courants bloqu\u00e9s": {}, + "165-D\u00e9p\u00f4ts et cautionnements re\u00e7us": { + "1651-D\u00e9p\u00f4ts": {}, + "1652-Cautionnements": {} + }, + "166-Int\u00e9r\u00eats courus": { + "1661-Sur emprunts obligataires": {}, + "1662-Sur emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": {}, + "1663-Sur avances re\u00e7ues de l\u2019\u00c9tat": {}, + "1664-Sur avances re\u00e7ues et comptes courants bloqu\u00e9s": {}, + "1665-Sur d\u00e9p\u00f4ts et cautionnements re\u00e7us": {}, + "1667-Sur avances assorties de conditions particuli\u00e8res": {}, + "1668-Sur autres emprunts et dettes": {} + }, + "167-Avances assorties de conditions particuli\u00e8res": { + "1671-Avances bloqu\u00e9es pour augmentation du capital": {}, + "1672-Avances conditionn\u00e9es par l\u2019\u00c9tat": {}, + "1673-Avances conditionn\u00e9es par les autres organismes africains": {}, + "1674-Avances conditionn\u00e9es par les organismes internationaux": {} + }, + "168-Autres emprunts et dettes": { + "1681-Rentes viag\u00e8res capitalis\u00e9es": {}, + "1682-Billets de fonds": {}, + "1683-Dettes cons\u00e9cutives \u00e0 des titres emprunt\u00e9s": {}, + "1684-Emprunts participatifs": {}, + "1685-Participation des travailleurs aux b\u00e9n\u00e9fices": {}, + "1686-Emprunts et dettes contract\u00e9s aupr\u00e8s des autres tiers": {} + } + }, + "17-Dettes de location acquisition": { + "172-Dettes de location acquisition / cr\u00e9dit bail immobilier": {}, + "173-Dettes de location acquisition / cr\u00e9dit bail mobilier": {}, + "174-Dettes de location acquisition / location de vente": {}, + "176-Int\u00e9r\u00eats courus": { + "1762-Sur dettes de location acquisition / cr\u00e9dit-bail immobilier": {}, + "1763-Sur dettes de location acquisition / cr\u00e9dit-bail mobilier": {}, + "1764-Sur dettes de location acquisition / location-vente": {}, + "1768-Sur autres dettes de location acquisition": {} + }, + "178-Autres dettes de location acquisition": {} + }, + "18-Dettes li\u00e9es \u00e0 des participations et comptes de liaison des \u00e9tablissements et soci\u00e9t\u00e9s en participation": { + "181-Dettes li\u00e9es \u00e0 des participations": { + "1811-Dettes li\u00e9es \u00e0 des participations (groupe)": {}, + "1812-Dettes li\u00e9es \u00e0 des participations (hors groupe)": {} + }, + "182-Dettes li\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": {}, + "183-Int\u00e9r\u00eats courus sur dettes li\u00e9es \u00e0 des participations": {}, + "184-Comptes permanents bloqu\u00e9s des \u00e9tablissements et succursales": {}, + "185-Comptes permanents non bloqu\u00e9s des \u00e9tablissements et succursales": {}, + "186-Comptes de liaison charges": {}, + "187-Comptes de liaison produits": {}, + "188-Comptes de liaison des soci\u00e9t\u00e9s en participation": {} + }, + "19-Provisions pour risques et charges": { + "191-Provisions pour litiges": {}, + "192-Provisions pour garanties donn\u00e9es aux clients": {}, + "193-Provisions pour pertes sur march\u00e9s \u00e0 ach\u00e8vement futur": {}, + "194-Provisions pour pertes de change": {}, + "195-Provisions pour imp\u00f4ts": {}, + "196-Provisions pour pensions et obligations similaires": { + "1961-Provisions pour pensions et obligations similaires engagement de retraite": {}, + "1962-Actif du r\u00e9gime de retraite": {} + }, + "197-Provisions pour restructuration": {}, + "198-Autres provisions pour risques et charges": { + "1981-Provisions pour amendes et p\u00e9nalit\u00e9s": {}, + "1983-Provisions pour propre assureur": {}, + "1984-Provisions pour d\u00e9mant\u00e8lement et remise en \u00e9tat": {}, + "1985-Provisions pour droits \u00e0 r\u00e9duction ou avantage en nature (ch\u00e8ques cadeau, cartes de fid\u00e9lit\u00e9...)": {}, + "1988-Provisions pour divers risques et charges": {} + } + }, + "root_type": "Equity" + }, + "2-Comptes d\u2019actif immobilis\u00e9": { + "21-Immobilisations incorporelles": { + "account_type": "Fixed Asset", + "211-Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset" + }, + "212-Brevets, licences, concessions et droits similaires": { + "account_type": "Fixed Asset", + "2121-Brevets": { + "account_type": "Fixed Asset" + }, + "2122-Licences": { + "account_type": "Fixed Asset" + }, + "2123-Concessions de service public": { + "account_type": "Fixed Asset" + }, + "2128-Autres concessions et droits similaires": { + "account_type": "Fixed Asset" + } + }, + "213-Logiciels et sites internet": { + "account_type": "Fixed Asset", + "2131-Logiciels": { + "account_type": "Fixed Asset" + }, + "2132-Sites internet": { + "account_type": "Fixed Asset" + } + }, + "214-Marques": { + "account_type": "Fixed Asset" + }, + "215-Fonds commercial": { + "account_type": "Fixed Asset" + }, + "216-Droit au bail": { + "account_type": "Fixed Asset" + }, + "217-Investissements de cr\u00e9ation": { + "account_type": "Fixed Asset" + }, + "218-Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset", + "2181-Frais de prospection et d\u2019\u00e9valuation de ressources min\u00e9rales": { + "account_type": "Fixed Asset" + }, + "2182-Co\u00fbts d\u2019obtention du contrat": { + "account_type": "Fixed Asset" + }, + "2183-Fichiers clients, notices, titres de journaux et magazines": { + "account_type": "Fixed Asset" + }, + "2184-Co\u00fbts des franchises": { + "account_type": "Fixed Asset" + }, + "2188-Divers droits et valeurs incorporelles": { + "account_type": "Fixed Asset" + } + }, + "219-Immobilisations incorporelles en cours": { + "account_type": "Fixed Asset", + "2191-Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset" + }, + "2193-Logiciels et internet": { + "account_type": "Fixed Asset" + }, + "2198-Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset" + } + } + }, + "22-Terrains": { + "account_type": "Fixed Asset", + "221-Terrains agricoles et forestiers": { + "account_type": "Fixed Asset", + "2211-Terrains d\u2019exploitation agricole": { + "account_type": "Fixed Asset" + }, + "2212-Terrains d\u2019exploitation foresti\u00e8re": { + "account_type": "Fixed Asset" + }, + "2218-Autres terrains": { + "account_type": "Fixed Asset" + } + }, + "222-Terrains nus": { + "account_type": "Fixed Asset", + "2221-Terrains \u00e0 b\u00e2tir": { + "account_type": "Fixed Asset" + }, + "2228-Autres terrains nus": { + "account_type": "Fixed Asset" + } + }, + "223-Terrains b\u00e2tis": { + "account_type": "Fixed Asset", + "2231-Pour b\u00e2timents industriels et agricoles": { + "account_type": "Fixed Asset" + }, + "2232-Pour b\u00e2timents administratifs et commerciaux": { + "account_type": "Fixed Asset" + }, + "2234-Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations professionnelles": { + "account_type": "Fixed Asset" + }, + "2235-Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations non professionnelles": { + "account_type": "Fixed Asset" + }, + "2238-Autres terrains b\u00e2tis": { + "account_type": "Fixed Asset" + } + }, + "224-Travaux de mise en valeur des terrains": { + "account_type": "Fixed Asset", + "2241-Plantation d\u2019arbres et d\u2019arbustes": { + "account_type": "Fixed Asset" + }, + "2245-Am\u00e9liorations du fonds": { + "account_type": "Fixed Asset" + }, + "2248-Autres travaux": { + "account_type": "Fixed Asset" + } + }, + "225-Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset", + "2251-Carri\u00e8res": { + "account_type": "Fixed Asset" + } + }, + "226-Terrains am\u00e9nag\u00e9s": { + "account_type": "Fixed Asset", + "2261-Parkings": { + "account_type": "Fixed Asset" + } + }, + "227-Terrains mis en concession": { + "account_type": "Fixed Asset" + }, + "228-Autres terrains": { + "account_type": "Fixed Asset", + "2281-Terrains immeubles de placement": { + "account_type": "Fixed Asset" + }, + "2285-Terrains des logements affect\u00e9s au personnel": { + "account_type": "Fixed Asset" + }, + "2286-Terrains de location acquisition": { + "account_type": "Fixed Asset" + }, + "2288-Divers terrains": { + "account_type": "Fixed Asset" + } + }, + "229-Am\u00e9nagements de terrains en cours": { + "account_type": "Fixed Asset", + "2291-Terrains agricoles et forestiers": { + "account_type": "Fixed Asset" + }, + "2292-Terrains nus": { + "account_type": "Fixed Asset" + }, + "2295-Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset" + }, + "2298-Autres terrains": { + "account_type": "Fixed Asset" + } + } + }, + "23-B\u00e2timents, installations techniques et agencements": { + "231-B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "2311-B\u00e2timents industriels": {}, + "2312-B\u00e2timents agricoles": {}, + "2313-B\u00e2timents administratifs et commerciaux": {}, + "2314-B\u00e2timents affect\u00e9s au logement du personnel": {}, + "2315-B\u00e2timents immeubles de placement": {}, + "2316-B\u00e2timents de location acquisition": {} + }, + "232-B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "2321-B\u00e2timents industriels": {}, + "2322-B\u00e2timents agricoles": {}, + "2323-B\u00e2timents administratifs et commerciaux": {}, + "2324-B\u00e2timents affect\u00e9s au logement du personnel": {}, + "2325-B\u00e2timents immeubles de placement": {}, + "2326-B\u00e2timents de location acquisition": {} + }, + "233-Ouvrages d\u2019infrastructure": { + "2331-Voies de terre": {}, + "2332-Voies de fer": {}, + "2333-Voies d\u2019eau": {}, + "2334-Barrages, Digues": {}, + "2335-Pistes d\u2019a\u00e9rodrome": {}, + "2338-Autres ouvrages d\u2019infrastructures": {} + }, + "234-Am\u00e9nagements, agencements et installations techniques": { + "2341-Installations complexes sp\u00e9cialis\u00e9es sur sol propre": {}, + "2342-Installations complexes sp\u00e9cialis\u00e9es sur sol d\u2019autrui": {}, + "2343-Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol propre": {}, + "2344-Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol d\u2019autrui": {}, + "2345-Am\u00e9nagements et agencements des b\u00e2timents": {} + }, + "235-Am\u00e9nagements de bureaux": { + "2351-Installations g\u00e9n\u00e9rales": {}, + "2358-Autres am\u00e9nagements de bureaux": {} + }, + "237-B\u00e2timents industriels, agricoles et commerciaux mis en concession": {}, + "238-Autres installations et agencements": {}, + "239-B\u00e2timents am\u00e9nagements, agencements et installations en cours": { + "2391-B\u00e2timents en cours": {}, + "2392-Installations en cours": {}, + "2393-Ouvrages d\u2019infrastructure en cours": {}, + "2394-Am\u00e9nagements et agencements et installations techniques en cours": {}, + "2395-Am\u00e9nagements de bureaux en cours": {}, + "2398-Autres installations et agencements en cours": {} + } + }, + "24-Mat\u00e9riel, mobilier et actifs biologiques": { + "241-Mat\u00e9riel et outillage industriel et commercial": { + "2411-Mat\u00e9riel industriel": {}, + "2412-Outillage industriel": {}, + "2413-Mat\u00e9riel commercial": {}, + "2414-Outillage commercial": {}, + "2416-Mat\u00e9riel & outillage industriel et commercial de location-acquisition": {} + }, + "242-Mat\u00e9riel et outillage agricole": { + "2421-Mat\u00e9riel agricole": {}, + "2422-Outillage agricole": {}, + "2426-Mat\u00e9riel & outillage agricole de location-acquisition": {} + }, + "243-Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "244-Mat\u00e9riel et mobilier": { + "2441-Mat\u00e9riel de bureau": {}, + "2442-Mat\u00e9riel informatique": {}, + "2443-Mat\u00e9riel bureautique": {}, + "2444-Mobilier de bureau": {}, + "2445-Mat\u00e9riel et mobilier immeubles de placement": {}, + "2446-Mat\u00e9riel et mobilier de location acquisition": {}, + "2447-Mat\u00e9riel et mobilier des logements du personnel": {} + }, + "245-Mat\u00e9riel de transport": { + "2451-Mat\u00e9riel automobile": {}, + "2452-Mat\u00e9riel ferroviaire": {}, + "2453-Mat\u00e9riel fluvial, lagunaire": {}, + "2454-Mat\u00e9riel naval": {}, + "2455-Mat\u00e9riel a\u00e9rien": {}, + "2456-Mat\u00e9riel de transport de location-acquisition": {}, + "2457-Mat\u00e9riel hippomobile": {}, + "2458-Autres mat\u00e9riels de transport": {} + }, + "246-Actifs biologiques": { + "2461-Cheptel, animaux de trait": {}, + "2462-Cheptel, animaux reproducteurs": {}, + "2463-Animaux de garde": {}, + "2465-Plantations agricoles": {}, + "2468-Autres actifs biologiques": {} + }, + "247-Agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "2471-Agencements et am\u00e9nagements du mat\u00e9riel": {}, + "2472-Agencements et am\u00e9nagements des actifs biologiques": {}, + "2478-Autres agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": {} + }, + "248-Autres mat\u00e9riels et mobiliers": { + "2481-Collections et \u0153uvres d\u2019art": {}, + "2488-Divers mat\u00e9riels mobiliers": {} + }, + "249-Mat\u00e9riels et actifs biologiques en cours": { + "2491-Mat\u00e9riel et outillage industriel et commercial": {}, + "2492-Mat\u00e9riel et outillage agricole": {}, + "2493-Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "2494-Mat\u00e9riel et mobilier de bureau": {}, + "2495-Mat\u00e9riel de transport": {}, + "2496-Actifs biologiques": {}, + "2497-Agencements am\u00e9nagements du mat\u00e9riel et actifs biologiques": {}, + "2498-Autres mat\u00e9riels et actifs biologiques en cours": {} + } + }, + "25-Avances et acomptes vers\u00e9s sur immobilisations": { + "251-Avances et acomptes vers\u00e9s sur immobilisations incorporelles": {}, + "252-Avances et acomptes vers\u00e9s sur immobilisations corporelles": {} + }, + "26-Titres de participation": { + "261-Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": {}, + "262-Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le conjoint": {}, + "263-Titres de participation dans des soci\u00e9t\u00e9s conf\u00e9rant une influence notable": {}, + "265-Participations dans des organismes professionnels": {}, + "266-Parts dans des groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": {}, + "268-Autres titres de participation": {} + }, + "27-Autres immobilisations financi\u00e8res": { + "271-Pr\u00eats et cr\u00e9ances": { + "2711-Pr\u00eats participatifs": {}, + "2712-Pr\u00eats aux associ\u00e9s": {}, + "2713-Billets de fonds": {}, + "2714-Titres pr\u00eat\u00e9s": {}, + "2718-Autres pr\u00eats et cr\u00e9ances": {} + }, + "272-Pr\u00eats au personnel": { + "2721-Pr\u00eats immobiliers": {}, + "2722-Pr\u00eats mobiliers et d\u2019installation": {}, + "2728-Autres pr\u00eats au personnel": {} + }, + "273-Cr\u00e9ances sur l\u2019\u00c9tat": { + "2731-Retenues de garantie": {}, + "2733-Fonds r\u00e9glement\u00e9": {}, + "2734-Cr\u00e9ances sur le conc\u00e9dant": {}, + "2738-Autres cr\u00e9ances sur l\u2019\u00c9tat": {} + }, + "274-Titres immobilis\u00e9s": { + "2741-Titres immobilis\u00e9s de l\u2019activit\u00e9 de portefeuille (TIAP)": {}, + "2742-Titres participatifs": {}, + "2743-Certificats d\u2019investissement": {}, + "2744-Parts de fonds commun de placement (FCP)": {}, + "2745-Obligations": {}, + "2746-Actions ou parts propres": {}, + "2748-Autres titres immobilis\u00e9s": {} + }, + "275-D\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "2751-D\u00e9p\u00f4ts pour loyers d\u2019avance": {}, + "2752-D\u00e9p\u00f4ts pour l\u2019\u00e9lectricit\u00e9": {}, + "2753-D\u00e9p\u00f4ts pour l\u2019eau": {}, + "2754-D\u00e9p\u00f4ts pour le gaz": {}, + "2755-D\u00e9p\u00f4ts pour le t\u00e9l\u00e9phone, le t\u00e9lex, la t\u00e9l\u00e9copie": {}, + "2756-Cautionnements sur march\u00e9s publics": {}, + "2757-Cautionnements sur autres op\u00e9rations": {}, + "2758-Autres d\u00e9p\u00f4ts et cautionnements": {} + }, + "276-Int\u00e9r\u00eats courus": { + "2761-Pr\u00eats et cr\u00e9ances non commerciales": {}, + "2762-Pr\u00eats au personnel": {}, + "2763-Cr\u00e9ances sur l\u2019\u00c9tat": {}, + "2764-Titres immobilis\u00e9s": {}, + "2765-D\u00e9p\u00f4ts et cautionnements vers\u00e9s": {}, + "2767-Cr\u00e9ances rattach\u00e9es \u00e0 des participations": {}, + "2768-Immobilisations financi\u00e8res diverses": {} + }, + "277-Cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": { + "2771-Cr\u00e9ances rattach\u00e9es \u00e0 des participations (groupe)": {}, + "2772-Cr\u00e9ances rattach\u00e9es \u00e0 des participations (hors groupe)": {}, + "2773-Cr\u00e9ances rattach\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": {}, + "2774-Avances \u00e0 des Groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": {} + }, + "278-Immobilisations financi\u00e8res diverses": { + "2781-Cr\u00e9ances diverses groupe": {}, + "2782-Cr\u00e9ances diverses hors groupe": {}, + "2784-Banques d\u00e9p\u00f4ts \u00e0 terme": {}, + "2785-Or et m\u00e9taux pr\u00e9cieux": {}, + "2788-Autres immobilisations financi\u00e8res": {} + } + }, + "28-Amortissements": { + "account_type": "Accumulated Depreciation", + "281-Amortissements des immobilisations corporelles": { + "account_type": "Accumulated Depreciation", + "2811-Amortissements des frais de d\u00e9veloppement": { + "account_type": "Accumulated Depreciation" + }, + "2812-Amortissements des brevets, licences, concessions et droits similaires": { + "account_type": "Accumulated Depreciation" + }, + "2813-Amortissements des logiciels et sites internet": { + "account_type": "Accumulated Depreciation" + }, + "2814-Amortissements des marques": { + "account_type": "Accumulated Depreciation" + }, + "2815-Amortissements du fonds commercial": { + "account_type": "Accumulated Depreciation" + }, + "2816-Amortissements du droit au bail": { + "account_type": "Accumulated Depreciation" + }, + "2817-Amortissements des investissements de cr\u00e9ation": { + "account_type": "Accumulated Depreciation" + }, + "2818-Amortissements des autres droits et valeurs incorporels": { + "account_type": "Accumulated Depreciation" + } + }, + "282-Amortissements des terrains": { + "2824-Amortissements des travaux de mise en valeur des terrains": {} + }, + "283-Amortissements des b\u00e2timents, installations techniques et agencements": { + "2831-Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": {}, + "2832-Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": {}, + "2833-Amortissements des ouvrages d\u2019infrastructure": {}, + "2834-Amortissements des am\u00e9nagements, agencements et installations techniques": {}, + "2835-Amortissements des am\u00e9nagements de bureaux": {}, + "2837-Amortissements des b\u00e2timents industriels, agricoles et commerciaux mis en concession": {}, + "2838-Amortissements des autres installations et agencements": {} + }, + "284-Amortissements du mat\u00e9riel": { + "2841-Amortissements du mat\u00e9riel et outillage industriel et commercial": {}, + "2842-Amortissements du mat\u00e9riel et outillage agricole": {}, + "2843-Amortissements du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "2844-Amortissements du mat\u00e9riel et mobilier": {}, + "2845-Amortissements du mat\u00e9riel de transport": {}, + "2846-Amortissements des actifs biologiques": {}, + "2847-Amortissements des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": {}, + "2848-Amortissements des autres mat\u00e9riels": {} + } + }, + "29-D\u00e9pr\u00e9ciations des immobilisations": { + "291-D\u00e9pr\u00e9ciations des immobilisations incorporelles": { + "2911-D\u00e9pr\u00e9ciations des frais de d\u00e9veloppement": {}, + "2912-D\u00e9pr\u00e9ciations des brevets, licences, concessions et droits similaires": {}, + "2913-D\u00e9pr\u00e9ciations des logiciels et sites internet": {}, + "2914-D\u00e9pr\u00e9ciations des marques": {}, + "2915-D\u00e9pr\u00e9ciations du fonds commercial": {}, + "2916-D\u00e9pr\u00e9ciations du droit au bail": {}, + "2917-D\u00e9pr\u00e9ciations des investissements de cr\u00e9ation": {}, + "2918-D\u00e9pr\u00e9ciations des autres droits et valeurs incorporels": {}, + "2919-D\u00e9pr\u00e9ciations des immobilisations incorporelles en cours": {} + }, + "292-D\u00e9pr\u00e9ciations des terrains": { + "2921-D\u00e9pr\u00e9ciations des terrains agricoles et forestiers": {}, + "2922-D\u00e9pr\u00e9ciations des terrains nus": {}, + "2923-D\u00e9pr\u00e9ciations des terrains b\u00e2tis": {}, + "2924-D\u00e9pr\u00e9ciations des travaux de mise en valeur des terrains": {}, + "2925-D\u00e9pr\u00e9ciations des terrains de gisement": {}, + "2926-D\u00e9pr\u00e9ciations des terrains am\u00e9nag\u00e9s": {}, + "2927-D\u00e9pr\u00e9ciations des terrains mis en concession": {}, + "2928-D\u00e9pr\u00e9ciations des autres terrains": {}, + "2929-D\u00e9pr\u00e9ciations des am\u00e9nagements de terrains en cours": {} + }, + "293-D\u00e9pr\u00e9ciations des b\u00e2timents, installations techniques et agencements": { + "2931-D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": {}, + "2932-D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": {}, + "2933-D\u00e9pr\u00e9ciations des ouvrages d\u2019infrastructures": {}, + "2934-D\u00e9pr\u00e9ciations des am\u00e9nagements, agencements et installations techniques": {}, + "2935-D\u00e9pr\u00e9ciations des am\u00e9nagements de bureaux": {}, + "2937-D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles et commerciaux mis en concession": {}, + "2938-D\u00e9pr\u00e9ciations des autres installations et agencements": {}, + "2939-D\u00e9pr\u00e9ciations des b\u00e2timents et installations en cours": {} + }, + "294-D\u00e9pr\u00e9ciations de mat\u00e9riel, du mobilier et de l\u2019actif biologique": { + "2941-D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage industriel et commercial": {}, + "2942-D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage agricole": {}, + "2943-D\u00e9pr\u00e9ciations du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "2944-D\u00e9pr\u00e9ciations du mat\u00e9riel et mobilier": {}, + "2945-D\u00e9pr\u00e9ciations du mat\u00e9riel de transport": {}, + "2946-D\u00e9pr\u00e9ciations des actifs biologiques": {}, + "2947-D\u00e9pr\u00e9ciations des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": {}, + "2948-D\u00e9pr\u00e9ciations des autres mat\u00e9riels": {}, + "2949-D\u00e9pr\u00e9ciations de mat\u00e9riel en cours": {} + }, + "295-D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations": { + "2951-D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations incorporelles": {}, + "2952-D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations corporelles": {} + }, + "296-D\u00e9pr\u00e9ciations des titres de participation": { + "2961-D\u00e9pr\u00e9ciations des titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": {}, + "2962-D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s sous contr\u00f4le conjoint": {}, + "2963-D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s conf\u00e9rant une influence notable": {}, + "2965-D\u00e9pr\u00e9ciations des participations dans des organismes professionnels": {}, + "2966-D\u00e9pr\u00e9ciations des parts dans des GIE": {}, + "2968-D\u00e9pr\u00e9ciations des autres titres de participation": {} + }, + "297-D\u00e9pr\u00e9ciations des autres immobilisations financi\u00e8res": { + "2971-D\u00e9pr\u00e9ciations des pr\u00eats et cr\u00e9ances": {}, + "2972-D\u00e9pr\u00e9ciations des pr\u00eats au personnel": {}, + "2973-D\u00e9pr\u00e9ciations des cr\u00e9ances sur l\u2019\u00c9tat": {}, + "2974-D\u00e9pr\u00e9ciations des titres immobilis\u00e9s": {}, + "2975-D\u00e9pr\u00e9ciations des d\u00e9p\u00f4ts et cautionnements vers\u00e9s": {}, + "2977-D\u00e9pr\u00e9ciations des cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": {}, + "2978-D\u00e9pr\u00e9ciations des cr\u00e9ances financi\u00e8res diverses": {} + } + }, + "root_type": "Asset" + }, + "3-Comptes de Stocks": { + "31-Marchandises": { + "311-Marchandises A": { + "3111-Marchandises A1": {}, + "3112-Marchandises A2": {} + }, + "312-Marchandises B": { + "3121-Marchandises B1": {}, + "3122-Marchandises B2": {} + }, + "313-Actifs biologiques": { + "3131-Animaux": {}, + "3132-V\u00e9g\u00e9taux": {} + }, + "318-Marchandises hors activit\u00e9s ordinaires (HAO)": {} + }, + "32-Mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "321-Mati\u00e8res A": {}, + "322-Mati\u00e8res B": {}, + "323-Fournitures (A, B)": {} + }, + "33-Autres approvisionnements": { + "331-Mati\u00e8res consommables": {}, + "332-Fournitures d\u2019atelier et d\u2019usine": {}, + "333-Fournitures de magasin": {}, + "334-Fournitures de bureau": {}, + "335-Emballages": { + "3351-Emballages perdus": {}, + "3352-Emballages r\u00e9cup\u00e9rables non identifiables": {}, + "3353-Emballages \u00e0 usage mixte": {}, + "3358-Autres emballages": {} + }, + "338-Autres mati\u00e8res": {} + }, + "34-Produits en cours": { + "341-Produits en cours": { + "3411-Produits en cours P1": {}, + "3412-Produits en cours P2": {} + }, + "342-Travaux en cours": { + "3421-Travaux en cours T1": {}, + "3422-Travaux en cours T2": {} + }, + "343-Produits interm\u00e9diaires en cours": { + "3431-Produits interm\u00e9diaires A": {}, + "3432-Produits interm\u00e9diaires B": {} + }, + "344-Produits r\u00e9siduels en cours": { + "3441-Produits r\u00e9siduels A": {}, + "3442-Produits r\u00e9siduels B": {} + }, + "345-Actifs biologiques en cours": { + "3451-Animaux": {}, + "3452-V\u00e9g\u00e9taux": {} + } + }, + "35-Services en cours": { + "351-\u00c9tudes en cours": { + "3511-\u00c9tudes en cours E1": {}, + "3512-\u00c9tudes en cours E2": {} + }, + "352-Prestations de services en cours": { + "3521-Prestations de services S1": {}, + "3522-Prestations de services S2": {} + } + }, + "36-Produits finis": { + "361-Produits finis A": {}, + "362-Produits finis B": {}, + "363-Actifs biologiques": { + "3631-Animaux": {}, + "3632-V\u00e9g\u00e9taux": {}, + "3638-Autres stocks (activit\u00e9s annexes)": {} + } + }, + "37-Produits interm\u00e9diaires et r\u00e9siduels": { + "371-Produits interm\u00e9diaires": { + "3711-Produits interm\u00e9diaires A": {}, + "3712-Produits interm\u00e9diaires B": {} + }, + "372-Produits r\u00e9siduels": { + "3721-D\u00e9chets": {}, + "3722-Rebuts": {}, + "3723-Mati\u00e8res de R\u00e9cup\u00e9ration": {} + }, + "373-Actifs biologiques": { + "3731-Animaux": {}, + "3732-V\u00e9g\u00e9taux": {}, + "3738-Autres stocks (activit\u00e9s annexes)": {} + } + }, + "38-Stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": { + "account_type": "Stock", + "381-Marchandises en cours de route": {}, + "382-Mati\u00e8res premi\u00e8res et fournitures li\u00e9es en cours de route": {}, + "383-Autres approvisionnements en cours de route": {}, + "386-Produits finis en cours de route": {}, + "387-Stock en consignation ou en d\u00e9p\u00f4t": { + "3871-Stock en consignation": {}, + "3872-Stock en d\u00e9p\u00f4t": {} + }, + "388-Stock provenant d\u2019immobilisations mises hors service ou au rebut": {} + }, + "39-D\u00e9pr\u00e9ciations des stocks et encours de production": { + "391-D\u00e9pr\u00e9ciations des stocks de marchandises": {}, + "392-D\u00e9pr\u00e9ciations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": {}, + "393-D\u00e9pr\u00e9ciations des stocks d\u2019autres approvisionnements": {}, + "394-D\u00e9pr\u00e9ciations des productions en cours": {}, + "395-D\u00e9pr\u00e9ciations des services en cours": {}, + "396-D\u00e9pr\u00e9ciations des stocks de produits finis": {}, + "397-D\u00e9pr\u00e9ciations des stocks de produits interm\u00e9diaires et r\u00e9siduels": {}, + "398-D\u00e9pr\u00e9ciations des stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": {} + }, + "root_type": "Asset" + }, + "4-Comptes de Tiers (ACTIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (ACTIF)": { + "409-Fournisseurs d\u00e9biteurs": { + "4091-Fournisseurs Avances et acomptes vers\u00e9s": {}, + "4092-Fournisseurs Groupe avances et acomptes vers\u00e9s": {}, + "4093-Fournisseurs Sous-traitants avances et acomptes vers\u00e9s": {}, + "4094-Fournisseurs Cr\u00e9ances pour emballages et mat\u00e9riels \u00e0 rendre": {}, + "4098-Fournisseurs Rabais, remises, ristournes et autres avoirs \u00e0 obtenir": {} + } + }, + "41-Clients et comptes rattach\u00e9s (ACTIF)": { + "411-Clients": { + "4111-Clients": { + "account_type": "Receivable" + }, + "4112-Clients groupe": { + "account_type": "Receivable" + }, + "4114-Clients, \u00c9tat et Collectivit\u00e9s publiques": { + "account_type": "Receivable" + }, + "4115-Clients, organismes internationaux": { + "account_type": "Receivable" + }, + "4116-Clients, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Receivable" + }, + "4117-Client, retenues de garantie": { + "account_type": "Receivable" + }, + "4118-Clients, d\u00e9gr\u00e8vement de taxes sur la valeur ajout\u00e9e (TVA)": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "412-Clients, effets \u00e0 recevoir en portefeuille": { + "4121-Clients, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "4122-Clients Groupe, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "4124-\u00c9tat et Collectivit\u00e9s publiques, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "4125-Organismes Internationaux, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "413-Clients, ch\u00e8ques, effets et autres valeurs impay\u00e9es": { + "4131-Clients, ch\u00e8ques impay\u00e9s": { + "account_type": "Receivable" + }, + "4132-Clients, effets impay\u00e9s": { + "account_type": "Receivable" + }, + "4133-Clients, cartes de cr\u00e9dit impay\u00e9es": { + "account_type": "Receivable" + }, + "4138-Clients, autres valeurs impay\u00e9es": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "414-Cr\u00e9ances sur cessions courantes d\u2019immobilisations": { + "4141-Cr\u00e9ances en compte, immobilisations incorporelles": { + "account_type": "Receivable" + }, + "4142-Cr\u00e9ances en compte, immobilisations corporelles": { + "account_type": "Receivable" + }, + "4146-Effets \u00e0 recevoir, immobilisations incorporelles": { + "account_type": "Receivable" + }, + "4147-Effets \u00e0 recevoir, immobilisations corporelles": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "415-Clients, effets escompt\u00e9s non \u00e9chus": { + "account_type": "Receivable" + }, + "416-Cr\u00e9ances clients litigieuses ou douteuses": { + "4161-Cr\u00e9ances litigieuses": { + "account_type": "Receivable" + }, + "4162-Cr\u00e9ances douteuses": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "418-Clients, produits \u00e0 recevoir": { + "4181-Clients, factures \u00e0 \u00e9tablir": { + "account_type": "Receivable" + }, + "4186-Clients, int\u00e9r\u00eats courus": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "42-Personnel (ACTIF)": { + "421-Personnel, avances et acomptes": { + "4211-Personnel, avances": {}, + "4212-Personnel, acomptes": {}, + "4213-Frais avanc\u00e9s et fournitures au personnel": {} + } + }, + "43-Organismes sociaux (ACTIF)": { + "431-S\u00e9curit\u00e9 sociale": { + "4311-Prestations familiales": {}, + "4312-Accidents de travail": {}, + "4313-Caisse de retraite obligatoire": {}, + "4314-Caisse de retraite facultative": {}, + "4318-Autres cotisations sociales": {} + }, + "432-Caisses de retraite compl\u00e9mentaire": {}, + "433-Autres organismes sociaux": { + "4331-Mutuelle": {}, + "4332-Assurances retraite": {}, + "4333-Assurances et organismes de sant\u00e9": {} + }, + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "4387-Produits \u00e0 recevoir": {} + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (ACTIF)": { + "443-\u00c9tat, TVA factur\u00e9e": { + "4431-TVA factur\u00e9e sur ventes": {}, + "4432-TVA factur\u00e9e sur prestations de services": {}, + "4433-TVA factur\u00e9e sur travaux": {}, + "4434-TVA factur\u00e9e sur production livr\u00e9e \u00e0 soi-m\u00eame": {}, + "4435-TVA sur factures \u00e0 \u00e9tablir": {} + }, + "445-\u00c9tat, TVA r\u00e9cup\u00e9rable": { + "4451-TVA r\u00e9cup\u00e9rable sur immobilisations": {}, + "4452-TVA r\u00e9cup\u00e9rable sur achats": {}, + "4453-TVA r\u00e9cup\u00e9rable sur transport": {}, + "4454-TVA r\u00e9cup\u00e9rable sur services ext\u00e9rieurs et autres charges": {}, + "4455-TVA r\u00e9cup\u00e9rable sur factures non parvenues": {}, + "4456-TVA transf\u00e9r\u00e9e par d\u2019autres entit\u00e9s": {} + }, + "448-\u00c9tat, charges \u00e0 payer et produits \u00e0 recevoir": { + "4486-Charges \u00e0 payer": {}, + "4487-Produits \u00e0 recevoir": {} + }, + "449-\u00c9tat, cr\u00e9ances et dettes diverses": { + "4491-\u00c9tat, obligations cautionn\u00e9es": {}, + "4492-\u00c9tat, avances et acomptes vers\u00e9s sur imp\u00f4ts": {}, + "4493-\u00c9tat, fonds de dotation \u00e0 recevoir": {}, + "4494-\u00c9tat, subventions investissement \u00e0 recevoir": {}, + "4495-\u00c9tat, subventions d\u2019exploitation \u00e0 recevoir": {}, + "4496-\u00c9tat, subventions d\u2019\u00e9quilibre \u00e0 recevoir": {}, + "4497-\u00c9tat, avances sur subventions": {}, + "4499-\u00c9tat, fonds r\u00e9glement\u00e9s provisionn\u00e9s": {} + } + }, + "45-Organismes internationaux (ACTIF)": { + "451-Op\u00e9rations avec les organismes africains": {}, + "452-Op\u00e9rations avec les autres organismes internationaux": {}, + "458-Organismes internationaux, fonds de dotation et subventions \u00e0 recevoir": { + "4581-Organismes internationaux, fonds de dotation \u00e0 recevoir": {}, + "4582-Organismes internationaux, subventions \u00e0 recevoir": {} + } + }, + "46-Apporteurs, associ\u00e9s et groupe (ACTIF)": { + "461-Apporteurs, op\u00e9rations sur le capital": { + "4613-Apporteurs, capital appel\u00e9, non vers\u00e9": {}, + "4614-Apporteurs, compte d\u2019apport, op\u00e9rations de restructuration (fusion...)": {}, + "4618-Apporteurs, titres \u00e0 \u00e9changer": {} + }, + "467-Apporteurs, restant d\u00fb sur capital appel\u00e9": {} + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (ACTIF)": { + "472-Cr\u00e9ances et dettes sur titres de placement": { + "4721-Cr\u00e9ances sur cessions de titres de placement": {}, + "4726-Versements restant \u00e0 effectuer sur titres de placement non lib\u00e9r\u00e9s": {} + }, + "473-Interm\u00e9diaires Op\u00e9rations faites pour compte de tiers": { + "4731-Mandants": {}, + "4732-Mandataires": {}, + "4733-Commettants": {}, + "4734-Commissionnaires": {}, + "4739-\u00c9tat, Collectivit\u00e9s publiques, fonds global d\u2019allocation": {} + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits": { + "4747-Compte de r\u00e9partition p\u00e9riodique des produits": {} + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA": { + "4751-Compte actif": { + "account_type": "Temporary" + } + }, + "476-Charges constat\u00e9es d\u2019avance": {}, + "478-\u00c9carts de conversion actif": { + "4781-Diminution des cr\u00e9ances d\u2019exploitation": {}, + "4782-Diminution des cr\u00e9ances financi\u00e8res": {}, + "4783-Augmentation des dettes d\u2019exploitation": {}, + "4784-Augmentation des dettes financi\u00e8res": {}, + "4786-Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": {}, + "4788-Diff\u00e9rences compens\u00e9es par couverture de change": {} + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (ACTIF)": { + "485-Cr\u00e9ances sur cessions d\u2019immobilisations": { + "4851-En compte, immobilisations incorporelles": {}, + "4852-En compte, immobilisations corporelles": {}, + "4853-Effets \u00e0 recevoir, immobilisations incorporelles": {}, + "4854-Effets \u00e0 recevoir, immobilisations corporelles": {}, + "4855-Effets escompt\u00e9s non \u00e9chus": {}, + "4857-Retenues de garantie": {}, + "4858-Factures \u00e0 \u00e9tablir": {} + }, + "488-Autres cr\u00e9ances hors activit\u00e9s ordinaires (HAO)": {} + }, + "49-D\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme (tiers) (ACTIF)": { + "491-D\u00e9pr\u00e9ciations des comptes clients": { + "4911-Cr\u00e9ances litigieuses": {}, + "4912-Cr\u00e9ances douteuses": {} + }, + "495-D\u00e9pr\u00e9ciations des comptes organismes internationaux": {}, + "496-D\u00e9pr\u00e9ciations des comptes apporteurs, associ\u00e9s et groupe": { + "4962-Associ\u00e9s, comptes courants": {}, + "4963-Associ\u00e9s, op\u00e9rations faites en commun": {}, + "4966-Groupe, comptes courants": {} + }, + "497-D\u00e9pr\u00e9ciations des comptes d\u00e9biteurs divers": {}, + "498-D\u00e9pr\u00e9ciations des comptes de cr\u00e9ances HAO": { + "4985-Cr\u00e9ances sur cessions d\u2019immobilisations": {}, + "4986-Cr\u00e9ances sur cessions de titres de placement": {}, + "4988-Autres cr\u00e9ances HAO": {} + }, + "499-Provisions pour risques \u00e0 court terme": { + "4991-Sur op\u00e9rations d\u2019exploitation": {}, + "4997-Sur op\u00e9rations financi\u00e8res": {}, + "4998-Sur op\u00e9rations HAO": {} + } + }, + "root_type": "Asset" + }, + "4-Comptes de Tiers (PASSIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (PASSIF)": { + "401-Fournisseurs, dettes en compte": { + "4011-Fournisseurs": { + "account_type": "Payable" + }, + "4012-Fournisseurs groupe": { + "account_type": "Payable" + }, + "4013-Fournisseurs sous-traitants": { + "account_type": "Payable" + }, + "4016-Fournisseurs, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Payable" + }, + "4017-Fournisseur, retenues de garantie": { + "account_type": "Payable" + }, + "account_type": "Payable" + }, + "402-Fournisseurs, effets \u00e0 payer": { + "4021-Fournisseurs Effets \u00e0 payer": { + "account_type": "Payable" + }, + "4022-Fournisseurs Groupe, effets \u00e0 payer": { + "account_type": "Payable" + }, + "4023-Fournisseurs Sous-traitants, effets \u00e0 payer": { + "account_type": "Payable" + }, + "account_type": "Payable" + }, + "404-Fournisseurs, acquisitions courantes d\u2019immobilisations": { + "4041-Fournisseurs Dettes en comptes, immobilisations incorporelles": { + "account_type": "Payable" + }, + "4042-Fournisseurs Dettes en comptes, immobilisations corporelles": { + "account_type": "Payable" + }, + "4046-Fournisseurs Effets \u00e0 payer, immobilisations incorporelles": { + "account_type": "Payable" + }, + "4047-Fournisseurs Effets \u00e0 payer, immobilisations corporelles": { + "account_type": "Payable" + }, + "account_type": "Payable" + }, + "408-Fournisseurs, factures non parvenues": { + "4081-Fournisseurs": { + "account_type": "Stock Received But Not Billed" + }, + "4082-Fournisseurs groupe": { + "account_type": "Stock Received But Not Billed" + }, + "4083-Fournisseurs sous-traitants": { + "account_type": "Stock Received But Not Billed" + }, + "4086-Fournisseurs, int\u00e9r\u00eats courus": { + "account_type": "Stock Received But Not Billed" + }, + "account_type": "Stock Received But Not Billed" + }, + "account_type": "Payable" + }, + "41-Clients et comptes rattach\u00e9s (PASSIF)": { + "419-Clients cr\u00e9diteurs": { + "4191-Clients, avances et acomptes re\u00e7us": {}, + "4192-Clients groupe, avances et acomptes re\u00e7us": {}, + "4194-Clients, dettes pour emballages et mat\u00e9riels consign\u00e9s": {}, + "4198-Clients, rabais, remises, ristournes et autres avoirs \u00e0 accorder": {} + } + }, + "42-Personnel (PASSIF)": { + "422-Personnel, r\u00e9mun\u00e9rations dues": {}, + "423-Personnel, oppositions, saisies-arr\u00eats": { + "4231-Personnel, oppositions": {}, + "4232-Personnel, saisies-arr\u00eats": {}, + "4233-Personnel, avis \u00e0 tiers d\u00e9tenteur": {} + }, + "424-Personnel, \u0153uvres sociales internes": { + "4241-Assistance m\u00e9dicale": {}, + "4242-Allocations familiales": {}, + "4245-Organismes sociaux rattach\u00e9s \u00e0 l\u2019entit\u00e9": {}, + "4248-Autres \u0153uvres sociales internes": {} + }, + "425-Repr\u00e9sentants du personnel": { + "4251-D\u00e9l\u00e9gu\u00e9s du personnel": {}, + "4252-Syndicats et Comit\u00e9s d\u2019entreprises, d\u2019\u00c9tablissement": {}, + "4258-Autres repr\u00e9sentants du personnel": {} + }, + "426-Personnel, participation aux b\u00e9n\u00e9fices et au capital": { + "4261-Participation aux b\u00e9n\u00e9fices": {}, + "4264-Participation au capital": {} + }, + "427-Personnel d\u00e9p\u00f4ts": {}, + "428-Personnel, charges \u00e0 payer et produits \u00e0 recevoir": { + "4281-Dettes provisionn\u00e9es pour cong\u00e9s \u00e0 payer": {}, + "4286-Autres charges \u00e0 payer": {}, + "4287-Produits \u00e0 recevoir": {} + } + }, + "43-Organismes sociaux (PASSIF)": { + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "4381-Charges sociales sur gratifications \u00e0 payer": {}, + "4382-Charges sociales sur cong\u00e9s \u00e0 payer": {}, + "4386-Autres charges \u00e0 payer": {} + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (PASSIF)": { + "441-\u00c9tat, imp\u00f4t sur les b\u00e9n\u00e9fices": {}, + "442-\u00c9tat, autres imp\u00f4ts et taxes": { + "4421-Imp\u00f4ts et taxes d\u2019\u00c9tat": {}, + "4422-Imp\u00f4ts et taxes pour les collectivit\u00e9s publiques": {}, + "4423-Imp\u00f4ts et taxes recouvrables sur des obligataires": {}, + "4424-Imp\u00f4ts et taxes recouvrables sur des associ\u00e9s": {}, + "4426-Droits de douane": {}, + "4428-Autres imp\u00f4ts et taxes": {} + }, + "444-\u00c9tat, TVA due ou cr\u00e9dit de TVA": { + "4441-\u00c9tat, TVA due": {}, + "4449-\u00c9tat, cr\u00e9dit de TVA \u00e0 reporter": {} + }, + "446-\u00c9tat, autres taxes sur le chiffre d\u2019affaires": {}, + "447-\u00c9tat, imp\u00f4ts retenus \u00e0 la source": { + "4471-Imp\u00f4t G\u00e9n\u00e9ral sur le revenu": {}, + "4472-Imp\u00f4ts sur salaires": {}, + "4473-Contribution nationale": {}, + "4474-Contribution nationale de solidarit\u00e9": {}, + "4478-Autres imp\u00f4ts et contributions": {} + } + }, + "46-Apporteurs, associ\u00e9s et groupe (PASSIF)": { + "461-Apporteurs, op\u00e9rations sur le capital (PASSIF)": { + "4611-Apporteurs, apports en nature": {}, + "4612-Apporteurs, apports en num\u00e9raire": {}, + "4615-Apporteurs, versements re\u00e7us sur augmentation de capital": {}, + "4616-Apporteurs, versements anticip\u00e9s": {}, + "4617-Apporteurs d\u00e9faillants": {}, + "4619-Apporteurs, capital \u00e0 rembourser": {} + }, + "462-Associ\u00e9s, comptes courants": { + "4621-Principal": {}, + "4626-Int\u00e9r\u00eats courus": {} + }, + "463-Associ\u00e9s, op\u00e9rations faites en commun et GIE": { + "4631-Op\u00e9rations courantes": {}, + "4636-Int\u00e9r\u00eats courus": {} + }, + "465-Associ\u00e9s, dividendes \u00e0 payer": {}, + "466-Groupe, comptes courants": {} + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (PASSIF)": { + "471-D\u00e9biteurs et cr\u00e9diteurs divers": { + "4711-D\u00e9biteurs divers": {}, + "4712-Cr\u00e9diteurs divers": {}, + "4713-Obligataires": {}, + "4715-R\u00e9mun\u00e9rations d\u2019administrateurs": {}, + "4716-Compte d\u2019affacturage": {}, + "4717-D\u00e9biteurs divers retenues de garantie": {}, + "4718-Apport, compte de fusion et op\u00e9rations assimil\u00e9es": {}, + "4719-Bons de souscription d\u2019actions et d\u2019obligations": {} + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits (PASSIF)": { + "4746-Compte de r\u00e9partition p\u00e9riodique des charges": {} + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA (PASSIF)": { + "4752-Compte passif": {} + }, + "477-Produits constat\u00e9s d\u2019avance": {}, + "479-\u00c9carts de conversion passif": { + "4791-Augmentation des cr\u00e9ances d\u2019exploitation": {}, + "4792-Augmentation des cr\u00e9ances financi\u00e8res": {}, + "4793-Diminution des dettes d\u2019exploitation": {}, + "4794-Diminution des dettes financi\u00e8res": {}, + "4797-Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": {}, + "4798-Diff\u00e9rences compens\u00e9es par couverture de change": {} + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (HAO) (PASSIF)": { + "481-Fournisseurs d\u2019investissements": { + "4811-Immobilisations incorporelles": {}, + "4812-Immobilisations corporelles": {}, + "4813-Versements restant \u00e0 effectuer sur titres de participation et titres immobilis\u00e9s non lib\u00e9r\u00e9s": {}, + "4816-R\u00e9serve de propri\u00e9t\u00e9": {}, + "4817-Retenues de garantie": {}, + "4818-Factures non parvenues": {} + }, + "482-Fournisseurs d\u2019investissements, effets \u00e0 payer": { + "4821-Immobilisations incorporelles": {}, + "4822-Immobilisations corporelles": {} + }, + "484-Autres dettes hors activit\u00e9s ordinaires (HAO)": { + "4887-Produits": {} + } + }, + "49-D\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme (tiers) (PASSIF)": { + "490-D\u00e9pr\u00e9ciations des comptes fournisseurs": {}, + "492-D\u00e9pr\u00e9ciations des comptes personnel": {}, + "493-D\u00e9pr\u00e9ciations des comptes organismes sociaux": {}, + "494-D\u00e9pr\u00e9ciations des comptes \u00c9tat et collectivit\u00e9s publiques": {}, + "495-D\u00e9pr\u00e9ciations des comptes organismes internationaux": {} + }, + "root_type": "Liability" + }, + "5-Comptes de tr\u00e9sorerie": { + "50-Titres de placement": { + "501-Titres du tr\u00e9sor et bons de caisse \u00e0 court terme": { + "5011-Titres du Tr\u00e9sor \u00e0 court terme": {}, + "5012-Titres d\u2019organismes financiers": {}, + "5013-Bons de caisse \u00e0 court terme": {}, + "5016-Frais d\u2019acquisition des titres de tr\u00e9sor et bons de caisse": {} + }, + "502-Actions": { + "5021-Actions ou parts propres": {}, + "5022-Actions cot\u00e9es": {}, + "5023-Actions non cot\u00e9es": {}, + "5024-Actions d\u00e9membr\u00e9es (certificats d\u2019investissement, droits de vote)": {}, + "5025-Autres actions": {}, + "5026-Frais d\u2019acquisition des actions": {} + }, + "503-Obligations": { + "5031-Obligations \u00e9mises par la soci\u00e9t\u00e9 et rachet\u00e9es par elle": {}, + "5032-Obligations cot\u00e9es": {}, + "5033-Obligations non cot\u00e9es": {}, + "5035-Autres obligations": {}, + "5036-Frais d\u2019acquisition des obligations": {} + }, + "504-Bons de souscription": { + "5042-Bons de souscription d\u2019actions": {}, + "5043-Bons de souscription d\u2019obligations": {} + }, + "505-Titres n\u00e9gociables hors r\u00e9gion": {}, + "506-Int\u00e9r\u00eats courus": { + "5061-Titres du Tr\u00e9sor et bons de caisse \u00e0 court terme": {}, + "5062-Actions": {}, + "5063-Obligations": {} + }, + "508-Autres titres de placement et cr\u00e9ances assimil\u00e9es": {} + }, + "51-Valeurs \u00e0 encaisser": { + "511-Effets \u00e0 encaisser": {}, + "512-Effets \u00e0 l\u2019encaissement": {}, + "513-Ch\u00e8ques \u00e0 encaisser": {}, + "514-Ch\u00e8ques \u00e0 l\u2019encaissement": {}, + "515-Cartes de cr\u00e9dit \u00e0 encaisser": {}, + "518-Autres valeurs \u00e0 l\u2019encaissement": { + "5181-Warrants": {}, + "5182-Billets de fonds": {}, + "5185-Ch\u00e8ques de voyage": {}, + "5186-Coupons \u00e9chus": {}, + "5187-Int\u00e9r\u00eats \u00e9chus des obligations": {} + } + }, + "52-Banques": { + "521-Banques locales": { + "5211-Banques en monnaie nationale": { + "account_type": "Bank" + }, + "5215-Banques en devises": { + "account_type": "Bank" + }, + "account_type": "Bank" + }, + "522-Banques autres \u00c9tats r\u00e9gion": {}, + "523-Banques autres \u00c9tats zone mon\u00e9taire": {}, + "524-Banques hors zone mon\u00e9taire": {}, + "525-Banques d\u00e9p\u00f4t \u00e0 terme": {}, + "526-Banques, int\u00e9r\u00eats courus": { + "5261-Banque, int\u00e9r\u00eats courus, charges \u00e0 payer": {}, + "5267-Banque, int\u00e9r\u00eats courus, produits \u00e0 recevoir": {} + } + }, + "53-\u00c9tablissements financiers et assimil\u00e9s": { + "531-Ch\u00e8ques postaux": {}, + "532-Tr\u00e9sor": {}, + "533-Soci\u00e9t\u00e9s de gestion et d\u2019interm\u00e9diation (SGI)": {}, + "536-\u00c9tablissements financiers, int\u00e9r\u00eats courus": {}, + "538-Autres organismes financiers": {} + }, + "54-Instruments de tr\u00e9sorerie": { + "541-Options de taux d\u2019int\u00e9r\u00eat": {}, + "542-Options de taux de change": {}, + "543-Options de taux boursiers": {}, + "544-Instruments de march\u00e9s \u00e0 terme": {}, + "545-Avoirs d\u2019or et autres m\u00e9taux pr\u00e9cieux": {} + }, + "55-Instruments de monnaie \u00e9lectronique": { + "551-Monnaie \u00e9lectronique carte carburant": {}, + "552-Monnaie \u00e9lectronique t\u00e9l\u00e9phone portable": {}, + "553-Monnaie \u00e9lectronique carte p\u00e9age": {}, + "554-Porte-monnaie \u00e9lectronique": {}, + "558-Autres instruments de monnaies \u00e9lectroniques": {} + }, + "56-Banques, cr\u00e9dits de tr\u00e9sorerie et d\u2019escompte": { + "561-Cr\u00e9dits de tr\u00e9sorerie": {}, + "564-Escompte de cr\u00e9dits de campagne": {}, + "565-Escompte de cr\u00e9dits ordinaires": {}, + "566-Banques, cr\u00e9dits de tr\u00e9sorerie, int\u00e9r\u00eats courus": {} + }, + "57-Caisse": { + "571-Caisse si\u00e8ge social": { + "5711-Caisse en monnaie nationale": {}, + "5712-Caisse en devises": {} + }, + "572-Caisse succursale A": { + "5721-En monnaie nationale": {}, + "5722-En devises": {} + }, + "573-Caisse succursale B": { + "5731-En monnaie nationale": {}, + "5732-En devises": {} + } + }, + "58-R\u00e9gies d\u2019avances, accr\u00e9ditifs et virements internes": { + "581-R\u00e9gies d\u2019avance": {}, + "582-Accr\u00e9ditifs": {}, + "585-Virements de fonds": {}, + "588-Autres virements internes": {} + }, + "59-D\u00e9pr\u00e9ciations et provisions pour risque \u00e0 court terme": { + "590-D\u00e9pr\u00e9ciations des titres de placement": {}, + "591-D\u00e9pr\u00e9ciations des titres et valeurs \u00e0 encaisser": {}, + "592-D\u00e9pr\u00e9ciations des comptes banques": {}, + "593-D\u00e9pr\u00e9ciations des comptes \u00e9tablissements financiers et assimil\u00e9s": {}, + "594-D\u00e9pr\u00e9ciations des comptes d\u2019instruments de tr\u00e9sorerie": {}, + "599-Provisions pour risque \u00e0 court terme \u00e0 caract\u00e8re financier": {} + }, + "root_type": "Asset" + }, + "6-Comptes de charges des activit\u00e9s ordinaires": { + "60-Achats et variations de stocks": { + "601-Achats de marchandises": { + "6011-Dans la R\u00e9gion": {}, + "6012-Hors R\u00e9gion": {}, + "6013-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "6014-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "6015-Frais sur achats": {}, + "6019-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "602-Achats de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "6021-Dans la R\u00e9gion": {}, + "6022-Hors R\u00e9gion": {}, + "6023-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "6024-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "6025-Frais sur achats": {}, + "6029-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "603-Variations des stocks de biens achet\u00e9s": { + "6031-Variations des stocks de marchandises": {}, + "6032-Variations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": {}, + "6033-Variations des stocks d\u2019autres approvisionnements": {} + }, + "604-Achats stock\u00e9s de mati\u00e8res et fournitures consommables": { + "6041-Mati\u00e8res consommables": {}, + "6042-Mati\u00e8res combustibles": {}, + "6043-Produits d\u2019entretien": {}, + "6044-Fournitures d\u2019atelier et d\u2019usine": {}, + "6045-Frais sur achat": {}, + "6046-Fournitures de magasin": {}, + "6047-Fournitures de bureau": {}, + "6049-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "605-Autres achats": { + "6051-Fournitures non stockables Eau": {}, + "6052-Fournitures non stockables \u00c9lectricit\u00e9": {}, + "6053-Fournitures non stockables Autres \u00e9nergies": {}, + "6054-Fournitures d\u2019entretien non stockables": {}, + "6055-Fournitures de bureau non stockables": {}, + "6056-Achats de petit mat\u00e9riel et outillage": {}, + "6057-Achats d\u2019\u00e9tudes et prestations de services": {}, + "6058-Achats de travaux, mat\u00e9riels et \u00e9quipements": {}, + "6059-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "608-Achats d\u2019emballages": { + "6081-Emballages perdus": {}, + "6082-Emballages r\u00e9cup\u00e9rables non identifiables": {}, + "6083-Emballages \u00e0 usage mixte": {}, + "6085-Frais sur achats": {}, + "6089-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + } + }, + "61-Transports": { + "612-Transports sur ventes": {}, + "613-Transports pour le compte de tiers": {}, + "614-Transports du personnel": {}, + "616-Transports de plis": {}, + "618-Autres frais de transport": { + "6181-Voyages et d\u00e9placements": {}, + "6182-Transports entre \u00e9tablissements ou chantiers": {}, + "6183-Transports administratifs": {} + } + }, + "62-Services ext\u00e9rieurs": { + "621-Sous-traitance g\u00e9n\u00e9rale": {}, + "622-Locations, charges locatives": { + "6221-Locations de terrains": {}, + "6222-Locations de b\u00e2timents": {}, + "6223-Locations de mat\u00e9riels et outillages": {}, + "6224-Malis sur emballages": {}, + "6225-Locations d\u2019emballages": {}, + "6226-Fermages et loyers du foncier": {}, + "6228-Locations et charges locatives diverses": {} + }, + "623-Redevances de location acquisition": { + "6232-Cr\u00e9dit-bail immobilier": {}, + "6233-Cr\u00e9dit-bail mobilier": {}, + "6234-Location-vente": {}, + "6238-Autres contrats de location acquisition": {} + }, + "624-Entretien, r\u00e9parations, remise en \u00e9tat et maintenance": { + "6241-Entretien et r\u00e9parations des biens immobiliers": {}, + "6242-Entretien et r\u00e9parations des biens mobiliers": {}, + "6243-Maintenance": {}, + "6244-Charges de d\u00e9mant\u00e8lement et remise en \u00e9tat": {}, + "6248-Autres entretiens et r\u00e9parations": {} + }, + "625-Primes d\u2019assurance": { + "6251-Assurances multirisques": {}, + "6252-Assurances mat\u00e9riel de transport": {}, + "6253-Assurances risques d\u2019exploitation": {}, + "6254-Assurances responsabilit\u00e9 du producteur": {}, + "6255-Assurances insolvabilit\u00e9 clients": {}, + "6257-Assurances transport sur ventes": {}, + "6258-Autres primes d\u2019assurances": {} + }, + "626-\u00c9tudes, recherches et documentation": { + "6261-\u00c9tudes et recherches": {}, + "6265-Documentation g\u00e9n\u00e9rale": {}, + "6266-Documentation technique": {} + }, + "627-Publicit\u00e9, publications, relations publiques": { + "6271-Annonces, insertions": {}, + "6272-Catalogues, imprim\u00e9s publicitaires": {}, + "6273-\u00c9chantillons": {}, + "6274-Foires et expositions": {}, + "6275-Publications": {}, + "6276-Cadeaux \u00e0 la client\u00e8le": {}, + "6277-Frais de colloques, s\u00e9minaires, conf\u00e9rences": {}, + "6278-Autres charges de publicit\u00e9 et relations publiques": {} + }, + "628-Frais de t\u00e9l\u00e9communications": { + "6281-Frais de t\u00e9l\u00e9phone": {}, + "6282-Frais de t\u00e9lex": {}, + "6283-Frais de t\u00e9l\u00e9copie": {}, + "6288-Autres frais de t\u00e9l\u00e9communications": {} + } + }, + "63-Autres services ext\u00e9rieurs": { + "631-Frais bancaires": { + "6311-Frais sur titres (vente, garde)": {}, + "6312-Frais sur effets": {}, + "6313-Location de coffres": {}, + "6314-Commissions d\u2019affacturage": {}, + "6315-Commissions sur cartes de cr\u00e9dit": {}, + "6316-Frais d\u2019\u00e9mission d\u2019emprunts": {}, + "6317-Frais sur instruments monnaie \u00e9lectronique": {}, + "6318-Autres frais bancaires": {} + }, + "632-R\u00e9mun\u00e9rations d\u2019interm\u00e9diaires et de conseils": { + "6322-Commissions et courtages sur ventes": {}, + "6324-Honoraires des professions r\u00e9glement\u00e9es": {}, + "6325-Frais d\u2019actes et de contentieux": {}, + "6326-R\u00e9mun\u00e9rations d\u2019affacturage": {}, + "6327-R\u00e9mun\u00e9rations des autres prestataires de services": {}, + "6328-Divers frais": {} + }, + "633-Frais de formation du personnel": {}, + "634-Redevances pour brevets, licences, logiciels, concessions et droits et valeurs similaires": { + "6342-Redevances pour brevets, licences": {}, + "6343-Redevances pour logiciels": {}, + "6344-Redevances pour marques": {}, + "6345-Redevances pour sites internet": {}, + "6346-Redevances pour concessions, droits et valeurs similaires": {} + }, + "635-Cotisations": { + "6351-Cotisations": {}, + "6358-Concours divers": {} + }, + "637-R\u00e9mun\u00e9rations de personnel ext\u00e9rieur \u00e0 l\u2019entit\u00e9": { + "6371-Personnel int\u00e9rimaire": {}, + "6372-Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": {} + }, + "638-Autres charges externes": { + "6381-Frais de recrutement du personnel": {}, + "6382-Frais de d\u00e9m\u00e9nagement": {}, + "6383-R\u00e9ceptions": {}, + "6384-Missions": {}, + "6385-Charges de copropri\u00e9t\u00e9": {} + } + }, + "64-Imp\u00f4ts et taxes": { + "641-Imp\u00f4ts et taxes directs": { + "6411-Imp\u00f4ts fonciers et taxes annexes": {}, + "6412-Patentes, licences et taxes annexes": {}, + "6413-Taxes sur appointements et salaires": {}, + "6414-Taxes d\u2019apprentissage": {}, + "6415-Formation professionnelle continue": {}, + "6418-Autres imp\u00f4ts et taxes directs": {} + }, + "645-Imp\u00f4ts et taxes indirects": {}, + "646-Droits d\u2019enregistrement": { + "6461-Droits de mutation": {}, + "6462-Droits de timbre": {}, + "6463-Taxes sur les v\u00e9hicules de soci\u00e9t\u00e9": {}, + "6464-Vignettes": {}, + "6468-Autres droits": {} + }, + "647-P\u00e9nalit\u00e9s, amendes fiscales": { + "6471-P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts directs": {}, + "6472-P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts indirects": {}, + "6473-P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts directs": {}, + "6474-P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts indirects": {}, + "6478-Autres p\u00e9nalit\u00e9s et amendes fiscales": {} + }, + "648-Autres imp\u00f4ts et taxes": {} + }, + "65-Autres charges": { + "651-Pertes sur cr\u00e9ances clients et autres d\u00e9biteurs": { + "6511-Clients": {}, + "6515-Autres d\u00e9biteurs": {} + }, + "652-Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "6521-Quote-part transf\u00e9r\u00e9e de b\u00e9n\u00e9fices (comptabilit\u00e9 du g\u00e9rant)": {}, + "6525-Pertes imput\u00e9es par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": {} + }, + "654-Valeurs comptables des cessions courantes d\u2019immobilisations": { + "6541-Immobilisations incorporelles": {}, + "6542-Immobilisations corporelles": {} + }, + "656-Perte de change sur cr\u00e9ances et dettes commerciale": {}, + "657-P\u00e9nalit\u00e9s et amendes p\u00e9nales": {}, + "658-Charges diverses": { + "6581-Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": {}, + "6582-Dons": {}, + "6583-M\u00e9c\u00e9nat": {}, + "6588-Autres charges diverses": {} + }, + "659-Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "6591-Sur risques \u00e0 court terme": {}, + "6593-Sur stocks": {}, + "6594-Sur cr\u00e9ances": {}, + "6598-Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme": {} + } + }, + "66-Charges de personnel": { + "661-R\u00e9mun\u00e9rations directes vers\u00e9es au personnel national": { + "6611-Appointements salaires et commissions": {}, + "6612-Primes et gratifications": {}, + "6613-Cong\u00e9s pay\u00e9s": {}, + "6614-Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": {}, + "6615-Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": {}, + "6616-Suppl\u00e9ment familial": {}, + "6617-Avantages en nature": {}, + "6618-Autres r\u00e9mun\u00e9rations directes": {} + }, + "662-R\u00e9mun\u00e9rations directes vers\u00e9es au personnel non national": { + "6621-Appointements salaires et commissions": {}, + "6622-Primes et gratifications": {}, + "6623-Cong\u00e9s pay\u00e9s": {}, + "6624-Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": {}, + "6625-Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": {}, + "6626-Suppl\u00e9ment familial": {}, + "6627-Avantages en nature": {}, + "6628-Autres r\u00e9mun\u00e9rations directes": {} + }, + "663-Indemnit\u00e9s forfaitaires vers\u00e9es au personnel": { + "6631-Indemnit\u00e9s de logement": {}, + "6632-Indemnit\u00e9s de repr\u00e9sentation": {}, + "6633-Indemnit\u00e9s d\u2019expatriation": {}, + "6634-Indemnit\u00e9s de transport": {}, + "6638-Autres indemnit\u00e9s et avantages divers": {} + }, + "664-Charges sociales": { + "6641-Charges sociales sur r\u00e9mun\u00e9ration du personnel national": {}, + "6642-Charges sociales sur r\u00e9mun\u00e9ration du personnel non national": {} + }, + "666-R\u00e9mun\u00e9rations et charges sociales de l\u2019exploitant individuel": { + "6661-R\u00e9mun\u00e9ration du travail de l\u2019exploitant": {}, + "6662-Charges sociales": {} + }, + "667-R\u00e9mun\u00e9ration transf\u00e9r\u00e9e de personnel ext\u00e9rieur": { + "6671-Personnel int\u00e9rimaire": {}, + "6672-Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": {} + }, + "668-Autres charges sociales": { + "6681-Versements aux syndicats et comit\u00e9s d\u2019entreprise, d\u2019\u00e9tablissement": {}, + "6682-Versements aux comit\u00e9s d\u2019hygi\u00e8ne et de s\u00e9curit\u00e9": {}, + "6683-Versements et contributions aux autres \u0153uvres sociales": {}, + "6684-M\u00e9decine du travail et pharmacie": {}, + "6685-Assurances et organismes de sant\u00e9": {}, + "6686-Assurances retraite et fonds de pension": {}, + "6687-Majorations et p\u00e9nalit\u00e9s sociales": {}, + "6688-Charges sociales diverses": {} + } + }, + "67-Frais financiers et charges assimil\u00e9es": { + "671-Int\u00e9r\u00eats des emprunts": { + "6711-Emprunts obligataires": {}, + "6712-Emprunts aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": {}, + "6713-Dettes li\u00e9es \u00e0 des participations": {}, + "6714-Primes de remboursement des obligations": {} + }, + "672-Int\u00e9r\u00eats dans loyers de location acquisition": { + "6722-Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail immobilier": {}, + "6723-Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail mobilier": {}, + "6724-Int\u00e9r\u00eats dans loyers de location acquisition / location-vente": {}, + "6728-Int\u00e9r\u00eats dans loyers des autres locations acquisition": {} + }, + "673-Escomptes accord\u00e9s": {}, + "674-Autres int\u00e9r\u00eats": { + "6741-Avances re\u00e7ues et d\u00e9p\u00f4ts cr\u00e9diteurs": {}, + "6742-Comptes courants bloqu\u00e9s": {}, + "6743-Int\u00e9r\u00eats sur obligations cautionn\u00e9es": {}, + "6744-Int\u00e9r\u00eats sur dettes commerciales": {}, + "6745-Int\u00e9r\u00eats bancaires et sur op\u00e9rations de financement (escompte...)": {}, + "6748-Int\u00e9r\u00eats sur dettes diverses": {} + }, + "675-Escomptes des effets de commerce": {}, + "676-Pertes de change financi\u00e8res": {}, + "677-Pertes sur titres de placement": { + "6771-Pertes sur cessions de titres de placement": {}, + "6772-Mali provenant d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": {} + }, + "678-Pertes et charges sur risques financiers": { + "6781-Sur rentes viag\u00e8res": {}, + "6782-Sur op\u00e9rations financi\u00e8res": {}, + "6784-Sur instruments de tr\u00e9sorerie": {} + }, + "679-Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "6791-Sur risques financiers": {}, + "6795-Sur titres de placement": {}, + "6798-Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": {} + } + }, + "68-Dotations aux amortissements": { + "681-Dotations aux amortissements d\u2019exploitation": { + "6812-Dotations aux amortissements des immobilisations incorporelles": {}, + "6813-Dotations aux amortissements des immobilisations corporelles": {} + } + }, + "69-Dotations aux provisions et aux d\u00e9pr\u00e9ciations": { + "691-Dotations aux provisions et aux d\u00e9pr\u00e9ciations d\u2019exploitation": { + "6911-Dotations aux provisions pour risques et charges": {}, + "6913-Dotations aux d\u00e9pr\u00e9ciations des immobilisations incorporelles": {}, + "6914-Dotations aux d\u00e9pr\u00e9ciations des immobilisations corporelles": {} + }, + "697-Dotations aux provisions et aux d\u00e9pr\u00e9ciations financi\u00e8res": { + "6971-Dotations aux provisions pour risques et charges": {}, + "6972-Dotations aux d\u00e9pr\u00e9ciations des immobilisations financi\u00e8res": {} + } + }, + "root_type": "Expense" + }, + "7-Comptes de produits des activit\u00e9s ordinaires": { + "70-Ventes": { + "701-Ventes de marchandises": { + "7011-Dans la R\u00e9gion": {}, + "7012-Hors R\u00e9gion": {}, + "7013-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7014-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7015-Sur internet": {}, + "7019-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "702-Ventes de produits finis": { + "7021-Dans la R\u00e9gion": {}, + "7022-Hors R\u00e9gion": {}, + "7023-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7024-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7025-Sur internet": {}, + "7029-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "703-Ventes de produits interm\u00e9diaires": { + "7031-Dans la R\u00e9gion": {}, + "7032-Hors R\u00e9gion": {}, + "7033-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7034-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7035-Sur internet": {}, + "7039-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "704-Ventes de produits r\u00e9siduels": { + "7041-Dans la R\u00e9gion": {}, + "7042-Hors R\u00e9gion": {}, + "7043-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7044-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7045-Sur internet": {}, + "7049-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "705-Travaux factur\u00e9s": { + "7051-Dans la R\u00e9gion": {}, + "7052-Hors R\u00e9gion": {}, + "7053-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7054-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7055-Sur internet": {}, + "7059-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "706-Services vendus": { + "7061-Dans la R\u00e9gion": {}, + "7062-Hors R\u00e9gion": {}, + "7063-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7064-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7065-Sur internet": {}, + "7069-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "707-Produits accessoires": { + "7071-Ports, emballages perdus et autres frais factur\u00e9s": {}, + "7072-Commissions et courtages": {}, + "7073-Locations": {}, + "7074-Bonis sur reprises et cessions d\u2019emballages": {}, + "7075-Mise \u00e0 disposition de personnel": {}, + "7076-Redevances pour brevets, logiciels, marques et droits similaires": {}, + "7077-Services exploit\u00e9s dans l\u2019int\u00e9r\u00eat du personnel": {}, + "7078-Autres produits accessoires": {} + } + }, + "71-Subventions d\u2019exploitation": { + "711-Sur produits \u00e0 l\u2019exportation": {}, + "712-Sur produits \u00e0 l\u2019importation": {}, + "713-Sur produits de p\u00e9r\u00e9quation": {}, + "714-Indemnit\u00e9s et subventions d\u2019exploitation (entit\u00e9 agricole)": {}, + "718-Autres subventions d\u2019exploitation": { + "7181-Vers\u00e9es par l\u2019\u00c9tat et les collectivit\u00e9s publiques": {}, + "7182-Vers\u00e9es par les organismes internationaux": {}, + "7183-Vers\u00e9es par des tiers": {} + } + }, + "72-Production immobilis\u00e9e": { + "721-Immobilisations incorporelles": {}, + "722-Immobilisations corporelles": { + "7221-Immobilisations corporelles (hors actifs biologiques)": {}, + "7222-Immobilisations corporelles (actifs biologiques)": {} + }, + "724-Production auto-consomm\u00e9e": {}, + "726-Immobilisations financi\u00e8res": {} + }, + "73-Variations des stocks de biens et de services produits": { + "734-Variations des stocks de produits en cours": { + "7341-Produits en cours": {}, + "7342-Travaux en cours": {} + }, + "735-Variations des en-cours de services": { + "7351-\u00c9tudes en cours": {}, + "7352-Prestations de services en cours": {} + }, + "736-Variations des stocks de produits finis": {}, + "737-Variations des stocks de produits interm\u00e9diaires et r\u00e9siduels": { + "7371-Produits interm\u00e9diaires": {}, + "7372-Produits r\u00e9siduels": {} + } + }, + "75-Autres produits": { + "751-Profits sur cr\u00e9ances clients et autres d\u00e9biteurs": {}, + "752-Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "7521-Quote-part transf\u00e9r\u00e9e de pertes (comptabilit\u00e9 du g\u00e9rant)": {}, + "7525-B\u00e9n\u00e9fices attribu\u00e9s par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": {} + }, + "754-Produits des cessions courantes d\u2019immobilisations": { + "7541-Immobilisations incorporelles": {}, + "7542-Immobilisations corporelles": {} + }, + "756-Gains de change sur cr\u00e9ances et dettes commerciales": {}, + "758-Produits divers": { + "7581-Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": {}, + "7582-Indemnit\u00e9s d\u2019assurances re\u00e7ues": {}, + "7588-Autres produits divers": {} + }, + "759-Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "7591-Sur risques \u00e0 court terme": {}, + "7593-Sur stocks": {}, + "7594-Sur cr\u00e9ances": {}, + "7598-Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": {} + } + }, + "77-Revenus financiers et produits assimil\u00e9s": { + "771-Int\u00e9r\u00eats de pr\u00eats et cr\u00e9ances diverses": { + "7712-Int\u00e9r\u00eats de pr\u00eats": {}, + "7713-Int\u00e9r\u00eats sur cr\u00e9ances diverses": {} + }, + "772-Revenus de participations et autres titres immobilis\u00e9s": { + "7721-Revenus des titres de participation": {}, + "7722-Revenus autres titres immobilis\u00e9s": {} + }, + "773-Escomptes obtenus": {}, + "774-Revenus de placement": { + "7745-Revenus des obligations": {}, + "7746-Revenus des titres de placement": {} + }, + "775-Int\u00e9r\u00eats dans loyers de location acquisition": {}, + "776-Gains de change financiers": {}, + "777-Gains sur cessions de titres de placement": {}, + "778-Gains sur risques financiers": { + "7781-Sur rentes viag\u00e8res": {}, + "7782-Sur op\u00e9rations financi\u00e8res": {}, + "7784-Sur instruments de tr\u00e9sorerie": {} + }, + "779-Reprises de charges pour d\u00e9pr\u00e9ciations et provisions \u00e0 court terme financi\u00e8res": { + "7791-Sur risques financiers": {}, + "7795-Sur titres de placement": {}, + "7798-Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": {} + } + }, + "78-Transferts de charges": { + "781-Transferts de charges d\u2019exploitation": {}, + "787-Transferts de charges financi\u00e8res": {} + }, + "79-Reprises de provisions, de d\u00e9pr\u00e9ciations et autres": { + "791-Reprises de provisions et d\u00e9pr\u00e9ciations d\u2019exploitation": { + "7911-Pour risques et charges": {}, + "7913-Des immobilisations incorporelles": {}, + "7914-Des immobilisations corporelles": {} + }, + "797-Reprises de provisions et d\u00e9pr\u00e9ciations financi\u00e8res": { + "7971-Pour risques et charges": {}, + "7972-Des immobilisations financi\u00e8res": {} + }, + "798-Reprises d\u2019amortissements": {}, + "799-Reprises de subventions d\u2019investissement": {} + }, + "root_type": "Income" + }, + "8-Comptes des autres charges et des autres produits (CHARGES)": { + "81-Valeurs comptables des cessions d\u2019immobilisations": { + "811-Immobilisations incorporelles": {}, + "812-Immobilisations corporelles": {}, + "816-Immobilisations financi\u00e8res": {} + }, + "83-Charges hors activit\u00e9s ordinaires": { + "831-Charges HAO constat\u00e9es": {}, + "833-Charges li\u00e9es aux op\u00e9rations de restructuration": {}, + "834-Pertes sur cr\u00e9ances HAO": {}, + "835-Dons et lib\u00e9ralit\u00e9s accord\u00e9s": {}, + "836-Abandons de cr\u00e9ances consentis": {}, + "837-Charges li\u00e9es aux op\u00e9rations de liquidation": {}, + "839-Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": {} + }, + "85-Dotations hors activit\u00e9s ordinaires": { + "851-Dotations aux provisions r\u00e9glement\u00e9es": {}, + "852-Dotations aux amortissements HAO": {}, + "853-Dotations aux d\u00e9pr\u00e9ciations HAO": {}, + "854-Dotations aux provisions pour risques et charges HAO": {}, + "858-Autres dotations HAO": {} + }, + "87-Participation des travailleurs": { + "871-Participation l\u00e9gale aux b\u00e9n\u00e9fices": {}, + "874-Participation contractuelle aux b\u00e9n\u00e9fices": {}, + "878-Autres participations": {} + }, + "89-Imp\u00f4ts sur le r\u00e9sultat": { + "891-Imp\u00f4ts sur les b\u00e9n\u00e9fices de l\u2019exercice": { + "8911-Activit\u00e9s exerc\u00e9es dans l\u2019\u00c9tat": {}, + "8912-Activit\u00e9s exerc\u00e9es dans les autres \u00c9tats de la R\u00e9gion": {}, + "8913-Activit\u00e9s exerc\u00e9es hors R\u00e9gion": {} + }, + "892-Rappel d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": {}, + "895-Imp\u00f4t minimum forfaitaire IMF": {}, + "899-D\u00e9gr\u00e8vements et annulations d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": { + "8991-D\u00e9gr\u00e8vements": {}, + "8994-Annulations pour pertes r\u00e9troactives": {} + } + }, + "root_type": "Expense" + }, + "8-Comptes des autres charges et des autres produits (PRODUITS)": { + "82-Produits des cessions d\u2019immobilisations": { + "821-Immobilisations incorporelles": {}, + "822-Immobilisations corporelles": {}, + "826-Immobilisations financi\u00e8res": {} + }, + "84-Produits hors activit\u00e9s ordinaires": { + "841-Produits HAO constat\u00e9s": {}, + "843-Produits li\u00e9s aux op\u00e9rations de restructuration": {}, + "844-Indemnit\u00e9s et subventions HAO (entit\u00e9 agricole)": {}, + "845-Dons et lib\u00e9ralit\u00e9s obtenus": {}, + "846-Abandons de cr\u00e9ances obtenus": {}, + "847-Produits li\u00e9s aux op\u00e9rations de liquidation": {}, + "848-Transferts de charges HAO": {}, + "849-Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": {} + }, + "86-Reprises de charges, provisions et d\u00e9pr\u00e9ciations HAO": { + "861-Reprises de provisions r\u00e9glement\u00e9es": {}, + "862-Reprises d\u2019amortissements HAO": {}, + "863-Reprises de d\u00e9pr\u00e9ciations HAO": {}, + "864-Reprises de provisions pour risques et charges HAO": {}, + "868-Autres reprises HAO": {} + }, + "88-Subventions d\u2019\u00e9quilibre": { + "881-\u00c9tat": {}, + "884-Collectivit\u00e9s publiques": {}, + "886-Groupe": {}, + "888-Autres": {} + }, + "root_type": "Income" + } + } +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/ml_plan_comptable_avec_code.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/ml_plan_comptable_avec_code.json new file mode 100644 index 00000000000..6cb3e8a1806 --- /dev/null +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/ml_plan_comptable_avec_code.json @@ -0,0 +1,4208 @@ +{ + "country_code": "ml", + "name": "Syscohada - Plan Comptable avec code", + "tree": { + "Comptes de ressources durables": { + "Capital": { + "Capital social": { + "Capital souscrit, non appel\u00e9": { + "account_number": "1011" + }, + "Capital souscrit, appel\u00e9, non vers\u00e9": { + "account_number": "1012" + }, + "Capital souscrit, appel\u00e9, vers\u00e9, non amorti": { + "account_number": "1013" + }, + "Capital souscrit, appel\u00e9, vers\u00e9, amorti": { + "account_number": "1014" + }, + "Capital souscrit soumis \u00e0 des conditions particuli\u00e8res": { + "account_number": "1018" + }, + "account_number": "101" + }, + "Capital par dotation": { + "Dotation initiale": { + "account_number": "1021" + }, + "Dotations compl\u00e9mentaires": { + "account_number": "1022" + }, + "Autres dotations": { + "account_number": "1028" + }, + "account_number": "102" + }, + "Capital personnel": { + "account_number": "103" + }, + "Compte de l\u2019exploitant": { + "Apports temporaires": { + "account_number": "1041" + }, + "Op\u00e9rations courantes": { + "account_number": "1042" + }, + "R\u00e9mun\u00e9rations, imp\u00f4ts et autres charges personnelles": { + "account_number": "1043" + }, + "Pr\u00e9l\u00e8vements d\u2019autoconsommation": { + "account_number": "1047" + }, + "Autres pr\u00e9l\u00e8vements": { + "account_number": "1048" + }, + "account_number": "104" + }, + "Primes li\u00e9es au capital social": { + "Primes d\u2019\u00e9mission": { + "account_number": "1051" + }, + "Primes d\u2019apport": { + "account_number": "1052" + }, + "Primes de fusion": { + "account_number": "1053" + }, + "Primes de conversion": { + "account_number": "1054" + }, + "Autres primes": { + "account_number": "1058" + }, + "account_number": "105" + }, + "\u00c9carts de r\u00e9\u00e9valuation": { + "\u00c9carts de r\u00e9\u00e9valuation l\u00e9gale": { + "account_number": "1061" + }, + "\u00c9carts de r\u00e9\u00e9valuation libre": { + "account_number": "1062" + }, + "account_number": "106" + }, + "Apporteurs, capital souscrit, non appel\u00e9": { + "account_number": "109" + }, + "account_number": "10" + }, + "R\u00e9serves": { + "R\u00e9serve l\u00e9gale": { + "account_number": "111" + }, + "R\u00e9serves statutaires ou contractuelles": { + "account_number": "112" + }, + "R\u00e9serves r\u00e9glement\u00e9es": { + "R\u00e9serves de plus-values nettes \u00e0 long terme": { + "account_number": "1131" + }, + "R\u00e9serves d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": { + "account_number": "1132" + }, + "R\u00e9serves cons\u00e9cutives \u00e0 l\u2019octroi de subventions d\u2019investissement": { + "account_number": "1133" + }, + "R\u00e9serves des valeurs mobili\u00e8res donnant acc\u00e8s au capital": { + "account_number": "1134" + }, + "Autres r\u00e9serves r\u00e9glement\u00e9es": { + "account_number": "1135" + }, + "account_number": "113" + }, + "Autres r\u00e9serves": { + "R\u00e9serves facultatives": { + "account_number": "1181" + }, + "R\u00e9serves diverses": { + "account_number": "1188" + }, + "account_number": "118" + }, + "account_number": "11" + }, + "Report \u00e0 nouveau": { + "Report \u00e0 nouveau cr\u00e9diteur": { + "account_number": "121" + }, + "Report \u00e0 nouveau d\u00e9biteur": { + "Perte nette \u00e0 reporter": { + "account_number": "1291" + }, + "Perte Amortissements r\u00e9put\u00e9s diff\u00e9r\u00e9s": { + "account_number": "1292" + }, + "account_number": "129" + }, + "account_number": "12" + }, + "R\u00e9sultat net de l\u2019exercice": { + "R\u00e9sultat en instance d\u2019affectation": { + "R\u00e9sultat en instance d\u2019affectation : b\u00e9n\u00e9fice": { + "account_number": "1301" + }, + "R\u00e9sultat en instance d\u2019affectation : perte": { + "account_number": "1309" + }, + "account_number": "130" + }, + "R\u00e9sultat net : b\u00e9n\u00e9fice": { + "account_number": "131" + }, + "Marge commerciale (MC)": { + "account_number": "132" + }, + "Valeur ajout\u00e9e (VA)": { + "account_number": "133" + }, + "Exc\u00e9dent brut d\u2019exploitation (EBE)": { + "account_number": "134" + }, + "R\u00e9sultat d\u2019exploitation (RE)": { + "account_number": "135" + }, + "R\u00e9sultat financier (RF)": { + "account_number": "136" + }, + "R\u00e9sultat des activit\u00e9s ordinaires (RAO)": { + "account_number": "137" + }, + "R\u00e9sultat hors activit\u00e9s ordinaires (RHAO)": { + "R\u00e9sultat de fusion": { + "account_number": "1381" + }, + "R\u00e9sultat d\u2019apport partiel d\u2019actif": { + "account_number": "1382" + }, + "R\u00e9sultat de scission": { + "account_number": "1383" + }, + "R\u00e9sultat de liquidation": { + "account_number": "1384" + }, + "account_number": "138" + }, + "R\u00e9sultat net : perte": { + "account_number": "139" + }, + "account_number": "13" + }, + "Subventions d\u2019investissement": { + "Subventions d\u2019\u00e9quipement": { + "\u00c9tat": { + "account_number": "1411" + }, + "R\u00e9gions": { + "account_number": "1412" + }, + "D\u00e9partements": { + "account_number": "1413" + }, + "Communes et collectivit\u00e9s publiques d\u00e9centralis\u00e9es": { + "account_number": "1414" + }, + "Entit\u00e9s publiques ou mixtes": { + "account_number": "1415" + }, + "Entit\u00e9s et organismes priv\u00e9s": { + "account_number": "1416" + }, + "Organismes internationaux": { + "account_number": "1417" + }, + "Autres": { + "account_number": "1418" + }, + "account_number": "141" + }, + "Autres subventions d\u2019investissement": { + "account_number": "148" + }, + "account_number": "14" + }, + "Provisions r\u00e9glement\u00e9es et fonds assimil\u00e9s": { + "Amortissements d\u00e9rogatoires": { + "account_number": "151" + }, + "Plus-values de cession \u00e0 r\u00e9investir": { + "account_number": "152" + }, + "Fonds r\u00e9glement\u00e9s": { + "Fonds National": { + "account_number": "1531" + }, + "Pr\u00e9l\u00e8vement pour le Budget": { + "account_number": "1532" + }, + "account_number": "153" + }, + "Provisions sp\u00e9ciales de r\u00e9\u00e9valuation": { + "account_number": "154" + }, + "Provisions r\u00e9glement\u00e9es relatives aux immobilisations": { + "Reconstitution des gisements miniers et p\u00e9troliers": { + "account_number": "1551" + }, + "account_number": "155" + }, + "Provisions r\u00e9glement\u00e9es relatives aux stocks": { + "Hausse de prix": { + "account_number": "1561" + }, + "Fluctuation des cours": { + "account_number": "1562" + }, + "account_number": "156" + }, + "Provisions pour investissement": { + "account_number": "157" + }, + "Autres provisions et fonds r\u00e9glement\u00e9s": { + "account_number": "158" + }, + "account_number": "15" + }, + "Emprunts et dettes assimil\u00e9es": { + "Emprunts obligataires": { + "Emprunts obligataires ordinaires": { + "account_number": "1611" + }, + "Emprunts obligataires convertibles en actions": { + "account_number": "1612" + }, + "Emprunts obligataires remboursables en actions": { + "account_number": "1613" + }, + "Autres emprunts obligataires": { + "account_number": "1618" + }, + "account_number": "161" + }, + "Emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": { + "account_number": "162" + }, + "Avances re\u00e7ues de l\u2019\u00c9tat": { + "account_number": "163" + }, + "Avances re\u00e7ues et comptes courants bloqu\u00e9s": { + "account_number": "164" + }, + "D\u00e9p\u00f4ts et cautionnements re\u00e7us": { + "D\u00e9p\u00f4ts": { + "account_number": "1651" + }, + "Cautionnements": { + "account_number": "1652" + }, + "account_number": "165" + }, + "Int\u00e9r\u00eats courus": { + "Sur emprunts obligataires": { + "account_number": "1661" + }, + "Sur emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": { + "account_number": "1662" + }, + "Sur avances re\u00e7ues de l\u2019\u00c9tat": { + "account_number": "1663" + }, + "Sur avances re\u00e7ues et comptes courants bloqu\u00e9s": { + "account_number": "1664" + }, + "Sur d\u00e9p\u00f4ts et cautionnements re\u00e7us": { + "account_number": "1665" + }, + "Sur avances assorties de conditions particuli\u00e8res": { + "account_number": "1667" + }, + "Sur autres emprunts et dettes": { + "account_number": "1668" + }, + "account_number": "166" + }, + "Avances assorties de conditions particuli\u00e8res": { + "Avances bloqu\u00e9es pour augmentation du capital": { + "account_number": "1671" + }, + "Avances conditionn\u00e9es par l\u2019\u00c9tat": { + "account_number": "1672" + }, + "Avances conditionn\u00e9es par les autres organismes africains": { + "account_number": "1673" + }, + "Avances conditionn\u00e9es par les organismes internationaux": { + "account_number": "1674" + }, + "account_number": "167" + }, + "Autres emprunts et dettes": { + "Rentes viag\u00e8res capitalis\u00e9es": { + "account_number": "1681" + }, + "Billets de fonds": { + "account_number": "1682" + }, + "Dettes cons\u00e9cutives \u00e0 des titres emprunt\u00e9s": { + "account_number": "1683" + }, + "Emprunts participatifs": { + "account_number": "1684" + }, + "Participation des travailleurs aux b\u00e9n\u00e9fices": { + "account_number": "1685" + }, + "Emprunts et dettes contract\u00e9s aupr\u00e8s des autres tiers": { + "account_number": "1686" + }, + "account_number": "168" + }, + "account_number": "16" + }, + "Dettes de location acquisition": { + "Dettes de location acquisition / cr\u00e9dit bail immobilier": { + "account_number": "172" + }, + "Dettes de location acquisition / cr\u00e9dit bail mobilier": { + "account_number": "173" + }, + "Dettes de location acquisition / location de vente": { + "account_number": "174" + }, + "Int\u00e9r\u00eats courus": { + "Sur dettes de location acquisition / cr\u00e9dit-bail immobilier": { + "account_number": "1762" + }, + "Sur dettes de location acquisition / cr\u00e9dit-bail mobilier": { + "account_number": "1763" + }, + "Sur dettes de location acquisition / location-vente": { + "account_number": "1764" + }, + "Sur autres dettes de location acquisition": { + "account_number": "1768" + }, + "account_number": "176" + }, + "Autres dettes de location acquisition": { + "account_number": "178" + }, + "account_number": "17" + }, + "Dettes li\u00e9es \u00e0 des participations et comptes de liaison des \u00e9tablissements et soci\u00e9t\u00e9s en participation": { + "Dettes li\u00e9es \u00e0 des participations": { + "Dettes li\u00e9es \u00e0 des participations (groupe)": { + "account_number": "1811" + }, + "Dettes li\u00e9es \u00e0 des participations (hors groupe)": { + "account_number": "1812" + }, + "account_number": "181" + }, + "Dettes li\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": { + "account_number": "182" + }, + "Int\u00e9r\u00eats courus sur dettes li\u00e9es \u00e0 des participations": { + "account_number": "183" + }, + "Comptes permanents bloqu\u00e9s des \u00e9tablissements et succursales": { + "account_number": "184" + }, + "Comptes permanents non bloqu\u00e9s des \u00e9tablissements et succursales": { + "account_number": "185" + }, + "Comptes de liaison charges": { + "account_number": "186" + }, + "Comptes de liaison produits": { + "account_number": "187" + }, + "Comptes de liaison des soci\u00e9t\u00e9s en participation": { + "account_number": "188" + }, + "account_number": "18" + }, + "Provisions pour risques et charges": { + "Provisions pour litiges": { + "account_number": "191" + }, + "Provisions pour garanties donn\u00e9es aux clients": { + "account_number": "192" + }, + "Provisions pour pertes sur march\u00e9s \u00e0 ach\u00e8vement futur": { + "account_number": "193" + }, + "Provisions pour pertes de change": { + "account_number": "194" + }, + "Provisions pour imp\u00f4ts": { + "account_number": "195" + }, + "Provisions pour pensions et obligations similaires": { + "Provisions pour pensions et obligations similaires engagement de retraite": { + "account_number": "1961" + }, + "Actif du r\u00e9gime de retraite": { + "account_number": "1962" + }, + "account_number": "196" + }, + "Provisions pour restructuration": { + "account_number": "197" + }, + "Autres provisions pour risques et charges": { + "Provisions pour amendes et p\u00e9nalit\u00e9s": { + "account_number": "1981" + }, + "Provisions pour propre assureur": { + "account_number": "1983" + }, + "Provisions pour d\u00e9mant\u00e8lement et remise en \u00e9tat": { + "account_number": "1984" + }, + "Provisions pour droits \u00e0 r\u00e9duction ou avantage en nature (ch\u00e8ques cadeau, cartes de fid\u00e9lit\u00e9...)": { + "account_number": "1985" + }, + "Provisions pour divers risques et charges": { + "account_number": "1988" + }, + "account_number": "198" + }, + "account_number": "19" + }, + "root_type": "Equity", + "account_number": "1" + }, + "Comptes d\u2019actif immobilis\u00e9": { + "Immobilisations incorporelles": { + "account_type": "Fixed Asset", + "Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset", + "account_number": "211" + }, + "Brevets, licences, concessions et droits similaires": { + "account_type": "Fixed Asset", + "Brevets": { + "account_type": "Fixed Asset", + "account_number": "2121" + }, + "Licences": { + "account_type": "Fixed Asset", + "account_number": "2122" + }, + "Concessions de service public": { + "account_type": "Fixed Asset", + "account_number": "2123" + }, + "Autres concessions et droits similaires": { + "account_type": "Fixed Asset", + "account_number": "2128" + }, + "account_number": "212" + }, + "Logiciels et sites internet": { + "account_type": "Fixed Asset", + "Logiciels": { + "account_type": "Fixed Asset", + "account_number": "2131" + }, + "Sites internet": { + "account_type": "Fixed Asset", + "account_number": "2132" + }, + "account_number": "213" + }, + "Marques": { + "account_type": "Fixed Asset", + "account_number": "214" + }, + "Fonds commercial": { + "account_type": "Fixed Asset", + "account_number": "215" + }, + "Droit au bail": { + "account_type": "Fixed Asset", + "account_number": "216" + }, + "Investissements de cr\u00e9ation": { + "account_type": "Fixed Asset", + "account_number": "217" + }, + "Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset", + "Frais de prospection et d\u2019\u00e9valuation de ressources min\u00e9rales": { + "account_type": "Fixed Asset", + "account_number": "2181" + }, + "Co\u00fbts d\u2019obtention du contrat": { + "account_type": "Fixed Asset", + "account_number": "2182" + }, + "Fichiers clients, notices, titres de journaux et magazines": { + "account_type": "Fixed Asset", + "account_number": "2183" + }, + "Co\u00fbts des franchises": { + "account_type": "Fixed Asset", + "account_number": "2184" + }, + "Divers droits et valeurs incorporelles": { + "account_type": "Fixed Asset", + "account_number": "2188" + }, + "account_number": "218" + }, + "Immobilisations incorporelles en cours": { + "account_type": "Fixed Asset", + "Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset", + "account_number": "2191" + }, + "Logiciels et internet": { + "account_type": "Fixed Asset", + "account_number": "2193" + }, + "Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset", + "account_number": "2198" + }, + "account_number": "219" + }, + "account_number": "21" + }, + "Terrains": { + "account_type": "Fixed Asset", + "Terrains agricoles et forestiers": { + "account_type": "Fixed Asset", + "Terrains d\u2019exploitation agricole": { + "account_type": "Fixed Asset", + "account_number": "2211" + }, + "Terrains d\u2019exploitation foresti\u00e8re": { + "account_type": "Fixed Asset", + "account_number": "2212" + }, + "Autres terrains": { + "account_type": "Fixed Asset", + "account_number": "2218" + }, + "account_number": "221" + }, + "Terrains nus": { + "account_type": "Fixed Asset", + "Terrains \u00e0 b\u00e2tir": { + "account_type": "Fixed Asset", + "account_number": "2221" + }, + "Autres terrains nus": { + "account_type": "Fixed Asset", + "account_number": "2228" + }, + "account_number": "222" + }, + "Terrains b\u00e2tis": { + "account_type": "Fixed Asset", + "Pour b\u00e2timents industriels et agricoles": { + "account_type": "Fixed Asset", + "account_number": "2231" + }, + "Pour b\u00e2timents administratifs et commerciaux": { + "account_type": "Fixed Asset", + "account_number": "2232" + }, + "Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations professionnelles": { + "account_type": "Fixed Asset", + "account_number": "2234" + }, + "Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations non professionnelles": { + "account_type": "Fixed Asset", + "account_number": "2235" + }, + "Autres terrains b\u00e2tis": { + "account_type": "Fixed Asset", + "account_number": "2238" + }, + "account_number": "223" + }, + "Travaux de mise en valeur des terrains": { + "account_type": "Fixed Asset", + "Plantation d\u2019arbres et d\u2019arbustes": { + "account_type": "Fixed Asset", + "account_number": "2241" + }, + "Am\u00e9liorations du fonds": { + "account_type": "Fixed Asset", + "account_number": "2245" + }, + "Autres travaux": { + "account_type": "Fixed Asset", + "account_number": "2248" + }, + "account_number": "224" + }, + "Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset", + "Carri\u00e8res": { + "account_type": "Fixed Asset", + "account_number": "2251" + }, + "account_number": "225" + }, + "Terrains am\u00e9nag\u00e9s": { + "account_type": "Fixed Asset", + "Parkings": { + "account_type": "Fixed Asset", + "account_number": "2261" + }, + "account_number": "226" + }, + "Terrains mis en concession": { + "account_type": "Fixed Asset", + "account_number": "227" + }, + "Autres terrains": { + "account_type": "Fixed Asset", + "Terrains immeubles de placement": { + "account_type": "Fixed Asset", + "account_number": "2281" + }, + "Terrains des logements affect\u00e9s au personnel": { + "account_type": "Fixed Asset", + "account_number": "2285" + }, + "Terrains de location acquisition": { + "account_type": "Fixed Asset", + "account_number": "2286" + }, + "Divers terrains": { + "account_type": "Fixed Asset", + "account_number": "2288" + }, + "account_number": "228" + }, + "Am\u00e9nagements de terrains en cours": { + "account_type": "Fixed Asset", + "Terrains agricoles et forestiers": { + "account_type": "Fixed Asset", + "account_number": "2291" + }, + "Terrains nus": { + "account_type": "Fixed Asset", + "account_number": "2292" + }, + "Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset", + "account_number": "2295" + }, + "Autres terrains": { + "account_type": "Fixed Asset", + "account_number": "2298" + }, + "account_number": "229" + }, + "account_number": "22" + }, + "B\u00e2timents, installations techniques et agencements": { + "B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "B\u00e2timents industriels": { + "account_number": "2311" + }, + "B\u00e2timents agricoles": { + "account_number": "2312" + }, + "B\u00e2timents administratifs et commerciaux": { + "account_number": "2313" + }, + "B\u00e2timents affect\u00e9s au logement du personnel": { + "account_number": "2314" + }, + "B\u00e2timents immeubles de placement": { + "account_number": "2315" + }, + "B\u00e2timents de location acquisition": { + "account_number": "2316" + }, + "account_number": "231" + }, + "B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "B\u00e2timents industriels": { + "account_number": "2321" + }, + "B\u00e2timents agricoles": { + "account_number": "2322" + }, + "B\u00e2timents administratifs et commerciaux": { + "account_number": "2323" + }, + "B\u00e2timents affect\u00e9s au logement du personnel": { + "account_number": "2324" + }, + "B\u00e2timents immeubles de placement": { + "account_number": "2325" + }, + "B\u00e2timents de location acquisition": { + "account_number": "2326" + }, + "account_number": "232" + }, + "Ouvrages d\u2019infrastructure": { + "Voies de terre": { + "account_number": "2331" + }, + "Voies de fer": { + "account_number": "2332" + }, + "Voies d\u2019eau": { + "account_number": "2333" + }, + "Barrages, Digues": { + "account_number": "2334" + }, + "Pistes d\u2019a\u00e9rodrome": { + "account_number": "2335" + }, + "Autres ouvrages d\u2019infrastructures": { + "account_number": "2338" + }, + "account_number": "233" + }, + "Am\u00e9nagements, agencements et installations techniques": { + "Installations complexes sp\u00e9cialis\u00e9es sur sol propre": { + "account_number": "2341" + }, + "Installations complexes sp\u00e9cialis\u00e9es sur sol d\u2019autrui": { + "account_number": "2342" + }, + "Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol propre": { + "account_number": "2343" + }, + "Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol d\u2019autrui": { + "account_number": "2344" + }, + "Am\u00e9nagements et agencements des b\u00e2timents": { + "account_number": "2345" + }, + "account_number": "234" + }, + "Am\u00e9nagements de bureaux": { + "Installations g\u00e9n\u00e9rales": { + "account_number": "2351" + }, + "Autres am\u00e9nagements de bureaux": { + "account_number": "2358" + }, + "account_number": "235" + }, + "B\u00e2timents industriels, agricoles et commerciaux mis en concession": { + "account_number": "237" + }, + "Autres installations et agencements": { + "account_number": "238" + }, + "B\u00e2timents am\u00e9nagements, agencements et installations en cours": { + "B\u00e2timents en cours": { + "account_number": "2391" + }, + "Installations en cours": { + "account_number": "2392" + }, + "Ouvrages d\u2019infrastructure en cours": { + "account_number": "2393" + }, + "Am\u00e9nagements et agencements et installations techniques en cours": { + "account_number": "2394" + }, + "Am\u00e9nagements de bureaux en cours": { + "account_number": "2395" + }, + "Autres installations et agencements en cours": { + "account_number": "2398" + }, + "account_number": "239" + }, + "account_number": "23" + }, + "Mat\u00e9riel, mobilier et actifs biologiques": { + "Mat\u00e9riel et outillage industriel et commercial": { + "Mat\u00e9riel industriel": { + "account_number": "2411" + }, + "Outillage industriel": { + "account_number": "2412" + }, + "Mat\u00e9riel commercial": { + "account_number": "2413" + }, + "Outillage commercial": { + "account_number": "2414" + }, + "Mat\u00e9riel & outillage industriel et commercial de location-acquisition": { + "account_number": "2416" + }, + "account_number": "241" + }, + "Mat\u00e9riel et outillage agricole": { + "Mat\u00e9riel agricole": { + "account_number": "2421" + }, + "Outillage agricole": { + "account_number": "2422" + }, + "Mat\u00e9riel & outillage agricole de location-acquisition": { + "account_number": "2426" + }, + "account_number": "242" + }, + "Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "243" + }, + "Mat\u00e9riel et mobilier": { + "Mat\u00e9riel de bureau": { + "account_number": "2441" + }, + "Mat\u00e9riel informatique": { + "account_number": "2442" + }, + "Mat\u00e9riel bureautique": { + "account_number": "2443" + }, + "Mobilier de bureau": { + "account_number": "2444" + }, + "Mat\u00e9riel et mobilier immeubles de placement": { + "account_number": "2445" + }, + "Mat\u00e9riel et mobilier de location acquisition": { + "account_number": "2446" + }, + "Mat\u00e9riel et mobilier des logements du personnel": { + "account_number": "2447" + }, + "account_number": "244" + }, + "Mat\u00e9riel de transport": { + "Mat\u00e9riel automobile": { + "account_number": "2451" + }, + "Mat\u00e9riel ferroviaire": { + "account_number": "2452" + }, + "Mat\u00e9riel fluvial, lagunaire": { + "account_number": "2453" + }, + "Mat\u00e9riel naval": { + "account_number": "2454" + }, + "Mat\u00e9riel a\u00e9rien": { + "account_number": "2455" + }, + "Mat\u00e9riel de transport de location-acquisition": { + "account_number": "2456" + }, + "Mat\u00e9riel hippomobile": { + "account_number": "2457" + }, + "Autres mat\u00e9riels de transport": { + "account_number": "2458" + }, + "account_number": "245" + }, + "Actifs biologiques": { + "Cheptel, animaux de trait": { + "account_number": "2461" + }, + "Cheptel, animaux reproducteurs": { + "account_number": "2462" + }, + "Animaux de garde": { + "account_number": "2463" + }, + "Plantations agricoles": { + "account_number": "2465" + }, + "Autres actifs biologiques": { + "account_number": "2468" + }, + "account_number": "246" + }, + "Agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "Agencements et am\u00e9nagements du mat\u00e9riel": { + "account_number": "2471" + }, + "Agencements et am\u00e9nagements des actifs biologiques": { + "account_number": "2472" + }, + "Autres agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "account_number": "2478" + }, + "account_number": "247" + }, + "Autres mat\u00e9riels et mobiliers": { + "Collections et \u0153uvres d\u2019art": { + "account_number": "2481" + }, + "Divers mat\u00e9riels mobiliers": { + "account_number": "2488" + }, + "account_number": "248" + }, + "Mat\u00e9riels et actifs biologiques en cours": { + "Mat\u00e9riel et outillage industriel et commercial": { + "account_number": "2491" + }, + "Mat\u00e9riel et outillage agricole": { + "account_number": "2492" + }, + "Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "2493" + }, + "Mat\u00e9riel et mobilier de bureau": { + "account_number": "2494" + }, + "Mat\u00e9riel de transport": { + "account_number": "2495" + }, + "Actifs biologiques": { + "account_number": "2496" + }, + "Agencements am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "account_number": "2497" + }, + "Autres mat\u00e9riels et actifs biologiques en cours": { + "account_number": "2498" + }, + "account_number": "249" + }, + "account_number": "24" + }, + "Avances et acomptes vers\u00e9s sur immobilisations": { + "Avances et acomptes vers\u00e9s sur immobilisations incorporelles": { + "account_number": "251" + }, + "Avances et acomptes vers\u00e9s sur immobilisations corporelles": { + "account_number": "252" + }, + "account_number": "25" + }, + "Titres de participation": { + "Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": { + "account_number": "261" + }, + "Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le conjoint": { + "account_number": "262" + }, + "Titres de participation dans des soci\u00e9t\u00e9s conf\u00e9rant une influence notable": { + "account_number": "263" + }, + "Participations dans des organismes professionnels": { + "account_number": "265" + }, + "Parts dans des groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": { + "account_number": "266" + }, + "Autres titres de participation": { + "account_number": "268" + }, + "account_number": "26" + }, + "Autres immobilisations financi\u00e8res": { + "Pr\u00eats et cr\u00e9ances": { + "Pr\u00eats participatifs": { + "account_number": "2711" + }, + "Pr\u00eats aux associ\u00e9s": { + "account_number": "2712" + }, + "Billets de fonds": { + "account_number": "2713" + }, + "Titres pr\u00eat\u00e9s": { + "account_number": "2714" + }, + "Autres pr\u00eats et cr\u00e9ances": { + "account_number": "2718" + }, + "account_number": "271" + }, + "Pr\u00eats au personnel": { + "Pr\u00eats immobiliers": { + "account_number": "2721" + }, + "Pr\u00eats mobiliers et d\u2019installation": { + "account_number": "2722" + }, + "Autres pr\u00eats au personnel": { + "account_number": "2728" + }, + "account_number": "272" + }, + "Cr\u00e9ances sur l\u2019\u00c9tat": { + "Retenues de garantie": { + "account_number": "2731" + }, + "Fonds r\u00e9glement\u00e9": { + "account_number": "2733" + }, + "Cr\u00e9ances sur le conc\u00e9dant": { + "account_number": "2734" + }, + "Autres cr\u00e9ances sur l\u2019\u00c9tat": { + "account_number": "2738" + }, + "account_number": "273" + }, + "Titres immobilis\u00e9s": { + "Titres immobilis\u00e9s de l\u2019activit\u00e9 de portefeuille (TIAP)": { + "account_number": "2741" + }, + "Titres participatifs": { + "account_number": "2742" + }, + "Certificats d\u2019investissement": { + "account_number": "2743" + }, + "Parts de fonds commun de placement (FCP)": { + "account_number": "2744" + }, + "Obligations": { + "account_number": "2745" + }, + "Actions ou parts propres": { + "account_number": "2746" + }, + "Autres titres immobilis\u00e9s": { + "account_number": "2748" + }, + "account_number": "274" + }, + "D\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "D\u00e9p\u00f4ts pour loyers d\u2019avance": { + "account_number": "2751" + }, + "D\u00e9p\u00f4ts pour l\u2019\u00e9lectricit\u00e9": { + "account_number": "2752" + }, + "D\u00e9p\u00f4ts pour l\u2019eau": { + "account_number": "2753" + }, + "D\u00e9p\u00f4ts pour le gaz": { + "account_number": "2754" + }, + "D\u00e9p\u00f4ts pour le t\u00e9l\u00e9phone, le t\u00e9lex, la t\u00e9l\u00e9copie": { + "account_number": "2755" + }, + "Cautionnements sur march\u00e9s publics": { + "account_number": "2756" + }, + "Cautionnements sur autres op\u00e9rations": { + "account_number": "2757" + }, + "Autres d\u00e9p\u00f4ts et cautionnements": { + "account_number": "2758" + }, + "account_number": "275" + }, + "Int\u00e9r\u00eats courus": { + "Pr\u00eats et cr\u00e9ances non commerciales": { + "account_number": "2761" + }, + "Pr\u00eats au personnel": { + "account_number": "2762" + }, + "Cr\u00e9ances sur l\u2019\u00c9tat": { + "account_number": "2763" + }, + "Titres immobilis\u00e9s": { + "account_number": "2764" + }, + "D\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "account_number": "2765" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations": { + "account_number": "2767" + }, + "Immobilisations financi\u00e8res diverses": { + "account_number": "2768" + }, + "account_number": "276" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": { + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations (groupe)": { + "account_number": "2771" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations (hors groupe)": { + "account_number": "2772" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": { + "account_number": "2773" + }, + "Avances \u00e0 des Groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": { + "account_number": "2774" + }, + "account_number": "277" + }, + "Immobilisations financi\u00e8res diverses": { + "Cr\u00e9ances diverses groupe": { + "account_number": "2781" + }, + "Cr\u00e9ances diverses hors groupe": { + "account_number": "2782" + }, + "Banques d\u00e9p\u00f4ts \u00e0 terme": { + "account_number": "2784" + }, + "Or et m\u00e9taux pr\u00e9cieux": { + "account_number": "2785" + }, + "Autres immobilisations financi\u00e8res": { + "account_number": "2788" + }, + "account_number": "278" + }, + "account_number": "27" + }, + "Amortissements": { + "account_type": "Accumulated Depreciation", + "Amortissements des immobilisations corporelles": { + "account_type": "Accumulated Depreciation", + "Amortissements des frais de d\u00e9veloppement": { + "account_type": "Accumulated Depreciation", + "account_number": "2811" + }, + "Amortissements des brevets, licences, concessions et droits similaires": { + "account_type": "Accumulated Depreciation", + "account_number": "2812" + }, + "Amortissements des logiciels et sites internet": { + "account_type": "Accumulated Depreciation", + "account_number": "2813" + }, + "Amortissements des marques": { + "account_type": "Accumulated Depreciation", + "account_number": "2814" + }, + "Amortissements du fonds commercial": { + "account_type": "Accumulated Depreciation", + "account_number": "2815" + }, + "Amortissements du droit au bail": { + "account_type": "Accumulated Depreciation", + "account_number": "2816" + }, + "Amortissements des investissements de cr\u00e9ation": { + "account_type": "Accumulated Depreciation", + "account_number": "2817" + }, + "Amortissements des autres droits et valeurs incorporels": { + "account_type": "Accumulated Depreciation", + "account_number": "2818" + }, + "account_number": "281" + }, + "Amortissements des terrains": { + "Amortissements des travaux de mise en valeur des terrains": { + "account_number": "2824" + }, + "account_number": "282" + }, + "Amortissements des b\u00e2timents, installations techniques et agencements": { + "Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "account_number": "2831" + }, + "Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "account_number": "2832" + }, + "Amortissements des ouvrages d\u2019infrastructure": { + "account_number": "2833" + }, + "Amortissements des am\u00e9nagements, agencements et installations techniques": { + "account_number": "2834" + }, + "Amortissements des am\u00e9nagements de bureaux": { + "account_number": "2835" + }, + "Amortissements des b\u00e2timents industriels, agricoles et commerciaux mis en concession": { + "account_number": "2837" + }, + "Amortissements des autres installations et agencements": { + "account_number": "2838" + }, + "account_number": "283" + }, + "Amortissements du mat\u00e9riel": { + "Amortissements du mat\u00e9riel et outillage industriel et commercial": { + "account_number": "2841" + }, + "Amortissements du mat\u00e9riel et outillage agricole": { + "account_number": "2842" + }, + "Amortissements du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "2843" + }, + "Amortissements du mat\u00e9riel et mobilier": { + "account_number": "2844" + }, + "Amortissements du mat\u00e9riel de transport": { + "account_number": "2845" + }, + "Amortissements des actifs biologiques": { + "account_number": "2846" + }, + "Amortissements des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": { + "account_number": "2847" + }, + "Amortissements des autres mat\u00e9riels": { + "account_number": "2848" + }, + "account_number": "284" + }, + "account_number": "28" + }, + "D\u00e9pr\u00e9ciations des immobilisations": { + "D\u00e9pr\u00e9ciations des immobilisations incorporelles": { + "D\u00e9pr\u00e9ciations des frais de d\u00e9veloppement": { + "account_number": "2911" + }, + "D\u00e9pr\u00e9ciations des brevets, licences, concessions et droits similaires": { + "account_number": "2912" + }, + "D\u00e9pr\u00e9ciations des logiciels et sites internet": { + "account_number": "2913" + }, + "D\u00e9pr\u00e9ciations des marques": { + "account_number": "2914" + }, + "D\u00e9pr\u00e9ciations du fonds commercial": { + "account_number": "2915" + }, + "D\u00e9pr\u00e9ciations du droit au bail": { + "account_number": "2916" + }, + "D\u00e9pr\u00e9ciations des investissements de cr\u00e9ation": { + "account_number": "2917" + }, + "D\u00e9pr\u00e9ciations des autres droits et valeurs incorporels": { + "account_number": "2918" + }, + "D\u00e9pr\u00e9ciations des immobilisations incorporelles en cours": { + "account_number": "2919" + }, + "account_number": "291" + }, + "D\u00e9pr\u00e9ciations des terrains": { + "D\u00e9pr\u00e9ciations des terrains agricoles et forestiers": { + "account_number": "2921" + }, + "D\u00e9pr\u00e9ciations des terrains nus": { + "account_number": "2922" + }, + "D\u00e9pr\u00e9ciations des terrains b\u00e2tis": { + "account_number": "2923" + }, + "D\u00e9pr\u00e9ciations des travaux de mise en valeur des terrains": { + "account_number": "2924" + }, + "D\u00e9pr\u00e9ciations des terrains de gisement": { + "account_number": "2925" + }, + "D\u00e9pr\u00e9ciations des terrains am\u00e9nag\u00e9s": { + "account_number": "2926" + }, + "D\u00e9pr\u00e9ciations des terrains mis en concession": { + "account_number": "2927" + }, + "D\u00e9pr\u00e9ciations des autres terrains": { + "account_number": "2928" + }, + "D\u00e9pr\u00e9ciations des am\u00e9nagements de terrains en cours": { + "account_number": "2929" + }, + "account_number": "292" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents, installations techniques et agencements": { + "D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "account_number": "2931" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "account_number": "2932" + }, + "D\u00e9pr\u00e9ciations des ouvrages d\u2019infrastructures": { + "account_number": "2933" + }, + "D\u00e9pr\u00e9ciations des am\u00e9nagements, agencements et installations techniques": { + "account_number": "2934" + }, + "D\u00e9pr\u00e9ciations des am\u00e9nagements de bureaux": { + "account_number": "2935" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles et commerciaux mis en concession": { + "account_number": "2937" + }, + "D\u00e9pr\u00e9ciations des autres installations et agencements": { + "account_number": "2938" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents et installations en cours": { + "account_number": "2939" + }, + "account_number": "293" + }, + "D\u00e9pr\u00e9ciations de mat\u00e9riel, du mobilier et de l\u2019actif biologique": { + "D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage industriel et commercial": { + "account_number": "2941" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage agricole": { + "account_number": "2942" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "2943" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel et mobilier": { + "account_number": "2944" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel de transport": { + "account_number": "2945" + }, + "D\u00e9pr\u00e9ciations des actifs biologiques": { + "account_number": "2946" + }, + "D\u00e9pr\u00e9ciations des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": { + "account_number": "2947" + }, + "D\u00e9pr\u00e9ciations des autres mat\u00e9riels": { + "account_number": "2948" + }, + "D\u00e9pr\u00e9ciations de mat\u00e9riel en cours": { + "account_number": "2949" + }, + "account_number": "294" + }, + "D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations": { + "D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations incorporelles": { + "account_number": "2951" + }, + "D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations corporelles": { + "account_number": "2952" + }, + "account_number": "295" + }, + "D\u00e9pr\u00e9ciations des titres de participation": { + "D\u00e9pr\u00e9ciations des titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": { + "account_number": "2961" + }, + "D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s sous contr\u00f4le conjoint": { + "account_number": "2962" + }, + "D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s conf\u00e9rant une influence notable": { + "account_number": "2963" + }, + "D\u00e9pr\u00e9ciations des participations dans des organismes professionnels": { + "account_number": "2965" + }, + "D\u00e9pr\u00e9ciations des parts dans des GIE": { + "account_number": "2966" + }, + "D\u00e9pr\u00e9ciations des autres titres de participation": { + "account_number": "2968" + }, + "account_number": "296" + }, + "D\u00e9pr\u00e9ciations des autres immobilisations financi\u00e8res": { + "D\u00e9pr\u00e9ciations des pr\u00eats et cr\u00e9ances": { + "account_number": "2971" + }, + "D\u00e9pr\u00e9ciations des pr\u00eats au personnel": { + "account_number": "2972" + }, + "D\u00e9pr\u00e9ciations des cr\u00e9ances sur l\u2019\u00c9tat": { + "account_number": "2973" + }, + "D\u00e9pr\u00e9ciations des titres immobilis\u00e9s": { + "account_number": "2974" + }, + "D\u00e9pr\u00e9ciations des d\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "account_number": "2975" + }, + "D\u00e9pr\u00e9ciations des cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": { + "account_number": "2977" + }, + "D\u00e9pr\u00e9ciations des cr\u00e9ances financi\u00e8res diverses": { + "account_number": "2978" + }, + "account_number": "297" + }, + "account_number": "29" + }, + "root_type": "Asset", + "account_number": "2" + }, + "Comptes de Stocks": { + "Marchandises": { + "Marchandises A": { + "Marchandises A1": { + "account_number": "3111" + }, + "Marchandises A2": { + "account_number": "3112" + }, + "account_number": "311" + }, + "Marchandises B": { + "Marchandises B1": { + "account_number": "3121" + }, + "Marchandises B2": { + "account_number": "3122" + }, + "account_number": "312" + }, + "Actifs biologiques": { + "Animaux": { + "account_number": "3131" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3132" + }, + "account_number": "313" + }, + "Marchandises hors activit\u00e9s ordinaires (HAO)": { + "account_number": "318" + }, + "account_number": "31" + }, + "Mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "Mati\u00e8res A": { + "account_number": "321" + }, + "Mati\u00e8res B": { + "account_number": "322" + }, + "Fournitures (A, B)": { + "account_number": "323" + }, + "account_number": "32" + }, + "Autres approvisionnements": { + "Mati\u00e8res consommables": { + "account_number": "331" + }, + "Fournitures d\u2019atelier et d\u2019usine": { + "account_number": "332" + }, + "Fournitures de magasin": { + "account_number": "333" + }, + "Fournitures de bureau": { + "account_number": "334" + }, + "Emballages": { + "Emballages perdus": { + "account_number": "3351" + }, + "Emballages r\u00e9cup\u00e9rables non identifiables": { + "account_number": "3352" + }, + "Emballages \u00e0 usage mixte": { + "account_number": "3353" + }, + "Autres emballages": { + "account_number": "3358" + }, + "account_number": "335" + }, + "Autres mati\u00e8res": { + "account_number": "338" + }, + "account_number": "33" + }, + "Produits en cours": { + "Produits en cours": { + "Produits en cours P1": { + "account_number": "3411" + }, + "Produits en cours P2": { + "account_number": "3412" + }, + "account_number": "341" + }, + "Travaux en cours": { + "Travaux en cours T1": { + "account_number": "3421" + }, + "Travaux en cours T2": { + "account_number": "3422" + }, + "account_number": "342" + }, + "Produits interm\u00e9diaires en cours": { + "Produits interm\u00e9diaires A": { + "account_number": "3431" + }, + "Produits interm\u00e9diaires B": { + "account_number": "3432" + }, + "account_number": "343" + }, + "Produits r\u00e9siduels en cours": { + "Produits r\u00e9siduels A": { + "account_number": "3441" + }, + "Produits r\u00e9siduels B": { + "account_number": "3442" + }, + "account_number": "344" + }, + "Actifs biologiques en cours": { + "Animaux": { + "account_number": "3451" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3452" + }, + "account_number": "345" + }, + "account_number": "34" + }, + "Services en cours": { + "\u00c9tudes en cours": { + "\u00c9tudes en cours E1": { + "account_number": "3511" + }, + "\u00c9tudes en cours E2": { + "account_number": "3512" + }, + "account_number": "351" + }, + "Prestations de services en cours": { + "Prestations de services S1": { + "account_number": "3521" + }, + "Prestations de services S2": { + "account_number": "3522" + } + }, + "account_number": "35" + }, + "Produits finis": { + "Produits finis A": { + "account_number": "361" + }, + "Produits finis B": { + "account_number": "362" + }, + "Actifs biologiques": { + "Animaux": { + "account_number": "3631" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3632" + }, + "Autres stocks (activit\u00e9s annexes)": { + "account_number": "3638" + }, + "account_number": "363" + }, + "account_number": "36" + }, + "Produits interm\u00e9diaires et r\u00e9siduels": { + "Produits interm\u00e9diaires": { + "Produits interm\u00e9diaires A": { + "account_number": "3711" + }, + "Produits interm\u00e9diaires B": { + "account_number": "3712" + }, + "account_number": "371" + }, + "Produits r\u00e9siduels": { + "D\u00e9chets": { + "account_number": "3721" + }, + "Rebuts": { + "account_number": "3722" + }, + "Mati\u00e8res de R\u00e9cup\u00e9ration": { + "account_number": "3723" + }, + "account_number": "372" + }, + "Actifs biologiques": { + "Animaux": { + "account_number": "3731" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3732" + }, + "Autres stocks (activit\u00e9s annexes)": { + "account_number": "3738" + }, + "account_number": "373" + }, + "account_number": "37" + }, + "Stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": { + "account_type": "Stock", + "Marchandises en cours de route": { + "account_number": "381" + }, + "Mati\u00e8res premi\u00e8res et fournitures li\u00e9es en cours de route": { + "account_number": "382" + }, + "Autres approvisionnements en cours de route": { + "account_number": "383" + }, + "Produits finis en cours de route": { + "account_number": "386" + }, + "Stock en consignation ou en d\u00e9p\u00f4t": { + "Stock en consignation": { + "account_number": "3871" + }, + "Stock en d\u00e9p\u00f4t": { + "account_number": "3872" + }, + "account_number": "387" + }, + "Stock provenant d\u2019immobilisations mises hors service ou au rebut": { + "account_number": "388" + }, + "account_number": "38" + }, + "D\u00e9pr\u00e9ciations des stocks et encours de production": { + "D\u00e9pr\u00e9ciations des stocks de marchandises": { + "account_number": "391" + }, + "D\u00e9pr\u00e9ciations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "account_number": "392" + }, + "D\u00e9pr\u00e9ciations des stocks d\u2019autres approvisionnements": { + "account_number": "393" + }, + "D\u00e9pr\u00e9ciations des productions en cours": { + "account_number": "394" + }, + "D\u00e9pr\u00e9ciations des services en cours": { + "account_number": "395" + }, + "D\u00e9pr\u00e9ciations des stocks de produits finis": { + "account_number": "396" + }, + "D\u00e9pr\u00e9ciations des stocks de produits interm\u00e9diaires et r\u00e9siduels": { + "account_number": "397" + }, + "D\u00e9pr\u00e9ciations des stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": { + "account_number": "398" + }, + "account_number": "39" + }, + "root_type": "Asset", + "account_number": "3" + }, + "4-Comptes de Tiers (ACTIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (ACTIF)": { + "Fournisseurs d\u00e9biteurs": { + "Fournisseurs Avances et acomptes vers\u00e9s": { + "account_number": "4091" + }, + "Fournisseurs Groupe avances et acomptes vers\u00e9s": { + "account_number": "4092" + }, + "Fournisseurs Sous-traitants avances et acomptes vers\u00e9s": { + "account_number": "4093" + }, + "Fournisseurs Cr\u00e9ances pour emballages et mat\u00e9riels \u00e0 rendre": { + "account_number": "4094" + }, + "Fournisseurs Rabais, remises, ristournes et autres avoirs \u00e0 obtenir": { + "account_number": "4098" + }, + "account_number": "409" + } + }, + "41-Clients et comptes rattach\u00e9s (ACTIF)": { + "Clients": { + "Clients": { + "account_type": "Receivable", + "account_number": "4111" + }, + "Clients groupe": { + "account_type": "Receivable", + "account_number": "4112" + }, + "Clients, \u00c9tat et Collectivit\u00e9s publiques": { + "account_type": "Receivable", + "account_number": "4114" + }, + "Clients, organismes internationaux": { + "account_type": "Receivable", + "account_number": "4115" + }, + "Clients, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Receivable", + "account_number": "4116" + }, + "Client, retenues de garantie": { + "account_type": "Receivable", + "account_number": "4117" + }, + "Clients, d\u00e9gr\u00e8vement de taxes sur la valeur ajout\u00e9e (TVA)": { + "account_type": "Receivable", + "account_number": "4118" + }, + "account_type": "Receivable", + "account_number": "411" + }, + "Clients, effets \u00e0 recevoir en portefeuille": { + "Clients, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4121" + }, + "Clients Groupe, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4122" + }, + "\u00c9tat et Collectivit\u00e9s publiques, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4124" + }, + "Organismes Internationaux, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4125" + }, + "account_type": "Receivable", + "account_number": "412" + }, + "Clients, ch\u00e8ques, effets et autres valeurs impay\u00e9es": { + "Clients, ch\u00e8ques impay\u00e9s": { + "account_type": "Receivable", + "account_number": "4131" + }, + "Clients, effets impay\u00e9s": { + "account_type": "Receivable", + "account_number": "4132" + }, + "Clients, cartes de cr\u00e9dit impay\u00e9es": { + "account_type": "Receivable", + "account_number": "4133" + }, + "Clients, autres valeurs impay\u00e9es": { + "account_type": "Receivable", + "account_number": "4138" + }, + "account_type": "Receivable", + "account_number": "413" + }, + "Cr\u00e9ances sur cessions courantes d\u2019immobilisations": { + "Cr\u00e9ances en compte, immobilisations incorporelles": { + "account_type": "Receivable", + "account_number": "4141" + }, + "Cr\u00e9ances en compte, immobilisations corporelles": { + "account_type": "Receivable", + "account_number": "4142" + }, + "Effets \u00e0 recevoir, immobilisations incorporelles": { + "account_type": "Receivable", + "account_number": "4146" + }, + "Effets \u00e0 recevoir, immobilisations corporelles": { + "account_type": "Receivable", + "account_number": "4147" + }, + "account_type": "Receivable", + "account_number": "414" + }, + "Clients, effets escompt\u00e9s non \u00e9chus": { + "account_type": "Receivable", + "account_number": "415" + }, + "Cr\u00e9ances clients litigieuses ou douteuses": { + "Cr\u00e9ances litigieuses": { + "account_type": "Receivable", + "account_number": "4161" + }, + "Cr\u00e9ances douteuses": { + "account_type": "Receivable", + "account_number": "4162" + }, + "account_type": "Receivable", + "account_number": "416" + }, + "Clients, produits \u00e0 recevoir": { + "Clients, factures \u00e0 \u00e9tablir": { + "account_type": "Receivable", + "account_number": "4181" + }, + "Clients, int\u00e9r\u00eats courus": { + "account_type": "Receivable", + "account_number": "4186" + }, + "account_type": "Receivable", + "account_number": "418" + }, + "account_type": "Receivable" + }, + "42-Personnel (ACTIF)": { + "Personnel, avances et acomptes": { + "Personnel, avances": { + "account_number": "4211" + }, + "Personnel, acomptes": { + "account_number": "4212" + }, + "Frais avanc\u00e9s et fournitures au personnel": { + "account_number": "4213" + }, + "account_number": "421" + } + }, + "43-Organismes sociaux (ACTIF)": { + "431-S\u00e9curit\u00e9 sociale": { + "Prestations familiales": { + "account_number": "4311" + }, + "Accidents de travail": { + "account_number": "4312" + }, + "Caisse de retraite obligatoire": { + "account_number": "4313" + }, + "Caisse de retraite facultative": { + "account_number": "4314" + }, + "Autres cotisations sociales": { + "account_number": "4318" + } + }, + "432-Caisses de retraite compl\u00e9mentaire": {}, + "433-Autres organismes sociaux": { + "Mutuelle": { + "account_number": "4331" + }, + "Assurances retraite": { + "account_number": "4332" + }, + "Assurances et organismes de sant\u00e9": { + "account_number": "4333" + } + }, + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "Produits \u00e0 recevoir": { + "account_number": "4387" + } + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (ACTIF)": { + "\u00c9tat, TVA factur\u00e9e": { + "TVA factur\u00e9e sur ventes": { + "account_number": "4431" + }, + "TVA factur\u00e9e sur prestations de services": { + "account_number": "4432" + }, + "TVA factur\u00e9e sur travaux": { + "account_number": "4433" + }, + "TVA factur\u00e9e sur production livr\u00e9e \u00e0 soi-m\u00eame": { + "account_number": "4434" + }, + "TVA sur factures \u00e0 \u00e9tablir": { + "account_number": "4435" + }, + "account_number": "443" + }, + "\u00c9tat, TVA r\u00e9cup\u00e9rable": { + "TVA r\u00e9cup\u00e9rable sur immobilisations": { + "account_number": "4451" + }, + "TVA r\u00e9cup\u00e9rable sur achats": { + "account_number": "4452" + }, + "TVA r\u00e9cup\u00e9rable sur transport": { + "account_number": "4453" + }, + "TVA r\u00e9cup\u00e9rable sur services ext\u00e9rieurs et autres charges": { + "account_number": "4454" + }, + "TVA r\u00e9cup\u00e9rable sur factures non parvenues": { + "account_number": "4455" + }, + "TVA transf\u00e9r\u00e9e par d\u2019autres entit\u00e9s": { + "account_number": "4456" + }, + "account_number": "445" + }, + "\u00c9tat, charges \u00e0 payer et produits \u00e0 recevoir": { + "Charges \u00e0 payer": { + "account_number": "4486" + }, + "Produits \u00e0 recevoir": { + "account_number": "4487" + }, + "account_number": "448" + }, + "\u00c9tat, cr\u00e9ances et dettes diverses": { + "\u00c9tat, obligations cautionn\u00e9es": { + "account_number": "4491" + }, + "\u00c9tat, avances et acomptes vers\u00e9s sur imp\u00f4ts": { + "account_number": "4492" + }, + "\u00c9tat, fonds de dotation \u00e0 recevoir": { + "account_number": "4493" + }, + "\u00c9tat, subventions investissement \u00e0 recevoir": { + "account_number": "4494" + }, + "\u00c9tat, subventions d\u2019exploitation \u00e0 recevoir": { + "account_number": "4495" + }, + "\u00c9tat, subventions d\u2019\u00e9quilibre \u00e0 recevoir": { + "account_number": "4496" + }, + "\u00c9tat, avances sur subventions": { + "account_number": "4497" + }, + "\u00c9tat, fonds r\u00e9glement\u00e9s provisionn\u00e9s": { + "account_number": "4499" + }, + "account_number": "449" + } + }, + "45-Organismes internationaux (ACTIF)": { + "Op\u00e9rations avec les organismes africains": { + "account_number": "451" + }, + "Op\u00e9rations avec les autres organismes internationaux": { + "account_number": "452" + }, + "Organismes internationaux, fonds de dotation et subventions \u00e0 recevoir": { + "Organismes internationaux, fonds de dotation \u00e0 recevoir": { + "account_number": "4581" + }, + "Organismes internationaux, subventions \u00e0 recevoir": { + "account_number": "4582" + }, + "account_number": "458" + } + }, + "46-Apporteurs, associ\u00e9s et groupe (ACTIF)": { + "461-Apporteurs, op\u00e9rations sur le capital": { + "Apporteurs, capital appel\u00e9, non vers\u00e9": { + "account_number": "4613" + }, + "Apporteurs, compte d\u2019apport, op\u00e9rations de restructuration (fusion...)": { + "account_number": "4614" + }, + "Apporteurs, titres \u00e0 \u00e9changer": { + "account_number": "4618" + } + }, + "Apporteurs, restant d\u00fb sur capital appel\u00e9": { + "account_number": "467" + } + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (ACTIF)": { + "472-Cr\u00e9ances et dettes sur titres de placement": { + "Cr\u00e9ances sur cessions de titres de placement": { + "account_number": "4721" + }, + "Versements restant \u00e0 effectuer sur titres de placement non lib\u00e9r\u00e9s": { + "account_number": "4726" + } + }, + "473-Interm\u00e9diaires Op\u00e9rations faites pour compte de tiers": { + "Mandants": { + "account_number": "4731" + }, + "Mandataires": { + "account_number": "4732" + }, + "Commettants": { + "account_number": "4733" + }, + "Commissionnaires": { + "account_number": "4734" + }, + "\u00c9tat, Collectivit\u00e9s publiques, fonds global d\u2019allocation": { + "account_number": "4739" + } + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits": { + "Compte de r\u00e9partition p\u00e9riodique des produits": { + "account_number": "4747" + } + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA": { + "Compte actif": { + "account_type": "Temporary", + "account_number": "4751" + } + }, + "Charges constat\u00e9es d\u2019avance": { + "account_number": "476" + }, + "478-\u00c9carts de conversion actif": { + "Diminution des cr\u00e9ances d\u2019exploitation": { + "account_number": "4781" + }, + "Diminution des cr\u00e9ances financi\u00e8res": { + "account_number": "4782" + }, + "Augmentation des dettes d\u2019exploitation": { + "account_number": "4783" + }, + "Augmentation des dettes financi\u00e8res": { + "account_number": "4784" + }, + "Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": { + "account_number": "4786" + }, + "Diff\u00e9rences compens\u00e9es par couverture de change": { + "account_number": "4788" + } + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (ACTIF)": { + "Cr\u00e9ances sur cessions d\u2019immobilisations": { + "En compte, immobilisations incorporelles": { + "account_number": "4851" + }, + "En compte, immobilisations corporelles": { + "account_number": "4852" + }, + "Effets \u00e0 recevoir, immobilisations incorporelles": { + "account_number": "4853" + }, + "Effets \u00e0 recevoir, immobilisations corporelles": { + "account_number": "4854" + }, + "Effets escompt\u00e9s non \u00e9chus": { + "account_number": "4855" + }, + "Retenues de garantie": { + "account_number": "4857" + }, + "Factures \u00e0 \u00e9tablir": { + "account_number": "4858" + }, + "account_number": "485" + }, + "Autres cr\u00e9ances hors activit\u00e9s ordinaires (HAO)": { + "account_number": "488" + } + }, + "49-D\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme (tiers) (ACTIF)": { + "D\u00e9pr\u00e9ciations des comptes clients": { + "Cr\u00e9ances litigieuses": { + "account_number": "4911" + }, + "Cr\u00e9ances douteuses": { + "account_number": "4912" + }, + "account_number": "491" + }, + "D\u00e9pr\u00e9ciations des comptes organismes internationaux": { + "account_number": "495" + }, + "D\u00e9pr\u00e9ciations des comptes apporteurs, associ\u00e9s et groupe": { + "Associ\u00e9s, comptes courants": { + "account_number": "4962" + }, + "Associ\u00e9s, op\u00e9rations faites en commun": { + "account_number": "4963" + }, + "Groupe, comptes courants": { + "account_number": "4966" + }, + "account_number": "496" + }, + "D\u00e9pr\u00e9ciations des comptes d\u00e9biteurs divers": { + "account_number": "497" + }, + "D\u00e9pr\u00e9ciations des comptes de cr\u00e9ances HAO": { + "Cr\u00e9ances sur cessions d\u2019immobilisations": { + "account_number": "4985" + }, + "Cr\u00e9ances sur cessions de titres de placement": { + "account_number": "4986" + }, + "Autres cr\u00e9ances HAO": { + "account_number": "4988" + }, + "account_number": "498" + }, + "Provisions pour risques \u00e0 court terme": { + "Sur op\u00e9rations d\u2019exploitation": { + "account_number": "4991" + }, + "Sur op\u00e9rations financi\u00e8res": { + "account_number": "4997" + }, + "Sur op\u00e9rations HAO": { + "account_number": "4998" + }, + "account_number": "499" + } + }, + "root_type": "Asset" + }, + "4-Comptes de Tiers (PASSIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (PASSIF)": { + "Fournisseurs, dettes en compte": { + "Fournisseurs": { + "account_type": "Payable", + "account_number": "4011" + }, + "Fournisseurs groupe": { + "account_type": "Payable", + "account_number": "4012" + }, + "Fournisseurs sous-traitants": { + "account_type": "Payable", + "account_number": "4013" + }, + "Fournisseurs, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Payable", + "account_number": "4016" + }, + "Fournisseur, retenues de garantie": { + "account_type": "Payable", + "account_number": "4017" + }, + "account_type": "Payable", + "account_number": "401" + }, + "Fournisseurs, effets \u00e0 payer": { + "Fournisseurs Effets \u00e0 payer": { + "account_type": "Payable", + "account_number": "4021" + }, + "Fournisseurs Groupe, effets \u00e0 payer": { + "account_type": "Payable", + "account_number": "4022" + }, + "Fournisseurs Sous-traitants, effets \u00e0 payer": { + "account_type": "Payable", + "account_number": "4023" + }, + "account_type": "Payable", + "account_number": "402" + }, + "Fournisseurs, acquisitions courantes d\u2019immobilisations": { + "Fournisseurs Dettes en comptes, immobilisations incorporelles": { + "account_type": "Payable", + "account_number": "4041" + }, + "Fournisseurs Dettes en comptes, immobilisations corporelles": { + "account_type": "Payable", + "account_number": "4042" + }, + "Fournisseurs Effets \u00e0 payer, immobilisations incorporelles": { + "account_type": "Payable", + "account_number": "4046" + }, + "Fournisseurs Effets \u00e0 payer, immobilisations corporelles": { + "account_type": "Payable", + "account_number": "4047" + }, + "account_type": "Payable", + "account_number": "404" + }, + "Fournisseurs, factures non parvenues": { + "Fournisseurs": { + "account_type": "Stock Received But Not Billed", + "account_number": "4081" + }, + "Fournisseurs groupe": { + "account_type": "Stock Received But Not Billed", + "account_number": "4082" + }, + "Fournisseurs sous-traitants": { + "account_type": "Stock Received But Not Billed", + "account_number": "4083" + }, + "Fournisseurs, int\u00e9r\u00eats courus": { + "account_type": "Stock Received But Not Billed", + "account_number": "4086" + }, + "account_type": "Stock Received But Not Billed", + "account_number": "408" + }, + "account_type": "Payable" + }, + "41-Clients et comptes rattach\u00e9s (PASSIF)": { + "Clients cr\u00e9diteurs": { + "Clients, avances et acomptes re\u00e7us": { + "account_number": "4191" + }, + "Clients groupe, avances et acomptes re\u00e7us": { + "account_number": "4192" + }, + "Clients, dettes pour emballages et mat\u00e9riels consign\u00e9s": { + "account_number": "4194" + }, + "Clients, rabais, remises, ristournes et autres avoirs \u00e0 accorder": { + "account_number": "4198" + }, + "account_number": "419" + } + }, + "42-Personnel (PASSIF)": { + "Personnel, r\u00e9mun\u00e9rations dues": { + "account_number": "422" + }, + "Personnel, oppositions, saisies-arr\u00eats": { + "Personnel, oppositions": { + "account_number": "4231" + }, + "Personnel, saisies-arr\u00eats": { + "account_number": "4232" + }, + "Personnel, avis \u00e0 tiers d\u00e9tenteur": { + "account_number": "4233" + }, + "account_number": "423" + }, + "Personnel, \u0153uvres sociales internes": { + "Assistance m\u00e9dicale": { + "account_number": "4241" + }, + "Allocations familiales": { + "account_number": "4242" + }, + "Organismes sociaux rattach\u00e9s \u00e0 l\u2019entit\u00e9": { + "account_number": "4245" + }, + "Autres \u0153uvres sociales internes": { + "account_number": "4248" + }, + "account_number": "424" + }, + "Repr\u00e9sentants du personnel": { + "D\u00e9l\u00e9gu\u00e9s du personnel": { + "account_number": "4251" + }, + "Syndicats et Comit\u00e9s d\u2019entreprises, d\u2019\u00c9tablissement": { + "account_number": "4252" + }, + "Autres repr\u00e9sentants du personnel": { + "account_number": "4258" + }, + "account_number": "425" + }, + "Personnel, participation aux b\u00e9n\u00e9fices et au capital": { + "Participation aux b\u00e9n\u00e9fices": { + "account_number": "4261" + }, + "Participation au capital": { + "account_number": "4264" + }, + "account_number": "426" + }, + "Personnel d\u00e9p\u00f4ts": { + "account_number": "427" + }, + "Personnel, charges \u00e0 payer et produits \u00e0 recevoir": { + "Dettes provisionn\u00e9es pour cong\u00e9s \u00e0 payer": { + "account_number": "4281" + }, + "Autres charges \u00e0 payer": { + "account_number": "4286" + }, + "Produits \u00e0 recevoir": { + "account_number": "4287" + }, + "account_number": "428" + } + }, + "43-Organismes sociaux (PASSIF)": { + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "Charges sociales sur gratifications \u00e0 payer": { + "account_number": "4381" + }, + "Charges sociales sur cong\u00e9s \u00e0 payer": { + "account_number": "4382" + }, + "Autres charges \u00e0 payer": { + "account_number": "4386" + } + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (PASSIF)": { + "\u00c9tat, imp\u00f4t sur les b\u00e9n\u00e9fices": { + "account_number": "441" + }, + "\u00c9tat, autres imp\u00f4ts et taxes": { + "Imp\u00f4ts et taxes d\u2019\u00c9tat": { + "account_number": "4421" + }, + "Imp\u00f4ts et taxes pour les collectivit\u00e9s publiques": { + "account_number": "4422" + }, + "Imp\u00f4ts et taxes recouvrables sur des obligataires": { + "account_number": "4423" + }, + "Imp\u00f4ts et taxes recouvrables sur des associ\u00e9s": { + "account_number": "4424" + }, + "Droits de douane": { + "account_number": "4426" + }, + "Autres imp\u00f4ts et taxes": { + "account_number": "4428" + }, + "account_number": "442" + }, + "\u00c9tat, TVA due ou cr\u00e9dit de TVA": { + "\u00c9tat, TVA due": { + "account_number": "4441" + }, + "\u00c9tat, cr\u00e9dit de TVA \u00e0 reporter": { + "account_number": "4449" + }, + "account_number": "444" + }, + "\u00c9tat, autres taxes sur le chiffre d\u2019affaires": { + "account_number": "446" + }, + "\u00c9tat, imp\u00f4ts retenus \u00e0 la source": { + "Imp\u00f4t G\u00e9n\u00e9ral sur le revenu": { + "account_number": "4471" + }, + "Imp\u00f4ts sur salaires": { + "account_number": "4472" + }, + "Contribution nationale": { + "account_number": "4473" + }, + "Contribution nationale de solidarit\u00e9": { + "account_number": "4474" + }, + "Autres imp\u00f4ts et contributions": { + "account_number": "4478" + }, + "account_number": "447" + } + }, + "46-Apporteurs, associ\u00e9s et groupe (PASSIF)": { + "461-Apporteurs, op\u00e9rations sur le capital (PASSIF)": { + "Apporteurs, apports en nature": { + "account_number": "4611" + }, + "Apporteurs, apports en num\u00e9raire": { + "account_number": "4612" + }, + "Apporteurs, versements re\u00e7us sur augmentation de capital": { + "account_number": "4615" + }, + "Apporteurs, versements anticip\u00e9s": { + "account_number": "4616" + }, + "Apporteurs d\u00e9faillants": { + "account_number": "4617" + }, + "Apporteurs, capital \u00e0 rembourser": { + "account_number": "4619" + } + }, + "462-Associ\u00e9s, comptes courants": { + "Principal": { + "account_number": "4621" + }, + "Int\u00e9r\u00eats courus": { + "account_number": "4626" + } + }, + "463-Associ\u00e9s, op\u00e9rations faites en commun et GIE": { + "Op\u00e9rations courantes": { + "account_number": "4631" + }, + "Int\u00e9r\u00eats courus": { + "account_number": "4636" + } + }, + "Associ\u00e9s, dividendes \u00e0 payer": { + "account_number": "465" + }, + "Groupe, comptes courants": { + "account_number": "466" + } + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (PASSIF)": { + "471-D\u00e9biteurs et cr\u00e9diteurs divers": { + "D\u00e9biteurs divers": { + "account_number": "4711" + }, + "Cr\u00e9diteurs divers": { + "account_number": "4712" + }, + "Obligataires": { + "account_number": "4713" + }, + "R\u00e9mun\u00e9rations d\u2019administrateurs": { + "account_number": "4715" + }, + "Compte d\u2019affacturage": { + "account_number": "4716" + }, + "D\u00e9biteurs divers retenues de garantie": { + "account_number": "4717" + }, + "Apport, compte de fusion et op\u00e9rations assimil\u00e9es": { + "account_number": "4718" + }, + "Bons de souscription d\u2019actions et d\u2019obligations": { + "account_number": "4719" + } + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits (PASSIF)": { + "Compte de r\u00e9partition p\u00e9riodique des charges": { + "account_number": "4746" + } + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA (PASSIF)": { + "Compte passif": { + "account_number": "4752" + } + }, + "Produits constat\u00e9s d\u2019avance": { + "account_number": "477" + }, + "479-\u00c9carts de conversion passif": { + "Augmentation des cr\u00e9ances d\u2019exploitation": { + "account_number": "4791" + }, + "Augmentation des cr\u00e9ances financi\u00e8res": { + "account_number": "4792" + }, + "Diminution des dettes d\u2019exploitation": { + "account_number": "4793" + }, + "Diminution des dettes financi\u00e8res": { + "account_number": "4794" + }, + "Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": { + "account_number": "4797" + }, + "Diff\u00e9rences compens\u00e9es par couverture de change": { + "account_number": "4798" + } + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (HAO) (PASSIF)": { + "Fournisseurs d\u2019investissements": { + "Immobilisations incorporelles": { + "account_number": "4811" + }, + "Immobilisations corporelles": { + "account_number": "4812" + }, + "Versements restant \u00e0 effectuer sur titres de participation et titres immobilis\u00e9s non lib\u00e9r\u00e9s": { + "account_number": "4813" + }, + "R\u00e9serve de propri\u00e9t\u00e9": { + "account_number": "4816" + }, + "Retenues de garantie": { + "account_number": "4817" + }, + "Factures non parvenues": { + "account_number": "4818" + }, + "account_number": "481" + }, + "Fournisseurs d\u2019investissements, effets \u00e0 payer": { + "Immobilisations incorporelles": { + "account_number": "4821" + }, + "Immobilisations corporelles": { + "account_number": "4822" + }, + "account_number": "482" + }, + "Autres dettes hors activit\u00e9s ordinaires (HAO)": { + "Produits": { + "account_number": "4887" + }, + "account_number": "484" + } + }, + "root_type": "Liability" + }, + "Comptes de tr\u00e9sorerie": { + "Titres de placement": { + "Titres du tr\u00e9sor et bons de caisse \u00e0 court terme": { + "Titres du Tr\u00e9sor \u00e0 court terme": { + "account_number": "5011" + }, + "Titres d\u2019organismes financiers": { + "account_number": "5012" + }, + "Bons de caisse \u00e0 court terme": { + "account_number": "5013" + }, + "Frais d\u2019acquisition des titres de tr\u00e9sor et bons de caisse": { + "account_number": "5016" + }, + "account_number": "501" + }, + "Actions": { + "Actions ou parts propres": { + "account_number": "5021" + }, + "Actions cot\u00e9es": { + "account_number": "5022" + }, + "Actions non cot\u00e9es": { + "account_number": "5023" + }, + "Actions d\u00e9membr\u00e9es (certificats d\u2019investissement, droits de vote)": { + "account_number": "5024" + }, + "Autres actions": { + "account_number": "5025" + }, + "Frais d\u2019acquisition des actions": { + "account_number": "5026" + }, + "account_number": "502" + }, + "Obligations": { + "Obligations \u00e9mises par la soci\u00e9t\u00e9 et rachet\u00e9es par elle": { + "account_number": "5031" + }, + "Obligations cot\u00e9es": { + "account_number": "5032" + }, + "Obligations non cot\u00e9es": { + "account_number": "5033" + }, + "Autres obligations": { + "account_number": "5035" + }, + "Frais d\u2019acquisition des obligations": { + "account_number": "5036" + }, + "account_number": "503" + }, + "Bons de souscription": { + "Bons de souscription d\u2019actions": { + "account_number": "5042" + }, + "Bons de souscription d\u2019obligations": { + "account_number": "5043" + }, + "account_number": "504" + }, + "Titres n\u00e9gociables hors r\u00e9gion": { + "account_number": "505" + }, + "Int\u00e9r\u00eats courus": { + "Titres du Tr\u00e9sor et bons de caisse \u00e0 court terme": { + "account_number": "5061" + }, + "Actions": { + "account_number": "5062" + }, + "Obligations": { + "account_number": "5063" + }, + "account_number": "506" + }, + "Autres titres de placement et cr\u00e9ances assimil\u00e9es": { + "account_number": "508" + }, + "account_number": "50" + }, + "Valeurs \u00e0 encaisser": { + "Effets \u00e0 encaisser": { + "account_number": "511" + }, + "Effets \u00e0 l\u2019encaissement": { + "account_number": "512" + }, + "Ch\u00e8ques \u00e0 encaisser": { + "account_number": "513" + }, + "Ch\u00e8ques \u00e0 l\u2019encaissement": { + "account_number": "514" + }, + "Cartes de cr\u00e9dit \u00e0 encaisser": { + "account_number": "515" + }, + "Autres valeurs \u00e0 l\u2019encaissement": { + "Warrants": { + "account_number": "5181" + }, + "Billets de fonds": { + "account_number": "5182" + }, + "Ch\u00e8ques de voyage": { + "account_number": "5185" + }, + "Coupons \u00e9chus": { + "account_number": "5186" + }, + "Int\u00e9r\u00eats \u00e9chus des obligations": { + "account_number": "5187" + }, + "account_number": "518" + }, + "account_number": "51" + }, + "Banques": { + "Banques locales": { + "Banques en monnaie nationale": { + "account_type": "Bank", + "account_number": "5211" + }, + "Banques en devises": { + "account_type": "Bank", + "account_number": "5215" + }, + "account_type": "Bank", + "account_number": "521" + }, + "Banques autres \u00c9tats r\u00e9gion": { + "account_number": "522" + }, + "Banques autres \u00c9tats zone mon\u00e9taire": { + "account_number": "523" + }, + "Banques hors zone mon\u00e9taire": { + "account_number": "524" + }, + "Banques d\u00e9p\u00f4t \u00e0 terme": { + "account_number": "525" + }, + "Banques, int\u00e9r\u00eats courus": { + "Banque, int\u00e9r\u00eats courus, charges \u00e0 payer": { + "account_number": "5261" + }, + "Banque, int\u00e9r\u00eats courus, produits \u00e0 recevoir": { + "account_number": "5267" + }, + "account_number": "526" + }, + "account_number": "52" + }, + "\u00c9tablissements financiers et assimil\u00e9s": { + "Ch\u00e8ques postaux": { + "account_number": "531" + }, + "Tr\u00e9sor": { + "account_number": "532" + }, + "Soci\u00e9t\u00e9s de gestion et d\u2019interm\u00e9diation (SGI)": { + "account_number": "533" + }, + "\u00c9tablissements financiers, int\u00e9r\u00eats courus": { + "account_number": "536" + }, + "Autres organismes financiers": { + "account_number": "538" + }, + "account_number": "53" + }, + "Instruments de tr\u00e9sorerie": { + "Options de taux d\u2019int\u00e9r\u00eat": { + "account_number": "541" + }, + "Options de taux de change": { + "account_number": "542" + }, + "Options de taux boursiers": { + "account_number": "543" + }, + "Instruments de march\u00e9s \u00e0 terme": { + "account_number": "544" + }, + "Avoirs d\u2019or et autres m\u00e9taux pr\u00e9cieux": { + "account_number": "545" + }, + "account_number": "54" + }, + "Instruments de monnaie \u00e9lectronique": { + "Monnaie \u00e9lectronique carte carburant": { + "account_number": "551" + }, + "Monnaie \u00e9lectronique t\u00e9l\u00e9phone portable": { + "account_number": "552" + }, + "Monnaie \u00e9lectronique carte p\u00e9age": { + "account_number": "553" + }, + "Porte-monnaie \u00e9lectronique": { + "account_number": "554" + }, + "Autres instruments de monnaies \u00e9lectroniques": { + "account_number": "558" + }, + "account_number": "55" + }, + "Banques, cr\u00e9dits de tr\u00e9sorerie et d\u2019escompte": { + "Cr\u00e9dits de tr\u00e9sorerie": { + "account_number": "561" + }, + "Escompte de cr\u00e9dits de campagne": { + "account_number": "564" + }, + "Escompte de cr\u00e9dits ordinaires": { + "account_number": "565" + }, + "Banques, cr\u00e9dits de tr\u00e9sorerie, int\u00e9r\u00eats courus": { + "account_number": "566" + }, + "account_number": "56" + }, + "Caisse": { + "Caisse si\u00e8ge social": { + "Caisse en monnaie nationale": { + "account_number": "5711" + }, + "Caisse en devises": { + "account_number": "5712" + }, + "account_number": "571" + }, + "Caisse succursale A": { + "En monnaie nationale": { + "account_number": "5721" + }, + "En devises": { + "account_number": "5722" + }, + "account_number": "572" + }, + "Caisse succursale B": { + "En monnaie nationale": { + "account_number": "5731" + }, + "En devises": { + "account_number": "5732" + }, + "account_number": "573" + }, + "account_number": "57" + }, + "R\u00e9gies d\u2019avances, accr\u00e9ditifs et virements internes": { + "R\u00e9gies d\u2019avance": { + "account_number": "581" + }, + "Accr\u00e9ditifs": { + "account_number": "582" + }, + "Virements de fonds": { + "account_number": "585" + }, + "Autres virements internes": { + "account_number": "588" + }, + "account_number": "58" + }, + "D\u00e9pr\u00e9ciations et provisions pour risque \u00e0 court terme": { + "D\u00e9pr\u00e9ciations des titres de placement": { + "account_number": "590" + }, + "D\u00e9pr\u00e9ciations des titres et valeurs \u00e0 encaisser": { + "account_number": "591" + }, + "D\u00e9pr\u00e9ciations des comptes banques": { + "account_number": "592" + }, + "D\u00e9pr\u00e9ciations des comptes \u00e9tablissements financiers et assimil\u00e9s": { + "account_number": "593" + }, + "D\u00e9pr\u00e9ciations des comptes d\u2019instruments de tr\u00e9sorerie": { + "account_number": "594" + }, + "Provisions pour risque \u00e0 court terme \u00e0 caract\u00e8re financier": { + "account_number": "599" + }, + "account_number": "59" + }, + "root_type": "Asset", + "account_number": "5" + }, + "Comptes de charges des activit\u00e9s ordinaires": { + "Achats et variations de stocks": { + "Achats de marchandises": { + "Dans la R\u00e9gion": { + "account_number": "6011" + }, + "Hors R\u00e9gion": { + "account_number": "6012" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "6013" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "6014" + }, + "Frais sur achats": { + "account_number": "6015" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6019" + }, + "account_number": "601" + }, + "Achats de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "Dans la R\u00e9gion": { + "account_number": "6021" + }, + "Hors R\u00e9gion": { + "account_number": "6022" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "6023" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "6024" + }, + "Frais sur achats": { + "account_number": "6025" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6029" + }, + "account_number": "602" + }, + "Variations des stocks de biens achet\u00e9s": { + "Variations des stocks de marchandises": { + "account_number": "6031" + }, + "Variations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "account_number": "6032" + }, + "Variations des stocks d\u2019autres approvisionnements": { + "account_number": "6033" + }, + "account_number": "603" + }, + "Achats stock\u00e9s de mati\u00e8res et fournitures consommables": { + "Mati\u00e8res consommables": { + "account_number": "6041" + }, + "Mati\u00e8res combustibles": { + "account_number": "6042" + }, + "Produits d\u2019entretien": { + "account_number": "6043" + }, + "Fournitures d\u2019atelier et d\u2019usine": { + "account_number": "6044" + }, + "Frais sur achat": { + "account_number": "6045" + }, + "Fournitures de magasin": { + "account_number": "6046" + }, + "Fournitures de bureau": { + "account_number": "6047" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6049" + }, + "account_number": "604" + }, + "Autres achats": { + "Fournitures non stockables Eau": { + "account_number": "6051" + }, + "Fournitures non stockables \u00c9lectricit\u00e9": { + "account_number": "6052" + }, + "Fournitures non stockables Autres \u00e9nergies": { + "account_number": "6053" + }, + "Fournitures d\u2019entretien non stockables": { + "account_number": "6054" + }, + "Fournitures de bureau non stockables": { + "account_number": "6055" + }, + "Achats de petit mat\u00e9riel et outillage": { + "account_number": "6056" + }, + "Achats d\u2019\u00e9tudes et prestations de services": { + "account_number": "6057" + }, + "Achats de travaux, mat\u00e9riels et \u00e9quipements": { + "account_number": "6058" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6059" + }, + "account_number": "605" + }, + "Achats d\u2019emballages": { + "Emballages perdus": { + "account_number": "6081" + }, + "Emballages r\u00e9cup\u00e9rables non identifiables": { + "account_number": "6082" + }, + "Emballages \u00e0 usage mixte": { + "account_number": "6083" + }, + "Frais sur achats": { + "account_number": "6085" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6089" + }, + "account_number": "608" + }, + "account_number": "60" + }, + "Transports": { + "Transports sur ventes": { + "account_number": "612" + }, + "Transports pour le compte de tiers": { + "account_number": "613" + }, + "Transports du personnel": { + "account_number": "614" + }, + "Transports de plis": { + "account_number": "616" + }, + "Autres frais de transport": { + "Voyages et d\u00e9placements": { + "account_number": "6181" + }, + "Transports entre \u00e9tablissements ou chantiers": { + "account_number": "6182" + }, + "Transports administratifs": { + "account_number": "6183" + }, + "account_number": "618" + }, + "account_number": "61" + }, + "Services ext\u00e9rieurs": { + "Sous-traitance g\u00e9n\u00e9rale": { + "account_number": "621" + }, + "Locations, charges locatives": { + "Locations de terrains": { + "account_number": "6221" + }, + "Locations de b\u00e2timents": { + "account_number": "6222" + }, + "Locations de mat\u00e9riels et outillages": { + "account_number": "6223" + }, + "Malis sur emballages": { + "account_number": "6224" + }, + "Locations d\u2019emballages": { + "account_number": "6225" + }, + "Fermages et loyers du foncier": { + "account_number": "6226" + }, + "Locations et charges locatives diverses": { + "account_number": "6228" + }, + "account_number": "622" + }, + "Redevances de location acquisition": { + "Cr\u00e9dit-bail immobilier": { + "account_number": "6232" + }, + "Cr\u00e9dit-bail mobilier": { + "account_number": "6233" + }, + "Location-vente": { + "account_number": "6234" + }, + "Autres contrats de location acquisition": { + "account_number": "6238" + }, + "account_number": "623" + }, + "Entretien, r\u00e9parations, remise en \u00e9tat et maintenance": { + "Entretien et r\u00e9parations des biens immobiliers": { + "account_number": "6241" + }, + "Entretien et r\u00e9parations des biens mobiliers": { + "account_number": "6242" + }, + "Maintenance": { + "account_number": "6243" + }, + "Charges de d\u00e9mant\u00e8lement et remise en \u00e9tat": { + "account_number": "6244" + }, + "Autres entretiens et r\u00e9parations": { + "account_number": "6248" + }, + "account_number": "624" + }, + "Primes d\u2019assurance": { + "Assurances multirisques": { + "account_number": "6251" + }, + "Assurances mat\u00e9riel de transport": { + "account_number": "6252" + }, + "Assurances risques d\u2019exploitation": { + "account_number": "6253" + }, + "Assurances responsabilit\u00e9 du producteur": { + "account_number": "6254" + }, + "Assurances insolvabilit\u00e9 clients": { + "account_number": "6255" + }, + "Assurances transport sur ventes": { + "account_number": "6257" + }, + "Autres primes d\u2019assurances": { + "account_number": "6258" + }, + "account_number": "625" + }, + "\u00c9tudes, recherches et documentation": { + "\u00c9tudes et recherches": { + "account_number": "6261" + }, + "Documentation g\u00e9n\u00e9rale": { + "account_number": "6265" + }, + "Documentation technique": { + "account_number": "6266" + }, + "account_number": "626" + }, + "Publicit\u00e9, publications, relations publiques": { + "Annonces, insertions": { + "account_number": "6271" + }, + "Catalogues, imprim\u00e9s publicitaires": { + "account_number": "6272" + }, + "\u00c9chantillons": { + "account_number": "6273" + }, + "Foires et expositions": { + "account_number": "6274" + }, + "Publications": { + "account_number": "6275" + }, + "Cadeaux \u00e0 la client\u00e8le": { + "account_number": "6276" + }, + "Frais de colloques, s\u00e9minaires, conf\u00e9rences": { + "account_number": "6277" + }, + "Autres charges de publicit\u00e9 et relations publiques": { + "account_number": "6278" + }, + "account_number": "627" + }, + "Frais de t\u00e9l\u00e9communications": { + "Frais de t\u00e9l\u00e9phone": { + "account_number": "6281" + }, + "Frais de t\u00e9lex": { + "account_number": "6282" + }, + "Frais de t\u00e9l\u00e9copie": { + "account_number": "6283" + }, + "Autres frais de t\u00e9l\u00e9communications": { + "account_number": "6288" + }, + "account_number": "628" + }, + "account_number": "62" + }, + "Autres services ext\u00e9rieurs": { + "Frais bancaires": { + "Frais sur titres (vente, garde)": { + "account_number": "6311" + }, + "Frais sur effets": { + "account_number": "6312" + }, + "Location de coffres": { + "account_number": "6313" + }, + "Commissions d\u2019affacturage": { + "account_number": "6314" + }, + "Commissions sur cartes de cr\u00e9dit": { + "account_number": "6315" + }, + "Frais d\u2019\u00e9mission d\u2019emprunts": { + "account_number": "6316" + }, + "Frais sur instruments monnaie \u00e9lectronique": { + "account_number": "6317" + }, + "Autres frais bancaires": { + "account_number": "6318" + }, + "account_number": "631" + }, + "R\u00e9mun\u00e9rations d\u2019interm\u00e9diaires et de conseils": { + "Commissions et courtages sur ventes": { + "account_number": "6322" + }, + "Honoraires des professions r\u00e9glement\u00e9es": { + "account_number": "6324" + }, + "Frais d\u2019actes et de contentieux": { + "account_number": "6325" + }, + "R\u00e9mun\u00e9rations d\u2019affacturage": { + "account_number": "6326" + }, + "R\u00e9mun\u00e9rations des autres prestataires de services": { + "account_number": "6327" + }, + "Divers frais": { + "account_number": "6328" + }, + "account_number": "632" + }, + "Frais de formation du personnel": { + "account_number": "633" + }, + "Redevances pour brevets, licences, logiciels, concessions et droits et valeurs similaires": { + "Redevances pour brevets, licences": { + "account_number": "6342" + }, + "Redevances pour logiciels": { + "account_number": "6343" + }, + "Redevances pour marques": { + "account_number": "6344" + }, + "Redevances pour sites internet": { + "account_number": "6345" + }, + "Redevances pour concessions, droits et valeurs similaires": { + "account_number": "6346" + }, + "account_number": "634" + }, + "Cotisations": { + "Cotisations": { + "account_number": "6351" + }, + "Concours divers": { + "account_number": "6358" + }, + "account_number": "635" + }, + "R\u00e9mun\u00e9rations de personnel ext\u00e9rieur \u00e0 l\u2019entit\u00e9": { + "Personnel int\u00e9rimaire": { + "account_number": "6371" + }, + "Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": { + "account_number": "6372" + }, + "account_number": "637" + }, + "Autres charges externes": { + "Frais de recrutement du personnel": { + "account_number": "6381" + }, + "Frais de d\u00e9m\u00e9nagement": { + "account_number": "6382" + }, + "R\u00e9ceptions": { + "account_number": "6383" + }, + "Missions": { + "account_number": "6384" + }, + "Charges de copropri\u00e9t\u00e9": { + "account_number": "6385" + }, + "account_number": "638" + }, + "account_number": "63" + }, + "Imp\u00f4ts et taxes": { + "Imp\u00f4ts et taxes directs": { + "Imp\u00f4ts fonciers et taxes annexes": { + "account_number": "6411" + }, + "Patentes, licences et taxes annexes": { + "account_number": "6412" + }, + "Taxes sur appointements et salaires": { + "account_number": "6413" + }, + "Taxes d\u2019apprentissage": { + "account_number": "6414" + }, + "Formation professionnelle continue": { + "account_number": "6415" + }, + "Autres imp\u00f4ts et taxes directs": { + "account_number": "6418" + }, + "account_number": "641" + }, + "Imp\u00f4ts et taxes indirects": { + "account_number": "645" + }, + "Droits d\u2019enregistrement": { + "Droits de mutation": { + "account_number": "6461" + }, + "Droits de timbre": { + "account_number": "6462" + }, + "Taxes sur les v\u00e9hicules de soci\u00e9t\u00e9": { + "account_number": "6463" + }, + "Vignettes": { + "account_number": "6464" + }, + "Autres droits": { + "account_number": "6468" + }, + "account_number": "646" + }, + "P\u00e9nalit\u00e9s, amendes fiscales": { + "P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts directs": { + "account_number": "6471" + }, + "P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts indirects": { + "account_number": "6472" + }, + "P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts directs": { + "account_number": "6473" + }, + "P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts indirects": { + "account_number": "6474" + }, + "Autres p\u00e9nalit\u00e9s et amendes fiscales": { + "account_number": "6478" + }, + "account_number": "647" + }, + "Autres imp\u00f4ts et taxes": { + "account_number": "648" + }, + "account_number": "64" + }, + "Autres charges": { + "Pertes sur cr\u00e9ances clients et autres d\u00e9biteurs": { + "Clients": { + "account_number": "6511" + }, + "Autres d\u00e9biteurs": { + "account_number": "6515" + }, + "account_number": "651" + }, + "Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "Quote-part transf\u00e9r\u00e9e de b\u00e9n\u00e9fices (comptabilit\u00e9 du g\u00e9rant)": { + "account_number": "6521" + }, + "Pertes imput\u00e9es par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": { + "account_number": "6525" + }, + "account_number": "652" + }, + "Valeurs comptables des cessions courantes d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "6541" + }, + "Immobilisations corporelles": { + "account_number": "6542" + }, + "account_number": "654" + }, + "Perte de change sur cr\u00e9ances et dettes commerciale": { + "account_number": "656" + }, + "P\u00e9nalit\u00e9s et amendes p\u00e9nales": { + "account_number": "657" + }, + "Charges diverses": { + "Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": { + "account_number": "6581" + }, + "Dons": { + "account_number": "6582" + }, + "M\u00e9c\u00e9nat": { + "account_number": "6583" + }, + "Autres charges diverses": { + "account_number": "6588" + }, + "account_number": "658" + }, + "Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "Sur risques \u00e0 court terme": { + "account_number": "6591" + }, + "Sur stocks": { + "account_number": "6593" + }, + "Sur cr\u00e9ances": { + "account_number": "6594" + }, + "Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme": { + "account_number": "6598" + }, + "account_number": "659" + }, + "account_number": "65" + }, + "Charges de personnel": { + "R\u00e9mun\u00e9rations directes vers\u00e9es au personnel national": { + "Appointements salaires et commissions": { + "account_number": "6611" + }, + "Primes et gratifications": { + "account_number": "6612" + }, + "Cong\u00e9s pay\u00e9s": { + "account_number": "6613" + }, + "Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": { + "account_number": "6614" + }, + "Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": { + "account_number": "6615" + }, + "Suppl\u00e9ment familial": { + "account_number": "6616" + }, + "Avantages en nature": { + "account_number": "6617" + }, + "Autres r\u00e9mun\u00e9rations directes": { + "account_number": "6618" + }, + "account_number": "661" + }, + "R\u00e9mun\u00e9rations directes vers\u00e9es au personnel non national": { + "Appointements salaires et commissions": { + "account_number": "6621" + }, + "Primes et gratifications": { + "account_number": "6622" + }, + "Cong\u00e9s pay\u00e9s": { + "account_number": "6623" + }, + "Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": { + "account_number": "6624" + }, + "Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": { + "account_number": "6625" + }, + "Suppl\u00e9ment familial": { + "account_number": "6626" + }, + "Avantages en nature": { + "account_number": "6627" + }, + "Autres r\u00e9mun\u00e9rations directes": { + "account_number": "6628" + }, + "account_number": "662" + }, + "Indemnit\u00e9s forfaitaires vers\u00e9es au personnel": { + "Indemnit\u00e9s de logement": { + "account_number": "6631" + }, + "Indemnit\u00e9s de repr\u00e9sentation": { + "account_number": "6632" + }, + "Indemnit\u00e9s d\u2019expatriation": { + "account_number": "6633" + }, + "Indemnit\u00e9s de transport": { + "account_number": "6634" + }, + "Autres indemnit\u00e9s et avantages divers": { + "account_number": "6638" + }, + "account_number": "663" + }, + "Charges sociales": { + "Charges sociales sur r\u00e9mun\u00e9ration du personnel national": { + "account_number": "6641" + }, + "Charges sociales sur r\u00e9mun\u00e9ration du personnel non national": { + "account_number": "6642" + }, + "account_number": "664" + }, + "R\u00e9mun\u00e9rations et charges sociales de l\u2019exploitant individuel": { + "R\u00e9mun\u00e9ration du travail de l\u2019exploitant": { + "account_number": "6661" + }, + "Charges sociales": { + "account_number": "6662" + }, + "account_number": "666" + }, + "R\u00e9mun\u00e9ration transf\u00e9r\u00e9e de personnel ext\u00e9rieur": { + "Personnel int\u00e9rimaire": { + "account_number": "6671" + }, + "Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": { + "account_number": "6672" + }, + "account_number": "667" + }, + "Autres charges sociales": { + "Versements aux syndicats et comit\u00e9s d\u2019entreprise, d\u2019\u00e9tablissement": { + "account_number": "6681" + }, + "Versements aux comit\u00e9s d\u2019hygi\u00e8ne et de s\u00e9curit\u00e9": { + "account_number": "6682" + }, + "Versements et contributions aux autres \u0153uvres sociales": { + "account_number": "6683" + }, + "M\u00e9decine du travail et pharmacie": { + "account_number": "6684" + }, + "Assurances et organismes de sant\u00e9": { + "account_number": "6685" + }, + "Assurances retraite et fonds de pension": { + "account_number": "6686" + }, + "Majorations et p\u00e9nalit\u00e9s sociales": { + "account_number": "6687" + }, + "Charges sociales diverses": { + "account_number": "6688" + }, + "account_number": "668" + }, + "account_number": "66" + }, + "Frais financiers et charges assimil\u00e9es": { + "Int\u00e9r\u00eats des emprunts": { + "Emprunts obligataires": { + "account_number": "6711" + }, + "Emprunts aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": { + "account_number": "6712" + }, + "Dettes li\u00e9es \u00e0 des participations": { + "account_number": "6713" + }, + "Primes de remboursement des obligations": { + "account_number": "6714" + }, + "account_number": "671" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition": { + "Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail immobilier": { + "account_number": "6722" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail mobilier": { + "account_number": "6723" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition / location-vente": { + "account_number": "6724" + }, + "Int\u00e9r\u00eats dans loyers des autres locations acquisition": { + "account_number": "6728" + }, + "account_number": "672" + }, + "Escomptes accord\u00e9s": { + "account_number": "673" + }, + "Autres int\u00e9r\u00eats": { + "Avances re\u00e7ues et d\u00e9p\u00f4ts cr\u00e9diteurs": { + "account_number": "6741" + }, + "Comptes courants bloqu\u00e9s": { + "account_number": "6742" + }, + "Int\u00e9r\u00eats sur obligations cautionn\u00e9es": { + "account_number": "6743" + }, + "Int\u00e9r\u00eats sur dettes commerciales": { + "account_number": "6744" + }, + "Int\u00e9r\u00eats bancaires et sur op\u00e9rations de financement (escompte...)": { + "account_number": "6745" + }, + "Int\u00e9r\u00eats sur dettes diverses": { + "account_number": "6748" + }, + "account_number": "674" + }, + "Escomptes des effets de commerce": { + "account_number": "675" + }, + "Pertes de change financi\u00e8res": { + "account_number": "676" + }, + "Pertes sur titres de placement": { + "Pertes sur cessions de titres de placement": { + "account_number": "6771" + }, + "Mali provenant d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": { + "account_number": "6772" + }, + "account_number": "677" + }, + "Pertes et charges sur risques financiers": { + "Sur rentes viag\u00e8res": { + "account_number": "6781" + }, + "Sur op\u00e9rations financi\u00e8res": { + "account_number": "6782" + }, + "Sur instruments de tr\u00e9sorerie": { + "account_number": "6784" + }, + "account_number": "678" + }, + "Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "Sur risques financiers": { + "account_number": "6791" + }, + "Sur titres de placement": { + "account_number": "6795" + }, + "Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "account_number": "6798" + }, + "account_number": "679" + }, + "account_number": "67" + }, + "Dotations aux amortissements": { + "Dotations aux amortissements d\u2019exploitation": { + "Dotations aux amortissements des immobilisations incorporelles": { + "account_number": "6812" + }, + "Dotations aux amortissements des immobilisations corporelles": { + "account_number": "6813" + }, + "account_number": "681" + }, + "account_number": "68" + }, + "Dotations aux provisions et aux d\u00e9pr\u00e9ciations": { + "Dotations aux provisions et aux d\u00e9pr\u00e9ciations d\u2019exploitation": { + "Dotations aux provisions pour risques et charges": { + "account_number": "6911" + }, + "Dotations aux d\u00e9pr\u00e9ciations des immobilisations incorporelles": { + "account_number": "6913" + }, + "Dotations aux d\u00e9pr\u00e9ciations des immobilisations corporelles": { + "account_number": "6914" + }, + "account_number": "691" + }, + "Dotations aux provisions et aux d\u00e9pr\u00e9ciations financi\u00e8res": { + "Dotations aux provisions pour risques et charges": { + "account_number": "6971" + }, + "Dotations aux d\u00e9pr\u00e9ciations des immobilisations financi\u00e8res": { + "account_number": "6972" + }, + "account_number": "697" + }, + "account_number": "69" + }, + "root_type": "Expense", + "account_number": "6" + }, + "Comptes de produits des activit\u00e9s ordinaires": { + "Ventes": { + "Ventes de marchandises": { + "Dans la R\u00e9gion": { + "account_number": "7011" + }, + "Hors R\u00e9gion": { + "account_number": "7012" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7013" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7014" + }, + "Sur internet": { + "account_number": "7015" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7019" + }, + "account_number": "701" + }, + "Ventes de produits finis": { + "Dans la R\u00e9gion": { + "account_number": "7021" + }, + "Hors R\u00e9gion": { + "account_number": "7022" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7023" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7024" + }, + "Sur internet": { + "account_number": "7025" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7029" + }, + "account_number": "702" + }, + "Ventes de produits interm\u00e9diaires": { + "Dans la R\u00e9gion": { + "account_number": "7031" + }, + "Hors R\u00e9gion": { + "account_number": "7032" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7033" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7034" + }, + "Sur internet": { + "account_number": "7035" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7039" + }, + "account_number": "703" + }, + "Ventes de produits r\u00e9siduels": { + "Dans la R\u00e9gion": { + "account_number": "7041" + }, + "Hors R\u00e9gion": { + "account_number": "7042" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7043" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7044" + }, + "Sur internet": { + "account_number": "7045" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7049" + }, + "account_number": "704" + }, + "Travaux factur\u00e9s": { + "Dans la R\u00e9gion": { + "account_number": "7051" + }, + "Hors R\u00e9gion": { + "account_number": "7052" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7053" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7054" + }, + "Sur internet": { + "account_number": "7055" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7059" + }, + "account_number": "705" + }, + "Services vendus": { + "Dans la R\u00e9gion": { + "account_number": "7061" + }, + "Hors R\u00e9gion": { + "account_number": "7062" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7063" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7064" + }, + "Sur internet": { + "account_number": "7065" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7069" + }, + "account_number": "706" + }, + "Produits accessoires": { + "Ports, emballages perdus et autres frais factur\u00e9s": { + "account_number": "7071" + }, + "Commissions et courtages": { + "account_number": "7072" + }, + "Locations": { + "account_number": "7073" + }, + "Bonis sur reprises et cessions d\u2019emballages": { + "account_number": "7074" + }, + "Mise \u00e0 disposition de personnel": { + "account_number": "7075" + }, + "Redevances pour brevets, logiciels, marques et droits similaires": { + "account_number": "7076" + }, + "Services exploit\u00e9s dans l\u2019int\u00e9r\u00eat du personnel": { + "account_number": "7077" + }, + "Autres produits accessoires": { + "account_number": "7078" + }, + "account_number": "707" + }, + "account_number": "70" + }, + "Subventions d\u2019exploitation": { + "Sur produits \u00e0 l\u2019exportation": { + "account_number": "711" + }, + "Sur produits \u00e0 l\u2019importation": { + "account_number": "712" + }, + "Sur produits de p\u00e9r\u00e9quation": { + "account_number": "713" + }, + "Indemnit\u00e9s et subventions d\u2019exploitation (entit\u00e9 agricole)": { + "account_number": "714" + }, + "Autres subventions d\u2019exploitation": { + "Vers\u00e9es par l\u2019\u00c9tat et les collectivit\u00e9s publiques": { + "account_number": "7181" + }, + "Vers\u00e9es par les organismes internationaux": { + "account_number": "7182" + }, + "Vers\u00e9es par des tiers": { + "account_number": "7183" + }, + "account_number": "718" + }, + "account_number": "71" + }, + "Production immobilis\u00e9e": { + "Immobilisations incorporelles": { + "account_number": "721" + }, + "Immobilisations corporelles": { + "Immobilisations corporelles (hors actifs biologiques)": { + "account_number": "7221" + }, + "Immobilisations corporelles (actifs biologiques)": { + "account_number": "7222" + }, + "account_number": "722" + }, + "Production auto-consomm\u00e9e": { + "account_number": "724" + }, + "Immobilisations financi\u00e8res": { + "account_number": "726" + }, + "account_number": "72" + }, + "Variations des stocks de biens et de services produits": { + "Variations des stocks de produits en cours": { + "Produits en cours": { + "account_number": "7341" + }, + "Travaux en cours": { + "account_number": "7342" + }, + "account_number": "734" + }, + "Variations des en-cours de services": { + "\u00c9tudes en cours": { + "account_number": "7351" + }, + "Prestations de services en cours": { + "account_number": "7352" + }, + "account_number": "735" + }, + "Variations des stocks de produits finis": { + "account_number": "736" + }, + "Variations des stocks de produits interm\u00e9diaires et r\u00e9siduels": { + "Produits interm\u00e9diaires": { + "account_number": "7371" + }, + "Produits r\u00e9siduels": { + "account_number": "7372" + }, + "account_number": "737" + }, + "account_number": "73" + }, + "Autres produits": { + "Profits sur cr\u00e9ances clients et autres d\u00e9biteurs": { + "account_number": "751" + }, + "Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "Quote-part transf\u00e9r\u00e9e de pertes (comptabilit\u00e9 du g\u00e9rant)": { + "account_number": "7521" + }, + "B\u00e9n\u00e9fices attribu\u00e9s par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": { + "account_number": "7525" + }, + "account_number": "752" + }, + "Produits des cessions courantes d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "7541" + }, + "Immobilisations corporelles": { + "account_number": "7542" + }, + "account_number": "754" + }, + "Gains de change sur cr\u00e9ances et dettes commerciales": { + "account_number": "756" + }, + "Produits divers": { + "Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": { + "account_number": "7581" + }, + "Indemnit\u00e9s d\u2019assurances re\u00e7ues": { + "account_number": "7582" + }, + "Autres produits divers": { + "account_number": "7588" + }, + "account_number": "758" + }, + "Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "Sur risques \u00e0 court terme": { + "account_number": "7591" + }, + "Sur stocks": { + "account_number": "7593" + }, + "Sur cr\u00e9ances": { + "account_number": "7594" + }, + "Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "account_number": "7598" + }, + "account_number": "759" + }, + "account_number": "75" + }, + "Revenus financiers et produits assimil\u00e9s": { + "Int\u00e9r\u00eats de pr\u00eats et cr\u00e9ances diverses": { + "Int\u00e9r\u00eats de pr\u00eats": { + "account_number": "7712" + }, + "Int\u00e9r\u00eats sur cr\u00e9ances diverses": { + "account_number": "7713" + }, + "account_number": "771" + }, + "Revenus de participations et autres titres immobilis\u00e9s": { + "Revenus des titres de participation": { + "account_number": "7721" + }, + "Revenus autres titres immobilis\u00e9s": { + "account_number": "7722" + }, + "account_number": "772" + }, + "Escomptes obtenus": { + "account_number": "773" + }, + "Revenus de placement": { + "Revenus des obligations": { + "account_number": "7745" + }, + "Revenus des titres de placement": { + "account_number": "7746" + }, + "account_number": "774" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition": { + "account_number": "775" + }, + "Gains de change financiers": { + "account_number": "776" + }, + "Gains sur cessions de titres de placement": { + "account_number": "777" + }, + "Gains sur risques financiers": { + "Sur rentes viag\u00e8res": { + "account_number": "7781" + }, + "Sur op\u00e9rations financi\u00e8res": { + "account_number": "7782" + }, + "Sur instruments de tr\u00e9sorerie": { + "account_number": "7784" + }, + "account_number": "778" + }, + "Reprises de charges pour d\u00e9pr\u00e9ciations et provisions \u00e0 court terme financi\u00e8res": { + "Sur risques financiers": { + "account_number": "7791" + }, + "Sur titres de placement": { + "account_number": "7795" + }, + "Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "account_number": "7798" + }, + "account_number": "779" + }, + "account_number": "77" + }, + "Transferts de charges": { + "Transferts de charges d\u2019exploitation": { + "account_number": "781" + }, + "Transferts de charges financi\u00e8res": { + "account_number": "787" + }, + "account_number": "78" + }, + "Reprises de provisions, de d\u00e9pr\u00e9ciations et autres": { + "Reprises de provisions et d\u00e9pr\u00e9ciations d\u2019exploitation": { + "Pour risques et charges": { + "account_number": "7911" + }, + "Des immobilisations incorporelles": { + "account_number": "7913" + }, + "Des immobilisations corporelles": { + "account_number": "7914" + }, + "account_number": "791" + }, + "Reprises de provisions et d\u00e9pr\u00e9ciations financi\u00e8res": { + "Pour risques et charges": { + "account_number": "7971" + }, + "Des immobilisations financi\u00e8res": { + "account_number": "7972" + }, + "account_number": "797" + }, + "Reprises d\u2019amortissements": { + "account_number": "798" + }, + "Reprises de subventions d\u2019investissement": { + "account_number": "799" + }, + "account_number": "79" + }, + "root_type": "Income", + "account_number": "7" + }, + "8-Comptes des autres charges et des autres produits (CHARGES)": { + "Valeurs comptables des cessions d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "811" + }, + "Immobilisations corporelles": { + "account_number": "812" + }, + "Immobilisations financi\u00e8res": { + "account_number": "816" + }, + "account_number": "81" + }, + "Charges hors activit\u00e9s ordinaires": { + "Charges HAO constat\u00e9es": { + "account_number": "831" + }, + "Charges li\u00e9es aux op\u00e9rations de restructuration": { + "account_number": "833" + }, + "Pertes sur cr\u00e9ances HAO": { + "account_number": "834" + }, + "Dons et lib\u00e9ralit\u00e9s accord\u00e9s": { + "account_number": "835" + }, + "Abandons de cr\u00e9ances consentis": { + "account_number": "836" + }, + "Charges li\u00e9es aux op\u00e9rations de liquidation": { + "account_number": "837" + }, + "Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": { + "account_number": "839" + }, + "account_number": "83" + }, + "Dotations hors activit\u00e9s ordinaires": { + "Dotations aux provisions r\u00e9glement\u00e9es": { + "account_number": "851" + }, + "Dotations aux amortissements HAO": { + "account_number": "852" + }, + "Dotations aux d\u00e9pr\u00e9ciations HAO": { + "account_number": "853" + }, + "Dotations aux provisions pour risques et charges HAO": { + "account_number": "854" + }, + "Autres dotations HAO": { + "account_number": "858" + }, + "account_number": "85" + }, + "Participation des travailleurs": { + "Participation l\u00e9gale aux b\u00e9n\u00e9fices": { + "account_number": "871" + }, + "Participation contractuelle aux b\u00e9n\u00e9fices": { + "account_number": "874" + }, + "Autres participations": { + "account_number": "878" + }, + "account_number": "87" + }, + "Imp\u00f4ts sur le r\u00e9sultat": { + "Imp\u00f4ts sur les b\u00e9n\u00e9fices de l\u2019exercice": { + "Activit\u00e9s exerc\u00e9es dans l\u2019\u00c9tat": { + "account_number": "8911" + }, + "Activit\u00e9s exerc\u00e9es dans les autres \u00c9tats de la R\u00e9gion": { + "account_number": "8912" + }, + "Activit\u00e9s exerc\u00e9es hors R\u00e9gion": { + "account_number": "8913" + }, + "account_number": "891" + }, + "Rappel d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": { + "account_number": "892" + }, + "Imp\u00f4t minimum forfaitaire IMF": { + "account_number": "895" + }, + "D\u00e9gr\u00e8vements et annulations d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": { + "D\u00e9gr\u00e8vements": { + "account_number": "8991" + }, + "Annulations pour pertes r\u00e9troactives": { + "account_number": "8994" + }, + "account_number": "899" + }, + "account_number": "89" + }, + "root_type": "Expense" + }, + "8-Comptes des autres charges et des autres produits (PRODUITS)": { + "Produits des cessions d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "821" + }, + "Immobilisations corporelles": { + "account_number": "822" + }, + "Immobilisations financi\u00e8res": { + "account_number": "826" + }, + "account_number": "82" + }, + "Produits hors activit\u00e9s ordinaires": { + "Produits HAO constat\u00e9s": { + "account_number": "841" + }, + "Produits li\u00e9s aux op\u00e9rations de restructuration": { + "account_number": "843" + }, + "Indemnit\u00e9s et subventions HAO (entit\u00e9 agricole)": { + "account_number": "844" + }, + "Dons et lib\u00e9ralit\u00e9s obtenus": { + "account_number": "845" + }, + "Abandons de cr\u00e9ances obtenus": { + "account_number": "846" + }, + "Produits li\u00e9s aux op\u00e9rations de liquidation": { + "account_number": "847" + }, + "Transferts de charges HAO": { + "account_number": "848" + }, + "Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": { + "account_number": "849" + }, + "account_number": "84" + }, + "Reprises de charges, provisions et d\u00e9pr\u00e9ciations HAO": { + "Reprises de provisions r\u00e9glement\u00e9es": { + "account_number": "861" + }, + "Reprises d\u2019amortissements HAO": { + "account_number": "862" + }, + "Reprises de d\u00e9pr\u00e9ciations HAO": { + "account_number": "863" + }, + "Reprises de provisions pour risques et charges HAO": { + "account_number": "864" + }, + "Autres reprises HAO": { + "account_number": "868" + }, + "account_number": "86" + }, + "Subventions d\u2019\u00e9quilibre": { + "\u00c9tat": { + "account_number": "881" + }, + "Collectivit\u00e9s publiques": { + "account_number": "884" + }, + "Groupe": { + "account_number": "886" + }, + "Autres": { + "account_number": "888" + }, + "account_number": "88" + }, + "root_type": "Income" + } + } +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/ne_plan_comptable.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/ne_plan_comptable.json new file mode 100644 index 00000000000..ec296cdc8ec --- /dev/null +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/ne_plan_comptable.json @@ -0,0 +1,1919 @@ +{ + "country_code": "ne", + "name": "Syscohada - Plan Comptable", + "tree": { + "1-Comptes de ressources durables": { + "10-Capital": { + "101-Capital social": { + "1011-Capital souscrit, non appel\u00e9": {}, + "1012-Capital souscrit, appel\u00e9, non vers\u00e9": {}, + "1013-Capital souscrit, appel\u00e9, vers\u00e9, non amorti": {}, + "1014-Capital souscrit, appel\u00e9, vers\u00e9, amorti": {}, + "1018-Capital souscrit soumis \u00e0 des conditions particuli\u00e8res": {} + }, + "102-Capital par dotation": { + "1021-Dotation initiale": {}, + "1022-Dotations compl\u00e9mentaires": {}, + "1028-Autres dotations": {} + }, + "103-Capital personnel": {}, + "104-Compte de l\u2019exploitant": { + "1041-Apports temporaires": {}, + "1042-Op\u00e9rations courantes": {}, + "1043-R\u00e9mun\u00e9rations, imp\u00f4ts et autres charges personnelles": {}, + "1047-Pr\u00e9l\u00e8vements d\u2019autoconsommation": {}, + "1048-Autres pr\u00e9l\u00e8vements": {} + }, + "105-Primes li\u00e9es au capital social": { + "1051-Primes d\u2019\u00e9mission": {}, + "1052-Primes d\u2019apport": {}, + "1053-Primes de fusion": {}, + "1054-Primes de conversion": {}, + "1058-Autres primes": {} + }, + "106-\u00c9carts de r\u00e9\u00e9valuation": { + "1061-\u00c9carts de r\u00e9\u00e9valuation l\u00e9gale": {}, + "1062-\u00c9carts de r\u00e9\u00e9valuation libre": {} + }, + "109-Apporteurs, capital souscrit, non appel\u00e9": {} + }, + "11-R\u00e9serves": { + "111-R\u00e9serve l\u00e9gale": {}, + "112-R\u00e9serves statutaires ou contractuelles": {}, + "113-R\u00e9serves r\u00e9glement\u00e9es": { + "1131-R\u00e9serves de plus-values nettes \u00e0 long terme": {}, + "1132-R\u00e9serves d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": {}, + "1133-R\u00e9serves cons\u00e9cutives \u00e0 l\u2019octroi de subventions d\u2019investissement": {}, + "1134-R\u00e9serves des valeurs mobili\u00e8res donnant acc\u00e8s au capital": {}, + "1135-Autres r\u00e9serves r\u00e9glement\u00e9es": {} + }, + "118-Autres r\u00e9serves": { + "1181-R\u00e9serves facultatives": {}, + "1188-R\u00e9serves diverses": {} + } + }, + "12-Report \u00e0 nouveau": { + "121-Report \u00e0 nouveau cr\u00e9diteur": {}, + "129-Report \u00e0 nouveau d\u00e9biteur": { + "1291-Perte nette \u00e0 reporter": {}, + "1292-Perte Amortissements r\u00e9put\u00e9s diff\u00e9r\u00e9s": {} + } + }, + "13-R\u00e9sultat net de l\u2019exercice": { + "130-R\u00e9sultat en instance d\u2019affectation": { + "1301-R\u00e9sultat en instance d\u2019affectation : b\u00e9n\u00e9fice": {}, + "1309-R\u00e9sultat en instance d\u2019affectation : perte": {} + }, + "131-R\u00e9sultat net : b\u00e9n\u00e9fice": {}, + "132-Marge commerciale (MC)": {}, + "133-Valeur ajout\u00e9e (VA)": {}, + "134-Exc\u00e9dent brut d\u2019exploitation (EBE)": {}, + "135-R\u00e9sultat d\u2019exploitation (RE)": {}, + "136-R\u00e9sultat financier (RF)": {}, + "137-R\u00e9sultat des activit\u00e9s ordinaires (RAO)": {}, + "138-R\u00e9sultat hors activit\u00e9s ordinaires (RHAO)": { + "1381-R\u00e9sultat de fusion": {}, + "1382-R\u00e9sultat d\u2019apport partiel d\u2019actif": {}, + "1383-R\u00e9sultat de scission": {}, + "1384-R\u00e9sultat de liquidation": {} + }, + "139-R\u00e9sultat net : perte": {} + }, + "14-Subventions d\u2019investissement": { + "141-Subventions d\u2019\u00e9quipement": { + "1411-\u00c9tat": {}, + "1412-R\u00e9gions": {}, + "1413-D\u00e9partements": {}, + "1414-Communes et collectivit\u00e9s publiques d\u00e9centralis\u00e9es": {}, + "1415-Entit\u00e9s publiques ou mixtes": {}, + "1416-Entit\u00e9s et organismes priv\u00e9s": {}, + "1417-Organismes internationaux": {}, + "1418-Autres": {} + }, + "148-Autres subventions d\u2019investissement": {} + }, + "15-Provisions r\u00e9glement\u00e9es et fonds assimil\u00e9s": { + "151-Amortissements d\u00e9rogatoires": {}, + "152-Plus-values de cession \u00e0 r\u00e9investir": {}, + "153-Fonds r\u00e9glement\u00e9s": { + "1531-Fonds National": {}, + "1532-Pr\u00e9l\u00e8vement pour le Budget": {} + }, + "154-Provisions sp\u00e9ciales de r\u00e9\u00e9valuation": {}, + "155-Provisions r\u00e9glement\u00e9es relatives aux immobilisations": { + "1551-Reconstitution des gisements miniers et p\u00e9troliers": {} + }, + "156-Provisions r\u00e9glement\u00e9es relatives aux stocks": { + "1561-Hausse de prix": {}, + "1562-Fluctuation des cours": {} + }, + "157-Provisions pour investissement": {}, + "158-Autres provisions et fonds r\u00e9glement\u00e9s": {} + }, + "16-Emprunts et dettes assimil\u00e9es": { + "161-Emprunts obligataires": { + "1611-Emprunts obligataires ordinaires": {}, + "1612-Emprunts obligataires convertibles en actions": {}, + "1613-Emprunts obligataires remboursables en actions": {}, + "1618-Autres emprunts obligataires": {} + }, + "162-Emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": {}, + "163-Avances re\u00e7ues de l\u2019\u00c9tat": {}, + "164-Avances re\u00e7ues et comptes courants bloqu\u00e9s": {}, + "165-D\u00e9p\u00f4ts et cautionnements re\u00e7us": { + "1651-D\u00e9p\u00f4ts": {}, + "1652-Cautionnements": {} + }, + "166-Int\u00e9r\u00eats courus": { + "1661-Sur emprunts obligataires": {}, + "1662-Sur emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": {}, + "1663-Sur avances re\u00e7ues de l\u2019\u00c9tat": {}, + "1664-Sur avances re\u00e7ues et comptes courants bloqu\u00e9s": {}, + "1665-Sur d\u00e9p\u00f4ts et cautionnements re\u00e7us": {}, + "1667-Sur avances assorties de conditions particuli\u00e8res": {}, + "1668-Sur autres emprunts et dettes": {} + }, + "167-Avances assorties de conditions particuli\u00e8res": { + "1671-Avances bloqu\u00e9es pour augmentation du capital": {}, + "1672-Avances conditionn\u00e9es par l\u2019\u00c9tat": {}, + "1673-Avances conditionn\u00e9es par les autres organismes africains": {}, + "1674-Avances conditionn\u00e9es par les organismes internationaux": {} + }, + "168-Autres emprunts et dettes": { + "1681-Rentes viag\u00e8res capitalis\u00e9es": {}, + "1682-Billets de fonds": {}, + "1683-Dettes cons\u00e9cutives \u00e0 des titres emprunt\u00e9s": {}, + "1684-Emprunts participatifs": {}, + "1685-Participation des travailleurs aux b\u00e9n\u00e9fices": {}, + "1686-Emprunts et dettes contract\u00e9s aupr\u00e8s des autres tiers": {} + } + }, + "17-Dettes de location acquisition": { + "172-Dettes de location acquisition / cr\u00e9dit bail immobilier": {}, + "173-Dettes de location acquisition / cr\u00e9dit bail mobilier": {}, + "174-Dettes de location acquisition / location de vente": {}, + "176-Int\u00e9r\u00eats courus": { + "1762-Sur dettes de location acquisition / cr\u00e9dit-bail immobilier": {}, + "1763-Sur dettes de location acquisition / cr\u00e9dit-bail mobilier": {}, + "1764-Sur dettes de location acquisition / location-vente": {}, + "1768-Sur autres dettes de location acquisition": {} + }, + "178-Autres dettes de location acquisition": {} + }, + "18-Dettes li\u00e9es \u00e0 des participations et comptes de liaison des \u00e9tablissements et soci\u00e9t\u00e9s en participation": { + "181-Dettes li\u00e9es \u00e0 des participations": { + "1811-Dettes li\u00e9es \u00e0 des participations (groupe)": {}, + "1812-Dettes li\u00e9es \u00e0 des participations (hors groupe)": {} + }, + "182-Dettes li\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": {}, + "183-Int\u00e9r\u00eats courus sur dettes li\u00e9es \u00e0 des participations": {}, + "184-Comptes permanents bloqu\u00e9s des \u00e9tablissements et succursales": {}, + "185-Comptes permanents non bloqu\u00e9s des \u00e9tablissements et succursales": {}, + "186-Comptes de liaison charges": {}, + "187-Comptes de liaison produits": {}, + "188-Comptes de liaison des soci\u00e9t\u00e9s en participation": {} + }, + "19-Provisions pour risques et charges": { + "191-Provisions pour litiges": {}, + "192-Provisions pour garanties donn\u00e9es aux clients": {}, + "193-Provisions pour pertes sur march\u00e9s \u00e0 ach\u00e8vement futur": {}, + "194-Provisions pour pertes de change": {}, + "195-Provisions pour imp\u00f4ts": {}, + "196-Provisions pour pensions et obligations similaires": { + "1961-Provisions pour pensions et obligations similaires engagement de retraite": {}, + "1962-Actif du r\u00e9gime de retraite": {} + }, + "197-Provisions pour restructuration": {}, + "198-Autres provisions pour risques et charges": { + "1981-Provisions pour amendes et p\u00e9nalit\u00e9s": {}, + "1983-Provisions pour propre assureur": {}, + "1984-Provisions pour d\u00e9mant\u00e8lement et remise en \u00e9tat": {}, + "1985-Provisions pour droits \u00e0 r\u00e9duction ou avantage en nature (ch\u00e8ques cadeau, cartes de fid\u00e9lit\u00e9...)": {}, + "1988-Provisions pour divers risques et charges": {} + } + }, + "root_type": "Equity" + }, + "2-Comptes d\u2019actif immobilis\u00e9": { + "21-Immobilisations incorporelles": { + "account_type": "Fixed Asset", + "211-Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset" + }, + "212-Brevets, licences, concessions et droits similaires": { + "account_type": "Fixed Asset", + "2121-Brevets": { + "account_type": "Fixed Asset" + }, + "2122-Licences": { + "account_type": "Fixed Asset" + }, + "2123-Concessions de service public": { + "account_type": "Fixed Asset" + }, + "2128-Autres concessions et droits similaires": { + "account_type": "Fixed Asset" + } + }, + "213-Logiciels et sites internet": { + "account_type": "Fixed Asset", + "2131-Logiciels": { + "account_type": "Fixed Asset" + }, + "2132-Sites internet": { + "account_type": "Fixed Asset" + } + }, + "214-Marques": { + "account_type": "Fixed Asset" + }, + "215-Fonds commercial": { + "account_type": "Fixed Asset" + }, + "216-Droit au bail": { + "account_type": "Fixed Asset" + }, + "217-Investissements de cr\u00e9ation": { + "account_type": "Fixed Asset" + }, + "218-Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset", + "2181-Frais de prospection et d\u2019\u00e9valuation de ressources min\u00e9rales": { + "account_type": "Fixed Asset" + }, + "2182-Co\u00fbts d\u2019obtention du contrat": { + "account_type": "Fixed Asset" + }, + "2183-Fichiers clients, notices, titres de journaux et magazines": { + "account_type": "Fixed Asset" + }, + "2184-Co\u00fbts des franchises": { + "account_type": "Fixed Asset" + }, + "2188-Divers droits et valeurs incorporelles": { + "account_type": "Fixed Asset" + } + }, + "219-Immobilisations incorporelles en cours": { + "account_type": "Fixed Asset", + "2191-Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset" + }, + "2193-Logiciels et internet": { + "account_type": "Fixed Asset" + }, + "2198-Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset" + } + } + }, + "22-Terrains": { + "account_type": "Fixed Asset", + "221-Terrains agricoles et forestiers": { + "account_type": "Fixed Asset", + "2211-Terrains d\u2019exploitation agricole": { + "account_type": "Fixed Asset" + }, + "2212-Terrains d\u2019exploitation foresti\u00e8re": { + "account_type": "Fixed Asset" + }, + "2218-Autres terrains": { + "account_type": "Fixed Asset" + } + }, + "222-Terrains nus": { + "account_type": "Fixed Asset", + "2221-Terrains \u00e0 b\u00e2tir": { + "account_type": "Fixed Asset" + }, + "2228-Autres terrains nus": { + "account_type": "Fixed Asset" + } + }, + "223-Terrains b\u00e2tis": { + "account_type": "Fixed Asset", + "2231-Pour b\u00e2timents industriels et agricoles": { + "account_type": "Fixed Asset" + }, + "2232-Pour b\u00e2timents administratifs et commerciaux": { + "account_type": "Fixed Asset" + }, + "2234-Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations professionnelles": { + "account_type": "Fixed Asset" + }, + "2235-Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations non professionnelles": { + "account_type": "Fixed Asset" + }, + "2238-Autres terrains b\u00e2tis": { + "account_type": "Fixed Asset" + } + }, + "224-Travaux de mise en valeur des terrains": { + "account_type": "Fixed Asset", + "2241-Plantation d\u2019arbres et d\u2019arbustes": { + "account_type": "Fixed Asset" + }, + "2245-Am\u00e9liorations du fonds": { + "account_type": "Fixed Asset" + }, + "2248-Autres travaux": { + "account_type": "Fixed Asset" + } + }, + "225-Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset", + "2251-Carri\u00e8res": { + "account_type": "Fixed Asset" + } + }, + "226-Terrains am\u00e9nag\u00e9s": { + "account_type": "Fixed Asset", + "2261-Parkings": { + "account_type": "Fixed Asset" + } + }, + "227-Terrains mis en concession": { + "account_type": "Fixed Asset" + }, + "228-Autres terrains": { + "account_type": "Fixed Asset", + "2281-Terrains immeubles de placement": { + "account_type": "Fixed Asset" + }, + "2285-Terrains des logements affect\u00e9s au personnel": { + "account_type": "Fixed Asset" + }, + "2286-Terrains de location acquisition": { + "account_type": "Fixed Asset" + }, + "2288-Divers terrains": { + "account_type": "Fixed Asset" + } + }, + "229-Am\u00e9nagements de terrains en cours": { + "account_type": "Fixed Asset", + "2291-Terrains agricoles et forestiers": { + "account_type": "Fixed Asset" + }, + "2292-Terrains nus": { + "account_type": "Fixed Asset" + }, + "2295-Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset" + }, + "2298-Autres terrains": { + "account_type": "Fixed Asset" + } + } + }, + "23-B\u00e2timents, installations techniques et agencements": { + "231-B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "2311-B\u00e2timents industriels": {}, + "2312-B\u00e2timents agricoles": {}, + "2313-B\u00e2timents administratifs et commerciaux": {}, + "2314-B\u00e2timents affect\u00e9s au logement du personnel": {}, + "2315-B\u00e2timents immeubles de placement": {}, + "2316-B\u00e2timents de location acquisition": {} + }, + "232-B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "2321-B\u00e2timents industriels": {}, + "2322-B\u00e2timents agricoles": {}, + "2323-B\u00e2timents administratifs et commerciaux": {}, + "2324-B\u00e2timents affect\u00e9s au logement du personnel": {}, + "2325-B\u00e2timents immeubles de placement": {}, + "2326-B\u00e2timents de location acquisition": {} + }, + "233-Ouvrages d\u2019infrastructure": { + "2331-Voies de terre": {}, + "2332-Voies de fer": {}, + "2333-Voies d\u2019eau": {}, + "2334-Barrages, Digues": {}, + "2335-Pistes d\u2019a\u00e9rodrome": {}, + "2338-Autres ouvrages d\u2019infrastructures": {} + }, + "234-Am\u00e9nagements, agencements et installations techniques": { + "2341-Installations complexes sp\u00e9cialis\u00e9es sur sol propre": {}, + "2342-Installations complexes sp\u00e9cialis\u00e9es sur sol d\u2019autrui": {}, + "2343-Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol propre": {}, + "2344-Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol d\u2019autrui": {}, + "2345-Am\u00e9nagements et agencements des b\u00e2timents": {} + }, + "235-Am\u00e9nagements de bureaux": { + "2351-Installations g\u00e9n\u00e9rales": {}, + "2358-Autres am\u00e9nagements de bureaux": {} + }, + "237-B\u00e2timents industriels, agricoles et commerciaux mis en concession": {}, + "238-Autres installations et agencements": {}, + "239-B\u00e2timents am\u00e9nagements, agencements et installations en cours": { + "2391-B\u00e2timents en cours": {}, + "2392-Installations en cours": {}, + "2393-Ouvrages d\u2019infrastructure en cours": {}, + "2394-Am\u00e9nagements et agencements et installations techniques en cours": {}, + "2395-Am\u00e9nagements de bureaux en cours": {}, + "2398-Autres installations et agencements en cours": {} + } + }, + "24-Mat\u00e9riel, mobilier et actifs biologiques": { + "241-Mat\u00e9riel et outillage industriel et commercial": { + "2411-Mat\u00e9riel industriel": {}, + "2412-Outillage industriel": {}, + "2413-Mat\u00e9riel commercial": {}, + "2414-Outillage commercial": {}, + "2416-Mat\u00e9riel & outillage industriel et commercial de location-acquisition": {} + }, + "242-Mat\u00e9riel et outillage agricole": { + "2421-Mat\u00e9riel agricole": {}, + "2422-Outillage agricole": {}, + "2426-Mat\u00e9riel & outillage agricole de location-acquisition": {} + }, + "243-Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "244-Mat\u00e9riel et mobilier": { + "2441-Mat\u00e9riel de bureau": {}, + "2442-Mat\u00e9riel informatique": {}, + "2443-Mat\u00e9riel bureautique": {}, + "2444-Mobilier de bureau": {}, + "2445-Mat\u00e9riel et mobilier immeubles de placement": {}, + "2446-Mat\u00e9riel et mobilier de location acquisition": {}, + "2447-Mat\u00e9riel et mobilier des logements du personnel": {} + }, + "245-Mat\u00e9riel de transport": { + "2451-Mat\u00e9riel automobile": {}, + "2452-Mat\u00e9riel ferroviaire": {}, + "2453-Mat\u00e9riel fluvial, lagunaire": {}, + "2454-Mat\u00e9riel naval": {}, + "2455-Mat\u00e9riel a\u00e9rien": {}, + "2456-Mat\u00e9riel de transport de location-acquisition": {}, + "2457-Mat\u00e9riel hippomobile": {}, + "2458-Autres mat\u00e9riels de transport": {} + }, + "246-Actifs biologiques": { + "2461-Cheptel, animaux de trait": {}, + "2462-Cheptel, animaux reproducteurs": {}, + "2463-Animaux de garde": {}, + "2465-Plantations agricoles": {}, + "2468-Autres actifs biologiques": {} + }, + "247-Agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "2471-Agencements et am\u00e9nagements du mat\u00e9riel": {}, + "2472-Agencements et am\u00e9nagements des actifs biologiques": {}, + "2478-Autres agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": {} + }, + "248-Autres mat\u00e9riels et mobiliers": { + "2481-Collections et \u0153uvres d\u2019art": {}, + "2488-Divers mat\u00e9riels mobiliers": {} + }, + "249-Mat\u00e9riels et actifs biologiques en cours": { + "2491-Mat\u00e9riel et outillage industriel et commercial": {}, + "2492-Mat\u00e9riel et outillage agricole": {}, + "2493-Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "2494-Mat\u00e9riel et mobilier de bureau": {}, + "2495-Mat\u00e9riel de transport": {}, + "2496-Actifs biologiques": {}, + "2497-Agencements am\u00e9nagements du mat\u00e9riel et actifs biologiques": {}, + "2498-Autres mat\u00e9riels et actifs biologiques en cours": {} + } + }, + "25-Avances et acomptes vers\u00e9s sur immobilisations": { + "251-Avances et acomptes vers\u00e9s sur immobilisations incorporelles": {}, + "252-Avances et acomptes vers\u00e9s sur immobilisations corporelles": {} + }, + "26-Titres de participation": { + "261-Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": {}, + "262-Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le conjoint": {}, + "263-Titres de participation dans des soci\u00e9t\u00e9s conf\u00e9rant une influence notable": {}, + "265-Participations dans des organismes professionnels": {}, + "266-Parts dans des groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": {}, + "268-Autres titres de participation": {} + }, + "27-Autres immobilisations financi\u00e8res": { + "271-Pr\u00eats et cr\u00e9ances": { + "2711-Pr\u00eats participatifs": {}, + "2712-Pr\u00eats aux associ\u00e9s": {}, + "2713-Billets de fonds": {}, + "2714-Titres pr\u00eat\u00e9s": {}, + "2718-Autres pr\u00eats et cr\u00e9ances": {} + }, + "272-Pr\u00eats au personnel": { + "2721-Pr\u00eats immobiliers": {}, + "2722-Pr\u00eats mobiliers et d\u2019installation": {}, + "2728-Autres pr\u00eats au personnel": {} + }, + "273-Cr\u00e9ances sur l\u2019\u00c9tat": { + "2731-Retenues de garantie": {}, + "2733-Fonds r\u00e9glement\u00e9": {}, + "2734-Cr\u00e9ances sur le conc\u00e9dant": {}, + "2738-Autres cr\u00e9ances sur l\u2019\u00c9tat": {} + }, + "274-Titres immobilis\u00e9s": { + "2741-Titres immobilis\u00e9s de l\u2019activit\u00e9 de portefeuille (TIAP)": {}, + "2742-Titres participatifs": {}, + "2743-Certificats d\u2019investissement": {}, + "2744-Parts de fonds commun de placement (FCP)": {}, + "2745-Obligations": {}, + "2746-Actions ou parts propres": {}, + "2748-Autres titres immobilis\u00e9s": {} + }, + "275-D\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "2751-D\u00e9p\u00f4ts pour loyers d\u2019avance": {}, + "2752-D\u00e9p\u00f4ts pour l\u2019\u00e9lectricit\u00e9": {}, + "2753-D\u00e9p\u00f4ts pour l\u2019eau": {}, + "2754-D\u00e9p\u00f4ts pour le gaz": {}, + "2755-D\u00e9p\u00f4ts pour le t\u00e9l\u00e9phone, le t\u00e9lex, la t\u00e9l\u00e9copie": {}, + "2756-Cautionnements sur march\u00e9s publics": {}, + "2757-Cautionnements sur autres op\u00e9rations": {}, + "2758-Autres d\u00e9p\u00f4ts et cautionnements": {} + }, + "276-Int\u00e9r\u00eats courus": { + "2761-Pr\u00eats et cr\u00e9ances non commerciales": {}, + "2762-Pr\u00eats au personnel": {}, + "2763-Cr\u00e9ances sur l\u2019\u00c9tat": {}, + "2764-Titres immobilis\u00e9s": {}, + "2765-D\u00e9p\u00f4ts et cautionnements vers\u00e9s": {}, + "2767-Cr\u00e9ances rattach\u00e9es \u00e0 des participations": {}, + "2768-Immobilisations financi\u00e8res diverses": {} + }, + "277-Cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": { + "2771-Cr\u00e9ances rattach\u00e9es \u00e0 des participations (groupe)": {}, + "2772-Cr\u00e9ances rattach\u00e9es \u00e0 des participations (hors groupe)": {}, + "2773-Cr\u00e9ances rattach\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": {}, + "2774-Avances \u00e0 des Groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": {} + }, + "278-Immobilisations financi\u00e8res diverses": { + "2781-Cr\u00e9ances diverses groupe": {}, + "2782-Cr\u00e9ances diverses hors groupe": {}, + "2784-Banques d\u00e9p\u00f4ts \u00e0 terme": {}, + "2785-Or et m\u00e9taux pr\u00e9cieux": {}, + "2788-Autres immobilisations financi\u00e8res": {} + } + }, + "28-Amortissements": { + "account_type": "Accumulated Depreciation", + "281-Amortissements des immobilisations corporelles": { + "account_type": "Accumulated Depreciation", + "2811-Amortissements des frais de d\u00e9veloppement": { + "account_type": "Accumulated Depreciation" + }, + "2812-Amortissements des brevets, licences, concessions et droits similaires": { + "account_type": "Accumulated Depreciation" + }, + "2813-Amortissements des logiciels et sites internet": { + "account_type": "Accumulated Depreciation" + }, + "2814-Amortissements des marques": { + "account_type": "Accumulated Depreciation" + }, + "2815-Amortissements du fonds commercial": { + "account_type": "Accumulated Depreciation" + }, + "2816-Amortissements du droit au bail": { + "account_type": "Accumulated Depreciation" + }, + "2817-Amortissements des investissements de cr\u00e9ation": { + "account_type": "Accumulated Depreciation" + }, + "2818-Amortissements des autres droits et valeurs incorporels": { + "account_type": "Accumulated Depreciation" + } + }, + "282-Amortissements des terrains": { + "2824-Amortissements des travaux de mise en valeur des terrains": {} + }, + "283-Amortissements des b\u00e2timents, installations techniques et agencements": { + "2831-Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": {}, + "2832-Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": {}, + "2833-Amortissements des ouvrages d\u2019infrastructure": {}, + "2834-Amortissements des am\u00e9nagements, agencements et installations techniques": {}, + "2835-Amortissements des am\u00e9nagements de bureaux": {}, + "2837-Amortissements des b\u00e2timents industriels, agricoles et commerciaux mis en concession": {}, + "2838-Amortissements des autres installations et agencements": {} + }, + "284-Amortissements du mat\u00e9riel": { + "2841-Amortissements du mat\u00e9riel et outillage industriel et commercial": {}, + "2842-Amortissements du mat\u00e9riel et outillage agricole": {}, + "2843-Amortissements du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "2844-Amortissements du mat\u00e9riel et mobilier": {}, + "2845-Amortissements du mat\u00e9riel de transport": {}, + "2846-Amortissements des actifs biologiques": {}, + "2847-Amortissements des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": {}, + "2848-Amortissements des autres mat\u00e9riels": {} + } + }, + "29-D\u00e9pr\u00e9ciations des immobilisations": { + "291-D\u00e9pr\u00e9ciations des immobilisations incorporelles": { + "2911-D\u00e9pr\u00e9ciations des frais de d\u00e9veloppement": {}, + "2912-D\u00e9pr\u00e9ciations des brevets, licences, concessions et droits similaires": {}, + "2913-D\u00e9pr\u00e9ciations des logiciels et sites internet": {}, + "2914-D\u00e9pr\u00e9ciations des marques": {}, + "2915-D\u00e9pr\u00e9ciations du fonds commercial": {}, + "2916-D\u00e9pr\u00e9ciations du droit au bail": {}, + "2917-D\u00e9pr\u00e9ciations des investissements de cr\u00e9ation": {}, + "2918-D\u00e9pr\u00e9ciations des autres droits et valeurs incorporels": {}, + "2919-D\u00e9pr\u00e9ciations des immobilisations incorporelles en cours": {} + }, + "292-D\u00e9pr\u00e9ciations des terrains": { + "2921-D\u00e9pr\u00e9ciations des terrains agricoles et forestiers": {}, + "2922-D\u00e9pr\u00e9ciations des terrains nus": {}, + "2923-D\u00e9pr\u00e9ciations des terrains b\u00e2tis": {}, + "2924-D\u00e9pr\u00e9ciations des travaux de mise en valeur des terrains": {}, + "2925-D\u00e9pr\u00e9ciations des terrains de gisement": {}, + "2926-D\u00e9pr\u00e9ciations des terrains am\u00e9nag\u00e9s": {}, + "2927-D\u00e9pr\u00e9ciations des terrains mis en concession": {}, + "2928-D\u00e9pr\u00e9ciations des autres terrains": {}, + "2929-D\u00e9pr\u00e9ciations des am\u00e9nagements de terrains en cours": {} + }, + "293-D\u00e9pr\u00e9ciations des b\u00e2timents, installations techniques et agencements": { + "2931-D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": {}, + "2932-D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": {}, + "2933-D\u00e9pr\u00e9ciations des ouvrages d\u2019infrastructures": {}, + "2934-D\u00e9pr\u00e9ciations des am\u00e9nagements, agencements et installations techniques": {}, + "2935-D\u00e9pr\u00e9ciations des am\u00e9nagements de bureaux": {}, + "2937-D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles et commerciaux mis en concession": {}, + "2938-D\u00e9pr\u00e9ciations des autres installations et agencements": {}, + "2939-D\u00e9pr\u00e9ciations des b\u00e2timents et installations en cours": {} + }, + "294-D\u00e9pr\u00e9ciations de mat\u00e9riel, du mobilier et de l\u2019actif biologique": { + "2941-D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage industriel et commercial": {}, + "2942-D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage agricole": {}, + "2943-D\u00e9pr\u00e9ciations du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "2944-D\u00e9pr\u00e9ciations du mat\u00e9riel et mobilier": {}, + "2945-D\u00e9pr\u00e9ciations du mat\u00e9riel de transport": {}, + "2946-D\u00e9pr\u00e9ciations des actifs biologiques": {}, + "2947-D\u00e9pr\u00e9ciations des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": {}, + "2948-D\u00e9pr\u00e9ciations des autres mat\u00e9riels": {}, + "2949-D\u00e9pr\u00e9ciations de mat\u00e9riel en cours": {} + }, + "295-D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations": { + "2951-D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations incorporelles": {}, + "2952-D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations corporelles": {} + }, + "296-D\u00e9pr\u00e9ciations des titres de participation": { + "2961-D\u00e9pr\u00e9ciations des titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": {}, + "2962-D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s sous contr\u00f4le conjoint": {}, + "2963-D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s conf\u00e9rant une influence notable": {}, + "2965-D\u00e9pr\u00e9ciations des participations dans des organismes professionnels": {}, + "2966-D\u00e9pr\u00e9ciations des parts dans des GIE": {}, + "2968-D\u00e9pr\u00e9ciations des autres titres de participation": {} + }, + "297-D\u00e9pr\u00e9ciations des autres immobilisations financi\u00e8res": { + "2971-D\u00e9pr\u00e9ciations des pr\u00eats et cr\u00e9ances": {}, + "2972-D\u00e9pr\u00e9ciations des pr\u00eats au personnel": {}, + "2973-D\u00e9pr\u00e9ciations des cr\u00e9ances sur l\u2019\u00c9tat": {}, + "2974-D\u00e9pr\u00e9ciations des titres immobilis\u00e9s": {}, + "2975-D\u00e9pr\u00e9ciations des d\u00e9p\u00f4ts et cautionnements vers\u00e9s": {}, + "2977-D\u00e9pr\u00e9ciations des cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": {}, + "2978-D\u00e9pr\u00e9ciations des cr\u00e9ances financi\u00e8res diverses": {} + } + }, + "root_type": "Asset" + }, + "3-Comptes de Stocks": { + "31-Marchandises": { + "311-Marchandises A": { + "3111-Marchandises A1": {}, + "3112-Marchandises A2": {} + }, + "312-Marchandises B": { + "3121-Marchandises B1": {}, + "3122-Marchandises B2": {} + }, + "313-Actifs biologiques": { + "3131-Animaux": {}, + "3132-V\u00e9g\u00e9taux": {} + }, + "318-Marchandises hors activit\u00e9s ordinaires (HAO)": {} + }, + "32-Mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "321-Mati\u00e8res A": {}, + "322-Mati\u00e8res B": {}, + "323-Fournitures (A, B)": {} + }, + "33-Autres approvisionnements": { + "331-Mati\u00e8res consommables": {}, + "332-Fournitures d\u2019atelier et d\u2019usine": {}, + "333-Fournitures de magasin": {}, + "334-Fournitures de bureau": {}, + "335-Emballages": { + "3351-Emballages perdus": {}, + "3352-Emballages r\u00e9cup\u00e9rables non identifiables": {}, + "3353-Emballages \u00e0 usage mixte": {}, + "3358-Autres emballages": {} + }, + "338-Autres mati\u00e8res": {} + }, + "34-Produits en cours": { + "341-Produits en cours": { + "3411-Produits en cours P1": {}, + "3412-Produits en cours P2": {} + }, + "342-Travaux en cours": { + "3421-Travaux en cours T1": {}, + "3422-Travaux en cours T2": {} + }, + "343-Produits interm\u00e9diaires en cours": { + "3431-Produits interm\u00e9diaires A": {}, + "3432-Produits interm\u00e9diaires B": {} + }, + "344-Produits r\u00e9siduels en cours": { + "3441-Produits r\u00e9siduels A": {}, + "3442-Produits r\u00e9siduels B": {} + }, + "345-Actifs biologiques en cours": { + "3451-Animaux": {}, + "3452-V\u00e9g\u00e9taux": {} + } + }, + "35-Services en cours": { + "351-\u00c9tudes en cours": { + "3511-\u00c9tudes en cours E1": {}, + "3512-\u00c9tudes en cours E2": {} + }, + "352-Prestations de services en cours": { + "3521-Prestations de services S1": {}, + "3522-Prestations de services S2": {} + } + }, + "36-Produits finis": { + "361-Produits finis A": {}, + "362-Produits finis B": {}, + "363-Actifs biologiques": { + "3631-Animaux": {}, + "3632-V\u00e9g\u00e9taux": {}, + "3638-Autres stocks (activit\u00e9s annexes)": {} + } + }, + "37-Produits interm\u00e9diaires et r\u00e9siduels": { + "371-Produits interm\u00e9diaires": { + "3711-Produits interm\u00e9diaires A": {}, + "3712-Produits interm\u00e9diaires B": {} + }, + "372-Produits r\u00e9siduels": { + "3721-D\u00e9chets": {}, + "3722-Rebuts": {}, + "3723-Mati\u00e8res de R\u00e9cup\u00e9ration": {} + }, + "373-Actifs biologiques": { + "3731-Animaux": {}, + "3732-V\u00e9g\u00e9taux": {}, + "3738-Autres stocks (activit\u00e9s annexes)": {} + } + }, + "38-Stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": { + "account_type": "Stock", + "381-Marchandises en cours de route": {}, + "382-Mati\u00e8res premi\u00e8res et fournitures li\u00e9es en cours de route": {}, + "383-Autres approvisionnements en cours de route": {}, + "386-Produits finis en cours de route": {}, + "387-Stock en consignation ou en d\u00e9p\u00f4t": { + "3871-Stock en consignation": {}, + "3872-Stock en d\u00e9p\u00f4t": {} + }, + "388-Stock provenant d\u2019immobilisations mises hors service ou au rebut": {} + }, + "39-D\u00e9pr\u00e9ciations des stocks et encours de production": { + "391-D\u00e9pr\u00e9ciations des stocks de marchandises": {}, + "392-D\u00e9pr\u00e9ciations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": {}, + "393-D\u00e9pr\u00e9ciations des stocks d\u2019autres approvisionnements": {}, + "394-D\u00e9pr\u00e9ciations des productions en cours": {}, + "395-D\u00e9pr\u00e9ciations des services en cours": {}, + "396-D\u00e9pr\u00e9ciations des stocks de produits finis": {}, + "397-D\u00e9pr\u00e9ciations des stocks de produits interm\u00e9diaires et r\u00e9siduels": {}, + "398-D\u00e9pr\u00e9ciations des stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": {} + }, + "root_type": "Asset" + }, + "4-Comptes de Tiers (ACTIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (ACTIF)": { + "409-Fournisseurs d\u00e9biteurs": { + "4091-Fournisseurs Avances et acomptes vers\u00e9s": {}, + "4092-Fournisseurs Groupe avances et acomptes vers\u00e9s": {}, + "4093-Fournisseurs Sous-traitants avances et acomptes vers\u00e9s": {}, + "4094-Fournisseurs Cr\u00e9ances pour emballages et mat\u00e9riels \u00e0 rendre": {}, + "4098-Fournisseurs Rabais, remises, ristournes et autres avoirs \u00e0 obtenir": {} + } + }, + "41-Clients et comptes rattach\u00e9s (ACTIF)": { + "411-Clients": { + "4111-Clients": { + "account_type": "Receivable" + }, + "4112-Clients groupe": { + "account_type": "Receivable" + }, + "4114-Clients, \u00c9tat et Collectivit\u00e9s publiques": { + "account_type": "Receivable" + }, + "4115-Clients, organismes internationaux": { + "account_type": "Receivable" + }, + "4116-Clients, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Receivable" + }, + "4117-Client, retenues de garantie": { + "account_type": "Receivable" + }, + "4118-Clients, d\u00e9gr\u00e8vement de taxes sur la valeur ajout\u00e9e (TVA)": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "412-Clients, effets \u00e0 recevoir en portefeuille": { + "4121-Clients, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "4122-Clients Groupe, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "4124-\u00c9tat et Collectivit\u00e9s publiques, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "4125-Organismes Internationaux, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "413-Clients, ch\u00e8ques, effets et autres valeurs impay\u00e9es": { + "4131-Clients, ch\u00e8ques impay\u00e9s": { + "account_type": "Receivable" + }, + "4132-Clients, effets impay\u00e9s": { + "account_type": "Receivable" + }, + "4133-Clients, cartes de cr\u00e9dit impay\u00e9es": { + "account_type": "Receivable" + }, + "4138-Clients, autres valeurs impay\u00e9es": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "414-Cr\u00e9ances sur cessions courantes d\u2019immobilisations": { + "4141-Cr\u00e9ances en compte, immobilisations incorporelles": { + "account_type": "Receivable" + }, + "4142-Cr\u00e9ances en compte, immobilisations corporelles": { + "account_type": "Receivable" + }, + "4146-Effets \u00e0 recevoir, immobilisations incorporelles": { + "account_type": "Receivable" + }, + "4147-Effets \u00e0 recevoir, immobilisations corporelles": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "415-Clients, effets escompt\u00e9s non \u00e9chus": { + "account_type": "Receivable" + }, + "416-Cr\u00e9ances clients litigieuses ou douteuses": { + "4161-Cr\u00e9ances litigieuses": { + "account_type": "Receivable" + }, + "4162-Cr\u00e9ances douteuses": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "418-Clients, produits \u00e0 recevoir": { + "4181-Clients, factures \u00e0 \u00e9tablir": { + "account_type": "Receivable" + }, + "4186-Clients, int\u00e9r\u00eats courus": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "42-Personnel (ACTIF)": { + "421-Personnel, avances et acomptes": { + "4211-Personnel, avances": {}, + "4212-Personnel, acomptes": {}, + "4213-Frais avanc\u00e9s et fournitures au personnel": {} + } + }, + "43-Organismes sociaux (ACTIF)": { + "431-S\u00e9curit\u00e9 sociale": { + "4311-Prestations familiales": {}, + "4312-Accidents de travail": {}, + "4313-Caisse de retraite obligatoire": {}, + "4314-Caisse de retraite facultative": {}, + "4318-Autres cotisations sociales": {} + }, + "432-Caisses de retraite compl\u00e9mentaire": {}, + "433-Autres organismes sociaux": { + "4331-Mutuelle": {}, + "4332-Assurances retraite": {}, + "4333-Assurances et organismes de sant\u00e9": {} + }, + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "4387-Produits \u00e0 recevoir": {} + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (ACTIF)": { + "443-\u00c9tat, TVA factur\u00e9e": { + "4431-TVA factur\u00e9e sur ventes": {}, + "4432-TVA factur\u00e9e sur prestations de services": {}, + "4433-TVA factur\u00e9e sur travaux": {}, + "4434-TVA factur\u00e9e sur production livr\u00e9e \u00e0 soi-m\u00eame": {}, + "4435-TVA sur factures \u00e0 \u00e9tablir": {} + }, + "445-\u00c9tat, TVA r\u00e9cup\u00e9rable": { + "4451-TVA r\u00e9cup\u00e9rable sur immobilisations": {}, + "4452-TVA r\u00e9cup\u00e9rable sur achats": {}, + "4453-TVA r\u00e9cup\u00e9rable sur transport": {}, + "4454-TVA r\u00e9cup\u00e9rable sur services ext\u00e9rieurs et autres charges": {}, + "4455-TVA r\u00e9cup\u00e9rable sur factures non parvenues": {}, + "4456-TVA transf\u00e9r\u00e9e par d\u2019autres entit\u00e9s": {} + }, + "448-\u00c9tat, charges \u00e0 payer et produits \u00e0 recevoir": { + "4486-Charges \u00e0 payer": {}, + "4487-Produits \u00e0 recevoir": {} + }, + "449-\u00c9tat, cr\u00e9ances et dettes diverses": { + "4491-\u00c9tat, obligations cautionn\u00e9es": {}, + "4492-\u00c9tat, avances et acomptes vers\u00e9s sur imp\u00f4ts": {}, + "4493-\u00c9tat, fonds de dotation \u00e0 recevoir": {}, + "4494-\u00c9tat, subventions investissement \u00e0 recevoir": {}, + "4495-\u00c9tat, subventions d\u2019exploitation \u00e0 recevoir": {}, + "4496-\u00c9tat, subventions d\u2019\u00e9quilibre \u00e0 recevoir": {}, + "4497-\u00c9tat, avances sur subventions": {}, + "4499-\u00c9tat, fonds r\u00e9glement\u00e9s provisionn\u00e9s": {} + } + }, + "45-Organismes internationaux (ACTIF)": { + "451-Op\u00e9rations avec les organismes africains": {}, + "452-Op\u00e9rations avec les autres organismes internationaux": {}, + "458-Organismes internationaux, fonds de dotation et subventions \u00e0 recevoir": { + "4581-Organismes internationaux, fonds de dotation \u00e0 recevoir": {}, + "4582-Organismes internationaux, subventions \u00e0 recevoir": {} + } + }, + "46-Apporteurs, associ\u00e9s et groupe (ACTIF)": { + "461-Apporteurs, op\u00e9rations sur le capital": { + "4613-Apporteurs, capital appel\u00e9, non vers\u00e9": {}, + "4614-Apporteurs, compte d\u2019apport, op\u00e9rations de restructuration (fusion...)": {}, + "4618-Apporteurs, titres \u00e0 \u00e9changer": {} + }, + "467-Apporteurs, restant d\u00fb sur capital appel\u00e9": {} + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (ACTIF)": { + "472-Cr\u00e9ances et dettes sur titres de placement": { + "4721-Cr\u00e9ances sur cessions de titres de placement": {}, + "4726-Versements restant \u00e0 effectuer sur titres de placement non lib\u00e9r\u00e9s": {} + }, + "473-Interm\u00e9diaires Op\u00e9rations faites pour compte de tiers": { + "4731-Mandants": {}, + "4732-Mandataires": {}, + "4733-Commettants": {}, + "4734-Commissionnaires": {}, + "4739-\u00c9tat, Collectivit\u00e9s publiques, fonds global d\u2019allocation": {} + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits": { + "4747-Compte de r\u00e9partition p\u00e9riodique des produits": {} + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA": { + "4751-Compte actif": { + "account_type": "Temporary" + } + }, + "476-Charges constat\u00e9es d\u2019avance": {}, + "478-\u00c9carts de conversion actif": { + "4781-Diminution des cr\u00e9ances d\u2019exploitation": {}, + "4782-Diminution des cr\u00e9ances financi\u00e8res": {}, + "4783-Augmentation des dettes d\u2019exploitation": {}, + "4784-Augmentation des dettes financi\u00e8res": {}, + "4786-Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": {}, + "4788-Diff\u00e9rences compens\u00e9es par couverture de change": {} + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (ACTIF)": { + "485-Cr\u00e9ances sur cessions d\u2019immobilisations": { + "4851-En compte, immobilisations incorporelles": {}, + "4852-En compte, immobilisations corporelles": {}, + "4853-Effets \u00e0 recevoir, immobilisations incorporelles": {}, + "4854-Effets \u00e0 recevoir, immobilisations corporelles": {}, + "4855-Effets escompt\u00e9s non \u00e9chus": {}, + "4857-Retenues de garantie": {}, + "4858-Factures \u00e0 \u00e9tablir": {} + }, + "488-Autres cr\u00e9ances hors activit\u00e9s ordinaires (HAO)": {} + }, + "49-D\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme (tiers) (ACTIF)": { + "491-D\u00e9pr\u00e9ciations des comptes clients": { + "4911-Cr\u00e9ances litigieuses": {}, + "4912-Cr\u00e9ances douteuses": {} + }, + "495-D\u00e9pr\u00e9ciations des comptes organismes internationaux": {}, + "496-D\u00e9pr\u00e9ciations des comptes apporteurs, associ\u00e9s et groupe": { + "4962-Associ\u00e9s, comptes courants": {}, + "4963-Associ\u00e9s, op\u00e9rations faites en commun": {}, + "4966-Groupe, comptes courants": {} + }, + "497-D\u00e9pr\u00e9ciations des comptes d\u00e9biteurs divers": {}, + "498-D\u00e9pr\u00e9ciations des comptes de cr\u00e9ances HAO": { + "4985-Cr\u00e9ances sur cessions d\u2019immobilisations": {}, + "4986-Cr\u00e9ances sur cessions de titres de placement": {}, + "4988-Autres cr\u00e9ances HAO": {} + }, + "499-Provisions pour risques \u00e0 court terme": { + "4991-Sur op\u00e9rations d\u2019exploitation": {}, + "4997-Sur op\u00e9rations financi\u00e8res": {}, + "4998-Sur op\u00e9rations HAO": {} + } + }, + "root_type": "Asset" + }, + "4-Comptes de Tiers (PASSIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (PASSIF)": { + "401-Fournisseurs, dettes en compte": { + "4011-Fournisseurs": { + "account_type": "Payable" + }, + "4012-Fournisseurs groupe": { + "account_type": "Payable" + }, + "4013-Fournisseurs sous-traitants": { + "account_type": "Payable" + }, + "4016-Fournisseurs, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Payable" + }, + "4017-Fournisseur, retenues de garantie": { + "account_type": "Payable" + }, + "account_type": "Payable" + }, + "402-Fournisseurs, effets \u00e0 payer": { + "4021-Fournisseurs Effets \u00e0 payer": { + "account_type": "Payable" + }, + "4022-Fournisseurs Groupe, effets \u00e0 payer": { + "account_type": "Payable" + }, + "4023-Fournisseurs Sous-traitants, effets \u00e0 payer": { + "account_type": "Payable" + }, + "account_type": "Payable" + }, + "404-Fournisseurs, acquisitions courantes d\u2019immobilisations": { + "4041-Fournisseurs Dettes en comptes, immobilisations incorporelles": { + "account_type": "Payable" + }, + "4042-Fournisseurs Dettes en comptes, immobilisations corporelles": { + "account_type": "Payable" + }, + "4046-Fournisseurs Effets \u00e0 payer, immobilisations incorporelles": { + "account_type": "Payable" + }, + "4047-Fournisseurs Effets \u00e0 payer, immobilisations corporelles": { + "account_type": "Payable" + }, + "account_type": "Payable" + }, + "408-Fournisseurs, factures non parvenues": { + "4081-Fournisseurs": { + "account_type": "Stock Received But Not Billed" + }, + "4082-Fournisseurs groupe": { + "account_type": "Stock Received But Not Billed" + }, + "4083-Fournisseurs sous-traitants": { + "account_type": "Stock Received But Not Billed" + }, + "4086-Fournisseurs, int\u00e9r\u00eats courus": { + "account_type": "Stock Received But Not Billed" + }, + "account_type": "Stock Received But Not Billed" + }, + "account_type": "Payable" + }, + "41-Clients et comptes rattach\u00e9s (PASSIF)": { + "419-Clients cr\u00e9diteurs": { + "4191-Clients, avances et acomptes re\u00e7us": {}, + "4192-Clients groupe, avances et acomptes re\u00e7us": {}, + "4194-Clients, dettes pour emballages et mat\u00e9riels consign\u00e9s": {}, + "4198-Clients, rabais, remises, ristournes et autres avoirs \u00e0 accorder": {} + } + }, + "42-Personnel (PASSIF)": { + "422-Personnel, r\u00e9mun\u00e9rations dues": {}, + "423-Personnel, oppositions, saisies-arr\u00eats": { + "4231-Personnel, oppositions": {}, + "4232-Personnel, saisies-arr\u00eats": {}, + "4233-Personnel, avis \u00e0 tiers d\u00e9tenteur": {} + }, + "424-Personnel, \u0153uvres sociales internes": { + "4241-Assistance m\u00e9dicale": {}, + "4242-Allocations familiales": {}, + "4245-Organismes sociaux rattach\u00e9s \u00e0 l\u2019entit\u00e9": {}, + "4248-Autres \u0153uvres sociales internes": {} + }, + "425-Repr\u00e9sentants du personnel": { + "4251-D\u00e9l\u00e9gu\u00e9s du personnel": {}, + "4252-Syndicats et Comit\u00e9s d\u2019entreprises, d\u2019\u00c9tablissement": {}, + "4258-Autres repr\u00e9sentants du personnel": {} + }, + "426-Personnel, participation aux b\u00e9n\u00e9fices et au capital": { + "4261-Participation aux b\u00e9n\u00e9fices": {}, + "4264-Participation au capital": {} + }, + "427-Personnel d\u00e9p\u00f4ts": {}, + "428-Personnel, charges \u00e0 payer et produits \u00e0 recevoir": { + "4281-Dettes provisionn\u00e9es pour cong\u00e9s \u00e0 payer": {}, + "4286-Autres charges \u00e0 payer": {}, + "4287-Produits \u00e0 recevoir": {} + } + }, + "43-Organismes sociaux (PASSIF)": { + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "4381-Charges sociales sur gratifications \u00e0 payer": {}, + "4382-Charges sociales sur cong\u00e9s \u00e0 payer": {}, + "4386-Autres charges \u00e0 payer": {} + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (PASSIF)": { + "441-\u00c9tat, imp\u00f4t sur les b\u00e9n\u00e9fices": {}, + "442-\u00c9tat, autres imp\u00f4ts et taxes": { + "4421-Imp\u00f4ts et taxes d\u2019\u00c9tat": {}, + "4422-Imp\u00f4ts et taxes pour les collectivit\u00e9s publiques": {}, + "4423-Imp\u00f4ts et taxes recouvrables sur des obligataires": {}, + "4424-Imp\u00f4ts et taxes recouvrables sur des associ\u00e9s": {}, + "4426-Droits de douane": {}, + "4428-Autres imp\u00f4ts et taxes": {} + }, + "444-\u00c9tat, TVA due ou cr\u00e9dit de TVA": { + "4441-\u00c9tat, TVA due": {}, + "4449-\u00c9tat, cr\u00e9dit de TVA \u00e0 reporter": {} + }, + "446-\u00c9tat, autres taxes sur le chiffre d\u2019affaires": {}, + "447-\u00c9tat, imp\u00f4ts retenus \u00e0 la source": { + "4471-Imp\u00f4t G\u00e9n\u00e9ral sur le revenu": {}, + "4472-Imp\u00f4ts sur salaires": {}, + "4473-Contribution nationale": {}, + "4474-Contribution nationale de solidarit\u00e9": {}, + "4478-Autres imp\u00f4ts et contributions": {} + } + }, + "46-Apporteurs, associ\u00e9s et groupe (PASSIF)": { + "461-Apporteurs, op\u00e9rations sur le capital (PASSIF)": { + "4611-Apporteurs, apports en nature": {}, + "4612-Apporteurs, apports en num\u00e9raire": {}, + "4615-Apporteurs, versements re\u00e7us sur augmentation de capital": {}, + "4616-Apporteurs, versements anticip\u00e9s": {}, + "4617-Apporteurs d\u00e9faillants": {}, + "4619-Apporteurs, capital \u00e0 rembourser": {} + }, + "462-Associ\u00e9s, comptes courants": { + "4621-Principal": {}, + "4626-Int\u00e9r\u00eats courus": {} + }, + "463-Associ\u00e9s, op\u00e9rations faites en commun et GIE": { + "4631-Op\u00e9rations courantes": {}, + "4636-Int\u00e9r\u00eats courus": {} + }, + "465-Associ\u00e9s, dividendes \u00e0 payer": {}, + "466-Groupe, comptes courants": {} + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (PASSIF)": { + "471-D\u00e9biteurs et cr\u00e9diteurs divers": { + "4711-D\u00e9biteurs divers": {}, + "4712-Cr\u00e9diteurs divers": {}, + "4713-Obligataires": {}, + "4715-R\u00e9mun\u00e9rations d\u2019administrateurs": {}, + "4716-Compte d\u2019affacturage": {}, + "4717-D\u00e9biteurs divers retenues de garantie": {}, + "4718-Apport, compte de fusion et op\u00e9rations assimil\u00e9es": {}, + "4719-Bons de souscription d\u2019actions et d\u2019obligations": {} + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits (PASSIF)": { + "4746-Compte de r\u00e9partition p\u00e9riodique des charges": {} + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA (PASSIF)": { + "4752-Compte passif": {} + }, + "477-Produits constat\u00e9s d\u2019avance": {}, + "479-\u00c9carts de conversion passif": { + "4791-Augmentation des cr\u00e9ances d\u2019exploitation": {}, + "4792-Augmentation des cr\u00e9ances financi\u00e8res": {}, + "4793-Diminution des dettes d\u2019exploitation": {}, + "4794-Diminution des dettes financi\u00e8res": {}, + "4797-Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": {}, + "4798-Diff\u00e9rences compens\u00e9es par couverture de change": {} + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (HAO) (PASSIF)": { + "481-Fournisseurs d\u2019investissements": { + "4811-Immobilisations incorporelles": {}, + "4812-Immobilisations corporelles": {}, + "4813-Versements restant \u00e0 effectuer sur titres de participation et titres immobilis\u00e9s non lib\u00e9r\u00e9s": {}, + "4816-R\u00e9serve de propri\u00e9t\u00e9": {}, + "4817-Retenues de garantie": {}, + "4818-Factures non parvenues": {} + }, + "482-Fournisseurs d\u2019investissements, effets \u00e0 payer": { + "4821-Immobilisations incorporelles": {}, + "4822-Immobilisations corporelles": {} + }, + "484-Autres dettes hors activit\u00e9s ordinaires (HAO)": { + "4887-Produits": {} + } + }, + "49-D\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme (tiers) (PASSIF)": { + "490-D\u00e9pr\u00e9ciations des comptes fournisseurs": {}, + "492-D\u00e9pr\u00e9ciations des comptes personnel": {}, + "493-D\u00e9pr\u00e9ciations des comptes organismes sociaux": {}, + "494-D\u00e9pr\u00e9ciations des comptes \u00c9tat et collectivit\u00e9s publiques": {}, + "495-D\u00e9pr\u00e9ciations des comptes organismes internationaux": {} + }, + "root_type": "Liability" + }, + "5-Comptes de tr\u00e9sorerie": { + "50-Titres de placement": { + "501-Titres du tr\u00e9sor et bons de caisse \u00e0 court terme": { + "5011-Titres du Tr\u00e9sor \u00e0 court terme": {}, + "5012-Titres d\u2019organismes financiers": {}, + "5013-Bons de caisse \u00e0 court terme": {}, + "5016-Frais d\u2019acquisition des titres de tr\u00e9sor et bons de caisse": {} + }, + "502-Actions": { + "5021-Actions ou parts propres": {}, + "5022-Actions cot\u00e9es": {}, + "5023-Actions non cot\u00e9es": {}, + "5024-Actions d\u00e9membr\u00e9es (certificats d\u2019investissement, droits de vote)": {}, + "5025-Autres actions": {}, + "5026-Frais d\u2019acquisition des actions": {} + }, + "503-Obligations": { + "5031-Obligations \u00e9mises par la soci\u00e9t\u00e9 et rachet\u00e9es par elle": {}, + "5032-Obligations cot\u00e9es": {}, + "5033-Obligations non cot\u00e9es": {}, + "5035-Autres obligations": {}, + "5036-Frais d\u2019acquisition des obligations": {} + }, + "504-Bons de souscription": { + "5042-Bons de souscription d\u2019actions": {}, + "5043-Bons de souscription d\u2019obligations": {} + }, + "505-Titres n\u00e9gociables hors r\u00e9gion": {}, + "506-Int\u00e9r\u00eats courus": { + "5061-Titres du Tr\u00e9sor et bons de caisse \u00e0 court terme": {}, + "5062-Actions": {}, + "5063-Obligations": {} + }, + "508-Autres titres de placement et cr\u00e9ances assimil\u00e9es": {} + }, + "51-Valeurs \u00e0 encaisser": { + "511-Effets \u00e0 encaisser": {}, + "512-Effets \u00e0 l\u2019encaissement": {}, + "513-Ch\u00e8ques \u00e0 encaisser": {}, + "514-Ch\u00e8ques \u00e0 l\u2019encaissement": {}, + "515-Cartes de cr\u00e9dit \u00e0 encaisser": {}, + "518-Autres valeurs \u00e0 l\u2019encaissement": { + "5181-Warrants": {}, + "5182-Billets de fonds": {}, + "5185-Ch\u00e8ques de voyage": {}, + "5186-Coupons \u00e9chus": {}, + "5187-Int\u00e9r\u00eats \u00e9chus des obligations": {} + } + }, + "52-Banques": { + "521-Banques locales": { + "5211-Banques en monnaie nationale": { + "account_type": "Bank" + }, + "5215-Banques en devises": { + "account_type": "Bank" + }, + "account_type": "Bank" + }, + "522-Banques autres \u00c9tats r\u00e9gion": {}, + "523-Banques autres \u00c9tats zone mon\u00e9taire": {}, + "524-Banques hors zone mon\u00e9taire": {}, + "525-Banques d\u00e9p\u00f4t \u00e0 terme": {}, + "526-Banques, int\u00e9r\u00eats courus": { + "5261-Banque, int\u00e9r\u00eats courus, charges \u00e0 payer": {}, + "5267-Banque, int\u00e9r\u00eats courus, produits \u00e0 recevoir": {} + } + }, + "53-\u00c9tablissements financiers et assimil\u00e9s": { + "531-Ch\u00e8ques postaux": {}, + "532-Tr\u00e9sor": {}, + "533-Soci\u00e9t\u00e9s de gestion et d\u2019interm\u00e9diation (SGI)": {}, + "536-\u00c9tablissements financiers, int\u00e9r\u00eats courus": {}, + "538-Autres organismes financiers": {} + }, + "54-Instruments de tr\u00e9sorerie": { + "541-Options de taux d\u2019int\u00e9r\u00eat": {}, + "542-Options de taux de change": {}, + "543-Options de taux boursiers": {}, + "544-Instruments de march\u00e9s \u00e0 terme": {}, + "545-Avoirs d\u2019or et autres m\u00e9taux pr\u00e9cieux": {} + }, + "55-Instruments de monnaie \u00e9lectronique": { + "551-Monnaie \u00e9lectronique carte carburant": {}, + "552-Monnaie \u00e9lectronique t\u00e9l\u00e9phone portable": {}, + "553-Monnaie \u00e9lectronique carte p\u00e9age": {}, + "554-Porte-monnaie \u00e9lectronique": {}, + "558-Autres instruments de monnaies \u00e9lectroniques": {} + }, + "56-Banques, cr\u00e9dits de tr\u00e9sorerie et d\u2019escompte": { + "561-Cr\u00e9dits de tr\u00e9sorerie": {}, + "564-Escompte de cr\u00e9dits de campagne": {}, + "565-Escompte de cr\u00e9dits ordinaires": {}, + "566-Banques, cr\u00e9dits de tr\u00e9sorerie, int\u00e9r\u00eats courus": {} + }, + "57-Caisse": { + "571-Caisse si\u00e8ge social": { + "5711-Caisse en monnaie nationale": {}, + "5712-Caisse en devises": {} + }, + "572-Caisse succursale A": { + "5721-En monnaie nationale": {}, + "5722-En devises": {} + }, + "573-Caisse succursale B": { + "5731-En monnaie nationale": {}, + "5732-En devises": {} + } + }, + "58-R\u00e9gies d\u2019avances, accr\u00e9ditifs et virements internes": { + "581-R\u00e9gies d\u2019avance": {}, + "582-Accr\u00e9ditifs": {}, + "585-Virements de fonds": {}, + "588-Autres virements internes": {} + }, + "59-D\u00e9pr\u00e9ciations et provisions pour risque \u00e0 court terme": { + "590-D\u00e9pr\u00e9ciations des titres de placement": {}, + "591-D\u00e9pr\u00e9ciations des titres et valeurs \u00e0 encaisser": {}, + "592-D\u00e9pr\u00e9ciations des comptes banques": {}, + "593-D\u00e9pr\u00e9ciations des comptes \u00e9tablissements financiers et assimil\u00e9s": {}, + "594-D\u00e9pr\u00e9ciations des comptes d\u2019instruments de tr\u00e9sorerie": {}, + "599-Provisions pour risque \u00e0 court terme \u00e0 caract\u00e8re financier": {} + }, + "root_type": "Asset" + }, + "6-Comptes de charges des activit\u00e9s ordinaires": { + "60-Achats et variations de stocks": { + "601-Achats de marchandises": { + "6011-Dans la R\u00e9gion": {}, + "6012-Hors R\u00e9gion": {}, + "6013-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "6014-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "6015-Frais sur achats": {}, + "6019-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "602-Achats de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "6021-Dans la R\u00e9gion": {}, + "6022-Hors R\u00e9gion": {}, + "6023-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "6024-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "6025-Frais sur achats": {}, + "6029-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "603-Variations des stocks de biens achet\u00e9s": { + "6031-Variations des stocks de marchandises": {}, + "6032-Variations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": {}, + "6033-Variations des stocks d\u2019autres approvisionnements": {} + }, + "604-Achats stock\u00e9s de mati\u00e8res et fournitures consommables": { + "6041-Mati\u00e8res consommables": {}, + "6042-Mati\u00e8res combustibles": {}, + "6043-Produits d\u2019entretien": {}, + "6044-Fournitures d\u2019atelier et d\u2019usine": {}, + "6045-Frais sur achat": {}, + "6046-Fournitures de magasin": {}, + "6047-Fournitures de bureau": {}, + "6049-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "605-Autres achats": { + "6051-Fournitures non stockables Eau": {}, + "6052-Fournitures non stockables \u00c9lectricit\u00e9": {}, + "6053-Fournitures non stockables Autres \u00e9nergies": {}, + "6054-Fournitures d\u2019entretien non stockables": {}, + "6055-Fournitures de bureau non stockables": {}, + "6056-Achats de petit mat\u00e9riel et outillage": {}, + "6057-Achats d\u2019\u00e9tudes et prestations de services": {}, + "6058-Achats de travaux, mat\u00e9riels et \u00e9quipements": {}, + "6059-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "608-Achats d\u2019emballages": { + "6081-Emballages perdus": {}, + "6082-Emballages r\u00e9cup\u00e9rables non identifiables": {}, + "6083-Emballages \u00e0 usage mixte": {}, + "6085-Frais sur achats": {}, + "6089-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + } + }, + "61-Transports": { + "612-Transports sur ventes": {}, + "613-Transports pour le compte de tiers": {}, + "614-Transports du personnel": {}, + "616-Transports de plis": {}, + "618-Autres frais de transport": { + "6181-Voyages et d\u00e9placements": {}, + "6182-Transports entre \u00e9tablissements ou chantiers": {}, + "6183-Transports administratifs": {} + } + }, + "62-Services ext\u00e9rieurs": { + "621-Sous-traitance g\u00e9n\u00e9rale": {}, + "622-Locations, charges locatives": { + "6221-Locations de terrains": {}, + "6222-Locations de b\u00e2timents": {}, + "6223-Locations de mat\u00e9riels et outillages": {}, + "6224-Malis sur emballages": {}, + "6225-Locations d\u2019emballages": {}, + "6226-Fermages et loyers du foncier": {}, + "6228-Locations et charges locatives diverses": {} + }, + "623-Redevances de location acquisition": { + "6232-Cr\u00e9dit-bail immobilier": {}, + "6233-Cr\u00e9dit-bail mobilier": {}, + "6234-Location-vente": {}, + "6238-Autres contrats de location acquisition": {} + }, + "624-Entretien, r\u00e9parations, remise en \u00e9tat et maintenance": { + "6241-Entretien et r\u00e9parations des biens immobiliers": {}, + "6242-Entretien et r\u00e9parations des biens mobiliers": {}, + "6243-Maintenance": {}, + "6244-Charges de d\u00e9mant\u00e8lement et remise en \u00e9tat": {}, + "6248-Autres entretiens et r\u00e9parations": {} + }, + "625-Primes d\u2019assurance": { + "6251-Assurances multirisques": {}, + "6252-Assurances mat\u00e9riel de transport": {}, + "6253-Assurances risques d\u2019exploitation": {}, + "6254-Assurances responsabilit\u00e9 du producteur": {}, + "6255-Assurances insolvabilit\u00e9 clients": {}, + "6257-Assurances transport sur ventes": {}, + "6258-Autres primes d\u2019assurances": {} + }, + "626-\u00c9tudes, recherches et documentation": { + "6261-\u00c9tudes et recherches": {}, + "6265-Documentation g\u00e9n\u00e9rale": {}, + "6266-Documentation technique": {} + }, + "627-Publicit\u00e9, publications, relations publiques": { + "6271-Annonces, insertions": {}, + "6272-Catalogues, imprim\u00e9s publicitaires": {}, + "6273-\u00c9chantillons": {}, + "6274-Foires et expositions": {}, + "6275-Publications": {}, + "6276-Cadeaux \u00e0 la client\u00e8le": {}, + "6277-Frais de colloques, s\u00e9minaires, conf\u00e9rences": {}, + "6278-Autres charges de publicit\u00e9 et relations publiques": {} + }, + "628-Frais de t\u00e9l\u00e9communications": { + "6281-Frais de t\u00e9l\u00e9phone": {}, + "6282-Frais de t\u00e9lex": {}, + "6283-Frais de t\u00e9l\u00e9copie": {}, + "6288-Autres frais de t\u00e9l\u00e9communications": {} + } + }, + "63-Autres services ext\u00e9rieurs": { + "631-Frais bancaires": { + "6311-Frais sur titres (vente, garde)": {}, + "6312-Frais sur effets": {}, + "6313-Location de coffres": {}, + "6314-Commissions d\u2019affacturage": {}, + "6315-Commissions sur cartes de cr\u00e9dit": {}, + "6316-Frais d\u2019\u00e9mission d\u2019emprunts": {}, + "6317-Frais sur instruments monnaie \u00e9lectronique": {}, + "6318-Autres frais bancaires": {} + }, + "632-R\u00e9mun\u00e9rations d\u2019interm\u00e9diaires et de conseils": { + "6322-Commissions et courtages sur ventes": {}, + "6324-Honoraires des professions r\u00e9glement\u00e9es": {}, + "6325-Frais d\u2019actes et de contentieux": {}, + "6326-R\u00e9mun\u00e9rations d\u2019affacturage": {}, + "6327-R\u00e9mun\u00e9rations des autres prestataires de services": {}, + "6328-Divers frais": {} + }, + "633-Frais de formation du personnel": {}, + "634-Redevances pour brevets, licences, logiciels, concessions et droits et valeurs similaires": { + "6342-Redevances pour brevets, licences": {}, + "6343-Redevances pour logiciels": {}, + "6344-Redevances pour marques": {}, + "6345-Redevances pour sites internet": {}, + "6346-Redevances pour concessions, droits et valeurs similaires": {} + }, + "635-Cotisations": { + "6351-Cotisations": {}, + "6358-Concours divers": {} + }, + "637-R\u00e9mun\u00e9rations de personnel ext\u00e9rieur \u00e0 l\u2019entit\u00e9": { + "6371-Personnel int\u00e9rimaire": {}, + "6372-Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": {} + }, + "638-Autres charges externes": { + "6381-Frais de recrutement du personnel": {}, + "6382-Frais de d\u00e9m\u00e9nagement": {}, + "6383-R\u00e9ceptions": {}, + "6384-Missions": {}, + "6385-Charges de copropri\u00e9t\u00e9": {} + } + }, + "64-Imp\u00f4ts et taxes": { + "641-Imp\u00f4ts et taxes directs": { + "6411-Imp\u00f4ts fonciers et taxes annexes": {}, + "6412-Patentes, licences et taxes annexes": {}, + "6413-Taxes sur appointements et salaires": {}, + "6414-Taxes d\u2019apprentissage": {}, + "6415-Formation professionnelle continue": {}, + "6418-Autres imp\u00f4ts et taxes directs": {} + }, + "645-Imp\u00f4ts et taxes indirects": {}, + "646-Droits d\u2019enregistrement": { + "6461-Droits de mutation": {}, + "6462-Droits de timbre": {}, + "6463-Taxes sur les v\u00e9hicules de soci\u00e9t\u00e9": {}, + "6464-Vignettes": {}, + "6468-Autres droits": {} + }, + "647-P\u00e9nalit\u00e9s, amendes fiscales": { + "6471-P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts directs": {}, + "6472-P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts indirects": {}, + "6473-P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts directs": {}, + "6474-P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts indirects": {}, + "6478-Autres p\u00e9nalit\u00e9s et amendes fiscales": {} + }, + "648-Autres imp\u00f4ts et taxes": {} + }, + "65-Autres charges": { + "651-Pertes sur cr\u00e9ances clients et autres d\u00e9biteurs": { + "6511-Clients": {}, + "6515-Autres d\u00e9biteurs": {} + }, + "652-Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "6521-Quote-part transf\u00e9r\u00e9e de b\u00e9n\u00e9fices (comptabilit\u00e9 du g\u00e9rant)": {}, + "6525-Pertes imput\u00e9es par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": {} + }, + "654-Valeurs comptables des cessions courantes d\u2019immobilisations": { + "6541-Immobilisations incorporelles": {}, + "6542-Immobilisations corporelles": {} + }, + "656-Perte de change sur cr\u00e9ances et dettes commerciale": {}, + "657-P\u00e9nalit\u00e9s et amendes p\u00e9nales": {}, + "658-Charges diverses": { + "6581-Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": {}, + "6582-Dons": {}, + "6583-M\u00e9c\u00e9nat": {}, + "6588-Autres charges diverses": {} + }, + "659-Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "6591-Sur risques \u00e0 court terme": {}, + "6593-Sur stocks": {}, + "6594-Sur cr\u00e9ances": {}, + "6598-Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme": {} + } + }, + "66-Charges de personnel": { + "661-R\u00e9mun\u00e9rations directes vers\u00e9es au personnel national": { + "6611-Appointements salaires et commissions": {}, + "6612-Primes et gratifications": {}, + "6613-Cong\u00e9s pay\u00e9s": {}, + "6614-Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": {}, + "6615-Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": {}, + "6616-Suppl\u00e9ment familial": {}, + "6617-Avantages en nature": {}, + "6618-Autres r\u00e9mun\u00e9rations directes": {} + }, + "662-R\u00e9mun\u00e9rations directes vers\u00e9es au personnel non national": { + "6621-Appointements salaires et commissions": {}, + "6622-Primes et gratifications": {}, + "6623-Cong\u00e9s pay\u00e9s": {}, + "6624-Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": {}, + "6625-Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": {}, + "6626-Suppl\u00e9ment familial": {}, + "6627-Avantages en nature": {}, + "6628-Autres r\u00e9mun\u00e9rations directes": {} + }, + "663-Indemnit\u00e9s forfaitaires vers\u00e9es au personnel": { + "6631-Indemnit\u00e9s de logement": {}, + "6632-Indemnit\u00e9s de repr\u00e9sentation": {}, + "6633-Indemnit\u00e9s d\u2019expatriation": {}, + "6634-Indemnit\u00e9s de transport": {}, + "6638-Autres indemnit\u00e9s et avantages divers": {} + }, + "664-Charges sociales": { + "6641-Charges sociales sur r\u00e9mun\u00e9ration du personnel national": {}, + "6642-Charges sociales sur r\u00e9mun\u00e9ration du personnel non national": {} + }, + "666-R\u00e9mun\u00e9rations et charges sociales de l\u2019exploitant individuel": { + "6661-R\u00e9mun\u00e9ration du travail de l\u2019exploitant": {}, + "6662-Charges sociales": {} + }, + "667-R\u00e9mun\u00e9ration transf\u00e9r\u00e9e de personnel ext\u00e9rieur": { + "6671-Personnel int\u00e9rimaire": {}, + "6672-Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": {} + }, + "668-Autres charges sociales": { + "6681-Versements aux syndicats et comit\u00e9s d\u2019entreprise, d\u2019\u00e9tablissement": {}, + "6682-Versements aux comit\u00e9s d\u2019hygi\u00e8ne et de s\u00e9curit\u00e9": {}, + "6683-Versements et contributions aux autres \u0153uvres sociales": {}, + "6684-M\u00e9decine du travail et pharmacie": {}, + "6685-Assurances et organismes de sant\u00e9": {}, + "6686-Assurances retraite et fonds de pension": {}, + "6687-Majorations et p\u00e9nalit\u00e9s sociales": {}, + "6688-Charges sociales diverses": {} + } + }, + "67-Frais financiers et charges assimil\u00e9es": { + "671-Int\u00e9r\u00eats des emprunts": { + "6711-Emprunts obligataires": {}, + "6712-Emprunts aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": {}, + "6713-Dettes li\u00e9es \u00e0 des participations": {}, + "6714-Primes de remboursement des obligations": {} + }, + "672-Int\u00e9r\u00eats dans loyers de location acquisition": { + "6722-Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail immobilier": {}, + "6723-Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail mobilier": {}, + "6724-Int\u00e9r\u00eats dans loyers de location acquisition / location-vente": {}, + "6728-Int\u00e9r\u00eats dans loyers des autres locations acquisition": {} + }, + "673-Escomptes accord\u00e9s": {}, + "674-Autres int\u00e9r\u00eats": { + "6741-Avances re\u00e7ues et d\u00e9p\u00f4ts cr\u00e9diteurs": {}, + "6742-Comptes courants bloqu\u00e9s": {}, + "6743-Int\u00e9r\u00eats sur obligations cautionn\u00e9es": {}, + "6744-Int\u00e9r\u00eats sur dettes commerciales": {}, + "6745-Int\u00e9r\u00eats bancaires et sur op\u00e9rations de financement (escompte...)": {}, + "6748-Int\u00e9r\u00eats sur dettes diverses": {} + }, + "675-Escomptes des effets de commerce": {}, + "676-Pertes de change financi\u00e8res": {}, + "677-Pertes sur titres de placement": { + "6771-Pertes sur cessions de titres de placement": {}, + "6772-Mali provenant d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": {} + }, + "678-Pertes et charges sur risques financiers": { + "6781-Sur rentes viag\u00e8res": {}, + "6782-Sur op\u00e9rations financi\u00e8res": {}, + "6784-Sur instruments de tr\u00e9sorerie": {} + }, + "679-Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "6791-Sur risques financiers": {}, + "6795-Sur titres de placement": {}, + "6798-Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": {} + } + }, + "68-Dotations aux amortissements": { + "681-Dotations aux amortissements d\u2019exploitation": { + "6812-Dotations aux amortissements des immobilisations incorporelles": {}, + "6813-Dotations aux amortissements des immobilisations corporelles": {} + } + }, + "69-Dotations aux provisions et aux d\u00e9pr\u00e9ciations": { + "691-Dotations aux provisions et aux d\u00e9pr\u00e9ciations d\u2019exploitation": { + "6911-Dotations aux provisions pour risques et charges": {}, + "6913-Dotations aux d\u00e9pr\u00e9ciations des immobilisations incorporelles": {}, + "6914-Dotations aux d\u00e9pr\u00e9ciations des immobilisations corporelles": {} + }, + "697-Dotations aux provisions et aux d\u00e9pr\u00e9ciations financi\u00e8res": { + "6971-Dotations aux provisions pour risques et charges": {}, + "6972-Dotations aux d\u00e9pr\u00e9ciations des immobilisations financi\u00e8res": {} + } + }, + "root_type": "Expense" + }, + "7-Comptes de produits des activit\u00e9s ordinaires": { + "70-Ventes": { + "701-Ventes de marchandises": { + "7011-Dans la R\u00e9gion": {}, + "7012-Hors R\u00e9gion": {}, + "7013-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7014-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7015-Sur internet": {}, + "7019-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "702-Ventes de produits finis": { + "7021-Dans la R\u00e9gion": {}, + "7022-Hors R\u00e9gion": {}, + "7023-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7024-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7025-Sur internet": {}, + "7029-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "703-Ventes de produits interm\u00e9diaires": { + "7031-Dans la R\u00e9gion": {}, + "7032-Hors R\u00e9gion": {}, + "7033-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7034-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7035-Sur internet": {}, + "7039-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "704-Ventes de produits r\u00e9siduels": { + "7041-Dans la R\u00e9gion": {}, + "7042-Hors R\u00e9gion": {}, + "7043-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7044-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7045-Sur internet": {}, + "7049-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "705-Travaux factur\u00e9s": { + "7051-Dans la R\u00e9gion": {}, + "7052-Hors R\u00e9gion": {}, + "7053-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7054-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7055-Sur internet": {}, + "7059-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "706-Services vendus": { + "7061-Dans la R\u00e9gion": {}, + "7062-Hors R\u00e9gion": {}, + "7063-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7064-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7065-Sur internet": {}, + "7069-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "707-Produits accessoires": { + "7071-Ports, emballages perdus et autres frais factur\u00e9s": {}, + "7072-Commissions et courtages": {}, + "7073-Locations": {}, + "7074-Bonis sur reprises et cessions d\u2019emballages": {}, + "7075-Mise \u00e0 disposition de personnel": {}, + "7076-Redevances pour brevets, logiciels, marques et droits similaires": {}, + "7077-Services exploit\u00e9s dans l\u2019int\u00e9r\u00eat du personnel": {}, + "7078-Autres produits accessoires": {} + } + }, + "71-Subventions d\u2019exploitation": { + "711-Sur produits \u00e0 l\u2019exportation": {}, + "712-Sur produits \u00e0 l\u2019importation": {}, + "713-Sur produits de p\u00e9r\u00e9quation": {}, + "714-Indemnit\u00e9s et subventions d\u2019exploitation (entit\u00e9 agricole)": {}, + "718-Autres subventions d\u2019exploitation": { + "7181-Vers\u00e9es par l\u2019\u00c9tat et les collectivit\u00e9s publiques": {}, + "7182-Vers\u00e9es par les organismes internationaux": {}, + "7183-Vers\u00e9es par des tiers": {} + } + }, + "72-Production immobilis\u00e9e": { + "721-Immobilisations incorporelles": {}, + "722-Immobilisations corporelles": { + "7221-Immobilisations corporelles (hors actifs biologiques)": {}, + "7222-Immobilisations corporelles (actifs biologiques)": {} + }, + "724-Production auto-consomm\u00e9e": {}, + "726-Immobilisations financi\u00e8res": {} + }, + "73-Variations des stocks de biens et de services produits": { + "734-Variations des stocks de produits en cours": { + "7341-Produits en cours": {}, + "7342-Travaux en cours": {} + }, + "735-Variations des en-cours de services": { + "7351-\u00c9tudes en cours": {}, + "7352-Prestations de services en cours": {} + }, + "736-Variations des stocks de produits finis": {}, + "737-Variations des stocks de produits interm\u00e9diaires et r\u00e9siduels": { + "7371-Produits interm\u00e9diaires": {}, + "7372-Produits r\u00e9siduels": {} + } + }, + "75-Autres produits": { + "751-Profits sur cr\u00e9ances clients et autres d\u00e9biteurs": {}, + "752-Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "7521-Quote-part transf\u00e9r\u00e9e de pertes (comptabilit\u00e9 du g\u00e9rant)": {}, + "7525-B\u00e9n\u00e9fices attribu\u00e9s par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": {} + }, + "754-Produits des cessions courantes d\u2019immobilisations": { + "7541-Immobilisations incorporelles": {}, + "7542-Immobilisations corporelles": {} + }, + "756-Gains de change sur cr\u00e9ances et dettes commerciales": {}, + "758-Produits divers": { + "7581-Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": {}, + "7582-Indemnit\u00e9s d\u2019assurances re\u00e7ues": {}, + "7588-Autres produits divers": {} + }, + "759-Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "7591-Sur risques \u00e0 court terme": {}, + "7593-Sur stocks": {}, + "7594-Sur cr\u00e9ances": {}, + "7598-Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": {} + } + }, + "77-Revenus financiers et produits assimil\u00e9s": { + "771-Int\u00e9r\u00eats de pr\u00eats et cr\u00e9ances diverses": { + "7712-Int\u00e9r\u00eats de pr\u00eats": {}, + "7713-Int\u00e9r\u00eats sur cr\u00e9ances diverses": {} + }, + "772-Revenus de participations et autres titres immobilis\u00e9s": { + "7721-Revenus des titres de participation": {}, + "7722-Revenus autres titres immobilis\u00e9s": {} + }, + "773-Escomptes obtenus": {}, + "774-Revenus de placement": { + "7745-Revenus des obligations": {}, + "7746-Revenus des titres de placement": {} + }, + "775-Int\u00e9r\u00eats dans loyers de location acquisition": {}, + "776-Gains de change financiers": {}, + "777-Gains sur cessions de titres de placement": {}, + "778-Gains sur risques financiers": { + "7781-Sur rentes viag\u00e8res": {}, + "7782-Sur op\u00e9rations financi\u00e8res": {}, + "7784-Sur instruments de tr\u00e9sorerie": {} + }, + "779-Reprises de charges pour d\u00e9pr\u00e9ciations et provisions \u00e0 court terme financi\u00e8res": { + "7791-Sur risques financiers": {}, + "7795-Sur titres de placement": {}, + "7798-Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": {} + } + }, + "78-Transferts de charges": { + "781-Transferts de charges d\u2019exploitation": {}, + "787-Transferts de charges financi\u00e8res": {} + }, + "79-Reprises de provisions, de d\u00e9pr\u00e9ciations et autres": { + "791-Reprises de provisions et d\u00e9pr\u00e9ciations d\u2019exploitation": { + "7911-Pour risques et charges": {}, + "7913-Des immobilisations incorporelles": {}, + "7914-Des immobilisations corporelles": {} + }, + "797-Reprises de provisions et d\u00e9pr\u00e9ciations financi\u00e8res": { + "7971-Pour risques et charges": {}, + "7972-Des immobilisations financi\u00e8res": {} + }, + "798-Reprises d\u2019amortissements": {}, + "799-Reprises de subventions d\u2019investissement": {} + }, + "root_type": "Income" + }, + "8-Comptes des autres charges et des autres produits (CHARGES)": { + "81-Valeurs comptables des cessions d\u2019immobilisations": { + "811-Immobilisations incorporelles": {}, + "812-Immobilisations corporelles": {}, + "816-Immobilisations financi\u00e8res": {} + }, + "83-Charges hors activit\u00e9s ordinaires": { + "831-Charges HAO constat\u00e9es": {}, + "833-Charges li\u00e9es aux op\u00e9rations de restructuration": {}, + "834-Pertes sur cr\u00e9ances HAO": {}, + "835-Dons et lib\u00e9ralit\u00e9s accord\u00e9s": {}, + "836-Abandons de cr\u00e9ances consentis": {}, + "837-Charges li\u00e9es aux op\u00e9rations de liquidation": {}, + "839-Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": {} + }, + "85-Dotations hors activit\u00e9s ordinaires": { + "851-Dotations aux provisions r\u00e9glement\u00e9es": {}, + "852-Dotations aux amortissements HAO": {}, + "853-Dotations aux d\u00e9pr\u00e9ciations HAO": {}, + "854-Dotations aux provisions pour risques et charges HAO": {}, + "858-Autres dotations HAO": {} + }, + "87-Participation des travailleurs": { + "871-Participation l\u00e9gale aux b\u00e9n\u00e9fices": {}, + "874-Participation contractuelle aux b\u00e9n\u00e9fices": {}, + "878-Autres participations": {} + }, + "89-Imp\u00f4ts sur le r\u00e9sultat": { + "891-Imp\u00f4ts sur les b\u00e9n\u00e9fices de l\u2019exercice": { + "8911-Activit\u00e9s exerc\u00e9es dans l\u2019\u00c9tat": {}, + "8912-Activit\u00e9s exerc\u00e9es dans les autres \u00c9tats de la R\u00e9gion": {}, + "8913-Activit\u00e9s exerc\u00e9es hors R\u00e9gion": {} + }, + "892-Rappel d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": {}, + "895-Imp\u00f4t minimum forfaitaire IMF": {}, + "899-D\u00e9gr\u00e8vements et annulations d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": { + "8991-D\u00e9gr\u00e8vements": {}, + "8994-Annulations pour pertes r\u00e9troactives": {} + } + }, + "root_type": "Expense" + }, + "8-Comptes des autres charges et des autres produits (PRODUITS)": { + "82-Produits des cessions d\u2019immobilisations": { + "821-Immobilisations incorporelles": {}, + "822-Immobilisations corporelles": {}, + "826-Immobilisations financi\u00e8res": {} + }, + "84-Produits hors activit\u00e9s ordinaires": { + "841-Produits HAO constat\u00e9s": {}, + "843-Produits li\u00e9s aux op\u00e9rations de restructuration": {}, + "844-Indemnit\u00e9s et subventions HAO (entit\u00e9 agricole)": {}, + "845-Dons et lib\u00e9ralit\u00e9s obtenus": {}, + "846-Abandons de cr\u00e9ances obtenus": {}, + "847-Produits li\u00e9s aux op\u00e9rations de liquidation": {}, + "848-Transferts de charges HAO": {}, + "849-Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": {} + }, + "86-Reprises de charges, provisions et d\u00e9pr\u00e9ciations HAO": { + "861-Reprises de provisions r\u00e9glement\u00e9es": {}, + "862-Reprises d\u2019amortissements HAO": {}, + "863-Reprises de d\u00e9pr\u00e9ciations HAO": {}, + "864-Reprises de provisions pour risques et charges HAO": {}, + "868-Autres reprises HAO": {} + }, + "88-Subventions d\u2019\u00e9quilibre": { + "881-\u00c9tat": {}, + "884-Collectivit\u00e9s publiques": {}, + "886-Groupe": {}, + "888-Autres": {} + }, + "root_type": "Income" + } + } +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/ne_plan_comptable_avec_code.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/ne_plan_comptable_avec_code.json new file mode 100644 index 00000000000..74c2d768109 --- /dev/null +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/ne_plan_comptable_avec_code.json @@ -0,0 +1,4208 @@ +{ + "country_code": "ne", + "name": "Syscohada - Plan Comptable avec code", + "tree": { + "Comptes de ressources durables": { + "Capital": { + "Capital social": { + "Capital souscrit, non appel\u00e9": { + "account_number": "1011" + }, + "Capital souscrit, appel\u00e9, non vers\u00e9": { + "account_number": "1012" + }, + "Capital souscrit, appel\u00e9, vers\u00e9, non amorti": { + "account_number": "1013" + }, + "Capital souscrit, appel\u00e9, vers\u00e9, amorti": { + "account_number": "1014" + }, + "Capital souscrit soumis \u00e0 des conditions particuli\u00e8res": { + "account_number": "1018" + }, + "account_number": "101" + }, + "Capital par dotation": { + "Dotation initiale": { + "account_number": "1021" + }, + "Dotations compl\u00e9mentaires": { + "account_number": "1022" + }, + "Autres dotations": { + "account_number": "1028" + }, + "account_number": "102" + }, + "Capital personnel": { + "account_number": "103" + }, + "Compte de l\u2019exploitant": { + "Apports temporaires": { + "account_number": "1041" + }, + "Op\u00e9rations courantes": { + "account_number": "1042" + }, + "R\u00e9mun\u00e9rations, imp\u00f4ts et autres charges personnelles": { + "account_number": "1043" + }, + "Pr\u00e9l\u00e8vements d\u2019autoconsommation": { + "account_number": "1047" + }, + "Autres pr\u00e9l\u00e8vements": { + "account_number": "1048" + }, + "account_number": "104" + }, + "Primes li\u00e9es au capital social": { + "Primes d\u2019\u00e9mission": { + "account_number": "1051" + }, + "Primes d\u2019apport": { + "account_number": "1052" + }, + "Primes de fusion": { + "account_number": "1053" + }, + "Primes de conversion": { + "account_number": "1054" + }, + "Autres primes": { + "account_number": "1058" + }, + "account_number": "105" + }, + "\u00c9carts de r\u00e9\u00e9valuation": { + "\u00c9carts de r\u00e9\u00e9valuation l\u00e9gale": { + "account_number": "1061" + }, + "\u00c9carts de r\u00e9\u00e9valuation libre": { + "account_number": "1062" + }, + "account_number": "106" + }, + "Apporteurs, capital souscrit, non appel\u00e9": { + "account_number": "109" + }, + "account_number": "10" + }, + "R\u00e9serves": { + "R\u00e9serve l\u00e9gale": { + "account_number": "111" + }, + "R\u00e9serves statutaires ou contractuelles": { + "account_number": "112" + }, + "R\u00e9serves r\u00e9glement\u00e9es": { + "R\u00e9serves de plus-values nettes \u00e0 long terme": { + "account_number": "1131" + }, + "R\u00e9serves d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": { + "account_number": "1132" + }, + "R\u00e9serves cons\u00e9cutives \u00e0 l\u2019octroi de subventions d\u2019investissement": { + "account_number": "1133" + }, + "R\u00e9serves des valeurs mobili\u00e8res donnant acc\u00e8s au capital": { + "account_number": "1134" + }, + "Autres r\u00e9serves r\u00e9glement\u00e9es": { + "account_number": "1135" + }, + "account_number": "113" + }, + "Autres r\u00e9serves": { + "R\u00e9serves facultatives": { + "account_number": "1181" + }, + "R\u00e9serves diverses": { + "account_number": "1188" + }, + "account_number": "118" + }, + "account_number": "11" + }, + "Report \u00e0 nouveau": { + "Report \u00e0 nouveau cr\u00e9diteur": { + "account_number": "121" + }, + "Report \u00e0 nouveau d\u00e9biteur": { + "Perte nette \u00e0 reporter": { + "account_number": "1291" + }, + "Perte Amortissements r\u00e9put\u00e9s diff\u00e9r\u00e9s": { + "account_number": "1292" + }, + "account_number": "129" + }, + "account_number": "12" + }, + "R\u00e9sultat net de l\u2019exercice": { + "R\u00e9sultat en instance d\u2019affectation": { + "R\u00e9sultat en instance d\u2019affectation : b\u00e9n\u00e9fice": { + "account_number": "1301" + }, + "R\u00e9sultat en instance d\u2019affectation : perte": { + "account_number": "1309" + }, + "account_number": "130" + }, + "R\u00e9sultat net : b\u00e9n\u00e9fice": { + "account_number": "131" + }, + "Marge commerciale (MC)": { + "account_number": "132" + }, + "Valeur ajout\u00e9e (VA)": { + "account_number": "133" + }, + "Exc\u00e9dent brut d\u2019exploitation (EBE)": { + "account_number": "134" + }, + "R\u00e9sultat d\u2019exploitation (RE)": { + "account_number": "135" + }, + "R\u00e9sultat financier (RF)": { + "account_number": "136" + }, + "R\u00e9sultat des activit\u00e9s ordinaires (RAO)": { + "account_number": "137" + }, + "R\u00e9sultat hors activit\u00e9s ordinaires (RHAO)": { + "R\u00e9sultat de fusion": { + "account_number": "1381" + }, + "R\u00e9sultat d\u2019apport partiel d\u2019actif": { + "account_number": "1382" + }, + "R\u00e9sultat de scission": { + "account_number": "1383" + }, + "R\u00e9sultat de liquidation": { + "account_number": "1384" + }, + "account_number": "138" + }, + "R\u00e9sultat net : perte": { + "account_number": "139" + }, + "account_number": "13" + }, + "Subventions d\u2019investissement": { + "Subventions d\u2019\u00e9quipement": { + "\u00c9tat": { + "account_number": "1411" + }, + "R\u00e9gions": { + "account_number": "1412" + }, + "D\u00e9partements": { + "account_number": "1413" + }, + "Communes et collectivit\u00e9s publiques d\u00e9centralis\u00e9es": { + "account_number": "1414" + }, + "Entit\u00e9s publiques ou mixtes": { + "account_number": "1415" + }, + "Entit\u00e9s et organismes priv\u00e9s": { + "account_number": "1416" + }, + "Organismes internationaux": { + "account_number": "1417" + }, + "Autres": { + "account_number": "1418" + }, + "account_number": "141" + }, + "Autres subventions d\u2019investissement": { + "account_number": "148" + }, + "account_number": "14" + }, + "Provisions r\u00e9glement\u00e9es et fonds assimil\u00e9s": { + "Amortissements d\u00e9rogatoires": { + "account_number": "151" + }, + "Plus-values de cession \u00e0 r\u00e9investir": { + "account_number": "152" + }, + "Fonds r\u00e9glement\u00e9s": { + "Fonds National": { + "account_number": "1531" + }, + "Pr\u00e9l\u00e8vement pour le Budget": { + "account_number": "1532" + }, + "account_number": "153" + }, + "Provisions sp\u00e9ciales de r\u00e9\u00e9valuation": { + "account_number": "154" + }, + "Provisions r\u00e9glement\u00e9es relatives aux immobilisations": { + "Reconstitution des gisements miniers et p\u00e9troliers": { + "account_number": "1551" + }, + "account_number": "155" + }, + "Provisions r\u00e9glement\u00e9es relatives aux stocks": { + "Hausse de prix": { + "account_number": "1561" + }, + "Fluctuation des cours": { + "account_number": "1562" + }, + "account_number": "156" + }, + "Provisions pour investissement": { + "account_number": "157" + }, + "Autres provisions et fonds r\u00e9glement\u00e9s": { + "account_number": "158" + }, + "account_number": "15" + }, + "Emprunts et dettes assimil\u00e9es": { + "Emprunts obligataires": { + "Emprunts obligataires ordinaires": { + "account_number": "1611" + }, + "Emprunts obligataires convertibles en actions": { + "account_number": "1612" + }, + "Emprunts obligataires remboursables en actions": { + "account_number": "1613" + }, + "Autres emprunts obligataires": { + "account_number": "1618" + }, + "account_number": "161" + }, + "Emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": { + "account_number": "162" + }, + "Avances re\u00e7ues de l\u2019\u00c9tat": { + "account_number": "163" + }, + "Avances re\u00e7ues et comptes courants bloqu\u00e9s": { + "account_number": "164" + }, + "D\u00e9p\u00f4ts et cautionnements re\u00e7us": { + "D\u00e9p\u00f4ts": { + "account_number": "1651" + }, + "Cautionnements": { + "account_number": "1652" + }, + "account_number": "165" + }, + "Int\u00e9r\u00eats courus": { + "Sur emprunts obligataires": { + "account_number": "1661" + }, + "Sur emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": { + "account_number": "1662" + }, + "Sur avances re\u00e7ues de l\u2019\u00c9tat": { + "account_number": "1663" + }, + "Sur avances re\u00e7ues et comptes courants bloqu\u00e9s": { + "account_number": "1664" + }, + "Sur d\u00e9p\u00f4ts et cautionnements re\u00e7us": { + "account_number": "1665" + }, + "Sur avances assorties de conditions particuli\u00e8res": { + "account_number": "1667" + }, + "Sur autres emprunts et dettes": { + "account_number": "1668" + }, + "account_number": "166" + }, + "Avances assorties de conditions particuli\u00e8res": { + "Avances bloqu\u00e9es pour augmentation du capital": { + "account_number": "1671" + }, + "Avances conditionn\u00e9es par l\u2019\u00c9tat": { + "account_number": "1672" + }, + "Avances conditionn\u00e9es par les autres organismes africains": { + "account_number": "1673" + }, + "Avances conditionn\u00e9es par les organismes internationaux": { + "account_number": "1674" + }, + "account_number": "167" + }, + "Autres emprunts et dettes": { + "Rentes viag\u00e8res capitalis\u00e9es": { + "account_number": "1681" + }, + "Billets de fonds": { + "account_number": "1682" + }, + "Dettes cons\u00e9cutives \u00e0 des titres emprunt\u00e9s": { + "account_number": "1683" + }, + "Emprunts participatifs": { + "account_number": "1684" + }, + "Participation des travailleurs aux b\u00e9n\u00e9fices": { + "account_number": "1685" + }, + "Emprunts et dettes contract\u00e9s aupr\u00e8s des autres tiers": { + "account_number": "1686" + }, + "account_number": "168" + }, + "account_number": "16" + }, + "Dettes de location acquisition": { + "Dettes de location acquisition / cr\u00e9dit bail immobilier": { + "account_number": "172" + }, + "Dettes de location acquisition / cr\u00e9dit bail mobilier": { + "account_number": "173" + }, + "Dettes de location acquisition / location de vente": { + "account_number": "174" + }, + "Int\u00e9r\u00eats courus": { + "Sur dettes de location acquisition / cr\u00e9dit-bail immobilier": { + "account_number": "1762" + }, + "Sur dettes de location acquisition / cr\u00e9dit-bail mobilier": { + "account_number": "1763" + }, + "Sur dettes de location acquisition / location-vente": { + "account_number": "1764" + }, + "Sur autres dettes de location acquisition": { + "account_number": "1768" + }, + "account_number": "176" + }, + "Autres dettes de location acquisition": { + "account_number": "178" + }, + "account_number": "17" + }, + "Dettes li\u00e9es \u00e0 des participations et comptes de liaison des \u00e9tablissements et soci\u00e9t\u00e9s en participation": { + "Dettes li\u00e9es \u00e0 des participations": { + "Dettes li\u00e9es \u00e0 des participations (groupe)": { + "account_number": "1811" + }, + "Dettes li\u00e9es \u00e0 des participations (hors groupe)": { + "account_number": "1812" + }, + "account_number": "181" + }, + "Dettes li\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": { + "account_number": "182" + }, + "Int\u00e9r\u00eats courus sur dettes li\u00e9es \u00e0 des participations": { + "account_number": "183" + }, + "Comptes permanents bloqu\u00e9s des \u00e9tablissements et succursales": { + "account_number": "184" + }, + "Comptes permanents non bloqu\u00e9s des \u00e9tablissements et succursales": { + "account_number": "185" + }, + "Comptes de liaison charges": { + "account_number": "186" + }, + "Comptes de liaison produits": { + "account_number": "187" + }, + "Comptes de liaison des soci\u00e9t\u00e9s en participation": { + "account_number": "188" + }, + "account_number": "18" + }, + "Provisions pour risques et charges": { + "Provisions pour litiges": { + "account_number": "191" + }, + "Provisions pour garanties donn\u00e9es aux clients": { + "account_number": "192" + }, + "Provisions pour pertes sur march\u00e9s \u00e0 ach\u00e8vement futur": { + "account_number": "193" + }, + "Provisions pour pertes de change": { + "account_number": "194" + }, + "Provisions pour imp\u00f4ts": { + "account_number": "195" + }, + "Provisions pour pensions et obligations similaires": { + "Provisions pour pensions et obligations similaires engagement de retraite": { + "account_number": "1961" + }, + "Actif du r\u00e9gime de retraite": { + "account_number": "1962" + }, + "account_number": "196" + }, + "Provisions pour restructuration": { + "account_number": "197" + }, + "Autres provisions pour risques et charges": { + "Provisions pour amendes et p\u00e9nalit\u00e9s": { + "account_number": "1981" + }, + "Provisions pour propre assureur": { + "account_number": "1983" + }, + "Provisions pour d\u00e9mant\u00e8lement et remise en \u00e9tat": { + "account_number": "1984" + }, + "Provisions pour droits \u00e0 r\u00e9duction ou avantage en nature (ch\u00e8ques cadeau, cartes de fid\u00e9lit\u00e9...)": { + "account_number": "1985" + }, + "Provisions pour divers risques et charges": { + "account_number": "1988" + }, + "account_number": "198" + }, + "account_number": "19" + }, + "root_type": "Equity", + "account_number": "1" + }, + "Comptes d\u2019actif immobilis\u00e9": { + "Immobilisations incorporelles": { + "account_type": "Fixed Asset", + "Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset", + "account_number": "211" + }, + "Brevets, licences, concessions et droits similaires": { + "account_type": "Fixed Asset", + "Brevets": { + "account_type": "Fixed Asset", + "account_number": "2121" + }, + "Licences": { + "account_type": "Fixed Asset", + "account_number": "2122" + }, + "Concessions de service public": { + "account_type": "Fixed Asset", + "account_number": "2123" + }, + "Autres concessions et droits similaires": { + "account_type": "Fixed Asset", + "account_number": "2128" + }, + "account_number": "212" + }, + "Logiciels et sites internet": { + "account_type": "Fixed Asset", + "Logiciels": { + "account_type": "Fixed Asset", + "account_number": "2131" + }, + "Sites internet": { + "account_type": "Fixed Asset", + "account_number": "2132" + }, + "account_number": "213" + }, + "Marques": { + "account_type": "Fixed Asset", + "account_number": "214" + }, + "Fonds commercial": { + "account_type": "Fixed Asset", + "account_number": "215" + }, + "Droit au bail": { + "account_type": "Fixed Asset", + "account_number": "216" + }, + "Investissements de cr\u00e9ation": { + "account_type": "Fixed Asset", + "account_number": "217" + }, + "Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset", + "Frais de prospection et d\u2019\u00e9valuation de ressources min\u00e9rales": { + "account_type": "Fixed Asset", + "account_number": "2181" + }, + "Co\u00fbts d\u2019obtention du contrat": { + "account_type": "Fixed Asset", + "account_number": "2182" + }, + "Fichiers clients, notices, titres de journaux et magazines": { + "account_type": "Fixed Asset", + "account_number": "2183" + }, + "Co\u00fbts des franchises": { + "account_type": "Fixed Asset", + "account_number": "2184" + }, + "Divers droits et valeurs incorporelles": { + "account_type": "Fixed Asset", + "account_number": "2188" + }, + "account_number": "218" + }, + "Immobilisations incorporelles en cours": { + "account_type": "Fixed Asset", + "Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset", + "account_number": "2191" + }, + "Logiciels et internet": { + "account_type": "Fixed Asset", + "account_number": "2193" + }, + "Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset", + "account_number": "2198" + }, + "account_number": "219" + }, + "account_number": "21" + }, + "Terrains": { + "account_type": "Fixed Asset", + "Terrains agricoles et forestiers": { + "account_type": "Fixed Asset", + "Terrains d\u2019exploitation agricole": { + "account_type": "Fixed Asset", + "account_number": "2211" + }, + "Terrains d\u2019exploitation foresti\u00e8re": { + "account_type": "Fixed Asset", + "account_number": "2212" + }, + "Autres terrains": { + "account_type": "Fixed Asset", + "account_number": "2218" + }, + "account_number": "221" + }, + "Terrains nus": { + "account_type": "Fixed Asset", + "Terrains \u00e0 b\u00e2tir": { + "account_type": "Fixed Asset", + "account_number": "2221" + }, + "Autres terrains nus": { + "account_type": "Fixed Asset", + "account_number": "2228" + }, + "account_number": "222" + }, + "Terrains b\u00e2tis": { + "account_type": "Fixed Asset", + "Pour b\u00e2timents industriels et agricoles": { + "account_type": "Fixed Asset", + "account_number": "2231" + }, + "Pour b\u00e2timents administratifs et commerciaux": { + "account_type": "Fixed Asset", + "account_number": "2232" + }, + "Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations professionnelles": { + "account_type": "Fixed Asset", + "account_number": "2234" + }, + "Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations non professionnelles": { + "account_type": "Fixed Asset", + "account_number": "2235" + }, + "Autres terrains b\u00e2tis": { + "account_type": "Fixed Asset", + "account_number": "2238" + }, + "account_number": "223" + }, + "Travaux de mise en valeur des terrains": { + "account_type": "Fixed Asset", + "Plantation d\u2019arbres et d\u2019arbustes": { + "account_type": "Fixed Asset", + "account_number": "2241" + }, + "Am\u00e9liorations du fonds": { + "account_type": "Fixed Asset", + "account_number": "2245" + }, + "Autres travaux": { + "account_type": "Fixed Asset", + "account_number": "2248" + }, + "account_number": "224" + }, + "Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset", + "Carri\u00e8res": { + "account_type": "Fixed Asset", + "account_number": "2251" + }, + "account_number": "225" + }, + "Terrains am\u00e9nag\u00e9s": { + "account_type": "Fixed Asset", + "Parkings": { + "account_type": "Fixed Asset", + "account_number": "2261" + }, + "account_number": "226" + }, + "Terrains mis en concession": { + "account_type": "Fixed Asset", + "account_number": "227" + }, + "Autres terrains": { + "account_type": "Fixed Asset", + "Terrains immeubles de placement": { + "account_type": "Fixed Asset", + "account_number": "2281" + }, + "Terrains des logements affect\u00e9s au personnel": { + "account_type": "Fixed Asset", + "account_number": "2285" + }, + "Terrains de location acquisition": { + "account_type": "Fixed Asset", + "account_number": "2286" + }, + "Divers terrains": { + "account_type": "Fixed Asset", + "account_number": "2288" + }, + "account_number": "228" + }, + "Am\u00e9nagements de terrains en cours": { + "account_type": "Fixed Asset", + "Terrains agricoles et forestiers": { + "account_type": "Fixed Asset", + "account_number": "2291" + }, + "Terrains nus": { + "account_type": "Fixed Asset", + "account_number": "2292" + }, + "Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset", + "account_number": "2295" + }, + "Autres terrains": { + "account_type": "Fixed Asset", + "account_number": "2298" + }, + "account_number": "229" + }, + "account_number": "22" + }, + "B\u00e2timents, installations techniques et agencements": { + "B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "B\u00e2timents industriels": { + "account_number": "2311" + }, + "B\u00e2timents agricoles": { + "account_number": "2312" + }, + "B\u00e2timents administratifs et commerciaux": { + "account_number": "2313" + }, + "B\u00e2timents affect\u00e9s au logement du personnel": { + "account_number": "2314" + }, + "B\u00e2timents immeubles de placement": { + "account_number": "2315" + }, + "B\u00e2timents de location acquisition": { + "account_number": "2316" + }, + "account_number": "231" + }, + "B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "B\u00e2timents industriels": { + "account_number": "2321" + }, + "B\u00e2timents agricoles": { + "account_number": "2322" + }, + "B\u00e2timents administratifs et commerciaux": { + "account_number": "2323" + }, + "B\u00e2timents affect\u00e9s au logement du personnel": { + "account_number": "2324" + }, + "B\u00e2timents immeubles de placement": { + "account_number": "2325" + }, + "B\u00e2timents de location acquisition": { + "account_number": "2326" + }, + "account_number": "232" + }, + "Ouvrages d\u2019infrastructure": { + "Voies de terre": { + "account_number": "2331" + }, + "Voies de fer": { + "account_number": "2332" + }, + "Voies d\u2019eau": { + "account_number": "2333" + }, + "Barrages, Digues": { + "account_number": "2334" + }, + "Pistes d\u2019a\u00e9rodrome": { + "account_number": "2335" + }, + "Autres ouvrages d\u2019infrastructures": { + "account_number": "2338" + }, + "account_number": "233" + }, + "Am\u00e9nagements, agencements et installations techniques": { + "Installations complexes sp\u00e9cialis\u00e9es sur sol propre": { + "account_number": "2341" + }, + "Installations complexes sp\u00e9cialis\u00e9es sur sol d\u2019autrui": { + "account_number": "2342" + }, + "Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol propre": { + "account_number": "2343" + }, + "Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol d\u2019autrui": { + "account_number": "2344" + }, + "Am\u00e9nagements et agencements des b\u00e2timents": { + "account_number": "2345" + }, + "account_number": "234" + }, + "Am\u00e9nagements de bureaux": { + "Installations g\u00e9n\u00e9rales": { + "account_number": "2351" + }, + "Autres am\u00e9nagements de bureaux": { + "account_number": "2358" + }, + "account_number": "235" + }, + "B\u00e2timents industriels, agricoles et commerciaux mis en concession": { + "account_number": "237" + }, + "Autres installations et agencements": { + "account_number": "238" + }, + "B\u00e2timents am\u00e9nagements, agencements et installations en cours": { + "B\u00e2timents en cours": { + "account_number": "2391" + }, + "Installations en cours": { + "account_number": "2392" + }, + "Ouvrages d\u2019infrastructure en cours": { + "account_number": "2393" + }, + "Am\u00e9nagements et agencements et installations techniques en cours": { + "account_number": "2394" + }, + "Am\u00e9nagements de bureaux en cours": { + "account_number": "2395" + }, + "Autres installations et agencements en cours": { + "account_number": "2398" + }, + "account_number": "239" + }, + "account_number": "23" + }, + "Mat\u00e9riel, mobilier et actifs biologiques": { + "Mat\u00e9riel et outillage industriel et commercial": { + "Mat\u00e9riel industriel": { + "account_number": "2411" + }, + "Outillage industriel": { + "account_number": "2412" + }, + "Mat\u00e9riel commercial": { + "account_number": "2413" + }, + "Outillage commercial": { + "account_number": "2414" + }, + "Mat\u00e9riel & outillage industriel et commercial de location-acquisition": { + "account_number": "2416" + }, + "account_number": "241" + }, + "Mat\u00e9riel et outillage agricole": { + "Mat\u00e9riel agricole": { + "account_number": "2421" + }, + "Outillage agricole": { + "account_number": "2422" + }, + "Mat\u00e9riel & outillage agricole de location-acquisition": { + "account_number": "2426" + }, + "account_number": "242" + }, + "Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "243" + }, + "Mat\u00e9riel et mobilier": { + "Mat\u00e9riel de bureau": { + "account_number": "2441" + }, + "Mat\u00e9riel informatique": { + "account_number": "2442" + }, + "Mat\u00e9riel bureautique": { + "account_number": "2443" + }, + "Mobilier de bureau": { + "account_number": "2444" + }, + "Mat\u00e9riel et mobilier immeubles de placement": { + "account_number": "2445" + }, + "Mat\u00e9riel et mobilier de location acquisition": { + "account_number": "2446" + }, + "Mat\u00e9riel et mobilier des logements du personnel": { + "account_number": "2447" + }, + "account_number": "244" + }, + "Mat\u00e9riel de transport": { + "Mat\u00e9riel automobile": { + "account_number": "2451" + }, + "Mat\u00e9riel ferroviaire": { + "account_number": "2452" + }, + "Mat\u00e9riel fluvial, lagunaire": { + "account_number": "2453" + }, + "Mat\u00e9riel naval": { + "account_number": "2454" + }, + "Mat\u00e9riel a\u00e9rien": { + "account_number": "2455" + }, + "Mat\u00e9riel de transport de location-acquisition": { + "account_number": "2456" + }, + "Mat\u00e9riel hippomobile": { + "account_number": "2457" + }, + "Autres mat\u00e9riels de transport": { + "account_number": "2458" + }, + "account_number": "245" + }, + "Actifs biologiques": { + "Cheptel, animaux de trait": { + "account_number": "2461" + }, + "Cheptel, animaux reproducteurs": { + "account_number": "2462" + }, + "Animaux de garde": { + "account_number": "2463" + }, + "Plantations agricoles": { + "account_number": "2465" + }, + "Autres actifs biologiques": { + "account_number": "2468" + }, + "account_number": "246" + }, + "Agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "Agencements et am\u00e9nagements du mat\u00e9riel": { + "account_number": "2471" + }, + "Agencements et am\u00e9nagements des actifs biologiques": { + "account_number": "2472" + }, + "Autres agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "account_number": "2478" + }, + "account_number": "247" + }, + "Autres mat\u00e9riels et mobiliers": { + "Collections et \u0153uvres d\u2019art": { + "account_number": "2481" + }, + "Divers mat\u00e9riels mobiliers": { + "account_number": "2488" + }, + "account_number": "248" + }, + "Mat\u00e9riels et actifs biologiques en cours": { + "Mat\u00e9riel et outillage industriel et commercial": { + "account_number": "2491" + }, + "Mat\u00e9riel et outillage agricole": { + "account_number": "2492" + }, + "Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "2493" + }, + "Mat\u00e9riel et mobilier de bureau": { + "account_number": "2494" + }, + "Mat\u00e9riel de transport": { + "account_number": "2495" + }, + "Actifs biologiques": { + "account_number": "2496" + }, + "Agencements am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "account_number": "2497" + }, + "Autres mat\u00e9riels et actifs biologiques en cours": { + "account_number": "2498" + }, + "account_number": "249" + }, + "account_number": "24" + }, + "Avances et acomptes vers\u00e9s sur immobilisations": { + "Avances et acomptes vers\u00e9s sur immobilisations incorporelles": { + "account_number": "251" + }, + "Avances et acomptes vers\u00e9s sur immobilisations corporelles": { + "account_number": "252" + }, + "account_number": "25" + }, + "Titres de participation": { + "Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": { + "account_number": "261" + }, + "Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le conjoint": { + "account_number": "262" + }, + "Titres de participation dans des soci\u00e9t\u00e9s conf\u00e9rant une influence notable": { + "account_number": "263" + }, + "Participations dans des organismes professionnels": { + "account_number": "265" + }, + "Parts dans des groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": { + "account_number": "266" + }, + "Autres titres de participation": { + "account_number": "268" + }, + "account_number": "26" + }, + "Autres immobilisations financi\u00e8res": { + "Pr\u00eats et cr\u00e9ances": { + "Pr\u00eats participatifs": { + "account_number": "2711" + }, + "Pr\u00eats aux associ\u00e9s": { + "account_number": "2712" + }, + "Billets de fonds": { + "account_number": "2713" + }, + "Titres pr\u00eat\u00e9s": { + "account_number": "2714" + }, + "Autres pr\u00eats et cr\u00e9ances": { + "account_number": "2718" + }, + "account_number": "271" + }, + "Pr\u00eats au personnel": { + "Pr\u00eats immobiliers": { + "account_number": "2721" + }, + "Pr\u00eats mobiliers et d\u2019installation": { + "account_number": "2722" + }, + "Autres pr\u00eats au personnel": { + "account_number": "2728" + }, + "account_number": "272" + }, + "Cr\u00e9ances sur l\u2019\u00c9tat": { + "Retenues de garantie": { + "account_number": "2731" + }, + "Fonds r\u00e9glement\u00e9": { + "account_number": "2733" + }, + "Cr\u00e9ances sur le conc\u00e9dant": { + "account_number": "2734" + }, + "Autres cr\u00e9ances sur l\u2019\u00c9tat": { + "account_number": "2738" + }, + "account_number": "273" + }, + "Titres immobilis\u00e9s": { + "Titres immobilis\u00e9s de l\u2019activit\u00e9 de portefeuille (TIAP)": { + "account_number": "2741" + }, + "Titres participatifs": { + "account_number": "2742" + }, + "Certificats d\u2019investissement": { + "account_number": "2743" + }, + "Parts de fonds commun de placement (FCP)": { + "account_number": "2744" + }, + "Obligations": { + "account_number": "2745" + }, + "Actions ou parts propres": { + "account_number": "2746" + }, + "Autres titres immobilis\u00e9s": { + "account_number": "2748" + }, + "account_number": "274" + }, + "D\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "D\u00e9p\u00f4ts pour loyers d\u2019avance": { + "account_number": "2751" + }, + "D\u00e9p\u00f4ts pour l\u2019\u00e9lectricit\u00e9": { + "account_number": "2752" + }, + "D\u00e9p\u00f4ts pour l\u2019eau": { + "account_number": "2753" + }, + "D\u00e9p\u00f4ts pour le gaz": { + "account_number": "2754" + }, + "D\u00e9p\u00f4ts pour le t\u00e9l\u00e9phone, le t\u00e9lex, la t\u00e9l\u00e9copie": { + "account_number": "2755" + }, + "Cautionnements sur march\u00e9s publics": { + "account_number": "2756" + }, + "Cautionnements sur autres op\u00e9rations": { + "account_number": "2757" + }, + "Autres d\u00e9p\u00f4ts et cautionnements": { + "account_number": "2758" + }, + "account_number": "275" + }, + "Int\u00e9r\u00eats courus": { + "Pr\u00eats et cr\u00e9ances non commerciales": { + "account_number": "2761" + }, + "Pr\u00eats au personnel": { + "account_number": "2762" + }, + "Cr\u00e9ances sur l\u2019\u00c9tat": { + "account_number": "2763" + }, + "Titres immobilis\u00e9s": { + "account_number": "2764" + }, + "D\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "account_number": "2765" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations": { + "account_number": "2767" + }, + "Immobilisations financi\u00e8res diverses": { + "account_number": "2768" + }, + "account_number": "276" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": { + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations (groupe)": { + "account_number": "2771" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations (hors groupe)": { + "account_number": "2772" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": { + "account_number": "2773" + }, + "Avances \u00e0 des Groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": { + "account_number": "2774" + }, + "account_number": "277" + }, + "Immobilisations financi\u00e8res diverses": { + "Cr\u00e9ances diverses groupe": { + "account_number": "2781" + }, + "Cr\u00e9ances diverses hors groupe": { + "account_number": "2782" + }, + "Banques d\u00e9p\u00f4ts \u00e0 terme": { + "account_number": "2784" + }, + "Or et m\u00e9taux pr\u00e9cieux": { + "account_number": "2785" + }, + "Autres immobilisations financi\u00e8res": { + "account_number": "2788" + }, + "account_number": "278" + }, + "account_number": "27" + }, + "Amortissements": { + "account_type": "Accumulated Depreciation", + "Amortissements des immobilisations corporelles": { + "account_type": "Accumulated Depreciation", + "Amortissements des frais de d\u00e9veloppement": { + "account_type": "Accumulated Depreciation", + "account_number": "2811" + }, + "Amortissements des brevets, licences, concessions et droits similaires": { + "account_type": "Accumulated Depreciation", + "account_number": "2812" + }, + "Amortissements des logiciels et sites internet": { + "account_type": "Accumulated Depreciation", + "account_number": "2813" + }, + "Amortissements des marques": { + "account_type": "Accumulated Depreciation", + "account_number": "2814" + }, + "Amortissements du fonds commercial": { + "account_type": "Accumulated Depreciation", + "account_number": "2815" + }, + "Amortissements du droit au bail": { + "account_type": "Accumulated Depreciation", + "account_number": "2816" + }, + "Amortissements des investissements de cr\u00e9ation": { + "account_type": "Accumulated Depreciation", + "account_number": "2817" + }, + "Amortissements des autres droits et valeurs incorporels": { + "account_type": "Accumulated Depreciation", + "account_number": "2818" + }, + "account_number": "281" + }, + "Amortissements des terrains": { + "Amortissements des travaux de mise en valeur des terrains": { + "account_number": "2824" + }, + "account_number": "282" + }, + "Amortissements des b\u00e2timents, installations techniques et agencements": { + "Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "account_number": "2831" + }, + "Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "account_number": "2832" + }, + "Amortissements des ouvrages d\u2019infrastructure": { + "account_number": "2833" + }, + "Amortissements des am\u00e9nagements, agencements et installations techniques": { + "account_number": "2834" + }, + "Amortissements des am\u00e9nagements de bureaux": { + "account_number": "2835" + }, + "Amortissements des b\u00e2timents industriels, agricoles et commerciaux mis en concession": { + "account_number": "2837" + }, + "Amortissements des autres installations et agencements": { + "account_number": "2838" + }, + "account_number": "283" + }, + "Amortissements du mat\u00e9riel": { + "Amortissements du mat\u00e9riel et outillage industriel et commercial": { + "account_number": "2841" + }, + "Amortissements du mat\u00e9riel et outillage agricole": { + "account_number": "2842" + }, + "Amortissements du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "2843" + }, + "Amortissements du mat\u00e9riel et mobilier": { + "account_number": "2844" + }, + "Amortissements du mat\u00e9riel de transport": { + "account_number": "2845" + }, + "Amortissements des actifs biologiques": { + "account_number": "2846" + }, + "Amortissements des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": { + "account_number": "2847" + }, + "Amortissements des autres mat\u00e9riels": { + "account_number": "2848" + }, + "account_number": "284" + }, + "account_number": "28" + }, + "D\u00e9pr\u00e9ciations des immobilisations": { + "D\u00e9pr\u00e9ciations des immobilisations incorporelles": { + "D\u00e9pr\u00e9ciations des frais de d\u00e9veloppement": { + "account_number": "2911" + }, + "D\u00e9pr\u00e9ciations des brevets, licences, concessions et droits similaires": { + "account_number": "2912" + }, + "D\u00e9pr\u00e9ciations des logiciels et sites internet": { + "account_number": "2913" + }, + "D\u00e9pr\u00e9ciations des marques": { + "account_number": "2914" + }, + "D\u00e9pr\u00e9ciations du fonds commercial": { + "account_number": "2915" + }, + "D\u00e9pr\u00e9ciations du droit au bail": { + "account_number": "2916" + }, + "D\u00e9pr\u00e9ciations des investissements de cr\u00e9ation": { + "account_number": "2917" + }, + "D\u00e9pr\u00e9ciations des autres droits et valeurs incorporels": { + "account_number": "2918" + }, + "D\u00e9pr\u00e9ciations des immobilisations incorporelles en cours": { + "account_number": "2919" + }, + "account_number": "291" + }, + "D\u00e9pr\u00e9ciations des terrains": { + "D\u00e9pr\u00e9ciations des terrains agricoles et forestiers": { + "account_number": "2921" + }, + "D\u00e9pr\u00e9ciations des terrains nus": { + "account_number": "2922" + }, + "D\u00e9pr\u00e9ciations des terrains b\u00e2tis": { + "account_number": "2923" + }, + "D\u00e9pr\u00e9ciations des travaux de mise en valeur des terrains": { + "account_number": "2924" + }, + "D\u00e9pr\u00e9ciations des terrains de gisement": { + "account_number": "2925" + }, + "D\u00e9pr\u00e9ciations des terrains am\u00e9nag\u00e9s": { + "account_number": "2926" + }, + "D\u00e9pr\u00e9ciations des terrains mis en concession": { + "account_number": "2927" + }, + "D\u00e9pr\u00e9ciations des autres terrains": { + "account_number": "2928" + }, + "D\u00e9pr\u00e9ciations des am\u00e9nagements de terrains en cours": { + "account_number": "2929" + }, + "account_number": "292" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents, installations techniques et agencements": { + "D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "account_number": "2931" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "account_number": "2932" + }, + "D\u00e9pr\u00e9ciations des ouvrages d\u2019infrastructures": { + "account_number": "2933" + }, + "D\u00e9pr\u00e9ciations des am\u00e9nagements, agencements et installations techniques": { + "account_number": "2934" + }, + "D\u00e9pr\u00e9ciations des am\u00e9nagements de bureaux": { + "account_number": "2935" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles et commerciaux mis en concession": { + "account_number": "2937" + }, + "D\u00e9pr\u00e9ciations des autres installations et agencements": { + "account_number": "2938" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents et installations en cours": { + "account_number": "2939" + }, + "account_number": "293" + }, + "D\u00e9pr\u00e9ciations de mat\u00e9riel, du mobilier et de l\u2019actif biologique": { + "D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage industriel et commercial": { + "account_number": "2941" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage agricole": { + "account_number": "2942" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "2943" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel et mobilier": { + "account_number": "2944" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel de transport": { + "account_number": "2945" + }, + "D\u00e9pr\u00e9ciations des actifs biologiques": { + "account_number": "2946" + }, + "D\u00e9pr\u00e9ciations des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": { + "account_number": "2947" + }, + "D\u00e9pr\u00e9ciations des autres mat\u00e9riels": { + "account_number": "2948" + }, + "D\u00e9pr\u00e9ciations de mat\u00e9riel en cours": { + "account_number": "2949" + }, + "account_number": "294" + }, + "D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations": { + "D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations incorporelles": { + "account_number": "2951" + }, + "D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations corporelles": { + "account_number": "2952" + }, + "account_number": "295" + }, + "D\u00e9pr\u00e9ciations des titres de participation": { + "D\u00e9pr\u00e9ciations des titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": { + "account_number": "2961" + }, + "D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s sous contr\u00f4le conjoint": { + "account_number": "2962" + }, + "D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s conf\u00e9rant une influence notable": { + "account_number": "2963" + }, + "D\u00e9pr\u00e9ciations des participations dans des organismes professionnels": { + "account_number": "2965" + }, + "D\u00e9pr\u00e9ciations des parts dans des GIE": { + "account_number": "2966" + }, + "D\u00e9pr\u00e9ciations des autres titres de participation": { + "account_number": "2968" + }, + "account_number": "296" + }, + "D\u00e9pr\u00e9ciations des autres immobilisations financi\u00e8res": { + "D\u00e9pr\u00e9ciations des pr\u00eats et cr\u00e9ances": { + "account_number": "2971" + }, + "D\u00e9pr\u00e9ciations des pr\u00eats au personnel": { + "account_number": "2972" + }, + "D\u00e9pr\u00e9ciations des cr\u00e9ances sur l\u2019\u00c9tat": { + "account_number": "2973" + }, + "D\u00e9pr\u00e9ciations des titres immobilis\u00e9s": { + "account_number": "2974" + }, + "D\u00e9pr\u00e9ciations des d\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "account_number": "2975" + }, + "D\u00e9pr\u00e9ciations des cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": { + "account_number": "2977" + }, + "D\u00e9pr\u00e9ciations des cr\u00e9ances financi\u00e8res diverses": { + "account_number": "2978" + }, + "account_number": "297" + }, + "account_number": "29" + }, + "root_type": "Asset", + "account_number": "2" + }, + "Comptes de Stocks": { + "Marchandises": { + "Marchandises A": { + "Marchandises A1": { + "account_number": "3111" + }, + "Marchandises A2": { + "account_number": "3112" + }, + "account_number": "311" + }, + "Marchandises B": { + "Marchandises B1": { + "account_number": "3121" + }, + "Marchandises B2": { + "account_number": "3122" + }, + "account_number": "312" + }, + "Actifs biologiques": { + "Animaux": { + "account_number": "3131" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3132" + }, + "account_number": "313" + }, + "Marchandises hors activit\u00e9s ordinaires (HAO)": { + "account_number": "318" + }, + "account_number": "31" + }, + "Mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "Mati\u00e8res A": { + "account_number": "321" + }, + "Mati\u00e8res B": { + "account_number": "322" + }, + "Fournitures (A, B)": { + "account_number": "323" + }, + "account_number": "32" + }, + "Autres approvisionnements": { + "Mati\u00e8res consommables": { + "account_number": "331" + }, + "Fournitures d\u2019atelier et d\u2019usine": { + "account_number": "332" + }, + "Fournitures de magasin": { + "account_number": "333" + }, + "Fournitures de bureau": { + "account_number": "334" + }, + "Emballages": { + "Emballages perdus": { + "account_number": "3351" + }, + "Emballages r\u00e9cup\u00e9rables non identifiables": { + "account_number": "3352" + }, + "Emballages \u00e0 usage mixte": { + "account_number": "3353" + }, + "Autres emballages": { + "account_number": "3358" + }, + "account_number": "335" + }, + "Autres mati\u00e8res": { + "account_number": "338" + }, + "account_number": "33" + }, + "Produits en cours": { + "Produits en cours": { + "Produits en cours P1": { + "account_number": "3411" + }, + "Produits en cours P2": { + "account_number": "3412" + }, + "account_number": "341" + }, + "Travaux en cours": { + "Travaux en cours T1": { + "account_number": "3421" + }, + "Travaux en cours T2": { + "account_number": "3422" + }, + "account_number": "342" + }, + "Produits interm\u00e9diaires en cours": { + "Produits interm\u00e9diaires A": { + "account_number": "3431" + }, + "Produits interm\u00e9diaires B": { + "account_number": "3432" + }, + "account_number": "343" + }, + "Produits r\u00e9siduels en cours": { + "Produits r\u00e9siduels A": { + "account_number": "3441" + }, + "Produits r\u00e9siduels B": { + "account_number": "3442" + }, + "account_number": "344" + }, + "Actifs biologiques en cours": { + "Animaux": { + "account_number": "3451" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3452" + }, + "account_number": "345" + }, + "account_number": "34" + }, + "Services en cours": { + "\u00c9tudes en cours": { + "\u00c9tudes en cours E1": { + "account_number": "3511" + }, + "\u00c9tudes en cours E2": { + "account_number": "3512" + }, + "account_number": "351" + }, + "Prestations de services en cours": { + "Prestations de services S1": { + "account_number": "3521" + }, + "Prestations de services S2": { + "account_number": "3522" + } + }, + "account_number": "35" + }, + "Produits finis": { + "Produits finis A": { + "account_number": "361" + }, + "Produits finis B": { + "account_number": "362" + }, + "Actifs biologiques": { + "Animaux": { + "account_number": "3631" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3632" + }, + "Autres stocks (activit\u00e9s annexes)": { + "account_number": "3638" + }, + "account_number": "363" + }, + "account_number": "36" + }, + "Produits interm\u00e9diaires et r\u00e9siduels": { + "Produits interm\u00e9diaires": { + "Produits interm\u00e9diaires A": { + "account_number": "3711" + }, + "Produits interm\u00e9diaires B": { + "account_number": "3712" + }, + "account_number": "371" + }, + "Produits r\u00e9siduels": { + "D\u00e9chets": { + "account_number": "3721" + }, + "Rebuts": { + "account_number": "3722" + }, + "Mati\u00e8res de R\u00e9cup\u00e9ration": { + "account_number": "3723" + }, + "account_number": "372" + }, + "Actifs biologiques": { + "Animaux": { + "account_number": "3731" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3732" + }, + "Autres stocks (activit\u00e9s annexes)": { + "account_number": "3738" + }, + "account_number": "373" + }, + "account_number": "37" + }, + "Stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": { + "account_type": "Stock", + "Marchandises en cours de route": { + "account_number": "381" + }, + "Mati\u00e8res premi\u00e8res et fournitures li\u00e9es en cours de route": { + "account_number": "382" + }, + "Autres approvisionnements en cours de route": { + "account_number": "383" + }, + "Produits finis en cours de route": { + "account_number": "386" + }, + "Stock en consignation ou en d\u00e9p\u00f4t": { + "Stock en consignation": { + "account_number": "3871" + }, + "Stock en d\u00e9p\u00f4t": { + "account_number": "3872" + }, + "account_number": "387" + }, + "Stock provenant d\u2019immobilisations mises hors service ou au rebut": { + "account_number": "388" + }, + "account_number": "38" + }, + "D\u00e9pr\u00e9ciations des stocks et encours de production": { + "D\u00e9pr\u00e9ciations des stocks de marchandises": { + "account_number": "391" + }, + "D\u00e9pr\u00e9ciations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "account_number": "392" + }, + "D\u00e9pr\u00e9ciations des stocks d\u2019autres approvisionnements": { + "account_number": "393" + }, + "D\u00e9pr\u00e9ciations des productions en cours": { + "account_number": "394" + }, + "D\u00e9pr\u00e9ciations des services en cours": { + "account_number": "395" + }, + "D\u00e9pr\u00e9ciations des stocks de produits finis": { + "account_number": "396" + }, + "D\u00e9pr\u00e9ciations des stocks de produits interm\u00e9diaires et r\u00e9siduels": { + "account_number": "397" + }, + "D\u00e9pr\u00e9ciations des stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": { + "account_number": "398" + }, + "account_number": "39" + }, + "root_type": "Asset", + "account_number": "3" + }, + "4-Comptes de Tiers (ACTIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (ACTIF)": { + "Fournisseurs d\u00e9biteurs": { + "Fournisseurs Avances et acomptes vers\u00e9s": { + "account_number": "4091" + }, + "Fournisseurs Groupe avances et acomptes vers\u00e9s": { + "account_number": "4092" + }, + "Fournisseurs Sous-traitants avances et acomptes vers\u00e9s": { + "account_number": "4093" + }, + "Fournisseurs Cr\u00e9ances pour emballages et mat\u00e9riels \u00e0 rendre": { + "account_number": "4094" + }, + "Fournisseurs Rabais, remises, ristournes et autres avoirs \u00e0 obtenir": { + "account_number": "4098" + }, + "account_number": "409" + } + }, + "41-Clients et comptes rattach\u00e9s (ACTIF)": { + "Clients": { + "Clients": { + "account_type": "Receivable", + "account_number": "4111" + }, + "Clients groupe": { + "account_type": "Receivable", + "account_number": "4112" + }, + "Clients, \u00c9tat et Collectivit\u00e9s publiques": { + "account_type": "Receivable", + "account_number": "4114" + }, + "Clients, organismes internationaux": { + "account_type": "Receivable", + "account_number": "4115" + }, + "Clients, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Receivable", + "account_number": "4116" + }, + "Client, retenues de garantie": { + "account_type": "Receivable", + "account_number": "4117" + }, + "Clients, d\u00e9gr\u00e8vement de taxes sur la valeur ajout\u00e9e (TVA)": { + "account_type": "Receivable", + "account_number": "4118" + }, + "account_type": "Receivable", + "account_number": "411" + }, + "Clients, effets \u00e0 recevoir en portefeuille": { + "Clients, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4121" + }, + "Clients Groupe, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4122" + }, + "\u00c9tat et Collectivit\u00e9s publiques, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4124" + }, + "Organismes Internationaux, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4125" + }, + "account_type": "Receivable", + "account_number": "412" + }, + "Clients, ch\u00e8ques, effets et autres valeurs impay\u00e9es": { + "Clients, ch\u00e8ques impay\u00e9s": { + "account_type": "Receivable", + "account_number": "4131" + }, + "Clients, effets impay\u00e9s": { + "account_type": "Receivable", + "account_number": "4132" + }, + "Clients, cartes de cr\u00e9dit impay\u00e9es": { + "account_type": "Receivable", + "account_number": "4133" + }, + "Clients, autres valeurs impay\u00e9es": { + "account_type": "Receivable", + "account_number": "4138" + }, + "account_type": "Receivable", + "account_number": "413" + }, + "Cr\u00e9ances sur cessions courantes d\u2019immobilisations": { + "Cr\u00e9ances en compte, immobilisations incorporelles": { + "account_type": "Receivable", + "account_number": "4141" + }, + "Cr\u00e9ances en compte, immobilisations corporelles": { + "account_type": "Receivable", + "account_number": "4142" + }, + "Effets \u00e0 recevoir, immobilisations incorporelles": { + "account_type": "Receivable", + "account_number": "4146" + }, + "Effets \u00e0 recevoir, immobilisations corporelles": { + "account_type": "Receivable", + "account_number": "4147" + }, + "account_type": "Receivable", + "account_number": "414" + }, + "Clients, effets escompt\u00e9s non \u00e9chus": { + "account_type": "Receivable", + "account_number": "415" + }, + "Cr\u00e9ances clients litigieuses ou douteuses": { + "Cr\u00e9ances litigieuses": { + "account_type": "Receivable", + "account_number": "4161" + }, + "Cr\u00e9ances douteuses": { + "account_type": "Receivable", + "account_number": "4162" + }, + "account_type": "Receivable", + "account_number": "416" + }, + "Clients, produits \u00e0 recevoir": { + "Clients, factures \u00e0 \u00e9tablir": { + "account_type": "Receivable", + "account_number": "4181" + }, + "Clients, int\u00e9r\u00eats courus": { + "account_type": "Receivable", + "account_number": "4186" + }, + "account_type": "Receivable", + "account_number": "418" + }, + "account_type": "Receivable" + }, + "42-Personnel (ACTIF)": { + "Personnel, avances et acomptes": { + "Personnel, avances": { + "account_number": "4211" + }, + "Personnel, acomptes": { + "account_number": "4212" + }, + "Frais avanc\u00e9s et fournitures au personnel": { + "account_number": "4213" + }, + "account_number": "421" + } + }, + "43-Organismes sociaux (ACTIF)": { + "431-S\u00e9curit\u00e9 sociale": { + "Prestations familiales": { + "account_number": "4311" + }, + "Accidents de travail": { + "account_number": "4312" + }, + "Caisse de retraite obligatoire": { + "account_number": "4313" + }, + "Caisse de retraite facultative": { + "account_number": "4314" + }, + "Autres cotisations sociales": { + "account_number": "4318" + } + }, + "432-Caisses de retraite compl\u00e9mentaire": {}, + "433-Autres organismes sociaux": { + "Mutuelle": { + "account_number": "4331" + }, + "Assurances retraite": { + "account_number": "4332" + }, + "Assurances et organismes de sant\u00e9": { + "account_number": "4333" + } + }, + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "Produits \u00e0 recevoir": { + "account_number": "4387" + } + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (ACTIF)": { + "\u00c9tat, TVA factur\u00e9e": { + "TVA factur\u00e9e sur ventes": { + "account_number": "4431" + }, + "TVA factur\u00e9e sur prestations de services": { + "account_number": "4432" + }, + "TVA factur\u00e9e sur travaux": { + "account_number": "4433" + }, + "TVA factur\u00e9e sur production livr\u00e9e \u00e0 soi-m\u00eame": { + "account_number": "4434" + }, + "TVA sur factures \u00e0 \u00e9tablir": { + "account_number": "4435" + }, + "account_number": "443" + }, + "\u00c9tat, TVA r\u00e9cup\u00e9rable": { + "TVA r\u00e9cup\u00e9rable sur immobilisations": { + "account_number": "4451" + }, + "TVA r\u00e9cup\u00e9rable sur achats": { + "account_number": "4452" + }, + "TVA r\u00e9cup\u00e9rable sur transport": { + "account_number": "4453" + }, + "TVA r\u00e9cup\u00e9rable sur services ext\u00e9rieurs et autres charges": { + "account_number": "4454" + }, + "TVA r\u00e9cup\u00e9rable sur factures non parvenues": { + "account_number": "4455" + }, + "TVA transf\u00e9r\u00e9e par d\u2019autres entit\u00e9s": { + "account_number": "4456" + }, + "account_number": "445" + }, + "\u00c9tat, charges \u00e0 payer et produits \u00e0 recevoir": { + "Charges \u00e0 payer": { + "account_number": "4486" + }, + "Produits \u00e0 recevoir": { + "account_number": "4487" + }, + "account_number": "448" + }, + "\u00c9tat, cr\u00e9ances et dettes diverses": { + "\u00c9tat, obligations cautionn\u00e9es": { + "account_number": "4491" + }, + "\u00c9tat, avances et acomptes vers\u00e9s sur imp\u00f4ts": { + "account_number": "4492" + }, + "\u00c9tat, fonds de dotation \u00e0 recevoir": { + "account_number": "4493" + }, + "\u00c9tat, subventions investissement \u00e0 recevoir": { + "account_number": "4494" + }, + "\u00c9tat, subventions d\u2019exploitation \u00e0 recevoir": { + "account_number": "4495" + }, + "\u00c9tat, subventions d\u2019\u00e9quilibre \u00e0 recevoir": { + "account_number": "4496" + }, + "\u00c9tat, avances sur subventions": { + "account_number": "4497" + }, + "\u00c9tat, fonds r\u00e9glement\u00e9s provisionn\u00e9s": { + "account_number": "4499" + }, + "account_number": "449" + } + }, + "45-Organismes internationaux (ACTIF)": { + "Op\u00e9rations avec les organismes africains": { + "account_number": "451" + }, + "Op\u00e9rations avec les autres organismes internationaux": { + "account_number": "452" + }, + "Organismes internationaux, fonds de dotation et subventions \u00e0 recevoir": { + "Organismes internationaux, fonds de dotation \u00e0 recevoir": { + "account_number": "4581" + }, + "Organismes internationaux, subventions \u00e0 recevoir": { + "account_number": "4582" + }, + "account_number": "458" + } + }, + "46-Apporteurs, associ\u00e9s et groupe (ACTIF)": { + "461-Apporteurs, op\u00e9rations sur le capital": { + "Apporteurs, capital appel\u00e9, non vers\u00e9": { + "account_number": "4613" + }, + "Apporteurs, compte d\u2019apport, op\u00e9rations de restructuration (fusion...)": { + "account_number": "4614" + }, + "Apporteurs, titres \u00e0 \u00e9changer": { + "account_number": "4618" + } + }, + "Apporteurs, restant d\u00fb sur capital appel\u00e9": { + "account_number": "467" + } + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (ACTIF)": { + "472-Cr\u00e9ances et dettes sur titres de placement": { + "Cr\u00e9ances sur cessions de titres de placement": { + "account_number": "4721" + }, + "Versements restant \u00e0 effectuer sur titres de placement non lib\u00e9r\u00e9s": { + "account_number": "4726" + } + }, + "473-Interm\u00e9diaires Op\u00e9rations faites pour compte de tiers": { + "Mandants": { + "account_number": "4731" + }, + "Mandataires": { + "account_number": "4732" + }, + "Commettants": { + "account_number": "4733" + }, + "Commissionnaires": { + "account_number": "4734" + }, + "\u00c9tat, Collectivit\u00e9s publiques, fonds global d\u2019allocation": { + "account_number": "4739" + } + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits": { + "Compte de r\u00e9partition p\u00e9riodique des produits": { + "account_number": "4747" + } + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA": { + "Compte actif": { + "account_type": "Temporary", + "account_number": "4751" + } + }, + "Charges constat\u00e9es d\u2019avance": { + "account_number": "476" + }, + "478-\u00c9carts de conversion actif": { + "Diminution des cr\u00e9ances d\u2019exploitation": { + "account_number": "4781" + }, + "Diminution des cr\u00e9ances financi\u00e8res": { + "account_number": "4782" + }, + "Augmentation des dettes d\u2019exploitation": { + "account_number": "4783" + }, + "Augmentation des dettes financi\u00e8res": { + "account_number": "4784" + }, + "Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": { + "account_number": "4786" + }, + "Diff\u00e9rences compens\u00e9es par couverture de change": { + "account_number": "4788" + } + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (ACTIF)": { + "Cr\u00e9ances sur cessions d\u2019immobilisations": { + "En compte, immobilisations incorporelles": { + "account_number": "4851" + }, + "En compte, immobilisations corporelles": { + "account_number": "4852" + }, + "Effets \u00e0 recevoir, immobilisations incorporelles": { + "account_number": "4853" + }, + "Effets \u00e0 recevoir, immobilisations corporelles": { + "account_number": "4854" + }, + "Effets escompt\u00e9s non \u00e9chus": { + "account_number": "4855" + }, + "Retenues de garantie": { + "account_number": "4857" + }, + "Factures \u00e0 \u00e9tablir": { + "account_number": "4858" + }, + "account_number": "485" + }, + "Autres cr\u00e9ances hors activit\u00e9s ordinaires (HAO)": { + "account_number": "488" + } + }, + "49-D\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme (tiers) (ACTIF)": { + "D\u00e9pr\u00e9ciations des comptes clients": { + "Cr\u00e9ances litigieuses": { + "account_number": "4911" + }, + "Cr\u00e9ances douteuses": { + "account_number": "4912" + }, + "account_number": "491" + }, + "D\u00e9pr\u00e9ciations des comptes organismes internationaux": { + "account_number": "495" + }, + "D\u00e9pr\u00e9ciations des comptes apporteurs, associ\u00e9s et groupe": { + "Associ\u00e9s, comptes courants": { + "account_number": "4962" + }, + "Associ\u00e9s, op\u00e9rations faites en commun": { + "account_number": "4963" + }, + "Groupe, comptes courants": { + "account_number": "4966" + }, + "account_number": "496" + }, + "D\u00e9pr\u00e9ciations des comptes d\u00e9biteurs divers": { + "account_number": "497" + }, + "D\u00e9pr\u00e9ciations des comptes de cr\u00e9ances HAO": { + "Cr\u00e9ances sur cessions d\u2019immobilisations": { + "account_number": "4985" + }, + "Cr\u00e9ances sur cessions de titres de placement": { + "account_number": "4986" + }, + "Autres cr\u00e9ances HAO": { + "account_number": "4988" + }, + "account_number": "498" + }, + "Provisions pour risques \u00e0 court terme": { + "Sur op\u00e9rations d\u2019exploitation": { + "account_number": "4991" + }, + "Sur op\u00e9rations financi\u00e8res": { + "account_number": "4997" + }, + "Sur op\u00e9rations HAO": { + "account_number": "4998" + }, + "account_number": "499" + } + }, + "root_type": "Asset" + }, + "4-Comptes de Tiers (PASSIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (PASSIF)": { + "Fournisseurs, dettes en compte": { + "Fournisseurs": { + "account_type": "Payable", + "account_number": "4011" + }, + "Fournisseurs groupe": { + "account_type": "Payable", + "account_number": "4012" + }, + "Fournisseurs sous-traitants": { + "account_type": "Payable", + "account_number": "4013" + }, + "Fournisseurs, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Payable", + "account_number": "4016" + }, + "Fournisseur, retenues de garantie": { + "account_type": "Payable", + "account_number": "4017" + }, + "account_type": "Payable", + "account_number": "401" + }, + "Fournisseurs, effets \u00e0 payer": { + "Fournisseurs Effets \u00e0 payer": { + "account_type": "Payable", + "account_number": "4021" + }, + "Fournisseurs Groupe, effets \u00e0 payer": { + "account_type": "Payable", + "account_number": "4022" + }, + "Fournisseurs Sous-traitants, effets \u00e0 payer": { + "account_type": "Payable", + "account_number": "4023" + }, + "account_type": "Payable", + "account_number": "402" + }, + "Fournisseurs, acquisitions courantes d\u2019immobilisations": { + "Fournisseurs Dettes en comptes, immobilisations incorporelles": { + "account_type": "Payable", + "account_number": "4041" + }, + "Fournisseurs Dettes en comptes, immobilisations corporelles": { + "account_type": "Payable", + "account_number": "4042" + }, + "Fournisseurs Effets \u00e0 payer, immobilisations incorporelles": { + "account_type": "Payable", + "account_number": "4046" + }, + "Fournisseurs Effets \u00e0 payer, immobilisations corporelles": { + "account_type": "Payable", + "account_number": "4047" + }, + "account_type": "Payable", + "account_number": "404" + }, + "Fournisseurs, factures non parvenues": { + "Fournisseurs": { + "account_type": "Stock Received But Not Billed", + "account_number": "4081" + }, + "Fournisseurs groupe": { + "account_type": "Stock Received But Not Billed", + "account_number": "4082" + }, + "Fournisseurs sous-traitants": { + "account_type": "Stock Received But Not Billed", + "account_number": "4083" + }, + "Fournisseurs, int\u00e9r\u00eats courus": { + "account_type": "Stock Received But Not Billed", + "account_number": "4086" + }, + "account_type": "Stock Received But Not Billed", + "account_number": "408" + }, + "account_type": "Payable" + }, + "41-Clients et comptes rattach\u00e9s (PASSIF)": { + "Clients cr\u00e9diteurs": { + "Clients, avances et acomptes re\u00e7us": { + "account_number": "4191" + }, + "Clients groupe, avances et acomptes re\u00e7us": { + "account_number": "4192" + }, + "Clients, dettes pour emballages et mat\u00e9riels consign\u00e9s": { + "account_number": "4194" + }, + "Clients, rabais, remises, ristournes et autres avoirs \u00e0 accorder": { + "account_number": "4198" + }, + "account_number": "419" + } + }, + "42-Personnel (PASSIF)": { + "Personnel, r\u00e9mun\u00e9rations dues": { + "account_number": "422" + }, + "Personnel, oppositions, saisies-arr\u00eats": { + "Personnel, oppositions": { + "account_number": "4231" + }, + "Personnel, saisies-arr\u00eats": { + "account_number": "4232" + }, + "Personnel, avis \u00e0 tiers d\u00e9tenteur": { + "account_number": "4233" + }, + "account_number": "423" + }, + "Personnel, \u0153uvres sociales internes": { + "Assistance m\u00e9dicale": { + "account_number": "4241" + }, + "Allocations familiales": { + "account_number": "4242" + }, + "Organismes sociaux rattach\u00e9s \u00e0 l\u2019entit\u00e9": { + "account_number": "4245" + }, + "Autres \u0153uvres sociales internes": { + "account_number": "4248" + }, + "account_number": "424" + }, + "Repr\u00e9sentants du personnel": { + "D\u00e9l\u00e9gu\u00e9s du personnel": { + "account_number": "4251" + }, + "Syndicats et Comit\u00e9s d\u2019entreprises, d\u2019\u00c9tablissement": { + "account_number": "4252" + }, + "Autres repr\u00e9sentants du personnel": { + "account_number": "4258" + }, + "account_number": "425" + }, + "Personnel, participation aux b\u00e9n\u00e9fices et au capital": { + "Participation aux b\u00e9n\u00e9fices": { + "account_number": "4261" + }, + "Participation au capital": { + "account_number": "4264" + }, + "account_number": "426" + }, + "Personnel d\u00e9p\u00f4ts": { + "account_number": "427" + }, + "Personnel, charges \u00e0 payer et produits \u00e0 recevoir": { + "Dettes provisionn\u00e9es pour cong\u00e9s \u00e0 payer": { + "account_number": "4281" + }, + "Autres charges \u00e0 payer": { + "account_number": "4286" + }, + "Produits \u00e0 recevoir": { + "account_number": "4287" + }, + "account_number": "428" + } + }, + "43-Organismes sociaux (PASSIF)": { + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "Charges sociales sur gratifications \u00e0 payer": { + "account_number": "4381" + }, + "Charges sociales sur cong\u00e9s \u00e0 payer": { + "account_number": "4382" + }, + "Autres charges \u00e0 payer": { + "account_number": "4386" + } + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (PASSIF)": { + "\u00c9tat, imp\u00f4t sur les b\u00e9n\u00e9fices": { + "account_number": "441" + }, + "\u00c9tat, autres imp\u00f4ts et taxes": { + "Imp\u00f4ts et taxes d\u2019\u00c9tat": { + "account_number": "4421" + }, + "Imp\u00f4ts et taxes pour les collectivit\u00e9s publiques": { + "account_number": "4422" + }, + "Imp\u00f4ts et taxes recouvrables sur des obligataires": { + "account_number": "4423" + }, + "Imp\u00f4ts et taxes recouvrables sur des associ\u00e9s": { + "account_number": "4424" + }, + "Droits de douane": { + "account_number": "4426" + }, + "Autres imp\u00f4ts et taxes": { + "account_number": "4428" + }, + "account_number": "442" + }, + "\u00c9tat, TVA due ou cr\u00e9dit de TVA": { + "\u00c9tat, TVA due": { + "account_number": "4441" + }, + "\u00c9tat, cr\u00e9dit de TVA \u00e0 reporter": { + "account_number": "4449" + }, + "account_number": "444" + }, + "\u00c9tat, autres taxes sur le chiffre d\u2019affaires": { + "account_number": "446" + }, + "\u00c9tat, imp\u00f4ts retenus \u00e0 la source": { + "Imp\u00f4t G\u00e9n\u00e9ral sur le revenu": { + "account_number": "4471" + }, + "Imp\u00f4ts sur salaires": { + "account_number": "4472" + }, + "Contribution nationale": { + "account_number": "4473" + }, + "Contribution nationale de solidarit\u00e9": { + "account_number": "4474" + }, + "Autres imp\u00f4ts et contributions": { + "account_number": "4478" + }, + "account_number": "447" + } + }, + "46-Apporteurs, associ\u00e9s et groupe (PASSIF)": { + "461-Apporteurs, op\u00e9rations sur le capital (PASSIF)": { + "Apporteurs, apports en nature": { + "account_number": "4611" + }, + "Apporteurs, apports en num\u00e9raire": { + "account_number": "4612" + }, + "Apporteurs, versements re\u00e7us sur augmentation de capital": { + "account_number": "4615" + }, + "Apporteurs, versements anticip\u00e9s": { + "account_number": "4616" + }, + "Apporteurs d\u00e9faillants": { + "account_number": "4617" + }, + "Apporteurs, capital \u00e0 rembourser": { + "account_number": "4619" + } + }, + "462-Associ\u00e9s, comptes courants": { + "Principal": { + "account_number": "4621" + }, + "Int\u00e9r\u00eats courus": { + "account_number": "4626" + } + }, + "463-Associ\u00e9s, op\u00e9rations faites en commun et GIE": { + "Op\u00e9rations courantes": { + "account_number": "4631" + }, + "Int\u00e9r\u00eats courus": { + "account_number": "4636" + } + }, + "Associ\u00e9s, dividendes \u00e0 payer": { + "account_number": "465" + }, + "Groupe, comptes courants": { + "account_number": "466" + } + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (PASSIF)": { + "471-D\u00e9biteurs et cr\u00e9diteurs divers": { + "D\u00e9biteurs divers": { + "account_number": "4711" + }, + "Cr\u00e9diteurs divers": { + "account_number": "4712" + }, + "Obligataires": { + "account_number": "4713" + }, + "R\u00e9mun\u00e9rations d\u2019administrateurs": { + "account_number": "4715" + }, + "Compte d\u2019affacturage": { + "account_number": "4716" + }, + "D\u00e9biteurs divers retenues de garantie": { + "account_number": "4717" + }, + "Apport, compte de fusion et op\u00e9rations assimil\u00e9es": { + "account_number": "4718" + }, + "Bons de souscription d\u2019actions et d\u2019obligations": { + "account_number": "4719" + } + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits (PASSIF)": { + "Compte de r\u00e9partition p\u00e9riodique des charges": { + "account_number": "4746" + } + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA (PASSIF)": { + "Compte passif": { + "account_number": "4752" + } + }, + "Produits constat\u00e9s d\u2019avance": { + "account_number": "477" + }, + "479-\u00c9carts de conversion passif": { + "Augmentation des cr\u00e9ances d\u2019exploitation": { + "account_number": "4791" + }, + "Augmentation des cr\u00e9ances financi\u00e8res": { + "account_number": "4792" + }, + "Diminution des dettes d\u2019exploitation": { + "account_number": "4793" + }, + "Diminution des dettes financi\u00e8res": { + "account_number": "4794" + }, + "Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": { + "account_number": "4797" + }, + "Diff\u00e9rences compens\u00e9es par couverture de change": { + "account_number": "4798" + } + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (HAO) (PASSIF)": { + "Fournisseurs d\u2019investissements": { + "Immobilisations incorporelles": { + "account_number": "4811" + }, + "Immobilisations corporelles": { + "account_number": "4812" + }, + "Versements restant \u00e0 effectuer sur titres de participation et titres immobilis\u00e9s non lib\u00e9r\u00e9s": { + "account_number": "4813" + }, + "R\u00e9serve de propri\u00e9t\u00e9": { + "account_number": "4816" + }, + "Retenues de garantie": { + "account_number": "4817" + }, + "Factures non parvenues": { + "account_number": "4818" + }, + "account_number": "481" + }, + "Fournisseurs d\u2019investissements, effets \u00e0 payer": { + "Immobilisations incorporelles": { + "account_number": "4821" + }, + "Immobilisations corporelles": { + "account_number": "4822" + }, + "account_number": "482" + }, + "Autres dettes hors activit\u00e9s ordinaires (HAO)": { + "Produits": { + "account_number": "4887" + }, + "account_number": "484" + } + }, + "root_type": "Liability" + }, + "Comptes de tr\u00e9sorerie": { + "Titres de placement": { + "Titres du tr\u00e9sor et bons de caisse \u00e0 court terme": { + "Titres du Tr\u00e9sor \u00e0 court terme": { + "account_number": "5011" + }, + "Titres d\u2019organismes financiers": { + "account_number": "5012" + }, + "Bons de caisse \u00e0 court terme": { + "account_number": "5013" + }, + "Frais d\u2019acquisition des titres de tr\u00e9sor et bons de caisse": { + "account_number": "5016" + }, + "account_number": "501" + }, + "Actions": { + "Actions ou parts propres": { + "account_number": "5021" + }, + "Actions cot\u00e9es": { + "account_number": "5022" + }, + "Actions non cot\u00e9es": { + "account_number": "5023" + }, + "Actions d\u00e9membr\u00e9es (certificats d\u2019investissement, droits de vote)": { + "account_number": "5024" + }, + "Autres actions": { + "account_number": "5025" + }, + "Frais d\u2019acquisition des actions": { + "account_number": "5026" + }, + "account_number": "502" + }, + "Obligations": { + "Obligations \u00e9mises par la soci\u00e9t\u00e9 et rachet\u00e9es par elle": { + "account_number": "5031" + }, + "Obligations cot\u00e9es": { + "account_number": "5032" + }, + "Obligations non cot\u00e9es": { + "account_number": "5033" + }, + "Autres obligations": { + "account_number": "5035" + }, + "Frais d\u2019acquisition des obligations": { + "account_number": "5036" + }, + "account_number": "503" + }, + "Bons de souscription": { + "Bons de souscription d\u2019actions": { + "account_number": "5042" + }, + "Bons de souscription d\u2019obligations": { + "account_number": "5043" + }, + "account_number": "504" + }, + "Titres n\u00e9gociables hors r\u00e9gion": { + "account_number": "505" + }, + "Int\u00e9r\u00eats courus": { + "Titres du Tr\u00e9sor et bons de caisse \u00e0 court terme": { + "account_number": "5061" + }, + "Actions": { + "account_number": "5062" + }, + "Obligations": { + "account_number": "5063" + }, + "account_number": "506" + }, + "Autres titres de placement et cr\u00e9ances assimil\u00e9es": { + "account_number": "508" + }, + "account_number": "50" + }, + "Valeurs \u00e0 encaisser": { + "Effets \u00e0 encaisser": { + "account_number": "511" + }, + "Effets \u00e0 l\u2019encaissement": { + "account_number": "512" + }, + "Ch\u00e8ques \u00e0 encaisser": { + "account_number": "513" + }, + "Ch\u00e8ques \u00e0 l\u2019encaissement": { + "account_number": "514" + }, + "Cartes de cr\u00e9dit \u00e0 encaisser": { + "account_number": "515" + }, + "Autres valeurs \u00e0 l\u2019encaissement": { + "Warrants": { + "account_number": "5181" + }, + "Billets de fonds": { + "account_number": "5182" + }, + "Ch\u00e8ques de voyage": { + "account_number": "5185" + }, + "Coupons \u00e9chus": { + "account_number": "5186" + }, + "Int\u00e9r\u00eats \u00e9chus des obligations": { + "account_number": "5187" + }, + "account_number": "518" + }, + "account_number": "51" + }, + "Banques": { + "Banques locales": { + "Banques en monnaie nationale": { + "account_type": "Bank", + "account_number": "5211" + }, + "Banques en devises": { + "account_type": "Bank", + "account_number": "5215" + }, + "account_type": "Bank", + "account_number": "521" + }, + "Banques autres \u00c9tats r\u00e9gion": { + "account_number": "522" + }, + "Banques autres \u00c9tats zone mon\u00e9taire": { + "account_number": "523" + }, + "Banques hors zone mon\u00e9taire": { + "account_number": "524" + }, + "Banques d\u00e9p\u00f4t \u00e0 terme": { + "account_number": "525" + }, + "Banques, int\u00e9r\u00eats courus": { + "Banque, int\u00e9r\u00eats courus, charges \u00e0 payer": { + "account_number": "5261" + }, + "Banque, int\u00e9r\u00eats courus, produits \u00e0 recevoir": { + "account_number": "5267" + }, + "account_number": "526" + }, + "account_number": "52" + }, + "\u00c9tablissements financiers et assimil\u00e9s": { + "Ch\u00e8ques postaux": { + "account_number": "531" + }, + "Tr\u00e9sor": { + "account_number": "532" + }, + "Soci\u00e9t\u00e9s de gestion et d\u2019interm\u00e9diation (SGI)": { + "account_number": "533" + }, + "\u00c9tablissements financiers, int\u00e9r\u00eats courus": { + "account_number": "536" + }, + "Autres organismes financiers": { + "account_number": "538" + }, + "account_number": "53" + }, + "Instruments de tr\u00e9sorerie": { + "Options de taux d\u2019int\u00e9r\u00eat": { + "account_number": "541" + }, + "Options de taux de change": { + "account_number": "542" + }, + "Options de taux boursiers": { + "account_number": "543" + }, + "Instruments de march\u00e9s \u00e0 terme": { + "account_number": "544" + }, + "Avoirs d\u2019or et autres m\u00e9taux pr\u00e9cieux": { + "account_number": "545" + }, + "account_number": "54" + }, + "Instruments de monnaie \u00e9lectronique": { + "Monnaie \u00e9lectronique carte carburant": { + "account_number": "551" + }, + "Monnaie \u00e9lectronique t\u00e9l\u00e9phone portable": { + "account_number": "552" + }, + "Monnaie \u00e9lectronique carte p\u00e9age": { + "account_number": "553" + }, + "Porte-monnaie \u00e9lectronique": { + "account_number": "554" + }, + "Autres instruments de monnaies \u00e9lectroniques": { + "account_number": "558" + }, + "account_number": "55" + }, + "Banques, cr\u00e9dits de tr\u00e9sorerie et d\u2019escompte": { + "Cr\u00e9dits de tr\u00e9sorerie": { + "account_number": "561" + }, + "Escompte de cr\u00e9dits de campagne": { + "account_number": "564" + }, + "Escompte de cr\u00e9dits ordinaires": { + "account_number": "565" + }, + "Banques, cr\u00e9dits de tr\u00e9sorerie, int\u00e9r\u00eats courus": { + "account_number": "566" + }, + "account_number": "56" + }, + "Caisse": { + "Caisse si\u00e8ge social": { + "Caisse en monnaie nationale": { + "account_number": "5711" + }, + "Caisse en devises": { + "account_number": "5712" + }, + "account_number": "571" + }, + "Caisse succursale A": { + "En monnaie nationale": { + "account_number": "5721" + }, + "En devises": { + "account_number": "5722" + }, + "account_number": "572" + }, + "Caisse succursale B": { + "En monnaie nationale": { + "account_number": "5731" + }, + "En devises": { + "account_number": "5732" + }, + "account_number": "573" + }, + "account_number": "57" + }, + "R\u00e9gies d\u2019avances, accr\u00e9ditifs et virements internes": { + "R\u00e9gies d\u2019avance": { + "account_number": "581" + }, + "Accr\u00e9ditifs": { + "account_number": "582" + }, + "Virements de fonds": { + "account_number": "585" + }, + "Autres virements internes": { + "account_number": "588" + }, + "account_number": "58" + }, + "D\u00e9pr\u00e9ciations et provisions pour risque \u00e0 court terme": { + "D\u00e9pr\u00e9ciations des titres de placement": { + "account_number": "590" + }, + "D\u00e9pr\u00e9ciations des titres et valeurs \u00e0 encaisser": { + "account_number": "591" + }, + "D\u00e9pr\u00e9ciations des comptes banques": { + "account_number": "592" + }, + "D\u00e9pr\u00e9ciations des comptes \u00e9tablissements financiers et assimil\u00e9s": { + "account_number": "593" + }, + "D\u00e9pr\u00e9ciations des comptes d\u2019instruments de tr\u00e9sorerie": { + "account_number": "594" + }, + "Provisions pour risque \u00e0 court terme \u00e0 caract\u00e8re financier": { + "account_number": "599" + }, + "account_number": "59" + }, + "root_type": "Asset", + "account_number": "5" + }, + "Comptes de charges des activit\u00e9s ordinaires": { + "Achats et variations de stocks": { + "Achats de marchandises": { + "Dans la R\u00e9gion": { + "account_number": "6011" + }, + "Hors R\u00e9gion": { + "account_number": "6012" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "6013" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "6014" + }, + "Frais sur achats": { + "account_number": "6015" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6019" + }, + "account_number": "601" + }, + "Achats de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "Dans la R\u00e9gion": { + "account_number": "6021" + }, + "Hors R\u00e9gion": { + "account_number": "6022" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "6023" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "6024" + }, + "Frais sur achats": { + "account_number": "6025" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6029" + }, + "account_number": "602" + }, + "Variations des stocks de biens achet\u00e9s": { + "Variations des stocks de marchandises": { + "account_number": "6031" + }, + "Variations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "account_number": "6032" + }, + "Variations des stocks d\u2019autres approvisionnements": { + "account_number": "6033" + }, + "account_number": "603" + }, + "Achats stock\u00e9s de mati\u00e8res et fournitures consommables": { + "Mati\u00e8res consommables": { + "account_number": "6041" + }, + "Mati\u00e8res combustibles": { + "account_number": "6042" + }, + "Produits d\u2019entretien": { + "account_number": "6043" + }, + "Fournitures d\u2019atelier et d\u2019usine": { + "account_number": "6044" + }, + "Frais sur achat": { + "account_number": "6045" + }, + "Fournitures de magasin": { + "account_number": "6046" + }, + "Fournitures de bureau": { + "account_number": "6047" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6049" + }, + "account_number": "604" + }, + "Autres achats": { + "Fournitures non stockables Eau": { + "account_number": "6051" + }, + "Fournitures non stockables \u00c9lectricit\u00e9": { + "account_number": "6052" + }, + "Fournitures non stockables Autres \u00e9nergies": { + "account_number": "6053" + }, + "Fournitures d\u2019entretien non stockables": { + "account_number": "6054" + }, + "Fournitures de bureau non stockables": { + "account_number": "6055" + }, + "Achats de petit mat\u00e9riel et outillage": { + "account_number": "6056" + }, + "Achats d\u2019\u00e9tudes et prestations de services": { + "account_number": "6057" + }, + "Achats de travaux, mat\u00e9riels et \u00e9quipements": { + "account_number": "6058" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6059" + }, + "account_number": "605" + }, + "Achats d\u2019emballages": { + "Emballages perdus": { + "account_number": "6081" + }, + "Emballages r\u00e9cup\u00e9rables non identifiables": { + "account_number": "6082" + }, + "Emballages \u00e0 usage mixte": { + "account_number": "6083" + }, + "Frais sur achats": { + "account_number": "6085" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6089" + }, + "account_number": "608" + }, + "account_number": "60" + }, + "Transports": { + "Transports sur ventes": { + "account_number": "612" + }, + "Transports pour le compte de tiers": { + "account_number": "613" + }, + "Transports du personnel": { + "account_number": "614" + }, + "Transports de plis": { + "account_number": "616" + }, + "Autres frais de transport": { + "Voyages et d\u00e9placements": { + "account_number": "6181" + }, + "Transports entre \u00e9tablissements ou chantiers": { + "account_number": "6182" + }, + "Transports administratifs": { + "account_number": "6183" + }, + "account_number": "618" + }, + "account_number": "61" + }, + "Services ext\u00e9rieurs": { + "Sous-traitance g\u00e9n\u00e9rale": { + "account_number": "621" + }, + "Locations, charges locatives": { + "Locations de terrains": { + "account_number": "6221" + }, + "Locations de b\u00e2timents": { + "account_number": "6222" + }, + "Locations de mat\u00e9riels et outillages": { + "account_number": "6223" + }, + "Malis sur emballages": { + "account_number": "6224" + }, + "Locations d\u2019emballages": { + "account_number": "6225" + }, + "Fermages et loyers du foncier": { + "account_number": "6226" + }, + "Locations et charges locatives diverses": { + "account_number": "6228" + }, + "account_number": "622" + }, + "Redevances de location acquisition": { + "Cr\u00e9dit-bail immobilier": { + "account_number": "6232" + }, + "Cr\u00e9dit-bail mobilier": { + "account_number": "6233" + }, + "Location-vente": { + "account_number": "6234" + }, + "Autres contrats de location acquisition": { + "account_number": "6238" + }, + "account_number": "623" + }, + "Entretien, r\u00e9parations, remise en \u00e9tat et maintenance": { + "Entretien et r\u00e9parations des biens immobiliers": { + "account_number": "6241" + }, + "Entretien et r\u00e9parations des biens mobiliers": { + "account_number": "6242" + }, + "Maintenance": { + "account_number": "6243" + }, + "Charges de d\u00e9mant\u00e8lement et remise en \u00e9tat": { + "account_number": "6244" + }, + "Autres entretiens et r\u00e9parations": { + "account_number": "6248" + }, + "account_number": "624" + }, + "Primes d\u2019assurance": { + "Assurances multirisques": { + "account_number": "6251" + }, + "Assurances mat\u00e9riel de transport": { + "account_number": "6252" + }, + "Assurances risques d\u2019exploitation": { + "account_number": "6253" + }, + "Assurances responsabilit\u00e9 du producteur": { + "account_number": "6254" + }, + "Assurances insolvabilit\u00e9 clients": { + "account_number": "6255" + }, + "Assurances transport sur ventes": { + "account_number": "6257" + }, + "Autres primes d\u2019assurances": { + "account_number": "6258" + }, + "account_number": "625" + }, + "\u00c9tudes, recherches et documentation": { + "\u00c9tudes et recherches": { + "account_number": "6261" + }, + "Documentation g\u00e9n\u00e9rale": { + "account_number": "6265" + }, + "Documentation technique": { + "account_number": "6266" + }, + "account_number": "626" + }, + "Publicit\u00e9, publications, relations publiques": { + "Annonces, insertions": { + "account_number": "6271" + }, + "Catalogues, imprim\u00e9s publicitaires": { + "account_number": "6272" + }, + "\u00c9chantillons": { + "account_number": "6273" + }, + "Foires et expositions": { + "account_number": "6274" + }, + "Publications": { + "account_number": "6275" + }, + "Cadeaux \u00e0 la client\u00e8le": { + "account_number": "6276" + }, + "Frais de colloques, s\u00e9minaires, conf\u00e9rences": { + "account_number": "6277" + }, + "Autres charges de publicit\u00e9 et relations publiques": { + "account_number": "6278" + }, + "account_number": "627" + }, + "Frais de t\u00e9l\u00e9communications": { + "Frais de t\u00e9l\u00e9phone": { + "account_number": "6281" + }, + "Frais de t\u00e9lex": { + "account_number": "6282" + }, + "Frais de t\u00e9l\u00e9copie": { + "account_number": "6283" + }, + "Autres frais de t\u00e9l\u00e9communications": { + "account_number": "6288" + }, + "account_number": "628" + }, + "account_number": "62" + }, + "Autres services ext\u00e9rieurs": { + "Frais bancaires": { + "Frais sur titres (vente, garde)": { + "account_number": "6311" + }, + "Frais sur effets": { + "account_number": "6312" + }, + "Location de coffres": { + "account_number": "6313" + }, + "Commissions d\u2019affacturage": { + "account_number": "6314" + }, + "Commissions sur cartes de cr\u00e9dit": { + "account_number": "6315" + }, + "Frais d\u2019\u00e9mission d\u2019emprunts": { + "account_number": "6316" + }, + "Frais sur instruments monnaie \u00e9lectronique": { + "account_number": "6317" + }, + "Autres frais bancaires": { + "account_number": "6318" + }, + "account_number": "631" + }, + "R\u00e9mun\u00e9rations d\u2019interm\u00e9diaires et de conseils": { + "Commissions et courtages sur ventes": { + "account_number": "6322" + }, + "Honoraires des professions r\u00e9glement\u00e9es": { + "account_number": "6324" + }, + "Frais d\u2019actes et de contentieux": { + "account_number": "6325" + }, + "R\u00e9mun\u00e9rations d\u2019affacturage": { + "account_number": "6326" + }, + "R\u00e9mun\u00e9rations des autres prestataires de services": { + "account_number": "6327" + }, + "Divers frais": { + "account_number": "6328" + }, + "account_number": "632" + }, + "Frais de formation du personnel": { + "account_number": "633" + }, + "Redevances pour brevets, licences, logiciels, concessions et droits et valeurs similaires": { + "Redevances pour brevets, licences": { + "account_number": "6342" + }, + "Redevances pour logiciels": { + "account_number": "6343" + }, + "Redevances pour marques": { + "account_number": "6344" + }, + "Redevances pour sites internet": { + "account_number": "6345" + }, + "Redevances pour concessions, droits et valeurs similaires": { + "account_number": "6346" + }, + "account_number": "634" + }, + "Cotisations": { + "Cotisations": { + "account_number": "6351" + }, + "Concours divers": { + "account_number": "6358" + }, + "account_number": "635" + }, + "R\u00e9mun\u00e9rations de personnel ext\u00e9rieur \u00e0 l\u2019entit\u00e9": { + "Personnel int\u00e9rimaire": { + "account_number": "6371" + }, + "Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": { + "account_number": "6372" + }, + "account_number": "637" + }, + "Autres charges externes": { + "Frais de recrutement du personnel": { + "account_number": "6381" + }, + "Frais de d\u00e9m\u00e9nagement": { + "account_number": "6382" + }, + "R\u00e9ceptions": { + "account_number": "6383" + }, + "Missions": { + "account_number": "6384" + }, + "Charges de copropri\u00e9t\u00e9": { + "account_number": "6385" + }, + "account_number": "638" + }, + "account_number": "63" + }, + "Imp\u00f4ts et taxes": { + "Imp\u00f4ts et taxes directs": { + "Imp\u00f4ts fonciers et taxes annexes": { + "account_number": "6411" + }, + "Patentes, licences et taxes annexes": { + "account_number": "6412" + }, + "Taxes sur appointements et salaires": { + "account_number": "6413" + }, + "Taxes d\u2019apprentissage": { + "account_number": "6414" + }, + "Formation professionnelle continue": { + "account_number": "6415" + }, + "Autres imp\u00f4ts et taxes directs": { + "account_number": "6418" + }, + "account_number": "641" + }, + "Imp\u00f4ts et taxes indirects": { + "account_number": "645" + }, + "Droits d\u2019enregistrement": { + "Droits de mutation": { + "account_number": "6461" + }, + "Droits de timbre": { + "account_number": "6462" + }, + "Taxes sur les v\u00e9hicules de soci\u00e9t\u00e9": { + "account_number": "6463" + }, + "Vignettes": { + "account_number": "6464" + }, + "Autres droits": { + "account_number": "6468" + }, + "account_number": "646" + }, + "P\u00e9nalit\u00e9s, amendes fiscales": { + "P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts directs": { + "account_number": "6471" + }, + "P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts indirects": { + "account_number": "6472" + }, + "P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts directs": { + "account_number": "6473" + }, + "P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts indirects": { + "account_number": "6474" + }, + "Autres p\u00e9nalit\u00e9s et amendes fiscales": { + "account_number": "6478" + }, + "account_number": "647" + }, + "Autres imp\u00f4ts et taxes": { + "account_number": "648" + }, + "account_number": "64" + }, + "Autres charges": { + "Pertes sur cr\u00e9ances clients et autres d\u00e9biteurs": { + "Clients": { + "account_number": "6511" + }, + "Autres d\u00e9biteurs": { + "account_number": "6515" + }, + "account_number": "651" + }, + "Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "Quote-part transf\u00e9r\u00e9e de b\u00e9n\u00e9fices (comptabilit\u00e9 du g\u00e9rant)": { + "account_number": "6521" + }, + "Pertes imput\u00e9es par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": { + "account_number": "6525" + }, + "account_number": "652" + }, + "Valeurs comptables des cessions courantes d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "6541" + }, + "Immobilisations corporelles": { + "account_number": "6542" + }, + "account_number": "654" + }, + "Perte de change sur cr\u00e9ances et dettes commerciale": { + "account_number": "656" + }, + "P\u00e9nalit\u00e9s et amendes p\u00e9nales": { + "account_number": "657" + }, + "Charges diverses": { + "Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": { + "account_number": "6581" + }, + "Dons": { + "account_number": "6582" + }, + "M\u00e9c\u00e9nat": { + "account_number": "6583" + }, + "Autres charges diverses": { + "account_number": "6588" + }, + "account_number": "658" + }, + "Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "Sur risques \u00e0 court terme": { + "account_number": "6591" + }, + "Sur stocks": { + "account_number": "6593" + }, + "Sur cr\u00e9ances": { + "account_number": "6594" + }, + "Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme": { + "account_number": "6598" + }, + "account_number": "659" + }, + "account_number": "65" + }, + "Charges de personnel": { + "R\u00e9mun\u00e9rations directes vers\u00e9es au personnel national": { + "Appointements salaires et commissions": { + "account_number": "6611" + }, + "Primes et gratifications": { + "account_number": "6612" + }, + "Cong\u00e9s pay\u00e9s": { + "account_number": "6613" + }, + "Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": { + "account_number": "6614" + }, + "Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": { + "account_number": "6615" + }, + "Suppl\u00e9ment familial": { + "account_number": "6616" + }, + "Avantages en nature": { + "account_number": "6617" + }, + "Autres r\u00e9mun\u00e9rations directes": { + "account_number": "6618" + }, + "account_number": "661" + }, + "R\u00e9mun\u00e9rations directes vers\u00e9es au personnel non national": { + "Appointements salaires et commissions": { + "account_number": "6621" + }, + "Primes et gratifications": { + "account_number": "6622" + }, + "Cong\u00e9s pay\u00e9s": { + "account_number": "6623" + }, + "Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": { + "account_number": "6624" + }, + "Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": { + "account_number": "6625" + }, + "Suppl\u00e9ment familial": { + "account_number": "6626" + }, + "Avantages en nature": { + "account_number": "6627" + }, + "Autres r\u00e9mun\u00e9rations directes": { + "account_number": "6628" + }, + "account_number": "662" + }, + "Indemnit\u00e9s forfaitaires vers\u00e9es au personnel": { + "Indemnit\u00e9s de logement": { + "account_number": "6631" + }, + "Indemnit\u00e9s de repr\u00e9sentation": { + "account_number": "6632" + }, + "Indemnit\u00e9s d\u2019expatriation": { + "account_number": "6633" + }, + "Indemnit\u00e9s de transport": { + "account_number": "6634" + }, + "Autres indemnit\u00e9s et avantages divers": { + "account_number": "6638" + }, + "account_number": "663" + }, + "Charges sociales": { + "Charges sociales sur r\u00e9mun\u00e9ration du personnel national": { + "account_number": "6641" + }, + "Charges sociales sur r\u00e9mun\u00e9ration du personnel non national": { + "account_number": "6642" + }, + "account_number": "664" + }, + "R\u00e9mun\u00e9rations et charges sociales de l\u2019exploitant individuel": { + "R\u00e9mun\u00e9ration du travail de l\u2019exploitant": { + "account_number": "6661" + }, + "Charges sociales": { + "account_number": "6662" + }, + "account_number": "666" + }, + "R\u00e9mun\u00e9ration transf\u00e9r\u00e9e de personnel ext\u00e9rieur": { + "Personnel int\u00e9rimaire": { + "account_number": "6671" + }, + "Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": { + "account_number": "6672" + }, + "account_number": "667" + }, + "Autres charges sociales": { + "Versements aux syndicats et comit\u00e9s d\u2019entreprise, d\u2019\u00e9tablissement": { + "account_number": "6681" + }, + "Versements aux comit\u00e9s d\u2019hygi\u00e8ne et de s\u00e9curit\u00e9": { + "account_number": "6682" + }, + "Versements et contributions aux autres \u0153uvres sociales": { + "account_number": "6683" + }, + "M\u00e9decine du travail et pharmacie": { + "account_number": "6684" + }, + "Assurances et organismes de sant\u00e9": { + "account_number": "6685" + }, + "Assurances retraite et fonds de pension": { + "account_number": "6686" + }, + "Majorations et p\u00e9nalit\u00e9s sociales": { + "account_number": "6687" + }, + "Charges sociales diverses": { + "account_number": "6688" + }, + "account_number": "668" + }, + "account_number": "66" + }, + "Frais financiers et charges assimil\u00e9es": { + "Int\u00e9r\u00eats des emprunts": { + "Emprunts obligataires": { + "account_number": "6711" + }, + "Emprunts aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": { + "account_number": "6712" + }, + "Dettes li\u00e9es \u00e0 des participations": { + "account_number": "6713" + }, + "Primes de remboursement des obligations": { + "account_number": "6714" + }, + "account_number": "671" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition": { + "Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail immobilier": { + "account_number": "6722" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail mobilier": { + "account_number": "6723" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition / location-vente": { + "account_number": "6724" + }, + "Int\u00e9r\u00eats dans loyers des autres locations acquisition": { + "account_number": "6728" + }, + "account_number": "672" + }, + "Escomptes accord\u00e9s": { + "account_number": "673" + }, + "Autres int\u00e9r\u00eats": { + "Avances re\u00e7ues et d\u00e9p\u00f4ts cr\u00e9diteurs": { + "account_number": "6741" + }, + "Comptes courants bloqu\u00e9s": { + "account_number": "6742" + }, + "Int\u00e9r\u00eats sur obligations cautionn\u00e9es": { + "account_number": "6743" + }, + "Int\u00e9r\u00eats sur dettes commerciales": { + "account_number": "6744" + }, + "Int\u00e9r\u00eats bancaires et sur op\u00e9rations de financement (escompte...)": { + "account_number": "6745" + }, + "Int\u00e9r\u00eats sur dettes diverses": { + "account_number": "6748" + }, + "account_number": "674" + }, + "Escomptes des effets de commerce": { + "account_number": "675" + }, + "Pertes de change financi\u00e8res": { + "account_number": "676" + }, + "Pertes sur titres de placement": { + "Pertes sur cessions de titres de placement": { + "account_number": "6771" + }, + "Mali provenant d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": { + "account_number": "6772" + }, + "account_number": "677" + }, + "Pertes et charges sur risques financiers": { + "Sur rentes viag\u00e8res": { + "account_number": "6781" + }, + "Sur op\u00e9rations financi\u00e8res": { + "account_number": "6782" + }, + "Sur instruments de tr\u00e9sorerie": { + "account_number": "6784" + }, + "account_number": "678" + }, + "Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "Sur risques financiers": { + "account_number": "6791" + }, + "Sur titres de placement": { + "account_number": "6795" + }, + "Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "account_number": "6798" + }, + "account_number": "679" + }, + "account_number": "67" + }, + "Dotations aux amortissements": { + "Dotations aux amortissements d\u2019exploitation": { + "Dotations aux amortissements des immobilisations incorporelles": { + "account_number": "6812" + }, + "Dotations aux amortissements des immobilisations corporelles": { + "account_number": "6813" + }, + "account_number": "681" + }, + "account_number": "68" + }, + "Dotations aux provisions et aux d\u00e9pr\u00e9ciations": { + "Dotations aux provisions et aux d\u00e9pr\u00e9ciations d\u2019exploitation": { + "Dotations aux provisions pour risques et charges": { + "account_number": "6911" + }, + "Dotations aux d\u00e9pr\u00e9ciations des immobilisations incorporelles": { + "account_number": "6913" + }, + "Dotations aux d\u00e9pr\u00e9ciations des immobilisations corporelles": { + "account_number": "6914" + }, + "account_number": "691" + }, + "Dotations aux provisions et aux d\u00e9pr\u00e9ciations financi\u00e8res": { + "Dotations aux provisions pour risques et charges": { + "account_number": "6971" + }, + "Dotations aux d\u00e9pr\u00e9ciations des immobilisations financi\u00e8res": { + "account_number": "6972" + }, + "account_number": "697" + }, + "account_number": "69" + }, + "root_type": "Expense", + "account_number": "6" + }, + "Comptes de produits des activit\u00e9s ordinaires": { + "Ventes": { + "Ventes de marchandises": { + "Dans la R\u00e9gion": { + "account_number": "7011" + }, + "Hors R\u00e9gion": { + "account_number": "7012" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7013" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7014" + }, + "Sur internet": { + "account_number": "7015" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7019" + }, + "account_number": "701" + }, + "Ventes de produits finis": { + "Dans la R\u00e9gion": { + "account_number": "7021" + }, + "Hors R\u00e9gion": { + "account_number": "7022" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7023" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7024" + }, + "Sur internet": { + "account_number": "7025" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7029" + }, + "account_number": "702" + }, + "Ventes de produits interm\u00e9diaires": { + "Dans la R\u00e9gion": { + "account_number": "7031" + }, + "Hors R\u00e9gion": { + "account_number": "7032" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7033" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7034" + }, + "Sur internet": { + "account_number": "7035" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7039" + }, + "account_number": "703" + }, + "Ventes de produits r\u00e9siduels": { + "Dans la R\u00e9gion": { + "account_number": "7041" + }, + "Hors R\u00e9gion": { + "account_number": "7042" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7043" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7044" + }, + "Sur internet": { + "account_number": "7045" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7049" + }, + "account_number": "704" + }, + "Travaux factur\u00e9s": { + "Dans la R\u00e9gion": { + "account_number": "7051" + }, + "Hors R\u00e9gion": { + "account_number": "7052" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7053" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7054" + }, + "Sur internet": { + "account_number": "7055" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7059" + }, + "account_number": "705" + }, + "Services vendus": { + "Dans la R\u00e9gion": { + "account_number": "7061" + }, + "Hors R\u00e9gion": { + "account_number": "7062" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7063" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7064" + }, + "Sur internet": { + "account_number": "7065" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7069" + }, + "account_number": "706" + }, + "Produits accessoires": { + "Ports, emballages perdus et autres frais factur\u00e9s": { + "account_number": "7071" + }, + "Commissions et courtages": { + "account_number": "7072" + }, + "Locations": { + "account_number": "7073" + }, + "Bonis sur reprises et cessions d\u2019emballages": { + "account_number": "7074" + }, + "Mise \u00e0 disposition de personnel": { + "account_number": "7075" + }, + "Redevances pour brevets, logiciels, marques et droits similaires": { + "account_number": "7076" + }, + "Services exploit\u00e9s dans l\u2019int\u00e9r\u00eat du personnel": { + "account_number": "7077" + }, + "Autres produits accessoires": { + "account_number": "7078" + }, + "account_number": "707" + }, + "account_number": "70" + }, + "Subventions d\u2019exploitation": { + "Sur produits \u00e0 l\u2019exportation": { + "account_number": "711" + }, + "Sur produits \u00e0 l\u2019importation": { + "account_number": "712" + }, + "Sur produits de p\u00e9r\u00e9quation": { + "account_number": "713" + }, + "Indemnit\u00e9s et subventions d\u2019exploitation (entit\u00e9 agricole)": { + "account_number": "714" + }, + "Autres subventions d\u2019exploitation": { + "Vers\u00e9es par l\u2019\u00c9tat et les collectivit\u00e9s publiques": { + "account_number": "7181" + }, + "Vers\u00e9es par les organismes internationaux": { + "account_number": "7182" + }, + "Vers\u00e9es par des tiers": { + "account_number": "7183" + }, + "account_number": "718" + }, + "account_number": "71" + }, + "Production immobilis\u00e9e": { + "Immobilisations incorporelles": { + "account_number": "721" + }, + "Immobilisations corporelles": { + "Immobilisations corporelles (hors actifs biologiques)": { + "account_number": "7221" + }, + "Immobilisations corporelles (actifs biologiques)": { + "account_number": "7222" + }, + "account_number": "722" + }, + "Production auto-consomm\u00e9e": { + "account_number": "724" + }, + "Immobilisations financi\u00e8res": { + "account_number": "726" + }, + "account_number": "72" + }, + "Variations des stocks de biens et de services produits": { + "Variations des stocks de produits en cours": { + "Produits en cours": { + "account_number": "7341" + }, + "Travaux en cours": { + "account_number": "7342" + }, + "account_number": "734" + }, + "Variations des en-cours de services": { + "\u00c9tudes en cours": { + "account_number": "7351" + }, + "Prestations de services en cours": { + "account_number": "7352" + }, + "account_number": "735" + }, + "Variations des stocks de produits finis": { + "account_number": "736" + }, + "Variations des stocks de produits interm\u00e9diaires et r\u00e9siduels": { + "Produits interm\u00e9diaires": { + "account_number": "7371" + }, + "Produits r\u00e9siduels": { + "account_number": "7372" + }, + "account_number": "737" + }, + "account_number": "73" + }, + "Autres produits": { + "Profits sur cr\u00e9ances clients et autres d\u00e9biteurs": { + "account_number": "751" + }, + "Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "Quote-part transf\u00e9r\u00e9e de pertes (comptabilit\u00e9 du g\u00e9rant)": { + "account_number": "7521" + }, + "B\u00e9n\u00e9fices attribu\u00e9s par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": { + "account_number": "7525" + }, + "account_number": "752" + }, + "Produits des cessions courantes d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "7541" + }, + "Immobilisations corporelles": { + "account_number": "7542" + }, + "account_number": "754" + }, + "Gains de change sur cr\u00e9ances et dettes commerciales": { + "account_number": "756" + }, + "Produits divers": { + "Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": { + "account_number": "7581" + }, + "Indemnit\u00e9s d\u2019assurances re\u00e7ues": { + "account_number": "7582" + }, + "Autres produits divers": { + "account_number": "7588" + }, + "account_number": "758" + }, + "Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "Sur risques \u00e0 court terme": { + "account_number": "7591" + }, + "Sur stocks": { + "account_number": "7593" + }, + "Sur cr\u00e9ances": { + "account_number": "7594" + }, + "Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "account_number": "7598" + }, + "account_number": "759" + }, + "account_number": "75" + }, + "Revenus financiers et produits assimil\u00e9s": { + "Int\u00e9r\u00eats de pr\u00eats et cr\u00e9ances diverses": { + "Int\u00e9r\u00eats de pr\u00eats": { + "account_number": "7712" + }, + "Int\u00e9r\u00eats sur cr\u00e9ances diverses": { + "account_number": "7713" + }, + "account_number": "771" + }, + "Revenus de participations et autres titres immobilis\u00e9s": { + "Revenus des titres de participation": { + "account_number": "7721" + }, + "Revenus autres titres immobilis\u00e9s": { + "account_number": "7722" + }, + "account_number": "772" + }, + "Escomptes obtenus": { + "account_number": "773" + }, + "Revenus de placement": { + "Revenus des obligations": { + "account_number": "7745" + }, + "Revenus des titres de placement": { + "account_number": "7746" + }, + "account_number": "774" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition": { + "account_number": "775" + }, + "Gains de change financiers": { + "account_number": "776" + }, + "Gains sur cessions de titres de placement": { + "account_number": "777" + }, + "Gains sur risques financiers": { + "Sur rentes viag\u00e8res": { + "account_number": "7781" + }, + "Sur op\u00e9rations financi\u00e8res": { + "account_number": "7782" + }, + "Sur instruments de tr\u00e9sorerie": { + "account_number": "7784" + }, + "account_number": "778" + }, + "Reprises de charges pour d\u00e9pr\u00e9ciations et provisions \u00e0 court terme financi\u00e8res": { + "Sur risques financiers": { + "account_number": "7791" + }, + "Sur titres de placement": { + "account_number": "7795" + }, + "Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "account_number": "7798" + }, + "account_number": "779" + }, + "account_number": "77" + }, + "Transferts de charges": { + "Transferts de charges d\u2019exploitation": { + "account_number": "781" + }, + "Transferts de charges financi\u00e8res": { + "account_number": "787" + }, + "account_number": "78" + }, + "Reprises de provisions, de d\u00e9pr\u00e9ciations et autres": { + "Reprises de provisions et d\u00e9pr\u00e9ciations d\u2019exploitation": { + "Pour risques et charges": { + "account_number": "7911" + }, + "Des immobilisations incorporelles": { + "account_number": "7913" + }, + "Des immobilisations corporelles": { + "account_number": "7914" + }, + "account_number": "791" + }, + "Reprises de provisions et d\u00e9pr\u00e9ciations financi\u00e8res": { + "Pour risques et charges": { + "account_number": "7971" + }, + "Des immobilisations financi\u00e8res": { + "account_number": "7972" + }, + "account_number": "797" + }, + "Reprises d\u2019amortissements": { + "account_number": "798" + }, + "Reprises de subventions d\u2019investissement": { + "account_number": "799" + }, + "account_number": "79" + }, + "root_type": "Income", + "account_number": "7" + }, + "8-Comptes des autres charges et des autres produits (CHARGES)": { + "Valeurs comptables des cessions d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "811" + }, + "Immobilisations corporelles": { + "account_number": "812" + }, + "Immobilisations financi\u00e8res": { + "account_number": "816" + }, + "account_number": "81" + }, + "Charges hors activit\u00e9s ordinaires": { + "Charges HAO constat\u00e9es": { + "account_number": "831" + }, + "Charges li\u00e9es aux op\u00e9rations de restructuration": { + "account_number": "833" + }, + "Pertes sur cr\u00e9ances HAO": { + "account_number": "834" + }, + "Dons et lib\u00e9ralit\u00e9s accord\u00e9s": { + "account_number": "835" + }, + "Abandons de cr\u00e9ances consentis": { + "account_number": "836" + }, + "Charges li\u00e9es aux op\u00e9rations de liquidation": { + "account_number": "837" + }, + "Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": { + "account_number": "839" + }, + "account_number": "83" + }, + "Dotations hors activit\u00e9s ordinaires": { + "Dotations aux provisions r\u00e9glement\u00e9es": { + "account_number": "851" + }, + "Dotations aux amortissements HAO": { + "account_number": "852" + }, + "Dotations aux d\u00e9pr\u00e9ciations HAO": { + "account_number": "853" + }, + "Dotations aux provisions pour risques et charges HAO": { + "account_number": "854" + }, + "Autres dotations HAO": { + "account_number": "858" + }, + "account_number": "85" + }, + "Participation des travailleurs": { + "Participation l\u00e9gale aux b\u00e9n\u00e9fices": { + "account_number": "871" + }, + "Participation contractuelle aux b\u00e9n\u00e9fices": { + "account_number": "874" + }, + "Autres participations": { + "account_number": "878" + }, + "account_number": "87" + }, + "Imp\u00f4ts sur le r\u00e9sultat": { + "Imp\u00f4ts sur les b\u00e9n\u00e9fices de l\u2019exercice": { + "Activit\u00e9s exerc\u00e9es dans l\u2019\u00c9tat": { + "account_number": "8911" + }, + "Activit\u00e9s exerc\u00e9es dans les autres \u00c9tats de la R\u00e9gion": { + "account_number": "8912" + }, + "Activit\u00e9s exerc\u00e9es hors R\u00e9gion": { + "account_number": "8913" + }, + "account_number": "891" + }, + "Rappel d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": { + "account_number": "892" + }, + "Imp\u00f4t minimum forfaitaire IMF": { + "account_number": "895" + }, + "D\u00e9gr\u00e8vements et annulations d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": { + "D\u00e9gr\u00e8vements": { + "account_number": "8991" + }, + "Annulations pour pertes r\u00e9troactives": { + "account_number": "8994" + }, + "account_number": "899" + }, + "account_number": "89" + }, + "root_type": "Expense" + }, + "8-Comptes des autres charges et des autres produits (PRODUITS)": { + "Produits des cessions d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "821" + }, + "Immobilisations corporelles": { + "account_number": "822" + }, + "Immobilisations financi\u00e8res": { + "account_number": "826" + }, + "account_number": "82" + }, + "Produits hors activit\u00e9s ordinaires": { + "Produits HAO constat\u00e9s": { + "account_number": "841" + }, + "Produits li\u00e9s aux op\u00e9rations de restructuration": { + "account_number": "843" + }, + "Indemnit\u00e9s et subventions HAO (entit\u00e9 agricole)": { + "account_number": "844" + }, + "Dons et lib\u00e9ralit\u00e9s obtenus": { + "account_number": "845" + }, + "Abandons de cr\u00e9ances obtenus": { + "account_number": "846" + }, + "Produits li\u00e9s aux op\u00e9rations de liquidation": { + "account_number": "847" + }, + "Transferts de charges HAO": { + "account_number": "848" + }, + "Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": { + "account_number": "849" + }, + "account_number": "84" + }, + "Reprises de charges, provisions et d\u00e9pr\u00e9ciations HAO": { + "Reprises de provisions r\u00e9glement\u00e9es": { + "account_number": "861" + }, + "Reprises d\u2019amortissements HAO": { + "account_number": "862" + }, + "Reprises de d\u00e9pr\u00e9ciations HAO": { + "account_number": "863" + }, + "Reprises de provisions pour risques et charges HAO": { + "account_number": "864" + }, + "Autres reprises HAO": { + "account_number": "868" + }, + "account_number": "86" + }, + "Subventions d\u2019\u00e9quilibre": { + "\u00c9tat": { + "account_number": "881" + }, + "Collectivit\u00e9s publiques": { + "account_number": "884" + }, + "Groupe": { + "account_number": "886" + }, + "Autres": { + "account_number": "888" + }, + "account_number": "88" + }, + "root_type": "Income" + } + } +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/sn_plan_comptable.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/sn_plan_comptable.json new file mode 100644 index 00000000000..4acd0d1fd77 --- /dev/null +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/sn_plan_comptable.json @@ -0,0 +1,1919 @@ +{ + "country_code": "sn", + "name": "Syscohada - Plan Comptable", + "tree": { + "1-Comptes de ressources durables": { + "10-Capital": { + "101-Capital social": { + "1011-Capital souscrit, non appel\u00e9": {}, + "1012-Capital souscrit, appel\u00e9, non vers\u00e9": {}, + "1013-Capital souscrit, appel\u00e9, vers\u00e9, non amorti": {}, + "1014-Capital souscrit, appel\u00e9, vers\u00e9, amorti": {}, + "1018-Capital souscrit soumis \u00e0 des conditions particuli\u00e8res": {} + }, + "102-Capital par dotation": { + "1021-Dotation initiale": {}, + "1022-Dotations compl\u00e9mentaires": {}, + "1028-Autres dotations": {} + }, + "103-Capital personnel": {}, + "104-Compte de l\u2019exploitant": { + "1041-Apports temporaires": {}, + "1042-Op\u00e9rations courantes": {}, + "1043-R\u00e9mun\u00e9rations, imp\u00f4ts et autres charges personnelles": {}, + "1047-Pr\u00e9l\u00e8vements d\u2019autoconsommation": {}, + "1048-Autres pr\u00e9l\u00e8vements": {} + }, + "105-Primes li\u00e9es au capital social": { + "1051-Primes d\u2019\u00e9mission": {}, + "1052-Primes d\u2019apport": {}, + "1053-Primes de fusion": {}, + "1054-Primes de conversion": {}, + "1058-Autres primes": {} + }, + "106-\u00c9carts de r\u00e9\u00e9valuation": { + "1061-\u00c9carts de r\u00e9\u00e9valuation l\u00e9gale": {}, + "1062-\u00c9carts de r\u00e9\u00e9valuation libre": {} + }, + "109-Apporteurs, capital souscrit, non appel\u00e9": {} + }, + "11-R\u00e9serves": { + "111-R\u00e9serve l\u00e9gale": {}, + "112-R\u00e9serves statutaires ou contractuelles": {}, + "113-R\u00e9serves r\u00e9glement\u00e9es": { + "1131-R\u00e9serves de plus-values nettes \u00e0 long terme": {}, + "1132-R\u00e9serves d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": {}, + "1133-R\u00e9serves cons\u00e9cutives \u00e0 l\u2019octroi de subventions d\u2019investissement": {}, + "1134-R\u00e9serves des valeurs mobili\u00e8res donnant acc\u00e8s au capital": {}, + "1135-Autres r\u00e9serves r\u00e9glement\u00e9es": {} + }, + "118-Autres r\u00e9serves": { + "1181-R\u00e9serves facultatives": {}, + "1188-R\u00e9serves diverses": {} + } + }, + "12-Report \u00e0 nouveau": { + "121-Report \u00e0 nouveau cr\u00e9diteur": {}, + "129-Report \u00e0 nouveau d\u00e9biteur": { + "1291-Perte nette \u00e0 reporter": {}, + "1292-Perte Amortissements r\u00e9put\u00e9s diff\u00e9r\u00e9s": {} + } + }, + "13-R\u00e9sultat net de l\u2019exercice": { + "130-R\u00e9sultat en instance d\u2019affectation": { + "1301-R\u00e9sultat en instance d\u2019affectation : b\u00e9n\u00e9fice": {}, + "1309-R\u00e9sultat en instance d\u2019affectation : perte": {} + }, + "131-R\u00e9sultat net : b\u00e9n\u00e9fice": {}, + "132-Marge commerciale (MC)": {}, + "133-Valeur ajout\u00e9e (VA)": {}, + "134-Exc\u00e9dent brut d\u2019exploitation (EBE)": {}, + "135-R\u00e9sultat d\u2019exploitation (RE)": {}, + "136-R\u00e9sultat financier (RF)": {}, + "137-R\u00e9sultat des activit\u00e9s ordinaires (RAO)": {}, + "138-R\u00e9sultat hors activit\u00e9s ordinaires (RHAO)": { + "1381-R\u00e9sultat de fusion": {}, + "1382-R\u00e9sultat d\u2019apport partiel d\u2019actif": {}, + "1383-R\u00e9sultat de scission": {}, + "1384-R\u00e9sultat de liquidation": {} + }, + "139-R\u00e9sultat net : perte": {} + }, + "14-Subventions d\u2019investissement": { + "141-Subventions d\u2019\u00e9quipement": { + "1411-\u00c9tat": {}, + "1412-R\u00e9gions": {}, + "1413-D\u00e9partements": {}, + "1414-Communes et collectivit\u00e9s publiques d\u00e9centralis\u00e9es": {}, + "1415-Entit\u00e9s publiques ou mixtes": {}, + "1416-Entit\u00e9s et organismes priv\u00e9s": {}, + "1417-Organismes internationaux": {}, + "1418-Autres": {} + }, + "148-Autres subventions d\u2019investissement": {} + }, + "15-Provisions r\u00e9glement\u00e9es et fonds assimil\u00e9s": { + "151-Amortissements d\u00e9rogatoires": {}, + "152-Plus-values de cession \u00e0 r\u00e9investir": {}, + "153-Fonds r\u00e9glement\u00e9s": { + "1531-Fonds National": {}, + "1532-Pr\u00e9l\u00e8vement pour le Budget": {} + }, + "154-Provisions sp\u00e9ciales de r\u00e9\u00e9valuation": {}, + "155-Provisions r\u00e9glement\u00e9es relatives aux immobilisations": { + "1551-Reconstitution des gisements miniers et p\u00e9troliers": {} + }, + "156-Provisions r\u00e9glement\u00e9es relatives aux stocks": { + "1561-Hausse de prix": {}, + "1562-Fluctuation des cours": {} + }, + "157-Provisions pour investissement": {}, + "158-Autres provisions et fonds r\u00e9glement\u00e9s": {} + }, + "16-Emprunts et dettes assimil\u00e9es": { + "161-Emprunts obligataires": { + "1611-Emprunts obligataires ordinaires": {}, + "1612-Emprunts obligataires convertibles en actions": {}, + "1613-Emprunts obligataires remboursables en actions": {}, + "1618-Autres emprunts obligataires": {} + }, + "162-Emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": {}, + "163-Avances re\u00e7ues de l\u2019\u00c9tat": {}, + "164-Avances re\u00e7ues et comptes courants bloqu\u00e9s": {}, + "165-D\u00e9p\u00f4ts et cautionnements re\u00e7us": { + "1651-D\u00e9p\u00f4ts": {}, + "1652-Cautionnements": {} + }, + "166-Int\u00e9r\u00eats courus": { + "1661-Sur emprunts obligataires": {}, + "1662-Sur emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": {}, + "1663-Sur avances re\u00e7ues de l\u2019\u00c9tat": {}, + "1664-Sur avances re\u00e7ues et comptes courants bloqu\u00e9s": {}, + "1665-Sur d\u00e9p\u00f4ts et cautionnements re\u00e7us": {}, + "1667-Sur avances assorties de conditions particuli\u00e8res": {}, + "1668-Sur autres emprunts et dettes": {} + }, + "167-Avances assorties de conditions particuli\u00e8res": { + "1671-Avances bloqu\u00e9es pour augmentation du capital": {}, + "1672-Avances conditionn\u00e9es par l\u2019\u00c9tat": {}, + "1673-Avances conditionn\u00e9es par les autres organismes africains": {}, + "1674-Avances conditionn\u00e9es par les organismes internationaux": {} + }, + "168-Autres emprunts et dettes": { + "1681-Rentes viag\u00e8res capitalis\u00e9es": {}, + "1682-Billets de fonds": {}, + "1683-Dettes cons\u00e9cutives \u00e0 des titres emprunt\u00e9s": {}, + "1684-Emprunts participatifs": {}, + "1685-Participation des travailleurs aux b\u00e9n\u00e9fices": {}, + "1686-Emprunts et dettes contract\u00e9s aupr\u00e8s des autres tiers": {} + } + }, + "17-Dettes de location acquisition": { + "172-Dettes de location acquisition / cr\u00e9dit bail immobilier": {}, + "173-Dettes de location acquisition / cr\u00e9dit bail mobilier": {}, + "174-Dettes de location acquisition / location de vente": {}, + "176-Int\u00e9r\u00eats courus": { + "1762-Sur dettes de location acquisition / cr\u00e9dit-bail immobilier": {}, + "1763-Sur dettes de location acquisition / cr\u00e9dit-bail mobilier": {}, + "1764-Sur dettes de location acquisition / location-vente": {}, + "1768-Sur autres dettes de location acquisition": {} + }, + "178-Autres dettes de location acquisition": {} + }, + "18-Dettes li\u00e9es \u00e0 des participations et comptes de liaison des \u00e9tablissements et soci\u00e9t\u00e9s en participation": { + "181-Dettes li\u00e9es \u00e0 des participations": { + "1811-Dettes li\u00e9es \u00e0 des participations (groupe)": {}, + "1812-Dettes li\u00e9es \u00e0 des participations (hors groupe)": {} + }, + "182-Dettes li\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": {}, + "183-Int\u00e9r\u00eats courus sur dettes li\u00e9es \u00e0 des participations": {}, + "184-Comptes permanents bloqu\u00e9s des \u00e9tablissements et succursales": {}, + "185-Comptes permanents non bloqu\u00e9s des \u00e9tablissements et succursales": {}, + "186-Comptes de liaison charges": {}, + "187-Comptes de liaison produits": {}, + "188-Comptes de liaison des soci\u00e9t\u00e9s en participation": {} + }, + "19-Provisions pour risques et charges": { + "191-Provisions pour litiges": {}, + "192-Provisions pour garanties donn\u00e9es aux clients": {}, + "193-Provisions pour pertes sur march\u00e9s \u00e0 ach\u00e8vement futur": {}, + "194-Provisions pour pertes de change": {}, + "195-Provisions pour imp\u00f4ts": {}, + "196-Provisions pour pensions et obligations similaires": { + "1961-Provisions pour pensions et obligations similaires engagement de retraite": {}, + "1962-Actif du r\u00e9gime de retraite": {} + }, + "197-Provisions pour restructuration": {}, + "198-Autres provisions pour risques et charges": { + "1981-Provisions pour amendes et p\u00e9nalit\u00e9s": {}, + "1983-Provisions pour propre assureur": {}, + "1984-Provisions pour d\u00e9mant\u00e8lement et remise en \u00e9tat": {}, + "1985-Provisions pour droits \u00e0 r\u00e9duction ou avantage en nature (ch\u00e8ques cadeau, cartes de fid\u00e9lit\u00e9...)": {}, + "1988-Provisions pour divers risques et charges": {} + } + }, + "root_type": "Equity" + }, + "2-Comptes d\u2019actif immobilis\u00e9": { + "21-Immobilisations incorporelles": { + "account_type": "Fixed Asset", + "211-Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset" + }, + "212-Brevets, licences, concessions et droits similaires": { + "account_type": "Fixed Asset", + "2121-Brevets": { + "account_type": "Fixed Asset" + }, + "2122-Licences": { + "account_type": "Fixed Asset" + }, + "2123-Concessions de service public": { + "account_type": "Fixed Asset" + }, + "2128-Autres concessions et droits similaires": { + "account_type": "Fixed Asset" + } + }, + "213-Logiciels et sites internet": { + "account_type": "Fixed Asset", + "2131-Logiciels": { + "account_type": "Fixed Asset" + }, + "2132-Sites internet": { + "account_type": "Fixed Asset" + } + }, + "214-Marques": { + "account_type": "Fixed Asset" + }, + "215-Fonds commercial": { + "account_type": "Fixed Asset" + }, + "216-Droit au bail": { + "account_type": "Fixed Asset" + }, + "217-Investissements de cr\u00e9ation": { + "account_type": "Fixed Asset" + }, + "218-Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset", + "2181-Frais de prospection et d\u2019\u00e9valuation de ressources min\u00e9rales": { + "account_type": "Fixed Asset" + }, + "2182-Co\u00fbts d\u2019obtention du contrat": { + "account_type": "Fixed Asset" + }, + "2183-Fichiers clients, notices, titres de journaux et magazines": { + "account_type": "Fixed Asset" + }, + "2184-Co\u00fbts des franchises": { + "account_type": "Fixed Asset" + }, + "2188-Divers droits et valeurs incorporelles": { + "account_type": "Fixed Asset" + } + }, + "219-Immobilisations incorporelles en cours": { + "account_type": "Fixed Asset", + "2191-Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset" + }, + "2193-Logiciels et internet": { + "account_type": "Fixed Asset" + }, + "2198-Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset" + } + } + }, + "22-Terrains": { + "account_type": "Fixed Asset", + "221-Terrains agricoles et forestiers": { + "account_type": "Fixed Asset", + "2211-Terrains d\u2019exploitation agricole": { + "account_type": "Fixed Asset" + }, + "2212-Terrains d\u2019exploitation foresti\u00e8re": { + "account_type": "Fixed Asset" + }, + "2218-Autres terrains": { + "account_type": "Fixed Asset" + } + }, + "222-Terrains nus": { + "account_type": "Fixed Asset", + "2221-Terrains \u00e0 b\u00e2tir": { + "account_type": "Fixed Asset" + }, + "2228-Autres terrains nus": { + "account_type": "Fixed Asset" + } + }, + "223-Terrains b\u00e2tis": { + "account_type": "Fixed Asset", + "2231-Pour b\u00e2timents industriels et agricoles": { + "account_type": "Fixed Asset" + }, + "2232-Pour b\u00e2timents administratifs et commerciaux": { + "account_type": "Fixed Asset" + }, + "2234-Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations professionnelles": { + "account_type": "Fixed Asset" + }, + "2235-Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations non professionnelles": { + "account_type": "Fixed Asset" + }, + "2238-Autres terrains b\u00e2tis": { + "account_type": "Fixed Asset" + } + }, + "224-Travaux de mise en valeur des terrains": { + "account_type": "Fixed Asset", + "2241-Plantation d\u2019arbres et d\u2019arbustes": { + "account_type": "Fixed Asset" + }, + "2245-Am\u00e9liorations du fonds": { + "account_type": "Fixed Asset" + }, + "2248-Autres travaux": { + "account_type": "Fixed Asset" + } + }, + "225-Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset", + "2251-Carri\u00e8res": { + "account_type": "Fixed Asset" + } + }, + "226-Terrains am\u00e9nag\u00e9s": { + "account_type": "Fixed Asset", + "2261-Parkings": { + "account_type": "Fixed Asset" + } + }, + "227-Terrains mis en concession": { + "account_type": "Fixed Asset" + }, + "228-Autres terrains": { + "account_type": "Fixed Asset", + "2281-Terrains immeubles de placement": { + "account_type": "Fixed Asset" + }, + "2285-Terrains des logements affect\u00e9s au personnel": { + "account_type": "Fixed Asset" + }, + "2286-Terrains de location acquisition": { + "account_type": "Fixed Asset" + }, + "2288-Divers terrains": { + "account_type": "Fixed Asset" + } + }, + "229-Am\u00e9nagements de terrains en cours": { + "account_type": "Fixed Asset", + "2291-Terrains agricoles et forestiers": { + "account_type": "Fixed Asset" + }, + "2292-Terrains nus": { + "account_type": "Fixed Asset" + }, + "2295-Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset" + }, + "2298-Autres terrains": { + "account_type": "Fixed Asset" + } + } + }, + "23-B\u00e2timents, installations techniques et agencements": { + "231-B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "2311-B\u00e2timents industriels": {}, + "2312-B\u00e2timents agricoles": {}, + "2313-B\u00e2timents administratifs et commerciaux": {}, + "2314-B\u00e2timents affect\u00e9s au logement du personnel": {}, + "2315-B\u00e2timents immeubles de placement": {}, + "2316-B\u00e2timents de location acquisition": {} + }, + "232-B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "2321-B\u00e2timents industriels": {}, + "2322-B\u00e2timents agricoles": {}, + "2323-B\u00e2timents administratifs et commerciaux": {}, + "2324-B\u00e2timents affect\u00e9s au logement du personnel": {}, + "2325-B\u00e2timents immeubles de placement": {}, + "2326-B\u00e2timents de location acquisition": {} + }, + "233-Ouvrages d\u2019infrastructure": { + "2331-Voies de terre": {}, + "2332-Voies de fer": {}, + "2333-Voies d\u2019eau": {}, + "2334-Barrages, Digues": {}, + "2335-Pistes d\u2019a\u00e9rodrome": {}, + "2338-Autres ouvrages d\u2019infrastructures": {} + }, + "234-Am\u00e9nagements, agencements et installations techniques": { + "2341-Installations complexes sp\u00e9cialis\u00e9es sur sol propre": {}, + "2342-Installations complexes sp\u00e9cialis\u00e9es sur sol d\u2019autrui": {}, + "2343-Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol propre": {}, + "2344-Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol d\u2019autrui": {}, + "2345-Am\u00e9nagements et agencements des b\u00e2timents": {} + }, + "235-Am\u00e9nagements de bureaux": { + "2351-Installations g\u00e9n\u00e9rales": {}, + "2358-Autres am\u00e9nagements de bureaux": {} + }, + "237-B\u00e2timents industriels, agricoles et commerciaux mis en concession": {}, + "238-Autres installations et agencements": {}, + "239-B\u00e2timents am\u00e9nagements, agencements et installations en cours": { + "2391-B\u00e2timents en cours": {}, + "2392-Installations en cours": {}, + "2393-Ouvrages d\u2019infrastructure en cours": {}, + "2394-Am\u00e9nagements et agencements et installations techniques en cours": {}, + "2395-Am\u00e9nagements de bureaux en cours": {}, + "2398-Autres installations et agencements en cours": {} + } + }, + "24-Mat\u00e9riel, mobilier et actifs biologiques": { + "241-Mat\u00e9riel et outillage industriel et commercial": { + "2411-Mat\u00e9riel industriel": {}, + "2412-Outillage industriel": {}, + "2413-Mat\u00e9riel commercial": {}, + "2414-Outillage commercial": {}, + "2416-Mat\u00e9riel & outillage industriel et commercial de location-acquisition": {} + }, + "242-Mat\u00e9riel et outillage agricole": { + "2421-Mat\u00e9riel agricole": {}, + "2422-Outillage agricole": {}, + "2426-Mat\u00e9riel & outillage agricole de location-acquisition": {} + }, + "243-Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "244-Mat\u00e9riel et mobilier": { + "2441-Mat\u00e9riel de bureau": {}, + "2442-Mat\u00e9riel informatique": {}, + "2443-Mat\u00e9riel bureautique": {}, + "2444-Mobilier de bureau": {}, + "2445-Mat\u00e9riel et mobilier immeubles de placement": {}, + "2446-Mat\u00e9riel et mobilier de location acquisition": {}, + "2447-Mat\u00e9riel et mobilier des logements du personnel": {} + }, + "245-Mat\u00e9riel de transport": { + "2451-Mat\u00e9riel automobile": {}, + "2452-Mat\u00e9riel ferroviaire": {}, + "2453-Mat\u00e9riel fluvial, lagunaire": {}, + "2454-Mat\u00e9riel naval": {}, + "2455-Mat\u00e9riel a\u00e9rien": {}, + "2456-Mat\u00e9riel de transport de location-acquisition": {}, + "2457-Mat\u00e9riel hippomobile": {}, + "2458-Autres mat\u00e9riels de transport": {} + }, + "246-Actifs biologiques": { + "2461-Cheptel, animaux de trait": {}, + "2462-Cheptel, animaux reproducteurs": {}, + "2463-Animaux de garde": {}, + "2465-Plantations agricoles": {}, + "2468-Autres actifs biologiques": {} + }, + "247-Agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "2471-Agencements et am\u00e9nagements du mat\u00e9riel": {}, + "2472-Agencements et am\u00e9nagements des actifs biologiques": {}, + "2478-Autres agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": {} + }, + "248-Autres mat\u00e9riels et mobiliers": { + "2481-Collections et \u0153uvres d\u2019art": {}, + "2488-Divers mat\u00e9riels mobiliers": {} + }, + "249-Mat\u00e9riels et actifs biologiques en cours": { + "2491-Mat\u00e9riel et outillage industriel et commercial": {}, + "2492-Mat\u00e9riel et outillage agricole": {}, + "2493-Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "2494-Mat\u00e9riel et mobilier de bureau": {}, + "2495-Mat\u00e9riel de transport": {}, + "2496-Actifs biologiques": {}, + "2497-Agencements am\u00e9nagements du mat\u00e9riel et actifs biologiques": {}, + "2498-Autres mat\u00e9riels et actifs biologiques en cours": {} + } + }, + "25-Avances et acomptes vers\u00e9s sur immobilisations": { + "251-Avances et acomptes vers\u00e9s sur immobilisations incorporelles": {}, + "252-Avances et acomptes vers\u00e9s sur immobilisations corporelles": {} + }, + "26-Titres de participation": { + "261-Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": {}, + "262-Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le conjoint": {}, + "263-Titres de participation dans des soci\u00e9t\u00e9s conf\u00e9rant une influence notable": {}, + "265-Participations dans des organismes professionnels": {}, + "266-Parts dans des groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": {}, + "268-Autres titres de participation": {} + }, + "27-Autres immobilisations financi\u00e8res": { + "271-Pr\u00eats et cr\u00e9ances": { + "2711-Pr\u00eats participatifs": {}, + "2712-Pr\u00eats aux associ\u00e9s": {}, + "2713-Billets de fonds": {}, + "2714-Titres pr\u00eat\u00e9s": {}, + "2718-Autres pr\u00eats et cr\u00e9ances": {} + }, + "272-Pr\u00eats au personnel": { + "2721-Pr\u00eats immobiliers": {}, + "2722-Pr\u00eats mobiliers et d\u2019installation": {}, + "2728-Autres pr\u00eats au personnel": {} + }, + "273-Cr\u00e9ances sur l\u2019\u00c9tat": { + "2731-Retenues de garantie": {}, + "2733-Fonds r\u00e9glement\u00e9": {}, + "2734-Cr\u00e9ances sur le conc\u00e9dant": {}, + "2738-Autres cr\u00e9ances sur l\u2019\u00c9tat": {} + }, + "274-Titres immobilis\u00e9s": { + "2741-Titres immobilis\u00e9s de l\u2019activit\u00e9 de portefeuille (TIAP)": {}, + "2742-Titres participatifs": {}, + "2743-Certificats d\u2019investissement": {}, + "2744-Parts de fonds commun de placement (FCP)": {}, + "2745-Obligations": {}, + "2746-Actions ou parts propres": {}, + "2748-Autres titres immobilis\u00e9s": {} + }, + "275-D\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "2751-D\u00e9p\u00f4ts pour loyers d\u2019avance": {}, + "2752-D\u00e9p\u00f4ts pour l\u2019\u00e9lectricit\u00e9": {}, + "2753-D\u00e9p\u00f4ts pour l\u2019eau": {}, + "2754-D\u00e9p\u00f4ts pour le gaz": {}, + "2755-D\u00e9p\u00f4ts pour le t\u00e9l\u00e9phone, le t\u00e9lex, la t\u00e9l\u00e9copie": {}, + "2756-Cautionnements sur march\u00e9s publics": {}, + "2757-Cautionnements sur autres op\u00e9rations": {}, + "2758-Autres d\u00e9p\u00f4ts et cautionnements": {} + }, + "276-Int\u00e9r\u00eats courus": { + "2761-Pr\u00eats et cr\u00e9ances non commerciales": {}, + "2762-Pr\u00eats au personnel": {}, + "2763-Cr\u00e9ances sur l\u2019\u00c9tat": {}, + "2764-Titres immobilis\u00e9s": {}, + "2765-D\u00e9p\u00f4ts et cautionnements vers\u00e9s": {}, + "2767-Cr\u00e9ances rattach\u00e9es \u00e0 des participations": {}, + "2768-Immobilisations financi\u00e8res diverses": {} + }, + "277-Cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": { + "2771-Cr\u00e9ances rattach\u00e9es \u00e0 des participations (groupe)": {}, + "2772-Cr\u00e9ances rattach\u00e9es \u00e0 des participations (hors groupe)": {}, + "2773-Cr\u00e9ances rattach\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": {}, + "2774-Avances \u00e0 des Groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": {} + }, + "278-Immobilisations financi\u00e8res diverses": { + "2781-Cr\u00e9ances diverses groupe": {}, + "2782-Cr\u00e9ances diverses hors groupe": {}, + "2784-Banques d\u00e9p\u00f4ts \u00e0 terme": {}, + "2785-Or et m\u00e9taux pr\u00e9cieux": {}, + "2788-Autres immobilisations financi\u00e8res": {} + } + }, + "28-Amortissements": { + "account_type": "Accumulated Depreciation", + "281-Amortissements des immobilisations corporelles": { + "account_type": "Accumulated Depreciation", + "2811-Amortissements des frais de d\u00e9veloppement": { + "account_type": "Accumulated Depreciation" + }, + "2812-Amortissements des brevets, licences, concessions et droits similaires": { + "account_type": "Accumulated Depreciation" + }, + "2813-Amortissements des logiciels et sites internet": { + "account_type": "Accumulated Depreciation" + }, + "2814-Amortissements des marques": { + "account_type": "Accumulated Depreciation" + }, + "2815-Amortissements du fonds commercial": { + "account_type": "Accumulated Depreciation" + }, + "2816-Amortissements du droit au bail": { + "account_type": "Accumulated Depreciation" + }, + "2817-Amortissements des investissements de cr\u00e9ation": { + "account_type": "Accumulated Depreciation" + }, + "2818-Amortissements des autres droits et valeurs incorporels": { + "account_type": "Accumulated Depreciation" + } + }, + "282-Amortissements des terrains": { + "2824-Amortissements des travaux de mise en valeur des terrains": {} + }, + "283-Amortissements des b\u00e2timents, installations techniques et agencements": { + "2831-Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": {}, + "2832-Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": {}, + "2833-Amortissements des ouvrages d\u2019infrastructure": {}, + "2834-Amortissements des am\u00e9nagements, agencements et installations techniques": {}, + "2835-Amortissements des am\u00e9nagements de bureaux": {}, + "2837-Amortissements des b\u00e2timents industriels, agricoles et commerciaux mis en concession": {}, + "2838-Amortissements des autres installations et agencements": {} + }, + "284-Amortissements du mat\u00e9riel": { + "2841-Amortissements du mat\u00e9riel et outillage industriel et commercial": {}, + "2842-Amortissements du mat\u00e9riel et outillage agricole": {}, + "2843-Amortissements du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "2844-Amortissements du mat\u00e9riel et mobilier": {}, + "2845-Amortissements du mat\u00e9riel de transport": {}, + "2846-Amortissements des actifs biologiques": {}, + "2847-Amortissements des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": {}, + "2848-Amortissements des autres mat\u00e9riels": {} + } + }, + "29-D\u00e9pr\u00e9ciations des immobilisations": { + "291-D\u00e9pr\u00e9ciations des immobilisations incorporelles": { + "2911-D\u00e9pr\u00e9ciations des frais de d\u00e9veloppement": {}, + "2912-D\u00e9pr\u00e9ciations des brevets, licences, concessions et droits similaires": {}, + "2913-D\u00e9pr\u00e9ciations des logiciels et sites internet": {}, + "2914-D\u00e9pr\u00e9ciations des marques": {}, + "2915-D\u00e9pr\u00e9ciations du fonds commercial": {}, + "2916-D\u00e9pr\u00e9ciations du droit au bail": {}, + "2917-D\u00e9pr\u00e9ciations des investissements de cr\u00e9ation": {}, + "2918-D\u00e9pr\u00e9ciations des autres droits et valeurs incorporels": {}, + "2919-D\u00e9pr\u00e9ciations des immobilisations incorporelles en cours": {} + }, + "292-D\u00e9pr\u00e9ciations des terrains": { + "2921-D\u00e9pr\u00e9ciations des terrains agricoles et forestiers": {}, + "2922-D\u00e9pr\u00e9ciations des terrains nus": {}, + "2923-D\u00e9pr\u00e9ciations des terrains b\u00e2tis": {}, + "2924-D\u00e9pr\u00e9ciations des travaux de mise en valeur des terrains": {}, + "2925-D\u00e9pr\u00e9ciations des terrains de gisement": {}, + "2926-D\u00e9pr\u00e9ciations des terrains am\u00e9nag\u00e9s": {}, + "2927-D\u00e9pr\u00e9ciations des terrains mis en concession": {}, + "2928-D\u00e9pr\u00e9ciations des autres terrains": {}, + "2929-D\u00e9pr\u00e9ciations des am\u00e9nagements de terrains en cours": {} + }, + "293-D\u00e9pr\u00e9ciations des b\u00e2timents, installations techniques et agencements": { + "2931-D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": {}, + "2932-D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": {}, + "2933-D\u00e9pr\u00e9ciations des ouvrages d\u2019infrastructures": {}, + "2934-D\u00e9pr\u00e9ciations des am\u00e9nagements, agencements et installations techniques": {}, + "2935-D\u00e9pr\u00e9ciations des am\u00e9nagements de bureaux": {}, + "2937-D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles et commerciaux mis en concession": {}, + "2938-D\u00e9pr\u00e9ciations des autres installations et agencements": {}, + "2939-D\u00e9pr\u00e9ciations des b\u00e2timents et installations en cours": {} + }, + "294-D\u00e9pr\u00e9ciations de mat\u00e9riel, du mobilier et de l\u2019actif biologique": { + "2941-D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage industriel et commercial": {}, + "2942-D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage agricole": {}, + "2943-D\u00e9pr\u00e9ciations du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "2944-D\u00e9pr\u00e9ciations du mat\u00e9riel et mobilier": {}, + "2945-D\u00e9pr\u00e9ciations du mat\u00e9riel de transport": {}, + "2946-D\u00e9pr\u00e9ciations des actifs biologiques": {}, + "2947-D\u00e9pr\u00e9ciations des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": {}, + "2948-D\u00e9pr\u00e9ciations des autres mat\u00e9riels": {}, + "2949-D\u00e9pr\u00e9ciations de mat\u00e9riel en cours": {} + }, + "295-D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations": { + "2951-D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations incorporelles": {}, + "2952-D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations corporelles": {} + }, + "296-D\u00e9pr\u00e9ciations des titres de participation": { + "2961-D\u00e9pr\u00e9ciations des titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": {}, + "2962-D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s sous contr\u00f4le conjoint": {}, + "2963-D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s conf\u00e9rant une influence notable": {}, + "2965-D\u00e9pr\u00e9ciations des participations dans des organismes professionnels": {}, + "2966-D\u00e9pr\u00e9ciations des parts dans des GIE": {}, + "2968-D\u00e9pr\u00e9ciations des autres titres de participation": {} + }, + "297-D\u00e9pr\u00e9ciations des autres immobilisations financi\u00e8res": { + "2971-D\u00e9pr\u00e9ciations des pr\u00eats et cr\u00e9ances": {}, + "2972-D\u00e9pr\u00e9ciations des pr\u00eats au personnel": {}, + "2973-D\u00e9pr\u00e9ciations des cr\u00e9ances sur l\u2019\u00c9tat": {}, + "2974-D\u00e9pr\u00e9ciations des titres immobilis\u00e9s": {}, + "2975-D\u00e9pr\u00e9ciations des d\u00e9p\u00f4ts et cautionnements vers\u00e9s": {}, + "2977-D\u00e9pr\u00e9ciations des cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": {}, + "2978-D\u00e9pr\u00e9ciations des cr\u00e9ances financi\u00e8res diverses": {} + } + }, + "root_type": "Asset" + }, + "3-Comptes de Stocks": { + "31-Marchandises": { + "311-Marchandises A": { + "3111-Marchandises A1": {}, + "3112-Marchandises A2": {} + }, + "312-Marchandises B": { + "3121-Marchandises B1": {}, + "3122-Marchandises B2": {} + }, + "313-Actifs biologiques": { + "3131-Animaux": {}, + "3132-V\u00e9g\u00e9taux": {} + }, + "318-Marchandises hors activit\u00e9s ordinaires (HAO)": {} + }, + "32-Mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "321-Mati\u00e8res A": {}, + "322-Mati\u00e8res B": {}, + "323-Fournitures (A, B)": {} + }, + "33-Autres approvisionnements": { + "331-Mati\u00e8res consommables": {}, + "332-Fournitures d\u2019atelier et d\u2019usine": {}, + "333-Fournitures de magasin": {}, + "334-Fournitures de bureau": {}, + "335-Emballages": { + "3351-Emballages perdus": {}, + "3352-Emballages r\u00e9cup\u00e9rables non identifiables": {}, + "3353-Emballages \u00e0 usage mixte": {}, + "3358-Autres emballages": {} + }, + "338-Autres mati\u00e8res": {} + }, + "34-Produits en cours": { + "341-Produits en cours": { + "3411-Produits en cours P1": {}, + "3412-Produits en cours P2": {} + }, + "342-Travaux en cours": { + "3421-Travaux en cours T1": {}, + "3422-Travaux en cours T2": {} + }, + "343-Produits interm\u00e9diaires en cours": { + "3431-Produits interm\u00e9diaires A": {}, + "3432-Produits interm\u00e9diaires B": {} + }, + "344-Produits r\u00e9siduels en cours": { + "3441-Produits r\u00e9siduels A": {}, + "3442-Produits r\u00e9siduels B": {} + }, + "345-Actifs biologiques en cours": { + "3451-Animaux": {}, + "3452-V\u00e9g\u00e9taux": {} + } + }, + "35-Services en cours": { + "351-\u00c9tudes en cours": { + "3511-\u00c9tudes en cours E1": {}, + "3512-\u00c9tudes en cours E2": {} + }, + "352-Prestations de services en cours": { + "3521-Prestations de services S1": {}, + "3522-Prestations de services S2": {} + } + }, + "36-Produits finis": { + "361-Produits finis A": {}, + "362-Produits finis B": {}, + "363-Actifs biologiques": { + "3631-Animaux": {}, + "3632-V\u00e9g\u00e9taux": {}, + "3638-Autres stocks (activit\u00e9s annexes)": {} + } + }, + "37-Produits interm\u00e9diaires et r\u00e9siduels": { + "371-Produits interm\u00e9diaires": { + "3711-Produits interm\u00e9diaires A": {}, + "3712-Produits interm\u00e9diaires B": {} + }, + "372-Produits r\u00e9siduels": { + "3721-D\u00e9chets": {}, + "3722-Rebuts": {}, + "3723-Mati\u00e8res de R\u00e9cup\u00e9ration": {} + }, + "373-Actifs biologiques": { + "3731-Animaux": {}, + "3732-V\u00e9g\u00e9taux": {}, + "3738-Autres stocks (activit\u00e9s annexes)": {} + } + }, + "38-Stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": { + "account_type": "Stock", + "381-Marchandises en cours de route": {}, + "382-Mati\u00e8res premi\u00e8res et fournitures li\u00e9es en cours de route": {}, + "383-Autres approvisionnements en cours de route": {}, + "386-Produits finis en cours de route": {}, + "387-Stock en consignation ou en d\u00e9p\u00f4t": { + "3871-Stock en consignation": {}, + "3872-Stock en d\u00e9p\u00f4t": {} + }, + "388-Stock provenant d\u2019immobilisations mises hors service ou au rebut": {} + }, + "39-D\u00e9pr\u00e9ciations des stocks et encours de production": { + "391-D\u00e9pr\u00e9ciations des stocks de marchandises": {}, + "392-D\u00e9pr\u00e9ciations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": {}, + "393-D\u00e9pr\u00e9ciations des stocks d\u2019autres approvisionnements": {}, + "394-D\u00e9pr\u00e9ciations des productions en cours": {}, + "395-D\u00e9pr\u00e9ciations des services en cours": {}, + "396-D\u00e9pr\u00e9ciations des stocks de produits finis": {}, + "397-D\u00e9pr\u00e9ciations des stocks de produits interm\u00e9diaires et r\u00e9siduels": {}, + "398-D\u00e9pr\u00e9ciations des stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": {} + }, + "root_type": "Asset" + }, + "4-Comptes de Tiers (ACTIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (ACTIF)": { + "409-Fournisseurs d\u00e9biteurs": { + "4091-Fournisseurs Avances et acomptes vers\u00e9s": {}, + "4092-Fournisseurs Groupe avances et acomptes vers\u00e9s": {}, + "4093-Fournisseurs Sous-traitants avances et acomptes vers\u00e9s": {}, + "4094-Fournisseurs Cr\u00e9ances pour emballages et mat\u00e9riels \u00e0 rendre": {}, + "4098-Fournisseurs Rabais, remises, ristournes et autres avoirs \u00e0 obtenir": {} + } + }, + "41-Clients et comptes rattach\u00e9s (ACTIF)": { + "411-Clients": { + "4111-Clients": { + "account_type": "Receivable" + }, + "4112-Clients groupe": { + "account_type": "Receivable" + }, + "4114-Clients, \u00c9tat et Collectivit\u00e9s publiques": { + "account_type": "Receivable" + }, + "4115-Clients, organismes internationaux": { + "account_type": "Receivable" + }, + "4116-Clients, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Receivable" + }, + "4117-Client, retenues de garantie": { + "account_type": "Receivable" + }, + "4118-Clients, d\u00e9gr\u00e8vement de taxes sur la valeur ajout\u00e9e (TVA)": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "412-Clients, effets \u00e0 recevoir en portefeuille": { + "4121-Clients, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "4122-Clients Groupe, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "4124-\u00c9tat et Collectivit\u00e9s publiques, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "4125-Organismes Internationaux, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "413-Clients, ch\u00e8ques, effets et autres valeurs impay\u00e9es": { + "4131-Clients, ch\u00e8ques impay\u00e9s": { + "account_type": "Receivable" + }, + "4132-Clients, effets impay\u00e9s": { + "account_type": "Receivable" + }, + "4133-Clients, cartes de cr\u00e9dit impay\u00e9es": { + "account_type": "Receivable" + }, + "4138-Clients, autres valeurs impay\u00e9es": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "414-Cr\u00e9ances sur cessions courantes d\u2019immobilisations": { + "4141-Cr\u00e9ances en compte, immobilisations incorporelles": { + "account_type": "Receivable" + }, + "4142-Cr\u00e9ances en compte, immobilisations corporelles": { + "account_type": "Receivable" + }, + "4146-Effets \u00e0 recevoir, immobilisations incorporelles": { + "account_type": "Receivable" + }, + "4147-Effets \u00e0 recevoir, immobilisations corporelles": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "415-Clients, effets escompt\u00e9s non \u00e9chus": { + "account_type": "Receivable" + }, + "416-Cr\u00e9ances clients litigieuses ou douteuses": { + "4161-Cr\u00e9ances litigieuses": { + "account_type": "Receivable" + }, + "4162-Cr\u00e9ances douteuses": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "418-Clients, produits \u00e0 recevoir": { + "4181-Clients, factures \u00e0 \u00e9tablir": { + "account_type": "Receivable" + }, + "4186-Clients, int\u00e9r\u00eats courus": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "42-Personnel (ACTIF)": { + "421-Personnel, avances et acomptes": { + "4211-Personnel, avances": {}, + "4212-Personnel, acomptes": {}, + "4213-Frais avanc\u00e9s et fournitures au personnel": {} + } + }, + "43-Organismes sociaux (ACTIF)": { + "431-S\u00e9curit\u00e9 sociale": { + "4311-Prestations familiales": {}, + "4312-Accidents de travail": {}, + "4313-Caisse de retraite obligatoire": {}, + "4314-Caisse de retraite facultative": {}, + "4318-Autres cotisations sociales": {} + }, + "432-Caisses de retraite compl\u00e9mentaire": {}, + "433-Autres organismes sociaux": { + "4331-Mutuelle": {}, + "4332-Assurances retraite": {}, + "4333-Assurances et organismes de sant\u00e9": {} + }, + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "4387-Produits \u00e0 recevoir": {} + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (ACTIF)": { + "443-\u00c9tat, TVA factur\u00e9e": { + "4431-TVA factur\u00e9e sur ventes": {}, + "4432-TVA factur\u00e9e sur prestations de services": {}, + "4433-TVA factur\u00e9e sur travaux": {}, + "4434-TVA factur\u00e9e sur production livr\u00e9e \u00e0 soi-m\u00eame": {}, + "4435-TVA sur factures \u00e0 \u00e9tablir": {} + }, + "445-\u00c9tat, TVA r\u00e9cup\u00e9rable": { + "4451-TVA r\u00e9cup\u00e9rable sur immobilisations": {}, + "4452-TVA r\u00e9cup\u00e9rable sur achats": {}, + "4453-TVA r\u00e9cup\u00e9rable sur transport": {}, + "4454-TVA r\u00e9cup\u00e9rable sur services ext\u00e9rieurs et autres charges": {}, + "4455-TVA r\u00e9cup\u00e9rable sur factures non parvenues": {}, + "4456-TVA transf\u00e9r\u00e9e par d\u2019autres entit\u00e9s": {} + }, + "448-\u00c9tat, charges \u00e0 payer et produits \u00e0 recevoir": { + "4486-Charges \u00e0 payer": {}, + "4487-Produits \u00e0 recevoir": {} + }, + "449-\u00c9tat, cr\u00e9ances et dettes diverses": { + "4491-\u00c9tat, obligations cautionn\u00e9es": {}, + "4492-\u00c9tat, avances et acomptes vers\u00e9s sur imp\u00f4ts": {}, + "4493-\u00c9tat, fonds de dotation \u00e0 recevoir": {}, + "4494-\u00c9tat, subventions investissement \u00e0 recevoir": {}, + "4495-\u00c9tat, subventions d\u2019exploitation \u00e0 recevoir": {}, + "4496-\u00c9tat, subventions d\u2019\u00e9quilibre \u00e0 recevoir": {}, + "4497-\u00c9tat, avances sur subventions": {}, + "4499-\u00c9tat, fonds r\u00e9glement\u00e9s provisionn\u00e9s": {} + } + }, + "45-Organismes internationaux (ACTIF)": { + "451-Op\u00e9rations avec les organismes africains": {}, + "452-Op\u00e9rations avec les autres organismes internationaux": {}, + "458-Organismes internationaux, fonds de dotation et subventions \u00e0 recevoir": { + "4581-Organismes internationaux, fonds de dotation \u00e0 recevoir": {}, + "4582-Organismes internationaux, subventions \u00e0 recevoir": {} + } + }, + "46-Apporteurs, associ\u00e9s et groupe (ACTIF)": { + "461-Apporteurs, op\u00e9rations sur le capital": { + "4613-Apporteurs, capital appel\u00e9, non vers\u00e9": {}, + "4614-Apporteurs, compte d\u2019apport, op\u00e9rations de restructuration (fusion...)": {}, + "4618-Apporteurs, titres \u00e0 \u00e9changer": {} + }, + "467-Apporteurs, restant d\u00fb sur capital appel\u00e9": {} + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (ACTIF)": { + "472-Cr\u00e9ances et dettes sur titres de placement": { + "4721-Cr\u00e9ances sur cessions de titres de placement": {}, + "4726-Versements restant \u00e0 effectuer sur titres de placement non lib\u00e9r\u00e9s": {} + }, + "473-Interm\u00e9diaires Op\u00e9rations faites pour compte de tiers": { + "4731-Mandants": {}, + "4732-Mandataires": {}, + "4733-Commettants": {}, + "4734-Commissionnaires": {}, + "4739-\u00c9tat, Collectivit\u00e9s publiques, fonds global d\u2019allocation": {} + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits": { + "4747-Compte de r\u00e9partition p\u00e9riodique des produits": {} + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA": { + "4751-Compte actif": { + "account_type": "Temporary" + } + }, + "476-Charges constat\u00e9es d\u2019avance": {}, + "478-\u00c9carts de conversion actif": { + "4781-Diminution des cr\u00e9ances d\u2019exploitation": {}, + "4782-Diminution des cr\u00e9ances financi\u00e8res": {}, + "4783-Augmentation des dettes d\u2019exploitation": {}, + "4784-Augmentation des dettes financi\u00e8res": {}, + "4786-Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": {}, + "4788-Diff\u00e9rences compens\u00e9es par couverture de change": {} + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (ACTIF)": { + "485-Cr\u00e9ances sur cessions d\u2019immobilisations": { + "4851-En compte, immobilisations incorporelles": {}, + "4852-En compte, immobilisations corporelles": {}, + "4853-Effets \u00e0 recevoir, immobilisations incorporelles": {}, + "4854-Effets \u00e0 recevoir, immobilisations corporelles": {}, + "4855-Effets escompt\u00e9s non \u00e9chus": {}, + "4857-Retenues de garantie": {}, + "4858-Factures \u00e0 \u00e9tablir": {} + }, + "488-Autres cr\u00e9ances hors activit\u00e9s ordinaires (HAO)": {} + }, + "49-D\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme (tiers) (ACTIF)": { + "491-D\u00e9pr\u00e9ciations des comptes clients": { + "4911-Cr\u00e9ances litigieuses": {}, + "4912-Cr\u00e9ances douteuses": {} + }, + "495-D\u00e9pr\u00e9ciations des comptes organismes internationaux": {}, + "496-D\u00e9pr\u00e9ciations des comptes apporteurs, associ\u00e9s et groupe": { + "4962-Associ\u00e9s, comptes courants": {}, + "4963-Associ\u00e9s, op\u00e9rations faites en commun": {}, + "4966-Groupe, comptes courants": {} + }, + "497-D\u00e9pr\u00e9ciations des comptes d\u00e9biteurs divers": {}, + "498-D\u00e9pr\u00e9ciations des comptes de cr\u00e9ances HAO": { + "4985-Cr\u00e9ances sur cessions d\u2019immobilisations": {}, + "4986-Cr\u00e9ances sur cessions de titres de placement": {}, + "4988-Autres cr\u00e9ances HAO": {} + }, + "499-Provisions pour risques \u00e0 court terme": { + "4991-Sur op\u00e9rations d\u2019exploitation": {}, + "4997-Sur op\u00e9rations financi\u00e8res": {}, + "4998-Sur op\u00e9rations HAO": {} + } + }, + "root_type": "Asset" + }, + "4-Comptes de Tiers (PASSIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (PASSIF)": { + "401-Fournisseurs, dettes en compte": { + "4011-Fournisseurs": { + "account_type": "Payable" + }, + "4012-Fournisseurs groupe": { + "account_type": "Payable" + }, + "4013-Fournisseurs sous-traitants": { + "account_type": "Payable" + }, + "4016-Fournisseurs, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Payable" + }, + "4017-Fournisseur, retenues de garantie": { + "account_type": "Payable" + }, + "account_type": "Payable" + }, + "402-Fournisseurs, effets \u00e0 payer": { + "4021-Fournisseurs Effets \u00e0 payer": { + "account_type": "Payable" + }, + "4022-Fournisseurs Groupe, effets \u00e0 payer": { + "account_type": "Payable" + }, + "4023-Fournisseurs Sous-traitants, effets \u00e0 payer": { + "account_type": "Payable" + }, + "account_type": "Payable" + }, + "404-Fournisseurs, acquisitions courantes d\u2019immobilisations": { + "4041-Fournisseurs Dettes en comptes, immobilisations incorporelles": { + "account_type": "Payable" + }, + "4042-Fournisseurs Dettes en comptes, immobilisations corporelles": { + "account_type": "Payable" + }, + "4046-Fournisseurs Effets \u00e0 payer, immobilisations incorporelles": { + "account_type": "Payable" + }, + "4047-Fournisseurs Effets \u00e0 payer, immobilisations corporelles": { + "account_type": "Payable" + }, + "account_type": "Payable" + }, + "408-Fournisseurs, factures non parvenues": { + "4081-Fournisseurs": { + "account_type": "Stock Received But Not Billed" + }, + "4082-Fournisseurs groupe": { + "account_type": "Stock Received But Not Billed" + }, + "4083-Fournisseurs sous-traitants": { + "account_type": "Stock Received But Not Billed" + }, + "4086-Fournisseurs, int\u00e9r\u00eats courus": { + "account_type": "Stock Received But Not Billed" + }, + "account_type": "Stock Received But Not Billed" + }, + "account_type": "Payable" + }, + "41-Clients et comptes rattach\u00e9s (PASSIF)": { + "419-Clients cr\u00e9diteurs": { + "4191-Clients, avances et acomptes re\u00e7us": {}, + "4192-Clients groupe, avances et acomptes re\u00e7us": {}, + "4194-Clients, dettes pour emballages et mat\u00e9riels consign\u00e9s": {}, + "4198-Clients, rabais, remises, ristournes et autres avoirs \u00e0 accorder": {} + } + }, + "42-Personnel (PASSIF)": { + "422-Personnel, r\u00e9mun\u00e9rations dues": {}, + "423-Personnel, oppositions, saisies-arr\u00eats": { + "4231-Personnel, oppositions": {}, + "4232-Personnel, saisies-arr\u00eats": {}, + "4233-Personnel, avis \u00e0 tiers d\u00e9tenteur": {} + }, + "424-Personnel, \u0153uvres sociales internes": { + "4241-Assistance m\u00e9dicale": {}, + "4242-Allocations familiales": {}, + "4245-Organismes sociaux rattach\u00e9s \u00e0 l\u2019entit\u00e9": {}, + "4248-Autres \u0153uvres sociales internes": {} + }, + "425-Repr\u00e9sentants du personnel": { + "4251-D\u00e9l\u00e9gu\u00e9s du personnel": {}, + "4252-Syndicats et Comit\u00e9s d\u2019entreprises, d\u2019\u00c9tablissement": {}, + "4258-Autres repr\u00e9sentants du personnel": {} + }, + "426-Personnel, participation aux b\u00e9n\u00e9fices et au capital": { + "4261-Participation aux b\u00e9n\u00e9fices": {}, + "4264-Participation au capital": {} + }, + "427-Personnel d\u00e9p\u00f4ts": {}, + "428-Personnel, charges \u00e0 payer et produits \u00e0 recevoir": { + "4281-Dettes provisionn\u00e9es pour cong\u00e9s \u00e0 payer": {}, + "4286-Autres charges \u00e0 payer": {}, + "4287-Produits \u00e0 recevoir": {} + } + }, + "43-Organismes sociaux (PASSIF)": { + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "4381-Charges sociales sur gratifications \u00e0 payer": {}, + "4382-Charges sociales sur cong\u00e9s \u00e0 payer": {}, + "4386-Autres charges \u00e0 payer": {} + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (PASSIF)": { + "441-\u00c9tat, imp\u00f4t sur les b\u00e9n\u00e9fices": {}, + "442-\u00c9tat, autres imp\u00f4ts et taxes": { + "4421-Imp\u00f4ts et taxes d\u2019\u00c9tat": {}, + "4422-Imp\u00f4ts et taxes pour les collectivit\u00e9s publiques": {}, + "4423-Imp\u00f4ts et taxes recouvrables sur des obligataires": {}, + "4424-Imp\u00f4ts et taxes recouvrables sur des associ\u00e9s": {}, + "4426-Droits de douane": {}, + "4428-Autres imp\u00f4ts et taxes": {} + }, + "444-\u00c9tat, TVA due ou cr\u00e9dit de TVA": { + "4441-\u00c9tat, TVA due": {}, + "4449-\u00c9tat, cr\u00e9dit de TVA \u00e0 reporter": {} + }, + "446-\u00c9tat, autres taxes sur le chiffre d\u2019affaires": {}, + "447-\u00c9tat, imp\u00f4ts retenus \u00e0 la source": { + "4471-Imp\u00f4t G\u00e9n\u00e9ral sur le revenu": {}, + "4472-Imp\u00f4ts sur salaires": {}, + "4473-Contribution nationale": {}, + "4474-Contribution nationale de solidarit\u00e9": {}, + "4478-Autres imp\u00f4ts et contributions": {} + } + }, + "46-Apporteurs, associ\u00e9s et groupe (PASSIF)": { + "461-Apporteurs, op\u00e9rations sur le capital (PASSIF)": { + "4611-Apporteurs, apports en nature": {}, + "4612-Apporteurs, apports en num\u00e9raire": {}, + "4615-Apporteurs, versements re\u00e7us sur augmentation de capital": {}, + "4616-Apporteurs, versements anticip\u00e9s": {}, + "4617-Apporteurs d\u00e9faillants": {}, + "4619-Apporteurs, capital \u00e0 rembourser": {} + }, + "462-Associ\u00e9s, comptes courants": { + "4621-Principal": {}, + "4626-Int\u00e9r\u00eats courus": {} + }, + "463-Associ\u00e9s, op\u00e9rations faites en commun et GIE": { + "4631-Op\u00e9rations courantes": {}, + "4636-Int\u00e9r\u00eats courus": {} + }, + "465-Associ\u00e9s, dividendes \u00e0 payer": {}, + "466-Groupe, comptes courants": {} + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (PASSIF)": { + "471-D\u00e9biteurs et cr\u00e9diteurs divers": { + "4711-D\u00e9biteurs divers": {}, + "4712-Cr\u00e9diteurs divers": {}, + "4713-Obligataires": {}, + "4715-R\u00e9mun\u00e9rations d\u2019administrateurs": {}, + "4716-Compte d\u2019affacturage": {}, + "4717-D\u00e9biteurs divers retenues de garantie": {}, + "4718-Apport, compte de fusion et op\u00e9rations assimil\u00e9es": {}, + "4719-Bons de souscription d\u2019actions et d\u2019obligations": {} + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits (PASSIF)": { + "4746-Compte de r\u00e9partition p\u00e9riodique des charges": {} + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA (PASSIF)": { + "4752-Compte passif": {} + }, + "477-Produits constat\u00e9s d\u2019avance": {}, + "479-\u00c9carts de conversion passif": { + "4791-Augmentation des cr\u00e9ances d\u2019exploitation": {}, + "4792-Augmentation des cr\u00e9ances financi\u00e8res": {}, + "4793-Diminution des dettes d\u2019exploitation": {}, + "4794-Diminution des dettes financi\u00e8res": {}, + "4797-Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": {}, + "4798-Diff\u00e9rences compens\u00e9es par couverture de change": {} + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (HAO) (PASSIF)": { + "481-Fournisseurs d\u2019investissements": { + "4811-Immobilisations incorporelles": {}, + "4812-Immobilisations corporelles": {}, + "4813-Versements restant \u00e0 effectuer sur titres de participation et titres immobilis\u00e9s non lib\u00e9r\u00e9s": {}, + "4816-R\u00e9serve de propri\u00e9t\u00e9": {}, + "4817-Retenues de garantie": {}, + "4818-Factures non parvenues": {} + }, + "482-Fournisseurs d\u2019investissements, effets \u00e0 payer": { + "4821-Immobilisations incorporelles": {}, + "4822-Immobilisations corporelles": {} + }, + "484-Autres dettes hors activit\u00e9s ordinaires (HAO)": { + "4887-Produits": {} + } + }, + "49-D\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme (tiers) (PASSIF)": { + "490-D\u00e9pr\u00e9ciations des comptes fournisseurs": {}, + "492-D\u00e9pr\u00e9ciations des comptes personnel": {}, + "493-D\u00e9pr\u00e9ciations des comptes organismes sociaux": {}, + "494-D\u00e9pr\u00e9ciations des comptes \u00c9tat et collectivit\u00e9s publiques": {}, + "495-D\u00e9pr\u00e9ciations des comptes organismes internationaux": {} + }, + "root_type": "Liability" + }, + "5-Comptes de tr\u00e9sorerie": { + "50-Titres de placement": { + "501-Titres du tr\u00e9sor et bons de caisse \u00e0 court terme": { + "5011-Titres du Tr\u00e9sor \u00e0 court terme": {}, + "5012-Titres d\u2019organismes financiers": {}, + "5013-Bons de caisse \u00e0 court terme": {}, + "5016-Frais d\u2019acquisition des titres de tr\u00e9sor et bons de caisse": {} + }, + "502-Actions": { + "5021-Actions ou parts propres": {}, + "5022-Actions cot\u00e9es": {}, + "5023-Actions non cot\u00e9es": {}, + "5024-Actions d\u00e9membr\u00e9es (certificats d\u2019investissement, droits de vote)": {}, + "5025-Autres actions": {}, + "5026-Frais d\u2019acquisition des actions": {} + }, + "503-Obligations": { + "5031-Obligations \u00e9mises par la soci\u00e9t\u00e9 et rachet\u00e9es par elle": {}, + "5032-Obligations cot\u00e9es": {}, + "5033-Obligations non cot\u00e9es": {}, + "5035-Autres obligations": {}, + "5036-Frais d\u2019acquisition des obligations": {} + }, + "504-Bons de souscription": { + "5042-Bons de souscription d\u2019actions": {}, + "5043-Bons de souscription d\u2019obligations": {} + }, + "505-Titres n\u00e9gociables hors r\u00e9gion": {}, + "506-Int\u00e9r\u00eats courus": { + "5061-Titres du Tr\u00e9sor et bons de caisse \u00e0 court terme": {}, + "5062-Actions": {}, + "5063-Obligations": {} + }, + "508-Autres titres de placement et cr\u00e9ances assimil\u00e9es": {} + }, + "51-Valeurs \u00e0 encaisser": { + "511-Effets \u00e0 encaisser": {}, + "512-Effets \u00e0 l\u2019encaissement": {}, + "513-Ch\u00e8ques \u00e0 encaisser": {}, + "514-Ch\u00e8ques \u00e0 l\u2019encaissement": {}, + "515-Cartes de cr\u00e9dit \u00e0 encaisser": {}, + "518-Autres valeurs \u00e0 l\u2019encaissement": { + "5181-Warrants": {}, + "5182-Billets de fonds": {}, + "5185-Ch\u00e8ques de voyage": {}, + "5186-Coupons \u00e9chus": {}, + "5187-Int\u00e9r\u00eats \u00e9chus des obligations": {} + } + }, + "52-Banques": { + "521-Banques locales": { + "5211-Banques en monnaie nationale": { + "account_type": "Bank" + }, + "5215-Banques en devises": { + "account_type": "Bank" + }, + "account_type": "Bank" + }, + "522-Banques autres \u00c9tats r\u00e9gion": {}, + "523-Banques autres \u00c9tats zone mon\u00e9taire": {}, + "524-Banques hors zone mon\u00e9taire": {}, + "525-Banques d\u00e9p\u00f4t \u00e0 terme": {}, + "526-Banques, int\u00e9r\u00eats courus": { + "5261-Banque, int\u00e9r\u00eats courus, charges \u00e0 payer": {}, + "5267-Banque, int\u00e9r\u00eats courus, produits \u00e0 recevoir": {} + } + }, + "53-\u00c9tablissements financiers et assimil\u00e9s": { + "531-Ch\u00e8ques postaux": {}, + "532-Tr\u00e9sor": {}, + "533-Soci\u00e9t\u00e9s de gestion et d\u2019interm\u00e9diation (SGI)": {}, + "536-\u00c9tablissements financiers, int\u00e9r\u00eats courus": {}, + "538-Autres organismes financiers": {} + }, + "54-Instruments de tr\u00e9sorerie": { + "541-Options de taux d\u2019int\u00e9r\u00eat": {}, + "542-Options de taux de change": {}, + "543-Options de taux boursiers": {}, + "544-Instruments de march\u00e9s \u00e0 terme": {}, + "545-Avoirs d\u2019or et autres m\u00e9taux pr\u00e9cieux": {} + }, + "55-Instruments de monnaie \u00e9lectronique": { + "551-Monnaie \u00e9lectronique carte carburant": {}, + "552-Monnaie \u00e9lectronique t\u00e9l\u00e9phone portable": {}, + "553-Monnaie \u00e9lectronique carte p\u00e9age": {}, + "554-Porte-monnaie \u00e9lectronique": {}, + "558-Autres instruments de monnaies \u00e9lectroniques": {} + }, + "56-Banques, cr\u00e9dits de tr\u00e9sorerie et d\u2019escompte": { + "561-Cr\u00e9dits de tr\u00e9sorerie": {}, + "564-Escompte de cr\u00e9dits de campagne": {}, + "565-Escompte de cr\u00e9dits ordinaires": {}, + "566-Banques, cr\u00e9dits de tr\u00e9sorerie, int\u00e9r\u00eats courus": {} + }, + "57-Caisse": { + "571-Caisse si\u00e8ge social": { + "5711-Caisse en monnaie nationale": {}, + "5712-Caisse en devises": {} + }, + "572-Caisse succursale A": { + "5721-En monnaie nationale": {}, + "5722-En devises": {} + }, + "573-Caisse succursale B": { + "5731-En monnaie nationale": {}, + "5732-En devises": {} + } + }, + "58-R\u00e9gies d\u2019avances, accr\u00e9ditifs et virements internes": { + "581-R\u00e9gies d\u2019avance": {}, + "582-Accr\u00e9ditifs": {}, + "585-Virements de fonds": {}, + "588-Autres virements internes": {} + }, + "59-D\u00e9pr\u00e9ciations et provisions pour risque \u00e0 court terme": { + "590-D\u00e9pr\u00e9ciations des titres de placement": {}, + "591-D\u00e9pr\u00e9ciations des titres et valeurs \u00e0 encaisser": {}, + "592-D\u00e9pr\u00e9ciations des comptes banques": {}, + "593-D\u00e9pr\u00e9ciations des comptes \u00e9tablissements financiers et assimil\u00e9s": {}, + "594-D\u00e9pr\u00e9ciations des comptes d\u2019instruments de tr\u00e9sorerie": {}, + "599-Provisions pour risque \u00e0 court terme \u00e0 caract\u00e8re financier": {} + }, + "root_type": "Asset" + }, + "6-Comptes de charges des activit\u00e9s ordinaires": { + "60-Achats et variations de stocks": { + "601-Achats de marchandises": { + "6011-Dans la R\u00e9gion": {}, + "6012-Hors R\u00e9gion": {}, + "6013-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "6014-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "6015-Frais sur achats": {}, + "6019-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "602-Achats de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "6021-Dans la R\u00e9gion": {}, + "6022-Hors R\u00e9gion": {}, + "6023-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "6024-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "6025-Frais sur achats": {}, + "6029-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "603-Variations des stocks de biens achet\u00e9s": { + "6031-Variations des stocks de marchandises": {}, + "6032-Variations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": {}, + "6033-Variations des stocks d\u2019autres approvisionnements": {} + }, + "604-Achats stock\u00e9s de mati\u00e8res et fournitures consommables": { + "6041-Mati\u00e8res consommables": {}, + "6042-Mati\u00e8res combustibles": {}, + "6043-Produits d\u2019entretien": {}, + "6044-Fournitures d\u2019atelier et d\u2019usine": {}, + "6045-Frais sur achat": {}, + "6046-Fournitures de magasin": {}, + "6047-Fournitures de bureau": {}, + "6049-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "605-Autres achats": { + "6051-Fournitures non stockables Eau": {}, + "6052-Fournitures non stockables \u00c9lectricit\u00e9": {}, + "6053-Fournitures non stockables Autres \u00e9nergies": {}, + "6054-Fournitures d\u2019entretien non stockables": {}, + "6055-Fournitures de bureau non stockables": {}, + "6056-Achats de petit mat\u00e9riel et outillage": {}, + "6057-Achats d\u2019\u00e9tudes et prestations de services": {}, + "6058-Achats de travaux, mat\u00e9riels et \u00e9quipements": {}, + "6059-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "608-Achats d\u2019emballages": { + "6081-Emballages perdus": {}, + "6082-Emballages r\u00e9cup\u00e9rables non identifiables": {}, + "6083-Emballages \u00e0 usage mixte": {}, + "6085-Frais sur achats": {}, + "6089-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + } + }, + "61-Transports": { + "612-Transports sur ventes": {}, + "613-Transports pour le compte de tiers": {}, + "614-Transports du personnel": {}, + "616-Transports de plis": {}, + "618-Autres frais de transport": { + "6181-Voyages et d\u00e9placements": {}, + "6182-Transports entre \u00e9tablissements ou chantiers": {}, + "6183-Transports administratifs": {} + } + }, + "62-Services ext\u00e9rieurs": { + "621-Sous-traitance g\u00e9n\u00e9rale": {}, + "622-Locations, charges locatives": { + "6221-Locations de terrains": {}, + "6222-Locations de b\u00e2timents": {}, + "6223-Locations de mat\u00e9riels et outillages": {}, + "6224-Malis sur emballages": {}, + "6225-Locations d\u2019emballages": {}, + "6226-Fermages et loyers du foncier": {}, + "6228-Locations et charges locatives diverses": {} + }, + "623-Redevances de location acquisition": { + "6232-Cr\u00e9dit-bail immobilier": {}, + "6233-Cr\u00e9dit-bail mobilier": {}, + "6234-Location-vente": {}, + "6238-Autres contrats de location acquisition": {} + }, + "624-Entretien, r\u00e9parations, remise en \u00e9tat et maintenance": { + "6241-Entretien et r\u00e9parations des biens immobiliers": {}, + "6242-Entretien et r\u00e9parations des biens mobiliers": {}, + "6243-Maintenance": {}, + "6244-Charges de d\u00e9mant\u00e8lement et remise en \u00e9tat": {}, + "6248-Autres entretiens et r\u00e9parations": {} + }, + "625-Primes d\u2019assurance": { + "6251-Assurances multirisques": {}, + "6252-Assurances mat\u00e9riel de transport": {}, + "6253-Assurances risques d\u2019exploitation": {}, + "6254-Assurances responsabilit\u00e9 du producteur": {}, + "6255-Assurances insolvabilit\u00e9 clients": {}, + "6257-Assurances transport sur ventes": {}, + "6258-Autres primes d\u2019assurances": {} + }, + "626-\u00c9tudes, recherches et documentation": { + "6261-\u00c9tudes et recherches": {}, + "6265-Documentation g\u00e9n\u00e9rale": {}, + "6266-Documentation technique": {} + }, + "627-Publicit\u00e9, publications, relations publiques": { + "6271-Annonces, insertions": {}, + "6272-Catalogues, imprim\u00e9s publicitaires": {}, + "6273-\u00c9chantillons": {}, + "6274-Foires et expositions": {}, + "6275-Publications": {}, + "6276-Cadeaux \u00e0 la client\u00e8le": {}, + "6277-Frais de colloques, s\u00e9minaires, conf\u00e9rences": {}, + "6278-Autres charges de publicit\u00e9 et relations publiques": {} + }, + "628-Frais de t\u00e9l\u00e9communications": { + "6281-Frais de t\u00e9l\u00e9phone": {}, + "6282-Frais de t\u00e9lex": {}, + "6283-Frais de t\u00e9l\u00e9copie": {}, + "6288-Autres frais de t\u00e9l\u00e9communications": {} + } + }, + "63-Autres services ext\u00e9rieurs": { + "631-Frais bancaires": { + "6311-Frais sur titres (vente, garde)": {}, + "6312-Frais sur effets": {}, + "6313-Location de coffres": {}, + "6314-Commissions d\u2019affacturage": {}, + "6315-Commissions sur cartes de cr\u00e9dit": {}, + "6316-Frais d\u2019\u00e9mission d\u2019emprunts": {}, + "6317-Frais sur instruments monnaie \u00e9lectronique": {}, + "6318-Autres frais bancaires": {} + }, + "632-R\u00e9mun\u00e9rations d\u2019interm\u00e9diaires et de conseils": { + "6322-Commissions et courtages sur ventes": {}, + "6324-Honoraires des professions r\u00e9glement\u00e9es": {}, + "6325-Frais d\u2019actes et de contentieux": {}, + "6326-R\u00e9mun\u00e9rations d\u2019affacturage": {}, + "6327-R\u00e9mun\u00e9rations des autres prestataires de services": {}, + "6328-Divers frais": {} + }, + "633-Frais de formation du personnel": {}, + "634-Redevances pour brevets, licences, logiciels, concessions et droits et valeurs similaires": { + "6342-Redevances pour brevets, licences": {}, + "6343-Redevances pour logiciels": {}, + "6344-Redevances pour marques": {}, + "6345-Redevances pour sites internet": {}, + "6346-Redevances pour concessions, droits et valeurs similaires": {} + }, + "635-Cotisations": { + "6351-Cotisations": {}, + "6358-Concours divers": {} + }, + "637-R\u00e9mun\u00e9rations de personnel ext\u00e9rieur \u00e0 l\u2019entit\u00e9": { + "6371-Personnel int\u00e9rimaire": {}, + "6372-Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": {} + }, + "638-Autres charges externes": { + "6381-Frais de recrutement du personnel": {}, + "6382-Frais de d\u00e9m\u00e9nagement": {}, + "6383-R\u00e9ceptions": {}, + "6384-Missions": {}, + "6385-Charges de copropri\u00e9t\u00e9": {} + } + }, + "64-Imp\u00f4ts et taxes": { + "641-Imp\u00f4ts et taxes directs": { + "6411-Imp\u00f4ts fonciers et taxes annexes": {}, + "6412-Patentes, licences et taxes annexes": {}, + "6413-Taxes sur appointements et salaires": {}, + "6414-Taxes d\u2019apprentissage": {}, + "6415-Formation professionnelle continue": {}, + "6418-Autres imp\u00f4ts et taxes directs": {} + }, + "645-Imp\u00f4ts et taxes indirects": {}, + "646-Droits d\u2019enregistrement": { + "6461-Droits de mutation": {}, + "6462-Droits de timbre": {}, + "6463-Taxes sur les v\u00e9hicules de soci\u00e9t\u00e9": {}, + "6464-Vignettes": {}, + "6468-Autres droits": {} + }, + "647-P\u00e9nalit\u00e9s, amendes fiscales": { + "6471-P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts directs": {}, + "6472-P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts indirects": {}, + "6473-P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts directs": {}, + "6474-P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts indirects": {}, + "6478-Autres p\u00e9nalit\u00e9s et amendes fiscales": {} + }, + "648-Autres imp\u00f4ts et taxes": {} + }, + "65-Autres charges": { + "651-Pertes sur cr\u00e9ances clients et autres d\u00e9biteurs": { + "6511-Clients": {}, + "6515-Autres d\u00e9biteurs": {} + }, + "652-Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "6521-Quote-part transf\u00e9r\u00e9e de b\u00e9n\u00e9fices (comptabilit\u00e9 du g\u00e9rant)": {}, + "6525-Pertes imput\u00e9es par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": {} + }, + "654-Valeurs comptables des cessions courantes d\u2019immobilisations": { + "6541-Immobilisations incorporelles": {}, + "6542-Immobilisations corporelles": {} + }, + "656-Perte de change sur cr\u00e9ances et dettes commerciale": {}, + "657-P\u00e9nalit\u00e9s et amendes p\u00e9nales": {}, + "658-Charges diverses": { + "6581-Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": {}, + "6582-Dons": {}, + "6583-M\u00e9c\u00e9nat": {}, + "6588-Autres charges diverses": {} + }, + "659-Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "6591-Sur risques \u00e0 court terme": {}, + "6593-Sur stocks": {}, + "6594-Sur cr\u00e9ances": {}, + "6598-Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme": {} + } + }, + "66-Charges de personnel": { + "661-R\u00e9mun\u00e9rations directes vers\u00e9es au personnel national": { + "6611-Appointements salaires et commissions": {}, + "6612-Primes et gratifications": {}, + "6613-Cong\u00e9s pay\u00e9s": {}, + "6614-Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": {}, + "6615-Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": {}, + "6616-Suppl\u00e9ment familial": {}, + "6617-Avantages en nature": {}, + "6618-Autres r\u00e9mun\u00e9rations directes": {} + }, + "662-R\u00e9mun\u00e9rations directes vers\u00e9es au personnel non national": { + "6621-Appointements salaires et commissions": {}, + "6622-Primes et gratifications": {}, + "6623-Cong\u00e9s pay\u00e9s": {}, + "6624-Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": {}, + "6625-Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": {}, + "6626-Suppl\u00e9ment familial": {}, + "6627-Avantages en nature": {}, + "6628-Autres r\u00e9mun\u00e9rations directes": {} + }, + "663-Indemnit\u00e9s forfaitaires vers\u00e9es au personnel": { + "6631-Indemnit\u00e9s de logement": {}, + "6632-Indemnit\u00e9s de repr\u00e9sentation": {}, + "6633-Indemnit\u00e9s d\u2019expatriation": {}, + "6634-Indemnit\u00e9s de transport": {}, + "6638-Autres indemnit\u00e9s et avantages divers": {} + }, + "664-Charges sociales": { + "6641-Charges sociales sur r\u00e9mun\u00e9ration du personnel national": {}, + "6642-Charges sociales sur r\u00e9mun\u00e9ration du personnel non national": {} + }, + "666-R\u00e9mun\u00e9rations et charges sociales de l\u2019exploitant individuel": { + "6661-R\u00e9mun\u00e9ration du travail de l\u2019exploitant": {}, + "6662-Charges sociales": {} + }, + "667-R\u00e9mun\u00e9ration transf\u00e9r\u00e9e de personnel ext\u00e9rieur": { + "6671-Personnel int\u00e9rimaire": {}, + "6672-Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": {} + }, + "668-Autres charges sociales": { + "6681-Versements aux syndicats et comit\u00e9s d\u2019entreprise, d\u2019\u00e9tablissement": {}, + "6682-Versements aux comit\u00e9s d\u2019hygi\u00e8ne et de s\u00e9curit\u00e9": {}, + "6683-Versements et contributions aux autres \u0153uvres sociales": {}, + "6684-M\u00e9decine du travail et pharmacie": {}, + "6685-Assurances et organismes de sant\u00e9": {}, + "6686-Assurances retraite et fonds de pension": {}, + "6687-Majorations et p\u00e9nalit\u00e9s sociales": {}, + "6688-Charges sociales diverses": {} + } + }, + "67-Frais financiers et charges assimil\u00e9es": { + "671-Int\u00e9r\u00eats des emprunts": { + "6711-Emprunts obligataires": {}, + "6712-Emprunts aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": {}, + "6713-Dettes li\u00e9es \u00e0 des participations": {}, + "6714-Primes de remboursement des obligations": {} + }, + "672-Int\u00e9r\u00eats dans loyers de location acquisition": { + "6722-Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail immobilier": {}, + "6723-Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail mobilier": {}, + "6724-Int\u00e9r\u00eats dans loyers de location acquisition / location-vente": {}, + "6728-Int\u00e9r\u00eats dans loyers des autres locations acquisition": {} + }, + "673-Escomptes accord\u00e9s": {}, + "674-Autres int\u00e9r\u00eats": { + "6741-Avances re\u00e7ues et d\u00e9p\u00f4ts cr\u00e9diteurs": {}, + "6742-Comptes courants bloqu\u00e9s": {}, + "6743-Int\u00e9r\u00eats sur obligations cautionn\u00e9es": {}, + "6744-Int\u00e9r\u00eats sur dettes commerciales": {}, + "6745-Int\u00e9r\u00eats bancaires et sur op\u00e9rations de financement (escompte...)": {}, + "6748-Int\u00e9r\u00eats sur dettes diverses": {} + }, + "675-Escomptes des effets de commerce": {}, + "676-Pertes de change financi\u00e8res": {}, + "677-Pertes sur titres de placement": { + "6771-Pertes sur cessions de titres de placement": {}, + "6772-Mali provenant d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": {} + }, + "678-Pertes et charges sur risques financiers": { + "6781-Sur rentes viag\u00e8res": {}, + "6782-Sur op\u00e9rations financi\u00e8res": {}, + "6784-Sur instruments de tr\u00e9sorerie": {} + }, + "679-Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "6791-Sur risques financiers": {}, + "6795-Sur titres de placement": {}, + "6798-Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": {} + } + }, + "68-Dotations aux amortissements": { + "681-Dotations aux amortissements d\u2019exploitation": { + "6812-Dotations aux amortissements des immobilisations incorporelles": {}, + "6813-Dotations aux amortissements des immobilisations corporelles": {} + } + }, + "69-Dotations aux provisions et aux d\u00e9pr\u00e9ciations": { + "691-Dotations aux provisions et aux d\u00e9pr\u00e9ciations d\u2019exploitation": { + "6911-Dotations aux provisions pour risques et charges": {}, + "6913-Dotations aux d\u00e9pr\u00e9ciations des immobilisations incorporelles": {}, + "6914-Dotations aux d\u00e9pr\u00e9ciations des immobilisations corporelles": {} + }, + "697-Dotations aux provisions et aux d\u00e9pr\u00e9ciations financi\u00e8res": { + "6971-Dotations aux provisions pour risques et charges": {}, + "6972-Dotations aux d\u00e9pr\u00e9ciations des immobilisations financi\u00e8res": {} + } + }, + "root_type": "Expense" + }, + "7-Comptes de produits des activit\u00e9s ordinaires": { + "70-Ventes": { + "701-Ventes de marchandises": { + "7011-Dans la R\u00e9gion": {}, + "7012-Hors R\u00e9gion": {}, + "7013-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7014-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7015-Sur internet": {}, + "7019-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "702-Ventes de produits finis": { + "7021-Dans la R\u00e9gion": {}, + "7022-Hors R\u00e9gion": {}, + "7023-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7024-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7025-Sur internet": {}, + "7029-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "703-Ventes de produits interm\u00e9diaires": { + "7031-Dans la R\u00e9gion": {}, + "7032-Hors R\u00e9gion": {}, + "7033-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7034-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7035-Sur internet": {}, + "7039-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "704-Ventes de produits r\u00e9siduels": { + "7041-Dans la R\u00e9gion": {}, + "7042-Hors R\u00e9gion": {}, + "7043-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7044-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7045-Sur internet": {}, + "7049-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "705-Travaux factur\u00e9s": { + "7051-Dans la R\u00e9gion": {}, + "7052-Hors R\u00e9gion": {}, + "7053-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7054-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7055-Sur internet": {}, + "7059-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "706-Services vendus": { + "7061-Dans la R\u00e9gion": {}, + "7062-Hors R\u00e9gion": {}, + "7063-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7064-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7065-Sur internet": {}, + "7069-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "707-Produits accessoires": { + "7071-Ports, emballages perdus et autres frais factur\u00e9s": {}, + "7072-Commissions et courtages": {}, + "7073-Locations": {}, + "7074-Bonis sur reprises et cessions d\u2019emballages": {}, + "7075-Mise \u00e0 disposition de personnel": {}, + "7076-Redevances pour brevets, logiciels, marques et droits similaires": {}, + "7077-Services exploit\u00e9s dans l\u2019int\u00e9r\u00eat du personnel": {}, + "7078-Autres produits accessoires": {} + } + }, + "71-Subventions d\u2019exploitation": { + "711-Sur produits \u00e0 l\u2019exportation": {}, + "712-Sur produits \u00e0 l\u2019importation": {}, + "713-Sur produits de p\u00e9r\u00e9quation": {}, + "714-Indemnit\u00e9s et subventions d\u2019exploitation (entit\u00e9 agricole)": {}, + "718-Autres subventions d\u2019exploitation": { + "7181-Vers\u00e9es par l\u2019\u00c9tat et les collectivit\u00e9s publiques": {}, + "7182-Vers\u00e9es par les organismes internationaux": {}, + "7183-Vers\u00e9es par des tiers": {} + } + }, + "72-Production immobilis\u00e9e": { + "721-Immobilisations incorporelles": {}, + "722-Immobilisations corporelles": { + "7221-Immobilisations corporelles (hors actifs biologiques)": {}, + "7222-Immobilisations corporelles (actifs biologiques)": {} + }, + "724-Production auto-consomm\u00e9e": {}, + "726-Immobilisations financi\u00e8res": {} + }, + "73-Variations des stocks de biens et de services produits": { + "734-Variations des stocks de produits en cours": { + "7341-Produits en cours": {}, + "7342-Travaux en cours": {} + }, + "735-Variations des en-cours de services": { + "7351-\u00c9tudes en cours": {}, + "7352-Prestations de services en cours": {} + }, + "736-Variations des stocks de produits finis": {}, + "737-Variations des stocks de produits interm\u00e9diaires et r\u00e9siduels": { + "7371-Produits interm\u00e9diaires": {}, + "7372-Produits r\u00e9siduels": {} + } + }, + "75-Autres produits": { + "751-Profits sur cr\u00e9ances clients et autres d\u00e9biteurs": {}, + "752-Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "7521-Quote-part transf\u00e9r\u00e9e de pertes (comptabilit\u00e9 du g\u00e9rant)": {}, + "7525-B\u00e9n\u00e9fices attribu\u00e9s par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": {} + }, + "754-Produits des cessions courantes d\u2019immobilisations": { + "7541-Immobilisations incorporelles": {}, + "7542-Immobilisations corporelles": {} + }, + "756-Gains de change sur cr\u00e9ances et dettes commerciales": {}, + "758-Produits divers": { + "7581-Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": {}, + "7582-Indemnit\u00e9s d\u2019assurances re\u00e7ues": {}, + "7588-Autres produits divers": {} + }, + "759-Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "7591-Sur risques \u00e0 court terme": {}, + "7593-Sur stocks": {}, + "7594-Sur cr\u00e9ances": {}, + "7598-Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": {} + } + }, + "77-Revenus financiers et produits assimil\u00e9s": { + "771-Int\u00e9r\u00eats de pr\u00eats et cr\u00e9ances diverses": { + "7712-Int\u00e9r\u00eats de pr\u00eats": {}, + "7713-Int\u00e9r\u00eats sur cr\u00e9ances diverses": {} + }, + "772-Revenus de participations et autres titres immobilis\u00e9s": { + "7721-Revenus des titres de participation": {}, + "7722-Revenus autres titres immobilis\u00e9s": {} + }, + "773-Escomptes obtenus": {}, + "774-Revenus de placement": { + "7745-Revenus des obligations": {}, + "7746-Revenus des titres de placement": {} + }, + "775-Int\u00e9r\u00eats dans loyers de location acquisition": {}, + "776-Gains de change financiers": {}, + "777-Gains sur cessions de titres de placement": {}, + "778-Gains sur risques financiers": { + "7781-Sur rentes viag\u00e8res": {}, + "7782-Sur op\u00e9rations financi\u00e8res": {}, + "7784-Sur instruments de tr\u00e9sorerie": {} + }, + "779-Reprises de charges pour d\u00e9pr\u00e9ciations et provisions \u00e0 court terme financi\u00e8res": { + "7791-Sur risques financiers": {}, + "7795-Sur titres de placement": {}, + "7798-Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": {} + } + }, + "78-Transferts de charges": { + "781-Transferts de charges d\u2019exploitation": {}, + "787-Transferts de charges financi\u00e8res": {} + }, + "79-Reprises de provisions, de d\u00e9pr\u00e9ciations et autres": { + "791-Reprises de provisions et d\u00e9pr\u00e9ciations d\u2019exploitation": { + "7911-Pour risques et charges": {}, + "7913-Des immobilisations incorporelles": {}, + "7914-Des immobilisations corporelles": {} + }, + "797-Reprises de provisions et d\u00e9pr\u00e9ciations financi\u00e8res": { + "7971-Pour risques et charges": {}, + "7972-Des immobilisations financi\u00e8res": {} + }, + "798-Reprises d\u2019amortissements": {}, + "799-Reprises de subventions d\u2019investissement": {} + }, + "root_type": "Income" + }, + "8-Comptes des autres charges et des autres produits (CHARGES)": { + "81-Valeurs comptables des cessions d\u2019immobilisations": { + "811-Immobilisations incorporelles": {}, + "812-Immobilisations corporelles": {}, + "816-Immobilisations financi\u00e8res": {} + }, + "83-Charges hors activit\u00e9s ordinaires": { + "831-Charges HAO constat\u00e9es": {}, + "833-Charges li\u00e9es aux op\u00e9rations de restructuration": {}, + "834-Pertes sur cr\u00e9ances HAO": {}, + "835-Dons et lib\u00e9ralit\u00e9s accord\u00e9s": {}, + "836-Abandons de cr\u00e9ances consentis": {}, + "837-Charges li\u00e9es aux op\u00e9rations de liquidation": {}, + "839-Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": {} + }, + "85-Dotations hors activit\u00e9s ordinaires": { + "851-Dotations aux provisions r\u00e9glement\u00e9es": {}, + "852-Dotations aux amortissements HAO": {}, + "853-Dotations aux d\u00e9pr\u00e9ciations HAO": {}, + "854-Dotations aux provisions pour risques et charges HAO": {}, + "858-Autres dotations HAO": {} + }, + "87-Participation des travailleurs": { + "871-Participation l\u00e9gale aux b\u00e9n\u00e9fices": {}, + "874-Participation contractuelle aux b\u00e9n\u00e9fices": {}, + "878-Autres participations": {} + }, + "89-Imp\u00f4ts sur le r\u00e9sultat": { + "891-Imp\u00f4ts sur les b\u00e9n\u00e9fices de l\u2019exercice": { + "8911-Activit\u00e9s exerc\u00e9es dans l\u2019\u00c9tat": {}, + "8912-Activit\u00e9s exerc\u00e9es dans les autres \u00c9tats de la R\u00e9gion": {}, + "8913-Activit\u00e9s exerc\u00e9es hors R\u00e9gion": {} + }, + "892-Rappel d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": {}, + "895-Imp\u00f4t minimum forfaitaire IMF": {}, + "899-D\u00e9gr\u00e8vements et annulations d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": { + "8991-D\u00e9gr\u00e8vements": {}, + "8994-Annulations pour pertes r\u00e9troactives": {} + } + }, + "root_type": "Expense" + }, + "8-Comptes des autres charges et des autres produits (PRODUITS)": { + "82-Produits des cessions d\u2019immobilisations": { + "821-Immobilisations incorporelles": {}, + "822-Immobilisations corporelles": {}, + "826-Immobilisations financi\u00e8res": {} + }, + "84-Produits hors activit\u00e9s ordinaires": { + "841-Produits HAO constat\u00e9s": {}, + "843-Produits li\u00e9s aux op\u00e9rations de restructuration": {}, + "844-Indemnit\u00e9s et subventions HAO (entit\u00e9 agricole)": {}, + "845-Dons et lib\u00e9ralit\u00e9s obtenus": {}, + "846-Abandons de cr\u00e9ances obtenus": {}, + "847-Produits li\u00e9s aux op\u00e9rations de liquidation": {}, + "848-Transferts de charges HAO": {}, + "849-Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": {} + }, + "86-Reprises de charges, provisions et d\u00e9pr\u00e9ciations HAO": { + "861-Reprises de provisions r\u00e9glement\u00e9es": {}, + "862-Reprises d\u2019amortissements HAO": {}, + "863-Reprises de d\u00e9pr\u00e9ciations HAO": {}, + "864-Reprises de provisions pour risques et charges HAO": {}, + "868-Autres reprises HAO": {} + }, + "88-Subventions d\u2019\u00e9quilibre": { + "881-\u00c9tat": {}, + "884-Collectivit\u00e9s publiques": {}, + "886-Groupe": {}, + "888-Autres": {} + }, + "root_type": "Income" + } + } +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/sn_plan_comptable_avec_code.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/sn_plan_comptable_avec_code.json new file mode 100644 index 00000000000..d75ae5d172b --- /dev/null +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/sn_plan_comptable_avec_code.json @@ -0,0 +1,4208 @@ +{ + "country_code": "sn", + "name": "Syscohada - Plan Comptable avec code", + "tree": { + "Comptes de ressources durables": { + "Capital": { + "Capital social": { + "Capital souscrit, non appel\u00e9": { + "account_number": "1011" + }, + "Capital souscrit, appel\u00e9, non vers\u00e9": { + "account_number": "1012" + }, + "Capital souscrit, appel\u00e9, vers\u00e9, non amorti": { + "account_number": "1013" + }, + "Capital souscrit, appel\u00e9, vers\u00e9, amorti": { + "account_number": "1014" + }, + "Capital souscrit soumis \u00e0 des conditions particuli\u00e8res": { + "account_number": "1018" + }, + "account_number": "101" + }, + "Capital par dotation": { + "Dotation initiale": { + "account_number": "1021" + }, + "Dotations compl\u00e9mentaires": { + "account_number": "1022" + }, + "Autres dotations": { + "account_number": "1028" + }, + "account_number": "102" + }, + "Capital personnel": { + "account_number": "103" + }, + "Compte de l\u2019exploitant": { + "Apports temporaires": { + "account_number": "1041" + }, + "Op\u00e9rations courantes": { + "account_number": "1042" + }, + "R\u00e9mun\u00e9rations, imp\u00f4ts et autres charges personnelles": { + "account_number": "1043" + }, + "Pr\u00e9l\u00e8vements d\u2019autoconsommation": { + "account_number": "1047" + }, + "Autres pr\u00e9l\u00e8vements": { + "account_number": "1048" + }, + "account_number": "104" + }, + "Primes li\u00e9es au capital social": { + "Primes d\u2019\u00e9mission": { + "account_number": "1051" + }, + "Primes d\u2019apport": { + "account_number": "1052" + }, + "Primes de fusion": { + "account_number": "1053" + }, + "Primes de conversion": { + "account_number": "1054" + }, + "Autres primes": { + "account_number": "1058" + }, + "account_number": "105" + }, + "\u00c9carts de r\u00e9\u00e9valuation": { + "\u00c9carts de r\u00e9\u00e9valuation l\u00e9gale": { + "account_number": "1061" + }, + "\u00c9carts de r\u00e9\u00e9valuation libre": { + "account_number": "1062" + }, + "account_number": "106" + }, + "Apporteurs, capital souscrit, non appel\u00e9": { + "account_number": "109" + }, + "account_number": "10" + }, + "R\u00e9serves": { + "R\u00e9serve l\u00e9gale": { + "account_number": "111" + }, + "R\u00e9serves statutaires ou contractuelles": { + "account_number": "112" + }, + "R\u00e9serves r\u00e9glement\u00e9es": { + "R\u00e9serves de plus-values nettes \u00e0 long terme": { + "account_number": "1131" + }, + "R\u00e9serves d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": { + "account_number": "1132" + }, + "R\u00e9serves cons\u00e9cutives \u00e0 l\u2019octroi de subventions d\u2019investissement": { + "account_number": "1133" + }, + "R\u00e9serves des valeurs mobili\u00e8res donnant acc\u00e8s au capital": { + "account_number": "1134" + }, + "Autres r\u00e9serves r\u00e9glement\u00e9es": { + "account_number": "1135" + }, + "account_number": "113" + }, + "Autres r\u00e9serves": { + "R\u00e9serves facultatives": { + "account_number": "1181" + }, + "R\u00e9serves diverses": { + "account_number": "1188" + }, + "account_number": "118" + }, + "account_number": "11" + }, + "Report \u00e0 nouveau": { + "Report \u00e0 nouveau cr\u00e9diteur": { + "account_number": "121" + }, + "Report \u00e0 nouveau d\u00e9biteur": { + "Perte nette \u00e0 reporter": { + "account_number": "1291" + }, + "Perte Amortissements r\u00e9put\u00e9s diff\u00e9r\u00e9s": { + "account_number": "1292" + }, + "account_number": "129" + }, + "account_number": "12" + }, + "R\u00e9sultat net de l\u2019exercice": { + "R\u00e9sultat en instance d\u2019affectation": { + "R\u00e9sultat en instance d\u2019affectation : b\u00e9n\u00e9fice": { + "account_number": "1301" + }, + "R\u00e9sultat en instance d\u2019affectation : perte": { + "account_number": "1309" + }, + "account_number": "130" + }, + "R\u00e9sultat net : b\u00e9n\u00e9fice": { + "account_number": "131" + }, + "Marge commerciale (MC)": { + "account_number": "132" + }, + "Valeur ajout\u00e9e (VA)": { + "account_number": "133" + }, + "Exc\u00e9dent brut d\u2019exploitation (EBE)": { + "account_number": "134" + }, + "R\u00e9sultat d\u2019exploitation (RE)": { + "account_number": "135" + }, + "R\u00e9sultat financier (RF)": { + "account_number": "136" + }, + "R\u00e9sultat des activit\u00e9s ordinaires (RAO)": { + "account_number": "137" + }, + "R\u00e9sultat hors activit\u00e9s ordinaires (RHAO)": { + "R\u00e9sultat de fusion": { + "account_number": "1381" + }, + "R\u00e9sultat d\u2019apport partiel d\u2019actif": { + "account_number": "1382" + }, + "R\u00e9sultat de scission": { + "account_number": "1383" + }, + "R\u00e9sultat de liquidation": { + "account_number": "1384" + }, + "account_number": "138" + }, + "R\u00e9sultat net : perte": { + "account_number": "139" + }, + "account_number": "13" + }, + "Subventions d\u2019investissement": { + "Subventions d\u2019\u00e9quipement": { + "\u00c9tat": { + "account_number": "1411" + }, + "R\u00e9gions": { + "account_number": "1412" + }, + "D\u00e9partements": { + "account_number": "1413" + }, + "Communes et collectivit\u00e9s publiques d\u00e9centralis\u00e9es": { + "account_number": "1414" + }, + "Entit\u00e9s publiques ou mixtes": { + "account_number": "1415" + }, + "Entit\u00e9s et organismes priv\u00e9s": { + "account_number": "1416" + }, + "Organismes internationaux": { + "account_number": "1417" + }, + "Autres": { + "account_number": "1418" + }, + "account_number": "141" + }, + "Autres subventions d\u2019investissement": { + "account_number": "148" + }, + "account_number": "14" + }, + "Provisions r\u00e9glement\u00e9es et fonds assimil\u00e9s": { + "Amortissements d\u00e9rogatoires": { + "account_number": "151" + }, + "Plus-values de cession \u00e0 r\u00e9investir": { + "account_number": "152" + }, + "Fonds r\u00e9glement\u00e9s": { + "Fonds National": { + "account_number": "1531" + }, + "Pr\u00e9l\u00e8vement pour le Budget": { + "account_number": "1532" + }, + "account_number": "153" + }, + "Provisions sp\u00e9ciales de r\u00e9\u00e9valuation": { + "account_number": "154" + }, + "Provisions r\u00e9glement\u00e9es relatives aux immobilisations": { + "Reconstitution des gisements miniers et p\u00e9troliers": { + "account_number": "1551" + }, + "account_number": "155" + }, + "Provisions r\u00e9glement\u00e9es relatives aux stocks": { + "Hausse de prix": { + "account_number": "1561" + }, + "Fluctuation des cours": { + "account_number": "1562" + }, + "account_number": "156" + }, + "Provisions pour investissement": { + "account_number": "157" + }, + "Autres provisions et fonds r\u00e9glement\u00e9s": { + "account_number": "158" + }, + "account_number": "15" + }, + "Emprunts et dettes assimil\u00e9es": { + "Emprunts obligataires": { + "Emprunts obligataires ordinaires": { + "account_number": "1611" + }, + "Emprunts obligataires convertibles en actions": { + "account_number": "1612" + }, + "Emprunts obligataires remboursables en actions": { + "account_number": "1613" + }, + "Autres emprunts obligataires": { + "account_number": "1618" + }, + "account_number": "161" + }, + "Emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": { + "account_number": "162" + }, + "Avances re\u00e7ues de l\u2019\u00c9tat": { + "account_number": "163" + }, + "Avances re\u00e7ues et comptes courants bloqu\u00e9s": { + "account_number": "164" + }, + "D\u00e9p\u00f4ts et cautionnements re\u00e7us": { + "D\u00e9p\u00f4ts": { + "account_number": "1651" + }, + "Cautionnements": { + "account_number": "1652" + }, + "account_number": "165" + }, + "Int\u00e9r\u00eats courus": { + "Sur emprunts obligataires": { + "account_number": "1661" + }, + "Sur emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": { + "account_number": "1662" + }, + "Sur avances re\u00e7ues de l\u2019\u00c9tat": { + "account_number": "1663" + }, + "Sur avances re\u00e7ues et comptes courants bloqu\u00e9s": { + "account_number": "1664" + }, + "Sur d\u00e9p\u00f4ts et cautionnements re\u00e7us": { + "account_number": "1665" + }, + "Sur avances assorties de conditions particuli\u00e8res": { + "account_number": "1667" + }, + "Sur autres emprunts et dettes": { + "account_number": "1668" + }, + "account_number": "166" + }, + "Avances assorties de conditions particuli\u00e8res": { + "Avances bloqu\u00e9es pour augmentation du capital": { + "account_number": "1671" + }, + "Avances conditionn\u00e9es par l\u2019\u00c9tat": { + "account_number": "1672" + }, + "Avances conditionn\u00e9es par les autres organismes africains": { + "account_number": "1673" + }, + "Avances conditionn\u00e9es par les organismes internationaux": { + "account_number": "1674" + }, + "account_number": "167" + }, + "Autres emprunts et dettes": { + "Rentes viag\u00e8res capitalis\u00e9es": { + "account_number": "1681" + }, + "Billets de fonds": { + "account_number": "1682" + }, + "Dettes cons\u00e9cutives \u00e0 des titres emprunt\u00e9s": { + "account_number": "1683" + }, + "Emprunts participatifs": { + "account_number": "1684" + }, + "Participation des travailleurs aux b\u00e9n\u00e9fices": { + "account_number": "1685" + }, + "Emprunts et dettes contract\u00e9s aupr\u00e8s des autres tiers": { + "account_number": "1686" + }, + "account_number": "168" + }, + "account_number": "16" + }, + "Dettes de location acquisition": { + "Dettes de location acquisition / cr\u00e9dit bail immobilier": { + "account_number": "172" + }, + "Dettes de location acquisition / cr\u00e9dit bail mobilier": { + "account_number": "173" + }, + "Dettes de location acquisition / location de vente": { + "account_number": "174" + }, + "Int\u00e9r\u00eats courus": { + "Sur dettes de location acquisition / cr\u00e9dit-bail immobilier": { + "account_number": "1762" + }, + "Sur dettes de location acquisition / cr\u00e9dit-bail mobilier": { + "account_number": "1763" + }, + "Sur dettes de location acquisition / location-vente": { + "account_number": "1764" + }, + "Sur autres dettes de location acquisition": { + "account_number": "1768" + }, + "account_number": "176" + }, + "Autres dettes de location acquisition": { + "account_number": "178" + }, + "account_number": "17" + }, + "Dettes li\u00e9es \u00e0 des participations et comptes de liaison des \u00e9tablissements et soci\u00e9t\u00e9s en participation": { + "Dettes li\u00e9es \u00e0 des participations": { + "Dettes li\u00e9es \u00e0 des participations (groupe)": { + "account_number": "1811" + }, + "Dettes li\u00e9es \u00e0 des participations (hors groupe)": { + "account_number": "1812" + }, + "account_number": "181" + }, + "Dettes li\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": { + "account_number": "182" + }, + "Int\u00e9r\u00eats courus sur dettes li\u00e9es \u00e0 des participations": { + "account_number": "183" + }, + "Comptes permanents bloqu\u00e9s des \u00e9tablissements et succursales": { + "account_number": "184" + }, + "Comptes permanents non bloqu\u00e9s des \u00e9tablissements et succursales": { + "account_number": "185" + }, + "Comptes de liaison charges": { + "account_number": "186" + }, + "Comptes de liaison produits": { + "account_number": "187" + }, + "Comptes de liaison des soci\u00e9t\u00e9s en participation": { + "account_number": "188" + }, + "account_number": "18" + }, + "Provisions pour risques et charges": { + "Provisions pour litiges": { + "account_number": "191" + }, + "Provisions pour garanties donn\u00e9es aux clients": { + "account_number": "192" + }, + "Provisions pour pertes sur march\u00e9s \u00e0 ach\u00e8vement futur": { + "account_number": "193" + }, + "Provisions pour pertes de change": { + "account_number": "194" + }, + "Provisions pour imp\u00f4ts": { + "account_number": "195" + }, + "Provisions pour pensions et obligations similaires": { + "Provisions pour pensions et obligations similaires engagement de retraite": { + "account_number": "1961" + }, + "Actif du r\u00e9gime de retraite": { + "account_number": "1962" + }, + "account_number": "196" + }, + "Provisions pour restructuration": { + "account_number": "197" + }, + "Autres provisions pour risques et charges": { + "Provisions pour amendes et p\u00e9nalit\u00e9s": { + "account_number": "1981" + }, + "Provisions pour propre assureur": { + "account_number": "1983" + }, + "Provisions pour d\u00e9mant\u00e8lement et remise en \u00e9tat": { + "account_number": "1984" + }, + "Provisions pour droits \u00e0 r\u00e9duction ou avantage en nature (ch\u00e8ques cadeau, cartes de fid\u00e9lit\u00e9...)": { + "account_number": "1985" + }, + "Provisions pour divers risques et charges": { + "account_number": "1988" + }, + "account_number": "198" + }, + "account_number": "19" + }, + "root_type": "Equity", + "account_number": "1" + }, + "Comptes d\u2019actif immobilis\u00e9": { + "Immobilisations incorporelles": { + "account_type": "Fixed Asset", + "Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset", + "account_number": "211" + }, + "Brevets, licences, concessions et droits similaires": { + "account_type": "Fixed Asset", + "Brevets": { + "account_type": "Fixed Asset", + "account_number": "2121" + }, + "Licences": { + "account_type": "Fixed Asset", + "account_number": "2122" + }, + "Concessions de service public": { + "account_type": "Fixed Asset", + "account_number": "2123" + }, + "Autres concessions et droits similaires": { + "account_type": "Fixed Asset", + "account_number": "2128" + }, + "account_number": "212" + }, + "Logiciels et sites internet": { + "account_type": "Fixed Asset", + "Logiciels": { + "account_type": "Fixed Asset", + "account_number": "2131" + }, + "Sites internet": { + "account_type": "Fixed Asset", + "account_number": "2132" + }, + "account_number": "213" + }, + "Marques": { + "account_type": "Fixed Asset", + "account_number": "214" + }, + "Fonds commercial": { + "account_type": "Fixed Asset", + "account_number": "215" + }, + "Droit au bail": { + "account_type": "Fixed Asset", + "account_number": "216" + }, + "Investissements de cr\u00e9ation": { + "account_type": "Fixed Asset", + "account_number": "217" + }, + "Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset", + "Frais de prospection et d\u2019\u00e9valuation de ressources min\u00e9rales": { + "account_type": "Fixed Asset", + "account_number": "2181" + }, + "Co\u00fbts d\u2019obtention du contrat": { + "account_type": "Fixed Asset", + "account_number": "2182" + }, + "Fichiers clients, notices, titres de journaux et magazines": { + "account_type": "Fixed Asset", + "account_number": "2183" + }, + "Co\u00fbts des franchises": { + "account_type": "Fixed Asset", + "account_number": "2184" + }, + "Divers droits et valeurs incorporelles": { + "account_type": "Fixed Asset", + "account_number": "2188" + }, + "account_number": "218" + }, + "Immobilisations incorporelles en cours": { + "account_type": "Fixed Asset", + "Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset", + "account_number": "2191" + }, + "Logiciels et internet": { + "account_type": "Fixed Asset", + "account_number": "2193" + }, + "Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset", + "account_number": "2198" + }, + "account_number": "219" + }, + "account_number": "21" + }, + "Terrains": { + "account_type": "Fixed Asset", + "Terrains agricoles et forestiers": { + "account_type": "Fixed Asset", + "Terrains d\u2019exploitation agricole": { + "account_type": "Fixed Asset", + "account_number": "2211" + }, + "Terrains d\u2019exploitation foresti\u00e8re": { + "account_type": "Fixed Asset", + "account_number": "2212" + }, + "Autres terrains": { + "account_type": "Fixed Asset", + "account_number": "2218" + }, + "account_number": "221" + }, + "Terrains nus": { + "account_type": "Fixed Asset", + "Terrains \u00e0 b\u00e2tir": { + "account_type": "Fixed Asset", + "account_number": "2221" + }, + "Autres terrains nus": { + "account_type": "Fixed Asset", + "account_number": "2228" + }, + "account_number": "222" + }, + "Terrains b\u00e2tis": { + "account_type": "Fixed Asset", + "Pour b\u00e2timents industriels et agricoles": { + "account_type": "Fixed Asset", + "account_number": "2231" + }, + "Pour b\u00e2timents administratifs et commerciaux": { + "account_type": "Fixed Asset", + "account_number": "2232" + }, + "Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations professionnelles": { + "account_type": "Fixed Asset", + "account_number": "2234" + }, + "Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations non professionnelles": { + "account_type": "Fixed Asset", + "account_number": "2235" + }, + "Autres terrains b\u00e2tis": { + "account_type": "Fixed Asset", + "account_number": "2238" + }, + "account_number": "223" + }, + "Travaux de mise en valeur des terrains": { + "account_type": "Fixed Asset", + "Plantation d\u2019arbres et d\u2019arbustes": { + "account_type": "Fixed Asset", + "account_number": "2241" + }, + "Am\u00e9liorations du fonds": { + "account_type": "Fixed Asset", + "account_number": "2245" + }, + "Autres travaux": { + "account_type": "Fixed Asset", + "account_number": "2248" + }, + "account_number": "224" + }, + "Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset", + "Carri\u00e8res": { + "account_type": "Fixed Asset", + "account_number": "2251" + }, + "account_number": "225" + }, + "Terrains am\u00e9nag\u00e9s": { + "account_type": "Fixed Asset", + "Parkings": { + "account_type": "Fixed Asset", + "account_number": "2261" + }, + "account_number": "226" + }, + "Terrains mis en concession": { + "account_type": "Fixed Asset", + "account_number": "227" + }, + "Autres terrains": { + "account_type": "Fixed Asset", + "Terrains immeubles de placement": { + "account_type": "Fixed Asset", + "account_number": "2281" + }, + "Terrains des logements affect\u00e9s au personnel": { + "account_type": "Fixed Asset", + "account_number": "2285" + }, + "Terrains de location acquisition": { + "account_type": "Fixed Asset", + "account_number": "2286" + }, + "Divers terrains": { + "account_type": "Fixed Asset", + "account_number": "2288" + }, + "account_number": "228" + }, + "Am\u00e9nagements de terrains en cours": { + "account_type": "Fixed Asset", + "Terrains agricoles et forestiers": { + "account_type": "Fixed Asset", + "account_number": "2291" + }, + "Terrains nus": { + "account_type": "Fixed Asset", + "account_number": "2292" + }, + "Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset", + "account_number": "2295" + }, + "Autres terrains": { + "account_type": "Fixed Asset", + "account_number": "2298" + }, + "account_number": "229" + }, + "account_number": "22" + }, + "B\u00e2timents, installations techniques et agencements": { + "B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "B\u00e2timents industriels": { + "account_number": "2311" + }, + "B\u00e2timents agricoles": { + "account_number": "2312" + }, + "B\u00e2timents administratifs et commerciaux": { + "account_number": "2313" + }, + "B\u00e2timents affect\u00e9s au logement du personnel": { + "account_number": "2314" + }, + "B\u00e2timents immeubles de placement": { + "account_number": "2315" + }, + "B\u00e2timents de location acquisition": { + "account_number": "2316" + }, + "account_number": "231" + }, + "B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "B\u00e2timents industriels": { + "account_number": "2321" + }, + "B\u00e2timents agricoles": { + "account_number": "2322" + }, + "B\u00e2timents administratifs et commerciaux": { + "account_number": "2323" + }, + "B\u00e2timents affect\u00e9s au logement du personnel": { + "account_number": "2324" + }, + "B\u00e2timents immeubles de placement": { + "account_number": "2325" + }, + "B\u00e2timents de location acquisition": { + "account_number": "2326" + }, + "account_number": "232" + }, + "Ouvrages d\u2019infrastructure": { + "Voies de terre": { + "account_number": "2331" + }, + "Voies de fer": { + "account_number": "2332" + }, + "Voies d\u2019eau": { + "account_number": "2333" + }, + "Barrages, Digues": { + "account_number": "2334" + }, + "Pistes d\u2019a\u00e9rodrome": { + "account_number": "2335" + }, + "Autres ouvrages d\u2019infrastructures": { + "account_number": "2338" + }, + "account_number": "233" + }, + "Am\u00e9nagements, agencements et installations techniques": { + "Installations complexes sp\u00e9cialis\u00e9es sur sol propre": { + "account_number": "2341" + }, + "Installations complexes sp\u00e9cialis\u00e9es sur sol d\u2019autrui": { + "account_number": "2342" + }, + "Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol propre": { + "account_number": "2343" + }, + "Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol d\u2019autrui": { + "account_number": "2344" + }, + "Am\u00e9nagements et agencements des b\u00e2timents": { + "account_number": "2345" + }, + "account_number": "234" + }, + "Am\u00e9nagements de bureaux": { + "Installations g\u00e9n\u00e9rales": { + "account_number": "2351" + }, + "Autres am\u00e9nagements de bureaux": { + "account_number": "2358" + }, + "account_number": "235" + }, + "B\u00e2timents industriels, agricoles et commerciaux mis en concession": { + "account_number": "237" + }, + "Autres installations et agencements": { + "account_number": "238" + }, + "B\u00e2timents am\u00e9nagements, agencements et installations en cours": { + "B\u00e2timents en cours": { + "account_number": "2391" + }, + "Installations en cours": { + "account_number": "2392" + }, + "Ouvrages d\u2019infrastructure en cours": { + "account_number": "2393" + }, + "Am\u00e9nagements et agencements et installations techniques en cours": { + "account_number": "2394" + }, + "Am\u00e9nagements de bureaux en cours": { + "account_number": "2395" + }, + "Autres installations et agencements en cours": { + "account_number": "2398" + }, + "account_number": "239" + }, + "account_number": "23" + }, + "Mat\u00e9riel, mobilier et actifs biologiques": { + "Mat\u00e9riel et outillage industriel et commercial": { + "Mat\u00e9riel industriel": { + "account_number": "2411" + }, + "Outillage industriel": { + "account_number": "2412" + }, + "Mat\u00e9riel commercial": { + "account_number": "2413" + }, + "Outillage commercial": { + "account_number": "2414" + }, + "Mat\u00e9riel & outillage industriel et commercial de location-acquisition": { + "account_number": "2416" + }, + "account_number": "241" + }, + "Mat\u00e9riel et outillage agricole": { + "Mat\u00e9riel agricole": { + "account_number": "2421" + }, + "Outillage agricole": { + "account_number": "2422" + }, + "Mat\u00e9riel & outillage agricole de location-acquisition": { + "account_number": "2426" + }, + "account_number": "242" + }, + "Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "243" + }, + "Mat\u00e9riel et mobilier": { + "Mat\u00e9riel de bureau": { + "account_number": "2441" + }, + "Mat\u00e9riel informatique": { + "account_number": "2442" + }, + "Mat\u00e9riel bureautique": { + "account_number": "2443" + }, + "Mobilier de bureau": { + "account_number": "2444" + }, + "Mat\u00e9riel et mobilier immeubles de placement": { + "account_number": "2445" + }, + "Mat\u00e9riel et mobilier de location acquisition": { + "account_number": "2446" + }, + "Mat\u00e9riel et mobilier des logements du personnel": { + "account_number": "2447" + }, + "account_number": "244" + }, + "Mat\u00e9riel de transport": { + "Mat\u00e9riel automobile": { + "account_number": "2451" + }, + "Mat\u00e9riel ferroviaire": { + "account_number": "2452" + }, + "Mat\u00e9riel fluvial, lagunaire": { + "account_number": "2453" + }, + "Mat\u00e9riel naval": { + "account_number": "2454" + }, + "Mat\u00e9riel a\u00e9rien": { + "account_number": "2455" + }, + "Mat\u00e9riel de transport de location-acquisition": { + "account_number": "2456" + }, + "Mat\u00e9riel hippomobile": { + "account_number": "2457" + }, + "Autres mat\u00e9riels de transport": { + "account_number": "2458" + }, + "account_number": "245" + }, + "Actifs biologiques": { + "Cheptel, animaux de trait": { + "account_number": "2461" + }, + "Cheptel, animaux reproducteurs": { + "account_number": "2462" + }, + "Animaux de garde": { + "account_number": "2463" + }, + "Plantations agricoles": { + "account_number": "2465" + }, + "Autres actifs biologiques": { + "account_number": "2468" + }, + "account_number": "246" + }, + "Agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "Agencements et am\u00e9nagements du mat\u00e9riel": { + "account_number": "2471" + }, + "Agencements et am\u00e9nagements des actifs biologiques": { + "account_number": "2472" + }, + "Autres agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "account_number": "2478" + }, + "account_number": "247" + }, + "Autres mat\u00e9riels et mobiliers": { + "Collections et \u0153uvres d\u2019art": { + "account_number": "2481" + }, + "Divers mat\u00e9riels mobiliers": { + "account_number": "2488" + }, + "account_number": "248" + }, + "Mat\u00e9riels et actifs biologiques en cours": { + "Mat\u00e9riel et outillage industriel et commercial": { + "account_number": "2491" + }, + "Mat\u00e9riel et outillage agricole": { + "account_number": "2492" + }, + "Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "2493" + }, + "Mat\u00e9riel et mobilier de bureau": { + "account_number": "2494" + }, + "Mat\u00e9riel de transport": { + "account_number": "2495" + }, + "Actifs biologiques": { + "account_number": "2496" + }, + "Agencements am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "account_number": "2497" + }, + "Autres mat\u00e9riels et actifs biologiques en cours": { + "account_number": "2498" + }, + "account_number": "249" + }, + "account_number": "24" + }, + "Avances et acomptes vers\u00e9s sur immobilisations": { + "Avances et acomptes vers\u00e9s sur immobilisations incorporelles": { + "account_number": "251" + }, + "Avances et acomptes vers\u00e9s sur immobilisations corporelles": { + "account_number": "252" + }, + "account_number": "25" + }, + "Titres de participation": { + "Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": { + "account_number": "261" + }, + "Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le conjoint": { + "account_number": "262" + }, + "Titres de participation dans des soci\u00e9t\u00e9s conf\u00e9rant une influence notable": { + "account_number": "263" + }, + "Participations dans des organismes professionnels": { + "account_number": "265" + }, + "Parts dans des groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": { + "account_number": "266" + }, + "Autres titres de participation": { + "account_number": "268" + }, + "account_number": "26" + }, + "Autres immobilisations financi\u00e8res": { + "Pr\u00eats et cr\u00e9ances": { + "Pr\u00eats participatifs": { + "account_number": "2711" + }, + "Pr\u00eats aux associ\u00e9s": { + "account_number": "2712" + }, + "Billets de fonds": { + "account_number": "2713" + }, + "Titres pr\u00eat\u00e9s": { + "account_number": "2714" + }, + "Autres pr\u00eats et cr\u00e9ances": { + "account_number": "2718" + }, + "account_number": "271" + }, + "Pr\u00eats au personnel": { + "Pr\u00eats immobiliers": { + "account_number": "2721" + }, + "Pr\u00eats mobiliers et d\u2019installation": { + "account_number": "2722" + }, + "Autres pr\u00eats au personnel": { + "account_number": "2728" + }, + "account_number": "272" + }, + "Cr\u00e9ances sur l\u2019\u00c9tat": { + "Retenues de garantie": { + "account_number": "2731" + }, + "Fonds r\u00e9glement\u00e9": { + "account_number": "2733" + }, + "Cr\u00e9ances sur le conc\u00e9dant": { + "account_number": "2734" + }, + "Autres cr\u00e9ances sur l\u2019\u00c9tat": { + "account_number": "2738" + }, + "account_number": "273" + }, + "Titres immobilis\u00e9s": { + "Titres immobilis\u00e9s de l\u2019activit\u00e9 de portefeuille (TIAP)": { + "account_number": "2741" + }, + "Titres participatifs": { + "account_number": "2742" + }, + "Certificats d\u2019investissement": { + "account_number": "2743" + }, + "Parts de fonds commun de placement (FCP)": { + "account_number": "2744" + }, + "Obligations": { + "account_number": "2745" + }, + "Actions ou parts propres": { + "account_number": "2746" + }, + "Autres titres immobilis\u00e9s": { + "account_number": "2748" + }, + "account_number": "274" + }, + "D\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "D\u00e9p\u00f4ts pour loyers d\u2019avance": { + "account_number": "2751" + }, + "D\u00e9p\u00f4ts pour l\u2019\u00e9lectricit\u00e9": { + "account_number": "2752" + }, + "D\u00e9p\u00f4ts pour l\u2019eau": { + "account_number": "2753" + }, + "D\u00e9p\u00f4ts pour le gaz": { + "account_number": "2754" + }, + "D\u00e9p\u00f4ts pour le t\u00e9l\u00e9phone, le t\u00e9lex, la t\u00e9l\u00e9copie": { + "account_number": "2755" + }, + "Cautionnements sur march\u00e9s publics": { + "account_number": "2756" + }, + "Cautionnements sur autres op\u00e9rations": { + "account_number": "2757" + }, + "Autres d\u00e9p\u00f4ts et cautionnements": { + "account_number": "2758" + }, + "account_number": "275" + }, + "Int\u00e9r\u00eats courus": { + "Pr\u00eats et cr\u00e9ances non commerciales": { + "account_number": "2761" + }, + "Pr\u00eats au personnel": { + "account_number": "2762" + }, + "Cr\u00e9ances sur l\u2019\u00c9tat": { + "account_number": "2763" + }, + "Titres immobilis\u00e9s": { + "account_number": "2764" + }, + "D\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "account_number": "2765" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations": { + "account_number": "2767" + }, + "Immobilisations financi\u00e8res diverses": { + "account_number": "2768" + }, + "account_number": "276" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": { + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations (groupe)": { + "account_number": "2771" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations (hors groupe)": { + "account_number": "2772" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": { + "account_number": "2773" + }, + "Avances \u00e0 des Groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": { + "account_number": "2774" + }, + "account_number": "277" + }, + "Immobilisations financi\u00e8res diverses": { + "Cr\u00e9ances diverses groupe": { + "account_number": "2781" + }, + "Cr\u00e9ances diverses hors groupe": { + "account_number": "2782" + }, + "Banques d\u00e9p\u00f4ts \u00e0 terme": { + "account_number": "2784" + }, + "Or et m\u00e9taux pr\u00e9cieux": { + "account_number": "2785" + }, + "Autres immobilisations financi\u00e8res": { + "account_number": "2788" + }, + "account_number": "278" + }, + "account_number": "27" + }, + "Amortissements": { + "account_type": "Accumulated Depreciation", + "Amortissements des immobilisations corporelles": { + "account_type": "Accumulated Depreciation", + "Amortissements des frais de d\u00e9veloppement": { + "account_type": "Accumulated Depreciation", + "account_number": "2811" + }, + "Amortissements des brevets, licences, concessions et droits similaires": { + "account_type": "Accumulated Depreciation", + "account_number": "2812" + }, + "Amortissements des logiciels et sites internet": { + "account_type": "Accumulated Depreciation", + "account_number": "2813" + }, + "Amortissements des marques": { + "account_type": "Accumulated Depreciation", + "account_number": "2814" + }, + "Amortissements du fonds commercial": { + "account_type": "Accumulated Depreciation", + "account_number": "2815" + }, + "Amortissements du droit au bail": { + "account_type": "Accumulated Depreciation", + "account_number": "2816" + }, + "Amortissements des investissements de cr\u00e9ation": { + "account_type": "Accumulated Depreciation", + "account_number": "2817" + }, + "Amortissements des autres droits et valeurs incorporels": { + "account_type": "Accumulated Depreciation", + "account_number": "2818" + }, + "account_number": "281" + }, + "Amortissements des terrains": { + "Amortissements des travaux de mise en valeur des terrains": { + "account_number": "2824" + }, + "account_number": "282" + }, + "Amortissements des b\u00e2timents, installations techniques et agencements": { + "Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "account_number": "2831" + }, + "Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "account_number": "2832" + }, + "Amortissements des ouvrages d\u2019infrastructure": { + "account_number": "2833" + }, + "Amortissements des am\u00e9nagements, agencements et installations techniques": { + "account_number": "2834" + }, + "Amortissements des am\u00e9nagements de bureaux": { + "account_number": "2835" + }, + "Amortissements des b\u00e2timents industriels, agricoles et commerciaux mis en concession": { + "account_number": "2837" + }, + "Amortissements des autres installations et agencements": { + "account_number": "2838" + }, + "account_number": "283" + }, + "Amortissements du mat\u00e9riel": { + "Amortissements du mat\u00e9riel et outillage industriel et commercial": { + "account_number": "2841" + }, + "Amortissements du mat\u00e9riel et outillage agricole": { + "account_number": "2842" + }, + "Amortissements du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "2843" + }, + "Amortissements du mat\u00e9riel et mobilier": { + "account_number": "2844" + }, + "Amortissements du mat\u00e9riel de transport": { + "account_number": "2845" + }, + "Amortissements des actifs biologiques": { + "account_number": "2846" + }, + "Amortissements des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": { + "account_number": "2847" + }, + "Amortissements des autres mat\u00e9riels": { + "account_number": "2848" + }, + "account_number": "284" + }, + "account_number": "28" + }, + "D\u00e9pr\u00e9ciations des immobilisations": { + "D\u00e9pr\u00e9ciations des immobilisations incorporelles": { + "D\u00e9pr\u00e9ciations des frais de d\u00e9veloppement": { + "account_number": "2911" + }, + "D\u00e9pr\u00e9ciations des brevets, licences, concessions et droits similaires": { + "account_number": "2912" + }, + "D\u00e9pr\u00e9ciations des logiciels et sites internet": { + "account_number": "2913" + }, + "D\u00e9pr\u00e9ciations des marques": { + "account_number": "2914" + }, + "D\u00e9pr\u00e9ciations du fonds commercial": { + "account_number": "2915" + }, + "D\u00e9pr\u00e9ciations du droit au bail": { + "account_number": "2916" + }, + "D\u00e9pr\u00e9ciations des investissements de cr\u00e9ation": { + "account_number": "2917" + }, + "D\u00e9pr\u00e9ciations des autres droits et valeurs incorporels": { + "account_number": "2918" + }, + "D\u00e9pr\u00e9ciations des immobilisations incorporelles en cours": { + "account_number": "2919" + }, + "account_number": "291" + }, + "D\u00e9pr\u00e9ciations des terrains": { + "D\u00e9pr\u00e9ciations des terrains agricoles et forestiers": { + "account_number": "2921" + }, + "D\u00e9pr\u00e9ciations des terrains nus": { + "account_number": "2922" + }, + "D\u00e9pr\u00e9ciations des terrains b\u00e2tis": { + "account_number": "2923" + }, + "D\u00e9pr\u00e9ciations des travaux de mise en valeur des terrains": { + "account_number": "2924" + }, + "D\u00e9pr\u00e9ciations des terrains de gisement": { + "account_number": "2925" + }, + "D\u00e9pr\u00e9ciations des terrains am\u00e9nag\u00e9s": { + "account_number": "2926" + }, + "D\u00e9pr\u00e9ciations des terrains mis en concession": { + "account_number": "2927" + }, + "D\u00e9pr\u00e9ciations des autres terrains": { + "account_number": "2928" + }, + "D\u00e9pr\u00e9ciations des am\u00e9nagements de terrains en cours": { + "account_number": "2929" + }, + "account_number": "292" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents, installations techniques et agencements": { + "D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "account_number": "2931" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "account_number": "2932" + }, + "D\u00e9pr\u00e9ciations des ouvrages d\u2019infrastructures": { + "account_number": "2933" + }, + "D\u00e9pr\u00e9ciations des am\u00e9nagements, agencements et installations techniques": { + "account_number": "2934" + }, + "D\u00e9pr\u00e9ciations des am\u00e9nagements de bureaux": { + "account_number": "2935" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles et commerciaux mis en concession": { + "account_number": "2937" + }, + "D\u00e9pr\u00e9ciations des autres installations et agencements": { + "account_number": "2938" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents et installations en cours": { + "account_number": "2939" + }, + "account_number": "293" + }, + "D\u00e9pr\u00e9ciations de mat\u00e9riel, du mobilier et de l\u2019actif biologique": { + "D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage industriel et commercial": { + "account_number": "2941" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage agricole": { + "account_number": "2942" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "2943" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel et mobilier": { + "account_number": "2944" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel de transport": { + "account_number": "2945" + }, + "D\u00e9pr\u00e9ciations des actifs biologiques": { + "account_number": "2946" + }, + "D\u00e9pr\u00e9ciations des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": { + "account_number": "2947" + }, + "D\u00e9pr\u00e9ciations des autres mat\u00e9riels": { + "account_number": "2948" + }, + "D\u00e9pr\u00e9ciations de mat\u00e9riel en cours": { + "account_number": "2949" + }, + "account_number": "294" + }, + "D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations": { + "D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations incorporelles": { + "account_number": "2951" + }, + "D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations corporelles": { + "account_number": "2952" + }, + "account_number": "295" + }, + "D\u00e9pr\u00e9ciations des titres de participation": { + "D\u00e9pr\u00e9ciations des titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": { + "account_number": "2961" + }, + "D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s sous contr\u00f4le conjoint": { + "account_number": "2962" + }, + "D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s conf\u00e9rant une influence notable": { + "account_number": "2963" + }, + "D\u00e9pr\u00e9ciations des participations dans des organismes professionnels": { + "account_number": "2965" + }, + "D\u00e9pr\u00e9ciations des parts dans des GIE": { + "account_number": "2966" + }, + "D\u00e9pr\u00e9ciations des autres titres de participation": { + "account_number": "2968" + }, + "account_number": "296" + }, + "D\u00e9pr\u00e9ciations des autres immobilisations financi\u00e8res": { + "D\u00e9pr\u00e9ciations des pr\u00eats et cr\u00e9ances": { + "account_number": "2971" + }, + "D\u00e9pr\u00e9ciations des pr\u00eats au personnel": { + "account_number": "2972" + }, + "D\u00e9pr\u00e9ciations des cr\u00e9ances sur l\u2019\u00c9tat": { + "account_number": "2973" + }, + "D\u00e9pr\u00e9ciations des titres immobilis\u00e9s": { + "account_number": "2974" + }, + "D\u00e9pr\u00e9ciations des d\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "account_number": "2975" + }, + "D\u00e9pr\u00e9ciations des cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": { + "account_number": "2977" + }, + "D\u00e9pr\u00e9ciations des cr\u00e9ances financi\u00e8res diverses": { + "account_number": "2978" + }, + "account_number": "297" + }, + "account_number": "29" + }, + "root_type": "Asset", + "account_number": "2" + }, + "Comptes de Stocks": { + "Marchandises": { + "Marchandises A": { + "Marchandises A1": { + "account_number": "3111" + }, + "Marchandises A2": { + "account_number": "3112" + }, + "account_number": "311" + }, + "Marchandises B": { + "Marchandises B1": { + "account_number": "3121" + }, + "Marchandises B2": { + "account_number": "3122" + }, + "account_number": "312" + }, + "Actifs biologiques": { + "Animaux": { + "account_number": "3131" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3132" + }, + "account_number": "313" + }, + "Marchandises hors activit\u00e9s ordinaires (HAO)": { + "account_number": "318" + }, + "account_number": "31" + }, + "Mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "Mati\u00e8res A": { + "account_number": "321" + }, + "Mati\u00e8res B": { + "account_number": "322" + }, + "Fournitures (A, B)": { + "account_number": "323" + }, + "account_number": "32" + }, + "Autres approvisionnements": { + "Mati\u00e8res consommables": { + "account_number": "331" + }, + "Fournitures d\u2019atelier et d\u2019usine": { + "account_number": "332" + }, + "Fournitures de magasin": { + "account_number": "333" + }, + "Fournitures de bureau": { + "account_number": "334" + }, + "Emballages": { + "Emballages perdus": { + "account_number": "3351" + }, + "Emballages r\u00e9cup\u00e9rables non identifiables": { + "account_number": "3352" + }, + "Emballages \u00e0 usage mixte": { + "account_number": "3353" + }, + "Autres emballages": { + "account_number": "3358" + }, + "account_number": "335" + }, + "Autres mati\u00e8res": { + "account_number": "338" + }, + "account_number": "33" + }, + "Produits en cours": { + "Produits en cours": { + "Produits en cours P1": { + "account_number": "3411" + }, + "Produits en cours P2": { + "account_number": "3412" + }, + "account_number": "341" + }, + "Travaux en cours": { + "Travaux en cours T1": { + "account_number": "3421" + }, + "Travaux en cours T2": { + "account_number": "3422" + }, + "account_number": "342" + }, + "Produits interm\u00e9diaires en cours": { + "Produits interm\u00e9diaires A": { + "account_number": "3431" + }, + "Produits interm\u00e9diaires B": { + "account_number": "3432" + }, + "account_number": "343" + }, + "Produits r\u00e9siduels en cours": { + "Produits r\u00e9siduels A": { + "account_number": "3441" + }, + "Produits r\u00e9siduels B": { + "account_number": "3442" + }, + "account_number": "344" + }, + "Actifs biologiques en cours": { + "Animaux": { + "account_number": "3451" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3452" + }, + "account_number": "345" + }, + "account_number": "34" + }, + "Services en cours": { + "\u00c9tudes en cours": { + "\u00c9tudes en cours E1": { + "account_number": "3511" + }, + "\u00c9tudes en cours E2": { + "account_number": "3512" + }, + "account_number": "351" + }, + "Prestations de services en cours": { + "Prestations de services S1": { + "account_number": "3521" + }, + "Prestations de services S2": { + "account_number": "3522" + } + }, + "account_number": "35" + }, + "Produits finis": { + "Produits finis A": { + "account_number": "361" + }, + "Produits finis B": { + "account_number": "362" + }, + "Actifs biologiques": { + "Animaux": { + "account_number": "3631" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3632" + }, + "Autres stocks (activit\u00e9s annexes)": { + "account_number": "3638" + }, + "account_number": "363" + }, + "account_number": "36" + }, + "Produits interm\u00e9diaires et r\u00e9siduels": { + "Produits interm\u00e9diaires": { + "Produits interm\u00e9diaires A": { + "account_number": "3711" + }, + "Produits interm\u00e9diaires B": { + "account_number": "3712" + }, + "account_number": "371" + }, + "Produits r\u00e9siduels": { + "D\u00e9chets": { + "account_number": "3721" + }, + "Rebuts": { + "account_number": "3722" + }, + "Mati\u00e8res de R\u00e9cup\u00e9ration": { + "account_number": "3723" + }, + "account_number": "372" + }, + "Actifs biologiques": { + "Animaux": { + "account_number": "3731" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3732" + }, + "Autres stocks (activit\u00e9s annexes)": { + "account_number": "3738" + }, + "account_number": "373" + }, + "account_number": "37" + }, + "Stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": { + "account_type": "Stock", + "Marchandises en cours de route": { + "account_number": "381" + }, + "Mati\u00e8res premi\u00e8res et fournitures li\u00e9es en cours de route": { + "account_number": "382" + }, + "Autres approvisionnements en cours de route": { + "account_number": "383" + }, + "Produits finis en cours de route": { + "account_number": "386" + }, + "Stock en consignation ou en d\u00e9p\u00f4t": { + "Stock en consignation": { + "account_number": "3871" + }, + "Stock en d\u00e9p\u00f4t": { + "account_number": "3872" + }, + "account_number": "387" + }, + "Stock provenant d\u2019immobilisations mises hors service ou au rebut": { + "account_number": "388" + }, + "account_number": "38" + }, + "D\u00e9pr\u00e9ciations des stocks et encours de production": { + "D\u00e9pr\u00e9ciations des stocks de marchandises": { + "account_number": "391" + }, + "D\u00e9pr\u00e9ciations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "account_number": "392" + }, + "D\u00e9pr\u00e9ciations des stocks d\u2019autres approvisionnements": { + "account_number": "393" + }, + "D\u00e9pr\u00e9ciations des productions en cours": { + "account_number": "394" + }, + "D\u00e9pr\u00e9ciations des services en cours": { + "account_number": "395" + }, + "D\u00e9pr\u00e9ciations des stocks de produits finis": { + "account_number": "396" + }, + "D\u00e9pr\u00e9ciations des stocks de produits interm\u00e9diaires et r\u00e9siduels": { + "account_number": "397" + }, + "D\u00e9pr\u00e9ciations des stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": { + "account_number": "398" + }, + "account_number": "39" + }, + "root_type": "Asset", + "account_number": "3" + }, + "4-Comptes de Tiers (ACTIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (ACTIF)": { + "Fournisseurs d\u00e9biteurs": { + "Fournisseurs Avances et acomptes vers\u00e9s": { + "account_number": "4091" + }, + "Fournisseurs Groupe avances et acomptes vers\u00e9s": { + "account_number": "4092" + }, + "Fournisseurs Sous-traitants avances et acomptes vers\u00e9s": { + "account_number": "4093" + }, + "Fournisseurs Cr\u00e9ances pour emballages et mat\u00e9riels \u00e0 rendre": { + "account_number": "4094" + }, + "Fournisseurs Rabais, remises, ristournes et autres avoirs \u00e0 obtenir": { + "account_number": "4098" + }, + "account_number": "409" + } + }, + "41-Clients et comptes rattach\u00e9s (ACTIF)": { + "Clients": { + "Clients": { + "account_type": "Receivable", + "account_number": "4111" + }, + "Clients groupe": { + "account_type": "Receivable", + "account_number": "4112" + }, + "Clients, \u00c9tat et Collectivit\u00e9s publiques": { + "account_type": "Receivable", + "account_number": "4114" + }, + "Clients, organismes internationaux": { + "account_type": "Receivable", + "account_number": "4115" + }, + "Clients, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Receivable", + "account_number": "4116" + }, + "Client, retenues de garantie": { + "account_type": "Receivable", + "account_number": "4117" + }, + "Clients, d\u00e9gr\u00e8vement de taxes sur la valeur ajout\u00e9e (TVA)": { + "account_type": "Receivable", + "account_number": "4118" + }, + "account_type": "Receivable", + "account_number": "411" + }, + "Clients, effets \u00e0 recevoir en portefeuille": { + "Clients, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4121" + }, + "Clients Groupe, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4122" + }, + "\u00c9tat et Collectivit\u00e9s publiques, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4124" + }, + "Organismes Internationaux, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4125" + }, + "account_type": "Receivable", + "account_number": "412" + }, + "Clients, ch\u00e8ques, effets et autres valeurs impay\u00e9es": { + "Clients, ch\u00e8ques impay\u00e9s": { + "account_type": "Receivable", + "account_number": "4131" + }, + "Clients, effets impay\u00e9s": { + "account_type": "Receivable", + "account_number": "4132" + }, + "Clients, cartes de cr\u00e9dit impay\u00e9es": { + "account_type": "Receivable", + "account_number": "4133" + }, + "Clients, autres valeurs impay\u00e9es": { + "account_type": "Receivable", + "account_number": "4138" + }, + "account_type": "Receivable", + "account_number": "413" + }, + "Cr\u00e9ances sur cessions courantes d\u2019immobilisations": { + "Cr\u00e9ances en compte, immobilisations incorporelles": { + "account_type": "Receivable", + "account_number": "4141" + }, + "Cr\u00e9ances en compte, immobilisations corporelles": { + "account_type": "Receivable", + "account_number": "4142" + }, + "Effets \u00e0 recevoir, immobilisations incorporelles": { + "account_type": "Receivable", + "account_number": "4146" + }, + "Effets \u00e0 recevoir, immobilisations corporelles": { + "account_type": "Receivable", + "account_number": "4147" + }, + "account_type": "Receivable", + "account_number": "414" + }, + "Clients, effets escompt\u00e9s non \u00e9chus": { + "account_type": "Receivable", + "account_number": "415" + }, + "Cr\u00e9ances clients litigieuses ou douteuses": { + "Cr\u00e9ances litigieuses": { + "account_type": "Receivable", + "account_number": "4161" + }, + "Cr\u00e9ances douteuses": { + "account_type": "Receivable", + "account_number": "4162" + }, + "account_type": "Receivable", + "account_number": "416" + }, + "Clients, produits \u00e0 recevoir": { + "Clients, factures \u00e0 \u00e9tablir": { + "account_type": "Receivable", + "account_number": "4181" + }, + "Clients, int\u00e9r\u00eats courus": { + "account_type": "Receivable", + "account_number": "4186" + }, + "account_type": "Receivable", + "account_number": "418" + }, + "account_type": "Receivable" + }, + "42-Personnel (ACTIF)": { + "Personnel, avances et acomptes": { + "Personnel, avances": { + "account_number": "4211" + }, + "Personnel, acomptes": { + "account_number": "4212" + }, + "Frais avanc\u00e9s et fournitures au personnel": { + "account_number": "4213" + }, + "account_number": "421" + } + }, + "43-Organismes sociaux (ACTIF)": { + "431-S\u00e9curit\u00e9 sociale": { + "Prestations familiales": { + "account_number": "4311" + }, + "Accidents de travail": { + "account_number": "4312" + }, + "Caisse de retraite obligatoire": { + "account_number": "4313" + }, + "Caisse de retraite facultative": { + "account_number": "4314" + }, + "Autres cotisations sociales": { + "account_number": "4318" + } + }, + "432-Caisses de retraite compl\u00e9mentaire": {}, + "433-Autres organismes sociaux": { + "Mutuelle": { + "account_number": "4331" + }, + "Assurances retraite": { + "account_number": "4332" + }, + "Assurances et organismes de sant\u00e9": { + "account_number": "4333" + } + }, + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "Produits \u00e0 recevoir": { + "account_number": "4387" + } + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (ACTIF)": { + "\u00c9tat, TVA factur\u00e9e": { + "TVA factur\u00e9e sur ventes": { + "account_number": "4431" + }, + "TVA factur\u00e9e sur prestations de services": { + "account_number": "4432" + }, + "TVA factur\u00e9e sur travaux": { + "account_number": "4433" + }, + "TVA factur\u00e9e sur production livr\u00e9e \u00e0 soi-m\u00eame": { + "account_number": "4434" + }, + "TVA sur factures \u00e0 \u00e9tablir": { + "account_number": "4435" + }, + "account_number": "443" + }, + "\u00c9tat, TVA r\u00e9cup\u00e9rable": { + "TVA r\u00e9cup\u00e9rable sur immobilisations": { + "account_number": "4451" + }, + "TVA r\u00e9cup\u00e9rable sur achats": { + "account_number": "4452" + }, + "TVA r\u00e9cup\u00e9rable sur transport": { + "account_number": "4453" + }, + "TVA r\u00e9cup\u00e9rable sur services ext\u00e9rieurs et autres charges": { + "account_number": "4454" + }, + "TVA r\u00e9cup\u00e9rable sur factures non parvenues": { + "account_number": "4455" + }, + "TVA transf\u00e9r\u00e9e par d\u2019autres entit\u00e9s": { + "account_number": "4456" + }, + "account_number": "445" + }, + "\u00c9tat, charges \u00e0 payer et produits \u00e0 recevoir": { + "Charges \u00e0 payer": { + "account_number": "4486" + }, + "Produits \u00e0 recevoir": { + "account_number": "4487" + }, + "account_number": "448" + }, + "\u00c9tat, cr\u00e9ances et dettes diverses": { + "\u00c9tat, obligations cautionn\u00e9es": { + "account_number": "4491" + }, + "\u00c9tat, avances et acomptes vers\u00e9s sur imp\u00f4ts": { + "account_number": "4492" + }, + "\u00c9tat, fonds de dotation \u00e0 recevoir": { + "account_number": "4493" + }, + "\u00c9tat, subventions investissement \u00e0 recevoir": { + "account_number": "4494" + }, + "\u00c9tat, subventions d\u2019exploitation \u00e0 recevoir": { + "account_number": "4495" + }, + "\u00c9tat, subventions d\u2019\u00e9quilibre \u00e0 recevoir": { + "account_number": "4496" + }, + "\u00c9tat, avances sur subventions": { + "account_number": "4497" + }, + "\u00c9tat, fonds r\u00e9glement\u00e9s provisionn\u00e9s": { + "account_number": "4499" + }, + "account_number": "449" + } + }, + "45-Organismes internationaux (ACTIF)": { + "Op\u00e9rations avec les organismes africains": { + "account_number": "451" + }, + "Op\u00e9rations avec les autres organismes internationaux": { + "account_number": "452" + }, + "Organismes internationaux, fonds de dotation et subventions \u00e0 recevoir": { + "Organismes internationaux, fonds de dotation \u00e0 recevoir": { + "account_number": "4581" + }, + "Organismes internationaux, subventions \u00e0 recevoir": { + "account_number": "4582" + }, + "account_number": "458" + } + }, + "46-Apporteurs, associ\u00e9s et groupe (ACTIF)": { + "461-Apporteurs, op\u00e9rations sur le capital": { + "Apporteurs, capital appel\u00e9, non vers\u00e9": { + "account_number": "4613" + }, + "Apporteurs, compte d\u2019apport, op\u00e9rations de restructuration (fusion...)": { + "account_number": "4614" + }, + "Apporteurs, titres \u00e0 \u00e9changer": { + "account_number": "4618" + } + }, + "Apporteurs, restant d\u00fb sur capital appel\u00e9": { + "account_number": "467" + } + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (ACTIF)": { + "472-Cr\u00e9ances et dettes sur titres de placement": { + "Cr\u00e9ances sur cessions de titres de placement": { + "account_number": "4721" + }, + "Versements restant \u00e0 effectuer sur titres de placement non lib\u00e9r\u00e9s": { + "account_number": "4726" + } + }, + "473-Interm\u00e9diaires Op\u00e9rations faites pour compte de tiers": { + "Mandants": { + "account_number": "4731" + }, + "Mandataires": { + "account_number": "4732" + }, + "Commettants": { + "account_number": "4733" + }, + "Commissionnaires": { + "account_number": "4734" + }, + "\u00c9tat, Collectivit\u00e9s publiques, fonds global d\u2019allocation": { + "account_number": "4739" + } + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits": { + "Compte de r\u00e9partition p\u00e9riodique des produits": { + "account_number": "4747" + } + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA": { + "Compte actif": { + "account_type": "Temporary", + "account_number": "4751" + } + }, + "Charges constat\u00e9es d\u2019avance": { + "account_number": "476" + }, + "478-\u00c9carts de conversion actif": { + "Diminution des cr\u00e9ances d\u2019exploitation": { + "account_number": "4781" + }, + "Diminution des cr\u00e9ances financi\u00e8res": { + "account_number": "4782" + }, + "Augmentation des dettes d\u2019exploitation": { + "account_number": "4783" + }, + "Augmentation des dettes financi\u00e8res": { + "account_number": "4784" + }, + "Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": { + "account_number": "4786" + }, + "Diff\u00e9rences compens\u00e9es par couverture de change": { + "account_number": "4788" + } + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (ACTIF)": { + "Cr\u00e9ances sur cessions d\u2019immobilisations": { + "En compte, immobilisations incorporelles": { + "account_number": "4851" + }, + "En compte, immobilisations corporelles": { + "account_number": "4852" + }, + "Effets \u00e0 recevoir, immobilisations incorporelles": { + "account_number": "4853" + }, + "Effets \u00e0 recevoir, immobilisations corporelles": { + "account_number": "4854" + }, + "Effets escompt\u00e9s non \u00e9chus": { + "account_number": "4855" + }, + "Retenues de garantie": { + "account_number": "4857" + }, + "Factures \u00e0 \u00e9tablir": { + "account_number": "4858" + }, + "account_number": "485" + }, + "Autres cr\u00e9ances hors activit\u00e9s ordinaires (HAO)": { + "account_number": "488" + } + }, + "49-D\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme (tiers) (ACTIF)": { + "D\u00e9pr\u00e9ciations des comptes clients": { + "Cr\u00e9ances litigieuses": { + "account_number": "4911" + }, + "Cr\u00e9ances douteuses": { + "account_number": "4912" + }, + "account_number": "491" + }, + "D\u00e9pr\u00e9ciations des comptes organismes internationaux": { + "account_number": "495" + }, + "D\u00e9pr\u00e9ciations des comptes apporteurs, associ\u00e9s et groupe": { + "Associ\u00e9s, comptes courants": { + "account_number": "4962" + }, + "Associ\u00e9s, op\u00e9rations faites en commun": { + "account_number": "4963" + }, + "Groupe, comptes courants": { + "account_number": "4966" + }, + "account_number": "496" + }, + "D\u00e9pr\u00e9ciations des comptes d\u00e9biteurs divers": { + "account_number": "497" + }, + "D\u00e9pr\u00e9ciations des comptes de cr\u00e9ances HAO": { + "Cr\u00e9ances sur cessions d\u2019immobilisations": { + "account_number": "4985" + }, + "Cr\u00e9ances sur cessions de titres de placement": { + "account_number": "4986" + }, + "Autres cr\u00e9ances HAO": { + "account_number": "4988" + }, + "account_number": "498" + }, + "Provisions pour risques \u00e0 court terme": { + "Sur op\u00e9rations d\u2019exploitation": { + "account_number": "4991" + }, + "Sur op\u00e9rations financi\u00e8res": { + "account_number": "4997" + }, + "Sur op\u00e9rations HAO": { + "account_number": "4998" + }, + "account_number": "499" + } + }, + "root_type": "Asset" + }, + "4-Comptes de Tiers (PASSIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (PASSIF)": { + "Fournisseurs, dettes en compte": { + "Fournisseurs": { + "account_type": "Payable", + "account_number": "4011" + }, + "Fournisseurs groupe": { + "account_type": "Payable", + "account_number": "4012" + }, + "Fournisseurs sous-traitants": { + "account_type": "Payable", + "account_number": "4013" + }, + "Fournisseurs, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Payable", + "account_number": "4016" + }, + "Fournisseur, retenues de garantie": { + "account_type": "Payable", + "account_number": "4017" + }, + "account_type": "Payable", + "account_number": "401" + }, + "Fournisseurs, effets \u00e0 payer": { + "Fournisseurs Effets \u00e0 payer": { + "account_type": "Payable", + "account_number": "4021" + }, + "Fournisseurs Groupe, effets \u00e0 payer": { + "account_type": "Payable", + "account_number": "4022" + }, + "Fournisseurs Sous-traitants, effets \u00e0 payer": { + "account_type": "Payable", + "account_number": "4023" + }, + "account_type": "Payable", + "account_number": "402" + }, + "Fournisseurs, acquisitions courantes d\u2019immobilisations": { + "Fournisseurs Dettes en comptes, immobilisations incorporelles": { + "account_type": "Payable", + "account_number": "4041" + }, + "Fournisseurs Dettes en comptes, immobilisations corporelles": { + "account_type": "Payable", + "account_number": "4042" + }, + "Fournisseurs Effets \u00e0 payer, immobilisations incorporelles": { + "account_type": "Payable", + "account_number": "4046" + }, + "Fournisseurs Effets \u00e0 payer, immobilisations corporelles": { + "account_type": "Payable", + "account_number": "4047" + }, + "account_type": "Payable", + "account_number": "404" + }, + "Fournisseurs, factures non parvenues": { + "Fournisseurs": { + "account_type": "Stock Received But Not Billed", + "account_number": "4081" + }, + "Fournisseurs groupe": { + "account_type": "Stock Received But Not Billed", + "account_number": "4082" + }, + "Fournisseurs sous-traitants": { + "account_type": "Stock Received But Not Billed", + "account_number": "4083" + }, + "Fournisseurs, int\u00e9r\u00eats courus": { + "account_type": "Stock Received But Not Billed", + "account_number": "4086" + }, + "account_type": "Stock Received But Not Billed", + "account_number": "408" + }, + "account_type": "Payable" + }, + "41-Clients et comptes rattach\u00e9s (PASSIF)": { + "Clients cr\u00e9diteurs": { + "Clients, avances et acomptes re\u00e7us": { + "account_number": "4191" + }, + "Clients groupe, avances et acomptes re\u00e7us": { + "account_number": "4192" + }, + "Clients, dettes pour emballages et mat\u00e9riels consign\u00e9s": { + "account_number": "4194" + }, + "Clients, rabais, remises, ristournes et autres avoirs \u00e0 accorder": { + "account_number": "4198" + }, + "account_number": "419" + } + }, + "42-Personnel (PASSIF)": { + "Personnel, r\u00e9mun\u00e9rations dues": { + "account_number": "422" + }, + "Personnel, oppositions, saisies-arr\u00eats": { + "Personnel, oppositions": { + "account_number": "4231" + }, + "Personnel, saisies-arr\u00eats": { + "account_number": "4232" + }, + "Personnel, avis \u00e0 tiers d\u00e9tenteur": { + "account_number": "4233" + }, + "account_number": "423" + }, + "Personnel, \u0153uvres sociales internes": { + "Assistance m\u00e9dicale": { + "account_number": "4241" + }, + "Allocations familiales": { + "account_number": "4242" + }, + "Organismes sociaux rattach\u00e9s \u00e0 l\u2019entit\u00e9": { + "account_number": "4245" + }, + "Autres \u0153uvres sociales internes": { + "account_number": "4248" + }, + "account_number": "424" + }, + "Repr\u00e9sentants du personnel": { + "D\u00e9l\u00e9gu\u00e9s du personnel": { + "account_number": "4251" + }, + "Syndicats et Comit\u00e9s d\u2019entreprises, d\u2019\u00c9tablissement": { + "account_number": "4252" + }, + "Autres repr\u00e9sentants du personnel": { + "account_number": "4258" + }, + "account_number": "425" + }, + "Personnel, participation aux b\u00e9n\u00e9fices et au capital": { + "Participation aux b\u00e9n\u00e9fices": { + "account_number": "4261" + }, + "Participation au capital": { + "account_number": "4264" + }, + "account_number": "426" + }, + "Personnel d\u00e9p\u00f4ts": { + "account_number": "427" + }, + "Personnel, charges \u00e0 payer et produits \u00e0 recevoir": { + "Dettes provisionn\u00e9es pour cong\u00e9s \u00e0 payer": { + "account_number": "4281" + }, + "Autres charges \u00e0 payer": { + "account_number": "4286" + }, + "Produits \u00e0 recevoir": { + "account_number": "4287" + }, + "account_number": "428" + } + }, + "43-Organismes sociaux (PASSIF)": { + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "Charges sociales sur gratifications \u00e0 payer": { + "account_number": "4381" + }, + "Charges sociales sur cong\u00e9s \u00e0 payer": { + "account_number": "4382" + }, + "Autres charges \u00e0 payer": { + "account_number": "4386" + } + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (PASSIF)": { + "\u00c9tat, imp\u00f4t sur les b\u00e9n\u00e9fices": { + "account_number": "441" + }, + "\u00c9tat, autres imp\u00f4ts et taxes": { + "Imp\u00f4ts et taxes d\u2019\u00c9tat": { + "account_number": "4421" + }, + "Imp\u00f4ts et taxes pour les collectivit\u00e9s publiques": { + "account_number": "4422" + }, + "Imp\u00f4ts et taxes recouvrables sur des obligataires": { + "account_number": "4423" + }, + "Imp\u00f4ts et taxes recouvrables sur des associ\u00e9s": { + "account_number": "4424" + }, + "Droits de douane": { + "account_number": "4426" + }, + "Autres imp\u00f4ts et taxes": { + "account_number": "4428" + }, + "account_number": "442" + }, + "\u00c9tat, TVA due ou cr\u00e9dit de TVA": { + "\u00c9tat, TVA due": { + "account_number": "4441" + }, + "\u00c9tat, cr\u00e9dit de TVA \u00e0 reporter": { + "account_number": "4449" + }, + "account_number": "444" + }, + "\u00c9tat, autres taxes sur le chiffre d\u2019affaires": { + "account_number": "446" + }, + "\u00c9tat, imp\u00f4ts retenus \u00e0 la source": { + "Imp\u00f4t G\u00e9n\u00e9ral sur le revenu": { + "account_number": "4471" + }, + "Imp\u00f4ts sur salaires": { + "account_number": "4472" + }, + "Contribution nationale": { + "account_number": "4473" + }, + "Contribution nationale de solidarit\u00e9": { + "account_number": "4474" + }, + "Autres imp\u00f4ts et contributions": { + "account_number": "4478" + }, + "account_number": "447" + } + }, + "46-Apporteurs, associ\u00e9s et groupe (PASSIF)": { + "461-Apporteurs, op\u00e9rations sur le capital (PASSIF)": { + "Apporteurs, apports en nature": { + "account_number": "4611" + }, + "Apporteurs, apports en num\u00e9raire": { + "account_number": "4612" + }, + "Apporteurs, versements re\u00e7us sur augmentation de capital": { + "account_number": "4615" + }, + "Apporteurs, versements anticip\u00e9s": { + "account_number": "4616" + }, + "Apporteurs d\u00e9faillants": { + "account_number": "4617" + }, + "Apporteurs, capital \u00e0 rembourser": { + "account_number": "4619" + } + }, + "462-Associ\u00e9s, comptes courants": { + "Principal": { + "account_number": "4621" + }, + "Int\u00e9r\u00eats courus": { + "account_number": "4626" + } + }, + "463-Associ\u00e9s, op\u00e9rations faites en commun et GIE": { + "Op\u00e9rations courantes": { + "account_number": "4631" + }, + "Int\u00e9r\u00eats courus": { + "account_number": "4636" + } + }, + "Associ\u00e9s, dividendes \u00e0 payer": { + "account_number": "465" + }, + "Groupe, comptes courants": { + "account_number": "466" + } + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (PASSIF)": { + "471-D\u00e9biteurs et cr\u00e9diteurs divers": { + "D\u00e9biteurs divers": { + "account_number": "4711" + }, + "Cr\u00e9diteurs divers": { + "account_number": "4712" + }, + "Obligataires": { + "account_number": "4713" + }, + "R\u00e9mun\u00e9rations d\u2019administrateurs": { + "account_number": "4715" + }, + "Compte d\u2019affacturage": { + "account_number": "4716" + }, + "D\u00e9biteurs divers retenues de garantie": { + "account_number": "4717" + }, + "Apport, compte de fusion et op\u00e9rations assimil\u00e9es": { + "account_number": "4718" + }, + "Bons de souscription d\u2019actions et d\u2019obligations": { + "account_number": "4719" + } + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits (PASSIF)": { + "Compte de r\u00e9partition p\u00e9riodique des charges": { + "account_number": "4746" + } + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA (PASSIF)": { + "Compte passif": { + "account_number": "4752" + } + }, + "Produits constat\u00e9s d\u2019avance": { + "account_number": "477" + }, + "479-\u00c9carts de conversion passif": { + "Augmentation des cr\u00e9ances d\u2019exploitation": { + "account_number": "4791" + }, + "Augmentation des cr\u00e9ances financi\u00e8res": { + "account_number": "4792" + }, + "Diminution des dettes d\u2019exploitation": { + "account_number": "4793" + }, + "Diminution des dettes financi\u00e8res": { + "account_number": "4794" + }, + "Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": { + "account_number": "4797" + }, + "Diff\u00e9rences compens\u00e9es par couverture de change": { + "account_number": "4798" + } + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (HAO) (PASSIF)": { + "Fournisseurs d\u2019investissements": { + "Immobilisations incorporelles": { + "account_number": "4811" + }, + "Immobilisations corporelles": { + "account_number": "4812" + }, + "Versements restant \u00e0 effectuer sur titres de participation et titres immobilis\u00e9s non lib\u00e9r\u00e9s": { + "account_number": "4813" + }, + "R\u00e9serve de propri\u00e9t\u00e9": { + "account_number": "4816" + }, + "Retenues de garantie": { + "account_number": "4817" + }, + "Factures non parvenues": { + "account_number": "4818" + }, + "account_number": "481" + }, + "Fournisseurs d\u2019investissements, effets \u00e0 payer": { + "Immobilisations incorporelles": { + "account_number": "4821" + }, + "Immobilisations corporelles": { + "account_number": "4822" + }, + "account_number": "482" + }, + "Autres dettes hors activit\u00e9s ordinaires (HAO)": { + "Produits": { + "account_number": "4887" + }, + "account_number": "484" + } + }, + "root_type": "Liability" + }, + "Comptes de tr\u00e9sorerie": { + "Titres de placement": { + "Titres du tr\u00e9sor et bons de caisse \u00e0 court terme": { + "Titres du Tr\u00e9sor \u00e0 court terme": { + "account_number": "5011" + }, + "Titres d\u2019organismes financiers": { + "account_number": "5012" + }, + "Bons de caisse \u00e0 court terme": { + "account_number": "5013" + }, + "Frais d\u2019acquisition des titres de tr\u00e9sor et bons de caisse": { + "account_number": "5016" + }, + "account_number": "501" + }, + "Actions": { + "Actions ou parts propres": { + "account_number": "5021" + }, + "Actions cot\u00e9es": { + "account_number": "5022" + }, + "Actions non cot\u00e9es": { + "account_number": "5023" + }, + "Actions d\u00e9membr\u00e9es (certificats d\u2019investissement, droits de vote)": { + "account_number": "5024" + }, + "Autres actions": { + "account_number": "5025" + }, + "Frais d\u2019acquisition des actions": { + "account_number": "5026" + }, + "account_number": "502" + }, + "Obligations": { + "Obligations \u00e9mises par la soci\u00e9t\u00e9 et rachet\u00e9es par elle": { + "account_number": "5031" + }, + "Obligations cot\u00e9es": { + "account_number": "5032" + }, + "Obligations non cot\u00e9es": { + "account_number": "5033" + }, + "Autres obligations": { + "account_number": "5035" + }, + "Frais d\u2019acquisition des obligations": { + "account_number": "5036" + }, + "account_number": "503" + }, + "Bons de souscription": { + "Bons de souscription d\u2019actions": { + "account_number": "5042" + }, + "Bons de souscription d\u2019obligations": { + "account_number": "5043" + }, + "account_number": "504" + }, + "Titres n\u00e9gociables hors r\u00e9gion": { + "account_number": "505" + }, + "Int\u00e9r\u00eats courus": { + "Titres du Tr\u00e9sor et bons de caisse \u00e0 court terme": { + "account_number": "5061" + }, + "Actions": { + "account_number": "5062" + }, + "Obligations": { + "account_number": "5063" + }, + "account_number": "506" + }, + "Autres titres de placement et cr\u00e9ances assimil\u00e9es": { + "account_number": "508" + }, + "account_number": "50" + }, + "Valeurs \u00e0 encaisser": { + "Effets \u00e0 encaisser": { + "account_number": "511" + }, + "Effets \u00e0 l\u2019encaissement": { + "account_number": "512" + }, + "Ch\u00e8ques \u00e0 encaisser": { + "account_number": "513" + }, + "Ch\u00e8ques \u00e0 l\u2019encaissement": { + "account_number": "514" + }, + "Cartes de cr\u00e9dit \u00e0 encaisser": { + "account_number": "515" + }, + "Autres valeurs \u00e0 l\u2019encaissement": { + "Warrants": { + "account_number": "5181" + }, + "Billets de fonds": { + "account_number": "5182" + }, + "Ch\u00e8ques de voyage": { + "account_number": "5185" + }, + "Coupons \u00e9chus": { + "account_number": "5186" + }, + "Int\u00e9r\u00eats \u00e9chus des obligations": { + "account_number": "5187" + }, + "account_number": "518" + }, + "account_number": "51" + }, + "Banques": { + "Banques locales": { + "Banques en monnaie nationale": { + "account_type": "Bank", + "account_number": "5211" + }, + "Banques en devises": { + "account_type": "Bank", + "account_number": "5215" + }, + "account_type": "Bank", + "account_number": "521" + }, + "Banques autres \u00c9tats r\u00e9gion": { + "account_number": "522" + }, + "Banques autres \u00c9tats zone mon\u00e9taire": { + "account_number": "523" + }, + "Banques hors zone mon\u00e9taire": { + "account_number": "524" + }, + "Banques d\u00e9p\u00f4t \u00e0 terme": { + "account_number": "525" + }, + "Banques, int\u00e9r\u00eats courus": { + "Banque, int\u00e9r\u00eats courus, charges \u00e0 payer": { + "account_number": "5261" + }, + "Banque, int\u00e9r\u00eats courus, produits \u00e0 recevoir": { + "account_number": "5267" + }, + "account_number": "526" + }, + "account_number": "52" + }, + "\u00c9tablissements financiers et assimil\u00e9s": { + "Ch\u00e8ques postaux": { + "account_number": "531" + }, + "Tr\u00e9sor": { + "account_number": "532" + }, + "Soci\u00e9t\u00e9s de gestion et d\u2019interm\u00e9diation (SGI)": { + "account_number": "533" + }, + "\u00c9tablissements financiers, int\u00e9r\u00eats courus": { + "account_number": "536" + }, + "Autres organismes financiers": { + "account_number": "538" + }, + "account_number": "53" + }, + "Instruments de tr\u00e9sorerie": { + "Options de taux d\u2019int\u00e9r\u00eat": { + "account_number": "541" + }, + "Options de taux de change": { + "account_number": "542" + }, + "Options de taux boursiers": { + "account_number": "543" + }, + "Instruments de march\u00e9s \u00e0 terme": { + "account_number": "544" + }, + "Avoirs d\u2019or et autres m\u00e9taux pr\u00e9cieux": { + "account_number": "545" + }, + "account_number": "54" + }, + "Instruments de monnaie \u00e9lectronique": { + "Monnaie \u00e9lectronique carte carburant": { + "account_number": "551" + }, + "Monnaie \u00e9lectronique t\u00e9l\u00e9phone portable": { + "account_number": "552" + }, + "Monnaie \u00e9lectronique carte p\u00e9age": { + "account_number": "553" + }, + "Porte-monnaie \u00e9lectronique": { + "account_number": "554" + }, + "Autres instruments de monnaies \u00e9lectroniques": { + "account_number": "558" + }, + "account_number": "55" + }, + "Banques, cr\u00e9dits de tr\u00e9sorerie et d\u2019escompte": { + "Cr\u00e9dits de tr\u00e9sorerie": { + "account_number": "561" + }, + "Escompte de cr\u00e9dits de campagne": { + "account_number": "564" + }, + "Escompte de cr\u00e9dits ordinaires": { + "account_number": "565" + }, + "Banques, cr\u00e9dits de tr\u00e9sorerie, int\u00e9r\u00eats courus": { + "account_number": "566" + }, + "account_number": "56" + }, + "Caisse": { + "Caisse si\u00e8ge social": { + "Caisse en monnaie nationale": { + "account_number": "5711" + }, + "Caisse en devises": { + "account_number": "5712" + }, + "account_number": "571" + }, + "Caisse succursale A": { + "En monnaie nationale": { + "account_number": "5721" + }, + "En devises": { + "account_number": "5722" + }, + "account_number": "572" + }, + "Caisse succursale B": { + "En monnaie nationale": { + "account_number": "5731" + }, + "En devises": { + "account_number": "5732" + }, + "account_number": "573" + }, + "account_number": "57" + }, + "R\u00e9gies d\u2019avances, accr\u00e9ditifs et virements internes": { + "R\u00e9gies d\u2019avance": { + "account_number": "581" + }, + "Accr\u00e9ditifs": { + "account_number": "582" + }, + "Virements de fonds": { + "account_number": "585" + }, + "Autres virements internes": { + "account_number": "588" + }, + "account_number": "58" + }, + "D\u00e9pr\u00e9ciations et provisions pour risque \u00e0 court terme": { + "D\u00e9pr\u00e9ciations des titres de placement": { + "account_number": "590" + }, + "D\u00e9pr\u00e9ciations des titres et valeurs \u00e0 encaisser": { + "account_number": "591" + }, + "D\u00e9pr\u00e9ciations des comptes banques": { + "account_number": "592" + }, + "D\u00e9pr\u00e9ciations des comptes \u00e9tablissements financiers et assimil\u00e9s": { + "account_number": "593" + }, + "D\u00e9pr\u00e9ciations des comptes d\u2019instruments de tr\u00e9sorerie": { + "account_number": "594" + }, + "Provisions pour risque \u00e0 court terme \u00e0 caract\u00e8re financier": { + "account_number": "599" + }, + "account_number": "59" + }, + "root_type": "Asset", + "account_number": "5" + }, + "Comptes de charges des activit\u00e9s ordinaires": { + "Achats et variations de stocks": { + "Achats de marchandises": { + "Dans la R\u00e9gion": { + "account_number": "6011" + }, + "Hors R\u00e9gion": { + "account_number": "6012" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "6013" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "6014" + }, + "Frais sur achats": { + "account_number": "6015" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6019" + }, + "account_number": "601" + }, + "Achats de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "Dans la R\u00e9gion": { + "account_number": "6021" + }, + "Hors R\u00e9gion": { + "account_number": "6022" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "6023" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "6024" + }, + "Frais sur achats": { + "account_number": "6025" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6029" + }, + "account_number": "602" + }, + "Variations des stocks de biens achet\u00e9s": { + "Variations des stocks de marchandises": { + "account_number": "6031" + }, + "Variations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "account_number": "6032" + }, + "Variations des stocks d\u2019autres approvisionnements": { + "account_number": "6033" + }, + "account_number": "603" + }, + "Achats stock\u00e9s de mati\u00e8res et fournitures consommables": { + "Mati\u00e8res consommables": { + "account_number": "6041" + }, + "Mati\u00e8res combustibles": { + "account_number": "6042" + }, + "Produits d\u2019entretien": { + "account_number": "6043" + }, + "Fournitures d\u2019atelier et d\u2019usine": { + "account_number": "6044" + }, + "Frais sur achat": { + "account_number": "6045" + }, + "Fournitures de magasin": { + "account_number": "6046" + }, + "Fournitures de bureau": { + "account_number": "6047" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6049" + }, + "account_number": "604" + }, + "Autres achats": { + "Fournitures non stockables Eau": { + "account_number": "6051" + }, + "Fournitures non stockables \u00c9lectricit\u00e9": { + "account_number": "6052" + }, + "Fournitures non stockables Autres \u00e9nergies": { + "account_number": "6053" + }, + "Fournitures d\u2019entretien non stockables": { + "account_number": "6054" + }, + "Fournitures de bureau non stockables": { + "account_number": "6055" + }, + "Achats de petit mat\u00e9riel et outillage": { + "account_number": "6056" + }, + "Achats d\u2019\u00e9tudes et prestations de services": { + "account_number": "6057" + }, + "Achats de travaux, mat\u00e9riels et \u00e9quipements": { + "account_number": "6058" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6059" + }, + "account_number": "605" + }, + "Achats d\u2019emballages": { + "Emballages perdus": { + "account_number": "6081" + }, + "Emballages r\u00e9cup\u00e9rables non identifiables": { + "account_number": "6082" + }, + "Emballages \u00e0 usage mixte": { + "account_number": "6083" + }, + "Frais sur achats": { + "account_number": "6085" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6089" + }, + "account_number": "608" + }, + "account_number": "60" + }, + "Transports": { + "Transports sur ventes": { + "account_number": "612" + }, + "Transports pour le compte de tiers": { + "account_number": "613" + }, + "Transports du personnel": { + "account_number": "614" + }, + "Transports de plis": { + "account_number": "616" + }, + "Autres frais de transport": { + "Voyages et d\u00e9placements": { + "account_number": "6181" + }, + "Transports entre \u00e9tablissements ou chantiers": { + "account_number": "6182" + }, + "Transports administratifs": { + "account_number": "6183" + }, + "account_number": "618" + }, + "account_number": "61" + }, + "Services ext\u00e9rieurs": { + "Sous-traitance g\u00e9n\u00e9rale": { + "account_number": "621" + }, + "Locations, charges locatives": { + "Locations de terrains": { + "account_number": "6221" + }, + "Locations de b\u00e2timents": { + "account_number": "6222" + }, + "Locations de mat\u00e9riels et outillages": { + "account_number": "6223" + }, + "Malis sur emballages": { + "account_number": "6224" + }, + "Locations d\u2019emballages": { + "account_number": "6225" + }, + "Fermages et loyers du foncier": { + "account_number": "6226" + }, + "Locations et charges locatives diverses": { + "account_number": "6228" + }, + "account_number": "622" + }, + "Redevances de location acquisition": { + "Cr\u00e9dit-bail immobilier": { + "account_number": "6232" + }, + "Cr\u00e9dit-bail mobilier": { + "account_number": "6233" + }, + "Location-vente": { + "account_number": "6234" + }, + "Autres contrats de location acquisition": { + "account_number": "6238" + }, + "account_number": "623" + }, + "Entretien, r\u00e9parations, remise en \u00e9tat et maintenance": { + "Entretien et r\u00e9parations des biens immobiliers": { + "account_number": "6241" + }, + "Entretien et r\u00e9parations des biens mobiliers": { + "account_number": "6242" + }, + "Maintenance": { + "account_number": "6243" + }, + "Charges de d\u00e9mant\u00e8lement et remise en \u00e9tat": { + "account_number": "6244" + }, + "Autres entretiens et r\u00e9parations": { + "account_number": "6248" + }, + "account_number": "624" + }, + "Primes d\u2019assurance": { + "Assurances multirisques": { + "account_number": "6251" + }, + "Assurances mat\u00e9riel de transport": { + "account_number": "6252" + }, + "Assurances risques d\u2019exploitation": { + "account_number": "6253" + }, + "Assurances responsabilit\u00e9 du producteur": { + "account_number": "6254" + }, + "Assurances insolvabilit\u00e9 clients": { + "account_number": "6255" + }, + "Assurances transport sur ventes": { + "account_number": "6257" + }, + "Autres primes d\u2019assurances": { + "account_number": "6258" + }, + "account_number": "625" + }, + "\u00c9tudes, recherches et documentation": { + "\u00c9tudes et recherches": { + "account_number": "6261" + }, + "Documentation g\u00e9n\u00e9rale": { + "account_number": "6265" + }, + "Documentation technique": { + "account_number": "6266" + }, + "account_number": "626" + }, + "Publicit\u00e9, publications, relations publiques": { + "Annonces, insertions": { + "account_number": "6271" + }, + "Catalogues, imprim\u00e9s publicitaires": { + "account_number": "6272" + }, + "\u00c9chantillons": { + "account_number": "6273" + }, + "Foires et expositions": { + "account_number": "6274" + }, + "Publications": { + "account_number": "6275" + }, + "Cadeaux \u00e0 la client\u00e8le": { + "account_number": "6276" + }, + "Frais de colloques, s\u00e9minaires, conf\u00e9rences": { + "account_number": "6277" + }, + "Autres charges de publicit\u00e9 et relations publiques": { + "account_number": "6278" + }, + "account_number": "627" + }, + "Frais de t\u00e9l\u00e9communications": { + "Frais de t\u00e9l\u00e9phone": { + "account_number": "6281" + }, + "Frais de t\u00e9lex": { + "account_number": "6282" + }, + "Frais de t\u00e9l\u00e9copie": { + "account_number": "6283" + }, + "Autres frais de t\u00e9l\u00e9communications": { + "account_number": "6288" + }, + "account_number": "628" + }, + "account_number": "62" + }, + "Autres services ext\u00e9rieurs": { + "Frais bancaires": { + "Frais sur titres (vente, garde)": { + "account_number": "6311" + }, + "Frais sur effets": { + "account_number": "6312" + }, + "Location de coffres": { + "account_number": "6313" + }, + "Commissions d\u2019affacturage": { + "account_number": "6314" + }, + "Commissions sur cartes de cr\u00e9dit": { + "account_number": "6315" + }, + "Frais d\u2019\u00e9mission d\u2019emprunts": { + "account_number": "6316" + }, + "Frais sur instruments monnaie \u00e9lectronique": { + "account_number": "6317" + }, + "Autres frais bancaires": { + "account_number": "6318" + }, + "account_number": "631" + }, + "R\u00e9mun\u00e9rations d\u2019interm\u00e9diaires et de conseils": { + "Commissions et courtages sur ventes": { + "account_number": "6322" + }, + "Honoraires des professions r\u00e9glement\u00e9es": { + "account_number": "6324" + }, + "Frais d\u2019actes et de contentieux": { + "account_number": "6325" + }, + "R\u00e9mun\u00e9rations d\u2019affacturage": { + "account_number": "6326" + }, + "R\u00e9mun\u00e9rations des autres prestataires de services": { + "account_number": "6327" + }, + "Divers frais": { + "account_number": "6328" + }, + "account_number": "632" + }, + "Frais de formation du personnel": { + "account_number": "633" + }, + "Redevances pour brevets, licences, logiciels, concessions et droits et valeurs similaires": { + "Redevances pour brevets, licences": { + "account_number": "6342" + }, + "Redevances pour logiciels": { + "account_number": "6343" + }, + "Redevances pour marques": { + "account_number": "6344" + }, + "Redevances pour sites internet": { + "account_number": "6345" + }, + "Redevances pour concessions, droits et valeurs similaires": { + "account_number": "6346" + }, + "account_number": "634" + }, + "Cotisations": { + "Cotisations": { + "account_number": "6351" + }, + "Concours divers": { + "account_number": "6358" + }, + "account_number": "635" + }, + "R\u00e9mun\u00e9rations de personnel ext\u00e9rieur \u00e0 l\u2019entit\u00e9": { + "Personnel int\u00e9rimaire": { + "account_number": "6371" + }, + "Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": { + "account_number": "6372" + }, + "account_number": "637" + }, + "Autres charges externes": { + "Frais de recrutement du personnel": { + "account_number": "6381" + }, + "Frais de d\u00e9m\u00e9nagement": { + "account_number": "6382" + }, + "R\u00e9ceptions": { + "account_number": "6383" + }, + "Missions": { + "account_number": "6384" + }, + "Charges de copropri\u00e9t\u00e9": { + "account_number": "6385" + }, + "account_number": "638" + }, + "account_number": "63" + }, + "Imp\u00f4ts et taxes": { + "Imp\u00f4ts et taxes directs": { + "Imp\u00f4ts fonciers et taxes annexes": { + "account_number": "6411" + }, + "Patentes, licences et taxes annexes": { + "account_number": "6412" + }, + "Taxes sur appointements et salaires": { + "account_number": "6413" + }, + "Taxes d\u2019apprentissage": { + "account_number": "6414" + }, + "Formation professionnelle continue": { + "account_number": "6415" + }, + "Autres imp\u00f4ts et taxes directs": { + "account_number": "6418" + }, + "account_number": "641" + }, + "Imp\u00f4ts et taxes indirects": { + "account_number": "645" + }, + "Droits d\u2019enregistrement": { + "Droits de mutation": { + "account_number": "6461" + }, + "Droits de timbre": { + "account_number": "6462" + }, + "Taxes sur les v\u00e9hicules de soci\u00e9t\u00e9": { + "account_number": "6463" + }, + "Vignettes": { + "account_number": "6464" + }, + "Autres droits": { + "account_number": "6468" + }, + "account_number": "646" + }, + "P\u00e9nalit\u00e9s, amendes fiscales": { + "P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts directs": { + "account_number": "6471" + }, + "P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts indirects": { + "account_number": "6472" + }, + "P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts directs": { + "account_number": "6473" + }, + "P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts indirects": { + "account_number": "6474" + }, + "Autres p\u00e9nalit\u00e9s et amendes fiscales": { + "account_number": "6478" + }, + "account_number": "647" + }, + "Autres imp\u00f4ts et taxes": { + "account_number": "648" + }, + "account_number": "64" + }, + "Autres charges": { + "Pertes sur cr\u00e9ances clients et autres d\u00e9biteurs": { + "Clients": { + "account_number": "6511" + }, + "Autres d\u00e9biteurs": { + "account_number": "6515" + }, + "account_number": "651" + }, + "Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "Quote-part transf\u00e9r\u00e9e de b\u00e9n\u00e9fices (comptabilit\u00e9 du g\u00e9rant)": { + "account_number": "6521" + }, + "Pertes imput\u00e9es par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": { + "account_number": "6525" + }, + "account_number": "652" + }, + "Valeurs comptables des cessions courantes d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "6541" + }, + "Immobilisations corporelles": { + "account_number": "6542" + }, + "account_number": "654" + }, + "Perte de change sur cr\u00e9ances et dettes commerciale": { + "account_number": "656" + }, + "P\u00e9nalit\u00e9s et amendes p\u00e9nales": { + "account_number": "657" + }, + "Charges diverses": { + "Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": { + "account_number": "6581" + }, + "Dons": { + "account_number": "6582" + }, + "M\u00e9c\u00e9nat": { + "account_number": "6583" + }, + "Autres charges diverses": { + "account_number": "6588" + }, + "account_number": "658" + }, + "Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "Sur risques \u00e0 court terme": { + "account_number": "6591" + }, + "Sur stocks": { + "account_number": "6593" + }, + "Sur cr\u00e9ances": { + "account_number": "6594" + }, + "Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme": { + "account_number": "6598" + }, + "account_number": "659" + }, + "account_number": "65" + }, + "Charges de personnel": { + "R\u00e9mun\u00e9rations directes vers\u00e9es au personnel national": { + "Appointements salaires et commissions": { + "account_number": "6611" + }, + "Primes et gratifications": { + "account_number": "6612" + }, + "Cong\u00e9s pay\u00e9s": { + "account_number": "6613" + }, + "Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": { + "account_number": "6614" + }, + "Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": { + "account_number": "6615" + }, + "Suppl\u00e9ment familial": { + "account_number": "6616" + }, + "Avantages en nature": { + "account_number": "6617" + }, + "Autres r\u00e9mun\u00e9rations directes": { + "account_number": "6618" + }, + "account_number": "661" + }, + "R\u00e9mun\u00e9rations directes vers\u00e9es au personnel non national": { + "Appointements salaires et commissions": { + "account_number": "6621" + }, + "Primes et gratifications": { + "account_number": "6622" + }, + "Cong\u00e9s pay\u00e9s": { + "account_number": "6623" + }, + "Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": { + "account_number": "6624" + }, + "Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": { + "account_number": "6625" + }, + "Suppl\u00e9ment familial": { + "account_number": "6626" + }, + "Avantages en nature": { + "account_number": "6627" + }, + "Autres r\u00e9mun\u00e9rations directes": { + "account_number": "6628" + }, + "account_number": "662" + }, + "Indemnit\u00e9s forfaitaires vers\u00e9es au personnel": { + "Indemnit\u00e9s de logement": { + "account_number": "6631" + }, + "Indemnit\u00e9s de repr\u00e9sentation": { + "account_number": "6632" + }, + "Indemnit\u00e9s d\u2019expatriation": { + "account_number": "6633" + }, + "Indemnit\u00e9s de transport": { + "account_number": "6634" + }, + "Autres indemnit\u00e9s et avantages divers": { + "account_number": "6638" + }, + "account_number": "663" + }, + "Charges sociales": { + "Charges sociales sur r\u00e9mun\u00e9ration du personnel national": { + "account_number": "6641" + }, + "Charges sociales sur r\u00e9mun\u00e9ration du personnel non national": { + "account_number": "6642" + }, + "account_number": "664" + }, + "R\u00e9mun\u00e9rations et charges sociales de l\u2019exploitant individuel": { + "R\u00e9mun\u00e9ration du travail de l\u2019exploitant": { + "account_number": "6661" + }, + "Charges sociales": { + "account_number": "6662" + }, + "account_number": "666" + }, + "R\u00e9mun\u00e9ration transf\u00e9r\u00e9e de personnel ext\u00e9rieur": { + "Personnel int\u00e9rimaire": { + "account_number": "6671" + }, + "Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": { + "account_number": "6672" + }, + "account_number": "667" + }, + "Autres charges sociales": { + "Versements aux syndicats et comit\u00e9s d\u2019entreprise, d\u2019\u00e9tablissement": { + "account_number": "6681" + }, + "Versements aux comit\u00e9s d\u2019hygi\u00e8ne et de s\u00e9curit\u00e9": { + "account_number": "6682" + }, + "Versements et contributions aux autres \u0153uvres sociales": { + "account_number": "6683" + }, + "M\u00e9decine du travail et pharmacie": { + "account_number": "6684" + }, + "Assurances et organismes de sant\u00e9": { + "account_number": "6685" + }, + "Assurances retraite et fonds de pension": { + "account_number": "6686" + }, + "Majorations et p\u00e9nalit\u00e9s sociales": { + "account_number": "6687" + }, + "Charges sociales diverses": { + "account_number": "6688" + }, + "account_number": "668" + }, + "account_number": "66" + }, + "Frais financiers et charges assimil\u00e9es": { + "Int\u00e9r\u00eats des emprunts": { + "Emprunts obligataires": { + "account_number": "6711" + }, + "Emprunts aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": { + "account_number": "6712" + }, + "Dettes li\u00e9es \u00e0 des participations": { + "account_number": "6713" + }, + "Primes de remboursement des obligations": { + "account_number": "6714" + }, + "account_number": "671" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition": { + "Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail immobilier": { + "account_number": "6722" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail mobilier": { + "account_number": "6723" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition / location-vente": { + "account_number": "6724" + }, + "Int\u00e9r\u00eats dans loyers des autres locations acquisition": { + "account_number": "6728" + }, + "account_number": "672" + }, + "Escomptes accord\u00e9s": { + "account_number": "673" + }, + "Autres int\u00e9r\u00eats": { + "Avances re\u00e7ues et d\u00e9p\u00f4ts cr\u00e9diteurs": { + "account_number": "6741" + }, + "Comptes courants bloqu\u00e9s": { + "account_number": "6742" + }, + "Int\u00e9r\u00eats sur obligations cautionn\u00e9es": { + "account_number": "6743" + }, + "Int\u00e9r\u00eats sur dettes commerciales": { + "account_number": "6744" + }, + "Int\u00e9r\u00eats bancaires et sur op\u00e9rations de financement (escompte...)": { + "account_number": "6745" + }, + "Int\u00e9r\u00eats sur dettes diverses": { + "account_number": "6748" + }, + "account_number": "674" + }, + "Escomptes des effets de commerce": { + "account_number": "675" + }, + "Pertes de change financi\u00e8res": { + "account_number": "676" + }, + "Pertes sur titres de placement": { + "Pertes sur cessions de titres de placement": { + "account_number": "6771" + }, + "Mali provenant d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": { + "account_number": "6772" + }, + "account_number": "677" + }, + "Pertes et charges sur risques financiers": { + "Sur rentes viag\u00e8res": { + "account_number": "6781" + }, + "Sur op\u00e9rations financi\u00e8res": { + "account_number": "6782" + }, + "Sur instruments de tr\u00e9sorerie": { + "account_number": "6784" + }, + "account_number": "678" + }, + "Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "Sur risques financiers": { + "account_number": "6791" + }, + "Sur titres de placement": { + "account_number": "6795" + }, + "Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "account_number": "6798" + }, + "account_number": "679" + }, + "account_number": "67" + }, + "Dotations aux amortissements": { + "Dotations aux amortissements d\u2019exploitation": { + "Dotations aux amortissements des immobilisations incorporelles": { + "account_number": "6812" + }, + "Dotations aux amortissements des immobilisations corporelles": { + "account_number": "6813" + }, + "account_number": "681" + }, + "account_number": "68" + }, + "Dotations aux provisions et aux d\u00e9pr\u00e9ciations": { + "Dotations aux provisions et aux d\u00e9pr\u00e9ciations d\u2019exploitation": { + "Dotations aux provisions pour risques et charges": { + "account_number": "6911" + }, + "Dotations aux d\u00e9pr\u00e9ciations des immobilisations incorporelles": { + "account_number": "6913" + }, + "Dotations aux d\u00e9pr\u00e9ciations des immobilisations corporelles": { + "account_number": "6914" + }, + "account_number": "691" + }, + "Dotations aux provisions et aux d\u00e9pr\u00e9ciations financi\u00e8res": { + "Dotations aux provisions pour risques et charges": { + "account_number": "6971" + }, + "Dotations aux d\u00e9pr\u00e9ciations des immobilisations financi\u00e8res": { + "account_number": "6972" + }, + "account_number": "697" + }, + "account_number": "69" + }, + "root_type": "Expense", + "account_number": "6" + }, + "Comptes de produits des activit\u00e9s ordinaires": { + "Ventes": { + "Ventes de marchandises": { + "Dans la R\u00e9gion": { + "account_number": "7011" + }, + "Hors R\u00e9gion": { + "account_number": "7012" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7013" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7014" + }, + "Sur internet": { + "account_number": "7015" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7019" + }, + "account_number": "701" + }, + "Ventes de produits finis": { + "Dans la R\u00e9gion": { + "account_number": "7021" + }, + "Hors R\u00e9gion": { + "account_number": "7022" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7023" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7024" + }, + "Sur internet": { + "account_number": "7025" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7029" + }, + "account_number": "702" + }, + "Ventes de produits interm\u00e9diaires": { + "Dans la R\u00e9gion": { + "account_number": "7031" + }, + "Hors R\u00e9gion": { + "account_number": "7032" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7033" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7034" + }, + "Sur internet": { + "account_number": "7035" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7039" + }, + "account_number": "703" + }, + "Ventes de produits r\u00e9siduels": { + "Dans la R\u00e9gion": { + "account_number": "7041" + }, + "Hors R\u00e9gion": { + "account_number": "7042" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7043" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7044" + }, + "Sur internet": { + "account_number": "7045" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7049" + }, + "account_number": "704" + }, + "Travaux factur\u00e9s": { + "Dans la R\u00e9gion": { + "account_number": "7051" + }, + "Hors R\u00e9gion": { + "account_number": "7052" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7053" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7054" + }, + "Sur internet": { + "account_number": "7055" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7059" + }, + "account_number": "705" + }, + "Services vendus": { + "Dans la R\u00e9gion": { + "account_number": "7061" + }, + "Hors R\u00e9gion": { + "account_number": "7062" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7063" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7064" + }, + "Sur internet": { + "account_number": "7065" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7069" + }, + "account_number": "706" + }, + "Produits accessoires": { + "Ports, emballages perdus et autres frais factur\u00e9s": { + "account_number": "7071" + }, + "Commissions et courtages": { + "account_number": "7072" + }, + "Locations": { + "account_number": "7073" + }, + "Bonis sur reprises et cessions d\u2019emballages": { + "account_number": "7074" + }, + "Mise \u00e0 disposition de personnel": { + "account_number": "7075" + }, + "Redevances pour brevets, logiciels, marques et droits similaires": { + "account_number": "7076" + }, + "Services exploit\u00e9s dans l\u2019int\u00e9r\u00eat du personnel": { + "account_number": "7077" + }, + "Autres produits accessoires": { + "account_number": "7078" + }, + "account_number": "707" + }, + "account_number": "70" + }, + "Subventions d\u2019exploitation": { + "Sur produits \u00e0 l\u2019exportation": { + "account_number": "711" + }, + "Sur produits \u00e0 l\u2019importation": { + "account_number": "712" + }, + "Sur produits de p\u00e9r\u00e9quation": { + "account_number": "713" + }, + "Indemnit\u00e9s et subventions d\u2019exploitation (entit\u00e9 agricole)": { + "account_number": "714" + }, + "Autres subventions d\u2019exploitation": { + "Vers\u00e9es par l\u2019\u00c9tat et les collectivit\u00e9s publiques": { + "account_number": "7181" + }, + "Vers\u00e9es par les organismes internationaux": { + "account_number": "7182" + }, + "Vers\u00e9es par des tiers": { + "account_number": "7183" + }, + "account_number": "718" + }, + "account_number": "71" + }, + "Production immobilis\u00e9e": { + "Immobilisations incorporelles": { + "account_number": "721" + }, + "Immobilisations corporelles": { + "Immobilisations corporelles (hors actifs biologiques)": { + "account_number": "7221" + }, + "Immobilisations corporelles (actifs biologiques)": { + "account_number": "7222" + }, + "account_number": "722" + }, + "Production auto-consomm\u00e9e": { + "account_number": "724" + }, + "Immobilisations financi\u00e8res": { + "account_number": "726" + }, + "account_number": "72" + }, + "Variations des stocks de biens et de services produits": { + "Variations des stocks de produits en cours": { + "Produits en cours": { + "account_number": "7341" + }, + "Travaux en cours": { + "account_number": "7342" + }, + "account_number": "734" + }, + "Variations des en-cours de services": { + "\u00c9tudes en cours": { + "account_number": "7351" + }, + "Prestations de services en cours": { + "account_number": "7352" + }, + "account_number": "735" + }, + "Variations des stocks de produits finis": { + "account_number": "736" + }, + "Variations des stocks de produits interm\u00e9diaires et r\u00e9siduels": { + "Produits interm\u00e9diaires": { + "account_number": "7371" + }, + "Produits r\u00e9siduels": { + "account_number": "7372" + }, + "account_number": "737" + }, + "account_number": "73" + }, + "Autres produits": { + "Profits sur cr\u00e9ances clients et autres d\u00e9biteurs": { + "account_number": "751" + }, + "Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "Quote-part transf\u00e9r\u00e9e de pertes (comptabilit\u00e9 du g\u00e9rant)": { + "account_number": "7521" + }, + "B\u00e9n\u00e9fices attribu\u00e9s par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": { + "account_number": "7525" + }, + "account_number": "752" + }, + "Produits des cessions courantes d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "7541" + }, + "Immobilisations corporelles": { + "account_number": "7542" + }, + "account_number": "754" + }, + "Gains de change sur cr\u00e9ances et dettes commerciales": { + "account_number": "756" + }, + "Produits divers": { + "Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": { + "account_number": "7581" + }, + "Indemnit\u00e9s d\u2019assurances re\u00e7ues": { + "account_number": "7582" + }, + "Autres produits divers": { + "account_number": "7588" + }, + "account_number": "758" + }, + "Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "Sur risques \u00e0 court terme": { + "account_number": "7591" + }, + "Sur stocks": { + "account_number": "7593" + }, + "Sur cr\u00e9ances": { + "account_number": "7594" + }, + "Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "account_number": "7598" + }, + "account_number": "759" + }, + "account_number": "75" + }, + "Revenus financiers et produits assimil\u00e9s": { + "Int\u00e9r\u00eats de pr\u00eats et cr\u00e9ances diverses": { + "Int\u00e9r\u00eats de pr\u00eats": { + "account_number": "7712" + }, + "Int\u00e9r\u00eats sur cr\u00e9ances diverses": { + "account_number": "7713" + }, + "account_number": "771" + }, + "Revenus de participations et autres titres immobilis\u00e9s": { + "Revenus des titres de participation": { + "account_number": "7721" + }, + "Revenus autres titres immobilis\u00e9s": { + "account_number": "7722" + }, + "account_number": "772" + }, + "Escomptes obtenus": { + "account_number": "773" + }, + "Revenus de placement": { + "Revenus des obligations": { + "account_number": "7745" + }, + "Revenus des titres de placement": { + "account_number": "7746" + }, + "account_number": "774" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition": { + "account_number": "775" + }, + "Gains de change financiers": { + "account_number": "776" + }, + "Gains sur cessions de titres de placement": { + "account_number": "777" + }, + "Gains sur risques financiers": { + "Sur rentes viag\u00e8res": { + "account_number": "7781" + }, + "Sur op\u00e9rations financi\u00e8res": { + "account_number": "7782" + }, + "Sur instruments de tr\u00e9sorerie": { + "account_number": "7784" + }, + "account_number": "778" + }, + "Reprises de charges pour d\u00e9pr\u00e9ciations et provisions \u00e0 court terme financi\u00e8res": { + "Sur risques financiers": { + "account_number": "7791" + }, + "Sur titres de placement": { + "account_number": "7795" + }, + "Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "account_number": "7798" + }, + "account_number": "779" + }, + "account_number": "77" + }, + "Transferts de charges": { + "Transferts de charges d\u2019exploitation": { + "account_number": "781" + }, + "Transferts de charges financi\u00e8res": { + "account_number": "787" + }, + "account_number": "78" + }, + "Reprises de provisions, de d\u00e9pr\u00e9ciations et autres": { + "Reprises de provisions et d\u00e9pr\u00e9ciations d\u2019exploitation": { + "Pour risques et charges": { + "account_number": "7911" + }, + "Des immobilisations incorporelles": { + "account_number": "7913" + }, + "Des immobilisations corporelles": { + "account_number": "7914" + }, + "account_number": "791" + }, + "Reprises de provisions et d\u00e9pr\u00e9ciations financi\u00e8res": { + "Pour risques et charges": { + "account_number": "7971" + }, + "Des immobilisations financi\u00e8res": { + "account_number": "7972" + }, + "account_number": "797" + }, + "Reprises d\u2019amortissements": { + "account_number": "798" + }, + "Reprises de subventions d\u2019investissement": { + "account_number": "799" + }, + "account_number": "79" + }, + "root_type": "Income", + "account_number": "7" + }, + "8-Comptes des autres charges et des autres produits (CHARGES)": { + "Valeurs comptables des cessions d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "811" + }, + "Immobilisations corporelles": { + "account_number": "812" + }, + "Immobilisations financi\u00e8res": { + "account_number": "816" + }, + "account_number": "81" + }, + "Charges hors activit\u00e9s ordinaires": { + "Charges HAO constat\u00e9es": { + "account_number": "831" + }, + "Charges li\u00e9es aux op\u00e9rations de restructuration": { + "account_number": "833" + }, + "Pertes sur cr\u00e9ances HAO": { + "account_number": "834" + }, + "Dons et lib\u00e9ralit\u00e9s accord\u00e9s": { + "account_number": "835" + }, + "Abandons de cr\u00e9ances consentis": { + "account_number": "836" + }, + "Charges li\u00e9es aux op\u00e9rations de liquidation": { + "account_number": "837" + }, + "Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": { + "account_number": "839" + }, + "account_number": "83" + }, + "Dotations hors activit\u00e9s ordinaires": { + "Dotations aux provisions r\u00e9glement\u00e9es": { + "account_number": "851" + }, + "Dotations aux amortissements HAO": { + "account_number": "852" + }, + "Dotations aux d\u00e9pr\u00e9ciations HAO": { + "account_number": "853" + }, + "Dotations aux provisions pour risques et charges HAO": { + "account_number": "854" + }, + "Autres dotations HAO": { + "account_number": "858" + }, + "account_number": "85" + }, + "Participation des travailleurs": { + "Participation l\u00e9gale aux b\u00e9n\u00e9fices": { + "account_number": "871" + }, + "Participation contractuelle aux b\u00e9n\u00e9fices": { + "account_number": "874" + }, + "Autres participations": { + "account_number": "878" + }, + "account_number": "87" + }, + "Imp\u00f4ts sur le r\u00e9sultat": { + "Imp\u00f4ts sur les b\u00e9n\u00e9fices de l\u2019exercice": { + "Activit\u00e9s exerc\u00e9es dans l\u2019\u00c9tat": { + "account_number": "8911" + }, + "Activit\u00e9s exerc\u00e9es dans les autres \u00c9tats de la R\u00e9gion": { + "account_number": "8912" + }, + "Activit\u00e9s exerc\u00e9es hors R\u00e9gion": { + "account_number": "8913" + }, + "account_number": "891" + }, + "Rappel d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": { + "account_number": "892" + }, + "Imp\u00f4t minimum forfaitaire IMF": { + "account_number": "895" + }, + "D\u00e9gr\u00e8vements et annulations d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": { + "D\u00e9gr\u00e8vements": { + "account_number": "8991" + }, + "Annulations pour pertes r\u00e9troactives": { + "account_number": "8994" + }, + "account_number": "899" + }, + "account_number": "89" + }, + "root_type": "Expense" + }, + "8-Comptes des autres charges et des autres produits (PRODUITS)": { + "Produits des cessions d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "821" + }, + "Immobilisations corporelles": { + "account_number": "822" + }, + "Immobilisations financi\u00e8res": { + "account_number": "826" + }, + "account_number": "82" + }, + "Produits hors activit\u00e9s ordinaires": { + "Produits HAO constat\u00e9s": { + "account_number": "841" + }, + "Produits li\u00e9s aux op\u00e9rations de restructuration": { + "account_number": "843" + }, + "Indemnit\u00e9s et subventions HAO (entit\u00e9 agricole)": { + "account_number": "844" + }, + "Dons et lib\u00e9ralit\u00e9s obtenus": { + "account_number": "845" + }, + "Abandons de cr\u00e9ances obtenus": { + "account_number": "846" + }, + "Produits li\u00e9s aux op\u00e9rations de liquidation": { + "account_number": "847" + }, + "Transferts de charges HAO": { + "account_number": "848" + }, + "Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": { + "account_number": "849" + }, + "account_number": "84" + }, + "Reprises de charges, provisions et d\u00e9pr\u00e9ciations HAO": { + "Reprises de provisions r\u00e9glement\u00e9es": { + "account_number": "861" + }, + "Reprises d\u2019amortissements HAO": { + "account_number": "862" + }, + "Reprises de d\u00e9pr\u00e9ciations HAO": { + "account_number": "863" + }, + "Reprises de provisions pour risques et charges HAO": { + "account_number": "864" + }, + "Autres reprises HAO": { + "account_number": "868" + }, + "account_number": "86" + }, + "Subventions d\u2019\u00e9quilibre": { + "\u00c9tat": { + "account_number": "881" + }, + "Collectivit\u00e9s publiques": { + "account_number": "884" + }, + "Groupe": { + "account_number": "886" + }, + "Autres": { + "account_number": "888" + }, + "account_number": "88" + }, + "root_type": "Income" + } + } +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/syscohada_chart_of_accounts.py b/erpnext/accounts/doctype/account/chart_of_accounts/verified/syscohada_chart_of_accounts.py new file mode 100644 index 00000000000..2bf52dde92e --- /dev/null +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/syscohada_chart_of_accounts.py @@ -0,0 +1,34 @@ +import json +from pathlib import Path + +syscohada_countries = [ + "bj", # Bénin + "bf", # Burkina-Faso + "cm", # Cameroun + "cf", # Centrafrique + "ci", # Côte d'Ivoire + "cg", # Congo + "km", # Comores + "ga", # Gabon + "gn", # Guinée + "gw", # Guinée-Bissau + "gq", # Guinée Equatoriale + "ml", # Mali + "ne", # Niger + "cd", # République Démocratique du Congo + "sn", # Sénégal + "td", # Tchad + "tg", # Togo +] + +folder = Path(__file__).parent +generic_charts = Path(folder).glob("syscohada*.json") + +for file in generic_charts: + with open(file) as f: + chart = json.load(f) + for country in syscohada_countries: + chart["country_code"] = country + json_object = json.dumps(chart, indent=4) + with open(Path(folder, file.name.replace("syscohada", country)), "w") as outfile: + outfile.write(json_object) diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/syscohada_plan_comptable.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/syscohada_plan_comptable.json new file mode 100644 index 00000000000..a5a9821ca05 --- /dev/null +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/syscohada_plan_comptable.json @@ -0,0 +1,2892 @@ +{ + "country_code":"PLACEHOLDER", + "name":"Syscohada - Plan Comptable", + "tree":{ + "1-Comptes de ressources durables":{ + "10-Capital":{ + "101-Capital social":{ + "1011-Capital souscrit, non appelé":{ + }, + "1012-Capital souscrit, appelé, non versé":{ + }, + "1013-Capital souscrit, appelé, versé, non amorti":{ + }, + "1014-Capital souscrit, appelé, versé, amorti":{ + }, + "1018-Capital souscrit soumis à des conditions particulières":{ + } + }, + "102-Capital par dotation":{ + "1021-Dotation initiale":{ + }, + "1022-Dotations complémentaires":{ + }, + "1028-Autres dotations":{ + } + }, + "103-Capital personnel":{ + }, + "104-Compte de l’exploitant":{ + "1041-Apports temporaires":{ + }, + "1042-Opérations courantes":{ + }, + "1043-Rémunérations, impôts et autres charges personnelles":{ + }, + "1047-Prélèvements d’autoconsommation":{ + }, + "1048-Autres prélèvements":{ + } + }, + "105-Primes liées au capital social":{ + "1051-Primes d’émission":{ + }, + "1052-Primes d’apport":{ + }, + "1053-Primes de fusion":{ + }, + "1054-Primes de conversion":{ + }, + "1058-Autres primes":{ + } + }, + "106-Écarts de réévaluation":{ + "1061-Écarts de réévaluation légale":{ + }, + "1062-Écarts de réévaluation libre":{ + } + }, + "109-Apporteurs, capital souscrit, non appelé":{ + } + }, + "11-Réserves":{ + "111-Réserve légale":{ + }, + "112-Réserves statutaires ou contractuelles":{ + }, + "113-Réserves réglementées":{ + "1131-Réserves de plus-values nettes à long terme":{ + }, + "1132-Réserves d’attribution gratuite d’actions au personnel salarié et aux dirigeants":{ + }, + "1133-Réserves consécutives à l’octroi de subventions d’investissement":{ + }, + "1134-Réserves des valeurs mobilières donnant accès au capital":{ + }, + "1135-Autres réserves réglementées":{ + } + }, + "118-Autres réserves":{ + "1181-Réserves facultatives":{ + }, + "1188-Réserves diverses":{ + } + } + }, + "12-Report à nouveau":{ + "121-Report à nouveau créditeur":{ + }, + "129-Report à nouveau débiteur":{ + "1291-Perte nette à reporter":{ + }, + "1292-Perte Amortissements réputés différés":{ + } + } + }, + "13-Résultat net de l’exercice":{ + "130-Résultat en instance d’affectation":{ + "1301-Résultat en instance d’affectation : bénéfice":{ + }, + "1309-Résultat en instance d’affectation : perte":{ + } + }, + "131-Résultat net : bénéfice":{ + }, + "132-Marge commerciale (MC)":{ + }, + "133-Valeur ajoutée (VA)":{ + }, + "134-Excédent brut d’exploitation (EBE)":{ + }, + "135-Résultat d’exploitation (RE)":{ + }, + "136-Résultat financier (RF)":{ + }, + "137-Résultat des activités ordinaires (RAO)":{ + }, + "138-Résultat hors activités ordinaires (RHAO)":{ + "1381-Résultat de fusion":{ + }, + "1382-Résultat d’apport partiel d’actif":{ + }, + "1383-Résultat de scission":{ + }, + "1384-Résultat de liquidation":{ + } + }, + "139-Résultat net : perte":{ + } + }, + "14-Subventions d’investissement":{ + "141-Subventions d’équipement":{ + "1411-État":{ + }, + "1412-Régions":{ + }, + "1413-Départements":{ + }, + "1414-Communes et collectivités publiques décentralisées":{ + }, + "1415-Entités publiques ou mixtes":{ + }, + "1416-Entités et organismes privés":{ + }, + "1417-Organismes internationaux":{ + }, + "1418-Autres":{ + } + }, + "148-Autres subventions d’investissement":{ + } + }, + "15-Provisions réglementées et fonds assimilés":{ + "151-Amortissements dérogatoires":{ + }, + "152-Plus-values de cession à réinvestir":{ + }, + "153-Fonds réglementés":{ + "1531-Fonds National":{ + }, + "1532-Prélèvement pour le Budget":{ + } + }, + "154-Provisions spéciales de réévaluation":{ + }, + "155-Provisions réglementées relatives aux immobilisations":{ + "1551-Reconstitution des gisements miniers et pétroliers":{ + } + }, + "156-Provisions réglementées relatives aux stocks":{ + "1561-Hausse de prix":{ + }, + "1562-Fluctuation des cours":{ + } + }, + "157-Provisions pour investissement":{ + }, + "158-Autres provisions et fonds réglementés":{ + } + }, + "16-Emprunts et dettes assimilées":{ + "161-Emprunts obligataires":{ + "1611-Emprunts obligataires ordinaires":{ + }, + "1612-Emprunts obligataires convertibles en actions":{ + }, + "1613-Emprunts obligataires remboursables en actions":{ + }, + "1618-Autres emprunts obligataires":{ + } + }, + "162-Emprunts et dettes auprès des établissements de crédit":{ + }, + "163-Avances reçues de l’État":{ + }, + "164-Avances reçues et comptes courants bloqués":{ + }, + "165-Dépôts et cautionnements reçus":{ + "1651-Dépôts":{ + }, + "1652-Cautionnements":{ + } + }, + "166-Intérêts courus":{ + "1661-Sur emprunts obligataires":{ + }, + "1662-Sur emprunts et dettes auprès des établissements de crédit":{ + }, + "1663-Sur avances reçues de l’État":{ + }, + "1664-Sur avances reçues et comptes courants bloqués":{ + }, + "1665-Sur dépôts et cautionnements reçus":{ + }, + "1667-Sur avances assorties de conditions particulières":{ + }, + "1668-Sur autres emprunts et dettes":{ + } + }, + "167-Avances assorties de conditions particulières":{ + "1671-Avances bloquées pour augmentation du capital":{ + }, + "1672-Avances conditionnées par l’État":{ + }, + "1673-Avances conditionnées par les autres organismes africains":{ + }, + "1674-Avances conditionnées par les organismes internationaux":{ + } + }, + "168-Autres emprunts et dettes":{ + "1681-Rentes viagères capitalisées":{ + }, + "1682-Billets de fonds":{ + }, + "1683-Dettes consécutives à des titres empruntés":{ + }, + "1684-Emprunts participatifs":{ + }, + "1685-Participation des travailleurs aux bénéfices":{ + }, + "1686-Emprunts et dettes contractés auprès des autres tiers":{ + } + } + }, + "17-Dettes de location acquisition":{ + "172-Dettes de location acquisition / crédit bail immobilier":{ + }, + "173-Dettes de location acquisition / crédit bail mobilier":{ + }, + "174-Dettes de location acquisition / location de vente":{ + }, + "176-Intérêts courus":{ + "1762-Sur dettes de location acquisition / crédit-bail immobilier":{ + }, + "1763-Sur dettes de location acquisition / crédit-bail mobilier":{ + }, + "1764-Sur dettes de location acquisition / location-vente":{ + }, + "1768-Sur autres dettes de location acquisition":{ + } + }, + "178-Autres dettes de location acquisition":{ + } + }, + "18-Dettes liées à des participations et comptes de liaison des établissements et sociétés en participation":{ + "181-Dettes liées à des participations":{ + "1811-Dettes liées à des participations (groupe)":{ + }, + "1812-Dettes liées à des participations (hors groupe)":{ + } + }, + "182-Dettes liées à des sociétés en participation":{ + }, + "183-Intérêts courus sur dettes liées à des participations":{ + }, + "184-Comptes permanents bloqués des établissements et succursales":{ + }, + "185-Comptes permanents non bloqués des établissements et succursales":{ + }, + "186-Comptes de liaison charges":{ + }, + "187-Comptes de liaison produits":{ + }, + "188-Comptes de liaison des sociétés en participation":{ + } + }, + "19-Provisions pour risques et charges":{ + "191-Provisions pour litiges":{ + }, + "192-Provisions pour garanties données aux clients":{ + }, + "193-Provisions pour pertes sur marchés à achèvement futur":{ + }, + "194-Provisions pour pertes de change":{ + }, + "195-Provisions pour impôts":{ + }, + "196-Provisions pour pensions et obligations similaires":{ + "1961-Provisions pour pensions et obligations similaires engagement de retraite":{ + }, + "1962-Actif du régime de retraite":{ + } + }, + "197-Provisions pour restructuration":{ + }, + "198-Autres provisions pour risques et charges":{ + "1981-Provisions pour amendes et pénalités":{ + }, + "1983-Provisions pour propre assureur":{ + }, + "1984-Provisions pour démantèlement et remise en état":{ + }, + "1985-Provisions pour droits à réduction ou avantage en nature (chèques cadeau, cartes de fidélité...)":{ + }, + "1988-Provisions pour divers risques et charges":{ + } + } + }, + "root_type":"Equity" + }, + "2-Comptes d’actif immobilisé":{ + "21-Immobilisations incorporelles":{ + "account_type":"Fixed Asset", + "211-Frais de développement":{ + "account_type":"Fixed Asset" + }, + "212-Brevets, licences, concessions et droits similaires":{ + "account_type":"Fixed Asset", + "2121-Brevets":{ + "account_type":"Fixed Asset" + }, + "2122-Licences":{ + "account_type":"Fixed Asset" + }, + "2123-Concessions de service public":{ + "account_type":"Fixed Asset" + }, + "2128-Autres concessions et droits similaires":{ + "account_type":"Fixed Asset" + } + }, + "213-Logiciels et sites internet":{ + "account_type":"Fixed Asset", + "2131-Logiciels":{ + "account_type":"Fixed Asset" + }, + "2132-Sites internet":{ + "account_type":"Fixed Asset" + } + }, + "214-Marques":{ + "account_type":"Fixed Asset" + }, + "215-Fonds commercial":{ + "account_type":"Fixed Asset" + }, + "216-Droit au bail":{ + "account_type":"Fixed Asset" + }, + "217-Investissements de création":{ + "account_type":"Fixed Asset" + }, + "218-Autres droits et valeurs incorporels":{ + "account_type":"Fixed Asset", + "2181-Frais de prospection et d’évaluation de ressources minérales":{ + "account_type":"Fixed Asset" + }, + "2182-Coûts d’obtention du contrat":{ + "account_type":"Fixed Asset" + }, + "2183-Fichiers clients, notices, titres de journaux et magazines":{ + "account_type":"Fixed Asset" + }, + "2184-Coûts des franchises":{ + "account_type":"Fixed Asset" + }, + "2188-Divers droits et valeurs incorporelles":{ + "account_type":"Fixed Asset" + } + }, + "219-Immobilisations incorporelles en cours":{ + "account_type":"Fixed Asset", + "2191-Frais de développement":{ + "account_type":"Fixed Asset" + }, + "2193-Logiciels et internet":{ + "account_type":"Fixed Asset" + }, + "2198-Autres droits et valeurs incorporels":{ + "account_type":"Fixed Asset" + } + } + }, + "22-Terrains":{ + "account_type":"Fixed Asset", + "221-Terrains agricoles et forestiers":{ + "account_type":"Fixed Asset", + "2211-Terrains d’exploitation agricole":{ + "account_type":"Fixed Asset" + }, + "2212-Terrains d’exploitation forestière":{ + "account_type":"Fixed Asset" + }, + "2218-Autres terrains":{ + "account_type":"Fixed Asset" + } + }, + "222-Terrains nus":{ + "account_type":"Fixed Asset", + "2221-Terrains à bâtir":{ + "account_type":"Fixed Asset" + }, + "2228-Autres terrains nus":{ + "account_type":"Fixed Asset" + } + }, + "223-Terrains bâtis":{ + "account_type":"Fixed Asset", + "2231-Pour bâtiments industriels et agricoles":{ + "account_type":"Fixed Asset" + }, + "2232-Pour bâtiments administratifs et commerciaux":{ + "account_type":"Fixed Asset" + }, + "2234-Pour bâtiments affectés aux autres opérations professionnelles":{ + "account_type":"Fixed Asset" + }, + "2235-Pour bâtiments affectés aux autres opérations non professionnelles":{ + "account_type":"Fixed Asset" + }, + "2238-Autres terrains bâtis":{ + "account_type":"Fixed Asset" + } + }, + "224-Travaux de mise en valeur des terrains":{ + "account_type":"Fixed Asset", + "2241-Plantation d’arbres et d’arbustes":{ + "account_type":"Fixed Asset" + }, + "2245-Améliorations du fonds":{ + "account_type":"Fixed Asset" + }, + "2248-Autres travaux":{ + "account_type":"Fixed Asset" + } + }, + "225-Terrains de carrières tréfonds":{ + "account_type":"Fixed Asset", + "2251-Carrières":{ + "account_type":"Fixed Asset" + } + }, + "226-Terrains aménagés":{ + "account_type":"Fixed Asset", + "2261-Parkings":{ + "account_type":"Fixed Asset" + } + }, + "227-Terrains mis en concession":{ + "account_type":"Fixed Asset" + }, + "228-Autres terrains":{ + "account_type":"Fixed Asset", + "2281-Terrains immeubles de placement":{ + "account_type":"Fixed Asset" + }, + "2285-Terrains des logements affectés au personnel":{ + "account_type":"Fixed Asset" + }, + "2286-Terrains de location acquisition":{ + "account_type":"Fixed Asset" + }, + "2288-Divers terrains":{ + "account_type":"Fixed Asset" + } + }, + "229-Aménagements de terrains en cours":{ + "account_type":"Fixed Asset", + "2291-Terrains agricoles et forestiers":{ + "account_type":"Fixed Asset" + }, + "2292-Terrains nus":{ + "account_type":"Fixed Asset" + }, + "2295-Terrains de carrières tréfonds":{ + "account_type":"Fixed Asset" + }, + "2298-Autres terrains":{ + "account_type":"Fixed Asset" + } + } + }, + "23-Bâtiments, installations techniques et agencements":{ + "231-Bâtiments industriels, agricoles, administratifs et commerciaux sur sol propre":{ + "2311-Bâtiments industriels":{ + }, + "2312-Bâtiments agricoles":{ + }, + "2313-Bâtiments administratifs et commerciaux":{ + }, + "2314-Bâtiments affectés au logement du personnel":{ + }, + "2315-Bâtiments immeubles de placement":{ + }, + "2316-Bâtiments de location acquisition":{ + } + }, + "232-Bâtiments industriels, agricoles, administratifs et commerciaux sur sol d’autrui":{ + "2321-Bâtiments industriels":{ + }, + "2322-Bâtiments agricoles":{ + }, + "2323-Bâtiments administratifs et commerciaux":{ + }, + "2324-Bâtiments affectés au logement du personnel":{ + }, + "2325-Bâtiments immeubles de placement":{ + }, + "2326-Bâtiments de location acquisition":{ + } + }, + "233-Ouvrages d’infrastructure":{ + "2331-Voies de terre":{ + }, + "2332-Voies de fer":{ + }, + "2333-Voies d’eau":{ + }, + "2334-Barrages, Digues":{ + }, + "2335-Pistes d’aérodrome":{ + }, + "2338-Autres ouvrages d’infrastructures":{ + } + }, + "234-Aménagements, agencements et installations techniques":{ + "2341-Installations complexes spécialisées sur sol propre":{ + }, + "2342-Installations complexes spécialisées sur sol d’autrui":{ + }, + "2343-Installations à caractère spécifique sur sol propre":{ + }, + "2344-Installations à caractère spécifique sur sol d’autrui":{ + }, + "2345-Aménagements et agencements des bâtiments":{ + } + }, + "235-Aménagements de bureaux":{ + "2351-Installations générales":{ + }, + "2358-Autres aménagements de bureaux":{ + } + }, + "237-Bâtiments industriels, agricoles et commerciaux mis en concession":{ + }, + "238-Autres installations et agencements":{ + }, + "239-Bâtiments aménagements, agencements et installations en cours":{ + "2391-Bâtiments en cours":{ + }, + "2392-Installations en cours":{ + }, + "2393-Ouvrages d’infrastructure en cours":{ + }, + "2394-Aménagements et agencements et installations techniques en cours":{ + }, + "2395-Aménagements de bureaux en cours":{ + }, + "2398-Autres installations et agencements en cours":{ + } + } + }, + "24-Matériel, mobilier et actifs biologiques":{ + "241-Matériel et outillage industriel et commercial":{ + "2411-Matériel industriel":{ + }, + "2412-Outillage industriel":{ + }, + "2413-Matériel commercial":{ + }, + "2414-Outillage commercial":{ + }, + "2416-Matériel & outillage industriel et commercial de location-acquisition":{ + } + }, + "242-Matériel et outillage agricole":{ + "2421-Matériel agricole":{ + }, + "2422-Outillage agricole":{ + }, + "2426-Matériel & outillage agricole de location-acquisition":{ + } + }, + "243-Matériel d’emballage récupérable et identifiable":{ + }, + "244-Matériel et mobilier":{ + "2441-Matériel de bureau":{ + }, + "2442-Matériel informatique":{ + }, + "2443-Matériel bureautique":{ + }, + "2444-Mobilier de bureau":{ + }, + "2445-Matériel et mobilier immeubles de placement":{ + }, + "2446-Matériel et mobilier de location acquisition":{ + }, + "2447-Matériel et mobilier des logements du personnel":{ + } + }, + "245-Matériel de transport":{ + "2451-Matériel automobile":{ + }, + "2452-Matériel ferroviaire":{ + }, + "2453-Matériel fluvial, lagunaire":{ + }, + "2454-Matériel naval":{ + }, + "2455-Matériel aérien":{ + }, + "2456-Matériel de transport de location-acquisition":{ + }, + "2457-Matériel hippomobile":{ + }, + "2458-Autres matériels de transport":{ + } + }, + "246-Actifs biologiques":{ + "2461-Cheptel, animaux de trait":{ + }, + "2462-Cheptel, animaux reproducteurs":{ + }, + "2463-Animaux de garde":{ + }, + "2465-Plantations agricoles":{ + }, + "2468-Autres actifs biologiques":{ + } + }, + "247-Agencements, aménagements du matériel et actifs biologiques":{ + "2471-Agencements et aménagements du matériel":{ + }, + "2472-Agencements et aménagements des actifs biologiques":{ + }, + "2478-Autres agencements, aménagements du matériel et actifs biologiques":{ + } + }, + "248-Autres matériels et mobiliers":{ + "2481-Collections et œuvres d’art":{ + }, + "2488-Divers matériels mobiliers":{ + } + }, + "249-Matériels et actifs biologiques en cours":{ + "2491-Matériel et outillage industriel et commercial":{ + }, + "2492-Matériel et outillage agricole":{ + }, + "2493-Matériel d’emballage récupérable et identifiable":{ + }, + "2494-Matériel et mobilier de bureau":{ + }, + "2495-Matériel de transport":{ + }, + "2496-Actifs biologiques":{ + }, + "2497-Agencements aménagements du matériel et actifs biologiques":{ + }, + "2498-Autres matériels et actifs biologiques en cours":{ + } + } + }, + "25-Avances et acomptes versés sur immobilisations":{ + "251-Avances et acomptes versés sur immobilisations incorporelles":{ + }, + "252-Avances et acomptes versés sur immobilisations corporelles":{ + } + }, + "26-Titres de participation":{ + "261-Titres de participation dans des sociétés sous contrôle exclusif":{ + }, + "262-Titres de participation dans des sociétés sous contrôle conjoint":{ + }, + "263-Titres de participation dans des sociétés conférant une influence notable":{ + }, + "265-Participations dans des organismes professionnels":{ + }, + "266-Parts dans des groupements d’intérêt économique (GIE)":{ + }, + "268-Autres titres de participation":{ + } + }, + "27-Autres immobilisations financières":{ + "271-Prêts et créances":{ + "2711-Prêts participatifs":{ + }, + "2712-Prêts aux associés":{ + }, + "2713-Billets de fonds":{ + }, + "2714-Titres prêtés":{ + }, + "2718-Autres prêts et créances":{ + } + }, + "272-Prêts au personnel":{ + "2721-Prêts immobiliers":{ + }, + "2722-Prêts mobiliers et d’installation":{ + }, + "2728-Autres prêts au personnel":{ + } + }, + "273-Créances sur l’État":{ + "2731-Retenues de garantie":{ + }, + "2733-Fonds réglementé":{ + }, + "2734-Créances sur le concédant":{ + }, + "2738-Autres créances sur l’État":{ + } + }, + "274-Titres immobilisés":{ + "2741-Titres immobilisés de l’activité de portefeuille (TIAP)":{ + }, + "2742-Titres participatifs":{ + }, + "2743-Certificats d’investissement":{ + }, + "2744-Parts de fonds commun de placement (FCP)":{ + }, + "2745-Obligations":{ + }, + "2746-Actions ou parts propres":{ + }, + "2748-Autres titres immobilisés":{ + } + }, + "275-Dépôts et cautionnements versés":{ + "2751-Dépôts pour loyers d’avance":{ + }, + "2752-Dépôts pour l’électricité":{ + }, + "2753-Dépôts pour l’eau":{ + }, + "2754-Dépôts pour le gaz":{ + }, + "2755-Dépôts pour le téléphone, le télex, la télécopie":{ + }, + "2756-Cautionnements sur marchés publics":{ + }, + "2757-Cautionnements sur autres opérations":{ + }, + "2758-Autres dépôts et cautionnements":{ + } + }, + "276-Intérêts courus":{ + "2761-Prêts et créances non commerciales":{ + }, + "2762-Prêts au personnel":{ + }, + "2763-Créances sur l’État":{ + }, + "2764-Titres immobilisés":{ + }, + "2765-Dépôts et cautionnements versés":{ + }, + "2767-Créances rattachées à des participations":{ + }, + "2768-Immobilisations financières diverses":{ + } + }, + "277-Créances rattachées à des participations et avances à des GIE":{ + "2771-Créances rattachées à des participations (groupe)":{ + }, + "2772-Créances rattachées à des participations (hors groupe)":{ + }, + "2773-Créances rattachées à des sociétés en participation":{ + }, + "2774-Avances à des Groupements d’intérêt économique (GIE)":{ + } + }, + "278-Immobilisations financières diverses":{ + "2781-Créances diverses groupe":{ + }, + "2782-Créances diverses hors groupe":{ + }, + "2784-Banques dépôts à terme":{ + }, + "2785-Or et métaux précieux":{ + }, + "2788-Autres immobilisations financières":{ + } + } + }, + "28-Amortissements":{ + "account_type":"Accumulated Depreciation", + "281-Amortissements des immobilisations corporelles":{ + "account_type":"Accumulated Depreciation", + "2811-Amortissements des frais de développement":{ + "account_type":"Accumulated Depreciation" + }, + "2812-Amortissements des brevets, licences, concessions et droits similaires":{ + "account_type":"Accumulated Depreciation" + }, + "2813-Amortissements des logiciels et sites internet":{ + "account_type":"Accumulated Depreciation" + }, + "2814-Amortissements des marques":{ + "account_type":"Accumulated Depreciation" + }, + "2815-Amortissements du fonds commercial":{ + "account_type":"Accumulated Depreciation" + }, + "2816-Amortissements du droit au bail":{ + "account_type":"Accumulated Depreciation" + }, + "2817-Amortissements des investissements de création":{ + "account_type":"Accumulated Depreciation" + }, + "2818-Amortissements des autres droits et valeurs incorporels":{ + "account_type":"Accumulated Depreciation" + } + }, + "282-Amortissements des terrains":{ + "2824-Amortissements des travaux de mise en valeur des terrains":{ + } + }, + "283-Amortissements des bâtiments, installations techniques et agencements":{ + "2831-Amortissements des bâtiments industriels, agricoles, administratifs et commerciaux sur sol propre":{ + }, + "2832-Amortissements des bâtiments industriels, agricoles, administratifs et commerciaux sur sol d’autrui":{ + }, + "2833-Amortissements des ouvrages d’infrastructure":{ + }, + "2834-Amortissements des aménagements, agencements et installations techniques":{ + }, + "2835-Amortissements des aménagements de bureaux":{ + }, + "2837-Amortissements des bâtiments industriels, agricoles et commerciaux mis en concession":{ + }, + "2838-Amortissements des autres installations et agencements":{ + } + }, + "284-Amortissements du matériel":{ + "2841-Amortissements du matériel et outillage industriel et commercial":{ + }, + "2842-Amortissements du matériel et outillage agricole":{ + }, + "2843-Amortissements du matériel d’emballage récupérable et identifiable":{ + }, + "2844-Amortissements du matériel et mobilier":{ + }, + "2845-Amortissements du matériel de transport":{ + }, + "2846-Amortissements des actifs biologiques":{ + }, + "2847-Amortissements des agencements et aménagements du matériel et des actifs biologiques":{ + }, + "2848-Amortissements des autres matériels":{ + } + } + }, + "29-Dépréciations des immobilisations":{ + "291-Dépréciations des immobilisations incorporelles":{ + "2911-Dépréciations des frais de développement":{ + }, + "2912-Dépréciations des brevets, licences, concessions et droits similaires":{ + }, + "2913-Dépréciations des logiciels et sites internet":{ + }, + "2914-Dépréciations des marques":{ + }, + "2915-Dépréciations du fonds commercial":{ + }, + "2916-Dépréciations du droit au bail":{ + }, + "2917-Dépréciations des investissements de création":{ + }, + "2918-Dépréciations des autres droits et valeurs incorporels":{ + }, + "2919-Dépréciations des immobilisations incorporelles en cours":{ + } + }, + "292-Dépréciations des terrains":{ + "2921-Dépréciations des terrains agricoles et forestiers":{ + }, + "2922-Dépréciations des terrains nus":{ + }, + "2923-Dépréciations des terrains bâtis":{ + }, + "2924-Dépréciations des travaux de mise en valeur des terrains":{ + }, + "2925-Dépréciations des terrains de gisement":{ + }, + "2926-Dépréciations des terrains aménagés":{ + }, + "2927-Dépréciations des terrains mis en concession":{ + }, + "2928-Dépréciations des autres terrains":{ + }, + "2929-Dépréciations des aménagements de terrains en cours":{ + } + }, + "293-Dépréciations des bâtiments, installations techniques et agencements":{ + "2931-Dépréciations des bâtiments industriels, agricoles, administratifs et commerciaux sur sol propre":{ + }, + "2932-Dépréciations des bâtiments industriels, agricoles, administratifs et commerciaux sur sol d’autrui":{ + }, + "2933-Dépréciations des ouvrages d’infrastructures":{ + }, + "2934-Dépréciations des aménagements, agencements et installations techniques":{ + }, + "2935-Dépréciations des aménagements de bureaux":{ + }, + "2937-Dépréciations des bâtiments industriels, agricoles et commerciaux mis en concession":{ + }, + "2938-Dépréciations des autres installations et agencements":{ + }, + "2939-Dépréciations des bâtiments et installations en cours":{ + } + }, + "294-Dépréciations de matériel, du mobilier et de l’actif biologique":{ + "2941-Dépréciations du matériel et outillage industriel et commercial":{ + }, + "2942-Dépréciations du matériel et outillage agricole":{ + }, + "2943-Dépréciations du matériel d’emballage récupérable et identifiable":{ + }, + "2944-Dépréciations du matériel et mobilier":{ + }, + "2945-Dépréciations du matériel de transport":{ + }, + "2946-Dépréciations des actifs biologiques":{ + }, + "2947-Dépréciations des agencements et aménagements du matériel et des actifs biologiques":{ + }, + "2948-Dépréciations des autres matériels":{ + }, + "2949-Dépréciations de matériel en cours":{ + } + }, + "295-Dépréciations des avances et acomptes versés sur immobilisations":{ + "2951-Dépréciations des avances et acomptes versés sur immobilisations incorporelles":{ + }, + "2952-Dépréciations des avances et acomptes versés sur immobilisations corporelles":{ + } + }, + "296-Dépréciations des titres de participation":{ + "2961-Dépréciations des titres de participation dans des sociétés sous contrôle exclusif":{ + }, + "2962-Dépréciations des titres de participation dans les sociétés sous contrôle conjoint":{ + }, + "2963-Dépréciations des titres de participation dans les sociétés conférant une influence notable":{ + }, + "2965-Dépréciations des participations dans des organismes professionnels":{ + }, + "2966-Dépréciations des parts dans des GIE":{ + }, + "2968-Dépréciations des autres titres de participation":{ + } + }, + "297-Dépréciations des autres immobilisations financières":{ + "2971-Dépréciations des prêts et créances":{ + }, + "2972-Dépréciations des prêts au personnel":{ + }, + "2973-Dépréciations des créances sur l’État":{ + }, + "2974-Dépréciations des titres immobilisés":{ + }, + "2975-Dépréciations des dépôts et cautionnements versés":{ + }, + "2977-Dépréciations des créances rattachées à des participations et avances à des GIE":{ + }, + "2978-Dépréciations des créances financières diverses":{ + } + } + }, + "root_type":"Asset" + }, + "3-Comptes de Stocks":{ + "31-Marchandises":{ + "311-Marchandises A":{ + "3111-Marchandises A1":{ + }, + "3112-Marchandises A2":{ + } + }, + "312-Marchandises B":{ + "3121-Marchandises B1":{ + }, + "3122-Marchandises B2":{ + } + }, + "313-Actifs biologiques":{ + "3131-Animaux":{ + }, + "3132-Végétaux":{ + } + }, + "318-Marchandises hors activités ordinaires (HAO)":{ + } + }, + "32-Matières premières et fournitures liées":{ + "321-Matières A":{ + }, + "322-Matières B":{ + }, + "323-Fournitures (A, B)":{ + } + }, + "33-Autres approvisionnements":{ + "331-Matières consommables":{ + }, + "332-Fournitures d’atelier et d’usine":{ + }, + "333-Fournitures de magasin":{ + }, + "334-Fournitures de bureau":{ + }, + "335-Emballages":{ + "3351-Emballages perdus":{ + }, + "3352-Emballages récupérables non identifiables":{ + }, + "3353-Emballages à usage mixte":{ + }, + "3358-Autres emballages":{ + } + }, + "338-Autres matières":{ + } + }, + "34-Produits en cours":{ + "341-Produits en cours":{ + "3411-Produits en cours P1":{ + }, + "3412-Produits en cours P2":{ + } + }, + "342-Travaux en cours":{ + "3421-Travaux en cours T1":{ + }, + "3422-Travaux en cours T2":{ + } + }, + "343-Produits intermédiaires en cours":{ + "3431-Produits intermédiaires A":{ + }, + "3432-Produits intermédiaires B":{ + } + }, + "344-Produits résiduels en cours":{ + "3441-Produits résiduels A":{ + }, + "3442-Produits résiduels B":{ + } + }, + "345-Actifs biologiques en cours":{ + "3451-Animaux":{ + }, + "3452-Végétaux":{ + } + } + }, + "35-Services en cours":{ + "351-Études en cours":{ + "3511-Études en cours E1":{ + }, + "3512-Études en cours E2":{ + } + }, + "352-Prestations de services en cours":{ + "3521-Prestations de services S1":{ + }, + "3522-Prestations de services S2":{ + } + } + }, + "36-Produits finis":{ + "361-Produits finis A":{ + }, + "362-Produits finis B":{ + }, + "363-Actifs biologiques":{ + "3631-Animaux":{ + }, + "3632-Végétaux":{ + }, + "3638-Autres stocks (activités annexes)":{ + } + } + }, + "37-Produits intermédiaires et résiduels":{ + "371-Produits intermédiaires":{ + "3711-Produits intermédiaires A":{ + }, + "3712-Produits intermédiaires B":{ + } + }, + "372-Produits résiduels":{ + "3721-Déchets":{ + }, + "3722-Rebuts":{ + }, + "3723-Matières de Récupération":{ + } + }, + "373-Actifs biologiques":{ + "3731-Animaux":{ + }, + "3732-Végétaux":{ + }, + "3738-Autres stocks (activités annexes)":{ + } + } + }, + "38-Stocks en cours de route, en consignation ou en dépôt":{ + "account_type":"Stock", + "381-Marchandises en cours de route":{ + }, + "382-Matières premières et fournitures liées en cours de route":{ + }, + "383-Autres approvisionnements en cours de route":{ + }, + "386-Produits finis en cours de route":{ + }, + "387-Stock en consignation ou en dépôt":{ + "3871-Stock en consignation":{ + }, + "3872-Stock en dépôt":{ + } + }, + "388-Stock provenant d’immobilisations mises hors service ou au rebut":{ + } + }, + "39-Dépréciations des stocks et encours de production":{ + "391-Dépréciations des stocks de marchandises":{ + }, + "392-Dépréciations des stocks de matières premières et fournitures liées":{ + }, + "393-Dépréciations des stocks d’autres approvisionnements":{ + }, + "394-Dépréciations des productions en cours":{ + }, + "395-Dépréciations des services en cours":{ + }, + "396-Dépréciations des stocks de produits finis":{ + }, + "397-Dépréciations des stocks de produits intermédiaires et résiduels":{ + }, + "398-Dépréciations des stocks en cours de route, en consignation ou en dépôt":{ + } + }, + "root_type":"Asset" + }, + "4-Comptes de Tiers (ACTIF)":{ + "40-Fournisseurs et comptes rattachés (ACTIF)":{ + "409-Fournisseurs débiteurs":{ + "4091-Fournisseurs Avances et acomptes versés":{ + }, + "4092-Fournisseurs Groupe avances et acomptes versés":{ + }, + "4093-Fournisseurs Sous-traitants avances et acomptes versés":{ + }, + "4094-Fournisseurs Créances pour emballages et matériels à rendre":{ + }, + "4098-Fournisseurs Rabais, remises, ristournes et autres avoirs à obtenir":{ + } + } + }, + "41-Clients et comptes rattachés (ACTIF)":{ + "411-Clients":{ + "4111-Clients":{ + "account_type":"Receivable" + }, + "4112-Clients groupe":{ + "account_type":"Receivable" + }, + "4114-Clients, État et Collectivités publiques":{ + "account_type":"Receivable" + }, + "4115-Clients, organismes internationaux":{ + "account_type":"Receivable" + }, + "4116-Clients, réserve de propriété":{ + "account_type":"Receivable" + }, + "4117-Client, retenues de garantie":{ + "account_type":"Receivable" + }, + "4118-Clients, dégrèvement de taxes sur la valeur ajoutée (TVA)":{ + "account_type":"Receivable" + }, + "account_type":"Receivable" + }, + "412-Clients, effets à recevoir en portefeuille":{ + "4121-Clients, effets à recevoir":{ + "account_type":"Receivable" + }, + "4122-Clients Groupe, effets à recevoir":{ + "account_type":"Receivable" + }, + "4124-État et Collectivités publiques, effets à recevoir":{ + "account_type":"Receivable" + }, + "4125-Organismes Internationaux, effets à recevoir":{ + "account_type":"Receivable" + }, + "account_type":"Receivable" + }, + "413-Clients, chèques, effets et autres valeurs impayées":{ + "4131-Clients, chèques impayés":{ + "account_type":"Receivable" + }, + "4132-Clients, effets impayés":{ + "account_type":"Receivable" + }, + "4133-Clients, cartes de crédit impayées":{ + "account_type":"Receivable" + }, + "4138-Clients, autres valeurs impayées":{ + "account_type":"Receivable" + }, + "account_type":"Receivable" + }, + "414-Créances sur cessions courantes d’immobilisations":{ + "4141-Créances en compte, immobilisations incorporelles":{ + "account_type":"Receivable" + }, + "4142-Créances en compte, immobilisations corporelles":{ + "account_type":"Receivable" + }, + "4146-Effets à recevoir, immobilisations incorporelles":{ + "account_type":"Receivable" + }, + "4147-Effets à recevoir, immobilisations corporelles":{ + "account_type":"Receivable" + }, + "account_type":"Receivable" + }, + "415-Clients, effets escomptés non échus":{ + "account_type":"Receivable" + }, + "416-Créances clients litigieuses ou douteuses":{ + "4161-Créances litigieuses":{ + "account_type":"Receivable" + }, + "4162-Créances douteuses":{ + "account_type":"Receivable" + }, + "account_type":"Receivable" + }, + "418-Clients, produits à recevoir":{ + "4181-Clients, factures à établir":{ + "account_type":"Receivable" + }, + "4186-Clients, intérêts courus":{ + "account_type":"Receivable" + }, + "account_type":"Receivable" + }, + "account_type":"Receivable" + }, + "42-Personnel (ACTIF)":{ + "421-Personnel, avances et acomptes":{ + "4211-Personnel, avances":{ + }, + "4212-Personnel, acomptes":{ + }, + "4213-Frais avancés et fournitures au personnel":{ + } + } + }, + "43-Organismes sociaux (ACTIF)":{ + "431-Sécurité sociale":{ + "4311-Prestations familiales":{ + }, + "4312-Accidents de travail":{ + }, + "4313-Caisse de retraite obligatoire":{ + }, + "4314-Caisse de retraite facultative":{ + }, + "4318-Autres cotisations sociales":{ + } + }, + "432-Caisses de retraite complémentaire":{ + }, + "433-Autres organismes sociaux":{ + "4331-Mutuelle":{ + }, + "4332-Assurances retraite":{ + }, + "4333-Assurances et organismes de santé":{ + } + }, + "438-Organismes sociaux, charges à payer et produits à recevoir":{ + "4387-Produits à recevoir":{ + } + } + }, + "44-État et collectivités publiques (ACTIF)":{ + "443-État, TVA facturée":{ + "4431-TVA facturée sur ventes":{ + }, + "4432-TVA facturée sur prestations de services":{ + }, + "4433-TVA facturée sur travaux":{ + }, + "4434-TVA facturée sur production livrée à soi-même":{ + }, + "4435-TVA sur factures à établir":{ + } + }, + "445-État, TVA récupérable":{ + "4451-TVA récupérable sur immobilisations":{ + }, + "4452-TVA récupérable sur achats":{ + }, + "4453-TVA récupérable sur transport":{ + }, + "4454-TVA récupérable sur services extérieurs et autres charges":{ + }, + "4455-TVA récupérable sur factures non parvenues":{ + }, + "4456-TVA transférée par d’autres entités":{ + } + }, + "448-État, charges à payer et produits à recevoir":{ + "4486-Charges à payer":{ + }, + "4487-Produits à recevoir":{ + } + }, + "449-État, créances et dettes diverses":{ + "4491-État, obligations cautionnées":{ + }, + "4492-État, avances et acomptes versés sur impôts":{ + }, + "4493-État, fonds de dotation à recevoir":{ + }, + "4494-État, subventions investissement à recevoir":{ + }, + "4495-État, subventions d’exploitation à recevoir":{ + }, + "4496-État, subventions d’équilibre à recevoir":{ + }, + "4497-État, avances sur subventions":{ + }, + "4499-État, fonds réglementés provisionnés":{ + } + } + }, + "45-Organismes internationaux (ACTIF)":{ + "451-Opérations avec les organismes africains":{ + }, + "452-Opérations avec les autres organismes internationaux":{ + }, + "458-Organismes internationaux, fonds de dotation et subventions à recevoir":{ + "4581-Organismes internationaux, fonds de dotation à recevoir":{ + }, + "4582-Organismes internationaux, subventions à recevoir":{ + } + } + }, + "46-Apporteurs, associés et groupe (ACTIF)":{ + "461-Apporteurs, opérations sur le capital":{ + "4613-Apporteurs, capital appelé, non versé":{ + }, + "4614-Apporteurs, compte d’apport, opérations de restructuration (fusion...)":{ + }, + "4618-Apporteurs, titres à échanger":{ + } + }, + "467-Apporteurs, restant dû sur capital appelé":{ + } + }, + "47-Débiteurs et créditeurs divers (ACTIF)":{ + "472-Créances et dettes sur titres de placement":{ + "4721-Créances sur cessions de titres de placement":{ + }, + "4726-Versements restant à effectuer sur titres de placement non libérés":{ + } + }, + "473-Intermédiaires Opérations faites pour compte de tiers":{ + "4731-Mandants":{ + }, + "4732-Mandataires":{ + }, + "4733-Commettants":{ + }, + "4734-Commissionnaires":{ + }, + "4739-État, Collectivités publiques, fonds global d’allocation":{ + } + }, + "474-Compte de répartition périodique des charges et des produits":{ + "4747-Compte de répartition périodique des produits":{ + } + }, + "475-Compte transitoire, ajustement spécial lié à la révision du SYSCOHADA":{ + "4751-Compte actif":{ + "account_type":"Temporary" + } + }, + "476-Charges constatées d’avance":{ + }, + "478-Écarts de conversion actif":{ + "4781-Diminution des créances d’exploitation":{ + }, + "4782-Diminution des créances financières":{ + }, + "4783-Augmentation des dettes d’exploitation":{ + }, + "4784-Augmentation des dettes financières":{ + }, + "4786-Différences d’évaluation sur instruments de trésorerie":{ + }, + "4788-Différences compensées par couverture de change":{ + } + } + }, + "48-Créances et dettes hors activités ordinaires (ACTIF)":{ + "485-Créances sur cessions d’immobilisations":{ + "4851-En compte, immobilisations incorporelles":{ + }, + "4852-En compte, immobilisations corporelles":{ + }, + "4853-Effets à recevoir, immobilisations incorporelles":{ + }, + "4854-Effets à recevoir, immobilisations corporelles":{ + }, + "4855-Effets escomptés non échus":{ + }, + "4857-Retenues de garantie":{ + }, + "4858-Factures à établir":{ + } + }, + "488-Autres créances hors activités ordinaires (HAO)":{ + } + }, + "49-Dépréciations et provisions pour risques à court terme (tiers) (ACTIF)":{ + "491-Dépréciations des comptes clients":{ + "4911-Créances litigieuses":{ + }, + "4912-Créances douteuses":{ + } + }, + "495-Dépréciations des comptes organismes internationaux":{ + }, + "496-Dépréciations des comptes apporteurs, associés et groupe":{ + "4962-Associés, comptes courants":{ + }, + "4963-Associés, opérations faites en commun":{ + }, + "4966-Groupe, comptes courants":{ + } + }, + "497-Dépréciations des comptes débiteurs divers":{ + }, + "498-Dépréciations des comptes de créances HAO":{ + "4985-Créances sur cessions d’immobilisations":{ + }, + "4986-Créances sur cessions de titres de placement":{ + }, + "4988-Autres créances HAO":{ + } + }, + "499-Provisions pour risques à court terme":{ + "4991-Sur opérations d’exploitation":{ + }, + "4997-Sur opérations financières":{ + }, + "4998-Sur opérations HAO":{ + } + } + }, + "root_type":"Asset" + }, + "4-Comptes de Tiers (PASSIF)":{ + "40-Fournisseurs et comptes rattachés (PASSIF)":{ + "401-Fournisseurs, dettes en compte":{ + "4011-Fournisseurs":{ + "account_type":"Payable" + }, + "4012-Fournisseurs groupe":{ + "account_type":"Payable" + }, + "4013-Fournisseurs sous-traitants":{ + "account_type":"Payable" + }, + "4016-Fournisseurs, réserve de propriété":{ + "account_type":"Payable" + }, + "4017-Fournisseur, retenues de garantie":{ + "account_type":"Payable" + }, + "account_type":"Payable" + }, + "402-Fournisseurs, effets à payer":{ + "4021-Fournisseurs Effets à payer":{ + "account_type":"Payable" + }, + "4022-Fournisseurs Groupe, effets à payer":{ + "account_type":"Payable" + }, + "4023-Fournisseurs Sous-traitants, effets à payer":{ + "account_type":"Payable" + }, + "account_type":"Payable" + }, + "404-Fournisseurs, acquisitions courantes d’immobilisations":{ + "4041-Fournisseurs Dettes en comptes, immobilisations incorporelles":{ + "account_type":"Payable" + }, + "4042-Fournisseurs Dettes en comptes, immobilisations corporelles":{ + "account_type":"Payable" + }, + "4046-Fournisseurs Effets à payer, immobilisations incorporelles":{ + "account_type":"Payable" + }, + "4047-Fournisseurs Effets à payer, immobilisations corporelles":{ + "account_type":"Payable" + }, + "account_type":"Payable" + }, + "408-Fournisseurs, factures non parvenues":{ + "4081-Fournisseurs":{ + "account_type":"Stock Received But Not Billed" + }, + "4082-Fournisseurs groupe":{ + "account_type":"Stock Received But Not Billed" + }, + "4083-Fournisseurs sous-traitants":{ + "account_type":"Stock Received But Not Billed" + }, + "4086-Fournisseurs, intérêts courus":{ + "account_type":"Stock Received But Not Billed" + }, + "account_type":"Stock Received But Not Billed" + }, + "account_type":"Payable" + }, + "41-Clients et comptes rattachés (PASSIF)":{ + "419-Clients créditeurs":{ + "4191-Clients, avances et acomptes reçus":{ + }, + "4192-Clients groupe, avances et acomptes reçus":{ + }, + "4194-Clients, dettes pour emballages et matériels consignés":{ + }, + "4198-Clients, rabais, remises, ristournes et autres avoirs à accorder":{ + } + } + }, + "42-Personnel (PASSIF)":{ + "422-Personnel, rémunérations dues":{ + }, + "423-Personnel, oppositions, saisies-arrêts":{ + "4231-Personnel, oppositions":{ + }, + "4232-Personnel, saisies-arrêts":{ + }, + "4233-Personnel, avis à tiers détenteur":{ + } + }, + "424-Personnel, œuvres sociales internes":{ + "4241-Assistance médicale":{ + }, + "4242-Allocations familiales":{ + }, + "4245-Organismes sociaux rattachés à l’entité":{ + }, + "4248-Autres œuvres sociales internes":{ + } + }, + "425-Représentants du personnel":{ + "4251-Délégués du personnel":{ + }, + "4252-Syndicats et Comités d’entreprises, d’Établissement":{ + }, + "4258-Autres représentants du personnel":{ + } + }, + "426-Personnel, participation aux bénéfices et au capital":{ + "4261-Participation aux bénéfices":{ + }, + "4264-Participation au capital":{ + } + }, + "427-Personnel dépôts":{ + }, + "428-Personnel, charges à payer et produits à recevoir":{ + "4281-Dettes provisionnées pour congés à payer":{ + }, + "4286-Autres charges à payer":{ + }, + "4287-Produits à recevoir":{ + } + } + }, + "43-Organismes sociaux (PASSIF)":{ + "438-Organismes sociaux, charges à payer et produits à recevoir":{ + "4381-Charges sociales sur gratifications à payer":{ + }, + "4382-Charges sociales sur congés à payer":{ + }, + "4386-Autres charges à payer":{ + } + } + }, + "44-État et collectivités publiques (PASSIF)":{ + "441-État, impôt sur les bénéfices":{ + }, + "442-État, autres impôts et taxes":{ + "4421-Impôts et taxes d’État":{ + }, + "4422-Impôts et taxes pour les collectivités publiques":{ + }, + "4423-Impôts et taxes recouvrables sur des obligataires":{ + }, + "4424-Impôts et taxes recouvrables sur des associés":{ + }, + "4426-Droits de douane":{ + }, + "4428-Autres impôts et taxes":{ + } + }, + "444-État, TVA due ou crédit de TVA":{ + "4441-État, TVA due":{ + }, + "4449-État, crédit de TVA à reporter":{ + } + }, + "446-État, autres taxes sur le chiffre d’affaires":{ + }, + "447-État, impôts retenus à la source":{ + "4471-Impôt Général sur le revenu":{ + }, + "4472-Impôts sur salaires":{ + }, + "4473-Contribution nationale":{ + }, + "4474-Contribution nationale de solidarité":{ + }, + "4478-Autres impôts et contributions":{ + } + } + }, + "46-Apporteurs, associés et groupe (PASSIF)":{ + "461-Apporteurs, opérations sur le capital (PASSIF)":{ + "4611-Apporteurs, apports en nature":{ + }, + "4612-Apporteurs, apports en numéraire":{ + }, + "4615-Apporteurs, versements reçus sur augmentation de capital":{ + }, + "4616-Apporteurs, versements anticipés":{ + }, + "4617-Apporteurs défaillants":{ + }, + "4619-Apporteurs, capital à rembourser":{ + } + }, + "462-Associés, comptes courants":{ + "4621-Principal":{ + }, + "4626-Intérêts courus":{ + } + }, + "463-Associés, opérations faites en commun et GIE":{ + "4631-Opérations courantes":{ + }, + "4636-Intérêts courus":{ + } + }, + "465-Associés, dividendes à payer":{ + }, + "466-Groupe, comptes courants":{ + } + }, + "47-Débiteurs et créditeurs divers (PASSIF)":{ + "471-Débiteurs et créditeurs divers":{ + "4711-Débiteurs divers":{ + }, + "4712-Créditeurs divers":{ + }, + "4713-Obligataires":{ + }, + "4715-Rémunérations d’administrateurs":{ + }, + "4716-Compte d’affacturage":{ + }, + "4717-Débiteurs divers retenues de garantie":{ + }, + "4718-Apport, compte de fusion et opérations assimilées":{ + }, + "4719-Bons de souscription d’actions et d’obligations":{ + } + }, + "474-Compte de répartition périodique des charges et des produits (PASSIF)":{ + "4746-Compte de répartition périodique des charges":{ + } + }, + "475-Compte transitoire, ajustement spécial lié à la révision du SYSCOHADA (PASSIF)":{ + "4752-Compte passif":{ + } + }, + "477-Produits constatés d’avance":{ + }, + "479-Écarts de conversion passif":{ + "4791-Augmentation des créances d’exploitation":{ + }, + "4792-Augmentation des créances financières":{ + }, + "4793-Diminution des dettes d’exploitation":{ + }, + "4794-Diminution des dettes financières":{ + }, + "4797-Différences d’évaluation sur instruments de trésorerie":{ + }, + "4798-Différences compensées par couverture de change":{ + } + } + }, + "48-Créances et dettes hors activités ordinaires (HAO) (PASSIF)":{ + "481-Fournisseurs d’investissements":{ + "4811-Immobilisations incorporelles":{ + }, + "4812-Immobilisations corporelles":{ + }, + "4813-Versements restant à effectuer sur titres de participation et titres immobilisés non libérés":{ + }, + "4816-Réserve de propriété":{ + }, + "4817-Retenues de garantie":{ + }, + "4818-Factures non parvenues":{ + } + }, + "482-Fournisseurs d’investissements, effets à payer":{ + "4821-Immobilisations incorporelles":{ + }, + "4822-Immobilisations corporelles":{ + } + }, + "484-Autres dettes hors activités ordinaires (HAO)":{ + "4887-Produits":{ + } + } + }, + "49-Dépréciations et provisions pour risques à court terme (tiers) (PASSIF)":{ + "490-Dépréciations des comptes fournisseurs":{ + }, + "492-Dépréciations des comptes personnel":{ + }, + "493-Dépréciations des comptes organismes sociaux":{ + }, + "494-Dépréciations des comptes État et collectivités publiques":{ + }, + "495-Dépréciations des comptes organismes internationaux":{ + } + }, + "root_type":"Liability" + }, + "5-Comptes de trésorerie":{ + "50-Titres de placement":{ + "501-Titres du trésor et bons de caisse à court terme":{ + "5011-Titres du Trésor à court terme":{ + }, + "5012-Titres d’organismes financiers":{ + }, + "5013-Bons de caisse à court terme":{ + }, + "5016-Frais d’acquisition des titres de trésor et bons de caisse":{ + } + }, + "502-Actions":{ + "5021-Actions ou parts propres":{ + }, + "5022-Actions cotées":{ + }, + "5023-Actions non cotées":{ + }, + "5024-Actions démembrées (certificats d’investissement, droits de vote)":{ + }, + "5025-Autres actions":{ + }, + "5026-Frais d’acquisition des actions":{ + } + }, + "503-Obligations":{ + "5031-Obligations émises par la société et rachetées par elle":{ + }, + "5032-Obligations cotées":{ + }, + "5033-Obligations non cotées":{ + }, + "5035-Autres obligations":{ + }, + "5036-Frais d’acquisition des obligations":{ + } + }, + "504-Bons de souscription":{ + "5042-Bons de souscription d’actions":{ + }, + "5043-Bons de souscription d’obligations":{ + } + }, + "505-Titres négociables hors région":{ + }, + "506-Intérêts courus":{ + "5061-Titres du Trésor et bons de caisse à court terme":{ + }, + "5062-Actions":{ + }, + "5063-Obligations":{ + } + }, + "508-Autres titres de placement et créances assimilées":{ + } + }, + "51-Valeurs à encaisser":{ + "511-Effets à encaisser":{ + }, + "512-Effets à l’encaissement":{ + }, + "513-Chèques à encaisser":{ + }, + "514-Chèques à l’encaissement":{ + }, + "515-Cartes de crédit à encaisser":{ + }, + "518-Autres valeurs à l’encaissement":{ + "5181-Warrants":{ + }, + "5182-Billets de fonds":{ + }, + "5185-Chèques de voyage":{ + }, + "5186-Coupons échus":{ + }, + "5187-Intérêts échus des obligations":{ + } + } + }, + "52-Banques":{ + "521-Banques locales":{ + "5211-Banques en monnaie nationale":{ + "account_type": "Bank" + }, + "5215-Banques en devises":{ + "account_type": "Bank" + }, + "account_type": "Bank" + }, + "522-Banques autres États région":{ + }, + "523-Banques autres États zone monétaire":{ + }, + "524-Banques hors zone monétaire":{ + }, + "525-Banques dépôt à terme":{ + }, + "526-Banques, intérêts courus":{ + "5261-Banque, intérêts courus, charges à payer":{ + }, + "5267-Banque, intérêts courus, produits à recevoir":{ + } + } + }, + "53-Établissements financiers et assimilés":{ + "531-Chèques postaux":{ + }, + "532-Trésor":{ + }, + "533-Sociétés de gestion et d’intermédiation (SGI)":{ + }, + "536-Établissements financiers, intérêts courus":{ + }, + "538-Autres organismes financiers":{ + } + }, + "54-Instruments de trésorerie":{ + "541-Options de taux d’intérêt":{ + }, + "542-Options de taux de change":{ + }, + "543-Options de taux boursiers":{ + }, + "544-Instruments de marchés à terme":{ + }, + "545-Avoirs d’or et autres métaux précieux":{ + } + }, + "55-Instruments de monnaie électronique":{ + "551-Monnaie électronique carte carburant":{ + }, + "552-Monnaie électronique téléphone portable":{ + }, + "553-Monnaie électronique carte péage":{ + }, + "554-Porte-monnaie électronique":{ + }, + "558-Autres instruments de monnaies électroniques":{ + } + }, + "56-Banques, crédits de trésorerie et d’escompte":{ + "561-Crédits de trésorerie":{ + }, + "564-Escompte de crédits de campagne":{ + }, + "565-Escompte de crédits ordinaires":{ + }, + "566-Banques, crédits de trésorerie, intérêts courus":{ + } + }, + "57-Caisse":{ + "571-Caisse siège social":{ + "5711-Caisse en monnaie nationale":{ + }, + "5712-Caisse en devises":{ + } + }, + "572-Caisse succursale A":{ + "5721-En monnaie nationale":{ + }, + "5722-En devises":{ + } + }, + "573-Caisse succursale B":{ + "5731-En monnaie nationale":{ + }, + "5732-En devises":{ + } + } + }, + "58-Régies d’avances, accréditifs et virements internes":{ + "581-Régies d’avance":{ + }, + "582-Accréditifs":{ + }, + "585-Virements de fonds":{ + }, + "588-Autres virements internes":{ + } + }, + "59-Dépréciations et provisions pour risque à court terme":{ + "590-Dépréciations des titres de placement":{ + }, + "591-Dépréciations des titres et valeurs à encaisser":{ + }, + "592-Dépréciations des comptes banques":{ + }, + "593-Dépréciations des comptes établissements financiers et assimilés":{ + }, + "594-Dépréciations des comptes d’instruments de trésorerie":{ + }, + "599-Provisions pour risque à court terme à caractère financier":{ + } + }, + "root_type":"Asset" + }, + "6-Comptes de charges des activités ordinaires":{ + "60-Achats et variations de stocks":{ + "601-Achats de marchandises":{ + "6011-Dans la Région":{ + }, + "6012-Hors Région":{ + }, + "6013-Aux entités du groupe dans la Région":{ + }, + "6014-Aux entités du groupe hors Région":{ + }, + "6015-Frais sur achats":{ + }, + "6019-Rabais, remises et ristournes obtenus (non ventilés)":{ + } + }, + "602-Achats de matières premières et fournitures liées":{ + "6021-Dans la Région":{ + }, + "6022-Hors Région":{ + }, + "6023-Aux entités du groupe dans la Région":{ + }, + "6024-Aux entités du groupe hors Région":{ + }, + "6025-Frais sur achats":{ + }, + "6029-Rabais, remises et ristournes obtenus (non ventilés)":{ + } + }, + "603-Variations des stocks de biens achetés":{ + "6031-Variations des stocks de marchandises":{ + }, + "6032-Variations des stocks de matières premières et fournitures liées":{ + }, + "6033-Variations des stocks d’autres approvisionnements":{ + } + }, + "604-Achats stockés de matières et fournitures consommables":{ + "6041-Matières consommables":{ + }, + "6042-Matières combustibles":{ + }, + "6043-Produits d’entretien":{ + }, + "6044-Fournitures d’atelier et d’usine":{ + }, + "6045-Frais sur achat":{ + }, + "6046-Fournitures de magasin":{ + }, + "6047-Fournitures de bureau":{ + }, + "6049-Rabais, remises et ristournes obtenus (non ventilés)":{ + } + }, + "605-Autres achats":{ + "6051-Fournitures non stockables Eau":{ + }, + "6052-Fournitures non stockables Électricité":{ + }, + "6053-Fournitures non stockables Autres énergies":{ + }, + "6054-Fournitures d’entretien non stockables":{ + }, + "6055-Fournitures de bureau non stockables":{ + }, + "6056-Achats de petit matériel et outillage":{ + }, + "6057-Achats d’études et prestations de services":{ + }, + "6058-Achats de travaux, matériels et équipements":{ + }, + "6059-Rabais, remises et ristournes obtenus (non ventilés)":{ + } + }, + "608-Achats d’emballages":{ + "6081-Emballages perdus":{ + }, + "6082-Emballages récupérables non identifiables":{ + }, + "6083-Emballages à usage mixte":{ + }, + "6085-Frais sur achats":{ + }, + "6089-Rabais, remises et ristournes obtenus (non ventilés)":{ + } + } + }, + "61-Transports":{ + "612-Transports sur ventes":{ + }, + "613-Transports pour le compte de tiers":{ + }, + "614-Transports du personnel":{ + }, + "616-Transports de plis":{ + }, + "618-Autres frais de transport":{ + "6181-Voyages et déplacements":{ + }, + "6182-Transports entre établissements ou chantiers":{ + }, + "6183-Transports administratifs":{ + } + } + }, + "62-Services extérieurs":{ + "621-Sous-traitance générale":{ + }, + "622-Locations, charges locatives":{ + "6221-Locations de terrains":{ + }, + "6222-Locations de bâtiments":{ + }, + "6223-Locations de matériels et outillages":{ + }, + "6224-Malis sur emballages":{ + }, + "6225-Locations d’emballages":{ + }, + "6226-Fermages et loyers du foncier":{ + }, + "6228-Locations et charges locatives diverses":{ + } + }, + "623-Redevances de location acquisition":{ + "6232-Crédit-bail immobilier":{ + }, + "6233-Crédit-bail mobilier":{ + }, + "6234-Location-vente":{ + }, + "6238-Autres contrats de location acquisition":{ + } + }, + "624-Entretien, réparations, remise en état et maintenance":{ + "6241-Entretien et réparations des biens immobiliers":{ + }, + "6242-Entretien et réparations des biens mobiliers":{ + }, + "6243-Maintenance":{ + }, + "6244-Charges de démantèlement et remise en état":{ + }, + "6248-Autres entretiens et réparations":{ + } + }, + "625-Primes d’assurance":{ + "6251-Assurances multirisques":{ + }, + "6252-Assurances matériel de transport":{ + }, + "6253-Assurances risques d’exploitation":{ + }, + "6254-Assurances responsabilité du producteur":{ + }, + "6255-Assurances insolvabilité clients":{ + }, + "6257-Assurances transport sur ventes":{ + }, + "6258-Autres primes d’assurances":{ + } + }, + "626-Études, recherches et documentation":{ + "6261-Études et recherches":{ + }, + "6265-Documentation générale":{ + }, + "6266-Documentation technique":{ + } + }, + "627-Publicité, publications, relations publiques":{ + "6271-Annonces, insertions":{ + }, + "6272-Catalogues, imprimés publicitaires":{ + }, + "6273-Échantillons":{ + }, + "6274-Foires et expositions":{ + }, + "6275-Publications":{ + }, + "6276-Cadeaux à la clientèle":{ + }, + "6277-Frais de colloques, séminaires, conférences":{ + }, + "6278-Autres charges de publicité et relations publiques":{ + } + }, + "628-Frais de télécommunications":{ + "6281-Frais de téléphone":{ + }, + "6282-Frais de télex":{ + }, + "6283-Frais de télécopie":{ + }, + "6288-Autres frais de télécommunications":{ + } + } + }, + "63-Autres services extérieurs":{ + "631-Frais bancaires":{ + "6311-Frais sur titres (vente, garde)":{ + }, + "6312-Frais sur effets":{ + }, + "6313-Location de coffres":{ + }, + "6314-Commissions d’affacturage":{ + }, + "6315-Commissions sur cartes de crédit":{ + }, + "6316-Frais d’émission d’emprunts":{ + }, + "6317-Frais sur instruments monnaie électronique":{ + }, + "6318-Autres frais bancaires":{ + } + }, + "632-Rémunérations d’intermédiaires et de conseils":{ + "6322-Commissions et courtages sur ventes":{ + }, + "6324-Honoraires des professions réglementées":{ + }, + "6325-Frais d’actes et de contentieux":{ + }, + "6326-Rémunérations d’affacturage":{ + }, + "6327-Rémunérations des autres prestataires de services":{ + }, + "6328-Divers frais":{ + } + }, + "633-Frais de formation du personnel":{ + }, + "634-Redevances pour brevets, licences, logiciels, concessions et droits et valeurs similaires":{ + "6342-Redevances pour brevets, licences":{ + }, + "6343-Redevances pour logiciels":{ + }, + "6344-Redevances pour marques":{ + }, + "6345-Redevances pour sites internet":{ + }, + "6346-Redevances pour concessions, droits et valeurs similaires":{ + } + }, + "635-Cotisations":{ + "6351-Cotisations":{ + }, + "6358-Concours divers":{ + } + }, + "637-Rémunérations de personnel extérieur à l’entité":{ + "6371-Personnel intérimaire":{ + }, + "6372-Personnel détaché ou prêté à l’entité":{ + } + }, + "638-Autres charges externes":{ + "6381-Frais de recrutement du personnel":{ + }, + "6382-Frais de déménagement":{ + }, + "6383-Réceptions":{ + }, + "6384-Missions":{ + }, + "6385-Charges de copropriété":{ + } + } + }, + "64-Impôts et taxes":{ + "641-Impôts et taxes directs":{ + "6411-Impôts fonciers et taxes annexes":{ + }, + "6412-Patentes, licences et taxes annexes":{ + }, + "6413-Taxes sur appointements et salaires":{ + }, + "6414-Taxes d’apprentissage":{ + }, + "6415-Formation professionnelle continue":{ + }, + "6418-Autres impôts et taxes directs":{ + } + }, + "645-Impôts et taxes indirects":{ + }, + "646-Droits d’enregistrement":{ + "6461-Droits de mutation":{ + }, + "6462-Droits de timbre":{ + }, + "6463-Taxes sur les véhicules de société":{ + }, + "6464-Vignettes":{ + }, + "6468-Autres droits":{ + } + }, + "647-Pénalités, amendes fiscales":{ + "6471-Pénalités d’assiette, impôts directs":{ + }, + "6472-Pénalités d’assiette, impôts indirects":{ + }, + "6473-Pénalités de recouvrement, impôts directs":{ + }, + "6474-Pénalités de recouvrement, impôts indirects":{ + }, + "6478-Autres pénalités et amendes fiscales":{ + } + }, + "648-Autres impôts et taxes":{ + } + }, + "65-Autres charges":{ + "651-Pertes sur créances clients et autres débiteurs":{ + "6511-Clients":{ + }, + "6515-Autres débiteurs":{ + } + }, + "652-Quote-part de résultat sur opérations faites en commun":{ + "6521-Quote-part transférée de bénéfices (comptabilité du gérant)":{ + }, + "6525-Pertes imputées par transfert (comptabilité des associés non gérants)":{ + } + }, + "654-Valeurs comptables des cessions courantes d’immobilisations":{ + "6541-Immobilisations incorporelles":{ + }, + "6542-Immobilisations corporelles":{ + } + }, + "656-Perte de change sur créances et dettes commerciale":{ + }, + "657-Pénalités et amendes pénales":{ + }, + "658-Charges diverses":{ + "6581-Indemnités de fonction et autres rémunérations d’administrateurs":{ + }, + "6582-Dons":{ + }, + "6583-Mécénat":{ + }, + "6588-Autres charges diverses":{ + } + }, + "659-Charges pour dépréciations et provisions pour risques à court terme d’exploitation":{ + "6591-Sur risques à court terme":{ + }, + "6593-Sur stocks":{ + }, + "6594-Sur créances":{ + }, + "6598-Autres charges pour dépréciations et provisions pour risques à court terme":{ + } + } + }, + "66-Charges de personnel":{ + "661-Rémunérations directes versées au personnel national":{ + "6611-Appointements salaires et commissions":{ + }, + "6612-Primes et gratifications":{ + }, + "6613-Congés payés":{ + }, + "6614-Indemnités de préavis, de licenciement et de recherche d’embauche":{ + }, + "6615-Indemnités de maladie versées aux travailleurs":{ + }, + "6616-Supplément familial":{ + }, + "6617-Avantages en nature":{ + }, + "6618-Autres rémunérations directes":{ + } + }, + "662-Rémunérations directes versées au personnel non national":{ + "6621-Appointements salaires et commissions":{ + }, + "6622-Primes et gratifications":{ + }, + "6623-Congés payés":{ + }, + "6624-Indemnités de préavis, de licenciement et de recherche d’embauche":{ + }, + "6625-Indemnités de maladie versées aux travailleurs":{ + }, + "6626-Supplément familial":{ + }, + "6627-Avantages en nature":{ + }, + "6628-Autres rémunérations directes":{ + } + }, + "663-Indemnités forfaitaires versées au personnel":{ + "6631-Indemnités de logement":{ + }, + "6632-Indemnités de représentation":{ + }, + "6633-Indemnités d’expatriation":{ + }, + "6634-Indemnités de transport":{ + }, + "6638-Autres indemnités et avantages divers":{ + } + }, + "664-Charges sociales":{ + "6641-Charges sociales sur rémunération du personnel national":{ + }, + "6642-Charges sociales sur rémunération du personnel non national":{ + } + }, + "666-Rémunérations et charges sociales de l’exploitant individuel":{ + "6661-Rémunération du travail de l’exploitant":{ + }, + "6662-Charges sociales":{ + } + }, + "667-Rémunération transférée de personnel extérieur":{ + "6671-Personnel intérimaire":{ + }, + "6672-Personnel détaché ou prêté à l’entité":{ + } + }, + "668-Autres charges sociales":{ + "6681-Versements aux syndicats et comités d’entreprise, d’établissement":{ + }, + "6682-Versements aux comités d’hygiène et de sécurité":{ + }, + "6683-Versements et contributions aux autres œuvres sociales":{ + }, + "6684-Médecine du travail et pharmacie":{ + }, + "6685-Assurances et organismes de santé":{ + }, + "6686-Assurances retraite et fonds de pension":{ + }, + "6687-Majorations et pénalités sociales":{ + }, + "6688-Charges sociales diverses":{ + } + } + }, + "67-Frais financiers et charges assimilées":{ + "671-Intérêts des emprunts":{ + "6711-Emprunts obligataires":{ + }, + "6712-Emprunts auprès des établissements de crédit":{ + }, + "6713-Dettes liées à des participations":{ + }, + "6714-Primes de remboursement des obligations":{ + } + }, + "672-Intérêts dans loyers de location acquisition":{ + "6722-Intérêts dans loyers de location acquisition / crédit-bail immobilier":{ + }, + "6723-Intérêts dans loyers de location acquisition / crédit-bail mobilier":{ + }, + "6724-Intérêts dans loyers de location acquisition / location-vente":{ + }, + "6728-Intérêts dans loyers des autres locations acquisition":{ + } + }, + "673-Escomptes accordés":{ + }, + "674-Autres intérêts":{ + "6741-Avances reçues et dépôts créditeurs":{ + }, + "6742-Comptes courants bloqués":{ + }, + "6743-Intérêts sur obligations cautionnées":{ + }, + "6744-Intérêts sur dettes commerciales":{ + }, + "6745-Intérêts bancaires et sur opérations de financement (escompte...)":{ + }, + "6748-Intérêts sur dettes diverses":{ + } + }, + "675-Escomptes des effets de commerce":{ + }, + "676-Pertes de change financières":{ + }, + "677-Pertes sur titres de placement":{ + "6771-Pertes sur cessions de titres de placement":{ + }, + "6772-Mali provenant d’attribution gratuite d’actions au personnel salarié et aux dirigeants":{ + } + }, + "678-Pertes et charges sur risques financiers":{ + "6781-Sur rentes viagères":{ + }, + "6782-Sur opérations financières":{ + }, + "6784-Sur instruments de trésorerie":{ + } + }, + "679-Charges pour dépréciations et provisions pour risques à court terme financières":{ + "6791-Sur risques financiers":{ + }, + "6795-Sur titres de placement":{ + }, + "6798-Autres charges pour dépréciations et provisions pour risques à court terme financières":{ + } + } + }, + "68-Dotations aux amortissements":{ + "681-Dotations aux amortissements d’exploitation":{ + "6812-Dotations aux amortissements des immobilisations incorporelles":{ + }, + "6813-Dotations aux amortissements des immobilisations corporelles":{ + } + } + }, + "69-Dotations aux provisions et aux dépréciations":{ + "691-Dotations aux provisions et aux dépréciations d’exploitation":{ + "6911-Dotations aux provisions pour risques et charges":{ + }, + "6913-Dotations aux dépréciations des immobilisations incorporelles":{ + }, + "6914-Dotations aux dépréciations des immobilisations corporelles":{ + } + }, + "697-Dotations aux provisions et aux dépréciations financières":{ + "6971-Dotations aux provisions pour risques et charges":{ + }, + "6972-Dotations aux dépréciations des immobilisations financières":{ + } + } + }, + "root_type":"Expense" + }, + "7-Comptes de produits des activités ordinaires":{ + "70-Ventes":{ + "701-Ventes de marchandises":{ + "7011-Dans la Région":{ + }, + "7012-Hors Région":{ + }, + "7013-Aux entités du groupe dans la Région":{ + }, + "7014-Aux entités du groupe hors Région":{ + }, + "7015-Sur internet":{ + }, + "7019-Rabais, remises, ristournes accordés (non ventilés)":{ + } + }, + "702-Ventes de produits finis":{ + "7021-Dans la Région":{ + }, + "7022-Hors Région":{ + }, + "7023-Aux entités du groupe dans la Région":{ + }, + "7024-Aux entités du groupe hors Région":{ + }, + "7025-Sur internet":{ + }, + "7029-Rabais, remises, ristournes accordés (non ventilés)":{ + } + }, + "703-Ventes de produits intermédiaires":{ + "7031-Dans la Région":{ + }, + "7032-Hors Région":{ + }, + "7033-Aux entités du groupe dans la Région":{ + }, + "7034-Aux entités du groupe hors Région":{ + }, + "7035-Sur internet":{ + }, + "7039-Rabais, remises, ristournes accordés (non ventilés)":{ + } + }, + "704-Ventes de produits résiduels":{ + "7041-Dans la Région":{ + }, + "7042-Hors Région":{ + }, + "7043-Aux entités du groupe dans la Région":{ + }, + "7044-Aux entités du groupe hors Région":{ + }, + "7045-Sur internet":{ + }, + "7049-Rabais, remises, ristournes accordés (non ventilés)":{ + } + }, + "705-Travaux facturés":{ + "7051-Dans la Région":{ + }, + "7052-Hors Région":{ + }, + "7053-Aux entités du groupe dans la Région":{ + }, + "7054-Aux entités du groupe hors Région":{ + }, + "7055-Sur internet":{ + }, + "7059-Rabais, remises, ristournes accordés (non ventilés)":{ + } + }, + "706-Services vendus":{ + "7061-Dans la Région":{ + }, + "7062-Hors Région":{ + }, + "7063-Aux entités du groupe dans la Région":{ + }, + "7064-Aux entités du groupe hors Région":{ + }, + "7065-Sur internet":{ + }, + "7069-Rabais, remises, ristournes accordés (non ventilés)":{ + } + }, + "707-Produits accessoires":{ + "7071-Ports, emballages perdus et autres frais facturés":{ + }, + "7072-Commissions et courtages":{ + }, + "7073-Locations":{ + }, + "7074-Bonis sur reprises et cessions d’emballages":{ + }, + "7075-Mise à disposition de personnel":{ + }, + "7076-Redevances pour brevets, logiciels, marques et droits similaires":{ + }, + "7077-Services exploités dans l’intérêt du personnel":{ + }, + "7078-Autres produits accessoires":{ + } + } + }, + "71-Subventions d’exploitation":{ + "711-Sur produits à l’exportation":{ + }, + "712-Sur produits à l’importation":{ + }, + "713-Sur produits de péréquation":{ + }, + "714-Indemnités et subventions d’exploitation (entité agricole)":{ + }, + "718-Autres subventions d’exploitation":{ + "7181-Versées par l’État et les collectivités publiques":{ + }, + "7182-Versées par les organismes internationaux":{ + }, + "7183-Versées par des tiers":{ + } + } + }, + "72-Production immobilisée":{ + "721-Immobilisations incorporelles":{ + }, + "722-Immobilisations corporelles":{ + "7221-Immobilisations corporelles (hors actifs biologiques)":{ + }, + "7222-Immobilisations corporelles (actifs biologiques)":{ + } + }, + "724-Production auto-consommée":{ + }, + "726-Immobilisations financières":{ + } + }, + "73-Variations des stocks de biens et de services produits":{ + "734-Variations des stocks de produits en cours":{ + "7341-Produits en cours":{ + }, + "7342-Travaux en cours":{ + } + }, + "735-Variations des en-cours de services":{ + "7351-Études en cours":{ + }, + "7352-Prestations de services en cours":{ + } + }, + "736-Variations des stocks de produits finis":{ + }, + "737-Variations des stocks de produits intermédiaires et résiduels":{ + "7371-Produits intermédiaires":{ + }, + "7372-Produits résiduels":{ + } + } + }, + "75-Autres produits":{ + "751-Profits sur créances clients et autres débiteurs":{ + }, + "752-Quote-part de résultat sur opérations faites en commun":{ + "7521-Quote-part transférée de pertes (comptabilité du gérant)":{ + }, + "7525-Bénéfices attribués par transfert (comptabilité des associés non gérants)":{ + } + }, + "754-Produits des cessions courantes d’immobilisations":{ + "7541-Immobilisations incorporelles":{ + }, + "7542-Immobilisations corporelles":{ + } + }, + "756-Gains de change sur créances et dettes commerciales":{ + }, + "758-Produits divers":{ + "7581-Indemnités de fonction et autres rémunérations d’administrateurs":{ + }, + "7582-Indemnités d’assurances reçues":{ + }, + "7588-Autres produits divers":{ + } + }, + "759-Reprises de charges pour dépréciations et provisions pour risques à court terme d’exploitation":{ + "7591-Sur risques à court terme":{ + }, + "7593-Sur stocks":{ + }, + "7594-Sur créances":{ + }, + "7598-Sur autres charges pour dépréciations et provisions pour risques à court terme d’exploitation":{ + } + } + }, + "77-Revenus financiers et produits assimilés":{ + "771-Intérêts de prêts et créances diverses":{ + "7712-Intérêts de prêts":{ + }, + "7713-Intérêts sur créances diverses":{ + } + }, + "772-Revenus de participations et autres titres immobilisés":{ + "7721-Revenus des titres de participation":{ + }, + "7722-Revenus autres titres immobilisés":{ + } + }, + "773-Escomptes obtenus":{ + }, + "774-Revenus de placement":{ + "7745-Revenus des obligations":{ + }, + "7746-Revenus des titres de placement":{ + } + }, + "775-Intérêts dans loyers de location acquisition":{ + }, + "776-Gains de change financiers":{ + }, + "777-Gains sur cessions de titres de placement":{ + }, + "778-Gains sur risques financiers":{ + "7781-Sur rentes viagères":{ + }, + "7782-Sur opérations financières":{ + }, + "7784-Sur instruments de trésorerie":{ + } + }, + "779-Reprises de charges pour dépréciations et provisions à court terme financières":{ + "7791-Sur risques financiers":{ + }, + "7795-Sur titres de placement":{ + }, + "7798-Sur autres charges pour dépréciations et provisions pour risques à court terme financières":{ + } + } + }, + "78-Transferts de charges":{ + "781-Transferts de charges d’exploitation":{ + }, + "787-Transferts de charges financières":{ + } + }, + "79-Reprises de provisions, de dépréciations et autres":{ + "791-Reprises de provisions et dépréciations d’exploitation":{ + "7911-Pour risques et charges":{ + }, + "7913-Des immobilisations incorporelles":{ + }, + "7914-Des immobilisations corporelles":{ + } + }, + "797-Reprises de provisions et dépréciations financières":{ + "7971-Pour risques et charges":{ + }, + "7972-Des immobilisations financières":{ + } + }, + "798-Reprises d’amortissements":{ + }, + "799-Reprises de subventions d’investissement":{ + } + }, + "root_type":"Income" + }, + "8-Comptes des autres charges et des autres produits (CHARGES)":{ + "81-Valeurs comptables des cessions d’immobilisations":{ + "811-Immobilisations incorporelles":{ + }, + "812-Immobilisations corporelles":{ + }, + "816-Immobilisations financières":{ + } + }, + "83-Charges hors activités ordinaires":{ + "831-Charges HAO constatées":{ + }, + "833-Charges liées aux opérations de restructuration":{ + }, + "834-Pertes sur créances HAO":{ + }, + "835-Dons et libéralités accordés":{ + }, + "836-Abandons de créances consentis":{ + }, + "837-Charges liées aux opérations de liquidation":{ + }, + "839-Charges pour dépréciations et provisions pour risques à court terme HAO":{ + } + }, + "85-Dotations hors activités ordinaires":{ + "851-Dotations aux provisions réglementées":{ + }, + "852-Dotations aux amortissements HAO":{ + }, + "853-Dotations aux dépréciations HAO":{ + }, + "854-Dotations aux provisions pour risques et charges HAO":{ + }, + "858-Autres dotations HAO":{ + } + }, + "87-Participation des travailleurs":{ + "871-Participation légale aux bénéfices":{ + }, + "874-Participation contractuelle aux bénéfices":{ + }, + "878-Autres participations":{ + } + }, + "89-Impôts sur le résultat":{ + "891-Impôts sur les bénéfices de l’exercice":{ + "8911-Activités exercées dans l’État":{ + }, + "8912-Activités exercées dans les autres États de la Région":{ + }, + "8913-Activités exercées hors Région":{ + } + }, + "892-Rappel d’impôts sur résultats antérieurs":{ + }, + "895-Impôt minimum forfaitaire IMF":{ + }, + "899-Dégrèvements et annulations d’impôts sur résultats antérieurs":{ + "8991-Dégrèvements":{ + }, + "8994-Annulations pour pertes rétroactives":{ + } + } + }, + "root_type":"Expense" + }, + "8-Comptes des autres charges et des autres produits (PRODUITS)":{ + "82-Produits des cessions d’immobilisations":{ + "821-Immobilisations incorporelles":{ + }, + "822-Immobilisations corporelles":{ + }, + "826-Immobilisations financières":{ + } + }, + "84-Produits hors activités ordinaires":{ + "841-Produits HAO constatés":{ + }, + "843-Produits liés aux opérations de restructuration":{ + }, + "844-Indemnités et subventions HAO (entité agricole)":{ + }, + "845-Dons et libéralités obtenus":{ + }, + "846-Abandons de créances obtenus":{ + }, + "847-Produits liés aux opérations de liquidation":{ + }, + "848-Transferts de charges HAO":{ + }, + "849-Reprises de charges pour dépréciations et provisions pour risques à court terme HAO":{ + } + }, + "86-Reprises de charges, provisions et dépréciations HAO":{ + "861-Reprises de provisions réglementées":{ + }, + "862-Reprises d’amortissements HAO":{ + }, + "863-Reprises de dépréciations HAO":{ + }, + "864-Reprises de provisions pour risques et charges HAO":{ + }, + "868-Autres reprises HAO":{ + } + }, + "88-Subventions d’équilibre":{ + "881-État":{ + }, + "884-Collectivités publiques":{ + }, + "886-Groupe":{ + }, + "888-Autres":{ + } + }, + "root_type":"Income" + } + } +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/syscohada_plan_comptable_avec_code.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/syscohada_plan_comptable_avec_code.json new file mode 100644 index 00000000000..e01f01fdfe5 --- /dev/null +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/syscohada_plan_comptable_avec_code.json @@ -0,0 +1,4209 @@ +{ + "country_code":"PLACEHOLDER", + "name":"Syscohada - Plan Comptable avec code", + "tree":{ + "Comptes de ressources durables":{ + "Capital":{ + "Capital social":{ + "Capital souscrit, non appelé":{ + "account_number": "1011" + }, + "Capital souscrit, appelé, non versé":{ + "account_number": "1012" + }, + "Capital souscrit, appelé, versé, non amorti":{ + "account_number": "1013" + }, + "Capital souscrit, appelé, versé, amorti":{ + "account_number": "1014" + }, + "Capital souscrit soumis à des conditions particulières":{ + "account_number": "1018" + }, + "account_number": "101" + }, + "Capital par dotation":{ + "Dotation initiale":{ + "account_number": "1021" + }, + "Dotations complémentaires":{ + "account_number": "1022" + }, + "Autres dotations":{ + "account_number": "1028" + }, + "account_number": "102" + }, + "Capital personnel":{ + "account_number": "103" + }, + "Compte de l’exploitant":{ + "Apports temporaires":{ + "account_number": "1041" + }, + "Opérations courantes":{ + "account_number": "1042" + }, + "Rémunérations, impôts et autres charges personnelles":{ + "account_number": "1043" + }, + "Prélèvements d’autoconsommation":{ + "account_number": "1047" + }, + "Autres prélèvements":{ + "account_number": "1048" + }, + "account_number": "104" + }, + "Primes liées au capital social":{ + "Primes d’émission":{ + "account_number": "1051" + }, + "Primes d’apport":{ + "account_number": "1052" + }, + "Primes de fusion":{ + "account_number": "1053" + }, + "Primes de conversion":{ + "account_number": "1054" + }, + "Autres primes":{ + "account_number": "1058" + }, + "account_number": "105" + }, + "Écarts de réévaluation":{ + "Écarts de réévaluation légale":{ + "account_number": "1061" + }, + "Écarts de réévaluation libre":{ + "account_number": "1062" + }, + "account_number": "106" + }, + "Apporteurs, capital souscrit, non appelé":{ + "account_number": "109" + }, + "account_number": "10" + }, + "Réserves":{ + "Réserve légale":{ + "account_number": "111" + }, + "Réserves statutaires ou contractuelles":{ + "account_number": "112" + }, + "Réserves réglementées":{ + "Réserves de plus-values nettes à long terme":{ + "account_number": "1131" + }, + "Réserves d’attribution gratuite d’actions au personnel salarié et aux dirigeants":{ + "account_number": "1132" + }, + "Réserves consécutives à l’octroi de subventions d’investissement":{ + "account_number": "1133" + }, + "Réserves des valeurs mobilières donnant accès au capital":{ + "account_number": "1134" + }, + "Autres réserves réglementées":{ + "account_number": "1135" + }, + "account_number": "113" + }, + "Autres réserves":{ + "Réserves facultatives":{ + "account_number": "1181" + }, + "Réserves diverses":{ + "account_number": "1188" + }, + "account_number": "118" + }, + "account_number": "11" + }, + "Report à nouveau":{ + "Report à nouveau créditeur":{ + "account_number": "121" + }, + "Report à nouveau débiteur":{ + "Perte nette à reporter":{ + "account_number": "1291" + }, + "Perte Amortissements réputés différés":{ + "account_number": "1292" + }, + "account_number": "129" + }, + "account_number": "12" + }, + "Résultat net de l’exercice":{ + "Résultat en instance d’affectation":{ + "Résultat en instance d’affectation : bénéfice":{ + "account_number": "1301" + }, + "Résultat en instance d’affectation : perte":{ + "account_number": "1309" + }, + "account_number": "130" + }, + "Résultat net : bénéfice":{ + "account_number": "131" + }, + "Marge commerciale (MC)":{ + "account_number": "132" + }, + "Valeur ajoutée (VA)":{ + "account_number": "133" + }, + "Excédent brut d’exploitation (EBE)":{ + "account_number": "134" + }, + "Résultat d’exploitation (RE)":{ + "account_number": "135" + }, + "Résultat financier (RF)":{ + "account_number": "136" + }, + "Résultat des activités ordinaires (RAO)":{ + "account_number": "137" + }, + "Résultat hors activités ordinaires (RHAO)":{ + "Résultat de fusion":{ + "account_number": "1381" + }, + "Résultat d’apport partiel d’actif":{ + "account_number": "1382" + }, + "Résultat de scission":{ + "account_number": "1383" + }, + "Résultat de liquidation":{ + "account_number": "1384" + }, + "account_number": "138" + }, + "Résultat net : perte":{ + "account_number": "139" + }, + "account_number": "13" + }, + "Subventions d’investissement":{ + "Subventions d’équipement":{ + "État":{ + "account_number": "1411" + }, + "Régions":{ + "account_number": "1412" + }, + "Départements":{ + "account_number": "1413" + }, + "Communes et collectivités publiques décentralisées":{ + "account_number": "1414" + }, + "Entités publiques ou mixtes":{ + "account_number": "1415" + }, + "Entités et organismes privés":{ + "account_number": "1416" + }, + "Organismes internationaux":{ + "account_number": "1417" + }, + "Autres":{ + "account_number": "1418" + }, + "account_number": "141" + }, + "Autres subventions d’investissement":{ + "account_number": "148" + }, + "account_number": "14" + }, + "Provisions réglementées et fonds assimilés":{ + "Amortissements dérogatoires":{ + "account_number": "151" + }, + "Plus-values de cession à réinvestir":{ + "account_number": "152" + }, + "Fonds réglementés":{ + "Fonds National":{ + "account_number": "1531" + }, + "Prélèvement pour le Budget":{ + "account_number": "1532" + }, + "account_number": "153" + }, + "Provisions spéciales de réévaluation":{ + "account_number": "154" + }, + "Provisions réglementées relatives aux immobilisations":{ + "Reconstitution des gisements miniers et pétroliers":{ + "account_number": "1551" + }, + "account_number": "155" + }, + "Provisions réglementées relatives aux stocks":{ + "Hausse de prix":{ + "account_number": "1561" + }, + "Fluctuation des cours":{ + "account_number": "1562" + }, + "account_number": "156" + }, + "Provisions pour investissement":{ + "account_number": "157" + }, + "Autres provisions et fonds réglementés":{ + "account_number": "158" + }, + "account_number": "15" + }, + "Emprunts et dettes assimilées":{ + "Emprunts obligataires":{ + "Emprunts obligataires ordinaires":{ + "account_number": "1611" + }, + "Emprunts obligataires convertibles en actions":{ + "account_number": "1612" + }, + "Emprunts obligataires remboursables en actions":{ + "account_number": "1613" + }, + "Autres emprunts obligataires":{ + "account_number": "1618" + }, + "account_number": "161" + }, + "Emprunts et dettes auprès des établissements de crédit":{ + "account_number": "162" + }, + "Avances reçues de l’État":{ + "account_number": "163" + }, + "Avances reçues et comptes courants bloqués":{ + "account_number": "164" + }, + "Dépôts et cautionnements reçus":{ + "Dépôts":{ + "account_number": "1651" + }, + "Cautionnements":{ + "account_number": "1652" + }, + "account_number": "165" + }, + "Intérêts courus":{ + "Sur emprunts obligataires":{ + "account_number": "1661" + }, + "Sur emprunts et dettes auprès des établissements de crédit":{ + "account_number": "1662" + }, + "Sur avances reçues de l’État":{ + "account_number": "1663" + }, + "Sur avances reçues et comptes courants bloqués":{ + "account_number": "1664" + }, + "Sur dépôts et cautionnements reçus":{ + "account_number": "1665" + }, + "Sur avances assorties de conditions particulières":{ + "account_number": "1667" + }, + "Sur autres emprunts et dettes":{ + "account_number": "1668" + }, + "account_number": "166" + }, + "Avances assorties de conditions particulières":{ + "Avances bloquées pour augmentation du capital":{ + "account_number": "1671" + }, + "Avances conditionnées par l’État":{ + "account_number": "1672" + }, + "Avances conditionnées par les autres organismes africains":{ + "account_number": "1673" + }, + "Avances conditionnées par les organismes internationaux":{ + "account_number": "1674" + }, + "account_number": "167" + }, + "Autres emprunts et dettes":{ + "Rentes viagères capitalisées":{ + "account_number": "1681" + }, + "Billets de fonds":{ + "account_number": "1682" + }, + "Dettes consécutives à des titres empruntés":{ + "account_number": "1683" + }, + "Emprunts participatifs":{ + "account_number": "1684" + }, + "Participation des travailleurs aux bénéfices":{ + "account_number": "1685" + }, + "Emprunts et dettes contractés auprès des autres tiers":{ + "account_number": "1686" + }, + "account_number": "168" + }, + "account_number": "16" + }, + "Dettes de location acquisition":{ + "Dettes de location acquisition / crédit bail immobilier":{ + "account_number": "172" + }, + "Dettes de location acquisition / crédit bail mobilier":{ + "account_number": "173" + }, + "Dettes de location acquisition / location de vente":{ + "account_number": "174" + }, + "Intérêts courus":{ + "Sur dettes de location acquisition / crédit-bail immobilier":{ + "account_number": "1762" + }, + "Sur dettes de location acquisition / crédit-bail mobilier":{ + "account_number": "1763" + }, + "Sur dettes de location acquisition / location-vente":{ + "account_number": "1764" + }, + "Sur autres dettes de location acquisition":{ + "account_number": "1768" + }, + "account_number": "176" + }, + "Autres dettes de location acquisition":{ + "account_number": "178" + }, + "account_number": "17" + }, + "Dettes liées à des participations et comptes de liaison des établissements et sociétés en participation":{ + "Dettes liées à des participations":{ + "Dettes liées à des participations (groupe)":{ + "account_number": "1811" + }, + "Dettes liées à des participations (hors groupe)":{ + "account_number": "1812" + }, + "account_number": "181" + }, + "Dettes liées à des sociétés en participation":{ + "account_number": "182" + }, + "Intérêts courus sur dettes liées à des participations":{ + "account_number": "183" + }, + "Comptes permanents bloqués des établissements et succursales":{ + "account_number": "184" + }, + "Comptes permanents non bloqués des établissements et succursales":{ + "account_number": "185" + }, + "Comptes de liaison charges":{ + "account_number": "186" + }, + "Comptes de liaison produits":{ + "account_number": "187" + }, + "Comptes de liaison des sociétés en participation":{ + "account_number": "188" + }, + "account_number": "18" + }, + "Provisions pour risques et charges":{ + "Provisions pour litiges":{ + "account_number": "191" + }, + "Provisions pour garanties données aux clients":{ + "account_number": "192" + }, + "Provisions pour pertes sur marchés à achèvement futur":{ + "account_number": "193" + }, + "Provisions pour pertes de change":{ + "account_number": "194" + }, + "Provisions pour impôts":{ + "account_number": "195" + }, + "Provisions pour pensions et obligations similaires":{ + "Provisions pour pensions et obligations similaires engagement de retraite":{ + "account_number": "1961" + }, + "Actif du régime de retraite":{ + "account_number": "1962" + }, + "account_number": "196" + }, + "Provisions pour restructuration":{ + "account_number": "197" + }, + "Autres provisions pour risques et charges":{ + "Provisions pour amendes et pénalités":{ + "account_number": "1981" + }, + "Provisions pour propre assureur":{ + "account_number": "1983" + }, + "Provisions pour démantèlement et remise en état":{ + "account_number": "1984" + }, + "Provisions pour droits à réduction ou avantage en nature (chèques cadeau, cartes de fidélité...)":{ + "account_number": "1985" + }, + "Provisions pour divers risques et charges":{ + "account_number": "1988" + }, + "account_number": "198" + }, + "account_number": "19" + }, + "root_type":"Equity", + "account_number": "1" + }, + "Comptes d’actif immobilisé":{ + "Immobilisations incorporelles":{ + "account_type":"Fixed Asset", + "Frais de développement":{ + "account_type":"Fixed Asset", + "account_number": "211" + }, + "Brevets, licences, concessions et droits similaires":{ + "account_type":"Fixed Asset", + "Brevets":{ + "account_type":"Fixed Asset", + "account_number": "2121" + }, + "Licences":{ + "account_type":"Fixed Asset", + "account_number": "2122" + }, + "Concessions de service public":{ + "account_type":"Fixed Asset", + "account_number": "2123" + }, + "Autres concessions et droits similaires":{ + "account_type":"Fixed Asset", + "account_number": "2128" + }, + "account_number": "212" + }, + "Logiciels et sites internet":{ + "account_type":"Fixed Asset", + "Logiciels":{ + "account_type":"Fixed Asset", + "account_number": "2131" + }, + "Sites internet":{ + "account_type":"Fixed Asset", + "account_number": "2132" + }, + "account_number": "213" + }, + "Marques":{ + "account_type":"Fixed Asset", + "account_number": "214" + }, + "Fonds commercial":{ + "account_type":"Fixed Asset", + "account_number": "215" + }, + "Droit au bail":{ + "account_type":"Fixed Asset", + "account_number": "216" + }, + "Investissements de création":{ + "account_type":"Fixed Asset", + "account_number": "217" + }, + "Autres droits et valeurs incorporels":{ + "account_type":"Fixed Asset", + "Frais de prospection et d’évaluation de ressources minérales":{ + "account_type":"Fixed Asset", + "account_number": "2181" + }, + "Coûts d’obtention du contrat":{ + "account_type":"Fixed Asset", + "account_number": "2182" + }, + "Fichiers clients, notices, titres de journaux et magazines":{ + "account_type":"Fixed Asset", + "account_number": "2183" + }, + "Coûts des franchises":{ + "account_type":"Fixed Asset", + "account_number": "2184" + }, + "Divers droits et valeurs incorporelles":{ + "account_type":"Fixed Asset", + "account_number": "2188" + }, + "account_number": "218" + }, + "Immobilisations incorporelles en cours":{ + "account_type":"Fixed Asset", + "Frais de développement":{ + "account_type":"Fixed Asset", + "account_number": "2191" + }, + "Logiciels et internet":{ + "account_type":"Fixed Asset", + "account_number": "2193" + }, + "Autres droits et valeurs incorporels":{ + "account_type":"Fixed Asset", + "account_number": "2198" + }, + "account_number": "219" + }, + "account_number": "21" + }, + "Terrains":{ + "account_type":"Fixed Asset", + "Terrains agricoles et forestiers":{ + "account_type":"Fixed Asset", + "Terrains d’exploitation agricole":{ + "account_type":"Fixed Asset", + "account_number": "2211" + }, + "Terrains d’exploitation forestière":{ + "account_type":"Fixed Asset", + "account_number": "2212" + }, + "Autres terrains":{ + "account_type":"Fixed Asset", + "account_number": "2218" + }, + "account_number": "221" + }, + "Terrains nus":{ + "account_type":"Fixed Asset", + "Terrains à bâtir":{ + "account_type":"Fixed Asset", + "account_number": "2221" + }, + "Autres terrains nus":{ + "account_type":"Fixed Asset", + "account_number": "2228" + }, + "account_number": "222" + }, + "Terrains bâtis":{ + "account_type":"Fixed Asset", + "Pour bâtiments industriels et agricoles":{ + "account_type":"Fixed Asset", + "account_number": "2231" + }, + "Pour bâtiments administratifs et commerciaux":{ + "account_type":"Fixed Asset", + "account_number": "2232" + }, + "Pour bâtiments affectés aux autres opérations professionnelles":{ + "account_type":"Fixed Asset", + "account_number": "2234" + }, + "Pour bâtiments affectés aux autres opérations non professionnelles":{ + "account_type":"Fixed Asset", + "account_number": "2235" + }, + "Autres terrains bâtis":{ + "account_type":"Fixed Asset", + "account_number": "2238" + }, + "account_number": "223" + }, + "Travaux de mise en valeur des terrains":{ + "account_type":"Fixed Asset", + "Plantation d’arbres et d’arbustes":{ + "account_type":"Fixed Asset", + "account_number": "2241" + }, + "Améliorations du fonds":{ + "account_type":"Fixed Asset", + "account_number": "2245" + }, + "Autres travaux":{ + "account_type":"Fixed Asset", + "account_number": "2248" + }, + "account_number": "224" + }, + "Terrains de carrières tréfonds":{ + "account_type":"Fixed Asset", + "Carrières":{ + "account_type":"Fixed Asset", + "account_number": "2251" + }, + "account_number": "225" + }, + "Terrains aménagés":{ + "account_type":"Fixed Asset", + "Parkings":{ + "account_type":"Fixed Asset", + "account_number": "2261" + }, + "account_number": "226" + }, + "Terrains mis en concession":{ + "account_type":"Fixed Asset", + "account_number": "227" + }, + "Autres terrains":{ + "account_type":"Fixed Asset", + "Terrains immeubles de placement":{ + "account_type":"Fixed Asset", + "account_number": "2281" + }, + "Terrains des logements affectés au personnel":{ + "account_type":"Fixed Asset", + "account_number": "2285" + }, + "Terrains de location acquisition":{ + "account_type":"Fixed Asset", + "account_number": "2286" + }, + "Divers terrains":{ + "account_type":"Fixed Asset", + "account_number": "2288" + }, + "account_number": "228" + }, + "Aménagements de terrains en cours":{ + "account_type":"Fixed Asset", + "Terrains agricoles et forestiers":{ + "account_type":"Fixed Asset", + "account_number": "2291" + }, + "Terrains nus":{ + "account_type":"Fixed Asset", + "account_number": "2292" + }, + "Terrains de carrières tréfonds":{ + "account_type":"Fixed Asset", + "account_number": "2295" + }, + "Autres terrains":{ + "account_type":"Fixed Asset", + "account_number": "2298" + }, + "account_number": "229" + }, + "account_number": "22" + }, + "Bâtiments, installations techniques et agencements":{ + "Bâtiments industriels, agricoles, administratifs et commerciaux sur sol propre":{ + "Bâtiments industriels":{ + "account_number": "2311" + }, + "Bâtiments agricoles":{ + "account_number": "2312" + }, + "Bâtiments administratifs et commerciaux":{ + "account_number": "2313" + }, + "Bâtiments affectés au logement du personnel":{ + "account_number": "2314" + }, + "Bâtiments immeubles de placement":{ + "account_number": "2315" + }, + "Bâtiments de location acquisition":{ + "account_number": "2316" + }, + "account_number": "231" + }, + "Bâtiments industriels, agricoles, administratifs et commerciaux sur sol d’autrui":{ + "Bâtiments industriels":{ + "account_number": "2321" + }, + "Bâtiments agricoles":{ + "account_number": "2322" + }, + "Bâtiments administratifs et commerciaux":{ + "account_number": "2323" + }, + "Bâtiments affectés au logement du personnel":{ + "account_number": "2324" + }, + "Bâtiments immeubles de placement":{ + "account_number": "2325" + }, + "Bâtiments de location acquisition":{ + "account_number": "2326" + }, + "account_number": "232" + }, + "Ouvrages d’infrastructure":{ + "Voies de terre":{ + "account_number": "2331" + }, + "Voies de fer":{ + "account_number": "2332" + }, + "Voies d’eau":{ + "account_number": "2333" + }, + "Barrages, Digues":{ + "account_number": "2334" + }, + "Pistes d’aérodrome":{ + "account_number": "2335" + }, + "Autres ouvrages d’infrastructures":{ + "account_number": "2338" + }, + "account_number": "233" + }, + "Aménagements, agencements et installations techniques":{ + "Installations complexes spécialisées sur sol propre":{ + "account_number": "2341" + }, + "Installations complexes spécialisées sur sol d’autrui":{ + "account_number": "2342" + }, + "Installations à caractère spécifique sur sol propre":{ + "account_number": "2343" + }, + "Installations à caractère spécifique sur sol d’autrui":{ + "account_number": "2344" + }, + "Aménagements et agencements des bâtiments":{ + "account_number": "2345" + }, + "account_number": "234" + }, + "Aménagements de bureaux":{ + "Installations générales":{ + "account_number": "2351" + }, + "Autres aménagements de bureaux":{ + "account_number": "2358" + }, + "account_number": "235" + }, + "Bâtiments industriels, agricoles et commerciaux mis en concession":{ + "account_number": "237" + }, + "Autres installations et agencements":{ + "account_number": "238" + }, + "Bâtiments aménagements, agencements et installations en cours":{ + "Bâtiments en cours":{ + "account_number": "2391" + }, + "Installations en cours":{ + "account_number": "2392" + }, + "Ouvrages d’infrastructure en cours":{ + "account_number": "2393" + }, + "Aménagements et agencements et installations techniques en cours":{ + "account_number": "2394" + }, + "Aménagements de bureaux en cours":{ + "account_number": "2395" + }, + "Autres installations et agencements en cours":{ + "account_number": "2398" + }, + "account_number": "239" + }, + "account_number": "23" + }, + "Matériel, mobilier et actifs biologiques":{ + "Matériel et outillage industriel et commercial":{ + "Matériel industriel":{ + "account_number": "2411" + }, + "Outillage industriel":{ + "account_number": "2412" + }, + "Matériel commercial":{ + "account_number": "2413" + }, + "Outillage commercial":{ + "account_number": "2414" + }, + "Matériel & outillage industriel et commercial de location-acquisition":{ + "account_number": "2416" + }, + "account_number": "241" + }, + "Matériel et outillage agricole":{ + "Matériel agricole":{ + "account_number": "2421" + }, + "Outillage agricole":{ + "account_number": "2422" + }, + "Matériel & outillage agricole de location-acquisition":{ + "account_number": "2426" + }, + "account_number": "242" + }, + "Matériel d’emballage récupérable et identifiable":{ + "account_number": "243" + }, + "Matériel et mobilier":{ + "Matériel de bureau":{ + "account_number": "2441" + }, + "Matériel informatique":{ + "account_number": "2442" + }, + "Matériel bureautique":{ + "account_number": "2443" + }, + "Mobilier de bureau":{ + "account_number": "2444" + }, + "Matériel et mobilier immeubles de placement":{ + "account_number": "2445" + }, + "Matériel et mobilier de location acquisition":{ + "account_number": "2446" + }, + "Matériel et mobilier des logements du personnel":{ + "account_number": "2447" + }, + "account_number": "244" + }, + "Matériel de transport":{ + "Matériel automobile":{ + "account_number": "2451" + }, + "Matériel ferroviaire":{ + "account_number": "2452" + }, + "Matériel fluvial, lagunaire":{ + "account_number": "2453" + }, + "Matériel naval":{ + "account_number": "2454" + }, + "Matériel aérien":{ + "account_number": "2455" + }, + "Matériel de transport de location-acquisition":{ + "account_number": "2456" + }, + "Matériel hippomobile":{ + "account_number": "2457" + }, + "Autres matériels de transport":{ + "account_number": "2458" + }, + "account_number": "245" + }, + "Actifs biologiques":{ + "Cheptel, animaux de trait":{ + "account_number": "2461" + }, + "Cheptel, animaux reproducteurs":{ + "account_number": "2462" + }, + "Animaux de garde":{ + "account_number": "2463" + }, + "Plantations agricoles":{ + "account_number": "2465" + }, + "Autres actifs biologiques":{ + "account_number": "2468" + }, + "account_number": "246" + }, + "Agencements, aménagements du matériel et actifs biologiques":{ + "Agencements et aménagements du matériel":{ + "account_number": "2471" + }, + "Agencements et aménagements des actifs biologiques":{ + "account_number": "2472" + }, + "Autres agencements, aménagements du matériel et actifs biologiques":{ + "account_number": "2478" + }, + "account_number": "247" + }, + "Autres matériels et mobiliers":{ + "Collections et œuvres d’art":{ + "account_number": "2481" + }, + "Divers matériels mobiliers":{ + "account_number": "2488" + }, + "account_number": "248" + }, + "Matériels et actifs biologiques en cours":{ + "Matériel et outillage industriel et commercial":{ + "account_number": "2491" + }, + "Matériel et outillage agricole":{ + "account_number": "2492" + }, + "Matériel d’emballage récupérable et identifiable":{ + "account_number": "2493" + }, + "Matériel et mobilier de bureau":{ + "account_number": "2494" + }, + "Matériel de transport":{ + "account_number": "2495" + }, + "Actifs biologiques":{ + "account_number": "2496" + }, + "Agencements aménagements du matériel et actifs biologiques":{ + "account_number": "2497" + }, + "Autres matériels et actifs biologiques en cours":{ + "account_number": "2498" + }, + "account_number": "249" + }, + "account_number": "24" + }, + "Avances et acomptes versés sur immobilisations":{ + "Avances et acomptes versés sur immobilisations incorporelles":{ + "account_number": "251" + }, + "Avances et acomptes versés sur immobilisations corporelles":{ + "account_number": "252" + }, + "account_number": "25" + }, + "Titres de participation":{ + "Titres de participation dans des sociétés sous contrôle exclusif":{ + "account_number": "261" + }, + "Titres de participation dans des sociétés sous contrôle conjoint":{ + "account_number": "262" + }, + "Titres de participation dans des sociétés conférant une influence notable":{ + "account_number": "263" + }, + "Participations dans des organismes professionnels":{ + "account_number": "265" + }, + "Parts dans des groupements d’intérêt économique (GIE)":{ + "account_number": "266" + }, + "Autres titres de participation":{ + "account_number": "268" + }, + "account_number": "26" + }, + "Autres immobilisations financières":{ + "Prêts et créances":{ + "Prêts participatifs":{ + "account_number": "2711" + }, + "Prêts aux associés":{ + "account_number": "2712" + }, + "Billets de fonds":{ + "account_number": "2713" + }, + "Titres prêtés":{ + "account_number": "2714" + }, + "Autres prêts et créances":{ + "account_number": "2718" + }, + "account_number": "271" + }, + "Prêts au personnel":{ + "Prêts immobiliers":{ + "account_number": "2721" + }, + "Prêts mobiliers et d’installation":{ + "account_number": "2722" + }, + "Autres prêts au personnel":{ + "account_number": "2728" + }, + "account_number": "272" + }, + "Créances sur l’État":{ + "Retenues de garantie":{ + "account_number": "2731" + }, + "Fonds réglementé":{ + "account_number": "2733" + }, + "Créances sur le concédant":{ + "account_number": "2734" + }, + "Autres créances sur l’État":{ + "account_number": "2738" + }, + "account_number": "273" + }, + "Titres immobilisés":{ + "Titres immobilisés de l’activité de portefeuille (TIAP)":{ + "account_number": "2741" + }, + "Titres participatifs":{ + "account_number": "2742" + }, + "Certificats d’investissement":{ + "account_number": "2743" + }, + "Parts de fonds commun de placement (FCP)":{ + "account_number": "2744" + }, + "Obligations":{ + "account_number": "2745" + }, + "Actions ou parts propres":{ + "account_number": "2746" + }, + "Autres titres immobilisés":{ + "account_number": "2748" + }, + "account_number": "274" + }, + "Dépôts et cautionnements versés":{ + "Dépôts pour loyers d’avance":{ + "account_number": "2751" + }, + "Dépôts pour l’électricité":{ + "account_number": "2752" + }, + "Dépôts pour l’eau":{ + "account_number": "2753" + }, + "Dépôts pour le gaz":{ + "account_number": "2754" + }, + "Dépôts pour le téléphone, le télex, la télécopie":{ + "account_number": "2755" + }, + "Cautionnements sur marchés publics":{ + "account_number": "2756" + }, + "Cautionnements sur autres opérations":{ + "account_number": "2757" + }, + "Autres dépôts et cautionnements":{ + "account_number": "2758" + }, + "account_number": "275" + }, + "Intérêts courus":{ + "Prêts et créances non commerciales":{ + "account_number": "2761" + }, + "Prêts au personnel":{ + "account_number": "2762" + }, + "Créances sur l’État":{ + "account_number": "2763" + }, + "Titres immobilisés":{ + "account_number": "2764" + }, + "Dépôts et cautionnements versés":{ + "account_number": "2765" + }, + "Créances rattachées à des participations":{ + "account_number": "2767" + }, + "Immobilisations financières diverses":{ + "account_number": "2768" + }, + "account_number": "276" + }, + "Créances rattachées à des participations et avances à des GIE":{ + "Créances rattachées à des participations (groupe)":{ + "account_number": "2771" + }, + "Créances rattachées à des participations (hors groupe)":{ + "account_number": "2772" + }, + "Créances rattachées à des sociétés en participation":{ + "account_number": "2773" + }, + "Avances à des Groupements d’intérêt économique (GIE)":{ + "account_number": "2774" + }, + "account_number": "277" + }, + "Immobilisations financières diverses":{ + "Créances diverses groupe":{ + "account_number": "2781" + }, + "Créances diverses hors groupe":{ + "account_number": "2782" + }, + "Banques dépôts à terme":{ + "account_number": "2784" + }, + "Or et métaux précieux":{ + "account_number": "2785" + }, + "Autres immobilisations financières":{ + "account_number": "2788" + }, + "account_number": "278" + }, + "account_number": "27" + }, + "Amortissements":{ + "account_type":"Accumulated Depreciation", + "Amortissements des immobilisations corporelles":{ + "account_type":"Accumulated Depreciation", + "Amortissements des frais de développement":{ + "account_type":"Accumulated Depreciation", + "account_number": "2811" + }, + "Amortissements des brevets, licences, concessions et droits similaires":{ + "account_type":"Accumulated Depreciation", + "account_number": "2812" + }, + "Amortissements des logiciels et sites internet":{ + "account_type":"Accumulated Depreciation", + "account_number": "2813" + }, + "Amortissements des marques":{ + "account_type":"Accumulated Depreciation", + "account_number": "2814" + }, + "Amortissements du fonds commercial":{ + "account_type":"Accumulated Depreciation", + "account_number": "2815" + }, + "Amortissements du droit au bail":{ + "account_type":"Accumulated Depreciation", + "account_number": "2816" + }, + "Amortissements des investissements de création":{ + "account_type":"Accumulated Depreciation", + "account_number": "2817" + }, + "Amortissements des autres droits et valeurs incorporels":{ + "account_type":"Accumulated Depreciation", + "account_number": "2818" + }, + "account_number": "281" + }, + "Amortissements des terrains":{ + "Amortissements des travaux de mise en valeur des terrains":{ + "account_number": "2824" + }, + "account_number": "282" + }, + "Amortissements des bâtiments, installations techniques et agencements":{ + "Amortissements des bâtiments industriels, agricoles, administratifs et commerciaux sur sol propre":{ + "account_number": "2831" + }, + "Amortissements des bâtiments industriels, agricoles, administratifs et commerciaux sur sol d’autrui":{ + "account_number": "2832" + }, + "Amortissements des ouvrages d’infrastructure":{ + "account_number": "2833" + }, + "Amortissements des aménagements, agencements et installations techniques":{ + "account_number": "2834" + }, + "Amortissements des aménagements de bureaux":{ + "account_number": "2835" + }, + "Amortissements des bâtiments industriels, agricoles et commerciaux mis en concession":{ + "account_number": "2837" + }, + "Amortissements des autres installations et agencements":{ + "account_number": "2838" + }, + "account_number": "283" + }, + "Amortissements du matériel":{ + "Amortissements du matériel et outillage industriel et commercial":{ + "account_number": "2841" + }, + "Amortissements du matériel et outillage agricole":{ + "account_number": "2842" + }, + "Amortissements du matériel d’emballage récupérable et identifiable":{ + "account_number": "2843" + }, + "Amortissements du matériel et mobilier":{ + "account_number": "2844" + }, + "Amortissements du matériel de transport":{ + "account_number": "2845" + }, + "Amortissements des actifs biologiques":{ + "account_number": "2846" + }, + "Amortissements des agencements et aménagements du matériel et des actifs biologiques":{ + "account_number": "2847" + }, + "Amortissements des autres matériels":{ + "account_number": "2848" + }, + "account_number": "284" + }, + "account_number": "28" + }, + "Dépréciations des immobilisations":{ + "Dépréciations des immobilisations incorporelles":{ + "Dépréciations des frais de développement":{ + "account_number": "2911" + }, + "Dépréciations des brevets, licences, concessions et droits similaires":{ + "account_number": "2912" + }, + "Dépréciations des logiciels et sites internet":{ + "account_number": "2913" + }, + "Dépréciations des marques":{ + "account_number": "2914" + }, + "Dépréciations du fonds commercial":{ + "account_number": "2915" + }, + "Dépréciations du droit au bail":{ + "account_number": "2916" + }, + "Dépréciations des investissements de création":{ + "account_number": "2917" + }, + "Dépréciations des autres droits et valeurs incorporels":{ + "account_number": "2918" + }, + "Dépréciations des immobilisations incorporelles en cours":{ + "account_number": "2919" + }, + "account_number": "291" + }, + "Dépréciations des terrains":{ + "Dépréciations des terrains agricoles et forestiers":{ + "account_number": "2921" + }, + "Dépréciations des terrains nus":{ + "account_number": "2922" + }, + "Dépréciations des terrains bâtis":{ + "account_number": "2923" + }, + "Dépréciations des travaux de mise en valeur des terrains":{ + "account_number": "2924" + }, + "Dépréciations des terrains de gisement":{ + "account_number": "2925" + }, + "Dépréciations des terrains aménagés":{ + "account_number": "2926" + }, + "Dépréciations des terrains mis en concession":{ + "account_number": "2927" + }, + "Dépréciations des autres terrains":{ + "account_number": "2928" + }, + "Dépréciations des aménagements de terrains en cours":{ + "account_number": "2929" + }, + "account_number": "292" + }, + "Dépréciations des bâtiments, installations techniques et agencements":{ + "Dépréciations des bâtiments industriels, agricoles, administratifs et commerciaux sur sol propre":{ + "account_number": "2931" + }, + "Dépréciations des bâtiments industriels, agricoles, administratifs et commerciaux sur sol d’autrui":{ + "account_number": "2932" + }, + "Dépréciations des ouvrages d’infrastructures":{ + "account_number": "2933" + }, + "Dépréciations des aménagements, agencements et installations techniques":{ + "account_number": "2934" + }, + "Dépréciations des aménagements de bureaux":{ + "account_number": "2935" + }, + "Dépréciations des bâtiments industriels, agricoles et commerciaux mis en concession":{ + "account_number": "2937" + }, + "Dépréciations des autres installations et agencements":{ + "account_number": "2938" + }, + "Dépréciations des bâtiments et installations en cours":{ + "account_number": "2939" + }, + "account_number": "293" + }, + "Dépréciations de matériel, du mobilier et de l’actif biologique":{ + "Dépréciations du matériel et outillage industriel et commercial":{ + "account_number": "2941" + }, + "Dépréciations du matériel et outillage agricole":{ + "account_number": "2942" + }, + "Dépréciations du matériel d’emballage récupérable et identifiable":{ + "account_number": "2943" + }, + "Dépréciations du matériel et mobilier":{ + "account_number": "2944" + }, + "Dépréciations du matériel de transport":{ + "account_number": "2945" + }, + "Dépréciations des actifs biologiques":{ + "account_number": "2946" + }, + "Dépréciations des agencements et aménagements du matériel et des actifs biologiques":{ + "account_number": "2947" + }, + "Dépréciations des autres matériels":{ + "account_number": "2948" + }, + "Dépréciations de matériel en cours":{ + "account_number": "2949" + }, + "account_number": "294" + }, + "Dépréciations des avances et acomptes versés sur immobilisations":{ + "Dépréciations des avances et acomptes versés sur immobilisations incorporelles":{ + "account_number": "2951" + }, + "Dépréciations des avances et acomptes versés sur immobilisations corporelles":{ + "account_number": "2952" + }, + "account_number": "295" + }, + "Dépréciations des titres de participation":{ + "Dépréciations des titres de participation dans des sociétés sous contrôle exclusif":{ + "account_number": "2961" + }, + "Dépréciations des titres de participation dans les sociétés sous contrôle conjoint":{ + "account_number": "2962" + }, + "Dépréciations des titres de participation dans les sociétés conférant une influence notable":{ + "account_number": "2963" + }, + "Dépréciations des participations dans des organismes professionnels":{ + "account_number": "2965" + }, + "Dépréciations des parts dans des GIE":{ + "account_number": "2966" + }, + "Dépréciations des autres titres de participation":{ + "account_number": "2968" + }, + "account_number": "296" + }, + "Dépréciations des autres immobilisations financières":{ + "Dépréciations des prêts et créances":{ + "account_number": "2971" + }, + "Dépréciations des prêts au personnel":{ + "account_number": "2972" + }, + "Dépréciations des créances sur l’État":{ + "account_number": "2973" + }, + "Dépréciations des titres immobilisés":{ + "account_number": "2974" + }, + "Dépréciations des dépôts et cautionnements versés":{ + "account_number": "2975" + }, + "Dépréciations des créances rattachées à des participations et avances à des GIE":{ + "account_number": "2977" + }, + "Dépréciations des créances financières diverses":{ + "account_number": "2978" + }, + "account_number": "297" + }, + "account_number": "29" + }, + "root_type":"Asset", + "account_number": "2" + }, + "Comptes de Stocks":{ + "Marchandises":{ + "Marchandises A":{ + "Marchandises A1":{ + "account_number": "3111" + }, + "Marchandises A2":{ + "account_number": "3112" + }, + "account_number": "311" + }, + "Marchandises B":{ + "Marchandises B1":{ + "account_number": "3121" + }, + "Marchandises B2":{ + "account_number": "3122" + }, + "account_number": "312" + }, + "Actifs biologiques":{ + "Animaux":{ + "account_number": "3131" + }, + "Végétaux":{ + "account_number": "3132" + }, + "account_number": "313" + }, + "Marchandises hors activités ordinaires (HAO)":{ + "account_number": "318" + }, + "account_number": "31" + }, + "Matières premières et fournitures liées":{ + "Matières A":{ + "account_number": "321" + }, + "Matières B":{ + "account_number": "322" + }, + "Fournitures (A, B)":{ + "account_number": "323" + }, + "account_number": "32" + }, + "Autres approvisionnements":{ + "Matières consommables":{ + "account_number": "331" + }, + "Fournitures d’atelier et d’usine":{ + "account_number": "332" + }, + "Fournitures de magasin":{ + "account_number": "333" + }, + "Fournitures de bureau":{ + "account_number": "334" + }, + "Emballages":{ + "Emballages perdus":{ + "account_number": "3351" + }, + "Emballages récupérables non identifiables":{ + "account_number": "3352" + }, + "Emballages à usage mixte":{ + "account_number": "3353" + }, + "Autres emballages":{ + "account_number": "3358" + }, + "account_number": "335" + }, + "Autres matières":{ + "account_number": "338" + }, + "account_number": "33" + }, + "Produits en cours":{ + "Produits en cours":{ + "Produits en cours P1":{ + "account_number": "3411" + }, + "Produits en cours P2":{ + "account_number": "3412" + }, + "account_number": "341" + }, + "Travaux en cours":{ + "Travaux en cours T1":{ + "account_number": "3421" + }, + "Travaux en cours T2":{ + "account_number": "3422" + }, + "account_number": "342" + }, + "Produits intermédiaires en cours":{ + "Produits intermédiaires A":{ + "account_number": "3431" + }, + "Produits intermédiaires B":{ + "account_number": "3432" + }, + "account_number": "343" + }, + "Produits résiduels en cours":{ + "Produits résiduels A":{ + "account_number": "3441" + }, + "Produits résiduels B":{ + "account_number": "3442" + }, + "account_number": "344" + }, + "Actifs biologiques en cours":{ + "Animaux":{ + "account_number": "3451" + }, + "Végétaux":{ + "account_number": "3452" + }, + "account_number": "345" + }, + "account_number": "34" + }, + "Services en cours":{ + "Études en cours":{ + "Études en cours E1":{ + "account_number": "3511" + }, + "Études en cours E2":{ + "account_number": "3512" + }, + "account_number": "351" + }, + "Prestations de services en cours":{ + "Prestations de services S1":{ + "account_number": "3521" + }, + "Prestations de services S2":{ + "account_number": "3522" + } + }, + "account_number": "35" + }, + "Produits finis":{ + "Produits finis A":{ + "account_number": "361" + }, + "Produits finis B":{ + "account_number": "362" + }, + "Actifs biologiques":{ + "Animaux":{ + "account_number": "3631" + }, + "Végétaux":{ + "account_number": "3632" + }, + "Autres stocks (activités annexes)":{ + "account_number": "3638" + }, + "account_number": "363" + }, + "account_number": "36" + }, + "Produits intermédiaires et résiduels":{ + "Produits intermédiaires":{ + "Produits intermédiaires A":{ + "account_number": "3711" + }, + "Produits intermédiaires B":{ + "account_number": "3712" + }, + "account_number": "371" + }, + "Produits résiduels":{ + "Déchets":{ + "account_number": "3721" + }, + "Rebuts":{ + "account_number": "3722" + }, + "Matières de Récupération":{ + "account_number": "3723" + }, + "account_number": "372" + }, + "Actifs biologiques":{ + "Animaux":{ + "account_number": "3731" + }, + "Végétaux":{ + "account_number": "3732" + }, + "Autres stocks (activités annexes)":{ + "account_number": "3738" + }, + "account_number": "373" + }, + "account_number": "37" + }, + "Stocks en cours de route, en consignation ou en dépôt":{ + "account_type":"Stock", + "Marchandises en cours de route":{ + "account_number": "381" + }, + "Matières premières et fournitures liées en cours de route":{ + "account_number": "382" + }, + "Autres approvisionnements en cours de route":{ + "account_number": "383" + }, + "Produits finis en cours de route":{ + "account_number": "386" + }, + "Stock en consignation ou en dépôt":{ + "Stock en consignation":{ + "account_number": "3871" + }, + "Stock en dépôt":{ + "account_number": "3872" + }, + "account_number": "387" + }, + "Stock provenant d’immobilisations mises hors service ou au rebut":{ + "account_number": "388" + }, + "account_number": "38" + }, + "Dépréciations des stocks et encours de production":{ + "Dépréciations des stocks de marchandises":{ + "account_number": "391" + }, + "Dépréciations des stocks de matières premières et fournitures liées":{ + "account_number": "392" + }, + "Dépréciations des stocks d’autres approvisionnements":{ + "account_number": "393" + }, + "Dépréciations des productions en cours":{ + "account_number": "394" + }, + "Dépréciations des services en cours":{ + "account_number": "395" + }, + "Dépréciations des stocks de produits finis":{ + "account_number": "396" + }, + "Dépréciations des stocks de produits intermédiaires et résiduels":{ + "account_number": "397" + }, + "Dépréciations des stocks en cours de route, en consignation ou en dépôt":{ + "account_number": "398" + }, + "account_number": "39" + }, + "root_type":"Asset", + "account_number": "3" + }, + "4-Comptes de Tiers (ACTIF)":{ + "40-Fournisseurs et comptes rattachés (ACTIF)":{ + "Fournisseurs débiteurs":{ + "Fournisseurs Avances et acomptes versés":{ + "account_number": "4091" + }, + "Fournisseurs Groupe avances et acomptes versés":{ + "account_number": "4092" + }, + "Fournisseurs Sous-traitants avances et acomptes versés":{ + "account_number": "4093" + }, + "Fournisseurs Créances pour emballages et matériels à rendre":{ + "account_number": "4094" + }, + "Fournisseurs Rabais, remises, ristournes et autres avoirs à obtenir":{ + "account_number": "4098" + }, + "account_number": "409" + } + }, + "41-Clients et comptes rattachés (ACTIF)":{ + "Clients":{ + "Clients":{ + "account_type":"Receivable", + "account_number": "4111" + }, + "Clients groupe":{ + "account_type":"Receivable", + "account_number": "4112" + }, + "Clients, État et Collectivités publiques":{ + "account_type":"Receivable", + "account_number": "4114" + }, + "Clients, organismes internationaux":{ + "account_type":"Receivable", + "account_number": "4115" + }, + "Clients, réserve de propriété":{ + "account_type":"Receivable", + "account_number": "4116" + }, + "Client, retenues de garantie":{ + "account_type":"Receivable", + "account_number": "4117" + }, + "Clients, dégrèvement de taxes sur la valeur ajoutée (TVA)":{ + "account_type":"Receivable", + "account_number": "4118" + }, + "account_type":"Receivable", + "account_number": "411" + }, + "Clients, effets à recevoir en portefeuille":{ + "Clients, effets à recevoir":{ + "account_type":"Receivable", + "account_number": "4121" + }, + "Clients Groupe, effets à recevoir":{ + "account_type":"Receivable", + "account_number": "4122" + }, + "État et Collectivités publiques, effets à recevoir":{ + "account_type":"Receivable", + "account_number": "4124" + }, + "Organismes Internationaux, effets à recevoir":{ + "account_type":"Receivable", + "account_number": "4125" + }, + "account_type":"Receivable", + "account_number": "412" + }, + "Clients, chèques, effets et autres valeurs impayées":{ + "Clients, chèques impayés":{ + "account_type":"Receivable", + "account_number": "4131" + }, + "Clients, effets impayés":{ + "account_type":"Receivable", + "account_number": "4132" + }, + "Clients, cartes de crédit impayées":{ + "account_type":"Receivable", + "account_number": "4133" + }, + "Clients, autres valeurs impayées":{ + "account_type":"Receivable", + "account_number": "4138" + }, + "account_type":"Receivable", + "account_number": "413" + }, + "Créances sur cessions courantes d’immobilisations":{ + "Créances en compte, immobilisations incorporelles":{ + "account_type":"Receivable", + "account_number": "4141" + }, + "Créances en compte, immobilisations corporelles":{ + "account_type":"Receivable", + "account_number": "4142" + }, + "Effets à recevoir, immobilisations incorporelles":{ + "account_type":"Receivable", + "account_number": "4146" + }, + "Effets à recevoir, immobilisations corporelles":{ + "account_type":"Receivable", + "account_number": "4147" + }, + "account_type":"Receivable", + "account_number": "414" + }, + "Clients, effets escomptés non échus":{ + "account_type":"Receivable", + "account_number": "415" + }, + "Créances clients litigieuses ou douteuses":{ + "Créances litigieuses":{ + "account_type":"Receivable", + "account_number": "4161" + }, + "Créances douteuses":{ + "account_type":"Receivable", + "account_number": "4162" + }, + "account_type":"Receivable", + "account_number": "416" + }, + "Clients, produits à recevoir":{ + "Clients, factures à établir":{ + "account_type":"Receivable", + "account_number": "4181" + }, + "Clients, intérêts courus":{ + "account_type":"Receivable", + "account_number": "4186" + }, + "account_type":"Receivable", + "account_number": "418" + }, + "account_type":"Receivable" + }, + "42-Personnel (ACTIF)":{ + "Personnel, avances et acomptes":{ + "Personnel, avances":{ + "account_number": "4211" + }, + "Personnel, acomptes":{ + "account_number": "4212" + }, + "Frais avancés et fournitures au personnel":{ + "account_number": "4213" + }, + "account_number": "421" + } + }, + "43-Organismes sociaux (ACTIF)":{ + "431-Sécurité sociale":{ + "Prestations familiales":{ + "account_number": "4311" + }, + "Accidents de travail":{ + "account_number": "4312" + }, + "Caisse de retraite obligatoire":{ + "account_number": "4313" + }, + "Caisse de retraite facultative":{ + "account_number": "4314" + }, + "Autres cotisations sociales":{ + "account_number": "4318" + } + }, + "432-Caisses de retraite complémentaire":{ + }, + "433-Autres organismes sociaux":{ + "Mutuelle":{ + "account_number": "4331" + }, + "Assurances retraite":{ + "account_number": "4332" + }, + "Assurances et organismes de santé":{ + "account_number": "4333" + } + }, + "438-Organismes sociaux, charges à payer et produits à recevoir":{ + "Produits à recevoir":{ + "account_number": "4387" + } + } + }, + "44-État et collectivités publiques (ACTIF)":{ + "État, TVA facturée":{ + "TVA facturée sur ventes":{ + "account_number": "4431" + }, + "TVA facturée sur prestations de services":{ + "account_number": "4432" + }, + "TVA facturée sur travaux":{ + "account_number": "4433" + }, + "TVA facturée sur production livrée à soi-même":{ + "account_number": "4434" + }, + "TVA sur factures à établir":{ + "account_number": "4435" + }, + "account_number": "443" + }, + "État, TVA récupérable":{ + "TVA récupérable sur immobilisations":{ + "account_number": "4451" + }, + "TVA récupérable sur achats":{ + "account_number": "4452" + }, + "TVA récupérable sur transport":{ + "account_number": "4453" + }, + "TVA récupérable sur services extérieurs et autres charges":{ + "account_number": "4454" + }, + "TVA récupérable sur factures non parvenues":{ + "account_number": "4455" + }, + "TVA transférée par d’autres entités":{ + "account_number": "4456" + }, + "account_number": "445" + }, + "État, charges à payer et produits à recevoir":{ + "Charges à payer":{ + "account_number": "4486" + }, + "Produits à recevoir":{ + "account_number": "4487" + }, + "account_number": "448" + }, + "État, créances et dettes diverses":{ + "État, obligations cautionnées":{ + "account_number": "4491" + }, + "État, avances et acomptes versés sur impôts":{ + "account_number": "4492" + }, + "État, fonds de dotation à recevoir":{ + "account_number": "4493" + }, + "État, subventions investissement à recevoir":{ + "account_number": "4494" + }, + "État, subventions d’exploitation à recevoir":{ + "account_number": "4495" + }, + "État, subventions d’équilibre à recevoir":{ + "account_number": "4496" + }, + "État, avances sur subventions":{ + "account_number": "4497" + }, + "État, fonds réglementés provisionnés":{ + "account_number": "4499" + }, + "account_number": "449" + } + }, + "45-Organismes internationaux (ACTIF)":{ + "Opérations avec les organismes africains":{ + "account_number": "451" + }, + "Opérations avec les autres organismes internationaux":{ + "account_number": "452" + }, + "Organismes internationaux, fonds de dotation et subventions à recevoir":{ + "Organismes internationaux, fonds de dotation à recevoir":{ + "account_number": "4581" + }, + "Organismes internationaux, subventions à recevoir":{ + "account_number": "4582" + }, + "account_number": "458" + } + }, + "46-Apporteurs, associés et groupe (ACTIF)":{ + "461-Apporteurs, opérations sur le capital":{ + "Apporteurs, capital appelé, non versé":{ + "account_number": "4613" + }, + "Apporteurs, compte d’apport, opérations de restructuration (fusion...)":{ + "account_number": "4614" + }, + "Apporteurs, titres à échanger":{ + "account_number": "4618" + } + }, + "Apporteurs, restant dû sur capital appelé":{ + "account_number": "467" + } + }, + "47-Débiteurs et créditeurs divers (ACTIF)":{ + "472-Créances et dettes sur titres de placement":{ + "Créances sur cessions de titres de placement":{ + "account_number": "4721" + }, + "Versements restant à effectuer sur titres de placement non libérés":{ + "account_number": "4726" + } + }, + "473-Intermédiaires Opérations faites pour compte de tiers":{ + "Mandants":{ + "account_number": "4731" + }, + "Mandataires":{ + "account_number": "4732" + }, + "Commettants":{ + "account_number": "4733" + }, + "Commissionnaires":{ + "account_number": "4734" + }, + "État, Collectivités publiques, fonds global d’allocation":{ + "account_number": "4739" + } + }, + "474-Compte de répartition périodique des charges et des produits":{ + "Compte de répartition périodique des produits":{ + "account_number": "4747" + } + }, + "475-Compte transitoire, ajustement spécial lié à la révision du SYSCOHADA":{ + "Compte actif":{ + "account_type":"Temporary", + "account_number": "4751" + } + }, + "Charges constatées d’avance":{ + "account_number": "476" + }, + "478-Écarts de conversion actif":{ + "Diminution des créances d’exploitation":{ + "account_number": "4781" + }, + "Diminution des créances financières":{ + "account_number": "4782" + }, + "Augmentation des dettes d’exploitation":{ + "account_number": "4783" + }, + "Augmentation des dettes financières":{ + "account_number": "4784" + }, + "Différences d’évaluation sur instruments de trésorerie":{ + "account_number": "4786" + }, + "Différences compensées par couverture de change":{ + "account_number": "4788" + } + } + }, + "48-Créances et dettes hors activités ordinaires (ACTIF)":{ + "Créances sur cessions d’immobilisations":{ + "En compte, immobilisations incorporelles":{ + "account_number": "4851" + }, + "En compte, immobilisations corporelles":{ + "account_number": "4852" + }, + "Effets à recevoir, immobilisations incorporelles":{ + "account_number": "4853" + }, + "Effets à recevoir, immobilisations corporelles":{ + "account_number": "4854" + }, + "Effets escomptés non échus":{ + "account_number": "4855" + }, + "Retenues de garantie":{ + "account_number": "4857" + }, + "Factures à établir":{ + "account_number": "4858" + }, + "account_number": "485" + }, + "Autres créances hors activités ordinaires (HAO)":{ + "account_number": "488" + } + }, + "49-Dépréciations et provisions pour risques à court terme (tiers) (ACTIF)":{ + "Dépréciations des comptes clients":{ + "Créances litigieuses":{ + "account_number": "4911" + }, + "Créances douteuses":{ + "account_number": "4912" + }, + "account_number": "491" + }, + "Dépréciations des comptes organismes internationaux":{ + "account_number": "495" + }, + "Dépréciations des comptes apporteurs, associés et groupe":{ + "Associés, comptes courants":{ + "account_number": "4962" + }, + "Associés, opérations faites en commun":{ + "account_number": "4963" + }, + "Groupe, comptes courants":{ + "account_number": "4966" + }, + "account_number": "496" + }, + "Dépréciations des comptes débiteurs divers":{ + "account_number": "497" + }, + "Dépréciations des comptes de créances HAO":{ + "Créances sur cessions d’immobilisations":{ + "account_number": "4985" + }, + "Créances sur cessions de titres de placement":{ + "account_number": "4986" + }, + "Autres créances HAO":{ + "account_number": "4988" + }, + "account_number": "498" + }, + "Provisions pour risques à court terme":{ + "Sur opérations d’exploitation":{ + "account_number": "4991" + }, + "Sur opérations financières":{ + "account_number": "4997" + }, + "Sur opérations HAO":{ + "account_number": "4998" + }, + "account_number": "499" + } + }, + "root_type":"Asset" + }, + "4-Comptes de Tiers (PASSIF)":{ + "40-Fournisseurs et comptes rattachés (PASSIF)":{ + "Fournisseurs, dettes en compte":{ + "Fournisseurs":{ + "account_type":"Payable", + "account_number": "4011" + }, + "Fournisseurs groupe":{ + "account_type":"Payable", + "account_number": "4012" + }, + "Fournisseurs sous-traitants":{ + "account_type":"Payable", + "account_number": "4013" + }, + "Fournisseurs, réserve de propriété":{ + "account_type":"Payable", + "account_number": "4016" + }, + "Fournisseur, retenues de garantie":{ + "account_type":"Payable", + "account_number": "4017" + }, + "account_type":"Payable", + "account_number": "401" + }, + "Fournisseurs, effets à payer":{ + "Fournisseurs Effets à payer":{ + "account_type":"Payable", + "account_number": "4021" + }, + "Fournisseurs Groupe, effets à payer":{ + "account_type":"Payable", + "account_number": "4022" + }, + "Fournisseurs Sous-traitants, effets à payer":{ + "account_type":"Payable", + "account_number": "4023" + }, + "account_type":"Payable", + "account_number": "402" + }, + "Fournisseurs, acquisitions courantes d’immobilisations":{ + "Fournisseurs Dettes en comptes, immobilisations incorporelles":{ + "account_type":"Payable", + "account_number": "4041" + }, + "Fournisseurs Dettes en comptes, immobilisations corporelles":{ + "account_type":"Payable", + "account_number": "4042" + }, + "Fournisseurs Effets à payer, immobilisations incorporelles":{ + "account_type":"Payable", + "account_number": "4046" + }, + "Fournisseurs Effets à payer, immobilisations corporelles":{ + "account_type":"Payable", + "account_number": "4047" + }, + "account_type":"Payable", + "account_number": "404" + }, + "Fournisseurs, factures non parvenues":{ + "Fournisseurs":{ + "account_type":"Stock Received But Not Billed", + "account_number": "4081" + }, + "Fournisseurs groupe":{ + "account_type":"Stock Received But Not Billed", + "account_number": "4082" + }, + "Fournisseurs sous-traitants":{ + "account_type":"Stock Received But Not Billed", + "account_number": "4083" + }, + "Fournisseurs, intérêts courus":{ + "account_type":"Stock Received But Not Billed", + "account_number": "4086" + }, + "account_type":"Stock Received But Not Billed", + "account_number": "408" + }, + "account_type":"Payable" + }, + "41-Clients et comptes rattachés (PASSIF)":{ + "Clients créditeurs":{ + "Clients, avances et acomptes reçus":{ + "account_number": "4191" + }, + "Clients groupe, avances et acomptes reçus":{ + "account_number": "4192" + }, + "Clients, dettes pour emballages et matériels consignés":{ + "account_number": "4194" + }, + "Clients, rabais, remises, ristournes et autres avoirs à accorder":{ + "account_number": "4198" + }, + "account_number": "419" + } + }, + "42-Personnel (PASSIF)":{ + "Personnel, rémunérations dues":{ + "account_number": "422" + }, + "Personnel, oppositions, saisies-arrêts":{ + "Personnel, oppositions":{ + "account_number": "4231" + }, + "Personnel, saisies-arrêts":{ + "account_number": "4232" + }, + "Personnel, avis à tiers détenteur":{ + "account_number": "4233" + }, + "account_number": "423" + }, + "Personnel, œuvres sociales internes":{ + "Assistance médicale":{ + "account_number": "4241" + }, + "Allocations familiales":{ + "account_number": "4242" + }, + "Organismes sociaux rattachés à l’entité":{ + "account_number": "4245" + }, + "Autres œuvres sociales internes":{ + "account_number": "4248" + }, + "account_number": "424" + }, + "Représentants du personnel":{ + "Délégués du personnel":{ + "account_number": "4251" + }, + "Syndicats et Comités d’entreprises, d’Établissement":{ + "account_number": "4252" + }, + "Autres représentants du personnel":{ + "account_number": "4258" + }, + "account_number": "425" + }, + "Personnel, participation aux bénéfices et au capital":{ + "Participation aux bénéfices":{ + "account_number": "4261" + }, + "Participation au capital":{ + "account_number": "4264" + }, + "account_number": "426" + }, + "Personnel dépôts":{ + "account_number": "427" + }, + "Personnel, charges à payer et produits à recevoir":{ + "Dettes provisionnées pour congés à payer":{ + "account_number": "4281" + }, + "Autres charges à payer":{ + "account_number": "4286" + }, + "Produits à recevoir":{ + "account_number": "4287" + }, + "account_number": "428" + } + }, + "43-Organismes sociaux (PASSIF)":{ + "438-Organismes sociaux, charges à payer et produits à recevoir":{ + "Charges sociales sur gratifications à payer":{ + "account_number": "4381" + }, + "Charges sociales sur congés à payer":{ + "account_number": "4382" + }, + "Autres charges à payer":{ + "account_number": "4386" + } + } + }, + "44-État et collectivités publiques (PASSIF)":{ + "État, impôt sur les bénéfices":{ + "account_number": "441" + }, + "État, autres impôts et taxes":{ + "Impôts et taxes d’État":{ + "account_number": "4421" + }, + "Impôts et taxes pour les collectivités publiques":{ + "account_number": "4422" + }, + "Impôts et taxes recouvrables sur des obligataires":{ + "account_number": "4423" + }, + "Impôts et taxes recouvrables sur des associés":{ + "account_number": "4424" + }, + "Droits de douane":{ + "account_number": "4426" + }, + "Autres impôts et taxes":{ + "account_number": "4428" + }, + "account_number": "442" + }, + "État, TVA due ou crédit de TVA":{ + "État, TVA due":{ + "account_number": "4441" + }, + "État, crédit de TVA à reporter":{ + "account_number": "4449" + }, + "account_number": "444" + }, + "État, autres taxes sur le chiffre d’affaires":{ + "account_number": "446" + }, + "État, impôts retenus à la source":{ + "Impôt Général sur le revenu":{ + "account_number": "4471" + }, + "Impôts sur salaires":{ + "account_number": "4472" + }, + "Contribution nationale":{ + "account_number": "4473" + }, + "Contribution nationale de solidarité":{ + "account_number": "4474" + }, + "Autres impôts et contributions":{ + "account_number": "4478" + }, + "account_number": "447" + } + }, + "46-Apporteurs, associés et groupe (PASSIF)":{ + "461-Apporteurs, opérations sur le capital (PASSIF)":{ + "Apporteurs, apports en nature":{ + "account_number": "4611" + }, + "Apporteurs, apports en numéraire":{ + "account_number": "4612" + }, + "Apporteurs, versements reçus sur augmentation de capital":{ + "account_number": "4615" + }, + "Apporteurs, versements anticipés":{ + "account_number": "4616" + }, + "Apporteurs défaillants":{ + "account_number": "4617" + }, + "Apporteurs, capital à rembourser":{ + "account_number": "4619" + } + }, + "462-Associés, comptes courants":{ + "Principal":{ + "account_number": "4621" + }, + "Intérêts courus":{ + "account_number": "4626" + } + }, + "463-Associés, opérations faites en commun et GIE":{ + "Opérations courantes":{ + "account_number": "4631" + }, + "Intérêts courus":{ + "account_number": "4636" + } + }, + "Associés, dividendes à payer":{ + "account_number": "465" + }, + "Groupe, comptes courants":{ + "account_number": "466" + } + }, + "47-Débiteurs et créditeurs divers (PASSIF)":{ + "471-Débiteurs et créditeurs divers":{ + "Débiteurs divers":{ + "account_number": "4711" + }, + "Créditeurs divers":{ + "account_number": "4712" + }, + "Obligataires":{ + "account_number": "4713" + }, + "Rémunérations d’administrateurs":{ + "account_number": "4715" + }, + "Compte d’affacturage":{ + "account_number": "4716" + }, + "Débiteurs divers retenues de garantie":{ + "account_number": "4717" + }, + "Apport, compte de fusion et opérations assimilées":{ + "account_number": "4718" + }, + "Bons de souscription d’actions et d’obligations":{ + "account_number": "4719" + } + }, + "474-Compte de répartition périodique des charges et des produits (PASSIF)":{ + "Compte de répartition périodique des charges":{ + "account_number": "4746" + } + }, + "475-Compte transitoire, ajustement spécial lié à la révision du SYSCOHADA (PASSIF)":{ + "Compte passif":{ + "account_number": "4752" + } + }, + "Produits constatés d’avance":{ + "account_number": "477" + }, + "479-Écarts de conversion passif":{ + "Augmentation des créances d’exploitation":{ + "account_number": "4791" + }, + "Augmentation des créances financières":{ + "account_number": "4792" + }, + "Diminution des dettes d’exploitation":{ + "account_number": "4793" + }, + "Diminution des dettes financières":{ + "account_number": "4794" + }, + "Différences d’évaluation sur instruments de trésorerie":{ + "account_number": "4797" + }, + "Différences compensées par couverture de change":{ + "account_number": "4798" + } + } + }, + "48-Créances et dettes hors activités ordinaires (HAO) (PASSIF)":{ + "Fournisseurs d’investissements":{ + "Immobilisations incorporelles":{ + "account_number": "4811" + }, + "Immobilisations corporelles":{ + "account_number": "4812" + }, + "Versements restant à effectuer sur titres de participation et titres immobilisés non libérés":{ + "account_number": "4813" + }, + "Réserve de propriété":{ + "account_number": "4816" + }, + "Retenues de garantie":{ + "account_number": "4817" + }, + "Factures non parvenues":{ + "account_number": "4818" + }, + "account_number": "481" + }, + "Fournisseurs d’investissements, effets à payer":{ + "Immobilisations incorporelles":{ + "account_number": "4821" + }, + "Immobilisations corporelles":{ + "account_number": "4822" + }, + "account_number": "482" + }, + "Autres dettes hors activités ordinaires (HAO)":{ + "Produits":{ + "account_number": "4887" + }, + "account_number": "484" + } + }, + "root_type":"Liability" + }, + "Comptes de trésorerie":{ + "Titres de placement":{ + "Titres du trésor et bons de caisse à court terme":{ + "Titres du Trésor à court terme":{ + "account_number": "5011" + }, + "Titres d’organismes financiers":{ + "account_number": "5012" + }, + "Bons de caisse à court terme":{ + "account_number": "5013" + }, + "Frais d’acquisition des titres de trésor et bons de caisse":{ + "account_number": "5016" + }, + "account_number": "501" + }, + "Actions":{ + "Actions ou parts propres":{ + "account_number": "5021" + }, + "Actions cotées":{ + "account_number": "5022" + }, + "Actions non cotées":{ + "account_number": "5023" + }, + "Actions démembrées (certificats d’investissement, droits de vote)":{ + "account_number": "5024" + }, + "Autres actions":{ + "account_number": "5025" + }, + "Frais d’acquisition des actions":{ + "account_number": "5026" + }, + "account_number": "502" + }, + "Obligations":{ + "Obligations émises par la société et rachetées par elle":{ + "account_number": "5031" + }, + "Obligations cotées":{ + "account_number": "5032" + }, + "Obligations non cotées":{ + "account_number": "5033" + }, + "Autres obligations":{ + "account_number": "5035" + }, + "Frais d’acquisition des obligations":{ + "account_number": "5036" + }, + "account_number": "503" + }, + "Bons de souscription":{ + "Bons de souscription d’actions":{ + "account_number": "5042" + }, + "Bons de souscription d’obligations":{ + "account_number": "5043" + }, + "account_number": "504" + }, + "Titres négociables hors région":{ + "account_number": "505" + }, + "Intérêts courus":{ + "Titres du Trésor et bons de caisse à court terme":{ + "account_number": "5061" + }, + "Actions":{ + "account_number": "5062" + }, + "Obligations":{ + "account_number": "5063" + }, + "account_number": "506" + }, + "Autres titres de placement et créances assimilées":{ + "account_number": "508" + }, + "account_number": "50" + }, + "Valeurs à encaisser":{ + "Effets à encaisser":{ + "account_number": "511" + }, + "Effets à l’encaissement":{ + "account_number": "512" + }, + "Chèques à encaisser":{ + "account_number": "513" + }, + "Chèques à l’encaissement":{ + "account_number": "514" + }, + "Cartes de crédit à encaisser":{ + "account_number": "515" + }, + "Autres valeurs à l’encaissement":{ + "Warrants":{ + "account_number": "5181" + }, + "Billets de fonds":{ + "account_number": "5182" + }, + "Chèques de voyage":{ + "account_number": "5185" + }, + "Coupons échus":{ + "account_number": "5186" + }, + "Intérêts échus des obligations":{ + "account_number": "5187" + }, + "account_number": "518" + }, + "account_number": "51" + }, + "Banques":{ + "Banques locales":{ + "Banques en monnaie nationale":{ + "account_type": "Bank", + "account_number": "5211" + }, + "Banques en devises":{ + "account_type": "Bank", + "account_number": "5215" + }, + "account_type": "Bank", + "account_number": "521" + }, + "Banques autres États région":{ + "account_number": "522" + }, + "Banques autres États zone monétaire":{ + "account_number": "523" + }, + "Banques hors zone monétaire":{ + "account_number": "524" + }, + "Banques dépôt à terme":{ + "account_number": "525" + }, + "Banques, intérêts courus":{ + "Banque, intérêts courus, charges à payer":{ + "account_number": "5261" + }, + "Banque, intérêts courus, produits à recevoir":{ + "account_number": "5267" + }, + "account_number": "526" + }, + "account_number": "52" + }, + "Établissements financiers et assimilés":{ + "Chèques postaux":{ + "account_number": "531" + }, + "Trésor":{ + "account_number": "532" + }, + "Sociétés de gestion et d’intermédiation (SGI)":{ + "account_number": "533" + }, + "Établissements financiers, intérêts courus":{ + "account_number": "536" + }, + "Autres organismes financiers":{ + "account_number": "538" + }, + "account_number": "53" + }, + "Instruments de trésorerie":{ + "Options de taux d’intérêt":{ + "account_number": "541" + }, + "Options de taux de change":{ + "account_number": "542" + }, + "Options de taux boursiers":{ + "account_number": "543" + }, + "Instruments de marchés à terme":{ + "account_number": "544" + }, + "Avoirs d’or et autres métaux précieux":{ + "account_number": "545" + }, + "account_number": "54" + }, + "Instruments de monnaie électronique":{ + "Monnaie électronique carte carburant":{ + "account_number": "551" + }, + "Monnaie électronique téléphone portable":{ + "account_number": "552" + }, + "Monnaie électronique carte péage":{ + "account_number": "553" + }, + "Porte-monnaie électronique":{ + "account_number": "554" + }, + "Autres instruments de monnaies électroniques":{ + "account_number": "558" + }, + "account_number": "55" + }, + "Banques, crédits de trésorerie et d’escompte":{ + "Crédits de trésorerie":{ + "account_number": "561" + }, + "Escompte de crédits de campagne":{ + "account_number": "564" + }, + "Escompte de crédits ordinaires":{ + "account_number": "565" + }, + "Banques, crédits de trésorerie, intérêts courus":{ + "account_number": "566" + }, + "account_number": "56" + }, + "Caisse":{ + "Caisse siège social":{ + "Caisse en monnaie nationale":{ + "account_number": "5711" + }, + "Caisse en devises":{ + "account_number": "5712" + }, + "account_number": "571" + }, + "Caisse succursale A":{ + "En monnaie nationale":{ + "account_number": "5721" + }, + "En devises":{ + "account_number": "5722" + }, + "account_number": "572" + }, + "Caisse succursale B":{ + "En monnaie nationale":{ + "account_number": "5731" + }, + "En devises":{ + "account_number": "5732" + }, + "account_number": "573" + }, + "account_number": "57" + }, + "Régies d’avances, accréditifs et virements internes":{ + "Régies d’avance":{ + "account_number": "581" + }, + "Accréditifs":{ + "account_number": "582" + }, + "Virements de fonds":{ + "account_number": "585" + }, + "Autres virements internes":{ + "account_number": "588" + }, + "account_number": "58" + }, + "Dépréciations et provisions pour risque à court terme":{ + "Dépréciations des titres de placement":{ + "account_number": "590" + }, + "Dépréciations des titres et valeurs à encaisser":{ + "account_number": "591" + }, + "Dépréciations des comptes banques":{ + "account_number": "592" + }, + "Dépréciations des comptes établissements financiers et assimilés":{ + "account_number": "593" + }, + "Dépréciations des comptes d’instruments de trésorerie":{ + "account_number": "594" + }, + "Provisions pour risque à court terme à caractère financier":{ + "account_number": "599" + }, + "account_number": "59" + }, + "root_type":"Asset", + "account_number": "5" + }, + "Comptes de charges des activités ordinaires":{ + "Achats et variations de stocks":{ + "Achats de marchandises":{ + "Dans la Région":{ + "account_number": "6011" + }, + "Hors Région":{ + "account_number": "6012" + }, + "Aux entités du groupe dans la Région":{ + "account_number": "6013" + }, + "Aux entités du groupe hors Région":{ + "account_number": "6014" + }, + "Frais sur achats":{ + "account_number": "6015" + }, + "Rabais, remises et ristournes obtenus (non ventilés)":{ + "account_number": "6019" + }, + "account_number": "601" + }, + "Achats de matières premières et fournitures liées":{ + "Dans la Région":{ + "account_number": "6021" + }, + "Hors Région":{ + "account_number": "6022" + }, + "Aux entités du groupe dans la Région":{ + "account_number": "6023" + }, + "Aux entités du groupe hors Région":{ + "account_number": "6024" + }, + "Frais sur achats":{ + "account_number": "6025" + }, + "Rabais, remises et ristournes obtenus (non ventilés)":{ + "account_number": "6029" + }, + "account_number": "602" + }, + "Variations des stocks de biens achetés":{ + "Variations des stocks de marchandises":{ + "account_number": "6031" + }, + "Variations des stocks de matières premières et fournitures liées":{ + "account_number": "6032" + }, + "Variations des stocks d’autres approvisionnements":{ + "account_number": "6033" + }, + "account_number": "603" + }, + "Achats stockés de matières et fournitures consommables":{ + "Matières consommables":{ + "account_number": "6041" + }, + "Matières combustibles":{ + "account_number": "6042" + }, + "Produits d’entretien":{ + "account_number": "6043" + }, + "Fournitures d’atelier et d’usine":{ + "account_number": "6044" + }, + "Frais sur achat":{ + "account_number": "6045" + }, + "Fournitures de magasin":{ + "account_number": "6046" + }, + "Fournitures de bureau":{ + "account_number": "6047" + }, + "Rabais, remises et ristournes obtenus (non ventilés)":{ + "account_number": "6049" + }, + "account_number": "604" + }, + "Autres achats":{ + "Fournitures non stockables Eau":{ + "account_number": "6051" + }, + "Fournitures non stockables Électricité":{ + "account_number": "6052" + }, + "Fournitures non stockables Autres énergies":{ + "account_number": "6053" + }, + "Fournitures d’entretien non stockables":{ + "account_number": "6054" + }, + "Fournitures de bureau non stockables":{ + "account_number": "6055" + }, + "Achats de petit matériel et outillage":{ + "account_number": "6056" + }, + "Achats d’études et prestations de services":{ + "account_number": "6057" + }, + "Achats de travaux, matériels et équipements":{ + "account_number": "6058" + }, + "Rabais, remises et ristournes obtenus (non ventilés)":{ + "account_number": "6059" + }, + "account_number": "605" + }, + "Achats d’emballages":{ + "Emballages perdus":{ + "account_number": "6081" + }, + "Emballages récupérables non identifiables":{ + "account_number": "6082" + }, + "Emballages à usage mixte":{ + "account_number": "6083" + }, + "Frais sur achats":{ + "account_number": "6085" + }, + "Rabais, remises et ristournes obtenus (non ventilés)":{ + "account_number": "6089" + }, + "account_number": "608" + }, + "account_number": "60" + }, + "Transports":{ + "Transports sur ventes":{ + "account_number": "612" + }, + "Transports pour le compte de tiers":{ + "account_number": "613" + }, + "Transports du personnel":{ + "account_number": "614" + }, + "Transports de plis":{ + "account_number": "616" + }, + "Autres frais de transport":{ + "Voyages et déplacements":{ + "account_number": "6181" + }, + "Transports entre établissements ou chantiers":{ + "account_number": "6182" + }, + "Transports administratifs":{ + "account_number": "6183" + }, + "account_number": "618" + }, + "account_number": "61" + }, + "Services extérieurs":{ + "Sous-traitance générale":{ + "account_number": "621" + }, + "Locations, charges locatives":{ + "Locations de terrains":{ + "account_number": "6221" + }, + "Locations de bâtiments":{ + "account_number": "6222" + }, + "Locations de matériels et outillages":{ + "account_number": "6223" + }, + "Malis sur emballages":{ + "account_number": "6224" + }, + "Locations d’emballages":{ + "account_number": "6225" + }, + "Fermages et loyers du foncier":{ + "account_number": "6226" + }, + "Locations et charges locatives diverses":{ + "account_number": "6228" + }, + "account_number": "622" + }, + "Redevances de location acquisition":{ + "Crédit-bail immobilier":{ + "account_number": "6232" + }, + "Crédit-bail mobilier":{ + "account_number": "6233" + }, + "Location-vente":{ + "account_number": "6234" + }, + "Autres contrats de location acquisition":{ + "account_number": "6238" + }, + "account_number": "623" + }, + "Entretien, réparations, remise en état et maintenance":{ + "Entretien et réparations des biens immobiliers":{ + "account_number": "6241" + }, + "Entretien et réparations des biens mobiliers":{ + "account_number": "6242" + }, + "Maintenance":{ + "account_number": "6243" + }, + "Charges de démantèlement et remise en état":{ + "account_number": "6244" + }, + "Autres entretiens et réparations":{ + "account_number": "6248" + }, + "account_number": "624" + }, + "Primes d’assurance":{ + "Assurances multirisques":{ + "account_number": "6251" + }, + "Assurances matériel de transport":{ + "account_number": "6252" + }, + "Assurances risques d’exploitation":{ + "account_number": "6253" + }, + "Assurances responsabilité du producteur":{ + "account_number": "6254" + }, + "Assurances insolvabilité clients":{ + "account_number": "6255" + }, + "Assurances transport sur ventes":{ + "account_number": "6257" + }, + "Autres primes d’assurances":{ + "account_number": "6258" + }, + "account_number": "625" + }, + "Études, recherches et documentation":{ + "Études et recherches":{ + "account_number": "6261" + }, + "Documentation générale":{ + "account_number": "6265" + }, + "Documentation technique":{ + "account_number": "6266" + }, + "account_number": "626" + }, + "Publicité, publications, relations publiques":{ + "Annonces, insertions":{ + "account_number": "6271" + }, + "Catalogues, imprimés publicitaires":{ + "account_number": "6272" + }, + "Échantillons":{ + "account_number": "6273" + }, + "Foires et expositions":{ + "account_number": "6274" + }, + "Publications":{ + "account_number": "6275" + }, + "Cadeaux à la clientèle":{ + "account_number": "6276" + }, + "Frais de colloques, séminaires, conférences":{ + "account_number": "6277" + }, + "Autres charges de publicité et relations publiques":{ + "account_number": "6278" + }, + "account_number": "627" + }, + "Frais de télécommunications":{ + "Frais de téléphone":{ + "account_number": "6281" + }, + "Frais de télex":{ + "account_number": "6282" + }, + "Frais de télécopie":{ + "account_number": "6283" + }, + "Autres frais de télécommunications":{ + "account_number": "6288" + }, + "account_number": "628" + }, + "account_number": "62" + }, + "Autres services extérieurs":{ + "Frais bancaires":{ + "Frais sur titres (vente, garde)":{ + "account_number": "6311" + }, + "Frais sur effets":{ + "account_number": "6312" + }, + "Location de coffres":{ + "account_number": "6313" + }, + "Commissions d’affacturage":{ + "account_number": "6314" + }, + "Commissions sur cartes de crédit":{ + "account_number": "6315" + }, + "Frais d’émission d’emprunts":{ + "account_number": "6316" + }, + "Frais sur instruments monnaie électronique":{ + "account_number": "6317" + }, + "Autres frais bancaires":{ + "account_number": "6318" + }, + "account_number": "631" + }, + "Rémunérations d’intermédiaires et de conseils":{ + "Commissions et courtages sur ventes":{ + "account_number": "6322" + }, + "Honoraires des professions réglementées":{ + "account_number": "6324" + }, + "Frais d’actes et de contentieux":{ + "account_number": "6325" + }, + "Rémunérations d’affacturage":{ + "account_number": "6326" + }, + "Rémunérations des autres prestataires de services":{ + "account_number": "6327" + }, + "Divers frais":{ + "account_number": "6328" + }, + "account_number": "632" + }, + "Frais de formation du personnel":{ + "account_number": "633" + }, + "Redevances pour brevets, licences, logiciels, concessions et droits et valeurs similaires":{ + "Redevances pour brevets, licences":{ + "account_number": "6342" + }, + "Redevances pour logiciels":{ + "account_number": "6343" + }, + "Redevances pour marques":{ + "account_number": "6344" + }, + "Redevances pour sites internet":{ + "account_number": "6345" + }, + "Redevances pour concessions, droits et valeurs similaires":{ + "account_number": "6346" + }, + "account_number": "634" + }, + "Cotisations":{ + "Cotisations":{ + "account_number": "6351" + }, + "Concours divers":{ + "account_number": "6358" + }, + "account_number": "635" + }, + "Rémunérations de personnel extérieur à l’entité":{ + "Personnel intérimaire":{ + "account_number": "6371" + }, + "Personnel détaché ou prêté à l’entité":{ + "account_number": "6372" + }, + "account_number": "637" + }, + "Autres charges externes":{ + "Frais de recrutement du personnel":{ + "account_number": "6381" + }, + "Frais de déménagement":{ + "account_number": "6382" + }, + "Réceptions":{ + "account_number": "6383" + }, + "Missions":{ + "account_number": "6384" + }, + "Charges de copropriété":{ + "account_number": "6385" + }, + "account_number": "638" + }, + "account_number": "63" + }, + "Impôts et taxes":{ + "Impôts et taxes directs":{ + "Impôts fonciers et taxes annexes":{ + "account_number": "6411" + }, + "Patentes, licences et taxes annexes":{ + "account_number": "6412" + }, + "Taxes sur appointements et salaires":{ + "account_number": "6413" + }, + "Taxes d’apprentissage":{ + "account_number": "6414" + }, + "Formation professionnelle continue":{ + "account_number": "6415" + }, + "Autres impôts et taxes directs":{ + "account_number": "6418" + }, + "account_number": "641" + }, + "Impôts et taxes indirects":{ + "account_number": "645" + }, + "Droits d’enregistrement":{ + "Droits de mutation":{ + "account_number": "6461" + }, + "Droits de timbre":{ + "account_number": "6462" + }, + "Taxes sur les véhicules de société":{ + "account_number": "6463" + }, + "Vignettes":{ + "account_number": "6464" + }, + "Autres droits":{ + "account_number": "6468" + }, + "account_number": "646" + }, + "Pénalités, amendes fiscales":{ + "Pénalités d’assiette, impôts directs":{ + "account_number": "6471" + }, + "Pénalités d’assiette, impôts indirects":{ + "account_number": "6472" + }, + "Pénalités de recouvrement, impôts directs":{ + "account_number": "6473" + }, + "Pénalités de recouvrement, impôts indirects":{ + "account_number": "6474" + }, + "Autres pénalités et amendes fiscales":{ + "account_number": "6478" + }, + "account_number": "647" + }, + "Autres impôts et taxes":{ + "account_number": "648" + }, + "account_number": "64" + }, + "Autres charges":{ + "Pertes sur créances clients et autres débiteurs":{ + "Clients":{ + "account_number": "6511" + }, + "Autres débiteurs":{ + "account_number": "6515" + }, + "account_number": "651" + }, + "Quote-part de résultat sur opérations faites en commun":{ + "Quote-part transférée de bénéfices (comptabilité du gérant)":{ + "account_number": "6521" + }, + "Pertes imputées par transfert (comptabilité des associés non gérants)":{ + "account_number": "6525" + }, + "account_number": "652" + }, + "Valeurs comptables des cessions courantes d’immobilisations":{ + "Immobilisations incorporelles":{ + "account_number": "6541" + }, + "Immobilisations corporelles":{ + "account_number": "6542" + }, + "account_number": "654" + }, + "Perte de change sur créances et dettes commerciale":{ + "account_number": "656" + }, + "Pénalités et amendes pénales":{ + "account_number": "657" + }, + "Charges diverses":{ + "Indemnités de fonction et autres rémunérations d’administrateurs":{ + "account_number": "6581" + }, + "Dons":{ + "account_number": "6582" + }, + "Mécénat":{ + "account_number": "6583" + }, + "Autres charges diverses":{ + "account_number": "6588" + }, + "account_number": "658" + }, + "Charges pour dépréciations et provisions pour risques à court terme d’exploitation":{ + "Sur risques à court terme":{ + "account_number": "6591" + }, + "Sur stocks":{ + "account_number": "6593" + }, + "Sur créances":{ + "account_number": "6594" + }, + "Autres charges pour dépréciations et provisions pour risques à court terme":{ + "account_number": "6598" + }, + "account_number": "659" + }, + "account_number": "65" + }, + "Charges de personnel":{ + "Rémunérations directes versées au personnel national":{ + "Appointements salaires et commissions":{ + "account_number": "6611" + }, + "Primes et gratifications":{ + "account_number": "6612" + }, + "Congés payés":{ + "account_number": "6613" + }, + "Indemnités de préavis, de licenciement et de recherche d’embauche":{ + "account_number": "6614" + }, + "Indemnités de maladie versées aux travailleurs":{ + "account_number": "6615" + }, + "Supplément familial":{ + "account_number": "6616" + }, + "Avantages en nature":{ + "account_number": "6617" + }, + "Autres rémunérations directes":{ + "account_number": "6618" + }, + "account_number": "661" + }, + "Rémunérations directes versées au personnel non national":{ + "Appointements salaires et commissions":{ + "account_number": "6621" + }, + "Primes et gratifications":{ + "account_number": "6622" + }, + "Congés payés":{ + "account_number": "6623" + }, + "Indemnités de préavis, de licenciement et de recherche d’embauche":{ + "account_number": "6624" + }, + "Indemnités de maladie versées aux travailleurs":{ + "account_number": "6625" + }, + "Supplément familial":{ + "account_number": "6626" + }, + "Avantages en nature":{ + "account_number": "6627" + }, + "Autres rémunérations directes":{ + "account_number": "6628" + }, + "account_number": "662" + }, + "Indemnités forfaitaires versées au personnel":{ + "Indemnités de logement":{ + "account_number": "6631" + }, + "Indemnités de représentation":{ + "account_number": "6632" + }, + "Indemnités d’expatriation":{ + "account_number": "6633" + }, + "Indemnités de transport":{ + "account_number": "6634" + }, + "Autres indemnités et avantages divers":{ + "account_number": "6638" + }, + "account_number": "663" + }, + "Charges sociales":{ + "Charges sociales sur rémunération du personnel national":{ + "account_number": "6641" + }, + "Charges sociales sur rémunération du personnel non national":{ + "account_number": "6642" + }, + "account_number": "664" + }, + "Rémunérations et charges sociales de l’exploitant individuel":{ + "Rémunération du travail de l’exploitant":{ + "account_number": "6661" + }, + "Charges sociales":{ + "account_number": "6662" + }, + "account_number": "666" + }, + "Rémunération transférée de personnel extérieur":{ + "Personnel intérimaire":{ + "account_number": "6671" + }, + "Personnel détaché ou prêté à l’entité":{ + "account_number": "6672" + }, + "account_number": "667" + }, + "Autres charges sociales":{ + "Versements aux syndicats et comités d’entreprise, d’établissement":{ + "account_number": "6681" + }, + "Versements aux comités d’hygiène et de sécurité":{ + "account_number": "6682" + }, + "Versements et contributions aux autres œuvres sociales":{ + "account_number": "6683" + }, + "Médecine du travail et pharmacie":{ + "account_number": "6684" + }, + "Assurances et organismes de santé":{ + "account_number": "6685" + }, + "Assurances retraite et fonds de pension":{ + "account_number": "6686" + }, + "Majorations et pénalités sociales":{ + "account_number": "6687" + }, + "Charges sociales diverses":{ + "account_number": "6688" + }, + "account_number": "668" + }, + "account_number": "66" + }, + "Frais financiers et charges assimilées":{ + "Intérêts des emprunts":{ + "Emprunts obligataires":{ + "account_number": "6711" + }, + "Emprunts auprès des établissements de crédit":{ + "account_number": "6712" + }, + "Dettes liées à des participations":{ + "account_number": "6713" + }, + "Primes de remboursement des obligations":{ + "account_number": "6714" + }, + "account_number": "671" + }, + "Intérêts dans loyers de location acquisition":{ + "Intérêts dans loyers de location acquisition / crédit-bail immobilier":{ + "account_number": "6722" + }, + "Intérêts dans loyers de location acquisition / crédit-bail mobilier":{ + "account_number": "6723" + }, + "Intérêts dans loyers de location acquisition / location-vente":{ + "account_number": "6724" + }, + "Intérêts dans loyers des autres locations acquisition":{ + "account_number": "6728" + }, + "account_number": "672" + }, + "Escomptes accordés":{ + "account_number": "673" + }, + "Autres intérêts":{ + "Avances reçues et dépôts créditeurs":{ + "account_number": "6741" + }, + "Comptes courants bloqués":{ + "account_number": "6742" + }, + "Intérêts sur obligations cautionnées":{ + "account_number": "6743" + }, + "Intérêts sur dettes commerciales":{ + "account_number": "6744" + }, + "Intérêts bancaires et sur opérations de financement (escompte...)":{ + "account_number": "6745" + }, + "Intérêts sur dettes diverses":{ + "account_number": "6748" + }, + "account_number": "674" + }, + "Escomptes des effets de commerce":{ + "account_number": "675" + }, + "Pertes de change financières":{ + "account_number": "676" + }, + "Pertes sur titres de placement":{ + "Pertes sur cessions de titres de placement":{ + "account_number": "6771" + }, + "Mali provenant d’attribution gratuite d’actions au personnel salarié et aux dirigeants":{ + "account_number": "6772" + }, + "account_number": "677" + }, + "Pertes et charges sur risques financiers":{ + "Sur rentes viagères":{ + "account_number": "6781" + }, + "Sur opérations financières":{ + "account_number": "6782" + }, + "Sur instruments de trésorerie":{ + "account_number": "6784" + }, + "account_number": "678" + }, + "Charges pour dépréciations et provisions pour risques à court terme financières":{ + "Sur risques financiers":{ + "account_number": "6791" + }, + "Sur titres de placement":{ + "account_number": "6795" + }, + "Autres charges pour dépréciations et provisions pour risques à court terme financières":{ + "account_number": "6798" + }, + "account_number": "679" + }, + "account_number": "67" + }, + "Dotations aux amortissements":{ + "Dotations aux amortissements d’exploitation":{ + "Dotations aux amortissements des immobilisations incorporelles":{ + "account_number": "6812" + }, + "Dotations aux amortissements des immobilisations corporelles":{ + "account_number": "6813" + }, + "account_number": "681" + }, + "account_number": "68" + }, + "Dotations aux provisions et aux dépréciations":{ + "Dotations aux provisions et aux dépréciations d’exploitation":{ + "Dotations aux provisions pour risques et charges":{ + "account_number": "6911" + }, + "Dotations aux dépréciations des immobilisations incorporelles":{ + "account_number": "6913" + }, + "Dotations aux dépréciations des immobilisations corporelles":{ + "account_number": "6914" + }, + "account_number": "691" + }, + "Dotations aux provisions et aux dépréciations financières":{ + "Dotations aux provisions pour risques et charges":{ + "account_number": "6971" + }, + "Dotations aux dépréciations des immobilisations financières":{ + "account_number": "6972" + }, + "account_number": "697" + }, + "account_number": "69" + }, + "root_type":"Expense", + "account_number": "6" + }, + "Comptes de produits des activités ordinaires":{ + "Ventes":{ + "Ventes de marchandises":{ + "Dans la Région":{ + "account_number": "7011" + }, + "Hors Région":{ + "account_number": "7012" + }, + "Aux entités du groupe dans la Région":{ + "account_number": "7013" + }, + "Aux entités du groupe hors Région":{ + "account_number": "7014" + }, + "Sur internet":{ + "account_number": "7015" + }, + "Rabais, remises, ristournes accordés (non ventilés)":{ + "account_number": "7019" + }, + "account_number": "701" + }, + "Ventes de produits finis":{ + "Dans la Région":{ + "account_number": "7021" + }, + "Hors Région":{ + "account_number": "7022" + }, + "Aux entités du groupe dans la Région":{ + "account_number": "7023" + }, + "Aux entités du groupe hors Région":{ + "account_number": "7024" + }, + "Sur internet":{ + "account_number": "7025" + }, + "Rabais, remises, ristournes accordés (non ventilés)":{ + "account_number": "7029" + }, + "account_number": "702" + }, + "Ventes de produits intermédiaires":{ + "Dans la Région":{ + "account_number": "7031" + }, + "Hors Région":{ + "account_number": "7032" + }, + "Aux entités du groupe dans la Région":{ + "account_number": "7033" + }, + "Aux entités du groupe hors Région":{ + "account_number": "7034" + }, + "Sur internet":{ + "account_number": "7035" + }, + "Rabais, remises, ristournes accordés (non ventilés)":{ + "account_number": "7039" + }, + "account_number": "703" + }, + "Ventes de produits résiduels":{ + "Dans la Région":{ + "account_number": "7041" + }, + "Hors Région":{ + "account_number": "7042" + }, + "Aux entités du groupe dans la Région":{ + "account_number": "7043" + }, + "Aux entités du groupe hors Région":{ + "account_number": "7044" + }, + "Sur internet":{ + "account_number": "7045" + }, + "Rabais, remises, ristournes accordés (non ventilés)":{ + "account_number": "7049" + }, + "account_number": "704" + }, + "Travaux facturés":{ + "Dans la Région":{ + "account_number": "7051" + }, + "Hors Région":{ + "account_number": "7052" + }, + "Aux entités du groupe dans la Région":{ + "account_number": "7053" + }, + "Aux entités du groupe hors Région":{ + "account_number": "7054" + }, + "Sur internet":{ + "account_number": "7055" + }, + "Rabais, remises, ristournes accordés (non ventilés)":{ + "account_number": "7059" + }, + "account_number": "705" + }, + "Services vendus":{ + "Dans la Région":{ + "account_number": "7061" + }, + "Hors Région":{ + "account_number": "7062" + }, + "Aux entités du groupe dans la Région":{ + "account_number": "7063" + }, + "Aux entités du groupe hors Région":{ + "account_number": "7064" + }, + "Sur internet":{ + "account_number": "7065" + }, + "Rabais, remises, ristournes accordés (non ventilés)":{ + "account_number": "7069" + }, + "account_number": "706" + }, + "Produits accessoires":{ + "Ports, emballages perdus et autres frais facturés":{ + "account_number": "7071" + }, + "Commissions et courtages":{ + "account_number": "7072" + }, + "Locations":{ + "account_number": "7073" + }, + "Bonis sur reprises et cessions d’emballages":{ + "account_number": "7074" + }, + "Mise à disposition de personnel":{ + "account_number": "7075" + }, + "Redevances pour brevets, logiciels, marques et droits similaires":{ + "account_number": "7076" + }, + "Services exploités dans l’intérêt du personnel":{ + "account_number": "7077" + }, + "Autres produits accessoires":{ + "account_number": "7078" + }, + "account_number": "707" + }, + "account_number": "70" + }, + "Subventions d’exploitation":{ + "Sur produits à l’exportation":{ + "account_number": "711" + }, + "Sur produits à l’importation":{ + "account_number": "712" + }, + "Sur produits de péréquation":{ + "account_number": "713" + }, + "Indemnités et subventions d’exploitation (entité agricole)":{ + "account_number": "714" + }, + "Autres subventions d’exploitation":{ + "Versées par l’État et les collectivités publiques":{ + "account_number": "7181" + }, + "Versées par les organismes internationaux":{ + "account_number": "7182" + }, + "Versées par des tiers":{ + "account_number": "7183" + }, + "account_number": "718" + }, + "account_number": "71" + }, + "Production immobilisée":{ + "Immobilisations incorporelles":{ + "account_number": "721" + }, + "Immobilisations corporelles":{ + "Immobilisations corporelles (hors actifs biologiques)":{ + "account_number": "7221" + }, + "Immobilisations corporelles (actifs biologiques)":{ + "account_number": "7222" + }, + "account_number": "722" + }, + "Production auto-consommée":{ + "account_number": "724" + }, + "Immobilisations financières":{ + "account_number": "726" + }, + "account_number": "72" + }, + "Variations des stocks de biens et de services produits":{ + "Variations des stocks de produits en cours":{ + "Produits en cours":{ + "account_number": "7341" + }, + "Travaux en cours":{ + "account_number": "7342" + }, + "account_number": "734" + }, + "Variations des en-cours de services":{ + "Études en cours":{ + "account_number": "7351" + }, + "Prestations de services en cours":{ + "account_number": "7352" + }, + "account_number": "735" + }, + "Variations des stocks de produits finis":{ + "account_number": "736" + }, + "Variations des stocks de produits intermédiaires et résiduels":{ + "Produits intermédiaires":{ + "account_number": "7371" + }, + "Produits résiduels":{ + "account_number": "7372" + }, + "account_number": "737" + }, + "account_number": "73" + }, + "Autres produits":{ + "Profits sur créances clients et autres débiteurs":{ + "account_number": "751" + }, + "Quote-part de résultat sur opérations faites en commun":{ + "Quote-part transférée de pertes (comptabilité du gérant)":{ + "account_number": "7521" + }, + "Bénéfices attribués par transfert (comptabilité des associés non gérants)":{ + "account_number": "7525" + }, + "account_number": "752" + }, + "Produits des cessions courantes d’immobilisations":{ + "Immobilisations incorporelles":{ + "account_number": "7541" + }, + "Immobilisations corporelles":{ + "account_number": "7542" + }, + "account_number": "754" + }, + "Gains de change sur créances et dettes commerciales":{ + "account_number": "756" + }, + "Produits divers":{ + "Indemnités de fonction et autres rémunérations d’administrateurs":{ + "account_number": "7581" + }, + "Indemnités d’assurances reçues":{ + "account_number": "7582" + }, + "Autres produits divers":{ + "account_number": "7588" + }, + "account_number": "758" + }, + "Reprises de charges pour dépréciations et provisions pour risques à court terme d’exploitation":{ + "Sur risques à court terme":{ + "account_number": "7591" + }, + "Sur stocks":{ + "account_number": "7593" + }, + "Sur créances":{ + "account_number": "7594" + }, + "Sur autres charges pour dépréciations et provisions pour risques à court terme d’exploitation":{ + "account_number": "7598" + }, + "account_number": "759" + }, + "account_number": "75" + }, + "Revenus financiers et produits assimilés":{ + "Intérêts de prêts et créances diverses":{ + "Intérêts de prêts":{ + "account_number": "7712" + }, + "Intérêts sur créances diverses":{ + "account_number": "7713" + }, + "account_number": "771" + }, + "Revenus de participations et autres titres immobilisés":{ + "Revenus des titres de participation":{ + "account_number": "7721" + }, + "Revenus autres titres immobilisés":{ + "account_number": "7722" + }, + "account_number": "772" + }, + "Escomptes obtenus":{ + "account_number": "773" + }, + "Revenus de placement":{ + "Revenus des obligations":{ + "account_number": "7745" + }, + "Revenus des titres de placement":{ + "account_number": "7746" + }, + "account_number": "774" + }, + "Intérêts dans loyers de location acquisition":{ + "account_number": "775" + }, + "Gains de change financiers":{ + "account_number": "776" + }, + "Gains sur cessions de titres de placement":{ + "account_number": "777" + }, + "Gains sur risques financiers":{ + "Sur rentes viagères":{ + "account_number": "7781" + }, + "Sur opérations financières":{ + "account_number": "7782" + }, + "Sur instruments de trésorerie":{ + "account_number": "7784" + }, + "account_number": "778" + }, + "Reprises de charges pour dépréciations et provisions à court terme financières":{ + "Sur risques financiers":{ + "account_number": "7791" + }, + "Sur titres de placement":{ + "account_number": "7795" + }, + "Sur autres charges pour dépréciations et provisions pour risques à court terme financières":{ + "account_number": "7798" + }, + "account_number": "779" + }, + "account_number": "77" + }, + "Transferts de charges":{ + "Transferts de charges d’exploitation":{ + "account_number": "781" + }, + "Transferts de charges financières":{ + "account_number": "787" + }, + "account_number": "78" + }, + "Reprises de provisions, de dépréciations et autres":{ + "Reprises de provisions et dépréciations d’exploitation":{ + "Pour risques et charges":{ + "account_number": "7911" + }, + "Des immobilisations incorporelles":{ + "account_number": "7913" + }, + "Des immobilisations corporelles":{ + "account_number": "7914" + }, + "account_number": "791" + }, + "Reprises de provisions et dépréciations financières":{ + "Pour risques et charges":{ + "account_number": "7971" + }, + "Des immobilisations financières":{ + "account_number": "7972" + }, + "account_number": "797" + }, + "Reprises d’amortissements":{ + "account_number": "798" + }, + "Reprises de subventions d’investissement":{ + "account_number": "799" + }, + "account_number": "79" + }, + "root_type":"Income", + "account_number": "7" + }, + "8-Comptes des autres charges et des autres produits (CHARGES)":{ + "Valeurs comptables des cessions d’immobilisations":{ + "Immobilisations incorporelles":{ + "account_number": "811" + }, + "Immobilisations corporelles":{ + "account_number": "812" + }, + "Immobilisations financières":{ + "account_number": "816" + }, + "account_number": "81" + }, + "Charges hors activités ordinaires":{ + "Charges HAO constatées":{ + "account_number": "831" + }, + "Charges liées aux opérations de restructuration":{ + "account_number": "833" + }, + "Pertes sur créances HAO":{ + "account_number": "834" + }, + "Dons et libéralités accordés":{ + "account_number": "835" + }, + "Abandons de créances consentis":{ + "account_number": "836" + }, + "Charges liées aux opérations de liquidation":{ + "account_number": "837" + }, + "Charges pour dépréciations et provisions pour risques à court terme HAO":{ + "account_number": "839" + }, + "account_number": "83" + }, + "Dotations hors activités ordinaires":{ + "Dotations aux provisions réglementées":{ + "account_number": "851" + }, + "Dotations aux amortissements HAO":{ + "account_number": "852" + }, + "Dotations aux dépréciations HAO":{ + "account_number": "853" + }, + "Dotations aux provisions pour risques et charges HAO":{ + "account_number": "854" + }, + "Autres dotations HAO":{ + "account_number": "858" + }, + "account_number": "85" + }, + "Participation des travailleurs":{ + "Participation légale aux bénéfices":{ + "account_number": "871" + }, + "Participation contractuelle aux bénéfices":{ + "account_number": "874" + }, + "Autres participations":{ + "account_number": "878" + }, + "account_number": "87" + }, + "Impôts sur le résultat":{ + "Impôts sur les bénéfices de l’exercice":{ + "Activités exercées dans l’État":{ + "account_number": "8911" + }, + "Activités exercées dans les autres États de la Région":{ + "account_number": "8912" + }, + "Activités exercées hors Région":{ + "account_number": "8913" + }, + "account_number": "891" + }, + "Rappel d’impôts sur résultats antérieurs":{ + "account_number": "892" + }, + "Impôt minimum forfaitaire IMF":{ + "account_number": "895" + }, + "Dégrèvements et annulations d’impôts sur résultats antérieurs":{ + "Dégrèvements":{ + "account_number": "8991" + }, + "Annulations pour pertes rétroactives":{ + "account_number": "8994" + }, + "account_number": "899" + }, + "account_number": "89" + }, + "root_type":"Expense" + }, + "8-Comptes des autres charges et des autres produits (PRODUITS)":{ + "Produits des cessions d’immobilisations":{ + "Immobilisations incorporelles":{ + "account_number": "821" + }, + "Immobilisations corporelles":{ + "account_number": "822" + }, + "Immobilisations financières":{ + "account_number": "826" + }, + "account_number": "82" + }, + "Produits hors activités ordinaires":{ + "Produits HAO constatés":{ + "account_number": "841" + }, + "Produits liés aux opérations de restructuration":{ + "account_number": "843" + }, + "Indemnités et subventions HAO (entité agricole)":{ + "account_number": "844" + }, + "Dons et libéralités obtenus":{ + "account_number": "845" + }, + "Abandons de créances obtenus":{ + "account_number": "846" + }, + "Produits liés aux opérations de liquidation":{ + "account_number": "847" + }, + "Transferts de charges HAO":{ + "account_number": "848" + }, + "Reprises de charges pour dépréciations et provisions pour risques à court terme HAO":{ + "account_number": "849" + }, + "account_number": "84" + }, + "Reprises de charges, provisions et dépréciations HAO":{ + "Reprises de provisions réglementées":{ + "account_number": "861" + }, + "Reprises d’amortissements HAO":{ + "account_number": "862" + }, + "Reprises de dépréciations HAO":{ + "account_number": "863" + }, + "Reprises de provisions pour risques et charges HAO":{ + "account_number": "864" + }, + "Autres reprises HAO":{ + "account_number": "868" + }, + "account_number": "86" + }, + "Subventions d’équilibre":{ + "État":{ + "account_number": "881" + }, + "Collectivités publiques":{ + "account_number": "884" + }, + "Groupe":{ + "account_number": "886" + }, + "Autres":{ + "account_number": "888" + }, + "account_number": "88" + }, + "root_type":"Income" + } + } +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/td_plan_comptable.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/td_plan_comptable.json new file mode 100644 index 00000000000..f57a98345da --- /dev/null +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/td_plan_comptable.json @@ -0,0 +1,1919 @@ +{ + "country_code": "td", + "name": "Syscohada - Plan Comptable", + "tree": { + "1-Comptes de ressources durables": { + "10-Capital": { + "101-Capital social": { + "1011-Capital souscrit, non appel\u00e9": {}, + "1012-Capital souscrit, appel\u00e9, non vers\u00e9": {}, + "1013-Capital souscrit, appel\u00e9, vers\u00e9, non amorti": {}, + "1014-Capital souscrit, appel\u00e9, vers\u00e9, amorti": {}, + "1018-Capital souscrit soumis \u00e0 des conditions particuli\u00e8res": {} + }, + "102-Capital par dotation": { + "1021-Dotation initiale": {}, + "1022-Dotations compl\u00e9mentaires": {}, + "1028-Autres dotations": {} + }, + "103-Capital personnel": {}, + "104-Compte de l\u2019exploitant": { + "1041-Apports temporaires": {}, + "1042-Op\u00e9rations courantes": {}, + "1043-R\u00e9mun\u00e9rations, imp\u00f4ts et autres charges personnelles": {}, + "1047-Pr\u00e9l\u00e8vements d\u2019autoconsommation": {}, + "1048-Autres pr\u00e9l\u00e8vements": {} + }, + "105-Primes li\u00e9es au capital social": { + "1051-Primes d\u2019\u00e9mission": {}, + "1052-Primes d\u2019apport": {}, + "1053-Primes de fusion": {}, + "1054-Primes de conversion": {}, + "1058-Autres primes": {} + }, + "106-\u00c9carts de r\u00e9\u00e9valuation": { + "1061-\u00c9carts de r\u00e9\u00e9valuation l\u00e9gale": {}, + "1062-\u00c9carts de r\u00e9\u00e9valuation libre": {} + }, + "109-Apporteurs, capital souscrit, non appel\u00e9": {} + }, + "11-R\u00e9serves": { + "111-R\u00e9serve l\u00e9gale": {}, + "112-R\u00e9serves statutaires ou contractuelles": {}, + "113-R\u00e9serves r\u00e9glement\u00e9es": { + "1131-R\u00e9serves de plus-values nettes \u00e0 long terme": {}, + "1132-R\u00e9serves d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": {}, + "1133-R\u00e9serves cons\u00e9cutives \u00e0 l\u2019octroi de subventions d\u2019investissement": {}, + "1134-R\u00e9serves des valeurs mobili\u00e8res donnant acc\u00e8s au capital": {}, + "1135-Autres r\u00e9serves r\u00e9glement\u00e9es": {} + }, + "118-Autres r\u00e9serves": { + "1181-R\u00e9serves facultatives": {}, + "1188-R\u00e9serves diverses": {} + } + }, + "12-Report \u00e0 nouveau": { + "121-Report \u00e0 nouveau cr\u00e9diteur": {}, + "129-Report \u00e0 nouveau d\u00e9biteur": { + "1291-Perte nette \u00e0 reporter": {}, + "1292-Perte Amortissements r\u00e9put\u00e9s diff\u00e9r\u00e9s": {} + } + }, + "13-R\u00e9sultat net de l\u2019exercice": { + "130-R\u00e9sultat en instance d\u2019affectation": { + "1301-R\u00e9sultat en instance d\u2019affectation : b\u00e9n\u00e9fice": {}, + "1309-R\u00e9sultat en instance d\u2019affectation : perte": {} + }, + "131-R\u00e9sultat net : b\u00e9n\u00e9fice": {}, + "132-Marge commerciale (MC)": {}, + "133-Valeur ajout\u00e9e (VA)": {}, + "134-Exc\u00e9dent brut d\u2019exploitation (EBE)": {}, + "135-R\u00e9sultat d\u2019exploitation (RE)": {}, + "136-R\u00e9sultat financier (RF)": {}, + "137-R\u00e9sultat des activit\u00e9s ordinaires (RAO)": {}, + "138-R\u00e9sultat hors activit\u00e9s ordinaires (RHAO)": { + "1381-R\u00e9sultat de fusion": {}, + "1382-R\u00e9sultat d\u2019apport partiel d\u2019actif": {}, + "1383-R\u00e9sultat de scission": {}, + "1384-R\u00e9sultat de liquidation": {} + }, + "139-R\u00e9sultat net : perte": {} + }, + "14-Subventions d\u2019investissement": { + "141-Subventions d\u2019\u00e9quipement": { + "1411-\u00c9tat": {}, + "1412-R\u00e9gions": {}, + "1413-D\u00e9partements": {}, + "1414-Communes et collectivit\u00e9s publiques d\u00e9centralis\u00e9es": {}, + "1415-Entit\u00e9s publiques ou mixtes": {}, + "1416-Entit\u00e9s et organismes priv\u00e9s": {}, + "1417-Organismes internationaux": {}, + "1418-Autres": {} + }, + "148-Autres subventions d\u2019investissement": {} + }, + "15-Provisions r\u00e9glement\u00e9es et fonds assimil\u00e9s": { + "151-Amortissements d\u00e9rogatoires": {}, + "152-Plus-values de cession \u00e0 r\u00e9investir": {}, + "153-Fonds r\u00e9glement\u00e9s": { + "1531-Fonds National": {}, + "1532-Pr\u00e9l\u00e8vement pour le Budget": {} + }, + "154-Provisions sp\u00e9ciales de r\u00e9\u00e9valuation": {}, + "155-Provisions r\u00e9glement\u00e9es relatives aux immobilisations": { + "1551-Reconstitution des gisements miniers et p\u00e9troliers": {} + }, + "156-Provisions r\u00e9glement\u00e9es relatives aux stocks": { + "1561-Hausse de prix": {}, + "1562-Fluctuation des cours": {} + }, + "157-Provisions pour investissement": {}, + "158-Autres provisions et fonds r\u00e9glement\u00e9s": {} + }, + "16-Emprunts et dettes assimil\u00e9es": { + "161-Emprunts obligataires": { + "1611-Emprunts obligataires ordinaires": {}, + "1612-Emprunts obligataires convertibles en actions": {}, + "1613-Emprunts obligataires remboursables en actions": {}, + "1618-Autres emprunts obligataires": {} + }, + "162-Emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": {}, + "163-Avances re\u00e7ues de l\u2019\u00c9tat": {}, + "164-Avances re\u00e7ues et comptes courants bloqu\u00e9s": {}, + "165-D\u00e9p\u00f4ts et cautionnements re\u00e7us": { + "1651-D\u00e9p\u00f4ts": {}, + "1652-Cautionnements": {} + }, + "166-Int\u00e9r\u00eats courus": { + "1661-Sur emprunts obligataires": {}, + "1662-Sur emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": {}, + "1663-Sur avances re\u00e7ues de l\u2019\u00c9tat": {}, + "1664-Sur avances re\u00e7ues et comptes courants bloqu\u00e9s": {}, + "1665-Sur d\u00e9p\u00f4ts et cautionnements re\u00e7us": {}, + "1667-Sur avances assorties de conditions particuli\u00e8res": {}, + "1668-Sur autres emprunts et dettes": {} + }, + "167-Avances assorties de conditions particuli\u00e8res": { + "1671-Avances bloqu\u00e9es pour augmentation du capital": {}, + "1672-Avances conditionn\u00e9es par l\u2019\u00c9tat": {}, + "1673-Avances conditionn\u00e9es par les autres organismes africains": {}, + "1674-Avances conditionn\u00e9es par les organismes internationaux": {} + }, + "168-Autres emprunts et dettes": { + "1681-Rentes viag\u00e8res capitalis\u00e9es": {}, + "1682-Billets de fonds": {}, + "1683-Dettes cons\u00e9cutives \u00e0 des titres emprunt\u00e9s": {}, + "1684-Emprunts participatifs": {}, + "1685-Participation des travailleurs aux b\u00e9n\u00e9fices": {}, + "1686-Emprunts et dettes contract\u00e9s aupr\u00e8s des autres tiers": {} + } + }, + "17-Dettes de location acquisition": { + "172-Dettes de location acquisition / cr\u00e9dit bail immobilier": {}, + "173-Dettes de location acquisition / cr\u00e9dit bail mobilier": {}, + "174-Dettes de location acquisition / location de vente": {}, + "176-Int\u00e9r\u00eats courus": { + "1762-Sur dettes de location acquisition / cr\u00e9dit-bail immobilier": {}, + "1763-Sur dettes de location acquisition / cr\u00e9dit-bail mobilier": {}, + "1764-Sur dettes de location acquisition / location-vente": {}, + "1768-Sur autres dettes de location acquisition": {} + }, + "178-Autres dettes de location acquisition": {} + }, + "18-Dettes li\u00e9es \u00e0 des participations et comptes de liaison des \u00e9tablissements et soci\u00e9t\u00e9s en participation": { + "181-Dettes li\u00e9es \u00e0 des participations": { + "1811-Dettes li\u00e9es \u00e0 des participations (groupe)": {}, + "1812-Dettes li\u00e9es \u00e0 des participations (hors groupe)": {} + }, + "182-Dettes li\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": {}, + "183-Int\u00e9r\u00eats courus sur dettes li\u00e9es \u00e0 des participations": {}, + "184-Comptes permanents bloqu\u00e9s des \u00e9tablissements et succursales": {}, + "185-Comptes permanents non bloqu\u00e9s des \u00e9tablissements et succursales": {}, + "186-Comptes de liaison charges": {}, + "187-Comptes de liaison produits": {}, + "188-Comptes de liaison des soci\u00e9t\u00e9s en participation": {} + }, + "19-Provisions pour risques et charges": { + "191-Provisions pour litiges": {}, + "192-Provisions pour garanties donn\u00e9es aux clients": {}, + "193-Provisions pour pertes sur march\u00e9s \u00e0 ach\u00e8vement futur": {}, + "194-Provisions pour pertes de change": {}, + "195-Provisions pour imp\u00f4ts": {}, + "196-Provisions pour pensions et obligations similaires": { + "1961-Provisions pour pensions et obligations similaires engagement de retraite": {}, + "1962-Actif du r\u00e9gime de retraite": {} + }, + "197-Provisions pour restructuration": {}, + "198-Autres provisions pour risques et charges": { + "1981-Provisions pour amendes et p\u00e9nalit\u00e9s": {}, + "1983-Provisions pour propre assureur": {}, + "1984-Provisions pour d\u00e9mant\u00e8lement et remise en \u00e9tat": {}, + "1985-Provisions pour droits \u00e0 r\u00e9duction ou avantage en nature (ch\u00e8ques cadeau, cartes de fid\u00e9lit\u00e9...)": {}, + "1988-Provisions pour divers risques et charges": {} + } + }, + "root_type": "Equity" + }, + "2-Comptes d\u2019actif immobilis\u00e9": { + "21-Immobilisations incorporelles": { + "account_type": "Fixed Asset", + "211-Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset" + }, + "212-Brevets, licences, concessions et droits similaires": { + "account_type": "Fixed Asset", + "2121-Brevets": { + "account_type": "Fixed Asset" + }, + "2122-Licences": { + "account_type": "Fixed Asset" + }, + "2123-Concessions de service public": { + "account_type": "Fixed Asset" + }, + "2128-Autres concessions et droits similaires": { + "account_type": "Fixed Asset" + } + }, + "213-Logiciels et sites internet": { + "account_type": "Fixed Asset", + "2131-Logiciels": { + "account_type": "Fixed Asset" + }, + "2132-Sites internet": { + "account_type": "Fixed Asset" + } + }, + "214-Marques": { + "account_type": "Fixed Asset" + }, + "215-Fonds commercial": { + "account_type": "Fixed Asset" + }, + "216-Droit au bail": { + "account_type": "Fixed Asset" + }, + "217-Investissements de cr\u00e9ation": { + "account_type": "Fixed Asset" + }, + "218-Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset", + "2181-Frais de prospection et d\u2019\u00e9valuation de ressources min\u00e9rales": { + "account_type": "Fixed Asset" + }, + "2182-Co\u00fbts d\u2019obtention du contrat": { + "account_type": "Fixed Asset" + }, + "2183-Fichiers clients, notices, titres de journaux et magazines": { + "account_type": "Fixed Asset" + }, + "2184-Co\u00fbts des franchises": { + "account_type": "Fixed Asset" + }, + "2188-Divers droits et valeurs incorporelles": { + "account_type": "Fixed Asset" + } + }, + "219-Immobilisations incorporelles en cours": { + "account_type": "Fixed Asset", + "2191-Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset" + }, + "2193-Logiciels et internet": { + "account_type": "Fixed Asset" + }, + "2198-Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset" + } + } + }, + "22-Terrains": { + "account_type": "Fixed Asset", + "221-Terrains agricoles et forestiers": { + "account_type": "Fixed Asset", + "2211-Terrains d\u2019exploitation agricole": { + "account_type": "Fixed Asset" + }, + "2212-Terrains d\u2019exploitation foresti\u00e8re": { + "account_type": "Fixed Asset" + }, + "2218-Autres terrains": { + "account_type": "Fixed Asset" + } + }, + "222-Terrains nus": { + "account_type": "Fixed Asset", + "2221-Terrains \u00e0 b\u00e2tir": { + "account_type": "Fixed Asset" + }, + "2228-Autres terrains nus": { + "account_type": "Fixed Asset" + } + }, + "223-Terrains b\u00e2tis": { + "account_type": "Fixed Asset", + "2231-Pour b\u00e2timents industriels et agricoles": { + "account_type": "Fixed Asset" + }, + "2232-Pour b\u00e2timents administratifs et commerciaux": { + "account_type": "Fixed Asset" + }, + "2234-Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations professionnelles": { + "account_type": "Fixed Asset" + }, + "2235-Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations non professionnelles": { + "account_type": "Fixed Asset" + }, + "2238-Autres terrains b\u00e2tis": { + "account_type": "Fixed Asset" + } + }, + "224-Travaux de mise en valeur des terrains": { + "account_type": "Fixed Asset", + "2241-Plantation d\u2019arbres et d\u2019arbustes": { + "account_type": "Fixed Asset" + }, + "2245-Am\u00e9liorations du fonds": { + "account_type": "Fixed Asset" + }, + "2248-Autres travaux": { + "account_type": "Fixed Asset" + } + }, + "225-Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset", + "2251-Carri\u00e8res": { + "account_type": "Fixed Asset" + } + }, + "226-Terrains am\u00e9nag\u00e9s": { + "account_type": "Fixed Asset", + "2261-Parkings": { + "account_type": "Fixed Asset" + } + }, + "227-Terrains mis en concession": { + "account_type": "Fixed Asset" + }, + "228-Autres terrains": { + "account_type": "Fixed Asset", + "2281-Terrains immeubles de placement": { + "account_type": "Fixed Asset" + }, + "2285-Terrains des logements affect\u00e9s au personnel": { + "account_type": "Fixed Asset" + }, + "2286-Terrains de location acquisition": { + "account_type": "Fixed Asset" + }, + "2288-Divers terrains": { + "account_type": "Fixed Asset" + } + }, + "229-Am\u00e9nagements de terrains en cours": { + "account_type": "Fixed Asset", + "2291-Terrains agricoles et forestiers": { + "account_type": "Fixed Asset" + }, + "2292-Terrains nus": { + "account_type": "Fixed Asset" + }, + "2295-Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset" + }, + "2298-Autres terrains": { + "account_type": "Fixed Asset" + } + } + }, + "23-B\u00e2timents, installations techniques et agencements": { + "231-B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "2311-B\u00e2timents industriels": {}, + "2312-B\u00e2timents agricoles": {}, + "2313-B\u00e2timents administratifs et commerciaux": {}, + "2314-B\u00e2timents affect\u00e9s au logement du personnel": {}, + "2315-B\u00e2timents immeubles de placement": {}, + "2316-B\u00e2timents de location acquisition": {} + }, + "232-B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "2321-B\u00e2timents industriels": {}, + "2322-B\u00e2timents agricoles": {}, + "2323-B\u00e2timents administratifs et commerciaux": {}, + "2324-B\u00e2timents affect\u00e9s au logement du personnel": {}, + "2325-B\u00e2timents immeubles de placement": {}, + "2326-B\u00e2timents de location acquisition": {} + }, + "233-Ouvrages d\u2019infrastructure": { + "2331-Voies de terre": {}, + "2332-Voies de fer": {}, + "2333-Voies d\u2019eau": {}, + "2334-Barrages, Digues": {}, + "2335-Pistes d\u2019a\u00e9rodrome": {}, + "2338-Autres ouvrages d\u2019infrastructures": {} + }, + "234-Am\u00e9nagements, agencements et installations techniques": { + "2341-Installations complexes sp\u00e9cialis\u00e9es sur sol propre": {}, + "2342-Installations complexes sp\u00e9cialis\u00e9es sur sol d\u2019autrui": {}, + "2343-Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol propre": {}, + "2344-Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol d\u2019autrui": {}, + "2345-Am\u00e9nagements et agencements des b\u00e2timents": {} + }, + "235-Am\u00e9nagements de bureaux": { + "2351-Installations g\u00e9n\u00e9rales": {}, + "2358-Autres am\u00e9nagements de bureaux": {} + }, + "237-B\u00e2timents industriels, agricoles et commerciaux mis en concession": {}, + "238-Autres installations et agencements": {}, + "239-B\u00e2timents am\u00e9nagements, agencements et installations en cours": { + "2391-B\u00e2timents en cours": {}, + "2392-Installations en cours": {}, + "2393-Ouvrages d\u2019infrastructure en cours": {}, + "2394-Am\u00e9nagements et agencements et installations techniques en cours": {}, + "2395-Am\u00e9nagements de bureaux en cours": {}, + "2398-Autres installations et agencements en cours": {} + } + }, + "24-Mat\u00e9riel, mobilier et actifs biologiques": { + "241-Mat\u00e9riel et outillage industriel et commercial": { + "2411-Mat\u00e9riel industriel": {}, + "2412-Outillage industriel": {}, + "2413-Mat\u00e9riel commercial": {}, + "2414-Outillage commercial": {}, + "2416-Mat\u00e9riel & outillage industriel et commercial de location-acquisition": {} + }, + "242-Mat\u00e9riel et outillage agricole": { + "2421-Mat\u00e9riel agricole": {}, + "2422-Outillage agricole": {}, + "2426-Mat\u00e9riel & outillage agricole de location-acquisition": {} + }, + "243-Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "244-Mat\u00e9riel et mobilier": { + "2441-Mat\u00e9riel de bureau": {}, + "2442-Mat\u00e9riel informatique": {}, + "2443-Mat\u00e9riel bureautique": {}, + "2444-Mobilier de bureau": {}, + "2445-Mat\u00e9riel et mobilier immeubles de placement": {}, + "2446-Mat\u00e9riel et mobilier de location acquisition": {}, + "2447-Mat\u00e9riel et mobilier des logements du personnel": {} + }, + "245-Mat\u00e9riel de transport": { + "2451-Mat\u00e9riel automobile": {}, + "2452-Mat\u00e9riel ferroviaire": {}, + "2453-Mat\u00e9riel fluvial, lagunaire": {}, + "2454-Mat\u00e9riel naval": {}, + "2455-Mat\u00e9riel a\u00e9rien": {}, + "2456-Mat\u00e9riel de transport de location-acquisition": {}, + "2457-Mat\u00e9riel hippomobile": {}, + "2458-Autres mat\u00e9riels de transport": {} + }, + "246-Actifs biologiques": { + "2461-Cheptel, animaux de trait": {}, + "2462-Cheptel, animaux reproducteurs": {}, + "2463-Animaux de garde": {}, + "2465-Plantations agricoles": {}, + "2468-Autres actifs biologiques": {} + }, + "247-Agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "2471-Agencements et am\u00e9nagements du mat\u00e9riel": {}, + "2472-Agencements et am\u00e9nagements des actifs biologiques": {}, + "2478-Autres agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": {} + }, + "248-Autres mat\u00e9riels et mobiliers": { + "2481-Collections et \u0153uvres d\u2019art": {}, + "2488-Divers mat\u00e9riels mobiliers": {} + }, + "249-Mat\u00e9riels et actifs biologiques en cours": { + "2491-Mat\u00e9riel et outillage industriel et commercial": {}, + "2492-Mat\u00e9riel et outillage agricole": {}, + "2493-Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "2494-Mat\u00e9riel et mobilier de bureau": {}, + "2495-Mat\u00e9riel de transport": {}, + "2496-Actifs biologiques": {}, + "2497-Agencements am\u00e9nagements du mat\u00e9riel et actifs biologiques": {}, + "2498-Autres mat\u00e9riels et actifs biologiques en cours": {} + } + }, + "25-Avances et acomptes vers\u00e9s sur immobilisations": { + "251-Avances et acomptes vers\u00e9s sur immobilisations incorporelles": {}, + "252-Avances et acomptes vers\u00e9s sur immobilisations corporelles": {} + }, + "26-Titres de participation": { + "261-Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": {}, + "262-Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le conjoint": {}, + "263-Titres de participation dans des soci\u00e9t\u00e9s conf\u00e9rant une influence notable": {}, + "265-Participations dans des organismes professionnels": {}, + "266-Parts dans des groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": {}, + "268-Autres titres de participation": {} + }, + "27-Autres immobilisations financi\u00e8res": { + "271-Pr\u00eats et cr\u00e9ances": { + "2711-Pr\u00eats participatifs": {}, + "2712-Pr\u00eats aux associ\u00e9s": {}, + "2713-Billets de fonds": {}, + "2714-Titres pr\u00eat\u00e9s": {}, + "2718-Autres pr\u00eats et cr\u00e9ances": {} + }, + "272-Pr\u00eats au personnel": { + "2721-Pr\u00eats immobiliers": {}, + "2722-Pr\u00eats mobiliers et d\u2019installation": {}, + "2728-Autres pr\u00eats au personnel": {} + }, + "273-Cr\u00e9ances sur l\u2019\u00c9tat": { + "2731-Retenues de garantie": {}, + "2733-Fonds r\u00e9glement\u00e9": {}, + "2734-Cr\u00e9ances sur le conc\u00e9dant": {}, + "2738-Autres cr\u00e9ances sur l\u2019\u00c9tat": {} + }, + "274-Titres immobilis\u00e9s": { + "2741-Titres immobilis\u00e9s de l\u2019activit\u00e9 de portefeuille (TIAP)": {}, + "2742-Titres participatifs": {}, + "2743-Certificats d\u2019investissement": {}, + "2744-Parts de fonds commun de placement (FCP)": {}, + "2745-Obligations": {}, + "2746-Actions ou parts propres": {}, + "2748-Autres titres immobilis\u00e9s": {} + }, + "275-D\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "2751-D\u00e9p\u00f4ts pour loyers d\u2019avance": {}, + "2752-D\u00e9p\u00f4ts pour l\u2019\u00e9lectricit\u00e9": {}, + "2753-D\u00e9p\u00f4ts pour l\u2019eau": {}, + "2754-D\u00e9p\u00f4ts pour le gaz": {}, + "2755-D\u00e9p\u00f4ts pour le t\u00e9l\u00e9phone, le t\u00e9lex, la t\u00e9l\u00e9copie": {}, + "2756-Cautionnements sur march\u00e9s publics": {}, + "2757-Cautionnements sur autres op\u00e9rations": {}, + "2758-Autres d\u00e9p\u00f4ts et cautionnements": {} + }, + "276-Int\u00e9r\u00eats courus": { + "2761-Pr\u00eats et cr\u00e9ances non commerciales": {}, + "2762-Pr\u00eats au personnel": {}, + "2763-Cr\u00e9ances sur l\u2019\u00c9tat": {}, + "2764-Titres immobilis\u00e9s": {}, + "2765-D\u00e9p\u00f4ts et cautionnements vers\u00e9s": {}, + "2767-Cr\u00e9ances rattach\u00e9es \u00e0 des participations": {}, + "2768-Immobilisations financi\u00e8res diverses": {} + }, + "277-Cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": { + "2771-Cr\u00e9ances rattach\u00e9es \u00e0 des participations (groupe)": {}, + "2772-Cr\u00e9ances rattach\u00e9es \u00e0 des participations (hors groupe)": {}, + "2773-Cr\u00e9ances rattach\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": {}, + "2774-Avances \u00e0 des Groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": {} + }, + "278-Immobilisations financi\u00e8res diverses": { + "2781-Cr\u00e9ances diverses groupe": {}, + "2782-Cr\u00e9ances diverses hors groupe": {}, + "2784-Banques d\u00e9p\u00f4ts \u00e0 terme": {}, + "2785-Or et m\u00e9taux pr\u00e9cieux": {}, + "2788-Autres immobilisations financi\u00e8res": {} + } + }, + "28-Amortissements": { + "account_type": "Accumulated Depreciation", + "281-Amortissements des immobilisations corporelles": { + "account_type": "Accumulated Depreciation", + "2811-Amortissements des frais de d\u00e9veloppement": { + "account_type": "Accumulated Depreciation" + }, + "2812-Amortissements des brevets, licences, concessions et droits similaires": { + "account_type": "Accumulated Depreciation" + }, + "2813-Amortissements des logiciels et sites internet": { + "account_type": "Accumulated Depreciation" + }, + "2814-Amortissements des marques": { + "account_type": "Accumulated Depreciation" + }, + "2815-Amortissements du fonds commercial": { + "account_type": "Accumulated Depreciation" + }, + "2816-Amortissements du droit au bail": { + "account_type": "Accumulated Depreciation" + }, + "2817-Amortissements des investissements de cr\u00e9ation": { + "account_type": "Accumulated Depreciation" + }, + "2818-Amortissements des autres droits et valeurs incorporels": { + "account_type": "Accumulated Depreciation" + } + }, + "282-Amortissements des terrains": { + "2824-Amortissements des travaux de mise en valeur des terrains": {} + }, + "283-Amortissements des b\u00e2timents, installations techniques et agencements": { + "2831-Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": {}, + "2832-Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": {}, + "2833-Amortissements des ouvrages d\u2019infrastructure": {}, + "2834-Amortissements des am\u00e9nagements, agencements et installations techniques": {}, + "2835-Amortissements des am\u00e9nagements de bureaux": {}, + "2837-Amortissements des b\u00e2timents industriels, agricoles et commerciaux mis en concession": {}, + "2838-Amortissements des autres installations et agencements": {} + }, + "284-Amortissements du mat\u00e9riel": { + "2841-Amortissements du mat\u00e9riel et outillage industriel et commercial": {}, + "2842-Amortissements du mat\u00e9riel et outillage agricole": {}, + "2843-Amortissements du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "2844-Amortissements du mat\u00e9riel et mobilier": {}, + "2845-Amortissements du mat\u00e9riel de transport": {}, + "2846-Amortissements des actifs biologiques": {}, + "2847-Amortissements des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": {}, + "2848-Amortissements des autres mat\u00e9riels": {} + } + }, + "29-D\u00e9pr\u00e9ciations des immobilisations": { + "291-D\u00e9pr\u00e9ciations des immobilisations incorporelles": { + "2911-D\u00e9pr\u00e9ciations des frais de d\u00e9veloppement": {}, + "2912-D\u00e9pr\u00e9ciations des brevets, licences, concessions et droits similaires": {}, + "2913-D\u00e9pr\u00e9ciations des logiciels et sites internet": {}, + "2914-D\u00e9pr\u00e9ciations des marques": {}, + "2915-D\u00e9pr\u00e9ciations du fonds commercial": {}, + "2916-D\u00e9pr\u00e9ciations du droit au bail": {}, + "2917-D\u00e9pr\u00e9ciations des investissements de cr\u00e9ation": {}, + "2918-D\u00e9pr\u00e9ciations des autres droits et valeurs incorporels": {}, + "2919-D\u00e9pr\u00e9ciations des immobilisations incorporelles en cours": {} + }, + "292-D\u00e9pr\u00e9ciations des terrains": { + "2921-D\u00e9pr\u00e9ciations des terrains agricoles et forestiers": {}, + "2922-D\u00e9pr\u00e9ciations des terrains nus": {}, + "2923-D\u00e9pr\u00e9ciations des terrains b\u00e2tis": {}, + "2924-D\u00e9pr\u00e9ciations des travaux de mise en valeur des terrains": {}, + "2925-D\u00e9pr\u00e9ciations des terrains de gisement": {}, + "2926-D\u00e9pr\u00e9ciations des terrains am\u00e9nag\u00e9s": {}, + "2927-D\u00e9pr\u00e9ciations des terrains mis en concession": {}, + "2928-D\u00e9pr\u00e9ciations des autres terrains": {}, + "2929-D\u00e9pr\u00e9ciations des am\u00e9nagements de terrains en cours": {} + }, + "293-D\u00e9pr\u00e9ciations des b\u00e2timents, installations techniques et agencements": { + "2931-D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": {}, + "2932-D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": {}, + "2933-D\u00e9pr\u00e9ciations des ouvrages d\u2019infrastructures": {}, + "2934-D\u00e9pr\u00e9ciations des am\u00e9nagements, agencements et installations techniques": {}, + "2935-D\u00e9pr\u00e9ciations des am\u00e9nagements de bureaux": {}, + "2937-D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles et commerciaux mis en concession": {}, + "2938-D\u00e9pr\u00e9ciations des autres installations et agencements": {}, + "2939-D\u00e9pr\u00e9ciations des b\u00e2timents et installations en cours": {} + }, + "294-D\u00e9pr\u00e9ciations de mat\u00e9riel, du mobilier et de l\u2019actif biologique": { + "2941-D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage industriel et commercial": {}, + "2942-D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage agricole": {}, + "2943-D\u00e9pr\u00e9ciations du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "2944-D\u00e9pr\u00e9ciations du mat\u00e9riel et mobilier": {}, + "2945-D\u00e9pr\u00e9ciations du mat\u00e9riel de transport": {}, + "2946-D\u00e9pr\u00e9ciations des actifs biologiques": {}, + "2947-D\u00e9pr\u00e9ciations des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": {}, + "2948-D\u00e9pr\u00e9ciations des autres mat\u00e9riels": {}, + "2949-D\u00e9pr\u00e9ciations de mat\u00e9riel en cours": {} + }, + "295-D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations": { + "2951-D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations incorporelles": {}, + "2952-D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations corporelles": {} + }, + "296-D\u00e9pr\u00e9ciations des titres de participation": { + "2961-D\u00e9pr\u00e9ciations des titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": {}, + "2962-D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s sous contr\u00f4le conjoint": {}, + "2963-D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s conf\u00e9rant une influence notable": {}, + "2965-D\u00e9pr\u00e9ciations des participations dans des organismes professionnels": {}, + "2966-D\u00e9pr\u00e9ciations des parts dans des GIE": {}, + "2968-D\u00e9pr\u00e9ciations des autres titres de participation": {} + }, + "297-D\u00e9pr\u00e9ciations des autres immobilisations financi\u00e8res": { + "2971-D\u00e9pr\u00e9ciations des pr\u00eats et cr\u00e9ances": {}, + "2972-D\u00e9pr\u00e9ciations des pr\u00eats au personnel": {}, + "2973-D\u00e9pr\u00e9ciations des cr\u00e9ances sur l\u2019\u00c9tat": {}, + "2974-D\u00e9pr\u00e9ciations des titres immobilis\u00e9s": {}, + "2975-D\u00e9pr\u00e9ciations des d\u00e9p\u00f4ts et cautionnements vers\u00e9s": {}, + "2977-D\u00e9pr\u00e9ciations des cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": {}, + "2978-D\u00e9pr\u00e9ciations des cr\u00e9ances financi\u00e8res diverses": {} + } + }, + "root_type": "Asset" + }, + "3-Comptes de Stocks": { + "31-Marchandises": { + "311-Marchandises A": { + "3111-Marchandises A1": {}, + "3112-Marchandises A2": {} + }, + "312-Marchandises B": { + "3121-Marchandises B1": {}, + "3122-Marchandises B2": {} + }, + "313-Actifs biologiques": { + "3131-Animaux": {}, + "3132-V\u00e9g\u00e9taux": {} + }, + "318-Marchandises hors activit\u00e9s ordinaires (HAO)": {} + }, + "32-Mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "321-Mati\u00e8res A": {}, + "322-Mati\u00e8res B": {}, + "323-Fournitures (A, B)": {} + }, + "33-Autres approvisionnements": { + "331-Mati\u00e8res consommables": {}, + "332-Fournitures d\u2019atelier et d\u2019usine": {}, + "333-Fournitures de magasin": {}, + "334-Fournitures de bureau": {}, + "335-Emballages": { + "3351-Emballages perdus": {}, + "3352-Emballages r\u00e9cup\u00e9rables non identifiables": {}, + "3353-Emballages \u00e0 usage mixte": {}, + "3358-Autres emballages": {} + }, + "338-Autres mati\u00e8res": {} + }, + "34-Produits en cours": { + "341-Produits en cours": { + "3411-Produits en cours P1": {}, + "3412-Produits en cours P2": {} + }, + "342-Travaux en cours": { + "3421-Travaux en cours T1": {}, + "3422-Travaux en cours T2": {} + }, + "343-Produits interm\u00e9diaires en cours": { + "3431-Produits interm\u00e9diaires A": {}, + "3432-Produits interm\u00e9diaires B": {} + }, + "344-Produits r\u00e9siduels en cours": { + "3441-Produits r\u00e9siduels A": {}, + "3442-Produits r\u00e9siduels B": {} + }, + "345-Actifs biologiques en cours": { + "3451-Animaux": {}, + "3452-V\u00e9g\u00e9taux": {} + } + }, + "35-Services en cours": { + "351-\u00c9tudes en cours": { + "3511-\u00c9tudes en cours E1": {}, + "3512-\u00c9tudes en cours E2": {} + }, + "352-Prestations de services en cours": { + "3521-Prestations de services S1": {}, + "3522-Prestations de services S2": {} + } + }, + "36-Produits finis": { + "361-Produits finis A": {}, + "362-Produits finis B": {}, + "363-Actifs biologiques": { + "3631-Animaux": {}, + "3632-V\u00e9g\u00e9taux": {}, + "3638-Autres stocks (activit\u00e9s annexes)": {} + } + }, + "37-Produits interm\u00e9diaires et r\u00e9siduels": { + "371-Produits interm\u00e9diaires": { + "3711-Produits interm\u00e9diaires A": {}, + "3712-Produits interm\u00e9diaires B": {} + }, + "372-Produits r\u00e9siduels": { + "3721-D\u00e9chets": {}, + "3722-Rebuts": {}, + "3723-Mati\u00e8res de R\u00e9cup\u00e9ration": {} + }, + "373-Actifs biologiques": { + "3731-Animaux": {}, + "3732-V\u00e9g\u00e9taux": {}, + "3738-Autres stocks (activit\u00e9s annexes)": {} + } + }, + "38-Stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": { + "account_type": "Stock", + "381-Marchandises en cours de route": {}, + "382-Mati\u00e8res premi\u00e8res et fournitures li\u00e9es en cours de route": {}, + "383-Autres approvisionnements en cours de route": {}, + "386-Produits finis en cours de route": {}, + "387-Stock en consignation ou en d\u00e9p\u00f4t": { + "3871-Stock en consignation": {}, + "3872-Stock en d\u00e9p\u00f4t": {} + }, + "388-Stock provenant d\u2019immobilisations mises hors service ou au rebut": {} + }, + "39-D\u00e9pr\u00e9ciations des stocks et encours de production": { + "391-D\u00e9pr\u00e9ciations des stocks de marchandises": {}, + "392-D\u00e9pr\u00e9ciations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": {}, + "393-D\u00e9pr\u00e9ciations des stocks d\u2019autres approvisionnements": {}, + "394-D\u00e9pr\u00e9ciations des productions en cours": {}, + "395-D\u00e9pr\u00e9ciations des services en cours": {}, + "396-D\u00e9pr\u00e9ciations des stocks de produits finis": {}, + "397-D\u00e9pr\u00e9ciations des stocks de produits interm\u00e9diaires et r\u00e9siduels": {}, + "398-D\u00e9pr\u00e9ciations des stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": {} + }, + "root_type": "Asset" + }, + "4-Comptes de Tiers (ACTIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (ACTIF)": { + "409-Fournisseurs d\u00e9biteurs": { + "4091-Fournisseurs Avances et acomptes vers\u00e9s": {}, + "4092-Fournisseurs Groupe avances et acomptes vers\u00e9s": {}, + "4093-Fournisseurs Sous-traitants avances et acomptes vers\u00e9s": {}, + "4094-Fournisseurs Cr\u00e9ances pour emballages et mat\u00e9riels \u00e0 rendre": {}, + "4098-Fournisseurs Rabais, remises, ristournes et autres avoirs \u00e0 obtenir": {} + } + }, + "41-Clients et comptes rattach\u00e9s (ACTIF)": { + "411-Clients": { + "4111-Clients": { + "account_type": "Receivable" + }, + "4112-Clients groupe": { + "account_type": "Receivable" + }, + "4114-Clients, \u00c9tat et Collectivit\u00e9s publiques": { + "account_type": "Receivable" + }, + "4115-Clients, organismes internationaux": { + "account_type": "Receivable" + }, + "4116-Clients, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Receivable" + }, + "4117-Client, retenues de garantie": { + "account_type": "Receivable" + }, + "4118-Clients, d\u00e9gr\u00e8vement de taxes sur la valeur ajout\u00e9e (TVA)": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "412-Clients, effets \u00e0 recevoir en portefeuille": { + "4121-Clients, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "4122-Clients Groupe, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "4124-\u00c9tat et Collectivit\u00e9s publiques, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "4125-Organismes Internationaux, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "413-Clients, ch\u00e8ques, effets et autres valeurs impay\u00e9es": { + "4131-Clients, ch\u00e8ques impay\u00e9s": { + "account_type": "Receivable" + }, + "4132-Clients, effets impay\u00e9s": { + "account_type": "Receivable" + }, + "4133-Clients, cartes de cr\u00e9dit impay\u00e9es": { + "account_type": "Receivable" + }, + "4138-Clients, autres valeurs impay\u00e9es": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "414-Cr\u00e9ances sur cessions courantes d\u2019immobilisations": { + "4141-Cr\u00e9ances en compte, immobilisations incorporelles": { + "account_type": "Receivable" + }, + "4142-Cr\u00e9ances en compte, immobilisations corporelles": { + "account_type": "Receivable" + }, + "4146-Effets \u00e0 recevoir, immobilisations incorporelles": { + "account_type": "Receivable" + }, + "4147-Effets \u00e0 recevoir, immobilisations corporelles": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "415-Clients, effets escompt\u00e9s non \u00e9chus": { + "account_type": "Receivable" + }, + "416-Cr\u00e9ances clients litigieuses ou douteuses": { + "4161-Cr\u00e9ances litigieuses": { + "account_type": "Receivable" + }, + "4162-Cr\u00e9ances douteuses": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "418-Clients, produits \u00e0 recevoir": { + "4181-Clients, factures \u00e0 \u00e9tablir": { + "account_type": "Receivable" + }, + "4186-Clients, int\u00e9r\u00eats courus": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "42-Personnel (ACTIF)": { + "421-Personnel, avances et acomptes": { + "4211-Personnel, avances": {}, + "4212-Personnel, acomptes": {}, + "4213-Frais avanc\u00e9s et fournitures au personnel": {} + } + }, + "43-Organismes sociaux (ACTIF)": { + "431-S\u00e9curit\u00e9 sociale": { + "4311-Prestations familiales": {}, + "4312-Accidents de travail": {}, + "4313-Caisse de retraite obligatoire": {}, + "4314-Caisse de retraite facultative": {}, + "4318-Autres cotisations sociales": {} + }, + "432-Caisses de retraite compl\u00e9mentaire": {}, + "433-Autres organismes sociaux": { + "4331-Mutuelle": {}, + "4332-Assurances retraite": {}, + "4333-Assurances et organismes de sant\u00e9": {} + }, + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "4387-Produits \u00e0 recevoir": {} + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (ACTIF)": { + "443-\u00c9tat, TVA factur\u00e9e": { + "4431-TVA factur\u00e9e sur ventes": {}, + "4432-TVA factur\u00e9e sur prestations de services": {}, + "4433-TVA factur\u00e9e sur travaux": {}, + "4434-TVA factur\u00e9e sur production livr\u00e9e \u00e0 soi-m\u00eame": {}, + "4435-TVA sur factures \u00e0 \u00e9tablir": {} + }, + "445-\u00c9tat, TVA r\u00e9cup\u00e9rable": { + "4451-TVA r\u00e9cup\u00e9rable sur immobilisations": {}, + "4452-TVA r\u00e9cup\u00e9rable sur achats": {}, + "4453-TVA r\u00e9cup\u00e9rable sur transport": {}, + "4454-TVA r\u00e9cup\u00e9rable sur services ext\u00e9rieurs et autres charges": {}, + "4455-TVA r\u00e9cup\u00e9rable sur factures non parvenues": {}, + "4456-TVA transf\u00e9r\u00e9e par d\u2019autres entit\u00e9s": {} + }, + "448-\u00c9tat, charges \u00e0 payer et produits \u00e0 recevoir": { + "4486-Charges \u00e0 payer": {}, + "4487-Produits \u00e0 recevoir": {} + }, + "449-\u00c9tat, cr\u00e9ances et dettes diverses": { + "4491-\u00c9tat, obligations cautionn\u00e9es": {}, + "4492-\u00c9tat, avances et acomptes vers\u00e9s sur imp\u00f4ts": {}, + "4493-\u00c9tat, fonds de dotation \u00e0 recevoir": {}, + "4494-\u00c9tat, subventions investissement \u00e0 recevoir": {}, + "4495-\u00c9tat, subventions d\u2019exploitation \u00e0 recevoir": {}, + "4496-\u00c9tat, subventions d\u2019\u00e9quilibre \u00e0 recevoir": {}, + "4497-\u00c9tat, avances sur subventions": {}, + "4499-\u00c9tat, fonds r\u00e9glement\u00e9s provisionn\u00e9s": {} + } + }, + "45-Organismes internationaux (ACTIF)": { + "451-Op\u00e9rations avec les organismes africains": {}, + "452-Op\u00e9rations avec les autres organismes internationaux": {}, + "458-Organismes internationaux, fonds de dotation et subventions \u00e0 recevoir": { + "4581-Organismes internationaux, fonds de dotation \u00e0 recevoir": {}, + "4582-Organismes internationaux, subventions \u00e0 recevoir": {} + } + }, + "46-Apporteurs, associ\u00e9s et groupe (ACTIF)": { + "461-Apporteurs, op\u00e9rations sur le capital": { + "4613-Apporteurs, capital appel\u00e9, non vers\u00e9": {}, + "4614-Apporteurs, compte d\u2019apport, op\u00e9rations de restructuration (fusion...)": {}, + "4618-Apporteurs, titres \u00e0 \u00e9changer": {} + }, + "467-Apporteurs, restant d\u00fb sur capital appel\u00e9": {} + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (ACTIF)": { + "472-Cr\u00e9ances et dettes sur titres de placement": { + "4721-Cr\u00e9ances sur cessions de titres de placement": {}, + "4726-Versements restant \u00e0 effectuer sur titres de placement non lib\u00e9r\u00e9s": {} + }, + "473-Interm\u00e9diaires Op\u00e9rations faites pour compte de tiers": { + "4731-Mandants": {}, + "4732-Mandataires": {}, + "4733-Commettants": {}, + "4734-Commissionnaires": {}, + "4739-\u00c9tat, Collectivit\u00e9s publiques, fonds global d\u2019allocation": {} + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits": { + "4747-Compte de r\u00e9partition p\u00e9riodique des produits": {} + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA": { + "4751-Compte actif": { + "account_type": "Temporary" + } + }, + "476-Charges constat\u00e9es d\u2019avance": {}, + "478-\u00c9carts de conversion actif": { + "4781-Diminution des cr\u00e9ances d\u2019exploitation": {}, + "4782-Diminution des cr\u00e9ances financi\u00e8res": {}, + "4783-Augmentation des dettes d\u2019exploitation": {}, + "4784-Augmentation des dettes financi\u00e8res": {}, + "4786-Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": {}, + "4788-Diff\u00e9rences compens\u00e9es par couverture de change": {} + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (ACTIF)": { + "485-Cr\u00e9ances sur cessions d\u2019immobilisations": { + "4851-En compte, immobilisations incorporelles": {}, + "4852-En compte, immobilisations corporelles": {}, + "4853-Effets \u00e0 recevoir, immobilisations incorporelles": {}, + "4854-Effets \u00e0 recevoir, immobilisations corporelles": {}, + "4855-Effets escompt\u00e9s non \u00e9chus": {}, + "4857-Retenues de garantie": {}, + "4858-Factures \u00e0 \u00e9tablir": {} + }, + "488-Autres cr\u00e9ances hors activit\u00e9s ordinaires (HAO)": {} + }, + "49-D\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme (tiers) (ACTIF)": { + "491-D\u00e9pr\u00e9ciations des comptes clients": { + "4911-Cr\u00e9ances litigieuses": {}, + "4912-Cr\u00e9ances douteuses": {} + }, + "495-D\u00e9pr\u00e9ciations des comptes organismes internationaux": {}, + "496-D\u00e9pr\u00e9ciations des comptes apporteurs, associ\u00e9s et groupe": { + "4962-Associ\u00e9s, comptes courants": {}, + "4963-Associ\u00e9s, op\u00e9rations faites en commun": {}, + "4966-Groupe, comptes courants": {} + }, + "497-D\u00e9pr\u00e9ciations des comptes d\u00e9biteurs divers": {}, + "498-D\u00e9pr\u00e9ciations des comptes de cr\u00e9ances HAO": { + "4985-Cr\u00e9ances sur cessions d\u2019immobilisations": {}, + "4986-Cr\u00e9ances sur cessions de titres de placement": {}, + "4988-Autres cr\u00e9ances HAO": {} + }, + "499-Provisions pour risques \u00e0 court terme": { + "4991-Sur op\u00e9rations d\u2019exploitation": {}, + "4997-Sur op\u00e9rations financi\u00e8res": {}, + "4998-Sur op\u00e9rations HAO": {} + } + }, + "root_type": "Asset" + }, + "4-Comptes de Tiers (PASSIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (PASSIF)": { + "401-Fournisseurs, dettes en compte": { + "4011-Fournisseurs": { + "account_type": "Payable" + }, + "4012-Fournisseurs groupe": { + "account_type": "Payable" + }, + "4013-Fournisseurs sous-traitants": { + "account_type": "Payable" + }, + "4016-Fournisseurs, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Payable" + }, + "4017-Fournisseur, retenues de garantie": { + "account_type": "Payable" + }, + "account_type": "Payable" + }, + "402-Fournisseurs, effets \u00e0 payer": { + "4021-Fournisseurs Effets \u00e0 payer": { + "account_type": "Payable" + }, + "4022-Fournisseurs Groupe, effets \u00e0 payer": { + "account_type": "Payable" + }, + "4023-Fournisseurs Sous-traitants, effets \u00e0 payer": { + "account_type": "Payable" + }, + "account_type": "Payable" + }, + "404-Fournisseurs, acquisitions courantes d\u2019immobilisations": { + "4041-Fournisseurs Dettes en comptes, immobilisations incorporelles": { + "account_type": "Payable" + }, + "4042-Fournisseurs Dettes en comptes, immobilisations corporelles": { + "account_type": "Payable" + }, + "4046-Fournisseurs Effets \u00e0 payer, immobilisations incorporelles": { + "account_type": "Payable" + }, + "4047-Fournisseurs Effets \u00e0 payer, immobilisations corporelles": { + "account_type": "Payable" + }, + "account_type": "Payable" + }, + "408-Fournisseurs, factures non parvenues": { + "4081-Fournisseurs": { + "account_type": "Stock Received But Not Billed" + }, + "4082-Fournisseurs groupe": { + "account_type": "Stock Received But Not Billed" + }, + "4083-Fournisseurs sous-traitants": { + "account_type": "Stock Received But Not Billed" + }, + "4086-Fournisseurs, int\u00e9r\u00eats courus": { + "account_type": "Stock Received But Not Billed" + }, + "account_type": "Stock Received But Not Billed" + }, + "account_type": "Payable" + }, + "41-Clients et comptes rattach\u00e9s (PASSIF)": { + "419-Clients cr\u00e9diteurs": { + "4191-Clients, avances et acomptes re\u00e7us": {}, + "4192-Clients groupe, avances et acomptes re\u00e7us": {}, + "4194-Clients, dettes pour emballages et mat\u00e9riels consign\u00e9s": {}, + "4198-Clients, rabais, remises, ristournes et autres avoirs \u00e0 accorder": {} + } + }, + "42-Personnel (PASSIF)": { + "422-Personnel, r\u00e9mun\u00e9rations dues": {}, + "423-Personnel, oppositions, saisies-arr\u00eats": { + "4231-Personnel, oppositions": {}, + "4232-Personnel, saisies-arr\u00eats": {}, + "4233-Personnel, avis \u00e0 tiers d\u00e9tenteur": {} + }, + "424-Personnel, \u0153uvres sociales internes": { + "4241-Assistance m\u00e9dicale": {}, + "4242-Allocations familiales": {}, + "4245-Organismes sociaux rattach\u00e9s \u00e0 l\u2019entit\u00e9": {}, + "4248-Autres \u0153uvres sociales internes": {} + }, + "425-Repr\u00e9sentants du personnel": { + "4251-D\u00e9l\u00e9gu\u00e9s du personnel": {}, + "4252-Syndicats et Comit\u00e9s d\u2019entreprises, d\u2019\u00c9tablissement": {}, + "4258-Autres repr\u00e9sentants du personnel": {} + }, + "426-Personnel, participation aux b\u00e9n\u00e9fices et au capital": { + "4261-Participation aux b\u00e9n\u00e9fices": {}, + "4264-Participation au capital": {} + }, + "427-Personnel d\u00e9p\u00f4ts": {}, + "428-Personnel, charges \u00e0 payer et produits \u00e0 recevoir": { + "4281-Dettes provisionn\u00e9es pour cong\u00e9s \u00e0 payer": {}, + "4286-Autres charges \u00e0 payer": {}, + "4287-Produits \u00e0 recevoir": {} + } + }, + "43-Organismes sociaux (PASSIF)": { + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "4381-Charges sociales sur gratifications \u00e0 payer": {}, + "4382-Charges sociales sur cong\u00e9s \u00e0 payer": {}, + "4386-Autres charges \u00e0 payer": {} + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (PASSIF)": { + "441-\u00c9tat, imp\u00f4t sur les b\u00e9n\u00e9fices": {}, + "442-\u00c9tat, autres imp\u00f4ts et taxes": { + "4421-Imp\u00f4ts et taxes d\u2019\u00c9tat": {}, + "4422-Imp\u00f4ts et taxes pour les collectivit\u00e9s publiques": {}, + "4423-Imp\u00f4ts et taxes recouvrables sur des obligataires": {}, + "4424-Imp\u00f4ts et taxes recouvrables sur des associ\u00e9s": {}, + "4426-Droits de douane": {}, + "4428-Autres imp\u00f4ts et taxes": {} + }, + "444-\u00c9tat, TVA due ou cr\u00e9dit de TVA": { + "4441-\u00c9tat, TVA due": {}, + "4449-\u00c9tat, cr\u00e9dit de TVA \u00e0 reporter": {} + }, + "446-\u00c9tat, autres taxes sur le chiffre d\u2019affaires": {}, + "447-\u00c9tat, imp\u00f4ts retenus \u00e0 la source": { + "4471-Imp\u00f4t G\u00e9n\u00e9ral sur le revenu": {}, + "4472-Imp\u00f4ts sur salaires": {}, + "4473-Contribution nationale": {}, + "4474-Contribution nationale de solidarit\u00e9": {}, + "4478-Autres imp\u00f4ts et contributions": {} + } + }, + "46-Apporteurs, associ\u00e9s et groupe (PASSIF)": { + "461-Apporteurs, op\u00e9rations sur le capital (PASSIF)": { + "4611-Apporteurs, apports en nature": {}, + "4612-Apporteurs, apports en num\u00e9raire": {}, + "4615-Apporteurs, versements re\u00e7us sur augmentation de capital": {}, + "4616-Apporteurs, versements anticip\u00e9s": {}, + "4617-Apporteurs d\u00e9faillants": {}, + "4619-Apporteurs, capital \u00e0 rembourser": {} + }, + "462-Associ\u00e9s, comptes courants": { + "4621-Principal": {}, + "4626-Int\u00e9r\u00eats courus": {} + }, + "463-Associ\u00e9s, op\u00e9rations faites en commun et GIE": { + "4631-Op\u00e9rations courantes": {}, + "4636-Int\u00e9r\u00eats courus": {} + }, + "465-Associ\u00e9s, dividendes \u00e0 payer": {}, + "466-Groupe, comptes courants": {} + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (PASSIF)": { + "471-D\u00e9biteurs et cr\u00e9diteurs divers": { + "4711-D\u00e9biteurs divers": {}, + "4712-Cr\u00e9diteurs divers": {}, + "4713-Obligataires": {}, + "4715-R\u00e9mun\u00e9rations d\u2019administrateurs": {}, + "4716-Compte d\u2019affacturage": {}, + "4717-D\u00e9biteurs divers retenues de garantie": {}, + "4718-Apport, compte de fusion et op\u00e9rations assimil\u00e9es": {}, + "4719-Bons de souscription d\u2019actions et d\u2019obligations": {} + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits (PASSIF)": { + "4746-Compte de r\u00e9partition p\u00e9riodique des charges": {} + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA (PASSIF)": { + "4752-Compte passif": {} + }, + "477-Produits constat\u00e9s d\u2019avance": {}, + "479-\u00c9carts de conversion passif": { + "4791-Augmentation des cr\u00e9ances d\u2019exploitation": {}, + "4792-Augmentation des cr\u00e9ances financi\u00e8res": {}, + "4793-Diminution des dettes d\u2019exploitation": {}, + "4794-Diminution des dettes financi\u00e8res": {}, + "4797-Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": {}, + "4798-Diff\u00e9rences compens\u00e9es par couverture de change": {} + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (HAO) (PASSIF)": { + "481-Fournisseurs d\u2019investissements": { + "4811-Immobilisations incorporelles": {}, + "4812-Immobilisations corporelles": {}, + "4813-Versements restant \u00e0 effectuer sur titres de participation et titres immobilis\u00e9s non lib\u00e9r\u00e9s": {}, + "4816-R\u00e9serve de propri\u00e9t\u00e9": {}, + "4817-Retenues de garantie": {}, + "4818-Factures non parvenues": {} + }, + "482-Fournisseurs d\u2019investissements, effets \u00e0 payer": { + "4821-Immobilisations incorporelles": {}, + "4822-Immobilisations corporelles": {} + }, + "484-Autres dettes hors activit\u00e9s ordinaires (HAO)": { + "4887-Produits": {} + } + }, + "49-D\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme (tiers) (PASSIF)": { + "490-D\u00e9pr\u00e9ciations des comptes fournisseurs": {}, + "492-D\u00e9pr\u00e9ciations des comptes personnel": {}, + "493-D\u00e9pr\u00e9ciations des comptes organismes sociaux": {}, + "494-D\u00e9pr\u00e9ciations des comptes \u00c9tat et collectivit\u00e9s publiques": {}, + "495-D\u00e9pr\u00e9ciations des comptes organismes internationaux": {} + }, + "root_type": "Liability" + }, + "5-Comptes de tr\u00e9sorerie": { + "50-Titres de placement": { + "501-Titres du tr\u00e9sor et bons de caisse \u00e0 court terme": { + "5011-Titres du Tr\u00e9sor \u00e0 court terme": {}, + "5012-Titres d\u2019organismes financiers": {}, + "5013-Bons de caisse \u00e0 court terme": {}, + "5016-Frais d\u2019acquisition des titres de tr\u00e9sor et bons de caisse": {} + }, + "502-Actions": { + "5021-Actions ou parts propres": {}, + "5022-Actions cot\u00e9es": {}, + "5023-Actions non cot\u00e9es": {}, + "5024-Actions d\u00e9membr\u00e9es (certificats d\u2019investissement, droits de vote)": {}, + "5025-Autres actions": {}, + "5026-Frais d\u2019acquisition des actions": {} + }, + "503-Obligations": { + "5031-Obligations \u00e9mises par la soci\u00e9t\u00e9 et rachet\u00e9es par elle": {}, + "5032-Obligations cot\u00e9es": {}, + "5033-Obligations non cot\u00e9es": {}, + "5035-Autres obligations": {}, + "5036-Frais d\u2019acquisition des obligations": {} + }, + "504-Bons de souscription": { + "5042-Bons de souscription d\u2019actions": {}, + "5043-Bons de souscription d\u2019obligations": {} + }, + "505-Titres n\u00e9gociables hors r\u00e9gion": {}, + "506-Int\u00e9r\u00eats courus": { + "5061-Titres du Tr\u00e9sor et bons de caisse \u00e0 court terme": {}, + "5062-Actions": {}, + "5063-Obligations": {} + }, + "508-Autres titres de placement et cr\u00e9ances assimil\u00e9es": {} + }, + "51-Valeurs \u00e0 encaisser": { + "511-Effets \u00e0 encaisser": {}, + "512-Effets \u00e0 l\u2019encaissement": {}, + "513-Ch\u00e8ques \u00e0 encaisser": {}, + "514-Ch\u00e8ques \u00e0 l\u2019encaissement": {}, + "515-Cartes de cr\u00e9dit \u00e0 encaisser": {}, + "518-Autres valeurs \u00e0 l\u2019encaissement": { + "5181-Warrants": {}, + "5182-Billets de fonds": {}, + "5185-Ch\u00e8ques de voyage": {}, + "5186-Coupons \u00e9chus": {}, + "5187-Int\u00e9r\u00eats \u00e9chus des obligations": {} + } + }, + "52-Banques": { + "521-Banques locales": { + "5211-Banques en monnaie nationale": { + "account_type": "Bank" + }, + "5215-Banques en devises": { + "account_type": "Bank" + }, + "account_type": "Bank" + }, + "522-Banques autres \u00c9tats r\u00e9gion": {}, + "523-Banques autres \u00c9tats zone mon\u00e9taire": {}, + "524-Banques hors zone mon\u00e9taire": {}, + "525-Banques d\u00e9p\u00f4t \u00e0 terme": {}, + "526-Banques, int\u00e9r\u00eats courus": { + "5261-Banque, int\u00e9r\u00eats courus, charges \u00e0 payer": {}, + "5267-Banque, int\u00e9r\u00eats courus, produits \u00e0 recevoir": {} + } + }, + "53-\u00c9tablissements financiers et assimil\u00e9s": { + "531-Ch\u00e8ques postaux": {}, + "532-Tr\u00e9sor": {}, + "533-Soci\u00e9t\u00e9s de gestion et d\u2019interm\u00e9diation (SGI)": {}, + "536-\u00c9tablissements financiers, int\u00e9r\u00eats courus": {}, + "538-Autres organismes financiers": {} + }, + "54-Instruments de tr\u00e9sorerie": { + "541-Options de taux d\u2019int\u00e9r\u00eat": {}, + "542-Options de taux de change": {}, + "543-Options de taux boursiers": {}, + "544-Instruments de march\u00e9s \u00e0 terme": {}, + "545-Avoirs d\u2019or et autres m\u00e9taux pr\u00e9cieux": {} + }, + "55-Instruments de monnaie \u00e9lectronique": { + "551-Monnaie \u00e9lectronique carte carburant": {}, + "552-Monnaie \u00e9lectronique t\u00e9l\u00e9phone portable": {}, + "553-Monnaie \u00e9lectronique carte p\u00e9age": {}, + "554-Porte-monnaie \u00e9lectronique": {}, + "558-Autres instruments de monnaies \u00e9lectroniques": {} + }, + "56-Banques, cr\u00e9dits de tr\u00e9sorerie et d\u2019escompte": { + "561-Cr\u00e9dits de tr\u00e9sorerie": {}, + "564-Escompte de cr\u00e9dits de campagne": {}, + "565-Escompte de cr\u00e9dits ordinaires": {}, + "566-Banques, cr\u00e9dits de tr\u00e9sorerie, int\u00e9r\u00eats courus": {} + }, + "57-Caisse": { + "571-Caisse si\u00e8ge social": { + "5711-Caisse en monnaie nationale": {}, + "5712-Caisse en devises": {} + }, + "572-Caisse succursale A": { + "5721-En monnaie nationale": {}, + "5722-En devises": {} + }, + "573-Caisse succursale B": { + "5731-En monnaie nationale": {}, + "5732-En devises": {} + } + }, + "58-R\u00e9gies d\u2019avances, accr\u00e9ditifs et virements internes": { + "581-R\u00e9gies d\u2019avance": {}, + "582-Accr\u00e9ditifs": {}, + "585-Virements de fonds": {}, + "588-Autres virements internes": {} + }, + "59-D\u00e9pr\u00e9ciations et provisions pour risque \u00e0 court terme": { + "590-D\u00e9pr\u00e9ciations des titres de placement": {}, + "591-D\u00e9pr\u00e9ciations des titres et valeurs \u00e0 encaisser": {}, + "592-D\u00e9pr\u00e9ciations des comptes banques": {}, + "593-D\u00e9pr\u00e9ciations des comptes \u00e9tablissements financiers et assimil\u00e9s": {}, + "594-D\u00e9pr\u00e9ciations des comptes d\u2019instruments de tr\u00e9sorerie": {}, + "599-Provisions pour risque \u00e0 court terme \u00e0 caract\u00e8re financier": {} + }, + "root_type": "Asset" + }, + "6-Comptes de charges des activit\u00e9s ordinaires": { + "60-Achats et variations de stocks": { + "601-Achats de marchandises": { + "6011-Dans la R\u00e9gion": {}, + "6012-Hors R\u00e9gion": {}, + "6013-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "6014-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "6015-Frais sur achats": {}, + "6019-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "602-Achats de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "6021-Dans la R\u00e9gion": {}, + "6022-Hors R\u00e9gion": {}, + "6023-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "6024-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "6025-Frais sur achats": {}, + "6029-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "603-Variations des stocks de biens achet\u00e9s": { + "6031-Variations des stocks de marchandises": {}, + "6032-Variations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": {}, + "6033-Variations des stocks d\u2019autres approvisionnements": {} + }, + "604-Achats stock\u00e9s de mati\u00e8res et fournitures consommables": { + "6041-Mati\u00e8res consommables": {}, + "6042-Mati\u00e8res combustibles": {}, + "6043-Produits d\u2019entretien": {}, + "6044-Fournitures d\u2019atelier et d\u2019usine": {}, + "6045-Frais sur achat": {}, + "6046-Fournitures de magasin": {}, + "6047-Fournitures de bureau": {}, + "6049-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "605-Autres achats": { + "6051-Fournitures non stockables Eau": {}, + "6052-Fournitures non stockables \u00c9lectricit\u00e9": {}, + "6053-Fournitures non stockables Autres \u00e9nergies": {}, + "6054-Fournitures d\u2019entretien non stockables": {}, + "6055-Fournitures de bureau non stockables": {}, + "6056-Achats de petit mat\u00e9riel et outillage": {}, + "6057-Achats d\u2019\u00e9tudes et prestations de services": {}, + "6058-Achats de travaux, mat\u00e9riels et \u00e9quipements": {}, + "6059-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "608-Achats d\u2019emballages": { + "6081-Emballages perdus": {}, + "6082-Emballages r\u00e9cup\u00e9rables non identifiables": {}, + "6083-Emballages \u00e0 usage mixte": {}, + "6085-Frais sur achats": {}, + "6089-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + } + }, + "61-Transports": { + "612-Transports sur ventes": {}, + "613-Transports pour le compte de tiers": {}, + "614-Transports du personnel": {}, + "616-Transports de plis": {}, + "618-Autres frais de transport": { + "6181-Voyages et d\u00e9placements": {}, + "6182-Transports entre \u00e9tablissements ou chantiers": {}, + "6183-Transports administratifs": {} + } + }, + "62-Services ext\u00e9rieurs": { + "621-Sous-traitance g\u00e9n\u00e9rale": {}, + "622-Locations, charges locatives": { + "6221-Locations de terrains": {}, + "6222-Locations de b\u00e2timents": {}, + "6223-Locations de mat\u00e9riels et outillages": {}, + "6224-Malis sur emballages": {}, + "6225-Locations d\u2019emballages": {}, + "6226-Fermages et loyers du foncier": {}, + "6228-Locations et charges locatives diverses": {} + }, + "623-Redevances de location acquisition": { + "6232-Cr\u00e9dit-bail immobilier": {}, + "6233-Cr\u00e9dit-bail mobilier": {}, + "6234-Location-vente": {}, + "6238-Autres contrats de location acquisition": {} + }, + "624-Entretien, r\u00e9parations, remise en \u00e9tat et maintenance": { + "6241-Entretien et r\u00e9parations des biens immobiliers": {}, + "6242-Entretien et r\u00e9parations des biens mobiliers": {}, + "6243-Maintenance": {}, + "6244-Charges de d\u00e9mant\u00e8lement et remise en \u00e9tat": {}, + "6248-Autres entretiens et r\u00e9parations": {} + }, + "625-Primes d\u2019assurance": { + "6251-Assurances multirisques": {}, + "6252-Assurances mat\u00e9riel de transport": {}, + "6253-Assurances risques d\u2019exploitation": {}, + "6254-Assurances responsabilit\u00e9 du producteur": {}, + "6255-Assurances insolvabilit\u00e9 clients": {}, + "6257-Assurances transport sur ventes": {}, + "6258-Autres primes d\u2019assurances": {} + }, + "626-\u00c9tudes, recherches et documentation": { + "6261-\u00c9tudes et recherches": {}, + "6265-Documentation g\u00e9n\u00e9rale": {}, + "6266-Documentation technique": {} + }, + "627-Publicit\u00e9, publications, relations publiques": { + "6271-Annonces, insertions": {}, + "6272-Catalogues, imprim\u00e9s publicitaires": {}, + "6273-\u00c9chantillons": {}, + "6274-Foires et expositions": {}, + "6275-Publications": {}, + "6276-Cadeaux \u00e0 la client\u00e8le": {}, + "6277-Frais de colloques, s\u00e9minaires, conf\u00e9rences": {}, + "6278-Autres charges de publicit\u00e9 et relations publiques": {} + }, + "628-Frais de t\u00e9l\u00e9communications": { + "6281-Frais de t\u00e9l\u00e9phone": {}, + "6282-Frais de t\u00e9lex": {}, + "6283-Frais de t\u00e9l\u00e9copie": {}, + "6288-Autres frais de t\u00e9l\u00e9communications": {} + } + }, + "63-Autres services ext\u00e9rieurs": { + "631-Frais bancaires": { + "6311-Frais sur titres (vente, garde)": {}, + "6312-Frais sur effets": {}, + "6313-Location de coffres": {}, + "6314-Commissions d\u2019affacturage": {}, + "6315-Commissions sur cartes de cr\u00e9dit": {}, + "6316-Frais d\u2019\u00e9mission d\u2019emprunts": {}, + "6317-Frais sur instruments monnaie \u00e9lectronique": {}, + "6318-Autres frais bancaires": {} + }, + "632-R\u00e9mun\u00e9rations d\u2019interm\u00e9diaires et de conseils": { + "6322-Commissions et courtages sur ventes": {}, + "6324-Honoraires des professions r\u00e9glement\u00e9es": {}, + "6325-Frais d\u2019actes et de contentieux": {}, + "6326-R\u00e9mun\u00e9rations d\u2019affacturage": {}, + "6327-R\u00e9mun\u00e9rations des autres prestataires de services": {}, + "6328-Divers frais": {} + }, + "633-Frais de formation du personnel": {}, + "634-Redevances pour brevets, licences, logiciels, concessions et droits et valeurs similaires": { + "6342-Redevances pour brevets, licences": {}, + "6343-Redevances pour logiciels": {}, + "6344-Redevances pour marques": {}, + "6345-Redevances pour sites internet": {}, + "6346-Redevances pour concessions, droits et valeurs similaires": {} + }, + "635-Cotisations": { + "6351-Cotisations": {}, + "6358-Concours divers": {} + }, + "637-R\u00e9mun\u00e9rations de personnel ext\u00e9rieur \u00e0 l\u2019entit\u00e9": { + "6371-Personnel int\u00e9rimaire": {}, + "6372-Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": {} + }, + "638-Autres charges externes": { + "6381-Frais de recrutement du personnel": {}, + "6382-Frais de d\u00e9m\u00e9nagement": {}, + "6383-R\u00e9ceptions": {}, + "6384-Missions": {}, + "6385-Charges de copropri\u00e9t\u00e9": {} + } + }, + "64-Imp\u00f4ts et taxes": { + "641-Imp\u00f4ts et taxes directs": { + "6411-Imp\u00f4ts fonciers et taxes annexes": {}, + "6412-Patentes, licences et taxes annexes": {}, + "6413-Taxes sur appointements et salaires": {}, + "6414-Taxes d\u2019apprentissage": {}, + "6415-Formation professionnelle continue": {}, + "6418-Autres imp\u00f4ts et taxes directs": {} + }, + "645-Imp\u00f4ts et taxes indirects": {}, + "646-Droits d\u2019enregistrement": { + "6461-Droits de mutation": {}, + "6462-Droits de timbre": {}, + "6463-Taxes sur les v\u00e9hicules de soci\u00e9t\u00e9": {}, + "6464-Vignettes": {}, + "6468-Autres droits": {} + }, + "647-P\u00e9nalit\u00e9s, amendes fiscales": { + "6471-P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts directs": {}, + "6472-P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts indirects": {}, + "6473-P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts directs": {}, + "6474-P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts indirects": {}, + "6478-Autres p\u00e9nalit\u00e9s et amendes fiscales": {} + }, + "648-Autres imp\u00f4ts et taxes": {} + }, + "65-Autres charges": { + "651-Pertes sur cr\u00e9ances clients et autres d\u00e9biteurs": { + "6511-Clients": {}, + "6515-Autres d\u00e9biteurs": {} + }, + "652-Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "6521-Quote-part transf\u00e9r\u00e9e de b\u00e9n\u00e9fices (comptabilit\u00e9 du g\u00e9rant)": {}, + "6525-Pertes imput\u00e9es par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": {} + }, + "654-Valeurs comptables des cessions courantes d\u2019immobilisations": { + "6541-Immobilisations incorporelles": {}, + "6542-Immobilisations corporelles": {} + }, + "656-Perte de change sur cr\u00e9ances et dettes commerciale": {}, + "657-P\u00e9nalit\u00e9s et amendes p\u00e9nales": {}, + "658-Charges diverses": { + "6581-Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": {}, + "6582-Dons": {}, + "6583-M\u00e9c\u00e9nat": {}, + "6588-Autres charges diverses": {} + }, + "659-Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "6591-Sur risques \u00e0 court terme": {}, + "6593-Sur stocks": {}, + "6594-Sur cr\u00e9ances": {}, + "6598-Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme": {} + } + }, + "66-Charges de personnel": { + "661-R\u00e9mun\u00e9rations directes vers\u00e9es au personnel national": { + "6611-Appointements salaires et commissions": {}, + "6612-Primes et gratifications": {}, + "6613-Cong\u00e9s pay\u00e9s": {}, + "6614-Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": {}, + "6615-Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": {}, + "6616-Suppl\u00e9ment familial": {}, + "6617-Avantages en nature": {}, + "6618-Autres r\u00e9mun\u00e9rations directes": {} + }, + "662-R\u00e9mun\u00e9rations directes vers\u00e9es au personnel non national": { + "6621-Appointements salaires et commissions": {}, + "6622-Primes et gratifications": {}, + "6623-Cong\u00e9s pay\u00e9s": {}, + "6624-Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": {}, + "6625-Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": {}, + "6626-Suppl\u00e9ment familial": {}, + "6627-Avantages en nature": {}, + "6628-Autres r\u00e9mun\u00e9rations directes": {} + }, + "663-Indemnit\u00e9s forfaitaires vers\u00e9es au personnel": { + "6631-Indemnit\u00e9s de logement": {}, + "6632-Indemnit\u00e9s de repr\u00e9sentation": {}, + "6633-Indemnit\u00e9s d\u2019expatriation": {}, + "6634-Indemnit\u00e9s de transport": {}, + "6638-Autres indemnit\u00e9s et avantages divers": {} + }, + "664-Charges sociales": { + "6641-Charges sociales sur r\u00e9mun\u00e9ration du personnel national": {}, + "6642-Charges sociales sur r\u00e9mun\u00e9ration du personnel non national": {} + }, + "666-R\u00e9mun\u00e9rations et charges sociales de l\u2019exploitant individuel": { + "6661-R\u00e9mun\u00e9ration du travail de l\u2019exploitant": {}, + "6662-Charges sociales": {} + }, + "667-R\u00e9mun\u00e9ration transf\u00e9r\u00e9e de personnel ext\u00e9rieur": { + "6671-Personnel int\u00e9rimaire": {}, + "6672-Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": {} + }, + "668-Autres charges sociales": { + "6681-Versements aux syndicats et comit\u00e9s d\u2019entreprise, d\u2019\u00e9tablissement": {}, + "6682-Versements aux comit\u00e9s d\u2019hygi\u00e8ne et de s\u00e9curit\u00e9": {}, + "6683-Versements et contributions aux autres \u0153uvres sociales": {}, + "6684-M\u00e9decine du travail et pharmacie": {}, + "6685-Assurances et organismes de sant\u00e9": {}, + "6686-Assurances retraite et fonds de pension": {}, + "6687-Majorations et p\u00e9nalit\u00e9s sociales": {}, + "6688-Charges sociales diverses": {} + } + }, + "67-Frais financiers et charges assimil\u00e9es": { + "671-Int\u00e9r\u00eats des emprunts": { + "6711-Emprunts obligataires": {}, + "6712-Emprunts aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": {}, + "6713-Dettes li\u00e9es \u00e0 des participations": {}, + "6714-Primes de remboursement des obligations": {} + }, + "672-Int\u00e9r\u00eats dans loyers de location acquisition": { + "6722-Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail immobilier": {}, + "6723-Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail mobilier": {}, + "6724-Int\u00e9r\u00eats dans loyers de location acquisition / location-vente": {}, + "6728-Int\u00e9r\u00eats dans loyers des autres locations acquisition": {} + }, + "673-Escomptes accord\u00e9s": {}, + "674-Autres int\u00e9r\u00eats": { + "6741-Avances re\u00e7ues et d\u00e9p\u00f4ts cr\u00e9diteurs": {}, + "6742-Comptes courants bloqu\u00e9s": {}, + "6743-Int\u00e9r\u00eats sur obligations cautionn\u00e9es": {}, + "6744-Int\u00e9r\u00eats sur dettes commerciales": {}, + "6745-Int\u00e9r\u00eats bancaires et sur op\u00e9rations de financement (escompte...)": {}, + "6748-Int\u00e9r\u00eats sur dettes diverses": {} + }, + "675-Escomptes des effets de commerce": {}, + "676-Pertes de change financi\u00e8res": {}, + "677-Pertes sur titres de placement": { + "6771-Pertes sur cessions de titres de placement": {}, + "6772-Mali provenant d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": {} + }, + "678-Pertes et charges sur risques financiers": { + "6781-Sur rentes viag\u00e8res": {}, + "6782-Sur op\u00e9rations financi\u00e8res": {}, + "6784-Sur instruments de tr\u00e9sorerie": {} + }, + "679-Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "6791-Sur risques financiers": {}, + "6795-Sur titres de placement": {}, + "6798-Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": {} + } + }, + "68-Dotations aux amortissements": { + "681-Dotations aux amortissements d\u2019exploitation": { + "6812-Dotations aux amortissements des immobilisations incorporelles": {}, + "6813-Dotations aux amortissements des immobilisations corporelles": {} + } + }, + "69-Dotations aux provisions et aux d\u00e9pr\u00e9ciations": { + "691-Dotations aux provisions et aux d\u00e9pr\u00e9ciations d\u2019exploitation": { + "6911-Dotations aux provisions pour risques et charges": {}, + "6913-Dotations aux d\u00e9pr\u00e9ciations des immobilisations incorporelles": {}, + "6914-Dotations aux d\u00e9pr\u00e9ciations des immobilisations corporelles": {} + }, + "697-Dotations aux provisions et aux d\u00e9pr\u00e9ciations financi\u00e8res": { + "6971-Dotations aux provisions pour risques et charges": {}, + "6972-Dotations aux d\u00e9pr\u00e9ciations des immobilisations financi\u00e8res": {} + } + }, + "root_type": "Expense" + }, + "7-Comptes de produits des activit\u00e9s ordinaires": { + "70-Ventes": { + "701-Ventes de marchandises": { + "7011-Dans la R\u00e9gion": {}, + "7012-Hors R\u00e9gion": {}, + "7013-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7014-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7015-Sur internet": {}, + "7019-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "702-Ventes de produits finis": { + "7021-Dans la R\u00e9gion": {}, + "7022-Hors R\u00e9gion": {}, + "7023-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7024-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7025-Sur internet": {}, + "7029-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "703-Ventes de produits interm\u00e9diaires": { + "7031-Dans la R\u00e9gion": {}, + "7032-Hors R\u00e9gion": {}, + "7033-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7034-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7035-Sur internet": {}, + "7039-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "704-Ventes de produits r\u00e9siduels": { + "7041-Dans la R\u00e9gion": {}, + "7042-Hors R\u00e9gion": {}, + "7043-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7044-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7045-Sur internet": {}, + "7049-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "705-Travaux factur\u00e9s": { + "7051-Dans la R\u00e9gion": {}, + "7052-Hors R\u00e9gion": {}, + "7053-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7054-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7055-Sur internet": {}, + "7059-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "706-Services vendus": { + "7061-Dans la R\u00e9gion": {}, + "7062-Hors R\u00e9gion": {}, + "7063-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7064-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7065-Sur internet": {}, + "7069-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "707-Produits accessoires": { + "7071-Ports, emballages perdus et autres frais factur\u00e9s": {}, + "7072-Commissions et courtages": {}, + "7073-Locations": {}, + "7074-Bonis sur reprises et cessions d\u2019emballages": {}, + "7075-Mise \u00e0 disposition de personnel": {}, + "7076-Redevances pour brevets, logiciels, marques et droits similaires": {}, + "7077-Services exploit\u00e9s dans l\u2019int\u00e9r\u00eat du personnel": {}, + "7078-Autres produits accessoires": {} + } + }, + "71-Subventions d\u2019exploitation": { + "711-Sur produits \u00e0 l\u2019exportation": {}, + "712-Sur produits \u00e0 l\u2019importation": {}, + "713-Sur produits de p\u00e9r\u00e9quation": {}, + "714-Indemnit\u00e9s et subventions d\u2019exploitation (entit\u00e9 agricole)": {}, + "718-Autres subventions d\u2019exploitation": { + "7181-Vers\u00e9es par l\u2019\u00c9tat et les collectivit\u00e9s publiques": {}, + "7182-Vers\u00e9es par les organismes internationaux": {}, + "7183-Vers\u00e9es par des tiers": {} + } + }, + "72-Production immobilis\u00e9e": { + "721-Immobilisations incorporelles": {}, + "722-Immobilisations corporelles": { + "7221-Immobilisations corporelles (hors actifs biologiques)": {}, + "7222-Immobilisations corporelles (actifs biologiques)": {} + }, + "724-Production auto-consomm\u00e9e": {}, + "726-Immobilisations financi\u00e8res": {} + }, + "73-Variations des stocks de biens et de services produits": { + "734-Variations des stocks de produits en cours": { + "7341-Produits en cours": {}, + "7342-Travaux en cours": {} + }, + "735-Variations des en-cours de services": { + "7351-\u00c9tudes en cours": {}, + "7352-Prestations de services en cours": {} + }, + "736-Variations des stocks de produits finis": {}, + "737-Variations des stocks de produits interm\u00e9diaires et r\u00e9siduels": { + "7371-Produits interm\u00e9diaires": {}, + "7372-Produits r\u00e9siduels": {} + } + }, + "75-Autres produits": { + "751-Profits sur cr\u00e9ances clients et autres d\u00e9biteurs": {}, + "752-Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "7521-Quote-part transf\u00e9r\u00e9e de pertes (comptabilit\u00e9 du g\u00e9rant)": {}, + "7525-B\u00e9n\u00e9fices attribu\u00e9s par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": {} + }, + "754-Produits des cessions courantes d\u2019immobilisations": { + "7541-Immobilisations incorporelles": {}, + "7542-Immobilisations corporelles": {} + }, + "756-Gains de change sur cr\u00e9ances et dettes commerciales": {}, + "758-Produits divers": { + "7581-Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": {}, + "7582-Indemnit\u00e9s d\u2019assurances re\u00e7ues": {}, + "7588-Autres produits divers": {} + }, + "759-Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "7591-Sur risques \u00e0 court terme": {}, + "7593-Sur stocks": {}, + "7594-Sur cr\u00e9ances": {}, + "7598-Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": {} + } + }, + "77-Revenus financiers et produits assimil\u00e9s": { + "771-Int\u00e9r\u00eats de pr\u00eats et cr\u00e9ances diverses": { + "7712-Int\u00e9r\u00eats de pr\u00eats": {}, + "7713-Int\u00e9r\u00eats sur cr\u00e9ances diverses": {} + }, + "772-Revenus de participations et autres titres immobilis\u00e9s": { + "7721-Revenus des titres de participation": {}, + "7722-Revenus autres titres immobilis\u00e9s": {} + }, + "773-Escomptes obtenus": {}, + "774-Revenus de placement": { + "7745-Revenus des obligations": {}, + "7746-Revenus des titres de placement": {} + }, + "775-Int\u00e9r\u00eats dans loyers de location acquisition": {}, + "776-Gains de change financiers": {}, + "777-Gains sur cessions de titres de placement": {}, + "778-Gains sur risques financiers": { + "7781-Sur rentes viag\u00e8res": {}, + "7782-Sur op\u00e9rations financi\u00e8res": {}, + "7784-Sur instruments de tr\u00e9sorerie": {} + }, + "779-Reprises de charges pour d\u00e9pr\u00e9ciations et provisions \u00e0 court terme financi\u00e8res": { + "7791-Sur risques financiers": {}, + "7795-Sur titres de placement": {}, + "7798-Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": {} + } + }, + "78-Transferts de charges": { + "781-Transferts de charges d\u2019exploitation": {}, + "787-Transferts de charges financi\u00e8res": {} + }, + "79-Reprises de provisions, de d\u00e9pr\u00e9ciations et autres": { + "791-Reprises de provisions et d\u00e9pr\u00e9ciations d\u2019exploitation": { + "7911-Pour risques et charges": {}, + "7913-Des immobilisations incorporelles": {}, + "7914-Des immobilisations corporelles": {} + }, + "797-Reprises de provisions et d\u00e9pr\u00e9ciations financi\u00e8res": { + "7971-Pour risques et charges": {}, + "7972-Des immobilisations financi\u00e8res": {} + }, + "798-Reprises d\u2019amortissements": {}, + "799-Reprises de subventions d\u2019investissement": {} + }, + "root_type": "Income" + }, + "8-Comptes des autres charges et des autres produits (CHARGES)": { + "81-Valeurs comptables des cessions d\u2019immobilisations": { + "811-Immobilisations incorporelles": {}, + "812-Immobilisations corporelles": {}, + "816-Immobilisations financi\u00e8res": {} + }, + "83-Charges hors activit\u00e9s ordinaires": { + "831-Charges HAO constat\u00e9es": {}, + "833-Charges li\u00e9es aux op\u00e9rations de restructuration": {}, + "834-Pertes sur cr\u00e9ances HAO": {}, + "835-Dons et lib\u00e9ralit\u00e9s accord\u00e9s": {}, + "836-Abandons de cr\u00e9ances consentis": {}, + "837-Charges li\u00e9es aux op\u00e9rations de liquidation": {}, + "839-Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": {} + }, + "85-Dotations hors activit\u00e9s ordinaires": { + "851-Dotations aux provisions r\u00e9glement\u00e9es": {}, + "852-Dotations aux amortissements HAO": {}, + "853-Dotations aux d\u00e9pr\u00e9ciations HAO": {}, + "854-Dotations aux provisions pour risques et charges HAO": {}, + "858-Autres dotations HAO": {} + }, + "87-Participation des travailleurs": { + "871-Participation l\u00e9gale aux b\u00e9n\u00e9fices": {}, + "874-Participation contractuelle aux b\u00e9n\u00e9fices": {}, + "878-Autres participations": {} + }, + "89-Imp\u00f4ts sur le r\u00e9sultat": { + "891-Imp\u00f4ts sur les b\u00e9n\u00e9fices de l\u2019exercice": { + "8911-Activit\u00e9s exerc\u00e9es dans l\u2019\u00c9tat": {}, + "8912-Activit\u00e9s exerc\u00e9es dans les autres \u00c9tats de la R\u00e9gion": {}, + "8913-Activit\u00e9s exerc\u00e9es hors R\u00e9gion": {} + }, + "892-Rappel d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": {}, + "895-Imp\u00f4t minimum forfaitaire IMF": {}, + "899-D\u00e9gr\u00e8vements et annulations d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": { + "8991-D\u00e9gr\u00e8vements": {}, + "8994-Annulations pour pertes r\u00e9troactives": {} + } + }, + "root_type": "Expense" + }, + "8-Comptes des autres charges et des autres produits (PRODUITS)": { + "82-Produits des cessions d\u2019immobilisations": { + "821-Immobilisations incorporelles": {}, + "822-Immobilisations corporelles": {}, + "826-Immobilisations financi\u00e8res": {} + }, + "84-Produits hors activit\u00e9s ordinaires": { + "841-Produits HAO constat\u00e9s": {}, + "843-Produits li\u00e9s aux op\u00e9rations de restructuration": {}, + "844-Indemnit\u00e9s et subventions HAO (entit\u00e9 agricole)": {}, + "845-Dons et lib\u00e9ralit\u00e9s obtenus": {}, + "846-Abandons de cr\u00e9ances obtenus": {}, + "847-Produits li\u00e9s aux op\u00e9rations de liquidation": {}, + "848-Transferts de charges HAO": {}, + "849-Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": {} + }, + "86-Reprises de charges, provisions et d\u00e9pr\u00e9ciations HAO": { + "861-Reprises de provisions r\u00e9glement\u00e9es": {}, + "862-Reprises d\u2019amortissements HAO": {}, + "863-Reprises de d\u00e9pr\u00e9ciations HAO": {}, + "864-Reprises de provisions pour risques et charges HAO": {}, + "868-Autres reprises HAO": {} + }, + "88-Subventions d\u2019\u00e9quilibre": { + "881-\u00c9tat": {}, + "884-Collectivit\u00e9s publiques": {}, + "886-Groupe": {}, + "888-Autres": {} + }, + "root_type": "Income" + } + } +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/td_plan_comptable_avec_code.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/td_plan_comptable_avec_code.json new file mode 100644 index 00000000000..226e21e20fc --- /dev/null +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/td_plan_comptable_avec_code.json @@ -0,0 +1,4208 @@ +{ + "country_code": "td", + "name": "Syscohada - Plan Comptable avec code", + "tree": { + "Comptes de ressources durables": { + "Capital": { + "Capital social": { + "Capital souscrit, non appel\u00e9": { + "account_number": "1011" + }, + "Capital souscrit, appel\u00e9, non vers\u00e9": { + "account_number": "1012" + }, + "Capital souscrit, appel\u00e9, vers\u00e9, non amorti": { + "account_number": "1013" + }, + "Capital souscrit, appel\u00e9, vers\u00e9, amorti": { + "account_number": "1014" + }, + "Capital souscrit soumis \u00e0 des conditions particuli\u00e8res": { + "account_number": "1018" + }, + "account_number": "101" + }, + "Capital par dotation": { + "Dotation initiale": { + "account_number": "1021" + }, + "Dotations compl\u00e9mentaires": { + "account_number": "1022" + }, + "Autres dotations": { + "account_number": "1028" + }, + "account_number": "102" + }, + "Capital personnel": { + "account_number": "103" + }, + "Compte de l\u2019exploitant": { + "Apports temporaires": { + "account_number": "1041" + }, + "Op\u00e9rations courantes": { + "account_number": "1042" + }, + "R\u00e9mun\u00e9rations, imp\u00f4ts et autres charges personnelles": { + "account_number": "1043" + }, + "Pr\u00e9l\u00e8vements d\u2019autoconsommation": { + "account_number": "1047" + }, + "Autres pr\u00e9l\u00e8vements": { + "account_number": "1048" + }, + "account_number": "104" + }, + "Primes li\u00e9es au capital social": { + "Primes d\u2019\u00e9mission": { + "account_number": "1051" + }, + "Primes d\u2019apport": { + "account_number": "1052" + }, + "Primes de fusion": { + "account_number": "1053" + }, + "Primes de conversion": { + "account_number": "1054" + }, + "Autres primes": { + "account_number": "1058" + }, + "account_number": "105" + }, + "\u00c9carts de r\u00e9\u00e9valuation": { + "\u00c9carts de r\u00e9\u00e9valuation l\u00e9gale": { + "account_number": "1061" + }, + "\u00c9carts de r\u00e9\u00e9valuation libre": { + "account_number": "1062" + }, + "account_number": "106" + }, + "Apporteurs, capital souscrit, non appel\u00e9": { + "account_number": "109" + }, + "account_number": "10" + }, + "R\u00e9serves": { + "R\u00e9serve l\u00e9gale": { + "account_number": "111" + }, + "R\u00e9serves statutaires ou contractuelles": { + "account_number": "112" + }, + "R\u00e9serves r\u00e9glement\u00e9es": { + "R\u00e9serves de plus-values nettes \u00e0 long terme": { + "account_number": "1131" + }, + "R\u00e9serves d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": { + "account_number": "1132" + }, + "R\u00e9serves cons\u00e9cutives \u00e0 l\u2019octroi de subventions d\u2019investissement": { + "account_number": "1133" + }, + "R\u00e9serves des valeurs mobili\u00e8res donnant acc\u00e8s au capital": { + "account_number": "1134" + }, + "Autres r\u00e9serves r\u00e9glement\u00e9es": { + "account_number": "1135" + }, + "account_number": "113" + }, + "Autres r\u00e9serves": { + "R\u00e9serves facultatives": { + "account_number": "1181" + }, + "R\u00e9serves diverses": { + "account_number": "1188" + }, + "account_number": "118" + }, + "account_number": "11" + }, + "Report \u00e0 nouveau": { + "Report \u00e0 nouveau cr\u00e9diteur": { + "account_number": "121" + }, + "Report \u00e0 nouveau d\u00e9biteur": { + "Perte nette \u00e0 reporter": { + "account_number": "1291" + }, + "Perte Amortissements r\u00e9put\u00e9s diff\u00e9r\u00e9s": { + "account_number": "1292" + }, + "account_number": "129" + }, + "account_number": "12" + }, + "R\u00e9sultat net de l\u2019exercice": { + "R\u00e9sultat en instance d\u2019affectation": { + "R\u00e9sultat en instance d\u2019affectation : b\u00e9n\u00e9fice": { + "account_number": "1301" + }, + "R\u00e9sultat en instance d\u2019affectation : perte": { + "account_number": "1309" + }, + "account_number": "130" + }, + "R\u00e9sultat net : b\u00e9n\u00e9fice": { + "account_number": "131" + }, + "Marge commerciale (MC)": { + "account_number": "132" + }, + "Valeur ajout\u00e9e (VA)": { + "account_number": "133" + }, + "Exc\u00e9dent brut d\u2019exploitation (EBE)": { + "account_number": "134" + }, + "R\u00e9sultat d\u2019exploitation (RE)": { + "account_number": "135" + }, + "R\u00e9sultat financier (RF)": { + "account_number": "136" + }, + "R\u00e9sultat des activit\u00e9s ordinaires (RAO)": { + "account_number": "137" + }, + "R\u00e9sultat hors activit\u00e9s ordinaires (RHAO)": { + "R\u00e9sultat de fusion": { + "account_number": "1381" + }, + "R\u00e9sultat d\u2019apport partiel d\u2019actif": { + "account_number": "1382" + }, + "R\u00e9sultat de scission": { + "account_number": "1383" + }, + "R\u00e9sultat de liquidation": { + "account_number": "1384" + }, + "account_number": "138" + }, + "R\u00e9sultat net : perte": { + "account_number": "139" + }, + "account_number": "13" + }, + "Subventions d\u2019investissement": { + "Subventions d\u2019\u00e9quipement": { + "\u00c9tat": { + "account_number": "1411" + }, + "R\u00e9gions": { + "account_number": "1412" + }, + "D\u00e9partements": { + "account_number": "1413" + }, + "Communes et collectivit\u00e9s publiques d\u00e9centralis\u00e9es": { + "account_number": "1414" + }, + "Entit\u00e9s publiques ou mixtes": { + "account_number": "1415" + }, + "Entit\u00e9s et organismes priv\u00e9s": { + "account_number": "1416" + }, + "Organismes internationaux": { + "account_number": "1417" + }, + "Autres": { + "account_number": "1418" + }, + "account_number": "141" + }, + "Autres subventions d\u2019investissement": { + "account_number": "148" + }, + "account_number": "14" + }, + "Provisions r\u00e9glement\u00e9es et fonds assimil\u00e9s": { + "Amortissements d\u00e9rogatoires": { + "account_number": "151" + }, + "Plus-values de cession \u00e0 r\u00e9investir": { + "account_number": "152" + }, + "Fonds r\u00e9glement\u00e9s": { + "Fonds National": { + "account_number": "1531" + }, + "Pr\u00e9l\u00e8vement pour le Budget": { + "account_number": "1532" + }, + "account_number": "153" + }, + "Provisions sp\u00e9ciales de r\u00e9\u00e9valuation": { + "account_number": "154" + }, + "Provisions r\u00e9glement\u00e9es relatives aux immobilisations": { + "Reconstitution des gisements miniers et p\u00e9troliers": { + "account_number": "1551" + }, + "account_number": "155" + }, + "Provisions r\u00e9glement\u00e9es relatives aux stocks": { + "Hausse de prix": { + "account_number": "1561" + }, + "Fluctuation des cours": { + "account_number": "1562" + }, + "account_number": "156" + }, + "Provisions pour investissement": { + "account_number": "157" + }, + "Autres provisions et fonds r\u00e9glement\u00e9s": { + "account_number": "158" + }, + "account_number": "15" + }, + "Emprunts et dettes assimil\u00e9es": { + "Emprunts obligataires": { + "Emprunts obligataires ordinaires": { + "account_number": "1611" + }, + "Emprunts obligataires convertibles en actions": { + "account_number": "1612" + }, + "Emprunts obligataires remboursables en actions": { + "account_number": "1613" + }, + "Autres emprunts obligataires": { + "account_number": "1618" + }, + "account_number": "161" + }, + "Emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": { + "account_number": "162" + }, + "Avances re\u00e7ues de l\u2019\u00c9tat": { + "account_number": "163" + }, + "Avances re\u00e7ues et comptes courants bloqu\u00e9s": { + "account_number": "164" + }, + "D\u00e9p\u00f4ts et cautionnements re\u00e7us": { + "D\u00e9p\u00f4ts": { + "account_number": "1651" + }, + "Cautionnements": { + "account_number": "1652" + }, + "account_number": "165" + }, + "Int\u00e9r\u00eats courus": { + "Sur emprunts obligataires": { + "account_number": "1661" + }, + "Sur emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": { + "account_number": "1662" + }, + "Sur avances re\u00e7ues de l\u2019\u00c9tat": { + "account_number": "1663" + }, + "Sur avances re\u00e7ues et comptes courants bloqu\u00e9s": { + "account_number": "1664" + }, + "Sur d\u00e9p\u00f4ts et cautionnements re\u00e7us": { + "account_number": "1665" + }, + "Sur avances assorties de conditions particuli\u00e8res": { + "account_number": "1667" + }, + "Sur autres emprunts et dettes": { + "account_number": "1668" + }, + "account_number": "166" + }, + "Avances assorties de conditions particuli\u00e8res": { + "Avances bloqu\u00e9es pour augmentation du capital": { + "account_number": "1671" + }, + "Avances conditionn\u00e9es par l\u2019\u00c9tat": { + "account_number": "1672" + }, + "Avances conditionn\u00e9es par les autres organismes africains": { + "account_number": "1673" + }, + "Avances conditionn\u00e9es par les organismes internationaux": { + "account_number": "1674" + }, + "account_number": "167" + }, + "Autres emprunts et dettes": { + "Rentes viag\u00e8res capitalis\u00e9es": { + "account_number": "1681" + }, + "Billets de fonds": { + "account_number": "1682" + }, + "Dettes cons\u00e9cutives \u00e0 des titres emprunt\u00e9s": { + "account_number": "1683" + }, + "Emprunts participatifs": { + "account_number": "1684" + }, + "Participation des travailleurs aux b\u00e9n\u00e9fices": { + "account_number": "1685" + }, + "Emprunts et dettes contract\u00e9s aupr\u00e8s des autres tiers": { + "account_number": "1686" + }, + "account_number": "168" + }, + "account_number": "16" + }, + "Dettes de location acquisition": { + "Dettes de location acquisition / cr\u00e9dit bail immobilier": { + "account_number": "172" + }, + "Dettes de location acquisition / cr\u00e9dit bail mobilier": { + "account_number": "173" + }, + "Dettes de location acquisition / location de vente": { + "account_number": "174" + }, + "Int\u00e9r\u00eats courus": { + "Sur dettes de location acquisition / cr\u00e9dit-bail immobilier": { + "account_number": "1762" + }, + "Sur dettes de location acquisition / cr\u00e9dit-bail mobilier": { + "account_number": "1763" + }, + "Sur dettes de location acquisition / location-vente": { + "account_number": "1764" + }, + "Sur autres dettes de location acquisition": { + "account_number": "1768" + }, + "account_number": "176" + }, + "Autres dettes de location acquisition": { + "account_number": "178" + }, + "account_number": "17" + }, + "Dettes li\u00e9es \u00e0 des participations et comptes de liaison des \u00e9tablissements et soci\u00e9t\u00e9s en participation": { + "Dettes li\u00e9es \u00e0 des participations": { + "Dettes li\u00e9es \u00e0 des participations (groupe)": { + "account_number": "1811" + }, + "Dettes li\u00e9es \u00e0 des participations (hors groupe)": { + "account_number": "1812" + }, + "account_number": "181" + }, + "Dettes li\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": { + "account_number": "182" + }, + "Int\u00e9r\u00eats courus sur dettes li\u00e9es \u00e0 des participations": { + "account_number": "183" + }, + "Comptes permanents bloqu\u00e9s des \u00e9tablissements et succursales": { + "account_number": "184" + }, + "Comptes permanents non bloqu\u00e9s des \u00e9tablissements et succursales": { + "account_number": "185" + }, + "Comptes de liaison charges": { + "account_number": "186" + }, + "Comptes de liaison produits": { + "account_number": "187" + }, + "Comptes de liaison des soci\u00e9t\u00e9s en participation": { + "account_number": "188" + }, + "account_number": "18" + }, + "Provisions pour risques et charges": { + "Provisions pour litiges": { + "account_number": "191" + }, + "Provisions pour garanties donn\u00e9es aux clients": { + "account_number": "192" + }, + "Provisions pour pertes sur march\u00e9s \u00e0 ach\u00e8vement futur": { + "account_number": "193" + }, + "Provisions pour pertes de change": { + "account_number": "194" + }, + "Provisions pour imp\u00f4ts": { + "account_number": "195" + }, + "Provisions pour pensions et obligations similaires": { + "Provisions pour pensions et obligations similaires engagement de retraite": { + "account_number": "1961" + }, + "Actif du r\u00e9gime de retraite": { + "account_number": "1962" + }, + "account_number": "196" + }, + "Provisions pour restructuration": { + "account_number": "197" + }, + "Autres provisions pour risques et charges": { + "Provisions pour amendes et p\u00e9nalit\u00e9s": { + "account_number": "1981" + }, + "Provisions pour propre assureur": { + "account_number": "1983" + }, + "Provisions pour d\u00e9mant\u00e8lement et remise en \u00e9tat": { + "account_number": "1984" + }, + "Provisions pour droits \u00e0 r\u00e9duction ou avantage en nature (ch\u00e8ques cadeau, cartes de fid\u00e9lit\u00e9...)": { + "account_number": "1985" + }, + "Provisions pour divers risques et charges": { + "account_number": "1988" + }, + "account_number": "198" + }, + "account_number": "19" + }, + "root_type": "Equity", + "account_number": "1" + }, + "Comptes d\u2019actif immobilis\u00e9": { + "Immobilisations incorporelles": { + "account_type": "Fixed Asset", + "Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset", + "account_number": "211" + }, + "Brevets, licences, concessions et droits similaires": { + "account_type": "Fixed Asset", + "Brevets": { + "account_type": "Fixed Asset", + "account_number": "2121" + }, + "Licences": { + "account_type": "Fixed Asset", + "account_number": "2122" + }, + "Concessions de service public": { + "account_type": "Fixed Asset", + "account_number": "2123" + }, + "Autres concessions et droits similaires": { + "account_type": "Fixed Asset", + "account_number": "2128" + }, + "account_number": "212" + }, + "Logiciels et sites internet": { + "account_type": "Fixed Asset", + "Logiciels": { + "account_type": "Fixed Asset", + "account_number": "2131" + }, + "Sites internet": { + "account_type": "Fixed Asset", + "account_number": "2132" + }, + "account_number": "213" + }, + "Marques": { + "account_type": "Fixed Asset", + "account_number": "214" + }, + "Fonds commercial": { + "account_type": "Fixed Asset", + "account_number": "215" + }, + "Droit au bail": { + "account_type": "Fixed Asset", + "account_number": "216" + }, + "Investissements de cr\u00e9ation": { + "account_type": "Fixed Asset", + "account_number": "217" + }, + "Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset", + "Frais de prospection et d\u2019\u00e9valuation de ressources min\u00e9rales": { + "account_type": "Fixed Asset", + "account_number": "2181" + }, + "Co\u00fbts d\u2019obtention du contrat": { + "account_type": "Fixed Asset", + "account_number": "2182" + }, + "Fichiers clients, notices, titres de journaux et magazines": { + "account_type": "Fixed Asset", + "account_number": "2183" + }, + "Co\u00fbts des franchises": { + "account_type": "Fixed Asset", + "account_number": "2184" + }, + "Divers droits et valeurs incorporelles": { + "account_type": "Fixed Asset", + "account_number": "2188" + }, + "account_number": "218" + }, + "Immobilisations incorporelles en cours": { + "account_type": "Fixed Asset", + "Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset", + "account_number": "2191" + }, + "Logiciels et internet": { + "account_type": "Fixed Asset", + "account_number": "2193" + }, + "Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset", + "account_number": "2198" + }, + "account_number": "219" + }, + "account_number": "21" + }, + "Terrains": { + "account_type": "Fixed Asset", + "Terrains agricoles et forestiers": { + "account_type": "Fixed Asset", + "Terrains d\u2019exploitation agricole": { + "account_type": "Fixed Asset", + "account_number": "2211" + }, + "Terrains d\u2019exploitation foresti\u00e8re": { + "account_type": "Fixed Asset", + "account_number": "2212" + }, + "Autres terrains": { + "account_type": "Fixed Asset", + "account_number": "2218" + }, + "account_number": "221" + }, + "Terrains nus": { + "account_type": "Fixed Asset", + "Terrains \u00e0 b\u00e2tir": { + "account_type": "Fixed Asset", + "account_number": "2221" + }, + "Autres terrains nus": { + "account_type": "Fixed Asset", + "account_number": "2228" + }, + "account_number": "222" + }, + "Terrains b\u00e2tis": { + "account_type": "Fixed Asset", + "Pour b\u00e2timents industriels et agricoles": { + "account_type": "Fixed Asset", + "account_number": "2231" + }, + "Pour b\u00e2timents administratifs et commerciaux": { + "account_type": "Fixed Asset", + "account_number": "2232" + }, + "Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations professionnelles": { + "account_type": "Fixed Asset", + "account_number": "2234" + }, + "Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations non professionnelles": { + "account_type": "Fixed Asset", + "account_number": "2235" + }, + "Autres terrains b\u00e2tis": { + "account_type": "Fixed Asset", + "account_number": "2238" + }, + "account_number": "223" + }, + "Travaux de mise en valeur des terrains": { + "account_type": "Fixed Asset", + "Plantation d\u2019arbres et d\u2019arbustes": { + "account_type": "Fixed Asset", + "account_number": "2241" + }, + "Am\u00e9liorations du fonds": { + "account_type": "Fixed Asset", + "account_number": "2245" + }, + "Autres travaux": { + "account_type": "Fixed Asset", + "account_number": "2248" + }, + "account_number": "224" + }, + "Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset", + "Carri\u00e8res": { + "account_type": "Fixed Asset", + "account_number": "2251" + }, + "account_number": "225" + }, + "Terrains am\u00e9nag\u00e9s": { + "account_type": "Fixed Asset", + "Parkings": { + "account_type": "Fixed Asset", + "account_number": "2261" + }, + "account_number": "226" + }, + "Terrains mis en concession": { + "account_type": "Fixed Asset", + "account_number": "227" + }, + "Autres terrains": { + "account_type": "Fixed Asset", + "Terrains immeubles de placement": { + "account_type": "Fixed Asset", + "account_number": "2281" + }, + "Terrains des logements affect\u00e9s au personnel": { + "account_type": "Fixed Asset", + "account_number": "2285" + }, + "Terrains de location acquisition": { + "account_type": "Fixed Asset", + "account_number": "2286" + }, + "Divers terrains": { + "account_type": "Fixed Asset", + "account_number": "2288" + }, + "account_number": "228" + }, + "Am\u00e9nagements de terrains en cours": { + "account_type": "Fixed Asset", + "Terrains agricoles et forestiers": { + "account_type": "Fixed Asset", + "account_number": "2291" + }, + "Terrains nus": { + "account_type": "Fixed Asset", + "account_number": "2292" + }, + "Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset", + "account_number": "2295" + }, + "Autres terrains": { + "account_type": "Fixed Asset", + "account_number": "2298" + }, + "account_number": "229" + }, + "account_number": "22" + }, + "B\u00e2timents, installations techniques et agencements": { + "B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "B\u00e2timents industriels": { + "account_number": "2311" + }, + "B\u00e2timents agricoles": { + "account_number": "2312" + }, + "B\u00e2timents administratifs et commerciaux": { + "account_number": "2313" + }, + "B\u00e2timents affect\u00e9s au logement du personnel": { + "account_number": "2314" + }, + "B\u00e2timents immeubles de placement": { + "account_number": "2315" + }, + "B\u00e2timents de location acquisition": { + "account_number": "2316" + }, + "account_number": "231" + }, + "B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "B\u00e2timents industriels": { + "account_number": "2321" + }, + "B\u00e2timents agricoles": { + "account_number": "2322" + }, + "B\u00e2timents administratifs et commerciaux": { + "account_number": "2323" + }, + "B\u00e2timents affect\u00e9s au logement du personnel": { + "account_number": "2324" + }, + "B\u00e2timents immeubles de placement": { + "account_number": "2325" + }, + "B\u00e2timents de location acquisition": { + "account_number": "2326" + }, + "account_number": "232" + }, + "Ouvrages d\u2019infrastructure": { + "Voies de terre": { + "account_number": "2331" + }, + "Voies de fer": { + "account_number": "2332" + }, + "Voies d\u2019eau": { + "account_number": "2333" + }, + "Barrages, Digues": { + "account_number": "2334" + }, + "Pistes d\u2019a\u00e9rodrome": { + "account_number": "2335" + }, + "Autres ouvrages d\u2019infrastructures": { + "account_number": "2338" + }, + "account_number": "233" + }, + "Am\u00e9nagements, agencements et installations techniques": { + "Installations complexes sp\u00e9cialis\u00e9es sur sol propre": { + "account_number": "2341" + }, + "Installations complexes sp\u00e9cialis\u00e9es sur sol d\u2019autrui": { + "account_number": "2342" + }, + "Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol propre": { + "account_number": "2343" + }, + "Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol d\u2019autrui": { + "account_number": "2344" + }, + "Am\u00e9nagements et agencements des b\u00e2timents": { + "account_number": "2345" + }, + "account_number": "234" + }, + "Am\u00e9nagements de bureaux": { + "Installations g\u00e9n\u00e9rales": { + "account_number": "2351" + }, + "Autres am\u00e9nagements de bureaux": { + "account_number": "2358" + }, + "account_number": "235" + }, + "B\u00e2timents industriels, agricoles et commerciaux mis en concession": { + "account_number": "237" + }, + "Autres installations et agencements": { + "account_number": "238" + }, + "B\u00e2timents am\u00e9nagements, agencements et installations en cours": { + "B\u00e2timents en cours": { + "account_number": "2391" + }, + "Installations en cours": { + "account_number": "2392" + }, + "Ouvrages d\u2019infrastructure en cours": { + "account_number": "2393" + }, + "Am\u00e9nagements et agencements et installations techniques en cours": { + "account_number": "2394" + }, + "Am\u00e9nagements de bureaux en cours": { + "account_number": "2395" + }, + "Autres installations et agencements en cours": { + "account_number": "2398" + }, + "account_number": "239" + }, + "account_number": "23" + }, + "Mat\u00e9riel, mobilier et actifs biologiques": { + "Mat\u00e9riel et outillage industriel et commercial": { + "Mat\u00e9riel industriel": { + "account_number": "2411" + }, + "Outillage industriel": { + "account_number": "2412" + }, + "Mat\u00e9riel commercial": { + "account_number": "2413" + }, + "Outillage commercial": { + "account_number": "2414" + }, + "Mat\u00e9riel & outillage industriel et commercial de location-acquisition": { + "account_number": "2416" + }, + "account_number": "241" + }, + "Mat\u00e9riel et outillage agricole": { + "Mat\u00e9riel agricole": { + "account_number": "2421" + }, + "Outillage agricole": { + "account_number": "2422" + }, + "Mat\u00e9riel & outillage agricole de location-acquisition": { + "account_number": "2426" + }, + "account_number": "242" + }, + "Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "243" + }, + "Mat\u00e9riel et mobilier": { + "Mat\u00e9riel de bureau": { + "account_number": "2441" + }, + "Mat\u00e9riel informatique": { + "account_number": "2442" + }, + "Mat\u00e9riel bureautique": { + "account_number": "2443" + }, + "Mobilier de bureau": { + "account_number": "2444" + }, + "Mat\u00e9riel et mobilier immeubles de placement": { + "account_number": "2445" + }, + "Mat\u00e9riel et mobilier de location acquisition": { + "account_number": "2446" + }, + "Mat\u00e9riel et mobilier des logements du personnel": { + "account_number": "2447" + }, + "account_number": "244" + }, + "Mat\u00e9riel de transport": { + "Mat\u00e9riel automobile": { + "account_number": "2451" + }, + "Mat\u00e9riel ferroviaire": { + "account_number": "2452" + }, + "Mat\u00e9riel fluvial, lagunaire": { + "account_number": "2453" + }, + "Mat\u00e9riel naval": { + "account_number": "2454" + }, + "Mat\u00e9riel a\u00e9rien": { + "account_number": "2455" + }, + "Mat\u00e9riel de transport de location-acquisition": { + "account_number": "2456" + }, + "Mat\u00e9riel hippomobile": { + "account_number": "2457" + }, + "Autres mat\u00e9riels de transport": { + "account_number": "2458" + }, + "account_number": "245" + }, + "Actifs biologiques": { + "Cheptel, animaux de trait": { + "account_number": "2461" + }, + "Cheptel, animaux reproducteurs": { + "account_number": "2462" + }, + "Animaux de garde": { + "account_number": "2463" + }, + "Plantations agricoles": { + "account_number": "2465" + }, + "Autres actifs biologiques": { + "account_number": "2468" + }, + "account_number": "246" + }, + "Agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "Agencements et am\u00e9nagements du mat\u00e9riel": { + "account_number": "2471" + }, + "Agencements et am\u00e9nagements des actifs biologiques": { + "account_number": "2472" + }, + "Autres agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "account_number": "2478" + }, + "account_number": "247" + }, + "Autres mat\u00e9riels et mobiliers": { + "Collections et \u0153uvres d\u2019art": { + "account_number": "2481" + }, + "Divers mat\u00e9riels mobiliers": { + "account_number": "2488" + }, + "account_number": "248" + }, + "Mat\u00e9riels et actifs biologiques en cours": { + "Mat\u00e9riel et outillage industriel et commercial": { + "account_number": "2491" + }, + "Mat\u00e9riel et outillage agricole": { + "account_number": "2492" + }, + "Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "2493" + }, + "Mat\u00e9riel et mobilier de bureau": { + "account_number": "2494" + }, + "Mat\u00e9riel de transport": { + "account_number": "2495" + }, + "Actifs biologiques": { + "account_number": "2496" + }, + "Agencements am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "account_number": "2497" + }, + "Autres mat\u00e9riels et actifs biologiques en cours": { + "account_number": "2498" + }, + "account_number": "249" + }, + "account_number": "24" + }, + "Avances et acomptes vers\u00e9s sur immobilisations": { + "Avances et acomptes vers\u00e9s sur immobilisations incorporelles": { + "account_number": "251" + }, + "Avances et acomptes vers\u00e9s sur immobilisations corporelles": { + "account_number": "252" + }, + "account_number": "25" + }, + "Titres de participation": { + "Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": { + "account_number": "261" + }, + "Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le conjoint": { + "account_number": "262" + }, + "Titres de participation dans des soci\u00e9t\u00e9s conf\u00e9rant une influence notable": { + "account_number": "263" + }, + "Participations dans des organismes professionnels": { + "account_number": "265" + }, + "Parts dans des groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": { + "account_number": "266" + }, + "Autres titres de participation": { + "account_number": "268" + }, + "account_number": "26" + }, + "Autres immobilisations financi\u00e8res": { + "Pr\u00eats et cr\u00e9ances": { + "Pr\u00eats participatifs": { + "account_number": "2711" + }, + "Pr\u00eats aux associ\u00e9s": { + "account_number": "2712" + }, + "Billets de fonds": { + "account_number": "2713" + }, + "Titres pr\u00eat\u00e9s": { + "account_number": "2714" + }, + "Autres pr\u00eats et cr\u00e9ances": { + "account_number": "2718" + }, + "account_number": "271" + }, + "Pr\u00eats au personnel": { + "Pr\u00eats immobiliers": { + "account_number": "2721" + }, + "Pr\u00eats mobiliers et d\u2019installation": { + "account_number": "2722" + }, + "Autres pr\u00eats au personnel": { + "account_number": "2728" + }, + "account_number": "272" + }, + "Cr\u00e9ances sur l\u2019\u00c9tat": { + "Retenues de garantie": { + "account_number": "2731" + }, + "Fonds r\u00e9glement\u00e9": { + "account_number": "2733" + }, + "Cr\u00e9ances sur le conc\u00e9dant": { + "account_number": "2734" + }, + "Autres cr\u00e9ances sur l\u2019\u00c9tat": { + "account_number": "2738" + }, + "account_number": "273" + }, + "Titres immobilis\u00e9s": { + "Titres immobilis\u00e9s de l\u2019activit\u00e9 de portefeuille (TIAP)": { + "account_number": "2741" + }, + "Titres participatifs": { + "account_number": "2742" + }, + "Certificats d\u2019investissement": { + "account_number": "2743" + }, + "Parts de fonds commun de placement (FCP)": { + "account_number": "2744" + }, + "Obligations": { + "account_number": "2745" + }, + "Actions ou parts propres": { + "account_number": "2746" + }, + "Autres titres immobilis\u00e9s": { + "account_number": "2748" + }, + "account_number": "274" + }, + "D\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "D\u00e9p\u00f4ts pour loyers d\u2019avance": { + "account_number": "2751" + }, + "D\u00e9p\u00f4ts pour l\u2019\u00e9lectricit\u00e9": { + "account_number": "2752" + }, + "D\u00e9p\u00f4ts pour l\u2019eau": { + "account_number": "2753" + }, + "D\u00e9p\u00f4ts pour le gaz": { + "account_number": "2754" + }, + "D\u00e9p\u00f4ts pour le t\u00e9l\u00e9phone, le t\u00e9lex, la t\u00e9l\u00e9copie": { + "account_number": "2755" + }, + "Cautionnements sur march\u00e9s publics": { + "account_number": "2756" + }, + "Cautionnements sur autres op\u00e9rations": { + "account_number": "2757" + }, + "Autres d\u00e9p\u00f4ts et cautionnements": { + "account_number": "2758" + }, + "account_number": "275" + }, + "Int\u00e9r\u00eats courus": { + "Pr\u00eats et cr\u00e9ances non commerciales": { + "account_number": "2761" + }, + "Pr\u00eats au personnel": { + "account_number": "2762" + }, + "Cr\u00e9ances sur l\u2019\u00c9tat": { + "account_number": "2763" + }, + "Titres immobilis\u00e9s": { + "account_number": "2764" + }, + "D\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "account_number": "2765" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations": { + "account_number": "2767" + }, + "Immobilisations financi\u00e8res diverses": { + "account_number": "2768" + }, + "account_number": "276" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": { + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations (groupe)": { + "account_number": "2771" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations (hors groupe)": { + "account_number": "2772" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": { + "account_number": "2773" + }, + "Avances \u00e0 des Groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": { + "account_number": "2774" + }, + "account_number": "277" + }, + "Immobilisations financi\u00e8res diverses": { + "Cr\u00e9ances diverses groupe": { + "account_number": "2781" + }, + "Cr\u00e9ances diverses hors groupe": { + "account_number": "2782" + }, + "Banques d\u00e9p\u00f4ts \u00e0 terme": { + "account_number": "2784" + }, + "Or et m\u00e9taux pr\u00e9cieux": { + "account_number": "2785" + }, + "Autres immobilisations financi\u00e8res": { + "account_number": "2788" + }, + "account_number": "278" + }, + "account_number": "27" + }, + "Amortissements": { + "account_type": "Accumulated Depreciation", + "Amortissements des immobilisations corporelles": { + "account_type": "Accumulated Depreciation", + "Amortissements des frais de d\u00e9veloppement": { + "account_type": "Accumulated Depreciation", + "account_number": "2811" + }, + "Amortissements des brevets, licences, concessions et droits similaires": { + "account_type": "Accumulated Depreciation", + "account_number": "2812" + }, + "Amortissements des logiciels et sites internet": { + "account_type": "Accumulated Depreciation", + "account_number": "2813" + }, + "Amortissements des marques": { + "account_type": "Accumulated Depreciation", + "account_number": "2814" + }, + "Amortissements du fonds commercial": { + "account_type": "Accumulated Depreciation", + "account_number": "2815" + }, + "Amortissements du droit au bail": { + "account_type": "Accumulated Depreciation", + "account_number": "2816" + }, + "Amortissements des investissements de cr\u00e9ation": { + "account_type": "Accumulated Depreciation", + "account_number": "2817" + }, + "Amortissements des autres droits et valeurs incorporels": { + "account_type": "Accumulated Depreciation", + "account_number": "2818" + }, + "account_number": "281" + }, + "Amortissements des terrains": { + "Amortissements des travaux de mise en valeur des terrains": { + "account_number": "2824" + }, + "account_number": "282" + }, + "Amortissements des b\u00e2timents, installations techniques et agencements": { + "Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "account_number": "2831" + }, + "Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "account_number": "2832" + }, + "Amortissements des ouvrages d\u2019infrastructure": { + "account_number": "2833" + }, + "Amortissements des am\u00e9nagements, agencements et installations techniques": { + "account_number": "2834" + }, + "Amortissements des am\u00e9nagements de bureaux": { + "account_number": "2835" + }, + "Amortissements des b\u00e2timents industriels, agricoles et commerciaux mis en concession": { + "account_number": "2837" + }, + "Amortissements des autres installations et agencements": { + "account_number": "2838" + }, + "account_number": "283" + }, + "Amortissements du mat\u00e9riel": { + "Amortissements du mat\u00e9riel et outillage industriel et commercial": { + "account_number": "2841" + }, + "Amortissements du mat\u00e9riel et outillage agricole": { + "account_number": "2842" + }, + "Amortissements du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "2843" + }, + "Amortissements du mat\u00e9riel et mobilier": { + "account_number": "2844" + }, + "Amortissements du mat\u00e9riel de transport": { + "account_number": "2845" + }, + "Amortissements des actifs biologiques": { + "account_number": "2846" + }, + "Amortissements des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": { + "account_number": "2847" + }, + "Amortissements des autres mat\u00e9riels": { + "account_number": "2848" + }, + "account_number": "284" + }, + "account_number": "28" + }, + "D\u00e9pr\u00e9ciations des immobilisations": { + "D\u00e9pr\u00e9ciations des immobilisations incorporelles": { + "D\u00e9pr\u00e9ciations des frais de d\u00e9veloppement": { + "account_number": "2911" + }, + "D\u00e9pr\u00e9ciations des brevets, licences, concessions et droits similaires": { + "account_number": "2912" + }, + "D\u00e9pr\u00e9ciations des logiciels et sites internet": { + "account_number": "2913" + }, + "D\u00e9pr\u00e9ciations des marques": { + "account_number": "2914" + }, + "D\u00e9pr\u00e9ciations du fonds commercial": { + "account_number": "2915" + }, + "D\u00e9pr\u00e9ciations du droit au bail": { + "account_number": "2916" + }, + "D\u00e9pr\u00e9ciations des investissements de cr\u00e9ation": { + "account_number": "2917" + }, + "D\u00e9pr\u00e9ciations des autres droits et valeurs incorporels": { + "account_number": "2918" + }, + "D\u00e9pr\u00e9ciations des immobilisations incorporelles en cours": { + "account_number": "2919" + }, + "account_number": "291" + }, + "D\u00e9pr\u00e9ciations des terrains": { + "D\u00e9pr\u00e9ciations des terrains agricoles et forestiers": { + "account_number": "2921" + }, + "D\u00e9pr\u00e9ciations des terrains nus": { + "account_number": "2922" + }, + "D\u00e9pr\u00e9ciations des terrains b\u00e2tis": { + "account_number": "2923" + }, + "D\u00e9pr\u00e9ciations des travaux de mise en valeur des terrains": { + "account_number": "2924" + }, + "D\u00e9pr\u00e9ciations des terrains de gisement": { + "account_number": "2925" + }, + "D\u00e9pr\u00e9ciations des terrains am\u00e9nag\u00e9s": { + "account_number": "2926" + }, + "D\u00e9pr\u00e9ciations des terrains mis en concession": { + "account_number": "2927" + }, + "D\u00e9pr\u00e9ciations des autres terrains": { + "account_number": "2928" + }, + "D\u00e9pr\u00e9ciations des am\u00e9nagements de terrains en cours": { + "account_number": "2929" + }, + "account_number": "292" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents, installations techniques et agencements": { + "D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "account_number": "2931" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "account_number": "2932" + }, + "D\u00e9pr\u00e9ciations des ouvrages d\u2019infrastructures": { + "account_number": "2933" + }, + "D\u00e9pr\u00e9ciations des am\u00e9nagements, agencements et installations techniques": { + "account_number": "2934" + }, + "D\u00e9pr\u00e9ciations des am\u00e9nagements de bureaux": { + "account_number": "2935" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles et commerciaux mis en concession": { + "account_number": "2937" + }, + "D\u00e9pr\u00e9ciations des autres installations et agencements": { + "account_number": "2938" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents et installations en cours": { + "account_number": "2939" + }, + "account_number": "293" + }, + "D\u00e9pr\u00e9ciations de mat\u00e9riel, du mobilier et de l\u2019actif biologique": { + "D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage industriel et commercial": { + "account_number": "2941" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage agricole": { + "account_number": "2942" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "2943" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel et mobilier": { + "account_number": "2944" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel de transport": { + "account_number": "2945" + }, + "D\u00e9pr\u00e9ciations des actifs biologiques": { + "account_number": "2946" + }, + "D\u00e9pr\u00e9ciations des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": { + "account_number": "2947" + }, + "D\u00e9pr\u00e9ciations des autres mat\u00e9riels": { + "account_number": "2948" + }, + "D\u00e9pr\u00e9ciations de mat\u00e9riel en cours": { + "account_number": "2949" + }, + "account_number": "294" + }, + "D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations": { + "D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations incorporelles": { + "account_number": "2951" + }, + "D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations corporelles": { + "account_number": "2952" + }, + "account_number": "295" + }, + "D\u00e9pr\u00e9ciations des titres de participation": { + "D\u00e9pr\u00e9ciations des titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": { + "account_number": "2961" + }, + "D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s sous contr\u00f4le conjoint": { + "account_number": "2962" + }, + "D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s conf\u00e9rant une influence notable": { + "account_number": "2963" + }, + "D\u00e9pr\u00e9ciations des participations dans des organismes professionnels": { + "account_number": "2965" + }, + "D\u00e9pr\u00e9ciations des parts dans des GIE": { + "account_number": "2966" + }, + "D\u00e9pr\u00e9ciations des autres titres de participation": { + "account_number": "2968" + }, + "account_number": "296" + }, + "D\u00e9pr\u00e9ciations des autres immobilisations financi\u00e8res": { + "D\u00e9pr\u00e9ciations des pr\u00eats et cr\u00e9ances": { + "account_number": "2971" + }, + "D\u00e9pr\u00e9ciations des pr\u00eats au personnel": { + "account_number": "2972" + }, + "D\u00e9pr\u00e9ciations des cr\u00e9ances sur l\u2019\u00c9tat": { + "account_number": "2973" + }, + "D\u00e9pr\u00e9ciations des titres immobilis\u00e9s": { + "account_number": "2974" + }, + "D\u00e9pr\u00e9ciations des d\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "account_number": "2975" + }, + "D\u00e9pr\u00e9ciations des cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": { + "account_number": "2977" + }, + "D\u00e9pr\u00e9ciations des cr\u00e9ances financi\u00e8res diverses": { + "account_number": "2978" + }, + "account_number": "297" + }, + "account_number": "29" + }, + "root_type": "Asset", + "account_number": "2" + }, + "Comptes de Stocks": { + "Marchandises": { + "Marchandises A": { + "Marchandises A1": { + "account_number": "3111" + }, + "Marchandises A2": { + "account_number": "3112" + }, + "account_number": "311" + }, + "Marchandises B": { + "Marchandises B1": { + "account_number": "3121" + }, + "Marchandises B2": { + "account_number": "3122" + }, + "account_number": "312" + }, + "Actifs biologiques": { + "Animaux": { + "account_number": "3131" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3132" + }, + "account_number": "313" + }, + "Marchandises hors activit\u00e9s ordinaires (HAO)": { + "account_number": "318" + }, + "account_number": "31" + }, + "Mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "Mati\u00e8res A": { + "account_number": "321" + }, + "Mati\u00e8res B": { + "account_number": "322" + }, + "Fournitures (A, B)": { + "account_number": "323" + }, + "account_number": "32" + }, + "Autres approvisionnements": { + "Mati\u00e8res consommables": { + "account_number": "331" + }, + "Fournitures d\u2019atelier et d\u2019usine": { + "account_number": "332" + }, + "Fournitures de magasin": { + "account_number": "333" + }, + "Fournitures de bureau": { + "account_number": "334" + }, + "Emballages": { + "Emballages perdus": { + "account_number": "3351" + }, + "Emballages r\u00e9cup\u00e9rables non identifiables": { + "account_number": "3352" + }, + "Emballages \u00e0 usage mixte": { + "account_number": "3353" + }, + "Autres emballages": { + "account_number": "3358" + }, + "account_number": "335" + }, + "Autres mati\u00e8res": { + "account_number": "338" + }, + "account_number": "33" + }, + "Produits en cours": { + "Produits en cours": { + "Produits en cours P1": { + "account_number": "3411" + }, + "Produits en cours P2": { + "account_number": "3412" + }, + "account_number": "341" + }, + "Travaux en cours": { + "Travaux en cours T1": { + "account_number": "3421" + }, + "Travaux en cours T2": { + "account_number": "3422" + }, + "account_number": "342" + }, + "Produits interm\u00e9diaires en cours": { + "Produits interm\u00e9diaires A": { + "account_number": "3431" + }, + "Produits interm\u00e9diaires B": { + "account_number": "3432" + }, + "account_number": "343" + }, + "Produits r\u00e9siduels en cours": { + "Produits r\u00e9siduels A": { + "account_number": "3441" + }, + "Produits r\u00e9siduels B": { + "account_number": "3442" + }, + "account_number": "344" + }, + "Actifs biologiques en cours": { + "Animaux": { + "account_number": "3451" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3452" + }, + "account_number": "345" + }, + "account_number": "34" + }, + "Services en cours": { + "\u00c9tudes en cours": { + "\u00c9tudes en cours E1": { + "account_number": "3511" + }, + "\u00c9tudes en cours E2": { + "account_number": "3512" + }, + "account_number": "351" + }, + "Prestations de services en cours": { + "Prestations de services S1": { + "account_number": "3521" + }, + "Prestations de services S2": { + "account_number": "3522" + } + }, + "account_number": "35" + }, + "Produits finis": { + "Produits finis A": { + "account_number": "361" + }, + "Produits finis B": { + "account_number": "362" + }, + "Actifs biologiques": { + "Animaux": { + "account_number": "3631" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3632" + }, + "Autres stocks (activit\u00e9s annexes)": { + "account_number": "3638" + }, + "account_number": "363" + }, + "account_number": "36" + }, + "Produits interm\u00e9diaires et r\u00e9siduels": { + "Produits interm\u00e9diaires": { + "Produits interm\u00e9diaires A": { + "account_number": "3711" + }, + "Produits interm\u00e9diaires B": { + "account_number": "3712" + }, + "account_number": "371" + }, + "Produits r\u00e9siduels": { + "D\u00e9chets": { + "account_number": "3721" + }, + "Rebuts": { + "account_number": "3722" + }, + "Mati\u00e8res de R\u00e9cup\u00e9ration": { + "account_number": "3723" + }, + "account_number": "372" + }, + "Actifs biologiques": { + "Animaux": { + "account_number": "3731" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3732" + }, + "Autres stocks (activit\u00e9s annexes)": { + "account_number": "3738" + }, + "account_number": "373" + }, + "account_number": "37" + }, + "Stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": { + "account_type": "Stock", + "Marchandises en cours de route": { + "account_number": "381" + }, + "Mati\u00e8res premi\u00e8res et fournitures li\u00e9es en cours de route": { + "account_number": "382" + }, + "Autres approvisionnements en cours de route": { + "account_number": "383" + }, + "Produits finis en cours de route": { + "account_number": "386" + }, + "Stock en consignation ou en d\u00e9p\u00f4t": { + "Stock en consignation": { + "account_number": "3871" + }, + "Stock en d\u00e9p\u00f4t": { + "account_number": "3872" + }, + "account_number": "387" + }, + "Stock provenant d\u2019immobilisations mises hors service ou au rebut": { + "account_number": "388" + }, + "account_number": "38" + }, + "D\u00e9pr\u00e9ciations des stocks et encours de production": { + "D\u00e9pr\u00e9ciations des stocks de marchandises": { + "account_number": "391" + }, + "D\u00e9pr\u00e9ciations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "account_number": "392" + }, + "D\u00e9pr\u00e9ciations des stocks d\u2019autres approvisionnements": { + "account_number": "393" + }, + "D\u00e9pr\u00e9ciations des productions en cours": { + "account_number": "394" + }, + "D\u00e9pr\u00e9ciations des services en cours": { + "account_number": "395" + }, + "D\u00e9pr\u00e9ciations des stocks de produits finis": { + "account_number": "396" + }, + "D\u00e9pr\u00e9ciations des stocks de produits interm\u00e9diaires et r\u00e9siduels": { + "account_number": "397" + }, + "D\u00e9pr\u00e9ciations des stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": { + "account_number": "398" + }, + "account_number": "39" + }, + "root_type": "Asset", + "account_number": "3" + }, + "4-Comptes de Tiers (ACTIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (ACTIF)": { + "Fournisseurs d\u00e9biteurs": { + "Fournisseurs Avances et acomptes vers\u00e9s": { + "account_number": "4091" + }, + "Fournisseurs Groupe avances et acomptes vers\u00e9s": { + "account_number": "4092" + }, + "Fournisseurs Sous-traitants avances et acomptes vers\u00e9s": { + "account_number": "4093" + }, + "Fournisseurs Cr\u00e9ances pour emballages et mat\u00e9riels \u00e0 rendre": { + "account_number": "4094" + }, + "Fournisseurs Rabais, remises, ristournes et autres avoirs \u00e0 obtenir": { + "account_number": "4098" + }, + "account_number": "409" + } + }, + "41-Clients et comptes rattach\u00e9s (ACTIF)": { + "Clients": { + "Clients": { + "account_type": "Receivable", + "account_number": "4111" + }, + "Clients groupe": { + "account_type": "Receivable", + "account_number": "4112" + }, + "Clients, \u00c9tat et Collectivit\u00e9s publiques": { + "account_type": "Receivable", + "account_number": "4114" + }, + "Clients, organismes internationaux": { + "account_type": "Receivable", + "account_number": "4115" + }, + "Clients, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Receivable", + "account_number": "4116" + }, + "Client, retenues de garantie": { + "account_type": "Receivable", + "account_number": "4117" + }, + "Clients, d\u00e9gr\u00e8vement de taxes sur la valeur ajout\u00e9e (TVA)": { + "account_type": "Receivable", + "account_number": "4118" + }, + "account_type": "Receivable", + "account_number": "411" + }, + "Clients, effets \u00e0 recevoir en portefeuille": { + "Clients, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4121" + }, + "Clients Groupe, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4122" + }, + "\u00c9tat et Collectivit\u00e9s publiques, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4124" + }, + "Organismes Internationaux, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4125" + }, + "account_type": "Receivable", + "account_number": "412" + }, + "Clients, ch\u00e8ques, effets et autres valeurs impay\u00e9es": { + "Clients, ch\u00e8ques impay\u00e9s": { + "account_type": "Receivable", + "account_number": "4131" + }, + "Clients, effets impay\u00e9s": { + "account_type": "Receivable", + "account_number": "4132" + }, + "Clients, cartes de cr\u00e9dit impay\u00e9es": { + "account_type": "Receivable", + "account_number": "4133" + }, + "Clients, autres valeurs impay\u00e9es": { + "account_type": "Receivable", + "account_number": "4138" + }, + "account_type": "Receivable", + "account_number": "413" + }, + "Cr\u00e9ances sur cessions courantes d\u2019immobilisations": { + "Cr\u00e9ances en compte, immobilisations incorporelles": { + "account_type": "Receivable", + "account_number": "4141" + }, + "Cr\u00e9ances en compte, immobilisations corporelles": { + "account_type": "Receivable", + "account_number": "4142" + }, + "Effets \u00e0 recevoir, immobilisations incorporelles": { + "account_type": "Receivable", + "account_number": "4146" + }, + "Effets \u00e0 recevoir, immobilisations corporelles": { + "account_type": "Receivable", + "account_number": "4147" + }, + "account_type": "Receivable", + "account_number": "414" + }, + "Clients, effets escompt\u00e9s non \u00e9chus": { + "account_type": "Receivable", + "account_number": "415" + }, + "Cr\u00e9ances clients litigieuses ou douteuses": { + "Cr\u00e9ances litigieuses": { + "account_type": "Receivable", + "account_number": "4161" + }, + "Cr\u00e9ances douteuses": { + "account_type": "Receivable", + "account_number": "4162" + }, + "account_type": "Receivable", + "account_number": "416" + }, + "Clients, produits \u00e0 recevoir": { + "Clients, factures \u00e0 \u00e9tablir": { + "account_type": "Receivable", + "account_number": "4181" + }, + "Clients, int\u00e9r\u00eats courus": { + "account_type": "Receivable", + "account_number": "4186" + }, + "account_type": "Receivable", + "account_number": "418" + }, + "account_type": "Receivable" + }, + "42-Personnel (ACTIF)": { + "Personnel, avances et acomptes": { + "Personnel, avances": { + "account_number": "4211" + }, + "Personnel, acomptes": { + "account_number": "4212" + }, + "Frais avanc\u00e9s et fournitures au personnel": { + "account_number": "4213" + }, + "account_number": "421" + } + }, + "43-Organismes sociaux (ACTIF)": { + "431-S\u00e9curit\u00e9 sociale": { + "Prestations familiales": { + "account_number": "4311" + }, + "Accidents de travail": { + "account_number": "4312" + }, + "Caisse de retraite obligatoire": { + "account_number": "4313" + }, + "Caisse de retraite facultative": { + "account_number": "4314" + }, + "Autres cotisations sociales": { + "account_number": "4318" + } + }, + "432-Caisses de retraite compl\u00e9mentaire": {}, + "433-Autres organismes sociaux": { + "Mutuelle": { + "account_number": "4331" + }, + "Assurances retraite": { + "account_number": "4332" + }, + "Assurances et organismes de sant\u00e9": { + "account_number": "4333" + } + }, + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "Produits \u00e0 recevoir": { + "account_number": "4387" + } + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (ACTIF)": { + "\u00c9tat, TVA factur\u00e9e": { + "TVA factur\u00e9e sur ventes": { + "account_number": "4431" + }, + "TVA factur\u00e9e sur prestations de services": { + "account_number": "4432" + }, + "TVA factur\u00e9e sur travaux": { + "account_number": "4433" + }, + "TVA factur\u00e9e sur production livr\u00e9e \u00e0 soi-m\u00eame": { + "account_number": "4434" + }, + "TVA sur factures \u00e0 \u00e9tablir": { + "account_number": "4435" + }, + "account_number": "443" + }, + "\u00c9tat, TVA r\u00e9cup\u00e9rable": { + "TVA r\u00e9cup\u00e9rable sur immobilisations": { + "account_number": "4451" + }, + "TVA r\u00e9cup\u00e9rable sur achats": { + "account_number": "4452" + }, + "TVA r\u00e9cup\u00e9rable sur transport": { + "account_number": "4453" + }, + "TVA r\u00e9cup\u00e9rable sur services ext\u00e9rieurs et autres charges": { + "account_number": "4454" + }, + "TVA r\u00e9cup\u00e9rable sur factures non parvenues": { + "account_number": "4455" + }, + "TVA transf\u00e9r\u00e9e par d\u2019autres entit\u00e9s": { + "account_number": "4456" + }, + "account_number": "445" + }, + "\u00c9tat, charges \u00e0 payer et produits \u00e0 recevoir": { + "Charges \u00e0 payer": { + "account_number": "4486" + }, + "Produits \u00e0 recevoir": { + "account_number": "4487" + }, + "account_number": "448" + }, + "\u00c9tat, cr\u00e9ances et dettes diverses": { + "\u00c9tat, obligations cautionn\u00e9es": { + "account_number": "4491" + }, + "\u00c9tat, avances et acomptes vers\u00e9s sur imp\u00f4ts": { + "account_number": "4492" + }, + "\u00c9tat, fonds de dotation \u00e0 recevoir": { + "account_number": "4493" + }, + "\u00c9tat, subventions investissement \u00e0 recevoir": { + "account_number": "4494" + }, + "\u00c9tat, subventions d\u2019exploitation \u00e0 recevoir": { + "account_number": "4495" + }, + "\u00c9tat, subventions d\u2019\u00e9quilibre \u00e0 recevoir": { + "account_number": "4496" + }, + "\u00c9tat, avances sur subventions": { + "account_number": "4497" + }, + "\u00c9tat, fonds r\u00e9glement\u00e9s provisionn\u00e9s": { + "account_number": "4499" + }, + "account_number": "449" + } + }, + "45-Organismes internationaux (ACTIF)": { + "Op\u00e9rations avec les organismes africains": { + "account_number": "451" + }, + "Op\u00e9rations avec les autres organismes internationaux": { + "account_number": "452" + }, + "Organismes internationaux, fonds de dotation et subventions \u00e0 recevoir": { + "Organismes internationaux, fonds de dotation \u00e0 recevoir": { + "account_number": "4581" + }, + "Organismes internationaux, subventions \u00e0 recevoir": { + "account_number": "4582" + }, + "account_number": "458" + } + }, + "46-Apporteurs, associ\u00e9s et groupe (ACTIF)": { + "461-Apporteurs, op\u00e9rations sur le capital": { + "Apporteurs, capital appel\u00e9, non vers\u00e9": { + "account_number": "4613" + }, + "Apporteurs, compte d\u2019apport, op\u00e9rations de restructuration (fusion...)": { + "account_number": "4614" + }, + "Apporteurs, titres \u00e0 \u00e9changer": { + "account_number": "4618" + } + }, + "Apporteurs, restant d\u00fb sur capital appel\u00e9": { + "account_number": "467" + } + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (ACTIF)": { + "472-Cr\u00e9ances et dettes sur titres de placement": { + "Cr\u00e9ances sur cessions de titres de placement": { + "account_number": "4721" + }, + "Versements restant \u00e0 effectuer sur titres de placement non lib\u00e9r\u00e9s": { + "account_number": "4726" + } + }, + "473-Interm\u00e9diaires Op\u00e9rations faites pour compte de tiers": { + "Mandants": { + "account_number": "4731" + }, + "Mandataires": { + "account_number": "4732" + }, + "Commettants": { + "account_number": "4733" + }, + "Commissionnaires": { + "account_number": "4734" + }, + "\u00c9tat, Collectivit\u00e9s publiques, fonds global d\u2019allocation": { + "account_number": "4739" + } + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits": { + "Compte de r\u00e9partition p\u00e9riodique des produits": { + "account_number": "4747" + } + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA": { + "Compte actif": { + "account_type": "Temporary", + "account_number": "4751" + } + }, + "Charges constat\u00e9es d\u2019avance": { + "account_number": "476" + }, + "478-\u00c9carts de conversion actif": { + "Diminution des cr\u00e9ances d\u2019exploitation": { + "account_number": "4781" + }, + "Diminution des cr\u00e9ances financi\u00e8res": { + "account_number": "4782" + }, + "Augmentation des dettes d\u2019exploitation": { + "account_number": "4783" + }, + "Augmentation des dettes financi\u00e8res": { + "account_number": "4784" + }, + "Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": { + "account_number": "4786" + }, + "Diff\u00e9rences compens\u00e9es par couverture de change": { + "account_number": "4788" + } + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (ACTIF)": { + "Cr\u00e9ances sur cessions d\u2019immobilisations": { + "En compte, immobilisations incorporelles": { + "account_number": "4851" + }, + "En compte, immobilisations corporelles": { + "account_number": "4852" + }, + "Effets \u00e0 recevoir, immobilisations incorporelles": { + "account_number": "4853" + }, + "Effets \u00e0 recevoir, immobilisations corporelles": { + "account_number": "4854" + }, + "Effets escompt\u00e9s non \u00e9chus": { + "account_number": "4855" + }, + "Retenues de garantie": { + "account_number": "4857" + }, + "Factures \u00e0 \u00e9tablir": { + "account_number": "4858" + }, + "account_number": "485" + }, + "Autres cr\u00e9ances hors activit\u00e9s ordinaires (HAO)": { + "account_number": "488" + } + }, + "49-D\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme (tiers) (ACTIF)": { + "D\u00e9pr\u00e9ciations des comptes clients": { + "Cr\u00e9ances litigieuses": { + "account_number": "4911" + }, + "Cr\u00e9ances douteuses": { + "account_number": "4912" + }, + "account_number": "491" + }, + "D\u00e9pr\u00e9ciations des comptes organismes internationaux": { + "account_number": "495" + }, + "D\u00e9pr\u00e9ciations des comptes apporteurs, associ\u00e9s et groupe": { + "Associ\u00e9s, comptes courants": { + "account_number": "4962" + }, + "Associ\u00e9s, op\u00e9rations faites en commun": { + "account_number": "4963" + }, + "Groupe, comptes courants": { + "account_number": "4966" + }, + "account_number": "496" + }, + "D\u00e9pr\u00e9ciations des comptes d\u00e9biteurs divers": { + "account_number": "497" + }, + "D\u00e9pr\u00e9ciations des comptes de cr\u00e9ances HAO": { + "Cr\u00e9ances sur cessions d\u2019immobilisations": { + "account_number": "4985" + }, + "Cr\u00e9ances sur cessions de titres de placement": { + "account_number": "4986" + }, + "Autres cr\u00e9ances HAO": { + "account_number": "4988" + }, + "account_number": "498" + }, + "Provisions pour risques \u00e0 court terme": { + "Sur op\u00e9rations d\u2019exploitation": { + "account_number": "4991" + }, + "Sur op\u00e9rations financi\u00e8res": { + "account_number": "4997" + }, + "Sur op\u00e9rations HAO": { + "account_number": "4998" + }, + "account_number": "499" + } + }, + "root_type": "Asset" + }, + "4-Comptes de Tiers (PASSIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (PASSIF)": { + "Fournisseurs, dettes en compte": { + "Fournisseurs": { + "account_type": "Payable", + "account_number": "4011" + }, + "Fournisseurs groupe": { + "account_type": "Payable", + "account_number": "4012" + }, + "Fournisseurs sous-traitants": { + "account_type": "Payable", + "account_number": "4013" + }, + "Fournisseurs, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Payable", + "account_number": "4016" + }, + "Fournisseur, retenues de garantie": { + "account_type": "Payable", + "account_number": "4017" + }, + "account_type": "Payable", + "account_number": "401" + }, + "Fournisseurs, effets \u00e0 payer": { + "Fournisseurs Effets \u00e0 payer": { + "account_type": "Payable", + "account_number": "4021" + }, + "Fournisseurs Groupe, effets \u00e0 payer": { + "account_type": "Payable", + "account_number": "4022" + }, + "Fournisseurs Sous-traitants, effets \u00e0 payer": { + "account_type": "Payable", + "account_number": "4023" + }, + "account_type": "Payable", + "account_number": "402" + }, + "Fournisseurs, acquisitions courantes d\u2019immobilisations": { + "Fournisseurs Dettes en comptes, immobilisations incorporelles": { + "account_type": "Payable", + "account_number": "4041" + }, + "Fournisseurs Dettes en comptes, immobilisations corporelles": { + "account_type": "Payable", + "account_number": "4042" + }, + "Fournisseurs Effets \u00e0 payer, immobilisations incorporelles": { + "account_type": "Payable", + "account_number": "4046" + }, + "Fournisseurs Effets \u00e0 payer, immobilisations corporelles": { + "account_type": "Payable", + "account_number": "4047" + }, + "account_type": "Payable", + "account_number": "404" + }, + "Fournisseurs, factures non parvenues": { + "Fournisseurs": { + "account_type": "Stock Received But Not Billed", + "account_number": "4081" + }, + "Fournisseurs groupe": { + "account_type": "Stock Received But Not Billed", + "account_number": "4082" + }, + "Fournisseurs sous-traitants": { + "account_type": "Stock Received But Not Billed", + "account_number": "4083" + }, + "Fournisseurs, int\u00e9r\u00eats courus": { + "account_type": "Stock Received But Not Billed", + "account_number": "4086" + }, + "account_type": "Stock Received But Not Billed", + "account_number": "408" + }, + "account_type": "Payable" + }, + "41-Clients et comptes rattach\u00e9s (PASSIF)": { + "Clients cr\u00e9diteurs": { + "Clients, avances et acomptes re\u00e7us": { + "account_number": "4191" + }, + "Clients groupe, avances et acomptes re\u00e7us": { + "account_number": "4192" + }, + "Clients, dettes pour emballages et mat\u00e9riels consign\u00e9s": { + "account_number": "4194" + }, + "Clients, rabais, remises, ristournes et autres avoirs \u00e0 accorder": { + "account_number": "4198" + }, + "account_number": "419" + } + }, + "42-Personnel (PASSIF)": { + "Personnel, r\u00e9mun\u00e9rations dues": { + "account_number": "422" + }, + "Personnel, oppositions, saisies-arr\u00eats": { + "Personnel, oppositions": { + "account_number": "4231" + }, + "Personnel, saisies-arr\u00eats": { + "account_number": "4232" + }, + "Personnel, avis \u00e0 tiers d\u00e9tenteur": { + "account_number": "4233" + }, + "account_number": "423" + }, + "Personnel, \u0153uvres sociales internes": { + "Assistance m\u00e9dicale": { + "account_number": "4241" + }, + "Allocations familiales": { + "account_number": "4242" + }, + "Organismes sociaux rattach\u00e9s \u00e0 l\u2019entit\u00e9": { + "account_number": "4245" + }, + "Autres \u0153uvres sociales internes": { + "account_number": "4248" + }, + "account_number": "424" + }, + "Repr\u00e9sentants du personnel": { + "D\u00e9l\u00e9gu\u00e9s du personnel": { + "account_number": "4251" + }, + "Syndicats et Comit\u00e9s d\u2019entreprises, d\u2019\u00c9tablissement": { + "account_number": "4252" + }, + "Autres repr\u00e9sentants du personnel": { + "account_number": "4258" + }, + "account_number": "425" + }, + "Personnel, participation aux b\u00e9n\u00e9fices et au capital": { + "Participation aux b\u00e9n\u00e9fices": { + "account_number": "4261" + }, + "Participation au capital": { + "account_number": "4264" + }, + "account_number": "426" + }, + "Personnel d\u00e9p\u00f4ts": { + "account_number": "427" + }, + "Personnel, charges \u00e0 payer et produits \u00e0 recevoir": { + "Dettes provisionn\u00e9es pour cong\u00e9s \u00e0 payer": { + "account_number": "4281" + }, + "Autres charges \u00e0 payer": { + "account_number": "4286" + }, + "Produits \u00e0 recevoir": { + "account_number": "4287" + }, + "account_number": "428" + } + }, + "43-Organismes sociaux (PASSIF)": { + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "Charges sociales sur gratifications \u00e0 payer": { + "account_number": "4381" + }, + "Charges sociales sur cong\u00e9s \u00e0 payer": { + "account_number": "4382" + }, + "Autres charges \u00e0 payer": { + "account_number": "4386" + } + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (PASSIF)": { + "\u00c9tat, imp\u00f4t sur les b\u00e9n\u00e9fices": { + "account_number": "441" + }, + "\u00c9tat, autres imp\u00f4ts et taxes": { + "Imp\u00f4ts et taxes d\u2019\u00c9tat": { + "account_number": "4421" + }, + "Imp\u00f4ts et taxes pour les collectivit\u00e9s publiques": { + "account_number": "4422" + }, + "Imp\u00f4ts et taxes recouvrables sur des obligataires": { + "account_number": "4423" + }, + "Imp\u00f4ts et taxes recouvrables sur des associ\u00e9s": { + "account_number": "4424" + }, + "Droits de douane": { + "account_number": "4426" + }, + "Autres imp\u00f4ts et taxes": { + "account_number": "4428" + }, + "account_number": "442" + }, + "\u00c9tat, TVA due ou cr\u00e9dit de TVA": { + "\u00c9tat, TVA due": { + "account_number": "4441" + }, + "\u00c9tat, cr\u00e9dit de TVA \u00e0 reporter": { + "account_number": "4449" + }, + "account_number": "444" + }, + "\u00c9tat, autres taxes sur le chiffre d\u2019affaires": { + "account_number": "446" + }, + "\u00c9tat, imp\u00f4ts retenus \u00e0 la source": { + "Imp\u00f4t G\u00e9n\u00e9ral sur le revenu": { + "account_number": "4471" + }, + "Imp\u00f4ts sur salaires": { + "account_number": "4472" + }, + "Contribution nationale": { + "account_number": "4473" + }, + "Contribution nationale de solidarit\u00e9": { + "account_number": "4474" + }, + "Autres imp\u00f4ts et contributions": { + "account_number": "4478" + }, + "account_number": "447" + } + }, + "46-Apporteurs, associ\u00e9s et groupe (PASSIF)": { + "461-Apporteurs, op\u00e9rations sur le capital (PASSIF)": { + "Apporteurs, apports en nature": { + "account_number": "4611" + }, + "Apporteurs, apports en num\u00e9raire": { + "account_number": "4612" + }, + "Apporteurs, versements re\u00e7us sur augmentation de capital": { + "account_number": "4615" + }, + "Apporteurs, versements anticip\u00e9s": { + "account_number": "4616" + }, + "Apporteurs d\u00e9faillants": { + "account_number": "4617" + }, + "Apporteurs, capital \u00e0 rembourser": { + "account_number": "4619" + } + }, + "462-Associ\u00e9s, comptes courants": { + "Principal": { + "account_number": "4621" + }, + "Int\u00e9r\u00eats courus": { + "account_number": "4626" + } + }, + "463-Associ\u00e9s, op\u00e9rations faites en commun et GIE": { + "Op\u00e9rations courantes": { + "account_number": "4631" + }, + "Int\u00e9r\u00eats courus": { + "account_number": "4636" + } + }, + "Associ\u00e9s, dividendes \u00e0 payer": { + "account_number": "465" + }, + "Groupe, comptes courants": { + "account_number": "466" + } + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (PASSIF)": { + "471-D\u00e9biteurs et cr\u00e9diteurs divers": { + "D\u00e9biteurs divers": { + "account_number": "4711" + }, + "Cr\u00e9diteurs divers": { + "account_number": "4712" + }, + "Obligataires": { + "account_number": "4713" + }, + "R\u00e9mun\u00e9rations d\u2019administrateurs": { + "account_number": "4715" + }, + "Compte d\u2019affacturage": { + "account_number": "4716" + }, + "D\u00e9biteurs divers retenues de garantie": { + "account_number": "4717" + }, + "Apport, compte de fusion et op\u00e9rations assimil\u00e9es": { + "account_number": "4718" + }, + "Bons de souscription d\u2019actions et d\u2019obligations": { + "account_number": "4719" + } + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits (PASSIF)": { + "Compte de r\u00e9partition p\u00e9riodique des charges": { + "account_number": "4746" + } + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA (PASSIF)": { + "Compte passif": { + "account_number": "4752" + } + }, + "Produits constat\u00e9s d\u2019avance": { + "account_number": "477" + }, + "479-\u00c9carts de conversion passif": { + "Augmentation des cr\u00e9ances d\u2019exploitation": { + "account_number": "4791" + }, + "Augmentation des cr\u00e9ances financi\u00e8res": { + "account_number": "4792" + }, + "Diminution des dettes d\u2019exploitation": { + "account_number": "4793" + }, + "Diminution des dettes financi\u00e8res": { + "account_number": "4794" + }, + "Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": { + "account_number": "4797" + }, + "Diff\u00e9rences compens\u00e9es par couverture de change": { + "account_number": "4798" + } + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (HAO) (PASSIF)": { + "Fournisseurs d\u2019investissements": { + "Immobilisations incorporelles": { + "account_number": "4811" + }, + "Immobilisations corporelles": { + "account_number": "4812" + }, + "Versements restant \u00e0 effectuer sur titres de participation et titres immobilis\u00e9s non lib\u00e9r\u00e9s": { + "account_number": "4813" + }, + "R\u00e9serve de propri\u00e9t\u00e9": { + "account_number": "4816" + }, + "Retenues de garantie": { + "account_number": "4817" + }, + "Factures non parvenues": { + "account_number": "4818" + }, + "account_number": "481" + }, + "Fournisseurs d\u2019investissements, effets \u00e0 payer": { + "Immobilisations incorporelles": { + "account_number": "4821" + }, + "Immobilisations corporelles": { + "account_number": "4822" + }, + "account_number": "482" + }, + "Autres dettes hors activit\u00e9s ordinaires (HAO)": { + "Produits": { + "account_number": "4887" + }, + "account_number": "484" + } + }, + "root_type": "Liability" + }, + "Comptes de tr\u00e9sorerie": { + "Titres de placement": { + "Titres du tr\u00e9sor et bons de caisse \u00e0 court terme": { + "Titres du Tr\u00e9sor \u00e0 court terme": { + "account_number": "5011" + }, + "Titres d\u2019organismes financiers": { + "account_number": "5012" + }, + "Bons de caisse \u00e0 court terme": { + "account_number": "5013" + }, + "Frais d\u2019acquisition des titres de tr\u00e9sor et bons de caisse": { + "account_number": "5016" + }, + "account_number": "501" + }, + "Actions": { + "Actions ou parts propres": { + "account_number": "5021" + }, + "Actions cot\u00e9es": { + "account_number": "5022" + }, + "Actions non cot\u00e9es": { + "account_number": "5023" + }, + "Actions d\u00e9membr\u00e9es (certificats d\u2019investissement, droits de vote)": { + "account_number": "5024" + }, + "Autres actions": { + "account_number": "5025" + }, + "Frais d\u2019acquisition des actions": { + "account_number": "5026" + }, + "account_number": "502" + }, + "Obligations": { + "Obligations \u00e9mises par la soci\u00e9t\u00e9 et rachet\u00e9es par elle": { + "account_number": "5031" + }, + "Obligations cot\u00e9es": { + "account_number": "5032" + }, + "Obligations non cot\u00e9es": { + "account_number": "5033" + }, + "Autres obligations": { + "account_number": "5035" + }, + "Frais d\u2019acquisition des obligations": { + "account_number": "5036" + }, + "account_number": "503" + }, + "Bons de souscription": { + "Bons de souscription d\u2019actions": { + "account_number": "5042" + }, + "Bons de souscription d\u2019obligations": { + "account_number": "5043" + }, + "account_number": "504" + }, + "Titres n\u00e9gociables hors r\u00e9gion": { + "account_number": "505" + }, + "Int\u00e9r\u00eats courus": { + "Titres du Tr\u00e9sor et bons de caisse \u00e0 court terme": { + "account_number": "5061" + }, + "Actions": { + "account_number": "5062" + }, + "Obligations": { + "account_number": "5063" + }, + "account_number": "506" + }, + "Autres titres de placement et cr\u00e9ances assimil\u00e9es": { + "account_number": "508" + }, + "account_number": "50" + }, + "Valeurs \u00e0 encaisser": { + "Effets \u00e0 encaisser": { + "account_number": "511" + }, + "Effets \u00e0 l\u2019encaissement": { + "account_number": "512" + }, + "Ch\u00e8ques \u00e0 encaisser": { + "account_number": "513" + }, + "Ch\u00e8ques \u00e0 l\u2019encaissement": { + "account_number": "514" + }, + "Cartes de cr\u00e9dit \u00e0 encaisser": { + "account_number": "515" + }, + "Autres valeurs \u00e0 l\u2019encaissement": { + "Warrants": { + "account_number": "5181" + }, + "Billets de fonds": { + "account_number": "5182" + }, + "Ch\u00e8ques de voyage": { + "account_number": "5185" + }, + "Coupons \u00e9chus": { + "account_number": "5186" + }, + "Int\u00e9r\u00eats \u00e9chus des obligations": { + "account_number": "5187" + }, + "account_number": "518" + }, + "account_number": "51" + }, + "Banques": { + "Banques locales": { + "Banques en monnaie nationale": { + "account_type": "Bank", + "account_number": "5211" + }, + "Banques en devises": { + "account_type": "Bank", + "account_number": "5215" + }, + "account_type": "Bank", + "account_number": "521" + }, + "Banques autres \u00c9tats r\u00e9gion": { + "account_number": "522" + }, + "Banques autres \u00c9tats zone mon\u00e9taire": { + "account_number": "523" + }, + "Banques hors zone mon\u00e9taire": { + "account_number": "524" + }, + "Banques d\u00e9p\u00f4t \u00e0 terme": { + "account_number": "525" + }, + "Banques, int\u00e9r\u00eats courus": { + "Banque, int\u00e9r\u00eats courus, charges \u00e0 payer": { + "account_number": "5261" + }, + "Banque, int\u00e9r\u00eats courus, produits \u00e0 recevoir": { + "account_number": "5267" + }, + "account_number": "526" + }, + "account_number": "52" + }, + "\u00c9tablissements financiers et assimil\u00e9s": { + "Ch\u00e8ques postaux": { + "account_number": "531" + }, + "Tr\u00e9sor": { + "account_number": "532" + }, + "Soci\u00e9t\u00e9s de gestion et d\u2019interm\u00e9diation (SGI)": { + "account_number": "533" + }, + "\u00c9tablissements financiers, int\u00e9r\u00eats courus": { + "account_number": "536" + }, + "Autres organismes financiers": { + "account_number": "538" + }, + "account_number": "53" + }, + "Instruments de tr\u00e9sorerie": { + "Options de taux d\u2019int\u00e9r\u00eat": { + "account_number": "541" + }, + "Options de taux de change": { + "account_number": "542" + }, + "Options de taux boursiers": { + "account_number": "543" + }, + "Instruments de march\u00e9s \u00e0 terme": { + "account_number": "544" + }, + "Avoirs d\u2019or et autres m\u00e9taux pr\u00e9cieux": { + "account_number": "545" + }, + "account_number": "54" + }, + "Instruments de monnaie \u00e9lectronique": { + "Monnaie \u00e9lectronique carte carburant": { + "account_number": "551" + }, + "Monnaie \u00e9lectronique t\u00e9l\u00e9phone portable": { + "account_number": "552" + }, + "Monnaie \u00e9lectronique carte p\u00e9age": { + "account_number": "553" + }, + "Porte-monnaie \u00e9lectronique": { + "account_number": "554" + }, + "Autres instruments de monnaies \u00e9lectroniques": { + "account_number": "558" + }, + "account_number": "55" + }, + "Banques, cr\u00e9dits de tr\u00e9sorerie et d\u2019escompte": { + "Cr\u00e9dits de tr\u00e9sorerie": { + "account_number": "561" + }, + "Escompte de cr\u00e9dits de campagne": { + "account_number": "564" + }, + "Escompte de cr\u00e9dits ordinaires": { + "account_number": "565" + }, + "Banques, cr\u00e9dits de tr\u00e9sorerie, int\u00e9r\u00eats courus": { + "account_number": "566" + }, + "account_number": "56" + }, + "Caisse": { + "Caisse si\u00e8ge social": { + "Caisse en monnaie nationale": { + "account_number": "5711" + }, + "Caisse en devises": { + "account_number": "5712" + }, + "account_number": "571" + }, + "Caisse succursale A": { + "En monnaie nationale": { + "account_number": "5721" + }, + "En devises": { + "account_number": "5722" + }, + "account_number": "572" + }, + "Caisse succursale B": { + "En monnaie nationale": { + "account_number": "5731" + }, + "En devises": { + "account_number": "5732" + }, + "account_number": "573" + }, + "account_number": "57" + }, + "R\u00e9gies d\u2019avances, accr\u00e9ditifs et virements internes": { + "R\u00e9gies d\u2019avance": { + "account_number": "581" + }, + "Accr\u00e9ditifs": { + "account_number": "582" + }, + "Virements de fonds": { + "account_number": "585" + }, + "Autres virements internes": { + "account_number": "588" + }, + "account_number": "58" + }, + "D\u00e9pr\u00e9ciations et provisions pour risque \u00e0 court terme": { + "D\u00e9pr\u00e9ciations des titres de placement": { + "account_number": "590" + }, + "D\u00e9pr\u00e9ciations des titres et valeurs \u00e0 encaisser": { + "account_number": "591" + }, + "D\u00e9pr\u00e9ciations des comptes banques": { + "account_number": "592" + }, + "D\u00e9pr\u00e9ciations des comptes \u00e9tablissements financiers et assimil\u00e9s": { + "account_number": "593" + }, + "D\u00e9pr\u00e9ciations des comptes d\u2019instruments de tr\u00e9sorerie": { + "account_number": "594" + }, + "Provisions pour risque \u00e0 court terme \u00e0 caract\u00e8re financier": { + "account_number": "599" + }, + "account_number": "59" + }, + "root_type": "Asset", + "account_number": "5" + }, + "Comptes de charges des activit\u00e9s ordinaires": { + "Achats et variations de stocks": { + "Achats de marchandises": { + "Dans la R\u00e9gion": { + "account_number": "6011" + }, + "Hors R\u00e9gion": { + "account_number": "6012" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "6013" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "6014" + }, + "Frais sur achats": { + "account_number": "6015" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6019" + }, + "account_number": "601" + }, + "Achats de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "Dans la R\u00e9gion": { + "account_number": "6021" + }, + "Hors R\u00e9gion": { + "account_number": "6022" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "6023" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "6024" + }, + "Frais sur achats": { + "account_number": "6025" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6029" + }, + "account_number": "602" + }, + "Variations des stocks de biens achet\u00e9s": { + "Variations des stocks de marchandises": { + "account_number": "6031" + }, + "Variations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "account_number": "6032" + }, + "Variations des stocks d\u2019autres approvisionnements": { + "account_number": "6033" + }, + "account_number": "603" + }, + "Achats stock\u00e9s de mati\u00e8res et fournitures consommables": { + "Mati\u00e8res consommables": { + "account_number": "6041" + }, + "Mati\u00e8res combustibles": { + "account_number": "6042" + }, + "Produits d\u2019entretien": { + "account_number": "6043" + }, + "Fournitures d\u2019atelier et d\u2019usine": { + "account_number": "6044" + }, + "Frais sur achat": { + "account_number": "6045" + }, + "Fournitures de magasin": { + "account_number": "6046" + }, + "Fournitures de bureau": { + "account_number": "6047" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6049" + }, + "account_number": "604" + }, + "Autres achats": { + "Fournitures non stockables Eau": { + "account_number": "6051" + }, + "Fournitures non stockables \u00c9lectricit\u00e9": { + "account_number": "6052" + }, + "Fournitures non stockables Autres \u00e9nergies": { + "account_number": "6053" + }, + "Fournitures d\u2019entretien non stockables": { + "account_number": "6054" + }, + "Fournitures de bureau non stockables": { + "account_number": "6055" + }, + "Achats de petit mat\u00e9riel et outillage": { + "account_number": "6056" + }, + "Achats d\u2019\u00e9tudes et prestations de services": { + "account_number": "6057" + }, + "Achats de travaux, mat\u00e9riels et \u00e9quipements": { + "account_number": "6058" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6059" + }, + "account_number": "605" + }, + "Achats d\u2019emballages": { + "Emballages perdus": { + "account_number": "6081" + }, + "Emballages r\u00e9cup\u00e9rables non identifiables": { + "account_number": "6082" + }, + "Emballages \u00e0 usage mixte": { + "account_number": "6083" + }, + "Frais sur achats": { + "account_number": "6085" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6089" + }, + "account_number": "608" + }, + "account_number": "60" + }, + "Transports": { + "Transports sur ventes": { + "account_number": "612" + }, + "Transports pour le compte de tiers": { + "account_number": "613" + }, + "Transports du personnel": { + "account_number": "614" + }, + "Transports de plis": { + "account_number": "616" + }, + "Autres frais de transport": { + "Voyages et d\u00e9placements": { + "account_number": "6181" + }, + "Transports entre \u00e9tablissements ou chantiers": { + "account_number": "6182" + }, + "Transports administratifs": { + "account_number": "6183" + }, + "account_number": "618" + }, + "account_number": "61" + }, + "Services ext\u00e9rieurs": { + "Sous-traitance g\u00e9n\u00e9rale": { + "account_number": "621" + }, + "Locations, charges locatives": { + "Locations de terrains": { + "account_number": "6221" + }, + "Locations de b\u00e2timents": { + "account_number": "6222" + }, + "Locations de mat\u00e9riels et outillages": { + "account_number": "6223" + }, + "Malis sur emballages": { + "account_number": "6224" + }, + "Locations d\u2019emballages": { + "account_number": "6225" + }, + "Fermages et loyers du foncier": { + "account_number": "6226" + }, + "Locations et charges locatives diverses": { + "account_number": "6228" + }, + "account_number": "622" + }, + "Redevances de location acquisition": { + "Cr\u00e9dit-bail immobilier": { + "account_number": "6232" + }, + "Cr\u00e9dit-bail mobilier": { + "account_number": "6233" + }, + "Location-vente": { + "account_number": "6234" + }, + "Autres contrats de location acquisition": { + "account_number": "6238" + }, + "account_number": "623" + }, + "Entretien, r\u00e9parations, remise en \u00e9tat et maintenance": { + "Entretien et r\u00e9parations des biens immobiliers": { + "account_number": "6241" + }, + "Entretien et r\u00e9parations des biens mobiliers": { + "account_number": "6242" + }, + "Maintenance": { + "account_number": "6243" + }, + "Charges de d\u00e9mant\u00e8lement et remise en \u00e9tat": { + "account_number": "6244" + }, + "Autres entretiens et r\u00e9parations": { + "account_number": "6248" + }, + "account_number": "624" + }, + "Primes d\u2019assurance": { + "Assurances multirisques": { + "account_number": "6251" + }, + "Assurances mat\u00e9riel de transport": { + "account_number": "6252" + }, + "Assurances risques d\u2019exploitation": { + "account_number": "6253" + }, + "Assurances responsabilit\u00e9 du producteur": { + "account_number": "6254" + }, + "Assurances insolvabilit\u00e9 clients": { + "account_number": "6255" + }, + "Assurances transport sur ventes": { + "account_number": "6257" + }, + "Autres primes d\u2019assurances": { + "account_number": "6258" + }, + "account_number": "625" + }, + "\u00c9tudes, recherches et documentation": { + "\u00c9tudes et recherches": { + "account_number": "6261" + }, + "Documentation g\u00e9n\u00e9rale": { + "account_number": "6265" + }, + "Documentation technique": { + "account_number": "6266" + }, + "account_number": "626" + }, + "Publicit\u00e9, publications, relations publiques": { + "Annonces, insertions": { + "account_number": "6271" + }, + "Catalogues, imprim\u00e9s publicitaires": { + "account_number": "6272" + }, + "\u00c9chantillons": { + "account_number": "6273" + }, + "Foires et expositions": { + "account_number": "6274" + }, + "Publications": { + "account_number": "6275" + }, + "Cadeaux \u00e0 la client\u00e8le": { + "account_number": "6276" + }, + "Frais de colloques, s\u00e9minaires, conf\u00e9rences": { + "account_number": "6277" + }, + "Autres charges de publicit\u00e9 et relations publiques": { + "account_number": "6278" + }, + "account_number": "627" + }, + "Frais de t\u00e9l\u00e9communications": { + "Frais de t\u00e9l\u00e9phone": { + "account_number": "6281" + }, + "Frais de t\u00e9lex": { + "account_number": "6282" + }, + "Frais de t\u00e9l\u00e9copie": { + "account_number": "6283" + }, + "Autres frais de t\u00e9l\u00e9communications": { + "account_number": "6288" + }, + "account_number": "628" + }, + "account_number": "62" + }, + "Autres services ext\u00e9rieurs": { + "Frais bancaires": { + "Frais sur titres (vente, garde)": { + "account_number": "6311" + }, + "Frais sur effets": { + "account_number": "6312" + }, + "Location de coffres": { + "account_number": "6313" + }, + "Commissions d\u2019affacturage": { + "account_number": "6314" + }, + "Commissions sur cartes de cr\u00e9dit": { + "account_number": "6315" + }, + "Frais d\u2019\u00e9mission d\u2019emprunts": { + "account_number": "6316" + }, + "Frais sur instruments monnaie \u00e9lectronique": { + "account_number": "6317" + }, + "Autres frais bancaires": { + "account_number": "6318" + }, + "account_number": "631" + }, + "R\u00e9mun\u00e9rations d\u2019interm\u00e9diaires et de conseils": { + "Commissions et courtages sur ventes": { + "account_number": "6322" + }, + "Honoraires des professions r\u00e9glement\u00e9es": { + "account_number": "6324" + }, + "Frais d\u2019actes et de contentieux": { + "account_number": "6325" + }, + "R\u00e9mun\u00e9rations d\u2019affacturage": { + "account_number": "6326" + }, + "R\u00e9mun\u00e9rations des autres prestataires de services": { + "account_number": "6327" + }, + "Divers frais": { + "account_number": "6328" + }, + "account_number": "632" + }, + "Frais de formation du personnel": { + "account_number": "633" + }, + "Redevances pour brevets, licences, logiciels, concessions et droits et valeurs similaires": { + "Redevances pour brevets, licences": { + "account_number": "6342" + }, + "Redevances pour logiciels": { + "account_number": "6343" + }, + "Redevances pour marques": { + "account_number": "6344" + }, + "Redevances pour sites internet": { + "account_number": "6345" + }, + "Redevances pour concessions, droits et valeurs similaires": { + "account_number": "6346" + }, + "account_number": "634" + }, + "Cotisations": { + "Cotisations": { + "account_number": "6351" + }, + "Concours divers": { + "account_number": "6358" + }, + "account_number": "635" + }, + "R\u00e9mun\u00e9rations de personnel ext\u00e9rieur \u00e0 l\u2019entit\u00e9": { + "Personnel int\u00e9rimaire": { + "account_number": "6371" + }, + "Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": { + "account_number": "6372" + }, + "account_number": "637" + }, + "Autres charges externes": { + "Frais de recrutement du personnel": { + "account_number": "6381" + }, + "Frais de d\u00e9m\u00e9nagement": { + "account_number": "6382" + }, + "R\u00e9ceptions": { + "account_number": "6383" + }, + "Missions": { + "account_number": "6384" + }, + "Charges de copropri\u00e9t\u00e9": { + "account_number": "6385" + }, + "account_number": "638" + }, + "account_number": "63" + }, + "Imp\u00f4ts et taxes": { + "Imp\u00f4ts et taxes directs": { + "Imp\u00f4ts fonciers et taxes annexes": { + "account_number": "6411" + }, + "Patentes, licences et taxes annexes": { + "account_number": "6412" + }, + "Taxes sur appointements et salaires": { + "account_number": "6413" + }, + "Taxes d\u2019apprentissage": { + "account_number": "6414" + }, + "Formation professionnelle continue": { + "account_number": "6415" + }, + "Autres imp\u00f4ts et taxes directs": { + "account_number": "6418" + }, + "account_number": "641" + }, + "Imp\u00f4ts et taxes indirects": { + "account_number": "645" + }, + "Droits d\u2019enregistrement": { + "Droits de mutation": { + "account_number": "6461" + }, + "Droits de timbre": { + "account_number": "6462" + }, + "Taxes sur les v\u00e9hicules de soci\u00e9t\u00e9": { + "account_number": "6463" + }, + "Vignettes": { + "account_number": "6464" + }, + "Autres droits": { + "account_number": "6468" + }, + "account_number": "646" + }, + "P\u00e9nalit\u00e9s, amendes fiscales": { + "P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts directs": { + "account_number": "6471" + }, + "P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts indirects": { + "account_number": "6472" + }, + "P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts directs": { + "account_number": "6473" + }, + "P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts indirects": { + "account_number": "6474" + }, + "Autres p\u00e9nalit\u00e9s et amendes fiscales": { + "account_number": "6478" + }, + "account_number": "647" + }, + "Autres imp\u00f4ts et taxes": { + "account_number": "648" + }, + "account_number": "64" + }, + "Autres charges": { + "Pertes sur cr\u00e9ances clients et autres d\u00e9biteurs": { + "Clients": { + "account_number": "6511" + }, + "Autres d\u00e9biteurs": { + "account_number": "6515" + }, + "account_number": "651" + }, + "Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "Quote-part transf\u00e9r\u00e9e de b\u00e9n\u00e9fices (comptabilit\u00e9 du g\u00e9rant)": { + "account_number": "6521" + }, + "Pertes imput\u00e9es par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": { + "account_number": "6525" + }, + "account_number": "652" + }, + "Valeurs comptables des cessions courantes d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "6541" + }, + "Immobilisations corporelles": { + "account_number": "6542" + }, + "account_number": "654" + }, + "Perte de change sur cr\u00e9ances et dettes commerciale": { + "account_number": "656" + }, + "P\u00e9nalit\u00e9s et amendes p\u00e9nales": { + "account_number": "657" + }, + "Charges diverses": { + "Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": { + "account_number": "6581" + }, + "Dons": { + "account_number": "6582" + }, + "M\u00e9c\u00e9nat": { + "account_number": "6583" + }, + "Autres charges diverses": { + "account_number": "6588" + }, + "account_number": "658" + }, + "Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "Sur risques \u00e0 court terme": { + "account_number": "6591" + }, + "Sur stocks": { + "account_number": "6593" + }, + "Sur cr\u00e9ances": { + "account_number": "6594" + }, + "Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme": { + "account_number": "6598" + }, + "account_number": "659" + }, + "account_number": "65" + }, + "Charges de personnel": { + "R\u00e9mun\u00e9rations directes vers\u00e9es au personnel national": { + "Appointements salaires et commissions": { + "account_number": "6611" + }, + "Primes et gratifications": { + "account_number": "6612" + }, + "Cong\u00e9s pay\u00e9s": { + "account_number": "6613" + }, + "Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": { + "account_number": "6614" + }, + "Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": { + "account_number": "6615" + }, + "Suppl\u00e9ment familial": { + "account_number": "6616" + }, + "Avantages en nature": { + "account_number": "6617" + }, + "Autres r\u00e9mun\u00e9rations directes": { + "account_number": "6618" + }, + "account_number": "661" + }, + "R\u00e9mun\u00e9rations directes vers\u00e9es au personnel non national": { + "Appointements salaires et commissions": { + "account_number": "6621" + }, + "Primes et gratifications": { + "account_number": "6622" + }, + "Cong\u00e9s pay\u00e9s": { + "account_number": "6623" + }, + "Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": { + "account_number": "6624" + }, + "Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": { + "account_number": "6625" + }, + "Suppl\u00e9ment familial": { + "account_number": "6626" + }, + "Avantages en nature": { + "account_number": "6627" + }, + "Autres r\u00e9mun\u00e9rations directes": { + "account_number": "6628" + }, + "account_number": "662" + }, + "Indemnit\u00e9s forfaitaires vers\u00e9es au personnel": { + "Indemnit\u00e9s de logement": { + "account_number": "6631" + }, + "Indemnit\u00e9s de repr\u00e9sentation": { + "account_number": "6632" + }, + "Indemnit\u00e9s d\u2019expatriation": { + "account_number": "6633" + }, + "Indemnit\u00e9s de transport": { + "account_number": "6634" + }, + "Autres indemnit\u00e9s et avantages divers": { + "account_number": "6638" + }, + "account_number": "663" + }, + "Charges sociales": { + "Charges sociales sur r\u00e9mun\u00e9ration du personnel national": { + "account_number": "6641" + }, + "Charges sociales sur r\u00e9mun\u00e9ration du personnel non national": { + "account_number": "6642" + }, + "account_number": "664" + }, + "R\u00e9mun\u00e9rations et charges sociales de l\u2019exploitant individuel": { + "R\u00e9mun\u00e9ration du travail de l\u2019exploitant": { + "account_number": "6661" + }, + "Charges sociales": { + "account_number": "6662" + }, + "account_number": "666" + }, + "R\u00e9mun\u00e9ration transf\u00e9r\u00e9e de personnel ext\u00e9rieur": { + "Personnel int\u00e9rimaire": { + "account_number": "6671" + }, + "Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": { + "account_number": "6672" + }, + "account_number": "667" + }, + "Autres charges sociales": { + "Versements aux syndicats et comit\u00e9s d\u2019entreprise, d\u2019\u00e9tablissement": { + "account_number": "6681" + }, + "Versements aux comit\u00e9s d\u2019hygi\u00e8ne et de s\u00e9curit\u00e9": { + "account_number": "6682" + }, + "Versements et contributions aux autres \u0153uvres sociales": { + "account_number": "6683" + }, + "M\u00e9decine du travail et pharmacie": { + "account_number": "6684" + }, + "Assurances et organismes de sant\u00e9": { + "account_number": "6685" + }, + "Assurances retraite et fonds de pension": { + "account_number": "6686" + }, + "Majorations et p\u00e9nalit\u00e9s sociales": { + "account_number": "6687" + }, + "Charges sociales diverses": { + "account_number": "6688" + }, + "account_number": "668" + }, + "account_number": "66" + }, + "Frais financiers et charges assimil\u00e9es": { + "Int\u00e9r\u00eats des emprunts": { + "Emprunts obligataires": { + "account_number": "6711" + }, + "Emprunts aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": { + "account_number": "6712" + }, + "Dettes li\u00e9es \u00e0 des participations": { + "account_number": "6713" + }, + "Primes de remboursement des obligations": { + "account_number": "6714" + }, + "account_number": "671" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition": { + "Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail immobilier": { + "account_number": "6722" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail mobilier": { + "account_number": "6723" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition / location-vente": { + "account_number": "6724" + }, + "Int\u00e9r\u00eats dans loyers des autres locations acquisition": { + "account_number": "6728" + }, + "account_number": "672" + }, + "Escomptes accord\u00e9s": { + "account_number": "673" + }, + "Autres int\u00e9r\u00eats": { + "Avances re\u00e7ues et d\u00e9p\u00f4ts cr\u00e9diteurs": { + "account_number": "6741" + }, + "Comptes courants bloqu\u00e9s": { + "account_number": "6742" + }, + "Int\u00e9r\u00eats sur obligations cautionn\u00e9es": { + "account_number": "6743" + }, + "Int\u00e9r\u00eats sur dettes commerciales": { + "account_number": "6744" + }, + "Int\u00e9r\u00eats bancaires et sur op\u00e9rations de financement (escompte...)": { + "account_number": "6745" + }, + "Int\u00e9r\u00eats sur dettes diverses": { + "account_number": "6748" + }, + "account_number": "674" + }, + "Escomptes des effets de commerce": { + "account_number": "675" + }, + "Pertes de change financi\u00e8res": { + "account_number": "676" + }, + "Pertes sur titres de placement": { + "Pertes sur cessions de titres de placement": { + "account_number": "6771" + }, + "Mali provenant d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": { + "account_number": "6772" + }, + "account_number": "677" + }, + "Pertes et charges sur risques financiers": { + "Sur rentes viag\u00e8res": { + "account_number": "6781" + }, + "Sur op\u00e9rations financi\u00e8res": { + "account_number": "6782" + }, + "Sur instruments de tr\u00e9sorerie": { + "account_number": "6784" + }, + "account_number": "678" + }, + "Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "Sur risques financiers": { + "account_number": "6791" + }, + "Sur titres de placement": { + "account_number": "6795" + }, + "Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "account_number": "6798" + }, + "account_number": "679" + }, + "account_number": "67" + }, + "Dotations aux amortissements": { + "Dotations aux amortissements d\u2019exploitation": { + "Dotations aux amortissements des immobilisations incorporelles": { + "account_number": "6812" + }, + "Dotations aux amortissements des immobilisations corporelles": { + "account_number": "6813" + }, + "account_number": "681" + }, + "account_number": "68" + }, + "Dotations aux provisions et aux d\u00e9pr\u00e9ciations": { + "Dotations aux provisions et aux d\u00e9pr\u00e9ciations d\u2019exploitation": { + "Dotations aux provisions pour risques et charges": { + "account_number": "6911" + }, + "Dotations aux d\u00e9pr\u00e9ciations des immobilisations incorporelles": { + "account_number": "6913" + }, + "Dotations aux d\u00e9pr\u00e9ciations des immobilisations corporelles": { + "account_number": "6914" + }, + "account_number": "691" + }, + "Dotations aux provisions et aux d\u00e9pr\u00e9ciations financi\u00e8res": { + "Dotations aux provisions pour risques et charges": { + "account_number": "6971" + }, + "Dotations aux d\u00e9pr\u00e9ciations des immobilisations financi\u00e8res": { + "account_number": "6972" + }, + "account_number": "697" + }, + "account_number": "69" + }, + "root_type": "Expense", + "account_number": "6" + }, + "Comptes de produits des activit\u00e9s ordinaires": { + "Ventes": { + "Ventes de marchandises": { + "Dans la R\u00e9gion": { + "account_number": "7011" + }, + "Hors R\u00e9gion": { + "account_number": "7012" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7013" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7014" + }, + "Sur internet": { + "account_number": "7015" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7019" + }, + "account_number": "701" + }, + "Ventes de produits finis": { + "Dans la R\u00e9gion": { + "account_number": "7021" + }, + "Hors R\u00e9gion": { + "account_number": "7022" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7023" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7024" + }, + "Sur internet": { + "account_number": "7025" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7029" + }, + "account_number": "702" + }, + "Ventes de produits interm\u00e9diaires": { + "Dans la R\u00e9gion": { + "account_number": "7031" + }, + "Hors R\u00e9gion": { + "account_number": "7032" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7033" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7034" + }, + "Sur internet": { + "account_number": "7035" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7039" + }, + "account_number": "703" + }, + "Ventes de produits r\u00e9siduels": { + "Dans la R\u00e9gion": { + "account_number": "7041" + }, + "Hors R\u00e9gion": { + "account_number": "7042" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7043" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7044" + }, + "Sur internet": { + "account_number": "7045" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7049" + }, + "account_number": "704" + }, + "Travaux factur\u00e9s": { + "Dans la R\u00e9gion": { + "account_number": "7051" + }, + "Hors R\u00e9gion": { + "account_number": "7052" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7053" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7054" + }, + "Sur internet": { + "account_number": "7055" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7059" + }, + "account_number": "705" + }, + "Services vendus": { + "Dans la R\u00e9gion": { + "account_number": "7061" + }, + "Hors R\u00e9gion": { + "account_number": "7062" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7063" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7064" + }, + "Sur internet": { + "account_number": "7065" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7069" + }, + "account_number": "706" + }, + "Produits accessoires": { + "Ports, emballages perdus et autres frais factur\u00e9s": { + "account_number": "7071" + }, + "Commissions et courtages": { + "account_number": "7072" + }, + "Locations": { + "account_number": "7073" + }, + "Bonis sur reprises et cessions d\u2019emballages": { + "account_number": "7074" + }, + "Mise \u00e0 disposition de personnel": { + "account_number": "7075" + }, + "Redevances pour brevets, logiciels, marques et droits similaires": { + "account_number": "7076" + }, + "Services exploit\u00e9s dans l\u2019int\u00e9r\u00eat du personnel": { + "account_number": "7077" + }, + "Autres produits accessoires": { + "account_number": "7078" + }, + "account_number": "707" + }, + "account_number": "70" + }, + "Subventions d\u2019exploitation": { + "Sur produits \u00e0 l\u2019exportation": { + "account_number": "711" + }, + "Sur produits \u00e0 l\u2019importation": { + "account_number": "712" + }, + "Sur produits de p\u00e9r\u00e9quation": { + "account_number": "713" + }, + "Indemnit\u00e9s et subventions d\u2019exploitation (entit\u00e9 agricole)": { + "account_number": "714" + }, + "Autres subventions d\u2019exploitation": { + "Vers\u00e9es par l\u2019\u00c9tat et les collectivit\u00e9s publiques": { + "account_number": "7181" + }, + "Vers\u00e9es par les organismes internationaux": { + "account_number": "7182" + }, + "Vers\u00e9es par des tiers": { + "account_number": "7183" + }, + "account_number": "718" + }, + "account_number": "71" + }, + "Production immobilis\u00e9e": { + "Immobilisations incorporelles": { + "account_number": "721" + }, + "Immobilisations corporelles": { + "Immobilisations corporelles (hors actifs biologiques)": { + "account_number": "7221" + }, + "Immobilisations corporelles (actifs biologiques)": { + "account_number": "7222" + }, + "account_number": "722" + }, + "Production auto-consomm\u00e9e": { + "account_number": "724" + }, + "Immobilisations financi\u00e8res": { + "account_number": "726" + }, + "account_number": "72" + }, + "Variations des stocks de biens et de services produits": { + "Variations des stocks de produits en cours": { + "Produits en cours": { + "account_number": "7341" + }, + "Travaux en cours": { + "account_number": "7342" + }, + "account_number": "734" + }, + "Variations des en-cours de services": { + "\u00c9tudes en cours": { + "account_number": "7351" + }, + "Prestations de services en cours": { + "account_number": "7352" + }, + "account_number": "735" + }, + "Variations des stocks de produits finis": { + "account_number": "736" + }, + "Variations des stocks de produits interm\u00e9diaires et r\u00e9siduels": { + "Produits interm\u00e9diaires": { + "account_number": "7371" + }, + "Produits r\u00e9siduels": { + "account_number": "7372" + }, + "account_number": "737" + }, + "account_number": "73" + }, + "Autres produits": { + "Profits sur cr\u00e9ances clients et autres d\u00e9biteurs": { + "account_number": "751" + }, + "Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "Quote-part transf\u00e9r\u00e9e de pertes (comptabilit\u00e9 du g\u00e9rant)": { + "account_number": "7521" + }, + "B\u00e9n\u00e9fices attribu\u00e9s par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": { + "account_number": "7525" + }, + "account_number": "752" + }, + "Produits des cessions courantes d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "7541" + }, + "Immobilisations corporelles": { + "account_number": "7542" + }, + "account_number": "754" + }, + "Gains de change sur cr\u00e9ances et dettes commerciales": { + "account_number": "756" + }, + "Produits divers": { + "Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": { + "account_number": "7581" + }, + "Indemnit\u00e9s d\u2019assurances re\u00e7ues": { + "account_number": "7582" + }, + "Autres produits divers": { + "account_number": "7588" + }, + "account_number": "758" + }, + "Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "Sur risques \u00e0 court terme": { + "account_number": "7591" + }, + "Sur stocks": { + "account_number": "7593" + }, + "Sur cr\u00e9ances": { + "account_number": "7594" + }, + "Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "account_number": "7598" + }, + "account_number": "759" + }, + "account_number": "75" + }, + "Revenus financiers et produits assimil\u00e9s": { + "Int\u00e9r\u00eats de pr\u00eats et cr\u00e9ances diverses": { + "Int\u00e9r\u00eats de pr\u00eats": { + "account_number": "7712" + }, + "Int\u00e9r\u00eats sur cr\u00e9ances diverses": { + "account_number": "7713" + }, + "account_number": "771" + }, + "Revenus de participations et autres titres immobilis\u00e9s": { + "Revenus des titres de participation": { + "account_number": "7721" + }, + "Revenus autres titres immobilis\u00e9s": { + "account_number": "7722" + }, + "account_number": "772" + }, + "Escomptes obtenus": { + "account_number": "773" + }, + "Revenus de placement": { + "Revenus des obligations": { + "account_number": "7745" + }, + "Revenus des titres de placement": { + "account_number": "7746" + }, + "account_number": "774" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition": { + "account_number": "775" + }, + "Gains de change financiers": { + "account_number": "776" + }, + "Gains sur cessions de titres de placement": { + "account_number": "777" + }, + "Gains sur risques financiers": { + "Sur rentes viag\u00e8res": { + "account_number": "7781" + }, + "Sur op\u00e9rations financi\u00e8res": { + "account_number": "7782" + }, + "Sur instruments de tr\u00e9sorerie": { + "account_number": "7784" + }, + "account_number": "778" + }, + "Reprises de charges pour d\u00e9pr\u00e9ciations et provisions \u00e0 court terme financi\u00e8res": { + "Sur risques financiers": { + "account_number": "7791" + }, + "Sur titres de placement": { + "account_number": "7795" + }, + "Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "account_number": "7798" + }, + "account_number": "779" + }, + "account_number": "77" + }, + "Transferts de charges": { + "Transferts de charges d\u2019exploitation": { + "account_number": "781" + }, + "Transferts de charges financi\u00e8res": { + "account_number": "787" + }, + "account_number": "78" + }, + "Reprises de provisions, de d\u00e9pr\u00e9ciations et autres": { + "Reprises de provisions et d\u00e9pr\u00e9ciations d\u2019exploitation": { + "Pour risques et charges": { + "account_number": "7911" + }, + "Des immobilisations incorporelles": { + "account_number": "7913" + }, + "Des immobilisations corporelles": { + "account_number": "7914" + }, + "account_number": "791" + }, + "Reprises de provisions et d\u00e9pr\u00e9ciations financi\u00e8res": { + "Pour risques et charges": { + "account_number": "7971" + }, + "Des immobilisations financi\u00e8res": { + "account_number": "7972" + }, + "account_number": "797" + }, + "Reprises d\u2019amortissements": { + "account_number": "798" + }, + "Reprises de subventions d\u2019investissement": { + "account_number": "799" + }, + "account_number": "79" + }, + "root_type": "Income", + "account_number": "7" + }, + "8-Comptes des autres charges et des autres produits (CHARGES)": { + "Valeurs comptables des cessions d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "811" + }, + "Immobilisations corporelles": { + "account_number": "812" + }, + "Immobilisations financi\u00e8res": { + "account_number": "816" + }, + "account_number": "81" + }, + "Charges hors activit\u00e9s ordinaires": { + "Charges HAO constat\u00e9es": { + "account_number": "831" + }, + "Charges li\u00e9es aux op\u00e9rations de restructuration": { + "account_number": "833" + }, + "Pertes sur cr\u00e9ances HAO": { + "account_number": "834" + }, + "Dons et lib\u00e9ralit\u00e9s accord\u00e9s": { + "account_number": "835" + }, + "Abandons de cr\u00e9ances consentis": { + "account_number": "836" + }, + "Charges li\u00e9es aux op\u00e9rations de liquidation": { + "account_number": "837" + }, + "Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": { + "account_number": "839" + }, + "account_number": "83" + }, + "Dotations hors activit\u00e9s ordinaires": { + "Dotations aux provisions r\u00e9glement\u00e9es": { + "account_number": "851" + }, + "Dotations aux amortissements HAO": { + "account_number": "852" + }, + "Dotations aux d\u00e9pr\u00e9ciations HAO": { + "account_number": "853" + }, + "Dotations aux provisions pour risques et charges HAO": { + "account_number": "854" + }, + "Autres dotations HAO": { + "account_number": "858" + }, + "account_number": "85" + }, + "Participation des travailleurs": { + "Participation l\u00e9gale aux b\u00e9n\u00e9fices": { + "account_number": "871" + }, + "Participation contractuelle aux b\u00e9n\u00e9fices": { + "account_number": "874" + }, + "Autres participations": { + "account_number": "878" + }, + "account_number": "87" + }, + "Imp\u00f4ts sur le r\u00e9sultat": { + "Imp\u00f4ts sur les b\u00e9n\u00e9fices de l\u2019exercice": { + "Activit\u00e9s exerc\u00e9es dans l\u2019\u00c9tat": { + "account_number": "8911" + }, + "Activit\u00e9s exerc\u00e9es dans les autres \u00c9tats de la R\u00e9gion": { + "account_number": "8912" + }, + "Activit\u00e9s exerc\u00e9es hors R\u00e9gion": { + "account_number": "8913" + }, + "account_number": "891" + }, + "Rappel d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": { + "account_number": "892" + }, + "Imp\u00f4t minimum forfaitaire IMF": { + "account_number": "895" + }, + "D\u00e9gr\u00e8vements et annulations d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": { + "D\u00e9gr\u00e8vements": { + "account_number": "8991" + }, + "Annulations pour pertes r\u00e9troactives": { + "account_number": "8994" + }, + "account_number": "899" + }, + "account_number": "89" + }, + "root_type": "Expense" + }, + "8-Comptes des autres charges et des autres produits (PRODUITS)": { + "Produits des cessions d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "821" + }, + "Immobilisations corporelles": { + "account_number": "822" + }, + "Immobilisations financi\u00e8res": { + "account_number": "826" + }, + "account_number": "82" + }, + "Produits hors activit\u00e9s ordinaires": { + "Produits HAO constat\u00e9s": { + "account_number": "841" + }, + "Produits li\u00e9s aux op\u00e9rations de restructuration": { + "account_number": "843" + }, + "Indemnit\u00e9s et subventions HAO (entit\u00e9 agricole)": { + "account_number": "844" + }, + "Dons et lib\u00e9ralit\u00e9s obtenus": { + "account_number": "845" + }, + "Abandons de cr\u00e9ances obtenus": { + "account_number": "846" + }, + "Produits li\u00e9s aux op\u00e9rations de liquidation": { + "account_number": "847" + }, + "Transferts de charges HAO": { + "account_number": "848" + }, + "Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": { + "account_number": "849" + }, + "account_number": "84" + }, + "Reprises de charges, provisions et d\u00e9pr\u00e9ciations HAO": { + "Reprises de provisions r\u00e9glement\u00e9es": { + "account_number": "861" + }, + "Reprises d\u2019amortissements HAO": { + "account_number": "862" + }, + "Reprises de d\u00e9pr\u00e9ciations HAO": { + "account_number": "863" + }, + "Reprises de provisions pour risques et charges HAO": { + "account_number": "864" + }, + "Autres reprises HAO": { + "account_number": "868" + }, + "account_number": "86" + }, + "Subventions d\u2019\u00e9quilibre": { + "\u00c9tat": { + "account_number": "881" + }, + "Collectivit\u00e9s publiques": { + "account_number": "884" + }, + "Groupe": { + "account_number": "886" + }, + "Autres": { + "account_number": "888" + }, + "account_number": "88" + }, + "root_type": "Income" + } + } +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/tg_plan_comptable.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/tg_plan_comptable.json new file mode 100644 index 00000000000..dca6c08db7a --- /dev/null +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/tg_plan_comptable.json @@ -0,0 +1,1919 @@ +{ + "country_code": "tg", + "name": "Syscohada - Plan Comptable", + "tree": { + "1-Comptes de ressources durables": { + "10-Capital": { + "101-Capital social": { + "1011-Capital souscrit, non appel\u00e9": {}, + "1012-Capital souscrit, appel\u00e9, non vers\u00e9": {}, + "1013-Capital souscrit, appel\u00e9, vers\u00e9, non amorti": {}, + "1014-Capital souscrit, appel\u00e9, vers\u00e9, amorti": {}, + "1018-Capital souscrit soumis \u00e0 des conditions particuli\u00e8res": {} + }, + "102-Capital par dotation": { + "1021-Dotation initiale": {}, + "1022-Dotations compl\u00e9mentaires": {}, + "1028-Autres dotations": {} + }, + "103-Capital personnel": {}, + "104-Compte de l\u2019exploitant": { + "1041-Apports temporaires": {}, + "1042-Op\u00e9rations courantes": {}, + "1043-R\u00e9mun\u00e9rations, imp\u00f4ts et autres charges personnelles": {}, + "1047-Pr\u00e9l\u00e8vements d\u2019autoconsommation": {}, + "1048-Autres pr\u00e9l\u00e8vements": {} + }, + "105-Primes li\u00e9es au capital social": { + "1051-Primes d\u2019\u00e9mission": {}, + "1052-Primes d\u2019apport": {}, + "1053-Primes de fusion": {}, + "1054-Primes de conversion": {}, + "1058-Autres primes": {} + }, + "106-\u00c9carts de r\u00e9\u00e9valuation": { + "1061-\u00c9carts de r\u00e9\u00e9valuation l\u00e9gale": {}, + "1062-\u00c9carts de r\u00e9\u00e9valuation libre": {} + }, + "109-Apporteurs, capital souscrit, non appel\u00e9": {} + }, + "11-R\u00e9serves": { + "111-R\u00e9serve l\u00e9gale": {}, + "112-R\u00e9serves statutaires ou contractuelles": {}, + "113-R\u00e9serves r\u00e9glement\u00e9es": { + "1131-R\u00e9serves de plus-values nettes \u00e0 long terme": {}, + "1132-R\u00e9serves d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": {}, + "1133-R\u00e9serves cons\u00e9cutives \u00e0 l\u2019octroi de subventions d\u2019investissement": {}, + "1134-R\u00e9serves des valeurs mobili\u00e8res donnant acc\u00e8s au capital": {}, + "1135-Autres r\u00e9serves r\u00e9glement\u00e9es": {} + }, + "118-Autres r\u00e9serves": { + "1181-R\u00e9serves facultatives": {}, + "1188-R\u00e9serves diverses": {} + } + }, + "12-Report \u00e0 nouveau": { + "121-Report \u00e0 nouveau cr\u00e9diteur": {}, + "129-Report \u00e0 nouveau d\u00e9biteur": { + "1291-Perte nette \u00e0 reporter": {}, + "1292-Perte Amortissements r\u00e9put\u00e9s diff\u00e9r\u00e9s": {} + } + }, + "13-R\u00e9sultat net de l\u2019exercice": { + "130-R\u00e9sultat en instance d\u2019affectation": { + "1301-R\u00e9sultat en instance d\u2019affectation : b\u00e9n\u00e9fice": {}, + "1309-R\u00e9sultat en instance d\u2019affectation : perte": {} + }, + "131-R\u00e9sultat net : b\u00e9n\u00e9fice": {}, + "132-Marge commerciale (MC)": {}, + "133-Valeur ajout\u00e9e (VA)": {}, + "134-Exc\u00e9dent brut d\u2019exploitation (EBE)": {}, + "135-R\u00e9sultat d\u2019exploitation (RE)": {}, + "136-R\u00e9sultat financier (RF)": {}, + "137-R\u00e9sultat des activit\u00e9s ordinaires (RAO)": {}, + "138-R\u00e9sultat hors activit\u00e9s ordinaires (RHAO)": { + "1381-R\u00e9sultat de fusion": {}, + "1382-R\u00e9sultat d\u2019apport partiel d\u2019actif": {}, + "1383-R\u00e9sultat de scission": {}, + "1384-R\u00e9sultat de liquidation": {} + }, + "139-R\u00e9sultat net : perte": {} + }, + "14-Subventions d\u2019investissement": { + "141-Subventions d\u2019\u00e9quipement": { + "1411-\u00c9tat": {}, + "1412-R\u00e9gions": {}, + "1413-D\u00e9partements": {}, + "1414-Communes et collectivit\u00e9s publiques d\u00e9centralis\u00e9es": {}, + "1415-Entit\u00e9s publiques ou mixtes": {}, + "1416-Entit\u00e9s et organismes priv\u00e9s": {}, + "1417-Organismes internationaux": {}, + "1418-Autres": {} + }, + "148-Autres subventions d\u2019investissement": {} + }, + "15-Provisions r\u00e9glement\u00e9es et fonds assimil\u00e9s": { + "151-Amortissements d\u00e9rogatoires": {}, + "152-Plus-values de cession \u00e0 r\u00e9investir": {}, + "153-Fonds r\u00e9glement\u00e9s": { + "1531-Fonds National": {}, + "1532-Pr\u00e9l\u00e8vement pour le Budget": {} + }, + "154-Provisions sp\u00e9ciales de r\u00e9\u00e9valuation": {}, + "155-Provisions r\u00e9glement\u00e9es relatives aux immobilisations": { + "1551-Reconstitution des gisements miniers et p\u00e9troliers": {} + }, + "156-Provisions r\u00e9glement\u00e9es relatives aux stocks": { + "1561-Hausse de prix": {}, + "1562-Fluctuation des cours": {} + }, + "157-Provisions pour investissement": {}, + "158-Autres provisions et fonds r\u00e9glement\u00e9s": {} + }, + "16-Emprunts et dettes assimil\u00e9es": { + "161-Emprunts obligataires": { + "1611-Emprunts obligataires ordinaires": {}, + "1612-Emprunts obligataires convertibles en actions": {}, + "1613-Emprunts obligataires remboursables en actions": {}, + "1618-Autres emprunts obligataires": {} + }, + "162-Emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": {}, + "163-Avances re\u00e7ues de l\u2019\u00c9tat": {}, + "164-Avances re\u00e7ues et comptes courants bloqu\u00e9s": {}, + "165-D\u00e9p\u00f4ts et cautionnements re\u00e7us": { + "1651-D\u00e9p\u00f4ts": {}, + "1652-Cautionnements": {} + }, + "166-Int\u00e9r\u00eats courus": { + "1661-Sur emprunts obligataires": {}, + "1662-Sur emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": {}, + "1663-Sur avances re\u00e7ues de l\u2019\u00c9tat": {}, + "1664-Sur avances re\u00e7ues et comptes courants bloqu\u00e9s": {}, + "1665-Sur d\u00e9p\u00f4ts et cautionnements re\u00e7us": {}, + "1667-Sur avances assorties de conditions particuli\u00e8res": {}, + "1668-Sur autres emprunts et dettes": {} + }, + "167-Avances assorties de conditions particuli\u00e8res": { + "1671-Avances bloqu\u00e9es pour augmentation du capital": {}, + "1672-Avances conditionn\u00e9es par l\u2019\u00c9tat": {}, + "1673-Avances conditionn\u00e9es par les autres organismes africains": {}, + "1674-Avances conditionn\u00e9es par les organismes internationaux": {} + }, + "168-Autres emprunts et dettes": { + "1681-Rentes viag\u00e8res capitalis\u00e9es": {}, + "1682-Billets de fonds": {}, + "1683-Dettes cons\u00e9cutives \u00e0 des titres emprunt\u00e9s": {}, + "1684-Emprunts participatifs": {}, + "1685-Participation des travailleurs aux b\u00e9n\u00e9fices": {}, + "1686-Emprunts et dettes contract\u00e9s aupr\u00e8s des autres tiers": {} + } + }, + "17-Dettes de location acquisition": { + "172-Dettes de location acquisition / cr\u00e9dit bail immobilier": {}, + "173-Dettes de location acquisition / cr\u00e9dit bail mobilier": {}, + "174-Dettes de location acquisition / location de vente": {}, + "176-Int\u00e9r\u00eats courus": { + "1762-Sur dettes de location acquisition / cr\u00e9dit-bail immobilier": {}, + "1763-Sur dettes de location acquisition / cr\u00e9dit-bail mobilier": {}, + "1764-Sur dettes de location acquisition / location-vente": {}, + "1768-Sur autres dettes de location acquisition": {} + }, + "178-Autres dettes de location acquisition": {} + }, + "18-Dettes li\u00e9es \u00e0 des participations et comptes de liaison des \u00e9tablissements et soci\u00e9t\u00e9s en participation": { + "181-Dettes li\u00e9es \u00e0 des participations": { + "1811-Dettes li\u00e9es \u00e0 des participations (groupe)": {}, + "1812-Dettes li\u00e9es \u00e0 des participations (hors groupe)": {} + }, + "182-Dettes li\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": {}, + "183-Int\u00e9r\u00eats courus sur dettes li\u00e9es \u00e0 des participations": {}, + "184-Comptes permanents bloqu\u00e9s des \u00e9tablissements et succursales": {}, + "185-Comptes permanents non bloqu\u00e9s des \u00e9tablissements et succursales": {}, + "186-Comptes de liaison charges": {}, + "187-Comptes de liaison produits": {}, + "188-Comptes de liaison des soci\u00e9t\u00e9s en participation": {} + }, + "19-Provisions pour risques et charges": { + "191-Provisions pour litiges": {}, + "192-Provisions pour garanties donn\u00e9es aux clients": {}, + "193-Provisions pour pertes sur march\u00e9s \u00e0 ach\u00e8vement futur": {}, + "194-Provisions pour pertes de change": {}, + "195-Provisions pour imp\u00f4ts": {}, + "196-Provisions pour pensions et obligations similaires": { + "1961-Provisions pour pensions et obligations similaires engagement de retraite": {}, + "1962-Actif du r\u00e9gime de retraite": {} + }, + "197-Provisions pour restructuration": {}, + "198-Autres provisions pour risques et charges": { + "1981-Provisions pour amendes et p\u00e9nalit\u00e9s": {}, + "1983-Provisions pour propre assureur": {}, + "1984-Provisions pour d\u00e9mant\u00e8lement et remise en \u00e9tat": {}, + "1985-Provisions pour droits \u00e0 r\u00e9duction ou avantage en nature (ch\u00e8ques cadeau, cartes de fid\u00e9lit\u00e9...)": {}, + "1988-Provisions pour divers risques et charges": {} + } + }, + "root_type": "Equity" + }, + "2-Comptes d\u2019actif immobilis\u00e9": { + "21-Immobilisations incorporelles": { + "account_type": "Fixed Asset", + "211-Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset" + }, + "212-Brevets, licences, concessions et droits similaires": { + "account_type": "Fixed Asset", + "2121-Brevets": { + "account_type": "Fixed Asset" + }, + "2122-Licences": { + "account_type": "Fixed Asset" + }, + "2123-Concessions de service public": { + "account_type": "Fixed Asset" + }, + "2128-Autres concessions et droits similaires": { + "account_type": "Fixed Asset" + } + }, + "213-Logiciels et sites internet": { + "account_type": "Fixed Asset", + "2131-Logiciels": { + "account_type": "Fixed Asset" + }, + "2132-Sites internet": { + "account_type": "Fixed Asset" + } + }, + "214-Marques": { + "account_type": "Fixed Asset" + }, + "215-Fonds commercial": { + "account_type": "Fixed Asset" + }, + "216-Droit au bail": { + "account_type": "Fixed Asset" + }, + "217-Investissements de cr\u00e9ation": { + "account_type": "Fixed Asset" + }, + "218-Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset", + "2181-Frais de prospection et d\u2019\u00e9valuation de ressources min\u00e9rales": { + "account_type": "Fixed Asset" + }, + "2182-Co\u00fbts d\u2019obtention du contrat": { + "account_type": "Fixed Asset" + }, + "2183-Fichiers clients, notices, titres de journaux et magazines": { + "account_type": "Fixed Asset" + }, + "2184-Co\u00fbts des franchises": { + "account_type": "Fixed Asset" + }, + "2188-Divers droits et valeurs incorporelles": { + "account_type": "Fixed Asset" + } + }, + "219-Immobilisations incorporelles en cours": { + "account_type": "Fixed Asset", + "2191-Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset" + }, + "2193-Logiciels et internet": { + "account_type": "Fixed Asset" + }, + "2198-Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset" + } + } + }, + "22-Terrains": { + "account_type": "Fixed Asset", + "221-Terrains agricoles et forestiers": { + "account_type": "Fixed Asset", + "2211-Terrains d\u2019exploitation agricole": { + "account_type": "Fixed Asset" + }, + "2212-Terrains d\u2019exploitation foresti\u00e8re": { + "account_type": "Fixed Asset" + }, + "2218-Autres terrains": { + "account_type": "Fixed Asset" + } + }, + "222-Terrains nus": { + "account_type": "Fixed Asset", + "2221-Terrains \u00e0 b\u00e2tir": { + "account_type": "Fixed Asset" + }, + "2228-Autres terrains nus": { + "account_type": "Fixed Asset" + } + }, + "223-Terrains b\u00e2tis": { + "account_type": "Fixed Asset", + "2231-Pour b\u00e2timents industriels et agricoles": { + "account_type": "Fixed Asset" + }, + "2232-Pour b\u00e2timents administratifs et commerciaux": { + "account_type": "Fixed Asset" + }, + "2234-Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations professionnelles": { + "account_type": "Fixed Asset" + }, + "2235-Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations non professionnelles": { + "account_type": "Fixed Asset" + }, + "2238-Autres terrains b\u00e2tis": { + "account_type": "Fixed Asset" + } + }, + "224-Travaux de mise en valeur des terrains": { + "account_type": "Fixed Asset", + "2241-Plantation d\u2019arbres et d\u2019arbustes": { + "account_type": "Fixed Asset" + }, + "2245-Am\u00e9liorations du fonds": { + "account_type": "Fixed Asset" + }, + "2248-Autres travaux": { + "account_type": "Fixed Asset" + } + }, + "225-Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset", + "2251-Carri\u00e8res": { + "account_type": "Fixed Asset" + } + }, + "226-Terrains am\u00e9nag\u00e9s": { + "account_type": "Fixed Asset", + "2261-Parkings": { + "account_type": "Fixed Asset" + } + }, + "227-Terrains mis en concession": { + "account_type": "Fixed Asset" + }, + "228-Autres terrains": { + "account_type": "Fixed Asset", + "2281-Terrains immeubles de placement": { + "account_type": "Fixed Asset" + }, + "2285-Terrains des logements affect\u00e9s au personnel": { + "account_type": "Fixed Asset" + }, + "2286-Terrains de location acquisition": { + "account_type": "Fixed Asset" + }, + "2288-Divers terrains": { + "account_type": "Fixed Asset" + } + }, + "229-Am\u00e9nagements de terrains en cours": { + "account_type": "Fixed Asset", + "2291-Terrains agricoles et forestiers": { + "account_type": "Fixed Asset" + }, + "2292-Terrains nus": { + "account_type": "Fixed Asset" + }, + "2295-Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset" + }, + "2298-Autres terrains": { + "account_type": "Fixed Asset" + } + } + }, + "23-B\u00e2timents, installations techniques et agencements": { + "231-B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "2311-B\u00e2timents industriels": {}, + "2312-B\u00e2timents agricoles": {}, + "2313-B\u00e2timents administratifs et commerciaux": {}, + "2314-B\u00e2timents affect\u00e9s au logement du personnel": {}, + "2315-B\u00e2timents immeubles de placement": {}, + "2316-B\u00e2timents de location acquisition": {} + }, + "232-B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "2321-B\u00e2timents industriels": {}, + "2322-B\u00e2timents agricoles": {}, + "2323-B\u00e2timents administratifs et commerciaux": {}, + "2324-B\u00e2timents affect\u00e9s au logement du personnel": {}, + "2325-B\u00e2timents immeubles de placement": {}, + "2326-B\u00e2timents de location acquisition": {} + }, + "233-Ouvrages d\u2019infrastructure": { + "2331-Voies de terre": {}, + "2332-Voies de fer": {}, + "2333-Voies d\u2019eau": {}, + "2334-Barrages, Digues": {}, + "2335-Pistes d\u2019a\u00e9rodrome": {}, + "2338-Autres ouvrages d\u2019infrastructures": {} + }, + "234-Am\u00e9nagements, agencements et installations techniques": { + "2341-Installations complexes sp\u00e9cialis\u00e9es sur sol propre": {}, + "2342-Installations complexes sp\u00e9cialis\u00e9es sur sol d\u2019autrui": {}, + "2343-Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol propre": {}, + "2344-Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol d\u2019autrui": {}, + "2345-Am\u00e9nagements et agencements des b\u00e2timents": {} + }, + "235-Am\u00e9nagements de bureaux": { + "2351-Installations g\u00e9n\u00e9rales": {}, + "2358-Autres am\u00e9nagements de bureaux": {} + }, + "237-B\u00e2timents industriels, agricoles et commerciaux mis en concession": {}, + "238-Autres installations et agencements": {}, + "239-B\u00e2timents am\u00e9nagements, agencements et installations en cours": { + "2391-B\u00e2timents en cours": {}, + "2392-Installations en cours": {}, + "2393-Ouvrages d\u2019infrastructure en cours": {}, + "2394-Am\u00e9nagements et agencements et installations techniques en cours": {}, + "2395-Am\u00e9nagements de bureaux en cours": {}, + "2398-Autres installations et agencements en cours": {} + } + }, + "24-Mat\u00e9riel, mobilier et actifs biologiques": { + "241-Mat\u00e9riel et outillage industriel et commercial": { + "2411-Mat\u00e9riel industriel": {}, + "2412-Outillage industriel": {}, + "2413-Mat\u00e9riel commercial": {}, + "2414-Outillage commercial": {}, + "2416-Mat\u00e9riel & outillage industriel et commercial de location-acquisition": {} + }, + "242-Mat\u00e9riel et outillage agricole": { + "2421-Mat\u00e9riel agricole": {}, + "2422-Outillage agricole": {}, + "2426-Mat\u00e9riel & outillage agricole de location-acquisition": {} + }, + "243-Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "244-Mat\u00e9riel et mobilier": { + "2441-Mat\u00e9riel de bureau": {}, + "2442-Mat\u00e9riel informatique": {}, + "2443-Mat\u00e9riel bureautique": {}, + "2444-Mobilier de bureau": {}, + "2445-Mat\u00e9riel et mobilier immeubles de placement": {}, + "2446-Mat\u00e9riel et mobilier de location acquisition": {}, + "2447-Mat\u00e9riel et mobilier des logements du personnel": {} + }, + "245-Mat\u00e9riel de transport": { + "2451-Mat\u00e9riel automobile": {}, + "2452-Mat\u00e9riel ferroviaire": {}, + "2453-Mat\u00e9riel fluvial, lagunaire": {}, + "2454-Mat\u00e9riel naval": {}, + "2455-Mat\u00e9riel a\u00e9rien": {}, + "2456-Mat\u00e9riel de transport de location-acquisition": {}, + "2457-Mat\u00e9riel hippomobile": {}, + "2458-Autres mat\u00e9riels de transport": {} + }, + "246-Actifs biologiques": { + "2461-Cheptel, animaux de trait": {}, + "2462-Cheptel, animaux reproducteurs": {}, + "2463-Animaux de garde": {}, + "2465-Plantations agricoles": {}, + "2468-Autres actifs biologiques": {} + }, + "247-Agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "2471-Agencements et am\u00e9nagements du mat\u00e9riel": {}, + "2472-Agencements et am\u00e9nagements des actifs biologiques": {}, + "2478-Autres agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": {} + }, + "248-Autres mat\u00e9riels et mobiliers": { + "2481-Collections et \u0153uvres d\u2019art": {}, + "2488-Divers mat\u00e9riels mobiliers": {} + }, + "249-Mat\u00e9riels et actifs biologiques en cours": { + "2491-Mat\u00e9riel et outillage industriel et commercial": {}, + "2492-Mat\u00e9riel et outillage agricole": {}, + "2493-Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "2494-Mat\u00e9riel et mobilier de bureau": {}, + "2495-Mat\u00e9riel de transport": {}, + "2496-Actifs biologiques": {}, + "2497-Agencements am\u00e9nagements du mat\u00e9riel et actifs biologiques": {}, + "2498-Autres mat\u00e9riels et actifs biologiques en cours": {} + } + }, + "25-Avances et acomptes vers\u00e9s sur immobilisations": { + "251-Avances et acomptes vers\u00e9s sur immobilisations incorporelles": {}, + "252-Avances et acomptes vers\u00e9s sur immobilisations corporelles": {} + }, + "26-Titres de participation": { + "261-Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": {}, + "262-Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le conjoint": {}, + "263-Titres de participation dans des soci\u00e9t\u00e9s conf\u00e9rant une influence notable": {}, + "265-Participations dans des organismes professionnels": {}, + "266-Parts dans des groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": {}, + "268-Autres titres de participation": {} + }, + "27-Autres immobilisations financi\u00e8res": { + "271-Pr\u00eats et cr\u00e9ances": { + "2711-Pr\u00eats participatifs": {}, + "2712-Pr\u00eats aux associ\u00e9s": {}, + "2713-Billets de fonds": {}, + "2714-Titres pr\u00eat\u00e9s": {}, + "2718-Autres pr\u00eats et cr\u00e9ances": {} + }, + "272-Pr\u00eats au personnel": { + "2721-Pr\u00eats immobiliers": {}, + "2722-Pr\u00eats mobiliers et d\u2019installation": {}, + "2728-Autres pr\u00eats au personnel": {} + }, + "273-Cr\u00e9ances sur l\u2019\u00c9tat": { + "2731-Retenues de garantie": {}, + "2733-Fonds r\u00e9glement\u00e9": {}, + "2734-Cr\u00e9ances sur le conc\u00e9dant": {}, + "2738-Autres cr\u00e9ances sur l\u2019\u00c9tat": {} + }, + "274-Titres immobilis\u00e9s": { + "2741-Titres immobilis\u00e9s de l\u2019activit\u00e9 de portefeuille (TIAP)": {}, + "2742-Titres participatifs": {}, + "2743-Certificats d\u2019investissement": {}, + "2744-Parts de fonds commun de placement (FCP)": {}, + "2745-Obligations": {}, + "2746-Actions ou parts propres": {}, + "2748-Autres titres immobilis\u00e9s": {} + }, + "275-D\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "2751-D\u00e9p\u00f4ts pour loyers d\u2019avance": {}, + "2752-D\u00e9p\u00f4ts pour l\u2019\u00e9lectricit\u00e9": {}, + "2753-D\u00e9p\u00f4ts pour l\u2019eau": {}, + "2754-D\u00e9p\u00f4ts pour le gaz": {}, + "2755-D\u00e9p\u00f4ts pour le t\u00e9l\u00e9phone, le t\u00e9lex, la t\u00e9l\u00e9copie": {}, + "2756-Cautionnements sur march\u00e9s publics": {}, + "2757-Cautionnements sur autres op\u00e9rations": {}, + "2758-Autres d\u00e9p\u00f4ts et cautionnements": {} + }, + "276-Int\u00e9r\u00eats courus": { + "2761-Pr\u00eats et cr\u00e9ances non commerciales": {}, + "2762-Pr\u00eats au personnel": {}, + "2763-Cr\u00e9ances sur l\u2019\u00c9tat": {}, + "2764-Titres immobilis\u00e9s": {}, + "2765-D\u00e9p\u00f4ts et cautionnements vers\u00e9s": {}, + "2767-Cr\u00e9ances rattach\u00e9es \u00e0 des participations": {}, + "2768-Immobilisations financi\u00e8res diverses": {} + }, + "277-Cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": { + "2771-Cr\u00e9ances rattach\u00e9es \u00e0 des participations (groupe)": {}, + "2772-Cr\u00e9ances rattach\u00e9es \u00e0 des participations (hors groupe)": {}, + "2773-Cr\u00e9ances rattach\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": {}, + "2774-Avances \u00e0 des Groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": {} + }, + "278-Immobilisations financi\u00e8res diverses": { + "2781-Cr\u00e9ances diverses groupe": {}, + "2782-Cr\u00e9ances diverses hors groupe": {}, + "2784-Banques d\u00e9p\u00f4ts \u00e0 terme": {}, + "2785-Or et m\u00e9taux pr\u00e9cieux": {}, + "2788-Autres immobilisations financi\u00e8res": {} + } + }, + "28-Amortissements": { + "account_type": "Accumulated Depreciation", + "281-Amortissements des immobilisations corporelles": { + "account_type": "Accumulated Depreciation", + "2811-Amortissements des frais de d\u00e9veloppement": { + "account_type": "Accumulated Depreciation" + }, + "2812-Amortissements des brevets, licences, concessions et droits similaires": { + "account_type": "Accumulated Depreciation" + }, + "2813-Amortissements des logiciels et sites internet": { + "account_type": "Accumulated Depreciation" + }, + "2814-Amortissements des marques": { + "account_type": "Accumulated Depreciation" + }, + "2815-Amortissements du fonds commercial": { + "account_type": "Accumulated Depreciation" + }, + "2816-Amortissements du droit au bail": { + "account_type": "Accumulated Depreciation" + }, + "2817-Amortissements des investissements de cr\u00e9ation": { + "account_type": "Accumulated Depreciation" + }, + "2818-Amortissements des autres droits et valeurs incorporels": { + "account_type": "Accumulated Depreciation" + } + }, + "282-Amortissements des terrains": { + "2824-Amortissements des travaux de mise en valeur des terrains": {} + }, + "283-Amortissements des b\u00e2timents, installations techniques et agencements": { + "2831-Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": {}, + "2832-Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": {}, + "2833-Amortissements des ouvrages d\u2019infrastructure": {}, + "2834-Amortissements des am\u00e9nagements, agencements et installations techniques": {}, + "2835-Amortissements des am\u00e9nagements de bureaux": {}, + "2837-Amortissements des b\u00e2timents industriels, agricoles et commerciaux mis en concession": {}, + "2838-Amortissements des autres installations et agencements": {} + }, + "284-Amortissements du mat\u00e9riel": { + "2841-Amortissements du mat\u00e9riel et outillage industriel et commercial": {}, + "2842-Amortissements du mat\u00e9riel et outillage agricole": {}, + "2843-Amortissements du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "2844-Amortissements du mat\u00e9riel et mobilier": {}, + "2845-Amortissements du mat\u00e9riel de transport": {}, + "2846-Amortissements des actifs biologiques": {}, + "2847-Amortissements des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": {}, + "2848-Amortissements des autres mat\u00e9riels": {} + } + }, + "29-D\u00e9pr\u00e9ciations des immobilisations": { + "291-D\u00e9pr\u00e9ciations des immobilisations incorporelles": { + "2911-D\u00e9pr\u00e9ciations des frais de d\u00e9veloppement": {}, + "2912-D\u00e9pr\u00e9ciations des brevets, licences, concessions et droits similaires": {}, + "2913-D\u00e9pr\u00e9ciations des logiciels et sites internet": {}, + "2914-D\u00e9pr\u00e9ciations des marques": {}, + "2915-D\u00e9pr\u00e9ciations du fonds commercial": {}, + "2916-D\u00e9pr\u00e9ciations du droit au bail": {}, + "2917-D\u00e9pr\u00e9ciations des investissements de cr\u00e9ation": {}, + "2918-D\u00e9pr\u00e9ciations des autres droits et valeurs incorporels": {}, + "2919-D\u00e9pr\u00e9ciations des immobilisations incorporelles en cours": {} + }, + "292-D\u00e9pr\u00e9ciations des terrains": { + "2921-D\u00e9pr\u00e9ciations des terrains agricoles et forestiers": {}, + "2922-D\u00e9pr\u00e9ciations des terrains nus": {}, + "2923-D\u00e9pr\u00e9ciations des terrains b\u00e2tis": {}, + "2924-D\u00e9pr\u00e9ciations des travaux de mise en valeur des terrains": {}, + "2925-D\u00e9pr\u00e9ciations des terrains de gisement": {}, + "2926-D\u00e9pr\u00e9ciations des terrains am\u00e9nag\u00e9s": {}, + "2927-D\u00e9pr\u00e9ciations des terrains mis en concession": {}, + "2928-D\u00e9pr\u00e9ciations des autres terrains": {}, + "2929-D\u00e9pr\u00e9ciations des am\u00e9nagements de terrains en cours": {} + }, + "293-D\u00e9pr\u00e9ciations des b\u00e2timents, installations techniques et agencements": { + "2931-D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": {}, + "2932-D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": {}, + "2933-D\u00e9pr\u00e9ciations des ouvrages d\u2019infrastructures": {}, + "2934-D\u00e9pr\u00e9ciations des am\u00e9nagements, agencements et installations techniques": {}, + "2935-D\u00e9pr\u00e9ciations des am\u00e9nagements de bureaux": {}, + "2937-D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles et commerciaux mis en concession": {}, + "2938-D\u00e9pr\u00e9ciations des autres installations et agencements": {}, + "2939-D\u00e9pr\u00e9ciations des b\u00e2timents et installations en cours": {} + }, + "294-D\u00e9pr\u00e9ciations de mat\u00e9riel, du mobilier et de l\u2019actif biologique": { + "2941-D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage industriel et commercial": {}, + "2942-D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage agricole": {}, + "2943-D\u00e9pr\u00e9ciations du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": {}, + "2944-D\u00e9pr\u00e9ciations du mat\u00e9riel et mobilier": {}, + "2945-D\u00e9pr\u00e9ciations du mat\u00e9riel de transport": {}, + "2946-D\u00e9pr\u00e9ciations des actifs biologiques": {}, + "2947-D\u00e9pr\u00e9ciations des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": {}, + "2948-D\u00e9pr\u00e9ciations des autres mat\u00e9riels": {}, + "2949-D\u00e9pr\u00e9ciations de mat\u00e9riel en cours": {} + }, + "295-D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations": { + "2951-D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations incorporelles": {}, + "2952-D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations corporelles": {} + }, + "296-D\u00e9pr\u00e9ciations des titres de participation": { + "2961-D\u00e9pr\u00e9ciations des titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": {}, + "2962-D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s sous contr\u00f4le conjoint": {}, + "2963-D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s conf\u00e9rant une influence notable": {}, + "2965-D\u00e9pr\u00e9ciations des participations dans des organismes professionnels": {}, + "2966-D\u00e9pr\u00e9ciations des parts dans des GIE": {}, + "2968-D\u00e9pr\u00e9ciations des autres titres de participation": {} + }, + "297-D\u00e9pr\u00e9ciations des autres immobilisations financi\u00e8res": { + "2971-D\u00e9pr\u00e9ciations des pr\u00eats et cr\u00e9ances": {}, + "2972-D\u00e9pr\u00e9ciations des pr\u00eats au personnel": {}, + "2973-D\u00e9pr\u00e9ciations des cr\u00e9ances sur l\u2019\u00c9tat": {}, + "2974-D\u00e9pr\u00e9ciations des titres immobilis\u00e9s": {}, + "2975-D\u00e9pr\u00e9ciations des d\u00e9p\u00f4ts et cautionnements vers\u00e9s": {}, + "2977-D\u00e9pr\u00e9ciations des cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": {}, + "2978-D\u00e9pr\u00e9ciations des cr\u00e9ances financi\u00e8res diverses": {} + } + }, + "root_type": "Asset" + }, + "3-Comptes de Stocks": { + "31-Marchandises": { + "311-Marchandises A": { + "3111-Marchandises A1": {}, + "3112-Marchandises A2": {} + }, + "312-Marchandises B": { + "3121-Marchandises B1": {}, + "3122-Marchandises B2": {} + }, + "313-Actifs biologiques": { + "3131-Animaux": {}, + "3132-V\u00e9g\u00e9taux": {} + }, + "318-Marchandises hors activit\u00e9s ordinaires (HAO)": {} + }, + "32-Mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "321-Mati\u00e8res A": {}, + "322-Mati\u00e8res B": {}, + "323-Fournitures (A, B)": {} + }, + "33-Autres approvisionnements": { + "331-Mati\u00e8res consommables": {}, + "332-Fournitures d\u2019atelier et d\u2019usine": {}, + "333-Fournitures de magasin": {}, + "334-Fournitures de bureau": {}, + "335-Emballages": { + "3351-Emballages perdus": {}, + "3352-Emballages r\u00e9cup\u00e9rables non identifiables": {}, + "3353-Emballages \u00e0 usage mixte": {}, + "3358-Autres emballages": {} + }, + "338-Autres mati\u00e8res": {} + }, + "34-Produits en cours": { + "341-Produits en cours": { + "3411-Produits en cours P1": {}, + "3412-Produits en cours P2": {} + }, + "342-Travaux en cours": { + "3421-Travaux en cours T1": {}, + "3422-Travaux en cours T2": {} + }, + "343-Produits interm\u00e9diaires en cours": { + "3431-Produits interm\u00e9diaires A": {}, + "3432-Produits interm\u00e9diaires B": {} + }, + "344-Produits r\u00e9siduels en cours": { + "3441-Produits r\u00e9siduels A": {}, + "3442-Produits r\u00e9siduels B": {} + }, + "345-Actifs biologiques en cours": { + "3451-Animaux": {}, + "3452-V\u00e9g\u00e9taux": {} + } + }, + "35-Services en cours": { + "351-\u00c9tudes en cours": { + "3511-\u00c9tudes en cours E1": {}, + "3512-\u00c9tudes en cours E2": {} + }, + "352-Prestations de services en cours": { + "3521-Prestations de services S1": {}, + "3522-Prestations de services S2": {} + } + }, + "36-Produits finis": { + "361-Produits finis A": {}, + "362-Produits finis B": {}, + "363-Actifs biologiques": { + "3631-Animaux": {}, + "3632-V\u00e9g\u00e9taux": {}, + "3638-Autres stocks (activit\u00e9s annexes)": {} + } + }, + "37-Produits interm\u00e9diaires et r\u00e9siduels": { + "371-Produits interm\u00e9diaires": { + "3711-Produits interm\u00e9diaires A": {}, + "3712-Produits interm\u00e9diaires B": {} + }, + "372-Produits r\u00e9siduels": { + "3721-D\u00e9chets": {}, + "3722-Rebuts": {}, + "3723-Mati\u00e8res de R\u00e9cup\u00e9ration": {} + }, + "373-Actifs biologiques": { + "3731-Animaux": {}, + "3732-V\u00e9g\u00e9taux": {}, + "3738-Autres stocks (activit\u00e9s annexes)": {} + } + }, + "38-Stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": { + "account_type": "Stock", + "381-Marchandises en cours de route": {}, + "382-Mati\u00e8res premi\u00e8res et fournitures li\u00e9es en cours de route": {}, + "383-Autres approvisionnements en cours de route": {}, + "386-Produits finis en cours de route": {}, + "387-Stock en consignation ou en d\u00e9p\u00f4t": { + "3871-Stock en consignation": {}, + "3872-Stock en d\u00e9p\u00f4t": {} + }, + "388-Stock provenant d\u2019immobilisations mises hors service ou au rebut": {} + }, + "39-D\u00e9pr\u00e9ciations des stocks et encours de production": { + "391-D\u00e9pr\u00e9ciations des stocks de marchandises": {}, + "392-D\u00e9pr\u00e9ciations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": {}, + "393-D\u00e9pr\u00e9ciations des stocks d\u2019autres approvisionnements": {}, + "394-D\u00e9pr\u00e9ciations des productions en cours": {}, + "395-D\u00e9pr\u00e9ciations des services en cours": {}, + "396-D\u00e9pr\u00e9ciations des stocks de produits finis": {}, + "397-D\u00e9pr\u00e9ciations des stocks de produits interm\u00e9diaires et r\u00e9siduels": {}, + "398-D\u00e9pr\u00e9ciations des stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": {} + }, + "root_type": "Asset" + }, + "4-Comptes de Tiers (ACTIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (ACTIF)": { + "409-Fournisseurs d\u00e9biteurs": { + "4091-Fournisseurs Avances et acomptes vers\u00e9s": {}, + "4092-Fournisseurs Groupe avances et acomptes vers\u00e9s": {}, + "4093-Fournisseurs Sous-traitants avances et acomptes vers\u00e9s": {}, + "4094-Fournisseurs Cr\u00e9ances pour emballages et mat\u00e9riels \u00e0 rendre": {}, + "4098-Fournisseurs Rabais, remises, ristournes et autres avoirs \u00e0 obtenir": {} + } + }, + "41-Clients et comptes rattach\u00e9s (ACTIF)": { + "411-Clients": { + "4111-Clients": { + "account_type": "Receivable" + }, + "4112-Clients groupe": { + "account_type": "Receivable" + }, + "4114-Clients, \u00c9tat et Collectivit\u00e9s publiques": { + "account_type": "Receivable" + }, + "4115-Clients, organismes internationaux": { + "account_type": "Receivable" + }, + "4116-Clients, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Receivable" + }, + "4117-Client, retenues de garantie": { + "account_type": "Receivable" + }, + "4118-Clients, d\u00e9gr\u00e8vement de taxes sur la valeur ajout\u00e9e (TVA)": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "412-Clients, effets \u00e0 recevoir en portefeuille": { + "4121-Clients, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "4122-Clients Groupe, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "4124-\u00c9tat et Collectivit\u00e9s publiques, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "4125-Organismes Internationaux, effets \u00e0 recevoir": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "413-Clients, ch\u00e8ques, effets et autres valeurs impay\u00e9es": { + "4131-Clients, ch\u00e8ques impay\u00e9s": { + "account_type": "Receivable" + }, + "4132-Clients, effets impay\u00e9s": { + "account_type": "Receivable" + }, + "4133-Clients, cartes de cr\u00e9dit impay\u00e9es": { + "account_type": "Receivable" + }, + "4138-Clients, autres valeurs impay\u00e9es": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "414-Cr\u00e9ances sur cessions courantes d\u2019immobilisations": { + "4141-Cr\u00e9ances en compte, immobilisations incorporelles": { + "account_type": "Receivable" + }, + "4142-Cr\u00e9ances en compte, immobilisations corporelles": { + "account_type": "Receivable" + }, + "4146-Effets \u00e0 recevoir, immobilisations incorporelles": { + "account_type": "Receivable" + }, + "4147-Effets \u00e0 recevoir, immobilisations corporelles": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "415-Clients, effets escompt\u00e9s non \u00e9chus": { + "account_type": "Receivable" + }, + "416-Cr\u00e9ances clients litigieuses ou douteuses": { + "4161-Cr\u00e9ances litigieuses": { + "account_type": "Receivable" + }, + "4162-Cr\u00e9ances douteuses": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "418-Clients, produits \u00e0 recevoir": { + "4181-Clients, factures \u00e0 \u00e9tablir": { + "account_type": "Receivable" + }, + "4186-Clients, int\u00e9r\u00eats courus": { + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "account_type": "Receivable" + }, + "42-Personnel (ACTIF)": { + "421-Personnel, avances et acomptes": { + "4211-Personnel, avances": {}, + "4212-Personnel, acomptes": {}, + "4213-Frais avanc\u00e9s et fournitures au personnel": {} + } + }, + "43-Organismes sociaux (ACTIF)": { + "431-S\u00e9curit\u00e9 sociale": { + "4311-Prestations familiales": {}, + "4312-Accidents de travail": {}, + "4313-Caisse de retraite obligatoire": {}, + "4314-Caisse de retraite facultative": {}, + "4318-Autres cotisations sociales": {} + }, + "432-Caisses de retraite compl\u00e9mentaire": {}, + "433-Autres organismes sociaux": { + "4331-Mutuelle": {}, + "4332-Assurances retraite": {}, + "4333-Assurances et organismes de sant\u00e9": {} + }, + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "4387-Produits \u00e0 recevoir": {} + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (ACTIF)": { + "443-\u00c9tat, TVA factur\u00e9e": { + "4431-TVA factur\u00e9e sur ventes": {}, + "4432-TVA factur\u00e9e sur prestations de services": {}, + "4433-TVA factur\u00e9e sur travaux": {}, + "4434-TVA factur\u00e9e sur production livr\u00e9e \u00e0 soi-m\u00eame": {}, + "4435-TVA sur factures \u00e0 \u00e9tablir": {} + }, + "445-\u00c9tat, TVA r\u00e9cup\u00e9rable": { + "4451-TVA r\u00e9cup\u00e9rable sur immobilisations": {}, + "4452-TVA r\u00e9cup\u00e9rable sur achats": {}, + "4453-TVA r\u00e9cup\u00e9rable sur transport": {}, + "4454-TVA r\u00e9cup\u00e9rable sur services ext\u00e9rieurs et autres charges": {}, + "4455-TVA r\u00e9cup\u00e9rable sur factures non parvenues": {}, + "4456-TVA transf\u00e9r\u00e9e par d\u2019autres entit\u00e9s": {} + }, + "448-\u00c9tat, charges \u00e0 payer et produits \u00e0 recevoir": { + "4486-Charges \u00e0 payer": {}, + "4487-Produits \u00e0 recevoir": {} + }, + "449-\u00c9tat, cr\u00e9ances et dettes diverses": { + "4491-\u00c9tat, obligations cautionn\u00e9es": {}, + "4492-\u00c9tat, avances et acomptes vers\u00e9s sur imp\u00f4ts": {}, + "4493-\u00c9tat, fonds de dotation \u00e0 recevoir": {}, + "4494-\u00c9tat, subventions investissement \u00e0 recevoir": {}, + "4495-\u00c9tat, subventions d\u2019exploitation \u00e0 recevoir": {}, + "4496-\u00c9tat, subventions d\u2019\u00e9quilibre \u00e0 recevoir": {}, + "4497-\u00c9tat, avances sur subventions": {}, + "4499-\u00c9tat, fonds r\u00e9glement\u00e9s provisionn\u00e9s": {} + } + }, + "45-Organismes internationaux (ACTIF)": { + "451-Op\u00e9rations avec les organismes africains": {}, + "452-Op\u00e9rations avec les autres organismes internationaux": {}, + "458-Organismes internationaux, fonds de dotation et subventions \u00e0 recevoir": { + "4581-Organismes internationaux, fonds de dotation \u00e0 recevoir": {}, + "4582-Organismes internationaux, subventions \u00e0 recevoir": {} + } + }, + "46-Apporteurs, associ\u00e9s et groupe (ACTIF)": { + "461-Apporteurs, op\u00e9rations sur le capital": { + "4613-Apporteurs, capital appel\u00e9, non vers\u00e9": {}, + "4614-Apporteurs, compte d\u2019apport, op\u00e9rations de restructuration (fusion...)": {}, + "4618-Apporteurs, titres \u00e0 \u00e9changer": {} + }, + "467-Apporteurs, restant d\u00fb sur capital appel\u00e9": {} + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (ACTIF)": { + "472-Cr\u00e9ances et dettes sur titres de placement": { + "4721-Cr\u00e9ances sur cessions de titres de placement": {}, + "4726-Versements restant \u00e0 effectuer sur titres de placement non lib\u00e9r\u00e9s": {} + }, + "473-Interm\u00e9diaires Op\u00e9rations faites pour compte de tiers": { + "4731-Mandants": {}, + "4732-Mandataires": {}, + "4733-Commettants": {}, + "4734-Commissionnaires": {}, + "4739-\u00c9tat, Collectivit\u00e9s publiques, fonds global d\u2019allocation": {} + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits": { + "4747-Compte de r\u00e9partition p\u00e9riodique des produits": {} + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA": { + "4751-Compte actif": { + "account_type": "Temporary" + } + }, + "476-Charges constat\u00e9es d\u2019avance": {}, + "478-\u00c9carts de conversion actif": { + "4781-Diminution des cr\u00e9ances d\u2019exploitation": {}, + "4782-Diminution des cr\u00e9ances financi\u00e8res": {}, + "4783-Augmentation des dettes d\u2019exploitation": {}, + "4784-Augmentation des dettes financi\u00e8res": {}, + "4786-Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": {}, + "4788-Diff\u00e9rences compens\u00e9es par couverture de change": {} + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (ACTIF)": { + "485-Cr\u00e9ances sur cessions d\u2019immobilisations": { + "4851-En compte, immobilisations incorporelles": {}, + "4852-En compte, immobilisations corporelles": {}, + "4853-Effets \u00e0 recevoir, immobilisations incorporelles": {}, + "4854-Effets \u00e0 recevoir, immobilisations corporelles": {}, + "4855-Effets escompt\u00e9s non \u00e9chus": {}, + "4857-Retenues de garantie": {}, + "4858-Factures \u00e0 \u00e9tablir": {} + }, + "488-Autres cr\u00e9ances hors activit\u00e9s ordinaires (HAO)": {} + }, + "49-D\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme (tiers) (ACTIF)": { + "491-D\u00e9pr\u00e9ciations des comptes clients": { + "4911-Cr\u00e9ances litigieuses": {}, + "4912-Cr\u00e9ances douteuses": {} + }, + "495-D\u00e9pr\u00e9ciations des comptes organismes internationaux": {}, + "496-D\u00e9pr\u00e9ciations des comptes apporteurs, associ\u00e9s et groupe": { + "4962-Associ\u00e9s, comptes courants": {}, + "4963-Associ\u00e9s, op\u00e9rations faites en commun": {}, + "4966-Groupe, comptes courants": {} + }, + "497-D\u00e9pr\u00e9ciations des comptes d\u00e9biteurs divers": {}, + "498-D\u00e9pr\u00e9ciations des comptes de cr\u00e9ances HAO": { + "4985-Cr\u00e9ances sur cessions d\u2019immobilisations": {}, + "4986-Cr\u00e9ances sur cessions de titres de placement": {}, + "4988-Autres cr\u00e9ances HAO": {} + }, + "499-Provisions pour risques \u00e0 court terme": { + "4991-Sur op\u00e9rations d\u2019exploitation": {}, + "4997-Sur op\u00e9rations financi\u00e8res": {}, + "4998-Sur op\u00e9rations HAO": {} + } + }, + "root_type": "Asset" + }, + "4-Comptes de Tiers (PASSIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (PASSIF)": { + "401-Fournisseurs, dettes en compte": { + "4011-Fournisseurs": { + "account_type": "Payable" + }, + "4012-Fournisseurs groupe": { + "account_type": "Payable" + }, + "4013-Fournisseurs sous-traitants": { + "account_type": "Payable" + }, + "4016-Fournisseurs, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Payable" + }, + "4017-Fournisseur, retenues de garantie": { + "account_type": "Payable" + }, + "account_type": "Payable" + }, + "402-Fournisseurs, effets \u00e0 payer": { + "4021-Fournisseurs Effets \u00e0 payer": { + "account_type": "Payable" + }, + "4022-Fournisseurs Groupe, effets \u00e0 payer": { + "account_type": "Payable" + }, + "4023-Fournisseurs Sous-traitants, effets \u00e0 payer": { + "account_type": "Payable" + }, + "account_type": "Payable" + }, + "404-Fournisseurs, acquisitions courantes d\u2019immobilisations": { + "4041-Fournisseurs Dettes en comptes, immobilisations incorporelles": { + "account_type": "Payable" + }, + "4042-Fournisseurs Dettes en comptes, immobilisations corporelles": { + "account_type": "Payable" + }, + "4046-Fournisseurs Effets \u00e0 payer, immobilisations incorporelles": { + "account_type": "Payable" + }, + "4047-Fournisseurs Effets \u00e0 payer, immobilisations corporelles": { + "account_type": "Payable" + }, + "account_type": "Payable" + }, + "408-Fournisseurs, factures non parvenues": { + "4081-Fournisseurs": { + "account_type": "Stock Received But Not Billed" + }, + "4082-Fournisseurs groupe": { + "account_type": "Stock Received But Not Billed" + }, + "4083-Fournisseurs sous-traitants": { + "account_type": "Stock Received But Not Billed" + }, + "4086-Fournisseurs, int\u00e9r\u00eats courus": { + "account_type": "Stock Received But Not Billed" + }, + "account_type": "Stock Received But Not Billed" + }, + "account_type": "Payable" + }, + "41-Clients et comptes rattach\u00e9s (PASSIF)": { + "419-Clients cr\u00e9diteurs": { + "4191-Clients, avances et acomptes re\u00e7us": {}, + "4192-Clients groupe, avances et acomptes re\u00e7us": {}, + "4194-Clients, dettes pour emballages et mat\u00e9riels consign\u00e9s": {}, + "4198-Clients, rabais, remises, ristournes et autres avoirs \u00e0 accorder": {} + } + }, + "42-Personnel (PASSIF)": { + "422-Personnel, r\u00e9mun\u00e9rations dues": {}, + "423-Personnel, oppositions, saisies-arr\u00eats": { + "4231-Personnel, oppositions": {}, + "4232-Personnel, saisies-arr\u00eats": {}, + "4233-Personnel, avis \u00e0 tiers d\u00e9tenteur": {} + }, + "424-Personnel, \u0153uvres sociales internes": { + "4241-Assistance m\u00e9dicale": {}, + "4242-Allocations familiales": {}, + "4245-Organismes sociaux rattach\u00e9s \u00e0 l\u2019entit\u00e9": {}, + "4248-Autres \u0153uvres sociales internes": {} + }, + "425-Repr\u00e9sentants du personnel": { + "4251-D\u00e9l\u00e9gu\u00e9s du personnel": {}, + "4252-Syndicats et Comit\u00e9s d\u2019entreprises, d\u2019\u00c9tablissement": {}, + "4258-Autres repr\u00e9sentants du personnel": {} + }, + "426-Personnel, participation aux b\u00e9n\u00e9fices et au capital": { + "4261-Participation aux b\u00e9n\u00e9fices": {}, + "4264-Participation au capital": {} + }, + "427-Personnel d\u00e9p\u00f4ts": {}, + "428-Personnel, charges \u00e0 payer et produits \u00e0 recevoir": { + "4281-Dettes provisionn\u00e9es pour cong\u00e9s \u00e0 payer": {}, + "4286-Autres charges \u00e0 payer": {}, + "4287-Produits \u00e0 recevoir": {} + } + }, + "43-Organismes sociaux (PASSIF)": { + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "4381-Charges sociales sur gratifications \u00e0 payer": {}, + "4382-Charges sociales sur cong\u00e9s \u00e0 payer": {}, + "4386-Autres charges \u00e0 payer": {} + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (PASSIF)": { + "441-\u00c9tat, imp\u00f4t sur les b\u00e9n\u00e9fices": {}, + "442-\u00c9tat, autres imp\u00f4ts et taxes": { + "4421-Imp\u00f4ts et taxes d\u2019\u00c9tat": {}, + "4422-Imp\u00f4ts et taxes pour les collectivit\u00e9s publiques": {}, + "4423-Imp\u00f4ts et taxes recouvrables sur des obligataires": {}, + "4424-Imp\u00f4ts et taxes recouvrables sur des associ\u00e9s": {}, + "4426-Droits de douane": {}, + "4428-Autres imp\u00f4ts et taxes": {} + }, + "444-\u00c9tat, TVA due ou cr\u00e9dit de TVA": { + "4441-\u00c9tat, TVA due": {}, + "4449-\u00c9tat, cr\u00e9dit de TVA \u00e0 reporter": {} + }, + "446-\u00c9tat, autres taxes sur le chiffre d\u2019affaires": {}, + "447-\u00c9tat, imp\u00f4ts retenus \u00e0 la source": { + "4471-Imp\u00f4t G\u00e9n\u00e9ral sur le revenu": {}, + "4472-Imp\u00f4ts sur salaires": {}, + "4473-Contribution nationale": {}, + "4474-Contribution nationale de solidarit\u00e9": {}, + "4478-Autres imp\u00f4ts et contributions": {} + } + }, + "46-Apporteurs, associ\u00e9s et groupe (PASSIF)": { + "461-Apporteurs, op\u00e9rations sur le capital (PASSIF)": { + "4611-Apporteurs, apports en nature": {}, + "4612-Apporteurs, apports en num\u00e9raire": {}, + "4615-Apporteurs, versements re\u00e7us sur augmentation de capital": {}, + "4616-Apporteurs, versements anticip\u00e9s": {}, + "4617-Apporteurs d\u00e9faillants": {}, + "4619-Apporteurs, capital \u00e0 rembourser": {} + }, + "462-Associ\u00e9s, comptes courants": { + "4621-Principal": {}, + "4626-Int\u00e9r\u00eats courus": {} + }, + "463-Associ\u00e9s, op\u00e9rations faites en commun et GIE": { + "4631-Op\u00e9rations courantes": {}, + "4636-Int\u00e9r\u00eats courus": {} + }, + "465-Associ\u00e9s, dividendes \u00e0 payer": {}, + "466-Groupe, comptes courants": {} + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (PASSIF)": { + "471-D\u00e9biteurs et cr\u00e9diteurs divers": { + "4711-D\u00e9biteurs divers": {}, + "4712-Cr\u00e9diteurs divers": {}, + "4713-Obligataires": {}, + "4715-R\u00e9mun\u00e9rations d\u2019administrateurs": {}, + "4716-Compte d\u2019affacturage": {}, + "4717-D\u00e9biteurs divers retenues de garantie": {}, + "4718-Apport, compte de fusion et op\u00e9rations assimil\u00e9es": {}, + "4719-Bons de souscription d\u2019actions et d\u2019obligations": {} + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits (PASSIF)": { + "4746-Compte de r\u00e9partition p\u00e9riodique des charges": {} + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA (PASSIF)": { + "4752-Compte passif": {} + }, + "477-Produits constat\u00e9s d\u2019avance": {}, + "479-\u00c9carts de conversion passif": { + "4791-Augmentation des cr\u00e9ances d\u2019exploitation": {}, + "4792-Augmentation des cr\u00e9ances financi\u00e8res": {}, + "4793-Diminution des dettes d\u2019exploitation": {}, + "4794-Diminution des dettes financi\u00e8res": {}, + "4797-Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": {}, + "4798-Diff\u00e9rences compens\u00e9es par couverture de change": {} + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (HAO) (PASSIF)": { + "481-Fournisseurs d\u2019investissements": { + "4811-Immobilisations incorporelles": {}, + "4812-Immobilisations corporelles": {}, + "4813-Versements restant \u00e0 effectuer sur titres de participation et titres immobilis\u00e9s non lib\u00e9r\u00e9s": {}, + "4816-R\u00e9serve de propri\u00e9t\u00e9": {}, + "4817-Retenues de garantie": {}, + "4818-Factures non parvenues": {} + }, + "482-Fournisseurs d\u2019investissements, effets \u00e0 payer": { + "4821-Immobilisations incorporelles": {}, + "4822-Immobilisations corporelles": {} + }, + "484-Autres dettes hors activit\u00e9s ordinaires (HAO)": { + "4887-Produits": {} + } + }, + "49-D\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme (tiers) (PASSIF)": { + "490-D\u00e9pr\u00e9ciations des comptes fournisseurs": {}, + "492-D\u00e9pr\u00e9ciations des comptes personnel": {}, + "493-D\u00e9pr\u00e9ciations des comptes organismes sociaux": {}, + "494-D\u00e9pr\u00e9ciations des comptes \u00c9tat et collectivit\u00e9s publiques": {}, + "495-D\u00e9pr\u00e9ciations des comptes organismes internationaux": {} + }, + "root_type": "Liability" + }, + "5-Comptes de tr\u00e9sorerie": { + "50-Titres de placement": { + "501-Titres du tr\u00e9sor et bons de caisse \u00e0 court terme": { + "5011-Titres du Tr\u00e9sor \u00e0 court terme": {}, + "5012-Titres d\u2019organismes financiers": {}, + "5013-Bons de caisse \u00e0 court terme": {}, + "5016-Frais d\u2019acquisition des titres de tr\u00e9sor et bons de caisse": {} + }, + "502-Actions": { + "5021-Actions ou parts propres": {}, + "5022-Actions cot\u00e9es": {}, + "5023-Actions non cot\u00e9es": {}, + "5024-Actions d\u00e9membr\u00e9es (certificats d\u2019investissement, droits de vote)": {}, + "5025-Autres actions": {}, + "5026-Frais d\u2019acquisition des actions": {} + }, + "503-Obligations": { + "5031-Obligations \u00e9mises par la soci\u00e9t\u00e9 et rachet\u00e9es par elle": {}, + "5032-Obligations cot\u00e9es": {}, + "5033-Obligations non cot\u00e9es": {}, + "5035-Autres obligations": {}, + "5036-Frais d\u2019acquisition des obligations": {} + }, + "504-Bons de souscription": { + "5042-Bons de souscription d\u2019actions": {}, + "5043-Bons de souscription d\u2019obligations": {} + }, + "505-Titres n\u00e9gociables hors r\u00e9gion": {}, + "506-Int\u00e9r\u00eats courus": { + "5061-Titres du Tr\u00e9sor et bons de caisse \u00e0 court terme": {}, + "5062-Actions": {}, + "5063-Obligations": {} + }, + "508-Autres titres de placement et cr\u00e9ances assimil\u00e9es": {} + }, + "51-Valeurs \u00e0 encaisser": { + "511-Effets \u00e0 encaisser": {}, + "512-Effets \u00e0 l\u2019encaissement": {}, + "513-Ch\u00e8ques \u00e0 encaisser": {}, + "514-Ch\u00e8ques \u00e0 l\u2019encaissement": {}, + "515-Cartes de cr\u00e9dit \u00e0 encaisser": {}, + "518-Autres valeurs \u00e0 l\u2019encaissement": { + "5181-Warrants": {}, + "5182-Billets de fonds": {}, + "5185-Ch\u00e8ques de voyage": {}, + "5186-Coupons \u00e9chus": {}, + "5187-Int\u00e9r\u00eats \u00e9chus des obligations": {} + } + }, + "52-Banques": { + "521-Banques locales": { + "5211-Banques en monnaie nationale": { + "account_type": "Bank" + }, + "5215-Banques en devises": { + "account_type": "Bank" + }, + "account_type": "Bank" + }, + "522-Banques autres \u00c9tats r\u00e9gion": {}, + "523-Banques autres \u00c9tats zone mon\u00e9taire": {}, + "524-Banques hors zone mon\u00e9taire": {}, + "525-Banques d\u00e9p\u00f4t \u00e0 terme": {}, + "526-Banques, int\u00e9r\u00eats courus": { + "5261-Banque, int\u00e9r\u00eats courus, charges \u00e0 payer": {}, + "5267-Banque, int\u00e9r\u00eats courus, produits \u00e0 recevoir": {} + } + }, + "53-\u00c9tablissements financiers et assimil\u00e9s": { + "531-Ch\u00e8ques postaux": {}, + "532-Tr\u00e9sor": {}, + "533-Soci\u00e9t\u00e9s de gestion et d\u2019interm\u00e9diation (SGI)": {}, + "536-\u00c9tablissements financiers, int\u00e9r\u00eats courus": {}, + "538-Autres organismes financiers": {} + }, + "54-Instruments de tr\u00e9sorerie": { + "541-Options de taux d\u2019int\u00e9r\u00eat": {}, + "542-Options de taux de change": {}, + "543-Options de taux boursiers": {}, + "544-Instruments de march\u00e9s \u00e0 terme": {}, + "545-Avoirs d\u2019or et autres m\u00e9taux pr\u00e9cieux": {} + }, + "55-Instruments de monnaie \u00e9lectronique": { + "551-Monnaie \u00e9lectronique carte carburant": {}, + "552-Monnaie \u00e9lectronique t\u00e9l\u00e9phone portable": {}, + "553-Monnaie \u00e9lectronique carte p\u00e9age": {}, + "554-Porte-monnaie \u00e9lectronique": {}, + "558-Autres instruments de monnaies \u00e9lectroniques": {} + }, + "56-Banques, cr\u00e9dits de tr\u00e9sorerie et d\u2019escompte": { + "561-Cr\u00e9dits de tr\u00e9sorerie": {}, + "564-Escompte de cr\u00e9dits de campagne": {}, + "565-Escompte de cr\u00e9dits ordinaires": {}, + "566-Banques, cr\u00e9dits de tr\u00e9sorerie, int\u00e9r\u00eats courus": {} + }, + "57-Caisse": { + "571-Caisse si\u00e8ge social": { + "5711-Caisse en monnaie nationale": {}, + "5712-Caisse en devises": {} + }, + "572-Caisse succursale A": { + "5721-En monnaie nationale": {}, + "5722-En devises": {} + }, + "573-Caisse succursale B": { + "5731-En monnaie nationale": {}, + "5732-En devises": {} + } + }, + "58-R\u00e9gies d\u2019avances, accr\u00e9ditifs et virements internes": { + "581-R\u00e9gies d\u2019avance": {}, + "582-Accr\u00e9ditifs": {}, + "585-Virements de fonds": {}, + "588-Autres virements internes": {} + }, + "59-D\u00e9pr\u00e9ciations et provisions pour risque \u00e0 court terme": { + "590-D\u00e9pr\u00e9ciations des titres de placement": {}, + "591-D\u00e9pr\u00e9ciations des titres et valeurs \u00e0 encaisser": {}, + "592-D\u00e9pr\u00e9ciations des comptes banques": {}, + "593-D\u00e9pr\u00e9ciations des comptes \u00e9tablissements financiers et assimil\u00e9s": {}, + "594-D\u00e9pr\u00e9ciations des comptes d\u2019instruments de tr\u00e9sorerie": {}, + "599-Provisions pour risque \u00e0 court terme \u00e0 caract\u00e8re financier": {} + }, + "root_type": "Asset" + }, + "6-Comptes de charges des activit\u00e9s ordinaires": { + "60-Achats et variations de stocks": { + "601-Achats de marchandises": { + "6011-Dans la R\u00e9gion": {}, + "6012-Hors R\u00e9gion": {}, + "6013-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "6014-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "6015-Frais sur achats": {}, + "6019-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "602-Achats de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "6021-Dans la R\u00e9gion": {}, + "6022-Hors R\u00e9gion": {}, + "6023-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "6024-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "6025-Frais sur achats": {}, + "6029-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "603-Variations des stocks de biens achet\u00e9s": { + "6031-Variations des stocks de marchandises": {}, + "6032-Variations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": {}, + "6033-Variations des stocks d\u2019autres approvisionnements": {} + }, + "604-Achats stock\u00e9s de mati\u00e8res et fournitures consommables": { + "6041-Mati\u00e8res consommables": {}, + "6042-Mati\u00e8res combustibles": {}, + "6043-Produits d\u2019entretien": {}, + "6044-Fournitures d\u2019atelier et d\u2019usine": {}, + "6045-Frais sur achat": {}, + "6046-Fournitures de magasin": {}, + "6047-Fournitures de bureau": {}, + "6049-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "605-Autres achats": { + "6051-Fournitures non stockables Eau": {}, + "6052-Fournitures non stockables \u00c9lectricit\u00e9": {}, + "6053-Fournitures non stockables Autres \u00e9nergies": {}, + "6054-Fournitures d\u2019entretien non stockables": {}, + "6055-Fournitures de bureau non stockables": {}, + "6056-Achats de petit mat\u00e9riel et outillage": {}, + "6057-Achats d\u2019\u00e9tudes et prestations de services": {}, + "6058-Achats de travaux, mat\u00e9riels et \u00e9quipements": {}, + "6059-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + }, + "608-Achats d\u2019emballages": { + "6081-Emballages perdus": {}, + "6082-Emballages r\u00e9cup\u00e9rables non identifiables": {}, + "6083-Emballages \u00e0 usage mixte": {}, + "6085-Frais sur achats": {}, + "6089-Rabais, remises et ristournes obtenus (non ventil\u00e9s)": {} + } + }, + "61-Transports": { + "612-Transports sur ventes": {}, + "613-Transports pour le compte de tiers": {}, + "614-Transports du personnel": {}, + "616-Transports de plis": {}, + "618-Autres frais de transport": { + "6181-Voyages et d\u00e9placements": {}, + "6182-Transports entre \u00e9tablissements ou chantiers": {}, + "6183-Transports administratifs": {} + } + }, + "62-Services ext\u00e9rieurs": { + "621-Sous-traitance g\u00e9n\u00e9rale": {}, + "622-Locations, charges locatives": { + "6221-Locations de terrains": {}, + "6222-Locations de b\u00e2timents": {}, + "6223-Locations de mat\u00e9riels et outillages": {}, + "6224-Malis sur emballages": {}, + "6225-Locations d\u2019emballages": {}, + "6226-Fermages et loyers du foncier": {}, + "6228-Locations et charges locatives diverses": {} + }, + "623-Redevances de location acquisition": { + "6232-Cr\u00e9dit-bail immobilier": {}, + "6233-Cr\u00e9dit-bail mobilier": {}, + "6234-Location-vente": {}, + "6238-Autres contrats de location acquisition": {} + }, + "624-Entretien, r\u00e9parations, remise en \u00e9tat et maintenance": { + "6241-Entretien et r\u00e9parations des biens immobiliers": {}, + "6242-Entretien et r\u00e9parations des biens mobiliers": {}, + "6243-Maintenance": {}, + "6244-Charges de d\u00e9mant\u00e8lement et remise en \u00e9tat": {}, + "6248-Autres entretiens et r\u00e9parations": {} + }, + "625-Primes d\u2019assurance": { + "6251-Assurances multirisques": {}, + "6252-Assurances mat\u00e9riel de transport": {}, + "6253-Assurances risques d\u2019exploitation": {}, + "6254-Assurances responsabilit\u00e9 du producteur": {}, + "6255-Assurances insolvabilit\u00e9 clients": {}, + "6257-Assurances transport sur ventes": {}, + "6258-Autres primes d\u2019assurances": {} + }, + "626-\u00c9tudes, recherches et documentation": { + "6261-\u00c9tudes et recherches": {}, + "6265-Documentation g\u00e9n\u00e9rale": {}, + "6266-Documentation technique": {} + }, + "627-Publicit\u00e9, publications, relations publiques": { + "6271-Annonces, insertions": {}, + "6272-Catalogues, imprim\u00e9s publicitaires": {}, + "6273-\u00c9chantillons": {}, + "6274-Foires et expositions": {}, + "6275-Publications": {}, + "6276-Cadeaux \u00e0 la client\u00e8le": {}, + "6277-Frais de colloques, s\u00e9minaires, conf\u00e9rences": {}, + "6278-Autres charges de publicit\u00e9 et relations publiques": {} + }, + "628-Frais de t\u00e9l\u00e9communications": { + "6281-Frais de t\u00e9l\u00e9phone": {}, + "6282-Frais de t\u00e9lex": {}, + "6283-Frais de t\u00e9l\u00e9copie": {}, + "6288-Autres frais de t\u00e9l\u00e9communications": {} + } + }, + "63-Autres services ext\u00e9rieurs": { + "631-Frais bancaires": { + "6311-Frais sur titres (vente, garde)": {}, + "6312-Frais sur effets": {}, + "6313-Location de coffres": {}, + "6314-Commissions d\u2019affacturage": {}, + "6315-Commissions sur cartes de cr\u00e9dit": {}, + "6316-Frais d\u2019\u00e9mission d\u2019emprunts": {}, + "6317-Frais sur instruments monnaie \u00e9lectronique": {}, + "6318-Autres frais bancaires": {} + }, + "632-R\u00e9mun\u00e9rations d\u2019interm\u00e9diaires et de conseils": { + "6322-Commissions et courtages sur ventes": {}, + "6324-Honoraires des professions r\u00e9glement\u00e9es": {}, + "6325-Frais d\u2019actes et de contentieux": {}, + "6326-R\u00e9mun\u00e9rations d\u2019affacturage": {}, + "6327-R\u00e9mun\u00e9rations des autres prestataires de services": {}, + "6328-Divers frais": {} + }, + "633-Frais de formation du personnel": {}, + "634-Redevances pour brevets, licences, logiciels, concessions et droits et valeurs similaires": { + "6342-Redevances pour brevets, licences": {}, + "6343-Redevances pour logiciels": {}, + "6344-Redevances pour marques": {}, + "6345-Redevances pour sites internet": {}, + "6346-Redevances pour concessions, droits et valeurs similaires": {} + }, + "635-Cotisations": { + "6351-Cotisations": {}, + "6358-Concours divers": {} + }, + "637-R\u00e9mun\u00e9rations de personnel ext\u00e9rieur \u00e0 l\u2019entit\u00e9": { + "6371-Personnel int\u00e9rimaire": {}, + "6372-Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": {} + }, + "638-Autres charges externes": { + "6381-Frais de recrutement du personnel": {}, + "6382-Frais de d\u00e9m\u00e9nagement": {}, + "6383-R\u00e9ceptions": {}, + "6384-Missions": {}, + "6385-Charges de copropri\u00e9t\u00e9": {} + } + }, + "64-Imp\u00f4ts et taxes": { + "641-Imp\u00f4ts et taxes directs": { + "6411-Imp\u00f4ts fonciers et taxes annexes": {}, + "6412-Patentes, licences et taxes annexes": {}, + "6413-Taxes sur appointements et salaires": {}, + "6414-Taxes d\u2019apprentissage": {}, + "6415-Formation professionnelle continue": {}, + "6418-Autres imp\u00f4ts et taxes directs": {} + }, + "645-Imp\u00f4ts et taxes indirects": {}, + "646-Droits d\u2019enregistrement": { + "6461-Droits de mutation": {}, + "6462-Droits de timbre": {}, + "6463-Taxes sur les v\u00e9hicules de soci\u00e9t\u00e9": {}, + "6464-Vignettes": {}, + "6468-Autres droits": {} + }, + "647-P\u00e9nalit\u00e9s, amendes fiscales": { + "6471-P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts directs": {}, + "6472-P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts indirects": {}, + "6473-P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts directs": {}, + "6474-P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts indirects": {}, + "6478-Autres p\u00e9nalit\u00e9s et amendes fiscales": {} + }, + "648-Autres imp\u00f4ts et taxes": {} + }, + "65-Autres charges": { + "651-Pertes sur cr\u00e9ances clients et autres d\u00e9biteurs": { + "6511-Clients": {}, + "6515-Autres d\u00e9biteurs": {} + }, + "652-Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "6521-Quote-part transf\u00e9r\u00e9e de b\u00e9n\u00e9fices (comptabilit\u00e9 du g\u00e9rant)": {}, + "6525-Pertes imput\u00e9es par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": {} + }, + "654-Valeurs comptables des cessions courantes d\u2019immobilisations": { + "6541-Immobilisations incorporelles": {}, + "6542-Immobilisations corporelles": {} + }, + "656-Perte de change sur cr\u00e9ances et dettes commerciale": {}, + "657-P\u00e9nalit\u00e9s et amendes p\u00e9nales": {}, + "658-Charges diverses": { + "6581-Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": {}, + "6582-Dons": {}, + "6583-M\u00e9c\u00e9nat": {}, + "6588-Autres charges diverses": {} + }, + "659-Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "6591-Sur risques \u00e0 court terme": {}, + "6593-Sur stocks": {}, + "6594-Sur cr\u00e9ances": {}, + "6598-Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme": {} + } + }, + "66-Charges de personnel": { + "661-R\u00e9mun\u00e9rations directes vers\u00e9es au personnel national": { + "6611-Appointements salaires et commissions": {}, + "6612-Primes et gratifications": {}, + "6613-Cong\u00e9s pay\u00e9s": {}, + "6614-Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": {}, + "6615-Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": {}, + "6616-Suppl\u00e9ment familial": {}, + "6617-Avantages en nature": {}, + "6618-Autres r\u00e9mun\u00e9rations directes": {} + }, + "662-R\u00e9mun\u00e9rations directes vers\u00e9es au personnel non national": { + "6621-Appointements salaires et commissions": {}, + "6622-Primes et gratifications": {}, + "6623-Cong\u00e9s pay\u00e9s": {}, + "6624-Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": {}, + "6625-Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": {}, + "6626-Suppl\u00e9ment familial": {}, + "6627-Avantages en nature": {}, + "6628-Autres r\u00e9mun\u00e9rations directes": {} + }, + "663-Indemnit\u00e9s forfaitaires vers\u00e9es au personnel": { + "6631-Indemnit\u00e9s de logement": {}, + "6632-Indemnit\u00e9s de repr\u00e9sentation": {}, + "6633-Indemnit\u00e9s d\u2019expatriation": {}, + "6634-Indemnit\u00e9s de transport": {}, + "6638-Autres indemnit\u00e9s et avantages divers": {} + }, + "664-Charges sociales": { + "6641-Charges sociales sur r\u00e9mun\u00e9ration du personnel national": {}, + "6642-Charges sociales sur r\u00e9mun\u00e9ration du personnel non national": {} + }, + "666-R\u00e9mun\u00e9rations et charges sociales de l\u2019exploitant individuel": { + "6661-R\u00e9mun\u00e9ration du travail de l\u2019exploitant": {}, + "6662-Charges sociales": {} + }, + "667-R\u00e9mun\u00e9ration transf\u00e9r\u00e9e de personnel ext\u00e9rieur": { + "6671-Personnel int\u00e9rimaire": {}, + "6672-Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": {} + }, + "668-Autres charges sociales": { + "6681-Versements aux syndicats et comit\u00e9s d\u2019entreprise, d\u2019\u00e9tablissement": {}, + "6682-Versements aux comit\u00e9s d\u2019hygi\u00e8ne et de s\u00e9curit\u00e9": {}, + "6683-Versements et contributions aux autres \u0153uvres sociales": {}, + "6684-M\u00e9decine du travail et pharmacie": {}, + "6685-Assurances et organismes de sant\u00e9": {}, + "6686-Assurances retraite et fonds de pension": {}, + "6687-Majorations et p\u00e9nalit\u00e9s sociales": {}, + "6688-Charges sociales diverses": {} + } + }, + "67-Frais financiers et charges assimil\u00e9es": { + "671-Int\u00e9r\u00eats des emprunts": { + "6711-Emprunts obligataires": {}, + "6712-Emprunts aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": {}, + "6713-Dettes li\u00e9es \u00e0 des participations": {}, + "6714-Primes de remboursement des obligations": {} + }, + "672-Int\u00e9r\u00eats dans loyers de location acquisition": { + "6722-Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail immobilier": {}, + "6723-Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail mobilier": {}, + "6724-Int\u00e9r\u00eats dans loyers de location acquisition / location-vente": {}, + "6728-Int\u00e9r\u00eats dans loyers des autres locations acquisition": {} + }, + "673-Escomptes accord\u00e9s": {}, + "674-Autres int\u00e9r\u00eats": { + "6741-Avances re\u00e7ues et d\u00e9p\u00f4ts cr\u00e9diteurs": {}, + "6742-Comptes courants bloqu\u00e9s": {}, + "6743-Int\u00e9r\u00eats sur obligations cautionn\u00e9es": {}, + "6744-Int\u00e9r\u00eats sur dettes commerciales": {}, + "6745-Int\u00e9r\u00eats bancaires et sur op\u00e9rations de financement (escompte...)": {}, + "6748-Int\u00e9r\u00eats sur dettes diverses": {} + }, + "675-Escomptes des effets de commerce": {}, + "676-Pertes de change financi\u00e8res": {}, + "677-Pertes sur titres de placement": { + "6771-Pertes sur cessions de titres de placement": {}, + "6772-Mali provenant d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": {} + }, + "678-Pertes et charges sur risques financiers": { + "6781-Sur rentes viag\u00e8res": {}, + "6782-Sur op\u00e9rations financi\u00e8res": {}, + "6784-Sur instruments de tr\u00e9sorerie": {} + }, + "679-Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "6791-Sur risques financiers": {}, + "6795-Sur titres de placement": {}, + "6798-Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": {} + } + }, + "68-Dotations aux amortissements": { + "681-Dotations aux amortissements d\u2019exploitation": { + "6812-Dotations aux amortissements des immobilisations incorporelles": {}, + "6813-Dotations aux amortissements des immobilisations corporelles": {} + } + }, + "69-Dotations aux provisions et aux d\u00e9pr\u00e9ciations": { + "691-Dotations aux provisions et aux d\u00e9pr\u00e9ciations d\u2019exploitation": { + "6911-Dotations aux provisions pour risques et charges": {}, + "6913-Dotations aux d\u00e9pr\u00e9ciations des immobilisations incorporelles": {}, + "6914-Dotations aux d\u00e9pr\u00e9ciations des immobilisations corporelles": {} + }, + "697-Dotations aux provisions et aux d\u00e9pr\u00e9ciations financi\u00e8res": { + "6971-Dotations aux provisions pour risques et charges": {}, + "6972-Dotations aux d\u00e9pr\u00e9ciations des immobilisations financi\u00e8res": {} + } + }, + "root_type": "Expense" + }, + "7-Comptes de produits des activit\u00e9s ordinaires": { + "70-Ventes": { + "701-Ventes de marchandises": { + "7011-Dans la R\u00e9gion": {}, + "7012-Hors R\u00e9gion": {}, + "7013-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7014-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7015-Sur internet": {}, + "7019-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "702-Ventes de produits finis": { + "7021-Dans la R\u00e9gion": {}, + "7022-Hors R\u00e9gion": {}, + "7023-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7024-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7025-Sur internet": {}, + "7029-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "703-Ventes de produits interm\u00e9diaires": { + "7031-Dans la R\u00e9gion": {}, + "7032-Hors R\u00e9gion": {}, + "7033-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7034-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7035-Sur internet": {}, + "7039-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "704-Ventes de produits r\u00e9siduels": { + "7041-Dans la R\u00e9gion": {}, + "7042-Hors R\u00e9gion": {}, + "7043-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7044-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7045-Sur internet": {}, + "7049-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "705-Travaux factur\u00e9s": { + "7051-Dans la R\u00e9gion": {}, + "7052-Hors R\u00e9gion": {}, + "7053-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7054-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7055-Sur internet": {}, + "7059-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "706-Services vendus": { + "7061-Dans la R\u00e9gion": {}, + "7062-Hors R\u00e9gion": {}, + "7063-Aux entit\u00e9s du groupe dans la R\u00e9gion": {}, + "7064-Aux entit\u00e9s du groupe hors R\u00e9gion": {}, + "7065-Sur internet": {}, + "7069-Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": {} + }, + "707-Produits accessoires": { + "7071-Ports, emballages perdus et autres frais factur\u00e9s": {}, + "7072-Commissions et courtages": {}, + "7073-Locations": {}, + "7074-Bonis sur reprises et cessions d\u2019emballages": {}, + "7075-Mise \u00e0 disposition de personnel": {}, + "7076-Redevances pour brevets, logiciels, marques et droits similaires": {}, + "7077-Services exploit\u00e9s dans l\u2019int\u00e9r\u00eat du personnel": {}, + "7078-Autres produits accessoires": {} + } + }, + "71-Subventions d\u2019exploitation": { + "711-Sur produits \u00e0 l\u2019exportation": {}, + "712-Sur produits \u00e0 l\u2019importation": {}, + "713-Sur produits de p\u00e9r\u00e9quation": {}, + "714-Indemnit\u00e9s et subventions d\u2019exploitation (entit\u00e9 agricole)": {}, + "718-Autres subventions d\u2019exploitation": { + "7181-Vers\u00e9es par l\u2019\u00c9tat et les collectivit\u00e9s publiques": {}, + "7182-Vers\u00e9es par les organismes internationaux": {}, + "7183-Vers\u00e9es par des tiers": {} + } + }, + "72-Production immobilis\u00e9e": { + "721-Immobilisations incorporelles": {}, + "722-Immobilisations corporelles": { + "7221-Immobilisations corporelles (hors actifs biologiques)": {}, + "7222-Immobilisations corporelles (actifs biologiques)": {} + }, + "724-Production auto-consomm\u00e9e": {}, + "726-Immobilisations financi\u00e8res": {} + }, + "73-Variations des stocks de biens et de services produits": { + "734-Variations des stocks de produits en cours": { + "7341-Produits en cours": {}, + "7342-Travaux en cours": {} + }, + "735-Variations des en-cours de services": { + "7351-\u00c9tudes en cours": {}, + "7352-Prestations de services en cours": {} + }, + "736-Variations des stocks de produits finis": {}, + "737-Variations des stocks de produits interm\u00e9diaires et r\u00e9siduels": { + "7371-Produits interm\u00e9diaires": {}, + "7372-Produits r\u00e9siduels": {} + } + }, + "75-Autres produits": { + "751-Profits sur cr\u00e9ances clients et autres d\u00e9biteurs": {}, + "752-Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "7521-Quote-part transf\u00e9r\u00e9e de pertes (comptabilit\u00e9 du g\u00e9rant)": {}, + "7525-B\u00e9n\u00e9fices attribu\u00e9s par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": {} + }, + "754-Produits des cessions courantes d\u2019immobilisations": { + "7541-Immobilisations incorporelles": {}, + "7542-Immobilisations corporelles": {} + }, + "756-Gains de change sur cr\u00e9ances et dettes commerciales": {}, + "758-Produits divers": { + "7581-Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": {}, + "7582-Indemnit\u00e9s d\u2019assurances re\u00e7ues": {}, + "7588-Autres produits divers": {} + }, + "759-Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "7591-Sur risques \u00e0 court terme": {}, + "7593-Sur stocks": {}, + "7594-Sur cr\u00e9ances": {}, + "7598-Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": {} + } + }, + "77-Revenus financiers et produits assimil\u00e9s": { + "771-Int\u00e9r\u00eats de pr\u00eats et cr\u00e9ances diverses": { + "7712-Int\u00e9r\u00eats de pr\u00eats": {}, + "7713-Int\u00e9r\u00eats sur cr\u00e9ances diverses": {} + }, + "772-Revenus de participations et autres titres immobilis\u00e9s": { + "7721-Revenus des titres de participation": {}, + "7722-Revenus autres titres immobilis\u00e9s": {} + }, + "773-Escomptes obtenus": {}, + "774-Revenus de placement": { + "7745-Revenus des obligations": {}, + "7746-Revenus des titres de placement": {} + }, + "775-Int\u00e9r\u00eats dans loyers de location acquisition": {}, + "776-Gains de change financiers": {}, + "777-Gains sur cessions de titres de placement": {}, + "778-Gains sur risques financiers": { + "7781-Sur rentes viag\u00e8res": {}, + "7782-Sur op\u00e9rations financi\u00e8res": {}, + "7784-Sur instruments de tr\u00e9sorerie": {} + }, + "779-Reprises de charges pour d\u00e9pr\u00e9ciations et provisions \u00e0 court terme financi\u00e8res": { + "7791-Sur risques financiers": {}, + "7795-Sur titres de placement": {}, + "7798-Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": {} + } + }, + "78-Transferts de charges": { + "781-Transferts de charges d\u2019exploitation": {}, + "787-Transferts de charges financi\u00e8res": {} + }, + "79-Reprises de provisions, de d\u00e9pr\u00e9ciations et autres": { + "791-Reprises de provisions et d\u00e9pr\u00e9ciations d\u2019exploitation": { + "7911-Pour risques et charges": {}, + "7913-Des immobilisations incorporelles": {}, + "7914-Des immobilisations corporelles": {} + }, + "797-Reprises de provisions et d\u00e9pr\u00e9ciations financi\u00e8res": { + "7971-Pour risques et charges": {}, + "7972-Des immobilisations financi\u00e8res": {} + }, + "798-Reprises d\u2019amortissements": {}, + "799-Reprises de subventions d\u2019investissement": {} + }, + "root_type": "Income" + }, + "8-Comptes des autres charges et des autres produits (CHARGES)": { + "81-Valeurs comptables des cessions d\u2019immobilisations": { + "811-Immobilisations incorporelles": {}, + "812-Immobilisations corporelles": {}, + "816-Immobilisations financi\u00e8res": {} + }, + "83-Charges hors activit\u00e9s ordinaires": { + "831-Charges HAO constat\u00e9es": {}, + "833-Charges li\u00e9es aux op\u00e9rations de restructuration": {}, + "834-Pertes sur cr\u00e9ances HAO": {}, + "835-Dons et lib\u00e9ralit\u00e9s accord\u00e9s": {}, + "836-Abandons de cr\u00e9ances consentis": {}, + "837-Charges li\u00e9es aux op\u00e9rations de liquidation": {}, + "839-Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": {} + }, + "85-Dotations hors activit\u00e9s ordinaires": { + "851-Dotations aux provisions r\u00e9glement\u00e9es": {}, + "852-Dotations aux amortissements HAO": {}, + "853-Dotations aux d\u00e9pr\u00e9ciations HAO": {}, + "854-Dotations aux provisions pour risques et charges HAO": {}, + "858-Autres dotations HAO": {} + }, + "87-Participation des travailleurs": { + "871-Participation l\u00e9gale aux b\u00e9n\u00e9fices": {}, + "874-Participation contractuelle aux b\u00e9n\u00e9fices": {}, + "878-Autres participations": {} + }, + "89-Imp\u00f4ts sur le r\u00e9sultat": { + "891-Imp\u00f4ts sur les b\u00e9n\u00e9fices de l\u2019exercice": { + "8911-Activit\u00e9s exerc\u00e9es dans l\u2019\u00c9tat": {}, + "8912-Activit\u00e9s exerc\u00e9es dans les autres \u00c9tats de la R\u00e9gion": {}, + "8913-Activit\u00e9s exerc\u00e9es hors R\u00e9gion": {} + }, + "892-Rappel d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": {}, + "895-Imp\u00f4t minimum forfaitaire IMF": {}, + "899-D\u00e9gr\u00e8vements et annulations d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": { + "8991-D\u00e9gr\u00e8vements": {}, + "8994-Annulations pour pertes r\u00e9troactives": {} + } + }, + "root_type": "Expense" + }, + "8-Comptes des autres charges et des autres produits (PRODUITS)": { + "82-Produits des cessions d\u2019immobilisations": { + "821-Immobilisations incorporelles": {}, + "822-Immobilisations corporelles": {}, + "826-Immobilisations financi\u00e8res": {} + }, + "84-Produits hors activit\u00e9s ordinaires": { + "841-Produits HAO constat\u00e9s": {}, + "843-Produits li\u00e9s aux op\u00e9rations de restructuration": {}, + "844-Indemnit\u00e9s et subventions HAO (entit\u00e9 agricole)": {}, + "845-Dons et lib\u00e9ralit\u00e9s obtenus": {}, + "846-Abandons de cr\u00e9ances obtenus": {}, + "847-Produits li\u00e9s aux op\u00e9rations de liquidation": {}, + "848-Transferts de charges HAO": {}, + "849-Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": {} + }, + "86-Reprises de charges, provisions et d\u00e9pr\u00e9ciations HAO": { + "861-Reprises de provisions r\u00e9glement\u00e9es": {}, + "862-Reprises d\u2019amortissements HAO": {}, + "863-Reprises de d\u00e9pr\u00e9ciations HAO": {}, + "864-Reprises de provisions pour risques et charges HAO": {}, + "868-Autres reprises HAO": {} + }, + "88-Subventions d\u2019\u00e9quilibre": { + "881-\u00c9tat": {}, + "884-Collectivit\u00e9s publiques": {}, + "886-Groupe": {}, + "888-Autres": {} + }, + "root_type": "Income" + } + } +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/tg_plan_comptable_avec_code.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/tg_plan_comptable_avec_code.json new file mode 100644 index 00000000000..a797b971e1d --- /dev/null +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/tg_plan_comptable_avec_code.json @@ -0,0 +1,4208 @@ +{ + "country_code": "tg", + "name": "Syscohada - Plan Comptable avec code", + "tree": { + "Comptes de ressources durables": { + "Capital": { + "Capital social": { + "Capital souscrit, non appel\u00e9": { + "account_number": "1011" + }, + "Capital souscrit, appel\u00e9, non vers\u00e9": { + "account_number": "1012" + }, + "Capital souscrit, appel\u00e9, vers\u00e9, non amorti": { + "account_number": "1013" + }, + "Capital souscrit, appel\u00e9, vers\u00e9, amorti": { + "account_number": "1014" + }, + "Capital souscrit soumis \u00e0 des conditions particuli\u00e8res": { + "account_number": "1018" + }, + "account_number": "101" + }, + "Capital par dotation": { + "Dotation initiale": { + "account_number": "1021" + }, + "Dotations compl\u00e9mentaires": { + "account_number": "1022" + }, + "Autres dotations": { + "account_number": "1028" + }, + "account_number": "102" + }, + "Capital personnel": { + "account_number": "103" + }, + "Compte de l\u2019exploitant": { + "Apports temporaires": { + "account_number": "1041" + }, + "Op\u00e9rations courantes": { + "account_number": "1042" + }, + "R\u00e9mun\u00e9rations, imp\u00f4ts et autres charges personnelles": { + "account_number": "1043" + }, + "Pr\u00e9l\u00e8vements d\u2019autoconsommation": { + "account_number": "1047" + }, + "Autres pr\u00e9l\u00e8vements": { + "account_number": "1048" + }, + "account_number": "104" + }, + "Primes li\u00e9es au capital social": { + "Primes d\u2019\u00e9mission": { + "account_number": "1051" + }, + "Primes d\u2019apport": { + "account_number": "1052" + }, + "Primes de fusion": { + "account_number": "1053" + }, + "Primes de conversion": { + "account_number": "1054" + }, + "Autres primes": { + "account_number": "1058" + }, + "account_number": "105" + }, + "\u00c9carts de r\u00e9\u00e9valuation": { + "\u00c9carts de r\u00e9\u00e9valuation l\u00e9gale": { + "account_number": "1061" + }, + "\u00c9carts de r\u00e9\u00e9valuation libre": { + "account_number": "1062" + }, + "account_number": "106" + }, + "Apporteurs, capital souscrit, non appel\u00e9": { + "account_number": "109" + }, + "account_number": "10" + }, + "R\u00e9serves": { + "R\u00e9serve l\u00e9gale": { + "account_number": "111" + }, + "R\u00e9serves statutaires ou contractuelles": { + "account_number": "112" + }, + "R\u00e9serves r\u00e9glement\u00e9es": { + "R\u00e9serves de plus-values nettes \u00e0 long terme": { + "account_number": "1131" + }, + "R\u00e9serves d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": { + "account_number": "1132" + }, + "R\u00e9serves cons\u00e9cutives \u00e0 l\u2019octroi de subventions d\u2019investissement": { + "account_number": "1133" + }, + "R\u00e9serves des valeurs mobili\u00e8res donnant acc\u00e8s au capital": { + "account_number": "1134" + }, + "Autres r\u00e9serves r\u00e9glement\u00e9es": { + "account_number": "1135" + }, + "account_number": "113" + }, + "Autres r\u00e9serves": { + "R\u00e9serves facultatives": { + "account_number": "1181" + }, + "R\u00e9serves diverses": { + "account_number": "1188" + }, + "account_number": "118" + }, + "account_number": "11" + }, + "Report \u00e0 nouveau": { + "Report \u00e0 nouveau cr\u00e9diteur": { + "account_number": "121" + }, + "Report \u00e0 nouveau d\u00e9biteur": { + "Perte nette \u00e0 reporter": { + "account_number": "1291" + }, + "Perte Amortissements r\u00e9put\u00e9s diff\u00e9r\u00e9s": { + "account_number": "1292" + }, + "account_number": "129" + }, + "account_number": "12" + }, + "R\u00e9sultat net de l\u2019exercice": { + "R\u00e9sultat en instance d\u2019affectation": { + "R\u00e9sultat en instance d\u2019affectation : b\u00e9n\u00e9fice": { + "account_number": "1301" + }, + "R\u00e9sultat en instance d\u2019affectation : perte": { + "account_number": "1309" + }, + "account_number": "130" + }, + "R\u00e9sultat net : b\u00e9n\u00e9fice": { + "account_number": "131" + }, + "Marge commerciale (MC)": { + "account_number": "132" + }, + "Valeur ajout\u00e9e (VA)": { + "account_number": "133" + }, + "Exc\u00e9dent brut d\u2019exploitation (EBE)": { + "account_number": "134" + }, + "R\u00e9sultat d\u2019exploitation (RE)": { + "account_number": "135" + }, + "R\u00e9sultat financier (RF)": { + "account_number": "136" + }, + "R\u00e9sultat des activit\u00e9s ordinaires (RAO)": { + "account_number": "137" + }, + "R\u00e9sultat hors activit\u00e9s ordinaires (RHAO)": { + "R\u00e9sultat de fusion": { + "account_number": "1381" + }, + "R\u00e9sultat d\u2019apport partiel d\u2019actif": { + "account_number": "1382" + }, + "R\u00e9sultat de scission": { + "account_number": "1383" + }, + "R\u00e9sultat de liquidation": { + "account_number": "1384" + }, + "account_number": "138" + }, + "R\u00e9sultat net : perte": { + "account_number": "139" + }, + "account_number": "13" + }, + "Subventions d\u2019investissement": { + "Subventions d\u2019\u00e9quipement": { + "\u00c9tat": { + "account_number": "1411" + }, + "R\u00e9gions": { + "account_number": "1412" + }, + "D\u00e9partements": { + "account_number": "1413" + }, + "Communes et collectivit\u00e9s publiques d\u00e9centralis\u00e9es": { + "account_number": "1414" + }, + "Entit\u00e9s publiques ou mixtes": { + "account_number": "1415" + }, + "Entit\u00e9s et organismes priv\u00e9s": { + "account_number": "1416" + }, + "Organismes internationaux": { + "account_number": "1417" + }, + "Autres": { + "account_number": "1418" + }, + "account_number": "141" + }, + "Autres subventions d\u2019investissement": { + "account_number": "148" + }, + "account_number": "14" + }, + "Provisions r\u00e9glement\u00e9es et fonds assimil\u00e9s": { + "Amortissements d\u00e9rogatoires": { + "account_number": "151" + }, + "Plus-values de cession \u00e0 r\u00e9investir": { + "account_number": "152" + }, + "Fonds r\u00e9glement\u00e9s": { + "Fonds National": { + "account_number": "1531" + }, + "Pr\u00e9l\u00e8vement pour le Budget": { + "account_number": "1532" + }, + "account_number": "153" + }, + "Provisions sp\u00e9ciales de r\u00e9\u00e9valuation": { + "account_number": "154" + }, + "Provisions r\u00e9glement\u00e9es relatives aux immobilisations": { + "Reconstitution des gisements miniers et p\u00e9troliers": { + "account_number": "1551" + }, + "account_number": "155" + }, + "Provisions r\u00e9glement\u00e9es relatives aux stocks": { + "Hausse de prix": { + "account_number": "1561" + }, + "Fluctuation des cours": { + "account_number": "1562" + }, + "account_number": "156" + }, + "Provisions pour investissement": { + "account_number": "157" + }, + "Autres provisions et fonds r\u00e9glement\u00e9s": { + "account_number": "158" + }, + "account_number": "15" + }, + "Emprunts et dettes assimil\u00e9es": { + "Emprunts obligataires": { + "Emprunts obligataires ordinaires": { + "account_number": "1611" + }, + "Emprunts obligataires convertibles en actions": { + "account_number": "1612" + }, + "Emprunts obligataires remboursables en actions": { + "account_number": "1613" + }, + "Autres emprunts obligataires": { + "account_number": "1618" + }, + "account_number": "161" + }, + "Emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": { + "account_number": "162" + }, + "Avances re\u00e7ues de l\u2019\u00c9tat": { + "account_number": "163" + }, + "Avances re\u00e7ues et comptes courants bloqu\u00e9s": { + "account_number": "164" + }, + "D\u00e9p\u00f4ts et cautionnements re\u00e7us": { + "D\u00e9p\u00f4ts": { + "account_number": "1651" + }, + "Cautionnements": { + "account_number": "1652" + }, + "account_number": "165" + }, + "Int\u00e9r\u00eats courus": { + "Sur emprunts obligataires": { + "account_number": "1661" + }, + "Sur emprunts et dettes aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": { + "account_number": "1662" + }, + "Sur avances re\u00e7ues de l\u2019\u00c9tat": { + "account_number": "1663" + }, + "Sur avances re\u00e7ues et comptes courants bloqu\u00e9s": { + "account_number": "1664" + }, + "Sur d\u00e9p\u00f4ts et cautionnements re\u00e7us": { + "account_number": "1665" + }, + "Sur avances assorties de conditions particuli\u00e8res": { + "account_number": "1667" + }, + "Sur autres emprunts et dettes": { + "account_number": "1668" + }, + "account_number": "166" + }, + "Avances assorties de conditions particuli\u00e8res": { + "Avances bloqu\u00e9es pour augmentation du capital": { + "account_number": "1671" + }, + "Avances conditionn\u00e9es par l\u2019\u00c9tat": { + "account_number": "1672" + }, + "Avances conditionn\u00e9es par les autres organismes africains": { + "account_number": "1673" + }, + "Avances conditionn\u00e9es par les organismes internationaux": { + "account_number": "1674" + }, + "account_number": "167" + }, + "Autres emprunts et dettes": { + "Rentes viag\u00e8res capitalis\u00e9es": { + "account_number": "1681" + }, + "Billets de fonds": { + "account_number": "1682" + }, + "Dettes cons\u00e9cutives \u00e0 des titres emprunt\u00e9s": { + "account_number": "1683" + }, + "Emprunts participatifs": { + "account_number": "1684" + }, + "Participation des travailleurs aux b\u00e9n\u00e9fices": { + "account_number": "1685" + }, + "Emprunts et dettes contract\u00e9s aupr\u00e8s des autres tiers": { + "account_number": "1686" + }, + "account_number": "168" + }, + "account_number": "16" + }, + "Dettes de location acquisition": { + "Dettes de location acquisition / cr\u00e9dit bail immobilier": { + "account_number": "172" + }, + "Dettes de location acquisition / cr\u00e9dit bail mobilier": { + "account_number": "173" + }, + "Dettes de location acquisition / location de vente": { + "account_number": "174" + }, + "Int\u00e9r\u00eats courus": { + "Sur dettes de location acquisition / cr\u00e9dit-bail immobilier": { + "account_number": "1762" + }, + "Sur dettes de location acquisition / cr\u00e9dit-bail mobilier": { + "account_number": "1763" + }, + "Sur dettes de location acquisition / location-vente": { + "account_number": "1764" + }, + "Sur autres dettes de location acquisition": { + "account_number": "1768" + }, + "account_number": "176" + }, + "Autres dettes de location acquisition": { + "account_number": "178" + }, + "account_number": "17" + }, + "Dettes li\u00e9es \u00e0 des participations et comptes de liaison des \u00e9tablissements et soci\u00e9t\u00e9s en participation": { + "Dettes li\u00e9es \u00e0 des participations": { + "Dettes li\u00e9es \u00e0 des participations (groupe)": { + "account_number": "1811" + }, + "Dettes li\u00e9es \u00e0 des participations (hors groupe)": { + "account_number": "1812" + }, + "account_number": "181" + }, + "Dettes li\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": { + "account_number": "182" + }, + "Int\u00e9r\u00eats courus sur dettes li\u00e9es \u00e0 des participations": { + "account_number": "183" + }, + "Comptes permanents bloqu\u00e9s des \u00e9tablissements et succursales": { + "account_number": "184" + }, + "Comptes permanents non bloqu\u00e9s des \u00e9tablissements et succursales": { + "account_number": "185" + }, + "Comptes de liaison charges": { + "account_number": "186" + }, + "Comptes de liaison produits": { + "account_number": "187" + }, + "Comptes de liaison des soci\u00e9t\u00e9s en participation": { + "account_number": "188" + }, + "account_number": "18" + }, + "Provisions pour risques et charges": { + "Provisions pour litiges": { + "account_number": "191" + }, + "Provisions pour garanties donn\u00e9es aux clients": { + "account_number": "192" + }, + "Provisions pour pertes sur march\u00e9s \u00e0 ach\u00e8vement futur": { + "account_number": "193" + }, + "Provisions pour pertes de change": { + "account_number": "194" + }, + "Provisions pour imp\u00f4ts": { + "account_number": "195" + }, + "Provisions pour pensions et obligations similaires": { + "Provisions pour pensions et obligations similaires engagement de retraite": { + "account_number": "1961" + }, + "Actif du r\u00e9gime de retraite": { + "account_number": "1962" + }, + "account_number": "196" + }, + "Provisions pour restructuration": { + "account_number": "197" + }, + "Autres provisions pour risques et charges": { + "Provisions pour amendes et p\u00e9nalit\u00e9s": { + "account_number": "1981" + }, + "Provisions pour propre assureur": { + "account_number": "1983" + }, + "Provisions pour d\u00e9mant\u00e8lement et remise en \u00e9tat": { + "account_number": "1984" + }, + "Provisions pour droits \u00e0 r\u00e9duction ou avantage en nature (ch\u00e8ques cadeau, cartes de fid\u00e9lit\u00e9...)": { + "account_number": "1985" + }, + "Provisions pour divers risques et charges": { + "account_number": "1988" + }, + "account_number": "198" + }, + "account_number": "19" + }, + "root_type": "Equity", + "account_number": "1" + }, + "Comptes d\u2019actif immobilis\u00e9": { + "Immobilisations incorporelles": { + "account_type": "Fixed Asset", + "Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset", + "account_number": "211" + }, + "Brevets, licences, concessions et droits similaires": { + "account_type": "Fixed Asset", + "Brevets": { + "account_type": "Fixed Asset", + "account_number": "2121" + }, + "Licences": { + "account_type": "Fixed Asset", + "account_number": "2122" + }, + "Concessions de service public": { + "account_type": "Fixed Asset", + "account_number": "2123" + }, + "Autres concessions et droits similaires": { + "account_type": "Fixed Asset", + "account_number": "2128" + }, + "account_number": "212" + }, + "Logiciels et sites internet": { + "account_type": "Fixed Asset", + "Logiciels": { + "account_type": "Fixed Asset", + "account_number": "2131" + }, + "Sites internet": { + "account_type": "Fixed Asset", + "account_number": "2132" + }, + "account_number": "213" + }, + "Marques": { + "account_type": "Fixed Asset", + "account_number": "214" + }, + "Fonds commercial": { + "account_type": "Fixed Asset", + "account_number": "215" + }, + "Droit au bail": { + "account_type": "Fixed Asset", + "account_number": "216" + }, + "Investissements de cr\u00e9ation": { + "account_type": "Fixed Asset", + "account_number": "217" + }, + "Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset", + "Frais de prospection et d\u2019\u00e9valuation de ressources min\u00e9rales": { + "account_type": "Fixed Asset", + "account_number": "2181" + }, + "Co\u00fbts d\u2019obtention du contrat": { + "account_type": "Fixed Asset", + "account_number": "2182" + }, + "Fichiers clients, notices, titres de journaux et magazines": { + "account_type": "Fixed Asset", + "account_number": "2183" + }, + "Co\u00fbts des franchises": { + "account_type": "Fixed Asset", + "account_number": "2184" + }, + "Divers droits et valeurs incorporelles": { + "account_type": "Fixed Asset", + "account_number": "2188" + }, + "account_number": "218" + }, + "Immobilisations incorporelles en cours": { + "account_type": "Fixed Asset", + "Frais de d\u00e9veloppement": { + "account_type": "Fixed Asset", + "account_number": "2191" + }, + "Logiciels et internet": { + "account_type": "Fixed Asset", + "account_number": "2193" + }, + "Autres droits et valeurs incorporels": { + "account_type": "Fixed Asset", + "account_number": "2198" + }, + "account_number": "219" + }, + "account_number": "21" + }, + "Terrains": { + "account_type": "Fixed Asset", + "Terrains agricoles et forestiers": { + "account_type": "Fixed Asset", + "Terrains d\u2019exploitation agricole": { + "account_type": "Fixed Asset", + "account_number": "2211" + }, + "Terrains d\u2019exploitation foresti\u00e8re": { + "account_type": "Fixed Asset", + "account_number": "2212" + }, + "Autres terrains": { + "account_type": "Fixed Asset", + "account_number": "2218" + }, + "account_number": "221" + }, + "Terrains nus": { + "account_type": "Fixed Asset", + "Terrains \u00e0 b\u00e2tir": { + "account_type": "Fixed Asset", + "account_number": "2221" + }, + "Autres terrains nus": { + "account_type": "Fixed Asset", + "account_number": "2228" + }, + "account_number": "222" + }, + "Terrains b\u00e2tis": { + "account_type": "Fixed Asset", + "Pour b\u00e2timents industriels et agricoles": { + "account_type": "Fixed Asset", + "account_number": "2231" + }, + "Pour b\u00e2timents administratifs et commerciaux": { + "account_type": "Fixed Asset", + "account_number": "2232" + }, + "Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations professionnelles": { + "account_type": "Fixed Asset", + "account_number": "2234" + }, + "Pour b\u00e2timents affect\u00e9s aux autres op\u00e9rations non professionnelles": { + "account_type": "Fixed Asset", + "account_number": "2235" + }, + "Autres terrains b\u00e2tis": { + "account_type": "Fixed Asset", + "account_number": "2238" + }, + "account_number": "223" + }, + "Travaux de mise en valeur des terrains": { + "account_type": "Fixed Asset", + "Plantation d\u2019arbres et d\u2019arbustes": { + "account_type": "Fixed Asset", + "account_number": "2241" + }, + "Am\u00e9liorations du fonds": { + "account_type": "Fixed Asset", + "account_number": "2245" + }, + "Autres travaux": { + "account_type": "Fixed Asset", + "account_number": "2248" + }, + "account_number": "224" + }, + "Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset", + "Carri\u00e8res": { + "account_type": "Fixed Asset", + "account_number": "2251" + }, + "account_number": "225" + }, + "Terrains am\u00e9nag\u00e9s": { + "account_type": "Fixed Asset", + "Parkings": { + "account_type": "Fixed Asset", + "account_number": "2261" + }, + "account_number": "226" + }, + "Terrains mis en concession": { + "account_type": "Fixed Asset", + "account_number": "227" + }, + "Autres terrains": { + "account_type": "Fixed Asset", + "Terrains immeubles de placement": { + "account_type": "Fixed Asset", + "account_number": "2281" + }, + "Terrains des logements affect\u00e9s au personnel": { + "account_type": "Fixed Asset", + "account_number": "2285" + }, + "Terrains de location acquisition": { + "account_type": "Fixed Asset", + "account_number": "2286" + }, + "Divers terrains": { + "account_type": "Fixed Asset", + "account_number": "2288" + }, + "account_number": "228" + }, + "Am\u00e9nagements de terrains en cours": { + "account_type": "Fixed Asset", + "Terrains agricoles et forestiers": { + "account_type": "Fixed Asset", + "account_number": "2291" + }, + "Terrains nus": { + "account_type": "Fixed Asset", + "account_number": "2292" + }, + "Terrains de carri\u00e8res tr\u00e9fonds": { + "account_type": "Fixed Asset", + "account_number": "2295" + }, + "Autres terrains": { + "account_type": "Fixed Asset", + "account_number": "2298" + }, + "account_number": "229" + }, + "account_number": "22" + }, + "B\u00e2timents, installations techniques et agencements": { + "B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "B\u00e2timents industriels": { + "account_number": "2311" + }, + "B\u00e2timents agricoles": { + "account_number": "2312" + }, + "B\u00e2timents administratifs et commerciaux": { + "account_number": "2313" + }, + "B\u00e2timents affect\u00e9s au logement du personnel": { + "account_number": "2314" + }, + "B\u00e2timents immeubles de placement": { + "account_number": "2315" + }, + "B\u00e2timents de location acquisition": { + "account_number": "2316" + }, + "account_number": "231" + }, + "B\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "B\u00e2timents industriels": { + "account_number": "2321" + }, + "B\u00e2timents agricoles": { + "account_number": "2322" + }, + "B\u00e2timents administratifs et commerciaux": { + "account_number": "2323" + }, + "B\u00e2timents affect\u00e9s au logement du personnel": { + "account_number": "2324" + }, + "B\u00e2timents immeubles de placement": { + "account_number": "2325" + }, + "B\u00e2timents de location acquisition": { + "account_number": "2326" + }, + "account_number": "232" + }, + "Ouvrages d\u2019infrastructure": { + "Voies de terre": { + "account_number": "2331" + }, + "Voies de fer": { + "account_number": "2332" + }, + "Voies d\u2019eau": { + "account_number": "2333" + }, + "Barrages, Digues": { + "account_number": "2334" + }, + "Pistes d\u2019a\u00e9rodrome": { + "account_number": "2335" + }, + "Autres ouvrages d\u2019infrastructures": { + "account_number": "2338" + }, + "account_number": "233" + }, + "Am\u00e9nagements, agencements et installations techniques": { + "Installations complexes sp\u00e9cialis\u00e9es sur sol propre": { + "account_number": "2341" + }, + "Installations complexes sp\u00e9cialis\u00e9es sur sol d\u2019autrui": { + "account_number": "2342" + }, + "Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol propre": { + "account_number": "2343" + }, + "Installations \u00e0 caract\u00e8re sp\u00e9cifique sur sol d\u2019autrui": { + "account_number": "2344" + }, + "Am\u00e9nagements et agencements des b\u00e2timents": { + "account_number": "2345" + }, + "account_number": "234" + }, + "Am\u00e9nagements de bureaux": { + "Installations g\u00e9n\u00e9rales": { + "account_number": "2351" + }, + "Autres am\u00e9nagements de bureaux": { + "account_number": "2358" + }, + "account_number": "235" + }, + "B\u00e2timents industriels, agricoles et commerciaux mis en concession": { + "account_number": "237" + }, + "Autres installations et agencements": { + "account_number": "238" + }, + "B\u00e2timents am\u00e9nagements, agencements et installations en cours": { + "B\u00e2timents en cours": { + "account_number": "2391" + }, + "Installations en cours": { + "account_number": "2392" + }, + "Ouvrages d\u2019infrastructure en cours": { + "account_number": "2393" + }, + "Am\u00e9nagements et agencements et installations techniques en cours": { + "account_number": "2394" + }, + "Am\u00e9nagements de bureaux en cours": { + "account_number": "2395" + }, + "Autres installations et agencements en cours": { + "account_number": "2398" + }, + "account_number": "239" + }, + "account_number": "23" + }, + "Mat\u00e9riel, mobilier et actifs biologiques": { + "Mat\u00e9riel et outillage industriel et commercial": { + "Mat\u00e9riel industriel": { + "account_number": "2411" + }, + "Outillage industriel": { + "account_number": "2412" + }, + "Mat\u00e9riel commercial": { + "account_number": "2413" + }, + "Outillage commercial": { + "account_number": "2414" + }, + "Mat\u00e9riel & outillage industriel et commercial de location-acquisition": { + "account_number": "2416" + }, + "account_number": "241" + }, + "Mat\u00e9riel et outillage agricole": { + "Mat\u00e9riel agricole": { + "account_number": "2421" + }, + "Outillage agricole": { + "account_number": "2422" + }, + "Mat\u00e9riel & outillage agricole de location-acquisition": { + "account_number": "2426" + }, + "account_number": "242" + }, + "Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "243" + }, + "Mat\u00e9riel et mobilier": { + "Mat\u00e9riel de bureau": { + "account_number": "2441" + }, + "Mat\u00e9riel informatique": { + "account_number": "2442" + }, + "Mat\u00e9riel bureautique": { + "account_number": "2443" + }, + "Mobilier de bureau": { + "account_number": "2444" + }, + "Mat\u00e9riel et mobilier immeubles de placement": { + "account_number": "2445" + }, + "Mat\u00e9riel et mobilier de location acquisition": { + "account_number": "2446" + }, + "Mat\u00e9riel et mobilier des logements du personnel": { + "account_number": "2447" + }, + "account_number": "244" + }, + "Mat\u00e9riel de transport": { + "Mat\u00e9riel automobile": { + "account_number": "2451" + }, + "Mat\u00e9riel ferroviaire": { + "account_number": "2452" + }, + "Mat\u00e9riel fluvial, lagunaire": { + "account_number": "2453" + }, + "Mat\u00e9riel naval": { + "account_number": "2454" + }, + "Mat\u00e9riel a\u00e9rien": { + "account_number": "2455" + }, + "Mat\u00e9riel de transport de location-acquisition": { + "account_number": "2456" + }, + "Mat\u00e9riel hippomobile": { + "account_number": "2457" + }, + "Autres mat\u00e9riels de transport": { + "account_number": "2458" + }, + "account_number": "245" + }, + "Actifs biologiques": { + "Cheptel, animaux de trait": { + "account_number": "2461" + }, + "Cheptel, animaux reproducteurs": { + "account_number": "2462" + }, + "Animaux de garde": { + "account_number": "2463" + }, + "Plantations agricoles": { + "account_number": "2465" + }, + "Autres actifs biologiques": { + "account_number": "2468" + }, + "account_number": "246" + }, + "Agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "Agencements et am\u00e9nagements du mat\u00e9riel": { + "account_number": "2471" + }, + "Agencements et am\u00e9nagements des actifs biologiques": { + "account_number": "2472" + }, + "Autres agencements, am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "account_number": "2478" + }, + "account_number": "247" + }, + "Autres mat\u00e9riels et mobiliers": { + "Collections et \u0153uvres d\u2019art": { + "account_number": "2481" + }, + "Divers mat\u00e9riels mobiliers": { + "account_number": "2488" + }, + "account_number": "248" + }, + "Mat\u00e9riels et actifs biologiques en cours": { + "Mat\u00e9riel et outillage industriel et commercial": { + "account_number": "2491" + }, + "Mat\u00e9riel et outillage agricole": { + "account_number": "2492" + }, + "Mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "2493" + }, + "Mat\u00e9riel et mobilier de bureau": { + "account_number": "2494" + }, + "Mat\u00e9riel de transport": { + "account_number": "2495" + }, + "Actifs biologiques": { + "account_number": "2496" + }, + "Agencements am\u00e9nagements du mat\u00e9riel et actifs biologiques": { + "account_number": "2497" + }, + "Autres mat\u00e9riels et actifs biologiques en cours": { + "account_number": "2498" + }, + "account_number": "249" + }, + "account_number": "24" + }, + "Avances et acomptes vers\u00e9s sur immobilisations": { + "Avances et acomptes vers\u00e9s sur immobilisations incorporelles": { + "account_number": "251" + }, + "Avances et acomptes vers\u00e9s sur immobilisations corporelles": { + "account_number": "252" + }, + "account_number": "25" + }, + "Titres de participation": { + "Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": { + "account_number": "261" + }, + "Titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le conjoint": { + "account_number": "262" + }, + "Titres de participation dans des soci\u00e9t\u00e9s conf\u00e9rant une influence notable": { + "account_number": "263" + }, + "Participations dans des organismes professionnels": { + "account_number": "265" + }, + "Parts dans des groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": { + "account_number": "266" + }, + "Autres titres de participation": { + "account_number": "268" + }, + "account_number": "26" + }, + "Autres immobilisations financi\u00e8res": { + "Pr\u00eats et cr\u00e9ances": { + "Pr\u00eats participatifs": { + "account_number": "2711" + }, + "Pr\u00eats aux associ\u00e9s": { + "account_number": "2712" + }, + "Billets de fonds": { + "account_number": "2713" + }, + "Titres pr\u00eat\u00e9s": { + "account_number": "2714" + }, + "Autres pr\u00eats et cr\u00e9ances": { + "account_number": "2718" + }, + "account_number": "271" + }, + "Pr\u00eats au personnel": { + "Pr\u00eats immobiliers": { + "account_number": "2721" + }, + "Pr\u00eats mobiliers et d\u2019installation": { + "account_number": "2722" + }, + "Autres pr\u00eats au personnel": { + "account_number": "2728" + }, + "account_number": "272" + }, + "Cr\u00e9ances sur l\u2019\u00c9tat": { + "Retenues de garantie": { + "account_number": "2731" + }, + "Fonds r\u00e9glement\u00e9": { + "account_number": "2733" + }, + "Cr\u00e9ances sur le conc\u00e9dant": { + "account_number": "2734" + }, + "Autres cr\u00e9ances sur l\u2019\u00c9tat": { + "account_number": "2738" + }, + "account_number": "273" + }, + "Titres immobilis\u00e9s": { + "Titres immobilis\u00e9s de l\u2019activit\u00e9 de portefeuille (TIAP)": { + "account_number": "2741" + }, + "Titres participatifs": { + "account_number": "2742" + }, + "Certificats d\u2019investissement": { + "account_number": "2743" + }, + "Parts de fonds commun de placement (FCP)": { + "account_number": "2744" + }, + "Obligations": { + "account_number": "2745" + }, + "Actions ou parts propres": { + "account_number": "2746" + }, + "Autres titres immobilis\u00e9s": { + "account_number": "2748" + }, + "account_number": "274" + }, + "D\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "D\u00e9p\u00f4ts pour loyers d\u2019avance": { + "account_number": "2751" + }, + "D\u00e9p\u00f4ts pour l\u2019\u00e9lectricit\u00e9": { + "account_number": "2752" + }, + "D\u00e9p\u00f4ts pour l\u2019eau": { + "account_number": "2753" + }, + "D\u00e9p\u00f4ts pour le gaz": { + "account_number": "2754" + }, + "D\u00e9p\u00f4ts pour le t\u00e9l\u00e9phone, le t\u00e9lex, la t\u00e9l\u00e9copie": { + "account_number": "2755" + }, + "Cautionnements sur march\u00e9s publics": { + "account_number": "2756" + }, + "Cautionnements sur autres op\u00e9rations": { + "account_number": "2757" + }, + "Autres d\u00e9p\u00f4ts et cautionnements": { + "account_number": "2758" + }, + "account_number": "275" + }, + "Int\u00e9r\u00eats courus": { + "Pr\u00eats et cr\u00e9ances non commerciales": { + "account_number": "2761" + }, + "Pr\u00eats au personnel": { + "account_number": "2762" + }, + "Cr\u00e9ances sur l\u2019\u00c9tat": { + "account_number": "2763" + }, + "Titres immobilis\u00e9s": { + "account_number": "2764" + }, + "D\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "account_number": "2765" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations": { + "account_number": "2767" + }, + "Immobilisations financi\u00e8res diverses": { + "account_number": "2768" + }, + "account_number": "276" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": { + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations (groupe)": { + "account_number": "2771" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations (hors groupe)": { + "account_number": "2772" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": { + "account_number": "2773" + }, + "Avances \u00e0 des Groupements d\u2019int\u00e9r\u00eat \u00e9conomique (GIE)": { + "account_number": "2774" + }, + "account_number": "277" + }, + "Immobilisations financi\u00e8res diverses": { + "Cr\u00e9ances diverses groupe": { + "account_number": "2781" + }, + "Cr\u00e9ances diverses hors groupe": { + "account_number": "2782" + }, + "Banques d\u00e9p\u00f4ts \u00e0 terme": { + "account_number": "2784" + }, + "Or et m\u00e9taux pr\u00e9cieux": { + "account_number": "2785" + }, + "Autres immobilisations financi\u00e8res": { + "account_number": "2788" + }, + "account_number": "278" + }, + "account_number": "27" + }, + "Amortissements": { + "account_type": "Accumulated Depreciation", + "Amortissements des immobilisations corporelles": { + "account_type": "Accumulated Depreciation", + "Amortissements des frais de d\u00e9veloppement": { + "account_type": "Accumulated Depreciation", + "account_number": "2811" + }, + "Amortissements des brevets, licences, concessions et droits similaires": { + "account_type": "Accumulated Depreciation", + "account_number": "2812" + }, + "Amortissements des logiciels et sites internet": { + "account_type": "Accumulated Depreciation", + "account_number": "2813" + }, + "Amortissements des marques": { + "account_type": "Accumulated Depreciation", + "account_number": "2814" + }, + "Amortissements du fonds commercial": { + "account_type": "Accumulated Depreciation", + "account_number": "2815" + }, + "Amortissements du droit au bail": { + "account_type": "Accumulated Depreciation", + "account_number": "2816" + }, + "Amortissements des investissements de cr\u00e9ation": { + "account_type": "Accumulated Depreciation", + "account_number": "2817" + }, + "Amortissements des autres droits et valeurs incorporels": { + "account_type": "Accumulated Depreciation", + "account_number": "2818" + }, + "account_number": "281" + }, + "Amortissements des terrains": { + "Amortissements des travaux de mise en valeur des terrains": { + "account_number": "2824" + }, + "account_number": "282" + }, + "Amortissements des b\u00e2timents, installations techniques et agencements": { + "Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "account_number": "2831" + }, + "Amortissements des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "account_number": "2832" + }, + "Amortissements des ouvrages d\u2019infrastructure": { + "account_number": "2833" + }, + "Amortissements des am\u00e9nagements, agencements et installations techniques": { + "account_number": "2834" + }, + "Amortissements des am\u00e9nagements de bureaux": { + "account_number": "2835" + }, + "Amortissements des b\u00e2timents industriels, agricoles et commerciaux mis en concession": { + "account_number": "2837" + }, + "Amortissements des autres installations et agencements": { + "account_number": "2838" + }, + "account_number": "283" + }, + "Amortissements du mat\u00e9riel": { + "Amortissements du mat\u00e9riel et outillage industriel et commercial": { + "account_number": "2841" + }, + "Amortissements du mat\u00e9riel et outillage agricole": { + "account_number": "2842" + }, + "Amortissements du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "2843" + }, + "Amortissements du mat\u00e9riel et mobilier": { + "account_number": "2844" + }, + "Amortissements du mat\u00e9riel de transport": { + "account_number": "2845" + }, + "Amortissements des actifs biologiques": { + "account_number": "2846" + }, + "Amortissements des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": { + "account_number": "2847" + }, + "Amortissements des autres mat\u00e9riels": { + "account_number": "2848" + }, + "account_number": "284" + }, + "account_number": "28" + }, + "D\u00e9pr\u00e9ciations des immobilisations": { + "D\u00e9pr\u00e9ciations des immobilisations incorporelles": { + "D\u00e9pr\u00e9ciations des frais de d\u00e9veloppement": { + "account_number": "2911" + }, + "D\u00e9pr\u00e9ciations des brevets, licences, concessions et droits similaires": { + "account_number": "2912" + }, + "D\u00e9pr\u00e9ciations des logiciels et sites internet": { + "account_number": "2913" + }, + "D\u00e9pr\u00e9ciations des marques": { + "account_number": "2914" + }, + "D\u00e9pr\u00e9ciations du fonds commercial": { + "account_number": "2915" + }, + "D\u00e9pr\u00e9ciations du droit au bail": { + "account_number": "2916" + }, + "D\u00e9pr\u00e9ciations des investissements de cr\u00e9ation": { + "account_number": "2917" + }, + "D\u00e9pr\u00e9ciations des autres droits et valeurs incorporels": { + "account_number": "2918" + }, + "D\u00e9pr\u00e9ciations des immobilisations incorporelles en cours": { + "account_number": "2919" + }, + "account_number": "291" + }, + "D\u00e9pr\u00e9ciations des terrains": { + "D\u00e9pr\u00e9ciations des terrains agricoles et forestiers": { + "account_number": "2921" + }, + "D\u00e9pr\u00e9ciations des terrains nus": { + "account_number": "2922" + }, + "D\u00e9pr\u00e9ciations des terrains b\u00e2tis": { + "account_number": "2923" + }, + "D\u00e9pr\u00e9ciations des travaux de mise en valeur des terrains": { + "account_number": "2924" + }, + "D\u00e9pr\u00e9ciations des terrains de gisement": { + "account_number": "2925" + }, + "D\u00e9pr\u00e9ciations des terrains am\u00e9nag\u00e9s": { + "account_number": "2926" + }, + "D\u00e9pr\u00e9ciations des terrains mis en concession": { + "account_number": "2927" + }, + "D\u00e9pr\u00e9ciations des autres terrains": { + "account_number": "2928" + }, + "D\u00e9pr\u00e9ciations des am\u00e9nagements de terrains en cours": { + "account_number": "2929" + }, + "account_number": "292" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents, installations techniques et agencements": { + "D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol propre": { + "account_number": "2931" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles, administratifs et commerciaux sur sol d\u2019autrui": { + "account_number": "2932" + }, + "D\u00e9pr\u00e9ciations des ouvrages d\u2019infrastructures": { + "account_number": "2933" + }, + "D\u00e9pr\u00e9ciations des am\u00e9nagements, agencements et installations techniques": { + "account_number": "2934" + }, + "D\u00e9pr\u00e9ciations des am\u00e9nagements de bureaux": { + "account_number": "2935" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents industriels, agricoles et commerciaux mis en concession": { + "account_number": "2937" + }, + "D\u00e9pr\u00e9ciations des autres installations et agencements": { + "account_number": "2938" + }, + "D\u00e9pr\u00e9ciations des b\u00e2timents et installations en cours": { + "account_number": "2939" + }, + "account_number": "293" + }, + "D\u00e9pr\u00e9ciations de mat\u00e9riel, du mobilier et de l\u2019actif biologique": { + "D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage industriel et commercial": { + "account_number": "2941" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel et outillage agricole": { + "account_number": "2942" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel d\u2019emballage r\u00e9cup\u00e9rable et identifiable": { + "account_number": "2943" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel et mobilier": { + "account_number": "2944" + }, + "D\u00e9pr\u00e9ciations du mat\u00e9riel de transport": { + "account_number": "2945" + }, + "D\u00e9pr\u00e9ciations des actifs biologiques": { + "account_number": "2946" + }, + "D\u00e9pr\u00e9ciations des agencements et am\u00e9nagements du mat\u00e9riel et des actifs biologiques": { + "account_number": "2947" + }, + "D\u00e9pr\u00e9ciations des autres mat\u00e9riels": { + "account_number": "2948" + }, + "D\u00e9pr\u00e9ciations de mat\u00e9riel en cours": { + "account_number": "2949" + }, + "account_number": "294" + }, + "D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations": { + "D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations incorporelles": { + "account_number": "2951" + }, + "D\u00e9pr\u00e9ciations des avances et acomptes vers\u00e9s sur immobilisations corporelles": { + "account_number": "2952" + }, + "account_number": "295" + }, + "D\u00e9pr\u00e9ciations des titres de participation": { + "D\u00e9pr\u00e9ciations des titres de participation dans des soci\u00e9t\u00e9s sous contr\u00f4le exclusif": { + "account_number": "2961" + }, + "D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s sous contr\u00f4le conjoint": { + "account_number": "2962" + }, + "D\u00e9pr\u00e9ciations des titres de participation dans les soci\u00e9t\u00e9s conf\u00e9rant une influence notable": { + "account_number": "2963" + }, + "D\u00e9pr\u00e9ciations des participations dans des organismes professionnels": { + "account_number": "2965" + }, + "D\u00e9pr\u00e9ciations des parts dans des GIE": { + "account_number": "2966" + }, + "D\u00e9pr\u00e9ciations des autres titres de participation": { + "account_number": "2968" + }, + "account_number": "296" + }, + "D\u00e9pr\u00e9ciations des autres immobilisations financi\u00e8res": { + "D\u00e9pr\u00e9ciations des pr\u00eats et cr\u00e9ances": { + "account_number": "2971" + }, + "D\u00e9pr\u00e9ciations des pr\u00eats au personnel": { + "account_number": "2972" + }, + "D\u00e9pr\u00e9ciations des cr\u00e9ances sur l\u2019\u00c9tat": { + "account_number": "2973" + }, + "D\u00e9pr\u00e9ciations des titres immobilis\u00e9s": { + "account_number": "2974" + }, + "D\u00e9pr\u00e9ciations des d\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "account_number": "2975" + }, + "D\u00e9pr\u00e9ciations des cr\u00e9ances rattach\u00e9es \u00e0 des participations et avances \u00e0 des GIE": { + "account_number": "2977" + }, + "D\u00e9pr\u00e9ciations des cr\u00e9ances financi\u00e8res diverses": { + "account_number": "2978" + }, + "account_number": "297" + }, + "account_number": "29" + }, + "root_type": "Asset", + "account_number": "2" + }, + "Comptes de Stocks": { + "Marchandises": { + "Marchandises A": { + "Marchandises A1": { + "account_number": "3111" + }, + "Marchandises A2": { + "account_number": "3112" + }, + "account_number": "311" + }, + "Marchandises B": { + "Marchandises B1": { + "account_number": "3121" + }, + "Marchandises B2": { + "account_number": "3122" + }, + "account_number": "312" + }, + "Actifs biologiques": { + "Animaux": { + "account_number": "3131" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3132" + }, + "account_number": "313" + }, + "Marchandises hors activit\u00e9s ordinaires (HAO)": { + "account_number": "318" + }, + "account_number": "31" + }, + "Mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "Mati\u00e8res A": { + "account_number": "321" + }, + "Mati\u00e8res B": { + "account_number": "322" + }, + "Fournitures (A, B)": { + "account_number": "323" + }, + "account_number": "32" + }, + "Autres approvisionnements": { + "Mati\u00e8res consommables": { + "account_number": "331" + }, + "Fournitures d\u2019atelier et d\u2019usine": { + "account_number": "332" + }, + "Fournitures de magasin": { + "account_number": "333" + }, + "Fournitures de bureau": { + "account_number": "334" + }, + "Emballages": { + "Emballages perdus": { + "account_number": "3351" + }, + "Emballages r\u00e9cup\u00e9rables non identifiables": { + "account_number": "3352" + }, + "Emballages \u00e0 usage mixte": { + "account_number": "3353" + }, + "Autres emballages": { + "account_number": "3358" + }, + "account_number": "335" + }, + "Autres mati\u00e8res": { + "account_number": "338" + }, + "account_number": "33" + }, + "Produits en cours": { + "Produits en cours": { + "Produits en cours P1": { + "account_number": "3411" + }, + "Produits en cours P2": { + "account_number": "3412" + }, + "account_number": "341" + }, + "Travaux en cours": { + "Travaux en cours T1": { + "account_number": "3421" + }, + "Travaux en cours T2": { + "account_number": "3422" + }, + "account_number": "342" + }, + "Produits interm\u00e9diaires en cours": { + "Produits interm\u00e9diaires A": { + "account_number": "3431" + }, + "Produits interm\u00e9diaires B": { + "account_number": "3432" + }, + "account_number": "343" + }, + "Produits r\u00e9siduels en cours": { + "Produits r\u00e9siduels A": { + "account_number": "3441" + }, + "Produits r\u00e9siduels B": { + "account_number": "3442" + }, + "account_number": "344" + }, + "Actifs biologiques en cours": { + "Animaux": { + "account_number": "3451" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3452" + }, + "account_number": "345" + }, + "account_number": "34" + }, + "Services en cours": { + "\u00c9tudes en cours": { + "\u00c9tudes en cours E1": { + "account_number": "3511" + }, + "\u00c9tudes en cours E2": { + "account_number": "3512" + }, + "account_number": "351" + }, + "Prestations de services en cours": { + "Prestations de services S1": { + "account_number": "3521" + }, + "Prestations de services S2": { + "account_number": "3522" + } + }, + "account_number": "35" + }, + "Produits finis": { + "Produits finis A": { + "account_number": "361" + }, + "Produits finis B": { + "account_number": "362" + }, + "Actifs biologiques": { + "Animaux": { + "account_number": "3631" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3632" + }, + "Autres stocks (activit\u00e9s annexes)": { + "account_number": "3638" + }, + "account_number": "363" + }, + "account_number": "36" + }, + "Produits interm\u00e9diaires et r\u00e9siduels": { + "Produits interm\u00e9diaires": { + "Produits interm\u00e9diaires A": { + "account_number": "3711" + }, + "Produits interm\u00e9diaires B": { + "account_number": "3712" + }, + "account_number": "371" + }, + "Produits r\u00e9siduels": { + "D\u00e9chets": { + "account_number": "3721" + }, + "Rebuts": { + "account_number": "3722" + }, + "Mati\u00e8res de R\u00e9cup\u00e9ration": { + "account_number": "3723" + }, + "account_number": "372" + }, + "Actifs biologiques": { + "Animaux": { + "account_number": "3731" + }, + "V\u00e9g\u00e9taux": { + "account_number": "3732" + }, + "Autres stocks (activit\u00e9s annexes)": { + "account_number": "3738" + }, + "account_number": "373" + }, + "account_number": "37" + }, + "Stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": { + "account_type": "Stock", + "Marchandises en cours de route": { + "account_number": "381" + }, + "Mati\u00e8res premi\u00e8res et fournitures li\u00e9es en cours de route": { + "account_number": "382" + }, + "Autres approvisionnements en cours de route": { + "account_number": "383" + }, + "Produits finis en cours de route": { + "account_number": "386" + }, + "Stock en consignation ou en d\u00e9p\u00f4t": { + "Stock en consignation": { + "account_number": "3871" + }, + "Stock en d\u00e9p\u00f4t": { + "account_number": "3872" + }, + "account_number": "387" + }, + "Stock provenant d\u2019immobilisations mises hors service ou au rebut": { + "account_number": "388" + }, + "account_number": "38" + }, + "D\u00e9pr\u00e9ciations des stocks et encours de production": { + "D\u00e9pr\u00e9ciations des stocks de marchandises": { + "account_number": "391" + }, + "D\u00e9pr\u00e9ciations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "account_number": "392" + }, + "D\u00e9pr\u00e9ciations des stocks d\u2019autres approvisionnements": { + "account_number": "393" + }, + "D\u00e9pr\u00e9ciations des productions en cours": { + "account_number": "394" + }, + "D\u00e9pr\u00e9ciations des services en cours": { + "account_number": "395" + }, + "D\u00e9pr\u00e9ciations des stocks de produits finis": { + "account_number": "396" + }, + "D\u00e9pr\u00e9ciations des stocks de produits interm\u00e9diaires et r\u00e9siduels": { + "account_number": "397" + }, + "D\u00e9pr\u00e9ciations des stocks en cours de route, en consignation ou en d\u00e9p\u00f4t": { + "account_number": "398" + }, + "account_number": "39" + }, + "root_type": "Asset", + "account_number": "3" + }, + "4-Comptes de Tiers (ACTIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (ACTIF)": { + "Fournisseurs d\u00e9biteurs": { + "Fournisseurs Avances et acomptes vers\u00e9s": { + "account_number": "4091" + }, + "Fournisseurs Groupe avances et acomptes vers\u00e9s": { + "account_number": "4092" + }, + "Fournisseurs Sous-traitants avances et acomptes vers\u00e9s": { + "account_number": "4093" + }, + "Fournisseurs Cr\u00e9ances pour emballages et mat\u00e9riels \u00e0 rendre": { + "account_number": "4094" + }, + "Fournisseurs Rabais, remises, ristournes et autres avoirs \u00e0 obtenir": { + "account_number": "4098" + }, + "account_number": "409" + } + }, + "41-Clients et comptes rattach\u00e9s (ACTIF)": { + "Clients": { + "Clients": { + "account_type": "Receivable", + "account_number": "4111" + }, + "Clients groupe": { + "account_type": "Receivable", + "account_number": "4112" + }, + "Clients, \u00c9tat et Collectivit\u00e9s publiques": { + "account_type": "Receivable", + "account_number": "4114" + }, + "Clients, organismes internationaux": { + "account_type": "Receivable", + "account_number": "4115" + }, + "Clients, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Receivable", + "account_number": "4116" + }, + "Client, retenues de garantie": { + "account_type": "Receivable", + "account_number": "4117" + }, + "Clients, d\u00e9gr\u00e8vement de taxes sur la valeur ajout\u00e9e (TVA)": { + "account_type": "Receivable", + "account_number": "4118" + }, + "account_type": "Receivable", + "account_number": "411" + }, + "Clients, effets \u00e0 recevoir en portefeuille": { + "Clients, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4121" + }, + "Clients Groupe, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4122" + }, + "\u00c9tat et Collectivit\u00e9s publiques, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4124" + }, + "Organismes Internationaux, effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "4125" + }, + "account_type": "Receivable", + "account_number": "412" + }, + "Clients, ch\u00e8ques, effets et autres valeurs impay\u00e9es": { + "Clients, ch\u00e8ques impay\u00e9s": { + "account_type": "Receivable", + "account_number": "4131" + }, + "Clients, effets impay\u00e9s": { + "account_type": "Receivable", + "account_number": "4132" + }, + "Clients, cartes de cr\u00e9dit impay\u00e9es": { + "account_type": "Receivable", + "account_number": "4133" + }, + "Clients, autres valeurs impay\u00e9es": { + "account_type": "Receivable", + "account_number": "4138" + }, + "account_type": "Receivable", + "account_number": "413" + }, + "Cr\u00e9ances sur cessions courantes d\u2019immobilisations": { + "Cr\u00e9ances en compte, immobilisations incorporelles": { + "account_type": "Receivable", + "account_number": "4141" + }, + "Cr\u00e9ances en compte, immobilisations corporelles": { + "account_type": "Receivable", + "account_number": "4142" + }, + "Effets \u00e0 recevoir, immobilisations incorporelles": { + "account_type": "Receivable", + "account_number": "4146" + }, + "Effets \u00e0 recevoir, immobilisations corporelles": { + "account_type": "Receivable", + "account_number": "4147" + }, + "account_type": "Receivable", + "account_number": "414" + }, + "Clients, effets escompt\u00e9s non \u00e9chus": { + "account_type": "Receivable", + "account_number": "415" + }, + "Cr\u00e9ances clients litigieuses ou douteuses": { + "Cr\u00e9ances litigieuses": { + "account_type": "Receivable", + "account_number": "4161" + }, + "Cr\u00e9ances douteuses": { + "account_type": "Receivable", + "account_number": "4162" + }, + "account_type": "Receivable", + "account_number": "416" + }, + "Clients, produits \u00e0 recevoir": { + "Clients, factures \u00e0 \u00e9tablir": { + "account_type": "Receivable", + "account_number": "4181" + }, + "Clients, int\u00e9r\u00eats courus": { + "account_type": "Receivable", + "account_number": "4186" + }, + "account_type": "Receivable", + "account_number": "418" + }, + "account_type": "Receivable" + }, + "42-Personnel (ACTIF)": { + "Personnel, avances et acomptes": { + "Personnel, avances": { + "account_number": "4211" + }, + "Personnel, acomptes": { + "account_number": "4212" + }, + "Frais avanc\u00e9s et fournitures au personnel": { + "account_number": "4213" + }, + "account_number": "421" + } + }, + "43-Organismes sociaux (ACTIF)": { + "431-S\u00e9curit\u00e9 sociale": { + "Prestations familiales": { + "account_number": "4311" + }, + "Accidents de travail": { + "account_number": "4312" + }, + "Caisse de retraite obligatoire": { + "account_number": "4313" + }, + "Caisse de retraite facultative": { + "account_number": "4314" + }, + "Autres cotisations sociales": { + "account_number": "4318" + } + }, + "432-Caisses de retraite compl\u00e9mentaire": {}, + "433-Autres organismes sociaux": { + "Mutuelle": { + "account_number": "4331" + }, + "Assurances retraite": { + "account_number": "4332" + }, + "Assurances et organismes de sant\u00e9": { + "account_number": "4333" + } + }, + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "Produits \u00e0 recevoir": { + "account_number": "4387" + } + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (ACTIF)": { + "\u00c9tat, TVA factur\u00e9e": { + "TVA factur\u00e9e sur ventes": { + "account_number": "4431" + }, + "TVA factur\u00e9e sur prestations de services": { + "account_number": "4432" + }, + "TVA factur\u00e9e sur travaux": { + "account_number": "4433" + }, + "TVA factur\u00e9e sur production livr\u00e9e \u00e0 soi-m\u00eame": { + "account_number": "4434" + }, + "TVA sur factures \u00e0 \u00e9tablir": { + "account_number": "4435" + }, + "account_number": "443" + }, + "\u00c9tat, TVA r\u00e9cup\u00e9rable": { + "TVA r\u00e9cup\u00e9rable sur immobilisations": { + "account_number": "4451" + }, + "TVA r\u00e9cup\u00e9rable sur achats": { + "account_number": "4452" + }, + "TVA r\u00e9cup\u00e9rable sur transport": { + "account_number": "4453" + }, + "TVA r\u00e9cup\u00e9rable sur services ext\u00e9rieurs et autres charges": { + "account_number": "4454" + }, + "TVA r\u00e9cup\u00e9rable sur factures non parvenues": { + "account_number": "4455" + }, + "TVA transf\u00e9r\u00e9e par d\u2019autres entit\u00e9s": { + "account_number": "4456" + }, + "account_number": "445" + }, + "\u00c9tat, charges \u00e0 payer et produits \u00e0 recevoir": { + "Charges \u00e0 payer": { + "account_number": "4486" + }, + "Produits \u00e0 recevoir": { + "account_number": "4487" + }, + "account_number": "448" + }, + "\u00c9tat, cr\u00e9ances et dettes diverses": { + "\u00c9tat, obligations cautionn\u00e9es": { + "account_number": "4491" + }, + "\u00c9tat, avances et acomptes vers\u00e9s sur imp\u00f4ts": { + "account_number": "4492" + }, + "\u00c9tat, fonds de dotation \u00e0 recevoir": { + "account_number": "4493" + }, + "\u00c9tat, subventions investissement \u00e0 recevoir": { + "account_number": "4494" + }, + "\u00c9tat, subventions d\u2019exploitation \u00e0 recevoir": { + "account_number": "4495" + }, + "\u00c9tat, subventions d\u2019\u00e9quilibre \u00e0 recevoir": { + "account_number": "4496" + }, + "\u00c9tat, avances sur subventions": { + "account_number": "4497" + }, + "\u00c9tat, fonds r\u00e9glement\u00e9s provisionn\u00e9s": { + "account_number": "4499" + }, + "account_number": "449" + } + }, + "45-Organismes internationaux (ACTIF)": { + "Op\u00e9rations avec les organismes africains": { + "account_number": "451" + }, + "Op\u00e9rations avec les autres organismes internationaux": { + "account_number": "452" + }, + "Organismes internationaux, fonds de dotation et subventions \u00e0 recevoir": { + "Organismes internationaux, fonds de dotation \u00e0 recevoir": { + "account_number": "4581" + }, + "Organismes internationaux, subventions \u00e0 recevoir": { + "account_number": "4582" + }, + "account_number": "458" + } + }, + "46-Apporteurs, associ\u00e9s et groupe (ACTIF)": { + "461-Apporteurs, op\u00e9rations sur le capital": { + "Apporteurs, capital appel\u00e9, non vers\u00e9": { + "account_number": "4613" + }, + "Apporteurs, compte d\u2019apport, op\u00e9rations de restructuration (fusion...)": { + "account_number": "4614" + }, + "Apporteurs, titres \u00e0 \u00e9changer": { + "account_number": "4618" + } + }, + "Apporteurs, restant d\u00fb sur capital appel\u00e9": { + "account_number": "467" + } + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (ACTIF)": { + "472-Cr\u00e9ances et dettes sur titres de placement": { + "Cr\u00e9ances sur cessions de titres de placement": { + "account_number": "4721" + }, + "Versements restant \u00e0 effectuer sur titres de placement non lib\u00e9r\u00e9s": { + "account_number": "4726" + } + }, + "473-Interm\u00e9diaires Op\u00e9rations faites pour compte de tiers": { + "Mandants": { + "account_number": "4731" + }, + "Mandataires": { + "account_number": "4732" + }, + "Commettants": { + "account_number": "4733" + }, + "Commissionnaires": { + "account_number": "4734" + }, + "\u00c9tat, Collectivit\u00e9s publiques, fonds global d\u2019allocation": { + "account_number": "4739" + } + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits": { + "Compte de r\u00e9partition p\u00e9riodique des produits": { + "account_number": "4747" + } + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA": { + "Compte actif": { + "account_type": "Temporary", + "account_number": "4751" + } + }, + "Charges constat\u00e9es d\u2019avance": { + "account_number": "476" + }, + "478-\u00c9carts de conversion actif": { + "Diminution des cr\u00e9ances d\u2019exploitation": { + "account_number": "4781" + }, + "Diminution des cr\u00e9ances financi\u00e8res": { + "account_number": "4782" + }, + "Augmentation des dettes d\u2019exploitation": { + "account_number": "4783" + }, + "Augmentation des dettes financi\u00e8res": { + "account_number": "4784" + }, + "Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": { + "account_number": "4786" + }, + "Diff\u00e9rences compens\u00e9es par couverture de change": { + "account_number": "4788" + } + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (ACTIF)": { + "Cr\u00e9ances sur cessions d\u2019immobilisations": { + "En compte, immobilisations incorporelles": { + "account_number": "4851" + }, + "En compte, immobilisations corporelles": { + "account_number": "4852" + }, + "Effets \u00e0 recevoir, immobilisations incorporelles": { + "account_number": "4853" + }, + "Effets \u00e0 recevoir, immobilisations corporelles": { + "account_number": "4854" + }, + "Effets escompt\u00e9s non \u00e9chus": { + "account_number": "4855" + }, + "Retenues de garantie": { + "account_number": "4857" + }, + "Factures \u00e0 \u00e9tablir": { + "account_number": "4858" + }, + "account_number": "485" + }, + "Autres cr\u00e9ances hors activit\u00e9s ordinaires (HAO)": { + "account_number": "488" + } + }, + "49-D\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme (tiers) (ACTIF)": { + "D\u00e9pr\u00e9ciations des comptes clients": { + "Cr\u00e9ances litigieuses": { + "account_number": "4911" + }, + "Cr\u00e9ances douteuses": { + "account_number": "4912" + }, + "account_number": "491" + }, + "D\u00e9pr\u00e9ciations des comptes organismes internationaux": { + "account_number": "495" + }, + "D\u00e9pr\u00e9ciations des comptes apporteurs, associ\u00e9s et groupe": { + "Associ\u00e9s, comptes courants": { + "account_number": "4962" + }, + "Associ\u00e9s, op\u00e9rations faites en commun": { + "account_number": "4963" + }, + "Groupe, comptes courants": { + "account_number": "4966" + }, + "account_number": "496" + }, + "D\u00e9pr\u00e9ciations des comptes d\u00e9biteurs divers": { + "account_number": "497" + }, + "D\u00e9pr\u00e9ciations des comptes de cr\u00e9ances HAO": { + "Cr\u00e9ances sur cessions d\u2019immobilisations": { + "account_number": "4985" + }, + "Cr\u00e9ances sur cessions de titres de placement": { + "account_number": "4986" + }, + "Autres cr\u00e9ances HAO": { + "account_number": "4988" + }, + "account_number": "498" + }, + "Provisions pour risques \u00e0 court terme": { + "Sur op\u00e9rations d\u2019exploitation": { + "account_number": "4991" + }, + "Sur op\u00e9rations financi\u00e8res": { + "account_number": "4997" + }, + "Sur op\u00e9rations HAO": { + "account_number": "4998" + }, + "account_number": "499" + } + }, + "root_type": "Asset" + }, + "4-Comptes de Tiers (PASSIF)": { + "40-Fournisseurs et comptes rattach\u00e9s (PASSIF)": { + "Fournisseurs, dettes en compte": { + "Fournisseurs": { + "account_type": "Payable", + "account_number": "4011" + }, + "Fournisseurs groupe": { + "account_type": "Payable", + "account_number": "4012" + }, + "Fournisseurs sous-traitants": { + "account_type": "Payable", + "account_number": "4013" + }, + "Fournisseurs, r\u00e9serve de propri\u00e9t\u00e9": { + "account_type": "Payable", + "account_number": "4016" + }, + "Fournisseur, retenues de garantie": { + "account_type": "Payable", + "account_number": "4017" + }, + "account_type": "Payable", + "account_number": "401" + }, + "Fournisseurs, effets \u00e0 payer": { + "Fournisseurs Effets \u00e0 payer": { + "account_type": "Payable", + "account_number": "4021" + }, + "Fournisseurs Groupe, effets \u00e0 payer": { + "account_type": "Payable", + "account_number": "4022" + }, + "Fournisseurs Sous-traitants, effets \u00e0 payer": { + "account_type": "Payable", + "account_number": "4023" + }, + "account_type": "Payable", + "account_number": "402" + }, + "Fournisseurs, acquisitions courantes d\u2019immobilisations": { + "Fournisseurs Dettes en comptes, immobilisations incorporelles": { + "account_type": "Payable", + "account_number": "4041" + }, + "Fournisseurs Dettes en comptes, immobilisations corporelles": { + "account_type": "Payable", + "account_number": "4042" + }, + "Fournisseurs Effets \u00e0 payer, immobilisations incorporelles": { + "account_type": "Payable", + "account_number": "4046" + }, + "Fournisseurs Effets \u00e0 payer, immobilisations corporelles": { + "account_type": "Payable", + "account_number": "4047" + }, + "account_type": "Payable", + "account_number": "404" + }, + "Fournisseurs, factures non parvenues": { + "Fournisseurs": { + "account_type": "Stock Received But Not Billed", + "account_number": "4081" + }, + "Fournisseurs groupe": { + "account_type": "Stock Received But Not Billed", + "account_number": "4082" + }, + "Fournisseurs sous-traitants": { + "account_type": "Stock Received But Not Billed", + "account_number": "4083" + }, + "Fournisseurs, int\u00e9r\u00eats courus": { + "account_type": "Stock Received But Not Billed", + "account_number": "4086" + }, + "account_type": "Stock Received But Not Billed", + "account_number": "408" + }, + "account_type": "Payable" + }, + "41-Clients et comptes rattach\u00e9s (PASSIF)": { + "Clients cr\u00e9diteurs": { + "Clients, avances et acomptes re\u00e7us": { + "account_number": "4191" + }, + "Clients groupe, avances et acomptes re\u00e7us": { + "account_number": "4192" + }, + "Clients, dettes pour emballages et mat\u00e9riels consign\u00e9s": { + "account_number": "4194" + }, + "Clients, rabais, remises, ristournes et autres avoirs \u00e0 accorder": { + "account_number": "4198" + }, + "account_number": "419" + } + }, + "42-Personnel (PASSIF)": { + "Personnel, r\u00e9mun\u00e9rations dues": { + "account_number": "422" + }, + "Personnel, oppositions, saisies-arr\u00eats": { + "Personnel, oppositions": { + "account_number": "4231" + }, + "Personnel, saisies-arr\u00eats": { + "account_number": "4232" + }, + "Personnel, avis \u00e0 tiers d\u00e9tenteur": { + "account_number": "4233" + }, + "account_number": "423" + }, + "Personnel, \u0153uvres sociales internes": { + "Assistance m\u00e9dicale": { + "account_number": "4241" + }, + "Allocations familiales": { + "account_number": "4242" + }, + "Organismes sociaux rattach\u00e9s \u00e0 l\u2019entit\u00e9": { + "account_number": "4245" + }, + "Autres \u0153uvres sociales internes": { + "account_number": "4248" + }, + "account_number": "424" + }, + "Repr\u00e9sentants du personnel": { + "D\u00e9l\u00e9gu\u00e9s du personnel": { + "account_number": "4251" + }, + "Syndicats et Comit\u00e9s d\u2019entreprises, d\u2019\u00c9tablissement": { + "account_number": "4252" + }, + "Autres repr\u00e9sentants du personnel": { + "account_number": "4258" + }, + "account_number": "425" + }, + "Personnel, participation aux b\u00e9n\u00e9fices et au capital": { + "Participation aux b\u00e9n\u00e9fices": { + "account_number": "4261" + }, + "Participation au capital": { + "account_number": "4264" + }, + "account_number": "426" + }, + "Personnel d\u00e9p\u00f4ts": { + "account_number": "427" + }, + "Personnel, charges \u00e0 payer et produits \u00e0 recevoir": { + "Dettes provisionn\u00e9es pour cong\u00e9s \u00e0 payer": { + "account_number": "4281" + }, + "Autres charges \u00e0 payer": { + "account_number": "4286" + }, + "Produits \u00e0 recevoir": { + "account_number": "4287" + }, + "account_number": "428" + } + }, + "43-Organismes sociaux (PASSIF)": { + "438-Organismes sociaux, charges \u00e0 payer et produits \u00e0 recevoir": { + "Charges sociales sur gratifications \u00e0 payer": { + "account_number": "4381" + }, + "Charges sociales sur cong\u00e9s \u00e0 payer": { + "account_number": "4382" + }, + "Autres charges \u00e0 payer": { + "account_number": "4386" + } + } + }, + "44-\u00c9tat et collectivit\u00e9s publiques (PASSIF)": { + "\u00c9tat, imp\u00f4t sur les b\u00e9n\u00e9fices": { + "account_number": "441" + }, + "\u00c9tat, autres imp\u00f4ts et taxes": { + "Imp\u00f4ts et taxes d\u2019\u00c9tat": { + "account_number": "4421" + }, + "Imp\u00f4ts et taxes pour les collectivit\u00e9s publiques": { + "account_number": "4422" + }, + "Imp\u00f4ts et taxes recouvrables sur des obligataires": { + "account_number": "4423" + }, + "Imp\u00f4ts et taxes recouvrables sur des associ\u00e9s": { + "account_number": "4424" + }, + "Droits de douane": { + "account_number": "4426" + }, + "Autres imp\u00f4ts et taxes": { + "account_number": "4428" + }, + "account_number": "442" + }, + "\u00c9tat, TVA due ou cr\u00e9dit de TVA": { + "\u00c9tat, TVA due": { + "account_number": "4441" + }, + "\u00c9tat, cr\u00e9dit de TVA \u00e0 reporter": { + "account_number": "4449" + }, + "account_number": "444" + }, + "\u00c9tat, autres taxes sur le chiffre d\u2019affaires": { + "account_number": "446" + }, + "\u00c9tat, imp\u00f4ts retenus \u00e0 la source": { + "Imp\u00f4t G\u00e9n\u00e9ral sur le revenu": { + "account_number": "4471" + }, + "Imp\u00f4ts sur salaires": { + "account_number": "4472" + }, + "Contribution nationale": { + "account_number": "4473" + }, + "Contribution nationale de solidarit\u00e9": { + "account_number": "4474" + }, + "Autres imp\u00f4ts et contributions": { + "account_number": "4478" + }, + "account_number": "447" + } + }, + "46-Apporteurs, associ\u00e9s et groupe (PASSIF)": { + "461-Apporteurs, op\u00e9rations sur le capital (PASSIF)": { + "Apporteurs, apports en nature": { + "account_number": "4611" + }, + "Apporteurs, apports en num\u00e9raire": { + "account_number": "4612" + }, + "Apporteurs, versements re\u00e7us sur augmentation de capital": { + "account_number": "4615" + }, + "Apporteurs, versements anticip\u00e9s": { + "account_number": "4616" + }, + "Apporteurs d\u00e9faillants": { + "account_number": "4617" + }, + "Apporteurs, capital \u00e0 rembourser": { + "account_number": "4619" + } + }, + "462-Associ\u00e9s, comptes courants": { + "Principal": { + "account_number": "4621" + }, + "Int\u00e9r\u00eats courus": { + "account_number": "4626" + } + }, + "463-Associ\u00e9s, op\u00e9rations faites en commun et GIE": { + "Op\u00e9rations courantes": { + "account_number": "4631" + }, + "Int\u00e9r\u00eats courus": { + "account_number": "4636" + } + }, + "Associ\u00e9s, dividendes \u00e0 payer": { + "account_number": "465" + }, + "Groupe, comptes courants": { + "account_number": "466" + } + }, + "47-D\u00e9biteurs et cr\u00e9diteurs divers (PASSIF)": { + "471-D\u00e9biteurs et cr\u00e9diteurs divers": { + "D\u00e9biteurs divers": { + "account_number": "4711" + }, + "Cr\u00e9diteurs divers": { + "account_number": "4712" + }, + "Obligataires": { + "account_number": "4713" + }, + "R\u00e9mun\u00e9rations d\u2019administrateurs": { + "account_number": "4715" + }, + "Compte d\u2019affacturage": { + "account_number": "4716" + }, + "D\u00e9biteurs divers retenues de garantie": { + "account_number": "4717" + }, + "Apport, compte de fusion et op\u00e9rations assimil\u00e9es": { + "account_number": "4718" + }, + "Bons de souscription d\u2019actions et d\u2019obligations": { + "account_number": "4719" + } + }, + "474-Compte de r\u00e9partition p\u00e9riodique des charges et des produits (PASSIF)": { + "Compte de r\u00e9partition p\u00e9riodique des charges": { + "account_number": "4746" + } + }, + "475-Compte transitoire, ajustement sp\u00e9cial li\u00e9 \u00e0 la r\u00e9vision du SYSCOHADA (PASSIF)": { + "Compte passif": { + "account_number": "4752" + } + }, + "Produits constat\u00e9s d\u2019avance": { + "account_number": "477" + }, + "479-\u00c9carts de conversion passif": { + "Augmentation des cr\u00e9ances d\u2019exploitation": { + "account_number": "4791" + }, + "Augmentation des cr\u00e9ances financi\u00e8res": { + "account_number": "4792" + }, + "Diminution des dettes d\u2019exploitation": { + "account_number": "4793" + }, + "Diminution des dettes financi\u00e8res": { + "account_number": "4794" + }, + "Diff\u00e9rences d\u2019\u00e9valuation sur instruments de tr\u00e9sorerie": { + "account_number": "4797" + }, + "Diff\u00e9rences compens\u00e9es par couverture de change": { + "account_number": "4798" + } + } + }, + "48-Cr\u00e9ances et dettes hors activit\u00e9s ordinaires (HAO) (PASSIF)": { + "Fournisseurs d\u2019investissements": { + "Immobilisations incorporelles": { + "account_number": "4811" + }, + "Immobilisations corporelles": { + "account_number": "4812" + }, + "Versements restant \u00e0 effectuer sur titres de participation et titres immobilis\u00e9s non lib\u00e9r\u00e9s": { + "account_number": "4813" + }, + "R\u00e9serve de propri\u00e9t\u00e9": { + "account_number": "4816" + }, + "Retenues de garantie": { + "account_number": "4817" + }, + "Factures non parvenues": { + "account_number": "4818" + }, + "account_number": "481" + }, + "Fournisseurs d\u2019investissements, effets \u00e0 payer": { + "Immobilisations incorporelles": { + "account_number": "4821" + }, + "Immobilisations corporelles": { + "account_number": "4822" + }, + "account_number": "482" + }, + "Autres dettes hors activit\u00e9s ordinaires (HAO)": { + "Produits": { + "account_number": "4887" + }, + "account_number": "484" + } + }, + "root_type": "Liability" + }, + "Comptes de tr\u00e9sorerie": { + "Titres de placement": { + "Titres du tr\u00e9sor et bons de caisse \u00e0 court terme": { + "Titres du Tr\u00e9sor \u00e0 court terme": { + "account_number": "5011" + }, + "Titres d\u2019organismes financiers": { + "account_number": "5012" + }, + "Bons de caisse \u00e0 court terme": { + "account_number": "5013" + }, + "Frais d\u2019acquisition des titres de tr\u00e9sor et bons de caisse": { + "account_number": "5016" + }, + "account_number": "501" + }, + "Actions": { + "Actions ou parts propres": { + "account_number": "5021" + }, + "Actions cot\u00e9es": { + "account_number": "5022" + }, + "Actions non cot\u00e9es": { + "account_number": "5023" + }, + "Actions d\u00e9membr\u00e9es (certificats d\u2019investissement, droits de vote)": { + "account_number": "5024" + }, + "Autres actions": { + "account_number": "5025" + }, + "Frais d\u2019acquisition des actions": { + "account_number": "5026" + }, + "account_number": "502" + }, + "Obligations": { + "Obligations \u00e9mises par la soci\u00e9t\u00e9 et rachet\u00e9es par elle": { + "account_number": "5031" + }, + "Obligations cot\u00e9es": { + "account_number": "5032" + }, + "Obligations non cot\u00e9es": { + "account_number": "5033" + }, + "Autres obligations": { + "account_number": "5035" + }, + "Frais d\u2019acquisition des obligations": { + "account_number": "5036" + }, + "account_number": "503" + }, + "Bons de souscription": { + "Bons de souscription d\u2019actions": { + "account_number": "5042" + }, + "Bons de souscription d\u2019obligations": { + "account_number": "5043" + }, + "account_number": "504" + }, + "Titres n\u00e9gociables hors r\u00e9gion": { + "account_number": "505" + }, + "Int\u00e9r\u00eats courus": { + "Titres du Tr\u00e9sor et bons de caisse \u00e0 court terme": { + "account_number": "5061" + }, + "Actions": { + "account_number": "5062" + }, + "Obligations": { + "account_number": "5063" + }, + "account_number": "506" + }, + "Autres titres de placement et cr\u00e9ances assimil\u00e9es": { + "account_number": "508" + }, + "account_number": "50" + }, + "Valeurs \u00e0 encaisser": { + "Effets \u00e0 encaisser": { + "account_number": "511" + }, + "Effets \u00e0 l\u2019encaissement": { + "account_number": "512" + }, + "Ch\u00e8ques \u00e0 encaisser": { + "account_number": "513" + }, + "Ch\u00e8ques \u00e0 l\u2019encaissement": { + "account_number": "514" + }, + "Cartes de cr\u00e9dit \u00e0 encaisser": { + "account_number": "515" + }, + "Autres valeurs \u00e0 l\u2019encaissement": { + "Warrants": { + "account_number": "5181" + }, + "Billets de fonds": { + "account_number": "5182" + }, + "Ch\u00e8ques de voyage": { + "account_number": "5185" + }, + "Coupons \u00e9chus": { + "account_number": "5186" + }, + "Int\u00e9r\u00eats \u00e9chus des obligations": { + "account_number": "5187" + }, + "account_number": "518" + }, + "account_number": "51" + }, + "Banques": { + "Banques locales": { + "Banques en monnaie nationale": { + "account_type": "Bank", + "account_number": "5211" + }, + "Banques en devises": { + "account_type": "Bank", + "account_number": "5215" + }, + "account_type": "Bank", + "account_number": "521" + }, + "Banques autres \u00c9tats r\u00e9gion": { + "account_number": "522" + }, + "Banques autres \u00c9tats zone mon\u00e9taire": { + "account_number": "523" + }, + "Banques hors zone mon\u00e9taire": { + "account_number": "524" + }, + "Banques d\u00e9p\u00f4t \u00e0 terme": { + "account_number": "525" + }, + "Banques, int\u00e9r\u00eats courus": { + "Banque, int\u00e9r\u00eats courus, charges \u00e0 payer": { + "account_number": "5261" + }, + "Banque, int\u00e9r\u00eats courus, produits \u00e0 recevoir": { + "account_number": "5267" + }, + "account_number": "526" + }, + "account_number": "52" + }, + "\u00c9tablissements financiers et assimil\u00e9s": { + "Ch\u00e8ques postaux": { + "account_number": "531" + }, + "Tr\u00e9sor": { + "account_number": "532" + }, + "Soci\u00e9t\u00e9s de gestion et d\u2019interm\u00e9diation (SGI)": { + "account_number": "533" + }, + "\u00c9tablissements financiers, int\u00e9r\u00eats courus": { + "account_number": "536" + }, + "Autres organismes financiers": { + "account_number": "538" + }, + "account_number": "53" + }, + "Instruments de tr\u00e9sorerie": { + "Options de taux d\u2019int\u00e9r\u00eat": { + "account_number": "541" + }, + "Options de taux de change": { + "account_number": "542" + }, + "Options de taux boursiers": { + "account_number": "543" + }, + "Instruments de march\u00e9s \u00e0 terme": { + "account_number": "544" + }, + "Avoirs d\u2019or et autres m\u00e9taux pr\u00e9cieux": { + "account_number": "545" + }, + "account_number": "54" + }, + "Instruments de monnaie \u00e9lectronique": { + "Monnaie \u00e9lectronique carte carburant": { + "account_number": "551" + }, + "Monnaie \u00e9lectronique t\u00e9l\u00e9phone portable": { + "account_number": "552" + }, + "Monnaie \u00e9lectronique carte p\u00e9age": { + "account_number": "553" + }, + "Porte-monnaie \u00e9lectronique": { + "account_number": "554" + }, + "Autres instruments de monnaies \u00e9lectroniques": { + "account_number": "558" + }, + "account_number": "55" + }, + "Banques, cr\u00e9dits de tr\u00e9sorerie et d\u2019escompte": { + "Cr\u00e9dits de tr\u00e9sorerie": { + "account_number": "561" + }, + "Escompte de cr\u00e9dits de campagne": { + "account_number": "564" + }, + "Escompte de cr\u00e9dits ordinaires": { + "account_number": "565" + }, + "Banques, cr\u00e9dits de tr\u00e9sorerie, int\u00e9r\u00eats courus": { + "account_number": "566" + }, + "account_number": "56" + }, + "Caisse": { + "Caisse si\u00e8ge social": { + "Caisse en monnaie nationale": { + "account_number": "5711" + }, + "Caisse en devises": { + "account_number": "5712" + }, + "account_number": "571" + }, + "Caisse succursale A": { + "En monnaie nationale": { + "account_number": "5721" + }, + "En devises": { + "account_number": "5722" + }, + "account_number": "572" + }, + "Caisse succursale B": { + "En monnaie nationale": { + "account_number": "5731" + }, + "En devises": { + "account_number": "5732" + }, + "account_number": "573" + }, + "account_number": "57" + }, + "R\u00e9gies d\u2019avances, accr\u00e9ditifs et virements internes": { + "R\u00e9gies d\u2019avance": { + "account_number": "581" + }, + "Accr\u00e9ditifs": { + "account_number": "582" + }, + "Virements de fonds": { + "account_number": "585" + }, + "Autres virements internes": { + "account_number": "588" + }, + "account_number": "58" + }, + "D\u00e9pr\u00e9ciations et provisions pour risque \u00e0 court terme": { + "D\u00e9pr\u00e9ciations des titres de placement": { + "account_number": "590" + }, + "D\u00e9pr\u00e9ciations des titres et valeurs \u00e0 encaisser": { + "account_number": "591" + }, + "D\u00e9pr\u00e9ciations des comptes banques": { + "account_number": "592" + }, + "D\u00e9pr\u00e9ciations des comptes \u00e9tablissements financiers et assimil\u00e9s": { + "account_number": "593" + }, + "D\u00e9pr\u00e9ciations des comptes d\u2019instruments de tr\u00e9sorerie": { + "account_number": "594" + }, + "Provisions pour risque \u00e0 court terme \u00e0 caract\u00e8re financier": { + "account_number": "599" + }, + "account_number": "59" + }, + "root_type": "Asset", + "account_number": "5" + }, + "Comptes de charges des activit\u00e9s ordinaires": { + "Achats et variations de stocks": { + "Achats de marchandises": { + "Dans la R\u00e9gion": { + "account_number": "6011" + }, + "Hors R\u00e9gion": { + "account_number": "6012" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "6013" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "6014" + }, + "Frais sur achats": { + "account_number": "6015" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6019" + }, + "account_number": "601" + }, + "Achats de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "Dans la R\u00e9gion": { + "account_number": "6021" + }, + "Hors R\u00e9gion": { + "account_number": "6022" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "6023" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "6024" + }, + "Frais sur achats": { + "account_number": "6025" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6029" + }, + "account_number": "602" + }, + "Variations des stocks de biens achet\u00e9s": { + "Variations des stocks de marchandises": { + "account_number": "6031" + }, + "Variations des stocks de mati\u00e8res premi\u00e8res et fournitures li\u00e9es": { + "account_number": "6032" + }, + "Variations des stocks d\u2019autres approvisionnements": { + "account_number": "6033" + }, + "account_number": "603" + }, + "Achats stock\u00e9s de mati\u00e8res et fournitures consommables": { + "Mati\u00e8res consommables": { + "account_number": "6041" + }, + "Mati\u00e8res combustibles": { + "account_number": "6042" + }, + "Produits d\u2019entretien": { + "account_number": "6043" + }, + "Fournitures d\u2019atelier et d\u2019usine": { + "account_number": "6044" + }, + "Frais sur achat": { + "account_number": "6045" + }, + "Fournitures de magasin": { + "account_number": "6046" + }, + "Fournitures de bureau": { + "account_number": "6047" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6049" + }, + "account_number": "604" + }, + "Autres achats": { + "Fournitures non stockables Eau": { + "account_number": "6051" + }, + "Fournitures non stockables \u00c9lectricit\u00e9": { + "account_number": "6052" + }, + "Fournitures non stockables Autres \u00e9nergies": { + "account_number": "6053" + }, + "Fournitures d\u2019entretien non stockables": { + "account_number": "6054" + }, + "Fournitures de bureau non stockables": { + "account_number": "6055" + }, + "Achats de petit mat\u00e9riel et outillage": { + "account_number": "6056" + }, + "Achats d\u2019\u00e9tudes et prestations de services": { + "account_number": "6057" + }, + "Achats de travaux, mat\u00e9riels et \u00e9quipements": { + "account_number": "6058" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6059" + }, + "account_number": "605" + }, + "Achats d\u2019emballages": { + "Emballages perdus": { + "account_number": "6081" + }, + "Emballages r\u00e9cup\u00e9rables non identifiables": { + "account_number": "6082" + }, + "Emballages \u00e0 usage mixte": { + "account_number": "6083" + }, + "Frais sur achats": { + "account_number": "6085" + }, + "Rabais, remises et ristournes obtenus (non ventil\u00e9s)": { + "account_number": "6089" + }, + "account_number": "608" + }, + "account_number": "60" + }, + "Transports": { + "Transports sur ventes": { + "account_number": "612" + }, + "Transports pour le compte de tiers": { + "account_number": "613" + }, + "Transports du personnel": { + "account_number": "614" + }, + "Transports de plis": { + "account_number": "616" + }, + "Autres frais de transport": { + "Voyages et d\u00e9placements": { + "account_number": "6181" + }, + "Transports entre \u00e9tablissements ou chantiers": { + "account_number": "6182" + }, + "Transports administratifs": { + "account_number": "6183" + }, + "account_number": "618" + }, + "account_number": "61" + }, + "Services ext\u00e9rieurs": { + "Sous-traitance g\u00e9n\u00e9rale": { + "account_number": "621" + }, + "Locations, charges locatives": { + "Locations de terrains": { + "account_number": "6221" + }, + "Locations de b\u00e2timents": { + "account_number": "6222" + }, + "Locations de mat\u00e9riels et outillages": { + "account_number": "6223" + }, + "Malis sur emballages": { + "account_number": "6224" + }, + "Locations d\u2019emballages": { + "account_number": "6225" + }, + "Fermages et loyers du foncier": { + "account_number": "6226" + }, + "Locations et charges locatives diverses": { + "account_number": "6228" + }, + "account_number": "622" + }, + "Redevances de location acquisition": { + "Cr\u00e9dit-bail immobilier": { + "account_number": "6232" + }, + "Cr\u00e9dit-bail mobilier": { + "account_number": "6233" + }, + "Location-vente": { + "account_number": "6234" + }, + "Autres contrats de location acquisition": { + "account_number": "6238" + }, + "account_number": "623" + }, + "Entretien, r\u00e9parations, remise en \u00e9tat et maintenance": { + "Entretien et r\u00e9parations des biens immobiliers": { + "account_number": "6241" + }, + "Entretien et r\u00e9parations des biens mobiliers": { + "account_number": "6242" + }, + "Maintenance": { + "account_number": "6243" + }, + "Charges de d\u00e9mant\u00e8lement et remise en \u00e9tat": { + "account_number": "6244" + }, + "Autres entretiens et r\u00e9parations": { + "account_number": "6248" + }, + "account_number": "624" + }, + "Primes d\u2019assurance": { + "Assurances multirisques": { + "account_number": "6251" + }, + "Assurances mat\u00e9riel de transport": { + "account_number": "6252" + }, + "Assurances risques d\u2019exploitation": { + "account_number": "6253" + }, + "Assurances responsabilit\u00e9 du producteur": { + "account_number": "6254" + }, + "Assurances insolvabilit\u00e9 clients": { + "account_number": "6255" + }, + "Assurances transport sur ventes": { + "account_number": "6257" + }, + "Autres primes d\u2019assurances": { + "account_number": "6258" + }, + "account_number": "625" + }, + "\u00c9tudes, recherches et documentation": { + "\u00c9tudes et recherches": { + "account_number": "6261" + }, + "Documentation g\u00e9n\u00e9rale": { + "account_number": "6265" + }, + "Documentation technique": { + "account_number": "6266" + }, + "account_number": "626" + }, + "Publicit\u00e9, publications, relations publiques": { + "Annonces, insertions": { + "account_number": "6271" + }, + "Catalogues, imprim\u00e9s publicitaires": { + "account_number": "6272" + }, + "\u00c9chantillons": { + "account_number": "6273" + }, + "Foires et expositions": { + "account_number": "6274" + }, + "Publications": { + "account_number": "6275" + }, + "Cadeaux \u00e0 la client\u00e8le": { + "account_number": "6276" + }, + "Frais de colloques, s\u00e9minaires, conf\u00e9rences": { + "account_number": "6277" + }, + "Autres charges de publicit\u00e9 et relations publiques": { + "account_number": "6278" + }, + "account_number": "627" + }, + "Frais de t\u00e9l\u00e9communications": { + "Frais de t\u00e9l\u00e9phone": { + "account_number": "6281" + }, + "Frais de t\u00e9lex": { + "account_number": "6282" + }, + "Frais de t\u00e9l\u00e9copie": { + "account_number": "6283" + }, + "Autres frais de t\u00e9l\u00e9communications": { + "account_number": "6288" + }, + "account_number": "628" + }, + "account_number": "62" + }, + "Autres services ext\u00e9rieurs": { + "Frais bancaires": { + "Frais sur titres (vente, garde)": { + "account_number": "6311" + }, + "Frais sur effets": { + "account_number": "6312" + }, + "Location de coffres": { + "account_number": "6313" + }, + "Commissions d\u2019affacturage": { + "account_number": "6314" + }, + "Commissions sur cartes de cr\u00e9dit": { + "account_number": "6315" + }, + "Frais d\u2019\u00e9mission d\u2019emprunts": { + "account_number": "6316" + }, + "Frais sur instruments monnaie \u00e9lectronique": { + "account_number": "6317" + }, + "Autres frais bancaires": { + "account_number": "6318" + }, + "account_number": "631" + }, + "R\u00e9mun\u00e9rations d\u2019interm\u00e9diaires et de conseils": { + "Commissions et courtages sur ventes": { + "account_number": "6322" + }, + "Honoraires des professions r\u00e9glement\u00e9es": { + "account_number": "6324" + }, + "Frais d\u2019actes et de contentieux": { + "account_number": "6325" + }, + "R\u00e9mun\u00e9rations d\u2019affacturage": { + "account_number": "6326" + }, + "R\u00e9mun\u00e9rations des autres prestataires de services": { + "account_number": "6327" + }, + "Divers frais": { + "account_number": "6328" + }, + "account_number": "632" + }, + "Frais de formation du personnel": { + "account_number": "633" + }, + "Redevances pour brevets, licences, logiciels, concessions et droits et valeurs similaires": { + "Redevances pour brevets, licences": { + "account_number": "6342" + }, + "Redevances pour logiciels": { + "account_number": "6343" + }, + "Redevances pour marques": { + "account_number": "6344" + }, + "Redevances pour sites internet": { + "account_number": "6345" + }, + "Redevances pour concessions, droits et valeurs similaires": { + "account_number": "6346" + }, + "account_number": "634" + }, + "Cotisations": { + "Cotisations": { + "account_number": "6351" + }, + "Concours divers": { + "account_number": "6358" + }, + "account_number": "635" + }, + "R\u00e9mun\u00e9rations de personnel ext\u00e9rieur \u00e0 l\u2019entit\u00e9": { + "Personnel int\u00e9rimaire": { + "account_number": "6371" + }, + "Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": { + "account_number": "6372" + }, + "account_number": "637" + }, + "Autres charges externes": { + "Frais de recrutement du personnel": { + "account_number": "6381" + }, + "Frais de d\u00e9m\u00e9nagement": { + "account_number": "6382" + }, + "R\u00e9ceptions": { + "account_number": "6383" + }, + "Missions": { + "account_number": "6384" + }, + "Charges de copropri\u00e9t\u00e9": { + "account_number": "6385" + }, + "account_number": "638" + }, + "account_number": "63" + }, + "Imp\u00f4ts et taxes": { + "Imp\u00f4ts et taxes directs": { + "Imp\u00f4ts fonciers et taxes annexes": { + "account_number": "6411" + }, + "Patentes, licences et taxes annexes": { + "account_number": "6412" + }, + "Taxes sur appointements et salaires": { + "account_number": "6413" + }, + "Taxes d\u2019apprentissage": { + "account_number": "6414" + }, + "Formation professionnelle continue": { + "account_number": "6415" + }, + "Autres imp\u00f4ts et taxes directs": { + "account_number": "6418" + }, + "account_number": "641" + }, + "Imp\u00f4ts et taxes indirects": { + "account_number": "645" + }, + "Droits d\u2019enregistrement": { + "Droits de mutation": { + "account_number": "6461" + }, + "Droits de timbre": { + "account_number": "6462" + }, + "Taxes sur les v\u00e9hicules de soci\u00e9t\u00e9": { + "account_number": "6463" + }, + "Vignettes": { + "account_number": "6464" + }, + "Autres droits": { + "account_number": "6468" + }, + "account_number": "646" + }, + "P\u00e9nalit\u00e9s, amendes fiscales": { + "P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts directs": { + "account_number": "6471" + }, + "P\u00e9nalit\u00e9s d\u2019assiette, imp\u00f4ts indirects": { + "account_number": "6472" + }, + "P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts directs": { + "account_number": "6473" + }, + "P\u00e9nalit\u00e9s de recouvrement, imp\u00f4ts indirects": { + "account_number": "6474" + }, + "Autres p\u00e9nalit\u00e9s et amendes fiscales": { + "account_number": "6478" + }, + "account_number": "647" + }, + "Autres imp\u00f4ts et taxes": { + "account_number": "648" + }, + "account_number": "64" + }, + "Autres charges": { + "Pertes sur cr\u00e9ances clients et autres d\u00e9biteurs": { + "Clients": { + "account_number": "6511" + }, + "Autres d\u00e9biteurs": { + "account_number": "6515" + }, + "account_number": "651" + }, + "Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "Quote-part transf\u00e9r\u00e9e de b\u00e9n\u00e9fices (comptabilit\u00e9 du g\u00e9rant)": { + "account_number": "6521" + }, + "Pertes imput\u00e9es par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": { + "account_number": "6525" + }, + "account_number": "652" + }, + "Valeurs comptables des cessions courantes d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "6541" + }, + "Immobilisations corporelles": { + "account_number": "6542" + }, + "account_number": "654" + }, + "Perte de change sur cr\u00e9ances et dettes commerciale": { + "account_number": "656" + }, + "P\u00e9nalit\u00e9s et amendes p\u00e9nales": { + "account_number": "657" + }, + "Charges diverses": { + "Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": { + "account_number": "6581" + }, + "Dons": { + "account_number": "6582" + }, + "M\u00e9c\u00e9nat": { + "account_number": "6583" + }, + "Autres charges diverses": { + "account_number": "6588" + }, + "account_number": "658" + }, + "Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "Sur risques \u00e0 court terme": { + "account_number": "6591" + }, + "Sur stocks": { + "account_number": "6593" + }, + "Sur cr\u00e9ances": { + "account_number": "6594" + }, + "Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme": { + "account_number": "6598" + }, + "account_number": "659" + }, + "account_number": "65" + }, + "Charges de personnel": { + "R\u00e9mun\u00e9rations directes vers\u00e9es au personnel national": { + "Appointements salaires et commissions": { + "account_number": "6611" + }, + "Primes et gratifications": { + "account_number": "6612" + }, + "Cong\u00e9s pay\u00e9s": { + "account_number": "6613" + }, + "Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": { + "account_number": "6614" + }, + "Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": { + "account_number": "6615" + }, + "Suppl\u00e9ment familial": { + "account_number": "6616" + }, + "Avantages en nature": { + "account_number": "6617" + }, + "Autres r\u00e9mun\u00e9rations directes": { + "account_number": "6618" + }, + "account_number": "661" + }, + "R\u00e9mun\u00e9rations directes vers\u00e9es au personnel non national": { + "Appointements salaires et commissions": { + "account_number": "6621" + }, + "Primes et gratifications": { + "account_number": "6622" + }, + "Cong\u00e9s pay\u00e9s": { + "account_number": "6623" + }, + "Indemnit\u00e9s de pr\u00e9avis, de licenciement et de recherche d\u2019embauche": { + "account_number": "6624" + }, + "Indemnit\u00e9s de maladie vers\u00e9es aux travailleurs": { + "account_number": "6625" + }, + "Suppl\u00e9ment familial": { + "account_number": "6626" + }, + "Avantages en nature": { + "account_number": "6627" + }, + "Autres r\u00e9mun\u00e9rations directes": { + "account_number": "6628" + }, + "account_number": "662" + }, + "Indemnit\u00e9s forfaitaires vers\u00e9es au personnel": { + "Indemnit\u00e9s de logement": { + "account_number": "6631" + }, + "Indemnit\u00e9s de repr\u00e9sentation": { + "account_number": "6632" + }, + "Indemnit\u00e9s d\u2019expatriation": { + "account_number": "6633" + }, + "Indemnit\u00e9s de transport": { + "account_number": "6634" + }, + "Autres indemnit\u00e9s et avantages divers": { + "account_number": "6638" + }, + "account_number": "663" + }, + "Charges sociales": { + "Charges sociales sur r\u00e9mun\u00e9ration du personnel national": { + "account_number": "6641" + }, + "Charges sociales sur r\u00e9mun\u00e9ration du personnel non national": { + "account_number": "6642" + }, + "account_number": "664" + }, + "R\u00e9mun\u00e9rations et charges sociales de l\u2019exploitant individuel": { + "R\u00e9mun\u00e9ration du travail de l\u2019exploitant": { + "account_number": "6661" + }, + "Charges sociales": { + "account_number": "6662" + }, + "account_number": "666" + }, + "R\u00e9mun\u00e9ration transf\u00e9r\u00e9e de personnel ext\u00e9rieur": { + "Personnel int\u00e9rimaire": { + "account_number": "6671" + }, + "Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l\u2019entit\u00e9": { + "account_number": "6672" + }, + "account_number": "667" + }, + "Autres charges sociales": { + "Versements aux syndicats et comit\u00e9s d\u2019entreprise, d\u2019\u00e9tablissement": { + "account_number": "6681" + }, + "Versements aux comit\u00e9s d\u2019hygi\u00e8ne et de s\u00e9curit\u00e9": { + "account_number": "6682" + }, + "Versements et contributions aux autres \u0153uvres sociales": { + "account_number": "6683" + }, + "M\u00e9decine du travail et pharmacie": { + "account_number": "6684" + }, + "Assurances et organismes de sant\u00e9": { + "account_number": "6685" + }, + "Assurances retraite et fonds de pension": { + "account_number": "6686" + }, + "Majorations et p\u00e9nalit\u00e9s sociales": { + "account_number": "6687" + }, + "Charges sociales diverses": { + "account_number": "6688" + }, + "account_number": "668" + }, + "account_number": "66" + }, + "Frais financiers et charges assimil\u00e9es": { + "Int\u00e9r\u00eats des emprunts": { + "Emprunts obligataires": { + "account_number": "6711" + }, + "Emprunts aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": { + "account_number": "6712" + }, + "Dettes li\u00e9es \u00e0 des participations": { + "account_number": "6713" + }, + "Primes de remboursement des obligations": { + "account_number": "6714" + }, + "account_number": "671" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition": { + "Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail immobilier": { + "account_number": "6722" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition / cr\u00e9dit-bail mobilier": { + "account_number": "6723" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition / location-vente": { + "account_number": "6724" + }, + "Int\u00e9r\u00eats dans loyers des autres locations acquisition": { + "account_number": "6728" + }, + "account_number": "672" + }, + "Escomptes accord\u00e9s": { + "account_number": "673" + }, + "Autres int\u00e9r\u00eats": { + "Avances re\u00e7ues et d\u00e9p\u00f4ts cr\u00e9diteurs": { + "account_number": "6741" + }, + "Comptes courants bloqu\u00e9s": { + "account_number": "6742" + }, + "Int\u00e9r\u00eats sur obligations cautionn\u00e9es": { + "account_number": "6743" + }, + "Int\u00e9r\u00eats sur dettes commerciales": { + "account_number": "6744" + }, + "Int\u00e9r\u00eats bancaires et sur op\u00e9rations de financement (escompte...)": { + "account_number": "6745" + }, + "Int\u00e9r\u00eats sur dettes diverses": { + "account_number": "6748" + }, + "account_number": "674" + }, + "Escomptes des effets de commerce": { + "account_number": "675" + }, + "Pertes de change financi\u00e8res": { + "account_number": "676" + }, + "Pertes sur titres de placement": { + "Pertes sur cessions de titres de placement": { + "account_number": "6771" + }, + "Mali provenant d\u2019attribution gratuite d\u2019actions au personnel salari\u00e9 et aux dirigeants": { + "account_number": "6772" + }, + "account_number": "677" + }, + "Pertes et charges sur risques financiers": { + "Sur rentes viag\u00e8res": { + "account_number": "6781" + }, + "Sur op\u00e9rations financi\u00e8res": { + "account_number": "6782" + }, + "Sur instruments de tr\u00e9sorerie": { + "account_number": "6784" + }, + "account_number": "678" + }, + "Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "Sur risques financiers": { + "account_number": "6791" + }, + "Sur titres de placement": { + "account_number": "6795" + }, + "Autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "account_number": "6798" + }, + "account_number": "679" + }, + "account_number": "67" + }, + "Dotations aux amortissements": { + "Dotations aux amortissements d\u2019exploitation": { + "Dotations aux amortissements des immobilisations incorporelles": { + "account_number": "6812" + }, + "Dotations aux amortissements des immobilisations corporelles": { + "account_number": "6813" + }, + "account_number": "681" + }, + "account_number": "68" + }, + "Dotations aux provisions et aux d\u00e9pr\u00e9ciations": { + "Dotations aux provisions et aux d\u00e9pr\u00e9ciations d\u2019exploitation": { + "Dotations aux provisions pour risques et charges": { + "account_number": "6911" + }, + "Dotations aux d\u00e9pr\u00e9ciations des immobilisations incorporelles": { + "account_number": "6913" + }, + "Dotations aux d\u00e9pr\u00e9ciations des immobilisations corporelles": { + "account_number": "6914" + }, + "account_number": "691" + }, + "Dotations aux provisions et aux d\u00e9pr\u00e9ciations financi\u00e8res": { + "Dotations aux provisions pour risques et charges": { + "account_number": "6971" + }, + "Dotations aux d\u00e9pr\u00e9ciations des immobilisations financi\u00e8res": { + "account_number": "6972" + }, + "account_number": "697" + }, + "account_number": "69" + }, + "root_type": "Expense", + "account_number": "6" + }, + "Comptes de produits des activit\u00e9s ordinaires": { + "Ventes": { + "Ventes de marchandises": { + "Dans la R\u00e9gion": { + "account_number": "7011" + }, + "Hors R\u00e9gion": { + "account_number": "7012" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7013" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7014" + }, + "Sur internet": { + "account_number": "7015" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7019" + }, + "account_number": "701" + }, + "Ventes de produits finis": { + "Dans la R\u00e9gion": { + "account_number": "7021" + }, + "Hors R\u00e9gion": { + "account_number": "7022" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7023" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7024" + }, + "Sur internet": { + "account_number": "7025" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7029" + }, + "account_number": "702" + }, + "Ventes de produits interm\u00e9diaires": { + "Dans la R\u00e9gion": { + "account_number": "7031" + }, + "Hors R\u00e9gion": { + "account_number": "7032" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7033" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7034" + }, + "Sur internet": { + "account_number": "7035" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7039" + }, + "account_number": "703" + }, + "Ventes de produits r\u00e9siduels": { + "Dans la R\u00e9gion": { + "account_number": "7041" + }, + "Hors R\u00e9gion": { + "account_number": "7042" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7043" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7044" + }, + "Sur internet": { + "account_number": "7045" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7049" + }, + "account_number": "704" + }, + "Travaux factur\u00e9s": { + "Dans la R\u00e9gion": { + "account_number": "7051" + }, + "Hors R\u00e9gion": { + "account_number": "7052" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7053" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7054" + }, + "Sur internet": { + "account_number": "7055" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7059" + }, + "account_number": "705" + }, + "Services vendus": { + "Dans la R\u00e9gion": { + "account_number": "7061" + }, + "Hors R\u00e9gion": { + "account_number": "7062" + }, + "Aux entit\u00e9s du groupe dans la R\u00e9gion": { + "account_number": "7063" + }, + "Aux entit\u00e9s du groupe hors R\u00e9gion": { + "account_number": "7064" + }, + "Sur internet": { + "account_number": "7065" + }, + "Rabais, remises, ristournes accord\u00e9s (non ventil\u00e9s)": { + "account_number": "7069" + }, + "account_number": "706" + }, + "Produits accessoires": { + "Ports, emballages perdus et autres frais factur\u00e9s": { + "account_number": "7071" + }, + "Commissions et courtages": { + "account_number": "7072" + }, + "Locations": { + "account_number": "7073" + }, + "Bonis sur reprises et cessions d\u2019emballages": { + "account_number": "7074" + }, + "Mise \u00e0 disposition de personnel": { + "account_number": "7075" + }, + "Redevances pour brevets, logiciels, marques et droits similaires": { + "account_number": "7076" + }, + "Services exploit\u00e9s dans l\u2019int\u00e9r\u00eat du personnel": { + "account_number": "7077" + }, + "Autres produits accessoires": { + "account_number": "7078" + }, + "account_number": "707" + }, + "account_number": "70" + }, + "Subventions d\u2019exploitation": { + "Sur produits \u00e0 l\u2019exportation": { + "account_number": "711" + }, + "Sur produits \u00e0 l\u2019importation": { + "account_number": "712" + }, + "Sur produits de p\u00e9r\u00e9quation": { + "account_number": "713" + }, + "Indemnit\u00e9s et subventions d\u2019exploitation (entit\u00e9 agricole)": { + "account_number": "714" + }, + "Autres subventions d\u2019exploitation": { + "Vers\u00e9es par l\u2019\u00c9tat et les collectivit\u00e9s publiques": { + "account_number": "7181" + }, + "Vers\u00e9es par les organismes internationaux": { + "account_number": "7182" + }, + "Vers\u00e9es par des tiers": { + "account_number": "7183" + }, + "account_number": "718" + }, + "account_number": "71" + }, + "Production immobilis\u00e9e": { + "Immobilisations incorporelles": { + "account_number": "721" + }, + "Immobilisations corporelles": { + "Immobilisations corporelles (hors actifs biologiques)": { + "account_number": "7221" + }, + "Immobilisations corporelles (actifs biologiques)": { + "account_number": "7222" + }, + "account_number": "722" + }, + "Production auto-consomm\u00e9e": { + "account_number": "724" + }, + "Immobilisations financi\u00e8res": { + "account_number": "726" + }, + "account_number": "72" + }, + "Variations des stocks de biens et de services produits": { + "Variations des stocks de produits en cours": { + "Produits en cours": { + "account_number": "7341" + }, + "Travaux en cours": { + "account_number": "7342" + }, + "account_number": "734" + }, + "Variations des en-cours de services": { + "\u00c9tudes en cours": { + "account_number": "7351" + }, + "Prestations de services en cours": { + "account_number": "7352" + }, + "account_number": "735" + }, + "Variations des stocks de produits finis": { + "account_number": "736" + }, + "Variations des stocks de produits interm\u00e9diaires et r\u00e9siduels": { + "Produits interm\u00e9diaires": { + "account_number": "7371" + }, + "Produits r\u00e9siduels": { + "account_number": "7372" + }, + "account_number": "737" + }, + "account_number": "73" + }, + "Autres produits": { + "Profits sur cr\u00e9ances clients et autres d\u00e9biteurs": { + "account_number": "751" + }, + "Quote-part de r\u00e9sultat sur op\u00e9rations faites en commun": { + "Quote-part transf\u00e9r\u00e9e de pertes (comptabilit\u00e9 du g\u00e9rant)": { + "account_number": "7521" + }, + "B\u00e9n\u00e9fices attribu\u00e9s par transfert (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": { + "account_number": "7525" + }, + "account_number": "752" + }, + "Produits des cessions courantes d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "7541" + }, + "Immobilisations corporelles": { + "account_number": "7542" + }, + "account_number": "754" + }, + "Gains de change sur cr\u00e9ances et dettes commerciales": { + "account_number": "756" + }, + "Produits divers": { + "Indemnit\u00e9s de fonction et autres r\u00e9mun\u00e9rations d\u2019administrateurs": { + "account_number": "7581" + }, + "Indemnit\u00e9s d\u2019assurances re\u00e7ues": { + "account_number": "7582" + }, + "Autres produits divers": { + "account_number": "7588" + }, + "account_number": "758" + }, + "Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "Sur risques \u00e0 court terme": { + "account_number": "7591" + }, + "Sur stocks": { + "account_number": "7593" + }, + "Sur cr\u00e9ances": { + "account_number": "7594" + }, + "Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme d\u2019exploitation": { + "account_number": "7598" + }, + "account_number": "759" + }, + "account_number": "75" + }, + "Revenus financiers et produits assimil\u00e9s": { + "Int\u00e9r\u00eats de pr\u00eats et cr\u00e9ances diverses": { + "Int\u00e9r\u00eats de pr\u00eats": { + "account_number": "7712" + }, + "Int\u00e9r\u00eats sur cr\u00e9ances diverses": { + "account_number": "7713" + }, + "account_number": "771" + }, + "Revenus de participations et autres titres immobilis\u00e9s": { + "Revenus des titres de participation": { + "account_number": "7721" + }, + "Revenus autres titres immobilis\u00e9s": { + "account_number": "7722" + }, + "account_number": "772" + }, + "Escomptes obtenus": { + "account_number": "773" + }, + "Revenus de placement": { + "Revenus des obligations": { + "account_number": "7745" + }, + "Revenus des titres de placement": { + "account_number": "7746" + }, + "account_number": "774" + }, + "Int\u00e9r\u00eats dans loyers de location acquisition": { + "account_number": "775" + }, + "Gains de change financiers": { + "account_number": "776" + }, + "Gains sur cessions de titres de placement": { + "account_number": "777" + }, + "Gains sur risques financiers": { + "Sur rentes viag\u00e8res": { + "account_number": "7781" + }, + "Sur op\u00e9rations financi\u00e8res": { + "account_number": "7782" + }, + "Sur instruments de tr\u00e9sorerie": { + "account_number": "7784" + }, + "account_number": "778" + }, + "Reprises de charges pour d\u00e9pr\u00e9ciations et provisions \u00e0 court terme financi\u00e8res": { + "Sur risques financiers": { + "account_number": "7791" + }, + "Sur titres de placement": { + "account_number": "7795" + }, + "Sur autres charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme financi\u00e8res": { + "account_number": "7798" + }, + "account_number": "779" + }, + "account_number": "77" + }, + "Transferts de charges": { + "Transferts de charges d\u2019exploitation": { + "account_number": "781" + }, + "Transferts de charges financi\u00e8res": { + "account_number": "787" + }, + "account_number": "78" + }, + "Reprises de provisions, de d\u00e9pr\u00e9ciations et autres": { + "Reprises de provisions et d\u00e9pr\u00e9ciations d\u2019exploitation": { + "Pour risques et charges": { + "account_number": "7911" + }, + "Des immobilisations incorporelles": { + "account_number": "7913" + }, + "Des immobilisations corporelles": { + "account_number": "7914" + }, + "account_number": "791" + }, + "Reprises de provisions et d\u00e9pr\u00e9ciations financi\u00e8res": { + "Pour risques et charges": { + "account_number": "7971" + }, + "Des immobilisations financi\u00e8res": { + "account_number": "7972" + }, + "account_number": "797" + }, + "Reprises d\u2019amortissements": { + "account_number": "798" + }, + "Reprises de subventions d\u2019investissement": { + "account_number": "799" + }, + "account_number": "79" + }, + "root_type": "Income", + "account_number": "7" + }, + "8-Comptes des autres charges et des autres produits (CHARGES)": { + "Valeurs comptables des cessions d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "811" + }, + "Immobilisations corporelles": { + "account_number": "812" + }, + "Immobilisations financi\u00e8res": { + "account_number": "816" + }, + "account_number": "81" + }, + "Charges hors activit\u00e9s ordinaires": { + "Charges HAO constat\u00e9es": { + "account_number": "831" + }, + "Charges li\u00e9es aux op\u00e9rations de restructuration": { + "account_number": "833" + }, + "Pertes sur cr\u00e9ances HAO": { + "account_number": "834" + }, + "Dons et lib\u00e9ralit\u00e9s accord\u00e9s": { + "account_number": "835" + }, + "Abandons de cr\u00e9ances consentis": { + "account_number": "836" + }, + "Charges li\u00e9es aux op\u00e9rations de liquidation": { + "account_number": "837" + }, + "Charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": { + "account_number": "839" + }, + "account_number": "83" + }, + "Dotations hors activit\u00e9s ordinaires": { + "Dotations aux provisions r\u00e9glement\u00e9es": { + "account_number": "851" + }, + "Dotations aux amortissements HAO": { + "account_number": "852" + }, + "Dotations aux d\u00e9pr\u00e9ciations HAO": { + "account_number": "853" + }, + "Dotations aux provisions pour risques et charges HAO": { + "account_number": "854" + }, + "Autres dotations HAO": { + "account_number": "858" + }, + "account_number": "85" + }, + "Participation des travailleurs": { + "Participation l\u00e9gale aux b\u00e9n\u00e9fices": { + "account_number": "871" + }, + "Participation contractuelle aux b\u00e9n\u00e9fices": { + "account_number": "874" + }, + "Autres participations": { + "account_number": "878" + }, + "account_number": "87" + }, + "Imp\u00f4ts sur le r\u00e9sultat": { + "Imp\u00f4ts sur les b\u00e9n\u00e9fices de l\u2019exercice": { + "Activit\u00e9s exerc\u00e9es dans l\u2019\u00c9tat": { + "account_number": "8911" + }, + "Activit\u00e9s exerc\u00e9es dans les autres \u00c9tats de la R\u00e9gion": { + "account_number": "8912" + }, + "Activit\u00e9s exerc\u00e9es hors R\u00e9gion": { + "account_number": "8913" + }, + "account_number": "891" + }, + "Rappel d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": { + "account_number": "892" + }, + "Imp\u00f4t minimum forfaitaire IMF": { + "account_number": "895" + }, + "D\u00e9gr\u00e8vements et annulations d\u2019imp\u00f4ts sur r\u00e9sultats ant\u00e9rieurs": { + "D\u00e9gr\u00e8vements": { + "account_number": "8991" + }, + "Annulations pour pertes r\u00e9troactives": { + "account_number": "8994" + }, + "account_number": "899" + }, + "account_number": "89" + }, + "root_type": "Expense" + }, + "8-Comptes des autres charges et des autres produits (PRODUITS)": { + "Produits des cessions d\u2019immobilisations": { + "Immobilisations incorporelles": { + "account_number": "821" + }, + "Immobilisations corporelles": { + "account_number": "822" + }, + "Immobilisations financi\u00e8res": { + "account_number": "826" + }, + "account_number": "82" + }, + "Produits hors activit\u00e9s ordinaires": { + "Produits HAO constat\u00e9s": { + "account_number": "841" + }, + "Produits li\u00e9s aux op\u00e9rations de restructuration": { + "account_number": "843" + }, + "Indemnit\u00e9s et subventions HAO (entit\u00e9 agricole)": { + "account_number": "844" + }, + "Dons et lib\u00e9ralit\u00e9s obtenus": { + "account_number": "845" + }, + "Abandons de cr\u00e9ances obtenus": { + "account_number": "846" + }, + "Produits li\u00e9s aux op\u00e9rations de liquidation": { + "account_number": "847" + }, + "Transferts de charges HAO": { + "account_number": "848" + }, + "Reprises de charges pour d\u00e9pr\u00e9ciations et provisions pour risques \u00e0 court terme HAO": { + "account_number": "849" + }, + "account_number": "84" + }, + "Reprises de charges, provisions et d\u00e9pr\u00e9ciations HAO": { + "Reprises de provisions r\u00e9glement\u00e9es": { + "account_number": "861" + }, + "Reprises d\u2019amortissements HAO": { + "account_number": "862" + }, + "Reprises de d\u00e9pr\u00e9ciations HAO": { + "account_number": "863" + }, + "Reprises de provisions pour risques et charges HAO": { + "account_number": "864" + }, + "Autres reprises HAO": { + "account_number": "868" + }, + "account_number": "86" + }, + "Subventions d\u2019\u00e9quilibre": { + "\u00c9tat": { + "account_number": "881" + }, + "Collectivit\u00e9s publiques": { + "account_number": "884" + }, + "Groupe": { + "account_number": "886" + }, + "Autres": { + "account_number": "888" + }, + "account_number": "88" + }, + "root_type": "Income" + } + } +} \ No newline at end of file From e4f09ce5434127d3f720d6e03c390cc6ddf5e75d Mon Sep 17 00:00:00 2001 From: mahsem <137205921+mahsem@users.noreply.github.com> Date: Sun, 19 Jan 2025 20:52:58 +0100 Subject: [PATCH 0925/1614] fix: translation fixes (cherry picked from commit 1d81a9f9333f96fd7a252d870afa8f121dd7c0e7) --- .../accounts/doctype/accounts_settings/accounts_settings.js | 2 +- .../doctype/plaid_settings/plaid_settings.js | 2 +- erpnext/manufacturing/doctype/bom_creator/bom_creator.py | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/accounts_settings/accounts_settings.js b/erpnext/accounts/doctype/accounts_settings/accounts_settings.js index 4f59085db0a..95332acdc28 100644 --- a/erpnext/accounts/doctype/accounts_settings/accounts_settings.js +++ b/erpnext/accounts/doctype/accounts_settings/accounts_settings.js @@ -12,7 +12,7 @@ frappe.ui.form.on("Accounts Settings", { msg += " "; msg += __("Please enable only if the understand the effects of enabling this."); msg += "
"; - msg += "Do you still want to enable immutable ledger?"; + msg += __("Do you still want to enable immutable ledger?"); frappe.confirm( msg, diff --git a/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.js b/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.js index 3c72f2cbab5..04215e92234 100644 --- a/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.js +++ b/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.js @@ -29,7 +29,7 @@ frappe.ui.form.on("Plaid Settings", { "Bank Transaction", "", true, - "Bank Transaction" + __("Bank Transaction") ); frappe.msgprint({ diff --git a/erpnext/manufacturing/doctype/bom_creator/bom_creator.py b/erpnext/manufacturing/doctype/bom_creator/bom_creator.py index 45407e12fe9..2f86b66b7d5 100644 --- a/erpnext/manufacturing/doctype/bom_creator/bom_creator.py +++ b/erpnext/manufacturing/doctype/bom_creator/bom_creator.py @@ -204,7 +204,9 @@ class BOMCreator(Document): for field, label in fields.items(): if not self.get(field): - frappe.throw(_("Please set {0} in BOM Creator {1}").format(label, self.name)) + frappe.throw( + _("Please set {0} in BOM Creator {1}").format(_(label), self.name) + ) def on_submit(self): self.enqueue_create_boms() From 61303db16d77483df6b9ece033e3367f46b9107a Mon Sep 17 00:00:00 2001 From: mahsem <137205921+mahsem@users.noreply.github.com> Date: Sun, 19 Jan 2025 21:00:02 +0100 Subject: [PATCH 0926/1614] fix: linters (cherry picked from commit 3697ba0772c0e5479ac6951bdb0c14926610837a) --- erpnext/manufacturing/doctype/bom_creator/bom_creator.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/erpnext/manufacturing/doctype/bom_creator/bom_creator.py b/erpnext/manufacturing/doctype/bom_creator/bom_creator.py index 2f86b66b7d5..45ce95b6d58 100644 --- a/erpnext/manufacturing/doctype/bom_creator/bom_creator.py +++ b/erpnext/manufacturing/doctype/bom_creator/bom_creator.py @@ -204,9 +204,7 @@ class BOMCreator(Document): for field, label in fields.items(): if not self.get(field): - frappe.throw( - _("Please set {0} in BOM Creator {1}").format(_(label), self.name) - ) + frappe.throw(_("Please set {0} in BOM Creator {1}").format(_(label), self.name)) def on_submit(self): self.enqueue_create_boms() From 7045c2cc3d2b1a0956e060c7a1c26c0c1884ef72 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 20 Jan 2025 17:34:20 +0530 Subject: [PATCH 0927/1614] fix: set invoice start date to subscription start date (backport #45342) (#45343) fix: set invoice start date to subscription start date (#45342) (cherry picked from commit 68fb1b28eb3d150294ccc3124e45090f73e76949) Co-authored-by: Diptanil Saha --- erpnext/accounts/doctype/subscription/subscription.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/subscription/subscription.py b/erpnext/accounts/doctype/subscription/subscription.py index a3bcdc37c30..8cf08400490 100644 --- a/erpnext/accounts/doctype/subscription/subscription.py +++ b/erpnext/accounts/doctype/subscription/subscription.py @@ -114,10 +114,10 @@ class Subscription(Document): if self.trial_period_end and getdate(self.trial_period_end) > getdate(self.start_date): _current_invoice_start = add_days(self.trial_period_end, 1) - elif self.trial_period_start and self.is_trialling(): - _current_invoice_start = self.trial_period_start elif date: _current_invoice_start = date + elif self.trial_period_start and self.is_trialling(): + _current_invoice_start = self.trial_period_start else: _current_invoice_start = nowdate() From b7de26d12353e2aba3587f50b35dd15b12426a30 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Tue, 21 Jan 2025 13:45:25 +0530 Subject: [PATCH 0928/1614] perf: Ignore is_opening column in GL Queries (#45327) * perf: Ignore is_opening column in GL Queries * chore: Remove unwanted changes * chore: Remove unwanted changes * chore: Remove unwanted changes * chore: Remove unwanted changes * chore: Remove unwanted changes * chore: Remove unwanted changes (cherry picked from commit 993f40fa431a6a9644c53d57109c4780919778cb) --- .../accounts_settings/accounts_settings.json | 10 +++- .../accounts_settings/accounts_settings.py | 1 + .../accounts/report/financial_statements.py | 6 +- .../report/general_ledger/general_ledger.py | 14 ++++- .../report/trial_balance/trial_balance.json | 6 +- .../report/trial_balance/trial_balance.py | 59 ++++++++++++++----- 6 files changed, 74 insertions(+), 22 deletions(-) diff --git a/erpnext/accounts/doctype/accounts_settings/accounts_settings.json b/erpnext/accounts/doctype/accounts_settings/accounts_settings.json index 98007e963ea..6250250a170 100644 --- a/erpnext/accounts/doctype/accounts_settings/accounts_settings.json +++ b/erpnext/accounts/doctype/accounts_settings/accounts_settings.json @@ -76,6 +76,7 @@ "reports_tab", "remarks_section", "general_ledger_remarks_length", + "ignore_is_opening_check_for_reporting", "column_break_lvjk", "receivable_payable_remarks_length", "payment_request_settings", @@ -515,6 +516,13 @@ "fieldname": "reconciliation_queue_size", "fieldtype": "Int", "label": "Reconciliation Queue Size" + }, + { + "default": "0", + "description": "Ignores legacy Is Opening field in GL Entry that allows adding opening balance post the system is in use while generating reports", + "fieldname": "ignore_is_opening_check_for_reporting", + "fieldtype": "Check", + "label": "Ignore Is Opening check for reporting" } ], "icon": "icon-cog", @@ -522,7 +530,7 @@ "index_web_pages_for_search": 1, "issingle": 1, "links": [], - "modified": "2025-01-13 17:38:39.661320", + "modified": "2025-01-18 21:24:19.840745", "modified_by": "Administrator", "module": "Accounts", "name": "Accounts Settings", diff --git a/erpnext/accounts/doctype/accounts_settings/accounts_settings.py b/erpnext/accounts/doctype/accounts_settings/accounts_settings.py index c2dafafc251..590422c6224 100644 --- a/erpnext/accounts/doctype/accounts_settings/accounts_settings.py +++ b/erpnext/accounts/doctype/accounts_settings/accounts_settings.py @@ -48,6 +48,7 @@ class AccountsSettings(Document): frozen_accounts_modifier: DF.Link | None general_ledger_remarks_length: DF.Int ignore_account_closing_balance: DF.Check + ignore_is_opening_check_for_reporting: DF.Check make_payment_via_journal_entry: DF.Check merge_similar_account_heads: DF.Check over_billing_allowance: DF.Currency diff --git a/erpnext/accounts/report/financial_statements.py b/erpnext/accounts/report/financial_statements.py index c653ae1b38f..2ff6f589509 100644 --- a/erpnext/accounts/report/financial_statements.py +++ b/erpnext/accounts/report/financial_statements.py @@ -510,12 +510,16 @@ def get_accounting_entries( .where(gl_entry.company == filters.company) ) + ignore_is_opening = frappe.db.get_single_value( + "Accounts Settings", "ignore_is_opening_check_for_reporting" + ) + if doctype == "GL Entry": query = query.select(gl_entry.posting_date, gl_entry.is_opening, gl_entry.fiscal_year) query = query.where(gl_entry.is_cancelled == 0) query = query.where(gl_entry.posting_date <= to_date) - if ignore_opening_entries: + if ignore_opening_entries and not ignore_is_opening: query = query.where(gl_entry.is_opening == "No") else: query = query.select(gl_entry.closing_date.as_("posting_date")) diff --git a/erpnext/accounts/report/general_ledger/general_ledger.py b/erpnext/accounts/report/general_ledger/general_ledger.py index 69e3d241f12..ed16892a36e 100644 --- a/erpnext/accounts/report/general_ledger/general_ledger.py +++ b/erpnext/accounts/report/general_ledger/general_ledger.py @@ -208,6 +208,10 @@ def get_gl_entries(filters, accounting_dimensions): def get_conditions(filters): conditions = [] + ignore_is_opening = frappe.db.get_single_value( + "Accounts Settings", "ignore_is_opening_check_for_reporting" + ) + if filters.get("account"): filters.account = get_accounts_with_children(filters.account) if filters.account: @@ -270,9 +274,15 @@ def get_conditions(filters): or filters.get("party") or filters.get("group_by") in ["Group by Account", "Group by Party"] ): - conditions.append("(posting_date >=%(from_date)s or is_opening = 'Yes')") + if not ignore_is_opening: + conditions.append("(posting_date >=%(from_date)s or is_opening = 'Yes')") + else: + conditions.append("posting_date >=%(from_date)s") - conditions.append("(posting_date <=%(to_date)s or is_opening = 'Yes')") + if not ignore_is_opening: + conditions.append("(posting_date <=%(to_date)s or is_opening = 'Yes')") + else: + conditions.append("posting_date <=%(to_date)s") if filters.get("project"): conditions.append("project in %(project)s") diff --git a/erpnext/accounts/report/trial_balance/trial_balance.json b/erpnext/accounts/report/trial_balance/trial_balance.json index 8ed96a7161a..af586f7f17d 100644 --- a/erpnext/accounts/report/trial_balance/trial_balance.json +++ b/erpnext/accounts/report/trial_balance/trial_balance.json @@ -14,14 +14,14 @@ "owner": "Administrator", "ref_doctype": "GL Entry", "report_name": "Trial Balance", - "report_type": "Script Report", + "report_type": "Script Report", "roles": [ { "role": "Accounts User" - }, + }, { "role": "Accounts Manager" - }, + }, { "role": "Auditor" } diff --git a/erpnext/accounts/report/trial_balance/trial_balance.py b/erpnext/accounts/report/trial_balance/trial_balance.py index 8ca850f301e..9d1b86ebcdc 100644 --- a/erpnext/accounts/report/trial_balance/trial_balance.py +++ b/erpnext/accounts/report/trial_balance/trial_balance.py @@ -89,6 +89,10 @@ def get_data(filters): ) company_currency = filters.presentation_currency or erpnext.get_company_currency(filters.company) + ignore_is_opening = frappe.db.get_single_value( + "Accounts Settings", "ignore_is_opening_check_for_reporting" + ) + if not accounts: return None @@ -96,7 +100,7 @@ def get_data(filters): gl_entries_by_account = {} - opening_balances = get_opening_balances(filters) + opening_balances = get_opening_balances(filters, ignore_is_opening) # add filter inside list so that the query in financial_statements.py doesn't break if filters.project: @@ -114,7 +118,13 @@ def get_data(filters): ignore_opening_entries=True, ) - calculate_values(accounts, gl_entries_by_account, opening_balances, filters.get("show_net_values")) + calculate_values( + accounts, + gl_entries_by_account, + opening_balances, + filters.get("show_net_values"), + ignore_is_opening=ignore_is_opening, + ) accumulate_values_into_parents(accounts, accounts_by_name) data = prepare_data(accounts, filters, parent_children_map, company_currency) @@ -125,15 +135,15 @@ def get_data(filters): return data -def get_opening_balances(filters): - balance_sheet_opening = get_rootwise_opening_balances(filters, "Balance Sheet") - pl_opening = get_rootwise_opening_balances(filters, "Profit and Loss") +def get_opening_balances(filters, ignore_is_opening): + balance_sheet_opening = get_rootwise_opening_balances(filters, "Balance Sheet", ignore_is_opening) + pl_opening = get_rootwise_opening_balances(filters, "Profit and Loss", ignore_is_opening) balance_sheet_opening.update(pl_opening) return balance_sheet_opening -def get_rootwise_opening_balances(filters, report_type): +def get_rootwise_opening_balances(filters, report_type, ignore_is_opening): gle = [] last_period_closing_voucher = "" @@ -159,16 +169,24 @@ def get_rootwise_opening_balances(filters, report_type): report_type, accounting_dimensions, period_closing_voucher=last_period_closing_voucher[0].name, + ignore_is_opening=ignore_is_opening, ) # Report getting generate from the mid of a fiscal year if getdate(last_period_closing_voucher[0].period_end_date) < getdate(add_days(filters.from_date, -1)): start_date = add_days(last_period_closing_voucher[0].period_end_date, 1) gle += get_opening_balance( - "GL Entry", filters, report_type, accounting_dimensions, start_date=start_date + "GL Entry", + filters, + report_type, + accounting_dimensions, + start_date=start_date, + ignore_is_opening=ignore_is_opening, ) else: - gle = get_opening_balance("GL Entry", filters, report_type, accounting_dimensions) + gle = get_opening_balance( + "GL Entry", filters, report_type, accounting_dimensions, ignore_is_opening=ignore_is_opening + ) opening = frappe._dict() for d in gle: @@ -187,7 +205,13 @@ def get_rootwise_opening_balances(filters, report_type): def get_opening_balance( - doctype, filters, report_type, accounting_dimensions, period_closing_voucher=None, start_date=None + doctype, + filters, + report_type, + accounting_dimensions, + period_closing_voucher=None, + start_date=None, + ignore_is_opening=0, ): closing_balance = frappe.qb.DocType(doctype) account = frappe.qb.DocType("Account") @@ -223,11 +247,16 @@ def get_opening_balance( (closing_balance.posting_date >= start_date) & (closing_balance.posting_date < filters.from_date) ) - opening_balance = opening_balance.where(closing_balance.is_opening == "No") + + if not ignore_is_opening: + opening_balance = opening_balance.where(closing_balance.is_opening == "No") else: - opening_balance = opening_balance.where( - (closing_balance.posting_date < filters.from_date) | (closing_balance.is_opening == "Yes") - ) + if not ignore_is_opening: + opening_balance = opening_balance.where( + (closing_balance.posting_date < filters.from_date) | (closing_balance.is_opening == "Yes") + ) + else: + opening_balance = opening_balance.where(closing_balance.posting_date < filters.from_date) if doctype == "GL Entry": opening_balance = opening_balance.where(closing_balance.is_cancelled == 0) @@ -298,7 +327,7 @@ def get_opening_balance( return gle -def calculate_values(accounts, gl_entries_by_account, opening_balances, show_net_values): +def calculate_values(accounts, gl_entries_by_account, opening_balances, show_net_values, ignore_is_opening=0): init = { "opening_debit": 0.0, "opening_credit": 0.0, @@ -316,7 +345,7 @@ def calculate_values(accounts, gl_entries_by_account, opening_balances, show_net d["opening_credit"] = opening_balances.get(d.name, {}).get("opening_credit", 0) for entry in gl_entries_by_account.get(d.name, []): - if cstr(entry.is_opening) != "Yes": + if cstr(entry.is_opening) != "Yes" or ignore_is_opening: d["debit"] += flt(entry.debit) d["credit"] += flt(entry.credit) From 05e42558d1e7a38b70dc2ade8865a5b45c271be2 Mon Sep 17 00:00:00 2001 From: Kavin <78342682+kavin0411@users.noreply.github.com> Date: Fri, 10 Jan 2025 18:20:47 +0530 Subject: [PATCH 0929/1614] fix: calculate AED exchange rate based on pegged value with USD (cherry picked from commit 455ef6f0840bf108c379b29fd84e667cfca289d9) --- erpnext/setup/utils.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/erpnext/setup/utils.py b/erpnext/setup/utils.py index 705fb1f2fcf..939ec7d87ea 100644 --- a/erpnext/setup/utils.py +++ b/erpnext/setup/utils.py @@ -52,6 +52,12 @@ def get_exchange_rate(from_currency, to_currency, transaction_date=None, args=No return if from_currency == to_currency: return 1 + # as AED is pegged to USD at the exchange rate of 3.6725 AED + # handling the exchange rate manually without API call + if from_currency == "USD" and to_currency == "AED": + return 3.6725 + if from_currency == "AED" and to_currency == "USD": + return 1 / 3.6725 if not transaction_date: transaction_date = nowdate() @@ -95,8 +101,8 @@ def get_exchange_rate(from_currency, to_currency, transaction_date=None, args=No settings = frappe.get_cached_doc("Currency Exchange Settings") req_params = { "transaction_date": transaction_date, - "from_currency": from_currency, - "to_currency": to_currency, + "from_currency": from_currency if from_currency != "AED" else "USD", + "to_currency": to_currency if to_currency != "AED" else "USD", } params = {} for row in settings.req_params: @@ -108,6 +114,12 @@ def get_exchange_rate(from_currency, to_currency, transaction_date=None, args=No for res_key in settings.result_key: value = value[format_ces_api(str(res_key.key), req_params)] cache.setex(name=key, time=21600, value=flt(value)) + + if to_currency == "AED": + value *= 3.6725 + if from_currency == "AED": + value /= 3.6725 + return flt(value) except Exception: frappe.log_error("Unable to fetch exchange rate") From 05e5e43c0686c5367b14a4bb46e2a025463b190e Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 21 Jan 2025 12:15:08 +0530 Subject: [PATCH 0930/1614] refactor: fix type error (cherry picked from commit dd923332cb969b9a01aec8d4de31ea3c5f2c3208) --- erpnext/setup/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/erpnext/setup/utils.py b/erpnext/setup/utils.py index 939ec7d87ea..3adb9a0b226 100644 --- a/erpnext/setup/utils.py +++ b/erpnext/setup/utils.py @@ -115,6 +115,8 @@ def get_exchange_rate(from_currency, to_currency, transaction_date=None, args=No value = value[format_ces_api(str(res_key.key), req_params)] cache.setex(name=key, time=21600, value=flt(value)) + # Support AED conversion through pegged USD + value = flt(value) if to_currency == "AED": value *= 3.6725 if from_currency == "AED": From 87f1376d8662db6bbebcf5f9bd5acce6f52a739d Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 20 Jan 2025 17:28:47 +0530 Subject: [PATCH 0931/1614] refactor: use dictionary for better expandability (cherry picked from commit 2e535955b395a30748d66222b6c6113ce727ba81) --- erpnext/setup/utils.py | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/erpnext/setup/utils.py b/erpnext/setup/utils.py index 3adb9a0b226..638c8af6263 100644 --- a/erpnext/setup/utils.py +++ b/erpnext/setup/utils.py @@ -4,11 +4,15 @@ import frappe from frappe import _ from frappe.utils import add_days, flt, get_datetime_str, nowdate -from frappe.utils.data import now_datetime +from frappe.utils.data import getdate, now_datetime from frappe.utils.nestedset import get_root_of from erpnext import get_default_company +PEGGED_CURRENCIES = { + "USD": {"AED": 3.6725}, # AED is pegged to USD at a rate of 3.6725 since 1997 +} + def before_tests(): frappe.clear_cache() @@ -45,6 +49,14 @@ def before_tests(): frappe.db.commit() +def get_pegged_rate(from_currency: str, to_currency: str, transaction_date) -> float | None: + if rate := PEGGED_CURRENCIES.get(from_currency, {}).get(to_currency): + return rate + elif rate := PEGGED_CURRENCIES.get(to_currency, {}).get(from_currency): + return 1 / rate + return None + + @frappe.whitelist() def get_exchange_rate(from_currency, to_currency, transaction_date=None, args=None): if not (from_currency and to_currency): @@ -52,15 +64,13 @@ def get_exchange_rate(from_currency, to_currency, transaction_date=None, args=No return if from_currency == to_currency: return 1 - # as AED is pegged to USD at the exchange rate of 3.6725 AED - # handling the exchange rate manually without API call - if from_currency == "USD" and to_currency == "AED": - return 3.6725 - if from_currency == "AED" and to_currency == "USD": - return 1 / 3.6725 if not transaction_date: transaction_date = nowdate() + + if rate := get_pegged_rate(from_currency, to_currency, transaction_date): + return rate + currency_settings = frappe.get_doc("Accounts Settings").as_dict() allow_stale_rates = currency_settings.get("allow_stale") From 70ed8b78d25c336d86482e15ff714d6a0d27b8f8 Mon Sep 17 00:00:00 2001 From: venkat102 Date: Mon, 13 Jan 2025 16:51:25 +0530 Subject: [PATCH 0932/1614] fix: include pos invoice in modifing key for returned item validation (cherry picked from commit 2936139c797e1e9a36e6b743fe616718bfacdc9b) --- erpnext/controllers/sales_and_purchase_return.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/controllers/sales_and_purchase_return.py b/erpnext/controllers/sales_and_purchase_return.py index 2a26c9c194f..4d44f493b1d 100644 --- a/erpnext/controllers/sales_and_purchase_return.py +++ b/erpnext/controllers/sales_and_purchase_return.py @@ -110,7 +110,7 @@ def validate_returned_items(doc): for d in doc.get("items"): key = d.item_code raise_exception = False - if doc.doctype in ["Purchase Receipt", "Purchase Invoice", "Sales Invoice"]: + if doc.doctype in ["Purchase Receipt", "Purchase Invoice", "Sales Invoice", "POS Invoice"]: field = frappe.scrub(doc.doctype) + "_item" if d.get(field): key = (d.item_code, d.get(field)) From 53468202dec4a97f004d85e850112911b126d60d Mon Sep 17 00:00:00 2001 From: Dany Robert Date: Tue, 21 Jan 2025 20:18:26 +0530 Subject: [PATCH 0933/1614] fix: precision on work order total qty (#45341) * fix: precision on work order total qty * chore: linters --- erpnext/manufacturing/doctype/work_order/work_order.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/work_order/work_order.py b/erpnext/manufacturing/doctype/work_order/work_order.py index 8a324cf7acb..515520b4810 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order.py +++ b/erpnext/manufacturing/doctype/work_order/work_order.py @@ -348,7 +348,7 @@ class WorkOrder(Document): if flt(self.material_transferred_for_manufacturing) > 0: status = "In Process" - total_qty = flt(self.produced_qty) + flt(self.process_loss_qty) + total_qty = flt(flt(self.produced_qty) + flt(self.process_loss_qty), self.precision("qty")) if flt(total_qty) >= flt(self.qty): status = "Completed" else: From 96a3a45078548ed9aa1e78d7524006213e9a8038 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 21 Jan 2025 20:20:58 +0530 Subject: [PATCH 0934/1614] fix: updated modified timestamp for stock entry type (backport #45280) (#45315) * fix: updated modified timestamp for stock entry type (#45280) (cherry picked from commit 2d45d0e5d5b136e287040fe2716f362ab4ae9ba8) # Conflicts: # erpnext/stock/doctype/stock_entry_type/stock_entry_type.json * fix: resolved conflict --------- Co-authored-by: Nabin Hait --- erpnext/stock/doctype/stock_entry_type/stock_entry_type.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/stock_entry_type/stock_entry_type.json b/erpnext/stock/doctype/stock_entry_type/stock_entry_type.json index c522df59941..2cbb029488f 100644 --- a/erpnext/stock/doctype/stock_entry_type/stock_entry_type.json +++ b/erpnext/stock/doctype/stock_entry_type/stock_entry_type.json @@ -37,7 +37,7 @@ } ], "links": [], - "modified": "2024-08-24 16:00:22.696958", + "modified": "2025-01-15 16:00:22.696958", "modified_by": "Administrator", "module": "Stock", "name": "Stock Entry Type", From bf8d6ae6bf074a5282d043480e5cb8a141021557 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 21 Jan 2025 20:21:46 +0530 Subject: [PATCH 0935/1614] feat: add option to update modified on communication recieved (backport #45307) (#45310) * feat: add option to update modified on communication recieved (#45307) (cherry picked from commit aa38895caf2748caff492c6eccb58100e1795f0c) # Conflicts: # erpnext/crm/doctype/crm_settings/crm_settings.json * chore: resolve conflict --------- Co-authored-by: Ejaaz Khan <67804911+iamejaaz@users.noreply.github.com> Co-authored-by: ruthra kumar --- .../doctype/crm_settings/crm_settings.json | 19 ++++++++++++++++--- .../crm/doctype/crm_settings/crm_settings.py | 1 + erpnext/crm/utils.py | 14 ++++++++++++++ erpnext/hooks.py | 5 ++++- 4 files changed, 35 insertions(+), 4 deletions(-) diff --git a/erpnext/crm/doctype/crm_settings/crm_settings.json b/erpnext/crm/doctype/crm_settings/crm_settings.json index 26a07d2e859..f9dc3902c8f 100644 --- a/erpnext/crm/doctype/crm_settings/crm_settings.json +++ b/erpnext/crm/doctype/crm_settings/crm_settings.json @@ -17,7 +17,9 @@ "quotation_section", "default_valid_till", "section_break_13", - "carry_forward_communication_and_comments" + "carry_forward_communication_and_comments", + "column_break_junk", + "update_timestamp_on_new_communication" ], "fields": [ { @@ -77,7 +79,7 @@ { "fieldname": "section_break_13", "fieldtype": "Section Break", - "label": "Other Settings" + "label": "Activity" }, { "default": "0", @@ -85,13 +87,24 @@ "fieldname": "carry_forward_communication_and_comments", "fieldtype": "Check", "label": "Carry Forward Communication and Comments" + }, + { + "fieldname": "column_break_junk", + "fieldtype": "Column Break" + }, + { + "default": "0", + "description": "Update the modified timestamp on new communications received in Lead & Opportunity.", + "fieldname": "update_timestamp_on_new_communication", + "fieldtype": "Check", + "label": "Update timestamp on new communication" } ], "icon": "fa fa-cog", "index_web_pages_for_search": 1, "issingle": 1, "links": [], - "modified": "2022-06-06 11:22:08.464253", + "modified": "2025-01-16 16:12:14.889455", "modified_by": "Administrator", "module": "CRM", "name": "CRM Settings", diff --git a/erpnext/crm/doctype/crm_settings/crm_settings.py b/erpnext/crm/doctype/crm_settings/crm_settings.py index 499a6d723d3..23992043145 100644 --- a/erpnext/crm/doctype/crm_settings/crm_settings.py +++ b/erpnext/crm/doctype/crm_settings/crm_settings.py @@ -20,6 +20,7 @@ class CRMSettings(Document): carry_forward_communication_and_comments: DF.Check close_opportunity_after_days: DF.Int default_valid_till: DF.Data | None + update_timestamp_on_new_communication: DF.Check # end: auto-generated types def validate(self): diff --git a/erpnext/crm/utils.py b/erpnext/crm/utils.py index c543c387c03..eb784c28ca7 100644 --- a/erpnext/crm/utils.py +++ b/erpnext/crm/utils.py @@ -84,6 +84,20 @@ def link_communications_with_prospect(communication, method): row.db_update() +def update_modified_timestamp(communication, method): + if communication.reference_doctype and communication.reference_name: + if communication.sent_or_received == "Received" and frappe.db.get_single_value( + "CRM Settings", "update_timestamp_on_new_communication" + ): + frappe.db.set_value( + dt=communication.reference_doctype, + dn=communication.reference_name, + field="modified", + val=now(), + update_modified=False, + ) + + def get_linked_prospect(reference_doctype, reference_name): prospect = None if reference_doctype == "Lead": diff --git a/erpnext/hooks.py b/erpnext/hooks.py index d5c43f5060d..653679bfb56 100644 --- a/erpnext/hooks.py +++ b/erpnext/hooks.py @@ -351,7 +351,10 @@ doc_events = { "erpnext.support.doctype.service_level_agreement.service_level_agreement.on_communication_update", "erpnext.support.doctype.issue.issue.set_first_response_time", ], - "after_insert": "erpnext.crm.utils.link_communications_with_prospect", + "after_insert": [ + "erpnext.crm.utils.link_communications_with_prospect", + "erpnext.crm.utils.update_modified_timestamp", + ], }, "Event": { "after_insert": "erpnext.crm.utils.link_events_with_prospect", From b9fcc786fa03681c2441016a4e72eed48b75cf06 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Wed, 22 Jan 2025 03:32:58 +0000 Subject: [PATCH 0936/1614] chore(release): Bumped to Version 15.49.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # [15.49.0](https://github.com/frappe/erpnext/compare/v15.48.4...v15.49.0) (2025-01-22) ### Bug Fixes * Ambiguous column error while creating Sales Return ([#45275](https://github.com/frappe/erpnext/issues/45275)) ([842d72f](https://github.com/frappe/erpnext/commit/842d72f7c442cd473c100fc3890c956a4e7ae33c)) * apply ruff formatter changes ([8e33d93](https://github.com/frappe/erpnext/commit/8e33d9327383075304afc8c22e632a04b5a365a6)) * calculate AED exchange rate based on pegged value with USD ([05e4255](https://github.com/frappe/erpnext/commit/05e42558d1e7a38b70dc2ade8865a5b45c271be2)) * check if tds deducted based on Purchase Taxes and Charges ([#45161](https://github.com/frappe/erpnext/issues/45161)) ([ade8799](https://github.com/frappe/erpnext/commit/ade8799358896043fdd77869dd03b0c90f45c536)) * check if tds deducted based on Purchase Taxes and Charges (backport [#45161](https://github.com/frappe/erpnext/issues/45161)) ([#45277](https://github.com/frappe/erpnext/issues/45277)) ([3abca03](https://github.com/frappe/erpnext/commit/3abca03fc1b4d73d1db68012386cc9fbc86db105)) * company in quality inspection ([c0cf1fe](https://github.com/frappe/erpnext/commit/c0cf1fed0058f6ce90871275a99fc7cb83a0c627)) * conflict ([bdaf376](https://github.com/frappe/erpnext/commit/bdaf3761c064150f8705a61234261d01c00788b6)) * do not reset picked items ([fd83b52](https://github.com/frappe/erpnext/commit/fd83b5251302a83eba332d35198f60d9aec2a6a2)) * Does not allow to create Sub-Asseblies of Sub Assemblies ([d3c9092](https://github.com/frappe/erpnext/commit/d3c9092266180f8b233ea0d93b8616187c0ff28a)) * ensure multiple PCVs in same fiscal year are considered in patch ([fcd914c](https://github.com/frappe/erpnext/commit/fcd914cfa0117a60309d991f51b2f9f99c1be7fb)) * fetching items from blanket order to sales/purchase order ([#45262](https://github.com/frappe/erpnext/issues/45262)) ([7fc19e1](https://github.com/frappe/erpnext/commit/7fc19e19be0e9d8c3ac4ac0c26edf1483f9c7b1f)) * fixed typo in manufacturing settings and field rename ([#45238](https://github.com/frappe/erpnext/issues/45238)) ([7641627](https://github.com/frappe/erpnext/commit/7641627b717ead4e2bcb35030ba654be6ca0f714)) * getting scrap items from sub assemblies by fetching scrap items for parent BOM ([da7b691](https://github.com/frappe/erpnext/commit/da7b69109a4b3a5f5d8e1ac130008918e8a6763f)) * ignore crm deal in tax_rule search filter (backport [#45134](https://github.com/frappe/erpnext/issues/45134)) ([#45138](https://github.com/frappe/erpnext/issues/45138)) ([afab5be](https://github.com/frappe/erpnext/commit/afab5be63fbe58ff169d0b941cc096455db9756a)) * include pos invoice in modifing key for returned item validation ([70ed8b7](https://github.com/frappe/erpnext/commit/70ed8b78d25c336d86482e15ff714d6a0d27b8f8)) * linters ([61303db](https://github.com/frappe/erpnext/commit/61303db16d77483df6b9ece033e3367f46b9107a)) * precision on work order total qty ([#45341](https://github.com/frappe/erpnext/issues/45341)) ([5346820](https://github.com/frappe/erpnext/commit/53468202dec4a97f004d85e850112911b126d60d)) * **Project:** re-phrase welcome email ([#45175](https://github.com/frappe/erpnext/issues/45175)) ([c94430a](https://github.com/frappe/erpnext/commit/c94430a4722e99b9ab4530872408b5261eda36e1)) * round off tax withholding amount ([#45271](https://github.com/frappe/erpnext/issues/45271)) ([3c10d80](https://github.com/frappe/erpnext/commit/3c10d809b0f88d372793c5dd8be218c0dc01be73)) * sales return for multi-uom ([#45303](https://github.com/frappe/erpnext/issues/45303)) ([e965b6e](https://github.com/frappe/erpnext/commit/e965b6ef4584181ab8582901d1cfff6365421cd4)) * set invoice start date to subscription start date (backport [#45342](https://github.com/frappe/erpnext/issues/45342)) ([#45343](https://github.com/frappe/erpnext/issues/45343)) ([7045c2c](https://github.com/frappe/erpnext/commit/7045c2cc3d2b1a0956e060c7a1c26c0c1884ef72)) * status of the serial no for the raw materials ([d956051](https://github.com/frappe/erpnext/commit/d956051e69d441797ef08ebb193b70c167f2556e)) * translation fixes ([e4f09ce](https://github.com/frappe/erpnext/commit/e4f09ce5434127d3f720d6e03c390cc6ddf5e75d)) * updated modified timestamp for stock entry type (backport [#45280](https://github.com/frappe/erpnext/issues/45280)) ([#45315](https://github.com/frappe/erpnext/issues/45315)) ([96a3a45](https://github.com/frappe/erpnext/commit/96a3a45078548ed9aa1e78d7524006213e9a8038)) * use currency defined in plan for subscription invoice ([#45104](https://github.com/frappe/erpnext/issues/45104)) ([a27eac1](https://github.com/frappe/erpnext/commit/a27eac1ef648d540bebb0b752b69132664b7153d)) * use currency defined in plan for subscription invoice (backport [#45104](https://github.com/frappe/erpnext/issues/45104)) ([#45273](https://github.com/frappe/erpnext/issues/45273)) ([2c46be4](https://github.com/frappe/erpnext/commit/2c46be4cfbf888c337316df1b7fbe87b818de877)) * validate linked sales person ([85910ec](https://github.com/frappe/erpnext/commit/85910ec2f99f9bcb7c7ab1ffbe6fe01ecf312d9c)) ### Features * add option to update modified on communication recieved (backport [#45307](https://github.com/frappe/erpnext/issues/45307)) ([#45310](https://github.com/frappe/erpnext/issues/45310)) ([bf8d6ae](https://github.com/frappe/erpnext/commit/bf8d6ae6bf074a5282d043480e5cb8a141021557)) * add Syscohada charts of accounts ([2667649](https://github.com/frappe/erpnext/commit/26676491e5b57245fa9cd30bceb5758a334434cf)) * Added valuation of quantity for each age group in stock ageing … (backport [#45076](https://github.com/frappe/erpnext/issues/45076)) ([#45208](https://github.com/frappe/erpnext/issues/45208)) ([dd58e4c](https://github.com/frappe/erpnext/commit/dd58e4cb536503427beb14fb619a10648694dc8c)) ### Performance Improvements * Ignore is_opening column in GL Queries ([#45327](https://github.com/frappe/erpnext/issues/45327)) ([b7de26d](https://github.com/frappe/erpnext/commit/b7de26d12353e2aba3587f50b35dd15b12426a30)) ### Reverts * avoid change to translatable string ([93e3847](https://github.com/frappe/erpnext/commit/93e3847e36ee865580d707aeb3fa3640a32145f6)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 98fb6684f2d..0c4cf74fc53 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.48.4" +__version__ = "15.49.0" def get_default_company(user=None): From 4a390ae3de91f4f7c8d7e5a76eee2a804d0b59c6 Mon Sep 17 00:00:00 2001 From: DaizyModi Date: Fri, 10 Jan 2025 11:06:39 +0530 Subject: [PATCH 0937/1614] fix: Correct Party Bank Account mapping in `Payment Entry` (cherry picked from commit 376bdc75f4f0f162dde2b493b07d5405530fc2d3) --- erpnext/accounts/doctype/payment_entry/payment_entry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index d714df0927b..a2a4a5185cf 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -2826,7 +2826,7 @@ def get_payment_entry( if pe.party_type in ["Customer", "Supplier"]: bank_account = get_party_bank_account(pe.party_type, pe.party) - pe.set("bank_account", bank_account) + pe.set("party_bank_account", bank_account) pe.set_bank_account_data() # only Purchase Invoice can be blocked individually From ad06652ed5fd28737df459be4a152b3aff89f230 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Wed, 22 Jan 2025 13:46:37 +0530 Subject: [PATCH 0938/1614] fix: Do no query GLs if no PCVs are posted (cherry picked from commit f4d1a5458855d49d0d7626b553d6bf2a21ab6449) --- erpnext/patches/v14_0/update_closing_balances.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/erpnext/patches/v14_0/update_closing_balances.py b/erpnext/patches/v14_0/update_closing_balances.py index e6544485252..2a081329ce3 100644 --- a/erpnext/patches/v14_0/update_closing_balances.py +++ b/erpnext/patches/v14_0/update_closing_balances.py @@ -18,10 +18,12 @@ def execute(): frappe.db.truncate("Account Closing Balance") pcv_list = get_period_closing_vouchers() - gl_entries = get_gl_entries(pcv_list) - for _, pcvs in itertools.groupby(pcv_list, key=lambda pcv: (pcv.company, pcv.period_start_date)): - process_grouped_pcvs(list(pcvs), gl_entries) + if pcv_list: + gl_entries = get_gl_entries(pcv_list) + + for _, pcvs in itertools.groupby(pcv_list, key=lambda pcv: (pcv.company, pcv.period_start_date)): + process_grouped_pcvs(list(pcvs), gl_entries) def process_grouped_pcvs(pcvs, gl_entries): From 5d045014547c4702bc912f82a7831850f4a0b9bc Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Wed, 22 Jan 2025 13:46:37 +0530 Subject: [PATCH 0939/1614] fix: Do no query GLs if no PCVs are posted (cherry picked from commit f4d1a5458855d49d0d7626b553d6bf2a21ab6449) --- erpnext/patches/v14_0/update_closing_balances.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/erpnext/patches/v14_0/update_closing_balances.py b/erpnext/patches/v14_0/update_closing_balances.py index e6544485252..2a081329ce3 100644 --- a/erpnext/patches/v14_0/update_closing_balances.py +++ b/erpnext/patches/v14_0/update_closing_balances.py @@ -18,10 +18,12 @@ def execute(): frappe.db.truncate("Account Closing Balance") pcv_list = get_period_closing_vouchers() - gl_entries = get_gl_entries(pcv_list) - for _, pcvs in itertools.groupby(pcv_list, key=lambda pcv: (pcv.company, pcv.period_start_date)): - process_grouped_pcvs(list(pcvs), gl_entries) + if pcv_list: + gl_entries = get_gl_entries(pcv_list) + + for _, pcvs in itertools.groupby(pcv_list, key=lambda pcv: (pcv.company, pcv.period_start_date)): + process_grouped_pcvs(list(pcvs), gl_entries) def process_grouped_pcvs(pcvs, gl_entries): From 89f783451781f14ed9362387eae9b6dea5034ae0 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Wed, 22 Jan 2025 09:18:16 +0000 Subject: [PATCH 0940/1614] chore(release): Bumped to Version 15.49.1 ## [15.49.1](https://github.com/frappe/erpnext/compare/v15.49.0...v15.49.1) (2025-01-22) ### Bug Fixes * Do no query GLs if no PCVs are posted ([5d04501](https://github.com/frappe/erpnext/commit/5d045014547c4702bc912f82a7831850f4a0b9bc)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 0c4cf74fc53..10aa99559b7 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.49.0" +__version__ = "15.49.1" def get_default_company(user=None): From bdc65daaddf38d24a7c6860edf4b3b9390a26e45 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 22 Jan 2025 17:53:04 +0530 Subject: [PATCH 0941/1614] fix: added debounce to prevent multiple clicks (backport #45369) (#45376) fix: added debounce to prevent multiple clicks (#45369) * fix: added debounce to prevent multiple clicks * fix: linters check (cherry picked from commit 9ff3101b2dba1ffd045e300d5f1d6639fb7a5230) Co-authored-by: Khushi Rawat <142375893+khushi8112@users.noreply.github.com> --- .../asset_depreciation_schedule/asset_depreciation_schedule.js | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/assets/doctype/asset_depreciation_schedule/asset_depreciation_schedule.js b/erpnext/assets/doctype/asset_depreciation_schedule/asset_depreciation_schedule.js index 83b5c376ac7..3f7a2e7c7d8 100644 --- a/erpnext/assets/doctype/asset_depreciation_schedule/asset_depreciation_schedule.js +++ b/erpnext/assets/doctype/asset_depreciation_schedule/asset_depreciation_schedule.js @@ -34,6 +34,7 @@ frappe.ui.form.on("Depreciation Schedule", { asset_depr_schedule_name: frm.doc.name, date: row.schedule_date, }, + debounce: 1000, callback: function (r) { frappe.model.sync(r.message); frm.refresh(); From 46a2b7a07e5326ad5fde89d030460a5e9f2b67b0 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Wed, 22 Jan 2025 18:02:49 +0530 Subject: [PATCH 0942/1614] fix: precision issue causing incorrect status (cherry picked from commit 4a7586cc01d589c35c8e79906a15e3f29a5f07fb) --- erpnext/manufacturing/doctype/work_order/work_order.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/erpnext/manufacturing/doctype/work_order/work_order.py b/erpnext/manufacturing/doctype/work_order/work_order.py index 515520b4810..332a86979c2 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order.py +++ b/erpnext/manufacturing/doctype/work_order/work_order.py @@ -348,8 +348,9 @@ class WorkOrder(Document): if flt(self.material_transferred_for_manufacturing) > 0: status = "In Process" - total_qty = flt(flt(self.produced_qty) + flt(self.process_loss_qty), self.precision("qty")) - if flt(total_qty) >= flt(self.qty): + precision = frappe.get_precision("Work Order", "produced_qty") + total_qty = flt(self.produced_qty, precision) + flt(self.process_loss_qty, precision) + if flt(total_qty, precision) >= flt(self.qty, precision): status = "Completed" else: status = "Cancelled" From f8099a6847f2b08423401a9e2da35e578f178891 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 23 Jan 2025 11:15:22 +0530 Subject: [PATCH 0943/1614] fix: set preferred email in Employee via backend controller (backport #45320) (#45379) fix: set preferred email in Employee via backend controller (#45320) fix: set preferred email in Employee (backend) Set "Preferred Email" for Employee via validate. Unset value when prefered_contact_email is also unset. (cherry picked from commit 4481ca83ff8d616cee416851f497af9fbaeb6b13) Co-authored-by: gavin --- erpnext/setup/doctype/employee/employee.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/erpnext/setup/doctype/employee/employee.py b/erpnext/setup/doctype/employee/employee.py index 2fa5531d602..31568fe50dc 100755 --- a/erpnext/setup/doctype/employee/employee.py +++ b/erpnext/setup/doctype/employee/employee.py @@ -41,6 +41,7 @@ class Employee(NestedSet): self.validate_email() self.validate_status() self.validate_reports_to() + self.set_preferred_email() self.validate_preferred_email() if self.user_id: @@ -160,9 +161,7 @@ class Employee(NestedSet): def set_preferred_email(self): preferred_email_field = frappe.scrub(self.prefered_contact_email) - if preferred_email_field: - preferred_email = self.get(preferred_email_field) - self.prefered_email = preferred_email + self.prefered_email = self.get(preferred_email_field) if preferred_email_field else None def validate_status(self): if self.status == "Left": From 4e367dedec0babd38072338d084beb0d14906976 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 23 Jan 2025 11:15:51 +0530 Subject: [PATCH 0944/1614] fix: validate non-stock item for exchange loss/gain (backport #45306) (#45380) fix: validate non-stock item for exchange loss/gain (#45306) * fix: validate non-stock item * test: add unit test to validate non-stock item exchange difference * fix: use usd supplier (cherry picked from commit 05579959f26027daf246341540ef759c2cf16855) Co-authored-by: Rethik M <85231069+rs-rethik@users.noreply.github.com> --- .../purchase_invoice/purchase_invoice.py | 1 + .../purchase_invoice/test_purchase_invoice.py | 47 +++++++++++++++++++ 2 files changed, 48 insertions(+) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index dc6ee6c1469..2b4242aa233 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -1126,6 +1126,7 @@ class PurchaseInvoice(BuyingController): exchange_rate_map[item.purchase_receipt] and self.conversion_rate != exchange_rate_map[item.purchase_receipt] and item.net_rate == net_rate_map[item.pr_detail] + and item.item_code in stock_items ): discrepancy_caused_by_exchange_rate_difference = ( item.qty * item.net_rate diff --git a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py index 4d62c0d354d..bc28edbf396 100644 --- a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py @@ -372,6 +372,53 @@ class TestPurchaseInvoice(FrappeTestCase, StockTestMixin): self.assertEqual(discrepancy_caused_by_exchange_rate_diff, amount) + def test_purchase_invoice_with_exchange_rate_difference_for_non_stock_item(self): + from erpnext.stock.doctype.purchase_receipt.purchase_receipt import ( + make_purchase_invoice as create_purchase_invoice, + ) + + # Creating Purchase Invoice with USD currency + pr = frappe.new_doc("Purchase Receipt") + pr.currency = "USD" + pr.company = "_Test Company with perpetual inventory" + pr.conversion_rate = (70,) + pr.supplier = "_Test Supplier USD" + pr.append( + "items", + { + "item_code": "_Test Non Stock Item", + "qty": 1, + "rate": 100, + }, + ) + pr.append( + "items", + {"item_code": "_Test Item", "qty": 1, "rate": 5, "warehouse": "Stores - TCP1"}, + ) + pr.insert() + pr.submit() + + # Createing purchase invoice against Purchase Receipt + pi = create_purchase_invoice(pr.name) + pi.conversion_rate = 80 + pi.credit_to = "_Test Payable USD - TCP1" + pi.insert() + pi.submit() + + # Get exchnage gain and loss account + exchange_gain_loss_account = frappe.db.get_value("Company", pi.company, "exchange_gain_loss_account") + + # fetching the latest GL Entry with exchange gain and loss account account + amount = frappe.db.get_value( + "GL Entry", {"account": exchange_gain_loss_account, "voucher_no": pi.name}, "debit" + ) + + discrepancy_caused_by_exchange_rate_diff = abs( + pi.items[1].base_net_amount - pr.items[1].base_net_amount + ) + + self.assertEqual(discrepancy_caused_by_exchange_rate_diff, amount) + def test_purchase_invoice_change_naming_series(self): pi = frappe.copy_doc(test_records[1]) pi.insert() From 2403cdc4d7ed51f48452197942742020b688cc00 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 23 Jan 2025 11:16:09 +0530 Subject: [PATCH 0945/1614] fix: System was allowing to save payment schedule amount less than grand total (backport #45322) (#45381) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix: System was allowing to save payment schedule amount less than grand total (#45322) * fix: System was allowing to save payment schedule amount less than grand_total * style: After run pre-commit (cherry picked from commit b26f0b6633829405a5cbb884ceec7b5352291850) Co-authored-by: Diógenes Souza <103958767+devdiogenes@users.noreply.github.com> --- erpnext/controllers/accounts_controller.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 7074710dfee..db51a012db6 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -2413,10 +2413,15 @@ class AccountsController(TransactionBase): ) if ( - flt(total, self.precision("grand_total")) - flt(grand_total, self.precision("grand_total")) + abs( + flt(total, self.precision("grand_total")) + - flt(grand_total, self.precision("grand_total")) + ) > 0.1 - or flt(base_total, self.precision("base_grand_total")) - - flt(base_grand_total, self.precision("base_grand_total")) + or abs( + flt(base_total, self.precision("base_grand_total")) + - flt(base_grand_total, self.precision("base_grand_total")) + ) > 0.1 ): frappe.throw( From 767529f0ec4d982e2eaba40de00b39234c400fda Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 23 Jan 2025 11:17:14 +0530 Subject: [PATCH 0946/1614] fix: batch qty calculation (backport #45367) (#45388) fix: batch qty calculation (cherry picked from commit f07a71a882d940db3d1c1e28c011410fdb279aa3) Co-authored-by: Rohit Waghchaure --- .../accounts/doctype/pos_invoice/test_pos_invoice.py | 3 ++- erpnext/stock/serial_batch_bundle.py | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/pos_invoice/test_pos_invoice.py b/erpnext/accounts/doctype/pos_invoice/test_pos_invoice.py index 1dbc630e62e..7b6b8b50543 100644 --- a/erpnext/accounts/doctype/pos_invoice/test_pos_invoice.py +++ b/erpnext/accounts/doctype/pos_invoice/test_pos_invoice.py @@ -835,7 +835,8 @@ class TestPOSInvoice(unittest.TestCase): { "item_code": item.name, "warehouse": pos_inv2.items[0].warehouse, - "voucher_type": "Delivery Note", + "voucher_type": "POS Invoice", + "voucher_no": pos_inv2.name, "qty": 2, "avg_rate": 300, "batches": frappe._dict({"TestBatch 01": 2}), diff --git a/erpnext/stock/serial_batch_bundle.py b/erpnext/stock/serial_batch_bundle.py index 59c299de352..85adb0348d9 100644 --- a/erpnext/stock/serial_batch_bundle.py +++ b/erpnext/stock/serial_batch_bundle.py @@ -6,6 +6,7 @@ from frappe.model.naming import make_autoname from frappe.query_builder.functions import CombineDatetime, Sum, Timestamp from frappe.utils import add_days, cint, cstr, flt, get_link_to_form, now, nowtime, today from pypika import Order +from pypika.terms import ExistsCriterion from erpnext.stock.deprecated_serial_batch import ( DeprecatedBatchNoValuation, @@ -650,6 +651,7 @@ class BatchNoValuation(DeprecatedBatchNoValuation): parent = frappe.qb.DocType("Serial and Batch Bundle") child = frappe.qb.DocType("Serial and Batch Entry") + sle = frappe.qb.DocType("Stock Ledger Entry") timestamp_condition = "" if self.sle.posting_date: @@ -682,6 +684,14 @@ class BatchNoValuation(DeprecatedBatchNoValuation): & (parent.docstatus == 1) & (parent.is_cancelled == 0) & (parent.type_of_transaction.isin(["Inward", "Outward"])) + & ( + ExistsCriterion( + frappe.qb.from_(sle) + .select(sle.name) + .where((parent.name == sle.serial_and_batch_bundle) & (sle.is_cancelled == 0)) + ) + | (parent.voucher_type == "POS Invoice") + ) ) .groupby(child.batch_no) ) From 412e22fb4e6c0c6a61af4d568d26d50880541b5c Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 23 Jan 2025 11:25:33 +0530 Subject: [PATCH 0947/1614] fix: added item_group filter in item_code field in stock balance report (backport #45340) (#45389) fix: added item_group filter in item_code field in stock balance report (#45340) * fix: added item_group filter in item_code field in stock balance report * feat: added filter to not show non stock items (cherry picked from commit fe43d2054507611c02c976ee254e8af1f5026fbc) Co-authored-by: Mihir Kandoi --- erpnext/stock/report/stock_balance/stock_balance.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/erpnext/stock/report/stock_balance/stock_balance.js b/erpnext/stock/report/stock_balance/stock_balance.js index 1d86634fd95..0d68caa7e09 100644 --- a/erpnext/stock/report/stock_balance/stock_balance.js +++ b/erpnext/stock/report/stock_balance/stock_balance.js @@ -41,8 +41,14 @@ frappe.query_reports["Stock Balance"] = { width: "80", options: "Item", get_query: function () { + let item_group = frappe.query_report.get_filter_value("item_group"); + return { query: "erpnext.controllers.queries.item_query", + filters: { + ...(item_group && { item_group }), + is_stock_item: 1, + }, }; }, }, From 04f5a72e0847f66da120e0f81fd2aefc7eac94cf Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 23 Jan 2025 13:01:12 +0530 Subject: [PATCH 0948/1614] perf: optimize DB calls with frappe.get_all (backport #45289) (#45391) perf: optimize DB calls with frappe.get_all (#45289) * perf: reduce multiple db queries * fix: use frappe._dict instread of extra iteration --------- Co-authored-by: Sanket322 (cherry picked from commit 2a400dd3f8d25568f95e58152f55c661138bee76) Co-authored-by: Sanket Shah <113279972+Sanket322@users.noreply.github.com> --- erpnext/controllers/selling_controller.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/erpnext/controllers/selling_controller.py b/erpnext/controllers/selling_controller.py index b704cb30791..a9258204b39 100644 --- a/erpnext/controllers/selling_controller.py +++ b/erpnext/controllers/selling_controller.py @@ -714,6 +714,16 @@ class SellingController(StockController): if self.doctype == "POS Invoice": return + items = [item.item_code for item in self.get("items")] + item_stock_map = frappe._dict( + frappe.get_all( + "Item", + filters={"item_code": ["in", items]}, + fields=["item_code", "is_stock_item"], + as_list=True, + ) + ) + for d in self.get("items"): if self.doctype == "Sales Invoice": stock_items = [ @@ -747,7 +757,7 @@ class SellingController(StockController): frappe.bold(_("Allow Item to Be Added Multiple Times in a Transaction")), get_link_to_form("Selling Settings", "Selling Settings"), ) - if frappe.db.get_value("Item", d.item_code, "is_stock_item") == 1: + if item_stock_map.get(d.item_code): if stock_items in check_list: frappe.throw(duplicate_items_msg) else: From b9b4f6316d5a75c764b8b02aa75dcabba8450051 Mon Sep 17 00:00:00 2001 From: Diptanil Saha Date: Thu, 23 Jan 2025 13:07:27 +0530 Subject: [PATCH 0949/1614] feat: pos configuration for print receipt on complete order (#45392) --- .../doctype/pos_profile/pos_profile.json | 9 ++++++++- .../accounts/doctype/pos_profile/pos_profile.py | 1 + .../point_of_sale/pos_past_order_summary.js | 17 ++++++++++++++++- 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/pos_profile/pos_profile.json b/erpnext/accounts/doctype/pos_profile/pos_profile.json index 994b6776e3c..22f2965b86e 100644 --- a/erpnext/accounts/doctype/pos_profile/pos_profile.json +++ b/erpnext/accounts/doctype/pos_profile/pos_profile.json @@ -23,6 +23,7 @@ "hide_unavailable_items", "auto_add_item_to_cart", "validate_stock_on_save", + "print_receipt_on_order_complete", "column_break_16", "update_stock", "ignore_pricing_rule", @@ -375,6 +376,12 @@ "fieldname": "disable_rounded_total", "fieldtype": "Check", "label": "Disable Rounded Total" + }, + { + "default": "0", + "fieldname": "print_receipt_on_order_complete", + "fieldtype": "Check", + "label": "Print Receipt on Order Complete" } ], "icon": "icon-cog", @@ -402,7 +409,7 @@ "link_fieldname": "pos_profile" } ], - "modified": "2022-08-10 12:57:06.241439", + "modified": "2025-01-01 11:07:03.161950", "modified_by": "Administrator", "module": "Accounts", "name": "POS Profile", diff --git a/erpnext/accounts/doctype/pos_profile/pos_profile.py b/erpnext/accounts/doctype/pos_profile/pos_profile.py index 37197e1fb7a..ea27116e91c 100644 --- a/erpnext/accounts/doctype/pos_profile/pos_profile.py +++ b/erpnext/accounts/doctype/pos_profile/pos_profile.py @@ -47,6 +47,7 @@ class POSProfile(Document): letter_head: DF.Link | None payments: DF.Table[POSPaymentMethod] print_format: DF.Link | None + print_receipt_on_order_complete: DF.Check select_print_heading: DF.Link | None selling_price_list: DF.Link | None tax_category: DF.Link | None diff --git a/erpnext/selling/page/point_of_sale/pos_past_order_summary.js b/erpnext/selling/page/point_of_sale/pos_past_order_summary.js index ed6e6e02dcc..df44fdb04e8 100644 --- a/erpnext/selling/page/point_of_sale/pos_past_order_summary.js +++ b/erpnext/selling/page/point_of_sale/pos_past_order_summary.js @@ -1,7 +1,8 @@ erpnext.PointOfSale.PastOrderSummary = class { - constructor({ wrapper, events }) { + constructor({ wrapper, events, pos_profile }) { this.wrapper = wrapper; this.events = events; + this.pos_profile = pos_profile; this.init_component(); } @@ -355,6 +356,8 @@ erpnext.PointOfSale.PastOrderSummary = class { const condition_btns_map = this.get_condition_btn_map(after_submission); this.add_summary_btns(condition_btns_map); + + this.print_receipt_on_order_complete(); } attach_document_info(doc) { @@ -421,4 +424,16 @@ erpnext.PointOfSale.PastOrderSummary = class { toggle_component(show) { show ? this.$component.css("display", "flex") : this.$component.css("display", "none"); } + + async print_receipt_on_order_complete() { + const res = await frappe.db.get_value( + "POS Profile", + this.pos_profile, + "print_receipt_on_order_complete" + ); + + if (res.message.print_receipt_on_order_complete) { + this.print_receipt(); + } + } }; From ef15429d98a615d745542b485ee010797a1c800c Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Thu, 23 Jan 2025 13:03:37 +0530 Subject: [PATCH 0950/1614] fix: JobCardTimeLog' object has no attribute 'remaining_time_in_mins' (cherry picked from commit 41dda35db73deb56820e9f9a4a12535077c46b7d) --- erpnext/manufacturing/doctype/job_card/job_card.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/manufacturing/doctype/job_card/job_card.py b/erpnext/manufacturing/doctype/job_card/job_card.py index bc1076d1340..a1b53fb7c4a 100644 --- a/erpnext/manufacturing/doctype/job_card/job_card.py +++ b/erpnext/manufacturing/doctype/job_card/job_card.py @@ -309,8 +309,8 @@ class JobCard(Document): return overlap def get_time_logs(self, args, doctype, open_job_cards=None): - if get_datetime(args.from_time) >= get_datetime(args.to_time): - args.to_time = add_to_date(args.from_time, minutes=args.remaining_time_in_mins) + if args.get("remaining_time_in_mins") and get_datetime(args.from_time) >= get_datetime(args.to_time): + args.to_time = add_to_date(args.from_time, minutes=args.get("remaining_time_in_mins")) jc = frappe.qb.DocType("Job Card") jctl = frappe.qb.DocType(doctype) From 42f7ee905ca9a0ebfc5bfa145c7a9af8ba736307 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 23 Jan 2025 11:17:14 +0530 Subject: [PATCH 0951/1614] fix: batch qty calculation (backport #45367) (#45388) fix: batch qty calculation (cherry picked from commit f07a71a882d940db3d1c1e28c011410fdb279aa3) Co-authored-by: Rohit Waghchaure (cherry picked from commit 767529f0ec4d982e2eaba40de00b39234c400fda) --- .../accounts/doctype/pos_invoice/test_pos_invoice.py | 3 ++- erpnext/stock/serial_batch_bundle.py | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/pos_invoice/test_pos_invoice.py b/erpnext/accounts/doctype/pos_invoice/test_pos_invoice.py index 1dbc630e62e..7b6b8b50543 100644 --- a/erpnext/accounts/doctype/pos_invoice/test_pos_invoice.py +++ b/erpnext/accounts/doctype/pos_invoice/test_pos_invoice.py @@ -835,7 +835,8 @@ class TestPOSInvoice(unittest.TestCase): { "item_code": item.name, "warehouse": pos_inv2.items[0].warehouse, - "voucher_type": "Delivery Note", + "voucher_type": "POS Invoice", + "voucher_no": pos_inv2.name, "qty": 2, "avg_rate": 300, "batches": frappe._dict({"TestBatch 01": 2}), diff --git a/erpnext/stock/serial_batch_bundle.py b/erpnext/stock/serial_batch_bundle.py index 59c299de352..85adb0348d9 100644 --- a/erpnext/stock/serial_batch_bundle.py +++ b/erpnext/stock/serial_batch_bundle.py @@ -6,6 +6,7 @@ from frappe.model.naming import make_autoname from frappe.query_builder.functions import CombineDatetime, Sum, Timestamp from frappe.utils import add_days, cint, cstr, flt, get_link_to_form, now, nowtime, today from pypika import Order +from pypika.terms import ExistsCriterion from erpnext.stock.deprecated_serial_batch import ( DeprecatedBatchNoValuation, @@ -650,6 +651,7 @@ class BatchNoValuation(DeprecatedBatchNoValuation): parent = frappe.qb.DocType("Serial and Batch Bundle") child = frappe.qb.DocType("Serial and Batch Entry") + sle = frappe.qb.DocType("Stock Ledger Entry") timestamp_condition = "" if self.sle.posting_date: @@ -682,6 +684,14 @@ class BatchNoValuation(DeprecatedBatchNoValuation): & (parent.docstatus == 1) & (parent.is_cancelled == 0) & (parent.type_of_transaction.isin(["Inward", "Outward"])) + & ( + ExistsCriterion( + frappe.qb.from_(sle) + .select(sle.name) + .where((parent.name == sle.serial_and_batch_bundle) & (sle.is_cancelled == 0)) + ) + | (parent.voucher_type == "POS Invoice") + ) ) .groupby(child.batch_no) ) From 4542a759aec98e5f4f6d91ddb1a6a819ff007b9a Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Thu, 23 Jan 2025 13:03:37 +0530 Subject: [PATCH 0952/1614] fix: JobCardTimeLog' object has no attribute 'remaining_time_in_mins' (cherry picked from commit 41dda35db73deb56820e9f9a4a12535077c46b7d) (cherry picked from commit ef15429d98a615d745542b485ee010797a1c800c) --- erpnext/manufacturing/doctype/job_card/job_card.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/manufacturing/doctype/job_card/job_card.py b/erpnext/manufacturing/doctype/job_card/job_card.py index bc1076d1340..a1b53fb7c4a 100644 --- a/erpnext/manufacturing/doctype/job_card/job_card.py +++ b/erpnext/manufacturing/doctype/job_card/job_card.py @@ -309,8 +309,8 @@ class JobCard(Document): return overlap def get_time_logs(self, args, doctype, open_job_cards=None): - if get_datetime(args.from_time) >= get_datetime(args.to_time): - args.to_time = add_to_date(args.from_time, minutes=args.remaining_time_in_mins) + if args.get("remaining_time_in_mins") and get_datetime(args.from_time) >= get_datetime(args.to_time): + args.to_time = add_to_date(args.from_time, minutes=args.get("remaining_time_in_mins")) jc = frappe.qb.DocType("Job Card") jctl = frappe.qb.DocType(doctype) From 457340886607a1b0041d54501800111555e64c43 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Thu, 23 Jan 2025 08:43:35 +0000 Subject: [PATCH 0953/1614] chore(release): Bumped to Version 15.49.2 ## [15.49.2](https://github.com/frappe/erpnext/compare/v15.49.1...v15.49.2) (2025-01-23) ### Bug Fixes * batch qty calculation (backport [#45367](https://github.com/frappe/erpnext/issues/45367)) ([#45388](https://github.com/frappe/erpnext/issues/45388)) ([42f7ee9](https://github.com/frappe/erpnext/commit/42f7ee905ca9a0ebfc5bfa145c7a9af8ba736307)) * JobCardTimeLog' object has no attribute 'remaining_time_in_mins' ([4542a75](https://github.com/frappe/erpnext/commit/4542a759aec98e5f4f6d91ddb1a6a819ff007b9a)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 10aa99559b7..d6291128b25 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.49.1" +__version__ = "15.49.2" def get_default_company(user=None): From 546da297615ab0a854cda40f1a264b1194a0af8b Mon Sep 17 00:00:00 2001 From: Diptanil Saha Date: Thu, 23 Jan 2025 14:17:14 +0530 Subject: [PATCH 0954/1614] chore: quickbooks migrator integration removal (#45393) --- .../doctype/quickbooks_migrator/__init__.py | 0 .../quickbooks_migrator.js | 77 - .../quickbooks_migrator.json | 213 --- .../quickbooks_migrator.py | 1421 ----------------- .../test_quickbooks_migrator.py | 8 - 5 files changed, 1719 deletions(-) delete mode 100644 erpnext/erpnext_integrations/doctype/quickbooks_migrator/__init__.py delete mode 100644 erpnext/erpnext_integrations/doctype/quickbooks_migrator/quickbooks_migrator.js delete mode 100644 erpnext/erpnext_integrations/doctype/quickbooks_migrator/quickbooks_migrator.json delete mode 100644 erpnext/erpnext_integrations/doctype/quickbooks_migrator/quickbooks_migrator.py delete mode 100644 erpnext/erpnext_integrations/doctype/quickbooks_migrator/test_quickbooks_migrator.py diff --git a/erpnext/erpnext_integrations/doctype/quickbooks_migrator/__init__.py b/erpnext/erpnext_integrations/doctype/quickbooks_migrator/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/erpnext/erpnext_integrations/doctype/quickbooks_migrator/quickbooks_migrator.js b/erpnext/erpnext_integrations/doctype/quickbooks_migrator/quickbooks_migrator.js deleted file mode 100644 index f9364edf5aa..00000000000 --- a/erpnext/erpnext_integrations/doctype/quickbooks_migrator/quickbooks_migrator.js +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors -// For license information, please see license.txt - -frappe.ui.form.on("QuickBooks Migrator", { - connect: function (frm) { - // OAuth requires user intervention to provide application access permissionsto requested scope - // Here we open a new window and redirect user to the authorization url. - // After user grants us permission to access. We will set authorization details on this doc which will force refresh. - window.open(frm.doc.authorization_url); - }, - fetch_data: function (frm) { - frm.call("migrate"); - }, - onload: function (frm) { - frm.trigger("set_indicator"); - var domain = frappe.urllib.get_base_url(); - var redirect_url = `${domain}/api/method/erpnext.erpnext_integrations.doctype.quickbooks_migrator.quickbooks_migrator.callback`; - if (frm.doc.redirect_url != redirect_url) { - frm.set_value("redirect_url", redirect_url); - } - // Instead of changing percentage width and message of single progress bar - // Show a different porgress bar for every action after some time remove the finished progress bar - // Former approach causes the progress bar to dance back and forth. - frm.trigger("set_indicator"); - frappe.realtime.on("quickbooks_progress_update", function (data) { - frm.dashboard.show_progress(data.message, (data.count / data.total) * 100, data.message); - if (data.count == data.total) { - window.setTimeout( - function (message) { - frm.dashboard.hide_progress(message); - }, - 1500, - data.messsage - ); - } - }); - }, - refresh: function (frm) { - frm.trigger("set_indicator"); - if (!frm.doc.access_token) { - // Unset access_token signifies that we don't have enough information to connect to quickbooks api and fetch data - if (frm.doc.authorization_url) { - frm.add_custom_button(__("Connect to Quickbooks"), function () { - frm.trigger("connect"); - }); - } - } - if (frm.doc.access_token) { - // If we have access_token that means we also have refresh_token we don't need user intervention anymore - // All we need now is a Company from erpnext - frm.remove_custom_button(__("Connect to Quickbooks")); - - frm.toggle_display("company_settings", 1); - frm.set_df_property("company", "reqd", 1); - if (frm.doc.company) { - frm.add_custom_button(__("Fetch Data"), function () { - frm.trigger("fetch_data"); - }); - } - } - }, - set_indicator: function (frm) { - var indicator_map = { - "Connecting to QuickBooks": [__("Connecting to QuickBooks"), "orange"], - "Connected to QuickBooks": [__("Connected to QuickBooks"), "green"], - "In Progress": [__("In Progress"), "orange"], - Complete: [__("Complete"), "green"], - Failed: [__("Failed"), "red"], - }; - if (frm.doc.status) { - var indicator = indicator_map[frm.doc.status]; - var label = indicator[0]; - var color = indicator[1]; - frm.page.set_indicator(label, color); - } - }, -}); diff --git a/erpnext/erpnext_integrations/doctype/quickbooks_migrator/quickbooks_migrator.json b/erpnext/erpnext_integrations/doctype/quickbooks_migrator/quickbooks_migrator.json deleted file mode 100644 index 5428177914b..00000000000 --- a/erpnext/erpnext_integrations/doctype/quickbooks_migrator/quickbooks_migrator.json +++ /dev/null @@ -1,213 +0,0 @@ -{ - "beta": 1, - "creation": "2018-07-10 14:48:16.757030", - "doctype": "DocType", - "editable_grid": 1, - "engine": "InnoDB", - "field_order": [ - "status", - "application_settings", - "client_id", - "redirect_url", - "token_endpoint", - "application_column_break", - "client_secret", - "scope", - "api_endpoint", - "authorization_settings", - "authorization_endpoint", - "refresh_token", - "code", - "authorization_column_break", - "authorization_url", - "access_token", - "quickbooks_company_id", - "company_settings", - "company", - "default_shipping_account", - "default_warehouse", - "company_column_break", - "default_cost_center", - "undeposited_funds_account" - ], - "fields": [ - { - "fieldname": "status", - "fieldtype": "Select", - "hidden": 1, - "label": "Status", - "options": "Connecting to QuickBooks\nConnected to QuickBooks\nIn Progress\nComplete\nFailed" - }, - { - "collapsible": 1, - "collapsible_depends_on": "eval:doc.client_id && doc.client_secret && doc.redirect_url", - "fieldname": "application_settings", - "fieldtype": "Section Break", - "label": "Application Settings" - }, - { - "fieldname": "client_id", - "fieldtype": "Data", - "in_list_view": 1, - "label": "Client ID", - "reqd": 1 - }, - { - "fieldname": "redirect_url", - "fieldtype": "Data", - "in_list_view": 1, - "label": "Redirect URL", - "reqd": 1 - }, - { - "default": "https://oauth.platform.intuit.com/oauth2/v1/tokens/bearer", - "fieldname": "token_endpoint", - "fieldtype": "Data", - "label": "Token Endpoint", - "read_only": 1, - "reqd": 1 - }, - { - "fieldname": "application_column_break", - "fieldtype": "Column Break" - }, - { - "fieldname": "client_secret", - "fieldtype": "Data", - "in_list_view": 1, - "label": "Client Secret", - "reqd": 1 - }, - { - "default": "com.intuit.quickbooks.accounting", - "fieldname": "scope", - "fieldtype": "Data", - "in_list_view": 1, - "label": "Scope", - "read_only": 1, - "reqd": 1 - }, - { - "default": "https://quickbooks.api.intuit.com/v3", - "fieldname": "api_endpoint", - "fieldtype": "Data", - "label": "API Endpoint", - "read_only": 1, - "reqd": 1 - }, - { - "collapsible": 1, - "fieldname": "authorization_settings", - "fieldtype": "Section Break", - "label": "Authorization Settings" - }, - { - "default": "https://appcenter.intuit.com/connect/oauth2", - "fieldname": "authorization_endpoint", - "fieldtype": "Data", - "label": "Authorization Endpoint", - "read_only": 1, - "reqd": 1 - }, - { - "fieldname": "refresh_token", - "fieldtype": "Small Text", - "hidden": 1, - "label": "Refresh Token" - }, - { - "fieldname": "code", - "fieldtype": "Data", - "hidden": 1, - "label": "Code" - }, - { - "fieldname": "authorization_column_break", - "fieldtype": "Column Break" - }, - { - "fieldname": "authorization_url", - "fieldtype": "Data", - "label": "Authorization URL", - "read_only": 1, - "reqd": 1 - }, - { - "fieldname": "access_token", - "fieldtype": "Small Text", - "hidden": 1, - "label": "Access Token" - }, - { - "fieldname": "quickbooks_company_id", - "fieldtype": "Data", - "hidden": 1, - "label": "Quickbooks Company ID" - }, - { - "fieldname": "company_settings", - "fieldtype": "Section Break", - "hidden": 1, - "label": "Company Settings" - }, - { - "fieldname": "company", - "fieldtype": "Link", - "label": "Company", - "options": "Company" - }, - { - "fieldname": "default_shipping_account", - "fieldtype": "Link", - "hidden": 1, - "label": "Default Shipping Account", - "options": "Account" - }, - { - "fieldname": "default_warehouse", - "fieldtype": "Link", - "hidden": 1, - "label": "Default Warehouse", - "options": "Warehouse" - }, - { - "fieldname": "company_column_break", - "fieldtype": "Column Break" - }, - { - "fieldname": "default_cost_center", - "fieldtype": "Link", - "hidden": 1, - "label": "Default Cost Center", - "options": "Cost Center" - }, - { - "fieldname": "undeposited_funds_account", - "fieldtype": "Link", - "hidden": 1, - "label": "Undeposited Funds Account", - "options": "Account" - } - ], - "issingle": 1, - "modified": "2019-08-07 15:26:00.653433", - "modified_by": "Administrator", - "module": "ERPNext Integrations", - "name": "QuickBooks Migrator", - "owner": "Administrator", - "permissions": [ - { - "create": 1, - "delete": 1, - "email": 1, - "print": 1, - "read": 1, - "role": "System Manager", - "share": 1, - "write": 1 - } - ], - "quick_entry": 1, - "sort_field": "modified", - "sort_order": "DESC" -} \ No newline at end of file diff --git a/erpnext/erpnext_integrations/doctype/quickbooks_migrator/quickbooks_migrator.py b/erpnext/erpnext_integrations/doctype/quickbooks_migrator/quickbooks_migrator.py deleted file mode 100644 index 5175cbdf6a9..00000000000 --- a/erpnext/erpnext_integrations/doctype/quickbooks_migrator/quickbooks_migrator.py +++ /dev/null @@ -1,1421 +0,0 @@ -# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - - -import json -import traceback - -import frappe -import requests -from frappe import _ -from frappe.model.document import Document -from requests_oauthlib import OAuth2Session - -from erpnext import encode_company_abbr - - -# QuickBooks requires a redirect URL, User will be redirect to this URL -# This will be a GET request -# Request parameters will have two parameters `code` and `realmId` -# `code` is required to acquire refresh_token and access_token -# `realmId` is the QuickBooks Company ID. It is Needed to actually fetch data. -@frappe.whitelist() -def callback(*args, **kwargs): - migrator = frappe.get_doc("QuickBooks Migrator") - migrator.set_indicator("Connecting to QuickBooks") - migrator.code = kwargs.get("code") - migrator.quickbooks_company_id = kwargs.get("realmId") - migrator.save() - migrator.get_tokens() - frappe.db.commit() - migrator.set_indicator("Connected to QuickBooks") - # We need this page to automatically close afterwards - frappe.respond_as_web_page("Quickbooks Authentication", html="") - - -class QuickBooksMigrator(Document): - # begin: auto-generated types - # This code is auto-generated. Do not modify anything in this block. - - from typing import TYPE_CHECKING - - if TYPE_CHECKING: - from frappe.types import DF - - access_token: DF.SmallText | None - api_endpoint: DF.Data - authorization_endpoint: DF.Data - authorization_url: DF.Data - client_id: DF.Data - client_secret: DF.Data - code: DF.Data | None - company: DF.Link | None - default_cost_center: DF.Link | None - default_shipping_account: DF.Link | None - default_warehouse: DF.Link | None - quickbooks_company_id: DF.Data | None - redirect_url: DF.Data - refresh_token: DF.SmallText | None - scope: DF.Data - status: DF.Literal[ - "Connecting to QuickBooks", "Connected to QuickBooks", "In Progress", "Complete", "Failed" - ] - token_endpoint: DF.Data - undeposited_funds_account: DF.Link | None - # end: auto-generated types - - def __init__(self, *args, **kwargs): - super().__init__(*args, **kwargs) - self.oauth = OAuth2Session(client_id=self.client_id, redirect_uri=self.redirect_url, scope=self.scope) - if not self.authorization_url and self.authorization_endpoint: - self.authorization_url = self.oauth.authorization_url(self.authorization_endpoint)[0] - - def on_update(self): - if self.company: - # We need a Cost Center corresponding to the selected erpnext Company - self.default_cost_center = frappe.db.get_value("Company", self.company, "cost_center") - company_warehouses = frappe.get_all("Warehouse", filters={"company": self.company, "is_group": 0}) - if company_warehouses: - self.default_warehouse = company_warehouses[0].name - if self.authorization_endpoint: - self.authorization_url = self.oauth.authorization_url(self.authorization_endpoint)[0] - - @frappe.whitelist() - def migrate(self): - frappe.enqueue_doc("QuickBooks Migrator", "QuickBooks Migrator", "_migrate", queue="long") - - def _migrate(self): - try: - self.set_indicator("In Progress") - # Add quickbooks_id field to every document so that we can lookup by Id reference - # provided by documents in API responses. - # Also add a company field to Customer Supplier and Item - self._make_custom_fields() - - self._migrate_accounts() - - # Some Quickbooks Entities like Advance Payment, Payment aren't available firectly from API - # Sales Invoice also sometimes needs to be saved as a Journal Entry - # (When Item table is not present, This appens when Invoice is attached with a "StatementCharge" "ReimburseCharge - # Details of both of these cannot be fetched from API) - # Their GL entries need to be generated from GeneralLedger Report. - self._fetch_general_ledger() - - # QuickBooks data can have transactions that do not fall in existing fiscal years in ERPNext - self._create_fiscal_years() - - self._allow_fraction_in_unit() - - # Following entities are directly available from API - # Invoice can be an exception sometimes though (as explained above). - entities_for_normal_transform = [ - "Customer", - "Item", - "Vendor", - "Preferences", - "JournalEntry", - "Purchase", - "Deposit", - "Invoice", - "CreditMemo", - "SalesReceipt", - "RefundReceipt", - "Bill", - "VendorCredit", - "Payment", - "BillPayment", - ] - for entity in entities_for_normal_transform: - self._migrate_entries(entity) - - # Following entries are not available directly from API, Need to be regenrated from GeneralLedger Report - entities_for_gl_transform = [ - "Advance Payment", - "Tax Payment", - "Sales Tax Payment", - "Purchase Tax Payment", - "Inventory Qty Adjust", - ] - for entity in entities_for_gl_transform: - self._migrate_entries_from_gl(entity) - self.set_indicator("Complete") - except Exception as e: - self.set_indicator("Failed") - self._log_error(e) - - frappe.db.commit() - - def get_tokens(self): - token = self.oauth.fetch_token( - token_url=self.token_endpoint, client_secret=self.client_secret, code=self.code - ) - self.access_token = token["access_token"] - self.refresh_token = token["refresh_token"] - self.save() - - def _refresh_tokens(self): - token = self.oauth.refresh_token( - token_url=self.token_endpoint, - client_id=self.client_id, - refresh_token=self.refresh_token, - client_secret=self.client_secret, - code=self.code, - ) - self.access_token = token["access_token"] - self.refresh_token = token["refresh_token"] - self.save() - - def _make_custom_fields(self): - doctypes_for_quickbooks_id_field = [ - "Account", - "Customer", - "Address", - "Item", - "Supplier", - "Sales Invoice", - "Journal Entry", - "Purchase Invoice", - ] - for doctype in doctypes_for_quickbooks_id_field: - self._make_custom_quickbooks_id_field(doctype) - - doctypes_for_company_field = ["Customer", "Item", "Supplier"] - for doctype in doctypes_for_company_field: - self._make_custom_company_field(doctype) - - frappe.db.commit() - - def _make_custom_quickbooks_id_field(self, doctype): - if not frappe.get_meta(doctype).has_field("quickbooks_id"): - frappe.get_doc( - { - "doctype": "Custom Field", - "label": "QuickBooks ID", - "dt": doctype, - "fieldname": "quickbooks_id", - "fieldtype": "Data", - } - ).insert() - - def _make_custom_company_field(self, doctype): - if not frappe.get_meta(doctype).has_field("company"): - frappe.get_doc( - { - "doctype": "Custom Field", - "label": "Company", - "dt": doctype, - "fieldname": "company", - "fieldtype": "Link", - "options": "Company", - } - ).insert() - - def _migrate_accounts(self): - self._make_root_accounts() - for entity in ["Account", "TaxRate", "TaxCode"]: - self._migrate_entries(entity) - - def _make_root_accounts(self): - roots = ["Asset", "Equity", "Expense", "Liability", "Income"] - for root in roots: - try: - if not frappe.db.exists( - { - "doctype": "Account", - "name": encode_company_abbr(f"{root} - QB", self.company), - "company": self.company, - } - ): - frappe.get_doc( - { - "doctype": "Account", - "account_name": f"{root} - QB", - "root_type": root, - "is_group": "1", - "company": self.company, - } - ).insert(ignore_mandatory=True) - except Exception as e: - self._log_error(e, root) - frappe.db.commit() - - def _migrate_entries(self, entity): - try: - query_uri = f"{self.api_endpoint}/company/{self.quickbooks_company_id}/query" - max_result_count = 1000 - # Count number of entries - response = self._get(query_uri, params={"query": f"""SELECT COUNT(*) FROM {entity}"""}) - entry_count = response.json()["QueryResponse"]["totalCount"] - - # fetch pages and accumulate - entries = [] - for start_position in range(1, entry_count + 1, max_result_count): - response = self._get( - query_uri, - params={ - "query": """SELECT * FROM {} STARTPOSITION {} MAXRESULTS {}""".format( - entity, start_position, max_result_count - ) - }, - ) - entries.extend(response.json()["QueryResponse"][entity]) - entries = self._preprocess_entries(entity, entries) - self._save_entries(entity, entries) - except Exception as e: - self._log_error(e, response.text) - - def _fetch_general_ledger(self): - try: - query_uri = f"{self.api_endpoint}/company/{self.quickbooks_company_id}/reports/GeneralLedger" - response = self._get( - query_uri, - params={ - "columns": ",".join(["tx_date", "txn_type", "credit_amt", "debt_amt"]), - "date_macro": "All", - "minorversion": 3, - }, - ) - self.gl_entries = {} - for section in response.json()["Rows"]["Row"]: - if section["type"] == "Section": - self._get_gl_entries_from_section(section) - self.general_ledger = {} - for account in self.gl_entries.values(): - for line in account: - type_dict = self.general_ledger.setdefault(line["type"], {}) - if line["id"] not in type_dict: - type_dict[line["id"]] = { - "id": line["id"], - "date": line["date"], - "lines": [], - } - type_dict[line["id"]]["lines"].append(line) - except Exception as e: - self._log_error(e, response.text) - - def _create_fiscal_years(self): - try: - # Assumes that exactly one fiscal year has been created so far - # Creates fiscal years till oldest ledger entry date is covered - from itertools import chain - - from frappe.utils.data import add_years, getdate - - smallest_ledger_entry_date = getdate( - min(entry["date"] for entry in chain(*self.gl_entries.values()) if entry["date"]) - ) - oldest_fiscal_year = frappe.get_all( - "Fiscal Year", fields=["year_start_date", "year_end_date"], order_by="year_start_date" - )[0] - # Keep on creating fiscal years - # until smallest_ledger_entry_date is no longer smaller than the oldest fiscal year's start date - while smallest_ledger_entry_date < oldest_fiscal_year.year_start_date: - new_fiscal_year = frappe.get_doc({"doctype": "Fiscal Year"}) - new_fiscal_year.year_start_date = add_years(oldest_fiscal_year.year_start_date, -1) - new_fiscal_year.year_end_date = add_years(oldest_fiscal_year.year_end_date, -1) - if new_fiscal_year.year_start_date.year == new_fiscal_year.year_end_date.year: - new_fiscal_year.year = new_fiscal_year.year_start_date.year - else: - new_fiscal_year.year = "{}-{}".format( - new_fiscal_year.year_start_date.year, new_fiscal_year.year_end_date.year - ) - new_fiscal_year.save() - oldest_fiscal_year = new_fiscal_year - - frappe.db.commit() - except Exception as e: - self._log_error(e) - - def _migrate_entries_from_gl(self, entity): - if entity in self.general_ledger: - self._save_entries(entity, self.general_ledger[entity].values()) - - def _save_entries(self, entity, entries): - entity_method_map = { - "Account": self._save_account, - "TaxRate": self._save_tax_rate, - "TaxCode": self._save_tax_code, - "Preferences": self._save_preference, - "Customer": self._save_customer, - "Item": self._save_item, - "Vendor": self._save_vendor, - "Invoice": self._save_invoice, - "CreditMemo": self._save_credit_memo, - "SalesReceipt": self._save_sales_receipt, - "RefundReceipt": self._save_refund_receipt, - "JournalEntry": self._save_journal_entry, - "Bill": self._save_bill, - "VendorCredit": self._save_vendor_credit, - "Payment": self._save_payment, - "BillPayment": self._save_bill_payment, - "Purchase": self._save_purchase, - "Deposit": self._save_deposit, - "Advance Payment": self._save_advance_payment, - "Tax Payment": self._save_tax_payment, - "Sales Tax Payment": self._save_tax_payment, - "Purchase Tax Payment": self._save_tax_payment, - "Inventory Qty Adjust": self._save_inventory_qty_adjust, - } - total = len(entries) - for index, entry in enumerate(entries, start=1): - self._publish( - { - "event": "progress", - "message": _("Saving {0}").format(entity), - "count": index, - "total": total, - } - ) - entity_method_map[entity](entry) - frappe.db.commit() - - def _preprocess_entries(self, entity, entries): - entity_method_map = { - "Account": self._preprocess_accounts, - "TaxRate": self._preprocess_tax_rates, - "TaxCode": self._preprocess_tax_codes, - } - preprocessor = entity_method_map.get(entity) - if preprocessor: - entries = preprocessor(entries) - return entries - - def _get_gl_entries_from_section(self, section, account=None): - if "Header" in section: - if "id" in section["Header"]["ColData"][0]: - account = self._get_account_name_by_id(section["Header"]["ColData"][0]["id"]) - elif "value" in section["Header"]["ColData"][0] and section["Header"]["ColData"][0]["value"]: - # For some reason during migrating UK company, account id is not available. - # preprocess_accounts retains name:account mapping in self.accounts - # This mapping can then be used to obtain quickbooks_id for correspondong account - # Rest is trivial - - # Some Lines in General Leder Report are shown under Not Specified - # These should be skipped - if section["Header"]["ColData"][0]["value"] == "Not Specified": - return - account_id = self.accounts[section["Header"]["ColData"][0]["value"]]["Id"] - account = self._get_account_name_by_id(account_id) - entries = [] - for row in section["Rows"]["Row"]: - if row["type"] == "Data": - data = row["ColData"] - entries.append( - { - "account": account, - "date": data[0]["value"], - "type": data[1]["value"], - "id": data[1].get("id"), - "credit": frappe.utils.flt(data[2]["value"]), - "debit": frappe.utils.flt(data[3]["value"]), - } - ) - if row["type"] == "Section": - self._get_gl_entries_from_section(row, account) - self.gl_entries.setdefault(account, []).extend(entries) - - def _preprocess_accounts(self, accounts): - self.accounts = {account["Name"]: account for account in accounts} - for account in accounts: - if any(acc["SubAccount"] and acc["ParentRef"]["value"] == account["Id"] for acc in accounts): - account["is_group"] = 1 - else: - account["is_group"] = 0 - return sorted(accounts, key=lambda account: int(account["Id"])) - - def _save_account(self, account): - mapping = { - "Bank": "Asset", - "Other Current Asset": "Asset", - "Fixed Asset": "Asset", - "Other Asset": "Asset", - "Accounts Receivable": "Asset", - "Equity": "Equity", - "Expense": "Expense", - "Other Expense": "Expense", - "Cost of Goods Sold": "Expense", - "Accounts Payable": "Liability", - "Credit Card": "Liability", - "Long Term Liability": "Liability", - "Other Current Liability": "Liability", - "Income": "Income", - "Other Income": "Income", - } - # Map Quickbooks Account Types to ERPNext root_accunts and and root_type - try: - if not frappe.db.exists( - {"doctype": "Account", "quickbooks_id": account["Id"], "company": self.company} - ): - is_child = account["SubAccount"] - is_group = account["is_group"] - # Create Two Accounts for every Group Account - if is_group: - account_id = "Group - {}".format(account["Id"]) - else: - account_id = account["Id"] - - if is_child: - parent_account = self._get_account_name_by_id( - "Group - {}".format(account["ParentRef"]["value"]) - ) - else: - parent_account = encode_company_abbr( - "{} - QB".format(mapping[account["AccountType"]]), self.company - ) - - frappe.get_doc( - { - "doctype": "Account", - "quickbooks_id": account_id, - "account_name": self._get_unique_account_name(account["Name"]), - "root_type": mapping[account["AccountType"]], - "account_type": self._get_account_type(account), - "account_currency": account["CurrencyRef"]["value"], - "parent_account": parent_account, - "is_group": is_group, - "company": self.company, - } - ).insert() - - if is_group: - # Create a Leaf account corresponding to the group account - frappe.get_doc( - { - "doctype": "Account", - "quickbooks_id": account["Id"], - "account_name": self._get_unique_account_name(account["Name"]), - "root_type": mapping[account["AccountType"]], - "account_type": self._get_account_type(account), - "account_currency": account["CurrencyRef"]["value"], - "parent_account": self._get_account_name_by_id(account_id), - "is_group": 0, - "company": self.company, - } - ).insert() - if account.get("AccountSubType") == "UndepositedFunds": - self.undeposited_funds_account = self._get_account_name_by_id(account["Id"]) - self.save() - except Exception as e: - self._log_error(e, account) - - def _get_account_type(self, account): - account_subtype_mapping = {"UndepositedFunds": "Cash"} - account_type = account_subtype_mapping.get(account.get("AccountSubType")) - if account_type is None: - account_type_mapping = { - "Accounts Payable": "Payable", - "Accounts Receivable": "Receivable", - "Bank": "Bank", - "Credit Card": "Bank", - } - account_type = account_type_mapping.get(account["AccountType"]) - return account_type - - def _preprocess_tax_rates(self, tax_rates): - self.tax_rates = {tax_rate["Id"]: tax_rate for tax_rate in tax_rates} - return tax_rates - - def _save_tax_rate(self, tax_rate): - try: - if not frappe.db.exists( - { - "doctype": "Account", - "quickbooks_id": "TaxRate - {}".format(tax_rate["Id"]), - "company": self.company, - } - ): - frappe.get_doc( - { - "doctype": "Account", - "quickbooks_id": "TaxRate - {}".format(tax_rate["Id"]), - "account_name": "{} - QB".format(tax_rate["Name"]), - "root_type": "Liability", - "parent_account": encode_company_abbr("{} - QB".format("Liability"), self.company), - "is_group": "0", - "company": self.company, - } - ).insert() - except Exception as e: - self._log_error(e, tax_rate) - - def _preprocess_tax_codes(self, tax_codes): - self.tax_codes = {tax_code["Id"]: tax_code for tax_code in tax_codes} - return tax_codes - - def _save_tax_code(self, tax_code): - pass - - def _save_customer(self, customer): - try: - if not frappe.db.exists( - {"doctype": "Customer", "quickbooks_id": customer["Id"], "company": self.company} - ): - try: - receivable_account = frappe.get_all( - "Account", - filters={ - "account_type": "Receivable", - "account_currency": customer["CurrencyRef"]["value"], - "company": self.company, - }, - )[0]["name"] - except Exception: - receivable_account = None - erpcustomer = frappe.get_doc( - { - "doctype": "Customer", - "quickbooks_id": customer["Id"], - "customer_name": encode_company_abbr(customer["DisplayName"], self.company), - "customer_type": "Individual", - "customer_group": "Commercial", - "default_currency": customer["CurrencyRef"]["value"], - "accounts": [{"company": self.company, "account": receivable_account}], - "territory": "All Territories", - "company": self.company, - } - ).insert() - if "BillAddr" in customer: - self._create_address(erpcustomer, "Customer", customer["BillAddr"], "Billing") - if "ShipAddr" in customer: - self._create_address(erpcustomer, "Customer", customer["ShipAddr"], "Shipping") - except Exception as e: - self._log_error(e, customer) - - def _save_item(self, item): - try: - if not frappe.db.exists( - {"doctype": "Item", "quickbooks_id": item["Id"], "company": self.company} - ): - if item["Type"] in ("Service", "Inventory"): - item_dict = { - "doctype": "Item", - "quickbooks_id": item["Id"], - "item_code": encode_company_abbr(item["Name"], self.company), - "stock_uom": "Unit", - "is_stock_item": 0, - "item_group": "All Item Groups", - "company": self.company, - "item_defaults": [ - {"company": self.company, "default_warehouse": self.default_warehouse} - ], - } - if "ExpenseAccountRef" in item: - expense_account = self._get_account_name_by_id(item["ExpenseAccountRef"]["value"]) - item_dict["item_defaults"][0]["expense_account"] = expense_account - if "IncomeAccountRef" in item: - income_account = self._get_account_name_by_id(item["IncomeAccountRef"]["value"]) - item_dict["item_defaults"][0]["income_account"] = income_account - frappe.get_doc(item_dict).insert() - except Exception as e: - self._log_error(e, item) - - def _allow_fraction_in_unit(self): - frappe.db.set_value("UOM", "Unit", "must_be_whole_number", 0) - - def _save_vendor(self, vendor): - try: - if not frappe.db.exists( - {"doctype": "Supplier", "quickbooks_id": vendor["Id"], "company": self.company} - ): - erpsupplier = frappe.get_doc( - { - "doctype": "Supplier", - "quickbooks_id": vendor["Id"], - "supplier_name": encode_company_abbr(vendor["DisplayName"], self.company), - "supplier_group": "All Supplier Groups", - "company": self.company, - } - ).insert() - if "BillAddr" in vendor: - self._create_address(erpsupplier, "Supplier", vendor["BillAddr"], "Billing") - if "ShipAddr" in vendor: - self._create_address(erpsupplier, "Supplier", vendor["ShipAddr"], "Shipping") - except Exception as e: - self._log_error(e) - - def _save_preference(self, preference): - try: - if preference["SalesFormsPrefs"]["AllowShipping"]: - default_shipping_account_id = preference["SalesFormsPrefs"]["DefaultShippingAccount"] - self.default_shipping_account = self._get_account_name_by_id( - self, default_shipping_account_id - ) - self.save() - except Exception as e: - self._log_error(e, preference) - - def _save_invoice(self, invoice): - # Invoice can be Linked with Another Transactions - # If any of these transactions is a "StatementCharge" or "ReimburseCharge" then in the UI - # item list is populated from the corresponding transaction, these items are not shown in api response - # Also as of now there is no way of fetching the corresponding transaction from api - # We in order to correctly reflect account balance make an equivalent Journal Entry - quickbooks_id = "Invoice - {}".format(invoice["Id"]) - if any( - linked["TxnType"] in ("StatementCharge", "ReimburseCharge") for linked in invoice["LinkedTxn"] - ): - self._save_invoice_as_journal_entry(invoice, quickbooks_id) - else: - self._save_sales_invoice(invoice, quickbooks_id) - - def _save_credit_memo(self, credit_memo): - # Credit Memo is equivalent to a return Sales Invoice - quickbooks_id = "Credit Memo - {}".format(credit_memo["Id"]) - self._save_sales_invoice(credit_memo, quickbooks_id, is_return=True) - - def _save_sales_receipt(self, sales_receipt): - # Sales Receipt is equivalent to a POS Sales Invoice - quickbooks_id = "Sales Receipt - {}".format(sales_receipt["Id"]) - self._save_sales_invoice(sales_receipt, quickbooks_id, is_pos=True) - - def _save_refund_receipt(self, refund_receipt): - # Refund Receipt is equivalent to a return POS Sales Invoice - quickbooks_id = "Refund Receipt - {}".format(refund_receipt["Id"]) - self._save_sales_invoice(refund_receipt, quickbooks_id, is_return=True, is_pos=True) - - def _save_sales_invoice(self, invoice, quickbooks_id, is_return=False, is_pos=False): - try: - if not frappe.db.exists( - {"doctype": "Sales Invoice", "quickbooks_id": quickbooks_id, "company": self.company} - ): - invoice_dict = { - "doctype": "Sales Invoice", - "quickbooks_id": quickbooks_id, - # Quickbooks uses ISO 4217 Code - # of course this gonna come back to bite me - "currency": invoice["CurrencyRef"]["value"], - # Exchange Rate is provided if multicurrency is enabled - # It is not provided if multicurrency is not enabled - "conversion_rate": invoice.get("ExchangeRate", 1), - "posting_date": invoice["TxnDate"], - # QuickBooks doesn't make Due Date a mandatory field this is a hack - "due_date": invoice.get("DueDate", invoice["TxnDate"]), - "customer": frappe.get_all( - "Customer", - filters={ - "quickbooks_id": invoice["CustomerRef"]["value"], - "company": self.company, - }, - )[0]["name"], - "items": self._get_si_items(invoice, is_return=is_return), - "taxes": self._get_taxes(invoice), - # Do not change posting_date upon submission - "set_posting_time": 1, - # QuickBooks doesn't round total - "disable_rounded_total": 1, - "is_return": is_return, - "is_pos": is_pos, - "payments": self._get_invoice_payments(invoice, is_return=is_return, is_pos=is_pos), - "company": self.company, - } - discount = self._get_discount(invoice["Line"]) - if discount: - if invoice["ApplyTaxAfterDiscount"]: - invoice_dict["apply_discount_on"] = "Net Total" - else: - invoice_dict["apply_discount_on"] = "Grand Total" - invoice_dict["discount_amount"] = discount["Amount"] - - invoice_doc = frappe.get_doc(invoice_dict) - invoice_doc.insert() - invoice_doc.submit() - except Exception as e: - self._log_error(e, [invoice, invoice_dict, json.loads(invoice_doc.as_json())]) - - def _get_si_items(self, invoice, is_return=False): - items = [] - for line in invoice["Line"]: - if line["DetailType"] == "SalesItemLineDetail": - if line["SalesItemLineDetail"]["TaxCodeRef"]["value"] != "TAX": - tax_code = line["SalesItemLineDetail"]["TaxCodeRef"]["value"] - else: - if "TxnTaxCodeRef" in invoice["TxnTaxDetail"]: - tax_code = invoice["TxnTaxDetail"]["TxnTaxCodeRef"]["value"] - else: - tax_code = "NON" - if line["SalesItemLineDetail"]["ItemRef"]["value"] != "SHIPPING_ITEM_ID": - item = frappe.db.get_all( - "Item", - filters={ - "quickbooks_id": line["SalesItemLineDetail"]["ItemRef"]["value"], - "company": self.company, - }, - fields=["name", "stock_uom"], - )[0] - items.append( - { - "item_code": item["name"], - "conversion_factor": 1, - "uom": item["stock_uom"], - "description": line.get( - "Description", line["SalesItemLineDetail"]["ItemRef"]["name"] - ), - "qty": line["SalesItemLineDetail"]["Qty"], - "price_list_rate": line["SalesItemLineDetail"]["UnitPrice"], - "cost_center": self.default_cost_center, - "warehouse": self.default_warehouse, - "item_tax_rate": json.dumps(self._get_item_taxes(tax_code)), - } - ) - else: - items.append( - { - "item_name": "Shipping", - "conversion_factor": 1, - "expense_account": self._get_account_name_by_id( - "TaxRate - {}".format(line["SalesItemLineDetail"]["TaxCodeRef"]["value"]) - ), - "uom": "Unit", - "description": "Shipping", - "income_account": self.default_shipping_account, - "qty": 1, - "price_list_rate": line["Amount"], - "cost_center": self.default_cost_center, - "warehouse": self.default_warehouse, - "item_tax_rate": json.dumps(self._get_item_taxes(tax_code)), - } - ) - if is_return: - items[-1]["qty"] *= -1 - elif line["DetailType"] == "DescriptionOnly": - items[-1].update( - { - "margin_type": "Percentage", - "margin_rate_or_amount": int(line["Description"].split("%")[0]), - } - ) - return items - - def _get_item_taxes(self, tax_code): - tax_rates = self.tax_rates - item_taxes = {} - if tax_code != "NON": - tax_code = self.tax_codes[tax_code] - for rate_list_type in ("SalesTaxRateList", "PurchaseTaxRateList"): - if rate_list_type in tax_code: - for tax_rate_detail in tax_code[rate_list_type]["TaxRateDetail"]: - if tax_rate_detail["TaxTypeApplicable"] == "TaxOnAmount": - tax_head = self._get_account_name_by_id( - "TaxRate - {}".format(tax_rate_detail["TaxRateRef"]["value"]) - ) - tax_rate = tax_rates[tax_rate_detail["TaxRateRef"]["value"]] - item_taxes[tax_head] = tax_rate["RateValue"] - return item_taxes - - def _get_invoice_payments(self, invoice, is_return=False, is_pos=False): - if is_pos: - amount = invoice["TotalAmt"] - if is_return: - amount = -amount - return [ - { - "mode_of_payment": "Cash", - "account": self._get_account_name_by_id(invoice["DepositToAccountRef"]["value"]), - "amount": amount, - } - ] - - def _get_discount(self, lines): - for line in lines: - if line["DetailType"] == "DiscountLineDetail" and "Amount" in line["DiscountLineDetail"]: - return line - - def _save_invoice_as_journal_entry(self, invoice, quickbooks_id): - try: - accounts = [] - for line in self.general_ledger["Invoice"][invoice["Id"]]["lines"]: - account_line = {"account": line["account"], "cost_center": self.default_cost_center} - if line["debit"]: - account_line["debit_in_account_currency"] = line["debit"] - elif line["credit"]: - account_line["credit_in_account_currency"] = line["credit"] - if frappe.db.get_value("Account", line["account"], "account_type") == "Receivable": - account_line["party_type"] = "Customer" - account_line["party"] = frappe.get_all( - "Customer", - filters={"quickbooks_id": invoice["CustomerRef"]["value"], "company": self.company}, - )[0]["name"] - - accounts.append(account_line) - - posting_date = invoice["TxnDate"] - self.__save_journal_entry(quickbooks_id, accounts, posting_date) - except Exception as e: - self._log_error(e, [invoice, accounts]) - - def _save_journal_entry(self, journal_entry): - # JournalEntry is equivalent to a Journal Entry - - def _get_je_accounts(lines): - # Converts JounalEntry lines to accounts list - posting_type_field_mapping = { - "Credit": "credit_in_account_currency", - "Debit": "debit_in_account_currency", - } - accounts = [] - for line in lines: - if line["DetailType"] == "JournalEntryLineDetail": - account_name = self._get_account_name_by_id( - line["JournalEntryLineDetail"]["AccountRef"]["value"] - ) - posting_type = line["JournalEntryLineDetail"]["PostingType"] - accounts.append( - { - "account": account_name, - posting_type_field_mapping[posting_type]: line["Amount"], - "cost_center": self.default_cost_center, - } - ) - return accounts - - quickbooks_id = "Journal Entry - {}".format(journal_entry["Id"]) - accounts = _get_je_accounts(journal_entry["Line"]) - posting_date = journal_entry["TxnDate"] - self.__save_journal_entry(quickbooks_id, accounts, posting_date) - - def __save_journal_entry(self, quickbooks_id, accounts, posting_date): - try: - if not frappe.db.exists( - {"doctype": "Journal Entry", "quickbooks_id": quickbooks_id, "company": self.company} - ): - je = frappe.get_doc( - { - "doctype": "Journal Entry", - "quickbooks_id": quickbooks_id, - "company": self.company, - "posting_date": posting_date, - "accounts": accounts, - "multi_currency": 1, - } - ) - je.insert() - je.submit() - except Exception as e: - self._log_error(e, [accounts, json.loads(je.as_json())]) - - def _save_bill(self, bill): - # Bill is equivalent to a Purchase Invoice - quickbooks_id = "Bill - {}".format(bill["Id"]) - self.__save_purchase_invoice(bill, quickbooks_id) - - def _save_vendor_credit(self, vendor_credit): - # Vendor Credit is equivalent to a return Purchase Invoice - quickbooks_id = "Vendor Credit - {}".format(vendor_credit["Id"]) - self.__save_purchase_invoice(vendor_credit, quickbooks_id, is_return=True) - - def __save_purchase_invoice(self, invoice, quickbooks_id, is_return=False): - try: - if not frappe.db.exists( - {"doctype": "Purchase Invoice", "quickbooks_id": quickbooks_id, "company": self.company} - ): - credit_to_account = self._get_account_name_by_id(invoice["APAccountRef"]["value"]) - invoice_dict = { - "doctype": "Purchase Invoice", - "quickbooks_id": quickbooks_id, - "currency": invoice["CurrencyRef"]["value"], - "conversion_rate": invoice.get("ExchangeRate", 1), - "posting_date": invoice["TxnDate"], - "due_date": invoice.get("DueDate", invoice["TxnDate"]), - "credit_to": credit_to_account, - "supplier": frappe.get_all( - "Supplier", - filters={ - "quickbooks_id": invoice["VendorRef"]["value"], - "company": self.company, - }, - )[0]["name"], - "items": self._get_pi_items(invoice, is_return=is_return), - "taxes": self._get_taxes(invoice), - "set_posting_time": 1, - "disable_rounded_total": 1, - "is_return": is_return, - "udpate_stock": 0, - "company": self.company, - } - invoice_doc = frappe.get_doc(invoice_dict) - invoice_doc.insert() - invoice_doc.submit() - except Exception as e: - self._log_error(e, [invoice, invoice_dict, json.loads(invoice_doc.as_json())]) - - def _get_pi_items(self, purchase_invoice, is_return=False): - items = [] - for line in purchase_invoice["Line"]: - if line["DetailType"] == "ItemBasedExpenseLineDetail": - if line["ItemBasedExpenseLineDetail"]["TaxCodeRef"]["value"] != "TAX": - tax_code = line["ItemBasedExpenseLineDetail"]["TaxCodeRef"]["value"] - else: - if "TxnTaxCodeRef" in purchase_invoice["TxnTaxDetail"]: - tax_code = purchase_invoice["TxnTaxDetail"]["TxnTaxCodeRef"]["value"] - else: - tax_code = "NON" - item = frappe.db.get_all( - "Item", - filters={ - "quickbooks_id": line["ItemBasedExpenseLineDetail"]["ItemRef"]["value"], - "company": self.company, - }, - fields=["name", "stock_uom"], - )[0] - items.append( - { - "item_code": item["name"], - "conversion_factor": 1, - "uom": item["stock_uom"], - "description": line.get( - "Description", line["ItemBasedExpenseLineDetail"]["ItemRef"]["name"] - ), - "qty": line["ItemBasedExpenseLineDetail"]["Qty"], - "price_list_rate": line["ItemBasedExpenseLineDetail"]["UnitPrice"], - "warehouse": self.default_warehouse, - "cost_center": self.default_cost_center, - "item_tax_rate": json.dumps(self._get_item_taxes(tax_code)), - } - ) - elif line["DetailType"] == "AccountBasedExpenseLineDetail": - if line["AccountBasedExpenseLineDetail"]["TaxCodeRef"]["value"] != "TAX": - tax_code = line["AccountBasedExpenseLineDetail"]["TaxCodeRef"]["value"] - else: - if "TxnTaxCodeRef" in purchase_invoice["TxnTaxDetail"]: - tax_code = purchase_invoice["TxnTaxDetail"]["TxnTaxCodeRef"]["value"] - else: - tax_code = "NON" - items.append( - { - "item_name": line.get( - "Description", line["AccountBasedExpenseLineDetail"]["AccountRef"]["name"] - ), - "conversion_factor": 1, - "expense_account": self._get_account_name_by_id( - line["AccountBasedExpenseLineDetail"]["AccountRef"]["value"] - ), - "uom": "Unit", - "description": line.get( - "Description", line["AccountBasedExpenseLineDetail"]["AccountRef"]["name"] - ), - "qty": 1, - "price_list_rate": line["Amount"], - "warehouse": self.default_warehouse, - "cost_center": self.default_cost_center, - "item_tax_rate": json.dumps(self._get_item_taxes(tax_code)), - } - ) - if is_return: - items[-1]["qty"] *= -1 - return items - - def _save_payment(self, payment): - try: - quickbooks_id = "Payment - {}".format(payment["Id"]) - # If DepositToAccountRef is not set on payment that means it actually doesn't affect any accounts - # No need to record such payment - # Such payment record is created QuickBooks Payments API - if "DepositToAccountRef" not in payment: - return - - # A Payment can be linked to multiple transactions - accounts = [] - for line in payment["Line"]: - linked_transaction = line["LinkedTxn"][0] - if linked_transaction["TxnType"] == "Invoice": - si_quickbooks_id = "Invoice - {}".format(linked_transaction["TxnId"]) - # Invoice could have been saved as a Sales Invoice or a Journal Entry - if frappe.db.exists( - { - "doctype": "Sales Invoice", - "quickbooks_id": si_quickbooks_id, - "company": self.company, - } - ): - sales_invoice = frappe.get_all( - "Sales Invoice", - filters={ - "quickbooks_id": si_quickbooks_id, - "company": self.company, - }, - fields=["name", "customer", "debit_to"], - )[0] - reference_type = "Sales Invoice" - reference_name = sales_invoice["name"] - party = sales_invoice["customer"] - party_account = sales_invoice["debit_to"] - - if frappe.db.exists( - { - "doctype": "Journal Entry", - "quickbooks_id": si_quickbooks_id, - "company": self.company, - } - ): - journal_entry = frappe.get_doc( - "Journal Entry", - { - "quickbooks_id": si_quickbooks_id, - "company": self.company, - }, - ) - # Invoice saved as a Journal Entry must have party and party_type set on line containing Receivable Account - customer_account_line = next( - filter(lambda acc: acc.party_type == "Customer", journal_entry.accounts) - ) - - reference_type = "Journal Entry" - reference_name = journal_entry.name - party = customer_account_line.party - party_account = customer_account_line.account - - accounts.append( - { - "party_type": "Customer", - "party": party, - "reference_type": reference_type, - "reference_name": reference_name, - "account": party_account, - "credit_in_account_currency": line["Amount"], - "cost_center": self.default_cost_center, - } - ) - - deposit_account = self._get_account_name_by_id(payment["DepositToAccountRef"]["value"]) - accounts.append( - { - "account": deposit_account, - "debit_in_account_currency": payment["TotalAmt"], - "cost_center": self.default_cost_center, - } - ) - posting_date = payment["TxnDate"] - self.__save_journal_entry(quickbooks_id, accounts, posting_date) - except Exception as e: - self._log_error(e, [payment, accounts]) - - def _save_bill_payment(self, bill_payment): - try: - quickbooks_id = "BillPayment - {}".format(bill_payment["Id"]) - # A BillPayment can be linked to multiple transactions - accounts = [] - for line in bill_payment["Line"]: - linked_transaction = line["LinkedTxn"][0] - if linked_transaction["TxnType"] == "Bill": - pi_quickbooks_id = "Bill - {}".format(linked_transaction["TxnId"]) - if frappe.db.exists( - { - "doctype": "Purchase Invoice", - "quickbooks_id": pi_quickbooks_id, - "company": self.company, - } - ): - purchase_invoice = frappe.get_all( - "Purchase Invoice", - filters={ - "quickbooks_id": pi_quickbooks_id, - "company": self.company, - }, - fields=["name", "supplier", "credit_to"], - )[0] - reference_type = "Purchase Invoice" - reference_name = purchase_invoice["name"] - party = purchase_invoice["supplier"] - party_account = purchase_invoice["credit_to"] - accounts.append( - { - "party_type": "Supplier", - "party": party, - "reference_type": reference_type, - "reference_name": reference_name, - "account": party_account, - "debit_in_account_currency": line["Amount"], - "cost_center": self.default_cost_center, - } - ) - - if bill_payment["PayType"] == "Check": - bank_account_id = bill_payment["CheckPayment"]["BankAccountRef"]["value"] - elif bill_payment["PayType"] == "CreditCard": - bank_account_id = bill_payment["CreditCardPayment"]["CCAccountRef"]["value"] - - bank_account = self._get_account_name_by_id(bank_account_id) - accounts.append( - { - "account": bank_account, - "credit_in_account_currency": bill_payment["TotalAmt"], - "cost_center": self.default_cost_center, - } - ) - posting_date = bill_payment["TxnDate"] - self.__save_journal_entry(quickbooks_id, accounts, posting_date) - except Exception as e: - self._log_error(e, [bill_payment, accounts]) - - def _save_purchase(self, purchase): - try: - quickbooks_id = "Purchase - {}".format(purchase["Id"]) - # Credit Bank Account - accounts = [ - { - "account": self._get_account_name_by_id(purchase["AccountRef"]["value"]), - "credit_in_account_currency": purchase["TotalAmt"], - "cost_center": self.default_cost_center, - } - ] - - # Debit Mentioned Accounts - for line in purchase["Line"]: - if line["DetailType"] == "AccountBasedExpenseLineDetail": - account = self._get_account_name_by_id( - line["AccountBasedExpenseLineDetail"]["AccountRef"]["value"] - ) - elif line["DetailType"] == "ItemBasedExpenseLineDetail": - account = ( - frappe.get_doc( - "Item", - { - "quickbooks_id": line["ItemBasedExpenseLineDetail"]["ItemRef"]["value"], - "company": self.company, - }, - ) - .item_defaults[0] - .expense_account - ) - accounts.append( - { - "account": account, - "debit_in_account_currency": line["Amount"], - "cost_center": self.default_cost_center, - } - ) - - # Debit Tax Accounts - if "TxnTaxDetail" in purchase: - for line in purchase["TxnTaxDetail"]["TaxLine"]: - accounts.append( - { - "account": self._get_account_name_by_id( - "TaxRate - {}".format(line["TaxLineDetail"]["TaxRateRef"]["value"]) - ), - "debit_in_account_currency": line["Amount"], - "cost_center": self.default_cost_center, - } - ) - - # If purchase["Credit"] is set to be True then it represents a refund - if purchase.get("Credit"): - for account in accounts: - if "debit_in_account_currency" in account: - account["credit_in_account_currency"] = account["debit_in_account_currency"] - del account["debit_in_account_currency"] - else: - account["debit_in_account_currency"] = account["credit_in_account_currency"] - del account["credit_in_account_currency"] - - posting_date = purchase["TxnDate"] - self.__save_journal_entry(quickbooks_id, accounts, posting_date) - except Exception as e: - self._log_error(e, [purchase, accounts]) - - def _save_deposit(self, deposit): - try: - quickbooks_id = "Deposit - {}".format(deposit["Id"]) - # Debit Bank Account - accounts = [ - { - "account": self._get_account_name_by_id(deposit["DepositToAccountRef"]["value"]), - "debit_in_account_currency": deposit["TotalAmt"], - "cost_center": self.default_cost_center, - } - ] - - # Credit Mentioned Accounts - for line in deposit["Line"]: - if "LinkedTxn" in line: - accounts.append( - { - "account": self.undeposited_funds_account, - "credit_in_account_currency": line["Amount"], - "cost_center": self.default_cost_center, - } - ) - else: - accounts.append( - { - "account": self._get_account_name_by_id( - line["DepositLineDetail"]["AccountRef"]["value"] - ), - "credit_in_account_currency": line["Amount"], - "cost_center": self.default_cost_center, - } - ) - - # Debit Cashback if mentioned - if "CashBack" in deposit: - accounts.append( - { - "account": self._get_account_name_by_id(deposit["CashBack"]["AccountRef"]["value"]), - "debit_in_account_currency": deposit["CashBack"]["Amount"], - "cost_center": self.default_cost_center, - } - ) - - posting_date = deposit["TxnDate"] - self.__save_journal_entry(quickbooks_id, accounts, posting_date) - except Exception as e: - self._log_error(e, [deposit, accounts]) - - def _save_advance_payment(self, advance_payment): - quickbooks_id = "Advance Payment - {}".format(advance_payment["id"]) - self.__save_ledger_entry_as_je(advance_payment, quickbooks_id) - - def _save_tax_payment(self, tax_payment): - quickbooks_id = "Tax Payment - {}".format(tax_payment["id"]) - self.__save_ledger_entry_as_je(tax_payment, quickbooks_id) - - def _save_inventory_qty_adjust(self, inventory_qty_adjust): - quickbooks_id = "Inventory Qty Adjust - {}".format(inventory_qty_adjust["id"]) - self.__save_ledger_entry_as_je(inventory_qty_adjust, quickbooks_id) - - def __save_ledger_entry_as_je(self, ledger_entry, quickbooks_id): - try: - accounts = [] - for line in ledger_entry["lines"]: - account_line = {"account": line["account"], "cost_center": self.default_cost_center} - if line["credit"]: - account_line["credit_in_account_currency"] = line["credit"] - else: - account_line["debit_in_account_currency"] = line["debit"] - accounts.append(account_line) - - posting_date = ledger_entry["date"] - self.__save_journal_entry(quickbooks_id, accounts, posting_date) - except Exception as e: - self._log_error(e, ledger_entry) - - def _get_taxes(self, entry): - taxes = [] - if "TxnTaxDetail" not in entry or "TaxLine" not in entry["TxnTaxDetail"]: - return taxes - for line in entry["TxnTaxDetail"]["TaxLine"]: - tax_rate = line["TaxLineDetail"]["TaxRateRef"]["value"] - account_head = self._get_account_name_by_id(f"TaxRate - {tax_rate}") - tax_type_applicable = self._get_tax_type(tax_rate) - if tax_type_applicable == "TaxOnAmount": - taxes.append( - { - "charge_type": "On Net Total", - "account_head": account_head, - "description": account_head, - "cost_center": self.default_cost_center, - "rate": 0, - } - ) - else: - parent_tax_rate = self._get_parent_tax_rate(tax_rate) - parent_row_id = self._get_parent_row_id(parent_tax_rate, taxes) - taxes.append( - { - "charge_type": "On Previous Row Amount", - "row_id": parent_row_id, - "account_head": account_head, - "description": account_head, - "cost_center": self.default_cost_center, - "rate": line["TaxLineDetail"]["TaxPercent"], - } - ) - return taxes - - def _get_tax_type(self, tax_rate): - for tax_code in self.tax_codes.values(): - for rate_list_type in ("SalesTaxRateList", "PurchaseTaxRateList"): - if rate_list_type in tax_code: - for tax_rate_detail in tax_code[rate_list_type]["TaxRateDetail"]: - if tax_rate_detail["TaxRateRef"]["value"] == tax_rate: - return tax_rate_detail["TaxTypeApplicable"] - - def _get_parent_tax_rate(self, tax_rate): - parent = None - for tax_code in self.tax_codes.values(): - for rate_list_type in ("SalesTaxRateList", "PurchaseTaxRateList"): - if rate_list_type in tax_code: - for tax_rate_detail in tax_code[rate_list_type]["TaxRateDetail"]: - if tax_rate_detail["TaxRateRef"]["value"] == tax_rate: - parent = tax_rate_detail["TaxOnTaxOrder"] - if parent: - for tax_rate_detail in tax_code[rate_list_type]["TaxRateDetail"]: - if tax_rate_detail["TaxOrder"] == parent: - return tax_rate_detail["TaxRateRef"]["value"] - - def _get_parent_row_id(self, tax_rate, taxes): - tax_account = self._get_account_name_by_id(f"TaxRate - {tax_rate}") - for index, tax in enumerate(taxes): - if tax["account_head"] == tax_account: - return index + 1 - - def _create_address(self, entity, doctype, address, address_type): - try: - if not frappe.db.exists({"doctype": "Address", "quickbooks_id": address["Id"]}): - frappe.get_doc( - { - "doctype": "Address", - "quickbooks_address_id": address["Id"], - "address_title": entity.name, - "address_type": address_type, - "address_line1": address["Line1"], - "city": address["City"], - "links": [{"link_doctype": doctype, "link_name": entity.name}], - } - ).insert() - except Exception as e: - self._log_error(e, address) - - def _get(self, *args, **kwargs): - kwargs["headers"] = { - "Accept": "application/json", - "Authorization": f"Bearer {self.access_token}", - } - response = requests.get(*args, **kwargs) - # HTTP Status code 401 here means that the access_token is expired - # We can refresh tokens and retry - # However limitless recursion does look dangerous - if response.status_code == 401: - self._refresh_tokens() - response = self._get(*args, **kwargs) - return response - - def _get_account_name_by_id(self, quickbooks_id): - return frappe.get_all("Account", filters={"quickbooks_id": quickbooks_id, "company": self.company})[ - 0 - ]["name"] - - def _publish(self, *args, **kwargs): - frappe.publish_realtime("quickbooks_progress_update", *args, **kwargs, user=self.modified_by) - - def _get_unique_account_name(self, quickbooks_name, number=0): - if number: - quickbooks_account_name = f"{quickbooks_name} - {number} - QB" - else: - quickbooks_account_name = f"{quickbooks_name} - QB" - company_encoded_account_name = encode_company_abbr(quickbooks_account_name, self.company) - if frappe.db.exists( - {"doctype": "Account", "name": company_encoded_account_name, "company": self.company} - ): - unique_account_name = self._get_unique_account_name(quickbooks_name, number + 1) - else: - unique_account_name = quickbooks_account_name - return unique_account_name - - def _log_error(self, execption, data=""): - frappe.log_error( - title="QuickBooks Migration Error", - message="\n".join( - [ - "Data", - json.dumps(data, sort_keys=True, indent=4, separators=(",", ": ")), - "Exception", - traceback.format_exc(), - ] - ), - ) - - def set_indicator(self, status): - self.status = status - self.save() - frappe.db.commit() diff --git a/erpnext/erpnext_integrations/doctype/quickbooks_migrator/test_quickbooks_migrator.py b/erpnext/erpnext_integrations/doctype/quickbooks_migrator/test_quickbooks_migrator.py deleted file mode 100644 index 92e79ec8a4a..00000000000 --- a/erpnext/erpnext_integrations/doctype/quickbooks_migrator/test_quickbooks_migrator.py +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt - -import unittest - - -class TestQuickBooksMigrator(unittest.TestCase): - pass From 0e088dde36b2ccb2fdd17b2e2f5a76ca9f9170a1 Mon Sep 17 00:00:00 2001 From: mahsem <137205921+mahsem@users.noreply.github.com> Date: Sat, 28 Dec 2024 09:25:30 +0100 Subject: [PATCH 0955/1614] fix: postal_code_move_and_fixes (cherry picked from commit 185bbb4c206e071541d2e616fd70541c03ad79c0) --- .../crm/report/lead_details/lead_details.py | 12 +++++---- .../address_and_contacts.py | 2 +- .../web_form/addresses/addresses.json | 25 ++++++++++--------- 3 files changed, 21 insertions(+), 18 deletions(-) diff --git a/erpnext/crm/report/lead_details/lead_details.py b/erpnext/crm/report/lead_details/lead_details.py index 98dfbec18be..608be6ec912 100644 --- a/erpnext/crm/report/lead_details/lead_details.py +++ b/erpnext/crm/report/lead_details/lead_details.py @@ -55,12 +55,13 @@ def get_columns(): "options": "Company", "width": 120, }, - {"fieldname": "address", "label": _("Address"), "fieldtype": "Data", "width": 130}, - {"fieldname": "state", "label": _("State"), "fieldtype": "Data", "width": 100}, - {"fieldname": "pincode", "label": _("Postal Code"), "fieldtype": "Data", "width": 90}, + {"label": _("Address"), "fieldname": "address", "fieldtype": "Data", "width": 130}, + {"label": _("Postal Code"), "fieldname": "pincode", "fieldtype": "Data", "width": 90}, + {"label": _("City"), "fieldname": "city", "fieldtype": "Data", "width": 100}, + {"label": _("State"), "fieldname": "state", "fieldtype": "Data", "width": 100}, { - "fieldname": "country", "label": _("Country"), + "fieldname": "country", "fieldtype": "Link", "options": "Country", "width": 100, @@ -93,8 +94,9 @@ def get_data(filters): lead.owner, lead.company, (Concat_ws(", ", address.address_line1, address.address_line2)).as_("address"), - address.state, address.pincode, + address.city, + address.state, address.country, ) .where(lead.company == filters.company) diff --git a/erpnext/selling/report/address_and_contacts/address_and_contacts.py b/erpnext/selling/report/address_and_contacts/address_and_contacts.py index b8ab89a4fed..5d0e706930f 100644 --- a/erpnext/selling/report/address_and_contacts/address_and_contacts.py +++ b/erpnext/selling/report/address_and_contacts/address_and_contacts.py @@ -31,9 +31,9 @@ def get_columns(filters): f"{frappe.unscrub(str(party_type_value))}::150", "Address Line 1", "Address Line 2", + "Postal Code", "City", "State", - "Postal Code", "Country", "Is Primary Address:Check", "First Name", diff --git a/erpnext/utilities/web_form/addresses/addresses.json b/erpnext/utilities/web_form/addresses/addresses.json index 4e2d8e36c2c..38b73926985 100644 --- a/erpnext/utilities/web_form/addresses/addresses.json +++ b/erpnext/utilities/web_form/addresses/addresses.json @@ -84,6 +84,18 @@ "reqd": 0, "show_in_filter": 0 }, + { + "allow_read_on_all_link_options": 0, + "fieldname": "pincode", + "fieldtype": "Data", + "hidden": 0, + "label": "Postal Code", + "max_length": 0, + "max_value": 0, + "read_only": 0, + "reqd": 0, + "show_in_filter": 0 + }, { "allow_read_on_all_link_options": 0, "fieldname": "city", @@ -108,18 +120,7 @@ "reqd": 0, "show_in_filter": 0 }, - { - "allow_read_on_all_link_options": 0, - "fieldname": "pincode", - "fieldtype": "Data", - "hidden": 0, - "label": "Postal Code", - "max_length": 0, - "max_value": 0, - "read_only": 0, - "reqd": 0, - "show_in_filter": 0 - }, + { "allow_read_on_all_link_options": 1, "fieldname": "country", From 671f728c4a6570f226c72a62b3d8e6f1a0bc8721 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 19 Dec 2024 13:40:03 +0530 Subject: [PATCH 0956/1614] refactor: configurable posting date for Exc Gain / Loss journal (cherry picked from commit 3fbd2ca0d9d9cef759669050964e2faa63af2429) --- .../doctype/accounts_settings/accounts_settings.json | 11 ++++++++++- .../doctype/accounts_settings/accounts_settings.py | 1 + .../payment_reconciliation/payment_reconciliation.py | 5 +++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/accounts_settings/accounts_settings.json b/erpnext/accounts/doctype/accounts_settings/accounts_settings.json index 6250250a170..097ae89caaf 100644 --- a/erpnext/accounts/doctype/accounts_settings/accounts_settings.json +++ b/erpnext/accounts/doctype/accounts_settings/accounts_settings.json @@ -47,6 +47,7 @@ "auto_reconciliation_job_trigger", "reconciliation_queue_size", "column_break_resa", + "exchange_gain_loss_posting_date", "invoicing_settings_tab", "accounts_transactions_settings_section", "over_billing_allowance", @@ -523,6 +524,14 @@ "fieldname": "ignore_is_opening_check_for_reporting", "fieldtype": "Check", "label": "Ignore Is Opening check for reporting" + }, + { + "default": "Payment", + "description": "Only applies for Normal Payments", + "fieldname": "exchange_gain_loss_posting_date", + "fieldtype": "Select", + "label": "Posting Date Inheritance for Exchange Gain / Loss", + "options": "Invoice\nPayment" } ], "icon": "icon-cog", @@ -530,7 +539,7 @@ "index_web_pages_for_search": 1, "issingle": 1, "links": [], - "modified": "2025-01-18 21:24:19.840745", + "modified": "2025-01-22 17:53:47.968079", "modified_by": "Administrator", "module": "Accounts", "name": "Accounts Settings", diff --git a/erpnext/accounts/doctype/accounts_settings/accounts_settings.py b/erpnext/accounts/doctype/accounts_settings/accounts_settings.py index 590422c6224..f3aca158486 100644 --- a/erpnext/accounts/doctype/accounts_settings/accounts_settings.py +++ b/erpnext/accounts/doctype/accounts_settings/accounts_settings.py @@ -45,6 +45,7 @@ class AccountsSettings(Document): enable_fuzzy_matching: DF.Check enable_immutable_ledger: DF.Check enable_party_matching: DF.Check + exchange_gain_loss_posting_date: DF.Literal["Invoice", "Payment"] frozen_accounts_modifier: DF.Link | None general_ledger_remarks_length: DF.Int ignore_account_closing_balance: DF.Check diff --git a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py index db4a4b0f268..5577f4fffda 100644 --- a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py +++ b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py @@ -424,6 +424,9 @@ class PaymentReconciliation(Document): def allocate_entries(self, args): self.validate_entries() + exc_gain_loss_posting_date = frappe.db.get_single_value( + "Accounts Settings", "exchange_gain_loss_posting_date", cache=True + ) invoice_exchange_map = self.get_invoice_exchange_map(args.get("invoices"), args.get("payments")) default_exchange_gain_loss_account = frappe.get_cached_value( "Company", self.company, "exchange_gain_loss_account" @@ -450,6 +453,8 @@ class PaymentReconciliation(Document): res.difference_account = default_exchange_gain_loss_account res.exchange_rate = inv.get("exchange_rate") res.update({"gain_loss_posting_date": pay.get("posting_date")}) + if exc_gain_loss_posting_date == "Invoice": + res.update({"gain_loss_posting_date": inv.get("invoice_date")}) if pay.get("amount") == 0: entries.append(res) From 763cc18aad71dc2fc1bf88dbc077d6f69efb8a00 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 19 Dec 2024 13:40:03 +0530 Subject: [PATCH 0957/1614] refactor: configurable posting date for Exc Gain / Loss journal (cherry picked from commit 5257413a932f4a9eb1331d5fca6110390531fadf) --- .../accounts/doctype/accounts_settings/accounts_settings.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/accounts_settings/accounts_settings.json b/erpnext/accounts/doctype/accounts_settings/accounts_settings.json index 097ae89caaf..a3e2fe82c8e 100644 --- a/erpnext/accounts/doctype/accounts_settings/accounts_settings.json +++ b/erpnext/accounts/doctype/accounts_settings/accounts_settings.json @@ -390,7 +390,7 @@ { "fieldname": "section_break_jpd0", "fieldtype": "Section Break", - "label": "Payment Reconciliations" + "label": "Payment Reconciliation Settings" }, { "default": "0", @@ -568,4 +568,4 @@ "sort_order": "ASC", "states": [], "track_changes": 1 -} \ No newline at end of file +} From f411bcc8b56bef2d0e195dc412c56cd486ba2186 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 23 Jan 2025 13:48:09 +0530 Subject: [PATCH 0958/1614] refactor: allow reconciliation date for exchange gain / loss (cherry picked from commit 95af63e305c51a19bfea43c7f9580c68fb93433e) --- .../doctype/accounts_settings/accounts_settings.json | 6 +++--- .../accounts/doctype/accounts_settings/accounts_settings.py | 2 +- .../payment_reconciliation/payment_reconciliation.py | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/doctype/accounts_settings/accounts_settings.json b/erpnext/accounts/doctype/accounts_settings/accounts_settings.json index a3e2fe82c8e..3f343f610e0 100644 --- a/erpnext/accounts/doctype/accounts_settings/accounts_settings.json +++ b/erpnext/accounts/doctype/accounts_settings/accounts_settings.json @@ -531,7 +531,7 @@ "fieldname": "exchange_gain_loss_posting_date", "fieldtype": "Select", "label": "Posting Date Inheritance for Exchange Gain / Loss", - "options": "Invoice\nPayment" + "options": "Invoice\nPayment\nReconciliation Date" } ], "icon": "icon-cog", @@ -539,7 +539,7 @@ "index_web_pages_for_search": 1, "issingle": 1, "links": [], - "modified": "2025-01-22 17:53:47.968079", + "modified": "2025-01-23 13:15:44.077853", "modified_by": "Administrator", "module": "Accounts", "name": "Accounts Settings", @@ -568,4 +568,4 @@ "sort_order": "ASC", "states": [], "track_changes": 1 -} +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/accounts_settings/accounts_settings.py b/erpnext/accounts/doctype/accounts_settings/accounts_settings.py index f3aca158486..31249e22455 100644 --- a/erpnext/accounts/doctype/accounts_settings/accounts_settings.py +++ b/erpnext/accounts/doctype/accounts_settings/accounts_settings.py @@ -45,7 +45,7 @@ class AccountsSettings(Document): enable_fuzzy_matching: DF.Check enable_immutable_ledger: DF.Check enable_party_matching: DF.Check - exchange_gain_loss_posting_date: DF.Literal["Invoice", "Payment"] + exchange_gain_loss_posting_date: DF.Literal["Invoice", "Payment", "Reconciliation Date"] frozen_accounts_modifier: DF.Link | None general_ledger_remarks_length: DF.Int ignore_account_closing_balance: DF.Check diff --git a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py index 5577f4fffda..d3d89a1c1cc 100644 --- a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py +++ b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py @@ -455,6 +455,8 @@ class PaymentReconciliation(Document): res.update({"gain_loss_posting_date": pay.get("posting_date")}) if exc_gain_loss_posting_date == "Invoice": res.update({"gain_loss_posting_date": inv.get("invoice_date")}) + elif exc_gain_loss_posting_date == "Reconciliation Date": + res.update({"gain_loss_posting_date": nowdate()}) if pay.get("amount") == 0: entries.append(res) From c070a140f27ce3852b797995ab1dab7981aa6117 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 23 Jan 2025 14:10:15 +0530 Subject: [PATCH 0959/1614] refactor: only apply configuration on normal payments patch to update default value (cherry picked from commit b2c3da135ea85fe245ec9c6066a8e68b42b64f7f) --- .../payment_reconciliation/payment_reconciliation.py | 10 ++++++---- erpnext/controllers/accounts_controller.py | 2 ++ erpnext/patches.txt | 1 + 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py index d3d89a1c1cc..72aa4905900 100644 --- a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py +++ b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py @@ -335,6 +335,7 @@ class PaymentReconciliation(Document): for payment in non_reconciled_payments: row = self.append("payments", {}) row.update(payment) + row.is_advance = payment.book_advance_payments_in_separate_party_account def get_invoice_entries(self): # Fetch JVs, Sales and Purchase Invoices for 'invoices' to reconcile against @@ -453,10 +454,11 @@ class PaymentReconciliation(Document): res.difference_account = default_exchange_gain_loss_account res.exchange_rate = inv.get("exchange_rate") res.update({"gain_loss_posting_date": pay.get("posting_date")}) - if exc_gain_loss_posting_date == "Invoice": - res.update({"gain_loss_posting_date": inv.get("invoice_date")}) - elif exc_gain_loss_posting_date == "Reconciliation Date": - res.update({"gain_loss_posting_date": nowdate()}) + if not pay.get("is_advance"): + if exc_gain_loss_posting_date == "Invoice": + res.update({"gain_loss_posting_date": inv.get("invoice_date")}) + elif exc_gain_loss_posting_date == "Reconciliation Date": + res.update({"gain_loss_posting_date": nowdate()}) if pay.get("amount") == 0: entries.append(res) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index db51a012db6..b712fb0abaf 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -2974,6 +2974,7 @@ def get_advance_payment_entries( (payment_ref.allocated_amount).as_("amount"), (payment_ref.name).as_("reference_row"), (payment_ref.reference_name).as_("against_order"), + (payment_entry.book_advance_payments_in_separate_party_account), ) q = q.where(payment_ref.reference_doctype == order_doctype) @@ -3018,6 +3019,7 @@ def get_common_query( (payment_entry.name).as_("reference_name"), payment_entry.posting_date, (payment_entry.remarks).as_("remarks"), + (payment_entry.book_advance_payments_in_separate_party_account), ) .where(payment_entry.payment_type == payment_type) .where(payment_entry.party_type == party_type) diff --git a/erpnext/patches.txt b/erpnext/patches.txt index f0cc713ba0b..f40801e2776 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -390,3 +390,4 @@ erpnext.patches.v15_0.update_asset_status_to_work_in_progress erpnext.patches.v15_0.rename_manufacturing_settings_field erpnext.patches.v15_0.migrate_checkbox_to_select_for_reconciliation_effect erpnext.patches.v15_0.sync_auto_reconcile_config +execute:frappe.db.set_single_value("Accounts Settings", "exchange_gain_loss_posting_date", "Payment") From 693687d8a3ed9268774a16d7ffd8a52fa26dc9dd Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 23 Jan 2025 14:44:40 +0530 Subject: [PATCH 0960/1614] test: exc gain/loss posting date based on configuration (cherry picked from commit 2f3281579a5b4393ff336e7e2ff274d0b60c5d66) --- .../tests/test_accounts_controller.py | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/erpnext/controllers/tests/test_accounts_controller.py b/erpnext/controllers/tests/test_accounts_controller.py index e557a6b2d79..0c1049f0f0e 100644 --- a/erpnext/controllers/tests/test_accounts_controller.py +++ b/erpnext/controllers/tests/test_accounts_controller.py @@ -9,6 +9,7 @@ from frappe import qb from frappe.query_builder.functions import Sum from frappe.tests.utils import FrappeTestCase, change_settings from frappe.utils import add_days, getdate, nowdate +from frappe.utils.data import getdate as convert_to_date from erpnext.accounts.doctype.payment_entry.payment_entry import get_payment_entry from erpnext.accounts.doctype.payment_entry.test_payment_entry import create_payment_entry @@ -868,6 +869,69 @@ class TestAccountsController(FrappeTestCase): self.assertEqual(pi.items[0].rate, arms_length_price) self.assertEqual(pi.items[0].valuation_rate, 100) + @IntegrationTestCase.change_settings( + "Accounts Settings", {"exchange_gain_loss_posting_date": "Reconciliation Date"} + ) + def test_17_gain_loss_posting_date_for_normal_payment(self): + # Sales Invoice in Foreign Currency + rate = 80 + rate_in_account_currency = 1 + + adv_date = convert_to_date(add_days(nowdate(), -2)) + inv_date = convert_to_date(add_days(nowdate(), -1)) + + si = self.create_sales_invoice(posting_date=inv_date, qty=1, rate=rate_in_account_currency) + + # Test payments with different exchange rates + pe = self.create_payment_entry(posting_date=adv_date, amount=1, source_exc_rate=75.1).save().submit() + + pr = self.create_payment_reconciliation() + pr.from_invoice_date = add_days(nowdate(), -1) + pr.to_invoice_date = nowdate() + pr.from_payment_date = add_days(nowdate(), -2) + pr.to_payment_date = nowdate() + + pr.get_unreconciled_entries() + self.assertEqual(len(pr.invoices), 1) + self.assertEqual(len(pr.payments), 1) + invoices = [x.as_dict() for x in pr.invoices] + payments = [x.as_dict() for x in pr.payments] + pr.allocate_entries(frappe._dict({"invoices": invoices, "payments": payments})) + pr.reconcile() + self.assertEqual(len(pr.invoices), 0) + self.assertEqual(len(pr.payments), 0) + + # Outstanding in both currencies should be '0' + si.reload() + self.assertEqual(si.outstanding_amount, 0) + self.assert_ledger_outstanding(si.doctype, si.name, 0.0, 0.0) + + # Exchange Gain/Loss Journal should've been created. + exc_je_for_si = self.get_journals_for(si.doctype, si.name) + exc_je_for_pe = self.get_journals_for(pe.doctype, pe.name) + self.assertNotEqual(exc_je_for_si, []) + self.assertEqual(len(exc_je_for_si), 1) + self.assertEqual(len(exc_je_for_pe), 1) + self.assertEqual(exc_je_for_si[0], exc_je_for_pe[0]) + + self.assertEqual( + getdate(nowdate()), frappe.db.get_value("Journal Entry", exc_je_for_pe[0].parent, "posting_date") + ) + # Cancel Payment + pe.reload() + pe.cancel() + + # outstanding should be same as grand total + si.reload() + self.assertEqual(si.outstanding_amount, rate_in_account_currency) + self.assert_ledger_outstanding(si.doctype, si.name, rate, rate_in_account_currency) + + # Exchange Gain/Loss Journal should've been cancelled + exc_je_for_si = self.get_journals_for(si.doctype, si.name) + exc_je_for_pe = self.get_journals_for(pe.doctype, pe.name) + self.assertEqual(exc_je_for_si, []) + self.assertEqual(exc_je_for_pe, []) + def test_20_journal_against_sales_invoice(self): # Invoice in Foreign Currency si = self.create_sales_invoice(qty=1, conversion_rate=80, rate=1) From 3c3f092382b9b456fcac4ea833d2a5306877b7a4 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 23 Jan 2025 16:09:54 +0530 Subject: [PATCH 0961/1614] refactor: support JE posting date in semi-auto reconciilation tool (cherry picked from commit a71718883e933c7eadc15842cae2dd59c6b1d005) # Conflicts: # erpnext/accounts/doctype/process_payment_reconciliation_log_allocations/process_payment_reconciliation_log_allocations.json --- ...process_payment_reconciliation_log_allocations.json | 10 ++++++++++ .../process_payment_reconciliation_log_allocations.py | 1 + 2 files changed, 11 insertions(+) diff --git a/erpnext/accounts/doctype/process_payment_reconciliation_log_allocations/process_payment_reconciliation_log_allocations.json b/erpnext/accounts/doctype/process_payment_reconciliation_log_allocations/process_payment_reconciliation_log_allocations.json index b97d73886a9..5c771c54f52 100644 --- a/erpnext/accounts/doctype/process_payment_reconciliation_log_allocations/process_payment_reconciliation_log_allocations.json +++ b/erpnext/accounts/doctype/process_payment_reconciliation_log_allocations/process_payment_reconciliation_log_allocations.json @@ -20,6 +20,7 @@ "is_advance", "section_break_5", "difference_amount", + "gain_loss_posting_date", "column_break_7", "difference_account", "exchange_rate", @@ -153,11 +154,20 @@ "fieldtype": "Check", "in_list_view": 1, "label": "Reconciled" + }, + { + "fieldname": "gain_loss_posting_date", + "fieldtype": "Date", + "label": "Difference Posting Date" } ], "istable": 1, "links": [], +<<<<<<< HEAD "modified": "2023-03-20 21:05:43.121945", +======= + "modified": "2025-01-23 16:09:01.058574", +>>>>>>> a71718883e (refactor: support JE posting date in semi-auto reconciilation tool) "modified_by": "Administrator", "module": "Accounts", "name": "Process Payment Reconciliation Log Allocations", diff --git a/erpnext/accounts/doctype/process_payment_reconciliation_log_allocations/process_payment_reconciliation_log_allocations.py b/erpnext/accounts/doctype/process_payment_reconciliation_log_allocations/process_payment_reconciliation_log_allocations.py index da02e1a41e6..ca1785afdae 100644 --- a/erpnext/accounts/doctype/process_payment_reconciliation_log_allocations/process_payment_reconciliation_log_allocations.py +++ b/erpnext/accounts/doctype/process_payment_reconciliation_log_allocations/process_payment_reconciliation_log_allocations.py @@ -20,6 +20,7 @@ class ProcessPaymentReconciliationLogAllocations(Document): difference_account: DF.Link | None difference_amount: DF.Currency exchange_rate: DF.Float + gain_loss_posting_date: DF.Date | None invoice_number: DF.DynamicLink invoice_type: DF.Link is_advance: DF.Data | None From 495273365be3bd3085a3384ce5e00f913711e8f4 Mon Sep 17 00:00:00 2001 From: samsul580 Date: Wed, 8 Jan 2025 14:35:32 +0600 Subject: [PATCH 0962/1614] feat(translations): add Bengali translations for signature and client details --- erpnext/translations/bn.csv | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/erpnext/translations/bn.csv b/erpnext/translations/bn.csv index 7bfbd07be36..f77199d085c 100644 --- a/erpnext/translations/bn.csv +++ b/erpnext/translations/bn.csv @@ -8743,3 +8743,12 @@ WhatsApp,হোয়াটসঅ্যাপ, Make a call,ফোন করুন, Approve,অনুমোদন করা, Reject,প্রত্যাখ্যান, +Signature,স্বাক্ষর, +Signature is mandatory,স্বাক্ষর আবশ্যক, +Signature is not mandatory,স্বাক্ষর আবশ্যক নয়, +Authorised Signature,অনুমোদিত স্বাক্ষর, +Billing Month,বিলিং মাস, +Name of Client,ক্লায়েন্টের নাম, +Client Name,ক্লায়েন্টের নাম, +Client,ক্লায়েন্ট, +BD,বিডি, From 10ee6f3e224626b26864e7bfadcb457ac84957bb Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 23 Jan 2025 16:36:55 +0530 Subject: [PATCH 0963/1614] chore: resolve conflict --- .../process_payment_reconciliation_log_allocations.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/erpnext/accounts/doctype/process_payment_reconciliation_log_allocations/process_payment_reconciliation_log_allocations.json b/erpnext/accounts/doctype/process_payment_reconciliation_log_allocations/process_payment_reconciliation_log_allocations.json index 5c771c54f52..d7ea1c2ca68 100644 --- a/erpnext/accounts/doctype/process_payment_reconciliation_log_allocations/process_payment_reconciliation_log_allocations.json +++ b/erpnext/accounts/doctype/process_payment_reconciliation_log_allocations/process_payment_reconciliation_log_allocations.json @@ -163,11 +163,7 @@ ], "istable": 1, "links": [], -<<<<<<< HEAD - "modified": "2023-03-20 21:05:43.121945", -======= "modified": "2025-01-23 16:09:01.058574", ->>>>>>> a71718883e (refactor: support JE posting date in semi-auto reconciilation tool) "modified_by": "Administrator", "module": "Accounts", "name": "Process Payment Reconciliation Log Allocations", From 3906e5c33ff53b1c85b34442d13034080ead9c93 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 23 Jan 2025 16:41:36 +0530 Subject: [PATCH 0964/1614] chore: use correct decorator --- erpnext/controllers/tests/test_accounts_controller.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/erpnext/controllers/tests/test_accounts_controller.py b/erpnext/controllers/tests/test_accounts_controller.py index 0c1049f0f0e..c45923b2fed 100644 --- a/erpnext/controllers/tests/test_accounts_controller.py +++ b/erpnext/controllers/tests/test_accounts_controller.py @@ -869,9 +869,7 @@ class TestAccountsController(FrappeTestCase): self.assertEqual(pi.items[0].rate, arms_length_price) self.assertEqual(pi.items[0].valuation_rate, 100) - @IntegrationTestCase.change_settings( - "Accounts Settings", {"exchange_gain_loss_posting_date": "Reconciliation Date"} - ) + @change_settings("Accounts Settings", {"exchange_gain_loss_posting_date": "Reconciliation Date"}) def test_17_gain_loss_posting_date_for_normal_payment(self): # Sales Invoice in Foreign Currency rate = 80 From 86f4bf6e0166f3049a21d5b23765aab82e562cbb Mon Sep 17 00:00:00 2001 From: marination Date: Fri, 29 Sep 2023 15:19:09 +0530 Subject: [PATCH 0965/1614] fix: Set right party name in bank transaction - If party name and docname are different, set the docname in Bank Transaction --- .../doctype/bank_transaction/auto_match_party.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/bank_transaction/auto_match_party.py b/erpnext/accounts/doctype/bank_transaction/auto_match_party.py index a1271b9c32a..997aded5465 100644 --- a/erpnext/accounts/doctype/bank_transaction/auto_match_party.py +++ b/erpnext/accounts/doctype/bank_transaction/auto_match_party.py @@ -1,4 +1,5 @@ import frappe +from frappe.core.utils import find from frappe.utils import flt from rapidfuzz import fuzz, process @@ -113,7 +114,8 @@ class AutoMatchbyPartyNameDescription: for party in parties: filters = {"status": "Active"} if party == "Employee" else {"disabled": 0} - names = frappe.get_all(party, filters=filters, pluck=party.lower() + "_name") + field = party.lower() + "_name" + names = frappe.get_all(party, filters=filters, fields=[f"{field} as party_name", "name"]) for field in ["bank_party_name", "description"]: if not self.get(field): @@ -132,12 +134,18 @@ class AutoMatchbyPartyNameDescription: def fuzzy_search_and_return_result(self, party, names, field) -> tuple | None: skip = False - result = process.extract(query=self.get(field), choices=names, scorer=fuzz.token_set_ratio) + result = process.extract( + query=self.get(field), + choices=[name.get("party_name") for name in names], + scorer=fuzz.token_set_ratio, + ) party_name, skip = self.process_fuzzy_result(result) if not party_name: return None, skip + # Get Party Docname from the list of dicts + party_name = find(names, lambda x: x["party_name"] == party_name).get("name") return ( party, party_name, From 153e961df75a9766512c1b9fc70c502be0df6986 Mon Sep 17 00:00:00 2001 From: marination Date: Tue, 31 Oct 2023 16:53:08 +0100 Subject: [PATCH 0966/1614] fix: Use `process.extract` to get the corresponding party doc name of the result - rapidfuzz accepts an iterable or a dict. dict input gives the dict key and value in the result --- .../doctype/bank_transaction/auto_match_party.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/erpnext/accounts/doctype/bank_transaction/auto_match_party.py b/erpnext/accounts/doctype/bank_transaction/auto_match_party.py index 997aded5465..8aa870f6dce 100644 --- a/erpnext/accounts/doctype/bank_transaction/auto_match_party.py +++ b/erpnext/accounts/doctype/bank_transaction/auto_match_party.py @@ -1,5 +1,4 @@ import frappe -from frappe.core.utils import find from frappe.utils import flt from rapidfuzz import fuzz, process @@ -136,7 +135,7 @@ class AutoMatchbyPartyNameDescription: skip = False result = process.extract( query=self.get(field), - choices=[name.get("party_name") for name in names], + choices={row.get("name"): row.get("party_name") for row in names}, scorer=fuzz.token_set_ratio, ) party_name, skip = self.process_fuzzy_result(result) @@ -144,8 +143,6 @@ class AutoMatchbyPartyNameDescription: if not party_name: return None, skip - # Get Party Docname from the list of dicts - party_name = find(names, lambda x: x["party_name"] == party_name).get("name") return ( party, party_name, @@ -158,14 +155,14 @@ class AutoMatchbyPartyNameDescription: Returns: Result, Skip (whether or not to discontinue matching) """ - PARTY, SCORE, CUTOFF = 0, 1, 80 + SCORE, PARTY_ID, CUTOFF = 1, 2, 80 if not result or not len(result): return None, False first_result = result[0] if len(result) == 1: - return (first_result[PARTY] if first_result[SCORE] > CUTOFF else None), True + return (first_result[PARTY_ID] if first_result[SCORE] > CUTOFF else None), True second_result = result[1] if first_result[SCORE] > CUTOFF: @@ -174,7 +171,7 @@ class AutoMatchbyPartyNameDescription: if first_result[SCORE] == second_result[SCORE]: return None, True - return first_result[PARTY], True + return first_result[PARTY_ID], True else: return None, False From 60feb7cbd42090235bb3f1ad61aa86eeddcc97eb Mon Sep 17 00:00:00 2001 From: marination Date: Tue, 7 Jan 2025 13:21:30 +0530 Subject: [PATCH 0967/1614] fix: Wrong `bank_ac_no` filter + simplify convoluted logic --- .../bank_transaction/auto_match_party.py | 85 ++++++++----------- 1 file changed, 37 insertions(+), 48 deletions(-) diff --git a/erpnext/accounts/doctype/bank_transaction/auto_match_party.py b/erpnext/accounts/doctype/bank_transaction/auto_match_party.py index 8aa870f6dce..66aab9d62dd 100644 --- a/erpnext/accounts/doctype/bank_transaction/auto_match_party.py +++ b/erpnext/accounts/doctype/bank_transaction/auto_match_party.py @@ -45,45 +45,41 @@ class AutoMatchbyAccountIBAN: if not (self.bank_party_account_number or self.bank_party_iban): return None - result = self.match_account_in_party() - return result + return self.match_account_in_party() def match_account_in_party(self) -> tuple | None: - """Check if there is a IBAN/Account No. match in Customer/Supplier/Employee""" - result = None - parties = get_parties_in_order(self.deposit) - or_filters = self.get_or_filters() + """ + Returns (Party Type, Party) if a matching account is found in Bank Account or Employee: + 1. Get party from a matching (iban/account no) Bank Account + 2. If not found, get party from Employee with matching bank account details (iban/account no) + """ + if not (self.bank_party_account_number or self.bank_party_iban): + # Nothing to match + return None - for party in parties: - party_result = frappe.db.get_all( - "Bank Account", or_filters=or_filters, pluck="party", limit_page_length=1 - ) + # Search for a matching Bank Account that has party set + party_result = frappe.db.get_all( + "Bank Account", + or_filters=self.get_or_filters(), + filters={"party_type": ("is", "set"), "party": ("is", "set")}, + fields=["party", "party_type"], + limit_page_length=1, + ) + if result := party_result[0] if party_result else None: + return (result["party_type"], result["party"]) - if party == "Employee" and not party_result: - # Search in Bank Accounts first for Employee, and then Employee record - if "bank_account_no" in or_filters: - or_filters["bank_ac_no"] = or_filters.pop("bank_account_no") + # If no party is found, search in Employee (since it has bank account details) + if employee_result := frappe.db.get_all( + "Employee", or_filters=self.get_or_filters("Employee"), pluck="name", limit_page_length=1 + ): + return ("Employee", employee_result[0]) - party_result = frappe.db.get_all( - party, or_filters=or_filters, pluck="name", limit_page_length=1 - ) - - if "bank_ac_no" in or_filters: - or_filters["bank_account_no"] = or_filters.pop("bank_ac_no") - - if party_result: - result = ( - party, - party_result[0], - ) - break - - return result - - def get_or_filters(self) -> dict: + def get_or_filters(self, party: str | None = None) -> dict: + """Return OR filters for Bank Account and IBAN""" or_filters = {} if self.bank_party_account_number: - or_filters["bank_account_no"] = self.bank_party_account_number + bank_ac_field = "bank_ac_no" if party == "Employee" else "bank_account_no" + or_filters[bank_ac_field] = self.bank_party_account_number if self.bank_party_iban: or_filters["iban"] = self.bank_party_iban @@ -103,8 +99,7 @@ class AutoMatchbyPartyNameDescription: if not (self.bank_party_name or self.description): return None - result = self.match_party_name_desc_in_party() - return result + return self.match_party_name_desc_in_party() def match_party_name_desc_in_party(self) -> tuple | None: """Fuzzy search party name and/or description against parties in the system""" @@ -113,7 +108,7 @@ class AutoMatchbyPartyNameDescription: for party in parties: filters = {"status": "Active"} if party == "Employee" else {"disabled": 0} - field = party.lower() + "_name" + field = f"{party.lower()}_name" names = frappe.get_all(party, filters=filters, fields=[f"{field} as party_name", "name"]) for field in ["bank_party_name", "description"]: @@ -140,13 +135,7 @@ class AutoMatchbyPartyNameDescription: ) party_name, skip = self.process_fuzzy_result(result) - if not party_name: - return None, skip - - return ( - party, - party_name, - ), skip + return ((party, party_name), skip) if party_name else (None, skip) def process_fuzzy_result(self, result: list | None): """ @@ -164,8 +153,8 @@ class AutoMatchbyPartyNameDescription: if len(result) == 1: return (first_result[PARTY_ID] if first_result[SCORE] > CUTOFF else None), True - second_result = result[1] if first_result[SCORE] > CUTOFF: + second_result = result[1] # If multiple matches with the same score, return None but discontinue matching # Matches were found but were too close to distinguish between if first_result[SCORE] == second_result[SCORE]: @@ -177,8 +166,8 @@ class AutoMatchbyPartyNameDescription: def get_parties_in_order(deposit: float) -> list: - parties = ["Supplier", "Employee", "Customer"] # most -> least likely to receive - if flt(deposit) > 0: - parties = ["Customer", "Supplier", "Employee"] # most -> least likely to pay - - return parties + return ( + ["Customer", "Supplier", "Employee"] # most -> least likely to pay us + if flt(deposit) > 0 + else ["Supplier", "Employee", "Customer"] # most -> least likely to receive from us + ) From 73a21c294c6917ca59232fc5671e32c5f16aaceb Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 23 Jan 2025 18:18:17 +0530 Subject: [PATCH 0968/1614] fix: fix creating documents from sales invoice (backport #45346) (#45408) * fix: fix creating documents from sales invoice (#45346) Co-authored-by: Meike Nedwidek (cherry picked from commit 1758e125e00ea1427d0da5e4365d4d2191477130) # Conflicts: # erpnext/accounts/doctype/sales_invoice/sales_invoice.js * fix: resolved conflict --------- Co-authored-by: meike289 <63092915+meike289@users.noreply.github.com> Co-authored-by: Nabin Hait --- .../doctype/sales_invoice/sales_invoice.js | 51 ++++++++----------- 1 file changed, 22 insertions(+), 29 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js index c07e2a392ae..da2e362cf27 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js @@ -16,6 +16,10 @@ erpnext.accounts.SalesInvoiceController = class SalesInvoiceController extends ( setup(doc) { this.setup_posting_date_time_check(); super.setup(doc); + this.frm.make_methods = { + Dunning: this.make_dunning.bind(this), + "Invoice Discounting": this.make_invoice_discounting.bind(this), + }; } company() { super.company(); @@ -121,12 +125,9 @@ erpnext.accounts.SalesInvoiceController = class SalesInvoiceController extends ( }, __("Create") ); - - cur_frm.add_custom_button( + this.frm.add_custom_button( __("Invoice Discounting"), - function () { - cur_frm.events.create_invoice_discounting(cur_frm); - }, + this.make_invoice_discounting.bind(this), __("Create") ); @@ -135,22 +136,14 @@ erpnext.accounts.SalesInvoiceController = class SalesInvoiceController extends ( .reduce((prev, current) => prev || current, false); if (payment_is_overdue) { - this.frm.add_custom_button( - __("Dunning"), - () => { - this.frm.events.create_dunning(this.frm); - }, - __("Create") - ); + this.frm.add_custom_button(__("Dunning"), this.make_dunning.bind(this), __("Create")); } } if (doc.docstatus === 1) { cur_frm.add_custom_button( __("Maintenance Schedule"), - function () { - cur_frm.cscript.make_maintenance_schedule(); - }, + this.make_maintenance_schedule.bind(this), __("Create") ); } @@ -185,6 +178,20 @@ erpnext.accounts.SalesInvoiceController = class SalesInvoiceController extends ( erpnext.accounts.unreconcile_payment.add_unreconcile_btn(me.frm); } + make_invoice_discounting() { + frappe.model.open_mapped_doc({ + method: "erpnext.accounts.doctype.sales_invoice.sales_invoice.create_invoice_discounting", + frm: this.frm, + }); + } + + make_dunning() { + frappe.model.open_mapped_doc({ + method: "erpnext.accounts.doctype.sales_invoice.sales_invoice.create_dunning", + frm: this.frm, + }); + } + make_maintenance_schedule() { frappe.model.open_mapped_doc({ method: "erpnext.accounts.doctype.sales_invoice.sales_invoice.make_maintenance_schedule", @@ -1045,20 +1052,6 @@ frappe.ui.form.on("Sales Invoice", { frm.set_df_property("return_against", "label", __("Adjustment Against")); } }, - - create_invoice_discounting: function (frm) { - frappe.model.open_mapped_doc({ - method: "erpnext.accounts.doctype.sales_invoice.sales_invoice.create_invoice_discounting", - frm: frm, - }); - }, - - create_dunning: function (frm) { - frappe.model.open_mapped_doc({ - method: "erpnext.accounts.doctype.sales_invoice.sales_invoice.create_dunning", - frm: frm, - }); - }, }); frappe.ui.form.on("Sales Invoice Timesheet", { From 5d7d3d8c19ca79480dfdf42dbe510476d0a7f821 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 23 Jan 2025 18:18:48 +0530 Subject: [PATCH 0969/1614] fix: add condition to check if item is delivered by supplier in make_purchase_order_for_default_supplier() (backport #45370) (#45410) fix: add condition to check if item is delivered by supplier in make_purchase_order_for_default_supplier() (#45370) (cherry picked from commit 69464ab7ff90c127d3322e3ee7c7dfdd84689e4b) Co-authored-by: Shanuka Hewage <89955436+Shanuka-98@users.noreply.github.com> --- erpnext/selling/doctype/sales_order/sales_order.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py index 374c37f99bf..4da1934c10e 100755 --- a/erpnext/selling/doctype/sales_order/sales_order.py +++ b/erpnext/selling/doctype/sales_order/sales_order.py @@ -1357,7 +1357,8 @@ def make_purchase_order_for_default_supplier(source_name, selected_items=None, t "postprocess": update_item, "condition": lambda doc: doc.ordered_qty < doc.stock_qty and doc.supplier == supplier - and doc.item_code in items_to_map, + and doc.item_code in items_to_map + and doc.delivered_by_supplier == 1, }, }, target_doc, From fb75180a7da1795ea81ed4b73fe8b467b79aa439 Mon Sep 17 00:00:00 2001 From: Sanket Shah <113279972+Sanket322@users.noreply.github.com> Date: Fri, 17 Jan 2025 16:42:04 +0530 Subject: [PATCH 0970/1614] fix: don't update party-type on change of cost center in Journal Entry (#45291) fix: don't update party-type on change of cost center Co-authored-by: Sanket322 (cherry picked from commit 19c8708e5e2ce8e717df8d65403ae17a2641ea36) --- erpnext/accounts/doctype/journal_entry/journal_entry.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.js b/erpnext/accounts/doctype/journal_entry/journal_entry.js index faa38763b80..a64aba417a6 100644 --- a/erpnext/accounts/doctype/journal_entry/journal_entry.js +++ b/erpnext/accounts/doctype/journal_entry/journal_entry.js @@ -430,12 +430,6 @@ frappe.ui.form.on("Journal Entry Account", { }); } }, - cost_center: function (frm, dt, dn) { - // Don't reset for Gain/Loss type journals, as it will make Debit and Credit values '0' - if (frm.doc.voucher_type != "Exchange Gain Or Loss") { - erpnext.journal_entry.set_account_details(frm, dt, dn); - } - }, account: function (frm, dt, dn) { erpnext.journal_entry.set_account_details(frm, dt, dn); From c6bc5f5d7d7f5d0f5c0e07219234e0ad717b8b70 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 19 Dec 2024 13:40:03 +0530 Subject: [PATCH 0971/1614] refactor: configurable posting date for Exc Gain / Loss journal (cherry picked from commit 3fbd2ca0d9d9cef759669050964e2faa63af2429) --- .../doctype/accounts_settings/accounts_settings.json | 11 ++++++++++- .../doctype/accounts_settings/accounts_settings.py | 1 + .../payment_reconciliation/payment_reconciliation.py | 5 +++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/accounts_settings/accounts_settings.json b/erpnext/accounts/doctype/accounts_settings/accounts_settings.json index 6250250a170..097ae89caaf 100644 --- a/erpnext/accounts/doctype/accounts_settings/accounts_settings.json +++ b/erpnext/accounts/doctype/accounts_settings/accounts_settings.json @@ -47,6 +47,7 @@ "auto_reconciliation_job_trigger", "reconciliation_queue_size", "column_break_resa", + "exchange_gain_loss_posting_date", "invoicing_settings_tab", "accounts_transactions_settings_section", "over_billing_allowance", @@ -523,6 +524,14 @@ "fieldname": "ignore_is_opening_check_for_reporting", "fieldtype": "Check", "label": "Ignore Is Opening check for reporting" + }, + { + "default": "Payment", + "description": "Only applies for Normal Payments", + "fieldname": "exchange_gain_loss_posting_date", + "fieldtype": "Select", + "label": "Posting Date Inheritance for Exchange Gain / Loss", + "options": "Invoice\nPayment" } ], "icon": "icon-cog", @@ -530,7 +539,7 @@ "index_web_pages_for_search": 1, "issingle": 1, "links": [], - "modified": "2025-01-18 21:24:19.840745", + "modified": "2025-01-22 17:53:47.968079", "modified_by": "Administrator", "module": "Accounts", "name": "Accounts Settings", diff --git a/erpnext/accounts/doctype/accounts_settings/accounts_settings.py b/erpnext/accounts/doctype/accounts_settings/accounts_settings.py index 590422c6224..f3aca158486 100644 --- a/erpnext/accounts/doctype/accounts_settings/accounts_settings.py +++ b/erpnext/accounts/doctype/accounts_settings/accounts_settings.py @@ -45,6 +45,7 @@ class AccountsSettings(Document): enable_fuzzy_matching: DF.Check enable_immutable_ledger: DF.Check enable_party_matching: DF.Check + exchange_gain_loss_posting_date: DF.Literal["Invoice", "Payment"] frozen_accounts_modifier: DF.Link | None general_ledger_remarks_length: DF.Int ignore_account_closing_balance: DF.Check diff --git a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py index db4a4b0f268..5577f4fffda 100644 --- a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py +++ b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py @@ -424,6 +424,9 @@ class PaymentReconciliation(Document): def allocate_entries(self, args): self.validate_entries() + exc_gain_loss_posting_date = frappe.db.get_single_value( + "Accounts Settings", "exchange_gain_loss_posting_date", cache=True + ) invoice_exchange_map = self.get_invoice_exchange_map(args.get("invoices"), args.get("payments")) default_exchange_gain_loss_account = frappe.get_cached_value( "Company", self.company, "exchange_gain_loss_account" @@ -450,6 +453,8 @@ class PaymentReconciliation(Document): res.difference_account = default_exchange_gain_loss_account res.exchange_rate = inv.get("exchange_rate") res.update({"gain_loss_posting_date": pay.get("posting_date")}) + if exc_gain_loss_posting_date == "Invoice": + res.update({"gain_loss_posting_date": inv.get("invoice_date")}) if pay.get("amount") == 0: entries.append(res) From c127cbac571f4f82f6232b1b593a8cd69e115fdf Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 19 Dec 2024 13:40:03 +0530 Subject: [PATCH 0972/1614] refactor: configurable posting date for Exc Gain / Loss journal (cherry picked from commit 5257413a932f4a9eb1331d5fca6110390531fadf) --- .../accounts/doctype/accounts_settings/accounts_settings.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/accounts_settings/accounts_settings.json b/erpnext/accounts/doctype/accounts_settings/accounts_settings.json index 097ae89caaf..a3e2fe82c8e 100644 --- a/erpnext/accounts/doctype/accounts_settings/accounts_settings.json +++ b/erpnext/accounts/doctype/accounts_settings/accounts_settings.json @@ -390,7 +390,7 @@ { "fieldname": "section_break_jpd0", "fieldtype": "Section Break", - "label": "Payment Reconciliations" + "label": "Payment Reconciliation Settings" }, { "default": "0", @@ -568,4 +568,4 @@ "sort_order": "ASC", "states": [], "track_changes": 1 -} \ No newline at end of file +} From d955986342d144de392208a3690f35b3a47204d4 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 23 Jan 2025 13:48:09 +0530 Subject: [PATCH 0973/1614] refactor: allow reconciliation date for exchange gain / loss (cherry picked from commit 95af63e305c51a19bfea43c7f9580c68fb93433e) --- .../doctype/accounts_settings/accounts_settings.json | 6 +++--- .../accounts/doctype/accounts_settings/accounts_settings.py | 2 +- .../payment_reconciliation/payment_reconciliation.py | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/doctype/accounts_settings/accounts_settings.json b/erpnext/accounts/doctype/accounts_settings/accounts_settings.json index a3e2fe82c8e..3f343f610e0 100644 --- a/erpnext/accounts/doctype/accounts_settings/accounts_settings.json +++ b/erpnext/accounts/doctype/accounts_settings/accounts_settings.json @@ -531,7 +531,7 @@ "fieldname": "exchange_gain_loss_posting_date", "fieldtype": "Select", "label": "Posting Date Inheritance for Exchange Gain / Loss", - "options": "Invoice\nPayment" + "options": "Invoice\nPayment\nReconciliation Date" } ], "icon": "icon-cog", @@ -539,7 +539,7 @@ "index_web_pages_for_search": 1, "issingle": 1, "links": [], - "modified": "2025-01-22 17:53:47.968079", + "modified": "2025-01-23 13:15:44.077853", "modified_by": "Administrator", "module": "Accounts", "name": "Accounts Settings", @@ -568,4 +568,4 @@ "sort_order": "ASC", "states": [], "track_changes": 1 -} +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/accounts_settings/accounts_settings.py b/erpnext/accounts/doctype/accounts_settings/accounts_settings.py index f3aca158486..31249e22455 100644 --- a/erpnext/accounts/doctype/accounts_settings/accounts_settings.py +++ b/erpnext/accounts/doctype/accounts_settings/accounts_settings.py @@ -45,7 +45,7 @@ class AccountsSettings(Document): enable_fuzzy_matching: DF.Check enable_immutable_ledger: DF.Check enable_party_matching: DF.Check - exchange_gain_loss_posting_date: DF.Literal["Invoice", "Payment"] + exchange_gain_loss_posting_date: DF.Literal["Invoice", "Payment", "Reconciliation Date"] frozen_accounts_modifier: DF.Link | None general_ledger_remarks_length: DF.Int ignore_account_closing_balance: DF.Check diff --git a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py index 5577f4fffda..d3d89a1c1cc 100644 --- a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py +++ b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py @@ -455,6 +455,8 @@ class PaymentReconciliation(Document): res.update({"gain_loss_posting_date": pay.get("posting_date")}) if exc_gain_loss_posting_date == "Invoice": res.update({"gain_loss_posting_date": inv.get("invoice_date")}) + elif exc_gain_loss_posting_date == "Reconciliation Date": + res.update({"gain_loss_posting_date": nowdate()}) if pay.get("amount") == 0: entries.append(res) From ccaf0d4b858b5fe65863a0da2c84eab3d19bb882 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 23 Jan 2025 14:10:15 +0530 Subject: [PATCH 0974/1614] refactor: only apply configuration on normal payments patch to update default value (cherry picked from commit b2c3da135ea85fe245ec9c6066a8e68b42b64f7f) --- .../payment_reconciliation/payment_reconciliation.py | 10 ++++++---- erpnext/controllers/accounts_controller.py | 2 ++ erpnext/patches.txt | 1 + 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py index d3d89a1c1cc..72aa4905900 100644 --- a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py +++ b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py @@ -335,6 +335,7 @@ class PaymentReconciliation(Document): for payment in non_reconciled_payments: row = self.append("payments", {}) row.update(payment) + row.is_advance = payment.book_advance_payments_in_separate_party_account def get_invoice_entries(self): # Fetch JVs, Sales and Purchase Invoices for 'invoices' to reconcile against @@ -453,10 +454,11 @@ class PaymentReconciliation(Document): res.difference_account = default_exchange_gain_loss_account res.exchange_rate = inv.get("exchange_rate") res.update({"gain_loss_posting_date": pay.get("posting_date")}) - if exc_gain_loss_posting_date == "Invoice": - res.update({"gain_loss_posting_date": inv.get("invoice_date")}) - elif exc_gain_loss_posting_date == "Reconciliation Date": - res.update({"gain_loss_posting_date": nowdate()}) + if not pay.get("is_advance"): + if exc_gain_loss_posting_date == "Invoice": + res.update({"gain_loss_posting_date": inv.get("invoice_date")}) + elif exc_gain_loss_posting_date == "Reconciliation Date": + res.update({"gain_loss_posting_date": nowdate()}) if pay.get("amount") == 0: entries.append(res) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 7074710dfee..b687914600b 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -2969,6 +2969,7 @@ def get_advance_payment_entries( (payment_ref.allocated_amount).as_("amount"), (payment_ref.name).as_("reference_row"), (payment_ref.reference_name).as_("against_order"), + (payment_entry.book_advance_payments_in_separate_party_account), ) q = q.where(payment_ref.reference_doctype == order_doctype) @@ -3013,6 +3014,7 @@ def get_common_query( (payment_entry.name).as_("reference_name"), payment_entry.posting_date, (payment_entry.remarks).as_("remarks"), + (payment_entry.book_advance_payments_in_separate_party_account), ) .where(payment_entry.payment_type == payment_type) .where(payment_entry.party_type == party_type) diff --git a/erpnext/patches.txt b/erpnext/patches.txt index f0cc713ba0b..f40801e2776 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -390,3 +390,4 @@ erpnext.patches.v15_0.update_asset_status_to_work_in_progress erpnext.patches.v15_0.rename_manufacturing_settings_field erpnext.patches.v15_0.migrate_checkbox_to_select_for_reconciliation_effect erpnext.patches.v15_0.sync_auto_reconcile_config +execute:frappe.db.set_single_value("Accounts Settings", "exchange_gain_loss_posting_date", "Payment") From c90d33acc3cb2b92ab2a4eea0f7f48d43db4c461 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 23 Jan 2025 14:44:40 +0530 Subject: [PATCH 0975/1614] test: exc gain/loss posting date based on configuration (cherry picked from commit 2f3281579a5b4393ff336e7e2ff274d0b60c5d66) --- .../tests/test_accounts_controller.py | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/erpnext/controllers/tests/test_accounts_controller.py b/erpnext/controllers/tests/test_accounts_controller.py index e557a6b2d79..0c1049f0f0e 100644 --- a/erpnext/controllers/tests/test_accounts_controller.py +++ b/erpnext/controllers/tests/test_accounts_controller.py @@ -9,6 +9,7 @@ from frappe import qb from frappe.query_builder.functions import Sum from frappe.tests.utils import FrappeTestCase, change_settings from frappe.utils import add_days, getdate, nowdate +from frappe.utils.data import getdate as convert_to_date from erpnext.accounts.doctype.payment_entry.payment_entry import get_payment_entry from erpnext.accounts.doctype.payment_entry.test_payment_entry import create_payment_entry @@ -868,6 +869,69 @@ class TestAccountsController(FrappeTestCase): self.assertEqual(pi.items[0].rate, arms_length_price) self.assertEqual(pi.items[0].valuation_rate, 100) + @IntegrationTestCase.change_settings( + "Accounts Settings", {"exchange_gain_loss_posting_date": "Reconciliation Date"} + ) + def test_17_gain_loss_posting_date_for_normal_payment(self): + # Sales Invoice in Foreign Currency + rate = 80 + rate_in_account_currency = 1 + + adv_date = convert_to_date(add_days(nowdate(), -2)) + inv_date = convert_to_date(add_days(nowdate(), -1)) + + si = self.create_sales_invoice(posting_date=inv_date, qty=1, rate=rate_in_account_currency) + + # Test payments with different exchange rates + pe = self.create_payment_entry(posting_date=adv_date, amount=1, source_exc_rate=75.1).save().submit() + + pr = self.create_payment_reconciliation() + pr.from_invoice_date = add_days(nowdate(), -1) + pr.to_invoice_date = nowdate() + pr.from_payment_date = add_days(nowdate(), -2) + pr.to_payment_date = nowdate() + + pr.get_unreconciled_entries() + self.assertEqual(len(pr.invoices), 1) + self.assertEqual(len(pr.payments), 1) + invoices = [x.as_dict() for x in pr.invoices] + payments = [x.as_dict() for x in pr.payments] + pr.allocate_entries(frappe._dict({"invoices": invoices, "payments": payments})) + pr.reconcile() + self.assertEqual(len(pr.invoices), 0) + self.assertEqual(len(pr.payments), 0) + + # Outstanding in both currencies should be '0' + si.reload() + self.assertEqual(si.outstanding_amount, 0) + self.assert_ledger_outstanding(si.doctype, si.name, 0.0, 0.0) + + # Exchange Gain/Loss Journal should've been created. + exc_je_for_si = self.get_journals_for(si.doctype, si.name) + exc_je_for_pe = self.get_journals_for(pe.doctype, pe.name) + self.assertNotEqual(exc_je_for_si, []) + self.assertEqual(len(exc_je_for_si), 1) + self.assertEqual(len(exc_je_for_pe), 1) + self.assertEqual(exc_je_for_si[0], exc_je_for_pe[0]) + + self.assertEqual( + getdate(nowdate()), frappe.db.get_value("Journal Entry", exc_je_for_pe[0].parent, "posting_date") + ) + # Cancel Payment + pe.reload() + pe.cancel() + + # outstanding should be same as grand total + si.reload() + self.assertEqual(si.outstanding_amount, rate_in_account_currency) + self.assert_ledger_outstanding(si.doctype, si.name, rate, rate_in_account_currency) + + # Exchange Gain/Loss Journal should've been cancelled + exc_je_for_si = self.get_journals_for(si.doctype, si.name) + exc_je_for_pe = self.get_journals_for(pe.doctype, pe.name) + self.assertEqual(exc_je_for_si, []) + self.assertEqual(exc_je_for_pe, []) + def test_20_journal_against_sales_invoice(self): # Invoice in Foreign Currency si = self.create_sales_invoice(qty=1, conversion_rate=80, rate=1) From 1c10e4e92fbf6e2e8a34ed1a65ff57637bb8b7f9 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 23 Jan 2025 16:09:54 +0530 Subject: [PATCH 0976/1614] refactor: support JE posting date in semi-auto reconciilation tool (cherry picked from commit a71718883e933c7eadc15842cae2dd59c6b1d005) # Conflicts: # erpnext/accounts/doctype/process_payment_reconciliation_log_allocations/process_payment_reconciliation_log_allocations.json --- ...process_payment_reconciliation_log_allocations.json | 10 ++++++++++ .../process_payment_reconciliation_log_allocations.py | 1 + 2 files changed, 11 insertions(+) diff --git a/erpnext/accounts/doctype/process_payment_reconciliation_log_allocations/process_payment_reconciliation_log_allocations.json b/erpnext/accounts/doctype/process_payment_reconciliation_log_allocations/process_payment_reconciliation_log_allocations.json index b97d73886a9..5c771c54f52 100644 --- a/erpnext/accounts/doctype/process_payment_reconciliation_log_allocations/process_payment_reconciliation_log_allocations.json +++ b/erpnext/accounts/doctype/process_payment_reconciliation_log_allocations/process_payment_reconciliation_log_allocations.json @@ -20,6 +20,7 @@ "is_advance", "section_break_5", "difference_amount", + "gain_loss_posting_date", "column_break_7", "difference_account", "exchange_rate", @@ -153,11 +154,20 @@ "fieldtype": "Check", "in_list_view": 1, "label": "Reconciled" + }, + { + "fieldname": "gain_loss_posting_date", + "fieldtype": "Date", + "label": "Difference Posting Date" } ], "istable": 1, "links": [], +<<<<<<< HEAD "modified": "2023-03-20 21:05:43.121945", +======= + "modified": "2025-01-23 16:09:01.058574", +>>>>>>> a71718883e (refactor: support JE posting date in semi-auto reconciilation tool) "modified_by": "Administrator", "module": "Accounts", "name": "Process Payment Reconciliation Log Allocations", diff --git a/erpnext/accounts/doctype/process_payment_reconciliation_log_allocations/process_payment_reconciliation_log_allocations.py b/erpnext/accounts/doctype/process_payment_reconciliation_log_allocations/process_payment_reconciliation_log_allocations.py index da02e1a41e6..ca1785afdae 100644 --- a/erpnext/accounts/doctype/process_payment_reconciliation_log_allocations/process_payment_reconciliation_log_allocations.py +++ b/erpnext/accounts/doctype/process_payment_reconciliation_log_allocations/process_payment_reconciliation_log_allocations.py @@ -20,6 +20,7 @@ class ProcessPaymentReconciliationLogAllocations(Document): difference_account: DF.Link | None difference_amount: DF.Currency exchange_rate: DF.Float + gain_loss_posting_date: DF.Date | None invoice_number: DF.DynamicLink invoice_type: DF.Link is_advance: DF.Data | None From 2f60f235a8700390fb2abd7b1a7e84ce1c1c736c Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Fri, 24 Jan 2025 10:24:57 +0530 Subject: [PATCH 0977/1614] fix: decorator and merge conflicts --- .../process_payment_reconciliation_log_allocations.json | 6 +----- erpnext/controllers/tests/test_accounts_controller.py | 4 +--- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/erpnext/accounts/doctype/process_payment_reconciliation_log_allocations/process_payment_reconciliation_log_allocations.json b/erpnext/accounts/doctype/process_payment_reconciliation_log_allocations/process_payment_reconciliation_log_allocations.json index 5c771c54f52..9d20ca3a87d 100644 --- a/erpnext/accounts/doctype/process_payment_reconciliation_log_allocations/process_payment_reconciliation_log_allocations.json +++ b/erpnext/accounts/doctype/process_payment_reconciliation_log_allocations/process_payment_reconciliation_log_allocations.json @@ -163,11 +163,7 @@ ], "istable": 1, "links": [], -<<<<<<< HEAD - "modified": "2023-03-20 21:05:43.121945", -======= "modified": "2025-01-23 16:09:01.058574", ->>>>>>> a71718883e (refactor: support JE posting date in semi-auto reconciilation tool) "modified_by": "Administrator", "module": "Accounts", "name": "Process Payment Reconciliation Log Allocations", @@ -177,4 +173,4 @@ "sort_order": "DESC", "states": [], "track_changes": 1 -} \ No newline at end of file +} diff --git a/erpnext/controllers/tests/test_accounts_controller.py b/erpnext/controllers/tests/test_accounts_controller.py index 0c1049f0f0e..c45923b2fed 100644 --- a/erpnext/controllers/tests/test_accounts_controller.py +++ b/erpnext/controllers/tests/test_accounts_controller.py @@ -869,9 +869,7 @@ class TestAccountsController(FrappeTestCase): self.assertEqual(pi.items[0].rate, arms_length_price) self.assertEqual(pi.items[0].valuation_rate, 100) - @IntegrationTestCase.change_settings( - "Accounts Settings", {"exchange_gain_loss_posting_date": "Reconciliation Date"} - ) + @change_settings("Accounts Settings", {"exchange_gain_loss_posting_date": "Reconciliation Date"}) def test_17_gain_loss_posting_date_for_normal_payment(self): # Sales Invoice in Foreign Currency rate = 80 From de09da31bc56574dba539ffd45aabdd2904be7e6 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Fri, 24 Jan 2025 05:14:20 +0000 Subject: [PATCH 0978/1614] chore(release): Bumped to Version 15.49.3 ## [15.49.3](https://github.com/frappe/erpnext/compare/v15.49.2...v15.49.3) (2025-01-24) ### Bug Fixes * decorator and merge conflicts ([2f60f23](https://github.com/frappe/erpnext/commit/2f60f235a8700390fb2abd7b1a7e84ce1c1c736c)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index d6291128b25..561b8009e72 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.49.2" +__version__ = "15.49.3" def get_default_company(user=None): From 3eb28bb0e094063405d718f1cd91ab719bd22f60 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 24 Jan 2025 12:17:08 +0530 Subject: [PATCH 0979/1614] fix: set expense_account and cost_center based on company in stock entry (backport #45159) (#45416) fix: set expense_account and cost_center based on company in stock entry (#45159) * fix: set expense_account and cost_center based on company in stock entry * fix: remove is_perpetual_inventory_enabled validation for cost_center (cherry picked from commit 6ec18fb40da1b6152e43d5afa31a84bbd6090622) Co-authored-by: Sugesh G <73237300+Sugesh393@users.noreply.github.com> --- .../stock/doctype/stock_entry/stock_entry.js | 70 +++++++++---------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.js b/erpnext/stock/doctype/stock_entry/stock_entry.js index df6a61d335b..8441b6edd64 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.js +++ b/erpnext/stock/doctype/stock_entry/stock_entry.js @@ -507,18 +507,6 @@ frappe.ui.form.on("Stock Entry", { }); }, - company: function (frm) { - if (frm.doc.company) { - var company_doc = frappe.get_doc(":Company", frm.doc.company); - if (company_doc.default_letter_head) { - frm.set_value("letter_head", company_doc.default_letter_head); - } - frm.trigger("toggle_display_account_head"); - - erpnext.accounts.dimensions.update_dimension(frm, frm.doctype); - } - }, - make_retention_stock_entry: function (frm) { frappe.call({ method: "erpnext.stock.doctype.stock_entry.stock_entry.move_sample_to_retention_warehouse", @@ -1060,11 +1048,9 @@ erpnext.stock.StockEntry = class StockEntry extends erpnext.stock.StockControlle onload_post_render() { var me = this; - this.set_default_account(function () { - if (me.frm.doc.__islocal && me.frm.doc.company && !me.frm.doc.amended_from) { - me.frm.trigger("company"); - } - }); + if (me.frm.doc.__islocal && me.frm.doc.company && !me.frm.doc.amended_from) { + me.company(); + } this.frm.get_field("items").grid.set_multiple_add("item_code", "qty"); } @@ -1143,26 +1129,40 @@ erpnext.stock.StockEntry = class StockEntry extends erpnext.stock.StockControlle this.clean_up(); } - set_default_account(callback) { + company() { + if (this.frm.doc.company) { + var company_doc = frappe.get_doc(":Company", this.frm.doc.company); + if (company_doc.default_letter_head) { + this.frm.set_value("letter_head", company_doc.default_letter_head); + } + this.frm.trigger("toggle_display_account_head"); + + erpnext.accounts.dimensions.update_dimension(this.frm, this.frm.doctype); + if (this.frm.doc.company && erpnext.is_perpetual_inventory_enabled(this.frm.doc.company)) + this.set_default_account("stock_adjustment_account", "expense_account"); + this.set_default_account("cost_center", "cost_center"); + + this.frm.refresh_fields("items"); + } + } + + set_default_account(company_fieldname, fieldname) { var me = this; - if (this.frm.doc.company && erpnext.is_perpetual_inventory_enabled(this.frm.doc.company)) { - return this.frm.call({ - method: "erpnext.accounts.utils.get_company_default", - args: { - fieldname: "stock_adjustment_account", - company: this.frm.doc.company, - }, - callback: function (r) { - if (!r.exc) { - $.each(me.frm.doc.items || [], function (i, d) { - if (!d.expense_account) d.expense_account = r.message; - }); - if (callback) callback(); - } - }, - }); - } + return this.frm.call({ + method: "erpnext.accounts.utils.get_company_default", + args: { + fieldname: company_fieldname, + company: this.frm.doc.company, + }, + callback: function (r) { + if (!r.exc) { + $.each(me.frm.doc.items || [], function (i, d) { + d[fieldname] = r.message; + }); + } + }, + }); } clean_up() { From 6c1039316403b0095d96a64c3d53009fb358242a Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 24 Jan 2025 12:19:02 +0530 Subject: [PATCH 0980/1614] fix: use frappe.datetime.str_to_user (backport #45216) (#45417) fix: use frappe.datetime.str_to_user (#45216) * fix: default_datetime_format * fix: add_format_datetime * fix: update to str_to_user in point_of_sale/pos_controller.js Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com> * fix: convert_to_str_to_user * fix: linters * fix: whitespace --------- Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com> (cherry picked from commit cd3f03696e4853d9e40bf45a71101552f350f9ba) Co-authored-by: mahsem <137205921+mahsem@users.noreply.github.com> --- erpnext/selling/page/point_of_sale/pos_controller.js | 2 +- erpnext/selling/page/point_of_sale/pos_item_cart.js | 4 ++-- erpnext/selling/page/point_of_sale/pos_past_order_list.js | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/erpnext/selling/page/point_of_sale/pos_controller.js b/erpnext/selling/page/point_of_sale/pos_controller.js index dc7e992f654..8f02c8d0fb2 100644 --- a/erpnext/selling/page/point_of_sale/pos_controller.js +++ b/erpnext/selling/page/point_of_sale/pos_controller.js @@ -155,7 +155,7 @@ erpnext.PointOfSale.Controller = class { this.page.set_title_sub( ` - Opened at ${moment(this.pos_opening_time).format("Do MMMM, h:mma")} + Opened at ${frappe.datetime.str_to_user(this.pos_opening_time)} ` ); diff --git a/erpnext/selling/page/point_of_sale/pos_item_cart.js b/erpnext/selling/page/point_of_sale/pos_item_cart.js index 28cb1aef339..9de6dbbd429 100644 --- a/erpnext/selling/page/point_of_sale/pos_item_cart.js +++ b/erpnext/selling/page/point_of_sale/pos_item_cart.js @@ -988,8 +988,8 @@ erpnext.PointOfSale.ItemCart = class { .html(`${__("Last transacted")} ${__(elapsed_time)}`); res.forEach((invoice) => { - const posting_datetime = moment(invoice.posting_date + " " + invoice.posting_time).format( - "Do MMMM, h:mma" + const posting_datetime = frappe.datetime.str_to_user( + invoice.posting_date + " " + invoice.posting_time ); let indicator_color = { Paid: "green", diff --git a/erpnext/selling/page/point_of_sale/pos_past_order_list.js b/erpnext/selling/page/point_of_sale/pos_past_order_list.js index c450d8a109a..ab2fd3e1547 100644 --- a/erpnext/selling/page/point_of_sale/pos_past_order_list.js +++ b/erpnext/selling/page/point_of_sale/pos_past_order_list.js @@ -96,8 +96,8 @@ erpnext.PointOfSale.PastOrderList = class { } get_invoice_html(invoice) { - const posting_datetime = moment(invoice.posting_date + " " + invoice.posting_time).format( - "Do MMMM, h:mma" + const posting_datetime = frappe.datetime.str_to_user( + invoice.posting_date + " " + invoice.posting_time ); return `
From aca8d663dd98c9ad5d377afcd9f62c8b0b324144 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 24 Jan 2025 12:40:25 +0530 Subject: [PATCH 0981/1614] feat: full screen on pos (backport #45404) (#45418) feat: full screen on pos (#45404) * feat: full screen on pos * refactor: variables for label * fix: refactor and handled button label change * refactor: rename enable fullscreen label (cherry picked from commit 78c7c1c631c8f0d82acf3c680b3668396c9493df) Co-authored-by: Diptanil Saha --- .../page/point_of_sale/pos_controller.js | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/erpnext/selling/page/point_of_sale/pos_controller.js b/erpnext/selling/page/point_of_sale/pos_controller.js index 8f02c8d0fb2..9da530081e7 100644 --- a/erpnext/selling/page/point_of_sale/pos_controller.js +++ b/erpnext/selling/page/point_of_sale/pos_controller.js @@ -165,6 +165,7 @@ erpnext.PointOfSale.Controller = class { this.prepare_dom(); this.prepare_components(); this.prepare_menu(); + this.prepare_fullscreen_btn(); this.make_new_invoice(); } @@ -200,6 +201,39 @@ erpnext.PointOfSale.Controller = class { this.page.add_menu_item(__("Close the POS"), this.close_pos.bind(this), false, "Shift+Ctrl+C"); } + prepare_fullscreen_btn() { + this.page.page_actions.find(".custom-actions").empty(); + + this.page.add_button(__("Full Screen"), null, { btn_class: "btn-default fullscreen-btn" }); + + this.bind_fullscreen_events(); + } + + bind_fullscreen_events() { + this.$fullscreen_btn = this.page.page_actions.find(".fullscreen-btn"); + + this.$fullscreen_btn.on("click", function () { + if (!document.fullscreenElement) { + document.documentElement.requestFullscreen(); + } else if (document.exitFullscreen) { + document.exitFullscreen(); + } + }); + + $(document).on("fullscreenchange", this.handle_fullscreen_change_event.bind(this)); + } + + handle_fullscreen_change_event() { + let enable_fullscreen_label = __("Full Screen"); + let exit_fullscreen_label = __("Exit Full Screen"); + + if (document.fullscreenElement) { + this.$fullscreen_btn[0].innerText = exit_fullscreen_label; + } else { + this.$fullscreen_btn[0].innerText = enable_fullscreen_label; + } + } + open_form_view() { frappe.model.sync(this.frm.doc); frappe.set_route("Form", this.frm.doc.doctype, this.frm.doc.name); From 224a92587d3bb74a05e5d1e66f3657b46d979f5a Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 24 Jan 2025 13:13:15 +0530 Subject: [PATCH 0982/1614] fix: resolved pos return setting to default mode of payment instead of user selection (backport #45377) (#45419) fix: resolved pos return setting to default mode of payment instead of user selection (#45377) * fix: resolved pos return setting to default mode of payment instead of user selection * refactor: removed console log statement * refactor: moved get_payment_data to sales_and_purchase_return.py (cherry picked from commit 54d234e05de8e28da20189a6cb50d143d12361b1) Co-authored-by: Diptanil Saha --- .../controllers/sales_and_purchase_return.py | 6 +++ .../public/js/controllers/taxes_and_totals.js | 41 ++++++++++++++++++- 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/erpnext/controllers/sales_and_purchase_return.py b/erpnext/controllers/sales_and_purchase_return.py index 4d44f493b1d..18368017429 100644 --- a/erpnext/controllers/sales_and_purchase_return.py +++ b/erpnext/controllers/sales_and_purchase_return.py @@ -1150,3 +1150,9 @@ def get_available_serial_nos(serial_nos, warehouse): return frappe.get_all( "Serial No", filters={"warehouse": warehouse, "name": ("in", serial_nos)}, pluck="name" ) + + +@frappe.whitelist() +def get_payment_data(invoice): + payment = frappe.db.get_all("Sales Invoice Payment", {"parent": invoice}, ["mode_of_payment", "amount"]) + return payment diff --git a/erpnext/public/js/controllers/taxes_and_totals.js b/erpnext/public/js/controllers/taxes_and_totals.js index ee78e493db6..875e6980e1e 100644 --- a/erpnext/public/js/controllers/taxes_and_totals.js +++ b/erpnext/public/js/controllers/taxes_and_totals.js @@ -822,7 +822,7 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments { } } - set_total_amount_to_default_mop() { + async set_total_amount_to_default_mop() { let grand_total = this.frm.doc.rounded_total || this.frm.doc.grand_total; let base_grand_total = this.frm.doc.base_rounded_total || this.frm.doc.base_grand_total; @@ -844,6 +844,45 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments { ); } + /* + During returns, if an user select mode of payment other than + default mode of payment, it should retain the user selection + instead resetting it to default mode of payment. + */ + + let payment_amount = 0; + this.frm.doc.payments.forEach(payment => { + payment_amount += payment.amount + }); + + if (payment_amount == total_amount_to_pay) { + return; + } + + /* + For partial return, if the payment was made using single mode of payment + it should set the return to that mode of payment only. + */ + + let return_against_mop = await frappe.call({ + method: 'erpnext.controllers.sales_and_purchase_return.get_payment_data', + args: { + invoice: this.frm.doc.return_against + } + }); + + if (return_against_mop.message.length === 1) { + this.frm.doc.payments.forEach(payment => { + if (payment.mode_of_payment == return_against_mop.message[0].mode_of_payment) { + payment.amount = total_amount_to_pay; + } else { + payment.amount = 0; + } + }); + this.frm.refresh_fields(); + return; + } + this.frm.doc.payments.find(payment => { if (payment.default) { payment.amount = total_amount_to_pay; From dec0caeac56453a63fbc8e24f76e33e1fec56eb6 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 24 Jan 2025 13:13:57 +0530 Subject: [PATCH 0983/1614] fix: valuation for batch (backport #45335) (#45420) * fix: valuation for batch (cherry picked from commit 5088d8576ff0edabaa04bfd1e3b7339666ef5154) # Conflicts: # erpnext/stock/deprecated_serial_batch.py * fix: version (cherry picked from commit 8028dd2683282e60bfa74dbd445db32d748a8d24) # Conflicts: # .github/workflows/server-tests-mariadb.yml * chore: fix conflicts * chore: fix conflicts * chore: fix conflicts --------- Co-authored-by: Rohit Waghchaure --- erpnext/stock/deprecated_serial_batch.py | 70 ++++++++++++++++++++++-- 1 file changed, 65 insertions(+), 5 deletions(-) diff --git a/erpnext/stock/deprecated_serial_batch.py b/erpnext/stock/deprecated_serial_batch.py index 7611d751fdd..38e820c4c4f 100644 --- a/erpnext/stock/deprecated_serial_batch.py +++ b/erpnext/stock/deprecated_serial_batch.py @@ -245,8 +245,9 @@ class DeprecatedBatchNoValuation: last_sle = self.get_last_sle_for_non_batch() for d in batch_data: - self.non_batchwise_balance_value[d.batch_no] += flt(last_sle.stock_value) - self.non_batchwise_balance_qty[d.batch_no] += flt(last_sle.qty_after_transaction) + if self.available_qty.get(d.batch_no): + self.non_batchwise_balance_value[d.batch_no] += flt(last_sle.stock_value) + self.non_batchwise_balance_qty[d.batch_no] += flt(last_sle.qty_after_transaction) def get_last_sle_for_non_batch(self): from erpnext.stock.utils import get_combine_datetime @@ -292,6 +293,58 @@ class DeprecatedBatchNoValuation: data = query.run(as_dict=True) return data[0] if data else {} + @deprecated + def get_last_sle_for_sabb_no_batchwise_valuation(self): + sabb = frappe.qb.DocType("Serial and Batch Bundle") + sabb_entry = frappe.qb.DocType("Serial and Batch Entry") + batch = frappe.qb.DocType("Batch") + + posting_datetime = CombineDatetime(self.sle.posting_date, self.sle.posting_time) + timestamp_condition = CombineDatetime(sabb.posting_date, sabb.posting_time) < posting_datetime + + if self.sle.creation: + timestamp_condition |= ( + CombineDatetime(sabb.posting_date, sabb.posting_time) == posting_datetime + ) & (sabb.creation < self.sle.creation) + + query = ( + frappe.qb.from_(sabb) + .inner_join(sabb_entry) + .on(sabb.name == sabb_entry.parent) + .inner_join(batch) + .on(sabb_entry.batch_no == batch.name) + .select(sabb.name) + .where( + (sabb.item_code == self.sle.item_code) + & (sabb.warehouse == self.sle.warehouse) + & (sabb_entry.batch_no.isnotnull()) + & (batch.use_batchwise_valuation == 0) + & (sabb.is_cancelled == 0) + & (sabb.docstatus == 1) + ) + .where(timestamp_condition) + .orderby(sabb.posting_date, order=Order.desc) + .orderby(sabb.posting_time, order=Order.desc) + .orderby(sabb.creation, order=Order.desc) + .limit(1) + ) + + if self.sle.voucher_detail_no: + query = query.where(sabb.voucher_detail_no != self.sle.voucher_detail_no) + + data = query.run(as_dict=True) + if not data: + return {} + + sle = frappe.db.get_value( + "Stock Ledger Entry", + {"serial_and_batch_bundle": data[0].name}, + ["stock_value", "qty_after_transaction"], + as_dict=1, + ) + + return sle if sle else {} + @deprecated def set_balance_value_from_bundle(self) -> None: bundle = frappe.qb.DocType("Serial and Batch Bundle") @@ -338,7 +391,14 @@ class DeprecatedBatchNoValuation: query = query.where(bundle.voucher_type != "Pick List") - for d in query.run(as_dict=True): - self.non_batchwise_balance_value[d.batch_no] += flt(d.batch_value) - self.non_batchwise_balance_qty[d.batch_no] += flt(d.batch_qty) + batch_data = query.run(as_dict=True) + for d in batch_data: self.available_qty[d.batch_no] += flt(d.batch_qty) + + last_sle = self.get_last_sle_for_sabb_no_batchwise_valuation() + if not last_sle: + return + + for batch_no in self.available_qty: + self.non_batchwise_balance_value[batch_no] = flt(last_sle.stock_value) + self.non_batchwise_balance_qty[batch_no] = flt(last_sle.qty_after_transaction) From d9b342f2579fbca48070b99c9b1b91fa197a2c28 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 24 Jan 2025 14:18:04 +0530 Subject: [PATCH 0984/1614] fix: remove unnecessary auth from plaid connector (backport #44305) (#45421) fix: remove unnecessary auth from plaid connector (#44305) (cherry picked from commit e82911041d49116a061bb7af9b195b5f01c2f92f) Co-authored-by: Martin Luessi --- .../doctype/plaid_settings/plaid_connector.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_connector.py b/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_connector.py index f44fad333cf..cb9f49e8c28 100644 --- a/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_connector.py +++ b/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_connector.py @@ -69,23 +69,7 @@ class PlaidConnector: else: return response["link_token"] - def auth(self): - try: - self.client.Auth.get(self.access_token) - except ItemError as e: - if e.code == "ITEM_LOGIN_REQUIRED": - pass - except APIError as e: - if e.code == "PLANNED_MAINTENANCE": - pass - except requests.Timeout: - pass - except Exception as e: - frappe.log_error("Plaid: Authentication error") - frappe.throw(_(str(e)), title=_("Authentication Failed")) - def get_transactions(self, start_date, end_date, account_id=None): - self.auth() kwargs = dict(access_token=self.access_token, start_date=start_date, end_date=end_date) if account_id: kwargs.update(dict(account_ids=[account_id])) From 52fdc7cecd96aa9fc74d33240fccb3cb7580b03a Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 24 Jan 2025 14:46:47 +0530 Subject: [PATCH 0985/1614] =?UTF-8?q?fix(material=20request):=20mapping=20?= =?UTF-8?q?Sales=20Order=20Item=20Delivery=20Date=20to=20Mate=E2=80=A6=20(?= =?UTF-8?q?backport=20#45227)=20(#45424)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix(material request): mapping Sales Order Item Delivery Date to Mate… (#45227) * fix(material request): mapping Sales Order Item Delivery Date to Material Request Item Required By as mentioned in https://discuss.frappe.io/t/item-delivery-date-on-sales-order-is-not-transferred-to-material-request-item-required-by-date/140479 fixing When you create a Material Request directly on the Sales Order via → Create → Material Request, Delivery Date on Sales Order Item is not transferred to Material Request Item Required By date. * fix(linters): meaningless linters formatting message applied In order to pass the linters test which I find meaningless as it asks for the comma after the last item in a dictionary data type * fix(linters): formatting code for linters pass Linters formatting applied (cherry picked from commit 42edb9f5b17783c4a1d22297e6c3c59059bdc46e) Co-authored-by: Tufan Kaynak <31142607+toofun666@users.noreply.github.com> --- erpnext/selling/doctype/sales_order/sales_order.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py index 4da1934c10e..6c92386db39 100755 --- a/erpnext/selling/doctype/sales_order/sales_order.py +++ b/erpnext/selling/doctype/sales_order/sales_order.py @@ -872,7 +872,11 @@ def make_material_request(source_name, target_doc=None): }, "Sales Order Item": { "doctype": "Material Request Item", - "field_map": {"name": "sales_order_item", "parent": "sales_order"}, + "field_map": { + "name": "sales_order_item", + "parent": "sales_order", + "delivery_date": "required_by", + }, "condition": lambda item: not frappe.db.exists( "Product Bundle", {"name": item.item_code, "disabled": 0} ) From ae5ce97fd0c18e374cdc970e58c57c3c213faa9a Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 24 Jan 2025 15:23:27 +0530 Subject: [PATCH 0986/1614] fix: disable load_after_mapping when purchase order created from sales order (backport #45405) (#45429) fix: disable load_after_mapping when purchase order created from sales order (#45405) (cherry picked from commit 97acbb313428697dd5d4aa73cb435cf870c92974) Co-authored-by: Venkatesh <47534423+venkat102@users.noreply.github.com> --- erpnext/selling/doctype/sales_order/sales_order.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py index 6c92386db39..effc3f3894d 100755 --- a/erpnext/selling/doctype/sales_order/sales_order.py +++ b/erpnext/selling/doctype/sales_order/sales_order.py @@ -1506,6 +1506,7 @@ def make_purchase_order(source_name, selected_items=None, target_doc=None): ) set_delivery_date(doc.items, source_name) + doc.set_onload("load_after_mapping", False) return doc From 7ff7ec792928ed3a76eda8c62adb2d121e4ff4de Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 24 Jan 2025 16:37:36 +0530 Subject: [PATCH 0987/1614] fix: validate items against selling settings (backport #45288) (#45431) fix: validate items against selling settings (#45288) fix: validate_for_duplicate_items Co-authored-by: Sanket322 (cherry picked from commit d862e9b7717c75b1d337ff421a9a1ce53c71d455) Co-authored-by: Sanket Shah <113279972+Sanket322@users.noreply.github.com> --- erpnext/controllers/accounts_controller.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index b712fb0abaf..8361d4d825c 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -3691,6 +3691,7 @@ def update_child_qty_rate(parent_doctype, trans_items, parent_doctype_name, chil ).format(frappe.bold(parent.name)) ) else: # Sales Order + parent.validate_for_duplicate_items() parent.validate_warehouse() parent.update_reserved_qty() parent.update_project() From fe5e42d2dc9a3570635bb75876ea8172862dae60 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Fri, 24 Jan 2025 13:53:48 +0530 Subject: [PATCH 0988/1614] fix: precision issue in stock entry (cherry picked from commit 9f3b8520fe06879d90838619a268c0bac76d95c5) --- erpnext/stock/doctype/stock_entry/stock_entry.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index c95de8b48a2..a2da35c0ef2 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -3244,12 +3244,13 @@ def create_serial_and_batch_bundle(parent_doc, row, child, type_of_transaction=N } ) + precision = frappe.get_precision("Stock Entry Detail", "qty") if row.serial_nos and row.batches_to_be_consume: doc.has_serial_no = 1 doc.has_batch_no = 1 batchwise_serial_nos = get_batchwise_serial_nos(child.item_code, row) for batch_no, qty in row.batches_to_be_consume.items(): - while qty > 0: + while flt(qty, precision) > 0: qty -= 1 doc.append( "entries", @@ -3270,8 +3271,9 @@ def create_serial_and_batch_bundle(parent_doc, row, child, type_of_transaction=N precision = frappe.get_precision("Serial and Batch Entry", "qty") doc.has_batch_no = 1 for batch_no, qty in row.batches_to_be_consume.items(): - qty = flt(qty, precision) - doc.append("entries", {"batch_no": batch_no, "warehouse": row.warehouse, "qty": qty * -1}) + if flt(qty, precision) > 0: + qty = flt(qty, precision) + doc.append("entries", {"batch_no": batch_no, "warehouse": row.warehouse, "qty": qty * -1}) if not doc.entries: return None From f2b946d3250120b1c00557bca54ca199389def53 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Fri, 24 Jan 2025 17:30:45 +0530 Subject: [PATCH 0989/1614] fix: do not check budget during reposting (#45432) (cherry picked from commit 53704b98b562aad9596f233feaefb1ec89c06aa9) --- erpnext/accounts/general_ledger.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/erpnext/accounts/general_ledger.py b/erpnext/accounts/general_ledger.py index 19da840f543..e5e43aefa32 100644 --- a/erpnext/accounts/general_ledger.py +++ b/erpnext/accounts/general_ledger.py @@ -35,7 +35,7 @@ def make_gl_entries( make_acc_dimensions_offsetting_entry(gl_map) validate_accounting_period(gl_map) validate_disabled_accounts(gl_map) - gl_map = process_gl_map(gl_map, merge_entries) + gl_map = process_gl_map(gl_map, merge_entries, from_repost=from_repost) if gl_map and len(gl_map) > 1: if gl_map[0].voucher_type != "Period Closing Voucher": create_payment_ledger_entry( @@ -163,12 +163,12 @@ def validate_accounting_period(gl_map): ) -def process_gl_map(gl_map, merge_entries=True, precision=None): +def process_gl_map(gl_map, merge_entries=True, precision=None, from_repost=False): if not gl_map: return [] if gl_map[0].voucher_type != "Period Closing Voucher": - gl_map = distribute_gl_based_on_cost_center_allocation(gl_map, precision) + gl_map = distribute_gl_based_on_cost_center_allocation(gl_map, precision, from_repost) if merge_entries: gl_map = merge_similar_entries(gl_map, precision) @@ -178,13 +178,17 @@ def process_gl_map(gl_map, merge_entries=True, precision=None): return gl_map -def distribute_gl_based_on_cost_center_allocation(gl_map, precision=None): +def distribute_gl_based_on_cost_center_allocation(gl_map, precision=None, from_repost=False): new_gl_map = [] for d in gl_map: cost_center = d.get("cost_center") # Validate budget against main cost center - validate_expense_against_budget(d, expense_amount=flt(d.debit, precision) - flt(d.credit, precision)) + if not from_repost: + validate_expense_against_budget( + d, expense_amount=flt(d.debit, precision) - flt(d.credit, precision) + ) + cost_center_allocation = get_cost_center_allocation_data( gl_map[0]["company"], gl_map[0]["posting_date"], cost_center ) From f9d96726f06fe246f84e4ea7647e2e0eec733240 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 24 Jan 2025 17:18:50 +0100 Subject: [PATCH 0990/1614] fix: secure bulk transaction (backport #45386) (#45426) Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com> fix: secure bulk transaction (#45386) --- .../purchase_invoice/purchase_invoice_list.js | 16 ++++++++----- .../sales_invoice/sales_invoice_list.js | 16 ++++++++----- .../purchase_order/purchase_order_list.js | 24 ++++++++++++------- .../supplier_quotation_list.js | 20 +++++++++++----- .../doctype/quotation/quotation_list.js | 16 ++++++++----- .../doctype/sales_order/sales_order_list.js | 24 ++++++++++++------- .../delivery_note/delivery_note_list.js | 22 ++++++++++------- erpnext/utilities/bulk_transaction.py | 3 +++ 8 files changed, 90 insertions(+), 51 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice_list.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice_list.js index 031b2341bb6..6bfb48c13d2 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice_list.js +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice_list.js @@ -45,12 +45,16 @@ frappe.listview_settings["Purchase Invoice"] = { }, onload: function (listview) { - listview.page.add_action_item(__("Purchase Receipt"), () => { - erpnext.bulk_transaction_processing.create(listview, "Purchase Invoice", "Purchase Receipt"); - }); + if (frappe.model.can_create("Purchase Receipt")) { + listview.page.add_action_item(__("Purchase Receipt"), () => { + erpnext.bulk_transaction_processing.create(listview, "Purchase Invoice", "Purchase Receipt"); + }); + } - listview.page.add_action_item(__("Payment"), () => { - erpnext.bulk_transaction_processing.create(listview, "Purchase Invoice", "Payment Entry"); - }); + if (frappe.model.can_create("Payment Entry")) { + listview.page.add_action_item(__("Payment"), () => { + erpnext.bulk_transaction_processing.create(listview, "Purchase Invoice", "Payment Entry"); + }); + } }, }; diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice_list.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice_list.js index 3371a63cca2..ea3ae2b6fab 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice_list.js +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice_list.js @@ -32,12 +32,16 @@ frappe.listview_settings["Sales Invoice"] = { right_column: "grand_total", onload: function (listview) { - listview.page.add_action_item(__("Delivery Note"), () => { - erpnext.bulk_transaction_processing.create(listview, "Sales Invoice", "Delivery Note"); - }); + if (frappe.model.can_create("Delivery Note")) { + listview.page.add_action_item(__("Delivery Note"), () => { + erpnext.bulk_transaction_processing.create(listview, "Sales Invoice", "Delivery Note"); + }); + } - listview.page.add_action_item(__("Payment"), () => { - erpnext.bulk_transaction_processing.create(listview, "Sales Invoice", "Payment Entry"); - }); + if (frappe.model.can_create("Payment Entry")) { + listview.page.add_action_item(__("Payment"), () => { + erpnext.bulk_transaction_processing.create(listview, "Sales Invoice", "Payment Entry"); + }); + } }, }; diff --git a/erpnext/buying/doctype/purchase_order/purchase_order_list.js b/erpnext/buying/doctype/purchase_order/purchase_order_list.js index 7b37987b926..3c357c0a933 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order_list.js +++ b/erpnext/buying/doctype/purchase_order/purchase_order_list.js @@ -44,16 +44,22 @@ frappe.listview_settings["Purchase Order"] = { listview.call_for_selected_items(method, { status: "Submitted" }); }); - listview.page.add_action_item(__("Purchase Invoice"), () => { - erpnext.bulk_transaction_processing.create(listview, "Purchase Order", "Purchase Invoice"); - }); + if (frappe.model.can_create("Purchase Invoice")) { + listview.page.add_action_item(__("Purchase Invoice"), () => { + erpnext.bulk_transaction_processing.create(listview, "Purchase Order", "Purchase Invoice"); + }); + } - listview.page.add_action_item(__("Purchase Receipt"), () => { - erpnext.bulk_transaction_processing.create(listview, "Purchase Order", "Purchase Receipt"); - }); + if (frappe.model.can_create("Purchase Receipt")) { + listview.page.add_action_item(__("Purchase Receipt"), () => { + erpnext.bulk_transaction_processing.create(listview, "Purchase Order", "Purchase Receipt"); + }); + } - listview.page.add_action_item(__("Advance Payment"), () => { - erpnext.bulk_transaction_processing.create(listview, "Purchase Order", "Payment Entry"); - }); + if (frappe.model.can_create("Payment Entry")) { + listview.page.add_action_item(__("Advance Payment"), () => { + erpnext.bulk_transaction_processing.create(listview, "Purchase Order", "Payment Entry"); + }); + } }, }; diff --git a/erpnext/buying/doctype/supplier_quotation/supplier_quotation_list.js b/erpnext/buying/doctype/supplier_quotation/supplier_quotation_list.js index 99fe24d8770..1a2a514a680 100644 --- a/erpnext/buying/doctype/supplier_quotation/supplier_quotation_list.js +++ b/erpnext/buying/doctype/supplier_quotation/supplier_quotation_list.js @@ -11,12 +11,20 @@ frappe.listview_settings["Supplier Quotation"] = { }, onload: function (listview) { - listview.page.add_action_item(__("Purchase Order"), () => { - erpnext.bulk_transaction_processing.create(listview, "Supplier Quotation", "Purchase Order"); - }); + if (frappe.model.can_create("Purchase Order")) { + listview.page.add_action_item(__("Purchase Order"), () => { + erpnext.bulk_transaction_processing.create(listview, "Supplier Quotation", "Purchase Order"); + }); + } - listview.page.add_action_item(__("Purchase Invoice"), () => { - erpnext.bulk_transaction_processing.create(listview, "Supplier Quotation", "Purchase Invoice"); - }); + if (frappe.model.can_create("Purchase Invoice")) { + listview.page.add_action_item(__("Purchase Invoice"), () => { + erpnext.bulk_transaction_processing.create( + listview, + "Supplier Quotation", + "Purchase Invoice" + ); + }); + } }, }; diff --git a/erpnext/selling/doctype/quotation/quotation_list.js b/erpnext/selling/doctype/quotation/quotation_list.js index ae744b9cba3..b795c3fe0bc 100644 --- a/erpnext/selling/doctype/quotation/quotation_list.js +++ b/erpnext/selling/doctype/quotation/quotation_list.js @@ -12,13 +12,17 @@ frappe.listview_settings["Quotation"] = { }; } - listview.page.add_action_item(__("Sales Order"), () => { - erpnext.bulk_transaction_processing.create(listview, "Quotation", "Sales Order"); - }); + if (frappe.model.can_create("Sales Order")) { + listview.page.add_action_item(__("Sales Order"), () => { + erpnext.bulk_transaction_processing.create(listview, "Quotation", "Sales Order"); + }); + } - listview.page.add_action_item(__("Sales Invoice"), () => { - erpnext.bulk_transaction_processing.create(listview, "Quotation", "Sales Invoice"); - }); + if (frappe.model.can_create("Sales Invoice")) { + listview.page.add_action_item(__("Sales Invoice"), () => { + erpnext.bulk_transaction_processing.create(listview, "Quotation", "Sales Invoice"); + }); + } }, get_indicator: function (doc) { diff --git a/erpnext/selling/doctype/sales_order/sales_order_list.js b/erpnext/selling/doctype/sales_order/sales_order_list.js index 46d115a1713..c9bd4fc0f9d 100644 --- a/erpnext/selling/doctype/sales_order/sales_order_list.js +++ b/erpnext/selling/doctype/sales_order/sales_order_list.js @@ -60,16 +60,22 @@ frappe.listview_settings["Sales Order"] = { listview.call_for_selected_items(method, { status: "Submitted" }); }); - listview.page.add_action_item(__("Sales Invoice"), () => { - erpnext.bulk_transaction_processing.create(listview, "Sales Order", "Sales Invoice"); - }); + if (frappe.model.can_create("Sales Invoice")) { + listview.page.add_action_item(__("Sales Invoice"), () => { + erpnext.bulk_transaction_processing.create(listview, "Sales Order", "Sales Invoice"); + }); + } - listview.page.add_action_item(__("Delivery Note"), () => { - erpnext.bulk_transaction_processing.create(listview, "Sales Order", "Delivery Note"); - }); + if (frappe.model.can_create("Delivery Note")) { + listview.page.add_action_item(__("Delivery Note"), () => { + erpnext.bulk_transaction_processing.create(listview, "Sales Order", "Delivery Note"); + }); + } - listview.page.add_action_item(__("Advance Payment"), () => { - erpnext.bulk_transaction_processing.create(listview, "Sales Order", "Payment Entry"); - }); + if (frappe.model.can_create("Payment Entry")) { + listview.page.add_action_item(__("Advance Payment"), () => { + erpnext.bulk_transaction_processing.create(listview, "Sales Order", "Payment Entry"); + }); + } }, }; diff --git a/erpnext/stock/doctype/delivery_note/delivery_note_list.js b/erpnext/stock/doctype/delivery_note/delivery_note_list.js index c6b98c4134c..dd09f6cfcf5 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note_list.js +++ b/erpnext/stock/doctype/delivery_note/delivery_note_list.js @@ -63,16 +63,20 @@ frappe.listview_settings["Delivery Note"] = { } }; - // doclist.page.add_actions_menu_item(__('Create Delivery Trip'), action, false); + if (frappe.model.can_create("Delivery Trip")) { + doclist.page.add_action_item(__("Create Delivery Trip"), action); + } - doclist.page.add_action_item(__("Create Delivery Trip"), action); + if (frappe.model.can_create("Sales Invoice")) { + doclist.page.add_action_item(__("Sales Invoice"), () => { + erpnext.bulk_transaction_processing.create(doclist, "Delivery Note", "Sales Invoice"); + }); + } - doclist.page.add_action_item(__("Sales Invoice"), () => { - erpnext.bulk_transaction_processing.create(doclist, "Delivery Note", "Sales Invoice"); - }); - - doclist.page.add_action_item(__("Packaging Slip From Delivery Note"), () => { - erpnext.bulk_transaction_processing.create(doclist, "Delivery Note", "Packing Slip"); - }); + if (frappe.model.can_create("Packing Slip")) { + doclist.page.add_action_item(__("Packaging Slip From Delivery Note"), () => { + erpnext.bulk_transaction_processing.create(doclist, "Delivery Note", "Packing Slip"); + }); + } }, }; diff --git a/erpnext/utilities/bulk_transaction.py b/erpnext/utilities/bulk_transaction.py index 7ba687941c9..51447e0591b 100644 --- a/erpnext/utilities/bulk_transaction.py +++ b/erpnext/utilities/bulk_transaction.py @@ -8,6 +8,9 @@ from frappe.utils import get_link_to_form, today @frappe.whitelist() def transaction_processing(data, from_doctype, to_doctype): + frappe.has_permission(from_doctype, "read", throw=True) + frappe.has_permission(to_doctype, "create", throw=True) + if isinstance(data, str): deserialized_data = json.loads(data) else: From 69c5695f6efce54776a7d2e6af11aef54ca595af Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Fri, 24 Jan 2025 22:42:04 +0530 Subject: [PATCH 0991/1614] fix: allow to fix negative stock for batch using stock reco (cherry picked from commit 2e8cde337884c4c1d7c569cad251a955cc08fce2) --- erpnext/stock/doctype/batch/batch.js | 9 ++- erpnext/stock/doctype/batch/batch.py | 2 + .../stock_reconciliation.py | 5 +- .../test_stock_reconciliation.py | 78 +++++++++++++++++++ erpnext/stock/serial_batch_bundle.py | 8 +- 5 files changed, 97 insertions(+), 5 deletions(-) diff --git a/erpnext/stock/doctype/batch/batch.js b/erpnext/stock/doctype/batch/batch.js index 77e4e560acf..a485f849639 100644 --- a/erpnext/stock/doctype/batch/batch.js +++ b/erpnext/stock/doctype/batch/batch.js @@ -54,7 +54,12 @@ frappe.ui.form.on("Batch", { frappe.call({ method: "erpnext.stock.doctype.batch.batch.get_batch_qty", - args: { batch_no: frm.doc.name, item_code: frm.doc.item, for_stock_levels: for_stock_levels }, + args: { + batch_no: frm.doc.name, + item_code: frm.doc.item, + for_stock_levels: for_stock_levels, + consider_negative_batches: 1, + }, callback: (r) => { if (!r.message) { return; @@ -71,7 +76,7 @@ frappe.ui.form.on("Batch", { // show (r.message || []).forEach(function (d) { - if (d.qty > 0) { + if (d.qty != 0) { $(`
${d.warehouse}
${d.qty}
diff --git a/erpnext/stock/doctype/batch/batch.py b/erpnext/stock/doctype/batch/batch.py index 3882e5b2424..1e1e6c8ee26 100644 --- a/erpnext/stock/doctype/batch/batch.py +++ b/erpnext/stock/doctype/batch/batch.py @@ -218,6 +218,7 @@ def get_batch_qty( posting_time=None, ignore_voucher_nos=None, for_stock_levels=False, + consider_negative_batches=False, ): """Returns batch actual qty if warehouse is passed, or returns dict of qty by warehouse if warehouse is None @@ -243,6 +244,7 @@ def get_batch_qty( "batch_no": batch_no, "ignore_voucher_nos": ignore_voucher_nos, "for_stock_levels": for_stock_levels, + "consider_negative_batches": consider_negative_batches, } ) diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py index 9e23270ca71..85c74480e7d 100644 --- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py +++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py @@ -139,8 +139,8 @@ class StockReconciliation(StockController): "voucher_type": self.doctype, "voucher_no": self.name, "voucher_detail_no": row.name, - "qty": row.current_qty, - "type_of_transaction": "Outward", + "qty": row.current_qty * -1, + "type_of_transaction": "Outward" if row.current_qty > 0 else "Inward", "company": self.company, "is_rejected": 0, "serial_nos": get_serial_nos(row.current_serial_no) @@ -1367,6 +1367,7 @@ def get_stock_balance_for( posting_date=posting_date, posting_time=posting_time, for_stock_levels=True, + consider_negative_batches=True, ) or 0 ) diff --git a/erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.py b/erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.py index a3673063a48..48a27a25962 100644 --- a/erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.py +++ b/erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.py @@ -1330,6 +1330,84 @@ class TestStockReconciliation(FrappeTestCase, StockTestMixin): self.assertEqual(stock_value_difference, 1500.00 * -1) + def test_stock_reco_for_negative_batch(self): + from erpnext.stock.doctype.batch.batch import get_batch_qty + from erpnext.stock.doctype.stock_entry.test_stock_entry import make_stock_entry + + item_code = self.make_item( + "Test Item For Negative Batch", + { + "is_stock_item": 1, + "has_batch_no": 1, + "create_new_batch": 1, + "batch_number_series": "TEST-BATCH-NB-.###", + }, + ).name + + warehouse = "_Test Warehouse - _TC" + + se = make_stock_entry( + posting_date="2024-11-01", + posting_time="11:00", + item_code=item_code, + target=warehouse, + qty=10, + basic_rate=100, + ) + + batch_no = get_batch_from_bundle(se.items[0].serial_and_batch_bundle) + + se = make_stock_entry( + posting_date="2024-11-01", + posting_time="11:00", + item_code=item_code, + source=warehouse, + qty=10, + basic_rate=100, + use_serial_batch_fields=1, + batch_no=batch_no, + ) + + sles = frappe.get_all( + "Stock Ledger Entry", + filters={"voucher_no": se.name, "is_cancelled": 0}, + ) + + # intentionally setting negative qty + doc = frappe.get_doc("Stock Ledger Entry", sles[0].name) + doc.db_set( + { + "actual_qty": -20, + "qty_after_transaction": -10, + } + ) + + sabb_doc = frappe.get_doc("Serial and Batch Bundle", doc.serial_and_batch_bundle) + for row in sabb_doc.entries: + row.db_set("qty", -20) + + batch_qty = get_batch_qty(batch_no, warehouse, item_code, consider_negative_batches=True) + self.assertEqual(batch_qty, -10) + + sr = create_stock_reconciliation( + posting_date="2024-11-02", + posting_time="11:00", + item_code=item_code, + warehouse=warehouse, + use_serial_batch_fields=1, + batch_no=batch_no, + qty=0, + rate=100, + do_not_submit=True, + ) + + self.assertEqual(sr.items[0].current_qty, -10) + sr.submit() + sr.reload() + + self.assertTrue(sr.items[0].current_serial_and_batch_bundle) + self.assertFalse(sr.items[0].serial_and_batch_bundle) + def create_batch_item_with_batch(item_name, batch_id): batch_item_doc = create_item(item_name, is_stock_item=1) diff --git a/erpnext/stock/serial_batch_bundle.py b/erpnext/stock/serial_batch_bundle.py index 85adb0348d9..f4d862b583c 100644 --- a/erpnext/stock/serial_batch_bundle.py +++ b/erpnext/stock/serial_batch_bundle.py @@ -418,7 +418,13 @@ class SerialBatchBundle: batches = frappe._dict({self.sle.batch_no: self.sle.actual_qty}) batches_qty = get_available_batches( - frappe._dict({"item_code": self.item_code, "batch_no": list(batches.keys())}) + frappe._dict( + { + "item_code": self.item_code, + "batch_no": list(batches.keys()), + "consider_negative_batches": 1, + } + ) ) for batch_no in batches: From 692a44816f698d80239d2d97cb06d073547dc045 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Sun, 26 Jan 2025 12:14:44 +0530 Subject: [PATCH 0992/1614] feat(UX): scroll to required field (backport #44367) (#45433) feat(UX): scroll to required field (#44367) (cherry picked from commit 4008ca5ddd55b36b8c12277dd450ee15ba63b47f) Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com> --- erpnext/public/js/queries.js | 58 +++++++++++++++++++++++++----------- 1 file changed, 40 insertions(+), 18 deletions(-) diff --git a/erpnext/public/js/queries.js b/erpnext/public/js/queries.js index 46958092199..63651ec8759 100644 --- a/erpnext/public/js/queries.js +++ b/erpnext/public/js/queries.js @@ -28,9 +28,13 @@ $.extend(erpnext.queries, { customer_filter: function (doc) { if (!doc.customer) { - frappe.throw( - __("Please set {0}", [__(frappe.meta.get_label(doc.doctype, "customer", doc.name))]) - ); + cur_frm.scroll_to_field("customer"); + frappe.show_alert({ + message: __("Please set {0} first.", [ + __(frappe.meta.get_label(doc.doctype, "customer", doc.name)), + ]), + indicator: "orange", + }); } return { filters: { customer: doc.customer } }; @@ -39,11 +43,13 @@ $.extend(erpnext.queries, { contact_query: function (doc) { if (frappe.dynamic_link) { if (!doc[frappe.dynamic_link.fieldname]) { - frappe.throw( - __("Please set {0}", [ + cur_frm.scroll_to_field(frappe.dynamic_link.fieldname); + frappe.show_alert({ + message: __("Please set {0} first.", [ __(frappe.meta.get_label(doc.doctype, frappe.dynamic_link.fieldname, doc.name)), - ]) - ); + ]), + indicator: "orange", + }); } return { @@ -70,11 +76,13 @@ $.extend(erpnext.queries, { address_query: function (doc) { if (frappe.dynamic_link) { if (!doc[frappe.dynamic_link.fieldname]) { - frappe.throw( - __("Please set {0}", [ + cur_frm.scroll_to_field(frappe.dynamic_link.fieldname); + frappe.show_alert({ + message: __("Please set {0} first.", [ __(frappe.meta.get_label(doc.doctype, frappe.dynamic_link.fieldname, doc.name)), - ]) - ); + ]), + indicator: "orange", + }); } return { @@ -89,7 +97,13 @@ $.extend(erpnext.queries, { company_address_query: function (doc) { if (!doc.company) { - frappe.throw(__("Please set {0}", [__(frappe.meta.get_label(doc.doctype, "company", doc.name))])); + cur_frm.scroll_to_field("company"); + frappe.show_alert({ + message: __("Please set {0} first.", [ + __(frappe.meta.get_label(doc.doctype, "company", doc.name)), + ]), + indicator: "orange", + }); } return { @@ -110,9 +124,13 @@ $.extend(erpnext.queries, { supplier_filter: function (doc) { if (!doc.supplier) { - frappe.throw( - __("Please set {0}", [__(frappe.meta.get_label(doc.doctype, "supplier", doc.name))]) - ); + cur_frm.scroll_to_field("supplier"); + frappe.show_alert({ + message: __("Please set {0} first.", [ + __(frappe.meta.get_label(doc.doctype, "supplier", doc.name)), + ]), + indicator: "orange", + }); } return { filters: { supplier: doc.supplier } }; @@ -120,9 +138,13 @@ $.extend(erpnext.queries, { lead_filter: function (doc) { if (!doc.lead) { - frappe.throw( - __("Please specify a {0}", [__(frappe.meta.get_label(doc.doctype, "lead", doc.name))]) - ); + cur_frm.scroll_to_field("lead"); + frappe.show_alert({ + message: __("Please specify a {0} first.", [ + __(frappe.meta.get_label(doc.doctype, "lead", doc.name)), + ]), + indicator: "orange", + }); } return { filters: { lead: doc.lead } }; From ff46ae5bc1af5c28aaafe9213ac6795e0d0d8892 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 27 Jan 2025 13:21:40 +0530 Subject: [PATCH 0993/1614] fix: currency decimal on POS Past Order List (backport #45524) (#45527) fix: currency decimal on POS Past Order List (#45524) * fix: currency decimal on POS * fix: removed precision (cherry picked from commit 2ac8c92e7fc30a50cf6b84bfea3cc334e6fa64bd) Co-authored-by: Diptanil Saha --- erpnext/selling/page/point_of_sale/pos_past_order_list.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/selling/page/point_of_sale/pos_past_order_list.js b/erpnext/selling/page/point_of_sale/pos_past_order_list.js index ab2fd3e1547..dda44f25299 100644 --- a/erpnext/selling/page/point_of_sale/pos_past_order_list.js +++ b/erpnext/selling/page/point_of_sale/pos_past_order_list.js @@ -110,7 +110,7 @@ erpnext.PointOfSale.PastOrderList = class {
-
${format_currency(invoice.grand_total, invoice.currency, 0) || 0}
+
${format_currency(invoice.grand_total, invoice.currency) || 0}
${posting_datetime}
From 2c2a25ab16f5b53ddf17dc23abff6e9ab14f1e4d Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 27 Jan 2025 14:26:19 +0530 Subject: [PATCH 0994/1614] feat(Sales Invoice): allow linking to project without adding timesheets (backport #44295) (#45528) feat(Sales Invoice): allow linking to project without adding timesheets (#44295) * feat(Sales Invoice): allow linking to project without adding timesheets * test: add timesheet data (cherry picked from commit 11f65f20a04ef6d7fd04eb62508a75eb729758f0) Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com> --- .../accounts/doctype/sales_invoice/sales_invoice.py | 11 +++++++---- erpnext/projects/doctype/timesheet/test_timesheet.py | 1 + 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 6e039b4b34f..97871ba7d6f 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -1083,13 +1083,16 @@ class SalesInvoice(SellingController): timesheet.billing_amount = ts_doc.total_billable_amount def update_timesheet_billing_for_project(self): - if not self.timesheets and self.project: - self.add_timesheet_data() - else: + if self.timesheets: self.calculate_billing_amount_for_timesheet() - @frappe.whitelist() + @frappe.whitelist(methods=["PUT"]) def add_timesheet_data(self): + if not self.timesheets and self.project: + self._add_timesheet_data() + self.save() + + def _add_timesheet_data(self): self.set("timesheets", []) if self.project: for data in get_projectwise_timesheet_data(self.project): diff --git a/erpnext/projects/doctype/timesheet/test_timesheet.py b/erpnext/projects/doctype/timesheet/test_timesheet.py index da042f36aef..39140b335c9 100644 --- a/erpnext/projects/doctype/timesheet/test_timesheet.py +++ b/erpnext/projects/doctype/timesheet/test_timesheet.py @@ -62,6 +62,7 @@ class TestTimesheet(unittest.TestCase): ) sales_invoice = create_sales_invoice(do_not_save=True) sales_invoice.project = project + sales_invoice._add_timesheet_data() sales_invoice.submit() ts = frappe.get_doc("Timesheet", timesheet.name) From 172fdad24457fca4c5cec4a64e125213db4ff7db Mon Sep 17 00:00:00 2001 From: Sugesh393 Date: Wed, 15 Jan 2025 18:20:20 +0530 Subject: [PATCH 0995/1614] fix: set party_account_currency for pos_invoice returns (cherry picked from commit 2af6fca7fa8a5230c4949017210200da12613b41) --- erpnext/controllers/sales_and_purchase_return.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/erpnext/controllers/sales_and_purchase_return.py b/erpnext/controllers/sales_and_purchase_return.py index 18368017429..2079338b09a 100644 --- a/erpnext/controllers/sales_and_purchase_return.py +++ b/erpnext/controllers/sales_and_purchase_return.py @@ -370,6 +370,8 @@ def make_return_doc(doctype: str, source_name: str, target_doc=None, return_agai if doc.get("is_return"): if doc.doctype == "Sales Invoice" or doc.doctype == "POS Invoice": doc.consolidated_invoice = "" + # no copy enabled for party_account_currency + doc.party_account_currency = source.party_account_currency doc.set("payments", []) doc.update_billed_amount_in_delivery_note = True for data in source.payments: From 6a382f14301001f6042abbc1e487e035ced760bc Mon Sep 17 00:00:00 2001 From: Sugesh393 Date: Wed, 15 Jan 2025 18:27:57 +0530 Subject: [PATCH 0996/1614] test: add new unit test to check payments amount of pos_invoice returns (cherry picked from commit 484ecf24796ecf42d6fe01a23d00ab9245f9a56c) --- .../sales_invoice/test_sales_invoice.py | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py index 439fc5639e5..b624be5cf71 100644 --- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py @@ -4245,6 +4245,30 @@ class TestSalesInvoice(FrappeTestCase): doc = frappe.get_doc("Project", project.name) self.assertEqual(doc.total_billed_amount, si.grand_total) + def test_pos_returns_with_party_account_currency(self): + from erpnext.accounts.doctype.sales_invoice.sales_invoice import make_sales_return + + pos_profile = make_pos_profile() + pos_profile.payments = [] + pos_profile.append("payments", {"default": 1, "mode_of_payment": "Cash"}) + pos_profile.save() + + pos = create_sales_invoice( + customer="_Test Customer USD", + currency="USD", + conversion_rate=86.595000000, + qty=2, + do_not_save=True, + ) + pos.is_pos = 1 + pos.pos_profile = pos_profile.name + pos.debit_to = "_Test Receivable USD - _TC" + pos.append("payments", {"mode_of_payment": "Cash", "account": "_Test Bank - _TC", "amount": 20.35}) + pos.save().submit() + + pos_return = make_sales_return(pos.name) + self.assertEqual(abs(pos_return.payments[0].amount), pos.payments[0].amount) + def set_advance_flag(company, flag, default_account): frappe.db.set_value( From b004855e7cfe522cf138f803ca46840f5f018b60 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Mon, 27 Jan 2025 14:31:44 +0530 Subject: [PATCH 0997/1614] Revert "feat(Sales Invoice): allow linking to project without adding timesheets (backport #44295)" (#45531) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Revert "feat(Sales Invoice): allow linking to project without adding timeshee…" This reverts commit 2c2a25ab16f5b53ddf17dc23abff6e9ab14f1e4d. --- .../accounts/doctype/sales_invoice/sales_invoice.py | 11 ++++------- erpnext/projects/doctype/timesheet/test_timesheet.py | 1 - 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 97871ba7d6f..6e039b4b34f 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -1083,16 +1083,13 @@ class SalesInvoice(SellingController): timesheet.billing_amount = ts_doc.total_billable_amount def update_timesheet_billing_for_project(self): - if self.timesheets: + if not self.timesheets and self.project: + self.add_timesheet_data() + else: self.calculate_billing_amount_for_timesheet() - @frappe.whitelist(methods=["PUT"]) + @frappe.whitelist() def add_timesheet_data(self): - if not self.timesheets and self.project: - self._add_timesheet_data() - self.save() - - def _add_timesheet_data(self): self.set("timesheets", []) if self.project: for data in get_projectwise_timesheet_data(self.project): diff --git a/erpnext/projects/doctype/timesheet/test_timesheet.py b/erpnext/projects/doctype/timesheet/test_timesheet.py index 39140b335c9..da042f36aef 100644 --- a/erpnext/projects/doctype/timesheet/test_timesheet.py +++ b/erpnext/projects/doctype/timesheet/test_timesheet.py @@ -62,7 +62,6 @@ class TestTimesheet(unittest.TestCase): ) sales_invoice = create_sales_invoice(do_not_save=True) sales_invoice.project = project - sales_invoice._add_timesheet_data() sales_invoice.submit() ts = frappe.get_doc("Timesheet", timesheet.name) From 8f0d270746f1137cf464ea3ec53eee3aa5835cb1 Mon Sep 17 00:00:00 2001 From: Sugesh393 Date: Fri, 17 Jan 2025 11:41:52 +0530 Subject: [PATCH 0998/1614] feat: add company level validation for accounting dimension (cherry picked from commit 60efd3e2195a1e87cade172786ce38917fe9ab8f) --- .../accounting_dimension.json | 3 +- erpnext/controllers/accounts_controller.py | 37 ++++++++++++++++++- 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.json b/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.json index 5858f10bb0b..f05d20a0a49 100644 --- a/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.json +++ b/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.json @@ -31,7 +31,8 @@ "label": "Reference Document Type", "options": "DocType", "read_only_depends_on": "eval:!doc.__islocal", - "reqd": 1 + "reqd": 1, + "search_index": 1 }, { "default": "0", diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 8361d4d825c..a1ee82a1499 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -8,7 +8,7 @@ from collections import defaultdict import frappe from frappe import _, bold, qb, throw from frappe.model.workflow import get_workflow_name, is_transition_condition_satisfied -from frappe.query_builder import Criterion +from frappe.query_builder import Criterion, DocType from frappe.query_builder.custom import ConstantColumn from frappe.query_builder.functions import Abs, Sum from frappe.utils import ( @@ -266,6 +266,7 @@ class AccountsController(TransactionBase): self.set_total_in_words() self.set_default_letter_head() + self.validate_company_in_accounting_dimension() def set_default_letter_head(self): if hasattr(self, "letter_head") and not self.letter_head: @@ -403,6 +404,40 @@ class AccountsController(TransactionBase): for row in batches: frappe.delete_doc("Batch", row.name) + def validate_company_in_accounting_dimension(self): + doc_field = DocType("DocField") + accounting_dimension = DocType("Accounting Dimension") + query = ( + frappe.qb.from_(accounting_dimension) + .select(accounting_dimension.document_type) + .join(doc_field) + .on(doc_field.parent == accounting_dimension.document_type) + .where(doc_field.fieldname == "company") + ).run(as_list=True) + + dimension_list = sum(query, ["Project"]) + self.validate_company(dimension_list) + + if childs := self.get_all_children(): + for child in childs: + self.validate_company(dimension_list, child) + + def validate_company(self, dimension_list, child=None): + for dimension in dimension_list: + if not child: + dimension_value = self.get(frappe.scrub(dimension)) + else: + dimension_value = child.get(frappe.scrub(dimension)) + + if dimension_value: + company = frappe.get_cached_value(dimension, dimension_value, "company") + if company and company != self.company: + frappe.throw( + _("{0}: {1} does not belong to the Company: {2}").format( + dimension, frappe.bold(dimension_value), self.company + ) + ) + def validate_return_against_account(self): if self.doctype in ["Sales Invoice", "Purchase Invoice"] and self.is_return and self.return_against: cr_dr_account_field = "debit_to" if self.doctype == "Sales Invoice" else "credit_to" From fac4e99b0ea43a65944840a0cfc6cef921a72ee8 Mon Sep 17 00:00:00 2001 From: Sugesh393 Date: Fri, 17 Jan 2025 11:45:51 +0530 Subject: [PATCH 0999/1614] test: add new unit test for company validation in accounting dimension (cherry picked from commit c94091d68ffc1453b9042f6f2f675d81dcd76849) --- .../tests/test_accounts_controller.py | 41 ++++++++++++------- 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/erpnext/controllers/tests/test_accounts_controller.py b/erpnext/controllers/tests/test_accounts_controller.py index c45923b2fed..2c46f04af71 100644 --- a/erpnext/controllers/tests/test_accounts_controller.py +++ b/erpnext/controllers/tests/test_accounts_controller.py @@ -17,6 +17,7 @@ from erpnext.accounts.doctype.purchase_invoice.test_purchase_invoice import make from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice from erpnext.accounts.party import get_party_account from erpnext.buying.doctype.purchase_order.test_purchase_order import prepare_data_for_internal_transfer +from erpnext.projects.doctype.project.test_project import make_project from erpnext.stock.doctype.item.test_item import create_item @@ -1532,32 +1533,32 @@ class TestAccountsController(FrappeTestCase): # Invoices si1 = self.create_sales_invoice(qty=1, rate=rate_in_account_currency, do_not_submit=True) - si1.department = "Management" + si1.department = "Management - _TC" si1.save().submit() si2 = self.create_sales_invoice(qty=1, rate=rate_in_account_currency, do_not_submit=True) - si2.department = "Operations" + si2.department = "Operations - _TC" si2.save().submit() # Payments cr_note1 = self.create_sales_invoice(qty=-1, conversion_rate=75, rate=1, do_not_save=True) - cr_note1.department = "Management" + cr_note1.department = "Management - _TC" cr_note1.is_return = 1 cr_note1.save().submit() cr_note2 = self.create_sales_invoice(qty=-1, conversion_rate=75, rate=1, do_not_save=True) - cr_note2.department = "Legal" + cr_note2.department = "Legal - _TC" cr_note2.is_return = 1 cr_note2.save().submit() pe1 = get_payment_entry(si1.doctype, si1.name) pe1.references = [] - pe1.department = "Research & Development" + pe1.department = "Research & Development - _TC" pe1.save().submit() pe2 = get_payment_entry(si1.doctype, si1.name) pe2.references = [] - pe2.department = "Management" + pe2.department = "Management - _TC" pe2.save().submit() je1 = self.create_journal_entry( @@ -1570,7 +1571,7 @@ class TestAccountsController(FrappeTestCase): ) je1.accounts[0].party_type = "Customer" je1.accounts[0].party = self.customer - je1.accounts[0].department = "Management" + je1.accounts[0].department = "Management - _TC" je1.save().submit() # assert dimension filter's result @@ -1579,17 +1580,17 @@ class TestAccountsController(FrappeTestCase): self.assertEqual(len(pr.invoices), 2) self.assertEqual(len(pr.payments), 5) - pr.department = "Legal" + pr.department = "Legal - _TC" pr.get_unreconciled_entries() self.assertEqual(len(pr.invoices), 0) self.assertEqual(len(pr.payments), 1) - pr.department = "Management" + pr.department = "Management - _TC" pr.get_unreconciled_entries() self.assertEqual(len(pr.invoices), 1) self.assertEqual(len(pr.payments), 3) - pr.department = "Research & Development" + pr.department = "Research & Development - _TC" pr.get_unreconciled_entries() self.assertEqual(len(pr.invoices), 0) self.assertEqual(len(pr.payments), 1) @@ -1600,17 +1601,17 @@ class TestAccountsController(FrappeTestCase): # Invoice si = self.create_sales_invoice(qty=1, rate=rate_in_account_currency, do_not_submit=True) - si.department = "Management" + si.department = "Management - _TC" si.save().submit() # Payment cr_note = self.create_sales_invoice(qty=-1, conversion_rate=75, rate=1, do_not_save=True) - cr_note.department = "Management" + cr_note.department = "Management - _TC" cr_note.is_return = 1 cr_note.save().submit() pr = self.create_payment_reconciliation() - pr.department = "Management" + pr.department = "Management - _TC" pr.get_unreconciled_entries() self.assertEqual(len(pr.invoices), 1) self.assertEqual(len(pr.payments), 1) @@ -1642,7 +1643,7 @@ class TestAccountsController(FrappeTestCase): # Sales Invoice in Foreign Currency self.setup_dimensions() rate_in_account_currency = 1 - dpt = "Research & Development" + dpt = "Research & Development - _TC" si = self.create_sales_invoice(qty=1, rate=rate_in_account_currency, do_not_save=True) si.department = dpt @@ -1677,7 +1678,7 @@ class TestAccountsController(FrappeTestCase): def test_93_dimension_inheritance_on_advance(self): self.setup_dimensions() - dpt = "Research & Development" + dpt = "Research & Development - _TC" adv = self.create_payment_entry(amount=1, source_exc_rate=85) adv.department = dpt @@ -2135,3 +2136,13 @@ class TestAccountsController(FrappeTestCase): journal_voucher = frappe.get_doc("Journal Entry", exc_je_for_pi[0].parent) purchase_invoice = frappe.get_doc("Purchase Invoice", pi.name) self.assertEqual(purchase_invoice.advances[0].difference_posting_date, journal_voucher.posting_date) + + def test_company_validation_in_dimension(self): + si = create_sales_invoice(do_not_submit=True) + project = make_project({"project_name": "_Test Demo Project1", "company": "_Test Company 1"}) + si.project = project.name + self.assertRaises(frappe.ValidationError, si.save) + + si_1 = create_sales_invoice(do_not_submit=True) + si_1.items[0].project = project.name + self.assertRaises(frappe.ValidationError, si_1.save) From 149827562be1957a28cf13d303fed1d0362f41b1 Mon Sep 17 00:00:00 2001 From: Sugesh393 Date: Fri, 17 Jan 2025 11:46:17 +0530 Subject: [PATCH 1000/1614] fix: set company related values (cherry picked from commit 454067198ee8a8f649cc9db7109032587c43a098) --- erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py index b624be5cf71..1c33246ee68 100644 --- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py @@ -4235,6 +4235,7 @@ class TestSalesInvoice(FrappeTestCase): si = create_sales_invoice(do_not_submit=True) project = frappe.new_doc("Project") + project.company = "_Test Company" project.project_name = "Test Total Billed Amount" project.save() From 67e45cf002bb8b4ca60aba93ff69a9ef9a9d2b11 Mon Sep 17 00:00:00 2001 From: Sugesh393 Date: Tue, 21 Jan 2025 17:38:24 +0530 Subject: [PATCH 1001/1614] chore: update variable names for improved readability (cherry picked from commit 36bae552992f4d9009e96397db052e6e85cc2775) --- erpnext/controllers/accounts_controller.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index a1ee82a1499..30c8525fe4b 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -407,7 +407,7 @@ class AccountsController(TransactionBase): def validate_company_in_accounting_dimension(self): doc_field = DocType("DocField") accounting_dimension = DocType("Accounting Dimension") - query = ( + dimension_list = ( frappe.qb.from_(accounting_dimension) .select(accounting_dimension.document_type) .join(doc_field) @@ -415,12 +415,11 @@ class AccountsController(TransactionBase): .where(doc_field.fieldname == "company") ).run(as_list=True) - dimension_list = sum(query, ["Project"]) + dimension_list = sum(dimension_list, ["Project"]) self.validate_company(dimension_list) - if childs := self.get_all_children(): - for child in childs: - self.validate_company(dimension_list, child) + for child in self.get_all_children() or []: + self.validate_company(dimension_list, child) def validate_company(self, dimension_list, child=None): for dimension in dimension_list: From bcd3351999aefecbf3b8e5b3115450eda392924c Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 27 Jan 2025 15:46:39 +0530 Subject: [PATCH 1002/1614] refactor(test): update test data --- erpnext/projects/doctype/project/test_records.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/projects/doctype/project/test_records.json b/erpnext/projects/doctype/project/test_records.json index 567f359b50d..1482336631b 100644 --- a/erpnext/projects/doctype/project/test_records.json +++ b/erpnext/projects/doctype/project/test_records.json @@ -1,6 +1,7 @@ [ { "project_name": "_Test Project", - "status": "Open" + "status": "Open", + "company": "_Test Company" } ] \ No newline at end of file From e73aab0df548916551750c4371f18770b0c7c204 Mon Sep 17 00:00:00 2001 From: Sanket322 Date: Mon, 20 Jan 2025 18:01:31 +0530 Subject: [PATCH 1003/1614] fix: use user defined discount amount or default (cherry picked from commit e2a32b72578c2ed3dd54297cca54f293c4131a25) --- erpnext/accounts/doctype/pricing_rule/pricing_rule.py | 4 ++-- erpnext/public/js/controllers/transaction.js | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py index 385cc1a685e..87d4d2a33e6 100644 --- a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py +++ b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py @@ -415,8 +415,8 @@ def get_pricing_rule_for_item(args, doc=None, for_validate=False): "parent": args.parent, "parenttype": args.parenttype, "child_docname": args.get("child_docname"), - "discount_percentage": 0.0, - "discount_amount": 0, + "discount_percentage": args.get("discount_percentage") or 0.0, + "discount_amount": args.get("discount_amount") or 0.0, } ) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index d63461c23e0..09e52932d89 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -1751,7 +1751,9 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe "serial_no": d.serial_no, "batch_no": d.batch_no, "price_list_rate": d.price_list_rate, - "conversion_factor": d.conversion_factor || 1.0 + "conversion_factor": d.conversion_factor || 1.0, + "discount_percentage" : d.discount_percentage, + "discount_amount" : d.discount_amount, }); // if doctype is Quotation Item / Sales Order Iten then add Margin Type and rate in item_list From 4e347d835e86c644dfd2a0a6b955f0b4aa8e4713 Mon Sep 17 00:00:00 2001 From: Sanket322 Date: Thu, 23 Jan 2025 11:55:12 +0530 Subject: [PATCH 1004/1614] fix: remove applied pricing rule (cherry picked from commit 50223c6bec3e5a497034246945aa0188a415921b) --- erpnext/accounts/doctype/pricing_rule/pricing_rule.py | 2 -- erpnext/public/js/controllers/transaction.js | 11 +++++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py index 87d4d2a33e6..73cb2483811 100644 --- a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py +++ b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py @@ -415,8 +415,6 @@ def get_pricing_rule_for_item(args, doc=None, for_validate=False): "parent": args.parent, "parenttype": args.parenttype, "child_docname": args.get("child_docname"), - "discount_percentage": args.get("discount_percentage") or 0.0, - "discount_amount": args.get("discount_amount") or 0.0, } ) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 09e52932d89..86c9ef46c78 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -1658,7 +1658,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe }, callback: function(r) { if (!r.exc && r.message) { - me.remove_pricing_rule(r.message, removed_pricing_rule); + me.remove_pricing_rule(r.message, removed_pricing_rule, item.name); me.calculate_taxes_and_totals(); if(me.frm.doc.apply_discount_on) me.frm.trigger("apply_discount_on"); } @@ -1937,7 +1937,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe }); } - remove_pricing_rule(item, removed_pricing_rule) { + remove_pricing_rule(item, removed_pricing_rule, row_name) { let me = this; const fields = ["discount_percentage", "discount_amount", "margin_rate_or_amount", "rate_with_margin"]; @@ -1976,6 +1976,13 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe me.trigger_price_list_rate(); } + else if(!item.is_free_item && row_name){ + me.frm.doc.items.forEach(d => { + if (d.name != row_name) return; + + Object.assign(d, item); + }); + } } trigger_price_list_rate() { From efc7b9ac56545d236d3069a8911acd1216036b96 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Wed, 15 Jan 2025 18:14:19 +0530 Subject: [PATCH 1005/1614] feat: Add corrective job card operating cost as additional costs in stock entry (cherry picked from commit 2bf10f68a85fd3256fc93815e51eea311aa771c7) # Conflicts: # erpnext/manufacturing/doctype/job_card/job_card.py --- erpnext/manufacturing/doctype/bom/bom.py | 49 +++++++++++++++++++ .../doctype/job_card/job_card.py | 8 +++ 2 files changed, 57 insertions(+) diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py index 6b2dd77c471..f0f9b0c354c 100644 --- a/erpnext/manufacturing/doctype/bom/bom.py +++ b/erpnext/manufacturing/doctype/bom/bom.py @@ -1371,6 +1371,55 @@ def add_operations_cost(stock_entry, work_order=None, expense_account=None): }, ) + def get_max_op_qty(): + from frappe.query_builder.functions import Sum + + table = frappe.qb.DocType("Job Card") + query = ( + frappe.qb.from_(table) + .select(Sum(table.total_completed_qty).as_("qty")) + .where( + (table.docstatus == 1) + & (table.work_order == work_order.name) + & (table.is_corrective_job_card == 0) + ) + .groupby(table.operation) + ) + return min([d.qty for d in query.run(as_dict=True)], default=0) + + def get_utilised_cc(): + from frappe.query_builder.functions import Sum + + table = frappe.qb.DocType("Stock Entry") + subquery = ( + frappe.qb.from_(table) + .select(table.name) + .where( + (table.docstatus == 1) + & (table.work_order == work_order.name) + & (table.purpose == "Manufacture") + ) + ) + table = frappe.qb.DocType("Landed Cost Taxes and Charges") + query = ( + frappe.qb.from_(table) + .select(Sum(table.amount).as_("amount")) + .where(table.parent.isin(subquery) & (table.description == "Corrective Operation Cost")) + ) + return query.run(as_dict=True)[0].amount or 0 + + if work_order and work_order.corrective_operation_cost: + max_qty = get_max_op_qty() - work_order.produced_qty + remaining_cc = work_order.corrective_operation_cost - get_utilised_cc() + stock_entry.append( + "additional_costs", + { + "expense_account": expense_account, + "description": "Corrective Operation Cost", + "amount": remaining_cc / max_qty * flt(stock_entry.fg_completed_qty), + }, + ) + @frappe.whitelist() def get_bom_diff(bom1, bom2): diff --git a/erpnext/manufacturing/doctype/job_card/job_card.py b/erpnext/manufacturing/doctype/job_card/job_card.py index a1b53fb7c4a..893c698ff5f 100644 --- a/erpnext/manufacturing/doctype/job_card/job_card.py +++ b/erpnext/manufacturing/doctype/job_card/job_card.py @@ -650,7 +650,15 @@ class JobCard(Document): ) ) +<<<<<<< HEAD if self.get("operation") == d.operation: +======= + if ( + self.get("operation") == d.operation + or self.operation_row_id == d.operation_row_id + or self.is_corrective_job_card + ): +>>>>>>> 2bf10f68a8 (feat: Add corrective job card operating cost as additional costs in stock entry) self.append( "items", { From 5c9ac274783d4f169897c3838cfad56430ddfbaf Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Thu, 16 Jan 2025 10:08:47 +0530 Subject: [PATCH 1006/1614] test: Added test for new feature (cherry picked from commit 4fb48b7f226ecd6c5a9a23511584a1953831c1fd) --- .../doctype/job_card/test_job_card.py | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/erpnext/manufacturing/doctype/job_card/test_job_card.py b/erpnext/manufacturing/doctype/job_card/test_job_card.py index d6d3775111d..58ed1d5a4bb 100644 --- a/erpnext/manufacturing/doctype/job_card/test_job_card.py +++ b/erpnext/manufacturing/doctype/job_card/test_job_card.py @@ -424,6 +424,46 @@ class TestJobCard(FrappeTestCase): cost_after_cancel = self.work_order.total_operating_cost self.assertEqual(cost_after_cancel, original_cost) + @IntegrationTestCase.change_settings( + "Manufacturing Settings", {"add_corrective_operation_cost_in_finished_good_valuation": 1} + ) + def test_if_corrective_jc_ops_cost_is_added_to_manufacture_stock_entry(self): + job_card = frappe.get_last_doc("Job Card", {"work_order": self.work_order.name}) + job_card.append( + "time_logs", + {"from_time": now(), "to_time": add_to_date(now(), hours=1), "completed_qty": 2}, + ) + job_card.submit() + + corrective_action = frappe.get_doc( + doctype="Operation", is_corrective_operation=1, name=frappe.generate_hash() + ).insert() + + corrective_job_card = make_corrective_job_card( + job_card.name, operation=corrective_action.name, for_operation=job_card.operation + ) + corrective_job_card.hour_rate = 100 + corrective_job_card.insert() + corrective_job_card.append( + "time_logs", + { + "from_time": add_to_date(now(), hours=2), + "to_time": add_to_date(now(), hours=2, minutes=30), + "completed_qty": 2, + }, + ) + corrective_job_card.submit() + self.work_order.reload() + + from erpnext.manufacturing.doctype.work_order.work_order import ( + make_stock_entry as make_stock_entry_for_wo, + ) + + stock_entry = make_stock_entry_for_wo(self.work_order.name, "Manufacture") + self.assertEqual(stock_entry.additional_costs[1].description, "Corrective Operation Cost") + self.assertEqual(stock_entry.additional_costs[1].amount, 50) + self.assertEqual(stock_entry["items"][-1].additional_cost, 6050) + def test_job_card_statuses(self): def assertStatus(status): jc.set_status() From d6e0c6c96954bbb40f413cf75b593c7148a054e2 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Thu, 16 Jan 2025 20:52:44 +0530 Subject: [PATCH 1007/1614] refactor: added condition which checks for corrective operation setting (cherry picked from commit 063a205e5a29f48457a0a8ad248b0788dbeda5a6) --- erpnext/manufacturing/doctype/bom/bom.py | 10 +++- .../doctype/job_card/test_job_card.py | 60 ++++++++++++++++--- .../stock/doctype/stock_entry/stock_entry.py | 11 ---- 3 files changed, 61 insertions(+), 20 deletions(-) diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py index f0f9b0c354c..53ec6fc1e8b 100644 --- a/erpnext/manufacturing/doctype/bom/bom.py +++ b/erpnext/manufacturing/doctype/bom/bom.py @@ -1408,7 +1408,15 @@ def add_operations_cost(stock_entry, work_order=None, expense_account=None): ) return query.run(as_dict=True)[0].amount or 0 - if work_order and work_order.corrective_operation_cost: + if ( + work_order + and work_order.corrective_operation_cost + and cint( + frappe.db.get_single_value( + "Manufacturing Settings", "add_corrective_operation_cost_in_finished_good_valuation" + ) + ) + ): max_qty = get_max_op_qty() - work_order.produced_qty remaining_cc = work_order.corrective_operation_cost - get_utilised_cc() stock_entry.append( diff --git a/erpnext/manufacturing/doctype/job_card/test_job_card.py b/erpnext/manufacturing/doctype/job_card/test_job_card.py index 58ed1d5a4bb..03c605ce156 100644 --- a/erpnext/manufacturing/doctype/job_card/test_job_card.py +++ b/erpnext/manufacturing/doctype/job_card/test_job_card.py @@ -428,10 +428,18 @@ class TestJobCard(FrappeTestCase): "Manufacturing Settings", {"add_corrective_operation_cost_in_finished_good_valuation": 1} ) def test_if_corrective_jc_ops_cost_is_added_to_manufacture_stock_entry(self): - job_card = frappe.get_last_doc("Job Card", {"work_order": self.work_order.name}) + wo = make_wo_order_test_record( + item="_Test FG Item 2", + qty=10, + transfer_material_against=self.transfer_material_against, + source_warehouse=self.source_warehouse, + ) + self.generate_required_stock(wo) + job_card = frappe.get_last_doc("Job Card", {"work_order": wo.name}) + job_card.update({"for_quantity": 4}) job_card.append( "time_logs", - {"from_time": now(), "to_time": add_to_date(now(), hours=1), "completed_qty": 2}, + {"from_time": now(), "to_time": add_to_date(now(), hours=1), "completed_qty": 4}, ) job_card.submit() @@ -449,20 +457,56 @@ class TestJobCard(FrappeTestCase): { "from_time": add_to_date(now(), hours=2), "to_time": add_to_date(now(), hours=2, minutes=30), - "completed_qty": 2, + "completed_qty": 4, }, ) corrective_job_card.submit() - self.work_order.reload() + wo.reload() from erpnext.manufacturing.doctype.work_order.work_order import ( make_stock_entry as make_stock_entry_for_wo, ) - stock_entry = make_stock_entry_for_wo(self.work_order.name, "Manufacture") - self.assertEqual(stock_entry.additional_costs[1].description, "Corrective Operation Cost") - self.assertEqual(stock_entry.additional_costs[1].amount, 50) - self.assertEqual(stock_entry["items"][-1].additional_cost, 6050) + stock_entry = make_stock_entry_for_wo(wo.name, "Manufacture", qty=3) + self.assertEqual(stock_entry.additional_costs[1].amount, 37.5) + frappe.get_doc(stock_entry).submit() + + from erpnext.manufacturing.doctype.work_order.work_order import make_job_card + + make_job_card( + wo.name, + [{"name": wo.operations[0].name, "operation": "_Test Operation 1", "qty": 3, "pending_qty": 3}], + ) + job_card = frappe.get_last_doc("Job Card", {"work_order": wo.name}) + job_card.update({"for_quantity": 3}) + job_card.append( + "time_logs", + { + "from_time": add_to_date(now(), hours=3), + "to_time": add_to_date(now(), hours=4), + "completed_qty": 3, + }, + ) + job_card.submit() + + corrective_job_card = make_corrective_job_card( + job_card.name, operation=corrective_action.name, for_operation=job_card.operation + ) + corrective_job_card.hour_rate = 80 + corrective_job_card.insert() + corrective_job_card.append( + "time_logs", + { + "from_time": add_to_date(now(), hours=4), + "to_time": add_to_date(now(), hours=4, minutes=30), + "completed_qty": 3, + }, + ) + corrective_job_card.submit() + wo.reload() + + stock_entry = make_stock_entry_for_wo(wo.name, "Manufacture", qty=4) + self.assertEqual(stock_entry.additional_costs[1].amount, 52.5) def test_job_card_statuses(self): def assertStatus(status): diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index a2da35c0ef2..eec30f69f36 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -2868,17 +2868,6 @@ def get_operating_cost_per_unit(work_order=None, bom_no=None): if bom.quantity: operating_cost_per_unit = flt(bom.operating_cost) / flt(bom.quantity) - if ( - work_order - and work_order.produced_qty - and cint( - frappe.db.get_single_value( - "Manufacturing Settings", "add_corrective_operation_cost_in_finished_good_valuation" - ) - ) - ): - operating_cost_per_unit += flt(work_order.corrective_operation_cost) / flt(work_order.produced_qty) - return operating_cost_per_unit From c102e51eb18748b60f5793b23bd6dfd35b66835b Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Mon, 20 Jan 2025 12:41:28 +0530 Subject: [PATCH 1008/1614] fix: logical error in where condition of qb query (cherry picked from commit 47f8a8600374a6a130c45c12e65f1cf11fa450e0) # Conflicts: # erpnext/stock/doctype/landed_cost_taxes_and_charges/landed_cost_taxes_and_charges.json --- erpnext/manufacturing/doctype/bom/bom.py | 3 ++- .../landed_cost_taxes_and_charges.json | 14 +++++++++++++- .../landed_cost_taxes_and_charges.py | 1 + 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py index 53ec6fc1e8b..5d13471f541 100644 --- a/erpnext/manufacturing/doctype/bom/bom.py +++ b/erpnext/manufacturing/doctype/bom/bom.py @@ -1404,7 +1404,7 @@ def add_operations_cost(stock_entry, work_order=None, expense_account=None): query = ( frappe.qb.from_(table) .select(Sum(table.amount).as_("amount")) - .where(table.parent.isin(subquery) & (table.description == "Corrective Operation Cost")) + .where(table.parent.isin(subquery) & (table.has_corrective_cost == 1)) ) return query.run(as_dict=True)[0].amount or 0 @@ -1424,6 +1424,7 @@ def add_operations_cost(stock_entry, work_order=None, expense_account=None): { "expense_account": expense_account, "description": "Corrective Operation Cost", + "has_corrective_cost": 1, "amount": remaining_cc / max_qty * flt(stock_entry.fg_completed_qty), }, ) diff --git a/erpnext/stock/doctype/landed_cost_taxes_and_charges/landed_cost_taxes_and_charges.json b/erpnext/stock/doctype/landed_cost_taxes_and_charges/landed_cost_taxes_and_charges.json index 9c59c13ac07..2d5823d3d51 100644 --- a/erpnext/stock/doctype/landed_cost_taxes_and_charges/landed_cost_taxes_and_charges.json +++ b/erpnext/stock/doctype/landed_cost_taxes_and_charges/landed_cost_taxes_and_charges.json @@ -11,7 +11,8 @@ "description", "col_break3", "amount", - "base_amount" + "base_amount", + "has_corrective_cost" ], "fields": [ { @@ -62,12 +63,23 @@ "label": "Amount (Company Currency)", "options": "Company:company:default_currency", "read_only": 1 + }, + { + "default": "0", + "fieldname": "has_corrective_cost", + "fieldtype": "Check", + "label": "Has Corrective Cost", + "read_only": 1 } ], "index_web_pages_for_search": 1, "istable": 1, "links": [], +<<<<<<< HEAD "modified": "2021-05-17 13:57:10.807980", +======= + "modified": "2025-01-20 12:22:03.455762", +>>>>>>> 47f8a86003 (fix: logical error in where condition of qb query) "modified_by": "Administrator", "module": "Stock", "name": "Landed Cost Taxes and Charges", diff --git a/erpnext/stock/doctype/landed_cost_taxes_and_charges/landed_cost_taxes_and_charges.py b/erpnext/stock/doctype/landed_cost_taxes_and_charges/landed_cost_taxes_and_charges.py index 8509cb71d85..a3f7f037d60 100644 --- a/erpnext/stock/doctype/landed_cost_taxes_and_charges/landed_cost_taxes_and_charges.py +++ b/erpnext/stock/doctype/landed_cost_taxes_and_charges/landed_cost_taxes_and_charges.py @@ -20,6 +20,7 @@ class LandedCostTaxesandCharges(Document): description: DF.SmallText exchange_rate: DF.Float expense_account: DF.Link | None + has_corrective_cost: DF.Check parent: DF.Data parentfield: DF.Data parenttype: DF.Data From fb1ea9524b22547cd672df9ca54f92e234a3a732 Mon Sep 17 00:00:00 2001 From: Raffael Meyer <14891507+barredterra@users.noreply.github.com> Date: Mon, 27 Jan 2025 13:29:51 +0100 Subject: [PATCH 1009/1614] chore: bump actions/cache to v4 (#45541) --- .github/workflows/patch.yml | 6 +++--- .github/workflows/server-tests-mariadb.yml | 6 +++--- .github/workflows/server-tests-postgres.yml | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/patch.yml b/.github/workflows/patch.yml index 21dd3d48794..ffaa6b5e7df 100644 --- a/.github/workflows/patch.yml +++ b/.github/workflows/patch.yml @@ -57,7 +57,7 @@ jobs: run: echo "127.0.0.1 test_site" | sudo tee -a /etc/hosts - name: Cache pip - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pip-${{ hashFiles('**/*requirements.txt', '**/pyproject.toml') }} @@ -66,7 +66,7 @@ jobs: ${{ runner.os }}- - name: Cache node modules - uses: actions/cache@v2 + uses: actions/cache@v4 env: cache-name: cache-node-modules with: @@ -81,7 +81,7 @@ jobs: id: yarn-cache-dir-path run: echo "::set-output name=dir::$(yarn cache dir)" - - uses: actions/cache@v2 + - uses: actions/cache@v4 id: yarn-cache with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/server-tests-mariadb.yml b/.github/workflows/server-tests-mariadb.yml index 720f0e0ed35..8f2dfe0c0e8 100644 --- a/.github/workflows/server-tests-mariadb.yml +++ b/.github/workflows/server-tests-mariadb.yml @@ -76,7 +76,7 @@ jobs: run: echo "127.0.0.1 test_site" | sudo tee -a /etc/hosts - name: Cache pip - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pip-${{ hashFiles('**/*requirements.txt', '**/pyproject.toml') }} @@ -85,7 +85,7 @@ jobs: ${{ runner.os }}- - name: Cache node modules - uses: actions/cache@v2 + uses: actions/cache@v4 env: cache-name: cache-node-modules with: @@ -100,7 +100,7 @@ jobs: id: yarn-cache-dir-path run: echo "::set-output name=dir::$(yarn cache dir)" - - uses: actions/cache@v2 + - uses: actions/cache@v4 id: yarn-cache with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/server-tests-postgres.yml b/.github/workflows/server-tests-postgres.yml index a6887066570..2470438aa7c 100644 --- a/.github/workflows/server-tests-postgres.yml +++ b/.github/workflows/server-tests-postgres.yml @@ -66,7 +66,7 @@ jobs: run: echo "127.0.0.1 test_site" | sudo tee -a /etc/hosts - name: Cache pip - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pip-${{ hashFiles('**/*requirements.txt', '**/pyproject.toml') }} @@ -75,7 +75,7 @@ jobs: ${{ runner.os }}- - name: Cache node modules - uses: actions/cache@v2 + uses: actions/cache@v4 env: cache-name: cache-node-modules with: @@ -90,7 +90,7 @@ jobs: id: yarn-cache-dir-path run: echo "::set-output name=dir::$(yarn cache dir)" - - uses: actions/cache@v2 + - uses: actions/cache@v4 id: yarn-cache with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} From 57f79a22401ec1ffadb8ae4a7dddea5236e213db Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Mon, 27 Jan 2025 22:01:13 +0530 Subject: [PATCH 1010/1614] fix: merge conflict --- erpnext/manufacturing/doctype/job_card/job_card.py | 4 ---- .../landed_cost_taxes_and_charges.json | 4 ---- 2 files changed, 8 deletions(-) diff --git a/erpnext/manufacturing/doctype/job_card/job_card.py b/erpnext/manufacturing/doctype/job_card/job_card.py index 893c698ff5f..50bec328620 100644 --- a/erpnext/manufacturing/doctype/job_card/job_card.py +++ b/erpnext/manufacturing/doctype/job_card/job_card.py @@ -650,15 +650,11 @@ class JobCard(Document): ) ) -<<<<<<< HEAD - if self.get("operation") == d.operation: -======= if ( self.get("operation") == d.operation or self.operation_row_id == d.operation_row_id or self.is_corrective_job_card ): ->>>>>>> 2bf10f68a8 (feat: Add corrective job card operating cost as additional costs in stock entry) self.append( "items", { diff --git a/erpnext/stock/doctype/landed_cost_taxes_and_charges/landed_cost_taxes_and_charges.json b/erpnext/stock/doctype/landed_cost_taxes_and_charges/landed_cost_taxes_and_charges.json index 2d5823d3d51..898848ebf42 100644 --- a/erpnext/stock/doctype/landed_cost_taxes_and_charges/landed_cost_taxes_and_charges.json +++ b/erpnext/stock/doctype/landed_cost_taxes_and_charges/landed_cost_taxes_and_charges.json @@ -75,11 +75,7 @@ "index_web_pages_for_search": 1, "istable": 1, "links": [], -<<<<<<< HEAD - "modified": "2021-05-17 13:57:10.807980", -======= "modified": "2025-01-20 12:22:03.455762", ->>>>>>> 47f8a86003 (fix: logical error in where condition of qb query) "modified_by": "Administrator", "module": "Stock", "name": "Landed Cost Taxes and Charges", From d74c498efecbe3ff80d20782192f046be68c36d5 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Mon, 27 Jan 2025 22:17:13 +0530 Subject: [PATCH 1011/1614] fix: import --- erpnext/manufacturing/doctype/job_card/test_job_card.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/manufacturing/doctype/job_card/test_job_card.py b/erpnext/manufacturing/doctype/job_card/test_job_card.py index 03c605ce156..31864c9262c 100644 --- a/erpnext/manufacturing/doctype/job_card/test_job_card.py +++ b/erpnext/manufacturing/doctype/job_card/test_job_card.py @@ -6,6 +6,7 @@ from typing import Literal import frappe from frappe.test_runner import make_test_records +from frappe.tests import IntegrationTestCase from frappe.tests.utils import FrappeTestCase, change_settings from frappe.utils import random_string from frappe.utils.data import add_to_date, now, today From b59d253d93fa521994c22c81600e7e7e9c8ee6ff Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Mon, 27 Jan 2025 22:55:33 +0530 Subject: [PATCH 1012/1614] fix: import 2 --- erpnext/manufacturing/doctype/job_card/test_job_card.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/erpnext/manufacturing/doctype/job_card/test_job_card.py b/erpnext/manufacturing/doctype/job_card/test_job_card.py index 31864c9262c..5e381bd06ff 100644 --- a/erpnext/manufacturing/doctype/job_card/test_job_card.py +++ b/erpnext/manufacturing/doctype/job_card/test_job_card.py @@ -6,7 +6,6 @@ from typing import Literal import frappe from frappe.test_runner import make_test_records -from frappe.tests import IntegrationTestCase from frappe.tests.utils import FrappeTestCase, change_settings from frappe.utils import random_string from frappe.utils.data import add_to_date, now, today @@ -425,7 +424,7 @@ class TestJobCard(FrappeTestCase): cost_after_cancel = self.work_order.total_operating_cost self.assertEqual(cost_after_cancel, original_cost) - @IntegrationTestCase.change_settings( + @change_settings( "Manufacturing Settings", {"add_corrective_operation_cost_in_finished_good_valuation": 1} ) def test_if_corrective_jc_ops_cost_is_added_to_manufacture_stock_entry(self): From 1be19819fbc79482004e53c15567ef3ae38b4966 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Tue, 28 Jan 2025 09:26:14 +0530 Subject: [PATCH 1013/1614] fix: removed field not present in v15 --- erpnext/manufacturing/doctype/job_card/job_card.py | 6 +----- erpnext/manufacturing/doctype/job_card/test_job_card.py | 2 ++ 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/erpnext/manufacturing/doctype/job_card/job_card.py b/erpnext/manufacturing/doctype/job_card/job_card.py index 50bec328620..0f0694e33b0 100644 --- a/erpnext/manufacturing/doctype/job_card/job_card.py +++ b/erpnext/manufacturing/doctype/job_card/job_card.py @@ -650,11 +650,7 @@ class JobCard(Document): ) ) - if ( - self.get("operation") == d.operation - or self.operation_row_id == d.operation_row_id - or self.is_corrective_job_card - ): + if self.get("operation") == d.operation or self.is_corrective_job_card: self.append( "items", { diff --git a/erpnext/manufacturing/doctype/job_card/test_job_card.py b/erpnext/manufacturing/doctype/job_card/test_job_card.py index 5e381bd06ff..0119e74cb4c 100644 --- a/erpnext/manufacturing/doctype/job_card/test_job_card.py +++ b/erpnext/manufacturing/doctype/job_card/test_job_card.py @@ -451,6 +451,7 @@ class TestJobCard(FrappeTestCase): job_card.name, operation=corrective_action.name, for_operation=job_card.operation ) corrective_job_card.hour_rate = 100 + corrective_job_card.update({"hour_rate": 100}) corrective_job_card.insert() corrective_job_card.append( "time_logs", @@ -460,6 +461,7 @@ class TestJobCard(FrappeTestCase): "completed_qty": 4, }, ) + print(corrective_job_card.as_dict()) corrective_job_card.submit() wo.reload() From f60a3bcedfe48d84a9773f504a99cd50c83a0b76 Mon Sep 17 00:00:00 2001 From: Sanket Shah <113279972+Sanket322@users.noreply.github.com> Date: Tue, 28 Jan 2025 11:27:28 +0530 Subject: [PATCH 1014/1614] fix: update fields on change of item code In `Update Items` of `Sales Order` (#45125) * fix: update fields on change of item code * fix: minor update * fix: set the new values always * Revert "fix: set the new values always" This reverts commit 44daa0a641e489515eb73fc35fcea308d6cb49e8. --------- Co-authored-by: Sanket322 Co-authored-by: ruthra kumar (cherry picked from commit 9933d3c8ff047a28dbfb8cf1f76d8f283a204376) --- erpnext/public/js/utils.js | 56 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/erpnext/public/js/utils.js b/erpnext/public/js/utils.js index 7c02fefc0f9..a000cdee7cc 100755 --- a/erpnext/public/js/utils.js +++ b/erpnext/public/js/utils.js @@ -654,6 +654,62 @@ erpnext.utils.update_child_items = function (opts) { filters: filters, }; }, + onchange: function () { + const me = this; + + frm.call({ + method: "erpnext.stock.get_item_details.get_item_details", + args: { + doc: frm.doc, + ctx: { + item_code: this.value, + set_warehouse: frm.doc.set_warehouse, + customer: frm.doc.customer || frm.doc.party_name, + quotation_to: frm.doc.quotation_to, + supplier: frm.doc.supplier, + currency: frm.doc.currency, + is_internal_supplier: frm.doc.is_internal_supplier, + is_internal_customer: frm.doc.is_internal_customer, + conversion_rate: frm.doc.conversion_rate, + price_list: frm.doc.selling_price_list || frm.doc.buying_price_list, + price_list_currency: frm.doc.price_list_currency, + plc_conversion_rate: frm.doc.plc_conversion_rate, + company: frm.doc.company, + order_type: frm.doc.order_type, + is_pos: cint(frm.doc.is_pos), + is_return: cint(frm.doc.is_return), + is_subcontracted: frm.doc.is_subcontracted, + ignore_pricing_rule: frm.doc.ignore_pricing_rule, + doctype: frm.doc.doctype, + name: frm.doc.name, + qty: me.doc.qty || 1, + uom: me.doc.uom, + pos_profile: cint(frm.doc.is_pos) ? frm.doc.pos_profile : "", + tax_category: frm.doc.tax_category, + child_doctype: frm.doc.doctype + " Item", + is_old_subcontracting_flow: frm.doc.is_old_subcontracting_flow, + }, + }, + callback: function (r) { + if (r.message) { + const { qty, price_list_rate: rate, uom, conversion_factor } = r.message; + + const row = dialog.fields_dict.trans_items.df.data.find( + (doc) => doc.idx == me.doc.idx + ); + if (row) { + Object.assign(row, { + conversion_factor: me.doc.conversion_factor || conversion_factor, + uom: me.doc.uom || uom, + qty: me.doc.qty || qty, + rate: me.doc.rate || rate, + }); + dialog.fields_dict.trans_items.grid.refresh(); + } + } + }, + }); + }, }, { fieldtype: "Link", From de43c123e206085545b4c075882b6839c225962e Mon Sep 17 00:00:00 2001 From: eagleautomate <167297807+eagleautomate@users.noreply.github.com> Date: Mon, 27 Jan 2025 19:29:36 +0530 Subject: [PATCH 1015/1614] feat: Add chart of accounts for Switzerland 240812 Schulkontenrahmen VEB - DE (cherry picked from commit 2c644ec2ef888c20b61321a7e927ec9519e5bb15) --- .../ch_240812 Schulkontenrahmen VEB - DE.json | 532 ++++++++++++++++++ 1 file changed, 532 insertions(+) create mode 100644 erpnext/accounts/doctype/account/chart_of_accounts/verified/ch_240812 Schulkontenrahmen VEB - DE.json diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/ch_240812 Schulkontenrahmen VEB - DE.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/ch_240812 Schulkontenrahmen VEB - DE.json new file mode 100644 index 00000000000..dff27a213c1 --- /dev/null +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/ch_240812 Schulkontenrahmen VEB - DE.json @@ -0,0 +1,532 @@ +{ + "country_code": "ch", + "name": "240812 Schulkontenrahmen VEB - DE", + "tree": { + "Aktiven": { + "account_number": "1", + "is_group": 1, + "root_type": "Asset", + "Umlaufvermögen": { + "account_number": "10", + "is_group": 1, + "Flüssige Mittel": { + "account_number": "100", + "is_group": 1, + "Kasse": { + "account_number": "1000", + "account_type": "Cash" + }, + "Bankguthaben": { + "account_number": "1020", + "account_type": "Bank" + } + }, + "Kurzfristig gehaltene Aktiven mit Börsenkurs": { + "account_number": "106", + "is_group": 1, + "Wertschriften": { + "account_number": "1060" + }, + "Wertberichtigungen Wertschriften": { + "account_number": "1069" + } + }, + "Forderungen aus Lieferungen und Leistungen": { + "account_number": "110", + "is_group": 1, + "Forderungen aus Lieferungen und Leistungen (Debitoren)": { + "account_number": "1100" + }, + "Delkredere": { + "account_number": "1109" + } + }, + "Übrige kurzfristige Forderungen": { + "account_number": "114", + "is_group": 1, + "Vorschüsse und Darlehen": { + "account_number": "1140" + }, + "Wertberichtigungen Vorschüsse und Darlehen": { + "account_number": "1149" + }, + "Vorsteuer MWST Material, Waren, Dienstleistungen, Energie": { + "account_number": "1170" + }, + "Vorsteuer MWST Investitionen, übriger Betriebsaufwand": { + "account_number": "1171" + }, + "Verrechnungssteuer": { + "account_number": "1176" + }, + "Forderungen gegenüber Sozialversicherungen und Vorsorgeeinrichtungen": { + "account_number": "1180" + }, + "Quellensteuer": { + "account_number": "1189" + }, + "Sonstige kurzfristige Forderungen": { + "account_number": "1190" + }, + "Wertberichtigungen sonstige kurzfristige Forderungen": { + "account_number": "1199" + } + }, + "Vorräte und nicht fakturierte Dienstleistungen": { + "account_number": "120", + "is_group": 1, + "Handelswaren": { + "account_number": "1200" + }, + "Rohstoffe": { + "account_number": "1210" + }, + "Werkstoffe": { + "account_number": "1220" + }, + "Hilfs- und Verbrauchsmaterial": { + "account_number": "1230" + }, + "Handelswaren in Konsignation": { + "account_number": "1250" + }, + "Fertige Erzeugnisse": { + "account_number": "1260" + }, + "Unfertige Erzeugnisse": { + "account_number": "1270" + }, + "Nicht fakturierte Dienstleistungen": { + "account_number": "1280" + } + }, + "Aktive Rechnungsabgrenzungen": { + "account_number": "130", + "is_group": 1, + "Bezahlter Aufwand des Folgejahres": { + "account_number": "1300" + }, + "Noch nicht erhaltener Ertrag": { + "account_number": "1301" + } + } + }, + "Anlagevermögen": { + "account_number": "14", + "is_group": 1, + "Finanzanlagen": { + "account_number": "140", + "is_group": 1, + "Wertschriften": { + "account_number": "1400" + }, + "Wertberichtigungen Wertschriften": { + "account_number": "1409" + }, + "Darlehen": { + "account_number": "1440" + }, + "Hypotheken": { + "account_number": "1441" + }, + "Wertberichtigungen langfristige Forderungen": { + "account_number": "1449" + } + }, + "Beteiligungen": { + "account_number": "148", + "is_group": 1, + "Beteiligungen": { + "account_number": "1480" + }, + "Wertberichtigungen Beteiligungen": { + "account_number": "1489" + } + }, + "Mobile Sachanlagen": { + "account_number": "150", + "is_group": 1, + "Maschinen und Apparate": { + "account_number": "1500" + }, + "Wertberichtigungen Maschinen und Apparate": { + "account_number": "1509" + }, + "Mobiliar und Einrichtungen": { + "account_number": "1510" + }, + "Wertberichtigungen Mobiliar und Einrichtungen": { + "account_number": "1519" + }, + "Büromaschinen, Informatik, Kommunikationstechnologie": { + "account_number": "1520" + }, + "Wertberichtigungen Büromaschinen, Informatik, Kommunikationstechnologie": { + "account_number": "1529" + }, + "Fahrzeuge": { + "account_number": "1530" + }, + "Wertberichtigungen Fahrzeuge": { + "account_number": "1539" + }, + "Werkzeuge und Geräte": { + "account_number": "1540" + }, + "Wertberichtigungen Werkzeuge und Geräte": { + "account_number": "1549" + } + }, + "Immobile Sachanlagen": { + "account_number": "160", + "is_group": 1, + "Geschäftsliegenschaften": { + "account_number": "1600" + }, + "Wertberichtigungen Geschäftsliegenschaften": { + "account_number": "1609" + } + }, + "Immaterielle Werte": { + "account_number": "170", + "is_group": 1, + "Patente, Know-how, Lizenzen, Rechte, Entwicklungen": { + "account_number": "1700" + }, + "Wertberichtigungen Patente, Know-how, Lizenzen, Rechte, Entwicklungen": { + "account_number": "1709" + }, + "Goodwill": { + "account_number": "1770" + }, + "Wertberichtigungen Goodwill": { + "account_number": "1779" + } + }, + "Nicht einbezahltes Grund-, Gesellschafter- oder Stiftungskapital": { + "account_number": "180", + "is_group": 1, + "Nicht einbezahltes Aktien-, Stamm-, Anteilschein- oder Stiftungskapital": { + "account_number": "1850" + } + } + } + }, + "Passiven": { + "account_number": "2", + "is_group": 1, + "root_type": "Liability", + "Kurzfristiges Fremdkapital": { + "account_number": "20", + "is_group": 1, + "Verbindlichkeiten aus Lieferungen und Leistungen": { + "account_number": "200", + "is_group": 1, + "Verbindlichkeiten aus Lieferungen und Leistungen (Kreditoren)": { + "account_number": "2000" + }, + "Erhaltene Anzahlungen": { + "account_number": "2030" + } + }, + "Kurzfristige verzinsliche Verbindlichkeiten": { + "account_number": "210", + "is_group": 1, + "Bankverbindlichkeiten": { + "account_number": "2100" + }, + "Verbindlichkeiten aus Finanzierungsleasing": { + "account_number": "2120" + }, + "Übrige verzinsliche Verbindlichkeiten": { + "account_number": "2140" + } + }, + "Übrige kurzfristige Verbindlichkeiten": { + "account_number": "220", + "is_group": 1, + "Geschuldete MWST (Umsatzsteuer)": { + "account_number": "2200" + }, + "Abrechnungskonto MWST": { + "account_number": "2201" + }, + "Verrechnungssteuer": { + "account_number": "2206" + }, + "Direkte Steuern": { + "account_number": "2208" + }, + "Sonstige kurzfristige Verbindlichkeiten": { + "account_number": "2210" + }, + "Beschlossene Ausschüttungen": { + "account_number": "2261" + }, + "Sozialversicherungen und Vorsorgeeinrichtungen": { + "account_number": "2270" + }, + "Quellensteuer": { + "account_number": "2279" + } + }, + "Passive Rechnungsabgrenzungen und kurzfristige Rückstellungen": { + "account_number": "230", + "is_group": 1, + "Noch nicht bezahlter Aufwand": { + "account_number": "2300" + }, + "Erhaltener Ertrag des Folgejahres": { + "account_number": "2301" + }, + "Kurzfristige Rückstellungen": { + "account_number": "2330" + } + } + }, + "Langfristiges Fremdkapital": { + "account_number": "24", + "is_group": 1, + "Langfristige verzinsliche Verbindlichkeiten": { + "account_number": "240", + "is_group": 1, + "Bankverbindlichkeiten": { + "account_number": "2400" + }, + "Verbindlichkeiten aus Finanzierungsleasing": { + "account_number": "2420" + }, + "Obligationenanleihen": { + "account_number": "2430" + }, + "Darlehen": { + "account_number": "2450" + }, + "Hypotheken": { + "account_number": "2451" + } + }, + "Übrige langfristige Verbindlichkeiten": { + "account_number": "250", + "is_group": 1, + "Übrige langfristige Verbindlichkeiten (unverzinslich)": { + "account_number": "2500" + } + }, + "Rückstellungen sowie vom Gesetz vorgesehene ähnliche Positionen": { + "account_number": "260", + "is_group": 1, + "Rückstellungen": { + "account_number": "2600" + } + } + }, + "Eigenkapital (juristische Personen)": { + "account_number": "28", + "is_group": 1, + "Grund-, Gesellschafter- oder Stiftungskapital": { + "account_number": "280", + "is_group": 1, + "Aktien-, Stamm-, Anteilschein- oder Stiftungskapital": { + "account_number": "2800" + } + }, + "Reserven und Jahresgewinn oder Jahresverlust": { + "account_number": "290", + "is_group": 1, + "Gesetzliche Kapitalreserve": { + "account_number": "2900" + }, + "Reserve für eigene Kapitalanteile": { + "account_number": "2930" + }, + "Aufwertungsreserve": { + "account_number": "2940" + }, + "Gesetzliche Gewinnreserve": { + "account_number": "2950" + }, + "Freiwillige Gewinnreserven": { + "account_number": "2960" + }, + "Gewinnvortrag oder Verlustvortrag": { + "account_number": "2970" + }, + "Jahresgewinn oder Jahresverlust": { + "account_number": "2979" + }, + "Eigene Aktien, Stammanteile oder Anteilscheine (Minusposten)": { + "account_number": "2980" + } + } + } + }, + "Betrieblicher Ertrag aus Lieferungen und Leistungen": { + "account_number": "3", + "is_group": 1, + "root_type": "Income", + "Produktionserlöse": { + "account_number": "3000" + }, + "Handelserlöse": { + "account_number": "3200" + }, + "Dienstleistungserlöse": { + "account_number": "3400" + }, + "Übrige Erlöse aus Lieferungen und Leistungen": { + "account_number": "3600" + }, + "Eigenleistungen": { + "account_number": "3700" + }, + "Eigenverbrauch": { + "account_number": "3710" + }, + "Erlösminderungen": { + "account_number": "3800" + }, + "Verluste Forderungen (Debitoren), Veränderung Delkredere": { + "account_number": "3805" + }, + "Bestandesänderungen unfertige Erzeugnisse": { + "account_number": "3900" + }, + "Bestandesänderungen fertige Erzeugnisse": { + "account_number": "3901" + }, + "Bestandesänderungen nicht fakturierte Dienstleistungen": { + "account_number": "3940" + } + }, + "Aufwand für Material, Handelswaren, Dienstleistungen und Energie": { + "account_number": "4", + "is_group": 1, + "root_type": "Expense", + "Materialaufwand Produktion": { + "account_number": "4000" + }, + "Handelswarenaufwand": { + "account_number": "4200" + }, + "Aufwand für bezogene Dienstleistungen": { + "account_number": "4400" + }, + "Energieaufwand zur Leistungserstellung": { + "account_number": "4500" + }, + "Aufwandminderungen": { + "account_number": "4900" + } + }, + "Personalaufwand": { + "account_number": "5", + "is_group": 1, + "root_type": "Expense", + "Lohnaufwand": { + "account_number": "5000" + }, + "Sozialversicherungsaufwand": { + "account_number": "5700" + }, + "Übriger Personalaufwand": { + "account_number": "5800" + }, + "Leistungen Dritter": { + "account_number": "5900" + } + }, + "Übriger betrieblicher Aufwand, Abschreibungen und Wertberichtigungen sowie Finanzergebnis": { + "account_number": "6", + "is_group": 1, + "root_type": "Expense", + "Raumaufwand": { + "account_number": "6000" + }, + "Unterhalt, Reparaturen, Ersatz mobile Sachanlagen": { + "account_number": "6100" + }, + "Leasingaufwand mobile Sachanlagen": { + "account_number": "6105" + }, + "Fahrzeug- und Transportaufwand": { + "account_number": "6200" + }, + "Fahrzeugleasing und -mieten": { + "account_number": "6260" + }, + "Sachversicherungen, Abgaben, Gebühren, Bewilligungen": { + "account_number": "6300" + }, + "Energie- und Entsorgungsaufwand": { + "account_number": "6400" + }, + "Verwaltungsaufwand": { + "account_number": "6500" + }, + "Informatikaufwand inkl. Leasing": { + "account_number": "6570" + }, + "Werbeaufwand": { + "account_number": "6600" + }, + "Sonstiger betrieblicher Aufwand": { + "account_number": "6700" + }, + "Abschreibungen und Wertberichtigungen auf Positionen des Anlagevermögens": { + "account_number": "6800" + }, + "Finanzaufwand": { + "account_number": "6900" + }, + "Finanzertrag": { + "account_number": "6950" + } + }, + "Betrieblicher Nebenerfolg": { + "account_number": "7", + "is_group": 1, + "root_type": "Income", + "Ertrag Nebenbetrieb": { + "account_number": "7000" + }, + "Aufwand Nebenbetrieb": { + "account_number": "7010" + }, + "Ertrag betriebliche Liegenschaft": { + "account_number": "7500" + }, + "Aufwand betriebliche Liegenschaft": { + "account_number": "7510" + } + }, + "Betriebsfremder, ausserordentlicher, einmaliger oder periodenfremder Aufwand und Ertrag": { + "account_number": "8", + "is_group": 1, + "root_type": "Expense", + "Betriebsfremder Aufwand": { + "account_number": "8000" + }, + "Betriebsfremder Ertrag": { + "account_number": "8100" + }, + "Ausserordentlicher, einmaliger oder periodenfremder Aufwand": { + "account_number": "8500" + }, + "Ausserordentlicher, einmaliger oder periodenfremder Ertrag": { + "account_number": "8510" + }, + "Direkte Steuern": { + "account_number": "8900" + } + }, + "Abschluss": { + "account_number": "9", + "is_group": 1, + "root_type": "Equity", + "Jahresgewinn oder Jahresverlust": { + "account_number": "9200" + } + } + } +} \ No newline at end of file From eef907a275c48764ce22da70cad4b5e94c48b556 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 28 Jan 2025 11:41:14 +0530 Subject: [PATCH 1016/1614] chore: rename json to standard name format --- ...hmen VEB - DE.json => ch_240812_schulkontenrahmen_veb_de.json} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename erpnext/accounts/doctype/account/chart_of_accounts/verified/{ch_240812 Schulkontenrahmen VEB - DE.json => ch_240812_schulkontenrahmen_veb_de.json} (100%) diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/ch_240812 Schulkontenrahmen VEB - DE.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/ch_240812_schulkontenrahmen_veb_de.json similarity index 100% rename from erpnext/accounts/doctype/account/chart_of_accounts/verified/ch_240812 Schulkontenrahmen VEB - DE.json rename to erpnext/accounts/doctype/account/chart_of_accounts/verified/ch_240812_schulkontenrahmen_veb_de.json From b37602c716b6bad3ae3485f5a578e7c0a0e78c38 Mon Sep 17 00:00:00 2001 From: venkat102 Date: Sun, 26 Jan 2025 19:52:06 +0530 Subject: [PATCH 1017/1614] fix(payment entry): get amount in transaction currency (cherry picked from commit af97f4242909133cc7c8833506dbc4fcec1e21d2) --- erpnext/accounts/doctype/payment_entry/payment_entry.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index a2a4a5185cf..b0090f27004 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -1576,6 +1576,14 @@ class PaymentEntry(AccountsController): elif self.payment_type in ("Pay", "Internal Transfer"): return self.paid_from + def get_value_in_transaction_currency(self, account_currency, gl_dict, field): + company_currency = erpnext.get_company_currency(self.company) + conversion_rate = self.target_exchange_rate + if self.paid_from_account_currency != company_currency: + conversion_rate = self.source_exchange_rate + + return flt(gl_dict.get(field, 0) / (conversion_rate or 1)) + def update_advance_paid(self): if self.payment_type in ("Receive", "Pay") and self.party: for d in self.get("references"): From 6c4655dd72dc304d07b2b23a26e7f61eb1ff00b9 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Tue, 28 Jan 2025 16:56:05 +0530 Subject: [PATCH 1018/1614] fix: existing logical error --- erpnext/manufacturing/doctype/job_card/job_card.py | 2 +- erpnext/manufacturing/doctype/job_card/test_job_card.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/manufacturing/doctype/job_card/job_card.py b/erpnext/manufacturing/doctype/job_card/job_card.py index 0f0694e33b0..90f915d9c24 100644 --- a/erpnext/manufacturing/doctype/job_card/job_card.py +++ b/erpnext/manufacturing/doctype/job_card/job_card.py @@ -791,7 +791,7 @@ class JobCard(Document): fields=["total_time_in_mins", "hour_rate"], filters={"is_corrective_job_card": 1, "docstatus": 1, "work_order": self.work_order}, ): - wo.corrective_operation_cost += flt(row.total_time_in_mins) * flt(row.hour_rate) + wo.corrective_operation_cost += (flt(row.total_time_in_mins) / 60) * flt(row.hour_rate) wo.calculate_operating_cost() wo.flags.ignore_validate_update_after_submit = True diff --git a/erpnext/manufacturing/doctype/job_card/test_job_card.py b/erpnext/manufacturing/doctype/job_card/test_job_card.py index 0119e74cb4c..7f456b9881e 100644 --- a/erpnext/manufacturing/doctype/job_card/test_job_card.py +++ b/erpnext/manufacturing/doctype/job_card/test_job_card.py @@ -451,7 +451,6 @@ class TestJobCard(FrappeTestCase): job_card.name, operation=corrective_action.name, for_operation=job_card.operation ) corrective_job_card.hour_rate = 100 - corrective_job_card.update({"hour_rate": 100}) corrective_job_card.insert() corrective_job_card.append( "time_logs", @@ -461,7 +460,6 @@ class TestJobCard(FrappeTestCase): "completed_qty": 4, }, ) - print(corrective_job_card.as_dict()) corrective_job_card.submit() wo.reload() @@ -479,8 +477,10 @@ class TestJobCard(FrappeTestCase): wo.name, [{"name": wo.operations[0].name, "operation": "_Test Operation 1", "qty": 3, "pending_qty": 3}], ) + workstation = job_card.workstation job_card = frappe.get_last_doc("Job Card", {"work_order": wo.name}) job_card.update({"for_quantity": 3}) + job_card.workstation = workstation job_card.append( "time_logs", { From 8b0efab13ede54d8b5ffd9451108c77f09aff269 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 29 Jan 2025 12:45:34 +0530 Subject: [PATCH 1019/1614] fix: add multiple item issue in stock entry (backport #45544) (#45580) fix: add multiple item issue in stock entry (#45544) (cherry picked from commit 5a023dc8d47dc12dcf2e3f031a409f592f54a867) Co-authored-by: Ejaaz Khan <67804911+iamejaaz@users.noreply.github.com> --- erpnext/stock/doctype/stock_entry/stock_entry.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.js b/erpnext/stock/doctype/stock_entry/stock_entry.js index 8441b6edd64..635fd1a1fcf 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.js +++ b/erpnext/stock/doctype/stock_entry/stock_entry.js @@ -906,7 +906,12 @@ frappe.ui.form.on("Stock Entry Detail", { var d = locals[cdt][cdn]; $.each(r.message, function (k, v) { if (v) { - frappe.model.set_value(cdt, cdn, k, v); // qty and it's subsequent fields weren't triggered + // set_value trigger barcode function and barcode set qty to 1 in stock_controller.js, to avoid this set value manually instead of set value. + if (k != "barcode") { + frappe.model.set_value(cdt, cdn, k, v); // qty and it's subsequent fields weren't triggered + } else { + d.barcode = v; + } } }); refresh_field("items"); From a2ffdc78054d70c2daa7f8d00a712b8a328002c2 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 29 Jan 2025 12:46:44 +0530 Subject: [PATCH 1020/1614] fix: return qty error due to precision (backport #45536) (#45581) fix: return qty error due to precision (cherry picked from commit 3078578692f01ff90b2f5a2a4d2955b0e528d19f) Co-authored-by: Dany Robert --- erpnext/controllers/sales_and_purchase_return.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/erpnext/controllers/sales_and_purchase_return.py b/erpnext/controllers/sales_and_purchase_return.py index 2079338b09a..66ec8851727 100644 --- a/erpnext/controllers/sales_and_purchase_return.py +++ b/erpnext/controllers/sales_and_purchase_return.py @@ -174,7 +174,11 @@ def validate_quantity(doc, key, args, ref, valid_items, already_returned_items): ) for column in fields: - returned_qty = flt(already_returned_data.get(column, 0)) if len(already_returned_data) > 0 else 0 + returned_qty = ( + flt(already_returned_data.get(column, 0), stock_qty_precision) + if len(already_returned_data) > 0 + else 0 + ) if column == "stock_qty" and not args.get("return_qty_from_rejected_warehouse"): reference_qty = ref.get(column) @@ -186,7 +190,7 @@ def validate_quantity(doc, key, args, ref, valid_items, already_returned_items): reference_qty = ref.get(column) * ref.get("conversion_factor", 1.0) current_stock_qty = args.get(column) * args.get("conversion_factor", 1.0) - max_returnable_qty = flt(reference_qty, stock_qty_precision) - returned_qty + max_returnable_qty = flt(flt(reference_qty, stock_qty_precision) - returned_qty, stock_qty_precision) label = column.replace("_", " ").title() if reference_qty: From aef6b62f7d68520e7878497718c9ffc7502118e4 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Wed, 29 Jan 2025 14:38:50 +0530 Subject: [PATCH 1021/1614] refactor: auto add taxes from template (cherry picked from commit d1086722bf04127fbfb4683c518a864773391e59) --- erpnext/controllers/accounts_controller.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 30c8525fe4b..2aadd6b584e 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -252,6 +252,8 @@ class AccountsController(TransactionBase): self.validate_deferred_income_expense_account() self.set_inter_company_account() + self.set_taxes_and_charges() + if self.doctype == "Purchase Invoice": self.calculate_paid_amount() # apply tax withholding only if checked and applicable @@ -969,6 +971,12 @@ class AccountsController(TransactionBase): ): return True + def set_taxes_and_charges(self): + if frappe.db.get_single_value("Accounts Settings", "add_taxes_from_item_tax_template"): + if hasattr(self, "taxes_and_charges") and not self.get("taxes") and not self.get("is_pos"): + if tax_master_doctype := self.meta.get_field("taxes_and_charges").options: + self.append_taxes_from_master(tax_master_doctype) + def append_taxes_from_master(self, tax_master_doctype=None): if self.get("taxes_and_charges"): if not tax_master_doctype: From 28bb9c39e823560426cb8a727da03409ea9e7146 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Sat, 25 Jan 2025 13:04:12 +0530 Subject: [PATCH 1022/1614] fix: show payment entries in Tax Withheld Vouchers (cherry picked from commit 55733d4f18832443f2fa38e41705b3afc3ef58b5) --- .../purchase_invoice/purchase_invoice.py | 8 +- .../tax_withholding_category.py | 139 ++++++++++-------- .../test_tax_withholding_category.py | 11 ++ 3 files changed, 90 insertions(+), 68 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index 2b4242aa233..3d3481c053d 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -1797,13 +1797,13 @@ class PurchaseInvoice(BuyingController): self.remove(d) ## Add pending vouchers on which tax was withheld - for voucher_no, voucher_details in voucher_wise_amount.items(): + for row in voucher_wise_amount: self.append( "tax_withheld_vouchers", { - "voucher_name": voucher_no, - "voucher_type": voucher_details.get("voucher_type"), - "taxable_amount": voucher_details.get("amount"), + "voucher_name": row.voucher_name, + "voucher_type": row.voucher_type, + "taxable_amount": row.taxable_amount, }, ) diff --git a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py index 53a2e279a4d..9987ff5e031 100644 --- a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py +++ b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py @@ -87,6 +87,7 @@ def get_party_details(inv): def get_party_tax_withholding_details(inv, tax_withholding_category=None): if inv.doctype == "Payment Entry": inv.tax_withholding_net_total = inv.net_total + inv.base_tax_withholding_net_total = inv.net_total pan_no = "" parties = [] @@ -326,7 +327,7 @@ def get_tax_amount(party_type, parties, inv, tax_details, posting_date, pan_no=N # once tds is deducted, not need to add vouchers in the invoice voucher_wise_amount = {} else: - tax_amount = get_tds_amount(ldc, parties, inv, tax_details, vouchers) + tax_amount = get_tds_amount(ldc, parties, inv, tax_details, voucher_wise_amount) elif party_type == "Customer": if tax_deducted: @@ -356,13 +357,16 @@ def is_tax_deducted_on_the_basis_of_inv(vouchers): def get_invoice_vouchers(parties, tax_details, company, party_type="Supplier"): - doctype = "Purchase Invoice" if party_type == "Supplier" else "Sales Invoice" - field = ( - "base_tax_withholding_net_total as base_net_total" if party_type == "Supplier" else "base_net_total" - ) - voucher_wise_amount = {} + voucher_wise_amount = [] vouchers = [] + doctype = "Purchase Invoice" if party_type == "Supplier" else "Sales Invoice" + field = [ + "base_tax_withholding_net_total as base_net_total" if party_type == "Supplier" else "base_net_total", + "name", + "grand_total", + ] + filters = { "company": company, frappe.scrub(party_type): ["in", parties], @@ -376,15 +380,24 @@ def get_invoice_vouchers(parties, tax_details, company, party_type="Supplier"): {"apply_tds": 1, "tax_withholding_category": tax_details.get("tax_withholding_category")} ) - invoices_details = frappe.get_all(doctype, filters=filters, fields=["name", field]) + invoices_details = frappe.get_all(doctype, filters=filters, fields=field) for d in invoices_details: vouchers.append(d.name) - voucher_wise_amount.update({d.name: {"amount": d.base_net_total, "voucher_type": doctype}}) + voucher_wise_amount.append( + frappe._dict( + { + "voucher_name": d.name, + "voucher_type": doctype, + "taxable_amount": d.base_net_total, + "grand_total": d.grand_total, + } + ) + ) journal_entries_details = frappe.db.sql( """ - SELECT j.name, ja.credit - ja.debit AS amount + SELECT j.name, ja.credit - ja.debit AS amount, ja.reference_type FROM `tabJournal Entry` j, `tabJournal Entry Account` ja WHERE j.name = ja.parent @@ -403,13 +416,20 @@ def get_invoice_vouchers(parties, tax_details, company, party_type="Supplier"): tax_details.get("tax_withholding_category"), company, ), - as_dict=1, ) - if journal_entries_details: - for d in journal_entries_details: - vouchers.append(d.name) - voucher_wise_amount.update({d.name: {"amount": d.amount, "voucher_type": "Journal Entry"}}) + for d in journal_entries_details: + vouchers.append(d.name) + voucher_wise_amount.append( + frappe._dict( + { + "voucher_name": d.name, + "voucher_type": "Journal Entry", + "taxable_amount": d.amount, + "reference_type": d.reference_type, + } + ) + ) return vouchers, voucher_wise_amount @@ -508,12 +528,24 @@ def get_advance_tax_across_fiscal_year(tax_deducted_on_advances, tax_details): return advance_tax_from_across_fiscal_year -def get_tds_amount(ldc, parties, inv, tax_details, vouchers): +def get_tds_amount(ldc, parties, inv, tax_details, voucher_wise_amount): tds_amount = 0 - invoice_filters = {"name": ("in", vouchers), "docstatus": 1, "apply_tds": 1} + + pi_grand_total = 0 + pi_base_taxable_net_total = 0 + jv_credit_emt = 0 + pe_credit_amt = 0 + + for row in voucher_wise_amount: + if row.voucher_type == "Purchase Invoice": + pi_grand_total += row.get("grand_total", 0) + pi_base_taxable_net_total += row.get("taxable_amount", 0) + + if row.voucher_type == "Journal Entry" and row.reference_type != "Purchase Invoice": + jv_credit_emt += row.get("taxable_amount", 0) ## for TDS to be deducted on advances - payment_entry_filters = { + pe_filters = { "party_type": "Supplier", "party": ("in", parties), "docstatus": 1, @@ -524,70 +556,49 @@ def get_tds_amount(ldc, parties, inv, tax_details, vouchers): "company": inv.company, } - field = "sum(tax_withholding_net_total)" + consider_party_ledger_amount = cint(tax_details.consider_party_ledger_amount) - if cint(tax_details.consider_party_ledger_amount): - invoice_filters.pop("apply_tds", None) - field = "sum(grand_total)" - - payment_entry_filters.pop("apply_tax_withholding_amount", None) - payment_entry_filters.pop("tax_withholding_category", None) - - supp_inv_credit_amt = frappe.db.get_value("Purchase Invoice", invoice_filters, field) or 0.0 - - supp_jv_credit_amt = ( - frappe.db.get_value( - "Journal Entry Account", - { - "parent": ("in", vouchers), - "docstatus": 1, - "party": ("in", parties), - "reference_type": ("!=", "Purchase Invoice"), - }, - "sum(credit_in_account_currency - debit_in_account_currency)", - ) - or 0.0 - ) + if consider_party_ledger_amount: + pe_filters.pop("apply_tax_withholding_amount", None) + pe_filters.pop("tax_withholding_category", None) # Get Amount via payment entry - payment_entry_amounts = frappe.db.get_all( + payment_entries = frappe.db.get_all( "Payment Entry", - filters=payment_entry_filters, - fields=["sum(unallocated_amount) as amount", "payment_type"], - group_by="payment_type", + filters=pe_filters, + fields=["name", "unallocated_amount as taxable_amount", "payment_type"], ) - supp_credit_amt = supp_jv_credit_amt - supp_credit_amt += inv.get("tax_withholding_net_total", 0) - - for type in payment_entry_amounts: - if type.payment_type == "Pay": - supp_credit_amt += type.amount - else: - supp_credit_amt -= type.amount + for row in payment_entries: + value = row.taxable_amount if row.payment_type == "Pay" else -1 * row.taxable_amount + pe_credit_amt += value + voucher_wise_amount.append( + frappe._dict( + { + "voucher_name": row.name, + "voucher_type": "Payment Entry", + "taxable_amount": value, + } + ) + ) threshold = tax_details.get("threshold", 0) cumulative_threshold = tax_details.get("cumulative_threshold", 0) + supp_credit_amt = jv_credit_emt + pe_credit_amt + inv.get("tax_withholding_net_total", 0) + tax_withholding_net_total = inv.get("base_tax_withholding_net_total", 0) - if inv.doctype != "Payment Entry": - tax_withholding_net_total = inv.get("base_tax_withholding_net_total", 0) - else: - tax_withholding_net_total = inv.get("tax_withholding_net_total", 0) + # if consider_party_ledger_amount is checked, then threshold will be based on grand total + amt_for_threshold = pi_grand_total if consider_party_ledger_amount else pi_base_taxable_net_total has_cumulative_threshold_breached = ( - cumulative_threshold and (supp_credit_amt + supp_inv_credit_amt) >= cumulative_threshold + cumulative_threshold and (supp_credit_amt + amt_for_threshold) >= cumulative_threshold ) if (threshold and tax_withholding_net_total >= threshold) or (has_cumulative_threshold_breached): - # Get net total again as TDS is calculated on net total - # Grand is used to just check for threshold breach - net_total = ( - frappe.db.get_value("Purchase Invoice", invoice_filters, "sum(tax_withholding_net_total)") or 0.0 - ) - supp_credit_amt += net_total + supp_credit_amt += pi_base_taxable_net_total if has_cumulative_threshold_breached and cint(tax_details.tax_on_excess_amount): - supp_credit_amt = net_total + tax_withholding_net_total - cumulative_threshold + supp_credit_amt = pi_base_taxable_net_total + tax_withholding_net_total - cumulative_threshold if ldc and is_valid_certificate(ldc, inv.get("posting_date") or inv.get("transaction_date"), 0): tds_amount = get_lower_deduction_amount( diff --git a/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py b/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py index f2ebfc60cd7..c4ab2f94581 100644 --- a/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py +++ b/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py @@ -569,6 +569,15 @@ class TestTaxWithholdingCategory(FrappeTestCase): pi1.submit() invoices.append(pi1) + pe = create_payment_entry( + payment_type="Pay", party_type="Supplier", party="Test TDS Supplier6", paid_amount=1000 + ) + pe.apply_tax_withholding_amount = 1 + pe.tax_withholding_category = "Test Multi Invoice Category" + pe.save() + pe.submit() + invoices.append(pe) + pi2 = create_purchase_invoice(supplier="Test TDS Supplier6", rate=9000, do_not_save=True) pi2.apply_tds = 1 pi2.tax_withholding_category = "Test Multi Invoice Category" @@ -584,6 +593,8 @@ class TestTaxWithholdingCategory(FrappeTestCase): self.assertTrue(pi2.tax_withheld_vouchers[0].taxable_amount == pi1.net_total) self.assertTrue(pi2.tax_withheld_vouchers[1].voucher_name == pi.name) self.assertTrue(pi2.tax_withheld_vouchers[1].taxable_amount == pi.net_total) + self.assertTrue(pi2.tax_withheld_vouchers[2].voucher_name == pe.name) + self.assertTrue(pi2.tax_withheld_vouchers[2].taxable_amount == pe.paid_amount) # cancel invoices to avoid clashing for d in reversed(invoices): From 8f73978a26c05357bd596db61d93013a4d9dfc63 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Sat, 25 Jan 2025 13:16:06 +0530 Subject: [PATCH 1023/1614] fix: variable names (cherry picked from commit d97e78e5d3523f8d7689f179595ccd279836638c) --- .../tax_withholding_category.py | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py index 9987ff5e031..3215b93a496 100644 --- a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py +++ b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py @@ -532,17 +532,17 @@ def get_tds_amount(ldc, parties, inv, tax_details, voucher_wise_amount): tds_amount = 0 pi_grand_total = 0 - pi_base_taxable_net_total = 0 - jv_credit_emt = 0 + pi_base_net_total = 0 + jv_credit_amt = 0 pe_credit_amt = 0 for row in voucher_wise_amount: if row.voucher_type == "Purchase Invoice": pi_grand_total += row.get("grand_total", 0) - pi_base_taxable_net_total += row.get("taxable_amount", 0) + pi_base_net_total += row.get("taxable_amount", 0) if row.voucher_type == "Journal Entry" and row.reference_type != "Purchase Invoice": - jv_credit_emt += row.get("taxable_amount", 0) + jv_credit_amt += row.get("taxable_amount", 0) ## for TDS to be deducted on advances pe_filters = { @@ -556,9 +556,9 @@ def get_tds_amount(ldc, parties, inv, tax_details, voucher_wise_amount): "company": inv.company, } - consider_party_ledger_amount = cint(tax_details.consider_party_ledger_amount) + consider_party_ledger_amt = cint(tax_details.consider_party_ledger_amount) - if consider_party_ledger_amount: + if consider_party_ledger_amt: pe_filters.pop("apply_tax_withholding_amount", None) pe_filters.pop("tax_withholding_category", None) @@ -584,21 +584,21 @@ def get_tds_amount(ldc, parties, inv, tax_details, voucher_wise_amount): threshold = tax_details.get("threshold", 0) cumulative_threshold = tax_details.get("cumulative_threshold", 0) - supp_credit_amt = jv_credit_emt + pe_credit_amt + inv.get("tax_withholding_net_total", 0) + supp_credit_amt = jv_credit_amt + pe_credit_amt + inv.get("tax_withholding_net_total", 0) tax_withholding_net_total = inv.get("base_tax_withholding_net_total", 0) # if consider_party_ledger_amount is checked, then threshold will be based on grand total - amt_for_threshold = pi_grand_total if consider_party_ledger_amount else pi_base_taxable_net_total + amt_for_threshold = pi_grand_total if consider_party_ledger_amt else pi_base_net_total - has_cumulative_threshold_breached = ( + cumulative_threshold_breached = ( cumulative_threshold and (supp_credit_amt + amt_for_threshold) >= cumulative_threshold ) - if (threshold and tax_withholding_net_total >= threshold) or (has_cumulative_threshold_breached): - supp_credit_amt += pi_base_taxable_net_total + if (threshold and tax_withholding_net_total >= threshold) or (cumulative_threshold_breached): + supp_credit_amt += pi_base_net_total - if has_cumulative_threshold_breached and cint(tax_details.tax_on_excess_amount): - supp_credit_amt = pi_base_taxable_net_total + tax_withholding_net_total - cumulative_threshold + if cumulative_threshold_breached and cint(tax_details.tax_on_excess_amount): + supp_credit_amt = pi_base_net_total + tax_withholding_net_total - cumulative_threshold if ldc and is_valid_certificate(ldc, inv.get("posting_date") or inv.get("transaction_date"), 0): tds_amount = get_lower_deduction_amount( From ef2f4118d953276a8a33b7dc545ff9d89ed86548 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 29 Jan 2025 15:39:30 +0530 Subject: [PATCH 1024/1614] fix: get stock balance filtered by company for validating stock value in jv (backport #45549) (#45578) * fix: get stock balance filtered by company for validating stock value in jv (#45549) * fix: get stock balance filtered by company for validating stock value in jv * test: error is raised on validate (cherry picked from commit 9f20854bd9da74412cb220ce2caa2e246b9cf169) * fix: correct args for test case function --------- Co-authored-by: Lakshit Jain <108322669+ljain112@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: ljain112 --- .../accounts/doctype/journal_entry/test_journal_entry.py | 3 +-- .../doctype/payment_request/test_payment_request.py | 6 ++---- erpnext/accounts/utils.py | 2 +- erpnext/stock/utils.py | 8 +++++++- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/erpnext/accounts/doctype/journal_entry/test_journal_entry.py b/erpnext/accounts/doctype/journal_entry/test_journal_entry.py index 8f4c4e3ccda..54aa3eaf96f 100644 --- a/erpnext/accounts/doctype/journal_entry/test_journal_entry.py +++ b/erpnext/accounts/doctype/journal_entry/test_journal_entry.py @@ -146,10 +146,9 @@ class TestJournalEntry(unittest.TestCase): "credit_in_account_currency": 0 if diff > 0 else abs(diff), }, ) - jv.insert() if account_bal == stock_bal: - self.assertRaises(StockAccountInvalidTransaction, jv.submit) + self.assertRaises(StockAccountInvalidTransaction, jv.save) frappe.db.rollback() else: jv.submit() diff --git a/erpnext/accounts/doctype/payment_request/test_payment_request.py b/erpnext/accounts/doctype/payment_request/test_payment_request.py index eadb714baa3..ed940470d6c 100644 --- a/erpnext/accounts/doctype/payment_request/test_payment_request.py +++ b/erpnext/accounts/doctype/payment_request/test_payment_request.py @@ -83,8 +83,7 @@ class TestPaymentRequest(FrappeTestCase): def test_payment_entry_against_purchase_invoice(self): si_usd = make_purchase_invoice( - customer="_Test Supplier USD", - debit_to="_Test Payable USD - _TC", + supplier="_Test Supplier USD", currency="USD", conversion_rate=50, ) @@ -108,8 +107,7 @@ class TestPaymentRequest(FrappeTestCase): def test_multiple_payment_entry_against_purchase_invoice(self): purchase_invoice = make_purchase_invoice( - customer="_Test Supplier USD", - debit_to="_Test Payable USD - _TC", + supplier="_Test Supplier USD", currency="USD", conversion_rate=50, ) diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py index a7f8581e0f8..b3c82e84192 100644 --- a/erpnext/accounts/utils.py +++ b/erpnext/accounts/utils.py @@ -1644,7 +1644,7 @@ def get_stock_and_account_balance(account=None, posting_date=None, company=None) if wh_details.account == account and not wh_details.is_group ] - total_stock_value = get_stock_value_on(related_warehouses, posting_date) + total_stock_value = get_stock_value_on(related_warehouses, posting_date, company=company) precision = frappe.get_precision("Journal Entry Account", "debit_in_account_currency") return flt(account_balance, precision), flt(total_stock_value, precision), related_warehouses diff --git a/erpnext/stock/utils.py b/erpnext/stock/utils.py index ee5893eb826..6369562a62d 100644 --- a/erpnext/stock/utils.py +++ b/erpnext/stock/utils.py @@ -58,7 +58,10 @@ def get_stock_value_from_bin(warehouse=None, item_code=None): def get_stock_value_on( - warehouses: list | str | None = None, posting_date: str | None = None, item_code: str | None = None + warehouses: list | str | None = None, + posting_date: str | None = None, + item_code: str | None = None, + company: str | None = None, ) -> float: if not posting_date: posting_date = nowdate() @@ -84,6 +87,9 @@ def get_stock_value_on( if item_code: query = query.where(sle.item_code == item_code) + if company: + query = query.where(sle.company == company) + return query.run(as_list=True)[0][0] From 2d2f30e6cf4aacabe46f827f66dd67f0e6dfd1b6 Mon Sep 17 00:00:00 2001 From: Safvan Huzain <92985225+safvanhuzain@users.noreply.github.com> Date: Wed, 29 Jan 2025 15:57:01 +0530 Subject: [PATCH 1025/1614] fix(query): remove duplicate docstatus condition (#45586) fix: remove duplicate docstatus condition in query (cherry picked from commit 3f2e93dcb682666036f458e3fea05804233bcbc3) --- .../doctype/bank_reconciliation_tool/bank_reconciliation_tool.py | 1 - 1 file changed, 1 deletion(-) 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 62a4c74a933..9de1b4216ce 100644 --- a/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py +++ b/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py @@ -802,7 +802,6 @@ def get_je_matching_query( .where(je.clearance_date.isnull()) .where(jea.account == common_filters.bank_account) .where(amount_equality if exact_match else getattr(jea, amount_field) > 0.0) - .where(je.docstatus == 1) .where(filter_by_date) .orderby(je.cheque_date if cint(filter_by_reference_date) else je.posting_date) ) From e3855949e14d445fe6becfd2dae91fff9309ba42 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Tue, 28 Jan 2025 17:54:16 +0530 Subject: [PATCH 1026/1614] fix: update voucher outstanding from payment ledger (cherry picked from commit dd7707035148b4d8a2d36c57f0f5dbc476707734) --- .../purchase_invoice/purchase_invoice.py | 15 ++++++------- .../doctype/sales_invoice/sales_invoice.py | 22 +++++++++++-------- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index 3d3481c053d..3ab214751f7 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -10,7 +10,6 @@ from frappe.utils import cint, cstr, flt, formatdate, get_link_to_form, getdate, import erpnext from erpnext.accounts.deferred_revenue import validate_service_stop_date -from erpnext.accounts.doctype.gl_entry.gl_entry import update_outstanding_amt from erpnext.accounts.doctype.repost_accounting_ledger.repost_accounting_ledger import ( validate_docs_for_deferred_accounting, validate_docs_for_voucher_types, @@ -33,7 +32,7 @@ from erpnext.accounts.general_ledger import ( merge_similar_entries, ) from erpnext.accounts.party import get_due_date, get_party_account -from erpnext.accounts.utils import get_account_currency, get_fiscal_year +from erpnext.accounts.utils import get_account_currency, get_fiscal_year, update_voucher_outstanding from erpnext.assets.doctype.asset.asset import is_cwip_accounting_enabled from erpnext.assets.doctype.asset_category.asset_category import get_asset_category_account from erpnext.buying.utils import check_on_hold_or_closed_status @@ -838,12 +837,12 @@ class PurchaseInvoice(BuyingController): def update_supplier_outstanding(self, update_outstanding): if update_outstanding == "No": - update_outstanding_amt( - self.credit_to, - "Supplier", - self.supplier, - self.doctype, - self.return_against if cint(self.is_return) and self.return_against else self.name, + update_voucher_outstanding( + voucher_type=self.doctype, + voucher_no=self.return_against if cint(self.is_return) and self.return_against else self.name, + account=self.credit_to, + party_type="Supplier", + party=self.supplier, ) def get_gl_entries(self, warehouse_account=None): diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 6e039b4b34f..5753eba8cc1 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -24,7 +24,11 @@ from erpnext.accounts.doctype.tax_withholding_category.tax_withholding_category ) from erpnext.accounts.general_ledger import get_round_off_account_and_cost_center from erpnext.accounts.party import get_due_date, get_party_account, get_party_details -from erpnext.accounts.utils import cancel_exchange_gain_loss_journal, get_account_currency +from erpnext.accounts.utils import ( + cancel_exchange_gain_loss_journal, + get_account_currency, + update_voucher_outstanding, +) from erpnext.assets.doctype.asset.depreciation import ( depreciate_asset, get_disposal_account_and_cost_center, @@ -1192,14 +1196,14 @@ class SalesInvoice(SellingController): make_reverse_gl_entries(voucher_type=self.doctype, voucher_no=self.name) if update_outstanding == "No": - from erpnext.accounts.doctype.gl_entry.gl_entry import update_outstanding_amt - - update_outstanding_amt( - self.debit_to, - "Customer", - self.customer, - self.doctype, - self.return_against if cint(self.is_return) and self.return_against else self.name, + update_voucher_outstanding( + voucher_type=self.doctype, + voucher_no=self.return_against + if cint(self.is_return) and self.return_against + else self.name, + account=self.debit_to, + party_type="Customer", + party=self.customer, ) elif self.docstatus == 2 and cint(self.update_stock) and cint(auto_accounting_for_stock): From 2b16eb53810b3a0944ae02cbec80913f036ef16a Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Wed, 29 Jan 2025 16:36:17 +0530 Subject: [PATCH 1027/1614] fix: do not allow to manually submit the SABB --- .../serial_and_batch_bundle/serial_and_batch_bundle.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.js b/erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.js index 21f0784df75..b35b3aa0f19 100644 --- a/erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.js +++ b/erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.js @@ -6,6 +6,10 @@ frappe.ui.form.on("Serial and Batch Bundle", { frm.trigger("set_queries"); }, + before_submit(frm) { + frappe.throw(__("User cannot submitted the Serial and Batch Bundle manually")); + }, + refresh(frm) { frm.trigger("toggle_fields"); frm.trigger("prepare_serial_batch_prompt"); From c5cd0fcd29138ca5736fdde938a36e3528c9fda5 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Wed, 29 Jan 2025 11:28:47 +0000 Subject: [PATCH 1028/1614] chore(release): Bumped to Version 15.50.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # [15.50.0](https://github.com/frappe/erpnext/compare/v15.49.3...v15.50.0) (2025-01-29) ### Bug Fixes * add condition to check if item is delivered by supplier in make_purchase_order_for_default_supplier() (backport [#45370](https://github.com/frappe/erpnext/issues/45370)) ([#45410](https://github.com/frappe/erpnext/issues/45410)) ([5d7d3d8](https://github.com/frappe/erpnext/commit/5d7d3d8c19ca79480dfdf42dbe510476d0a7f821)) * add multiple item issue in stock entry (backport [#45544](https://github.com/frappe/erpnext/issues/45544)) ([#45580](https://github.com/frappe/erpnext/issues/45580)) ([8b0efab](https://github.com/frappe/erpnext/commit/8b0efab13ede54d8b5ffd9451108c77f09aff269)) * added debounce to prevent multiple clicks (backport [#45369](https://github.com/frappe/erpnext/issues/45369)) ([#45376](https://github.com/frappe/erpnext/issues/45376)) ([bdc65da](https://github.com/frappe/erpnext/commit/bdc65daaddf38d24a7c6860edf4b3b9390a26e45)) * added item_group filter in item_code field in stock balance report (backport [#45340](https://github.com/frappe/erpnext/issues/45340)) ([#45389](https://github.com/frappe/erpnext/issues/45389)) ([412e22f](https://github.com/frappe/erpnext/commit/412e22fb4e6c0c6a61af4d568d26d50880541b5c)) * allow to fix negative stock for batch using stock reco ([69c5695](https://github.com/frappe/erpnext/commit/69c5695f6efce54776a7d2e6af11aef54ca595af)) * batch qty calculation (backport [#45367](https://github.com/frappe/erpnext/issues/45367)) ([#45388](https://github.com/frappe/erpnext/issues/45388)) ([767529f](https://github.com/frappe/erpnext/commit/767529f0ec4d982e2eaba40de00b39234c400fda)) * Correct Party Bank Account mapping in `Payment Entry` ([4a390ae](https://github.com/frappe/erpnext/commit/4a390ae3de91f4f7c8d7e5a76eee2a804d0b59c6)) * currency decimal on POS Past Order List (backport [#45524](https://github.com/frappe/erpnext/issues/45524)) ([#45527](https://github.com/frappe/erpnext/issues/45527)) ([ff46ae5](https://github.com/frappe/erpnext/commit/ff46ae5bc1af5c28aaafe9213ac6795e0d0d8892)) * disable load_after_mapping when purchase order created from sales order (backport [#45405](https://github.com/frappe/erpnext/issues/45405)) ([#45429](https://github.com/frappe/erpnext/issues/45429)) ([ae5ce97](https://github.com/frappe/erpnext/commit/ae5ce97fd0c18e374cdc970e58c57c3c213faa9a)) * Do no query GLs if no PCVs are posted ([ad06652](https://github.com/frappe/erpnext/commit/ad06652ed5fd28737df459be4a152b3aff89f230)) * do not allow to manually submit the SABB ([2b16eb5](https://github.com/frappe/erpnext/commit/2b16eb53810b3a0944ae02cbec80913f036ef16a)) * do not check budget during reposting ([#45432](https://github.com/frappe/erpnext/issues/45432)) ([f2b946d](https://github.com/frappe/erpnext/commit/f2b946d3250120b1c00557bca54ca199389def53)) * don't update party-type on change of cost center in Journal Entry ([#45291](https://github.com/frappe/erpnext/issues/45291)) ([fb75180](https://github.com/frappe/erpnext/commit/fb75180a7da1795ea81ed4b73fe8b467b79aa439)) * existing logical error ([6c4655d](https://github.com/frappe/erpnext/commit/6c4655dd72dc304d07b2b23a26e7f61eb1ff00b9)) * fix creating documents from sales invoice (backport [#45346](https://github.com/frappe/erpnext/issues/45346)) ([#45408](https://github.com/frappe/erpnext/issues/45408)) ([73a21c2](https://github.com/frappe/erpnext/commit/73a21c294c6917ca59232fc5671e32c5f16aaceb)) * get stock balance filtered by company for validating stock value in jv (backport [#45549](https://github.com/frappe/erpnext/issues/45549)) ([#45578](https://github.com/frappe/erpnext/issues/45578)) ([ef2f411](https://github.com/frappe/erpnext/commit/ef2f4118d953276a8a33b7dc545ff9d89ed86548)) * import ([d74c498](https://github.com/frappe/erpnext/commit/d74c498efecbe3ff80d20782192f046be68c36d5)) * import 2 ([b59d253](https://github.com/frappe/erpnext/commit/b59d253d93fa521994c22c81600e7e7e9c8ee6ff)) * JobCardTimeLog' object has no attribute 'remaining_time_in_mins' ([ef15429](https://github.com/frappe/erpnext/commit/ef15429d98a615d745542b485ee010797a1c800c)) * logical error in where condition of qb query ([c102e51](https://github.com/frappe/erpnext/commit/c102e51eb18748b60f5793b23bd6dfd35b66835b)) * **material request:** mapping Sales Order Item Delivery Date to Mate… (backport [#45227](https://github.com/frappe/erpnext/issues/45227)) ([#45424](https://github.com/frappe/erpnext/issues/45424)) ([52fdc7c](https://github.com/frappe/erpnext/commit/52fdc7cecd96aa9fc74d33240fccb3cb7580b03a)) * merge conflict ([57f79a2](https://github.com/frappe/erpnext/commit/57f79a22401ec1ffadb8ae4a7dddea5236e213db)) * **payment entry:** get amount in transaction currency ([b37602c](https://github.com/frappe/erpnext/commit/b37602c716b6bad3ae3485f5a578e7c0a0e78c38)) * postal_code_move_and_fixes ([0e088dd](https://github.com/frappe/erpnext/commit/0e088dde36b2ccb2fdd17b2e2f5a76ca9f9170a1)) * precision issue causing incorrect status ([46a2b7a](https://github.com/frappe/erpnext/commit/46a2b7a07e5326ad5fde89d030460a5e9f2b67b0)) * precision issue in stock entry ([fe5e42d](https://github.com/frappe/erpnext/commit/fe5e42d2dc9a3570635bb75876ea8172862dae60)) * **query:** remove duplicate docstatus condition ([#45586](https://github.com/frappe/erpnext/issues/45586)) ([2d2f30e](https://github.com/frappe/erpnext/commit/2d2f30e6cf4aacabe46f827f66dd67f0e6dfd1b6)) * remove applied pricing rule ([4e347d8](https://github.com/frappe/erpnext/commit/4e347d835e86c644dfd2a0a6b955f0b4aa8e4713)) * remove unnecessary auth from plaid connector (backport [#44305](https://github.com/frappe/erpnext/issues/44305)) ([#45421](https://github.com/frappe/erpnext/issues/45421)) ([d9b342f](https://github.com/frappe/erpnext/commit/d9b342f2579fbca48070b99c9b1b91fa197a2c28)) * removed field not present in v15 ([1be1981](https://github.com/frappe/erpnext/commit/1be19819fbc79482004e53c15567ef3ae38b4966)) * resolved pos return setting to default mode of payment instead of user selection (backport [#45377](https://github.com/frappe/erpnext/issues/45377)) ([#45419](https://github.com/frappe/erpnext/issues/45419)) ([224a925](https://github.com/frappe/erpnext/commit/224a92587d3bb74a05e5d1e66f3657b46d979f5a)) * return qty error due to precision (backport [#45536](https://github.com/frappe/erpnext/issues/45536)) ([#45581](https://github.com/frappe/erpnext/issues/45581)) ([a2ffdc7](https://github.com/frappe/erpnext/commit/a2ffdc78054d70c2daa7f8d00a712b8a328002c2)) * secure bulk transaction (backport [#45386](https://github.com/frappe/erpnext/issues/45386)) ([#45426](https://github.com/frappe/erpnext/issues/45426)) ([f9d9672](https://github.com/frappe/erpnext/commit/f9d96726f06fe246f84e4ea7647e2e0eec733240)) * set company related values ([1498275](https://github.com/frappe/erpnext/commit/149827562be1957a28cf13d303fed1d0362f41b1)) * set expense_account and cost_center based on company in stock entry (backport [#45159](https://github.com/frappe/erpnext/issues/45159)) ([#45416](https://github.com/frappe/erpnext/issues/45416)) ([3eb28bb](https://github.com/frappe/erpnext/commit/3eb28bb0e094063405d718f1cd91ab719bd22f60)) * set party_account_currency for pos_invoice returns ([172fdad](https://github.com/frappe/erpnext/commit/172fdad24457fca4c5cec4a64e125213db4ff7db)) * set preferred email in Employee via backend controller (backport [#45320](https://github.com/frappe/erpnext/issues/45320)) ([#45379](https://github.com/frappe/erpnext/issues/45379)) ([f8099a6](https://github.com/frappe/erpnext/commit/f8099a6847f2b08423401a9e2da35e578f178891)) * Set right party name in bank transaction ([86f4bf6](https://github.com/frappe/erpnext/commit/86f4bf6e0166f3049a21d5b23765aab82e562cbb)) * show payment entries in Tax Withheld Vouchers ([28bb9c3](https://github.com/frappe/erpnext/commit/28bb9c39e823560426cb8a727da03409ea9e7146)) * System was allowing to save payment schedule amount less than grand total (backport [#45322](https://github.com/frappe/erpnext/issues/45322)) ([#45381](https://github.com/frappe/erpnext/issues/45381)) ([2403cdc](https://github.com/frappe/erpnext/commit/2403cdc4d7ed51f48452197942742020b688cc00)) * update fields on change of item code In `Update Items` of `Sales Order` ([#45125](https://github.com/frappe/erpnext/issues/45125)) ([f60a3bc](https://github.com/frappe/erpnext/commit/f60a3bcedfe48d84a9773f504a99cd50c83a0b76)) * update voucher outstanding from payment ledger ([e385594](https://github.com/frappe/erpnext/commit/e3855949e14d445fe6becfd2dae91fff9309ba42)) * Use `process.extract` to get the corresponding party doc name of the result ([153e961](https://github.com/frappe/erpnext/commit/153e961df75a9766512c1b9fc70c502be0df6986)) * use frappe.datetime.str_to_user (backport [#45216](https://github.com/frappe/erpnext/issues/45216)) ([#45417](https://github.com/frappe/erpnext/issues/45417)) ([6c10393](https://github.com/frappe/erpnext/commit/6c1039316403b0095d96a64c3d53009fb358242a)) * use user defined discount amount or default ([e73aab0](https://github.com/frappe/erpnext/commit/e73aab0df548916551750c4371f18770b0c7c204)) * validate items against selling settings (backport [#45288](https://github.com/frappe/erpnext/issues/45288)) ([#45431](https://github.com/frappe/erpnext/issues/45431)) ([7ff7ec7](https://github.com/frappe/erpnext/commit/7ff7ec792928ed3a76eda8c62adb2d121e4ff4de)) * validate non-stock item for exchange loss/gain (backport [#45306](https://github.com/frappe/erpnext/issues/45306)) ([#45380](https://github.com/frappe/erpnext/issues/45380)) ([4e367de](https://github.com/frappe/erpnext/commit/4e367dedec0babd38072338d084beb0d14906976)) * valuation for batch (backport [#45335](https://github.com/frappe/erpnext/issues/45335)) ([#45420](https://github.com/frappe/erpnext/issues/45420)) ([dec0cae](https://github.com/frappe/erpnext/commit/dec0caeac56453a63fbc8e24f76e33e1fec56eb6)) * variable names ([8f73978](https://github.com/frappe/erpnext/commit/8f73978a26c05357bd596db61d93013a4d9dfc63)) * Wrong `bank_ac_no` filter + simplify convoluted logic ([60feb7c](https://github.com/frappe/erpnext/commit/60feb7cbd42090235bb3f1ad61aa86eeddcc97eb)) ### Features * Add chart of accounts for Switzerland ([de43c12](https://github.com/frappe/erpnext/commit/de43c123e206085545b4c075882b6839c225962e)) * add company level validation for accounting dimension ([8f0d270](https://github.com/frappe/erpnext/commit/8f0d270746f1137cf464ea3ec53eee3aa5835cb1)) * Add corrective job card operating cost as additional costs in stock entry ([efc7b9a](https://github.com/frappe/erpnext/commit/efc7b9ac56545d236d3069a8911acd1216036b96)) * full screen on pos (backport [#45404](https://github.com/frappe/erpnext/issues/45404)) ([#45418](https://github.com/frappe/erpnext/issues/45418)) ([aca8d66](https://github.com/frappe/erpnext/commit/aca8d663dd98c9ad5d377afcd9f62c8b0b324144)) * pos configuration for print receipt on complete order ([#45392](https://github.com/frappe/erpnext/issues/45392)) ([b9b4f63](https://github.com/frappe/erpnext/commit/b9b4f6316d5a75c764b8b02aa75dcabba8450051)) * **Sales Invoice:** allow linking to project without adding timesheets (backport [#44295](https://github.com/frappe/erpnext/issues/44295)) ([#45528](https://github.com/frappe/erpnext/issues/45528)) ([2c2a25a](https://github.com/frappe/erpnext/commit/2c2a25ab16f5b53ddf17dc23abff6e9ab14f1e4d)) * **translations:** add Bengali translations for signature and client details ([4952733](https://github.com/frappe/erpnext/commit/495273365be3bd3085a3384ce5e00f913711e8f4)) * **UX:** scroll to required field (backport [#44367](https://github.com/frappe/erpnext/issues/44367)) ([#45433](https://github.com/frappe/erpnext/issues/45433)) ([692a448](https://github.com/frappe/erpnext/commit/692a44816f698d80239d2d97cb06d073547dc045)) ### Performance Improvements * optimize DB calls with frappe.get_all (backport [#45289](https://github.com/frappe/erpnext/issues/45289)) ([#45391](https://github.com/frappe/erpnext/issues/45391)) ([04f5a72](https://github.com/frappe/erpnext/commit/04f5a72e0847f66da120e0f81fd2aefc7eac94cf)) ### Reverts * Revert "feat(Sales Invoice): allow linking to project without adding timesheets (backport [#44295](https://github.com/frappe/erpnext/issues/44295))" ([#45531](https://github.com/frappe/erpnext/issues/45531)) ([b004855](https://github.com/frappe/erpnext/commit/b004855e7cfe522cf138f803ca46840f5f018b60)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 561b8009e72..dfdeee49bc9 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.49.3" +__version__ = "15.50.0" def get_default_company(user=None): From 47422111b4fcbca792665e0a3d722e00e3d3cf49 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Wed, 29 Jan 2025 20:36:58 +0530 Subject: [PATCH 1029/1614] fix: validation message (cherry picked from commit 4c8dff942d13971dfac87b9b6a52b866382f5a83) --- .../doctype/serial_and_batch_bundle/serial_and_batch_bundle.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.js b/erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.js index b35b3aa0f19..ad8360ea75c 100644 --- a/erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.js +++ b/erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.js @@ -7,7 +7,7 @@ frappe.ui.form.on("Serial and Batch Bundle", { }, before_submit(frm) { - frappe.throw(__("User cannot submitted the Serial and Batch Bundle manually")); + frappe.throw(__("The user cannot submit the Serial and Batch Bundle manually")); }, refresh(frm) { From 8b75401db9bd58049c817964771874b7909e6efa Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 30 Jan 2025 11:21:20 +0530 Subject: [PATCH 1030/1614] perf: stock entry with batch (backport #45486) (#45602) perf: stock entry with batch (cherry picked from commit 0b1b964b773260ec94583971578f41c1e2a9b471) Co-authored-by: Rohit Waghchaure --- .../test_pos_closing_entry.py | 6 -- erpnext/controllers/stock_controller.py | 2 + erpnext/stock/doctype/batch/batch.py | 10 ++- .../serial_and_batch_bundle.py | 22 +----- erpnext/stock/serial_batch_bundle.py | 73 +++++++++++++------ 5 files changed, 63 insertions(+), 50 deletions(-) diff --git a/erpnext/accounts/doctype/pos_closing_entry/test_pos_closing_entry.py b/erpnext/accounts/doctype/pos_closing_entry/test_pos_closing_entry.py index e2084e89c43..5dd6259c585 100644 --- a/erpnext/accounts/doctype/pos_closing_entry/test_pos_closing_entry.py +++ b/erpnext/accounts/doctype/pos_closing_entry/test_pos_closing_entry.py @@ -224,9 +224,6 @@ class TestPOSClosingEntry(unittest.TestCase): item_code=item_code, qty=5, rate=300, use_serial_batch_fields=1, batch_no=batch_no ) - batch_qty = frappe.db.get_value("Batch", batch_no, "batch_qty") - self.assertEqual(batch_qty, 10) - batch_qty_with_pos = get_batch_qty(batch_no, "_Test Warehouse - _TC", item_code) self.assertEqual(batch_qty_with_pos, 0.0) @@ -256,9 +253,6 @@ class TestPOSClosingEntry(unittest.TestCase): pcv_doc.reload() pcv_doc.cancel() - batch_qty = frappe.db.get_value("Batch", batch_no, "batch_qty") - self.assertEqual(batch_qty, 10) - batch_qty_with_pos = get_batch_qty(batch_no, "_Test Warehouse - _TC", item_code) self.assertEqual(batch_qty_with_pos, 0.0) diff --git a/erpnext/controllers/stock_controller.py b/erpnext/controllers/stock_controller.py index 970dc348057..978550fdb4b 100644 --- a/erpnext/controllers/stock_controller.py +++ b/erpnext/controllers/stock_controller.py @@ -921,9 +921,11 @@ class StockController(AccountsController): row.db_set(dimension.source_fieldname, sl_dict[dimension.target_fieldname]) def make_sl_entries(self, sl_entries, allow_negative_stock=False, via_landed_cost_voucher=False): + from erpnext.stock.serial_batch_bundle import update_batch_qty from erpnext.stock.stock_ledger import make_sl_entries make_sl_entries(sl_entries, allow_negative_stock, via_landed_cost_voucher) + update_batch_qty(self.doctype, self.name, via_landed_cost_voucher=via_landed_cost_voucher) def make_gl_entries_on_cancel(self): cancel_exchange_gain_loss_journal(frappe._dict(doctype=self.doctype, name=self.name)) diff --git a/erpnext/stock/doctype/batch/batch.py b/erpnext/stock/doctype/batch/batch.py index 1e1e6c8ee26..ae77672b730 100644 --- a/erpnext/stock/doctype/batch/batch.py +++ b/erpnext/stock/doctype/batch/batch.py @@ -455,10 +455,14 @@ def get_available_batches(kwargs): batches = get_auto_batch_nos(kwargs) for batch in batches: - if batch.get("batch_no") not in batchwise_qty: - batchwise_qty[batch.get("batch_no")] = batch.get("qty") + key = batch.get("batch_no") + if kwargs.get("based_on_warehouse"): + key = (batch.get("batch_no"), batch.get("warehouse")) + + if key not in batchwise_qty: + batchwise_qty[key] = batch.get("qty") else: - batchwise_qty[batch.get("batch_no")] += batch.get("qty") + batchwise_qty[key] += batch.get("qty") return batchwise_qty 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 21e08ac93b2..1bc81aea0c5 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 @@ -101,7 +101,10 @@ class SerialandBatchBundle(Document): self.set_is_outward() self.calculate_total_qty() self.set_warehouse() - self.set_incoming_rate() + + if self.voucher_type != "Stock Entry" or not self.voucher_no or self.docstatus == 1: + self.set_incoming_rate() + self.calculate_qty_and_amount() def allow_existing_serial_nos(self): @@ -1026,7 +1029,6 @@ class SerialandBatchBundle(Document): self.set_purchase_document_no() def on_submit(self): - self.validate_batch_inventory() self.validate_serial_nos_inventory() def set_purchase_document_no(self): @@ -1053,25 +1055,9 @@ class SerialandBatchBundle(Document): self.validate_batch_inventory() def validate_batch_inventory(self): - if ( - self.voucher_type in ["Purchase Invoice", "Purchase Receipt"] - and frappe.db.get_value(self.voucher_type, self.voucher_no, "docstatus") == 1 - ): - return - - if self.voucher_type in ["Sales Invoice", "Delivery Note"] and self.type_of_transaction == "Inward": - return - if not self.has_batch_no: return - if ( - self.voucher_type == "Stock Reconciliation" - and self.type_of_transaction == "Outward" - and frappe.db.get_value("Stock Reconciliation Item", self.voucher_detail_no, "qty") > 0 - ): - return - batches = [d.batch_no for d in self.entries if d.batch_no] if not batches: return diff --git a/erpnext/stock/serial_batch_bundle.py b/erpnext/stock/serial_batch_bundle.py index f4d862b583c..c6089284bee 100644 --- a/erpnext/stock/serial_batch_bundle.py +++ b/erpnext/stock/serial_batch_bundle.py @@ -302,9 +302,6 @@ class SerialBatchBundle: ): self.set_batch_no_in_serial_nos() - if self.item_details.has_batch_no == 1: - self.update_batch_qty() - if self.sle.is_cancelled and self.sle.serial_and_batch_bundle: self.cancel_serial_and_batch_bundle() @@ -410,26 +407,6 @@ class SerialBatchBundle: .where(sn_table.name.isin(serial_nos)) ).run() - def update_batch_qty(self): - from erpnext.stock.doctype.batch.batch import get_available_batches - - batches = get_batch_nos(self.sle.serial_and_batch_bundle) - if not self.sle.serial_and_batch_bundle and self.sle.batch_no: - batches = frappe._dict({self.sle.batch_no: self.sle.actual_qty}) - - batches_qty = get_available_batches( - frappe._dict( - { - "item_code": self.item_code, - "batch_no": list(batches.keys()), - "consider_negative_batches": 1, - } - ) - ) - - for batch_no in batches: - frappe.db.set_value("Batch", batch_no, "batch_qty", batches_qty.get(batch_no, 0)) - def get_serial_nos(serial_and_batch_bundle, serial_nos=None): if not serial_and_batch_bundle: @@ -1258,3 +1235,53 @@ def get_serial_nos_batch(serial_nos): as_list=1, ) ) + + +def update_batch_qty(voucher_type, voucher_no, via_landed_cost_voucher=False): + from erpnext.stock.doctype.batch.batch import get_available_batches + + batches = get_distinct_batches(voucher_type, voucher_no) + if not batches: + return + + precision = frappe.get_precision("Batch", "batch_qty") + batch_data = get_available_batches( + frappe._dict({"batch_no": batches, "consider_negative_batches": 1, "based_on_warehouse": True}) + ) + batchwise_qty = defaultdict(float) + + for (batch_no, warehouse), qty in batch_data.items(): + if not via_landed_cost_voucher and flt(qty, precision) < 0: + throw_negative_batch_validation(batch_no, warehouse, qty) + + batchwise_qty[batch_no] += qty + + for batch_no in batches: + qty = flt(batchwise_qty.get(batch_no, 0), precision) + frappe.db.set_value("Batch", batch_no, "batch_qty", qty) + + +def throw_negative_batch_validation(batch_no, warehouse, qty): + frappe.throw( + _("The Batch {0} has negative quantity {1} in warehouse {2}. Please correct the quantity.").format( + bold(batch_no), bold(qty), bold(warehouse) + ), + title=_("Negative Batch Quantity"), + ) + + +def get_distinct_batches(voucher_type, voucher_no): + bundles = frappe.get_all( + "Serial and Batch Bundle", + filters={"voucher_no": voucher_no, "voucher_type": voucher_type}, + pluck="name", + ) + if not bundles: + return + + return frappe.get_all( + "Serial and Batch Entry", + filters={"parent": ("in", bundles), "batch_no": ("is", "set")}, + group_by="batch_no", + pluck="batch_no", + ) From 6301b321d894db91df3efb51b6cb8f52d7eafb04 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 30 Jan 2025 11:21:52 +0530 Subject: [PATCH 1031/1614] fix: Gross Profit Report with Correct Totals and Gross Margin (backport #45548) (#45598) fix: Gross Profit Report with Correct Totals and Gross Margin (#45548) Co-authored-by: Sanket322 (cherry picked from commit aaf720ab61f8a8b3e3d03513dd4c650b6106413d) Co-authored-by: Sanket Shah <113279972+Sanket322@users.noreply.github.com> --- .../report/gross_profit/gross_profit.json | 4 +-- .../report/gross_profit/gross_profit.py | 28 +++++++++++++++++ .../report/gross_profit/test_gross_profit.py | 30 +++++++++++++++++++ erpnext/patches.txt | 1 + .../v14_0/disable_add_row_in_gross_profit.py | 5 ++++ 5 files changed, 66 insertions(+), 2 deletions(-) create mode 100644 erpnext/patches/v14_0/disable_add_row_in_gross_profit.py diff --git a/erpnext/accounts/report/gross_profit/gross_profit.json b/erpnext/accounts/report/gross_profit/gross_profit.json index 0730ffd77e5..dfb7a991e3e 100644 --- a/erpnext/accounts/report/gross_profit/gross_profit.json +++ b/erpnext/accounts/report/gross_profit/gross_profit.json @@ -1,5 +1,5 @@ { - "add_total_row": 1, + "add_total_row": 0, "columns": [], "creation": "2013-02-25 17:03:34", "disable_prepared_report": 0, @@ -9,7 +9,7 @@ "filters": [], "idx": 3, "is_standard": "Yes", - "modified": "2022-02-11 10:18:36.956558", + "modified": "2025-01-27 18:40:24.493829", "modified_by": "Administrator", "module": "Accounts", "name": "Gross Profit", diff --git a/erpnext/accounts/report/gross_profit/gross_profit.py b/erpnext/accounts/report/gross_profit/gross_profit.py index 5df37603b9a..4802b0f35c1 100644 --- a/erpnext/accounts/report/gross_profit/gross_profit.py +++ b/erpnext/accounts/report/gross_profit/gross_profit.py @@ -178,7 +178,14 @@ def get_data_when_grouped_by_invoice(columns, gross_profit_data, filters, group_ # removing Item Code and Item Name columns del columns[4:6] + total_base_amount = 0 + total_buying_amount = 0 + for src in gross_profit_data.si_list: + if src.indent == 1: + total_base_amount += src.base_amount or 0.0 + total_buying_amount += src.buying_amount or 0.0 + row = frappe._dict() row.indent = src.indent row.parent_invoice = src.parent_invoice @@ -189,6 +196,27 @@ def get_data_when_grouped_by_invoice(columns, gross_profit_data, filters, group_ data.append(row) + total_gross_profit = total_base_amount - total_buying_amount + data.append( + frappe._dict( + { + "sales_invoice": "Total", + "qty": None, + "avg._selling_rate": None, + "valuation_rate": None, + "selling_amount": total_base_amount, + "buying_amount": total_buying_amount, + "gross_profit": total_gross_profit, + "gross_profit_%": flt( + (total_gross_profit / total_base_amount) * 100.0, + cint(frappe.db.get_default("currency_precision")) or 3, + ) + if total_base_amount + else 0, + } + ) + ) + def get_data_when_not_grouped_by_invoice(gross_profit_data, filters, group_wise_columns, data): for src in gross_profit_data.grouped_data: diff --git a/erpnext/accounts/report/gross_profit/test_gross_profit.py b/erpnext/accounts/report/gross_profit/test_gross_profit.py index 721be79ed88..c6c8a0266ef 100644 --- a/erpnext/accounts/report/gross_profit/test_gross_profit.py +++ b/erpnext/accounts/report/gross_profit/test_gross_profit.py @@ -605,3 +605,33 @@ class TestGrossProfit(FrappeTestCase): item_from_sinv2 = [x for x in data if x.parent_invoice == sinv2.name] self.assertEqual(len(item_from_sinv2), 1) self.assertEqual(1800, item_from_sinv2[0].valuation_rate) + + def test_gross_profit_groupby_invoices(self): + create_sales_invoice( + qty=1, + rate=100, + company=self.company, + customer=self.customer, + item_code=self.item, + item_name=self.item, + cost_center=self.cost_center, + warehouse=self.warehouse, + debit_to=self.debit_to, + parent_cost_center=self.cost_center, + update_stock=0, + currency="INR", + income_account=self.income_account, + expense_account=self.expense_account, + ) + + filters = frappe._dict( + company=self.company, from_date=nowdate(), to_date=nowdate(), group_by="Invoice" + ) + + _, data = execute(filters=filters) + total = data[-1] + + self.assertEqual(total.selling_amount, 100.0) + self.assertEqual(total.buying_amount, 0.0) + self.assertEqual(total.gross_profit, 100.0) + self.assertEqual(total.get("gross_profit_%"), 100.0) diff --git a/erpnext/patches.txt b/erpnext/patches.txt index f40801e2776..d3651ee7060 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -391,3 +391,4 @@ erpnext.patches.v15_0.rename_manufacturing_settings_field erpnext.patches.v15_0.migrate_checkbox_to_select_for_reconciliation_effect erpnext.patches.v15_0.sync_auto_reconcile_config execute:frappe.db.set_single_value("Accounts Settings", "exchange_gain_loss_posting_date", "Payment") +erpnext.patches.v14_0.disable_add_row_in_gross_profit \ No newline at end of file diff --git a/erpnext/patches/v14_0/disable_add_row_in_gross_profit.py b/erpnext/patches/v14_0/disable_add_row_in_gross_profit.py new file mode 100644 index 00000000000..d95503bef0a --- /dev/null +++ b/erpnext/patches/v14_0/disable_add_row_in_gross_profit.py @@ -0,0 +1,5 @@ +import frappe + + +def execute(): + frappe.db.set_value("Report", "Gross Profit", "add_total_row", 0) From 73c1bf972efa27229aae70c37ae5cf44c22444f1 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Thu, 30 Jan 2025 11:59:40 +0530 Subject: [PATCH 1032/1614] fix: reposting issue with s3 backup (cherry picked from commit 6b454ca9a7fa3fd50f9d2d5a2e9a9c321c0a18e8) --- erpnext/stock/stock_ledger.py | 38 +++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/erpnext/stock/stock_ledger.py b/erpnext/stock/stock_ledger.py index 91d10b3a9ac..3dea6010867 100644 --- a/erpnext/stock/stock_ledger.py +++ b/erpnext/stock/stock_ledger.py @@ -405,23 +405,13 @@ def create_json_gz_file(data, doc, file_name=None) -> str: compressed_content = gzip.compress(encoded_content) if not file_name: - json_filename = f"{scrub(doc.doctype)}-{scrub(doc.name)}.json.gz" - _file = frappe.get_doc( - { - "doctype": "File", - "file_name": json_filename, - "attached_to_doctype": doc.doctype, - "attached_to_name": doc.name, - "attached_to_field": "reposting_data_file", - "content": compressed_content, - "is_private": 1, - } - ) - _file.save(ignore_permissions=True) - - return _file.file_url + return create_file(doc, compressed_content) else: file_doc = frappe.get_doc("File", file_name) + if "/frappe_s3_attachment." in file_doc.file_url: + file_doc.delete() + return create_file(doc, compressed_content) + path = file_doc.get_full_path() with open(path, "wb") as f: @@ -430,6 +420,24 @@ def create_json_gz_file(data, doc, file_name=None) -> str: return doc.reposting_data_file +def create_file(doc, compressed_content): + json_filename = f"{scrub(doc.doctype)}-{scrub(doc.name)}.json.gz" + _file = frappe.get_doc( + { + "doctype": "File", + "file_name": json_filename, + "attached_to_doctype": doc.doctype, + "attached_to_name": doc.name, + "attached_to_field": "reposting_data_file", + "content": compressed_content, + "is_private": 1, + } + ) + _file.save(ignore_permissions=True) + + return _file.file_url + + def get_items_to_be_repost(voucher_type=None, voucher_no=None, doc=None, reposting_data=None): if not reposting_data and doc and doc.reposting_data_file: reposting_data = get_reposting_data(doc.reposting_data_file) From cd5174e42343a1a271fbae791b4d7a5a7f15330e Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Thu, 30 Jan 2025 15:53:40 +0530 Subject: [PATCH 1033/1614] fix: posting_date to posting_datetime in stock related queries (cherry picked from commit e61ab481451f5bf6753462d976fb1312685eae4a) --- .../batch_wise_balance_history.py | 4 +++- erpnext/stock/report/stock_ageing/stock_ageing.py | 7 ++++--- erpnext/stock/report/stock_ledger/stock_ledger.py | 13 ++++++------- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/erpnext/stock/report/batch_wise_balance_history/batch_wise_balance_history.py b/erpnext/stock/report/batch_wise_balance_history/batch_wise_balance_history.py index 0bb9d40581a..df466ed8436 100644 --- a/erpnext/stock/report/batch_wise_balance_history/batch_wise_balance_history.py +++ b/erpnext/stock/report/batch_wise_balance_history/batch_wise_balance_history.py @@ -151,6 +151,8 @@ def get_stock_ledger_entries_for_batch_bundle(filters): sle = frappe.qb.DocType("Stock Ledger Entry") batch_package = frappe.qb.DocType("Serial and Batch Entry") + to_date = get_datetime(filters.to_date + " 23:59:59") + query = ( frappe.qb.from_(sle) .inner_join(batch_package) @@ -166,7 +168,7 @@ def get_stock_ledger_entries_for_batch_bundle(filters): (sle.docstatus < 2) & (sle.is_cancelled == 0) & (sle.has_batch_no == 1) - & (sle.posting_date <= filters["to_date"]) + & (sle.posting_datetime <= to_date) ) .groupby(sle.voucher_no, batch_package.batch_no, batch_package.warehouse) .orderby(sle.item_code, sle.warehouse) diff --git a/erpnext/stock/report/stock_ageing/stock_ageing.py b/erpnext/stock/report/stock_ageing/stock_ageing.py index feaa0ba766d..cc597e14196 100644 --- a/erpnext/stock/report/stock_ageing/stock_ageing.py +++ b/erpnext/stock/report/stock_ageing/stock_ageing.py @@ -7,7 +7,7 @@ from operator import itemgetter import frappe from frappe import _ -from frappe.utils import cint, date_diff, flt +from frappe.utils import cint, date_diff, flt, get_datetime from erpnext.stock.doctype.serial_no.serial_no import get_serial_nos @@ -424,6 +424,7 @@ class FIFOSlots: def __get_stock_ledger_entries(self) -> Iterator[dict]: sle = frappe.qb.DocType("Stock Ledger Entry") item = self.__get_item_query() # used as derived table in sle query + to_date = get_datetime(self.filters.get("to_date") + " 23:59:59") sle_query = ( frappe.qb.from_(sle) @@ -450,7 +451,7 @@ class FIFOSlots: .where( (sle.item_code == item.name) & (sle.company == self.filters.get("company")) - & (sle.posting_date <= self.filters.get("to_date")) + & (sle.posting_datetime <= to_date) & (sle.is_cancelled != 1) ) ) @@ -467,7 +468,7 @@ class FIFOSlots: if warehouses: sle_query = sle_query.where(sle.warehouse.isin(warehouses)) - sle_query = sle_query.orderby(sle.posting_date, sle.posting_time, sle.creation, sle.actual_qty) + sle_query = sle_query.orderby(sle.posting_datetime, sle.creation) return sle_query.run(as_dict=True, as_iterator=True) diff --git a/erpnext/stock/report/stock_ledger/stock_ledger.py b/erpnext/stock/report/stock_ledger/stock_ledger.py index e56c499d767..391395503b0 100644 --- a/erpnext/stock/report/stock_ledger/stock_ledger.py +++ b/erpnext/stock/report/stock_ledger/stock_ledger.py @@ -8,7 +8,7 @@ from collections import defaultdict import frappe from frappe import _ from frappe.query_builder.functions import CombineDatetime, Sum -from frappe.utils import cint, flt +from frappe.utils import cint, flt, get_datetime from erpnext.stock.doctype.inventory_dimension.inventory_dimension import get_inventory_dimensions from erpnext.stock.doctype.serial_no.serial_no import get_serial_nos @@ -367,6 +367,9 @@ def get_columns(filters): def get_stock_ledger_entries(filters, items): + from_date = get_datetime(filters.from_date + " 00:00:00") + to_date = get_datetime(filters.to_date + " 23:59:59") + sle = frappe.qb.DocType("Stock Ledger Entry") query = ( frappe.qb.from_(sle) @@ -390,12 +393,8 @@ def get_stock_ledger_entries(filters, items): sle.serial_no, sle.project, ) - .where( - (sle.docstatus < 2) - & (sle.is_cancelled == 0) - & (sle.posting_date[filters.from_date : filters.to_date]) - ) - .orderby(CombineDatetime(sle.posting_date, sle.posting_time)) + .where((sle.docstatus < 2) & (sle.is_cancelled == 0) & (sle.posting_datetime[from_date:to_date])) + .orderby(sle.posting_datetime) .orderby(sle.creation) ) From 786db3d0fae6daf010554566e0ceb352b68747a8 Mon Sep 17 00:00:00 2001 From: Dany Robert Date: Thu, 30 Jan 2025 19:34:06 +0530 Subject: [PATCH 1034/1614] fix: ignore expired batch for pick list --- .../doctype/serial_and_batch_bundle/serial_and_batch_bundle.py | 3 +++ 1 file changed, 3 insertions(+) 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 1bc81aea0c5..d7bad3711ac 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 @@ -2426,6 +2426,9 @@ def get_stock_ledgers_batches(kwargs): else: query = query.where(stock_ledger_entry[field] == kwargs.get(field)) + if not kwargs.get("for_stock_levels"): + query = query.where((batch_table.expiry_date >= today()) | (batch_table.expiry_date.isnull())) + if kwargs.get("posting_date"): if kwargs.get("posting_time") is None: kwargs.posting_time = nowtime() From 72868eee04feecdf2847fcc32e8b00a459ec7d1d Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 31 Jan 2025 11:19:23 +0530 Subject: [PATCH 1035/1614] fix: loading print receipt only at order complete (backport #45627) (#45628) fix: loading print receipt only at order complete (#45627) (cherry picked from commit 5a1851dfe3b22d0041ff510f11f540d21953da23) Co-authored-by: Diptanil Saha --- erpnext/selling/page/point_of_sale/pos_past_order_summary.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/erpnext/selling/page/point_of_sale/pos_past_order_summary.js b/erpnext/selling/page/point_of_sale/pos_past_order_summary.js index df44fdb04e8..d4b5562c218 100644 --- a/erpnext/selling/page/point_of_sale/pos_past_order_summary.js +++ b/erpnext/selling/page/point_of_sale/pos_past_order_summary.js @@ -357,7 +357,9 @@ erpnext.PointOfSale.PastOrderSummary = class { this.add_summary_btns(condition_btns_map); - this.print_receipt_on_order_complete(); + if (after_submission) { + this.print_receipt_on_order_complete(); + } } attach_document_info(doc) { From 676dde59c2e79ba12433448b1a0bd54626ed437a Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 31 Jan 2025 12:02:47 +0530 Subject: [PATCH 1036/1614] fix: pos print receipt on submit (backport #45632) (#45633) fix: pos print receipt on submit (#45632) (cherry picked from commit fe5153539291a702f71cd87592c55ff52ee0c282) Co-authored-by: Diptanil Saha --- erpnext/selling/page/point_of_sale/pos_controller.js | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/selling/page/point_of_sale/pos_controller.js b/erpnext/selling/page/point_of_sale/pos_controller.js index 9da530081e7..741a902fccd 100644 --- a/erpnext/selling/page/point_of_sale/pos_controller.js +++ b/erpnext/selling/page/point_of_sale/pos_controller.js @@ -485,6 +485,7 @@ erpnext.PointOfSale.Controller = class { ]); }, }, + pos_profile: this.pos_profile, }); } From f6b49845e29c7edf31cf06140dfa09e54650b958 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Fri, 31 Jan 2025 11:26:01 +0530 Subject: [PATCH 1037/1614] fix: attribute 'msgbox' not found in sales invoice.js (cherry picked from commit 5643385c22d77d55f7b374820d29375bb70bb3f5) # Conflicts: # erpnext/accounts/doctype/sales_invoice/sales_invoice.js --- erpnext/accounts/doctype/sales_invoice/sales_invoice.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js index da2e362cf27..861aa22b03c 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js @@ -65,7 +65,11 @@ erpnext.accounts.SalesInvoiceController = class SalesInvoiceController extends ( refresh(doc, dt, dn) { const me = this; super.refresh(); +<<<<<<< HEAD if (cur_frm.msgbox && cur_frm.msgbox.$wrapper.is(":visible")) { +======= + if (this.frm?.msgbox && this.frm.msgbox.$wrapper.is(":visible")) { +>>>>>>> 5643385c22 (fix: attribute 'msgbox' not found in sales invoice.js) // hide new msgbox cur_frm.msgbox.hide(); } From bd8e4eeddc38518333edb91d53ced1e05cf85fee Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Fri, 31 Jan 2025 12:09:50 +0530 Subject: [PATCH 1038/1614] chore: fix conflicts --- erpnext/accounts/doctype/sales_invoice/sales_invoice.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js index 861aa22b03c..a074c9b1c0a 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js @@ -65,13 +65,10 @@ erpnext.accounts.SalesInvoiceController = class SalesInvoiceController extends ( refresh(doc, dt, dn) { const me = this; super.refresh(); -<<<<<<< HEAD - if (cur_frm.msgbox && cur_frm.msgbox.$wrapper.is(":visible")) { -======= + if (this.frm?.msgbox && this.frm.msgbox.$wrapper.is(":visible")) { ->>>>>>> 5643385c22 (fix: attribute 'msgbox' not found in sales invoice.js) // hide new msgbox - cur_frm.msgbox.hide(); + this.frm.msgbox.hide(); } this.frm.toggle_reqd("due_date", !this.frm.doc.is_return); From 6ea5307b0eb02a2c9c7e37d598a032f2f10998b4 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Thu, 30 Jan 2025 17:27:44 +0530 Subject: [PATCH 1039/1614] fix: correct error message in payment entry (cherry picked from commit 592704cfd08890931301a8c5cf361ca45a59414d) --- erpnext/accounts/doctype/payment_entry/payment_entry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index b0090f27004..df6faaa768d 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -543,7 +543,7 @@ class PaymentEntry(AccountsController): if d.reference_doctype not in valid_reference_doctypes: frappe.throw( _("Reference Doctype must be one of {0}").format( - comma_or(_(d) for d in valid_reference_doctypes) + comma_or([_(d) for d in valid_reference_doctypes]) ) ) From 24a6f611d86b4406fda5ad14de331e4ddf6dc379 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Fri, 31 Jan 2025 10:26:35 +0530 Subject: [PATCH 1040/1614] fix: validation to prevent submission if the SABB is not linked to a stock transaction (cherry picked from commit f976115a2b49b01de653240afcf1a80b95fe99ae) --- erpnext/controllers/selling_controller.py | 6 +- erpnext/controllers/stock_controller.py | 20 ++++- .../serial_and_batch_bundle.py | 27 +++++++ .../test_serial_and_batch_bundle.py | 74 +++++++++++++++++++ 4 files changed, 122 insertions(+), 5 deletions(-) diff --git a/erpnext/controllers/selling_controller.py b/erpnext/controllers/selling_controller.py index a9258204b39..f79d83d5b09 100644 --- a/erpnext/controllers/selling_controller.py +++ b/erpnext/controllers/selling_controller.py @@ -333,7 +333,7 @@ class SellingController(StockController): "batch_no": p.batch_no if self.docstatus == 2 else None, "uom": p.uom, "serial_and_batch_bundle": p.serial_and_batch_bundle - or get_serial_and_batch_bundle(p, self), + or get_serial_and_batch_bundle(p, self, d), "name": d.name, "target_warehouse": p.target_warehouse, "company": self.company, @@ -799,7 +799,7 @@ def set_default_income_account_for_item(obj): set_item_default(d.item_code, obj.company, "income_account", d.income_account) -def get_serial_and_batch_bundle(child, parent): +def get_serial_and_batch_bundle(child, parent, delivery_note_child=None): from erpnext.stock.serial_batch_bundle import SerialBatchCreation if child.get("use_serial_batch_fields"): @@ -819,7 +819,7 @@ def get_serial_and_batch_bundle(child, parent): "warehouse": child.warehouse, "voucher_type": parent.doctype, "voucher_no": parent.name if parent.docstatus < 2 else None, - "voucher_detail_no": child.name, + "voucher_detail_no": delivery_note_child.name if delivery_note_child else child.name, "posting_date": parent.posting_date, "posting_time": parent.posting_time, "qty": child.qty, diff --git a/erpnext/controllers/stock_controller.py b/erpnext/controllers/stock_controller.py index 978550fdb4b..47a1c400faa 100644 --- a/erpnext/controllers/stock_controller.py +++ b/erpnext/controllers/stock_controller.py @@ -216,6 +216,10 @@ class StockController(AccountsController): if self.doctype == "Asset Capitalization": table_name = "stock_items" + parent_details = frappe._dict() + if table_name == "packed_items": + parent_details = self.get_parent_details_for_packed_items() + for row in self.get(table_name): if row.serial_and_batch_bundle and (row.serial_no or row.batch_no): self.validate_serial_nos_and_batches_with_bundle(row) @@ -246,13 +250,20 @@ class StockController(AccountsController): } if row.get("qty") or row.get("consumed_qty") or row.get("stock_qty"): - self.update_bundle_details(bundle_details, table_name, row) + self.update_bundle_details(bundle_details, table_name, row, parent_details=parent_details) self.create_serial_batch_bundle(bundle_details, row) if row.get("rejected_qty"): self.update_bundle_details(bundle_details, table_name, row, is_rejected=True) self.create_serial_batch_bundle(bundle_details, row) + def get_parent_details_for_packed_items(self): + parent_details = frappe._dict() + for row in self.get("items"): + parent_details[row.name] = row + + return parent_details + def make_bundle_for_sales_purchase_return(self, table_name=None): if not self.get("is_return"): return @@ -387,7 +398,7 @@ class StockController(AccountsController): return False - def update_bundle_details(self, bundle_details, table_name, row, is_rejected=False): + def update_bundle_details(self, bundle_details, table_name, row, is_rejected=False, parent_details=None): from erpnext.stock.doctype.serial_no.serial_no import get_serial_nos # Since qty field is different for different doctypes @@ -429,6 +440,11 @@ class StockController(AccountsController): warehouse = row.get("target_warehouse") or row.get("warehouse") type_of_transaction = "Outward" + if table_name == "packed_items": + if not warehouse: + warehouse = parent_details[row.parent_detail_docname].warehouse + bundle_details["voucher_detail_no"] = parent_details[row.parent_detail_docname].name + bundle_details.update( { "qty": qty, 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 1bc81aea0c5..828a1ad733e 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 @@ -84,6 +84,9 @@ class SerialandBatchBundle(Document): # end: auto-generated types def validate(self): + if self.docstatus == 1 and self.voucher_detail_no: + self.validate_voucher_detail_no() + self.reset_serial_batch_bundle() self.set_batch_no() self.validate_serial_and_batch_no() @@ -107,6 +110,30 @@ class SerialandBatchBundle(Document): self.calculate_qty_and_amount() + def validate_voucher_detail_no(self): + if self.type_of_transaction not in ["Inward", "Outward"] or self.voucher_type in [ + "Installation Note", + "Job Card", + "Maintenance Schedule", + "Pick List", + ]: + return + + if self.voucher_type == "POS Invoice": + if not frappe.db.exists("POS Invoice Item", self.voucher_detail_no): + frappe.throw( + _("The serial and batch bundle {0} not linked to {1} {2}").format( + bold(self.name), self.voucher_type, bold(self.voucher_no) + ) + ) + + elif not frappe.db.exists("Stock Ledger Entry", {"voucher_detail_no": self.voucher_detail_no}): + frappe.throw( + _("The serial and batch bundle {0} not linked to {1} {2}").format( + bold(self.name), self.voucher_type, bold(self.voucher_no) + ) + ) + def allow_existing_serial_nos(self): if self.type_of_transaction == "Outward" or not self.has_serial_no: return 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 45a474df2b7..0a4352e1ea9 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 @@ -755,6 +755,80 @@ class TestSerialandBatchBundle(FrappeTestCase): "Stock Settings", "auto_create_serial_and_batch_bundle_for_outward", original_value ) + def test_voucher_detail_no(self): + item_code = make_item( + "Test Voucher Detail No 1", + properties={ + "is_stock_item": 1, + "has_batch_no": 1, + "create_new_batch": 1, + "batch_number_series": "TST-VDN-.#####", + }, + ).name + + se = make_stock_entry( + item_code=item_code, + qty=10, + target="_Test Warehouse - _TC", + rate=500, + use_serial_batch_fields=True, + do_not_submit=True, + ) + + if not frappe.db.exists("Batch", "TST-ACSBBO-TACSB-00001"): + frappe.get_doc( + { + "doctype": "Batch", + "batch_id": "TST-ACSBBO-TACSB-00001", + "item": item_code, + "company": "_Test Company", + } + ).insert(ignore_permissions=True) + + bundle_doc = make_serial_batch_bundle( + { + "item_code": item_code, + "warehouse": "_Test Warehouse - _TC", + "voucher_type": "Stock Entry", + "posting_date": today(), + "posting_time": nowtime(), + "qty": 10, + "batches": frappe._dict({"TST-ACSBBO-TACSB-00001": 10}), + "type_of_transaction": "Inward", + "do_not_submit": True, + } + ) + + se.append( + "items", + { + "item_code": item_code, + "t_warehouse": "_Test Warehouse - _TC", + "stock_uom": "Nos", + "stock_qty": 10, + "conversion_factor": 1, + "uom": "Nos", + "basic_rate": 500, + "qty": 10, + "use_serial_batch_fields": 0, + "serial_and_batch_bundle": bundle_doc.name, + }, + ) + + se.save() + + bundle_doc = frappe.get_doc("Serial and Batch Bundle", bundle_doc.name) + self.assertEqual(bundle_doc.voucher_detail_no, se.items[1].name) + + se.remove(se.items[1]) + se.save() + self.assertTrue(len(se.items) == 1) + se.submit() + + bundle_doc.reload() + self.assertTrue(bundle_doc.docstatus == 0) + self.assertRaises(frappe.ValidationError, bundle_doc.submit) + def get_batch_from_bundle(bundle): from erpnext.stock.serial_batch_bundle import get_batch_nos From d0748b1b675eee2c83f230983219e3d2ddf45606 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Fri, 31 Jan 2025 15:51:09 +0530 Subject: [PATCH 1041/1614] fix: actual qty showing blank for sub-assembly items (cherry picked from commit 5be2e71a356754a9908b02beeaa2691a6710abda) --- .../production_plan/production_plan.js | 22 ++++++++++++ .../production_plan/production_plan.py | 34 ++++++++++++++++--- 2 files changed, 51 insertions(+), 5 deletions(-) diff --git a/erpnext/manufacturing/doctype/production_plan/production_plan.js b/erpnext/manufacturing/doctype/production_plan/production_plan.js index e7ac7f7cc83..f381c9d39e2 100644 --- a/erpnext/manufacturing/doctype/production_plan/production_plan.js +++ b/erpnext/manufacturing/doctype/production_plan/production_plan.js @@ -562,6 +562,28 @@ frappe.ui.form.on("Production Plan Sales Order", { frappe.ui.form.on("Production Plan Sub Assembly Item", { fg_warehouse(frm, cdt, cdn) { erpnext.utils.copy_value_in_all_rows(frm.doc, cdt, cdn, "sub_assembly_items", "fg_warehouse"); + + let row = locals[cdt][cdn]; + if (row.fg_warehouse && row.production_item) { + let child_row = { + item_code: row.production_item, + warehouse: row.fg_warehouse, + }; + + frappe.call({ + method: "erpnext.manufacturing.doctype.production_plan.production_plan.get_bin_details", + args: { + row: child_row, + company: frm.doc.company, + for_warehouse: row.fg_warehouse, + }, + callback: function (r) { + if (r.message && r.message.length) { + frappe.model.set_value(cdt, cdn, "actual_qty", r.message[0].actual_qty); + } + }, + }); + } }, }); diff --git a/erpnext/manufacturing/doctype/production_plan/production_plan.py b/erpnext/manufacturing/doctype/production_plan/production_plan.py index 265f99e47d3..7d134adb3cc 100644 --- a/erpnext/manufacturing/doctype/production_plan/production_plan.py +++ b/erpnext/manufacturing/doctype/production_plan/production_plan.py @@ -937,8 +937,14 @@ class ProductionPlan(Document): bom_data = [] - warehouse = (self.sub_assembly_warehouse) if self.skip_available_sub_assembly_item else None - get_sub_assembly_items(row.bom_no, bom_data, row.planned_qty, self.company, warehouse=warehouse) + get_sub_assembly_items( + row.bom_no, + bom_data, + row.planned_qty, + self.company, + warehouse=self.sub_assembly_warehouse, + skip_available_sub_assembly_item=self.skip_available_sub_assembly_item, + ) self.set_sub_assembly_items_based_on_level(row, bom_data, manufacturing_type) sub_assembly_items_store.extend(bom_data) @@ -1729,14 +1735,23 @@ def get_item_data(item_code): } -def get_sub_assembly_items(bom_no, bom_data, to_produce_qty, company, warehouse=None, indent=0): +def get_sub_assembly_items( + bom_no, + bom_data, + to_produce_qty, + company, + warehouse=None, + indent=0, + skip_available_sub_assembly_item=False, +): data = get_bom_children(parent=bom_no) for d in data: if d.expandable: parent_item_code = frappe.get_cached_value("BOM", bom_no, "item") stock_qty = (d.stock_qty / d.parent_bom_qty) * flt(to_produce_qty) - if warehouse: + bin_details = frappe._dict() + if skip_available_sub_assembly_item: bin_details = get_bin_details(d, company, for_warehouse=warehouse) for _bin_dict in bin_details: @@ -1746,11 +1761,14 @@ def get_sub_assembly_items(bom_no, bom_data, to_produce_qty, company, warehouse= continue else: stock_qty = stock_qty - _bin_dict.projected_qty + elif warehouse: + bin_details = get_bin_details(d, company, for_warehouse=warehouse) if stock_qty > 0: bom_data.append( frappe._dict( { + "actual_qty": bin_details[0].get("actual_qty", 0) if bin_details else 0, "parent_item_code": parent_item_code, "description": d.description, "production_item": d.item_code, @@ -1768,7 +1786,13 @@ def get_sub_assembly_items(bom_no, bom_data, to_produce_qty, company, warehouse= if d.value: get_sub_assembly_items( - d.value, bom_data, stock_qty, company, warehouse, indent=indent + 1 + d.value, + bom_data, + stock_qty, + company, + warehouse, + indent=indent + 1, + skip_available_sub_assembly_item=skip_available_sub_assembly_item, ) From eef2f3c5d4861c1e77248581549a3ca95d2b5b56 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Fri, 31 Jan 2025 23:04:54 +0530 Subject: [PATCH 1042/1614] fix: not able to make manufacturing entry for alternate items (cherry picked from commit 1607aa1a448ab5f6c19ded84d52319b2b86a57b0) --- .../doctype/work_order/test_work_order.py | 53 +++++++++++++++++++ .../stock/doctype/stock_entry/stock_entry.py | 7 ++- 2 files changed, 58 insertions(+), 2 deletions(-) diff --git a/erpnext/manufacturing/doctype/work_order/test_work_order.py b/erpnext/manufacturing/doctype/work_order/test_work_order.py index f94e4a56c7c..205ca1dbdb4 100644 --- a/erpnext/manufacturing/doctype/work_order/test_work_order.py +++ b/erpnext/manufacturing/doctype/work_order/test_work_order.py @@ -2367,6 +2367,59 @@ class TestWorkOrder(FrappeTestCase): stock_entry.submit() + def test_components_alternate_item_for_bom_based_manufacture_entry(self): + frappe.db.set_single_value("Manufacturing Settings", "backflush_raw_materials_based_on", "BOM") + frappe.db.set_single_value("Manufacturing Settings", "validate_components_quantities_per_bom", 1) + + fg_item = "Test FG Item For Component Validation for alternate item" + source_warehouse = "Stores - _TC" + raw_materials = ["Test Component Validation RM Item 112", "Test Component Validation RM Item 22"] + alternate_item = ["Alternate Test Component Validation RM Item 1"] + + make_item(fg_item, {"is_stock_item": 1}) + for item in raw_materials + alternate_item: + make_item(item, {"is_stock_item": 1, "allow_alternative_item": 1}) + test_stock_entry.make_stock_entry( + item_code=item, + target=source_warehouse, + qty=10, + basic_rate=100, + ) + + frappe.get_doc( + { + "doctype": "Item Alternative", + "item_code": raw_materials[0], + "alternative_item_code": alternate_item[0], + "two_way": 1, + } + ).insert() + + make_bom(item=fg_item, source_warehouse=source_warehouse, raw_materials=raw_materials) + + wo = make_wo_order_test_record( + item=fg_item, + qty=10, + source_warehouse=source_warehouse, + ) + + transfer_entry = frappe.get_doc(make_stock_entry(wo.name, "Material Transfer for Manufacture", 10)) + transfer_entry.save() + transfer_entry.items[0].item_code = alternate_item[0] + transfer_entry.items[0].original_item = raw_materials[0] + transfer_entry.submit() + + self.assertTrue(transfer_entry.docstatus == 1) + + manufacture_entry = frappe.get_doc(make_stock_entry(wo.name, "Manufacture", 10)) + manufacture_entry.save() + self.assertTrue(manufacture_entry.items[0].item_code == alternate_item[0]) + self.assertTrue(manufacture_entry.items[0].original_item == raw_materials[0]) + + manufacture_entry.submit() + + frappe.db.set_single_value("Manufacturing Settings", "validate_components_quantities_per_bom", 0) + def test_components_qty_for_bom_based_manufacture_entry(self): frappe.db.set_single_value("Manufacturing Settings", "backflush_raw_materials_based_on", "BOM") frappe.db.set_single_value("Manufacturing Settings", "validate_components_quantities_per_bom", 1) diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index eec30f69f36..95d6d7079b7 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -749,7 +749,7 @@ class StockEntry(StockController): def get_matched_items(self, item_code): for row in self.items: - if row.item_code == item_code: + if row.item_code == item_code or row.original_item == item_code: return row return {} @@ -1839,7 +1839,7 @@ class StockEntry(StockController): item_wh = frappe._dict(item_wh) - for item in item_dict.values(): + for original_item, item in item_dict.items(): if self.pro_doc and cint(self.pro_doc.from_wip_warehouse): item["from_warehouse"] = self.pro_doc.wip_warehouse # Get Reserve Warehouse from Subcontract Order @@ -1852,6 +1852,9 @@ class StockEntry(StockController): self.to_warehouse if self.purpose == "Send to Subcontractor" else "" ) + if original_item != item.get("item_code"): + item["original_item"] = original_item + self.add_to_stock_entry_detail(item_dict) # fetch the serial_no of the first stock entry for the second stock entry From 1522d76a3b7e9ae006369f42d676cad74d14d798 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Sat, 1 Feb 2025 00:35:12 +0530 Subject: [PATCH 1043/1614] fix: consider process_loss_qty in work order (cherry picked from commit 95fda47b6c006810e160164955f33bf7821e7cbe) --- .../manufacturing/doctype/job_card/job_card.py | 4 +++- .../doctype/job_card/test_job_card.py | 1 + .../doctype/work_order/work_order.js | 15 ++++++++++++++- .../doctype/work_order/work_order.py | 4 +++- 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/erpnext/manufacturing/doctype/job_card/job_card.py b/erpnext/manufacturing/doctype/job_card/job_card.py index 90f915d9c24..1b4840d14b5 100644 --- a/erpnext/manufacturing/doctype/job_card/job_card.py +++ b/erpnext/manufacturing/doctype/job_card/job_card.py @@ -982,7 +982,9 @@ class JobCard(Document): if self.time_logs: self.status = "Work In Progress" - if self.docstatus == 1 and (self.for_quantity <= self.total_completed_qty or not self.items): + if self.docstatus == 1 and ( + self.for_quantity <= (self.total_completed_qty + self.process_loss_qty) or not self.items + ): self.status = "Completed" if update_status: diff --git a/erpnext/manufacturing/doctype/job_card/test_job_card.py b/erpnext/manufacturing/doctype/job_card/test_job_card.py index 7f456b9881e..12205a80a2b 100644 --- a/erpnext/manufacturing/doctype/job_card/test_job_card.py +++ b/erpnext/manufacturing/doctype/job_card/test_job_card.py @@ -516,6 +516,7 @@ class TestJobCard(FrappeTestCase): self.assertEqual(jc.status, status) jc = frappe.new_doc("Job Card") + jc.process_loss_qty = 0 jc.for_quantity = 2 jc.transferred_qty = 1 jc.total_completed_qty = 0 diff --git a/erpnext/manufacturing/doctype/work_order/work_order.js b/erpnext/manufacturing/doctype/work_order/work_order.js index 6da3d803358..df5027172ff 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order.js +++ b/erpnext/manufacturing/doctype/work_order/work_order.js @@ -397,7 +397,10 @@ frappe.ui.form.on("Work Order", { message = title; // pending qty if (!frm.doc.skip_transfer) { - var pending_complete = frm.doc.material_transferred_for_manufacturing - frm.doc.produced_qty; + var pending_complete = + frm.doc.material_transferred_for_manufacturing - + frm.doc.produced_qty - + frm.doc.process_loss_qty; if (pending_complete) { var width = (pending_complete / frm.doc.qty) * 100 - added_min; title = __("{0} items in progress", [pending_complete]); @@ -409,6 +412,16 @@ frappe.ui.form.on("Work Order", { message = message + ". " + title; } } + if (frm.doc.process_loss_qty) { + var process_loss_width = (frm.doc.process_loss_qty / frm.doc.qty) * 100; + title = __("{0} items lost during process.", [frm.doc.process_loss_qty]); + bars.push({ + title: title, + width: process_loss_width + "%", + progress_class: "progress-bar-danger", + }); + message = message + ". " + title; + } frm.dashboard.add_progress(__("Status"), bars, message); }, diff --git a/erpnext/manufacturing/doctype/work_order/work_order.py b/erpnext/manufacturing/doctype/work_order/work_order.py index 332a86979c2..e6e7d7612c5 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order.py +++ b/erpnext/manufacturing/doctype/work_order/work_order.py @@ -1519,7 +1519,9 @@ def close_work_order(work_order, status): work_order = frappe.get_doc("Work Order", work_order) if work_order.get("operations"): job_cards = frappe.get_list( - "Job Card", filters={"work_order": work_order.name, "status": "Work In Progress"}, pluck="name" + "Job Card", + filters={"work_order": work_order.name, "status": "Work In Progress", "docstatus": 1}, + pluck="name", ) if job_cards: From c0b32c446bd1dd94302d12787977bbec8781ec48 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Thu, 30 Jan 2025 17:29:31 +0530 Subject: [PATCH 1044/1614] fix: bind this to function (cherry picked from commit 41649cf52de0fb50b6370d915ea41b7ad8fc9971) --- erpnext/buying/doctype/purchase_order/purchase_order.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.js b/erpnext/buying/doctype/purchase_order/purchase_order.js index 4cc38391276..3a15c7de4ba 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.js +++ b/erpnext/buying/doctype/purchase_order/purchase_order.js @@ -367,7 +367,11 @@ erpnext.buying.PurchaseOrderController = class PurchaseOrderController extends ( } if (is_drop_ship && doc.status != "Delivered") { - this.frm.add_custom_button(__("Delivered"), this.delivered_by_supplier, __("Status")); + this.frm.add_custom_button( + __("Delivered"), + this.delivered_by_supplier.bind(this), + __("Status") + ); this.frm.page.set_inner_btn_group_as_primary(__("Status")); } From b840271d2a643eeeee514fe0e237f6d7b46935ef Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Thu, 30 Jan 2025 12:50:01 +0530 Subject: [PATCH 1045/1614] feat: set bank account of company to default company bank account from masters (cherry picked from commit ce7702cc199e4bef4d1c46a0450cb613392cfcba) --- erpnext/accounts/doctype/payment_entry/payment_entry.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index df6faaa768d..ef76aa07c69 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -2826,6 +2826,7 @@ def get_payment_entry( pe.paid_amount = paid_amount pe.received_amount = received_amount pe.letter_head = doc.get("letter_head") + pe.bank_account = frappe.db.get_value("Bank Account", {"is_company_account": 1, "is_default": 1}, "name") if dt in ["Purchase Order", "Sales Order", "Sales Invoice", "Purchase Invoice"]: pe.project = doc.get("project") or reduce( From 86edcfc1fdc03f71898acec0ff48f2522586ca4a Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Fri, 31 Jan 2025 13:41:06 +0530 Subject: [PATCH 1046/1614] fix: renamed Commments Tab to Notes tab in Lead doctype (cherry picked from commit 018df3135a89b413101aad084413349eeeb735ee) # Conflicts: # erpnext/crm/doctype/lead/lead.json --- erpnext/crm/doctype/lead/lead.json | 50 +++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/erpnext/crm/doctype/lead/lead.json b/erpnext/crm/doctype/lead/lead.json index 92f446d57d3..1ff2bc76b58 100644 --- a/erpnext/crm/doctype/lead/lead.json +++ b/erpnext/crm/doctype/lead/lead.json @@ -377,7 +377,7 @@ "depends_on": "eval:!doc.__islocal", "fieldname": "notes_tab", "fieldtype": "Tab Break", - "label": "Comments" + "label": "Notes" }, { "collapsible": 1, @@ -510,13 +510,61 @@ "fieldtype": "Tab Break", "label": "Connections", "show_dashboard": 1 +<<<<<<< HEAD +======= + }, + { + "fieldname": "column_break_gkxo", + "fieldtype": "Column Break" + }, + { + "fieldname": "column_break_gqka", + "fieldtype": "Column Break" + }, + { + "fieldname": "utm_content", + "fieldtype": "Data", + "label": "Content", + "print_hide": 1 + }, + { + "fieldname": "utm_source", + "fieldtype": "Link", + "label": "Source", + "oldfieldname": "source", + "oldfieldtype": "Select", + "options": "UTM Source" + }, + { + "fieldname": "utm_medium", + "fieldtype": "Link", + "label": "Medium", + "options": "UTM Medium" + }, + { + "fieldname": "utm_campaign", + "fieldtype": "Link", + "label": "Campaign", + "oldfieldname": "campaign_name", + "oldfieldtype": "Link", + "options": "UTM Campaign" + }, + { + "fieldname": "section_break_analytics", + "fieldtype": "Section Break", + "label": "Analytics" +>>>>>>> 018df3135a (fix: renamed Commments Tab to Notes tab in Lead doctype) } ], "icon": "fa fa-user", "idx": 5, "image_field": "image", "links": [], +<<<<<<< HEAD "modified": "2023-12-01 18:46:49.468526", +======= + "modified": "2025-01-31 13:40:08.094759", +>>>>>>> 018df3135a (fix: renamed Commments Tab to Notes tab in Lead doctype) "modified_by": "Administrator", "module": "CRM", "name": "Lead", From afd2529c2a6d7f6cea388abb1fdfb628bb93718d Mon Sep 17 00:00:00 2001 From: Shariq Ansari <30859809+shariquerik@users.noreply.github.com> Date: Mon, 3 Feb 2025 13:26:33 +0530 Subject: [PATCH 1047/1614] chore: resolved conflict --- erpnext/crm/doctype/lead/lead.json | 50 +----------------------------- 1 file changed, 1 insertion(+), 49 deletions(-) diff --git a/erpnext/crm/doctype/lead/lead.json b/erpnext/crm/doctype/lead/lead.json index 1ff2bc76b58..038f6bff2eb 100644 --- a/erpnext/crm/doctype/lead/lead.json +++ b/erpnext/crm/doctype/lead/lead.json @@ -510,61 +510,13 @@ "fieldtype": "Tab Break", "label": "Connections", "show_dashboard": 1 -<<<<<<< HEAD -======= - }, - { - "fieldname": "column_break_gkxo", - "fieldtype": "Column Break" - }, - { - "fieldname": "column_break_gqka", - "fieldtype": "Column Break" - }, - { - "fieldname": "utm_content", - "fieldtype": "Data", - "label": "Content", - "print_hide": 1 - }, - { - "fieldname": "utm_source", - "fieldtype": "Link", - "label": "Source", - "oldfieldname": "source", - "oldfieldtype": "Select", - "options": "UTM Source" - }, - { - "fieldname": "utm_medium", - "fieldtype": "Link", - "label": "Medium", - "options": "UTM Medium" - }, - { - "fieldname": "utm_campaign", - "fieldtype": "Link", - "label": "Campaign", - "oldfieldname": "campaign_name", - "oldfieldtype": "Link", - "options": "UTM Campaign" - }, - { - "fieldname": "section_break_analytics", - "fieldtype": "Section Break", - "label": "Analytics" ->>>>>>> 018df3135a (fix: renamed Commments Tab to Notes tab in Lead doctype) } ], "icon": "fa fa-user", "idx": 5, "image_field": "image", "links": [], -<<<<<<< HEAD - "modified": "2023-12-01 18:46:49.468526", -======= "modified": "2025-01-31 13:40:08.094759", ->>>>>>> 018df3135a (fix: renamed Commments Tab to Notes tab in Lead doctype) "modified_by": "Administrator", "module": "CRM", "name": "Lead", @@ -632,4 +584,4 @@ "states": [], "subject_field": "title", "title_field": "title" -} \ No newline at end of file +} From b612ab582326e86f7e61f6034ff597d44d39d829 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Fri, 31 Jan 2025 11:44:51 +0530 Subject: [PATCH 1048/1614] fix: Do not check for cancelled invoices (cherry picked from commit 701fc02050058ee664b9ca0f28a1da6a73c70db8) --- erpnext/accounts/doctype/subscription/subscription.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/subscription/subscription.py b/erpnext/accounts/doctype/subscription/subscription.py index 8cf08400490..162095d2acd 100644 --- a/erpnext/accounts/doctype/subscription/subscription.py +++ b/erpnext/accounts/doctype/subscription/subscription.py @@ -634,9 +634,7 @@ class Subscription(Document): """ invoice = frappe.get_all( self.invoice_document_type, - { - "subscription": self.name, - }, + {"subscription": self.name, "docstatus": ("<", 2)}, limit=1, order_by="to_date desc", pluck="name", From 84638f58fd238e8ec420497b4f092e3904d5b729 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Fri, 31 Jan 2025 12:17:53 +0530 Subject: [PATCH 1049/1614] fix: Do not check for cancelled invoices (cherry picked from commit 2c94867b0e49384893a22a104109c299c5a3c1ff) --- erpnext/accounts/doctype/subscription/subscription.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/accounts/doctype/subscription/subscription.py b/erpnext/accounts/doctype/subscription/subscription.py index 162095d2acd..7323c819d7e 100644 --- a/erpnext/accounts/doctype/subscription/subscription.py +++ b/erpnext/accounts/doctype/subscription/subscription.py @@ -673,6 +673,7 @@ class Subscription(Document): self.invoice_document_type, { "subscription": self.name, + "docstatus": 1, "status": ["!=", "Paid"], }, ) From cf98ebf7fe9989d9042db64ccfde47c91f156dd9 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Mon, 3 Feb 2025 14:21:50 +0530 Subject: [PATCH 1050/1614] fix: track employee changes (#45674) closes https://github.com/frappe/erpnext/issues/45571 (cherry picked from commit 827afbfa2e71acf26cdc301bf39aec426093295b) --- erpnext/setup/doctype/employee/employee.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/erpnext/setup/doctype/employee/employee.json b/erpnext/setup/doctype/employee/employee.json index daf2df5a590..8948211b2e5 100644 --- a/erpnext/setup/doctype/employee/employee.json +++ b/erpnext/setup/doctype/employee/employee.json @@ -871,5 +871,6 @@ "sort_field": "modified", "sort_order": "DESC", "states": [], - "title_field": "employee_name" -} \ No newline at end of file + "title_field": "employee_name", + "track_changes": 1 +} From 7931c2d182984089f25f3348bb4ba9e075354b69 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Mon, 3 Feb 2025 15:34:29 +0530 Subject: [PATCH 1051/1614] fix: slow SABB query (cherry picked from commit 81978a0bd89cb0edf0b3f388f35eff1db3e793e9) --- erpnext/stock/serial_batch_bundle.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/erpnext/stock/serial_batch_bundle.py b/erpnext/stock/serial_batch_bundle.py index c6089284bee..650c66dd408 100644 --- a/erpnext/stock/serial_batch_bundle.py +++ b/erpnext/stock/serial_batch_bundle.py @@ -634,7 +634,6 @@ class BatchNoValuation(DeprecatedBatchNoValuation): parent = frappe.qb.DocType("Serial and Batch Bundle") child = frappe.qb.DocType("Serial and Batch Entry") - sle = frappe.qb.DocType("Stock Ledger Entry") timestamp_condition = "" if self.sle.posting_date: @@ -667,14 +666,6 @@ class BatchNoValuation(DeprecatedBatchNoValuation): & (parent.docstatus == 1) & (parent.is_cancelled == 0) & (parent.type_of_transaction.isin(["Inward", "Outward"])) - & ( - ExistsCriterion( - frappe.qb.from_(sle) - .select(sle.name) - .where((parent.name == sle.serial_and_batch_bundle) & (sle.is_cancelled == 0)) - ) - | (parent.voucher_type == "POS Invoice") - ) ) .groupby(child.batch_no) ) From 6149306b7887ecba2f1e1184408905a2b0612481 Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Tue, 4 Feb 2025 11:54:05 +0530 Subject: [PATCH 1052/1614] fix: only system manager was able to create customer & prospect (cherry picked from commit 716edeb465c0bf39e57780b304640c021bb62fa8) --- erpnext/crm/frappe_crm_api.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/erpnext/crm/frappe_crm_api.py b/erpnext/crm/frappe_crm_api.py index a00f0ba798d..0bf78429b36 100644 --- a/erpnext/crm/frappe_crm_api.py +++ b/erpnext/crm/frappe_crm_api.py @@ -31,7 +31,6 @@ def create_custom_fields_for_frappe_crm(): @frappe.whitelist() def create_prospect_against_crm_deal(): - frappe.only_for("System Manager") doc = frappe.form_dict prospect = frappe.get_doc( { @@ -152,7 +151,6 @@ def contact_exists(email, mobile_no): @frappe.whitelist() def create_customer(customer_data=None): - frappe.only_for("System Manager") if not customer_data: customer_data = frappe.form_dict From b915e7f63726daf219055a754114237264987c8e Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 4 Feb 2025 14:02:38 +0530 Subject: [PATCH 1053/1614] fix: point of sale padding (backport #45697) (#45699) fix: point of sale padding (#45697) (cherry picked from commit 51a65899ec79deb572ef99946beec060a654cf9b) Co-authored-by: Diptanil Saha --- erpnext/public/scss/point-of-sale.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/public/scss/point-of-sale.scss b/erpnext/public/scss/point-of-sale.scss index 75bbabd98e2..d5215549756 100644 --- a/erpnext/public/scss/point-of-sale.scss +++ b/erpnext/public/scss/point-of-sale.scss @@ -2,6 +2,7 @@ display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: var(--margin-md); + padding: 1%; section { min-height: 45rem; From 6113cc1e43ea15d76b22b59996636b3cbaffb963 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 4 Feb 2025 15:14:08 +0530 Subject: [PATCH 1054/1614] fix: pos payment cash shortcut decimal (backport #45702) (#45705) fix: pos payment cash shortcut decimal (#45702) (cherry picked from commit a20116816e0f29c2a565a0875d9a3ed18f2a7953) Co-authored-by: Diptanil Saha --- erpnext/selling/page/point_of_sale/pos_payment.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/selling/page/point_of_sale/pos_payment.js b/erpnext/selling/page/point_of_sale/pos_payment.js index 92349d27aca..0adbf2280dc 100644 --- a/erpnext/selling/page/point_of_sale/pos_payment.js +++ b/erpnext/selling/page/point_of_sale/pos_payment.js @@ -462,7 +462,7 @@ erpnext.PointOfSale.Payment = class { this.$payment_modes.find(".cash-shortcuts").remove(); let shortcuts_html = shortcuts .map((s) => { - return `
${format_currency(s, currency, 0)}
`; + return `
${format_currency(s, currency)}
`; }) .join(""); From a948f2e095a7fc859f66d382767572edffebfaea Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Tue, 4 Feb 2025 13:02:52 +0530 Subject: [PATCH 1055/1614] feat: report to find incorrect SABB (cherry picked from commit 7e24395e00819b73e0b9879dd38cc4ac9a144d78) --- erpnext/stock/deprecated_serial_batch.py | 2 +- .../__init__.py | 0 .../incorrect_serial_and_batch_bundle.js | 47 ++++++++ .../incorrect_serial_and_batch_bundle.json | 56 +++++++++ .../incorrect_serial_and_batch_bundle.py | 107 ++++++++++++++++++ 5 files changed, 211 insertions(+), 1 deletion(-) create mode 100644 erpnext/stock/report/incorrect_serial_and_batch_bundle/__init__.py create mode 100644 erpnext/stock/report/incorrect_serial_and_batch_bundle/incorrect_serial_and_batch_bundle.js create mode 100644 erpnext/stock/report/incorrect_serial_and_batch_bundle/incorrect_serial_and_batch_bundle.json create mode 100644 erpnext/stock/report/incorrect_serial_and_batch_bundle/incorrect_serial_and_batch_bundle.py diff --git a/erpnext/stock/deprecated_serial_batch.py b/erpnext/stock/deprecated_serial_batch.py index 38e820c4c4f..5ab862b51b3 100644 --- a/erpnext/stock/deprecated_serial_batch.py +++ b/erpnext/stock/deprecated_serial_batch.py @@ -169,7 +169,7 @@ class DeprecatedBatchNoValuation: if not self.non_batchwise_balance_qty: continue - if self.non_batchwise_balance_qty.get(batch_no) == 0: + if not self.non_batchwise_balance_qty.get(batch_no): self.batch_avg_rate[batch_no] = 0.0 self.stock_value_differece[batch_no] = 0.0 else: diff --git a/erpnext/stock/report/incorrect_serial_and_batch_bundle/__init__.py b/erpnext/stock/report/incorrect_serial_and_batch_bundle/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/erpnext/stock/report/incorrect_serial_and_batch_bundle/incorrect_serial_and_batch_bundle.js b/erpnext/stock/report/incorrect_serial_and_batch_bundle/incorrect_serial_and_batch_bundle.js new file mode 100644 index 00000000000..dccb543115e --- /dev/null +++ b/erpnext/stock/report/incorrect_serial_and_batch_bundle/incorrect_serial_and_batch_bundle.js @@ -0,0 +1,47 @@ +// Copyright (c) 2025, Frappe Technologies Pvt. Ltd. and contributors +// For license information, please see license.txt + +frappe.query_reports["Incorrect Serial and Batch Bundle"] = { + filters: [ + { + fieldname: "item_code", + label: __("Item Code"), + fieldtype: "Link", + options: "Item", + }, + { + fieldname: "warehouse", + label: __("Warehouse"), + fieldtype: "Link", + options: "Warehouse", + }, + ], + + get_datatable_options(options) { + return Object.assign(options, { + checkboxColumn: true, + }); + }, + + onload(report) { + report.page.add_inner_button(__("Remove SABB Entry"), () => { + let indexes = frappe.query_report.datatable.rowmanager.getCheckedRows(); + let selected_rows = indexes.map((i) => frappe.query_report.data[i]); + + if (!selected_rows.length) { + frappe.throw(__("Please select a row to create a Reposting Entry")); + } else { + frappe.call({ + method: "erpnext.stock.report.incorrect_serial_and_batch_bundle.incorrect_serial_and_batch_bundle.remove_sabb_entry", + freeze: true, + args: { + selected_rows: selected_rows, + }, + callback: function (r) { + frappe.query_report.refresh(); + }, + }); + } + }); + }, +}; diff --git a/erpnext/stock/report/incorrect_serial_and_batch_bundle/incorrect_serial_and_batch_bundle.json b/erpnext/stock/report/incorrect_serial_and_batch_bundle/incorrect_serial_and_batch_bundle.json new file mode 100644 index 00000000000..11e6e4ea3d4 --- /dev/null +++ b/erpnext/stock/report/incorrect_serial_and_batch_bundle/incorrect_serial_and_batch_bundle.json @@ -0,0 +1,56 @@ +{ + "add_total_row": 0, + "columns": [], + "creation": "2025-02-03 15:39:44.521366", + "disabled": 0, + "docstatus": 0, + "doctype": "Report", + "filters": [], + "idx": 0, + "is_standard": "Yes", + "json": "{}", + "letter_head": "Test", + "letterhead": null, + "modified": "2025-02-03 15:39:47.613040", + "modified_by": "Administrator", + "module": "Stock", + "name": "Incorrect Serial and Batch Bundle", + "owner": "Administrator", + "prepared_report": 0, + "ref_doctype": "Serial and Batch Bundle", + "report_name": "Incorrect Serial and Batch Bundle", + "report_type": "Script Report", + "roles": [ + { + "role": "Stock User" + }, + { + "role": "Purchase Manager" + }, + { + "role": "Delivery Manager" + }, + { + "role": "System Manager" + }, + { + "role": "Delivery User" + }, + { + "role": "Manufacturing User" + }, + { + "role": "Purchase User" + }, + { + "role": "Stock Manager" + }, + { + "role": "Manufacturing Manager" + }, + { + "role": "Maintenance User" + } + ], + "timeout": 0 +} \ No newline at end of file diff --git a/erpnext/stock/report/incorrect_serial_and_batch_bundle/incorrect_serial_and_batch_bundle.py b/erpnext/stock/report/incorrect_serial_and_batch_bundle/incorrect_serial_and_batch_bundle.py new file mode 100644 index 00000000000..2e954ef9190 --- /dev/null +++ b/erpnext/stock/report/incorrect_serial_and_batch_bundle/incorrect_serial_and_batch_bundle.py @@ -0,0 +1,107 @@ +# Copyright (c) 2025, Frappe Technologies Pvt. Ltd. and contributors +# For license information, please see license.txt + +import frappe +from frappe import _ + + +def execute(filters: dict | None = None): + """Return columns and data for the report. + + This is the main entry point for the report. It accepts the filters as a + dictionary and should return columns and data. It is called by the framework + every time the report is refreshed or a filter is updated. + """ + columns = get_columns() + data = get_data(filters) + + return columns, data + + +def get_columns() -> list[dict]: + """Return columns for the report. + + One field definition per column, just like a DocType field definition. + """ + return [ + { + "label": _("Serial and Batch Bundle"), + "fieldname": "name", + "fieldtype": "Link", + "options": "Serial and Batch Bundle", + "width": 200, + }, + { + "label": _("Voucher Type"), + "fieldname": "voucher_type", + "fieldtype": "Data", + "width": 200, + }, + { + "label": _("Voucher No"), + "fieldname": "voucher_no", + "fieldtype": "Dynamic Link", + "options": "voucher_type", + "width": 200, + }, + { + "label": _("Voucher Detail No"), + "fieldname": "voucher_detail_no", + "fieldtype": "Data", + "width": 200, + }, + ] + + +def get_data(filters) -> list[list]: + """Return data for the report. + + The report data is a list of rows, with each row being a list of cell values. + """ + + SABB = frappe.qb.DocType("Serial And Batch Bundle") + SLE = frappe.qb.DocType("Stock Ledger Entry") + ignore_voycher_types = [ + "Installation Note", + "Job Card", + "Maintenance Schedule", + "Pick List", + ] + + query = ( + frappe.qb.from_(SABB) + .left_join(SLE) + .on(SABB.name == SLE.serial_and_batch_bundle) + .select( + SABB.name, + SABB.voucher_type, + SABB.voucher_no, + SABB.voucher_detail_no, + ) + .where( + (SLE.serial_and_batch_bundle.isnull()) + & (SABB.docstatus == 1) + & (SABB.is_cancelled == 0) + & (SABB.voucher_type.notin(ignore_voycher_types)) + ) + ) + + for field in filters: + query = query.where(SABB[field] == filters[field]) + + data = query.run(as_dict=1) + + return data + + +@frappe.whitelist() +def remove_sabb_entry(selected_rows): + if isinstance(selected_rows, str): + selected_rows = frappe.parse_json(selected_rows) + + for row in selected_rows: + doc = frappe.get_doc("Serial and Batch Bundle", row.get("name")) + doc.cancel() + doc.delete() + + frappe.msgprint(_("Selected Serial and Batch Bundle entries have been removed.")) From 32bfc2f5553661c2ba46109e6b22bdbea963a108 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Fri, 31 Jan 2025 23:04:54 +0530 Subject: [PATCH 1056/1614] fix: not able to make manufacturing entry for alternate items (cherry picked from commit 1607aa1a448ab5f6c19ded84d52319b2b86a57b0) (cherry picked from commit eef2f3c5d4861c1e77248581549a3ca95d2b5b56) --- .../doctype/work_order/test_work_order.py | 53 +++++++++++++++++++ .../stock/doctype/stock_entry/stock_entry.py | 7 ++- 2 files changed, 58 insertions(+), 2 deletions(-) diff --git a/erpnext/manufacturing/doctype/work_order/test_work_order.py b/erpnext/manufacturing/doctype/work_order/test_work_order.py index f94e4a56c7c..205ca1dbdb4 100644 --- a/erpnext/manufacturing/doctype/work_order/test_work_order.py +++ b/erpnext/manufacturing/doctype/work_order/test_work_order.py @@ -2367,6 +2367,59 @@ class TestWorkOrder(FrappeTestCase): stock_entry.submit() + def test_components_alternate_item_for_bom_based_manufacture_entry(self): + frappe.db.set_single_value("Manufacturing Settings", "backflush_raw_materials_based_on", "BOM") + frappe.db.set_single_value("Manufacturing Settings", "validate_components_quantities_per_bom", 1) + + fg_item = "Test FG Item For Component Validation for alternate item" + source_warehouse = "Stores - _TC" + raw_materials = ["Test Component Validation RM Item 112", "Test Component Validation RM Item 22"] + alternate_item = ["Alternate Test Component Validation RM Item 1"] + + make_item(fg_item, {"is_stock_item": 1}) + for item in raw_materials + alternate_item: + make_item(item, {"is_stock_item": 1, "allow_alternative_item": 1}) + test_stock_entry.make_stock_entry( + item_code=item, + target=source_warehouse, + qty=10, + basic_rate=100, + ) + + frappe.get_doc( + { + "doctype": "Item Alternative", + "item_code": raw_materials[0], + "alternative_item_code": alternate_item[0], + "two_way": 1, + } + ).insert() + + make_bom(item=fg_item, source_warehouse=source_warehouse, raw_materials=raw_materials) + + wo = make_wo_order_test_record( + item=fg_item, + qty=10, + source_warehouse=source_warehouse, + ) + + transfer_entry = frappe.get_doc(make_stock_entry(wo.name, "Material Transfer for Manufacture", 10)) + transfer_entry.save() + transfer_entry.items[0].item_code = alternate_item[0] + transfer_entry.items[0].original_item = raw_materials[0] + transfer_entry.submit() + + self.assertTrue(transfer_entry.docstatus == 1) + + manufacture_entry = frappe.get_doc(make_stock_entry(wo.name, "Manufacture", 10)) + manufacture_entry.save() + self.assertTrue(manufacture_entry.items[0].item_code == alternate_item[0]) + self.assertTrue(manufacture_entry.items[0].original_item == raw_materials[0]) + + manufacture_entry.submit() + + frappe.db.set_single_value("Manufacturing Settings", "validate_components_quantities_per_bom", 0) + def test_components_qty_for_bom_based_manufacture_entry(self): frappe.db.set_single_value("Manufacturing Settings", "backflush_raw_materials_based_on", "BOM") frappe.db.set_single_value("Manufacturing Settings", "validate_components_quantities_per_bom", 1) diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index eec30f69f36..95d6d7079b7 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -749,7 +749,7 @@ class StockEntry(StockController): def get_matched_items(self, item_code): for row in self.items: - if row.item_code == item_code: + if row.item_code == item_code or row.original_item == item_code: return row return {} @@ -1839,7 +1839,7 @@ class StockEntry(StockController): item_wh = frappe._dict(item_wh) - for item in item_dict.values(): + for original_item, item in item_dict.items(): if self.pro_doc and cint(self.pro_doc.from_wip_warehouse): item["from_warehouse"] = self.pro_doc.wip_warehouse # Get Reserve Warehouse from Subcontract Order @@ -1852,6 +1852,9 @@ class StockEntry(StockController): self.to_warehouse if self.purpose == "Send to Subcontractor" else "" ) + if original_item != item.get("item_code"): + item["original_item"] = original_item + self.add_to_stock_entry_detail(item_dict) # fetch the serial_no of the first stock entry for the second stock entry From 5319683dbf2ec2e9fb4727cf6e9dd90767f06252 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Tue, 4 Feb 2025 13:18:44 +0530 Subject: [PATCH 1057/1614] fix: subcontracting valiation precision issue (cherry picked from commit 8720d412bdfe584b98ebba785800691ded15e3f9) --- erpnext/controllers/subcontracting_controller.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/erpnext/controllers/subcontracting_controller.py b/erpnext/controllers/subcontracting_controller.py index 349a15703fb..b6a7f715d22 100644 --- a/erpnext/controllers/subcontracting_controller.py +++ b/erpnext/controllers/subcontracting_controller.py @@ -113,11 +113,10 @@ class SubcontractingController(StockController): ) item.sc_conversion_factor = service_item_qty / item.qty - if ( - self.doctype not in "Subcontracting Receipt" - and item.qty - > flt(get_pending_sco_qty(self.purchase_order).get(item.purchase_order_item)) - / item.sc_conversion_factor + if self.doctype not in "Subcontracting Receipt" and item.qty > flt( + get_pending_sco_qty(self.purchase_order).get(item.purchase_order_item) + / item.sc_conversion_factor, + frappe.get_precision("Purchase Order Item", "qty"), ): frappe.throw( _( From fea51b708607a78a744f7ce851b2a460e90dcf55 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Tue, 4 Feb 2025 10:23:41 +0000 Subject: [PATCH 1058/1614] chore(release): Bumped to Version 15.50.1 ## [15.50.1](https://github.com/frappe/erpnext/compare/v15.50.0...v15.50.1) (2025-02-04) ### Bug Fixes * not able to make manufacturing entry for alternate items ([32bfc2f](https://github.com/frappe/erpnext/commit/32bfc2f5553661c2ba46109e6b22bdbea963a108)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index dfdeee49bc9..18b66e88a64 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.50.0" +__version__ = "15.50.1" def get_default_company(user=None): From aa27e19a58bce878b4b34a74bd679bfebbd6b236 Mon Sep 17 00:00:00 2001 From: Aayush Dalal Date: Tue, 4 Feb 2025 17:14:01 +0530 Subject: [PATCH 1059/1614] fix: handling company in bank reconciliation tool (#45582) Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com> (cherry picked from commit d1c927530edff40763c78d81579bb83a60a7a00c) --- .../bank_reconciliation_tool.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.js b/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.js index 7a653e12c72..d0910a8e68c 100644 --- a/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.js +++ b/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.js @@ -19,10 +19,15 @@ frappe.ui.form.on("Bank Reconciliation Tool", { }, onload: function (frm) { + if (!frm.doc.company) { + frm.set_value("company", frappe.defaults.get_default("company")); + } + // Set default filter dates let today = frappe.datetime.get_today(); frm.doc.bank_statement_from_date = frappe.datetime.add_months(today, -1); frm.doc.bank_statement_to_date = today; + frm.trigger("bank_account"); }, @@ -98,7 +103,7 @@ frappe.ui.form.on("Bank Reconciliation Tool", { make_reconciliation_tool(frm) { frm.get_field("reconciliation_tool_cards").$wrapper.empty(); - if (frm.doc.bank_account && frm.doc.bank_statement_to_date) { + if (frm.doc.company && frm.doc.bank_account && frm.doc.bank_statement_to_date) { frm.trigger("get_cleared_balance").then(() => { if ( frm.doc.bank_account && @@ -114,7 +119,7 @@ frappe.ui.form.on("Bank Reconciliation Tool", { }, get_account_opening_balance(frm) { - if (frm.doc.bank_account && frm.doc.bank_statement_from_date) { + if (frm.doc.company && frm.doc.bank_account && frm.doc.bank_statement_from_date) { frappe.call({ method: "erpnext.accounts.doctype.bank_reconciliation_tool.bank_reconciliation_tool.get_account_balance", args: { @@ -130,7 +135,7 @@ frappe.ui.form.on("Bank Reconciliation Tool", { }, get_cleared_balance(frm) { - if (frm.doc.bank_account && frm.doc.bank_statement_to_date) { + if (frm.doc.company && frm.doc.bank_account && frm.doc.bank_statement_to_date) { return frappe.call({ method: "erpnext.accounts.doctype.bank_reconciliation_tool.bank_reconciliation_tool.get_account_balance", args: { From 34f8a370d1deff8a8b20ca5b019c84e366850665 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Tue, 4 Feb 2025 16:27:15 +0530 Subject: [PATCH 1060/1614] fix: show only items with inspection enabled on create QI dialog (cherry picked from commit c92ec312b926f44ccf3d4343a3cfdc39e0b4bcf0) # Conflicts: # erpnext/controllers/stock_controller.py --- erpnext/controllers/stock_controller.py | 23 +++++++++ erpnext/public/js/controllers/transaction.js | 50 ++++++++++++-------- 2 files changed, 53 insertions(+), 20 deletions(-) diff --git a/erpnext/controllers/stock_controller.py b/erpnext/controllers/stock_controller.py index 47a1c400faa..9dfaae7188e 100644 --- a/erpnext/controllers/stock_controller.py +++ b/erpnext/controllers/stock_controller.py @@ -1565,7 +1565,30 @@ def repost_required_for_queue(doc: StockController) -> bool: @frappe.whitelist() +<<<<<<< HEAD def make_quality_inspections(doctype, docname, items): +======= +def check_item_quality_inspection(doctype, items): + if isinstance(items, str): + items = json.loads(items) + + inspection_fieldname_map = { + "Purchase Receipt": "inspection_required_before_purchase", + "Purchase Invoice": "inspection_required_before_purchase", + "Subcontracting Receipt": "inspection_required_before_purchase", + "Sales Invoice": "inspection_required_before_delivery", + "Delivery Note": "inspection_required_before_delivery", + } + + for item in items: + if not frappe.db.get_value("Item", item.get("item_code"), inspection_fieldname_map.get(doctype)): + items.remove(item) + return items + + +@frappe.whitelist() +def make_quality_inspections(doctype, docname, items, inspection_type): +>>>>>>> c92ec312b9 (fix: show only items with inspection enabled on create QI dialog) if isinstance(items, str): items = json.loads(items) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 86c9ef46c78..81a8a617e64 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -2367,29 +2367,39 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe primary_action_label: __("Create") }); - this.frm.doc.items.forEach(item => { - if (this.has_inspection_required(item)) { - let dialog_items = dialog.fields_dict.items; - dialog_items.df.data.push({ - "item_code": item.item_code, - "item_name": item.item_name, - "qty": item.qty, - "description": item.description, - "serial_no": item.serial_no, - "batch_no": item.batch_no, - "sample_size": item.sample_quantity, - "child_row_reference": item.name, + frappe.call({ + method: "erpnext.controllers.stock_controller.check_item_quality_inspection", + args: { + doctype: this.frm.doc.doctype, + items: this.frm.doc.items + }, + freeze: true, + callback: function (r) { + r.message.forEach(item => { + if (me.has_inspection_required(item)) { + let dialog_items = dialog.fields_dict.items; + dialog_items.df.data.push({ + "item_code": item.item_code, + "item_name": item.item_name, + "qty": item.qty, + "description": item.description, + "serial_no": item.serial_no, + "batch_no": item.batch_no, + "sample_size": item.sample_quantity, + "child_row_reference": item.name, + }); + dialog_items.grid.refresh(); + } }); - dialog_items.grid.refresh(); + + data = dialog.fields_dict.items.df.data; + if (!data.length) { + frappe.msgprint(__("All items in this document already have a linked Quality Inspection.")); + } else { + dialog.show(); + } } }); - - data = dialog.fields_dict.items.df.data; - if (!data.length) { - frappe.msgprint(__("All items in this document already have a linked Quality Inspection.")); - } else { - dialog.show(); - } } has_inspection_required(item) { From 401fd7fca7966bc2719ab0174b50d238f0b6d5ae Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Tue, 4 Feb 2025 17:50:26 +0530 Subject: [PATCH 1061/1614] fix: semgrep (cherry picked from commit ffd10d1fe95bc85485be90cb6a2bbbb04d5bf690) --- erpnext/controllers/stock_controller.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/erpnext/controllers/stock_controller.py b/erpnext/controllers/stock_controller.py index 9dfaae7188e..5ff03eb0a51 100644 --- a/erpnext/controllers/stock_controller.py +++ b/erpnext/controllers/stock_controller.py @@ -1580,9 +1580,12 @@ def check_item_quality_inspection(doctype, items): "Delivery Note": "inspection_required_before_delivery", } + items_to_remove = [] for item in items: if not frappe.db.get_value("Item", item.get("item_code"), inspection_fieldname_map.get(doctype)): - items.remove(item) + items_to_remove.append(item) + items = [item for item in items if item not in items_to_remove] + return items From f9794e5b446b9a851a16376c14b7b02c59bc99fb Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Mon, 3 Feb 2025 14:49:50 +0530 Subject: [PATCH 1062/1614] fix: copy correct uom from devliery note when creating packing list (cherry picked from commit 3cdaa805268e91dde7cfa0cb0d00dd74d80bbcb7) --- erpnext/stock/doctype/delivery_note/delivery_note.py | 2 +- erpnext/stock/doctype/packing_slip/packing_slip.py | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.py b/erpnext/stock/doctype/delivery_note/delivery_note.py index 76e5b4ea972..39527c9ec47 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note.py +++ b/erpnext/stock/doctype/delivery_note/delivery_note.py @@ -1132,7 +1132,7 @@ def make_packing_slip(source_name, target_doc=None): "batch_no": "batch_no", "description": "description", "qty": "qty", - "stock_uom": "stock_uom", + "uom": "stock_uom", "name": "dn_detail", }, "postprocess": update_item, diff --git a/erpnext/stock/doctype/packing_slip/packing_slip.py b/erpnext/stock/doctype/packing_slip/packing_slip.py index 8f8e8dcc1d8..fe28b3c5397 100644 --- a/erpnext/stock/doctype/packing_slip/packing_slip.py +++ b/erpnext/stock/doctype/packing_slip/packing_slip.py @@ -159,11 +159,10 @@ class PackingSlip(StatusUpdater): self.from_case_no = self.get_recommended_case_no() for item in self.items: - stock_uom, weight_per_unit, weight_uom = frappe.db.get_value( - "Item", item.item_code, ["stock_uom", "weight_per_unit", "weight_uom"] + weight_per_unit, weight_uom = frappe.db.get_value( + "Item", item.item_code, ["weight_per_unit", "weight_uom"] ) - item.stock_uom = stock_uom if weight_per_unit and not item.net_weight: item.net_weight = weight_per_unit if weight_uom and not item.weight_uom: From 47d1c3b5a386f8abf464460522f07754a26d4948 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Wed, 5 Feb 2025 05:29:23 +0530 Subject: [PATCH 1063/1614] fix: closing stock balance report not generating --- .../stock/doctype/closing_stock_balance/closing_stock_balance.py | 1 - erpnext/stock/report/stock_balance/stock_balance.py | 1 - 2 files changed, 2 deletions(-) diff --git a/erpnext/stock/doctype/closing_stock_balance/closing_stock_balance.py b/erpnext/stock/doctype/closing_stock_balance/closing_stock_balance.py index 8aa49f7cfd8..502f02c655e 100644 --- a/erpnext/stock/doctype/closing_stock_balance/closing_stock_balance.py +++ b/erpnext/stock/doctype/closing_stock_balance/closing_stock_balance.py @@ -116,7 +116,6 @@ class ClosingStockBalance(Document): "item_group": self.item_group, "warehouse_type": self.warehouse_type, "include_uom": self.include_uom, - "ignore_closing_balance": 1, "show_variant_attributes": 1, "show_stock_ageing_data": 1, } diff --git a/erpnext/stock/report/stock_balance/stock_balance.py b/erpnext/stock/report/stock_balance/stock_balance.py index 8ea07338cf1..6b5a3661a37 100644 --- a/erpnext/stock/report/stock_balance/stock_balance.py +++ b/erpnext/stock/report/stock_balance/stock_balance.py @@ -317,7 +317,6 @@ class StockBalanceReport: .where((sle.docstatus < 2) & (sle.is_cancelled == 0)) .orderby(sle.posting_datetime) .orderby(sle.creation) - .orderby(sle.actual_qty) ) query = self.apply_inventory_dimensions_filters(query, sle) From 3689a2deae227ae9cce2fe52ced117053d570530 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Wed, 5 Feb 2025 12:00:01 +0530 Subject: [PATCH 1064/1614] chore: resolve conflicts --- erpnext/controllers/stock_controller.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/erpnext/controllers/stock_controller.py b/erpnext/controllers/stock_controller.py index 5ff03eb0a51..fd92fe104cc 100644 --- a/erpnext/controllers/stock_controller.py +++ b/erpnext/controllers/stock_controller.py @@ -1564,10 +1564,6 @@ def repost_required_for_queue(doc: StockController) -> bool: return False -@frappe.whitelist() -<<<<<<< HEAD -def make_quality_inspections(doctype, docname, items): -======= def check_item_quality_inspection(doctype, items): if isinstance(items, str): items = json.loads(items) @@ -1590,8 +1586,7 @@ def check_item_quality_inspection(doctype, items): @frappe.whitelist() -def make_quality_inspections(doctype, docname, items, inspection_type): ->>>>>>> c92ec312b9 (fix: show only items with inspection enabled on create QI dialog) +def make_quality_inspections(doctype, docname, items): if isinstance(items, str): items = json.loads(items) From 8108d7fdba96dfcef6f3c6252fbd8a4ac60794d0 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Thu, 30 Jan 2025 12:32:14 +0530 Subject: [PATCH 1065/1614] fix: respect user set account if not advance account for getting outstanding invoices in payment entry (cherry picked from commit 9faf78d3e54c6f288dfb5715d06544827f6ab4fe) --- .../doctype/payment_entry/payment_entry.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index ef76aa07c69..95e910d3efb 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -1798,7 +1798,7 @@ class PaymentEntry(AccountsController): paid_amount -= sum(flt(d.amount, precision) for d in self.deductions) for ref in self.references: - reference_outstanding_amount = ref.outstanding_amount + reference_outstanding_amount = flt(ref.outstanding_amount) abs_outstanding_amount = abs(reference_outstanding_amount) if reference_outstanding_amount > 0: @@ -2243,10 +2243,17 @@ def get_outstanding_reference_documents(args, validate=False): outstanding_invoices = [] negative_outstanding_invoices = [] + party_account = args.get("party_account") + + # get party account if advance account is set. if args.get("book_advance_payments_in_separate_party_account"): - party_account = get_party_account(args.get("party_type"), args.get("party"), args.get("company")) - else: - party_account = args.get("party_account") + accounts = get_party_account( + args.get("party_type"), args.get("party"), args.get("company"), include_advance=True + ) + advnace_account = accounts[1] if len(accounts) >= 1 else None + + if party_account == advnace_account: + party_account = accounts[0] if args.get("get_outstanding_invoices"): outstanding_invoices = get_outstanding_invoices( From b926b49afaf69123fde1b593feec5017bed2cd56 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Wed, 5 Feb 2025 11:52:52 +0530 Subject: [PATCH 1066/1614] chore: fix typo (cherry picked from commit 85378f9d1ae1ffa12f4ef1fe924a51865dbd5246) --- erpnext/accounts/doctype/payment_entry/payment_entry.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index 95e910d3efb..a63d8d87807 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -2250,9 +2250,9 @@ def get_outstanding_reference_documents(args, validate=False): accounts = get_party_account( args.get("party_type"), args.get("party"), args.get("company"), include_advance=True ) - advnace_account = accounts[1] if len(accounts) >= 1 else None + advance_account = accounts[1] if len(accounts) >= 1 else None - if party_account == advnace_account: + if party_account == advance_account: party_account = accounts[0] if args.get("get_outstanding_invoices"): From 2a25302c35a6baaa8aa0febe1b6c58a7247cb8b5 Mon Sep 17 00:00:00 2001 From: Sudharsanan11 Date: Mon, 3 Feb 2025 18:27:32 +0530 Subject: [PATCH 1067/1614] fix: allow multiple email ids (cherry picked from commit 423decb93c4249c979e078e1c342ce068e012fad) --- .../process_statement_of_accounts.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.py b/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.py index 6910559b8b4..2fa70f84751 100644 --- a/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.py +++ b/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.py @@ -321,9 +321,11 @@ def get_recipients_and_cc(customer, doc): recipients = [] for clist in doc.customers: if clist.customer == customer: - recipients.append(clist.billing_email) + for email in clist.billing_email.split(","): + recipients.append(email.strip()) if doc.primary_mandatory and clist.primary_email: - recipients.append(clist.primary_email) + for email in clist.primary_email.split(","): + recipients.append(email.strip()) cc = [] if doc.cc_to != "": try: From 44d9fb7a699805eb40272352de49c66ea6bda859 Mon Sep 17 00:00:00 2001 From: Sudharsanan11 Date: Tue, 4 Feb 2025 10:59:10 +0530 Subject: [PATCH 1068/1614] fix: check billing address (cherry picked from commit 9950e4aa0c53ce8fb128d534c0438f7dea78fea0) --- .../process_statement_of_accounts.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.py b/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.py index 2fa70f84751..cee7a238df0 100644 --- a/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.py +++ b/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.py @@ -321,8 +321,9 @@ def get_recipients_and_cc(customer, doc): recipients = [] for clist in doc.customers: if clist.customer == customer: - for email in clist.billing_email.split(","): - recipients.append(email.strip()) + if clist.billing_email: + for email in clist.billing_email.split(","): + recipients.append(email.strip()) if doc.primary_mandatory and clist.primary_email: for email in clist.primary_email.split(","): recipients.append(email.strip()) From 0b54cb9a7cb15bab8368993d7fccf302689d990a Mon Sep 17 00:00:00 2001 From: venkat102 Date: Sat, 25 Jan 2025 12:59:04 +0530 Subject: [PATCH 1069/1614] fix(pos): add item in the existing item row when discount is applied (cherry picked from commit bee2c04d0bd882f32f417a3664e5a7586383a239) --- erpnext/selling/page/point_of_sale/pos_controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/selling/page/point_of_sale/pos_controller.js b/erpnext/selling/page/point_of_sale/pos_controller.js index 741a902fccd..9334786ae86 100644 --- a/erpnext/selling/page/point_of_sale/pos_controller.js +++ b/erpnext/selling/page/point_of_sale/pos_controller.js @@ -682,7 +682,7 @@ erpnext.PointOfSale.Controller = class { i.item_code === item_code && (!has_batch_no || (has_batch_no && i.batch_no === batch_no)) && i.uom === uom && - i.rate === flt(rate) + i.price_list_rate === flt(rate) ); } From 1ad16c368e552f8a39ca19eec31c8847dbc10b2c Mon Sep 17 00:00:00 2001 From: l0gesh29 Date: Wed, 29 Jan 2025 15:37:38 +0530 Subject: [PATCH 1070/1614] fix: remove tds account in taxes table on change of Tax Withholding Category (cherry picked from commit 79b5a3e1dd52e8451a00c25844aca7f6a986b53d) --- .../doctype/purchase_invoice/purchase_invoice.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js index dd8758e68a3..a2d02981d64 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js @@ -368,6 +368,18 @@ erpnext.accounts.PurchaseInvoice = class PurchaseInvoice extends erpnext.buying. } } + tax_withholding_category(frm) { + var me = this; + let filtered_taxes = (me.frm.doc.taxes || []).filter((row) => !row.is_tax_withholding_account); + me.frm.clear_table("taxes"); + + filtered_taxes.forEach((row) => { + me.frm.add_child("taxes", row); + }); + + me.frm.refresh_field("taxes"); + } + credit_to() { var me = this; if (this.frm.doc.credit_to) { From bbecd36a5dd65bb138c9f8b2528abd92cf886745 Mon Sep 17 00:00:00 2001 From: rahulgupta8848 <147691594+rahulgupta8848@users.noreply.github.com> Date: Sun, 1 Sep 2024 10:39:48 +0530 Subject: [PATCH 1071/1614] =?UTF-8?q?feat:=20account=20heads=20changed=20a?= =?UTF-8?q?long=20with=20journal=20entry=20type=20and=20descrip=E2=80=A6?= =?UTF-8?q?=20(#42845)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: account heads changed along with journal entry type and description * feat: added patch for difference_amount for asset value adjustment and refactor --------- Co-authored-by: “rahulgupta8848” <“rahul.gupta@8848digital.com”> (cherry picked from commit d4fdada83cf0fc2580b4267b137296e30133bdef) # Conflicts: # erpnext/assets/doctype/asset_value_adjustment/asset_value_adjustment.json # erpnext/patches.txt --- .../asset_value_adjustment.js | 22 +++++++- .../asset_value_adjustment.json | 15 +++++ .../asset_value_adjustment.py | 56 +++++++++++++------ .../test_asset_value_adjustment.py | 56 +++++++++++++++++-- erpnext/hooks.py | 2 + erpnext/patches.txt | 6 +- ...erence_amount_in_asset_value_adjustment.py | 10 ++++ 7 files changed, 144 insertions(+), 23 deletions(-) create mode 100644 erpnext/patches/v15_0/set_difference_amount_in_asset_value_adjustment.py diff --git a/erpnext/assets/doctype/asset_value_adjustment/asset_value_adjustment.js b/erpnext/assets/doctype/asset_value_adjustment/asset_value_adjustment.js index 7fbe6d0bd12..4435b2b1845 100644 --- a/erpnext/assets/doctype/asset_value_adjustment/asset_value_adjustment.js +++ b/erpnext/assets/doctype/asset_value_adjustment/asset_value_adjustment.js @@ -5,7 +5,6 @@ frappe.provide("erpnext.accounts.dimensions"); frappe.ui.form.on("Asset Value Adjustment", { setup: function (frm) { - frm.add_fetch("company", "cost_center", "cost_center"); frm.set_query("cost_center", function () { return { filters: { @@ -22,6 +21,14 @@ frappe.ui.form.on("Asset Value Adjustment", { }, }; }); + frm.set_query("difference_account", function () { + return { + filters: { + company: frm.doc.company, + is_group: 0, + }, + }; + }); }, onload: function (frm) { @@ -37,7 +44,7 @@ frappe.ui.form.on("Asset Value Adjustment", { }, asset: function (frm) { - frm.trigger("set_current_asset_value"); + frm.trigger("set_acc_dimension"); }, finance_book: function (frm) { @@ -60,4 +67,15 @@ frappe.ui.form.on("Asset Value Adjustment", { }); } }, + + set_acc_dimension: function (frm) { + if (frm.doc.asset) { + frm.call({ + method: "erpnext.assets.doctype.asset_value_adjustment.asset_value_adjustment.get_value_of_accounting_dimensions", + args: { + asset_name: frm.doc.asset, + }, + }); + } + }, }); diff --git a/erpnext/assets/doctype/asset_value_adjustment/asset_value_adjustment.json b/erpnext/assets/doctype/asset_value_adjustment/asset_value_adjustment.json index 57e04e2567f..e2695979bd2 100644 --- a/erpnext/assets/doctype/asset_value_adjustment/asset_value_adjustment.json +++ b/erpnext/assets/doctype/asset_value_adjustment/asset_value_adjustment.json @@ -17,6 +17,7 @@ "new_asset_value", "column_break_11", "difference_amount", + "difference_account", "journal_entry", "accounting_dimensions_section", "cost_center", @@ -54,6 +55,7 @@ "fieldtype": "Link", "label": "Journal Entry", "options": "Journal Entry", + "no_copy": 1, "read_only": 1 }, { @@ -79,6 +81,7 @@ "fieldtype": "Currency", "in_list_view": 1, "label": "New Asset Value", + "no_copy": 1, "reqd": 1 }, { @@ -120,12 +123,24 @@ { "fieldname": "column_break_11", "fieldtype": "Column Break" + }, + { + "fieldname": "difference_account", + "fieldtype": "Link", + "label": "Difference Account", + "no_copy": 1, + "options": "Account", + "reqd": 1 } ], "index_web_pages_for_search": 1, "is_submittable": 1, "links": [], +<<<<<<< HEAD "modified": "2021-01-22 14:10:23.085181", +======= + "modified": "2024-08-13 16:21:18.639208", +>>>>>>> d4fdada83c (feat: account heads changed along with journal entry type and descrip… (#42845)) "modified_by": "Administrator", "module": "Assets", "name": "Asset Value Adjustment", diff --git a/erpnext/assets/doctype/asset_value_adjustment/asset_value_adjustment.py b/erpnext/assets/doctype/asset_value_adjustment/asset_value_adjustment.py index 9b0212b037f..6766b827f7f 100644 --- a/erpnext/assets/doctype/asset_value_adjustment/asset_value_adjustment.py +++ b/erpnext/assets/doctype/asset_value_adjustment/asset_value_adjustment.py @@ -34,6 +34,7 @@ class AssetValueAdjustment(Document): cost_center: DF.Link | None current_asset_value: DF.Currency date: DF.Date + difference_account: DF.Link difference_amount: DF.Currency finance_book: DF.Link | None journal_entry: DF.Link | None @@ -47,6 +48,7 @@ class AssetValueAdjustment(Document): def on_submit(self): self.make_depreciation_entry() + self.set_value_after_depreciation() self.update_asset(self.new_asset_value) add_asset_activity( self.asset, @@ -76,7 +78,10 @@ class AssetValueAdjustment(Document): ) def set_difference_amount(self): - self.difference_amount = flt(self.current_asset_value - self.new_asset_value) + self.difference_amount = flt(self.new_asset_value - self.current_asset_value) + + def set_value_after_depreciation(self): + frappe.db.set_value("Asset", self.asset, "value_after_depreciation", self.new_asset_value) def set_current_asset_value(self): if not self.current_asset_value and self.asset: @@ -85,7 +90,7 @@ class AssetValueAdjustment(Document): def make_depreciation_entry(self): asset = frappe.get_doc("Asset", self.asset) ( - _, + fixed_asset_account, accumulated_depreciation_account, depreciation_expense_account, ) = get_depreciation_accounts(asset.asset_category, asset.company) @@ -95,28 +100,41 @@ class AssetValueAdjustment(Document): ) je = frappe.new_doc("Journal Entry") - je.voucher_type = "Depreciation Entry" + je.voucher_type = "Journal Entry" je.naming_series = depreciation_series je.posting_date = self.date je.company = self.company - je.remark = f"Depreciation Entry against {self.asset} worth {self.difference_amount}" + je.remark = f"Revaluation Entry against {self.asset} worth {self.difference_amount}" je.finance_book = self.finance_book - credit_entry = { - "account": accumulated_depreciation_account, - "credit_in_account_currency": self.difference_amount, - "cost_center": depreciation_cost_center or self.cost_center, + entry_template = { + "cost_center": self.cost_center or depreciation_cost_center, "reference_type": "Asset", - "reference_name": self.asset, + "reference_name": asset.name, } - debit_entry = { - "account": depreciation_expense_account, - "debit_in_account_currency": self.difference_amount, - "cost_center": depreciation_cost_center or self.cost_center, - "reference_type": "Asset", - "reference_name": self.asset, - } + if self.difference_amount < 0: + credit_entry = { + "account": fixed_asset_account, + "credit_in_account_currency": -self.difference_amount, + **entry_template, + } + debit_entry = { + "account": self.difference_account, + "debit_in_account_currency": -self.difference_amount, + **entry_template, + } + elif self.difference_amount > 0: + credit_entry = { + "account": self.difference_account, + "credit_in_account_currency": self.difference_amount, + **entry_template, + } + debit_entry = { + "account": fixed_asset_account, + "debit_in_account_currency": self.difference_amount, + **entry_template, + } accounting_dimensions = get_checks_for_pl_and_bs_accounts() @@ -179,3 +197,9 @@ class AssetValueAdjustment(Document): ) asset.flags.ignore_validate_update_after_submit = True asset.save() + + +@frappe.whitelist() +def get_value_of_accounting_dimensions(asset_name): + dimension_fields = [*frappe.get_list("Accounting Dimension", pluck="fieldname"), "cost_center"] + return frappe.db.get_value("Asset", asset_name, fieldname=dimension_fields, as_dict=True) diff --git a/erpnext/assets/doctype/asset_value_adjustment/test_asset_value_adjustment.py b/erpnext/assets/doctype/asset_value_adjustment/test_asset_value_adjustment.py index 963be704524..82fa3ba17e9 100644 --- a/erpnext/assets/doctype/asset_value_adjustment/test_asset_value_adjustment.py +++ b/erpnext/assets/doctype/asset_value_adjustment/test_asset_value_adjustment.py @@ -93,8 +93,8 @@ class TestAssetValueAdjustment(unittest.TestCase): self.assertEqual(first_asset_depr_schedule.status, "Cancelled") expected_gle = ( - ("_Test Accumulated Depreciations - _TC", 0.0, 4625.29), - ("_Test Depreciations - _TC", 4625.29, 0.0), + ("_Test Difference Account - _TC", 4625.29, 0.0), + ("_Test Fixed Asset - _TC", 0.0, 4625.29), ) gle = frappe.db.sql( @@ -177,8 +177,8 @@ class TestAssetValueAdjustment(unittest.TestCase): # Test gl entry creted from asset value adjustemnet expected_gle = ( - ("_Test Accumulated Depreciations - _TC", 0.0, 5625.29), - ("_Test Depreciations - _TC", 5625.29, 0.0), + ("_Test Difference Account - _TC", 5625.29, 0.0), + ("_Test Fixed Asset - _TC", 0.0, 5625.29), ) gle = frappe.db.sql( @@ -259,6 +259,39 @@ class TestAssetValueAdjustment(unittest.TestCase): self.assertEqual(schedules, expected_schedules) + def test_difference_amount(self): + pr = make_purchase_receipt(item_code="Macbook Pro", qty=1, rate=120000.0, location="Test Location") + + asset_name = frappe.db.get_value("Asset", {"purchase_receipt": pr.name}, "name") + asset_doc = frappe.get_doc("Asset", asset_name) + asset_doc.calculate_depreciation = 1 + asset_doc.available_for_use_date = "2023-01-15" + asset_doc.purchase_date = "2023-01-15" + + asset_doc.append( + "finance_books", + { + "expected_value_after_useful_life": 200, + "depreciation_method": "Straight Line", + "total_number_of_depreciations": 12, + "frequency_of_depreciation": 1, + "depreciation_start_date": "2023-01-31", + }, + ) + asset_doc.submit() + + adj_doc = make_asset_value_adjustment( + asset=asset_doc.name, + current_asset_value=54000, + new_asset_value=50000.0, + date="2023-08-21", + ) + adj_doc.submit() + difference_amount = adj_doc.new_asset_value - adj_doc.current_asset_value + self.assertEqual(difference_amount, -4000) + asset_doc.load_from_db() + self.assertEqual(asset_doc.value_after_depreciation, 50000.0) + def make_asset_value_adjustment(**args): args = frappe._dict(args) @@ -272,7 +305,22 @@ def make_asset_value_adjustment(**args): "new_asset_value": args.new_asset_value, "current_asset_value": args.current_asset_value, "cost_center": args.cost_center or "Main - _TC", + "difference_account": make_difference_account(), } ).insert() return doc + + +def make_difference_account(**args): + account = "_Test Difference Account - _TC" + if not frappe.db.exists("Account", account): + acc = frappe.new_doc("Account") + acc.account_name = "_Test Difference Account" + acc.parent_account = "Direct Income - _TC" + acc.company = "_Test Company" + acc.is_group = 0 + acc.insert() + return acc.name + else: + return account diff --git a/erpnext/hooks.py b/erpnext/hooks.py index 653679bfb56..2b23cca886e 100644 --- a/erpnext/hooks.py +++ b/erpnext/hooks.py @@ -562,6 +562,8 @@ accounting_dimension_doctypes = [ "Payment Reconciliation", "Payment Reconciliation Allocation", "Payment Request", + "Asset Movement Item", + "Asset Depreciation Schedule", ] get_matching_queries = ( diff --git a/erpnext/patches.txt b/erpnext/patches.txt index d3651ee7060..6ddae058e55 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -378,6 +378,7 @@ erpnext.patches.v14_0.update_reports_with_range erpnext.patches.v15_0.drop_index_posting_datetime_from_sle erpnext.patches.v15_0.add_disassembly_order_stock_entry_type #1 erpnext.patches.v15_0.set_standard_stock_entry_type +<<<<<<< HEAD erpnext.patches.v15_0.link_purchase_item_to_asset_doc erpnext.patches.v14_0.update_currency_exchange_settings_for_frankfurter erpnext.patches.v15_0.update_task_assignee_email_field_in_asset_maintenance_log @@ -391,4 +392,7 @@ erpnext.patches.v15_0.rename_manufacturing_settings_field erpnext.patches.v15_0.migrate_checkbox_to_select_for_reconciliation_effect erpnext.patches.v15_0.sync_auto_reconcile_config execute:frappe.db.set_single_value("Accounts Settings", "exchange_gain_loss_posting_date", "Payment") -erpnext.patches.v14_0.disable_add_row_in_gross_profit \ No newline at end of file +erpnext.patches.v14_0.disable_add_row_in_gross_profit +======= +erpnext.patches.v15_0.set_difference_amount_in_asset_value_adjustment +>>>>>>> d4fdada83c (feat: account heads changed along with journal entry type and descrip… (#42845)) diff --git a/erpnext/patches/v15_0/set_difference_amount_in_asset_value_adjustment.py b/erpnext/patches/v15_0/set_difference_amount_in_asset_value_adjustment.py new file mode 100644 index 00000000000..bec344e5c86 --- /dev/null +++ b/erpnext/patches/v15_0/set_difference_amount_in_asset_value_adjustment.py @@ -0,0 +1,10 @@ +import frappe + + +def execute(): + AssetValueAdjustment = frappe.qb.DocType("Asset Value Adjustment") + + frappe.qb.update(AssetValueAdjustment).set( + AssetValueAdjustment.difference_amount, + AssetValueAdjustment.new_asset_value - AssetValueAdjustment.current_asset_value, + ).where(AssetValueAdjustment.docstatus != 2).run() From 223fe626380173386aeba1a43d573d46fa173d8c Mon Sep 17 00:00:00 2001 From: Khushi Rawat <142375893+khushi8112@users.noreply.github.com> Date: Wed, 5 Feb 2025 14:43:24 +0530 Subject: [PATCH 1072/1614] fix: resolved conflicts --- .../asset_value_adjustment/asset_value_adjustment.json | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/erpnext/assets/doctype/asset_value_adjustment/asset_value_adjustment.json b/erpnext/assets/doctype/asset_value_adjustment/asset_value_adjustment.json index e2695979bd2..6b5b53d9847 100644 --- a/erpnext/assets/doctype/asset_value_adjustment/asset_value_adjustment.json +++ b/erpnext/assets/doctype/asset_value_adjustment/asset_value_adjustment.json @@ -136,11 +136,7 @@ "index_web_pages_for_search": 1, "is_submittable": 1, "links": [], -<<<<<<< HEAD - "modified": "2021-01-22 14:10:23.085181", -======= "modified": "2024-08-13 16:21:18.639208", ->>>>>>> d4fdada83c (feat: account heads changed along with journal entry type and descrip… (#42845)) "modified_by": "Administrator", "module": "Assets", "name": "Asset Value Adjustment", @@ -197,4 +193,4 @@ "sort_order": "DESC", "title_field": "asset", "track_changes": 1 -} \ No newline at end of file +} From 4aa072a8eb754209d0ce42d71f3e19c5f8c7cbf5 Mon Sep 17 00:00:00 2001 From: Khushi Rawat <142375893+khushi8112@users.noreply.github.com> Date: Wed, 5 Feb 2025 14:44:39 +0530 Subject: [PATCH 1073/1614] fix: conflicts --- erpnext/patches.txt | 3 --- 1 file changed, 3 deletions(-) diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 6ddae058e55..bb76f948f3a 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -378,7 +378,6 @@ erpnext.patches.v14_0.update_reports_with_range erpnext.patches.v15_0.drop_index_posting_datetime_from_sle erpnext.patches.v15_0.add_disassembly_order_stock_entry_type #1 erpnext.patches.v15_0.set_standard_stock_entry_type -<<<<<<< HEAD erpnext.patches.v15_0.link_purchase_item_to_asset_doc erpnext.patches.v14_0.update_currency_exchange_settings_for_frankfurter erpnext.patches.v15_0.update_task_assignee_email_field_in_asset_maintenance_log @@ -393,6 +392,4 @@ erpnext.patches.v15_0.migrate_checkbox_to_select_for_reconciliation_effect erpnext.patches.v15_0.sync_auto_reconcile_config execute:frappe.db.set_single_value("Accounts Settings", "exchange_gain_loss_posting_date", "Payment") erpnext.patches.v14_0.disable_add_row_in_gross_profit -======= erpnext.patches.v15_0.set_difference_amount_in_asset_value_adjustment ->>>>>>> d4fdada83c (feat: account heads changed along with journal entry type and descrip… (#42845)) From ca4bb96fb4182d784444ee704679550ec6368806 Mon Sep 17 00:00:00 2001 From: Ejaaz Khan Date: Tue, 4 Feb 2025 23:39:29 +0530 Subject: [PATCH 1074/1614] fix: default payment terms template selected while duplicating (cherry picked from commit 18127603fe837af8856565a2deddc9d3e42ef243) --- erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js index a2d02981d64..7e17f7abab7 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js @@ -343,7 +343,9 @@ erpnext.accounts.PurchaseInvoice = class PurchaseInvoice extends erpnext.buying. account: this.frm.doc.credit_to, price_list: this.frm.doc.buying_price_list, fetch_payment_terms_template: cint( - (this.frm.doc.is_return == 0) & !this.frm.doc.ignore_default_payment_terms_template + (this.frm.doc.is_return == 0) & + !this.frm.doc.ignore_default_payment_terms_template & + (this.frm.doc.__run_link_triggers !== false) ), }, function () { From c52362531cb4209ed14b77bb64bbb675111c666f Mon Sep 17 00:00:00 2001 From: Ejaaz Khan Date: Wed, 5 Feb 2025 00:06:48 +0530 Subject: [PATCH 1075/1614] fix: payment schedule table is empty while duplicating record (cherry picked from commit fb3f08a44139d12b0d205e3f019cedcca923397a) --- .../doctype/purchase_invoice/purchase_invoice.js | 12 +++++++++--- erpnext/public/js/controllers/transaction.js | 2 ++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js index 7e17f7abab7..13430b46449 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js @@ -332,6 +332,8 @@ erpnext.accounts.PurchaseInvoice = class PurchaseInvoice extends erpnext.buying. if (this.frm.doc.__onload && this.frm.doc.__onload.load_after_mapping) return; + let payment_terms_template = this.frm.doc.payment_terms_template; + erpnext.utils.get_party_details( this.frm, "erpnext.accounts.party.get_party_details", @@ -343,9 +345,7 @@ erpnext.accounts.PurchaseInvoice = class PurchaseInvoice extends erpnext.buying. account: this.frm.doc.credit_to, price_list: this.frm.doc.buying_price_list, fetch_payment_terms_template: cint( - (this.frm.doc.is_return == 0) & - !this.frm.doc.ignore_default_payment_terms_template & - (this.frm.doc.__run_link_triggers !== false) + (this.frm.doc.is_return == 0) & !this.frm.doc.ignore_default_payment_terms_template ), }, function () { @@ -354,6 +354,12 @@ erpnext.accounts.PurchaseInvoice = class PurchaseInvoice extends erpnext.buying. me.frm.doc.tax_withholding_category = me.frm.supplier_tds; me.frm.set_df_property("apply_tds", "read_only", me.frm.supplier_tds ? 0 : 1); me.frm.set_df_property("tax_withholding_category", "hidden", me.frm.supplier_tds ? 0 : 1); + + // while duplicating, don't change payment terms + if (me.frm.doc.__run_link_triggers === false) { + me.frm.set_value("payment_terms_template", payment_terms_template); + me.frm.refresh_field("payment_terms_template"); + } } ); } diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 81a8a617e64..ba08ffe4bb0 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -2483,6 +2483,8 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe } payment_terms_template() { + console.log("payment_terms_template outside"); + var me = this; const doc = this.frm.doc; if(doc.payment_terms_template && doc.doctype !== 'Delivery Note' && !doc.is_return) { From df0ca2d1984c53c9f02c7740511d17c5bce838a5 Mon Sep 17 00:00:00 2001 From: Ejaaz Khan Date: Wed, 5 Feb 2025 00:09:16 +0530 Subject: [PATCH 1076/1614] refactor: remove log (cherry picked from commit bfc01441a073c9e5658c2723b76235f5e8ed237f) --- erpnext/public/js/controllers/transaction.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index ba08ffe4bb0..81a8a617e64 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -2483,8 +2483,6 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe } payment_terms_template() { - console.log("payment_terms_template outside"); - var me = this; const doc = this.frm.doc; if(doc.payment_terms_template && doc.doctype !== 'Delivery Note' && !doc.is_return) { From 7f7f403f5b293251cb940017eb46d88b57daba42 Mon Sep 17 00:00:00 2001 From: Khushi Rawat <142375893+khushi8112@users.noreply.github.com> Date: Wed, 5 Feb 2025 15:06:55 +0530 Subject: [PATCH 1077/1614] fix: set asset value correctly after cancelling value adjustment (cherry picked from commit fee3846144e1c98e3b4c211c619e9f26ac9e510c) --- .../asset_depreciation_schedule/asset_depreciation_schedule.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/assets/doctype/asset_depreciation_schedule/asset_depreciation_schedule.py b/erpnext/assets/doctype/asset_depreciation_schedule/asset_depreciation_schedule.py index c3c9ef2321b..5bddea56183 100644 --- a/erpnext/assets/doctype/asset_depreciation_schedule/asset_depreciation_schedule.py +++ b/erpnext/assets/doctype/asset_depreciation_schedule/asset_depreciation_schedule.py @@ -1069,7 +1069,7 @@ def make_new_active_asset_depr_schedules_and_cancel_current_ones( new_asset_depr_schedule_doc = frappe.copy_doc(current_asset_depr_schedule_doc) if asset_doc.flags.decrease_in_asset_value_due_to_value_adjustment and not value_after_depreciation: - value_after_depreciation = row.value_after_depreciation + difference_amount + value_after_depreciation = row.value_after_depreciation - difference_amount if asset_doc.flags.increase_in_asset_value_due_to_repair and row.depreciation_method in ( "Written Down Value", From b140ce71d75fdc6c24664c2ec68a693a63e9d0f8 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Tue, 4 Feb 2025 10:54:57 +0530 Subject: [PATCH 1078/1614] fix: fetch rate from item price list when document is saved (cherry picked from commit 1e4b9fbdf09aa998da5f829303a4c859f341e484) --- erpnext/controllers/accounts_controller.py | 2 +- erpnext/stock/get_item_details.py | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 2aadd6b584e..87671568bd8 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -817,7 +817,7 @@ class AccountsController(TransactionBase): item.get(fieldname) is None or fieldname in force_item_fields or ( - fieldname in ["serial_no", "batch_no"] + fieldname in ["serial_no", "batch_no", "rate", "price_list_rate"] and item.get("use_serial_batch_fields") ) ): diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py index c604c4cd87c..e565b5c6015 100644 --- a/erpnext/stock/get_item_details.py +++ b/erpnext/stock/get_item_details.py @@ -206,13 +206,21 @@ def update_stock(ctx, out, doc=None): filter_batches(batches, doc) for batch_no, batch_qty in batches.items(): + rate = get_batch_based_item_price( + {"price_list": doc.selling_price_list, "uom": out.uom, "batch_no": batch_no}, + out.item_code, + ) if batch_qty >= qty: out.update({"batch_no": batch_no, "actual_batch_qty": qty}) + if rate: + out.update({"rate": rate, "price_list_rate": rate}) break else: qty -= batch_qty - out.update({"batch_no": batch_no, "actual_batch_qty": batch_qty}) + out.update({"batch_no": batch_no, "actual_batch_qty": qty}) + if rate: + out.update({"rate": rate, "price_list_rate": rate}) if out.has_serial_no and out.has_batch_no and has_incorrect_serial_nos(ctx, out): kwargs["batches"] = [ctx.get("batch_no")] if ctx.get("batch_no") else [out.get("batch_no")] From 6a03f995463d76e95c09543160addc9ea8b26283 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Tue, 4 Feb 2025 11:46:11 +0530 Subject: [PATCH 1079/1614] fix: logical error failing tests (cherry picked from commit fee318a275f30e86fccff1d6e16aae8d1b091212) --- erpnext/controllers/accounts_controller.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 87671568bd8..715a73e0da6 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -817,10 +817,13 @@ class AccountsController(TransactionBase): item.get(fieldname) is None or fieldname in force_item_fields or ( - fieldname in ["serial_no", "batch_no", "rate", "price_list_rate"] + fieldname in ["serial_no", "batch_no"] and item.get("use_serial_batch_fields") ) ): + if fieldname == "batch_no" and not item.batch_no: + item.set("rate", ret.get("rate")) + item.set("price_list_rate", ret.get("price_list_rate")) item.set(fieldname, value) elif fieldname in ["cost_center", "conversion_factor"] and not item.get( From 25075e5981de3c6722c5d03027c52c349f6ff172 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Wed, 5 Feb 2025 13:12:25 +0530 Subject: [PATCH 1080/1614] test: added test (cherry picked from commit 07adfadd5804f1871b4964602c98490c1cb4d1bf) --- erpnext/stock/tests/test_get_item_details.py | 63 ++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/erpnext/stock/tests/test_get_item_details.py b/erpnext/stock/tests/test_get_item_details.py index 30f748a65e0..fc19bac0a44 100644 --- a/erpnext/stock/tests/test_get_item_details.py +++ b/erpnext/stock/tests/test_get_item_details.py @@ -34,3 +34,66 @@ class TestGetItemDetail(FrappeTestCase): ) details = get_item_details(args) self.assertEqual(details.get("price_list_rate"), 100) + + # making this test in get_item_details test file as feat/fix is present in that method + def test_fetch_price_from_list_rate_on_doc_save(self): + # create item + item = frappe.get_doc( + { + "doctype": "Item", + "item_code": "Test Item with Batch", + "item_name": "Test Item with Batch", + "item_group": "All Item Groups", + "is_stock_item": 1, + "has_batch_no": 1, + } + ).insert() + + # create batch + frappe.get_doc( + { + "doctype": "Batch", + "batch_id": "BATCH01", + "item": item, + } + ).insert() + + # create item price + frappe.get_doc( + { + "doctype": "Item Price", + "price_list": "Standard Selling", + "item_code": item.item_code, + "price_list_rate": 50, + "batch_no": "BATCH01", + } + ).insert() + + # create purchase receipt to have some stock for delivery + from erpnext.stock.doctype.purchase_receipt.test_purchase_receipt import make_purchase_receipt + + make_purchase_receipt( + item_code=item.item_code, + warehouse="_Test Warehouse - _TC", + qty=100, + rate=100, + batch_no="BATCH01", + ) + + # creating sales order just to create delivery note from it + from erpnext.selling.doctype.sales_order.test_sales_order import make_sales_order + + so = make_sales_order(item_code=item.item_code, qty=2, rate=75) + + from erpnext.selling.doctype.sales_order.sales_order import make_delivery_note + + dn = make_delivery_note(so.name) + + # Test 1 : On creation of DN, item's batch won't be fetched and rate will remaing the same as in SO + self.assertIsNone(dn.items[0].batch_no) + self.assertEqual(dn.items[0].rate, 75) + + # Test 2 : On saving the DN, item's batch will be fetched and rate will be updated from Item Price + dn.save() + self.assertEqual(dn.items[0].batch_no, "BATCH01") + self.assertEqual(dn.items[0].rate, 50) From cfc50073edcd8c15421d8231328eb9dc045bd7ba Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Wed, 5 Feb 2025 14:55:51 +0530 Subject: [PATCH 1081/1614] fix: added correct options for incoming_rate field of delivery note item (cherry picked from commit 417bf49a8deac78baf098d9b059567b9b1c44bca) # Conflicts: # erpnext/stock/doctype/delivery_note_item/delivery_note_item.json --- .../stock/doctype/delivery_note_item/delivery_note_item.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json b/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json index 56e5209da59..f1be802fe24 100644 --- a/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json +++ b/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json @@ -756,6 +756,7 @@ "fieldtype": "Currency", "label": "Incoming Rate", "no_copy": 1, + "options": "Company:company:default_currency", "precision": "6", "print_hide": 1, "read_only": 1 @@ -933,7 +934,11 @@ "index_web_pages_for_search": 1, "istable": 1, "links": [], +<<<<<<< HEAD "modified": "2024-11-21 17:37:37.441498", +======= + "modified": "2025-02-05 14:27:32.322181", +>>>>>>> 417bf49a8d (fix: added correct options for incoming_rate field of delivery note item) "modified_by": "Administrator", "module": "Stock", "name": "Delivery Note Item", From 8ea9a9e4678c3fc145d3a7afad98dd89d05c985b Mon Sep 17 00:00:00 2001 From: Bhavan23 Date: Wed, 29 Jan 2025 22:16:53 +0530 Subject: [PATCH 1082/1614] fix: filter the item tax template using the input text (cherry picked from commit 4dd37ba033b6d7e0e831a701ea7053df3f0b13bf) # Conflicts: # erpnext/controllers/queries.py --- erpnext/controllers/queries.py | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/erpnext/controllers/queries.py b/erpnext/controllers/queries.py index 03852d3739a..20979c63a60 100644 --- a/erpnext/controllers/queries.py +++ b/erpnext/controllers/queries.py @@ -807,7 +807,27 @@ def get_tax_template(doctype, txt, searchfield, start, page_len, filters): item_group = item_group_doc.parent_item_group if not taxes: - return frappe.get_all("Item Tax Template", filters={"disabled": 0, "company": company}, as_list=True) + or_filters = [] + if txt: + search_fields = ["name"] + + tax_template_doc = frappe.get_meta("Item Tax Template") + + if title_field := tax_template_doc.title_field: + search_fields.append(title_field) + if tax_template_doc.search_fields: + search_fields.extend(tax_template_doc.get_search_fields()) + + for f in search_fields: + or_filters.append([doctype, f.strip(), "like", f"%{txt}%"]) + + return frappe.get_list( + "Item Tax Template", + filters={"disabled": 0, "company": company}, + or_filters=or_filters, + as_list=True, + ) + else: valid_from = filters.get("valid_from") valid_from = valid_from[1] if isinstance(valid_from, list) else valid_from @@ -819,8 +839,14 @@ def get_tax_template(doctype, txt, searchfield, start, page_len, filters): "company": company, } +<<<<<<< HEAD taxes = _get_item_tax_template(args, taxes, for_validate=True) return [(d,) for d in set(taxes)] +======= + taxes = _get_item_tax_template(ctx, taxes, for_validate=True) + txt = txt.lower() + return [(d,) for d in set(taxes) if not txt or txt in d.lower()] +>>>>>>> 4dd37ba033 (fix: filter the item tax template using the input text) def get_fields(doctype, fields=None): From 0b591ba7eb0a99273ee495144d3b90d99ef10feb Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Wed, 5 Feb 2025 16:37:09 +0530 Subject: [PATCH 1083/1614] chore: resolve conflicts --- erpnext/controllers/queries.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/erpnext/controllers/queries.py b/erpnext/controllers/queries.py index 20979c63a60..f124bfdbfc8 100644 --- a/erpnext/controllers/queries.py +++ b/erpnext/controllers/queries.py @@ -839,14 +839,9 @@ def get_tax_template(doctype, txt, searchfield, start, page_len, filters): "company": company, } -<<<<<<< HEAD taxes = _get_item_tax_template(args, taxes, for_validate=True) - return [(d,) for d in set(taxes)] -======= - taxes = _get_item_tax_template(ctx, taxes, for_validate=True) txt = txt.lower() return [(d,) for d in set(taxes) if not txt or txt in d.lower()] ->>>>>>> 4dd37ba033 (fix: filter the item tax template using the input text) def get_fields(doctype, fields=None): From 9a27d3cedccc17dee1bc67de5db020adc7058660 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Wed, 5 Feb 2025 16:11:44 +0530 Subject: [PATCH 1084/1614] fix: removed unused field (cherry picked from commit 2d7a576da59db913ab0b47aa0c4b4b4e7a2d60c7) --- .../manufacturing_settings/manufacturing_settings.json | 10 +--------- .../manufacturing_settings/manufacturing_settings.py | 1 - 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/erpnext/manufacturing/doctype/manufacturing_settings/manufacturing_settings.json b/erpnext/manufacturing/doctype/manufacturing_settings/manufacturing_settings.json index 4f588b8d231..efa561274f4 100644 --- a/erpnext/manufacturing/doctype/manufacturing_settings/manufacturing_settings.json +++ b/erpnext/manufacturing/doctype/manufacturing_settings/manufacturing_settings.json @@ -15,7 +15,6 @@ "bom_section", "update_bom_costs_automatically", "column_break_lhyt", - "manufacture_sub_assembly_in_operation", "section_break_6", "default_wip_warehouse", "default_fg_warehouse", @@ -223,13 +222,6 @@ "fieldname": "column_break_lhyt", "fieldtype": "Column Break" }, - { - "default": "0", - "description": "If enabled then system will manufacture Sub-assembly against the Job Card (operation).", - "fieldname": "manufacture_sub_assembly_in_operation", - "fieldtype": "Check", - "label": "Manufacture Sub-assembly in Operation" - }, { "default": "0", "depends_on": "eval:doc.backflush_raw_materials_based_on == \"BOM\"", @@ -249,7 +241,7 @@ "index_web_pages_for_search": 1, "issingle": 1, "links": [], - "modified": "2025-01-13 12:07:03.089977", + "modified": "2025-02-05 16:11:11.639916", "modified_by": "Administrator", "module": "Manufacturing", "name": "Manufacturing Settings", diff --git a/erpnext/manufacturing/doctype/manufacturing_settings/manufacturing_settings.py b/erpnext/manufacturing/doctype/manufacturing_settings/manufacturing_settings.py index 04aebf23743..86b84b23339 100644 --- a/erpnext/manufacturing/doctype/manufacturing_settings/manufacturing_settings.py +++ b/erpnext/manufacturing/doctype/manufacturing_settings/manufacturing_settings.py @@ -29,7 +29,6 @@ class ManufacturingSettings(Document): get_rm_cost_from_consumption_entry: DF.Check job_card_excess_transfer: DF.Check make_serial_no_batch_from_work_order: DF.Check - manufacture_sub_assembly_in_operation: DF.Check material_consumption: DF.Check mins_between_operations: DF.Int overproduction_percentage_for_sales_order: DF.Percent From ab37e5754b286bf7ffb19b25f548abbfcc930dfd Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Wed, 5 Feb 2025 16:40:20 +0530 Subject: [PATCH 1085/1614] chore: fix conflicts --- .../doctype/delivery_note_item/delivery_note_item.json | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json b/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json index f1be802fe24..ff64db8ee76 100644 --- a/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json +++ b/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json @@ -934,11 +934,7 @@ "index_web_pages_for_search": 1, "istable": 1, "links": [], -<<<<<<< HEAD - "modified": "2024-11-21 17:37:37.441498", -======= - "modified": "2025-02-05 14:27:32.322181", ->>>>>>> 417bf49a8d (fix: added correct options for incoming_rate field of delivery note item) + "modified": "2025-02-05 14:28:32.322181", "modified_by": "Administrator", "module": "Stock", "name": "Delivery Note Item", From b1161f446fe95c55e99c0d1d9d00f741c1eec8ce Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Wed, 5 Feb 2025 12:08:00 +0000 Subject: [PATCH 1086/1614] chore(release): Bumped to Version 15.51.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # [15.51.0](https://github.com/frappe/erpnext/compare/v15.50.1...v15.51.0) (2025-02-05) ### Bug Fixes * actual qty showing blank for sub-assembly items ([d0748b1](https://github.com/frappe/erpnext/commit/d0748b1b675eee2c83f230983219e3d2ddf45606)) * added correct options for incoming_rate field of delivery note item ([cfc5007](https://github.com/frappe/erpnext/commit/cfc50073edcd8c15421d8231328eb9dc045bd7ba)) * allow multiple email ids ([2a25302](https://github.com/frappe/erpnext/commit/2a25302c35a6baaa8aa0febe1b6c58a7247cb8b5)) * attribute 'msgbox' not found in sales invoice.js ([f6b4984](https://github.com/frappe/erpnext/commit/f6b49845e29c7edf31cf06140dfa09e54650b958)) * bind this to function ([c0b32c4](https://github.com/frappe/erpnext/commit/c0b32c446bd1dd94302d12787977bbec8781ec48)) * check billing address ([44d9fb7](https://github.com/frappe/erpnext/commit/44d9fb7a699805eb40272352de49c66ea6bda859)) * closing stock balance report not generating ([47d1c3b](https://github.com/frappe/erpnext/commit/47d1c3b5a386f8abf464460522f07754a26d4948)) * conflicts ([4aa072a](https://github.com/frappe/erpnext/commit/4aa072a8eb754209d0ce42d71f3e19c5f8c7cbf5)) * consider process_loss_qty in work order ([1522d76](https://github.com/frappe/erpnext/commit/1522d76a3b7e9ae006369f42d676cad74d14d798)) * copy correct uom from devliery note when creating packing list ([f9794e5](https://github.com/frappe/erpnext/commit/f9794e5b446b9a851a16376c14b7b02c59bc99fb)) * correct error message in payment entry ([6ea5307](https://github.com/frappe/erpnext/commit/6ea5307b0eb02a2c9c7e37d598a032f2f10998b4)) * default payment terms template selected while duplicating ([ca4bb96](https://github.com/frappe/erpnext/commit/ca4bb96fb4182d784444ee704679550ec6368806)) * Do not check for cancelled invoices ([84638f5](https://github.com/frappe/erpnext/commit/84638f58fd238e8ec420497b4f092e3904d5b729)) * Do not check for cancelled invoices ([b612ab5](https://github.com/frappe/erpnext/commit/b612ab582326e86f7e61f6034ff597d44d39d829)) * fetch rate from item price list when document is saved ([b140ce7](https://github.com/frappe/erpnext/commit/b140ce71d75fdc6c24664c2ec68a693a63e9d0f8)) * filter the item tax template using the input text ([8ea9a9e](https://github.com/frappe/erpnext/commit/8ea9a9e4678c3fc145d3a7afad98dd89d05c985b)) * Gross Profit Report with Correct Totals and Gross Margin (backport [#45548](https://github.com/frappe/erpnext/issues/45548)) ([#45598](https://github.com/frappe/erpnext/issues/45598)) ([6301b32](https://github.com/frappe/erpnext/commit/6301b321d894db91df3efb51b6cb8f52d7eafb04)) * handling company in bank reconciliation tool ([#45582](https://github.com/frappe/erpnext/issues/45582)) ([aa27e19](https://github.com/frappe/erpnext/commit/aa27e19a58bce878b4b34a74bd679bfebbd6b236)) * ignore expired batch for pick list ([786db3d](https://github.com/frappe/erpnext/commit/786db3d0fae6daf010554566e0ceb352b68747a8)) * loading print receipt only at order complete (backport [#45627](https://github.com/frappe/erpnext/issues/45627)) ([#45628](https://github.com/frappe/erpnext/issues/45628)) ([72868ee](https://github.com/frappe/erpnext/commit/72868eee04feecdf2847fcc32e8b00a459ec7d1d)) * logical error failing tests ([6a03f99](https://github.com/frappe/erpnext/commit/6a03f995463d76e95c09543160addc9ea8b26283)) * not able to make manufacturing entry for alternate items ([eef2f3c](https://github.com/frappe/erpnext/commit/eef2f3c5d4861c1e77248581549a3ca95d2b5b56)) * only system manager was able to create customer & prospect ([6149306](https://github.com/frappe/erpnext/commit/6149306b7887ecba2f1e1184408905a2b0612481)) * payment schedule table is empty while duplicating record ([c523625](https://github.com/frappe/erpnext/commit/c52362531cb4209ed14b77bb64bbb675111c666f)) * point of sale padding (backport [#45697](https://github.com/frappe/erpnext/issues/45697)) ([#45699](https://github.com/frappe/erpnext/issues/45699)) ([b915e7f](https://github.com/frappe/erpnext/commit/b915e7f63726daf219055a754114237264987c8e)) * pos payment cash shortcut decimal (backport [#45702](https://github.com/frappe/erpnext/issues/45702)) ([#45705](https://github.com/frappe/erpnext/issues/45705)) ([6113cc1](https://github.com/frappe/erpnext/commit/6113cc1e43ea15d76b22b59996636b3cbaffb963)) * pos print receipt on submit (backport [#45632](https://github.com/frappe/erpnext/issues/45632)) ([#45633](https://github.com/frappe/erpnext/issues/45633)) ([676dde5](https://github.com/frappe/erpnext/commit/676dde59c2e79ba12433448b1a0bd54626ed437a)) * **pos:** add item in the existing item row when discount is applied ([0b54cb9](https://github.com/frappe/erpnext/commit/0b54cb9a7cb15bab8368993d7fccf302689d990a)) * posting_date to posting_datetime in stock related queries ([cd5174e](https://github.com/frappe/erpnext/commit/cd5174e42343a1a271fbae791b4d7a5a7f15330e)) * remove tds account in taxes table on change of Tax Withholding Category ([1ad16c3](https://github.com/frappe/erpnext/commit/1ad16c368e552f8a39ca19eec31c8847dbc10b2c)) * removed unused field ([9a27d3c](https://github.com/frappe/erpnext/commit/9a27d3cedccc17dee1bc67de5db020adc7058660)) * renamed Commments Tab to Notes tab in Lead doctype ([86edcfc](https://github.com/frappe/erpnext/commit/86edcfc1fdc03f71898acec0ff48f2522586ca4a)) * reposting issue with s3 backup ([73c1bf9](https://github.com/frappe/erpnext/commit/73c1bf972efa27229aae70c37ae5cf44c22444f1)) * resolved conflicts ([223fe62](https://github.com/frappe/erpnext/commit/223fe626380173386aeba1a43d573d46fa173d8c)) * respect user set account if not advance account for getting outstanding invoices in payment entry ([8108d7f](https://github.com/frappe/erpnext/commit/8108d7fdba96dfcef6f3c6252fbd8a4ac60794d0)) * semgrep ([401fd7f](https://github.com/frappe/erpnext/commit/401fd7fca7966bc2719ab0174b50d238f0b6d5ae)) * set asset value correctly after cancelling value adjustment ([7f7f403](https://github.com/frappe/erpnext/commit/7f7f403f5b293251cb940017eb46d88b57daba42)) * show only items with inspection enabled on create QI dialog ([34f8a37](https://github.com/frappe/erpnext/commit/34f8a370d1deff8a8b20ca5b019c84e366850665)) * slow SABB query ([7931c2d](https://github.com/frappe/erpnext/commit/7931c2d182984089f25f3348bb4ba9e075354b69)) * subcontracting valiation precision issue ([5319683](https://github.com/frappe/erpnext/commit/5319683dbf2ec2e9fb4727cf6e9dd90767f06252)) * track employee changes ([#45674](https://github.com/frappe/erpnext/issues/45674)) ([cf98ebf](https://github.com/frappe/erpnext/commit/cf98ebf7fe9989d9042db64ccfde47c91f156dd9)) * validation message ([4742211](https://github.com/frappe/erpnext/commit/47422111b4fcbca792665e0a3d722e00e3d3cf49)) * validation to prevent submission if the SABB is not linked to a stock transaction ([24a6f61](https://github.com/frappe/erpnext/commit/24a6f611d86b4406fda5ad14de331e4ddf6dc379)) ### Features * account heads changed along with journal entry type and descrip… ([#42845](https://github.com/frappe/erpnext/issues/42845)) ([bbecd36](https://github.com/frappe/erpnext/commit/bbecd36a5dd65bb138c9f8b2528abd92cf886745)) * report to find incorrect SABB ([a948f2e](https://github.com/frappe/erpnext/commit/a948f2e095a7fc859f66d382767572edffebfaea)) * set bank account of company to default company bank account from masters ([b840271](https://github.com/frappe/erpnext/commit/b840271d2a643eeeee514fe0e237f6d7b46935ef)) ### Performance Improvements * stock entry with batch (backport [#45486](https://github.com/frappe/erpnext/issues/45486)) ([#45602](https://github.com/frappe/erpnext/issues/45602)) ([8b75401](https://github.com/frappe/erpnext/commit/8b75401db9bd58049c817964771874b7909e6efa)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 18b66e88a64..ba69d17b797 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.50.1" +__version__ = "15.51.0" def get_default_company(user=None): From 9d6f3180d4313b4363ff83312c06091782bedc1c Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Wed, 5 Feb 2025 15:48:08 +0530 Subject: [PATCH 1087/1614] fix: create job card with wip warehouse set to source warehouse if material transfer to wip warehouse is skipped in work order (cherry picked from commit 723e902470c772469f1fd3ecc04d2923acf96d0b) # Conflicts: # erpnext/manufacturing/doctype/work_order/work_order.py --- .../manufacturing/doctype/work_order/work_order.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/erpnext/manufacturing/doctype/work_order/work_order.py b/erpnext/manufacturing/doctype/work_order/work_order.py index e6e7d7612c5..d34d6bed57a 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order.py +++ b/erpnext/manufacturing/doctype/work_order/work_order.py @@ -1623,6 +1623,20 @@ def create_job_card(work_order, row, enable_capacity_planning=False, auto_create "wip_warehouse": work_order.wip_warehouse, "hour_rate": row.get("hour_rate"), "serial_no": row.get("serial_no"), +<<<<<<< HEAD +======= + "time_required": row.get("time_in_mins"), + "source_warehouse": row.get("source_warehouse"), + "target_warehouse": row.get("fg_warehouse"), + "wip_warehouse": work_order.wip_warehouse or row.get("wip_warehouse") + if not work_order.skip_transfer or work_order.from_wip_warehouse + else work_order.source_warehouse or row.get("source_warehouse"), + "skip_material_transfer": row.get("skip_material_transfer"), + "backflush_from_wip_warehouse": row.get("backflush_from_wip_warehouse"), + "finished_good": row.get("finished_good"), + "semi_fg_bom": row.get("bom_no"), + "is_subcontracted": row.get("is_subcontracted"), +>>>>>>> 723e902470 (fix: create job card with wip warehouse set to source warehouse if material transfer to wip warehouse is skipped in work order) } ) From 419698627388efbe131cd14f20eef0fc677b93d6 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Wed, 5 Feb 2025 17:59:34 +0530 Subject: [PATCH 1088/1614] chore: resolve conflicts --- .../doctype/work_order/work_order.py | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/erpnext/manufacturing/doctype/work_order/work_order.py b/erpnext/manufacturing/doctype/work_order/work_order.py index d34d6bed57a..721af21be99 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order.py +++ b/erpnext/manufacturing/doctype/work_order/work_order.py @@ -1620,23 +1620,11 @@ def create_job_card(work_order, row, enable_capacity_planning=False, auto_create "project": work_order.project, "company": work_order.company, "sequence_id": row.get("sequence_id"), - "wip_warehouse": work_order.wip_warehouse, - "hour_rate": row.get("hour_rate"), - "serial_no": row.get("serial_no"), -<<<<<<< HEAD -======= - "time_required": row.get("time_in_mins"), - "source_warehouse": row.get("source_warehouse"), - "target_warehouse": row.get("fg_warehouse"), "wip_warehouse": work_order.wip_warehouse or row.get("wip_warehouse") if not work_order.skip_transfer or work_order.from_wip_warehouse else work_order.source_warehouse or row.get("source_warehouse"), - "skip_material_transfer": row.get("skip_material_transfer"), - "backflush_from_wip_warehouse": row.get("backflush_from_wip_warehouse"), - "finished_good": row.get("finished_good"), - "semi_fg_bom": row.get("bom_no"), - "is_subcontracted": row.get("is_subcontracted"), ->>>>>>> 723e902470 (fix: create job card with wip warehouse set to source warehouse if material transfer to wip warehouse is skipped in work order) + "hour_rate": row.get("hour_rate"), + "serial_no": row.get("serial_no"), } ) From d4bc3d182fb7bb4409fcca949b7ff338984496f7 Mon Sep 17 00:00:00 2001 From: Sanket322 Date: Thu, 6 Feb 2025 17:55:37 +0530 Subject: [PATCH 1089/1614] fix: update ctx to args --- erpnext/public/js/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/public/js/utils.js b/erpnext/public/js/utils.js index a000cdee7cc..cd851b57972 100755 --- a/erpnext/public/js/utils.js +++ b/erpnext/public/js/utils.js @@ -661,7 +661,7 @@ erpnext.utils.update_child_items = function (opts) { method: "erpnext.stock.get_item_details.get_item_details", args: { doc: frm.doc, - ctx: { + args: { item_code: this.value, set_warehouse: frm.doc.set_warehouse, customer: frm.doc.customer || frm.doc.party_name, From 3ada5206189a0c9b9b4ea667515503391a284fce Mon Sep 17 00:00:00 2001 From: ljain112 Date: Thu, 6 Feb 2025 18:56:29 +0530 Subject: [PATCH 1090/1614] fix: correct pay amount in portal pages --- erpnext/templates/pages/order.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/templates/pages/order.html b/erpnext/templates/pages/order.html index ade66dd481f..7fb5ed9b56a 100644 --- a/erpnext/templates/pages/order.html +++ b/erpnext/templates/pages/order.html @@ -40,7 +40,7 @@

- {{ _("Pay", null, "Amount") }} {{ pay_amount }} + {{ _("Pay", null, "Amount") }} {{doc.get_formatted("grand_total") }}

From 28cbce435667880ea7168b090e1b48f7d5b51cc4 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Thu, 6 Feb 2025 16:04:51 +0530 Subject: [PATCH 1091/1614] fix: the project document timed out while opening (cherry picked from commit 33d03b1542207c595c5e4abd5a874c96041462a2) # Conflicts: # erpnext/selling/doctype/sales_order/sales_order.json --- erpnext/accounts/doctype/sales_invoice/sales_invoice.json | 5 +++-- erpnext/projects/doctype/project/project.py | 2 -- erpnext/selling/doctype/sales_order/sales_order.json | 7 ++++++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json index 4c6d9a85aa1..4183cc21ab8 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json @@ -299,7 +299,8 @@ "oldfieldname": "project_name", "oldfieldtype": "Link", "options": "Project", - "print_hide": 1 + "print_hide": 1, + "search_index": 1 }, { "default": "0", @@ -2186,7 +2187,7 @@ "link_fieldname": "consolidated_invoice" } ], - "modified": "2025-01-14 11:38:30.446370", + "modified": "2025-02-06 15:59:54.636202", "modified_by": "Administrator", "module": "Accounts", "name": "Sales Invoice", diff --git a/erpnext/projects/doctype/project/project.py b/erpnext/projects/doctype/project/project.py index 5253cd0eae5..4ed8ffc0077 100644 --- a/erpnext/projects/doctype/project/project.py +++ b/erpnext/projects/doctype/project/project.py @@ -86,8 +86,6 @@ class Project(Document): ), ) - self.update_costing() - def before_print(self, settings=None): self.onload() diff --git a/erpnext/selling/doctype/sales_order/sales_order.json b/erpnext/selling/doctype/sales_order/sales_order.json index 1525b9632de..3e89689024f 100644 --- a/erpnext/selling/doctype/sales_order/sales_order.json +++ b/erpnext/selling/doctype/sales_order/sales_order.json @@ -1151,7 +1151,8 @@ "label": "Project", "oldfieldname": "project", "oldfieldtype": "Link", - "options": "Project" + "options": "Project", + "search_index": 1 }, { "fieldname": "party_account_currency", @@ -1654,7 +1655,11 @@ "idx": 105, "is_submittable": 1, "links": [], +<<<<<<< HEAD "modified": "2024-11-26 12:42:06.872527", +======= + "modified": "2025-02-06 16:02:20.320877", +>>>>>>> 33d03b1542 (fix: the project document timed out while opening) "modified_by": "Administrator", "module": "Selling", "name": "Sales Order", From 08a6f4e6d352de785a31a4c31b3dc074fffd5310 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Thu, 6 Feb 2025 22:09:44 +0530 Subject: [PATCH 1092/1614] chore: fix conflicts --- erpnext/selling/doctype/sales_order/sales_order.json | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/erpnext/selling/doctype/sales_order/sales_order.json b/erpnext/selling/doctype/sales_order/sales_order.json index 3e89689024f..4db7bf6f003 100644 --- a/erpnext/selling/doctype/sales_order/sales_order.json +++ b/erpnext/selling/doctype/sales_order/sales_order.json @@ -1655,11 +1655,7 @@ "idx": 105, "is_submittable": 1, "links": [], -<<<<<<< HEAD - "modified": "2024-11-26 12:42:06.872527", -======= "modified": "2025-02-06 16:02:20.320877", ->>>>>>> 33d03b1542 (fix: the project document timed out while opening) "modified_by": "Administrator", "module": "Selling", "name": "Sales Order", @@ -1737,4 +1733,4 @@ "title_field": "customer_name", "track_changes": 1, "track_seen": 1 -} \ No newline at end of file +} From 96c19cd9902b0de61b6582435fc4a1bd552b4867 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Fri, 31 Jan 2025 15:34:50 +0530 Subject: [PATCH 1093/1614] fix: '0' rate LDC's Invoice net totals should be ignored (cherry picked from commit 325c4e3536aaf84be0d7fb9ff9850360b2eeb2bd) --- .../tax_withholding_category.py | 42 ++++++++++++++----- 1 file changed, 31 insertions(+), 11 deletions(-) diff --git a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py index 3215b93a496..06549973242 100644 --- a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py +++ b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py @@ -270,7 +270,10 @@ def get_lower_deduction_certificate(company, posting_date, tax_details, pan_no): def get_tax_amount(party_type, parties, inv, tax_details, posting_date, pan_no=None): vouchers, voucher_wise_amount = get_invoice_vouchers( - parties, tax_details, inv.company, party_type=party_type + parties, + tax_details, + inv.company, + party_type=party_type, ) payment_entry_vouchers = get_payment_entry_vouchers( @@ -360,11 +363,23 @@ def get_invoice_vouchers(parties, tax_details, company, party_type="Supplier"): voucher_wise_amount = [] vouchers = [] + ldcs = frappe.db.get_all( + "Lower Deduction Certificate", + filters={ + "valid_from": [">=", tax_details.from_date], + "valid_upto": ["<=", tax_details.to_date], + "company": company, + "supplier": ["in", parties], + }, + fields=["supplier", "valid_from", "valid_upto", "rate"], + ) + doctype = "Purchase Invoice" if party_type == "Supplier" else "Sales Invoice" field = [ "base_tax_withholding_net_total as base_net_total" if party_type == "Supplier" else "base_net_total", "name", "grand_total", + "posting_date", ] filters = { @@ -383,18 +398,23 @@ def get_invoice_vouchers(parties, tax_details, company, party_type="Supplier"): invoices_details = frappe.get_all(doctype, filters=filters, fields=field) for d in invoices_details: - vouchers.append(d.name) - voucher_wise_amount.append( - frappe._dict( - { - "voucher_name": d.name, - "voucher_type": doctype, - "taxable_amount": d.base_net_total, - "grand_total": d.grand_total, - } - ) + d = frappe._dict( + { + "voucher_name": d.name, + "voucher_type": doctype, + "taxable_amount": d.base_net_total, + "grand_total": d.grand_total, + "posting_date": d.posting_date, + } ) + if ldc := [x for x in ldcs if d.posting_date >= x.valid_from and d.posting_date <= x.valid_upto]: + if ldc[0].supplier in parties and ldc[0].rate == 0: + d.update({"taxable_amount": 0}) + + vouchers.append(d.voucher_name) + voucher_wise_amount.append(d) + journal_entries_details = frappe.db.sql( """ SELECT j.name, ja.credit - ja.debit AS amount, ja.reference_type From 3734289983656586fb63d2a86bf3ad11979098b1 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Fri, 7 Feb 2025 12:18:01 +0530 Subject: [PATCH 1094/1614] test: ldc @ 0 rate (cherry picked from commit 0cdd346f8fd2000cba7591d3b03bf0db7b69f158) # Conflicts: # erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py --- .../test_tax_withholding_category.py | 59 +++++++++++++++++-- 1 file changed, 55 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py b/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py index c4ab2f94581..4f527868722 100644 --- a/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py +++ b/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py @@ -6,8 +6,13 @@ import unittest import frappe from frappe.custom.doctype.custom_field.custom_field import create_custom_fields +<<<<<<< HEAD from frappe.tests.utils import FrappeTestCase, change_settings from frappe.utils import add_days, today +======= +from frappe.tests import IntegrationTestCase, UnitTestCase +from frappe.utils import add_days, add_months, today +>>>>>>> 0cdd346f8f (test: ldc @ 0 rate) from erpnext.accounts.doctype.payment_entry.payment_entry import get_payment_entry from erpnext.accounts.utils import get_fiscal_year @@ -666,6 +671,49 @@ class TestTaxWithholdingCategory(FrappeTestCase): pi2.cancel() pi3.cancel() + def test_ldc_at_0_rate(self): + frappe.db.set_value( + "Supplier", + "Test LDC Supplier", + { + "tax_withholding_category": "Test Service Category", + "pan": "ABCTY1234D", + }, + ) + + fiscal_year = get_fiscal_year(today(), company="_Test Company") + valid_from = fiscal_year[1] + valid_upto = add_months(valid_from, 1) + create_lower_deduction_certificate( + supplier="Test LDC Supplier", + certificate_no="1AE0423AAJ", + tax_withholding_category="Test Service Category", + tax_rate=0, + limit=50000, + valid_from=valid_from, + valid_upto=valid_upto, + ) + + pi1 = create_purchase_invoice( + supplier="Test LDC Supplier", rate=35000, posting_date=valid_from, set_posting_time=True + ) + pi1.submit() + self.assertEqual(pi1.taxes, []) + + pi2 = create_purchase_invoice( + supplier="Test LDC Supplier", + rate=35000, + posting_date=add_days(valid_upto, 1), + set_posting_time=True, + ) + pi2.submit() + self.assertEqual(len(pi2.taxes), 1) + # pi1 net total shouldn't be included as it lies within LDC at rate of '0' + self.assertEqual(pi2.taxes[0].tax_amount, 3500) + + pi1.cancel() + pi2.cancel() + def set_previous_fy_and_tax_category(self): test_company = "_Test Company" category = "Cumulative Threshold TDS" @@ -823,7 +871,8 @@ def create_purchase_invoice(**args): pi = frappe.get_doc( { "doctype": "Purchase Invoice", - "posting_date": today(), + "set_posting_time": args.set_posting_time or False, + "posting_date": args.posting_date or today(), "apply_tds": 0 if args.do_not_apply_tds else 1, "supplier": args.supplier, "company": "_Test Company", @@ -1161,7 +1210,9 @@ def create_tax_withholding_category( ).insert() -def create_lower_deduction_certificate(supplier, tax_withholding_category, tax_rate, certificate_no, limit): +def create_lower_deduction_certificate( + supplier, tax_withholding_category, tax_rate, certificate_no, limit, valid_from=None, valid_upto=None +): fiscal_year = get_fiscal_year(today(), company="_Test Company") if not frappe.db.exists("Lower Deduction Certificate", certificate_no): frappe.get_doc( @@ -1172,8 +1223,8 @@ def create_lower_deduction_certificate(supplier, tax_withholding_category, tax_r "certificate_no": certificate_no, "tax_withholding_category": tax_withholding_category, "fiscal_year": fiscal_year[0], - "valid_from": fiscal_year[1], - "valid_upto": fiscal_year[2], + "valid_from": valid_from or fiscal_year[1], + "valid_upto": valid_upto or fiscal_year[2], "rate": tax_rate, "certificate_limit": limit, } From 43d75b96c6fe25a51ac49e3c30681d62157a0b7a Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Fri, 7 Feb 2025 13:18:42 +0530 Subject: [PATCH 1095/1614] chore: resolve conflict --- .../test_tax_withholding_category.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py b/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py index 4f527868722..6ab6bcc08a2 100644 --- a/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py +++ b/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py @@ -6,13 +6,8 @@ import unittest import frappe from frappe.custom.doctype.custom_field.custom_field import create_custom_fields -<<<<<<< HEAD from frappe.tests.utils import FrappeTestCase, change_settings -from frappe.utils import add_days, today -======= -from frappe.tests import IntegrationTestCase, UnitTestCase from frappe.utils import add_days, add_months, today ->>>>>>> 0cdd346f8f (test: ldc @ 0 rate) from erpnext.accounts.doctype.payment_entry.payment_entry import get_payment_entry from erpnext.accounts.utils import get_fiscal_year From 086c36fca6e0db5abc097f82c443b843048adc8f Mon Sep 17 00:00:00 2001 From: Sugesh393 Date: Fri, 31 Jan 2025 17:49:28 +0530 Subject: [PATCH 1096/1614] fix: add allow_on_submit for party_balance, paid_from_account_balance and paid_to_account_balance (cherry picked from commit 707c01487e158fc16301290a48c16d2577330e56) --- erpnext/accounts/doctype/payment_entry/payment_entry.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.json b/erpnext/accounts/doctype/payment_entry/payment_entry.json index 5f191e4800a..3a0a4a8d065 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.json +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.json @@ -224,6 +224,7 @@ "label": "Accounts" }, { + "allow_on_submit": 1, "depends_on": "party", "fieldname": "party_balance", "fieldtype": "Currency", @@ -253,6 +254,7 @@ "reqd": 1 }, { + "allow_on_submit": 1, "depends_on": "paid_from", "fieldname": "paid_from_account_balance", "fieldtype": "Currency", @@ -286,6 +288,7 @@ "reqd": 1 }, { + "allow_on_submit": 1, "depends_on": "paid_to", "fieldname": "paid_to_account_balance", "fieldtype": "Currency", @@ -806,7 +809,7 @@ "table_fieldname": "payment_entries" } ], - "modified": "2025-01-13 16:03:47.169699", + "modified": "2025-01-31 17:27:28.555246", "modified_by": "Administrator", "module": "Accounts", "name": "Payment Entry", From 757dd3f0b62c7c207a8a0e02f9ae59fffe47e6b3 Mon Sep 17 00:00:00 2001 From: l0gesh29 Date: Fri, 31 Jan 2025 16:00:00 +0530 Subject: [PATCH 1097/1614] feat: add repost accounting ledger entry for payment entry (cherry picked from commit 5676d60ed37937a0cda9d4bdf60eabafadadf52c) --- .../doctype/payment_entry/payment_entry.py | 21 +++++++++++++++++++ erpnext/accounts/utils.py | 2 ++ 2 files changed, 23 insertions(+) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index a63d8d87807..967b12599bf 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -25,6 +25,10 @@ from erpnext.accounts.doctype.invoice_discounting.invoice_discounting import ( get_party_account_based_on_invoice_discounting, ) from erpnext.accounts.doctype.journal_entry.journal_entry import get_default_bank_cash_account +from erpnext.accounts.doctype.repost_accounting_ledger.repost_accounting_ledger import ( + validate_docs_for_deferred_accounting, + validate_docs_for_voucher_types, +) from erpnext.accounts.doctype.tax_withholding_category.tax_withholding_category import ( get_party_tax_withholding_details, ) @@ -114,6 +118,23 @@ class PaymentEntry(AccountsController): self.update_advance_paid() # advance_paid_status depends on the payment request amount self.set_status() + def validate_for_repost(self): + validate_docs_for_voucher_types(["Payment Entry"]) + validate_docs_for_deferred_accounting([self.name], []) + + def on_update_after_submit(self): + # Flag will be set on Reconciliation + # Reconciliation tool will anyways repost ledger entries. So, no need to check and do implicit repost. + if self.flags.get("ignore_reposting_on_reconciliation"): + return + + self.needs_repost = self.check_if_fields_updated( + fields_to_check=[], child_tables={"references": [], "taxes": [], "deductions": []} + ) + if self.needs_repost: + self.validate_for_repost() + self.repost_accounting_entries() + def set_liability_account(self): # Auto setting liability account should only be done during 'draft' status if self.docstatus > 0 or self.payment_type == "Internal Transfer": diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py index b3c82e84192..db7a3a2a70f 100644 --- a/erpnext/accounts/utils.py +++ b/erpnext/accounts/utils.py @@ -773,6 +773,8 @@ def update_reference_in_payment_entry( frappe._dict({"difference_posting_date": d.difference_posting_date}), dimensions_dict ) + # Ledgers will be reposted by Reconciliation tool + payment_entry.flags.ignore_reposting_on_reconciliation = True if not do_not_save: payment_entry.save(ignore_permissions=True) return row, update_advance_paid From 13bebe71b0bcbdc7968433d070825c58136d6be1 Mon Sep 17 00:00:00 2001 From: Sanket322 Date: Thu, 6 Feb 2025 17:55:37 +0530 Subject: [PATCH 1098/1614] fix: update ctx to args (cherry picked from commit d4bc3d182fb7bb4409fcca949b7ff338984496f7) --- erpnext/public/js/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/public/js/utils.js b/erpnext/public/js/utils.js index a000cdee7cc..cd851b57972 100755 --- a/erpnext/public/js/utils.js +++ b/erpnext/public/js/utils.js @@ -661,7 +661,7 @@ erpnext.utils.update_child_items = function (opts) { method: "erpnext.stock.get_item_details.get_item_details", args: { doc: frm.doc, - ctx: { + args: { item_code: this.value, set_warehouse: frm.doc.set_warehouse, customer: frm.doc.customer || frm.doc.party_name, From 8c57e9f8c8c74a5d21893ea01d4e244d0401e8ab Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Fri, 7 Feb 2025 14:22:13 +0000 Subject: [PATCH 1099/1614] chore(release): Bumped to Version 15.51.1 ## [15.51.1](https://github.com/frappe/erpnext/compare/v15.51.0...v15.51.1) (2025-02-07) ### Bug Fixes * update ctx to args ([13bebe7](https://github.com/frappe/erpnext/commit/13bebe71b0bcbdc7968433d070825c58136d6be1)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index ba69d17b797..a86ae74237c 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.51.0" +__version__ = "15.51.1" def get_default_company(user=None): From a649001886c57846d2053ebf0124e79144265a0f Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Mon, 10 Feb 2025 09:27:36 +0530 Subject: [PATCH 1100/1614] fix: not able to select the item in the sales invoice (cherry picked from commit 35388e7a04738aedff2cae423f212831fd5471ee) --- erpnext/stock/get_item_details.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py index e565b5c6015..649df536f87 100644 --- a/erpnext/stock/get_item_details.py +++ b/erpnext/stock/get_item_details.py @@ -187,6 +187,9 @@ def update_stock(ctx, out, doc=None): and out.warehouse and out.stock_qty > 0 ): + if doc and isinstance(doc, dict): + doc = frappe._dict(doc) + kwargs = frappe._dict( { "item_code": ctx.item_code, From e3cceb894b2c9eef44b6c582313dbb13b7e9efea Mon Sep 17 00:00:00 2001 From: Asmita Hase Date: Fri, 7 Feb 2025 17:27:44 +0530 Subject: [PATCH 1101/1614] fix: unable to remove image from employee fix: employee image disappears when newly created user_id is linked to employee (cherry picked from commit 0207d2d7b69558f5a8a203a3f1036b8cd7378ac2) # Conflicts: # erpnext/setup/doctype/employee/employee.json --- erpnext/setup/doctype/employee/employee.json | 8 +++++--- erpnext/setup/doctype/employee/employee.py | 4 +--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/erpnext/setup/doctype/employee/employee.json b/erpnext/setup/doctype/employee/employee.json index 8948211b2e5..c07e14fc3be 100644 --- a/erpnext/setup/doctype/employee/employee.json +++ b/erpnext/setup/doctype/employee/employee.json @@ -182,8 +182,6 @@ "read_only": 1 }, { - "fetch_from": "user_id.user_image", - "fetch_if_empty": 1, "fieldname": "image", "fieldtype": "Attach Image", "hidden": 1, @@ -824,7 +822,11 @@ "image_field": "image", "is_tree": 1, "links": [], +<<<<<<< HEAD "modified": "2024-01-03 17:36:20.984421", +======= + "modified": "2025-02-07 13:54:40.122345", +>>>>>>> 0207d2d7b6 (fix: unable to remove image from employee) "modified_by": "Administrator", "module": "Setup", "name": "Employee", @@ -873,4 +875,4 @@ "states": [], "title_field": "employee_name", "track_changes": 1 -} +} \ No newline at end of file diff --git a/erpnext/setup/doctype/employee/employee.py b/erpnext/setup/doctype/employee/employee.py index 31568fe50dc..ad062cd6473 100755 --- a/erpnext/setup/doctype/employee/employee.py +++ b/erpnext/setup/doctype/employee/employee.py @@ -64,14 +64,12 @@ class Employee(NestedSet): def validate_user_details(self): if self.user_id: - data = frappe.db.get_value("User", self.user_id, ["enabled", "user_image"], as_dict=1) + data = frappe.db.get_value("User", self.user_id, ["enabled"], as_dict=1) if not data: self.user_id = None return - if data.get("user_image") and self.image == "": - self.image = data.get("user_image") self.validate_for_enabled_user_id(data.get("enabled", 0)) self.validate_duplicate_user_id() From 6638b391ff732cc045d1a5e45675069503718281 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 6 Feb 2025 13:47:59 +0530 Subject: [PATCH 1102/1614] refactor: set received amount based on paid amount (cherry picked from commit 5ff540bd82946222740ee416a02072be94645c60) --- erpnext/accounts/doctype/payment_entry/payment_entry.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.js b/erpnext/accounts/doctype/payment_entry/payment_entry.js index 4a45007d50a..dd108e13e9e 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.js +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.js @@ -812,6 +812,15 @@ frappe.ui.form.on("Payment Entry", { paid_amount: function (frm) { frm.set_value("base_paid_amount", flt(frm.doc.paid_amount) * flt(frm.doc.source_exchange_rate)); + let company_currency = frappe.get_doc(":Company", frm.doc.company).default_currency; + if (!frm.doc.received_amount) { + if (frm.doc.paid_from_account_currency == frm.doc.paid_to_account_currency) { + frm.set_value("received_amount", frm.doc.paid_amount); + } else if (company_currency == frm.doc.paid_to_account_currency) { + frm.set_value("received_amount", frm.doc.base_paid_amount); + frm.set_value("base_received_amount", frm.doc.base_paid_amount); + } + } frm.trigger("reset_received_amount"); frm.events.hide_unhide_fields(frm); }, From e589c5b6efcd2baa565e625bf2ad02af066191c5 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 6 Feb 2025 14:15:24 +0530 Subject: [PATCH 1103/1614] refactor: set paid amount based on received amount if unset (cherry picked from commit 99e721e622ffed5967d17544b0e72bd402469b2e) --- .../doctype/payment_entry/payment_entry.js | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.js b/erpnext/accounts/doctype/payment_entry/payment_entry.js index dd108e13e9e..55fab670fd8 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.js +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.js @@ -826,22 +826,27 @@ frappe.ui.form.on("Payment Entry", { }, received_amount: function (frm) { + let company_currency = frappe.get_doc(":Company", frm.doc.company).default_currency; frm.set_paid_amount_based_on_received_amount = true; - if (!frm.doc.paid_amount && frm.doc.paid_from_account_currency == frm.doc.paid_to_account_currency) { - frm.set_value("paid_amount", frm.doc.received_amount); - - if (frm.doc.target_exchange_rate) { - frm.set_value("source_exchange_rate", frm.doc.target_exchange_rate); - } - frm.set_value("base_paid_amount", frm.doc.base_received_amount); - } - frm.set_value( "base_received_amount", flt(frm.doc.received_amount) * flt(frm.doc.target_exchange_rate) ); + if (!frm.doc.paid_amount) { + if (frm.doc.paid_from_account_currency == frm.doc.paid_to_account_currency) { + frm.set_value("paid_amount", frm.doc.received_amount); + if (frm.doc.target_exchange_rate) { + frm.set_value("source_exchange_rate", frm.doc.target_exchange_rate); + } + frm.set_value("base_paid_amount", frm.doc.base_received_amount); + } else if (company_currency == frm.doc.paid_from_account_currency) { + frm.set_value("paid_amount", frm.doc.base_received_amount); + frm.set_value("base_paid_amount", frm.doc.base_received_amount); + } + } + if (frm.doc.payment_type == "Pay") frm.events.allocate_party_amount_against_ref_docs(frm, frm.doc.received_amount, true); else frm.events.set_unallocated_amount(frm); From 1d6c50c9a1946d2bfabc54f04ce345187fe77d8c Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 10 Feb 2025 10:38:18 +0530 Subject: [PATCH 1104/1614] chore: resolve conflict --- erpnext/setup/doctype/employee/employee.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/erpnext/setup/doctype/employee/employee.json b/erpnext/setup/doctype/employee/employee.json index c07e14fc3be..22c1ce7927a 100644 --- a/erpnext/setup/doctype/employee/employee.json +++ b/erpnext/setup/doctype/employee/employee.json @@ -822,11 +822,7 @@ "image_field": "image", "is_tree": 1, "links": [], -<<<<<<< HEAD - "modified": "2024-01-03 17:36:20.984421", -======= "modified": "2025-02-07 13:54:40.122345", ->>>>>>> 0207d2d7b6 (fix: unable to remove image from employee) "modified_by": "Administrator", "module": "Setup", "name": "Employee", From eeb322bd0e837e66d57365d5fe1669e0c9a47579 Mon Sep 17 00:00:00 2001 From: Sanket322 Date: Wed, 5 Feb 2025 17:41:07 +0530 Subject: [PATCH 1105/1614] fix: handle response when json is None (cherry picked from commit 133e0417b8961657f40e4692ff9a0abf2d985d21) --- erpnext/patches/v14_0/update_reports_with_range.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/patches/v14_0/update_reports_with_range.py b/erpnext/patches/v14_0/update_reports_with_range.py index 014fba883fc..ccfa4936cfd 100644 --- a/erpnext/patches/v14_0/update_reports_with_range.py +++ b/erpnext/patches/v14_0/update_reports_with_range.py @@ -27,7 +27,7 @@ def update_reference_reports(reference_report): def update_report_json(report): - report_json = json.loads(report.json) + report_json = json.loads(report.json) if report.get("json") else {} report_filter = report_json.get("filters") if not report_filter: From 6dc99f95c01f955acc132b816c5eaa91b4c535af Mon Sep 17 00:00:00 2001 From: DaizyModi Date: Thu, 6 Feb 2025 21:54:57 +0530 Subject: [PATCH 1106/1614] fix: Attibute error `selling_price_list` (cherry picked from commit 820b32eb8ab0aa145e008cd42e7ded376e61568c) --- erpnext/stock/get_item_details.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py index 649df536f87..5c5fe5db276 100644 --- a/erpnext/stock/get_item_details.py +++ b/erpnext/stock/get_item_details.py @@ -210,7 +210,7 @@ def update_stock(ctx, out, doc=None): for batch_no, batch_qty in batches.items(): rate = get_batch_based_item_price( - {"price_list": doc.selling_price_list, "uom": out.uom, "batch_no": batch_no}, + {"price_list": doc.get("selling_price_list"), "uom": out.uom, "batch_no": batch_no}, out.item_code, ) if batch_qty >= qty: From 035758f47dcaa10e7484909eb252cf4cbb333fe6 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 10 Feb 2025 16:28:59 +0530 Subject: [PATCH 1107/1614] fix: pos numpad editable action buttons (backport #45823) (#45826) fix: pos numpad editable action buttons (#45823) (cherry picked from commit 0b9c28620faae004fd1a88774e5cbc2687b0338a) Co-authored-by: Diptanil Saha --- erpnext/selling/page/point_of_sale/pos_item_cart.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/selling/page/point_of_sale/pos_item_cart.js b/erpnext/selling/page/point_of_sale/pos_item_cart.js index 9de6dbbd429..dee052912ff 100644 --- a/erpnext/selling/page/point_of_sale/pos_item_cart.js +++ b/erpnext/selling/page/point_of_sale/pos_item_cart.js @@ -748,6 +748,7 @@ erpnext.PointOfSale.ItemCart = class { frappe.utils.play_sound("error"); return; } + this.highlight_numpad_btn($btn, current_action); if (first_click_event || field_to_edit_changed) { this.prev_action = current_action; @@ -793,7 +794,6 @@ erpnext.PointOfSale.ItemCart = class { this.numpad_value = current_action; } - this.highlight_numpad_btn($btn, current_action); this.events.numpad_event(this.numpad_value, this.prev_action); } From e8fd2eeaa2e776dc14aa060d8109645f4cc7fd46 Mon Sep 17 00:00:00 2001 From: DaizyModi Date: Thu, 6 Feb 2025 21:54:57 +0530 Subject: [PATCH 1108/1614] fix: Attibute error `selling_price_list` (cherry picked from commit 820b32eb8ab0aa145e008cd42e7ded376e61568c) (cherry picked from commit 6dc99f95c01f955acc132b816c5eaa91b4c535af) --- erpnext/stock/get_item_details.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py index e565b5c6015..291aa370056 100644 --- a/erpnext/stock/get_item_details.py +++ b/erpnext/stock/get_item_details.py @@ -207,7 +207,7 @@ def update_stock(ctx, out, doc=None): for batch_no, batch_qty in batches.items(): rate = get_batch_based_item_price( - {"price_list": doc.selling_price_list, "uom": out.uom, "batch_no": batch_no}, + {"price_list": doc.get("selling_price_list"), "uom": out.uom, "batch_no": batch_no}, out.item_code, ) if batch_qty >= qty: From 0a4a09352aebade2a3f7be0c25210a947bf0268c Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Mon, 10 Feb 2025 19:09:02 +0530 Subject: [PATCH 1109/1614] fix: check_item_quality_inspection is not whitelisted --- erpnext/controllers/stock_controller.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/controllers/stock_controller.py b/erpnext/controllers/stock_controller.py index fd92fe104cc..a8f9976c83b 100644 --- a/erpnext/controllers/stock_controller.py +++ b/erpnext/controllers/stock_controller.py @@ -1564,6 +1564,7 @@ def repost_required_for_queue(doc: StockController) -> bool: return False +@frappe.whitelist() def check_item_quality_inspection(doctype, items): if isinstance(items, str): items = json.loads(items) From d0dbfa1cbd39fc028c78a56758f89201101faf8e Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Mon, 10 Feb 2025 19:09:02 +0530 Subject: [PATCH 1110/1614] fix: check_item_quality_inspection is not whitelisted (cherry picked from commit 0a4a09352aebade2a3f7be0c25210a947bf0268c) --- erpnext/controllers/stock_controller.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/controllers/stock_controller.py b/erpnext/controllers/stock_controller.py index fd92fe104cc..a8f9976c83b 100644 --- a/erpnext/controllers/stock_controller.py +++ b/erpnext/controllers/stock_controller.py @@ -1564,6 +1564,7 @@ def repost_required_for_queue(doc: StockController) -> bool: return False +@frappe.whitelist() def check_item_quality_inspection(doctype, items): if isinstance(items, str): items = json.loads(items) From b0c9fbe9fc861659fac5f65d0cc8cfdfd3a537a3 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Mon, 10 Feb 2025 16:28:24 +0000 Subject: [PATCH 1111/1614] chore(release): Bumped to Version 15.51.2 ## [15.51.2](https://github.com/frappe/erpnext/compare/v15.51.1...v15.51.2) (2025-02-10) ### Bug Fixes * Attibute error `selling_price_list` ([e8fd2ee](https://github.com/frappe/erpnext/commit/e8fd2eeaa2e776dc14aa060d8109645f4cc7fd46)) * check_item_quality_inspection is not whitelisted ([d0dbfa1](https://github.com/frappe/erpnext/commit/d0dbfa1cbd39fc028c78a56758f89201101faf8e)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index a86ae74237c..6542e611c1e 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.51.1" +__version__ = "15.51.2" def get_default_company(user=None): From ea01fa135ee2ef0a467a97ba6dfb804926333f85 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 10 Feb 2025 17:15:28 +0530 Subject: [PATCH 1112/1614] fix: possible model sync issue (cherry picked from commit 0069581aa34ce72f17f7504d25f974a02c63b087) --- .../v15_0/sync_auto_reconcile_config.py | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/erpnext/patches/v15_0/sync_auto_reconcile_config.py b/erpnext/patches/v15_0/sync_auto_reconcile_config.py index 721364dcaa6..be92ad99536 100644 --- a/erpnext/patches/v15_0/sync_auto_reconcile_config.py +++ b/erpnext/patches/v15_0/sync_auto_reconcile_config.py @@ -11,16 +11,17 @@ def execute(): frappe.db.set_single_value("Accounts Settings", "reconciliation_queue_size", 5) # Create Scheduler Event record if it doesn't exist - method = "erpnext.accounts.doctype.process_payment_reconciliation.process_payment_reconciliation.trigger_reconciliation_for_queued_docs" - if not frappe.db.get_all( - "Scheduler Event", {"scheduled_against": "Process Payment Reconciliation", "method": method} - ): - frappe.get_doc( - { - "doctype": "Scheduler Event", - "scheduled_against": "Process Payment Reconciliation", - "method": method, - } - ).save() + if frappe.reload_doc("core", "doctype", "scheduler_event"): + method = "erpnext.accounts.doctype.process_payment_reconciliation.process_payment_reconciliation.trigger_reconciliation_for_queued_docs" + if not frappe.db.get_all( + "Scheduler Event", {"scheduled_against": "Process Payment Reconciliation", "method": method} + ): + frappe.get_doc( + { + "doctype": "Scheduler Event", + "scheduled_against": "Process Payment Reconciliation", + "method": method, + } + ).save() - sync_auto_reconcile_config(15) + sync_auto_reconcile_config(15) From e432ae98a94c7f44470d26f207ff3a2feda45a49 Mon Sep 17 00:00:00 2001 From: Sanket322 Date: Fri, 7 Feb 2025 12:37:33 +0530 Subject: [PATCH 1113/1614] fix: add total row in non_grouped_invoices (cherry picked from commit 2d32ddacc3397e118ab65ffa892706589b933f63) --- .../report/gross_profit/gross_profit.py | 29 +++++++++++++++---- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/erpnext/accounts/report/gross_profit/gross_profit.py b/erpnext/accounts/report/gross_profit/gross_profit.py index 4802b0f35c1..fe17924d527 100644 --- a/erpnext/accounts/report/gross_profit/gross_profit.py +++ b/erpnext/accounts/report/gross_profit/gross_profit.py @@ -219,15 +219,34 @@ def get_data_when_grouped_by_invoice(columns, gross_profit_data, filters, group_ def get_data_when_not_grouped_by_invoice(gross_profit_data, filters, group_wise_columns, data): - for src in gross_profit_data.grouped_data: - row = [] - for col in group_wise_columns.get(scrub(filters.group_by)): - row.append(src.get(col)) + total_base_amount = 0 + total_buying_amount = 0 - row.append(filters.currency) + group_columns = group_wise_columns.get(scrub(filters.group_by)) + + for src in gross_profit_data.grouped_data: + total_base_amount += src.base_amount or 0.00 + total_buying_amount += src.buying_amount or 0.00 + + row = [src.get(col) for col in group_columns] + [filters.currency] data.append(row) + total_gross_profit = total_base_amount - total_buying_amount + currency_precision = cint(frappe.db.get_default("currency_precision")) or 3 + gross_profit_percent = (total_gross_profit / total_base_amount * 100.0) if total_base_amount else 0 + + total_row = { + group_columns[0]: "Total", + "base_amount": total_base_amount, + "buying_amount": total_buying_amount, + "gross_profit": total_gross_profit, + "gross_profit_percent": flt(gross_profit_percent, currency_precision), + } + + total_row = [total_row.get(col, None) for col in [*group_columns, "currency"]] + data.append(total_row) + def get_columns(group_wise_columns, filters): columns = [] From 6d777cdc68e21836355245c86148767add7f495b Mon Sep 17 00:00:00 2001 From: ljain112 Date: Fri, 7 Feb 2025 18:30:26 +0530 Subject: [PATCH 1114/1614] fix: do not validate party against Receivable and Payable account for cancelled gl entries (cherry picked from commit 0809e00455b3b94de1b3731afd096f4d77414b81) --- erpnext/accounts/doctype/gl_entry/gl_entry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/gl_entry/gl_entry.py b/erpnext/accounts/doctype/gl_entry/gl_entry.py index c77a201ab51..66214cc7485 100644 --- a/erpnext/accounts/doctype/gl_entry/gl_entry.py +++ b/erpnext/accounts/doctype/gl_entry/gl_entry.py @@ -129,7 +129,7 @@ class GLEntry(Document): if not self.get(k): frappe.throw(_("{0} is required").format(_(self.meta.get_label(k)))) - if not (self.party_type and self.party): + if not self.is_cancelled and not (self.party_type and self.party): account_type = frappe.get_cached_value("Account", self.account, "account_type") if account_type == "Receivable": frappe.throw( From b06bd825c19a5d1c1aeb3ade1a5dda65a7f2286f Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 11 Feb 2025 14:49:27 +0530 Subject: [PATCH 1115/1614] fix: correct amount in transaction currency for reverse gl entries (backport #45794) (#45849) fix: correct amount in tansaction currency for reverse gl entries (cherry picked from commit 6077c248b021c4123dadf3878fb071dab457a469) Co-authored-by: ljain112 --- erpnext/accounts/general_ledger.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/erpnext/accounts/general_ledger.py b/erpnext/accounts/general_ledger.py index e5e43aefa32..7d0bf2cca11 100644 --- a/erpnext/accounts/general_ledger.py +++ b/erpnext/accounts/general_ledger.py @@ -680,11 +680,15 @@ def make_reverse_gl_entries( debit_in_account_currency = new_gle.get("debit_in_account_currency", 0) credit_in_account_currency = new_gle.get("credit_in_account_currency", 0) + debit_in_transaction_currency = new_gle.get("debit_in_transaction_currency", 0) + credit_in_transaction_currency = new_gle.get("credit_in_transaction_currency", 0) new_gle["debit"] = credit new_gle["credit"] = debit new_gle["debit_in_account_currency"] = credit_in_account_currency new_gle["credit_in_account_currency"] = debit_in_account_currency + new_gle["debit_in_transaction_currency"] = credit_in_transaction_currency + new_gle["credit_in_transaction_currency"] = debit_in_transaction_currency new_gle["remarks"] = "On cancellation of " + new_gle["voucher_no"] new_gle["is_cancelled"] = 1 From b112d88767a3cd98a8c9a3a2804d3f491c4c7d4a Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 11 Feb 2025 14:52:13 +0530 Subject: [PATCH 1116/1614] fix: map project from rfq to supplier quotation (backport #45745) (#45828) * fix: map project from rfq to supplier quotation (cherry picked from commit d0479036bbfc72b531976809e8e8c33b2fdc61e4) * fix: add project field map from mr to rfq (cherry picked from commit 8fa39bec618dd490432c88c3e6d53ca4ae232e27) --------- Co-authored-by: HenningWendtland <156231187+HenningWendtland@users.noreply.github.com> --- .../doctype/request_for_quotation/request_for_quotation.py | 6 +++++- erpnext/stock/doctype/material_request/material_request.py | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py index 3a71733a003..bef41394742 100644 --- a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py +++ b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py @@ -394,7 +394,11 @@ def make_supplier_quotation_from_rfq(source_name, target_doc=None, for_supplier= }, "Request for Quotation Item": { "doctype": "Supplier Quotation Item", - "field_map": {"name": "request_for_quotation_item", "parent": "request_for_quotation"}, + "field_map": { + "name": "request_for_quotation_item", + "parent": "request_for_quotation", + "project_name": "project", + }, }, }, target_doc, diff --git a/erpnext/stock/doctype/material_request/material_request.py b/erpnext/stock/doctype/material_request/material_request.py index f59b60a3f51..69572e661f8 100644 --- a/erpnext/stock/doctype/material_request/material_request.py +++ b/erpnext/stock/doctype/material_request/material_request.py @@ -482,7 +482,7 @@ def make_request_for_quotation(source_name, target_doc=None): "field_map": [ ["name", "material_request_item"], ["parent", "material_request"], - ["uom", "uom"], + ["project", "project_name"], ], }, }, From 2e9e355329cd69b5822d4ffa9dc5aae395e07513 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 11 Feb 2025 15:41:30 +0530 Subject: [PATCH 1117/1614] fix(regional): removed payment schedule validation in sales invoice for italy (backport #45852) (#45854) fix(regional): removed payment schedule validation in sales invoice for italy (#45852) (cherry picked from commit 494310293cfd896e7b6ed6a4863a0fa3e4b2aa2b) Co-authored-by: Lakshit Jain <108322669+ljain112@users.noreply.github.com> --- erpnext/regional/italy/utils.py | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/erpnext/regional/italy/utils.py b/erpnext/regional/italy/utils.py index 1e0a8805075..43ff59a1006 100644 --- a/erpnext/regional/italy/utils.py +++ b/erpnext/regional/italy/utils.py @@ -331,22 +331,19 @@ def sales_invoice_on_submit(doc, method): ]: return - if not len(doc.payment_schedule): - frappe.throw(_("Please set the Payment Schedule"), title=_("E-Invoicing Information Missing")) - else: - for schedule in doc.payment_schedule: - if not schedule.mode_of_payment: - frappe.throw( - _("Row {0}: Please set the Mode of Payment in Payment Schedule").format(schedule.idx), - title=_("E-Invoicing Information Missing"), - ) - elif not frappe.db.get_value("Mode of Payment", schedule.mode_of_payment, "mode_of_payment_code"): - frappe.throw( - _("Row {0}: Please set the correct code on Mode of Payment {1}").format( - schedule.idx, schedule.mode_of_payment - ), - title=_("E-Invoicing Information Missing"), - ) + for schedule in doc.payment_schedule: + if not schedule.mode_of_payment: + frappe.throw( + _("Row {0}: Please set the Mode of Payment in Payment Schedule").format(schedule.idx), + title=_("E-Invoicing Information Missing"), + ) + elif not frappe.db.get_value("Mode of Payment", schedule.mode_of_payment, "mode_of_payment_code"): + frappe.throw( + _("Row {0}: Please set the correct code on Mode of Payment {1}").format( + schedule.idx, schedule.mode_of_payment + ), + title=_("E-Invoicing Information Missing"), + ) prepare_and_attach_invoice(doc) From 0954aca758e73ebb9f6bc078139497377e4b4954 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 11 Feb 2025 15:42:36 +0530 Subject: [PATCH 1118/1614] fix: do not allow "Finance Book" in Accounting Dimensions (backport #45696) (#45856) fix: do not allow "Finance Book" in Accounting Dimensions (cherry picked from commit a44be73a98989bd53ffa6b295ac29530065e3a62) Co-authored-by: ljain112 --- .../doctype/accounting_dimension/accounting_dimension.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.py b/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.py index 8fc22dd7650..f8eeba84662 100644 --- a/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.py +++ b/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.py @@ -49,6 +49,7 @@ class AccountingDimension(Document): "Accounting Dimension Detail", "Company", "Account", + "Finance Book", ): msg = _("Not allowed to create accounting dimension for {0}").format(self.document_type) frappe.throw(msg) From 435c35414fab3f259c8f1a1709037bf35dbe4056 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 11 Feb 2025 15:42:45 +0530 Subject: [PATCH 1119/1614] fix: Party name in Supplier Portal for Purchase Order (backport #45772) (#45858) fix: Party name in Supplier Portal for Purchase Order (cherry picked from commit fc8663421be7499dadb1019d9db7e520a8b01f6a) Co-authored-by: ljain112 --- erpnext/templates/pages/order.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/erpnext/templates/pages/order.html b/erpnext/templates/pages/order.html index 7fb5ed9b56a..315478fc649 100644 --- a/erpnext/templates/pages/order.html +++ b/erpnext/templates/pages/order.html @@ -72,8 +72,7 @@
- {%- set party_name = doc.supplier_name if doc.doctype in ['Supplier Quotation', 'Purchase Invoice', 'Purchase - Order'] else doc.customer_name %} + {%- set party_name = doc.supplier_name if doc.doctype in ['Supplier Quotation', 'Purchase Invoice', 'Purchase Order'] else doc.customer_name %} {{ party_name }} {% if doc.contact_display and doc.contact_display != party_name %} From 179cb1e6e589b9d1e60dda5243e7f5a284e9fd86 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 11 Feb 2025 16:05:42 +0530 Subject: [PATCH 1120/1614] fix: correct amt in account currency for lcv with manually distributed charges. (backport #45532) (#45864) fix: correct amt in account currency for lcv with manually distributed charges. (cherry picked from commit db38e7bf5a8e088578f1c84b7b095ff8abdda32f) Co-authored-by: ljain112 --- .../purchase_receipt/purchase_receipt.py | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py index 44e0145ea6c..0328c447ec2 100644 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py @@ -1360,26 +1360,25 @@ def get_item_account_wise_additional_cost(purchase_document): for item in landed_cost_voucher_doc.items: if item.receipt_document == purchase_document: for account in landed_cost_voucher_doc.taxes: + exchange_rate = account.exchange_rate or 1 item_account_wise_cost.setdefault((item.item_code, item.purchase_receipt_item), {}) item_account_wise_cost[(item.item_code, item.purchase_receipt_item)].setdefault( account.expense_account, {"amount": 0.0, "base_amount": 0.0} ) - if total_item_cost > 0: - item_account_wise_cost[(item.item_code, item.purchase_receipt_item)][ - account.expense_account - ]["amount"] += account.amount * item.get(based_on_field) / total_item_cost + item_row = item_account_wise_cost[(item.item_code, item.purchase_receipt_item)][ + account.expense_account + ] - item_account_wise_cost[(item.item_code, item.purchase_receipt_item)][ - account.expense_account - ]["base_amount"] += account.base_amount * item.get(based_on_field) / total_item_cost + if total_item_cost > 0: + item_row["amount"] += account.amount * item.get(based_on_field) / total_item_cost + + item_row["base_amount"] += ( + account.base_amount * item.get(based_on_field) / total_item_cost + ) else: - item_account_wise_cost[(item.item_code, item.purchase_receipt_item)][ - account.expense_account - ]["amount"] += item.applicable_charges - item_account_wise_cost[(item.item_code, item.purchase_receipt_item)][ - account.expense_account - ]["base_amount"] += item.applicable_charges + item_row["amount"] += item.applicable_charges / exchange_rate + item_row["base_amount"] += item.applicable_charges return item_account_wise_cost From 3b7c38da1095f246af15e91398e73a32964efbda Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Tue, 11 Feb 2025 15:58:35 +0530 Subject: [PATCH 1121/1614] fix: stock reco current valuation rate (cherry picked from commit 8d8f3afb39758b98a33a71189098fa4af3df385f) --- .../stock_reconciliation.py | 4 +- .../test_stock_reconciliation.py | 38 +++++++++++++++++++ 2 files changed, 40 insertions(+), 2 deletions(-) diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py index 85c74480e7d..a9f99e177fd 100644 --- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py +++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py @@ -1372,13 +1372,13 @@ def get_stock_balance_for( or 0 ) - if row.use_serial_batch_fields and row.batch_no: + if row.use_serial_batch_fields and row.batch_no and (qty or row.current_qty): rate = get_incoming_rate( frappe._dict( { "item_code": row.item_code, "warehouse": row.warehouse, - "qty": row.qty * -1, + "qty": flt(qty or row.current_qty) * -1, "batch_no": row.batch_no, "company": company, "posting_date": posting_date, diff --git a/erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.py b/erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.py index 48a27a25962..77d2f7eaebb 100644 --- a/erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.py +++ b/erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.py @@ -1408,6 +1408,44 @@ class TestStockReconciliation(FrappeTestCase, StockTestMixin): self.assertTrue(sr.items[0].current_serial_and_batch_bundle) self.assertFalse(sr.items[0].serial_and_batch_bundle) + def test_stock_reco_batch_item_current_valuation(self): + from erpnext.stock.doctype.stock_entry.test_stock_entry import make_stock_entry + + # Add new serial nos + item_code = "Stock-Reco-batch-Item-1234" + warehouse = "_Test Warehouse - _TC" + self.make_item( + item_code, + frappe._dict( + { + "is_stock_item": 1, + "has_batch_no": 1, + "create_new_batch": 1, + "batch_number_series": "JJ-SRI1234-.#####", + } + ), + ) + + se = make_stock_entry( + item_code=item_code, + target=warehouse, + qty=1, + basic_rate=100, + ) + + batch_no = get_batch_from_bundle(se.items[0].serial_and_batch_bundle) + + sr = create_stock_reconciliation( + item_code=item_code, warehouse=warehouse, qty=0, rate=100, do_not_save=1 + ) + + sr.items[0].batch_no = batch_no + sr.items[0].use_serial_batch_fields = 1 + sr.save() + self.assertEqual(sr.items[0].current_valuation_rate, 100) + self.assertEqual(sr.difference_amount, 100 * -1) + self.assertTrue(sr.items[0].qty == 0) + def create_batch_item_with_batch(item_name, batch_id): batch_item_doc = create_item(item_name, is_stock_item=1) From 1359a77e7245cef415ba5f1988b45b7e2c64f0c8 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Tue, 11 Feb 2025 13:31:24 +0530 Subject: [PATCH 1122/1614] fix: remove serial no if qty is zero (cherry picked from commit 3a4ae8c463de469c6deb6d67252b6f224632e202) --- .../doctype/stock_reconciliation/stock_reconciliation.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js index 85acc762969..9307eee46f1 100644 --- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js +++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js @@ -295,6 +295,11 @@ frappe.ui.form.on("Stock Reconciliation Item", { qty: function (frm, cdt, cdn) { frm.events.set_amount_quantity(frm, cdt, cdn); + + let row = locals[cdt][cdn]; + if (row.use_serial_batch_fields && !row.qty && row.serial_no) { + frappe.model.set_value(cdt, cdn, "serial_no", ""); + } }, valuation_rate: function (frm, cdt, cdn) { From 4f9a7f50653109c547b4465a9bf867d11e15bf9c Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 11 Feb 2025 17:55:07 +0530 Subject: [PATCH 1123/1614] fix: added validation for required invoice_fields in POS (backport #45780) (#45868) * fix: added validation for required invoice_fields in POS (#45780) fix: added missing validation for required invoice_fields (cherry picked from commit b95b13ecd880a595275a795b7da45dede0756c44) # Conflicts: # erpnext/selling/page/point_of_sale/pos_payment.js * fix: resolved merge conflict --------- Co-authored-by: Diptanil Saha --- .../selling/page/point_of_sale/pos_payment.js | 26 ++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/erpnext/selling/page/point_of_sale/pos_payment.js b/erpnext/selling/page/point_of_sale/pos_payment.js index 0adbf2280dc..33dd0489ba2 100644 --- a/erpnext/selling/page/point_of_sale/pos_payment.js +++ b/erpnext/selling/page/point_of_sale/pos_payment.js @@ -41,6 +41,7 @@ erpnext.PointOfSale.Payment = class { } make_invoice_fields_control() { + this.reqd_invoice_fields = []; frappe.db.get_doc("POS Settings", undefined).then((doc) => { const fields = doc.invoice_fields; if (!fields.length) return; @@ -67,6 +68,9 @@ erpnext.PointOfSale.Payment = class { }, }; } + if (df.reqd && (df.fieldtype !== "Button" || !df.read_only)) { + this.reqd_invoice_fields.push({ fieldname: df.fieldname, label: df.label }); + } this[`${df.fieldname}_field`] = frappe.ui.form.make_control({ df: { @@ -204,7 +208,11 @@ erpnext.PointOfSale.Payment = class { const paid_amount = doc.paid_amount; const items = doc.items; - if (paid_amount == 0 || !items.length) { + if (!this.validate_reqd_invoice_fields()) { + return; + } + + if (!items.length || (paid_amount == 0 && doc.additional_discount_percentage != 100)) { const message = items.length ? __("You cannot submit the order without payment.") : __("You cannot submit empty order."); @@ -620,4 +628,20 @@ erpnext.PointOfSale.Payment = class { .replace(/^[^_a-zA-Z\p{L}]+/u, "") .toLowerCase(); } + + validate_reqd_invoice_fields() { + const doc = this.events.get_frm().doc; + let validation_flag = true; + for (let field of this.reqd_invoice_fields) { + if (!doc[field.fieldname]) { + validation_flag = false; + frappe.show_alert({ + message: __("{0} is a mandatory field.", [field.label]), + indicator: "orange", + }); + frappe.utils.play_sound("error"); + } + } + return validation_flag; + } }; From a85f6f54fe5340877c1aad06afb323420807fe08 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Tue, 11 Feb 2025 22:51:17 +0530 Subject: [PATCH 1124/1614] fix: add precision in serial_batch_bundle.py (cherry picked from commit 4bf85d1a5a9d8a916e84205e38ad4db7c4ae2275) --- erpnext/stock/serial_batch_bundle.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/erpnext/stock/serial_batch_bundle.py b/erpnext/stock/serial_batch_bundle.py index 650c66dd408..993d918f8bc 100644 --- a/erpnext/stock/serial_batch_bundle.py +++ b/erpnext/stock/serial_batch_bundle.py @@ -1080,6 +1080,7 @@ class SerialBatchCreation: def set_serial_batch_entries(self, doc): incoming_rate = self.get("incoming_rate") + precision = frappe.get_precision("Serial and Batch Entry", "qty") if self.get("serial_nos"): serial_no_wise_batch = frappe._dict({}) if self.has_batch_no: @@ -1109,7 +1110,8 @@ class SerialBatchCreation: "entries", { "batch_no": batch_no, - "qty": batch_qty * (-1 if self.type_of_transaction == "Outward" else 1), + "qty": flt(batch_qty, precision) + * (-1 if self.type_of_transaction == "Outward" else 1), "incoming_rate": incoming_rate, }, ) From 1d3da4d49a921c40072c980c016964cdccbfef41 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Tue, 11 Feb 2025 15:32:35 +0530 Subject: [PATCH 1125/1614] fix: dont update rate of free item on save (cherry picked from commit 6591e76a635aa6efe1214054e964a0fca1572004) --- erpnext/controllers/accounts_controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 715a73e0da6..f1e98c624b5 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -821,7 +821,7 @@ class AccountsController(TransactionBase): and item.get("use_serial_batch_fields") ) ): - if fieldname == "batch_no" and not item.batch_no: + if fieldname == "batch_no" and not item.batch_no and not item.is_free_item: item.set("rate", ret.get("rate")) item.set("price_list_rate", ret.get("price_list_rate")) item.set(fieldname, value) From 48a4effdb65b016b9d0eb8066758c9577fcb0d8c Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Wed, 12 Feb 2025 09:55:20 +0530 Subject: [PATCH 1126/1614] fix: changed naming series to random for SABB (cherry picked from commit a007dc285d121bc3a004df19a53523e4ac7e4737) # Conflicts: # erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.json --- .../serial_and_batch_bundle.json | 18 +++++++++--------- .../serial_and_batch_bundle.py | 5 +---- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.json b/erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.json index 59ef43e31a8..4cb32bc3f6a 100644 --- a/erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.json +++ b/erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.json @@ -1,13 +1,12 @@ { "actions": [], - "autoname": "naming_series:", + "autoname": "hash", "creation": "2023-08-11 17:22:12.907518", "doctype": "DocType", "editable_grid": 1, "engine": "InnoDB", "field_order": [ "item_details_tab", - "naming_series", "company", "item_name", "has_serial_no", @@ -152,6 +151,7 @@ "fieldtype": "Column Break" }, { + "allow_on_submit": 1, "fieldname": "avg_rate", "fieldtype": "Float", "label": "Avg Rate", @@ -159,6 +159,7 @@ "read_only": 1 }, { + "allow_on_submit": 1, "fieldname": "total_amount", "fieldtype": "Float", "label": "Total Amount", @@ -166,6 +167,7 @@ "read_only": 1 }, { + "allow_on_submit": 1, "fieldname": "total_qty", "fieldtype": "Float", "label": "Total Qty", @@ -195,12 +197,6 @@ "reqd": 1, "search_index": 1 }, - { - "fieldname": "naming_series", - "fieldtype": "Select", - "label": "Naming Series", - "options": "SABB-.########" - }, { "default": "0", "depends_on": "eval:doc.voucher_type == \"Purchase Receipt\"", @@ -251,11 +247,15 @@ "index_web_pages_for_search": 1, "is_submittable": 1, "links": [], +<<<<<<< HEAD "modified": "2024-03-15 15:22:24.003486", +======= + "modified": "2025-02-12 09:53:32.090309", +>>>>>>> a007dc285d (fix: changed naming series to random for SABB) "modified_by": "Administrator", "module": "Stock", "name": "Serial and Batch Bundle", - "naming_rule": "By \"Naming Series\" field", + "naming_rule": "Random", "owner": "Administrator", "permissions": [ { 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 dcd876deeb7..c37d2464ff0 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 @@ -55,9 +55,7 @@ class SerialandBatchBundle(Document): if TYPE_CHECKING: from frappe.types import DF - from erpnext.stock.doctype.serial_and_batch_entry.serial_and_batch_entry import ( - SerialandBatchEntry, - ) + from erpnext.stock.doctype.serial_and_batch_entry.serial_and_batch_entry import SerialandBatchEntry amended_from: DF.Link | None avg_rate: DF.Float @@ -70,7 +68,6 @@ class SerialandBatchBundle(Document): item_code: DF.Link item_group: DF.Link | None item_name: DF.Data | None - naming_series: DF.Literal["SABB-.########"] posting_date: DF.Date | None posting_time: DF.Time | None returned_against: DF.Data | None From 4094fbd6c5f970f0bd8d8b2a659f8b9a48fab979 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Wed, 12 Feb 2025 10:21:44 +0530 Subject: [PATCH 1127/1614] chore: fix conflicts --- .../serial_and_batch_bundle/serial_and_batch_bundle.json | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.json b/erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.json index 4cb32bc3f6a..3ff76ee818b 100644 --- a/erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.json +++ b/erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.json @@ -247,11 +247,7 @@ "index_web_pages_for_search": 1, "is_submittable": 1, "links": [], -<<<<<<< HEAD - "modified": "2024-03-15 15:22:24.003486", -======= - "modified": "2025-02-12 09:53:32.090309", ->>>>>>> a007dc285d (fix: changed naming series to random for SABB) + "modified": "2025-02-12 10:53:32.090309", "modified_by": "Administrator", "module": "Stock", "name": "Serial and Batch Bundle", @@ -389,4 +385,4 @@ "sort_order": "DESC", "states": [], "title_field": "item_code" -} \ No newline at end of file +} From 7d871f6bb54bccb4615d414cef82c78ba21c5302 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Thu, 6 Feb 2025 14:46:19 +0530 Subject: [PATCH 1128/1614] fix: stock reservation not working for sales invoice with update stock (cherry picked from commit 0c9d0ea1f4a7731706fb97d17e8c76f49f2e6477) # Conflicts: # erpnext/selling/doctype/sales_order/test_sales_order.py --- .../doctype/sales_invoice/sales_invoice.py | 3 + erpnext/controllers/selling_controller.py | 145 ++++++++++++++++++ .../doctype/sales_order/test_sales_order.py | 117 ++++++++++++++ .../doctype/delivery_note/delivery_note.py | 143 ----------------- 4 files changed, 265 insertions(+), 143 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 5753eba8cc1..7345a5ef78d 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -460,6 +460,8 @@ class SalesInvoice(SellingController): self.make_bundle_for_sales_purchase_return(table_name) self.make_bundle_using_old_serial_batch_fields(table_name) + + self.update_stock_reservation_entries() self.update_stock_ledger() # this sequence because outstanding may get -ve @@ -561,6 +563,7 @@ class SalesInvoice(SellingController): self.make_gl_entries_on_cancel() if self.update_stock == 1: + self.update_stock_reservation_entries() self.repost_future_sle_and_gle() self.db_set("status", "Cancelled") diff --git a/erpnext/controllers/selling_controller.py b/erpnext/controllers/selling_controller.py index f79d83d5b09..4b5b28c05fa 100644 --- a/erpnext/controllers/selling_controller.py +++ b/erpnext/controllers/selling_controller.py @@ -791,6 +791,151 @@ class SellingController(StockController): validate_item_type(self, "is_sales_item", "sales") + def update_stock_reservation_entries(self) -> None: + """Updates Delivered Qty in Stock Reservation Entries.""" + + # Don't update Delivered Qty on Return. + if self.is_return: + return + + so_field = "sales_order" if self.doctype == "Sales Invoice" else "against_sales_order" + + if self._action == "submit": + for item in self.get("items"): + # Skip if `Sales Order` or `Sales Order Item` reference is not set. + if not item.get(so_field) or not item.so_detail: + continue + + sre_list = frappe.db.get_all( + "Stock Reservation Entry", + { + "docstatus": 1, + "voucher_type": "Sales Order", + "voucher_no": item.get(so_field), + "voucher_detail_no": item.so_detail, + "warehouse": item.warehouse, + "status": ["not in", ["Delivered", "Cancelled"]], + }, + order_by="creation", + ) + + # Skip if no Stock Reservation Entries. + if not sre_list: + continue + + qty_to_deliver = item.stock_qty + for sre in sre_list: + if qty_to_deliver <= 0: + break + + sre_doc = frappe.get_doc("Stock Reservation Entry", sre) + + qty_can_be_deliver = 0 + if sre_doc.reservation_based_on == "Serial and Batch": + sbb = frappe.get_doc("Serial and Batch Bundle", item.serial_and_batch_bundle) + if sre_doc.has_serial_no: + delivered_serial_nos = [d.serial_no for d in sbb.entries] + for entry in sre_doc.sb_entries: + if entry.serial_no in delivered_serial_nos: + entry.delivered_qty = 1 # Qty will always be 0 or 1 for Serial No. + entry.db_update() + qty_can_be_deliver += 1 + delivered_serial_nos.remove(entry.serial_no) + else: + delivered_batch_qty = {d.batch_no: -1 * d.qty for d in sbb.entries} + for entry in sre_doc.sb_entries: + if entry.batch_no in delivered_batch_qty: + delivered_qty = min( + (entry.qty - entry.delivered_qty), delivered_batch_qty[entry.batch_no] + ) + entry.delivered_qty += delivered_qty + entry.db_update() + qty_can_be_deliver += delivered_qty + delivered_batch_qty[entry.batch_no] -= delivered_qty + else: + # `Delivered Qty` should be less than or equal to `Reserved Qty`. + qty_can_be_deliver = min( + (sre_doc.reserved_qty - sre_doc.delivered_qty), qty_to_deliver + ) + + sre_doc.delivered_qty += qty_can_be_deliver + sre_doc.db_update() + + # Update Stock Reservation Entry `Status` based on `Delivered Qty`. + sre_doc.update_status() + + # Update Reserved Stock in Bin. + sre_doc.update_reserved_stock_in_bin() + + qty_to_deliver -= qty_can_be_deliver + + if self._action == "cancel": + for item in self.get("items"): + # Skip if `Sales Order` or `Sales Order Item` reference is not set. + if not item.get(so_field) or not item.so_detail: + continue + + sre_list = frappe.db.get_all( + "Stock Reservation Entry", + { + "docstatus": 1, + "voucher_type": "Sales Order", + "voucher_no": item.get(so_field), + "voucher_detail_no": item.so_detail, + "warehouse": item.warehouse, + "status": ["in", ["Partially Delivered", "Delivered"]], + }, + order_by="creation", + ) + + # Skip if no Stock Reservation Entries. + if not sre_list: + continue + + qty_to_undelivered = item.stock_qty + for sre in sre_list: + if qty_to_undelivered <= 0: + break + + sre_doc = frappe.get_doc("Stock Reservation Entry", sre) + + qty_can_be_undelivered = 0 + if sre_doc.reservation_based_on == "Serial and Batch": + sbb = frappe.get_doc("Serial and Batch Bundle", item.serial_and_batch_bundle) + if sre_doc.has_serial_no: + serial_nos_to_undelivered = [d.serial_no for d in sbb.entries] + for entry in sre_doc.sb_entries: + if entry.serial_no in serial_nos_to_undelivered: + entry.delivered_qty = 0 # Qty will always be 0 or 1 for Serial No. + entry.db_update() + qty_can_be_undelivered += 1 + serial_nos_to_undelivered.remove(entry.serial_no) + else: + batch_qty_to_undelivered = {d.batch_no: -1 * d.qty for d in sbb.entries} + for entry in sre_doc.sb_entries: + if entry.batch_no in batch_qty_to_undelivered: + undelivered_qty = min( + entry.delivered_qty, batch_qty_to_undelivered[entry.batch_no] + ) + entry.delivered_qty -= undelivered_qty + entry.db_update() + qty_can_be_undelivered += undelivered_qty + batch_qty_to_undelivered[entry.batch_no] -= undelivered_qty + else: + # `Qty to Undelivered` should be less than or equal to `Delivered Qty`. + qty_can_be_undelivered = min(sre_doc.delivered_qty, qty_to_undelivered) + + sre_doc.delivered_qty -= qty_can_be_undelivered + sre_doc.db_update() + + # Update Stock Reservation Entry `Status` based on `Delivered Qty`. + sre_doc.update_status() + + # Update Reserved Stock in Bin. + sre_doc.update_reserved_stock_in_bin() + + qty_to_undelivered -= qty_can_be_undelivered + def set_default_income_account_for_item(obj): for d in obj.get("items"): diff --git a/erpnext/selling/doctype/sales_order/test_sales_order.py b/erpnext/selling/doctype/sales_order/test_sales_order.py index 47d42b0a9d5..e4fc1b6fe53 100644 --- a/erpnext/selling/doctype/sales_order/test_sales_order.py +++ b/erpnext/selling/doctype/sales_order/test_sales_order.py @@ -2119,6 +2119,123 @@ class TestSalesOrder(AccountsTestMixin, FrappeTestCase): self.assertRaises(frappe.ValidationError, so1.update_status, "Draft") +<<<<<<< HEAD +======= + @IntegrationTestCase.change_settings("Stock Settings", {"enable_stock_reservation": True}) + def test_warehouse_mapping_based_on_stock_reservation(self): + self.create_company(company_name="Glass Ceiling", abbr="GC") + self.create_item("Lamy Safari 2", True, self.warehouse_stores, self.company, 2000) + self.create_customer() + self.clear_old_entries() + + so = frappe.new_doc("Sales Order") + so.company = self.company + so.customer = self.customer + so.transaction_date = today() + so.append( + "items", + { + "item_code": self.item, + "qty": 10, + "rate": 2000, + "warehouse": self.warehouse_stores, + "delivery_date": today(), + }, + ) + so.submit() + + # Create stock + se = frappe.get_doc( + { + "doctype": "Stock Entry", + "company": self.company, + "stock_entry_type": "Material Receipt", + "posting_date": today(), + "items": [ + {"item_code": self.item, "t_warehouse": self.warehouse_stores, "qty": 5}, + {"item_code": self.item, "t_warehouse": self.warehouse_finished_goods, "qty": 5}, + ], + } + ) + se.submit() + + # Reserve stock on 2 different warehouses + itm = so.items[0] + so.create_stock_reservation_entries( + [ + { + "sales_order_item": itm.name, + "item_code": itm.item_code, + "warehouse": self.warehouse_stores, + "qty_to_reserve": 2, + } + ] + ) + so.create_stock_reservation_entries( + [ + { + "sales_order_item": itm.name, + "item_code": itm.item_code, + "warehouse": self.warehouse_finished_goods, + "qty_to_reserve": 3, + } + ] + ) + + # Delivery note should auto-select warehouse based on reservation + dn = make_delivery_note(so.name, kwargs={"for_reserved_stock": True}) + self.assertEqual(2, len(dn.items)) + self.assertEqual(dn.items[0].qty, 2) + self.assertEqual(dn.items[0].warehouse, self.warehouse_stores) + self.assertEqual(dn.items[1].qty, 3) + self.assertEqual(dn.items[1].warehouse, self.warehouse_finished_goods) + + from erpnext.stock.doctype.warehouse.test_warehouse import create_warehouse + + warehouse = create_warehouse("Test Warehouse 1", company=self.company) + + make_stock_entry( + item_code=self.item, + target=warehouse, + qty=5, + company=self.company, + ) + + so = frappe.new_doc("Sales Order") + so.reserve_stock = 1 + so.company = self.company + so.customer = self.customer + so.transaction_date = today() + so.currency = "INR" + so.append( + "items", + { + "item_code": self.item, + "qty": 5, + "rate": 2000, + "warehouse": warehouse, + "delivery_date": today(), + }, + ) + so.submit() + + sres = frappe.get_all( + "Stock Reservation Entry", + filters={"voucher_no": so.name}, + fields=["name"], + ) + + self.assertEqual(len(sres), 1) + sre_doc = frappe.get_doc("Stock Reservation Entry", sres[0].name) + self.assertFalse(sre_doc.status == "Delivered") + + si = make_sales_invoice(so.name) + si.update_stock = 1 + si.submit() + sre_doc.reload() + self.assertTrue(sre_doc.status == "Delivered") + +>>>>>>> 0c9d0ea1f4 (fix: stock reservation not working for sales invoice with update stock) def automatically_fetch_payment_terms(enable=1): accounts_settings = frappe.get_doc("Accounts Settings") diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.py b/erpnext/stock/doctype/delivery_note/delivery_note.py index 39527c9ec47..ba04abce8f3 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note.py +++ b/erpnext/stock/doctype/delivery_note/delivery_note.py @@ -491,149 +491,6 @@ class DeliveryNote(SellingController): self.delete_auto_created_batches() - def update_stock_reservation_entries(self) -> None: - """Updates Delivered Qty in Stock Reservation Entries.""" - - # Don't update Delivered Qty on Return. - if self.is_return: - return - - if self._action == "submit": - for item in self.get("items"): - # Skip if `Sales Order` or `Sales Order Item` reference is not set. - if not item.against_sales_order or not item.so_detail: - continue - - sre_list = frappe.db.get_all( - "Stock Reservation Entry", - { - "docstatus": 1, - "voucher_type": "Sales Order", - "voucher_no": item.against_sales_order, - "voucher_detail_no": item.so_detail, - "warehouse": item.warehouse, - "status": ["not in", ["Delivered", "Cancelled"]], - }, - order_by="creation", - ) - - # Skip if no Stock Reservation Entries. - if not sre_list: - continue - - qty_to_deliver = item.stock_qty - for sre in sre_list: - if qty_to_deliver <= 0: - break - - sre_doc = frappe.get_doc("Stock Reservation Entry", sre) - - qty_can_be_deliver = 0 - if sre_doc.reservation_based_on == "Serial and Batch": - sbb = frappe.get_doc("Serial and Batch Bundle", item.serial_and_batch_bundle) - if sre_doc.has_serial_no: - delivered_serial_nos = [d.serial_no for d in sbb.entries] - for entry in sre_doc.sb_entries: - if entry.serial_no in delivered_serial_nos: - entry.delivered_qty = 1 # Qty will always be 0 or 1 for Serial No. - entry.db_update() - qty_can_be_deliver += 1 - delivered_serial_nos.remove(entry.serial_no) - else: - delivered_batch_qty = {d.batch_no: -1 * d.qty for d in sbb.entries} - for entry in sre_doc.sb_entries: - if entry.batch_no in delivered_batch_qty: - delivered_qty = min( - (entry.qty - entry.delivered_qty), delivered_batch_qty[entry.batch_no] - ) - entry.delivered_qty += delivered_qty - entry.db_update() - qty_can_be_deliver += delivered_qty - delivered_batch_qty[entry.batch_no] -= delivered_qty - else: - # `Delivered Qty` should be less than or equal to `Reserved Qty`. - qty_can_be_deliver = min( - (sre_doc.reserved_qty - sre_doc.delivered_qty), qty_to_deliver - ) - - sre_doc.delivered_qty += qty_can_be_deliver - sre_doc.db_update() - - # Update Stock Reservation Entry `Status` based on `Delivered Qty`. - sre_doc.update_status() - - # Update Reserved Stock in Bin. - sre_doc.update_reserved_stock_in_bin() - - qty_to_deliver -= qty_can_be_deliver - - if self._action == "cancel": - for item in self.get("items"): - # Skip if `Sales Order` or `Sales Order Item` reference is not set. - if not item.against_sales_order or not item.so_detail: - continue - - sre_list = frappe.db.get_all( - "Stock Reservation Entry", - { - "docstatus": 1, - "voucher_type": "Sales Order", - "voucher_no": item.against_sales_order, - "voucher_detail_no": item.so_detail, - "warehouse": item.warehouse, - "status": ["in", ["Partially Delivered", "Delivered"]], - }, - order_by="creation", - ) - - # Skip if no Stock Reservation Entries. - if not sre_list: - continue - - qty_to_undelivered = item.stock_qty - for sre in sre_list: - if qty_to_undelivered <= 0: - break - - sre_doc = frappe.get_doc("Stock Reservation Entry", sre) - - qty_can_be_undelivered = 0 - if sre_doc.reservation_based_on == "Serial and Batch": - sbb = frappe.get_doc("Serial and Batch Bundle", item.serial_and_batch_bundle) - if sre_doc.has_serial_no: - serial_nos_to_undelivered = [d.serial_no for d in sbb.entries] - for entry in sre_doc.sb_entries: - if entry.serial_no in serial_nos_to_undelivered: - entry.delivered_qty = 0 # Qty will always be 0 or 1 for Serial No. - entry.db_update() - qty_can_be_undelivered += 1 - serial_nos_to_undelivered.remove(entry.serial_no) - else: - batch_qty_to_undelivered = {d.batch_no: -1 * d.qty for d in sbb.entries} - for entry in sre_doc.sb_entries: - if entry.batch_no in batch_qty_to_undelivered: - undelivered_qty = min( - entry.delivered_qty, batch_qty_to_undelivered[entry.batch_no] - ) - entry.delivered_qty -= undelivered_qty - entry.db_update() - qty_can_be_undelivered += undelivered_qty - batch_qty_to_undelivered[entry.batch_no] -= undelivered_qty - else: - # `Qty to Undelivered` should be less than or equal to `Delivered Qty`. - qty_can_be_undelivered = min(sre_doc.delivered_qty, qty_to_undelivered) - - sre_doc.delivered_qty -= qty_can_be_undelivered - sre_doc.db_update() - - # Update Stock Reservation Entry `Status` based on `Delivered Qty`. - sre_doc.update_status() - - # Update Reserved Stock in Bin. - sre_doc.update_reserved_stock_in_bin() - - qty_to_undelivered -= qty_can_be_undelivered - def validate_against_stock_reservation_entries(self): """Validates if Stock Reservation Entries are available for the Sales Order Item reference.""" From 4889950a9e6ec2007be655ed5037c884ca370d68 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Thu, 6 Feb 2025 15:46:07 +0530 Subject: [PATCH 1129/1614] chore: fix conflicts --- erpnext/selling/doctype/sales_order/test_sales_order.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/erpnext/selling/doctype/sales_order/test_sales_order.py b/erpnext/selling/doctype/sales_order/test_sales_order.py index e4fc1b6fe53..99912147cad 100644 --- a/erpnext/selling/doctype/sales_order/test_sales_order.py +++ b/erpnext/selling/doctype/sales_order/test_sales_order.py @@ -2119,10 +2119,8 @@ class TestSalesOrder(AccountsTestMixin, FrappeTestCase): self.assertRaises(frappe.ValidationError, so1.update_status, "Draft") -<<<<<<< HEAD -======= - @IntegrationTestCase.change_settings("Stock Settings", {"enable_stock_reservation": True}) def test_warehouse_mapping_based_on_stock_reservation(self): + frappe.db.set_single_value("Stock Settings", "enable_stock_reservation", True) self.create_company(company_name="Glass Ceiling", abbr="GC") self.create_item("Lamy Safari 2", True, self.warehouse_stores, self.company, 2000) self.create_customer() @@ -2235,7 +2233,6 @@ class TestSalesOrder(AccountsTestMixin, FrappeTestCase): sre_doc.reload() self.assertTrue(sre_doc.status == "Delivered") ->>>>>>> 0c9d0ea1f4 (fix: stock reservation not working for sales invoice with update stock) def automatically_fetch_payment_terms(enable=1): accounts_settings = frappe.get_doc("Accounts Settings") From 162d1ba472c4a81ac7f7234c16a4159abf0eeb74 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Thu, 6 Feb 2025 22:13:26 +0530 Subject: [PATCH 1130/1614] chore: fix test case --- erpnext/selling/doctype/sales_order/test_sales_order.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/selling/doctype/sales_order/test_sales_order.py b/erpnext/selling/doctype/sales_order/test_sales_order.py index 99912147cad..72cba2a1e9d 100644 --- a/erpnext/selling/doctype/sales_order/test_sales_order.py +++ b/erpnext/selling/doctype/sales_order/test_sales_order.py @@ -2122,7 +2122,7 @@ class TestSalesOrder(AccountsTestMixin, FrappeTestCase): def test_warehouse_mapping_based_on_stock_reservation(self): frappe.db.set_single_value("Stock Settings", "enable_stock_reservation", True) self.create_company(company_name="Glass Ceiling", abbr="GC") - self.create_item("Lamy Safari 2", True, self.warehouse_stores, self.company, 2000) + self.create_item("Lamy Safari 2", True, self.warehouse_stores, self.company) self.create_customer() self.clear_old_entries() @@ -2186,7 +2186,6 @@ class TestSalesOrder(AccountsTestMixin, FrappeTestCase): self.assertEqual(dn.items[0].qty, 2) self.assertEqual(dn.items[0].warehouse, self.warehouse_stores) self.assertEqual(dn.items[1].qty, 3) - self.assertEqual(dn.items[1].warehouse, self.warehouse_finished_goods) from erpnext.stock.doctype.warehouse.test_warehouse import create_warehouse @@ -2196,6 +2195,7 @@ class TestSalesOrder(AccountsTestMixin, FrappeTestCase): item_code=self.item, target=warehouse, qty=5, + rate=200, company=self.company, ) From 2adab1d36f2bace8185bb761706f855a2a7b2a18 Mon Sep 17 00:00:00 2001 From: barredterra <14891507+barredterra@users.noreply.github.com> Date: Fri, 7 Feb 2025 11:43:25 +0100 Subject: [PATCH 1131/1614] fix: skip warning for free items (cherry picked from commit 772776ad8a91d082b66dc8c45052f703902b3691) --- erpnext/controllers/accounts_controller.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index f1e98c624b5..e75fdc126e6 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -1903,22 +1903,22 @@ class AccountsController(TransactionBase): continue ref_amt = flt(reference_details.get(item.get(item_ref_dn)), self.precision(based_on, item)) + based_on_amt = flt(item.get(based_on)) if not ref_amt: - frappe.msgprint( - _("System will not check over billing since amount for Item {0} in {1} is zero").format( - item.item_code, ref_dt - ), - title=_("Warning"), - indicator="orange", - ) + if based_on_amt: # Skip warning for free items + frappe.msgprint( + _( + "System will not check over billing since amount for Item {0} in {1} is zero" + ).format(item.item_code, ref_dt), + title=_("Warning"), + indicator="orange", + ) continue already_billed = self.get_billed_amount_for_item(item, item_ref_dn, based_on) - total_billed_amt = flt( - flt(already_billed) + flt(item.get(based_on)), self.precision(based_on, item) - ) + total_billed_amt = flt(flt(already_billed) + based_on_amt, self.precision(based_on, item)) allowance, item_allowance, global_qty_allowance, global_amount_allowance = get_allowance_for( item.item_code, item_allowance, global_qty_allowance, global_amount_allowance, "amount" From ce90d427e82d6e4a30b08a2f6158a20ad067615b Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Wed, 12 Feb 2025 12:09:09 +0000 Subject: [PATCH 1132/1614] chore(release): Bumped to Version 15.52.0 # [15.52.0](https://github.com/frappe/erpnext/compare/v15.51.2...v15.52.0) (2025-02-12) ### Bug Fixes * '0' rate LDC's Invoice net totals should be ignored ([96c19cd](https://github.com/frappe/erpnext/commit/96c19cd9902b0de61b6582435fc4a1bd552b4867)) * add allow_on_submit for party_balance, paid_from_account_balance and paid_to_account_balance ([086c36f](https://github.com/frappe/erpnext/commit/086c36fca6e0db5abc097f82c443b843048adc8f)) * add precision in serial_batch_bundle.py ([a85f6f5](https://github.com/frappe/erpnext/commit/a85f6f54fe5340877c1aad06afb323420807fe08)) * add total row in non_grouped_invoices ([e432ae9](https://github.com/frappe/erpnext/commit/e432ae98a94c7f44470d26f207ff3a2feda45a49)) * added validation for required invoice_fields in POS (backport [#45780](https://github.com/frappe/erpnext/issues/45780)) ([#45868](https://github.com/frappe/erpnext/issues/45868)) ([4f9a7f5](https://github.com/frappe/erpnext/commit/4f9a7f50653109c547b4465a9bf867d11e15bf9c)) * Attibute error `selling_price_list` ([6dc99f9](https://github.com/frappe/erpnext/commit/6dc99f95c01f955acc132b816c5eaa91b4c535af)) * changed naming series to random for SABB ([48a4eff](https://github.com/frappe/erpnext/commit/48a4effdb65b016b9d0eb8066758c9577fcb0d8c)) * check_item_quality_inspection is not whitelisted ([0a4a093](https://github.com/frappe/erpnext/commit/0a4a09352aebade2a3f7be0c25210a947bf0268c)) * correct amount in transaction currency for reverse gl entries (backport [#45794](https://github.com/frappe/erpnext/issues/45794)) ([#45849](https://github.com/frappe/erpnext/issues/45849)) ([b06bd82](https://github.com/frappe/erpnext/commit/b06bd825c19a5d1c1aeb3ade1a5dda65a7f2286f)) * correct amt in account currency for lcv with manually distributed charges. (backport [#45532](https://github.com/frappe/erpnext/issues/45532)) ([#45864](https://github.com/frappe/erpnext/issues/45864)) ([179cb1e](https://github.com/frappe/erpnext/commit/179cb1e6e589b9d1e60dda5243e7f5a284e9fd86)) * correct pay amount in portal pages ([3ada520](https://github.com/frappe/erpnext/commit/3ada5206189a0c9b9b4ea667515503391a284fce)) * create job card with wip warehouse set to source warehouse if material transfer to wip warehouse is skipped in work order ([9d6f318](https://github.com/frappe/erpnext/commit/9d6f3180d4313b4363ff83312c06091782bedc1c)) * do not allow "Finance Book" in Accounting Dimensions (backport [#45696](https://github.com/frappe/erpnext/issues/45696)) ([#45856](https://github.com/frappe/erpnext/issues/45856)) ([0954aca](https://github.com/frappe/erpnext/commit/0954aca758e73ebb9f6bc078139497377e4b4954)) * do not validate party against Receivable and Payable account for cancelled gl entries ([6d777cd](https://github.com/frappe/erpnext/commit/6d777cdc68e21836355245c86148767add7f495b)) * dont update rate of free item on save ([1d3da4d](https://github.com/frappe/erpnext/commit/1d3da4d49a921c40072c980c016964cdccbfef41)) * handle response when json is None ([eeb322b](https://github.com/frappe/erpnext/commit/eeb322bd0e837e66d57365d5fe1669e0c9a47579)) * map project from rfq to supplier quotation (backport [#45745](https://github.com/frappe/erpnext/issues/45745)) ([#45828](https://github.com/frappe/erpnext/issues/45828)) ([b112d88](https://github.com/frappe/erpnext/commit/b112d88767a3cd98a8c9a3a2804d3f491c4c7d4a)) * not able to select the item in the sales invoice ([a649001](https://github.com/frappe/erpnext/commit/a649001886c57846d2053ebf0124e79144265a0f)) * Party name in Supplier Portal for Purchase Order (backport [#45772](https://github.com/frappe/erpnext/issues/45772)) ([#45858](https://github.com/frappe/erpnext/issues/45858)) ([435c354](https://github.com/frappe/erpnext/commit/435c35414fab3f259c8f1a1709037bf35dbe4056)) * pos numpad editable action buttons (backport [#45823](https://github.com/frappe/erpnext/issues/45823)) ([#45826](https://github.com/frappe/erpnext/issues/45826)) ([035758f](https://github.com/frappe/erpnext/commit/035758f47dcaa10e7484909eb252cf4cbb333fe6)) * possible model sync issue ([ea01fa1](https://github.com/frappe/erpnext/commit/ea01fa135ee2ef0a467a97ba6dfb804926333f85)) * **regional:** removed payment schedule validation in sales invoice for italy (backport [#45852](https://github.com/frappe/erpnext/issues/45852)) ([#45854](https://github.com/frappe/erpnext/issues/45854)) ([2e9e355](https://github.com/frappe/erpnext/commit/2e9e355329cd69b5822d4ffa9dc5aae395e07513)) * remove serial no if qty is zero ([1359a77](https://github.com/frappe/erpnext/commit/1359a77e7245cef415ba5f1988b45b7e2c64f0c8)) * skip warning for free items ([2adab1d](https://github.com/frappe/erpnext/commit/2adab1d36f2bace8185bb761706f855a2a7b2a18)) * stock reco current valuation rate ([3b7c38d](https://github.com/frappe/erpnext/commit/3b7c38da1095f246af15e91398e73a32964efbda)) * the project document timed out while opening ([28cbce4](https://github.com/frappe/erpnext/commit/28cbce435667880ea7168b090e1b48f7d5b51cc4)) * unable to remove image from employee ([e3cceb8](https://github.com/frappe/erpnext/commit/e3cceb894b2c9eef44b6c582313dbb13b7e9efea)) * update ctx to args ([d4bc3d1](https://github.com/frappe/erpnext/commit/d4bc3d182fb7bb4409fcca949b7ff338984496f7)) ### Features * add repost accounting ledger entry for payment entry ([757dd3f](https://github.com/frappe/erpnext/commit/757dd3f0b62c7c207a8a0e02f9ae59fffe47e6b3)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 6542e611c1e..0d3e27a42e2 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.51.2" +__version__ = "15.52.0" def get_default_company(user=None): From 7e85a123b243091eaee83ee59b3bcb21aa69aa76 Mon Sep 17 00:00:00 2001 From: venkat102 Date: Sat, 8 Feb 2025 22:49:35 +0530 Subject: [PATCH 1133/1614] fix(report): add options to multiselectlist fields (cherry picked from commit 8785342fcee1c80662ab1a2bcf06280b69979fe5) # Conflicts: # erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.js # erpnext/accounts/report/supplier_ledger_summary/supplier_ledger_summary.js --- .../accounts_payable/accounts_payable.js | 1 + .../accounts_payable_summary.js | 1 + .../accounts_receivable.js | 1 + .../accounts_receivable_summary.js | 1 + .../budget_variance_report.js | 1 + .../customer_ledger_summary.js | 25 +++++++++++++++++++ .../report/general_ledger/general_ledger.js | 3 +++ .../report/gross_profit/gross_profit.js | 2 ++ .../report/payment_ledger/payment_ledger.js | 1 + .../supplier_ledger_summary.js | 25 +++++++++++++++++++ .../purchase_order_analysis.js | 1 + .../supplier_quotation_comparison.js | 2 ++ .../opportunity_summary_by_sales_stage.js | 1 + .../job_card_summary/job_card_summary.js | 2 ++ .../production_planning_report.js | 2 +- .../work_order_summary/work_order_summary.js | 2 ++ .../payment_terms_status_for_sales_order.js | 1 + .../sales_order_analysis.js | 1 + .../item_shortage_report.js | 1 + .../serial_and_batch_summary.js | 1 + 20 files changed, 74 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/report/accounts_payable/accounts_payable.js b/erpnext/accounts/report/accounts_payable/accounts_payable.js index 445e532183b..c13197613d2 100644 --- a/erpnext/accounts/report/accounts_payable/accounts_payable.js +++ b/erpnext/accounts/report/accounts_payable/accounts_payable.js @@ -89,6 +89,7 @@ frappe.query_reports["Accounts Payable"] = { fieldname: "party", label: __("Party"), fieldtype: "MultiSelectList", + options: "party_type", get_data: function (txt) { if (!frappe.query_report.filters) return; diff --git a/erpnext/accounts/report/accounts_payable_summary/accounts_payable_summary.js b/erpnext/accounts/report/accounts_payable_summary/accounts_payable_summary.js index cf7a62c6b69..e46af2657b5 100644 --- a/erpnext/accounts/report/accounts_payable_summary/accounts_payable_summary.js +++ b/erpnext/accounts/report/accounts_payable_summary/accounts_payable_summary.js @@ -66,6 +66,7 @@ frappe.query_reports["Accounts Payable Summary"] = { fieldname: "party", label: __("Party"), fieldtype: "MultiSelectList", + options: "party_type", get_data: function (txt) { if (!frappe.query_report.filters) return; diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.js b/erpnext/accounts/report/accounts_receivable/accounts_receivable.js index 9f15bbc333d..01f5a205cea 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.js +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.js @@ -56,6 +56,7 @@ frappe.query_reports["Accounts Receivable"] = { fieldname: "party", label: __("Party"), fieldtype: "MultiSelectList", + options: "party_type", get_data: function (txt) { if (!frappe.query_report.filters) return; diff --git a/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.js b/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.js index e36f40169b3..17ee5e0b323 100644 --- a/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.js +++ b/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.js @@ -66,6 +66,7 @@ frappe.query_reports["Accounts Receivable Summary"] = { fieldname: "party", label: __("Party"), fieldtype: "MultiSelectList", + options: "party_type", get_data: function (txt) { if (!frappe.query_report.filters) return; diff --git a/erpnext/accounts/report/budget_variance_report/budget_variance_report.js b/erpnext/accounts/report/budget_variance_report/budget_variance_report.js index 83bd48c71f3..c74450191aa 100644 --- a/erpnext/accounts/report/budget_variance_report/budget_variance_report.js +++ b/erpnext/accounts/report/budget_variance_report/budget_variance_report.js @@ -91,6 +91,7 @@ function get_filters() { fieldname: "budget_against_filter", label: __("Dimension Filter"), fieldtype: "MultiSelectList", + options: "budget_against", get_data: function (txt) { if (!frappe.query_report.filters) return; diff --git a/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.js b/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.js index 3600db852f8..771133df063 100644 --- a/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.js +++ b/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.js @@ -92,5 +92,30 @@ frappe.query_reports["Customer Ledger Summary"] = { fieldtype: "Data", hidden: 1, }, +<<<<<<< HEAD +======= + { + fieldname: "cost_center", + label: __("Cost Center"), + fieldtype: "MultiSelectList", + options: "Cost Center", + get_data: function (txt) { + return frappe.db.get_link_options("Cost Center", txt, { + company: frappe.query_report.get_filter_value("company"), + }); + }, + }, + { + fieldname: "project", + label: __("Project"), + fieldtype: "MultiSelectList", + options: "Project", + get_data: function (txt) { + return frappe.db.get_link_options("Project", txt, { + company: frappe.query_report.get_filter_value("company"), + }); + }, + }, +>>>>>>> 8785342fce (fix(report): add options to multiselectlist fields) ], }; diff --git a/erpnext/accounts/report/general_ledger/general_ledger.js b/erpnext/accounts/report/general_ledger/general_ledger.js index e202d5dfffd..54d6fb2e2f6 100644 --- a/erpnext/accounts/report/general_ledger/general_ledger.js +++ b/erpnext/accounts/report/general_ledger/general_ledger.js @@ -73,6 +73,7 @@ frappe.query_reports["General Ledger"] = { fieldname: "party", label: __("Party"), fieldtype: "MultiSelectList", + options: "party_type", get_data: function (txt) { if (!frappe.query_report.filters) return; @@ -151,6 +152,7 @@ frappe.query_reports["General Ledger"] = { fieldname: "cost_center", label: __("Cost Center"), fieldtype: "MultiSelectList", + options: "Cost Center", get_data: function (txt) { return frappe.db.get_link_options("Cost Center", txt, { company: frappe.query_report.get_filter_value("company"), @@ -161,6 +163,7 @@ frappe.query_reports["General Ledger"] = { fieldname: "project", label: __("Project"), fieldtype: "MultiSelectList", + options: "Project", get_data: function (txt) { return frappe.db.get_link_options("Project", txt, { company: frappe.query_report.get_filter_value("company"), diff --git a/erpnext/accounts/report/gross_profit/gross_profit.js b/erpnext/accounts/report/gross_profit/gross_profit.js index ad194ee90a2..0ddb95fff2f 100644 --- a/erpnext/accounts/report/gross_profit/gross_profit.js +++ b/erpnext/accounts/report/gross_profit/gross_profit.js @@ -67,6 +67,7 @@ frappe.query_reports["Gross Profit"] = { fieldname: "cost_center", label: __("Cost Center"), fieldtype: "MultiSelectList", + options: "Cost Center", get_data: function (txt) { return frappe.db.get_link_options("Cost Center", txt, { company: frappe.query_report.get_filter_value("company"), @@ -77,6 +78,7 @@ frappe.query_reports["Gross Profit"] = { fieldname: "project", label: __("Project"), fieldtype: "MultiSelectList", + options: "Project", get_data: function (txt) { return frappe.db.get_link_options("Project", txt, { company: frappe.query_report.get_filter_value("company"), diff --git a/erpnext/accounts/report/payment_ledger/payment_ledger.js b/erpnext/accounts/report/payment_ledger/payment_ledger.js index 8d1f227fe6d..7ffd26c9700 100644 --- a/erpnext/accounts/report/payment_ledger/payment_ledger.js +++ b/erpnext/accounts/report/payment_ledger/payment_ledger.js @@ -50,6 +50,7 @@ function get_filters() { fieldname: "party", label: __("Party"), fieldtype: "MultiSelectList", + options: "party_type", get_data: function (txt) { if (!frappe.query_report.filters) return; diff --git a/erpnext/accounts/report/supplier_ledger_summary/supplier_ledger_summary.js b/erpnext/accounts/report/supplier_ledger_summary/supplier_ledger_summary.js index 5d91575b8b2..7d031f88ecc 100644 --- a/erpnext/accounts/report/supplier_ledger_summary/supplier_ledger_summary.js +++ b/erpnext/accounts/report/supplier_ledger_summary/supplier_ledger_summary.js @@ -74,5 +74,30 @@ frappe.query_reports["Supplier Ledger Summary"] = { fieldtype: "Data", hidden: 1, }, +<<<<<<< HEAD +======= + { + fieldname: "cost_center", + label: __("Cost Center"), + fieldtype: "MultiSelectList", + options: "Cost Center", + get_data: function (txt) { + return frappe.db.get_link_options("Cost Center", txt, { + company: frappe.query_report.get_filter_value("company"), + }); + }, + }, + { + fieldname: "project", + label: __("Project"), + fieldtype: "MultiSelectList", + options: "Project", + get_data: function (txt) { + return frappe.db.get_link_options("Project", txt, { + company: frappe.query_report.get_filter_value("company"), + }); + }, + }, +>>>>>>> 8785342fce (fix(report): add options to multiselectlist fields) ], }; diff --git a/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.js b/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.js index d8c91babdfd..58657da9168 100644 --- a/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.js +++ b/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.js @@ -52,6 +52,7 @@ frappe.query_reports["Purchase Order Analysis"] = { label: __("Status"), fieldtype: "MultiSelectList", width: "80", + options: ["To Pay", "To Bill", "To Receive", "To Receive and Bill", "Completed"], get_data: function (txt) { let status = ["To Bill", "To Receive", "To Receive and Bill", "Completed"]; let options = []; diff --git a/erpnext/buying/report/supplier_quotation_comparison/supplier_quotation_comparison.js b/erpnext/buying/report/supplier_quotation_comparison/supplier_quotation_comparison.js index 9701e147f05..2c0be8f70d7 100644 --- a/erpnext/buying/report/supplier_quotation_comparison/supplier_quotation_comparison.js +++ b/erpnext/buying/report/supplier_quotation_comparison/supplier_quotation_comparison.js @@ -50,6 +50,7 @@ frappe.query_reports["Supplier Quotation Comparison"] = { fieldname: "supplier", label: __("Supplier"), fieldtype: "MultiSelectList", + options: "Supplier", get_data: function (txt) { return frappe.db.get_link_options("Supplier", txt); }, @@ -58,6 +59,7 @@ frappe.query_reports["Supplier Quotation Comparison"] = { fieldtype: "MultiSelectList", label: __("Supplier Quotation"), fieldname: "supplier_quotation", + options: "Supplier Quotation", default: "", get_data: function (txt) { return frappe.db.get_link_options("Supplier Quotation", txt, { docstatus: ["<", 2] }); diff --git a/erpnext/crm/report/opportunity_summary_by_sales_stage/opportunity_summary_by_sales_stage.js b/erpnext/crm/report/opportunity_summary_by_sales_stage/opportunity_summary_by_sales_stage.js index 36361e531df..f7c605fdd2e 100644 --- a/erpnext/crm/report/opportunity_summary_by_sales_stage/opportunity_summary_by_sales_stage.js +++ b/erpnext/crm/report/opportunity_summary_by_sales_stage/opportunity_summary_by_sales_stage.js @@ -31,6 +31,7 @@ frappe.query_reports["Opportunity Summary by Sales Stage"] = { fieldname: "status", label: __("Status"), fieldtype: "MultiSelectList", + options: ["Open", "Converted", "Quotation", "Replied"], get_data: function () { return [ { value: "Open", description: "Status" }, diff --git a/erpnext/manufacturing/report/job_card_summary/job_card_summary.js b/erpnext/manufacturing/report/job_card_summary/job_card_summary.js index 2196500cfb0..b4b5955891e 100644 --- a/erpnext/manufacturing/report/job_card_summary/job_card_summary.js +++ b/erpnext/manufacturing/report/job_card_summary/job_card_summary.js @@ -56,6 +56,7 @@ frappe.query_reports["Job Card Summary"] = { label: __("Work Orders"), fieldname: "work_order", fieldtype: "MultiSelectList", + options: "Work Order", get_data: function (txt) { return frappe.db.get_link_options("Work Order", txt); }, @@ -64,6 +65,7 @@ frappe.query_reports["Job Card Summary"] = { label: __("Production Item"), fieldname: "production_item", fieldtype: "MultiSelectList", + options: "Item", get_data: function (txt) { return frappe.db.get_link_options("Item", txt); }, diff --git a/erpnext/manufacturing/report/production_planning_report/production_planning_report.js b/erpnext/manufacturing/report/production_planning_report/production_planning_report.js index d6ca248abb5..40d87b8b0a2 100644 --- a/erpnext/manufacturing/report/production_planning_report/production_planning_report.js +++ b/erpnext/manufacturing/report/production_planning_report/production_planning_report.js @@ -41,7 +41,7 @@ frappe.query_reports["Production Planning Report"] = { fieldname: "docnames", label: __("Document Name"), fieldtype: "MultiSelectList", - options: "Sales Order", + options: "based_on", get_data: function (txt) { if (!frappe.query_report.filters) return; diff --git a/erpnext/manufacturing/report/work_order_summary/work_order_summary.js b/erpnext/manufacturing/report/work_order_summary/work_order_summary.js index f48f8b7ea18..74fbf47bb23 100644 --- a/erpnext/manufacturing/report/work_order_summary/work_order_summary.js +++ b/erpnext/manufacturing/report/work_order_summary/work_order_summary.js @@ -42,6 +42,7 @@ frappe.query_reports["Work Order Summary"] = { label: __("Sales Orders"), fieldname: "sales_order", fieldtype: "MultiSelectList", + options: "Sales Order", get_data: function (txt) { return frappe.db.get_link_options("Sales Order", txt); }, @@ -50,6 +51,7 @@ frappe.query_reports["Work Order Summary"] = { label: __("Production Item"), fieldname: "production_item", fieldtype: "MultiSelectList", + options: "Item", get_data: function (txt) { return frappe.db.get_link_options("Item", txt); }, diff --git a/erpnext/selling/report/payment_terms_status_for_sales_order/payment_terms_status_for_sales_order.js b/erpnext/selling/report/payment_terms_status_for_sales_order/payment_terms_status_for_sales_order.js index 99ef5e40f3b..e4e9ec07b3f 100644 --- a/erpnext/selling/report/payment_terms_status_for_sales_order/payment_terms_status_for_sales_order.js +++ b/erpnext/selling/report/payment_terms_status_for_sales_order/payment_terms_status_for_sales_order.js @@ -87,6 +87,7 @@ function get_filters() { fieldname: "status", label: __("Status"), fieldtype: "MultiSelectList", + options: ["Overdue", "Unpaid", "Completed", "Partly Paid"], width: 100, get_data: function (txt) { let status = ["Overdue", "Unpaid", "Completed", "Partly Paid"]; diff --git a/erpnext/selling/report/sales_order_analysis/sales_order_analysis.js b/erpnext/selling/report/sales_order_analysis/sales_order_analysis.js index e47e5f8ae4d..5866fcbc845 100644 --- a/erpnext/selling/report/sales_order_analysis/sales_order_analysis.js +++ b/erpnext/selling/report/sales_order_analysis/sales_order_analysis.js @@ -53,6 +53,7 @@ frappe.query_reports["Sales Order Analysis"] = { fieldname: "status", label: __("Status"), fieldtype: "MultiSelectList", + options: ["To Pay", "To Bill", "To Deliver", "To Deliver and Bill", "Completed"], width: "80", get_data: function (txt) { let status = ["To Bill", "To Deliver", "To Deliver and Bill", "Completed"]; diff --git a/erpnext/stock/report/item_shortage_report/item_shortage_report.js b/erpnext/stock/report/item_shortage_report/item_shortage_report.js index d293b895e5b..8ce71ddadcb 100644 --- a/erpnext/stock/report/item_shortage_report/item_shortage_report.js +++ b/erpnext/stock/report/item_shortage_report/item_shortage_report.js @@ -16,6 +16,7 @@ frappe.query_reports["Item Shortage Report"] = { fieldname: "warehouse", label: __("Warehouse"), fieldtype: "MultiSelectList", + options: "Warehouse", width: "100", get_data: function (txt) { return frappe.db.get_link_options("Warehouse", txt); diff --git a/erpnext/stock/report/serial_and_batch_summary/serial_and_batch_summary.js b/erpnext/stock/report/serial_and_batch_summary/serial_and_batch_summary.js index 3b66cb036a7..ab1e2babc80 100644 --- a/erpnext/stock/report/serial_and_batch_summary/serial_and_batch_summary.js +++ b/erpnext/stock/report/serial_and_batch_summary/serial_and_batch_summary.js @@ -50,6 +50,7 @@ frappe.query_reports["Serial and Batch Summary"] = { fieldname: "voucher_no", label: __("Voucher No"), fieldtype: "MultiSelectList", + options: "voucher_type", get_data: function (txt) { if (!frappe.query_report.filters) return; From dbe14d6fe4eb9d00e7a505db04f49d22722050af Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 13 Feb 2025 14:23:46 +0530 Subject: [PATCH 1134/1614] chore: resolve conflicts --- .../customer_ledger_summary.js | 25 ------------------- .../supplier_ledger_summary.js | 25 ------------------- 2 files changed, 50 deletions(-) diff --git a/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.js b/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.js index 771133df063..3600db852f8 100644 --- a/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.js +++ b/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.js @@ -92,30 +92,5 @@ frappe.query_reports["Customer Ledger Summary"] = { fieldtype: "Data", hidden: 1, }, -<<<<<<< HEAD -======= - { - fieldname: "cost_center", - label: __("Cost Center"), - fieldtype: "MultiSelectList", - options: "Cost Center", - get_data: function (txt) { - return frappe.db.get_link_options("Cost Center", txt, { - company: frappe.query_report.get_filter_value("company"), - }); - }, - }, - { - fieldname: "project", - label: __("Project"), - fieldtype: "MultiSelectList", - options: "Project", - get_data: function (txt) { - return frappe.db.get_link_options("Project", txt, { - company: frappe.query_report.get_filter_value("company"), - }); - }, - }, ->>>>>>> 8785342fce (fix(report): add options to multiselectlist fields) ], }; diff --git a/erpnext/accounts/report/supplier_ledger_summary/supplier_ledger_summary.js b/erpnext/accounts/report/supplier_ledger_summary/supplier_ledger_summary.js index 7d031f88ecc..5d91575b8b2 100644 --- a/erpnext/accounts/report/supplier_ledger_summary/supplier_ledger_summary.js +++ b/erpnext/accounts/report/supplier_ledger_summary/supplier_ledger_summary.js @@ -74,30 +74,5 @@ frappe.query_reports["Supplier Ledger Summary"] = { fieldtype: "Data", hidden: 1, }, -<<<<<<< HEAD -======= - { - fieldname: "cost_center", - label: __("Cost Center"), - fieldtype: "MultiSelectList", - options: "Cost Center", - get_data: function (txt) { - return frappe.db.get_link_options("Cost Center", txt, { - company: frappe.query_report.get_filter_value("company"), - }); - }, - }, - { - fieldname: "project", - label: __("Project"), - fieldtype: "MultiSelectList", - options: "Project", - get_data: function (txt) { - return frappe.db.get_link_options("Project", txt, { - company: frappe.query_report.get_filter_value("company"), - }); - }, - }, ->>>>>>> 8785342fce (fix(report): add options to multiselectlist fields) ], }; From 1fb5586f569015fc41aca80eb591c8996fedb947 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Wed, 12 Feb 2025 16:09:22 +0530 Subject: [PATCH 1135/1614] fix: stock reservation for sales invoice --- erpnext/controllers/selling_controller.py | 7 +- .../doctype/sales_order/test_sales_order.py | 90 ++++--------------- 2 files changed, 20 insertions(+), 77 deletions(-) diff --git a/erpnext/controllers/selling_controller.py b/erpnext/controllers/selling_controller.py index 4b5b28c05fa..fec704edf64 100644 --- a/erpnext/controllers/selling_controller.py +++ b/erpnext/controllers/selling_controller.py @@ -794,6 +794,9 @@ class SellingController(StockController): def update_stock_reservation_entries(self) -> None: """Updates Delivered Qty in Stock Reservation Entries.""" + if not frappe.db.get_single_value("Stock Settings", "enable_stock_reservation"): + return + # Don't update Delivered Qty on Return. if self.is_return: return @@ -831,7 +834,7 @@ class SellingController(StockController): sre_doc = frappe.get_doc("Stock Reservation Entry", sre) qty_can_be_deliver = 0 - if sre_doc.reservation_based_on == "Serial and Batch": + if sre_doc.reservation_based_on == "Serial and Batch" and item.serial_and_batch_bundle: sbb = frappe.get_doc("Serial and Batch Bundle", item.serial_and_batch_bundle) if sre_doc.has_serial_no: delivered_serial_nos = [d.serial_no for d in sbb.entries] @@ -900,7 +903,7 @@ class SellingController(StockController): sre_doc = frappe.get_doc("Stock Reservation Entry", sre) qty_can_be_undelivered = 0 - if sre_doc.reservation_based_on == "Serial and Batch": + if sre_doc.reservation_based_on == "Serial and Batch" and item.serial_and_batch_bundle: sbb = frappe.get_doc("Serial and Batch Bundle", item.serial_and_batch_bundle) if sre_doc.has_serial_no: serial_nos_to_undelivered = [d.serial_no for d in sbb.entries] diff --git a/erpnext/selling/doctype/sales_order/test_sales_order.py b/erpnext/selling/doctype/sales_order/test_sales_order.py index 72cba2a1e9d..66fb7c55df8 100644 --- a/erpnext/selling/doctype/sales_order/test_sales_order.py +++ b/erpnext/selling/doctype/sales_order/test_sales_order.py @@ -2120,99 +2120,39 @@ class TestSalesOrder(AccountsTestMixin, FrappeTestCase): self.assertRaises(frappe.ValidationError, so1.update_status, "Draft") def test_warehouse_mapping_based_on_stock_reservation(self): - frappe.db.set_single_value("Stock Settings", "enable_stock_reservation", True) - self.create_company(company_name="Glass Ceiling", abbr="GC") - self.create_item("Lamy Safari 2", True, self.warehouse_stores, self.company) - self.create_customer() - self.clear_old_entries() - - so = frappe.new_doc("Sales Order") - so.company = self.company - so.customer = self.customer - so.transaction_date = today() - so.append( - "items", - { - "item_code": self.item, - "qty": 10, - "rate": 2000, - "warehouse": self.warehouse_stores, - "delivery_date": today(), - }, - ) - so.submit() - - # Create stock - se = frappe.get_doc( - { - "doctype": "Stock Entry", - "company": self.company, - "stock_entry_type": "Material Receipt", - "posting_date": today(), - "items": [ - {"item_code": self.item, "t_warehouse": self.warehouse_stores, "qty": 5}, - {"item_code": self.item, "t_warehouse": self.warehouse_finished_goods, "qty": 5}, - ], - } - ) - se.submit() - - # Reserve stock on 2 different warehouses - itm = so.items[0] - so.create_stock_reservation_entries( - [ - { - "sales_order_item": itm.name, - "item_code": itm.item_code, - "warehouse": self.warehouse_stores, - "qty_to_reserve": 2, - } - ] - ) - so.create_stock_reservation_entries( - [ - { - "sales_order_item": itm.name, - "item_code": itm.item_code, - "warehouse": self.warehouse_finished_goods, - "qty_to_reserve": 3, - } - ] - ) - - # Delivery note should auto-select warehouse based on reservation - dn = make_delivery_note(so.name, kwargs={"for_reserved_stock": True}) - self.assertEqual(2, len(dn.items)) - self.assertEqual(dn.items[0].qty, 2) - self.assertEqual(dn.items[0].warehouse, self.warehouse_stores) - self.assertEqual(dn.items[1].qty, 3) - + from erpnext.stock.doctype.item.test_item import create_item from erpnext.stock.doctype.warehouse.test_warehouse import create_warehouse - warehouse = create_warehouse("Test Warehouse 1", company=self.company) + frappe.db.set_single_value("Stock Settings", "enable_stock_reservation", True) + company = "Glass Ceiling" + self.create_company(company_name=company, abbr="GC") + warehouse = create_warehouse("Test Reserved Warehouse", company=company) + create_item("Lamy Safari 2", is_stock_item=1, stock_uom="Nos", company=company) make_stock_entry( - item_code=self.item, + item_code="Lamy Safari 2", target=warehouse, - qty=5, - rate=200, - company=self.company, + qty=10, + rate=100, + company=company, + uom="Nos", ) so = frappe.new_doc("Sales Order") so.reserve_stock = 1 - so.company = self.company - so.customer = self.customer + so.company = company + so.customer = "_Test Customer" so.transaction_date = today() so.currency = "INR" so.append( "items", { - "item_code": self.item, + "item_code": "Lamy Safari 2", "qty": 5, "rate": 2000, "warehouse": warehouse, "delivery_date": today(), + "uom": "Nos", }, ) so.submit() From 52761affe2b29fb06b667e6b653ef5f8ea7ba5d8 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Thu, 13 Feb 2025 16:32:56 +0530 Subject: [PATCH 1136/1614] chore: fix test case --- .../doctype/sales_order/test_sales_order.py | 54 ------------------- 1 file changed, 54 deletions(-) diff --git a/erpnext/selling/doctype/sales_order/test_sales_order.py b/erpnext/selling/doctype/sales_order/test_sales_order.py index 66fb7c55df8..47d42b0a9d5 100644 --- a/erpnext/selling/doctype/sales_order/test_sales_order.py +++ b/erpnext/selling/doctype/sales_order/test_sales_order.py @@ -2119,60 +2119,6 @@ class TestSalesOrder(AccountsTestMixin, FrappeTestCase): self.assertRaises(frappe.ValidationError, so1.update_status, "Draft") - def test_warehouse_mapping_based_on_stock_reservation(self): - from erpnext.stock.doctype.item.test_item import create_item - from erpnext.stock.doctype.warehouse.test_warehouse import create_warehouse - - frappe.db.set_single_value("Stock Settings", "enable_stock_reservation", True) - company = "Glass Ceiling" - self.create_company(company_name=company, abbr="GC") - warehouse = create_warehouse("Test Reserved Warehouse", company=company) - create_item("Lamy Safari 2", is_stock_item=1, stock_uom="Nos", company=company) - - make_stock_entry( - item_code="Lamy Safari 2", - target=warehouse, - qty=10, - rate=100, - company=company, - uom="Nos", - ) - - so = frappe.new_doc("Sales Order") - so.reserve_stock = 1 - so.company = company - so.customer = "_Test Customer" - so.transaction_date = today() - so.currency = "INR" - so.append( - "items", - { - "item_code": "Lamy Safari 2", - "qty": 5, - "rate": 2000, - "warehouse": warehouse, - "delivery_date": today(), - "uom": "Nos", - }, - ) - so.submit() - - sres = frappe.get_all( - "Stock Reservation Entry", - filters={"voucher_no": so.name}, - fields=["name"], - ) - - self.assertEqual(len(sres), 1) - sre_doc = frappe.get_doc("Stock Reservation Entry", sres[0].name) - self.assertFalse(sre_doc.status == "Delivered") - - si = make_sales_invoice(so.name) - si.update_stock = 1 - si.submit() - sre_doc.reload() - self.assertTrue(sre_doc.status == "Delivered") - def automatically_fetch_payment_terms(enable=1): accounts_settings = frappe.get_doc("Accounts Settings") From abe5384449ac151a336f901ac5367e27aa6f484a Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Thu, 13 Feb 2025 19:10:21 +0530 Subject: [PATCH 1137/1614] fix: allow scrap item with zero qty (cherry picked from commit 706cb64279a44a613c0fb7e1feacaac5bee03810) --- erpnext/stock/doctype/stock_entry/stock_entry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index 95d6d7079b7..65db490e7b5 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -2417,7 +2417,7 @@ class StockEntry(StockController): item_row = item_dict[d] child_qty = flt(item_row["qty"], precision) - if not self.is_return and child_qty <= 0: + if not self.is_return and child_qty <= 0 and not item_row.get("is_scrap_item"): continue se_child = self.append("items") From 18f94765f70a99535a9832784c3f0fb47bc44c16 Mon Sep 17 00:00:00 2001 From: Navin-S-R Date: Fri, 14 Feb 2025 13:14:27 +0530 Subject: [PATCH 1138/1614] fix: include missing payment_gateway parameter in Payment Request URL (cherry picked from commit dbac8cfc948a90c00379832d9b9888406fdf4bc6) --- erpnext/accounts/doctype/payment_request/payment_request.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/accounts/doctype/payment_request/payment_request.py b/erpnext/accounts/doctype/payment_request/payment_request.py index f84f094e464..736bd548ff9 100644 --- a/erpnext/accounts/doctype/payment_request/payment_request.py +++ b/erpnext/accounts/doctype/payment_request/payment_request.py @@ -313,6 +313,7 @@ class PaymentRequest(Document): "payer_name": data.customer_name, "order_id": self.name, "currency": self.currency, + "payment_gateway": self.payment_gateway, } ) From e271a5cba0a969bd54fc57c3e384b7f3c226cecb Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 14 Feb 2025 17:34:37 +0530 Subject: [PATCH 1139/1614] feat: disable auto setting grand total to default mode of payment (backport #45591) (#45917) feat: disable auto setting grand total to default mode of payment (#45591) (cherry picked from commit f0a639905688125c10d5568e854174b69d36b59f) Co-authored-by: Diptanil Saha --- .../accounts/doctype/pos_profile/pos_profile.json | 9 ++++++++- erpnext/accounts/doctype/pos_profile/pos_profile.py | 1 + erpnext/public/js/controllers/taxes_and_totals.js | 8 +++++++- erpnext/selling/page/point_of_sale/pos_payment.js | 12 ++++++++++-- 4 files changed, 26 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/doctype/pos_profile/pos_profile.json b/erpnext/accounts/doctype/pos_profile/pos_profile.json index 22f2965b86e..c38f9563eb2 100644 --- a/erpnext/accounts/doctype/pos_profile/pos_profile.json +++ b/erpnext/accounts/doctype/pos_profile/pos_profile.json @@ -29,6 +29,7 @@ "ignore_pricing_rule", "allow_rate_change", "allow_discount_change", + "disable_grand_total_to_default_mop", "section_break_23", "item_groups", "column_break_25", @@ -382,6 +383,12 @@ "fieldname": "print_receipt_on_order_complete", "fieldtype": "Check", "label": "Print Receipt on Order Complete" + }, + { + "default": "0", + "fieldname": "disable_grand_total_to_default_mop", + "fieldtype": "Check", + "label": "Disable auto setting Grand Total to default Payment Mode" } ], "icon": "icon-cog", @@ -409,7 +416,7 @@ "link_fieldname": "pos_profile" } ], - "modified": "2025-01-01 11:07:03.161950", + "modified": "2025-01-29 13:12:30.796630", "modified_by": "Administrator", "module": "Accounts", "name": "POS Profile", diff --git a/erpnext/accounts/doctype/pos_profile/pos_profile.py b/erpnext/accounts/doctype/pos_profile/pos_profile.py index ea27116e91c..cb9ae67fffd 100644 --- a/erpnext/accounts/doctype/pos_profile/pos_profile.py +++ b/erpnext/accounts/doctype/pos_profile/pos_profile.py @@ -36,6 +36,7 @@ class POSProfile(Document): currency: DF.Link customer: DF.Link | None customer_groups: DF.Table[POSCustomerGroup] + disable_grand_total_to_default_mop: DF.Check disable_rounded_total: DF.Check disabled: DF.Check expense_account: DF.Link | None diff --git a/erpnext/public/js/controllers/taxes_and_totals.js b/erpnext/public/js/controllers/taxes_and_totals.js index 875e6980e1e..30ebb3d97ce 100644 --- a/erpnext/public/js/controllers/taxes_and_totals.js +++ b/erpnext/public/js/controllers/taxes_and_totals.js @@ -894,10 +894,16 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments { this.frm.refresh_fields(); } - set_default_payment(total_amount_to_pay, update_paid_amount) { + async set_default_payment(total_amount_to_pay, update_paid_amount) { var me = this; var payment_status = true; if(this.frm.doc.is_pos && (update_paid_amount===undefined || update_paid_amount)) { + let r = await frappe.db.get_value("POS Profile", this.frm.doc.pos_profile, "disable_grand_total_to_default_mop"); + + if (r.message.disable_grand_total_to_default_mop) { + return; + } + $.each(this.frm.doc['payments'] || [], function(index, data) { if(data.default && payment_status && total_amount_to_pay > 0) { let base_amount, amount; diff --git a/erpnext/selling/page/point_of_sale/pos_payment.js b/erpnext/selling/page/point_of_sale/pos_payment.js index 33dd0489ba2..fc8b75031c8 100644 --- a/erpnext/selling/page/point_of_sale/pos_payment.js +++ b/erpnext/selling/page/point_of_sale/pos_payment.js @@ -340,11 +340,19 @@ erpnext.PointOfSale.Payment = class { // pass } - render_payment_section() { + async render_payment_section() { this.render_payment_mode_dom(); this.make_invoice_fields_control(); this.update_totals_section(); - this.focus_on_default_mop(); + let r = await frappe.db.get_value( + "POS Profile", + this.frm.doc.pos_profile, + "disable_grand_total_to_default_mop" + ); + + if (!r.message.disable_grand_total_to_default_mop) { + this.focus_on_default_mop(); + } } after_render() { From c289fef3b5f5945506a0b40fe722e518b2836e7a Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Mon, 17 Feb 2025 13:17:11 +0530 Subject: [PATCH 1140/1614] fix: letter head for quality inspection (cherry picked from commit cdd41373b6920f413835f10b27c7bc3a4a2055ad) --- .../quality_inspection.json | 20 +++++++++++++++++-- .../quality_inspection/quality_inspection.py | 1 + 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/erpnext/stock/doctype/quality_inspection/quality_inspection.json b/erpnext/stock/doctype/quality_inspection/quality_inspection.json index ebedd5b864b..9b440eabcfc 100644 --- a/erpnext/stock/doctype/quality_inspection/quality_inspection.json +++ b/erpnext/stock/doctype/quality_inspection/quality_inspection.json @@ -34,7 +34,9 @@ "verified_by", "column_break_17", "remarks", - "amended_from" + "amended_from", + "print_settings_section", + "letter_head" ], "fields": [ { @@ -255,6 +257,20 @@ "fieldtype": "Link", "label": "Company", "options": "Company" + }, + { + "fieldname": "print_settings_section", + "fieldtype": "Section Break", + "label": "Print Settings" + }, + { + "allow_on_submit": 1, + "fetch_from": "company.default_letter_head", + "fetch_if_empty": 1, + "fieldname": "letter_head", + "fieldtype": "Link", + "label": "Letter Head", + "options": "Letter Head" } ], "icon": "fa fa-search", @@ -262,7 +278,7 @@ "index_web_pages_for_search": 1, "is_submittable": 1, "links": [], - "modified": "2025-01-16 17:00:48.774532", + "modified": "2025-02-17 13:20:17.583094", "modified_by": "Administrator", "module": "Stock", "name": "Quality Inspection", diff --git a/erpnext/stock/doctype/quality_inspection/quality_inspection.py b/erpnext/stock/doctype/quality_inspection/quality_inspection.py index 1eb565b5338..714db645ca6 100644 --- a/erpnext/stock/doctype/quality_inspection/quality_inspection.py +++ b/erpnext/stock/doctype/quality_inspection/quality_inspection.py @@ -37,6 +37,7 @@ class QualityInspection(Document): item_code: DF.Link item_name: DF.Data | None item_serial_no: DF.Link | None + letter_head: DF.Link | None manual_inspection: DF.Check naming_series: DF.Literal["MAT-QA-.YYYY.-"] quality_inspection_template: DF.Link | None From e998f063a99a4ef8b3f2005a246cc50101fb8e6a Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 17 Feb 2025 14:13:34 +0530 Subject: [PATCH 1141/1614] fix: pos accounting dimension fieldname error (backport #45899) (#45921) * fix: pos accounting dimension fieldname error (#45899) * fix: pos accounting dimension fieldname error * fix: method to get enabled accounting dimensions * fix: fetch enabled accounting dimensions * fix: clear flags for accounting_dimensions_details on_update * refactor: validation for doctype * fix: using get_checks_for_pl_and_bs_accounts for accounting dimensions (cherry picked from commit 60a5f4f30de2e3b9f6951ae370ab25e1609fe3e0) # Conflicts: # erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py * chore: resolve conflict * chore: resolve linter issue * fix: resolve linter issue * chore: resolve linter issue * chore: resolve linter issue * chore: resolve linter issue --------- Co-authored-by: Diptanil Saha --- .../accounting_dimension.py | 11 ++++--- .../pos_invoice_merge_log.py | 17 ++++++----- .../doctype/pos_profile/pos_profile.py | 29 +++++-------------- 3 files changed, 25 insertions(+), 32 deletions(-) diff --git a/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.py b/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.py index f8eeba84662..81937469f21 100644 --- a/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.py +++ b/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.py @@ -41,6 +41,11 @@ class AccountingDimension(Document): self.set_fieldname_and_label() def validate(self): + self.validate_doctype() + validate_column_name(self.fieldname) + self.validate_dimension_defaults() + + def validate_doctype(self): if self.document_type in ( *core_doctypes_list, "Accounting Dimension", @@ -62,9 +67,6 @@ class AccountingDimension(Document): if not self.is_new(): self.validate_document_type_change() - validate_column_name(self.fieldname) - self.validate_dimension_defaults() - def validate_document_type_change(self): doctype_before_save = frappe.db.get_value("Accounting Dimension", self.name, "document_type") if doctype_before_save != self.document_type: @@ -103,6 +105,7 @@ class AccountingDimension(Document): def on_update(self): frappe.flags.accounting_dimensions = None + frappe.flags.accounting_dimensions_details = None def make_dimension_in_accounting_doctypes(doc, doclist=None): @@ -263,7 +266,7 @@ def get_checks_for_pl_and_bs_accounts(): frappe.flags.accounting_dimensions_details = frappe.db.sql( """SELECT p.label, p.disabled, p.fieldname, c.default_dimension, c.company, c.mandatory_for_pl, c.mandatory_for_bs FROM `tabAccounting Dimension`p ,`tabAccounting Dimension Detail` c - WHERE p.name = c.parent""", + WHERE p.name = c.parent AND p.disabled = 0""", as_dict=1, ) diff --git a/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py b/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py index 18136a033b0..a8dd4c41c92 100644 --- a/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py +++ b/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py @@ -12,7 +12,9 @@ from frappe.utils import cint, flt, get_time, getdate, nowdate, nowtime from frappe.utils.background_jobs import enqueue, is_job_enqueued from frappe.utils.scheduler import is_scheduler_inactive -from erpnext.accounts.doctype.pos_profile.pos_profile import required_accounting_dimensions +from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import ( + get_checks_for_pl_and_bs_accounts, +) class POSInvoiceMergeLog(Document): @@ -292,22 +294,23 @@ class POSInvoiceMergeLog(Document): invoice.disable_rounded_total = cint( frappe.db.get_value("POS Profile", invoice.pos_profile, "disable_rounded_total") ) - accounting_dimensions = required_accounting_dimensions() + accounting_dimensions = get_checks_for_pl_and_bs_accounts() + accounting_dimensions_fields = [d.fieldname for d in accounting_dimensions] dimension_values = frappe.db.get_value( - "POS Profile", {"name": invoice.pos_profile}, accounting_dimensions, as_dict=1 + "POS Profile", {"name": invoice.pos_profile}, accounting_dimensions_fields, as_dict=1 ) for dimension in accounting_dimensions: - dimension_value = dimension_values.get(dimension) + dimension_value = dimension_values.get(dimension.fieldname) - if not dimension_value: + if not dimension_value and (dimension.mandatory_for_pl or dimension.mandatory_for_bs): frappe.throw( _("Please set Accounting Dimension {} in {}").format( - frappe.bold(frappe.unscrub(dimension)), + frappe.bold(dimension.label), frappe.get_desk_link("POS Profile", invoice.pos_profile), ) ) - invoice.set(dimension, dimension_value) + invoice.set(dimension.fieldname, dimension_value) if self.merge_invoices_based_on == "Customer Group": invoice.flags.ignore_pos_profile = True diff --git a/erpnext/accounts/doctype/pos_profile/pos_profile.py b/erpnext/accounts/doctype/pos_profile/pos_profile.py index cb9ae67fffd..3b5aa5f75bd 100644 --- a/erpnext/accounts/doctype/pos_profile/pos_profile.py +++ b/erpnext/accounts/doctype/pos_profile/pos_profile.py @@ -7,6 +7,10 @@ from frappe import _, msgprint, scrub, unscrub from frappe.model.document import Document from frappe.utils import get_link_to_form, now +from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import ( + get_checks_for_pl_and_bs_accounts, +) + class POSProfile(Document): # begin: auto-generated types @@ -70,15 +74,15 @@ class POSProfile(Document): self.validate_accounting_dimensions() def validate_accounting_dimensions(self): - acc_dim_names = required_accounting_dimensions() - for acc_dim in acc_dim_names: - if not self.get(acc_dim): + acc_dims = get_checks_for_pl_and_bs_accounts() + for acc_dim in acc_dims: + if not self.get(acc_dim.fieldname) and (acc_dim.mandatory_for_pl or acc_dim.mandatory_for_bs): frappe.throw( _( "{0} is a mandatory Accounting Dimension.
" "Please set a value for {0} in Accounting Dimensions section." ).format( - unscrub(frappe.bold(acc_dim)), + frappe.bold(acc_dim.label), ), title=_("Mandatory Accounting Dimension"), ) @@ -216,23 +220,6 @@ def get_child_nodes(group_type, root): ) -def required_accounting_dimensions(): - p = frappe.qb.DocType("Accounting Dimension") - c = frappe.qb.DocType("Accounting Dimension Detail") - - acc_dim_doc = ( - frappe.qb.from_(p) - .inner_join(c) - .on(p.name == c.parent) - .select(c.parent) - .where((c.mandatory_for_bs == 1) | (c.mandatory_for_pl == 1)) - .where(p.disabled == 0) - ).run(as_dict=1) - - acc_dim_names = [scrub(d.parent) for d in acc_dim_doc] - return acc_dim_names - - @frappe.whitelist() @frappe.validate_and_sanitize_search_inputs def pos_profile_query(doctype, txt, searchfield, start, page_len, filters): From dd34bbe570af6fc5e6c57727ee111f4b51226a3e Mon Sep 17 00:00:00 2001 From: Diptanil Saha Date: Mon, 17 Feb 2025 16:03:19 +0530 Subject: [PATCH 1142/1614] fix: pos return validation on v15 (#45951) --- erpnext/controllers/accounts_controller.py | 2 +- erpnext/controllers/sales_and_purchase_return.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index e75fdc126e6..bb0a4070981 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -170,7 +170,7 @@ class AccountsController(TransactionBase): self.validate_qty_is_not_zero() if ( - self.doctype in ["Sales Invoice", "Purchase Invoice"] + self.doctype in ["Sales Invoice", "Purchase Invoice", "POS Invoice"] and self.get("is_return") and self.get("update_stock") ): diff --git a/erpnext/controllers/sales_and_purchase_return.py b/erpnext/controllers/sales_and_purchase_return.py index 66ec8851727..a9007208a2a 100644 --- a/erpnext/controllers/sales_and_purchase_return.py +++ b/erpnext/controllers/sales_and_purchase_return.py @@ -258,7 +258,7 @@ def get_already_returned_items(doc): field = ( frappe.scrub(doc.doctype) + "_item" - if doc.doctype in ["Purchase Invoice", "Purchase Receipt", "Sales Invoice"] + if doc.doctype in ["Purchase Invoice", "Purchase Receipt", "Sales Invoice", "POS Invoice"] else "dn_detail" ) data = frappe.db.sql( @@ -770,6 +770,7 @@ def get_return_against_item_fields(voucher_type): "Delivery Note": "dn_detail", "Sales Invoice": "sales_invoice_item", "Subcontracting Receipt": "subcontracting_receipt_item", + "POS Invoice": "sales_invoice_item", } return return_against_item_fields[voucher_type] From 38edc46c46d9d3a46206f68115bebcee7c7218e5 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 17 Feb 2025 17:01:34 +0530 Subject: [PATCH 1143/1614] fix: disable partial payment in pos (backport #45752) (#45945) * fix: disable partial payment in pos (#45752) * fix: disable partial payment in pos * test: disable partial payment * test: removed print statement * test: using save method to auto calculate paid_amount * test: paid_amount calculation using save method * test: added save method to calculate paid_amount * test: outstanding amount * test: added test for partial payments in pos invoice * fix: custom validation error for partial payment * test: using partial payment validation * fix: validate only on submit (cherry picked from commit d94802067bc6b8ade91395df5de108a20c6ca979) # Conflicts: # erpnext/accounts/doctype/pos_closing_entry/test_pos_closing_entry.py # erpnext/accounts/doctype/pos_invoice_merge_log/test_pos_invoice_merge_log.py * chore: resolve conflict * chore: resolve conflict * chore: resolve linter issue * test: fixed failing test --------- Co-authored-by: Diptanil Saha --- .../test_pos_closing_entry.py | 28 ++++++++- .../doctype/pos_invoice/pos_invoice.py | 19 ++++++ .../doctype/pos_invoice/test_pos_invoice.py | 61 +++++++++++++++++-- .../test_pos_invoice_merge_log.py | 18 +++++- 4 files changed, 115 insertions(+), 11 deletions(-) diff --git a/erpnext/accounts/doctype/pos_closing_entry/test_pos_closing_entry.py b/erpnext/accounts/doctype/pos_closing_entry/test_pos_closing_entry.py index 5dd6259c585..34585ec200d 100644 --- a/erpnext/accounts/doctype/pos_closing_entry/test_pos_closing_entry.py +++ b/erpnext/accounts/doctype/pos_closing_entry/test_pos_closing_entry.py @@ -39,10 +39,12 @@ class TestPOSClosingEntry(unittest.TestCase): pos_inv1 = create_pos_invoice(rate=3500, do_not_submit=1) pos_inv1.append("payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 3500}) + pos_inv1.save() pos_inv1.submit() pos_inv2 = create_pos_invoice(rate=3200, do_not_submit=1) pos_inv2.append("payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 3200}) + pos_inv2.save() pos_inv2.submit() pcv_doc = make_closing_entry_from_opening(opening_entry) @@ -68,6 +70,7 @@ class TestPOSClosingEntry(unittest.TestCase): pos_inv = create_pos_invoice(rate=3500, do_not_submit=1, item_name="Test Item", without_item_code=1) pos_inv.append("payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 3500}) + pos_inv.save() pos_inv.submit() pcv_doc = make_closing_entry_from_opening(opening_entry) @@ -86,10 +89,12 @@ class TestPOSClosingEntry(unittest.TestCase): pos_inv1 = create_pos_invoice(rate=3500, do_not_submit=1) pos_inv1.append("payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 3500}) + pos_inv1.save() pos_inv1.submit() pos_inv2 = create_pos_invoice(rate=3200, do_not_submit=1) pos_inv2.append("payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 3200}) + pos_inv2.save() pos_inv2.submit() # make return entry of pos_inv2 @@ -111,10 +116,12 @@ class TestPOSClosingEntry(unittest.TestCase): pos_inv1 = create_pos_invoice(rate=3500, do_not_submit=1) pos_inv1.append("payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 3500}) + pos_inv1.save() pos_inv1.submit() pos_inv2 = create_pos_invoice(rate=3200, do_not_submit=1) pos_inv2.append("payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 3200}) + pos_inv2.save() pos_inv2.submit() pcv_doc = make_closing_entry_from_opening(opening_entry) @@ -165,6 +172,7 @@ class TestPOSClosingEntry(unittest.TestCase): opening_entry = create_opening_entry(pos_profile, test_user.name) pos_inv1 = create_pos_invoice(rate=350, do_not_submit=1, pos_profile=pos_profile.name) pos_inv1.append("payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 3500}) + pos_inv1.save() pos_inv1.submit() # if in between a mandatory accounting dimension is added to the POS Profile then @@ -218,11 +226,27 @@ class TestPOSClosingEntry(unittest.TestCase): opening_entry = create_opening_entry(pos_profile, test_user.name) pos_inv = create_pos_invoice( - item_code=item_code, qty=5, rate=300, use_serial_batch_fields=1, batch_no=batch_no + item_code=item_code, + qty=5, + rate=300, + use_serial_batch_fields=1, + batch_no=batch_no, + do_not_submit=True, ) + pos_inv.payments[0].amount = pos_inv.grand_total + pos_inv.save() + pos_inv.submit() pos_inv2 = create_pos_invoice( - item_code=item_code, qty=5, rate=300, use_serial_batch_fields=1, batch_no=batch_no + item_code=item_code, + qty=5, + rate=300, + use_serial_batch_fields=1, + batch_no=batch_no, + do_not_submit=True, ) + pos_inv2.payments[0].amount = pos_inv2.grand_total + pos_inv2.save() + pos_inv2.submit() batch_qty_with_pos = get_batch_qty(batch_no, "_Test Warehouse - _TC", item_code) self.assertEqual(batch_qty_with_pos, 0.0) diff --git a/erpnext/accounts/doctype/pos_invoice/pos_invoice.py b/erpnext/accounts/doctype/pos_invoice/pos_invoice.py index ab5a4092c33..a8a733ac42c 100644 --- a/erpnext/accounts/doctype/pos_invoice/pos_invoice.py +++ b/erpnext/accounts/doctype/pos_invoice/pos_invoice.py @@ -20,6 +20,10 @@ from erpnext.controllers.queries import item_query as _item_query from erpnext.stock.doctype.serial_no.serial_no import get_serial_nos +class PartialPaymentValidationError(frappe.ValidationError): + pass + + class POSInvoice(SalesInvoice): # begin: auto-generated types # This code is auto-generated. Do not modify anything in this block. @@ -210,6 +214,7 @@ class POSInvoice(SalesInvoice): self.validate_payment_amount() self.validate_loyalty_transaction() self.validate_company_with_pos_company() + self.validate_full_payment() if self.coupon_code: from erpnext.accounts.doctype.pricing_rule.utils import validate_coupon_code @@ -477,6 +482,20 @@ class POSInvoice(SalesInvoice): if self.redeem_loyalty_points and self.loyalty_program and self.loyalty_points: validate_loyalty_points(self, self.loyalty_points) + def validate_full_payment(self): + invoice_total = flt(self.rounded_total) or flt(self.grand_total) + + if self.docstatus == 1: + if self.is_return and self.paid_amount != invoice_total: + frappe.throw( + msg=_("Partial Payment in POS Invoice is not allowed."), exc=PartialPaymentValidationError + ) + + if self.paid_amount < invoice_total: + frappe.throw( + msg=_("Partial Payment in POS Invoice is not allowed."), exc=PartialPaymentValidationError + ) + def set_status(self, update=False, status=None, update_modified=True): if self.is_new(): if self.get("amended_from"): diff --git a/erpnext/accounts/doctype/pos_invoice/test_pos_invoice.py b/erpnext/accounts/doctype/pos_invoice/test_pos_invoice.py index 7b6b8b50543..09c9443bdd9 100644 --- a/erpnext/accounts/doctype/pos_invoice/test_pos_invoice.py +++ b/erpnext/accounts/doctype/pos_invoice/test_pos_invoice.py @@ -7,7 +7,7 @@ import unittest import frappe from frappe import _ -from erpnext.accounts.doctype.pos_invoice.pos_invoice import make_sales_return +from erpnext.accounts.doctype.pos_invoice.pos_invoice import PartialPaymentValidationError, make_sales_return from erpnext.accounts.doctype.pos_profile.test_pos_profile import make_pos_profile from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice from erpnext.stock.doctype.item.test_item import make_item @@ -313,7 +313,7 @@ class TestPOSInvoice(unittest.TestCase): ) pos.append( - "payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 1000, "default": 1} + "payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 2000, "default": 1} ) pos.insert() @@ -324,6 +324,11 @@ class TestPOSInvoice(unittest.TestCase): # partial return 1 pos_return1.get("items")[0].qty = -1 + pos_return1.set("payments", []) + pos_return1.append( + "payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": -1000, "default": 1} + ) + pos_return1.paid_amount = -1000 pos_return1.submit() pos_return1.reload() @@ -338,6 +343,11 @@ class TestPOSInvoice(unittest.TestCase): # partial return 2 pos_return2 = make_sales_return(pos.name) + pos_return2.set("payments", []) + pos_return2.append( + "payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": -1000, "default": 1} + ) + pos_return2.paid_amount = -1000 pos_return2.submit() self.assertEqual(pos_return2.get("items")[0].qty, -1) @@ -373,6 +383,15 @@ class TestPOSInvoice(unittest.TestCase): inv.payments = [] self.assertRaises(frappe.ValidationError, inv.insert) + def test_partial_payment(self): + pos_inv = create_pos_invoice(rate=10000, do_not_save=1) + pos_inv.append( + "payments", + {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 9000}, + ) + pos_inv.insert() + self.assertRaises(PartialPaymentValidationError, pos_inv.submit) + def test_serialized_item_transaction(self): from erpnext.stock.doctype.stock_entry.test_stock_entry import make_serialized_item @@ -581,7 +600,13 @@ class TestPOSInvoice(unittest.TestCase): "Test Loyalty Customer", company="_Test Company", loyalty_program="Test Single Loyalty" ) - inv = create_pos_invoice(customer="Test Loyalty Customer", rate=10000) + inv = create_pos_invoice(customer="Test Loyalty Customer", rate=10000, do_not_save=1) + inv.append( + "payments", + {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 10000}, + ) + inv.insert() + inv.submit() lpe = frappe.get_doc( "Loyalty Point Entry", @@ -607,7 +632,13 @@ class TestPOSInvoice(unittest.TestCase): ) # add 10 loyalty points - create_pos_invoice(customer="Test Loyalty Customer", rate=10000) + pos_inv = create_pos_invoice(customer="Test Loyalty Customer", rate=10000, do_not_save=1) + pos_inv.append( + "payments", + {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 10000}, + ) + pos_inv.paid_amount = 10000 + pos_inv.submit() before_lp_details = get_loyalty_program_details_with_points( "Test Loyalty Customer", company="_Test Company", loyalty_program="Test Single Loyalty" @@ -641,10 +672,12 @@ class TestPOSInvoice(unittest.TestCase): test_user, pos_profile = init_user_and_profile() pos_inv = create_pos_invoice(rate=300, additional_discount_percentage=10, do_not_submit=1) pos_inv.append("payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 270}) + pos_inv.save() pos_inv.submit() pos_inv2 = create_pos_invoice(rate=3200, do_not_submit=1) pos_inv2.append("payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 3200}) + pos_inv2.save() pos_inv2.submit() consolidate_pos_invoices() @@ -676,6 +709,7 @@ class TestPOSInvoice(unittest.TestCase): "included_in_print_rate": 1, }, ) + pos_inv.save() pos_inv.submit() pos_inv2 = create_pos_invoice(rate=300, qty=2, do_not_submit=1) @@ -692,6 +726,7 @@ class TestPOSInvoice(unittest.TestCase): "included_in_print_rate": 1, }, ) + pos_inv2.save() pos_inv2.submit() consolidate_pos_invoices() @@ -744,6 +779,7 @@ class TestPOSInvoice(unittest.TestCase): "included_in_print_rate": 1, }, ) + pos_inv2.save() pos_inv2.submit() consolidate_pos_invoices() @@ -774,7 +810,10 @@ class TestPOSInvoice(unittest.TestCase): # POS Invoice 1, for the batch without bundle pos_inv1 = create_pos_invoice(item="_BATCH ITEM Test For Reserve", rate=300, qty=15, do_not_save=1) - + pos_inv1.append( + "payments", + {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 4500}, + ) pos_inv1.items[0].batch_no = batch_no pos_inv1.save() pos_inv1.submit() @@ -790,8 +829,14 @@ class TestPOSInvoice(unittest.TestCase): # POS Invoice 2, for the batch with bundle pos_inv2 = create_pos_invoice( - item="_BATCH ITEM Test For Reserve", rate=300, qty=10, batch_no=batch_no + item="_BATCH ITEM Test For Reserve", rate=300, qty=10, batch_no=batch_no, do_not_save=1 ) + pos_inv2.append( + "payments", + {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 3000}, + ) + pos_inv2.save() + pos_inv2.submit() pos_inv2.reload() self.assertTrue(pos_inv2.items[0].serial_and_batch_bundle) @@ -826,6 +871,10 @@ class TestPOSInvoice(unittest.TestCase): pos_inv1 = create_pos_invoice( item=item.name, rate=300, qty=1, do_not_submit=1, batch_no="TestBatch 01" ) + pos_inv1.append( + "payments", + {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 300}, + ) pos_inv1.save() pos_inv1.submit() diff --git a/erpnext/accounts/doctype/pos_invoice_merge_log/test_pos_invoice_merge_log.py b/erpnext/accounts/doctype/pos_invoice_merge_log/test_pos_invoice_merge_log.py index 904d8e83b9c..e0d37436be5 100644 --- a/erpnext/accounts/doctype/pos_invoice_merge_log/test_pos_invoice_merge_log.py +++ b/erpnext/accounts/doctype/pos_invoice_merge_log/test_pos_invoice_merge_log.py @@ -28,14 +28,17 @@ class TestPOSInvoiceMergeLog(unittest.TestCase): pos_inv = create_pos_invoice(rate=300, do_not_submit=1) pos_inv.append("payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 300}) + pos_inv.save() pos_inv.submit() pos_inv2 = create_pos_invoice(rate=3200, do_not_submit=1) pos_inv2.append("payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 3200}) + pos_inv2.save() pos_inv2.submit() pos_inv3 = create_pos_invoice(customer="_Test Customer 2", rate=2300, do_not_submit=1) pos_inv3.append("payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 2300}) + pos_inv3.save() pos_inv3.submit() consolidate_pos_invoices() @@ -61,14 +64,17 @@ class TestPOSInvoiceMergeLog(unittest.TestCase): pos_inv = create_pos_invoice(rate=300, do_not_submit=1) pos_inv.append("payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 300}) + pos_inv.save() pos_inv.submit() pos_inv2 = create_pos_invoice(rate=3200, do_not_submit=1) pos_inv2.append("payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 3200}) + pos_inv2.save() pos_inv2.submit() pos_inv3 = create_pos_invoice(customer="_Test Customer 2", rate=2300, do_not_submit=1) pos_inv3.append("payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 2300}) + pos_inv3.save() pos_inv3.submit() pos_inv_cn = make_sales_return(pos_inv.name) @@ -122,6 +128,8 @@ class TestPOSInvoiceMergeLog(unittest.TestCase): }, ) inv.insert() + inv.payments[0].amount = inv.grand_total + inv.save() inv.submit() inv2 = create_pos_invoice(qty=1, rate=100, do_not_save=True) @@ -138,6 +146,8 @@ class TestPOSInvoiceMergeLog(unittest.TestCase): }, ) inv2.insert() + inv2.payments[0].amount = inv.grand_total + inv2.save() inv2.submit() consolidate_pos_invoices() @@ -272,7 +282,7 @@ class TestPOSInvoiceMergeLog(unittest.TestCase): inv2.submit() inv3 = create_pos_invoice(qty=3, rate=600, do_not_save=True) - inv3.append("payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 1000}) + inv3.append("payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 1800}) inv3.insert() inv3.submit() @@ -280,8 +290,8 @@ class TestPOSInvoiceMergeLog(unittest.TestCase): inv.load_from_db() consolidated_invoice = frappe.get_doc("Sales Invoice", inv.consolidated_invoice) - self.assertEqual(consolidated_invoice.outstanding_amount, 800) - self.assertNotEqual(consolidated_invoice.status, "Paid") + self.assertNotEqual(consolidated_invoice.outstanding_amount, 800) + self.assertEqual(consolidated_invoice.status, "Paid") finally: frappe.set_user("Administrator") @@ -416,6 +426,7 @@ class TestPOSInvoiceMergeLog(unittest.TestCase): do_not_submit=1, ) pos_inv.append("payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 100}) + pos_inv.save() pos_inv.submit() pos_inv_cn = make_sales_return(pos_inv.name) @@ -430,6 +441,7 @@ class TestPOSInvoiceMergeLog(unittest.TestCase): do_not_submit=1, ) pos_inv2.append("payments", {"mode_of_payment": "Cash", "account": "Cash - _TC", "amount": 100}) + pos_inv2.save() pos_inv2.submit() consolidate_pos_invoices() From 8fbfe14c633826ea6a944214acf3368c6ff3cfe4 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Mon, 17 Feb 2025 14:19:34 +0530 Subject: [PATCH 1144/1614] fix: provision to enable naming series for SABB (cherry picked from commit fe43975cdd6b57ca3dad21752238452170f2564e) # Conflicts: # erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.json # erpnext/stock/doctype/serial_and_batch_bundle/test_serial_and_batch_bundle.py # erpnext/stock/doctype/stock_settings/stock_settings.json --- .../serial_and_batch_bundle.js | 7 ++ .../serial_and_batch_bundle.json | 13 ++++ .../serial_and_batch_bundle.py | 20 +++++ .../test_serial_and_batch_bundle.py | 74 +++++++++++++++++++ .../stock_settings/stock_settings.json | 27 +++++++ .../doctype/stock_settings/stock_settings.py | 2 + 6 files changed, 143 insertions(+) diff --git a/erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.js b/erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.js index ad8360ea75c..404abbd21bc 100644 --- a/erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.js +++ b/erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.js @@ -134,6 +134,13 @@ frappe.ui.form.on("Serial and Batch Bundle", { }, toggle_fields(frm) { + let show_naming_series_field = + frappe.user_defaults.set_serial_and_batch_bundle_naming_based_on_naming_series; + frm.toggle_display("naming_series", cint(show_naming_series_field)); + frm.toggle_reqd("naming_series", cint(show_naming_series_field)); + + frm.toggle_display("naming_series", frm.doc.__islocal ? true : false); + if (frm.doc.has_serial_no) { frm.doc.entries.forEach((row) => { if (Math.abs(row.qty) !== 1) { diff --git a/erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.json b/erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.json index 3ff76ee818b..add0575ccc1 100644 --- a/erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.json +++ b/erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.json @@ -7,6 +7,7 @@ "engine": "InnoDB", "field_order": [ "item_details_tab", + "naming_series", "company", "item_name", "has_serial_no", @@ -242,12 +243,24 @@ "fieldtype": "Data", "label": "Returned Against", "read_only": 1 + }, + { + "default": "SABB-.########", + "fieldname": "naming_series", + "fieldtype": "Select", + "label": "Naming Series", + "options": "\nSABB-.########", + "set_only_once": 1 } ], "index_web_pages_for_search": 1, "is_submittable": 1, "links": [], +<<<<<<< HEAD "modified": "2025-02-12 10:53:32.090309", +======= + "modified": "2025-02-17 16:22:36.056205", +>>>>>>> fe43975cdd (fix: provision to enable naming series for SABB) "modified_by": "Administrator", "module": "Stock", "name": "Serial and Batch Bundle", 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 c37d2464ff0..c37051e1e2b 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 @@ -8,6 +8,7 @@ from collections import Counter, defaultdict import frappe from frappe import _, _dict, bold from frappe.model.document import Document +from frappe.model.naming import make_autoname from frappe.query_builder.functions import CombineDatetime, Sum from frappe.utils import ( add_days, @@ -68,6 +69,7 @@ class SerialandBatchBundle(Document): item_code: DF.Link item_group: DF.Link | None item_name: DF.Data | None + naming_series: DF.Literal["", "SABB-.########"] posting_date: DF.Date | None posting_time: DF.Time | None returned_against: DF.Data | None @@ -80,6 +82,24 @@ class SerialandBatchBundle(Document): warehouse: DF.Link | None # end: auto-generated types + def autoname(self): + if frappe.db.get_single_value( + "Stock Settings", "set_serial_and_batch_bundle_naming_based_on_naming_series" + ): + if not self.naming_series: + frappe.throw(_("Naming Series is mandatory")) + + naming_series = self.naming_series + if "#" not in naming_series: + naming_series += ".#####" + + self.name = make_autoname(self.naming_series) + else: + try: + self.name = frappe.generate_hash(length=20) + except frappe.DuplicateEntryError: + self.autoname() + def validate(self): if self.docstatus == 1 and self.voucher_detail_no: self.validate_voucher_detail_no() 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 0a4352e1ea9..8748f8a785f 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 @@ -16,7 +16,81 @@ from erpnext.stock.doctype.serial_and_batch_bundle.serial_and_batch_bundle impor from erpnext.stock.doctype.stock_entry.stock_entry_utils import make_stock_entry +<<<<<<< HEAD class TestSerialandBatchBundle(FrappeTestCase): +======= +class UnitTestSerialAndBatchBundle(UnitTestCase): + """ + Unit tests for SerialAndBatchBundle. + Use this class for testing individual functions and methods. + """ + + pass + + +class TestSerialandBatchBundle(IntegrationTestCase): + def test_naming_for_sabb(self): + frappe.db.set_single_value( + "Stock Settings", "set_serial_and_batch_bundle_naming_based_on_naming_series", 1 + ) + + serial_item_code = "New Serial No Valuation 11" + make_item( + serial_item_code, + { + "has_serial_no": 1, + "serial_no_series": "TEST-A-SER-VAL-.#####", + "is_stock_item": 1, + }, + ) + + for sn in ["TEST-A-SER-VAL-00001", "TEST-A-SER-VAL-00002"]: + if not frappe.db.exists("Serial No", sn): + frappe.get_doc( + { + "doctype": "Serial No", + "serial_no": sn, + "item_code": serial_item_code, + } + ).insert(ignore_permissions=True) + + bundle_doc = make_serial_batch_bundle( + { + "item_code": serial_item_code, + "warehouse": "_Test Warehouse - _TC", + "voucher_type": "Stock Entry", + "posting_date": today(), + "posting_time": nowtime(), + "qty": 10, + "serial_nos": ["TEST-A-SER-VAL-00001", "TEST-A-SER-VAL-00002"], + "type_of_transaction": "Inward", + "do_not_submit": True, + } + ) + + self.assertTrue(bundle_doc.name.startswith("SABB-")) + + frappe.db.set_single_value( + "Stock Settings", "set_serial_and_batch_bundle_naming_based_on_naming_series", 0 + ) + + bundle_doc = make_serial_batch_bundle( + { + "item_code": serial_item_code, + "warehouse": "_Test Warehouse - _TC", + "voucher_type": "Stock Entry", + "posting_date": today(), + "posting_time": nowtime(), + "qty": 10, + "serial_nos": ["TEST-A-SER-VAL-00001", "TEST-A-SER-VAL-00002"], + "type_of_transaction": "Inward", + "do_not_submit": True, + } + ) + + self.assertFalse(bundle_doc.name.startswith("SABB-")) + +>>>>>>> fe43975cdd (fix: provision to enable naming series for SABB) def test_inward_outward_serial_valuation(self): from erpnext.stock.doctype.delivery_note.test_delivery_note import create_delivery_note from erpnext.stock.doctype.purchase_receipt.test_purchase_receipt import make_purchase_receipt diff --git a/erpnext/stock/doctype/stock_settings/stock_settings.json b/erpnext/stock/doctype/stock_settings/stock_settings.json index e542a1582e3..4b6d4f180e0 100644 --- a/erpnext/stock/doctype/stock_settings/stock_settings.json +++ b/erpnext/stock/doctype/stock_settings/stock_settings.json @@ -56,6 +56,8 @@ "use_serial_batch_fields", "do_not_update_serial_batch_on_creation_of_auto_bundle", "allow_existing_serial_no", + "serial_and_batch_bundle_section", + "set_serial_and_batch_bundle_naming_based_on_naming_series", "stock_planning_tab", "auto_material_request", "auto_indent", @@ -467,6 +469,27 @@ "fieldname": "allow_existing_serial_no", "fieldtype": "Check", "label": "Allow existing Serial No to be Manufactured/Received again" +<<<<<<< HEAD +======= + }, + { + "default": "0", + "description": "Upon submission of the Sales Order, Work Order, or Production Plan, the system will automatically reserve the stock.", + "fieldname": "auto_reserve_stock", + "fieldtype": "Check", + "label": "Auto Reserve Stock" + }, + { + "fieldname": "serial_and_batch_bundle_section", + "fieldtype": "Section Break", + "label": "Serial and Batch Bundle" + }, + { + "default": "0", + "fieldname": "set_serial_and_batch_bundle_naming_based_on_naming_series", + "fieldtype": "Check", + "label": "Set Serial and Batch Bundle Naming Based on Naming Series" +>>>>>>> fe43975cdd (fix: provision to enable naming series for SABB) } ], "icon": "icon-cog", @@ -474,7 +497,11 @@ "index_web_pages_for_search": 1, "issingle": 1, "links": [], +<<<<<<< HEAD "modified": "2024-12-09 17:52:36.030456", +======= + "modified": "2025-02-17 13:36:36.177743", +>>>>>>> fe43975cdd (fix: provision to enable naming series for SABB) "modified_by": "Administrator", "module": "Stock", "name": "Stock Settings", diff --git a/erpnext/stock/doctype/stock_settings/stock_settings.py b/erpnext/stock/doctype/stock_settings/stock_settings.py index b7a317cd66a..8589004c8bf 100644 --- a/erpnext/stock/doctype/stock_settings/stock_settings.py +++ b/erpnext/stock/doctype/stock_settings/stock_settings.py @@ -55,6 +55,7 @@ class StockSettings(Document): role_allowed_to_create_edit_back_dated_transactions: DF.Link | None role_allowed_to_over_deliver_receive: DF.Link | None sample_retention_warehouse: DF.Link | None + set_serial_and_batch_bundle_naming_based_on_naming_series: DF.Check show_barcode_field: DF.Check stock_auth_role: DF.Link | None stock_frozen_upto: DF.Date | None @@ -75,6 +76,7 @@ class StockSettings(Document): "default_warehouse", "set_qty_in_transactions_based_on_serial_no_input", "use_serial_batch_fields", + "set_serial_and_batch_bundle_naming_based_on_naming_series", ]: frappe.db.set_default(key, self.get(key, "")) From 2f7f9c0bac8aa69c163611907e4f8100a17fd3a4 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Mon, 17 Feb 2025 21:29:22 +0530 Subject: [PATCH 1145/1614] chore: fix conflicts --- .../serial_and_batch_bundle/serial_and_batch_bundle.json | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.json b/erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.json index add0575ccc1..02ecc11f44a 100644 --- a/erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.json +++ b/erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.json @@ -256,11 +256,7 @@ "index_web_pages_for_search": 1, "is_submittable": 1, "links": [], -<<<<<<< HEAD - "modified": "2025-02-12 10:53:32.090309", -======= - "modified": "2025-02-17 16:22:36.056205", ->>>>>>> fe43975cdd (fix: provision to enable naming series for SABB) + "modified": "2025-02-17 18:22:36.056205", "modified_by": "Administrator", "module": "Stock", "name": "Serial and Batch Bundle", From 697fdf5bc35853dc7c173de47dbc036e1d6efa35 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Mon, 17 Feb 2025 21:30:15 +0530 Subject: [PATCH 1146/1614] chore: fix conflicts --- .../doctype/stock_settings/stock_settings.json | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/erpnext/stock/doctype/stock_settings/stock_settings.json b/erpnext/stock/doctype/stock_settings/stock_settings.json index 4b6d4f180e0..22a24d1bfa1 100644 --- a/erpnext/stock/doctype/stock_settings/stock_settings.json +++ b/erpnext/stock/doctype/stock_settings/stock_settings.json @@ -469,15 +469,6 @@ "fieldname": "allow_existing_serial_no", "fieldtype": "Check", "label": "Allow existing Serial No to be Manufactured/Received again" -<<<<<<< HEAD -======= - }, - { - "default": "0", - "description": "Upon submission of the Sales Order, Work Order, or Production Plan, the system will automatically reserve the stock.", - "fieldname": "auto_reserve_stock", - "fieldtype": "Check", - "label": "Auto Reserve Stock" }, { "fieldname": "serial_and_batch_bundle_section", @@ -489,7 +480,6 @@ "fieldname": "set_serial_and_batch_bundle_naming_based_on_naming_series", "fieldtype": "Check", "label": "Set Serial and Batch Bundle Naming Based on Naming Series" ->>>>>>> fe43975cdd (fix: provision to enable naming series for SABB) } ], "icon": "icon-cog", @@ -497,11 +487,7 @@ "index_web_pages_for_search": 1, "issingle": 1, "links": [], -<<<<<<< HEAD - "modified": "2024-12-09 17:52:36.030456", -======= - "modified": "2025-02-17 13:36:36.177743", ->>>>>>> fe43975cdd (fix: provision to enable naming series for SABB) + "modified": "2025-02-17 14:36:36.177743", "modified_by": "Administrator", "module": "Stock", "name": "Stock Settings", From 43d32eb10ec7b475dd8edbe667de489be986d069 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Mon, 17 Feb 2025 21:32:48 +0530 Subject: [PATCH 1147/1614] chore: fix conflicts --- .../test_serial_and_batch_bundle.py | 13 ------------- 1 file changed, 13 deletions(-) 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 8748f8a785f..a3bd20b80ba 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 @@ -16,19 +16,7 @@ from erpnext.stock.doctype.serial_and_batch_bundle.serial_and_batch_bundle impor from erpnext.stock.doctype.stock_entry.stock_entry_utils import make_stock_entry -<<<<<<< HEAD class TestSerialandBatchBundle(FrappeTestCase): -======= -class UnitTestSerialAndBatchBundle(UnitTestCase): - """ - Unit tests for SerialAndBatchBundle. - Use this class for testing individual functions and methods. - """ - - pass - - -class TestSerialandBatchBundle(IntegrationTestCase): def test_naming_for_sabb(self): frappe.db.set_single_value( "Stock Settings", "set_serial_and_batch_bundle_naming_based_on_naming_series", 1 @@ -90,7 +78,6 @@ class TestSerialandBatchBundle(IntegrationTestCase): self.assertFalse(bundle_doc.name.startswith("SABB-")) ->>>>>>> fe43975cdd (fix: provision to enable naming series for SABB) def test_inward_outward_serial_valuation(self): from erpnext.stock.doctype.delivery_note.test_delivery_note import create_delivery_note from erpnext.stock.doctype.purchase_receipt.test_purchase_receipt import make_purchase_receipt From bb3eb8117043ceea1558ea85349511d23bb704b1 Mon Sep 17 00:00:00 2001 From: rethik Date: Mon, 3 Feb 2025 19:22:37 +0530 Subject: [PATCH 1148/1614] fix: add validate to allow equity account and party_type shareholder (cherry picked from commit 2c8e3f3409bd755ebd0ce7faa22f7aa1ac148d7a) --- erpnext/accounts/party.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/party.py b/erpnext/accounts/party.py index 0df9dcb0683..38c69ca7eb9 100644 --- a/erpnext/accounts/party.py +++ b/erpnext/accounts/party.py @@ -765,7 +765,11 @@ def validate_account_party_type(self): if self.party_type and self.party: account_type = frappe.get_cached_value("Account", self.account, "account_type") - if account_type and (account_type not in ["Receivable", "Payable"]): + if ( + account_type + and (account_type not in ["Receivable", "Payable", "Equity"]) + and self.party_type != "Shareholder" + ): frappe.throw( _( "Party Type and Party can only be set for Receivable / Payable account

" "{0}" From 552b5a79ce338bd518e1f10d841c99d102002612 Mon Sep 17 00:00:00 2001 From: rethik Date: Mon, 3 Feb 2025 19:29:59 +0530 Subject: [PATCH 1149/1614] test: add unit test to validate account type and party type (cherry picked from commit 9422ce5aee303c738de4fda9dc01cc02fd1bbfc9) --- .../accounts/doctype/gl_entry/test_gl_entry.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/erpnext/accounts/doctype/gl_entry/test_gl_entry.py b/erpnext/accounts/doctype/gl_entry/test_gl_entry.py index f6ed163bff5..6ff378559c0 100644 --- a/erpnext/accounts/doctype/gl_entry/test_gl_entry.py +++ b/erpnext/accounts/doctype/gl_entry/test_gl_entry.py @@ -124,3 +124,20 @@ class TestGLEntry(unittest.TestCase): str(e), "Party Type and Party can only be set for Receivable / Payable account_Test Account Cost for Goods Sold - _TC", ) + + def test_validate_account_party_type_shareholder(self): + jv = make_journal_entry( + "Opening Balance Equity - _TC", + "Cash - _TC", + 100, + "_Test Cost Center - _TC", + save=False, + submit=False, + ) + + for row in jv.accounts: + row.party_type = "Shareholder" + break + + jv.save().submit() + self.assertEqual(1, jv.docstatus) From 0d2115197e5345b532cdee80dfcb0029acea348e Mon Sep 17 00:00:00 2001 From: rethik Date: Tue, 4 Feb 2025 11:07:41 +0530 Subject: [PATCH 1150/1614] fix: remove party type from validate (cherry picked from commit f82837a4a28d387a4e80ec0df9729ddfa104240f) --- erpnext/accounts/party.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/erpnext/accounts/party.py b/erpnext/accounts/party.py index 38c69ca7eb9..f2e86ef2b2e 100644 --- a/erpnext/accounts/party.py +++ b/erpnext/accounts/party.py @@ -765,11 +765,7 @@ def validate_account_party_type(self): if self.party_type and self.party: account_type = frappe.get_cached_value("Account", self.account, "account_type") - if ( - account_type - and (account_type not in ["Receivable", "Payable", "Equity"]) - and self.party_type != "Shareholder" - ): + if account_type and (account_type not in ["Receivable", "Payable", "Equity"]): frappe.throw( _( "Party Type and Party can only be set for Receivable / Payable account

" "{0}" From c8881a93584f0969134da170b57bd0e9d32eaa70 Mon Sep 17 00:00:00 2001 From: Sugesh393 Date: Wed, 5 Feb 2025 11:00:55 +0530 Subject: [PATCH 1151/1614] fix: validate payment request total of partly paid invoice (cherry picked from commit 899c18df180cea20a0fb88e730ba047b1d256ddd) --- erpnext/accounts/doctype/payment_request/payment_request.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/payment_request/payment_request.py b/erpnext/accounts/doctype/payment_request/payment_request.py index 736bd548ff9..84e44621784 100644 --- a/erpnext/accounts/doctype/payment_request/payment_request.py +++ b/erpnext/accounts/doctype/payment_request/payment_request.py @@ -775,7 +775,10 @@ def get_existing_paid_amount(doctype, name): frappe.qb.from_(PL) .left_join(PER) .on( - (PER.reference_doctype == PL.against_voucher_type) & (PER.reference_name == PL.against_voucher_no) + (PL.against_voucher_type == PER.reference_doctype) + & (PL.against_voucher_no == PER.reference_name) + & (PL.voucher_type == PER.parenttype) + & (PL.voucher_no == PER.parent) ) .select(Abs(Sum(PL.amount)).as_("total_paid_amount")) .where(PL.against_voucher_type.eq(doctype)) From 9a33b877f5a92f5152e7a5176fce5db17d092ad3 Mon Sep 17 00:00:00 2001 From: Sugesh393 Date: Thu, 6 Feb 2025 11:59:29 +0530 Subject: [PATCH 1152/1614] test: add unit test to validate payment request grand_total for partly paid invoice (cherry picked from commit f8472c32d9f5a051ac676f512eef43defeb81988) --- .../payment_request/test_payment_request.py | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/erpnext/accounts/doctype/payment_request/test_payment_request.py b/erpnext/accounts/doctype/payment_request/test_payment_request.py index ed940470d6c..7ce6cc0b7b7 100644 --- a/erpnext/accounts/doctype/payment_request/test_payment_request.py +++ b/erpnext/accounts/doctype/payment_request/test_payment_request.py @@ -542,6 +542,45 @@ class TestPaymentRequest(FrappeTestCase): self.assertEqual(pr.grand_total, si.outstanding_amount) + def test_partial_paid_invoice_with_more_payment_entry(self): + pi = make_purchase_invoice(currency="INR", qty=1, rate=500) + pi.submit() + pi_1 = make_purchase_invoice(currency="INR", qty=1, rate=300) + pi_1.submit() + + pr = make_payment_request(dt="Purchase Invoice", dn=pi.name, mute_email=1, submit_doc=0, return_doc=1) + pr.grand_total = 200 + pr.submit() + pr.create_payment_entry() + pr_1 = make_payment_request( + dt="Purchase Invoice", dn=pi.name, mute_email=1, submit_doc=0, return_doc=1 + ) + pr_1.grand_total = 200 + pr_1.submit() + pr_1.create_payment_entry() + + pe = get_payment_entry(dt="Purchase Invoice", dn=pi.name) + pe.paid_amount = 200 + pe.references[0].reference_doctype = pi.doctype + pe.references[0].reference_name = pi.name + pe.references[0].grand_total = pi.grand_total + pe.references[0].outstanding_amount = pi.outstanding_amount + pe.references[0].allocated_amount = 100 + pe.append( + "references", + { + "reference_doctype": pi_1.doctype, + "reference_name": pi_1.name, + "grand_total": pi_1.grand_total, + "outstanding_amount": pi_1.outstanding_amount, + "allocated_amount": 100, + }, + ) + + pr_2 = make_payment_request(dt="Purchase Invoice", dn=pi.name, mute_email=1) + pi.load_from_db() + self.assertEqual(pr_2.grand_total, pi.outstanding_amount) + def test_partial_paid_invoice_with_submitted_payment_entry(self): pi = make_purchase_invoice(currency="INR", qty=1, rate=5000) From 2b80c009b3ec7133736cfbfb0e99af295deac2ff Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Tue, 18 Feb 2025 12:19:06 +0530 Subject: [PATCH 1153/1614] fix: serial no status for internal transfer delivery note (cherry picked from commit 3333331a3dae4daaf88fb812d21df7c97dd30b51) --- erpnext/controllers/selling_controller.py | 7 ++-- .../delivery_note/test_delivery_note.py | 42 +++++++++++++++++++ 2 files changed, 46 insertions(+), 3 deletions(-) diff --git a/erpnext/controllers/selling_controller.py b/erpnext/controllers/selling_controller.py index fec704edf64..8ba8f06c65f 100644 --- a/erpnext/controllers/selling_controller.py +++ b/erpnext/controllers/selling_controller.py @@ -596,12 +596,13 @@ class SellingController(StockController): if not self.is_internal_transfer() or self.docstatus == 1 else None ) - if serial_and_batch_bundle and self.is_internal_transfer() and self.is_return: - if self.docstatus == 1: + + if self.is_internal_transfer(): + if serial_and_batch_bundle and self.docstatus == 1 and self.is_return: serial_and_batch_bundle = self.make_package_for_transfer( serial_and_batch_bundle, item_row.warehouse, type_of_transaction="Inward" ) - else: + elif not serial_and_batch_bundle: serial_and_batch_bundle = frappe.db.get_value( "Stock Ledger Entry", {"voucher_detail_no": item_row.name, "warehouse": item_row.warehouse}, diff --git a/erpnext/stock/doctype/delivery_note/test_delivery_note.py b/erpnext/stock/doctype/delivery_note/test_delivery_note.py index 4afaffe6fd4..f86798d17e8 100644 --- a/erpnext/stock/doctype/delivery_note/test_delivery_note.py +++ b/erpnext/stock/doctype/delivery_note/test_delivery_note.py @@ -769,6 +769,48 @@ class TestDeliveryNote(FrappeTestCase): {"warehouse": "_Test Warehouse - _TC"}, ) + def test_delivery_note_internal_transfer_serial_no_status(self): + from erpnext.selling.doctype.customer.test_customer import create_internal_customer + + item = make_item( + "_Test Item for Internal Transfer With Serial No Status", + properties={"has_serial_no": 1, "is_stock_item": 1, "serial_no_series": "INT-SN-.####"}, + ).name + + warehouse = "_Test Warehouse - _TC" + target = "Stores - _TC" + company = "_Test Company" + customer = create_internal_customer(represents_company=company) + rate = 42 + + se = make_stock_entry(target=warehouse, qty=5, basic_rate=rate, item_code=item) + serial_nos = get_serial_nos_from_bundle(se.get("items")[0].serial_and_batch_bundle) + + dn = create_delivery_note( + item_code=item, + company=company, + customer=customer, + qty=5, + rate=500, + warehouse=warehouse, + target_warehouse=target, + ignore_pricing_rule=0, + use_serial_batch_fields=1, + serial_no="\n".join(serial_nos), + ) + + for serial_no in serial_nos: + sn = frappe.db.get_value("Serial No", serial_no, ["status", "warehouse"], as_dict=1) + self.assertEqual(sn.status, "Active") + self.assertEqual(sn.warehouse, target) + + dn.cancel() + + for serial_no in serial_nos: + sn = frappe.db.get_value("Serial No", serial_no, ["status", "warehouse"], as_dict=1) + self.assertEqual(sn.status, "Active") + self.assertEqual(sn.warehouse, warehouse) + def test_delivery_of_bundled_items_to_target_warehouse(self): from erpnext.selling.doctype.customer.test_customer import create_internal_customer From b32e4daf2b2a38e31b7e9213eb05d71217c94269 Mon Sep 17 00:00:00 2001 From: Sugesh393 Date: Thu, 6 Feb 2025 13:31:10 +0530 Subject: [PATCH 1154/1614] fix: add accounting dimensions section in sales order item (cherry picked from commit 7d47869f4b0b6a5b0b05cda14a1290daa9cdc60f) # Conflicts: # erpnext/selling/doctype/sales_order_item/sales_order_item.json --- .../sales_order_item/sales_order_item.json | 40 ++++++++++++++++++- .../sales_order_item/sales_order_item.py | 2 + 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/erpnext/selling/doctype/sales_order_item/sales_order_item.json b/erpnext/selling/doctype/sales_order_item/sales_order_item.json index fb9e895ccb7..2df6dc3ea83 100644 --- a/erpnext/selling/doctype/sales_order_item/sales_order_item.json +++ b/erpnext/selling/doctype/sales_order_item/sales_order_item.json @@ -106,7 +106,11 @@ "purchase_order", "column_break_89", "material_request_item", - "purchase_order_item" + "purchase_order_item", + "accounting_dimensions_section", + "cost_center", + "column_break_ihdh", + "project" ], "fields": [ { @@ -926,12 +930,46 @@ "fieldname": "available_quantity_section", "fieldtype": "Section Break", "label": "Available Quantity" + }, + { + "collapsible": 1, + "fieldname": "accounting_dimensions_section", + "fieldtype": "Section Break", + "label": "Accounting Dimensions" + }, + { + "allow_on_submit": 1, + "default": ":Company", + "fieldname": "cost_center", + "fieldtype": "Link", + "label": "Cost Center", + "options": "Cost Center", + "print_hide": 1, + "print_width": "120px", + "reqd": 1, + "width": "120px" + }, + { + "fieldname": "column_break_ihdh", + "fieldtype": "Column Break" + }, + { + "allow_on_submit": 1, + "fieldname": "project", + "fieldtype": "Link", + "label": "Project", + "options": "Project", + "search_index": 1 } ], "idx": 1, "istable": 1, "links": [], +<<<<<<< HEAD "modified": "2024-11-21 14:21:29.743474", +======= + "modified": "2025-02-06 13:29:24.619850", +>>>>>>> 7d47869f4b (fix: add accounting dimensions section in sales order item) "modified_by": "Administrator", "module": "Selling", "name": "Sales Order Item", diff --git a/erpnext/selling/doctype/sales_order_item/sales_order_item.py b/erpnext/selling/doctype/sales_order_item/sales_order_item.py index 888ea755e2e..7f2a37b1616 100644 --- a/erpnext/selling/doctype/sales_order_item/sales_order_item.py +++ b/erpnext/selling/doctype/sales_order_item/sales_order_item.py @@ -32,6 +32,7 @@ class SalesOrderItem(Document): brand: DF.Link | None company_total_stock: DF.Float conversion_factor: DF.Float + cost_center: DF.Link customer_item_code: DF.Data | None delivered_by_supplier: DF.Check delivered_qty: DF.Float @@ -68,6 +69,7 @@ class SalesOrderItem(Document): pricing_rules: DF.SmallText | None produced_qty: DF.Float production_plan_qty: DF.Float + project: DF.Link | None projected_qty: DF.Float purchase_order: DF.Link | None purchase_order_item: DF.Data | None From 52860cc56639ebdd8143e869300838ad1b8854ff Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 18 Feb 2025 14:27:14 +0530 Subject: [PATCH 1155/1614] chore: resolve conflict --- .../selling/doctype/sales_order_item/sales_order_item.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/erpnext/selling/doctype/sales_order_item/sales_order_item.json b/erpnext/selling/doctype/sales_order_item/sales_order_item.json index 2df6dc3ea83..500a7657176 100644 --- a/erpnext/selling/doctype/sales_order_item/sales_order_item.json +++ b/erpnext/selling/doctype/sales_order_item/sales_order_item.json @@ -965,11 +965,7 @@ "idx": 1, "istable": 1, "links": [], -<<<<<<< HEAD - "modified": "2024-11-21 14:21:29.743474", -======= "modified": "2025-02-06 13:29:24.619850", ->>>>>>> 7d47869f4b (fix: add accounting dimensions section in sales order item) "modified_by": "Administrator", "module": "Selling", "name": "Sales Order Item", From 8306d6fdb6a9ab08d0458dd0c77673e372f85da3 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Tue, 18 Feb 2025 13:52:26 +0530 Subject: [PATCH 1156/1614] fix: slow query (cherry picked from commit 8cfab57fc8d709ba3087294002b35880a10efc56) # Conflicts: # erpnext/stock/doctype/packed_item/packed_item.json --- erpnext/stock/doctype/packed_item/packed_item.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/packed_item/packed_item.json b/erpnext/stock/doctype/packed_item/packed_item.json index 1daf6791d40..8c49c2865d1 100644 --- a/erpnext/stock/doctype/packed_item/packed_item.json +++ b/erpnext/stock/doctype/packed_item/packed_item.json @@ -202,7 +202,8 @@ "oldfieldname": "parent_detail_docname", "oldfieldtype": "Data", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "search_index": 1 }, { "depends_on": "batch_no", @@ -295,7 +296,11 @@ "index_web_pages_for_search": 1, "istable": 1, "links": [], +<<<<<<< HEAD "modified": "2024-02-04 16:30:44.263964", +======= + "modified": "2025-02-18 13:06:02.789654", +>>>>>>> 8cfab57fc8 (fix: slow query) "modified_by": "Administrator", "module": "Stock", "name": "Packed Item", From 567fb8abd1de19c1a36735e2e23e7c50a7c65129 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Tue, 18 Feb 2025 12:37:07 +0530 Subject: [PATCH 1157/1614] fix: set sco_qty field of PO to non negative (cherry picked from commit dfc3dc4944447d120c91568005289249c722e308) --- .../doctype/purchase_order_item/purchase_order_item.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/buying/doctype/purchase_order_item/purchase_order_item.json b/erpnext/buying/doctype/purchase_order_item/purchase_order_item.json index 4fc20594ffa..1724e3cc99c 100644 --- a/erpnext/buying/doctype/purchase_order_item/purchase_order_item.json +++ b/erpnext/buying/doctype/purchase_order_item/purchase_order_item.json @@ -917,6 +917,7 @@ "fieldtype": "Float", "label": "Subcontracted Quantity", "no_copy": 1, + "non_negative": 1, "read_only": 1 } ], @@ -924,7 +925,7 @@ "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2024-12-10 12:11:18.536089", + "modified": "2025-02-18 12:35:04.432636", "modified_by": "Administrator", "module": "Buying", "name": "Purchase Order Item", From 0acdae02c194aaa11df09213572c48a1424d1d85 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Tue, 18 Feb 2025 20:00:08 +0530 Subject: [PATCH 1158/1614] chore: fix conflicts --- erpnext/stock/doctype/packed_item/packed_item.json | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/erpnext/stock/doctype/packed_item/packed_item.json b/erpnext/stock/doctype/packed_item/packed_item.json index 8c49c2865d1..cb415e3813a 100644 --- a/erpnext/stock/doctype/packed_item/packed_item.json +++ b/erpnext/stock/doctype/packed_item/packed_item.json @@ -296,11 +296,7 @@ "index_web_pages_for_search": 1, "istable": 1, "links": [], -<<<<<<< HEAD - "modified": "2024-02-04 16:30:44.263964", -======= - "modified": "2025-02-18 13:06:02.789654", ->>>>>>> 8cfab57fc8 (fix: slow query) + "modified": "2025-02-18 13:07:02.789654", "modified_by": "Administrator", "module": "Stock", "name": "Packed Item", @@ -310,4 +306,4 @@ "sort_order": "DESC", "states": [], "track_changes": 1 -} \ No newline at end of file +} From 42923656eea4e69a8a709495bb8579fad6b42db5 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Tue, 18 Feb 2025 13:56:00 +0530 Subject: [PATCH 1159/1614] fix: millisecond issue for posting datetime (cherry picked from commit ac9e5c01633922628233cb851b57ed6fc006a7cc) # Conflicts: # erpnext/patches.txt # erpnext/stock/utils.py --- erpnext/patches.txt | 4 +++ .../patches/v14_0/update_posting_datetime.py | 10 +++++++ erpnext/stock/utils.py | 27 +++++++++++++++++++ 3 files changed, 41 insertions(+) create mode 100644 erpnext/patches/v14_0/update_posting_datetime.py diff --git a/erpnext/patches.txt b/erpnext/patches.txt index bb76f948f3a..319691aa93b 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -392,4 +392,8 @@ erpnext.patches.v15_0.migrate_checkbox_to_select_for_reconciliation_effect erpnext.patches.v15_0.sync_auto_reconcile_config execute:frappe.db.set_single_value("Accounts Settings", "exchange_gain_loss_posting_date", "Payment") erpnext.patches.v14_0.disable_add_row_in_gross_profit +<<<<<<< HEAD erpnext.patches.v15_0.set_difference_amount_in_asset_value_adjustment +======= +erpnext.patches.v14_0.update_posting_datetime +>>>>>>> ac9e5c0163 (fix: millisecond issue for posting datetime) diff --git a/erpnext/patches/v14_0/update_posting_datetime.py b/erpnext/patches/v14_0/update_posting_datetime.py new file mode 100644 index 00000000000..cb28193b74b --- /dev/null +++ b/erpnext/patches/v14_0/update_posting_datetime.py @@ -0,0 +1,10 @@ +import frappe + + +def execute(): + frappe.db.sql( + """ + UPDATE `tabStock Ledger Entry` + SET posting_datetime = timestamp(posting_date, posting_time) + """ + ) diff --git a/erpnext/stock/utils.py b/erpnext/stock/utils.py index 6369562a62d..9ee836fe9b5 100644 --- a/erpnext/stock/utils.py +++ b/erpnext/stock/utils.py @@ -663,4 +663,31 @@ def get_combine_datetime(posting_date, posting_time): if isinstance(posting_time, datetime.timedelta): posting_time = (datetime.datetime.min + posting_time).time() +<<<<<<< HEAD return datetime.datetime.combine(posting_date, posting_time).replace(microsecond=0) +======= + return datetime.datetime.combine(posting_date, posting_time) + + +@frappe.request_cache +def get_default_stock_uom() -> str | None: + if default_uom := frappe.get_cached_value("Stock Settings", None, "stock_uom"): + return default_uom + + acceptable_default_uoms = dict.fromkeys( + ( + "Nos", + # In the past, we used to create translated UOMs during initial setup. + # These could either be in the system language... + _("Nos", frappe.get_system_settings("language")), + # or the current user's language + _("Nos"), + ) + ) + + available_default_uoms = frappe.db.get_values( + "UOM", {"name": ("in", tuple(acceptable_default_uoms))}, pluck="name" + ) + + return next((uom for uom in acceptable_default_uoms if uom in available_default_uoms), None) +>>>>>>> ac9e5c0163 (fix: millisecond issue for posting datetime) From 050bb1eef5f0688cb39e0aa1a6bea2a622ebc45d Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Tue, 18 Feb 2025 20:10:30 +0530 Subject: [PATCH 1160/1614] chore: fix conflicts --- erpnext/stock/utils.py | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/erpnext/stock/utils.py b/erpnext/stock/utils.py index 9ee836fe9b5..f1055b114cf 100644 --- a/erpnext/stock/utils.py +++ b/erpnext/stock/utils.py @@ -663,31 +663,4 @@ def get_combine_datetime(posting_date, posting_time): if isinstance(posting_time, datetime.timedelta): posting_time = (datetime.datetime.min + posting_time).time() -<<<<<<< HEAD - return datetime.datetime.combine(posting_date, posting_time).replace(microsecond=0) -======= return datetime.datetime.combine(posting_date, posting_time) - - -@frappe.request_cache -def get_default_stock_uom() -> str | None: - if default_uom := frappe.get_cached_value("Stock Settings", None, "stock_uom"): - return default_uom - - acceptable_default_uoms = dict.fromkeys( - ( - "Nos", - # In the past, we used to create translated UOMs during initial setup. - # These could either be in the system language... - _("Nos", frappe.get_system_settings("language")), - # or the current user's language - _("Nos"), - ) - ) - - available_default_uoms = frappe.db.get_values( - "UOM", {"name": ("in", tuple(acceptable_default_uoms))}, pluck="name" - ) - - return next((uom for uom in acceptable_default_uoms if uom in available_default_uoms), None) ->>>>>>> ac9e5c0163 (fix: millisecond issue for posting datetime) From 2e3b19ebb26dc1ecf39cef5b21172b275821d507 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Tue, 18 Feb 2025 20:11:02 +0530 Subject: [PATCH 1161/1614] chore: fix conflicts --- erpnext/patches.txt | 3 --- 1 file changed, 3 deletions(-) diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 319691aa93b..cb10fcce1c4 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -392,8 +392,5 @@ erpnext.patches.v15_0.migrate_checkbox_to_select_for_reconciliation_effect erpnext.patches.v15_0.sync_auto_reconcile_config execute:frappe.db.set_single_value("Accounts Settings", "exchange_gain_loss_posting_date", "Payment") erpnext.patches.v14_0.disable_add_row_in_gross_profit -<<<<<<< HEAD erpnext.patches.v15_0.set_difference_amount_in_asset_value_adjustment -======= erpnext.patches.v14_0.update_posting_datetime ->>>>>>> ac9e5c0163 (fix: millisecond issue for posting datetime) From 22eaa141790814d28baecb7f54758cdaa07d3eb9 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Tue, 18 Feb 2025 14:22:39 +0530 Subject: [PATCH 1162/1614] fix: check if employee is currently working on another workstation (cherry picked from commit 8234e659c8e20ee60a96b63f1f50eafdac974420) --- .../manufacturing/doctype/job_card/job_card.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/erpnext/manufacturing/doctype/job_card/job_card.py b/erpnext/manufacturing/doctype/job_card/job_card.py index 1b4840d14b5..c82038af342 100644 --- a/erpnext/manufacturing/doctype/job_card/job_card.py +++ b/erpnext/manufacturing/doctype/job_card/job_card.py @@ -216,7 +216,7 @@ class JobCard(Document): open_job_cards = [] if d.get("employee"): - open_job_cards = self.get_open_job_cards(d.get("employee")) + open_job_cards = self.get_open_job_cards(d.get("employee"), workstation=self.workstation) data = self.get_overlap_for(d, open_job_cards=open_job_cards) if data: @@ -257,9 +257,12 @@ class JobCard(Document): frappe.get_cached_value("Workstation", self.workstation, "production_capacity") or 1 ) - if args.get("employee"): - # override capacity for employee - production_capacity = 1 + if self.get_open_job_cards(args.get("employee")): + frappe.throw( + _( + "Employee {0} is currently working on another workstation. Please assign another employee." + ).format(args.get("employee")) + ) if not self.has_overlap(production_capacity, time_logs): return {} @@ -366,7 +369,7 @@ class JobCard(Document): return time_logs - def get_open_job_cards(self, employee): + def get_open_job_cards(self, employee, workstation=None): jc = frappe.qb.DocType("Job Card") jctl = frappe.qb.DocType("Job Card Time Log") @@ -377,13 +380,15 @@ class JobCard(Document): .select(jc.name) .where( (jctl.parent == jc.name) - & (jc.workstation == self.workstation) & (jctl.employee == employee) & (jc.docstatus < 1) & (jc.name != self.name) ) ) + if workstation: + query = query.where(jc.workstation == workstation) + jobs = query.run(as_dict=True) return [job.get("name") for job in jobs] if jobs else [] From 5bccf9f837e2d5a1e97a2f3d42afd74887a29ba8 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Tue, 18 Feb 2025 14:49:52 +0530 Subject: [PATCH 1163/1614] fix: throw correct exception (cherry picked from commit 4487edb255175349613963db572d3bf55c7322b5) --- erpnext/manufacturing/doctype/job_card/job_card.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/job_card/job_card.py b/erpnext/manufacturing/doctype/job_card/job_card.py index c82038af342..90ccff720e8 100644 --- a/erpnext/manufacturing/doctype/job_card/job_card.py +++ b/erpnext/manufacturing/doctype/job_card/job_card.py @@ -261,7 +261,8 @@ class JobCard(Document): frappe.throw( _( "Employee {0} is currently working on another workstation. Please assign another employee." - ).format(args.get("employee")) + ).format(args.get("employee")), + OverlapError, ) if not self.has_overlap(production_capacity, time_logs): From bd89c19c98fca7e90a22ccde96aa92cba2d29566 Mon Sep 17 00:00:00 2001 From: venkat102 Date: Wed, 12 Feb 2025 12:54:30 +0530 Subject: [PATCH 1164/1614] fix(quotation): fetch exchange rate on currency change (cherry picked from commit 2f77a8bed11311c6b552fbbbca2fcc986aed98c1) --- .../selling/doctype/quotation/quotation.js | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/erpnext/selling/doctype/quotation/quotation.js b/erpnext/selling/doctype/quotation/quotation.js index 7311857e350..03665b48a85 100644 --- a/erpnext/selling/doctype/quotation/quotation.js +++ b/erpnext/selling/doctype/quotation/quotation.js @@ -353,6 +353,26 @@ erpnext.selling.QuotationController = class QuotationController extends erpnext. ); dialog.show(); } + + currency() { + super.currency(); + let me = this; + const company_currency = this.get_company_currency(); + if (this.frm.doc.currency && this.frm.doc.currency !== company_currency) { + this.get_exchange_rate( + this.frm.doc.transaction_date, + this.frm.doc.currency, + company_currency, + function (exchange_rate) { + if (exchange_rate != me.frm.doc.conversion_rate) { + me.set_margin_amount_based_on_currency(exchange_rate); + me.set_actual_charges_based_on_currency(exchange_rate); + me.frm.set_value("conversion_rate", exchange_rate); + } + } + ); + } + } }; cur_frm.script_manager.make(erpnext.selling.QuotationController); From 8fb9228871cdf27c5acb757297525da22cdf101b Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Wed, 5 Feb 2025 18:48:52 +0530 Subject: [PATCH 1165/1614] feat: added option to enforce free item qty in pricing rule (cherry picked from commit 19c01b145765fbbd2be95e914c818c44697b7d76) --- .../accounts/doctype/pricing_rule/pricing_rule.json | 10 +++++++++- erpnext/accounts/doctype/pricing_rule/pricing_rule.py | 1 + erpnext/accounts/doctype/pricing_rule/utils.py | 3 ++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/pricing_rule/pricing_rule.json b/erpnext/accounts/doctype/pricing_rule/pricing_rule.json index ee9dd2be8c3..473e9b837ae 100644 --- a/erpnext/accounts/doctype/pricing_rule/pricing_rule.json +++ b/erpnext/accounts/doctype/pricing_rule/pricing_rule.json @@ -53,6 +53,7 @@ "column_break_42", "free_item_uom", "round_free_qty", + "enforce_free_item_qty", "is_recursive", "recurse_for", "apply_recursion_over", @@ -643,12 +644,19 @@ "fieldname": "has_priority", "fieldtype": "Check", "label": "Has Priority" + }, + { + "default": "0", + "depends_on": "eval:doc.price_or_product_discount == 'Product'", + "fieldname": "enforce_free_item_qty", + "fieldtype": "Check", + "label": "Enforce Free Item Qty" } ], "icon": "fa fa-gift", "idx": 1, "links": [], - "modified": "2024-09-16 18:14:51.314765", + "modified": "2025-02-05 18:05:03.886828", "modified_by": "Administrator", "module": "Accounts", "name": "Pricing Rule", diff --git a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py index 73cb2483811..bc830ea0450 100644 --- a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py +++ b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py @@ -60,6 +60,7 @@ class PricingRule(Document): disable: DF.Check discount_amount: DF.Currency discount_percentage: DF.Float + enforce_free_item_qty: DF.Check for_price_list: DF.Link | None free_item: DF.Link | None free_item_rate: DF.Currency diff --git a/erpnext/accounts/doctype/pricing_rule/utils.py b/erpnext/accounts/doctype/pricing_rule/utils.py index 551eaa3d1ce..adadcceb7e7 100644 --- a/erpnext/accounts/doctype/pricing_rule/utils.py +++ b/erpnext/accounts/doctype/pricing_rule/utils.py @@ -713,7 +713,8 @@ def apply_pricing_rule_for_free_items(doc, pricing_rule_args): args.pop((item.item_code, item.pricing_rules)) for free_item in args.values(): - doc.append("items", free_item) + if frappe.get_value("Pricing Rule", free_item["pricing_rules"], "enforce_free_item_qty"): + doc.append("items", free_item) def get_pricing_rule_items(pr_doc, other_items=False) -> list: From f63a9dbf9b7b5141e945cd372e6bc10a6af45333 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Wed, 5 Feb 2025 19:18:01 +0530 Subject: [PATCH 1166/1614] fix: tests (cherry picked from commit 366ae85d855c130c89fa1f151a2cca5b1e7dbdd8) --- erpnext/accounts/doctype/pricing_rule/pricing_rule.py | 2 +- erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py | 5 +++++ erpnext/stock/doctype/pick_list/test_pick_list.py | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py index bc830ea0450..2d82144a50b 100644 --- a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py +++ b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py @@ -646,7 +646,7 @@ def remove_pricing_rule_for_item(pricing_rules, item_details, item_code=None, ra if pricing_rule.margin_type in ["Percentage", "Amount"]: item_details.margin_rate_or_amount = 0.0 item_details.margin_type = None - elif pricing_rule.get("free_item"): + elif pricing_rule.get("free_item") and pricing_rule.get("enforce_free_item_qty"): item_details.remove_free_item = ( item_code if pricing_rule.get("same_item") else pricing_rule.get("free_item") ) diff --git a/erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py b/erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py index 965e2b267a3..0bceb2ffa7f 100644 --- a/erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py +++ b/erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py @@ -386,6 +386,7 @@ class TestPricingRule(FrappeTestCase): "price_or_product_discount": "Product", "same_item": 1, "free_qty": 1, + "enforce_free_item_qty": 1, "company": "_Test Company", } frappe.get_doc(test_record.copy()).insert() @@ -418,6 +419,7 @@ class TestPricingRule(FrappeTestCase): "same_item": 0, "free_item": "_Test Item 2", "free_qty": 1, + "enforce_free_item_qty": 1, "company": "_Test Company", } frappe.get_doc(test_record.copy()).insert() @@ -1111,6 +1113,7 @@ class TestPricingRule(FrappeTestCase): "price_or_product_discount": "Product", "same_item": 1, "free_qty": 1, + "enforce_free_item_qty": 1, "round_free_qty": 1, "is_recursive": 1, "recurse_for": 2, @@ -1156,6 +1159,7 @@ class TestPricingRule(FrappeTestCase): "price_or_product_discount": "Product", "same_item": 1, "free_qty": 10, + "enforce_free_item_qty": 1, "round_free_qty": 1, "is_recursive": 1, "recurse_for": 100, @@ -1451,6 +1455,7 @@ def make_pricing_rule(**args): "discount_amount": args.discount_amount or 0.0, "apply_multiple_pricing_rules": args.apply_multiple_pricing_rules or 0, "has_priority": args.has_priority or 0, + "enforce_free_item_qty": args.enforce_free_item_qty or 1, } ) diff --git a/erpnext/stock/doctype/pick_list/test_pick_list.py b/erpnext/stock/doctype/pick_list/test_pick_list.py index 624b169b5ae..0f655460f41 100644 --- a/erpnext/stock/doctype/pick_list/test_pick_list.py +++ b/erpnext/stock/doctype/pick_list/test_pick_list.py @@ -1242,6 +1242,7 @@ class TestPickList(FrappeTestCase): "is_recursive": 1, "recurse_for": 2, "free_qty": 1, + "enforce_free_item_qty": 1, "company": "_Test Company", "customer": "_Test Customer", } From ad1120810921490d7abff2ef1e9a498bf48f3ef7 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Wed, 5 Feb 2025 21:34:19 +0530 Subject: [PATCH 1167/1614] test: added test (cherry picked from commit ac3259b8f156131e2d5ab27e411f9d735f835626) --- .../doctype/pricing_rule/pricing_rule.json | 4 +- .../doctype/pricing_rule/test_pricing_rule.py | 52 +++++++++++++++++-- 2 files changed, 50 insertions(+), 6 deletions(-) diff --git a/erpnext/accounts/doctype/pricing_rule/pricing_rule.json b/erpnext/accounts/doctype/pricing_rule/pricing_rule.json index 473e9b837ae..3b743c796af 100644 --- a/erpnext/accounts/doctype/pricing_rule/pricing_rule.json +++ b/erpnext/accounts/doctype/pricing_rule/pricing_rule.json @@ -646,7 +646,7 @@ "label": "Has Priority" }, { - "default": "0", + "default": "1", "depends_on": "eval:doc.price_or_product_discount == 'Product'", "fieldname": "enforce_free_item_qty", "fieldtype": "Check", @@ -656,7 +656,7 @@ "icon": "fa fa-gift", "idx": 1, "links": [], - "modified": "2025-02-05 18:05:03.886828", + "modified": "2025-02-05 21:03:22.103044", "modified_by": "Administrator", "module": "Accounts", "name": "Pricing Rule", diff --git a/erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py b/erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py index 0bceb2ffa7f..75fb2632b17 100644 --- a/erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py +++ b/erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py @@ -386,7 +386,6 @@ class TestPricingRule(FrappeTestCase): "price_or_product_discount": "Product", "same_item": 1, "free_qty": 1, - "enforce_free_item_qty": 1, "company": "_Test Company", } frappe.get_doc(test_record.copy()).insert() @@ -419,7 +418,6 @@ class TestPricingRule(FrappeTestCase): "same_item": 0, "free_item": "_Test Item 2", "free_qty": 1, - "enforce_free_item_qty": 1, "company": "_Test Company", } frappe.get_doc(test_record.copy()).insert() @@ -430,6 +428,54 @@ class TestPricingRule(FrappeTestCase): self.assertEqual(so.items[1].is_free_item, 1) self.assertEqual(so.items[1].item_code, "_Test Item 2") + def test_enforce_free_item_qty(self): + # this test is only for testing non-enforcement as all other tests in this file already test with enforcement + frappe.delete_doc_if_exists("Pricing Rule", "_Test Pricing Rule") + test_record = { + "doctype": "Pricing Rule", + "title": "_Test Pricing Rule", + "apply_on": "Item Code", + "currency": "USD", + "items": [ + { + "item_code": "_Test Item", + } + ], + "selling": 1, + "rate_or_discount": "Discount Percentage", + "rate": 0, + "min_qty": 0, + "max_qty": 7, + "discount_percentage": 17.5, + "price_or_product_discount": "Product", + "same_item": 0, + "free_item": "_Test Item 2", + "free_qty": 1, + "company": "_Test Company", + } + pricing_rule = frappe.get_doc(test_record.copy()).insert() + + # With enforcement + so = make_sales_order(item_code="_Test Item", qty=1, do_not_submit=True) + self.assertEqual(so.items[1].is_free_item, 1) + self.assertEqual(so.items[1].item_code, "_Test Item 2") + + # Test 1 : Saving a document with an item with pricing list without it's corresponding free item will cause it the free item to be refetched on save + so.items.pop(1) + so.save() + so.reload() + self.assertEqual(len(so.items), 2) + + # Without enforcement + pricing_rule.enforce_free_item_qty = 0 + pricing_rule.save() + + # Test 2 : Deleted free item will not be fetched again on save without enfrocement + so.items.pop(1) + so.save() + so.reload() + self.assertEqual(len(so.items), 1) + def test_cumulative_pricing_rule(self): frappe.delete_doc_if_exists("Pricing Rule", "_Test Cumulative Pricing Rule") test_record = { @@ -1113,7 +1159,6 @@ class TestPricingRule(FrappeTestCase): "price_or_product_discount": "Product", "same_item": 1, "free_qty": 1, - "enforce_free_item_qty": 1, "round_free_qty": 1, "is_recursive": 1, "recurse_for": 2, @@ -1159,7 +1204,6 @@ class TestPricingRule(FrappeTestCase): "price_or_product_discount": "Product", "same_item": 1, "free_qty": 10, - "enforce_free_item_qty": 1, "round_free_qty": 1, "is_recursive": 1, "recurse_for": 100, From fc2ec7c49577ee443f3196d47a98068d151a7712 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Tue, 11 Feb 2025 16:29:01 +0530 Subject: [PATCH 1168/1614] fix: add is_new in if condition (cherry picked from commit 4dcac564863ee3fed391adccc5898f3cd07f4ccf) --- erpnext/accounts/doctype/pricing_rule/utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/pricing_rule/utils.py b/erpnext/accounts/doctype/pricing_rule/utils.py index adadcceb7e7..33b62d49355 100644 --- a/erpnext/accounts/doctype/pricing_rule/utils.py +++ b/erpnext/accounts/doctype/pricing_rule/utils.py @@ -713,7 +713,9 @@ def apply_pricing_rule_for_free_items(doc, pricing_rule_args): args.pop((item.item_code, item.pricing_rules)) for free_item in args.values(): - if frappe.get_value("Pricing Rule", free_item["pricing_rules"], "enforce_free_item_qty"): + if doc.is_new() or frappe.get_value( + "Pricing Rule", free_item["pricing_rules"], "enforce_free_item_qty" + ): doc.append("items", free_item) From f782900a15a44928e801c829f01b111ff03d9d06 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Mon, 17 Feb 2025 18:21:22 +0530 Subject: [PATCH 1169/1614] refactor: rename field (cherry picked from commit f3d598881c9b1135d5afca01059e27056a62b305) --- erpnext/accounts/doctype/pricing_rule/pricing_rule.json | 8 ++++---- erpnext/accounts/doctype/pricing_rule/pricing_rule.py | 4 ++-- .../accounts/doctype/pricing_rule/test_pricing_rule.py | 8 ++++---- erpnext/accounts/doctype/pricing_rule/utils.py | 4 ++-- erpnext/stock/doctype/pick_list/test_pick_list.py | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/erpnext/accounts/doctype/pricing_rule/pricing_rule.json b/erpnext/accounts/doctype/pricing_rule/pricing_rule.json index 3b743c796af..d1697f10903 100644 --- a/erpnext/accounts/doctype/pricing_rule/pricing_rule.json +++ b/erpnext/accounts/doctype/pricing_rule/pricing_rule.json @@ -53,7 +53,7 @@ "column_break_42", "free_item_uom", "round_free_qty", - "enforce_free_item_qty", + "dont_enforce_free_item_qty", "is_recursive", "recurse_for", "apply_recursion_over", @@ -648,15 +648,15 @@ { "default": "1", "depends_on": "eval:doc.price_or_product_discount == 'Product'", - "fieldname": "enforce_free_item_qty", + "fieldname": "dont_enforce_free_item_qty", "fieldtype": "Check", - "label": "Enforce Free Item Qty" + "label": "Don't Enforce Free Item Qty" } ], "icon": "fa fa-gift", "idx": 1, "links": [], - "modified": "2025-02-05 21:03:22.103044", + "modified": "2025-02-17 18:15:39.824639", "modified_by": "Administrator", "module": "Accounts", "name": "Pricing Rule", diff --git a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py index 2d82144a50b..7a895f6818b 100644 --- a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py +++ b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py @@ -60,7 +60,7 @@ class PricingRule(Document): disable: DF.Check discount_amount: DF.Currency discount_percentage: DF.Float - enforce_free_item_qty: DF.Check + dont_enforce_free_item_qty: DF.Check for_price_list: DF.Link | None free_item: DF.Link | None free_item_rate: DF.Currency @@ -646,7 +646,7 @@ def remove_pricing_rule_for_item(pricing_rules, item_details, item_code=None, ra if pricing_rule.margin_type in ["Percentage", "Amount"]: item_details.margin_rate_or_amount = 0.0 item_details.margin_type = None - elif pricing_rule.get("free_item") and pricing_rule.get("enforce_free_item_qty"): + elif pricing_rule.get("free_item") and not pricing_rule.get("dont_enforce_free_item_qty"): item_details.remove_free_item = ( item_code if pricing_rule.get("same_item") else pricing_rule.get("free_item") ) diff --git a/erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py b/erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py index 75fb2632b17..3ad3d45ee47 100644 --- a/erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py +++ b/erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py @@ -428,7 +428,7 @@ class TestPricingRule(FrappeTestCase): self.assertEqual(so.items[1].is_free_item, 1) self.assertEqual(so.items[1].item_code, "_Test Item 2") - def test_enforce_free_item_qty(self): + def test_dont_enforce_free_item_qty(self): # this test is only for testing non-enforcement as all other tests in this file already test with enforcement frappe.delete_doc_if_exists("Pricing Rule", "_Test Pricing Rule") test_record = { @@ -467,10 +467,10 @@ class TestPricingRule(FrappeTestCase): self.assertEqual(len(so.items), 2) # Without enforcement - pricing_rule.enforce_free_item_qty = 0 + pricing_rule.dont_enforce_free_item_qty = 1 pricing_rule.save() - # Test 2 : Deleted free item will not be fetched again on save without enfrocement + # Test 2 : Deleted free item will not be fetched again on save without enforcement so.items.pop(1) so.save() so.reload() @@ -1499,7 +1499,7 @@ def make_pricing_rule(**args): "discount_amount": args.discount_amount or 0.0, "apply_multiple_pricing_rules": args.apply_multiple_pricing_rules or 0, "has_priority": args.has_priority or 0, - "enforce_free_item_qty": args.enforce_free_item_qty or 1, + "enforce_free_item_qty": args.dont_enforce_free_item_qty or 0, } ) diff --git a/erpnext/accounts/doctype/pricing_rule/utils.py b/erpnext/accounts/doctype/pricing_rule/utils.py index 33b62d49355..bbf73e80809 100644 --- a/erpnext/accounts/doctype/pricing_rule/utils.py +++ b/erpnext/accounts/doctype/pricing_rule/utils.py @@ -713,8 +713,8 @@ def apply_pricing_rule_for_free_items(doc, pricing_rule_args): args.pop((item.item_code, item.pricing_rules)) for free_item in args.values(): - if doc.is_new() or frappe.get_value( - "Pricing Rule", free_item["pricing_rules"], "enforce_free_item_qty" + if doc.is_new() or not frappe.get_value( + "Pricing Rule", free_item["pricing_rules"], "dont_enforce_free_item_qty" ): doc.append("items", free_item) diff --git a/erpnext/stock/doctype/pick_list/test_pick_list.py b/erpnext/stock/doctype/pick_list/test_pick_list.py index 0f655460f41..c3043bbf1b5 100644 --- a/erpnext/stock/doctype/pick_list/test_pick_list.py +++ b/erpnext/stock/doctype/pick_list/test_pick_list.py @@ -1242,7 +1242,7 @@ class TestPickList(FrappeTestCase): "is_recursive": 1, "recurse_for": 2, "free_qty": 1, - "enforce_free_item_qty": 1, + "dont_enforce_free_item_qty": 0, "company": "_Test Company", "customer": "_Test Customer", } From 1abe1a1fd50bc6b860ebde52e56be07859fb8436 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Mon, 17 Feb 2025 18:47:35 +0530 Subject: [PATCH 1170/1614] fix: set default value to 0 as per new logic (cherry picked from commit 844f1636c0a82dd6e0d0e6e6e3a86bc6652e3ad9) --- erpnext/accounts/doctype/pricing_rule/pricing_rule.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/pricing_rule/pricing_rule.json b/erpnext/accounts/doctype/pricing_rule/pricing_rule.json index d1697f10903..c4825a6d519 100644 --- a/erpnext/accounts/doctype/pricing_rule/pricing_rule.json +++ b/erpnext/accounts/doctype/pricing_rule/pricing_rule.json @@ -646,7 +646,7 @@ "label": "Has Priority" }, { - "default": "1", + "default": "0", "depends_on": "eval:doc.price_or_product_discount == 'Product'", "fieldname": "dont_enforce_free_item_qty", "fieldtype": "Check", From 1e7c5ec0cb0cda95dabf704eb5b17761d98bab4f Mon Sep 17 00:00:00 2001 From: Khushi Rawat <142375893+khushi8112@users.noreply.github.com> Date: Thu, 13 Feb 2025 14:21:29 +0530 Subject: [PATCH 1171/1614] fix: do not reschedule depreciation for fully depreciated asset on scrap (cherry picked from commit fd4c4f98fa9a96550d833b135cdd84ae93131805) --- erpnext/assets/doctype/asset/depreciation.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/assets/doctype/asset/depreciation.py b/erpnext/assets/doctype/asset/depreciation.py index 6ad0631135a..6a1410ac0f9 100644 --- a/erpnext/assets/doctype/asset/depreciation.py +++ b/erpnext/assets/doctype/asset/depreciation.py @@ -444,9 +444,9 @@ def scrap_asset(asset_name): notes = _("This schedule was created when Asset {0} was scrapped.").format( get_link_to_form(asset.doctype, asset.name) ) - - depreciate_asset(asset, date, notes) - asset.reload() + if asset.status != "Fully Depreciated": + depreciate_asset(asset, date, notes) + asset.reload() depreciation_series = frappe.get_cached_value("Company", asset.company, "series_for_depreciation_entry") From e36b860a799537831d7e4d8be8b18b106f63dc12 Mon Sep 17 00:00:00 2001 From: Bhavansathru <122002510+Bhavan23@users.noreply.github.com> Date: Wed, 19 Feb 2025 13:57:31 +0530 Subject: [PATCH 1172/1614] fix: fetch child account data for selected parent (#45904) * fix: fetch child account data for selected parent * fix: change reference name --------- Co-authored-by: venkat102 (cherry picked from commit 73e82b7afa1bef110194bee78e5edb31c6fe092c) --- .../trial_balance_for_party.js | 14 +-- .../trial_balance_for_party.py | 103 ++++++++++-------- 2 files changed, 63 insertions(+), 54 deletions(-) diff --git a/erpnext/accounts/report/trial_balance_for_party/trial_balance_for_party.js b/erpnext/accounts/report/trial_balance_for_party/trial_balance_for_party.js index 50578d314e3..62482ac162c 100644 --- a/erpnext/accounts/report/trial_balance_for_party/trial_balance_for_party.js +++ b/erpnext/accounts/report/trial_balance_for_party/trial_balance_for_party.js @@ -68,16 +68,12 @@ frappe.query_reports["Trial Balance for Party"] = { { fieldname: "account", label: __("Account"), - fieldtype: "Link", + fieldtype: "MultiSelectList", options: "Account", - get_query: function () { - var company = frappe.query_report.get_filter_value("company"); - return { - doctype: "Account", - filters: { - company: company, - }, - }; + get_data: function (txt) { + return frappe.db.get_link_options("Account", txt, { + company: frappe.query_report.get_filter_value("company"), + }); }, }, { diff --git a/erpnext/accounts/report/trial_balance_for_party/trial_balance_for_party.py b/erpnext/accounts/report/trial_balance_for_party/trial_balance_for_party.py index dd1a12514e2..f6c79eb6c45 100644 --- a/erpnext/accounts/report/trial_balance_for_party/trial_balance_for_party.py +++ b/erpnext/accounts/report/trial_balance_for_party/trial_balance_for_party.py @@ -4,8 +4,10 @@ import frappe from frappe import _ +from frappe.query_builder.functions import Sum from frappe.utils import cint, flt +from erpnext.accounts.report.general_ledger.general_ledger import get_accounts_with_children from erpnext.accounts.report.trial_balance.trial_balance import validate_filters @@ -35,9 +37,14 @@ def get_data(filters, show_party_name): filters=party_filters, order_by="name", ) + + account_filter = [] + if filters.get("account"): + account_filter = get_accounts_with_children(filters.get("account")) + company_currency = frappe.get_cached_value("Company", filters.company, "default_currency") - opening_balances = get_opening_balances(filters) - balances_within_period = get_balances_within_period(filters) + opening_balances = get_opening_balances(filters, account_filter) + balances_within_period = get_balances_within_period(filters, account_filter) data = [] # total_debit, total_credit = 0, 0 @@ -89,30 +96,34 @@ def get_data(filters, show_party_name): return data -def get_opening_balances(filters): - account_filter = "" - if filters.get("account"): - account_filter = "and account = %s" % (frappe.db.escape(filters.get("account"))) +def get_opening_balances(filters, account_filter=None): + GL_Entry = frappe.qb.DocType("GL Entry") - gle = frappe.db.sql( - f""" - select party, sum(debit) as opening_debit, sum(credit) as opening_credit - from `tabGL Entry` - where company=%(company)s - and is_cancelled=0 - and ifnull(party_type, '') = %(party_type)s and ifnull(party, '') != '' - and (posting_date < %(from_date)s or (ifnull(is_opening, 'No') = 'Yes' and posting_date <= %(to_date)s)) - {account_filter} - group by party""", - { - "company": filters.company, - "from_date": filters.from_date, - "to_date": filters.to_date, - "party_type": filters.party_type, - }, - as_dict=True, + query = ( + frappe.qb.from_(GL_Entry) + .select( + GL_Entry.party, + Sum(GL_Entry.debit).as_("opening_debit"), + Sum(GL_Entry.credit).as_("opening_credit"), + ) + .where( + (GL_Entry.company == filters.company) + & (GL_Entry.is_cancelled == 0) + & (GL_Entry.party_type == filters.party_type) + & (GL_Entry.party != "") + & ( + (GL_Entry.posting_date < filters.from_date) + | ((GL_Entry.is_opening == "Yes") & (GL_Entry.posting_date <= filters.to_date)) + ) + ) + .groupby(GL_Entry.party) ) + if account_filter: + query = query.where(GL_Entry.account.isin(account_filter)) + + gle = query.run(as_dict=True) + opening = frappe._dict() for d in gle: opening_debit, opening_credit = toggle_debit_credit(d.opening_debit, d.opening_credit) @@ -121,31 +132,33 @@ def get_opening_balances(filters): return opening -def get_balances_within_period(filters): - account_filter = "" - if filters.get("account"): - account_filter = "and account = %s" % (frappe.db.escape(filters.get("account"))) +def get_balances_within_period(filters, account_filter=None): + GL_Entry = frappe.qb.DocType("GL Entry") - gle = frappe.db.sql( - f""" - select party, sum(debit) as debit, sum(credit) as credit - from `tabGL Entry` - where company=%(company)s - and is_cancelled = 0 - and ifnull(party_type, '') = %(party_type)s and ifnull(party, '') != '' - and posting_date >= %(from_date)s and posting_date <= %(to_date)s - and ifnull(is_opening, 'No') = 'No' - {account_filter} - group by party""", - { - "company": filters.company, - "from_date": filters.from_date, - "to_date": filters.to_date, - "party_type": filters.party_type, - }, - as_dict=True, + query = ( + frappe.qb.from_(GL_Entry) + .select( + GL_Entry.party, + Sum(GL_Entry.debit).as_("debit"), + Sum(GL_Entry.credit).as_("credit"), + ) + .where( + (GL_Entry.company == filters.company) + & (GL_Entry.is_cancelled == 0) + & (GL_Entry.party_type == filters.party_type) + & (GL_Entry.party != "") + & (GL_Entry.posting_date >= filters.from_date) + & (GL_Entry.posting_date <= filters.to_date) + & (GL_Entry.is_opening == "No") + ) + .groupby(GL_Entry.party) ) + if account_filter: + query = query.where(GL_Entry.account.isin(account_filter)) + + gle = query.run(as_dict=True) + balances_within_period = frappe._dict() for d in gle: balances_within_period.setdefault(d.party, [d.debit, d.credit]) From 281431e041090d50ebff43e76b114a2608f6d4bc Mon Sep 17 00:00:00 2001 From: Khushi Rawat <142375893+khushi8112@users.noreply.github.com> Date: Tue, 11 Feb 2025 16:05:02 +0530 Subject: [PATCH 1173/1614] fix: make purchase_receipt_item and purchase_invoice_item fields of data type (cherry picked from commit 8af9dcb33e954429a5c999213b1a1985568dcb38) # Conflicts: # erpnext/assets/doctype/asset/asset.json --- erpnext/assets/doctype/asset/asset.json | 44 ++++++++++++++++++++++--- erpnext/assets/doctype/asset/asset.py | 4 +-- 2 files changed, 41 insertions(+), 7 deletions(-) diff --git a/erpnext/assets/doctype/asset/asset.json b/erpnext/assets/doctype/asset/asset.json index e28eab9ed13..2683cf7ca96 100644 --- a/erpnext/assets/doctype/asset/asset.json +++ b/erpnext/assets/doctype/asset/asset.json @@ -541,17 +541,51 @@ }, { "fieldname": "purchase_receipt_item", - "fieldtype": "Link", + "fieldtype": "Data", "hidden": 1, - "label": "Purchase Receipt Item", - "options": "Purchase Receipt Item" + "label": "Purchase Receipt Item" }, { "fieldname": "purchase_invoice_item", - "fieldtype": "Link", + "fieldtype": "Data", "hidden": 1, +<<<<<<< HEAD "label": "Purchase Invoice Item", "options": "Purchase Invoice Item" +======= + "label": "Purchase Invoice Item" + }, + { + "fieldname": "insurance_details_tab", + "fieldtype": "Tab Break", + "label": "Insurance" + }, + { + "fieldname": "other_info_tab", + "fieldtype": "Tab Break", + "label": "Other Info" + }, + { + "fieldname": "connections_tab", + "fieldtype": "Tab Break", + "label": "Connections", + "show_dashboard": 1 + }, + { + "fieldname": "depreciation_tab", + "fieldtype": "Tab Break", + "label": "Depreciation" + }, + { + "fieldname": "accounting_dimensions_section", + "fieldtype": "Section Break", + "label": "Accounting Dimensions" + }, + { + "fieldname": "section_break_jtou", + "fieldtype": "Section Break", + "label": "Additional Info" +>>>>>>> 8af9dcb33e (fix: make purchase_receipt_item and purchase_invoice_item fields of data type) } ], "idx": 72, @@ -595,7 +629,7 @@ "link_fieldname": "target_asset" } ], - "modified": "2024-12-26 14:23:20.968882", + "modified": "2025-02-11 16:01:56.140904", "modified_by": "Administrator", "module": "Assets", "name": "Asset", diff --git a/erpnext/assets/doctype/asset/asset.py b/erpnext/assets/doctype/asset/asset.py index 994f36ae1f2..20cc65e8e5d 100644 --- a/erpnext/assets/doctype/asset/asset.py +++ b/erpnext/assets/doctype/asset/asset.py @@ -95,9 +95,9 @@ class Asset(AccountsController): purchase_amount: DF.Currency purchase_date: DF.Date | None purchase_invoice: DF.Link | None - purchase_invoice_item: DF.Link | None + purchase_invoice_item: DF.Data | None purchase_receipt: DF.Link | None - purchase_receipt_item: DF.Link | None + purchase_receipt_item: DF.Data | None split_from: DF.Link | None status: DF.Literal[ "Draft", From 87f337b6053bc20f7c83960a802af27596080552 Mon Sep 17 00:00:00 2001 From: Khushi Rawat <142375893+khushi8112@users.noreply.github.com> Date: Tue, 11 Feb 2025 16:17:42 +0530 Subject: [PATCH 1174/1614] fix: link correct row item of purchase doc (cherry picked from commit da1b4cb9abcfda788bbc1dd2162d33823b1313cf) --- erpnext/assets/doctype/asset/asset.js | 75 ++++++++++--------------- erpnext/assets/doctype/asset/asset.json | 6 +- erpnext/assets/doctype/asset/asset.py | 54 ++++++++++++++++++ 3 files changed, 87 insertions(+), 48 deletions(-) diff --git a/erpnext/assets/doctype/asset/asset.js b/erpnext/assets/doctype/asset/asset.js index 21e307b480c..769356843db 100644 --- a/erpnext/assets/doctype/asset/asset.js +++ b/erpnext/assets/doctype/asset/asset.js @@ -609,9 +609,7 @@ frappe.ui.form.on("Asset", { frm.trigger("toggle_reference_doc"); if (frm.doc.purchase_receipt) { if (frm.doc.item_code) { - frappe.db.get_doc("Purchase Receipt", frm.doc.purchase_receipt).then((pr_doc) => { - frm.events.set_values_from_purchase_doc(frm, "Purchase Receipt", pr_doc); - }); + frm.events.set_values_from_purchase_doc(frm, "Purchase Receipt"); } else { frm.set_value("purchase_receipt", ""); frappe.msgprint({ @@ -626,9 +624,7 @@ frappe.ui.form.on("Asset", { frm.trigger("toggle_reference_doc"); if (frm.doc.purchase_invoice) { if (frm.doc.item_code) { - frappe.db.get_doc("Purchase Invoice", frm.doc.purchase_invoice).then((pi_doc) => { - frm.events.set_values_from_purchase_doc(frm, "Purchase Invoice", pi_doc); - }); + frm.events.set_values_from_purchase_doc(frm, "Purchase Invoice"); } else { frm.set_value("purchase_invoice", ""); frappe.msgprint({ @@ -639,45 +635,36 @@ frappe.ui.form.on("Asset", { } }, - set_values_from_purchase_doc: function (frm, doctype, purchase_doc) { - frm.set_value("company", purchase_doc.company); - if (purchase_doc.bill_date) { - frm.set_value("purchase_date", purchase_doc.bill_date); - } else { - frm.set_value("purchase_date", purchase_doc.posting_date); - } - if (!frm.doc.is_existing_asset && !frm.doc.available_for_use_date) { - frm.set_value("available_for_use_date", frm.doc.purchase_date); - } - const item = purchase_doc.items.find((item) => item.item_code === frm.doc.item_code); - if (!item) { - let doctype_field = frappe.scrub(doctype); - frm.set_value(doctype_field, ""); - frappe.msgprint({ - title: __("Invalid {0}", [__(doctype)]), - message: __("The selected {0} does not contain the selected Asset Item.", [__(doctype)]), - indicator: "red", - }); - } - frappe.db.get_value("Item", item.item_code, "is_grouped_asset", (r) => { - var asset_quantity = r.is_grouped_asset ? item.qty : 1; - var purchase_amount = flt( - item.valuation_rate * asset_quantity, - precision("gross_purchase_amount") - ); + set_values_from_purchase_doc: (frm, doctype) => { + frappe.call({ + method: "erpnext.assets.doctype.asset.asset.get_values_from_purchase_doc", + args: { + purchase_doc_name: frm.doc.purchase_receipt || frm.doc.purchase_invoice, + item_code: frm.doc.item_code, + doctype: doctype, + }, + callback: (r) => { + if (r.message) { + let data = r.message; + frm.set_value("company", data.company); + frm.set_value("purchase_date", data.purchase_date); + frm.set_value("gross_purchase_amount", data.gross_purchase_amount); + frm.set_value("purchase_amount", data.gross_purchase_amount); + frm.set_value("asset_quantity", data.asset_quantity); + frm.set_value("cost_center", data.cost_center); + frm.set_value("location", data.asset_location); - frm.set_value("gross_purchase_amount", purchase_amount); - frm.set_value("purchase_amount", purchase_amount); - frm.set_value("asset_quantity", asset_quantity); - frm.set_value("cost_center", item.cost_center || purchase_doc.cost_center); - if (item.asset_location) { - frm.set_value("location", item.asset_location); - } - if (doctype === "Purchase Receipt") { - frm.set_value("purchase_receipt_item", item.name); - } else if (doctype === "Purchase Invoice") { - frm.set_value("purchase_invoice_item", item.name); - } + if (doctype === "Purchase Receipt") { + frm.set_value("purchase_receipt_item", data.purchase_receipt_item); + } else { + frm.set_value("purchase_invoice_item", data.purchase_invoice_item); + } + + let is_editable = !data.is_multiple_items; // if multiple items, then fields should not be read-only + frm.set_df_property("gross_purchase_amount", "read_only", is_editable); + frm.set_df_property("asset_quantity", "read_only", !is_editable); + } + }, }); }, diff --git a/erpnext/assets/doctype/asset/asset.json b/erpnext/assets/doctype/asset/asset.json index 2683cf7ca96..9d33d5b6e22 100644 --- a/erpnext/assets/doctype/asset/asset.json +++ b/erpnext/assets/doctype/asset/asset.json @@ -227,8 +227,7 @@ "fieldtype": "Currency", "label": "Gross Purchase Amount", "mandatory_depends_on": "eval:(!doc.is_composite_asset || doc.docstatus==1)", - "options": "Company:company:default_currency", - "read_only_depends_on": "eval:!doc.is_existing_asset" + "options": "Company:company:default_currency" }, { "fieldname": "available_for_use_date", @@ -470,8 +469,7 @@ "default": "1", "fieldname": "asset_quantity", "fieldtype": "Int", - "label": "Asset Quantity", - "read_only_depends_on": "eval:!doc.is_existing_asset && !doc.is_composite_asset" + "label": "Asset Quantity" }, { "fieldname": "depr_entry_posting_status", diff --git a/erpnext/assets/doctype/asset/asset.py b/erpnext/assets/doctype/asset/asset.py index 20cc65e8e5d..15ed3d0723a 100644 --- a/erpnext/assets/doctype/asset/asset.py +++ b/erpnext/assets/doctype/asset/asset.py @@ -121,6 +121,7 @@ class Asset(AccountsController): def validate(self): self.validate_precision() + self.set_purchase_doc_row_item() self.validate_asset_values() self.validate_asset_and_reference() self.validate_item() @@ -199,6 +200,35 @@ class Asset(AccountsController): def after_delete(self): add_asset_activity(self.name, _("Asset deleted")) + def set_purchase_doc_row_item(self): + if self.is_existing_asset or self.is_composite_asset: + return + + self.purchase_amount = self.gross_purchase_amount + purchase_type = "Purchase Receipt" if self.purchase_receipt else "Purchase Invoice" + purchase_doc = self.purchase_receipt or self.purchase_invoice + + if not purchase_doc: + return + + purchase_doc = frappe.get_doc(purchase_type, purchase_doc) + + for item in purchase_doc.items: + if self.asset_quantity > 1: + if item.base_net_amount == self.gross_purchase_amount and item.qty == self.asset_quantity: + self.purchase_receipt_item = item.name if purchase_type == "Purchase Receipt" else None + self.purchase_invoice_item = item.name if purchase_type == "Purchase Invoice" else None + return + elif item.qty == self.asset_quantity: + self.purchase_receipt_item = item.name if purchase_type == "Purchase Receipt" else None + self.purchase_invoice_item = item.name if purchase_type == "Purchase Invoice" else None + return + else: + if item.base_net_rate == self.gross_purchase_amount: + self.purchase_receipt_item = item.name if purchase_type == "Purchase Receipt" else None + self.purchase_invoice_item = item.name if purchase_type == "Purchase Invoice" else None + return + def validate_asset_and_reference(self): if self.purchase_invoice or self.purchase_receipt: reference_doc = "Purchase Invoice" if self.purchase_invoice else "Purchase Receipt" @@ -1125,6 +1155,30 @@ def has_active_capitalization(asset): return active_capitalizations > 0 +@frappe.whitelist() +def get_values_from_purchase_doc(purchase_doc_name, item_code, doctype): + purchase_doc = frappe.get_doc(doctype, purchase_doc_name) + matching_items = [item for item in purchase_doc.items if item.item_code == item_code] + + if not matching_items: + frappe.throw(_(f"Selected {doctype} does not contain the Item Code {item_code}")) + + first_item = matching_items[0] + is_multiple_items = len(matching_items) > 1 + + return { + "company": purchase_doc.company, + "purchase_date": purchase_doc.get("bill_date") or purchase_doc.get("posting_date"), + "gross_purchase_amount": flt(first_item.base_net_amount), + "asset_quantity": first_item.qty, + "cost_center": first_item.cost_center or purchase_doc.get("cost_center"), + "asset_location": first_item.get("asset_location"), + "is_multiple_items": is_multiple_items, + "purchase_receipt_item": first_item.name if doctype == "Purchase Receipt" else None, + "purchase_invoice_item": first_item.name if doctype == "Purchase Invoice" else None, + } + + @frappe.whitelist() def split_asset(asset_name, split_qty): asset = frappe.get_doc("Asset", asset_name) From 6183b380890a3a5445ac3277d63ba945efd6738e Mon Sep 17 00:00:00 2001 From: Khushi Rawat <142375893+khushi8112@users.noreply.github.com> Date: Wed, 19 Feb 2025 13:01:27 +0530 Subject: [PATCH 1175/1614] fix: validate if no matching item found (cherry picked from commit 44c1425e73b89b1f82f88e3b84743a630841f08e) --- erpnext/assets/doctype/asset/asset.js | 4 +-- erpnext/assets/doctype/asset/asset.py | 35 ++++++++++++++++++--------- 2 files changed, 25 insertions(+), 14 deletions(-) diff --git a/erpnext/assets/doctype/asset/asset.js b/erpnext/assets/doctype/asset/asset.js index 769356843db..d5ebbc9df28 100644 --- a/erpnext/assets/doctype/asset/asset.js +++ b/erpnext/assets/doctype/asset/asset.js @@ -660,9 +660,9 @@ frappe.ui.form.on("Asset", { frm.set_value("purchase_invoice_item", data.purchase_invoice_item); } - let is_editable = !data.is_multiple_items; // if multiple items, then fields should not be read-only + let is_editable = !data.is_multiple_items; // if multiple items, then fields should be read-only frm.set_df_property("gross_purchase_amount", "read_only", is_editable); - frm.set_df_property("asset_quantity", "read_only", !is_editable); + frm.set_df_property("asset_quantity", "read_only", is_editable); } }, }); diff --git a/erpnext/assets/doctype/asset/asset.py b/erpnext/assets/doctype/asset/asset.py index 15ed3d0723a..d89a33f9d4e 100644 --- a/erpnext/assets/doctype/asset/asset.py +++ b/erpnext/assets/doctype/asset/asset.py @@ -205,29 +205,40 @@ class Asset(AccountsController): return self.purchase_amount = self.gross_purchase_amount - purchase_type = "Purchase Receipt" if self.purchase_receipt else "Purchase Invoice" + purchase_doc_type = "Purchase Receipt" if self.purchase_receipt else "Purchase Invoice" purchase_doc = self.purchase_receipt or self.purchase_invoice if not purchase_doc: return - purchase_doc = frappe.get_doc(purchase_type, purchase_doc) + linked_item = self.get_linked_item(purchase_doc_type, purchase_doc) + + if linked_item: + if purchase_doc_type == "Purchase Receipt": + self.purchase_receipt_item = linked_item + else: + self.purchase_invoice_item = linked_item + + def get_linked_item(self, purchase_doc_type, purchase_doc): + purchase_doc = frappe.get_doc(purchase_doc_type, purchase_doc) for item in purchase_doc.items: if self.asset_quantity > 1: if item.base_net_amount == self.gross_purchase_amount and item.qty == self.asset_quantity: - self.purchase_receipt_item = item.name if purchase_type == "Purchase Receipt" else None - self.purchase_invoice_item = item.name if purchase_type == "Purchase Invoice" else None - return + return item.name elif item.qty == self.asset_quantity: - self.purchase_receipt_item = item.name if purchase_type == "Purchase Receipt" else None - self.purchase_invoice_item = item.name if purchase_type == "Purchase Invoice" else None - return + return item.name else: - if item.base_net_rate == self.gross_purchase_amount: - self.purchase_receipt_item = item.name if purchase_type == "Purchase Receipt" else None - self.purchase_invoice_item = item.name if purchase_type == "Purchase Invoice" else None - return + if item.base_net_rate == self.gross_purchase_amount and item.qty == self.asset_quantity: + return item.name + + # If no matching item found, raise validation error + frappe.throw( + _( + "No matching item found in {0} with item code {1}. " + "Please verify the purchase details and ensure the correct amount and quantity is recorded." + ).format(purchase_doc_type, self.item_code) + ) def validate_asset_and_reference(self): if self.purchase_invoice or self.purchase_receipt: From a50956811079ca6b23e613dc8f5487b515285797 Mon Sep 17 00:00:00 2001 From: Khushi Rawat <142375893+khushi8112@users.noreply.github.com> Date: Wed, 19 Feb 2025 15:04:26 +0530 Subject: [PATCH 1176/1614] fix: reset location only if there is value in row item location field (cherry picked from commit 2bb79197aabe3dd5921066d6550632b8c32ad85b) --- erpnext/assets/doctype/asset/asset.js | 1 - erpnext/assets/doctype/asset/asset.py | 8 -------- 2 files changed, 9 deletions(-) diff --git a/erpnext/assets/doctype/asset/asset.js b/erpnext/assets/doctype/asset/asset.js index d5ebbc9df28..b9ea888faf7 100644 --- a/erpnext/assets/doctype/asset/asset.js +++ b/erpnext/assets/doctype/asset/asset.js @@ -652,7 +652,6 @@ frappe.ui.form.on("Asset", { frm.set_value("purchase_amount", data.gross_purchase_amount); frm.set_value("asset_quantity", data.asset_quantity); frm.set_value("cost_center", data.cost_center); - frm.set_value("location", data.asset_location); if (doctype === "Purchase Receipt") { frm.set_value("purchase_receipt_item", data.purchase_receipt_item); diff --git a/erpnext/assets/doctype/asset/asset.py b/erpnext/assets/doctype/asset/asset.py index d89a33f9d4e..9b3cb022bd8 100644 --- a/erpnext/assets/doctype/asset/asset.py +++ b/erpnext/assets/doctype/asset/asset.py @@ -232,14 +232,6 @@ class Asset(AccountsController): if item.base_net_rate == self.gross_purchase_amount and item.qty == self.asset_quantity: return item.name - # If no matching item found, raise validation error - frappe.throw( - _( - "No matching item found in {0} with item code {1}. " - "Please verify the purchase details and ensure the correct amount and quantity is recorded." - ).format(purchase_doc_type, self.item_code) - ) - def validate_asset_and_reference(self): if self.purchase_invoice or self.purchase_receipt: reference_doc = "Purchase Invoice" if self.purchase_invoice else "Purchase Receipt" From f043b466964bad71dcf69aab4a5db04090be40df Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 13 Feb 2025 18:02:56 +0530 Subject: [PATCH 1177/1614] fix: patch for creating asset depreciation schedule records (cherry picked from commit 7324dcb7c873a9bcf78774a91c1cf72108eaba1f) # Conflicts: # erpnext/patches/v15_0/create_asset_depreciation_schedules_from_assets.py --- ...sset_depreciation_schedules_from_assets.py | 88 +++++++------------ 1 file changed, 32 insertions(+), 56 deletions(-) diff --git a/erpnext/patches/v15_0/create_asset_depreciation_schedules_from_assets.py b/erpnext/patches/v15_0/create_asset_depreciation_schedules_from_assets.py index 523b559d734..b049efa2c30 100644 --- a/erpnext/patches/v15_0/create_asset_depreciation_schedules_from_assets.py +++ b/erpnext/patches/v15_0/create_asset_depreciation_schedules_from_assets.py @@ -1,74 +1,38 @@ import frappe +from frappe.utils import cstr def execute(): +<<<<<<< HEAD frappe.reload_doc("assets", "doctype", "Asset Depreciation Schedule") frappe.reload_doc("assets", "doctype", "Asset Finance Book") frappe.reload_doc("assets", "doctype", "Asset") assets = get_details_of_draft_or_submitted_depreciable_assets() +======= +>>>>>>> 7324dcb7c8 (fix: patch for creating asset depreciation schedule records) asset_finance_books_map = get_asset_finance_books_map() - asset_depreciation_schedules_map = get_asset_depreciation_schedules_map() - for asset in assets: - if not asset_depreciation_schedules_map.get(asset.name): + for key, fb_row in asset_finance_books_map.items(): + depreciation_schedules = asset_depreciation_schedules_map.get(key) + if not depreciation_schedules: continue - depreciation_schedules = asset_depreciation_schedules_map[asset.name] + asset_depr_schedule_doc = frappe.new_doc("Asset Depreciation Schedule") + asset_depr_schedule_doc.set_draft_asset_depr_schedule_details(fb_row, fb_row) + asset_depr_schedule_doc.flags.ignore_validate = True + asset_depr_schedule_doc.insert() - for fb_row in asset_finance_books_map[asset.name]: - asset_depr_schedule_doc = frappe.new_doc("Asset Depreciation Schedule") + if fb_row.docstatus == 1: + frappe.db.set_value( + "Asset Depreciation Schedule", + asset_depr_schedule_doc.name, + {"docstatus": 1, "status": "Active"}, + ) - asset_depr_schedule_doc.set_draft_asset_depr_schedule_details(asset, fb_row) - - asset_depr_schedule_doc.insert() - - if asset.docstatus == 1: - asset_depr_schedule_doc.submit() - - depreciation_schedules_of_fb_row = [ - ds for ds in depreciation_schedules if ds["finance_book_id"] == str(fb_row.idx) - ] - - update_depreciation_schedules(depreciation_schedules_of_fb_row, asset_depr_schedule_doc.name) - - -def get_details_of_draft_or_submitted_depreciable_assets(): - asset = frappe.qb.DocType("Asset") - - records = ( - frappe.qb.from_(asset) - .select( - asset.name, - asset.opening_accumulated_depreciation, - asset.gross_purchase_amount, - asset.opening_number_of_booked_depreciations, - asset.docstatus, - ) - .where(asset.calculate_depreciation == 1) - .where(asset.docstatus < 2) - ).run(as_dict=True) - - return records - - -def group_records_by_asset_name(records): - grouped_dict = {} - - for item in records: - key = next(iter(item.keys())) - value = item[key] - - if value not in grouped_dict: - grouped_dict[value] = [] - - del item["asset_name"] - - grouped_dict[value].append(item) - - return grouped_dict + update_depreciation_schedules(depreciation_schedules, asset_depr_schedule_doc.name) def get_asset_finance_books_map(): @@ -90,12 +54,20 @@ def get_asset_finance_books_map(): afb.expected_value_after_useful_life, afb.daily_prorata_based, afb.shift_based, + asset.docstatus, + asset.name, + asset.opening_accumulated_depreciation, + asset.gross_purchase_amount, + asset.opening_number_of_booked_depreciations, ) .where(asset.docstatus < 2) + .where(asset.calculate_depreciation == 1) .orderby(afb.idx) ).run(as_dict=True) - asset_finance_books_map = group_records_by_asset_name(records) + asset_finance_books_map = frappe._dict() + for d in records: + asset_finance_books_map.setdefault((d.asset_name, cstr(d.finance_book)), d) return asset_finance_books_map @@ -111,13 +83,17 @@ def get_asset_depreciation_schedules_map(): .select( asset.name.as_("asset_name"), ds.name, + ds.finance_book, ds.finance_book_id, ) .where(asset.docstatus < 2) + .where(asset.calculate_depreciation == 1) .orderby(ds.idx) ).run(as_dict=True) - asset_depreciation_schedules_map = group_records_by_asset_name(records) + asset_depreciation_schedules_map = frappe._dict() + for d in records: + asset_depreciation_schedules_map.setdefault((d.asset_name, cstr(d.finance_book)), []).append(d) return asset_depreciation_schedules_map From 6a577438aa93d00160fde18887e7bdc6a58ce3ed Mon Sep 17 00:00:00 2001 From: Venkatesh <47534423+venkat102@users.noreply.github.com> Date: Wed, 19 Feb 2025 15:39:01 +0530 Subject: [PATCH 1178/1614] fix(pos profile): check company while validating mandatory accounting dimension (#45974) (cherry picked from commit 17a2f4429034a1b824226902975c4f8bc963b975) --- erpnext/accounts/doctype/pos_profile/pos_profile.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/pos_profile/pos_profile.py b/erpnext/accounts/doctype/pos_profile/pos_profile.py index 3b5aa5f75bd..a8c4a4d8d72 100644 --- a/erpnext/accounts/doctype/pos_profile/pos_profile.py +++ b/erpnext/accounts/doctype/pos_profile/pos_profile.py @@ -76,7 +76,11 @@ class POSProfile(Document): def validate_accounting_dimensions(self): acc_dims = get_checks_for_pl_and_bs_accounts() for acc_dim in acc_dims: - if not self.get(acc_dim.fieldname) and (acc_dim.mandatory_for_pl or acc_dim.mandatory_for_bs): + if ( + self.company == acc_dim.company + and not self.get(acc_dim.fieldname) + and (acc_dim.mandatory_for_pl or acc_dim.mandatory_for_bs) + ): frappe.throw( _( "{0} is a mandatory Accounting Dimension.
" From 44e1ca9d0549b7401c8945a48fbf15f79867d81b Mon Sep 17 00:00:00 2001 From: Ejaaz Khan <67804911+iamejaaz@users.noreply.github.com> Date: Wed, 19 Feb 2025 15:40:55 +0530 Subject: [PATCH 1179/1614] fix: round sum amount in JE auditing PF (#45961) (cherry picked from commit 941085000ad7e23be6adf64a897e358b4634eedb) --- .../journal_auditing_voucher/journal_auditing_voucher.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/print_format/journal_auditing_voucher/journal_auditing_voucher.html b/erpnext/accounts/print_format/journal_auditing_voucher/journal_auditing_voucher.html index c1c611ee3a3..8a6968ee373 100644 --- a/erpnext/accounts/print_format/journal_auditing_voucher/journal_auditing_voucher.html +++ b/erpnext/accounts/print_format/journal_auditing_voucher/journal_auditing_voucher.html @@ -44,7 +44,7 @@ {% endfor %} Total (debit) - {{ gl | sum(attribute='debit') }} + {{ gl | sum(attribute='debit') | round(2) }} Credit @@ -61,7 +61,7 @@ {% endfor %} Total (credit) - {{ gl | sum(attribute='credit') }} + {{ gl | sum(attribute='credit') | round(2) }} Narration: {{ gl[0].remarks }} From 830edb8f524c23f749d80549bf0f92aa27c7ac18 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 19 Feb 2025 15:43:53 +0530 Subject: [PATCH 1180/1614] fix: auto create asset due to message error (backport #45934) (#45952) fix: auto create asset due to message error (#45934) * fix: auto create asset due to message error * fix: linters (cherry picked from commit 6f1bc5225a42945b8e065827fe44c8f5d6004106) Co-authored-by: 0xD0M1M0 <76812428+0xD0M1M0@users.noreply.github.com> --- erpnext/controllers/buying_controller.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/erpnext/controllers/buying_controller.py b/erpnext/controllers/buying_controller.py index 8da22785b94..9643110b76a 100644 --- a/erpnext/controllers/buying_controller.py +++ b/erpnext/controllers/buying_controller.py @@ -779,8 +779,10 @@ class BuyingController(SubcontractingController): is_plural = "s" if len(created_assets) != 1 else "" messages.append( - _("Asset{} {assets_link} created for {}").format( - is_plural, frappe.bold(d.item_code), assets_link=assets_link + _("Asset{is_plural} {assets_link} created for {item_code}").format( + is_plural=is_plural, + assets_link=assets_link, + item_code=frappe.bold(d.item_code), ) ) else: From 1a4297ac35adcf36055ddc2619dc95ad257acb87 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 19 Feb 2025 15:45:10 +0530 Subject: [PATCH 1181/1614] feat: added ability to use custom html format for process statement of accounts (copy #45746) (#46012) feat: added ability to use custom html format for process statement of accounts (#45746) * feat: added ability to use custom print format for process statement of accounts documents. * fix: handles missing hook issues * chore: linter changes --------- Co-authored-by: Boy4099 Co-authored-by: ruthra kumar (cherry picked from commit a0cd08e9ea07d69df664bb152faf4dd5dfac50e3) Co-authored-by: Steve Wilson --- .../process_statement_of_accounts.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.py b/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.py index cee7a238df0..48f400e1a46 100644 --- a/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.py +++ b/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.py @@ -236,17 +236,21 @@ def get_ar_filters(doc, entry): def get_html(doc, filters, entry, col, res, ageing): base_template_path = "frappe/www/printview.html" - template_path = ( - "erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.html" - if doc.report == "General Ledger" - else "erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts_accounts_receivable.html" - ) + template_path = "erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts_accounts_receivable.html" + if doc.report == "General Ledger": + template_path = ( + "erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.html" + ) + + process_soa_html = frappe.get_hooks("process_soa_html") + # fetching custom print format for Process Statement of Accounts + if process_soa_html and process_soa_html.get(doc.report): + template_path = process_soa_html[doc.report][-1] if doc.letter_head: from frappe.www.printview import get_letter_head letter_head = get_letter_head(doc, 0) - html = frappe.render_template( template_path, { @@ -262,7 +266,6 @@ def get_html(doc, filters, entry, col, res, ageing): else None, }, ) - html = frappe.render_template( base_template_path, {"body": html, "css": get_print_style(), "title": "Statement For " + entry.customer}, From 84647a1c73c9dea83d1706e4a8ec7739414c0f12 Mon Sep 17 00:00:00 2001 From: Khushi Rawat <142375893+khushi8112@users.noreply.github.com> Date: Wed, 19 Feb 2025 15:47:40 +0530 Subject: [PATCH 1182/1614] fix: resolved conflicts --- erpnext/assets/doctype/asset/asset.json | 35 ------------------------- 1 file changed, 35 deletions(-) diff --git a/erpnext/assets/doctype/asset/asset.json b/erpnext/assets/doctype/asset/asset.json index 9d33d5b6e22..06b851f2cca 100644 --- a/erpnext/assets/doctype/asset/asset.json +++ b/erpnext/assets/doctype/asset/asset.json @@ -547,43 +547,8 @@ "fieldname": "purchase_invoice_item", "fieldtype": "Data", "hidden": 1, -<<<<<<< HEAD "label": "Purchase Invoice Item", "options": "Purchase Invoice Item" -======= - "label": "Purchase Invoice Item" - }, - { - "fieldname": "insurance_details_tab", - "fieldtype": "Tab Break", - "label": "Insurance" - }, - { - "fieldname": "other_info_tab", - "fieldtype": "Tab Break", - "label": "Other Info" - }, - { - "fieldname": "connections_tab", - "fieldtype": "Tab Break", - "label": "Connections", - "show_dashboard": 1 - }, - { - "fieldname": "depreciation_tab", - "fieldtype": "Tab Break", - "label": "Depreciation" - }, - { - "fieldname": "accounting_dimensions_section", - "fieldtype": "Section Break", - "label": "Accounting Dimensions" - }, - { - "fieldname": "section_break_jtou", - "fieldtype": "Section Break", - "label": "Additional Info" ->>>>>>> 8af9dcb33e (fix: make purchase_receipt_item and purchase_invoice_item fields of data type) } ], "idx": 72, From 9b8623dd64b5fab284831a137541d30ba98e3911 Mon Sep 17 00:00:00 2001 From: Khushi Rawat <142375893+khushi8112@users.noreply.github.com> Date: Wed, 19 Feb 2025 15:50:53 +0530 Subject: [PATCH 1183/1614] chore: resolved conflicts --- .../v15_0/create_asset_depreciation_schedules_from_assets.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/erpnext/patches/v15_0/create_asset_depreciation_schedules_from_assets.py b/erpnext/patches/v15_0/create_asset_depreciation_schedules_from_assets.py index b049efa2c30..4dc1ad8b6c0 100644 --- a/erpnext/patches/v15_0/create_asset_depreciation_schedules_from_assets.py +++ b/erpnext/patches/v15_0/create_asset_depreciation_schedules_from_assets.py @@ -3,15 +3,12 @@ from frappe.utils import cstr def execute(): -<<<<<<< HEAD frappe.reload_doc("assets", "doctype", "Asset Depreciation Schedule") frappe.reload_doc("assets", "doctype", "Asset Finance Book") frappe.reload_doc("assets", "doctype", "Asset") assets = get_details_of_draft_or_submitted_depreciable_assets() -======= ->>>>>>> 7324dcb7c8 (fix: patch for creating asset depreciation schedule records) asset_finance_books_map = get_asset_finance_books_map() asset_depreciation_schedules_map = get_asset_depreciation_schedules_map() From 6157fed71c0a7b2cbe90cc81cb22f034b7d0a543 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Wed, 19 Feb 2025 15:54:31 +0530 Subject: [PATCH 1184/1614] fix: source warehouse not fetched in bom creator --- .../doctype/bom_creator/bom_creator.py | 5 +++-- .../bom_creator_item/bom_creator_item.json | 9 ++++++++- .../bom_creator_item/bom_creator_item.py | 1 + .../bom_configurator/bom_configurator.bundle.js | 17 +++++++++++++++++ 4 files changed, 29 insertions(+), 3 deletions(-) diff --git a/erpnext/manufacturing/doctype/bom_creator/bom_creator.py b/erpnext/manufacturing/doctype/bom_creator/bom_creator.py index 45ce95b6d58..c4fb6345c93 100644 --- a/erpnext/manufacturing/doctype/bom_creator/bom_creator.py +++ b/erpnext/manufacturing/doctype/bom_creator/bom_creator.py @@ -28,6 +28,8 @@ BOM_ITEM_FIELDS = [ "stock_uom", "conversion_factor", "do_not_explode", + "source_warehouse", + "allow_alternative_item", ] @@ -291,7 +293,6 @@ class BOMCreator(Document): "item": row.item_code, "bom_type": "Production", "quantity": row.qty, - "allow_alternative_item": 1, "bom_creator": self.name, "bom_creator_item": bom_creator_item, } @@ -315,7 +316,6 @@ class BOMCreator(Document): item_args.update( { "bom_no": bom_no, - "allow_alternative_item": 1, "allow_scrap_items": 1, "include_item_in_manufacturing": 1, } @@ -428,6 +428,7 @@ def add_sub_assembly(**kwargs): "do_not_explode": 1, "is_expandable": 1, "stock_uom": item_info.stock_uom, + "allow_alternative_item": kwargs.allow_alternative_item, }, ) diff --git a/erpnext/manufacturing/doctype/bom_creator_item/bom_creator_item.json b/erpnext/manufacturing/doctype/bom_creator_item/bom_creator_item.json index 1726f898751..a6e67b956cf 100644 --- a/erpnext/manufacturing/doctype/bom_creator_item/bom_creator_item.json +++ b/erpnext/manufacturing/doctype/bom_creator_item/bom_creator_item.json @@ -15,6 +15,7 @@ "is_expandable", "sourced_by_supplier", "bom_created", + "allow_alternative_item", "description_section", "description", "quantity_and_rate_section", @@ -225,12 +226,18 @@ "label": "BOM Created", "no_copy": 1, "print_hide": 1 + }, + { + "default": "1", + "fieldname": "allow_alternative_item", + "fieldtype": "Check", + "label": "Allow Alternative Item" } ], "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2024-06-03 18:45:24.339532", + "modified": "2025-02-19 13:25:15.732496", "modified_by": "Administrator", "module": "Manufacturing", "name": "BOM Creator Item", diff --git a/erpnext/manufacturing/doctype/bom_creator_item/bom_creator_item.py b/erpnext/manufacturing/doctype/bom_creator_item/bom_creator_item.py index e172f36224d..fdd3f77ae26 100644 --- a/erpnext/manufacturing/doctype/bom_creator_item/bom_creator_item.py +++ b/erpnext/manufacturing/doctype/bom_creator_item/bom_creator_item.py @@ -14,6 +14,7 @@ class BOMCreatorItem(Document): if TYPE_CHECKING: from frappe.types import DF + allow_alternative_item: DF.Check amount: DF.Currency base_amount: DF.Currency base_rate: DF.Currency diff --git a/erpnext/public/js/bom_configurator/bom_configurator.bundle.js b/erpnext/public/js/bom_configurator/bom_configurator.bundle.js index b1019f67ca9..6d24751792c 100644 --- a/erpnext/public/js/bom_configurator/bom_configurator.bundle.js +++ b/erpnext/public/js/bom_configurator/bom_configurator.bundle.js @@ -210,6 +210,13 @@ class BOMConfigurator { [ { label: __("Item"), fieldname: "item_code", fieldtype: "Link", options: "Item", reqd: 1 }, { label: __("Qty"), fieldname: "qty", default: 1.0, fieldtype: "Float", reqd: 1 }, + { + label: __("Allow Alternative Item"), + fieldname: "allow_alternative_item", + default: 1.0, + fieldtype: "Check", + reqd: 1, + }, ], (data) => { if (!node.data.parent_id) { @@ -224,6 +231,7 @@ class BOMConfigurator { item_code: data.item_code, fg_reference_id: node.data.name || this.frm.doc.name, qty: data.qty, + allow_alternative_item: data.allow_alternative_item, }, callback: (r) => { view.events.load_tree(r, node); @@ -258,6 +266,7 @@ class BOMConfigurator { fg_item: node.data.value, fg_reference_id: node.data.name || this.frm.doc.name, bom_item: bom_item, + allow_alternative_item: bom_item.allow_alternative_item, }, callback: (r) => { view.events.load_tree(r, node); @@ -278,6 +287,14 @@ class BOMConfigurator { reqd: 1, read_only: read_only, }, + { + label: __("Allow Alternative Item"), + fieldname: "allow_alternative_item", + default: 1.0, + fieldtype: "Check", + reqd: 1, + read_only: read_only, + }, { fieldtype: "Column Break" }, { label: __("Qty"), From dd5d144b55c78e6819560da48544ed9888568149 Mon Sep 17 00:00:00 2001 From: Khushi Rawat <142375893+khushi8112@users.noreply.github.com> Date: Wed, 19 Feb 2025 16:00:31 +0530 Subject: [PATCH 1185/1614] fix: remove unused code --- .../create_asset_depreciation_schedules_from_assets.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/erpnext/patches/v15_0/create_asset_depreciation_schedules_from_assets.py b/erpnext/patches/v15_0/create_asset_depreciation_schedules_from_assets.py index 4dc1ad8b6c0..ff77fbb91ec 100644 --- a/erpnext/patches/v15_0/create_asset_depreciation_schedules_from_assets.py +++ b/erpnext/patches/v15_0/create_asset_depreciation_schedules_from_assets.py @@ -3,12 +3,6 @@ from frappe.utils import cstr def execute(): - frappe.reload_doc("assets", "doctype", "Asset Depreciation Schedule") - frappe.reload_doc("assets", "doctype", "Asset Finance Book") - frappe.reload_doc("assets", "doctype", "Asset") - - assets = get_details_of_draft_or_submitted_depreciable_assets() - asset_finance_books_map = get_asset_finance_books_map() asset_depreciation_schedules_map = get_asset_depreciation_schedules_map() From cbec989a7cdf15be0367e8d1b1d52ebeefc928f3 Mon Sep 17 00:00:00 2001 From: Akhil Narang Date: Wed, 19 Feb 2025 12:23:10 +0530 Subject: [PATCH 1186/1614] fix(send_message): escape HTML in the text Signed-off-by: Akhil Narang (cherry picked from commit 448a5db20f2959fd6ce809a8894d32c8345a76fc) --- erpnext/templates/utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/templates/utils.py b/erpnext/templates/utils.py index 57750a56f6f..15af9f0f014 100644 --- a/erpnext/templates/utils.py +++ b/erpnext/templates/utils.py @@ -3,6 +3,7 @@ import frappe +from frappe.utils import escape_html @frappe.whitelist(allow_guest=True) @@ -11,6 +12,8 @@ def send_message(sender, message, subject="Website Query"): website_send_message(sender, message, subject) + message = escape_html(message) + lead = customer = None customer = frappe.db.sql( """select distinct dl.link_name from `tabDynamic Link` dl From 96d44e362de1216d07e91d8d313551a48f0606d4 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Wed, 19 Feb 2025 16:02:39 +0530 Subject: [PATCH 1187/1614] fix: incorrect stock value difference for adjustment entry (cherry picked from commit df83e427a35886b5aa4b1207c0c2bdfcf18693b2) --- erpnext/stock/stock_ledger.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/erpnext/stock/stock_ledger.py b/erpnext/stock/stock_ledger.py index 3dea6010867..ca08a5ef121 100644 --- a/erpnext/stock/stock_ledger.py +++ b/erpnext/stock/stock_ledger.py @@ -883,6 +883,10 @@ class update_entries_after: if not sle.is_adjustment_entry: sle.stock_value_difference = stock_value_difference + elif sle.is_adjustment_entry and not self.args.get("sle_id"): + sle.stock_value_difference = get_stock_value_difference( + sle.item_code, sle.warehouse, sle.posting_date, sle.posting_time, sle.voucher_no + ) sle.doctype = "Stock Ledger Entry" frappe.get_doc(sle).db_update() From 15106b49b6d2101455a9244dcf0837b827f9ca01 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 19 Feb 2025 16:51:09 +0530 Subject: [PATCH 1188/1614] fix: handle division by zero error (backport #45966) (#46015) fix: handle division by zero error (#45966) Co-authored-by: Sanket322 (cherry picked from commit 24394765a6f30d6b394a9ae2f7e065f60fbcb408) Co-authored-by: Sanket Shah <113279972+Sanket322@users.noreply.github.com> --- erpnext/controllers/status_updater.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/controllers/status_updater.py b/erpnext/controllers/status_updater.py index e1cd0a1c340..e1e4c4ce8f2 100644 --- a/erpnext/controllers/status_updater.py +++ b/erpnext/controllers/status_updater.py @@ -5,7 +5,7 @@ import frappe from frappe import _ from frappe.model.document import Document -from frappe.utils import comma_or, flt, get_link_to_form, getdate, now, nowdate +from frappe.utils import comma_or, flt, get_link_to_form, getdate, now, nowdate, safe_div class OverAllowanceError(frappe.ValidationError): @@ -543,7 +543,7 @@ class StatusUpdater(Document): )[0][0] ) - per_billed = (min(ref_doc_qty, billed_qty) / ref_doc_qty) * 100 + per_billed = safe_div(min(ref_doc_qty, billed_qty), ref_doc_qty) * 100 ref_doc = frappe.get_doc(ref_dt, ref_dn) From eead6d46ff8dbb8b76090d9bdbc03f033ecd5fbe Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 19 Feb 2025 16:52:09 +0530 Subject: [PATCH 1189/1614] fix: remove public access to list items (backport #45838) (#46018) fix: remove public access to list items (cherry picked from commit 2bd596ee3d98d418ea74105eb49604df64877b8f) Co-authored-by: CaseSolved --- erpnext/stock/doctype/item/item.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/erpnext/stock/doctype/item/item.json b/erpnext/stock/doctype/item/item.json index 2c56b6a80bc..16ac4fd1017 100644 --- a/erpnext/stock/doctype/item/item.json +++ b/erpnext/stock/doctype/item/item.json @@ -1,6 +1,5 @@ { "actions": [], - "allow_guest_to_view": 1, "allow_import": 1, "allow_rename": 1, "autoname": "field:item_code", @@ -888,10 +887,9 @@ "icon": "fa fa-tag", "idx": 2, "image_field": "image", - "index_web_pages_for_search": 1, "links": [], "make_attachments_public": 1, - "modified": "2024-04-30 13:46:39.098753", + "modified": "2025-02-03 23:43:57.253667", "modified_by": "Administrator", "module": "Stock", "name": "Item", From 16e8a00f452a8fc08b830e064a4d02da038bf144 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Wed, 19 Feb 2025 11:50:41 +0000 Subject: [PATCH 1190/1614] chore(release): Bumped to Version 15.53.0 # [15.53.0](https://github.com/frappe/erpnext/compare/v15.52.0...v15.53.0) (2025-02-19) ### Bug Fixes * add accounting dimensions section in sales order item ([b32e4da](https://github.com/frappe/erpnext/commit/b32e4daf2b2a38e31b7e9213eb05d71217c94269)) * add is_new in if condition ([fc2ec7c](https://github.com/frappe/erpnext/commit/fc2ec7c49577ee443f3196d47a98068d151a7712)) * add validate to allow equity account and party_type shareholder ([bb3eb81](https://github.com/frappe/erpnext/commit/bb3eb8117043ceea1558ea85349511d23bb704b1)) * allow scrap item with zero qty ([abe5384](https://github.com/frappe/erpnext/commit/abe5384449ac151a336f901ac5367e27aa6f484a)) * auto create asset due to message error (backport [#45934](https://github.com/frappe/erpnext/issues/45934)) ([#45952](https://github.com/frappe/erpnext/issues/45952)) ([830edb8](https://github.com/frappe/erpnext/commit/830edb8f524c23f749d80549bf0f92aa27c7ac18)) * check if employee is currently working on another workstation ([22eaa14](https://github.com/frappe/erpnext/commit/22eaa141790814d28baecb7f54758cdaa07d3eb9)) * disable partial payment in pos (backport [#45752](https://github.com/frappe/erpnext/issues/45752)) ([#45945](https://github.com/frappe/erpnext/issues/45945)) ([38edc46](https://github.com/frappe/erpnext/commit/38edc46c46d9d3a46206f68115bebcee7c7218e5)) * do not reschedule depreciation for fully depreciated asset on scrap ([1e7c5ec](https://github.com/frappe/erpnext/commit/1e7c5ec0cb0cda95dabf704eb5b17761d98bab4f)) * fetch child account data for selected parent ([#45904](https://github.com/frappe/erpnext/issues/45904)) ([e36b860](https://github.com/frappe/erpnext/commit/e36b860a799537831d7e4d8be8b18b106f63dc12)) * handle division by zero error (backport [#45966](https://github.com/frappe/erpnext/issues/45966)) ([#46015](https://github.com/frappe/erpnext/issues/46015)) ([15106b4](https://github.com/frappe/erpnext/commit/15106b49b6d2101455a9244dcf0837b827f9ca01)) * include missing payment_gateway parameter in Payment Request URL ([18f9476](https://github.com/frappe/erpnext/commit/18f94765f70a99535a9832784c3f0fb47bc44c16)) * letter head for quality inspection ([c289fef](https://github.com/frappe/erpnext/commit/c289fef3b5f5945506a0b40fe722e518b2836e7a)) * link correct row item of purchase doc ([87f337b](https://github.com/frappe/erpnext/commit/87f337b6053bc20f7c83960a802af27596080552)) * make purchase_receipt_item and purchase_invoice_item fields of data type ([281431e](https://github.com/frappe/erpnext/commit/281431e041090d50ebff43e76b114a2608f6d4bc)) * millisecond issue for posting datetime ([4292365](https://github.com/frappe/erpnext/commit/42923656eea4e69a8a709495bb8579fad6b42db5)) * patch for creating asset depreciation schedule records ([f043b46](https://github.com/frappe/erpnext/commit/f043b466964bad71dcf69aab4a5db04090be40df)) * pos accounting dimension fieldname error (backport [#45899](https://github.com/frappe/erpnext/issues/45899)) ([#45921](https://github.com/frappe/erpnext/issues/45921)) ([e998f06](https://github.com/frappe/erpnext/commit/e998f063a99a4ef8b3f2005a246cc50101fb8e6a)) * **pos profile:** check company while validating mandatory accounting dimension ([#45974](https://github.com/frappe/erpnext/issues/45974)) ([6a57743](https://github.com/frappe/erpnext/commit/6a577438aa93d00160fde18887e7bdc6a58ce3ed)) * pos return validation on v15 ([#45951](https://github.com/frappe/erpnext/issues/45951)) ([dd34bbe](https://github.com/frappe/erpnext/commit/dd34bbe570af6fc5e6c57727ee111f4b51226a3e)) * provision to enable naming series for SABB ([8fbfe14](https://github.com/frappe/erpnext/commit/8fbfe14c633826ea6a944214acf3368c6ff3cfe4)) * **quotation:** fetch exchange rate on currency change ([bd89c19](https://github.com/frappe/erpnext/commit/bd89c19c98fca7e90a22ccde96aa92cba2d29566)) * remove party type from validate ([0d21151](https://github.com/frappe/erpnext/commit/0d2115197e5345b532cdee80dfcb0029acea348e)) * remove public access to list items (backport [#45838](https://github.com/frappe/erpnext/issues/45838)) ([#46018](https://github.com/frappe/erpnext/issues/46018)) ([eead6d4](https://github.com/frappe/erpnext/commit/eead6d46ff8dbb8b76090d9bdbc03f033ecd5fbe)) * remove unused code ([dd5d144](https://github.com/frappe/erpnext/commit/dd5d144b55c78e6819560da48544ed9888568149)) * **report:** add options to multiselectlist fields ([7e85a12](https://github.com/frappe/erpnext/commit/7e85a123b243091eaee83ee59b3bcb21aa69aa76)) * reset location only if there is value in row item location field ([a509568](https://github.com/frappe/erpnext/commit/a50956811079ca6b23e613dc8f5487b515285797)) * resolved conflicts ([84647a1](https://github.com/frappe/erpnext/commit/84647a1c73c9dea83d1706e4a8ec7739414c0f12)) * round sum amount in JE auditing PF ([#45961](https://github.com/frappe/erpnext/issues/45961)) ([44e1ca9](https://github.com/frappe/erpnext/commit/44e1ca9d0549b7401c8945a48fbf15f79867d81b)) * **send_message:** escape HTML in the text ([cbec989](https://github.com/frappe/erpnext/commit/cbec989a7cdf15be0367e8d1b1d52ebeefc928f3)) * serial no status for internal transfer delivery note ([2b80c00](https://github.com/frappe/erpnext/commit/2b80c009b3ec7133736cfbfb0e99af295deac2ff)) * set default value to 0 as per new logic ([1abe1a1](https://github.com/frappe/erpnext/commit/1abe1a1fd50bc6b860ebde52e56be07859fb8436)) * set sco_qty field of PO to non negative ([567fb8a](https://github.com/frappe/erpnext/commit/567fb8abd1de19c1a36735e2e23e7c50a7c65129)) * slow query ([8306d6f](https://github.com/frappe/erpnext/commit/8306d6fdb6a9ab08d0458dd0c77673e372f85da3)) * stock reservation for sales invoice ([1fb5586](https://github.com/frappe/erpnext/commit/1fb5586f569015fc41aca80eb591c8996fedb947)) * stock reservation not working for sales invoice with update stock ([7d871f6](https://github.com/frappe/erpnext/commit/7d871f6bb54bccb4615d414cef82c78ba21c5302)) * tests ([f63a9db](https://github.com/frappe/erpnext/commit/f63a9dbf9b7b5141e945cd372e6bc10a6af45333)) * throw correct exception ([5bccf9f](https://github.com/frappe/erpnext/commit/5bccf9f837e2d5a1e97a2f3d42afd74887a29ba8)) * validate if no matching item found ([6183b38](https://github.com/frappe/erpnext/commit/6183b380890a3a5445ac3277d63ba945efd6738e)) * validate payment request total of partly paid invoice ([c8881a9](https://github.com/frappe/erpnext/commit/c8881a93584f0969134da170b57bd0e9d32eaa70)) ### Features * added ability to use custom html format for process statement of accounts (copy [#45746](https://github.com/frappe/erpnext/issues/45746)) ([#46012](https://github.com/frappe/erpnext/issues/46012)) ([1a4297a](https://github.com/frappe/erpnext/commit/1a4297ac35adcf36055ddc2619dc95ad257acb87)) * added option to enforce free item qty in pricing rule ([8fb9228](https://github.com/frappe/erpnext/commit/8fb9228871cdf27c5acb757297525da22cdf101b)) * disable auto setting grand total to default mode of payment (backport [#45591](https://github.com/frappe/erpnext/issues/45591)) ([#45917](https://github.com/frappe/erpnext/issues/45917)) ([e271a5c](https://github.com/frappe/erpnext/commit/e271a5cba0a969bd54fc57c3e384b7f3c226cecb)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 0d3e27a42e2..19ac3edc6ab 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.52.0" +__version__ = "15.53.0" def get_default_company(user=None): From ec3b281a3b0ff2d92af2accb1b6cd4353c801392 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Thu, 20 Feb 2025 09:05:17 +0530 Subject: [PATCH 1191/1614] fix: inventory dimension for maintence visit (cherry picked from commit cd4ba69262d7f99b54d5744b3b649bf345430175) --- .../doctype/inventory_dimension/inventory_dimension.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/inventory_dimension/inventory_dimension.py b/erpnext/stock/doctype/inventory_dimension/inventory_dimension.py index 524c7331bc7..75366d823a3 100644 --- a/erpnext/stock/doctype/inventory_dimension/inventory_dimension.py +++ b/erpnext/stock/doctype/inventory_dimension/inventory_dimension.py @@ -237,7 +237,12 @@ class InventoryDimension(Document): custom_fields["Stock Ledger Entry"] = dimension_field filter_custom_fields = {} - ignore_doctypes = ["Serial and Batch Bundle", "Serial and Batch Entry", "Pick List Item"] + ignore_doctypes = [ + "Serial and Batch Bundle", + "Serial and Batch Entry", + "Pick List Item", + "Maintenance Visit Purpose", + ] if custom_fields: for doctype, fields in custom_fields.items(): From 1d818e15109477abb5ae8789dba48af4efebc723 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Thu, 20 Feb 2025 09:05:17 +0530 Subject: [PATCH 1192/1614] fix: inventory dimension for maintence visit (cherry picked from commit cd4ba69262d7f99b54d5744b3b649bf345430175) (cherry picked from commit ec3b281a3b0ff2d92af2accb1b6cd4353c801392) --- .../doctype/inventory_dimension/inventory_dimension.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/inventory_dimension/inventory_dimension.py b/erpnext/stock/doctype/inventory_dimension/inventory_dimension.py index 524c7331bc7..75366d823a3 100644 --- a/erpnext/stock/doctype/inventory_dimension/inventory_dimension.py +++ b/erpnext/stock/doctype/inventory_dimension/inventory_dimension.py @@ -237,7 +237,12 @@ class InventoryDimension(Document): custom_fields["Stock Ledger Entry"] = dimension_field filter_custom_fields = {} - ignore_doctypes = ["Serial and Batch Bundle", "Serial and Batch Entry", "Pick List Item"] + ignore_doctypes = [ + "Serial and Batch Bundle", + "Serial and Batch Entry", + "Pick List Item", + "Maintenance Visit Purpose", + ] if custom_fields: for doctype, fields in custom_fields.items(): From 9e824fc4fea15752ad3d5b788899ca54dc13a89c Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Fri, 21 Feb 2025 10:01:58 +0000 Subject: [PATCH 1193/1614] chore(release): Bumped to Version 15.53.1 ## [15.53.1](https://github.com/frappe/erpnext/compare/v15.53.0...v15.53.1) (2025-02-21) ### Bug Fixes * inventory dimension for maintence visit ([1d818e1](https://github.com/frappe/erpnext/commit/1d818e15109477abb5ae8789dba48af4efebc723)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 19ac3edc6ab..5c95b028429 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.53.0" +__version__ = "15.53.1" def get_default_company(user=None): From 0ae2d61974a767d377f685cd485b367f65ab1126 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 21 Feb 2025 17:53:59 +0530 Subject: [PATCH 1194/1614] fix: pos opening entry dialog not saving on change data (backport #46066) (#46067) fix: pos opening entry dialog not saving on change data (#46066) (cherry picked from commit 8e6959dfadec9cddce6e5d4d433b92c86074e0df) Co-authored-by: Diptanil Saha --- erpnext/selling/page/point_of_sale/pos_controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/selling/page/point_of_sale/pos_controller.js b/erpnext/selling/page/point_of_sale/pos_controller.js index 9334786ae86..bfde624f7b3 100644 --- a/erpnext/selling/page/point_of_sale/pos_controller.js +++ b/erpnext/selling/page/point_of_sale/pos_controller.js @@ -40,7 +40,7 @@ erpnext.PointOfSale.Controller = class { in_list_view: 1, label: __("Opening Amount"), options: "company:company_currency", - change: function () { + onchange: function () { dialog.fields_dict.balance_details.df.data.some((d) => { if (d.idx == this.doc.idx) { d.opening_amount = this.value; From 171df3aba512d3e1d9cdb26c456a9e12469066d0 Mon Sep 17 00:00:00 2001 From: Ravibharathi <131471282+ravibharathi656@users.noreply.github.com> Date: Fri, 21 Feb 2025 19:45:21 +0530 Subject: [PATCH 1195/1614] feat: add total weight in shipment (#46049) Co-authored-by: barredterra <14891507+barredterra@users.noreply.github.com> (cherry picked from commit 1ec182430dc61cd45ab3076fb5733a3a0c98d568) # Conflicts: # erpnext/stock/doctype/shipment/shipment.json --- erpnext/stock/doctype/shipment/shipment.json | 11 +++++++++++ erpnext/stock/doctype/shipment/shipment.py | 8 ++++++++ erpnext/stock/doctype/shipment/test_shipment.py | 11 +++++++++++ 3 files changed, 30 insertions(+) diff --git a/erpnext/stock/doctype/shipment/shipment.json b/erpnext/stock/doctype/shipment/shipment.json index 53b549deec1..aaa2515656b 100644 --- a/erpnext/stock/doctype/shipment/shipment.json +++ b/erpnext/stock/doctype/shipment/shipment.json @@ -34,6 +34,7 @@ "shipment_parcel", "parcel_template", "add_template", + "total_weight", "column_break_28", "shipment_delivery_note", "shipment_details_section", @@ -429,11 +430,21 @@ "label": "Pickup Contact Person", "mandatory_depends_on": "eval:doc.pickup_from_type === 'Company'", "options": "User" + }, + { + "fieldname": "total_weight", + "fieldtype": "Float", + "label": "Total Weight (kg)", + "read_only": 1 } ], "is_submittable": 1, "links": [], +<<<<<<< HEAD "modified": "2022-11-17 17:23:27.025802", +======= + "modified": "2025-02-20 16:55:20.076418", +>>>>>>> 1ec182430d (feat: add total weight in shipment (#46049)) "modified_by": "Administrator", "module": "Stock", "name": "Shipment", diff --git a/erpnext/stock/doctype/shipment/shipment.py b/erpnext/stock/doctype/shipment/shipment.py index 346e70e6060..cf9d165fdd3 100644 --- a/erpnext/stock/doctype/shipment/shipment.py +++ b/erpnext/stock/doctype/shipment/shipment.py @@ -65,6 +65,7 @@ class Shipment(Document): shipment_parcel: DF.Table[ShipmentParcel] shipment_type: DF.Literal["Goods", "Documents"] status: DF.Literal["Draft", "Submitted", "Booked", "Cancelled", "Completed"] + total_weight: DF.Float tracking_status: DF.Literal["", "In Progress", "Delivered", "Returned", "Lost"] tracking_status_info: DF.Data | None tracking_url: DF.SmallText | None @@ -75,6 +76,7 @@ class Shipment(Document): self.validate_weight() self.validate_pickup_time() self.set_value_of_goods() + self.set_total_weight() if self.docstatus == 0: self.status = "Draft" @@ -93,6 +95,12 @@ class Shipment(Document): if flt(parcel.weight) <= 0: frappe.throw(_("Parcel weight cannot be 0")) + def set_total_weight(self): + self.total_weight = self.get_total_weight() + + def get_total_weight(self): + return sum(flt(parcel.weight) * parcel.count for parcel in self.shipment_parcel if parcel.count > 0) + def validate_pickup_time(self): if self.pickup_from and self.pickup_to and get_time(self.pickup_to) < get_time(self.pickup_from): frappe.throw(_("Pickup To time should be greater than Pickup From time")) diff --git a/erpnext/stock/doctype/shipment/test_shipment.py b/erpnext/stock/doctype/shipment/test_shipment.py index 4d4eadc339b..1c91a054ebc 100644 --- a/erpnext/stock/doctype/shipment/test_shipment.py +++ b/erpnext/stock/doctype/shipment/test_shipment.py @@ -20,6 +20,17 @@ class TestShipment(FrappeTestCase): self.assertEqual(len(second_shipment.shipment_delivery_note), 1) self.assertEqual(second_shipment.shipment_delivery_note[0].delivery_note, delivery_note.name) + def test_get_total_weight(self): + shipment = frappe.new_doc("Shipment") + shipment.extend( + "shipment_parcel", + [ + {"length": 5, "width": 5, "height": 5, "weight": 5, "count": 5}, + {"length": 5, "width": 5, "height": 5, "weight": 10, "count": 1}, + ], + ) + self.assertEqual(shipment.get_total_weight(), 35) + def create_test_delivery_note(): company = get_shipment_company() From f609012f02c28317dec6a03f986ee25689879312 Mon Sep 17 00:00:00 2001 From: 0xD0M1M0 <76812428+0xD0M1M0@users.noreply.github.com> Date: Fri, 21 Feb 2025 22:21:09 +0100 Subject: [PATCH 1196/1614] fix: discount accounting for v15 --- .../doctype/payment_entry/payment_entry.py | 6 ++- .../payment_entry/test_payment_entry.py | 42 +++++++++++++++++++ 2 files changed, 46 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index 967b12599bf..d1533fe0131 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -3337,13 +3337,14 @@ def add_income_discount_loss(pe, doc, total_discount_percent) -> float: """Add loss on income discount in base currency.""" precision = doc.precision("total") base_loss_on_income = doc.get("base_total") * (total_discount_percent / 100) + positive_negative = -1 if pe.payment_type == "Pay" else 1 pe.append( "deductions", { "account": frappe.get_cached_value("Company", pe.company, "default_discount_account"), "cost_center": pe.cost_center or frappe.get_cached_value("Company", pe.company, "cost_center"), - "amount": flt(base_loss_on_income, precision), + "amount": flt(base_loss_on_income, precision) * positive_negative, }, ) @@ -3355,6 +3356,7 @@ def add_tax_discount_loss(pe, doc, total_discount_percentage) -> float: tax_discount_loss = {} base_total_tax_loss = 0 precision = doc.precision("tax_amount_after_discount_amount", "taxes") + positive_negative = -1 if pe.payment_type == "Pay" else 1 # The same account head could be used more than once for tax in doc.get("taxes", []): @@ -3377,7 +3379,7 @@ def add_tax_discount_loss(pe, doc, total_discount_percentage) -> float: "account": account, "cost_center": pe.cost_center or frappe.get_cached_value("Company", pe.company, "cost_center"), - "amount": flt(loss, precision), + "amount": flt(loss, precision) * positive_negative, }, ) diff --git a/erpnext/accounts/doctype/payment_entry/test_payment_entry.py b/erpnext/accounts/doctype/payment_entry/test_payment_entry.py index 5883d4e2f1f..e43ba85373c 100644 --- a/erpnext/accounts/doctype/payment_entry/test_payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/test_payment_entry.py @@ -282,6 +282,48 @@ class TestPaymentEntry(FrappeTestCase): self.assertEqual(si.payment_schedule[0].paid_amount, 200.0) self.assertEqual(si.payment_schedule[1].paid_amount, 36.0) + def test_payment_entry_against_payment_terms_with_discount_on_pi(self): + pi = make_purchase_invoice(do_not_save=1) + create_payment_terms_template_with_discount() + pi.payment_terms_template = "Test Discount Template" + + frappe.db.set_value("Company", pi.company, "default_discount_account", "Write Off - _TC") + + pi.append( + "taxes", + { + "charge_type": "On Net Total", + "account_head": "_Test Account Service Tax - _TC", + "cost_center": "_Test Cost Center - _TC", + "description": "Service Tax", + "rate": 18, + }, + ) + pi.save() + pi.submit() + + frappe.db.set_single_value("Accounts Settings", "book_tax_discount_loss", 1) + pe_with_tax_loss = get_payment_entry("Purchase Invoice", pi.name, bank_account="_Test Cash - _TC") + + self.assertEqual(pe_with_tax_loss.references[0].payment_term, "30 Credit Days with 10% Discount") + self.assertEqual(pe_with_tax_loss.payment_type, "Pay") + self.assertEqual(pe_with_tax_loss.references[0].allocated_amount, 295.0) + self.assertEqual(pe_with_tax_loss.paid_amount, 265.5) + self.assertEqual(pe_with_tax_loss.difference_amount, 0) + self.assertEqual(pe_with_tax_loss.deductions[0].amount, -25.0) # Loss on Income + self.assertEqual(pe_with_tax_loss.deductions[1].amount, -4.5) # Loss on Tax + self.assertEqual(pe_with_tax_loss.deductions[1].account, "_Test Account Service Tax - _TC") + + frappe.db.set_single_value("Accounts Settings", "book_tax_discount_loss", 0) + pe = get_payment_entry("Purchase Invoice", pi.name, bank_account="_Test Cash - _TC") + + self.assertEqual(pe.references[0].payment_term, "30 Credit Days with 10% Discount") + self.assertEqual(pe.payment_type, "Pay") + self.assertEqual(pe.references[0].allocated_amount, 295.0) + self.assertEqual(pe.paid_amount, 265.5) + self.assertEqual(pe.deductions[0].amount, -29.5) + self.assertEqual(pe.difference_amount, 0) + def test_payment_entry_against_payment_terms_with_discount(self): si = create_sales_invoice(do_not_save=1, qty=1, rate=200) create_payment_terms_template_with_discount() From 20c44878533e830a706a4d5f60a507a62d01038f Mon Sep 17 00:00:00 2001 From: Ninad1306 Date: Mon, 24 Feb 2025 12:42:05 +0530 Subject: [PATCH 1197/1614] fix(report): allow `Closed` purchase orders to be visible (cherry picked from commit 3b2879d3a1e81fd71cc34fa68543411b67ade36a) # Conflicts: # erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.js --- .../purchase_order_analysis.js | 13 ++++++++++++- .../purchase_order_analysis.py | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.js b/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.js index 58657da9168..3fe5bbdcb81 100644 --- a/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.js +++ b/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.js @@ -52,9 +52,20 @@ frappe.query_reports["Purchase Order Analysis"] = { label: __("Status"), fieldtype: "MultiSelectList", width: "80", - options: ["To Pay", "To Bill", "To Receive", "To Receive and Bill", "Completed"], + options: ["To Pay", "To Bill", "To Receive", "To Receive and Bill", "Completed", "Closed"], get_data: function (txt) { +<<<<<<< HEAD let status = ["To Bill", "To Receive", "To Receive and Bill", "Completed"]; +======= + let status = [ + "To Pay", + "To Bill", + "To Receive", + "To Receive and Bill", + "Completed", + "Closed", + ]; +>>>>>>> 3b2879d3a1 (fix(report): allow `Closed` purchase orders to be visible) let options = []; for (let option of status) { options.push({ diff --git a/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.py b/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.py index f583ce3e6c8..3efb9b021a9 100644 --- a/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.py +++ b/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.py @@ -70,7 +70,7 @@ def get_data(filters): po.company, po_item.name, ) - .where((po_item.parent == po.name) & (po.status.notin(("Stopped", "Closed"))) & (po.docstatus == 1)) + .where((po_item.parent == po.name) & (po.status.notin(("Stopped", "On Hold"))) & (po.docstatus == 1)) .groupby(po_item.name) .orderby(po.transaction_date) ) From 8799af974751998909fd0b73d611c39a87228a42 Mon Sep 17 00:00:00 2001 From: Ninad1306 Date: Tue, 25 Feb 2025 15:59:46 +0530 Subject: [PATCH 1198/1614] fix(report): allow `Closed` sales orders to be visible (cherry picked from commit 2394e76e7d6c33bc23d0c9bbb4acf27a47f02a69) # Conflicts: # erpnext/selling/report/sales_order_analysis/sales_order_analysis.js --- .../sales_order_analysis/sales_order_analysis.js | 13 ++++++++++++- .../sales_order_analysis/sales_order_analysis.py | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/erpnext/selling/report/sales_order_analysis/sales_order_analysis.js b/erpnext/selling/report/sales_order_analysis/sales_order_analysis.js index 5866fcbc845..3343c416749 100644 --- a/erpnext/selling/report/sales_order_analysis/sales_order_analysis.js +++ b/erpnext/selling/report/sales_order_analysis/sales_order_analysis.js @@ -53,10 +53,21 @@ frappe.query_reports["Sales Order Analysis"] = { fieldname: "status", label: __("Status"), fieldtype: "MultiSelectList", - options: ["To Pay", "To Bill", "To Deliver", "To Deliver and Bill", "Completed"], + options: ["To Pay", "To Bill", "To Deliver", "To Deliver and Bill", "Completed", "Closed"], width: "80", get_data: function (txt) { +<<<<<<< HEAD let status = ["To Bill", "To Deliver", "To Deliver and Bill", "Completed"]; +======= + let status = [ + "To Pay", + "To Bill", + "To Deliver", + "To Deliver and Bill", + "Completed", + "Closed", + ]; +>>>>>>> 2394e76e7d (fix(report): allow `Closed` sales orders to be visible) let options = []; for (let option of status) { options.push({ diff --git a/erpnext/selling/report/sales_order_analysis/sales_order_analysis.py b/erpnext/selling/report/sales_order_analysis/sales_order_analysis.py index 8fcf29bd7a6..90c33c323ce 100644 --- a/erpnext/selling/report/sales_order_analysis/sales_order_analysis.py +++ b/erpnext/selling/report/sales_order_analysis/sales_order_analysis.py @@ -86,7 +86,7 @@ def get_data(conditions, filters): ON sii.so_detail = soi.name and sii.docstatus = 1 WHERE soi.parent = so.name - and so.status not in ('Stopped', 'Closed', 'On Hold') + and so.status not in ('Stopped', 'On Hold') and so.docstatus = 1 {conditions} GROUP BY soi.name From 2221bf1cba47488ce897124ea92cf31bfaf4f84f Mon Sep 17 00:00:00 2001 From: Ninad1306 Date: Tue, 25 Feb 2025 17:13:09 +0530 Subject: [PATCH 1199/1614] fix(report): filter sales / purchase orders based on date filters (cherry picked from commit 936d7d434234c9e0447eb08a504f3a083db9ab42) --- .../purchase_order_analysis.js | 22 ++++++++++++++----- .../purchase_order_analysis.py | 8 ++++--- .../sales_order_analysis.js | 21 +++++++++++++----- 3 files changed, 37 insertions(+), 14 deletions(-) diff --git a/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.js b/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.js index 3fe5bbdcb81..8d254722a4f 100644 --- a/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.js +++ b/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.js @@ -19,6 +19,10 @@ frappe.query_reports["Purchase Order Analysis"] = { width: "80", reqd: 1, default: frappe.datetime.add_months(frappe.datetime.get_today(), -1), + on_change: (report) => { + report.set_filter_value("name", []); + report.refresh(); + }, }, { fieldname: "to_date", @@ -27,6 +31,10 @@ frappe.query_reports["Purchase Order Analysis"] = { width: "80", reqd: 1, default: frappe.datetime.get_today(), + on_change: (report) => { + report.set_filter_value("name", []); + report.refresh(); + }, }, { fieldname: "project", @@ -38,13 +46,17 @@ frappe.query_reports["Purchase Order Analysis"] = { { fieldname: "name", label: __("Purchase Order"), - fieldtype: "Link", + fieldtype: "MultiSelectList", width: "80", options: "Purchase Order", - get_query: () => { - return { - filters: { docstatus: 1 }, - }; + get_data: function (txt) { + let filters = { docstatus: 1 }; + + const from_date = frappe.query_report.get_filter_value("from_date"); + const to_date = frappe.query_report.get_filter_value("to_date"); + if (from_date && to_date) filters["transaction_date"] = ["between", [from_date, to_date]]; + + return frappe.db.get_link_options("Purchase Order", txt, filters); }, }, { diff --git a/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.py b/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.py index 3efb9b021a9..b6bf1d9f8da 100644 --- a/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.py +++ b/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.py @@ -75,9 +75,11 @@ def get_data(filters): .orderby(po.transaction_date) ) - for field in ("company", "name"): - if filters.get(field): - query = query.where(po[field] == filters.get(field)) + if filters.get("company"): + query = query.where(po.company == filters.get("company")) + + if filters.get("name"): + query = query.where(po.name.isin(filters.get("name"))) if filters.get("from_date") and filters.get("to_date"): query = query.where(po.transaction_date.between(filters.get("from_date"), filters.get("to_date"))) diff --git a/erpnext/selling/report/sales_order_analysis/sales_order_analysis.js b/erpnext/selling/report/sales_order_analysis/sales_order_analysis.js index 3343c416749..e470672b3a5 100644 --- a/erpnext/selling/report/sales_order_analysis/sales_order_analysis.js +++ b/erpnext/selling/report/sales_order_analysis/sales_order_analysis.js @@ -19,6 +19,10 @@ frappe.query_reports["Sales Order Analysis"] = { width: "80", reqd: 1, default: frappe.datetime.add_months(frappe.datetime.get_today(), -1), + on_change: (report) => { + report.set_filter_value("sales_order", []); + report.refresh(); + }, }, { fieldname: "to_date", @@ -27,6 +31,10 @@ frappe.query_reports["Sales Order Analysis"] = { width: "80", reqd: 1, default: frappe.datetime.get_today(), + on_change: (report) => { + report.set_filter_value("sales_order", []); + report.refresh(); + }, }, { fieldname: "sales_order", @@ -35,12 +43,13 @@ frappe.query_reports["Sales Order Analysis"] = { width: "80", options: "Sales Order", get_data: function (txt) { - return frappe.db.get_link_options("Sales Order", txt); - }, - get_query: () => { - return { - filters: { docstatus: 1 }, - }; + let filters = { docstatus: 1 }; + + const from_date = frappe.query_report.get_filter_value("from_date"); + const to_date = frappe.query_report.get_filter_value("to_date"); + if (from_date && to_date) filters["transaction_date"] = ["between", [from_date, to_date]]; + + return frappe.db.get_link_options("Sales Order", txt, filters); }, }, { From b3c1df8561985988b43e1f08c17543c3a0e85d16 Mon Sep 17 00:00:00 2001 From: venkat102 Date: Thu, 13 Feb 2025 23:05:34 +0530 Subject: [PATCH 1200/1614] fix(project settings): add checkbox to auto fetch timesheet in sales invoice (cherry picked from commit 876082ea2ffba15a631ed9ff484a38bbbe79dc14) # Conflicts: # erpnext/projects/doctype/projects_settings/projects_settings.json --- .../projects_settings/projects_settings.json | 38 +++++++++++++++++++ .../projects_settings/projects_settings.py | 1 + 2 files changed, 39 insertions(+) diff --git a/erpnext/projects/doctype/projects_settings/projects_settings.json b/erpnext/projects/doctype/projects_settings/projects_settings.json index 7fa1558a76f..2b8a03bb055 100644 --- a/erpnext/projects/doctype/projects_settings/projects_settings.json +++ b/erpnext/projects/doctype/projects_settings/projects_settings.json @@ -1,4 +1,5 @@ { +<<<<<<< HEAD "allow_copy": 0, "allow_guest_to_view": 0, "allow_import": 0, @@ -11,6 +12,20 @@ "document_type": "", "editable_grid": 1, "engine": "InnoDB", +======= + "actions": [], + "creation": "2018-02-21 16:42:13.882879", + "doctype": "DocType", + "editable_grid": 1, + "engine": "InnoDB", + "field_order": [ + "timesheet_sb", + "ignore_workstation_time_overlap", + "ignore_user_time_overlap", + "ignore_employee_time_overlap", + "fetch_timesheet_in_sales_invoice" + ], +>>>>>>> 876082ea2f (fix(project settings): add checkbox to auto fetch timesheet in sales invoice) "fields": [ { "allow_bulk_edit": 0, @@ -108,6 +123,7 @@ "unique": 0 }, { +<<<<<<< HEAD "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, @@ -156,6 +172,28 @@ "name": "Projects Settings", "name_case": "", "owner": "Administrator", +======= + "default": "0", + "fieldname": "ignore_employee_time_overlap", + "fieldtype": "Check", + "label": "Ignore Employee Time Overlap" + }, + { + "default": "0", + "description": "Enabling the check box will fetch timesheet on select of a Project in Sales Invoice", + "fieldname": "fetch_timesheet_in_sales_invoice", + "fieldtype": "Check", + "label": "Fetch Timesheet in Sales Invoice" + } + ], + "issingle": 1, + "links": [], + "modified": "2025-02-13 23:01:27.321902", + "modified_by": "Administrator", + "module": "Projects", + "name": "Projects Settings", + "owner": "Administrator", +>>>>>>> 876082ea2f (fix(project settings): add checkbox to auto fetch timesheet in sales invoice) "permissions": [ { "amend": 0, diff --git a/erpnext/projects/doctype/projects_settings/projects_settings.py b/erpnext/projects/doctype/projects_settings/projects_settings.py index 9d940184d98..4b1530fee8e 100644 --- a/erpnext/projects/doctype/projects_settings/projects_settings.py +++ b/erpnext/projects/doctype/projects_settings/projects_settings.py @@ -14,6 +14,7 @@ class ProjectsSettings(Document): if TYPE_CHECKING: from frappe.types import DF + fetch_timesheet_in_sales_invoice: DF.Check ignore_employee_time_overlap: DF.Check ignore_user_time_overlap: DF.Check ignore_workstation_time_overlap: DF.Check From b1095bb91ba1d352792bec7f7d81810d41f9ef9f Mon Sep 17 00:00:00 2001 From: venkat102 Date: Thu, 13 Feb 2025 23:07:45 +0530 Subject: [PATCH 1201/1614] fix(sales invoice): check fetch_timesheet_in_sales_invoice enabled before fetching the timesheet (cherry picked from commit 914ad357fd4172e4f34c0b61ace65f04a1430ffb) # Conflicts: # erpnext/accounts/doctype/sales_invoice/sales_invoice.py --- erpnext/accounts/doctype/sales_invoice/sales_invoice.js | 8 ++++++-- erpnext/accounts/doctype/sales_invoice/sales_invoice.py | 8 ++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js index a074c9b1c0a..36351bb3d12 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js @@ -897,8 +897,12 @@ frappe.ui.form.on("Sales Invoice", { project: function (frm) { if (frm.doc.project) { - frm.events.add_timesheet_data(frm, { - project: frm.doc.project, + frappe.db.get_value("Projects Settings", {}, "fetch_timesheet_in_sales_invoice", (r) => { + if (r.fetch_timesheet_in_sales_invoice) { + frm.events.add_timesheet_data(frm, { + project: frm.doc.project, + }); + } }); } }, diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 7345a5ef78d..49bdd34bb43 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -1090,7 +1090,15 @@ class SalesInvoice(SellingController): timesheet.billing_amount = ts_doc.total_billable_amount def update_timesheet_billing_for_project(self): +<<<<<<< HEAD if not self.timesheets and self.project: +======= + if ( + not self.timesheets + and self.project + and frappe.db.get_single_value("Projects Settings", "fetch_timesheet_in_sales_invoice") + ): +>>>>>>> 914ad357fd (fix(sales invoice): check fetch_timesheet_in_sales_invoice enabled before fetching the timesheet) self.add_timesheet_data() else: self.calculate_billing_amount_for_timesheet() From 97d3e8648b4b8027e4981fe14089742aadb6f495 Mon Sep 17 00:00:00 2001 From: venkat102 Date: Thu, 13 Feb 2025 23:24:05 +0530 Subject: [PATCH 1202/1614] fix: check value as int (cherry picked from commit 43b13b91be8649addd9339de1b2257dd530e1f2f) --- erpnext/accounts/doctype/sales_invoice/sales_invoice.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js index 36351bb3d12..d1c295eaf5f 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js @@ -898,7 +898,7 @@ frappe.ui.form.on("Sales Invoice", { project: function (frm) { if (frm.doc.project) { frappe.db.get_value("Projects Settings", {}, "fetch_timesheet_in_sales_invoice", (r) => { - if (r.fetch_timesheet_in_sales_invoice) { + if (cint(r.fetch_timesheet_in_sales_invoice)) { frm.events.add_timesheet_data(frm, { project: frm.doc.project, }); From feb64cb9b5e28ba2c8471fee975e42cff37d0acf Mon Sep 17 00:00:00 2001 From: venkat102 Date: Mon, 17 Feb 2025 14:49:32 +0530 Subject: [PATCH 1203/1614] fix: enable fetch_timesheet_in_sales_invoice in test (cherry picked from commit 5880f1d5c6b542328c288fdb2ad27bf251c0a6fe) # Conflicts: # erpnext/projects/doctype/timesheet/test_timesheet.py --- erpnext/projects/doctype/timesheet/test_timesheet.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/erpnext/projects/doctype/timesheet/test_timesheet.py b/erpnext/projects/doctype/timesheet/test_timesheet.py index da042f36aef..85b4e9349c2 100644 --- a/erpnext/projects/doctype/timesheet/test_timesheet.py +++ b/erpnext/projects/doctype/timesheet/test_timesheet.py @@ -53,6 +53,7 @@ class TestTimesheet(unittest.TestCase): self.assertEqual(item.qty, 2.00) self.assertEqual(item.rate, 50.00) + @IntegrationTestCase.change_settings("Projects Settings", {"fetch_timesheet_in_sales_invoice": 1}) def test_timesheet_billing_based_on_project(self): emp = make_employee("test_employee_6@salary.com") project = frappe.get_value("Project", {"project_name": "_Test Project"}) @@ -62,6 +63,10 @@ class TestTimesheet(unittest.TestCase): ) sales_invoice = create_sales_invoice(do_not_save=True) sales_invoice.project = project +<<<<<<< HEAD +======= + sales_invoice.add_timesheet_data() +>>>>>>> 5880f1d5c6 (fix: enable fetch_timesheet_in_sales_invoice in test) sales_invoice.submit() ts = frappe.get_doc("Timesheet", timesheet.name) From feec16b682925b541a003f83f0f02b7767d7aa74 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 25 Feb 2025 22:53:14 +0530 Subject: [PATCH 1204/1614] chore: resolve conflicts --- .../doctype/sales_invoice/sales_invoice.py | 4 - .../projects_settings/projects_settings.json | 214 +++--------------- .../doctype/timesheet/test_timesheet.py | 6 +- 3 files changed, 30 insertions(+), 194 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 49bdd34bb43..3c0689a7da9 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -1090,15 +1090,11 @@ class SalesInvoice(SellingController): timesheet.billing_amount = ts_doc.total_billable_amount def update_timesheet_billing_for_project(self): -<<<<<<< HEAD - if not self.timesheets and self.project: -======= if ( not self.timesheets and self.project and frappe.db.get_single_value("Projects Settings", "fetch_timesheet_in_sales_invoice") ): ->>>>>>> 914ad357fd (fix(sales invoice): check fetch_timesheet_in_sales_invoice enabled before fetching the timesheet) self.add_timesheet_data() else: self.calculate_billing_amount_for_timesheet() diff --git a/erpnext/projects/doctype/projects_settings/projects_settings.json b/erpnext/projects/doctype/projects_settings/projects_settings.json index 2b8a03bb055..2a840b4275c 100644 --- a/erpnext/projects/doctype/projects_settings/projects_settings.json +++ b/erpnext/projects/doctype/projects_settings/projects_settings.json @@ -1,18 +1,4 @@ { -<<<<<<< HEAD - "allow_copy": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "beta": 0, - "creation": "2018-02-21 16:42:13.882879", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 1, - "engine": "InnoDB", -======= "actions": [], "creation": "2018-02-21 16:42:13.882879", "doctype": "DocType", @@ -25,154 +11,25 @@ "ignore_employee_time_overlap", "fetch_timesheet_in_sales_invoice" ], ->>>>>>> 876082ea2f (fix(project settings): add checkbox to auto fetch timesheet in sales invoice) "fields": [ { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "timesheet_sb", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Timesheets", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, + "fieldname": "timesheet_sb", + "fieldtype": "Section Break", + "label": "Timesheets" + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "0", - "fieldname": "ignore_workstation_time_overlap", - "fieldtype": "Check", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Ignore Workstation Time Overlap", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, + "default": "0", + "fieldname": "ignore_workstation_time_overlap", + "fieldtype": "Check", + "label": "Ignore Workstation Time Overlap" + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "0", - "fieldname": "ignore_user_time_overlap", - "fieldtype": "Check", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Ignore User Time Overlap", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, + "default": "0", + "fieldname": "ignore_user_time_overlap", + "fieldtype": "Check", + "label": "Ignore User Time Overlap" + }, { -<<<<<<< HEAD - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "0", - "fieldname": "ignore_employee_time_overlap", - "fieldtype": "Check", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Ignore Employee Time Overlap", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 1, - "istable": 0, - "max_attachments": 0, - "modified": "2018-02-21 16:42:42.357209", - "modified_by": "Administrator", - "module": "Projects", - "name": "Projects Settings", - "name_case": "", - "owner": "Administrator", -======= "default": "0", "fieldname": "ignore_employee_time_overlap", "fieldtype": "Check", @@ -180,7 +37,6 @@ }, { "default": "0", - "description": "Enabling the check box will fetch timesheet on select of a Project in Sales Invoice", "fieldname": "fetch_timesheet_in_sales_invoice", "fieldtype": "Check", "label": "Fetch Timesheet in Sales Invoice" @@ -188,40 +44,26 @@ ], "issingle": 1, "links": [], - "modified": "2025-02-13 23:01:27.321902", + "modified": "2025-02-25 22:48:03.164862", "modified_by": "Administrator", "module": "Projects", "name": "Projects Settings", "owner": "Administrator", ->>>>>>> 876082ea2f (fix(project settings): add checkbox to auto fetch timesheet in sales invoice) "permissions": [ { - "amend": 0, - "apply_user_permissions": 0, - "cancel": 0, - "create": 1, - "delete": 1, - "email": 1, - "export": 0, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 0, - "role": "System Manager", - "set_user_permissions": 0, - "share": 1, - "submit": 0, + "create": 1, + "delete": 1, + "email": 1, + "print": 1, + "read": 1, + "role": "System Manager", + "share": 1, "write": 1 } - ], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "show_name_in_global_search": 0, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 1, - "track_seen": 0 + ], + "quick_entry": 1, + "sort_field": "modified", + "sort_order": "DESC", + "states": [], + "track_changes": 1 } \ No newline at end of file diff --git a/erpnext/projects/doctype/timesheet/test_timesheet.py b/erpnext/projects/doctype/timesheet/test_timesheet.py index 85b4e9349c2..1e2688daf4d 100644 --- a/erpnext/projects/doctype/timesheet/test_timesheet.py +++ b/erpnext/projects/doctype/timesheet/test_timesheet.py @@ -5,6 +5,7 @@ import datetime import unittest import frappe +from frappe.tests.utils import change_settings from frappe.utils import add_to_date, now_datetime, nowdate from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice @@ -53,7 +54,7 @@ class TestTimesheet(unittest.TestCase): self.assertEqual(item.qty, 2.00) self.assertEqual(item.rate, 50.00) - @IntegrationTestCase.change_settings("Projects Settings", {"fetch_timesheet_in_sales_invoice": 1}) + @change_settings("Projects Settings", {"fetch_timesheet_in_sales_invoice": 1}) def test_timesheet_billing_based_on_project(self): emp = make_employee("test_employee_6@salary.com") project = frappe.get_value("Project", {"project_name": "_Test Project"}) @@ -63,10 +64,7 @@ class TestTimesheet(unittest.TestCase): ) sales_invoice = create_sales_invoice(do_not_save=True) sales_invoice.project = project -<<<<<<< HEAD -======= sales_invoice.add_timesheet_data() ->>>>>>> 5880f1d5c6 (fix: enable fetch_timesheet_in_sales_invoice in test) sales_invoice.submit() ts = frappe.get_doc("Timesheet", timesheet.name) From c72dab49f4079c7bcf353b6db605247a0d83fd5f Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Sun, 23 Feb 2025 22:04:52 +0530 Subject: [PATCH 1205/1614] fix: valuation rate for batch (cherry picked from commit b88305a95f78ae6a02895dc289f2c9c9791c3651) --- erpnext/stock/deprecated_serial_batch.py | 2 ++ erpnext/stock/doctype/bin/bin.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/erpnext/stock/deprecated_serial_batch.py b/erpnext/stock/deprecated_serial_batch.py index 5ab862b51b3..f946f459c07 100644 --- a/erpnext/stock/deprecated_serial_batch.py +++ b/erpnext/stock/deprecated_serial_batch.py @@ -332,6 +332,8 @@ class DeprecatedBatchNoValuation: if self.sle.voucher_detail_no: query = query.where(sabb.voucher_detail_no != self.sle.voucher_detail_no) + query = query.where(sabb.voucher_type != "Pick List") + data = query.run(as_dict=True) if not data: return {} diff --git a/erpnext/stock/doctype/bin/bin.py b/erpnext/stock/doctype/bin/bin.py index db5d1e58a84..d3de1897633 100644 --- a/erpnext/stock/doctype/bin/bin.py +++ b/erpnext/stock/doctype/bin/bin.py @@ -247,7 +247,7 @@ def update_qty(bin_name, args): & (sle.warehouse == args.get("warehouse")) & (sle.is_cancelled == 0) ) - .orderby(CombineDatetime(sle.posting_date, sle.posting_time), order=Order.desc) + .orderby(sle.posting_datetime, order=Order.desc) .orderby(sle.creation, order=Order.desc) .limit(1) .run() From b8281c34e2108753f75eacdf2a4322dd873e98ac Mon Sep 17 00:00:00 2001 From: venkat102 Date: Wed, 26 Feb 2025 11:01:40 +0530 Subject: [PATCH 1206/1614] fix: no permission to get project settings in sales invoice (cherry picked from commit 221f1468cb3644078523489e65b0fe7eaaf62253) --- .../doctype/sales_invoice/sales_invoice.js | 16 ++++++++++------ .../doctype/sales_invoice/sales_invoice.py | 10 +++++----- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js index d1c295eaf5f..ed7eb5685c1 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js @@ -897,12 +897,16 @@ frappe.ui.form.on("Sales Invoice", { project: function (frm) { if (frm.doc.project) { - frappe.db.get_value("Projects Settings", {}, "fetch_timesheet_in_sales_invoice", (r) => { - if (cint(r.fetch_timesheet_in_sales_invoice)) { - frm.events.add_timesheet_data(frm, { - project: frm.doc.project, - }); - } + frappe.call({ + method: "is_auto_fetch_timesheet_enabled", + doc: frm.doc, + callback: function (r) { + if (cint(r.message)) { + frm.events.add_timesheet_data(frm, { + project: frm.doc.project, + }); + } + }, }); } }, diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 3c0689a7da9..c860fe41a66 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -1090,15 +1090,15 @@ class SalesInvoice(SellingController): timesheet.billing_amount = ts_doc.total_billable_amount def update_timesheet_billing_for_project(self): - if ( - not self.timesheets - and self.project - and frappe.db.get_single_value("Projects Settings", "fetch_timesheet_in_sales_invoice") - ): + if not self.timesheets and self.project and self.is_auto_fetch_timesheet_enabled(): self.add_timesheet_data() else: self.calculate_billing_amount_for_timesheet() + @frappe.whitelist() + def is_auto_fetch_timesheet_enabled(self): + return frappe.db.get_single_value("Projects Settings", "fetch_timesheet_in_sales_invoice") + @frappe.whitelist() def add_timesheet_data(self): self.set("timesheets", []) From d9c1b58fc34415106e5957ded292c8c3963719c5 Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Wed, 26 Feb 2025 12:58:53 +0000 Subject: [PATCH 1207/1614] chore(release): Bumped to Version 15.53.2 ## [15.53.2](https://github.com/frappe/erpnext/compare/v15.53.1...v15.53.2) (2025-02-26) ### Bug Fixes * check value as int ([97d3e86](https://github.com/frappe/erpnext/commit/97d3e8648b4b8027e4981fe14089742aadb6f495)) * enable fetch_timesheet_in_sales_invoice in test ([feb64cb](https://github.com/frappe/erpnext/commit/feb64cb9b5e28ba2c8471fee975e42cff37d0acf)) * incorrect stock value difference for adjustment entry ([96d44e3](https://github.com/frappe/erpnext/commit/96d44e362de1216d07e91d8d313551a48f0606d4)) * inventory dimension for maintence visit ([ec3b281](https://github.com/frappe/erpnext/commit/ec3b281a3b0ff2d92af2accb1b6cd4353c801392)) * no permission to get project settings in sales invoice ([b8281c3](https://github.com/frappe/erpnext/commit/b8281c34e2108753f75eacdf2a4322dd873e98ac)) * pos opening entry dialog not saving on change data (backport [#46066](https://github.com/frappe/erpnext/issues/46066)) ([#46067](https://github.com/frappe/erpnext/issues/46067)) ([0ae2d61](https://github.com/frappe/erpnext/commit/0ae2d61974a767d377f685cd485b367f65ab1126)) * **project settings:** add checkbox to auto fetch timesheet in sales invoice ([b3c1df8](https://github.com/frappe/erpnext/commit/b3c1df8561985988b43e1f08c17543c3a0e85d16)) * **sales invoice:** check fetch_timesheet_in_sales_invoice enabled before fetching the timesheet ([b1095bb](https://github.com/frappe/erpnext/commit/b1095bb91ba1d352792bec7f7d81810d41f9ef9f)) * valuation rate for batch ([c72dab4](https://github.com/frappe/erpnext/commit/c72dab49f4079c7bcf353b6db605247a0d83fd5f)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 5c95b028429..563ea0fc1d7 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.53.1" +__version__ = "15.53.2" def get_default_company(user=None): From 3fb9033fb70839bcd33e9e198ac3123501be277e Mon Sep 17 00:00:00 2001 From: vishakhdesai Date: Thu, 27 Feb 2025 18:18:49 +0530 Subject: [PATCH 1208/1614] fix: payment entry exchange gain loss issue (cherry picked from commit 2dbef23244ed40871561489dccbe78e5d795affe) --- erpnext/accounts/doctype/payment_entry/payment_entry.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.js b/erpnext/accounts/doctype/payment_entry/payment_entry.js index 55fab670fd8..2e13c932de4 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.js +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.js @@ -258,6 +258,10 @@ frappe.ui.form.on("Payment Entry", { frappe.flags.allocate_payment_amount = true; }, + validate: async function (frm) { + await frm.events.set_exchange_gain_loss_deduction(frm); + }, + validate_company: (frm) => { if (!frm.doc.company) { frappe.throw({ message: __("Please select a Company first."), title: __("Mandatory") }); @@ -1893,8 +1897,6 @@ function prompt_for_missing_account(frm, account) { (values) => resolve(values?.[account]), __("Please Specify Account") ); - - dialog.on_hide = () => resolve(""); }); } From a94292a69fb9672d2ec68762fadcc3aff99bf613 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Fri, 28 Feb 2025 09:48:11 +0530 Subject: [PATCH 1209/1614] fix: removed mandatory property for the cost center field (cherry picked from commit 079cf772aaf519eb6b16abef16a6d0f85187988b) --- erpnext/selling/doctype/sales_order_item/sales_order_item.json | 3 +-- erpnext/selling/doctype/sales_order_item/sales_order_item.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/erpnext/selling/doctype/sales_order_item/sales_order_item.json b/erpnext/selling/doctype/sales_order_item/sales_order_item.json index 500a7657176..ea1a646ba2d 100644 --- a/erpnext/selling/doctype/sales_order_item/sales_order_item.json +++ b/erpnext/selling/doctype/sales_order_item/sales_order_item.json @@ -946,7 +946,6 @@ "options": "Cost Center", "print_hide": 1, "print_width": "120px", - "reqd": 1, "width": "120px" }, { @@ -965,7 +964,7 @@ "idx": 1, "istable": 1, "links": [], - "modified": "2025-02-06 13:29:24.619850", + "modified": "2025-02-28 09:45:43.934947", "modified_by": "Administrator", "module": "Selling", "name": "Sales Order Item", diff --git a/erpnext/selling/doctype/sales_order_item/sales_order_item.py b/erpnext/selling/doctype/sales_order_item/sales_order_item.py index 7f2a37b1616..2fa06ac7299 100644 --- a/erpnext/selling/doctype/sales_order_item/sales_order_item.py +++ b/erpnext/selling/doctype/sales_order_item/sales_order_item.py @@ -32,7 +32,7 @@ class SalesOrderItem(Document): brand: DF.Link | None company_total_stock: DF.Float conversion_factor: DF.Float - cost_center: DF.Link + cost_center: DF.Link | None customer_item_code: DF.Data | None delivered_by_supplier: DF.Check delivered_qty: DF.Float From 0f263bcff286017065b776bdafb27325a0719596 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 28 Feb 2025 15:43:59 +0530 Subject: [PATCH 1210/1614] fix: pos item selection using serial no (backport #46200) (#46203) fix: pos item selection using serial no (#46200) (cherry picked from commit 8fb09decd269ddb01ed45dd68eb557b14e2f7acf) Co-authored-by: Diptanil Saha --- erpnext/selling/page/point_of_sale/pos_controller.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/erpnext/selling/page/point_of_sale/pos_controller.js b/erpnext/selling/page/point_of_sale/pos_controller.js index bfde624f7b3..e7208c41dde 100644 --- a/erpnext/selling/page/point_of_sale/pos_controller.js +++ b/erpnext/selling/page/point_of_sale/pos_controller.js @@ -605,6 +605,14 @@ erpnext.PointOfSale.Controller = class { if (this.is_current_item_being_edited(item_row) || from_selector) { await frappe.model.set_value(item_row.doctype, item_row.name, field, value); + if (item.serial_no && from_selector) { + await frappe.model.set_value( + item_row.doctype, + item_row.name, + "serial_no", + item_row.serial_no + `\n${item.serial_no}` + ); + } this.update_cart_html(item_row); } } else { From 8eddc09bbac1197843faccb9efef986e8170c04e Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Fri, 28 Feb 2025 09:48:11 +0530 Subject: [PATCH 1211/1614] fix: removed mandatory property for the cost center field (cherry picked from commit 079cf772aaf519eb6b16abef16a6d0f85187988b) --- erpnext/selling/doctype/sales_order_item/sales_order_item.json | 3 +-- erpnext/selling/doctype/sales_order_item/sales_order_item.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/erpnext/selling/doctype/sales_order_item/sales_order_item.json b/erpnext/selling/doctype/sales_order_item/sales_order_item.json index 500a7657176..ea1a646ba2d 100644 --- a/erpnext/selling/doctype/sales_order_item/sales_order_item.json +++ b/erpnext/selling/doctype/sales_order_item/sales_order_item.json @@ -946,7 +946,6 @@ "options": "Cost Center", "print_hide": 1, "print_width": "120px", - "reqd": 1, "width": "120px" }, { @@ -965,7 +964,7 @@ "idx": 1, "istable": 1, "links": [], - "modified": "2025-02-06 13:29:24.619850", + "modified": "2025-02-28 09:45:43.934947", "modified_by": "Administrator", "module": "Selling", "name": "Sales Order Item", diff --git a/erpnext/selling/doctype/sales_order_item/sales_order_item.py b/erpnext/selling/doctype/sales_order_item/sales_order_item.py index 7f2a37b1616..2fa06ac7299 100644 --- a/erpnext/selling/doctype/sales_order_item/sales_order_item.py +++ b/erpnext/selling/doctype/sales_order_item/sales_order_item.py @@ -32,7 +32,7 @@ class SalesOrderItem(Document): brand: DF.Link | None company_total_stock: DF.Float conversion_factor: DF.Float - cost_center: DF.Link + cost_center: DF.Link | None customer_item_code: DF.Data | None delivered_by_supplier: DF.Check delivered_qty: DF.Float From de0dfbca9afaec9152462cd1f06d63d449f8fbae Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 28 Feb 2025 23:24:49 +0530 Subject: [PATCH 1212/1614] fix: pos item detail serial no field (backport #46211) (#46212) fix: pos item detail serial no field (#46211) (cherry picked from commit d2fad44e894b4bbbd1033d105e7e8d0c3b94c09c) Co-authored-by: Diptanil Saha --- .../selling/page/point_of_sale/pos_item_details.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/erpnext/selling/page/point_of_sale/pos_item_details.js b/erpnext/selling/page/point_of_sale/pos_item_details.js index 333b50810c9..e0abdd4f4c3 100644 --- a/erpnext/selling/page/point_of_sale/pos_item_details.js +++ b/erpnext/selling/page/point_of_sale/pos_item_details.js @@ -187,6 +187,7 @@ erpnext.PointOfSale.ItemDetails = class { this[`${fieldname}_control`].set_value(item[fieldname]); }); + this.resize_serial_control(item); this.make_auto_serial_selection_btn(item); this.bind_custom_control_change_event(); @@ -203,11 +204,17 @@ erpnext.PointOfSale.ItemDetails = class { "actual_qty", "price_list_rate", ]; - if (item.has_serial_no) fields.push("serial_no"); - if (item.has_batch_no) fields.push("batch_no"); + if (item.has_serial_no || item.serial_no) fields.push("serial_no"); + if (item.has_batch_no || item.batch_no) fields.push("batch_no"); return fields; } + resize_serial_control(item) { + if (item.has_serial_no || item.serial_no) { + this.$form_container.find(".serial_no-control").find("textarea").css("height", "6rem"); + } + } + make_auto_serial_selection_btn(item) { if (item.has_serial_no || item.has_batch_no) { if (item.has_serial_no && item.has_batch_no) { @@ -225,7 +232,6 @@ erpnext.PointOfSale.ItemDetails = class { `
${label}
` ); } - this.$form_container.find(".serial_no-control").find("textarea").css("height", "6rem"); } } From 87703c6511130a9d7885815b3ff3797b2cbb8e9a Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Fri, 28 Feb 2025 15:30:42 +0530 Subject: [PATCH 1213/1614] fix: rearrange stock settings fields (cherry picked from commit 93f461c6f34135a63de10f1068ca216898214645) # Conflicts: # erpnext/stock/doctype/stock_settings/stock_settings.json --- .../stock_settings/stock_settings.json | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/erpnext/stock/doctype/stock_settings/stock_settings.json b/erpnext/stock/doctype/stock_settings/stock_settings.json index 22a24d1bfa1..282539c9d90 100644 --- a/erpnext/stock/doctype/stock_settings/stock_settings.json +++ b/erpnext/stock/doctype/stock_settings/stock_settings.json @@ -46,18 +46,20 @@ "auto_reserve_serial_and_batch", "serial_and_batch_item_settings_tab", "section_break_7", + "allow_existing_serial_no", "do_not_use_batchwise_valuation", "auto_create_serial_and_batch_bundle_for_outward", "pick_serial_and_batch_based_on", - "naming_series_prefix", "column_break_mhzc", "disable_serial_no_and_batch_selector", - "use_naming_series", "use_serial_batch_fields", "do_not_update_serial_batch_on_creation_of_auto_bundle", - "allow_existing_serial_no", "serial_and_batch_bundle_section", "set_serial_and_batch_bundle_naming_based_on_naming_series", + "section_break_gnhq", + "use_naming_series", + "column_break_wslv", + "naming_series_prefix", "stock_planning_tab", "auto_material_request", "auto_indent", @@ -480,6 +482,14 @@ "fieldname": "set_serial_and_batch_bundle_naming_based_on_naming_series", "fieldtype": "Check", "label": "Set Serial and Batch Bundle Naming Based on Naming Series" + }, + { + "fieldname": "section_break_gnhq", + "fieldtype": "Section Break" + }, + { + "fieldname": "column_break_wslv", + "fieldtype": "Column Break" } ], "icon": "icon-cog", @@ -487,7 +497,11 @@ "index_web_pages_for_search": 1, "issingle": 1, "links": [], +<<<<<<< HEAD "modified": "2025-02-17 14:36:36.177743", +======= + "modified": "2025-02-28 15:08:35.938840", +>>>>>>> 93f461c6f3 (fix: rearrange stock settings fields) "modified_by": "Administrator", "module": "Stock", "name": "Stock Settings", From 93fed0ce86b91c97e25dfd0685b657b47029290b Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Sat, 1 Mar 2025 12:53:44 +0530 Subject: [PATCH 1214/1614] chore: fix conflicts --- erpnext/stock/doctype/stock_settings/stock_settings.json | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/erpnext/stock/doctype/stock_settings/stock_settings.json b/erpnext/stock/doctype/stock_settings/stock_settings.json index 282539c9d90..1987bc8642d 100644 --- a/erpnext/stock/doctype/stock_settings/stock_settings.json +++ b/erpnext/stock/doctype/stock_settings/stock_settings.json @@ -497,11 +497,7 @@ "index_web_pages_for_search": 1, "issingle": 1, "links": [], -<<<<<<< HEAD - "modified": "2025-02-17 14:36:36.177743", -======= - "modified": "2025-02-28 15:08:35.938840", ->>>>>>> 93f461c6f3 (fix: rearrange stock settings fields) + "modified": "2025-02-28 16:08:35.938840", "modified_by": "Administrator", "module": "Stock", "name": "Stock Settings", From 331798babc6f7ad40d0e5d9b73c71b1eef66409d Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Sat, 1 Mar 2025 21:34:06 +0530 Subject: [PATCH 1215/1614] fix: stock qty not recalculate on changing of the qty (cherry picked from commit 464e3339fed51b80addbff455022fb9d6c8147cd) --- erpnext/public/js/controllers/transaction.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 81a8a617e64..69ecac19852 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -1331,6 +1331,8 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe () => this.calculate_stock_uom_rate(doc, cdt, cdn), () => this.apply_pricing_rule(item, true) ]); + } else { + this.conversion_factor(doc, cdt, cdn, true) } } From 84ca0ada1b2b11ef2ed2a1ecec937a4101fe55c4 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 3 Mar 2025 01:59:13 +0530 Subject: [PATCH 1216/1614] refactor: using function to unset grand total to default mode of payment in pos (backport #46228) (#46229) refactor: using function to unset grand total to default mode of payment in pos (#46228) (cherry picked from commit 62c3915ecb309569a09344282398ea3f81ede7a1) Co-authored-by: Diptanil Saha --- .../selling/page/point_of_sale/pos_payment.js | 25 +++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/erpnext/selling/page/point_of_sale/pos_payment.js b/erpnext/selling/page/point_of_sale/pos_payment.js index fc8b75031c8..b47c25e20bb 100644 --- a/erpnext/selling/page/point_of_sale/pos_payment.js +++ b/erpnext/selling/page/point_of_sale/pos_payment.js @@ -340,19 +340,11 @@ erpnext.PointOfSale.Payment = class { // pass } - async render_payment_section() { + render_payment_section() { this.render_payment_mode_dom(); this.make_invoice_fields_control(); this.update_totals_section(); - let r = await frappe.db.get_value( - "POS Profile", - this.frm.doc.pos_profile, - "disable_grand_total_to_default_mop" - ); - - if (!r.message.disable_grand_total_to_default_mop) { - this.focus_on_default_mop(); - } + this.unset_grand_total_to_default_mop(); } after_render() { @@ -637,6 +629,19 @@ erpnext.PointOfSale.Payment = class { .toLowerCase(); } + async unset_grand_total_to_default_mop() { + const doc = this.events.get_frm().doc; + let r = await frappe.db.get_value( + "POS Profile", + doc.pos_profile, + "disable_grand_total_to_default_mop" + ); + + if (!r.message.disable_grand_total_to_default_mop) { + this.focus_on_default_mop(); + } + } + validate_reqd_invoice_fields() { const doc = this.events.get_frm().doc; let validation_flag = true; From 9186f13458a98579ffcfa568effe19746d6163cd Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Sat, 1 Mar 2025 21:34:06 +0530 Subject: [PATCH 1217/1614] fix: stock qty not recalculate on changing of the qty (cherry picked from commit 464e3339fed51b80addbff455022fb9d6c8147cd) (cherry picked from commit 331798babc6f7ad40d0e5d9b73c71b1eef66409d) --- erpnext/public/js/controllers/transaction.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 81a8a617e64..69ecac19852 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -1331,6 +1331,8 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe () => this.calculate_stock_uom_rate(doc, cdt, cdn), () => this.apply_pricing_rule(item, true) ]); + } else { + this.conversion_factor(doc, cdt, cdn, true) } } From bcd02df6fdc0a1d7308efe10ac4eb704ffa78d8a Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Mon, 3 Mar 2025 04:02:37 +0000 Subject: [PATCH 1218/1614] chore(release): Bumped to Version 15.53.3 ## [15.53.3](https://github.com/frappe/erpnext/compare/v15.53.2...v15.53.3) (2025-03-03) ### Bug Fixes * stock qty not recalculate on changing of the qty ([9186f13](https://github.com/frappe/erpnext/commit/9186f13458a98579ffcfa568effe19746d6163cd)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 563ea0fc1d7..81ffd53ca91 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.53.2" +__version__ = "15.53.3" def get_default_company(user=None): From 9e649d852237a54bae334f7c6f413cbdd38f54c5 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Sun, 2 Mar 2025 11:29:39 +0530 Subject: [PATCH 1219/1614] fix: dont update rate of free item when batch is updated (cherry picked from commit a3596f717b6a8145535d4a133d518f565e4ec0c5) # Conflicts: # erpnext/stock/get_item_details.py --- erpnext/stock/get_item_details.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py index 5c5fe5db276..58f83d7a593 100644 --- a/erpnext/stock/get_item_details.py +++ b/erpnext/stock/get_item_details.py @@ -221,7 +221,7 @@ def update_stock(ctx, out, doc=None): else: qty -= batch_qty - out.update({"batch_no": batch_no, "actual_batch_qty": qty}) + out.update({"batch_no": batch_no, "actual_batch_qty": batch_qty}) if rate: out.update({"rate": rate, "price_list_rate": rate}) @@ -1051,8 +1051,13 @@ def get_batch_based_item_price(params, item_code) -> float: if not item_price: item_price = get_item_price(params, item_code, ignore_party=True, force_batch_no=True) +<<<<<<< HEAD if item_price and item_price[0][2] == params.get("uom"): return item_price[0][1] +======= + if item_price and item_price[0].uom == pctx.uom and not pctx.get("items")[0].get("is_free_item"): + return item_price[0].price_list_rate +>>>>>>> a3596f717b (fix: dont update rate of free item when batch is updated) return 0.0 From 61d5680c8daf0b683be3460487711f98ac2d2232 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Sun, 2 Mar 2025 12:07:31 +0530 Subject: [PATCH 1220/1614] fix: error (cherry picked from commit 7c9c0c7776b709005e4abe0edaa2591e3fa1e7cc) # Conflicts: # erpnext/stock/get_item_details.py --- erpnext/stock/get_item_details.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py index 58f83d7a593..dee4c362363 100644 --- a/erpnext/stock/get_item_details.py +++ b/erpnext/stock/get_item_details.py @@ -1051,11 +1051,15 @@ def get_batch_based_item_price(params, item_code) -> float: if not item_price: item_price = get_item_price(params, item_code, ignore_party=True, force_batch_no=True) +<<<<<<< HEAD <<<<<<< HEAD if item_price and item_price[0][2] == params.get("uom"): return item_price[0][1] ======= if item_price and item_price[0].uom == pctx.uom and not pctx.get("items")[0].get("is_free_item"): +======= + if item_price and item_price[0].uom == pctx.uom and not pctx.get("items", [{}])[0].get("is_free_item", 0): +>>>>>>> 7c9c0c7776 (fix: error) return item_price[0].price_list_rate >>>>>>> a3596f717b (fix: dont update rate of free item when batch is updated) From 171f9664216f5cd940de8df4c26c60967d3bdc1d Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Mon, 3 Mar 2025 05:12:02 +0000 Subject: [PATCH 1221/1614] chore(release): Bumped to Version 15.53.4 ## [15.53.4](https://github.com/frappe/erpnext/compare/v15.53.3...v15.53.4) (2025-03-03) ### Bug Fixes * removed mandatory property for the cost center field ([8eddc09](https://github.com/frappe/erpnext/commit/8eddc09bbac1197843faccb9efef986e8170c04e)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 81ffd53ca91..1387ffdc4f3 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.53.3" +__version__ = "15.53.4" def get_default_company(user=None): From faee8d6c5e54184cbc223f3a2dd1f21e5b41b63e Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 3 Mar 2025 11:16:37 +0530 Subject: [PATCH 1222/1614] fix: don't allow renaming account while system is actively in use (backport #46176) (#46210) fix: don't allow renaming account while system is actively in use (#46176) (cherry picked from commit 999f1cf96db3752ca816093a1f3b75236688ab71) Co-authored-by: Ankush Menat --- erpnext/accounts/doctype/account/account.py | 28 ++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/account/account.py b/erpnext/accounts/doctype/account/account.py index b510651e68f..4098084a802 100644 --- a/erpnext/accounts/doctype/account/account.py +++ b/erpnext/accounts/doctype/account/account.py @@ -4,7 +4,7 @@ import frappe from frappe import _, throw -from frappe.utils import cint, cstr +from frappe.utils import add_to_date, cint, cstr, pretty_date from frappe.utils.nestedset import NestedSet, get_ancestors_of, get_descendants_of import erpnext @@ -481,6 +481,7 @@ def get_account_autoname(account_number, account_name, company): @frappe.whitelist() def update_account_number(name, account_name, account_number=None, from_descendant=False): + _ensure_idle_system() account = frappe.get_cached_doc("Account", name) if not account: return @@ -542,6 +543,7 @@ def update_account_number(name, account_name, account_number=None, from_descenda @frappe.whitelist() def merge_account(old, new): + _ensure_idle_system() # Validate properties before merging new_account = frappe.get_cached_doc("Account", new) old_account = frappe.get_cached_doc("Account", old) @@ -595,3 +597,27 @@ def sync_update_account_number_in_child( for d in frappe.db.get_values("Account", filters=filters, fieldname=["company", "name"], as_dict=True): update_account_number(d["name"], account_name, account_number, from_descendant=True) + + +def _ensure_idle_system(): + # Don't allow renaming if accounting entries are actively being updated, there are two main reasons: + # 1. Correctness: It's next to impossible to ensure that renamed account is not being used *right now*. + # 2. Performance: Renaming requires locking out many tables entirely and severely degrades performance. + + if frappe.flags.in_test: + return + + try: + # We also lock inserts to GL entry table with for_update here. + last_gl_update = frappe.db.get_value("GL Entry", {}, "modified", for_update=True, wait=False) + except frappe.QueryTimeoutError: + # wait=False fails immediately if there's an active transaction. + last_gl_update = add_to_date(None, seconds=-1) + + if last_gl_update > add_to_date(None, minutes=-5): + frappe.throw( + _( + "Last GL Entry update was done {}. This operation is not allowed while system is actively being used. Please wait for 5 minutes before retrying." + ).format(pretty_date(last_gl_update)), + title=_("System In Use"), + ) From 899e468f6a70000a10f104a9db5fc53e36ee160e Mon Sep 17 00:00:00 2001 From: venkat102 Date: Fri, 28 Feb 2025 15:14:25 +0530 Subject: [PATCH 1223/1614] fix(asset depreciation schedules): enable auto commit (cherry picked from commit a4b24f7451c7d7c156d97dda62824c4ba09045a4) --- .../v15_0/create_asset_depreciation_schedules_from_assets.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/patches/v15_0/create_asset_depreciation_schedules_from_assets.py b/erpnext/patches/v15_0/create_asset_depreciation_schedules_from_assets.py index ff77fbb91ec..d4350d8f9a1 100644 --- a/erpnext/patches/v15_0/create_asset_depreciation_schedules_from_assets.py +++ b/erpnext/patches/v15_0/create_asset_depreciation_schedules_from_assets.py @@ -82,6 +82,9 @@ def get_asset_depreciation_schedules_map(): .orderby(ds.idx) ).run(as_dict=True) + if len(records) > 20000: + frappe.db.auto_commit_on_many_writes = True + asset_depreciation_schedules_map = frappe._dict() for d in records: asset_depreciation_schedules_map.setdefault((d.asset_name, cstr(d.finance_book)), []).append(d) From 7f4d553201c496cc75bcf370aa84f3fff143a775 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Mon, 3 Mar 2025 12:28:06 +0530 Subject: [PATCH 1224/1614] chore: resolve conflicts --- erpnext/stock/get_item_details.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py index dee4c362363..68d4cc85c42 100644 --- a/erpnext/stock/get_item_details.py +++ b/erpnext/stock/get_item_details.py @@ -1051,17 +1051,8 @@ def get_batch_based_item_price(params, item_code) -> float: if not item_price: item_price = get_item_price(params, item_code, ignore_party=True, force_batch_no=True) -<<<<<<< HEAD -<<<<<<< HEAD - if item_price and item_price[0][2] == params.get("uom"): - return item_price[0][1] -======= - if item_price and item_price[0].uom == pctx.uom and not pctx.get("items")[0].get("is_free_item"): -======= if item_price and item_price[0].uom == pctx.uom and not pctx.get("items", [{}])[0].get("is_free_item", 0): ->>>>>>> 7c9c0c7776 (fix: error) return item_price[0].price_list_rate ->>>>>>> a3596f717b (fix: dont update rate of free item when batch is updated) return 0.0 From c247cf888b03cfcf172d90110611a89e23c16338 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Mon, 3 Mar 2025 13:38:38 +0530 Subject: [PATCH 1225/1614] fix: incorrectly billed amount in the purchase receipt (cherry picked from commit a5271fdb2e5c826ec24162ddd101ae95ed9fdcd7) --- .../purchase_receipt/purchase_receipt.py | 6 +++- .../purchase_receipt/test_purchase_receipt.py | 30 +++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py index 0328c447ec2..7aa23c8153b 100644 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py @@ -1048,15 +1048,19 @@ def get_billed_amount_against_po(po_items): if not po_items: return {} + purchase_invoice = frappe.qb.DocType("Purchase Invoice") purchase_invoice_item = frappe.qb.DocType("Purchase Invoice Item") query = ( frappe.qb.from_(purchase_invoice_item) + .inner_join(purchase_invoice) + .on(purchase_invoice_item.parent == purchase_invoice.name) .select(fn.Sum(purchase_invoice_item.amount).as_("billed_amt"), purchase_invoice_item.po_detail) .where( (purchase_invoice_item.po_detail.isin(po_items)) - & (purchase_invoice_item.docstatus == 1) + & (purchase_invoice.docstatus == 1) & (purchase_invoice_item.pr_detail.isnull()) + & (purchase_invoice.update_stock == 0) ) .groupby(purchase_invoice_item.po_detail) ).run(as_dict=1) diff --git a/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py index b097c0e6441..9cf9f4d4958 100644 --- a/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py +++ b/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py @@ -4047,6 +4047,36 @@ class TestPurchaseReceipt(FrappeTestCase): batch_return.save() batch_return.submit() + def test_pr_status_based_on_invoices_with_update_stock(self): + from erpnext.buying.doctype.purchase_order.purchase_order import ( + make_purchase_invoice as _make_purchase_invoice, + ) + from erpnext.buying.doctype.purchase_order.purchase_order import ( + make_purchase_receipt as _make_purchase_receipt, + ) + from erpnext.buying.doctype.purchase_order.test_purchase_order import ( + create_pr_against_po, + create_purchase_order, + ) + + item_code = "Test Item for PR Status Based on Invoices" + create_item(item_code) + + po = create_purchase_order(item_code=item_code, qty=10) + pi = _make_purchase_invoice(po.name) + pi.update_stock = 1 + pi.items[0].qty = 5 + pi.submit() + + po.reload() + self.assertEqual(po.per_billed, 50) + + pr = _make_purchase_receipt(po.name) + self.assertEqual(pr.items[0].qty, 5) + pr.submit() + pr.reload() + self.assertEqual(pr.status, "To Bill") + def prepare_data_for_internal_transfer(): from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_internal_supplier From e94f0b1ccaa6b2cf96c67cd4013c76343b668ff3 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Sun, 2 Mar 2025 12:36:17 +0530 Subject: [PATCH 1226/1614] fix: incorrect batch picked (cherry picked from commit d2564cad684d998dac15995017d79566525dee3c) --- erpnext/public/js/utils/serial_no_batch_selector.js | 2 ++ erpnext/stock/serial_batch_bundle.py | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/erpnext/public/js/utils/serial_no_batch_selector.js b/erpnext/public/js/utils/serial_no_batch_selector.js index de1faf36ef5..e02d7a3d785 100644 --- a/erpnext/public/js/utils/serial_no_batch_selector.js +++ b/erpnext/public/js/utils/serial_no_batch_selector.js @@ -540,6 +540,8 @@ erpnext.SerialBatchPackageSelector = class SerialNoBatchBundleUpdate { has_batch_no: this.item.has_batch_no, qty: qty, based_on: based_on, + posting_date: this.frm.doc.posting_date, + posting_time: this.frm.doc.posting_time, }, callback: (r) => { if (r.message) { diff --git a/erpnext/stock/serial_batch_bundle.py b/erpnext/stock/serial_batch_bundle.py index 993d918f8bc..c88df01665f 100644 --- a/erpnext/stock/serial_batch_bundle.py +++ b/erpnext/stock/serial_batch_bundle.py @@ -1006,6 +1006,10 @@ class SerialBatchCreation: elif self.has_serial_no and not self.get("serial_nos"): self.serial_nos = get_serial_nos_for_outward(kwargs) elif not self.has_serial_no and self.has_batch_no and not self.get("batches"): + if self.get("posting_date"): + kwargs["posting_date"] = self.get("posting_date") + kwargs["posting_time"] = self.get("posting_time") + self.batches = get_available_batches(kwargs) def set_auto_serial_batch_entries_for_inward(self): From 81c7b8c273d1ef7ceab82e00030c7d7a11530415 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Mon, 3 Mar 2025 15:05:44 +0530 Subject: [PATCH 1227/1614] chore: resolve conflicts --- erpnext/stock/get_item_details.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py index 68d4cc85c42..cd5f7107561 100644 --- a/erpnext/stock/get_item_details.py +++ b/erpnext/stock/get_item_details.py @@ -1051,7 +1051,7 @@ def get_batch_based_item_price(params, item_code) -> float: if not item_price: item_price = get_item_price(params, item_code, ignore_party=True, force_batch_no=True) - if item_price and item_price[0].uom == pctx.uom and not pctx.get("items", [{}])[0].get("is_free_item", 0): + if item_price and item_price[0].uom == params.uom and not params.get("items", [{}])[0].get("is_free_item", 0): return item_price[0].price_list_rate return 0.0 From cc535b76365325d189d7faee0556a23679bb6bb1 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Mon, 3 Mar 2025 15:27:35 +0530 Subject: [PATCH 1228/1614] fix: syntax error --- erpnext/stock/get_item_details.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py index cd5f7107561..f220024e415 100644 --- a/erpnext/stock/get_item_details.py +++ b/erpnext/stock/get_item_details.py @@ -1051,7 +1051,7 @@ def get_batch_based_item_price(params, item_code) -> float: if not item_price: item_price = get_item_price(params, item_code, ignore_party=True, force_batch_no=True) - if item_price and item_price[0].uom == params.uom and not params.get("items", [{}])[0].get("is_free_item", 0): + if item_price and item_price[0].uom == params.get("uom") and not params.get("items", [{}])[0].get("is_free_item", 0): return item_price[0].price_list_rate return 0.0 From bd48d391e4a9c6e78e0e9896da9ebf8bce64efc5 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Mon, 3 Mar 2025 16:40:19 +0530 Subject: [PATCH 1229/1614] fix: syntax error --- erpnext/stock/get_item_details.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py index f220024e415..23e6e003bb0 100644 --- a/erpnext/stock/get_item_details.py +++ b/erpnext/stock/get_item_details.py @@ -1051,8 +1051,8 @@ def get_batch_based_item_price(params, item_code) -> float: if not item_price: item_price = get_item_price(params, item_code, ignore_party=True, force_batch_no=True) - if item_price and item_price[0].uom == params.get("uom") and not params.get("items", [{}])[0].get("is_free_item", 0): - return item_price[0].price_list_rate + if item_price and item_price[0][2] == params.get("uom") and not params.get("items", [{}])[0].get("is_free_item", 0): + return item_price[0][1] return 0.0 From 90dea426d8adc86a56a37666e1f3f7b274b0df2f Mon Sep 17 00:00:00 2001 From: Ninad1306 Date: Tue, 18 Feb 2025 12:52:33 +0530 Subject: [PATCH 1230/1614] fix: set taxes before calculating taxes and totals (cherry picked from commit 0fd0695bbbaec834bd120b4fdc93bc7142f60532) --- erpnext/controllers/accounts_controller.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index bb0a4070981..884ce4de71b 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -194,6 +194,14 @@ class AccountsController(TransactionBase): self.set_incoming_rate() self.init_internal_values() + # Need to set taxes based on taxes_and_charges template + # before calculating taxes and totals + if self.meta.get_field("taxes_and_charges"): + self.validate_enabled_taxes_and_charges() + self.validate_tax_account_company() + + self.set_taxes_and_charges() + if self.meta.get_field("currency"): self.calculate_taxes_and_totals() @@ -204,10 +212,6 @@ class AccountsController(TransactionBase): self.validate_all_documents_schedule() - if self.meta.get_field("taxes_and_charges"): - self.validate_enabled_taxes_and_charges() - self.validate_tax_account_company() - self.validate_party() self.validate_currency() self.validate_party_account_currency() @@ -252,8 +256,6 @@ class AccountsController(TransactionBase): self.validate_deferred_income_expense_account() self.set_inter_company_account() - self.set_taxes_and_charges() - if self.doctype == "Purchase Invoice": self.calculate_paid_amount() # apply tax withholding only if checked and applicable From 41e9a10ab413fd4d2c279aedb0fe08ff05426f2b Mon Sep 17 00:00:00 2001 From: Ninad1306 Date: Tue, 18 Feb 2025 14:03:35 +0530 Subject: [PATCH 1231/1614] test: validate fetching of taxes based on taxes and charges template (cherry picked from commit 196ef7ac4e496785ac7fb5dbff2e13c9317071bc) --- .../tests/test_accounts_controller.py | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/erpnext/controllers/tests/test_accounts_controller.py b/erpnext/controllers/tests/test_accounts_controller.py index 2c46f04af71..ccabb361b32 100644 --- a/erpnext/controllers/tests/test_accounts_controller.py +++ b/erpnext/controllers/tests/test_accounts_controller.py @@ -931,6 +931,35 @@ class TestAccountsController(FrappeTestCase): self.assertEqual(exc_je_for_si, []) self.assertEqual(exc_je_for_pe, []) + @IntegrationTestCase.change_settings("Accounts Settings", {"add_taxes_from_item_tax_template": 1}) + def test_18_fetch_taxes_based_on_taxes_and_charges_template(self): + # Create a Sales Taxes and Charges Template + if not frappe.db.exists("Sales Taxes and Charges Template", "_Test Tax - _TC"): + doc = frappe.new_doc("Sales Taxes and Charges Template") + doc.company = self.company + doc.title = "_Test Tax" + doc.append( + "taxes", + { + "charge_type": "On Net Total", + "account_head": "Sales Expenses - _TC", + "description": "Test taxes", + "rate": 9, + }, + ) + doc.insert() + + # Create a Sales Invoice + sinv = frappe.new_doc("Sales Invoice") + sinv.customer = self.customer + sinv.company = self.company + sinv.currency = "INR" + sinv.taxes_and_charges = "_Test Tax - _TC" + sinv.append("items", {"item_code": "_Test Item", "qty": 1, "rate": 50}) + sinv.insert() + + self.assertEqual(sinv.total_taxes_and_charges, 4.5) + def test_20_journal_against_sales_invoice(self): # Invoice in Foreign Currency si = self.create_sales_invoice(qty=1, conversion_rate=80, rate=1) From 5e083861a419b6ead0071df9004f5c3d1c6f4977 Mon Sep 17 00:00:00 2001 From: Ninad1306 Date: Fri, 28 Feb 2025 11:08:30 +0530 Subject: [PATCH 1232/1614] fix: exclude cancelled gl entries (cherry picked from commit 3251a331dd76767e51f49dfb3cbbad6e932cb7cc) --- .../report/budget_variance_report/budget_variance_report.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/accounts/report/budget_variance_report/budget_variance_report.py b/erpnext/accounts/report/budget_variance_report/budget_variance_report.py index e540aa9993c..db42d23a839 100644 --- a/erpnext/accounts/report/budget_variance_report/budget_variance_report.py +++ b/erpnext/accounts/report/budget_variance_report/budget_variance_report.py @@ -263,6 +263,7 @@ def get_actual_details(name, filters): and ba.account=gl.account and b.{budget_against} = gl.{budget_against} and gl.fiscal_year between %s and %s + and gl.is_cancelled = 0 and b.{budget_against} = %s and exists( select From 35df539da3d059c82f798541a80ab2e5ccc555c7 Mon Sep 17 00:00:00 2001 From: Smit Vora Date: Mon, 3 Mar 2025 17:02:15 +0530 Subject: [PATCH 1233/1614] chore: fix linters --- erpnext/controllers/tests/test_accounts_controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/controllers/tests/test_accounts_controller.py b/erpnext/controllers/tests/test_accounts_controller.py index ccabb361b32..f959cbd0488 100644 --- a/erpnext/controllers/tests/test_accounts_controller.py +++ b/erpnext/controllers/tests/test_accounts_controller.py @@ -931,7 +931,7 @@ class TestAccountsController(FrappeTestCase): self.assertEqual(exc_je_for_si, []) self.assertEqual(exc_je_for_pe, []) - @IntegrationTestCase.change_settings("Accounts Settings", {"add_taxes_from_item_tax_template": 1}) + @change_settings("Accounts Settings", {"add_taxes_from_item_tax_template": 1}) def test_18_fetch_taxes_based_on_taxes_and_charges_template(self): # Create a Sales Taxes and Charges Template if not frappe.db.exists("Sales Taxes and Charges Template", "_Test Tax - _TC"): From 8ed512f6c6e7cced1e48fb93ed71e9a08a46a8aa Mon Sep 17 00:00:00 2001 From: Nirmalrajaa K Date: Fri, 21 Feb 2025 14:57:16 +0530 Subject: [PATCH 1234/1614] fix: Batch Price gets updated only if it is a billed item (cherry picked from commit 9597b1a69e965638d68c7018fc564ba71e9d4246) # Conflicts: # erpnext/stock/get_item_details.py --- erpnext/stock/get_item_details.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py index 5c5fe5db276..1cc4cb750db 100644 --- a/erpnext/stock/get_item_details.py +++ b/erpnext/stock/get_item_details.py @@ -1051,8 +1051,14 @@ def get_batch_based_item_price(params, item_code) -> float: if not item_price: item_price = get_item_price(params, item_code, ignore_party=True, force_batch_no=True) +<<<<<<< HEAD if item_price and item_price[0][2] == params.get("uom"): return item_price[0][1] +======= + + if item_price and item_price[0].uom == pctx.uom and params.get("is_free_item") == 0: + return item_price[0].price_list_rate +>>>>>>> 9597b1a69e (fix: Batch Price gets updated only if it is a billed item) return 0.0 From dbd47dff985019d18a5b68de44149e81dd1663cf Mon Sep 17 00:00:00 2001 From: Nirmalrajaa K Date: Sat, 22 Feb 2025 22:04:00 +0530 Subject: [PATCH 1235/1614] fix: Batch Price gets updated only if it is a billed item (cherry picked from commit 1a56b83054003cde73aa2aa7c16f80e82be58a20) # Conflicts: # erpnext/stock/get_item_details.py --- erpnext/stock/get_item_details.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py index 1cc4cb750db..71a58e7f836 100644 --- a/erpnext/stock/get_item_details.py +++ b/erpnext/stock/get_item_details.py @@ -1051,12 +1051,16 @@ def get_batch_based_item_price(params, item_code) -> float: if not item_price: item_price = get_item_price(params, item_code, ignore_party=True, force_batch_no=True) +<<<<<<< HEAD <<<<<<< HEAD if item_price and item_price[0][2] == params.get("uom"): return item_price[0][1] ======= +======= + is_free_item = pctx.get('items', [{}])[0].get('is_free_item') +>>>>>>> 1a56b83054 (fix: Batch Price gets updated only if it is a billed item) - if item_price and item_price[0].uom == pctx.uom and params.get("is_free_item") == 0: + if item_price and item_price[0].uom == pctx.uom and not is_free_item: return item_price[0].price_list_rate >>>>>>> 9597b1a69e (fix: Batch Price gets updated only if it is a billed item) From 6762dc3392db930d920f5042eadb95ddf4d83998 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 3 Mar 2025 14:01:20 +0530 Subject: [PATCH 1236/1614] chore: linter fix (cherry picked from commit 0a2193e4589a9e748041001a8eb592be2bf091ce) # Conflicts: # erpnext/stock/get_item_details.py --- erpnext/stock/get_item_details.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py index 71a58e7f836..66c5ae28478 100644 --- a/erpnext/stock/get_item_details.py +++ b/erpnext/stock/get_item_details.py @@ -1051,6 +1051,7 @@ def get_batch_based_item_price(params, item_code) -> float: if not item_price: item_price = get_item_price(params, item_code, ignore_party=True, force_batch_no=True) +<<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD if item_price and item_price[0][2] == params.get("uom"): @@ -1059,6 +1060,9 @@ def get_batch_based_item_price(params, item_code) -> float: ======= is_free_item = pctx.get('items', [{}])[0].get('is_free_item') >>>>>>> 1a56b83054 (fix: Batch Price gets updated only if it is a billed item) +======= + is_free_item = pctx.get("items", [{}])[0].get("is_free_item") +>>>>>>> 0a2193e458 (chore: linter fix) if item_price and item_price[0].uom == pctx.uom and not is_free_item: return item_price[0].price_list_rate From f3cafef6a744e728b74299ac55c757fde4d94ba9 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 3 Mar 2025 21:37:02 +0530 Subject: [PATCH 1237/1614] fix(patch): Ensure SLE indexes (backport #46131) (#46135) * fix(patch): Ensure SLE indexes (#46131) Because of the way this change was pushed in parts, some sites don't see this as "update" and don't have the new indexes. (cherry picked from commit f62aa8fc57dcf4f2d4282811db1c85ff4259a2a5) # Conflicts: # erpnext/patches.txt * fix: resolved conflict --------- Co-authored-by: Ankush Menat Co-authored-by: Nabin Hait --- erpnext/patches.txt | 1 + .../stock/doctype/stock_ledger_entry/patches/__init__.py | 0 .../stock_ledger_entry/patches/ensure_sle_indexes.py | 9 +++++++++ 3 files changed, 10 insertions(+) create mode 100644 erpnext/stock/doctype/stock_ledger_entry/patches/__init__.py create mode 100644 erpnext/stock/doctype/stock_ledger_entry/patches/ensure_sle_indexes.py diff --git a/erpnext/patches.txt b/erpnext/patches.txt index cb10fcce1c4..df1b885ad18 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -394,3 +394,4 @@ execute:frappe.db.set_single_value("Accounts Settings", "exchange_gain_loss_post erpnext.patches.v14_0.disable_add_row_in_gross_profit erpnext.patches.v15_0.set_difference_amount_in_asset_value_adjustment erpnext.patches.v14_0.update_posting_datetime +erpnext.stock.doctype.stock_ledger_entry.patches.ensure_sle_indexes diff --git a/erpnext/stock/doctype/stock_ledger_entry/patches/__init__.py b/erpnext/stock/doctype/stock_ledger_entry/patches/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/erpnext/stock/doctype/stock_ledger_entry/patches/ensure_sle_indexes.py b/erpnext/stock/doctype/stock_ledger_entry/patches/ensure_sle_indexes.py new file mode 100644 index 00000000000..7f29b27af3f --- /dev/null +++ b/erpnext/stock/doctype/stock_ledger_entry/patches/ensure_sle_indexes.py @@ -0,0 +1,9 @@ +from erpnext.stock.doctype.stock_ledger_entry.stock_ledger_entry import ( + on_doctype_update as create_sle_indexes, +) + + +def execute(): + """Ensure SLE Indexes""" + + create_sle_indexes() From ef195513d0056f9b8069532e310e4902f469c564 Mon Sep 17 00:00:00 2001 From: Sanket Shah <113279972+Sanket322@users.noreply.github.com> Date: Mon, 3 Mar 2025 21:38:11 +0530 Subject: [PATCH 1238/1614] fix: Convert tuple of tuples to list of dicts for dot notation access (#46062) fix: use as_dict to convert tuples into list of dict Co-authored-by: Sanket322 (cherry picked from commit e4b0ab6656e9caf5d22fdc8ee8ac400cc99c1c9d) --- .../doctype/tax_withholding_category/tax_withholding_category.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py index 06549973242..a355e5ddf44 100644 --- a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py +++ b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py @@ -436,6 +436,7 @@ def get_invoice_vouchers(parties, tax_details, company, party_type="Supplier"): tax_details.get("tax_withholding_category"), company, ), + as_dict=1, ) for d in journal_entries_details: From 0a65217423035b0fe6e8a2934f1bd2aed85e2ac9 Mon Sep 17 00:00:00 2001 From: Sanket322 Date: Thu, 27 Feb 2025 13:17:57 +0530 Subject: [PATCH 1239/1614] fix: if invoice is return then add amount in proper column (cherry picked from commit ccb4bdbe4cd7e11118621968f4097aa20fc0dd1d) --- .../accounts_receivable/accounts_receivable.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py index 1ddf9bce06f..c7a0da5afe9 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py @@ -267,6 +267,18 @@ class ReceivablePayableReport: row.invoiced_in_account_currency += amount_in_account_currency else: if self.is_invoice(ple): + # when invoice has is_return marked + if self.invoice_details.get(row.voucher_no, {}).get("is_return"): + # for Credit Note + if row.voucher_type == "Sales Invoice": + row.credit_note -= amount + row.credit_note_in_account_currency -= amount_in_account_currency + # for Debit Note + else: + row.invoiced -= amount + row.invoiced_in_account_currency -= amount_in_account_currency + return + if row.voucher_no == ple.voucher_no == ple.against_voucher_no: row.paid -= amount row.paid_in_account_currency -= amount_in_account_currency @@ -421,7 +433,7 @@ class ReceivablePayableReport: # nosemgrep si_list = frappe.db.sql( """ - select name, due_date, po_no + select name, due_date, po_no, is_return from `tabSales Invoice` where posting_date <= %s and company = %s @@ -453,7 +465,7 @@ class ReceivablePayableReport: # nosemgrep for pi in frappe.db.sql( """ - select name, due_date, bill_no, bill_date + select name, due_date, bill_no, bill_date, is_return from `tabPurchase Invoice` where posting_date <= %s From 9f4311e7fbaa4ad607747f61a3a4b95ab61b75a2 Mon Sep 17 00:00:00 2001 From: Sanket322 Date: Thu, 27 Feb 2025 16:52:13 +0530 Subject: [PATCH 1240/1614] fix: fixing test case (cherry picked from commit 9b2b477ae05f1d0d6ccb5ce990061956e90acaef) --- .../accounts_receivable/test_accounts_receivable.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/report/accounts_receivable/test_accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/test_accounts_receivable.py index 39ca78153c3..f3513286c9e 100644 --- a/erpnext/accounts/report/accounts_receivable/test_accounts_receivable.py +++ b/erpnext/accounts/report/accounts_receivable/test_accounts_receivable.py @@ -204,7 +204,7 @@ class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase): expected_data_after_credit_note = [ [100.0, 100.0, 40.0, 0.0, 60.0, si.name], - [0, 0, 100.0, 0.0, -100.0, cr_note.name], + [0, 0, 0, 100.0, -100.0, cr_note.name], ] self.assertEqual(len(report[1]), 2) si_row = next( @@ -478,13 +478,19 @@ class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase): report = execute(filters)[1] self.assertEqual(len(report), 2) - expected_data = {sr.name: [10.0, -10.0, 0.0, -10], si.name: [100.0, 100.0, 10.0, 90.0]} + expected_data = {sr.name: [0.0, 10.0, -10.0, 0.0, -10], si.name: [100.0, 0.0, 100.0, 10.0, 90.0]} rows = report[:2] for row in rows: self.assertEqual( expected_data[row.voucher_no], - [row.invoiced or row.paid, row.outstanding, row.remaining_balance, row.future_amount], + [ + row.invoiced or row.paid, + row.credit_note, + row.outstanding, + row.remaining_balance, + row.future_amount, + ], ) pe.cancel() From a8b31df65ddeae3e0fcee7895dbafc9691034f10 Mon Sep 17 00:00:00 2001 From: Sanket322 Date: Thu, 27 Feb 2025 17:14:29 +0530 Subject: [PATCH 1241/1614] fix: test case for debit note (cherry picked from commit 6719bbeb10156f1c0d7b148e178cafaa3014e248) --- .../accounts_payable/test_accounts_payable.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/erpnext/accounts/report/accounts_payable/test_accounts_payable.py b/erpnext/accounts/report/accounts_payable/test_accounts_payable.py index 8971dc3d37b..69f332d9800 100644 --- a/erpnext/accounts/report/accounts_payable/test_accounts_payable.py +++ b/erpnext/accounts/report/accounts_payable/test_accounts_payable.py @@ -38,6 +38,23 @@ class TestAccountsPayable(AccountsTestMixin, FrappeTestCase): self.assertEqual(data[1][0].get("outstanding"), 300) self.assertEqual(data[1][0].get("currency"), "USD") + def test_account_payable_for_debit_note(self): + pi = self.create_purchase_invoice(do_not_submit=True) + pi.is_return = 1 + pi.items[0].qty = -1 + pi = pi.save().submit() + + filters = { + "company": self.company, + "party_type": "Supplier", + "party": [self.supplier], + "report_date": today(), + "range": "30, 60, 90, 120", + } + + data = execute(filters) + self.assertEqual(data[1][0].get("invoiced"), 300) + def create_purchase_invoice(self, do_not_submit=False): frappe.set_user("Administrator") pi = make_purchase_invoice( From 854632dd510c5371307d543d1cf04ce3c7e5cfae Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 3 Mar 2025 20:28:24 +0530 Subject: [PATCH 1242/1614] chore: resolve conflict --- erpnext/stock/get_item_details.py | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py index 66c5ae28478..c592d31f4dd 100644 --- a/erpnext/stock/get_item_details.py +++ b/erpnext/stock/get_item_details.py @@ -1051,22 +1051,10 @@ def get_batch_based_item_price(params, item_code) -> float: if not item_price: item_price = get_item_price(params, item_code, ignore_party=True, force_batch_no=True) -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD - if item_price and item_price[0][2] == params.get("uom"): - return item_price[0][1] -======= -======= - is_free_item = pctx.get('items', [{}])[0].get('is_free_item') ->>>>>>> 1a56b83054 (fix: Batch Price gets updated only if it is a billed item) -======= - is_free_item = pctx.get("items", [{}])[0].get("is_free_item") ->>>>>>> 0a2193e458 (chore: linter fix) + is_free_item = params.get("items", [{}])[0].get("is_free_item") - if item_price and item_price[0].uom == pctx.uom and not is_free_item: - return item_price[0].price_list_rate ->>>>>>> 9597b1a69e (fix: Batch Price gets updated only if it is a billed item) + if item_price and item_price[0][2] == params.get("uom") and not is_free_item: + return item_price[0][1] return 0.0 From 3a03865a8f057283a0ce757acf920ca6d1750e46 Mon Sep 17 00:00:00 2001 From: Sugesh393 Date: Wed, 5 Feb 2025 18:40:21 +0530 Subject: [PATCH 1243/1614] fix: change voucher_type and voucher_no field type to data (cherry picked from commit f8ab02192037171e4f8de7d79edfd9978238ac09) # Conflicts: # erpnext/accounts/doctype/tax_withheld_vouchers/tax_withheld_vouchers.json --- .../tax_withheld_vouchers.json | 14 ++++++++------ .../tax_withheld_vouchers/tax_withheld_vouchers.py | 4 ++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/erpnext/accounts/doctype/tax_withheld_vouchers/tax_withheld_vouchers.json b/erpnext/accounts/doctype/tax_withheld_vouchers/tax_withheld_vouchers.json index 46b430c6594..4b1f586b60c 100644 --- a/erpnext/accounts/doctype/tax_withheld_vouchers/tax_withheld_vouchers.json +++ b/erpnext/accounts/doctype/tax_withheld_vouchers/tax_withheld_vouchers.json @@ -13,17 +13,15 @@ "fields": [ { "fieldname": "voucher_type", - "fieldtype": "Link", + "fieldtype": "Data", "in_list_view": 1, - "label": "Voucher Type", - "options": "DocType" + "label": "Voucher Type" }, { "fieldname": "voucher_name", - "fieldtype": "Dynamic Link", + "fieldtype": "Data", "in_list_view": 1, - "label": "Voucher Name", - "options": "voucher_type" + "label": "Voucher Name" }, { "fieldname": "taxable_amount", @@ -36,7 +34,11 @@ "index_web_pages_for_search": 1, "istable": 1, "links": [], +<<<<<<< HEAD "modified": "2023-01-13 13:40:41.479208", +======= + "modified": "2025-02-05 16:39:14.863698", +>>>>>>> f8ab021920 (fix: change voucher_type and voucher_no field type to data) "modified_by": "Administrator", "module": "Accounts", "name": "Tax Withheld Vouchers", diff --git a/erpnext/accounts/doctype/tax_withheld_vouchers/tax_withheld_vouchers.py b/erpnext/accounts/doctype/tax_withheld_vouchers/tax_withheld_vouchers.py index bc2003e2bea..dbb69a2e769 100644 --- a/erpnext/accounts/doctype/tax_withheld_vouchers/tax_withheld_vouchers.py +++ b/erpnext/accounts/doctype/tax_withheld_vouchers/tax_withheld_vouchers.py @@ -18,8 +18,8 @@ class TaxWithheldVouchers(Document): parentfield: DF.Data parenttype: DF.Data taxable_amount: DF.Currency - voucher_name: DF.DynamicLink | None - voucher_type: DF.Link | None + voucher_name: DF.Data | None + voucher_type: DF.Data | None # end: auto-generated types pass From 489efda98512bd347f79cc36abb8dd470f1f063a Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 4 Mar 2025 15:47:03 +0530 Subject: [PATCH 1244/1614] chore: resolve conflict --- .../doctype/tax_withheld_vouchers/tax_withheld_vouchers.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/erpnext/accounts/doctype/tax_withheld_vouchers/tax_withheld_vouchers.json b/erpnext/accounts/doctype/tax_withheld_vouchers/tax_withheld_vouchers.json index 4b1f586b60c..51dc3674594 100644 --- a/erpnext/accounts/doctype/tax_withheld_vouchers/tax_withheld_vouchers.json +++ b/erpnext/accounts/doctype/tax_withheld_vouchers/tax_withheld_vouchers.json @@ -34,11 +34,7 @@ "index_web_pages_for_search": 1, "istable": 1, "links": [], -<<<<<<< HEAD - "modified": "2023-01-13 13:40:41.479208", -======= "modified": "2025-02-05 16:39:14.863698", ->>>>>>> f8ab021920 (fix: change voucher_type and voucher_no field type to data) "modified_by": "Administrator", "module": "Accounts", "name": "Tax Withheld Vouchers", From 83dcbec86af4fe281ac3abde7fec90efe0269679 Mon Sep 17 00:00:00 2001 From: Smit Vora Date: Tue, 4 Mar 2025 16:43:55 +0530 Subject: [PATCH 1245/1614] chore: resolve conflicts --- .../report/purchase_order_analysis/purchase_order_analysis.js | 4 ---- .../report/sales_order_analysis/sales_order_analysis.js | 4 ---- 2 files changed, 8 deletions(-) diff --git a/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.js b/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.js index 8d254722a4f..99b4c26ac8e 100644 --- a/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.js +++ b/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.js @@ -66,9 +66,6 @@ frappe.query_reports["Purchase Order Analysis"] = { width: "80", options: ["To Pay", "To Bill", "To Receive", "To Receive and Bill", "Completed", "Closed"], get_data: function (txt) { -<<<<<<< HEAD - let status = ["To Bill", "To Receive", "To Receive and Bill", "Completed"]; -======= let status = [ "To Pay", "To Bill", @@ -77,7 +74,6 @@ frappe.query_reports["Purchase Order Analysis"] = { "Completed", "Closed", ]; ->>>>>>> 3b2879d3a1 (fix(report): allow `Closed` purchase orders to be visible) let options = []; for (let option of status) { options.push({ diff --git a/erpnext/selling/report/sales_order_analysis/sales_order_analysis.js b/erpnext/selling/report/sales_order_analysis/sales_order_analysis.js index e470672b3a5..b7f7a34c1b8 100644 --- a/erpnext/selling/report/sales_order_analysis/sales_order_analysis.js +++ b/erpnext/selling/report/sales_order_analysis/sales_order_analysis.js @@ -65,9 +65,6 @@ frappe.query_reports["Sales Order Analysis"] = { options: ["To Pay", "To Bill", "To Deliver", "To Deliver and Bill", "Completed", "Closed"], width: "80", get_data: function (txt) { -<<<<<<< HEAD - let status = ["To Bill", "To Deliver", "To Deliver and Bill", "Completed"]; -======= let status = [ "To Pay", "To Bill", @@ -76,7 +73,6 @@ frappe.query_reports["Sales Order Analysis"] = { "Completed", "Closed", ]; ->>>>>>> 2394e76e7d (fix(report): allow `Closed` sales orders to be visible) let options = []; for (let option of status) { options.push({ From 78a329e5738c92e34e6cac0350263aa40b93c940 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Thu, 13 Feb 2025 14:56:11 +0530 Subject: [PATCH 1246/1614] fix: auto allocation for negative amount outstanding for Customers in Payment Entry (cherry picked from commit 6275b44a0bdc016d6ed492475cf474c0e94e7a89) --- erpnext/accounts/doctype/payment_entry/payment_entry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index d1533fe0131..45462398e1c 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -1843,7 +1843,7 @@ class PaymentEntry(AccountsController): allocated_positive_outstanding = paid_amount + allocated_negative_outstanding - elif self.party_type in ("Supplier", "Employee"): + elif self.party_type in ("Supplier", "Customer"): if paid_amount > total_negative_outstanding: if total_negative_outstanding == 0: frappe.msgprint( From eee500f20e8c9df46e72cf7151d777016dbdc089 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Tue, 4 Mar 2025 12:49:48 +0530 Subject: [PATCH 1247/1614] fix: do not include opening invoices in billed items to be received report (cherry picked from commit c1ddf444c65b50ec59f95e6a88b7e263d303aadc) --- .../billed_items_to_be_received/billed_items_to_be_received.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/accounts/report/billed_items_to_be_received/billed_items_to_be_received.py b/erpnext/accounts/report/billed_items_to_be_received/billed_items_to_be_received.py index f6efc8a685c..dc6192e7544 100644 --- a/erpnext/accounts/report/billed_items_to_be_received/billed_items_to_be_received.py +++ b/erpnext/accounts/report/billed_items_to_be_received/billed_items_to_be_received.py @@ -27,6 +27,7 @@ def get_report_filters(report_filters): ["Purchase Invoice", "docstatus", "=", 1], ["Purchase Invoice", "per_received", "<", 100], ["Purchase Invoice", "update_stock", "=", 0], + ["Purchase Invoice", "is_opening", "!=", "Yes"], ] if report_filters.get("purchase_invoice"): From 1630979f0556de8fba6941de64f727e0b90ecbfc Mon Sep 17 00:00:00 2001 From: Sanket322 Date: Thu, 20 Feb 2025 11:33:53 +0530 Subject: [PATCH 1248/1614] refactor: add new line ragardless of postal code (cherry picked from commit 746adfd057cb77cbc601da96dcd069b3bc50027a) --- erpnext/regional/address_template/templates/united_states.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/regional/address_template/templates/united_states.html b/erpnext/regional/address_template/templates/united_states.html index 77fce46b9d7..f00f99c1299 100644 --- a/erpnext/regional/address_template/templates/united_states.html +++ b/erpnext/regional/address_template/templates/united_states.html @@ -1,4 +1,4 @@ {{ address_line1 }}
{% if address_line2 %}{{ address_line2 }}
{% endif -%} -{{ city }}, {% if state %}{{ state }}{% endif -%}{% if pincode %} {{ pincode }}
{% endif -%} +{{ city }}, {% if state %}{{ state }}{% endif -%}{% if pincode %} {{ pincode }}{% endif -%}
{% if country != "United States" %}{{ country }}{% endif -%} From ddcf79da1da6dfe5b9cd7f367bf86c7c41992b21 Mon Sep 17 00:00:00 2001 From: mhh008 Date: Tue, 4 Mar 2025 13:56:19 +0100 Subject: [PATCH 1249/1614] fix: translation DE --- erpnext/translations/de.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/translations/de.csv b/erpnext/translations/de.csv index 9ef1d4bc63a..aa8d7322958 100644 --- a/erpnext/translations/de.csv +++ b/erpnext/translations/de.csv @@ -5098,7 +5098,7 @@ Percentage you are allowed to transfer more against the quantity ordered. For ex PUR-ORD-.YYYY.-,PUR-ORD-.YYYY.-, Get Items from Open Material Requests,Hole Artikel von offenen Material Anfragen, Fetch items based on Default Supplier.,Abrufen von Elementen basierend auf dem Standardlieferanten., -Required By,Benötigt von, +Required By,Benötigt bis, Order Confirmation No,Auftragsbestätigung Nr, Order Confirmation Date,Auftragsbestätigungsdatum, Customer Mobile No,Mobilnummer des Kunden, From 8bd71954f3d67efbc88a3994f8870e63ef662af5 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Fri, 28 Feb 2025 19:28:20 +0530 Subject: [PATCH 1250/1614] fix: stock reservation issue while making Purchase Invoice (cherry picked from commit 64985bffe049ecdb58d41760f89a142c7c41ed07) --- erpnext/stock/stock_ledger.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/erpnext/stock/stock_ledger.py b/erpnext/stock/stock_ledger.py index ca08a5ef121..aaeb90b7d30 100644 --- a/erpnext/stock/stock_ledger.py +++ b/erpnext/stock/stock_ledger.py @@ -561,12 +561,28 @@ class update_entries_after: self.new_items_found = False self.distinct_item_warehouses = args.get("distinct_item_warehouses", frappe._dict()) self.affected_transactions: set[tuple[str, str]] = set() - self.reserved_stock = flt(self.args.reserved_stock) + self.reserved_stock = self.get_reserved_stock() self.data = frappe._dict() self.initialize_previous_data(self.args) self.build() + def get_reserved_stock(self): + sre = frappe.qb.DocType("Stock Reservation Entry") + posting_datetime = get_combine_datetime(self.args.posting_date, self.args.posting_time) + query = ( + frappe.qb.from_(sre) + .select(Sum(sre.reserved_qty) - Sum(sre.delivered_qty)) + .where( + (sre.item_code == self.item_code) + & (sre.warehouse == self.args.warehouse) + & (sre.docstatus == 1) + & (sre.creation <= posting_datetime) + ) + ).run() + + return flt(query[0][0]) if query else 0.0 + def set_precision(self): self.flt_precision = cint(frappe.db.get_default("float_precision")) or 2 self.currency_precision = get_field_precision( From 75bc68b8631a2c38fe82989ce65c203742334a14 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Tue, 4 Mar 2025 20:01:50 +0530 Subject: [PATCH 1251/1614] fix: rate changing on the deliver note (cherry picked from commit 6f40849d55d75979c9b116caba6cf4656a94ddec) --- erpnext/controllers/accounts_controller.py | 10 +++-- .../doctype/sales_order/test_sales_order.py | 39 +++++++++++++++++++ 2 files changed, 46 insertions(+), 3 deletions(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 884ce4de71b..6ed55a0b55e 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -823,11 +823,15 @@ class AccountsController(TransactionBase): and item.get("use_serial_batch_fields") ) ): - if fieldname == "batch_no" and not item.batch_no and not item.is_free_item: - item.set("rate", ret.get("rate")) - item.set("price_list_rate", ret.get("price_list_rate")) item.set(fieldname, value) + if fieldname == "batch_no" and item.batch_no and not item.is_free_item: + if ret.get("rate"): + item.set("rate", ret.get("rate")) + + if not item.get("price_list_rate") and ret.get("price_list_rate"): + item.set("price_list_rate", ret.get("price_list_rate")) + elif fieldname in ["cost_center", "conversion_factor"] and not item.get( fieldname ): diff --git a/erpnext/selling/doctype/sales_order/test_sales_order.py b/erpnext/selling/doctype/sales_order/test_sales_order.py index 47d42b0a9d5..003ffd5ac82 100644 --- a/erpnext/selling/doctype/sales_order/test_sales_order.py +++ b/erpnext/selling/doctype/sales_order/test_sales_order.py @@ -2097,6 +2097,45 @@ class TestSalesOrder(AccountsTestMixin, FrappeTestCase): frappe.db.set_single_value("Stock Settings", "update_existing_price_list_rate", 0) frappe.db.set_single_value("Stock Settings", "auto_insert_price_list_rate_if_missing", 0) + def test_delivery_note_rate_on_change_of_warehouse(self): + from erpnext.stock.doctype.warehouse.test_warehouse import create_warehouse + + item = make_item( + "_Test Batch Item for Delivery Note Rate", + { + "has_batch_no": 1, + "create_new_batch": 1, + "batch_number_series": "BH-SDDTBIFRM-.#####", + }, + ) + + frappe.db.set_single_value("Stock Settings", "auto_insert_price_list_rate_if_missing", 1) + so = make_sales_order( + item_code=item.name, rate=27648.00, price_list_rate=27648.00, qty=1, do_not_submit=True + ) + + so.items[0].rate = 90 + so.save() + self.assertTrue(so.items[0].discount_amount == 27558.0) + so.submit() + + warehouse = create_warehouse("NW Warehouse FOR Rate", company=so.company) + + make_stock_entry( + item_code=item.name, + qty=2, + target=warehouse, + basic_rate=100, + company=so.company, + use_serial_batch_fields=1, + ) + + dn = make_delivery_note(so.name) + dn.items[0].warehouse = warehouse + dn.save() + + self.assertEqual(dn.items[0].rate, 90) + def test_credit_limit_on_so_reopning(self): # set credit limit company = "_Test Company" From 41ab7f3f7c0a968171e2866cdd856584f67513a9 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 5 Mar 2025 11:28:22 +0530 Subject: [PATCH 1252/1614] perf: don't track seen for POS Invoice (backport #46187) (#46189) * perf: don't track seen for POS Invoice (#46187) This is a moving doctype. Do people even browse the list view? It doesn't make much sense, either. POS INvoices are rarely "reviewed" by multiple users. (cherry picked from commit ded0aab680932730273c6544256632b72ebed5e5) # Conflicts: # erpnext/accounts/doctype/pos_invoice/pos_invoice.json * chore: conflicts --------- Co-authored-by: Ankush Menat --- erpnext/accounts/doctype/pos_invoice/pos_invoice.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/pos_invoice/pos_invoice.json b/erpnext/accounts/doctype/pos_invoice/pos_invoice.json index 42861140494..c15309df294 100644 --- a/erpnext/accounts/doctype/pos_invoice/pos_invoice.json +++ b/erpnext/accounts/doctype/pos_invoice/pos_invoice.json @@ -1623,6 +1623,5 @@ "states": [], "timeline_field": "customer", "title_field": "title", - "track_changes": 1, - "track_seen": 1 -} \ No newline at end of file + "track_changes": 1 +} From 1b00de18151b12f0b96df53ecc6493f192b600a8 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 5 Mar 2025 11:35:52 +0530 Subject: [PATCH 1253/1614] chore: erpnext.com -> frappe.io/erpnext (backport #46288) (#46290) * chore: erpnext.com -> frappe.io/erpnext (#46288) (cherry picked from commit 41fe30ea6e339e98633a73444f443c4b463bbe57) # Conflicts: # README.md * Update README.md --------- Co-authored-by: Ankush Menat --- erpnext/hooks.py | 4 ++-- erpnext/setup/install.py | 2 +- erpnext/templates/includes/footer/footer_powered.html | 2 +- package.json | 2 +- pyproject.toml | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/erpnext/hooks.py b/erpnext/hooks.py index 2b23cca886e..21f301f2450 100644 --- a/erpnext/hooks.py +++ b/erpnext/hooks.py @@ -4,7 +4,7 @@ app_publisher = "Frappe Technologies Pvt. Ltd." app_description = """ERP made simple""" app_icon = "fa fa-th" app_color = "#e74c3c" -app_email = "info@erpnext.com" +app_email = "hello@frappe.io" app_license = "GNU General Public License (v3)" source_link = "https://github.com/frappe/erpnext" app_logo_url = "/assets/erpnext/images/erpnext-logo.svg" @@ -484,7 +484,7 @@ email_brand_image = "assets/erpnext/images/erpnext-logo.jpg" default_mail_footer = """ Sent via - + ERPNext diff --git a/erpnext/setup/install.py b/erpnext/setup/install.py index 97ec418d955..23ffd49de5d 100644 --- a/erpnext/setup/install.py +++ b/erpnext/setup/install.py @@ -16,7 +16,7 @@ from erpnext.setup.doctype.incoterm.incoterm import create_incoterms from .default_success_action import get_default_success_action default_mail_footer = """
Sent via - ERPNext
""" + ERPNext
""" def after_install(): diff --git a/erpnext/templates/includes/footer/footer_powered.html b/erpnext/templates/includes/footer/footer_powered.html index 8310063e575..fb73931d18e 100644 --- a/erpnext/templates/includes/footer/footer_powered.html +++ b/erpnext/templates/includes/footer/footer_powered.html @@ -1 +1 @@ -{{ _("Powered by {0}").format('ERPNext') }} +{{ _("Powered by {0}").format('ERPNext') }} diff --git a/package.json b/package.json index 4e686f7ca74..509fe275e05 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "type": "git", "url": "git+https://github.com/frappe/erpnext.git" }, - "homepage": "https://erpnext.com", + "homepage": "https://frappe.io/erpnext", "author": "Frappe Technologies Pvt. Ltd.", "license": "GPL-3.0", "bugs": { diff --git a/pyproject.toml b/pyproject.toml index d891b186d89..e122b2d176c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -70,6 +70,6 @@ docstring-code-format = true [project.urls] -Homepage = "https://erpnext.com/" +Homepage = "https://frappe.io/erpnext" Repository = "https://github.com/frappe/erpnext.git" "Bug Reports" = "https://github.com/frappe/erpnext/issues" From 7759775ee6696038c241466e120edefd193253a7 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 5 Mar 2025 12:04:17 +0530 Subject: [PATCH 1254/1614] fix: Add permission check in POS's `Toggle Recent Orders` (backport #46010) (#46274) fix: use get_list to check permissions (cherry picked from commit a08bc6b913b932231abfd72ebf3acf82cf32288c) Co-authored-by: Sanket322 --- erpnext/selling/page/point_of_sale/point_of_sale.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/selling/page/point_of_sale/point_of_sale.py b/erpnext/selling/page/point_of_sale/point_of_sale.py index b86a87983d5..7f758f4c8db 100644 --- a/erpnext/selling/page/point_of_sale/point_of_sale.py +++ b/erpnext/selling/page/point_of_sale/point_of_sale.py @@ -320,13 +320,13 @@ def get_past_order_list(search_term, status, limit=20): invoice_list = [] if search_term and status: - invoices_by_customer = frappe.db.get_all( + invoices_by_customer = frappe.db.get_list( "POS Invoice", filters={"customer": ["like", f"%{search_term}%"], "status": status}, fields=fields, page_length=limit, ) - invoices_by_name = frappe.db.get_all( + invoices_by_name = frappe.db.get_list( "POS Invoice", filters={"name": ["like", f"%{search_term}%"], "status": status}, fields=fields, @@ -335,7 +335,7 @@ def get_past_order_list(search_term, status, limit=20): invoice_list = invoices_by_customer + invoices_by_name elif status: - invoice_list = frappe.db.get_all( + invoice_list = frappe.db.get_list( "POS Invoice", filters={"status": status}, fields=fields, page_length=limit ) From d0b8e0da8de036445e07301f6dc06ae8089f350c Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Thu, 20 Feb 2025 15:03:19 +0530 Subject: [PATCH 1255/1614] perf: replace if function in query (cherry picked from commit 5e66231ca4e8dc93659f229843fd632181408ca9) --- erpnext/projects/doctype/project/project.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/erpnext/projects/doctype/project/project.py b/erpnext/projects/doctype/project/project.py index 4ed8ffc0077..be3190ec00d 100644 --- a/erpnext/projects/doctype/project/project.py +++ b/erpnext/projects/doctype/project/project.py @@ -325,10 +325,10 @@ class Project(Document): # nosemgrep total_billed_amount = frappe.db.sql( """select sum(base_net_amount) - from `tabSales Invoice Item` si_item, `tabSales Invoice` si - where si_item.parent = si.name - and if(si_item.project, si_item.project, si.project) = %s - and si.docstatus=1""", + from `tabSales Invoice Item` si_item + join `tabSales Invoice` si on si_item.parent = si.name + where (si_item.project = %s or (si_item.project is null and si.project = %s)) + and si.docstatus = 1""", self.name, ) From 1790bcc6d1901e8f52b3efbcd80801efb876019c Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Thu, 20 Feb 2025 15:28:13 +0530 Subject: [PATCH 1256/1614] fix: syntax error (cherry picked from commit 2f1e253e19109cd12d25a3e7d643344663bcf340) --- erpnext/projects/doctype/project/project.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/projects/doctype/project/project.py b/erpnext/projects/doctype/project/project.py index be3190ec00d..8c762be5f6c 100644 --- a/erpnext/projects/doctype/project/project.py +++ b/erpnext/projects/doctype/project/project.py @@ -327,9 +327,9 @@ class Project(Document): """select sum(base_net_amount) from `tabSales Invoice Item` si_item join `tabSales Invoice` si on si_item.parent = si.name - where (si_item.project = %s or (si_item.project is null and si.project = %s)) + where (si_item.project = %(name)s or (si_item.project is null and si.project = %(name)s)) and si.docstatus = 1""", - self.name, + {"name": self.name}, ) self.total_billed_amount = total_billed_amount and total_billed_amount[0][0] or 0 From 7437cea458cde7e52ed8b10d34abe38e3e966564 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Fri, 21 Feb 2025 11:02:38 +0530 Subject: [PATCH 1257/1614] fix: revamp logic (split parent and child) (cherry picked from commit f7594e2ff99a1fbc4b320b7aa4372ea7389068cc) --- erpnext/projects/doctype/project/project.py | 28 +++++++++++++++------ 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/erpnext/projects/doctype/project/project.py b/erpnext/projects/doctype/project/project.py index 8c762be5f6c..f7653d92d63 100644 --- a/erpnext/projects/doctype/project/project.py +++ b/erpnext/projects/doctype/project/project.py @@ -322,17 +322,31 @@ class Project(Document): self.total_sales_amount = total_sales_amount and total_sales_amount[0][0] or 0 def update_billed_amount(self): - # nosemgrep + self.total_billed_amount = self.get_billed_amount_from_parent() + self.get_billed_amount_from_child() + + def get_billed_amount_from_parent(self): total_billed_amount = frappe.db.sql( """select sum(base_net_amount) - from `tabSales Invoice Item` si_item - join `tabSales Invoice` si on si_item.parent = si.name - where (si_item.project = %(name)s or (si_item.project is null and si.project = %(name)s)) - and si.docstatus = 1""", - {"name": self.name}, + from `tabSales Invoice` si join `tabSales Invoice Item` si_item on si_item.parent = si.name + where si_item.project is null + and si.project is not null + and si.project = %s + and si.docstatus = 1""", + self.name, ) - self.total_billed_amount = total_billed_amount and total_billed_amount[0][0] or 0 + return total_billed_amount and total_billed_amount[0][0] or 0 + + def get_billed_amount_from_child(self): + total_billed_amount = frappe.db.sql( + """select sum(base_net_amount) + from `tabSales Invoice Item` + where project = %s + and docstatus = 1""", + self.name, + ) + + return total_billed_amount and total_billed_amount[0][0] or 0 def after_rename(self, old_name, new_name, merge=False): if old_name == self.copied_from: From d8a1d0e9080dcfd96453a06a113fe8af4319a713 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Sun, 23 Feb 2025 22:26:01 +0530 Subject: [PATCH 1258/1614] test: added test (cherry picked from commit 6073f5a6f95f5f0fdeae21e0bdd869eddf34cb85) --- .../sales_invoice/test_sales_invoice.py | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py index 1c33246ee68..99867e94fcb 100644 --- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py @@ -4246,6 +4246,31 @@ class TestSalesInvoice(FrappeTestCase): doc = frappe.get_doc("Project", project.name) self.assertEqual(doc.total_billed_amount, si.grand_total) + def test_total_billed_amount_with_different_projects(self): + # This test case is for checking the scenario where project is set at document level and for **some** child items only, not all + from copy import copy + + si = create_sales_invoice(do_not_submit=True) + + project = frappe.new_doc("Project") + project.company = "_Test Company" + project.project_name = "Test Total Billed Amount" + project.save() + + si.project = project.name + si.items.append(copy(si.items[0])) + si.items.append(copy(si.items[0])) + si.items[0].project = project.name + si.items[1].project = project.name + # Not setting project on last item + si.items[1].insert() + si.items[2].insert() + si.submit() + + project.reload() + self.assertIsNone(si.items[2].project) + self.assertEqual(project.total_billed_amount, 300) + def test_pos_returns_with_party_account_currency(self): from erpnext.accounts.doctype.sales_invoice.sales_invoice import make_sales_return From 88234bbf9a6ca7c42ff093469a323ac751112185 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 5 Mar 2025 12:19:31 +0530 Subject: [PATCH 1259/1614] fix: Include additional account types for Expense Account in LCV (backport #46206) (#46296) fix: Include additional account types for Expense Account in LCV (#46206) fix: additional account types in filters for the Expense account selection (cherry picked from commit 59e99f167d4abbd1959092a7d606d782940d7827) Co-authored-by: Priyansh Shah <108476017+priyanshshah2442@users.noreply.github.com> --- erpnext/public/js/utils/landed_taxes_and_charges_common.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/erpnext/public/js/utils/landed_taxes_and_charges_common.js b/erpnext/public/js/utils/landed_taxes_and_charges_common.js index 2cb30160453..7d801ca91e6 100644 --- a/erpnext/public/js/utils/landed_taxes_and_charges_common.js +++ b/erpnext/public/js/utils/landed_taxes_and_charges_common.js @@ -14,6 +14,10 @@ erpnext.landed_cost_taxes_and_charges = { "Income Account", "Expenses Included In Valuation", "Expenses Included In Asset Valuation", + "Expense Account", + "Direct Expense", + "Indirect Expense", + "Stock Received But Not Billed", ], ], company: frm.doc.company, From d10add4b1ecddff754e822d3558b9917117baf17 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Tue, 4 Mar 2025 11:48:28 +0530 Subject: [PATCH 1260/1614] fix: delivery note from sales order uom conversion mistake (cherry picked from commit 49a43d355d346a492d88bb18b3a76e8d5a255abd) # Conflicts: # erpnext/selling/doctype/sales_order/sales_order.py --- erpnext/selling/doctype/sales_order/sales_order.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py index effc3f3894d..4e19526c06a 100755 --- a/erpnext/selling/doctype/sales_order/sales_order.py +++ b/erpnext/selling/doctype/sales_order/sales_order.py @@ -1044,7 +1044,12 @@ def make_delivery_note(source_name, target_doc=None, kwargs=None): ignore_permissions=True, ) +<<<<<<< HEAD dn_item.qty = flt(sre.reserved_qty) * flt(dn_item.get("conversion_factor", 1)) +======= + dn_item.qty = flt(sre.reserved_qty) / flt(dn_item.get("conversion_factor", 1)) + dn_item.warehouse = sre.warehouse +>>>>>>> 49a43d355d (fix: delivery note from sales order uom conversion mistake) if sre.reservation_based_on == "Serial and Batch" and (sre.has_serial_no or sre.has_batch_no): dn_item.serial_and_batch_bundle = get_ssb_bundle_for_voucher(sre) From d02d0059139f088b343962ed20932e86216ceb6d Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 5 Mar 2025 12:40:13 +0530 Subject: [PATCH 1261/1614] fix: use valuation method from settings in stock ageing report (backport #46068) (#46297) fix: use valuation method from settings in stock ageing report (cherry picked from commit da09c278c8869fa671bdcd1c4844d169b0bb085a) Co-authored-by: Mihir Kandoi --- .../stock/report/stock_ageing/stock_ageing.py | 27 +++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/erpnext/stock/report/stock_ageing/stock_ageing.py b/erpnext/stock/report/stock_ageing/stock_ageing.py index cc597e14196..0edce832aec 100644 --- a/erpnext/stock/report/stock_ageing/stock_ageing.py +++ b/erpnext/stock/report/stock_ageing/stock_ageing.py @@ -51,6 +51,10 @@ def format_report_data(filters: Filters, item_details: dict, to_date: str) -> li latest_age = date_diff(to_date, fifo_queue[-1][1]) range_values = get_range_age(filters, fifo_queue, to_date, item_dict) + check_and_replace_valuations_if_moving_average( + range_values, details.valuation_method, details.valuation_rate + ) + row = [details.name, details.item_name, details.description, details.item_group, details.brand] if filters.get("show_warehouse_wise_stock"): @@ -72,6 +76,15 @@ def format_report_data(filters: Filters, item_details: dict, to_date: str) -> li return data +def check_and_replace_valuations_if_moving_average(range_values, item_valuation_method, valuation_rate): + if item_valuation_method == "Moving Average" or ( + not item_valuation_method + and frappe.db.get_single_value("Stock Settings", "valuation_method") == "Moving Average" + ): + for i in range(0, len(range_values), 2): + range_values[i + 1] = range_values[i] * valuation_rate + + def get_average_age(fifo_queue: list, to_date: str) -> float: batch_age = age_qty = total_qty = 0.0 for batch in fifo_queue: @@ -267,7 +280,7 @@ class FIFOSlots: self.__update_balances(d, key) - # Note that stock_ledger_entries is an iterator, you can not reuse it like a list + # Note that stock_ledger_entries is an iterator, you can not reuse it like a list del stock_ledger_entries if not self.filters.get("show_warehouse_wise_stock"): @@ -396,6 +409,7 @@ class FIFOSlots: self.item_details[key]["total_qty"] += row.actual_qty self.item_details[key]["has_serial_no"] = row.has_serial_no + self.item_details[key]["details"].valuation_rate = row.valuation_rate def __aggregate_details_by_item(self, wh_wise_data: dict) -> dict: "Aggregate Item-Wh wise data into single Item entry." @@ -437,8 +451,10 @@ class FIFOSlots: item.description, item.stock_uom, item.has_serial_no, + item.valuation_method, sle.actual_qty, sle.stock_value_difference, + sle.valuation_rate, sle.posting_date, sle.voucher_type, sle.voucher_no, @@ -506,7 +522,14 @@ class FIFOSlots: item_table = frappe.qb.DocType("Item") item = frappe.qb.from_("Item").select( - "name", "item_name", "description", "stock_uom", "brand", "item_group", "has_serial_no" + "name", + "item_name", + "description", + "stock_uom", + "brand", + "item_group", + "has_serial_no", + "valuation_method", ) if self.filters.get("item_code"): From c5717b983da7e0a8e117f2f4e1dd89133ce58f98 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Tue, 18 Feb 2025 18:19:49 +0530 Subject: [PATCH 1262/1614] fix: rename some sla fields (cherry picked from commit baa0dd1235e94e94cb5fca56212f2cb110e690c0) # Conflicts: # erpnext/patches.txt --- erpnext/patches.txt | 5 +++ .../patches/__init__.py | 0 .../patches/rename_sla_fields.py | 9 +++++ .../service_level_agreement.py | 36 ++++++++++--------- 4 files changed, 33 insertions(+), 17 deletions(-) create mode 100644 erpnext/support/doctype/service_level_agreement/patches/__init__.py create mode 100644 erpnext/support/doctype/service_level_agreement/patches/rename_sla_fields.py diff --git a/erpnext/patches.txt b/erpnext/patches.txt index df1b885ad18..936bd74874f 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -392,6 +392,11 @@ erpnext.patches.v15_0.migrate_checkbox_to_select_for_reconciliation_effect erpnext.patches.v15_0.sync_auto_reconcile_config execute:frappe.db.set_single_value("Accounts Settings", "exchange_gain_loss_posting_date", "Payment") erpnext.patches.v14_0.disable_add_row_in_gross_profit +<<<<<<< HEAD erpnext.patches.v15_0.set_difference_amount_in_asset_value_adjustment erpnext.patches.v14_0.update_posting_datetime erpnext.stock.doctype.stock_ledger_entry.patches.ensure_sle_indexes +======= +erpnext.patches.v14_0.update_posting_datetime +erpnext.support.doctype.service_level_agreement.patches.rename_sla_fields +>>>>>>> baa0dd1235 (fix: rename some sla fields) diff --git a/erpnext/support/doctype/service_level_agreement/patches/__init__.py b/erpnext/support/doctype/service_level_agreement/patches/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/erpnext/support/doctype/service_level_agreement/patches/rename_sla_fields.py b/erpnext/support/doctype/service_level_agreement/patches/rename_sla_fields.py new file mode 100644 index 00000000000..8f3146da345 --- /dev/null +++ b/erpnext/support/doctype/service_level_agreement/patches/rename_sla_fields.py @@ -0,0 +1,9 @@ +import frappe +from frappe.custom.doctype.custom_field.custom_field import rename_fieldname + + +def execute(): + doctypes = frappe.get_all("Service Level Agreement", pluck="document_type") + for doctype in doctypes: + rename_fieldname(doctype + "-resolution_by", "sla_resolution_by") + rename_fieldname(doctype + "-resolution_date", "sla_resolution_date") diff --git a/erpnext/support/doctype/service_level_agreement/service_level_agreement.py b/erpnext/support/doctype/service_level_agreement/service_level_agreement.py index 011a5bc371f..3433a842ea8 100644 --- a/erpnext/support/doctype/service_level_agreement/service_level_agreement.py +++ b/erpnext/support/doctype/service_level_agreement/service_level_agreement.py @@ -514,7 +514,7 @@ def apply(doc, method=None): def remove_sla_if_applied(doc): doc.service_level_agreement = None doc.response_by = None - doc.resolution_by = None + doc.sla_resolution_by = None def process_sla(doc, sla): @@ -557,7 +557,7 @@ def handle_status_change(doc, apply_sla_for_resolution): # In case issue was closed and after few days it has been opened # The hold time should be calculated from resolution_date - on_hold_since = doc.resolution_date or doc.on_hold_since + on_hold_since = doc.sla_resolution_date or doc.on_hold_since if on_hold_since: current_hold_hours = time_diff_in_seconds(now_time, on_hold_since) doc.total_hold_time = (doc.total_hold_time or 0) + current_hold_hours @@ -582,7 +582,7 @@ def handle_status_change(doc, apply_sla_for_resolution): # Open to Closed if is_open_status(prev_status) and is_fulfilled_status(doc.status): # Issue is closed -> Set resolution_date - doc.resolution_date = now_time + doc.sla_resolution_date = now_time set_resolution_time(doc) # Closed to Open @@ -606,7 +606,7 @@ def handle_status_change(doc, apply_sla_for_resolution): calculate_hold_hours() # Issue is closed -> Set resolution_date if apply_sla_for_resolution: - doc.resolution_date = now_time + doc.sla_resolution_date = now_time set_resolution_time(doc) @@ -713,7 +713,7 @@ def get_support_days(service_level): def set_resolution_time(doc): start_date_time = get_datetime(doc.get("service_level_agreement_creation") or doc.creation) if doc.meta.has_field("resolution_time"): - doc.resolution_time = time_diff_in_seconds(doc.resolution_date, start_date_time) + doc.resolution_time = time_diff_in_seconds(doc.sla_resolution_date, start_date_time) # total time taken by a user to close the issue apart from wait_time if not doc.meta.has_field("user_resolution_time"): @@ -737,7 +737,7 @@ def set_resolution_time(doc): pending_time.append(wait_time) total_pending_time = sum(pending_time) - resolution_time_in_secs = time_diff_in_seconds(doc.resolution_date, start_date_time) + resolution_time_in_secs = time_diff_in_seconds(doc.sla_resolution_date, start_date_time) doc.user_resolution_time = resolution_time_in_secs - total_pending_time @@ -793,8 +793,8 @@ def reset_service_level_agreement(doctype: str, docname: str, reason, user): def reset_resolution_metrics(doc): - if doc.meta.has_field("resolution_date"): - doc.resolution_date = None + if doc.meta.has_field("sla_resolution_date"): + doc.sla_resolution_date = None if doc.meta.has_field("resolution_time"): doc.resolution_time = None @@ -861,8 +861,8 @@ def on_communication_update(doc, status): def reset_expected_response_and_resolution(doc): if doc.meta.has_field("first_responded_on") and not doc.get("first_responded_on"): doc.response_by = None - if doc.meta.has_field("resolution_by") and not doc.get("resolution_date"): - doc.resolution_by = None + if doc.meta.has_field("sla_resolution_by") and not doc.get("sla_resolution_date"): + doc.sla_resolution_by = None def set_response_by(doc, start_date_time, priority): @@ -879,12 +879,14 @@ def set_response_by(doc, start_date_time, priority): def set_resolution_by(doc, start_date_time, priority): - if doc.meta.has_field("resolution_by"): - doc.resolution_by = get_expected_time_for( + if doc.meta.has_field("sla_resolution_by"): + doc.sla_resolution_by = get_expected_time_for( parameter="resolution", service_level=priority, start_date_time=start_date_time ) if doc.meta.has_field("total_hold_time") and doc.get("total_hold_time"): - doc.resolution_by = add_to_date(doc.resolution_by, seconds=round(doc.get("total_hold_time"))) + doc.sla_resolution_by = add_to_date( + doc.sla_resolution_by, seconds=round(doc.get("total_hold_time")) + ) def record_assigned_users_on_failure(doc): @@ -943,7 +945,7 @@ def get_service_level_agreement_fields(): "read_only": 1, }, { - "fieldname": "resolution_by", + "fieldname": "sla_resolution_by", "fieldtype": "Datetime", "label": "Resolution By", "read_only": 1, @@ -957,7 +959,7 @@ def get_service_level_agreement_fields(): }, { "depends_on": "eval:!doc.__islocal", - "fieldname": "resolution_date", + "fieldname": "sla_resolution_date", "fieldtype": "Datetime", "label": "Resolution Date", "no_copy": 1, @@ -977,9 +979,9 @@ def update_agreement_status(doc, apply_sla_for_resolution): if apply_sla_for_resolution: if doc.meta.has_field("first_responded_on") and not doc.get("first_responded_on"): doc.agreement_status = "First Response Due" - elif doc.meta.has_field("resolution_date") and not doc.get("resolution_date"): + elif doc.meta.has_field("sla_resolution_date") and not doc.get("sla_resolution_date"): doc.agreement_status = "Resolution Due" - elif get_datetime(doc.get("resolution_date")) <= get_datetime(doc.get("resolution_by")): + elif get_datetime(doc.get("sla_resolution_date")) <= get_datetime(doc.get("sla_resolution_by")): doc.agreement_status = "Fulfilled" else: doc.agreement_status = "Failed" From d41303961c6ec673966bf4884d20c1a3fd3fc756 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Tue, 18 Feb 2025 20:40:50 +0530 Subject: [PATCH 1263/1614] fix: tests (cherry picked from commit 1b831e9abd0a98f0bf15eb0ff6da92f694d21026) --- .../service_level_agreement/test_service_level_agreement.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/support/doctype/service_level_agreement/test_service_level_agreement.py b/erpnext/support/doctype/service_level_agreement/test_service_level_agreement.py index 47ea251b0fe..cabd38f6427 100644 --- a/erpnext/support/doctype/service_level_agreement/test_service_level_agreement.py +++ b/erpnext/support/doctype/service_level_agreement/test_service_level_agreement.py @@ -227,7 +227,7 @@ class TestServiceLevelAgreement(unittest.TestCase): self.assertEqual(lead.service_level_agreement, lead_sla.name) self.assertEqual(lead.response_by, datetime.datetime(2019, 3, 4, 16, 0)) - self.assertEqual(lead.resolution_by, datetime.datetime(2019, 3, 4, 18, 0)) + self.assertEqual(lead.sla_resolution_by, datetime.datetime(2019, 3, 4, 18, 0)) frappe.flags.current_time = datetime.datetime(2019, 3, 4, 15, 0) lead.reload() @@ -268,7 +268,7 @@ class TestServiceLevelAgreement(unittest.TestCase): lead.reload() self.assertEqual(flt(lead.total_hold_time, 2), 3000) - self.assertEqual(lead.resolution_by, datetime.datetime(2020, 3, 4, 16, 50)) + self.assertEqual(lead.sla_resolution_by, datetime.datetime(2020, 3, 4, 16, 50)) def test_failed_sla_for_response_only(self): doctype = "Lead" From 46b0734d6f2c0b6eaab754f6755d5510f6fa7b6b Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Tue, 18 Feb 2025 21:24:53 +0530 Subject: [PATCH 1264/1614] fix: tests (cherry picked from commit 019303dd12fb6ff9ec02bb6ad17b35e4e6e76191) # Conflicts: # erpnext/support/doctype/issue/issue.json --- erpnext/support/doctype/issue/issue.json | 42 ++++++++++--------- erpnext/support/doctype/issue/issue.py | 4 +- erpnext/support/doctype/issue/test_issue.py | 38 ++++++++--------- .../patches/rename_sla_fields.py | 4 ++ 4 files changed, 48 insertions(+), 40 deletions(-) diff --git a/erpnext/support/doctype/issue/issue.json b/erpnext/support/doctype/issue/issue.json index 3ff7d02f1ae..c048eb1d5cd 100644 --- a/erpnext/support/doctype/issue/issue.json +++ b/erpnext/support/doctype/issue/issue.json @@ -27,7 +27,7 @@ "reset_service_level_agreement", "cb", "agreement_status", - "resolution_by", + "sla_resolution_by", "service_level_agreement_creation", "on_hold_since", "total_hold_time", @@ -41,7 +41,7 @@ "column_break1", "opening_date", "opening_time", - "resolution_date", + "sla_resolution_date", "resolution_time", "user_resolution_time", "additional_info", @@ -176,13 +176,6 @@ "options": "fa fa-pushpin", "read_only": 1 }, - { - "depends_on": "eval: doc.status != 'Replied' && doc.service_level_agreement;", - "fieldname": "resolution_by", - "fieldtype": "Datetime", - "label": "Resolution By", - "read_only": 1 - }, { "collapsible": 1, "fieldname": "response", @@ -287,16 +280,6 @@ "oldfieldtype": "Time", "read_only": 1 }, - { - "depends_on": "eval:!doc.__islocal", - "fieldname": "resolution_date", - "fieldtype": "Datetime", - "label": "Resolution Date", - "no_copy": 1, - "oldfieldname": "resolution_date", - "oldfieldtype": "Date", - "read_only": 1 - }, { "fieldname": "content_type", "fieldtype": "Data", @@ -386,12 +369,33 @@ "fieldtype": "Duration", "label": "First Response Time", "read_only": 1 + }, + { + "depends_on": "eval: doc.status != 'Replied' && doc.service_level_agreement;", + "fieldname": "sla_resolution_by", + "fieldtype": "Datetime", + "label": "Resolution By", + "read_only": 1 + }, + { + "depends_on": "eval:!doc.__islocal", + "fieldname": "sla_resolution_date", + "fieldtype": "Datetime", + "label": "Resolution Date", + "no_copy": 1, + "oldfieldname": "resolution_date", + "oldfieldtype": "Date", + "read_only": 1 } ], "icon": "fa fa-ticket", "idx": 7, "links": [], +<<<<<<< HEAD "modified": "2021-11-24 13:13:10.276630", +======= + "modified": "2025-02-18 21:18:52.797745", +>>>>>>> 019303dd12 (fix: tests) "modified_by": "Administrator", "module": "Support", "name": "Issue", diff --git a/erpnext/support/doctype/issue/issue.py b/erpnext/support/doctype/issue/issue.py index aeaf28c169c..22630d80f38 100644 --- a/erpnext/support/doctype/issue/issue.py +++ b/erpnext/support/doctype/issue/issue.py @@ -48,13 +48,13 @@ class Issue(Document): priority: DF.Link | None project: DF.Link | None raised_by: DF.Data | None - resolution_by: DF.Datetime | None - resolution_date: DF.Datetime | None resolution_details: DF.TextEditor | None resolution_time: DF.Duration | None response_by: DF.Datetime | None service_level_agreement: DF.Link | None service_level_agreement_creation: DF.Datetime | None + sla_resolution_by: DF.Datetime | None + sla_resolution_date: DF.Datetime | None status: DF.Literal["Open", "Replied", "On Hold", "Resolved", "Closed"] subject: DF.Data total_hold_time: DF.Duration | None diff --git a/erpnext/support/doctype/issue/test_issue.py b/erpnext/support/doctype/issue/test_issue.py index acad115f626..c334a2251b3 100644 --- a/erpnext/support/doctype/issue/test_issue.py +++ b/erpnext/support/doctype/issue/test_issue.py @@ -33,48 +33,48 @@ class TestIssue(TestSetUp): issue = make_issue(creation, "_Test Customer", 1) self.assertEqual(issue.response_by, get_datetime("2019-03-04 14:00")) - self.assertEqual(issue.resolution_by, get_datetime("2019-03-04 15:00")) + self.assertEqual(issue.sla_resolution_by, get_datetime("2019-03-04 15:00")) # make issue with customer_group specific SLA create_customer("__Test Customer", "_Test SLA Customer Group", "__Test SLA Territory") issue = make_issue(creation, "__Test Customer", 2) self.assertEqual(issue.response_by, get_datetime("2019-03-04 14:00")) - self.assertEqual(issue.resolution_by, get_datetime("2019-03-04 15:00")) + self.assertEqual(issue.sla_resolution_by, get_datetime("2019-03-04 15:00")) # make issue with territory specific SLA create_customer("___Test Customer", "__Test SLA Customer Group", "_Test SLA Territory") issue = make_issue(creation, "___Test Customer", 3) self.assertEqual(issue.response_by, get_datetime("2019-03-04 14:00")) - self.assertEqual(issue.resolution_by, get_datetime("2019-03-04 15:00")) + self.assertEqual(issue.sla_resolution_by, get_datetime("2019-03-04 15:00")) # make issue with default SLA issue = make_issue(creation=creation, index=4) self.assertEqual(issue.response_by, get_datetime("2019-03-04 16:00")) - self.assertEqual(issue.resolution_by, get_datetime("2019-03-04 18:00")) + self.assertEqual(issue.sla_resolution_by, get_datetime("2019-03-04 18:00")) # make issue with default SLA before working hours creation = get_datetime("2019-03-04 7:00") issue = make_issue(creation=creation, index=5) self.assertEqual(issue.response_by, get_datetime("2019-03-04 14:00")) - self.assertEqual(issue.resolution_by, get_datetime("2019-03-04 16:00")) + self.assertEqual(issue.sla_resolution_by, get_datetime("2019-03-04 16:00")) # make issue with default SLA after working hours creation = get_datetime("2019-03-04 20:00") issue = make_issue(creation, index=6) self.assertEqual(issue.response_by, get_datetime("2019-03-06 14:00")) - self.assertEqual(issue.resolution_by, get_datetime("2019-03-06 16:00")) + self.assertEqual(issue.sla_resolution_by, get_datetime("2019-03-06 16:00")) # make issue with default SLA next day creation = get_datetime("2019-03-04 14:00") issue = make_issue(creation=creation, index=7) self.assertEqual(issue.response_by, get_datetime("2019-03-04 18:00")) - self.assertEqual(issue.resolution_by, get_datetime("2019-03-06 12:00")) + self.assertEqual(issue.sla_resolution_by, get_datetime("2019-03-06 12:00")) frappe.flags.current_time = get_datetime("2019-03-04 15:00") issue.reload() @@ -98,7 +98,7 @@ class TestIssue(TestSetUp): issue.save() self.assertEqual(issue.on_hold_since, frappe.flags.current_time) - self.assertFalse(issue.resolution_by) + self.assertFalse(issue.sla_resolution_by) creation = get_datetime("2020-03-04 5:00") frappe.flags.current_time = get_datetime("2020-03-04 5:00") @@ -106,7 +106,7 @@ class TestIssue(TestSetUp): issue.reload() self.assertEqual(flt(issue.total_hold_time, 2), 2700) - self.assertEqual(issue.resolution_by, get_datetime("2020-03-04 16:45")) + self.assertEqual(issue.sla_resolution_by, get_datetime("2020-03-04 16:45")) creation = get_datetime("2020-03-04 5:05") create_communication(issue.name, "test@admin.com", "Sent", creation) @@ -140,8 +140,8 @@ class TestIssue(TestSetUp): issue.status = "Closed" issue.save() - self.assertEqual(issue.resolution_by, get_datetime("2021-11-22 06:00:00")) - self.assertEqual(issue.resolution_date, get_datetime("2021-11-22 01:00:00")) + self.assertEqual(issue.sla_resolution_by, get_datetime("2021-11-22 06:00:00")) + self.assertEqual(issue.sla_resolution_date, get_datetime("2021-11-22 01:00:00")) self.assertEqual(issue.agreement_status, "Fulfilled") def test_issue_open_after_closed(self): @@ -153,7 +153,7 @@ class TestIssue(TestSetUp): create_communication(issue.name, "test@example.com", "Received", frappe.flags.current_time) self.assertEqual(issue.agreement_status, "First Response Due") self.assertEqual(issue.response_by, get_datetime("2021-11-01 17:00")) - self.assertEqual(issue.resolution_by, get_datetime("2021-11-01 19:00")) + self.assertEqual(issue.sla_resolution_by, get_datetime("2021-11-01 19:00")) # Replied on → 2 pm frappe.flags.current_time = get_datetime("2021-11-01 14:00") @@ -173,7 +173,7 @@ class TestIssue(TestSetUp): # Hold Time + 1 Hrs self.assertEqual(issue.total_hold_time, 3600) # Resolution By should increase by one hrs - self.assertEqual(issue.resolution_by, get_datetime("2021-11-01 20:00")) + self.assertEqual(issue.sla_resolution_by, get_datetime("2021-11-01 20:00")) # Replied on → 4 pm, Open → 1 hr, Resolution Due → 8 pm frappe.flags.current_time = get_datetime("2021-11-01 16:00") @@ -190,9 +190,9 @@ class TestIssue(TestSetUp): # Hold Time + 6 Hrs self.assertEqual(issue.total_hold_time, 3600 + 21600) # Resolution By should increase by 6 hrs - self.assertEqual(issue.resolution_by, get_datetime("2021-11-02 02:00")) + self.assertEqual(issue.sla_resolution_by, get_datetime("2021-11-02 02:00")) self.assertEqual(issue.agreement_status, "Fulfilled") - self.assertEqual(issue.resolution_date, frappe.flags.current_time) + self.assertEqual(issue.sla_resolution_date, frappe.flags.current_time) # Customer Open → 3 am i.e after resolution by is crossed frappe.flags.current_time = get_datetime("2021-11-02 03:00") @@ -201,17 +201,17 @@ class TestIssue(TestSetUp): # Since issue was Resolved, Resolution By should be increased by 5 hrs (3am - 10pm) self.assertEqual(issue.total_hold_time, 3600 + 21600 + 18000) # Resolution By should increase by 5 hrs - self.assertEqual(issue.resolution_by, get_datetime("2021-11-02 07:00")) + self.assertEqual(issue.sla_resolution_by, get_datetime("2021-11-02 07:00")) self.assertEqual(issue.agreement_status, "Resolution Due") - self.assertFalse(issue.resolution_date) + self.assertFalse(issue.sla_resolution_date) # We Closed → 4 am, SLA should be Fulfilled frappe.flags.current_time = get_datetime("2021-11-02 04:00") issue.status = "Closed" issue.save() - self.assertEqual(issue.resolution_by, get_datetime("2021-11-02 07:00")) + self.assertEqual(issue.sla_resolution_by, get_datetime("2021-11-02 07:00")) self.assertEqual(issue.agreement_status, "Fulfilled") - self.assertEqual(issue.resolution_date, frappe.flags.current_time) + self.assertEqual(issue.sla_resolution_date, frappe.flags.current_time) def test_recording_of_assignment_on_first_reponse_failure(self): from frappe.desk.form.assign_to import add as add_assignment diff --git a/erpnext/support/doctype/service_level_agreement/patches/rename_sla_fields.py b/erpnext/support/doctype/service_level_agreement/patches/rename_sla_fields.py index 8f3146da345..5e3e92d85c2 100644 --- a/erpnext/support/doctype/service_level_agreement/patches/rename_sla_fields.py +++ b/erpnext/support/doctype/service_level_agreement/patches/rename_sla_fields.py @@ -1,5 +1,6 @@ import frappe from frappe.custom.doctype.custom_field.custom_field import rename_fieldname +from frappe.model.utils.rename_field import rename_field def execute(): @@ -7,3 +8,6 @@ def execute(): for doctype in doctypes: rename_fieldname(doctype + "-resolution_by", "sla_resolution_by") rename_fieldname(doctype + "-resolution_date", "sla_resolution_date") + + rename_field("Issue", "resolution_by", "sla_resolution_by") + rename_field("Issue", "resolution_date", "sla_resolution_date") From af49f5a8affe9cdfa5bacecf37be200d2c19cade Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Wed, 19 Feb 2025 13:10:13 +0530 Subject: [PATCH 1265/1614] fix: patch path (cherry picked from commit dcec446e558ae83e93c8d036cb23f4460ec0891a) # Conflicts: # erpnext/patches.txt --- erpnext/patches.txt | 4 ++++ .../patches => patches/v15_0}/rename_sla_fields.py | 0 .../doctype/service_level_agreement/patches/__init__.py | 0 3 files changed, 4 insertions(+) rename erpnext/{support/doctype/service_level_agreement/patches => patches/v15_0}/rename_sla_fields.py (100%) delete mode 100644 erpnext/support/doctype/service_level_agreement/patches/__init__.py diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 936bd74874f..2f7fbac904d 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -395,8 +395,12 @@ erpnext.patches.v14_0.disable_add_row_in_gross_profit <<<<<<< HEAD erpnext.patches.v15_0.set_difference_amount_in_asset_value_adjustment erpnext.patches.v14_0.update_posting_datetime +<<<<<<< HEAD erpnext.stock.doctype.stock_ledger_entry.patches.ensure_sle_indexes ======= erpnext.patches.v14_0.update_posting_datetime erpnext.support.doctype.service_level_agreement.patches.rename_sla_fields >>>>>>> baa0dd1235 (fix: rename some sla fields) +======= +erpnext.patches.v15_0.rename_sla_fields +>>>>>>> dcec446e55 (fix: patch path) diff --git a/erpnext/support/doctype/service_level_agreement/patches/rename_sla_fields.py b/erpnext/patches/v15_0/rename_sla_fields.py similarity index 100% rename from erpnext/support/doctype/service_level_agreement/patches/rename_sla_fields.py rename to erpnext/patches/v15_0/rename_sla_fields.py diff --git a/erpnext/support/doctype/service_level_agreement/patches/__init__.py b/erpnext/support/doctype/service_level_agreement/patches/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 From 6b56724436c8200bfa0a4cf6d30c8858b2af2ce6 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Wed, 5 Mar 2025 12:46:52 +0530 Subject: [PATCH 1266/1614] chore: resolve conflicts --- erpnext/selling/doctype/sales_order/sales_order.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py index 4e19526c06a..74e2328be24 100755 --- a/erpnext/selling/doctype/sales_order/sales_order.py +++ b/erpnext/selling/doctype/sales_order/sales_order.py @@ -1044,12 +1044,7 @@ def make_delivery_note(source_name, target_doc=None, kwargs=None): ignore_permissions=True, ) -<<<<<<< HEAD - dn_item.qty = flt(sre.reserved_qty) * flt(dn_item.get("conversion_factor", 1)) -======= dn_item.qty = flt(sre.reserved_qty) / flt(dn_item.get("conversion_factor", 1)) - dn_item.warehouse = sre.warehouse ->>>>>>> 49a43d355d (fix: delivery note from sales order uom conversion mistake) if sre.reservation_based_on == "Serial and Batch" and (sre.has_serial_no or sre.has_batch_no): dn_item.serial_and_batch_bundle = get_ssb_bundle_for_voucher(sre) From f29c43811c6dc3c61698d78a9a3cb1476b98cf0a Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Wed, 5 Mar 2025 12:55:10 +0530 Subject: [PATCH 1267/1614] chore: resolve conflicts --- erpnext/patches.txt | 8 -------- 1 file changed, 8 deletions(-) diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 2f7fbac904d..6a41b007308 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -392,15 +392,7 @@ erpnext.patches.v15_0.migrate_checkbox_to_select_for_reconciliation_effect erpnext.patches.v15_0.sync_auto_reconcile_config execute:frappe.db.set_single_value("Accounts Settings", "exchange_gain_loss_posting_date", "Payment") erpnext.patches.v14_0.disable_add_row_in_gross_profit -<<<<<<< HEAD erpnext.patches.v15_0.set_difference_amount_in_asset_value_adjustment erpnext.patches.v14_0.update_posting_datetime -<<<<<<< HEAD erpnext.stock.doctype.stock_ledger_entry.patches.ensure_sle_indexes -======= -erpnext.patches.v14_0.update_posting_datetime -erpnext.support.doctype.service_level_agreement.patches.rename_sla_fields ->>>>>>> baa0dd1235 (fix: rename some sla fields) -======= erpnext.patches.v15_0.rename_sla_fields ->>>>>>> dcec446e55 (fix: patch path) From 0b50f1a9c33361bd13603fe1472acfbb608541d7 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Wed, 5 Mar 2025 12:57:53 +0530 Subject: [PATCH 1268/1614] chore: fix pre-commit/linter error --- erpnext/stock/get_item_details.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py index 23e6e003bb0..ff87d159e36 100644 --- a/erpnext/stock/get_item_details.py +++ b/erpnext/stock/get_item_details.py @@ -1051,7 +1051,11 @@ def get_batch_based_item_price(params, item_code) -> float: if not item_price: item_price = get_item_price(params, item_code, ignore_party=True, force_batch_no=True) - if item_price and item_price[0][2] == params.get("uom") and not params.get("items", [{}])[0].get("is_free_item", 0): + if ( + item_price + and item_price[0][2] == params.get("uom") + and not params.get("items", [{}])[0].get("is_free_item", 0) + ): return item_price[0][1] return 0.0 From 446a8fe096cab70370a88799405217d8bd06187a Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Wed, 5 Mar 2025 13:08:47 +0530 Subject: [PATCH 1269/1614] chore: resolve conflicts --- erpnext/support/doctype/issue/issue.json | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/erpnext/support/doctype/issue/issue.json b/erpnext/support/doctype/issue/issue.json index c048eb1d5cd..622e19e9e3a 100644 --- a/erpnext/support/doctype/issue/issue.json +++ b/erpnext/support/doctype/issue/issue.json @@ -391,11 +391,7 @@ "icon": "fa fa-ticket", "idx": 7, "links": [], -<<<<<<< HEAD - "modified": "2021-11-24 13:13:10.276630", -======= "modified": "2025-02-18 21:18:52.797745", ->>>>>>> 019303dd12 (fix: tests) "modified_by": "Administrator", "module": "Support", "name": "Issue", @@ -424,4 +420,4 @@ "title_field": "subject", "track_changes": 1, "track_seen": 1 -} \ No newline at end of file +} From 5ae9faab91116fabe663a891d4b343ceffbc65cc Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 5 Mar 2025 13:11:34 +0530 Subject: [PATCH 1270/1614] fix: only include submitted docs for internal received quantity validation (backport #46262) (#46304) fix: only include submitted docs for internal received quantity validation (#46262) (cherry picked from commit 88fcdbb81e5aa95fdf29b17d5cdc6f4cc58ccabd) Co-authored-by: Lakshit Jain <108322669+ljain112@users.noreply.github.com> --- erpnext/controllers/stock_controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/controllers/stock_controller.py b/erpnext/controllers/stock_controller.py index a8f9976c83b..e892c5d27e2 100644 --- a/erpnext/controllers/stock_controller.py +++ b/erpnext/controllers/stock_controller.py @@ -1234,7 +1234,7 @@ class StockController(AccountsController): child_tab.item_code, child_tab.qty, ) - .where(parent_tab.docstatus < 2) + .where(parent_tab.docstatus == 1) ) if self.doctype == "Purchase Invoice": From 087dde5873fe64979307856be0a68e38a5f2b445 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 5 Mar 2025 13:11:45 +0530 Subject: [PATCH 1271/1614] fix: depreciation and balances report correction (backport #46259) (#46305) fix: depreciation and balances report correction (#46259) (cherry picked from commit 4a542b22a4201f047a9bde553680406bd22960d4) Co-authored-by: Khushi Rawat <142375893+khushi8112@users.noreply.github.com> --- .../asset_depreciations_and_balances.py | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.py b/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.py index bec5d128f0a..5229839bec6 100644 --- a/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.py +++ b/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.py @@ -50,6 +50,7 @@ def get_group_by_asset_category_data(filters): flt(row.accumulated_depreciation_as_on_from_date) + flt(row.depreciation_amount_during_the_period) - flt(row.depreciation_eliminated_during_the_period) + - flt(row.depreciation_eliminated_via_reversal) ) row.net_asset_value_as_on_from_date = flt(row.value_as_on_from_date) - flt( @@ -247,6 +248,7 @@ def get_group_by_asset_data(filters): flt(row.accumulated_depreciation_as_on_from_date) + flt(row.depreciation_amount_during_the_period) - flt(row.depreciation_eliminated_during_the_period) + - flt(row.depreciation_eliminated_via_reversal) ) row.net_asset_value_as_on_from_date = flt(row.value_as_on_from_date) - flt( @@ -276,6 +278,7 @@ def get_assets_for_grouped_by_category(filters): f""" SELECT results.asset_category, sum(results.accumulated_depreciation_as_on_from_date) as accumulated_depreciation_as_on_from_date, + sum(results.depreciation_eliminated_via_reversal) as depreciation_eliminated_via_reversal, sum(results.depreciation_eliminated_during_the_period) as depreciation_eliminated_during_the_period, sum(results.depreciation_amount_during_the_period) as depreciation_amount_during_the_period from (SELECT a.asset_category, @@ -284,6 +287,11 @@ def get_assets_for_grouped_by_category(filters): else 0 end), 0) as accumulated_depreciation_as_on_from_date, + ifnull(sum(case when gle.posting_date <= %(to_date)s and ifnull(a.disposal_date, 0) = 0 then + gle.credit + else + 0 + end), 0) as depreciation_eliminated_via_reversal, ifnull(sum(case when ifnull(a.disposal_date, 0) != 0 and a.disposal_date >= %(from_date)s and a.disposal_date <= %(to_date)s and gle.posting_date <= a.disposal_date then gle.debit @@ -307,7 +315,6 @@ def get_assets_for_grouped_by_category(filters): a.docstatus=1 and a.company=%(company)s and a.purchase_date <= %(to_date)s - and gle.debit != 0 and gle.is_cancelled = 0 and gle.account = ifnull(aca.depreciation_expense_account, company.depreciation_expense_account) {condition} {finance_book_filter} @@ -319,6 +326,7 @@ def get_assets_for_grouped_by_category(filters): else a.opening_accumulated_depreciation end), 0) as accumulated_depreciation_as_on_from_date, + 0 as depreciation_eliminated_via_reversal, ifnull(sum(case when a.disposal_date >= %(from_date)s and a.disposal_date <= %(to_date)s then a.opening_accumulated_depreciation else @@ -354,6 +362,7 @@ def get_assets_for_grouped_by_asset(filters): f""" SELECT results.name as asset, sum(results.accumulated_depreciation_as_on_from_date) as accumulated_depreciation_as_on_from_date, + sum(results.depreciation_eliminated_via_reversal) as depreciation_eliminated_via_reversal, sum(results.depreciation_eliminated_during_the_period) as depreciation_eliminated_during_the_period, sum(results.depreciation_amount_during_the_period) as depreciation_amount_during_the_period from (SELECT a.name as name, @@ -362,6 +371,11 @@ def get_assets_for_grouped_by_asset(filters): else 0 end), 0) as accumulated_depreciation_as_on_from_date, + ifnull(sum(case when gle.posting_date <= %(to_date)s and ifnull(a.disposal_date, 0) = 0 then + gle.credit + else + 0 + end), 0) as depreciation_eliminated_via_reversal, ifnull(sum(case when ifnull(a.disposal_date, 0) != 0 and a.disposal_date >= %(from_date)s and a.disposal_date <= %(to_date)s and gle.posting_date <= a.disposal_date then gle.debit @@ -385,7 +399,6 @@ def get_assets_for_grouped_by_asset(filters): a.docstatus=1 and a.company=%(company)s and a.purchase_date <= %(to_date)s - and gle.debit != 0 and gle.is_cancelled = 0 and gle.account = ifnull(aca.depreciation_expense_account, company.depreciation_expense_account) {finance_book_filter} {condition} @@ -397,6 +410,7 @@ def get_assets_for_grouped_by_asset(filters): else a.opening_accumulated_depreciation end), 0) as accumulated_depreciation_as_on_from_date, + 0 as depreciation_as_on_from_date_credit, ifnull(sum(case when a.disposal_date >= %(from_date)s and a.disposal_date <= %(to_date)s then a.opening_accumulated_depreciation else @@ -503,6 +517,12 @@ def get_columns(filters): "fieldtype": "Currency", "width": 270, }, + { + "label": _("Depreciation eliminated via reversal"), + "fieldname": "depreciation_eliminated_via_reversal", + "fieldtype": "Currency", + "width": 270, + }, { "label": _("Net Asset value as on") + " " + formatdate(filters.day_before_from_date), "fieldname": "net_asset_value_as_on_from_date", From 363129bcd4d674df9762933ec2642330bc862e50 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 5 Mar 2025 13:11:53 +0530 Subject: [PATCH 1272/1614] fix(workspace): enable is_query_report on purchase reports (backport #46249) (#46306) fix(workspace): enable is_query_report on purchase reports (#46249) * fix(workspace): enable is_query_report on purchase reports * fix: resolved conflict --------- Co-authored-by: venkat102 (cherry picked from commit 5513e24b001cce2e4011e711cf2474150b77e5ef) Co-authored-by: Nabin Hait --- .../accounts/workspace/payables/payables.json | 14 +++++------ erpnext/patches.txt | 1 + erpnext/patches/v15_0/update_query_report.py | 25 +++++++++++++++++++ 3 files changed, 33 insertions(+), 7 deletions(-) create mode 100644 erpnext/patches/v15_0/update_query_report.py diff --git a/erpnext/accounts/workspace/payables/payables.json b/erpnext/accounts/workspace/payables/payables.json index f8c85648756..96c626c7291 100644 --- a/erpnext/accounts/workspace/payables/payables.json +++ b/erpnext/accounts/workspace/payables/payables.json @@ -93,7 +93,7 @@ }, { "hidden": 0, - "is_query_report": 0, + "is_query_report": 1, "label": "Accounts Payable", "link_count": 0, "link_to": "Accounts Payable", @@ -103,7 +103,7 @@ }, { "hidden": 0, - "is_query_report": 0, + "is_query_report": 1, "label": "Accounts Payable Summary", "link_count": 0, "link_to": "Accounts Payable Summary", @@ -113,7 +113,7 @@ }, { "hidden": 0, - "is_query_report": 0, + "is_query_report": 1, "label": "Purchase Register", "link_count": 0, "link_to": "Purchase Register", @@ -123,7 +123,7 @@ }, { "hidden": 0, - "is_query_report": 0, + "is_query_report": 1, "label": "Item-wise Purchase Register", "link_count": 0, "link_to": "Item-wise Purchase Register", @@ -133,7 +133,7 @@ }, { "hidden": 0, - "is_query_report": 0, + "is_query_report": 1, "label": "Purchase Order Analysis", "link_count": 0, "link_to": "Purchase Order Analysis", @@ -143,7 +143,7 @@ }, { "hidden": 0, - "is_query_report": 0, + "is_query_report": 1, "label": "Received Items To Be Billed", "link_count": 0, "link_to": "Received Items To Be Billed", @@ -153,7 +153,7 @@ }, { "hidden": 0, - "is_query_report": 0, + "is_query_report": 1, "label": "Supplier Ledger Summary", "link_count": 0, "link_to": "Supplier Ledger Summary", diff --git a/erpnext/patches.txt b/erpnext/patches.txt index df1b885ad18..f292abfd50a 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -395,3 +395,4 @@ erpnext.patches.v14_0.disable_add_row_in_gross_profit erpnext.patches.v15_0.set_difference_amount_in_asset_value_adjustment erpnext.patches.v14_0.update_posting_datetime erpnext.stock.doctype.stock_ledger_entry.patches.ensure_sle_indexes +erpnext.patches.v15_0.update_query_report diff --git a/erpnext/patches/v15_0/update_query_report.py b/erpnext/patches/v15_0/update_query_report.py new file mode 100644 index 00000000000..0efdf8af2c3 --- /dev/null +++ b/erpnext/patches/v15_0/update_query_report.py @@ -0,0 +1,25 @@ +import frappe + + +def execute(): + reports = [ + "Accounts Payable", + "Accounts Payable Summary", + "Purchase Register", + "Item-wise Purchase Register", + "Purchase Order Analysis", + "Received Items To Be Billed", + "Supplier Ledger Summary", + ] + frappe.db.set_value( + "Workspace Link", + { + "parent": "Payables", + "link_type": "Report", + "type": "Link", + "link_to": ["in", reports], + "is_query_report": 0, + }, + "is_query_report", + 1, + ) From 400f4f32adf4e789d692750ff4213a7321c41f39 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 5 Mar 2025 13:12:09 +0530 Subject: [PATCH 1273/1614] feat(received items to be billed): add company and date filters (backport #46271) (#46302) feat(received items to be billed): add company and date filters (#46271) * feat(received items to be billed): add company and date filters * feat(delivered to be billed): add company and date filters * feat: add company and date conditions * chore: remove debugger (cherry picked from commit 6117706ab5ad68becd81e967561ddfe0b4f67c73) Co-authored-by: Sudharsanan Ashok <135326972+Sudharsanan11@users.noreply.github.com> --- .../delivered_items_to_be_billed.js | 24 ++++- .../delivered_items_to_be_billed.py | 13 +-- erpnext/accounts/report/non_billed_report.py | 89 +++++++++++-------- .../received_items_to_be_billed.js | 24 ++++- .../received_items_to_be_billed.py | 13 +-- 5 files changed, 104 insertions(+), 59 deletions(-) diff --git a/erpnext/accounts/report/delivered_items_to_be_billed/delivered_items_to_be_billed.js b/erpnext/accounts/report/delivered_items_to_be_billed/delivered_items_to_be_billed.js index f6051d7e04f..1be58ad9d55 100644 --- a/erpnext/accounts/report/delivered_items_to_be_billed/delivered_items_to_be_billed.js +++ b/erpnext/accounts/report/delivered_items_to_be_billed/delivered_items_to_be_billed.js @@ -2,5 +2,27 @@ // For license information, please see license.txt frappe.query_reports["Delivered Items To Be Billed"] = { - filters: [], + filters: [ + { + label: __("Company"), + fieldname: "company", + fieldtype: "Link", + options: "Company", + reqd: 1, + default: frappe.defaults.get_default("Company"), + }, + { + label: __("As on Date"), + fieldname: "posting_date", + fieldtype: "Date", + reqd: 1, + default: frappe.datetime.get_today(), + }, + { + label: __("Delivery Note"), + fieldname: "delivery_note", + fieldtype: "Link", + options: "Delivery Note", + }, + ], }; diff --git a/erpnext/accounts/report/delivered_items_to_be_billed/delivered_items_to_be_billed.py b/erpnext/accounts/report/delivered_items_to_be_billed/delivered_items_to_be_billed.py index 59914dc29ac..d2e5ff28247 100644 --- a/erpnext/accounts/report/delivered_items_to_be_billed/delivered_items_to_be_billed.py +++ b/erpnext/accounts/report/delivered_items_to_be_billed/delivered_items_to_be_billed.py @@ -3,6 +3,7 @@ from frappe import _ +from pypika import Order from erpnext.accounts.report.non_billed_report import get_ordered_to_be_billed_data @@ -10,7 +11,7 @@ from erpnext.accounts.report.non_billed_report import get_ordered_to_be_billed_d def execute(filters=None): columns = get_column() args = get_args() - data = get_ordered_to_be_billed_data(args) + data = get_ordered_to_be_billed_data(args, filters) return columns, data @@ -76,13 +77,6 @@ def get_column(): "options": "Project", "width": 120, }, - { - "label": _("Company"), - "fieldname": "company", - "fieldtype": "Link", - "options": "Company", - "width": 120, - }, ] @@ -92,5 +86,6 @@ def get_args(): "party": "customer", "date": "posting_date", "order": "name", - "order_by": "desc", + "order_by": Order.desc, + "reference_field": "delivery_note", } diff --git a/erpnext/accounts/report/non_billed_report.py b/erpnext/accounts/report/non_billed_report.py index 39c5311cd99..c0ca604cc6d 100644 --- a/erpnext/accounts/report/non_billed_report.py +++ b/erpnext/accounts/report/non_billed_report.py @@ -4,11 +4,12 @@ import frappe from frappe.model.meta import get_field_precision +from frappe.query_builder.functions import IfNull, Round from erpnext import get_default_currency -def get_ordered_to_be_billed_data(args): +def get_ordered_to_be_billed_data(args, filters=None): doctype, party = args.get("doctype"), args.get("party") child_tab = doctype + " Item" precision = ( @@ -18,47 +19,57 @@ def get_ordered_to_be_billed_data(args): or 2 ) - project_field = get_project_field(doctype, party) + doctype = frappe.qb.DocType(doctype) + child_doctype = frappe.qb.DocType(child_tab) - return frappe.db.sql( - """ - Select - `{parent_tab}`.name, `{parent_tab}`.{date_field}, - `{parent_tab}`.{party}, `{parent_tab}`.{party}_name, - `{child_tab}`.item_code, - `{child_tab}`.base_amount, - (`{child_tab}`.billed_amt * ifnull(`{parent_tab}`.conversion_rate, 1)), - (`{child_tab}`.base_rate * ifnull(`{child_tab}`.returned_qty, 0)), - (`{child_tab}`.base_amount - - (`{child_tab}`.billed_amt * ifnull(`{parent_tab}`.conversion_rate, 1)) - - (`{child_tab}`.base_rate * ifnull(`{child_tab}`.returned_qty, 0))), - `{child_tab}`.item_name, `{child_tab}`.description, - {project_field}, `{parent_tab}`.company - from - `{parent_tab}`, `{child_tab}` - where - `{parent_tab}`.name = `{child_tab}`.parent and `{parent_tab}`.docstatus = 1 - and `{parent_tab}`.status not in ('Closed', 'Completed') - and `{child_tab}`.amount > 0 - and (`{child_tab}`.base_amount - - round(`{child_tab}`.billed_amt * ifnull(`{parent_tab}`.conversion_rate, 1), {precision}) - - (`{child_tab}`.base_rate * ifnull(`{child_tab}`.returned_qty, 0))) > 0 - order by - `{parent_tab}`.{order} {order_by} - """.format( - parent_tab="tab" + doctype, - child_tab="tab" + child_tab, - precision=precision, - party=party, - date_field=args.get("date"), - project_field=project_field, - order=args.get("order"), - order_by=args.get("order_by"), + docname = filters.get(args.get("reference_field"), None) + project_field = get_project_field(doctype, child_doctype, party) + + query = ( + frappe.qb.from_(doctype) + .inner_join(child_doctype) + .on(doctype.name == child_doctype.parent) + .select( + doctype.name, + doctype[args.get("date")].as_("date"), + doctype[party], + doctype[party + "_name"], + child_doctype.item_code, + child_doctype.base_amount.as_("amount"), + (child_doctype.billed_amt * IfNull(doctype.conversion_rate, 1)).as_("billed_amount"), + (child_doctype.base_rate * IfNull(child_doctype.returned_qty, 0)).as_("returned_amount"), + ( + child_doctype.base_amount + - (child_doctype.billed_amt * IfNull(doctype.conversion_rate, 1)) + - (child_doctype.base_rate * IfNull(child_doctype.returned_qty, 0)) + ).as_("pending_amount"), + child_doctype.item_name, + child_doctype.description, + project_field, ) + .where( + (doctype.docstatus == 1) + & (doctype.status.notin(["Closed", "Completed"])) + & (doctype.company == filters.get("company")) + & (doctype.posting_date <= filters.get("posting_date")) + & (child_doctype.amount > 0) + & ( + child_doctype.base_amount + - Round(child_doctype.billed_amt * IfNull(doctype.conversion_rate, 1), precision) + - (child_doctype.base_rate * IfNull(child_doctype.returned_qty, 0)) + ) + > 0 + ) + .orderby(doctype[args.get("order")], order=args.get("order_by")) ) + if docname: + query = query.where(doctype.name == docname) -def get_project_field(doctype, party): + return query.run(as_dict=True) + + +def get_project_field(doctype, child_doctype, party): if party == "supplier": - doctype = doctype + " Item" - return "`tab%s`.project" % (doctype) + return child_doctype.project + return doctype.project diff --git a/erpnext/accounts/report/received_items_to_be_billed/received_items_to_be_billed.js b/erpnext/accounts/report/received_items_to_be_billed/received_items_to_be_billed.js index ad97f270dd3..2577a82ef65 100644 --- a/erpnext/accounts/report/received_items_to_be_billed/received_items_to_be_billed.js +++ b/erpnext/accounts/report/received_items_to_be_billed/received_items_to_be_billed.js @@ -2,5 +2,27 @@ // For license information, please see license.txt frappe.query_reports["Received Items To Be Billed"] = { - filters: [], + filters: [ + { + label: __("Company"), + fieldname: "company", + fieldtype: "Link", + options: "Company", + reqd: 1, + default: frappe.defaults.get_default("Company"), + }, + { + label: __("As on Date"), + fieldname: "posting_date", + fieldtype: "Date", + reqd: 1, + default: frappe.datetime.get_today(), + }, + { + label: __("Purchase Receipt"), + fieldname: "purchase_receipt", + fieldtype: "Link", + options: "Purchase Receipt", + }, + ], }; diff --git a/erpnext/accounts/report/received_items_to_be_billed/received_items_to_be_billed.py b/erpnext/accounts/report/received_items_to_be_billed/received_items_to_be_billed.py index 1dcacb97420..87b7b109b99 100644 --- a/erpnext/accounts/report/received_items_to_be_billed/received_items_to_be_billed.py +++ b/erpnext/accounts/report/received_items_to_be_billed/received_items_to_be_billed.py @@ -3,6 +3,7 @@ from frappe import _ +from pypika import Order from erpnext.accounts.report.non_billed_report import get_ordered_to_be_billed_data @@ -10,7 +11,7 @@ from erpnext.accounts.report.non_billed_report import get_ordered_to_be_billed_d def execute(filters=None): columns = get_column() args = get_args() - data = get_ordered_to_be_billed_data(args) + data = get_ordered_to_be_billed_data(args, filters) return columns, data @@ -76,13 +77,6 @@ def get_column(): "options": "Project", "width": 120, }, - { - "label": _("Company"), - "fieldname": "company", - "fieldtype": "Link", - "options": "Company", - "width": 120, - }, ] @@ -92,5 +86,6 @@ def get_args(): "party": "supplier", "date": "posting_date", "order": "name", - "order_by": "desc", + "order_by": Order.desc, + "reference_field": "purchase_receipt", } From 4f80ddd8348d5004744ba5d39ab1bb73bff8c923 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 5 Mar 2025 13:12:20 +0530 Subject: [PATCH 1274/1614] fix: Add company filter at get_invoice method (backport #46238) (#46299) fix: Add company filter at get_invoice method (#46238) (cherry picked from commit a8d1cbc1c34b644ce595e4fb88af961269dcdc3d) Co-authored-by: Kunhi --- .../deferred_revenue_and_expense/deferred_revenue_and_expense.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/accounts/report/deferred_revenue_and_expense/deferred_revenue_and_expense.py b/erpnext/accounts/report/deferred_revenue_and_expense/deferred_revenue_and_expense.py index 377777ab2a3..1c85061a551 100644 --- a/erpnext/accounts/report/deferred_revenue_and_expense/deferred_revenue_and_expense.py +++ b/erpnext/accounts/report/deferred_revenue_and_expense/deferred_revenue_and_expense.py @@ -307,6 +307,7 @@ class Deferred_Revenue_and_Expense_Report: .where( (inv.docstatus == 1) & (deferred_flag_field == 1) + & (inv.company == self.filters.company) & ( ( (self.period_list[0].from_date >= inv_item.service_start_date) From 36fa6bf15cf90e3ead977769b3292eba2bb680cd Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Wed, 5 Mar 2025 13:55:50 +0530 Subject: [PATCH 1275/1614] chore: resolve conflict --- erpnext/stock/doctype/shipment/shipment.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/erpnext/stock/doctype/shipment/shipment.json b/erpnext/stock/doctype/shipment/shipment.json index aaa2515656b..8b6e70ac65b 100644 --- a/erpnext/stock/doctype/shipment/shipment.json +++ b/erpnext/stock/doctype/shipment/shipment.json @@ -440,11 +440,7 @@ ], "is_submittable": 1, "links": [], -<<<<<<< HEAD - "modified": "2022-11-17 17:23:27.025802", -======= "modified": "2025-02-20 16:55:20.076418", ->>>>>>> 1ec182430d (feat: add total weight in shipment (#46049)) "modified_by": "Administrator", "module": "Stock", "name": "Shipment", From 1c6e4649bd424cba951c0e18aa62cdefacbd5089 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 5 Mar 2025 14:06:55 +0530 Subject: [PATCH 1276/1614] feat(Sales Invoice): add items row via "Fetch Timesheet" (backport #46071) (#46311) feat(Sales Invoice): add items row via "Fetch Timesheet" (#46071) (cherry picked from commit 94547188bfd8685d96649b61aff555950ed1e4f6) Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com> --- .../doctype/sales_invoice/sales_invoice.js | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js index ed7eb5685c1..792e1ddbdad 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js @@ -922,9 +922,25 @@ frappe.ui.form.on("Sales Invoice", { } const timesheets = await frm.events.get_timesheet_data(frm, kwargs); + + if (kwargs.item_code) { + frm.events.add_timesheet_item(frm, kwargs.item_code, timesheets); + } + return frm.events.set_timesheet_data(frm, timesheets); }, + add_timesheet_item: function (frm, item_code, timesheets) { + const row = frm.add_child("items"); + frappe.model.set_value(row.doctype, row.name, "item_code", item_code); + frappe.model.set_value( + row.doctype, + row.name, + "qty", + timesheets.reduce((a, b) => a + (b["billing_hours"] || 0.0), 0.0) + ); + }, + async get_timesheet_data(frm, kwargs) { return frappe .call({ @@ -1022,6 +1038,22 @@ frappe.ui.form.on("Sales Invoice", { fieldtype: "Date", reqd: 1, }, + { + label: __("Item Code"), + fieldname: "item_code", + fieldtype: "Link", + options: "Item", + get_query: () => { + return { + query: "erpnext.controllers.queries.item_query", + filters: { + is_sales_item: 1, + customer: frm.doc.customer, + has_variants: 0, + }, + }; + }, + }, { fieldtype: "Column Break", fieldname: "col_break_1", @@ -1046,6 +1078,7 @@ frappe.ui.form.on("Sales Invoice", { from_time: data.from_time, to_time: data.to_time, project: data.project, + item_code: data.item_code, }); d.hide(); }, From 1ff085876e62c642694c090cbee7a65160557776 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 5 Mar 2025 14:07:03 +0530 Subject: [PATCH 1277/1614] fix: Wrong Overdue Status in Sales Invoices (Floating-point arithmetic) (backport #46146) (#46310) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix: Wrong Overdue Status in Sales Invoices (Floating-point arithmetic) (#46146) * fix: Wrong Overdue Status in Sales Invoices (Floating-point arithmetic) * style: after run pre-commit (cherry picked from commit 89bcdd6fa5ccd9b7072a7fcc1e36f033e2db8c0e) Co-authored-by: Diógenes Souza <103958767+devdiogenes@users.noreply.github.com> --- .../accounts/doctype/sales_invoice/sales_invoice.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index c860fe41a66..9fcb1ae526c 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -1937,13 +1937,16 @@ def is_overdue(doc, total): "base_payment_amount" if doc.party_account_currency != doc.currency else "payment_amount" ) - payable_amount = sum( - payment.get(payment_amount_field) - for payment in doc.payment_schedule - if getdate(payment.due_date) < today + payable_amount = flt( + sum( + payment.get(payment_amount_field) + for payment in doc.payment_schedule + if getdate(payment.due_date) < today + ), + doc.precision("outstanding_amount"), ) - return (total - outstanding_amount) < payable_amount + return flt(total - outstanding_amount, doc.precision("outstanding_amount")) < payable_amount def get_discounting_status(sales_invoice): From ccc0358db6ccaa164a20e5eaa19cf95a6fe526d1 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 5 Mar 2025 14:07:12 +0530 Subject: [PATCH 1278/1614] fix: use value from currency exchange when exchange api is disabled (backport #46137) (#46309) fix: use value from currency exchange when exchange api is disabled (#46137) (cherry picked from commit 2d26bff870254befa94fbb577a00b7e862030262) Co-authored-by: Venkatesh <47534423+venkat102@users.noreply.github.com> --- erpnext/setup/utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/setup/utils.py b/erpnext/setup/utils.py index 638c8af6263..e41f27b4d8c 100644 --- a/erpnext/setup/utils.py +++ b/erpnext/setup/utils.py @@ -68,9 +68,6 @@ def get_exchange_rate(from_currency, to_currency, transaction_date=None, args=No if not transaction_date: transaction_date = nowdate() - if rate := get_pegged_rate(from_currency, to_currency, transaction_date): - return rate - currency_settings = frappe.get_doc("Accounts Settings").as_dict() allow_stale_rates = currency_settings.get("allow_stale") @@ -100,6 +97,9 @@ def get_exchange_rate(from_currency, to_currency, transaction_date=None, args=No if frappe.get_cached_value("Currency Exchange Settings", "Currency Exchange Settings", "disabled"): return 0.00 + if rate := get_pegged_rate(from_currency, to_currency, transaction_date): + return rate + try: cache = frappe.cache() key = f"currency_exchange_rate_{transaction_date}:{from_currency}:{to_currency}" From d5f07f06c7df951480593c54d36b4c2f3f3a0798 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 5 Mar 2025 14:08:10 +0530 Subject: [PATCH 1279/1614] refactor: rename subcontracting fields (backport #46226) (#46301) * refactor: rename subcontracting fields (cherry picked from commit b4f65154f595fa7d4aa69fe2631602f7e73205c7) # Conflicts: # erpnext/subcontracting/doctype/subcontracting_order_item/subcontracting_order_item.json * chore: resolve conflicts --------- Co-authored-by: Mihir Kandoi --- .../doctype/purchase_order/purchase_order.js | 2 +- .../doctype/purchase_order/purchase_order.py | 4 +-- .../purchase_order/test_purchase_order.py | 10 +++---- .../purchase_order_item.json | 8 +++--- .../purchase_order_item.py | 2 +- .../controllers/subcontracting_controller.py | 18 ++++++++----- erpnext/manufacturing/doctype/bom/bom.py | 10 +++---- erpnext/patches.txt | 1 + .../v15_0/rename_subcontracting_fields.py | 7 +++++ .../subcontracting_order.js | 4 +-- .../subcontracting_order.py | 18 ++++++++----- .../subcontracting_order_item.json | 26 ++++++++++++++++--- .../subcontracting_order_item.py | 2 +- 13 files changed, 74 insertions(+), 38 deletions(-) create mode 100644 erpnext/patches/v15_0/rename_subcontracting_fields.py diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.js b/erpnext/buying/doctype/purchase_order/purchase_order.js index 3a15c7de4ba..0b7c9de467a 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.js +++ b/erpnext/buying/doctype/purchase_order/purchase_order.js @@ -404,7 +404,7 @@ erpnext.buying.PurchaseOrderController = class PurchaseOrderController extends ( ); } } else { - if (!doc.items.every((item) => item.qty == item.sco_qty)) { + if (!doc.items.every((item) => item.qty == item.subcontracted_quantity)) { this.frm.add_custom_button( __("Subcontracting Order"), () => { diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.py b/erpnext/buying/doctype/purchase_order/purchase_order.py index 26c0101b49b..ee8ba35222f 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.py +++ b/erpnext/buying/doctype/purchase_order/purchase_order.py @@ -898,7 +898,7 @@ def is_po_fully_subcontracted(po_name): query = ( frappe.qb.from_(table) .select(table.name) - .where((table.parent == po_name) & (table.qty != table.sco_qty)) + .where((table.parent == po_name) & (table.qty != table.subcontracted_quantity)) ) return not query.run(as_dict=True) @@ -945,7 +945,7 @@ def get_mapped_subcontracting_order(source_name, target_doc=None): "material_request_item": "material_request_item", }, "field_no_map": ["qty", "fg_item_qty", "amount"], - "condition": lambda item: item.qty != item.sco_qty, + "condition": lambda item: item.qty != item.subcontracted_quantity, }, }, target_doc, diff --git a/erpnext/buying/doctype/purchase_order/test_purchase_order.py b/erpnext/buying/doctype/purchase_order/test_purchase_order.py index 5d8ce73e8ab..99ad609f8df 100644 --- a/erpnext/buying/doctype/purchase_order/test_purchase_order.py +++ b/erpnext/buying/doctype/purchase_order/test_purchase_order.py @@ -1076,9 +1076,9 @@ class TestPurchaseOrder(FrappeTestCase): # Test - 2: Subcontracted Quantity for the PO Items of each line item should be updated accordingly po.reload() - self.assertEqual(po.items[0].sco_qty, 5) - self.assertEqual(po.items[1].sco_qty, 0) - self.assertEqual(po.items[2].sco_qty, 12.5) + self.assertEqual(po.items[0].subcontracted_quantity, 5) + self.assertEqual(po.items[1].subcontracted_quantity, 0) + self.assertEqual(po.items[2].subcontracted_quantity, 12.5) # Test - 3: Amount for both FG Item and its Service Item should be updated correctly based on change in Quantity self.assertEqual(sco.items[0].amount, 2000) @@ -1114,10 +1114,10 @@ class TestPurchaseOrder(FrappeTestCase): # Test - 8: Subcontracted Quantity for each PO Item should be subtracted if SCO gets cancelled po.reload() - self.assertEqual(po.items[2].sco_qty, 25) + self.assertEqual(po.items[2].subcontracted_quantity, 25) sco.cancel() po.reload() - self.assertEqual(po.items[2].sco_qty, 12.5) + self.assertEqual(po.items[2].subcontracted_quantity, 12.5) sco = make_subcontracting_order(po.name) sco.save() diff --git a/erpnext/buying/doctype/purchase_order_item/purchase_order_item.json b/erpnext/buying/doctype/purchase_order_item/purchase_order_item.json index 1724e3cc99c..894c705dc96 100644 --- a/erpnext/buying/doctype/purchase_order_item/purchase_order_item.json +++ b/erpnext/buying/doctype/purchase_order_item/purchase_order_item.json @@ -26,7 +26,7 @@ "quantity_and_rate", "qty", "stock_uom", - "sco_qty", + "subcontracted_quantity", "col_break2", "uom", "conversion_factor", @@ -913,7 +913,7 @@ }, { "allow_on_submit": 1, - "fieldname": "sco_qty", + "fieldname": "subcontracted_quantity", "fieldtype": "Float", "label": "Subcontracted Quantity", "no_copy": 1, @@ -921,11 +921,12 @@ "read_only": 1 } ], + "grid_page_length": 50, "idx": 1, "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2025-02-18 12:35:04.432636", + "modified": "2025-03-02 16:58:26.059601", "modified_by": "Administrator", "module": "Buying", "name": "Purchase Order Item", @@ -933,6 +934,7 @@ "owner": "Administrator", "permissions": [], "quick_entry": 1, + "row_format": "Dynamic", "search_fields": "item_name", "sort_field": "modified", "sort_order": "DESC", diff --git a/erpnext/buying/doctype/purchase_order_item/purchase_order_item.py b/erpnext/buying/doctype/purchase_order_item/purchase_order_item.py index b80abda56c3..5e4ce19d340 100644 --- a/erpnext/buying/doctype/purchase_order_item/purchase_order_item.py +++ b/erpnext/buying/doctype/purchase_order_item/purchase_order_item.py @@ -80,10 +80,10 @@ class PurchaseOrderItem(Document): sales_order_item: DF.Data | None sales_order_packed_item: DF.Data | None schedule_date: DF.Date - sco_qty: DF.Float stock_qty: DF.Float stock_uom: DF.Link stock_uom_rate: DF.Currency + subcontracted_quantity: DF.Float supplier_part_no: DF.Data | None supplier_quotation: DF.Link | None supplier_quotation_item: DF.Link | None diff --git a/erpnext/controllers/subcontracting_controller.py b/erpnext/controllers/subcontracting_controller.py index b6a7f715d22..a672360046c 100644 --- a/erpnext/controllers/subcontracting_controller.py +++ b/erpnext/controllers/subcontracting_controller.py @@ -104,18 +104,18 @@ class SubcontractingController(StockController): ) if ( - self.doctype == "Subcontracting Order" and not item.sc_conversion_factor + self.doctype == "Subcontracting Order" and not item.subcontracting_conversion_factor ): # this condition will only be true if user has recently updated from develop branch service_item_qty = frappe.get_value( "Subcontracting Order Service Item", filters={"purchase_order_item": item.purchase_order_item, "parent": self.name}, fieldname=["qty"], ) - item.sc_conversion_factor = service_item_qty / item.qty + item.subcontracting_conversion_factor = service_item_qty / item.qty if self.doctype not in "Subcontracting Receipt" and item.qty > flt( - get_pending_sco_qty(self.purchase_order).get(item.purchase_order_item) - / item.sc_conversion_factor, + get_pending_subcontracted_quantity(self.purchase_order).get(item.purchase_order_item) + / item.subcontracting_conversion_factor, frappe.get_precision("Purchase Order Item", "qty"), ): frappe.throw( @@ -1132,10 +1132,14 @@ def get_item_details(items): return item_details -def get_pending_sco_qty(po_name): +def get_pending_subcontracted_quantity(po_name): table = frappe.qb.DocType("Purchase Order Item") - query = frappe.qb.from_(table).select(table.name, table.qty, table.sco_qty).where(table.parent == po_name) - return {item.name: item.qty - item.sco_qty for item in query.run(as_dict=True)} + query = ( + frappe.qb.from_(table) + .select(table.name, table.qty, table.subcontracted_quantity) + .where(table.parent == po_name) + ) + return {item.name: item.qty - item.subcontracted_quantity for item in query.run(as_dict=True)} @frappe.whitelist() diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py index 5d13471f541..054b482b260 100644 --- a/erpnext/manufacturing/doctype/bom/bom.py +++ b/erpnext/manufacturing/doctype/bom/bom.py @@ -1371,7 +1371,7 @@ def add_operations_cost(stock_entry, work_order=None, expense_account=None): }, ) - def get_max_op_qty(): + def get_max_operation_quantity(): from frappe.query_builder.functions import Sum table = frappe.qb.DocType("Job Card") @@ -1387,7 +1387,7 @@ def add_operations_cost(stock_entry, work_order=None, expense_account=None): ) return min([d.qty for d in query.run(as_dict=True)], default=0) - def get_utilised_cc(): + def get_utilised_corrective_cost(): from frappe.query_builder.functions import Sum table = frappe.qb.DocType("Stock Entry") @@ -1417,15 +1417,15 @@ def add_operations_cost(stock_entry, work_order=None, expense_account=None): ) ) ): - max_qty = get_max_op_qty() - work_order.produced_qty - remaining_cc = work_order.corrective_operation_cost - get_utilised_cc() + max_qty = get_max_operation_quantity() - work_order.produced_qty + remaining_corrective_cost = work_order.corrective_operation_cost - get_utilised_corrective_cost() stock_entry.append( "additional_costs", { "expense_account": expense_account, "description": "Corrective Operation Cost", "has_corrective_cost": 1, - "amount": remaining_cc / max_qty * flt(stock_entry.fg_completed_qty), + "amount": remaining_corrective_cost / max_qty * flt(stock_entry.fg_completed_qty), }, ) diff --git a/erpnext/patches.txt b/erpnext/patches.txt index f292abfd50a..43d471f105e 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -261,6 +261,7 @@ erpnext.patches.v14_0.show_loan_management_deprecation_warning erpnext.patches.v14_0.clear_reconciliation_values_from_singles execute:frappe.rename_doc("Report", "TDS Payable Monthly", "Tax Withholding Details", force=True) erpnext.patches.v14_0.update_proprietorship_to_individual +erpnext.patches.v15_0.rename_subcontracting_fields [post_model_sync] erpnext.patches.v15_0.create_asset_depreciation_schedules_from_assets diff --git a/erpnext/patches/v15_0/rename_subcontracting_fields.py b/erpnext/patches/v15_0/rename_subcontracting_fields.py new file mode 100644 index 00000000000..d18d6149cac --- /dev/null +++ b/erpnext/patches/v15_0/rename_subcontracting_fields.py @@ -0,0 +1,7 @@ +import frappe +from frappe.model.utils.rename_field import rename_field + + +def execute(): + rename_field("Purchase Order Item", "sco_qty", "subcontracted_quantity") + rename_field("Subcontracting Order Item", "sc_conversion_factor", "subcontracting_conversion_factor") diff --git a/erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order.js b/erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order.js index e9513a47597..bf0c8dc53f8 100644 --- a/erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order.js +++ b/erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order.js @@ -16,14 +16,14 @@ frappe.ui.form.on("Subcontracting Order Item", { service_item.doctype, service_item.name, "qty", - row.qty * row.sc_conversion_factor + row.qty * row.subcontracting_conversion_factor ); frappe.model.set_value(service_item.doctype, service_item.name, "fg_item_qty", row.qty); frappe.model.set_value( service_item.doctype, service_item.name, "amount", - row.qty * row.sc_conversion_factor * service_item.rate + row.qty * row.subcontracting_conversion_factor * service_item.rate ); }, before_items_remove(frm, cdt, cdn) { diff --git a/erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order.py b/erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order.py index f6d3fa04148..d171883c408 100644 --- a/erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order.py +++ b/erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order.py @@ -119,12 +119,12 @@ class SubcontractingOrder(SubcontractingController): def on_submit(self): self.update_prevdoc_status() self.update_status() - self.update_sco_qty_in_po() + self.update_subcontracted_quantity_in_po() def on_cancel(self): self.update_prevdoc_status() self.update_status() - self.update_sco_qty_in_po(cancel=True) + self.update_subcontracted_quantity_in_po(cancel=True) def validate_purchase_order_for_subcontracting(self): if self.purchase_order: @@ -162,7 +162,7 @@ class SubcontractingOrder(SubcontractingController): item = next( item for item in self.items if item.purchase_order_item == service_item.purchase_order_item ) - service_item.qty = item.qty * item.sc_conversion_factor + service_item.qty = item.qty * item.subcontracting_conversion_factor service_item.fg_item_qty = item.qty service_item.amount = service_item.qty * service_item.rate @@ -250,7 +250,7 @@ class SubcontractingOrder(SubcontractingController): item = frappe.get_doc("Item", si.fg_item) po_item = frappe.get_doc("Purchase Order Item", si.purchase_order_item) - available_qty = po_item.qty - po_item.sco_qty + available_qty = po_item.qty - po_item.subcontracted_quantity if available_qty == 0: continue @@ -276,7 +276,7 @@ class SubcontractingOrder(SubcontractingController): "schedule_date": self.schedule_date, "description": item.description, "qty": si.fg_item_qty, - "sc_conversion_factor": conversion_factor, + "subcontracting_conversion_factor": conversion_factor, "stock_uom": item.stock_uom, "bom": bom, "purchase_order_item": si.purchase_order_item, @@ -330,10 +330,14 @@ class SubcontractingOrder(SubcontractingController): self.update_ordered_qty_for_subcontracting() self.update_reserved_qty_for_subcontracting() - def update_sco_qty_in_po(self, cancel=False): + def update_subcontracted_quantity_in_po(self, cancel=False): for service_item in self.service_items: doc = frappe.get_doc("Purchase Order Item", service_item.purchase_order_item) - doc.sco_qty = (doc.sco_qty + service_item.qty) if not cancel else (doc.sco_qty - service_item.qty) + doc.subcontracted_quantity = ( + (doc.subcontracted_quantity + service_item.qty) + if not cancel + else (doc.subcontracted_quantity - service_item.qty) + ) doc.save() diff --git a/erpnext/subcontracting/doctype/subcontracting_order_item/subcontracting_order_item.json b/erpnext/subcontracting/doctype/subcontracting_order_item/subcontracting_order_item.json index 31616944fda..e85929dd2bb 100644 --- a/erpnext/subcontracting/doctype/subcontracting_order_item/subcontracting_order_item.json +++ b/erpnext/subcontracting/doctype/subcontracting_order_item/subcontracting_order_item.json @@ -52,7 +52,7 @@ "section_break_34", "purchase_order_item", "page_break", - "sc_conversion_factor" + "subcontracting_conversion_factor" ], "fields": [ { @@ -384,18 +384,35 @@ "search_index": 1 }, { - "fieldname": "sc_conversion_factor", + "fieldname": "references_section", + "fieldtype": "Section Break", + "label": "References" + }, + { + "fieldname": "job_card", + "fieldtype": "Link", + "label": "Job Card", + "options": "Job Card", + "read_only": 1 + }, + { + "fieldname": "column_break_nfod", + "fieldtype": "Column Break" + }, + { + "fieldname": "subcontracting_conversion_factor", "fieldtype": "Float", "hidden": 1, - "label": "SC Conversion Factor", + "label": "Subcontracting Conversion Factor", "read_only": 1 } ], + "grid_page_length": 50, "idx": 1, "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2024-12-13 13:35:28.935898", + "modified": "2025-03-02 17:05:28.386492", "modified_by": "Administrator", "module": "Subcontracting", "name": "Subcontracting Order Item", @@ -403,6 +420,7 @@ "owner": "Administrator", "permissions": [], "quick_entry": 1, + "row_format": "Dynamic", "search_fields": "item_name", "sort_field": "modified", "sort_order": "DESC", diff --git a/erpnext/subcontracting/doctype/subcontracting_order_item/subcontracting_order_item.py b/erpnext/subcontracting/doctype/subcontracting_order_item/subcontracting_order_item.py index d8f2e5664e7..db49fccce3c 100644 --- a/erpnext/subcontracting/doctype/subcontracting_order_item/subcontracting_order_item.py +++ b/erpnext/subcontracting/doctype/subcontracting_order_item/subcontracting_order_item.py @@ -42,10 +42,10 @@ class SubcontractingOrderItem(Document): received_qty: DF.Float returned_qty: DF.Float rm_cost_per_qty: DF.Currency - sc_conversion_factor: DF.Float schedule_date: DF.Date | None service_cost_per_qty: DF.Currency stock_uom: DF.Link + subcontracting_conversion_factor: DF.Float warehouse: DF.Link # end: auto-generated types From fdaf5fafda7d1d42fe04b5b85c8e7ce16f78a14d Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Mon, 17 Feb 2025 14:36:15 +0530 Subject: [PATCH 1280/1614] fix: set landed cost based on purchase invoice rate (cherry picked from commit 17d415b1054bbfc483a1733c930b820c493b43ff) # Conflicts: # erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py # erpnext/patches.txt # erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json --- .../purchase_invoice/test_purchase_invoice.py | 72 +++++++++++++++++++ erpnext/controllers/buying_controller.py | 2 +- erpnext/patches.txt | 8 +++ .../purchase_receipt/purchase_receipt.py | 49 ++++++++++--- .../purchase_receipt_item/patches/__init__.py | 0 .../recalculate_amount_difference_field.py | 37 ++++++++++ ...om_rate_difference_to_amount_difference.py | 17 +++++ .../purchase_receipt_item.json | 29 +++++--- .../purchase_receipt_item.py | 2 +- 9 files changed, 195 insertions(+), 21 deletions(-) create mode 100644 erpnext/stock/doctype/purchase_receipt_item/patches/__init__.py create mode 100644 erpnext/stock/doctype/purchase_receipt_item/patches/recalculate_amount_difference_field.py create mode 100644 erpnext/stock/doctype/purchase_receipt_item/patches/rename_field_from_rate_difference_to_amount_difference.py diff --git a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py index bc28edbf396..be6206965e0 100644 --- a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py @@ -2464,6 +2464,7 @@ class TestPurchaseInvoice(FrappeTestCase, StockTestMixin): frappe.db.set_single_value("Buying Settings", "maintain_same_rate", 1) +<<<<<<< HEAD def test_last_purchase_rate(self): item = create_item("_Test Item For Last Purchase Rate from PI", is_stock_item=1) pi1 = make_purchase_invoice(item_code=item.item_code, qty=10, rate=100) @@ -2481,6 +2482,77 @@ class TestPurchaseInvoice(FrappeTestCase, StockTestMixin): pi1.cancel() item.reload() self.assertEqual(item.last_purchase_rate, 0) +======= + def test_adjust_incoming_rate_from_pi_with_multi_currency_and_partial_billing(self): + frappe.db.set_single_value("Buying Settings", "maintain_same_rate", 0) + + frappe.db.set_single_value("Buying Settings", "set_landed_cost_based_on_purchase_invoice_rate", 1) + + pr = make_purchase_receipt( + qty=10, rate=10, currency="USD", do_not_save=1, supplier="_Test Supplier USD" + ) + pr.conversion_rate = 5300 + pr.save() + pr.submit() + + incoming_rate = frappe.db.get_value( + "Stock Ledger Entry", + {"voucher_type": "Purchase Receipt", "voucher_no": pr.name}, + "incoming_rate", + ) + self.assertEqual(incoming_rate, 53000) # Asserting to confirm if the default calculation is correct + + pi = create_purchase_invoice_from_receipt(pr.name) + for row in pi.items: + row.qty = 1 + + pi.save() + pi.submit() + + incoming_rate = frappe.db.get_value( + "Stock Ledger Entry", + {"voucher_type": "Purchase Receipt", "voucher_no": pr.name}, + "incoming_rate", + ) + # Test 1 : Incoming rate should not change as only the qty has changed and not the rate (this was not the case before) + self.assertEqual(incoming_rate, 53000) + + pi = create_purchase_invoice_from_receipt(pr.name) + for row in pi.items: + row.qty = 1 + row.rate = 9 + + pi.save() + pi.submit() + + incoming_rate = frappe.db.get_value( + "Stock Ledger Entry", + {"voucher_type": "Purchase Receipt", "voucher_no": pr.name}, + "incoming_rate", + ) + # Test 2 : Rate in new PI is lower than PR, so incoming rate should also be lower + self.assertEqual(incoming_rate, 50350) + + pi = create_purchase_invoice_from_receipt(pr.name) + for row in pi.items: + row.qty = 1 + row.rate = 12 + + pi.save() + pi.submit() + + incoming_rate = frappe.db.get_value( + "Stock Ledger Entry", + {"voucher_type": "Purchase Receipt", "voucher_no": pr.name}, + "incoming_rate", + ) + # Test 3 : Rate in new PI is higher than PR, so incoming rate should also be higher + self.assertEqual(incoming_rate, 54766.667) + + frappe.db.set_single_value("Buying Settings", "set_landed_cost_based_on_purchase_invoice_rate", 0) + + frappe.db.set_single_value("Buying Settings", "maintain_same_rate", 1) +>>>>>>> 17d415b105 (fix: set landed cost based on purchase invoice rate) def test_opening_invoice_rounding_adjustment_validation(self): pi = make_purchase_invoice(do_not_save=1) diff --git a/erpnext/controllers/buying_controller.py b/erpnext/controllers/buying_controller.py index 9643110b76a..c2a36ac36d0 100644 --- a/erpnext/controllers/buying_controller.py +++ b/erpnext/controllers/buying_controller.py @@ -333,7 +333,7 @@ class BuyingController(SubcontractingController): net_rate + item.item_tax_amount + flt(item.landed_cost_voucher_amount) - + flt(item.get("rate_difference_with_purchase_invoice")) + + flt(item.get("amount_difference_with_purchase_invoice")) ) / qty_in_stock_uom else: item.valuation_rate = 0.0 diff --git a/erpnext/patches.txt b/erpnext/patches.txt index a20b2a67bff..34794556022 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -261,7 +261,11 @@ erpnext.patches.v14_0.show_loan_management_deprecation_warning erpnext.patches.v14_0.clear_reconciliation_values_from_singles execute:frappe.rename_doc("Report", "TDS Payable Monthly", "Tax Withholding Details", force=True) erpnext.patches.v14_0.update_proprietorship_to_individual +<<<<<<< HEAD erpnext.patches.v15_0.rename_subcontracting_fields +======= +erpnext.stock.doctype.purchase_receipt_item.patches.rename_field_from_rate_difference_to_amount_difference +>>>>>>> 17d415b105 (fix: set landed cost based on purchase invoice rate) [post_model_sync] erpnext.patches.v15_0.create_asset_depreciation_schedules_from_assets @@ -393,8 +397,12 @@ erpnext.patches.v15_0.migrate_checkbox_to_select_for_reconciliation_effect erpnext.patches.v15_0.sync_auto_reconcile_config execute:frappe.db.set_single_value("Accounts Settings", "exchange_gain_loss_posting_date", "Payment") erpnext.patches.v14_0.disable_add_row_in_gross_profit +<<<<<<< HEAD erpnext.patches.v15_0.set_difference_amount_in_asset_value_adjustment erpnext.patches.v14_0.update_posting_datetime erpnext.stock.doctype.stock_ledger_entry.patches.ensure_sle_indexes erpnext.patches.v15_0.rename_sla_fields erpnext.patches.v15_0.update_query_report +======= +erpnext.stock.doctype.purchase_receipt_item.patches.recalculate_amount_difference_field +>>>>>>> 17d415b105 (fix: set landed cost based on purchase invoice rate) diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py index 7aa23c8153b..7f2c04316e9 100644 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py @@ -424,6 +424,14 @@ class PurchaseReceipt(BuyingController): self.delete_auto_created_batches() self.set_consumed_qty_in_subcontract_order() + def before_cancel(self): + super().before_cancel() + self.remove_amount_difference_with_purchase_invoice() + + def remove_amount_difference_with_purchase_invoice(self): + for item in self.items: + item.amount_difference_with_purchase_invoice = 0 + def get_gl_entries(self, warehouse_account=None, via_landed_cost_voucher=False): from erpnext.accounts.general_ledger import process_gl_map @@ -571,15 +579,15 @@ class PurchaseReceipt(BuyingController): item=item, ) - def make_rate_difference_entry(item): - if item.rate_difference_with_purchase_invoice and stock_asset_rbnb: + def make_amount_difference_entry(item): + if item.amount_difference_with_purchase_invoice and stock_asset_rbnb: account_currency = get_account_currency(stock_asset_rbnb) self.add_gl_entry( gl_entries=gl_entries, account=stock_asset_rbnb, cost_center=item.cost_center, debit=0.0, - credit=flt(item.rate_difference_with_purchase_invoice), + credit=flt(item.amount_difference_with_purchase_invoice), remarks=_("Adjustment based on Purchase Invoice rate"), against_account=stock_asset_account_name, account_currency=account_currency, @@ -612,7 +620,7 @@ class PurchaseReceipt(BuyingController): + flt(item.landed_cost_voucher_amount) + flt(item.rm_supp_cost) + flt(item.item_tax_amount) - + flt(item.rate_difference_with_purchase_invoice) + + flt(item.amount_difference_with_purchase_invoice) ) divisional_loss = flt( @@ -712,7 +720,7 @@ class PurchaseReceipt(BuyingController): make_item_asset_inward_gl_entry(d, stock_value_diff, stock_asset_account_name) outgoing_amount = make_stock_received_but_not_billed_entry(d) make_landed_cost_gl_entries(d) - make_rate_difference_entry(d) + make_amount_difference_entry(d) make_sub_contracting_gl_entries(d) make_divisional_loss_gl_entry(d, outgoing_amount) elif (d.warehouse and d.warehouse not in warehouse_with_no_account) or ( @@ -1094,11 +1102,19 @@ def update_billing_percentage(pr_doc, update_modified=True, adjust_incoming_rate if adjust_incoming_rate: adjusted_amt = 0.0 - if item.billed_amt is not None and item.amount is not None: - adjusted_amt = flt(item.billed_amt) - flt(item.amount) + item_wise_billed_qty = get_billed_qty_against_purchase_receipt(pr_doc) - adjusted_amt = adjusted_amt * flt(pr_doc.conversion_rate) - item.db_set("rate_difference_with_purchase_invoice", adjusted_amt, update_modified=False) + if ( + item.billed_amt is not None + and item.amount is not None + and item_wise_billed_qty.get(item.name) + ): + adjusted_amt = ( + flt(item.billed_amt / item_wise_billed_qty.get(item.name)) - flt(item.rate) + ) * item.qty + + adjusted_amt = flt(adjusted_amt * flt(pr_doc.conversion_rate), item.precision("amount")) + item.db_set("amount_difference_with_purchase_invoice", adjusted_amt, update_modified=False) percent_billed = round(100 * (total_billed_amount / (total_amount or 1)), 6) pr_doc.db_set("per_billed", percent_billed) @@ -1111,6 +1127,21 @@ def update_billing_percentage(pr_doc, update_modified=True, adjust_incoming_rate adjust_incoming_rate_for_pr(pr_doc) +def get_billed_qty_against_purchase_receipt(pr_doc): + pr_names = [d.name for d in pr_doc.items] + table = frappe.qb.DocType("Purchase Invoice Item") + query = ( + frappe.qb.from_(table) + .select(table.pr_detail, fn.Sum(table.qty).as_("qty")) + .where((table.pr_detail.isin(pr_names)) & (table.docstatus == 1)) + ) + invoice_data = query.run(as_list=1) + + if not invoice_data: + return frappe._dict() + return frappe._dict(invoice_data) + + def adjust_incoming_rate_for_pr(doc): doc.update_valuation_rate(reset_outgoing_rate=False) diff --git a/erpnext/stock/doctype/purchase_receipt_item/patches/__init__.py b/erpnext/stock/doctype/purchase_receipt_item/patches/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/erpnext/stock/doctype/purchase_receipt_item/patches/recalculate_amount_difference_field.py b/erpnext/stock/doctype/purchase_receipt_item/patches/recalculate_amount_difference_field.py new file mode 100644 index 00000000000..e2d8bedaa66 --- /dev/null +++ b/erpnext/stock/doctype/purchase_receipt_item/patches/recalculate_amount_difference_field.py @@ -0,0 +1,37 @@ +import frappe +from frappe.utils import flt + +from erpnext.stock.doctype.purchase_receipt.purchase_receipt import ( + adjust_incoming_rate_for_pr, + get_billed_qty_against_purchase_receipt, +) + + +def execute(): + table = frappe.qb.DocType("Purchase Receipt Item") + query = ( + frappe.qb.from_(table) + .select(table.parent) + .distinct() + .where((table.amount_difference_with_purchase_invoice > 0) & (table.docstatus == 1)) + ) + pr_names = [item.parent for item in query.run(as_dict=True)] + + for pr_name in pr_names: + pr_doc = frappe.get_doc("Purchase Receipt", pr_name) + for item in pr_doc.items: + adjusted_amt = 0.0 + item_wise_billed_qty = get_billed_qty_against_purchase_receipt(pr_doc) + + if ( + item.billed_amt is not None + and item.amount is not None + and item_wise_billed_qty.get(item.name) + ): + adjusted_amt = ( + flt(item.billed_amt / item_wise_billed_qty.get(item.name)) - flt(item.rate) + ) * item.qty + + adjusted_amt = flt(adjusted_amt * flt(pr_doc.conversion_rate), item.precision("amount")) + item.db_set("amount_difference_with_purchase_invoice", adjusted_amt, update_modified=False) + adjust_incoming_rate_for_pr(pr_doc) diff --git a/erpnext/stock/doctype/purchase_receipt_item/patches/rename_field_from_rate_difference_to_amount_difference.py b/erpnext/stock/doctype/purchase_receipt_item/patches/rename_field_from_rate_difference_to_amount_difference.py new file mode 100644 index 00000000000..44c8c49cba8 --- /dev/null +++ b/erpnext/stock/doctype/purchase_receipt_item/patches/rename_field_from_rate_difference_to_amount_difference.py @@ -0,0 +1,17 @@ +import frappe +from frappe.model.utils.rename_field import rename_field + + +def execute(): + frappe.db.set_value( + "DocField", + {"parent": "Purchase Receipt Item", "fieldname": "rate_difference_with_purchase_invoice"}, + "label", + "Amount Difference with Purchase Invoice", + ) + rename_field( + "Purchase Receipt Item", + "rate_difference_with_purchase_invoice", + "amount_difference_with_purchase_invoice", + ) + frappe.clear_cache(doctype="Purchase Receipt Item") diff --git a/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json b/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json index 610bceddf0f..2f6598c3fb2 100644 --- a/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json +++ b/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json @@ -71,7 +71,7 @@ "item_tax_amount", "rm_supp_cost", "landed_cost_voucher_amount", - "rate_difference_with_purchase_invoice", + "amount_difference_with_purchase_invoice", "billed_amt", "warehouse_and_reference", "warehouse", @@ -998,14 +998,6 @@ "label": "Has Item Scanned", "read_only": 1 }, - { - "fieldname": "rate_difference_with_purchase_invoice", - "fieldtype": "Currency", - "label": "Rate Difference with Purchase Invoice", - "no_copy": 1, - "print_hide": 1, - "read_only": 1 - }, { "depends_on": "eval:doc.use_serial_batch_fields === 0 || doc.docstatus === 1", "fieldname": "serial_and_batch_bundle", @@ -1135,12 +1127,29 @@ "no_copy": 1, "options": "Company:company:default_currency", "print_hide": 1 +<<<<<<< HEAD +======= + }, + { + "fieldname": "distributed_discount_amount", + "fieldtype": "Currency", + "label": "Distributed Discount Amount", + "options": "currency" + }, + { + "fieldname": "amount_difference_with_purchase_invoice", + "fieldtype": "Currency", + "label": "Amount Difference with Purchase Invoice", + "no_copy": 1, + "print_hide": 1, + "read_only": 1 +>>>>>>> 17d415b105 (fix: set landed cost based on purchase invoice rate) } ], "idx": 1, "istable": 1, "links": [], - "modified": "2024-07-19 12:14:21.521466", + "modified": "2025-02-17 13:15:36.692202", "modified_by": "Administrator", "module": "Stock", "name": "Purchase Receipt Item", diff --git a/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.py b/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.py index 2154007771d..0db866f52c1 100644 --- a/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.py +++ b/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.py @@ -16,6 +16,7 @@ class PurchaseReceiptItem(Document): allow_zero_valuation_rate: DF.Check amount: DF.Currency + amount_difference_with_purchase_invoice: DF.Currency apply_tds: DF.Check asset_category: DF.Link | None asset_location: DF.Link | None @@ -76,7 +77,6 @@ class PurchaseReceiptItem(Document): qty: DF.Float quality_inspection: DF.Link | None rate: DF.Currency - rate_difference_with_purchase_invoice: DF.Currency rate_with_margin: DF.Currency received_qty: DF.Float received_stock_qty: DF.Float From ee41e55343166f88cd105fd608a3792d0fb84bb0 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Mon, 17 Feb 2025 18:05:58 +0530 Subject: [PATCH 1281/1614] perf: patch (cherry picked from commit a41024813b22fea5d737be8fab50224c2b909cbc) --- .../recalculate_amount_difference_field.py | 81 +++++++++++++------ 1 file changed, 57 insertions(+), 24 deletions(-) diff --git a/erpnext/stock/doctype/purchase_receipt_item/patches/recalculate_amount_difference_field.py b/erpnext/stock/doctype/purchase_receipt_item/patches/recalculate_amount_difference_field.py index e2d8bedaa66..9def5aa8d3b 100644 --- a/erpnext/stock/doctype/purchase_receipt_item/patches/recalculate_amount_difference_field.py +++ b/erpnext/stock/doctype/purchase_receipt_item/patches/recalculate_amount_difference_field.py @@ -1,37 +1,70 @@ import frappe +from frappe.query_builder.functions import Sum from frappe.utils import flt -from erpnext.stock.doctype.purchase_receipt.purchase_receipt import ( - adjust_incoming_rate_for_pr, - get_billed_qty_against_purchase_receipt, -) +from erpnext.accounts.utils import get_fiscal_year +from erpnext.stock.doctype.purchase_receipt.purchase_receipt import adjust_incoming_rate_for_pr def execute(): + fiscal_year_dates = get_fiscal_year(frappe.utils.datetime.date.today()) table = frappe.qb.DocType("Purchase Receipt Item") + parent = frappe.qb.DocType("Purchase Receipt") query = ( frappe.qb.from_(table) - .select(table.parent) - .distinct() - .where((table.amount_difference_with_purchase_invoice > 0) & (table.docstatus == 1)) + .join(parent) + .on(table.parent == parent.name) + .select( + table.parent, + table.name, + table.amount, + table.billed_amt, + table.amount_difference_with_purchase_invoice, + table.rate, + table.qty, + parent.conversion_rate, + ) + .where( + (table.amount_difference_with_purchase_invoice != 0) + & (table.docstatus == 1) + & (parent.posting_date.between(fiscal_year_dates[1], fiscal_year_dates[2])) + ) ) - pr_names = [item.parent for item in query.run(as_dict=True)] + result = query.run(as_dict=True) - for pr_name in pr_names: - pr_doc = frappe.get_doc("Purchase Receipt", pr_name) - for item in pr_doc.items: - adjusted_amt = 0.0 - item_wise_billed_qty = get_billed_qty_against_purchase_receipt(pr_doc) + item_wise_billed_qty = get_billed_qty_against_purchase_receipt([item.name for item in result]) - if ( - item.billed_amt is not None - and item.amount is not None - and item_wise_billed_qty.get(item.name) - ): - adjusted_amt = ( - flt(item.billed_amt / item_wise_billed_qty.get(item.name)) - flt(item.rate) - ) * item.qty + for item in result: + adjusted_amt = 0.0 - adjusted_amt = flt(adjusted_amt * flt(pr_doc.conversion_rate), item.precision("amount")) - item.db_set("amount_difference_with_purchase_invoice", adjusted_amt, update_modified=False) - adjust_incoming_rate_for_pr(pr_doc) + if item.billed_amt is not None and item.amount is not None and item_wise_billed_qty.get(item.name): + adjusted_amt = ( + flt(item.billed_amt / item_wise_billed_qty.get(item.name)) - flt(item.rate) + ) * item.qty + adjusted_amt = flt( + adjusted_amt * flt(item.conversion_rate), frappe.get_precision("Purchase Receipt Item", "amount") + ) + + if adjusted_amt != item.amount_difference_with_purchase_invoice: + frappe.db.set_value( + "Purchase Receipt Item", + item.name, + "amount_difference_with_purchase_invoice", + adjusted_amt, + update_modified=False, + ) + adjust_incoming_rate_for_pr(frappe.get_doc("Purchase Receipt", item.parent)) + + +def get_billed_qty_against_purchase_receipt(pr_names): + table = frappe.qb.DocType("Purchase Invoice Item") + query = ( + frappe.qb.from_(table) + .select(table.pr_detail, Sum(table.qty).as_("qty")) + .where((table.pr_detail.isin(pr_names)) & (table.docstatus == 1)) + ) + invoice_data = query.run(as_list=1) + + if not invoice_data: + return frappe._dict() + return frappe._dict(invoice_data) From 7b13d8cd98763a2936cdf1e56ba798f36f85c1e5 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Mon, 17 Feb 2025 18:44:33 +0530 Subject: [PATCH 1282/1614] fix: fiscal year error (cherry picked from commit 7cf8e498c4ea5b7d2927af205ca815b8c4451cae) --- .../patches/recalculate_amount_difference_field.py | 9 +++------ ...me_field_from_rate_difference_to_amount_difference.py | 1 + 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/erpnext/stock/doctype/purchase_receipt_item/patches/recalculate_amount_difference_field.py b/erpnext/stock/doctype/purchase_receipt_item/patches/recalculate_amount_difference_field.py index 9def5aa8d3b..0222388d270 100644 --- a/erpnext/stock/doctype/purchase_receipt_item/patches/recalculate_amount_difference_field.py +++ b/erpnext/stock/doctype/purchase_receipt_item/patches/recalculate_amount_difference_field.py @@ -7,7 +7,6 @@ from erpnext.stock.doctype.purchase_receipt.purchase_receipt import adjust_incom def execute(): - fiscal_year_dates = get_fiscal_year(frappe.utils.datetime.date.today()) table = frappe.qb.DocType("Purchase Receipt Item") parent = frappe.qb.DocType("Purchase Receipt") query = ( @@ -24,12 +23,10 @@ def execute(): table.qty, parent.conversion_rate, ) - .where( - (table.amount_difference_with_purchase_invoice != 0) - & (table.docstatus == 1) - & (parent.posting_date.between(fiscal_year_dates[1], fiscal_year_dates[2])) - ) + .where((table.amount_difference_with_purchase_invoice != 0) & (table.docstatus == 1)) ) + if fiscal_year_dates := get_fiscal_year(frappe.utils.datetime.date.today(), raise_on_missing=False): + query.where(parent.posting_date.between(fiscal_year_dates[1], fiscal_year_dates[2])) result = query.run(as_dict=True) item_wise_billed_qty = get_billed_qty_against_purchase_receipt([item.name for item in result]) diff --git a/erpnext/stock/doctype/purchase_receipt_item/patches/rename_field_from_rate_difference_to_amount_difference.py b/erpnext/stock/doctype/purchase_receipt_item/patches/rename_field_from_rate_difference_to_amount_difference.py index 44c8c49cba8..ce802b029da 100644 --- a/erpnext/stock/doctype/purchase_receipt_item/patches/rename_field_from_rate_difference_to_amount_difference.py +++ b/erpnext/stock/doctype/purchase_receipt_item/patches/rename_field_from_rate_difference_to_amount_difference.py @@ -13,5 +13,6 @@ def execute(): "Purchase Receipt Item", "rate_difference_with_purchase_invoice", "amount_difference_with_purchase_invoice", + validate=False, ) frappe.clear_cache(doctype="Purchase Receipt Item") From a09c57f0d1429d737a2819cd5b6ea87b44843fbb Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Mon, 17 Feb 2025 20:20:17 +0530 Subject: [PATCH 1283/1614] fix: revert last commit (cherry picked from commit 154e9813c4f27c2a7d51b133fd89cdfbaa1f1477) # Conflicts: # erpnext/patches.txt --- erpnext/patches.txt | 8 ++++ .../recalculate_amount_difference_field.py | 45 ++++++++++--------- ...om_rate_difference_to_amount_difference.py | 1 - 3 files changed, 33 insertions(+), 21 deletions(-) diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 34794556022..604f0ff6141 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -262,10 +262,13 @@ erpnext.patches.v14_0.clear_reconciliation_values_from_singles execute:frappe.rename_doc("Report", "TDS Payable Monthly", "Tax Withholding Details", force=True) erpnext.patches.v14_0.update_proprietorship_to_individual <<<<<<< HEAD +<<<<<<< HEAD erpnext.patches.v15_0.rename_subcontracting_fields ======= erpnext.stock.doctype.purchase_receipt_item.patches.rename_field_from_rate_difference_to_amount_difference >>>>>>> 17d415b105 (fix: set landed cost based on purchase invoice rate) +======= +>>>>>>> 154e9813c4 (fix: revert last commit) [post_model_sync] erpnext.patches.v15_0.create_asset_depreciation_schedules_from_assets @@ -398,6 +401,7 @@ erpnext.patches.v15_0.sync_auto_reconcile_config execute:frappe.db.set_single_value("Accounts Settings", "exchange_gain_loss_posting_date", "Payment") erpnext.patches.v14_0.disable_add_row_in_gross_profit <<<<<<< HEAD +<<<<<<< HEAD erpnext.patches.v15_0.set_difference_amount_in_asset_value_adjustment erpnext.patches.v14_0.update_posting_datetime erpnext.stock.doctype.stock_ledger_entry.patches.ensure_sle_indexes @@ -406,3 +410,7 @@ erpnext.patches.v15_0.update_query_report ======= erpnext.stock.doctype.purchase_receipt_item.patches.recalculate_amount_difference_field >>>>>>> 17d415b105 (fix: set landed cost based on purchase invoice rate) +======= +erpnext.stock.doctype.purchase_receipt_item.patches.rename_field_from_rate_difference_to_amount_difference +erpnext.stock.doctype.purchase_receipt_item.patches.recalculate_amount_difference_field +>>>>>>> 154e9813c4 (fix: revert last commit) diff --git a/erpnext/stock/doctype/purchase_receipt_item/patches/recalculate_amount_difference_field.py b/erpnext/stock/doctype/purchase_receipt_item/patches/recalculate_amount_difference_field.py index 0222388d270..fc904baa927 100644 --- a/erpnext/stock/doctype/purchase_receipt_item/patches/recalculate_amount_difference_field.py +++ b/erpnext/stock/doctype/purchase_receipt_item/patches/recalculate_amount_difference_field.py @@ -27,30 +27,35 @@ def execute(): ) if fiscal_year_dates := get_fiscal_year(frappe.utils.datetime.date.today(), raise_on_missing=False): query.where(parent.posting_date.between(fiscal_year_dates[1], fiscal_year_dates[2])) - result = query.run(as_dict=True) - item_wise_billed_qty = get_billed_qty_against_purchase_receipt([item.name for item in result]) + if result := query.run(as_dict=True): + item_wise_billed_qty = get_billed_qty_against_purchase_receipt([item.name for item in result]) - for item in result: - adjusted_amt = 0.0 + for item in result: + adjusted_amt = 0.0 - if item.billed_amt is not None and item.amount is not None and item_wise_billed_qty.get(item.name): - adjusted_amt = ( - flt(item.billed_amt / item_wise_billed_qty.get(item.name)) - flt(item.rate) - ) * item.qty - adjusted_amt = flt( - adjusted_amt * flt(item.conversion_rate), frappe.get_precision("Purchase Receipt Item", "amount") - ) - - if adjusted_amt != item.amount_difference_with_purchase_invoice: - frappe.db.set_value( - "Purchase Receipt Item", - item.name, - "amount_difference_with_purchase_invoice", - adjusted_amt, - update_modified=False, + if ( + item.billed_amt is not None + and item.amount is not None + and item_wise_billed_qty.get(item.name) + ): + adjusted_amt = ( + flt(item.billed_amt / item_wise_billed_qty.get(item.name)) - flt(item.rate) + ) * item.qty + adjusted_amt = flt( + adjusted_amt * flt(item.conversion_rate), + frappe.get_precision("Purchase Receipt Item", "amount"), ) - adjust_incoming_rate_for_pr(frappe.get_doc("Purchase Receipt", item.parent)) + + if adjusted_amt != item.amount_difference_with_purchase_invoice: + frappe.db.set_value( + "Purchase Receipt Item", + item.name, + "amount_difference_with_purchase_invoice", + adjusted_amt, + update_modified=False, + ) + adjust_incoming_rate_for_pr(frappe.get_doc("Purchase Receipt", item.parent)) def get_billed_qty_against_purchase_receipt(pr_names): diff --git a/erpnext/stock/doctype/purchase_receipt_item/patches/rename_field_from_rate_difference_to_amount_difference.py b/erpnext/stock/doctype/purchase_receipt_item/patches/rename_field_from_rate_difference_to_amount_difference.py index ce802b029da..44c8c49cba8 100644 --- a/erpnext/stock/doctype/purchase_receipt_item/patches/rename_field_from_rate_difference_to_amount_difference.py +++ b/erpnext/stock/doctype/purchase_receipt_item/patches/rename_field_from_rate_difference_to_amount_difference.py @@ -13,6 +13,5 @@ def execute(): "Purchase Receipt Item", "rate_difference_with_purchase_invoice", "amount_difference_with_purchase_invoice", - validate=False, ) frappe.clear_cache(doctype="Purchase Receipt Item") From 8f2fdcae88252cddaaeeb89f881671c2101ad886 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Wed, 19 Feb 2025 13:03:45 +0530 Subject: [PATCH 1284/1614] fix: patch (cherry picked from commit 1230127d24cc1ae97129ad8e592ca3cdf8f59c32) # Conflicts: # erpnext/patches.txt --- erpnext/patches.txt | 5 +++++ .../v15_0}/recalculate_amount_difference_field.py | 9 +++++++-- ...me_field_from_rate_difference_to_amount_difference.py | 0 .../doctype/purchase_receipt_item/patches/__init__.py | 0 4 files changed, 12 insertions(+), 2 deletions(-) rename erpnext/{stock/doctype/purchase_receipt_item/patches => patches/v15_0}/recalculate_amount_difference_field.py (88%) rename erpnext/{stock/doctype/purchase_receipt_item/patches => patches/v15_0}/rename_field_from_rate_difference_to_amount_difference.py (100%) delete mode 100644 erpnext/stock/doctype/purchase_receipt_item/patches/__init__.py diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 604f0ff6141..e0a1fcf3cbf 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -402,6 +402,7 @@ execute:frappe.db.set_single_value("Accounts Settings", "exchange_gain_loss_post erpnext.patches.v14_0.disable_add_row_in_gross_profit <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD erpnext.patches.v15_0.set_difference_amount_in_asset_value_adjustment erpnext.patches.v14_0.update_posting_datetime erpnext.stock.doctype.stock_ledger_entry.patches.ensure_sle_indexes @@ -414,3 +415,7 @@ erpnext.stock.doctype.purchase_receipt_item.patches.recalculate_amount_differenc erpnext.stock.doctype.purchase_receipt_item.patches.rename_field_from_rate_difference_to_amount_difference erpnext.stock.doctype.purchase_receipt_item.patches.recalculate_amount_difference_field >>>>>>> 154e9813c4 (fix: revert last commit) +======= +erpnext.patches.v15_0.rename_field_from_rate_difference_to_amount_difference +erpnext.patches.v15_0.recalculate_amount_difference_field +>>>>>>> 1230127d24 (fix: patch) diff --git a/erpnext/stock/doctype/purchase_receipt_item/patches/recalculate_amount_difference_field.py b/erpnext/patches/v15_0/recalculate_amount_difference_field.py similarity index 88% rename from erpnext/stock/doctype/purchase_receipt_item/patches/recalculate_amount_difference_field.py rename to erpnext/patches/v15_0/recalculate_amount_difference_field.py index fc904baa927..5ece5f08ddb 100644 --- a/erpnext/stock/doctype/purchase_receipt_item/patches/recalculate_amount_difference_field.py +++ b/erpnext/patches/v15_0/recalculate_amount_difference_field.py @@ -31,6 +31,8 @@ def execute(): if result := query.run(as_dict=True): item_wise_billed_qty = get_billed_qty_against_purchase_receipt([item.name for item in result]) + purchase_receipts = set() + precision = frappe.get_precision("Purchase Receipt Item", "amount") for item in result: adjusted_amt = 0.0 @@ -44,7 +46,7 @@ def execute(): ) * item.qty adjusted_amt = flt( adjusted_amt * flt(item.conversion_rate), - frappe.get_precision("Purchase Receipt Item", "amount"), + precision, ) if adjusted_amt != item.amount_difference_with_purchase_invoice: @@ -55,7 +57,10 @@ def execute(): adjusted_amt, update_modified=False, ) - adjust_incoming_rate_for_pr(frappe.get_doc("Purchase Receipt", item.parent)) + purchase_receipts.add(item.parent) + + for pr in purchase_receipts: + adjust_incoming_rate_for_pr(frappe.get_doc("Purchase Receipt", pr)) def get_billed_qty_against_purchase_receipt(pr_names): diff --git a/erpnext/stock/doctype/purchase_receipt_item/patches/rename_field_from_rate_difference_to_amount_difference.py b/erpnext/patches/v15_0/rename_field_from_rate_difference_to_amount_difference.py similarity index 100% rename from erpnext/stock/doctype/purchase_receipt_item/patches/rename_field_from_rate_difference_to_amount_difference.py rename to erpnext/patches/v15_0/rename_field_from_rate_difference_to_amount_difference.py diff --git a/erpnext/stock/doctype/purchase_receipt_item/patches/__init__.py b/erpnext/stock/doctype/purchase_receipt_item/patches/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 From 5a3073c4c145a0ae3862c824be71e6d5f6e5ef1c Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 5 Mar 2025 14:48:01 +0530 Subject: [PATCH 1285/1614] fix: incorrect batch picked in the pick list (backport #45761) (#46315) fix: incorrect batch picked in the pick list (cherry picked from commit e1b7688a17fd5b07e89fc6f044ca32a297b378e9) Co-authored-by: Rohit Waghchaure --- erpnext/stock/doctype/pick_list/pick_list.js | 7 +++ erpnext/stock/doctype/pick_list/pick_list.py | 66 +++++++++++++++++++- 2 files changed, 70 insertions(+), 3 deletions(-) diff --git a/erpnext/stock/doctype/pick_list/pick_list.js b/erpnext/stock/doctype/pick_list/pick_list.js index 518782d759b..6a6bb226a9e 100644 --- a/erpnext/stock/doctype/pick_list/pick_list.js +++ b/erpnext/stock/doctype/pick_list/pick_list.js @@ -2,6 +2,13 @@ // For license information, please see license.txt frappe.ui.form.on("Pick List", { + after_save(frm) { + setTimeout(() => { + // Added to fix the issue of locations table not getting updated after save + frm.reload_doc(); + }, 500); + }, + setup: (frm) => { frm.ignore_doctypes_on_cancel_all = ["Serial and Batch Bundle"]; diff --git a/erpnext/stock/doctype/pick_list/pick_list.py b/erpnext/stock/doctype/pick_list/pick_list.py index 4550d71677a..998f15945d3 100644 --- a/erpnext/stock/doctype/pick_list/pick_list.py +++ b/erpnext/stock/doctype/pick_list/pick_list.py @@ -73,6 +73,7 @@ class PickList(Document): self.set_onload("has_reserved_stock", True) def validate(self): + self.validate_expired_batches() self.validate_for_qty() self.validate_stock_qty() self.check_serial_no_status() @@ -205,6 +206,33 @@ class PickList(Document): self.update_reference_qty() self.update_sales_order_picking_status() + def validate_expired_batches(self): + batches = [] + for row in self.get("locations"): + if row.get("batch_no") and row.get("picked_qty"): + batches.append(row.batch_no) + + if batches: + batch = frappe.qb.DocType("Batch") + query = ( + frappe.qb.from_(batch) + .select(batch.name) + .where( + (batch.name.isin(batches)) + & (batch.expiry_date <= frappe.utils.nowdate()) + & (batch.expiry_date.isnotnull()) + ) + ) + + expired_batches = query.run(as_dict=True) + if expired_batches: + msg = "
    " + "".join(f"
  • {batch.name}
  • " for batch in expired_batches) + "
" + + frappe.throw( + _("The following batches are expired, please restock them:
{0}").format(msg), + title=_("Expired Batches"), + ) + def make_bundle_using_old_serial_batch_fields(self): from erpnext.stock.doctype.serial_no.serial_no import get_serial_nos @@ -447,6 +475,7 @@ class PickList(Document): self.remove(row) updated_locations = frappe._dict() + len_idx = len(self.get("locations")) or 0 for item_doc in items: item_code = item_doc.item_code @@ -489,6 +518,8 @@ class PickList(Document): if location.picked_qty > location.stock_qty: location.picked_qty = location.stock_qty + len_idx += 1 + location.idx = len_idx self.append("locations", location) # If table is empty on update after submit, set stock_qty, picked_qty to 0 so that indicator is red @@ -497,7 +528,11 @@ class PickList(Document): for location in locations_replica: location.stock_qty = 0 location.picked_qty = 0 + + len_idx += 1 + location.idx = len_idx self.append("locations", location) + frappe.msgprint( _( "Please Restock Items and Update the Pick List to continue. To discontinue, cancel the Pick List." @@ -638,8 +673,31 @@ class PickList(Document): if serial_no: picked_items[item_data.item_code][key]["serial_no"].extend(serial_no) + self.update_picked_item_from_current_pick_list(picked_items) return picked_items + def update_picked_item_from_current_pick_list(self, picked_items): + for row in self.locations: + if flt(row.picked_qty) > 0: + key = (row.warehouse, row.batch_no) if row.batch_no else row.warehouse + serial_no = [x for x in row.serial_no.split("\n") if x] if row.serial_no else None + if row.item_code not in picked_items: + picked_items[row.item_code] = {} + + if key not in picked_items[row.item_code]: + picked_items[row.item_code][key] = frappe._dict( + { + "picked_qty": 0, + "serial_no": [], + "batch_no": row.batch_no or "", + "warehouse": row.warehouse, + } + ) + + picked_items[row.item_code][key]["picked_qty"] += flt(row.stock_qty) or flt(row.picked_qty) + if serial_no: + picked_items[row.item_code][key]["serial_no"].extend(serial_no) + def _get_pick_list_items(self, items): pi = frappe.qb.DocType("Pick List") pi_item = frappe.qb.DocType("Pick List Item") @@ -653,9 +711,11 @@ class PickList(Document): pi_item.batch_no, pi_item.serial_and_batch_bundle, pi_item.serial_no, - (Case().when(pi_item.picked_qty > 0, pi_item.picked_qty).else_(pi_item.stock_qty)).as_( - "picked_qty" - ), + ( + Case() + .when((pi_item.picked_qty > 0) & (pi_item.docstatus == 1), pi_item.picked_qty) + .else_(pi_item.stock_qty) + ).as_("picked_qty"), ) .where( (pi_item.item_code.isin([x.item_code for x in items])) From 941d67a0b63b8010473f735a65cf73d36ae57846 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Wed, 5 Mar 2025 14:48:41 +0530 Subject: [PATCH 1286/1614] chore: resolve conflicts --- .../purchase_invoice/test_purchase_invoice.py | 4 +--- erpnext/patches.txt | 12 ------------ .../purchase_receipt_item/purchase_receipt_item.json | 9 --------- 3 files changed, 1 insertion(+), 24 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py index be6206965e0..e2386122522 100644 --- a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py @@ -2464,7 +2464,6 @@ class TestPurchaseInvoice(FrappeTestCase, StockTestMixin): frappe.db.set_single_value("Buying Settings", "maintain_same_rate", 1) -<<<<<<< HEAD def test_last_purchase_rate(self): item = create_item("_Test Item For Last Purchase Rate from PI", is_stock_item=1) pi1 = make_purchase_invoice(item_code=item.item_code, qty=10, rate=100) @@ -2482,7 +2481,7 @@ class TestPurchaseInvoice(FrappeTestCase, StockTestMixin): pi1.cancel() item.reload() self.assertEqual(item.last_purchase_rate, 0) -======= + def test_adjust_incoming_rate_from_pi_with_multi_currency_and_partial_billing(self): frappe.db.set_single_value("Buying Settings", "maintain_same_rate", 0) @@ -2552,7 +2551,6 @@ class TestPurchaseInvoice(FrappeTestCase, StockTestMixin): frappe.db.set_single_value("Buying Settings", "set_landed_cost_based_on_purchase_invoice_rate", 0) frappe.db.set_single_value("Buying Settings", "maintain_same_rate", 1) ->>>>>>> 17d415b105 (fix: set landed cost based on purchase invoice rate) def test_opening_invoice_rounding_adjustment_validation(self): pi = make_purchase_invoice(do_not_save=1) diff --git a/erpnext/patches.txt b/erpnext/patches.txt index e0a1fcf3cbf..18feaa19ee5 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -400,22 +400,10 @@ erpnext.patches.v15_0.migrate_checkbox_to_select_for_reconciliation_effect erpnext.patches.v15_0.sync_auto_reconcile_config execute:frappe.db.set_single_value("Accounts Settings", "exchange_gain_loss_posting_date", "Payment") erpnext.patches.v14_0.disable_add_row_in_gross_profit -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD erpnext.patches.v15_0.set_difference_amount_in_asset_value_adjustment erpnext.patches.v14_0.update_posting_datetime erpnext.stock.doctype.stock_ledger_entry.patches.ensure_sle_indexes erpnext.patches.v15_0.rename_sla_fields erpnext.patches.v15_0.update_query_report -======= -erpnext.stock.doctype.purchase_receipt_item.patches.recalculate_amount_difference_field ->>>>>>> 17d415b105 (fix: set landed cost based on purchase invoice rate) -======= -erpnext.stock.doctype.purchase_receipt_item.patches.rename_field_from_rate_difference_to_amount_difference -erpnext.stock.doctype.purchase_receipt_item.patches.recalculate_amount_difference_field ->>>>>>> 154e9813c4 (fix: revert last commit) -======= erpnext.patches.v15_0.rename_field_from_rate_difference_to_amount_difference erpnext.patches.v15_0.recalculate_amount_difference_field ->>>>>>> 1230127d24 (fix: patch) diff --git a/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json b/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json index 2f6598c3fb2..12d3f99e37b 100644 --- a/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json +++ b/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json @@ -1127,14 +1127,6 @@ "no_copy": 1, "options": "Company:company:default_currency", "print_hide": 1 -<<<<<<< HEAD -======= - }, - { - "fieldname": "distributed_discount_amount", - "fieldtype": "Currency", - "label": "Distributed Discount Amount", - "options": "currency" }, { "fieldname": "amount_difference_with_purchase_invoice", @@ -1143,7 +1135,6 @@ "no_copy": 1, "print_hide": 1, "read_only": 1 ->>>>>>> 17d415b105 (fix: set landed cost based on purchase invoice rate) } ], "idx": 1, From fe8c9a360556c86b505ef18d32facaff6af637af Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Wed, 5 Mar 2025 14:54:40 +0530 Subject: [PATCH 1287/1614] chore: resolve conflicts --- erpnext/patches.txt | 7 ------- 1 file changed, 7 deletions(-) diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 18feaa19ee5..8509989a2ca 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -261,14 +261,7 @@ erpnext.patches.v14_0.show_loan_management_deprecation_warning erpnext.patches.v14_0.clear_reconciliation_values_from_singles execute:frappe.rename_doc("Report", "TDS Payable Monthly", "Tax Withholding Details", force=True) erpnext.patches.v14_0.update_proprietorship_to_individual -<<<<<<< HEAD -<<<<<<< HEAD erpnext.patches.v15_0.rename_subcontracting_fields -======= -erpnext.stock.doctype.purchase_receipt_item.patches.rename_field_from_rate_difference_to_amount_difference ->>>>>>> 17d415b105 (fix: set landed cost based on purchase invoice rate) -======= ->>>>>>> 154e9813c4 (fix: revert last commit) [post_model_sync] erpnext.patches.v15_0.create_asset_depreciation_schedules_from_assets From 836fd8fbc4a873e4dde27d130b0006ad3eb354d5 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 5 Mar 2025 15:07:36 +0530 Subject: [PATCH 1288/1614] fix: consider journal entry and return invoice in paid_amount calculation (backport #46129) (#46319) fix: consider journal entry and return invoice in paid_amount calculation (#46129) * fix: consider journal entry and return invoice in paid_amount calculation * test: add new unit test to consider journal entry and return invoice in paid_amount calculation (cherry picked from commit 425fb12e9162f06b7868738d94e6df68c27d99a0) Co-authored-by: Sugesh G <73237300+Sugesh393@users.noreply.github.com> --- .../payment_request/payment_request.py | 40 ++++++++++++------- .../payment_request/test_payment_request.py | 28 +++++++++++++ 2 files changed, 53 insertions(+), 15 deletions(-) diff --git a/erpnext/accounts/doctype/payment_request/payment_request.py b/erpnext/accounts/doctype/payment_request/payment_request.py index 84e44621784..4f6205a2445 100644 --- a/erpnext/accounts/doctype/payment_request/payment_request.py +++ b/erpnext/accounts/doctype/payment_request/payment_request.py @@ -768,29 +768,39 @@ def get_existing_payment_request_amount(ref_dt, ref_dn, statuses: list | None = def get_existing_paid_amount(doctype, name): - PL = frappe.qb.DocType("Payment Ledger Entry") + PLE = frappe.qb.DocType("Payment Ledger Entry") PER = frappe.qb.DocType("Payment Entry Reference") query = ( - frappe.qb.from_(PL) + frappe.qb.from_(PLE) .left_join(PER) .on( - (PL.against_voucher_type == PER.reference_doctype) - & (PL.against_voucher_no == PER.reference_name) - & (PL.voucher_type == PER.parenttype) - & (PL.voucher_no == PER.parent) + (PLE.against_voucher_type == PER.reference_doctype) + & (PLE.against_voucher_no == PER.reference_name) + & (PLE.voucher_type == PER.parenttype) + & (PLE.voucher_no == PER.parent) + ) + .select( + Abs(Sum(PLE.amount)).as_("total_amount"), + Abs(Sum(frappe.qb.terms.Case().when(PER.payment_request.isnotnull(), PLE.amount).else_(0))).as_( + "request_paid_amount" + ), + ) + .where( + (PLE.voucher_type.isin([doctype, "Journal Entry", "Payment Entry"])) + & (PLE.against_voucher_type == doctype) + & (PLE.against_voucher_no == name) + & (PLE.delinked == 0) + & (PLE.docstatus == 1) + & (PLE.amount < 0) ) - .select(Abs(Sum(PL.amount)).as_("total_paid_amount")) - .where(PL.against_voucher_type.eq(doctype)) - .where(PL.against_voucher_no.eq(name)) - .where(PL.amount < 0) - .where(PL.delinked == 0) - .where(PER.docstatus == 1) - .where(PER.payment_request.isnull()) ) - response = query.run() - return response[0][0] if response[0] else 0 + result = query.run() + ledger_amount = flt(result[0][0]) if result else 0 + request_paid_amount = flt(result[0][1]) if result else 0 + + return ledger_amount - request_paid_amount def get_gateway_details(args): # nosemgrep diff --git a/erpnext/accounts/doctype/payment_request/test_payment_request.py b/erpnext/accounts/doctype/payment_request/test_payment_request.py index 7ce6cc0b7b7..02ecb85ac4d 100644 --- a/erpnext/accounts/doctype/payment_request/test_payment_request.py +++ b/erpnext/accounts/doctype/payment_request/test_payment_request.py @@ -581,6 +581,34 @@ class TestPaymentRequest(FrappeTestCase): pi.load_from_db() self.assertEqual(pr_2.grand_total, pi.outstanding_amount) + def test_consider_journal_entry_and_return_invoice(self): + from erpnext.accounts.doctype.journal_entry.test_journal_entry import make_journal_entry + + si = create_sales_invoice(currency="INR", qty=5, rate=500) + + je = make_journal_entry("_Test Cash - _TC", "Debtors - _TC", 500, save=False) + je.accounts[1].party_type = "Customer" + je.accounts[1].party = si.customer + je.accounts[1].reference_type = "Sales Invoice" + je.accounts[1].reference_name = si.name + je.accounts[1].credit_in_account_currency = 500 + je.submit() + + pe = get_payment_entry("Sales Invoice", si.name) + pe.paid_amount = 500 + pe.references[0].allocated_amount = 500 + pe.save() + pe.submit() + + cr_note = create_sales_invoice(qty=-1, rate=500, is_return=1, return_against=si.name, do_not_save=1) + cr_note.update_outstanding_for_self = 0 + cr_note.save() + cr_note.submit() + + si.load_from_db() + pr = make_payment_request(dt="Sales Invoice", dn=si.name, mute_email=1) + self.assertEqual(pr.grand_total, si.outstanding_amount) + def test_partial_paid_invoice_with_submitted_payment_entry(self): pi = make_purchase_invoice(currency="INR", qty=1, rate=5000) From e3ce17bd6e8d07892ae92539c52f3512c387b921 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 5 Mar 2025 15:19:41 +0530 Subject: [PATCH 1289/1614] fix:[regional] Italian einvoice xml generated with wrong prices (#40254) (backport #45840) (#46318) Merge pull request #45840 from gms-electronics/40254-italian-einvoice fix:[regional] Italian einvoice xml generated with wrong prices (#40254) (cherry picked from commit c5f90c823d5e1d7a5d04a0869b8a1635c3fa2c8e) Co-authored-by: Fab --- erpnext/regional/italy/e-invoice.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/regional/italy/e-invoice.xml b/erpnext/regional/italy/e-invoice.xml index 69b8e3e488d..7c436a2b449 100644 --- a/erpnext/regional/italy/e-invoice.xml +++ b/erpnext/regional/italy/e-invoice.xml @@ -188,9 +188,9 @@ {{ html2text(item.description or '') or item.item_name }} {{ format_float(item.qty) }} {{ item.stock_uom }} - {{ format_float(item.price_list_rate or item.rate, item_meta.get_field("rate").precision) }} + {{ format_float(item.net_rate or item.price_list_rate or item.rate, item_meta.get_field("rate").precision) }} {{ render_discount_or_margin(item) }} - {{ format_float(item.amount, item_meta.get_field("amount").precision) }} + {{ format_float(item.net_amount, item_meta.get_field("amount").precision) }} {{ format_float(item.tax_rate, item_meta.get_field("tax_rate").precision) }} {%- if item.tax_exemption_reason %} {{ item.tax_exemption_reason.split("-")[0] }} From 9a433a675022b48d8edbac5aa6fdd57c6ea01c02 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 5 Mar 2025 15:22:46 +0530 Subject: [PATCH 1290/1614] fix: adding cost center on pos invoice items while applying product discount (backport #46082) (#46322) fix: adding cost center on pos invoice items while applying product discount (#46082) (cherry picked from commit 926e4ecc4fbcdb9e5f33d44e76d89c39819e66f1) Co-authored-by: Diptanil Saha --- erpnext/public/js/controllers/transaction.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 69ecac19852..a98cb450eb3 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -1857,7 +1857,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe const exist_items = items.map(row => { return {item_code: row.item_code, pricing_rules: row.pricing_rules};}); - args.free_item_data.forEach(pr_row => { + args.free_item_data.forEach(async pr_row => { let row_to_modify = {}; // If there are no free items, or if the current free item doesn't exist in the table, add it @@ -1875,6 +1875,14 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe for (let key in pr_row) { row_to_modify[key] = pr_row[key]; } + + if (this.frm.doc.hasOwnProperty("is_pos") && this.frm.doc.is_pos) { + let r = await frappe.db.get_value("POS Profile", this.frm.doc.pos_profile, "cost_center"); + if (r.message.cost_center) { + row_to_modify["cost_center"] = r.message.cost_center; + } + } + this.frm.script_manager.copy_from_first_row("items", row_to_modify, ["expense_account", "income_account"]); }); From 506dd3c6b94c25b1db4f35bf62fabf9d44f5ac00 Mon Sep 17 00:00:00 2001 From: Ben Kebdani Date: Wed, 5 Mar 2025 13:04:55 +0300 Subject: [PATCH 1291/1614] fix: Close and Reopen buttons dissapear after saving changes (#46048) * fix: Close and Reopen buttons dissapear after saving changes * style: linter issue --------- Co-authored-by: Nabin Hait --- erpnext/support/doctype/issue/issue.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/erpnext/support/doctype/issue/issue.js b/erpnext/support/doctype/issue/issue.js index 03d209e99e3..eb53469acd5 100644 --- a/erpnext/support/doctype/issue/issue.js +++ b/erpnext/support/doctype/issue/issue.js @@ -15,7 +15,9 @@ frappe.ui.form.on("Issue", { } } ); + }, + refresh: function (frm) { // buttons if (frm.doc.status !== "Closed") { frm.add_custom_button(__("Close"), function () { From 6aa8803068752b1e1906b0ce664bcacd0b9cb0bb Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 5 Mar 2025 16:18:42 +0530 Subject: [PATCH 1292/1614] fix: consolidate gl entries by project in General Ledger Report (backport #46314) (#46321) fix: consolidate gl entries by project in General Ledger Report (#46314) (cherry picked from commit 1f685efcaf01d11583b7c0f23a4e2f35a32dce92) Co-authored-by: Lakshit Jain <108322669+ljain112@users.noreply.github.com> --- erpnext/accounts/report/general_ledger/general_ledger.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/report/general_ledger/general_ledger.py b/erpnext/accounts/report/general_ledger/general_ledger.py index ed16892a36e..a62ba2e3732 100644 --- a/erpnext/accounts/report/general_ledger/general_ledger.py +++ b/erpnext/accounts/report/general_ledger/general_ledger.py @@ -534,6 +534,7 @@ def get_accountwise_gle(filters, accounting_dimensions, gl_entries, gle_map, tot for dim in accounting_dimensions: keylist.append(gle.get(dim)) keylist.append(gle.get("cost_center")) + keylist.append(gle.get("project")) key = tuple(keylist) if key not in consolidated_gle: @@ -679,10 +680,11 @@ def get_columns(filters): {"label": _("Against Account"), "fieldname": "against", "width": 120}, {"label": _("Party Type"), "fieldname": "party_type", "width": 100}, {"label": _("Party"), "fieldname": "party", "width": 100}, - {"label": _("Project"), "options": "Project", "fieldname": "project", "width": 100}, ] if filters.get("include_dimensions"): + columns.append({"label": _("Project"), "options": "Project", "fieldname": "project", "width": 100}) + for dim in get_accounting_dimensions(as_list=False): columns.append( {"label": _(dim.label), "options": dim.label, "fieldname": dim.fieldname, "width": 100} From aaf35c5df930da736cce59861034e9ba1e9c2fb2 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 5 Mar 2025 16:18:50 +0530 Subject: [PATCH 1293/1614] fix: Naming of Purchase Amount (backport #46051) (#46324) fix: Naming of Purchase Amount (#46051) * fix: Naming of Purchase Amount * fix: linters (cherry picked from commit 104f60cc57730857e0a7f296df24b3268b590522) Co-authored-by: 0xD0M1M0 <76812428+0xD0M1M0@users.noreply.github.com> --- erpnext/assets/doctype/asset/asset.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/assets/doctype/asset/asset.json b/erpnext/assets/doctype/asset/asset.json index 06b851f2cca..aa5fd217665 100644 --- a/erpnext/assets/doctype/asset/asset.json +++ b/erpnext/assets/doctype/asset/asset.json @@ -225,7 +225,7 @@ { "fieldname": "gross_purchase_amount", "fieldtype": "Currency", - "label": "Gross Purchase Amount", + "label": "Net Purchase Amount", "mandatory_depends_on": "eval:(!doc.is_composite_asset || doc.docstatus==1)", "options": "Company:company:default_currency" }, @@ -592,7 +592,7 @@ "link_fieldname": "target_asset" } ], - "modified": "2025-02-11 16:01:56.140904", + "modified": "2025-02-20 14:09:05.421913", "modified_by": "Administrator", "module": "Assets", "name": "Asset", From 5668795884919f6fee4703ce9da2d6386148f3fd Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Wed, 5 Mar 2025 13:48:34 +0530 Subject: [PATCH 1294/1614] fix: production analytics report (cherry picked from commit 772e9ecfaab0b71a51b3769e2f621ffae11e7095) --- .../production_analytics.py | 57 +++++++------------ 1 file changed, 22 insertions(+), 35 deletions(-) diff --git a/erpnext/manufacturing/report/production_analytics/production_analytics.py b/erpnext/manufacturing/report/production_analytics/production_analytics.py index e511612d3a3..0a69cd5b1c0 100644 --- a/erpnext/manufacturing/report/production_analytics/production_analytics.py +++ b/erpnext/manufacturing/report/production_analytics/production_analytics.py @@ -4,7 +4,7 @@ import frappe from frappe import _, scrub -from frappe.utils import getdate +from frappe.utils import getdate, today from erpnext.stock.report.stock_analytics.stock_analytics import get_period, get_period_date_ranges @@ -30,7 +30,6 @@ def get_columns(filters): def get_periodic_data(filters, entry): periodic_data = { - "All Work Orders": {}, "Not Started": {}, "Overdue": {}, "Pending": {}, @@ -42,33 +41,26 @@ def get_periodic_data(filters, entry): for from_date, end_date in ranges: period = get_period(end_date, filters) for d in entry: - if getdate(d.creation) <= getdate(from_date) or getdate(d.creation) <= getdate(end_date): - periodic_data = update_periodic_data(periodic_data, "All Work Orders", period) - if d.status == "Completed": - if getdate(d.actual_end_date) < getdate(from_date) or getdate(d.modified) < getdate( - from_date - ): - periodic_data = update_periodic_data(periodic_data, "Completed", period) - elif getdate(d.actual_start_date) < getdate(from_date): - periodic_data = update_periodic_data(periodic_data, "Pending", period) - elif getdate(d.planned_start_date) < getdate(from_date): - periodic_data = update_periodic_data(periodic_data, "Overdue", period) - else: - periodic_data = update_periodic_data(periodic_data, "Not Started", period) + if getdate(from_date) <= getdate(d.creation) <= getdate(end_date) and d.status not in [ + "Draft", + "Submitted", + "Completed", + "Stopped", + "Closed", + "Cancelled", + ]: + if d.status == "Not Started": + periodic_data = update_periodic_data(periodic_data, "Not Started", period) + elif today() > getdate(d.planned_end_date): + periodic_data = update_periodic_data(periodic_data, "Overdue", period) + elif today() < getdate(d.planned_end_date): + periodic_data = update_periodic_data(periodic_data, "Pending", period) - elif d.status == "In Process": - if getdate(d.actual_start_date) < getdate(from_date): - periodic_data = update_periodic_data(periodic_data, "Pending", period) - elif getdate(d.planned_start_date) < getdate(from_date): - periodic_data = update_periodic_data(periodic_data, "Overdue", period) - else: - periodic_data = update_periodic_data(periodic_data, "Not Started", period) - - elif d.status == "Not Started": - if getdate(d.planned_start_date) < getdate(from_date): - periodic_data = update_periodic_data(periodic_data, "Overdue", period) - else: - periodic_data = update_periodic_data(periodic_data, "Not Started", period) + if ( + getdate(from_date) <= getdate(d.actual_end_date) <= getdate(end_date) + and d.status == "Completed" + ): + periodic_data = update_periodic_data(periodic_data, "Completed", period) return periodic_data @@ -88,10 +80,7 @@ def get_data(filters, columns): "Work Order", fields=[ "creation", - "modified", - "actual_start_date", "actual_end_date", - "planned_start_date", "planned_end_date", "status", ], @@ -100,7 +89,7 @@ def get_data(filters, columns): periodic_data = get_periodic_data(filters, entry) - labels = ["All Work Orders", "Not Started", "Overdue", "Pending", "Completed"] + labels = ["Not Started", "Overdue", "Pending", "Completed"] chart_data = get_chart_data(periodic_data, columns) ranges = get_period_date_ranges(filters) @@ -121,17 +110,15 @@ def get_data(filters, columns): def get_chart_data(periodic_data, columns): labels = [d.get("label") for d in columns[1:]] - all_data, not_start, overdue, pending, completed = [], [], [], [], [] + not_start, overdue, pending, completed = [], [], [], [] datasets = [] for d in labels: - all_data.append(periodic_data.get("All Work Orders").get(d)) not_start.append(periodic_data.get("Not Started").get(d)) overdue.append(periodic_data.get("Overdue").get(d)) pending.append(periodic_data.get("Pending").get(d)) completed.append(periodic_data.get("Completed").get(d)) - datasets.append({"name": _("All Work Orders"), "values": all_data}) datasets.append({"name": _("Not Started"), "values": not_start}) datasets.append({"name": _("Overdue"), "values": overdue}) datasets.append({"name": _("Pending"), "values": pending}) From 6f760d197d9620aac598ec8b2cbe509723f71d04 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Wed, 5 Mar 2025 13:56:10 +0530 Subject: [PATCH 1295/1614] fix: use else instead of unnecessary elif (cherry picked from commit 961258a4ce5116b0b93ba6a538aa750012560267) --- .../report/production_analytics/production_analytics.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/manufacturing/report/production_analytics/production_analytics.py b/erpnext/manufacturing/report/production_analytics/production_analytics.py index 0a69cd5b1c0..4b09de87ba6 100644 --- a/erpnext/manufacturing/report/production_analytics/production_analytics.py +++ b/erpnext/manufacturing/report/production_analytics/production_analytics.py @@ -53,7 +53,7 @@ def get_periodic_data(filters, entry): periodic_data = update_periodic_data(periodic_data, "Not Started", period) elif today() > getdate(d.planned_end_date): periodic_data = update_periodic_data(periodic_data, "Overdue", period) - elif today() < getdate(d.planned_end_date): + else: periodic_data = update_periodic_data(periodic_data, "Pending", period) if ( From 7749814571d8f373ada0c99111d483a47718bd51 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Wed, 5 Mar 2025 15:14:54 +0530 Subject: [PATCH 1296/1614] feat: add new Closed and Stopped rows (cherry picked from commit 6cc3d678352fad2c7cdc349cf90562b50091b611) --- .../production_analytics.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/erpnext/manufacturing/report/production_analytics/production_analytics.py b/erpnext/manufacturing/report/production_analytics/production_analytics.py index 4b09de87ba6..1c4082233e1 100644 --- a/erpnext/manufacturing/report/production_analytics/production_analytics.py +++ b/erpnext/manufacturing/report/production_analytics/production_analytics.py @@ -34,6 +34,8 @@ def get_periodic_data(filters, entry): "Overdue": {}, "Pending": {}, "Completed": {}, + "Closed": {}, + "Stopped": {}, } ranges = get_period_date_ranges(filters) @@ -45,15 +47,13 @@ def get_periodic_data(filters, entry): "Draft", "Submitted", "Completed", - "Stopped", - "Closed", "Cancelled", ]: - if d.status == "Not Started": - periodic_data = update_periodic_data(periodic_data, "Not Started", period) + if d.status in ["Not Started", "Closed", "Stopped"]: + periodic_data = update_periodic_data(periodic_data, d.status, period) elif today() > getdate(d.planned_end_date): periodic_data = update_periodic_data(periodic_data, "Overdue", period) - else: + elif today() < getdate(d.planned_end_date): periodic_data = update_periodic_data(periodic_data, "Pending", period) if ( @@ -89,7 +89,7 @@ def get_data(filters, columns): periodic_data = get_periodic_data(filters, entry) - labels = ["Not Started", "Overdue", "Pending", "Completed"] + labels = ["Not Started", "Overdue", "Pending", "Completed", "Closed", "Stopped"] chart_data = get_chart_data(periodic_data, columns) ranges = get_period_date_ranges(filters) @@ -110,7 +110,7 @@ def get_data(filters, columns): def get_chart_data(periodic_data, columns): labels = [d.get("label") for d in columns[1:]] - not_start, overdue, pending, completed = [], [], [], [] + not_start, overdue, pending, completed, closed, stopped = [], [], [], [], [], [] datasets = [] for d in labels: @@ -118,11 +118,15 @@ def get_chart_data(periodic_data, columns): overdue.append(periodic_data.get("Overdue").get(d)) pending.append(periodic_data.get("Pending").get(d)) completed.append(periodic_data.get("Completed").get(d)) + closed.append(periodic_data.get("Closed").get(d)) + stopped.append(periodic_data.get("Stopped").get(d)) datasets.append({"name": _("Not Started"), "values": not_start}) datasets.append({"name": _("Overdue"), "values": overdue}) datasets.append({"name": _("Pending"), "values": pending}) datasets.append({"name": _("Completed"), "values": completed}) + datasets.append({"name": _("Closed"), "values": closed}) + datasets.append({"name": _("Stopped"), "values": stopped}) chart = {"data": {"labels": labels, "datasets": datasets}} chart["type"] = "line" From 5e06e4accefcff184e3e5b2477cc04c1b60eace2 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Wed, 5 Mar 2025 16:32:26 +0530 Subject: [PATCH 1297/1614] fix: patch --- .../patches/v15_0/recalculate_amount_difference_field.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/erpnext/patches/v15_0/recalculate_amount_difference_field.py b/erpnext/patches/v15_0/recalculate_amount_difference_field.py index 5ece5f08ddb..fa45211be94 100644 --- a/erpnext/patches/v15_0/recalculate_amount_difference_field.py +++ b/erpnext/patches/v15_0/recalculate_amount_difference_field.py @@ -25,8 +25,11 @@ def execute(): ) .where((table.amount_difference_with_purchase_invoice != 0) & (table.docstatus == 1)) ) - if fiscal_year_dates := get_fiscal_year(frappe.utils.datetime.date.today(), raise_on_missing=False): - query.where(parent.posting_date.between(fiscal_year_dates[1], fiscal_year_dates[2])) + try: + if fiscal_year_dates := get_fiscal_year(frappe.utils.datetime.date.today()): + query.where(parent.posting_date.between(fiscal_year_dates[1], fiscal_year_dates[2])) + except Exception: + return if result := query.run(as_dict=True): item_wise_billed_qty = get_billed_qty_against_purchase_receipt([item.name for item in result]) From 6df9cf327db7a66ceaceeff87f1edd82232f9c4d Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Wed, 5 Mar 2025 16:19:47 +0530 Subject: [PATCH 1298/1614] fix: Accounting Period validation throwing for different companies (cherry picked from commit b1508efca24bbcbfd1c804a77fa611295679d800) --- erpnext/accounts/utils.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py index db7a3a2a70f..2758ff0e26f 100644 --- a/erpnext/accounts/utils.py +++ b/erpnext/accounts/utils.py @@ -1417,7 +1417,7 @@ def repost_gle_for_stock_vouchers( if not warehouse_account: warehouse_account = get_warehouse_account_map(company) - stock_vouchers = sort_stock_vouchers_by_posting_date(stock_vouchers) + stock_vouchers = sort_stock_vouchers_by_posting_date(stock_vouchers, company=company) if repost_doc and repost_doc.gl_reposting_index: # Restore progress stock_vouchers = stock_vouchers[cint(repost_doc.gl_reposting_index) :] @@ -1470,7 +1470,9 @@ def _delete_accounting_ledger_entries(voucher_type, voucher_no): _delete_pl_entries(voucher_type, voucher_no) -def sort_stock_vouchers_by_posting_date(stock_vouchers: list[tuple[str, str]]) -> list[tuple[str, str]]: +def sort_stock_vouchers_by_posting_date( + stock_vouchers: list[tuple[str, str]], company=None +) -> list[tuple[str, str]]: sle = frappe.qb.DocType("Stock Ledger Entry") voucher_nos = [v[1] for v in stock_vouchers] @@ -1481,7 +1483,12 @@ def sort_stock_vouchers_by_posting_date(stock_vouchers: list[tuple[str, str]]) - .groupby(sle.voucher_type, sle.voucher_no) .orderby(sle.posting_datetime) .orderby(sle.creation) - ).run(as_dict=True) + ) + + if company: + sles = sles.where(sle.company == company) + + sles = sles.run(as_dict=True) sorted_vouchers = [(sle.voucher_type, sle.voucher_no) for sle in sles] unknown_vouchers = set(stock_vouchers) - set(sorted_vouchers) From 1e85f69072568fc92ed35a2a6b54154b5ab1ad56 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 5 Mar 2025 18:00:31 +0530 Subject: [PATCH 1299/1614] fix: replacing serial and batch bundle on pos with auto fetch serial nos (backport #46236) (#46337) fix: replacing serial and batch bundle on pos with auto fetch serial nos (#46236) * fix: replacing serial and batch bundle on pos with auto fetch serial nos * fix: reserved serial no added a check to look for serial no in reserved serial nos list before removing it as there might be a situation where an item is returned which was already consolidated. (cherry picked from commit 35512d40bb4b3ae2f178b409c4c7f6edfd88dc60) Co-authored-by: Diptanil Saha --- .../page/point_of_sale/pos_item_details.js | 67 ++++++++++++------- erpnext/stock/doctype/serial_no/serial_no.py | 19 +++--- 2 files changed, 50 insertions(+), 36 deletions(-) diff --git a/erpnext/selling/page/point_of_sale/pos_item_details.js b/erpnext/selling/page/point_of_sale/pos_item_details.js index e0abdd4f4c3..a0476ee6bda 100644 --- a/erpnext/selling/page/point_of_sale/pos_item_details.js +++ b/erpnext/selling/page/point_of_sale/pos_item_details.js @@ -216,22 +216,16 @@ erpnext.PointOfSale.ItemDetails = class { } make_auto_serial_selection_btn(item) { - if (item.has_serial_no || item.has_batch_no) { - if (item.has_serial_no && item.has_batch_no) { - this.$form_container.append( - `
${__( - "Select Serial No / Batch No" - )}
` - ); - } else { - const classname = item.has_serial_no ? ".serial_no-control" : ".batch_no-control"; - const label = item.has_serial_no ? __("Select Serial No") : __("Select Batch No"); - this.$form_container - .find(classname) - .append( - `
${label}
` - ); + const doc = this.events.get_frm().doc; + if (!doc.is_return && (item.has_serial_no || item.serial_no)) { + if (!item.has_batch_no) { + this.$form_container.append(`
`); } + const label = __("Auto Fetch Serial Numbers"); + this.$form_container.append( + `
${label}
` + ); + this.$form_container.find(".serial_no-control").find("textarea").css("height", "6rem"); } } @@ -416,18 +410,41 @@ erpnext.PointOfSale.ItemDetails = class { bind_auto_serial_fetch_event() { this.$form_container.on("click", ".auto-fetch-btn", () => { - let frm = this.events.get_frm(); - let item_row = this.item_row; - item_row.type_of_transaction = "Outward"; + this.batch_no_control && this.batch_no_control.set_value(""); + let qty = this.qty_control.get_value(); + let conversion_factor = this.conversion_factor_control.get_value(); + let expiry_date = this.item_row.has_batch_no ? this.events.get_frm().doc.posting_date : ""; - new erpnext.SerialBatchPackageSelector(frm, item_row, (r) => { - if (r) { - frappe.model.set_value(item_row.doctype, item_row.name, { - serial_and_batch_bundle: r.name, - qty: Math.abs(r.total_qty), - use_serial_batch_fields: 0, - }); + let numbers = frappe.call({ + method: "erpnext.stock.doctype.serial_no.serial_no.auto_fetch_serial_number", + args: { + qty: qty * conversion_factor, + item_code: this.current_item.item_code, + warehouse: this.warehouse_control.get_value() || "", + batch_nos: this.current_item.batch_no || "", + posting_date: expiry_date, + for_doctype: "POS Invoice", + }, + }); + + numbers.then((data) => { + let auto_fetched_serial_numbers = data.message; + let records_length = auto_fetched_serial_numbers.length; + if (!records_length) { + const warehouse = this.warehouse_control.get_value().bold(); + const item_code = this.current_item.item_code.bold(); + frappe.msgprint( + __( + "Serial numbers unavailable for Item {0} under warehouse {1}. Please try changing warehouse.", + [item_code, warehouse] + ) + ); + } else if (records_length < qty) { + frappe.msgprint(__("Fetched only {0} available serial numbers.", [records_length])); + this.qty_control.set_value(records_length); } + numbers = auto_fetched_serial_numbers.join(`\n`); + this.serial_no_control.set_value(numbers); }); }); } diff --git a/erpnext/stock/doctype/serial_no/serial_no.py b/erpnext/stock/doctype/serial_no/serial_no.py index 274ce0f0d9d..1560db6a114 100644 --- a/erpnext/stock/doctype/serial_no/serial_no.py +++ b/erpnext/stock/doctype/serial_no/serial_no.py @@ -230,15 +230,17 @@ def get_pos_reserved_serial_nos(filters): pos_transacted_sr_nos = query.run(as_dict=True) - reserved_sr_nos = set() - returned_sr_nos = set() + reserved_sr_nos = list() + returned_sr_nos = list() for d in pos_transacted_sr_nos: if d.is_return == 0: - [reserved_sr_nos.add(x) for x in get_serial_nos(d.serial_no)] + [reserved_sr_nos.append(x) for x in get_serial_nos(d.serial_no)] elif d.is_return == 1: - [returned_sr_nos.add(x) for x in get_serial_nos(d.serial_no)] + [returned_sr_nos.append(x) for x in get_serial_nos(d.serial_no)] - reserved_sr_nos = list(reserved_sr_nos - returned_sr_nos) + for x in returned_sr_nos: + if x in reserved_sr_nos: + reserved_sr_nos.remove(x) return reserved_sr_nos @@ -254,12 +256,7 @@ def fetch_serial_numbers(filters, qty, do_not_include=None): query = ( frappe.qb.from_(serial_no) .select(serial_no.name) - .where( - (serial_no.item_code == filters["item_code"]) - & (serial_no.warehouse == filters["warehouse"]) - & (Coalesce(serial_no.sales_invoice, "") == "") - & (Coalesce(serial_no.delivery_document_no, "") == "") - ) + .where((serial_no.item_code == filters["item_code"]) & (serial_no.warehouse == filters["warehouse"])) .orderby(serial_no.creation) .limit(qty or 1) ) From 6c1ceff8eeb1df3224f83210eb889b5066ed57e9 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 5 Mar 2025 18:07:14 +0530 Subject: [PATCH 1300/1614] fix: exclude already consumed purchase receipt items from asset capitalization (backport #46329) (#46336) * fix: exclude already consumed purchase receipt items from asset capitalization (#46329) * feat: link purchase receipt row item to capitalization * fix: avoid fetching already consumed stock and asset items during capitalization * fix(patch): added patch to link purchase receipt item to stock item child table * fix: added nosemgrep * refactor: rename to (cherry picked from commit f50d479bfd77bc27c3c309894474ff0d84160e8e) # Conflicts: # erpnext/assets/doctype/asset_capitalization_stock_item/asset_capitalization_stock_item.json # erpnext/patches.txt * fix: resolved conflicts * fix: resolved conflicts --------- Co-authored-by: Khushi Rawat <142375893+khushi8112@users.noreply.github.com> --- .../asset_capitalization.js | 11 +++- .../asset_capitalization.py | 66 +++++++++++++++---- .../asset_capitalization_stock_item.json | 19 ++++-- .../asset_capitalization_stock_item.py | 1 + erpnext/patches.txt | 1 + ...t_row_item_to_capitalization_stock_item.py | 21 ++++++ 6 files changed, 100 insertions(+), 19 deletions(-) create mode 100644 erpnext/patches/v15_0/set_purchase_receipt_row_item_to_capitalization_stock_item.py diff --git a/erpnext/assets/doctype/asset_capitalization/asset_capitalization.js b/erpnext/assets/doctype/asset_capitalization/asset_capitalization.js index 28a8b81f3ad..848a31c4dfa 100644 --- a/erpnext/assets/doctype/asset_capitalization/asset_capitalization.js +++ b/erpnext/assets/doctype/asset_capitalization/asset_capitalization.js @@ -143,14 +143,19 @@ erpnext.assets.AssetCapitalization = class AssetCapitalization extends erpnext.s } } - set_consumed_stock_items_tagged_to_wip_composite_asset(asset) { + set_consumed_stock_items_tagged_to_wip_composite_asset(target_asset) { var me = this; - if (asset) { + if (target_asset) { return me.frm.call({ method: "erpnext.assets.doctype.asset_capitalization.asset_capitalization.get_items_tagged_to_wip_composite_asset", args: { - asset: asset, + params: { + target_asset: target_asset, + finance_book: me.frm.doc.finance_book, + posting_date: me.frm.doc.posting_date, + posting_time: me.frm.doc.posting_time, + }, }, callback: function (r) { if (!r.exc && r.message) { diff --git a/erpnext/assets/doctype/asset_capitalization/asset_capitalization.py b/erpnext/assets/doctype/asset_capitalization/asset_capitalization.py index bed6cda43ed..f4addb66eb9 100644 --- a/erpnext/assets/doctype/asset_capitalization/asset_capitalization.py +++ b/erpnext/assets/doctype/asset_capitalization/asset_capitalization.py @@ -856,7 +856,10 @@ def get_service_item_details(args): @frappe.whitelist() -def get_items_tagged_to_wip_composite_asset(asset): +def get_items_tagged_to_wip_composite_asset(params): + if isinstance(params, str): + params = json.loads(params) + fields = [ "item_code", "item_name", @@ -871,25 +874,66 @@ def get_items_tagged_to_wip_composite_asset(asset): "amount", "is_fixed_asset", "parent", + "name", ] pr_items = frappe.get_all( - "Purchase Receipt Item", filters={"wip_composite_asset": asset, "docstatus": 1}, fields=fields + "Purchase Receipt Item", + filters={"wip_composite_asset": params.get("target_asset"), "docstatus": 1}, + fields=fields, ) stock_items = [] asset_items = [] + for d in pr_items: if not d.is_fixed_asset: - stock_items.append(frappe._dict(d)) + stock_item = process_stock_item(d) + if stock_item: + stock_items.append(stock_item) else: - asset_details = frappe.db.get_value( - "Asset", - {"item_code": d.item_code, "purchase_receipt": d.parent}, - ["name as asset", "asset_name"], - as_dict=1, - ) - d.update(asset_details) - asset_items.append(frappe._dict(d)) + asset_item = process_fixed_asset(d) + if asset_item: + asset_items.append(asset_item) return stock_items, asset_items + + +def process_stock_item(d): + stock_capitalized = frappe.db.exists( + "Asset Capitalization Stock Item", + { + "purchase_receipt_item": d.name, + "parentfield": "stock_items", + "parenttype": "Asset Capitalization", + "docstatus": 1, + }, + ) + + if stock_capitalized: + return None + + stock_item_data = frappe._dict(d) + stock_item_data.purchase_receipt_item = d.name + return stock_item_data + + +def process_fixed_asset(d): + asset_details = frappe.db.get_value( + "Asset", + { + "item_code": d.item_code, + "purchase_receipt": d.parent, + "status": ("not in", ["Draft", "Scrapped", "Sold", "Capitalized"]), + }, + ["name as asset", "asset_name", "company"], + as_dict=1, + ) + + if asset_details: + asset_details.update(d) + asset_details.update(get_consumed_asset_details(asset_details)) + d.update(asset_details) + + return frappe._dict(d) + return None diff --git a/erpnext/assets/doctype/asset_capitalization_stock_item/asset_capitalization_stock_item.json b/erpnext/assets/doctype/asset_capitalization_stock_item/asset_capitalization_stock_item.json index da05e930eab..c96681411f7 100644 --- a/erpnext/assets/doctype/asset_capitalization_stock_item/asset_capitalization_stock_item.json +++ b/erpnext/assets/doctype/asset_capitalization_stock_item/asset_capitalization_stock_item.json @@ -10,12 +10,13 @@ "column_break_3", "warehouse", "section_break_6", + "purchase_receipt_item", "stock_qty", - "stock_uom", "actual_qty", "column_break_9", "valuation_rate", "amount", + "stock_uom", "batch_and_serial_no_section", "serial_and_batch_bundle", "use_serial_batch_fields", @@ -53,14 +54,14 @@ { "fieldname": "section_break_6", "fieldtype": "Section Break", - "label": "Qty and Rate" + "label": "Purchase Details" }, { "columns": 1, "fieldname": "stock_qty", "fieldtype": "Float", "in_list_view": 1, - "label": "Qty", + "label": "Quantity", "non_negative": 1 }, { @@ -172,18 +173,26 @@ { "fieldname": "column_break_mbuv", "fieldtype": "Column Break" + }, + { + "fieldname": "purchase_receipt_item", + "fieldtype": "Data", + "hidden": 1, + "label": "Purchase Receipt Item" } ], + "grid_page_length": 50, "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2024-06-26 17:06:22.564438", + "modified": "2025-03-05 12:46:01.074742", "modified_by": "Administrator", "module": "Assets", "name": "Asset Capitalization Stock Item", "owner": "Administrator", "permissions": [], - "sort_field": "modified", + "row_format": "Dynamic", + "sort_field": "creation", "sort_order": "DESC", "states": [], "track_changes": 1 diff --git a/erpnext/assets/doctype/asset_capitalization_stock_item/asset_capitalization_stock_item.py b/erpnext/assets/doctype/asset_capitalization_stock_item/asset_capitalization_stock_item.py index 0f06cc7442e..c56f87b67fa 100644 --- a/erpnext/assets/doctype/asset_capitalization_stock_item/asset_capitalization_stock_item.py +++ b/erpnext/assets/doctype/asset_capitalization_stock_item/asset_capitalization_stock_item.py @@ -23,6 +23,7 @@ class AssetCapitalizationStockItem(Document): parent: DF.Data parentfield: DF.Data parenttype: DF.Data + purchase_receipt_item: DF.Data | None serial_and_batch_bundle: DF.Link | None serial_no: DF.Text | None stock_qty: DF.Float diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 8509989a2ca..505eb81e4e9 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -400,3 +400,4 @@ erpnext.patches.v15_0.rename_sla_fields erpnext.patches.v15_0.update_query_report erpnext.patches.v15_0.rename_field_from_rate_difference_to_amount_difference erpnext.patches.v15_0.recalculate_amount_difference_field +erpnext.patches.v15_0.set_purchase_receipt_row_item_to_capitalization_stock_item diff --git a/erpnext/patches/v15_0/set_purchase_receipt_row_item_to_capitalization_stock_item.py b/erpnext/patches/v15_0/set_purchase_receipt_row_item_to_capitalization_stock_item.py new file mode 100644 index 00000000000..f1d17d1da4d --- /dev/null +++ b/erpnext/patches/v15_0/set_purchase_receipt_row_item_to_capitalization_stock_item.py @@ -0,0 +1,21 @@ +import frappe + + +def execute(): + # nosemgrep + frappe.db.sql( + """ + UPDATE `tabAsset Capitalization Stock Item` ACSI + JOIN `tabAsset Capitalization` AC + ON ACSI.parent = AC.name + JOIN `tabPurchase Receipt Item` PRI + ON + PRI.item_code = ACSI.item_code + AND PRI.wip_composite_asset = AC.target_asset + SET + ACSI.purchase_receipt_item = PRI.name + WHERE + ACSI.purchase_receipt_item IS NULL + AND AC.docstatus = 1 + """ + ) From 1a382ebe86633cfbc5e77ae0689b0e73392aa4aa Mon Sep 17 00:00:00 2001 From: Ejaaz Khan <67804911+iamejaaz@users.noreply.github.com> Date: Wed, 5 Mar 2025 18:06:59 +0530 Subject: [PATCH 1301/1614] feat: create sales invoice print format (#45403) * feat: create sales invoice print format * fix: linter issue * style: remove border from table * refactor: change label to uppercase and show taxes * refactor: format date and add translation on label * refactor: remove default header and format labels * refactor: change label style and small fix * chore: Qty in title case --------- Co-authored-by: Nabin Hait (cherry picked from commit 38aa7cab8ae2c94cf95ff5ae2275acd895d9536c) --- .../doctype/sales_invoice/sales_invoice.json | 5 +- .../sales_invoice_print/__init__.py | 0 .../sales_invoice_print.html | 161 ++++++++++++++++++ .../sales_invoice_print.json | 32 ++++ 4 files changed, 197 insertions(+), 1 deletion(-) create mode 100644 erpnext/accounts/print_format/sales_invoice_print/__init__.py create mode 100644 erpnext/accounts/print_format/sales_invoice_print/sales_invoice_print.html create mode 100644 erpnext/accounts/print_format/sales_invoice_print/sales_invoice_print.json diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json index 4183cc21ab8..e2c5fd965e8 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json @@ -3,6 +3,7 @@ "allow_import": 1, "autoname": "naming_series:", "creation": "2022-01-25 10:29:57.771398", + "default_print_format": "Sales Invoice Print", "doctype": "DocType", "engine": "InnoDB", "field_order": [ @@ -2177,6 +2178,7 @@ "print_hide": 1 } ], + "grid_page_length": 50, "icon": "fa fa-file-text", "idx": 181, "is_submittable": 1, @@ -2187,7 +2189,7 @@ "link_fieldname": "consolidated_invoice" } ], - "modified": "2025-02-06 15:59:54.636202", + "modified": "2025-03-05 17:06:59.720616", "modified_by": "Administrator", "module": "Accounts", "name": "Sales Invoice", @@ -2233,6 +2235,7 @@ } ], "quick_entry": 1, + "row_format": "Dynamic", "search_fields": "posting_date, due_date, customer, base_grand_total, outstanding_amount", "show_name_in_global_search": 1, "sort_field": "modified", diff --git a/erpnext/accounts/print_format/sales_invoice_print/__init__.py b/erpnext/accounts/print_format/sales_invoice_print/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/erpnext/accounts/print_format/sales_invoice_print/sales_invoice_print.html b/erpnext/accounts/print_format/sales_invoice_print/sales_invoice_print.html new file mode 100644 index 00000000000..958c5c10fc1 --- /dev/null +++ b/erpnext/accounts/print_format/sales_invoice_print/sales_invoice_print.html @@ -0,0 +1,161 @@ +{%- macro add_header(page_num, max_pages, doc, letter_head, no_letterhead, footer, print_settings=None, print_heading_template=None) -%} + {% if letter_head and not no_letterhead %} +
{{ letter_head }}
+ {% endif %} + {% if print_heading_template %} + {{ frappe.render_template(print_heading_template, {"doc":doc}) }} + {% else %} + {% endif %} + {%- if doc.meta.is_submittable and doc.docstatus==2-%} +
+

{{ _("CANCELLED") }}

+
+ {%- endif -%} +{%- endmacro -%} +{% for page in layout %} +
+
+ {{ add_header(loop.index, layout|len, doc, letter_head, no_letterhead, footer, print_settings) }} +
+ + + {% if print_settings.repeat_header_footer %} + + {% endif %} + +
+
+
{{ doc.customer }}
+
+ {{ doc.address_display }} +
+
+ {{ _("Conatct: ")+doc.contact_display if doc.contact_display else '' }} +
+
+ {{ _("Mobile: ")+doc.contact_mobile if doc.contact_mobile else '' }} +
+
+
+
+
+
+
{{ doc.name }}
+
+
+
+
{{ frappe.utils.format_date(doc.posting_date) }}
+
+
+
+
{{ frappe.utils.format_date(doc.due_date) }}
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + {% for item in doc.items %} + + + + + + + + {% endfor %} +
{{ _("Sr") }}{{ _("Details") }}{{ _("Qty") }}{{ _("Rate") }}{{ _("Amount") }}
{{ loop.index }} + {{ item.item_code }}: {{ item.item_name }} + {% if (item.description != item.item_name) %} +
{{ item.description }} + {% endif %} +
+ {{ item.get_formatted("qty", 0) }} + {{ item.get_formatted("uom", 0) }} + {{ item.get_formatted("net_rate", doc) }}{{ item.get_formatted("net_amount", doc) }}
+ +
+ +
+
+ + {{ doc.in_words }} +
+
+ + {{ doc.status }} +
+
+
+
+
{{ _("Sub Total") }}
+
{{ doc.get_formatted("net_total", doc) }}
+
+
+ {% for d in doc.taxes %} + {% if d.tax_amount %} +
+
{{ _(d.description) }}
+
{{ d.get_formatted("tax_amount") }}
+
+ {% endif %} + {% endfor %} +
+
+
{{ _("Total") }}
+
{{ doc.get_formatted("grand_total", doc) }}
+
+
+ +
+
+ + +
+
+
+
+
{{ doc.terms if doc.terms else '' }}
+
+
+
+
+{% endfor %} diff --git a/erpnext/accounts/print_format/sales_invoice_print/sales_invoice_print.json b/erpnext/accounts/print_format/sales_invoice_print/sales_invoice_print.json new file mode 100644 index 00000000000..d4acf5fb36e --- /dev/null +++ b/erpnext/accounts/print_format/sales_invoice_print/sales_invoice_print.json @@ -0,0 +1,32 @@ +{ + "absolute_value": 0, + "align_labels_right": 0, + "creation": "2025-01-22 16:23:51.012200", + "css": "", + "custom_format": 0, + "default_print_language": "en", + "disabled": 0, + "doc_type": "Sales Invoice", + "docstatus": 0, + "doctype": "Print Format", + "font": "", + "font_size": 14, + "idx": 0, + "line_breaks": 0, + "margin_bottom": 0.0, + "margin_left": 0.0, + "margin_right": 0.0, + "margin_top": 0.0, + "modified": "2025-01-22 16:23:51.012200", + "modified_by": "Administrator", + "module": "Accounts", + "name": "Sales Invoice Print", + "owner": "Administrator", + "page_number": "Hide", + "print_format_builder": 0, + "print_format_builder_beta": 0, + "print_format_type": "Jinja", + "raw_printing": 0, + "show_section_headings": 0, + "standard": "Yes" +} \ No newline at end of file From 29f3aac925ea455c599cfb5e488c3eedc87c446f Mon Sep 17 00:00:00 2001 From: Sugesh G <73237300+Sugesh393@users.noreply.github.com> Date: Wed, 5 Mar 2025 18:06:42 +0530 Subject: [PATCH 1302/1614] fix(pos): get parent item group without user permission (#46020) * fix(pos): get parent item group without user permission * feat: add item group filter based on user permission --------- Co-authored-by: venkat102 (cherry picked from commit 8caf7f275eebe650686e1ed012ed2da15650221c) --- .../doctype/pos_profile/pos_profile.py | 27 ++++++++++++++++++- .../page/point_of_sale/point_of_sale.py | 8 ++++++ .../page/point_of_sale/pos_item_selector.js | 9 +++++-- 3 files changed, 41 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/pos_profile/pos_profile.py b/erpnext/accounts/doctype/pos_profile/pos_profile.py index a8c4a4d8d72..2bcfb66ce73 100644 --- a/erpnext/accounts/doctype/pos_profile/pos_profile.py +++ b/erpnext/accounts/doctype/pos_profile/pos_profile.py @@ -4,6 +4,7 @@ import frappe from frappe import _, msgprint, scrub, unscrub +from frappe.core.doctype.user_permission.user_permission import get_permitted_documents from frappe.model.document import Document from frappe.utils import get_link_to_form, now @@ -204,17 +205,41 @@ class POSProfile(Document): def get_item_groups(pos_profile): item_groups = [] pos_profile = frappe.get_cached_doc("POS Profile", pos_profile) + permitted_item_groups = get_permitted_nodes("Item Group") if pos_profile.get("item_groups"): # Get items based on the item groups defined in the POS profile for data in pos_profile.get("item_groups"): item_groups.extend( - ["%s" % frappe.db.escape(d.name) for d in get_child_nodes("Item Group", data.item_group)] + [ + "%s" % frappe.db.escape(d.name) + for d in get_child_nodes("Item Group", data.item_group) + if not permitted_item_groups or d.name in permitted_item_groups + ] ) + if not item_groups and permitted_item_groups: + item_groups = ["%s" % frappe.db.escape(d) for d in permitted_item_groups] + return list(set(item_groups)) +def get_permitted_nodes(group_type): + nodes = [] + permitted_nodes = get_permitted_documents(group_type) + + if not permitted_nodes: + return nodes + + for node in permitted_nodes: + if frappe.db.get_value(group_type, node, "is_group"): + nodes.extend([d.name for d in get_child_nodes(group_type, node)]) + else: + nodes.append(node) + + return nodes + + def get_child_nodes(group_type, root): lft, rgt = frappe.db.get_value(group_type, root, ["lft", "rgt"]) return frappe.db.sql( diff --git a/erpnext/selling/page/point_of_sale/point_of_sale.py b/erpnext/selling/page/point_of_sale/point_of_sale.py index 7f758f4c8db..9be5a656a8e 100644 --- a/erpnext/selling/page/point_of_sale/point_of_sale.py +++ b/erpnext/selling/page/point_of_sale/point_of_sale.py @@ -115,6 +115,14 @@ def filter_result_items(result, pos_profile): result["items"] = [item for item in result.get("items") if item.get("item_group") in pos_item_groups] +@frappe.whitelist() +def get_parent_item_group(): + # Using get_all to ignore user permission + item_group = frappe.get_all("Item Group", {"lft": 1, "is_group": 1}, pluck="name") + if item_group: + return item_group[0] + + @frappe.whitelist() def get_items(start, page_length, price_list, item_group, pos_profile, search_term=""): warehouse, hide_unavailable_items = frappe.db.get_value( diff --git a/erpnext/selling/page/point_of_sale/pos_item_selector.js b/erpnext/selling/page/point_of_sale/pos_item_selector.js index 909d1bb9c2d..6ae0d675140 100644 --- a/erpnext/selling/page/point_of_sale/pos_item_selector.js +++ b/erpnext/selling/page/point_of_sale/pos_item_selector.js @@ -38,8 +38,13 @@ erpnext.PointOfSale.ItemSelector = class { async load_items_data() { if (!this.item_group) { - const res = await frappe.db.get_value("Item Group", { lft: 1, is_group: 1 }, "name"); - this.parent_item_group = res.message.name; + frappe.call({ + method: "erpnext.selling.page.point_of_sale.point_of_sale.get_parent_item_group", + async: false, + callback: (r) => { + if (r.message) this.parent_item_group = r.message; + }, + }); } if (!this.price_list) { const res = await frappe.db.get_value("POS Profile", this.pos_profile, "selling_price_list"); From 528107e2245955b3005483a8825f888455c59c2b Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Wed, 5 Mar 2025 13:31:02 +0000 Subject: [PATCH 1303/1614] chore(release): Bumped to Version 15.54.0 # [15.54.0](https://github.com/frappe/erpnext/compare/v15.53.4...v15.54.0) (2025-03-05) ### Bug Fixes * Accounting Period validation throwing for different companies ([6df9cf3](https://github.com/frappe/erpnext/commit/6df9cf327db7a66ceaceeff87f1edd82232f9c4d)) * Add company filter at get_invoice method (backport [#46238](https://github.com/frappe/erpnext/issues/46238)) ([#46299](https://github.com/frappe/erpnext/issues/46299)) ([4f80ddd](https://github.com/frappe/erpnext/commit/4f80ddd8348d5004744ba5d39ab1bb73bff8c923)) * Add permission check in POS's `Toggle Recent Orders` (backport [#46010](https://github.com/frappe/erpnext/issues/46010)) ([#46274](https://github.com/frappe/erpnext/issues/46274)) ([7759775](https://github.com/frappe/erpnext/commit/7759775ee6696038c241466e120edefd193253a7)) * adding cost center on pos invoice items while applying product discount (backport [#46082](https://github.com/frappe/erpnext/issues/46082)) ([#46322](https://github.com/frappe/erpnext/issues/46322)) ([9a433a6](https://github.com/frappe/erpnext/commit/9a433a675022b48d8edbac5aa6fdd57c6ea01c02)) * **asset depreciation schedules:** enable auto commit ([899e468](https://github.com/frappe/erpnext/commit/899e468f6a70000a10f104a9db5fc53e36ee160e)) * auto allocation for negative amount outstanding for Customers in Payment Entry ([78a329e](https://github.com/frappe/erpnext/commit/78a329e5738c92e34e6cac0350263aa40b93c940)) * Batch Price gets updated only if it is a billed item ([dbd47df](https://github.com/frappe/erpnext/commit/dbd47dff985019d18a5b68de44149e81dd1663cf)) * Batch Price gets updated only if it is a billed item ([8ed512f](https://github.com/frappe/erpnext/commit/8ed512f6c6e7cced1e48fb93ed71e9a08a46a8aa)) * change voucher_type and voucher_no field type to data ([3a03865](https://github.com/frappe/erpnext/commit/3a03865a8f057283a0ce757acf920ca6d1750e46)) * Close and Reopen buttons dissapear after saving changes ([#46048](https://github.com/frappe/erpnext/issues/46048)) ([506dd3c](https://github.com/frappe/erpnext/commit/506dd3c6b94c25b1db4f35bf62fabf9d44f5ac00)) * consider journal entry and return invoice in paid_amount calculation (backport [#46129](https://github.com/frappe/erpnext/issues/46129)) ([#46319](https://github.com/frappe/erpnext/issues/46319)) ([836fd8f](https://github.com/frappe/erpnext/commit/836fd8fbc4a873e4dde27d130b0006ad3eb354d5)) * consolidate gl entries by project in General Ledger Report (backport [#46314](https://github.com/frappe/erpnext/issues/46314)) ([#46321](https://github.com/frappe/erpnext/issues/46321)) ([6aa8803](https://github.com/frappe/erpnext/commit/6aa8803068752b1e1906b0ce664bcacd0b9cb0bb)) * Convert tuple of tuples to list of dicts for dot notation access ([#46062](https://github.com/frappe/erpnext/issues/46062)) ([ef19551](https://github.com/frappe/erpnext/commit/ef195513d0056f9b8069532e310e4902f469c564)) * delivery note from sales order uom conversion mistake ([d10add4](https://github.com/frappe/erpnext/commit/d10add4b1ecddff754e822d3558b9917117baf17)) * depreciation and balances report correction (backport [#46259](https://github.com/frappe/erpnext/issues/46259)) ([#46305](https://github.com/frappe/erpnext/issues/46305)) ([087dde5](https://github.com/frappe/erpnext/commit/087dde5873fe64979307856be0a68e38a5f2b445)) * discount accounting for v15 ([f609012](https://github.com/frappe/erpnext/commit/f609012f02c28317dec6a03f986ee25689879312)) * do not include opening invoices in billed items to be received report ([eee500f](https://github.com/frappe/erpnext/commit/eee500f20e8c9df46e72cf7151d777016dbdc089)) * don't allow renaming account while system is actively in use (backport [#46176](https://github.com/frappe/erpnext/issues/46176)) ([#46210](https://github.com/frappe/erpnext/issues/46210)) ([faee8d6](https://github.com/frappe/erpnext/commit/faee8d6c5e54184cbc223f3a2dd1f21e5b41b63e)) * dont update rate of free item when batch is updated ([9e649d8](https://github.com/frappe/erpnext/commit/9e649d852237a54bae334f7c6f413cbdd38f54c5)) * error ([61d5680](https://github.com/frappe/erpnext/commit/61d5680c8daf0b683be3460487711f98ac2d2232)) * exclude already consumed purchase receipt items from asset capitalization (backport [#46329](https://github.com/frappe/erpnext/issues/46329)) ([#46336](https://github.com/frappe/erpnext/issues/46336)) ([6c1ceff](https://github.com/frappe/erpnext/commit/6c1ceff8eeb1df3224f83210eb889b5066ed57e9)) * exclude cancelled gl entries ([5e08386](https://github.com/frappe/erpnext/commit/5e083861a419b6ead0071df9004f5c3d1c6f4977)) * fiscal year error ([7b13d8c](https://github.com/frappe/erpnext/commit/7b13d8cd98763a2936cdf1e56ba798f36f85c1e5)) * fixing test case ([9f4311e](https://github.com/frappe/erpnext/commit/9f4311e7fbaa4ad607747f61a3a4b95ab61b75a2)) * if invoice is return then add amount in proper column ([0a65217](https://github.com/frappe/erpnext/commit/0a65217423035b0fe6e8a2934f1bd2aed85e2ac9)) * Include additional account types for Expense Account in LCV (backport [#46206](https://github.com/frappe/erpnext/issues/46206)) ([#46296](https://github.com/frappe/erpnext/issues/46296)) ([88234bb](https://github.com/frappe/erpnext/commit/88234bbf9a6ca7c42ff093469a323ac751112185)) * incorrect batch picked ([e94f0b1](https://github.com/frappe/erpnext/commit/e94f0b1ccaa6b2cf96c67cd4013c76343b668ff3)) * incorrect batch picked in the pick list (backport [#45761](https://github.com/frappe/erpnext/issues/45761)) ([#46315](https://github.com/frappe/erpnext/issues/46315)) ([5a3073c](https://github.com/frappe/erpnext/commit/5a3073c4c145a0ae3862c824be71e6d5f6e5ef1c)) * incorrectly billed amount in the purchase receipt ([c247cf8](https://github.com/frappe/erpnext/commit/c247cf888b03cfcf172d90110611a89e23c16338)) * Naming of Purchase Amount (backport [#46051](https://github.com/frappe/erpnext/issues/46051)) ([#46324](https://github.com/frappe/erpnext/issues/46324)) ([aaf35c5](https://github.com/frappe/erpnext/commit/aaf35c5df930da736cce59861034e9ba1e9c2fb2)) * only include submitted docs for internal received quantity validation (backport [#46262](https://github.com/frappe/erpnext/issues/46262)) ([#46304](https://github.com/frappe/erpnext/issues/46304)) ([5ae9faa](https://github.com/frappe/erpnext/commit/5ae9faab91116fabe663a891d4b343ceffbc65cc)) * patch ([5e06e4a](https://github.com/frappe/erpnext/commit/5e06e4accefcff184e3e5b2477cc04c1b60eace2)) * patch ([8f2fdca](https://github.com/frappe/erpnext/commit/8f2fdcae88252cddaaeeb89f881671c2101ad886)) * patch path ([af49f5a](https://github.com/frappe/erpnext/commit/af49f5a8affe9cdfa5bacecf37be200d2c19cade)) * **patch:** Ensure SLE indexes (backport [#46131](https://github.com/frappe/erpnext/issues/46131)) ([#46135](https://github.com/frappe/erpnext/issues/46135)) ([f3cafef](https://github.com/frappe/erpnext/commit/f3cafef6a744e728b74299ac55c757fde4d94ba9)) * payment entry exchange gain loss issue ([3fb9033](https://github.com/frappe/erpnext/commit/3fb9033fb70839bcd33e9e198ac3123501be277e)) * pos item detail serial no field (backport [#46211](https://github.com/frappe/erpnext/issues/46211)) ([#46212](https://github.com/frappe/erpnext/issues/46212)) ([de0dfbc](https://github.com/frappe/erpnext/commit/de0dfbca9afaec9152462cd1f06d63d449f8fbae)) * pos item selection using serial no (backport [#46200](https://github.com/frappe/erpnext/issues/46200)) ([#46203](https://github.com/frappe/erpnext/issues/46203)) ([0f263bc](https://github.com/frappe/erpnext/commit/0f263bcff286017065b776bdafb27325a0719596)) * **pos:** get parent item group without user permission ([#46020](https://github.com/frappe/erpnext/issues/46020)) ([29f3aac](https://github.com/frappe/erpnext/commit/29f3aac925ea455c599cfb5e488c3eedc87c446f)) * production analytics report ([5668795](https://github.com/frappe/erpnext/commit/5668795884919f6fee4703ce9da2d6386148f3fd)) * rate changing on the deliver note ([75bc68b](https://github.com/frappe/erpnext/commit/75bc68b8631a2c38fe82989ce65c203742334a14)) * rearrange stock settings fields ([87703c6](https://github.com/frappe/erpnext/commit/87703c6511130a9d7885815b3ff3797b2cbb8e9a)) * removed mandatory property for the cost center field ([a94292a](https://github.com/frappe/erpnext/commit/a94292a69fb9672d2ec68762fadcc3aff99bf613)) * rename some sla fields ([c5717b9](https://github.com/frappe/erpnext/commit/c5717b983da7e0a8e117f2f4e1dd89133ce58f98)) * replacing serial and batch bundle on pos with auto fetch serial nos (backport [#46236](https://github.com/frappe/erpnext/issues/46236)) ([#46337](https://github.com/frappe/erpnext/issues/46337)) ([1e85f69](https://github.com/frappe/erpnext/commit/1e85f69072568fc92ed35a2a6b54154b5ab1ad56)) * **report:** allow `Closed` purchase orders to be visible ([20c4487](https://github.com/frappe/erpnext/commit/20c44878533e830a706a4d5f60a507a62d01038f)) * **report:** allow `Closed` sales orders to be visible ([8799af9](https://github.com/frappe/erpnext/commit/8799af974751998909fd0b73d611c39a87228a42)) * **report:** filter sales / purchase orders based on date filters ([2221bf1](https://github.com/frappe/erpnext/commit/2221bf1cba47488ce897124ea92cf31bfaf4f84f)) * revamp logic (split parent and child) ([7437cea](https://github.com/frappe/erpnext/commit/7437cea458cde7e52ed8b10d34abe38e3e966564)) * revert last commit ([a09c57f](https://github.com/frappe/erpnext/commit/a09c57f0d1429d737a2819cd5b6ea87b44843fbb)) * set landed cost based on purchase invoice rate ([fdaf5fa](https://github.com/frappe/erpnext/commit/fdaf5fafda7d1d42fe04b5b85c8e7ce16f78a14d)) * set taxes before calculating taxes and totals ([90dea42](https://github.com/frappe/erpnext/commit/90dea426d8adc86a56a37666e1f3f7b274b0df2f)) * source warehouse not fetched in bom creator ([6157fed](https://github.com/frappe/erpnext/commit/6157fed71c0a7b2cbe90cc81cb22f034b7d0a543)) * stock qty not recalculate on changing of the qty ([331798b](https://github.com/frappe/erpnext/commit/331798babc6f7ad40d0e5d9b73c71b1eef66409d)) * stock reservation issue while making Purchase Invoice ([8bd7195](https://github.com/frappe/erpnext/commit/8bd71954f3d67efbc88a3994f8870e63ef662af5)) * syntax error ([1790bcc](https://github.com/frappe/erpnext/commit/1790bcc6d1901e8f52b3efbcd80801efb876019c)) * syntax error ([bd48d39](https://github.com/frappe/erpnext/commit/bd48d391e4a9c6e78e0e9896da9ebf8bce64efc5)) * syntax error ([cc535b7](https://github.com/frappe/erpnext/commit/cc535b76365325d189d7faee0556a23679bb6bb1)) * test case for debit note ([a8b31df](https://github.com/frappe/erpnext/commit/a8b31df65ddeae3e0fcee7895dbafc9691034f10)) * tests ([46b0734](https://github.com/frappe/erpnext/commit/46b0734d6f2c0b6eaab754f6755d5510f6fa7b6b)) * tests ([d413039](https://github.com/frappe/erpnext/commit/d41303961c6ec673966bf4884d20c1a3fd3fc756)) * translation DE ([ddcf79d](https://github.com/frappe/erpnext/commit/ddcf79da1da6dfe5b9cd7f367bf86c7c41992b21)) * use else instead of unnecessary elif ([6f760d1](https://github.com/frappe/erpnext/commit/6f760d197d9620aac598ec8b2cbe509723f71d04)) * use valuation method from settings in stock ageing report (backport [#46068](https://github.com/frappe/erpnext/issues/46068)) ([#46297](https://github.com/frappe/erpnext/issues/46297)) ([d02d005](https://github.com/frappe/erpnext/commit/d02d0059139f088b343962ed20932e86216ceb6d)) * use value from currency exchange when exchange api is disabled (backport [#46137](https://github.com/frappe/erpnext/issues/46137)) ([#46309](https://github.com/frappe/erpnext/issues/46309)) ([ccc0358](https://github.com/frappe/erpnext/commit/ccc0358db6ccaa164a20e5eaa19cf95a6fe526d1)) * **workspace:** enable is_query_report on purchase reports (backport [#46249](https://github.com/frappe/erpnext/issues/46249)) ([#46306](https://github.com/frappe/erpnext/issues/46306)) ([363129b](https://github.com/frappe/erpnext/commit/363129bcd4d674df9762933ec2642330bc862e50)) * Wrong Overdue Status in Sales Invoices (Floating-point arithmetic) (backport [#46146](https://github.com/frappe/erpnext/issues/46146)) ([#46310](https://github.com/frappe/erpnext/issues/46310)) ([1ff0858](https://github.com/frappe/erpnext/commit/1ff085876e62c642694c090cbee7a65160557776)) ### Features * add new Closed and Stopped rows ([7749814](https://github.com/frappe/erpnext/commit/7749814571d8f373ada0c99111d483a47718bd51)) * add total weight in shipment ([#46049](https://github.com/frappe/erpnext/issues/46049)) ([171df3a](https://github.com/frappe/erpnext/commit/171df3aba512d3e1d9cdb26c456a9e12469066d0)) * create sales invoice print format ([#45403](https://github.com/frappe/erpnext/issues/45403)) ([1a382eb](https://github.com/frappe/erpnext/commit/1a382ebe86633cfbc5e77ae0689b0e73392aa4aa)) * **received items to be billed:** add company and date filters (backport [#46271](https://github.com/frappe/erpnext/issues/46271)) ([#46302](https://github.com/frappe/erpnext/issues/46302)) ([400f4f3](https://github.com/frappe/erpnext/commit/400f4f32adf4e789d692750ff4213a7321c41f39)) * **Sales Invoice:** add items row via "Fetch Timesheet" (backport [#46071](https://github.com/frappe/erpnext/issues/46071)) ([#46311](https://github.com/frappe/erpnext/issues/46311)) ([1c6e464](https://github.com/frappe/erpnext/commit/1c6e4649bd424cba951c0e18aa62cdefacbd5089)) ### Performance Improvements * don't track seen for POS Invoice (backport [#46187](https://github.com/frappe/erpnext/issues/46187)) ([#46189](https://github.com/frappe/erpnext/issues/46189)) ([41ab7f3](https://github.com/frappe/erpnext/commit/41ab7f3f7c0a968171e2866cdd856584f67513a9)) * patch ([ee41e55](https://github.com/frappe/erpnext/commit/ee41e55343166f88cd105fd608a3792d0fb84bb0)) * replace if function in query ([d0b8e0d](https://github.com/frappe/erpnext/commit/d0b8e0da8de036445e07301f6dc06ae8089f350c)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 1387ffdc4f3..c7a3ef15b08 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.53.4" +__version__ = "15.54.0" def get_default_company(user=None): From 6b1d20970e79b33f94c16a78a301c77dedf1d136 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Wed, 5 Mar 2025 16:33:57 +0530 Subject: [PATCH 1304/1614] fix: uom reverts to default upon selecting do not explode (#45693) * fix: uom reverts to default upon selecting do not explode * fix: logical error failing tests (cherry picked from commit 58ed697ba5d36f6e44b858a36e347648129bb4fd) --- erpnext/manufacturing/doctype/bom/bom.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py index 054b482b260..61f1de798e2 100644 --- a/erpnext/manufacturing/doctype/bom/bom.py +++ b/erpnext/manufacturing/doctype/bom/bom.py @@ -440,12 +440,12 @@ class BOM(WebsiteGenerator): "description": item and args["description"] or "", "image": item and args["image"] or "", "stock_uom": item and args["stock_uom"] or "", - "uom": item and args["stock_uom"] or "", - "conversion_factor": 1, + "uom": args["uom"] if hasattr(args, "uom") else item and args["stock_uom"] or "", + "conversion_factor": args["conversion_factor"] if hasattr(args, "conversion_factor") else 1, "bom_no": args["bom_no"], "rate": rate, "qty": args.get("qty") or args.get("stock_qty") or 1, - "stock_qty": args.get("qty") or args.get("stock_qty") or 1, + "stock_qty": args.get("stock_qty") or args.get("qty") or 1, "base_rate": flt(rate) * (flt(self.conversion_rate) or 1), "include_item_in_manufacturing": cint(args.get("transfer_for_manufacture")), "sourced_by_supplier": args.get("sourced_by_supplier", 0), From 1dcbdf325766316e4febaf265475c419c528a7bc Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Wed, 5 Mar 2025 18:07:17 +0530 Subject: [PATCH 1305/1614] fix: doctype name (cherry picked from commit d039310d80044fba59590fa87e11d509a95b6653) --- .../incorrect_serial_and_batch_bundle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/report/incorrect_serial_and_batch_bundle/incorrect_serial_and_batch_bundle.py b/erpnext/stock/report/incorrect_serial_and_batch_bundle/incorrect_serial_and_batch_bundle.py index 2e954ef9190..e65725f3c3d 100644 --- a/erpnext/stock/report/incorrect_serial_and_batch_bundle/incorrect_serial_and_batch_bundle.py +++ b/erpnext/stock/report/incorrect_serial_and_batch_bundle/incorrect_serial_and_batch_bundle.py @@ -59,7 +59,7 @@ def get_data(filters) -> list[list]: The report data is a list of rows, with each row being a list of cell values. """ - SABB = frappe.qb.DocType("Serial And Batch Bundle") + SABB = frappe.qb.DocType("Serial and Batch Bundle") SLE = frappe.qb.DocType("Stock Ledger Entry") ignore_voycher_types = [ "Installation Note", From 7bc7557018bb7764b77e6892b3ffd21f9128437e Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Thu, 6 Mar 2025 12:57:27 +0530 Subject: [PATCH 1306/1614] fix: rename_sla_fields patch (cherry picked from commit e8d4a487c66a6d19c420fb096aa8050064182296) --- erpnext/patches/v15_0/rename_sla_fields.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/erpnext/patches/v15_0/rename_sla_fields.py b/erpnext/patches/v15_0/rename_sla_fields.py index 5e3e92d85c2..e5e69e0921e 100644 --- a/erpnext/patches/v15_0/rename_sla_fields.py +++ b/erpnext/patches/v15_0/rename_sla_fields.py @@ -6,8 +6,14 @@ from frappe.model.utils.rename_field import rename_field def execute(): doctypes = frappe.get_all("Service Level Agreement", pluck="document_type") for doctype in doctypes: - rename_fieldname(doctype + "-resolution_by", "sla_resolution_by") - rename_fieldname(doctype + "-resolution_date", "sla_resolution_date") + if doctype == "Issue": + continue + + if frappe.db.exists("Custom Field", {"fieldname": doctype + "-resolution_by"}): + rename_fieldname(doctype + "-resolution_by", "sla_resolution_by") + + if frappe.db.exists("Custom Field", {"fieldname": doctype + "-resolution_date"}): + rename_fieldname(doctype + "-resolution_date", "sla_resolution_date") rename_field("Issue", "resolution_by", "sla_resolution_by") rename_field("Issue", "resolution_date", "sla_resolution_date") From f247f02e49e5bb22585e81e3c687e052ff441361 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Thu, 6 Mar 2025 12:58:53 +0530 Subject: [PATCH 1307/1614] fix: recalculate_amount_difference_field patch (cherry picked from commit 0492b941ffc576b81116b486c7553c2bfe729391) # Conflicts: # erpnext/patches/v15_0/recalculate_amount_difference_field.py --- .../recalculate_amount_difference_field.py | 101 ++++++++++++++++-- 1 file changed, 90 insertions(+), 11 deletions(-) diff --git a/erpnext/patches/v15_0/recalculate_amount_difference_field.py b/erpnext/patches/v15_0/recalculate_amount_difference_field.py index fa45211be94..dda92ecf1e8 100644 --- a/erpnext/patches/v15_0/recalculate_amount_difference_field.py +++ b/erpnext/patches/v15_0/recalculate_amount_difference_field.py @@ -1,12 +1,13 @@ import frappe from frappe.query_builder.functions import Sum -from frappe.utils import flt +from frappe.utils import flt, getdate from erpnext.accounts.utils import get_fiscal_year from erpnext.stock.doctype.purchase_receipt.purchase_receipt import adjust_incoming_rate_for_pr def execute(): +<<<<<<< HEAD table = frappe.qb.DocType("Purchase Receipt Item") parent = frappe.qb.DocType("Purchase Receipt") query = ( @@ -50,20 +51,98 @@ def execute(): adjusted_amt = flt( adjusted_amt * flt(item.conversion_rate), precision, +======= + for company in frappe.get_all("Company", pluck="name"): + table = frappe.qb.DocType("Purchase Receipt Item") + parent = frappe.qb.DocType("Purchase Receipt") + query = ( + frappe.qb.from_(table) + .join(parent) + .on(table.parent == parent.name) + .select( + table.parent, + table.name, + table.amount, + table.billed_amt, + table.amount_difference_with_purchase_invoice, + table.rate, + table.qty, + parent.conversion_rate, +>>>>>>> 0492b941ff (fix: recalculate_amount_difference_field patch) ) + .where( + (table.amount_difference_with_purchase_invoice != 0) + & (table.docstatus == 1) + & (parent.company == company) + ) + ) - if adjusted_amt != item.amount_difference_with_purchase_invoice: - frappe.db.set_value( - "Purchase Receipt Item", - item.name, - "amount_difference_with_purchase_invoice", - adjusted_amt, - update_modified=False, + posting_date = "2024-04-01" + + # Get the last accounting period end date + accounting_period = frappe.get_all( + "Accounting Period", {"company": company}, ["end_date"], order_by="end_date desc", limit=1 + ) + if ( + accounting_period + and accounting_period[0].end_date + and getdate(accounting_period[0].end_date) > getdate(posting_date) + ): + posting_date = accounting_period[0].end_date + + # Get the last period closing voucher end date + period_closing_voucher = frappe.get_all( + "Period Closing Voucher", + {"company": company, "docstatus": 1}, + ["period_end_date"], + order_by="period_end_date desc", + limit=1, + ) + if ( + period_closing_voucher + and period_closing_voucher[0].period_end_date + and getdate(period_closing_voucher[0].period_end_date) > getdate(posting_date) + ): + posting_date = period_closing_voucher[0].period_end_date + + fiscal_year = get_fiscal_year(frappe.utils.datetime.date.today(), raise_on_missing=False) + if fiscal_year and getdate(fiscal_year[1]) > getdate(posting_date): + posting_date = fiscal_year[1] + query = query.where(parent.posting_date > posting_date) + + if result := query.run(as_dict=True): + item_wise_billed_qty = get_billed_qty_against_purchase_receipt([item.name for item in result]) + + purchase_receipts = set() + precision = frappe.get_precision("Purchase Receipt Item", "amount") + for item in result: + adjusted_amt = 0.0 + + if ( + item.billed_amt is not None + and item.amount is not None + and item_wise_billed_qty.get(item.name) + ): + adjusted_amt = ( + flt(item.billed_amt / item_wise_billed_qty.get(item.name)) - flt(item.rate) + ) * item.qty + adjusted_amt = flt( + adjusted_amt * flt(item.conversion_rate), + precision, ) - purchase_receipts.add(item.parent) - for pr in purchase_receipts: - adjust_incoming_rate_for_pr(frappe.get_doc("Purchase Receipt", pr)) + if adjusted_amt != item.amount_difference_with_purchase_invoice: + frappe.db.set_value( + "Purchase Receipt Item", + item.name, + "amount_difference_with_purchase_invoice", + adjusted_amt, + update_modified=False, + ) + purchase_receipts.add(item.parent) + + for pr in purchase_receipts: + adjust_incoming_rate_for_pr(frappe.get_doc("Purchase Receipt", pr)) def get_billed_qty_against_purchase_receipt(pr_names): From 7047fe26812fbb48d80e3a24f438a9c1c5d8683f Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Thu, 6 Mar 2025 13:11:31 +0530 Subject: [PATCH 1308/1614] fix: check if set_landed_cost_based_on_purchase_invoice_rate is enabled before running patch (cherry picked from commit 95d197693151610bda2926db46f70e1cf9f6838c) # Conflicts: # erpnext/patches/v15_0/recalculate_amount_difference_field.py --- .../patches/v15_0/recalculate_amount_difference_field.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/erpnext/patches/v15_0/recalculate_amount_difference_field.py b/erpnext/patches/v15_0/recalculate_amount_difference_field.py index dda92ecf1e8..d0a42e7cc5e 100644 --- a/erpnext/patches/v15_0/recalculate_amount_difference_field.py +++ b/erpnext/patches/v15_0/recalculate_amount_difference_field.py @@ -7,6 +7,7 @@ from erpnext.stock.doctype.purchase_receipt.purchase_receipt import adjust_incom def execute(): +<<<<<<< HEAD <<<<<<< HEAD table = frappe.qb.DocType("Purchase Receipt Item") parent = frappe.qb.DocType("Purchase Receipt") @@ -52,6 +53,11 @@ def execute(): adjusted_amt * flt(item.conversion_rate), precision, ======= +======= + if not frappe.db.get_single_value("Buying Settings", "set_landed_cost_based_on_purchase_invoice_rate"): + return + +>>>>>>> 95d1976931 (fix: check if set_landed_cost_based_on_purchase_invoice_rate is enabled before running patch) for company in frappe.get_all("Company", pluck="name"): table = frappe.qb.DocType("Purchase Receipt Item") parent = frappe.qb.DocType("Purchase Receipt") From bb553c27ab0faade04d0718364b03654018d03da Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Thu, 6 Mar 2025 12:57:27 +0530 Subject: [PATCH 1309/1614] fix: rename_sla_fields patch (cherry picked from commit e8d4a487c66a6d19c420fb096aa8050064182296) (cherry picked from commit 7bc7557018bb7764b77e6892b3ffd21f9128437e) --- erpnext/patches/v15_0/rename_sla_fields.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/erpnext/patches/v15_0/rename_sla_fields.py b/erpnext/patches/v15_0/rename_sla_fields.py index 5e3e92d85c2..e5e69e0921e 100644 --- a/erpnext/patches/v15_0/rename_sla_fields.py +++ b/erpnext/patches/v15_0/rename_sla_fields.py @@ -6,8 +6,14 @@ from frappe.model.utils.rename_field import rename_field def execute(): doctypes = frappe.get_all("Service Level Agreement", pluck="document_type") for doctype in doctypes: - rename_fieldname(doctype + "-resolution_by", "sla_resolution_by") - rename_fieldname(doctype + "-resolution_date", "sla_resolution_date") + if doctype == "Issue": + continue + + if frappe.db.exists("Custom Field", {"fieldname": doctype + "-resolution_by"}): + rename_fieldname(doctype + "-resolution_by", "sla_resolution_by") + + if frappe.db.exists("Custom Field", {"fieldname": doctype + "-resolution_date"}): + rename_fieldname(doctype + "-resolution_date", "sla_resolution_date") rename_field("Issue", "resolution_by", "sla_resolution_by") rename_field("Issue", "resolution_date", "sla_resolution_date") From 8e65b0ec0c0bb8e00ecc2e3b104bf4694883926c Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Thu, 6 Mar 2025 14:13:55 +0530 Subject: [PATCH 1310/1614] chore: resolve conflicts --- .../recalculate_amount_difference_field.py | 59 +++---------------- 1 file changed, 7 insertions(+), 52 deletions(-) diff --git a/erpnext/patches/v15_0/recalculate_amount_difference_field.py b/erpnext/patches/v15_0/recalculate_amount_difference_field.py index d0a42e7cc5e..7d3d957fe62 100644 --- a/erpnext/patches/v15_0/recalculate_amount_difference_field.py +++ b/erpnext/patches/v15_0/recalculate_amount_difference_field.py @@ -7,57 +7,9 @@ from erpnext.stock.doctype.purchase_receipt.purchase_receipt import adjust_incom def execute(): -<<<<<<< HEAD -<<<<<<< HEAD - table = frappe.qb.DocType("Purchase Receipt Item") - parent = frappe.qb.DocType("Purchase Receipt") - query = ( - frappe.qb.from_(table) - .join(parent) - .on(table.parent == parent.name) - .select( - table.parent, - table.name, - table.amount, - table.billed_amt, - table.amount_difference_with_purchase_invoice, - table.rate, - table.qty, - parent.conversion_rate, - ) - .where((table.amount_difference_with_purchase_invoice != 0) & (table.docstatus == 1)) - ) - try: - if fiscal_year_dates := get_fiscal_year(frappe.utils.datetime.date.today()): - query.where(parent.posting_date.between(fiscal_year_dates[1], fiscal_year_dates[2])) - except Exception: - return - - if result := query.run(as_dict=True): - item_wise_billed_qty = get_billed_qty_against_purchase_receipt([item.name for item in result]) - - purchase_receipts = set() - precision = frappe.get_precision("Purchase Receipt Item", "amount") - for item in result: - adjusted_amt = 0.0 - - if ( - item.billed_amt is not None - and item.amount is not None - and item_wise_billed_qty.get(item.name) - ): - adjusted_amt = ( - flt(item.billed_amt / item_wise_billed_qty.get(item.name)) - flt(item.rate) - ) * item.qty - adjusted_amt = flt( - adjusted_amt * flt(item.conversion_rate), - precision, -======= -======= if not frappe.db.get_single_value("Buying Settings", "set_landed_cost_based_on_purchase_invoice_rate"): return ->>>>>>> 95d1976931 (fix: check if set_landed_cost_based_on_purchase_invoice_rate is enabled before running patch) for company in frappe.get_all("Company", pluck="name"): table = frappe.qb.DocType("Purchase Receipt Item") parent = frappe.qb.DocType("Purchase Receipt") @@ -74,7 +26,6 @@ def execute(): table.rate, table.qty, parent.conversion_rate, ->>>>>>> 0492b941ff (fix: recalculate_amount_difference_field patch) ) .where( (table.amount_difference_with_purchase_invoice != 0) @@ -111,9 +62,13 @@ def execute(): ): posting_date = period_closing_voucher[0].period_end_date - fiscal_year = get_fiscal_year(frappe.utils.datetime.date.today(), raise_on_missing=False) - if fiscal_year and getdate(fiscal_year[1]) > getdate(posting_date): - posting_date = fiscal_year[1] + try: + fiscal_year = get_fiscal_year(frappe.utils.datetime.date.today()) + except Exception: + return + else: + if fiscal_year and getdate(fiscal_year[1]) > getdate(posting_date): + posting_date = fiscal_year[1] query = query.where(parent.posting_date > posting_date) if result := query.run(as_dict=True): From 041335f318c510dac7f56d2f7998135ff559fd58 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Thu, 6 Mar 2025 12:58:53 +0530 Subject: [PATCH 1311/1614] fix: recalculate_amount_difference_field patch (cherry picked from commit 0492b941ffc576b81116b486c7553c2bfe729391) # Conflicts: # erpnext/patches/v15_0/recalculate_amount_difference_field.py (cherry picked from commit f247f02e49e5bb22585e81e3c687e052ff441361) --- .../recalculate_amount_difference_field.py | 101 ++++++++++++++++-- 1 file changed, 90 insertions(+), 11 deletions(-) diff --git a/erpnext/patches/v15_0/recalculate_amount_difference_field.py b/erpnext/patches/v15_0/recalculate_amount_difference_field.py index fa45211be94..dda92ecf1e8 100644 --- a/erpnext/patches/v15_0/recalculate_amount_difference_field.py +++ b/erpnext/patches/v15_0/recalculate_amount_difference_field.py @@ -1,12 +1,13 @@ import frappe from frappe.query_builder.functions import Sum -from frappe.utils import flt +from frappe.utils import flt, getdate from erpnext.accounts.utils import get_fiscal_year from erpnext.stock.doctype.purchase_receipt.purchase_receipt import adjust_incoming_rate_for_pr def execute(): +<<<<<<< HEAD table = frappe.qb.DocType("Purchase Receipt Item") parent = frappe.qb.DocType("Purchase Receipt") query = ( @@ -50,20 +51,98 @@ def execute(): adjusted_amt = flt( adjusted_amt * flt(item.conversion_rate), precision, +======= + for company in frappe.get_all("Company", pluck="name"): + table = frappe.qb.DocType("Purchase Receipt Item") + parent = frappe.qb.DocType("Purchase Receipt") + query = ( + frappe.qb.from_(table) + .join(parent) + .on(table.parent == parent.name) + .select( + table.parent, + table.name, + table.amount, + table.billed_amt, + table.amount_difference_with_purchase_invoice, + table.rate, + table.qty, + parent.conversion_rate, +>>>>>>> 0492b941ff (fix: recalculate_amount_difference_field patch) ) + .where( + (table.amount_difference_with_purchase_invoice != 0) + & (table.docstatus == 1) + & (parent.company == company) + ) + ) - if adjusted_amt != item.amount_difference_with_purchase_invoice: - frappe.db.set_value( - "Purchase Receipt Item", - item.name, - "amount_difference_with_purchase_invoice", - adjusted_amt, - update_modified=False, + posting_date = "2024-04-01" + + # Get the last accounting period end date + accounting_period = frappe.get_all( + "Accounting Period", {"company": company}, ["end_date"], order_by="end_date desc", limit=1 + ) + if ( + accounting_period + and accounting_period[0].end_date + and getdate(accounting_period[0].end_date) > getdate(posting_date) + ): + posting_date = accounting_period[0].end_date + + # Get the last period closing voucher end date + period_closing_voucher = frappe.get_all( + "Period Closing Voucher", + {"company": company, "docstatus": 1}, + ["period_end_date"], + order_by="period_end_date desc", + limit=1, + ) + if ( + period_closing_voucher + and period_closing_voucher[0].period_end_date + and getdate(period_closing_voucher[0].period_end_date) > getdate(posting_date) + ): + posting_date = period_closing_voucher[0].period_end_date + + fiscal_year = get_fiscal_year(frappe.utils.datetime.date.today(), raise_on_missing=False) + if fiscal_year and getdate(fiscal_year[1]) > getdate(posting_date): + posting_date = fiscal_year[1] + query = query.where(parent.posting_date > posting_date) + + if result := query.run(as_dict=True): + item_wise_billed_qty = get_billed_qty_against_purchase_receipt([item.name for item in result]) + + purchase_receipts = set() + precision = frappe.get_precision("Purchase Receipt Item", "amount") + for item in result: + adjusted_amt = 0.0 + + if ( + item.billed_amt is not None + and item.amount is not None + and item_wise_billed_qty.get(item.name) + ): + adjusted_amt = ( + flt(item.billed_amt / item_wise_billed_qty.get(item.name)) - flt(item.rate) + ) * item.qty + adjusted_amt = flt( + adjusted_amt * flt(item.conversion_rate), + precision, ) - purchase_receipts.add(item.parent) - for pr in purchase_receipts: - adjust_incoming_rate_for_pr(frappe.get_doc("Purchase Receipt", pr)) + if adjusted_amt != item.amount_difference_with_purchase_invoice: + frappe.db.set_value( + "Purchase Receipt Item", + item.name, + "amount_difference_with_purchase_invoice", + adjusted_amt, + update_modified=False, + ) + purchase_receipts.add(item.parent) + + for pr in purchase_receipts: + adjust_incoming_rate_for_pr(frappe.get_doc("Purchase Receipt", pr)) def get_billed_qty_against_purchase_receipt(pr_names): From 12bf31df87c9b09f7c1acf31102705faebf125b1 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Thu, 6 Mar 2025 13:11:31 +0530 Subject: [PATCH 1312/1614] fix: check if set_landed_cost_based_on_purchase_invoice_rate is enabled before running patch (cherry picked from commit 95d197693151610bda2926db46f70e1cf9f6838c) # Conflicts: # erpnext/patches/v15_0/recalculate_amount_difference_field.py (cherry picked from commit 7047fe26812fbb48d80e3a24f438a9c1c5d8683f) --- .../patches/v15_0/recalculate_amount_difference_field.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/erpnext/patches/v15_0/recalculate_amount_difference_field.py b/erpnext/patches/v15_0/recalculate_amount_difference_field.py index dda92ecf1e8..d0a42e7cc5e 100644 --- a/erpnext/patches/v15_0/recalculate_amount_difference_field.py +++ b/erpnext/patches/v15_0/recalculate_amount_difference_field.py @@ -7,6 +7,7 @@ from erpnext.stock.doctype.purchase_receipt.purchase_receipt import adjust_incom def execute(): +<<<<<<< HEAD <<<<<<< HEAD table = frappe.qb.DocType("Purchase Receipt Item") parent = frappe.qb.DocType("Purchase Receipt") @@ -52,6 +53,11 @@ def execute(): adjusted_amt * flt(item.conversion_rate), precision, ======= +======= + if not frappe.db.get_single_value("Buying Settings", "set_landed_cost_based_on_purchase_invoice_rate"): + return + +>>>>>>> 95d1976931 (fix: check if set_landed_cost_based_on_purchase_invoice_rate is enabled before running patch) for company in frappe.get_all("Company", pluck="name"): table = frappe.qb.DocType("Purchase Receipt Item") parent = frappe.qb.DocType("Purchase Receipt") From 525780645a0edf5b5ea76c9a9faecf4368e0866e Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Thu, 6 Mar 2025 14:13:55 +0530 Subject: [PATCH 1313/1614] chore: resolve conflicts (cherry picked from commit 8e65b0ec0c0bb8e00ecc2e3b104bf4694883926c) --- .../recalculate_amount_difference_field.py | 59 +++---------------- 1 file changed, 7 insertions(+), 52 deletions(-) diff --git a/erpnext/patches/v15_0/recalculate_amount_difference_field.py b/erpnext/patches/v15_0/recalculate_amount_difference_field.py index d0a42e7cc5e..7d3d957fe62 100644 --- a/erpnext/patches/v15_0/recalculate_amount_difference_field.py +++ b/erpnext/patches/v15_0/recalculate_amount_difference_field.py @@ -7,57 +7,9 @@ from erpnext.stock.doctype.purchase_receipt.purchase_receipt import adjust_incom def execute(): -<<<<<<< HEAD -<<<<<<< HEAD - table = frappe.qb.DocType("Purchase Receipt Item") - parent = frappe.qb.DocType("Purchase Receipt") - query = ( - frappe.qb.from_(table) - .join(parent) - .on(table.parent == parent.name) - .select( - table.parent, - table.name, - table.amount, - table.billed_amt, - table.amount_difference_with_purchase_invoice, - table.rate, - table.qty, - parent.conversion_rate, - ) - .where((table.amount_difference_with_purchase_invoice != 0) & (table.docstatus == 1)) - ) - try: - if fiscal_year_dates := get_fiscal_year(frappe.utils.datetime.date.today()): - query.where(parent.posting_date.between(fiscal_year_dates[1], fiscal_year_dates[2])) - except Exception: - return - - if result := query.run(as_dict=True): - item_wise_billed_qty = get_billed_qty_against_purchase_receipt([item.name for item in result]) - - purchase_receipts = set() - precision = frappe.get_precision("Purchase Receipt Item", "amount") - for item in result: - adjusted_amt = 0.0 - - if ( - item.billed_amt is not None - and item.amount is not None - and item_wise_billed_qty.get(item.name) - ): - adjusted_amt = ( - flt(item.billed_amt / item_wise_billed_qty.get(item.name)) - flt(item.rate) - ) * item.qty - adjusted_amt = flt( - adjusted_amt * flt(item.conversion_rate), - precision, -======= -======= if not frappe.db.get_single_value("Buying Settings", "set_landed_cost_based_on_purchase_invoice_rate"): return ->>>>>>> 95d1976931 (fix: check if set_landed_cost_based_on_purchase_invoice_rate is enabled before running patch) for company in frappe.get_all("Company", pluck="name"): table = frappe.qb.DocType("Purchase Receipt Item") parent = frappe.qb.DocType("Purchase Receipt") @@ -74,7 +26,6 @@ def execute(): table.rate, table.qty, parent.conversion_rate, ->>>>>>> 0492b941ff (fix: recalculate_amount_difference_field patch) ) .where( (table.amount_difference_with_purchase_invoice != 0) @@ -111,9 +62,13 @@ def execute(): ): posting_date = period_closing_voucher[0].period_end_date - fiscal_year = get_fiscal_year(frappe.utils.datetime.date.today(), raise_on_missing=False) - if fiscal_year and getdate(fiscal_year[1]) > getdate(posting_date): - posting_date = fiscal_year[1] + try: + fiscal_year = get_fiscal_year(frappe.utils.datetime.date.today()) + except Exception: + return + else: + if fiscal_year and getdate(fiscal_year[1]) > getdate(posting_date): + posting_date = fiscal_year[1] query = query.where(parent.posting_date > posting_date) if result := query.run(as_dict=True): From 7c8b34fd8f99194f7d593680873b563aa685eabd Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Thu, 6 Mar 2025 11:05:55 +0000 Subject: [PATCH 1314/1614] chore(release): Bumped to Version 15.54.1 ## [15.54.1](https://github.com/frappe/erpnext/compare/v15.54.0...v15.54.1) (2025-03-06) ### Bug Fixes * check if set_landed_cost_based_on_purchase_invoice_rate is enabled before running patch ([12bf31d](https://github.com/frappe/erpnext/commit/12bf31df87c9b09f7c1acf31102705faebf125b1)) * recalculate_amount_difference_field patch ([041335f](https://github.com/frappe/erpnext/commit/041335f318c510dac7f56d2f7998135ff559fd58)) * rename_sla_fields patch ([bb553c2](https://github.com/frappe/erpnext/commit/bb553c27ab0faade04d0718364b03654018d03da)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index c7a3ef15b08..7e5036a5a0e 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.54.0" +__version__ = "15.54.1" def get_default_company(user=None): From 5cc251a172a7d09451d3fdd2d11c06a33f138e73 Mon Sep 17 00:00:00 2001 From: Justine Jay Date: Thu, 6 Mar 2025 19:48:26 +0800 Subject: [PATCH 1315/1614] fix: auto email report creation (#46343) * fix(financial_statements): mandatory based on filter_based_on value * fix(financial_statements.js): include options for multiselect --- erpnext/public/js/financial_statements.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/erpnext/public/js/financial_statements.js b/erpnext/public/js/financial_statements.js index 7a3877b9c46..78796c4feb8 100644 --- a/erpnext/public/js/financial_statements.js +++ b/erpnext/public/js/financial_statements.js @@ -189,15 +189,15 @@ function get_filters() { fieldname: "period_start_date", label: __("Start Date"), fieldtype: "Date", - reqd: 1, depends_on: "eval:doc.filter_based_on == 'Date Range'", + mandatory_depends_on: "eval:doc.filter_based_on == 'Date Range'", }, { fieldname: "period_end_date", label: __("End Date"), fieldtype: "Date", - reqd: 1, depends_on: "eval:doc.filter_based_on == 'Date Range'", + mandatory_depends_on: "eval:doc.filter_based_on == 'Date Range'", }, { fieldname: "from_fiscal_year", @@ -247,6 +247,7 @@ function get_filters() { company: frappe.query_report.get_filter_value("company"), }); }, + options: "Cost Center", }, { fieldname: "project", @@ -257,6 +258,7 @@ function get_filters() { company: frappe.query_report.get_filter_value("company"), }); }, + options: "Project", }, ]; From de46165768c46724a58a0fe4d80a30f93f1ca1d3 Mon Sep 17 00:00:00 2001 From: Shariq Ansari <30859809+shariquerik@users.noreply.github.com> Date: Thu, 6 Mar 2025 17:19:14 +0530 Subject: [PATCH 1316/1614] fix: Allow rename prospect doctype (#46352) fix: allow rename prospect doctype (cherry picked from commit 884709deb8ff9a882c009ba0c8b7a521fa71dac8) # Conflicts: # erpnext/crm/doctype/prospect/prospect.json --- erpnext/crm/doctype/prospect/prospect.json | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/erpnext/crm/doctype/prospect/prospect.json b/erpnext/crm/doctype/prospect/prospect.json index d32311bc4e1..d9fce557a15 100644 --- a/erpnext/crm/doctype/prospect/prospect.json +++ b/erpnext/crm/doctype/prospect/prospect.json @@ -1,6 +1,7 @@ { "actions": [], "allow_events_in_timeline": 1, + "allow_rename": 1, "autoname": "field:company_name", "creation": "2021-08-19 00:21:06.995448", "doctype": "DocType", @@ -216,9 +217,14 @@ "options": "CRM Note" } ], + "grid_page_length": 50, "index_web_pages_for_search": 1, "links": [], +<<<<<<< HEAD "modified": "2022-10-13 12:29:33.674561", +======= + "modified": "2025-03-06 11:31:49.083983", +>>>>>>> 884709deb8 (fix: Allow rename prospect doctype (#46352)) "modified_by": "Administrator", "module": "CRM", "name": "Prospect", @@ -258,7 +264,12 @@ "share": 1 } ], +<<<<<<< HEAD "sort_field": "modified", +======= + "row_format": "Dynamic", + "sort_field": "creation", +>>>>>>> 884709deb8 (fix: Allow rename prospect doctype (#46352)) "sort_order": "DESC", "states": [], "title_field": "company_name", From c816f9bd0abf065231ed053889c6220bac20477c Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 6 Mar 2025 18:12:06 +0530 Subject: [PATCH 1317/1614] fix: validate accounting dimension company in Journal Entry & Stock Entry (backport #46204) (#46369) fix: validate accounting dimension company in Journal Entry & Stock Entry (#46204) * fix: validate accounting dimension company in journal entry and stock entry * test: update test cases to validate company-based accounting dimension * fix(test): ensure 'Pick List' company matches 'Delivery Note' to prevent test failures * chore: remove redundant lines of code (cherry picked from commit 7b6ebad9e62b4035f705de6a82fa593d823f3f68) Co-authored-by: Bhavansathru <122002510+Bhavan23@users.noreply.github.com> --- .../accounts/doctype/journal_entry/journal_entry.py | 1 + .../doctype/journal_entry/test_journal_entry.py | 3 ++- .../test_period_closing_voucher.py | 7 +++++++ .../doctype/purchase_order/test_purchase_order.py | 11 ++++++++++- erpnext/controllers/accounts_controller.py | 2 +- .../stock/doctype/delivery_note/test_delivery_note.py | 3 +++ erpnext/stock/doctype/pick_list/pick_list.py | 1 + erpnext/stock/doctype/serial_no/test_serial_no.py | 3 +++ erpnext/stock/doctype/stock_entry/stock_entry.py | 1 + 9 files changed, 29 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.py b/erpnext/accounts/doctype/journal_entry/journal_entry.py index ef2388a7eaa..4eb74cb2b6f 100644 --- a/erpnext/accounts/doctype/journal_entry/journal_entry.py +++ b/erpnext/accounts/doctype/journal_entry/journal_entry.py @@ -141,6 +141,7 @@ class JournalEntry(AccountsController): self.validate_empty_accounts_table() self.validate_inter_company_accounts() self.validate_depr_entry_voucher_type() + self.validate_company_in_accounting_dimension() self.validate_advance_accounts() if self.docstatus == 0: diff --git a/erpnext/accounts/doctype/journal_entry/test_journal_entry.py b/erpnext/accounts/doctype/journal_entry/test_journal_entry.py index 54aa3eaf96f..e95a8eaef29 100644 --- a/erpnext/accounts/doctype/journal_entry/test_journal_entry.py +++ b/erpnext/accounts/doctype/journal_entry/test_journal_entry.py @@ -591,13 +591,14 @@ def make_journal_entry( save=True, submit=False, project=None, + company=None, ): if not cost_center: cost_center = "_Test Cost Center - _TC" jv = frappe.new_doc("Journal Entry") jv.posting_date = posting_date or nowdate() - jv.company = "_Test Company" + jv.company = company or "_Test Company" jv.user_remark = "test" jv.multi_currency = 1 jv.set( diff --git a/erpnext/accounts/doctype/period_closing_voucher/test_period_closing_voucher.py b/erpnext/accounts/doctype/period_closing_voucher/test_period_closing_voucher.py index e9d65f7f856..34e2fdd9082 100644 --- a/erpnext/accounts/doctype/period_closing_voucher/test_period_closing_voucher.py +++ b/erpnext/accounts/doctype/period_closing_voucher/test_period_closing_voucher.py @@ -27,6 +27,7 @@ class TestPeriodClosingVoucher(unittest.TestCase): account1="Cash - TPC", account2="Sales - TPC", cost_center=cost_center, + company=company, save=False, ) jv1.company = company @@ -39,6 +40,7 @@ class TestPeriodClosingVoucher(unittest.TestCase): account1="Cost of Goods Sold - TPC", account2="Cash - TPC", cost_center=cost_center, + company=company, save=False, ) jv2.company = company @@ -156,6 +158,7 @@ class TestPeriodClosingVoucher(unittest.TestCase): amount=400, cost_center=cost_center, posting_date="2021-03-15", + company=company, ) jv.company = company jv.finance_book = create_finance_book().name @@ -198,6 +201,7 @@ class TestPeriodClosingVoucher(unittest.TestCase): account1="Cash - TPC", account2="Sales - TPC", cost_center=cost_center, + company=company, save=False, ) jv1.company = company @@ -220,6 +224,7 @@ class TestPeriodClosingVoucher(unittest.TestCase): account1="Cash - TPC", account2="Sales - TPC", cost_center=cost_center1, + company=company, save=False, ) jv1.company = company @@ -232,6 +237,7 @@ class TestPeriodClosingVoucher(unittest.TestCase): account1="Cash - TPC", account2="Sales - TPC", cost_center=cost_center2, + company=company, save=False, ) jv2.company = company @@ -261,6 +267,7 @@ class TestPeriodClosingVoucher(unittest.TestCase): account1="Cash - TPC", account2="Sales - TPC", cost_center=cost_center2, + company=company, save=False, ) diff --git a/erpnext/buying/doctype/purchase_order/test_purchase_order.py b/erpnext/buying/doctype/purchase_order/test_purchase_order.py index 99ad609f8df..404c83cdb50 100644 --- a/erpnext/buying/doctype/purchase_order/test_purchase_order.py +++ b/erpnext/buying/doctype/purchase_order/test_purchase_order.py @@ -920,6 +920,7 @@ class TestPurchaseOrder(FrappeTestCase): automatically_fetch_payment_terms(enable=0) def test_internal_transfer_flow(self): + from erpnext.accounts.doctype.cost_center.test_cost_center import create_cost_center from erpnext.accounts.doctype.sales_invoice.sales_invoice import ( make_inter_company_purchase_invoice, ) @@ -935,8 +936,16 @@ class TestPurchaseOrder(FrappeTestCase): prepare_data_for_internal_transfer() supplier = "_Test Internal Supplier 2" + create_cost_center( + cost_center_name="_Test Cost Center for perpetual inventory Account", + company="_Test Company with perpetual inventory", + ) + mr = make_material_request( - qty=2, company="_Test Company with perpetual inventory", warehouse="Stores - TCP1" + qty=2, + company="_Test Company with perpetual inventory", + warehouse="Stores - TCP1", + cost_center="_Test Cost Center for perpetual inventory Account - TCP1", ) po = create_purchase_order( diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 6ed55a0b55e..d67322eae8d 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -419,7 +419,7 @@ class AccountsController(TransactionBase): .where(doc_field.fieldname == "company") ).run(as_list=True) - dimension_list = sum(dimension_list, ["Project"]) + dimension_list = sum(dimension_list, ["Project", "Cost Center"]) self.validate_company(dimension_list) for child in self.get_all_children() or []: diff --git a/erpnext/stock/doctype/delivery_note/test_delivery_note.py b/erpnext/stock/doctype/delivery_note/test_delivery_note.py index f86798d17e8..3394e0ce83a 100644 --- a/erpnext/stock/doctype/delivery_note/test_delivery_note.py +++ b/erpnext/stock/doctype/delivery_note/test_delivery_note.py @@ -10,6 +10,7 @@ from frappe.tests.utils import FrappeTestCase from frappe.utils import add_days, cstr, flt, getdate, nowdate, nowtime, today from erpnext.accounts.doctype.account.test_account import get_inventory_account +from erpnext.accounts.doctype.cost_center.test_cost_center import create_cost_center from erpnext.accounts.utils import get_balance_on from erpnext.selling.doctype.product_bundle.test_product_bundle import make_product_bundle from erpnext.selling.doctype.sales_order.test_sales_order import ( @@ -1400,6 +1401,7 @@ class TestDeliveryNote(FrappeTestCase): warehouse = "Stores - TCP1" target = "Finished Goods - TCP1" customer = create_internal_customer(represents_company=company) + create_cost_center(cost_center_name="_Test Cost Center", company=company) # average rate = 128.015 rates = [101.45, 150.46, 138.25, 121.9] @@ -1414,6 +1416,7 @@ class TestDeliveryNote(FrappeTestCase): qty=4, warehouse=warehouse, target_warehouse=target, + cost_center="_Test Cost Center - TCP1", ) self.assertFalse(frappe.db.exists("GL Entry", {"voucher_no": dn.name, "voucher_type": dn.doctype})) diff --git a/erpnext/stock/doctype/pick_list/pick_list.py b/erpnext/stock/doctype/pick_list/pick_list.py index 998f15945d3..31bff657fd1 100644 --- a/erpnext/stock/doctype/pick_list/pick_list.py +++ b/erpnext/stock/doctype/pick_list/pick_list.py @@ -1195,6 +1195,7 @@ def create_delivery_note(source_name, target_doc=None): def create_dn_wo_so(pick_list): delivery_note = frappe.new_doc("Delivery Note") + delivery_note.company = pick_list.company item_table_mapper_without_so = { "doctype": "Delivery Note Item", diff --git a/erpnext/stock/doctype/serial_no/test_serial_no.py b/erpnext/stock/doctype/serial_no/test_serial_no.py index 79291af3a10..334333f366d 100644 --- a/erpnext/stock/doctype/serial_no/test_serial_no.py +++ b/erpnext/stock/doctype/serial_no/test_serial_no.py @@ -119,6 +119,7 @@ class TestSerialNo(FrappeTestCase): serial_no=[serial_nos[0]], company="_Test Company 1", warehouse=wh, + cost_center="_Test Company 1 - _TC1", ) sn_doc.reload() @@ -154,6 +155,7 @@ class TestSerialNo(FrappeTestCase): serial_no=[serial_nos[0]], company="_Test Company 1", warehouse=wh, + cost_center="_Test Company 1 - _TC1", ) # Delivery from second company @@ -163,6 +165,7 @@ class TestSerialNo(FrappeTestCase): serial_no=[serial_nos[0]], company="_Test Company 1", warehouse=wh, + cost_center="_Test Company 1 - _TC1", ) sn_doc.reload() diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index 65db490e7b5..7ad9498c88f 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -209,6 +209,7 @@ class StockEntry(StockController): self.validate_bom() self.set_process_loss_qty() self.validate_purchase_order() + self.validate_company_in_accounting_dimension() if self.purpose in ("Manufacture", "Repack"): self.mark_finished_and_scrap_items() From 23c4252b9beefbd2cf904d80a647b2eec8aaa8c7 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 6 Mar 2025 18:12:31 +0530 Subject: [PATCH 1318/1614] fix: change fieldname for cash_flow to export (backport #46353) (#46366) fix: change fieldname for cash_flow to export (#46353) fix: change fieldname for cash_flow Co-authored-by: Sanket322 (cherry picked from commit 606dcb0ad19bb0a2d0078b53afaec28f617f615c) Co-authored-by: Sanket Shah <113279972+Sanket322@users.noreply.github.com> --- erpnext/accounts/report/financial_statements.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/report/financial_statements.py b/erpnext/accounts/report/financial_statements.py index 2ff6f589509..faa65fb425e 100644 --- a/erpnext/accounts/report/financial_statements.py +++ b/erpnext/accounts/report/financial_statements.py @@ -630,7 +630,7 @@ def get_cost_centers_with_children(cost_centers): def get_columns(periodicity, period_list, accumulated_values=1, company=None, cash_flow=False): columns = [ { - "fieldname": "account", + "fieldname": "account" if not cash_flow else "section", "label": _("Account") if not cash_flow else _("Section"), "fieldtype": "Link", "options": "Account", From 60364f6dc9e17a7adadd70501e57cce2fd49361f Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 6 Mar 2025 18:14:09 +0530 Subject: [PATCH 1319/1614] chore: conflicts --- erpnext/crm/doctype/prospect/prospect.json | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/erpnext/crm/doctype/prospect/prospect.json b/erpnext/crm/doctype/prospect/prospect.json index d9fce557a15..5ff8284e66c 100644 --- a/erpnext/crm/doctype/prospect/prospect.json +++ b/erpnext/crm/doctype/prospect/prospect.json @@ -220,11 +220,7 @@ "grid_page_length": 50, "index_web_pages_for_search": 1, "links": [], -<<<<<<< HEAD - "modified": "2022-10-13 12:29:33.674561", -======= "modified": "2025-03-06 11:31:49.083983", ->>>>>>> 884709deb8 (fix: Allow rename prospect doctype (#46352)) "modified_by": "Administrator", "module": "CRM", "name": "Prospect", @@ -264,14 +260,10 @@ "share": 1 } ], -<<<<<<< HEAD "sort_field": "modified", -======= - "row_format": "Dynamic", "sort_field": "creation", ->>>>>>> 884709deb8 (fix: Allow rename prospect doctype (#46352)) "sort_order": "DESC", "states": [], "title_field": "company_name", "track_changes": 1 -} \ No newline at end of file +} From 6419d020a1289ab08142ff94bfc94e83cfce7548 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Thu, 6 Mar 2025 20:58:08 +0530 Subject: [PATCH 1320/1614] fix: rare precision issue preventing submission of subcontracting order (cherry picked from commit 33b71544db2302359111a7867f0c5cdce4d1e715) --- .../doctype/subcontracting_order/subcontracting_order.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order.py b/erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order.py index d171883c408..e8bee897840 100644 --- a/erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order.py +++ b/erpnext/subcontracting/doctype/subcontracting_order/subcontracting_order.py @@ -257,7 +257,9 @@ class SubcontractingOrder(SubcontractingController): si.qty = available_qty conversion_factor = po_item.qty / po_item.fg_item_qty - si.fg_item_qty = available_qty / conversion_factor + si.fg_item_qty = flt( + available_qty / conversion_factor, frappe.get_precision("Purchase Order Item", "qty") + ) si.amount = available_qty * si.rate bom = ( From 4e688778dc3bedb69f662cebc2478ada50ca6c23 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 7 Mar 2025 10:28:52 +0530 Subject: [PATCH 1321/1614] chore: linter issue --- erpnext/crm/doctype/prospect/prospect.json | 1 - 1 file changed, 1 deletion(-) diff --git a/erpnext/crm/doctype/prospect/prospect.json b/erpnext/crm/doctype/prospect/prospect.json index 5ff8284e66c..af54ca3a185 100644 --- a/erpnext/crm/doctype/prospect/prospect.json +++ b/erpnext/crm/doctype/prospect/prospect.json @@ -260,7 +260,6 @@ "share": 1 } ], - "sort_field": "modified", "sort_field": "creation", "sort_order": "DESC", "states": [], From 568b582b6a38edcd7b25773d8b1cb2d000fa4632 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Fri, 21 Feb 2025 15:40:35 +0530 Subject: [PATCH 1322/1614] refactor: use highest precision for storing exc rate (cherry picked from commit b115bf2e2a6a510f761f0a73124bfa915cdfca46) --- erpnext/accounts/doctype/gl_entry/gl_entry.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/gl_entry/gl_entry.json b/erpnext/accounts/doctype/gl_entry/gl_entry.json index c285a33f73e..b438dbbe4ec 100644 --- a/erpnext/accounts/doctype/gl_entry/gl_entry.json +++ b/erpnext/accounts/doctype/gl_entry/gl_entry.json @@ -279,7 +279,8 @@ { "fieldname": "transaction_exchange_rate", "fieldtype": "Float", - "label": "Transaction Exchange Rate" + "label": "Transaction Exchange Rate", + "precision": "9" }, { "fieldname": "debit_in_transaction_currency", @@ -357,7 +358,7 @@ "idx": 1, "in_create": 1, "links": [], - "modified": "2024-08-22 13:03:39.997475", + "modified": "2025-02-21 14:36:49.431166", "modified_by": "Administrator", "module": "Accounts", "name": "GL Entry", From 5761cfb3d55b3cf9e93fd13cb627c716a0882502 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Fri, 21 Feb 2025 15:42:01 +0530 Subject: [PATCH 1323/1614] refactor: set tr currency dr & cr directly on parent document (cherry picked from commit e9af5670334ca8fa45cf42414989abca09cdb45a) --- .../purchase_invoice/purchase_invoice.py | 25 +++++++++++++++---- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index 3ab214751f7..87112ea7c92 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -871,8 +871,14 @@ class PurchaseInvoice(BuyingController): self.make_payment_gl_entries(gl_entries) self.make_write_off_gl_entry(gl_entries) self.make_gle_for_rounding_adjustment(gl_entries) + self.set_transaction_currency_rate(gl_entries) return gl_entries + def set_transaction_currency_rate(self, gl_entries): + for x in gl_entries: + x["transaction_currency"] = self.currency + x["transaction_exchange_rate"] = self.get("conversion_rate") or 1 + def check_asset_cwip_enabled(self): # Check if there exists any item with cwip accounting enabled in it's asset category for item in self.get("items"): @@ -916,6 +922,7 @@ class PurchaseInvoice(BuyingController): "credit_in_account_currency": base_grand_total if self.party_account_currency == self.company_currency else grand_total, + "credit_in_transaction_currency": grand_total, "against_voucher": against_voucher, "against_voucher_type": self.doctype, "project": self.project, @@ -1054,7 +1061,9 @@ class PurchaseInvoice(BuyingController): # Amount added through landed-cost-voucher if landed_cost_entries: if (item.item_code, item.name) in landed_cost_entries: - for account, amount in landed_cost_entries[(item.item_code, item.name)].items(): + for account, base_amount in landed_cost_entries[ + (item.item_code, item.name) + ].items(): gl_entries.append( self.get_gl_dict( { @@ -1062,8 +1071,8 @@ class PurchaseInvoice(BuyingController): "against": item.expense_account, "cost_center": item.cost_center, "remarks": self.get("remarks") or _("Accounting Entry for Stock"), - "credit": flt(amount["base_amount"]), - "credit_in_account_currency": flt(amount["amount"]), + "credit": flt(base_amount["base_amount"]), + "credit_in_account_currency": flt(base_amount["amount"]), "project": item.project or self.project, }, item=item, @@ -1099,7 +1108,7 @@ class PurchaseInvoice(BuyingController): else item.deferred_expense_account ) - dummy, amount = self.get_amount_and_base_amount(item, None) + amount, base_amount = self.get_amount_and_base_amount(item, None) if provisional_accounting_for_non_stock_items: self.make_provisional_gl_entry(gl_entries, item) @@ -1110,7 +1119,8 @@ class PurchaseInvoice(BuyingController): { "account": expense_account, "against": self.supplier, - "debit": amount, + "debit": base_amount, + "debit_in_transaction_currency": amount, "cost_center": item.cost_center, "project": item.project or self.project, }, @@ -1332,6 +1342,7 @@ class PurchaseInvoice(BuyingController): dr_or_cr + "_in_account_currency": base_amount if account_currency == self.company_currency else amount, + dr_or_cr + "_in_transaction_currency": amount, "cost_center": tax.cost_center, }, account_currency, @@ -1460,6 +1471,7 @@ class PurchaseInvoice(BuyingController): "debit_in_account_currency": self.base_paid_amount if self.party_account_currency == self.company_currency else self.paid_amount, + "debit_in_transaction_currency": self.paid_amount, "against_voucher": self.return_against if cint(self.is_return) and self.return_against else self.name, @@ -1481,6 +1493,7 @@ class PurchaseInvoice(BuyingController): "credit_in_account_currency": self.base_paid_amount if bank_account_currency == self.company_currency else self.paid_amount, + "credit_in_transaction_currency": self.paid_amount, "cost_center": self.cost_center, }, bank_account_currency, @@ -1505,6 +1518,7 @@ class PurchaseInvoice(BuyingController): "debit_in_account_currency": self.base_write_off_amount if self.party_account_currency == self.company_currency else self.write_off_amount, + "debit_in_transaction_currency": self.write_off_amount, "against_voucher": self.return_against if cint(self.is_return) and self.return_against else self.name, @@ -1525,6 +1539,7 @@ class PurchaseInvoice(BuyingController): "credit_in_account_currency": self.base_write_off_amount if write_off_account_currency == self.company_currency else self.write_off_amount, + "credit_in_transaction_currency": self.write_off_amount, "cost_center": self.cost_center or self.write_off_cost_center, }, item=self, From eb0df50f1bdcd1aba41ef2eae7d4dcfc4b470958 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 24 Feb 2025 21:58:59 +0530 Subject: [PATCH 1324/1614] refactor: handle stocked items (cherry picked from commit 7ff3977394c8f2935601a3a753778bd6dd5a5592) --- erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index 87112ea7c92..b1d6ec15e3c 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -1049,6 +1049,7 @@ class PurchaseInvoice(BuyingController): "account": item.expense_account, "against": self.supplier, "debit": warehouse_debit_amount, + "debit_in_transaction_currency": item.net_amount, "remarks": self.get("remarks") or _("Accounting Entry for Stock"), "cost_center": item.cost_center, "project": item.project or self.project, From 133dca1824dec338e7b796d41ca4da59c7a13ec9 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 25 Feb 2025 14:10:00 +0530 Subject: [PATCH 1325/1614] refactor: handle stocked items (cherry picked from commit ee93ed8c970deff88ef54fdcda2c5607959d29d8) --- .../accounts/doctype/purchase_invoice/purchase_invoice.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index b1d6ec15e3c..a50f7df0c09 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -998,6 +998,7 @@ class PurchaseInvoice(BuyingController): "project": item.project or self.project, "remarks": self.get("remarks") or _("Accounting Entry for Stock"), "debit": warehouse_debit_amount, + "debit_in_transaction_currency": item.net_amount, }, warehouse_account[item.warehouse]["account_currency"], item=item, @@ -1018,6 +1019,7 @@ class PurchaseInvoice(BuyingController): "project": item.project or self.project, "remarks": self.get("remarks") or _("Accounting Entry for Stock"), "debit": -1 * flt(credit_amount, item.precision("base_net_amount")), + "debit_in_transaction_currency": item.net_amount, }, warehouse_account[item.from_warehouse]["account_currency"], item=item, @@ -1032,6 +1034,7 @@ class PurchaseInvoice(BuyingController): "account": item.expense_account, "against": self.supplier, "debit": flt(item.base_net_amount, item.precision("base_net_amount")), + "debit_in_transaction_currency": item.net_amount, "remarks": self.get("remarks") or _("Accounting Entry for Stock"), "cost_center": item.cost_center, "project": item.project, @@ -1074,6 +1077,7 @@ class PurchaseInvoice(BuyingController): "remarks": self.get("remarks") or _("Accounting Entry for Stock"), "credit": flt(base_amount["base_amount"]), "credit_in_account_currency": flt(base_amount["amount"]), + "credit_in_transaction_currency": item.net_amount, "project": item.project or self.project, }, item=item, @@ -1096,6 +1100,7 @@ class PurchaseInvoice(BuyingController): "project": item.project or self.project, "remarks": self.get("remarks") or _("Accounting Entry for Stock"), "credit": flt(item.rm_supp_cost), + "credit_in_transaction_currency": item.net_amount, }, warehouse_account[self.supplier_warehouse]["account_currency"], item=item, @@ -1195,6 +1200,7 @@ class PurchaseInvoice(BuyingController): "account": stock_rbnb, "against": self.supplier, "debit": flt(item.item_tax_amount, item.precision("item_tax_amount")), + "debit_in_transaction_currency": item.net_amount, "remarks": self.remarks or _("Accounting Entry for Stock"), "cost_center": self.cost_center, "project": item.project or self.project, @@ -1310,6 +1316,7 @@ class PurchaseInvoice(BuyingController): "account": cost_of_goods_sold_account, "against": item.expense_account, "debit": stock_adjustment_amt, + "debit_in_transaction_currency": item.net_amount, "remarks": self.get("remarks") or _("Stock Adjustment"), "cost_center": item.cost_center, "project": item.project or self.project, From e0b5386bf0800393f4c49c741600257f000c91f3 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Fri, 28 Feb 2025 17:26:19 +0530 Subject: [PATCH 1326/1614] refactor: set transaction currency dr/cr in sales invoice (cherry picked from commit 3e292ef2cbed31afed297e005e04f021944542fd) # Conflicts: # erpnext/accounts/doctype/sales_invoice/sales_invoice.py --- .../doctype/sales_invoice/sales_invoice.py | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 9fcb1ae526c..cd556d77274 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -1274,6 +1274,7 @@ class SalesInvoice(SellingController): "debit_in_account_currency": base_grand_total if self.party_account_currency == self.company_currency else grand_total, + "debit_in_transaction_currency": grand_total, "against_voucher": against_voucher, "against_voucher_type": self.doctype, "cost_center": self.cost_center, @@ -1305,6 +1306,9 @@ class SalesInvoice(SellingController): if account_currency == self.company_currency else flt(amount, tax.precision("tax_amount_after_discount_amount")) ), + "credit_in_transaction_currency": flt( + amount, tax.precision("tax_amount_after_discount_amount") + ), "cost_center": tax.cost_center, }, account_currency, @@ -1322,6 +1326,7 @@ class SalesInvoice(SellingController): "against": self.customer, "debit": flt(self.total_taxes_and_charges), "debit_in_account_currency": flt(self.base_total_taxes_and_charges), + "debit_in_transaction_currency": flt(self.total_taxes_and_charges), "cost_center": self.cost_center, }, account_currency, @@ -1420,6 +1425,7 @@ class SalesInvoice(SellingController): if account_currency == self.company_currency else flt(amount, item.precision("net_amount")) ), + "credit_in_transaction_currency": flt(amount, item.precision("net_amount")), "cost_center": item.cost_center, "project": item.project or self.project, }, @@ -1471,6 +1477,7 @@ class SalesInvoice(SellingController): + cstr(self.loyalty_redemption_account) + " for the Loyalty Program", "credit": self.loyalty_amount, + "credit_in_transaction_currency": self.loyalty_amount, "against_voucher": self.return_against if cint(self.is_return) else self.name, "against_voucher_type": self.doctype, "cost_center": self.cost_center, @@ -1485,6 +1492,7 @@ class SalesInvoice(SellingController): "cost_center": self.cost_center or self.loyalty_redemption_cost_center, "against": self.customer, "debit": self.loyalty_amount, + "debit_in_transaction_currency": self.loyalty_amount, "remark": "Loyalty Points redeemed by the customer", }, item=self, @@ -1518,6 +1526,7 @@ class SalesInvoice(SellingController): "credit_in_account_currency": payment_mode.base_amount if self.party_account_currency == self.company_currency else payment_mode.amount, + "credit_in_transaction_currency": payment_mode.amount, "against_voucher": against_voucher, "against_voucher_type": self.doctype, "cost_center": self.cost_center, @@ -1537,6 +1546,7 @@ class SalesInvoice(SellingController): "debit_in_account_currency": payment_mode.base_amount if payment_mode_account_currency == self.company_currency else payment_mode.amount, + "debit_in_transaction_currency": payment_mode.amount, "cost_center": self.cost_center, }, payment_mode_account_currency, @@ -1573,6 +1583,7 @@ class SalesInvoice(SellingController): ) ) +<<<<<<< HEAD gl_entries.append( self.get_gl_dict( { @@ -1586,6 +1597,44 @@ class SalesInvoice(SellingController): ) else: frappe.throw(_("Select change amount account"), title=_("Mandatory Field")) +======= + if not self.account_for_change_amount: + frappe.throw(_("Please set Account for Change Amount"), title=_("Mandatory Field")) + + return [ + self.get_gl_dict( + { + "account": self.debit_to, + "party_type": "Customer", + "party": self.customer, + "against": self.account_for_change_amount, + "debit": flt(self.base_change_amount), + "debit_in_account_currency": flt(self.base_change_amount) + if self.party_account_currency == self.company_currency + else flt(self.change_amount), + "debit_in_transaction_currency": flt(self.change_amount), + "against_voucher": self.return_against + if cint(self.is_return) and self.return_against + else self.name, + "against_voucher_type": self.doctype, + "cost_center": self.cost_center, + "project": self.project, + }, + self.party_account_currency, + item=self, + ), + self.get_gl_dict( + { + "account": self.account_for_change_amount, + "against": self.customer, + "credit": self.base_change_amount, + "credit_in_transaction_currency": self.change_amount, + "cost_center": self.cost_center, + }, + item=self, + ), + ] +>>>>>>> 3e292ef2cb (refactor: set transaction currency dr/cr in sales invoice) def make_write_off_gl_entry(self, gl_entries): # write off entries, applicable if only pos @@ -1610,6 +1659,9 @@ class SalesInvoice(SellingController): if self.party_account_currency == self.company_currency else flt(self.write_off_amount, self.precision("write_off_amount")) ), + "credit_in_transaction_currency": flt( + self.write_off_amount, self.precision("write_off_amount") + ), "against_voucher": self.return_against if cint(self.is_return) else self.name, "against_voucher_type": self.doctype, "cost_center": self.cost_center, @@ -1630,6 +1682,9 @@ class SalesInvoice(SellingController): if write_off_account_currency == self.company_currency else flt(self.write_off_amount, self.precision("write_off_amount")) ), + "debit_in_transaction_currency": flt( + self.write_off_amount, self.precision("write_off_amount") + ), "cost_center": self.cost_center or self.write_off_cost_center or default_cost_center, }, write_off_account_currency, @@ -1674,6 +1729,9 @@ class SalesInvoice(SellingController): "credit_in_account_currency": flt( self.rounding_adjustment, self.precision("rounding_adjustment") ), + "credit_in_transaction_currency": flt( + self.rounding_adjustment, self.precision("rounding_adjustment") + ), "credit": flt( self.base_rounding_adjustment, self.precision("base_rounding_adjustment") ), From d7baa451e339c89f391448b679ba10f4d2edc318 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Fri, 28 Feb 2025 17:30:25 +0530 Subject: [PATCH 1327/1614] refactor: move utility method to controller (cherry picked from commit d1d06885dc647d0ca964850019d32d3091d1de46) --- .../accounts/doctype/purchase_invoice/purchase_invoice.py | 7 +------ erpnext/accounts/doctype/sales_invoice/sales_invoice.py | 1 + erpnext/controllers/accounts_controller.py | 5 +++++ 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index a50f7df0c09..5d12066757e 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -871,14 +871,9 @@ class PurchaseInvoice(BuyingController): self.make_payment_gl_entries(gl_entries) self.make_write_off_gl_entry(gl_entries) self.make_gle_for_rounding_adjustment(gl_entries) - self.set_transaction_currency_rate(gl_entries) + self.set_transaction_currency_and_rate_in_gl_map(gl_entries) return gl_entries - def set_transaction_currency_rate(self, gl_entries): - for x in gl_entries: - x["transaction_currency"] = self.currency - x["transaction_exchange_rate"] = self.get("conversion_rate") or 1 - def check_asset_cwip_enabled(self): # Check if there exists any item with cwip accounting enabled in it's asset category for item in self.get("items"): diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index cd556d77274..6f1b3a69605 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -1241,6 +1241,7 @@ class SalesInvoice(SellingController): self.make_write_off_gl_entry(gl_entries) self.make_gle_for_rounding_adjustment(gl_entries) + self.set_transaction_currency_and_rate_in_gl_map(gl_entries) return gl_entries def make_customer_gl_entry(self, gl_entries): diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index d67322eae8d..bc02484a37a 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -2758,6 +2758,11 @@ class AccountsController(TransactionBase): elif self.doctype == "Payment Entry": self.make_advance_payment_ledger_for_payment() + def set_transaction_currency_and_rate_in_gl_map(self, gl_entries): + for x in gl_entries: + x["transaction_currency"] = self.currency + x["transaction_exchange_rate"] = self.get("conversion_rate") or 1 + @frappe.whitelist() def get_tax_rate(account_head): From 00cbc89b5f9e44b9419c6ec929e206d3d4d5a845 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 3 Mar 2025 12:22:35 +0530 Subject: [PATCH 1328/1614] refactor: handle Journal entries (cherry picked from commit 9f3847c0f8b985eb21d29bb4687c1762f467e2ba) --- .../doctype/journal_entry/journal_entry.py | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.py b/erpnext/accounts/doctype/journal_entry/journal_entry.py index 4eb74cb2b6f..c82b224d83c 100644 --- a/erpnext/accounts/doctype/journal_entry/journal_entry.py +++ b/erpnext/accounts/doctype/journal_entry/journal_entry.py @@ -1060,14 +1060,15 @@ class JournalEntry(AccountsController): gl_map = [] company_currency = erpnext.get_company_currency(self.company) + self.transaction_currency = company_currency + self.transaction_exchange_rate = 1 if self.multi_currency: for row in self.get("accounts"): if row.account_currency != company_currency: - self.currency = row.account_currency - self.conversion_rate = row.exchange_rate + # Journal assumes the first foregin currency as transaction currency + self.transaction_currency = row.account_currency + self.transaction_exchange_rate = row.exchange_rate break - else: - self.currency = company_currency for d in self.get("accounts"): if d.debit or d.credit or (self.voucher_type == "Exchange Gain Or Loss"): @@ -1092,6 +1093,18 @@ class JournalEntry(AccountsController): "credit_in_account_currency": flt( d.credit_in_account_currency, d.precision("credit_in_account_currency") ), + "transaction_currency": self.transaction_currency, + "transaction_exchange_rate": self.transaction_exchange_rate, + "debit_in_transaction_currency": flt( + d.debit_in_account_currency, d.precision("debit_in_account_currency") + ) + if self.transaction_currency == d.account_currency + else flt(d.debit, d.precision("debit")) / self.transaction_exchange_rate, + "credit_in_transaction_currency": flt( + d.credit_in_account_currency, d.precision("credit_in_account_currency") + ) + if self.transaction_currency == d.account_currency + else flt(d.credit, d.precision("credit")) / self.transaction_exchange_rate, "against_voucher_type": d.reference_type, "against_voucher": d.reference_name, "remarks": remarks, From 66dc79ceb52b02de075d1e705d20253b8cc387e8 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 4 Mar 2025 14:19:38 +0530 Subject: [PATCH 1329/1614] refactor: handle payment entry (cherry picked from commit 5c86e3ce859d9f8baa93bc709fd75abab7849700) --- .../doctype/payment_entry/payment_entry.py | 42 +++++++++++++++++-- 1 file changed, 38 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index 45462398e1c..588be1df4bf 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -1222,10 +1222,15 @@ class PaymentEntry(AccountsController): self.setup_party_account_field() company_currency = erpnext.get_company_currency(self.company) + self.transaction_currency = company_currency + self.transaction_exchange_rate = 1 + if self.paid_from_account_currency != company_currency: - self.currency = self.paid_from_account_currency + self.transaction_currency = self.paid_from_account_currency + self.transaction_exchange_rate = self.source_exchange_rate elif self.paid_to_account_currency != company_currency: - self.currency = self.paid_to_account_currency + self.transaction_currency = self.paid_to_account_currency + self.transaction_exchange_rate = self.target_exchange_rate gl_entries = [] self.add_party_gl_entries(gl_entries) @@ -1304,6 +1309,9 @@ class PaymentEntry(AccountsController): "cost_center": cost_center, dr_or_cr + "_in_account_currency": d.allocated_amount, dr_or_cr: allocated_amount_in_company_currency, + dr_or_cr + "_in_transaction_currency": d.allocated_amount + if self.transaction_currency == self.party_account_currency + else allocated_amount_in_company_currency / self.transaction_exchange_rate, }, item=self, ) @@ -1348,6 +1356,9 @@ class PaymentEntry(AccountsController): "account_currency": self.party_account_currency, "cost_center": self.cost_center, dr_or_cr + "_in_account_currency": self.unallocated_amount, + dr_or_cr + "_in_transaction_currency": self.unallocated_amount + if self.party_account_currency == self.transaction_currency + else base_unallocated_amount / self.transaction_exchange_rate, dr_or_cr: base_unallocated_amount, }, item=self, @@ -1444,9 +1455,16 @@ class PaymentEntry(AccountsController): frappe.db.set_value("Payment Entry Reference", invoice.name, "reconcile_effect_on", posting_date) dr_or_cr, account = self.get_dr_and_account_for_advances(invoice) + base_allocated_amount = self.calculate_base_allocated_amount_for_reference(invoice) args_dict["account"] = account - args_dict[dr_or_cr] = self.calculate_base_allocated_amount_for_reference(invoice) + args_dict[dr_or_cr] = base_allocated_amount args_dict[dr_or_cr + "_in_account_currency"] = invoice.allocated_amount + args_dict[dr_or_cr + "_in_transaction_currency"] = ( + invoice.allocated_amount + if self.party_account_currency == self.transaction_currency + else base_allocated_amount / self.transaction_exchange_rate + ) + args_dict.update( { "against_voucher_type": invoice.reference_doctype, @@ -1464,8 +1482,13 @@ class PaymentEntry(AccountsController): args_dict[dr_or_cr + "_in_account_currency"] = 0 dr_or_cr = "debit" if dr_or_cr == "credit" else "credit" args_dict["account"] = self.party_account - args_dict[dr_or_cr] = self.calculate_base_allocated_amount_for_reference(invoice) + args_dict[dr_or_cr] = base_allocated_amount args_dict[dr_or_cr + "_in_account_currency"] = invoice.allocated_amount + args_dict[dr_or_cr + "_in_transaction_currency"] = ( + invoice.allocated_amount + if self.party_account_currency == self.transaction_currency + else base_allocated_amount / self.transaction_exchange_rate + ) args_dict.update( { "against_voucher_type": "Payment Entry", @@ -1487,6 +1510,9 @@ class PaymentEntry(AccountsController): "account_currency": self.paid_from_account_currency, "against": self.party if self.payment_type == "Pay" else self.paid_to, "credit_in_account_currency": self.paid_amount, + "credit_in_transaction_currency": self.paid_amount + if self.paid_from_account_currency == self.transaction_currency + else self.base_paid_amount / self.transaction_exchange_rate, "credit": self.base_paid_amount, "cost_center": self.cost_center, "post_net_value": True, @@ -1502,6 +1528,9 @@ class PaymentEntry(AccountsController): "account_currency": self.paid_to_account_currency, "against": self.party if self.payment_type == "Receive" else self.paid_from, "debit_in_account_currency": self.received_amount, + "debit_in_transaction_currency": self.received_amount + if self.paid_to_account_currency == self.transaction_currency + else self.base_received_amount / self.transaction_exchange_rate, "debit": self.base_received_amount, "cost_center": self.cost_center, }, @@ -1537,6 +1566,8 @@ class PaymentEntry(AccountsController): dr_or_cr + "_in_account_currency": base_tax_amount if account_currency == self.company_currency else d.tax_amount, + dr_or_cr + "_in_transaction_currency": base_tax_amount + / self.transaction_exchange_rate, "cost_center": d.cost_center, "post_net_value": True, }, @@ -1562,6 +1593,8 @@ class PaymentEntry(AccountsController): rev_dr_or_cr + "_in_account_currency": base_tax_amount if account_currency == self.company_currency else d.tax_amount, + rev_dr_or_cr + "_in_transaction_currency": base_tax_amount + / self.transaction_exchange_rate, "cost_center": self.cost_center, "post_net_value": True, }, @@ -1584,6 +1617,7 @@ class PaymentEntry(AccountsController): "account_currency": account_currency, "against": self.party or self.paid_from, "debit_in_account_currency": d.amount, + "debit_in_transaction_currency": d.amount / self.transaction_exchange_rate, "debit": d.amount, "cost_center": d.cost_center, }, From 1d56931050d86c041a1353c64ff40251d6ff0bf9 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 6 Mar 2025 11:35:18 +0530 Subject: [PATCH 1330/1614] refactor: set transaction currency and rate before gl map (cherry picked from commit ceca5b4c72e60bf923bf8c85c7d7be0a15e6f9fc) --- .../accounts/doctype/payment_entry/payment_entry.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index 588be1df4bf..5c9f855ea5b 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -1217,10 +1217,7 @@ class PaymentEntry(AccountsController): self.set("remarks", "\n".join(remarks)) - def build_gl_map(self): - if self.payment_type in ("Receive", "Pay") and not self.get("party_account_field"): - self.setup_party_account_field() - + def set_transaction_currency_and_rate(self): company_currency = erpnext.get_company_currency(self.company) self.transaction_currency = company_currency self.transaction_exchange_rate = 1 @@ -1232,6 +1229,11 @@ class PaymentEntry(AccountsController): self.transaction_currency = self.paid_to_account_currency self.transaction_exchange_rate = self.target_exchange_rate + def build_gl_map(self): + if self.payment_type in ("Receive", "Pay") and not self.get("party_account_field"): + self.setup_party_account_field() + self.set_transaction_currency_and_rate() + gl_entries = [] self.add_party_gl_entries(gl_entries) self.add_bank_gl_entries(gl_entries) @@ -1376,6 +1378,7 @@ class PaymentEntry(AccountsController): def make_advance_gl_entries( self, entry: object | dict = None, cancel: bool = 0, update_outstanding: str = "Yes" ): + self.set_transaction_currency_and_rate() gl_entries = [] self.add_advance_gl_entries(gl_entries, entry) From b76c96820ec5ca31405e77a8d3cdc15d050bbf95 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 6 Mar 2025 14:38:18 +0530 Subject: [PATCH 1331/1614] fix(test): incorrect transaction exchange rate in test case (cherry picked from commit a31770d12282771969feba8c54f2e79a2290e590) --- erpnext/accounts/doctype/journal_entry/test_journal_entry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/journal_entry/test_journal_entry.py b/erpnext/accounts/doctype/journal_entry/test_journal_entry.py index e95a8eaef29..4d2d14abea4 100644 --- a/erpnext/accounts/doctype/journal_entry/test_journal_entry.py +++ b/erpnext/accounts/doctype/journal_entry/test_journal_entry.py @@ -575,7 +575,7 @@ class TestJournalEntry(unittest.TestCase): order_by="account", ) expected = [ - {"account": "_Test Bank - _TC", "transaction_exchange_rate": 1.0}, + {"account": "_Test Bank - _TC", "transaction_exchange_rate": 85.0}, {"account": "_Test Receivable USD - _TC", "transaction_exchange_rate": 85.0}, ] self.assertEqual(expected, actual) From 5c013172f9c558a9853173dd0f7505defc7f14f9 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 6 Mar 2025 14:54:20 +0530 Subject: [PATCH 1332/1614] refactor(test): save first to let the tax table populate (cherry picked from commit 23d465805b8812e7f76ef5031f08fe9a49243b36) --- .../tax_withholding_category/test_tax_withholding_category.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py b/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py index 6ab6bcc08a2..ae0a098137a 100644 --- a/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py +++ b/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py @@ -519,7 +519,7 @@ class TestTaxWithholdingCategory(FrappeTestCase): payment = get_payment_entry(order.doctype, order.name) payment.apply_tax_withholding_amount = 1 payment.tax_withholding_category = "Cumulative Threshold TDS" - payment.submit() + payment.save().submit() self.assertEqual(payment.taxes[0].tax_amount, 4000) def test_multi_category_single_supplier(self): From 07f938cc10e54380fc0b52afb895fe3d6cdfa409 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 6 Mar 2025 15:54:14 +0530 Subject: [PATCH 1333/1614] refactor: isolate to specific doctypes (cherry picked from commit b348aa3b3716838b1f00f5a8266c8d9b6904a660) --- erpnext/controllers/accounts_controller.py | 27 +++++++++++----------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index bc02484a37a..df7452c0a01 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -1119,20 +1119,19 @@ class AccountsController(TransactionBase): ) # Update details in transaction currency - gl_dict.update( - { - "transaction_currency": self.get("currency") or self.company_currency, - "transaction_exchange_rate": item.get("exchange_rate", 1) - if self.doctype == "Journal Entry" and item - else self.get("conversion_rate", 1), - "debit_in_transaction_currency": self.get_value_in_transaction_currency( - account_currency, gl_dict, "debit" - ), - "credit_in_transaction_currency": self.get_value_in_transaction_currency( - account_currency, gl_dict, "credit" - ), - } - ) + if self.doctype not in ["Purchase Invoice", "Sales Invoice", "Journal Entry", "Payment Entry"]: + gl_dict.update( + { + "transaction_currency": self.get("currency") or self.company_currency, + "transaction_exchange_rate": self.get("conversion_rate", 1), + "debit_in_transaction_currency": self.get_value_in_transaction_currency( + account_currency, gl_dict, "debit" + ), + "credit_in_transaction_currency": self.get_value_in_transaction_currency( + account_currency, gl_dict, "credit" + ), + } + ) if not args.get("against_voucher_type") and self.get("against_voucher_type"): gl_dict.update({"against_voucher_type": self.get("against_voucher_type")}) From 38a3a43ba50d8c325a93188ad85a1fe15c22a6e3 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Fri, 7 Mar 2025 11:40:14 +0530 Subject: [PATCH 1334/1614] chore: typo (cherry picked from commit bc792c61e9dc07c9ebef4534e9e1e7904adb592f) --- erpnext/accounts/doctype/journal_entry/journal_entry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.py b/erpnext/accounts/doctype/journal_entry/journal_entry.py index c82b224d83c..9e1eaf25442 100644 --- a/erpnext/accounts/doctype/journal_entry/journal_entry.py +++ b/erpnext/accounts/doctype/journal_entry/journal_entry.py @@ -1065,7 +1065,7 @@ class JournalEntry(AccountsController): if self.multi_currency: for row in self.get("accounts"): if row.account_currency != company_currency: - # Journal assumes the first foregin currency as transaction currency + # Journal assumes the first foreign currency as transaction currency self.transaction_currency = row.account_currency self.transaction_exchange_rate = row.exchange_rate break From 002685fc892eca2a2a3fd49c7bf277dd9b7f84b0 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Fri, 7 Mar 2025 13:22:08 +0530 Subject: [PATCH 1335/1614] fix: incorrect category in list (cherry picked from commit 6545467aecac894701b2e62719083d3db195a241) --- erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index 5d12066757e..c514f379406 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -953,7 +953,7 @@ class PurchaseInvoice(BuyingController): valuation_tax_accounts = [ d.account_head for d in self.get("taxes") - if d.category in ("Valuation", "Total and Valuation") + if d.category in ("Valuation", "Valuation and Total") and flt(d.base_tax_amount_after_discount_amount) ] From 2c73e31742bf6f2477996759355c4764a54fb71e Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Fri, 7 Mar 2025 13:22:20 +0530 Subject: [PATCH 1336/1614] refactor: convert tax amount using exchange rate (cherry picked from commit 7528ef147a0375dc863f2d4d0720f02dbcd71631) --- erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index c514f379406..9d19109217d 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -1195,7 +1195,8 @@ class PurchaseInvoice(BuyingController): "account": stock_rbnb, "against": self.supplier, "debit": flt(item.item_tax_amount, item.precision("item_tax_amount")), - "debit_in_transaction_currency": item.net_amount, + "debit_in_transaction_currency": item.item_tax_amount + / self.conversion_rate, "remarks": self.remarks or _("Accounting Entry for Stock"), "cost_center": self.cost_center, "project": item.project or self.project, From 57e0f73595e7716f57d644b4a180b76695d91492 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Fri, 7 Mar 2025 14:43:48 +0530 Subject: [PATCH 1337/1614] refactor: trx currency dr and cr for tax rows and item rows (cherry picked from commit 4cd3f3531c965c318c635ebe2600240c9f9782fd) --- .../purchase_invoice/purchase_invoice.py | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index 9d19109217d..146b2f5b210 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -1047,7 +1047,10 @@ class PurchaseInvoice(BuyingController): "account": item.expense_account, "against": self.supplier, "debit": warehouse_debit_amount, - "debit_in_transaction_currency": item.net_amount, + "debit_in_transaction_currency": flt( + warehouse_debit_amount / self.conversion_rate, + item.precision("net_amount"), + ), "remarks": self.get("remarks") or _("Accounting Entry for Stock"), "cost_center": item.cost_center, "project": item.project or self.project, @@ -1195,8 +1198,10 @@ class PurchaseInvoice(BuyingController): "account": stock_rbnb, "against": self.supplier, "debit": flt(item.item_tax_amount, item.precision("item_tax_amount")), - "debit_in_transaction_currency": item.item_tax_amount - / self.conversion_rate, + "debit_in_transaction_currency": flt( + item.item_tax_amount / self.conversion_rate, + item.precision("item_tax_amount"), + ), "remarks": self.remarks or _("Accounting Entry for Stock"), "cost_center": self.cost_center, "project": item.project or self.project, @@ -1393,6 +1398,10 @@ class PurchaseInvoice(BuyingController): "cost_center": tax.cost_center, "against": self.supplier, "credit": applicable_amount, + "credit_in_transaction_currency": flt( + applicable_amount / self.conversion_rate, + frappe.get_precision("Purchase Invoice Item", "item_tax_amount"), + ), "remarks": self.remarks or _("Accounting Entry for Stock"), }, item=tax, @@ -1411,6 +1420,10 @@ class PurchaseInvoice(BuyingController): "cost_center": tax.cost_center, "against": self.supplier, "credit": valuation_tax[tax.name], + "credit_in_transaction_currency": flt( + valuation_tax[tax.name] / self.conversion_rate, + frappe.get_precision("Purchase Invoice Item", "item_tax_amount"), + ), "remarks": self.remarks or _("Accounting Entry for Stock"), }, item=tax, From cd21e5c6522d8e5cfa736cc6e560fd3e37faafa4 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Fri, 7 Mar 2025 17:00:21 +0530 Subject: [PATCH 1338/1614] refactor: handle rounding diff for trx currency dr and cr (cherry picked from commit 455a55b2ce5dddfc534efae8efb4b58fb50b949e) --- erpnext/accounts/general_ledger.py | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/erpnext/accounts/general_ledger.py b/erpnext/accounts/general_ledger.py index 7d0bf2cca11..cb267972c70 100644 --- a/erpnext/accounts/general_ledger.py +++ b/erpnext/accounts/general_ledger.py @@ -430,7 +430,7 @@ def process_debit_credit_difference(gl_map): voucher_no = gl_map[0].voucher_no allowance = get_debit_credit_allowance(voucher_type, precision) - debit_credit_diff = get_debit_credit_difference(gl_map, precision) + debit_credit_diff, trx_cur_debit_credit_diff = get_debit_credit_difference(gl_map, precision) if abs(debit_credit_diff) > allowance: if not ( @@ -441,9 +441,9 @@ def process_debit_credit_difference(gl_map): raise_debit_credit_not_equal_error(debit_credit_diff, voucher_type, voucher_no) elif abs(debit_credit_diff) >= (1.0 / (10**precision)): - make_round_off_gle(gl_map, debit_credit_diff, precision) + make_round_off_gle(gl_map, debit_credit_diff, trx_cur_debit_credit_diff, precision) - debit_credit_diff = get_debit_credit_difference(gl_map, precision) + debit_credit_diff, trx_cur_debit_credit_diff = get_debit_credit_difference(gl_map, precision) if abs(debit_credit_diff) > allowance: if not ( voucher_type == "Journal Entry" @@ -455,14 +455,23 @@ def process_debit_credit_difference(gl_map): def get_debit_credit_difference(gl_map, precision): debit_credit_diff = 0.0 + trx_cur_debit_credit_diff = 0 + for entry in gl_map: entry.debit = flt(entry.debit, precision) entry.credit = flt(entry.credit, precision) debit_credit_diff += entry.debit - entry.credit - debit_credit_diff = flt(debit_credit_diff, precision) + entry.debit_in_transaction_currency = flt(entry.debit_in_transaction_currency, precision) + entry.credit_in_transaction_currency = flt(entry.credit_in_transaction_currency, precision) + trx_cur_debit_credit_diff += ( + entry.debit_in_transaction_currency - entry.credit_in_transaction_currency + ) - return debit_credit_diff + debit_credit_diff = flt(debit_credit_diff, precision) + trx_cur_debit_credit_diff = flt(trx_cur_debit_credit_diff, precision) + + return debit_credit_diff, trx_cur_debit_credit_diff def get_debit_credit_allowance(voucher_type, precision): @@ -489,7 +498,7 @@ def has_opening_entries(gl_map: list) -> bool: return False -def make_round_off_gle(gl_map, debit_credit_diff, precision): +def make_round_off_gle(gl_map, debit_credit_diff, trx_cur_debit_credit_diff, precision): round_off_account, round_off_cost_center, round_off_for_opening = get_round_off_account_and_cost_center( gl_map[0].company, gl_map[0].voucher_type, gl_map[0].voucher_no ) @@ -534,6 +543,12 @@ def make_round_off_gle(gl_map, debit_credit_diff, precision): "credit_in_account_currency": debit_credit_diff if debit_credit_diff > 0 else 0, "debit": abs(debit_credit_diff) if debit_credit_diff < 0 else 0, "credit": debit_credit_diff if debit_credit_diff > 0 else 0, + "debit_in_transaction_currency": abs(trx_cur_debit_credit_diff) + if trx_cur_debit_credit_diff < 0 + else 0, + "credit_in_transaction_currency": trx_cur_debit_credit_diff + if trx_cur_debit_credit_diff > 0 + else 0, "cost_center": round_off_cost_center, "party_type": None, "party": None, From f303245fae9169ee2d629c5e811a53fb9d60433f Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Fri, 7 Mar 2025 17:39:21 +0530 Subject: [PATCH 1339/1614] test: assert total debit and credit for trx currency (cherry picked from commit 55d06361232baa64551c90db25d5231f7dd32320) --- .../purchase_invoice/test_purchase_invoice.py | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py index e2386122522..192f9cc81d2 100644 --- a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py @@ -2639,6 +2639,36 @@ class TestPurchaseInvoice(FrappeTestCase, StockTestMixin): "Buying Settings", "bill_for_rejected_quantity_in_purchase_invoice", original_value ) + def test_trx_currency_debit_credit_for_high_precision(self): + exc_rate = 0.737517516 + pi = make_purchase_invoice( + currency="USD", conversion_rate=exc_rate, qty=1, rate=2000, do_not_save=True + ) + pi.supplier = "_Test Supplier USD" + pi.save().submit() + + expected = ( + ("_Test Account Cost for Goods Sold - _TC", 1475.04, 0.0, 2000.0, 0.0, "USD", exc_rate), + ("_Test Payable USD - _TC", 0.0, 1475.04, 0.0, 2000.0, "USD", exc_rate), + ) + + actual = frappe.db.get_all( + "GL Entry", + filters={"voucher_no": pi.name}, + fields=[ + "account", + "debit", + "credit", + "debit_in_transaction_currency", + "credit_in_transaction_currency", + "transaction_currency", + "transaction_exchange_rate", + ], + order_by="account", + as_list=1, + ) + self.assertEqual(actual, expected) + def set_advance_flag(company, flag, default_account): frappe.db.set_value( From 8f4c1e7169b0e4ba76de7def6f8fd12d5405333d Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Sat, 8 Mar 2025 11:45:12 +0530 Subject: [PATCH 1340/1614] refactor: internal transfer gl (cherry picked from commit f1d8feec15595e9529af91827d106e77c1c0354d) --- erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index 146b2f5b210..5092c365fef 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -1439,6 +1439,7 @@ class PurchaseInvoice(BuyingController): "account": self.unrealized_profit_loss_account, "against": self.supplier, "credit": flt(self.total_taxes_and_charges), + "credit_in_transaction_currency": flt(self.total_taxes_and_charges), "credit_in_account_currency": flt(self.base_total_taxes_and_charges), "cost_center": self.cost_center, }, From 0b8673777aa3f7119b2c34a169d01683c5a330d4 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Sat, 8 Mar 2025 12:11:54 +0530 Subject: [PATCH 1341/1614] chore: resolve conflict --- .../doctype/sales_invoice/sales_invoice.py | 41 +------------------ 1 file changed, 2 insertions(+), 39 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 6f1b3a69605..92902c78e8e 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -1572,6 +1572,7 @@ class SalesInvoice(SellingController): "debit_in_account_currency": flt(self.base_change_amount) if self.party_account_currency == self.company_currency else flt(self.change_amount), + "debit_in_transaction_currency": flt(self.change_amount), "against_voucher": self.return_against if cint(self.is_return) and self.return_against else self.name, @@ -1584,13 +1585,13 @@ class SalesInvoice(SellingController): ) ) -<<<<<<< HEAD gl_entries.append( self.get_gl_dict( { "account": self.account_for_change_amount, "against": self.customer, "credit": self.base_change_amount, + "credit_in_transaction_currency": self.change_amount, "cost_center": self.cost_center, }, item=self, @@ -1598,44 +1599,6 @@ class SalesInvoice(SellingController): ) else: frappe.throw(_("Select change amount account"), title=_("Mandatory Field")) -======= - if not self.account_for_change_amount: - frappe.throw(_("Please set Account for Change Amount"), title=_("Mandatory Field")) - - return [ - self.get_gl_dict( - { - "account": self.debit_to, - "party_type": "Customer", - "party": self.customer, - "against": self.account_for_change_amount, - "debit": flt(self.base_change_amount), - "debit_in_account_currency": flt(self.base_change_amount) - if self.party_account_currency == self.company_currency - else flt(self.change_amount), - "debit_in_transaction_currency": flt(self.change_amount), - "against_voucher": self.return_against - if cint(self.is_return) and self.return_against - else self.name, - "against_voucher_type": self.doctype, - "cost_center": self.cost_center, - "project": self.project, - }, - self.party_account_currency, - item=self, - ), - self.get_gl_dict( - { - "account": self.account_for_change_amount, - "against": self.customer, - "credit": self.base_change_amount, - "credit_in_transaction_currency": self.change_amount, - "cost_center": self.cost_center, - }, - item=self, - ), - ] ->>>>>>> 3e292ef2cb (refactor: set transaction currency dr/cr in sales invoice) def make_write_off_gl_entry(self, gl_entries): # write off entries, applicable if only pos From 5c47c35a0fda1335b60e13986d7cd64bf28c4c94 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Fri, 21 Feb 2025 15:40:35 +0530 Subject: [PATCH 1342/1614] refactor: use highest precision for storing exc rate (cherry picked from commit b115bf2e2a6a510f761f0a73124bfa915cdfca46) --- erpnext/accounts/doctype/gl_entry/gl_entry.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/gl_entry/gl_entry.json b/erpnext/accounts/doctype/gl_entry/gl_entry.json index c285a33f73e..b438dbbe4ec 100644 --- a/erpnext/accounts/doctype/gl_entry/gl_entry.json +++ b/erpnext/accounts/doctype/gl_entry/gl_entry.json @@ -279,7 +279,8 @@ { "fieldname": "transaction_exchange_rate", "fieldtype": "Float", - "label": "Transaction Exchange Rate" + "label": "Transaction Exchange Rate", + "precision": "9" }, { "fieldname": "debit_in_transaction_currency", @@ -357,7 +358,7 @@ "idx": 1, "in_create": 1, "links": [], - "modified": "2024-08-22 13:03:39.997475", + "modified": "2025-02-21 14:36:49.431166", "modified_by": "Administrator", "module": "Accounts", "name": "GL Entry", From 1e5fbc0a48ceb3337d2eede22fa7a525e227ff4a Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Fri, 21 Feb 2025 15:42:01 +0530 Subject: [PATCH 1343/1614] refactor: set tr currency dr & cr directly on parent document (cherry picked from commit e9af5670334ca8fa45cf42414989abca09cdb45a) --- .../purchase_invoice/purchase_invoice.py | 25 +++++++++++++++---- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index 3ab214751f7..87112ea7c92 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -871,8 +871,14 @@ class PurchaseInvoice(BuyingController): self.make_payment_gl_entries(gl_entries) self.make_write_off_gl_entry(gl_entries) self.make_gle_for_rounding_adjustment(gl_entries) + self.set_transaction_currency_rate(gl_entries) return gl_entries + def set_transaction_currency_rate(self, gl_entries): + for x in gl_entries: + x["transaction_currency"] = self.currency + x["transaction_exchange_rate"] = self.get("conversion_rate") or 1 + def check_asset_cwip_enabled(self): # Check if there exists any item with cwip accounting enabled in it's asset category for item in self.get("items"): @@ -916,6 +922,7 @@ class PurchaseInvoice(BuyingController): "credit_in_account_currency": base_grand_total if self.party_account_currency == self.company_currency else grand_total, + "credit_in_transaction_currency": grand_total, "against_voucher": against_voucher, "against_voucher_type": self.doctype, "project": self.project, @@ -1054,7 +1061,9 @@ class PurchaseInvoice(BuyingController): # Amount added through landed-cost-voucher if landed_cost_entries: if (item.item_code, item.name) in landed_cost_entries: - for account, amount in landed_cost_entries[(item.item_code, item.name)].items(): + for account, base_amount in landed_cost_entries[ + (item.item_code, item.name) + ].items(): gl_entries.append( self.get_gl_dict( { @@ -1062,8 +1071,8 @@ class PurchaseInvoice(BuyingController): "against": item.expense_account, "cost_center": item.cost_center, "remarks": self.get("remarks") or _("Accounting Entry for Stock"), - "credit": flt(amount["base_amount"]), - "credit_in_account_currency": flt(amount["amount"]), + "credit": flt(base_amount["base_amount"]), + "credit_in_account_currency": flt(base_amount["amount"]), "project": item.project or self.project, }, item=item, @@ -1099,7 +1108,7 @@ class PurchaseInvoice(BuyingController): else item.deferred_expense_account ) - dummy, amount = self.get_amount_and_base_amount(item, None) + amount, base_amount = self.get_amount_and_base_amount(item, None) if provisional_accounting_for_non_stock_items: self.make_provisional_gl_entry(gl_entries, item) @@ -1110,7 +1119,8 @@ class PurchaseInvoice(BuyingController): { "account": expense_account, "against": self.supplier, - "debit": amount, + "debit": base_amount, + "debit_in_transaction_currency": amount, "cost_center": item.cost_center, "project": item.project or self.project, }, @@ -1332,6 +1342,7 @@ class PurchaseInvoice(BuyingController): dr_or_cr + "_in_account_currency": base_amount if account_currency == self.company_currency else amount, + dr_or_cr + "_in_transaction_currency": amount, "cost_center": tax.cost_center, }, account_currency, @@ -1460,6 +1471,7 @@ class PurchaseInvoice(BuyingController): "debit_in_account_currency": self.base_paid_amount if self.party_account_currency == self.company_currency else self.paid_amount, + "debit_in_transaction_currency": self.paid_amount, "against_voucher": self.return_against if cint(self.is_return) and self.return_against else self.name, @@ -1481,6 +1493,7 @@ class PurchaseInvoice(BuyingController): "credit_in_account_currency": self.base_paid_amount if bank_account_currency == self.company_currency else self.paid_amount, + "credit_in_transaction_currency": self.paid_amount, "cost_center": self.cost_center, }, bank_account_currency, @@ -1505,6 +1518,7 @@ class PurchaseInvoice(BuyingController): "debit_in_account_currency": self.base_write_off_amount if self.party_account_currency == self.company_currency else self.write_off_amount, + "debit_in_transaction_currency": self.write_off_amount, "against_voucher": self.return_against if cint(self.is_return) and self.return_against else self.name, @@ -1525,6 +1539,7 @@ class PurchaseInvoice(BuyingController): "credit_in_account_currency": self.base_write_off_amount if write_off_account_currency == self.company_currency else self.write_off_amount, + "credit_in_transaction_currency": self.write_off_amount, "cost_center": self.cost_center or self.write_off_cost_center, }, item=self, From 5299a1032b738d9891afb0ffd43a79c7e49ad7b2 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 24 Feb 2025 21:58:59 +0530 Subject: [PATCH 1344/1614] refactor: handle stocked items (cherry picked from commit 7ff3977394c8f2935601a3a753778bd6dd5a5592) --- erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index 87112ea7c92..b1d6ec15e3c 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -1049,6 +1049,7 @@ class PurchaseInvoice(BuyingController): "account": item.expense_account, "against": self.supplier, "debit": warehouse_debit_amount, + "debit_in_transaction_currency": item.net_amount, "remarks": self.get("remarks") or _("Accounting Entry for Stock"), "cost_center": item.cost_center, "project": item.project or self.project, From fff3b1e84ef2aa9e7b5ef8fdda5a447b95c696f0 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 25 Feb 2025 14:10:00 +0530 Subject: [PATCH 1345/1614] refactor: handle stocked items (cherry picked from commit ee93ed8c970deff88ef54fdcda2c5607959d29d8) --- .../accounts/doctype/purchase_invoice/purchase_invoice.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index b1d6ec15e3c..a50f7df0c09 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -998,6 +998,7 @@ class PurchaseInvoice(BuyingController): "project": item.project or self.project, "remarks": self.get("remarks") or _("Accounting Entry for Stock"), "debit": warehouse_debit_amount, + "debit_in_transaction_currency": item.net_amount, }, warehouse_account[item.warehouse]["account_currency"], item=item, @@ -1018,6 +1019,7 @@ class PurchaseInvoice(BuyingController): "project": item.project or self.project, "remarks": self.get("remarks") or _("Accounting Entry for Stock"), "debit": -1 * flt(credit_amount, item.precision("base_net_amount")), + "debit_in_transaction_currency": item.net_amount, }, warehouse_account[item.from_warehouse]["account_currency"], item=item, @@ -1032,6 +1034,7 @@ class PurchaseInvoice(BuyingController): "account": item.expense_account, "against": self.supplier, "debit": flt(item.base_net_amount, item.precision("base_net_amount")), + "debit_in_transaction_currency": item.net_amount, "remarks": self.get("remarks") or _("Accounting Entry for Stock"), "cost_center": item.cost_center, "project": item.project, @@ -1074,6 +1077,7 @@ class PurchaseInvoice(BuyingController): "remarks": self.get("remarks") or _("Accounting Entry for Stock"), "credit": flt(base_amount["base_amount"]), "credit_in_account_currency": flt(base_amount["amount"]), + "credit_in_transaction_currency": item.net_amount, "project": item.project or self.project, }, item=item, @@ -1096,6 +1100,7 @@ class PurchaseInvoice(BuyingController): "project": item.project or self.project, "remarks": self.get("remarks") or _("Accounting Entry for Stock"), "credit": flt(item.rm_supp_cost), + "credit_in_transaction_currency": item.net_amount, }, warehouse_account[self.supplier_warehouse]["account_currency"], item=item, @@ -1195,6 +1200,7 @@ class PurchaseInvoice(BuyingController): "account": stock_rbnb, "against": self.supplier, "debit": flt(item.item_tax_amount, item.precision("item_tax_amount")), + "debit_in_transaction_currency": item.net_amount, "remarks": self.remarks or _("Accounting Entry for Stock"), "cost_center": self.cost_center, "project": item.project or self.project, @@ -1310,6 +1316,7 @@ class PurchaseInvoice(BuyingController): "account": cost_of_goods_sold_account, "against": item.expense_account, "debit": stock_adjustment_amt, + "debit_in_transaction_currency": item.net_amount, "remarks": self.get("remarks") or _("Stock Adjustment"), "cost_center": item.cost_center, "project": item.project or self.project, From 231abab32117b32ae0a64474a899d6541e1a83e4 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Fri, 28 Feb 2025 17:26:19 +0530 Subject: [PATCH 1346/1614] refactor: set transaction currency dr/cr in sales invoice (cherry picked from commit 3e292ef2cbed31afed297e005e04f021944542fd) # Conflicts: # erpnext/accounts/doctype/sales_invoice/sales_invoice.py --- .../doctype/sales_invoice/sales_invoice.py | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 9fcb1ae526c..cd556d77274 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -1274,6 +1274,7 @@ class SalesInvoice(SellingController): "debit_in_account_currency": base_grand_total if self.party_account_currency == self.company_currency else grand_total, + "debit_in_transaction_currency": grand_total, "against_voucher": against_voucher, "against_voucher_type": self.doctype, "cost_center": self.cost_center, @@ -1305,6 +1306,9 @@ class SalesInvoice(SellingController): if account_currency == self.company_currency else flt(amount, tax.precision("tax_amount_after_discount_amount")) ), + "credit_in_transaction_currency": flt( + amount, tax.precision("tax_amount_after_discount_amount") + ), "cost_center": tax.cost_center, }, account_currency, @@ -1322,6 +1326,7 @@ class SalesInvoice(SellingController): "against": self.customer, "debit": flt(self.total_taxes_and_charges), "debit_in_account_currency": flt(self.base_total_taxes_and_charges), + "debit_in_transaction_currency": flt(self.total_taxes_and_charges), "cost_center": self.cost_center, }, account_currency, @@ -1420,6 +1425,7 @@ class SalesInvoice(SellingController): if account_currency == self.company_currency else flt(amount, item.precision("net_amount")) ), + "credit_in_transaction_currency": flt(amount, item.precision("net_amount")), "cost_center": item.cost_center, "project": item.project or self.project, }, @@ -1471,6 +1477,7 @@ class SalesInvoice(SellingController): + cstr(self.loyalty_redemption_account) + " for the Loyalty Program", "credit": self.loyalty_amount, + "credit_in_transaction_currency": self.loyalty_amount, "against_voucher": self.return_against if cint(self.is_return) else self.name, "against_voucher_type": self.doctype, "cost_center": self.cost_center, @@ -1485,6 +1492,7 @@ class SalesInvoice(SellingController): "cost_center": self.cost_center or self.loyalty_redemption_cost_center, "against": self.customer, "debit": self.loyalty_amount, + "debit_in_transaction_currency": self.loyalty_amount, "remark": "Loyalty Points redeemed by the customer", }, item=self, @@ -1518,6 +1526,7 @@ class SalesInvoice(SellingController): "credit_in_account_currency": payment_mode.base_amount if self.party_account_currency == self.company_currency else payment_mode.amount, + "credit_in_transaction_currency": payment_mode.amount, "against_voucher": against_voucher, "against_voucher_type": self.doctype, "cost_center": self.cost_center, @@ -1537,6 +1546,7 @@ class SalesInvoice(SellingController): "debit_in_account_currency": payment_mode.base_amount if payment_mode_account_currency == self.company_currency else payment_mode.amount, + "debit_in_transaction_currency": payment_mode.amount, "cost_center": self.cost_center, }, payment_mode_account_currency, @@ -1573,6 +1583,7 @@ class SalesInvoice(SellingController): ) ) +<<<<<<< HEAD gl_entries.append( self.get_gl_dict( { @@ -1586,6 +1597,44 @@ class SalesInvoice(SellingController): ) else: frappe.throw(_("Select change amount account"), title=_("Mandatory Field")) +======= + if not self.account_for_change_amount: + frappe.throw(_("Please set Account for Change Amount"), title=_("Mandatory Field")) + + return [ + self.get_gl_dict( + { + "account": self.debit_to, + "party_type": "Customer", + "party": self.customer, + "against": self.account_for_change_amount, + "debit": flt(self.base_change_amount), + "debit_in_account_currency": flt(self.base_change_amount) + if self.party_account_currency == self.company_currency + else flt(self.change_amount), + "debit_in_transaction_currency": flt(self.change_amount), + "against_voucher": self.return_against + if cint(self.is_return) and self.return_against + else self.name, + "against_voucher_type": self.doctype, + "cost_center": self.cost_center, + "project": self.project, + }, + self.party_account_currency, + item=self, + ), + self.get_gl_dict( + { + "account": self.account_for_change_amount, + "against": self.customer, + "credit": self.base_change_amount, + "credit_in_transaction_currency": self.change_amount, + "cost_center": self.cost_center, + }, + item=self, + ), + ] +>>>>>>> 3e292ef2cb (refactor: set transaction currency dr/cr in sales invoice) def make_write_off_gl_entry(self, gl_entries): # write off entries, applicable if only pos @@ -1610,6 +1659,9 @@ class SalesInvoice(SellingController): if self.party_account_currency == self.company_currency else flt(self.write_off_amount, self.precision("write_off_amount")) ), + "credit_in_transaction_currency": flt( + self.write_off_amount, self.precision("write_off_amount") + ), "against_voucher": self.return_against if cint(self.is_return) else self.name, "against_voucher_type": self.doctype, "cost_center": self.cost_center, @@ -1630,6 +1682,9 @@ class SalesInvoice(SellingController): if write_off_account_currency == self.company_currency else flt(self.write_off_amount, self.precision("write_off_amount")) ), + "debit_in_transaction_currency": flt( + self.write_off_amount, self.precision("write_off_amount") + ), "cost_center": self.cost_center or self.write_off_cost_center or default_cost_center, }, write_off_account_currency, @@ -1674,6 +1729,9 @@ class SalesInvoice(SellingController): "credit_in_account_currency": flt( self.rounding_adjustment, self.precision("rounding_adjustment") ), + "credit_in_transaction_currency": flt( + self.rounding_adjustment, self.precision("rounding_adjustment") + ), "credit": flt( self.base_rounding_adjustment, self.precision("base_rounding_adjustment") ), From 615b0c40a3e7250adffae3db0e70627460ffd3a9 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Fri, 28 Feb 2025 17:30:25 +0530 Subject: [PATCH 1347/1614] refactor: move utility method to controller (cherry picked from commit d1d06885dc647d0ca964850019d32d3091d1de46) --- .../accounts/doctype/purchase_invoice/purchase_invoice.py | 7 +------ erpnext/accounts/doctype/sales_invoice/sales_invoice.py | 1 + erpnext/controllers/accounts_controller.py | 5 +++++ 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index a50f7df0c09..5d12066757e 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -871,14 +871,9 @@ class PurchaseInvoice(BuyingController): self.make_payment_gl_entries(gl_entries) self.make_write_off_gl_entry(gl_entries) self.make_gle_for_rounding_adjustment(gl_entries) - self.set_transaction_currency_rate(gl_entries) + self.set_transaction_currency_and_rate_in_gl_map(gl_entries) return gl_entries - def set_transaction_currency_rate(self, gl_entries): - for x in gl_entries: - x["transaction_currency"] = self.currency - x["transaction_exchange_rate"] = self.get("conversion_rate") or 1 - def check_asset_cwip_enabled(self): # Check if there exists any item with cwip accounting enabled in it's asset category for item in self.get("items"): diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index cd556d77274..6f1b3a69605 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -1241,6 +1241,7 @@ class SalesInvoice(SellingController): self.make_write_off_gl_entry(gl_entries) self.make_gle_for_rounding_adjustment(gl_entries) + self.set_transaction_currency_and_rate_in_gl_map(gl_entries) return gl_entries def make_customer_gl_entry(self, gl_entries): diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 6ed55a0b55e..702445a29c5 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -2758,6 +2758,11 @@ class AccountsController(TransactionBase): elif self.doctype == "Payment Entry": self.make_advance_payment_ledger_for_payment() + def set_transaction_currency_and_rate_in_gl_map(self, gl_entries): + for x in gl_entries: + x["transaction_currency"] = self.currency + x["transaction_exchange_rate"] = self.get("conversion_rate") or 1 + @frappe.whitelist() def get_tax_rate(account_head): From 04758d3de3440c8480c9c957c6ad3da39c8d0cb5 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 3 Mar 2025 12:22:35 +0530 Subject: [PATCH 1348/1614] refactor: handle Journal entries (cherry picked from commit 9f3847c0f8b985eb21d29bb4687c1762f467e2ba) --- .../doctype/journal_entry/journal_entry.py | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.py b/erpnext/accounts/doctype/journal_entry/journal_entry.py index ef2388a7eaa..725364c1590 100644 --- a/erpnext/accounts/doctype/journal_entry/journal_entry.py +++ b/erpnext/accounts/doctype/journal_entry/journal_entry.py @@ -1059,14 +1059,15 @@ class JournalEntry(AccountsController): gl_map = [] company_currency = erpnext.get_company_currency(self.company) + self.transaction_currency = company_currency + self.transaction_exchange_rate = 1 if self.multi_currency: for row in self.get("accounts"): if row.account_currency != company_currency: - self.currency = row.account_currency - self.conversion_rate = row.exchange_rate + # Journal assumes the first foregin currency as transaction currency + self.transaction_currency = row.account_currency + self.transaction_exchange_rate = row.exchange_rate break - else: - self.currency = company_currency for d in self.get("accounts"): if d.debit or d.credit or (self.voucher_type == "Exchange Gain Or Loss"): @@ -1091,6 +1092,18 @@ class JournalEntry(AccountsController): "credit_in_account_currency": flt( d.credit_in_account_currency, d.precision("credit_in_account_currency") ), + "transaction_currency": self.transaction_currency, + "transaction_exchange_rate": self.transaction_exchange_rate, + "debit_in_transaction_currency": flt( + d.debit_in_account_currency, d.precision("debit_in_account_currency") + ) + if self.transaction_currency == d.account_currency + else flt(d.debit, d.precision("debit")) / self.transaction_exchange_rate, + "credit_in_transaction_currency": flt( + d.credit_in_account_currency, d.precision("credit_in_account_currency") + ) + if self.transaction_currency == d.account_currency + else flt(d.credit, d.precision("credit")) / self.transaction_exchange_rate, "against_voucher_type": d.reference_type, "against_voucher": d.reference_name, "remarks": remarks, From 81c29e8f8cc0c2842a60d3baf8a42d065863aeb5 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 4 Mar 2025 14:19:38 +0530 Subject: [PATCH 1349/1614] refactor: handle payment entry (cherry picked from commit 5c86e3ce859d9f8baa93bc709fd75abab7849700) --- .../doctype/payment_entry/payment_entry.py | 42 +++++++++++++++++-- 1 file changed, 38 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index 45462398e1c..588be1df4bf 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -1222,10 +1222,15 @@ class PaymentEntry(AccountsController): self.setup_party_account_field() company_currency = erpnext.get_company_currency(self.company) + self.transaction_currency = company_currency + self.transaction_exchange_rate = 1 + if self.paid_from_account_currency != company_currency: - self.currency = self.paid_from_account_currency + self.transaction_currency = self.paid_from_account_currency + self.transaction_exchange_rate = self.source_exchange_rate elif self.paid_to_account_currency != company_currency: - self.currency = self.paid_to_account_currency + self.transaction_currency = self.paid_to_account_currency + self.transaction_exchange_rate = self.target_exchange_rate gl_entries = [] self.add_party_gl_entries(gl_entries) @@ -1304,6 +1309,9 @@ class PaymentEntry(AccountsController): "cost_center": cost_center, dr_or_cr + "_in_account_currency": d.allocated_amount, dr_or_cr: allocated_amount_in_company_currency, + dr_or_cr + "_in_transaction_currency": d.allocated_amount + if self.transaction_currency == self.party_account_currency + else allocated_amount_in_company_currency / self.transaction_exchange_rate, }, item=self, ) @@ -1348,6 +1356,9 @@ class PaymentEntry(AccountsController): "account_currency": self.party_account_currency, "cost_center": self.cost_center, dr_or_cr + "_in_account_currency": self.unallocated_amount, + dr_or_cr + "_in_transaction_currency": self.unallocated_amount + if self.party_account_currency == self.transaction_currency + else base_unallocated_amount / self.transaction_exchange_rate, dr_or_cr: base_unallocated_amount, }, item=self, @@ -1444,9 +1455,16 @@ class PaymentEntry(AccountsController): frappe.db.set_value("Payment Entry Reference", invoice.name, "reconcile_effect_on", posting_date) dr_or_cr, account = self.get_dr_and_account_for_advances(invoice) + base_allocated_amount = self.calculate_base_allocated_amount_for_reference(invoice) args_dict["account"] = account - args_dict[dr_or_cr] = self.calculate_base_allocated_amount_for_reference(invoice) + args_dict[dr_or_cr] = base_allocated_amount args_dict[dr_or_cr + "_in_account_currency"] = invoice.allocated_amount + args_dict[dr_or_cr + "_in_transaction_currency"] = ( + invoice.allocated_amount + if self.party_account_currency == self.transaction_currency + else base_allocated_amount / self.transaction_exchange_rate + ) + args_dict.update( { "against_voucher_type": invoice.reference_doctype, @@ -1464,8 +1482,13 @@ class PaymentEntry(AccountsController): args_dict[dr_or_cr + "_in_account_currency"] = 0 dr_or_cr = "debit" if dr_or_cr == "credit" else "credit" args_dict["account"] = self.party_account - args_dict[dr_or_cr] = self.calculate_base_allocated_amount_for_reference(invoice) + args_dict[dr_or_cr] = base_allocated_amount args_dict[dr_or_cr + "_in_account_currency"] = invoice.allocated_amount + args_dict[dr_or_cr + "_in_transaction_currency"] = ( + invoice.allocated_amount + if self.party_account_currency == self.transaction_currency + else base_allocated_amount / self.transaction_exchange_rate + ) args_dict.update( { "against_voucher_type": "Payment Entry", @@ -1487,6 +1510,9 @@ class PaymentEntry(AccountsController): "account_currency": self.paid_from_account_currency, "against": self.party if self.payment_type == "Pay" else self.paid_to, "credit_in_account_currency": self.paid_amount, + "credit_in_transaction_currency": self.paid_amount + if self.paid_from_account_currency == self.transaction_currency + else self.base_paid_amount / self.transaction_exchange_rate, "credit": self.base_paid_amount, "cost_center": self.cost_center, "post_net_value": True, @@ -1502,6 +1528,9 @@ class PaymentEntry(AccountsController): "account_currency": self.paid_to_account_currency, "against": self.party if self.payment_type == "Receive" else self.paid_from, "debit_in_account_currency": self.received_amount, + "debit_in_transaction_currency": self.received_amount + if self.paid_to_account_currency == self.transaction_currency + else self.base_received_amount / self.transaction_exchange_rate, "debit": self.base_received_amount, "cost_center": self.cost_center, }, @@ -1537,6 +1566,8 @@ class PaymentEntry(AccountsController): dr_or_cr + "_in_account_currency": base_tax_amount if account_currency == self.company_currency else d.tax_amount, + dr_or_cr + "_in_transaction_currency": base_tax_amount + / self.transaction_exchange_rate, "cost_center": d.cost_center, "post_net_value": True, }, @@ -1562,6 +1593,8 @@ class PaymentEntry(AccountsController): rev_dr_or_cr + "_in_account_currency": base_tax_amount if account_currency == self.company_currency else d.tax_amount, + rev_dr_or_cr + "_in_transaction_currency": base_tax_amount + / self.transaction_exchange_rate, "cost_center": self.cost_center, "post_net_value": True, }, @@ -1584,6 +1617,7 @@ class PaymentEntry(AccountsController): "account_currency": account_currency, "against": self.party or self.paid_from, "debit_in_account_currency": d.amount, + "debit_in_transaction_currency": d.amount / self.transaction_exchange_rate, "debit": d.amount, "cost_center": d.cost_center, }, From 8b6eea63492c82e8bcddaf60b9cb85967c031d4c Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 6 Mar 2025 11:35:18 +0530 Subject: [PATCH 1350/1614] refactor: set transaction currency and rate before gl map (cherry picked from commit ceca5b4c72e60bf923bf8c85c7d7be0a15e6f9fc) --- .../accounts/doctype/payment_entry/payment_entry.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index 588be1df4bf..5c9f855ea5b 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -1217,10 +1217,7 @@ class PaymentEntry(AccountsController): self.set("remarks", "\n".join(remarks)) - def build_gl_map(self): - if self.payment_type in ("Receive", "Pay") and not self.get("party_account_field"): - self.setup_party_account_field() - + def set_transaction_currency_and_rate(self): company_currency = erpnext.get_company_currency(self.company) self.transaction_currency = company_currency self.transaction_exchange_rate = 1 @@ -1232,6 +1229,11 @@ class PaymentEntry(AccountsController): self.transaction_currency = self.paid_to_account_currency self.transaction_exchange_rate = self.target_exchange_rate + def build_gl_map(self): + if self.payment_type in ("Receive", "Pay") and not self.get("party_account_field"): + self.setup_party_account_field() + self.set_transaction_currency_and_rate() + gl_entries = [] self.add_party_gl_entries(gl_entries) self.add_bank_gl_entries(gl_entries) @@ -1376,6 +1378,7 @@ class PaymentEntry(AccountsController): def make_advance_gl_entries( self, entry: object | dict = None, cancel: bool = 0, update_outstanding: str = "Yes" ): + self.set_transaction_currency_and_rate() gl_entries = [] self.add_advance_gl_entries(gl_entries, entry) From 3015628519a0aa1a8e4c76740b98bd94767b1947 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 6 Mar 2025 14:38:18 +0530 Subject: [PATCH 1351/1614] fix(test): incorrect transaction exchange rate in test case (cherry picked from commit a31770d12282771969feba8c54f2e79a2290e590) --- erpnext/accounts/doctype/journal_entry/test_journal_entry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/journal_entry/test_journal_entry.py b/erpnext/accounts/doctype/journal_entry/test_journal_entry.py index 54aa3eaf96f..0fef3a84372 100644 --- a/erpnext/accounts/doctype/journal_entry/test_journal_entry.py +++ b/erpnext/accounts/doctype/journal_entry/test_journal_entry.py @@ -575,7 +575,7 @@ class TestJournalEntry(unittest.TestCase): order_by="account", ) expected = [ - {"account": "_Test Bank - _TC", "transaction_exchange_rate": 1.0}, + {"account": "_Test Bank - _TC", "transaction_exchange_rate": 85.0}, {"account": "_Test Receivable USD - _TC", "transaction_exchange_rate": 85.0}, ] self.assertEqual(expected, actual) From af45ec0d6dd726e9cc7d26afe8644230a8704c55 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 6 Mar 2025 14:54:20 +0530 Subject: [PATCH 1352/1614] refactor(test): save first to let the tax table populate (cherry picked from commit 23d465805b8812e7f76ef5031f08fe9a49243b36) --- .../tax_withholding_category/test_tax_withholding_category.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py b/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py index 6ab6bcc08a2..ae0a098137a 100644 --- a/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py +++ b/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py @@ -519,7 +519,7 @@ class TestTaxWithholdingCategory(FrappeTestCase): payment = get_payment_entry(order.doctype, order.name) payment.apply_tax_withholding_amount = 1 payment.tax_withholding_category = "Cumulative Threshold TDS" - payment.submit() + payment.save().submit() self.assertEqual(payment.taxes[0].tax_amount, 4000) def test_multi_category_single_supplier(self): From 501e3881868b7f55598d9532c09bce635efe3049 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 6 Mar 2025 15:54:14 +0530 Subject: [PATCH 1353/1614] refactor: isolate to specific doctypes (cherry picked from commit b348aa3b3716838b1f00f5a8266c8d9b6904a660) --- erpnext/controllers/accounts_controller.py | 27 +++++++++++----------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 702445a29c5..b694e2cf9f4 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -1119,20 +1119,19 @@ class AccountsController(TransactionBase): ) # Update details in transaction currency - gl_dict.update( - { - "transaction_currency": self.get("currency") or self.company_currency, - "transaction_exchange_rate": item.get("exchange_rate", 1) - if self.doctype == "Journal Entry" and item - else self.get("conversion_rate", 1), - "debit_in_transaction_currency": self.get_value_in_transaction_currency( - account_currency, gl_dict, "debit" - ), - "credit_in_transaction_currency": self.get_value_in_transaction_currency( - account_currency, gl_dict, "credit" - ), - } - ) + if self.doctype not in ["Purchase Invoice", "Sales Invoice", "Journal Entry", "Payment Entry"]: + gl_dict.update( + { + "transaction_currency": self.get("currency") or self.company_currency, + "transaction_exchange_rate": self.get("conversion_rate", 1), + "debit_in_transaction_currency": self.get_value_in_transaction_currency( + account_currency, gl_dict, "debit" + ), + "credit_in_transaction_currency": self.get_value_in_transaction_currency( + account_currency, gl_dict, "credit" + ), + } + ) if not args.get("against_voucher_type") and self.get("against_voucher_type"): gl_dict.update({"against_voucher_type": self.get("against_voucher_type")}) From c479998cd68d1b61fe5a36d53f3dd5a083b00176 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Fri, 7 Mar 2025 11:40:14 +0530 Subject: [PATCH 1354/1614] chore: typo (cherry picked from commit bc792c61e9dc07c9ebef4534e9e1e7904adb592f) --- erpnext/accounts/doctype/journal_entry/journal_entry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.py b/erpnext/accounts/doctype/journal_entry/journal_entry.py index 725364c1590..113b1a96e2c 100644 --- a/erpnext/accounts/doctype/journal_entry/journal_entry.py +++ b/erpnext/accounts/doctype/journal_entry/journal_entry.py @@ -1064,7 +1064,7 @@ class JournalEntry(AccountsController): if self.multi_currency: for row in self.get("accounts"): if row.account_currency != company_currency: - # Journal assumes the first foregin currency as transaction currency + # Journal assumes the first foreign currency as transaction currency self.transaction_currency = row.account_currency self.transaction_exchange_rate = row.exchange_rate break From 3bdd4ce116cce56b95edc777e15bccb1c25ebbda Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Fri, 7 Mar 2025 13:22:08 +0530 Subject: [PATCH 1355/1614] fix: incorrect category in list (cherry picked from commit 6545467aecac894701b2e62719083d3db195a241) --- erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index 5d12066757e..c514f379406 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -953,7 +953,7 @@ class PurchaseInvoice(BuyingController): valuation_tax_accounts = [ d.account_head for d in self.get("taxes") - if d.category in ("Valuation", "Total and Valuation") + if d.category in ("Valuation", "Valuation and Total") and flt(d.base_tax_amount_after_discount_amount) ] From cacb720556624fd24c8fcb60c906411913726c8b Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Fri, 7 Mar 2025 13:22:20 +0530 Subject: [PATCH 1356/1614] refactor: convert tax amount using exchange rate (cherry picked from commit 7528ef147a0375dc863f2d4d0720f02dbcd71631) --- erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index c514f379406..9d19109217d 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -1195,7 +1195,8 @@ class PurchaseInvoice(BuyingController): "account": stock_rbnb, "against": self.supplier, "debit": flt(item.item_tax_amount, item.precision("item_tax_amount")), - "debit_in_transaction_currency": item.net_amount, + "debit_in_transaction_currency": item.item_tax_amount + / self.conversion_rate, "remarks": self.remarks or _("Accounting Entry for Stock"), "cost_center": self.cost_center, "project": item.project or self.project, From 2d290b153d9558e1fa57807907255b92904f79f8 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Fri, 7 Mar 2025 14:43:48 +0530 Subject: [PATCH 1357/1614] refactor: trx currency dr and cr for tax rows and item rows (cherry picked from commit 4cd3f3531c965c318c635ebe2600240c9f9782fd) --- .../purchase_invoice/purchase_invoice.py | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index 9d19109217d..146b2f5b210 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -1047,7 +1047,10 @@ class PurchaseInvoice(BuyingController): "account": item.expense_account, "against": self.supplier, "debit": warehouse_debit_amount, - "debit_in_transaction_currency": item.net_amount, + "debit_in_transaction_currency": flt( + warehouse_debit_amount / self.conversion_rate, + item.precision("net_amount"), + ), "remarks": self.get("remarks") or _("Accounting Entry for Stock"), "cost_center": item.cost_center, "project": item.project or self.project, @@ -1195,8 +1198,10 @@ class PurchaseInvoice(BuyingController): "account": stock_rbnb, "against": self.supplier, "debit": flt(item.item_tax_amount, item.precision("item_tax_amount")), - "debit_in_transaction_currency": item.item_tax_amount - / self.conversion_rate, + "debit_in_transaction_currency": flt( + item.item_tax_amount / self.conversion_rate, + item.precision("item_tax_amount"), + ), "remarks": self.remarks or _("Accounting Entry for Stock"), "cost_center": self.cost_center, "project": item.project or self.project, @@ -1393,6 +1398,10 @@ class PurchaseInvoice(BuyingController): "cost_center": tax.cost_center, "against": self.supplier, "credit": applicable_amount, + "credit_in_transaction_currency": flt( + applicable_amount / self.conversion_rate, + frappe.get_precision("Purchase Invoice Item", "item_tax_amount"), + ), "remarks": self.remarks or _("Accounting Entry for Stock"), }, item=tax, @@ -1411,6 +1420,10 @@ class PurchaseInvoice(BuyingController): "cost_center": tax.cost_center, "against": self.supplier, "credit": valuation_tax[tax.name], + "credit_in_transaction_currency": flt( + valuation_tax[tax.name] / self.conversion_rate, + frappe.get_precision("Purchase Invoice Item", "item_tax_amount"), + ), "remarks": self.remarks or _("Accounting Entry for Stock"), }, item=tax, From 61880a311aa6d1b8d1d5b01e105e006ff2f7e5e9 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Fri, 7 Mar 2025 17:00:21 +0530 Subject: [PATCH 1358/1614] refactor: handle rounding diff for trx currency dr and cr (cherry picked from commit 455a55b2ce5dddfc534efae8efb4b58fb50b949e) --- erpnext/accounts/general_ledger.py | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/erpnext/accounts/general_ledger.py b/erpnext/accounts/general_ledger.py index 7d0bf2cca11..cb267972c70 100644 --- a/erpnext/accounts/general_ledger.py +++ b/erpnext/accounts/general_ledger.py @@ -430,7 +430,7 @@ def process_debit_credit_difference(gl_map): voucher_no = gl_map[0].voucher_no allowance = get_debit_credit_allowance(voucher_type, precision) - debit_credit_diff = get_debit_credit_difference(gl_map, precision) + debit_credit_diff, trx_cur_debit_credit_diff = get_debit_credit_difference(gl_map, precision) if abs(debit_credit_diff) > allowance: if not ( @@ -441,9 +441,9 @@ def process_debit_credit_difference(gl_map): raise_debit_credit_not_equal_error(debit_credit_diff, voucher_type, voucher_no) elif abs(debit_credit_diff) >= (1.0 / (10**precision)): - make_round_off_gle(gl_map, debit_credit_diff, precision) + make_round_off_gle(gl_map, debit_credit_diff, trx_cur_debit_credit_diff, precision) - debit_credit_diff = get_debit_credit_difference(gl_map, precision) + debit_credit_diff, trx_cur_debit_credit_diff = get_debit_credit_difference(gl_map, precision) if abs(debit_credit_diff) > allowance: if not ( voucher_type == "Journal Entry" @@ -455,14 +455,23 @@ def process_debit_credit_difference(gl_map): def get_debit_credit_difference(gl_map, precision): debit_credit_diff = 0.0 + trx_cur_debit_credit_diff = 0 + for entry in gl_map: entry.debit = flt(entry.debit, precision) entry.credit = flt(entry.credit, precision) debit_credit_diff += entry.debit - entry.credit - debit_credit_diff = flt(debit_credit_diff, precision) + entry.debit_in_transaction_currency = flt(entry.debit_in_transaction_currency, precision) + entry.credit_in_transaction_currency = flt(entry.credit_in_transaction_currency, precision) + trx_cur_debit_credit_diff += ( + entry.debit_in_transaction_currency - entry.credit_in_transaction_currency + ) - return debit_credit_diff + debit_credit_diff = flt(debit_credit_diff, precision) + trx_cur_debit_credit_diff = flt(trx_cur_debit_credit_diff, precision) + + return debit_credit_diff, trx_cur_debit_credit_diff def get_debit_credit_allowance(voucher_type, precision): @@ -489,7 +498,7 @@ def has_opening_entries(gl_map: list) -> bool: return False -def make_round_off_gle(gl_map, debit_credit_diff, precision): +def make_round_off_gle(gl_map, debit_credit_diff, trx_cur_debit_credit_diff, precision): round_off_account, round_off_cost_center, round_off_for_opening = get_round_off_account_and_cost_center( gl_map[0].company, gl_map[0].voucher_type, gl_map[0].voucher_no ) @@ -534,6 +543,12 @@ def make_round_off_gle(gl_map, debit_credit_diff, precision): "credit_in_account_currency": debit_credit_diff if debit_credit_diff > 0 else 0, "debit": abs(debit_credit_diff) if debit_credit_diff < 0 else 0, "credit": debit_credit_diff if debit_credit_diff > 0 else 0, + "debit_in_transaction_currency": abs(trx_cur_debit_credit_diff) + if trx_cur_debit_credit_diff < 0 + else 0, + "credit_in_transaction_currency": trx_cur_debit_credit_diff + if trx_cur_debit_credit_diff > 0 + else 0, "cost_center": round_off_cost_center, "party_type": None, "party": None, From a1cf27ec17b8b472c0c45a44abd65a4ad5302606 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Fri, 7 Mar 2025 17:39:21 +0530 Subject: [PATCH 1359/1614] test: assert total debit and credit for trx currency (cherry picked from commit 55d06361232baa64551c90db25d5231f7dd32320) --- .../purchase_invoice/test_purchase_invoice.py | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py index e2386122522..192f9cc81d2 100644 --- a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py @@ -2639,6 +2639,36 @@ class TestPurchaseInvoice(FrappeTestCase, StockTestMixin): "Buying Settings", "bill_for_rejected_quantity_in_purchase_invoice", original_value ) + def test_trx_currency_debit_credit_for_high_precision(self): + exc_rate = 0.737517516 + pi = make_purchase_invoice( + currency="USD", conversion_rate=exc_rate, qty=1, rate=2000, do_not_save=True + ) + pi.supplier = "_Test Supplier USD" + pi.save().submit() + + expected = ( + ("_Test Account Cost for Goods Sold - _TC", 1475.04, 0.0, 2000.0, 0.0, "USD", exc_rate), + ("_Test Payable USD - _TC", 0.0, 1475.04, 0.0, 2000.0, "USD", exc_rate), + ) + + actual = frappe.db.get_all( + "GL Entry", + filters={"voucher_no": pi.name}, + fields=[ + "account", + "debit", + "credit", + "debit_in_transaction_currency", + "credit_in_transaction_currency", + "transaction_currency", + "transaction_exchange_rate", + ], + order_by="account", + as_list=1, + ) + self.assertEqual(actual, expected) + def set_advance_flag(company, flag, default_account): frappe.db.set_value( From cd1803a74d4fca0fead907c6b791ce1c54a61b0c Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Sat, 8 Mar 2025 11:45:12 +0530 Subject: [PATCH 1360/1614] refactor: internal transfer gl (cherry picked from commit f1d8feec15595e9529af91827d106e77c1c0354d) --- erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index 146b2f5b210..5092c365fef 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -1439,6 +1439,7 @@ class PurchaseInvoice(BuyingController): "account": self.unrealized_profit_loss_account, "against": self.supplier, "credit": flt(self.total_taxes_and_charges), + "credit_in_transaction_currency": flt(self.total_taxes_and_charges), "credit_in_account_currency": flt(self.base_total_taxes_and_charges), "cost_center": self.cost_center, }, From d0b14f19076946b9d9a42568f687587d734eb2d1 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Sat, 8 Mar 2025 12:28:49 +0530 Subject: [PATCH 1361/1614] chore: resolve conflict --- .../doctype/sales_invoice/sales_invoice.py | 41 +------------------ 1 file changed, 2 insertions(+), 39 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 6f1b3a69605..92902c78e8e 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -1572,6 +1572,7 @@ class SalesInvoice(SellingController): "debit_in_account_currency": flt(self.base_change_amount) if self.party_account_currency == self.company_currency else flt(self.change_amount), + "debit_in_transaction_currency": flt(self.change_amount), "against_voucher": self.return_against if cint(self.is_return) and self.return_against else self.name, @@ -1584,13 +1585,13 @@ class SalesInvoice(SellingController): ) ) -<<<<<<< HEAD gl_entries.append( self.get_gl_dict( { "account": self.account_for_change_amount, "against": self.customer, "credit": self.base_change_amount, + "credit_in_transaction_currency": self.change_amount, "cost_center": self.cost_center, }, item=self, @@ -1598,44 +1599,6 @@ class SalesInvoice(SellingController): ) else: frappe.throw(_("Select change amount account"), title=_("Mandatory Field")) -======= - if not self.account_for_change_amount: - frappe.throw(_("Please set Account for Change Amount"), title=_("Mandatory Field")) - - return [ - self.get_gl_dict( - { - "account": self.debit_to, - "party_type": "Customer", - "party": self.customer, - "against": self.account_for_change_amount, - "debit": flt(self.base_change_amount), - "debit_in_account_currency": flt(self.base_change_amount) - if self.party_account_currency == self.company_currency - else flt(self.change_amount), - "debit_in_transaction_currency": flt(self.change_amount), - "against_voucher": self.return_against - if cint(self.is_return) and self.return_against - else self.name, - "against_voucher_type": self.doctype, - "cost_center": self.cost_center, - "project": self.project, - }, - self.party_account_currency, - item=self, - ), - self.get_gl_dict( - { - "account": self.account_for_change_amount, - "against": self.customer, - "credit": self.base_change_amount, - "credit_in_transaction_currency": self.change_amount, - "cost_center": self.cost_center, - }, - item=self, - ), - ] ->>>>>>> 3e292ef2cb (refactor: set transaction currency dr/cr in sales invoice) def make_write_off_gl_entry(self, gl_entries): # write off entries, applicable if only pos From 2ce8299bc8c5dbcf99dea5997ae9000ab7645a6d Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Sat, 8 Mar 2025 07:42:44 +0000 Subject: [PATCH 1362/1614] chore(release): Bumped to Version 15.54.2 ## [15.54.2](https://github.com/frappe/erpnext/compare/v15.54.1...v15.54.2) (2025-03-08) ### Bug Fixes * incorrect category in list ([3bdd4ce](https://github.com/frappe/erpnext/commit/3bdd4ce116cce56b95edc777e15bccb1c25ebbda)) * **test:** incorrect transaction exchange rate in test case ([3015628](https://github.com/frappe/erpnext/commit/3015628519a0aa1a8e4c76740b98bd94767b1947)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 7e5036a5a0e..0fac6de7898 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.54.1" +__version__ = "15.54.2" def get_default_company(user=None): From 8b67527900df9ea6279451bc887eef7d88ac4f60 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Sat, 8 Mar 2025 11:31:33 +0530 Subject: [PATCH 1363/1614] fix: consider account freeze date in recalculate_amount_difference_field patch (cherry picked from commit 696f931678d955fcc6b87d689343b2900f7ba9ca) # Conflicts: # erpnext/patches/v15_0/recalculate_amount_difference_field.py --- .../v15_0/recalculate_amount_difference_field.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/erpnext/patches/v15_0/recalculate_amount_difference_field.py b/erpnext/patches/v15_0/recalculate_amount_difference_field.py index 7d3d957fe62..e4e1add6949 100644 --- a/erpnext/patches/v15_0/recalculate_amount_difference_field.py +++ b/erpnext/patches/v15_0/recalculate_amount_difference_field.py @@ -62,6 +62,7 @@ def execute(): ): posting_date = period_closing_voucher[0].period_end_date +<<<<<<< HEAD try: fiscal_year = get_fiscal_year(frappe.utils.datetime.date.today()) except Exception: @@ -69,6 +70,15 @@ def execute(): else: if fiscal_year and getdate(fiscal_year[1]) > getdate(posting_date): posting_date = fiscal_year[1] +======= + acc_frozen_upto = frappe.db.get_single_value("Accounts Settings", "acc_frozen_upto") + if acc_frozen_upto and getdate(acc_frozen_upto) > getdate(posting_date): + posting_date = acc_frozen_upto + + fiscal_year = get_fiscal_year(frappe.utils.datetime.date.today(), raise_on_missing=False) + if fiscal_year and getdate(fiscal_year[1]) > getdate(posting_date): + posting_date = fiscal_year[1] +>>>>>>> 696f931678 (fix: consider account freeze date in recalculate_amount_difference_field patch) query = query.where(parent.posting_date > posting_date) if result := query.run(as_dict=True): From 8264d42cd9083f71752a303fded52d698d819c57 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Sat, 8 Mar 2025 11:38:28 +0530 Subject: [PATCH 1364/1614] fix: consider stock freeze date in recalculate_amount_difference_field patch (cherry picked from commit cd7253278937f66f2c5b52bebc54f137b03068a7) --- erpnext/patches/v15_0/recalculate_amount_difference_field.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/erpnext/patches/v15_0/recalculate_amount_difference_field.py b/erpnext/patches/v15_0/recalculate_amount_difference_field.py index e4e1add6949..0f8083d8b14 100644 --- a/erpnext/patches/v15_0/recalculate_amount_difference_field.py +++ b/erpnext/patches/v15_0/recalculate_amount_difference_field.py @@ -75,6 +75,10 @@ def execute(): if acc_frozen_upto and getdate(acc_frozen_upto) > getdate(posting_date): posting_date = acc_frozen_upto + stock_frozen_upto = frappe.db.get_single_value("Stock Settings", "stock_frozen_upto") + if stock_frozen_upto and getdate(stock_frozen_upto) > getdate(posting_date): + posting_date = stock_frozen_upto + fiscal_year = get_fiscal_year(frappe.utils.datetime.date.today(), raise_on_missing=False) if fiscal_year and getdate(fiscal_year[1]) > getdate(posting_date): posting_date = fiscal_year[1] From 985fb5dfdc2cae524b77694fc73859667907449b Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Sat, 8 Mar 2025 22:22:12 +0530 Subject: [PATCH 1365/1614] chore: resolve conflicts --- .../recalculate_amount_difference_field.py | 21 +++++++------------ 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/erpnext/patches/v15_0/recalculate_amount_difference_field.py b/erpnext/patches/v15_0/recalculate_amount_difference_field.py index 0f8083d8b14..2891ac16c44 100644 --- a/erpnext/patches/v15_0/recalculate_amount_difference_field.py +++ b/erpnext/patches/v15_0/recalculate_amount_difference_field.py @@ -62,15 +62,6 @@ def execute(): ): posting_date = period_closing_voucher[0].period_end_date -<<<<<<< HEAD - try: - fiscal_year = get_fiscal_year(frappe.utils.datetime.date.today()) - except Exception: - return - else: - if fiscal_year and getdate(fiscal_year[1]) > getdate(posting_date): - posting_date = fiscal_year[1] -======= acc_frozen_upto = frappe.db.get_single_value("Accounts Settings", "acc_frozen_upto") if acc_frozen_upto and getdate(acc_frozen_upto) > getdate(posting_date): posting_date = acc_frozen_upto @@ -79,10 +70,14 @@ def execute(): if stock_frozen_upto and getdate(stock_frozen_upto) > getdate(posting_date): posting_date = stock_frozen_upto - fiscal_year = get_fiscal_year(frappe.utils.datetime.date.today(), raise_on_missing=False) - if fiscal_year and getdate(fiscal_year[1]) > getdate(posting_date): - posting_date = fiscal_year[1] ->>>>>>> 696f931678 (fix: consider account freeze date in recalculate_amount_difference_field patch) + try: + fiscal_year = get_fiscal_year(frappe.utils.datetime.date.today()) + except Exception: + return + else: + if fiscal_year and getdate(fiscal_year[1]) > getdate(posting_date): + posting_date = fiscal_year[1] + query = query.where(parent.posting_date > posting_date) if result := query.run(as_dict=True): From 34f03d608ad329f33892e8739fa3143db4bd4149 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Sat, 8 Mar 2025 11:31:33 +0530 Subject: [PATCH 1366/1614] fix: consider account freeze date in recalculate_amount_difference_field patch (cherry picked from commit 696f931678d955fcc6b87d689343b2900f7ba9ca) # Conflicts: # erpnext/patches/v15_0/recalculate_amount_difference_field.py (cherry picked from commit 8b67527900df9ea6279451bc887eef7d88ac4f60) --- .../v15_0/recalculate_amount_difference_field.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/erpnext/patches/v15_0/recalculate_amount_difference_field.py b/erpnext/patches/v15_0/recalculate_amount_difference_field.py index 7d3d957fe62..e4e1add6949 100644 --- a/erpnext/patches/v15_0/recalculate_amount_difference_field.py +++ b/erpnext/patches/v15_0/recalculate_amount_difference_field.py @@ -62,6 +62,7 @@ def execute(): ): posting_date = period_closing_voucher[0].period_end_date +<<<<<<< HEAD try: fiscal_year = get_fiscal_year(frappe.utils.datetime.date.today()) except Exception: @@ -69,6 +70,15 @@ def execute(): else: if fiscal_year and getdate(fiscal_year[1]) > getdate(posting_date): posting_date = fiscal_year[1] +======= + acc_frozen_upto = frappe.db.get_single_value("Accounts Settings", "acc_frozen_upto") + if acc_frozen_upto and getdate(acc_frozen_upto) > getdate(posting_date): + posting_date = acc_frozen_upto + + fiscal_year = get_fiscal_year(frappe.utils.datetime.date.today(), raise_on_missing=False) + if fiscal_year and getdate(fiscal_year[1]) > getdate(posting_date): + posting_date = fiscal_year[1] +>>>>>>> 696f931678 (fix: consider account freeze date in recalculate_amount_difference_field patch) query = query.where(parent.posting_date > posting_date) if result := query.run(as_dict=True): From a18721d21c9dd359721a13393e98bcbbff860d37 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Sat, 8 Mar 2025 11:38:28 +0530 Subject: [PATCH 1367/1614] fix: consider stock freeze date in recalculate_amount_difference_field patch (cherry picked from commit cd7253278937f66f2c5b52bebc54f137b03068a7) (cherry picked from commit 8264d42cd9083f71752a303fded52d698d819c57) --- erpnext/patches/v15_0/recalculate_amount_difference_field.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/erpnext/patches/v15_0/recalculate_amount_difference_field.py b/erpnext/patches/v15_0/recalculate_amount_difference_field.py index e4e1add6949..0f8083d8b14 100644 --- a/erpnext/patches/v15_0/recalculate_amount_difference_field.py +++ b/erpnext/patches/v15_0/recalculate_amount_difference_field.py @@ -75,6 +75,10 @@ def execute(): if acc_frozen_upto and getdate(acc_frozen_upto) > getdate(posting_date): posting_date = acc_frozen_upto + stock_frozen_upto = frappe.db.get_single_value("Stock Settings", "stock_frozen_upto") + if stock_frozen_upto and getdate(stock_frozen_upto) > getdate(posting_date): + posting_date = stock_frozen_upto + fiscal_year = get_fiscal_year(frappe.utils.datetime.date.today(), raise_on_missing=False) if fiscal_year and getdate(fiscal_year[1]) > getdate(posting_date): posting_date = fiscal_year[1] From 2b4dfca3ffcf4d0e5103bc833abd8da2dc698432 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Sat, 8 Mar 2025 22:22:12 +0530 Subject: [PATCH 1368/1614] chore: resolve conflicts (cherry picked from commit 985fb5dfdc2cae524b77694fc73859667907449b) --- .../recalculate_amount_difference_field.py | 21 +++++++------------ 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/erpnext/patches/v15_0/recalculate_amount_difference_field.py b/erpnext/patches/v15_0/recalculate_amount_difference_field.py index 0f8083d8b14..2891ac16c44 100644 --- a/erpnext/patches/v15_0/recalculate_amount_difference_field.py +++ b/erpnext/patches/v15_0/recalculate_amount_difference_field.py @@ -62,15 +62,6 @@ def execute(): ): posting_date = period_closing_voucher[0].period_end_date -<<<<<<< HEAD - try: - fiscal_year = get_fiscal_year(frappe.utils.datetime.date.today()) - except Exception: - return - else: - if fiscal_year and getdate(fiscal_year[1]) > getdate(posting_date): - posting_date = fiscal_year[1] -======= acc_frozen_upto = frappe.db.get_single_value("Accounts Settings", "acc_frozen_upto") if acc_frozen_upto and getdate(acc_frozen_upto) > getdate(posting_date): posting_date = acc_frozen_upto @@ -79,10 +70,14 @@ def execute(): if stock_frozen_upto and getdate(stock_frozen_upto) > getdate(posting_date): posting_date = stock_frozen_upto - fiscal_year = get_fiscal_year(frappe.utils.datetime.date.today(), raise_on_missing=False) - if fiscal_year and getdate(fiscal_year[1]) > getdate(posting_date): - posting_date = fiscal_year[1] ->>>>>>> 696f931678 (fix: consider account freeze date in recalculate_amount_difference_field patch) + try: + fiscal_year = get_fiscal_year(frappe.utils.datetime.date.today()) + except Exception: + return + else: + if fiscal_year and getdate(fiscal_year[1]) > getdate(posting_date): + posting_date = fiscal_year[1] + query = query.where(parent.posting_date > posting_date) if result := query.run(as_dict=True): From 47429095a2bc48dc66e5fe091f804ca0dd78010c Mon Sep 17 00:00:00 2001 From: Frappe PR Bot Date: Sun, 9 Mar 2025 11:04:11 +0000 Subject: [PATCH 1369/1614] chore(release): Bumped to Version 15.54.3 ## [15.54.3](https://github.com/frappe/erpnext/compare/v15.54.2...v15.54.3) (2025-03-09) ### Bug Fixes * consider account freeze date in recalculate_amount_difference_field patch ([34f03d6](https://github.com/frappe/erpnext/commit/34f03d608ad329f33892e8739fa3143db4bd4149)) * consider stock freeze date in recalculate_amount_difference_field patch ([a18721d](https://github.com/frappe/erpnext/commit/a18721d21c9dd359721a13393e98bcbbff860d37)) --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 0fac6de7898..a48e84c7257 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from frappe.utils.user import is_website_user -__version__ = "15.54.2" +__version__ = "15.54.3" def get_default_company(user=None): From c2001e9c675795343f2cd03cbe4bda45f2162da9 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Mon, 10 Mar 2025 14:43:15 +0530 Subject: [PATCH 1370/1614] fix: stock balance in and out value (cherry picked from commit e917bd5334ff696a3908494dc8b89e83ab1f7c1a) # Conflicts: # erpnext/stock/report/stock_balance/stock_balance.py --- .../report/stock_balance/stock_balance.py | 164 ++++++++++++++++++ 1 file changed, 164 insertions(+) diff --git a/erpnext/stock/report/stock_balance/stock_balance.py b/erpnext/stock/report/stock_balance/stock_balance.py index 6b5a3661a37..e95c7e58910 100644 --- a/erpnext/stock/report/stock_balance/stock_balance.py +++ b/erpnext/stock/report/stock_balance/stock_balance.py @@ -329,6 +329,170 @@ class StockBalanceReport: self.sle_query = query +<<<<<<< HEAD +======= + def prepare_item_warehouse_map_for_current_period(self): + self.opening_vouchers = self.get_opening_vouchers() + + if self.filters.get("show_stock_ageing_data"): + self.sle_entries = self.sle_query.run(as_dict=True) + + # HACK: This is required to avoid causing db query in flt + _system_settings = frappe.get_cached_doc("System Settings") + with frappe.db.unbuffered_cursor(): + if not self.filters.get("show_stock_ageing_data"): + self.sle_entries = self.sle_query.run(as_dict=True, as_iterator=True) + + for entry in self.sle_entries: + group_by_key = self.get_group_by_key(entry) + if group_by_key not in self.item_warehouse_map: + self.initialize_data(group_by_key, entry) + + self.prepare_item_warehouse_map(entry, group_by_key) + + self.item_warehouse_map = filter_items_with_no_transactions( + self.item_warehouse_map, self.float_precision, self.inventory_dimensions + ) + + def prepare_new_data(self): + if self.filters.get("show_stock_ageing_data"): + self.filters["show_warehouse_wise_stock"] = True + item_wise_fifo_queue = FIFOSlots(self.filters).generate() + + _func = itemgetter(1) + + del self.sle_entries + + sre_details = self.get_sre_reserved_qty_details() + + variant_values = {} + if self.filters.get("show_variant_attributes"): + variant_values = self.get_variant_values_for() + + for _key, report_data in self.item_warehouse_map.items(): + if variant_data := variant_values.get(report_data.item_code): + report_data.update(variant_data) + + if self.filters.get("show_stock_ageing_data"): + opening_fifo_queue = self.get_opening_fifo_queue(report_data) or [] + + fifo_queue = [] + if fifo_queue := item_wise_fifo_queue.get((report_data.item_code, report_data.warehouse)): + fifo_queue = fifo_queue.get("fifo_queue") + + if fifo_queue: + opening_fifo_queue.extend(fifo_queue) + + stock_ageing_data = {"average_age": 0, "earliest_age": 0, "latest_age": 0} + + if opening_fifo_queue: + fifo_queue = sorted(filter(_func, opening_fifo_queue), key=_func) + if not fifo_queue: + continue + + to_date = self.to_date + stock_ageing_data["average_age"] = get_average_age(fifo_queue, to_date) + stock_ageing_data["earliest_age"] = date_diff(to_date, fifo_queue[0][1]) + stock_ageing_data["latest_age"] = date_diff(to_date, fifo_queue[-1][1]) + stock_ageing_data["fifo_queue"] = fifo_queue + + report_data.update(stock_ageing_data) + + report_data.update( + {"reserved_stock": sre_details.get((report_data.item_code, report_data.warehouse), 0.0)} + ) + + if ( + not self.filters.get("include_zero_stock_items") + and report_data + and report_data.bal_qty == 0 + and report_data.bal_val == 0 + ): + continue + + self.data.append(report_data) + + def get_sre_reserved_qty_details(self) -> dict: + from erpnext.stock.doctype.stock_reservation_entry.stock_reservation_entry import ( + get_sre_reserved_qty_for_items_and_warehouses as get_reserved_qty_details, + ) + + item_code_list, warehouse_list = [], [] + for d in self.item_warehouse_map: + item_code_list.append(d[0]) + warehouse_list.append(d[1]) + + return get_reserved_qty_details(item_code_list, warehouse_list) + + def prepare_item_warehouse_map(self, entry, group_by_key): + qty_dict = self.item_warehouse_map[group_by_key] + for field in self.inventory_dimensions: + qty_dict[field] = entry.get(field) + + if entry.voucher_type == "Stock Reconciliation" and (not entry.batch_no or entry.serial_no): + qty_diff = flt(entry.qty_after_transaction) - flt(qty_dict.bal_qty) + else: + qty_diff = flt(entry.actual_qty) + + value_diff = flt(entry.stock_value_difference) + + if entry.posting_date < self.from_date or entry.voucher_no in self.opening_vouchers.get( + entry.voucher_type, [] + ): + qty_dict.opening_qty += qty_diff + qty_dict.opening_val += value_diff + + elif entry.posting_date >= self.from_date and entry.posting_date <= self.to_date: + if flt(qty_diff, self.float_precision) >= 0: + qty_dict.in_qty += qty_diff + else: + qty_dict.out_qty += abs(qty_diff) + + if flt(value_diff, self.float_precision) >= 0: + qty_dict.in_val += value_diff + else: + qty_dict.out_val += abs(value_diff) + + qty_dict.val_rate = entry.valuation_rate + qty_dict.bal_qty += qty_diff + qty_dict.bal_val += value_diff + + def initialize_data(self, group_by_key, entry): + self.item_warehouse_map[group_by_key] = frappe._dict( + { + "item_code": entry.item_code, + "warehouse": entry.warehouse, + "item_group": entry.item_group, + "company": entry.company, + "currency": self.company_currency, + "stock_uom": entry.stock_uom, + "item_name": entry.item_name, + "opening_qty": 0.0, + "opening_val": 0.0, + "opening_fifo_queue": [], + "in_qty": 0.0, + "in_val": 0.0, + "out_qty": 0.0, + "out_val": 0.0, + "bal_qty": 0.0, + "bal_val": 0.0, + "val_rate": 0.0, + } + ) + + def get_group_by_key(self, row) -> tuple: + group_by_key = [row.item_code, row.warehouse] + + for fieldname in self.inventory_dimensions: + if not row.get(fieldname): + continue + + if self.filters.get(fieldname) or self.filters.get("show_dimension_wise_stock"): + group_by_key.append(row.get(fieldname)) + + return tuple(group_by_key) + +>>>>>>> e917bd5334 (fix: stock balance in and out value) def apply_inventory_dimensions_filters(self, query, sle) -> str: inventory_dimension_fields = self.get_inventory_dimension_fields() if inventory_dimension_fields: From b6106212c1470ded73cec524d7baccd72cc9f388 Mon Sep 17 00:00:00 2001 From: mahsem <137205921+mahsem@users.noreply.github.com> Date: Sun, 9 Mar 2025 11:11:54 +0100 Subject: [PATCH 1371/1614] fix: typo in sales_invoice_print (cherry picked from commit f7bcae83e48f44cc2a9b5b735f8cd2d2a04f1e95) --- .../print_format/sales_invoice_print/sales_invoice_print.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/print_format/sales_invoice_print/sales_invoice_print.html b/erpnext/accounts/print_format/sales_invoice_print/sales_invoice_print.html index 958c5c10fc1..2204e3559b1 100644 --- a/erpnext/accounts/print_format/sales_invoice_print/sales_invoice_print.html +++ b/erpnext/accounts/print_format/sales_invoice_print/sales_invoice_print.html @@ -52,7 +52,7 @@ {{ doc.address_display }}
- {{ _("Conatct: ")+doc.contact_display if doc.contact_display else '' }} + {{ _("Contact: ")+doc.contact_display if doc.contact_display else '' }}
{{ _("Mobile: ")+doc.contact_mobile if doc.contact_mobile else '' }} From 043539fcdbe98146ac11d09570279a9f445ed2ae Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Mon, 10 Mar 2025 17:37:29 +0530 Subject: [PATCH 1372/1614] chore: fix conflicts --- .../report/stock_balance/stock_balance.py | 169 +----------------- 1 file changed, 4 insertions(+), 165 deletions(-) diff --git a/erpnext/stock/report/stock_balance/stock_balance.py b/erpnext/stock/report/stock_balance/stock_balance.py index e95c7e58910..2153b1d73b3 100644 --- a/erpnext/stock/report/stock_balance/stock_balance.py +++ b/erpnext/stock/report/stock_balance/stock_balance.py @@ -214,9 +214,12 @@ class StockBalanceReport: elif entry.posting_date >= self.from_date and entry.posting_date <= self.to_date: if flt(qty_diff, self.float_precision) >= 0: qty_dict.in_qty += qty_diff - qty_dict.in_val += value_diff else: qty_dict.out_qty += abs(qty_diff) + + if flt(value_diff, self.float_precision) >= 0: + qty_dict.in_val += value_diff + else: qty_dict.out_val += abs(value_diff) qty_dict.val_rate = entry.valuation_rate @@ -329,170 +332,6 @@ class StockBalanceReport: self.sle_query = query -<<<<<<< HEAD -======= - def prepare_item_warehouse_map_for_current_period(self): - self.opening_vouchers = self.get_opening_vouchers() - - if self.filters.get("show_stock_ageing_data"): - self.sle_entries = self.sle_query.run(as_dict=True) - - # HACK: This is required to avoid causing db query in flt - _system_settings = frappe.get_cached_doc("System Settings") - with frappe.db.unbuffered_cursor(): - if not self.filters.get("show_stock_ageing_data"): - self.sle_entries = self.sle_query.run(as_dict=True, as_iterator=True) - - for entry in self.sle_entries: - group_by_key = self.get_group_by_key(entry) - if group_by_key not in self.item_warehouse_map: - self.initialize_data(group_by_key, entry) - - self.prepare_item_warehouse_map(entry, group_by_key) - - self.item_warehouse_map = filter_items_with_no_transactions( - self.item_warehouse_map, self.float_precision, self.inventory_dimensions - ) - - def prepare_new_data(self): - if self.filters.get("show_stock_ageing_data"): - self.filters["show_warehouse_wise_stock"] = True - item_wise_fifo_queue = FIFOSlots(self.filters).generate() - - _func = itemgetter(1) - - del self.sle_entries - - sre_details = self.get_sre_reserved_qty_details() - - variant_values = {} - if self.filters.get("show_variant_attributes"): - variant_values = self.get_variant_values_for() - - for _key, report_data in self.item_warehouse_map.items(): - if variant_data := variant_values.get(report_data.item_code): - report_data.update(variant_data) - - if self.filters.get("show_stock_ageing_data"): - opening_fifo_queue = self.get_opening_fifo_queue(report_data) or [] - - fifo_queue = [] - if fifo_queue := item_wise_fifo_queue.get((report_data.item_code, report_data.warehouse)): - fifo_queue = fifo_queue.get("fifo_queue") - - if fifo_queue: - opening_fifo_queue.extend(fifo_queue) - - stock_ageing_data = {"average_age": 0, "earliest_age": 0, "latest_age": 0} - - if opening_fifo_queue: - fifo_queue = sorted(filter(_func, opening_fifo_queue), key=_func) - if not fifo_queue: - continue - - to_date = self.to_date - stock_ageing_data["average_age"] = get_average_age(fifo_queue, to_date) - stock_ageing_data["earliest_age"] = date_diff(to_date, fifo_queue[0][1]) - stock_ageing_data["latest_age"] = date_diff(to_date, fifo_queue[-1][1]) - stock_ageing_data["fifo_queue"] = fifo_queue - - report_data.update(stock_ageing_data) - - report_data.update( - {"reserved_stock": sre_details.get((report_data.item_code, report_data.warehouse), 0.0)} - ) - - if ( - not self.filters.get("include_zero_stock_items") - and report_data - and report_data.bal_qty == 0 - and report_data.bal_val == 0 - ): - continue - - self.data.append(report_data) - - def get_sre_reserved_qty_details(self) -> dict: - from erpnext.stock.doctype.stock_reservation_entry.stock_reservation_entry import ( - get_sre_reserved_qty_for_items_and_warehouses as get_reserved_qty_details, - ) - - item_code_list, warehouse_list = [], [] - for d in self.item_warehouse_map: - item_code_list.append(d[0]) - warehouse_list.append(d[1]) - - return get_reserved_qty_details(item_code_list, warehouse_list) - - def prepare_item_warehouse_map(self, entry, group_by_key): - qty_dict = self.item_warehouse_map[group_by_key] - for field in self.inventory_dimensions: - qty_dict[field] = entry.get(field) - - if entry.voucher_type == "Stock Reconciliation" and (not entry.batch_no or entry.serial_no): - qty_diff = flt(entry.qty_after_transaction) - flt(qty_dict.bal_qty) - else: - qty_diff = flt(entry.actual_qty) - - value_diff = flt(entry.stock_value_difference) - - if entry.posting_date < self.from_date or entry.voucher_no in self.opening_vouchers.get( - entry.voucher_type, [] - ): - qty_dict.opening_qty += qty_diff - qty_dict.opening_val += value_diff - - elif entry.posting_date >= self.from_date and entry.posting_date <= self.to_date: - if flt(qty_diff, self.float_precision) >= 0: - qty_dict.in_qty += qty_diff - else: - qty_dict.out_qty += abs(qty_diff) - - if flt(value_diff, self.float_precision) >= 0: - qty_dict.in_val += value_diff - else: - qty_dict.out_val += abs(value_diff) - - qty_dict.val_rate = entry.valuation_rate - qty_dict.bal_qty += qty_diff - qty_dict.bal_val += value_diff - - def initialize_data(self, group_by_key, entry): - self.item_warehouse_map[group_by_key] = frappe._dict( - { - "item_code": entry.item_code, - "warehouse": entry.warehouse, - "item_group": entry.item_group, - "company": entry.company, - "currency": self.company_currency, - "stock_uom": entry.stock_uom, - "item_name": entry.item_name, - "opening_qty": 0.0, - "opening_val": 0.0, - "opening_fifo_queue": [], - "in_qty": 0.0, - "in_val": 0.0, - "out_qty": 0.0, - "out_val": 0.0, - "bal_qty": 0.0, - "bal_val": 0.0, - "val_rate": 0.0, - } - ) - - def get_group_by_key(self, row) -> tuple: - group_by_key = [row.item_code, row.warehouse] - - for fieldname in self.inventory_dimensions: - if not row.get(fieldname): - continue - - if self.filters.get(fieldname) or self.filters.get("show_dimension_wise_stock"): - group_by_key.append(row.get(fieldname)) - - return tuple(group_by_key) - ->>>>>>> e917bd5334 (fix: stock balance in and out value) def apply_inventory_dimensions_filters(self, query, sle) -> str: inventory_dimension_fields = self.get_inventory_dimension_fields() if inventory_dimension_fields: From 9c703765a1b6d0ccdfbe95f28667d20e3c6c53e9 Mon Sep 17 00:00:00 2001 From: Raffael Meyer <14891507+barredterra@users.noreply.github.com> Date: Mon, 10 Mar 2025 14:32:19 +0100 Subject: [PATCH 1373/1614] fix: backport translations from develop (#46428) --- erpnext/translations/ar.csv | 112 ++ erpnext/translations/de.csv | 17 + erpnext/translations/es.csv | 39 + erpnext/translations/fa.csv | 100 ++ erpnext/translations/fr.csv | 256 +++ erpnext/translations/hu.csv | 7 + erpnext/translations/pl.csv | 1 + erpnext/translations/ru.csv | 6 + erpnext/translations/sv.csv | 146 ++ erpnext/translations/tr.csv | 2797 ++++++++++++++++++++++++++++++++ erpnext/translations/zh-TW.csv | 1864 +++++++++++++++++++++ erpnext/translations/zh.csv | 45 + 12 files changed, 5390 insertions(+) diff --git a/erpnext/translations/ar.csv b/erpnext/translations/ar.csv index a0825e906be..c8bb98a0660 100644 --- a/erpnext/translations/ar.csv +++ b/erpnext/translations/ar.csv @@ -8743,3 +8743,115 @@ WhatsApp,ال WhatsApp, Make a call,إجراء مكالمة, Approve,وافق, Reject,رفض, +% Returned,% تم إرجاعه, +About Us Settings,إعدادات صفحة من نحن, +About {0} minute remaining,حوالي {0} دقيقة متبقية, +About {0} minutes remaining,حوالي {0} دقائق متبقية, +About {0} seconds remaining,حوالي {0} ثانية متبقية, +Actual Qty in Warehouse,الكمية الفعلية في المستودع, +Added By,أضيف من قبل, +Additional Asset Cost,تكلفة الأصول الإضافية, +Additional Cost Per Qty,التكلفة الإضافية لكل كمية, +Ageing Range,مدى العمر, +Allow,السماح, +Allowed,سمح, +Assignment,مهمة, +Auto Email Report,ارسال التقارير عبر البريد الالكتروني الياً, +Auto Name,الإسم التلقائي, +Bulk Update,تحديث بالجمله, +CC,نسخة, +Category Details,تفاصيل التصنيف, +Company Details,تفاصيل الشركة, +Contact Details,تفاصيل الاتصال, +Contact Us Settings,إعدادات الاتصال بنا, +Convert to Group,تحويل إلى تصنيف (مجموعة),Warehouse +Count,عد, +Created On,منشئه في, +Custom,مخصص, +Dashboard,لوحة القيادة, +Delayed,مؤجل, +Deleted Documents,المستندات المحذوفة, +Domain Settings,إعدادات النطاق, +Don't Send Emails,لا ترسل رسائل البريد الإلكتروني, +Download Backups,تحميل النسخ الاحتياطية, +Email Domain,المجال البريد الإلكتروني, +Event,حدث, +Export Data,تصدير البيانات, +Export Errored Rows,تصدير الصفوف الخطأ, +Failure,بالفشل, +Filter,منقي, +Forecast,توقعات, +General Ledger,دفتر الأستاذ العام,Warehouse +Go to {0} List,انتقل إلى قائمة {0}, +Group Same Items,تجميع العناصر المتشابهة, +Half-yearly,نصف سنوي, +Heatmap,خريطة الحرارة, +Import File,استيراد ملف, +Import File Errors and Warnings,استيراد ملف الأخطاء والتحذيرات, +Import Log Preview,استيراد سجل معاينة, +Import Preview,استيراد معاينة, +Import Progress,استيراد التقدم, +Import Type,نوع الاستيراد, +Import Warnings,استيراد تحذيرات, +Import from Google Sheets,استيراد من جداول بيانات Google, +"Importing {0} of {1}, {2}",استيراد {0} من {1} ، {2}, +Insert New Records,أدخل سجلات جديدة, +Invalid,غير صالحة, +Is Standard,هو معيار, +Item {0} does not exist.,العنصر {0} غير موجود\n
\nItem {0} does not exist., +Key,مفتاح, +Leaderboard,المتصدرين, +Length,طول, +Links,الروابط, +Loading import file...,جارٍ تحميل ملف الاستيراد ..., +Mandatory Depends On,إلزامي يعتمد على, +Meeting,لقاء, +Minimum Value,الحد الأدنى, +Modified By,عدل من قبل, +New Event,حدث جديد, +Newsletter,النشرة الإخبارية, +Notification,إعلام, +Notification Settings,إعدادات الإشعار, +Off,إيقاف, +Parent Document,المستند الأب, +Partial Success,نجاح جزئي, +Pay,دفع,Amount +Please set filters,يرجى تعيين المرشحات, +Print Format Builder,منشئ تنسيق الطباعة, +Print Style,الطباعة ستايل, +Printing,طبع, +Progress,تقدم, +Rate of Depreciation (%),معدل الاستهلاك (%), +Reference DocType,مرجع DOCTYPE, +Refresh Google Sheet,قم بتحديث ورقة Google, +Rejected ,مرفوض , +Report Filters,مرشحات تقرير, +Retry,إعادة المحاولة, +Returned,تم إرجاعه, +SMS Settings,SMS إعدادات, +Section,الجزء, +Send Attached Files,إرسال الملفات المرفقة, +Set Quantity,ضبط الكمية, +Show Failed Logs,إظهار السجلات الفاشلة, +Start Import,بدء الاستيراد, +Submit After Import,إرسال بعد الاستيراد, +System Settings,إعدادات النظام, +Template Options,خيارات القالب, +Template Warnings,تحذيرات القالب, +The Condition '{0}' is invalid,الشرط '{0}' غير صالح, +Time in mins,الوقت بالدقائق, +Unit of Measure (UOM),وحدة القياس, +Update Existing Records,تحديث السجلات الموجودة, +"Updating {0} of {1}, {2}",تحديث {0} من {1} ، {2}, +Value Change,قيمة التغير, +Version,الإصدار, +Watch Video,شاهد الفيديو, +Website Script,نص الموقع البرمجي, +Website Theme,شكل الموقع, +Workflow,سير العمل, +Workflow Action,إجراء سير العمل, +Workflow State,حالة سير العمل, +{0} and {1},{0} و {1}, +{} Available,{} متاح, +{} Assigned,{} تم تحديد المهمة, +{} Available,{} متاح, diff --git a/erpnext/translations/de.csv b/erpnext/translations/de.csv index aa8d7322958..a093970cbdb 100644 --- a/erpnext/translations/de.csv +++ b/erpnext/translations/de.csv @@ -12111,3 +12111,20 @@ subscription is already cancelled.,abonnement ist bereits storniert., {0} cannot be zero,{0} kann nicht Null sein, {0} is already running for {1},{0} läuft bereits für {1}, {0} units of Item {1} is not available in any of the warehouses.,{0} Einheiten des Artikels {1} sind in keinem der Lager verfügbar., +Cannot {0} from {1} without any negative outstanding invoice,Kann nicht {0} von {1} ohne negative ausstehende Rechnung, +Common Code,Gemeinsamer Code, +Event,Ereignis, +Forecast,Prognose, +"If Enabled - Reconciliation happens on the Advance Payment posting date
+If Disabled - Reconciliation happens on oldest of 2 Dates: Invoice Date or the Advance Payment posting date
+","Falls aktiviert - erfolgt der Abgleich am Buchungsdatum der Vorauszahlung
+Falls deaktiviert - erfolgt der Abgleich am ältesten von 2 Daten: Rechnungsdatum oder Buchungsdatum der Vorauszahlung
+", +Pay,Zahlen,Amount +Please set '{0}' in Company: {1},Bitte stellen Sie '{0}' in Unternehmen ein: {1}, +Price is not set for the item.,Für den Artikel ist kein Preis festgelegt., +Rate of Depreciation (%),Abschreibungssatz (%), +Rejected ,Abgelehnt , +Row #{0}: Allocated Amount cannot be greater than Outstanding Amount of Payment Request {1},Zeile #{0}: Der zugewiesene Betrag kann nicht größer sein als der ausstehende Betrag der Zahlungsanforderung {1}, +Section,Sektion, +Sending...,Senden..., diff --git a/erpnext/translations/es.csv b/erpnext/translations/es.csv index dcb95fe5466..0f6b0ed7f84 100644 --- a/erpnext/translations/es.csv +++ b/erpnext/translations/es.csv @@ -11268,3 +11268,42 @@ variance,variación, {} Open,{} Abierto, {} {} is already linked with another {},{} {} ya está vinculado con otro {}, {} {} is already linked with {} {},{} {} ya está vinculado con {} {}, +"'Inspection Required before Delivery' has disabled for the item {0}, no need to create the QI","'Inspección requerida antes de la entrega' se ha desactivado para el artículo {0}, no es necesario crear el QI", +"'Inspection Required before Purchase' has disabled for the item {0}, no need to create the QI","'Inspección requerida antes de la compra' se ha desactivado para el artículo {0}, no es necesario crear el QI", +Additional Data,Datos Adicionales, +Advance Payment Ledger Entry,Asiento contable de pago anticipado, +Amounts,Importes, +Another Payment Request is already processed,Ya se ha tramitado otra solicitud de pago, +Applies To,Se aplica a, +At least one account with exchange gain or loss is required,Se requiere al menos una cuenta con ganancias o pérdidas por cambio, +Cannot {0} from {1} without any negative outstanding invoice,No se puede {0} desde {1} sin ninguna factura pendiente negativa, +Common Code,Código común, +Dates,Fechas, +Dimensions,Dimensiones, +Discount cannot be greater than 100%.,El descuento no puede ser superior al 100%., +Event,Evento, +Filter,Filtrar, +Forecast,Pronóstico, +Pay,Pagar,Amount +Publisher,Publicador, +Rate of Depreciation (%),Tasa de depreciación (%), +Rejected ,Rechazado , +Row #{0}: Quality Inspection is required for Item {1},Fila #{0}: Se requiere inspección de calidad para el artículo {1}, +Row #{0}: Quality Inspection {1} is not submitted for the item: {2},Fila #{0}: La inspección de calidad {1} no se ha validado para el artículo: {2}, +Row #{0}: Quality Inspection {1} was rejected for item {2},Fila #{0}: La inspección de calidad {1} fue rechazada para el artículo {2}, +Sales Person {0} is disabled.,Vendedor {0} está desactivado., +Secondary Party,Tercero secundario, +Section,Sección, +"Select Date of joining. It will have impact on the first salary calculation, Leave allocation on pro-rata bases.",Seleccione la fecha de incorporación. Esto tendrá un impacto en el cálculo del primer salario y en la asignación de permisos de manera prorrateada., +"Select the Item to be manufactured. The Item name, UoM, Company, and Currency will be fetched automatically.","Seleccione el artículo a fabricar. El nombre del artículo, la UdM, la empresa y la moneda se obtendrán automáticamente.", +Sending...,Enviando..., +Show Net Values in Party Account,Mostrar valores netos en la cuenta de la entidad, +Start Date should be lower than End Date,La fecha de inicio debe ser menor a la fecha final, +There is already a valid Lower Deduction Certificate {0} for Supplier {1} against category {2} for this time period.,Ya existe un certificado de deducción inferior válido {0} para el proveedor {1} contra la categoría {2} para este período., +This item filter has already been applied for the {0},El filtro ya se había usado para el tipo {0}, +Total Other Charges,Total de otros cargos, +Total Outgoing Bills,Total de Facturas Salientes, +Total Outgoing Payment,Pago Total Saliente, +Transferring cannot be done to an Employee. Please enter location where Asset {0} has to be transferred,"La transferencia no puede realizarse a un empleado. Por favor, introduzca la ubicación a la que debe transferirse el activo {0}", +Validate Stock on Save,Validar Stock al Guardar, +Version,Versión, diff --git a/erpnext/translations/fa.csv b/erpnext/translations/fa.csv index f65226bf761..f126b472da5 100644 --- a/erpnext/translations/fa.csv +++ b/erpnext/translations/fa.csv @@ -11275,3 +11275,103 @@ will be,خواهد بود, {} is a child company.,{} یک شرکت فرزند است., {} {} is already linked with another {},{} {} قبلاً با {} دیگری پیوند شده است, {} {} is already linked with {} {},{} {} قبلاً با {} {} پیوند داده شده است, +"'Inspection Required before Delivery' has disabled for the item {0}, no need to create the QI",«بازرسی قبل از تحویل لازم است» برای آیتم {0} غیرفعال شده است، نیازی به ایجاد QI نیست, +"'Inspection Required before Purchase' has disabled for the item {0}, no need to create the QI",«بازرسی قبل از خرید لازم است» برای آیتم {0} غیرفعال شده است، نیازی به ایجاد QI نیست, +Additional Data,اطلاعات بیشتر, +Advance Payment Date,تاریخ پیش پرداخت, +Advance Payment Ledger Entry,ثبت دفتر پیش پرداخت, +Amounts,مبالغ, +Another Payment Request is already processed,درخواست پرداخت دیگری در حال حاضر پردازش شده است, +Applies To,اعمال می شود به, +Build Tree,ساختار درختی را بساز, +Canonical URI,آدرس کانونیکال, +Checked On,بررسی شد در, +Cheques and Deposits Incorrectly cleared,چک ها و سپرده ها به اشتباه پاک شدند, +Code List,لیست کد, +Columns are not according to template. Please compare the uploaded file with standard template,ستون ها مطابق با الگو نیستند. لطفا فایل آپلود شده را با قالب استاندارد مقایسه کنید, +Company Contact Person,شخص تماس شرکت, +Complete Order,تکمیل سفارش, +Create Journal Entries,ایجاد ثبت دفتر روزنامه, +Create Workstation,ایجاد ایستگاه کاری, +Create a variant with the template image.,ایجاد یک گونه با تصویر قالب., +Create in Draft Status,ایجاد در وضعیت پیش‌نویس, +Creating Journal Entries...,در حال ایجاد ثبت دفتر روزنامه..., +Custom delimiters,جداکننده‌های سفارشی, +Dates,تاریخ‌ها, +Default Common Code,کد مشترک پیش فرض, +Dimensions,ابعاد, +Discount cannot be greater than 100%.,تخفیف نمی تواند بیشتر از 100٪ باشد., +Do you still want to enable negative inventory?,آیا همچنان می خواهید موجودی منفی را فعال کنید؟, +Download PDF for Supplier,دانلود PDF برای تامین کننده, +Dynamic Condition,شروط متغیر, +Email Receipt,رسید ایمیل, +Event,رویداد, +Filter,فیلتر, +Forecast,پیش بینی, +From Date is mandatory,از تاریخ اجباری است, +From Date: {0} cannot be greater than To date: {1},از تاریخ: {0} نمی تواند بیشتر از تا تاریخ: {1} باشد, +Generated,تولید شده, +Get Raw Materials Cost from Consumption Entry,دریافت هزینه مواد اولیه از ثبت مصرف, +Ignore System Generated Credit / Debit Notes,نادیده گرفتن یادداشت های بستانکاری / بدهکاری ایجاد شده توسط سیستم, +Impairment,اختلال, +Include Closed Orders,شامل سفارش‌های بسته شده, +Incorrect Reference Document (Purchase Receipt Item),سند مرجع نادرست (آیتم رسید خرید), +Invalid Amount,مبلغ نامعتبر, +Invalid Discount,تخفیف نامعتبر, +Job Cards,کارت کارها, +Job Worker,پیمانکار, +Job Worker Address,آدرس پیمانکار, +Job Worker Address Details,جرئیات آدرس پیمانکار, +Job Worker Contact,تماس پیمانکار, +Job Worker Delivery Note,یادداشت تحویل پیمانکار, +Job Worker Name,نام پیمانکار, +Job Worker Warehouse,انبار پیمانکار, +Missing Item,آیتم جا افتاده, +No recent transactions found,هیچ تراکنش اخیری یافت نشد, +Order Date,تاریخ سفارش, +Parent Row No not found for {0},شماره ردیف والد برای {0} یافت نشد, +Pay,پرداخت,Amount +Payment Request created from Sales Order or Purchase Order will be in Draft status. When disabled document will be in unsaved state.,درخواست پرداخت ایجاد شده از سفارش فروش یا سفارش خرید در وضعیت پیش‌نویس خواهد بود. وقتی غیرفعال شود، سند در حالت ذخیره نشده خواهد بود., +Plant Dashboard,داشبورد کارخانه, +Plant Floor,سالن کارخانه, +Please mention '{0}' in Company: {1},"لطفاً ""{0}"" را در شرکت: {1} ذکر کنید", +Please set '{0}' in Company: {1},"لطفاً ""{0}"" را در شرکت: {1} تنظیم کنید", +Preview Required Materials,پیش نمایش مواد مورد نیاز, +Price is not set for the item.,قیمت برای آیتم تعیین نشده است., +Publisher,ناشر, +Publisher ID,شناسه ناشر, +Qty (Company),مقدار (شرکت), +Qty (Warehouse),مقدار (انبار), +Qty Wise Chart,نمودار بر اساس مقدار, +Quantity (A - B),مقدار (A - B), +Queue Size should be between 5 and 100,اندازه صف باید بین 5 تا 100 باشد, +Rate of Depreciation (%),نرخ استهلاک (%), +Rebuilding BTree for period ...,بازسازی BTree برای دوره ..., +Recent Transactions,تراکنش های اخیر, +Rejected ,رد شده , +Reset Raw Materials Table,بازنشانی جدول مواد اولیه, +Resume Timer,ادامه زمان‌سنج, +Right Child,فرزند راست, +Root,ریشه, +Round Off for Opening,گرد کردن برای افتتاحیه, +Row {0}: Quantity cannot be negative.,ردیف {0}: مقدار نمی تواند منفی باشد., +SO Total Qty,مقدار کل س.ف, +Sales Incoming Rate,نرخ ورودی فروش, +Section,بخش, +Select Job Worker Address,انتخاب آدرس پیمانکار, +"Select whether to get items from a Sales Order or a Material Request. For now select Sales Order. + A Production Plan can also be created manually where you can select the Items to manufacture.","انتخاب کنید که آیا آیتم‌ها را از یک سفارش فروش یا یک درخواست مواد دریافت کنید. در حال حاضر سفارش فروشرا انتخاب کنید. + همچنین می توان یک برنامه تولید به صورت دستی ایجاد کرد که در آن می توانید آیتم‌هایی را برای تولید انتخاب کنید.", +Sending...,در حال ارسال..., +"Serial No {0} is not present in the {1} {2}, hence you can't return it against the {1} {2}",شماره سریال {0} در {1} {2} وجود ندارد، بنابراین نمی توانید آن را در برابر {1} {2} برگردانید, +Start Timer,آغاز زمان‌سنج, +Stock and Manufacturing,موجودی و تولید, +Subcontracted Quantity,مقدار قرارداد فرعی شده, +This PO has been fully subcontracted.,این سفارش خرید به طور کامل قرارداد فرعی شده است., +This value shall be used when no matching Common Code for a record is found.,این مقدار باید زمانی استفاده شود که هیچ کد مشترک منطبقی برای یک رکورد پیدا نشود., +Valuation (I - K),ارزش گذاری (I - K), +Value (G - D),مقدار (G - D), +Value of Scrapped Asset,ارزش دارایی اسقاط شده, +Version,نسخه, +You are importing data for the code list:,شما در حال درون‌برد داده ها برای لیست کد هستید:, +You can add the original invoice {} manually to proceed.,برای ادامه می توانید فاکتور اصلی {} را به صورت دستی اضافه کنید., diff --git a/erpnext/translations/fr.csv b/erpnext/translations/fr.csv index 7e224113787..f165d359963 100644 --- a/erpnext/translations/fr.csv +++ b/erpnext/translations/fr.csv @@ -8914,3 +8914,259 @@ Sales Update Frequency in Company and Project,Fréquence de mise à jour des ven Transaction Settings,Paramètres des transactions, Subcontracting Settings,Paramètres de sous-traitance, Users with this role are allowed to over bill above the allowance percentage,Les utilisateurs avec ce rôle sont autorisés à sur-facturer au delà du pourcentage de tolérance, + Address, Adresse, + Amount, Montant, + Name, Nom, + Rate, Prix, + Summary, Résumé, +% Picked,% choisi, +% Process Loss,% de perte de processus, +% Returned,% retourné, +'Allow Multiple Sales Orders Against a Customer's Purchase Order',Autoriser les commandes multiples contre un bon de commande du client', +'To Package No.' cannot be less than 'From Package No.','Au numéro du paquet' ne peut pas être inférieur à 'À partir du paquet N°'., +(A) Qty After Transaction,(A) Quantité après la transaction, +(B) Expected Qty After Transaction,(B) Quantité attendue après la transaction, +(C) Total Qty in Queue,(C) Qté totale dans la file d'attente, +(C) Total qty in queue,(C) Quantité totale en file d'attente, +(D) Balance Stock Value,(D) Valeur du solde du stock, +(E) Balance Stock Value in Queue,(E) Solde de la valeur de stock dans la file d'attente, +(F) Change in Stock Value,(F) Changement de la valeur du stock, +(G) Sum of Change in Stock Value,(G) Somme de la variation de la valeur du stock, +(H) Change in Stock Value (FIFO Queue),(H) Changement de la valeur du stock (file d’attente IFO), +(H) Valuation Rate,(H) Taux d'évaluation, +(I) Valuation Rate,(I) Taux d'évaluation, +(J) Valuation Rate as per FIFO,(J) Taux d'évaluation selon la FIFO, +(K) Valuation = Value (D) ÷ Qty (A),(K) Évaluation = Valeur (D) ÷ Qty (A), +0-30 Days,0-30 jours, +3 Yearly,3 Annuel, +"
+

Note

+
    +
  • +You can use Jinja tags in Subject and Body fields for dynamic values. +
  • + All fields in this doctype are available under the doc object and all fields for the customer to whom the mail will go to is available under the customer object. +
+

Examples

+ +
    +
  • Subject:

    Statement Of Accounts for {{ customer.customer_name }}

  • +
  • Body:

    +
    Hello {{ customer.customer_name }},
    PFA your Statement Of Accounts from {{ doc.from_date }} to {{ doc.to_date }}.
  • +
+","
+

Note

+
    +
  • +Vous pouvez utiliser des tags Jinja dans les éléments Subject et Body pour avoir des valeurs dynamiques. +
  • + Tous les champs dans ce DocType sont disponibles sous l'objet doc et tous les champs pour le client à qui l'email est adressé sont disponibles sous l'objet customer. +
+

Exemples

+ +
    +
  • Subject:

    Relevés de comptes pour {{ customer.customer_name }}

  • +
  • Body:

    +
    Bonjour {{ customer.customer_name }},
    Vous trouverez en pièce-jointe vos relevés de comptes du {{ doc.from_date }} au {{ doc.to_date }}.
  • +
+", +"
Other Details
","
Autres détails
", +"
No Matching Bank Transactions Found
","
Aucune transaction bancaire correspondante trouvée
", +"
+

All dimensions in centimeter only

+
","
+

Toutes les dimensions doivent être en centimètres

+
", +"

About Product Bundle

+ +

Aggregate group of Items into another Item. This is useful if you are bundling a certain Items into a package and you maintain stock of the packed Items and not the aggregate Item.

+

The package Item will have Is Stock Item as No and Is Sales Item as Yes.

+

Example:

+

If you are selling Laptops and Backpacks separately and have a special price if the customer buys both, then the Laptop + Backpack will be a new Product Bundle Item.

","

À propos du lot de produits

+ +

Constituer un article composé d'autres articles. Utile si vous avez certains articles dans un lot de vente et que vous maintenez un stock individuel de chaque article du lot et non de l'ensemble Article.

+

Le lot Article aura la variable Article de stock sur Non et Article de vente sur Oui.

+

Exemple :

+

Si vous vendez des ordinateurs portables et des sacs à dos séparément et bénéficiez d'un prix spécial si le client achète les deux , l'ordinateur portable + le sac à dos constitueront un nouvel élément du pack de produits.

", +"
Or
","
Ou
", +AWB Number,Numéro AWB, +Abbreviation: {0} must appear only once,Abréviation: {0} ne doit apparaître qu'une seule fois, +About Us Settings,Paramétrages À Propos, +About {0} minute remaining,Il reste environ {0} minute, +About {0} minutes remaining,Il reste environ {0} minutes, +About {0} seconds remaining,Il reste environ {0} secondes, +Acceptance Criteria Formula,Critères d'acceptation de la formule, +Acceptance Criteria Value,Critères d'acceptation valeur, +Accepted Qty in Stock UOM,Quantité acceptée en UOM de Stock, +Access Key,Clé d'accès, +Access Key is required for Service Provider: {0},La clé d'accès est requise pour le fournisseur de service : {0}, +Account Balance (From),Solde du code comptable (depuis le), +Account Balance (To),Solde du compte (À), +Account Closing Balance,Solde de clôture du compte, +Account Currency (From),Devise du cpte client (From), +Account Currency (To),Devise du compte (à), +Account Opening Balance,Solde d'ouverture du compte, +Accounting Dimensions Filter,Filtre de dimensions comptables, +Accounting Entry for {0},Entrée comptable pour {0}, +Accounts Missing Error,Erreur de compte manquant, +Accounts Receivable/Payable,Comptes débiteurs / créditeurs, +Accounts to Merge,Comptes à fusionner, +Action If Same Rate is Not Maintained,Action si le même taux n'est pas maintenu, +Action if Same Rate is Not Maintained Throughout Sales Cycle,Action si le même taux n'est pas maintenu tout au long du cycle de vente, +Active Status,Statut actif, +Actual Qty in Warehouse,Quantité réelle en entrepôt, +Add Serial / Batch No,Ajouter une série / numéro de lot, +Add Serial / Batch No (Rejected Qty),Ajouter numéro de série / numéro de lot (Qté rejetée), +Add Sub Assembly,Ajouter une sous-Ruche, +Add a Note,Ajouter une note, +Add details,Ajouter des détails, +Add to Prospect,Ajouter à Prospect, +Added By,Ajouté par, +Added On,Ajouté le, +Added Supplier Role to User {0}.,Ajout du rôle de fournisseur à l'utilisateur {0}., +Added {1} Role to User {0}.,Ajout du rôle {1} à l'utilisateur {0}., +Adding Lead to Prospect...,Ajout du prospect à Prospect..., +Additional Asset Cost,Coût d'actif supplémentaire, +Additional Cost Per Qty,Coût supplémentaire par quantité, +Additional Info,Infos supplémentaires, +Address And Contacts,Adresse et contacts, +Adjust Asset Value,Ajuster la valeur de l'actif, +Adjustment Against,Ajustement pour, +Adjustment based on Purchase Invoice rate,Ajustement basé sur le taux de la facture d'achat, +Ageing Range,Balance Agée, +Allow,Autoriser, +Allow Purchase,Autoriser à l'achat, +Allow Sales,Autoriser à la vente, +Allowed,Autorisé, +Annual Revenue,CA annuel, +Assignment,Affectation, +Auto Email Report,Rapport par Email Automatique, +Auto Name,Nom Auto, +Billing Address Details,Adresse de facturation (détails), +Bom No,N° Nomenclature, +Bulk Update,Mise à jour en Masse, +Closing,Clôture, +Consolidate Sales Order Items,Consolider les articles de la commande client, +Contact Details,Coordonnées, +Contact Us Settings,Paramètres du Formulaire de Contact, +Convert to Group,Convertir en groupe,Warehouse +Count,Compter, +Created On,Créé Le, +Custom,Personnaliser, +Dashboard,Tableau de bord, +Deal Owner,Resp. de l'opportunité, +Deferred Accounting,Comptabilité différée, +Deferred Accounting Defaults,Paramètres par défaut de comptabilité différée, +Delayed,Différé, +Deleted Documents,Documents Supprimés, +"Discounts to be applied in sequential ranges like buy 1 get 1, buy 2 get 2, buy 3 get 3 and so on","La remise sera appliquée séquentiellement telque : acheter 1 => recupérer 1, acheter 2 => recupérer 2, acheter 3 => recupérer 3, etc...", +Domain Settings,Paramètres de Domaine, +Don't Send Emails,Ne pas envoyer d'emails, +Download Backups,Télécharger les Sauvegardes, +Edit Full Form,Ouvrir le formulaire complet, +Email Domain,Serveur de courriels, +Event,Événement, +Export Data,Exporter des données, +Export Errored Rows,Exporter les lignes erronées, +Failure,Échec, +Filter,Filtre, +Forecast,Prévoir, +From Opportunity,Depuis l'opportunité, +General Ledger,Grand Livre,Warehouse +Go to {0} List,Aller à la liste {0}, +Half-yearly,Semestriel, +Heatmap,Carte de chaleur, +Height (cm),Hauteur (cm), +"If mentioned, the system will allow only the users with this Role to create or modify any stock transaction earlier than the latest stock transaction for a specific item and warehouse. If set as blank, it allows all users to create/edit back-dated transactions.",Les utilisateur de ce role pourront creer et modifier des transactions dans le passé. Si vide tout les utilisateurs pourrons le faire, +Import File,Importer le fichier, +Import File Errors and Warnings,Importer les erreurs de fichier et les avertissements, +Import Log Preview,Importer l'aperçu du journal, +Import Preview,Aperçu d'importation, +Import Progress,Progression de l'importation, +Import Type,Type d'importation, +Import Warnings,Avertissements d'importation, +Import from Google Sheets,Importer depuis Google Sheets, +"Importing {0} of {1}, {2}","Importation de {0} de {1}, {2}", +Indent,Indentation, +Insert New Records,Insérer de nouveaux enregistrements, +Inter Transfer Reference,Référence de transfert interne, +Internal Customer,Client interne, +Internal Supplier,Fournisseur interne, +Invalid,Invalide, +Inventory Settings,Paramétrage de l'inventaire, +Is Standard,Est Standard, +Item {0} does not exist.,Article {0} n'existe pas., +Key,Clé, +Leaderboard,Classement, +Length,Longueur, +Length (cm),Longueur (cm), +Links,Liens, +Loading import file...,Chargement du fichier d'importation ..., +Mandatory Depends On,Obligatoire dépend de, +Meeting,Réunion, +Modified By,Modifié Par, +New Event,Nouvel évènement, +New Task,Nv. Tâche à faire, +No of Employees,Nb de salarié(e)s, +No stock transactions can be created or modified before this date.,Aucune transaction ne peux être créée ou modifié avant cette date., +No. of Employees,Nb de salarié(e)s, +Notification Settings,Paramètres de notification, +Off,De, +Parcel Template,Modèle de colis, +Parcel Template Name,Nom du modèle de colis, +Parcels,Colis, +Partial Success,Succès Partiel, +Pay,Payer,Amount +Please set filters,Veuillez définir des filtres, +Primary Address and Contact,Adresse et contact principal, +Print Format Builder,Éditeur de Format d'Impression, +Print Style,Style d'Impression, +Printing,Impression, +Probability,Probabilité, +Production Plan Qty,Qté du plan de production, +Production Plan Sub-assembly Item,Plan de production de l'article de Sous-assemblage, +Progress,Progression, +Prospect Owner,Resp. du Prospect, +Qualified By,Qualifié par, +Qualified on,Qualifié le, +Rate of Depreciation (%),Taux d'amortissement (%), +Reference DocType,Référence DocType, +Refresh Google Sheet,Actualiser Google Sheet, +Rejected ,Rejeté , +Report Filters,Filtres du Rapport, +Retry,Recommencez, +Returned,retourné, +SMS Settings,Paramètres des SMS, +Sales Order Packed Item,Article emballé pour l'ordre de vente, +Sales Order Reference,Référence de la commande client, +Set Quantity,Définir Quantité, +Show Failed Logs,Afficher les journaux ayant échoué, +Stage,Etape, +Start Import,Démarrer l'import, +Sub Assembly Item Code,Code de l'article de Sous-assemblage, +Sub Assembly Items,Articles de sous-assemblage, +Submit After Import,Validation après importation, +Supplier Address Details,Adresse Fournisseur (détails), +Supplier Primary Address,Adresse fournisseur principal, +Supplier Primary Contact,Contact fournisseur principal, +System Settings,Paramètres Système, +Template Options,Options de modèle, +Template Warnings,Avertissements de modèles, +The Condition '{0}' is invalid,La Condition '{0}' est invalide, +This Warehouse will be auto-updated in the Target Warehouse field of Work Order.,Cet entrepôt sera mis à jour automatiquement dans le champ Entrepôt cible de l'ordre de fabrication., +Update Existing Records,Mettre à jour les enregistrements existants, +"Updating {0} of {1}, {2}","Mise à jour de {0} sur {1}, {2}", +Value Change,Modification de Valeur, +Watch Video,Regarder la vidéo, +Website Script,Script du Site web, +Website Theme,Thème du Site Web, +Weight (kg),Poids (kg), +Width (cm),Largeur (cm), +Workflow,Flux de Travail, +Workflow Action,Action du Flux de Travail, +Workflow State,État du Flux de Travail, +product bundle item row's name in sales order. Also indicates that picked item is to be used for a product bundle,nom de la colonne de l'article du lot de produits dans la commande client. Indique également que l'article sélectionné doit être utilisé pour un lot de produits, +quotation_item,article_devis, +{0} and {1},{0} et {1}, +{} Assigned,{} Attribué, +{} Available,{} Disponible, diff --git a/erpnext/translations/hu.csv b/erpnext/translations/hu.csv index a2a416cf556..c5b6a1db9dc 100644 --- a/erpnext/translations/hu.csv +++ b/erpnext/translations/hu.csv @@ -8743,3 +8743,10 @@ WhatsApp,WhatsApp, Make a call,Hívást kezdeményezni, Approve,Jóváhagy, Reject,Elutasít, +Event,Esemény, +Filter,Szűrő, +Forecast,Előrejelzés, +Item {0} does not exist.,"Tétel: {0}, nem létezik.", +Rate of Depreciation (%),Értékcsökkenés mértéke (%), +Rejected ,Elutasítva , +Version,Verzió, diff --git a/erpnext/translations/pl.csv b/erpnext/translations/pl.csv index eab9dc4281b..912a47d4f76 100644 --- a/erpnext/translations/pl.csv +++ b/erpnext/translations/pl.csv @@ -8654,3 +8654,4 @@ WhatsApp,WhatsApp, Make a call,Zadzwoń, Approve,Zatwierdzać, Reject,Odrzucać, +Forecast,Prognoza, diff --git a/erpnext/translations/ru.csv b/erpnext/translations/ru.csv index 26c32ec4099..c2cb1add54b 100644 --- a/erpnext/translations/ru.csv +++ b/erpnext/translations/ru.csv @@ -8663,3 +8663,9 @@ Make a call,Позвонить, Is Template,Является шаблоном, Approve,Одобрить, Reject,Отклонить, +Cannot {0} from {1} without any negative outstanding invoice,Действие {0} для {1} невозможно без наличия отрицательного остатка по счетам-фактурам, +Discount cannot be greater than 100%.,Скидка не может быть больше 100%., +Event,Событие, +Forecast,Прогноз, +Rate of Depreciation (%),Норма амортизации (%), +Rejected ,Отклонено , diff --git a/erpnext/translations/sv.csv b/erpnext/translations/sv.csv index ca0782fb728..19df29c36e6 100644 --- a/erpnext/translations/sv.csv +++ b/erpnext/translations/sv.csv @@ -11826,3 +11826,149 @@ will be,kommer vara, {} is a child company.,{} är dotter bolag., {} {} is already linked with another {},{} {} är redan länkad till annan {}, {} {} is already linked with {} {},{} {} är redan länkad till {} {}, +"'Inspection Required before Delivery' has disabled for the item {0}, no need to create the QI","""Kontroll erfordras före Leverans"" har inaktiverats för artikel {0}, inget behov av att skapa Kvalitet Kontroll", +"'Inspection Required before Purchase' has disabled for the item {0}, no need to create the QI","""Kontroll erfordras före Inköp"" har inaktiverats för artikel {0}, inget behov av att skapa Kvalitet Kontroll", +"According to the BOM {0}, the Item '{1}' is missing in the stock entry.",Enligt stycklista {0} saknas artikel '{1}' i lager post., +Additional Data,Extra Data, +Advance Payment Date,Förskott Betalning Datum, +Advance Payment Ledger Entry,Förskottsbetalning Register Post, +Advance Reconciliation Takes Effect On,Förskott Avstämning Träder i Kraft, +Allow existing Serial No to be Manufactured/Received again,Tillåt att befintligt serienummer produceras/tas emot igen, +Amounts,Belopp, +Another Payment Request is already processed,En annan betalningsbegäran är redan behandlad, +Applies To,Tillämpas På, +Are you sure you want to delete {0}?

This action will also delete all associated Common Code documents.

,Är du säker på att du vill ta bort {0}?

Denna åtgärd kommer också att ta bort alla associerade Gemensamma Kod dokument.

, +At Row #{0}: The picked quantity {1} for the item {2} is greater than available stock {3} for the batch {4} in the warehouse {5}. Please restock the item.,Rad #{0}: Plockad kvantitet {1} för artikel {2} är högre än som är tillgängligt lager {3} för parti {4} på lager {5}. Fyll på Lager., +At least one account with exchange gain or loss is required,Minst ett konto med Valutaväxling Resultat erfordras, +Auto Reconciliation Job Trigger,Automatisk Avstämning Jobb Utlösare, +"Batch No {0} is not present in the original {1} {2}, hence you can't return it against the {1} {2}","Parti nr {0} finns inte i {1} {2}, därför kan du inte returnera det mot {1} {2}", +CC,Kopia Till, +Cannot delete Exchange Gain/Loss row,Kan inte ta bort Valutaväxling Resultat rad, +Cannot {0} from {1} without any negative outstanding invoice,Kan inte {0} från {1} utan någon negativ utestående faktura, +Canonical URI,Kanonisk URI, +Child Row Reference,Underordnad Rad Referens, +Code List,Kod Lista, +Common Code,Vanlig Kod, +Company Contact Person,Bolag Kontakt, +"Credit Note will update it's own outstanding amount, even if 'Return Against' is specified.","Kredit Faktura kommer att uppdatera sitt eget utestående belopp, även om ""Retur Mot"" är angivet.", +Cron Interval should be between 1 and 59 Min,Cron Intervall ska vara mellan 1 och 59 minuter, +Dates,Datum, +"Debit Note will update it's own outstanding amount, even if 'Return Against' is specified.","Debet Faktura kommer att uppdatera sitt eget utestående belopp, även om ""Retur Mot"" är angivet.", +Default Common Code,Standard Gemensam Kod, +Deleting {0} and all associated Common Code documents...,Tar bort {0} och alla tillhörande Gemensamma Kod dokument..., +Demand,Efterfråga, +Dimensions,Dimensioner, +Discount cannot be greater than 100%.,Rabatt kan inte vara högre än 100%., +Do you still want to enable immutable ledger?,Vill du fortfarande aktivera oföränderlig bokföring?, +Documents Processed on each trigger. Queue Size should be between 5 and 100,Dokument Behandlade vid varje utlösare. Kö storlek bör vara mellan 5 och 100, +Download PDF for Supplier,Ladda ner PDF för Leverantör, +Email Receipt,E-post, +Error in party matching for Bank Transaction {0},Fel i parti avstämning för banktransaktion {0}, +Event,Händelse, +Exchange Gain / Loss,Valutaväxling Resultat, +Exit Full Screen,Avsluta Helskärm, +Fetching Error,Hämtar Fel, +Forecast,Prognos, +Full Screen,Helskärm, +Has Corrective Cost,Har Korrigerande Kostnad, +"If there is no title column, use the code column for the title.","Om det inte finns någon titel kolumn, använd kod kolumn för titel.", +Ignore Is Opening check for reporting,Ignorera Öppning Kontroll för rapportering, +Ignores legacy Is Opening field in GL Entry that allows adding opening balance post the system is in use while generating reports,Ignorerar gammal 'Är Öppning' fält i Bokföring Post som gör det möjligt att lägga till Öppning Saldo Post efter att system används vid skapande av rapporter, +Import Genericode File,Importera generisk kod fil, +Import completed. {0} common codes created.,Import klar. {0} gemensamma koder skapade., +Importing Common Codes,Importerar Gemensamma Koder, +Interval should be between 1 to 59 MInutes,Intervall ska vara mellan 1 och 59 minuter, +Invalid Discount,Ogiltig Rabatt, +Is Exchange Gain / Loss?,Är Valutaväxling Resultat?, +Is Short/Long Year,Är Kort/Långt År, +Last transacted,Senast genomförd:, +Loading Invoices! Please Wait...,Laddar Fakturor! Vänta..., +Missing Default in Company,Standard Inställningar i Bolag saknas, +Missing Item,Saknad Artikel, +More/Less than 12 months.,Mer/Mindre än 12 månader., +No recent transactions found,Inga nya transaktioner hittades, +Oldest Of Invoice Or Advance,Äldsta Faktura eller Förskott, +Only applies for Normal Payments,Gäller endast för Normala Betalningar, +"Opening Invoice has rounding adjustment of {0}.

'{1}' account is required to post these values. Please set it in Company: {2}.

Or, '{3}' can be enabled to not post any rounding adjustment.",Öppning Fakturan har avrundning justering på {0}.

'{1}' konto erfordras för att bokföra dessa värden. Ange det i Bolag: {2}.

Eller så kan '{3}' aktiveras för att inte bokföra någon avrundning justering., +Order Date,Order Datum, +Order No,Order Nummer, +Parent Row No not found for {0},Överordnad Rad Nummer hittades inte för {0}, +Parsing Error,Tolkningsfel, +Party Type and Party can only be set for Receivable / Payable account

{0},Parti Typ och Parti kan endast anges för Fordring / Skuld konto

{0}, +Pay,Betala,Amount +Payment Reconciliation Settings,Betalning Avstämning Inställningar, +Period End Date cannot be greater than Fiscal Year End Date,Period Slutdatum får inte vara senare än Bokföringsår Slutdatum, +Period Start Date cannot be greater than Period End Date,Period startdatum kan inte vara senare än period slutdatum, +Period Start Date must be {0},Period Startdatum måste vara {0}, +Please mention '{0}' in Company: {1},Ange '{0}' i Bolag: {1}, +Please set '{0}' in Company: {1},Ange '{0}' i Bolag: {1}, +Please set {0} first.,Ange {0} först., +Please set {0} in Company {1} to account for Exchange Gain / Loss,Ange {0} i Bolag {1} för att bokföra valutaväxling resultat, +"Please set {0} to {1}, the same account that was used in the original invoice {2}.","Ange {0} till {1}, samma konto som användes i ursprunglig faktura {2}.", +Please specify a {0} first.,Ange {0} först., +Posting Date Inheritance for Exchange Gain / Loss,Bokning Datum Övertagen för Växling Resultat, +Preview Required Materials,Förhandsgranska Erfordrad Material, +Price is not set for the item.,Artikel pris är inte angiven., +Print Receipt on Order Complete,Skriv ut när Ordern är klar, +Process Statement Of Accounts CC,Behandla Kontoutdrag Kopia, +Publisher,Utgivare, +Publisher ID,Utgivarens ID, +Qty (Company),Kvantitet (Bolag), +Qty (Warehouse),Kvantitet (Lager), +Qty Wise Chart,Kvalitetsmässig Diagram, +Quantity (A - B),Kvantitet (A - B), +Queue Size should be between 5 and 100,Kö Storlek ska vara mellan 5 och 100, +Rate of Depreciation (%),Avskrivning Takt (%), +Reconcile Effect On,Avstämning Effektiv, +Reconciliation Date,Avstämning Datum, +Reconciliation Queue Size,Avstämning Kö Storlek, +Reconciliation Takes Effect On,Avstämning Träder i Kraft, +Rejected ,Avvisad , +Removing rows without exchange gain or loss,Tar bort rader utan Valutaväxling Resultat, +Resume Timer,Återuppta Tidur, +Round Off for Opening,Avrundning för Öppning, +Row # {0}: Please add Serial and Batch Bundle for Item {1},Rad # {0}: Lägg till serie och partipaket för artikel {1}, +Row #{0}: Quality Inspection is required for Item {1},Rad #{0}: Kvalitet Kontroll erfordras för artikel {1}, +Row #{0}: Quality Inspection {1} is not submitted for the item: {2},Rad #{0}: Kvalitet Kontroll {1} är inte godkänd för artikel: {2}, +Row #{0}: Quality Inspection {1} was rejected for item {2},Rad #{0}: Kvalitet Kontroll {1} avvisades för artikel {2}, +Row {0}: Item {1}'s quantity cannot be higher than the available quantity.,Rad {0}: Artikel {1} kvantitet kan inte vara högre än tillgänglig kvantitet., +Row {0}: Quantity cannot be negative.,Rad {0}: Kvantitet kan inte vara negativ., +Row {0}: Workstation or Workstation Type is mandatory for an operation {1},Rad {0}: Arbetsplats eller Arbetsplats Typ erfordras för åtgärd {1}, +Sales Person {0} is disabled.,Säljare {0} är inaktiverad., +Section,Sektion, +Select Columns and Filters,Välj Kolumner och Filter, +Sending...,Skickar..., +"Serial No {0} is not present in the {1} {2}, hence you can't return it against the {1} {2}","Serienummer {0} finns inte i {1} {2}, därför kan du inte returnera det mot {1} {2}", +Set Operating Cost / Scrap Items From Sub-assemblies,Ange Driftskostnad / Skrotade Artiklar från Underenheter, +Show Aggregate Value from Subsidiary Companies,Visa sammanlagt värde från dotterbolag, +Start Timer,Starta Tidur, +Subcontracted Quantity,Underleverantör Kvantitet, +TDS Deducted,TDS Avdragen, +Task Assignee Email,Uppgift Tilldelade E-post, +"The GL Entries and closing balances will be processed in the background, it can take a few minutes.","Bokföringsposter och de stängning saldo behandlas i bakgrunden, det kan ta några minuter.", +The Sales Person is linked with {0},Säljare är länkad till {0}, +The uploaded file does not match the selected Code List.,Uppladdad fil stämmer inte överens med vald Kod Lista., +This PO has been fully subcontracted.,Detta Inköp Order har helt lagts ut på underleverantörer., +This is a preview of the email to be sent. A PDF of the document will automatically be attached with the email.,Detta är förhandsvisning av e-postmeddelandet som ska skickas. En PDF av dokumentet kommer automatiskt att bifogas med e-postmeddelandet., +This value shall be used when no matching Common Code for a record is found.,Detta värde ska användas när ingen matchande Gemensam Kod för post hittas., +"To include sub-assembly costs and scrap items in Finished Goods on a work order without using a job card, when the 'Use Multi-Level BOM' option is enabled.","Inkludera kostnader för underenheter och skrot artiklar i Färdiga Artiklar på Arbetsorder utan att använda Jobbkort, när alternativ ""Använd Flernivå Stycklista"" är aktiverat.", +Update the modified timestamp on new communications received in Lead & Opportunity.,Uppdatera ändrad tidsstämpel på ny konversation mottagen i Potentiell Kund & Möjlighet., +Update timestamp on new communication,Uppdatera tidsstämpel på ny Konversation, +Validate Components and Quantities Per BOM,Validera Komponenter och Kvantitet per Stycklista, +Valuation (I - K),Värdering (I - K), +Value (G - D),Värde (G - D), +Value ({0}),Värde ({0}), +Value as on,Värde per, +Value of New Capitalized Asset,Värde av ny Aktiverad Tllgång, +Value of New Purchase,Värde av ny Inköp, +Value of Scrapped Asset,Värde av Skrotad Tillgång, +Value of Sold Asset,Värde på Såld Tillgång, +You are importing data for the code list:,Du importerar data för Kod Lista:, +You can't process the serial number {0} as it has already been used in the SABB {1}. {2} if you want to inward same serial number multiple times then enabled 'Allow existing Serial No to be Manufactured/Received again' in the {3},"Du kan inte behandla serienummer {0} eftersom det redan har använts i Serienummer och Parti Paket {1}. {2} Om du vill leverera in samma serienummer flera gånger aktiverar du ""Tillåt att befintligt serienummer produceras/tas emot igen"" i {3}", +You cannot {0} this document because another Period Closing Entry {1} exists after {2},Du kan inte {0} detta dokument eftersom en annan Period Stängning Post {1} finns efter {2}, +as Code,som Kod, +as Description,som Beskrivning, +as Title,som Benämning, +by {},av {}, +{0} units of {1} are required in {2} with the inventory dimension: {3} ({4}) on {5} {6} for {7} to complete the transaction.,{0} enheter av {1} erfordras i {2} med lagerdimension: {3} ({4}) på {5} {6} för {7} för att slutföra transaktion., +{0} {1} is already linked to Common Code {2}.,{0} {1} är redan länkad till Gemensam kod {2}., diff --git a/erpnext/translations/tr.csv b/erpnext/translations/tr.csv index f79acdbb6c6..1e439194b8d 100644 --- a/erpnext/translations/tr.csv +++ b/erpnext/translations/tr.csv @@ -9690,3 +9690,2800 @@ Default Amendment Naming,Varsayılan Değişikliğin Adlandırılması, Update Amendment Naming,Değişiklik Adlandırmasını Güncelle, Default Naming,Varsayılan Adlandırma, Amend Counter,Sayacı Değiştir, + Address, Adres, + Amount, Tutar, + Is Child Table, Alt Tablo, + Name,İsim, + Rate, Fiyat, + Summary, Özet, +"""SN-01::10"" for ""SN-01"" to ""SN-10""",“SN-01::10” için “SN-01” ile “SN-10”, +# In Stock,# Stokta, +# Req'd Items,# Gerekli Ürünler, +% Finished Item Quantity,% Bitmiş Ürün Miktarı, +% Occupied,% Dolu, +% Picked,% Hazır, +'Account' in the Accounting section of Customer {0},{0} isimli Müşterinin Muhasebe bölümündeki ‘Hesap’, +'Allow Multiple Sales Orders Against a Customer's Purchase Order','Müşterinin Satın Alma Siparişine Karşı Çoklu Satış Siparişlerine İzin Ver', +'Default {0} Account' in Company {1},Şirket {1} için Varsayılan {0} Hesabı, +"'Inspection Required before Delivery' has disabled for the item {0}, no need to create the QI","Teslimattan Önce Kalite Kontrol Gereklidir ayarı {0} ürünü için devre dışı bırakılmıştır, Kalite Kontrol Raporu oluşturmanıza gerek yok.", +"'Inspection Required before Purchase' has disabled for the item {0}, no need to create the QI","Satın Alma Öncesi Kalite Kontrol Gereklidir ayarı {0} ürünü için devre dışı bırakılmıştır, Kalite Kontrol Raporu oluşturmanıza gerek yok.", +'To Package No.' cannot be less than 'From Package No.','Hedef Paket No' 'Kaynak Paket No' dan az olamaz., +'{0}' account is already used by {1}. Use another account.,'{0}' hesabı zaten {1} tarafından kullanılıyor. Başka bir hesap kullanın., +'{0}' should be in company currency {1}.,'{0}' şirket para birimi {1} olmalıdır., +(A) Qty After Transaction,(A) İşlem Sonrası Miktar, +(B) Expected Qty After Transaction,(B) İşlem Sonrası Beklenen Miktar, +(C) Total Qty in Queue,(C) Kuyruktaki Toplam Miktar, +(C) Total qty in queue,(C) Kuyruktaki Toplam Miktar, +(D) Balance Stock Value,(D) Stok Değeri Bakiyesi, +(E) Balance Stock Value in Queue,(E) Kuyruktaki Stok Değeri Bakiyesi, +(F) Change in Stock Value,(F) Stok Değerindeki Değişim, +(G) Sum of Change in Stock Value,(F) Stok Değerindeki Değişim, +(H) Change in Stock Value (FIFO Queue),(H) Stok Değerindeki Değişim (FIFO Kuyruğu), +(H) Valuation Rate,(H) Değerleme Oranı, +(I) Valuation Rate,(I) Değerleme Oranı, +(J) Valuation Rate as per FIFO,(J) FIFO'ya göre Değerleme Oranı, +(K) Valuation = Value (D) ÷ Qty (A),(K) Değerleme = Değer (D) ÷ Miktar (A), +0-30 Days,0-30 Gün, +3 Yearly,3 Yıllık, +30-60 Days,30-60 Gün, +60-90 Days,60-90 Gün, +90 Above,90 Üstü, +"
+

Note

+
    +
  • +You can use Jinja tags in Subject and Body fields for dynamic values. +
  • + All fields in this doctype are available under the doc object and all fields for the customer to whom the mail will go to is available under the customer object. +
+

Examples

+ +
    +
  • Subject:

    Statement Of Accounts for {{ customer.customer_name }}

  • +
  • Body:

    +
    Hello {{ customer.customer_name }},
    PFA your Statement Of Accounts from {{ doc.from_date }} to {{ doc.to_date }}.
  • +
+","
+

Not

+
    +
  • +Dinamik değerler için Konu ve Gövde alanlarında Jinja etiketlerini kullanabilirsiniz. +
  • + Bu belge türündeki tüm alanlar belge nesnesi altında ve postanın gideceği müşteriye ait tüm alanlar müşteri nesnesi altında mevcuttur. +
+

Örnekler

+ +
    +
  • Konu:

    Hesap Özeti {{ customer.customer_name }}

  • +
  • Gövde:

    +
    Merhaba {{ customer.customer_name }},
    Hesap Özetinizi {{ doc.from_date }} 'den {{ doc.to_date }}'e kadar PFA yapın.
  • +
+", +"
Other Details
","
Diğer Detaylar
", +"
No Matching Bank Transactions Found
","
Eşleşen Banka İşlemi Bulunamadı
", +"
+

All dimensions in centimeter only

+
","
+

Tüm boyutlar sadece santimetre cinsindendir

+
", +"

About Product Bundle

+ +

Aggregate group of Items into another Item. This is useful if you are bundling a certain Items into a package and you maintain stock of the packed Items and not the aggregate Item.

+

The package Item will have Is Stock Item as No and Is Sales Item as Yes.

+

Example:

+

If you are selling Laptops and Backpacks separately and have a special price if the customer buys both, then the Laptop + Backpack will be a new Product Bundle Item.

","

Ürün Paketi Hakkında

+ +

Bir grup Ürünü başka bir Üründe toplar. Bu, belirli Ürünleri bir pakette topluyorsanız ve toplu Ürünün değil paketlenmiş Ürünlerin stokunu tutuyorsanız kullanışlıdır.

+

Paket Ürünü Stok Ürünü mü Hayır ve Satış Ürünü mü Evet olarak ayarlanacaktır.

+

Örnek:

+

Dizüstü Bilgisayarları ve Sırt Çantalarını ayrı ayrı satıyorsanız ve müşteri her ikisini de satın alırsa özel bir fiyatınız varsa, Dizüstü Bilgisayar + Sırt Çantası yeni bir Ürün Paketinin Ürünü olacaktır.

", +"

Currency Exchange Settings Help

+

There are 3 variables that could be used within the endpoint, result key and in values of the parameter.

+

Exchange rate between {from_currency} and {to_currency} on {transaction_date} is fetched by the API.

+

Example: If your endpoint is exchange.com/2021-08-01, then, you will have to input exchange.com/{transaction_date}

","

Döviz Kuru Ayarları Yardımı

+

Son nokta, sonuç anahtarı ve parametre değerlerinde kullanılabilecek 3 değişken vardır.

+

{transaction_date} tarihinde {from_currency} ile {to_currency} arasındaki döviz kuru API tarafından alınır.

+

Örnek: Son noktanız exchange.com/2024-08-01 ise, exchange.com/{transaction_date}

girmeniz gerekecektir.", +"

Body Text and Closing Text Example

+ +
We have noticed that you have not yet paid invoice {{sales_invoice}} for {{frappe.db.get_value(""Currency"", currency, ""symbol"")}} {{outstanding_amount}}. This is a friendly reminder that the invoice was due on {{due_date}}. Please pay the amount due immediately to avoid any further dunning cost.
+ +

How to get fieldnames

+ +

The fieldnames you can use in your template are the fields in the document. You can find out the fields of any documents via Setup > Customize Form View and selecting the document type (e.g. Sales Invoice)

+ +

Templating

+ +

Templates are compiled using the Jinja Templating Language. To learn more about Jinja, read this documentation.

","

Gövde Metni ve Kapanış Metni Örneği

+ +
{{frappe.db.get_value(""Currency"", currency, ""symbol"")}} {{outstanding_amount}}için {{sales_invoice}} faturasını henüz ödemediğinizi fark ettik. Bu, faturanın {{due_date}}tarihinde ödenmesi gerektiğine dair dostane bir hatırlatmadır. Daha fazla ihtar masrafından kaçınmak için lütfen ödenmesi gereken tutarı derhal ödeyin.
+ +

Alan adları nasıl alınır

+ +

Şablonunuzda kullanabileceğiniz alan adları belgede yer alan alanlardır. Herhangi bir belgenin alanlarını Kurulum > Form Görünümünü Özelleştir üzerinden ve belge türünü seçerek öğrenebilirsiniz (örn. Satış Faturası)

+ +

Şablonlama

+ +

Şablonlar Jinja Templating Language kullanılarak derlenir. Jinja hakkında daha fazla bilgi edinmek için bu belgeyi okuyun.

", +"

Contract Template Example

+ +
Contract for Customer {{ party_name }}
+
+-Valid From : {{ start_date }} 
+-Valid To : {{ end_date }}
+
+ +

How to get fieldnames

+ +

The field names you can use in your Contract Template are the fields in the Contract for which you are creating the template. You can find out the fields of any documents via Setup > Customize Form View and selecting the document type (e.g. Contract)

+ +

Templating

+ +

Templates are compiled using the Jinja Templating Language. To learn more about Jinja, read this documentation.

","

Sözleşme Şablonu Örneği

+ +
Müşteri için Sözleşme {{ party_name }}
+
+-Geçerli Başlangıç : {{ start_date }} 
+-Geçerli Bitiş : {{ end_date }}
+
+ +

Alan adları nasıl alınır

+ +

Sözleşme Şablonunuzda kullanabileceğiniz alan adları, şablonunu oluşturduğunuz Sözleşmedeki alanlardır. Herhangi bir belgenin alanlarını Kurulum > Form Görünümünü Özelleştir aracılığıyla ve belge türünü (örneğin Sözleşme) seçerek öğrenebilirsiniz

+ +

Şablonlama

+ +

Şablonlar Jinja Templating Language kullanılarak derlenir. Jinja hakkında daha fazla bilgi edinmek için bu belgeyi okuyun.

", +"

Standard Terms and Conditions Example

+ +
Delivery Terms for Order number {{ name }}
+
+-Order Date : {{ transaction_date }} 
+-Expected Delivery Date : {{ delivery_date }}
+
+ +

How to get fieldnames

+ +

The fieldnames you can use in your email template are the fields in the document from which you are sending the email. You can find out the fields of any documents via Setup > Customize Form View and selecting the document type (e.g. Sales Invoice)

+ +

Templating

+ +

Templates are compiled using the Jinja Templating Language. To learn more about Jinja, read this documentation.

","

Standart Şartlar ve Koşullar Örneği

+ +
Sipariş numarası için Teslimat Koşulları {{ name }}
+
+-Sipariş Tarihi: {{ transaction_date }} 
+-Beklenen Teslimat Tarihi: {{ delivery_date }}
+
+ +

Alan adları nasıl alınır

+ +

E-posta şablonunuzda kullanabileceğiniz alan adları, e-postayı gönderdiğiniz belgedeki alanlardır. Herhangi bir belgenin alanlarını Kurulum > Form Görünümünü Özelleştir ve belge türünü (örneğin Satış Faturası) seçerek bulabilirsiniz

+ +

Şablonlama

+ +

Şablonlar Jinja Şablonlama Dili kullanılarak derlenir. Jinja hakkında daha fazla bilgi edinmek için bu dokümanı okuyun.

", +"
Or
","
Veya
", +"","", +"","", +"","", +"

In your Email Template, you can use the following special variables: +

+
    +
  • + {{ update_password_link }}: A link where your supplier can set a new password to log into your portal. +
  • +
  • + {{ portal_link }}: A link to this RFQ in your supplier portal. +
  • +
  • + {{ supplier_name }}: The company name of your supplier. +
  • +
  • + {{ contact.salutation }} {{ contact.last_name }}: The contact person of your supplier. +
  • + {{ user_fullname }}: Your full name. +
  • +
+

+

Apart from these, you can access all values in this RFQ, like {{ message_for_supplier }} or {{ terms }}.

","

E-posta Şablonunuzda, aşağıdaki özel değişkenleri kullanabilirsiniz: +

+
    +
  • + {{ update_password_link }}: Tedarikçinizin portalınıza giriş yapmak için yeni bir şifre belirleyebileceği bir bağlantı. +
  • +
  • + {{ portal_link }}: Tedarikçi portalınızda bu Fiyat Teklifi Talebine yönlendiren bir bağlantı. +
  • +
  • + {{ supplier_name }}: Tedarikçinizin şirket adı. +
  • +
  • + {{ contact.salutation }} {{ contact.last_name }}: Tedarikçinizin iletişim kişisi. +
  • + {{ user_fullname }}: Tam adınız. +
  • +
+

+

Bunların dışında, bu Fiyat Teklifi Talebindeki tüm değerlere, {{ message_for_supplier }} veya {{ terms }} gibi, erişebilirsiniz.

", +"
Message Example
+ +<p> Thank You for being a part of {{ doc.company }}! We hope you are enjoying the service.</p> + +<p> Please find enclosed the E Bill statement. The outstanding amount is {{ doc.grand_total }}.</p> + +<p> We don't want you to be spending time running around in order to pay for your Bill.
After all, life is beautiful and the time you have in hand should be spent to enjoy it!
So here are our little ways to help you get more time for life! </p> + +<a href=""{{ payment_url }}""> click here to pay </a> + +
+","
Mesaj Örneği
+ +<p> {{ doc.company }}'in bir parçası olduğunuz için teşekkür ederiz! Hizmetten keyif aldığınızı umuyoruz.</p> + +<p> E-Fatura ekstresini ekte bulabilirsiniz. Ödenmemiş tutar {{ doc.grand_total }}'dir.</p> + +<p> Faturanızı ödemek için oradan oraya koşturarak zaman harcamanızı istemiyoruz.
Sonuçta, hayat güzeldir ve elinizdeki zamanı tadını çıkarmak için harcamalısınız!
İşte hayatınıza daha fazla zaman ayırmanıza yardımcı olacak küçük yollarımız! </p> + +<a href=""{{ payment_url }}""> ödeme yapmak için tıklayın </a> + +
+", +"
Message Example
+ +<p>Dear {{ doc.contact_person }},</p> + +<p>Requesting payment for {{ doc.doctype }}, {{ doc.name }} for {{ doc.grand_total }}.</p> + +<a href=""{{ payment_url }}""> click here to pay </a> + +
+","
Mesaj Örneği
+ +<p>Sevgili {{ doc.contact_person }},</p> + +<p> {{ doc.doctype }}, {{ doc.name }} için {{ doc.grand_total }}için ödeme talep ediyoruz.</p> + +<a href=""{{ payment_url }}""> ödemek için buraya tıklayın </a> + +
+", +"Masters & Reports","Kayıtlar & Raporlar", +"Quick Access","Hızlı Erişim", +"Reports & Masters","Raporlar & Kayıtlar", +"Reports & Masters","Raporlar & Kayıtlar", +"Settings","Ayarlar", +"Shortcuts","Kısayollar", +"Your Shortcuts + + + + + + ","Kısayollar + + + + + + ", +"Your Shortcuts","Kısayollar", +Grand Total: {0},Genel Toplam: {0}, +Outstanding Amount: {0},Ödenmemiş Tutar: {0}, +" + + + + + + + + + + + + + + + + + +
Child DocumentNon Child Document
+

To access parent document field use parent.fieldname and to access child table document field use doc.fieldname

+ +
+

To access document field use doc.fieldname

+
+

Example: parent.doctype == ""Stock Entry"" and doc.item_code == ""Test""

+ +
+

Example: doc.doctype == ""Stock Entry"" and doc.purpose == ""Manufacture""

+
+ + + + + + +"," + + + + + + + + + + + + + + + + + +
Çocuk BelgesiÇocuk Olmayan Belge
+

Üst belge alanına erişmek için parent.fieldname ve alt tablo belge alanına erişmek için doc.fieldname kullanın

+ +
+

Belge alanına erişmek için doc.fieldname kullanın

+
+

Örnek: parent.doctype == ""Stok Girişi"" ve doc.item_code == ""Test""

+ +
+

Örnek: doc.doctype == ""Stok Girişi"" ve doc.purpose == ""Üretim""

+
+ + + + + + +", +A Holiday List can be added to exclude counting these days for the Workstation.,İş İstasyonu için bu günlerin sayılmasını hariç tutmak üzere bir Tatil Listesi eklenebilir., +A Packing Slip can only be created for Draft Delivery Note.,Bir Paketleme Fişi yalnızca Taslak İrsaliye için oluşturulabilir., +"A Price List is a collection of Item Prices either Selling, Buying, or both","Fiyat Listesi, Satılan, Alınan veya Her İkisi de Olan Ürün Fiyatlarının bir koleksiyonudur", +A Reconciliation Job {0} is running for the same filters. Cannot reconcile now,Aynı filtreler için {0} numaralı bir Mutabakat İşi çalışıyor. Şu anda mutabakat yapılamaz, +A Transaction Deletion Document: {0} is triggered for {0},İşlem Silme Belgesi: {0} için {0} başlatıldı, +A customer must have primary contact email.,Müşterinin birincil iletişim e-postasına sahip olması gerekir., +A driver must be set to submit.,Göndermek için bir sürücü ayarlanmalıdır., +A template with tax category {0} already exists. Only one template is allowed with each tax category,{0} vergi kategorisiyle zaten bir şablon mevcut. Her vergi kategorisi için yalnızca bir şablona izin verilir, +API Details,API Ayrıntıları, +AWB Number,AWB Numarası, +Abbreviation: {0} must appear only once,Kısaltma: {0} yalnızca bir kez görünmelidir, +About Us Settings,Hakkımızda Ayarları, +About {0} minute remaining,Yaklaşık {0} dakika kaldı, +About {0} minutes remaining,Yaklaşık {0} dakika kaldı, +About {0} seconds remaining,Yaklaşık {0} saniye kaldı, +Acceptance Criteria Formula,Kabul Kriterleri Formülü, +Acceptance Criteria Value,Kabul Kriterleri Değeri, +Access Key,Erişim Anahtarı, +Access Key is required for Service Provider: {0},Servis Sağlayıcı için Erişim Anahtarı gereklidir: {0}, +"According to the BOM {0}, the Item '{1}' is missing in the stock entry.","{0} Ürün Ağacı, ‘{1}’ ürünü stok girişinde eksik.", +Account Balance (From),Borç Hesabı, +Account Balance (To),Alacak Hesabı, +Account Closing Balance,Hesap Kapanış Bakiyesi, +Account Currency (From),Hesap Para Birimi (Borç), +Account Currency (To),Hesap Para Birimi (Alacak), +Account Opening Balance,Hesap Açılış Bakiyesi, +Account not Found,Hesap bulunamadı, +Account {0} added multiple times,{0} Hesabı birden çok kez eklendi, +Accounting Dimension Filter,Muhasebe Boyutu Filtresi, +Accounting Dimensions Filter,Muhasebe Boyutları Filtresi, +Accounting Entry for {0},{0} için Muhasebe Girişi, +Accounts Missing Error,Hesap Eksik Hatası, +Accounts to Merge,Birleştirilecek Hesaplar, +Action if Same Rate is Not Maintained Throughout Sales Cycle,Satış Döngüsü Boyunca Aynı Oran Korunmazsa Yapılacak İşlem, +Active Status,Aktif Durum, +Actual Balance Qty,Gerçek Bakiye Miktarı, +Actual Expense,Gerçekleşen Gider, +Actual Posting,Gerçek Kaydetme Zamanı, +Actual Qty in Warehouse,Depodaki Gerçek Miktar, +Add Discount,İndirim Ekle, +Add Items in the Purpose Table,Amaç Tablosuna Öğeler Ekleyin, +Add Lead to Prospect,Potansiyel Müşteriye Ekle, +Add Local Holidays,Yerel Tatilleri Ekle, +Add Manually,Manuel Olarak Ekle, +Add Or Deduct,Ekle veya Çıkar, +Add Serial / Batch Bundle,Seri / Toplu Paket Ekle, +Add Serial / Batch No,Seri / Parti No Ekle, +Add Serial / Batch No (Rejected Qty),Seri / Parti No Ekle (Reddedilen Miktar), +Add Stock,Stok Ekle, +Add Sub Assembly,Alt Montaj Ekle, +Add Template,Şablon Ekle, +Add a Note,Not Ekle, +Add details,Detayları Ekle, +Add to Prospect,Potansiyel Müşteriye Ekle, +Added By,Ekleyen, +Added On,Eklenme Tarihi, +Added Supplier Role to User {0}.,{0} Kullanıcısına Tedarikçi Rolü eklendi., +Added {1} Role to User {0}.,{1} Rolü {0} Kullanıcısına Eklendi., +Adding Lead to Prospect...,Müşteri Adayı Potansiyel Müşteriye Ekleniyor..., +Additional,Ek Olarak, +Additional Asset Cost,Ek Varlık Maliyeti, +Additional Cost Per Qty,Adet Başına Ek Maliyet, +Additional Data,Ek Veriler, +Address And Contacts,Adres ve Kişiler, +Adjust Asset Value,Varlık Değerini Ayarla, +Adjustment Against,Karşılığına Yapılan Düzenleme, +Adjustment based on Purchase Invoice rate,Satın Alma Faturası oranına göre düzeltme, +Advance Account: {0} must be in either customer billing currency: {1} or Company default currency: {2},Avans Hesabı: {0} müşteri fatura para biriminde olmalıdır: {1} veya Şirketin varsayılan para biriminde: {2}, +Advance Payment,Avans Ödemesi, +Advance Payment Date,Peşinat Ödeme Tarihi, +Advance Payment Ledger Entry,Peşin Ödeme Muhasebe Kaydı, +Advance Reconciliation Takes Effect On,Avans Mutabakatı Şu Tarihten İtibaren Geçerli Olur, +Advance Tax,Peşin Vergi, +Advance paid against {0} {1} cannot be greater than Grand Total {2},"{0} {1} karşılığında ödenen avans, Genel Toplam {2} tutarından fazla olamaz.", +Advance payments allocated against orders will only be fetched,Sadece siparişlere karşılık gelen avans ödemeleri alınacaktır., +Affected Transactions,Etkilenen İşlemler, +Against Customer Order {0},Müşteri Siparişi {0} Karşılığında, +Against Supplier Invoice {0},Tedarikçi Faturasına Karşı {0}, +Against Voucher No,İlgili Belge No, +Age ({0}),Yaş ({0}), +Ageing Range,Stokta Kalma Süresi, +Agent Busy Message,Temsilci Meşgul Mesajı, +Agent Group,Temsilci Grubu, +Agent Unavailable Message,Temsilci Müsait Değil Mesajı, +Algorithm,Algoritma, +All Activities,Tüm Aktiviteler, +All Activities HTML,Tüm Etkinlikler HTML, +All Items,Tüm Ürünler, +All Sales Transactions can be tagged against multiple Sales Persons so that you can set and monitor targets.,"Tüm Satış İşlemleri birden fazla Satış Elemanına etiketlenebilir, böylece hedefler belirleyebilir ve izleyebilirsiniz.", +All allocations have been successfully reconciled,Tüm tahsisatların mutabakatı başarıyla sağlandı, +All items have already been received,Tüm ürünler zaten alındı, +All items in this document already have a linked Quality Inspection.,Bu belgedeki tüm Ürünlerin zaten bağlantılı bir Kalite Kontrolü var., +"All the required items (raw materials) will be fetched from BOM and populated in this table. Here you can also change the Source Warehouse for any item. And during the production, you can track transferred raw materials from this table.","Tüm gerekli malzemeler (hammadde) Ürün Ağacı'ndan alınarak bu tabloya eklenir. Burada herhangi bir ürün için Kaynak Depo'yu da değiştirebilirsiniz. Üretim sırasında, bu tablodan transfer edilen hammaddeleri takip edebilirsiniz.", +Allocate Payment Request,Ödeme Talebini Tahsis Et, +Allocated Entries,Tahsis Edilen Girişler, +Allocated To:,Ayrılan:, +Allocations,Tahsisler, +Allow,İzin Ver, +Allow Alternative Item must be checked on Item {},{} Ürünü için Alternatif Ürüne İzin Ver seçeneği işaretlenmelidir, +Allow Internal Transfers at Arm's Length Price,İç Transferlerde Piyasa Fiyatına İzin Ver, +Allow Or Restrict Dimension,Boyuta İzin Ver veya Sınırla, +Allow Partial Reservation,Kısmi Rezervasyona İzin Ver, +Allow User to Edit Discount,Kullanıcının İndirimi Düzenlemesine İzin Verin, +Allow User to Edit Rate,Kullanıcının Fiyatı Düzenlemesine İzin Verin, +Allow Zero Rate,Sıfır Değerlemeye İzin Ver, +Allow existing Serial No to be Manufactured/Received again,Mevcut Seri Numarasının Tekrar Üretilmesine/Alınmasına İzin Ver, +Allow to Edit Stock UOM Qty for Purchase Documents,Satın Alma için Stok Birimi Adetini Düzenlemeye İzin Ver, +Allow to Edit Stock UOM Qty for Sales Documents,Satış Belgelerinde Stok Birimi Miktarını Düzenlemeye İzin Ver, +Allowed,İzin Verilen, +Allowed Dimension,İzin Verilen Boyut, +Allowed Doctypes,İzin Verilen DocType'lar, +Allowed primary roles are 'Customer' and 'Supplier'. Please select one of these roles only.,İzin verilen birincil roller 'Müşteri' ve 'Tedarikçi'dir. Lütfen yalnızca bu rollerden birini seçin., +Allows to keep aside a specific quantity of inventory for a particular order.,Belirli bir sipariş için envanterden belirli bir miktarı ayırmaya olanak tanır., +Already Picked,Zaten Seçilmiş, +Alternative Items,Alternatif Ürünler, +"Alternatively, you can download the template and fill your data in.","Alternatif olarak, şablonu indirebilir ve verilerinizi doldurabilirsiniz.", +Amount (AED),Tutar (AED), +Amount in Account Currency,Hesap Para Birimindeki Tutar, +Amount in party's bank account currency,Tarafın banka hesabındaki tutar para birimi, +Amount in transaction currency,İşlem para birimi cinsinden tutar, +Amounts,Tutarlar, +An Item Group is a way to classify items based on types.,"Ürün Grubu, Ürünleri türlerine göre sınıflandırmanın bir yoludur.", +An error has been appeared while reposting item valuation via {0},Ürün değerlemesi {0} üzerinden yeniden yayınlanırken bir hata oluştu, +"Another Cost Center Allocation record {0} applicable from {1}, hence this allocation will be applicable upto {2}","Başka bir Maliyet Merkezi Tahsis kaydı {0} {1} tarihinden itibaren geçerlidir, dolayısıyla bu tahsis {2} tarihine kadar geçerli olacaktır", +Another Payment Request is already processed,Başka bir Ödeme Talebi zaten işleme alındı, +"Any one of following filters required: warehouse, Item Code, Item Group","Aşağıdaki filtrelerden herhangi biri gereklidir: Depo, Ürün Kodu, Ürün Grubu", +Applicable Dimension,Uygulanabilir Boyut, +Applicable On Account,Hesap Üzerinden Uygulanabilir, +Applied on each reading.,Her okumaya uygulanır., +Applied putaway rules.,Yerleştirme kuralları uygulandı., +Applies To,Uygulanan, +Apply Recursion Over (As Per Transaction UOM),Tekrarlamayı Uygula (İşlem Ölçü Birimine Göre), +Apply TDS,Vergiyi Dahil Et, +Apply Tax Withholding Amount ,Vergi Kesintisini Uygula , +Apply restriction on dimension values,Boyut değerlerine kısıtlama uygulayın, +Apply to All Inventory Documents,Tüm Envanter Belgelerine Uygula, +Apply to Document,Belgeye Uygula, +Appointment Created Successfully,Randevu Başarıyla Oluşturuldu, +Appointment Scheduling Disabled,Randevu Planlama Devre Dışı, +Appointment Scheduling has been disabled for this site,Bu site için Randevu Planlama devre dışı bırakıldı, +Appointment was created. But no lead was found. Please check the email to confirm,Randevu oluşturuldu. Ancak müşteri adayı bulunamadı. Lütfen onaylamak için e-postayı kontrol edin, +Approximately match the description/party name against parties,Açıklama/cari adını carilerle yaklaşık olarak eşleştirin, +Are you sure you want to clear all demo data?,Tüm Demo Verilerini temizlemek istediğinizden emin misiniz?, +Are you sure you want to delete this Item?,Bu ürünü silmek istediğinizden emin misiniz?, +Are you sure you want to delete {0}?

This action will also delete all associated Common Code documents.

,"{0} girişini silmek istediğinizden emin misiniz?

Bu işlem, ilişkili tüm Ortak Kod belgelerini de silecektir.

", +Are you sure you want to restart this subscription?,Bu aboneliği yeniden başlatmak istediğinizden emin misiniz?, +As on Date,Tarih itibariyle, +"As there are existing submitted transactions against item {0}, you can not change the value of {1}.","{0} Ürününe karşı mevcut gönderilmiş işlemler olduğundan, {1} değerini değiştiremezsiniz.", +"As there are negative stock, you can not enable {0}.",Negatif stok olduğu için {0} özelliğini aktif hale getiremezsiniz., +"As there are reserved stock, you cannot disable {0}.",Depolarda Rezerv stok olduğu için {0} ayarını devre dışı bırakamazsınız., +"As there are sufficient Sub Assembly Items, Work Order is not required for Warehouse {0}.","Yeterli Alt Montaj Ürünleri mevcut olduğundan, {0} Deposu için İş Emri gerekli değildir.", +"As {0} is enabled, you can not enable {1}.",{0} etkinleştirildiğinden {1} etkinleştirilemez., +Asset Capitalization Asset Item,Varlık Sermayelendirmesi Varlık Kalemi, +Asset Capitalization Service Item,Varlık Sermayelendirme Hizmet Kalemi, +Asset Capitalization Stock Item,Varlık Sermayesi Stok Kalemi, +Asset Depreciation Details,Varlık Amortisman Detayları, +Asset Depreciation Schedule for Asset {0} and Finance Book {1} is not using shift based depreciation,Varlık Amortisman Programı {0} ve Finans Defteri {1} için vardiya bazlı amortisman kullanmıyor, +Asset Depreciation Schedule not found for Asset {0} and Finance Book {1},Varlık Amortisman Programı Varlık {0} ve Finans Defteri {1} için bulunamadı, +Asset Depreciation Schedule {0} for Asset {1} already exists.,Varlık Amortisman Programı {0} Varlık {1} için zaten mevcut., +Asset Depreciation Schedule {0} for Asset {1} and Finance Book {2} already exists.,Varlık Amortisman Programı {0} Varlık {1} ve Finans Defteri {2} için zaten mevcut., +"Asset Depreciation Schedules created:
{0}

Please check, edit if needed, and submit the Asset.","Varlık Amortisman Çizelgeleri oluşturuldu:
{0}

Lütfen kontrol edin, gerekiyorsa düzenleyin ve Varlığı kaydedin.", +Asset ID,Varlık Kimliği, +Asset Quantity,Varlık Miktarı, +Asset Repair Consumed Item,Varlık Onarımı Tüketilen Öğe, +Asset Shift Allocation,Varlık Vardiya Ataması, +Asset Shift Factor,Varlık Kaydırma Faktörü, +Asset Shift Factor {0} is set as default currently. Please change it first.,Varlık Kaydırma Faktörü {0} şu anda varsayılan olarak ayarlanmıştır. Lütfen önce bunu değiştirin., +Asset cancelled,Varlık iptal edildi, +Asset capitalized after Asset Capitalization {0} was submitted,Varlık Sermayelendirmesi {0} gönderildikten sonra varlık sermayelendirildi, +Asset created,Varlık oluşturuldu, +Asset created after Asset Capitalization {0} was submitted,Varlık Sermayelendirmesi {0} gönderildikten sonra oluşturulan varlık, +Asset created after being split from Asset {0},Varlıktan ayrıldıktan sonra oluşturulan varlık {0}, +Asset deleted,Varlık silindi, +Asset issued to Employee {0},Personele verilen varlık {0}, +Asset out of order due to Asset Repair {0},"Varlık, {0} nedeniyle onarımda ve şuan devre dışı.", +Asset received at Location {0} and issued to Employee {1},Varlık {0} Konumunda alındı ve {1} Çalışanına verildi, +Asset restored,Varlık geri yüklendi, +Asset restored after Asset Capitalization {0} was cancelled,Varlık Sermayelendirmesi {0} iptal edildikten sonra varlık geri yüklendi, +Asset returned,Varlık iade edildi, +Asset scrapped,Varlık hurdaya çıkarıldı, +Asset sold,Satılan Varlık, +Asset submitted,Varlık Kaydedildi, +Asset transferred to Location {0},Varlık {0} konumuna aktarıldı, +Asset updated after being split into Asset {0},"Varlık, Varlığa bölündükten sonra güncellendi {0}", +Asset updated after cancellation of Asset Repair {0},Varlık Onarımı {0} iptal edildikten sonra varlık güncellendi., +Asset updated after completion of Asset Repair {0},Varlık Onarımı {0} tamamlandıktan sonra varlık güncellendi., +Asset {0} cannot be received at a location and given to an employee in a single movement,Varlık {0} tek bir hareketle bir yerden alınıp bir personele verilemez, +Asset {0} does not belong to Item {1},{0} Varlık {1} Ürününe ait değil, +Asset {0} does not exist,{0} Varlığı mevcut değil, +Asset {0} has been created. Please set the depreciation details if any and submit it.,Varlık {0} oluşturuldu. Lütfen varsa amortisman ayrıntılarını ayarlayın ve gönderin., +Asset {0} has been updated. Please set the depreciation details if any and submit it.,Varlık {0} güncellendi. Lütfen varsa amortisman ayrıntılarını ayarlayın ve gönderin., +Asset's depreciation schedule updated after Asset Shift Allocation {0},Varlığın amortisman programı Varlık Kaydırma Tahsisinden sonra güncellendi {0}, +Asset's value adjusted after cancellation of Asset Value Adjustment {0},Varlık Değer Düzeltmesinin iptalinden sonra varlığın düzeltilmiş değeri {0}, +Asset's value adjusted after submission of Asset Value Adjustment {0},Varlık Değer Düzeltmesinin sunulmasından sonra düzeltilen varlık değeri {0}, +Assign Job to Employee,Yapılacak İşi Personele Ata, +Assignment,Atama, +At Row #{0}: The picked quantity {1} for the item {2} is greater than available stock {3} for the batch {4} in the warehouse {5}. Please restock the item.,"Satır #{0}: {2} ürünü için seçilen miktar {1}, {5} deposundaki {4} parti numarası için mevcut stok {3} miktarından daha fazla. Lütfen ürünü yeniden stoklayın.", +At Row #{0}: The picked quantity {1} for the item {2} is greater than available stock {3} in the warehouse {4}.,"Satır #{0}: Ürün {2} için seçilen miktar {1}, depo {4} içinde mevcut stok {3} değerinden fazladır.", +At least one account with exchange gain or loss is required,En az bir adet döviz kazancı veya kaybı hesabının bulunması zorunludur, +At row {0}: Batch No is mandatory for Item {1},"Satır {0}: Parti No, {1} Ürünü için zorunludur", +At row {0}: Parent Row No cannot be set for item {1},"Satır {0}: Üst Satır No, {1} öğesi için ayarlanamıyor", +At row {0}: Qty is mandatory for the batch {1},Satır {0}: {1} partisi için miktar zorunludur, +At row {0}: Serial No is mandatory for Item {1},"Satır {0}: Seri No, {1} Ürünü için zorunludur", +At row {0}: Serial and Batch Bundle {1} has already created. Please remove the values from the serial no or batch no fields.,Satır {0}: Seri ve Toplu Paket {1} zaten oluşturuldu. Lütfen seri no veya toplu no alanlarından değerleri kaldırın., +At row {0}: set Parent Row No for item {1},Satır {0}: Ürün {1} için Üst Satır No'yu ayarlayın, +Attach CSV File,CSV Dosyası Ekle, +Attribute value: {0} must appear only once,Özellik değeri: {0} yalnızca bir kez görünmelidir, +Auto Create Serial and Batch Bundle For Outward,Dışarıya Yönelik Otomatik Seri ve Toplu Paket Oluşturma, +Auto Created Serial and Batch Bundle,Otomatik Oluşturulan Seri ve Toplu Paket, +Auto Email Report,Otomatik E-Posta Raporu, +Auto Name,Otomatik İsim, +Auto Reconcile,Otomatik Mutabakat, +Auto Reconciliation,Otomatik Mutabakat, +Auto Reconciliation Job Trigger,Otomatik Mutabakat İşlemi Tetikleyicisi, +Auto Reconciliation of Payments has been disabled. Enable it through {0},Ödemelerin Otomatik Mutabakatı devre dışı bırakıldı. {0} adresinden etkinleştirin., +Auto Reserve Serial and Batch Nos,Seri ve Parti Numaralarını Otomatik Rezerve Et, +Auto Reserve Stock for Sales Order on Purchase,Satın Alma Sırasında Satış Siparişi için Otomatik Stok Ayırma, +Auto write off precision loss while consolidation,Birleştirme Sırasında Hassasiyet Kayıplarını Otomatik Olarak Kapat, +Automatically Add Filtered Item To Cart,Filtrelenmiş Ürünü Sepete Otomatik Olarak Ekle, +Automatically post balancing accounting entry,Dengeleme muhasebe girişini otomatik olarak gönder, +Available Batch Report,Mevcut Parti Raporu, +Available Qty at Company,Şirketteki Mevcut Miktar, +Available Qty at Target Warehouse,Hedef Depodaki Mevcut Miktar, +Available Qty to Reserve,Stok Yapılacak Mevcut Miktar, +Average Completion,Ortalama Tamamlama, +Avg Rate,Ortalama Oran, +Avg Rate (Balance Stock),Ortalama Oran (Stok Bakiyesi), +BFS,Genişlik Öncelikli Arama, +BIN Qty,Ürün Ağacı Miktarı, +BOM Created,Ürün Ağacı Oluşturuldu, +BOM Creator Item,Ürün Ağacı Oluşturucu Ürünü, +BOM Level,Ürün Ağacı Seviyesi, +BOM Tree,Ürün Ağacı Yapısı, +BOM UoM,Ürün Ağacı Ölçü Birimi, +BOM Update Batch,Ürün Ağacı Toplu Güncelleme, +BOM Update Initiated,Ürün Ağacı Güncellemesi Başlatıldı, +BOM Update Log,Ürün Ağacı Güncelleme Kayıtları, +BOM Update Tool Log with job status maintained,İş durumunun korunduğu Ürün Ağacı Güncelleme Aracı Günlüğü, +BOM Updation already in progress. Please wait until {0} is complete.,Ürün Ağacı Güncellemesi zaten devam ediyor. Lütfen {0} tamamlanana kadar bekleyin., +BOM Updation is queued and may take a few minutes. Check {0} for progress.,Ürün Ağacı Güncellemesi sıraya alındı ve birkaç dakika sürebilir. İlerleme için {0} adresini kontrol edin., +BOM and Production,Ürün Ağacı ve Üretim, +BOM recursion: {1} cannot be parent or child of {0},"Ürün Ağacı yinelemesi: {1}, {0} girişinin üst öğesi veya alt öğesi olamaz", +BOMs Updated,Ürün Ağaçları Güncellendi, +BOMs created successfully,Ürün Ağaçları Başarıyla Oluşturuldu, +BOMs creation failed,Ürün Ağaçları Oluşturma Başarısız Oldu, +"BOMs creation has been enqueued, kindly check the status after some time","Ürün Ağaçlarının oluşturulması sıraya alındı, lütfen bir süre sonra durumu kontrol edin", +Balance Qty (Stock),Bakiye Miktarı (Stok), +Balance Sheet Summary,Bilanço Özeti, +Balance Stock Value,Stok Değeri Bakiyesi, +Bank Statement Import,Banka Hesap Özeti İçe Aktar, +Bank Transaction {0} Matched,Banka İşlemi {0} Eşleşti, +Bank Transaction {0} added as Journal Entry,Banka İşlemi {0} Defter Girişi olarak eklendi, +Bank Transaction {0} added as Payment Entry,Banka İşlemi {0} Ödeme Girişi olarak eklendi, +Bank Transaction {0} is already fully reconciled,Banka İşlemi {0} ile zaten tamamen mutabakat sağlandı, +Bank Transaction {0} updated,Banka İşlemi {0} güncellendi, +Bank/Cash Account,Banka / Kasa Hesabı, +Bank/Cash Account {0} doesn't belong to company {1},{0} Banka/Nakit Hesabı {1} şirkete ait değil, +Base Amount,Birim Tutarı, +Base Cost Per Unit,Birim Başına Birim Maliyet, +Base Rate,Taban Fiyat, +Base Tax Withholding Net Total,Vergi Stopajı Net Taban Toplamı, +Base Total,Birim Toplam, +Base Total Billable Amount,Toplam Faturalandırılabilir Tutar, +Base Total Billed Amount,Toplam Fatura Tutarı, +Base Total Costing Amount,Toplam Maliyet Tutarı, +Based On Value,Değere Göre, +"Based on your HR Policy, select your leave allocation period's end date",İnsan Kaynakları Politikanıza göre izin tahsis döneminizin bitiş tarihini seçin, +"Based on your HR Policy, select your leave allocation period's start date",İnsan Kaynakları Politikanıza göre izin tahsis döneminizin bitiş tarihini seçin, +Batch Expiry Date,Parti Son Kullanma Tarihi, +Batch No is mandatory,Parti Numarası Zorunlu, +Batch No {0} does not exists,Parti No {0} mevcut değil, +Batch No {0} is linked with Item {1} which has serial no. Please scan serial no instead.,"Parti No {0} , seri numarası olan {1} öğesi ile bağlantılıdır. Lütfen bunun yerine seri numarasını tarayın.", +"Batch No {0} is not present in the original {1} {2}, hence you can't return it against the {1} {2}","Parti No {0}, orijinalinde {1} {2} için mevcut değil, bu nedenle bunu {1} {2} adına iade edemezsiniz.", +Batch No.,Parti No., +Batch Nos,Parti Numaraları, +Batch Nos are created successfully,Parti Numaraları başarıyla oluşturuldu, +Batch Not Available for Return,Parti İade İçin Uygun Değil, +Batch Qty,Parti Miktarı, +Batch and Serial No,Parti ve Seri No, +Batch not created for item {} since it does not have a batch series.,{} öğesi için parti oluşturulamadı çünkü parti serisi yok., +Batch {0} and Warehouse,Parti {0} ve Depo, +Batch {0} is not available in warehouse {1},{0} partisi {1} deposunda mevcut değil, +Batchwise Valuation,Toplu Değerleme, +Beginning of the current subscription period,Mevcut abonelik döneminin başlangıcı, +Below Subscription Plans are of different currency to the party default billing currency/Company currency: {0},"Aşağıdaki Abonelik Planları, carinin varsayılan Fatura Para Birimi / Şirket Para Birimi {0} ile farklı para birimindedir.", +Billed Items To Be Received,Alınacak Faturalı Ürünler, +"Billed, Received & Returned","Faturalandı, Teslim Alındı & İade Edildi", +Billing Address Details,Fatura Adresi Bilgileri, +Billing Interval in Subscription Plan must be Month to follow calendar months,Abonelik Planındaki Fatura Aralığı takvim aylarını takip etmek için Aylık olmalıdır, +Bisect Accounting Statements,İkiye Bölünmüş Muhasebe Tabloları, +Bisect Left,Sola İkiye Böl, +Bisect Nodes,Grupları İkiye Böl, +Bisect Right,Sağa İkiye Böl, +Bisecting From,Bölme Başlangıcı, +Bisecting Left ...,Sola İkiye Bölünüyor..., +Bisecting Right ...,Sağ İkiye Bölünüyor..., +Bisecting To,İkiye Bölme, +Bom No,Ürün Ağacı No, +Book Advance Payments as Liability option is chosen. Paid From account changed from {0} to {1}.,Avans Ödemelerini Borç Olarak Kaydet seçeneği seçildi. Ödeme Hesabı {0} hesabından {1} olarak değiştirildi., +Book an appointment,Randevu oluşturun, +Booking stock value across multiple accounts will make it harder to track stock and account value.,"Stok değerinin birden fazla hesaba kaydedilmesi, stok ve hesap değerinin izlenmesini zorlaştıracaktır.", +Books have been closed till the period ending on {0},Defterler {0} adresinde sona eren döneme kadar kapatılmıştır., +Both Payable Account: {0} and Advance Account: {1} must be of same currency for company: {2},Hem Borç Hesabı: {0} hem de Avans Hesabı: {1} şirket için aynı para biriminde olmalıdır: {2}, +Both Receivable Account: {0} and Advance Account: {1} must be of same currency for company: {2},Hem Alacak Hesabı: {0} hem de Avans Hesabı: {1} şirket için aynı para biriminde olmalıdır: {2}, +Both {0} Account: {1} and Advance Account: {2} must be of same currency for company: {3},Hem {0} Hesap: {1} hem de Avans Hesap: {2} şirket için aynı para biriminde olmalıdır: {3}, +Budget Exceeded,Bütçe Aşıldı, +Build All?,Tümünü Oluştur?, +Build Tree,Ağaç Oluştur, +Buildable Qty,Üretilebilir Miktar, +Bulk Transaction Log,Toplu İşlem Günlüğü, +Bulk Transaction Log Detail,Toplu İşlem Günlüğü Detayı, +Bulk Update,Toplu Güncelleme, +Bundle Items,Paket Ürünler, +"By default, the Supplier Name is set as per the Supplier Name entered. If you want Suppliers to be named by a Naming Series choose the 'Naming Series' option.","Varsayılan olarak Tedarikçi Adı, girilen Tedarikçi Adına göre ayarlanır. Tedarikçilerin Adlandırma Serisi ile adlandırılmasını istiyorsanız 'Seri Adlandırma' seçeneğini seçin.", +Bypass credit check at Sales Order,Satış Siparişinde Borç Limiti Kontrolünü Atla, +CC,Bilgi, +COGS By Item Group,Ürün Grubuna Göre Satılan Malın Maliyeti, +COGS Debit,Satılan Malın Maliyeti Borç Kaydı, +CRM Note,CRM Notu, +Calculate daily depreciation using total days in depreciation period,Amortisman dönemindeki toplam gün sayısını kullanarak günlük amortismanı hesaplayın, +Call Again,Tekrar Ara, +Call Ended,Görüşme Sonlandı, +Call Handling Schedule,Çağrı Yönetim Programı, +Call Received By,Çağrı Alındı, +Call Receiving Device,Çağrı Alma Cihazı, +Call Routing,Çağrı Yönlendirme, +Call Schedule Row {0}: To time slot should always be ahead of From time slot.,Çağrı Programı Satırı {0}: Kime zaman aralığı her zaman Kimden zaman aralığının önünde olmalıdır., +Call Type,Çağrı Türü, +Callback,Geri ara, +Campaign Item,Kampanya Ürünü, +Can not close Work Order. Since {0} Job Cards are in Work In Progress state.,{0} İş Kartı Devam Ediyor durumunda olduğu için İş Emri kapatılamıyor., +"Can not filter based on Child Account, if grouped by Account",Hesaba göre gruplanmışsa Alt Hesaba göre filtreleme yapılamaz, +"Can't change the valuation method, as there are transactions against some items which do not have its own valuation method",Kendi değerleme yöntemi olmayan bazı kalemlere karşı işlemler olduğu için değerleme yöntemi değiştirilemez, +Can't disable batch wise valuation for active batches.,Aktif partiler için parti bazında değerleme devre dışı bırakılamıyor., +Can't disable batch wise valuation for items with FIFO valuation method.,FIFO değerleme yöntemine sahip kalemler için parti bazında değerleme devre dışı bırakılamıyor., +Cannot Merge,Birleştirilemez, +Cannot Resubmit Ledger entries for vouchers in Closed fiscal year.,Kapalı mali yıldaki fişler için Defter girişleri Yeniden Gönderilemez., +"Cannot amend {0} {1}, please create a new one instead.","{0} {1} değiştirilemiyor, lütfen bunu düzenlemek yerine yeni bir tane oluşturun.", +Cannot apply TDS against multiple parties in one entry,Bir girişte birden fazla tarafa karşı Stopaj Vergisi uygulanamaz, +Cannot cancel as processing of cancelled documents is pending.,İptal edilen belgelerin işlenmesi beklemede olduğundan iptal edilemiyor., +Cannot cancel the transaction. Reposting of item valuation on submission is not completed yet.,İşlem iptal edilemiyor. Gönderim sırasında Ürün değerlemesinin yeniden yayınlanması henüz tamamlanmadı., +Cannot change Reference Document Type.,Referans Belge Türü değiştirilemiyor., +Cannot complete task {0} as its dependant task {1} are not completed / cancelled.,{0} görevi tamamlanamıyor çünkü bağımlı görevi {1} tamamlanmadı/iptal edilmedi., +Cannot convert Task to non-group because the following child Tasks exist: {0}.,Aşağıdaki alt Görevler mevcut olduğundan Görev grup dışı olarak dönüştürülemiyor: {0}., +Cannot convert to Group because Account Type is selected.,Hesap Türü seçili olduğundan Gruba dönüştürülemiyor., +Cannot create Stock Reservation Entries for future dated Purchase Receipts.,İleri tarihli Alış İrsaliyeleri için Stok Rezervasyon Girişleri oluşturulamıyor., +Cannot create a pick list for Sales Order {0} because it has reserved stock. Please unreserve the stock in order to create a pick list.,Rezerve stok olduğundan {0} Satış Siparişi için bir Çekme Listesi oluşturulamıyor. Çekme Listesi oluşturmak için lütfen stok rezervini kaldırın., +Cannot create accounting entries against disabled accounts: {0},Devre dışı bırakılan hesaplar için muhasebe girişleri oluşturulamıyor: {0}, +Cannot delete Exchange Gain/Loss row,Kur Farkı Satırı Silinemiyor, +Cannot disable batch wise valuation for FIFO valuation method.,FIFO değerleme yöntemi için parti bazında değerleme devre dışı bırakılamıyor., +Cannot enqueue multi docs for one company. {0} is already queued/running for company: {1},Bir şirket için birden fazla belge sıraya alınamıyor. {0} zaten şu şirket için sıraya alındı/çalışıyor: {1}, +Cannot find a default warehouse for item {0}. Please set one in the Item Master or in Stock Settings.,{0} ürünü için varsayılan bir depo bulunamadı. Lütfen Ürün Ana Verisi'nde veya Stok Ayarları'nda bir tane ayarlayın., +Cannot make any transactions until the deletion job is completed,Silme işi tamamlanana kadar herhangi bir işlem yapılamaz, +Cannot produce more item for {0},{0} için daha fazla ürün üretilemiyor, +Cannot produce more than {0} items for {1},{1} için {0} Üründen fazlasını üretemezsiniz, +Cannot receive from customer against negative outstanding,Negatif bakiye karşılığında müşteriden teslim alınamıyor, +Cannot retrieve link token for update. Check Error Log for more information,Güncelleme için bağlantı token'ı alınamıyor. Daha fazla bilgi için Hata Günlüğünü kontrol edin, +Cannot retrieve link token. Check Error Log for more information,Güncelleme için bağlantı token'ı alınamıyor. Daha fazla bilgi için Hata Günlüğünü kontrol edin, +Cannot {0} from {1} without any negative outstanding invoice,{1} üzerinde herhangi bir negatif açık faturası olmadan {0} yapılamaz, +Canonical URI,Benzersiz URL, +Capacity (Stock UOM),Kapasite (Stok Birimi), +Capacity in Stock UOM,Stok Birimindeki Kapasite, +Capacity must be greater than 0,Kapasite 0'dan büyük olmalıdır, +Capitalization Method,Sermaye Yöntemi, +Capitalize Asset,Varlığı Sermayeleştir, +Capitalize Repair Cost,Onarım Maliyetini Aktifleştir, +Capitalized,Sermayeleştirildi, +Carrier,Taşıyıcı, +Carrier Service,Taşıma Hizmeti, +Category Details,Kategori Detayları, +Caution: This might alter frozen accounts.,Dikkat: Bu işlem dondurulmuş hesapları değiştirebilir., +Change in Stock Value,Stok Değerindeki Değişim, +Changed customer name to '{}' as '{}' already exists.,'{}' zaten mevcut olduğundan müşteri adı '{}' olarak değiştirildi., +Changes,Değişiklikler, +Charge of type 'Actual' in row {0} cannot be included in Item Rate or Paid Amount,{0} satırındaki 'Gerçekleşen' türündeki ücret Kalem Oranına veya Ödenen Tutara dahil edilemez, +Checked On,Kontrol Edildi, +Checking this will round off the tax amount to the nearest integer,Bu işaretlendiğinde vergi tutarı en yakın tam sayıya yuvarlanır, +Cheques and Deposits Incorrectly cleared,Çekler ve Mevduatlar Hatalı Şekilde Temizlenmiş, +Child Row Reference,Alt Satır Referansı, +Choose a WIP composite asset,Bir Yarı Mamul Bileşik Varlık Seçin, +Clear Demo Data,Demo Verilerini Temizle, +Clear Notifications,Bildirimleri Temizle, +Clearing Demo Data...,Demo Verileri Temizleniyor..., +Click on 'Get Finished Goods for Manufacture' to fetch the items from the above Sales Orders. Items only for which a BOM is present will be fetched.,Yukarıdaki Satış Siparişlerinden öğeleri almak için 'Üretim İçin Bitmiş Ürünleri Al'a tıklayın. Yalnızca Ürün Ağacı bulunan Ürünler alınacaktır., +Click on Add to Holidays. This will populate the holidays table with all the dates that fall on the selected weekly off. Repeat the process for populating the dates for all your weekly holidays,"Tatillere Ekle'ye tıklayın. Bu işlem, tatiller tablosunu seçilen haftalık izin gününe denk gelen tüm tarihlerle dolduracaktır. Tüm haftalık tatillerinizin tarihlerini doldurmak için işlemi tekrarlayın", +Click on Get Sales Orders to fetch sales orders based on the above filters.,Yukarıdaki filtrelere göre satış siparişlerini almak için Satış Siparişlerini Getir butonuna tıklayın., +Click to add email / phone,E-posta / telefon eklemek için tıklayın, +Closed Work Order can not be stopped or Re-opened,Kapatılan İş Emri durdurulamaz veya Yeniden Açılamaz, +Closing Balance as per Bank Statement,Banka Hesap Özetine Göre Kapanış Bakiyesi, +Closing Balance as per ERP,ERP'ye göre Kapanış Bakiyesi, +Code List,Kod Listesi, +Columns are not according to template. Please compare the uploaded file with standard template,Sütunlar şablona göre değil. Lütfen yüklenen dosyayı standart şablonla karşılaştırın, +Common Code,Ortak Kod, +Communication Channel,İletişim Türü, +Company Address Display,Şirket Adres Gösterimi, +Company Contact Person,Şirket İrtibat Kişisi, +Company Tax ID,Şirket Vergi Numarası, +Company and Posting Date is mandatory,Şirket ve Kaydetme Tarihi zorunludur, +Company is mandatory,Şirket zorunludur, +Company is mandatory for generating an invoice. Please set a default company in Global Defaults.,Fatura oluşturmak için şirket zorunludur. Lütfen Global Varsayılanlar'da varsayılan bir şirket ayarlayın., +Company which internal customer represents,İç müşterinin temsil ettiği şirket, +Company which internal customer represents.,İç müşterinin temsil ettiği şirket., +Company which internal supplier represents,Dahili tedarikçinin temsil ettiği şirket, +Company {0} is added more than once,Şirket {0} birden fazla kez eklendi, +Company {} does not exist yet. Taxes setup aborted.,{} şirketi henüz mevcut değil. Vergi kurulumu iptal edildi., +Company {} does not match with POS Profile Company {},"{} Şirketi, {} Şirketi POS Profili ile eşleşmiyor", +Competitor,Rakip, +Competitor Detail,Rakip Detayları, +Competitor Name,Rakip Adı, +Competitors,Rakipler, +Complete Job,İşi Tamamla, +Complete Order,Siparişi Tamamla, +Completed On,Tamamlanma Tarihi, +Completed On cannot be greater than Today,Tamamlanma Tarihi Bugünden büyük olamaz, +Completed Tasks,Tamamlanan Görevler, +Completed Time,Tamamlanma Zamanı, +Completion Date can not be before Failure Date. Please adjust the dates accordingly.,Tamamlanma Tarihi Arıza Tarihinden önce olamaz. Lütfen tarihleri buna göre ayarlayın., +Conditional Rule,Koşullu Kural, +Conditional Rule Examples,Koşullu Kural Örnekleri, +Configure Product Assembly,Ürün Montajını Yapılandırma, +Consider Entire Party Ledger Amount,Tüm Parti Defteri Tutarını Dikkate Alın, +Considered In Paid Amount,Ödenen Tutar İçerisinde Sayılır, +Consolidate Sales Order Items,Satış Siparişi Ürünlerini Birleştir, +Consumed Asset Total Value,Tüketilen Varlık Toplam Değeri, +Consumed Assets,Tüketilen Varlıklar, +Consumed Quantity,Tüketilen Miktar, +Consumed Stock Items,Tüketilen Stok Ürünleri, +Consumed Stock Items or Consumed Asset Items are mandatory for creating new composite asset,Tüketilen Stok Kalemleri veya Tüketilen Varlık Kalemleri yeni bileşik varlık oluşturmak için zorunludur, +"Consumed Stock Items, Consumed Asset Items or Consumed Service Items is mandatory for Capitalization","Tüketilen Stok Kalemleri, Tüketilen Varlık Kalemleri veya Tüketilen Hizmet Kalemleri Aktifleştirme için zorunludur", +Consumed Stock Total Value,Tüketilen Stok Toplam Değeri, +Consumption Rate,Tüketim Oranı, +Contact Details,İletişim Detayları, +Contact Us Settings,İletişim Ayarları, +Contacts,Kişiler, +Contract Template Help,Sözleşme Şablonu Yardımı, +Contribution Qty,Katkı Miktarı, +Conversion factor for item {0} has been reset to 1.0 as the uom {1} is same as stock uom {2}.,"Ürün {0} için dönüşüm faktörü, birimi {1} stok birimi {2} ile aynı olduğu için 1.0 olarak sıfırlandı", +Convert to Group,Gruba Dönüştür,Warehouse +Convert to Item Based Reposting,Ürün Bazlı Yeniden Kayıt İşlemine Dönüştür, +Convert to Ledger,Deftere Dönüştür,Warehouse +Core,Çekirdek, +Corrective Job Card,Düzeltici Faaliyet İş Kartı, +Corrective Operation,Düzeltici Faaliyet, +Corrective Operation Cost,Düzeltici Faaliyet Maliyeti, +Cost Center Allocation Percentage,Maliyet Merkezi Dağılımı Yüzdesi, +Cost Center Allocation Percentages,Maliyet Merkezi Dağılımı Yüzdeleri, +Cost Center For Item with Item Code {0} has been Changed to {1},{0} Ürün Kodlu Ürün İçin Maliyet Merkezi {1} Olarak Değiştirildi, +"Cost Center is a part of Cost Center Allocation, hence cannot be converted to a group","Maliyet Merkezi, Maliyet Merkezi Tahsisinin bir parçasıdır, dolayısıyla bir gruba dönüştürülemez", +Cost Center with Allocation records can not be converted to a group,Mevcut işlemleri olan Maliyet Merkezi gruba dönüştürülemez., +Cost Center {0} cannot be used for allocation as it is used as main cost center in other allocation record.,Maliyet Merkezi {0} diğer tahsis kayıtlarında ana maliyet merkezi olarak kullanıldığından tahsis için kullanılamaz., +Cost Center {} doesn't belong to Company {},"Maliyet Merkezi {}, {} Şirketine ait değil", +Cost Center {} is a group cost center and group cost centers cannot be used in transactions,Maliyet Merkezi {} bir grup maliyet merkezidir ve grup maliyet merkezleri işlemlerde kullanılamaz, +Cost Per Unit,Birim Başına Maliyet, +Cost of Poor Quality Report,Kalitesizlik Maliyeti Raporu, +Costing Details,Maliyet Detayları, +Could Not Delete Demo Data,Demo Verileri Silinemedi, +Could not auto update shifts. Shift with shift factor {0} needed.,Vardiyalar otomatik olarak güncellenemedi. {0} vardiya faktörüne sahip vardiyaya ihtiyaç var., +Could not detect the Company for updating Bank Accounts,Banka Hesaplarını güncellemek için Şirket tespit edilemedi, +Could not find path for ,Yol bulunamadı , +Count,Sayı, +Create Depreciation Entry,Amortisman Kaydı Oluştur, +Create Employee records.,Personel Kayıtları Oluştur., +Create Grouped Asset,Gruplandırılmış Varlık Oluştur, +Create Journal Entries,Muhasebe Girişlerini Oluştur, +Create Link,Bağlantı Oluştur, +Create Multi-level BOM,Çok Seviyeli Ürün Ağacı Oluştur, +Create New Customer,Yeni Müşteri Oluştur, +Create Opportunity,Fırsat Oluştur, +Create Prospect,Potansiyel Müşteri Oluştur, +Create Reposting Entries,Yeniden Gönderim Girişleri Oluştur, +Create Reposting Entry,Yeniden Gönderim Girişi Oluştur, +Create Stock Entry,Stok Girişi Oluştur, +Create Workstation,İş İstasyonu Oluştur, +Create a new composite asset,Yeni bir bileşik varlık oluşturun, +Create a variant with the template image.,Şablon görselini kullanarak bir varyant oluşturun., +Create in Draft Status,Taslak Olarak Oluştur, +Create {0} {1} ?,{0} {1} oluştur?, +Created On,Oluşturulma Zamanı, +Created {0} scorecards for {1} between:,"{1} için, şu tarih aralığında {0} adet puan kartı oluşturuldu: +", +Creating Delivery Note ...,İrsaliye Oluşturuluyor..., +Creating Journal Entries...,Defter Girişleri Oluşturuluyor..., +Creating Packing Slip ...,Paketleme Fişi Oluşturuluyor ..., +Creating Purchase Invoices ...,Satın Alma Faturaları Oluşturuluyor..., +Creating Purchase Receipt ...,Satın Alma İrsaliyesi Oluşturuluyor..., +Creating Sales Invoices ...,Satış Faturaları Oluşturuluyor..., +Creating Stock Entry,Stok Girişi Oluşturun, +Creating Subcontracting Order ...,Alt Yüklenici Siparişi Oluşturuluyor ..., +Creating Subcontracting Receipt ...,Alt Yüklenici İrsaliyesi Oluşturuluyor..., +Creating User...,Kullanıcı Oluşturuluyor..., +Creation,Oluşturma, +Creation of {1}(s) successful,{1} oluşturma başarılı, +"Creation of {0} failed. + Check Bulk Transaction Log","{0} oluşturma başarısız oldu. + Toplu İşlem Günlüğünü Kontrol Edin", +"Creation of {0} partially successful. + Check Bulk Transaction Log","{0} oluşturulması kısmen başarılı. + Toplu İşlem Günlüğü Kontrol Edin", +Credit Amount in Transaction Currency,İşlem Para Birimindeki Alacak Tutarı, +Credit Limit Crossed,Borç Limiti Aşıldı, +"Credit Note will update it's own outstanding amount, even if 'Return Against' is specified.","Alacak Dekontu, ""Karşı İade"" belirtilmiş olsa bile kendi bakiye tutarını güncelleyecektir.", +Cron Interval should be between 1 and 59 Min,Cron Aralığı 1 ile 59 Dakika arasında olmalıdır, +Currency Exchange Settings Details,Döviz Kuru Ayarları Detayları, +Currency Exchange Settings Result,Döviz Kurları Ayarları Sonucu, +Current Asset,Dönen Varlık, +Current Index,Güncel Dizin, +Current Level,Mevcut Seviye, +Current Liability,Kısa Vadeli Borç, +Current Node,Mevcut Düğüm, +Current Serial / Batch Bundle,Mevcut Seri / Parti Paketi, +Custom,Özel, +Custom delimiters,Özel Ayırıcılar, +Customer ,Müşteri , +Customer / Item / Item Group,Müşteri / Ürün / Ürün Grubu, +Customer Group Item,Müşteri Grubu Öğesi, +Customer Group: {0} does not exist,Müşteri Grubu: {0} mevcut değil, +Customer Item,Müşteri Ürünü, +Customer Name: ,Müşteri İsmi: , +Customer: ,Müşteri: , +Daily Time to send,Günlük Gönderme Zamanı, +Dashboard,Gösterge Paneli, +Data Based On,Tarihe Göre, +Date ,Tarih , +Date must be between {0} and {1},Tarih {0} ile {1} arasında olmalıdır., +Dates,Tarihler, +Days before the current subscription period,Mevcut abonelik döneminden önceki günler, +DeLinked,Bağlantı Kesildi, +"Dear System Manager,","Sayın Sistem Yöneticisi,", +Debit Amount in Transaction Currency,İşlem Para Birimindeki Borç Tutarı, +"Debit Note will update it's own outstanding amount, even if 'Return Against' is specified.","İade Faturası, ‘Karşı Fatura’ belirtilmiş olsa bile kendi açık bakiyesini güncelleyecektir.", +Debit-Credit Mismatch,Borç-Alacak Uyuşmazlığı, +Debit-Credit mismatch,Borç-Alacak uyuşmazlığı, +Default Advance Account,Varsayılan Avans Hesabı, +Default Advance Paid Account,Varsayılan Ödenen Avans Hesabı, +Default Advance Received Account,Varsayılan Alınan Avans Hesabı, +Default BOM not found for FG Item {0},{0} Ürünü için Varsayılan Ürün Ağacı bulunamadı, +Default Common Code,Varsayılan Ortak Kod, +Default Discount Account,Varsayılan İndirim Hesabı, +Default Operating Cost Account,Varsayılan Operasyon Maliyeti Hesabı, +Default Payment Discount Account,Varsayılan İndirim Hesabı, +Default Service Level Agreement for {0} already exists.,{0} için Varsayılan Hizmet Düzeyi Sözleşmesi zaten mevcut., +Default Unit of Measure for Item {0} cannot be changed directly because you have already made some transaction(s) with another UOM. You need to either cancel the linked documents or create a new Item.,{0} Ürünü için Varsayılan Ölçü Birimi doğrudan değiştirilemez çünkü zaten başka bir Ölçü Birimi ile bazı işlemler yaptınız. Ya bağlantılı belgeleri iptal etmeniz ya da yeni bir Ürün oluşturmanız gerekir., +Default settings for your stock-related transactions,Stok ile alakalı işlemlerin Varsayılan Ayarları, +"Default tax templates for sales, purchase and items are created.","Satış, satın alma ve kalemler için varsayılan vergi şablonları oluşturulur.", +Deferred Accounting Defaults,Ertelenmiş Muhasebe Ayarları, +Deferred Revenue and Expense,Ertelenmiş Gelir ve Gider, +Deferred accounting failed for some invoices:,Bazı faturalar için ertelenmiş muhasebe başarısız oldu:, +Delay (In Days),Gecikme (Gün), +Delayed,Gecikti, +Delete Bins,Kutuları Sil, +Delete Cancelled Ledger Entries,İptal Edilen Defter Girişlerini Sil, +Delete Dimension,Boyutu Sil, +Delete Leads and Addresses,Potansiyel Müşterileri ve Adresleri Sil, +Deleted Documents,Silinen Belgeler, +Deleting {0} and all associated Common Code documents...,{0} ve ilişkili tüm Ortak Kod belgeleri siliniyor..., +Deletion in Progress!,Silme İşlemi Devam Ediyor!, +Delimiter options,Sınırlayıcı seçenekleri, +Delivery Manager,Sevkiyat Yöneticisi, +Delivery Note(s) created for the Pick List,"İrsaliyeler, Paketleme için oluşturuldu", +Delivery User,Sevkiyat Sorumlusu, +Delivery to,Teslimat, +Demand,Talep, +Demo Company,Demo Şirketi, +Demo data cleared,Demo verileri temizlendi, +Dependant SLE Voucher Detail No,Bağlı Stok Giriş Belgesi Detay Numarası, +Dependent Task {0} is not a Template Task,Bağımlı Görev {0} bir Şablon Görevi değildir, +Deposit,Mevduat, +Depreciate based on daily pro-rata,Günlük Orantılı Amortisman, +Depreciate based on shifts,Vardiyalara göre amortisman, +Depreciation Details,Amortisman Detayları, +Depreciation Entry Posting Status,Amortisman Girişi Gönderme Durumu, +Depreciation Expense Account should be an Income or Expense Account.,Amortisman Gider Hesabı bir Gelir veya Gider Hesabı olmalıdır., +Depreciation Posting Date cannot be before Available-for-use Date,"Amortisman Kayıt Tarihi, Kullanıma Hazır Tarihten önce olamaz", +Depreciation Row {0}: Depreciation Posting Date cannot be before Available-for-use Date,"Amortisman Satırı {0}: Amortisman Kayıt Tarihi, Kullanıma Hazır Tarihinden önce olamaz", +Depreciation Schedule View,Amortisman Planı, +Depreciation cannot be calculated for fully depreciated assets,Tam amortismana tabi varlıklar için amortisman hesaplanamaz, +Description of Content,İçerik Açıklaması, +Desk User,Sistem Kullanıcısı, +Difference In,Fark, +Difference Posting Date,Fark Gönderme Tarihi, +Difference Qty,Fark Miktarı, +Different 'Source Warehouse' and 'Target Warehouse' can be set for each row.,Her satır için farklı 'Kaynak Depo' ve 'Hedef Depo' ayarlanabilir., +Dimension Details,Boyut Detayları, +Dimension Filter Help,Boyut Filtresi Yardımı, +Dimension-wise Accounts Balance Report,Boyut bazında Hesap Bakiye Raporu, +Dimensions,Boyutlar, +Direct Expense,Doğrudan Gider, +Disabled Account Selected,Devre Dışı Hesap Seçildi, +Disabled Warehouse {0} cannot be used for this transaction.,"{0} Deposu devre dışı bırakıldığından, bu işlem için kullanılamaz.", +Disabled pricing rules since this {} is an internal transfer,"{} iç transfer olduğu için, fiyatlandırma kuralı devre dışı bırakıldı.", +Disabled tax included prices since this {} is an internal transfer,"{0} bir dahili transfer olduğundan, vergiler dahil fiyatlar devre dışı bırakıldı", +Disassemble,Sök, +Disassemble Order,Sökme Emri, +Discount Account,İndirim Hesabı, +Discount Date,İndirim Tarihi, +Discount Validity,İndirim Geçerliliği, +Discount Validity Based On,İndirim Geçerliliğine Göre, +Discount cannot be greater than 100%.,İndirim %100'den fazla olamaz., +Discount of {} applied as per Payment Term,Ödeme Vadesine göre {} indirim uygulandı, +Discounted Amount,İndirimli Tutar, +"Discounts to be applied in sequential ranges like buy 1 get 1, buy 2 get 2, buy 3 get 3 and so on","İndirimler 1 alana 1 bedava, 2 alana 2 bedava, 3 alana 3 bedava gibi sıralı aralıklarla uygulanacak", +Discrepancy between General and Payment Ledger,Genel Muhasebe Defteri ile Ödeme Defteri Arasındaki Uyuşmazlık, +Dispatch Address,Sevkiyat Adresi, +Distinct Item and Warehouse,Farklı Ürün ve Depo, +Distribute Additional Costs Based On ,Ek Maliyetleri Şunlara Göre Dağıtın , +Do Not Explode,Detaylandırmayı Kapat, +Do Not Update Serial / Batch on Creation of Auto Bundle,Otomatik Paket Oluşturulurken Seri / Parti Güncellenesi Yapmayın, +Do Not Use Batch-wise Valuation,Toplu Değerleme Kullanma, +Do reposting for each Stock Transaction,Her Stok Hareketi İşlemi için yeniden gönderim yapın, +Do you still want to enable negative inventory?,Hala negatif envanteri etkinleştirmek istiyor musunuz?, +DocField,DocType Alanı, +DocTypes should not be added manually to the 'Excluded DocTypes' table. You are only allowed to remove entries from it.,DocType'lar 'Hariç Tutulan Doküman Türleri' tablosuna manuel olarak eklenmemelidir. Yalnızca buradaki girişleri kaldırmanıza izin verilir., +Document Type already used as a dimension,Belge Türü zaten bir boyut olarak kullanılıyor, +Documents,Belgeler, +Documents Processed on each trigger. Queue Size should be between 5 and 100,Her tetikleyicide işlenen belgeler. Kuyruk Boyutu 5 ile 100 arasında olmalıdır, +Documents: {0} have deferred revenue/expense enabled for them. Cannot repost.,Belgeler: {0} için ertelenmiş gelir/gider etkinleştirildi. Yeniden gönderilemiyor., +Domain Settings,Etki Alanı Ayarları, +Don't Send Emails,E-Posta Gönderme, +Dont Recompute tax,Vergiyi Yeniden Hesaplamayın, +Download Backups,Yedekleri İndir, +Download CSV Template,CSV Şablonunu İndir, +Download PDF for Supplier,Tedarikçi için PDF İndir, +Dunning Amount (Company Currency),Gecikme Ücreti Tutarı (Şirket Para Birimi), +Dunning Level,İhtar Seviyesi, +Duplicate Customer Group,Müşteri Grubunu Çoğalt, +Duplicate Finance Book,Finans Defterini Çoğalt, +Duplicate Item Group,Ürün Grubunu Çoğalt, +Duplicate POS Invoices found,Yinelenen POS Faturaları bulundu, +Dynamic Condition,Dinamik Koşul, +Edit Capacity,Kapasiteyi Düzenle, +Edit Cart,Grafiği Düzenle, +Edit Full Form,Tam Sayfa Düzenle, +Edit Note,Notu Düzenle, +Editing {0} is not allowed as per POS Profile settings,POS Profili ayarlarına göre {0} düzenlemesine izin verilmiyor, +Either 'Selling' or 'Buying' must be selected,'Satış' veya 'Alış' seçeneklerinden biri seçilmelidir, +Email / Notifications,E-posta / Bildirimler, +Email Address (required),E-posta Adresi (gerekli), +"Email Address must be unique, it is already used in {0}","E-posta Adresi benzersiz olmalıdır, {0} için zaten kullanılıyor", +Email Digest Recipient,E-posta Özeti Alıcısı, +Email Digest: {0},E-posta Özeti: {0}, +Email Domain,E-posta Etki Alanı, +Email Receipt,E-posta Makbuzu, +Email or Phone/Mobile of the Contact are mandatory to continue.,Devam etmek için İletişim Kişisinin E-postası veya Telefon/Cep Telefonu zorunludur., +Email verification failed.,E-posta doğrulaması başarısız oldu., +Employee User Id,Personel Kullanıcı ID, +Enable Allow Partial Reservation in the Stock Settings to reserve partial stock.,Belirli bir sipariş için envanterden belirli bir miktarı ayırmaya izin verir., +Enable Fuzzy Matching,Bulanık Eşleştirmeyi Etkinleştir, +Enable Health Monitor,Sağlık Monitörünü Etkinleştir, +Enable Immutable Ledger,Değiştirilemez Defteri Etkinleştir, +Enable Stock Reservation,Stok Ayırmayı Etkinleştir, +Enable this checkbox even if you want to set the zero priority,Sıfır önceliğini ayarlamak isteseniz bile bu onay kutusunu etkinleştirin, +"Enable this option to calculate daily depreciation by considering the total number of days in the entire depreciation period, (including leap years) while using daily pro-rata based depreciation","Günlük orantılı amortisman esaslı amortismanı kullanırken, tüm amortisman dönemindeki (artık yıllar dahil) toplam gün sayısını dikkate alarak günlük amortismanı hesaplamak için bu seçeneği etkinleştirin", +Enable to apply SLA on every {0},Her {0} adresinde SLA uygulamayı etkinleştirin, +Enabling this ensures each Purchase Invoice has a unique value in Supplier Invoice No. field within a particular fiscal year,"Bunun etkinleştirilmesi, her bir Satın Alma Faturasının belirli bir mali yıl içinde Tedarikçi Fatura No. alanında benzersiz bir değere sahip olmasını sağlar", +Enabling this will change the way how cancelled transactions are handled.,"Bunu etkinleştirmek, iptal edilen işlemlerin işlenme biçimini değiştirecektir.", +End Transit,Taşımayı Sonlandır, +End of the current subscription period,Mevcut abonelik döneminin sonu, +"Enter First and Last name of Employee, based on Which Full Name will be updated. IN transactions, it will be Full Name which will be fetched.","Personelin Adı ve Soyadını Girin, buna göre Tam Adı güncellenecektir. İşlemlerde, Tam Ad kullanılacaktır.", +Enter Manually,Elle Girin, +Enter Serial Nos,Seri Numaralarını Girin, +Enter Visit Details,Ziyaret Ayrıntılarını Girin, +Enter a name for Routing.,Yönlendirme için bir ad girin., +"Enter a name for the Operation, for example, Cutting.","Operasyon için bir ad girin, örneğin Kesme.", +Enter a name for this Holiday List.,Bu Tatil Listesi için bir ad girin., +"Enter an Item Code, the name will be auto-filled the same as Item Code on clicking inside the Item Name field.","Bir Ürün Kodu girin, Ürün Adı alanına tıklandığında ad, Ürün Kodu ile aynı şekilde otomatik olarak doldurulacaktır.", +Enter each serial no in a new line,Her seri numarasını yeni bir satıra girin, +"Enter the Operation, the table will fetch the Operation details like Hourly Rate, Workstation automatically. + + After that, set the Operation Time in minutes and the table will calculate the Operation Costs based on the Hourly Rate and Operation Time.","Operasyona girin, tablo Saatlik Ücret, İş İstasyonu gibi Operasyon detaylarını otomatik olarak getirecektir. + + Bundan sonra, Operasyon Süresini dakika olarak ayarlayın ve tablo Saatlik Ücret ve Operasyon Süresine göre Operasyon Maliyetlerini hesaplayacaktır.", +Enter the opening stock units.,Açılış stok birimlerini girin., +Enter the quantity of the Item that will be manufactured from this Bill of Materials.,Bu Ürün Ağacından üretilecek Ürünün miktarını girin., +Enter the quantity to manufacture. Raw material Items will be fetched only when this is set.,Üretilecek miktarı girin. Hammadde Kalemleri yalnızca bu ayarlandığında getirilecektir., +Error during caller information update,Arayan bilgileri güncellenirken hata oluştu, +Error in party matching for Bank Transaction {0},Banka İşlemi için cari eşleştirmesinde hata {0}, +Error while posting depreciation entries,Amortisman girişleri kaydedilirken hata oluştu, +Error while processing deferred accounting for {0},{0} için ertelenmiş muhasebe işlenirken hata oluştu, +Error while reposting item valuation,Ürün değerlemesi yeniden gönderilirken hata oluştu, +"Error: This asset already has {0} depreciation periods booked. + The `depreciation start` date must be at least {1} periods after the `available for use` date. + Please correct the dates accordingly.","Hata: Bu varlık için zaten {0} amortisman dönemi ayrılmıştır. + Amortisman başlangıç tarihi, `kullanıma hazır` tarihinden en az {1} dönem sonra olmalıdır. + Lütfen tarihleri buna göre düzeltin.", +Errors Notification,Hata Bildirimi, +Even invoices with apply tax withholding unchecked will be considered for checking cumulative threshold breach,Vergi tevkifatı uygulanan faturalar bile kontrol edilmeden kümülatif eşik ihlalinin kontrol edilmesi için dikkate alınacaktır, +Event,Etkinlik, +Example URL,Örnek URL, +Example of a linked document: {0},Bağlantılı bir döküman örneği: {0}, +"Example: ABCD.##### +If series is set and Serial No is not mentioned in transactions, then automatic serial number will be created based on this series. If you always want to explicitly mention Serial Nos for this item. leave this blank.","Örnek: ABCD.##### + Seri ayarlanmışsa ve işlemlerde Seri No belirtilmemişse, bu seriye göre otomatik seri numarası oluşturulacaktır. Bu ürünün Seri No'larından her zaman açıkça bahsetmek istiyorsanız, bunu boş bırakın.", +Example: Serial No {0} reserved in {1}.,Örnek: Seri No {0} {1} adresinde ayrılmıştır., +Excess Materials Consumed,Tüketilen Fazla Malzemeler, +Excess Transfer,Fazla Transfer, +Exchange Gain / Loss,Kur Farkı Karı / Zararı, +Exchange Gain Or Loss,Döviz Kazancı veya Zararı, +Exchange Gain/Loss amount has been booked through {0},Döviz Kar/Zarar tutarı {0} adresinde muhasebeleştirilmiştir., +Excluded DocTypes,Hariç Tutulan DocType'lar, +Exempt Supplies,Vergiden Muaf Malzemeler, +Expected,Beklenen, +Expected Balance Qty,Beklenen Bakiye Miktarı, +Expected End Date should be less than or equal to parent task's Expected End Date {0}.,"Beklenen Bitiş Tarihi, ana görevin Beklenen Bitiş Tarihi {0} değerinden küçük veya ona eşit olmalıdır.", +Expected Stock Value,Beklenen Stok Değeri, +Expiry,Son kullanma tarihi, +Export Data,Dışarı Aktar, +Export Errored Rows,Hatalı Satırları Dışa Aktar, +Export Import Log,İçeri ve Dışarı Aktarma Günlüğü, +Extra Consumed Qty,Ekstra Tüketilen Miktar, +Extra Job Card Quantity,Ekstra İş Kartı Miktarı, +FIFO Queue vs Qty After Transaction Comparison,FIFO Sırası ve İşlem Sonrası Adet Karşılaştırması, +"FIFO Stock Queue (qty, rate)","FIFO Stok Kuyruğu (miktar, oran)", +FIFO/LIFO Queue,FIFO/LIFO Sırası, +Failed Entries,Başarısız Girişler, +"Failed to erase demo data, please delete the demo company manually.","Demo verileri silinemedi, lütfen demo şirketini manuel olarak silin.", +Failed to post depreciation entries,Amortisman Kayıtları Gönderilemedi, +Failed to setup defaults for country {0}. Please contact support.,Ülke için varsayılanlar ayarlanamadı {0}. Lütfen destek ile iletişime geçin., +Failure,Başarısız, +Failure Description,Arıza Açıklaması, +Fetch Based On,Şuna Göre Getir, +Fetch Overdue Payments,Gecikmiş Ödemeler, +Fetch Value From,Değeri Şuradan Getir, +Fetching Error,Veri Çekme Hatası, +Fetching exchange rates ...,Döviz kurları alınıyor ..., +Filter,Filtre, +Filter by Reference Date,Referans Tarihine Göre Filtrele, +Filter on Invoice,Fatura Filtresi, +Filter on Payment,Ödeme Filtresi, +Filters missing,Filtreler eksik, +Final Product,Final Ürün, +Financial Ratios,Finansal Oranlar, +Financial Year Begins On,Mali Yıl Başlangıcı, +Finished Good BOM,Nihai Ürünün Ürün Ağacı, +Finished Good Item,Bitmiş Ürün, +Finished Good Item Qty,Bitmiş Ürün Miktarı, +Finished Good Item Quantity,Bitmiş Ürün Miktarı, +Finished Good Item is not specified for service item {0},{0} Hizmet kalemi için Tamamlanmış Ürün belirtilmemiş, +Finished Good Item {0} Qty can not be zero,Bitmiş Ürün {0} Miktarı sıfır olamaz, +Finished Good Item {0} must be a sub-contracted item,Bitmiş Ürün {0} alt yüklenici ürünü olmalıdır, +Finished Good Qty,Bitmiş Ürün Miktarı, +Finished Good Quantity ,Bitmiş Ürün Miktarı , +Finished Good UOM,Bitmiş Ürün Ağacı Ölçü Birimi, +Finished Good {0} does not have a default BOM.,{0} isimli Ürünün varsayılan bir Ürün Ağacı bulunmuyor., +Finished Good {0} is disabled.,Bitmiş Ürün {0} devre dışı bırakılmıştır., +Finished Good {0} must be a stock item.,Bitmiş Ürün {0} stok ürünü olmalıdır., +Finished Good {0} must be a sub-contracted item.,Bitmiş Ürün {0} alt yüklenici ürünü olmalıdır., +Finished Goods Based Operating Cost,Ürün Bazlı Operasyonel Maliyeti, +Finished Goods Item,Bitmiş Ürün, +Finished Goods Reference,Bitmiş Ürün Referansı, +Finished Goods Value,Bitmiş Ürün Değeri, +Finished Goods based Operating Cost,Bitmiş Ürün Operasyon Maliyeti, +Finished Item {0} does not match with Work Order {1},Bitmiş Ürün {0} İş Emri {1} ile eşleşmiyor, +First Response Due,İlk Müdahale Zamanı, +First Response SLA Failed by {},İlk Müdahale SLA'sı {} Tarafından Başarısız Oldu, +Floor,Üretim Alanı, +For Item,Ürün için, +For Item {0} cannot be received more than {1} qty against the {2} {3},{0} Ürünü için {2} {3} karşılığında {1} miktarından fazla alınamaz., +For Job Card,İş Kartı İçin, +For Operation,Operasyon, +"For Return Invoices with Stock effect, '0' qty Items are not allowed. Following rows are affected: {0}",Stok etkili İade Faturaları için '0' adetlik Kalemlere izin verilmez. Aşağıdaki satırlar etkilenir: {0}, +For Work Order,İş Emri İçin, +For dunning fee and interest,İhtar ücreti ve faiz için, +"For item {0}, rate must be a positive number. To Allow negative rates, enable {1} in {2}",{0} Ürünü için oran pozitif bir sayı olmalıdır. Negatif oranlara izin vermek için {2} sayfasında {1} ayarını etkinleştirin, +For quantity {0} should not be greater than allowed quantity {1},{0} Miktarı izin verilen {1} miktarından büyük olmamalıdır, +"For the item {0}, the quantity should be {1} according to the BOM {2}.","Ürün {0} için miktar, {2} Ürün Ağacına göre {1} olmalıdır.", +"For the {0}, no stock is available for the return in the warehouse {1}.",{0} için {1} deposunda iade için stok bulunmamaktadır., +"For the {0}, the quantity is required to make the return entry",{0} için iade girişini oluşturmak amacıyla miktar gereklidir., +Force-Fetch Subscription Updates,Abonelik Güncellemelerini Zorla Getir, +Forecast,Tahmin, +Formula Based Criteria,Formüle Dayalı Kriter, +Free Item Rate,Ücretsiz Ürün Oranı, +From Corrective Job Card,Düzeltici İş Kartına Göre, +From Date and To Date are mandatory,Başlangıç Tarihi ve Bitiş Tarihi zorunludur, +From Date is mandatory,Başlangıç Tarihi zorunludur, +From Date: {0} cannot be greater than To date: {1},{0} Başlangıç Tarihi {1} Bitiş Tarihinden Büyük Olamaz, +From Doctype,Kaynak Doctype, +From Due Date,Vade Tarihinden İtibaren, +From Payment Date,Başlangıç Ödeme Tarihi, +From Prospect,Potansiyel Müşteriden, +From Reference Date,Referans Tarihinden İtibaren, +From Voucher Detail No,Kaynak Fatura No Detayı, +From Voucher No,Kaynak Fatura No, +From Voucher Type,Belge Türüne Göre Seç, +From and To dates are required,Başlangıç ve Bitiş tarihleri gereklidir, +Full and Final Statement,Tam ve Nihai Açıklama, +GL Balance,Genel Muhasebe Bakiyesi, +GL Entry Processing Status,GM Girişleri İşlenme Durumu, +GL reposting index,Genel Muhasebe Yeniden İşlem İndeksi, +Gain/Loss accumulated in foreign currency account. Accounts with '0' balance in either Base or Account currency,Yabancı para birimi hesabında biriken Kar/Zarar. Ana para birimi veya hesap para biriminde '0' bakiye bulunan hesaplar, +Gain/Loss already booked,Kazanç/Kayıp zaten kaydedildi, +Gain/Loss from Revaluation,Yeniden Değerlemeden Kaynaklanan Kâr/Zarar, +General Ledger,Genel Muhasebe,Warehouse +General and Payment Ledger Comparison,Genel ve Ödeme Defteri Karşılaştırması, +General and Payment Ledger mismatch,Genel ve Ödeme Defteri uyuşmazlığı, +Generate Demo Data for Exploration,Demo Verisi Oluştur, +Generate E-Invoice,E-Fatura Oluştur, +Generate Invoice At,Fatura Oluşturma Tarihi, +Generated,Oluşturuldu, +Generating Preview,Önizleme Oluşturuluyor, +Get Allocations,Tahsisleri Getir, +Get Customer Group Details,Müşteri Grubu Ayrıntıları, +Get Finished Goods for Manufacture,Üretim İçin Bitmiş Ürünleri Al, +Get Outstanding Orders,Ödenmemiş Siparişleri Getir, +Get Raw Materials Cost from Consumption Entry,Tüketim Girişinden Hammadde Maliyetini Getir, +Get Scrap Items,Hurda Ürünleri Getir, +Get Stock,Stok Getir, +Get Supplier Group Details,Tedarikçi Grubu Ayrıntılarını Alın, +Get Timesheets,Zaman Çizelgesini Getir, +Get stops from,Durakları Getir, +Getting Scrap Items,Hurda Ürünlerin Alınması, +Give free item for every N quantity,Her N adet için ücretsiz ürün verin, +Go back,Geri git, +Go to {0} List,{0} Listesine Git, +Goals,Hedefler, +Goods,Ürünler, +Greeting Message,Karşılama Mesajı, +Gross Profit Percent,Brüt Kâr Yüzdesi, +Gross Purchase Amount Too Low: {0} cannot be depreciated over {1} cycles with a frequency of {2} depreciations.,"Brüt Satın Alma Tutarı Çok Düşük: {0} , {2} amortisman sıklığı ile {1} döngüleri üzerinden amortismana tabi tutulamaz.", +Gross Purchase Amount should be equal to purchase amount of one single Asset.,"Brüt Satın Alma Tutarı, tek bir Varlığın satın alma tutarına eşit olmalıdır.", +Half-yearly,6 Aylık, +Handle Employee Advances,Çalışan Avanslarını Yönetin, +Has Alternative Item,Alternatif Ürün Var, +Has Item Scanned,Ürün Taraması, +Has Priority,Önceliği Var, +Heatmap,Isı Haritası, +Height (cm),Yükseklik (cm), +"Hello,","Merhaba,", +Helps you distribute the Budget/Target across months if you have seasonality in your business.,İşletmenizde mevsimsel çalışma varsa Bütçeyi/Hedefi aylara dağıtmanıza yardımcı olur., +Here are the error logs for the aforementioned failed depreciation entries: {0},Yukarıda bahsedilen başarısız amortisman girişleri için hata kayıtları şunlardır: {0}, +Here are the options to proceed:,İşleme devam etmek için seçenekleriniz:, +"Here, you can select a senior of this Employee. Based on this, Organization Chart will be populated.","Burada, bu Çalışanın bir üst düzeyini seçebilirsiniz. Buna bağlı olarak, Organizasyon Şeması doldurulacaktır.", +"Here, your weekly offs are pre-populated based on the previous selections. You can add more rows to also add public and national holidays individually.","Burada, haftalık izinleriniz önceki seçimlere göre önceden doldurulur. Resmi ve ulusal tatilleri ayrı ayrı eklemek için daha fazla satır ekleyebilirsiniz.", +"Hi,","Merhaba,", +Hide Images,Resimleri Gizle, +Holiday Date {0} added multiple times,{0} Tatil Tarihi birden çok kez eklendi, +Hours Spent,Harcanan saat, +Idle,Boşta, +"If Enabled - Reconciliation happens on the Advance Payment posting date
+If Disabled - Reconciliation happens on oldest of 2 Dates: Invoice Date or the Advance Payment posting date
+","Etkinleştirilmişse - Mutabakat, Avans Ödemesi kayıt tarihinde gerçekleşir
+Devre Dışı Bırakılmışsa - Mutabakat, 2 Tarihten en eskisinde gerçekleşir: Fatura Tarihi veya Avans Ödemesi kayıt tarihi
+", +"If an operation is divided into sub operations, they can be added here.",Bir operasyon alt operasyonlara bölünmüşse buraya eklenebilir., +"If checked, Stock will be reserved on Submit","İşaretlenirse, Stok Gönder butonuna nasıldığında rezerve edilecektir", +"If checked, the tax amount will be considered as already included in the Paid Amount in Payment Entry","İşaretlendiğinde, vergi tutarı Ödeme Girişindeki Ödenen Tutar'a zaten dahil edilmiş olarak kabul edilir.", +"If checked, we will create demo data for you to explore the system. This demo data can be erased later.","İşaretlenirse, sistemi keşfetmeniz için demo verileri oluşturacağız. Bu demo verileri daha sonra silinebilir.", +If enabled then system won't apply the pricing rule on the delivery note which will be create from the pick list,"Etkinleştirilirse sistem, çekme listesinden oluşturulacak irsaliyeye fiyatlandırma kuralını uygulamaz", +If enabled then system won't override the picked qty / batches / serial numbers.,"Etkinleştirilirse, sistem seçilen adet / parti / seri numaralarını geçersiz kılmaz.", +"If enabled, a print of this document will be attached to each email","Etkinleştirilirse, bu belgenin bir çıktısı her e-postaya eklenecektir", +"If enabled, all files attached to this document will be attached to each email",B belgeye eklenen tüm dosyalar her e-postaya da eklenir., +"If enabled, do not update serial / batch values in the stock transactions on creation of auto Serial + / Batch Bundle. ","Etkinleştirildiğinde, otomatik Seri + / Toplu Paket oluşturulması durumunda stok hareketlerindeki seri / toplu değerleri güncellemez. ", +"If enabled, the consolidated invoices will have rounded total disabled","Etkinleştirilirse, konsolide faturalarda yuvarlanmış toplam devre dışı bırakılır", +"If enabled, the item rate won't adjust to the valuation rate during internal transfers, but accounting will still use the valuation rate.","İç transferler sırasında ürün fiyatı, değerleme oranına göre ayarlanmaz ancak muhasebe işlemleri yine de değerleme oranını kullanır.", +"If enabled, the system will create material requests even if the stock exists in the 'Raw Materials Warehouse'.",Hammadde Deposu'nda stok bulunsa bile sistem malzeme talepleri oluşturacaktır., +"If enabled, the system will use the moving average valuation method to calculate the valuation rate for the batched items and will not consider the individual batch-wise incoming rate.","Etkinleştirilirse, sistem toplu kalemlerin değerleme oranını hesaplamak için hareketli ortalama değerleme yöntemini kullanacak ve tek tek parti bazında gelen oranı dikkate almayacaktır.", +"If enabled, then system will only validate the pricing rule and not apply automatically. User has to manually set the discount percentage / margin / free items to validate the pricing rule","Etkinleştirilirse, sistem fiyatlandırma kuralını yalnızca doğrulayacak ve otomatik olarak uygulamayacaktır. Kullanıcı, fiyatlandırma kuralını doğrulamak için indirim yüzdesini / marjı / ücretsiz ürünleri manuel olarak ayarlamalıdır", +"If not, you can Cancel / Submit this entry","Aksi takdirde, bu girişi İptal Edebilir veya Gönderebilirsiniz", +"If rate is zero then item will be treated as ""Free Item""","Fiyat sıfır ise Ürün ""Ücretsiz Ürün"" olarak değerlendirilecektir", +"If the BOM results in Scrap material, the Scrap Warehouse needs to be selected.",Ürün Ağacının Hurda malzemeyle sonuçlanması durumunda Hurda Deposunun seçilmesi gerekir., +"If the selected BOM has Operations mentioned in it, the system will fetch all Operations from BOM, these values can be changed.","Seçilen Ürün Ağacında belirtilen İşlemler varsa, sistem Ürün Ağacından tüm İşlemleri getirir, bu değerler değiştirilebilir.", +"If there is no title column, use the code column for the title.","Başlık sütunu yoksa, başlık için kod sütununu kullanın.", +If this is undesirable please cancel the corresponding Payment Entry.,Eğer bu istenmiyorsa lütfen ilgili Ödeme Girişini iptal edin., +"If you are maintaining stock of this Item in your Inventory, ERPNext will make a stock ledger entry for each transaction of this item.","Bu Ürünün stokunu Envanterinizde tutuyorsanız, ERPNext bu ürünün her işlemi için bir stok defteri girişi yapacaktır.", +"If you need to reconcile particular transactions against each other, then please select accordingly. If not, all the transactions will be allocated in FIFO order.","Belirli işlemleri birbiriyle mutabık hale getirmeniz gerekiyorsa, lütfen buna göre seçin. Aksi takdirde, tüm işlemler FIFO sırasına göre tahsis edilecektir.", +"If you still want to proceed, please disable 'Skip Available Sub Assembly Items' checkbox.","Yine de devam etmek istiyorsanız, lütfen 'Mevcut Alt Montaj Öğelerini Atla' onay kutusunu devre dışı bırakın.", +"If you still want to proceed, please enable {0}.",Hala devam etmek istiyorsanız lütfen {0} ayarını etkinleştirin., +"If your CSV uses a different delimiter, add that character here, ensuring no spaces or additional characters are included.","CSV dosyanız farklı bir ayırıcı kullanıyorsa, o karakteri buraya ekleyin ve boşluk veya ek karakter olmadığından emin olun.", +Ignore Default Payment Terms Template,Varsayılan Ödeme Koşulları Şablonunu Yoksay, +Ignore Empty Stock,Boş Stoku Yoksay, +Ignore Pricing Rule is enabled. Cannot apply coupon code.,Fiyatlandırma Kuralını Yoksay etkinleştirildi. Kupon kodu uygulanamıyor., +Ignore System Generated Credit / Debit Notes,Otomatik Oluşturulan Alacak ve Borçları Yoksay, +Ignore Voucher Type filter and Select Vouchers Manually,Belge Türü filtresini yok say ve Belgeleri Manuel Seç, +Impairment,Değer Düşüklüğü, +Import File,Dosyayı İçe Aktar, +Import File Errors and Warnings,İçe Aktarma Dosyası Hataları ve Uyarıları, +Import Genericode File,Genericode Dosyasını İçe Aktar, +Import Log Preview,İçe Aktarma Günlüğü Önizlemesi, +Import Preview,İçe Aktarma Önizlemesi, +Import Progress,İçeri Aktarma İlerlemesi, +Import Type,İçe Aktarma Türü, +Import Using CSV file,CSV dosyasını kullanarak içe aktar, +Import Warnings,İçeri Aktarma Uyarıları, +Import completed. {0} common codes created.,İçe aktarma tamamlandı. {0} ortak kod oluşturuldu., +Import from Google Sheets,Google E-Tablolar'dan İçe Aktar, +Importing Common Codes,Ortak Kodlar İçe Aktarılıyor, +"Importing {0} of {1}, {2}",{2} İçe Aktarılıyor {0}/{1}, +In House,Firma, +In Minutes,Dakika, +In Party Currency,Cari Para Birimi, +In Transit Transfer,Transfer Sürecinde, +In Transit Warehouse,Taşıma Deposu, +In mins,Dakika, +"In row {0} of Appointment Booking Slots: ""To Time"" must be later than ""From Time"".","Randevu Rezervasyon Slotları’nın {0}. satırında: “Bitiş Saati”, “Başlangıç Saati”nden sonra olmalıdır.", +"In this section, you can define Company-wide transaction-related defaults for this Item. Eg. Default Warehouse, Default Price List, Supplier, etc.","Bu bölümde, bu ürün için Şirket Genelinde yapılacak işlemlerle ilgili varsayılanları tanımlayabilirsiniz. Örneğin; Varsayılan Depo, Varsayılan Fiyat Listesi, Tedarikçi vb.", +Inactive Status,İnaktif Durum, +Include Account Currency,Hesap Para Birimini Dahil Et, +Include Closed Orders,Kapalı Siparişleri Dahil Et, +Include Default FB Assets,Varsayılan FD Varlıklarını Dahil Et, +Include Disabled,Kapatılanları Göster, +Include Expired Batches,Süresi Dolmuş Partileri Dahil Et, +Include Timesheets in Draft Status,Zaman Çizelgelerini Taslak Durumuna Dahil Et, +Include Zero Stock Items,Stokta Olmayan Ürünleri Dahil Et, +Incoming Call Handling Schedule,Gelen Çağrı İşleme Programı, +Incoming Call Settings,Gelen Arama Ayarları, +Incoming Rate (Costing),Gelen Oran (Maliyetlendirme), +Incorrect Balance Qty After Transaction,İşlem Sonrası Yanlış Bakiye Miktarı, +Incorrect Batch Consumed,Yanlış Parti Tüketildi, +Incorrect Check in (group) Warehouse for Reorder,Yeniden Sipariş İçin Depoda Yanlış Giriş (grup), +Incorrect Component Quantity,Yanlış Bileşen Miktarı, +Incorrect Invoice,Yanlış Fatura, +Incorrect Movement Purpose,Hatalı Hareket Amacı, +Incorrect Payment Type,Hatalı Ödeme Türü, +Incorrect Reference Document (Purchase Receipt Item),Yanlış Referans Belgesi (Satın Alma İrsaliyesi Kalemi), +Incorrect Serial No Valuation,Hatalı Seri No Değerleme, +Incorrect Serial Number Consumed,Yanlış Seri Numarası Tüketildi, +Incorrect Stock Value Report,Yanlış Stok Değeri Raporu, +Incorrect Type of Transaction,Yanlış İşlem Türü, +Incoterm,Inkoterm, +Increase In Asset Life(Months),Varlık Ömründeki Artış (Ay), +Indent,Talep, +Indirect Expense,Dolaylı Gider, +Individual GL Entry cannot be cancelled.,Tek başına Defter Girişi iptal edilemez., +Individual Stock Ledger Entry cannot be cancelled.,Tek başına Stok Defteri Girişi iptal edilemez., +Initialize Summary Table,Özet Tablosunu Başlat, +Insert New Records,Yeni Kayıt Ekle, +Inspection Rejected,Kalite Kontrol Rededildi, +Inspection Submission,Kontrol Gönderimi, +Instruction,Talimat, +Insufficient Capacity,Yetersiz Kapasite, +Insufficient Stock for Batch,Parti için Yetersiz Stok, +Interest and/or dunning fee,Faiz ve/veya gecikme ücreti, +Internal Customer for company {0} already exists,Şirket için İç Müşteri {0} zaten mevcut, +Internal Sale or Delivery Reference missing.,Dahili Satış veya Teslimat Referansı eksik., +Internal Sales Reference Missing,Dahili Satış Referansı Eksik, +Internal Supplier for company {0} already exists,{0} şirketinin Dahili Tedarikçisi zaten mevcut, +Internal Transfer Reference Missing,Dahili Transfer Referansı Eksik, +Internal Transfers,İç Transferler, +Internal transfers can only be done in company's default currency,İç transferler yalnızca şirketin varsayılan para biriminde yapılabilir, +Interval should be between 1 to 59 MInutes,Aralık 1 ila 59 Dakika arasında olmalıdır, +Invalid,Geçersiz, +Invalid Allocated Amount,Geçersiz Tahsis Edilen Tutar, +Invalid Amount,Geçersiz Miktar, +Invalid Auto Repeat Date,Geçersiz Otomatik Tekrar Tarihi, +Invalid Cost Center,Geçersiz Maliyet Merkezi, +Invalid Delivery Date,Geçersiz Teslimat Tarihi, +Invalid Discount,Geçersiz İndirim, +Invalid Document,Geçersiz Döküman, +Invalid Document Type,Geçersiz Belge Türü, +Invalid Formula,Geçersiz Formül, +Invalid Group By,Geçersiz Gruplama Ölçütü, +Invalid Item Defaults,Geçersiz Ürün Varsayılanları, +Invalid Ledger Entries,Geçersiz Defter Girişleri, +Invalid Primary Role,Geçersiz Birincil Rol, +Invalid Priority,Geçersiz Öncelik, +Invalid Process Loss Configuration,Geçersiz Proses Kaybı Yapılandırması, +Invalid Purchase Invoice,Geçersiz Satın Alma Faturası, +Invalid Qty,Geçersiz Miktar, +Invalid Schedule,Geçersiz Program, +Invalid Serial and Batch Bundle,Geçersiz Seri ve Parti, +Invalid Warehouse,Geçersiz Depo, +Invalid result key. Response:,Geçersiz sonuç anahtarı. Yanıt:, +Invalid value {0} for {1} against account {2},{2} hesabına karşı {1} için geçersiz değer {0}, +Inventory Dimension,Envanter Boyutu, +Inventory Dimension Negative Stock,Envanter Boyutu Negatif Stok, +Invoice Limit,Fatura Limiti, +Invoiced Qty,Faturalanan Miktar, +Invoices and Payments have been Fetched and Allocated,Faturalar ve Ödemeler Alındı ve Tahsis Edildi, +Is Adjustment Entry,Düzeltme Girişi, +Is Alternative,Alternatif Ürün, +Is Composite Asset,Birleşik Varlık, +Is Corrective Job Card,Düzeltici Faaliyet, +Is Exchange Gain / Loss?,Kur Farkı Kârı / Zararı, +Is Expandable,Genişletilebilir, +Is Fully Depreciated,Tamamen Amorti Edilmiş, +Is Old Subcontracting Flow,Eski Alt Yüklenici Akışı, +Is Outward,Giden, +Is Period Closing Voucher Entry,Dönem Kapanış Fişi Girişi, +Is Recursive,Yinelenen, +Is Rejected,Reddedildi, +Is Short/Long Year,Kısa/Uzun Dönem, +Is Standard,Standart, +Is Stock Item,Stok Ürünü, +Is System Generated,Sistem Tarafından Oluşturuldu, +Is Tax Withholding Account,Tevkifatlı Fatura, +Issue Analytics,Sorun Analitiği, +Issue Summary,Sorun Özeti, +Issuing cannot be done to a location. Please enter employee to issue the Asset {0} to,Çıkış işlemi bir lokasyona yapılamaz. Lütfen {0} varlığını çıkış yapmak için bir personel seçin., +It can take upto few hours for accurate stock values to be visible after merging items.,Ürünlerin birleştirilmesinden sonra doğru stok değerlerinin görünür hale gelmesi birkaç saat sürebilir., +"It's not possible to distribute charges equally when total amount is zero, please set 'Distribute Charges Based On' as 'Quantity'","Toplam tutar sıfır olduğunda ücretleri eşit olarak dağıtmak mümkün değildir, lütfen 'Ücretleri Şuna Göre Dağıt' seçeneğini 'Miktar' olarak ayarlayın", +Item Code (Final Product),Bitmiş Ürün, +Item Group wise Discount,Ürün Grubu Bazında İndirim, +"Item Price appears multiple times based on Price List, Supplier/Customer, Currency, Item, Batch, UOM, Qty, and Dates.","Ürün Fiyatı, Fiyat Listesi, Tedarikçi/Müşteri, Para Birimi, Ürün, Parti, Birim, Miktar ve Tarihlere göre birden fazla kez görünür.", +Item Warehouse based reposting has been enabled.,Ürün Deposu bazlı yeniden gönderim etkinleştirildi., +Item and Warehouse,Ürün ve Depo, +Item is removed since no serial / batch no selected.,Seri/parti numarası seçilmediği için ürün kaldırıldı., +Item qty can not be updated as raw materials are already processed.,Ürün miktarı güncellenemez çünkü hammaddeler zaten işlenmiş durumda., +Item rate has been updated to zero as Allow Zero Valuation Rate is checked for item {0},"Aşağıdaki kalemler için Sıfır Değerlemeye İzin Ver işaretlendiğinden, fiyat sıfır olarak güncellenmiştir: {0}", +Item valuation reposting in progress. Report might show incorrect item valuation.,Ürün değerlemesi yeniden yapılıyor. Rapor geçici olarak yanlış değerleme gösterebilir., +Item {0} cannot be added as a sub-assembly of itself,{0} Ürünü kendisine bir alt montaj olarak eklenemez, +Item {0} cannot be ordered more than {1} against Blanket Order {2}.,"Ürün {0}, Toplu Sipariş {2} kapsamında {1} miktarından daha fazla sipariş edilemez.", +Item {0} does not exist.,{0} ürünü mevcut değil., +Item {0} entered multiple times.,{0} ürünü birden fazla kez girildi., +Item {0} is already reserved/delivered against Sales Order {1}.,Ürün {0} zaten {1} Satış Siparişi karşılığında rezerve edilmiş/teslim edilmiştir., +Item {0} must be a Non-Stock Item,Ürün {0} Stokta Olmayan Ürün olmalıdır, +Item {0} not found in 'Raw Materials Supplied' table in {1} {2},"Ürün {0}, {1} {2} içindeki ‘Tedarik Edilen Ham Maddeler’ tablosunda bulunamadı.", +Item {0} not found.,{0} ürünü bulunamadı., +Item {} does not exist.,{0} Ürünü mevcut değil., +Items cannot be updated as Subcontracting Order is created against the Purchase Order {0}.,Alt Yüklenici Siparişi {0} Satın Alma Siparişine karşı oluşturulduğu için kalemler güncellenemez., +Items rate has been updated to zero as Allow Zero Valuation Rate is checked for the following items: {0},Aşağıdaki kalemler için Sıfır Değerleme Oranına İzin Ver işaretlendiğinden kalem oranı sıfır olarak güncellenmiştir: {0}, +Items to Be Repost,Tekrar Gönderilecek Öğeler, +Items to Reserve,Rezerve Edilecek Ürünler, +Items {0} do not exist in the Item master.,Öğeler {0} Ürün ana verisinde mevcut değil., +JAN,OCA, +Job Capacity,İş Kapasitesi, +Job Card Operation,İş Kartı Operasyonu, +Job Card Scrap Item,İş Kartı Hurda Ürünü, +Job Card and Capacity Planning,İş Kartı ve Kapasite Planlama, +Job Cards,İş Kartları, +Job Paused,İş Duraklatıldı, +Job Worker,Yüklenici, +Job Worker Address,İş Adresi, +Job Worker Address Details,İş Adresi Detayları, +Job Worker Contact,Yetkili Kişi, +Job Worker Delivery Note,İşçi Teslimat Notu, +Job Worker Name,Yetkili Kişi Adı, +Job Worker Warehouse,Alt Yüklenici Deposu, +Job: {0} has been triggered for processing failed transactions,İş: {0} başarısız işlemlerin işlenmesi için tetiklendi, +Journal Entries,Defter Girişi, +Journal Entry for Asset scrapping cannot be cancelled. Please restore the Asset.,Varlık hurdaya çıkarma için Yevmiye Kaydı iptal edilemez. Lütfen Varlığı geri yükleyin., +Journal Entry type should be set as Depreciation Entry for asset depreciation,Varlık amortismanı için Yevmiye Kaydı türü Amortisman Kaydı olarak ayarlanmalıdır, +Journal entries have been created,Defter girişleri oluşturuldu, +Key,Anahtar, +Kindly cancel the Manufacturing Entries first against the work order {0}.,Lütfen önce {0} İş Emri adına Üretim Girişlerini iptal edin., +"Last Name, Email or Phone/Mobile of the user are mandatory to continue.","Devam etmek için kullanıcının Soyadı, E-posta veya Telefon / Cep Telefonu zorunludur.", +Last transacted,Son İşlem, +Lead -> Prospect,Müşteri Adayı > Potansiyel Müşteri, +Lead Conversion Time,Potansiyel Müşteri Dönüşüm Süresi, +Lead Owner cannot be same as the Lead Email Address,"Potansiyel Müşteri Sahibi, Potansiyel Müşteri E-posta Adresi ile aynı olamaz", +Lead {0} has been added to prospect {1}.,{0} isimli müşteri adayı {1} potansiyel müşteri listesine eklendi., +Leaderboard,Liderlik Sıralaması, +"Learn about Common Party","Ortak Cari hakkında bilgi edinin", +"Leave blank for home. +This is relative to site URL, for example ""about"" will redirect to ""https://yoursitename.com/about""","Ana sayfa için boş bırakın. +Bu, site URL'sine göredir, örneğin ""hakkında"", ""https://sitenizinadi.com/hakkinda"" adresine yönlendirecektir.", +Ledger Health,Defter Sağlığı, +Ledger Health Monitor,Defter Sağlık Monitörü, +Ledger Health Monitor Company,Defter Sağlık Monitörü Şirketi, +Ledger Merge,Defter Birleştirme, +Ledger Merge Accounts,Defter Birleştirme Hesapları, +Left Child,Sol Alt, +Legend,Defter, +Length,Uzunluk, +Length (cm),Uzunluk (cm), +Level (BOM),Ürün Ağacı Seviyesi, +Limit timeslot for Stock Reposting,Stok Yeniden Gönderimi için zaman aralığını sınırlayın, +Limits don't apply on,Sınırlamalar geçerli değildir, +Link a new bank account,Yeni Banka Hesabı Bağla, +Link with Customer,Müşteri ile İlişkilendir, +Link with Supplier,Tedarikçi ile İlişkilendir, +Linked with submitted documents,Gönderilen belgelerle bağlantılı, +Linking Failed,Bağlantı Başarısız, +Linking to Customer Failed. Please try again.,Müşteriye Bağlantı Başarısız Oldu. Lütfen tekrar deneyin., +Linking to Supplier Failed. Please try again.,Tedarikçiye Bağlantı Başarısız Oldu. Lütfen tekrar deneyin., +Links,Bağlantılar, +Loading Invoices! Please Wait...,"Lütfen Bekleyin, Faturalar yükleniyor...", +Loading import file...,İçeri Aktarma Yükleniyor..., +Locked,Kilitli, +Log Entries,Günlük Girişleri, +Log the selling and buying rate of an Item,Bir Ürünün alış ve satış fiyatının kaydı, +Lost Quotations,Kayıp Teklifler, +Lost Quotations %,Kayıp Teklifler %, +Lost Reasons are required in case opportunity is Lost.,Fırsatın Kaybedilmesi halinde Kayıp Nedenleri gereklidir., +Lost Value,Kayıp Değer, +Lost Value %,Kayıp Değer %, +Machine Type,Makine Türü, +Main Cost Center,Ana Maliyet Merkezi, +Main Cost Center {0} cannot be entered in the child table,Ana Maliyet Merkezi {0} alt tabloya girilemez, +Maintain Asset,Varlık Bakımı, +Maintenance Details,Bakım Detayları, +Make ,Oluştur , +Make Asset Movement,Varlık Hareketi, +Make Quotation,Teklif Oluştur, +Make Return Entry,İade Girişi Yapın, +Make {0} Variant,{0} Varyantı Oluştur, +Make {0} Variants,{0} Varyantları Oluştur, +Making Journal Entries against advance accounts: {0} is not recommended. These Journals won't be available for Reconciliation.,Avans hesaplarına karşı yevmiye kayıtları yapmak: {0} önerilmez. Bu yevmiye kayıtları mutabakat için uygun olmayacaktır., +Mandatory Accounting Dimension,Zorunlu Muhasebe Boyutu, +Mandatory Depends On,Zorunluluk Bağlılığı, +Mandatory Field,Zorunlu Alan, +Mandatory Section,Zorunlu Bölüm, +Mapping Purchase Receipt ...,Alış İrsaliyeleri Eşleşiyor..., +Mapping Subcontracting Order ...,Alt Yüklenici Siparişi Eşleştiriliyor..., +Mapping {0} ...,Eşleştiriliyor {0} ..., +Mark As Closed,Kapalı Olarak İşaretle, +Material Returned from WIP,Devam Eden İşlerden Geri Dönen Malzemeler, +Material Transfer (In Transit),Malzeme Transferi (Yolda), +Materials are already received against the {0} {1},Malzemeler zaten {0} {1} karşılığında alındı, +Materials needs to be transferred to the work in progress warehouse for the job card {0},{0} nolu İş Kartı için malzemelerin devam eden işler deposuna aktarılması gerekiyor, +Maximum Payment Amount,Maksimum Ödeme Tutarı, +Maximum Value,Maksimum Değer, +Maximum quantity scanned for item {0}.,{0} Ürünü için taranan maksimum miktar., +Meeting,Toplantı, +Mention if non-standard Receivable account,Standart Değilse Ayrıca Belirtin, +Merge Invoices Based On,Faturaları Şuna Göre Birleştir, +Merge Progress,Birleştirme İlerlemesi, +Merge taxes from multiple documents,Birden fazla belgedeki vergileri birleştirme, +Merged,Birleştirildi, +"Merging is only possible if following properties are same in both records. Is Group, Root Type, Company and Account Currency","Birleştirme sadece aşağıdaki özelliklerin her iki kayıtta da aynı olması durumunda mümkündür. Grup, Kök Türü, Şirket ve Hesap Para Birimi", +Merging {0} of {1},Birleştiriliyor {0} / {1}, +Min Qty should be greater than Recurse Over Qty,"Minimum Miktar, Yeniden İşlenecek Miktardan büyük olmalıdır.", +Minimum Payment Amount,Minimum Ödeme Tutarı, +Minimum Value,Minimum Değer, +Mismatch,Uyuşmazlık, +Missing,Eksik, +Missing Asset,Kayıp Varlık, +Missing Cost Center,Maliyet Merkezi Eksik, +Missing Default in Company,Şirkette Eksik Varsayılan, +Missing Finance Book,Kayıp Finans Kitabı, +Missing Finished Good,Eksik Bitmiş Ürün, +Missing Formula,Eksik Formül, +Missing Item,Eksik Ürünler, +Missing Items,Eksik Ürünler, +Missing Payments App,Eksik Ödemeler Uygulaması, +Missing Serial No Bundle,Eksik Seri No Paketi, +Missing value,Eksik Değer, +Modified By,Değiştiren, +Modified On,Değiştirilme Tarihi, +Module Settings,Modül Ayarları, +Monitor for Last 'X' days,Son 'X' gün için izleyin, +More/Less than 12 months.,12 aydan fazla/az., +Move Stock,Stoku Taşı, +Move to Cart,Sepete Taşı, +Movement,Hareket, +Moving up in tree ...,Ağaçta yukarı taşınıyor..., +Multi-level BOM Creator,Çok Seviyeli Ürün Ağacı Oluşturucu, +Multiple Loyalty Programs found for Customer {}. Please select manually.,Müşteri {} için birden fazla Sadakat Programı bulundu. Lütfen manuel olarak seçin., +Multiple Warehouse Accounts,Çoklu Depo Hesapları, +Multiple items cannot be marked as finished item,Birden fazla ürün bitmiş ürün olarak işaretlenemez, +Must be a publicly accessible Google Sheets URL and adding Bank Account column is necessary for importing via Google Sheets,Google E-Tablolar URL'si herkese açık olmalı ve Google E-Tablolar üzerinden içe aktarma için Banka Hesabı sütununun eklenmesi gerekir, +Net total calculation precision loss,Net toplam hesaplama hassasiyet kaybı, +New Balance In Account Currency,Hesap Para Biriminde Yeni Bakiye, +New Event,Yeni Etkinlik, +New Note,Yeni Not, +New Task,Yeni Görev, +New Version,Yeni Versiyon, +Newsletter,Bülten, +No Answer,Cevap Yok, +No Customers found with selected options.,Seçilen seçeneklere sahip Müşteri bulunamadı., +No Items selected for transfer.,Transfer için hiçbir Ürün seçilmedi., +No Matching Bank Transactions Found,Eşleşen Banka İşlemi Bulunamadı, +No Notes,Not Yok, +No Outstanding Invoices found for this party,Bu Cari için Ödenmemiş Fatura bulunamadı, +No POS Profile found. Please create a New POS Profile first,POS Profili bulunamadı. Lütfen önce Yeni bir POS Profili oluşturun, +No Records for these settings.,Bu ayarlar için Kayıt Yok., +No Serial / Batches are available for return,İade için Seri / Parti mevcut değil, +No Stock Available Currently,Şu Anda Stok Mevcut Değil, +No Summary,Özet Yok, +No Tax Withholding data found for the current posting date.,Geçerli kayıt tarihi için Vergi Stopajı verisi bulunamadı., +No Terms,Şart Yok, +No Unreconciled Invoices and Payments found for this party and account,Bu Cari ve Hesap için Uzlaştırılmamış Fatura ve Ödeme bulunamadı, +No Unreconciled Payments found for this party,Bu Cari için Uzlaşılmamış Ödeme bulunamadı, +No Work Orders were created,Hiçbir İş Emri oluşturulmadı, +No additional fields available,Ek alan mevcut değil, +No billing email found for customer: {0},{0} isimli Müşteri için fatura e-postası bulunamadı., +No data found. Seems like you uploaded a blank file,Veri bulunamadı. Boş bir dosya yüklemişsiniz gibi görünüyor, +No employee was scheduled for call popup,Hiçbir çağrı bildirimi personel için planlanmadı, +No failed logs,Başarısız kayıt yok, +No item available for transfer.,Transfer için uygun ürün bulunamadı., +No items are available in sales orders {0} for production,Üretim için {0} satış siparişlerinde hiçbir ürün mevcut değil, +No items are available in the sales order {0} for production,Üretim için {0} satış siparişlerinde hiçbir ürün mevcut değil, +No items in cart,Sepette ürün yok, +No matches occurred via auto reconciliation,Otomatik mutabakat yoluyla hiçbir eşleşme oluşmadı, +No more children on Left,Solda başka alt öğe yok, +No more children on Right,Sağda başka alt öğe yok, +No of Docs,Doküman Sayısı, +No of Months (Expense),Ay Sayısı (Gider), +No of Months (Revenue),Ay Sayısı (Gelir), +No open event,Açık etkinlik yok, +No open task,Açık görev yok, +No outstanding {0} found for the {1} {2} which qualify the filters you have specified.,Belirttiğiniz filtreleri karşılayan {1} {2} için bekleyen {0} bulunamadı., +No primary email found for customer: {0},{0} isimli Müşteri için tanımlı birincil e-posta bulunamadı., +No recent transactions found,Son zamanlarda herhangi bir işlem bulunamadı, +No records found in Allocation table,Tahsis tablosunda kayıt bulunamadı, +No records found in the Invoices table,Fatura tablosunda kayıt bulunamadı, +No records found in the Payments table,Ödemeler tablosunda kayıt bulunamadı, +No {0} Accounts found for this company.,Bu şirket için {0} Hesap bulunamadı., +No.,Sıra, +No. of parallel job cards which can be allowed on this workstation. Example: 2 would mean this workstation can process production for two Work Orders at a time.,"Bu iş istasyonunda izin verilebilecek paralel iş kartı sayısı. Örnek: 2, bu iş istasyonunun aynı anda iki İş Emri için üretim yapabileceği anlamına gelir.", +Note: Automatic log deletion only applies to logs of type Update Cost,Not: Otomatik kayıt silme yalnızca Maliyet Güncelleme türündeki kayıtlar için geçerlidir, +"Note: To merge the items, create a separate Stock Reconciliation for the old item {0}","Kalemleri birleştirmek istiyorsanız, eski kalem {0} için ayrı bir Stok Mutabakatı oluşturun", +Notes HTML,Notlar HTML, +Notification,Bildirim, +Notification Settings,Bildirim Ayarları, +Notify Reposting Error to Role,Yeniden Gönderme Hatasını Role Bildir, +Number of Days,Gün Sayısı, +Numeric,Rakamsal, +Numeric Inspection,Sayısal Kontrol, +Off,Kapalı, +Offsetting Account,Mahsuplaşma Hesabı, +Offsetting for Accounting Dimension,Muhasebe Boyutu için Mahsuplaşma, +Oldest Of Invoice Or Advance,En Eski Fatura veya Avans, +On Paid Amount,Ödenen Tutar Üzerinden, +On This Date,Bu Tarihte, +On Track,Hedefte, +On enabling this cancellation entries will be posted on the actual cancellation date and reports will consider cancelled entries as well,İptal girişleri gerçek iptal tarihinde yayınlanacak ve raporlar iptal edilen girişleri de dikkate alacaktır, +"On expanding a row in the Items to Manufacture table, you'll see an option to 'Include Exploded Items'. Ticking this includes raw materials of the sub-assembly items in the production process.","Üretilecek Ürünler tablosunda bir satırı genişlettiğinizde, 'Patlatılmış Ürünleri Dahil Et' seçeneğini göreceksiniz. Bunu işaretlemek, üretim sürecindeki alt montaj ürünlerinin ham maddelerini içerir.", +"On submission of the stock transaction, system will auto create the Serial and Batch Bundle based on the Serial No / Batch fields.","Stok işleminin gönderilmesi üzerine, sistem Seri No / Parti alanlarına dayalı olarak Seri ve Parti Paketini otomatik olarak oluşturacaktır.", +Once the Work Order is Closed. It can't be resumed.,"İş Emri Kapatıldıktan sonra, Devam ettirilemez.", +Only 'Payment Entries' made against this advance account are supported.,Sadece bu avans hesabına yapılan 'Ödeme Girişleri' desteklenmektedir., +Only CSV and Excel files can be used to for importing data. Please check the file format you are trying to upload,Verileri içe aktarmak için yalnızca CSV ve Excel dosyaları kullanılabilir. Lütfen yüklemeye çalıştığınız dosya biçimini kontrol edin, +Only Deduct Tax On Excess Amount ,Sadece Fazla Tutar Üzerinden Vergi Kesintisi Yapın , +Only Include Allocated Payments,Sadece Ayrılan Ödemeleri Dahil Et, +Only Parent can be of type {0},Yalnızca Üst Öğe {0} türünde olabilir, +Only existing assets,Sadece Mevcut Varlıklar, +Only one {0} entry can be created against the Work Order {1},İş Emri {1} için yalnızca bir {0} girişi oluşturulabilir, +"Only values between [0,1) are allowed. Like {0.00, 0.04, 0.09, ...} +Ex: If allowance is set at 0.07, accounts that have balance of 0.07 in either of the currencies will be considered as zero balance account","Yalnızca [0,1) arasındaki değerlere izin verilir. {0.00, 0.04, 0.09, ...} gibi +Örn: Eğer ödenek 0.07 olarak ayarlanırsa, her iki para biriminde de 0.07 bakiyesi olan hesaplar sıfır bakiyeli hesap olarak değerlendirilecektir", +Only {0} are supported,Sadece {0} destekleniyor, +Open Activities HTML,Açık Etkinlikler HTML, +Open Call Log,Arama Günlüğünü Aç, +Open Event,Açık Etkinlik, +Open Events,Açık Etkinlikler, +Open Sales Orders,Açık Siparişler, +Open Task,Açık Görev, +Open Tasks,Açık Görevler, +Open Work Order {0},Açık İş Emri {0}, +Opening Accumulated Depreciation must be less than or equal to {0},Açılış Birikmiş Amortismanı {0} sayısına küçük veya eşit olmalıdır., +Opening Entry can not be created after Period Closing Voucher is created.,Dönem Kapanış Fişi oluşturulduktan sonra Açılış Fişi oluşturulamaz., +"Opening Invoice has rounding adjustment of {0}.

'{1}' account is required to post these values. Please set it in Company: {2}.

Or, '{3}' can be enabled to not post any rounding adjustment.","Açılış Faturası {0} yuvarlama ayarına sahiptir.

'{1}' hesabının bu değerleri göndermesi gerekir. Lütfen Şirket'te bu hesabı ayarlayın: {2}.

Veya, herhangi bir yuvarlama ayarı göndermemek için '{3}' seçeneğini aktifleştirin.", +Opening Number of Booked Depreciations,Kayıtlı Amortismanlar Açılış Sayısı, +Opening Purchase Invoices have been created.,Açılış Alış Faturaları oluşturuldu., +Opening Sales Invoices have been created.,Açılış Satış Faturaları oluşturuldu., +Operating Cost Per BOM Quantity,Ürün Ağacındaki Miktara Göre Operasyon Maliyeti, +Opportunity Amount (Company Currency),Fırsat Tutarı (Company Currency), +Opportunity Source,Fırsat Kaynağı, +Opportunity Summary by Sales Stage ,Satış Aşamasına göre Fırsat Özeti , +Order Date,Sipariş Tarihi, +Order No,Sipariş No, +Out of stock,Stokta yok, +Over Picking Allowance,Fazla Seçim İzni, +Over Receipt,Fazla Teslim Alma, +Over Receipt/Delivery of {0} {1} ignored for item {2} because you have {3} role.,{3} rolüne sahip olduğunuz için {2} ürünü için {0} {1} fazla alım/teslimat göz ardı edildi., +Overbilling of {0} {1} ignored for item {2} because you have {3} role.,{3} rolüne sahip olduğunuz için {2} ürünü için {0} {1} fazla faturalandırma göz ardı edildi., +Overbilling of {} ignored because you have {} role.,Rolünüz {} olduğu için {} fazla fatura türü göz ardı edildi., +Overdue Payment,Gecikmiş ödeme, +Overdue Payments,Gecikmiş Ödemeler, +Overdue Tasks,Gecikmiş Görevler, +PDF Name,PDF Adı, +POS Closing Failed,POS Kapatma Başarısız, +POS Closing failed while running in a background process. You can resolve the {0} and retry the process again.,Arka planda çalışan bir işlem sırasında POS Kapatma başarısız oldu. {0} adresini çözebilir ve işlemi tekrar deneyebilirsiniz., +POS Invoice is already consolidated,POS Faturası zaten konsolide edilmiştir, +POS Invoice is not submitted,POS Faturası gönderilmedi, +POS Invoice should have the field {0} checked.,POS Faturasında {0} alanı işaretlenmiş olmalıdır., +POS Invoices will be consolidated in a background process,POS Faturaları arka plan sürecinde birleştirilecek, +POS Invoices will be unconsolidated in a background process,POS Faturaları arka planda ayrıştırılacak, +POS Profile doesn't match {},POS Profili {} ile eşleşmiyor, +POS Profile {} contains Mode of Payment {}. Please remove them to disable this mode.,POS Profili {} Ödeme Modu {} içerir. Bu modu devre dışı bırakmak için lütfen bunları kaldırın., +POS Search Fields,POS Arama Alanları, +Package No(s) already in use. Try from Package No {0},Paket Numarası zaten kullanılıyor. Paket No {0} değerinden itibaren deneyin., +Packaging Slip From Delivery Note,Sevk İrsaliyesinden Ambalaj Fişi, +Packed Items cannot be transferred internally,Paketlenmiş Ürünler dahili olarak transfer edilemez, +Packed Qty,Paketlenen Miktar, +Page Break After Each SoA,Her Hesap Ekstresinden Sonra Sayfa Sonu Ekle, +Paid Amount After Tax,Vergi Sonrası Ödenen Tutar, +Paid Amount After Tax (Company Currency),Vergi Sonrası Ödenen Tutar (Şirket Para Birimi), +Paid From Account Type,Ödeme Yapılacak Hesap Türü, +Paid To Account Type,Ödenen Yapılacak Hesap Türü, +Pallets,Paletler, +Parameter Group,Parametre Grubu, +Parameter Group Name,Parametre Grup Adı, +Parcel Template,Parsel Şablonu, +Parcel Template Name,Parsel Şablon Adı, +Parcel weight cannot be 0,Parsel ağırlığı 0 olamaz, +Parcels,Parseller, +Parent Account Missing,Ana Hesap Eksik, +Parent Document,Ana Belge, +Parent Item {0} must not be a Fixed Asset,Ana Kalem {0} Sabit Varlık olmamalıdır, +Parent Row No,Üst Satır No, +Parent Row No not found for {0},Üst Satır No {0} için bulunamadı, +Parent Task {0} is not a Template Task,Üst Görev {0} bir Şablon Görevi değildir, +Parsing Error,Birleştirme Hatası, +Partial Material Transferred,Kısmi Malzeme Transferi, +Partial Stock Reservation,Kısmi Stok Rezervasyonu, +Partial Success,Kısmen Başarılı, +"Partial stock can be reserved. For example, If you have a Sales Order of 100 units and the Available Stock is 90 units then a Stock Reservation Entry will be created for 90 units. ","Kısmi stok rezerve edilebilir. Örneğin, 100 birimlik bir Satış Siparişiniz varsa ve Mevcut Stok 90 birimse, 90 birim için bir Stok Rezervi Girişi oluşturulacaktır. ", +Partially Delivered,Kısmen Teslim Edildi, +Partially Reconciled,Kısmen Uzlaşıldı, +Partially Reserved,Kısmen Ayrılmış, +Party Account No. (Bank Statement),Taraf Hesap No. (Banka Hesap Özeti), +Party Account {0} currency ({1}) and document currency ({2}) should be same,Cari Hesabı {0} para birimi ({1}) ve belge para birimi ({2}) aynı olmalıdır, +Party IBAN (Bank Statement),Taraf IBAN No (Banka Hesap Özeti), +Party Item Code,Parti Ürün Kodu, +Party Link,Cari Bağlantısı, +Party Name/Account Holder (Bank Statement),Taraf Adı/Hesap Sahibi (Banka Hesap Özeti), +Party Type and Party can only be set for Receivable / Payable account

{0},Cari ve Cari Türü yalnızca Alacaklı / Borçlu hesaplar için ayarlanabilir

{0}, +Party Type and Party is required for Receivable / Payable account {0},Alacak / Borç hesabı {0} için Cari Türü ve Cari bilgisi gereklidir, +Party can only be one of {0},Cari yalnızca {0} seçeneğinden biri olabilir, +Pause Job,İşi Duraklat, +Paused,Duraklatıldı, +Pay,Ödeme,Amount +Payment Amount (Company Currency),Ödeme Tutarı, +"Payment Entry {0} is linked against Order {1}, check if it should be pulled as advance in this invoice.","Ödeme Girişi {0}, Sipariş {1} ile bağlantılı. Bu ödemenin bu faturada avans olarak kullanılıp kullanılmayacağını kontrol edin.", +Payment Ledger,Ödeme Defteri, +Payment Ledger Balance,Ödeme Defteri Bakiyesi, +Payment Ledger Entry,Ödeme Defteri Girişi, +Payment Limit,Ödeme Limiti, +Payment Reconciliation Allocation,Ödeme Mutabakatı Tahsisi, +Payment Reconciliation Job: {0} is running for this party. Can't reconcile now.,Ödeme Mutabakatı İşi: {0} bu cari için çalışıyor. Şu anda mutabakat yapılamaz., +Payment Request Outstanding,Ödeme Talebi Bekleyen Tutar, +Payment Request created from Sales Order or Purchase Order will be in Draft status. When disabled document will be in unsaved state.,Satış Siparişi veya Satın Alma Siparişinden oluşturulan Ödeme Talebi Taslak durumunda olacaktır. Devre dışı bırakıldığında belge kaydedilmemiş durumda olacaktır., +Payment Request is already created,Ödeme Talebi zaten oluşturuldu, +Payment Request took too long to respond. Please try requesting for payment again.,Ödeme Talebi yanıtlanması çok uzun sürdü. Lütfen ödemeyi tekrar talep etmeyi deneyin., +Payment Requests cannot be created against: {0},Ödeme Talepleri {0} için oluşturulamaz, +Payment Term Outstanding,Ödeme Vadesi Bekleyen Tutar, +Payment Unlink Error,Ödeme Bağlantısı Kaldırma Hatası, +Payment of {0} received successfully.,{0} ödemesi başarıyla alındı., +Payment of {0} received successfully. Waiting for other requests to complete...,{0} ödemesi başarıyla alındı. Diğer isteklerin tamamlanması bekleniyor..., +Payment request failed,Ödeme talebi başarısız oldu, +Payment term {0} not used in {1},"Ödeme vadesi {0}, {1} içinde kullanılmadı", +Pending processing,Bekleyen İşlemler, +Per Received,Alınan Başına, +Percentage (%),Yüzde (%), +Period Closed,Dönem Kapalı, +Period Details,Dönem Detayları, +Period End Date cannot be greater than Fiscal Year End Date,"Dönem Bitiş Tarihi, Mali Yıl Bitiş Tarihinden büyük olamaz", +Period Start Date cannot be greater than Period End Date,Dönem Başlangıç Tarihi Dönem Bitiş Tarihinden büyük olamaz, +Period Start Date must be {0},Dönem Başlangıç Tarihi {0} olmalıdır, +Period To Date,Dönem Sonu Tarihi, +Pick List Incomplete,Toplama Listesi Tamamlanmadı, +Pick Manually,Manuel Seçim, +Pick Serial / Batch Based On,Seri / Parti Bazlı Seçim, +Pick Serial / Batch No,Seri / Parti No Seç, +Pickup,Teslim Al, +Pickup Contact Person,Teslim Alacak İrtibat Kişisi, +Pickup Date,Teslim Alma Tarihi, +Pickup Date cannot be before this day,Teslim Alma Tarihi bu günden önce olamaz, +Pickup From,Teslim Alma Yeri, +Pickup To time should be greater than Pickup From time,"Teslim Alma Zamanı, Teslim Alma Zamanından büyük olmalıdır", +Pickup Type,Teslim Alma Türü, +Pickup from,Teslim alma yeri, +Pipeline By,Satış Hattı, +Plaid Link Failed,Plaid Bağlantısı Başarısız, +Plaid Link Refresh Required,Plaid Bağlantısının Yenilenmesi Gerekiyor, +Plaid Link Updated,Plaid Bağlantısı Güncellendi, +Plant Dashboard,Üretim Alanı Gösterge Panosu, +Please Set Priority,Lütfen Önceliği Belirleyin, +Please Specify Account,Lütfen Hesap Belirtin, +Please add 'Supplier' role to user {0}.,Lütfen {0} kullanıcısına 'Tedarikçi' Rolü ekleyin., +Please add Request for Quotation to the sidebar in Portal Settings.,Lütfen Portal Ayarları kenar çubuğuna Teklif Talebi'ni ekleyin., +Please add Root Account for - {0},Lütfen {0} için Kök Hesap ekleyin, +Please add atleast one Serial No / Batch No,Lütfen en az bir Seri No / Parti No ekleyin, +Please add the Bank Account column,Lütfen Banka Hesabı sütununu ekleyin, +Please add the account to root level Company - {0},Lütfen hesabı kök seviyesindeki Şirkete ekleyin - {0}, +Please add {1} role to user {0}.,Lütfen {0} kullanıcısına {1} rolünü ekleyin., +Please adjust the qty or edit {0} to proceed.,Lütfen miktarı ayarlayın veya devam etmek için {0} öğesini düzenleyin., +Please attach CSV file,Lütfen CSV dosyasını ekleyin, +Please cancel and amend the Payment Entry,Lütfen Ödeme Girişini iptal edin ve düzeltin, +Please cancel payment entry manually first,Lütfen önce ödeme girişini manuel olarak iptal edin, +Please cancel related transaction.,Lütfen ilgili işlemi iptal edin., +Please check Process Deferred Accounting {0} and submit manually after resolving errors.,Lütfen Ertelenmiş Muhasebe İşlemini {0} kontrol edin ve hataları çözdükten sonra manuel olarak gönderin., +Please check either with operations or FG Based Operating Cost.,Lütfen operasyonları veya Bitmiş Ürün Bazlı İşletme Maliyetini kontrol edin., +Please check the error message and take necessary actions to fix the error and then restart the reposting again.,Lütfen hata mesajını kontrol edin ve hatayı düzeltmek için gerekli işlemleri yapın ve ardından yeniden göndermeyi yeniden başlatın., +Please check your email to confirm the appointment,Randevuyu onaylamak için lütfen e-postanızı kontrol edin, +Please contact any of the following users to extend the credit limits for {0}: {1},Kredi limitlerini uzatmak için lütfen aşağıdaki kullanıcılardan herhangi biriyle iletişime geçin: {0}: {1}, +Please contact any of the following users to {} this transaction.,Bu işlemi {} yapmak için lütfen aşağıdaki kullanıcılardan herhangi biriyle iletişime geçin., +Please contact your administrator to extend the credit limits for {0}.,{0} için kredi limitlerini uzatmak amacıyla lütfen yöneticinizle iletişime geçin., +Please create Landed Cost Vouchers against Invoices that have 'Update Stock' enabled.,Lütfen ‘Stok Güncelle’ seçeneği etkin olan faturalar için İndirgenmiş Maliyet Fişleri oluşturun., +Please create a new Accounting Dimension if required.,Gerekirse lütfen yeni bir Muhasebe Boyutu oluşturun., +Please create purchase from internal sale or delivery document itself,Lütfen satın alma işlemini dahili satış veya teslimat belgesinin kendisinden oluşturun, +"Please delete Product Bundle {0}, before merging {1} into {2}",Lütfen {1} adresini {2} adresiyle birleştirmeden önce {0} Ürün Paketini silin, +Please do not book expense of multiple assets against one single Asset.,Lütfen birden fazla varlığın giderini tek bir Varlığa karşı muhasebeleştirmeyin., +Please enable Use Old Serial / Batch Fields to make_bundle,Lütfen make_bundle için Eski Seri / Toplu Alanları Kullan seçeneğini etkinleştirin, +Please enable only if the understand the effects of enabling this.,Lütfen yalnızca bunu etkinleştirmenin etkilerini anlıyorsanız etkinleştirin., +Please enable {0} in the {1}.,Lütfen {1} içindeki {0} öğesini etkinleştirin., +Please enable {} in {} to allow same item in multiple rows,Aynı öğeye birden fazla satırda izin vermek için lütfen {} içinde {} ayarını etkinleştirin, +Please ensure that the {0} account is a Balance Sheet account. You can change the parent account to a Balance Sheet account or select a different account.,Lütfen {0} hesabının bir Bilanço hesabı olduğundan emin olun. Ana hesabı bir Bilanço hesabı olarak değiştirebilir veya farklı bir hesap seçebilirsiniz., +Please ensure that the {0} account {1} is a Payable account. You can change the account type to Payable or select a different account.,Lütfen {0} hesabının {1} bir Borç hesabı olduğundan emin olun. Hesap türünü Ödenecek olarak değiştirebilir veya farklı bir hesap seçebilirsiniz., +Please ensure {} account is a Balance Sheet account.,Lütfen {} hesabının bir Bilanço Hesabı olduğundan emin olun., +Please ensure {} account {} is a Receivable account.,Lütfen {} hesabının {} bir Alacak hesabı olduğundan emin olun., +Please enter Root Type for account- {0},Lütfen hesap için Kök Türünü girin- {0}, +Please enter Serial Nos,Lütfen Seri Numaralarını girin, +Please enter Shipment Parcel information,Lütfen Gönderi Koli bilgilerini girin, +Please enter Stock Items consumed during the Repair.,Lütfen Onarım sırasında tüketilen Stok Kalemlerini girin., +Please enter mobile number first.,Lütfen önce cep telefonu numaranızı girin., +Please enter quantity for item {0},Lütfen {0} ürünü için miktar girin, +Please enter serial nos,Lütfen seri numaralarını girin, +"Please first set Last Name, Email and Phone for the user","Lütfen önce kullanıcı için Soyadı, E-posta ve Telefon ayarlayın", +Please fix overlapping time slots for {0},Lütfen {0} için çakışan zaman aralıklarını düzeltin, +Please fix overlapping time slots for {0}.,Lütfen {0} için çakışan zaman aralıklarını düzeltin., +Please import accounts against parent company or enable {} in company master.,Lütfen hesapları ana şirkete karşı içe aktarın veya şirket ana sayfasında {} öğesini etkinleştirin., +"Please keep one Applicable Charges, when 'Distribute Charges Based On' is 'Distribute Manually'. For more charges, please create another Landed Cost Voucher.","‘Masrafları Manuel Dağıt’ seçili olduğunda, lütfen bir geçerli masraf tutun. Daha fazla masraf için başka bir Gümrük Masraf Fişi oluşturun.", +Please make sure the file you are using has 'Parent Account' column present in the header.,Lütfen kullandığınız dosyanın başlığında 'Ana Hesap' sütununun bulunduğundan emin olun., +Please mention 'Weight UOM' along with Weight.,Lütfen Ağırlık ile birlikte 'Ağırlık Ölçü Birimini de belirtin., +Please mention '{0}' in Company: {1},Lütfen Şirket: {1} için '{0}' ifadesini belirtin, +Please mention the Current and New BOM for replacement.,Lütfen değiştirmek için Mevcut ve Yeni Ürün Ağacını belirtin., +Please rectify and try again.,Lütfen gözden geçirip tekrar deneyiniz., +Please refresh or reset the Plaid linking of the Bank {}.,Lütfen Banka {}'nın Plaid bağlantısını yenileyin veya sıfırlayın., +Please save before proceeding.,Devam etmeden önce lütfen kaydedin., +Please select Bank Account,Lütfen Banka Hesabını Seçin, +Please select Finished Good Item for Service Item {0},Lütfen Hizmet Kalemi için Bitmiş Ürünü seçin {0}, +Please select Serial/Batch Nos to reserve or change Reservation Based On to Qty.,Lütfen rezerve etmek için Seri/Parti Numaralarını seçin veya Rezervasyonu Miktara Göre Değiştirin., +Please select Subcontracting Order instead of Purchase Order {0},Lütfen Satın Alma Siparişi yerine Alt Yüklenici Siparişini seçin {0}, +Please select Unrealized Profit / Loss account or add default Unrealized Profit / Loss account account for company {0},Lütfen Gerçekleşmemiş Kâr / Zarar hesabını seçin veya {0} şirketi için varsayılan Gerçekleşmemiş Kâr / Zarar hesabı hesabını ekleyin, +Please select a Subcontracting Purchase Order.,Lütfen bir Alt Yüklenici Siparişi seçin., +Please select a Warehouse,Lütfen bir Depo seçin, +Please select a Work Order first.,Lütfen önce bir İş Emri seçin., +Please select a country,Lütfen bir ülke seçin, +Please select a customer for fetching payments.,Lütfen ödemeleri almak için bir müşteri seçin., +Please select a date,Lütfen bir tarih seçin, +Please select a date and time,Lütfen bir tarih ve saat seçin, +Please select a row to create a Reposting Entry,Yeniden Yayınlama Girişi oluşturmak için lütfen bir satır seçin, +Please select a supplier for fetching payments.,Lütfen ödemeleri almak için bir tedarikçi seçin., +Please select a valid Purchase Order that has Service Items.,Lütfen Hizmet Ürünleri içeren geçerli bir Satın Alma Siparişi seçin., +Please select a valid Purchase Order that is configured for Subcontracting.,Lütfen Alt Sözleşme için yapılandırılmış geçerli bir Satın Alma Siparişi seçin., +Please select an item code before setting the warehouse.,Depoyu ayarlamadan önce lütfen bir ürün kodu seçin., +Please select either the Item or Warehouse or Warehouse Type filter to generate the report.,"Raporu oluşturmak için Ürün, Depo veya Depo Türü filtresinden birini seçin.", +Please select items,Lütfen Ürün Seçin, +Please select items to reserve.,Lütfen rezerve edilecek ürünleri seçin., +Please select items to unreserve.,Lütfen ayırmak istediğiniz ürünleri seçin., +Please select only one row to create a Reposting Entry,Yeniden Yayınlama Girişi oluşturmak için lütfen yalnızca bir satır seçin, +Please select rows to create Reposting Entries,Yeniden Yayınlama Girişi oluşturmak için lütfen bir satır seçin, +Please select the required filters,Lütfen gerekli filtreleri seçin, +Please select valid document type.,Lütfen geçerli belge türünü seçin., +Please set '{0}' in Company: {1},Lütfen Şirket: {1} için '{0}' değerini ayarlayın, +Please set Account,Lütfen Hesabı Ayarlayın, +Please set Accounting Dimension {} in {},Lütfen {} içinde Muhasebe Boyutunu {} ayarlayın, +Please set Email/Phone for the contact,Lütfen kişi için E-posta/Telefon ayarlayın, +Please set Fiscal Code for the customer '%s',Lütfen müşteri için Mali Kodu ayarlayın '%s', +Please set Fiscal Code for the public administration '%s',Lütfen kamu idaresi için Mali Kodu belirleyin '%s', +Please set Fixed Asset Account in {} against {}.,Lütfen {} içindeki Sabit Kıymet Hesabını {} ile karşılaştırın., +Please set Opening Number of Booked Depreciations,Lütfen Kayıtlı Amortismanların Açılış Sayısını ayarlayın, +Please set Parent Row No for item {0},Lütfen {0} öğesi için Üst Satır Numarasını ayarlayın, +Please set Root Type,Lütfen Kök Türünü Ayarlayın, +Please set Tax ID for the customer '%s',Lütfen müşteri için Vergi Kimliğini ayarlayın '%s', +Please set VAT Accounts in {0},Lütfen KDV Hesaplarını {0} olarak ayarlayın, +"Please set Vat Accounts for Company: ""{0}"" in UAE VAT Settings","Lütfen BAE KDV Ayarlarında Şirket için KDV Hesaplarını ""{0}"" olarak ayarlayın", +Please set a Cost Center for the Asset or set an Asset Depreciation Cost Center for the Company {},Lütfen Varlık için bir Maliyet Merkezi belirleyin veya Şirket için bir Varlık Amortisman Maliyet Merkezi belirleyin {}, +Please set an Address on the Company '%s',Lütfen Şirket için bir Adres belirleyin '%s', +Please set an Expense Account in the Items table,Lütfen Ürünler tablosunda bir Gider Hesabı ayarlayın, +Please set default Exchange Gain/Loss Account in Company {},Lütfen {} Şirketi varsayılan Döviz Kazanç/Zarar Hesabını ayarlayın, +Please set default Expense Account in Company {0},Lütfen Şirket {0} adresinde varsayılan Gider Hesabını ayarlayın, +Please set default cost of goods sold account in company {0} for booking rounding gain and loss during stock transfer,Stok transferi sırasında yuvarlama kazancı ve kaybını kaydetmek için lütfen {0} şirketinde varsayılan satılan malın maliyeti hesabını ayarlayın, +Please set either the Tax ID or Fiscal Code on Company '%s',Lütfen Şirket '%s' için Vergi Kimlik Numarasını veya Mali Kodunu ayarlayın, +Please set filters,Lütfen filtreleri ayarlayın, +Please set one of the following:,Lütfen aşağıdakilerden birini ayarlayın:, +Please set the cost center field in {0} or setup a default Cost Center for the Company.,Lütfen {0} adresinde maliyet merkezi alanını ayarlayın veya Şirket için varsayılan bir Maliyet Merkezi kurun., +Please set {0} in BOM Creator {1},{1} Ürün Ağacı Oluşturucuda {0} değerini ayarlayın, +Please set {0} in Company {1} to account for Exchange Gain / Loss,Lütfen {1} şirketinde Döviz Kur Farkı Kâr/Zarar hesabını ayarlamak için {0} belirleyin., +"Please set {0} to {1}, the same account that was used in the original invoice {2}.","Lütfen {0} alanını {1} olarak ayarlayın, bu orijinal fatura {2} için kullanılan hesapla aynı olmalıdır.", +Please setup and enable a group account with the Account Type - {0} for the company {1},Lütfen {1} şirketi için Hesap Türü {0} olan bir grup hesabı kurun ve etkinleştirin, +Please share this email with your support team so that they can find and fix the issue.,Sorunu bulup çözebilmeleri için lütfen bu e-postayı destek ekibinizle paylaşın., +Please try again in an hour.,Lütfen bir saat sonra tekrar deneyin., +Please update Repair Status.,Lütfen Onarım Durumunu güncelleyin., +Portal User,Portal Kullanıcısı, +Posting Datetime,Gönderim Tarih ve Saati, +Powered by {0},{0} Tarafından desteklenmektedir, +Preview Required Materials,Gerekli Malzemeleri İncele, +"Previous Year is not closed, please close it first","Önceki Mali Yıl henüz kapatılmamış, önce bu işlemi tamamlayın", +Price ({0}),Fiyat ({0}), +Price Per Unit ({0}),Birim Fiyatı ({0}), +Price is not set for the item.,Ürün için fiyat belirlenmedi., +Primary Party,Birincil Parti, +Primary Role,Birincil Rol, +Print Format Builder,Yazdırma Formatı Oluşturucu, +Print Receipt on Order Complete,Sipariş Tamamlandığında Makbuz Yazdır, +Print Style,Yazdırma Stili, +Printing,Yazdırma, +Priority cannot be lesser than 1.,Öncelik 1'den küçük olamaz., +Priority is mandatory,Öncelik zorunludur, +Process Loss Percentage cannot be greater than 100,Proses Kaybı Yüzdesi 100'den büyük olamaz, +Process Loss Qty,Kayıp Proses Miktarı, +Process Loss Report,İşlem Kaybı Raporu, +Process Loss Value,Proses Kaybı Değeri, +Process Payment Reconciliation,Ödeme Mutabakatını İşle, +Process Payment Reconciliation Log,Ödeme Mutabakat Günlüğünü İşle, +Process Payment Reconciliation Log Allocations,Ödeme Mutabakat Günlüğü Tahsislerini İşle, +Processed BOMs,İşlenmiş Ürün Ağaçları, +Processing Sales! Please Wait...,Satışlar İşleniyor! Lütfen Bekleyin..., +Produced / Received Qty,Üretilen / Alınan Miktar, +Product Price ID,Ürün Fiyat Kimliği, +Production Plan Already Submitted,Üretim Planı Zaten Gönderildi, +Production Plan Qty,Planlanan Üretim Miktarı, +Production Plan Sub Assembly Item,Üretim Planı Alt Montaj Ürünü, +Production Plan Sub-assembly Item,Üretim Planı Alt Montaj Öğesi, +Production Plan Summary,Üretim Planı Özeti, +Profit and Loss Summary,Kâr ve Zarar Özeti, +Progress,İlerleme, +Progress (%),İlerleme (%), +Project Progress:,Proje İlerlemesi:, +Prospect Lead,Potansiyel Müşteri Adayı, +Prospect Opportunity,Portnasiyel Müşteri Fırsatı, +Prospect {0} already exists,Potansiyel Müşteri {0} zaten mevcut, +Provisional Account,Geçici Hesap, +Publisher,Yayınlayan, +Publisher ID,Yayıncı Kimliği, +Purchase Order Item reference is missing in Subcontracting Receipt {0},Alt Yüklenici İrsaliyesi {0} için Satın Alma Siparişi Ürün referansı eksik, +Purchase Orders {0} are un-linked,Satın Alma Siparişleri {0} bağlantısı kaldırıldı, +Purchase Receipt {0} created.,{0} Alış İrsaliyesi oluşturuldu., +Purchases,Alımlar, +Purposes Required,Amaçlar Gerekiyor, +Putaway Rule,Yerleştirme Kuralı, +Putaway Rule already exists for Item {0} in Warehouse {1}.,{1} Deposundaki {0} Ürünü için zaten bir Paketten Çıkarma Kuralı mevcuttur., +Qty ,Miktar , +Qty (Company),Miktar (Şirket), +Qty (Warehouse),Miktar (Depo), +Qty After Transaction,İşlem Sonrası Miktar, +Qty Change,Miktar Değişimi, +Qty In Stock,Stok Miktarı, +Qty Per Unit,Birim Başına Miktar, +"Qty To Manufacture ({0}) cannot be a fraction for the UOM {2}. To allow this, disable '{1}' in the UOM {2}.","Üretim Miktarı ({0}), {2} için kesirli olamaz. Bunu sağlamak için, {2} içindeki '{1}' seçeneğini devre dışı bırakın.", +Qty To Produce,Üretilecek Miktar, +Qty Wise Chart,Miktar Bazlı Grafik, +Qty and Rate,Miktar ve Oran, +Qty as Per Stock UOM,Stok Birimine Göre Miktar, +Qty for which recursion isn't applicable.,Yinelemenin uygulanamadığı miktar., +Qty of Finished Goods Item should be greater than 0.,Bitmiş Ürün Miktarı 0'dan büyük olmalıdır., +Qty to Fetch,Getirilecek Miktar, +Qty to Produce,Üretilecek Miktar, +Quality Inspection Parameter,Kalite Kontrol Parametresi, +Quality Inspection Parameter Group,Kalite Kontrol Parametre Grubu, +Quantity (A - B),Miktar (A - B), +Quantity is required,Miktar gereklidir, +"Quantity must be greater than zero, and less or equal to {0}",Miktar sıfırdan büyük ve {0} değerine eşit veya daha az olmalıdır, +Quantity to Produce should be greater than zero.,Üretilecek Miktar sıfırdan büyük olmalıdır., +Quantity to Scan,Taranacak Miktar, +Quarter {0} {1},{0}. Çeyrek {1}, +Queue Size should be between 5 and 100,Kuyruk Boyutu 5 ile 100 arasında olmalıdır, +Quoted Amount,Teklif Verilen Tutar, +Rate Section,Oran Bölümü, +Rate of Depreciation (%),Amortisman Oranı (%), +Ratios,Oranlar, +Raw Material Cost Per Qty,Birim Başına Hammadde Maliyeti, +Raw Material Item,Hammadde Ürünü, +Raw Material Value,Hammadde Ürünü Değeri, +Raw Materials Actions,Hammadde Aksiyonları, +Reached Root,Köke Ulaştı, +Reason for hold:,Bekletme nedeni:, +Rebuild Tree,Ağaç Yapısını Tekrar Oluştur, +Rebuilding BTree for period ...,Dönem için BTree yeniden oluşturuluyor…, +Recalculate Incoming/Outgoing Rate,Gelen/Giden Oranını Yeniden Hesapla, +Recalculating Purchase Cost against this Project...,Bu Projeye Göre Satın Alma Maliyeti Yeniden Hesaplanıyor..., +Receivable/Payable Account,Alacak / Borç Hesabı, +Receivable/Payable Account: {0} doesn't belong to company {1},Alacak/Borç Hesabı: {0} {1} şirketine ait değildir, +Received Amount After Tax,Vergi Sonrası Alınan Tutar, +Received Amount After Tax (Company Currency),Vergi Sonrası Ödenen Tutar (Şirket Para Birimi), +Received Amount cannot be greater than Paid Amount,Alınan Tutar Ödenen Tutardan büyük olamaz, +Recent Orders,Son Siparişler, +Recent Transactions,Son İşlemler, +Reconcile All Serial Nos / Batches,Tüm Seri No ve Partileri Doğrula, +Reconcile Effect On,Mutabakat Etkisi Açık, +Reconcile on Advance Payment Date,Avans Ödeme Tarihinde Mutabakat Sağla, +Reconcile the Bank Transaction,Banka İşlemlerinin Mutabakatını Yapın, +Reconciled Entries,Mutabakat Girişleri, +Reconciliation Date,Mutabakat Tarihi, +Reconciliation Error Log,Mutabakat Hata Günlüğü, +Reconciliation Logs,Denkleştirme Kayıtları, +Reconciliation Progress,Mutabakat İlerlemesi, +Reconciliation Queue Size,Mutabakat Kuyruğu Boyutu, +Reconciliation Takes Effect On,Mutabakat Şu Tarihlerde Yürürlüğe Girer, +Recoverable Standard Rated expenses should not be set when Reverse Charge Applicable is Y,"İade Edilebilir Standart Oranlı Giderler, Ters Yükleme Uygulanıyorken (Y) ayarlanmamalıdır.", +Recurse Every (As Per Transaction UOM),Her Tekrar (İşlem Ölçü Birimine Göre), +Recurse Over Qty cannot be less than 0,Yineleme Miktarı 0'dan küçük olamaz., +Recursive Discounts with Mixed condition is not supported by the system,Karışık koşullarla yapılan yinelemeli indirimler sistem tarafından desteklenmemektedir., +Reference Date for Early Payment Discount,Erken Ödeme İndirimi için Referans Tarihi, +Reference Detail,Referans Detayı, +Reference DocType,Referans DocType, +Reference Exchange Rate,Referans Döviz Kuru, +Reference number of the invoice from the previous system,Önceki Sistemde Kayıtlı Fatura Numarası, +References to Sales Invoices are Incomplete,Satış Faturalarına İlişkin Referanslar Eksik, +References to Sales Orders are Incomplete,Satış Siparişlerine Yapılan Referanslar Eksik, +References {0} of type {1} had no outstanding amount left before submitting the Payment Entry. Now they have a negative outstanding amount.,{1} türündeki {0} referanslarının Ödeme Girişini göndermeden önce ödenmemiş tutarı yoktu. Şimdi ise negatif ödenmemiş tutarları var., +Refresh Google Sheet,Google E-Tablosunu Yenile, +Refresh Plaid Link,Plaid Bağlantısını Yenile, +"Regards,","Saygılarımla,", +Rejected ,Reddedildi , +Rejected Serial and Batch Bundle,Reddedilen Seri ve Parti, +Rejected Warehouse and Accepted Warehouse cannot be same.,Red Deposu ile Kabul Deposu aynı olamaz., +Remove Parent Row No in Items Table,Ürünler Tablosunda Üst Satır Numarasını Kaldır, +Removing rows without exchange gain or loss,Satırlar Değişim kazancı veya kaybı olmadan kaldırılıyor, +Repair,Onar, +Repair Asset,Varlık Onarımı, +Repair Details,Tamir Detayları, +"Replace a particular BOM in all other BOMs where it is used. It will replace the old BOM link, update cost and regenerate ""BOM Explosion Item"" table as per new BOM. +It also updates latest price in all the BOMs.","Bu talimat, bir Ürün Ağacını başka Ürün Ağaçlarında kullanıldığında otomatik olarak günceller. Eski Ürün Ağacı bağlantısı değiştirilir, güncellenmiş maliyetler yeniden hesaplanır ve yeni Ürün Ağacı üzerinden tüm bileşenlerin listesi yeniden oluşturulur. Bu süreç, üretim ve maliyet hesaplamalarında tutarlılığı sağlar.", +Report Error,Hatayı Rapor Et, +Report Filters,Rapor Filtreleri, +Repost Accounting Ledger,Muhasebe Defterini Yeniden Gönder, +Repost Accounting Ledger Items,Muhasebe Defteri Kalemlerini Yeniden Gönder, +Repost Accounting Ledger Settings,Muhasebe Defteri Ayarlarını Yeniden Gönder, +Repost Allowed Types,Yeniden Göndermeye İzin Verilen Türler, +Repost Error Log,Hata Günlüğünü Yeniden Gönder, +Repost Item Valuation,Yeniden Değerleme, +Repost Payment Ledger,Ödeme Defterini Yeniden Gönder, +Repost Payment Ledger Items,Ödeme Defteri Kalemlerini Yeniden Gönder, +Repost Status,Yeniden Gönderme Durumu, +Repost has started in the background,Yeniden gönderme arka planda başlatıldı, +Repost in background,Arka Planda Yeniden Gönder, +Repost started in the background,Yeniden gönderme arka planda başlatıldı, +Reposting Completed {0}%,Yeniden Gönderme Tamamlandı %{0}, +Reposting Data File,Veri Dosyasını Yeniden Gönderme, +Reposting Info,Yeniden Gönderilen Bilgiler, +Reposting Progress,Yeniden Gönderme İlerlemesi, +Reposting entries created: {0},Oluşturulan girişler yeniden gönderiliyor: {0}, +Reposting has been started in the background.,Yeniden gönderme arka planda başlatıldı., +Reposting in the background.,Yeniden gönderme işlemleri arka planda tamamlanıyor., +Represents a Financial Year. All accounting entries and other major transactions are tracked against the Fiscal Year.,Mali Yılı temsil eder. Tüm muhasebe kayıtları ve diğer önemli işlemler Mali Yıla göre takip edilir., +Request Parameters,İstek Parametreleri, +Request Timeout,İstek Zaman Aşımı, +Reservation Based On,Rezervasyona Göre, +Reserve,Rezerve Et, +Reserve Stock,Stok Rezervi, +"Reserved Qty ({0}) cannot be a fraction. To allow this, disable '{1}' in UOM {3}.","Ayrılan Miktar ({0}) kesirli olamaz. Bunu sağlamak için, {3} Biriminde '{1}' özelliğini devre dışı bırakın.", +Reserved Qty for Production Plan,Üretim Planı İçin Ayrılan Miktar, +Reserved Qty for Subcontract,Alt Yüklenici İçin Ayrılan Miktar, +Reserved Qty should be greater than Delivered Qty.,"Ayrılan Miktar, Teslim Edilen Miktardan büyük olmalıdır.", +Reserved Serial No.,Ayrılmış Seri No., +Reserved Stock,Ayrılmış Stok, +Reserved Stock for Batch,Parti için Ayrılmış Stok, +Reserved for POS Transactions,POS İşlemleri İçin Ayrılmıştır, +Reserved for Production,Üretim İçin Ayrılan, +Reserved for Production Plan,Üretim Planı İçin Ayrılan, +Reserved for Sub Contracting,Alt Yüklenici İçin Ayrılan, +Reserving Stock...,Stok Ayırılıyor..., +Reset Company Default Values,Şirket Varsayılan Değerlerini Sıfırla, +Reset Plaid Link,Plaid Bağlantısını Yenile, +Reset Raw Materials Table,Hammadde Tablosunu Sıfırla, +Resolution Due,Çözüm Tarihi, +Restart,Yeniden Başlat, +Restore Asset,Varlığı Geri Yükle, +Restrict,Kısıtlama, +Restrict Items Based On,Ürünleri Şuna Göre Kısıtla, +Result Key,Sonuç Anahtarı, +Resume Job,İşi Devam Ettir, +Resume Timer,Zamanlayıcıya Devam Et, +Retried,Yeniden Denendi, +Retry,Yeniden Dene, +Retry Failed Transactions,Başarısız İşlemleri Tekrar Deneyin, +Return Against,Karşılık Gelen Fatura, +Return Components,Bileşenleri İade Et, +Return Qty,İade Miktarı, +Return Qty from Rejected Warehouse,Reddedilen Depodan İade Miktarı, +Return of Components,Bileşenlerin İadesi, +Returned,İade Edildi, +Returned Against,Gelen İade, +Returned Qty in Stock UOM,Stok Biriminde İade Edilen Miktar, +Returned exchange rate is neither integer not float.,Geri dönen döviz kuru ne tam sayı ne de ondalıklı sayı., +Revaluation Journals,Yeniden Değerleme Kayıtları, +Revaluation Surplus,Yeniden Değerleme Fazlası, +Revenue,Gelir, +Reversal Of,Ters Kayıt, +Right Child,Sağ Alt, +Root,Kök, +"Root Type for {0} must be one of the Asset, Liability, Income, Expense and Equity","{0} için Kök Tipi Varlık, Borç, Gelir, Gider ve Özkaynaklardan biri olmalıdır", +Round Free Qty,Bedelsiz Miktarı Yuvarla, +Round Off Tax Amount,Yuvarlama Vergi Tutarı, +Round Off for Opening,Açılış İçin Yuvarlama, +Rounding Loss Allowance,Yuvarlama Kaybı Karşılığı, +Rounding Loss Allowance should be between 0 and 1,Yuvarlama Kaybı Karşılığı 0 ile 1 arasında olmalıdır., +Rounding gain/loss Entry for Stock Transfer,Stok Transferi için Yuvarlama Kazanç/Kayıp Girişi, +Row #,Satır #, +Row # {0}:,Satır # {0}:, +Row # {0}: Please add Serial and Batch Bundle for Item {1},Satır # {0}: Lütfen {1} ürünü için Seri ve Parti Paketi ekleyin, +Row #{0}: A reorder entry already exists for warehouse {1} with reorder type {2}.,Satır #{0}: {1} deposu için {2} yeniden sipariş türüyle zaten yeniden bir sipariş girişi mevcut., +Row #{0}: Acceptance Criteria Formula is incorrect.,Satır #{0}: Kabul Kriteri Formülü hatalı., +Row #{0}: Acceptance Criteria Formula is required.,Satır #{0}: Kabul Kriteri Formülü gereklidir., +Row #{0}: Accepted Warehouse and Rejected Warehouse cannot be same,Satır #{0}: Kabul Deposu ve Red Deposu aynı olamaz, +Row #{0}: Accepted Warehouse is mandatory for the accepted Item {1},"Satır #{0}: Kabul Deposu, kabul edilen {1} Ürünü için zorunludur", +Row #{0}: Allocated Amount cannot be greater than Outstanding Amount of Payment Request {1},"Satır #{0}: Tahsis Edilen Tutar, Ödeme Talebi {1} için Kalan Tutarı aşamaz.", +Row #{0}: Allocated amount:{1} is greater than outstanding amount:{2} for Payment Term {3},"Satır #{0}: {3} Ödeme Dönemi için Tahsis edilen tutar: {1}, ödenmemiş tutardan büyük: {2}", +Row #{0}: Amount must be a positive number,Satır #{0}: Tutar pozitif bir sayı olmalıdır, +Row #{0}: BOM is not specified for subcontracting item {0},Satır #{0}: {0} alt yüklenici kalemi için ürün ağacı belirtilmemiş, +Row #{0}: Batch No {1} is already selected.,Satır #{0}: Parti No {1} zaten seçili., +Row #{0}: Cannot allocate more than {1} against payment term {2},Satır #{0}: Ödeme süresi {2} için {1} değerinden daha fazla tahsis edilemez, +Row #{0}: Cannot transfer more than Required Qty {1} for Item {2} against Job Card {3},Satır #{0}: İş Kartı {3} için {2} Ürünü için Gerekli Olan {1} Miktardan fazlasını aktaramazsınız., +Row #{0}: Consumed Asset {1} cannot be Draft,Satır #{0}: Tüketilen Varlık {1} Taslak olamaz, +Row #{0}: Consumed Asset {1} cannot be cancelled,Satır #{0}: Tüketilen Varlık {1} iptal edilemez, +Row #{0}: Consumed Asset {1} cannot be the same as the Target Asset,Satır #{0}: Tüketilen Varlık {1} Hedef Varlık ile aynı olamaz, +Row #{0}: Consumed Asset {1} cannot be {2},"Satır #{0}: Tüketilen Varlık {1}, {2} olamaz.", +Row #{0}: Consumed Asset {1} does not belong to company {2},Satır #{0}: Tüketilen Varlık {1} {2} şirketine ait değil, +Row #{0}: Cumulative threshold cannot be less than Single Transaction threshold,"Satır #{0}: Kümülatif eşik, Tek İşlem eşiğinden az olamaz", +Row #{0}: Dates overlapping with other row,Satır #{0}: Diğer satırla çakışan tarihler var, +Row #{0}: Default BOM not found for FG Item {1},Satır #{0}: Bitmiş Ürün için varsayılan {1} Ürün Ağacı bulunamadı, +Row #{0}: Expense Account not set for the Item {1}. {2},Satır #{0}: Gider Hesabı {1} Öğesi için ayarlanmadı. {2}, +Row #{0}: Finished Good Item Qty can not be zero,Satır #{0}: Bitmiş Ürün Miktarı sıfır olamaz., +Row #{0}: Finished Good Item is not specified for service item {1},Satır #{0}: Hizmet ürünü {1} için Bitmiş Ürün belirtilmemiş., +Row #{0}: Finished Good Item {1} must be a sub-contracted item,Satır #{0}: Bitmiş Ürün {1} bir alt yüklenici ürünü olmalıdır, +Row #{0}: Finished Good reference is mandatory for Scrap Item {1}.,Satır #{0}: Hurda Ürün {1} için Bitmiş Ürün referansı zorunludur., +Row #{0}: For {1} Clearance date {2} cannot be before Cheque Date {3},"Satır #{0}: {1} için Tahsilat Tarihi {2}, Çek Tarihi {3} olan tarihten önce olamaz.", +"Row #{0}: For {1}, you can select reference document only if account gets credited","Satır #{0}: {1} için, yalnızca hesap alacaklandırılırsa referans belgesini seçebilirsiniz", +"Row #{0}: For {1}, you can select reference document only if account gets debited","Satır #{0}: {1} için, yalnızca hesap alacaklandırılırsa referans belgesini seçebilirsiniz", +Row #{0}: From Date cannot be before To Date,Satır #{0}: Başlangıç Tarihi Bitiş Tarihinden önce olamaz, +Row #{0}: Item {1} does not exist,Satır #{0}: {1} öğesi mevcut değil, +"Row #{0}: Item {1} has been picked, please reserve stock from the Pick List.","Satır #{0}: Ürün {1} toplandı, lütfen Toplama Listesinden stok ayırın.", +Row #{0}: Item {1} is not a service item,Satır #{0}: {1} öğesi bir hizmet kalemi değildir, +Row #{0}: Item {1} is not a stock item,Satır #{0}: {1} bir stok kalemi değildir, +Row #{0}: Only {1} available to reserve for the Item {2},Satır #{0}: Yalnızca {1} Öğesi {2} için rezerve edilebilir, +Row #{0}: Please select Item Code in Assembly Items,Satır #{0}: Lütfen Montaj Öğelerinde Ürün Kodunu seçin, +Row #{0}: Please select the BOM No in Assembly Items,Satır #{0}: Lütfen Montaj Kalemleri için Ürün Ağacı No'yu seçin, +Row #{0}: Please select the Sub Assembly Warehouse,Satır #{0}: Lütfen Alt Montaj Deposunu seçin, +Row #{0}: Please update deferred revenue/expense account in item row or default account in company master,Satır #{0}: Lütfen kalem satırındaki ertelenmiş gelir/gider hesabını veya şirket ana sayfasındaki varsayılan hesabı güncelleyin, +Row #{0}: Qty increased by {1},Satır #{0}: Miktar {1} oranında artırıldı, +Row #{0}: Qty must be a positive number,Satır #{0}: Miktar pozitif bir sayı olmalıdır, +Row #{0}: Qty should be less than or equal to Available Qty to Reserve (Actual Qty - Reserved Qty) {1} for Iem {2} against Batch {3} in Warehouse {4}.,"Satır #{0}: Miktar, {4} deposunda {3} Partisi için {2} ürününe karşı Rezerve Edilebilir Miktar'dan (Gerçek Miktar - Rezerve Edilen Miktar) {1} küçük veya eşit olmalıdır.", +Row #{0}: Quality Inspection is required for Item {1},Satır #{0}: {1} ürünü için Kalite Kontrol gereklidir, +Row #{0}: Quality Inspection {1} is not submitted for the item: {2},Satır #{0}: {1} Kalite Kontrol {2} Ürünü için gönderilmemiş, +Row #{0}: Quality Inspection {1} was rejected for item {2},Satır #{0}: {1} Kalite Kontrolü {2} Ürünü için reddedildi, +Row #{0}: Quantity to reserve for the Item {1} should be greater than 0.,Satır #{0}: {1} Kalemi için rezerve edilecek miktar 0'dan büyük olmalıdır., +Row #{0}: Rate must be same as {1}: {2} ({3} / {4}),Satır #{0}: {1} işlemindeki fiyat ile aynı olmalıdır: {2} ({3} / {4}), +Row #{0}: Received Qty must be equal to Accepted + Rejected Qty for Item {1},"Satır #{0}: Alınan Miktar, {1} Kalemi için Kabul Edilen + Reddedilen Miktara eşit olmalıdır", +Row #{0}: Rejected Qty cannot be set for Scrap Item {1}.,Satır #{0}: Hurda Ürün {1} için Reddedilen Miktar ayarlanamaz., +Row #{0}: Rejected Warehouse is mandatory for the rejected Item {1},"Satır #{0}: Red Deposu, reddedilen {1} Ürünü için zorunludur.", +Row #{0}: Scrap Item Qty cannot be zero,Satır #{0}: Hurda Ürün Miktarı sıfır olamaz, +"Row #{0}: Selling rate for item {1} is lower than its {2}. + Selling {3} should be atleast {4}.

Alternatively, + you can disable selling price validation in {5} to bypass + this validation.","Satır #{0}: {1} öğesi için satış oranı {2} değerinden daha düşük. + Satış {3} en az {4} olmalıdır.

Alternatif olarak, + bu doğrulamayı + atlamak için {5} içinde satış fiyatı doğrulamasını devre dışı bırakabilirsiniz.", +Row #{0}: Serial No {1} for Item {2} is not available in {3} {4} or might be reserved in another {5}.,"Satır #{0}: {2} ürünü için Seri No {1}, {3} {4} için mevcut değil veya başka bir {5} içinde rezerve edilmiş olabilir.", +Row #{0}: Serial No {1} is already selected.,Satır #{0}: Seri No {1} zaten seçilidir., +Row #{0}: Start Time and End Time are required,Satır #{0}: Başlangıç Saati ve Bitiş Saati gereklidir, +Row #{0}: Start Time must be before End Time,Satır #{0}: Başlangıç Zamanı Bitiş Zamanından önce olmalıdır, +Row #{0}: Status is mandatory,Satır #{0}: Durum zorunludur, +Row #{0}: Stock cannot be reserved for Item {1} against a disabled Batch {2}.,"Satır #{0}: Stok, devre dışı bırakılmış bir Parti {2} karşılığında {1} Kalemi için ayrılamaz.", +Row #{0}: Stock cannot be reserved for a non-stock Item {1},"Satır #{0}: Stok, stokta olmayan bir Ürün için rezerve edilemez {1}", +Row #{0}: Stock cannot be reserved in group warehouse {1}.,"Satır #{0}: {1} deposu bir Grup Deposu olduğundan, stok rezerve edilemez.", +Row #{0}: Stock is already reserved for the Item {1}.,Satır #{0}: Stok zaten {1} kalemi için ayrılmıştır., +Row #{0}: Stock is reserved for item {1} in warehouse {2}.,"Satır #{0}: Stok, {2} Deposunda bulunan {1} Ürünü için ayrılmıştır.", +Row #{0}: Stock not available to reserve for Item {1} against Batch {2} in Warehouse {3}.,"Satır #{0}: {3} Deposunda, {2} Partisi için {1} ürününe ayrılacak stok bulunmamaktadır.", +Row #{0}: Stock not available to reserve for the Item {1} in Warehouse {2}.,Satır #{0}: {2} Deposundaki {1} Ürünü için rezerve edilecek stok mevcut değil., +Row #{0}: The warehouse {1} is not a child warehouse of a group warehouse {2},"Satır #{0}: {1} deposu, {2} grup deposunun alt deposu değildir.", +Row #{0}: You cannot use the inventory dimension '{1}' in Stock Reconciliation to modify the quantity or valuation rate. Stock reconciliation with inventory dimensions is intended solely for performing opening entries.,Satır #{0}: Envanter boyutu ‘{1}’ Stok Sayımı miktarı veya değerleme oranını değiştirmek için kullanılamaz. Envanter boyutlarıyla yapılan stok doğrulaması yalnızca açılış kayıtları için kullanılmalıdır., +Row #{0}: You must select an Asset for Item {1}.,Satır #{0}: {1} Öğesi için bir Varlık seçmelisiniz., +Row #{0}: {1} is not a valid reading field. Please refer to the field description.,Satır #{0}: {1} geçerli bir okuma alanı değil. Lütfen alan açıklamasına bakın., +Row #{0}: {1} of {2} should be {3}. Please update the {1} or select a different account.,Satır #{0}: {1}/{2} değeri {3} olmalıdır. Lütfen {1} alanını güncelleyin veya farklı bir hesap seçin., +Row #{1}: Warehouse is mandatory for stock Item {0},Satır #{1}: {0} Stok Ürünü için Depo zorunludur, +Row #{}: Finance Book should not be empty since you're using multiple.,Satır #{}: Birden fazla kullandığınız için Finans Defteri boş olmamalıdır., +Row #{}: Please use a different Finance Book.,Satır #{}: Lütfen farklı bir Finans Defteri kullanın., +Row #{}: The original Invoice {} of return invoice {} is not consolidated.,Satır #{}: İade faturasının {} orijinal Faturası {} birleştirilmemiştir., +Row #{}: item {} has been picked already.,Satır #{}: {} öğesi zaten seçildi., +Row #{}: {} {} doesn't belong to Company {}. Please select valid {}.,"Satır #{}: {} {}, {} Şirketine ait değil. Lütfen geçerli {} seçin.", +Row No {0}: Warehouse is required. Please set a Default Warehouse for Item {1} and Company {2},Satır No {0}: Depo gereklidir. Lütfen {1} ürünü ve {2} Şirketi için Varsayılan Depoyu ayarlayın., +Row Number,Satır Numarası, +Row {0},Satır {0}, +"Row {0} picked quantity is less than the required quantity, additional {1} {2} required.","Satır {0}: Seçilen miktar gereken miktardan daha az, ek olarak {1} {2} gerekli.", +Row {0}# Item {1} cannot be transferred more than {2} against {3} {4},"Satır {0}#: Ürün {1}, {3} {4} kapsamında {2} değerinden fazla aktarılamaz.", +Row {0}# Item {1} not found in 'Raw Materials Supplied' table in {2} {3},"Satır {0}#: Ürün {1}, {2} {3} içindeki ‘Tedarik Edilen Ham Maddeler’ tablosunda bulunamadı.", +Row {0}: Accepted Qty and Rejected Qty can't be zero at the same time.,Satır {0}: Kabul Edilen Miktar ve Reddedilen Miktar aynı anda sıfır olamaz., +Row {0}: Account {1} and Party Type {2} have different account types,Satır {0}: Hesap {1} ve Cari Türü {2} farklı hesap türlerine sahiptir, +Row {0}: Allocated amount {1} must be less than or equal to invoice outstanding amount {2},"Satır {0}: Tahsis edilen tutar {1}, fatura kalan tutarı {2}’den az veya ona eşit olmalıdır", +Row {0}: Allocated amount {1} must be less than or equal to remaining payment amount {2},"Satır {0}: Tahsis edilen tutar {1}, kalan ödeme tutarı {2} değerinden az veya ona eşit olmalıdır.", +"Row {0}: As {1} is enabled, raw materials cannot be added to {2} entry. Use {3} entry to consume raw materials.","Satır {0}: {1} etkin olduğu için, ham maddeler {2} girişine eklenemez. Ham maddeleri tüketmek için {3} girişini kullanın.", +Row {0}: Both Debit and Credit values cannot be zero,Satır {0}: Hem Borç hem de Alacak değerleri sıfır olamaz, +Row {0}: Cost Center {1} does not belong to Company {2},Satır {0}: Maliyet Merkezi {1} {2} şirketine ait değil, +Row {0}: Either Delivery Note Item or Packed Item reference is mandatory.,Satır {0}: Ya İrsaliye Kalemi ya da Paketlenmiş Kalem referansı zorunludur., +Row {0}: Expense Head changed to {1} as no Purchase Receipt is created against Item {2}.,Satır {0}: Ürün {2} için Satın Alma İrsaliyesi oluşturulmadığından Gider Başlığı {1} olarak değiştirildi, +Row {0}: Expense Head changed to {1} because account {2} is not linked to warehouse {3} or it is not the default inventory account,"Satır {0}: {2} hesabı {3} deposu ile bağlantılı değil veya varsayılan stok hesabı değil, bu yüzden Gider Hesabı {1} olarak değiştirildi.", +Row {0}: Expense Head changed to {1} because expense is booked against this account in Purchase Receipt {2},Satır {0}: Gider Başlığı {1} olarak değiştirildi çünkü bu hesaba Satın Alma İrsaliyesi {2} kapsamında gider kaydedildi, +Row {0}: From Warehouse is mandatory for internal transfers,Satır {0}: İç transferler için Gönderen Depo zorunludur., +Row {0}: Item Tax template updated as per validity and rate applied,Satır {0}: Ürün Vergi şablonu geçerliliğe ve uygulanan orana göre güncellendi, +Row {0}: Item rate has been updated as per valuation rate since its an internal stock transfer,"Satır {0}: Ürün oranı, dahili bir stok transferi olduğu için değerleme oranına göre güncellenmiştir", +Row {0}: Item {1} must be a stock item.,Satır {0}: {1} öğesi bir Stok Ürünü olmalıdır., +Row {0}: Item {1} must be a subcontracted item.,Satır {0}: Ürün {1} bir alt yüklenici kalemi olmalıdır., +Row {0}: Item {1}'s quantity cannot be higher than the available quantity.,Satır {0}: Öğe {1} miktarı mevcut miktardan daha fazla olamaz., +Row {0}: Packed Qty must be equal to {1} Qty.,Satır {0}: Paketlenen Miktar {1} Miktarına eşit olmalıdır., +Row {0}: Packing Slip is already created for Item {1}.,Satır {0}: {1} Kalemi için Paketleme Fişi zaten oluşturulmuştur., +Row {0}: Payment Term is mandatory,Satır {0}: Ödeme Vadesi zorunludur, +Row {0}: Please provide a valid Delivery Note Item or Packed Item reference.,Satır {0}: Lütfen geçerli bir İrsaliye Kalemi veya Paketlenmiş Ürün referansı sağlayın., +Row {0}: Please select a BOM for Item {1}.,Satır {0}: Lütfen {1} Ürünü için bir Ürün Ağacı seçin., +Row {0}: Please select an active BOM for Item {1}.,Satır {0}: Lütfen {1} Ürünü için bir Aktif Ürün Ağacı seçin., +Row {0}: Please select an valid BOM for Item {1}.,Satır {0}: Lütfen {1} Ürünü için bir Aktif Ürün Ağacı seçin., +Row {0}: Project must be same as the one set in the Timesheet: {1}.,"Satır {0}: Proje, Zaman Çizelgesi'nde ayarlanan proje ile aynı olmalıdır: {1}.", +Row {0}: Purchase Invoice {1} has no stock impact.,Satır {0}: {1} Alış Faturasının stok etkisi yoktur., +Row {0}: Qty cannot be greater than {1} for the Item {2}.,"Satır {0}: Miktar, {2} Kalemi için {1} değerinden büyük olamaz.", +Row {0}: Qty in Stock UOM can not be zero.,Satır {0}: Stoktaki Miktar Ölçü Birimi sıfır olamaz., +Row {0}: Qty must be greater than 0.,Satır {0}: Miktar Sıfırdan büyük olmalıdır., +Row {0}: Quantity cannot be negative.,Satır {0}: Miktar negatif olamaz., +Row {0}: Shift cannot be changed since the depreciation has already been processed,Satır {0}: Amortisman zaten işlenmiş olduğundan vardiya değiştirilemez, +Row {0}: Target Warehouse is mandatory for internal transfers,Satır {0}: İç transferler için Hedef Depo zorunludur., +"Row {0}: To set {1} periodicity, difference between from and to date must be greater than or equal to {2}",Satır {0}: {1} periyodunu ayarlamak için başlangıç ve bitiş tarihleri arasındaki fark {2} değerinden büyük veya eşit olmalıdır., +Row {0}: Total Number of Depreciations cannot be less than or equal to Opening Number of Booked Depreciations,"Satır {0}: Toplam Amortisman Sayısı, Kayıtlı Amortismanların Açılış Sayısından az veya eşit olamaz", +Row {0}: Workstation or Workstation Type is mandatory for an operation {1},Satır {0}: Bir Operasyon için İş İstasyonu veya İş İstasyonu Türü zorunludur {1}, +Row {0}: {1} account already applied for Accounting Dimension {2},Satır {0}: {1} hesabı zaten Muhasebe Boyutu {2} için başvurdu, +Row {0}: {2} Item {1} does not exist in {2} {3},Satır {0}: {2} Öğe {1} {2} {3} içinde mevcut değil, +Rows: {0} have 'Payment Entry' as reference_type. This should not be set manually.,Satırlar: {0} referans_türü olarak 'Ödeme Girişi'ne sahiptir. Bu manuel olarak ayarlanmamalıdır., +Rows: {0} in {1} section are Invalid. Reference Name should point to a valid Payment Entry or Journal Entry.,Satırlar: {0} {1} bölümünde Geçersiz. Referans Adı geçerli bir Ödeme Kaydına veya Yevmiye Kaydına işaret etmelidir., +Run parallel job cards in a workstation,Bir iş istasyonunda aynı anda yürütülecek iş kartı sayısı, +Running,Çalışıyor, +SLA Fulfilled On Status,SLA Gerçekleştirildi Durumu, +SLA will be applied if {1} is set as {2}{3},"{1} , {2}{3} olarak ayarlanırsa SLA uygulanacaktır.", +SLA will be applied on every {0},SLA her {0} adresinde uygulanacaktır., +SMS Settings,SMS Ayarları, +SO Total Qty,Sipariş Toplam Miktar, +Sales Incoming Rate,Satış Gelen Oranı, +Sales Invoice {0} must be deleted before cancelling this Sales Order,Bu Satış Siparişini iptal etmeden önce Satış Faturası {0} iptal edilmeli veya silinmelidir, +Sales Order Packed Item,Satış Siparişi Paketlenmiş Ürün, +"Sales Order {0} already exists against Customer's Purchase Order {1}. To allow multiple Sales Orders, Enable {2} in {3}",Satış Siparişi {0} Müşterinin Satın Alma Siparişi {1} ile zaten mevcut. Birden fazla Satış Siparişine izin vermek için {2} adresini {3} adresinde etkinleştirin, +Sales Partner ,Satış Partneri , +Sales Partner Item,Satış Siparişi Ürünü, +Sales Person {0} is disabled.,Satış Personeli {0} devre dışı bırakıldı., +Salvage Value Percentage,Hurda Değeri Yüzdesi, +Same item and warehouse combination already entered.,Aynı Ürün ve Depo kombinasyonu zaten girilmiş., +Savings,Tasarruflar, +Scan Batch No,Parti Numarasını Tara, +Scan Serial No,Seri Numarasını Tara, +Scan barcode for item {0},Ürün için barkod tarama {0}, +"Scan mode enabled, existing quantity will not be fetched.","Tarama modu etkin, mevcut miktar getirilmeyecek.", +Scanned Quantity,Taranan Miktar, +Scheduled Time Logs,Planlanmış Zaman Kayıtları, +Scheduler is Inactive. Can't trigger job now.,Zamanlayıcı Etkin Değil. İş şu anda tetiklenemiyor., +Scheduler is Inactive. Can't trigger jobs now.,Zamanlayıcı Etkin Değil. Şimdi işler tetiklenemiyor., +Scheduler is inactive. Cannot enqueue job.,Zamanlayıcı etkin değil. İşi sıraya alamaz., +Scheduler is inactive. Cannot merge accounts.,Zamanlayıcı etkin değil. Hesaplar birleştirilemiyor., +Scheduling,Zamanlama, +"Scorecard variables can be used, as well as: +{total_score} (the total score from that period), +{period_number} (the number of periods to present day) +","Puan kartı değişkenleri şu şekilde de kullanılabilir: +{total_score} (o dönemdeki toplam puan), +{period_number} (bugüne kadarki dönem sayısı) +", +Scrap Asset,Varlığı Hurdaya Ayır, +Scrap Cost Per Qty,Miktar Başına Hurda Maliyeti, +"Search by item code, serial number or barcode","Ürün kodu, seri numarası veya barkoda göre arama", +Secondary Party,İkincil Parti, +Secondary Role,İkincil Rol, +Section,Bölüm, +Segregate Serial / Batch Bundle,Seri / Parti Paketini Ayır, +Select Accounting Dimension.,Muhasebe Boyutunu seçin., +Select Alternative Items for Sales Order,Satış Siparişi için Alternatif Ürünleri Seçin, +Select Batch No,Parti No Seçin, +Select Columns and Filters,Sütunları ve Filtreleri Seçin, +Select Corrective Operation,Düzeltici Faaliyet Seçimi, +Select Date of Birth. This will validate Employees age and prevent hiring of under-age staff.,"Doğum Tarihini Seçin. Bu, Çalışanların yaşını doğrulayacak ve reşit olmayan personelin işe alınmasını önleyecektir.", +"Select Date of joining. It will have impact on the first salary calculation, Leave allocation on pro-rata bases.","İşe başlama tarihini seçin. Bu, ilk maaş hesaplaması ve izin tahsisi üzerinde orantılı bir etkiye sahip olacaktır.", +Select Dimension,Boyut Seçin, +Select Finished Good,Bitmiş Ürünü Seçin, +Select Items for Quality Inspection,Kalite Kontrolü için Ürün Seçimi, +Select Serial No,Seri No Seçin, +Select Serial and Batch,Seri ve Parti Seçin, +Select Time,Zaman Seçin, +Select Vouchers to Match,Eşleşecek Kuponları Seçin, +Select Warehouses to get Stock for Materials Planning,Malzeme Planlaması için Stok Alınacak Depoları Seçin, +Select a Company this Employee belongs to.,Bu Personelin ait olduğu bir Şirket seçin., +Select a Customer,Müşteri Seçin, +Select an Item Group.,Bir Ürün Grubu seçin., +Select an invoice to load summary data,Özet verileri yüklemek için bir fatura seçin, +Select an item from each set to be used in the Sales Order.,Satış Siparişinde kullanılmak üzere her setten bir ürün seçin., +Select the Default Workstation where the Operation will be performed. This will be fetched in BOMs and Work Orders.,İşlemin gerçekleştirileceği Varsayılan İş İstasyonunu seçin. Ürün Ağaçları ve İş Emirlerinde geçerli olacaktır., +Select the Item to be manufactured.,Üretilecek Ürünleri Seçin., +"Select the Item to be manufactured. The Item name, UoM, Company, and Currency will be fetched automatically.","Üretilecek Ürünü seçin. Ürün adı, Ölçü Birimi, Şirket ve Para Birimi otomatik olarak alınacaktır.", +Select the Warehouse,Depoyu Seçin, +Select the date and your timezone,Tarihi ve saat diliminizi seçin, +Select the raw materials (Items) required to manufacture the Item,Ürünü üretmek için gerekli ham maddeleri seçin, +"Select whether to get items from a Sales Order or a Material Request. For now select Sales Order. + A Production Plan can also be created manually where you can select the Items to manufacture.","Ürünlerin Satış Siparişinden mi yoksa Malzeme Talebinden mi alınacağını seçin. Şimdilik Satış Siparişi'ni seçin. + Üretilecek Ürünleri seçebileceğiniz bir Üretim Planını kendiniz de oluşturulabilirsiniz.", +Select your weekly off day,Haftalık izin gününüzü seçin, +Selected Vouchers,Seçilmiş Faturalar, +Selected date is,Seçilen Tarih, +Selected document must be in submitted state,Seçilen belgenin gönderilmiş durumda olması gerekir, +Self delivery,Kendi kendine teslimat, +Sell Asset,Varlığı Sat, +Send Attached Files,Ekli Dosyaları Gönder, +Send Document Print,Belgeyi Yazıcıya Gönder, +Send Emails,E-Posta Gönder, +Sending...,Gönderiyor..., +Sequential,Ardışık Sıralı, +Serial / Batch Bundle,Seri ve Parti Paketi, +Serial / Batch Bundle Missing,Seri / Toplu Paket Eksik, +Serial / Batch No,Seri / Parti No, +Serial / Batch Nos,Seri ve Parti Numaraları, +Serial No Ledger,Seri No Kayıtları, +Serial No Range,Seri No Aralığı, +Serial No and Batch Selector cannot be use when Use Serial / Batch Fields is enabled.,Seri / Parti Alanlarını Kullan etkinleştirildiğinde Seri No ve Parti Seçici kullanılamaz., +Serial No and Batch for Finished Good,Bitmiş Ürün İçin Seri No ve Parti No, +Serial No is mandatory,Seri No zorunludur, +Serial No {0} already exists,Seri No {0} zaten mevcut, +Serial No {0} already scanned,Seri No {0} zaten tarandı, +Serial No {0} does not exists,Seri No {0} mevcut değil, +Serial No {0} is already added,Seri No {0} zaten eklendi, +"Serial No {0} is not present in the {1} {2}, hence you can't return it against the {1} {2}","Seri No {0} {1} {2} içinde mevcut değildir, bu nedenle {1} {2} adına iade edemezsiniz", +Serial Nos,Seri Numaraları, +Serial Nos / Batch Nos,Seri / Parti Numaraları, +Serial Nos are created successfully,Seri Numaraları başarıyla oluşturuldu, +"Serial Nos are reserved in Stock Reservation Entries, you need to unreserve them before proceeding.","Seri Numaraları Stok Rezervasyon Girişlerinde rezerve edilmiştir, devam etmeden önce rezervasyonlarını kaldırmanız gerekmektedir.", +Serial and Batch,Seri No ve Parti, +Serial and Batch Bundle created,Seri ve Toplu Paket oluşturuldu, +Serial and Batch Bundle updated,Seri ve Toplu Paket güncellendi, +Serial and Batch Bundle {0} is already used in {1} {2}.,Seri ve Toplu Paket {0} zaten {1} {2} adresinde kullanılmaktadır., +Serial and Batch Details,Seri ve Parti Detayları, +Serial and Batch Entry,Seri ve Parti Girişi, +Serial and Batch No,Seri ve Parti No, +Serial and Batch Nos,Seri ve Parti Numaraları, +Serial and Batch Nos will be auto-reserved based on Pick Serial / Batch Based On,"Seri ve Parti Numaraları, Seri/Parti Seçimine Göre otomatik olarak rezerve edilecektir", +Serial and Batch Reservation,Seri No ve Parti Rezervasyonu, +Serial and Batch Summary,Seri ve Parti Özeti, +Service Cost Per Qty,Adet Başına Hizmet Maliyeti, +Service Expense Total Amount,Hizmet Giderleri Toplam Tutar, +Service Expenses,Hizmet Giderleri, +Service Item,Hizmet Kalemi, +Service Item Qty,Hizmet Kalemi Miktarı, +Service Item Qty / Finished Good Qty,Hizmet Ürünü / Bitmiş Ürün Miktarı, +Service Item UOM,Hizmet Kalemi Ölçü Birimi, +Service Item {0} is disabled.,Hizmet Ürünü {0} devre dışı bırakıldı., +Service Item {0} must be a non-stock item.,Hizmet Kalemi {0} stok olarak işaretlenmemiş bir kalem olmalıdır., +Service Items,Hizmet Kalemleri, +Service Level Agreement for {0} {1} already exists.,{0} {1} için Hizmet Seviyesi Anlaşması zaten mevcut., +Service Provider,Hizmet Sağlayıcı, +Set Default Supplier,Varsayılan Tedarikçi, +Set From Warehouse,Kaynak Depo, +Set Landed Cost Based on Purchase Invoice Rate,Alış Faturası Fiyatına Göre İndirgenmiş Maliyeti Belirle, +Set Loyalty Program,Sadakat Programı Ayarla, +Set Operating Cost / Scrap Items From Sub-assemblies,Alt Montajlardan Üretim Maliyetini / Hurda Ürünlerini Ayarla, +Set Parent Row No in Items Table,Ürünler Tablosunda Üst Satır Numarasını Ayarla, +Set Process Loss Item Quantity,Süreç Kaybı Kalem Miktarını Ayarla, +Set Project Status,Proje Durumunu Ayarla, +Set Quantity,Miktarı Ayarla, +Set Response Time for Priority {0} in row {1}.,{1} satırında {0} Önceliği için Yanıt Süresini ayarlayın., +Set Valuation Rate Based on Source Warehouse,Değerleme Oranını Kaynak Depoya Göre Ayarla, +Set Warehouse,Hedef Depo, +Set default {0} account for non stock items,Stokta olmayan ürünler için varsayılan {0} hesabını ayarlayın, +Set fieldname from which you want to fetch the data from the parent form.,Üst formdan veri almak istediğiniz alanı ayarlayın., +Set quantity of process loss item:,İşlem kaybı kaleminin miktarını ayarlayın:, +Set the Planned Start Date (an Estimated Date at which you want the Production to begin),Planlanan Başlangıç Tarihini belirleyin, +Set the status manually.,Durumu manuel olarak ayarlayın., +Set {0} in asset category {1} for company {2},Şirket {2} için {1} varlık kategorisinde {0} değerini ayarlayın, +Sets 'Accepted Warehouse' in each row of the Items table.,Ürünler tablosunun her satırında Hedef Depoyu ayarlar., +Sets 'Rejected Warehouse' in each row of the Items table.,Ürünler tablosunun her satırında Red Deposunu ayarlar., +Sets 'Reserve Warehouse' in each row of the Supplied Items table.,Ürünler tablosunun her satırında Rezerv Deposunu ayarlar., +Setting Item Locations...,Ürün Konumları Ayarlanıyor..., +Setting {} is required,{} Ayarı Gerekli, +Setup your organization,Kuruluşunuzu Ayarlayın, +Shelf Life in Days,Raf Ömrü, +Shift Factor,Vardiya Faktörü, +Shift Name,Vardiya Adı, +Shipment,Sevkiyat, +Shipment Amount,Nakliye Tutarı, +Shipment Delivery Note,Sevkiyat Teslimat Notu, +Shipment ID,Gönderi Kimliği, +Shipment Information,Sevkiyat Bilgileri, +Shipment Parcel,Sevkiyat Paketi, +Shipment Parcel Template,Sevkiyat Parsel Şablonu, +Shipment Type,Sevkiyat Türü, +Shipment details,Sevkiyat detayları, +Shipping Address Details,Gönderim Adresi Ayrıntıları, +Show Aggregate Value from Subsidiary Companies,Bağlı Şirketlerden Gelen Toplam Değeri Göster, +Show Dimension Wise Stock,Ölçüsel Bazda Stoklar, +Show Disabled Warehouses,Kapalı Depolarını Göster, +Show Failed Logs,Başarısız Kayıtları Göster, +Show GL Balance,Genel Muhasebe Bakiyesini Göster, +Show Item Name,Ürün Adını Göster, +Show Ledger View,Defter Görünümü, +Show Pay Button in Purchase Order Portal,Satın Alma Siparişi Portalında Ödeme Butonunu Göster, +Show Preview,Önizlemeyi Göster, +Show only the Immediate Upcoming Term,Yalnızca Hemen Yaklaşan Dönemi Göster, +Show pending entries,Bekleyen girişleri göster, +Show with upcoming revenue/expense,Yaklaşan gelir/gider ile göster, +"Simple Python Expression, Example: doc.status == 'Open' and doc.issue_type == 'Bug'","Basit Python İfadesi, Örnek: doc.status == 'Open' ve doc.issue_type == 'Bug'", +"Simple Python formula applied on Reading fields.
Numeric eg. 1: reading_1 > 0.2 and reading_1 < 0.5
+Numeric eg. 2: mean > 3.5 (mean of populated fields)
+Value based eg.: reading_value in (""A"", ""B"", ""C"")","Okuma alanlarına uygulanan basit Python formülü.
Sayısal örn. 1: reading_1 > 0.2 ve reading_1 < 0.5
+Sayısal örn. 2: mean > 3.5 (doldurulan alanların ortalaması)
+Değer tabanlı örn.: reading_value in (""A"", ""B"", ""C"")", +Simultaneous,Eşzamanlı, +Skipped,Atlandı, +Skipping Tax Withholding Category {0} as there is no associated account set for Company {1} in it.,Şirket {1} için ayarlanmış ilişkili bir hesap olmadığından Vergi Stopajı Kategorisi {0} atlanıyor., +"Skipping {0} of {1}, {2}","Atlanıyor {0}/{1}, {2}", +Sold by,Tarafından satılan, +Something went wrong please try again,Bir şeyler ters gitti lütfen tekrar deneyin, +Source Exchange Rate,Referans Döviz Kuru, +Source Fieldname,Kaynak Alanı Adı, +Source Warehouse Address Link,Kaynak Depo Adres Bağlantısı, +South Africa VAT Account,Güney Afrika KDV Hesabı, +South Africa VAT Settings,Güney Afrika KDV Ayarları, +Spacer,Boşluk, +Split Asset,Varlığı Böl, +Split From,Bölünmüş, +Split Qty,Bölünmüş Miktar, +Split qty cannot be grater than or equal to asset qty,"Bölünen miktar, varlık miktarından büyük veya eşit olamaz", +Splitting {0} {1} into {2} rows as per Payment Terms,Ödeme Koşullarına göre {0} {1} satırlarını {2} satırlarına bölme, +Stale Days should start from 1.,Eski Günler 1’den başlamalıdır., +Standard Description,Standart Açıklama, +Standard Rated Expenses,Standart Oranlı Giderler, +"Standard Terms and Conditions that can be added to Sales and Purchases. Examples: Validity of the offer, Payment Terms, Safety and Usage, etc.","Satış ve Satın Almalara eklenebilecek Standart Şartlar ve Koşullar. Örnekler: Teklifin geçerliliği, Ödeme Koşulları, Müşteri İstekleri ve Kullanım vb.", +Standard rated supplies in {0},{0}'da standart dereceli tedarikler, +"Standard tax template that can be applied to all Purchase Transactions. This template can contain a list of tax heads and also other expense heads like ""Shipping"", ""Insurance"", ""Handling"", etc.","Tüm Satın Alma İşlemlerine uygulanabilen standart vergi şablonu. Bu şablon, vergi başlıklarının bir listesini ve ayrıca ""Nakliye"", ""Sigorta"", ""Taşıma"" vb. gibi diğer gider başlıklarını içerebilir.", +"Standard tax template that can be applied to all Sales Transactions. This template can contain a list of tax heads and also other expense/income heads like ""Shipping"", ""Insurance"", ""Handling"" etc.","Tüm Satış İşlemlerine uygulanabilen standart vergi şablonu. Bu şablon, vergi başlıklarının bir listesini ve ayrıca ""Nakliye"", ""Sigorta"", ""Taşıma"" vb. gibi diğer gider/gelir başlıklarını içerebilir.", +Start / Resume,Başlat / Durdur, +Start Date should be lower than End Date,Başlangıç Tarihi Bitiş Tarihinden düşük olmalıdır, +Start Deletion,Silme İşlemini Başlat, +Start Import,İçe Aktarmayı Başlat, +Start Job,İşi Başlat, +Start Merge,Birleştirmeyi Başlat, +Start Reposting,Yeniden Göndermeye Başla, +Start Time can't be greater than or equal to End Time for {0}.,{0} için Başlangıç Saati Bitiş Saatinden büyük veya eşit olamaz., +Started a background job to create {1} {0},{1} {0} oluşturmak için bir arka plan işi başlatıldı, +Status Illustration,Durum Görseli, +Status set to rejected as there are one or more rejected readings.,Bir veya daha fazla reddedilen okuma olduğundan durum reddedildi olarak ayarlandı., +Stock Consumed During Repair,Onarım Sırasında Tüketilen Stok, +Stock Consumption Details,Stok Tüketim Detayları, +Stock Entries already created for Work Order {0}: {1},Stok Girişleri İş Emri için zaten oluşturuldu {0}: {1}, +Stock Ledger Invariant Check,Stok Defteri Değişmez Kontrolü, +Stock Ledger Variance,Stok Defteri Varyansı, +Stock Reposting Settings,Stok Yeniden Gönderim Ayarları, +Stock Reservation,Stok Rezervasyonu, +Stock Reservation Entries Cancelled,Stok Rezervasyon Girişleri İptal Edildi, +Stock Reservation Entries Created,Stok Rezervasyon Girişleri Oluşturuldu, +Stock Reservation Entry cannot be updated as it has been delivered.,Stok Rezervasyon Girişi teslim edildiği için güncellenemiyor., +"Stock Reservation Entry created against a Pick List cannot be updated. If you need to make changes, we recommend canceling the existing entry and creating a new one.","Bir Seçim Listesi için oluşturulan Stok Rezervi Girişi güncellenemez. Değişiklik yapmanız gerekiyorsa, mevcut girişi iptal etmenizi ve yeni bir giriş oluşturmanızı öneririz. +", +Stock Reservation Warehouse Mismatch,Rezerv Stok Depo Uyuşmazlığı, +Stock Reservation can only be created against {0}.,Stok Rezervasyonu yalnızca {0} karşılığında oluşturulabilir., +Stock Reserved Qty (in Stock UOM),Stok Rezerv Miktarı (Stok Ölçü Birimi), +Stock UOM Quantity,Stok Birimi Miktarı, +Stock and Manufacturing,Stok ve Üretim, +Stock cannot be reserved in group warehouse {0}.,{0} Grup Deposunda Stok Rezerve edilemez., +Stock cannot be reserved in the group warehouse {0}.,{0} Grup Deposunda Stok Rezerve edilemez., +Stock not available for Item {0} in Warehouse {1}.,{1} Deposunda {0} Ürünü için stok mevcut değil., +Stock quantity not enough for Item Code: {0} under warehouse {1}. Available quantity {2} {3}.,{0} koduna sahip Ürün için {1} Deposundaki stok miktarı yetersiz. Mevcut miktar {2} {3}., +Stock will be reserved on submission of Purchase Receipt created against Material Request for Sales Order.,Satış Siparişi için oluşturulan Malzeme Talebine karşı oluşturulan Satın Alma İrsaliyesi onaylandığında stok rezerve edilecektir., +Stock/Accounts can not be frozen as processing of backdated entries is going on. Please try again later.,Stok/Hesaplar dondurulamaz çünkü geriye dönük girişlerin işlenmesi devam ediyor. Lütfen daha sonra tekrar deneyin., +Sub Assemblies & Raw Materials,Alt Montajlar ve Hammaddeler, +Sub Assembly Item,Alt Montaj Öğesi, +Sub Operation,Alt Operasyon, +Subcontract BOM,Alt Yüklenici Ürün Ağacı, +Subcontract Order,Alt Yüklenici Siparişi, +Subcontract Order Summary,Alt Yüklenici Sipariş Özeti, +Subcontract Return,Alt Yüklenici İadesi, +Subcontracted Quantity,Alt Yükleniciye Gönderilen Miktar, +Subcontracting BOM,Alt Yüklenici Ürün Ağacı, +Subcontracting Order Item,Alt Yüklenici Sipariş Kalemi, +Subcontracting Order Service Item,Alt Yüklenici Sipariş Kalemi, +Subcontracting Order Supplied Item,Alt Yüklenici Siparişi Tedarik Edilen Ürün, +Subcontracting Order {0} created.,Alt Sözleşme Siparişi {0} oluşturuldu., +Subcontracting Purchase Order,Alt Yüklenici Siparişi, +Subcontracting Receipt Item,Alt Yüklenici İrsaliye Kalemi, +Subcontracting Receipt Supplied Item,Alt Yüklenici Tedarik Edilen Ürün İrsaliyesi, +Subdivision,Alt Bölüm, +Submit Action Failed,Gönderim Eylemi Başarısız Oldu, +Submit After Import,İçe Aktardıktan Sonra Gönder, +Submit Generated Invoices,Oluşturulan Faturaları Gönder, +Subscription for Future dates cannot be processed.,İleri tarihler için abonelik işlemi yapılamaz., +Succeeded,Başarılı, +Succeeded Entries,Girişler Başarılı, +"Successfully changed Stock UOM, please redefine conversion factors for new UOM.","Stok Ölçü Birimi başarıyla değiştirildi, lütfen yeni Ölçü Birimi için dönüşüm faktörlerini yeniden tanımlayın.", +Successfully imported {0},{0} başarıyla içe aktarıldı, +"Successfully imported {0} record out of {1}. Click on Export Errored Rows, fix the errors and import again.","Toplam {1} kayıttan {0} tanesi başarıyla içe aktarıldı. Hatalı Satırları Dışa Aktar'a tıklayın, hataları düzeltin ve tekrar içe aktarın.", +Successfully imported {0} record.,{0} kayıt başarıyla içe aktarıldı., +"Successfully imported {0} records out of {1}. Click on Export Errored Rows, fix the errors and import again.","Toplam {1} kayıttan {0} tanesi başarıyla içe aktarıldı. Hatalı Satırları Dışa Aktar'a tıklayın, hataları düzeltin ve tekrar içe aktarın.", +Successfully imported {0} records.,{0} kayıtları başarıyla içe aktarıldı., +Successfully linked to Customer,Müşteriye başarıyla bağlandı, +Successfully linked to Supplier,Tedarikçiye başarıyla bağlandı, +Successfully merged {0} out of {1}.,{0} ile {1} başarılı bir şekilde birleştirildi., +Successfully updated {0},{0} Başarıyla Güncellendi, +"Successfully updated {0} record out of {1}. Click on Export Errored Rows, fix the errors and import again.","{1} kaydından {0} kayıt başarıyla güncellendi. Hatalı Satırları Dışa Aktar'a tıklayın, hataları düzeltin ve tekrar içe aktarın.", +Successfully updated {0} record.,{0} kaydı başarıyla güncellendi., +"Successfully updated {0} records out of {1}. Click on Export Errored Rows, fix the errors and import again.","Toplam {1} kayıttan {0} tanesi başarıyla içe aktarıldı. Hatalı Satırları Dışa Aktar'a tıklayın, hataları düzeltin ve tekrar içe aktarın.", +Successfully updated {0} records.,{0} kayıt başarıyla güncellendi., +Sum of Repair Cost and Value of Consumed Stock Items.,Onarım Maliyeti ve Tüketilen Stokların Değeri Toplamı., +Supplied Item,Tedarik Edilen Ürün, +Supplier Address Details,Adres, +Supplier Group Item,Tedarikçi Grup Öğesi, +Supplier Info,Tedarikçi Bilgileri, +Supplier Item,Tedarikçi Ürünü, +Supplier Portal Users,Tedarikçi Portal Kullanıcıları, +Supplier Warehouse mandatory for sub-contracted {0},Alt Yüklecini firmalar için Tedarikçi Deposu zorunludur {0}, +Supplies subject to the reverse charge provision,Ters tahsilat hükmüne tabi tedarikler, +Sync Now,Şimdi Senkronize Et, +Sync Started,Senkronizasyon Başladı, +System Settings,Sistem Ayarları, +System will not check over billing since amount for Item {0} in {1} is zero,"{1} içinde {0} ürünü için tutar sıfır olduğundan, sistem fazla faturalandırmayı kontrol etmeyecek.", +TCS Amount,Kaynakta Tahsil Edilen Vergi Tutarı, +TCS Rate %,Vergi Oranı %, +TDS Amount,Stopaj Vergisi Tutarı, +TDS Deducted,Kesilen Stopaj Vergisi, +TDS Payable,Ödenecek Stopaj Vergisi, +Target Asset,Hedef Varlık, +Target Asset Location,Varlık Hedef Konumu, +Target Asset {0} cannot be cancelled,Hedef Varlık {0} iptal edilemez, +Target Asset {0} cannot be submitted,Hedef Varlık {0} kaydedilemiyor, +Target Asset {0} cannot be {1},Hedef Varlık {0} için {1} işlemi gerçekleştirilemez, +Target Asset {0} does not belong to company {1},Hedef Varlık {0} {1} şirketine ait değil, +Target Asset {0} needs to be composite asset,Hedef Varlık {0} bileşik varlık olmalıdır, +Target Batch No,Hedef Parti No, +Target Exchange Rate,Hedef Döviz Kuru, +Target Fieldname (Stock Ledger Entry),Hedef Alan Adı (Stok Defteri Girişi), +Target Fixed Asset Account,Hedef Sabit Varlık Hesabı, +Target Has Batch No,Hedef Parti No'ya Sahip, +Target Has Serial No,Hedef Seri No, +Target Incoming Rate,Satış Hedef Oranı, +Target Is Fixed Asset,Hedef Bir Sabit Varlıktır, +Target Item Code,Hedef Ürün Kodu, +Target Item Name,Hedef Ürün Adı, +Target Item {0} must be a Fixed Asset item,Hedef {0} bir Sabit Varlık kalemi olmalıdır, +Target Qty must be a positive number,Hedef Miktar pozitif bir sayı olmalıdır, +Target Serial No,Hedef Seri No, +Target Warehouse Address Link,Hedef Depo Adres Bağlantısı, +Target Warehouse is set for some items but the customer is not an internal customer.,Bazı ürünler için Hedef Depo ayarlanmış ancak Müşteri İç Müşteri değil., +Task Assignee Email,Görev Atanan Kişinin E-postası, +Task {0} depends on Task {1}. Please add Task {1} to the Tasks list.,{0} görevi {1} görevine bağlıdır. Lütfen Görev {1} 'u Görevler listesine ekleyin., +Tax Amount,Vergi Tutarı, +Tax Refunds provided to Tourists under the Tax Refunds for Tourists Scheme,Turistler için Vergi İadesi Programı kapsamında Turistlere sağlanan Vergi İadeleri, +Tax Withheld Vouchers,Tevkifatlı Vergi Makbuzları, +Tax Withholding,Vergi Stopajı, +Tax Withholding Category {} against Company {} for Customer {} should have Cumulative Threshold value.,Vergi Stopajı Kategorisi {0} için Müşteri {2} adına Şirket {1} ile ilişkili olarak Kümülatif Eşik değeri bulunmalıdır., +Tax Withholding Details,Vergi Stopajı Detayları, +Tax Withholding Net Total,Vergi Stopajı Net Toplam, +"Tax detail table fetched from item master as a string and stored in this field. +Used for Taxes and Charges","Vergi ayrıntı tablosu, öğe ana verisinden bir dize olarak alınır ve bu alanda saklanır. +Vergiler ve Ücretler için kullanılır", +Tax will be withheld only for amount exceeding the cumulative threshold,Vergi sadece kümülatif eşiği aşan tutar için kesilecektir, +Taxes row #{0}: {1} cannot be smaller than {2},Vergi Satırı #{0}: {1} değeri {2} değerinden küçük olamaz, +Telephony Call Type,Telefon Çağrı Türü, +Template Item Selected,Şablon Öğesi Seçildi, +Template Options,Şablon Seçenekleri, +Template Task,Şablon Görevi, +Template Warnings,Şablon Uyarıları, +Territory Item,Bölge Öğesi, +The Condition '{0}' is invalid,'{0}' Koşulu geçersizdir, +The Document Type {0} must have a Status field to configure Service Level Agreement,Hizmet Seviyesi Anlaşmasını (SLA) yapılandırmak için {0} Belge Türünün bir Durum alanına sahip olması gerekir., +"The GL Entries and closing balances will be processed in the background, it can take a few minutes.","Genel Muhasebe Girişleri ve kapanış bakiyeleri arka planda işlenecek, bu işlem birkaç dakika sürebilir.", +"The GL Entries will be cancelled in the background, it can take a few minutes.","Genel Muhasebe Girişleri arka planda iptal edilecektir, bu işlem birkaç dakika sürebilir.", +"The Payment Request {0} is already paid, cannot process payment twice","Ödeme Talebi {0} zaten tamamlandı, ödemeyi iki kez işleme koyamazsınız.", +"The Pick List having Stock Reservation Entries cannot be updated. If you need to make changes, we recommend canceling the existing Stock Reservation Entries before updating the Pick List.","Stok Rezervasyon Girişleri olan Seçim Listesi güncellenemez. Değişiklik yapmanız gerekiyorsa, Seçim Listesini güncellemeden önce mevcut Stok Rezervasyon Girişlerini iptal etmenizi öneririz.", +The Process Loss Qty has reset as per job cards Process Loss Qty,"Proses Kaybı Miktarı, iş kartlarındaki Proses Kaybı Miktarına göre sıfırlandı.", +The Serial No at Row #{0}: {1} is not available in warehouse {2}.,"Satır #{0}: {1} Seri Numarası, {2} deposunda mevcut değil.", +The Serial and Batch Bundle {0} is not valid for this transaction. The 'Type of Transaction' should be 'Outward' instead of 'Inward' in Serial and Batch Bundle {0},"Seri ve Parti Paketi {0}, bu işlem için geçerli değil. Seri ve Parti Paketi {0} içinde ‘İşlem Türü’ ‘Giriş’ yerine ‘Çıkış’ olmalıdır.", +The Work Order is mandatory for Disassembly Order,Sökme Emri için İş Emri zorunludur, +The allocated amount is greater than the outstanding amount of Payment Request {0},"Tahsis edilen tutar, Ödeme Talebi {0} kalan tutarından büyük.", +The currency of invoice {} ({}) is different from the currency of this dunning ({}).,Faturanın para birimi {} ({}) bu ihtarnamenin para biriminden ({}) farklıdır., +The default BOM for that item will be fetched by the system. You can also change the BOM.,Bu kalem için varsayılan Ürün Ağacı sistem tarafından getirilecektir. Ürün Ağacını da değiştirebilirsiniz., +The field {0} in row {1} is not set,{1} satırındaki {0} alanı ayarlanmamış, +The following assets have failed to automatically post depreciation entries: {0},Aşağıdaki varlıklar amortisman girişlerini otomatik olarak kaydedemedi: {0}, +The following invalid Pricing Rules are deleted:,Aşağıdaki geçersiz Fiyatlandırma Kuralları silindi:, +The items {0} and {1} are present in the following {2} :,"Ürünler {0} ve {1}, aşağıdaki {2} içinde bulunmaktadır:", +The operation {0} can not add multiple times,{0} işlemi birden fazla eklenemez, +The operation {0} can not be the sub operation,{0} işlemi alt işlem olamaz, +The original invoice should be consolidated before or along with the return invoice.,"Orijinal fatura, iade faturasından önce veya iade faturasıyla birlikte birleştirilmelidir.", +The percentage you are allowed to pick more items in the pick list than the ordered quantity.,Sipariş edilen miktardan daha fazla ürünü toplama listesinden seçmenize izin verilen yüzde., +The reserved stock will be released when you update items. Are you certain you wish to proceed?,"Rezerv stok, öğeleri güncellediğinizde serbest bırakılacaktır. Devam etmek istediğinizden emin misiniz?", +The reserved stock will be released. Are you certain you wish to proceed?,"Rezerv stok, öğeleri güncellediğinizde serbest bırakılacaktır. Devam etmek istediğinizden emin misiniz?", +"The stock has been reserved for the following Items and Warehouses, un-reserve the same to {0} the Stock Reconciliation:

{1}","Stok aşağıdaki Ürünler ve Depolar için rezerve edilmiştir, Stok Sayımı {0} için rezerve edilmeyen hale getirin:

{1}", +"The sync has started in the background, please check the {0} list for new records.","Senkronizasyon arka planda başladı, lütfen yeni kayıtlar için {0} listesini kontrol edin.", +The task has been enqueued as a background job.,Görev arka plan işi olarak kuyruğa alındı., +"The task has been enqueued as a background job. In case there is any issue on processing in background, the system will add a comment about the error on this Stock Reconciliation and revert to the Submitted stage",Görev arka plan işi olarak kuyruğa alındı. Arka planda işlem yapılmasında herhangi bir sorun olması durumunda sistem bu Stok Sayımı hata hakkında yorum ekleyecek ve Gönderildi aşamasına geri dönecektir., +The uploaded file does not match the selected Code List.,Yüklenen dosya seçilen Kod Listesi ile uyuşmuyor., +"The users with this Role are allowed to create/modify a stock transaction, even though the transaction is frozen.","Bu Role sahip kullanıcıların, işlem dondurulmuş olsa bile bir stok işlemi oluşturmasına/değiştirmesine izin verilir.", +The warehouse where you store finished Items before they are shipped.,Ürünler sevk edilmeden önce bitmiş ürünlerin saklandığı depo., +"The warehouse where you store your raw materials. Each required item can have a separate source warehouse. Group warehouse also can be selected as source warehouse. On submission of the Work Order, the raw materials will be reserved in these warehouses for production usage.","Hammaddeleri depoladığınız depo. Gereken her bir ürün için ayrı bir kaynak depo belirlenebilir. Grup deposu da kaynak depo olarak seçilebilir. İş Emri gönderildiğinde, hammadde üretim kullanımı için bu depolarda rezerve edilecektir.", +The warehouse where your Items will be transferred when you begin production. Group Warehouse can also be selected as a Work in Progress warehouse.,Üretim başladığında ürünlerinizin aktarılacağı depo. Grup Deposu aynı zamanda Devam Eden İşler Deposu olarak da seçilebilir., +The {0} {1} is used to calculate the valuation cost for the finished good {2}.,"{0} {1} , bitmiş ürün {2} adına değerleme maliyetini hesaplamak için kullanılır.", +There are ledger entries against this account. Changing {0} to non-{1} in live system will cause incorrect output in 'Accounts {2}' report,Bu hesaba karşı defter kayıtları vardır. Canlı sistemde {0} adresinin {1} olmayan bir adresle değiştirilmesi 'Hesaplar {2}' raporunda yanlış çıktıya neden olacaktır, +There are no Failed transactions,Başarısız işlem yok, +There are no active Fiscal Years for which Demo Data can be generated.,Demo Verilerinin oluşturulabileceği aktif bir Mali Yıl bulunamadı., +There are no slots available on this date,Bu tarihte boş yer bulunmamaktadır, +"There are two options to maintain valuation of stock. FIFO (first in - first out) and Moving Average. To understand this topic in detail please visit Item Valuation, FIFO and Moving Average.","Stok değerlemesini sürdürmek için iki seçenek vardır. FIFO (ilk giren ilk çıkar) ve Hareketli Ortalama. Bu konuyu ayrıntılı olarak anlamak için lütfen Öğe Değerleme, FIFO ve Hareketli Ortalama bölümünü ziyaret edin.", +There aren't any item variants for the selected item,Seçili kalem için herhangi bir varyant yok, +There is already a valid Lower Deduction Certificate {0} for Supplier {1} against category {2} for this time period.,Bu zaman dilimi için Tedarikçi {1} için {2} kategorisine karşı geçerli bir Alt Kesinti Sertifikası {0} zaten mevcut., +There is already an active Subcontracting BOM {0} for the Finished Good {1}.,{1} isimli Bitmiş Ürün için aktif bir Alt Yüklenici {0} Ürün Ağacı bulunmaktadır., +There must be atleast 1 Finished Good in this Stock Entry,Bu Stok Girişinde en az 1 Bitmiş Ürün bulunmalıdır, +There was an error creating Bank Account while linking with Plaid.,Plaid ile bağlantı sırasında Banka Hesabı oluşturulurken bir hata oluştu., +There was an error syncing transactions.,İşlemler senkronize edilirken bir hata oluştu., +There was an error updating Bank Account {} while linking with Plaid.,Plaid ile bağlantı kurulurken Banka Hesabı {} güncellenirken bir hata oluştu., +There was an issue connecting to Plaid's authentication server. Check browser console for more information,Plaid'in kimlik doğrulama sunucusuna bağlanırken bir sorun oluştu. Daha fazla bilgi için tarayıcı konsolunu kontrol edin, +There were issues unlinking payment entry {0}.,Ödeme girişinin bağlantısının kaldırılmasında sorunlar oluştu {0}., +This Account has '0' balance in either Base Currency or Account Currency,"Bu Hesap, Ana Para Birimi veya Hesap Para Biriminde ‘0’ bakiyeye sahiptir", +This PO has been fully subcontracted.,Bu Satın Alma Emri tamamen alt yükleniciye bağlanmıştır., +This field is used to set the 'Customer'.,Bu alan 'Müşteri'yi ayarlamak için kullanılır., +This filter will be applied to Journal Entry.,Bu filtre Muhasebe Defterine uygulanacaktır., +This is a Template BOM and will be used to make the work order for {0} of the item {1},Bu bir Şablon Ürün Ağacıdır ve {0} miktarındaki {1} Ürünü için İş Emri oluşturmak amacıyla kullanılacaktır, +This is considered dangerous from accounting point of view.,Bu durum muhasebe açısından tehlikeli kabul edilmektedir., +"This is enabled by default. If you want to plan materials for sub-assemblies of the Item you're manufacturing leave this enabled. If you plan and manufacture the sub-assemblies separately, you can disable this checkbox.","Bu varsayılan olarak aktiftir. Ürettiğiniz Ürünün alt montajları için malzemeler planlamak istiyorsanız bunu aktif bırakın. Alt montajları ayrı ayrı planlıyor ve üretiyorsanız, bu onay kutusunu devre dışı bırakabilirsiniz.", +"This is for raw material Items that'll be used to create finished goods. If the Item is an additional service like 'washing' that'll be used in the BOM, keep this unchecked.","Bu, bitmiş ürünlerin üretiminde kullanılacak ham madde ürünleri içindir. Eğer ürün, Ürün Ağacında kullanılacak bir ek hizmet (örneğin, ‘boyama’) ise, bu seçeneği işaretli bırakmayın.", +This item filter has already been applied for the {0},Bu ürün filtresi {0} için zaten uygulandı, +This option can be checked to edit the 'Posting Date' and 'Posting Time' fields.,"Bu seçenek, 'Gönderi Tarihi' ve 'Gönderi Saati' alanlarını düzenlemek için işaretlenebilir.", +This schedule was created when Asset {0} was adjusted through Asset Value Adjustment {1}.,"Bu çizelge, Varlık {0} Varlık Değeri Ayarlaması {1} aracılığıyla ayarlandığında oluşturulmuştur.", +This schedule was created when Asset {0} was repaired through Asset Repair {1}.,"Bu plan, Varlık {0} için Varlık Onarımı {1} ile onarıldığı zaman oluşturuldu.", +This schedule was created when Asset {0} was restored.,"Bu program, Varlık {0} geri yüklendiğinde oluşturulmuştur.", +This schedule was created when Asset {0} was returned through Sales Invoice {1}.,"Bu çizelge, Varlık {0} 'ın Satış Faturası {1} aracılığıyla iade edilmesiyle oluşturuldu.", +This schedule was created when Asset {0} was scrapped.,"Bu program, Varlık {0} hurdaya çıkarıldığında oluşturuldu.", +"This table is used to set details about the 'Item', 'Qty', 'Basic Rate', etc.","Bu tablo, 'Ürün', 'Miktar', 'Birim Fiyat' vb. ile ilgili ayrıntıları ayarlamak için kullanılır.", +This {} will be treated as material transfer.,Bu {} hammadde transferi olarak değerlendirilecektir., +Threshold for Suggestion (In Percentage),Öneri Eşiği (Yüzde Olarak), +Time Taken to Deliver,Teslimat için Geçen Süre, +Time in mins,Dakika, +Time slot is not available,Zaman aralığı müsait değil, +To Date is mandatory,Bitiş Tarihi zorunludur, +To Doctype,Doctype'a, +To Due Date,Termin Tarihi, +To Payment Date,Bitiş Ödeme Tarihi, +To Reference Date,Referans Tarihine Kadar, +To add Operations tick the 'With Operations' checkbox.,Operasyonları Yönetmek için 'Operasyonlar' kutusunu işaretleyin., +To add subcontracted Item's raw materials if include exploded items is disabled.,"Alt yüklenici ürünü için ham maddeleri eklemek, “Patlatılmış Ürünleri Dahil Et” seçeneği devre dışı bırakıldığında mümkündür.", +To apply condition on parent field use parent.field_name and to apply condition on child table use doc.field_name. Here field_name could be based on the actual column name of the respective field.,"Üst alana koşul uygulamak için parent.field_name'i kullanın ve alt tabloya koşul uygulamak için doc.field_name'i kullanın. Burada field_name, ilgili alanın gerçek sütun adına dayalı olabilir.", +To be Delivered to Customer,Müşteriye Teslim Edilecek, +To cancel a {} you need to cancel the POS Closing Entry {}.,{} iptal etmek için POS Kapanış Girişini {} iptal etmeniz gerekir., +"To enable Capital Work in Progress Accounting,","Devam Eden Sermaye Çalışması Muhasebesini Etkinleştirmek için,", +To include non-stock items in the material request planning. i.e. Items for which 'Maintain Stock' checkbox is unticked.,Malzeme talebi planlamasına stokta olmayan kalemleri dahil etmek için. yani 'Stoku Koru' onay kutusunun işaretli olmadığı kalemler., +"To include sub-assembly costs and scrap items in Finished Goods on a work order without using a job card, when the 'Use Multi-Level BOM' option is enabled.","Bir İş Emrinde İş Kartı kullanmadan, 'Çok Seviyeli Ürün Ağacı' seçeneği etkinleştirildiğinde, alt montaj maliyetleri ve hurda ürünler iş emrinde bitmiş ürün maliyetine dahil edilir. + +", +To submit the invoice without purchase receipt please set {0} as {1} in {2},Satın alma irsaliyesi olmadan faturayı göndermek için {0} değerini {1} olarak {2} içinde ayarlayın, +"To use a different finance book, please uncheck 'Include Default FB Assets'",Farklı bir finans defteri kullanmak için lütfen 'Varsayılan FD Varlıklarını Dahil Et' seçeneğinin işaretini kaldırın, +Total Allocations,Toplam Tahsisler, +Total Asset Cost,Toplam Varlık Maliyeti, +Total Billing Hours,Toplam Çalışma Saati, +Total Contribution Amount Against Invoices: {0},Faturalar Karşılığı Toplam Katkı Tutarı: {0}, +Total Contribution Amount Against Orders: {0},Siparişlere Karşı Toplam Katkı Tutarı: {0}, +Total Incoming Value (Receipt),Toplam Gelen Değer (Alım), +Total Interest,Toplam Faiz, +Total Issues,Toplam Sorunlar, +Total Items,Toplam Ürünler, +Total Number of Booked Depreciations ,Toplam Amortisman Sayısı , +Total Other Charges,Toplam Diğer Masraflar, +Total Outgoing Value (Consumption),Toplam Çıkan Değer (Tüketim), +Total Picked Quantity {0} is more than ordered qty {1}. You can set the Over Picking Allowance in Stock Settings.,Toplam Toplanan Miktar {0} sipariş edilen {1} miktardan fazladır. Fazla Toplama Ödeneğini Stok Ayarlarında ayarlayabilirsiniz., +Total Purchase Amount,Toplam Satın Alma Tutarı, +Total Purchase Cost has been updated,Toplam Satın Alma Maliyeti güncellendi, +Total Repair Cost,Toplam Onarım Maliyeti, +Total Reposting Count,Toplam Yeniden Gönderim Sayısı, +Total Sales Amount,Toplam Satış Tutarı, +Total Supplied Qty,Toplam Tedarik Edilen Miktar, +Total Time (in Mins),Toplam Süre (Dakika), +Total Value,Toplam Değer, +Total Value Difference (Incoming - Outgoing),Toplam Değer Farkı (Giriş - Çıkış), +Total Views,Toplam Görüntüleme, +Total percentage against cost centers should be 100,Maliyet merkezlerine karşı toplam yüzde 100 olmalıdır, +Tracking Status,Takip Durumu, +Tracking Status Info,İzleme Durum Bilgisi, +Tracking URL,İzleme Bağlantısı, +Transaction Deletion Document: {0} is running for this Company. {1},İşlem Silme Belgesi: {0} bu Şirket için çalışıyor. {1}, +Transaction Deletion Record,İşlem Silme Kaydı, +Transaction Deletion Record Details,İşlem Silme Kaydı Detayları, +Transaction Deletion Record Item,İşlem Silme Kayıt Öğesi, +Transaction Exchange Rate,İşlem Döviz Kuru, +Transaction currency: {0} cannot be different from Bank Account({1}) currency: {2},İşlem para birimi: {0} Banka Hesabı ({1}) para biriminden farklı olamaz: {2}, +Transfer Asset,Varlığı Transfer Et, +Transfer From Warehouses,Transfer Edilecek Depo, +Transferring cannot be done to an Employee. Please enter location where Asset {0} has to be transferred,Bir Personele transfer yapılamaz. Lütfen Varlığın {0} transfer edilmesi gereken yeri girin, +Transit,Taşıma, +Type of Transaction,İşlem Türü, +UAE VAT Account,BAE KDV Hesabı, +UAE VAT Accounts,BAE KDV Hesapları, +UAE VAT Settings,BAE KDV Ayarları, +UOM conversion factor required for UOM: {0} in Item: {1},Ürünü içinde: {1} ölçü birimi için: {0} dönüştürme faktörü gereklidir, +Unable to find the time slot in the next {0} days for the operation {1}. Please increase the 'Capacity Planning For (Days)' in the {2}.,Önümüzdeki {0} gün içinde {1} operasyonu için zaman aralığı bulunamıyor. Lütfen {2} sayfasındaki 'Kapasite Planlama' alanının değerini artırın., +Unable to find variable:,Değişken bulunamadı:, +Unassigned Qty,Atanmamış Miktar, +"Under Working Hours table, you can add start and end times for a Workstation. For example, a Workstation may be active from 9 am to 1 pm, then 2 pm to 5 pm. You can also specify the working hours based on shifts. While scheduling a Work Order, the system will check for the availability of the Workstation based on the working hours specified.","Çalışma Saatleri tablosunda, bir Çalışma İstasyonu için başlangıç ve bitiş saatlerini ekleyebilirsiniz. Örneğin, bir Çalışma İstasyonu sabah 9’dan öğlen 1’e, ardından öğleden sonra 2’den akşam 5’e kadar aktif olabilir. Ayrıca, vardiyalara göre çalışma saatlerini belirtebilirsiniz. Bir İş Emri planlanırken, sistem belirtilen çalışma saatlerine göre Çalışma İstasyonunun uygunluğunu kontrol eder.", +Unlinked,Bağlı Değil, +Unrealized Profit / Loss account for intra-company transfers,Şirket içi transferler için Gerçekleşmemiş Kâr / Zarar Hesabı, +Unrealized Profit/Loss account for intra-company transfers,Şirket içi transferler için Gerçekleşmemiş Kâr / Zarar Hesabı, +Unreconcile Transaction,Uzlaştırılmamış İşlem, +Unreconciled Amount,Mutabık Olunmayan Tutar, +Unreconciled Entries,Mutabık Olunmayan Girişler, +Unreserve,Stok Rezervini Kaldır, +Unreserve Stock,Stok Rezevlerini Kaldır, +Unreserving Stock...,Stok Rezevleri Kaldırılıyor..., +Unset Matched Payment Request,Eşleşen Ödeme Talebini Ayarla, +Up,Yukarı, +Update Billed Amount in Delivery Note,İrsaliyedeki Fatura Tutarını Güncelle, +Update Billed Amount in Purchase Order,Satış Siparişindeki Fatura Tutarını Güncelle, +Update Billed Amount in Purchase Receipt,Satın Alma Emrindeki Fatura Tutarını Güncelle, +Update Existing Records,Mevcut Kayıtları Güncelle, +Update Outstanding for Self,Kendi Açık Bakiyesini Güncelle, +Update Total Purchase Cost,Toplam Satın Almaları Güncelle, +Update stock must be enabled for the purchase invoice {0},Satın Alma faturası için stok güncelleme etkinleştirilmelidir {0}, +Update the modified timestamp on new communications received in Lead & Opportunity.,Yeni iletişimlerde Potansiyel Müşteri ve Fırsat kayıtlarının değiştirilme zaman damgasını güncelle., +Update timestamp on new communication,Yeni İletişimde Zaman Damgasını Güncelle, +Updated via 'Time Log' (In Minutes),'Zaman Kaydı' ile güncellendi. (Dakika), +Updating Work Order status,İş Emri durumu güncelleniyor, +"Updating {0} of {1}, {2}",{0} Güncelleniyor {0}/{1}, +Upload Bank Statement,Banka Hesap Özeti Yükle, +Use 'Repost in background' button to trigger background job. Job can only be triggered when document is in Queued or Failed status.,Arka plan işini başlatmak için 'Arka planda yeniden gönder' düğmesini kullanın. İş yalnızca belge Kuyrukta veya Başarısız durumda olduğunda başlatılabilir., +Use Batch-wise Valuation,Parti Bazında Değerleme Kullan, +Use Company Default Round Off Cost Center,Varsayılan Yuvarlama Maliyet Merkezini Kullan, +Use Company default Cost Center for Round off,Yuvarlamak İçin Varsayılan Maliyet Merkezini Kullan, +Use HTTP Protocol,HTTP Protokolünü Kullan, +Use Item based reposting,Ürün Bazlı Yeniden Kayıt Kullan, +Use Serial / Batch Fields,Seri / Parti Alanları Kullan, +Use Serial No / Batch Fields,Seri No / Parti Alanlarını Kullanın, +User {0}: Removed Employee Self Service role as there is no mapped employee.,Kullanıcı {0}: Eşlenen bir çalışan olmadığı için Çalışan Self Servis rolü kaldırıldı., +User {0}: Removed Employee role as there is no mapped employee.,Kullanıcı {0}: Eşlenen bir çalışan olmadığı için Çalışan rolü kaldırıldı., +Users can enable the checkbox If they want to adjust the incoming rate (set using purchase receipt) based on the purchase invoice rate.,"Kullanıcılar, satın alma faturasındaki fiyatı (satın alma irsaliyesi ile ayarlanan) ayarlamak istiyorlarsa, onay kutusunu etkinleştirebilirler.", +Using negative stock disables FIFO/Moving average valuation when inventory is negative.,"Negatif stok kullanımı, envanter negatif olduğunda FIFO/Hareketli ortalama değerlemesini devre dışı bırakır.", +VAT Accounts,KDV Hesapları, +VAT Amount (AED),KDV Tutarı (AED), +VAT Audit Report,KDV Denetim Raporu, +VAT on Expenses and All Other Inputs,Giderler ve Diğer Tüm Girdi Üzerindeki KDV, +VAT on Sales and All Other Outputs,Satışlarda ve Diğer Tüm Çıktılarda KDV, +Valid From must be after {0} as last GL Entry against the cost center {1} posted on this date,"Geçerli Başlangıç Tarihi, maliyet merkezi {1} için yapılan son Genel Muhasebe Girişi {0} tarihinden sonra olmalıdır", +Validate Components and Quantities Per BOM,Ürün Ağacı Başına Bileşen Miktarlarını Doğrula, +Validate Negative Stock,Negatif Stoku Doğrula, +Validate Pricing Rule,Fiyatlandırma Kuralını Doğrula, +Validate Stock on Save,Stokları Kaydederken Doğrula, +Valuation (I - K),Değerleme (I - K), +Valuation Field Type,Değerleme Alan Türü, +Valuation Rate (In / Out),Değerleme Fiyatı (Giriş / Çıkış), +Valuation rate for customer provided items has been set to zero.,Müşteri tarafından sağlanan ürünler için değerleme oranı sıfır olarak ayarlandı., +Valuation rate for the item as per Sales Invoice (Only for Internal Transfers),Satış Faturasına göre ürün için değerleme oranı (Sadece Dahili Transferler için), +Value (G - D),Değer (G - D), +Value ({0}),Değer ({0}), +Value Based Inspection,Değere Göre Kontrol, +Value Change,Değer Değişimi, +Value Details,Değerler, +Value as on,Değer Tarihi Olarak, +Value of Goods,Malların Değeri, +Value of New Capitalized Asset,Yeni Sermayelendirilmiş Varlığın Maliyeti, +Value of New Purchase,Yeni Satın Alma Değeri, +Value of Scrapped Asset,Hurdaya Çıkarılan Varlığın Değeri, +Value of Sold Asset,Satılan Varlığın Değeri, +Value of goods cannot be 0,Ürünlerin değeri 0 olamaz, +Verification failed please check the link,Doğrulama başarısız oldu lütfen bağlantıyı kontrol edin, +Version,Versiyon, +Via Landed Cost Voucher,Ek Maliyeti Fişi, +View BOM Update Log,Ürün Ağacı Güncelleme Kayıtları, +View Exchange Gain/Loss Journals,Döviz Kazanç/Kayıp Günlüklerini Görüntüle, +View General Ledger,Genel Muhasebeyi Görüntüle, +View Ledgers,Defterleri Görüntüle, +Visits,Ziyaretler, +Voice Call Settings,Sesli Arama Ayarları, +Voucher,Belge, +Voucher Name,Belge Adı, +Voucher No is mandatory,Belge No Zorunludur, +Voucher-wise Balance,Fatura Bazında Bakiye, +"WARNING: Exotel app has been separated from ERPNext, please install the app to continue using Exotel integration.","UYARI: Exotel uygulaması ERPNext'ten ayrıldı, Exotel entegrasyonunu kullanmaya devam etmek için lütfen uygulamayı yükleyin.", +WIP Composite Asset,Devam Eden Bileşik Varlık, +Waiting for payment...,Ödeme bekleniyor..., +Warehouse Capacity for Item '{0}' must be greater than the existing stock level of {1} {2}.,'{0}' Ürünü için Depo Kapasitesi mevcut stok seviyesi olan {1} {2}'den büyük olmalıdır., +Warehouse Details,Depo Detayları, +Warehouse Disabled?,Depo Kapalı, +Warehouse Settings,Depo Ayarları, +Warehouse {0} does not belong to Company {1}.,"{0} Deposu, {1} şirketine ait değil.", +"Warehouse {0} is not linked to any account, please mention the account in the warehouse record or set default inventory account in company {1}.","{0} Deposu herhangi bir hesaba bağlı değil, lütfen depo kaydında hesabı belirtin veya {1} Şirketinde varsayılan stok hesabını ayarlayın.", +Warehouse's Stock Value has already been booked in the following accounts:,Deponun Stok Değeri zaten aşağıdaki hesaplara kaydedilmiş:, +Warning - Row {0}: Billing Hours are more than Actual Hours,Uyarı - Satır {0}: Faturalama Saatleri Gerçek Saatlerden Fazla, +Warning on Negative Stock,Eksi Stokta Uyar, +Warning!,Uyarı!, +Watch Video,Video İzle, +Website Script,Komut Dosyası, +Website Theme,Tema, +Week {0} {1},Hafta {0} {1}, +Weekly Time to send,Haftalık Gönderim Zamanı, +Weight (kg),Ağırlık (kg), +"When creating an Item, entering a value for this field will automatically create an Item Price at the backend.","Bir Ürün oluştururken bu alana bir değer girilmesi, arka planda otomatik olarak bir Ürün Fiyatı oluşturacaktır.", +Width (cm),Genişlik (cm), +Withdrawal,Para Çekme, +Work Order / Subcontract PO,İş Emri, +Workflow Action,İş Akışı Eylemi, +Workflow State,İş Akışı Durumu, +Workstation Dashboard,İş İstasyonu Panosu, +Workstation Status,İş İstasyonu Durumu, +Workstations,İş İstasyonları, +Write Off Limit,Kapatma Limiti, +Wrong Company,Yanlış Şirket, +Wrong Template,Yanlış Şablon, +You are importing data for the code list:,Kod listesi için veri aktarıyorsunuz:, +You are not authorized to make/edit Stock Transactions for Item {0} under warehouse {1} before this time.,"Bu zamandan önce, {1} deposu altında {0} ürünü için Stok İşlemleri yapmaya/yapılanı düzenlemeye yetkiniz yok.", +You are picking more than required quantity for the item {0}. Check if there is any other pick list created for the sales order {1}.,Ürün için gereken miktardan fazlasını topluyorsunuz {0}. Satış siparişi için başka bir toplama listesi oluşturulup oluşturulmadığını kontrol edin {1}., +You can add the original invoice {} manually to proceed.,Devam etmek için asıl faturayı {} manuel olarak ekleyebilirsiniz., +"You can set it as a machine name or operation type. For example, stiching machine 12","Bunu bir makine adı veya işlem türü olarak ayarlayabilirsiniz. Örneğin, kesme makinesi 12", +You can't make any changes to Job Card since Work Order is closed.,İş Emri kapalı olduğundan İş Kartında herhangi bir değişiklik yapamazsınız., +You can't redeem Loyalty Points having more value than the Rounded Total.,Yuvarlatılmış Toplam değerinden daha fazla değere sahip Sadakat Puanlarını kullanamazsınız., +You cannot change the rate if BOM is mentioned against any Item.,Herhangi bir Ürün için Ürün Ağacı belirtilmişse fiyatı değiştiremezsiniz., +You cannot create a {0} within the closed Accounting Period {1},Kapatılan Hesap Dönemi {1} içinde bir {0} oluşturamazsınız, +You cannot create/amend any accounting entries till this date.,Bu tarihe kadar herhangi bir muhasebe kaydı oluşturamaz/değiştiremezsiniz., +You cannot repost item valuation before {},{} tarihinden önce ürün değerlemesini yeniden gönderemezsiniz, +You cannot {0} this document because another Period Closing Entry {1} exists after {2},Bu belgeyi {0} yapamazsınız çünkü {2} tarihinden sonra sonra başka bir Dönem Kapanış Girişi {1} mevcuttur, +You have entered a duplicate Delivery Note on Row,Satırda tekrarlayan bir İrsaliye girdiniz, +You haven't created a {0} yet,Henüz bir {0} oluşturmadınız., +You need to cancel POS Closing Entry {} to be able to cancel this document.,Bu belgeyi iptal edebilmek için POS Kapanış Girişini {} iptal etmeniz gerekmektedir., +Your Name (required),Adınız (gerekli), +Your email has been verified and your appointment has been scheduled,E-postanız doğrulandı ve randevunuz planlandı, +Zero Balance,Sıfır Bakiye, +Zero Rated,Sıfır Değerinde, +Zero quantity,Sıfır Adet, +`Allow Negative rates for Items`,`Ürünler için Negatif değerlere izin ver`, +as Code,Kod olarak, +as Description,Açıklama olarak, +as Title,Başlık olarak, +as a percentage of finished item quantity,bitmiş ürün miktarının yüzdesi olarak, +at,tarihinde, +by {},{} ile, +dated {0},{0} tarihli, +description,Açıklama, +discount applied,indirim uygulandı, +doctype,docType, +fieldname,alan, +is already,zaten, +must be between 0 and 100,0 ile 100 arasında olmalıdır, +out of 5,5 üzerinden, +payments app is not installed. Please install it from {0} or {1},ödeme uygulaması yüklü değil. Lütfen {0} veya {1} adresinden yükleyin, +payments app is not installed. Please install it from {} or {},ödeme uygulaması yüklü değil. Lütfen {} veya {} adresinden yükleyin, +performing either one below:,aşağıdakilerden birini gerçekleştirin:, +product bundle item row's name in sales order. Also indicates that picked item is to be used for a product bundle,"satış siparişindeki ürün paketi öğesi satırının adı. Ayrıca, toplanan öğenin bir ürün paketi için kullanılacağını belirtir", +ratings,değerlendirme, +subscription is already cancelled.,abonelik zaten iptal edildi., +temporary name,geçici isim, +to unallocate the amount of this Return Invoice before cancelling it.,bu İade Faturası tutarını iptal etmeden önce tahsisini kaldırmak için., +variance,sapma, +via BOM Update Tool,Ürün Ağacı Güncelleme Aracı ile, +will be,olacak, +{0} {1} has submitted Assets. Remove Item {2} from table to continue.,{0} {1} Varlıklar gönderdi. Devam etmek için tablodan {2} Kalemini kaldırın., +{0} Account not found against Customer {1}.,{1} Müşterisine ait {0} hesabı bulunamadı., +{0} Account: {1} ({2}) must be in either customer billing currency: {3} or Company default currency: {4},"{0} Hesabı: {1} ({2}), ya müşteri fatura para biriminde ({3}) ya da şirket varsayılan para biriminde ({4}) olmalıdır.", +{0} Budget for Account {1} against {2} {3} is {4}. It {5} exceed by {6},"{0} Hesabı için {2} {3} karşılığı bütçe {1} tutarında. Bu, {4} tarafından {6} {5} aşılabilir.", +{0} Transaction(s) Reconciled,{0} İşlem Uzlaştırıldı, +{0} account is not of type {1},{0} hesabı {1} türünde değil, +{0} account not found while submitting purchase receipt,{0} Satın Alma İrsaliyesi gönderilirken hesap bulunamadı, +{0} and {1},{0} ve {1}, +{0} cannot be used as a Main Cost Center because it has been used as child in Cost Center Allocation {1},{0} Maliyet Merkezi Tahsisinde alt maliyet merkezi olarak kullanıldığından Ana Maliyet Merkezi olarak kullanılamaz {1}, +{0} cannot be zero,{0} sıfır olamaz, +{0} currency must be same as company's default currency. Please select another account.,{0} para birimi şirketin varsayılan para birimi ile aynı olmalıdır. Lütfen başka bir hesap seçin., +{0} entered twice {1} in Item Taxes,{1} Ürün Vergilerinde iki kez {0} olarak girildi, +{0} is a mandatory Accounting Dimension.
Please set a value for {0} in Accounting Dimensions section.,{0} zorunlu bir Muhasebe Boyutudur.
Lütfen Muhasebe Boyutları bölümünde {0} için bir değer ayarlayın., +{0} is added multiple times on rows: {1},{0} satırlara birden çok kez eklendi: {1}, +{0} is already running for {1},{0} zaten {1} için çalışıyor, +{0} is mandatory for account {1},{0} {1} hesabı için zorunludur, +{0} is not running. Cannot trigger events for this Document,{0} çalışmıyor. Bu Belge için olaylar tetiklenemiyor, +{0} qty of Item {1} is being received into Warehouse {2} with capacity {3}.,"{1} ürününden {0} miktarı, {3} kapasiteli {2} deposuna alınmaktadır.", +"{0} units are reserved for Item {1} in Warehouse {2}, please un-reserve the same to {3} the Stock Reconciliation.","{0} birim {1} Ürünü için {2} Deposunda rezerve edilmiştir, lütfen Stok Doğrulamasını {3} yapabilmek için stok rezevini kaldırın.", +{0} units of Item {1} is not available in any of the warehouses.,{1} Ürünü için gerekli olan {0} birim herhangi bir depoda bulunamadı., +{0} will be given as discount.,{0} indirim olarak verilecektir., +{0} {1} Manually,{0} {1} Manuel olarak, +{0} {1} Partially Reconciled,{0} {1} Kısmen Matubakat Sağlandı, +"{0} {1} cannot be updated. If you need to make changes, we recommend canceling the existing entry and creating a new one.","{0} {1} güncellenemez. Değişiklik yapmanız gerekiyorsa, mevcut girişi iptal etmenizi ve yeni bir giriş oluşturmanızı öneririz.", +{0} {1} has already been fully paid.,{0} {1} zaten tamamen ödendi., +{0} {1} has already been partly paid. Please use the 'Get Outstanding Invoice' or the 'Get Outstanding Orders' button to get the latest outstanding amounts.,{0} {1} zaten kısmen ödenmiştir. Ödenmemiş en son tutarları almak için lütfen 'Ödenmemiş Faturayı Al' veya 'Ödenmemiş Siparişleri Al' düğmesini kullanın., +{0} {1} is not in any active Fiscal Year,{0} {1} herhangi bir aktif Mali Yılda değil., +{0} {1} is on hold,{0} {1} beklemede, +{0} {1} not allowed to be reposted. Modify {2} to enable reposting.,{0} {1} yeniden yayınlanmasına izin verilmiyor. Yeniden yayınlamayı etkinleştirmek için {2} öğesini değiştirin., +{0} {1} via CSV File,{0} {1} CSV Dosyası ile, +{0} {1}: Account {2} is a Group Account and group accounts cannot be used in transactions,{0} {1}: Hesap {2} bir Grup Hesabıdır ve grup hesapları işlemlerde kullanılamaz, +{0} {1}: Cost Center is required for 'Profit and Loss' account {2}.,{0} {1}: 'Kâr ve Zarar' {2} hesabı için Maliyet Merkezi gereklidir., +{0} {1}: Cost Center {2} is a group cost center and group cost centers cannot be used in transactions,{0} {1}: Maliyet Merkezi {2} bir grup maliyet merkezidir ve grup maliyet merkezleri işlemlerde kullanılamaz, +{0}% of total invoice value will be given as discount.,Toplam fatura bedelinin %{0} oranında indirim yapılacaktır., +{0}'s {1} cannot be after {2}'s Expected End Date.,{0} için {1} alanı {2} için Beklenen Bitiş Tarihinden sonra olamaz., +{item_name}'s Sample Size ({sample_size}) cannot be greater than the Accepted Quantity ({accepted_quantity}),{item_name} için Numune Boyutu ({sample_size}) Kabul Edilen Miktardan ({accepted_quantity}) büyük olamaz, +{} is a child company.,{} bir alt şirkettir., +{} {} is already linked with another {},{} {} zaten başka bir {} ile bağlantılı, +{} {} is already linked with {} {},{} {} zaten {} {} ile bağlantılı, diff --git a/erpnext/translations/zh-TW.csv b/erpnext/translations/zh-TW.csv index 699d802206e..8bfb2985728 100644 --- a/erpnext/translations/zh-TW.csv +++ b/erpnext/translations/zh-TW.csv @@ -5972,3 +5972,1867 @@ Payment Gateway,支付網關 Address and Contacts,地址和聯絡方式 Plan Name,計劃名稱 Reject,拒絕 +"""Is Fixed Asset"" cannot be unchecked, as Asset record exists against the item",“是固定的資產”不能選中,作為資產記錄存在對項目, +'Based On' and 'Group By' can not be same,“根據”和“分組依據”不能相同, +'Days Since Last Order' must be greater than or equal to zero,“自從最後訂購日”必須大於或等於零, +'Entries' cannot be empty,“分錄”不能是空的, +'From Date' must be after 'To Date',“起始日期”必須經過'終止日期', +'Has Serial No' can not be 'Yes' for non-stock item,非庫存項目不能有序號, +'Opening',“開放”, +'To Date' is required,“至日期”是必需填寫的, +'Update Stock' can not be checked because items are not delivered via {0},不能勾選`更新庫存',因為項目未交付{0}, +'Update Stock' cannot be checked for fixed asset sale,"""更新庫存"" 無法檢查固定資產銷售", +A Customer Group exists with same name please change the Customer name or rename the Customer Group,客戶群組存在相同名稱,請更改客戶名稱或重新命名客戶群組, +Abbreviation already used for another company,另一家公司已使用此縮寫, +Abbreviation is mandatory,縮寫是強制性的, +Academics User,學術界用戶, +Accepted Quantity,允收數量, +Account,帳戶, +Account Balance,帳戶餘額, +Account Number,帳號, +Account Number {0} already used in account {1},已在科目{1}中使用的帳號{0}, +Account Pay Only,科目只需支付, +Account Type,科目類型, +"Account balance already in Credit, you are not allowed to set 'Balance Must Be' as 'Debit'",科目餘額已歸為貸方,不允許設為借方, +"Account balance already in Debit, you are not allowed to set 'Balance Must Be' as 'Credit'",科目餘額已歸為借方科目,不允許設為貸方, +Account with child nodes cannot be converted to ledger,有子節點的帳不能轉換到總帳, +Account with child nodes cannot be set as ledger,科目與子節點不能被設置為分類帳, +Account with existing transaction can not be converted to group.,科目與現有的交易不能被轉換到群組。, +Account with existing transaction can not be deleted,科目與現有的交易不能被刪除, +Account with existing transaction cannot be converted to ledger,帳戶與現有的交易不能被轉換為總賬, +Account {0} does not belong to company: {1},科目{0}不屬於公司:{1}, +Account {0} does not belongs to company {1},科目{0}不屬於公司{1}, +Account {0} does not exist,科目{0}不存在, +Account {0} does not exists,科目{0}不存在, +Account {0} does not match with Company {1} in Mode of Account: {2},帳戶{0}與帳戶模式{2}中的公司{1}不符, +Account {0} has been entered multiple times,帳戶{0}已多次輸入, +Account {0} is frozen,帳戶{0}被凍結, +Account {0} is invalid. Account Currency must be {1},科目{0}是無效的。科目貨幣必須是{1}, +Account {0}: Parent account {1} can not be a ledger,科目{0}:上層科目{1}不能是總帳, +Account {0}: Parent account {1} does not belong to company: {2},科目{0}:上層科目{1}不屬於公司:{2}, +Account {0}: Parent account {1} does not exist,科目{0}:上層科目{1}不存在, +Account {0}: You can not assign itself as parent account,科目{0}:你不能指定自己為上層科目, +Account: {0} can only be updated via Stock Transactions,帳號:{0}只能通過庫存的交易進行更新, +Account: {0} with currency: {1} can not be selected,帳號:{0}幣種:{1}不能選擇, +Accounting,會計, +Accounting Entry for Asset,資產會計分錄, +Accounting Entry for Stock,存貨的會計分錄, +Accounting Entry for {0}: {1} can only be made in currency: {2},會計分錄為{0}:{1}只能在貨幣做:{2}, +Accounting Ledger,會計總帳, +Accounting Period,會計期間, +Accounts,會計, +Accounts Payable,應付帳款, +Accounts Payable Summary,應付帳款摘要, +Accounts Receivable,應收帳款, +Accounts Receivable Summary,應收帳款匯總, +Accounts Settings,會計設定, +Accounts table cannot be blank.,賬表不能為空。, +Accumulated Depreciation,累計折舊, +Accumulated Depreciation Amount,累計折舊額, +Accumulated Depreciation as on,作為累計折舊, +Accumulated Monthly,每月累計, +Accumulated Values,累積值, +Accumulated Values in Group Company,集團公司累計價值, +Activity Cost,項目成本, +Activity Cost exists for Employee {0} against Activity Type - {1},存在活動費用為員工{0}對活動類型 - {1}, +Activity Cost per Employee,每個員工活動費用, +Activity Type,活動類型, +Actual,實際, +Actual End Date,實際結束日期, +Actual Qty,實際數量, +Actual Qty is mandatory,實際數量是強制性, +Actual Quantity,實際數量, +Actual Start Date,實際開始日期, +Actual qty in stock,實際庫存數量, +Actual type tax cannot be included in Item rate in row {0},實際類型稅不能被包含在商品率排{0}, +Add / Edit Prices,新增 / 編輯價格, +Add Customers,添加客戶, +Add Employees,添加員工, +Add Item,新增項目, +Add Items,添加項目, +Add Leads,添加潛在客戶, +Add Multiple Tasks,添加多個任務, +Add Sales Partners,添加銷售合作夥伴, +Add Suppliers,添加供應商, +Add Timesheets,添加時間表, +Add the rest of your organization as your users. You can also add invite Customers to your portal by adding them from Contacts,添加您的組織的其餘部分用戶。您還可以添加邀請客戶到您的門戶網站通過從聯繫人中添加它們, +Administrative Expenses,行政開支, +Advance Amount,提前量, +Advance Payments,預付款, +Advance amount cannot be greater than {0} {1},提前量不能大於{0} {1}, +Against Account,針對帳戶, +Against Journal Entry {0} does not have any unmatched {1} entry,對日記條目{0}沒有任何無與倫比{1}進入, +Against Journal Entry {0} is already adjusted against some other voucher,對日記條目{0}已經調整一些其他的優惠券, +Against Voucher,對傳票, +Against Voucher Type,對憑證類型, +Age,年齡, +Age (Days),時間(天), +Ageing Based On,老齡化基於, +Agriculture Manager,農業經理, +Agriculture User,農業用戶, +All Accounts,所有科目, +All BOMs,所有的材料明細表, +All Customer Groups,所有客戶群組, +All Departments,所有部門, +All Item Groups,所有項目群組, +All Supplier Groups,所有供應商組織, +All Territories,所有的領土, +All Warehouses,所有倉庫, +All communications including and above this shall be moved into the new Issue,包括及以上的所有通信均應移至新發行中, +All items have already been transferred for this Work Order.,所有項目已經為此工作單轉移。, +Allocate Payment Amount,分配付款金額, +Allow Multiple Material Consumption,允許多種材料消耗, +Allowed To Transact With,允許與, +Already record exists for the item {0},已有記錄存在項目{0}, +"Already set default in pos profile {0} for user {1}, kindly disabled default",已經在用戶{1}的pos配置文件{0}中設置了默認值,請禁用默認值, +Alternate Item,替代項目, +Alternative item must not be same as item code,替代項目不能與項目代碼相同, +Amount {0} {1} against {2} {3},量{0} {1}對{2} {3}, +Amount {0} {1} deducted against {2},金額{0} {1}抵扣{2}, +Amount {0} {1} transferred from {2} to {3},金額{0} {1}從轉移{2}到{3}, +Amount {0} {1} {2} {3},金額{0} {1} {2} {3}, +An error occurred during the update process,更新過程中發生錯誤, +Another Budget record '{0}' already exists against {1} '{2}' and account '{3}' for fiscal year {4},對於財務年度{4},{1}'{2}'和科目“{3}”已存在另一個預算記錄“{0}”, +Application of Funds (Assets),基金中的應用(資產), +Appointment,約定, +Appointment Confirmation,預約確認, +Approving Role cannot be same as role the rule is Applicable To,審批角色作為角色的規則適用於不能相同, +Approving User cannot be same as user the rule is Applicable To,批准用戶作為用戶的規則適用於不能相同, +As on Date,隨著對日, +Asset,財富, +Asset Category,資產類別, +Asset Category Account,資產類別的科目, +Asset Category is mandatory for Fixed Asset item,資產類別是強制性的固定資產項目, +Asset Depreciation Ledger,資產減值總帳, +Asset Depreciations and Balances,資產折舊和平衡, +Asset Finance Book,資產融資書, +Asset Maintenance,資產維護, +Asset Maintenance Log,資產維護日誌, +Asset Maintenance Task,資產維護任務, +Asset Maintenance Team,資產維護團隊, +Asset Movement,資產運動, +Asset Movement record {0} created,資產運動記錄{0}創建, +Asset Name,資產名稱, +Asset Received But Not Billed,已收到但未收費的資產, +Asset Repair,資產修復, +Asset Value Adjustment,資產價值調整, +"Asset cannot be cancelled, as it is already {0}",資產不能被取消,因為它已經是{0}, +Asset scrapped via Journal Entry {0},通過資產日記帳分錄報廢{0}, +"Asset {0} cannot be scrapped, as it is already {1}",資產{0}不能被廢棄,因為它已經是{1}, +Asset {0} does not belong to company {1},資產{0}不屬於公司{1}, +Asset {0} must be submitted,資產{0}必須提交, +Assets,資產, +At least one mode of payment is required for POS invoice.,付款中的至少一個模式需要POS發票。, +Atleast one item should be entered with negative quantity in return document,ATLEAST一個項目應該負數量回報文檔中輸入, +Atleast one of the Selling or Buying must be selected,至少需選擇銷售或購買, +Atleast one warehouse is mandatory,至少要有一間倉庫, +Attribute table is mandatory,屬性表是強制性的, +Attribute {0} selected multiple times in Attributes Table,屬性{0}多次選擇在屬性表, +Attributes,屬性, +Auditor,核數師, +Authorization Control,授權控制, +Authorization Rule,授權規則, +Authorized Signatory,授權簽字人, +Auto Material Requests Generated,汽車材料的要求生成, +Auto repeat document updated,自動重複文件更新, +Available Qty,可用數量, +Available Stock for Packing Items,可用庫存包裝項目, +Available-for-use Date should be after purchase date,可供使用的日期應在購買日期之後, +Average Age,平均年齡, +Avg Daily Outgoing,平均每日傳出, +Avg. Buying Price List Rate,平均。買價格表價格, +Avg. Selling Price List Rate,平均。出售價目表率, +Avg. Selling Rate,平均。賣出價, +BOM Explosion Item,BOM展開項目, +BOM Item,BOM項目, +BOM No,BOM No., +BOM Operation,BOM的操作, +BOM Rate,BOM率, +BOM Scrap Item,BOM項目廢料, +BOM Search,BOM搜索, +BOM Stock Calculated,BOM庫存計算, +BOM Stock Report,BOM庫存報告, +BOM Update Tool,BOM更新工具, +BOM Variance Report,BOM差異報告, +BOM Website Item,BOM網站項目, +BOM Website Operation,BOM網站運營, +BOM and Manufacturing Quantity are required,BOM和生產量是必需的, +BOM does not contain any stock item,BOM不包含任何庫存項目, +BOM {0} does not belong to Item {1},BOM {0}不屬於項目{1}, +BOM {0} must be active,BOM {0}必須是積極的, +BOM {0} must be submitted,BOM {0}必須提交, +Balance,餘額, +Balance (Dr - Cr),平衡(Dr - Cr), +Balance ({0}),餘額({0}), +Balance Qty,餘額數量, +Balance Sheet,資產負債表, +Balance Value,餘額, +Balance for Account {0} must always be {1},科目{0}的餘額必須始終為{1}, +Bank,銀行, +Bank Account,銀行帳戶, +Bank Accounts,銀行帳戶, +Bank Clearance Summary,銀行結算摘要, +Bank Draft,銀行匯票, +Bank Guarantee,銀行擔保, +Bank Overdraft Account,銀行透支戶口, +Bank Reconciliation Statement,銀行對帳表, +Bank Statement balance as per General Ledger,銀行對賬單餘額按總帳, +Bank account cannot be named as {0},銀行科目不能命名為{0}, +Banking,銀行業, +Barcode {0} already used in Item {1},條碼{0}已經用在項目{1}, +Barcode {0} is not a valid {1} code,條形碼{0}不是有效的{1}代碼, +Batch,批量, +Batch ID is mandatory,批號是必需的, +Batch Item Expiry Status,批處理項到期狀態, +Batch No,批號, +Batch {0} of Item {1} has expired.,一批項目的{0} {1}已過期。, +Batch {0} of Item {1} is disabled.,項目{1}的批處理{0}已禁用。, +Batch-Wise Balance History,間歇式平衡歷史, +Bill Date,帳單日期, +Bill No,帳單號碼, +Bill of Materials,材料清單, +Billed,計費, +Billed Amount,帳單金額, +Billing Amount,開票金額, +Billing Hours,結算時間, +Billing Status,計費狀態, +Billing currency must be equal to either default company's currency or party account currency,帳單貨幣必須等於默認公司的貨幣或科目幣種, +Bin,箱子, +Blanket Order,總訂單, +Blanket Order Item,一攬子訂單項目, +Block Invoice,阻止發票, +Booked,預訂, +Both Trial Period Start Date and Trial Period End Date must be set,必須設置試用期開始日期和試用期結束日期, +Branch,分支機構, +Budget,預算, +Budget Account,預算科目, +Budget Against,反對財政預算案, +Budget List,預算清單, +Budget Variance Report,預算差異報告, +Budget cannot be assigned against Group Account {0},不能指定預算給群組帳目{0}, +"Budget cannot be assigned against {0}, as it's not an Income or Expense account",財政預算案不能對{0}指定的,因為它不是一個收入或支出科目, +Buy,購買, +Buying,採購, +Buying Amount,購買金額, +Buying Price List,買價格表, +Buying Rate,購買率, +Buying Settings,採購設定, +"Buying must be checked, if Applicable For is selected as {0}",採購必須進行檢查,如果適用於被選擇為{0}, +CWIP Account,CWIP科目, +Calculated Bank Statement balance,計算的銀行對賬單餘額, +Campaign,競賽, +Campaign Efficiency,運動效率, +Can be approved by {0},可以通過{0}的批准, +"Can not filter based on Voucher No, if grouped by Voucher",是凍結的帳戶。要禁止該帳戶創建/編輯事務,你需要有指定的身份, +Can only make payment against unbilled {0},只能使支付對未付款的{0}, +Can refer row only if the charge type is 'On Previous Row Amount' or 'Previous Row Total',可以參考的行只有在充電類型是“在上一行量'或'前行總計”, +Cancel Material Visit {0} before cancelling this Warranty Claim,材質訪問{0}之前取消此保修索賠取消, +Cancel Material Visits {0} before cancelling this Maintenance Visit,取消取消此保養訪問之前,材質訪問{0}, +Cancel Subscription,取消訂閱, +Cannot be a fixed asset item as Stock Ledger is created.,不能成為庫存分類賬創建的固定資產項目。, +Cannot cancel because submitted Stock Entry {0} exists,不能取消,因為提交庫存輸入{0}存在, +Cannot cancel transaction for Completed Work Order.,無法取消已完成工單的交易。, +Cannot change Attributes after stock transaction. Make a new Item and transfer stock to the new Item,庫存交易後不能更改屬性。創建一個新項目並將庫存轉移到新項目, +Cannot change Fiscal Year Start Date and Fiscal Year End Date once the Fiscal Year is saved.,不能更改財政年度開始日期和財政年度結束日期,一旦會計年度被保存。, +Cannot change Service Stop Date for item in row {0},無法更改行{0}中項目的服務停止日期, +Cannot change Variant properties after stock transaction. You will have to make a new Item to do this.,庫存交易後不能更改Variant屬性。你將不得不做一個新的項目來做到這一點。, +"Cannot change company's default currency, because there are existing transactions. Transactions must be cancelled to change the default currency.",不能改變公司的預設貨幣,因為有存在的交易。交易必須取消更改預設貨幣。, +Cannot convert Cost Center to ledger as it has child nodes,不能成本中心轉換為總賬,因為它有子節點, +Cannot covert to Group because Account Type is selected.,不能轉換到群組科目,因為科目類型選擇的。, +Cannot deactivate or cancel BOM as it is linked with other BOMs,無法關閉或取消BOM,因為它是與其他材料明細表鏈接, +"Cannot declare as lost, because Quotation has been made.",不能聲明為丟失,因為報價已經取得進展。, +Cannot deduct when category is for 'Valuation' or 'Valuation and Total',不能抵扣當類別為“估值”或“估值及總', +"Cannot delete Serial No {0}, as it is used in stock transactions",無法刪除序列號{0},因為它採用的是現貨交易, +Cannot produce more Item {0} than Sales Order quantity {1},無法產生更多的項目{0}不是銷售訂單數量{1}, +Cannot refer row number greater than or equal to current row number for this Charge type,不能引用的行號大於或等於當前行號碼提供給充電式, +Cannot select charge type as 'On Previous Row Amount' or 'On Previous Row Total' for first row,不能選擇充電式為'在上一行量'或'在上一行總'的第一行, +Cannot set as Lost as Sales Order is made.,不能設置為失落的銷售訂單而成。, +Cannot set authorization on basis of Discount for {0},不能在折扣的基礎上設置授權{0}, +Cannot set multiple Item Defaults for a company.,無法為公司設置多個項目默認值。, +Capital Equipments,資本設備, +Capital Work in Progress,資本工作正在進行中, +Cash,現金, +Cash Flow,現金周轉, +Cash Flow Statement,現金流量表, +Cash Flow from Financing,從融資現金流, +Cash Flow from Investing,從投資現金流, +Cash Flow from Operations,運營現金流, +Cash In Hand,手頭現金, +Cash or Bank Account is mandatory for making payment entry,製作付款分錄時,現金或銀行科目是強制性輸入的欄位。, +Cashier,出納員, +Cashier Closing,收銀員關閉, +Cashier Closing Payments,收銀員結算付款, +Change Release Date,更改發布日期, +Changing Customer Group for the selected Customer is not allowed.,不允許更改所選客戶的客戶組。, +Chart,圖表, +Chart of Cost Centers,成本中心的圖, +Cheque/Reference Date,支票/參考日期, +Cheque/Reference No,支票/參考編號, +Cheques Required,需要檢查, +Cheques and Deposits incorrectly cleared,支票及存款不正確清除, +Child Task exists for this Task. You can not delete this Task.,子任務存在這個任務。你不能刪除這個任務。, +Child nodes can be only created under 'Group' type nodes,子節點可以在'集團'類型的節點上創建, +Child warehouse exists for this warehouse. You can not delete this warehouse.,兒童倉庫存在這個倉庫。您不能刪除這個倉庫。, +Circular Reference Error,循環引用錯誤, +Clearance Date,清拆日期, +Clearance Date not mentioned,清拆日期未提及, +Clearance Date updated,間隙更新日期, +Closed Document,關閉文件, +Closed order cannot be cancelled. Unclose to cancel.,關閉的定單不能被取消。 Unclose取消。, +Closing (Cr),關閉(Cr), +Closing (Dr),關閉(Dr), +Closing (Opening + Total),閉幕(開幕+總計), +Closing Account {0} must be of type Liability / Equity,關閉科目{0}的類型必須是負債/權益, +Collapse All,全部收縮, +Colour,顏色, +Commercial,商業, +Commission on Sales,銷售佣金, +Company Abbreviation,公司縮寫, +Company Abbreviation cannot have more than 5 characters,公司縮寫不能超過5個字符, +Company Name,公司名稱, +Company Name cannot be Company,公司名稱不能為公司, +Company currencies of both the companies should match for Inter Company Transactions.,兩家公司的公司貨幣應該符合Inter公司交易。, +Company is manadatory for company account,公司是公司科目的管理者, +Company name not same,公司名稱不一樣, +Completed Work Orders,完成的工作訂單, +Consolidated Financial Statement,合併財務報表, +Consumed,消費, +Consumed Qty,消耗的數量, +Contract Fulfilment Checklist,合同履行清單, +Contract Template Fulfilment Terms,合同模板履行條款, +Contribution Amount,貢獻金額, +Conversion Factor,轉換因子, +Conversion Rate,兌換率, +Conversion factor for default Unit of Measure must be 1 in row {0},預設計量單位的轉換因子必須是1在行{0}, +Convert to Group,轉換為集團, +Convert to Group,轉換為集團,Warehouse +Converted,轉換, +Cost Center Number,成本中心編號, +Cost Center is required in row {0} in Taxes table for type {1},成本中心是必需的行{0}稅表型{1}, +Cost Center with existing transactions can not be converted to group,與現有的交易成本中心,不能轉化為組, +Cost Center with existing transactions can not be converted to ledger,與現有的交易成本中心,不能轉換為總賬, +Cost of Delivered Items,交付項目成本, +Cost of Goods Sold,銷貨成本, +Cost of Issued Items,發布項目成本, +Cost of Purchased Items,購買的物品成本, +Cost of various activities,各種活動的費用, +"Could not create Credit Note automatically, please uncheck 'Issue Credit Note' and submit again",無法自動創建Credit Note,請取消選中'Issue Credit Note'並再次提交, +Could not find path for ,找不到路徑, +Could not retrieve information for {0}.,無法檢索{0}的信息。, +Could not solve criteria score function for {0}. Make sure the formula is valid.,無法解決{0}的標準分數函數。確保公式有效。, +Could not solve weighted score function. Make sure the formula is valid.,無法解決加權分數函數。確保公式有效。, +"Could not update stock, invoice contains drop shipping item.",無法更新庫存,發票包含下降航運項目。, +Cr,鉻, +Create Employee Records,建立員工檔案, +Create Leads,建立潛在客戶, +Create Print Format,創建打印格式, +Create Purchase Order,創建採購訂單, +Create Purchase Orders,創建採購訂單, +Create Sales Order,創建銷售訂單, +Create User,創建用戶, +Create Users,創建用戶, +Create Variant,創建變體, +Create customer quotes,創建客戶報價, +Credit,信用, +Credit Account,信用科目, +Credit Balance,貸方餘額, +Credit Limit,信用額度, +Credit Note,信用票據, +Credit Note Amount,信用額度, +Credit Note Issued,信用票據發行, +Credit Note {0} has been created automatically,信用票據{0}已自動創建, +Credit limit has been crossed for customer {0} ({1}/{2}),客戶{0}({1} / {2})的信用額度已超過, +Creditors,債權人, +Currency Exchange,外幣兌換, +Currency Exchange Settings,貨幣兌換設置, +Currency Exchange must be applicable for Buying or for Selling.,貨幣兌換必須適用於買入或賣出。, +Currency can not be changed after making entries using some other currency,貨幣不能使用其他貨幣進行輸入後更改, +Currency for {0} must be {1},貨幣{0}必須{1}, +Currency of the Closing Account must be {0},關閉科目的貨幣必須是{0}, +Currency of the price list {0} must be {1} or {2},價目表{0}的貨幣必須是{1}或{2}, +Currency should be same as Price List Currency: {0},貨幣應與價目表貨幣相同:{0}, +Current Assets,流動資產, +Current BOM and New BOM can not be same,當前BOM和新BOM不能相同, +Current Liabilities,流動負債, +Current Qty,目前數量, +Current Stock,當前庫存, +Customer,客戶, +Customer Acquisition and Loyalty,客戶取得和忠誠度, +Customer Addresses And Contacts,客戶的地址和聯絡方式, +Customer Contact,客戶聯絡, +Customer Credit Balance,客戶信用平衡, +Customer Group,客戶群組, +Customer LPO No.,客戶LPO號, +Customer Name,客戶名稱, +Customer Service,顧客服務, +Customer is required,客戶是必需的, +Customer isn't enrolled in any Loyalty Program,客戶未加入任何忠誠度計劃, +Customer required for 'Customerwise Discount',需要' Customerwise折扣“客戶, +Customer {0} does not belong to project {1},客戶{0}不屬於項目{1}, +Customers Without Any Sales Transactions,沒有任何銷售交易的客戶, +Customs Tariff Number,海關稅則號, +Daily Timesheet Summary,每日時間表摘要, +Date of Birth cannot be greater than today.,出生日期不能大於今天。, +Date of Commencement should be greater than Date of Incorporation,開始日期應大於公司註冊日期, +Days Since Last Order,天自上次訂購, +Debit ({0}),借記卡({0}), +Debit Note,繳費單, +Debit Note Amount,借方票據金額, +Debit To is required,借方是必填項, +Debit and Credit not equal for {0} #{1}. Difference is {2}.,借貸{0}#不等於{1}。區別是{2}。, +Debtors,債務人, +Default Activity Cost exists for Activity Type - {0},默認情況下存在作業成本的活動類型 - {0}, +Default BOM ({0}) must be active for this item or its template,預設BOM({0})必須是活動的這個項目或者其模板, +Default BOM for {0} not found,默認BOM {0}未找到, +Default Unit of Measure for Item {0} cannot be changed directly because you have already made some transaction(s) with another UOM. You will need to create a new Item to use a different Default UOM.,測度項目的默認單位{0}不能直接改變,因為你已經做了一些交易(S)與其他計量單位。您將需要創建一個新的項目,以使用不同的默認計量單位。, +Default Unit of Measure for Variant '{0}' must be same as in Template '{1}',測度變異的默認單位“{0}”必須是相同模板“{1}”, +Define Project type.,定義項目類型。, +Delay in payment (Days),延遲支付(天), +Delete all the Transactions for this Company,刪除所有交易本公司, +Deletion is not permitted for country {0},國家{0}不允許刪除, +Delivered,交付, +Delivered Amount,交付金額, +Delivered Items To Be Billed,交付項目要被收取, +Delivered Qty,交付數量, +Delivered: {0},交貨:{0}, +Delivery,交貨, +Delivery Date,交貨日期, +Delivery Note,送貨單, +Delivery Note Item,送貨單項目, +Delivery Note Trends,送貨單趨勢, +Delivery Note {0} is not submitted,送貨單{0}未提交, +Delivery Notes {0} updated,已更新交貨單{0}, +Delivery Settings,交貨設置, +Delivery Stop,交貨停止, +Delivery Trip,送貨之旅, +Delivery warehouse required for stock item {0},需要的庫存項目交割倉庫{0}, +Dependent Task,相關任務, +Depreciation,折舊, +Depreciation Amount,折舊額, +Depreciation Amount during the period,期間折舊額, +Depreciation Date,折舊日期, +Depreciation Eliminated due to disposal of assets,折舊淘汰因處置資產, +Depreciation Entry,折舊分錄, +Depreciation Row {0}: Expected value after useful life must be greater than or equal to {1},折舊行{0}:使用壽命後的預期值必須大於或等於{1}, +Depreciation Row {0}: Next Depreciation Date cannot be before Available-for-use Date,折舊行{0}:下一個折舊日期不能在可供使用的日期之前, +Depreciation Row {0}: Next Depreciation Date cannot be before Purchase Date,折舊行{0}:下一個折舊日期不能在購買日期之前, +Depreciation Schedule,折舊計劃, +Difference,區別, +Difference Account,差異科目, +"Difference Account must be a Asset/Liability type account, since this Stock Reconciliation is an Opening Entry",差異科目必須是資產/負債類型的科目,因為此庫存調整是一個開帳分錄, +Difference Amount,差額, +Difference Amount must be zero,差量必須是零, +Different UOM for items will lead to incorrect (Total) Net Weight value. Make sure that Net Weight of each item is in the same UOM.,不同計量單位的項目會導致不正確的(總)淨重值。確保每個項目的淨重是在同一個計量單位。, +Direct Expenses,直接費用, +Direct Income,直接收入, +Disabled template must not be default template,殘疾人模板必須不能默認模板, +Dispatch,調度, +Dispatch Notification,發貨通知, +Distributor,經銷商, +Do Not Contact,不要聯絡, +Do you really want to restore this scrapped asset?,難道你真的想恢復這個報廢的資產?, +Do you really want to scrap this asset?,難道你真的想放棄這項資產?, +Do you want to notify all the customers by email?,你想通過電子郵件通知所有的客戶?, +Docs Search,Google文檔搜索, +Dr,博士, +Driver,司機, +Driving License Category,駕駛執照類別, +Due / Reference Date cannot be after {0},由於/參考日期不能後{0}, +Due Date is mandatory,截止日期是強制性的, +Duplicate Entry. Please check Authorization Rule {0},重複的條目。請檢查授權規則{0}, +Duplicate customer group found in the cutomer group table,在CUTOMER組表中找到重複的客戶群, +Duplicate item group found in the item group table,在項目組表中找到重複的項目組, +Duplicate row {0} with same {1},重複的行{0}同{1}, +Duration,持續時間, +Duration in Days,持續時間天數, +Duties and Taxes,關稅和稅款, +Earnest Money,保證金, +Edit Posting Date and Time,編輯投稿時間, +Either location or employee must be required,必須要求地點或員工, +Either target qty or target amount is mandatory,無論是數量目標或目標量是必需的, +Either target qty or target amount is mandatory.,無論是數量目標或目標量是強制性的。, +Electrical,電子的, +Electronic Equipments,電子設備, +Email Digest,電子郵件摘要, +Email sent to {0},電子郵件發送到{0}, +Employee,僱員, +Employee Advances,員工發展, +Employee Education,員工教育, +Employee External Work History,員工對外工作歷史, +Employee Internal Work History,員工內部工作經歷, +Employee Name,員工姓名, +Employee cannot report to himself.,員工不能報告自己。, +End Date cannot be before Start Date.,結束日期不能在開始日期之前。, +End Year,結束年份, +End Year cannot be before Start Year,結束年份不能啟動年前, +Enough Parts to Build,足夠的配件組裝, +Enter depreciation details,輸入折舊明細, +Enter the Bank Guarantee Number before submittting.,在提交之前輸入銀行保證號碼。, +Enter the name of the Beneficiary before submittting.,在提交之前輸入受益人的姓名。, +Enter the name of the bank or lending institution before submittting.,在提交之前輸入銀行或貸款機構的名稱。, +Entertainment Expenses,娛樂費用, +Equity,公平, +Error evaluating the criteria formula,評估標準公式時出錯, +Estimated Cost,估計成本, +Exchange Gain/Loss,兌換收益/損失, +Exchange Rate Revaluation,匯率重估, +Exchange Rate Revaluation Account,匯率重估科目, +Exchange Rate must be same as {0} {1} ({2}),匯率必須一致{0} {1}({2}), +Excise Invoice,消費稅發票, +Execution,執行, +Expected Delivery Date,預計交貨日期, +Expected Delivery Date should be after Sales Order Date,預計交貨日期應在銷售訂單日期之後, +Expected End Date,預計結束日期, +Expected Hrs,預計的小時數, +Expected Start Date,預計開始日期, +Expense,費用, +Expense / Difference account ({0}) must be a 'Profit or Loss' account,費用/差異科目({0})必須是一個'收益或損失'的科目, +Expense Account,費用科目, +Expense account is mandatory for item {0},交際費是強制性的項目{0}, +Expenses,開支, +Expenses Included In Asset Valuation,資產評估中包含的費用, +Expenses Included In Valuation,支出計入估值, +Expired Batches,過期批次, +Expiry (In Days),到期(天數), +Extra Large,特大號, +Failed to install presets,無法安裝預設, +Failed to login,登錄失敗, +Failed to setup company,未能成立公司, +Fetch Subscription Updates,獲取訂閱更新, +Fetch exploded BOM (including sub-assemblies),取得爆炸BOM(包括子組件), +Filter Total Zero Qty,過濾器總計零數量, +Finance Book,金融書, +Financial Statements,財務報表, +Finish,完, +Fiscal Year,財政年度, +Fiscal Year Company,會計年度公司, +Fiscal Year Start Date and Fiscal Year End Date are already set in Fiscal Year {0},會計年度開始日期和財政年度結束日期已經在財政年度設置{0}, +Fiscal Year {0} does not exist,會計年度{0}不存在, +Fiscal Year {0} is required,會計年度{0}是必需的, +Fixed Asset,固定資產, +Fixed Asset Item must be a non-stock item.,固定資產項目必須是一個非庫存項目。, +Fixed Assets,固定資產, +Fleet Manager,車隊經理, +Following Material Requests have been raised automatically based on Item's re-order level,下列資料的要求已自動根據項目的重新排序水平的提高, +Following item {0} is not marked as {1} item. You can enable them as {1} item from its Item master,項目{0}之後未標記為{1}項目。您可以從項目主文件中將它們作為{1}項啟用, +Following items {0} are not marked as {1} item. You can enable them as {1} item from its Item master,以下項{0}未標記為{1}項。您可以從項目主文件中將它們作為{1}項啟用, +For,對於, +"For 'Product Bundle' items, Warehouse, Serial No and Batch No will be considered from the 'Packing List' table. If Warehouse and Batch No are same for all packing items for any 'Product Bundle' item, those values can be entered in the main Item table, values will be copied to 'Packing List' table.",對於“產品包”的物品,倉庫,序列號和批號將被從“裝箱單”表考慮。如果倉庫和批次號是相同的任何“產品包”項目的所有包裝物品,這些值可以在主項表中輸入,值將被複製到“裝箱單”表。, +For Quantity (Manufactured Qty) is mandatory,對於數量(製造數量)是強制性的, +For Supplier,對供應商, +For Warehouse,對於倉庫, +For Warehouse is required before Submit,對於倉庫之前,需要提交, +"For an item {0}, quantity must be negative number",對於商品{0},數量必須是負數, +"For an item {0}, quantity must be positive number",對於商品{0},數量必須是正數, +"For row {0} in {1}. To include {2} in Item rate, rows {3} must also be included",對於行{0} {1}。以包括{2}中的檔案速率,行{3}也必須包括, +Forum Activity,論壇活動, +Freight and Forwarding Charges,貨運代理費, +From Currency and To Currency cannot be same,原始貨幣和目標貨幣不能相同, +From Date and To Date lie in different Fiscal Year,從日期和到期日位於不同的財政年度, +From Date cannot be greater than To Date,起始日期不能大於結束日期, +From Date must be before To Date,起始日期必須早於終點日期, +From Date should be within the Fiscal Year. Assuming From Date = {0},從日期應該是在財政年度內。假設起始日期={0}, +From Datetime,從日期時間, +From Delivery Note,從送貨單, +From Fiscal Year,從財政年度開始, +From Range has to be less than To Range,從範圍必須小於要範圍, +From Time,從時間, +From Time Should Be Less Than To Time,從時間應該少於時間, +From value must be less than to value in row {0},來源值必須小於列{0}的值, +Fulfillment,履行, +Fulfillment User,履行用戶, +Fully Depreciated,已提足折舊, +Furnitures and Fixtures,家具及固定裝置, +"Further accounts can be made under Groups, but entries can be made against non-Groups",進一步帳戶可以根據組進行,但條目可針對非組進行, +Further cost centers can be made under Groups but entries can be made against non-Groups,進一步的成本中心可以根據組進行,但項可以對非組進行, +GL Entry,GL報名, +Gain/Loss on Asset Disposal,在資產處置收益/損失, +Gantt Chart,甘特圖, +Gantt chart of all tasks.,所有任務的甘特圖。, +General Ledger,總帳, +General Ledger,總帳,Warehouse +Get Items from BOM,從物料清單取得項目, +Get Items from Product Bundle,從產品包取得項目, +Get Payment Entries,獲取付款項, +Get Suppliers,獲取供應商, +Get Suppliers By,獲得供應商, +Get Unreconciled Entries,獲取未調節項, +Get Updates,獲取更新, +Global Defaults,全域預設值, +Grand Total,累計, +Gross Profit / Loss,總利潤/虧損, +Gross Purchase Amount,總購買金額, +Gross Purchase Amount is mandatory,總消費金額是強制性, +Group By,集團通過, +Group by Account,以科目分群組, +Group by Voucher,集團透過券, +Group node warehouse is not allowed to select for transactions,組節點倉庫不允許選擇用於交易, +Groups,組, +HR Manager,人力資源經理, +HR User,HR用戶, +Help Results for,幫助結果, +Hold,持有, +Hold Invoice,保留發票, +Holiday,節日, +Holiday List,假日列表, +Homepage,主頁, +Hours,小時, +Human Resources,人力資源, +Identifying Decision Makers,確定決策者, +Import in Bulk,進口散裝, +In Maintenance,在維護中, +In Production,在生產中, +In Qty,在數量, +In Stock Qty,庫存數量, +In Value,在數值, +Inactive Customers,不活躍的客戶, +Incentives,獎勵, +Include Exploded Items,包含爆炸物品, +Income,收入, +Income Account,收入科目, +Incoming,來, +Incoming Rate,傳入速率, +Incorrect number of General Ledger Entries found. You might have selected a wrong Account in the transaction.,不正確的數字總帳條目中找到。你可能會在交易中選擇了錯誤的科目。, +Indirect Expenses,間接費用, +Indirect Income,間接收入, +Individual,個人, +Industry Type,行業類型, +Initiated,啟動, +Inspected By,檢查, +Inspection Required,需要檢驗, +Inspection Type,檢驗類型, +Installation Note,安裝注意事項, +Installation Note Item,安裝注意項, +Installation Note {0} has already been submitted,安裝注意{0}已提交, +Installation date cannot be before delivery date for Item {0},品項{0}的安裝日期不能早於交貨日期, +Installing presets,安裝預置, +Insufficient Stock,庫存不足, +Insurance Start date should be less than Insurance End date,保險開始日期應小於保險終止日期, +Interested,有興趣, +Internal Transfer,內部轉賬, +Invalid Attribute,無效屬性, +Invalid Blanket Order for the selected Customer and Item,所選客戶和物料的無效總訂單, +Invalid Posting Time,發佈時間無效, +Invalid reference {0} {1},無效的參考{0} {1}, +Invalid {0},無效的{0}, +Invalid {0}: {1},無效的{0}:{1}, +Investments,投資, +Invoice,發票, +Invoice Portion,發票部分, +Invoice Posting Date,發票發布日期, +Invoice Type,發票類型, +Invoice already created for all billing hours,發票已在所有結算時間創建, +Invoice can't be made for zero billing hour,在零計費時間內無法開具發票, +Invoiced Amount,發票金額, +Invoices,發票, +Is Frozen,就是冰凍, +Is Group,是集團, +Is Return,退貨, +Issue,問題, +Issue Material,發行材料, +Issue Type,發行類型, +Issued,發行, +Issued Items Against Work Order,針對工單發布物品, +Issues,問題, +It is needed to fetch Item Details.,需要獲取項目細節。, +Item,項目, +Item Alternative,項目選擇, +Item Attribute,項目屬性, +Item Attribute Value,項目屬性值, +Item Balance (Simple),物品餘額(簡單), +Item Barcode,商品條碼, +Item Code,產品編號, +Item Code cannot be changed for Serial No.,產品編號不能為序列號改變, +Item Code required at Row No {0},於列{0}需要產品編號, +Item Customer Detail,項目客戶詳細, +Item Default,項目默認值, +Item Group,項目群組, +Item Group Tree,項目群組的樹狀結構, +Item Group not mentioned in item master for item {0},項目{0}之項目主檔未提及之項目群組, +Item Manager,項目經理, +Item Name,項目名稱, +Item Price,商品價格, +Item Price Stock,項目價格庫存, +Item Price added for {0} in Price List {1},加入項目價格為{0}價格表{1}, +Item Price updated for {0} in Price List {1},項目價格更新{0}價格表{1}, +Item Prices,產品價格, +Item Quality Inspection Parameter,產品質量檢驗參數, +Item Reorder,項目重新排序, +Item Row {0}: {1} {2} does not exist in above '{1}' table,項目行{0}:{1} {2}在上面的“{1}”表格中不存在, +Item Shortage Report,商品短缺報告, +Item Supplier,產品供應商, +Item Tax,產品稅, +Item Tax Row {0} must have account of type Tax or Income or Expense or Chargeable,"商品稅行{0}必須有科目類型為""稅"" 或 ""收入"" 或 ""支出"" 或 ""課稅的""", +Item Variant,項目變, +Item Variant Attribute,產品規格屬性, +Item Variant Details,項目變體的詳細信息, +Item Variant Settings,項目變式設置, +Item Variant {0} already exists with same attributes,項目變種{0}已經具有相同屬性的存在, +Item Website Specification,項目網站規格, +Item has variants.,項目已變種。, +Item must be added using 'Get Items from Purchase Receipts' button,項目必須使用'從採購入庫“按鈕進行新增, +Item variant {0} exists with same attributes,項目變種{0}存在具有相同屬性, +Item {0} does not exist,項目{0}不存在, +Item {0} does not exist in the system or has expired,項目{0}不存在於系統中或已過期, +Item {0} has already been returned,項{0}已被退回, +Item {0} has been disabled,項{0}已被禁用, +Item {0} has reached its end of life on {1},項{0}已達到其壽命結束於{1}, +Item {0} ignored since it is not a stock item,項目{0}被忽略,因為它不是一個庫存項目, +Item {0} is cancelled,項{0}將被取消, +Item {0} is disabled,項目{0}無效, +Item {0} is not a serialized Item,項{0}不是一個序列化的項目, +Item {0} is not a stock Item,項{0}不是缺貨登記, +Item {0} is not active or end of life has been reached,項目{0}不活躍或生命的盡頭已經達到, +Item {0} must be a Fixed Asset Item,項{0}必須是固定資產項目, +Item {0} must be a Sub-contracted Item,項{0}必須是一個小項目簽約, +Item {0} must be a non-stock item,項{0}必須是一個非庫存項目, +Item {0}: Ordered qty {1} cannot be less than minimum order qty {2} (defined in Item).,項目{0}:有序數量{1}不能低於最低訂貨量{2}(項中定義)。, +Item-wise Price List Rate,全部項目的價格表, +Item-wise Purchase History,全部項目的購買歷史, +Item-wise Purchase Register,項目明智的購買登記, +Item-wise Sales History,項目明智的銷售歷史, +Item-wise Sales Register,項目明智的銷售登記, +Item: {0} does not exist in the system,項:{0}不存在於系統中, +Items,項目, +Items Filter,物品過濾, +Items To Be Requested,需求項目, +Items and Pricing,項目和定價, +Itemwise Recommended Reorder Level,Itemwise推薦級別重新排序, +Job Card Item,工作卡項目, +Job card {0} created,已創建作業卡{0}, +Journal Entries {0} are un-linked,日記條目{0}都是非聯, +Journal Entry,日記帳分錄, +Journal Entry Account,日記帳分錄帳號, +Journal Entry {0} does not have account {1} or already matched against other voucher,日記條目{0}沒有帳號{1}或已經匹配其他憑證, +Landed Cost Item,到岸成本項目, +Landed Cost Purchase Receipt,到岸成本採購入庫單, +Landed Cost Taxes and Charges,到岸成本稅費, +Landed Cost Voucher,到岸成本憑證, +Last Communication,最後溝通, +Last Communication Date,最後通訊日期, +Last Order Amount,最後訂單金額, +Last Order Date,最後訂購日期, +Last Purchase Rate,最後預訂價, +Lead,潛在客戶, +Lead Count,鉛計數, +Lead Details,潛在客戶詳情, +Lead Name,主導者名稱, +Lead Owner,主導擁有者, +Lead Owner Efficiency,主導效率, +Lead Source,主導來源, +Lead Time Days,交貨期天, +"Leads help you get business, add all your contacts and more as your leads",信息幫助你的業務,你所有的聯繫人和更添加為您的線索, +Ledger,分類帳, +Legal Expenses,法律費用, +Liability,責任, +Link to Material Request,鏈接到材料請求, +Linked Location,鏈接位置, +Loans (Liabilities),借款(負債), +Loans and Advances (Assets),貸款及墊款(資產), +Local,當地, +Lost,丟失, +Lost Quotation,遺失報價, +Lost Reason,失落的原因, +Lower Income,較低的收入, +Loyalty Point Entry,忠誠度積分, +Loyalty Point Entry Redemption,忠誠度積分兌換, +Loyalty Points,忠誠度積分, +Loyalty Program,忠誠計劃, +Loyalty Program Collection,忠誠度計劃集, +Main,主頁, +Maintenance,維護, +Maintenance Log,維護日誌, +Maintenance Schedule,維護計劃, +Maintenance Schedule Detail,維護計劃細節, +Maintenance Schedule Item,維護計劃項目, +Maintenance Schedule is not generated for all the items. Please click on 'Generate Schedule',維護計畫不會為全部品項生成。請點擊“生成表”, +Maintenance Schedule {0} exists against {1},針對{1}存在維護計劃{0}, +Maintenance Schedules,保養時間表, +Maintenance Status has to be Cancelled or Completed to Submit,維護狀態必須取消或完成提交, +Maintenance Team Member,維護團隊成員, +Maintenance Visit,維護訪問, +Maintenance Visit Purpose,維護訪問目的, +Maintenance start date can not be before delivery date for Serial No {0},序號{0}的維護開始日期不能早於交貨日期, +Make ,使, +Make Quotation,請報價, +Manage your orders,管理您的訂單, +Management,管理, +Manufacture,製造, +Manufactured Qty,生產數量, +Manufacturer,生產廠家, +Manufacturer Part Number,製造商零件編號, +Manufacturing,製造, +Manufacturing Manager,生產經理, +Manufacturing Quantity is mandatory,生產數量是必填的, +Manufacturing Settings,製造設定, +Manufacturing User,製造業用戶, +Market Segment,市場分類, +Marketing,市場營銷, +Marketing Expenses,市場推廣開支, +Master,主, +Masters,資料主檔, +Material Consumption is not set in Manufacturing Settings.,材料消耗未在生產設置中設置。, +Material Receipt,收料, +Material Request,物料需求, +Material Request Date,材料申請日期, +Material Request Item,物料需求項目, +Material Request Plan Item,材料申請計劃項目, +Material Request of maximum {0} can be made for Item {1} against Sales Order {2},針對銷售訂單{2}的項目{1},最多可以有 {0} 被完成。, +Material Request {0} is cancelled or stopped,材料需求{0}被取消或停止, +Material Requests for which Supplier Quotations are not created,尚未建立供應商報價的材料需求, +Material Transfer,物料轉倉, +Material to Supplier,材料到供應商, +Max: {0},最大數量:{0}, +Maximum Samples - {0} can be retained for Batch {1} and Item {2}.,可以為批次{1}和項目{2}保留最大樣本數量{0}。, +Maximum Samples - {0} have already been retained for Batch {1} and Item {2} in Batch {3}.,批次{1}和批次{3}中的項目{2}已保留最大樣本數量{0}。, +Merge,合併, +Merge Account,合併科目, +Merge with Existing Account,與現有科目合併, +Message Sent,發送訊息, +Min Qty can not be greater than Max Qty,最小數量不能大於最大數量, +Minimum Lead Age (Days),最低鉛年齡(天), +Miscellaneous Expenses,雜項開支, +Missing email template for dispatch. Please set one in Delivery Settings.,缺少發送的電子郵件模板。請在“傳遞設置”中設置一個。, +Mobile,移動, +Mobile Number,手機號碼, +Mode of Payment Account,支付帳戶模式, +Monthly Distribution,月度分佈, +Monthly Distribution Percentage,每月分配比例, +Move Item,移動項目, +Multi Currency,多幣種, +"Multiple Price Rules exists with same criteria, please resolve conflict by assigning priority. Price Rules: {0}",海報價格規則,同樣的標準存在,請通過分配優先解決衝突。價格規則:{0}, +Multiple Variants,多種變體, +Multiple fiscal years exist for the date {0}. Please set company in Fiscal Year,多個會計年度的日期{0}存在。請設置公司財年, +Must be Whole Number,必須是整數, +Name of new Account. Note: Please don't create accounts for Customers and Suppliers,新帳戶的名稱。注:請不要創建帳戶的客戶和供應商, +Negative Quantity is not allowed,負數量是不允許, +Negative Valuation Rate is not allowed,負面評價率是不允許的, +Negotiation/Review,談判/評論, +Net Asset value as on,淨資產值作為, +Net Cash from Financing,從融資淨現金, +Net Cash from Investing,從投資淨現金, +Net Cash from Operations,從運營的淨現金, +Net Change in Accounts Payable,應付帳款淨額變化, +Net Change in Accounts Receivable,應收帳款淨額變化, +Net Change in Cash,現金淨變動, +Net Change in Equity,在淨資產收益變化, +Net Change in Fixed Asset,在固定資產淨變動, +Net Change in Inventory,在庫存淨變動, +Net Total,總淨值, +New Account Name,新帳號名稱, +New BOM,新的物料清單, +New Batch ID (Optional),新批號(可選), +New Company,新公司, +New Cost Center Name,新的成本中心名稱, +New Customer Revenue,新客戶收入, +New Customers,新客戶, +New Department,新部門, +New Employee,新員工, +New Sales Person Name,新銷售人員的姓名, +New Serial No cannot have Warehouse. Warehouse must be set by Stock Entry or Purchase Receipt,新的序列號不能有倉庫。倉庫必須由存貨分錄或採購入庫單進行設定, +New Warehouse Name,新倉庫名稱, +New credit limit is less than current outstanding amount for the customer. Credit limit has to be atleast {0},新的信用額度小於當前餘額為客戶著想。信用額度是ATLEAST {0}, +New task,新任務, +No Delivery Note selected for Customer {},沒有為客戶{}選擇送貨單, +No Item with Barcode {0},沒有條碼{0}的品項, +No Item with Serial No {0},沒有序號{0}的品項, +No Items with Bill of Materials to Manufacture,不與物料清單的項目,以製造, +No Permission,無權限, +No Remarks,暫無產品說明, +No accounting entries for the following warehouses,沒有以下的倉庫會計分錄, +No contacts with email IDs found.,找不到與電子郵件ID的聯繫人。, +No data for this period,此期間沒有數據, +No items to be received are overdue,沒有收到的物品已逾期, +No material request created,沒有創建重要請求, +No of Interactions,沒有相互作用, +No of Shares,股份數目, +No pending Material Requests found to link for the given items.,找不到針對給定項目鏈接的待處理物料請求。, +No products found.,找不到產品。, +No record found,沒有資料, +No {0} found for Inter Company Transactions.,Inter公司沒有找到{0}。, +Non Profit,非營利, +None of the items have any change in quantity or value.,沒有一個項目無論在數量或價值的任何變化。, +Not Started,未啟動, +Not allow to set alternative item for the item {0},不允許為項目{0}設置替代項目, +Not allowed to update stock transactions older than {0},不允許更新比{0}舊的庫存交易, +Not authorized to edit frozen Account {0},無權修改凍結帳戶{0}, +Not authroized since {0} exceeds limits,不允許因為{0}超出範圍, +Note: Due / Reference Date exceeds allowed customer credit days by {0} day(s),註:由於/參考日期由{0}天超過了允許客戶的信用天數(S), +Note: Payment Entry will not be created since 'Cash or Bank Account' was not specified,注:付款項將不會被創建因為“現金或銀行科目”未指定, +Note: This Cost Center is a Group. Cannot make accounting entries against groups.,注:該成本中心是一個集團。不能讓反對團體的會計分錄。, +Notes,筆記, +Nothing more to show.,沒有更多的表現。, +Notify Customers via Email,通過電子郵件通知客戶, +Number of Interaction,交互次數, +Number of Order,訂購數量, +"Number of new Account, it will be included in the account name as a prefix",新帳號的數量,將作為前綴包含在帳號名稱中, +"Number of new Cost Center, it will be included in the cost center name as a prefix",新成本中心的數量,它將作為前綴包含在成本中心名稱中, +Office Equipments,辦公設備, +Office Maintenance Expenses,Office維護費用, +Office Rent,辦公室租金, +On Hold,等候接聽, +Open Notifications,打開通知, +Open Projects,打開項目, +Open Work Orders,打開工作訂單, +Open a new ticket,打開一張新票, +Opening,開盤, +Opening (Cr),開啟(Cr ), +Opening (Dr),開啟(Dr), +Opening Accumulated Depreciation,打開累計折舊, +Opening Balance Equity,期初餘額權益, +Opening Invoice Creation Tool,打開發票創建工具, +Opening Invoice Creation Tool Item,打開發票創建工具項目, +Opening Invoice Item,打開發票項目, +Opening Invoices Summary,打開發票摘要, +Opening Qty,開放數量, +Opening Stock,打開庫存, +Opening Value,開度值, +Operating Cost,營業成本, +Operation Time must be greater than 0 for Operation {0},運行時間必須大於0的操作{0}, +"Operation {0} longer than any available working hours in workstation {1}, break down the operation into multiple operations",操作{0}比任何可用的工作時間更長工作站{1},分解成運行多個操作, +Operations,操作, +Opportunities,機會, +Opportunities by lead source,鉛來源的機會, +Opportunity,機會, +Opportunity Amount,機會金額, +Opportunity From,機會從, +Opportunity Item,項目的機會, +Opportunity Type,機會型, +"Optional. Sets company's default currency, if not specified.",可選。設置公司的默認貨幣,如果沒有指定。, +Optional. This setting will be used to filter in various transactions.,可選。此設置將被應用於過濾各種交易進行。, +Order Count,訂單數量, +Order Type,訂單類型, +Order Value,訂單價值, +Ordered,已訂購, +Ordered Qty,訂購數量, +Ordered Quantity,訂購數量, +Orders,訂單, +Organization,組織, +Other Reports,其他報告, +Out Qty,輸出數量, +Out Value,輸出值, +Out of Order,亂序, +Outgoing,發送, +Outstanding Amount,未償還的金額, +Outstanding Amt,優秀的金額, +Outstanding Cheques and Deposits to clear,傑出的支票及存款清除, +Outstanding for {0} cannot be less than zero ({1}),傑出的{0}不能小於零( {1} ), +Overdue,過期的, +Overlap in scoring between {0} and {1},{0}和{1}之間的得分重疊, +Overlapping conditions found between:,存在重疊的條件:, +POS Customer Group,POS客戶群, +POS Item Group,POS項目組, +POS Profile,POS簡介, +POS Profile User,POS配置文件用戶, +POS Profile required to make POS Entry,所需的POS資料,使POS進入, +POS Settings,POS設置, +Packed Item,盒裝產品, +Packing Slip,包裝單, +Packing Slip Item,包裝單項目, +Packing Slip(s) cancelled,包裝單( S)已取消, +Paid,付費, +Paid Amount,支付的金額, +Paid Amount cannot be greater than total negative outstanding amount {0},支付的金額不能超過總負餘額大於{0}, +Paid amount + Write Off Amount can not be greater than Grand Total,支付的金額+寫的抵銷金額不能大於總計, +Parent Item {0} must not be a Stock Item,父項{0}不能是庫存產品, +Parent Warehouse,家長倉庫, +Partially Depreciated,部分貶抑, +Party,黨, +Party Account,參與者科目, +Party Name,方名稱, +Party Type,黨的類型, +Party Type and Party is mandatory for {0} account,{0}科目的參與方以及類型為必填, +Party Type is mandatory,黨的類型是強制性, +Party is mandatory,黨是強制性, +Past Due Date,過去的截止日期, +Payable,支付, +Payable Account,應付帳款, +Payment Amount,付款金額, +Payment Document,付款單據, +Payment Entries {0} are un-linked,付款項{0}是聯合國聯, +Payment Entry,付款輸入, +Payment Entry Deduction,輸入付款扣除, +Payment Entry Reference,付款輸入參考, +Payment Entry already exists,付款項目已存在, +Payment Entry has been modified after you pulled it. Please pull it again.,付款項被修改,你把它之後。請重新拉。, +Payment Entry is already created,已創建付款輸入, +Payment Failed,支付失敗, +Payment Gateway Account,網路支付閘道科目, +"Payment Gateway Account not created, please create one manually.",支付閘道科目沒有創建,請手動創建一個。, +Payment Order,付款單, +Payment Order Reference,付款訂單參考, +Payment Period Based On Invoice Date,基於發票日的付款期, +Payment Receipt Note,付款收貨注意事項, +Payment Reconciliation,付款對帳, +Payment Reconciliation Invoice,付款發票對帳, +Payment Reconciliation Payment,付款方式付款對賬, +Payment Request,付錢請求, +Payment Request for {0},付款申請{0}, +Payment Schedule,付款時間表, +Payment Terms,付款條件, +Payment Terms Template,付款條款模板, +Payment Terms Template Detail,付款條款模板細節, +Payment Type,付款類型, +"Payment Type must be one of Receive, Pay and Internal Transfer",付款方式必須是接收之一,收費和內部轉賬, +Payment against {0} {1} cannot be greater than Outstanding Amount {2},對支付{0} {1}不能大於未償還{2}, +Payroll Payable,應付職工薪酬, +Payslip,工資單, +Pending Activities,待活動, +Pending Amount,待審核金額, +Pending Qty,待定數量, +Pending SO Items For Purchase Request,待處理的SO項目對於採購申請, +Pending activities for today,今天待定活動, +Period,期間, +Period Closing Voucher,期末券, +Periodicity,週期性, +Pharmaceutical,製藥, +Planned End Date,計劃的結束日期, +Planned Qty,計劃數量, +Planned Quantity,計劃數量, +Planned Start Date,計劃開始日期, +Planning,規劃, +Plants and Machineries,廠房和機械設備, +Please Set Supplier Group in Buying Settings.,請設置供應商組購買設置。, +Please add a Temporary Opening account in Chart of Accounts,請在會計科目表中添加一個臨時開戶科目, +Please check Multi Currency option to allow accounts with other currency,請檢查多幣種選項,允許帳戶與其他貨幣, +Please click on 'Generate Schedule',請點擊“生成表”, +Please click on 'Generate Schedule' to fetch Serial No added for Item {0},請點擊“生成表”來獲取序列號增加了對項目{0}, +Please click on 'Generate Schedule' to get schedule,請在“產生排程”點擊以得到排程表, +Please create purchase receipt or purchase invoice for the item {0},請為項目{0}創建購買收據或購買發票, +Please enable Applicable on Booking Actual Expenses,請啟用適用於預訂實際費用, +Please enable Applicable on Purchase Order and Applicable on Booking Actual Expenses,請啟用適用於採購訂單並適用於預訂實際費用, +Please enter Account for Change Amount,對於漲跌額請輸入帳號, +Please enter Approving Role or Approving User,請輸入核准角色或審批用戶, +Please enter Cost Center,請輸入成本中心, +Please enter Delivery Date,請輸入交貨日期, +Please enter Employee Id of this sales person,請輸入這個銷售人員的員工標識, +Please enter Expense Account,請輸入您的費用科目, +Please enter Item Code to get Batch Number,請輸入產品代碼來獲得批號, +Please enter Item Code to get batch no,請輸入產品編號,以取得批號, +Please enter Item first,請先輸入品項, +Please enter Maintaince Details first,請先輸入維護細節, +Please enter Planned Qty for Item {0} at row {1},請輸入列{1}的品項{0}的計劃數量, +Please enter Preferred Contact Email,請輸入首選電子郵件聯繫, +Please enter Production Item first,請先輸入生產項目, +Please enter Purchase Receipt first,請先輸入採購入庫單, +Please enter Receipt Document,請輸入收據憑證, +Please enter Reference date,參考日期請輸入, +Please enter Reqd by Date,請輸入按日期請求, +Please enter Write Off Account,請輸入核銷科目, +Please enter company first,請先輸入公司, +Please enter company name first,請先輸入公司名稱, +Please enter default currency in Company Master,請在公司主檔輸入預設貨幣, +Please enter message before sending,在發送前,請填寫留言, +Please enter parent cost center,請輸入父成本中心, +Please enter relieving date.,請輸入解除日期。, +Please enter valid Financial Year Start and End Dates,請輸入有效的財政年度開始和結束日期, +Please enter {0} first,請輸入{0}第一, +Please make sure you really want to delete all the transactions for this company. Your master data will remain as it is. This action cannot be undone.,請確保你真的要刪除這家公司的所有交易。主數據將保持原樣。這個動作不能撤消。, +Please mention no of visits required,請註明無需訪問, +Please pull items from Delivery Note,請送貨單拉項目, +Please select Apply Discount On,請選擇適用的折扣, +Please select BOM against item {0},請選擇物料{0}的物料清單, +Please select BOM for Item in Row {0},請行選擇BOM為項目{0}, +Please select BOM in BOM field for Item {0},請BOM字段中選擇BOM的項目{0}, +Please select Category first,請先選擇分類, +Please select Charge Type first,請先選擇付款類別, +Please select Company,請選擇公司, +Please select Company and Posting Date to getting entries,請選擇公司和發布日期以獲取條目, +Please select Company first,請首先選擇公司, +Please select Completion Date for Completed Asset Maintenance Log,請選擇已完成資產維護日誌的完成日期, +Please select Existing Company for creating Chart of Accounts,請選擇現有的公司創建會計科目表, +Please select Maintenance Status as Completed or remove Completion Date,請選擇維護狀態為已完成或刪除完成日期, +Please select Party Type first,請選擇黨第一型, +Please select Posting Date before selecting Party,在選擇之前,甲方請選擇發布日期, +Please select Posting Date first,請選擇發布日期第一, +Please select Price List,請選擇價格表, +Please select Qty against item {0},請選擇項目{0}的數量, +Please select Sample Retention Warehouse in Stock Settings first,請先在庫存設置中選擇樣品保留倉庫, +Please select Start Date and End Date for Item {0},請選擇項目{0}的開始日期和結束日期, +Please select a BOM,請選擇一個物料清單, +Please select a Company,請選擇一個公司, +Please select a field to edit from numpad,請選擇要從數字鍵盤編輯的字段, +Please select a value for {0} quotation_to {1},請選擇一個值{0} quotation_to {1}, +Please select correct account,請選擇正確的科目, +Please select date,請選擇日期, +Please select item code,請選擇商品代碼, +Please select the Company,請選擇公司, +Please select the Multiple Tier Program type for more than one collection rules.,請為多個收集規則選擇多層程序類型。, +Please select the document type first,請先選擇文檔類型, +Please select weekly off day,請選擇每週休息日, +Please select {0},請選擇{0}, +Please select {0} first,請先選擇{0}, +Please set 'Apply Additional Discount On',請設置“收取額外折扣”, +Please set 'Asset Depreciation Cost Center' in Company {0},請設置在公司的資產折舊成本中心“{0}, +Please set 'Gain/Loss Account on Asset Disposal' in Company {0},請公司制定“關於資產處置收益/損失科目”{0}, +Please set Account in Warehouse {0} or Default Inventory Account in Company {1},請在倉庫{0}中設科目或在公司{1}中設置默認庫存科目, +Please set Company,請設公司, +Please set Depreciation related Accounts in Asset Category {0} or Company {1},請設置在資產類別{0}或公司折舊相關科目{1}, +Please set Unrealized Exchange Gain/Loss Account in Company {0},請在公司{0}中設置未實現的匯兌收益/損失科目, +Please set a default Holiday List for Employee {0} or Company {1},請設置一個默認的假日列表為員工{0}或公司{1}, +Please set account in Warehouse {0},請在倉庫{0}中設置會計科目, +Please set default Cash or Bank account in Mode of Payment {0},請設定現金或銀行帳戶的預設付款方式{0}, +Please set default {0} in Company {1},請設置在默認情況下公司{0} {1}, +Please set filter based on Item or Warehouse,根據項目或倉庫請設置過濾器, +Please set recurring after saving,請設置保存後復發, +Please set the Default Cost Center in {0} company.,請在{0}公司中設置默認成本中心。, +Please set the Item Code first,請先設定商品代碼, +Please set {0},請設置{0}, +Please specify Company,請註明公司, +Please specify Company to proceed,請註明公司以處理, +Please specify a valid Row ID for row {0} in table {1},請指定行{0}在表中的有效行ID {1}, +Please specify at least one attribute in the Attributes table,請指定屬性表中的至少一個屬性, +Please specify either Quantity or Valuation Rate or both,請註明無論是數量或估價率或兩者, +Please specify from/to range,請從指定/至範圍, +Please supply the specified items at the best possible rates,請在提供最好的利率規定的項目, +Point of Sale,銷售點, +Possible Supplier,可能的供應商, +Postal Expenses,郵政費用, +Posting Date,發布日期, +Posting Date cannot be future date,發布日期不能是未來的日期, +Posting Time,登錄時間, +Posting date and posting time is mandatory,登錄日期和登錄時間是必需的, +Posting timestamp must be after {0},登錄時間戳記必須晚於{0}, +Preference,偏愛, +Previous Financial Year is not closed,上一財政年度未關閉, +Price,價格, +Price List,價格表, +Price List Country,價目表國家, +Price List Currency not selected,尚未選擇價格表之貨幣, +Price List must be applicable for Buying or Selling,價格表必須適用於購買或出售, +Price List {0} is disabled or does not exist,價格表{0}禁用或不存在, +Pricing,價錢, +Pricing Rule,定價規則, +Primary Address Details,主要地址詳情, +Primary Contact Details,主要聯繫方式, +Print Heading,列印標題, +Print settings updated in respective print format,打印設置在相應的打印格式更新, +Procurement,採購, +Produced Qty,生產數量, +Produced Quantity,生產的產品數量, +Product Bundle,產品包, +Product Bundle Item,產品包項目, +Production,生產, +Production Analytics,生產Analytics(分析), +Production Item,生產項目, +Production Plan,生產計劃, +Production Plan Item,生產計劃項目, +Production Plan Material Request,生產計劃申請材料, +Production Plan Sales Order,生產計劃銷售訂單, +Products,產品, +Profit and Loss,損益, +Profit and Loss Statement,損益表, +Profit for the year,年度利潤, +Project Collaboration Invitation,項目合作邀請, +Project Id,項目編號, +Project Name,專案名稱, +Project Start Date,專案開始日期, +Project Status,項目狀態, +Project Type,專案類型, +Project Update,項目更新, +Project Update.,項目更新。, +Project User,項目用戶, +Project Value,專案值, +Project activity / task.,專案活動/任務。, +Project master.,專案主持。, +Project wise Stock Tracking,項目明智的庫存跟踪, +Project-wise data is not available for Quotation,項目明智的數據不適用於報價, +Projected Qty,預計數量, +Projects,專案, +Projects Manager,項目經理, +Projects Settings,項目設置, +Projects User,項目用戶, +Proposal Writing,提案寫作, +Proposal/Price Quote,提案/報價, +Prospects Engaged But Not Converted,展望未成熟, +Provisional Profit / Loss (Credit),臨時溢利/(虧損)(信用), +Purchase,採購, +Purchase Amount,購買金額, +Purchase Analytics,採購分析, +Purchase Date,購買日期, +Purchase Invoice,採購發票, +Purchase Invoice Advance,購買發票提前, +Purchase Invoice Item,採購發票項目, +Purchase Invoice Trends,購買發票趨勢, +Purchase Invoice {0} is already submitted,採購發票{0}已經提交, +Purchase Order,採購訂單, +Purchase Order Item,採購訂單項目, +Purchase Order Item Supplied,採購訂單項目供應商, +Purchase Order Items not received on time,未按時收到採購訂單項目, +Purchase Order Required,採購訂單為必要項, +Purchase Order Trends,採購訂單趨勢, +Purchase Order number required for Item {0},所需物品{0}的採購訂單號, +Purchase Order {0} is not submitted,採購訂單{0}未提交, +Purchase Orders are not allowed for {0} due to a scorecard standing of {1}.,由於{1}的記分卡,{0}不允許採購訂單。, +Purchase Price List,採購價格表, +Purchase Receipt,採購入庫單, +Purchase Receipt Item,採購入庫項目, +Purchase Receipt Item Supplied,採購入庫項目供應商, +Purchase Receipt Required,需要採購入庫單, +Purchase Receipt Trends,採購入庫趨勢, +Purchase Receipt {0} is not submitted,採購入庫單{0}未提交, +Purchase Register,購買註冊, +Purchase Tax Template,購置稅模板, +Purchase Taxes and Charges,購置稅和費, +Purchase Taxes and Charges Template,採購稅負和費用模板, +Purchase orders help you plan and follow up on your purchases,採購訂單幫助您規劃和跟進您的購買, +Purchasing,購買, +Purpose must be one of {0},目的必須是一個{0}, +Qty,數量, +Qty To Manufacture,製造數量, +Qty for {0},數量為{0}, +Qty to Deliver,數量交付, +Qty to Order,訂購數量, +Qty to Receive,未到貨量, +Qualification,合格, +Quality Inspection,品質檢驗, +Quality Inspection Reading,質量檢驗閱讀, +Quality Inspection Template,質量檢驗模板, +Quality Management,品質管理, +Quality Manager,質量經理, +Quantity,數量, +Quantity in row {0} ({1}) must be same as manufactured quantity {2},列{0}的數量({1})必須與生產量{2}相同, +Quantity must not be more than {0},數量必須不超過{0}, +Quantity required for Item {0} in row {1},列{1}項目{0}必須有數量, +Quantity to Make,數量, +Quantity to Manufacture must be greater than 0.,量生產必須大於0。, +Quick Journal Entry,快速日記帳分錄, +Quot Count,報價計數, +Quotation,報價, +Quotation Item,產品報價, +Quotation Lost Reason,報價遺失原因, +Quotation Trends,報價趨勢, +Quotation {0} is cancelled,{0}報價被取消, +Quotation {0} not of type {1},報價{0}非為{1}類型, +Quotations,語錄, +"Quotations are proposals, bids you have sent to your customers",語錄是建議,你已經發送到你的客戶提高出價, +Quotations: ,語錄:, +Range,範圍, +Rate,單價, +Raw Material,原料, +Raw Materials,原料, +Raw Materials cannot be blank.,原材料不能為空。, +Re-open,重新打開, +Reason For Putting On Hold,擱置的理由, +Receipt,收據, +Receivable,應收帳款, +Receivable Account,應收帳款, +Received From,從......收到, +Received Items To Be Billed,待付款的收受品項, +Received Qty,到貨數量, +Receiver List is empty. Please create Receiver List,收受方列表為空。請創建收受方列表, +Reconcile,調和, +Redeem Loyalty Points,兌換忠誠度積分, +Ref Date,參考日期, +Reference #{0} dated {1},參考# {0}於{1}, +Reference Doctype must be one of {0},參考文檔類型必須是一個{0}, +Reference Document Type,參考文檔類型, +Reference No & Reference Date is required for {0},參考號與參考日期須為{0}, +Reference No and Reference Date is mandatory for Bank transaction,參考編號和參考日期是強制性的銀行交易, +Reference No is mandatory if you entered Reference Date,如果你輸入的參考日期,參考編號是強制性的, +Reference No.,參考編號。, +Reference Number,參考號碼, +"Reference: {0}, Item Code: {1} and Customer: {2}",參考:{0},商品編號:{1}和顧客:{2}, +References,參考, +Regional,區域性, +Related,有關, +Release Date,發布日期, +Remaining,剩餘, +Remaining Balance,保持平衡, +Remark,備註, +Remarks,備註, +Removed items with no change in quantity or value.,刪除的項目在數量或價值沒有變化。, +Reorder Level,重新排序級別, +Reorder Qty,再訂購數量, +Repeat Customer Revenue,重複客戶收入, +Repeat Customers,回頭客, +Report Date,報告日期, +Report Type is mandatory,報告類型是強制性的, +Request for Quotation,詢價, +Request for Quotation Item,詢價項目, +Request for Quotation Supplier,詢價供應商, +Requested Items To Be Transferred,將要轉倉的需求項目, +Requested Qty,要求數量, +Required By,需求來自, +Required Qty,所需數量, +Research & Development,研究與發展, +Resend Payment Email,重新發送付款電子郵件, +Reserved Qty,保留數量, +Reserved Quantity,保留數量, +Reserved for manufacturing,預留製造, +Reserved for sale,保留出售, +Rest Of The World,世界其他地區, +Restart,重新開始, +Restart Subscription,重新啟動訂閱, +Retention Stock Entry,保留庫存入場, +Retention Stock Entry already created or Sample Quantity not provided,已創建保留庫存條目或未提供“樣本數量”, +Return,退貨, +Return / Credit Note,返回/信用票據, +Return / Debit Note,返回/借記注, +Returned Qty,返回的數量, +Returns,返回, +Reverse Journal Entry,反向日記帳分錄, +Root Type,root類型, +Root Type is mandatory,root類型是強制性的, +Root cannot be edited.,root不能被編輯。, +Root cannot have a parent cost center,root不能有一個父成本中心, +Round Off,四捨五入, +Rounded Total,整數總計, +Row # {0}: Cannot return more than {1} for Item {2},行#{0}:無法返回超過{1}項{2}, +Row # {0}: Rate cannot be greater than the rate used in {1} {2},行#{0}:速率不能大於{1} {2}中使用的速率, +Row #{0} (Payment Table): Amount must be negative,行#{0}(付款表):金額必須為負數, +Row #{0} (Payment Table): Amount must be positive,行#{0}(付款表):金額必須為正值, +Row #{0}: Account {1} does not belong to company {2},行#{0}:科目{1}不屬於公司{2}, +Row #{0}: Allocated Amount cannot be greater than outstanding amount.,行#{0}:分配金額不能大於未結算金額。, +"Row #{0}: Asset {1} cannot be submitted, it is already {2}",行#{0}:資產{1}無法提交,這已經是{2}, +Row #{0}: Cannot set Rate if amount is greater than billed amount for Item {1}.,行#{0}:如果金額大於項目{1}的開帳單金額,則無法設置費率。, +Row #{0}: Duplicate entry in References {1} {2},行#{0}:引用{1} {2}中的重複條目, +Row #{0}: Expected Delivery Date cannot be before Purchase Order Date,行#{0}:預計交貨日期不能在採購訂單日期之前, +Row #{0}: Journal Entry {1} does not have account {2} or already matched against another voucher,行#{0}:日記條目{1}沒有帳戶{2}或已經對另一憑證匹配, +Row #{0}: Not allowed to change Supplier as Purchase Order already exists,行#{0}:不能更改供應商的採購訂單已經存在, +Row #{0}: Please set reorder quantity,行#{0}:請設置再訂購數量, +"Row #{0}: Reference Document Type must be one of Purchase Order, Purchase Invoice or Journal Entry",行#{0}:參考文件類型必須是採購訂單之一,購買發票或日記帳分錄, +Row #{0}: Rejected Qty can not be entered in Purchase Return,行#{0}:駁回採購退貨數量不能進入, +Row #{0}: Reqd by Date cannot be before Transaction Date,行號{0}:按日期請求不能在交易日期之前, +Row #{0}: Set Supplier for item {1},行#{0}:設置供應商項目{1}, +Row #{0}: Timings conflicts with row {1},行#{0}:與排時序衝突{1}, +Row #{0}: {1} can not be negative for item {2},行#{0}:{1}不能為負值對項{2}, +Row {0} : Operation is required against the raw material item {1},行{0}:對原材料項{1}需要操作, +Row {0}: Activity Type is mandatory.,行{0}:活動類型是強制性的。, +Row {0}: Advance against Customer must be credit,行{0}:提前對客戶必須是信用, +Row {0}: Advance against Supplier must be debit,行{0}:提前對供應商必須扣除, +Row {0}: Bill of Materials not found for the Item {1},行{0}:材料清單未找到項目{1}, +Row {0}: Conversion Factor is mandatory,列#{0}:轉換係數是強制性的, +Row {0}: Cost center is required for an item {1},行{0}:項目{1}需要費用中心, +Row {0}: Credit entry can not be linked with a {1},行{0}:信用記錄無法被鏈接的{1}, +Row {0}: Currency of the BOM #{1} should be equal to the selected currency {2},行{0}:BOM#的貨幣{1}應等於所選貨幣{2}, +Row {0}: Debit entry can not be linked with a {1},行{0}:借方條目不能與{1}連接, +Row {0}: Depreciation Start Date is required,行{0}:折舊開始日期是必需的, +Row {0}: Enter location for the asset item {1},行{0}:輸入資產項目{1}的位置, +Row {0}: Exchange Rate is mandatory,行{0}:匯率是必須的, +Row {0}: Expected Value After Useful Life must be less than Gross Purchase Amount,行{0}:使用壽命後的預期值必須小於總採購額, +Row {0}: From Time and To Time is mandatory.,行{0}:從時間和時間是強制性的。, +Row {0}: From Time and To Time of {1} is overlapping with {2},行{0}:從時間和結束時間{1}是具有重疊{2}, +Row {0}: Hours value must be greater than zero.,行{0}:小時值必須大於零。, +Row {0}: Invalid reference {1},行{0}:無效參考{1}, +Row {0}: Party / Account does not match with {1} / {2} in {3} {4},行{0}:甲方/客戶不與匹配{1} / {2} {3} {4}, +Row {0}: Party Type and Party is required for Receivable / Payable account {1},行{0}:參與方類型和參與方需要應收/應付科目{1}, +Row {0}: Payment against Sales/Purchase Order should always be marked as advance,行{0}:付款方式對銷售/採購訂單應始終被標記為提前, +Row {0}: Please check 'Is Advance' against Account {1} if this is an advance entry.,行{0}:請檢查'是進階'對科目{1},如果這是一個進階條目。, +Row {0}: UOM Conversion Factor is mandatory,行{0}:計量單位轉換係數是必需的, +Rows with duplicate due dates in other rows were found: {0},發現其他行中具有重複截止日期的行:{0}, +S.O. No.,SO號, +SO Qty,SO數量, +Safety Stock,安全庫存, +Salary,薪水, +Sales,銷售, +Sales Account,銷售科目, +Sales Analytics,銷售分析, +Sales Expenses,銷售費用, +Sales Funnel,銷售漏斗, +Sales Invoice,銷售發票, +Sales Invoice Advance,銷售發票提前, +Sales Invoice Item,銷售發票項目, +Sales Invoice Payment,銷售發票付款, +Sales Invoice Timesheet,銷售發票時間表, +Sales Invoice Trends,銷售發票趨勢, +Sales Invoice {0} has already been submitted,銷售發票{0}已提交, +Sales Order,銷售訂單, +Sales Order Item,銷售訂單項目, +Sales Order Trends,銷售訂單趨勢, +Sales Order required for Item {0},所需的{0}項目銷售訂單, +Sales Order {0} is not submitted,銷售訂單{0}未提交, +Sales Order {0} is not valid,銷售訂單{0}無效, +Sales Order {0} is {1},銷售訂單{0} {1}, +Sales Orders,銷售訂單, +Sales Partner,銷售合作夥伴, +Sales Partner Type,銷售夥伴類型, +Sales Partners Commission,銷售合作夥伴佣金, +Sales Payment Summary,銷售付款摘要, +Sales Person,銷售人員, +Sales Person Commission Summary,銷售人員委員會摘要, +Sales Person-wise Transaction Summary,銷售人員相關的交易匯總, +Sales Pipeline,銷售渠道, +Sales Price List,銷售價格表, +Sales Register,銷售登記, +Sales Return,銷貨退回, +Sales Stage,銷售階段, +Sales Summary,銷售摘要, +Sales Tax Template,銷售稅模板, +Sales Taxes and Charges,銷售稅金及費用, +Sales Taxes and Charges Template,營業稅金及費用套版, +Sales Team,銷售團隊, +Sales and Returns,銷售和退貨, +Sales orders are not available for production,銷售訂單不可用於生產, +Same Company is entered more than once,同一家公司進入不止一次, +Same item cannot be entered multiple times.,同一項目不能輸入多次。, +Same supplier has been entered multiple times,同一個供應商已多次輸入, +Sample Size,樣本大小, +Sample quantity {0} cannot be more than received quantity {1},採樣數量{0}不能超過接收數量{1}, +Sanctioned,制裁, +Schedule Date,排定日期, +Scheduled Date,預定日期, +Scorecards,記分卡, +Scrapped,報廢, +Search Sub Assemblies,搜索子組件, +Section Code,部分代碼, +Secured Loans,抵押貸款, +Securities and Deposits,證券及存款, +See all open tickets,查看所有打開的門票, +Select Alternate Item,選擇備用項目, +Select Attribute Values,選擇屬性值, +Select BOM and Qty for Production,選擇BOM和數量生產, +Select Batch No,選擇批號, +Select Brand...,選擇品牌..., +Select Company,選擇公司, +Select Default Supplier,選擇默認供應商, +Select Employees,選擇僱員, +Select Items,選擇項目, +Select Items based on Delivery Date,根據交付日期選擇項目, +Select Items to Manufacture,選擇項目,以製造, +Select Loyalty Program,選擇忠誠度計劃, +Select Possible Supplier,選擇潛在供應商, +Select Quantity,選擇數量, +Select Serial No,選擇序列號, +Select Target Warehouse,選擇目標倉庫, +Select Warehouse...,選擇倉庫..., +Select an account to print in account currency,選擇一個科目以科目貨幣進行打印, +Select change amount account,選擇變化量科目, +Select company first,首先選擇公司, +Select the customer or supplier.,選擇客戶或供應商。, +Selected Price List should have buying and selling fields checked.,選定價目表應該有買入和賣出的字段。, +Sell,賣, +Selling,銷售, +Selling Amount,銷售金額, +Selling Price List,賣價格表, +Selling Rate,賣出率, +Selling Settings,銷售設置, +"Selling must be checked, if Applicable For is selected as {0}",銷售必須進行檢查,如果適用於被選擇為{0}, +Send SMS,發送短信, +Serial No,序列號, +Serial No Service Contract Expiry,序號服務合同到期, +Serial No Status,序列號狀態, +Serial No Warranty Expiry,序列號保修到期, +Serial No and Batch,序列號和批次, +Serial No is mandatory for Item {0},項目{0}的序列號是強制性的, +Serial No {0} does not belong to Delivery Note {1},序列號{0}不屬於送貨單{1}, +Serial No {0} does not belong to Item {1},序列號{0}不屬於項目{1}, +Serial No {0} does not exist,序列號{0}不存在, +Serial No {0} is under maintenance contract upto {1},序列號{0}在維護合約期間內直到{1}, +Serial No {0} is under warranty upto {1},序列號{0}在保修期內直到{1}, +Serial No {0} not found,序列號{0}未找到, +Serial number {0} entered more than once,序號{0}多次輸入, +Series is mandatory,系列是強制性的, +Service Stop Date cannot be after Service End Date,服務停止日期不能在服務結束日期之後, +Service Stop Date cannot be before Service Start Date,服務停止日期不能早於服務開始日期, +Services,服務, +Set New Release Date,設置新的發布日期, +Set as Closed,設置為關閉, +Set as Lost,設為失落, +Set as Open,設置為打開, +Set default inventory account for perpetual inventory,設置永久庫存的默認庫存科目, +Set {0} in asset category {1} or company {2},在資產類別{1}或公司{2}中設置{0}, +"Setting Events to {0}, since the Employee attached to the below Sales Persons does not have a User ID{1}",設置活動為{0},因為附連到下面的銷售者的僱員不具有用戶ID {1}, +Setting defaults,設置默認值, +Setting up Taxes,建立稅, +Share Balance,份額平衡, +Share Transfer,股份轉讓, +Share Type,分享類型, +Shareholder,股東, +Shipments,發貨, +Shipping Address,送貨地址, +"Shipping Address does not have country, which is required for this Shipping Rule",送貨地址沒有國家,這是此送貨規則所必需的, +Shipping Rule,送貨規則, +Shipping Rule Condition,送貨規則條件, +Shipping Rule Country,航運規則國家, +Shipping rule only applicable for Buying,運費規則只適用於購買, +Shipping rule only applicable for Selling,運費規則僅適用於銷售, +Shortage Qty,短缺數量, +Show Cumulative Amount,顯示累計金額, +Show Payment Details,顯示付款詳情, +Show Return Entries,顯示返回條目, +Show Variant Attributes,顯示變體屬性, +Show Variants,顯示變體, +Show exploded view,顯示爆炸視圖, +Show unclosed fiscal year's P&L balances,顯示未關閉的會計年度的盈虧平衡, +Show zero values,顯示零值, +Single Variant,單一變種, +Softwares,軟件, +Source Warehouse,來源倉庫, +Source and Target Location cannot be same,源和目標位置不能相同, +Source and target warehouse cannot be same for row {0},列{0}的來源和目標倉庫不可相同, +Source and target warehouse must be different,源和目標倉庫必須是不同的, +Source of Funds (Liabilities),資金來源(負債), +Source warehouse is mandatory for row {0},列{0}的來源倉是必要的, +Split Issue,拆分問題, +Standard Buying,標準採購, +Standard Selling,標準銷售, +Start Job,開始工作, +Start Year,開始年份, +Start date should be less than end date for Item {0},項目{0}的開始日期必須小於結束日期, +Start date should be less than end date for task {0},開始日期應該小於任務{0}的結束日期, +Status must be one of {0},狀態必須是一個{0}, +Stock,庫存, +Stock Adjustment,庫存調整, +Stock Ageing,存貨帳齡分析表, +Stock Analytics,庫存分析, +Stock Assets,庫存資產, +Stock Available,現貨供應, +Stock Balance,庫存餘額, +Stock Entry,存貨分錄, +Stock Entry Detail,存貨分錄明細, +Stock Entry {0} created,庫存輸入{0}創建, +Stock Entry {0} is not submitted,庫存輸入{0}不提交, +Stock Expenses,庫存費用, +Stock In Hand,庫存在手, +Stock Ledger,庫存總帳, +Stock Ledger Entry,庫存總帳條目, +Stock Levels,庫存水平, +Stock Liabilities,現貨負債, +Stock Manager,庫存管理, +Stock Projected Qty,存貨預計數量, +Stock Qty,庫存數量, +Stock Received But Not Billed,庫存接收,但不付款, +Stock Reconciliation,庫存調整, +Stock Reconciliation Item,庫存調整項目, +Stock Reports,庫存報告, +Stock Settings,庫存設定, +Stock Summary,庫存摘要, +Stock Transactions,庫存交易明細, +Stock UOM,庫存計量單位, +Stock User,庫存用戶, +Stock Value,庫存價值, +Stock cannot be updated against Delivery Note {0},送貨單{0}不能更新庫存, +Stock cannot be updated against Purchase Receipt {0},庫存不能對外購入庫單進行更新{0}, +Stock transactions before {0} are frozen,{0}前的庫存交易被凍結, +"Stopped Work Order cannot be cancelled, Unstop it first to cancel",停止的工作訂單不能取消,先取消它, +Stores,商店, +Sub Assemblies,子組件, +Subcontract,轉包, +Subcontracted Item,轉包項目, +Submit this Work Order for further processing.,提交此工單以進一步處理。, +Subscription,訂閱, +Subscription Invoice,訂閱發票, +Subscription Management,訂閱管理, +Subscription Plan,訂閱計劃, +Subscription Plan Detail,訂閱計劃詳情, +Subscription Settings,訂閱設置, +Subscriptions,訂閱, +Successfully Reconciled,不甘心成功, +Successfully Set Supplier,成功設置供應商, +Summary for this month and pending activities,本月和待活動總結, +Summary for this week and pending activities,本週和待活動總結, +Supplied Qty,附送數量, +Supplier,供應商, +Supplier Group,供應商集團, +Supplier Invoice Date,供應商發票日期, +Supplier Invoice Date cannot be greater than Posting Date,供應商發票的日期不能超過過帳日期更大, +Supplier Invoice No,供應商發票號碼, +Supplier Invoice No exists in Purchase Invoice {0},供應商發票不存在採購發票{0}, +Supplier Name,供應商名稱, +Supplier Part No,供應商部件號, +Supplier Quotation,供應商報價, +Supplier Quotation Item,供應商報價項目, +Supplier Scorecard,供應商記分卡, +Supplier Scorecard Criteria,供應商記分卡標準, +Supplier Scorecard Period,供應商記分卡期, +Supplier Scorecard Scoring Criteria,供應商記分卡評分標準, +Supplier Scorecard Scoring Standing,供應商記分卡, +Supplier Scorecard Scoring Variable,供應商記分卡評分變量, +Supplier Scorecard Standing,供應商記分卡站立, +Supplier Scorecard Variable,供應商記分卡變數, +Supplier {0} not found in {1},在{1}中找不到供應商{0}, +Supplier(s),供應商(S), +Supplier-Wise Sales Analytics,供應商相關的銷售分析, +Support Hour Distribution,支持小時分配, +Support Settings,支持設置, +Support Team,支持團隊, +Support Tickets,支持門票, +TDS Computation Summary,TDS計算摘要, +Target Detail,目標詳細資訊, +Target On,目標在, +Target Warehouse,目標倉庫, +Target warehouse is mandatory for row {0},目標倉庫是強制性的行{0}, +Task,任務, +Task Depends On,任務取決於, +Tasks,任務, +Tax,稅, +Tax Assets,所得稅資產, +"Tax Category has been changed to ""Total"" because all the Items are non-stock items",稅項類別已更改為“合計”,因為所有物品均為非庫存物品, +Tax ID,稅號, +Tax Id: ,稅號:, +Tax Rate,稅率, +Tax Rule,稅務規則, +Tax Rule Conflicts with {0},稅收規範衝突{0}, +Tax Template is mandatory.,稅務模板是強制性的。, +Tax Withholding Account,扣繳稅款科目, +Tax Withholding Category,預扣稅類別, +Tax Withholding Rate,稅收預扣稅率, +Taxable Amount,應稅金額, +Taxes,稅, +Telephone Expenses,電話費, +Temporarily on Hold,暫時擱置, +Temporary,臨時, +Temporary Accounts,臨時科目, +Temporary Opening,臨時開通, +Terms and Conditions,條款和條件, +Territory,領土, +The 'From Package No.' field must neither be empty nor it's value less than 1.,“From Package No.”字段不能為空,也不能小於1。, +The Loyalty Program isn't valid for the selected company,忠誠度計劃對所選公司無效, +The Payment Term at row {0} is possibly a duplicate.,第{0}行的支付條款可能是重複的。, +The amount of {0} set in this payment request is different from the calculated amount of all payment plans: {1}. Make sure this is correct before submitting the document.,此付款申請中設置的{0}金額與所有付款計劃的計算金額不同:{1}。在提交文檔之前確保這是正確的。, +The field From Shareholder cannot be blank,來自股東的字段不能為空, +The field To Shareholder cannot be blank,“股東”字段不能為空, +The fields From Shareholder and To Shareholder cannot be blank,來自股東和股東的字段不能為空, +The folio numbers are not matching,作品集編號不匹配, +The holiday on {0} is not between From Date and To Date,在{0}這個節日之間沒有從日期和結束日期, +The number of shares and the share numbers are inconsistent,股份數量和庫存數量不一致, +The payment gateway account in plan {0} is different from the payment gateway account in this payment request,計劃{0}中的支付閘道科目與此付款請求中的支付閘道科目不同, +The selected BOMs are not for the same item,所選的材料清單並不同樣項目, +The selected item cannot have Batch,所選項目不能批, +The seller and the buyer cannot be the same,賣方和買方不能相同, +The shareholder does not belong to this company,股東不屬於這家公司, +The shares already exist,股份已經存在, +The shares don't exist with the {0},這些份額不存在於{0}, +"There are inconsistencies between the rate, no of shares and the amount calculated",費率,股份數量和計算的金額之間不一致, +There can only be 1 Account per Company in {0} {1},只能有每公司1科目{0} {1}, +"There can only be one Shipping Rule Condition with 0 or blank value for ""To Value""",只能有一個運輸規則條件為0或空值“ To值”, +There is nothing to edit.,無內容可供編輯, +This Item is a Template and cannot be used in transactions. Item attributes will be copied over into the variants unless 'No Copy' is set,這個項目是一個模板,並且可以在交易不能使用。項目的屬性將被複製到變型,除非“不複製”設置, +This Item is a Variant of {0} (Template).,此項目是{0}(模板)的變體。, +This Week's Summary,本週的總結, +This action will stop future billing. Are you sure you want to cancel this subscription?,此操作將停止未來的結算。您確定要取消此訂閱嗎?, +This covers all scorecards tied to this Setup,這涵蓋了與此安裝程序相關的所有記分卡, +This document is over limit by {0} {1} for item {4}. Are you making another {3} against the same {2}?,這份文件是超過限制,通過{0} {1}項{4}。你在做另一個{3}對同一{2}?, +This is a root account and cannot be edited.,這是一個 root 科目,不能被編輯。, +This is a root customer group and cannot be edited.,ERPNext是一個開源的基於Web的ERP系統,通過網路技術,向私人有限公司提供整合的工具,在一個小的組織管理大多數流程。有關Web註釋,或購買託管,想得到更多資訊,請連結, +This is a root department and cannot be edited.,這是根部門,無法編輯。, +This is a root item group and cannot be edited.,這是個根項目群組,且無法被編輯。, +This is a root sales person and cannot be edited.,您可以通過選擇備份頻率啟動和\, +This is a root supplier group and cannot be edited.,這是一個根源供應商組,無法編輯。, +This is a root territory and cannot be edited.,集團或Ledger ,借方或貸方,是特等科目, +This is an example website auto-generated from ERPNext,這是一個由 ERPNext 自動產生的範例網站, +This is based on stock movement. See {0} for details,這是基於庫存移動。見{0}詳情, +This is based on the Time Sheets created against this project,這是基於對這個項目產生的考勤表, +This is based on transactions against this Sales Person. See timeline below for details,這是基於針對此銷售人員的交易。請參閱下面的時間表了解詳情, +Time Tracking,時間跟踪, +Time(in mins),時間(分鐘), +Timer,計時器, +Timer exceeded the given hours.,計時器超出了指定的小時數, +Timesheet,時間表, +Timesheet Detail,詳細時間表, +Timesheet for tasks.,時間表的任務。, +Timesheet {0} is already completed or cancelled,時間表{0}已完成或取消, +Timesheets,時間表, +To Bill,發票待輸入, +To Date cannot be less than From Date,迄今不能少於起始日期, +To Date should be within the Fiscal Year. Assuming To Date = {0},日期應該是在財政年度內。假設終止日期= {0}, +To Datetime,以日期時間, +To Deliver,為了提供, +To Deliver and Bill,準備交貨及開立發票, +To Fiscal Year,到財政年度, +To Receive,接受, +To Receive and Bill,準備收料及接收發票, +To Time,要時間, +To Warehouse,到倉庫, +To create a Payment Request reference document is required,要創建付款請求參考文檔是必需的, +To date cannot be before from date,無效的主名稱, +"To include tax in row {0} in Item rate, taxes in rows {1} must also be included",要包括稅款,行{0}項率,稅收行{1}也必須包括在內, +"To merge, following properties must be same for both items",若要合併,以下屬性必須為這兩個項目是相同的, +Total (Credit),總(信用), +Total (Without Tax),總計(不含稅), +Total Achieved,實現總計, +Total Actual,實際總計, +Total Amount,總金額, +Total Applicable Charges in Purchase Receipt Items table must be same as Total Taxes and Charges,在外購入庫單項目表總的相關費用必須是相同的總稅費, +Total Budget,預算總額, +Total Commission,佣金總計, +Total Credit/ Debit Amount should be same as linked Journal Entry,總信用/借方金額應與鏈接的日記帳分錄相同, +Total Debit must be equal to Total Credit. The difference is {0},借方總額必須等於貸方總額。差額為{0}, +Total Invoiced Amount,發票總金額, +Total Order Considered,總訂貨考慮, +Total Order Value,總訂單價值, +Total Outgoing,出貨總計, +Total Outstanding,總計傑出, +Total Outstanding Amount,未償還總額, +Total Paid Amount,總支付金額, +Total Payment Amount in Payment Schedule must be equal to Grand / Rounded Total,支付計劃中的總付款金額必須等於大/圓, +Total Qty,總數量, +Total Quantity,總數(量, +Total Revenue,總收入, +Total Stock Summary,總庫存總結, +Total Target,總目標, +Total Tax,總稅收, +Total Variance,總方差, +Total advance ({0}) against Order {1} cannot be greater than the Grand Total ({2}),總的超前({0})對二階{1}不能大於總計({2}), +Total {0} ({1}),總{0}({1}), +"Total {0} for all items is zero, may be you should change 'Distribute Charges Based On'",共有{0}所有項目為零,可能是你應該“基於分佈式費用”改變, +Total(Qty),總計(數量), +Transaction Type,交易類型, +Transaction currency must be same as Payment Gateway currency,交易貨幣必須與支付網關貨幣, +Transaction not allowed against stopped Work Order {0},不允許對停止的工單{0}進行交易, +Transaction reference no {0} dated {1},交易參考編號{0}日{1}, +Transfer,轉讓, +Transfer Asset,轉讓資產, +Transfer Type,轉移類型, +Transfered,轉移, +Transferred Qty,轉讓數量, +Travel Expenses,差旅費, +Tree Type,樹類型, +Trial Balance,試算表, +Trial Balance for Party,試算表的派對, +Trial Period End Date Cannot be before Trial Period Start Date,試用期結束日期不能在試用期開始日期之前, +Trialling,試用, +Types of activities for Time Logs,活動類型的時間記錄, +UOM Category,UOM類別, +UOM Conversion Detail,計量單位換算詳細, +UOM Conversion Factor,計量單位換算係數, +UOM Conversion factor is required in row {0},計量單位換算係數是必需的行{0}, +Unable to find exchange rate for {0} to {1} for key date {2}. Please create a Currency Exchange record manually,無法為關鍵日期{2}查找{0}到{1}的匯率。請手動創建貨幣兌換記錄, +Unable to find score starting at {0}. You need to have standing scores covering 0 to 100,無法從{0}開始獲得分數。你需要有0到100的常規分數, +Unallocated Amount,未分配金額, +Unblock Invoice,取消屏蔽發票, +Unclosed Fiscal Years Profit / Loss (Credit),未關閉的財年利潤/損失(信用), +Unit of Measure,計量單位, +Unit of Measure {0} has been entered more than once in Conversion Factor Table,計量單位{0}已經進入不止一次在轉換係數表, +Unsecured Loans,無抵押貸款, +Unsubscribe from this Email Digest,從該電子郵件摘要退訂, +Unverified Webhook Data,未經驗證的Webhook數據, +Update Account Name / Number,更新帳戶名稱/號碼, +Update Account Number / Name,更新帳號/名稱, +Update BOM Cost Automatically,自動更新BOM成本, +Update Clearance Date,更新日期間隙, +Update Items,更新項目, +User ID not set for Employee {0},用戶ID不為員工設置{0}, +User Remark,用戶備註, +User {0} does not exist,用戶{0}不存在, +User {0} doesn't have any default POS Profile. Check Default at Row {1} for this User.,用戶{0}沒有任何默認的POS配置文件。檢查此用戶的行{1}處的默認值。, +User {0} is already assigned to Employee {1},用戶{0}已經被分配給員工{1}, +Utility Expenses,公用事業費用, +Validity period of this quotation has ended.,此報價的有效期已經結束。, +Valuation Rate,估值率, +Valuation Rate is mandatory if Opening Stock entered,估價費用是強制性的,如果打開庫存進入, +Valuation type charges can not marked as Inclusive,估值類型罪名不能標記為包容性, +Value After Depreciation,折舊後, +Value Proposition,價值主張, +Value for Attribute {0} must be within the range of {1} to {2} in the increments of {3} for Item {4},為屬性{0}值必須的範圍內{1}到{2}中的增量{3}為項目{4}, +Value or Qty,價值或數量, +Variant,變種, +Variant Details Report,變體詳細信息報告, +Variant Field,變種場, +Variant creation has been queued.,變體創建已經排隊。, +Vehicle,車輛, +View Chart of Accounts,查看會計科目表, +View Leads,查看訊息, +View Ledger,查看總帳, +View Now,立即觀看, +Visit the forums,訪問論壇, +Voucher #,憑證#, +Voucher No,憑證編號, +Voucher Type,憑證類型, +WIP Warehouse,WIP倉庫, +Warehouse can not be deleted as stock ledger entry exists for this warehouse.,這個倉庫不能被刪除,因為庫存分錄帳尚存在。, +Warehouse cannot be changed for Serial No.,倉庫不能改變序列號, +Warehouse is mandatory,倉庫是強制性的, +Warehouse not found in the system,倉庫系統中未找到, +Warehouse required for stock Item {0},倉庫需要現貨產品{0}, +Warehouse wise Item Balance Age and Value,倉庫明智的項目平衡年齡和價值, +Warehouse {0} can not be deleted as quantity exists for Item {1},倉庫{0} 不能被刪除因為項目{1}還有庫存, +Warehouse {0} does not belong to company {1},倉庫{0}不屬於公司{1}, +Warehouses,倉庫, +Warehouses with child nodes cannot be converted to ledger,與子節點倉庫不能轉換為分類賬, +Warehouses with existing transaction can not be converted to group.,與現有的交易倉庫不能轉換為組。, +Warehouses with existing transaction can not be converted to ledger.,與現有的交易倉庫不能轉換到總帳。, +Warning: Another {0} # {1} exists against stock entry {2},警告:另一個{0}#{1}存在對庫存分錄{2}, +Warning: Material Requested Qty is less than Minimum Order Qty,警告:物料需求的數量低於最少訂購量, +Warning: Sales Order {0} already exists against Customer's Purchase Order {1},警告:銷售訂單{0}已經存在針對客戶的採購訂單{1}, +Warranty,保證, +Warranty Claim,保修索賠, +Website Item Group,網站項目群組, +What do you need help with?,你有什麼需要幫助的?, +Wire Transfer,電匯, +Work In Progress,在製品, +Work Order,工作指示, +Work Order Item,工作訂單項目, +Work Order Operation,工作訂單操作, +Work Order Stock Report,工單庫存報表, +Work Order cannot be raised against a Item Template,工作訂單不能針對項目模板產生, +Work Order has been {0},工單已{0}, +Work Order not created,工作訂單未創建, +Work Orders Created: {0},創建的工單:{0}, +Work Orders in Progress,工作訂單正在進行中, +Work-in-Progress Warehouse is required before Submit,提交之前,需要填入在製品倉庫, +Working Hours,工作時間, +Workstation Working Hour,工作站工作時間, +Workstation is closed on the following dates as per Holiday List: {0},工作站在以下日期關閉按假日列表:{0}, +Wrapping up,包起來, +Write Off,註銷項款, +Wrong Password,密碼錯誤, +Year start date or end date is overlapping with {0}. To avoid please set company,新年的開始日期或結束日期與{0}重疊。為了避免請將公司, +You are not authorized to add or update entries before {0},你無權添加或更新{0}之前的條目, +You are not authorized to set Frozen value,您無權設定值凍結, +You can also copy-paste this link in your browser,您也可以複製粘貼此鏈接到瀏覽器, +You can not enter current voucher in 'Against Journal Entry' column,在您不能輸入電流券“對日記帳分錄”專欄, +You can only have Plans with the same billing cycle in a Subscription,您只能在訂閱中擁有相同結算週期的計劃, +You can only redeem max {0} points in this order.,您只能按此順序兌換最多{0}個積分。, +You cannot credit and debit same account at the same time,你無法將貸方與借方在同一時間記在同一科目, +You cannot delete Project Type 'External',您不能刪除項目類型“外部”, +You cannot edit root node.,您不能編輯根節點。, +You cannot restart a Subscription that is not cancelled.,您無法重新啟動未取消的訂閱。, +You don't have enough Loyalty Points to redeem,您沒有獲得忠誠度積分兌換, +You have already selected items from {0} {1},您已經選擇從項目{0} {1}, +You have been invited to collaborate on the project: {0},您已被邀請在項目上進行合作:{0}, +Your order is out for delivery!,您的訂單已發貨!, +ZIP Code,郵政編碼, +{0} '{1}' not in Fiscal Year {2},{0}“ {1}”不在財政年度{2}, +{0} ({1}) cannot be greater than planned quantity ({2}) in Work Order {3},{0}({1})不能大於計畫數量 {3} 在工作訂單中({2}), +{0} against Bill {1} dated {2},{0}針對帳單{1}日期{2}, +{0} against Purchase Order {1},{0}針對採購訂單{1}, +{0} against Sales Invoice {1},{0}針對銷售發票{1}, +{0} against Sales Order {1},{0}針對銷售訂單{1}, +{0} asset cannot be transferred,{0}資產不得轉讓, +{0} can not be negative,{0}不能為負數, +{0} created,{0}已新增, +"{0} currently has a {1} Supplier Scorecard standing, and Purchase Orders to this supplier should be issued with caution.",{0}目前擁有{1}供應商記分卡,而採購訂單應謹慎提供給供應商。, +"{0} currently has a {1} Supplier Scorecard standing, and RFQs to this supplier should be issued with caution.",{0}目前擁有{1}供應商記分卡,並且謹慎地向該供應商發出詢價。, +{0} does not belong to Company {1},{0}不屬於公司{1}, +{0} entered twice in Item Tax,{0}輸入兩次項目稅, +{0} for {1},{0}for {1}, +{0} is blocked so this transaction cannot proceed,{0}被阻止,所以此事務無法繼續, +{0} is mandatory for Item {1},{0}是強制性的項目{1}, +{0} is mandatory. Maybe Currency Exchange record is not created for {1} to {2},{0}是強制性的。可能沒有為{1}到{2}創建貨幣兌換記錄, +{0} is mandatory. Maybe Currency Exchange record is not created for {1} to {2}.,{0}是強制性的。也許外幣兌換記錄為{1}到{2}尚未建立。, +{0} is not a stock Item,{0}不是庫存項目, +{0} is on hold till {1},{0}一直保持到{1}, +{0} items in progress,正在進行{0}項目, +{0} items produced,生產{0}項目, +{0} must be negative in return document,{0}必須返回文檔中負, +{0} not allowed to transact with {1}. Please change the Company.,不允許{0}與{1}進行交易。請更改公司。, +{0} payment entries can not be filtered by {1},{0}付款分錄不能由{1}過濾, +{0} units of {1} needed in {2} on {3} {4} for {5} to complete this transaction.,{0} {1}在需要{2}在{3} {4}:{5}來完成這一交易單位。, +{0} units of {1} needed in {2} to complete this transaction.,{0}單位{1}在{2}完成此交易所需。, +{0} valid serial nos for Item {1},{0}項目{1}的有效的序號, +{0} variants created.,創建了{0}個變體。, +{0} {1} created,已創建{0} {1}, +{0} {1} has been modified. Please refresh.,{0} {1} 已修改。請更新。, +{0} {1} has not been submitted so the action cannot be completed,"{0} {1} 尚未提交, 因此無法完成操作", +"{0} {1} is associated with {2}, but Party Account is {3}","{0} {1} 與 {2} 關聯, 但當事方科目為 {3}", +{0} {1} is cancelled or closed,{0} {1} 被取消或結案, +{0} {1} is cancelled so the action cannot be completed,{0} {1} 被取消,因此無法完成操作, +{0} {1} is closed,{0} {1}關閉, +{0} {1} is disabled,{0} {1}被禁用, +{0} {1} is frozen,{0} {1}被凍結, +{0} {1} is fully billed,{0} {1}}已開票, +{0} {1} is not active,{0} {1}是不活動, +{0} {1} is not associated with {2} {3},{0} {1} 未與 {2} {3} 關聯, +{0} {1} must be submitted,{0} {1}必須提交, +{0} {1} status is {2},{0} {1}的狀態為{2}, +{0} {1}: 'Profit and Loss' type account {2} not allowed in Opening Entry,{0} {1}:“損益”科目類型{2}不允許進入開, +{0} {1}: Account {2} does not belong to Company {3},{0} {1}科目{2}不屬於公司{3}, +{0} {1}: Account {2} is inactive,{0} {1}科目{2}無效, +{0} {1}: Accounting Entry for {2} can only be made in currency: {3},{0} {1}在{2}會計分錄只能在貨幣言:{3}, +{0} {1}: Cost Center is mandatory for Item {2},{0} {1}:成本中心是強制性的項目{2}, +{0} {1}: Cost Center {2} does not belong to Company {3},{0} {1}:成本中心{2}不屬於公司{3}, +{0} {1}: Customer is required against Receivable account {2},{0} {1}:需要客戶對應收帳款{2}, +{0} {1}: Either debit or credit amount is required for {2},{0} {1}:無論是借方或貸方金額需要{2}, +{0} {1}: Supplier is required against Payable account {2},{0} {1}:需要對供應商應付帳款{2}, diff --git a/erpnext/translations/zh.csv b/erpnext/translations/zh.csv index b5cadad9ff7..52df5a220ba 100644 --- a/erpnext/translations/zh.csv +++ b/erpnext/translations/zh.csv @@ -8743,3 +8743,48 @@ WhatsApp,WhatsApp的, Make a call,打个电话, Approve,同意, Reject,拒绝, + Address, 地址, + Amount, 数额, + Is Child Table, 是否为子表, + Name, 名称, + Rate, 单价, + Summary, 概要, +"""SN-01::10"" for ""SN-01"" to ""SN-10""",SN-01::10 代表 SN-01 到 SN-10, +# In Stock,# 库存数量, +# Req'd Items,# 所需物料, +% Finished Item Quantity,% 成品数量, +% Occupied,% 已使用, +% Picked,% 已拣货, +% Process Loss,% 工艺损耗, +% Returned,% 已退货, +'Account' in the Accounting section of Customer {0},客户 {0} 的会计部分中的“账目”, +'Allow Multiple Sales Orders Against a Customer's Purchase Order',“允许针对指定客户的采购订单创建多个销售订单”, +'Default {0} Account' in Company {1},公司 {1} 的“默认 {0} 账目”, +'To Package No.' cannot be less than 'From Package No.',“结束包装编号”不能小于“起始包装编号”, +(C) Total Qty in Queue,(C) 队列中的总数量, +(C) Total qty in queue,(C) 队列中的总数量, +0-30 Days,0-30 天, +30-60 Days,30-60 天, +60-90 Days,60-90 天, +90 Above,90 以上, +"
Other Details
","
其他详细信息
", +"
No Matching Bank Transactions Found
","
未找到匹配的银行交易
", +"Masters & Reports","雇主 & 报告", +Allow,允许, +CC,抄送, +Cannot {0} from {1} without any negative outstanding invoice,无法从 {1} 中 {0} 而没有任何负的未付发票, +Convert to Group,转换为组,Warehouse +Count,计数, +Custom,自定义, +Discount cannot be greater than 100%.,折扣不能超过 100%., +DocField,文档字段, +Event,事件, +Filter,过滤, +General Ledger,总帐,Warehouse +Goals,绩效指标, +Half-yearly,每半年, +Item {0} does not exist.,物料{0}不存在., +Links,链接, +Rate of Depreciation (%),折旧率 (%), +Rejected ,已拒绝 , +Version,版本, From 9554a49bbd97798b4d688741a1ca633f02ee280e Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Mon, 10 Mar 2025 12:46:45 +0530 Subject: [PATCH 1374/1614] fix: not able to save work order with alternative item (cherry picked from commit 6ca1f9bc73ecf38380bf3cf5efa3439b682e9c16) (cherry picked from commit ac7fc608aac7446bd5a011a72552eb2e3d23480d) --- erpnext/manufacturing/doctype/work_order/work_order.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/work_order/work_order.py b/erpnext/manufacturing/doctype/work_order/work_order.py index 721af21be99..cd987099eb8 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order.py +++ b/erpnext/manufacturing/doctype/work_order/work_order.py @@ -164,7 +164,7 @@ class WorkOrder(Document): if self.source_warehouse: self.set_warehouses() - validate_uom_is_integer(self, "stock_uom", ["qty", "produced_qty"]) + validate_uom_is_integer(self, "stock_uom", ["required_qty"]) self.set_required_items(reset_only_qty=len(self.get("required_items"))) From 4dfdb2b0a1d698fa45d6487d30feab61c3e66b57 Mon Sep 17 00:00:00 2001 From: Asmita Hase Date: Mon, 10 Mar 2025 17:06:03 +0530 Subject: [PATCH 1375/1614] fix: clear cashe on employee hierarchy change to reflect updated permissions (cherry picked from commit 6789578b27b146a6ce0cd0338f345f37d4f3c20e) --- erpnext/setup/doctype/employee/employee.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/setup/doctype/employee/employee.py b/erpnext/setup/doctype/employee/employee.py index ad062cd6473..93af08d365f 100755 --- a/erpnext/setup/doctype/employee/employee.py +++ b/erpnext/setup/doctype/employee/employee.py @@ -78,6 +78,7 @@ class Employee(NestedSet): def on_update(self): self.update_nsm_model() + frappe.clear_cache() if self.user_id: self.update_user() self.update_user_permissions() From 428aedc29c599c076a53c2c083ad8ef3a89b05c5 Mon Sep 17 00:00:00 2001 From: venkat102 Date: Thu, 6 Mar 2025 18:33:53 +0530 Subject: [PATCH 1376/1614] fix(account): update account number from parent company (cherry picked from commit 4a4894bc01c132ca46572591da6cd8db31e9ec30) --- erpnext/accounts/doctype/account/account.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/account/account.py b/erpnext/accounts/doctype/account/account.py index 4098084a802..2f1ddb2f96f 100644 --- a/erpnext/accounts/doctype/account/account.py +++ b/erpnext/accounts/doctype/account/account.py @@ -502,7 +502,7 @@ def update_account_number(name, account_name, account_number=None, from_descenda "name", ) - if old_name: + if old_name and not from_descendant: # same account in parent company exists allow_child_account_creation = _("Allow Account Creation Against Child Company") From ac97489a32deb33442645bd32a92f821eaa9fb75 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Tue, 11 Mar 2025 10:13:34 +0530 Subject: [PATCH 1377/1614] fix: filter batches that going to be zero (cherry picked from commit aba512c1c669c3b108b1d60c521499a2f11575e2) --- .../serial_and_batch_bundle.py | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) 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 c37051e1e2b..d30cf84d93e 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 @@ -2094,6 +2094,9 @@ def get_auto_batch_nos(kwargs): picked_batches, ) + if available_batches and kwargs.get("posting_date"): + filter_zero_near_batches(available_batches, kwargs) + if not kwargs.consider_negative_batches: available_batches = list(filter(lambda x: x.qty > 0, available_batches)) @@ -2103,6 +2106,26 @@ def get_auto_batch_nos(kwargs): return get_qty_based_available_batches(available_batches, qty) +def filter_zero_near_batches(available_batches, kwargs): + kwargs.batch_no = [d.batch_no for d in available_batches] + + del kwargs["posting_date"] + del kwargs["posting_time"] + + available_batches_in_future = get_available_batches(kwargs) + for batch in available_batches: + if batch.qty <= 0: + continue + + for future_batch in available_batches_in_future: + if ( + batch.batch_no == future_batch.batch_no + and batch.warehouse == future_batch.warehouse + and future_batch.qty <= 0 + ): + batch.qty = 0 + + def get_qty_based_available_batches(available_batches, qty): batches = [] for batch in available_batches: From f96848a3b9c02997a680161327919ab0b841b21d Mon Sep 17 00:00:00 2001 From: vishakhdesai Date: Mon, 10 Feb 2025 16:09:54 +0530 Subject: [PATCH 1378/1614] fix: set correct account currency for deferred expence account in PI (cherry picked from commit 398083853cf131eb6d14715dbe8eda45903f2308) --- erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index 5092c365fef..51b10932557 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -969,7 +969,6 @@ class PurchaseInvoice(BuyingController): for item in self.get("items"): if flt(item.base_net_amount): - account_currency = get_account_currency(item.expense_account) if item.item_code: frappe.get_cached_value("Item", item.item_code, "asset_category") @@ -978,6 +977,7 @@ class PurchaseInvoice(BuyingController): and self.auto_accounting_for_stock and (item.item_code in stock_items or item.is_fixed_asset) ): + account_currency = get_account_currency(item.expense_account) # warehouse account warehouse_debit_amount = self.make_stock_adjustment_entry( gl_entries, item, voucher_wise_stock_value, account_currency @@ -1112,6 +1112,7 @@ class PurchaseInvoice(BuyingController): else item.deferred_expense_account ) + account_currency = get_account_currency(expense_account) amount, base_amount = self.get_amount_and_base_amount(item, None) if provisional_accounting_for_non_stock_items: From 229f4d3d92e9db12afc2ed6c5d99cadc304dc4f0 Mon Sep 17 00:00:00 2001 From: Bhavan23 Date: Wed, 5 Mar 2025 20:09:21 +0530 Subject: [PATCH 1379/1614] fix: make 'company_tax_id' and 'company_fiscal_code' as mandatory (cherry picked from commit abd044eb0d0175f849777d24c2d7ec8401eb480d) --- erpnext/regional/italy/utils.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/erpnext/regional/italy/utils.py b/erpnext/regional/italy/utils.py index 43ff59a1006..cec037e3892 100644 --- a/erpnext/regional/italy/utils.py +++ b/erpnext/regional/italy/utils.py @@ -261,12 +261,11 @@ def sales_invoice_validate(doc): doc.company_tax_id = frappe.get_cached_value("Company", doc.company, "tax_id") doc.company_fiscal_code = frappe.get_cached_value("Company", doc.company, "fiscal_code") - if not doc.company_tax_id and not doc.company_fiscal_code: + if not doc.company_tax_id or not doc.company_fiscal_code: frappe.throw( - _("Please set either the Tax ID or Fiscal Code on Company '%s'" % doc.company), + _(f"Please set both the Tax ID and Fiscal Code on Company {doc.company}"), title=_("E-Invoicing Information Missing"), ) - # Validate customer details customer = frappe.get_doc("Customer", doc.customer) From 31dc6021e2a4200a7d7f90378f0c5b7a3e94ecbd Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 11 Mar 2025 16:55:04 +0530 Subject: [PATCH 1380/1614] chore: translatable strings (cherry picked from commit 121798ba857350bfdb594d824ea8d158fc15628d) --- erpnext/regional/italy/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/regional/italy/utils.py b/erpnext/regional/italy/utils.py index cec037e3892..d996ff9b2ac 100644 --- a/erpnext/regional/italy/utils.py +++ b/erpnext/regional/italy/utils.py @@ -263,7 +263,7 @@ def sales_invoice_validate(doc): doc.company_fiscal_code = frappe.get_cached_value("Company", doc.company, "fiscal_code") if not doc.company_tax_id or not doc.company_fiscal_code: frappe.throw( - _(f"Please set both the Tax ID and Fiscal Code on Company {doc.company}"), + _("Please set both the Tax ID and Fiscal Code on Company {0}").format(doc.company), title=_("E-Invoicing Information Missing"), ) # Validate customer details From ee3feba3860f4d03ecacc4f72a22d2f13cf21268 Mon Sep 17 00:00:00 2001 From: chethank1407 Date: Sat, 8 Mar 2025 13:04:50 +0530 Subject: [PATCH 1381/1614] chore: rename print and stationery account (cherry picked from commit 615997b77496fe207867a543c2d9d46a5e8db12c) --- .../verified/in_standard_chart_of_accounts.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/in_standard_chart_of_accounts.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/in_standard_chart_of_accounts.json index 4d807b09c33..e666464a371 100644 --- a/erpnext/accounts/doctype/account/chart_of_accounts/verified/in_standard_chart_of_accounts.json +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/in_standard_chart_of_accounts.json @@ -98,7 +98,7 @@ "Office Maintenance Expenses": {}, "Office Rent": {}, "Postal Expenses": {}, - "Print and Stationary": {}, + "Print and Stationery": {}, "Rounded Off": { "account_type": "Round Off" }, From aad8c885322084dffd1d5a0e4309caadab968ec8 Mon Sep 17 00:00:00 2001 From: barredterra <14891507+barredterra@users.noreply.github.com> Date: Tue, 11 Mar 2025 17:11:35 +0100 Subject: [PATCH 1382/1614] ci: ignore PRs labeled with "skip-release-notes" when generating release notes (cherry picked from commit 57007bf937d93ce0c9be2821c7cd90e873828e21) --- .github/release.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .github/release.yml diff --git a/.github/release.yml b/.github/release.yml new file mode 100644 index 00000000000..c043f44b6fe --- /dev/null +++ b/.github/release.yml @@ -0,0 +1,4 @@ +changelog: + exclude: + labels: + - skip-release-notes From 0d044bc5bb075fc8cb333cea6ac292f04d977986 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Tue, 11 Mar 2025 21:18:18 +0530 Subject: [PATCH 1383/1614] fix: sla fields patch (cherry picked from commit d653899372e5d84560c7078a2090db2abd4490ac) --- erpnext/patches/v15_0/rename_sla_fields.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/patches/v15_0/rename_sla_fields.py b/erpnext/patches/v15_0/rename_sla_fields.py index e5e69e0921e..6a7439ad257 100644 --- a/erpnext/patches/v15_0/rename_sla_fields.py +++ b/erpnext/patches/v15_0/rename_sla_fields.py @@ -9,10 +9,10 @@ def execute(): if doctype == "Issue": continue - if frappe.db.exists("Custom Field", {"fieldname": doctype + "-resolution_by"}): + if frappe.db.exists("Custom Field", {"name": doctype + "-resolution_by"}): rename_fieldname(doctype + "-resolution_by", "sla_resolution_by") - if frappe.db.exists("Custom Field", {"fieldname": doctype + "-resolution_date"}): + if frappe.db.exists("Custom Field", {"name": doctype + "-resolution_date"}): rename_fieldname(doctype + "-resolution_date", "sla_resolution_date") rename_field("Issue", "resolution_by", "sla_resolution_by") From 73f11cf19e98d382e4361686bd505fa16e067f2a Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Wed, 12 Mar 2025 00:03:08 +0530 Subject: [PATCH 1384/1614] fix: rename sla fields patch (cherry picked from commit b6c18849c5a7ae8065e1e1be686a50a590213fab) --- erpnext/patches/v15_0/rename_sla_fields.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/patches/v15_0/rename_sla_fields.py b/erpnext/patches/v15_0/rename_sla_fields.py index 6a7439ad257..0c6d3560b8b 100644 --- a/erpnext/patches/v15_0/rename_sla_fields.py +++ b/erpnext/patches/v15_0/rename_sla_fields.py @@ -4,7 +4,7 @@ from frappe.model.utils.rename_field import rename_field def execute(): - doctypes = frappe.get_all("Service Level Agreement", pluck="document_type") + doctypes = list(set(frappe.get_all("Service Level Agreement", pluck="document_type"))) for doctype in doctypes: if doctype == "Issue": continue From db6ae61935e90c2e76667be8101ef49f6875ba22 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Tue, 11 Mar 2025 22:02:23 +0530 Subject: [PATCH 1385/1614] fix: error in production analytics report (cherry picked from commit 03e66468f6683f5efc0c2920e12a595ef041ef97) --- .../report/production_analytics/production_analytics.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/manufacturing/report/production_analytics/production_analytics.py b/erpnext/manufacturing/report/production_analytics/production_analytics.py index 1c4082233e1..5c84a2dc8d1 100644 --- a/erpnext/manufacturing/report/production_analytics/production_analytics.py +++ b/erpnext/manufacturing/report/production_analytics/production_analytics.py @@ -51,9 +51,9 @@ def get_periodic_data(filters, entry): ]: if d.status in ["Not Started", "Closed", "Stopped"]: periodic_data = update_periodic_data(periodic_data, d.status, period) - elif today() > getdate(d.planned_end_date): + elif getdate(today()) > getdate(d.planned_end_date): periodic_data = update_periodic_data(periodic_data, "Overdue", period) - elif today() < getdate(d.planned_end_date): + elif getdate(today()) < getdate(d.planned_end_date): periodic_data = update_periodic_data(periodic_data, "Pending", period) if ( From 5edbd8851ab6b75cc591abe0a46cb1af3c34f0be Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Wed, 12 Mar 2025 10:34:20 +0530 Subject: [PATCH 1386/1614] fix: rename sla fields patch (#46465) * fix: rename sla fields patch * fix: rerun patch (cherry picked from commit 8bce42e63392e57defee2bbbfac9bac62be335a0) # Conflicts: # erpnext/patches.txt --- erpnext/patches.txt | 6 ++++++ erpnext/patches/v15_0/rename_sla_fields.py | 10 +++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 505eb81e4e9..fb2dca2f384 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -400,4 +400,10 @@ erpnext.patches.v15_0.rename_sla_fields erpnext.patches.v15_0.update_query_report erpnext.patches.v15_0.rename_field_from_rate_difference_to_amount_difference erpnext.patches.v15_0.recalculate_amount_difference_field +<<<<<<< HEAD +======= +erpnext.patches.v15_0.rename_sla_fields #2025-03-12 +erpnext.stock.doctype.stock_ledger_entry.patches.ensure_sle_indexes +erpnext.patches.v15_0.update_query_report +>>>>>>> 8bce42e633 (fix: rename sla fields patch (#46465)) erpnext.patches.v15_0.set_purchase_receipt_row_item_to_capitalization_stock_item diff --git a/erpnext/patches/v15_0/rename_sla_fields.py b/erpnext/patches/v15_0/rename_sla_fields.py index 0c6d3560b8b..1f4fc1be311 100644 --- a/erpnext/patches/v15_0/rename_sla_fields.py +++ b/erpnext/patches/v15_0/rename_sla_fields.py @@ -4,15 +4,19 @@ from frappe.model.utils.rename_field import rename_field def execute(): - doctypes = list(set(frappe.get_all("Service Level Agreement", pluck="document_type"))) + doctypes = frappe.get_all("Service Level Agreement", pluck="document_type", distinct=True) for doctype in doctypes: if doctype == "Issue": continue - if frappe.db.exists("Custom Field", {"name": doctype + "-resolution_by"}): + if frappe.db.exists( + "Custom Field", {"name": doctype + "-resolution_by", "fieldname": "resolution_by"} + ): rename_fieldname(doctype + "-resolution_by", "sla_resolution_by") - if frappe.db.exists("Custom Field", {"name": doctype + "-resolution_date"}): + if frappe.db.exists( + "Custom Field", {"name": doctype + "-resolution_date", "fieldname": "resolution_date"} + ): rename_fieldname(doctype + "-resolution_date", "sla_resolution_date") rename_field("Issue", "resolution_by", "sla_resolution_by") From 24678b0e24b256c5d733fa745302087afca3af84 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 12 Mar 2025 10:38:26 +0530 Subject: [PATCH 1387/1614] chore: conflicts --- erpnext/patches.txt | 6 ------ 1 file changed, 6 deletions(-) diff --git a/erpnext/patches.txt b/erpnext/patches.txt index fb2dca2f384..5e657df44dc 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -396,14 +396,8 @@ erpnext.patches.v14_0.disable_add_row_in_gross_profit erpnext.patches.v15_0.set_difference_amount_in_asset_value_adjustment erpnext.patches.v14_0.update_posting_datetime erpnext.stock.doctype.stock_ledger_entry.patches.ensure_sle_indexes -erpnext.patches.v15_0.rename_sla_fields erpnext.patches.v15_0.update_query_report erpnext.patches.v15_0.rename_field_from_rate_difference_to_amount_difference erpnext.patches.v15_0.recalculate_amount_difference_field -<<<<<<< HEAD -======= erpnext.patches.v15_0.rename_sla_fields #2025-03-12 -erpnext.stock.doctype.stock_ledger_entry.patches.ensure_sle_indexes -erpnext.patches.v15_0.update_query_report ->>>>>>> 8bce42e633 (fix: rename sla fields patch (#46465)) erpnext.patches.v15_0.set_purchase_receipt_row_item_to_capitalization_stock_item From 13711993fe3687db53579eedb6875355f9d2b74c Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 12 Mar 2025 11:05:08 +0530 Subject: [PATCH 1388/1614] fix(payment entry): fetch default bank account based on company (backport #46379) (#46471) fix(payment entry): fetch default bank account based on company (#46379) (cherry picked from commit b72f6f5a3d61f1a1846588de102047b1e17a3fdb) Co-authored-by: Venkatesh <47534423+venkat102@users.noreply.github.com> --- erpnext/accounts/doctype/payment_entry/payment_entry.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index 5c9f855ea5b..fe9e6e5f107 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -2891,7 +2891,9 @@ def get_payment_entry( pe.paid_amount = paid_amount pe.received_amount = received_amount pe.letter_head = doc.get("letter_head") - pe.bank_account = frappe.db.get_value("Bank Account", {"is_company_account": 1, "is_default": 1}, "name") + pe.bank_account = frappe.db.get_value( + "Bank Account", {"is_company_account": 1, "is_default": 1, "company": doc.company}, "name" + ) if dt in ["Purchase Order", "Sales Order", "Sales Invoice", "Purchase Invoice"]: pe.project = doc.get("project") or reduce( From 3cef94e2edab9abf5d27b687f86b98b688ce3faa Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 12 Mar 2025 11:05:24 +0530 Subject: [PATCH 1389/1614] fix: validate last_gl_update exists before comparing (backport #46464) (#46468) fix: validate last_gl_update exists before comparing (#46464) (cherry picked from commit 0a5ca0c35f92a52a5236d8fd08fb4a107585c2e0) Co-authored-by: Dany Robert --- erpnext/accounts/doctype/account/account.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/erpnext/accounts/doctype/account/account.py b/erpnext/accounts/doctype/account/account.py index 2f1ddb2f96f..3e026e104ad 100644 --- a/erpnext/accounts/doctype/account/account.py +++ b/erpnext/accounts/doctype/account/account.py @@ -607,6 +607,7 @@ def _ensure_idle_system(): if frappe.flags.in_test: return + last_gl_update = None try: # We also lock inserts to GL entry table with for_update here. last_gl_update = frappe.db.get_value("GL Entry", {}, "modified", for_update=True, wait=False) @@ -614,6 +615,9 @@ def _ensure_idle_system(): # wait=False fails immediately if there's an active transaction. last_gl_update = add_to_date(None, seconds=-1) + if not last_gl_update: + return + if last_gl_update > add_to_date(None, minutes=-5): frappe.throw( _( From a4b8b4c7714a0b16c56f9066dbebab48f822a76d Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 12 Mar 2025 11:41:41 +0530 Subject: [PATCH 1390/1614] fix: credit note creation during pos invoice consolidation (backport #46277) (#46469) * fix: credit note creation during pos invoice consolidation (#46277) * fix: credit note creation during pos invoice consolidation * fix: added check to skip merging empty list of return pos invoices * fix: sql query * fix: using return invoice name instead of return invoice object * fix: added pos invoice field in sales invoice item (cherry picked from commit 8ba4ac3b8626dccbce3c9d1e4ade0ee381f6f80d) # Conflicts: # erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json * chore: resolve conflict --------- Co-authored-by: Diptanil Saha --- .../pos_invoice_merge_log.py | 146 +++++++++++------- .../sales_invoice_item.json | 31 +++- .../sales_invoice_item/sales_invoice_item.py | 2 + 3 files changed, 118 insertions(+), 61 deletions(-) diff --git a/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py b/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py index a8dd4c41c92..a8eba648545 100644 --- a/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py +++ b/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py @@ -8,6 +8,7 @@ import frappe from frappe import _ from frappe.model.document import Document from frappe.model.mapper import map_child_doc, map_doc +from frappe.query_builder import DocType from frappe.utils import cint, flt, get_time, getdate, nowdate, nowtime from frappe.utils.background_jobs import enqueue, is_job_enqueued from frappe.utils.scheduler import is_scheduler_inactive @@ -118,17 +119,18 @@ class POSInvoiceMergeLog(Document): returns = [d for d in pos_invoice_docs if d.get("is_return") == 1] sales = [d for d in pos_invoice_docs if d.get("is_return") == 0] - sales_invoice, credit_note = "", "" + sales_invoice, credit_notes = "", {} sales_invoice_doc = None if sales: sales_invoice_doc = self.process_merging_into_sales_invoice(sales) sales_invoice = sales_invoice_doc.name if returns: - credit_note = self.process_merging_into_credit_note(returns, sales_invoice_doc) + distinguished_returns = self.distinguish_return_pos_invoices(returns, sales_invoice_doc) + credit_notes = self.process_merging_into_credit_notes(distinguished_returns) self.save() # save consolidated_sales_invoice & consolidated_credit_note ref in merge log - self.update_pos_invoices(pos_invoice_docs, sales_invoice, credit_note) + self.update_pos_invoices(pos_invoice_docs, sales_invoice, credit_notes) def on_cancel(self): pos_invoice_docs = [frappe.get_cached_doc("POS Invoice", d.pos_invoice) for d in self.pos_invoices] @@ -158,34 +160,50 @@ class POSInvoiceMergeLog(Document): return sales_invoice - def process_merging_into_credit_note(self, data, sales_invoice_doc=None): - credit_note = self.get_new_sales_invoice() - credit_note.is_return = 1 + def process_merging_into_credit_notes(self, data): + credit_notes = {} + for key, value in data.items(): + if not value: + continue - credit_note = self.merge_pos_invoice_into(credit_note, data) - referenes = {} + credit_note = self.get_new_sales_invoice() + credit_note.is_return = 1 - if sales_invoice_doc: - credit_note.return_against = sales_invoice_doc.name + credit_note = self.merge_pos_invoice_into(credit_note, value) + credit_note.return_against = key - for d in sales_invoice_doc.items: - referenes[d.item_code] = d.name + credit_note.is_consolidated = 1 + credit_note.set_posting_time = 1 + credit_note.posting_date = getdate(self.posting_date) + credit_note.posting_time = get_time(self.posting_time) + # TODO: return could be against multiple sales invoice which could also have been consolidated? + # credit_note.return_against = self.consolidated_invoice + credit_note.save() + credit_note.submit() - for d in credit_note.items: - d.sales_invoice_item = referenes.get(d.item_code) + self.consolidated_credit_note = credit_note.name + credit_notes[credit_note.name] = [d.name for d in value] - credit_note.is_consolidated = 1 - credit_note.set_posting_time = 1 - credit_note.posting_date = getdate(self.posting_date) - credit_note.posting_time = get_time(self.posting_time) - # TODO: return could be against multiple sales invoice which could also have been consolidated? - # credit_note.return_against = self.consolidated_invoice - credit_note.save() - credit_note.submit() + return credit_notes - self.consolidated_credit_note = credit_note.name + def distinguish_return_pos_invoices(self, data, sales_invoice_doc=None): + return_invoices = {} - return credit_note.name + return_invoices[sales_invoice_doc.name if sales_invoice_doc else None] = [] + + for doc in data: + sales_invoices_of_return_against = frappe.db.get_value( + "POS Invoice", doc.return_against, "consolidated_invoice" + ) + if sales_invoices_of_return_against: + if sales_invoices_of_return_against in return_invoices: + return_invoices[sales_invoices_of_return_against].append(doc) + else: + return_invoices[sales_invoices_of_return_against] = [doc] + else: + return_invoices[sales_invoice_doc.name if sales_invoice_doc else None].append(doc) + + return return_invoices def merge_pos_invoice_into(self, invoice, data): items, payments, taxes = [], [], [] @@ -211,33 +229,20 @@ class POSInvoiceMergeLog(Document): loyalty_amount_sum += doc.loyalty_amount for item in doc.get("items"): - found = False - for i in items: - if ( - i.item_code == item.item_code - and not i.serial_and_batch_bundle - and not i.serial_no - and not i.batch_no - and i.uom == item.uom - and i.net_rate == item.net_rate - and i.warehouse == item.warehouse - ): - found = True - i.qty = i.qty + item.qty - i.amount = i.amount + item.net_amount - i.net_amount = i.amount - i.base_amount = i.base_amount + item.base_net_amount - i.base_net_amount = i.base_amount - - if not found: - item.rate = item.net_rate - item.amount = item.net_amount - item.base_amount = item.base_net_amount - item.price_list_rate = 0 - si_item = map_child_doc(item, invoice, {"doctype": "Sales Invoice Item"}) - if item.serial_and_batch_bundle: - si_item.serial_and_batch_bundle = item.serial_and_batch_bundle - items.append(si_item) + item.rate = item.net_rate + item.amount = item.net_amount + item.base_amount = item.base_net_amount + item.price_list_rate = 0 + si_item = map_child_doc(item, invoice, {"doctype": "Sales Invoice Item"}) + si_item.pos_invoice = doc.name + si_item.pos_invoice_item = item.name + if doc.is_return: + si_item.sales_invoice_item = get_sales_invoice_item( + doc.return_against, item.pos_invoice_item + ) + if item.serial_and_batch_bundle: + si_item.serial_and_batch_bundle = item.serial_and_batch_bundle + items.append(si_item) for tax in doc.get("taxes"): found = False @@ -327,16 +332,16 @@ class POSInvoiceMergeLog(Document): return sales_invoice - def update_pos_invoices(self, invoice_docs, sales_invoice="", credit_note=""): + def update_pos_invoices(self, invoice_docs, sales_invoice="", credit_notes=None): for doc in invoice_docs: doc.load_from_db() - doc.update( - { - "consolidated_invoice": None - if self.docstatus == 2 - else (credit_note if doc.is_return else sales_invoice) - } - ) + inv = sales_invoice + if doc.is_return: + for key, value in credit_notes.items(): + if doc.name in value: + inv = key + break + doc.update({"consolidated_invoice": None if self.docstatus == 2 else inv}) doc.set_status(update=True) doc.save() @@ -628,3 +633,26 @@ def get_error_message(message) -> str: return message["message"] except Exception: return str(message) + + +def get_sales_invoice_item(return_against_pos_invoice, pos_invoice_item): + try: + SalesInvoice = DocType("Sales Invoice") + SalesInvoiceItem = DocType("Sales Invoice Item") + + query = ( + frappe.qb.from_(SalesInvoice) + .from_(SalesInvoiceItem) + .select(SalesInvoiceItem.name) + .where( + (SalesInvoice.name == SalesInvoiceItem.parent) + & (SalesInvoice.is_return == 0) + & (SalesInvoiceItem.pos_invoice == return_against_pos_invoice) + & (SalesInvoiceItem.pos_invoice_item == pos_invoice_item) + ) + ) + + result = query.run(as_dict=True) + return result[0].name if result else None + except Exception: + return None diff --git a/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json b/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json index dd370ef414f..ba717951835 100644 --- a/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json +++ b/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json @@ -105,6 +105,9 @@ "delivery_note", "dn_detail", "delivered_qty", + "column_break_vwhb", + "pos_invoice", + "pos_invoice_item", "internal_transfer_section", "purchase_order", "column_break_92", @@ -945,19 +948,43 @@ "no_copy": 1, "print_hide": 1, "read_only": 1 + }, + { + "fieldname": "pos_invoice_item", + "fieldtype": "Data", + "ignore_user_permissions": 1, + "label": "POS Invoice Item", + "no_copy": 1, + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "column_break_vwhb", + "fieldtype": "Column Break" + }, + { + "fieldname": "pos_invoice", + "fieldtype": "Link", + "label": "POS Invoice", + "no_copy": 1, + "options": "POS Invoice", + "print_hide": 1, + "search_index": 1 } ], + "grid_page_length": 50, "idx": 1, "istable": 1, "links": [], - "modified": "2024-11-25 16:27:33.287341", + "modified": "2025-03-05 12:22:11.801692", "modified_by": "Administrator", "module": "Accounts", "name": "Sales Invoice Item", "naming_rule": "Random", "owner": "Administrator", "permissions": [], - "sort_field": "modified", + "row_format": "Dynamic", + "sort_field": "creation", "sort_order": "DESC", "states": [] } diff --git a/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.py b/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.py index b7b0873c76b..943f08871a1 100644 --- a/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.py +++ b/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.py @@ -64,6 +64,8 @@ class SalesInvoiceItem(Document): parent: DF.Data parentfield: DF.Data parenttype: DF.Data + pos_invoice: DF.Link | None + pos_invoice_item: DF.Data | None price_list_rate: DF.Currency pricing_rules: DF.SmallText | None project: DF.Link | None From bac36f342d58c3ef902edc1b28284dbcb2938961 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Wed, 12 Mar 2025 10:46:08 +0530 Subject: [PATCH 1391/1614] fix: do not recalculate qty for batch items during reposting (cherry picked from commit 0753c018d2e1b38abc67ce990cdb50340a4a35f5) --- .../stock/doctype/stock_reconciliation/stock_reconciliation.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py index a9f99e177fd..46f9f9dcf1b 100644 --- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py +++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py @@ -964,6 +964,9 @@ class StockReconciliation(StockController): if voucher_detail_no != row.name: continue + if row.current_qty < 0: + return + val_rate = 0.0 current_qty = 0.0 if row.current_serial_and_batch_bundle: From 0b921016ffdd4639987a3c82bd2dadff99a730b9 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Wed, 12 Mar 2025 15:27:47 +0530 Subject: [PATCH 1392/1614] fix: error when creating delivery note from pick list (#46417) (cherry picked from commit 67e9389a02704fa3c2ceda86835d90dd50ce7b33) --- erpnext/stock/doctype/pick_list/pick_list.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/erpnext/stock/doctype/pick_list/pick_list.py b/erpnext/stock/doctype/pick_list/pick_list.py index 31bff657fd1..a80a59a822d 100644 --- a/erpnext/stock/doctype/pick_list/pick_list.py +++ b/erpnext/stock/doctype/pick_list/pick_list.py @@ -1189,7 +1189,6 @@ def create_delivery_note(source_name, target_doc=None): if not all(item.sales_order for item in pick_list.locations): delivery_note = create_dn_wo_so(pick_list) - frappe.msgprint(_("Delivery Note(s) created for the Pick List")) return delivery_note @@ -1206,7 +1205,6 @@ def create_dn_wo_so(pick_list): }, } map_pl_locations(pick_list, item_table_mapper_without_so, delivery_note) - delivery_note.insert(ignore_mandatory=True) return delivery_note @@ -1234,10 +1232,7 @@ def create_dn_with_so(sales_dict, pick_list): # map all items of all sales orders of that customer for so in sales_dict[customer]: map_pl_locations(pick_list, item_table_mapper, delivery_note, so) - delivery_note.flags.ignore_mandatory = True - delivery_note.insert() update_packed_item_details(pick_list, delivery_note) - delivery_note.save() return delivery_note From 877d5bd3aa70881cc394870245f10973041dd5c1 Mon Sep 17 00:00:00 2001 From: Ninad Parikh <109862100+Ninad1306@users.noreply.github.com> Date: Wed, 12 Mar 2025 16:12:44 +0530 Subject: [PATCH 1393/1614] fix: `base_net_rate` Required to Check Valid Range (backport #46332) (#46382) fix: `base_net_rate` required to check valid range --- erpnext/controllers/accounts_controller.py | 1 + erpnext/controllers/queries.py | 1 + erpnext/public/js/controllers/transaction.js | 1 + 3 files changed, 3 insertions(+) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index df7452c0a01..55889c3b4c3 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -3291,6 +3291,7 @@ def set_child_tax_template_and_map(item, child_item, parent_doc): "posting_date": parent_doc.transaction_date, "tax_category": parent_doc.get("tax_category"), "company": parent_doc.get("company"), + "base_net_rate": item.get("base_net_rate"), } child_item.item_tax_template = _get_item_tax_template(args, item.taxes) diff --git a/erpnext/controllers/queries.py b/erpnext/controllers/queries.py index f124bfdbfc8..e9177f84fcc 100644 --- a/erpnext/controllers/queries.py +++ b/erpnext/controllers/queries.py @@ -837,6 +837,7 @@ def get_tax_template(doctype, txt, searchfield, start, page_len, filters): "posting_date": valid_from, "tax_category": filters.get("tax_category"), "company": company, + "base_net_rate": filters.get("base_net_rate"), } taxes = _get_item_tax_template(args, taxes, for_validate=True) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index a98cb450eb3..2fab91cbf88 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -2479,6 +2479,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe 'item_code': item.item_code, 'valid_from': ["<=", doc.transaction_date || doc.bill_date || doc.posting_date], 'item_group': item.item_group, + "base_net_rate": item.base_net_rate, } if (doc.tax_category) From 38dabdf584c54b7a5bb1a7b57f4dc0278bb186ec Mon Sep 17 00:00:00 2001 From: Sugesh G <73237300+Sugesh393@users.noreply.github.com> Date: Wed, 12 Mar 2025 16:13:35 +0530 Subject: [PATCH 1394/1614] fix: use shipping_address_name for address validation in sales invoice (#46473) * fix: validate address and contact related to party * fix: solve unboundlocal error * refactor: improve variable scope * refactor: translatable strings * fix: use shipping_address_name for address validation in sales invoice * test: add new unit test for address and contact validation * chore: to avoid keyerror --------- Co-authored-by: ruthra kumar (cherry picked from commit 0bdb81db53136bea54e1e703be5a3c80ccb29be4) --- erpnext/controllers/accounts_controller.py | 40 +++++++++++++ .../tests/test_accounts_controller.py | 56 +++++++++++++++++++ 2 files changed, 96 insertions(+) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 55889c3b4c3..21f339891bf 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -271,6 +271,7 @@ class AccountsController(TransactionBase): self.set_total_in_words() self.set_default_letter_head() self.validate_company_in_accounting_dimension() + self.validate_party_address_and_contact() def set_default_letter_head(self): if hasattr(self, "letter_head") and not self.letter_head: @@ -441,6 +442,45 @@ class AccountsController(TransactionBase): ) ) + def validate_party_address_and_contact(self): + party, party_type = None, None + if self.get("customer"): + party, party_type = self.customer, "Customer" + billing_address, shipping_address = ( + self.get("customer_address"), + self.get("shipping_address_name"), + ) + self.validate_party_address(party, party_type, billing_address, shipping_address) + elif self.get("supplier"): + party, party_type = self.supplier, "Supplier" + billing_address = self.get("supplier_address") + self.validate_party_address(party, party_type, billing_address) + + if party and party_type: + self.validate_party_contact(party, party_type) + + def validate_party_address(self, party, party_type, billing_address, shipping_address=None): + if billing_address or shipping_address: + party_address = frappe.get_list( + "Dynamic Link", + {"link_doctype": party_type, "link_name": party, "parenttype": "Address"}, + pluck="parent", + ) + if billing_address and billing_address not in party_address: + frappe.throw(_("Billing Address does not belong to the {0}").format(party)) + elif shipping_address and shipping_address not in party_address: + frappe.throw(_("Shipping Address does not belong to the {0}").format(party)) + + def validate_party_contact(self, party, party_type): + if self.get("contact_person"): + contact = frappe.get_list( + "Dynamic Link", + {"link_doctype": party_type, "link_name": party, "parenttype": "Contact"}, + pluck="parent", + ) + if self.contact_person and self.contact_person not in contact: + frappe.throw(_("Contact Person does not belong to the {0}").format(party)) + def validate_return_against_account(self): if self.doctype in ["Sales Invoice", "Purchase Invoice"] and self.is_return and self.return_against: cr_dr_account_field = "debit_to" if self.doctype == "Sales Invoice" else "credit_to" diff --git a/erpnext/controllers/tests/test_accounts_controller.py b/erpnext/controllers/tests/test_accounts_controller.py index f959cbd0488..28536893ab5 100644 --- a/erpnext/controllers/tests/test_accounts_controller.py +++ b/erpnext/controllers/tests/test_accounts_controller.py @@ -2175,3 +2175,59 @@ class TestAccountsController(FrappeTestCase): si_1 = create_sales_invoice(do_not_submit=True) si_1.items[0].project = project.name self.assertRaises(frappe.ValidationError, si_1.save) + + def test_party_billing_and_shipping_address(self): + from erpnext.crm.doctype.prospect.test_prospect import make_address + + customer_billing = make_address(address_title="Customer") + customer_billing.append("links", {"link_doctype": "Customer", "link_name": "_Test Customer"}) + customer_billing.save() + supplier_billing = make_address(address_title="Supplier", address_line1="2", city="Ahmedabad") + supplier_billing.append("links", {"link_doctype": "Supplier", "link_name": "_Test Supplier"}) + supplier_billing.save() + + customer_shipping = make_address( + address_title="Customer", address_type="Shipping", address_line1="10" + ) + customer_shipping.append("links", {"link_doctype": "Customer", "link_name": "_Test Customer"}) + customer_shipping.save() + supplier_shipping = make_address( + address_title="Supplier", address_type="Shipping", address_line1="20", city="Ahmedabad" + ) + supplier_shipping.append("links", {"link_doctype": "Supplier", "link_name": "_Test Supplier"}) + supplier_shipping.save() + + si = create_sales_invoice(do_not_save=True) + si.customer_address = supplier_billing.name + self.assertRaises(frappe.ValidationError, si.save) + si.customer_address = customer_billing.name + si.save() + + si.shipping_address_name = supplier_shipping.name + self.assertRaises(frappe.ValidationError, si.save) + si.shipping_address_name = customer_shipping.name + si.reload() + si.save() + + pi = make_purchase_invoice(do_not_save=True) + pi.supplier_address = customer_shipping.name + self.assertRaises(frappe.ValidationError, pi.save) + pi.supplier_address = supplier_shipping.name + pi.save() + + def test_party_contact(self): + from frappe.contacts.doctype.contact.test_contact import create_contact + + customer_contact = create_contact(name="Customer", salutation="Mr", save=False) + customer_contact.append("links", {"link_doctype": "Customer", "link_name": "_Test Customer"}) + customer_contact.save() + + supplier_contact = create_contact(name="Supplier", salutation="Mr", save=False) + supplier_contact.append("links", {"link_doctype": "Supplier", "link_name": "_Test Supplier"}) + supplier_contact.save() + + si = create_sales_invoice(do_not_save=True) + si.contact_person = supplier_contact.name + self.assertRaises(frappe.ValidationError, si.save) + si.contact_person = customer_contact.name + si.save() From cc30a0189833324525a038d9564e4da40d9412de Mon Sep 17 00:00:00 2001 From: Priyansh Shah <108476017+priyanshshah2442@users.noreply.github.com> Date: Wed, 12 Mar 2025 16:21:12 +0530 Subject: [PATCH 1395/1614] fix: validations and account type filter for `Tax Withholding Category` (#46207) fix: validations and account type filter for tax withholding category (cherry picked from commit d371236684958bda6d89083833cb3637dddf016b) --- .../tax_withholding_category.js | 1 + .../tax_withholding_category.py | 25 +++++++++++++------ 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.js b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.js index 4f4f32c4747..042831c8080 100644 --- a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.js +++ b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.js @@ -10,6 +10,7 @@ frappe.ui.form.on("Tax Withholding Category", { filters: { company: child.company, root_type: ["in", ["Asset", "Liability"]], + is_group: 0, }, }; } diff --git a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py index a355e5ddf44..e45802ca9f2 100644 --- a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py +++ b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py @@ -36,27 +36,38 @@ class TaxWithholdingCategory(Document): def validate(self): self.validate_dates() - self.validate_accounts() + self.validate_companies_and_accounts() self.validate_thresholds() def validate_dates(self): - last_date = None - for d in self.get("rates"): + last_to_date = None + rates = sorted(self.get("rates"), key=lambda d: getdate(d.from_date)) + + for d in rates: if getdate(d.from_date) >= getdate(d.to_date): frappe.throw(_("Row #{0}: From Date cannot be before To Date").format(d.idx)) # validate overlapping of dates - if last_date and getdate(d.to_date) < getdate(last_date): + if last_to_date and getdate(d.from_date) < getdate(last_to_date): frappe.throw(_("Row #{0}: Dates overlapping with other row").format(d.idx)) - def validate_accounts(self): - existing_accounts = [] + last_to_date = d.to_date + + def validate_companies_and_accounts(self): + existing_accounts = set() + companies = set() for d in self.get("accounts"): + # validate duplicate company + if d.get("company") in companies: + frappe.throw(_("Company {0} added multiple times").format(frappe.bold(d.get("company")))) + companies.add(d.get("company")) + + # validate duplicate account if d.get("account") in existing_accounts: frappe.throw(_("Account {0} added multiple times").format(frappe.bold(d.get("account")))) validate_account_head(d.idx, d.get("account"), d.get("company")) - existing_accounts.append(d.get("account")) + existing_accounts.add(d.get("account")) def validate_thresholds(self): for d in self.get("rates"): From 79e6550321fd5289f271253ed8569295bcdf96f8 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Wed, 12 Mar 2025 16:27:33 +0530 Subject: [PATCH 1396/1614] fix: show remaining qty on 'Complete Job' button instead of full qty --- erpnext/manufacturing/doctype/job_card/job_card.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/job_card/job_card.js b/erpnext/manufacturing/doctype/job_card/job_card.js index ad514efa55f..690d7945beb 100644 --- a/erpnext/manufacturing/doctype/job_card/job_card.js +++ b/erpnext/manufacturing/doctype/job_card/job_card.js @@ -312,7 +312,7 @@ frappe.ui.form.on("Job Card", { fieldtype: "Float", label: __("Completed Quantity"), fieldname: "qty", - default: frm.doc.for_quantity, + default: frm.doc.for_quantity - frm.doc.total_completed_qty, }, (data) => { frm.events.complete_job(frm, "Complete", data.qty); From 8def42f751ace7659c9912270481ddb78aabd310 Mon Sep 17 00:00:00 2001 From: Sugesh G <73237300+Sugesh393@users.noreply.github.com> Date: Wed, 12 Mar 2025 16:27:48 +0530 Subject: [PATCH 1397/1614] fix: pricing rule not ignored in Sales Order (#46248) * fix: pricing rule not ignored in Sales Order * test: update parameter do_not_submit to do_not_save (cherry picked from commit f8c659d8d517b8faefce71a0d5a0cc521f257019) --- erpnext/accounts/doctype/coupon_code/test_coupon_code.py | 2 +- erpnext/accounts/doctype/pricing_rule/pricing_rule.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/coupon_code/test_coupon_code.py b/erpnext/accounts/doctype/coupon_code/test_coupon_code.py index aad341e9e1d..8a21542d031 100644 --- a/erpnext/accounts/doctype/coupon_code/test_coupon_code.py +++ b/erpnext/accounts/doctype/coupon_code/test_coupon_code.py @@ -128,7 +128,7 @@ class TestCouponCode(unittest.TestCase): item_code="_Test Tesla Car", rate=5000, qty=1, - do_not_submit=True, + do_not_save=True, ) self.assertEqual(so.items[0].rate, 5000) diff --git a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py index 7a895f6818b..f0481ad63f6 100644 --- a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py +++ b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py @@ -454,8 +454,7 @@ def get_pricing_rule_for_item(args, doc=None, for_validate=False): if pricing_rule.coupon_code_based == 1: if not args.coupon_code: - return item_details - + continue coupon_code = frappe.db.get_value( doctype="Coupon Code", filters={"pricing_rule": pricing_rule.name}, fieldname="name" ) From 7f147446df1382fe73946906c9f20c9d82b3bc04 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 12 Mar 2025 16:30:14 +0530 Subject: [PATCH 1398/1614] fix: calculate due date based on payment term (backport #46416) (#46479) fix: calculate due date based on payment term (#46416) (cherry picked from commit 9e808c832f4cce536fe5d4f16d3f550352ba6f49) Co-authored-by: Sudharsanan Ashok <135326972+Sudharsanan11@users.noreply.github.com> --- erpnext/accounts/doctype/sales_invoice/sales_invoice.py | 8 +++++++- erpnext/accounts/party.py | 5 +++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 92902c78e8e..673a65dae55 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -678,7 +678,13 @@ class SalesInvoice(SellingController): "Account", self.debit_to, "account_currency", cache=True ) if not self.due_date and self.customer: - self.due_date = get_due_date(self.posting_date, "Customer", self.customer, self.company) + self.due_date = get_due_date( + self.posting_date, + "Customer", + self.customer, + self.company, + template_name=self.payment_terms_template, + ) super().set_missing_values(for_validate) diff --git a/erpnext/accounts/party.py b/erpnext/accounts/party.py index f2e86ef2b2e..959e3429095 100644 --- a/erpnext/accounts/party.py +++ b/erpnext/accounts/party.py @@ -572,12 +572,13 @@ def validate_party_accounts(doc): @frappe.whitelist() -def get_due_date(posting_date, party_type, party, company=None, bill_date=None): +def get_due_date(posting_date, party_type, party, company=None, bill_date=None, template_name=None): """Get due date from `Payment Terms Template`""" due_date = None if (bill_date or posting_date) and party: due_date = bill_date or posting_date - template_name = get_payment_terms_template(party, party_type, company) + if not template_name: + template_name = get_payment_terms_template(party, party_type, company) if template_name: due_date = get_due_date_from_template(template_name, posting_date, bill_date).strftime("%Y-%m-%d") From 3f9df2fb2d63466f13d14343c69483022fd231a1 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Wed, 12 Mar 2025 16:35:50 +0530 Subject: [PATCH 1399/1614] fix: enable no copy for serial no field --- .../purchase_invoice_item/purchase_invoice_item.json | 7 ++++--- .../doctype/sales_invoice_item/sales_invoice_item.json | 7 +++---- .../purchase_receipt_item/purchase_receipt_item.json | 7 ++++--- .../stock_reconciliation_item.json | 7 ++++--- 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json b/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json index 258cc10d4ec..eb218708b8e 100644 --- a/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json +++ b/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json @@ -461,7 +461,8 @@ "depends_on": "eval:!doc.is_fixed_asset && doc.use_serial_batch_fields === 1 && parent.update_stock === 1", "fieldname": "serial_no", "fieldtype": "Text", - "label": "Serial No" + "label": "Serial No", + "no_copy": 1 }, { "depends_on": "eval:!doc.is_fixed_asset && doc.use_serial_batch_fields === 1 && parent.update_stock === 1", @@ -975,7 +976,7 @@ "idx": 1, "istable": 1, "links": [], - "modified": "2024-10-28 15:06:19.246141", + "modified": "2025-03-12 16:33:12.453290", "modified_by": "Administrator", "module": "Accounts", "name": "Purchase Invoice Item", @@ -985,4 +986,4 @@ "sort_field": "modified", "sort_order": "DESC", "states": [] -} +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json b/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json index ba717951835..3d0998851fb 100644 --- a/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json +++ b/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json @@ -633,6 +633,7 @@ "fieldname": "serial_no", "fieldtype": "Text", "label": "Serial No", + "no_copy": 1, "oldfieldname": "serial_no", "oldfieldtype": "Small Text" }, @@ -972,19 +973,17 @@ "search_index": 1 } ], - "grid_page_length": 50, "idx": 1, "istable": 1, "links": [], - "modified": "2025-03-05 12:22:11.801692", + "modified": "2025-03-12 16:33:52.503777", "modified_by": "Administrator", "module": "Accounts", "name": "Sales Invoice Item", "naming_rule": "Random", "owner": "Administrator", "permissions": [], - "row_format": "Dynamic", "sort_field": "creation", "sort_order": "DESC", "states": [] -} +} \ No newline at end of file diff --git a/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json b/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json index 12d3f99e37b..f63d7e058f3 100644 --- a/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json +++ b/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json @@ -1017,7 +1017,8 @@ { "fieldname": "serial_no", "fieldtype": "Text", - "label": "Serial No" + "label": "Serial No", + "no_copy": 1 }, { "fieldname": "rejected_serial_no", @@ -1140,7 +1141,7 @@ "idx": 1, "istable": 1, "links": [], - "modified": "2025-02-17 13:15:36.692202", + "modified": "2025-03-12 16:34:29.722982", "modified_by": "Administrator", "module": "Stock", "name": "Purchase Receipt Item", @@ -1151,4 +1152,4 @@ "sort_field": "modified", "sort_order": "DESC", "states": [] -} +} \ No newline at end of file diff --git a/erpnext/stock/doctype/stock_reconciliation_item/stock_reconciliation_item.json b/erpnext/stock/doctype/stock_reconciliation_item/stock_reconciliation_item.json index bce819fe231..4d3a87c70aa 100644 --- a/erpnext/stock/doctype/stock_reconciliation_item/stock_reconciliation_item.json +++ b/erpnext/stock/doctype/stock_reconciliation_item/stock_reconciliation_item.json @@ -110,7 +110,8 @@ "depends_on": "eval:doc.use_serial_batch_fields === 1", "fieldname": "serial_no", "fieldtype": "Long Text", - "label": "Serial No" + "label": "Serial No", + "no_copy": 1 }, { "fieldname": "column_break_11", @@ -255,7 +256,7 @@ ], "istable": 1, "links": [], - "modified": "2024-05-30 23:20:00.947243", + "modified": "2025-03-12 16:34:51.326821", "modified_by": "Administrator", "module": "Stock", "name": "Stock Reconciliation Item", @@ -266,4 +267,4 @@ "sort_order": "DESC", "states": [], "track_changes": 1 -} +} \ No newline at end of file From baa564fc94c717c17d0cefd7e6bf66003f9d4c59 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Wed, 12 Mar 2025 17:11:14 +0530 Subject: [PATCH 1400/1614] fix: remove no copy for serial no field of purchase receipt item --- .../doctype/purchase_receipt_item/purchase_receipt_item.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json b/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json index f63d7e058f3..810c08a545e 100644 --- a/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json +++ b/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json @@ -1017,8 +1017,7 @@ { "fieldname": "serial_no", "fieldtype": "Text", - "label": "Serial No", - "no_copy": 1 + "label": "Serial No" }, { "fieldname": "rejected_serial_no", @@ -1141,7 +1140,7 @@ "idx": 1, "istable": 1, "links": [], - "modified": "2025-03-12 16:34:29.722982", + "modified": "2025-03-12 17:10:42.780622", "modified_by": "Administrator", "module": "Stock", "name": "Purchase Receipt Item", From 739cd18604c44fd614c09a936f3a44e512175105 Mon Sep 17 00:00:00 2001 From: Bhavan23 Date: Mon, 3 Mar 2025 18:10:59 +0530 Subject: [PATCH 1401/1614] fix: run bank reconciliation as a background job to prevent request timeout (cherry picked from commit a29c6a5aeae1b524edbe033f083a08a8b642fbc6) --- .../bank_reconciliation_tool.py | 30 +++++++++++++++++-- 1 file changed, 28 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 9de1b4216ce..6c57ea42367 100644 --- a/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py +++ b/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py @@ -374,9 +374,36 @@ def auto_reconcile_vouchers( to_reference_date=None, ): frappe.flags.auto_reconcile_vouchers = True - reconciled, partially_reconciled = set(), set() bank_transactions = get_bank_transactions(bank_account) + + if len(bank_transactions) > 10: + frappe.enqueue( + method="erpnext.accounts.doctype.bank_reconciliation_tool.bank_reconciliation_tool.start_auto_reconcile", + queue="long", + bank_transactions=bank_transactions, + from_date=from_date, + to_date=to_date, + filter_by_reference_date=filter_by_reference_date, + from_reference_date=from_reference_date, + to_reference_date=to_reference_date, + ) + frappe.msgprint(_("Auto Reconciliation has started in the background")) + else: + start_auto_reconcile( + bank_transactions, + from_date, + to_date, + filter_by_reference_date, + from_reference_date, + to_reference_date, + ) + + +def start_auto_reconcile( + bank_transactions, from_date, to_date, filter_by_reference_date, from_reference_date, to_reference_date +): + reconciled, partially_reconciled = set(), set() for transaction in bank_transactions: linked_payments = get_linked_payments( transaction.name, @@ -414,7 +441,6 @@ def auto_reconcile_vouchers( frappe.msgprint(title=_("Auto Reconciliation"), msg=alert_message, indicator=indicator) frappe.flags.auto_reconcile_vouchers = False - return reconciled, partially_reconciled def get_auto_reconcile_message(partially_reconciled, reconciled): From d3a2350b3e5dcc7ff15c45f67310ebae2ea3df8b Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 12 Mar 2025 17:23:26 +0530 Subject: [PATCH 1402/1614] fix(invoice):validate return invoice qty (backport #46451) (#46481) fix(invoice):validate return invoice qty (#46451) * fix(invoice): validate return quantity when update stock is unchecked * test: add unit test for validating fully returned invoice quantity (cherry picked from commit ba96c8657644a4fa05a1826633a9dbb9b58832e2) Co-authored-by: Bhavansathru <122002510+Bhavan23@users.noreply.github.com> --- .../purchase_invoice/test_purchase_invoice.py | 14 +++++++++++ .../sales_invoice/test_sales_invoice.py | 14 +++++++++++ .../controllers/sales_and_purchase_return.py | 23 +++++++++++-------- 3 files changed, 41 insertions(+), 10 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py index 192f9cc81d2..cf5dbccd54f 100644 --- a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py @@ -2669,6 +2669,20 @@ class TestPurchaseInvoice(FrappeTestCase, StockTestMixin): ) self.assertEqual(actual, expected) + def test_prevents_fully_returned_invoice_with_zero_quantity(self): + from erpnext.controllers.sales_and_purchase_return import StockOverReturnError, make_return_doc + + invoice = make_purchase_invoice(qty=10) + + return_doc = make_return_doc(invoice.doctype, invoice.name) + return_doc.items[0].qty = -10 + return_doc.save().submit() + + return_doc = make_return_doc(invoice.doctype, invoice.name) + return_doc.items[0].qty = 0 + + self.assertRaises(StockOverReturnError, return_doc.save) + def set_advance_flag(company, flag, default_account): frappe.db.set_value( diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py index 99867e94fcb..f428eb50a3c 100644 --- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py @@ -4295,6 +4295,20 @@ class TestSalesInvoice(FrappeTestCase): pos_return = make_sales_return(pos.name) self.assertEqual(abs(pos_return.payments[0].amount), pos.payments[0].amount) + def test_prevents_fully_returned_invoice_with_zero_quantity(self): + from erpnext.controllers.sales_and_purchase_return import StockOverReturnError, make_return_doc + + invoice = create_sales_invoice(qty=10) + + return_doc = make_return_doc(invoice.doctype, invoice.name) + return_doc.items[0].qty = -10 + return_doc.save().submit() + + return_doc = make_return_doc(invoice.doctype, invoice.name) + return_doc.items[0].qty = 0 + + self.assertRaises(StockOverReturnError, return_doc.save) + def set_advance_flag(company, flag, default_account): frappe.db.set_value( diff --git a/erpnext/controllers/sales_and_purchase_return.py b/erpnext/controllers/sales_and_purchase_return.py index a9007208a2a..74c5e34ecfa 100644 --- a/erpnext/controllers/sales_and_purchase_return.py +++ b/erpnext/controllers/sales_and_purchase_return.py @@ -25,9 +25,6 @@ def validate_return(doc): if doc.return_against: validate_return_against(doc) - if doc.doctype in ("Sales Invoice", "Purchase Invoice") and not doc.update_stock: - return - validate_returned_items(doc) @@ -118,7 +115,7 @@ def validate_returned_items(doc): elif doc.doctype == "Delivery Note": key = (d.item_code, d.get("dn_detail")) - if d.item_code and (flt(d.qty) < 0 or flt(d.get("received_qty")) < 0): + if d.item_code and (flt(d.qty) <= 0 or flt(d.get("received_qty")) <= 0): if key not in valid_items: frappe.msgprint( _("Row # {0}: Returned Item {1} does not exist in {2} {3}").format( @@ -160,6 +157,9 @@ def validate_returned_items(doc): def validate_quantity(doc, key, args, ref, valid_items, already_returned_items): fields = ["stock_qty"] + if (doc.doctype == "Purchase Invoice" or doc.doctype == "Sales Invoice") and not doc.update_stock: + fields = ["qty"] + if doc.doctype in ["Purchase Receipt", "Purchase Invoice", "Subcontracting Receipt"]: if not args.get("return_qty_from_rejected_warehouse"): fields.extend(["received_qty", "rejected_qty"]) @@ -169,13 +169,16 @@ def validate_quantity(doc, key, args, ref, valid_items, already_returned_items): already_returned_data = already_returned_items.get(key) or {} company_currency = erpnext.get_company_currency(doc.company) - stock_qty_precision = get_field_precision( - frappe.get_meta(doc.doctype + " Item").get_field("stock_qty"), company_currency + field_precision = get_field_precision( + frappe.get_meta(doc.doctype + " Item").get_field( + "stock_qty" if doc.get("update_stock", "") else "qty" + ), + company_currency, ) for column in fields: returned_qty = ( - flt(already_returned_data.get(column, 0), stock_qty_precision) + flt(already_returned_data.get(column, 0), field_precision) if len(already_returned_data) > 0 else 0 ) @@ -190,17 +193,17 @@ def validate_quantity(doc, key, args, ref, valid_items, already_returned_items): reference_qty = ref.get(column) * ref.get("conversion_factor", 1.0) current_stock_qty = args.get(column) * args.get("conversion_factor", 1.0) - max_returnable_qty = flt(flt(reference_qty, stock_qty_precision) - returned_qty, stock_qty_precision) + max_returnable_qty = flt(flt(reference_qty, field_precision) - returned_qty, field_precision) label = column.replace("_", " ").title() if reference_qty: if flt(args.get(column)) > 0: frappe.throw(_("{0} must be negative in return document").format(label)) - elif returned_qty >= reference_qty and args.get(column): + elif returned_qty >= reference_qty and args.get(column) >= 0: frappe.throw( _("Item {0} has already been returned").format(args.item_code), StockOverReturnError ) - elif abs(flt(current_stock_qty, stock_qty_precision)) > max_returnable_qty: + elif abs(flt(current_stock_qty, field_precision)) > max_returnable_qty: frappe.throw( _("Row # {0}: Cannot return more than {1} for Item {2}").format( args.idx, max_returnable_qty, args.item_code From 950656d6f7b5350059a28a1f31285b1879141475 Mon Sep 17 00:00:00 2001 From: Sanket Shah <113279972+Sanket322@users.noreply.github.com> Date: Wed, 12 Mar 2025 22:37:08 +0530 Subject: [PATCH 1403/1614] fix: using `in` for lookup in list instead of directly assigning (#46492) fix: using in for lookup in list instead of assigning Co-authored-by: Sanket322 (cherry picked from commit 38955af802197cf1a49b63a0dbb2e1decc730cfb) --- .../accounts/report/accounts_receivable/accounts_receivable.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py index c7a0da5afe9..e2260876490 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py @@ -745,7 +745,8 @@ class ReceivablePayableReport: for party_type in self.party_type: party_field = scrub(party_type) if self.filters.get(party_field): - or_filters.update({party_field: self.filters.get(party_field)}) + or_filters.update({party_field: ["in", self.filters.get(party_field)]}) + self.return_entries = frappe._dict( frappe.get_all( doctype, filters=filters, or_filters=or_filters, fields=["name", "return_against"], as_list=1 From 0223651b5be6130826bb3b6b6e46d9d0a67e19c6 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 10 Mar 2025 16:24:43 +0530 Subject: [PATCH 1404/1614] Revert "fix: Show Credit Note amount in credit note column" (cherry picked from commit 5a9767ca67217a962c99332180aa17afa2e734dc) --- .../accounts_payable/test_accounts_payable.py | 17 ----------------- .../accounts_receivable/accounts_receivable.py | 16 ++-------------- .../test_accounts_receivable.py | 12 +++--------- 3 files changed, 5 insertions(+), 40 deletions(-) diff --git a/erpnext/accounts/report/accounts_payable/test_accounts_payable.py b/erpnext/accounts/report/accounts_payable/test_accounts_payable.py index 69f332d9800..8971dc3d37b 100644 --- a/erpnext/accounts/report/accounts_payable/test_accounts_payable.py +++ b/erpnext/accounts/report/accounts_payable/test_accounts_payable.py @@ -38,23 +38,6 @@ class TestAccountsPayable(AccountsTestMixin, FrappeTestCase): self.assertEqual(data[1][0].get("outstanding"), 300) self.assertEqual(data[1][0].get("currency"), "USD") - def test_account_payable_for_debit_note(self): - pi = self.create_purchase_invoice(do_not_submit=True) - pi.is_return = 1 - pi.items[0].qty = -1 - pi = pi.save().submit() - - filters = { - "company": self.company, - "party_type": "Supplier", - "party": [self.supplier], - "report_date": today(), - "range": "30, 60, 90, 120", - } - - data = execute(filters) - self.assertEqual(data[1][0].get("invoiced"), 300) - def create_purchase_invoice(self, do_not_submit=False): frappe.set_user("Administrator") pi = make_purchase_invoice( diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py index c7a0da5afe9..1ddf9bce06f 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py @@ -267,18 +267,6 @@ class ReceivablePayableReport: row.invoiced_in_account_currency += amount_in_account_currency else: if self.is_invoice(ple): - # when invoice has is_return marked - if self.invoice_details.get(row.voucher_no, {}).get("is_return"): - # for Credit Note - if row.voucher_type == "Sales Invoice": - row.credit_note -= amount - row.credit_note_in_account_currency -= amount_in_account_currency - # for Debit Note - else: - row.invoiced -= amount - row.invoiced_in_account_currency -= amount_in_account_currency - return - if row.voucher_no == ple.voucher_no == ple.against_voucher_no: row.paid -= amount row.paid_in_account_currency -= amount_in_account_currency @@ -433,7 +421,7 @@ class ReceivablePayableReport: # nosemgrep si_list = frappe.db.sql( """ - select name, due_date, po_no, is_return + select name, due_date, po_no from `tabSales Invoice` where posting_date <= %s and company = %s @@ -465,7 +453,7 @@ class ReceivablePayableReport: # nosemgrep for pi in frappe.db.sql( """ - select name, due_date, bill_no, bill_date, is_return + select name, due_date, bill_no, bill_date from `tabPurchase Invoice` where posting_date <= %s diff --git a/erpnext/accounts/report/accounts_receivable/test_accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/test_accounts_receivable.py index f3513286c9e..39ca78153c3 100644 --- a/erpnext/accounts/report/accounts_receivable/test_accounts_receivable.py +++ b/erpnext/accounts/report/accounts_receivable/test_accounts_receivable.py @@ -204,7 +204,7 @@ class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase): expected_data_after_credit_note = [ [100.0, 100.0, 40.0, 0.0, 60.0, si.name], - [0, 0, 0, 100.0, -100.0, cr_note.name], + [0, 0, 100.0, 0.0, -100.0, cr_note.name], ] self.assertEqual(len(report[1]), 2) si_row = next( @@ -478,19 +478,13 @@ class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase): report = execute(filters)[1] self.assertEqual(len(report), 2) - expected_data = {sr.name: [0.0, 10.0, -10.0, 0.0, -10], si.name: [100.0, 0.0, 100.0, 10.0, 90.0]} + expected_data = {sr.name: [10.0, -10.0, 0.0, -10], si.name: [100.0, 100.0, 10.0, 90.0]} rows = report[:2] for row in rows: self.assertEqual( expected_data[row.voucher_no], - [ - row.invoiced or row.paid, - row.credit_note, - row.outstanding, - row.remaining_balance, - row.future_amount, - ], + [row.invoiced or row.paid, row.outstanding, row.remaining_balance, row.future_amount], ) pe.cancel() From 32335da8398876fde80da12e3079ad3a23de6d0e Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 13 Mar 2025 12:03:46 +0530 Subject: [PATCH 1405/1614] fix: add parenttype condition to payment schedule query in accounts receivable report (backport #46370) (#46499) Fix: add parenttype condition to payment schedule query in accounts receivable report (#46370) fix: add parenttype condition to payment schedule query in accounts receivable report (cherry picked from commit f311a0fc1ca80be3bda349175d1cb36f3009bb12) Co-authored-by: Shanuka Hewage <89955436+Shanuka-98@users.noreply.github.com> --- .../accounts/report/accounts_receivable/accounts_receivable.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py index 54b2c604bf4..2fcae9fa778 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py @@ -520,7 +520,7 @@ class ReceivablePayableReport: ps.description, ps.paid_amount, ps.discounted_amount from `tab{row.voucher_type}` si, `tabPayment Schedule` ps where - si.name = ps.parent and + si.name = ps.parent and ps.parenttype = '{row.voucher_type}' and si.name = %s and si.is_return = 0 order by ps.paid_amount desc, due_date From 2a788a4fb162ca582a043811dd94d197ae871d39 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 13 Mar 2025 14:30:38 +0530 Subject: [PATCH 1406/1614] refactor: print receipt on order complete on pos (backport #46501) (#46507) * refactor: print receipt on order complete on pos (#46501) (cherry picked from commit 0552209310c7f3b17d02508a12b7547068a906cc) # Conflicts: # erpnext/selling/page/point_of_sale/pos_past_order_summary.js * chore: resolve conflict --------- Co-authored-by: Diptanil Saha --- .../page/point_of_sale/pos_controller.js | 2 +- .../point_of_sale/pos_past_order_summary.js | 20 ++++--------------- 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/erpnext/selling/page/point_of_sale/pos_controller.js b/erpnext/selling/page/point_of_sale/pos_controller.js index e7208c41dde..b7062abecba 100644 --- a/erpnext/selling/page/point_of_sale/pos_controller.js +++ b/erpnext/selling/page/point_of_sale/pos_controller.js @@ -449,6 +449,7 @@ erpnext.PointOfSale.Controller = class { init_order_summary() { this.order_summary = new erpnext.PointOfSale.PastOrderSummary({ wrapper: this.$components_wrapper, + settings: this.settings, events: { get_frm: () => this.frm, @@ -485,7 +486,6 @@ erpnext.PointOfSale.Controller = class { ]); }, }, - pos_profile: this.pos_profile, }); } diff --git a/erpnext/selling/page/point_of_sale/pos_past_order_summary.js b/erpnext/selling/page/point_of_sale/pos_past_order_summary.js index d4b5562c218..cf775176c07 100644 --- a/erpnext/selling/page/point_of_sale/pos_past_order_summary.js +++ b/erpnext/selling/page/point_of_sale/pos_past_order_summary.js @@ -1,8 +1,8 @@ erpnext.PointOfSale.PastOrderSummary = class { - constructor({ wrapper, events, pos_profile }) { + constructor({ wrapper, settings, events }) { this.wrapper = wrapper; this.events = events; - this.pos_profile = pos_profile; + this.print_receipt_on_order_complete = settings.print_receipt_on_order_complete; this.init_component(); } @@ -357,8 +357,8 @@ erpnext.PointOfSale.PastOrderSummary = class { this.add_summary_btns(condition_btns_map); - if (after_submission) { - this.print_receipt_on_order_complete(); + if (after_submission && this.print_receipt_on_order_complete) { + this.print_receipt(); } } @@ -426,16 +426,4 @@ erpnext.PointOfSale.PastOrderSummary = class { toggle_component(show) { show ? this.$component.css("display", "flex") : this.$component.css("display", "none"); } - - async print_receipt_on_order_complete() { - const res = await frappe.db.get_value( - "POS Profile", - this.pos_profile, - "print_receipt_on_order_complete" - ); - - if (res.message.print_receipt_on_order_complete) { - this.print_receipt(); - } - } }; From 6202e302b1f15809be9bd1be9238fa1eae71807f Mon Sep 17 00:00:00 2001 From: Bhavan23 Date: Thu, 13 Mar 2025 16:45:18 +0530 Subject: [PATCH 1407/1614] fix: set stock adjustment account in difference account --- .../stock/doctype/stock_entry/stock_entry.py | 46 +++++++++++++++---- 1 file changed, 36 insertions(+), 10 deletions(-) diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index f362f9d3da9..3cf19577ef5 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -1614,17 +1614,38 @@ class StockEntry(StockController): @frappe.whitelist() def get_item_details(self, args=None, for_update=False): - item = frappe.db.sql( - """select i.name, i.stock_uom, i.description, i.image, i.item_name, i.item_group, - i.has_batch_no, i.sample_quantity, i.has_serial_no, i.allow_alternative_item, - id.expense_account, id.buying_cost_center - from `tabItem` i LEFT JOIN `tabItem Default` id ON i.name=id.parent and id.company=%s - where i.name=%s - and i.disabled=0 - and (i.end_of_life is null or i.end_of_life<'1900-01-01' or i.end_of_life > %s)""", - (self.company, args.get("item_code"), nowdate()), - as_dict=1, + item = frappe.qb.DocType("Item") + item_default = frappe.qb.DocType("Item Default") + + query = ( + frappe.qb.from_(item) + .left_join(item_default) + .on((item.name == item_default.parent) & (item_default.company == self.company)) + .select( + item.name, + item.stock_uom, + item.description, + item.image, + item.item_name, + item.item_group, + item.has_batch_no, + item.sample_quantity, + item.has_serial_no, + item.allow_alternative_item, + item_default.expense_account, + item_default.buying_cost_center, + ) + .where( + (item.name == args.get("item_code")) + & (item.disabled == 0) + & ( + (item.end_of_life.isnull()) + | (item.end_of_life < "1900-01-01") + | (item.end_of_life > nowdate()) + ) + ) ) + item = query.run(as_dict=True) if not item: frappe.throw( @@ -1667,6 +1688,11 @@ class StockEntry(StockController): if self.purpose == "Material Issue": ret["expense_account"] = item.get("expense_account") or item_group_defaults.get("expense_account") + if self.purpose == "Manufacture": + ret["expense_account"] = frappe.get_cached_value( + "Company", self.company, "stock_adjustment_account" + ) + for company_field, field in { "stock_adjustment_account": "expense_account", "cost_center": "cost_center", From 3737b4a30028bfa0b080c471b41d0700659d9738 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Wed, 12 Mar 2025 17:34:23 +0530 Subject: [PATCH 1408/1614] refactor(test): unset billing address --- erpnext/selling/doctype/sales_order/test_sales_order.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/erpnext/selling/doctype/sales_order/test_sales_order.py b/erpnext/selling/doctype/sales_order/test_sales_order.py index 003ffd5ac82..16c7431c315 100644 --- a/erpnext/selling/doctype/sales_order/test_sales_order.py +++ b/erpnext/selling/doctype/sales_order/test_sales_order.py @@ -2136,7 +2136,7 @@ class TestSalesOrder(AccountsTestMixin, FrappeTestCase): self.assertEqual(dn.items[0].rate, 90) - def test_credit_limit_on_so_reopning(self): + def test_credit_limit_on_so_reopening(self): # set credit limit company = "_Test Company" customer = frappe.get_doc("Customer", self.customer) @@ -2148,12 +2148,14 @@ class TestSalesOrder(AccountsTestMixin, FrappeTestCase): so1 = make_sales_order(qty=9, rate=100, do_not_submit=True) so1.customer = self.customer + so1.customer_address = so1.shipping_address_name = None so1.save().submit() so1.update_status("Closed") so2 = make_sales_order(qty=9, rate=100, do_not_submit=True) so2.customer = self.customer + so2.customer_address = so2.shipping_address_name = None so2.save().submit() self.assertRaises(frappe.ValidationError, so1.update_status, "Draft") From 7fb26f802c99bd3c640b22fd2e7170cc446144f5 Mon Sep 17 00:00:00 2001 From: Sugesh393 Date: Wed, 12 Mar 2025 17:54:39 +0530 Subject: [PATCH 1409/1614] refactor: replace get_list with get_all for dynamic link child access (cherry picked from commit 8f7f0b81f6be2e4d8c320c5c7d07c7f8c5c08b02) --- erpnext/controllers/accounts_controller.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 21f339891bf..94b553e2f99 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -461,7 +461,7 @@ class AccountsController(TransactionBase): def validate_party_address(self, party, party_type, billing_address, shipping_address=None): if billing_address or shipping_address: - party_address = frappe.get_list( + party_address = frappe.get_all( "Dynamic Link", {"link_doctype": party_type, "link_name": party, "parenttype": "Address"}, pluck="parent", @@ -473,7 +473,7 @@ class AccountsController(TransactionBase): def validate_party_contact(self, party, party_type): if self.get("contact_person"): - contact = frappe.get_list( + contact = frappe.get_all( "Dynamic Link", {"link_doctype": party_type, "link_name": party, "parenttype": "Contact"}, pluck="parent", From 5dd5784716e4ff5a2d8b82ee0f3750dd5e2defb9 Mon Sep 17 00:00:00 2001 From: Sanket322 Date: Thu, 13 Mar 2025 11:29:20 +0530 Subject: [PATCH 1410/1614] fix: use party explicitly (cherry picked from commit 5057e3fe30256a34d7e0f4da3e4ca1e01bcff933) --- .../report/accounts_receivable/accounts_receivable.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py index 2fcae9fa778..5a140ec3f2d 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py @@ -729,11 +729,12 @@ class ReceivablePayableReport: "company": self.filters.company, "update_outstanding_for_self": 0, } + or_filters = {} - for party_type in self.party_type: + if party_type := self.filters.party_type: party_field = scrub(party_type) - if self.filters.get(party_field): - or_filters.update({party_field: ["in", self.filters.get(party_field)]}) + if parties := self.filters.get("party"): + or_filters.update({party_field: ["in", parties]}) self.return_entries = frappe._dict( frappe.get_all( From 08525337516ad9432f570c99bc76fd7022889ab0 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 14 Mar 2025 12:33:37 +0530 Subject: [PATCH 1411/1614] Revert "fix: error when creating delivery note from pick list (backport #46417)" --- erpnext/stock/doctype/pick_list/pick_list.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/erpnext/stock/doctype/pick_list/pick_list.py b/erpnext/stock/doctype/pick_list/pick_list.py index a80a59a822d..31bff657fd1 100644 --- a/erpnext/stock/doctype/pick_list/pick_list.py +++ b/erpnext/stock/doctype/pick_list/pick_list.py @@ -1189,6 +1189,7 @@ def create_delivery_note(source_name, target_doc=None): if not all(item.sales_order for item in pick_list.locations): delivery_note = create_dn_wo_so(pick_list) + frappe.msgprint(_("Delivery Note(s) created for the Pick List")) return delivery_note @@ -1205,6 +1206,7 @@ def create_dn_wo_so(pick_list): }, } map_pl_locations(pick_list, item_table_mapper_without_so, delivery_note) + delivery_note.insert(ignore_mandatory=True) return delivery_note @@ -1232,7 +1234,10 @@ def create_dn_with_so(sales_dict, pick_list): # map all items of all sales orders of that customer for so in sales_dict[customer]: map_pl_locations(pick_list, item_table_mapper, delivery_note, so) + delivery_note.flags.ignore_mandatory = True + delivery_note.insert() update_packed_item_details(pick_list, delivery_note) + delivery_note.save() return delivery_note From 62feec5cc3b1d108717bca1590b65ca98cae915b Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Thu, 13 Mar 2025 17:28:48 +0530 Subject: [PATCH 1412/1614] fix: hide subcontracted qty field if PO is not subcontracted (cherry picked from commit 6e8521d7615352f244e1a3cb4f100ce7b5ca122d) --- .../doctype/purchase_order_item/purchase_order_item.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/erpnext/buying/doctype/purchase_order_item/purchase_order_item.json b/erpnext/buying/doctype/purchase_order_item/purchase_order_item.json index 894c705dc96..4473d021635 100644 --- a/erpnext/buying/doctype/purchase_order_item/purchase_order_item.json +++ b/erpnext/buying/doctype/purchase_order_item/purchase_order_item.json @@ -913,6 +913,7 @@ }, { "allow_on_submit": 1, + "depends_on": "eval:parent.is_subcontracted && !parent.is_old_subcontracting_flow", "fieldname": "subcontracted_quantity", "fieldtype": "Float", "label": "Subcontracted Quantity", @@ -926,7 +927,7 @@ "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2025-03-02 16:58:26.059601", + "modified": "2025-03-13 17:27:43.468602", "modified_by": "Administrator", "module": "Buying", "name": "Purchase Order Item", @@ -940,4 +941,4 @@ "sort_order": "DESC", "states": [], "track_changes": 1 -} \ No newline at end of file +} From 2f3dcc2137ab9b122992c40f8faa07c8361b151d Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Thu, 13 Mar 2025 18:33:39 +0530 Subject: [PATCH 1413/1614] fix: UOM conversion error when creating pick list from material transfer request (cherry picked from commit 840ea070a9514a88e83b51b3446c7ae9724062fe) --- erpnext/stock/doctype/pick_list/pick_list.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/pick_list/pick_list.py b/erpnext/stock/doctype/pick_list/pick_list.py index a80a59a822d..f7bd4657973 100644 --- a/erpnext/stock/doctype/pick_list/pick_list.py +++ b/erpnext/stock/doctype/pick_list/pick_list.py @@ -838,7 +838,7 @@ def get_items_with_location_and_quantity(item_doc, item_location_map, docstatus) item_location = frappe._dict(item_location) stock_qty = remaining_stock_qty if item_location.qty >= remaining_stock_qty else item_location.qty - qty = stock_qty / (item_doc.conversion_factor or 1) + qty = stock_qty * (item_doc.conversion_factor or 1) uom_must_be_whole_number = frappe.get_cached_value("UOM", item_doc.uom, "must_be_whole_number") if uom_must_be_whole_number: From be3e083e7d07ef460ddfe7918511b5f5ac6d6b1a Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Thu, 13 Mar 2025 20:19:47 +0530 Subject: [PATCH 1414/1614] fix: wrong field mapping (cherry picked from commit 8411e2e01f066b8b49049a94f3859079124f4019) --- erpnext/stock/doctype/material_request/material_request.py | 2 +- erpnext/stock/doctype/pick_list/pick_list.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/stock/doctype/material_request/material_request.py b/erpnext/stock/doctype/material_request/material_request.py index 69572e661f8..59634cb9f7c 100644 --- a/erpnext/stock/doctype/material_request/material_request.py +++ b/erpnext/stock/doctype/material_request/material_request.py @@ -813,7 +813,7 @@ def create_pick_list(source_name, target_doc=None): }, "Material Request Item": { "doctype": "Pick List Item", - "field_map": {"name": "material_request_item", "qty": "stock_qty"}, + "field_map": {"name": "material_request_item", "stock_qty": "stock_qty"}, }, }, target_doc, diff --git a/erpnext/stock/doctype/pick_list/pick_list.py b/erpnext/stock/doctype/pick_list/pick_list.py index f7bd4657973..a80a59a822d 100644 --- a/erpnext/stock/doctype/pick_list/pick_list.py +++ b/erpnext/stock/doctype/pick_list/pick_list.py @@ -838,7 +838,7 @@ def get_items_with_location_and_quantity(item_doc, item_location_map, docstatus) item_location = frappe._dict(item_location) stock_qty = remaining_stock_qty if item_location.qty >= remaining_stock_qty else item_location.qty - qty = stock_qty * (item_doc.conversion_factor or 1) + qty = stock_qty / (item_doc.conversion_factor or 1) uom_must_be_whole_number = frappe.get_cached_value("UOM", item_doc.uom, "must_be_whole_number") if uom_must_be_whole_number: From e2418101aba602123735d81053c7c3f374243058 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Thu, 13 Mar 2025 18:11:20 +0530 Subject: [PATCH 1415/1614] fix: get bom_no from sales order item and material request item (cherry picked from commit ac354505ef09079b2481421a53420736b45e923b) --- erpnext/manufacturing/doctype/production_plan/production_plan.py | 1 + erpnext/selling/doctype/sales_order/sales_order.py | 1 + 2 files changed, 2 insertions(+) diff --git a/erpnext/manufacturing/doctype/production_plan/production_plan.py b/erpnext/manufacturing/doctype/production_plan/production_plan.py index 7d134adb3cc..165e8746c5a 100644 --- a/erpnext/manufacturing/doctype/production_plan/production_plan.py +++ b/erpnext/manufacturing/doctype/production_plan/production_plan.py @@ -425,6 +425,7 @@ class ProductionPlan(Document): mr_item.item_code, mr_item.warehouse, mr_item.description, + mr_item.bom_no, ((mr_item.qty - mr_item.ordered_qty) * mr_item.conversion_factor).as_("pending_qty"), ) .distinct() diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py index 74e2328be24..4a026395425 100755 --- a/erpnext/selling/doctype/sales_order/sales_order.py +++ b/erpnext/selling/doctype/sales_order/sales_order.py @@ -876,6 +876,7 @@ def make_material_request(source_name, target_doc=None): "name": "sales_order_item", "parent": "sales_order", "delivery_date": "required_by", + "bom_no": "bom_no", }, "condition": lambda item: not frappe.db.exists( "Product Bundle", {"name": item.item_code, "disabled": 0} From 65a80cffe7082fe1dd13fd124228a8a66411e326 Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Fri, 14 Mar 2025 15:54:03 +0530 Subject: [PATCH 1416/1614] fix: also consider CRM Deal as party type for ERPNext CRM Integration (cherry picked from commit 04edbf7efe164c71afaa58f7a066ada72db03223) --- erpnext/public/js/utils/party.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/public/js/utils/party.js b/erpnext/public/js/utils/party.js index 623941755d1..a85423b8340 100644 --- a/erpnext/public/js/utils/party.js +++ b/erpnext/public/js/utils/party.js @@ -17,7 +17,7 @@ erpnext.utils.get_party_details = function (frm, method, args, callback) { (frm.doc.party_name && ["Quotation", "Opportunity"].includes(frm.doc.doctype)) ) { let party_type = "Customer"; - if (frm.doc.quotation_to && ["Lead", "Prospect"].includes(frm.doc.quotation_to)) { + if (frm.doc.quotation_to && ["Lead", "Prospect", "CRM Deal"].includes(frm.doc.quotation_to)) { party_type = frm.doc.quotation_to; } From b638aed7588b2237648a6c109819e6dfb489c99e Mon Sep 17 00:00:00 2001 From: Sagar Vora Date: Fri, 14 Mar 2025 23:51:30 +0530 Subject: [PATCH 1417/1614] fix: exclude current doc when checking for duplicate (cherry picked from commit d8ef5e4d580f3e5764a2c9e00fe051975c5a7e82) --- .../manufacturing/doctype/work_order/test_work_order.py | 1 + erpnext/stock/doctype/stock_entry/stock_entry.py | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/work_order/test_work_order.py b/erpnext/manufacturing/doctype/work_order/test_work_order.py index 205ca1dbdb4..84f2b75432c 100644 --- a/erpnext/manufacturing/doctype/work_order/test_work_order.py +++ b/erpnext/manufacturing/doctype/work_order/test_work_order.py @@ -42,6 +42,7 @@ class TestWorkOrder(FrappeTestCase): prepare_data_for_backflush_based_on_materials_transferred() def tearDown(self): + frappe.local.future_sle = {} frappe.db.rollback() def check_planned_qty(self): diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index 9b5f9dc9810..3f548a1324d 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -913,7 +913,12 @@ class StockEntry(StockController): if frappe.db.exists( "Stock Entry", - {"docstatus": 1, "work_order": self.work_order, "purpose": "Manufacture"}, + { + "docstatus": 1, + "work_order": self.work_order, + "purpose": "Manufacture", + "name": ("!=", self.name), + }, ): frappe.throw( _("Only one {0} entry can be created against the Work Order {1}").format( From 426222d8e000f028e4a31165c4f07488db26fbfe Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Thu, 13 Mar 2025 13:38:54 +0530 Subject: [PATCH 1418/1614] fix: dashboard link for QC from PR (cherry picked from commit 551f89f14b9f4e02dc164ce346a09c0a58c2ce07) --- erpnext/public/js/controllers/transaction.js | 2 +- .../doctype/purchase_receipt/purchase_receipt_dashboard.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 2fab91cbf88..5440fe8588e 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -335,7 +335,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe let d = locals[cdt][cdn]; return { filters: { - docstatus: 1, + docstatus: ("<", 2), inspection_type: inspection_type, reference_name: doc.name, item_code: d.item_code diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt_dashboard.py b/erpnext/stock/doctype/purchase_receipt/purchase_receipt_dashboard.py index 71489fbb494..b1b0a962246 100644 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt_dashboard.py +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt_dashboard.py @@ -11,12 +11,12 @@ def get_data(): "Auto Repeat": "reference_document", "Purchase Receipt": "return_against", "Stock Reservation Entry": "from_voucher_no", + "Quality Inspection": "reference_name", }, "internal_links": { "Material Request": ["items", "material_request"], "Purchase Order": ["items", "purchase_order"], "Project": ["items", "project"], - "Quality Inspection": ["items", "quality_inspection"], }, "transactions": [ { From d071a6c9001303d7a6c5eef600fd29e170e0b0b1 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Mon, 17 Mar 2025 16:06:54 +0530 Subject: [PATCH 1419/1614] fix: incorrect production item and bom no in job card --- erpnext/manufacturing/doctype/job_card/job_card.json | 5 ++--- erpnext/manufacturing/doctype/job_card/job_card.py | 6 ++---- erpnext/manufacturing/doctype/work_order/work_order.js | 7 +++++++ erpnext/manufacturing/doctype/work_order/work_order.py | 2 +- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/erpnext/manufacturing/doctype/job_card/job_card.json b/erpnext/manufacturing/doctype/job_card/job_card.json index 0f01704eb0f..39e7aac38ae 100644 --- a/erpnext/manufacturing/doctype/job_card/job_card.json +++ b/erpnext/manufacturing/doctype/job_card/job_card.json @@ -86,7 +86,6 @@ "search_index": 1 }, { - "fetch_from": "work_order.bom_no", "fieldname": "bom_no", "fieldtype": "Link", "label": "BOM No", @@ -281,7 +280,7 @@ "fieldtype": "Column Break" }, { - "fetch_from": "work_order.production_item", + "fetch_from": "bom_no.item", "fieldname": "production_item", "fieldtype": "Link", "label": "Production Item", @@ -511,7 +510,7 @@ ], "is_submittable": 1, "links": [], - "modified": "2023-06-28 19:23:14.345214", + "modified": "2025-03-17 15:55:11.143456", "modified_by": "Administrator", "module": "Manufacturing", "name": "Job Card", diff --git a/erpnext/manufacturing/doctype/job_card/job_card.py b/erpnext/manufacturing/doctype/job_card/job_card.py index 90ccff720e8..659bb01b4d4 100644 --- a/erpnext/manufacturing/doctype/job_card/job_card.py +++ b/erpnext/manufacturing/doctype/job_card/job_card.py @@ -64,9 +64,7 @@ class JobCard(Document): from erpnext.manufacturing.doctype.job_card_scheduled_time.job_card_scheduled_time import ( JobCardScheduledTime, ) - from erpnext.manufacturing.doctype.job_card_scrap_item.job_card_scrap_item import ( - JobCardScrapItem, - ) + from erpnext.manufacturing.doctype.job_card_scrap_item.job_card_scrap_item import JobCardScrapItem from erpnext.manufacturing.doctype.job_card_time_log.job_card_time_log import JobCardTimeLog actual_end_date: DF.Datetime | None @@ -91,7 +89,7 @@ class JobCard(Document): naming_series: DF.Literal["PO-JOB.#####"] operation: DF.Link operation_id: DF.Data | None - operation_row_number: DF.Literal + operation_row_number: DF.Literal[None] posting_date: DF.Date | None process_loss_qty: DF.Float production_item: DF.Link | None diff --git a/erpnext/manufacturing/doctype/work_order/work_order.js b/erpnext/manufacturing/doctype/work_order/work_order.js index df5027172ff..67233dc206c 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order.js +++ b/erpnext/manufacturing/doctype/work_order/work_order.js @@ -301,6 +301,12 @@ frappe.ui.form.on("Work Order", { label: __("Sequence Id"), read_only: 1, }, + { + fieldtype: "Link", + fieldname: "bom", + label: __("BOM"), + read_only: 1, + }, ], data: operations_data, in_place_edit: true, @@ -341,6 +347,7 @@ frappe.ui.form.on("Work Order", { qty: pending_qty, pending_qty: pending_qty, sequence_id: data.sequence_id, + bom: data.bom, }); } } diff --git a/erpnext/manufacturing/doctype/work_order/work_order.py b/erpnext/manufacturing/doctype/work_order/work_order.py index cd987099eb8..885978deece 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order.py +++ b/erpnext/manufacturing/doctype/work_order/work_order.py @@ -1616,7 +1616,7 @@ def create_job_card(work_order, row, enable_capacity_planning=False, auto_create "posting_date": nowdate(), "for_quantity": row.job_card_qty or work_order.get("qty", 0), "operation_id": row.get("name"), - "bom_no": work_order.bom_no, + "bom_no": row.get("bom"), "project": work_order.project, "company": work_order.company, "sequence_id": row.get("sequence_id"), From 59c653ef3fcce994b5840619cb4fc90b80587bfe Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Mon, 17 Mar 2025 13:00:32 +0530 Subject: [PATCH 1420/1614] fix: not able to select the item in the BOM (cherry picked from commit 96d0cd23f1c4660fbcddd93ede669ffad41f2a75) --- erpnext/manufacturing/doctype/bom/bom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py index 61f1de798e2..7f2d2acc00d 100644 --- a/erpnext/manufacturing/doctype/bom/bom.py +++ b/erpnext/manufacturing/doctype/bom/bom.py @@ -440,8 +440,8 @@ class BOM(WebsiteGenerator): "description": item and args["description"] or "", "image": item and args["image"] or "", "stock_uom": item and args["stock_uom"] or "", - "uom": args["uom"] if hasattr(args, "uom") else item and args["stock_uom"] or "", - "conversion_factor": args["conversion_factor"] if hasattr(args, "conversion_factor") else 1, + "uom": args["uom"] if args.get("uom") else item and args["stock_uom"] or "", + "conversion_factor": args["conversion_factor"] if args.get("conversion_factor") else 1, "bom_no": args["bom_no"], "rate": rate, "qty": args.get("qty") or args.get("stock_qty") or 1, From 46b6e621c2e4384e3650d7d3b32efcc0a5db3edc Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Mon, 17 Mar 2025 12:57:44 +0530 Subject: [PATCH 1421/1614] fix: Debit and Credit not equal for Purchase Invoice (cherry picked from commit ecb31b7c9f7ca644d8bbec4af6c549524584b2aa) --- .../purchase_invoice/purchase_invoice.py | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index 51b10932557..c32c62afc23 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -1330,6 +1330,37 @@ class PurchaseInvoice(BuyingController): warehouse_debit_amount = stock_amount + elif self.is_return and self.update_stock and self.is_internal_supplier and warehouse_debit_amount: + net_rate = item.base_net_amount + if item.sales_incoming_rate: # for internal transfer + net_rate = item.qty * item.sales_incoming_rate + + stock_amount = ( + net_rate + + item.item_tax_amount + + flt(item.landed_cost_voucher_amount) + + flt(item.get("amount_difference_with_purchase_invoice")) + ) + + if flt(stock_amount, net_amt_precision) != flt(warehouse_debit_amount, net_amt_precision): + cost_of_goods_sold_account = self.get_company_default("default_expense_account") + stock_adjustment_amt = stock_amount - warehouse_debit_amount + + gl_entries.append( + self.get_gl_dict( + { + "account": cost_of_goods_sold_account, + "against": item.expense_account, + "debit": stock_adjustment_amt, + "remarks": self.get("remarks") or _("Stock Adjustment"), + "cost_center": item.cost_center, + "project": item.project or self.project, + }, + account_currency, + item=item, + ) + ) + return warehouse_debit_amount def make_tax_gl_entries(self, gl_entries): From 34d6e4bdaa5780da8d8432ac0ed9b55008a78baf Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Mon, 17 Mar 2025 13:48:01 +0530 Subject: [PATCH 1422/1614] fix: performance issue for item list view (cherry picked from commit d758fde881dc5bba0c50faf587ad89b021855268) # Conflicts: # erpnext/stock/doctype/item_default/item_default.json --- erpnext/stock/doctype/item_default/item_default.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/item_default/item_default.json b/erpnext/stock/doctype/item_default/item_default.json index 28956612762..61d9ef49dec 100644 --- a/erpnext/stock/doctype/item_default/item_default.json +++ b/erpnext/stock/doctype/item_default/item_default.json @@ -40,7 +40,8 @@ "fieldtype": "Link", "in_list_view": 1, "label": "Default Warehouse", - "options": "Warehouse" + "options": "Warehouse", + "search_index": 1 }, { "fieldname": "column_break_3", @@ -139,7 +140,11 @@ ], "istable": 1, "links": [], +<<<<<<< HEAD "modified": "2023-09-04 12:33:14.607267", +======= + "modified": "2025-03-17 13:46:09.719105", +>>>>>>> d758fde881 (fix: performance issue for item list view) "modified_by": "Administrator", "module": "Stock", "name": "Item Default", From ea68caec7d1c4210f1111b19baa93408b7e3c3a9 Mon Sep 17 00:00:00 2001 From: venkat102 Date: Mon, 17 Mar 2025 16:13:42 +0530 Subject: [PATCH 1423/1614] fix(Transaction Deletion Record): sql syntax error while fetching lead address (cherry picked from commit af0d6eeae8fdcc7f033e8378fbbca73ee5998e4c) --- .../transaction_deletion_record.py | 49 +++++++++++-------- 1 file changed, 28 insertions(+), 21 deletions(-) diff --git a/erpnext/setup/doctype/transaction_deletion_record/transaction_deletion_record.py b/erpnext/setup/doctype/transaction_deletion_record/transaction_deletion_record.py index ce3f918f7eb..edb55f5dc46 100644 --- a/erpnext/setup/doctype/transaction_deletion_record/transaction_deletion_record.py +++ b/erpnext/setup/doctype/transaction_deletion_record/transaction_deletion_record.py @@ -220,35 +220,42 @@ class TransactionDeletionRecord(Document): """Delete addresses to which leads are linked""" self.validate_doc_status() if not self.delete_leads_and_addresses: - leads = frappe.get_all("Lead", filters={"company": self.company}) - leads = ["'%s'" % row.get("name") for row in leads] + leads = frappe.db.get_all("Lead", filters={"company": self.company}, pluck="name") addresses = [] if leads: - addresses = frappe.db.sql_list( - """select parent from `tabDynamic Link` where link_name - in ({leads})""".format(leads=",".join(leads)) + addresses = frappe.db.get_all( + "Dynamic Link", filters={"link_name": ("in", leads)}, pluck="parent" ) - if addresses: addresses = ["%s" % frappe.db.escape(addr) for addr in addresses] - frappe.db.sql( - """delete from `tabAddress` where name in ({addresses}) and - name not in (select distinct dl1.parent from `tabDynamic Link` dl1 - inner join `tabDynamic Link` dl2 on dl1.parent=dl2.parent - and dl1.link_doctype<>dl2.link_doctype)""".format(addresses=",".join(addresses)) - ) + address = qb.DocType("Address") + dl1 = qb.DocType("Dynamic Link") + dl2 = qb.DocType("Dynamic Link") - frappe.db.sql( - """delete from `tabDynamic Link` where link_doctype='Lead' - and parenttype='Address' and link_name in ({leads})""".format(leads=",".join(leads)) - ) + qb.from_(address).delete().where( + (address.name.isin(addresses)) + & ( + address.name.notin( + qb.from_(dl1) + .join(dl2) + .on((dl1.parent == dl2.parent) & (dl1.link_doctype != dl2.link_doctype)) + .select(dl1.parent) + .distinct() + ) + ) + ).run() + + dynamic_link = qb.DocType("Dynamic Link") + qb.from_(dynamic_link).delete().where( + (dynamic_link.link_doctype == "Lead") + & (dynamic_link.parenttype == "Address") + & (dynamic_link.link_name.isin(leads)) + ).run() + + customer = qb.DocType("Customer") + qb.update(customer).set(customer.lead_name, None).where(customer.lead_name.isin(leads)).run() - frappe.db.sql( - """update `tabCustomer` set lead_name=NULL where lead_name in ({leads})""".format( - leads=",".join(leads) - ) - ) self.db_set("delete_leads_and_addresses", 1) self.enqueue_task(task="Reset Company Values") From 7cfd7e6539404be3087838bae04569f8f76da332 Mon Sep 17 00:00:00 2001 From: Ejaaz Khan Date: Mon, 17 Mar 2025 19:34:04 +0530 Subject: [PATCH 1424/1614] refactor: remove default print format from sales invoice (cherry picked from commit f10d1f2b1f64e6b65ba07a9009635c0fef4bd40f) --- erpnext/accounts/doctype/sales_invoice/sales_invoice.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json index e2c5fd965e8..0c19e79ccd4 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json @@ -3,7 +3,6 @@ "allow_import": 1, "autoname": "naming_series:", "creation": "2022-01-25 10:29:57.771398", - "default_print_format": "Sales Invoice Print", "doctype": "DocType", "engine": "InnoDB", "field_order": [ @@ -2189,7 +2188,7 @@ "link_fieldname": "consolidated_invoice" } ], - "modified": "2025-03-05 17:06:59.720616", + "modified": "2025-03-17 19:32:31.809658", "modified_by": "Administrator", "module": "Accounts", "name": "Sales Invoice", @@ -2245,4 +2244,4 @@ "title_field": "title", "track_changes": 1, "track_seen": 1 -} \ No newline at end of file +} From 01bab8f22be42a1ff2c5237c186a2d860f5b5ca8 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 17 Mar 2025 21:23:30 +0530 Subject: [PATCH 1425/1614] perf: faster count estimation (backport #46550) (#46551) perf: faster count estimation (#46550) These count queries themselves take quite a long time. `estimate_count` uses info_schema stats to guess the time. Co-authored-by: Nabin Hait (cherry picked from commit e47a87839bcd6ff78298bec017dd1a57b39228e3) Co-authored-by: Ankush Menat --- .../period_closing_voucher.py | 12 +----------- .../batch_wise_balance_history.py | 15 ++------------- 2 files changed, 3 insertions(+), 24 deletions(-) diff --git a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py index 7e0145e91a4..790ada3f63e 100644 --- a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py +++ b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py @@ -139,7 +139,7 @@ class PeriodClosingVoucher(AccountsController): self.cancel_gl_entries() def make_gl_entries(self): - if self.get_gle_count_in_selected_period() > 5000: + if frappe.db.estimate_count("GL Entry") > 100_000: frappe.enqueue( process_gl_and_closing_entries, doc=self, @@ -154,16 +154,6 @@ class PeriodClosingVoucher(AccountsController): else: process_gl_and_closing_entries(self) - def get_gle_count_in_selected_period(self): - return frappe.db.count( - "GL Entry", - { - "posting_date": ["between", [self.period_start_date, self.period_end_date]], - "company": self.company, - "is_cancelled": 0, - }, - ) - def get_pcv_gl_entries(self): self.pl_accounts_reverse_gle = [] self.closing_account_gle = [] diff --git a/erpnext/stock/report/batch_wise_balance_history/batch_wise_balance_history.py b/erpnext/stock/report/batch_wise_balance_history/batch_wise_balance_history.py index df466ed8436..dabd3b1c6e4 100644 --- a/erpnext/stock/report/batch_wise_balance_history/batch_wise_balance_history.py +++ b/erpnext/stock/report/batch_wise_balance_history/batch_wise_balance_history.py @@ -10,25 +10,14 @@ from pypika import functions as fn from erpnext.stock.doctype.warehouse.warehouse import apply_warehouse_filter -SLE_COUNT_LIMIT = 10_000 - - -def _estimate_table_row_count(doctype: str): - table = get_table_name(doctype) - return cint( - frappe.db.sql( - f"""select table_rows - from information_schema.tables - where table_name = '{table}' ;""" - )[0][0] - ) +SLE_COUNT_LIMIT = 100_000 def execute(filters=None): if not filters: filters = {} - sle_count = _estimate_table_row_count("Stock Ledger Entry") + sle_count = frappe.db.estimate_count("Stock Ledger Entry") if ( sle_count > SLE_COUNT_LIMIT From 3e2749d6d516e9686567bdce79f77309b2a40c07 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Thu, 13 Mar 2025 14:23:51 +0530 Subject: [PATCH 1426/1614] fix: use base currency total (cherry picked from commit 46f4babcd081d6d4b61dde714a48737d0f13609f) --- erpnext/regional/report/uae_vat_201/uae_vat_201.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/erpnext/regional/report/uae_vat_201/uae_vat_201.py b/erpnext/regional/report/uae_vat_201/uae_vat_201.py index 1b77b3c0dd1..1a68d7dec6a 100644 --- a/erpnext/regional/report/uae_vat_201/uae_vat_201.py +++ b/erpnext/regional/report/uae_vat_201/uae_vat_201.py @@ -179,7 +179,7 @@ def get_reverse_charge_total(filters): try: return ( frappe.db.get_all( - "Purchase Invoice", filters=query_filters, fields=["sum(total)"], as_list=True, limit=1 + "Purchase Invoice", filters=query_filters, fields=["sum(base_total)"], as_list=True, limit=1 )[0][0] or 0 ) @@ -219,7 +219,7 @@ def get_reverse_charge_recoverable_total(filters): try: return ( frappe.db.get_all( - "Purchase Invoice", filters=query_filters, fields=["sum(total)"], as_list=True, limit=1 + "Purchase Invoice", filters=query_filters, fields=["sum(base_total)"], as_list=True, limit=1 )[0][0] or 0 ) @@ -274,7 +274,7 @@ def get_standard_rated_expenses_total(filters): try: return ( frappe.db.get_all( - "Purchase Invoice", filters=query_filters, fields=["sum(total)"], as_list=True, limit=1 + "Purchase Invoice", filters=query_filters, fields=["sum(base_total)"], as_list=True, limit=1 )[0][0] or 0 ) @@ -310,7 +310,7 @@ def get_tourist_tax_return_total(filters): try: return ( frappe.db.get_all( - "Sales Invoice", filters=query_filters, fields=["sum(total)"], as_list=True, limit=1 + "Sales Invoice", filters=query_filters, fields=["sum(base_total)"], as_list=True, limit=1 )[0][0] or 0 ) From ec43ca97cb74cff00222f72f091e5c5d917de58b Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Fri, 14 Mar 2025 11:50:16 +0530 Subject: [PATCH 1427/1614] test: report ouput on foreign currency PI (cherry picked from commit e80129627af1382fffffe54298b0945a21c7c646) --- .../report/uae_vat_201/test_uae_vat_201.py | 34 +++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/erpnext/regional/report/uae_vat_201/test_uae_vat_201.py b/erpnext/regional/report/uae_vat_201/test_uae_vat_201.py index 2966b0657a4..cab84024417 100644 --- a/erpnext/regional/report/uae_vat_201/test_uae_vat_201.py +++ b/erpnext/regional/report/uae_vat_201/test_uae_vat_201.py @@ -39,11 +39,10 @@ class TestUaeVat201(TestCase): make_item("_Test UAE VAT Zero Rated Item", properties={"is_zero_rated": 1, "is_exempt": 0}) make_item("_Test UAE VAT Exempt Item", properties={"is_zero_rated": 0, "is_exempt": 1}) + def test_uae_vat_201_report(self): make_sales_invoices() - create_purchase_invoices() - def test_uae_vat_201_report(self): filters = {"company": "_Test Company UAE VAT"} total_emiratewise = get_total_emiratewise(filters) amounts_by_emirate = {} @@ -64,6 +63,37 @@ class TestUaeVat201(TestCase): self.assertEqual(get_standard_rated_expenses_total(filters), 250) self.assertEqual(get_standard_rated_expenses_tax(filters), 1) + def test_uae_vat_201_report_with_foreign_transaction(self): + pi = make_purchase_invoice( + company="_Test Company UAE VAT", + supplier="_Test UAE Supplier", + supplier_warehouse="_Test UAE VAT Supplier Warehouse - _TCUV", + warehouse="_Test UAE VAT Supplier Warehouse - _TCUV", + currency="USD", + conversion_rate=3.67, + cost_center="Main - _TCUV", + expense_account="Cost of Goods Sold - _TCUV", + item="_Test UAE VAT Item", + do_not_save=1, + uom="Nos", + ) + pi.append( + "taxes", + { + "charge_type": "On Net Total", + "account_head": "VAT 5% - _TCUV", + "cost_center": "Main - _TCUV", + "description": "VAT 5% @ 5.0", + "rate": 5.0, + }, + ) + pi.recoverable_standard_rated_expenses = 50 + pi.save().submit() + + filters = {"company": "_Test Company UAE VAT"} + self.assertEqual(get_standard_rated_expenses_total(filters), 917.5) + self.assertEqual(get_standard_rated_expenses_tax(filters), 50) + def make_company(company_name, abbr): if not frappe.db.exists("Company", company_name): From e6dd3f3e647b59d04f83aba7ddd0a760c7f13896 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 17 Mar 2025 20:28:34 +0530 Subject: [PATCH 1428/1614] fix: set correct currency for offset account gl entries (cherry picked from commit c32e11e69dc1bfe8b433a4b4c63dfcb4439a4d6c) --- erpnext/accounts/general_ledger.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/erpnext/accounts/general_ledger.py b/erpnext/accounts/general_ledger.py index cb267972c70..c5ee7400473 100644 --- a/erpnext/accounts/general_ledger.py +++ b/erpnext/accounts/general_ledger.py @@ -81,6 +81,10 @@ def make_acc_dimensions_offsetting_entry(gl_map): "credit_in_account_currency": credit, "remarks": _("Offsetting for Accounting Dimension") + f" - {dimension.name}", "against_voucher": None, + "account_currency": dimension.account_currency, + # Party Type and Party are restricted to Receivable and Payable accounts + "party_type": None, + "party": None, } ) offsetting_entry["against_voucher_type"] = None @@ -108,6 +112,9 @@ def get_accounting_dimensions_for_offsetting_entry(gl_map, company): accounting_dimensions_to_offset = [] for acc_dimension in acc_dimensions: values = set([entry.get(acc_dimension.fieldname) for entry in gl_map]) + acc_dimension.account_currency = frappe.get_cached_value( + "Account", acc_dimension.offsetting_account, "account_currency" + ) if len(values) > 1: accounting_dimensions_to_offset.append(acc_dimension) From e8047ab2cab4b7cd694dabdbb984a54f09b27c74 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Tue, 18 Mar 2025 12:01:11 +0530 Subject: [PATCH 1429/1614] chore: fix conflicts --- erpnext/stock/doctype/item_default/item_default.json | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/erpnext/stock/doctype/item_default/item_default.json b/erpnext/stock/doctype/item_default/item_default.json index 61d9ef49dec..04212b31795 100644 --- a/erpnext/stock/doctype/item_default/item_default.json +++ b/erpnext/stock/doctype/item_default/item_default.json @@ -140,11 +140,7 @@ ], "istable": 1, "links": [], -<<<<<<< HEAD - "modified": "2023-09-04 12:33:14.607267", -======= "modified": "2025-03-17 13:46:09.719105", ->>>>>>> d758fde881 (fix: performance issue for item list view) "modified_by": "Administrator", "module": "Stock", "name": "Item Default", @@ -155,4 +151,4 @@ "sort_order": "DESC", "states": [], "track_changes": 1 -} \ No newline at end of file +} From 8162fb3e5d3beeae5bc0b3d0ecc1e1e0686da20e Mon Sep 17 00:00:00 2001 From: Smit Vora Date: Thu, 13 Mar 2025 18:33:22 +0530 Subject: [PATCH 1430/1614] fix: ensure qty conversion when creating production plan from SO (cherry picked from commit 75882cc81c222adddf48b48973634527408bb5b3) --- .../manufacturing/doctype/production_plan/production_plan.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/manufacturing/doctype/production_plan/production_plan.py b/erpnext/manufacturing/doctype/production_plan/production_plan.py index 165e8746c5a..cfd3f789e78 100644 --- a/erpnext/manufacturing/doctype/production_plan/production_plan.py +++ b/erpnext/manufacturing/doctype/production_plan/production_plan.py @@ -363,8 +363,8 @@ class ProductionPlan(Document): for item in items: item.pending_qty = ( - flt(item.qty) - max(item.work_order_qty, item.delivered_qty, 0) * item.conversion_factor - ) + flt(item.qty) - max(item.work_order_qty, item.delivered_qty, 0) + ) * item.conversion_factor pi = frappe.qb.DocType("Packed Item") From cd0abbae51049a9603f51367364b326073897f5b Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Tue, 18 Mar 2025 13:08:48 +0530 Subject: [PATCH 1431/1614] fix: fetch quality inspection parameter group (cherry picked from commit 0a482c7ea85ed0e8a2f0f6259c05b9f2e4d66667) --- erpnext/stock/doctype/quality_inspection/quality_inspection.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/stock/doctype/quality_inspection/quality_inspection.py b/erpnext/stock/doctype/quality_inspection/quality_inspection.py index 714db645ca6..7c6b892416b 100644 --- a/erpnext/stock/doctype/quality_inspection/quality_inspection.py +++ b/erpnext/stock/doctype/quality_inspection/quality_inspection.py @@ -181,6 +181,9 @@ class QualityInspection(Document): child = self.append("readings", {}) child.update(d) child.status = "Accepted" + child.parameter_group = frappe.get_value( + "Quality Inspection Parameter", d.specification, "parameter_group" + ) @frappe.whitelist() def get_quality_inspection_template(self): From bc408d979a0ea7fbc3c1bacc6200bb8197233ddb Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Mon, 17 Mar 2025 13:11:46 +0530 Subject: [PATCH 1432/1614] fix: add validation to rename_subcontracting_fields patch (cherry picked from commit 6c3117dc0de3bb76ba23612bca47c654c0e5a9f5) --- erpnext/patches/v15_0/rename_subcontracting_fields.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/erpnext/patches/v15_0/rename_subcontracting_fields.py b/erpnext/patches/v15_0/rename_subcontracting_fields.py index d18d6149cac..a32b4fcb660 100644 --- a/erpnext/patches/v15_0/rename_subcontracting_fields.py +++ b/erpnext/patches/v15_0/rename_subcontracting_fields.py @@ -3,5 +3,12 @@ from frappe.model.utils.rename_field import rename_field def execute(): - rename_field("Purchase Order Item", "sco_qty", "subcontracted_quantity") - rename_field("Subcontracting Order Item", "sc_conversion_factor", "subcontracting_conversion_factor") + if frappe.db.table_exists("Purchase Order Item") and frappe.db.has_column( + "Purchase Order Item", "sco_qty" + ): + rename_field("Purchase Order Item", "sco_qty", "subcontracted_quantity") + + if frappe.db.table_exists("Subcontracting Order Item") and frappe.db.has_column( + "Subcontracting Order Item", "sc_conversion_factor" + ): + rename_field("Subcontracting Order Item", "sc_conversion_factor", "subcontracting_conversion_factor") From 2144f8962478840729218c5aa65934a70e414d03 Mon Sep 17 00:00:00 2001 From: Khushi Rawat <142375893+khushi8112@users.noreply.github.com> Date: Tue, 18 Mar 2025 15:59:58 +0530 Subject: [PATCH 1433/1614] fix: repost future sle and gle after capitalization (#46576) (cherry picked from commit 29d77aa19f1a514bfbb29e517791a91ca1c1f088) --- .../assets/doctype/asset_capitalization/asset_capitalization.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/erpnext/assets/doctype/asset_capitalization/asset_capitalization.py b/erpnext/assets/doctype/asset_capitalization/asset_capitalization.py index f4addb66eb9..1d36eae1d61 100644 --- a/erpnext/assets/doctype/asset_capitalization/asset_capitalization.py +++ b/erpnext/assets/doctype/asset_capitalization/asset_capitalization.py @@ -123,6 +123,7 @@ class AssetCapitalization(StockController): self.make_bundle_using_old_serial_batch_fields() self.update_stock_ledger() self.make_gl_entries() + self.repost_future_sle_and_gle() self.update_target_asset() def on_cancel(self): @@ -136,6 +137,7 @@ class AssetCapitalization(StockController): ) self.update_stock_ledger() self.make_gl_entries() + self.repost_future_sle_and_gle() self.restore_consumed_asset_items() def set_title(self): From 5f1bb1f1ba12671bb2e04ce80ce8b6b706183d9c Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Tue, 18 Mar 2025 14:42:40 +0530 Subject: [PATCH 1434/1614] fix: valuation for moving average with batches (cherry picked from commit cdfbc73f4cbafee83dcd2cc1ba72a162546c7855) --- erpnext/stock/deprecated_serial_batch.py | 4 ---- erpnext/stock/doctype/batch/batch.py | 6 ++++++ .../stock/doctype/purchase_receipt/test_purchase_receipt.py | 2 +- .../doctype/stock_ledger_entry/test_stock_ledger_entry.py | 2 +- erpnext/stock/serial_batch_bundle.py | 6 ++++++ 5 files changed, 14 insertions(+), 6 deletions(-) diff --git a/erpnext/stock/deprecated_serial_batch.py b/erpnext/stock/deprecated_serial_batch.py index f946f459c07..359027ec6be 100644 --- a/erpnext/stock/deprecated_serial_batch.py +++ b/erpnext/stock/deprecated_serial_batch.py @@ -228,7 +228,6 @@ class DeprecatedBatchNoValuation: (sle.item_code == self.sle.item_code) & (sle.warehouse == self.sle.warehouse) & (sle.batch_no.isnotnull()) - & (batch.use_batchwise_valuation == 0) & (sle.is_cancelled == 0) & (sle.batch_no.isin(self.non_batchwise_valuation_batches)) ) @@ -278,7 +277,6 @@ class DeprecatedBatchNoValuation: (sle.item_code == self.sle.item_code) & (sle.warehouse == self.sle.warehouse) & (sle.batch_no.isnotnull()) - & (batch.use_batchwise_valuation == 0) & (sle.is_cancelled == 0) ) .where(timestamp_condition) @@ -318,7 +316,6 @@ class DeprecatedBatchNoValuation: (sabb.item_code == self.sle.item_code) & (sabb.warehouse == self.sle.warehouse) & (sabb_entry.batch_no.isnotnull()) - & (batch.use_batchwise_valuation == 0) & (sabb.is_cancelled == 0) & (sabb.docstatus == 1) ) @@ -378,7 +375,6 @@ class DeprecatedBatchNoValuation: (bundle.item_code == self.sle.item_code) & (bundle.warehouse == self.sle.warehouse) & (bundle_child.batch_no.isnotnull()) - & (batch.use_batchwise_valuation == 0) & (bundle.is_cancelled == 0) & (bundle.docstatus == 1) & (bundle.type_of_transaction.isin(["Inward", "Outward"])) diff --git a/erpnext/stock/doctype/batch/batch.py b/erpnext/stock/doctype/batch/batch.py index ae77672b730..4aeb165c7b5 100644 --- a/erpnext/stock/doctype/batch/batch.py +++ b/erpnext/stock/doctype/batch/batch.py @@ -157,7 +157,13 @@ class Batch(Document): frappe.throw(_("The selected item cannot have Batch")) def set_batchwise_valuation(self): + from erpnext.stock.utils import get_valuation_method + if self.is_new(): + if get_valuation_method(self.item) != "FIFO": + self.use_batchwise_valuation = 0 + return + if frappe.db.get_single_value("Stock Settings", "do_not_use_batchwise_valuation"): self.use_batchwise_valuation = 0 return diff --git a/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py index 9cf9f4d4958..4f22d83244e 100644 --- a/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py +++ b/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py @@ -3327,7 +3327,7 @@ class TestPurchaseReceipt(FrappeTestCase): bundle = dn.items[0].serial_and_batch_bundle valuation_rate = frappe.db.get_value("Serial and Batch Bundle", bundle, "avg_rate") - self.assertEqual(valuation_rate, 100) + self.assertEqual(valuation_rate, 150) doc = frappe.get_doc("Stock Settings") doc.do_not_use_batchwise_valuation = 1 diff --git a/erpnext/stock/doctype/stock_ledger_entry/test_stock_ledger_entry.py b/erpnext/stock/doctype/stock_ledger_entry/test_stock_ledger_entry.py index 42e402e0005..c0171b7a710 100644 --- a/erpnext/stock/doctype/stock_ledger_entry/test_stock_ledger_entry.py +++ b/erpnext/stock/doctype/stock_ledger_entry/test_stock_ledger_entry.py @@ -484,7 +484,7 @@ class TestStockLedgerEntry(FrappeTestCase, StockTestMixin): dns = create_delivery_note_entries_for_batchwise_item_valuation_test(dn_entry_list) sle_details = fetch_sle_details_for_doc_list(dns, ["stock_value_difference"]) svd_list = [-1 * d["stock_value_difference"] for d in sle_details] - expected_incoming_rates = expected_abs_svd = [75.0, 125.0, 75.0, 125.0] + expected_incoming_rates = expected_abs_svd = [100.0, 100.0, 100.0, 100.0] self.assertEqual(expected_abs_svd, svd_list, "Incorrect 'Stock Value Difference' values") for dn, _incoming_rate in zip(dns, expected_incoming_rates, strict=False): diff --git a/erpnext/stock/serial_batch_bundle.py b/erpnext/stock/serial_batch_bundle.py index c88df01665f..8e64b4e856f 100644 --- a/erpnext/stock/serial_batch_bundle.py +++ b/erpnext/stock/serial_batch_bundle.py @@ -683,6 +683,8 @@ class BatchNoValuation(DeprecatedBatchNoValuation): return query.run(as_dict=True) def prepare_batches(self): + from erpnext.stock.utils import get_valuation_method + self.batches = self.batch_nos if isinstance(self.batch_nos, dict): self.batches = list(self.batch_nos.keys()) @@ -690,6 +692,10 @@ class BatchNoValuation(DeprecatedBatchNoValuation): self.batchwise_valuation_batches = [] self.non_batchwise_valuation_batches = [] + if get_valuation_method(self.sle.item_code) == "Moving Average": + self.non_batchwise_valuation_batches = self.batches + return + batches = frappe.get_all( "Batch", filters={"name": ("in", self.batches), "use_batchwise_valuation": 1}, fields=["name"] ) From 2d6626e9063489b7d46a5cdf5952e93580b41782 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Tue, 18 Mar 2025 16:28:31 +0530 Subject: [PATCH 1435/1614] fix: SABB validation for packed items (cherry picked from commit 3756bf231b496fff01706d76eaa5a8b3afee5d70) --- .../serial_and_batch_bundle/serial_and_batch_bundle.py | 5 +++++ 1 file changed, 5 insertions(+) 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 d30cf84d93e..8502c0cc3cc 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 @@ -145,6 +145,11 @@ class SerialandBatchBundle(Document): ) elif not frappe.db.exists("Stock Ledger Entry", {"voucher_detail_no": self.voucher_detail_no}): + if self.voucher_type == "Delivery Note" and frappe.db.exists( + "Packed Item", self.voucher_detail_no + ): + return + frappe.throw( _("The serial and batch bundle {0} not linked to {1} {2}").format( bold(self.name), self.voucher_type, bold(self.voucher_no) From 95718acc9a9a24ee5982313bc3f9481277a0f93d Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Tue, 18 Mar 2025 18:41:57 +0530 Subject: [PATCH 1436/1614] test: test case for FIFO batch valuation (cherry picked from commit ad9ac1f058703b6e7b9b2930a355787bed149448) --- erpnext/stock/doctype/batch/batch.py | 2 +- .../test_stock_ledger_entry.py | 39 +++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/batch/batch.py b/erpnext/stock/doctype/batch/batch.py index 4aeb165c7b5..47acebb6634 100644 --- a/erpnext/stock/doctype/batch/batch.py +++ b/erpnext/stock/doctype/batch/batch.py @@ -160,7 +160,7 @@ class Batch(Document): from erpnext.stock.utils import get_valuation_method if self.is_new(): - if get_valuation_method(self.item) != "FIFO": + if get_valuation_method(self.item) == "Moving Average": self.use_batchwise_valuation = 0 return diff --git a/erpnext/stock/doctype/stock_ledger_entry/test_stock_ledger_entry.py b/erpnext/stock/doctype/stock_ledger_entry/test_stock_ledger_entry.py index c0171b7a710..8658316ad90 100644 --- a/erpnext/stock/doctype/stock_ledger_entry/test_stock_ledger_entry.py +++ b/erpnext/stock/doctype/stock_ledger_entry/test_stock_ledger_entry.py @@ -456,6 +456,45 @@ class TestStockLedgerEntry(FrappeTestCase, StockTestMixin): frappe.set_user("Administrator") user.remove_roles("Stock Manager") + def test_batchwise_item_valuation_fifo(self): + item, warehouses, batches = setup_item_valuation_test(valuation_method="FIFO") + + # Incoming Entries for Stock Value check + pr_entry_list = [ + (item, warehouses[0], batches[0], 1, 100), + (item, warehouses[0], batches[1], 1, 50), + (item, warehouses[0], batches[0], 1, 150), + (item, warehouses[0], batches[1], 1, 100), + ] + prs = create_purchase_receipt_entries_for_batchwise_item_valuation_test(pr_entry_list) + sle_details = fetch_sle_details_for_doc_list(prs, ["stock_value"]) + sv_list = [d["stock_value"] for d in sle_details] + expected_sv = [100, 150, 300, 400] + self.assertEqual(expected_sv, sv_list, "Incorrect 'Stock Value' values") + + # Outgoing Entries for Stock Value Difference check + dn_entry_list = [ + (item, warehouses[0], batches[1], 1, 200), + (item, warehouses[0], batches[0], 1, 200), + (item, warehouses[0], batches[1], 1, 200), + (item, warehouses[0], batches[0], 1, 200), + ] + + frappe.flags.use_serial_and_batch_fields = True + dns = create_delivery_note_entries_for_batchwise_item_valuation_test(dn_entry_list) + sle_details = fetch_sle_details_for_doc_list(dns, ["stock_value_difference"]) + svd_list = [-1 * d["stock_value_difference"] for d in sle_details] + expected_incoming_rates = expected_abs_svd = [75.0, 125.0, 75.0, 125.0] + + self.assertEqual(expected_abs_svd, svd_list, "Incorrect 'Stock Value Difference' values") + for dn, _incoming_rate in zip(dns, expected_incoming_rates, strict=False): + self.assertTrue( + dn.items[0].incoming_rate in expected_abs_svd, + "Incorrect 'Incoming Rate' values fetched for DN items", + ) + + frappe.flags.use_serial_and_batch_fields = False + def test_batchwise_item_valuation_moving_average(self): item, warehouses, batches = setup_item_valuation_test(valuation_method="Moving Average") From 8e19b46bd93f4353f4922c628ccfc9de8b83c94c Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Tue, 18 Mar 2025 21:26:25 +0530 Subject: [PATCH 1437/1614] fix: debit in transaction currency (cherry picked from commit e4acf20a62727ea94c439ec81a877fff8950198e) --- erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index c32c62afc23..98d1850bd8f 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -1318,7 +1318,7 @@ class PurchaseInvoice(BuyingController): "account": cost_of_goods_sold_account, "against": item.expense_account, "debit": stock_adjustment_amt, - "debit_in_transaction_currency": item.net_amount, + "debit_in_transaction_currency": stock_adjustment_amt / self.conversion_rate, "remarks": self.get("remarks") or _("Stock Adjustment"), "cost_center": item.cost_center, "project": item.project or self.project, @@ -1352,6 +1352,7 @@ class PurchaseInvoice(BuyingController): "account": cost_of_goods_sold_account, "against": item.expense_account, "debit": stock_adjustment_amt, + "debit_in_transaction_currency": stock_adjustment_amt / self.conversion_rate, "remarks": self.get("remarks") or _("Stock Adjustment"), "cost_center": item.cost_center, "project": item.project or self.project, From d62960e9253d6b1d0aec57e257f60f10c3ea2f14 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Tue, 18 Mar 2025 21:20:40 +0530 Subject: [PATCH 1438/1614] fix: not able to make PR against stand alone Debit Note (cherry picked from commit 6a52c30591b8202a73ff87672a54fe9ea21c6ff5) --- erpnext/public/js/controllers/buying.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/public/js/controllers/buying.js b/erpnext/public/js/controllers/buying.js index a705ce62f2b..cbc59867e46 100644 --- a/erpnext/public/js/controllers/buying.js +++ b/erpnext/public/js/controllers/buying.js @@ -194,7 +194,7 @@ erpnext.buying = { } qty(doc, cdt, cdn) { - if ((doc.doctype == "Purchase Receipt") || (doc.doctype == "Purchase Invoice" && (doc.update_stock || doc.is_return))) { + if ((doc.doctype == "Purchase Receipt") || (doc.doctype == "Purchase Invoice" && doc.update_stock)) { this.calculate_received_qty(doc, cdt, cdn) } super.qty(doc, cdt, cdn); From 3834d6fbce4a52f356c36a1915566aa7a43d99be Mon Sep 17 00:00:00 2001 From: Marc Ramser Date: Wed, 19 Mar 2025 09:04:15 +0100 Subject: [PATCH 1439/1614] feat(projects): add option to hide timesheets for project users (#46173) * feat: add option to hide timesheets for project users * Added a new "Hide timesheets" checkbox field to Project User doctype that allows to control timesheet visibility for specific users. When enabled, the timesheets section will not be displayed on the project page for that user. * Update projects.html (cherry picked from commit f4aba561ce894bc6d9fded0330b265d07414c330) --- erpnext/projects/doctype/project_user/project_user.json | 8 ++++++++ erpnext/templates/pages/projects.html | 6 ++---- erpnext/templates/pages/projects.py | 5 +++-- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/erpnext/projects/doctype/project_user/project_user.json b/erpnext/projects/doctype/project_user/project_user.json index 2f452cc2d75..e82bbfab7bf 100644 --- a/erpnext/projects/doctype/project_user/project_user.json +++ b/erpnext/projects/doctype/project_user/project_user.json @@ -12,6 +12,7 @@ "full_name", "welcome_email_sent", "view_attachments", + "hide_timesheets", "section_break_5", "project_status" ], @@ -64,6 +65,13 @@ "in_list_view": 1, "label": "View attachments" }, + { + "columns": 2, + "default": "0", + "fieldname": "hide_timesheets", + "fieldtype": "Check", + "label": "Hide timesheets" + }, { "fieldname": "section_break_5", "fieldtype": "Section Break" diff --git a/erpnext/templates/pages/projects.html b/erpnext/templates/pages/projects.html index 3b8698f4ab2..d88088c9819 100644 --- a/erpnext/templates/pages/projects.html +++ b/erpnext/templates/pages/projects.html @@ -56,8 +56,8 @@ {{ empty_state(_("Task")) }} {% endif %} - {% if doc.timesheets %} +
@@ -73,8 +73,6 @@ {% include "erpnext/templates/includes/projects/project_timesheets.html" %}
- {% else %} - {{ empty_state(_("Timesheet")) }} {% endif %} {% if doc.attachments %} @@ -136,4 +134,4 @@
-{% endmacro %} \ No newline at end of file +{% endmacro %} diff --git a/erpnext/templates/pages/projects.py b/erpnext/templates/pages/projects.py index 787c7c0069b..446437bbb32 100644 --- a/erpnext/templates/pages/projects.py +++ b/erpnext/templates/pages/projects.py @@ -9,7 +9,7 @@ def get_context(context): project_user = frappe.db.get_value( "Project User", {"parent": frappe.form_dict.project, "user": frappe.session.user}, - ["user", "view_attachments"], + ["user", "view_attachments", "hide_timesheets"], as_dict=True, ) if frappe.session.user != "Administrator" and (not project_user or frappe.session.user == "Guest"): @@ -25,7 +25,8 @@ def get_context(context): project.name, start=0, item_status="open", search=frappe.form_dict.get("search") ) - project.timesheets = get_timesheets(project.name, start=0, search=frappe.form_dict.get("search")) + if project_user and not project_user.hide_timesheets: + project.timesheets = get_timesheets(project.name, start=0, search=frappe.form_dict.get("search")) if project_user and project_user.view_attachments: project.attachments = get_attachments(project.name) From 56bc26aeccf8a208dd7adf4607c364acd1e2fb48 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Tue, 18 Mar 2025 11:22:46 +0530 Subject: [PATCH 1440/1614] fix: set landed cost based on purchase invoice rate (cherry picked from commit 75ab5f2bd01bdac8ef14755fb9645495dacd0175) # Conflicts: # erpnext/patches.txt --- erpnext/patches.txt | 4 +++ .../purchase_receipt/purchase_receipt.py | 25 ++++++------------- 2 files changed, 11 insertions(+), 18 deletions(-) diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 5e657df44dc..dda1b11859d 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -395,9 +395,13 @@ execute:frappe.db.set_single_value("Accounts Settings", "exchange_gain_loss_post erpnext.patches.v14_0.disable_add_row_in_gross_profit erpnext.patches.v15_0.set_difference_amount_in_asset_value_adjustment erpnext.patches.v14_0.update_posting_datetime +<<<<<<< HEAD erpnext.stock.doctype.stock_ledger_entry.patches.ensure_sle_indexes erpnext.patches.v15_0.update_query_report erpnext.patches.v15_0.rename_field_from_rate_difference_to_amount_difference +======= +erpnext.patches.v15_0.rename_field_from_rate_difference_to_amount_difference #2025-03-18 +>>>>>>> 75ab5f2bd0 (fix: set landed cost based on purchase invoice rate) erpnext.patches.v15_0.recalculate_amount_difference_field erpnext.patches.v15_0.rename_sla_fields #2025-03-12 erpnext.patches.v15_0.set_purchase_receipt_row_item_to_capitalization_stock_item diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py index 7f2c04316e9..168713a66da 100644 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py @@ -1102,16 +1102,10 @@ def update_billing_percentage(pr_doc, update_modified=True, adjust_incoming_rate if adjust_incoming_rate: adjusted_amt = 0.0 - item_wise_billed_qty = get_billed_qty_against_purchase_receipt(pr_doc) + billed_qty = get_billed_qty_against_item(item.name) - if ( - item.billed_amt is not None - and item.amount is not None - and item_wise_billed_qty.get(item.name) - ): - adjusted_amt = ( - flt(item.billed_amt / item_wise_billed_qty.get(item.name)) - flt(item.rate) - ) * item.qty + if item.billed_amt is not None and item.amount is not None and billed_qty: + adjusted_amt = (flt(item.billed_amt / billed_qty) - flt(item.rate)) * item.qty adjusted_amt = flt(adjusted_amt * flt(pr_doc.conversion_rate), item.precision("amount")) item.db_set("amount_difference_with_purchase_invoice", adjusted_amt, update_modified=False) @@ -1127,19 +1121,14 @@ def update_billing_percentage(pr_doc, update_modified=True, adjust_incoming_rate adjust_incoming_rate_for_pr(pr_doc) -def get_billed_qty_against_purchase_receipt(pr_doc): - pr_names = [d.name for d in pr_doc.items] +def get_billed_qty_against_item(name): table = frappe.qb.DocType("Purchase Invoice Item") query = ( frappe.qb.from_(table) - .select(table.pr_detail, fn.Sum(table.qty).as_("qty")) - .where((table.pr_detail.isin(pr_names)) & (table.docstatus == 1)) + .select(fn.Sum(table.qty).as_("qty")) + .where((table.pr_detail == name) & (table.docstatus == 1)) ) - invoice_data = query.run(as_list=1) - - if not invoice_data: - return frappe._dict() - return frappe._dict(invoice_data) + return query.run(as_dict=True)[0].get("qty", 0) def adjust_incoming_rate_for_pr(doc): From 36ffc2ee67096d726933b6f54ee3f6448593ee69 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Tue, 18 Mar 2025 11:43:16 +0530 Subject: [PATCH 1441/1614] fix: patch (cherry picked from commit 7e669c07281a1275a2c254072009af31b626ea86) --- .../patches/v15_0/recalculate_amount_difference_field.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/erpnext/patches/v15_0/recalculate_amount_difference_field.py b/erpnext/patches/v15_0/recalculate_amount_difference_field.py index 2891ac16c44..0b7ab2ec4fe 100644 --- a/erpnext/patches/v15_0/recalculate_amount_difference_field.py +++ b/erpnext/patches/v15_0/recalculate_amount_difference_field.py @@ -27,11 +27,7 @@ def execute(): table.qty, parent.conversion_rate, ) - .where( - (table.amount_difference_with_purchase_invoice != 0) - & (table.docstatus == 1) - & (parent.company == company) - ) + .where((table.docstatus == 1) & (parent.company == company)) ) posting_date = "2024-04-01" @@ -121,6 +117,7 @@ def get_billed_qty_against_purchase_receipt(pr_names): frappe.qb.from_(table) .select(table.pr_detail, Sum(table.qty).as_("qty")) .where((table.pr_detail.isin(pr_names)) & (table.docstatus == 1)) + .groupby(table.pr_detail) ) invoice_data = query.run(as_list=1) From ec1a3a1e6b4fcecda6e89abb46dca065cc33fdef Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Wed, 19 Mar 2025 13:04:08 +0530 Subject: [PATCH 1442/1614] fix: take function call outside loop (cherry picked from commit b3c400f998ca030b8d3e705bbd0a676603e133fa) --- .../purchase_receipt/purchase_receipt.py | 28 ++++++++++++++----- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py index 168713a66da..48e161980db 100644 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py @@ -1083,6 +1083,9 @@ def update_billing_percentage(pr_doc, update_modified=True, adjust_incoming_rate total_amount, total_billed_amount = 0, 0 item_wise_returned_qty = get_item_wise_returned_qty(pr_doc) + if adjust_incoming_rate: + item_wise_billed_qty = get_billed_qty_against_purchase_receipt(pr_doc) + for item in pr_doc.items: returned_qty = flt(item_wise_returned_qty.get(item.name)) returned_amount = flt(returned_qty) * flt(item.rate) @@ -1102,10 +1105,15 @@ def update_billing_percentage(pr_doc, update_modified=True, adjust_incoming_rate if adjust_incoming_rate: adjusted_amt = 0.0 - billed_qty = get_billed_qty_against_item(item.name) - if item.billed_amt is not None and item.amount is not None and billed_qty: - adjusted_amt = (flt(item.billed_amt / billed_qty) - flt(item.rate)) * item.qty + if ( + item.billed_amt is not None + and item.amount is not None + and item_wise_billed_qty.get(item.name) + ): + adjusted_amt = ( + flt(item.billed_amt / item_wise_billed_qty.get(item.name)) - flt(item.rate) + ) * item.qty adjusted_amt = flt(adjusted_amt * flt(pr_doc.conversion_rate), item.precision("amount")) item.db_set("amount_difference_with_purchase_invoice", adjusted_amt, update_modified=False) @@ -1121,14 +1129,20 @@ def update_billing_percentage(pr_doc, update_modified=True, adjust_incoming_rate adjust_incoming_rate_for_pr(pr_doc) -def get_billed_qty_against_item(name): +def get_billed_qty_against_purchase_receipt(pr_doc): + pr_names = [d.name for d in pr_doc.items] table = frappe.qb.DocType("Purchase Invoice Item") query = ( frappe.qb.from_(table) - .select(fn.Sum(table.qty).as_("qty")) - .where((table.pr_detail == name) & (table.docstatus == 1)) + .select(table.pr_detail, fn.Sum(table.qty).as_("qty")) + .where((table.pr_detail.isin(pr_names)) & (table.docstatus == 1)) + .groupby(table.pr_detail) ) - return query.run(as_dict=True)[0].get("qty", 0) + invoice_data = query.run(as_list=1) + + if not invoice_data: + return frappe._dict() + return frappe._dict(invoice_data) def adjust_incoming_rate_for_pr(doc): From 5b802ae527e8e1fe70b893be9d4c5de068ce6833 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Wed, 19 Mar 2025 15:35:26 +0530 Subject: [PATCH 1443/1614] chore: fix conflicts --- erpnext/patches.txt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/erpnext/patches.txt b/erpnext/patches.txt index dda1b11859d..835ee5b6133 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -395,13 +395,9 @@ execute:frappe.db.set_single_value("Accounts Settings", "exchange_gain_loss_post erpnext.patches.v14_0.disable_add_row_in_gross_profit erpnext.patches.v15_0.set_difference_amount_in_asset_value_adjustment erpnext.patches.v14_0.update_posting_datetime -<<<<<<< HEAD erpnext.stock.doctype.stock_ledger_entry.patches.ensure_sle_indexes erpnext.patches.v15_0.update_query_report -erpnext.patches.v15_0.rename_field_from_rate_difference_to_amount_difference -======= erpnext.patches.v15_0.rename_field_from_rate_difference_to_amount_difference #2025-03-18 ->>>>>>> 75ab5f2bd0 (fix: set landed cost based on purchase invoice rate) erpnext.patches.v15_0.recalculate_amount_difference_field erpnext.patches.v15_0.rename_sla_fields #2025-03-12 erpnext.patches.v15_0.set_purchase_receipt_row_item_to_capitalization_stock_item From 41d8b26dd247858271d2994be348ede8709f1f67 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Wed, 19 Mar 2025 12:52:34 +0530 Subject: [PATCH 1444/1614] fix: fetch bom_no when updating items in sales order (cherry picked from commit 508727a57a7248fae0a72b9c521dba7e7dbfdaec) # Conflicts: # erpnext/public/js/utils.js --- erpnext/controllers/accounts_controller.py | 3 +++ erpnext/public/js/utils.js | 16 ++++++++++++++++ erpnext/stock/get_item_details.py | 1 + 3 files changed, 20 insertions(+) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 94b553e2f99..eb483bdb868 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -3706,6 +3706,9 @@ def update_child_qty_rate(parent_doctype, trans_items, parent_doctype_name, chil if d.get("schedule_date") and parent_doctype == "Purchase Order": child_item.schedule_date = d.get("schedule_date") + if d.get("bom_no") and parent_doctype == "Sales Order": + child_item.bom_no = d.get("bom_no") + if flt(child_item.price_list_rate): if flt(child_item.rate) > flt(child_item.price_list_rate): # if rate is greater than price_list_rate, set margin diff --git a/erpnext/public/js/utils.js b/erpnext/public/js/utils.js index cd851b57972..36320c787b6 100755 --- a/erpnext/public/js/utils.js +++ b/erpnext/public/js/utils.js @@ -692,7 +692,18 @@ erpnext.utils.update_child_items = function (opts) { }, callback: function (r) { if (r.message) { +<<<<<<< HEAD const { qty, price_list_rate: rate, uom, conversion_factor } = r.message; +======= + const { + qty, + price_list_rate: rate, + uom, + conversion_factor, + item_name, + default_bom, + } = r.message; +>>>>>>> 508727a57a (fix: fetch bom_no when updating items in sales order) const row = dialog.fields_dict.trans_items.df.data.find( (doc) => doc.idx == me.doc.idx @@ -703,6 +714,11 @@ erpnext.utils.update_child_items = function (opts) { uom: me.doc.uom || uom, qty: me.doc.qty || qty, rate: me.doc.rate || rate, +<<<<<<< HEAD +======= + item_name: item_name, + bom_no: default_bom, +>>>>>>> 508727a57a (fix: fetch bom_no when updating items in sales order) }); dialog.fields_dict.trans_items.grid.refresh(); } diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py index ff87d159e36..2bed71a3e96 100644 --- a/erpnext/stock/get_item_details.py +++ b/erpnext/stock/get_item_details.py @@ -472,6 +472,7 @@ def get_basic_details(args, item, overwrite_warehouse=True): "weight_per_unit": args.get("weight_per_unit") or item.get("weight_per_unit"), "weight_uom": args.get("weight_uom") or item.get("weight_uom"), "grant_commission": item.get("grant_commission"), + "default_bom": item.default_bom, } ) From e5b28018304ecb4e50dc5392f0f2332e4f5486b4 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Wed, 19 Mar 2025 15:25:50 +0530 Subject: [PATCH 1445/1614] fix: remove duplicate (cherry picked from commit 386df968c2647bfed9a388833e2f9cf7618228f2) # Conflicts: # erpnext/public/js/utils.js --- erpnext/public/js/utils.js | 6 +++++- erpnext/stock/get_item_details.py | 1 - 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/erpnext/public/js/utils.js b/erpnext/public/js/utils.js index 36320c787b6..d1cc69c6cda 100755 --- a/erpnext/public/js/utils.js +++ b/erpnext/public/js/utils.js @@ -701,7 +701,7 @@ erpnext.utils.update_child_items = function (opts) { uom, conversion_factor, item_name, - default_bom, + bom_no, } = r.message; >>>>>>> 508727a57a (fix: fetch bom_no when updating items in sales order) @@ -717,8 +717,12 @@ erpnext.utils.update_child_items = function (opts) { <<<<<<< HEAD ======= item_name: item_name, +<<<<<<< HEAD bom_no: default_bom, >>>>>>> 508727a57a (fix: fetch bom_no when updating items in sales order) +======= + bom_no: bom_no, +>>>>>>> 386df968c2 (fix: remove duplicate) }); dialog.fields_dict.trans_items.grid.refresh(); } diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py index 2bed71a3e96..ff87d159e36 100644 --- a/erpnext/stock/get_item_details.py +++ b/erpnext/stock/get_item_details.py @@ -472,7 +472,6 @@ def get_basic_details(args, item, overwrite_warehouse=True): "weight_per_unit": args.get("weight_per_unit") or item.get("weight_per_unit"), "weight_uom": args.get("weight_uom") or item.get("weight_uom"), "grant_commission": item.get("grant_commission"), - "default_bom": item.default_bom, } ) From 38213b31dad108e8881aa48c9f731786a05f25ee Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Wed, 19 Mar 2025 15:47:43 +0530 Subject: [PATCH 1446/1614] chore: fix conflicts --- erpnext/public/js/utils.js | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/erpnext/public/js/utils.js b/erpnext/public/js/utils.js index d1cc69c6cda..c0126f2c6ee 100755 --- a/erpnext/public/js/utils.js +++ b/erpnext/public/js/utils.js @@ -692,18 +692,7 @@ erpnext.utils.update_child_items = function (opts) { }, callback: function (r) { if (r.message) { -<<<<<<< HEAD - const { qty, price_list_rate: rate, uom, conversion_factor } = r.message; -======= - const { - qty, - price_list_rate: rate, - uom, - conversion_factor, - item_name, - bom_no, - } = r.message; ->>>>>>> 508727a57a (fix: fetch bom_no when updating items in sales order) + const { qty, price_list_rate: rate, uom, conversion_factor, bom_no } = r.message; const row = dialog.fields_dict.trans_items.df.data.find( (doc) => doc.idx == me.doc.idx @@ -714,15 +703,7 @@ erpnext.utils.update_child_items = function (opts) { uom: me.doc.uom || uom, qty: me.doc.qty || qty, rate: me.doc.rate || rate, -<<<<<<< HEAD -======= - item_name: item_name, -<<<<<<< HEAD - bom_no: default_bom, ->>>>>>> 508727a57a (fix: fetch bom_no when updating items in sales order) -======= bom_no: bom_no, ->>>>>>> 386df968c2 (fix: remove duplicate) }); dialog.fields_dict.trans_items.grid.refresh(); } From 2bfaf64fffed8e9e7eeb43c3f35175bc068c8fd1 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Thu, 20 Mar 2025 15:55:33 +0530 Subject: [PATCH 1447/1614] fix: date added to wrong patch (cherry picked from commit dc45c3b39caacd4c37b9c0035b4178c78f364944) # Conflicts: # erpnext/patches.txt --- erpnext/patches.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 835ee5b6133..da54fecd43e 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -395,9 +395,14 @@ execute:frappe.db.set_single_value("Accounts Settings", "exchange_gain_loss_post erpnext.patches.v14_0.disable_add_row_in_gross_profit erpnext.patches.v15_0.set_difference_amount_in_asset_value_adjustment erpnext.patches.v14_0.update_posting_datetime +<<<<<<< HEAD erpnext.stock.doctype.stock_ledger_entry.patches.ensure_sle_indexes erpnext.patches.v15_0.update_query_report erpnext.patches.v15_0.rename_field_from_rate_difference_to_amount_difference #2025-03-18 erpnext.patches.v15_0.recalculate_amount_difference_field +======= +erpnext.patches.v15_0.rename_field_from_rate_difference_to_amount_difference +erpnext.patches.v15_0.recalculate_amount_difference_field #2025-03-18 +>>>>>>> dc45c3b39c (fix: date added to wrong patch) erpnext.patches.v15_0.rename_sla_fields #2025-03-12 erpnext.patches.v15_0.set_purchase_receipt_row_item_to_capitalization_stock_item From f964178008a961ed4cd42d74e46e27cc9ce6c738 Mon Sep 17 00:00:00 2001 From: David Arnold Date: Mon, 25 Mar 2024 20:12:44 +0100 Subject: [PATCH 1448/1614] fix(Payment Entry): get contact details from existing contact (#40556) (cherry picked from commit 462204fc650c38abc24e58d8749ad34818967a23) # Conflicts: # erpnext/accounts/doctype/payment_entry/payment_entry.py --- .../accounts/doctype/payment_entry/payment_entry.py | 13 ++++++++++++- erpnext/accounts/party.py | 9 ++++++--- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index fe9e6e5f107..073f8679335 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -37,7 +37,11 @@ from erpnext.accounts.general_ledger import ( make_reverse_gl_entries, process_gl_map, ) +<<<<<<< HEAD from erpnext.accounts.party import get_party_account +======= +from erpnext.accounts.party import complete_contact_details, get_party_account, set_contact_details +>>>>>>> 462204fc65 (fix(Payment Entry): get contact details from existing contact (#40556)) from erpnext.accounts.utils import ( cancel_exchange_gain_loss_journal, get_account_currency, @@ -439,6 +443,13 @@ class PaymentEntry(AccountsController): self.party_name = frappe.db.get_value(self.party_type, self.party, "name") if self.party: +<<<<<<< HEAD +======= + if not self.contact_person: + set_contact_details(self, party=frappe._dict({"name": self.party}), party_type=self.party_type) + else: + complete_contact_details(self) +>>>>>>> 462204fc65 (fix(Payment Entry): get contact details from existing contact (#40556)) if not self.party_balance: self.party_balance = get_balance_on( party_type=self.party_type, party=self.party, date=self.posting_date, company=self.company @@ -2879,7 +2890,7 @@ def get_payment_entry( pe.party_type = party_type pe.party = doc.get(scrub(party_type)) pe.contact_person = doc.get("contact_person") - pe.contact_email = doc.get("contact_email") + complete_contact_details(pe) pe.ensure_supplier_is_not_blocked() pe.paid_from = party_account if payment_type == "Receive" else bank.account diff --git a/erpnext/accounts/party.py b/erpnext/accounts/party.py index 959e3429095..37b5b884234 100644 --- a/erpnext/accounts/party.py +++ b/erpnext/accounts/party.py @@ -279,9 +279,7 @@ def get_regional_address_details(party_details, doctype, company): pass -def set_contact_details(party_details, party, party_type): - party_details.contact_person = get_default_contact(party_type, party.name) - +def complete_contact_details(party_details): if not party_details.contact_person: party_details.update( { @@ -310,6 +308,11 @@ def set_contact_details(party_details, party, party_type): party_details.update(contact_details) +def set_contact_details(party_details, party, party_type): + party_details.contact_person = get_default_contact(party_type, party.name) + complete_contact_details(party_details) + + def set_other_values(party_details, party, party_type): # copy if party_type == "Customer": From 7dc23d97337cac80adf3c2150322591448c861be Mon Sep 17 00:00:00 2001 From: Smit Vora Date: Fri, 21 Mar 2025 14:09:21 +0530 Subject: [PATCH 1449/1614] chore: resolve conflicts #39748 --- .../accounts/doctype/payment_entry/payment_entry.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index 073f8679335..18d98a40504 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -37,11 +37,7 @@ from erpnext.accounts.general_ledger import ( make_reverse_gl_entries, process_gl_map, ) -<<<<<<< HEAD -from erpnext.accounts.party import get_party_account -======= from erpnext.accounts.party import complete_contact_details, get_party_account, set_contact_details ->>>>>>> 462204fc65 (fix(Payment Entry): get contact details from existing contact (#40556)) from erpnext.accounts.utils import ( cancel_exchange_gain_loss_journal, get_account_currency, @@ -443,13 +439,12 @@ class PaymentEntry(AccountsController): self.party_name = frappe.db.get_value(self.party_type, self.party, "name") if self.party: -<<<<<<< HEAD -======= if not self.contact_person: - set_contact_details(self, party=frappe._dict({"name": self.party}), party_type=self.party_type) + set_contact_details( + self, party=frappe._dict({"name": self.party}), party_type=self.party_type + ) else: complete_contact_details(self) ->>>>>>> 462204fc65 (fix(Payment Entry): get contact details from existing contact (#40556)) if not self.party_balance: self.party_balance = get_balance_on( party_type=self.party_type, party=self.party, date=self.posting_date, company=self.company From 2ebea8866a54da4e09babd58b9c6f306e5c2ecf9 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 21 Mar 2025 16:27:05 +0530 Subject: [PATCH 1450/1614] fix: unwired order_by argument in get_transaction_list (backport #46636) (#46643) * fix: unwired order_by argument * lol on how it was updated from modified in both the places (version 15), but wasn't fixed (cherry picked from commit 2c1077d3326a785b66b5ca486ee8176ca3eb6b84) # Conflicts: # erpnext/controllers/website_list_for_contact.py * fix: merge conflicts * fix: sort by creation only --------- Co-authored-by: Hussain Nagaria Co-authored-by: Md Hussain Nagaria <34810212+NagariaHussain@users.noreply.github.com> --- erpnext/controllers/website_list_for_contact.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/controllers/website_list_for_contact.py b/erpnext/controllers/website_list_for_contact.py index c5708d0e4b4..4d141d346eb 100644 --- a/erpnext/controllers/website_list_for_contact.py +++ b/erpnext/controllers/website_list_for_contact.py @@ -69,7 +69,7 @@ def get_transaction_list( filters=None, limit_start=0, limit_page_length=20, - order_by="modified", + order_by="creation desc", custom=False, ): user = frappe.session.user @@ -115,7 +115,7 @@ def get_transaction_list( limit_page_length, fields="name", ignore_permissions=ignore_permissions, - order_by="modified desc", + order_by=order_by, ) if custom: From 58eb1849d79a4d1721621f26982f0145cae3f0e3 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Fri, 21 Mar 2025 15:30:23 +0530 Subject: [PATCH 1451/1614] perf: timeout while renaming cost center (cherry picked from commit 92be7cbbbfbaf1bad0614e5b64e6de1152c98ece) --- erpnext/accounts/doctype/gl_entry/gl_entry.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/gl_entry/gl_entry.json b/erpnext/accounts/doctype/gl_entry/gl_entry.json index b438dbbe4ec..769fbbc427a 100644 --- a/erpnext/accounts/doctype/gl_entry/gl_entry.json +++ b/erpnext/accounts/doctype/gl_entry/gl_entry.json @@ -105,7 +105,8 @@ "label": "Cost Center", "oldfieldname": "cost_center", "oldfieldtype": "Link", - "options": "Cost Center" + "options": "Cost Center", + "search_index": 1 }, { "fieldname": "debit", @@ -358,7 +359,7 @@ "idx": 1, "in_create": 1, "links": [], - "modified": "2025-02-21 14:36:49.431166", + "modified": "2025-03-21 15:29:11.221890", "modified_by": "Administrator", "module": "Accounts", "name": "GL Entry", From 4df5f18d850a2d4b9f595825c1290b3392ba1778 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Sun, 23 Mar 2025 18:53:49 +0530 Subject: [PATCH 1452/1614] fix: correct accumulated depreciation calculation for disposed assets (backport #46660) (#46661) fix: correct accumulated depreciation calculation for disposed assets (#46660) (cherry picked from commit eec2e7e833197d85a88a825e988922a0d64437ff) Co-authored-by: Khushi Rawat <142375893+khushi8112@users.noreply.github.com> --- .../asset_depreciations_and_balances.py | 250 +++++++++--------- 1 file changed, 125 insertions(+), 125 deletions(-) diff --git a/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.py b/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.py index 5229839bec6..cdeddf3d38b 100644 --- a/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.py +++ b/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.py @@ -145,6 +145,130 @@ def get_asset_categories_for_grouped_by_category(filters): ) +def get_assets_for_grouped_by_category(filters): + condition = "" + if filters.get("asset_category"): + condition = f" and a.asset_category = '{filters.get('asset_category')}'" + finance_book_filter = "" + if filters.get("finance_book"): + finance_book_filter += " and ifnull(gle.finance_book, '')=%(finance_book)s" + condition += " and exists (select 1 from `tabAsset Depreciation Schedule` ads where ads.asset = a.name and ads.finance_book = %(finance_book)s)" + + # nosemgrep + return frappe.db.sql( + f""" + SELECT results.asset_category, + sum(results.accumulated_depreciation_as_on_from_date) as accumulated_depreciation_as_on_from_date, + sum(results.depreciation_eliminated_via_reversal) as depreciation_eliminated_via_reversal, + sum(results.depreciation_eliminated_during_the_period) as depreciation_eliminated_during_the_period, + sum(results.depreciation_amount_during_the_period) as depreciation_amount_during_the_period + from (SELECT a.asset_category, + ifnull(sum(case when gle.posting_date < %(from_date)s and (ifnull(a.disposal_date, 0) = 0 or a.disposal_date >= %(from_date)s) then + gle.debit + else + 0 + end), 0) as accumulated_depreciation_as_on_from_date, + ifnull(sum(case when gle.posting_date <= %(to_date)s and ifnull(a.disposal_date, 0) = 0 then + gle.credit + else + 0 + end), 0) as depreciation_eliminated_via_reversal, + ifnull(sum(case when ifnull(a.disposal_date, 0) != 0 and a.disposal_date >= %(from_date)s + and a.disposal_date <= %(to_date)s and gle.posting_date <= a.disposal_date then + gle.debit + else + 0 + end), 0) as depreciation_eliminated_during_the_period, + ifnull(sum(case when gle.posting_date >= %(from_date)s and gle.posting_date <= %(to_date)s + and (ifnull(a.disposal_date, 0) = 0 or gle.posting_date <= a.disposal_date) then + gle.debit + else + 0 + end), 0) as depreciation_amount_during_the_period + from `tabGL Entry` gle + join `tabAsset` a on + gle.against_voucher = a.name + join `tabAsset Category Account` aca on + aca.parent = a.asset_category and aca.company_name = %(company)s + join `tabCompany` company on + company.name = %(company)s + where + a.docstatus=1 + and a.company=%(company)s + and a.purchase_date <= %(to_date)s + and gle.is_cancelled = 0 + and gle.account = ifnull(aca.depreciation_expense_account, company.depreciation_expense_account) + {condition} {finance_book_filter} + group by a.asset_category + union + SELECT a.asset_category, + ifnull(sum(case when ifnull(a.disposal_date, 0) != 0 and a.disposal_date < %(from_date)s then + 0 + else + a.opening_accumulated_depreciation + end), 0) as accumulated_depreciation_as_on_from_date, + 0 as depreciation_eliminated_via_reversal, + ifnull(sum(case when a.disposal_date >= %(from_date)s and a.disposal_date <= %(to_date)s then + a.opening_accumulated_depreciation + else + 0 + end), 0) as depreciation_eliminated_during_the_period, + 0 as depreciation_amount_during_the_period + from `tabAsset` a + where a.docstatus=1 and a.company=%(company)s and a.purchase_date <= %(to_date)s {condition} + group by a.asset_category) as results + group by results.asset_category + """, + { + "to_date": filters.to_date, + "from_date": filters.from_date, + "company": filters.company, + "finance_book": filters.get("finance_book", ""), + }, + as_dict=1, + ) + + +def get_group_by_asset_data(filters): + data = [] + + asset_details = get_asset_details_for_grouped_by_category(filters) + assets = get_assets_for_grouped_by_asset(filters) + + for asset_detail in asset_details: + row = frappe._dict() + row.update(asset_detail) + + row.value_as_on_to_date = ( + flt(row.value_as_on_from_date) + + flt(row.value_of_new_purchase) + - flt(row.value_of_sold_asset) + - flt(row.value_of_scrapped_asset) + - flt(row.value_of_capitalized_asset) + ) + + row.update(next(asset for asset in assets if asset["asset"] == asset_detail.get("name", ""))) + + row.accumulated_depreciation_as_on_to_date = ( + flt(row.accumulated_depreciation_as_on_from_date) + + flt(row.depreciation_amount_during_the_period) + - flt(row.depreciation_eliminated_during_the_period) + - flt(row.depreciation_eliminated_via_reversal) + ) + + row.net_asset_value_as_on_from_date = flt(row.value_as_on_from_date) - flt( + row.accumulated_depreciation_as_on_from_date + ) + + row.net_asset_value_as_on_to_date = flt(row.value_as_on_to_date) - flt( + row.accumulated_depreciation_as_on_to_date + ) + + data.append(row) + + return data + + def get_asset_details_for_grouped_by_category(filters): condition = "" if filters.get("asset"): @@ -224,130 +348,6 @@ def get_asset_details_for_grouped_by_category(filters): ) -def get_group_by_asset_data(filters): - data = [] - - asset_details = get_asset_details_for_grouped_by_category(filters) - assets = get_assets_for_grouped_by_asset(filters) - - for asset_detail in asset_details: - row = frappe._dict() - row.update(asset_detail) - - row.value_as_on_to_date = ( - flt(row.value_as_on_from_date) - + flt(row.value_of_new_purchase) - - flt(row.value_of_sold_asset) - - flt(row.value_of_scrapped_asset) - - flt(row.value_of_capitalized_asset) - ) - - row.update(next(asset for asset in assets if asset["asset"] == asset_detail.get("name", ""))) - - row.accumulated_depreciation_as_on_to_date = ( - flt(row.accumulated_depreciation_as_on_from_date) - + flt(row.depreciation_amount_during_the_period) - - flt(row.depreciation_eliminated_during_the_period) - - flt(row.depreciation_eliminated_via_reversal) - ) - - row.net_asset_value_as_on_from_date = flt(row.value_as_on_from_date) - flt( - row.accumulated_depreciation_as_on_from_date - ) - - row.net_asset_value_as_on_to_date = flt(row.value_as_on_to_date) - flt( - row.accumulated_depreciation_as_on_to_date - ) - - data.append(row) - - return data - - -def get_assets_for_grouped_by_category(filters): - condition = "" - if filters.get("asset_category"): - condition = f" and a.asset_category = '{filters.get('asset_category')}'" - finance_book_filter = "" - if filters.get("finance_book"): - finance_book_filter += " and ifnull(gle.finance_book, '')=%(finance_book)s" - condition += " and exists (select 1 from `tabAsset Depreciation Schedule` ads where ads.asset = a.name and ads.finance_book = %(finance_book)s)" - - # nosemgrep - return frappe.db.sql( - f""" - SELECT results.asset_category, - sum(results.accumulated_depreciation_as_on_from_date) as accumulated_depreciation_as_on_from_date, - sum(results.depreciation_eliminated_via_reversal) as depreciation_eliminated_via_reversal, - sum(results.depreciation_eliminated_during_the_period) as depreciation_eliminated_during_the_period, - sum(results.depreciation_amount_during_the_period) as depreciation_amount_during_the_period - from (SELECT a.asset_category, - ifnull(sum(case when gle.posting_date < %(from_date)s and (ifnull(a.disposal_date, 0) = 0 or a.disposal_date >= %(from_date)s) then - gle.debit - else - 0 - end), 0) as accumulated_depreciation_as_on_from_date, - ifnull(sum(case when gle.posting_date <= %(to_date)s and ifnull(a.disposal_date, 0) = 0 then - gle.credit - else - 0 - end), 0) as depreciation_eliminated_via_reversal, - ifnull(sum(case when ifnull(a.disposal_date, 0) != 0 and a.disposal_date >= %(from_date)s - and a.disposal_date <= %(to_date)s and gle.posting_date <= a.disposal_date then - gle.debit - else - 0 - end), 0) as depreciation_eliminated_during_the_period, - ifnull(sum(case when gle.posting_date >= %(from_date)s and gle.posting_date <= %(to_date)s - and (ifnull(a.disposal_date, 0) = 0 or gle.posting_date <= a.disposal_date) then - gle.debit - else - 0 - end), 0) as depreciation_amount_during_the_period - from `tabGL Entry` gle - join `tabAsset` a on - gle.against_voucher = a.name - join `tabAsset Category Account` aca on - aca.parent = a.asset_category and aca.company_name = %(company)s - join `tabCompany` company on - company.name = %(company)s - where - a.docstatus=1 - and a.company=%(company)s - and a.purchase_date <= %(to_date)s - and gle.is_cancelled = 0 - and gle.account = ifnull(aca.depreciation_expense_account, company.depreciation_expense_account) - {condition} {finance_book_filter} - group by a.asset_category - union - SELECT a.asset_category, - ifnull(sum(case when ifnull(a.disposal_date, 0) != 0 and (a.disposal_date < %(from_date)s or a.disposal_date > %(to_date)s) then - 0 - else - a.opening_accumulated_depreciation - end), 0) as accumulated_depreciation_as_on_from_date, - 0 as depreciation_eliminated_via_reversal, - ifnull(sum(case when a.disposal_date >= %(from_date)s and a.disposal_date <= %(to_date)s then - a.opening_accumulated_depreciation - else - 0 - end), 0) as depreciation_eliminated_during_the_period, - 0 as depreciation_amount_during_the_period - from `tabAsset` a - where a.docstatus=1 and a.company=%(company)s and a.purchase_date <= %(to_date)s {condition} - group by a.asset_category) as results - group by results.asset_category - """, - { - "to_date": filters.to_date, - "from_date": filters.from_date, - "company": filters.company, - "finance_book": filters.get("finance_book", ""), - }, - as_dict=1, - ) - - def get_assets_for_grouped_by_asset(filters): condition = "" if filters.get("asset"): @@ -405,7 +405,7 @@ def get_assets_for_grouped_by_asset(filters): group by a.name union SELECT a.name as name, - ifnull(sum(case when ifnull(a.disposal_date, 0) != 0 and (a.disposal_date < %(from_date)s or a.disposal_date > %(to_date)s) then + ifnull(sum(case when ifnull(a.disposal_date, 0) != 0 and a.disposal_date < %(from_date)s then 0 else a.opening_accumulated_depreciation From 412e6be5025d5d451902ced7848f9602ae1786ab Mon Sep 17 00:00:00 2001 From: Sugesh393 Date: Tue, 11 Mar 2025 11:49:35 +0530 Subject: [PATCH 1453/1614] fix: add base_outstanding and base_paid_amount in payment schedule table (cherry picked from commit 6c2f9a563e8d6b7bec0c846ec755ab7bc8b7a3d2) # Conflicts: # erpnext/accounts/doctype/payment_schedule/payment_schedule.json --- .../doctype/payment_entry/payment_entry.py | 42 +++++++++++++++++-- .../payment_schedule/payment_schedule.json | 28 ++++++++++++- .../payment_schedule/payment_schedule.py | 2 + .../accounts_receivable.py | 26 +++++++----- erpnext/controllers/accounts_controller.py | 3 ++ 5 files changed, 85 insertions(+), 16 deletions(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index 18d98a40504..6c7b1ad5f5a 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -7,6 +7,7 @@ from functools import reduce import frappe from frappe import ValidationError, _, qb, scrub, throw +from frappe.model.meta import get_field_precision from frappe.query_builder import Tuple from frappe.query_builder.functions import Count from frappe.utils import cint, comma_or, flt, getdate, nowdate @@ -742,16 +743,39 @@ class PaymentEntry(AccountsController): outstanding = flt(invoice_paid_amount_map.get(key, {}).get("outstanding")) discounted_amt = flt(invoice_paid_amount_map.get(key, {}).get("discounted_amt")) + conversion_rate = frappe.db.get_value(key[2], {"name": key[1]}, "conversion_rate") + base_paid_amount_precision = get_field_precision( + frappe.get_meta("Payment Schedule").get_field("base_paid_amount") + ) + base_outstanding_precision = get_field_precision( + frappe.get_meta("Payment Schedule").get_field("base_outstanding") + ) + + base_paid_amount = flt( + (allocated_amount - discounted_amt) * conversion_rate, base_paid_amount_precision + ) + base_outstanding = flt(allocated_amount * conversion_rate, base_outstanding_precision) + if cancel: frappe.db.sql( """ UPDATE `tabPayment Schedule` SET paid_amount = `paid_amount` - %s, + base_paid_amount = `base_paid_amount` - %s, discounted_amount = `discounted_amount` - %s, - outstanding = `outstanding` + %s + outstanding = `outstanding` + %s, + base_outstanding = `base_outstanding` - %s WHERE parent = %s and payment_term = %s""", - (allocated_amount - discounted_amt, discounted_amt, allocated_amount, key[1], key[0]), + ( + allocated_amount - discounted_amt, + base_paid_amount, + discounted_amt, + allocated_amount, + base_outstanding, + key[1], + key[0], + ), ) else: if allocated_amount > outstanding: @@ -767,10 +791,20 @@ class PaymentEntry(AccountsController): UPDATE `tabPayment Schedule` SET paid_amount = `paid_amount` + %s, + base_paid_amount = `base_paid_amount` + %s, discounted_amount = `discounted_amount` + %s, - outstanding = `outstanding` - %s + outstanding = `outstanding` - %s, + base_outstanding = `base_outstanding` - %s WHERE parent = %s and payment_term = %s""", - (allocated_amount - discounted_amt, discounted_amt, allocated_amount, key[1], key[0]), + ( + allocated_amount - discounted_amt, + base_paid_amount, + discounted_amt, + allocated_amount, + base_outstanding, + key[1], + key[0], + ), ) def get_allocated_amount_in_transaction_currency( diff --git a/erpnext/accounts/doctype/payment_schedule/payment_schedule.json b/erpnext/accounts/doctype/payment_schedule/payment_schedule.json index dde9980ce53..0e1e7a84a4c 100644 --- a/erpnext/accounts/doctype/payment_schedule/payment_schedule.json +++ b/erpnext/accounts/doctype/payment_schedule/payment_schedule.json @@ -24,7 +24,9 @@ "paid_amount", "discounted_amount", "column_break_3", - "base_payment_amount" + "base_payment_amount", + "base_outstanding", + "base_paid_amount" ], "fields": [ { @@ -155,19 +157,43 @@ "fieldtype": "Currency", "label": "Payment Amount (Company Currency)", "options": "Company:company:default_currency" + }, + { + "fieldname": "base_outstanding", + "fieldtype": "Currency", + "label": "Outstanding (Company Currency)", + "options": "Company:company:default_currency", + "read_only": 1 + }, + { + "depends_on": "base_paid_amount", + "fieldname": "base_paid_amount", + "fieldtype": "Currency", + "label": "Paid Amount (Company Currency)", + "options": "Company:company:default_currency", + "read_only": 1 } ], "index_web_pages_for_search": 1, "istable": 1, "links": [], +<<<<<<< HEAD "modified": "2022-09-16 13:57:06.382859", +======= + "modified": "2025-03-11 11:06:51.792982", +>>>>>>> 6c2f9a563e (fix: add base_outstanding and base_paid_amount in payment schedule table) "modified_by": "Administrator", "module": "Accounts", "name": "Payment Schedule", "owner": "Administrator", "permissions": [], "quick_entry": 1, +<<<<<<< HEAD "sort_field": "modified", +======= + "row_format": "Dynamic", + "sort_field": "creation", +>>>>>>> 6c2f9a563e (fix: add base_outstanding and base_paid_amount in payment schedule table) "sort_order": "DESC", "states": [], "track_changes": 1 diff --git a/erpnext/accounts/doctype/payment_schedule/payment_schedule.py b/erpnext/accounts/doctype/payment_schedule/payment_schedule.py index 8a292fd3aba..a3d1dbe5564 100644 --- a/erpnext/accounts/doctype/payment_schedule/payment_schedule.py +++ b/erpnext/accounts/doctype/payment_schedule/payment_schedule.py @@ -14,6 +14,8 @@ class PaymentSchedule(Document): if TYPE_CHECKING: from frappe.types import DF + base_outstanding: DF.Currency + base_paid_amount: DF.Currency base_payment_amount: DF.Currency description: DF.SmallText | None discount: DF.Float diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py index 5a140ec3f2d..9625a86f05f 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py @@ -517,7 +517,7 @@ class ReceivablePayableReport: select si.name, si.party_account_currency, si.currency, si.conversion_rate, si.total_advance, ps.due_date, ps.payment_term, ps.payment_amount, ps.base_payment_amount, - ps.description, ps.paid_amount, ps.discounted_amount + ps.description, ps.paid_amount, ps.base_paid_amount, ps.discounted_amount from `tab{row.voucher_type}` si, `tabPayment Schedule` ps where si.name = ps.parent and ps.parenttype = '{row.voucher_type}' and @@ -540,20 +540,24 @@ class ReceivablePayableReport: # Deduct that from paid amount pre allocation row.paid -= flt(payment_terms_details[0].total_advance) + company_currency = frappe.get_value("Company", self.filters.get("company"), "default_currency") + # If single payment terms, no need to split the row if len(payment_terms_details) == 1 and payment_terms_details[0].payment_term: - self.append_payment_term(row, payment_terms_details[0], original_row) + self.append_payment_term(row, payment_terms_details[0], original_row, company_currency) return for d in payment_terms_details: term = frappe._dict(original_row) - self.append_payment_term(row, d, term) + self.append_payment_term(row, d, term, company_currency) - def append_payment_term(self, row, d, term): - if d.currency == d.party_account_currency: + def append_payment_term(self, row, d, term, company_currency): + invoiced = d.base_payment_amount + paid_amount = d.base_paid_amount + + if company_currency == d.party_account_currency or self.filters.get("in_party_currency"): invoiced = d.payment_amount - else: - invoiced = d.base_payment_amount + paid_amount = d.paid_amount row.payment_terms.append( term.update( @@ -562,15 +566,15 @@ class ReceivablePayableReport: "invoiced": invoiced, "invoice_grand_total": row.invoiced, "payment_term": d.description or d.payment_term, - "paid": d.paid_amount + d.discounted_amount, + "paid": paid_amount + d.discounted_amount, "credit_note": 0.0, - "outstanding": invoiced - d.paid_amount - d.discounted_amount, + "outstanding": invoiced - paid_amount - d.discounted_amount, } ) ) - if d.paid_amount: - row["paid"] -= d.paid_amount + d.discounted_amount + if paid_amount: + row["paid"] -= paid_amount + d.discounted_amount def allocate_closing_to_term(self, row, term, key): if row[key]: diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index eb483bdb868..ff0e0434309 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -2363,6 +2363,9 @@ class AccountsController(TransactionBase): base_grand_total * flt(d.invoice_portion) / 100, d.precision("base_payment_amount") ) d.outstanding = d.payment_amount + d.base_outstanding = flt( + d.payment_amount * self.get("conversion_rate"), d.precision("base_outstanding") + ) elif not d.invoice_portion: d.base_payment_amount = flt( d.payment_amount * self.get("conversion_rate"), d.precision("base_payment_amount") From c3221c4e9319ba1e960d8aa272484a4c629d96dd Mon Sep 17 00:00:00 2001 From: Sugesh393 Date: Tue, 11 Mar 2025 11:52:42 +0530 Subject: [PATCH 1454/1614] fix: add patch to update base_outstanding and base_paid_amount (cherry picked from commit 7e92e4967af8a25df2d193604ddd494ec07b1f77) --- erpnext/patches.txt | 1 + ...date_payment_schedule_fields_in_invoices.py | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 erpnext/patches/v15_0/update_payment_schedule_fields_in_invoices.py diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 835ee5b6133..656ff0ce001 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -401,3 +401,4 @@ erpnext.patches.v15_0.rename_field_from_rate_difference_to_amount_difference #20 erpnext.patches.v15_0.recalculate_amount_difference_field erpnext.patches.v15_0.rename_sla_fields #2025-03-12 erpnext.patches.v15_0.set_purchase_receipt_row_item_to_capitalization_stock_item +erpnext.patches.v15_0.update_payment_schedule_fields_in_invoices diff --git a/erpnext/patches/v15_0/update_payment_schedule_fields_in_invoices.py b/erpnext/patches/v15_0/update_payment_schedule_fields_in_invoices.py new file mode 100644 index 00000000000..74d8ac38f72 --- /dev/null +++ b/erpnext/patches/v15_0/update_payment_schedule_fields_in_invoices.py @@ -0,0 +1,18 @@ +import frappe +from frappe.query_builder import DocType + + +def execute(): + invoice_types = ["Sales Invoice", "Purchase Invoice"] + for invoice_type in invoice_types: + invoice = DocType(invoice_type) + invoice_details = frappe.qb.from_(invoice).select(invoice.conversion_rate, invoice.name) + update_payment_schedule(invoice_details) + + +def update_payment_schedule(invoice_details): + ps = DocType("Payment Schedule") + + frappe.qb.update(ps).join(invoice_details).on(ps.parent == invoice_details.name).set( + ps.base_paid_amount, ps.paid_amount * invoice_details.conversion_rate + ).set(ps.base_outstanding, ps.outstanding * invoice_details.conversion_rate).run() From 4a7d401dc5401867cad55f7820d19b4215041e31 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 24 Mar 2025 11:53:14 +0530 Subject: [PATCH 1455/1614] chore: resolve conflict --- .../doctype/payment_schedule/payment_schedule.json | 8 -------- 1 file changed, 8 deletions(-) diff --git a/erpnext/accounts/doctype/payment_schedule/payment_schedule.json b/erpnext/accounts/doctype/payment_schedule/payment_schedule.json index 0e1e7a84a4c..b72281b6314 100644 --- a/erpnext/accounts/doctype/payment_schedule/payment_schedule.json +++ b/erpnext/accounts/doctype/payment_schedule/payment_schedule.json @@ -177,23 +177,15 @@ "index_web_pages_for_search": 1, "istable": 1, "links": [], -<<<<<<< HEAD - "modified": "2022-09-16 13:57:06.382859", -======= "modified": "2025-03-11 11:06:51.792982", ->>>>>>> 6c2f9a563e (fix: add base_outstanding and base_paid_amount in payment schedule table) "modified_by": "Administrator", "module": "Accounts", "name": "Payment Schedule", "owner": "Administrator", "permissions": [], "quick_entry": 1, -<<<<<<< HEAD - "sort_field": "modified", -======= "row_format": "Dynamic", "sort_field": "creation", ->>>>>>> 6c2f9a563e (fix: add base_outstanding and base_paid_amount in payment schedule table) "sort_order": "DESC", "states": [], "track_changes": 1 From 2a70791bbaeaff33f469cf3014932367c8762059 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Tue, 18 Mar 2025 12:49:29 +0530 Subject: [PATCH 1456/1614] fix: correct invoice order in payment reconcillaiton (cherry picked from commit 5c34a5aaed2c7f10c3d5686bdaefec5e2bff7f7f) # Conflicts: # erpnext/accounts/utils.py --- erpnext/accounts/utils.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py index 2758ff0e26f..6e93d3771e3 100644 --- a/erpnext/accounts/utils.py +++ b/erpnext/accounts/utils.py @@ -9,8 +9,13 @@ import frappe import frappe.defaults from frappe import _, qb, throw from frappe.model.meta import get_field_precision +<<<<<<< HEAD from frappe.query_builder import AliasedQuery, Criterion, Table from frappe.query_builder.functions import Count, Sum +======= +from frappe.query_builder import AliasedQuery, Case, Criterion, Table +from frappe.query_builder.functions import Count, Max, Round, Sum +>>>>>>> 5c34a5aaed (fix: correct invoice order in payment reconcillaiton) from frappe.query_builder.utils import DocType from frappe.utils import ( add_days, @@ -1974,6 +1979,15 @@ class QueryPaymentLedger: .select( ple.against_voucher_no.as_("voucher_no"), Sum(ple.amount_in_account_currency).as_("amount_in_account_currency"), + Max( + Case().when( + ( + (ple.voucher_no == ple.against_voucher_no) + & (ple.voucher_type == ple.against_voucher_type) + ), + (ple.posting_date), + ) + ).as_("invoice_date"), ) .where(ple.delinked == 0) .where(Criterion.all(filter_on_against_voucher_no)) @@ -1981,7 +1995,7 @@ class QueryPaymentLedger: .where(Criterion.all(self.dimensions_filter)) .where(Criterion.all(self.voucher_posting_date)) .groupby(ple.against_voucher_type, ple.against_voucher_no, ple.party_type, ple.party) - .orderby(ple.posting_date, ple.voucher_no) + .orderby(ple.invoice_date, ple.voucher_no) .having(qb.Field("amount_in_account_currency") > 0) .limit(self.limit) .run() From 326c37a051940a20d26f3256c22f608e170a8e28 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 24 Mar 2025 12:29:52 +0530 Subject: [PATCH 1457/1614] chore: resolve conflict --- erpnext/accounts/utils.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py index 6e93d3771e3..ac37775f45f 100644 --- a/erpnext/accounts/utils.py +++ b/erpnext/accounts/utils.py @@ -9,13 +9,8 @@ import frappe import frappe.defaults from frappe import _, qb, throw from frappe.model.meta import get_field_precision -<<<<<<< HEAD -from frappe.query_builder import AliasedQuery, Criterion, Table -from frappe.query_builder.functions import Count, Sum -======= from frappe.query_builder import AliasedQuery, Case, Criterion, Table -from frappe.query_builder.functions import Count, Max, Round, Sum ->>>>>>> 5c34a5aaed (fix: correct invoice order in payment reconcillaiton) +from frappe.query_builder.functions import Count, Max, Sum from frappe.query_builder.utils import DocType from frappe.utils import ( add_days, From e69c7225342c8db4653aefae99e043c5f9af4e14 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Fri, 7 Mar 2025 12:29:51 +0100 Subject: [PATCH 1458/1614] feat(accounting): allow chart_of_account.get_chart to be whilelist (cherry picked from commit 49dcd96909fa3c1c5c4978d3e5ce0dd24f05cc99) --- .../doctype/account/chart_of_accounts/chart_of_accounts.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py b/erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py index 2768f321ff6..1c81f07cee3 100644 --- a/erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py +++ b/erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py @@ -116,6 +116,7 @@ def identify_is_group(child): return is_group +@frappe.whitelist() def get_chart(chart_template, existing_company=None): chart = {} if existing_company: From 6c443bd85aba5cc8e911219da4924ab63223d2ed Mon Sep 17 00:00:00 2001 From: ljain112 Date: Tue, 18 Mar 2025 14:16:35 +0530 Subject: [PATCH 1459/1614] fix: customer credit limit check based on `bypass_credit_limit_check` in Journal Entry (cherry picked from commit 8a84faebedaaddc4ff6b1210a15420ede0c2c51b) --- .../doctype/journal_entry/journal_entry.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.py b/erpnext/accounts/doctype/journal_entry/journal_entry.py index 9e1eaf25442..e8ac493d659 100644 --- a/erpnext/accounts/doctype/journal_entry/journal_entry.py +++ b/erpnext/accounts/doctype/journal_entry/journal_entry.py @@ -576,8 +576,22 @@ class JournalEntry(AccountsController): if customers: from erpnext.selling.doctype.customer.customer import check_credit_limit + customer_details = frappe._dict( + frappe.db.get_all( + "Customer Credit Limit", + filters={ + "parent": ["in", customers], + "parenttype": ["=", "Customer"], + "company": ["=", self.company], + }, + fields=["parent", "bypass_credit_limit_check"], + as_list=True, + ) + ) + for customer in customers: - check_credit_limit(customer, self.company) + ignore_outstanding_sales_order = bool(customer_details.get(customer)) + check_credit_limit(customer, self.company, ignore_outstanding_sales_order) def validate_cheque_info(self): if self.voucher_type in ["Bank Entry"]: From dc3b5e2f3af271640715ac97e326272471bcb93d Mon Sep 17 00:00:00 2001 From: vishakhdesai Date: Mon, 24 Mar 2025 11:23:53 +0530 Subject: [PATCH 1460/1614] fix: don't filter payment entries on Bank Account in Payment Clearance (cherry picked from commit fa2fd5bf88668524b64f905c663c0e8602557414) --- erpnext/accounts/doctype/bank_clearance/bank_clearance.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/erpnext/accounts/doctype/bank_clearance/bank_clearance.py b/erpnext/accounts/doctype/bank_clearance/bank_clearance.py index 7f08653b15b..55ddfa698b7 100644 --- a/erpnext/accounts/doctype/bank_clearance/bank_clearance.py +++ b/erpnext/accounts/doctype/bank_clearance/bank_clearance.py @@ -159,9 +159,6 @@ def get_payment_entries_for_bank_clearance( as_dict=1, ) - if bank_account: - condition += "and bank_account = %(bank_account)s" - payment_entries = frappe.db.sql( f""" select @@ -183,7 +180,6 @@ def get_payment_entries_for_bank_clearance( "account": account, "from": from_date, "to": to_date, - "bank_account": bank_account, }, as_dict=1, ) From 98df0614abb5af17a1e3889254a1bbd009b12d5a Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 24 Mar 2025 16:55:11 +0100 Subject: [PATCH 1461/1614] ci: apply label "skip-release-notes" based on PR title (backport #46694) (#46697) ci: apply label "skip-release-notes" based on PR title (#46694) Workflow copied from frappe/frappe (cherry picked from commit eb350012b0ae640924e6e36ec66f9653e8f6e407) Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com> --- .github/workflows/label-base-on-title.yml | 30 +++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/label-base-on-title.yml diff --git a/.github/workflows/label-base-on-title.yml b/.github/workflows/label-base-on-title.yml new file mode 100644 index 00000000000..4e811edf99a --- /dev/null +++ b/.github/workflows/label-base-on-title.yml @@ -0,0 +1,30 @@ +name: "Auto-label PRs based on title" + +on: + pull_request_target: + types: [opened, reopened] + +jobs: + add-label-if-prefix-matches: + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + steps: + - name: Check PR title and add label if it matches prefixes + uses: actions/github-script@v7 + continue-on-error: true + with: + script: | + const title = context.payload.pull_request.title.toLowerCase(); + const prefixes = ['chore', 'ci', 'style', 'test', 'refactor']; + + // Check if the PR title starts with any of the prefixes + if (prefixes.some(prefix => title.startsWith(prefix))) { + await github.rest.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.payload.pull_request.number, + labels: ['skip-release-notes'] + }); + } From 4edfc6f1258c7d98db125894338e951228f94cc1 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Thu, 20 Mar 2025 13:25:53 +0530 Subject: [PATCH 1462/1614] feat: repost accounting ledger for purchase receipt (cherry picked from commit b36e3564696f87f227ffa9851e6b67318df8924b) --- .../repost_accounting_ledger.py | 13 ++++ .../test_repost_accounting_ledger.py | 76 ++++++++++++++++++- 2 files changed, 88 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/repost_accounting_ledger/repost_accounting_ledger.py b/erpnext/accounts/doctype/repost_accounting_ledger/repost_accounting_ledger.py index 73977f5d560..800f1647471 100644 --- a/erpnext/accounts/doctype/repost_accounting_ledger/repost_accounting_ledger.py +++ b/erpnext/accounts/doctype/repost_accounting_ledger/repost_accounting_ledger.py @@ -8,6 +8,8 @@ from frappe import _, qb from frappe.model.document import Document from frappe.utils.data import comma_and +from erpnext.stock import get_warehouse_account_map + class RepostAccountingLedger(Document): # begin: auto-generated types @@ -97,6 +99,9 @@ class RepostAccountingLedger(Document): doc = frappe.get_doc(x.voucher_type, x.voucher_no) if doc.doctype in ["Payment Entry", "Journal Entry"]: gle_map = doc.build_gl_map() + elif doc.doctype == "Purchase Receipt": + warehouse_account_map = get_warehouse_account_map(doc.company) + gle_map = doc.get_gl_entries(warehouse_account_map) else: gle_map = doc.get_gl_entries() @@ -177,6 +182,14 @@ def start_repost(account_repost_doc=str) -> None: doc.force_set_against_expense_account() doc.make_gl_entries() + elif doc.doctype == "Purchase Receipt": + if not repost_doc.delete_cancelled_entries: + doc.docstatus = 2 + doc.make_gl_entries_on_cancel() + + doc.docstatus = 1 + doc.make_gl_entries(from_repost=True) + elif doc.doctype in ["Payment Entry", "Journal Entry", "Expense Claim"]: if not repost_doc.delete_cancelled_entries: doc.make_gl_entries(1) diff --git a/erpnext/accounts/doctype/repost_accounting_ledger/test_repost_accounting_ledger.py b/erpnext/accounts/doctype/repost_accounting_ledger/test_repost_accounting_ledger.py index 9f906bb7647..7ed999831cd 100644 --- a/erpnext/accounts/doctype/repost_accounting_ledger/test_repost_accounting_ledger.py +++ b/erpnext/accounts/doctype/repost_accounting_ledger/test_repost_accounting_ledger.py @@ -12,6 +12,8 @@ from erpnext.accounts.doctype.payment_request.payment_request import make_paymen from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice from erpnext.accounts.test.accounts_mixin import AccountsTestMixin from erpnext.accounts.utils import get_fiscal_year +from erpnext.stock.doctype.item.test_item import make_item +from erpnext.stock.doctype.purchase_receipt.test_purchase_receipt import get_gl_entries, make_purchase_receipt class TestRepostAccountingLedger(AccountsTestMixin, FrappeTestCase): @@ -204,9 +206,81 @@ class TestRepostAccountingLedger(AccountsTestMixin, FrappeTestCase): self.assertIsNotNone(frappe.db.exists("GL Entry", {"voucher_no": si.name, "is_cancelled": 1})) self.assertIsNotNone(frappe.db.exists("GL Entry", {"voucher_no": pe.name, "is_cancelled": 1})) + def test_06_repost_purchase_receipt(self): + from erpnext.accounts.doctype.account.test_account import create_account + + provisional_account = create_account( + account_name="Provision Account", + parent_account="Current Liabilities - _TC", + company=self.company, + ) + + another_provisional_account = create_account( + account_name="Another Provision Account", + parent_account="Current Liabilities - _TC", + company=self.company, + ) + + company = frappe.get_doc("Company", self.company) + company.enable_provisional_accounting_for_non_stock_items = 1 + company.default_provisional_account = provisional_account + company.save() + + test_cc = company.cost_center + default_expense_account = company.default_expense_account + + item = make_item(properties={"is_stock_item": 0}) + + pr = make_purchase_receipt(company=self.company, item_code=item.name, rate=1000.0, qty=1.0) + pr_gl_entries = get_gl_entries(pr.doctype, pr.name, skip_cancelled=True) + expected_pr_gles = [ + {"account": provisional_account, "debit": 0.0, "credit": 1000.0, "cost_center": test_cc}, + {"account": default_expense_account, "debit": 1000.0, "credit": 0.0, "cost_center": test_cc}, + ] + self.assertEqual(expected_pr_gles, pr_gl_entries) + + # change the provisional account + frappe.db.set_value( + "Purchase Receipt Item", + pr.items[0].name, + "provisional_expense_account", + another_provisional_account, + ) + + repost_doc = frappe.new_doc("Repost Accounting Ledger") + repost_doc.company = self.company + repost_doc.delete_cancelled_entries = True + repost_doc.append("vouchers", {"voucher_type": pr.doctype, "voucher_no": pr.name}) + repost_doc.save().submit() + + pr_gles_after_repost = get_gl_entries(pr.doctype, pr.name, skip_cancelled=True) + expected_pr_gles_after_repost = [ + {"account": default_expense_account, "debit": 1000.0, "credit": 0.0, "cost_center": test_cc}, + {"account": another_provisional_account, "debit": 0.0, "credit": 1000.0, "cost_center": test_cc}, + ] + self.assertEqual(len(pr_gles_after_repost), len(expected_pr_gles_after_repost)) + self.assertEqual(expected_pr_gles_after_repost, pr_gles_after_repost) + + # teardown + repost_doc.cancel() + repost_doc.delete() + + pr.reload() + pr.cancel() + + company.enable_provisional_accounting_for_non_stock_items = 0 + company.default_provisional_account = None + company.save() + def update_repost_settings(): - allowed_types = ["Sales Invoice", "Purchase Invoice", "Payment Entry", "Journal Entry"] + allowed_types = [ + "Sales Invoice", + "Purchase Invoice", + "Payment Entry", + "Journal Entry", + "Purchase Receipt", + ] repost_settings = frappe.get_doc("Repost Accounting Ledger Settings") for x in allowed_types: repost_settings.append("allowed_types", {"document_type": x, "allowed": True}) From f93feb18fbbd6cc4c3b954db6aef89dd71279bc5 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Wed, 19 Mar 2025 17:20:25 +0530 Subject: [PATCH 1463/1614] refactor: removed redundant message display for each item row cost center update (cherry picked from commit 4376ca5f1d52c836681fcdb567df1aa034b8d8e7) --- erpnext/public/js/utils/sales_common.js | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/erpnext/public/js/utils/sales_common.js b/erpnext/public/js/utils/sales_common.js index ca2bed20c7f..bbb2a88e629 100644 --- a/erpnext/public/js/utils/sales_common.js +++ b/erpnext/public/js/utils/sales_common.js @@ -447,22 +447,21 @@ erpnext.sales_common = { args: { project: this.frm.doc.project }, callback: function (r, rt) { if (!r.exc) { - $.each(me.frm.doc["items"] || [], function (i, row) { - if (r.message) { + if (r.message) { + $.each(me.frm.doc["items"] || [], function (i, row) { frappe.model.set_value( row.doctype, row.name, "cost_center", r.message ); - frappe.msgprint( - __( - "Cost Center For Item with Item Code {0} has been Changed to {1}", - [row.item_name, r.message] - ) - ); - } - }); + }); + frappe.msgprint( + __("Cost Center for Item rows has been updated to {0}", [ + r.message, + ]) + ); + } } }, }); From 391b5c4226616d3e2194fbf93a496b48383a0013 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Wed, 19 Mar 2025 16:52:13 +0530 Subject: [PATCH 1464/1614] fix: do not validate if conversion rate is 1 for different currency (cherry picked from commit e8a66d03bc617bdde4cedf1703190c15c31cbe91) --- .../doctype/sales_invoice/test_sales_invoice.py | 11 ----------- erpnext/controllers/accounts_controller.py | 17 +++++++++++------ 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py index f428eb50a3c..fe8342d78bd 100644 --- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py @@ -1819,17 +1819,6 @@ class TestSalesInvoice(FrappeTestCase): for field in expected_gle: self.assertEqual(expected_gle[field], gle[field]) - def test_invoice_exchange_rate(self): - si = create_sales_invoice( - customer="_Test Customer USD", - debit_to="_Test Receivable USD - _TC", - currency="USD", - conversion_rate=1, - do_not_save=1, - ) - - self.assertRaises(frappe.ValidationError, si.save) - def test_invalid_currency(self): # Customer currency = USD diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index ff0e0434309..e0d7e2a36df 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -2692,12 +2692,17 @@ class AccountsController(TransactionBase): default_currency = erpnext.get_company_currency(self.company) if not default_currency: throw(_("Please enter default currency in Company Master")) - if ( - (self.currency == default_currency and flt(self.conversion_rate) != 1.00) - or not self.conversion_rate - or (self.currency != default_currency and flt(self.conversion_rate) == 1.00) - ): - throw(_("Conversion rate cannot be 0 or 1")) + + if not self.conversion_rate: + throw(_("Conversion rate cannot be 0")) + + if self.currency == default_currency and flt(self.conversion_rate) != 1.00: + throw(_("Conversion rate must be 1.00 if document currency is same as company currency")) + + if self.currency != default_currency and flt(self.conversion_rate) == 1.00: + frappe.msgprint( + _("Conversion rate is 1.00, but document currency is different from company currency") + ) def check_finance_books(self, item, asset): if ( From b3c37332868dbcf143b4260bc56946dfbed5099e Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 25 Mar 2025 17:53:29 +0530 Subject: [PATCH 1465/1614] chore: resolve conflict --- erpnext/patches.txt | 5 ----- 1 file changed, 5 deletions(-) diff --git a/erpnext/patches.txt b/erpnext/patches.txt index da54fecd43e..d6d7cf18704 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -395,14 +395,9 @@ execute:frappe.db.set_single_value("Accounts Settings", "exchange_gain_loss_post erpnext.patches.v14_0.disable_add_row_in_gross_profit erpnext.patches.v15_0.set_difference_amount_in_asset_value_adjustment erpnext.patches.v14_0.update_posting_datetime -<<<<<<< HEAD erpnext.stock.doctype.stock_ledger_entry.patches.ensure_sle_indexes erpnext.patches.v15_0.update_query_report -erpnext.patches.v15_0.rename_field_from_rate_difference_to_amount_difference #2025-03-18 -erpnext.patches.v15_0.recalculate_amount_difference_field -======= erpnext.patches.v15_0.rename_field_from_rate_difference_to_amount_difference erpnext.patches.v15_0.recalculate_amount_difference_field #2025-03-18 ->>>>>>> dc45c3b39c (fix: date added to wrong patch) erpnext.patches.v15_0.rename_sla_fields #2025-03-12 erpnext.patches.v15_0.set_purchase_receipt_row_item_to_capitalization_stock_item From 62f342ef8b09abe821fbe8deebbd68054ee7fd85 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Tue, 25 Mar 2025 13:41:27 +0530 Subject: [PATCH 1466/1614] fix: expense account in the stock entry (cherry picked from commit 89569d4b324b0af109efdc3776f450ddc9a1fd61) --- erpnext/stock/doctype/stock_entry/stock_entry.js | 6 ------ erpnext/stock/doctype/stock_entry/stock_entry.py | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.js b/erpnext/stock/doctype/stock_entry/stock_entry.js index 635fd1a1fcf..0c619b22a33 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.js +++ b/erpnext/stock/doctype/stock_entry/stock_entry.js @@ -1026,10 +1026,6 @@ erpnext.stock.StockEntry = class StockEntry extends erpnext.stock.StockControlle }; }); - if (me.frm.doc.company && erpnext.is_perpetual_inventory_enabled(me.frm.doc.company)) { - this.frm.add_fetch("company", "stock_adjustment_account", "expense_account"); - } - this.frm.fields_dict.items.grid.get_field("expense_account").get_query = function () { if (erpnext.is_perpetual_inventory_enabled(me.frm.doc.company)) { return { @@ -1143,8 +1139,6 @@ erpnext.stock.StockEntry = class StockEntry extends erpnext.stock.StockControlle this.frm.trigger("toggle_display_account_head"); erpnext.accounts.dimensions.update_dimension(this.frm, this.frm.doctype); - if (this.frm.doc.company && erpnext.is_perpetual_inventory_enabled(this.frm.doc.company)) - this.set_default_account("stock_adjustment_account", "expense_account"); this.set_default_account("cost_center", "cost_center"); this.frm.refresh_fields("items"); diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index 3f548a1324d..52655c9ac03 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -1672,7 +1672,7 @@ class StockEntry(StockController): if self.purpose == "Material Issue": ret["expense_account"] = item.get("expense_account") or item_group_defaults.get("expense_account") - if self.purpose == "Manufacture": + if self.purpose == "Manufacture" or not ret.get("expense_account"): ret["expense_account"] = frappe.get_cached_value( "Company", self.company, "stock_adjustment_account" ) From c5efddae16ae0f31088ab84cb8e15996a37e654a Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Wed, 26 Mar 2025 15:20:12 +0530 Subject: [PATCH 1467/1614] fix: decimal values causing incorrect batch picking (cherry picked from commit 7bfe703b04646f52132561ba1ba336af688fe524) --- erpnext/controllers/subcontracting_controller.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/erpnext/controllers/subcontracting_controller.py b/erpnext/controllers/subcontracting_controller.py index a672360046c..739e64fa2eb 100644 --- a/erpnext/controllers/subcontracting_controller.py +++ b/erpnext/controllers/subcontracting_controller.py @@ -545,7 +545,11 @@ class SubcontractingController(StockController): def __get_batch_nos_for_bundle(self, qty, key): available_batches = defaultdict(float) + precision = frappe.get_precision("Subcontracting Receipt Supplied Item", "consumed_qty") for batch_no, batch_qty in self.available_materials[key]["batch_no"].items(): + if flt(batch_qty, precision) <= 0: + continue + qty_to_consumed = 0 if qty > 0: if batch_qty >= qty: From af0fb131a22c07d82802959bcc2c88189146af20 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Wed, 26 Mar 2025 21:50:18 +0530 Subject: [PATCH 1468/1614] fix: slow query (cherry picked from commit 5ddb36af8725108d257e95b68a2994532c605589) # Conflicts: # erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.json --- erpnext/stock/deprecated_serial_batch.py | 4 ---- .../stock_entry_detail/stock_entry_detail.json | 16 ++++++++++++++-- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/erpnext/stock/deprecated_serial_batch.py b/erpnext/stock/deprecated_serial_batch.py index 359027ec6be..f084c324745 100644 --- a/erpnext/stock/deprecated_serial_batch.py +++ b/erpnext/stock/deprecated_serial_batch.py @@ -252,7 +252,6 @@ class DeprecatedBatchNoValuation: from erpnext.stock.utils import get_combine_datetime sle = frappe.qb.DocType("Stock Ledger Entry") - batch = frappe.qb.DocType("Batch") posting_datetime = get_combine_datetime(self.sle.posting_date, self.sle.posting_time) if not self.sle.creation: @@ -267,8 +266,6 @@ class DeprecatedBatchNoValuation: query = ( frappe.qb.from_(sle) - .inner_join(batch) - .on(sle.batch_no == batch.name) .select( sle.stock_value, sle.qty_after_transaction, @@ -276,7 +273,6 @@ class DeprecatedBatchNoValuation: .where( (sle.item_code == self.sle.item_code) & (sle.warehouse == self.sle.warehouse) - & (sle.batch_no.isnotnull()) & (sle.is_cancelled == 0) ) .where(timestamp_condition) diff --git a/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.json b/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.json index 48fc31ab663..dec8d575077 100644 --- a/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.json +++ b/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.json @@ -250,6 +250,7 @@ }, { "depends_on": "eval:doc.uom != doc.stock_uom", + "fetch_from": "item_code.stock_uom", "fieldname": "stock_uom", "fieldtype": "Link", "label": "Stock UOM", @@ -588,7 +589,8 @@ "label": "Serial and Batch Bundle", "no_copy": 1, "options": "Serial and Batch Bundle", - "print_hide": 1 + "print_hide": 1, + "search_index": 1 }, { "default": "0", @@ -606,18 +608,28 @@ "fieldtype": "Column Break" } ], + "grid_page_length": 50, "idx": 1, "index_web_pages_for_search": 1, "istable": 1, "links": [], +<<<<<<< HEAD "modified": "2024-02-25 15:58:40.982582", +======= + "modified": "2025-03-26 21:00:58.544797", +>>>>>>> 5ddb36af87 (fix: slow query) "modified_by": "Administrator", "module": "Stock", "name": "Stock Entry Detail", "naming_rule": "Random", "owner": "Administrator", "permissions": [], +<<<<<<< HEAD "sort_field": "modified", +======= + "row_format": "Dynamic", + "sort_field": "creation", +>>>>>>> 5ddb36af87 (fix: slow query) "sort_order": "ASC", "states": [] -} \ No newline at end of file +} From 41f20a9c642ab3a634b4c0fc1b8ecf194b019e56 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Wed, 26 Mar 2025 22:11:43 +0530 Subject: [PATCH 1469/1614] chore: fix conflicts --- .../stock_entry_detail/stock_entry_detail.json | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.json b/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.json index dec8d575077..9824911404e 100644 --- a/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.json +++ b/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.json @@ -613,23 +613,14 @@ "index_web_pages_for_search": 1, "istable": 1, "links": [], -<<<<<<< HEAD - "modified": "2024-02-25 15:58:40.982582", -======= - "modified": "2025-03-26 21:00:58.544797", ->>>>>>> 5ddb36af87 (fix: slow query) + "modified": "2025-03-26 21:01:58.544797", "modified_by": "Administrator", "module": "Stock", "name": "Stock Entry Detail", "naming_rule": "Random", "owner": "Administrator", "permissions": [], -<<<<<<< HEAD "sort_field": "modified", -======= - "row_format": "Dynamic", - "sort_field": "creation", ->>>>>>> 5ddb36af87 (fix: slow query) "sort_order": "ASC", "states": [] } From d1311e619db233cda64c47833538c1669b3bb17e Mon Sep 17 00:00:00 2001 From: ljain112 Date: Tue, 25 Mar 2025 17:51:41 +0530 Subject: [PATCH 1470/1614] fix: do not use self object for setting party and party type (cherry picked from commit 80b746d4dd7958f19ad2c3d7d95311b1934aa967) --- erpnext/controllers/accounts_controller.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index e0d7e2a36df..2e90c446ade 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -443,21 +443,22 @@ class AccountsController(TransactionBase): ) def validate_party_address_and_contact(self): - party, party_type = None, None - if self.get("customer"): - party, party_type = self.customer, "Customer" + party_type, party = self.get_party() + + if not (party_type and party): + return + + if party_type == "Customer": billing_address, shipping_address = ( self.get("customer_address"), self.get("shipping_address_name"), ) self.validate_party_address(party, party_type, billing_address, shipping_address) - elif self.get("supplier"): - party, party_type = self.supplier, "Supplier" + elif party_type == "Supplier": billing_address = self.get("supplier_address") self.validate_party_address(party, party_type, billing_address) - if party and party_type: - self.validate_party_contact(party, party_type) + self.validate_party_contact(party, party_type) def validate_party_address(self, party, party_type, billing_address, shipping_address=None): if billing_address or shipping_address: From 326126e741f1670f754566fd87cacf6af9d17466 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Thu, 27 Mar 2025 11:58:02 +0530 Subject: [PATCH 1471/1614] Revert "perf: timeout while renaming cost center (backport #46641)" --- erpnext/accounts/doctype/gl_entry/gl_entry.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/gl_entry/gl_entry.json b/erpnext/accounts/doctype/gl_entry/gl_entry.json index 769fbbc427a..b438dbbe4ec 100644 --- a/erpnext/accounts/doctype/gl_entry/gl_entry.json +++ b/erpnext/accounts/doctype/gl_entry/gl_entry.json @@ -105,8 +105,7 @@ "label": "Cost Center", "oldfieldname": "cost_center", "oldfieldtype": "Link", - "options": "Cost Center", - "search_index": 1 + "options": "Cost Center" }, { "fieldname": "debit", @@ -359,7 +358,7 @@ "idx": 1, "in_create": 1, "links": [], - "modified": "2025-03-21 15:29:11.221890", + "modified": "2025-02-21 14:36:49.431166", "modified_by": "Administrator", "module": "Accounts", "name": "GL Entry", From 6f94ba599bcb216386ddce692278fb96e3087856 Mon Sep 17 00:00:00 2001 From: Abdeali Chharchhodawala <99460106+Abdeali099@users.noreply.github.com> Date: Fri, 28 Mar 2025 18:17:47 +0530 Subject: [PATCH 1472/1614] Merge pull request #46683 from Abdeali099/set-employee-contact-details fix: Set complete contact details for `Employee` in PE (cherry picked from commit 8c9d630ee42d6856e9f57cc7b4c59b012f23e0ab) # Conflicts: # erpnext/accounts/doctype/payment_entry/payment_entry.json # erpnext/accounts/doctype/payment_entry/payment_entry.py --- .../doctype/payment_entry/payment_entry.json | 8 ++- .../doctype/payment_entry/payment_entry.py | 15 +++- erpnext/accounts/party.py | 70 ++++++++++++------- 3 files changed, 64 insertions(+), 29 deletions(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.json b/erpnext/accounts/doctype/payment_entry/payment_entry.json index 3a0a4a8d065..190bdf8d4f5 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.json +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.json @@ -203,14 +203,14 @@ "fieldtype": "Column Break" }, { - "depends_on": "party", + "depends_on": "eval: doc.party && doc.party_type !== \"Employee\"", "fieldname": "contact_person", "fieldtype": "Link", "label": "Contact", "options": "Contact" }, { - "depends_on": "contact_person", + "depends_on": "eval: (doc.contact_person || doc.party_type === \"Employee\") && doc.contact_email", "fieldname": "contact_email", "fieldtype": "Data", "label": "Email", @@ -809,7 +809,11 @@ "table_fieldname": "payment_entries" } ], +<<<<<<< HEAD "modified": "2025-01-31 17:27:28.555246", +======= + "modified": "2025-03-24 16:18:19.920701", +>>>>>>> 8c9d630ee4 (Merge pull request #46683 from Abdeali099/set-employee-contact-details) "modified_by": "Administrator", "module": "Accounts", "name": "Payment Entry", diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index 6c7b1ad5f5a..b348e8cb981 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -38,7 +38,11 @@ from erpnext.accounts.general_ledger import ( make_reverse_gl_entries, process_gl_map, ) -from erpnext.accounts.party import complete_contact_details, get_party_account, set_contact_details +from erpnext.accounts.party import ( + complete_contact_details, + get_default_contact, + get_party_account, +) from erpnext.accounts.utils import ( cancel_exchange_gain_loss_journal, get_account_currency, @@ -440,6 +444,7 @@ class PaymentEntry(AccountsController): self.party_name = frappe.db.get_value(self.party_type, self.party, "name") if self.party: +<<<<<<< HEAD if not self.contact_person: set_contact_details( self, party=frappe._dict({"name": self.party}), party_type=self.party_type @@ -450,6 +455,14 @@ class PaymentEntry(AccountsController): self.party_balance = get_balance_on( party_type=self.party_type, party=self.party, date=self.posting_date, company=self.company ) +======= + if self.party_type == "Employee": + self.contact_person = None + elif not self.contact_person: + self.contact_person = get_default_contact(self.party_type, self.party) + + complete_contact_details(self) +>>>>>>> 8c9d630ee4 (Merge pull request #46683 from Abdeali099/set-employee-contact-details) if not self.party_account: party_account = get_party_account(self.party_type, self.party, self.company) diff --git a/erpnext/accounts/party.py b/erpnext/accounts/party.py index 37b5b884234..5ca50b8d7c6 100644 --- a/erpnext/accounts/party.py +++ b/erpnext/accounts/party.py @@ -280,32 +280,50 @@ def get_regional_address_details(party_details, doctype, company): def complete_contact_details(party_details): - if not party_details.contact_person: - party_details.update( - { - "contact_person": None, - "contact_display": None, - "contact_email": None, - "contact_mobile": None, - "contact_phone": None, - "contact_designation": None, - "contact_department": None, - } + contact_details = frappe._dict() + + if party_details.party_type == "Employee": + contact_details = frappe.db.get_value( + "Employee", + party_details.party, + [ + "employee_name as contact_display", + "prefered_email as contact_email", + "cell_number as contact_mobile", + "designation as contact_designation", + "department as contact_department", + ], + as_dict=True, + ) + + contact_details.update({"contact_person": None, "contact_phone": None}) + elif party_details.contact_person: + contact_details = frappe.db.get_value( + "Contact", + party_details.contact_person, + [ + "name as contact_person", + "full_name as contact_display", + "email_id as contact_email", + "mobile_no as contact_mobile", + "phone as contact_phone", + "designation as contact_designation", + "department as contact_department", + ], + as_dict=True, ) else: - fields = [ - "name as contact_person", - "full_name as contact_display", - "email_id as contact_email", - "mobile_no as contact_mobile", - "phone as contact_phone", - "designation as contact_designation", - "department as contact_department", - ] + contact_details = { + "contact_person": None, + "contact_display": None, + "contact_email": None, + "contact_mobile": None, + "contact_phone": None, + "contact_designation": None, + "contact_department": None, + } - contact_details = frappe.db.get_value("Contact", party_details.contact_person, fields, as_dict=True) - - party_details.update(contact_details) + party_details.update(contact_details) def set_contact_details(party_details, party, party_type): @@ -771,9 +789,9 @@ def validate_account_party_type(self): account_type = frappe.get_cached_value("Account", self.account, "account_type") if account_type and (account_type not in ["Receivable", "Payable", "Equity"]): frappe.throw( - _( - "Party Type and Party can only be set for Receivable / Payable account

" "{0}" - ).format(self.account) + _("Party Type and Party can only be set for Receivable / Payable account

{0}").format( + self.account + ) ) From 454dd3a2f11451c4dd530c32ee4577fc8bafb21c Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Thu, 27 Mar 2025 17:33:43 +0530 Subject: [PATCH 1473/1614] fix: valuation rate not updating for raw materials (cherry picked from commit 5af8378471009713e4b4adf112f0343092f977e2) # Conflicts: # erpnext/manufacturing/doctype/work_order/test_work_order.py --- .../doctype/work_order/test_work_order.py | 287 ++++++++++++++++++ erpnext/stock/stock_ledger.py | 14 +- 2 files changed, 300 insertions(+), 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/work_order/test_work_order.py b/erpnext/manufacturing/doctype/work_order/test_work_order.py index 84f2b75432c..ca14c759088 100644 --- a/erpnext/manufacturing/doctype/work_order/test_work_order.py +++ b/erpnext/manufacturing/doctype/work_order/test_work_order.py @@ -2602,6 +2602,293 @@ class TestWorkOrder(FrappeTestCase): status = frappe.db.get_value("Serial No", row, "status") self.assertEqual(status, "Consumed") +<<<<<<< HEAD +======= + def test_stock_reservation_for_serialized_raw_material(self): + from erpnext.stock.doctype.stock_entry.stock_entry_utils import ( + make_stock_entry as make_stock_entry_test_record, + ) + + production_item = "Test Stock Reservation FG 1" + rm_item = "Test Stock Reservation RM 1" + source_warehouse = "Stores - _TC" + + make_item(production_item, {"is_stock_item": 1}) + make_item(rm_item, {"is_stock_item": 1, "has_serial_no": 1, "serial_no_series": "TST-SER-RES-.###"}) + + bom = make_bom( + item=production_item, + source_warehouse=source_warehouse, + raw_materials=[rm_item], + operating_cost_per_bom_quantity=100, + do_not_submit=True, + ) + + for row in bom.exploded_items: + make_stock_entry_test_record( + item_code=row.item_code, + target=source_warehouse, + qty=10, + basic_rate=100, + ) + + wo = make_wo_order_test_record( + item=production_item, + qty=10, + reserve_stock=1, + source_warehouse=source_warehouse, + ) + + self.assertTrue(frappe.get_all("Stock Reservation Entry", filters={"voucher_no": wo.name})) + + wo1 = make_wo_order_test_record( + item=production_item, + qty=10, + reserve_stock=1, + source_warehouse=source_warehouse, + ) + + self.assertFalse(frappe.get_all("Stock Reservation Entry", filters={"voucher_no": wo1.name})) + + transfer_entry = frappe.get_doc(make_stock_entry(wo1.name, "Material Transfer for Manufacture", 10)) + transfer_entry.save() + + self.assertRaises(frappe.ValidationError, transfer_entry.submit) + + def test_stock_reservation_for_batched_raw_material(self): + from erpnext.stock.doctype.stock_entry.stock_entry_utils import ( + make_stock_entry as make_stock_entry_test_record, + ) + + production_item = "Test Stock Reservation FG 2" + rm_item = "Test Stock Reservation RM 2" + source_warehouse = "Stores - _TC" + + make_item(production_item, {"is_stock_item": 1}) + make_item( + rm_item, + { + "is_stock_item": 1, + "has_batch_no": 1, + "batch_number_series": "TST-BATCH-RES-.###", + "create_new_batch": 1, + }, + ) + + bom = make_bom( + item=production_item, + source_warehouse=source_warehouse, + raw_materials=[rm_item], + operating_cost_per_bom_quantity=100, + do_not_submit=True, + ) + + for row in bom.exploded_items: + make_stock_entry_test_record( + item_code=row.item_code, + target=source_warehouse, + qty=10, + basic_rate=100, + ) + + wo = make_wo_order_test_record( + item=production_item, + qty=10, + reserve_stock=1, + source_warehouse=source_warehouse, + ) + + self.assertTrue(frappe.get_all("Stock Reservation Entry", filters={"voucher_no": wo.name})) + + wo1 = make_wo_order_test_record( + item=production_item, + qty=10, + reserve_stock=1, + source_warehouse=source_warehouse, + ) + + self.assertFalse(frappe.get_all("Stock Reservation Entry", filters={"voucher_no": wo1.name})) + + transfer_entry = frappe.get_doc(make_stock_entry(wo1.name, "Material Transfer for Manufacture", 10)) + transfer_entry.save() + + self.assertRaises(frappe.ValidationError, transfer_entry.submit) + + def test_auto_stock_reservation_for_batched_raw_material(self): + from erpnext.stock.doctype.stock_entry.stock_entry_utils import ( + make_stock_entry as make_stock_entry_test_record, + ) + + frappe.db.set_single_value("Stock Settings", "auto_reserve_serial_and_batch", 1) + + production_item = "Test Stock Reservation FG 3" + rm_item = "Test Stock Reservation RM 3" + source_warehouse = "Stores - _TC" + + make_item(production_item, {"is_stock_item": 1}) + make_item( + rm_item, + { + "is_stock_item": 1, + "has_batch_no": 1, + "batch_number_series": "TST-BATCH-RES-.###", + "create_new_batch": 1, + }, + ) + + bom = make_bom( + item=production_item, + source_warehouse=source_warehouse, + raw_materials=[rm_item], + operating_cost_per_bom_quantity=100, + do_not_submit=True, + ) + + itemwise_batches = frappe._dict() + for row in bom.exploded_items: + se = make_stock_entry_test_record( + item_code=row.item_code, + target=source_warehouse, + qty=10, + basic_rate=100, + ) + + itemwise_batches[row.item_code] = get_batch_from_bundle(se.items[0].serial_and_batch_bundle) + + wo = make_wo_order_test_record( + item=production_item, + qty=10, + reserve_stock=1, + source_warehouse=source_warehouse, + ) + + self.assertTrue(frappe.get_all("Stock Reservation Entry", filters={"voucher_no": wo.name})) + + for row in frappe.get_all("Stock Reservation Entry", filters={"voucher_no": wo.name}): + reservation_entry = frappe.get_doc("Stock Reservation Entry", row.name) + self.assertTrue(reservation_entry.has_batch_no) + self.assertTrue(reservation_entry.sb_entries) + + for row in bom.exploded_items: + make_stock_entry_test_record( + item_code=row.item_code, + target=source_warehouse, + qty=10, + basic_rate=100, + ) + + transfer_entry = frappe.get_doc(make_stock_entry(wo.name, "Material Transfer for Manufacture", 10)) + transfer_entry.save() + transfer_entry.submit() + + for row in transfer_entry.items: + batch_no = get_batch_from_bundle(row.serial_and_batch_bundle) + self.assertEqual(batch_no, itemwise_batches[row.item_code]) + + def test_work_order_valuation_auto_pick(self): + fg_item = "Test FG Item For Non Transfer Item Batch" + rm_item = "Test RM Item For Non Transfer Item Batch" + + make_item(fg_item, {"is_stock_item": 1}) + make_item( + rm_item, + { + "is_stock_item": 1, + "has_batch_no": 1, + "create_new_batch": 1, + "batch_number_series": "TST-BATCH-NTI-.###", + }, + ) + + source_warehouse = "_Test Warehouse - _TC" + wip_warehouse = "Stores - _TC" + finished_goods_warehouse = create_warehouse("_Test Finished Goods Warehouse", company="_Test Company") + + batches = make_stock_in_entries_and_get_batches(rm_item, source_warehouse, wip_warehouse) + + if not frappe.db.get_value("BOM", {"item": fg_item}): + make_bom(item=fg_item, raw_materials=[rm_item]) + + wo = make_wo_order_test_record( + item=fg_item, + qty=5, + source_warehouse=source_warehouse, + wip_warehouse=wip_warehouse, + fg_warehouse=finished_goods_warehouse, + ) + + stock_entry = frappe.get_doc(make_stock_entry(wo.name, "Material Transfer for Manufacture", 5)) + stock_entry.items[0].batch_no = batches[1] + stock_entry.items[0].use_serial_batch_fields = 1 + stock_entry.submit() + stock_entry.reload() + + self.assertEqual(stock_entry.items[0].valuation_rate, 200) + + original_value = frappe.db.get_single_value( + "Stock Settings", "auto_create_serial_and_batch_bundle_for_outward" + ) + original_based_on = frappe.db.get_single_value("Stock Settings", "pick_serial_and_batch_based_on") + + frappe.db.set_single_value("Stock Settings", "auto_create_serial_and_batch_bundle_for_outward", 1) + frappe.db.set_single_value("Stock Settings", "pick_serial_and_batch_based_on", "Expiry") + + stock_entry = frappe.get_doc(make_stock_entry(wo.name, "Manufacture", 5)) + stock_entry.items[0].use_serial_batch_fields = 1 + stock_entry.submit() + stock_entry.reload() + + batch_no = get_batch_from_bundle(stock_entry.items[0].serial_and_batch_bundle) + self.assertEqual(batch_no, batches[1]) + self.assertEqual(stock_entry.items[0].valuation_rate, 200) + self.assertEqual(stock_entry.items[1].valuation_rate, 200) + + frappe.db.set_single_value( + "Stock Settings", "auto_create_serial_and_batch_bundle_for_outward", original_value + ) + frappe.db.set_single_value("Stock Settings", "pick_serial_and_batch_based_on", original_based_on) + + +def make_stock_in_entries_and_get_batches(rm_item, source_warehouse, wip_warehouse): + from erpnext.stock.doctype.stock_entry.test_stock_entry import ( + make_stock_entry as make_stock_entry_test_record, + ) + + batches = [] + for qty, rate in ((5, 100), (5, 200)): + stock_entry = make_stock_entry_test_record( + item_code=rm_item, + target=source_warehouse, + qty=qty, + basic_rate=rate, + ) + stock_entry.submit() + stock_entry.reload() + + batch_no = get_batch_from_bundle(stock_entry.items[0].serial_and_batch_bundle) + batch_doc = frappe.get_doc("Batch", batch_no) + + # keep early expiry date for the batch having rate 200 + days = 10 if rate == 100 else 1 + batch_doc.db_set("expiry_date", add_to_date(now(), days=days)) + + batches.append(batch_no) + + stock_entry = make_stock_entry_test_record( + item_code=rm_item, + target=wip_warehouse, + qty=qty, + basic_rate=rate, + ) + stock_entry.submit() + stock_entry.reload() + batch_no = get_batch_from_bundle(stock_entry.items[0].serial_and_batch_bundle) + batch_doc = frappe.get_doc("Batch", batch_no) + batch_doc.db_set("expiry_date", add_to_date(now(), days=10)) + + return batches + +>>>>>>> 5af8378471 (fix: valuation rate not updating for raw materials) def make_operation(**kwargs): kwargs = frappe._dict(kwargs) diff --git a/erpnext/stock/stock_ledger.py b/erpnext/stock/stock_ledger.py index aaeb90b7d30..4627c8aecfa 100644 --- a/erpnext/stock/stock_ledger.py +++ b/erpnext/stock/stock_ledger.py @@ -1212,9 +1212,21 @@ class update_entries_after: frappe.db.set_value("Stock Entry Detail", sle.voucher_detail_no, "basic_rate", outgoing_rate) # Update outgoing item's rate, recalculate FG Item's rate and total incoming/outgoing amount - if not sle.dependant_sle_voucher_detail_no: + if not sle.dependant_sle_voucher_detail_no or self.is_manufacture_entry_with_sabb(sle): self.recalculate_amounts_in_stock_entry(sle.voucher_no, sle.voucher_detail_no) + def is_manufacture_entry_with_sabb(self, sle): + if ( + self.args.get("sle_id") + and sle.serial_and_batch_bundle + and sle.auto_created_serial_and_batch_bundle + ): + purpose = frappe.get_cached_value("Stock Entry", sle.voucher_no, "purpose") + if purpose in ["Manufacture", "Repack"]: + return True + + return False + def recalculate_amounts_in_stock_entry(self, voucher_no, voucher_detail_no): stock_entry = frappe.get_doc("Stock Entry", voucher_no, for_update=True) stock_entry.calculate_rate_and_amount(reset_outgoing_rate=False, raise_error_if_no_rate=False) From 34e66b1b2777301dec7b4a7be0a1bc0b26b70e2b Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Fri, 28 Mar 2025 13:10:12 +0530 Subject: [PATCH 1474/1614] fix: for deadlock issue keep status as In Progress (cherry picked from commit e6ff7f0e9f630a02097a6f2ffa2e3bcb8f2c2fcf) --- .../repost_item_valuation.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py b/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py index 0c81a296d5e..9026a9a9a8b 100644 --- a/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py +++ b/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py @@ -291,7 +291,7 @@ def repost(doc): status = "Failed" # If failed because of timeout, set status to In Progress - if traceback and "timeout" in traceback.lower(): + if traceback and ("timeout" in traceback.lower() or "Deadlock found" in traceback): status = "In Progress" if traceback: @@ -306,13 +306,14 @@ def repost(doc): }, ) - outgoing_email_account = frappe.get_cached_value( - "Email Account", {"default_outgoing": 1, "enable_outgoing": 1}, "name" - ) + if status == "Failed": + outgoing_email_account = frappe.get_cached_value( + "Email Account", {"default_outgoing": 1, "enable_outgoing": 1}, "name" + ) - if outgoing_email_account and not isinstance(e, RecoverableErrors): - notify_error_to_stock_managers(doc, message) - doc.set_status("Failed") + if outgoing_email_account and not isinstance(e, RecoverableErrors): + notify_error_to_stock_managers(doc, message) + doc.set_status("Failed") finally: if not frappe.flags.in_test: frappe.db.commit() From 5079519863b0492a2a26772edce0330bde03352f Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Fri, 28 Mar 2025 23:47:43 +0530 Subject: [PATCH 1475/1614] chore: fix conflicts --- .../doctype/work_order/test_work_order.py | 184 ------------------ 1 file changed, 184 deletions(-) diff --git a/erpnext/manufacturing/doctype/work_order/test_work_order.py b/erpnext/manufacturing/doctype/work_order/test_work_order.py index ca14c759088..dfa02c03772 100644 --- a/erpnext/manufacturing/doctype/work_order/test_work_order.py +++ b/erpnext/manufacturing/doctype/work_order/test_work_order.py @@ -2602,189 +2602,6 @@ class TestWorkOrder(FrappeTestCase): status = frappe.db.get_value("Serial No", row, "status") self.assertEqual(status, "Consumed") -<<<<<<< HEAD -======= - def test_stock_reservation_for_serialized_raw_material(self): - from erpnext.stock.doctype.stock_entry.stock_entry_utils import ( - make_stock_entry as make_stock_entry_test_record, - ) - - production_item = "Test Stock Reservation FG 1" - rm_item = "Test Stock Reservation RM 1" - source_warehouse = "Stores - _TC" - - make_item(production_item, {"is_stock_item": 1}) - make_item(rm_item, {"is_stock_item": 1, "has_serial_no": 1, "serial_no_series": "TST-SER-RES-.###"}) - - bom = make_bom( - item=production_item, - source_warehouse=source_warehouse, - raw_materials=[rm_item], - operating_cost_per_bom_quantity=100, - do_not_submit=True, - ) - - for row in bom.exploded_items: - make_stock_entry_test_record( - item_code=row.item_code, - target=source_warehouse, - qty=10, - basic_rate=100, - ) - - wo = make_wo_order_test_record( - item=production_item, - qty=10, - reserve_stock=1, - source_warehouse=source_warehouse, - ) - - self.assertTrue(frappe.get_all("Stock Reservation Entry", filters={"voucher_no": wo.name})) - - wo1 = make_wo_order_test_record( - item=production_item, - qty=10, - reserve_stock=1, - source_warehouse=source_warehouse, - ) - - self.assertFalse(frappe.get_all("Stock Reservation Entry", filters={"voucher_no": wo1.name})) - - transfer_entry = frappe.get_doc(make_stock_entry(wo1.name, "Material Transfer for Manufacture", 10)) - transfer_entry.save() - - self.assertRaises(frappe.ValidationError, transfer_entry.submit) - - def test_stock_reservation_for_batched_raw_material(self): - from erpnext.stock.doctype.stock_entry.stock_entry_utils import ( - make_stock_entry as make_stock_entry_test_record, - ) - - production_item = "Test Stock Reservation FG 2" - rm_item = "Test Stock Reservation RM 2" - source_warehouse = "Stores - _TC" - - make_item(production_item, {"is_stock_item": 1}) - make_item( - rm_item, - { - "is_stock_item": 1, - "has_batch_no": 1, - "batch_number_series": "TST-BATCH-RES-.###", - "create_new_batch": 1, - }, - ) - - bom = make_bom( - item=production_item, - source_warehouse=source_warehouse, - raw_materials=[rm_item], - operating_cost_per_bom_quantity=100, - do_not_submit=True, - ) - - for row in bom.exploded_items: - make_stock_entry_test_record( - item_code=row.item_code, - target=source_warehouse, - qty=10, - basic_rate=100, - ) - - wo = make_wo_order_test_record( - item=production_item, - qty=10, - reserve_stock=1, - source_warehouse=source_warehouse, - ) - - self.assertTrue(frappe.get_all("Stock Reservation Entry", filters={"voucher_no": wo.name})) - - wo1 = make_wo_order_test_record( - item=production_item, - qty=10, - reserve_stock=1, - source_warehouse=source_warehouse, - ) - - self.assertFalse(frappe.get_all("Stock Reservation Entry", filters={"voucher_no": wo1.name})) - - transfer_entry = frappe.get_doc(make_stock_entry(wo1.name, "Material Transfer for Manufacture", 10)) - transfer_entry.save() - - self.assertRaises(frappe.ValidationError, transfer_entry.submit) - - def test_auto_stock_reservation_for_batched_raw_material(self): - from erpnext.stock.doctype.stock_entry.stock_entry_utils import ( - make_stock_entry as make_stock_entry_test_record, - ) - - frappe.db.set_single_value("Stock Settings", "auto_reserve_serial_and_batch", 1) - - production_item = "Test Stock Reservation FG 3" - rm_item = "Test Stock Reservation RM 3" - source_warehouse = "Stores - _TC" - - make_item(production_item, {"is_stock_item": 1}) - make_item( - rm_item, - { - "is_stock_item": 1, - "has_batch_no": 1, - "batch_number_series": "TST-BATCH-RES-.###", - "create_new_batch": 1, - }, - ) - - bom = make_bom( - item=production_item, - source_warehouse=source_warehouse, - raw_materials=[rm_item], - operating_cost_per_bom_quantity=100, - do_not_submit=True, - ) - - itemwise_batches = frappe._dict() - for row in bom.exploded_items: - se = make_stock_entry_test_record( - item_code=row.item_code, - target=source_warehouse, - qty=10, - basic_rate=100, - ) - - itemwise_batches[row.item_code] = get_batch_from_bundle(se.items[0].serial_and_batch_bundle) - - wo = make_wo_order_test_record( - item=production_item, - qty=10, - reserve_stock=1, - source_warehouse=source_warehouse, - ) - - self.assertTrue(frappe.get_all("Stock Reservation Entry", filters={"voucher_no": wo.name})) - - for row in frappe.get_all("Stock Reservation Entry", filters={"voucher_no": wo.name}): - reservation_entry = frappe.get_doc("Stock Reservation Entry", row.name) - self.assertTrue(reservation_entry.has_batch_no) - self.assertTrue(reservation_entry.sb_entries) - - for row in bom.exploded_items: - make_stock_entry_test_record( - item_code=row.item_code, - target=source_warehouse, - qty=10, - basic_rate=100, - ) - - transfer_entry = frappe.get_doc(make_stock_entry(wo.name, "Material Transfer for Manufacture", 10)) - transfer_entry.save() - transfer_entry.submit() - - for row in transfer_entry.items: - batch_no = get_batch_from_bundle(row.serial_and_batch_bundle) - self.assertEqual(batch_no, itemwise_batches[row.item_code]) - def test_work_order_valuation_auto_pick(self): fg_item = "Test FG Item For Non Transfer Item Batch" rm_item = "Test RM Item For Non Transfer Item Batch" @@ -2888,7 +2705,6 @@ def make_stock_in_entries_and_get_batches(rm_item, source_warehouse, wip_warehou return batches ->>>>>>> 5af8378471 (fix: valuation rate not updating for raw materials) def make_operation(**kwargs): kwargs = frappe._dict(kwargs) From 502b8f25b3fefc5c9f8fa31c14aeb8fb4335c272 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Fri, 28 Mar 2025 23:43:25 +0530 Subject: [PATCH 1476/1614] fix: incorrect condition (cherry picked from commit 0c1a8e9c58a0776bcdb7d4781416bc2d40e98a76) --- erpnext/public/js/controllers/transaction.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 5440fe8588e..6423fd78fe9 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -335,7 +335,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe let d = locals[cdt][cdn]; return { filters: { - docstatus: ("<", 2), + docstatus: ["<", 2], inspection_type: inspection_type, reference_name: doc.name, item_code: d.item_code From e168483a58f8eb3a96234f8474d0dfe0413dd857 Mon Sep 17 00:00:00 2001 From: Vishakh Desai <78500008+vishakhdesai@users.noreply.github.com> Date: Mon, 31 Mar 2025 11:25:41 +0530 Subject: [PATCH 1477/1614] fix: multiple Bank Reconciliation Tool issues (#46644) * fix: bank reconciliation tool issue * refactor: separate Bank Transaction linking from other logic * fix: delink old pe on update_after_submit in bank transaction * fix: failing test case fixed * fix: changes as per review * refactor: rename `gles` to `gl_entries` --------- Co-authored-by: Sagar Vora (cherry picked from commit 646cf54679c68422aeff7c4a9aba0cccb9d7f852) --- .../bank_reconciliation_tool.py | 43 +- .../bank_transaction/bank_transaction.js | 31 +- .../bank_transaction/bank_transaction.py | 402 +++++++++--------- erpnext/accounts/test/accounts_mixin.py | 1 + 4 files changed, 244 insertions(+), 233 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 6c57ea42367..d47cc7b5968 100644 --- a/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py +++ b/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py @@ -8,6 +8,7 @@ import frappe from frappe import _ from frappe.model.document import Document from frappe.query_builder.custom import ConstantColumn +from frappe.query_builder.functions import Sum from frappe.utils import cint, flt from erpnext import get_default_cost_center @@ -517,16 +518,23 @@ def subtract_allocations(gl_account, vouchers): voucher_allocated_amounts = get_total_allocated_amount(voucher_docs) for voucher in vouchers: - rows = voucher_allocated_amounts.get((voucher.get("doctype"), voucher.get("name"))) or [] - filtered_row = list(filter(lambda row: row.get("gl_account") == gl_account, rows)) - - if amount := None if not filtered_row else filtered_row[0]["total"]: + if amount := get_allocated_amount(voucher_allocated_amounts, voucher, gl_account): voucher["paid_amount"] -= amount copied.append(voucher) return copied +def get_allocated_amount(voucher_allocated_amounts, voucher, gl_account): + if not (voucher_details := voucher_allocated_amounts.get((voucher.get("doctype"), voucher.get("name")))): + return + + if not (row := voucher_details.get(gl_account)): + return + + return row.get("total") + + def check_matching( bank_account, company, @@ -796,26 +804,20 @@ def get_je_matching_query( je = frappe.qb.DocType("Journal Entry") jea = frappe.qb.DocType("Journal Entry Account") - ref_condition = je.cheque_no == transaction.reference_number - ref_rank = frappe.qb.terms.Case().when(ref_condition, 1).else_(0) - amount_field = f"{cr_or_dr}_in_account_currency" - amount_equality = getattr(jea, amount_field) == transaction.unallocated_amount - amount_rank = frappe.qb.terms.Case().when(amount_equality, 1).else_(0) filter_by_date = je.posting_date.between(from_date, to_date) if cint(filter_by_reference_date): filter_by_date = je.cheque_date.between(from_reference_date, to_reference_date) - query = ( + subquery = ( frappe.qb.from_(jea) .join(je) .on(jea.parent == je.name) .select( - (ref_rank + amount_rank + 1).as_("rank"), + Sum(getattr(jea, amount_field)).as_("paid_amount"), ConstantColumn("Journal Entry").as_("doctype"), je.name, - getattr(jea, amount_field).as_("paid_amount"), je.cheque_no.as_("reference_no"), je.cheque_date.as_("reference_date"), je.pay_to_recd_from.as_("party"), @@ -827,13 +829,26 @@ def get_je_matching_query( .where(je.voucher_type != "Opening Entry") .where(je.clearance_date.isnull()) .where(jea.account == common_filters.bank_account) - .where(amount_equality if exact_match else getattr(jea, amount_field) > 0.0) .where(filter_by_date) + .groupby(je.name) .orderby(je.cheque_date if cint(filter_by_reference_date) else je.posting_date) ) if frappe.flags.auto_reconcile_vouchers is True: - query = query.where(ref_condition) + subquery = subquery.where(je.cheque_no == transaction.reference_number) + + ref_rank = frappe.qb.terms.Case().when(subquery.reference_no == transaction.reference_number, 1).else_(0) + amount_equality = subquery.paid_amount == transaction.unallocated_amount + amount_rank = frappe.qb.terms.Case().when(amount_equality, 1).else_(0) + + query = ( + frappe.qb.from_(subquery) + .select( + "*", + (ref_rank + amount_rank + 1).as_("rank"), + ) + .where(amount_equality if exact_match else subquery.paid_amount > 0.0) + ) return query diff --git a/erpnext/accounts/doctype/bank_transaction/bank_transaction.js b/erpnext/accounts/doctype/bank_transaction/bank_transaction.js index d899d429178..5c5d9ff3469 100644 --- a/erpnext/accounts/doctype/bank_transaction/bank_transaction.js +++ b/erpnext/accounts/doctype/bank_transaction/bank_transaction.js @@ -31,6 +31,12 @@ frappe.ui.form.on("Bank Transaction", { }, }; }); + + frm.set_query("bank_account", function () { + return { + filters: { is_company_account: 1 }, + }; + }); }, get_payment_doctypes: function () { @@ -39,31 +45,6 @@ frappe.ui.form.on("Bank Transaction", { }, }); -frappe.ui.form.on("Bank Transaction Payments", { - payment_entries_remove: function (frm, cdt, cdn) { - update_clearance_date(frm, cdt, cdn); - }, -}); - -const update_clearance_date = (frm, cdt, cdn) => { - if (frm.doc.docstatus === 1) { - frappe - .xcall("erpnext.accounts.doctype.bank_transaction.bank_transaction.unclear_reference_payment", { - doctype: cdt, - docname: cdn, - bt_name: frm.doc.name, - }) - .then((e) => { - if (e == "success") { - frappe.show_alert({ - message: __("Document {0} successfully uncleared", [e]), - indicator: "green", - }); - } - }); - } -}; - function set_bank_statement_filter(frm) { frm.set_query("bank_statement", function () { return { diff --git a/erpnext/accounts/doctype/bank_transaction/bank_transaction.py b/erpnext/accounts/doctype/bank_transaction/bank_transaction.py index 7e509896fec..39ea5fde777 100644 --- a/erpnext/accounts/doctype/bank_transaction/bank_transaction.py +++ b/erpnext/accounts/doctype/bank_transaction/bank_transaction.py @@ -5,7 +5,7 @@ import frappe from frappe import _ from frappe.model.docstatus import DocStatus from frappe.model.document import Document -from frappe.utils import flt +from frappe.utils import flt, getdate class BankTransaction(Document): @@ -84,16 +84,16 @@ class BankTransaction(Document): if not self.payment_entries: return - pe = [] + references = set() for row in self.payment_entries: reference = (row.payment_document, row.payment_entry) - if reference in pe: + if reference in references: frappe.throw( _("{0} {1} is allocated twice in this Bank Transaction").format( row.payment_document, row.payment_entry ) ) - pe.append(reference) + references.add(reference) def update_allocated_amount(self): allocated_amount = ( @@ -104,6 +104,19 @@ class BankTransaction(Document): self.allocated_amount = flt(allocated_amount, self.precision("allocated_amount")) self.unallocated_amount = flt(unallocated_amount, self.precision("unallocated_amount")) + def delink_old_payment_entries(self): + if self.flags.updating_linked_bank_transaction: + return + + old_doc = self.get_doc_before_save() + payment_entry_names = set(pe.name for pe in self.payment_entries) + + for old_pe in old_doc.payment_entries: + if old_pe.name in payment_entry_names: + continue + + self.delink_payment_entry(old_pe) + def before_submit(self): self.allocate_payment_entries() self.set_status() @@ -113,13 +126,14 @@ class BankTransaction(Document): def before_update_after_submit(self): self.validate_duplicate_references() - self.allocate_payment_entries() self.update_allocated_amount() + self.delink_old_payment_entries() + self.allocate_payment_entries() self.set_status() def on_cancel(self): for payment_entry in self.payment_entries: - self.clear_linked_payment_entry(payment_entry, for_cancel=True) + self.delink_payment_entry(payment_entry) self.set_status() @@ -152,43 +166,55 @@ class BankTransaction(Document): - 0 > a: Error: already over-allocated - clear means: set the latest transaction date as clearance date """ + if self.flags.updating_linked_bank_transaction or not self.payment_entries: + return + remaining_amount = self.unallocated_amount - to_remove = [] payment_entry_docs = [(pe.payment_document, pe.payment_entry) for pe in self.payment_entries] pe_bt_allocations = get_total_allocated_amount(payment_entry_docs) + gl_entries = get_related_bank_gl_entries(payment_entry_docs) + gl_bank_account = frappe.db.get_value("Bank Account", self.bank_account, "account") - for payment_entry in self.payment_entries: - if payment_entry.allocated_amount == 0.0: - unallocated_amount, should_clear, latest_transaction = get_clearance_details( - self, - payment_entry, - pe_bt_allocations.get((payment_entry.payment_document, payment_entry.payment_entry)) - or [], + for payment_entry in list(self.payment_entries): + if payment_entry.allocated_amount != 0: + continue + + allocable_amount, should_clear, clearance_date = get_clearance_details( + self, + payment_entry, + pe_bt_allocations.get((payment_entry.payment_document, payment_entry.payment_entry)) or {}, + gl_entries.get((payment_entry.payment_document, payment_entry.payment_entry)) or {}, + gl_bank_account, + ) + + if allocable_amount < 0: + frappe.throw(_("Voucher {0} is over-allocated by {1}").format(allocable_amount)) + + if remaining_amount <= 0: + self.remove(payment_entry) + continue + + if allocable_amount == 0: + if should_clear: + self.clear_linked_payment_entry(payment_entry, clearance_date=clearance_date) + self.remove(payment_entry) + continue + + should_clear = should_clear and allocable_amount <= remaining_amount + payment_entry.allocated_amount = min(allocable_amount, remaining_amount) + remaining_amount = flt( + remaining_amount - payment_entry.allocated_amount, + self.precision("unallocated_amount"), + ) + + if payment_entry.payment_document == "Bank Transaction": + self.update_linked_bank_transaction( + payment_entry.payment_entry, payment_entry.allocated_amount ) + elif should_clear: + self.clear_linked_payment_entry(payment_entry, clearance_date=clearance_date) - if 0.0 == unallocated_amount: - if should_clear: - latest_transaction.clear_linked_payment_entry(payment_entry) - to_remove.append(payment_entry) - - elif remaining_amount <= 0.0: - to_remove.append(payment_entry) - - elif 0.0 < unallocated_amount <= remaining_amount: - payment_entry.allocated_amount = unallocated_amount - remaining_amount -= unallocated_amount - if should_clear: - latest_transaction.clear_linked_payment_entry(payment_entry) - - elif 0.0 < unallocated_amount: - payment_entry.allocated_amount = remaining_amount - remaining_amount = 0.0 - - elif 0.0 > unallocated_amount: - frappe.throw(_("Voucher {0} is over-allocated by {1}").format(unallocated_amount)) - - for payment_entry in to_remove: - self.remove(payment_entry) + self.update_allocated_amount() @frappe.whitelist() def remove_payment_entries(self): @@ -199,14 +225,64 @@ class BankTransaction(Document): def remove_payment_entry(self, payment_entry): "Clear payment entry and clearance" - self.clear_linked_payment_entry(payment_entry, for_cancel=True) + self.delink_payment_entry(payment_entry) self.remove(payment_entry) - def clear_linked_payment_entry(self, payment_entry, for_cancel=False): - clearance_date = None if for_cancel else self.date - set_voucher_clearance( - payment_entry.payment_document, payment_entry.payment_entry, clearance_date, self - ) + def delink_payment_entry(self, payment_entry): + if payment_entry.payment_document == "Bank Transaction": + self.update_linked_bank_transaction(payment_entry.payment_entry, allocated_amount=None) + else: + self.clear_linked_payment_entry(payment_entry, clearance_date=None) + + def clear_linked_payment_entry(self, payment_entry, clearance_date=None): + doctype = payment_entry.payment_document + docname = payment_entry.payment_entry + + # might be a bank transaction + if doctype not in get_doctypes_for_bank_reconciliation(): + return + + if doctype == "Sales Invoice": + frappe.db.set_value( + "Sales Invoice Payment", + dict(parenttype=doctype, parent=docname), + "clearance_date", + clearance_date, + ) + return + + frappe.db.set_value(doctype, docname, "clearance_date", clearance_date) + + def update_linked_bank_transaction(self, bank_transaction_name, allocated_amount=None): + """For when a second bank transaction has fixed another, e.g. refund""" + + bt = frappe.get_doc(self.doctype, bank_transaction_name) + if allocated_amount: + bt.append( + "payment_entries", + { + "payment_document": self.doctype, + "payment_entry": self.name, + "allocated_amount": allocated_amount, + }, + ) + + else: + pe = next( + ( + pe + for pe in bt.payment_entries + if pe.payment_document == self.doctype and pe.payment_entry == self.name + ), + None, + ) + if not pe: + return + + bt.flags.updating_linked_bank_transaction = True + bt.remove(pe) + + bt.save() def auto_set_party(self): from erpnext.accounts.doctype.bank_transaction.auto_match_party import AutoMatchParty @@ -238,71 +314,107 @@ def get_doctypes_for_bank_reconciliation(): return frappe.get_hooks("bank_reconciliation_doctypes") -def get_clearance_details(transaction, payment_entry, bt_allocations): +def get_clearance_details(transaction, payment_entry, bt_allocations, gl_entries, gl_bank_account): """ - There should only be one bank gle for a voucher. - Could be none for a Bank Transaction. - But if a JE, could affect two banks. - Should only clear the voucher if all bank gles are allocated. + There should only be one bank gl entry for a voucher, except for JE. + For JE, there can be multiple bank gl entries for the same account. + In this case, the allocable_amount will be the sum of amounts of all gl entries of the account. + There will be no gl entry for a Bank Transaction so return the unallocated amount. + Should only clear the voucher if all bank gl entries are allocated. """ - gl_bank_account = frappe.db.get_value("Bank Account", transaction.bank_account, "account") - gles = get_related_bank_gl_entries(payment_entry.payment_document, payment_entry.payment_entry) - unallocated_amount = min( - transaction.unallocated_amount, - get_paid_amount(payment_entry, transaction.currency, gl_bank_account), - ) - unmatched_gles = len(gles) - latest_transaction = transaction - for gle in gles: - if gle["gl_account"] == gl_bank_account: - if gle["amount"] <= 0.0: - frappe.throw( - _("Voucher {0} value is broken: {1}").format(payment_entry.payment_entry, gle["amount"]) + transaction_date = getdate(transaction.date) + + if payment_entry.payment_document == "Bank Transaction": + bt = frappe.db.get_value( + "Bank Transaction", + payment_entry.payment_entry, + ("unallocated_amount", "bank_account"), + as_dict=True, + ) + + if bt.bank_account != gl_bank_account: + frappe.throw( + _("Bank Account {} in Bank Transaction {} is not matching with Bank Account {}").format( + bt.bank_account, payment_entry.payment_entry, gl_bank_account ) + ) - unmatched_gles -= 1 - unallocated_amount = gle["amount"] - for a in bt_allocations: - if a["gl_account"] == gle["gl_account"]: - unallocated_amount = gle["amount"] - a["total"] - if frappe.utils.getdate(transaction.date) < a["latest_date"]: - latest_transaction = frappe.get_doc("Bank Transaction", a["latest_name"]) - else: - # Must be a Journal Entry affecting more than one bank - for a in bt_allocations: - if a["gl_account"] == gle["gl_account"] and a["total"] == gle["amount"]: - unmatched_gles -= 1 + return abs(bt.unallocated_amount), True, transaction_date - return unallocated_amount, unmatched_gles == 0, latest_transaction + if gl_bank_account not in gl_entries: + frappe.throw( + _("{} {} is not affecting bank account {}").format( + payment_entry.payment_document, payment_entry.payment_entry, gl_bank_account + ) + ) + + allocable_amount = gl_entries.pop(gl_bank_account) or 0 + if allocable_amount <= 0.0: + frappe.throw( + _("Invalid amount in accounting entries of {} {} for Account {}: {}").format( + payment_entry.payment_document, payment_entry.payment_entry, gl_bank_account, allocable_amount + ) + ) + + matching_bt_allocaion = bt_allocations.pop(gl_bank_account, {}) + + allocable_amount = flt( + allocable_amount - matching_bt_allocaion.get("total", 0), transaction.precision("unallocated_amount") + ) + + should_clear = all( + gl_entries[gle_account] == bt_allocations.get(gle_account, {}).get("total", 0) + for gle_account in gl_entries + ) + + bt_allocation_date = matching_bt_allocaion.get("latest_date", None) + clearance_date = transaction_date if not bt_allocation_date else max(transaction_date, bt_allocation_date) + + return allocable_amount, should_clear, clearance_date -def get_related_bank_gl_entries(doctype, docname): +def get_related_bank_gl_entries(docs): # nosemgrep: frappe-semgrep-rules.rules.frappe-using-db-sql - return frappe.db.sql( + if not docs: + return {} + + result = frappe.db.sql( """ - SELECT - ABS(gle.credit_in_account_currency - gle.debit_in_account_currency) AS amount, - gle.account AS gl_account - FROM - `tabGL Entry` gle - LEFT JOIN - `tabAccount` ac ON ac.name=gle.account - WHERE - ac.account_type = 'Bank' - AND gle.voucher_type = %(doctype)s - AND gle.voucher_no = %(docname)s - AND is_cancelled = 0 - """, - dict(doctype=doctype, docname=docname), + SELECT + gle.voucher_type AS doctype, + gle.voucher_no AS docname, + gle.account AS gl_account, + SUM(ABS(gle.credit_in_account_currency - gle.debit_in_account_currency)) AS amount + FROM + `tabGL Entry` gle + LEFT JOIN + `tabAccount` ac ON ac.name = gle.account + WHERE + ac.account_type = 'Bank' + AND (gle.voucher_type, gle.voucher_no) IN %(docs)s + AND gle.is_cancelled = 0 + GROUP BY + gle.voucher_type, gle.voucher_no, gle.account + """, + {"docs": docs}, as_dict=True, ) + entries = {} + for row in result: + key = (row["doctype"], row["docname"]) + if key not in entries: + entries[key] = {} + entries[key][row["gl_account"]] = row["amount"] + + return entries + def get_total_allocated_amount(docs): """ Gets the sum of allocations for a voucher on each bank GL account - along with the latest bank transaction name & date + along with the latest bank transaction date NOTE: query may also include just saved vouchers/payments but with zero allocated_amount """ if not docs: @@ -311,11 +423,10 @@ def get_total_allocated_amount(docs): # nosemgrep: frappe-semgrep-rules.rules.frappe-using-db-sql result = frappe.db.sql( """ - SELECT total, latest_name, latest_date, gl_account, payment_document, payment_entry FROM ( + SELECT total, latest_date, gl_account, payment_document, payment_entry FROM ( SELECT ROW_NUMBER() OVER w AS rownum, SUM(btp.allocated_amount) OVER(PARTITION BY ba.account, btp.payment_document, btp.payment_entry) AS total, - FIRST_VALUE(bt.name) OVER w AS latest_name, FIRST_VALUE(bt.date) OVER w AS latest_date, ba.account AS gl_account, btp.payment_document, @@ -338,104 +449,14 @@ def get_total_allocated_amount(docs): payment_allocation_details = {} for row in result: - # Why is this *sometimes* a byte string? - if isinstance(row["latest_name"], bytes): - row["latest_name"] = row["latest_name"].decode() - row["latest_date"] = frappe.utils.getdate(row["latest_date"]) - payment_allocation_details.setdefault((row["payment_document"], row["payment_entry"]), []).append(row) + row["latest_date"] = getdate(row["latest_date"]) + payment_allocation_details.setdefault((row["payment_document"], row["payment_entry"]), {})[ + row["gl_account"] + ] = row return payment_allocation_details -def get_paid_amount(payment_entry, currency, gl_bank_account): - if payment_entry.payment_document in ["Payment Entry", "Sales Invoice", "Purchase Invoice"]: - paid_amount_field = "paid_amount" - if payment_entry.payment_document == "Payment Entry": - doc = frappe.get_doc("Payment Entry", payment_entry.payment_entry) - - if doc.payment_type == "Receive": - paid_amount_field = ( - "received_amount" if doc.paid_to_account_currency == currency else "base_received_amount" - ) - elif doc.payment_type == "Pay": - paid_amount_field = ( - "paid_amount" if doc.paid_from_account_currency == currency else "base_paid_amount" - ) - - return frappe.db.get_value( - payment_entry.payment_document, payment_entry.payment_entry, paid_amount_field - ) - - elif payment_entry.payment_document == "Journal Entry": - return abs( - frappe.db.get_value( - "Journal Entry Account", - {"parent": payment_entry.payment_entry, "account": gl_bank_account}, - "sum(debit_in_account_currency-credit_in_account_currency)", - ) - or 0 - ) - - elif payment_entry.payment_document == "Expense Claim": - return frappe.db.get_value( - payment_entry.payment_document, payment_entry.payment_entry, "total_amount_reimbursed" - ) - - elif payment_entry.payment_document == "Loan Disbursement": - return frappe.db.get_value( - payment_entry.payment_document, payment_entry.payment_entry, "disbursed_amount" - ) - - elif payment_entry.payment_document == "Loan Repayment": - return frappe.db.get_value(payment_entry.payment_document, payment_entry.payment_entry, "amount_paid") - - elif payment_entry.payment_document == "Bank Transaction": - dep, wth = frappe.db.get_value( - "Bank Transaction", payment_entry.payment_entry, ("deposit", "withdrawal") - ) - return abs(flt(wth) - flt(dep)) - - else: - frappe.throw( - f"Please reconcile {payment_entry.payment_document}: {payment_entry.payment_entry} manually" - ) - - -def set_voucher_clearance(doctype, docname, clearance_date, self): - if doctype in get_doctypes_for_bank_reconciliation(): - if ( - doctype == "Payment Entry" - and frappe.db.get_value("Payment Entry", docname, "payment_type") == "Internal Transfer" - and len(get_reconciled_bank_transactions(doctype, docname)) < 2 - ): - return - - if doctype == "Sales Invoice": - frappe.db.set_value( - "Sales Invoice Payment", - dict(parenttype=doctype, parent=docname), - "clearance_date", - clearance_date, - ) - return - - frappe.db.set_value(doctype, docname, "clearance_date", clearance_date) - - elif doctype == "Bank Transaction": - # For when a second bank transaction has fixed another, e.g. refund - bt = frappe.get_doc(doctype, docname) - if clearance_date: - vouchers = [{"payment_doctype": "Bank Transaction", "payment_name": self.name}] - bt.add_payment_entries(vouchers) - bt.save() - else: - for pe in bt.payment_entries: - if pe.payment_document == self.doctype and pe.payment_entry == self.name: - bt.remove(pe) - bt.save() - break - - def get_reconciled_bank_transactions(doctype, docname): return frappe.get_all( "Bank Transaction Payments", @@ -444,13 +465,6 @@ def get_reconciled_bank_transactions(doctype, docname): ) -@frappe.whitelist() -def unclear_reference_payment(doctype, docname, bt_name): - bt = frappe.get_doc("Bank Transaction", bt_name) - set_voucher_clearance(doctype, docname, None, bt) - return docname - - def remove_from_bank_transaction(doctype, docname): """Remove a (cancelled) voucher from all Bank Transactions.""" for bt_name in get_reconciled_bank_transactions(doctype, docname): diff --git a/erpnext/accounts/test/accounts_mixin.py b/erpnext/accounts/test/accounts_mixin.py index e526e07c734..fbd0c76a229 100644 --- a/erpnext/accounts/test/accounts_mixin.py +++ b/erpnext/accounts/test/accounts_mixin.py @@ -85,6 +85,7 @@ class AccountsTestMixin: "attribute_name": "bank", "account_name": "HDFC", "parent_account": "Bank Accounts - " + abbr, + "account_type": "Bank", } ), frappe._dict( From 64fdcb752dc0937010e61089bb3498bc0b1483ba Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Mon, 31 Mar 2025 13:29:54 +0530 Subject: [PATCH 1478/1614] feat: option to recreate Stock Ledger Entries against stock transactions (cherry picked from commit 218dbd69115bc4567fd9bb5df89ffd6b0b80187b) # Conflicts: # erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.json --- .../purchase_receipt/test_purchase_receipt.py | 48 +++++++++++++++++++ .../repost_item_valuation.json | 16 ++++++- .../repost_item_valuation.py | 19 ++++++++ erpnext/stock/stock_ledger.py | 11 +++-- 4 files changed, 90 insertions(+), 4 deletions(-) diff --git a/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py index 4f22d83244e..b7aa97ddb54 100644 --- a/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py +++ b/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py @@ -4077,6 +4077,54 @@ class TestPurchaseReceipt(FrappeTestCase): pr.reload() self.assertEqual(pr.status, "To Bill") + def test_recreate_stock_ledgers(self): + item_code = "Test Item for Recreate Stock Ledgers" + create_item(item_code) + + pr = make_purchase_receipt(item_code=item_code, qty=10, rate=100) + pr.submit() + + sles = frappe.get_all( + "Stock Ledger Entry", + filters={"voucher_type": pr.doctype, "voucher_no": pr.name}, + pluck="name", + ) + + self.assertTrue(sles) + + for row in sles: + doc = frappe.get_doc("Stock Ledger Entry", row) + doc.delete() + + sles = frappe.get_all( + "Stock Ledger Entry", + filters={"voucher_type": pr.doctype, "voucher_no": pr.name}, + pluck="name", + ) + + self.assertFalse(sles) + + frappe.get_doc( + { + "doctype": "Repost Item Valuation", + "based_on": "Transaction", + "voucher_type": pr.doctype, + "voucher_no": pr.name, + "posting_date": pr.posting_date, + "posting_time": pr.posting_time, + "company": pr.company, + "recreate_stock_ledgers": 1, + } + ).submit() + + sles = frappe.get_all( + "Stock Ledger Entry", + filters={"voucher_type": pr.doctype, "voucher_no": pr.name}, + pluck="name", + ) + + self.assertTrue(sles) + def prepare_data_for_internal_transfer(): from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_internal_supplier diff --git a/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.json b/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.json index 67e97964e18..26b007af5d9 100644 --- a/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.json +++ b/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.json @@ -19,6 +19,7 @@ "allow_negative_stock", "via_landed_cost_voucher", "allow_zero_rate", + "recreate_stock_ledgers", "amended_from", "error_section", "error_log", @@ -220,12 +221,20 @@ "label": "Reposting Data File", "no_copy": 1, "read_only": 1 + }, + { + "default": "0", + "depends_on": "eval:doc.based_on == \"Transaction\"", + "fieldname": "recreate_stock_ledgers", + "fieldtype": "Check", + "label": "Recreate Stock Ledgers" } ], + "grid_page_length": 50, "index_web_pages_for_search": 1, "is_submittable": 1, "links": [], - "modified": "2024-06-27 16:55:23.150146", + "modified": "2025-03-31 12:38:20.566196", "modified_by": "Administrator", "module": "Stock", "name": "Repost Item Valuation", @@ -274,7 +283,12 @@ "write": 1 } ], +<<<<<<< HEAD "sort_field": "modified", +======= + "row_format": "Dynamic", + "sort_field": "creation", +>>>>>>> 218dbd6911 (feat: option to recreate Stock Ledger Entries against stock transactions) "sort_order": "DESC", "states": [] } diff --git a/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py b/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py index 9026a9a9a8b..880acb65dc3 100644 --- a/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py +++ b/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py @@ -47,6 +47,7 @@ class RepostItemValuation(Document): items_to_be_repost: DF.Code | None posting_date: DF.Date posting_time: DF.Time | None + recreate_stock_ledgers: DF.Check reposting_data_file: DF.Attach | None status: DF.Literal["Queued", "In Progress", "Completed", "Skipped", "Failed"] total_reposting_count: DF.Int @@ -74,6 +75,7 @@ class RepostItemValuation(Document): self.reset_field_values() self.set_company() self.validate_accounts_freeze() + self.reset_recreate_stock_ledgers() def validate_period_closing_voucher(self): # Period Closing Voucher @@ -105,6 +107,10 @@ class RepostItemValuation(Document): msg = f"Due to closing stock balance {name}, you cannot repost item valuation before {to_date}" frappe.throw(_(msg)) + def reset_recreate_stock_ledgers(self): + if self.recreate_stock_ledgers and self.based_on != "Transaction": + self.recreate_stock_ledgers = 0 + def get_closing_stock_balance(self): filters = { "company": self.company, @@ -250,6 +256,16 @@ class RepostItemValuation(Document): filters, ) + def recreate_stock_ledger_entries(self): + """Recreate Stock Ledger Entries for the transaction.""" + if self.based_on == "Transaction" and self.recreate_stock_ledgers: + doc = frappe.get_doc(self.voucher_type, self.voucher_no) + doc.docstatus = 2 + doc.update_stock_ledger(allow_negative_stock=True, via_landed_cost_voucher=True) + + doc.docstatus = 1 + doc.update_stock_ledger(allow_negative_stock=True) + def on_doctype_update(): frappe.db.add_index("Repost Item Valuation", ["warehouse", "item_code"], "item_warehouse") @@ -268,6 +284,9 @@ def repost(doc): if not frappe.flags.in_test: frappe.db.commit() + if doc.recreate_stock_ledgers: + doc.recreate_stock_ledger_entries() + repost_sl_entries(doc) repost_gl_entries(doc) diff --git a/erpnext/stock/stock_ledger.py b/erpnext/stock/stock_ledger.py index 4627c8aecfa..9776486eabc 100644 --- a/erpnext/stock/stock_ledger.py +++ b/erpnext/stock/stock_ledger.py @@ -184,11 +184,16 @@ def validate_serial_no(sle): frappe.throw(_(msg), title=_(title), exc=SerialNoExistsInFutureTransaction) -def validate_cancellation(args): - if args[0].get("is_cancelled"): +def validate_cancellation(kargs): + if kargs[0].get("is_cancelled"): repost_entry = frappe.db.get_value( "Repost Item Valuation", - {"voucher_type": args[0].voucher_type, "voucher_no": args[0].voucher_no, "docstatus": 1}, + { + "voucher_type": kargs[0].voucher_type, + "voucher_no": kargs[0].voucher_no, + "docstatus": 1, + "recreate_stock_ledgers": 0, + }, ["name", "status"], as_dict=1, ) From 604b185bd30bf71eb8c42e39de8cff1bbae74b2b Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Mon, 31 Mar 2025 15:05:10 +0530 Subject: [PATCH 1479/1614] chore: fix conflicts --- .../doctype/repost_item_valuation/repost_item_valuation.json | 5 ----- 1 file changed, 5 deletions(-) diff --git a/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.json b/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.json index 26b007af5d9..bd70072e4bd 100644 --- a/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.json +++ b/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.json @@ -283,12 +283,7 @@ "write": 1 } ], -<<<<<<< HEAD - "sort_field": "modified", -======= - "row_format": "Dynamic", "sort_field": "creation", ->>>>>>> 218dbd6911 (feat: option to recreate Stock Ledger Entries against stock transactions) "sort_order": "DESC", "states": [] } From 7b864bece8d8e0a4bef66607c52ed5f046b84756 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 31 Mar 2025 15:54:42 +0530 Subject: [PATCH 1480/1614] fix: improved rounding adjustment when applying discount (backport #46720) * fix: improved rounding adjustment when applying discount (#46720) * fix: rounding adjustment in apply_discount_amount taxes_and_totals * refactor: minor changes * fix: set the rounding difference while calculating tax total in the last tax row and add test case * fix: failing test case * fix: made changes in get_total_for_discount_amount in taxes_and_totals * fix: failing test cases * fix: changes as per review * refactor: remove unnecessary use of flt * refactor: improve logic * refactor: minor change * refactor: minor changes * fix: add a test case for applying discount with previous row total in taxes * fix: failing test case * refactor: flatter code, remove `flt` usage for accuracy --------- Co-authored-by: Vishakh Desai <78500008+vishakhdesai@users.noreply.github.com> Co-authored-by: Sagar Vora --- .../purchase_invoice/test_purchase_invoice.py | 72 ++++++++++++++++++ erpnext/controllers/taxes_and_totals.py | 74 ++++++++++++------- .../public/js/controllers/taxes_and_totals.js | 73 ++++++++++-------- 3 files changed, 162 insertions(+), 57 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py index cf5dbccd54f..b8930963144 100644 --- a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py @@ -2683,6 +2683,78 @@ class TestPurchaseInvoice(FrappeTestCase, StockTestMixin): self.assertRaises(StockOverReturnError, return_doc.save) + def test_apply_discount_on_grand_total(self): + """ + To test if after applying discount on grand total, + the grand total is calculated correctly without any rounding errors + """ + invoice = make_purchase_invoice(qty=2, rate=100, do_not_save=True, do_not_submit=True) + invoice.append( + "items", + { + "item_code": "_Test Item", + "qty": 1, + "rate": 21.39, + }, + ) + invoice.append( + "taxes", + { + "charge_type": "On Net Total", + "account_head": "_Test Account VAT - _TC", + "description": "VAT", + "rate": 15.5, + }, + ) + + # the grand total here will be 255.71 + invoice.disable_rounded_total = 1 + # apply discount on grand total to adjust the grand total to 255 + invoice.discount_amount = 0.71 + invoice.save() + + # check if grand total is 496 and not something like 254.99 due to rounding errors + self.assertEqual(invoice.grand_total, 255) + + def test_apply_discount_on_grand_total_with_previous_row_total_tax(self): + """ + To test if after applying discount on grand total, + where the tax is calculated on previous row total, the grand total is calculated correctly + """ + + invoice = make_purchase_invoice(qty=2, rate=100, do_not_save=True, do_not_submit=True) + invoice.extend( + "taxes", + [ + { + "charge_type": "Actual", + "account_head": "_Test Account VAT - _TC", + "description": "VAT", + "tax_amount": 100, + }, + { + "charge_type": "On Previous Row Amount", + "account_head": "_Test Account VAT - _TC", + "description": "VAT", + "row_id": 1, + "rate": 10, + }, + { + "charge_type": "On Previous Row Total", + "account_head": "_Test Account VAT - _TC", + "description": "VAT", + "row_id": 1, + "rate": 10, + }, + ], + ) + + # the total here will be 340, so applying 40 discount + invoice.discount_amount = 40 + invoice.save() + + self.assertEqual(invoice.grand_total, 300) + def set_advance_flag(company, flag, default_account): frappe.db.set_value( diff --git a/erpnext/controllers/taxes_and_totals.py b/erpnext/controllers/taxes_and_totals.py index b6315df3246..4fa103c2e82 100644 --- a/erpnext/controllers/taxes_and_totals.py +++ b/erpnext/controllers/taxes_and_totals.py @@ -643,7 +643,7 @@ class calculate_taxes_and_totals: if self.doc.meta.get_field("rounded_total"): if self.doc.is_rounded_total_disabled(): - self.doc.rounded_total = self.doc.base_rounded_total = 0 + self.doc.rounded_total = self.doc.base_rounded_total = self.doc.rounding_adjustment = 0 return self.doc.rounded_total = round_based_on_smallest_currency_fraction( @@ -687,33 +687,29 @@ class calculate_taxes_and_totals: return total_for_discount_amount = self.get_total_for_discount_amount() - taxes = self.doc.get("taxes") net_total = 0 + expected_net_total = 0 if total_for_discount_amount: # calculate item amount after Discount Amount - for i, item in enumerate(self._items): + for item in self._items: distributed_amount = ( flt(self.doc.discount_amount) * item.net_amount / total_for_discount_amount ) - item.net_amount = flt(item.net_amount - distributed_amount, item.precision("net_amount")) + adjusted_net_amount = item.net_amount - distributed_amount + expected_net_total += adjusted_net_amount + item.net_amount = flt(adjusted_net_amount, item.precision("net_amount")) net_total += item.net_amount - # discount amount rounding loss adjustment if no taxes - if ( - self.doc.apply_discount_on == "Net Total" - or not taxes - or total_for_discount_amount == self.doc.net_total - ) and i == len(self._items) - 1: - discount_amount_loss = flt( - self.doc.net_total - net_total - self.doc.discount_amount, - self.doc.precision("net_total"), - ) - + # discount amount rounding adjustment + if rounding_difference := flt( + expected_net_total - net_total, self.doc.precision("net_total") + ): item.net_amount = flt( - item.net_amount + discount_amount_loss, item.precision("net_amount") + item.net_amount + rounding_difference, item.precision("net_amount") ) + net_total += rounding_difference item.net_rate = ( flt(item.net_amount / item.qty, item.precision("net_rate")) if item.qty else 0 @@ -729,20 +725,44 @@ class calculate_taxes_and_totals: def get_total_for_discount_amount(self): if self.doc.apply_discount_on == "Net Total": return self.doc.net_total - else: - actual_taxes_dict = {} - for tax in self.doc.get("taxes"): - if tax.charge_type in ["Actual", "On Item Quantity"]: - tax_amount = self.get_tax_amount_if_for_valuation_or_deduction(tax.tax_amount, tax) - actual_taxes_dict.setdefault(tax.idx, tax_amount) - elif tax.row_id in actual_taxes_dict: - actual_tax_amount = flt(actual_taxes_dict.get(tax.row_id, 0)) * flt(tax.rate) / 100 - actual_taxes_dict.setdefault(tax.idx, actual_tax_amount) + total_actual_tax = 0 + actual_taxes_dict = {} - return flt( - self.doc.grand_total - sum(actual_taxes_dict.values()), self.doc.precision("grand_total") + def update_actual_tax_dict(tax, tax_amount): + nonlocal total_actual_tax + + if tax.get("add_deduct_tax") == "Deduct": + tax_amount *= -1 + + if tax.get("category") != "Valuation": + total_actual_tax += tax_amount + + actual_taxes_dict[int(tax.idx)] = { + "tax_amount": tax_amount, + "cumulative_tax_amount": total_actual_tax, + } + + for tax in self.doc.get("taxes"): + if tax.charge_type in ["Actual", "On Item Quantity"]: + update_actual_tax_dict(tax, tax.tax_amount) + continue + + if not tax.row_id: + continue + + base_row = actual_taxes_dict.get(int(tax.row_id)) + if not base_row: + continue + + base_tax_amount = ( + base_row["tax_amount"] + if tax.charge_type == "On Previous Row Amount" + else base_row["cumulative_tax_amount"] ) + update_actual_tax_dict(tax, base_tax_amount * tax.rate / 100) + + return self.doc.grand_total - total_actual_tax def calculate_total_advance(self): if not self.doc.docstatus.is_cancelled(): diff --git a/erpnext/public/js/controllers/taxes_and_totals.js b/erpnext/public/js/controllers/taxes_and_totals.js index 30ebb3d97ce..1a6ca364aef 100644 --- a/erpnext/public/js/controllers/taxes_and_totals.js +++ b/erpnext/public/js/controllers/taxes_and_totals.js @@ -343,7 +343,6 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments { calculate_taxes() { var me = this; - this.frm.doc.rounding_adjustment = 0; var actual_tax_dict = {}; // maintain actual tax rate based on idx @@ -605,7 +604,7 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments { } this.frm.doc.total_taxes_and_charges = flt(this.frm.doc.grand_total - this.frm.doc.net_total - - flt(this.frm.doc.rounding_adjustment), precision("total_taxes_and_charges")); + - flt(this.frm.doc.grand_total_diff), precision("total_taxes_and_charges")); this.set_in_company_currency(this.frm.doc, ["total_taxes_and_charges", "rounding_adjustment"]); @@ -627,6 +626,7 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments { if (cint(disable_rounded_total)) { this.frm.doc.rounded_total = 0; this.frm.doc.base_rounded_total = 0; + this.frm.doc.rounding_adjustment = 0; return; } @@ -695,22 +695,26 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments { return; } - var total_for_discount_amount = this.get_total_for_discount_amount(); - var net_total = 0; + const total_for_discount_amount = this.get_total_for_discount_amount(); + let net_total = 0; + let expected_net_total = 0; + // calculate item amount after Discount Amount if (total_for_discount_amount) { $.each(this.frm._items || [], function(i, item) { distributed_amount = flt(me.frm.doc.discount_amount) * item.net_amount / total_for_discount_amount; - item.net_amount = flt(item.net_amount - distributed_amount, precision("net_amount", item)); + + const adjusted_net_amount = item.net_amount - distributed_amount; + expected_net_total += adjusted_net_amount + item.net_amount = flt(adjusted_net_amount, precision("net_amount", item)); net_total += item.net_amount; - // discount amount rounding loss adjustment if no taxes - if ((!(me.frm.doc.taxes || []).length || total_for_discount_amount==me.frm.doc.net_total || (me.frm.doc.apply_discount_on == "Net Total")) - && i == (me.frm._items || []).length - 1) { - var discount_amount_loss = flt(me.frm.doc.net_total - net_total - - me.frm.doc.discount_amount, precision("net_total")); - item.net_amount = flt(item.net_amount + discount_amount_loss, - precision("net_amount", item)); + // discount amount rounding adjustment + // assignment to rounding_difference is intentional + const rounding_difference = flt(expected_net_total - net_total, precision("net_total")); + if (rounding_difference) { + item.net_amount = flt(item.net_amount + rounding_difference, precision("net_amount", item)); + net_total += rounding_difference; } item.net_rate = item.qty ? flt(item.net_amount / item.qty, precision("net_rate", item)) : 0; me.set_in_company_currency(item, ["net_rate", "net_amount"]); @@ -723,29 +727,38 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments { } get_total_for_discount_amount() { - if(this.frm.doc.apply_discount_on == "Net Total") { + if(this.frm.doc.apply_discount_on == "Net Total") return this.frm.doc.net_total; - } else { - var total_actual_tax = 0.0; - var actual_taxes_dict = {}; - $.each(this.frm.doc["taxes"] || [], function(i, tax) { - if (["Actual", "On Item Quantity"].includes(tax.charge_type)) { - var tax_amount = (tax.category == "Valuation") ? 0.0 : tax.tax_amount; - tax_amount *= (tax.add_deduct_tax == "Deduct") ? -1.0 : 1.0; - actual_taxes_dict[tax.idx] = tax_amount; - } else if (actual_taxes_dict[tax.row_id] !== null) { - var actual_tax_amount = flt(actual_taxes_dict[tax.row_id]) * flt(tax.rate) / 100; - actual_taxes_dict[tax.idx] = actual_tax_amount; - } - }); + let total_actual_tax = 0.0; + let actual_taxes_dict = {}; - $.each(actual_taxes_dict, function(key, value) { - if (value) total_actual_tax += value; - }); + function update_actual_taxes_dict(tax, tax_amount) { + if (tax.add_deduct_tax == "Deduct") tax_amount *= -1; + if (tax.category != "Valuation") total_actual_tax += tax_amount; - return flt(this.frm.doc.grand_total - total_actual_tax, precision("grand_total")); + actual_taxes_dict[tax.idx] = { + tax_amount: tax_amount, + cumulative_total: total_actual_tax + }; } + + $.each(this.frm.doc["taxes"] || [], function(i, tax) { + if (["Actual", "On Item Quantity"].includes(tax.charge_type)) { + update_actual_taxes_dict(tax, tax.tax_amount); + return; + } + + const base_row = actual_taxes_dict[tax.row_id]; + if (!base_row) return; + + // if charge type is 'On Previous Row Amount', calculate tax on previous row amount + // else (On Previous Row Total) calculate tax on cumulative total + const base_tax_amount = tax.charge_type == "On Previous Row Amount" ? base_row["tax_amount"]: base_row["cumulative_total"]; + update_actual_taxes_dict(tax, base_tax_amount * tax.rate / 100); + }); + + return this.frm.doc.grand_total - total_actual_tax; } calculate_total_advance(update_paid_amount) { From 96af1ccffb3073c2d1f14fa08feb5a9a444d592a Mon Sep 17 00:00:00 2001 From: Vishakh Desai <78500008+vishakhdesai@users.noreply.github.com> Date: Mon, 31 Mar 2025 15:53:13 +0530 Subject: [PATCH 1481/1614] Merge pull request #46812 from vishakhdesai/fix-taxes-and-totals fix: revert resetting `rounding_adjustment` (cherry picked from commit 3a9dca056318ffcdd44cc5ae8ef2ed8cf05f498e) --- erpnext/controllers/taxes_and_totals.py | 2 +- erpnext/public/js/controllers/taxes_and_totals.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/controllers/taxes_and_totals.py b/erpnext/controllers/taxes_and_totals.py index 4fa103c2e82..d2559241781 100644 --- a/erpnext/controllers/taxes_and_totals.py +++ b/erpnext/controllers/taxes_and_totals.py @@ -643,7 +643,7 @@ class calculate_taxes_and_totals: if self.doc.meta.get_field("rounded_total"): if self.doc.is_rounded_total_disabled(): - self.doc.rounded_total = self.doc.base_rounded_total = self.doc.rounding_adjustment = 0 + self.doc.rounded_total = self.doc.base_rounded_total = 0 return self.doc.rounded_total = round_based_on_smallest_currency_fraction( diff --git a/erpnext/public/js/controllers/taxes_and_totals.js b/erpnext/public/js/controllers/taxes_and_totals.js index 1a6ca364aef..233c3d4c3b6 100644 --- a/erpnext/public/js/controllers/taxes_and_totals.js +++ b/erpnext/public/js/controllers/taxes_and_totals.js @@ -343,6 +343,7 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments { calculate_taxes() { var me = this; + this.frm.doc.rounding_adjustment = 0; var actual_tax_dict = {}; // maintain actual tax rate based on idx @@ -626,7 +627,6 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments { if (cint(disable_rounded_total)) { this.frm.doc.rounded_total = 0; this.frm.doc.base_rounded_total = 0; - this.frm.doc.rounding_adjustment = 0; return; } From 42479d9a7ff1da255f5fb030083310faaa27ab37 Mon Sep 17 00:00:00 2001 From: Marc Ramser Date: Mon, 31 Mar 2025 10:32:36 +0200 Subject: [PATCH 1482/1614] feat(regional): Address Template for Germany & Add Switzerland Template (#46737) * Add Address template for Switzerland * Fix address template for germany If an ERPNext instance is set to German and used by a business outside Germany (e.g., in Switzerland or Austria), customer addresses in Germany are displayed in their national format. However, for postal services, the international format (including the country) is required.". This is just a workaround. IMHO the correct fix would be to check where the company is located and based on that use the national or the international template. (cherry picked from commit 21b8ad6aa5f7ea5b59353e48429a8d7d0f76bf53) --- erpnext/regional/address_template/templates/germany.html | 8 ++------ .../regional/address_template/templates/switzerland.html | 4 ++++ 2 files changed, 6 insertions(+), 6 deletions(-) create mode 100644 erpnext/regional/address_template/templates/switzerland.html diff --git a/erpnext/regional/address_template/templates/germany.html b/erpnext/regional/address_template/templates/germany.html index 25c9c9d32e6..3886bfadc0b 100644 --- a/erpnext/regional/address_template/templates/germany.html +++ b/erpnext/regional/address_template/templates/germany.html @@ -1,8 +1,4 @@ {{ address_line1 }}
{% if address_line2 %}{{ address_line2 }}
{% endif -%} -{% if country in ["Germany", "Deutschland"] %} - {{ pincode }} {{ city }} -{% else %} - {{ pincode }} {{ city | upper }}
- {{ country | upper }} -{% endif %} +{{ pincode }} {{ city | upper }}
+{{ country | upper }} diff --git a/erpnext/regional/address_template/templates/switzerland.html b/erpnext/regional/address_template/templates/switzerland.html new file mode 100644 index 00000000000..3886bfadc0b --- /dev/null +++ b/erpnext/regional/address_template/templates/switzerland.html @@ -0,0 +1,4 @@ +{{ address_line1 }}
+{% if address_line2 %}{{ address_line2 }}
{% endif -%} +{{ pincode }} {{ city | upper }}
+{{ country | upper }} From 288aad6f5dbd6865da6d58cc6c66032e6347edc6 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Mon, 31 Mar 2025 15:53:55 +0530 Subject: [PATCH 1483/1614] feat: allow UOMs to select for which converstion rate defined in item master (cherry picked from commit b1dfbbe85e05db3e6e093aa8fb62880cc749d94b) # Conflicts: # erpnext/stock/doctype/stock_settings/stock_settings.json --- erpnext/controllers/queries.py | 29 +++++++++++++++++++ erpnext/public/js/controllers/transaction.js | 13 +++++++++ .../stock_settings/stock_settings.json | 22 ++++++++++++++ .../doctype/stock_settings/stock_settings.py | 1 + 4 files changed, 65 insertions(+) diff --git a/erpnext/controllers/queries.py b/erpnext/controllers/queries.py index e9177f84fcc..670d46453f9 100644 --- a/erpnext/controllers/queries.py +++ b/erpnext/controllers/queries.py @@ -898,3 +898,32 @@ def get_filtered_child_rows(doctype, txt, searchfield, start, page_len, filters) ) return query.run(as_dict=False) + + +@frappe.whitelist() +@frappe.validate_and_sanitize_search_inputs +def get_item_uom_query(doctype, txt, searchfield, start, page_len, filters): + if frappe.db.get_single_value("Stock Settings", "allow_uom_with_conversion_rate_defined_in_item"): + query_filters = {"parent": filters.get("item_code")} + + if txt: + query_filters["uom"] = ["like", f"%{txt}%"] + + return frappe.get_all( + "UOM Conversion Detail", + filters=query_filters, + fields=["uom", "conversion_factor"], + limit_start=start, + limit_page_length=page_len, + order_by="idx", + as_list=1, + ) + + return frappe.get_all( + "UOM", + filters={"name": ["like", f"%{txt}%"]}, + fields=["name"], + limit_start=start, + limit_page_length=page_len, + as_list=1, + ) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 6423fd78fe9..8b7487c612e 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -150,6 +150,19 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe }); } + if (this.frm.fields_dict["items"].grid.get_field("uom")) { + this.frm.set_query("uom", "items", function(doc, cdt, cdn) { + let row = locals[cdt][cdn]; + + return { + query: "erpnext.controllers.queries.get_item_uom_query", + filters: { + "item_code": row.item_code + } + }; + }); + } + if( this.frm.docstatus < 2 && this.frm.fields_dict["payment_terms_template"] diff --git a/erpnext/stock/doctype/stock_settings/stock_settings.json b/erpnext/stock/doctype/stock_settings/stock_settings.json index 1987bc8642d..b416bb83aed 100644 --- a/erpnext/stock/doctype/stock_settings/stock_settings.json +++ b/erpnext/stock/doctype/stock_settings/stock_settings.json @@ -22,6 +22,8 @@ "allow_to_edit_stock_uom_qty_for_sales", "column_break_lznj", "allow_to_edit_stock_uom_qty_for_purchase", + "section_break_ylhd", + "allow_uom_with_conversion_rate_defined_in_item", "stock_validations_tab", "section_break_9", "over_delivery_receipt_allowance", @@ -490,6 +492,17 @@ { "fieldname": "column_break_wslv", "fieldtype": "Column Break" + }, + { + "fieldname": "section_break_ylhd", + "fieldtype": "Section Break" + }, + { + "default": "0", + "description": "If enabled, the system will allow selecting UOMs in sales and purchase transactions only if the conversion rate is set in the item master.", + "fieldname": "allow_uom_with_conversion_rate_defined_in_item", + "fieldtype": "Check", + "label": "Allow UOM with Conversion Rate Defined in Item" } ], "icon": "icon-cog", @@ -497,7 +510,11 @@ "index_web_pages_for_search": 1, "issingle": 1, "links": [], +<<<<<<< HEAD "modified": "2025-02-28 16:08:35.938840", +======= + "modified": "2025-03-31 15:34:20.752065", +>>>>>>> b1dfbbe85e (feat: allow UOMs to select for which converstion rate defined in item master) "modified_by": "Administrator", "module": "Stock", "name": "Stock Settings", @@ -518,7 +535,12 @@ } ], "quick_entry": 1, +<<<<<<< HEAD "sort_field": "modified", +======= + "row_format": "Dynamic", + "sort_field": "creation", +>>>>>>> b1dfbbe85e (feat: allow UOMs to select for which converstion rate defined in item master) "sort_order": "ASC", "states": [], "track_changes": 1 diff --git a/erpnext/stock/doctype/stock_settings/stock_settings.py b/erpnext/stock/doctype/stock_settings/stock_settings.py index 8589004c8bf..4de8057a006 100644 --- a/erpnext/stock/doctype/stock_settings/stock_settings.py +++ b/erpnext/stock/doctype/stock_settings/stock_settings.py @@ -33,6 +33,7 @@ class StockSettings(Document): allow_partial_reservation: DF.Check allow_to_edit_stock_uom_qty_for_purchase: DF.Check allow_to_edit_stock_uom_qty_for_sales: DF.Check + allow_uom_with_conversion_rate_defined_in_item: DF.Check auto_create_serial_and_batch_bundle_for_outward: DF.Check auto_indent: DF.Check auto_insert_price_list_rate_if_missing: DF.Check From 2b854377b15a2a701480baf5ec85010cd5ef0061 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Mon, 31 Mar 2025 20:43:34 +0530 Subject: [PATCH 1484/1614] chore: fix conflicts --- erpnext/stock/doctype/stock_settings/stock_settings.json | 9 --------- 1 file changed, 9 deletions(-) diff --git a/erpnext/stock/doctype/stock_settings/stock_settings.json b/erpnext/stock/doctype/stock_settings/stock_settings.json index b416bb83aed..551104688a2 100644 --- a/erpnext/stock/doctype/stock_settings/stock_settings.json +++ b/erpnext/stock/doctype/stock_settings/stock_settings.json @@ -510,11 +510,7 @@ "index_web_pages_for_search": 1, "issingle": 1, "links": [], -<<<<<<< HEAD - "modified": "2025-02-28 16:08:35.938840", -======= "modified": "2025-03-31 15:34:20.752065", ->>>>>>> b1dfbbe85e (feat: allow UOMs to select for which converstion rate defined in item master) "modified_by": "Administrator", "module": "Stock", "name": "Stock Settings", @@ -535,12 +531,7 @@ } ], "quick_entry": 1, -<<<<<<< HEAD - "sort_field": "modified", -======= - "row_format": "Dynamic", "sort_field": "creation", ->>>>>>> b1dfbbe85e (feat: allow UOMs to select for which converstion rate defined in item master) "sort_order": "ASC", "states": [], "track_changes": 1 From 353fa0cbc3d90ac5da683b24412f074a81fc5aea Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Mon, 31 Mar 2025 14:23:47 +0530 Subject: [PATCH 1485/1614] fix: condition to update the last puurchase rate (cherry picked from commit bad901e7daf36f3c51d6093f8b94edeb339da86a) --- erpnext/stock/doctype/item/item.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/erpnext/stock/doctype/item/item.py b/erpnext/stock/doctype/item/item.py index e40b3822af6..003e0d4d3a0 100644 --- a/erpnext/stock/doctype/item/item.py +++ b/erpnext/stock/doctype/item/item.py @@ -1196,7 +1196,7 @@ def get_last_purchase_details(item_code, doc_name=None, conversion_rate=1.0): return out -def get_purchase_voucher_details(doctype, item_code, document_name): +def get_purchase_voucher_details(doctype, item_code, document_name=None): parent_doc = frappe.qb.DocType(doctype) child_doc = frappe.qb.DocType(doctype + " Item") @@ -1215,9 +1215,11 @@ def get_purchase_voucher_details(doctype, item_code, document_name): ) .where(parent_doc.docstatus == 1) .where(child_doc.item_code == item_code) - .where(parent_doc.name != document_name) ) + if document_name: + query = query.where(parent_doc.name != document_name) + if doctype in ("Purchase Receipt", "Purchase Invoice"): query = query.select(parent_doc.posting_date, parent_doc.posting_time) query = query.orderby( From 79ed02bb2ca4986be96f230f43b68c8c82d1e9e8 Mon Sep 17 00:00:00 2001 From: barredterra <14891507+barredterra@users.noreply.github.com> Date: Thu, 22 Feb 2024 18:30:20 +0100 Subject: [PATCH 1486/1614] fix: translatability (cherry picked from commit 6d43d46fbcdbb360eeeb3a3df359a061925a9350) --- erpnext/public/js/controllers/transaction.js | 41 +++++++++++--------- 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 6423fd78fe9..bd8f6bc0110 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -1020,25 +1020,30 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe due_date() { // due_date is to be changed, payment terms template and/or payment schedule must // be removed as due_date is automatically changed based on payment terms - if (this.frm.doc.due_date && !this.frm.updating_party_details && !this.frm.doc.is_pos) { - if (this.frm.doc.payment_terms_template || - (this.frm.doc.payment_schedule && this.frm.doc.payment_schedule.length)) { - var message1 = ""; - var message2 = ""; - var final_message = __("Please clear the") + " "; - - if (this.frm.doc.payment_terms_template) { - message1 = __("selected Payment Terms Template"); - final_message = final_message + message1; - } - - if ((this.frm.doc.payment_schedule || []).length) { - message2 = __("Payment Schedule Table"); - if (message1.length !== 0) message2 = " and " + message2; - final_message = final_message + message2; - } - frappe.msgprint(final_message); + if ( + this.frm.doc.due_date && + !this.frm.updating_party_details && + !this.frm.doc.is_pos && + ( + this.frm.doc.payment_terms_template || + this.frm.doc.payment_schedule?.length + ) + ) { + const to_clear = []; + if (this.frm.doc.payment_terms_template) { + to_clear.push("Payment Terms Template"); } + + if (this.frm.doc.payment_schedule?.length) { + to_clear.push("Payment Schedule Table"); + } + + frappe.msgprint( + __( + "Please clear the selected {0}", + [frappe.utils.comma_and(to_clear.map(dt => __(dt)))] + ) + ); } } From db647a4e4274a8a05a6726acffe016e8cd421361 Mon Sep 17 00:00:00 2001 From: barredterra <14891507+barredterra@users.noreply.github.com> Date: Mon, 31 Mar 2025 21:38:34 +0200 Subject: [PATCH 1487/1614] fix: wording --- erpnext/public/js/controllers/transaction.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index bd8f6bc0110..15f235f8456 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -1040,7 +1040,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe frappe.msgprint( __( - "Please clear the selected {0}", + "Please clear the {0}", [frappe.utils.comma_and(to_clear.map(dt => __(dt)))] ) ); From 55b17b918f9df9bea12a801013455c761121f03d Mon Sep 17 00:00:00 2001 From: vishakhdesai Date: Tue, 1 Apr 2025 12:43:34 +0530 Subject: [PATCH 1488/1614] fix: use `grand_total_diff` instead of `rounding_adjustment` in `taxes_and_totals` (cherry picked from commit fd252da6b1293824b0a4da6d440b4e1afa142cd8) --- erpnext/controllers/taxes_and_totals.py | 27 ++++++++----------- .../public/js/controllers/taxes_and_totals.js | 22 ++++++++------- 2 files changed, 23 insertions(+), 26 deletions(-) diff --git a/erpnext/controllers/taxes_and_totals.py b/erpnext/controllers/taxes_and_totals.py index d2559241781..091b08cad0f 100644 --- a/erpnext/controllers/taxes_and_totals.py +++ b/erpnext/controllers/taxes_and_totals.py @@ -377,9 +377,7 @@ class calculate_taxes_and_totals: self._calculate() def calculate_taxes(self): - rounding_adjustment_computed = self.doc.get("is_consolidated") and self.doc.get("rounding_adjustment") - if not rounding_adjustment_computed: - self.doc.rounding_adjustment = 0 + self.grand_total_diff = 0 # maintain actual tax rate based on idx actual_tax_dict = dict( @@ -446,9 +444,8 @@ class calculate_taxes_and_totals: and self.discount_amount_applied and self.doc.discount_amount and self.doc.apply_discount_on == "Grand Total" - and not rounding_adjustment_computed ): - self.doc.rounding_adjustment = flt( + self.grand_total_diff = flt( self.doc.grand_total - flt(self.doc.discount_amount) - tax.total, self.doc.precision("rounding_adjustment"), ) @@ -552,11 +549,11 @@ class calculate_taxes_and_totals: return self.adjust_grand_total_for_inclusive_tax() def adjust_grand_total_for_inclusive_tax(self): - # if fully inclusive taxes and diff + # if any inclusive taxes and diff if self.doc.get("taxes") and any(cint(t.included_in_print_rate) for t in self.doc.get("taxes")): last_tax = self.doc.get("taxes")[-1] non_inclusive_tax_amount = sum( - flt(d.tax_amount_after_discount_amount) + self.get_tax_amount_if_for_valuation_or_deduction(d.tax_amount_after_discount_amount, d) for d in self.doc.get("taxes") if not d.included_in_print_rate ) @@ -573,27 +570,23 @@ class calculate_taxes_and_totals: diff = flt(diff, self.doc.precision("rounding_adjustment")) if diff and abs(diff) <= (5.0 / 10 ** last_tax.precision("tax_amount")): - self.doc.grand_total_diff = diff - else: - self.doc.grand_total_diff = 0 + self.grand_total_diff = diff def calculate_totals(self): if self.doc.get("taxes"): - self.doc.grand_total = flt(self.doc.get("taxes")[-1].total) + flt( - self.doc.get("grand_total_diff") - ) + self.doc.grand_total = flt(self.doc.get("taxes")[-1].total) + self.grand_total_diff else: self.doc.grand_total = flt(self.doc.net_total) if self.doc.get("taxes"): self.doc.total_taxes_and_charges = flt( - self.doc.grand_total - self.doc.net_total - flt(self.doc.get("grand_total_diff")), + self.doc.grand_total - self.doc.net_total - self.grand_total_diff, self.doc.precision("total_taxes_and_charges"), ) else: self.doc.total_taxes_and_charges = 0.0 - self._set_in_company_currency(self.doc, ["total_taxes_and_charges", "rounding_adjustment"]) + self._set_in_company_currency(self.doc, ["total_taxes_and_charges"]) if self.doc.doctype in [ "Quotation", @@ -643,7 +636,9 @@ class calculate_taxes_and_totals: if self.doc.meta.get_field("rounded_total"): if self.doc.is_rounded_total_disabled(): - self.doc.rounded_total = self.doc.base_rounded_total = 0 + self.doc.rounded_total = 0 + self.doc.base_rounded_total = 0 + self.doc.rounding_adjustment = 0 return self.doc.rounded_total = round_based_on_smallest_currency_fraction( diff --git a/erpnext/public/js/controllers/taxes_and_totals.js b/erpnext/public/js/controllers/taxes_and_totals.js index 233c3d4c3b6..4bc787f85ff 100644 --- a/erpnext/public/js/controllers/taxes_and_totals.js +++ b/erpnext/public/js/controllers/taxes_and_totals.js @@ -343,7 +343,7 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments { calculate_taxes() { var me = this; - this.frm.doc.rounding_adjustment = 0; + this.grand_total_diff = 0; var actual_tax_dict = {}; // maintain actual tax rate based on idx @@ -417,7 +417,7 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments { // adjust Discount Amount loss in last tax iteration if ((i == me.frm.doc["taxes"].length - 1) && me.discount_amount_applied && me.frm.doc.apply_discount_on == "Grand Total" && me.frm.doc.discount_amount) { - me.frm.doc.rounding_adjustment = flt(me.frm.doc.grand_total - + me.grand_total_diff = flt(me.frm.doc.grand_total - flt(me.frm.doc.discount_amount) - tax.total, precision("rounding_adjustment")); } } @@ -535,7 +535,8 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments { adjust_grand_total_for_inclusive_tax() { var me = this; - // if fully inclusive taxes and diff + + // if any inclusive taxes and diff if (this.frm.doc["taxes"] && this.frm.doc["taxes"].length) { var any_inclusive_tax = false; $.each(this.frm.doc.taxes || [], function(i, d) { @@ -546,7 +547,9 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments { var non_inclusive_tax_amount = frappe.utils.sum($.map(this.frm.doc.taxes || [], function(d) { if(!d.included_in_print_rate) { - return flt(d.tax_amount_after_discount_amount); + let tax_amount = d.category === "Valuation" ? 0 : d.tax_amount_after_discount_amount; + if (d.add_deduct_tax === "Deduct") tax_amount *= -1; + return tax_amount; } } )); @@ -560,9 +563,7 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments { diff = flt(diff, precision("rounding_adjustment")); if ( diff && Math.abs(diff) <= (5.0 / Math.pow(10, precision("tax_amount", last_tax))) ) { - me.frm.doc.grand_total_diff = diff; - } else { - me.frm.doc.grand_total_diff = 0; + me.grand_total_diff = diff; } } } @@ -573,7 +574,7 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments { var me = this; var tax_count = this.frm.doc["taxes"] ? this.frm.doc["taxes"].length : 0; this.frm.doc.grand_total = flt(tax_count - ? this.frm.doc["taxes"][tax_count - 1].total + flt(this.frm.doc.grand_total_diff) + ? this.frm.doc["taxes"][tax_count - 1].total + this.grand_total_diff : this.frm.doc.net_total); if(["Quotation", "Sales Order", "Delivery Note", "Sales Invoice", "POS Invoice"].includes(this.frm.doc.doctype)) { @@ -605,9 +606,9 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments { } this.frm.doc.total_taxes_and_charges = flt(this.frm.doc.grand_total - this.frm.doc.net_total - - flt(this.frm.doc.grand_total_diff), precision("total_taxes_and_charges")); + - this.grand_total_diff, precision("total_taxes_and_charges")); - this.set_in_company_currency(this.frm.doc, ["total_taxes_and_charges", "rounding_adjustment"]); + this.set_in_company_currency(this.frm.doc, ["total_taxes_and_charges"]); // Round grand total as per precision frappe.model.round_floats_in(this.frm.doc, ["grand_total", "base_grand_total"]); @@ -627,6 +628,7 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments { if (cint(disable_rounded_total)) { this.frm.doc.rounded_total = 0; this.frm.doc.base_rounded_total = 0; + this.frm.doc.rounding_adjustment = 0; return; } From 80f144ac2236fc6f935a5f9897c716129e3d7a4c Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 1 Apr 2025 13:54:29 +0530 Subject: [PATCH 1489/1614] fix: pos checking opened entry closed or not (backport #46726) (#46830) fix: pos checking opened entry closed or not (#46726) * fix: pos checking opened entry closed or not * fix: linter issue * fix: linter issue (cherry picked from commit 5d5b6acc79a2a5639c468d276d71d20daa2fb99f) Co-authored-by: Diptanil Saha --- .../pos_closing_entry/pos_closing_entry.py | 5 +++++ .../page/point_of_sale/pos_controller.js | 19 +++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.py b/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.py index fda868cfe51..4fa8317ff76 100644 --- a/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.py +++ b/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.py @@ -124,6 +124,11 @@ class POSClosingEntry(StatusUpdater): def on_submit(self): consolidate_pos_invoices(closing_entry=self) + frappe.publish_realtime( + f"poe_{self.pos_opening_entry}_closed", + self, + docname=f"POS Opening Entry/{self.pos_opening_entry}", + ) def on_cancel(self): unconsolidate_pos_invoices(closing_entry=self) diff --git a/erpnext/selling/page/point_of_sale/pos_controller.js b/erpnext/selling/page/point_of_sale/pos_controller.js index b7062abecba..d77381bf309 100644 --- a/erpnext/selling/page/point_of_sale/pos_controller.js +++ b/erpnext/selling/page/point_of_sale/pos_controller.js @@ -149,6 +149,25 @@ erpnext.PointOfSale.Controller = class { this.make_app(); }, }); + + frappe.realtime.on(`poe_${this.pos_opening}_closed`, (data) => { + if (data) { + frappe.dom.freeze(); + frappe.msgprint({ + title: __("POS Closed"), + indicator: "orange", + message: __("POS has been closed at {0}. Please refresh the page.", [ + frappe.datetime.str_to_user(data.creation).bold(), + ]), + primary_action_label: __("Refresh"), + primary_action: { + action() { + window.location.reload(); + }, + }, + }); + } + }); } set_opening_entry_status() { From c6979ab260dcb6ce97bbdff6b28b8efd4ec2da41 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Tue, 1 Apr 2025 14:45:24 +0530 Subject: [PATCH 1490/1614] fix: use work_order bom_no if no bom present in operation --- erpnext/manufacturing/doctype/work_order/work_order.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/work_order/work_order.py b/erpnext/manufacturing/doctype/work_order/work_order.py index 885978deece..0bf383de285 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order.py +++ b/erpnext/manufacturing/doctype/work_order/work_order.py @@ -1616,7 +1616,7 @@ def create_job_card(work_order, row, enable_capacity_planning=False, auto_create "posting_date": nowdate(), "for_quantity": row.job_card_qty or work_order.get("qty", 0), "operation_id": row.get("name"), - "bom_no": row.get("bom"), + "bom_no": row.get("bom") or work_order.bom_no, "project": work_order.project, "company": work_order.company, "sequence_id": row.get("sequence_id"), From bde55d2a07d81bac86e9a1253e7a1b4043e54823 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Tue, 1 Apr 2025 18:51:10 +0530 Subject: [PATCH 1491/1614] fix: resolved conflicts --- .../doctype/payment_entry/payment_entry.json | 4 ---- .../doctype/payment_entry/payment_entry.py | 17 ++++------------- 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.json b/erpnext/accounts/doctype/payment_entry/payment_entry.json index 190bdf8d4f5..c7e05f70d7f 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.json +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.json @@ -809,11 +809,7 @@ "table_fieldname": "payment_entries" } ], -<<<<<<< HEAD - "modified": "2025-01-31 17:27:28.555246", -======= "modified": "2025-03-24 16:18:19.920701", ->>>>>>> 8c9d630ee4 (Merge pull request #46683 from Abdeali099/set-employee-contact-details) "modified_by": "Administrator", "module": "Accounts", "name": "Payment Entry", diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index b348e8cb981..5f0db7bfd5e 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -444,25 +444,16 @@ class PaymentEntry(AccountsController): self.party_name = frappe.db.get_value(self.party_type, self.party, "name") if self.party: -<<<<<<< HEAD - if not self.contact_person: - set_contact_details( - self, party=frappe._dict({"name": self.party}), party_type=self.party_type - ) - else: - complete_contact_details(self) - if not self.party_balance: - self.party_balance = get_balance_on( - party_type=self.party_type, party=self.party, date=self.posting_date, company=self.company - ) -======= if self.party_type == "Employee": self.contact_person = None elif not self.contact_person: self.contact_person = get_default_contact(self.party_type, self.party) complete_contact_details(self) ->>>>>>> 8c9d630ee4 (Merge pull request #46683 from Abdeali099/set-employee-contact-details) + if not self.party_balance: + self.party_balance = get_balance_on( + party_type=self.party_type, party=self.party, date=self.posting_date, company=self.company + ) if not self.party_account: party_account = get_party_account(self.party_type, self.party, self.company) From 54159b9e5e54893572e64e1e7cf54933d620b92a Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Tue, 1 Apr 2025 13:26:28 +0530 Subject: [PATCH 1492/1614] fix: set draft QC in purchase document on creation of qc (cherry picked from commit 2553dea78ef35d7bebda98df1bf3db1f97c70027) --- .../quality_inspection/quality_inspection.py | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/erpnext/stock/doctype/quality_inspection/quality_inspection.py b/erpnext/stock/doctype/quality_inspection/quality_inspection.py index 7c6b892416b..bf1c918668f 100644 --- a/erpnext/stock/doctype/quality_inspection/quality_inspection.py +++ b/erpnext/stock/doctype/quality_inspection/quality_inspection.py @@ -197,8 +197,19 @@ class QualityInspection(Document): self.quality_inspection_template = template self.get_item_specification_details() + def on_update(self): + if ( + frappe.db.get_single_value("Stock Settings", "action_if_quality_inspection_is_not_submitted") + == "Warn" + ): + self.update_qc_reference() + def on_submit(self): - self.update_qc_reference() + if ( + frappe.db.get_single_value("Stock Settings", "action_if_quality_inspection_is_not_submitted") + == "Stop" + ): + self.update_qc_reference() def on_cancel(self): self.ignore_linked_doctypes = "Serial and Batch Bundle" @@ -206,15 +217,15 @@ class QualityInspection(Document): self.update_qc_reference() def on_trash(self): - self.update_qc_reference() + self.update_qc_reference(remove_reference=True) def validate_readings_status_mandatory(self): for reading in self.readings: if not reading.status: frappe.throw(_("Row #{0}: Status is mandatory").format(reading.idx)) - def update_qc_reference(self): - quality_inspection = self.name if self.docstatus == 1 else "" + def update_qc_reference(self, remove_reference=False): + quality_inspection = self.name if self.docstatus < 2 and not remove_reference else "" if self.reference_type == "Job Card": if self.reference_name: @@ -244,7 +255,7 @@ class QualityInspection(Document): ) ) - if self.batch_no and self.docstatus == 1: + if self.batch_no and self.docstatus < 2: query = query.where(child_doc.batch_no == self.batch_no) if self.docstatus == 2: # if cancel, then remove qi link wherever same name From 2dfe13e183f5358e9ad2ce85ddf5f4bea31d7902 Mon Sep 17 00:00:00 2001 From: Md Hussain Nagaria <34810212+NagariaHussain@users.noreply.github.com> Date: Wed, 2 Apr 2025 12:15:10 +0530 Subject: [PATCH 1493/1614] chore: update links to Frappe School (#46823) (cherry picked from commit ef4f662c319d8d7d1943c3bc62abc9652a15a7e4) # Conflicts: # erpnext/accounts/workspace/accounting/accounting.json # erpnext/buying/workspace/buying/buying.json # erpnext/manufacturing/workspace/manufacturing/manufacturing.json # erpnext/projects/workspace/projects/projects.json # erpnext/selling/workspace/selling/selling.json # erpnext/stock/workspace/stock/stock.json --- README.md | 2 +- .../accounts/workspace/accounting/accounting.json | 6 +++++- erpnext/buying/workspace/buying/buying.json | 6 +++++- .../workspace/manufacturing/manufacturing.json | 6 +++++- erpnext/projects/workspace/projects/projects.json | 6 +++++- erpnext/selling/workspace/selling/selling.json | 12 +++++++++++- erpnext/setup/install.py | 2 +- erpnext/stock/workspace/stock/stock.json | 6 +++++- 8 files changed, 38 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 44bd7296881..3b703d97831 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ New passwords will be created for the ERPNext "Administrator" user, the MariaDB ## Learning and community -1. [Frappe School](https://frappe.school) - Learn Frappe Framework and ERPNext from the various courses by the maintainers or from the community. +1. [Frappe School](https://school.frappe.io) - Learn Frappe Framework and ERPNext from the various courses by the maintainers or from the community. 2. [Official documentation](https://docs.erpnext.com/) - Extensive documentation for ERPNext. 3. [Discussion Forum](https://discuss.erpnext.com/) - Engage with community of ERPNext users and service providers. 4. [Telegram Group](https://erpnext_public.t.me) - Get instant help from huge community of users. diff --git a/erpnext/accounts/workspace/accounting/accounting.json b/erpnext/accounts/workspace/accounting/accounting.json index 45ab92e2c56..ed081102aa3 100644 --- a/erpnext/accounts/workspace/accounting/accounting.json +++ b/erpnext/accounts/workspace/accounting/accounting.json @@ -621,7 +621,11 @@ "doc_view": "List", "label": "Learn Accounting", "type": "URL", +<<<<<<< HEAD "url": "https://frappe.school/courses/erpnext-accounting?utm_source=in_app" +======= + "url": "https://school.frappe.io/lms/courses/erpnext-accounting?utm_source=in_app" +>>>>>>> ef4f662c31 (chore: update links to Frappe School (#46823)) }, { "label": "Chart of Accounts", @@ -670,4 +674,4 @@ } ], "title": "Accounting" -} \ No newline at end of file +} diff --git a/erpnext/buying/workspace/buying/buying.json b/erpnext/buying/workspace/buying/buying.json index 1394fc48d5b..54f44ea13da 100644 --- a/erpnext/buying/workspace/buying/buying.json +++ b/erpnext/buying/workspace/buying/buying.json @@ -537,7 +537,11 @@ "doc_view": "List", "label": "Learn Procurement", "type": "URL", +<<<<<<< HEAD "url": "https://frappe.school/courses/procurement?utm_source=in_app" +======= + "url": "https://school.frappe.io/lms/courses/procurement?utm_source=in_app" +>>>>>>> ef4f662c31 (chore: update links to Frappe School (#46823)) }, { "color": "Yellow", @@ -572,4 +576,4 @@ } ], "title": "Buying" -} \ No newline at end of file +} diff --git a/erpnext/manufacturing/workspace/manufacturing/manufacturing.json b/erpnext/manufacturing/workspace/manufacturing/manufacturing.json index 06b9f1b0759..08befc61ef0 100644 --- a/erpnext/manufacturing/workspace/manufacturing/manufacturing.json +++ b/erpnext/manufacturing/workspace/manufacturing/manufacturing.json @@ -336,7 +336,11 @@ "doc_view": "List", "label": "Learn Manufacturing", "type": "URL", +<<<<<<< HEAD "url": "https://frappe.school/courses/manufacturing?utm_source=in_app" +======= + "url": "https://school.frappe.io/lms/courses/manufacturing?utm_source=in_app" +>>>>>>> ef4f662c31 (chore: update links to Frappe School (#46823)) }, { "color": "Grey", @@ -402,4 +406,4 @@ ], "title": "Manufacturing", "type": "Workspace" -} \ No newline at end of file +} diff --git a/erpnext/projects/workspace/projects/projects.json b/erpnext/projects/workspace/projects/projects.json index 94ae9c04a40..9effb1cbda6 100644 --- a/erpnext/projects/workspace/projects/projects.json +++ b/erpnext/projects/workspace/projects/projects.json @@ -210,7 +210,11 @@ "doc_view": "List", "label": "Learn Project Management", "type": "URL", +<<<<<<< HEAD "url": "https://frappe.school/courses/project-management?utm_source=in_app" +======= + "url": "https://school.frappe.io/lms/courses/project-management?utm_source=in_app" +>>>>>>> ef4f662c31 (chore: update links to Frappe School (#46823)) }, { "color": "Blue", @@ -245,4 +249,4 @@ } ], "title": "Projects" -} \ No newline at end of file +} diff --git a/erpnext/selling/workspace/selling/selling.json b/erpnext/selling/workspace/selling/selling.json index e13bdec11fb..a392574e15c 100644 --- a/erpnext/selling/workspace/selling/selling.json +++ b/erpnext/selling/workspace/selling/selling.json @@ -639,7 +639,11 @@ "doc_view": "List", "label": "Learn Sales Management", "type": "URL", +<<<<<<< HEAD "url": "https://frappe.school/courses/sales-management-course?utm_source=in_app" +======= + "url": "https://school.frappe.io/lms/courses/sales-management-course?utm_source=in_app" +>>>>>>> ef4f662c31 (chore: update links to Frappe School (#46823)) }, { "label": "Point of Sale", @@ -676,5 +680,11 @@ "type": "Dashboard" } ], +<<<<<<< HEAD "title": "Selling" -} \ No newline at end of file +} +======= + "title": "Selling", + "type": "Workspace" +} +>>>>>>> ef4f662c31 (chore: update links to Frappe School (#46823)) diff --git a/erpnext/setup/install.py b/erpnext/setup/install.py index 23ffd49de5d..81e1ac6a458 100644 --- a/erpnext/setup/install.py +++ b/erpnext/setup/install.py @@ -182,7 +182,7 @@ def add_standard_navbar_items(): { "item_label": "Frappe School", "item_type": "Route", - "route": "https://frappe.school?utm_source=in_app", + "route": "https://frappe.io/school?utm_source=in_app", "is_standard": 1, }, { diff --git a/erpnext/stock/workspace/stock/stock.json b/erpnext/stock/workspace/stock/stock.json index 1a683e2b3d8..9a9e3d9e5c3 100644 --- a/erpnext/stock/workspace/stock/stock.json +++ b/erpnext/stock/workspace/stock/stock.json @@ -802,7 +802,11 @@ "doc_view": "List", "label": "Learn Inventory Management", "type": "URL", +<<<<<<< HEAD "url": "https://frappe.school/courses/inventory-management?utm_source=in_app" +======= + "url": "https://school.frappe.io/lms/courses/inventory-management?utm_source=in_app" +>>>>>>> ef4f662c31 (chore: update links to Frappe School (#46823)) }, { "color": "Yellow", @@ -850,4 +854,4 @@ } ], "title": "Stock" -} \ No newline at end of file +} From a19eece8818fef0f3a7c45ffa2a41fd9e12fca69 Mon Sep 17 00:00:00 2001 From: Abdeali Chharchhoda Date: Thu, 20 Mar 2025 15:12:06 +0530 Subject: [PATCH 1494/1614] refactor: move `payment_document` query to `setup` (cherry picked from commit 257802aeda0eeb4b8ad6264ab477ad8f1e38a55a) # Conflicts: # erpnext/accounts/doctype/bank_transaction/bank_transaction.js --- .../doctype/bank_transaction/bank_transaction.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/bank_transaction/bank_transaction.js b/erpnext/accounts/doctype/bank_transaction/bank_transaction.js index 5c5d9ff3469..3ce5da72f9a 100644 --- a/erpnext/accounts/doctype/bank_transaction/bank_transaction.js +++ b/erpnext/accounts/doctype/bank_transaction/bank_transaction.js @@ -2,7 +2,15 @@ // For license information, please see license.txt frappe.ui.form.on("Bank Transaction", { - onload(frm) { + setup: function (frm) { + frm.set_query("party_type", function () { + return { + filters: { + name: ["in", Object.keys(frappe.boot.party_account_types)], + }, + }; + }); + frm.set_query("payment_document", "payment_entries", function () { const payment_doctypes = frm.events.get_payment_doctypes(frm); return { @@ -12,6 +20,7 @@ frappe.ui.form.on("Bank Transaction", { }; }); }, + refresh(frm) { if (!frm.is_dirty() && frm.doc.payment_entries.length > 0) { frm.add_custom_button(__("Unreconcile Transaction"), () => { @@ -19,10 +28,12 @@ frappe.ui.form.on("Bank Transaction", { }); } }, + bank_account: function (frm) { set_bank_statement_filter(frm); }, +<<<<<<< HEAD setup: function (frm) { frm.set_query("party_type", function () { return { @@ -39,6 +50,8 @@ frappe.ui.form.on("Bank Transaction", { }); }, +======= +>>>>>>> 257802aeda (refactor: move `payment_document` query to `setup`) get_payment_doctypes: function () { // get payment doctypes from all the apps return ["Payment Entry", "Journal Entry", "Sales Invoice", "Purchase Invoice", "Bank Transaction"]; From 5d47db78e635354cc91a4bc5b2d92e4776c818f0 Mon Sep 17 00:00:00 2001 From: Abdeali Chharchhoda Date: Thu, 20 Mar 2025 15:19:01 +0530 Subject: [PATCH 1495/1614] fix: add `Not Cancelled` filter for `payment_entry` in Bank Transaction (cherry picked from commit 85dd1dd4c7b1ff616401823470b9c011a4eb2383) --- .../accounts/doctype/bank_transaction/bank_transaction.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/erpnext/accounts/doctype/bank_transaction/bank_transaction.js b/erpnext/accounts/doctype/bank_transaction/bank_transaction.js index 3ce5da72f9a..cb7bed698a2 100644 --- a/erpnext/accounts/doctype/bank_transaction/bank_transaction.js +++ b/erpnext/accounts/doctype/bank_transaction/bank_transaction.js @@ -19,6 +19,14 @@ frappe.ui.form.on("Bank Transaction", { }, }; }); + + frm.set_query("payment_entry", "payment_entries", function () { + return { + filters: { + docstatus: ["!=", 2], + }, + }; + }); }, refresh(frm) { From 3dc29cbec8f057665f878d362cef69ad3d86a09a Mon Sep 17 00:00:00 2001 From: Abdeali Chharchhoda Date: Tue, 1 Apr 2025 12:12:37 +0530 Subject: [PATCH 1496/1614] chore: formatting (cherry picked from commit 4ae11d4384e98dcdce03dea772675bb856470670) # Conflicts: # erpnext/accounts/doctype/bank_transaction/bank_transaction.js --- .../doctype/bank_transaction/bank_transaction.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/erpnext/accounts/doctype/bank_transaction/bank_transaction.js b/erpnext/accounts/doctype/bank_transaction/bank_transaction.js index cb7bed698a2..7a89f9e75b4 100644 --- a/erpnext/accounts/doctype/bank_transaction/bank_transaction.js +++ b/erpnext/accounts/doctype/bank_transaction/bank_transaction.js @@ -10,6 +10,15 @@ frappe.ui.form.on("Bank Transaction", { }, }; }); +<<<<<<< HEAD +======= + + frm.set_query("bank_account", function () { + return { + filters: { is_company_account: 1 }, + }; + }); +>>>>>>> 4ae11d4384 (chore: formatting) frm.set_query("payment_document", "payment_entries", function () { const payment_doctypes = frm.events.get_payment_doctypes(frm); From a6834f3875fdd93990b7e95cadc2487e6a120b5c Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Sat, 5 Apr 2025 07:32:15 +0530 Subject: [PATCH 1497/1614] chore: resolve conflict --- .../bank_transaction/bank_transaction.js | 22 ------------------- 1 file changed, 22 deletions(-) diff --git a/erpnext/accounts/doctype/bank_transaction/bank_transaction.js b/erpnext/accounts/doctype/bank_transaction/bank_transaction.js index 7a89f9e75b4..1ca76a68fde 100644 --- a/erpnext/accounts/doctype/bank_transaction/bank_transaction.js +++ b/erpnext/accounts/doctype/bank_transaction/bank_transaction.js @@ -10,15 +10,12 @@ frappe.ui.form.on("Bank Transaction", { }, }; }); -<<<<<<< HEAD -======= frm.set_query("bank_account", function () { return { filters: { is_company_account: 1 }, }; }); ->>>>>>> 4ae11d4384 (chore: formatting) frm.set_query("payment_document", "payment_entries", function () { const payment_doctypes = frm.events.get_payment_doctypes(frm); @@ -50,25 +47,6 @@ frappe.ui.form.on("Bank Transaction", { set_bank_statement_filter(frm); }, -<<<<<<< HEAD - setup: function (frm) { - frm.set_query("party_type", function () { - return { - filters: { - name: ["in", Object.keys(frappe.boot.party_account_types)], - }, - }; - }); - - frm.set_query("bank_account", function () { - return { - filters: { is_company_account: 1 }, - }; - }); - }, - -======= ->>>>>>> 257802aeda (refactor: move `payment_document` query to `setup`) get_payment_doctypes: function () { // get payment doctypes from all the apps return ["Payment Entry", "Journal Entry", "Sales Invoice", "Purchase Invoice", "Bank Transaction"]; From f63595cf0cd0d18a6a7aafc2519c0dd86c6e4315 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Sat, 5 Apr 2025 17:36:43 +0200 Subject: [PATCH 1498/1614] fix(Dunning): undefined variable (backport #46868) (#46869) fix(Dunning): undefined variable (#46868) (cherry picked from commit 04df09cfcab118c94e7a20d8a1ed5caa3f5310d1) Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com> --- erpnext/accounts/doctype/dunning/dunning.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/accounts/doctype/dunning/dunning.py b/erpnext/accounts/doctype/dunning/dunning.py index d63db3a09a1..00ed85a4e0b 100644 --- a/erpnext/accounts/doctype/dunning/dunning.py +++ b/erpnext/accounts/doctype/dunning/dunning.py @@ -220,6 +220,7 @@ def get_dunning_letter_text(dunning_type: str, doc: str | dict, language: str | if not language: language = doc.get("language") + letter_text = None if language: letter_text = frappe.db.get_value( DOCTYPE, {"parent": dunning_type, "language": language}, FIELDS, as_dict=1 From fcade5d8cd87fd51d002aee190af1271b6c6c672 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Sat, 5 Apr 2025 17:37:08 +0200 Subject: [PATCH 1499/1614] fix: Translate UnReconcile dialog title (backport #46818) (#46861) fix: Translate UnReconcile dialog title (cherry picked from commit f2cfb03c2c53453ea9fe85d0c1389f09eb954aa3) Co-authored-by: Corentin Forler --- erpnext/public/js/utils/unreconcile.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/public/js/utils/unreconcile.js b/erpnext/public/js/utils/unreconcile.js index 7dba4705e40..d085db05fa5 100644 --- a/erpnext/public/js/utils/unreconcile.js +++ b/erpnext/public/js/utils/unreconcile.js @@ -121,10 +121,10 @@ erpnext.accounts.unreconcile_payment = { }; let d = new frappe.ui.Dialog({ - title: "UnReconcile Allocations", + title: __("UnReconcile Allocations"), fields: unreconcile_dialog_fields, size: "large", - primary_action_label: "UnReconcile", + primary_action_label: __("UnReconcile"), primary_action(values) { let selected_allocations = values.allocations.filter((x) => x.__checked); if (selected_allocations.length > 0) { From d7bb4a288cb810882115f836ced846d883287600 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Sat, 5 Apr 2025 17:37:36 +0200 Subject: [PATCH 1500/1614] fix: make message translatable (backport #46863) (#46866) fix: make message translatable (#46863) (cherry picked from commit 7d12e9afd441812a07e032d9d38b70833d52a112) Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com> --- erpnext/public/js/utils/unreconcile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/public/js/utils/unreconcile.js b/erpnext/public/js/utils/unreconcile.js index d085db05fa5..b8c1db66cc8 100644 --- a/erpnext/public/js/utils/unreconcile.js +++ b/erpnext/public/js/utils/unreconcile.js @@ -138,7 +138,7 @@ erpnext.accounts.unreconcile_payment = { ); d.hide(); } else { - frappe.msgprint("No Selection"); + frappe.msgprint(__("No Selection")); } }, }); From 86853224c3df3089c78b09916c1d26a63bd9751e Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Sat, 5 Apr 2025 17:39:42 +0200 Subject: [PATCH 1501/1614] refactor(Payment Entry): reduce indentation (backport #46864) (#46867) refactor(Payment Entry): reduce indentation (#46864) Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com> --- .../doctype/payment_entry/payment_entry.py | 467 +++++++++--------- 1 file changed, 233 insertions(+), 234 deletions(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index 6c7b1ad5f5a..4e9e3c4c042 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -249,16 +249,18 @@ class PaymentEntry(AccountsController): reference_names.add(key) def set_bank_account_data(self): - if self.bank_account: - bank_data = get_bank_account_details(self.bank_account) + if not self.bank_account: + return - field = "paid_from" if self.payment_type == "Pay" else "paid_to" + bank_data = get_bank_account_details(self.bank_account) - self.bank = bank_data.bank - self.bank_account_no = bank_data.bank_account_no + field = "paid_from" if self.payment_type == "Pay" else "paid_to" - if not self.get(field): - self.set(field, bank_data.account) + self.bank = bank_data.bank + self.bank_account_no = bank_data.bank_account_no + + if not self.get(field): + self.set(field, bank_data.account) def validate_payment_type_with_outstanding(self): total_outstanding = sum(d.allocated_amount for d in self.get("references")) @@ -276,15 +278,16 @@ class PaymentEntry(AccountsController): if self.party_type in ("Customer", "Supplier"): self.validate_allocated_amount_with_latest_data() - else: - fail_message = _("Row #{0}: Allocated Amount cannot be greater than outstanding amount.") - for d in self.get("references"): - if (flt(d.allocated_amount)) > 0 and flt(d.allocated_amount) > flt(d.outstanding_amount): - frappe.throw(fail_message.format(d.idx)) + return - # Check for negative outstanding invoices as well - if flt(d.allocated_amount) < 0 and flt(d.allocated_amount) < flt(d.outstanding_amount): - frappe.throw(fail_message.format(d.idx)) + fail_message = _("Row #{0}: Allocated Amount cannot be greater than outstanding amount.") + for d in self.get("references"): + if (flt(d.allocated_amount)) > 0 and flt(d.allocated_amount) > flt(d.outstanding_amount): + frappe.throw(fail_message.format(d.idx)) + + # Check for negative outstanding invoices as well + if flt(d.allocated_amount) < 0 and flt(d.allocated_amount) < flt(d.outstanding_amount): + frappe.throw(fail_message.format(d.idx)) def validate_allocated_amount_as_per_payment_request(self): """ @@ -322,91 +325,89 @@ class PaymentEntry(AccountsController): return False def validate_allocated_amount_with_latest_data(self): - if self.references: - uniq_vouchers = set([(x.reference_doctype, x.reference_name) for x in self.references]) - vouchers = [frappe._dict({"voucher_type": x[0], "voucher_no": x[1]}) for x in uniq_vouchers] - latest_references = get_outstanding_reference_documents( - { - "posting_date": self.posting_date, - "company": self.company, - "party_type": self.party_type, - "payment_type": self.payment_type, - "party": self.party, - "party_account": self.paid_from if self.payment_type == "Receive" else self.paid_to, - "get_outstanding_invoices": True, - "get_orders_to_be_billed": True, - "vouchers": vouchers, - "book_advance_payments_in_separate_party_account": self.book_advance_payments_in_separate_party_account, - }, - validate=True, - ) + if not self.references: + return - # Group latest_references by (voucher_type, voucher_no) - latest_lookup = {} - for d in latest_references: - d = frappe._dict(d) - latest_lookup.setdefault((d.voucher_type, d.voucher_no), frappe._dict())[d.payment_term] = d + uniq_vouchers = {(x.reference_doctype, x.reference_name) for x in self.references} + vouchers = [frappe._dict({"voucher_type": x[0], "voucher_no": x[1]}) for x in uniq_vouchers] + latest_references = get_outstanding_reference_documents( + { + "posting_date": self.posting_date, + "company": self.company, + "party_type": self.party_type, + "payment_type": self.payment_type, + "party": self.party, + "party_account": self.paid_from if self.payment_type == "Receive" else self.paid_to, + "get_outstanding_invoices": True, + "get_orders_to_be_billed": True, + "vouchers": vouchers, + "book_advance_payments_in_separate_party_account": self.book_advance_payments_in_separate_party_account, + }, + validate=True, + ) - for idx, d in enumerate(self.get("references"), start=1): - latest = latest_lookup.get((d.reference_doctype, d.reference_name)) or frappe._dict() + # Group latest_references by (voucher_type, voucher_no) + latest_lookup = {} + for d in latest_references: + d = frappe._dict(d) + latest_lookup.setdefault((d.voucher_type, d.voucher_no), frappe._dict())[d.payment_term] = d - # If term based allocation is enabled, throw - if ( - d.payment_term is None or d.payment_term == "" - ) and self.term_based_allocation_enabled_for_reference(d.reference_doctype, d.reference_name): - frappe.throw( - _( - "{0} has Payment Term based allocation enabled. Select a Payment Term for Row #{1} in Payment References section" - ).format(frappe.bold(d.reference_name), frappe.bold(idx)) - ) + for idx, d in enumerate(self.get("references"), start=1): + latest = latest_lookup.get((d.reference_doctype, d.reference_name)) or frappe._dict() - # if no payment template is used by invoice and has a custom term(no `payment_term`), then invoice outstanding will be in 'None' key - latest = latest.get(d.payment_term) or latest.get(None) - # The reference has already been fully paid - if not latest: - frappe.throw( - _("{0} {1} has already been fully paid.").format( - _(d.reference_doctype), d.reference_name - ) - ) - # The reference has already been partly paid - elif ( - latest.outstanding_amount < latest.invoice_amount - and flt(d.outstanding_amount, d.precision("outstanding_amount")) - != flt(latest.outstanding_amount, d.precision("outstanding_amount")) - and d.payment_term == "" - ): - frappe.throw( - _( - "{0} {1} has already been partly paid. Please use the 'Get Outstanding Invoice' or the 'Get Outstanding Orders' button to get the latest outstanding amounts." - ).format(_(d.reference_doctype), d.reference_name) - ) + # If term based allocation is enabled, throw + if ( + d.payment_term is None or d.payment_term == "" + ) and self.term_based_allocation_enabled_for_reference(d.reference_doctype, d.reference_name): + frappe.throw( + _( + "{0} has Payment Term based allocation enabled. Select a Payment Term for Row #{1} in Payment References section" + ).format(frappe.bold(d.reference_name), frappe.bold(idx)) + ) - fail_message = _("Row #{0}: Allocated Amount cannot be greater than outstanding amount.") + # if no payment template is used by invoice and has a custom term(no `payment_term`), then invoice outstanding will be in 'None' key + latest = latest.get(d.payment_term) or latest.get(None) + # The reference has already been fully paid + if not latest: + frappe.throw( + _("{0} {1} has already been fully paid.").format(_(d.reference_doctype), d.reference_name) + ) + # The reference has already been partly paid + elif ( + latest.outstanding_amount < latest.invoice_amount + and flt(d.outstanding_amount, d.precision("outstanding_amount")) + != flt(latest.outstanding_amount, d.precision("outstanding_amount")) + and d.payment_term == "" + ): + frappe.throw( + _( + "{0} {1} has already been partly paid. Please use the 'Get Outstanding Invoice' or the 'Get Outstanding Orders' button to get the latest outstanding amounts." + ).format(_(d.reference_doctype), d.reference_name) + ) - if ( - d.payment_term - and ( - (flt(d.allocated_amount)) > 0 - and latest.payment_term_outstanding - and (flt(d.allocated_amount) > flt(latest.payment_term_outstanding)) - ) - and self.term_based_allocation_enabled_for_reference( - d.reference_doctype, d.reference_name - ) - ): - frappe.throw( - _( - "Row #{0}: Allocated amount:{1} is greater than outstanding amount:{2} for Payment Term {3}" - ).format(d.idx, d.allocated_amount, latest.payment_term_outstanding, d.payment_term) - ) + fail_message = _("Row #{0}: Allocated Amount cannot be greater than outstanding amount.") - if (flt(d.allocated_amount)) > 0 and flt(d.allocated_amount) > flt(latest.outstanding_amount): - frappe.throw(fail_message.format(d.idx)) + if ( + d.payment_term + and ( + (flt(d.allocated_amount)) > 0 + and latest.payment_term_outstanding + and (flt(d.allocated_amount) > flt(latest.payment_term_outstanding)) + ) + and self.term_based_allocation_enabled_for_reference(d.reference_doctype, d.reference_name) + ): + frappe.throw( + _( + "Row #{0}: Allocated amount:{1} is greater than outstanding amount:{2} for Payment Term {3}" + ).format(d.idx, d.allocated_amount, latest.payment_term_outstanding, d.payment_term) + ) - # Check for negative outstanding invoices as well - if flt(d.allocated_amount) < 0 and flt(d.allocated_amount) < flt(latest.outstanding_amount): - frappe.throw(fail_message.format(d.idx)) + if (flt(d.allocated_amount)) > 0 and flt(d.allocated_amount) > flt(latest.outstanding_amount): + frappe.throw(fail_message.format(d.idx)) + + # Check for negative outstanding invoices as well + if flt(d.allocated_amount) < 0 and flt(d.allocated_amount) < flt(latest.outstanding_amount): + frappe.throw(fail_message.format(d.idx)) def delink_advance_entry_references(self): for reference in self.references: @@ -479,47 +480,48 @@ class PaymentEntry(AccountsController): reference_exchange_details: dict | None = None, ) -> None: for d in self.get("references"): - if d.allocated_amount: - if update_ref_details_only_for and ( - (d.reference_doctype, d.reference_name) not in update_ref_details_only_for - ): + if not d.allocated_amount: + continue + + if update_ref_details_only_for and ( + (d.reference_doctype, d.reference_name) not in update_ref_details_only_for + ): + continue + + ref_details = get_reference_details( + d.reference_doctype, + d.reference_name, + self.party_account_currency, + self.party_type, + self.party, + ) + + # Only update exchange rate when the reference is Journal Entry + if ( + reference_exchange_details + and d.reference_doctype == reference_exchange_details.reference_doctype + and d.reference_name == reference_exchange_details.reference_name + ): + ref_details.update({"exchange_rate": reference_exchange_details.exchange_rate}) + + for field, value in ref_details.items(): + if d.exchange_gain_loss: + # for cases where gain/loss is booked into invoice + # exchange_gain_loss is calculated from invoice & populated + # and row.exchange_rate is already set to payment entry's exchange rate + # refer -> `update_reference_in_payment_entry()` in utils.py continue - ref_details = get_reference_details( - d.reference_doctype, - d.reference_name, - self.party_account_currency, - self.party_type, - self.party, - ) - - # Only update exchange rate when the reference is Journal Entry - if ( - reference_exchange_details - and d.reference_doctype == reference_exchange_details.reference_doctype - and d.reference_name == reference_exchange_details.reference_name - ): - ref_details.update({"exchange_rate": reference_exchange_details.exchange_rate}) - - for field, value in ref_details.items(): - if d.exchange_gain_loss: - # for cases where gain/loss is booked into invoice - # exchange_gain_loss is calculated from invoice & populated - # and row.exchange_rate is already set to payment entry's exchange rate - # refer -> `update_reference_in_payment_entry()` in utils.py - continue - - if field == "exchange_rate" or not d.get(field) or force: - d.db_set(field, value) + if field == "exchange_rate" or not d.get(field) or force: + d.db_set(field, value) def validate_payment_type(self): if self.payment_type not in ("Receive", "Pay", "Internal Transfer"): frappe.throw(_("Payment Type must be one of Receive, Pay and Internal Transfer")) def validate_party_details(self): - if self.party: - if not frappe.db.exists(self.party_type, self.party): - frappe.throw(_("{0} {1} does not exist").format(_(self.party_type), self.party)) + if self.party and not frappe.db.exists(self.party_type, self.party): + frappe.throw(_("{0} {1} does not exist").format(_(self.party_type), self.party)) def set_exchange_rate(self, ref_doc=None): self.set_source_exchange_rate(ref_doc) @@ -529,12 +531,8 @@ class PaymentEntry(AccountsController): if self.paid_from: if self.paid_from_account_currency == self.company_currency: self.source_exchange_rate = 1 - else: - if ref_doc: - if self.paid_from_account_currency == ref_doc.currency: - self.source_exchange_rate = ref_doc.get("exchange_rate") or ref_doc.get( - "conversion_rate" - ) + elif ref_doc and self.paid_from_account_currency == ref_doc.currency: + self.source_exchange_rate = ref_doc.get("exchange_rate") or ref_doc.get("conversion_rate") if not self.source_exchange_rate: self.source_exchange_rate = get_exchange_rate( @@ -545,9 +543,8 @@ class PaymentEntry(AccountsController): if self.paid_from_account_currency == self.paid_to_account_currency: self.target_exchange_rate = self.source_exchange_rate elif self.paid_to and not self.target_exchange_rate: - if ref_doc: - if self.paid_to_account_currency == ref_doc.currency: - self.target_exchange_rate = ref_doc.get("exchange_rate") or ref_doc.get("conversion_rate") + if ref_doc and self.paid_to_account_currency == ref_doc.currency: + self.target_exchange_rate = ref_doc.get("exchange_rate") or ref_doc.get("conversion_rate") if not self.target_exchange_rate: self.target_exchange_rate = get_exchange_rate( @@ -578,63 +575,61 @@ class PaymentEntry(AccountsController): elif d.reference_name: if not frappe.db.exists(d.reference_doctype, d.reference_name): frappe.throw(_("{0} {1} does not exist").format(d.reference_doctype, d.reference_name)) - else: - ref_doc = frappe.get_doc(d.reference_doctype, d.reference_name) - if d.reference_doctype != "Journal Entry": - if self.party != ref_doc.get(scrub(self.party_type)): - frappe.throw( - _("{0} {1} is not associated with {2} {3}").format( - _(d.reference_doctype), d.reference_name, _(self.party_type), self.party - ) - ) - else: - self.validate_journal_entry() + ref_doc = frappe.get_doc(d.reference_doctype, d.reference_name) - if d.reference_doctype in frappe.get_hooks("invoice_doctypes"): - if self.party_type == "Customer": - ref_party_account = ( - get_party_account_based_on_invoice_discounting(d.reference_name) - or ref_doc.debit_to - ) - elif self.party_type == "Supplier": - ref_party_account = ref_doc.credit_to - elif self.party_type == "Employee": - ref_party_account = ref_doc.payable_account - - if ( - ref_party_account != self.party_account - and not self.book_advance_payments_in_separate_party_account - ): - frappe.throw( - _("{0} {1} is associated with {2}, but Party Account is {3}").format( - _(d.reference_doctype), - d.reference_name, - ref_party_account, - self.party_account, - ) - ) - - if ref_doc.doctype == "Purchase Invoice" and ref_doc.get("on_hold"): - frappe.throw( - _("{0} {1} is on hold").format(_(d.reference_doctype), d.reference_name), - title=_("Invalid Purchase Invoice"), - ) - - if ref_doc.docstatus != 1: + if d.reference_doctype != "Journal Entry": + if self.party != ref_doc.get(scrub(self.party_type)): frappe.throw( - _("{0} {1} must be submitted").format(_(d.reference_doctype), d.reference_name) + _("{0} {1} is not associated with {2} {3}").format( + _(d.reference_doctype), d.reference_name, _(self.party_type), self.party + ) ) + else: + self.validate_journal_entry() + + if d.reference_doctype in frappe.get_hooks("invoice_doctypes"): + if self.party_type == "Customer": + ref_party_account = ( + get_party_account_based_on_invoice_discounting(d.reference_name) + or ref_doc.debit_to + ) + elif self.party_type == "Supplier": + ref_party_account = ref_doc.credit_to + elif self.party_type == "Employee": + ref_party_account = ref_doc.payable_account + + if ( + ref_party_account != self.party_account + and not self.book_advance_payments_in_separate_party_account + ): + frappe.throw( + _("{0} {1} is associated with {2}, but Party Account is {3}").format( + _(d.reference_doctype), + d.reference_name, + ref_party_account, + self.party_account, + ) + ) + + if ref_doc.doctype == "Purchase Invoice" and ref_doc.get("on_hold"): + frappe.throw( + _("{0} {1} is on hold").format(_(d.reference_doctype), d.reference_name), + title=_("Invalid Purchase Invoice"), + ) + + if ref_doc.docstatus != 1: + frappe.throw( + _("{0} {1} must be submitted").format(_(d.reference_doctype), d.reference_name) + ) def get_valid_reference_doctypes(self): if self.party_type == "Customer": return ("Sales Order", "Sales Invoice", "Journal Entry", "Dunning", "Payment Entry") + elif self.party_type in ["Shareholder", "Employee"]: + return ("Journal Entry",) elif self.party_type == "Supplier": return ("Purchase Order", "Purchase Invoice", "Journal Entry", "Payment Entry") - elif self.party_type == "Shareholder": - return ("Journal Entry",) - elif self.party_type == "Employee": - return ("Journal Entry",) def validate_paid_invoices(self): no_oustanding_refs = {} @@ -700,37 +695,39 @@ class PaymentEntry(AccountsController): invoice_paid_amount_map = {} for ref in self.get("references"): - if ref.payment_term and ref.reference_name: - key = (ref.payment_term, ref.reference_name, ref.reference_doctype) - invoice_payment_amount_map.setdefault(key, 0.0) - invoice_payment_amount_map[key] += ref.allocated_amount + if not ref.payment_term or not ref.reference_name: + continue - if not invoice_paid_amount_map.get(key): - payment_schedule = frappe.get_all( - "Payment Schedule", - filters={"parent": ref.reference_name}, - fields=[ - "paid_amount", - "payment_amount", - "payment_term", - "discount", - "outstanding", - "discount_type", - ], - ) - for term in payment_schedule: - invoice_key = (term.payment_term, ref.reference_name, ref.reference_doctype) - invoice_paid_amount_map.setdefault(invoice_key, {}) - invoice_paid_amount_map[invoice_key]["outstanding"] = term.outstanding - if not (term.discount_type and term.discount): - continue + key = (ref.payment_term, ref.reference_name, ref.reference_doctype) + invoice_payment_amount_map.setdefault(key, 0.0) + invoice_payment_amount_map[key] += ref.allocated_amount - if term.discount_type == "Percentage": - invoice_paid_amount_map[invoice_key]["discounted_amt"] = ref.total_amount * ( - term.discount / 100 - ) - else: - invoice_paid_amount_map[invoice_key]["discounted_amt"] = term.discount + if not invoice_paid_amount_map.get(key): + payment_schedule = frappe.get_all( + "Payment Schedule", + filters={"parent": ref.reference_name}, + fields=[ + "paid_amount", + "payment_amount", + "payment_term", + "discount", + "outstanding", + "discount_type", + ], + ) + for term in payment_schedule: + invoice_key = (term.payment_term, ref.reference_name, ref.reference_doctype) + invoice_paid_amount_map.setdefault(invoice_key, {}) + invoice_paid_amount_map[invoice_key]["outstanding"] = term.outstanding + if not (term.discount_type and term.discount): + continue + + if term.discount_type == "Percentage": + invoice_paid_amount_map[invoice_key]["discounted_amt"] = ref.total_amount * ( + term.discount / 100 + ) + else: + invoice_paid_amount_map[invoice_key]["discounted_amt"] = term.discount for idx, (key, allocated_amount) in enumerate(invoice_payment_amount_map.items(), 1): if not invoice_paid_amount_map.get(key): @@ -977,14 +974,14 @@ class PaymentEntry(AccountsController): applicable_tax = 0 base_applicable_tax = 0 for tax in self.get("taxes"): - if not tax.included_in_paid_amount: - amount = -1 * tax.tax_amount if tax.add_deduct_tax == "Deduct" else tax.tax_amount - base_amount = ( - -1 * tax.base_tax_amount if tax.add_deduct_tax == "Deduct" else tax.base_tax_amount - ) + if tax.included_in_paid_amount: + continue - applicable_tax += amount - base_applicable_tax += base_amount + amount = -1 * tax.tax_amount if tax.add_deduct_tax == "Deduct" else tax.tax_amount + base_amount = -1 * tax.base_tax_amount if tax.add_deduct_tax == "Deduct" else tax.base_tax_amount + + applicable_tax += amount + base_applicable_tax += base_amount self.paid_amount_after_tax = flt( flt(self.paid_amount) + flt(applicable_tax), self.precision("paid_amount_after_tax") @@ -1648,25 +1645,27 @@ class PaymentEntry(AccountsController): def add_deductions_gl_entries(self, gl_entries): for d in self.get("deductions"): - if d.amount: - account_currency = get_account_currency(d.account) - if account_currency != self.company_currency: - frappe.throw(_("Currency for {0} must be {1}").format(d.account, self.company_currency)) + if not d.amount: + continue - gl_entries.append( - self.get_gl_dict( - { - "account": d.account, - "account_currency": account_currency, - "against": self.party or self.paid_from, - "debit_in_account_currency": d.amount, - "debit_in_transaction_currency": d.amount / self.transaction_exchange_rate, - "debit": d.amount, - "cost_center": d.cost_center, - }, - item=d, - ) + account_currency = get_account_currency(d.account) + if account_currency != self.company_currency: + frappe.throw(_("Currency for {0} must be {1}").format(d.account, self.company_currency)) + + gl_entries.append( + self.get_gl_dict( + { + "account": d.account, + "account_currency": account_currency, + "against": self.party or self.paid_from, + "debit_in_account_currency": d.amount, + "debit_in_transaction_currency": d.amount / self.transaction_exchange_rate, + "debit": d.amount, + "cost_center": d.cost_center, + }, + item=d, ) + ) def get_party_account_for_taxes(self): if self.payment_type == "Receive": From 890abf6b90a25b57a35a76afe6a12ee76f418d49 Mon Sep 17 00:00:00 2001 From: Sagar Vora Date: Sat, 5 Apr 2025 23:04:42 +0530 Subject: [PATCH 1502/1614] perf: reduce query when validating any doc (cherry picked from commit b863296e5331739004ffb8eaffdc77a36515f50b) --- .../transaction_deletion_record.py | 56 +++++++++++-------- .../service_level_agreement.py | 18 +++--- 2 files changed, 42 insertions(+), 32 deletions(-) diff --git a/erpnext/setup/doctype/transaction_deletion_record/transaction_deletion_record.py b/erpnext/setup/doctype/transaction_deletion_record/transaction_deletion_record.py index edb55f5dc46..227df38e116 100644 --- a/erpnext/setup/doctype/transaction_deletion_record/transaction_deletion_record.py +++ b/erpnext/setup/doctype/transaction_deletion_record/transaction_deletion_record.py @@ -10,6 +10,14 @@ from frappe.model.document import Document from frappe.utils import cint, comma_and, create_batch, get_link_to_form from frappe.utils.background_jobs import get_job, is_job_enqueued +LEDGER_ENTRY_DOCTYPES = frozenset( + ( + "GL Entry", + "Payment Ledger Entry", + "Stock Ledger Entry", + ) +) + class TransactionDeletionRecord(Document): # begin: auto-generated types @@ -475,31 +483,31 @@ def get_doctypes_to_be_ignored(): @frappe.whitelist() def is_deletion_doc_running(company: str | None = None, err_msg: str | None = None): - if company: - if running_deletion_jobs := frappe.db.get_all( - "Transaction Deletion Record", - filters={"docstatus": 1, "company": company, "status": "Running"}, - ): - if not err_msg: - err_msg = "" - frappe.throw( - title=_("Deletion in Progress!"), - msg=_("Transaction Deletion Document: {0} is running for this Company. {1}").format( - get_link_to_form("Transaction Deletion Record", running_deletion_jobs[0].name), err_msg - ), - ) + if not company: + return + + running_deletion_job = frappe.db.get_value( + "Transaction Deletion Record", + {"docstatus": 1, "company": company, "status": "Running"}, + "name", + ) + + if not running_deletion_job: + return + + frappe.throw( + title=_("Deletion in Progress!"), + msg=_("Transaction Deletion Document: {0} is running for this Company. {1}").format( + get_link_to_form("Transaction Deletion Record", running_deletion_job), err_msg or "" + ), + ) def check_for_running_deletion_job(doc, method=None): # Check if DocType has 'company' field - if doc.doctype not in ("GL Entry", "Payment Ledger Entry", "Stock Ledger Entry"): - df = qb.DocType("DocField") - if ( - qb.from_(df) - .select(df.parent) - .where((df.fieldname == "company") & (df.parent == doc.doctype)) - .run() - ): - is_deletion_doc_running( - doc.company, _("Cannot make any transactions until the deletion job is completed") - ) + if doc.doctype in LEDGER_ENTRY_DOCTYPES or not doc.meta.has_field("company"): + return + + is_deletion_doc_running( + doc.company, _("Cannot make any transactions until the deletion job is completed") + ) diff --git a/erpnext/support/doctype/service_level_agreement/service_level_agreement.py b/erpnext/support/doctype/service_level_agreement/service_level_agreement.py index 3433a842ea8..26c017bddaa 100644 --- a/erpnext/support/doctype/service_level_agreement/service_level_agreement.py +++ b/erpnext/support/doctype/service_level_agreement/service_level_agreement.py @@ -475,7 +475,7 @@ def get_repeated(values): def get_documents_with_active_service_level_agreement(): - sla_doctypes = frappe.cache().hget("service_level_agreement", "active") + sla_doctypes = frappe.cache.get_value("doctypes_with_active_sla") if sla_doctypes is None: return set_documents_with_active_service_level_agreement() @@ -484,20 +484,22 @@ def get_documents_with_active_service_level_agreement(): def set_documents_with_active_service_level_agreement(): - active = [ + active = frozenset( sla.document_type for sla in frappe.get_all("Service Level Agreement", fields=["document_type"]) - ] - frappe.cache().hset("service_level_agreement", "active", active) + ) + frappe.cache.set_value("doctypes_with_active_sla", active) return active def apply(doc, method=None): # Applies SLA to document on validate + flags = frappe.local.flags + if ( - frappe.flags.in_patch - or frappe.flags.in_migrate - or frappe.flags.in_install - or frappe.flags.in_setup_wizard + flags.in_patch + or flags.in_migrate + or flags.in_install + or flags.in_setup_wizard or doc.doctype not in get_documents_with_active_service_level_agreement() ): return From 8c61639062e9cf88b750cc237836c25919607b1a Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Fri, 4 Apr 2025 13:38:45 +0530 Subject: [PATCH 1503/1614] fix: stock entry repack amount calculation (cherry picked from commit 544ceb93cd23045499246d2f21b1ab6419aeff44) --- .../doctype/stock_entry/test_stock_entry.py | 53 +++++++++++++++++++ erpnext/stock/stock_ledger.py | 6 ++- 2 files changed, 58 insertions(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/stock_entry/test_stock_entry.py b/erpnext/stock/doctype/stock_entry/test_stock_entry.py index fea807264f8..0791877f522 100644 --- a/erpnext/stock/doctype/stock_entry/test_stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/test_stock_entry.py @@ -1907,6 +1907,59 @@ class TestStockEntry(FrappeTestCase): self.assertEqual(sle.stock_value_difference, 100) self.assertEqual(sle.stock_value, 100 * i) + def test_stock_entry_amount(self): + warehouse = "_Test Warehouse - _TC" + rm_item_code = "Test Stock Entry Amount 1" + make_item(rm_item_code, {"is_stock_item": 1}) + + fg_item_code = "Test Repack Stock Entry Amount 1" + make_item(fg_item_code, {"is_stock_item": 1}) + + make_stock_entry( + item_code=rm_item_code, + qty=1, + to_warehouse=warehouse, + basic_rate=200, + posting_date=nowdate(), + ) + + se = make_stock_entry( + item_code=rm_item_code, + qty=1, + purpose="Repack", + basic_rate=100, + do_not_save=True, + ) + + se.items[0].s_warehouse = warehouse + se.append( + "items", + { + "item_code": fg_item_code, + "qty": 1, + "t_warehouse": warehouse, + "uom": "Nos", + "conversion_factor": 1.0, + }, + ) + se.set_stock_entry_type() + se.submit() + + self.assertEqual(se.items[0].amount, 200) + self.assertEqual(se.items[0].basic_amount, 200) + + make_stock_entry( + item_code=rm_item_code, + qty=1, + to_warehouse=warehouse, + basic_rate=300, + posting_date=add_days(nowdate(), -1), + ) + + se.reload() + self.assertEqual(se.items[0].amount, 300) + self.assertEqual(se.items[0].basic_amount, 300) + def make_serialized_item(**args): args = frappe._dict(args) diff --git a/erpnext/stock/stock_ledger.py b/erpnext/stock/stock_ledger.py index 9776486eabc..52f481f1374 100644 --- a/erpnext/stock/stock_ledger.py +++ b/erpnext/stock/stock_ledger.py @@ -1238,7 +1238,11 @@ class update_entries_after: stock_entry.db_update() for d in stock_entry.items: # Update only the row that matches the voucher_detail_no or the row containing the FG/Scrap Item. - if d.name == voucher_detail_no or (not d.s_warehouse and d.t_warehouse): + if ( + d.name == voucher_detail_no + or (not d.s_warehouse and d.t_warehouse) + or stock_entry.purpose in ["Manufacture", "Repack"] + ): d.db_update() def update_rate_on_delivery_and_sales_return(self, sle, outgoing_rate): From 6b3e64c0cc7ac0bfb32eeb20021b0c68d43689a3 Mon Sep 17 00:00:00 2001 From: Sruthy Date: Sun, 23 Mar 2025 05:50:03 +0000 Subject: [PATCH 1504/1614] chore: adjusted dimension placement in Accounts Payable (cherry picked from commit 361a55a703074fe052125d27815f7f6f2d6a8029) --- erpnext/accounts/report/accounts_payable/accounts_payable.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/report/accounts_payable/accounts_payable.js b/erpnext/accounts/report/accounts_payable/accounts_payable.js index c13197613d2..56550ac1fd4 100644 --- a/erpnext/accounts/report/accounts_payable/accounts_payable.js +++ b/erpnext/accounts/report/accounts_payable/accounts_payable.js @@ -164,7 +164,7 @@ frappe.query_reports["Accounts Payable"] = { }, }; -erpnext.utils.add_dimensions("Accounts Payable", 9); +erpnext.utils.add_dimensions("Accounts Payable", 10); function get_party_type_options() { let options = []; From 1128b5f09c89929700b9f5b4a8bdcdf0348bc73f Mon Sep 17 00:00:00 2001 From: barredterra <14891507+barredterra@users.noreply.github.com> Date: Tue, 25 Mar 2025 11:12:35 +0100 Subject: [PATCH 1505/1614] feat(Customer): add Dunning to dashboard (cherry picked from commit 638d825d8c67c23d327ad325a92b0904b8574e2c) --- erpnext/selling/doctype/customer/customer_dashboard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/selling/doctype/customer/customer_dashboard.py b/erpnext/selling/doctype/customer/customer_dashboard.py index 161a3ba0c50..fc3c5cf1ab2 100644 --- a/erpnext/selling/doctype/customer/customer_dashboard.py +++ b/erpnext/selling/doctype/customer/customer_dashboard.py @@ -15,7 +15,7 @@ def get_data(): "transactions": [ {"label": _("Pre Sales"), "items": ["Opportunity", "Quotation"]}, {"label": _("Orders"), "items": ["Sales Order", "Delivery Note", "Sales Invoice"]}, - {"label": _("Payments"), "items": ["Payment Entry", "Bank Account"]}, + {"label": _("Payments"), "items": ["Payment Entry", "Bank Account", "Dunning"]}, { "label": _("Support"), "items": ["Issue", "Maintenance Visit", "Installation Note", "Warranty Claim"], From 1bdfd338166b357bbd48456fb9d9527c68846021 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=C3=BCrker=20Tunal=C4=B1?= Date: Sun, 6 Apr 2025 12:25:42 +0300 Subject: [PATCH 1506/1614] perf: Stock entry cancel is slow Some queries still use "timestamp" function instead of "posting_datetime". In my instance single stock entry cancel ends with request timeout. Using "posting_datetime" field directly improves the situation. cont: https://github.com/frappe/erpnext/pull/46293 (cherry picked from commit ddbb44c6a27b3d8bdcb95be978f98dc4bfe68a63) --- erpnext/controllers/stock_controller.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/erpnext/controllers/stock_controller.py b/erpnext/controllers/stock_controller.py index e892c5d27e2..90959479fd8 100644 --- a/erpnext/controllers/stock_controller.py +++ b/erpnext/controllers/stock_controller.py @@ -1631,6 +1631,8 @@ def is_reposting_pending(): def future_sle_exists(args, sl_entries=None, allow_force_reposting=True): + from erpnext.stock.utils import get_combine_datetime + if allow_force_reposting and frappe.db.get_single_value( "Stock Reposting Settings", "do_reposting_for_each_stock_transaction" ): @@ -1652,14 +1654,15 @@ def future_sle_exists(args, sl_entries=None, allow_force_reposting=True): or_conditions = get_conditions_to_validate_future_sle(sl_entries) + args["posting_datetime"] = get_combine_datetime(args["posting_date"], args["posting_time"]) + data = frappe.db.sql( """ select item_code, warehouse, count(name) as total_row - from `tabStock Ledger Entry` force index (item_warehouse) + from `tabStock Ledger Entry` where ({}) - and timestamp(posting_date, posting_time) - >= timestamp(%(posting_date)s, %(posting_time)s) + and posting_datetime >= %(posting_datetime)s and voucher_no != %(voucher_no)s and is_cancelled = 0 GROUP BY From 23dc9d58720330d5de17b737883d6d3d5ae064dd Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Sun, 6 Apr 2025 09:52:41 +0530 Subject: [PATCH 1507/1614] fix: slow query (cherry picked from commit f82c8ea5eb3551a92ce0f2d54c57404a3cb5139d) # Conflicts: # erpnext/stock/deprecated_serial_batch.py --- erpnext/stock/deprecated_serial_batch.py | 18 ++++++++++-------- .../serial_and_batch_bundle.py | 3 ++- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/erpnext/stock/deprecated_serial_batch.py b/erpnext/stock/deprecated_serial_batch.py index f084c324745..d6ce85ef7cc 100644 --- a/erpnext/stock/deprecated_serial_batch.py +++ b/erpnext/stock/deprecated_serial_batch.py @@ -195,6 +195,7 @@ class DeprecatedBatchNoValuation: @deprecated def set_balance_value_for_non_batchwise_valuation_batches(self): + self.last_sle = self.get_last_sle_for_non_batch() self.set_balance_value_from_sl_entries() self.set_balance_value_from_bundle() @@ -242,11 +243,10 @@ class DeprecatedBatchNoValuation: for d in batch_data: self.available_qty[d.batch_no] += flt(d.batch_qty) - last_sle = self.get_last_sle_for_non_batch() for d in batch_data: if self.available_qty.get(d.batch_no): - self.non_batchwise_balance_value[d.batch_no] += flt(last_sle.stock_value) - self.non_batchwise_balance_qty[d.batch_no] += flt(last_sle.qty_after_transaction) + self.non_batchwise_balance_value[d.batch_no] += flt(self.last_sle.stock_value) + self.non_batchwise_balance_qty[d.batch_no] += flt(self.last_sle.qty_after_transaction) def get_last_sle_for_non_batch(self): from erpnext.stock.utils import get_combine_datetime @@ -285,8 +285,8 @@ class DeprecatedBatchNoValuation: query = query.where(sle.name != self.sle.name) data = query.run(as_dict=True) - return data[0] if data else {} +<<<<<<< HEAD @deprecated def get_last_sle_for_sabb_no_batchwise_valuation(self): sabb = frappe.qb.DocType("Serial and Batch Bundle") @@ -339,6 +339,9 @@ class DeprecatedBatchNoValuation: ) return sle if sle else {} +======= + return data[0] if data else frappe._dict() +>>>>>>> f82c8ea5eb (fix: slow query) @deprecated def set_balance_value_from_bundle(self) -> None: @@ -389,10 +392,9 @@ class DeprecatedBatchNoValuation: for d in batch_data: self.available_qty[d.batch_no] += flt(d.batch_qty) - last_sle = self.get_last_sle_for_sabb_no_batchwise_valuation() - if not last_sle: + if not self.last_sle: return for batch_no in self.available_qty: - self.non_batchwise_balance_value[batch_no] = flt(last_sle.stock_value) - self.non_batchwise_balance_qty[batch_no] = flt(last_sle.qty_after_transaction) + self.non_batchwise_balance_value[batch_no] = flt(self.last_sle.stock_value) + self.non_batchwise_balance_qty[batch_no] = flt(self.last_sle.qty_after_transaction) 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 8502c0cc3cc..8abe5b7e082 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 @@ -2103,7 +2103,8 @@ def get_auto_batch_nos(kwargs): filter_zero_near_batches(available_batches, kwargs) if not kwargs.consider_negative_batches: - available_batches = list(filter(lambda x: x.qty > 0, available_batches)) + precision = frappe.get_precision("Stock Ledger Entry", "actual_qty") + available_batches = [d for d in available_batches if flt(d.qty, precision) > 0] if not qty: return available_batches From 4bcf05222014857e0ff5b2002623e290e88e1e8d Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Sun, 6 Apr 2025 16:25:20 +0530 Subject: [PATCH 1508/1614] chore: fix conflicts --- erpnext/stock/deprecated_serial_batch.py | 55 ------------------------ 1 file changed, 55 deletions(-) diff --git a/erpnext/stock/deprecated_serial_batch.py b/erpnext/stock/deprecated_serial_batch.py index d6ce85ef7cc..a8e17993c30 100644 --- a/erpnext/stock/deprecated_serial_batch.py +++ b/erpnext/stock/deprecated_serial_batch.py @@ -286,62 +286,7 @@ class DeprecatedBatchNoValuation: data = query.run(as_dict=True) -<<<<<<< HEAD - @deprecated - def get_last_sle_for_sabb_no_batchwise_valuation(self): - sabb = frappe.qb.DocType("Serial and Batch Bundle") - sabb_entry = frappe.qb.DocType("Serial and Batch Entry") - batch = frappe.qb.DocType("Batch") - - posting_datetime = CombineDatetime(self.sle.posting_date, self.sle.posting_time) - timestamp_condition = CombineDatetime(sabb.posting_date, sabb.posting_time) < posting_datetime - - if self.sle.creation: - timestamp_condition |= ( - CombineDatetime(sabb.posting_date, sabb.posting_time) == posting_datetime - ) & (sabb.creation < self.sle.creation) - - query = ( - frappe.qb.from_(sabb) - .inner_join(sabb_entry) - .on(sabb.name == sabb_entry.parent) - .inner_join(batch) - .on(sabb_entry.batch_no == batch.name) - .select(sabb.name) - .where( - (sabb.item_code == self.sle.item_code) - & (sabb.warehouse == self.sle.warehouse) - & (sabb_entry.batch_no.isnotnull()) - & (sabb.is_cancelled == 0) - & (sabb.docstatus == 1) - ) - .where(timestamp_condition) - .orderby(sabb.posting_date, order=Order.desc) - .orderby(sabb.posting_time, order=Order.desc) - .orderby(sabb.creation, order=Order.desc) - .limit(1) - ) - - if self.sle.voucher_detail_no: - query = query.where(sabb.voucher_detail_no != self.sle.voucher_detail_no) - - query = query.where(sabb.voucher_type != "Pick List") - - data = query.run(as_dict=True) - if not data: - return {} - - sle = frappe.db.get_value( - "Stock Ledger Entry", - {"serial_and_batch_bundle": data[0].name}, - ["stock_value", "qty_after_transaction"], - as_dict=1, - ) - - return sle if sle else {} -======= return data[0] if data else frappe._dict() ->>>>>>> f82c8ea5eb (fix: slow query) @deprecated def set_balance_value_from_bundle(self) -> None: From c1fe8f600070e1db74eed4d7c9fda3d44c1c7eac Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Sun, 6 Apr 2025 21:32:17 +0530 Subject: [PATCH 1509/1614] fix: pos closed dialog on pos closing entry (backport #46881) (#46882) fix: pos closed dialog on pos closing entry (#46881) (cherry picked from commit 21954b9f9cafc966ed0cd13fe6d7a6c4501d0d5b) Co-authored-by: Diptanil Saha --- erpnext/selling/page/point_of_sale/pos_controller.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/selling/page/point_of_sale/pos_controller.js b/erpnext/selling/page/point_of_sale/pos_controller.js index d77381bf309..d86bf92177f 100644 --- a/erpnext/selling/page/point_of_sale/pos_controller.js +++ b/erpnext/selling/page/point_of_sale/pos_controller.js @@ -151,7 +151,8 @@ erpnext.PointOfSale.Controller = class { }); frappe.realtime.on(`poe_${this.pos_opening}_closed`, (data) => { - if (data) { + const route = frappe.get_route_str(); + if (data && route == "point-of-sale") { frappe.dom.freeze(); frappe.msgprint({ title: __("POS Closed"), From ab52524f12a2e937e3e8d8ec33851d363bf3a390 Mon Sep 17 00:00:00 2001 From: rethik Date: Wed, 26 Mar 2025 11:10:08 +0530 Subject: [PATCH 1510/1614] fix: use docstatus for status filter (cherry picked from commit 31e59354c9b4425612cd9bb1a4e260f6eab13b01) --- .../purchase_order/purchase_order_list.js | 20 +++++++++++++++---- .../doctype/sales_order/sales_order_list.js | 12 +++++++++-- .../delivery_note/delivery_note_list.js | 4 ++-- .../material_request/material_request_list.js | 2 +- .../purchase_receipt/purchase_receipt_list.js | 8 ++++---- 5 files changed, 33 insertions(+), 13 deletions(-) diff --git a/erpnext/buying/doctype/purchase_order/purchase_order_list.js b/erpnext/buying/doctype/purchase_order/purchase_order_list.js index 3c357c0a933..8dc84e23816 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order_list.js +++ b/erpnext/buying/doctype/purchase_order/purchase_order_list.js @@ -22,15 +22,27 @@ frappe.listview_settings["Purchase Order"] = { return [ __("To Receive and Bill"), "orange", - "per_received,<,100|per_billed,<,100|status,!=,Closed", + "per_received,<,100|per_billed,<,100|status,!=,Closed|docstatus,=,1", ]; } else { - return [__("To Receive"), "orange", "per_received,<,100|per_billed,=,100|status,!=,Closed"]; + return [ + __("To Receive"), + "orange", + "per_received,<,100|per_billed,=,100|status,!=,Closed|docstatus,=,1", + ]; } } else if (flt(doc.per_received) >= 100 && flt(doc.per_billed) < 100 && doc.status !== "Closed") { - return [__("To Bill"), "orange", "per_received,=,100|per_billed,<,100|status,!=,Closed"]; + return [ + __("To Bill"), + "orange", + "per_received,=,100|per_billed,<,100|status,!=,Closed|docstatus,=,1", + ]; } else if (flt(doc.per_received) >= 100 && flt(doc.per_billed) == 100 && doc.status !== "Closed") { - return [__("Completed"), "green", "per_received,=,100|per_billed,=,100|status,!=,Closed"]; + return [ + __("Completed"), + "green", + "per_received,=,100|per_billed,=,100|status,!=,Closed|docstatus,=,1", + ]; } }, onload: function (listview) { diff --git a/erpnext/selling/doctype/sales_order/sales_order_list.js b/erpnext/selling/doctype/sales_order/sales_order_list.js index c9bd4fc0f9d..6bad47c2693 100644 --- a/erpnext/selling/doctype/sales_order/sales_order_list.js +++ b/erpnext/selling/doctype/sales_order/sales_order_list.js @@ -23,10 +23,18 @@ frappe.listview_settings["Sales Order"] = { } else if (!doc.skip_delivery_note && flt(doc.per_delivered) < 100) { if (frappe.datetime.get_diff(doc.delivery_date) < 0) { // not delivered & overdue - return [__("Overdue"), "red", "per_delivered,<,100|delivery_date,<,Today|status,!=,Closed"]; + return [ + __("Overdue"), + "red", + "per_delivered,<,100|delivery_date,<,Today|status,!=,Closed|docstatus,=,1", + ]; } else if (flt(doc.grand_total) === 0) { // not delivered (zeroount order) - return [__("To Deliver"), "orange", "per_delivered,<,100|grand_total,=,0|status,!=,Closed"]; + return [ + __("To Deliver"), + "orange", + "per_delivered,<,100|grand_total,=,0|status,!=,Closed|docstatus,=,1", + ]; } else if (flt(doc.per_billed) < 100) { // not delivered & not billed return [ diff --git a/erpnext/stock/doctype/delivery_note/delivery_note_list.js b/erpnext/stock/doctype/delivery_note/delivery_note_list.js index dd09f6cfcf5..af40fd6a8a2 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note_list.js +++ b/erpnext/stock/doctype/delivery_note/delivery_note_list.js @@ -19,9 +19,9 @@ frappe.listview_settings["Delivery Note"] = { } else if (doc.status === "Return Issued") { return [__("Return Issued"), "grey", "status,=,Return Issued"]; } else if (flt(doc.per_billed, 2) < 100) { - return [__("To Bill"), "orange", "per_billed,<,100"]; + return [__("To Bill"), "orange", "per_billed,<,100|docstatus,=,1"]; } else if (flt(doc.per_billed, 2) === 100) { - return [__("Completed"), "green", "per_billed,=,100"]; + return [__("Completed"), "green", "per_billed,=,100|docstatus,=,1"]; } }, onload: function (doclist) { diff --git a/erpnext/stock/doctype/material_request/material_request_list.js b/erpnext/stock/doctype/material_request/material_request_list.js index 57332aa7730..b20ac15f136 100644 --- a/erpnext/stock/doctype/material_request/material_request_list.js +++ b/erpnext/stock/doctype/material_request/material_request_list.js @@ -13,7 +13,7 @@ frappe.listview_settings["Material Request"] = { return [__("Completed"), "green"]; } } else if (doc.docstatus == 1 && flt(doc.per_ordered, precision) == 0) { - return [__("Pending"), "orange", "per_ordered,=,0"]; + return [__("Pending"), "orange", "per_ordered,=,0|docstatus,=,1"]; } else if ( doc.docstatus == 1 && flt(doc.per_ordered, precision) < 100 && diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt_list.js b/erpnext/stock/doctype/purchase_receipt/purchase_receipt_list.js index fc4aabdaa18..e295127e6fc 100644 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt_list.js +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt_list.js @@ -16,13 +16,13 @@ frappe.listview_settings["Purchase Receipt"] = { } else if (doc.status === "Closed") { return [__("Closed"), "green", "status,=,Closed"]; } else if (flt(doc.per_returned, 2) === 100) { - return [__("Return Issued"), "grey", "per_returned,=,100"]; + return [__("Return Issued"), "grey", "per_returned,=,100|docstatus,=,1"]; } else if (flt(doc.grand_total) !== 0 && flt(doc.per_billed, 2) == 0) { - return [__("To Bill"), "orange", "per_billed,<,100"]; + return [__("To Bill"), "orange", "per_billed,<,100|docstatus,=,1"]; } else if (flt(doc.per_billed, 2) > 0 && flt(doc.per_billed, 2) < 100) { - return [__("Partly Billed"), "yellow", "per_billed,<,100"]; + return [__("Partly Billed"), "yellow", "per_billed,<,100|docstatus,=,1"]; } else if (flt(doc.grand_total) === 0 || flt(doc.per_billed, 2) === 100) { - return [__("Completed"), "green", "per_billed,=,100"]; + return [__("Completed"), "green", "per_billed,=,100|docstatus,=,1"]; } }, From 13f1afa14127cb3fb2e3772857ffb24787591b26 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Tue, 1 Apr 2025 14:15:47 +0530 Subject: [PATCH 1511/1614] fix: remove all serial/batch fields when use button is unselected (cherry picked from commit 22ffdb9e7704d022b8347fff38d4f34140045835) --- erpnext/public/js/controllers/transaction.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 8b7487c612e..da3c1ec6d33 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -251,6 +251,15 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe } } + use_serial_batch_fields(frm, cdt, cdn) { + const item = locals[cdt][cdn]; + if (!item.use_serial_batch_fields) { + frappe.model.set_value(cdt, cdn, "serial_no", ""); + frappe.model.set_value(cdt, cdn, "batch_no", ""); + frappe.model.set_value(cdt, cdn, "rejected_serial_no", ""); + } + } + set_fields_onload_for_line_item() { if (this.frm.is_new() && this.frm.doc?.items) { this.frm.doc.items.forEach(item => { From 26f93f57b8e488fb8d340631021f7663948734e7 Mon Sep 17 00:00:00 2001 From: venkat102 Date: Thu, 27 Mar 2025 01:04:38 +0530 Subject: [PATCH 1512/1614] fix: include auto_reconcile_vouchers flag in background job (cherry picked from commit 35fbbc20576fa9533cb7862b11b1ff7c949e61e4) --- .../bank_reconciliation_tool/bank_reconciliation_tool.py | 4 ++-- 1 file changed, 2 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 d47cc7b5968..7f97c3677bd 100644 --- a/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py +++ b/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py @@ -374,8 +374,6 @@ def auto_reconcile_vouchers( from_reference_date=None, to_reference_date=None, ): - frappe.flags.auto_reconcile_vouchers = True - bank_transactions = get_bank_transactions(bank_account) if len(bank_transactions) > 10: @@ -404,6 +402,8 @@ def auto_reconcile_vouchers( def start_auto_reconcile( bank_transactions, from_date, to_date, filter_by_reference_date, from_reference_date, to_reference_date ): + frappe.flags.auto_reconcile_vouchers = True + reconciled, partially_reconciled = set(), set() for transaction in bank_transactions: linked_payments = get_linked_payments( From e2c8ed2afdc2cb169003cce03665ba72528709eb Mon Sep 17 00:00:00 2001 From: MohsinAli Date: Sat, 29 Mar 2025 11:03:24 +0530 Subject: [PATCH 1513/1614] fix: correct mapping(schedule_date) sales order to material request (cherry picked from commit 732e9502651256999e33cb2e1accb69cbc5f25ac) --- erpnext/selling/doctype/sales_order/sales_order.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py index 4a026395425..220dafb2e45 100755 --- a/erpnext/selling/doctype/sales_order/sales_order.py +++ b/erpnext/selling/doctype/sales_order/sales_order.py @@ -875,7 +875,7 @@ def make_material_request(source_name, target_doc=None): "field_map": { "name": "sales_order_item", "parent": "sales_order", - "delivery_date": "required_by", + "delivery_date": "schedule_date", "bom_no": "bom_no", }, "condition": lambda item: not frappe.db.exists( From 1b9980bb86225213949e3db2681ece877c23b7fd Mon Sep 17 00:00:00 2001 From: venkat102 Date: Fri, 21 Mar 2025 13:17:32 +0530 Subject: [PATCH 1514/1614] fix(payment term): allocate payment amount when payment term is fetched from order (cherry picked from commit 5618859bd8e7a11f6bdf3a9be123c2d742aaa343) --- erpnext/controllers/accounts_controller.py | 25 ++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 2e90c446ade..184c0792dda 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -2328,7 +2328,7 @@ class AccountsController(TransactionBase): and automatically_fetch_payment_terms and self.linked_order_has_payment_terms(po_or_so, fieldname, doctype) ): - self.fetch_payment_terms_from_order(po_or_so, doctype) + self.fetch_payment_terms_from_order(po_or_so, doctype, grand_total, base_grand_total) if self.get("payment_terms_template"): self.ignore_default_payment_terms_template = 1 elif self.get("payment_terms_template"): @@ -2372,7 +2372,7 @@ class AccountsController(TransactionBase): d.payment_amount * self.get("conversion_rate"), d.precision("base_payment_amount") ) else: - self.fetch_payment_terms_from_order(po_or_so, doctype) + self.fetch_payment_terms_from_order(po_or_so, doctype, grand_total, base_grand_total) self.ignore_default_payment_terms_template = 1 def get_order_details(self): @@ -2410,7 +2410,7 @@ class AccountsController(TransactionBase): def linked_order_has_payment_schedule(self, po_or_so): return frappe.get_all("Payment Schedule", filters={"parent": po_or_so}) - def fetch_payment_terms_from_order(self, po_or_so, po_or_so_doctype): + def fetch_payment_terms_from_order(self, po_or_so, po_or_so_doctype, grand_total, base_grand_total): """ Fetch Payment Terms from Purchase/Sales Order on creating a new Purchase/Sales Invoice. """ @@ -2426,12 +2426,25 @@ class AccountsController(TransactionBase): "invoice_portion": schedule.invoice_portion, "mode_of_payment": schedule.mode_of_payment, "description": schedule.description, - "payment_amount": schedule.payment_amount, - "base_payment_amount": schedule.base_payment_amount, - "outstanding": schedule.outstanding, "paid_amount": schedule.paid_amount, } + if payment_schedule["invoice_portion"]: + payment_schedule["payment_amount"] = flt( + grand_total * flt(payment_schedule["invoice_portion"]) / 100, + schedule.precision("payment_amount"), + ) + payment_schedule["base_payment_amount"] = flt( + base_grand_total * flt(payment_schedule["invoice_portion"]) / 100, + schedule.precision("base_payment_amount"), + ) + payment_schedule["outstanding"] = payment_schedule["payment_amount"] + else: + payment_schedule["base_payment_amount"] = flt( + schedule.base_payment_amount * self.get("conversion_rate"), + schedule.precision("base_payment_amount"), + ) + if schedule.discount_type == "Percentage": payment_schedule["discount_type"] = schedule.discount_type payment_schedule["discount"] = schedule.discount From 3b66c4847964879313b22660a2e0f3071c1c2dd1 Mon Sep 17 00:00:00 2001 From: venkat102 Date: Fri, 21 Mar 2025 13:18:19 +0530 Subject: [PATCH 1515/1614] test: validate payment schedule based on invoice amount (cherry picked from commit 77852965736add87613d2c65a4fee27de8d681f8) --- .../accounts/doctype/purchase_invoice/test_purchase_invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py index b8930963144..084a262a890 100644 --- a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py @@ -2094,7 +2094,7 @@ class TestPurchaseInvoice(FrappeTestCase, StockTestMixin): 1, ) pi = make_pi_from_pr(pr.name) - self.assertEqual(pi.payment_schedule[0].payment_amount, 2500) + self.assertEqual(pi.payment_schedule[0].payment_amount, 1000) automatically_fetch_payment_terms(enable=0) frappe.db.set_value( From ea289a40fb4656bbac9ba7cc49e62a1caca4bd38 Mon Sep 17 00:00:00 2001 From: venkat102 Date: Thu, 27 Mar 2025 22:28:20 +0530 Subject: [PATCH 1516/1614] fix: update payment amount if automatically_fetch_payment_terms is enabled (cherry picked from commit 7bf1a39861e2841c04ea7818de6d03028a095fee) --- erpnext/controllers/accounts_controller.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 184c0792dda..bcaf8f897f9 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -2328,7 +2328,9 @@ class AccountsController(TransactionBase): and automatically_fetch_payment_terms and self.linked_order_has_payment_terms(po_or_so, fieldname, doctype) ): - self.fetch_payment_terms_from_order(po_or_so, doctype, grand_total, base_grand_total) + self.fetch_payment_terms_from_order( + po_or_so, doctype, grand_total, base_grand_total, automatically_fetch_payment_terms + ) if self.get("payment_terms_template"): self.ignore_default_payment_terms_template = 1 elif self.get("payment_terms_template"): @@ -2372,7 +2374,9 @@ class AccountsController(TransactionBase): d.payment_amount * self.get("conversion_rate"), d.precision("base_payment_amount") ) else: - self.fetch_payment_terms_from_order(po_or_so, doctype, grand_total, base_grand_total) + self.fetch_payment_terms_from_order( + po_or_so, doctype, grand_total, base_grand_total, automatically_fetch_payment_terms + ) self.ignore_default_payment_terms_template = 1 def get_order_details(self): @@ -2410,7 +2414,9 @@ class AccountsController(TransactionBase): def linked_order_has_payment_schedule(self, po_or_so): return frappe.get_all("Payment Schedule", filters={"parent": po_or_so}) - def fetch_payment_terms_from_order(self, po_or_so, po_or_so_doctype, grand_total, base_grand_total): + def fetch_payment_terms_from_order( + self, po_or_so, po_or_so_doctype, grand_total, base_grand_total, automatically_fetch_payment_terms + ): """ Fetch Payment Terms from Purchase/Sales Order on creating a new Purchase/Sales Invoice. """ @@ -2429,7 +2435,7 @@ class AccountsController(TransactionBase): "paid_amount": schedule.paid_amount, } - if payment_schedule["invoice_portion"]: + if automatically_fetch_payment_terms: payment_schedule["payment_amount"] = flt( grand_total * flt(payment_schedule["invoice_portion"]) / 100, schedule.precision("payment_amount"), From 3d57916832cd3bfbe3e6dd7d35f7a184d2d8921c Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 7 Apr 2025 11:28:39 +0530 Subject: [PATCH 1517/1614] chore: resolve conflict --- erpnext/accounts/workspace/accounting/accounting.json | 4 ---- erpnext/buying/workspace/buying/buying.json | 4 ---- .../workspace/manufacturing/manufacturing.json | 4 ---- erpnext/projects/workspace/projects/projects.json | 4 ---- erpnext/selling/workspace/selling/selling.json | 9 --------- erpnext/stock/workspace/stock/stock.json | 4 ---- 6 files changed, 29 deletions(-) diff --git a/erpnext/accounts/workspace/accounting/accounting.json b/erpnext/accounts/workspace/accounting/accounting.json index ed081102aa3..c6a7fc6d84c 100644 --- a/erpnext/accounts/workspace/accounting/accounting.json +++ b/erpnext/accounts/workspace/accounting/accounting.json @@ -621,11 +621,7 @@ "doc_view": "List", "label": "Learn Accounting", "type": "URL", -<<<<<<< HEAD - "url": "https://frappe.school/courses/erpnext-accounting?utm_source=in_app" -======= "url": "https://school.frappe.io/lms/courses/erpnext-accounting?utm_source=in_app" ->>>>>>> ef4f662c31 (chore: update links to Frappe School (#46823)) }, { "label": "Chart of Accounts", diff --git a/erpnext/buying/workspace/buying/buying.json b/erpnext/buying/workspace/buying/buying.json index 54f44ea13da..db5c7d046db 100644 --- a/erpnext/buying/workspace/buying/buying.json +++ b/erpnext/buying/workspace/buying/buying.json @@ -537,11 +537,7 @@ "doc_view": "List", "label": "Learn Procurement", "type": "URL", -<<<<<<< HEAD - "url": "https://frappe.school/courses/procurement?utm_source=in_app" -======= "url": "https://school.frappe.io/lms/courses/procurement?utm_source=in_app" ->>>>>>> ef4f662c31 (chore: update links to Frappe School (#46823)) }, { "color": "Yellow", diff --git a/erpnext/manufacturing/workspace/manufacturing/manufacturing.json b/erpnext/manufacturing/workspace/manufacturing/manufacturing.json index 08befc61ef0..320db68e037 100644 --- a/erpnext/manufacturing/workspace/manufacturing/manufacturing.json +++ b/erpnext/manufacturing/workspace/manufacturing/manufacturing.json @@ -336,11 +336,7 @@ "doc_view": "List", "label": "Learn Manufacturing", "type": "URL", -<<<<<<< HEAD - "url": "https://frappe.school/courses/manufacturing?utm_source=in_app" -======= "url": "https://school.frappe.io/lms/courses/manufacturing?utm_source=in_app" ->>>>>>> ef4f662c31 (chore: update links to Frappe School (#46823)) }, { "color": "Grey", diff --git a/erpnext/projects/workspace/projects/projects.json b/erpnext/projects/workspace/projects/projects.json index 9effb1cbda6..19c94bc8f90 100644 --- a/erpnext/projects/workspace/projects/projects.json +++ b/erpnext/projects/workspace/projects/projects.json @@ -210,11 +210,7 @@ "doc_view": "List", "label": "Learn Project Management", "type": "URL", -<<<<<<< HEAD - "url": "https://frappe.school/courses/project-management?utm_source=in_app" -======= "url": "https://school.frappe.io/lms/courses/project-management?utm_source=in_app" ->>>>>>> ef4f662c31 (chore: update links to Frappe School (#46823)) }, { "color": "Blue", diff --git a/erpnext/selling/workspace/selling/selling.json b/erpnext/selling/workspace/selling/selling.json index a392574e15c..d17b8438eae 100644 --- a/erpnext/selling/workspace/selling/selling.json +++ b/erpnext/selling/workspace/selling/selling.json @@ -639,11 +639,7 @@ "doc_view": "List", "label": "Learn Sales Management", "type": "URL", -<<<<<<< HEAD - "url": "https://frappe.school/courses/sales-management-course?utm_source=in_app" -======= "url": "https://school.frappe.io/lms/courses/sales-management-course?utm_source=in_app" ->>>>>>> ef4f662c31 (chore: update links to Frappe School (#46823)) }, { "label": "Point of Sale", @@ -680,11 +676,6 @@ "type": "Dashboard" } ], -<<<<<<< HEAD - "title": "Selling" -} -======= "title": "Selling", "type": "Workspace" } ->>>>>>> ef4f662c31 (chore: update links to Frappe School (#46823)) diff --git a/erpnext/stock/workspace/stock/stock.json b/erpnext/stock/workspace/stock/stock.json index 9a9e3d9e5c3..2f8435ac702 100644 --- a/erpnext/stock/workspace/stock/stock.json +++ b/erpnext/stock/workspace/stock/stock.json @@ -802,11 +802,7 @@ "doc_view": "List", "label": "Learn Inventory Management", "type": "URL", -<<<<<<< HEAD - "url": "https://frappe.school/courses/inventory-management?utm_source=in_app" -======= "url": "https://school.frappe.io/lms/courses/inventory-management?utm_source=in_app" ->>>>>>> ef4f662c31 (chore: update links to Frappe School (#46823)) }, { "color": "Yellow", From 2bf44dc326ea285bd9a65daa7ea6a7269ac8629d Mon Sep 17 00:00:00 2001 From: Dany Robert Date: Wed, 26 Mar 2025 11:37:35 +0530 Subject: [PATCH 1518/1614] fix: update posting date before running validations (cherry picked from commit d04dbd8ed92f2c4be34657dc03476d310ecab604) --- erpnext/accounts/doctype/sales_invoice/sales_invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 673a65dae55..a57e313e2e9 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -267,8 +267,8 @@ class SalesInvoice(SellingController): self.indicator_title = _("Paid") def validate(self): - super().validate() self.validate_auto_set_posting_time() + super().validate() if not (self.is_pos or self.is_debit_note): self.so_dn_required() From ba1e7e17fbcbdb4aeff41cca8ee54bae7871b364 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Mon, 7 Apr 2025 16:28:52 +0530 Subject: [PATCH 1519/1614] fix: remove against_voucher from General Ledger Report (cherry picked from commit 6d1f119a0faebdd0945aa565ef0c71b7a8484aa7) --- .../report/general_ledger/general_ledger.js | 5 ----- .../report/general_ledger/general_ledger.py | 14 -------------- 2 files changed, 19 deletions(-) diff --git a/erpnext/accounts/report/general_ledger/general_ledger.js b/erpnext/accounts/report/general_ledger/general_ledger.js index 54d6fb2e2f6..2f142fc76b2 100644 --- a/erpnext/accounts/report/general_ledger/general_ledger.js +++ b/erpnext/accounts/report/general_ledger/general_ledger.js @@ -52,11 +52,6 @@ frappe.query_reports["General Ledger"] = { frappe.query_report.set_filter_value("group_by", "Group by Voucher (Consolidated)"); }, }, - { - fieldname: "against_voucher_no", - label: __("Against Voucher No"), - fieldtype: "Data", - }, { fieldtype: "Break", }, diff --git a/erpnext/accounts/report/general_ledger/general_ledger.py b/erpnext/accounts/report/general_ledger/general_ledger.py index a62ba2e3732..73a16e730ac 100644 --- a/erpnext/accounts/report/general_ledger/general_ledger.py +++ b/erpnext/accounts/report/general_ledger/general_ledger.py @@ -224,9 +224,6 @@ def get_conditions(filters): if filters.get("voucher_no"): conditions.append("voucher_no=%(voucher_no)s") - if filters.get("against_voucher_no"): - conditions.append("against_voucher=%(against_voucher_no)s") - if filters.get("ignore_err"): err_journals = frappe.db.get_all( "Journal Entry", @@ -490,9 +487,6 @@ def get_accountwise_gle(filters, accounting_dimensions, gl_entries, gle_map, tot data[key][rev_dr_or_cr] = 0 data[key][rev_dr_or_cr + "_in_account_currency"] = 0 - if data[key].against_voucher and gle.against_voucher: - data[key].against_voucher += ", " + gle.against_voucher - from_date, to_date = getdate(filters.from_date), getdate(filters.to_date) show_opening_entries = filters.get("show_opening_entries") @@ -695,14 +689,6 @@ def get_columns(filters): columns.extend( [ - {"label": _("Against Voucher Type"), "fieldname": "against_voucher_type", "width": 100}, - { - "label": _("Against Voucher"), - "fieldname": "against_voucher", - "fieldtype": "Dynamic Link", - "options": "against_voucher_type", - "width": 100, - }, {"label": _("Supplier Invoice No"), "fieldname": "bill_no", "fieldtype": "Data", "width": 100}, ] ) From 95cc2827c6fa76bb84e859e75b974c1317ca7c69 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Mon, 7 Apr 2025 14:09:52 +0530 Subject: [PATCH 1520/1614] fix: empty party filter on change of party type in General Ledger Report. (cherry picked from commit 9c68bc22fafa8fa988c1ff5c13e1532d63ab87e4) --- erpnext/accounts/report/general_ledger/general_ledger.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/report/general_ledger/general_ledger.js b/erpnext/accounts/report/general_ledger/general_ledger.js index 2f142fc76b2..bcd850c0896 100644 --- a/erpnext/accounts/report/general_ledger/general_ledger.js +++ b/erpnext/accounts/report/general_ledger/general_ledger.js @@ -61,7 +61,7 @@ frappe.query_reports["General Ledger"] = { fieldtype: "Autocomplete", options: Object.keys(frappe.boot.party_account_types), on_change: function () { - frappe.query_report.set_filter_value("party", ""); + frappe.query_report.set_filter_value("party", []); }, }, { From 999ab28bf089aac0a0558c6cf149b14564b96bc6 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 7 Apr 2025 20:54:23 +0530 Subject: [PATCH 1521/1614] fix: validate if pos is opened before pos invoice creation (backport #46907) (#46910) fix: validate if pos is opened before pos invoice creation (#46907) * fix: validate if pos is opened before pos invoice creation * fix: added title on throw dialog * test: fixed failing test (cherry picked from commit 3de1b22480170bcb483dd18206e7f1688363de20) Co-authored-by: Diptanil Saha --- erpnext/accounts/doctype/pos_invoice/pos_invoice.py | 13 +++++++++++++ .../doctype/pos_invoice/test_pos_invoice.py | 6 ++++++ 2 files changed, 19 insertions(+) diff --git a/erpnext/accounts/doctype/pos_invoice/pos_invoice.py b/erpnext/accounts/doctype/pos_invoice/pos_invoice.py index a8a733ac42c..6933b04d2e1 100644 --- a/erpnext/accounts/doctype/pos_invoice/pos_invoice.py +++ b/erpnext/accounts/doctype/pos_invoice/pos_invoice.py @@ -196,6 +196,7 @@ class POSInvoice(SalesInvoice): # run on validate method of selling controller super(SalesInvoice, self).validate() + self.validate_pos_opening_entry() self.validate_auto_set_posting_time() self.validate_mode_of_payment() self.validate_uom_is_integer("stock_uom", "stock_qty") @@ -320,6 +321,18 @@ class POSInvoice(SalesInvoice): _("Payment related to {0} is not completed").format(pay.mode_of_payment) ) + def validate_pos_opening_entry(self): + opening_entries = frappe.get_list( + "POS Opening Entry", filters={"pos_profile": self.pos_profile, "status": "Open", "docstatus": 1} + ) + if len(opening_entries) == 0: + frappe.throw( + title=_("POS Opening Entry Missing"), + msg=_("No open POS Opening Entry found for POS Profile {0}.").format( + frappe.bold(self.pos_profile) + ), + ) + def validate_stock_availablility(self): if self.is_return: return diff --git a/erpnext/accounts/doctype/pos_invoice/test_pos_invoice.py b/erpnext/accounts/doctype/pos_invoice/test_pos_invoice.py index 09c9443bdd9..cfe805be4ce 100644 --- a/erpnext/accounts/doctype/pos_invoice/test_pos_invoice.py +++ b/erpnext/accounts/doctype/pos_invoice/test_pos_invoice.py @@ -26,6 +26,12 @@ class TestPOSInvoice(unittest.TestCase): make_stock_entry(target="_Test Warehouse - _TC", item_code="_Test Item", qty=800, basic_rate=100) frappe.db.sql("delete from `tabTax Rule`") + from erpnext.accounts.doctype.pos_closing_entry.test_pos_closing_entry import init_user_and_profile + from erpnext.accounts.doctype.pos_opening_entry.test_pos_opening_entry import create_opening_entry + + cls.test_user, cls.pos_profile = init_user_and_profile() + create_opening_entry(cls.pos_profile, cls.test_user) + def tearDown(self): if frappe.session.user != "Administrator": frappe.set_user("Administrator") From 8b11d13cd4c3b155ebfebe7ad45dbb3e80500685 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 7 Apr 2025 21:03:20 +0530 Subject: [PATCH 1522/1614] fix: pos opening entry's status not getting updated on cancel (backport #46909) (#46911) fix: pos opening entry's status not getting updated on cancel (#46909) (cherry picked from commit 6fae98afda0a428924a1347ff16675bc35562076) Co-authored-by: Diptanil Saha --- .../accounts/doctype/pos_opening_entry/pos_opening_entry.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/accounts/doctype/pos_opening_entry/pos_opening_entry.py b/erpnext/accounts/doctype/pos_opening_entry/pos_opening_entry.py index 10b07c2c800..7f1890ceabf 100644 --- a/erpnext/accounts/doctype/pos_opening_entry/pos_opening_entry.py +++ b/erpnext/accounts/doctype/pos_opening_entry/pos_opening_entry.py @@ -70,3 +70,6 @@ class POSOpeningEntry(StatusUpdater): def on_submit(self): self.set_status(update=True) + + def on_cancel(self): + self.set_status(update=True) From 8276e8e8b37cc964ae8ba5b5f6448ec01a57c121 Mon Sep 17 00:00:00 2001 From: Raffael Meyer <14891507+barredterra@users.noreply.github.com> Date: Tue, 8 Apr 2025 02:39:04 +0200 Subject: [PATCH 1523/1614] chore: fix german translations (#46912) --- erpnext/translations/de.csv | 601 ++++++++++++++++++------------------ 1 file changed, 300 insertions(+), 301 deletions(-) diff --git a/erpnext/translations/de.csv b/erpnext/translations/de.csv index a093970cbdb..f2d4e5443ed 100644 --- a/erpnext/translations/de.csv +++ b/erpnext/translations/de.csv @@ -508,9 +508,9 @@ Close Loan,Darlehen schließen, Close the POS,Schließen Sie die Kasse, Closed,Geschlossen, Closed order cannot be cancelled. Unclose to cancel.,Geschlosser Auftrag kann nicht abgebrochen werden. Bitte wiedereröffnen um abzubrechen., -Closing (Cr),Schlußstand (Haben), -Closing (Dr),Schlußstand (Soll), -Closing (Opening + Total),Schließen (Eröffnung + Gesamt), +Closing (Cr),Schlußstand (H), +Closing (Dr),Schlußstand (S), +Closing (Opening + Total),Schlußstand (Anfangssstand + Summe), Closing Account {0} must be of type Liability / Equity,Abschlußkonto {0} muss vom Typ Verbindlichkeiten/Eigenkapital sein, Closing Balance,Schlussbilanz, Code,Code, @@ -598,7 +598,7 @@ Course Code: ,Kurscode:, Course Enrollment {0} does not exists,Die Kursanmeldung {0} existiert nicht, Course Schedule,Kurstermine, Course: ,Kurs:, -Cr,Haben, +Cr,H, Create,Erstellen, Create BOM,Stückliste anlegen, Create Delivery Trip,Erstelle Auslieferungsfahrt, @@ -647,8 +647,8 @@ Creating Fees,Gebühren anlegen, Creating student groups,Erstelle Studentengruppen, Creating {0} Invoice,{0} Rechnung erstellen, Credit,Haben, -Credit ({0}),Guthaben ({0}), -Credit Account,Guthabenkonto, +Credit ({0}),Haben ({0}), +Credit Account,Haben-Konto, Credit Balance,Verfügbarer Kredit, Credit Card,Kreditkarte, Credit Days cannot be a negative number,Kredit-Tage können keine negative Zahl sein, @@ -712,14 +712,14 @@ Date of Transaction,Datum der Transaktion, Day,Tag, Debit,Soll, Debit ({0}),Soll ({0}), -Debit Account,Sollkonto, +Debit Account,Soll-Konto, Debit Note,Lastschrift, Debit Note Amount,Lastschriftbetrag, Debit Note Issued,Lastschrift ausgestellt am, -Debit To is required,Debit Um erforderlich, +Debit To is required,Forderungskonto ist erforderlich, Debit and Credit not equal for {0} #{1}. Difference is {2}.,Soll und Haben nicht gleich für {0} #{1}. Unterschied ist {2}., -Debtors,Schuldner, -Debtors ({0}),Schuldnern ({0}), +Debtors,Debitoren, +Debtors ({0}),Debitoren ({0}), Declare Lost,Für verloren erklären, Default Activity Cost exists for Activity Type - {0},Es gibt Standard-Aktivitätskosten für Aktivitätsart - {0}, Default BOM ({0}) must be active for this item or its template,Standardstückliste ({0}) muss für diesen Artikel oder dessen Vorlage aktiv sein, @@ -1628,7 +1628,7 @@ Open Item {0},Offene-Posten {0}, Open Notifications,Offene Benachrichtigungen, Open Orders,Offene Bestellungen, Open a new ticket,Öffnen Sie ein neues Ticket, -Opening,Eröffnung, +Opening,Anfangssstand, Opening (Cr),Anfangssstand (Haben), Opening (Dr),Anfangsstand (Soll), Opening Accounting Balance,Eröffnungsbilanz, @@ -2215,8 +2215,8 @@ Retained Earnings,Gewinnrücklagen, Retention Stock Entry,Vorratsbestandseintrag, Retention Stock Entry already created or Sample Quantity not provided,Aufbewahrungsbestandseintrag bereits angelegt oder Musterbestand nicht bereitgestellt, Return,Zurück, -Return / Credit Note,Return / Gutschrift, -Return / Debit Note,Return / Lastschrift, +Return / Credit Note,Rückgabe / Gutschrift, +Return / Debit Note,Rückgabe / Lastschrift, Returns,Retouren, Reverse Journal Entry,Buchungssatz umkehren, Review Invitation Sent,Einladung überprüfen gesendet, @@ -2826,7 +2826,7 @@ To {0} | {1} {2},An {0} | {1} {2}, Toggle Filters,Filter umschalten, Too many columns. Export the report and print it using a spreadsheet application.,Zu viele Spalten. Exportieren Sie den Bericht und drucken Sie ihn mit einem Tabellenkalkulationsprogramm aus., Tools,Werkzeuge, -Total (Credit),Insgesamt (Credit), +Total (Credit),Insgesamt (Haben), Total (Without Tax),Summe (ohne Steuern), Total Achieved,Gesamtsumme erreicht, Total Actual,Summe Tatsächlich, @@ -2837,7 +2837,7 @@ Total Budget,Gesamtbudget; Gesamtetat, Total Collected: {0},Gesammelt gesammelt: {0}, Total Commission,Gesamtprovision, Total Contribution Amount: {0},Gesamtbeitragsbetrag: {0}, -Total Credit/ Debit Amount should be same as linked Journal Entry,Der Gesamtkreditbetrag sollte identisch mit dem verknüpften Buchungssatz sein, +Total Credit/ Debit Amount should be same as linked Journal Entry,Der gesamte Soll-/ Habenbetrag sollte identisch mit dem verknüpften Buchungssatz sein, Total Debit must be equal to Total Credit. The difference is {0},Gesamt-Soll muss gleich Gesamt-Haben sein. Die Differenz ist {0}, Total Invoiced Amount,Gesamtrechnungsbetrag, Total Order Considered,Geschätzte Summe der Bestellungen, @@ -2915,7 +2915,7 @@ Unable to find score starting at {0}. You need to have standing scores covering Unable to find variable: ,Variable kann nicht gefunden werden:, Unblock Invoice,Rechnung entsperren, Uncheck all,Alle abwählen, -Unclosed Fiscal Years Profit / Loss (Credit),Offener Gewinn / Verlust (Kredit) des Geschäftsjahres, +Unclosed Fiscal Years Profit / Loss (Credit),Offener Gewinn / Verlust (Haben) des Geschäftsjahres, Unit,Einheit, Unit of Measure,Maßeinheit, Unit of Measure {0} has been entered more than once in Conversion Factor Table,Die Mengeneinheit {0} wurde mehr als einmal in die Umrechnungsfaktortabelle eingetragen., @@ -3185,7 +3185,7 @@ on,Am, {0} {1}: Cost Center is required for 'Profit and Loss' account {2}. Please set up a default Cost Center for the Company.,"{0} {1}: Kostenstelle ist erforderlich für ""Gewinn- und Verlust"" Konto {2}. Bitte erstellen Sie eine Standard-Kostenstelle für das Unternehmen.", {0} {1}: Cost Center {2} does not belong to Company {3},{0} {1}: Kostenstelle {2} gehört nicht zu Unternehmen {3}, {0} {1}: Customer is required against Receivable account {2},{0} {1}: Für das Eingangskonto {2} ist ein Kunde erforderlich, -{0} {1}: Either debit or credit amount is required for {2},{0} {1}: Debit- oder Kreditbetrag ist für {2} erforderlich, +{0} {1}: Either debit or credit amount is required for {2},{0} {1}: Soll- oder Habenbetrag ist für {2} erforderlich, {0} {1}: Supplier is required against Payable account {2},{0} {1}: Für das Kreditorenkonto ist ein Lieferant erforderlich {2}, {0}% Billed,{0}% berechnet, {0}% Delivered,{0}% geliefert, @@ -3408,7 +3408,7 @@ Do you want to submit the material request,Möchten Sie die Materialanfrage einr Doctype,DocType, Document {0} successfully uncleared,Dokument {0} wurde nicht erfolgreich gelöscht, Download Template,Vorlage herunterladen, -Dr,Soll, +Dr,S, Due Date,Fälligkeitsdatum, Duplicate,Duplizieren, Duplicate Project with Tasks,Projekt mit Aufgaben duplizieren, @@ -3889,7 +3889,7 @@ Operation Id,Arbeitsgang-ID, Partially ordered,teilweise geordnete, Please select company first,Bitte wählen Sie zuerst die Firma aus, Please select patient,Bitte wählen Sie Patient, -Printed On ,Gedruckt auf, +Printed On ,Gedruckt am, Projected qty,Geplante Menge, Sales person,Vertriebsmitarbeiter, Serial No {0} Created,Seriennummer {0} Erstellt, @@ -4338,9 +4338,9 @@ Auto Created,Automatisch erstellt, Stock User,Lager-Benutzer, Fiscal Year Company,Geschäftsjahr Unternehmen, Debit Amount,Soll-Betrag, -Credit Amount,Guthaben-Summe, +Credit Amount,Haben-Betrag, Debit Amount in Account Currency,Soll-Betrag in Kontowährung, -Credit Amount in Account Currency,(Gut)Haben-Betrag in Kontowährung, +Credit Amount in Account Currency,Haben-Betrag in Kontowährung, Voucher Detail No,Belegdetail-Nr., Is Opening,Ist Eröffnungsbuchung, Is Advance,Ist Anzahlung, @@ -5699,13 +5699,13 @@ Is Master Data Processed,Werden Stammdaten verarbeitet?, Is Master Data Imported,Werden Stammdaten importiert?, Tally Creditors Account,Tally Gläubigerkonto, Creditors Account set in Tally,Gläubigerkonto in Tally eingestellt, -Tally Debtors Account,Tally Debtors Account, +Tally Debtors Account,Tally Debitorenkonto, Debtors Account set in Tally,Debitorenkonto in Tally eingestellt, -Tally Company,Tally Company, -Company Name as per Imported Tally Data,Firmenname gemäß Imported Tally Data, +Tally Company,Tally Unternehmen, +Company Name as per Imported Tally Data,Firmenname gemäß Importierten Tally-Daten, Default UOM,Standard-UOM, UOM in case unspecified in imported data,"UOM für den Fall, dass in importierten Daten nicht angegeben", -ERPNext Company,ERPNext Company, +ERPNext Company,ERPNext Unternehmen, Your Company set in ERPNext,Ihr Unternehmen in ERPNext eingestellt, Processed Files,Verarbeitete Dateien, Parties,Parteien, @@ -8845,7 +8845,6 @@ Column {0},Spalte {0}, Field Mapping,Feldzuordnung, Not Specified,Keine Angabe, Update Type,Aktualisierungsart, -Dr,Soll, End Time,Endzeit, Fetching...,Abrufen ..., "It seems that there is an issue with the server's stripe configuration. In case of failure, the amount will get refunded to your account.","Es scheint, dass ein Problem mit der Stripe-Konfiguration des Servers vorliegt. Im Falle eines Fehlers wird der Betrag Ihrem Konto gutgeschrieben.", @@ -11829,113 +11828,113 @@ will be,wird sein, {} is a child company.,{} ist ein untergeordnetes Unternehmen., {} {} is already linked with another {},{} {} ist bereits mit einem anderen {} verknüpft, {} {} is already linked with {} {},{} {} ist bereits mit {} {} verknüpft, -A Transaction Deletion Document: {0} is triggered for {0},Eine Transaktion Löschungsdokument: {0} wird für {0} ausgelöst, -About Us Settings,"Einstellungen zu ""Über uns""", -Allow Internal Transfers at Arm's Length Price,Interne Übertragungen zum Fremdvergleichspreis zulassen, -Asset decapitalized after Asset Capitalization {0} was submitted,"Vermögenswert freigegeben, nachdem Anlagenaktivierung {0} gebucht wurde", -Auto Email Report,Auto Email-Bericht, -Auto close Opportunity Replied after the no. of days mentioned above,Automatische Schließungschaltung antwortete nach der oben genannten Anzahl von Tagen, -Avg Rate (Balance Stock),Durchschnittliche Rate (Lagerbestand), -Billing Interval in Subscription Plan must be Month to follow calendar months,"Abrechnungsintervall im Abonnementplan muss ""Monat"" sein, um Kalendermonate zu folgen", -Bulk Update,Massen-Update, -Can't disable batch wise valuation for active batches.,Sie können die chargenweise Bewertung für aktive Chargen nicht deaktivieren., -Can't disable batch wise valuation for items with FIFO valuation method.,Sie können die chargenweise Bewertung für Artikel mit FIFO-Bewertungsmethode nicht deaktivieren., -Cannot disable batch wise valuation for FIFO valuation method.,Sie können die chargenweise Bewertung für die FIFO-Bewertungsmethode nicht deaktivieren., -Cannot enqueue multi docs for one company. {0} is already queued/running for company: {1},Mehrere Dokumente für ein Unternehmen können nicht in die Warteschlange gestellt werden. {0} ist bereits in die Warteschlange gestellt/wird für das Unternehmen ausgeführt: {1}, -Contact Us Settings,Einstellungen zu „Kontaktieren Sie uns“, -Create Journal Entries,Buchungssätze erstellen, -Create a variant with the template image.,Eine Variante mit dem Vorlagenbild erstellen., -Create in Draft Status,In Entwurfsstatus erstellen, -Custom delimiters,Benutzerdefinierte Trennzeichen, -Deleted Documents,Gelöschte Dokumente, -Delimiter options,Trennzeichenoptionen, -Dependent Task {0} is not a Template Task,Abhängige Aufgabe {0} ist keine Vorlage einer Aufgabe, -Depreciation Entry Posting Status,Buchungsstatus des Abschreibungseintrags, -Depreciation Schedule View,Ansicht Abschreibungsplan, -Depreciation cannot be calculated for fully depreciated assets,Für vollständig abgeschriebene Vermögensgegenstände kann keine Abschreibung berechnet werden, -Do Not Use Batch-wise Valuation,Keine chargenweise Bewertung verwenden, -Domain Settings,Domäneneinstellungen, -Email Domain,E-Mail-Domain, -Enable Immutable Ledger,Unveränderliches Hauptbuch aktivieren, -Enable it if users want to consider rejected materials to dispatch.,"Aktivieren Sie diese Option, wenn Benutzer zurückgewiesenes Material für den Versand berücksichtigen möchten.", -Excess Materials Consumed,Überschüssige Materialien verbraucht, -Excess Transfer,Überschuss-Übertragung, -FIFO Queue vs Qty After Transaction Comparison,Vergleich zwischen FIFO-Warteschlange und Menge nach Transaktion, -"For the {0}, the quantity is required to make the return entry","Für die {0} ist die Menge erforderlich, um die Retoure zu erstellen", -"If enabled, the item rate won't adjust to the valuation rate during internal transfers, but accounting will still use the valuation rate.","Falls aktiviert, wird der Artikelkurs bei internen Transfers nicht an den Bewertungskurs angepasst, aber die Buchhaltung verwendet weiterhin den Wertansatz.", -"If enabled, the system will use the moving average valuation method to calculate the valuation rate for the batched items and will not consider the individual batch-wise incoming rate.","Falls aktiviert, verwendet das System die Bewertungsmethode des gleitenden Durchschnitts zur Berechnung des Wertansatzes für die chargenweisen Artikel und berücksichtigt nicht den individuellen chargenweisen Eingangskurs.", -Job Worker,Unterauftragnehmer, -Job Worker Address,Unterauftragnehmer Adresse, -Job Worker Address Details,Vorschau Adresse Unterauftragnehmer, -Job Worker Contact,Vertrag des Unterauftragnehmers, -Job Worker Delivery Note,Lieferschein des Unterauftragnehmers, -Job Worker Name,Name des Unterauftragnehmer, -Job Worker Warehouse,Lagerhaus des Unterauftragnehmers, -"Learn about Common Party","Erfahren Sie mehr über die Verknüpfung von Kunden und Lieferanten", -Notification,Benachrichtigung, -Notification Settings,Benachrichtigungseinstellungen, -Offsetting for Accounting Dimension,Verrechnung für Buchhaltungsdimension, -Only Include Allocated Payments,Nur zugeordnete Zahlungen einbeziehen, -Only one {0} entry can be created against the Work Order {1},Nur ein {0} Eintrag kann gegen den Arbeitsauftrag {1} erstellt werden, -Over Picking Allowance,Überkommissionierzugabe, -Over Transfer Allowance,Überschlusstransferzugabe, -Overbilling of {} ignored because you have {} role.,"Überhöhte Abrechnung von {} wurde ignoriert, weil Sie die Rolle {} haben.", -Payment Reconciliation Job: {0} is running for this party. Can't reconcile now.,Job für Zahlungsabgleich: {0} läuft für diese Partei. Kann jetzt nicht abgleichen., -Payment Request created from Sales Order or Purchase Order will be in Draft status. When disabled document will be in unsaved state.,"Eine Zahlungsanforderung, die aus einem Auftrag oder einer Bestellung erstellt wurde, wird im Entwurfsstatus sein. Wenn deaktiviert, wird das Dokument in ungespeichertem Zustand sein.", -Payment Request took too long to respond. Please try requesting for payment again.,"Zahlungsaufforderung hat zu lange gedauert, um zu antworten. Bitte versuchen Sie die Zahlung erneut anzufragen.", -Payment Terms Status for Sales Order,Status für Zahlungsbedingungen für Aufträge, -Pipeline By,Pipeline von, -Please enable Use Old Serial / Batch Fields to make_bundle,"Bitte aktivieren Sie ""Alte Serien-/Batchfelder verwenden"" für make_bundle", -Print Style,Druckstil, -Reconcile All Serial Nos / Batches,Alle Seriennummern/Chargen abgleichen, -Reset Company Default Values,Standardwerte des Unternehmens zurücksetzen, -Reset Raw Materials Table,Tabelle Rohstoffe zurücksetzen, -Return Against Subcontracting Receipt,Retoure gegen Unterauftragsbeleg, -Return Components,Komponenten zurückgeben, -Returned Against,Zurückgegeben gegen, -Returned exchange rate is neither integer not float.,Der zurückgegebene Wechselkurs ist weder Integer noch Float., -Round Off Tax Amount,Steuerbetrag abrunden, -Rounding Loss Allowance,Rundungsverlusttoleranz, -Rounding Loss Allowance should be between 0 and 1,Rundungsverlusttoleranz muss zwischen 0 und 1 sein, -Row #{0}: Rejected Warehouse is mandatory for the rejected Item {1},Zeile #{0}: Ausschusslager ist für den abgelehnten Artikel {1} obligatorisch, -Row #{0}: You cannot use the inventory dimension '{1}' in Stock Reconciliation to modify the quantity or valuation rate. Stock reconciliation with inventory dimensions is intended solely for performing opening entries.,"Zeile #{0}: Sie können die Bestandsdimension '{1}' in der Bestandsabgleich nicht verwenden, um die Menge oder den Wertansatz zu ändern. Die Bestandsabgleich mit Bestandsdimensionen ist ausschließlich für die Durchführung von Eröffnungsbuchungen vorgesehen.", -Row {0}: Packed Qty must be equal to {1} Qty.,Zeile {0}: Verpackte Menge muss gleich der {1} Menge sein., -Row {0}: Total Number of Depreciations cannot be less than or equal to Opening Number of Booked Depreciations,Zeile {0}: Die Gesamtzahl der Abschreibungen kann nicht kleiner oder gleich der Anzahl der gebuchten Abschreibungen zu Beginn sein, -SCO Supplied Item,Artikel beigestellt für Unterauftrag, -SLA Fulfilled On Status,SLA erfüllt am Status, -SLA will be applied if {1} is set as {2}{3},"SLA wird angewendet, wenn {1} als {2}{3} eingestellt ist", -SMS Settings,SMS-Einstellungen, -SO Total Qty,Kd.-Auftr.-Gesamtmenge, -"Sales Order {0} already exists against Customer's Purchase Order {1}. To allow multiple Sales Orders, Enable {2} in {3}","Auftrag {0} existiert bereits für die Kundenbestellung {1}. Um mehrere Verkaufsaufträge zuzulassen, aktivieren Sie {2} in {3}", +A Transaction Deletion Document: {0} is triggered for {0},Eine Transaktion Löschungsdokument: {0} wird für {0} ausgelöst, +About Us Settings,"Einstellungen zu ""Über uns""", +Allow Internal Transfers at Arm's Length Price,Interne Übertragungen zum Fremdvergleichspreis zulassen, +Asset decapitalized after Asset Capitalization {0} was submitted,"Vermögenswert freigegeben, nachdem Anlagenaktivierung {0} gebucht wurde", +Auto Email Report,Auto Email-Bericht, +Auto close Opportunity Replied after the no. of days mentioned above,Automatische Schließungschaltung antwortete nach der oben genannten Anzahl von Tagen, +Avg Rate (Balance Stock),Durchschnittliche Rate (Lagerbestand), +Billing Interval in Subscription Plan must be Month to follow calendar months,"Abrechnungsintervall im Abonnementplan muss ""Monat"" sein, um Kalendermonate zu folgen", +Bulk Update,Massen-Update, +Can't disable batch wise valuation for active batches.,Sie können die chargenweise Bewertung für aktive Chargen nicht deaktivieren., +Can't disable batch wise valuation for items with FIFO valuation method.,Sie können die chargenweise Bewertung für Artikel mit FIFO-Bewertungsmethode nicht deaktivieren., +Cannot disable batch wise valuation for FIFO valuation method.,Sie können die chargenweise Bewertung für die FIFO-Bewertungsmethode nicht deaktivieren., +Cannot enqueue multi docs for one company. {0} is already queued/running for company: {1},Mehrere Dokumente für ein Unternehmen können nicht in die Warteschlange gestellt werden. {0} ist bereits in die Warteschlange gestellt/wird für das Unternehmen ausgeführt: {1}, +Contact Us Settings,Einstellungen zu „Kontaktieren Sie uns“, +Create Journal Entries,Buchungssätze erstellen, +Create a variant with the template image.,Eine Variante mit dem Vorlagenbild erstellen., +Create in Draft Status,In Entwurfsstatus erstellen, +Custom delimiters,Benutzerdefinierte Trennzeichen, +Deleted Documents,Gelöschte Dokumente, +Delimiter options,Trennzeichenoptionen, +Dependent Task {0} is not a Template Task,Abhängige Aufgabe {0} ist keine Vorlage einer Aufgabe, +Depreciation Entry Posting Status,Buchungsstatus des Abschreibungseintrags, +Depreciation Schedule View,Ansicht Abschreibungsplan, +Depreciation cannot be calculated for fully depreciated assets,Für vollständig abgeschriebene Vermögensgegenstände kann keine Abschreibung berechnet werden, +Do Not Use Batch-wise Valuation,Keine chargenweise Bewertung verwenden, +Domain Settings,Domäneneinstellungen, +Email Domain,E-Mail-Domain, +Enable Immutable Ledger,Unveränderliches Hauptbuch aktivieren, +Enable it if users want to consider rejected materials to dispatch.,"Aktivieren Sie diese Option, wenn Benutzer zurückgewiesenes Material für den Versand berücksichtigen möchten.", +Excess Materials Consumed,Überschüssige Materialien verbraucht, +Excess Transfer,Überschuss-Übertragung, +FIFO Queue vs Qty After Transaction Comparison,Vergleich zwischen FIFO-Warteschlange und Menge nach Transaktion, +"For the {0}, the quantity is required to make the return entry","Für die {0} ist die Menge erforderlich, um die Retoure zu erstellen", +"If enabled, the item rate won't adjust to the valuation rate during internal transfers, but accounting will still use the valuation rate.","Falls aktiviert, wird der Artikelkurs bei internen Transfers nicht an den Bewertungskurs angepasst, aber die Buchhaltung verwendet weiterhin den Wertansatz.", +"If enabled, the system will use the moving average valuation method to calculate the valuation rate for the batched items and will not consider the individual batch-wise incoming rate.","Falls aktiviert, verwendet das System die Bewertungsmethode des gleitenden Durchschnitts zur Berechnung des Wertansatzes für die chargenweisen Artikel und berücksichtigt nicht den individuellen chargenweisen Eingangskurs.", +Job Worker,Unterauftragnehmer, +Job Worker Address,Unterauftragnehmer Adresse, +Job Worker Address Details,Vorschau Adresse Unterauftragnehmer, +Job Worker Contact,Vertrag des Unterauftragnehmers, +Job Worker Delivery Note,Lieferschein des Unterauftragnehmers, +Job Worker Name,Name des Unterauftragnehmer, +Job Worker Warehouse,Lagerhaus des Unterauftragnehmers, +"Learn about Common Party","Erfahren Sie mehr über die Verknüpfung von Kunden und Lieferanten", +Notification,Benachrichtigung, +Notification Settings,Benachrichtigungseinstellungen, +Offsetting for Accounting Dimension,Verrechnung für Buchhaltungsdimension, +Only Include Allocated Payments,Nur zugeordnete Zahlungen einbeziehen, +Only one {0} entry can be created against the Work Order {1},Nur ein {0} Eintrag kann gegen den Arbeitsauftrag {1} erstellt werden, +Over Picking Allowance,Überkommissionierzugabe, +Over Transfer Allowance,Überschlusstransferzugabe, +Overbilling of {} ignored because you have {} role.,"Überhöhte Abrechnung von {} wurde ignoriert, weil Sie die Rolle {} haben.", +Payment Reconciliation Job: {0} is running for this party. Can't reconcile now.,Job für Zahlungsabgleich: {0} läuft für diese Partei. Kann jetzt nicht abgleichen., +Payment Request created from Sales Order or Purchase Order will be in Draft status. When disabled document will be in unsaved state.,"Eine Zahlungsanforderung, die aus einem Auftrag oder einer Bestellung erstellt wurde, wird im Entwurfsstatus sein. Wenn deaktiviert, wird das Dokument in ungespeichertem Zustand sein.", +Payment Request took too long to respond. Please try requesting for payment again.,"Zahlungsaufforderung hat zu lange gedauert, um zu antworten. Bitte versuchen Sie die Zahlung erneut anzufragen.", +Payment Terms Status for Sales Order,Status für Zahlungsbedingungen für Aufträge, +Pipeline By,Pipeline von, +Please enable Use Old Serial / Batch Fields to make_bundle,"Bitte aktivieren Sie ""Alte Serien-/Batchfelder verwenden"" für make_bundle", +Print Style,Druckstil, +Reconcile All Serial Nos / Batches,Alle Seriennummern/Chargen abgleichen, +Reset Company Default Values,Standardwerte des Unternehmens zurücksetzen, +Reset Raw Materials Table,Tabelle Rohstoffe zurücksetzen, +Return Against Subcontracting Receipt,Retoure gegen Unterauftragsbeleg, +Return Components,Komponenten zurückgeben, +Returned Against,Zurückgegeben gegen, +Returned exchange rate is neither integer not float.,Der zurückgegebene Wechselkurs ist weder Integer noch Float., +Round Off Tax Amount,Steuerbetrag abrunden, +Rounding Loss Allowance,Rundungsverlusttoleranz, +Rounding Loss Allowance should be between 0 and 1,Rundungsverlusttoleranz muss zwischen 0 und 1 sein, +Row #{0}: Rejected Warehouse is mandatory for the rejected Item {1},Zeile #{0}: Ausschusslager ist für den abgelehnten Artikel {1} obligatorisch, +Row #{0}: You cannot use the inventory dimension '{1}' in Stock Reconciliation to modify the quantity or valuation rate. Stock reconciliation with inventory dimensions is intended solely for performing opening entries.,"Zeile #{0}: Sie können die Bestandsdimension '{1}' in der Bestandsabgleich nicht verwenden, um die Menge oder den Wertansatz zu ändern. Die Bestandsabgleich mit Bestandsdimensionen ist ausschließlich für die Durchführung von Eröffnungsbuchungen vorgesehen.", +Row {0}: Packed Qty must be equal to {1} Qty.,Zeile {0}: Verpackte Menge muss gleich der {1} Menge sein., +Row {0}: Total Number of Depreciations cannot be less than or equal to Opening Number of Booked Depreciations,Zeile {0}: Die Gesamtzahl der Abschreibungen kann nicht kleiner oder gleich der Anzahl der gebuchten Abschreibungen zu Beginn sein, +SCO Supplied Item,Artikel beigestellt für Unterauftrag, +SLA Fulfilled On Status,SLA erfüllt am Status, +SLA will be applied if {1} is set as {2}{3},"SLA wird angewendet, wenn {1} als {2}{3} eingestellt ist", +SMS Settings,SMS-Einstellungen, +SO Total Qty,Kd.-Auftr.-Gesamtmenge, +"Sales Order {0} already exists against Customer's Purchase Order {1}. To allow multiple Sales Orders, Enable {2} in {3}","Auftrag {0} existiert bereits für die Kundenbestellung {1}. Um mehrere Verkaufsaufträge zuzulassen, aktivieren Sie {2} in {3}", "Scorecard variables can be used, as well as: {total_score} (the total score from that period), {period_number} (the number of periods to present day) ","Variablen der Bewertung können verwendet werden, sowie: {total_score} (die Gesamtpunktzahl aus diesem Zeitraum), {period_number} (die Anzahl der Zeiträume bis zum heutigen Tag) -", -Select Accounting Dimension.,Buchhaltungsdimension auswählen, -Select Corrective Operation,Nacharbeit auswählen, -Select Date of Birth. This will validate Employees age and prevent hiring of under-age staff.,Wählen Sie Geburtsdatum. Damit wird das Alter der Mitarbeiter überprüft und die Einstellung von minderjährigen Mitarbeitern verhindert., -"Select Date of joining. It will have impact on the first salary calculation, Leave allocation on pro-rata bases.",Wählen Sie Eintrittsdatum. Es wirkt sich auf die erste Gehaltsberechnung und die Zuteilung von Abwesenheiten auf Pro-rata-Basis aus., -Select Dimension,Dimension auswählen, -Select Items for Quality Inspection,Artikel für die Qualitätsprüfung auswählen, -Select Job Worker Address,Unterauftragnehmer Adresse auswählen, -Service Expenses,Wartungsaufwand, -Service Level Agreement for {0} {1} already exists.,Service Level Agreement für {0} {1} existiert bereits., -System Settings,Systemverwaltung, -Website Script,Webseiten-Skript, -Website Theme,Webseiten-Thema, -Workflow Action,Workflow-Aktion, -Workflow State,Workflow-Status, -{0} is not running. Cannot trigger events for this Document,{0} läuft nicht. Ereignisse für dieses Dokument können nicht ausgelöst werden, -"""SN-01::10"" for ""SN-01"" to ""SN-10""","""SN-01::10"" für ""SN-01"" bis ""SN-10""", -"Masters & Reports","Stammdaten & Berichte", -"Quick Access","Schnellzugriff", -"Reports & Masters","Berichte & Stammdaten", -"Reports & Masters","Berichte & Stammdaten", -"Settings","Einstellungen", -"Shortcuts","Verknüpfungen", +", +Select Accounting Dimension.,Buchhaltungsdimension auswählen, +Select Corrective Operation,Nacharbeit auswählen, +Select Date of Birth. This will validate Employees age and prevent hiring of under-age staff.,Wählen Sie Geburtsdatum. Damit wird das Alter der Mitarbeiter überprüft und die Einstellung von minderjährigen Mitarbeitern verhindert., +"Select Date of joining. It will have impact on the first salary calculation, Leave allocation on pro-rata bases.",Wählen Sie Eintrittsdatum. Es wirkt sich auf die erste Gehaltsberechnung und die Zuteilung von Abwesenheiten auf Pro-rata-Basis aus., +Select Dimension,Dimension auswählen, +Select Items for Quality Inspection,Artikel für die Qualitätsprüfung auswählen, +Select Job Worker Address,Unterauftragnehmer Adresse auswählen, +Service Expenses,Wartungsaufwand, +Service Level Agreement for {0} {1} already exists.,Service Level Agreement für {0} {1} existiert bereits., +System Settings,Systemverwaltung, +Website Script,Webseiten-Skript, +Website Theme,Webseiten-Thema, +Workflow Action,Workflow-Aktion, +Workflow State,Workflow-Status, +{0} is not running. Cannot trigger events for this Document,{0} läuft nicht. Ereignisse für dieses Dokument können nicht ausgelöst werden, +"""SN-01::10"" for ""SN-01"" to ""SN-10""","""SN-01::10"" für ""SN-01"" bis ""SN-10""", +"Masters & Reports","Stammdaten & Berichte", +"Quick Access","Schnellzugriff", +"Reports & Masters","Berichte & Stammdaten", +"Reports & Masters","Berichte & Stammdaten", +"Settings","Einstellungen", +"Shortcuts","Verknüpfungen", "Your Shortcuts @@ -11948,183 +11947,183 @@ Workflow State,Workflow-Status, - ", -"Your Shortcuts","Ihre Verknüpfungen", -Grand Total: {0},Gesamtsumme:{0}, -Outstanding Amount: {0},Ausstehender Betrag: {0}, -Against Customer Order {0},Gegen Kundenauftrag {0}, -Against Supplier Invoice {0},Gegen Lieferantenrechnung {0}, -Ageing Range,Alterungsbereich, -Allocate Payment Request,Zahlungsanfrage zuweisen, -Amount in party's bank account currency,Betrag in der Währung des Bankkontos des Beteiligten, -Amount in transaction currency,Betrag in Transaktionswährung, -BIN Qty,BIN Menge, -BOM and Production,Stückliste und Produktion, -Balance Stock Value,Bestandswert, -Base Cost Per Unit,Grundkosten pro Einheit, -Base Rate,Basispreis, -Base Tax Withholding Net Total,Basis-Steuereinbehalt-Nettosumme, -Base Total,Basis-Summe, -Base Total Billable Amount,Basis Gesamter abrechenbarer Betrag, -Batch Expiry Date,Ablaufdatum der Charge, -Bill for Rejected Quantity in Purchase Invoice,Rechnung für abgelehnte Menge in der Eingangsrechnung, -Calculate daily depreciation using total days in depreciation period,Tägliche Abschreibung anhand der Gesamttage im Abschreibungszeitraum berechnen, -Call Schedule Row {0}: To time slot should always be ahead of From time slot.,Anrufplanzeile {0}: Das Zeitfenster Bis sollte immer vor dem Zeitfenster Von liegen., -Cannot find a default warehouse for item {0}. Please set one in the Item Master or in Stock Settings.,Es wurde kein Standardlager für den Artikel {0} gefunden. Bitte legen Sie eines im Artikelstamm oder in den Lagereinstellungen fest., -Cannot {0} from {2} without any negative outstanding invoice,Kann nicht {0} von {2} ohne negative ausstehende Rechnung, -Cheques and Deposits Incorrectly cleared,Falsch verrechnete Schecks und Einzahlungen, -Columns are not according to template. Please compare the uploaded file with standard template,Die Spalten stimmen nicht mit der Vorlage überein. Bitte vergleichen Sie die hochgeladene Datei mit der Standardvorlage, -Company is mandatory,Unternehmen ist obligatorisch, -Completion Date can not be before Failure Date. Please adjust the dates accordingly.,Das Fertigstellungsdatum kann nicht vor dem Ausfalldatum liegen. Bitte passen Sie die Daten entsprechend an., -Consumed Stock Items or Consumed Asset Items are mandatory for creating new composite asset,Verbrauchte Lagerartikel oder verbrauchte Vermögensgegenstand-Artikel sind für die Erstellung obligatorisch, -Convert to Item Based Reposting,Umstellung auf artikelbasiertes Umbuchen, -Create Workstation,Arbeitsplatz erstellen, -Creating Journal Entries...,Journaleinträge erstellen..., -Creating Purchase Invoices ...,Eingangsrechnungen erstellen ..., -Creating Sales Invoices ...,Ausgangsrechnungen erstellen ..., -Currency Exchange Settings Result,Währungsumtauscheinstellungen Ergebnis, -Deal Owner,Besitzer des Deals, -Decapitalized,Dekapitalisiert, -Dependant SLE Voucher Detail No,Unterhaltsberechtigter SLE Beleg Detail Nr., -Disassemble,Demontage, -Documents: {0} have deferred revenue/expense enabled for them. Cannot repost.,Dokumente: {0} hat vertagte Einnahmen/Ausgaben aktiviert. Kann nicht erneut posten., -Don't Reserve Sales Order Qty on Sales Return,Menge des Auftrags nicht bei der Rücksendung reservieren, -Enter Manually,Manuell eingeben, -Failed to post depreciation entries,Abschreibungsbuchungen fehlgeschlagen, -Filters missing,Filter fehlen, -"For Return Invoices with Stock effect, '0' qty Items are not allowed. Following rows are affected: {0}",Bei Retourenrechnungen mit Lagereffekt sind Artikel mit einer Menge von '0' nicht zulässig. Folgende Zeilen sind betroffen: {0}, -"For the item {0}, the quantity should be {1} according to the BOM {2}.",Für den Artikel {0} sollte die Menge gemäß Stückliste {2} {1} betragen., -"For the {0}, no stock is available for the return in the warehouse {1}.",Für {0} ist im Lager {1} kein Bestand für die Retoure verfügbar., -Force-Fetch Subscription Updates,Abonnement-Updates erzwingen, -From Date is mandatory,Von-Datum ist obligatorisch, -From Prospect,Von Interessenten, -Gross Purchase Amount Too Low: {0} cannot be depreciated over {1} cycles with a frequency of {2} depreciations.,Bruttokaufbetrag zu niedrig: {0} kann nicht über {1} Zyklen mit einer Häufigkeit von {2} Abschreibungen abgeschrieben werden., -If enabled then system won't apply the pricing rule on the delivery note which will be create from the pick list,"Falls aktiviert, wird das System die Preisregel nicht auf den Lieferschein anwenden, der aus der Pickliste erstellt wird", -Impairment,Wertminderung, -Include Closed Orders,Geschlossene Aufträge/Bestellungen einbeziehen, -Invalid Allocated Amount,Ungültiger zugewiesener Betrag, -Invalid Amount,Ungültiger Betrag, -Is Standard,Ist Standard, -Item {0} does not exist.,Artikel {0} existiert nicht., -Items {0} do not exist in the Item master.,Artikel {0} sind nicht im Artikelstamm vorhanden., -Journal entries have been created,Journaleinträge wurden erstellt, -Net total calculation precision loss,Präzisionsverlust bei Berechnung der Nettosumme, -Only Deduct Tax On Excess Amount ,Nur den überschüssigen Betrag versteuern , -Payment Ledger Entry,Zahlungsbucheintrag, -Payment Requests cannot be created against: {0},Zahlungsanforderungen können nicht erstellt werden für: {0}, -Period Closing Entry For Current Period,Periodenabschlussbuchung für aktuelle Periode, -Provisional Account,Vorläufiges Konto, -Rate of Stock UOM,Einzelpreis der Lager-ME, -Raw Materials Consumption ,Rohstoffverbrauch , -Recalculating Purchase Cost against this Project...,Neuberechnung der Anschaffungskosten für dieses Projekt..., -Reference DocType,Referenz DocType, -Round Tax Amount Row-wise,Steuerbetrag zeilenweise runden, -Rounding gain/loss Entry for Stock Transfer,Rundungsgewinn/-verlustbuchung für Umlagerung, -Row #{0}: Only {1} available to reserve for the Item {2},Zeile #{0}: Nur {1} zur Reservierung für den Artikel {2} verfügbar, -Row #{}: The original Invoice {} of return invoice {} is not consolidated.,Zeile #{}: Die ursprüngliche Rechnung {} der Rechnungskorrektur {} ist nicht konsolidiert., -Row {0}: Item {1} must be a subcontracted item.,Zeile {0}: Artikel {1} muss ein an Dritte vergebener Artikel sein., -Row {0}: Please provide a valid Delivery Note Item or Packed Item reference.,Zeile {0}: Bitte geben Sie einen gültigen Lieferschein Artikel oder verpackten Artikel an., -Row {0}: Target Warehouse is mandatory for internal transfers,Zeile {0}: Ziellager ist für interne Transfers obligatorisch, -Row({0}): Outstanding Amount cannot be greater than actual Outstanding Amount {1} in {2},Zeile({0}): Ausstehender Betrag kann nicht größer sein als der tatsächliche ausstehende Betrag {1} in {2}, -Rows with Same Account heads will be merged on Ledger,Zeilen mit denselben Konten werden im Hauptbuch zusammengefasst, -Select Warehouses to get Stock for Materials Planning,"Wählen Sie Lager aus, um Bestände für die Materialplanung zu erhalten", -Select an invoice to load summary data,"Wählen Sie eine Rechnung aus, um die Zusammenfassung zu laden", -Serial / Batch Bundle,Serien- / Chargenbündel, -Serial / Batch Bundle Missing,Serien- / Chargenbündel fehlt, -Serial No Range,Seriennummernbereich, -Serial and Batch Details,Serien- und Chargendetails, -Sets 'Accepted Warehouse' in each row of the Items table.,Legt in jeder Zeile der Artikeltabelle das Annahmelager fest., -Sets 'Rejected Warehouse' in each row of the Items table.,Legt in jeder Zeile der Artikeltabelle das „Ausschusslager“ fest., -Shelf Life in Days,Haltbarkeitsdauer in Tagen, -Show Disabled Warehouses,Deaktivierte Lager anzeigen, -Show GL Balance,Hauptbuchsaldo anzeigen, -Show Pay Button in Purchase Order Portal,Schaltfläche „Bezahlen“ im Bestellportal anzeigen, -Show Taxes as Table in Print,Steuern als Tabelle im Druck anzeigen, -Show net values in opening and closing columns,Nettowerte in Eröffnungs- und Abschlussspalten anzeigen, -Show with upcoming revenue/expense,Mit kommenden Einnahmen/Ausgaben anzeigen, -Something went wrong please try again,"Etwas ist schief gelaufen, bitte versuchen Sie es erneut", -South Africa VAT Account,Südafrika Mehrwertsteuer-Konto, -South Africa VAT Settings,Südafrika Mehrwertsteuer-Einstellungen, -Start Date should be lower than End Date,Das Startdatum muss vor dem Enddatum liegen, -Start Deletion,Löschen starten, -Start Time can't be greater than or equal to End Time for {0}.,Die Startzeit kann nicht größer oder gleich der Endzeit für {0} sein., -Started a background job to create {1} {0},Hintergrundjob zum Erstellen von {1} {0} gestartet, -Status set to rejected as there are one or more rejected readings.,"Der Status wurde auf abgelehnt gesetzt, da es einen oder mehrere abgelehnte Messwerte gibt.", -Stock Consumed During Repair,Während der Reparatur verbrauchter Bestand, -Stock Consumption Details,Details zum Lagerverbrauch, -Stock Planning,Bestandsplanung, -Stock Reservation,Bestandsreservierung, -Stock Reservation Entries Cancelled,Bestandsreservierungen storniert, -Stock Reservation Entries Created,Bestandsreservierungen erstellt, -Stock Reservation Entry,Bestandsreservierungseintrag, -Stock Reservation Entry cannot be updated as it has been delivered.,"Der Bestandsreservierungseintrag kann nicht aktualisiert werden, da er bereits geliefert wurde.", -"Stock Reservation Entry created against a Pick List cannot be updated. If you need to make changes, we recommend canceling the existing entry and creating a new one.","Ein anhand einer Kommissionierliste erstellter Bestandsreservierungseintrag kann nicht aktualisiert werden. Wenn Sie Änderungen vornehmen müssen, empfehlen wir, den vorhandenen Eintrag zu stornieren und einen neuen zu erstellen.", -Stock Reservation can only be created against {0}.,Bestandsreservierungen können nur gegen {0} erstellt werden., -Stock Reserved Qty (in Stock UOM),Reservierter Bestand (in Lager-ME), -Stock Unreservation,Aufhebung der Bestandsreservierung, -Stock/Accounts can not be frozen as processing of backdated entries is going on. Please try again later.,"Lagerbestände/Konten können nicht eingefroren werden, da die Verarbeitung rückwirkender Einträge noch läuft. Bitte versuchen Sie es später erneut.", -Supplied Item,Gelieferter Artikel, -Supplies subject to the reverse charge provision,"Lieferungen, die der Reverse-Charge-Regelung unterliegen", -Task {0} depends on Task {1}. Please add Task {1} to the Tasks list.,Aufgabe {0} hängt von Aufgabe {1} ab. Bitte fügen Sie Aufgabe {1} zur Aufgabenliste hinzu., -Tax Amount will be rounded on a row(items) level,Der Steuerbetrag wird auf (Artikel-)Zeilenebene gerundet, -Tax Refunds provided to Tourists under the Tax Refunds for Tourists Scheme,Steuererstattungen für Touristen im Rahmen der Steuererstattungsregelung für Touristen, +
", +"Your Shortcuts","Ihre Verknüpfungen", +Grand Total: {0},Gesamtsumme:{0}, +Outstanding Amount: {0},Ausstehender Betrag: {0}, +Against Customer Order {0},Gegen Kundenauftrag {0}, +Against Supplier Invoice {0},Gegen Lieferantenrechnung {0}, +Ageing Range,Alterungsbereich, +Allocate Payment Request,Zahlungsanfrage zuweisen, +Amount in party's bank account currency,Betrag in der Währung des Bankkontos des Beteiligten, +Amount in transaction currency,Betrag in Transaktionswährung, +BIN Qty,BIN Menge, +BOM and Production,Stückliste und Produktion, +Balance Stock Value,Bestandswert, +Base Cost Per Unit,Grundkosten pro Einheit, +Base Rate,Basispreis, +Base Tax Withholding Net Total,Basis-Steuereinbehalt-Nettosumme, +Base Total,Basis-Summe, +Base Total Billable Amount,Basis Gesamter abrechenbarer Betrag, +Batch Expiry Date,Ablaufdatum der Charge, +Bill for Rejected Quantity in Purchase Invoice,Rechnung für abgelehnte Menge in der Eingangsrechnung, +Calculate daily depreciation using total days in depreciation period,Tägliche Abschreibung anhand der Gesamttage im Abschreibungszeitraum berechnen, +Call Schedule Row {0}: To time slot should always be ahead of From time slot.,Anrufplanzeile {0}: Das Zeitfenster Bis sollte immer vor dem Zeitfenster Von liegen., +Cannot find a default warehouse for item {0}. Please set one in the Item Master or in Stock Settings.,Es wurde kein Standardlager für den Artikel {0} gefunden. Bitte legen Sie eines im Artikelstamm oder in den Lagereinstellungen fest., +Cannot {0} from {2} without any negative outstanding invoice,Kann nicht {0} von {2} ohne negative ausstehende Rechnung, +Cheques and Deposits Incorrectly cleared,Falsch verrechnete Schecks und Einzahlungen, +Columns are not according to template. Please compare the uploaded file with standard template,Die Spalten stimmen nicht mit der Vorlage überein. Bitte vergleichen Sie die hochgeladene Datei mit der Standardvorlage, +Company is mandatory,Unternehmen ist obligatorisch, +Completion Date can not be before Failure Date. Please adjust the dates accordingly.,Das Fertigstellungsdatum kann nicht vor dem Ausfalldatum liegen. Bitte passen Sie die Daten entsprechend an., +Consumed Stock Items or Consumed Asset Items are mandatory for creating new composite asset,Verbrauchte Lagerartikel oder verbrauchte Vermögensgegenstand-Artikel sind für die Erstellung obligatorisch, +Convert to Item Based Reposting,Umstellung auf artikelbasiertes Umbuchen, +Create Workstation,Arbeitsplatz erstellen, +Creating Journal Entries...,Journaleinträge erstellen..., +Creating Purchase Invoices ...,Eingangsrechnungen erstellen ..., +Creating Sales Invoices ...,Ausgangsrechnungen erstellen ..., +Currency Exchange Settings Result,Währungsumtauscheinstellungen Ergebnis, +Deal Owner,Besitzer des Deals, +Decapitalized,Dekapitalisiert, +Dependant SLE Voucher Detail No,Unterhaltsberechtigter SLE Beleg Detail Nr., +Disassemble,Demontage, +Documents: {0} have deferred revenue/expense enabled for them. Cannot repost.,Dokumente: {0} hat vertagte Einnahmen/Ausgaben aktiviert. Kann nicht erneut posten., +Don't Reserve Sales Order Qty on Sales Return,Menge des Auftrags nicht bei der Rücksendung reservieren, +Enter Manually,Manuell eingeben, +Failed to post depreciation entries,Abschreibungsbuchungen fehlgeschlagen, +Filters missing,Filter fehlen, +"For Return Invoices with Stock effect, '0' qty Items are not allowed. Following rows are affected: {0}",Bei Retourenrechnungen mit Lagereffekt sind Artikel mit einer Menge von '0' nicht zulässig. Folgende Zeilen sind betroffen: {0}, +"For the item {0}, the quantity should be {1} according to the BOM {2}.",Für den Artikel {0} sollte die Menge gemäß Stückliste {2} {1} betragen., +"For the {0}, no stock is available for the return in the warehouse {1}.",Für {0} ist im Lager {1} kein Bestand für die Retoure verfügbar., +Force-Fetch Subscription Updates,Abonnement-Updates erzwingen, +From Date is mandatory,Von-Datum ist obligatorisch, +From Prospect,Von Interessenten, +Gross Purchase Amount Too Low: {0} cannot be depreciated over {1} cycles with a frequency of {2} depreciations.,Bruttokaufbetrag zu niedrig: {0} kann nicht über {1} Zyklen mit einer Häufigkeit von {2} Abschreibungen abgeschrieben werden., +If enabled then system won't apply the pricing rule on the delivery note which will be create from the pick list,"Falls aktiviert, wird das System die Preisregel nicht auf den Lieferschein anwenden, der aus der Pickliste erstellt wird", +Impairment,Wertminderung, +Include Closed Orders,Geschlossene Aufträge/Bestellungen einbeziehen, +Invalid Allocated Amount,Ungültiger zugewiesener Betrag, +Invalid Amount,Ungültiger Betrag, +Is Standard,Ist Standard, +Item {0} does not exist.,Artikel {0} existiert nicht., +Items {0} do not exist in the Item master.,Artikel {0} sind nicht im Artikelstamm vorhanden., +Journal entries have been created,Journaleinträge wurden erstellt, +Net total calculation precision loss,Präzisionsverlust bei Berechnung der Nettosumme, +Only Deduct Tax On Excess Amount ,Nur den überschüssigen Betrag versteuern , +Payment Ledger Entry,Zahlungsbucheintrag, +Payment Requests cannot be created against: {0},Zahlungsanforderungen können nicht erstellt werden für: {0}, +Period Closing Entry For Current Period,Periodenabschlussbuchung für aktuelle Periode, +Provisional Account,Vorläufiges Konto, +Rate of Stock UOM,Einzelpreis der Lager-ME, +Raw Materials Consumption ,Rohstoffverbrauch , +Recalculating Purchase Cost against this Project...,Neuberechnung der Anschaffungskosten für dieses Projekt..., +Reference DocType,Referenz DocType, +Round Tax Amount Row-wise,Steuerbetrag zeilenweise runden, +Rounding gain/loss Entry for Stock Transfer,Rundungsgewinn/-verlustbuchung für Umlagerung, +Row #{0}: Only {1} available to reserve for the Item {2},Zeile #{0}: Nur {1} zur Reservierung für den Artikel {2} verfügbar, +Row #{}: The original Invoice {} of return invoice {} is not consolidated.,Zeile #{}: Die ursprüngliche Rechnung {} der Rechnungskorrektur {} ist nicht konsolidiert., +Row {0}: Item {1} must be a subcontracted item.,Zeile {0}: Artikel {1} muss ein an Dritte vergebener Artikel sein., +Row {0}: Please provide a valid Delivery Note Item or Packed Item reference.,Zeile {0}: Bitte geben Sie einen gültigen Lieferschein Artikel oder verpackten Artikel an., +Row {0}: Target Warehouse is mandatory for internal transfers,Zeile {0}: Ziellager ist für interne Transfers obligatorisch, +Row({0}): Outstanding Amount cannot be greater than actual Outstanding Amount {1} in {2},Zeile({0}): Ausstehender Betrag kann nicht größer sein als der tatsächliche ausstehende Betrag {1} in {2}, +Rows with Same Account heads will be merged on Ledger,Zeilen mit denselben Konten werden im Hauptbuch zusammengefasst, +Select Warehouses to get Stock for Materials Planning,"Wählen Sie Lager aus, um Bestände für die Materialplanung zu erhalten", +Select an invoice to load summary data,"Wählen Sie eine Rechnung aus, um die Zusammenfassung zu laden", +Serial / Batch Bundle,Serien- / Chargenbündel, +Serial / Batch Bundle Missing,Serien- / Chargenbündel fehlt, +Serial No Range,Seriennummernbereich, +Serial and Batch Details,Serien- und Chargendetails, +Sets 'Accepted Warehouse' in each row of the Items table.,Legt in jeder Zeile der Artikeltabelle das Annahmelager fest., +Sets 'Rejected Warehouse' in each row of the Items table.,Legt in jeder Zeile der Artikeltabelle das „Ausschusslager“ fest., +Shelf Life in Days,Haltbarkeitsdauer in Tagen, +Show Disabled Warehouses,Deaktivierte Lager anzeigen, +Show GL Balance,Hauptbuchsaldo anzeigen, +Show Pay Button in Purchase Order Portal,Schaltfläche „Bezahlen“ im Bestellportal anzeigen, +Show Taxes as Table in Print,Steuern als Tabelle im Druck anzeigen, +Show net values in opening and closing columns,Nettowerte in Eröffnungs- und Abschlussspalten anzeigen, +Show with upcoming revenue/expense,Mit kommenden Einnahmen/Ausgaben anzeigen, +Something went wrong please try again,"Etwas ist schief gelaufen, bitte versuchen Sie es erneut", +South Africa VAT Account,Südafrika Mehrwertsteuer-Konto, +South Africa VAT Settings,Südafrika Mehrwertsteuer-Einstellungen, +Start Date should be lower than End Date,Das Startdatum muss vor dem Enddatum liegen, +Start Deletion,Löschen starten, +Start Time can't be greater than or equal to End Time for {0}.,Die Startzeit kann nicht größer oder gleich der Endzeit für {0} sein., +Started a background job to create {1} {0},Hintergrundjob zum Erstellen von {1} {0} gestartet, +Status set to rejected as there are one or more rejected readings.,"Der Status wurde auf abgelehnt gesetzt, da es einen oder mehrere abgelehnte Messwerte gibt.", +Stock Consumed During Repair,Während der Reparatur verbrauchter Bestand, +Stock Consumption Details,Details zum Lagerverbrauch, +Stock Planning,Bestandsplanung, +Stock Reservation,Bestandsreservierung, +Stock Reservation Entries Cancelled,Bestandsreservierungen storniert, +Stock Reservation Entries Created,Bestandsreservierungen erstellt, +Stock Reservation Entry,Bestandsreservierungseintrag, +Stock Reservation Entry cannot be updated as it has been delivered.,"Der Bestandsreservierungseintrag kann nicht aktualisiert werden, da er bereits geliefert wurde.", +"Stock Reservation Entry created against a Pick List cannot be updated. If you need to make changes, we recommend canceling the existing entry and creating a new one.","Ein anhand einer Kommissionierliste erstellter Bestandsreservierungseintrag kann nicht aktualisiert werden. Wenn Sie Änderungen vornehmen müssen, empfehlen wir, den vorhandenen Eintrag zu stornieren und einen neuen zu erstellen.", +Stock Reservation can only be created against {0}.,Bestandsreservierungen können nur gegen {0} erstellt werden., +Stock Reserved Qty (in Stock UOM),Reservierter Bestand (in Lager-ME), +Stock Unreservation,Aufhebung der Bestandsreservierung, +Stock/Accounts can not be frozen as processing of backdated entries is going on. Please try again later.,"Lagerbestände/Konten können nicht eingefroren werden, da die Verarbeitung rückwirkender Einträge noch läuft. Bitte versuchen Sie es später erneut.", +Supplied Item,Gelieferter Artikel, +Supplies subject to the reverse charge provision,"Lieferungen, die der Reverse-Charge-Regelung unterliegen", +Task {0} depends on Task {1}. Please add Task {1} to the Tasks list.,Aufgabe {0} hängt von Aufgabe {1} ab. Bitte fügen Sie Aufgabe {1} zur Aufgabenliste hinzu., +Tax Amount will be rounded on a row(items) level,Der Steuerbetrag wird auf (Artikel-)Zeilenebene gerundet, +Tax Refunds provided to Tourists under the Tax Refunds for Tourists Scheme,Steuererstattungen für Touristen im Rahmen der Steuererstattungsregelung für Touristen, "Tax detail table fetched from item master as a string and stored in this field. Used for Taxes and Charges","Steuerdetailtabelle, die aus dem Artikelstamm als Zeichenfolge abgerufen und in diesem Feld gespeichert wird. -Wird für Steuern und Gebühren verwendet", -"The Payment Request {0} is already paid, cannot process payment twice","Die Auszahlungsanforderung {0} ist bereits bezahlt, die Zahlung kann nicht zweimal verarbeitet werden", -The Serial No at Row #{0}: {1} is not available in warehouse {2}.,Die Seriennummer in Zeile #{0}: {1} ist im Lager {2} nicht verfügbar., -The Work Order is mandatory for Disassembly Order,Der Arbeitsauftrag ist obligatorisch für den Demontageauftrag, -The allocated amount is greater than the outstanding amount of Payment Request {0},Der zugewiesene Betrag ist größer als der ausstehende Betrag der Zahlungsanforderung {0}, -The field {0} in row {1} is not set,Das Feld {0} in der Zeile {1} ist nicht gesetzt, -The following invalid Pricing Rules are deleted:,Die folgenden ungültigen Preisregeln werden gelöscht:, -The original invoice should be consolidated before or along with the return invoice.,Die Originalrechnung sollte vor oder zusammen mit der Erstattungsrechnung konsolidiert werden., -"The sync has started in the background, please check the {0} list for new records.",Die Synchronisierung wurde im Hintergrund gestartet. Bitte überprüfen Sie die Liste {0} auf neue Datensätze., -"The users with this Role are allowed to create/modify a stock transaction, even though the transaction is frozen.","Die Benutzer mit dieser Rolle dürfen eine Lagerbewegungen erstellen/ändern, auch wenn die Transaktion eingefroren ist.", -There are no active Fiscal Years for which Demo Data can be generated.,"Es gibt keine aktiven Geschäftsjahre, für die Demodaten erstellt werden können.", -There were issues unlinking payment entry {0}.,Es gab Probleme bei der Aufhebung der Verknüpfung der Zahlung {0}., -"This is enabled by default. If you want to plan materials for sub-assemblies of the Item you're manufacturing leave this enabled. If you plan and manufacture the sub-assemblies separately, you can disable this checkbox.","Diese Option ist standardmäßig aktiviert. Wenn Sie Materialien für Unterbaugruppen des Artikels, den Sie herstellen, planen möchten, lassen Sie diese Option aktiviert. Wenn Sie die Unterbaugruppen separat planen und herstellen, können Sie dieses Kontrollkästchen deaktivieren.", -To Date is mandatory,Bis Datum ist obligatorisch, -To Delivery Date,Bis Liefertermin, -To Due Date,Bis Fälligkeitsdatum, -To Reference Date,Bis Stichtag, -To cancel a {} you need to cancel the POS Closing Entry {}.,"Um einen {} zu stornieren, müssen Sie die POS-Abschlussbuchung {} stornieren.", -Total Incoming Value (Receipt),Gesamter eingehender Wert (Empfang), -Total Number of Booked Depreciations ,Gesamtzahl der gebuchten Abschreibungen , -Total Operation Time,Gesamtbetriebszeit, -Total Other Charges,Sonstige Kosten insgesamt, -Total Purchase Amount,Gesamtkaufbetrag, -Total Purchase Cost has been updated,Die Gesamteinkaufskosten wurden aktualisiert, -UnReconcile,Zuordnung aufheben, -Unrealized Profit / Loss account for intra-company transfers,Konto für nicht realisierte Gewinne/Verluste aus konzerninternen Transfers, -Unrealized Profit/Loss account for intra-company transfers,Konto für nicht realisierte Gewinne/Verluste aus konzerninternen Transfers, -Validate Components Quantities Per BOM,Anzahl der Komponenten pro Stückliste überprüfen, -Validate Pricing Rule,Preisregel validieren, -Validate Stock on Save,Lagerbestand beim Speichern validieren, -Warning on Negative Stock,Warnung vor negativem Bestand, -You cannot create a {0} within the closed Accounting Period {1},Sie können innerhalb der abgeschlossenen Abrechnungsperiode {1} kein(e) {0} erstellen, -dated {0},von {0}, -must be between 0 and 100,muss zwischen 0 und 100 liegen, -or its descendants,oder seine Nachkommen, -subscription is already cancelled.,abonnement ist bereits storniert., -{0} Account not found against Customer {1}.,{0} Konto für Kunde {1} nicht gefunden., -{0} Transaction(s) Reconciled,{0} Transaktion(en) Abgestimmt, -{0} cannot be zero,{0} kann nicht Null sein, -{0} is already running for {1},{0} läuft bereits für {1}, -{0} units of Item {1} is not available in any of the warehouses.,{0} Einheiten des Artikels {1} sind in keinem der Lager verfügbar., -Cannot {0} from {1} without any negative outstanding invoice,Kann nicht {0} von {1} ohne negative ausstehende Rechnung, -Common Code,Gemeinsamer Code, -Event,Ereignis, -Forecast,Prognose, +Wird für Steuern und Gebühren verwendet", +"The Payment Request {0} is already paid, cannot process payment twice","Die Auszahlungsanforderung {0} ist bereits bezahlt, die Zahlung kann nicht zweimal verarbeitet werden", +The Serial No at Row #{0}: {1} is not available in warehouse {2}.,Die Seriennummer in Zeile #{0}: {1} ist im Lager {2} nicht verfügbar., +The Work Order is mandatory for Disassembly Order,Der Arbeitsauftrag ist obligatorisch für den Demontageauftrag, +The allocated amount is greater than the outstanding amount of Payment Request {0},Der zugewiesene Betrag ist größer als der ausstehende Betrag der Zahlungsanforderung {0}, +The field {0} in row {1} is not set,Das Feld {0} in der Zeile {1} ist nicht gesetzt, +The following invalid Pricing Rules are deleted:,Die folgenden ungültigen Preisregeln werden gelöscht:, +The original invoice should be consolidated before or along with the return invoice.,Die Originalrechnung sollte vor oder zusammen mit der Erstattungsrechnung konsolidiert werden., +"The sync has started in the background, please check the {0} list for new records.",Die Synchronisierung wurde im Hintergrund gestartet. Bitte überprüfen Sie die Liste {0} auf neue Datensätze., +"The users with this Role are allowed to create/modify a stock transaction, even though the transaction is frozen.","Die Benutzer mit dieser Rolle dürfen eine Lagerbewegungen erstellen/ändern, auch wenn die Transaktion eingefroren ist.", +There are no active Fiscal Years for which Demo Data can be generated.,"Es gibt keine aktiven Geschäftsjahre, für die Demodaten erstellt werden können.", +There were issues unlinking payment entry {0}.,Es gab Probleme bei der Aufhebung der Verknüpfung der Zahlung {0}., +"This is enabled by default. If you want to plan materials for sub-assemblies of the Item you're manufacturing leave this enabled. If you plan and manufacture the sub-assemblies separately, you can disable this checkbox.","Diese Option ist standardmäßig aktiviert. Wenn Sie Materialien für Unterbaugruppen des Artikels, den Sie herstellen, planen möchten, lassen Sie diese Option aktiviert. Wenn Sie die Unterbaugruppen separat planen und herstellen, können Sie dieses Kontrollkästchen deaktivieren.", +To Date is mandatory,Bis Datum ist obligatorisch, +To Delivery Date,Bis Liefertermin, +To Due Date,Bis Fälligkeitsdatum, +To Reference Date,Bis Stichtag, +To cancel a {} you need to cancel the POS Closing Entry {}.,"Um einen {} zu stornieren, müssen Sie die POS-Abschlussbuchung {} stornieren.", +Total Incoming Value (Receipt),Gesamter eingehender Wert (Empfang), +Total Number of Booked Depreciations ,Gesamtzahl der gebuchten Abschreibungen , +Total Operation Time,Gesamtbetriebszeit, +Total Other Charges,Sonstige Kosten insgesamt, +Total Purchase Amount,Gesamtkaufbetrag, +Total Purchase Cost has been updated,Die Gesamteinkaufskosten wurden aktualisiert, +UnReconcile,Zuordnung aufheben, +Unrealized Profit / Loss account for intra-company transfers,Konto für nicht realisierte Gewinne/Verluste aus konzerninternen Transfers, +Unrealized Profit/Loss account for intra-company transfers,Konto für nicht realisierte Gewinne/Verluste aus konzerninternen Transfers, +Validate Components Quantities Per BOM,Anzahl der Komponenten pro Stückliste überprüfen, +Validate Pricing Rule,Preisregel validieren, +Validate Stock on Save,Lagerbestand beim Speichern validieren, +Warning on Negative Stock,Warnung vor negativem Bestand, +You cannot create a {0} within the closed Accounting Period {1},Sie können innerhalb der abgeschlossenen Abrechnungsperiode {1} kein(e) {0} erstellen, +dated {0},von {0}, +must be between 0 and 100,muss zwischen 0 und 100 liegen, +or its descendants,oder seine Nachkommen, +subscription is already cancelled.,abonnement ist bereits storniert., +{0} Account not found against Customer {1}.,{0} Konto für Kunde {1} nicht gefunden., +{0} Transaction(s) Reconciled,{0} Transaktion(en) Abgestimmt, +{0} cannot be zero,{0} kann nicht Null sein, +{0} is already running for {1},{0} läuft bereits für {1}, +{0} units of Item {1} is not available in any of the warehouses.,{0} Einheiten des Artikels {1} sind in keinem der Lager verfügbar., +Cannot {0} from {1} without any negative outstanding invoice,Kann nicht {0} von {1} ohne negative ausstehende Rechnung, +Common Code,Gemeinsamer Code, +Event,Ereignis, +Forecast,Prognose, "If Enabled - Reconciliation happens on the Advance Payment posting date
If Disabled - Reconciliation happens on oldest of 2 Dates: Invoice Date or the Advance Payment posting date
","Falls aktiviert - erfolgt der Abgleich am Buchungsdatum der Vorauszahlung
Falls deaktiviert - erfolgt der Abgleich am ältesten von 2 Daten: Rechnungsdatum oder Buchungsdatum der Vorauszahlung
-", -Pay,Zahlen,Amount -Please set '{0}' in Company: {1},Bitte stellen Sie '{0}' in Unternehmen ein: {1}, -Price is not set for the item.,Für den Artikel ist kein Preis festgelegt., -Rate of Depreciation (%),Abschreibungssatz (%), -Rejected ,Abgelehnt , -Row #{0}: Allocated Amount cannot be greater than Outstanding Amount of Payment Request {1},Zeile #{0}: Der zugewiesene Betrag kann nicht größer sein als der ausstehende Betrag der Zahlungsanforderung {1}, -Section,Sektion, -Sending...,Senden..., +", +Pay,Zahlen,Amount +Please set '{0}' in Company: {1},Bitte stellen Sie '{0}' in Unternehmen ein: {1}, +Price is not set for the item.,Für den Artikel ist kein Preis festgelegt., +Rate of Depreciation (%),Abschreibungssatz (%), +Rejected ,Abgelehnt , +Row #{0}: Allocated Amount cannot be greater than Outstanding Amount of Payment Request {1},Zeile #{0}: Der zugewiesene Betrag kann nicht größer sein als der ausstehende Betrag der Zahlungsanforderung {1}, +Section,Sektion, +Sending...,Senden..., From 48822f6feefe0dbbcae9efcb746e8375de3b10b9 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Mon, 7 Apr 2025 14:24:13 +0530 Subject: [PATCH 1524/1614] fix: removed hardcoded search fields to fix performance issue (cherry picked from commit 216bf2456e696ad4079ef268b3e0e788f97ecb02) # Conflicts: # erpnext/manufacturing/doctype/bom/bom.py --- erpnext/manufacturing/doctype/bom/bom.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py index 7f2d2acc00d..5aacda01c1b 100644 --- a/erpnext/manufacturing/doctype/bom/bom.py +++ b/erpnext/manufacturing/doctype/bom/bom.py @@ -1496,11 +1496,16 @@ def item_query(doctype, txt, searchfield, start, page_len, filters): fields = ["name", "item_name", "item_group", "description"] fields.extend([field for field in searchfields if field not in ["name", "item_group", "description"]]) +<<<<<<< HEAD searchfields = searchfields + [ field for field in [searchfield or "name", "item_code", "item_group", "item_name"] if field not in searchfields ] +======= + if not searchfields: + searchfields = ["name"] +>>>>>>> 216bf2456e (fix: removed hardcoded search fields to fix performance issue) query_filters = {"disabled": 0, "ifnull(end_of_life, '3099-12-31')": (">", today())} From fe0e5c2d48e529835bbd07cd334f14ddc2dec81f Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Mon, 7 Apr 2025 11:47:27 +0530 Subject: [PATCH 1525/1614] fix: inventory dimensions columns visibility depends on filter (cherry picked from commit 2b411fb7f5bda812e2e1c8882dd8ee6fbb44586c) --- erpnext/public/js/utils.js | 4 ++++ .../report/stock_balance/stock_balance.py | 21 ++++++++++--------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/erpnext/public/js/utils.js b/erpnext/public/js/utils.js index c0126f2c6ee..39a341814db 100755 --- a/erpnext/public/js/utils.js +++ b/erpnext/public/js/utils.js @@ -263,6 +263,10 @@ $.extend(erpnext.utils, { fieldname: dimension["fieldname"], label: __(dimension["doctype"]), fieldtype: "MultiSelectList", + depends_on: + report_name === "Stock Balance" + ? "eval:doc.show_dimension_wise_stock === 1" + : "", get_data: function (txt) { return frappe.db.get_link_options(dimension["doctype"], txt); }, diff --git a/erpnext/stock/report/stock_balance/stock_balance.py b/erpnext/stock/report/stock_balance/stock_balance.py index 2153b1d73b3..b6587cd7b37 100644 --- a/erpnext/stock/report/stock_balance/stock_balance.py +++ b/erpnext/stock/report/stock_balance/stock_balance.py @@ -406,16 +406,17 @@ class StockBalanceReport: }, ] - for dimension in get_inventory_dimensions(): - columns.append( - { - "label": _(dimension.doctype), - "fieldname": dimension.fieldname, - "fieldtype": "Link", - "options": dimension.doctype, - "width": 110, - } - ) + if self.filters.get("show_dimension_wise_stock"): + for dimension in get_inventory_dimensions(): + columns.append( + { + "label": _(dimension.doctype), + "fieldname": dimension.fieldname, + "fieldtype": "Link", + "options": dimension.doctype, + "width": 110, + } + ) columns.extend( [ From e1154090f66e3d204136b24a47f89ff97223e5fe Mon Sep 17 00:00:00 2001 From: ljain112 Date: Mon, 31 Mar 2025 12:37:28 +0530 Subject: [PATCH 1526/1614] fix: update outstanding with precision (cherry picked from commit aadda9f606748bb90cc24a4679e079d75cf29828) --- erpnext/accounts/utils.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py index ac37775f45f..b46e427382f 100644 --- a/erpnext/accounts/utils.py +++ b/erpnext/accounts/utils.py @@ -1854,14 +1854,17 @@ def update_voucher_outstanding(voucher_type, voucher_no, account, party_type, pa ): outstanding = voucher_outstanding[0] ref_doc = frappe.get_doc(voucher_type, voucher_no) + outstanding_amount = flt( + outstanding["outstanding_in_account_currency"], ref_doc.precision("outstanding_amount") + ) # Didn't use db_set for optimisation purpose - ref_doc.outstanding_amount = outstanding["outstanding_in_account_currency"] or 0.0 + ref_doc.outstanding_amount = outstanding_amount frappe.db.set_value( voucher_type, voucher_no, "outstanding_amount", - outstanding["outstanding_in_account_currency"] or 0.0, + outstanding_amount, ) ref_doc.set_status(update=True) From c705623fdc1a002169344c4165279f18fbe4fdb0 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Tue, 25 Mar 2025 14:15:24 +0530 Subject: [PATCH 1527/1614] fix: user permissions in sales and purchase report (cherry picked from commit f4bc1dfd005d9d52c75c919703ba47f8399439fc) --- .../item_wise_purchase_register.py | 20 ++++++----- .../item_wise_sales_register.py | 33 +++++++++++-------- .../purchase_register/purchase_register.py | 14 ++++++-- .../report/sales_register/sales_register.py | 14 ++++++-- 4 files changed, 54 insertions(+), 27 deletions(-) diff --git a/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py b/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py index 83f664c984a..b313ed8b173 100644 --- a/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py +++ b/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py @@ -11,7 +11,7 @@ import erpnext from erpnext.accounts.report.item_wise_sales_register.item_wise_sales_register import ( add_sub_total_row, add_total_row, - apply_group_by_conditions, + apply_order_by_conditions, get_grand_total, get_group_by_and_display_fields, get_tax_accounts, @@ -305,12 +305,6 @@ def apply_conditions(query, pi, pii, filters): if filters.get("item_group"): query = query.where(pii.item_group == filters.get("item_group")) - if not filters.get("group_by"): - query = query.orderby(pi.posting_date, order=Order.desc) - query = query.orderby(pii.item_group, order=Order.desc) - else: - query = apply_group_by_conditions(query, pi, pii, filters) - return query @@ -372,7 +366,17 @@ def get_items(filters, additional_table_columns): query = apply_conditions(query, pi, pii, filters) - return query.run(as_dict=True) + from frappe.desk.reportview import build_match_conditions + + query, params = query.walk() + match_conditions = build_match_conditions("Sales Invoice") + + if match_conditions: + query += " and " + match_conditions + + query = apply_order_by_conditions(query, pi, pii, filters) + + return frappe.db.sql(query, params, as_dict=True) def get_aii_accounts(): diff --git a/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py b/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py index 604c0a6569d..af2c4e7e38b 100644 --- a/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py +++ b/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py @@ -384,27 +384,24 @@ def apply_conditions(query, si, sii, filters, additional_conditions=None): | (si.unrealized_profit_loss_account == filters.get("income_account")) ) - if not filters.get("group_by"): - query = query.orderby(si.posting_date, order=Order.desc) - query = query.orderby(sii.item_group, order=Order.desc) - else: - query = apply_group_by_conditions(query, si, sii, filters) - for key, value in (additional_conditions or {}).items(): query = query.where(si[key] == value) return query -def apply_group_by_conditions(query, si, ii, filters): - if filters.get("group_by") == "Invoice": - query = query.orderby(ii.parent, order=Order.desc) +def apply_order_by_conditions(query, si, ii, filters): + if not filters.get("group_by"): + query += f" order by {si.posting_date} desc, {ii.item_group} desc" + elif filters.get("group_by") == "Invoice": + query += f" order by {ii.parent} desc" elif filters.get("group_by") == "Item": - query = query.orderby(ii.item_code) + query += f" order by {ii.item_code}" elif filters.get("group_by") == "Item Group": - query = query.orderby(ii.item_group) + query += f" order by {ii.item_group}" elif filters.get("group_by") in ("Customer", "Customer Group", "Territory", "Supplier"): - query = query.orderby(si[frappe.scrub(filters.get("group_by"))]) + filter_field = frappe.scrub(filters.get("group_by")) + query += f" order by {filter_field} desc" return query @@ -479,7 +476,17 @@ def get_items(filters, additional_query_columns, additional_conditions=None): query = apply_conditions(query, si, sii, filters, additional_conditions) - return query.run(as_dict=True) + from frappe.desk.reportview import build_match_conditions + + query, params = query.walk() + match_conditions = build_match_conditions("Sales Invoice") + + if match_conditions: + query += " and " + match_conditions + + query = apply_order_by_conditions(query, si, sii, filters) + + return frappe.db.sql(query, params, as_dict=True) def get_delivery_notes_against_sales_order(item_list): diff --git a/erpnext/accounts/report/purchase_register/purchase_register.py b/erpnext/accounts/report/purchase_register/purchase_register.py index 48364cc2c91..026aecce036 100644 --- a/erpnext/accounts/report/purchase_register/purchase_register.py +++ b/erpnext/accounts/report/purchase_register/purchase_register.py @@ -397,7 +397,6 @@ def get_invoices(filters, additional_query_columns): pi.mode_of_payment, ) .where(pi.docstatus == 1) - .orderby(pi.posting_date, pi.name, order=Order.desc) ) if additional_query_columns: @@ -421,8 +420,17 @@ def get_invoices(filters, additional_query_columns): ) query = query.where(pi.credit_to.isin(party_account)) - invoices = query.run(as_dict=True) - return invoices + from frappe.desk.reportview import build_match_conditions + + query, params = query.walk() + match_conditions = build_match_conditions("Purchase Invoice") + + if match_conditions: + query += " and " + match_conditions + + query += " order by posting_date desc, name desc" + + return frappe.db.sql(query, params, as_dict=True) def get_conditions(filters, query, doctype): diff --git a/erpnext/accounts/report/sales_register/sales_register.py b/erpnext/accounts/report/sales_register/sales_register.py index 34d53238f50..e55f217682d 100644 --- a/erpnext/accounts/report/sales_register/sales_register.py +++ b/erpnext/accounts/report/sales_register/sales_register.py @@ -439,7 +439,6 @@ def get_invoices(filters, additional_query_columns): si.company, ) .where(si.docstatus == 1) - .orderby(si.posting_date, si.name, order=Order.desc) ) if additional_query_columns: @@ -457,8 +456,17 @@ def get_invoices(filters, additional_query_columns): filters, query, doctype="Sales Invoice", child_doctype="Sales Invoice Item" ) - invoices = query.run(as_dict=True) - return invoices + from frappe.desk.reportview import build_match_conditions + + query, params = query.walk() + match_conditions = build_match_conditions("Sales Invoice") + + if match_conditions: + query += " and " + match_conditions + + query += " order by posting_date desc, name desc" + + return frappe.db.sql(query, params, as_dict=True) def get_conditions(filters, query, doctype): From 7dfff8d3a2f3374873b0460b43673a871c01d8bf Mon Sep 17 00:00:00 2001 From: Corentin Forler Date: Mon, 31 Mar 2025 13:53:17 +0200 Subject: [PATCH 1528/1614] fix: Fix fieldtype in UnReconcile dialog (cherry picked from commit 665645721b3cfcdd62a82c9c080799a59071c3e8) --- erpnext/public/js/utils/unreconcile.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/erpnext/public/js/utils/unreconcile.js b/erpnext/public/js/utils/unreconcile.js index b8c1db66cc8..072b541753d 100644 --- a/erpnext/public/js/utils/unreconcile.js +++ b/erpnext/public/js/utils/unreconcile.js @@ -91,7 +91,13 @@ erpnext.accounts.unreconcile_payment = { read_only: 1, options: "account_currency", }, - { label: __("Currency"), fieldname: "account_currency", fieldtype: "Currency", read_only: 1 }, + { + label: __("Currency"), + fieldname: "account_currency", + fieldtype: "Link", + options: "Currency", + read_only: 1, + }, ]; let unreconcile_dialog_fields = [ { From 26611475f6fd63eda6bbe3fea4a3b1c754efe68b Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Mon, 7 Apr 2025 17:17:42 +0530 Subject: [PATCH 1529/1614] fix: restrict customer change if creating from opportunity (cherry picked from commit dc4819e89773c7e74e09928d0d91c45a83a87117) --- erpnext/selling/doctype/quotation/quotation.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/erpnext/selling/doctype/quotation/quotation.js b/erpnext/selling/doctype/quotation/quotation.js index 03665b48a85..b9d46e0b84b 100644 --- a/erpnext/selling/doctype/quotation/quotation.js +++ b/erpnext/selling/doctype/quotation/quotation.js @@ -69,6 +69,8 @@ frappe.ui.form.on("Quotation", { erpnext.selling.QuotationController = class QuotationController extends erpnext.selling.SellingController { onload(doc, dt, dn) { super.onload(doc, dt, dn); + + this.frm.trigger("disable_customer_if_creating_from_opportunity"); } party_name() { var me = this; @@ -373,6 +375,12 @@ erpnext.selling.QuotationController = class QuotationController extends erpnext. ); } } + + disable_customer_if_creating_from_opportunity(doc) { + if (doc.opportunity) { + this.frm.set_df_property("party_name", "read_only", 1); + } + } }; cur_frm.script_manager.make(erpnext.selling.QuotationController); From 1aac8d31f467eb68b0d1fb6f2d3f6584770146db Mon Sep 17 00:00:00 2001 From: ljain112 Date: Mon, 31 Mar 2025 18:06:33 +0530 Subject: [PATCH 1530/1614] fix: removed customer_group query in customer.js (cherry picked from commit f49adfdd98141ffa555257549eddd4cf240bdc2a) --- erpnext/selling/doctype/customer/customer.js | 1 - 1 file changed, 1 deletion(-) diff --git a/erpnext/selling/doctype/customer/customer.js b/erpnext/selling/doctype/customer/customer.js index 98301fb3ddd..11a3eecb967 100644 --- a/erpnext/selling/doctype/customer/customer.js +++ b/erpnext/selling/doctype/customer/customer.js @@ -18,7 +18,6 @@ frappe.ui.form.on("Customer", { frm.add_fetch("lead_name", "company_name", "customer_name"); frm.add_fetch("default_sales_partner", "commission_rate", "default_commission_rate"); - frm.set_query("customer_group", { is_group: 0 }); frm.set_query("default_price_list", { selling: 1 }); frm.set_query("account", "accounts", function (doc, cdt, cdn) { let d = locals[cdt][cdn]; From b824038d3704a114c3021887e4e572671c451877 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Tue, 8 Apr 2025 13:32:49 +0530 Subject: [PATCH 1531/1614] chore: fix conflicts --- erpnext/manufacturing/doctype/bom/bom.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py index 5aacda01c1b..46bf75780d4 100644 --- a/erpnext/manufacturing/doctype/bom/bom.py +++ b/erpnext/manufacturing/doctype/bom/bom.py @@ -1496,16 +1496,8 @@ def item_query(doctype, txt, searchfield, start, page_len, filters): fields = ["name", "item_name", "item_group", "description"] fields.extend([field for field in searchfields if field not in ["name", "item_group", "description"]]) -<<<<<<< HEAD - searchfields = searchfields + [ - field - for field in [searchfield or "name", "item_code", "item_group", "item_name"] - if field not in searchfields - ] -======= if not searchfields: searchfields = ["name"] ->>>>>>> 216bf2456e (fix: removed hardcoded search fields to fix performance issue) query_filters = {"disabled": 0, "ifnull(end_of_life, '3099-12-31')": (">", today())} From 2ed6c211f95ca29222cd10c79e7275b47d4d2eff Mon Sep 17 00:00:00 2001 From: JK1117 <41583468+JK-1117@users.noreply.github.com> Date: Thu, 27 Feb 2025 15:17:10 +0800 Subject: [PATCH 1532/1614] feat: fetch source_fieldname for inventory dimension (cherry picked from commit 4e63ee1a70da5e3c7ac8f8405a79a45c79f16a72) --- erpnext/stock/doctype/inventory_dimension/inventory_dimension.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/stock/doctype/inventory_dimension/inventory_dimension.py b/erpnext/stock/doctype/inventory_dimension/inventory_dimension.py index 75366d823a3..b08a602fdf2 100644 --- a/erpnext/stock/doctype/inventory_dimension/inventory_dimension.py +++ b/erpnext/stock/doctype/inventory_dimension/inventory_dimension.py @@ -398,6 +398,7 @@ def get_inventory_dimensions(): "Inventory Dimension", fields=[ "distinct target_fieldname as fieldname", + "source_fieldname", "reference_document as doctype", "validate_negative_stock", ], From 250b67076d19579164783badb95d140254f89afa Mon Sep 17 00:00:00 2001 From: JK1117 <41583468+JK-1117@users.noreply.github.com> Date: Thu, 27 Feb 2025 15:17:39 +0800 Subject: [PATCH 1533/1614] fix: use source_fieldname to validate inventory dimension (cherry picked from commit daa5bebdd014ea81de9856a3609b931100ac1d91) --- .../stock/doctype/stock_reconciliation/stock_reconciliation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py index 46f9f9dcf1b..d91a22631d8 100644 --- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py +++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py @@ -92,7 +92,7 @@ class StockReconciliation(StockController): dimensions = get_inventory_dimensions() for dimension in dimensions: for row in self.items: - if not row.batch_no and row.current_qty and row.get(dimension.get("fieldname")): + if not row.batch_no and row.current_qty and row.get(dimension.get("source_fieldname")): frappe.throw( _( "Row #{0}: You cannot use the inventory dimension '{1}' in Stock Reconciliation to modify the quantity or valuation rate. Stock reconciliation with inventory dimensions is intended solely for performing opening entries." From fb06f886d261c2b674ff3851a5b0bcdde1bdfb0f Mon Sep 17 00:00:00 2001 From: Bhavan23 Date: Thu, 20 Mar 2025 19:19:47 +0530 Subject: [PATCH 1534/1614] fix(accounting): update outstanding amount based on update_outstanding_for_self fix(accounting): against voucher has been already paid show proper message and update update_outstanding_for_self as 1 (cherry picked from commit 222f1834f1c4264bdea2a64ecc69a87ef7124106) # Conflicts: # erpnext/controllers/accounts_controller.py --- erpnext/controllers/accounts_controller.py | 46 ++++++++++++++++++++++ erpnext/controllers/taxes_and_totals.py | 3 ++ 2 files changed, 49 insertions(+) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index bcaf8f897f9..d8581f58a4f 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -165,6 +165,48 @@ class AccountsController(TransactionBase): raise_exception=1, ) + def validate_against_voucher_outstanding(self): + from frappe.model.meta import get_meta + + if not get_meta(self.doctype).has_field("outstanding_amount"): + return + + if self.get("is_return") and self.return_against and not self.get("is_pos"): + against_voucher_outstanding = frappe.get_value( + self.doctype, self.return_against, "outstanding_amount" + ) + document_type = "Credit Note" if self.doctype == "Sales Invoice" else "Debit Note" + + msg = "" + if self.get("update_outstanding_for_self"): + msg = ( + "We can see {0} is made against {1}. If you want {1}'s outstanding to be updated, " + "uncheck '{2}' checkbox.

Or" + ).format( + frappe.bold(document_type), + get_link_to_form(self.doctype, self.get("return_against")), + frappe.bold(_("Update Outstanding for Self")), + ) + + elif not self.update_outstanding_for_self and ( + abs(flt(self.rounded_total) or flt(self.grand_total)) > flt(against_voucher_outstanding) + ): + self.update_outstanding_for_self = 1 + msg = ( + "The outstanding amount {} in {} is lesser than {}. Updating the outstanding to this invoice.

And" + ).format( + against_voucher_outstanding, + get_link_to_form(self.doctype, self.get("return_against")), + flt(abs(self.outstanding_amount)), + ) + + if msg: + msg += " you can use {} tool to reconcile against {} later.".format( + get_link_to_form("Payment Reconciliation"), + get_link_to_form(self.doctype, self.get("return_against")), + ) + frappe.msgprint(_(msg)) + def validate(self): if not self.get("is_return") and not self.get("is_debit_note"): self.validate_qty_is_not_zero() @@ -193,6 +235,7 @@ class AccountsController(TransactionBase): self.disable_tax_included_prices_for_internal_transfer() self.set_incoming_rate() self.init_internal_values() + self.validate_against_voucher_outstanding() # Need to set taxes based on taxes_and_charges template # before calculating taxes and totals @@ -228,6 +271,7 @@ class AccountsController(TransactionBase): ) ) +<<<<<<< HEAD if self.get("is_return") and self.get("return_against") and not self.get("is_pos"): if self.get("update_outstanding_for_self"): document_type = "Credit Note" if self.doctype == "Sales Invoice" else "Debit Note" @@ -242,6 +286,8 @@ class AccountsController(TransactionBase): ) ) +======= +>>>>>>> 222f1834f1 (fix(accounting): update outstanding amount based on update_outstanding_for_self) pos_check_field = "is_pos" if self.doctype == "Sales Invoice" else "is_paid" if cint(self.allocate_advances_automatically) and not cint(self.get(pos_check_field)): self.set_advances() diff --git a/erpnext/controllers/taxes_and_totals.py b/erpnext/controllers/taxes_and_totals.py index 091b08cad0f..955c9261031 100644 --- a/erpnext/controllers/taxes_and_totals.py +++ b/erpnext/controllers/taxes_and_totals.py @@ -819,9 +819,12 @@ class calculate_taxes_and_totals: if ( self.doc.is_return and self.doc.return_against + and not self.doc.update_outstanding_for_self and not self.doc.get("is_pos") or self.is_internal_invoice() ): + # Do not calculate the outstanding amount for a return invoice if 'update_outstanding_for_self' is not enabled. + self.doc.outstanding_amount = 0 return self.doc.round_floats_in(self.doc, ["grand_total", "total_advance", "write_off_amount"]) From 88e11d6fd94f6aa0e224b29f50b63d176d689c97 Mon Sep 17 00:00:00 2001 From: Bhavan23 Date: Thu, 20 Mar 2025 19:20:41 +0530 Subject: [PATCH 1535/1614] test: add unit test to validate outstanding amount for update_outstanding_for_self checkbox enabled (cherry picked from commit 7b0882600a29ddd641115c062e961cedc84477dd) --- .../sales_invoice/test_sales_invoice.py | 29 +++++ .../test_accounts_receivable.py | 106 +++++++++++++++++- 2 files changed, 131 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py index fe8342d78bd..d2398d21f4e 100644 --- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py @@ -4284,6 +4284,35 @@ class TestSalesInvoice(FrappeTestCase): pos_return = make_sales_return(pos.name) self.assertEqual(abs(pos_return.payments[0].amount), pos.payments[0].amount) + def test_create_return_invoice_for_self_update(self): + from erpnext.accounts.doctype.payment_entry.payment_entry import get_payment_entry + from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice + from erpnext.controllers.sales_and_purchase_return import make_return_doc + + invoice = create_sales_invoice() + + payment_entry = get_payment_entry(dt=invoice.doctype, dn=invoice.name) + payment_entry.reference_no = "test001" + payment_entry.reference_date = getdate() + + payment_entry.save() + payment_entry.submit() + + r_invoice = make_return_doc(invoice.doctype, invoice.name) + + r_invoice.update_outstanding_for_self = 0 + r_invoice.save() + + self.assertEqual(r_invoice.update_outstanding_for_self, 1) + + r_invoice.submit() + + self.assertNotEqual(r_invoice.outstanding_amount, 0) + + invoice.reload() + + self.assertEqual(invoice.outstanding_amount, 0) + def test_prevents_fully_returned_invoice_with_zero_quantity(self): from erpnext.controllers.sales_and_purchase_return import StockOverReturnError, make_return_doc diff --git a/erpnext/accounts/report/accounts_receivable/test_accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/test_accounts_receivable.py index 39ca78153c3..44fee120d8b 100644 --- a/erpnext/accounts/report/accounts_receivable/test_accounts_receivable.py +++ b/erpnext/accounts/report/accounts_receivable/test_accounts_receivable.py @@ -21,7 +21,7 @@ class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase): def tearDown(self): frappe.db.rollback() - def create_sales_invoice(self, no_payment_schedule=False, do_not_submit=False): + def create_sales_invoice(self, no_payment_schedule=False, do_not_submit=False, **args): frappe.set_user("Administrator") si = create_sales_invoice( item=self.item, @@ -34,6 +34,7 @@ class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase): rate=100, price_list_rate=100, do_not_save=1, + **args, ) if not no_payment_schedule: si.append( @@ -108,7 +109,7 @@ class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase): self.assertEqual(expected_data[0], [row.invoiced, row.paid, row.credit_note]) pos_inv.cancel() - def test_accounts_receivable(self): + def test_accounts_receivable_with_payment(self): filters = { "company": self.company, "based_on_payment_terms": 1, @@ -145,11 +146,15 @@ class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase): cr_note = self.create_credit_note(si.name, do_not_submit=True) cr_note.update_outstanding_for_self = False cr_note.save().submit() + + # as the invoice partially paid and returning the full amount so the outstanding amount should be True + self.assertEqual(cr_note.update_outstanding_for_self, True) + report = execute(filters) - expected_data_after_credit_note = [100, 0, 0, 40, -40, self.debit_to] + expected_data_after_credit_note = [0, 0, 100, 0, -100, self.debit_to] - row = report[1][0] + row = report[1][-1] self.assertEqual( expected_data_after_credit_note, [ @@ -162,6 +167,99 @@ class TestAccountsReceivable(AccountsTestMixin, FrappeTestCase): ], ) + def test_accounts_receivable_without_payment(self): + filters = { + "company": self.company, + "based_on_payment_terms": 1, + "report_date": today(), + "range": "30, 60, 90, 120", + "show_remarks": True, + } + + # check invoice grand total and invoiced column's value for 3 payment terms + si = self.create_sales_invoice() + + report = execute(filters) + + expected_data = [[100, 30, "No Remarks"], [100, 50, "No Remarks"], [100, 20, "No Remarks"]] + + for i in range(3): + row = report[1][i - 1] + self.assertEqual(expected_data[i - 1], [row.invoice_grand_total, row.invoiced, row.remarks]) + + # check invoice grand total, invoiced, paid and outstanding column's value after credit note + cr_note = self.create_credit_note(si.name, do_not_submit=True) + cr_note.update_outstanding_for_self = False + cr_note.save().submit() + + self.assertEqual(cr_note.update_outstanding_for_self, False) + + report = execute(filters) + + row = report[1] + self.assertTrue(len(row) == 0) + + def test_accounts_receivable_with_partial_payment(self): + filters = { + "company": self.company, + "based_on_payment_terms": 1, + "report_date": today(), + "range": "30, 60, 90, 120", + "show_remarks": True, + } + + # check invoice grand total and invoiced column's value for 3 payment terms + si = self.create_sales_invoice(qty=2) + + report = execute(filters) + + expected_data = [[200, 60, "No Remarks"], [200, 100, "No Remarks"], [200, 40, "No Remarks"]] + + for i in range(3): + row = report[1][i - 1] + self.assertEqual(expected_data[i - 1], [row.invoice_grand_total, row.invoiced, row.remarks]) + + # check invoice grand total, invoiced, paid and outstanding column's value after payment + self.create_payment_entry(si.name) + report = execute(filters) + + expected_data_after_payment = [[200, 60, 40, 20], [200, 100, 0, 100], [200, 40, 0, 40]] + + for i in range(3): + row = report[1][i - 1] + self.assertEqual( + expected_data_after_payment[i - 1], + [row.invoice_grand_total, row.invoiced, row.paid, row.outstanding], + ) + + # check invoice grand total, invoiced, paid and outstanding column's value after credit note + cr_note = self.create_credit_note(si.name, do_not_submit=True) + cr_note.update_outstanding_for_self = False + cr_note.save().submit() + + self.assertFalse(cr_note.update_outstanding_for_self) + + report = execute(filters) + + expected_data_after_credit_note = [ + [200, 100, 0, 80, 20, self.debit_to], + [200, 40, 0, 0, 40, self.debit_to], + ] + + for i in range(2): + row = report[1][i - 1] + self.assertEqual( + expected_data_after_credit_note[i - 1], + [ + row.invoice_grand_total, + row.invoiced, + row.paid, + row.credit_note, + row.outstanding, + row.party_account, + ], + ) + def test_cr_note_flag_to_update_self(self): filters = { "company": self.company, From d6b488f52962a30f0374d9997c242c41b0b8d721 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 8 Apr 2025 14:36:15 +0530 Subject: [PATCH 1536/1614] chore: resolve conflict --- erpnext/controllers/accounts_controller.py | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index d8581f58a4f..31d157bed08 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -271,23 +271,6 @@ class AccountsController(TransactionBase): ) ) -<<<<<<< HEAD - if self.get("is_return") and self.get("return_against") and not self.get("is_pos"): - if self.get("update_outstanding_for_self"): - document_type = "Credit Note" if self.doctype == "Sales Invoice" else "Debit Note" - frappe.msgprint( - _( - "We can see {0} is made against {1}. If you want {1}'s outstanding to be updated, uncheck '{2}' checkbox.

Or you can use {3} tool to reconcile against {1} later." - ).format( - frappe.bold(document_type), - get_link_to_form(self.doctype, self.get("return_against")), - frappe.bold(_("Update Outstanding for Self")), - get_link_to_form("Payment Reconciliation", "Payment Reconciliation"), - ) - ) - -======= ->>>>>>> 222f1834f1 (fix(accounting): update outstanding amount based on update_outstanding_for_self) pos_check_field = "is_pos" if self.doctype == "Sales Invoice" else "is_paid" if cint(self.allocate_advances_automatically) and not cint(self.get(pos_check_field)): self.set_advances() From cf7252d3e732759d8d160335e501fdb0972856ad Mon Sep 17 00:00:00 2001 From: Gursheen Anand Date: Fri, 2 Feb 2024 21:57:45 +0530 Subject: [PATCH 1537/1614] fix: check payments against orders for getting request amount (cherry picked from commit f7face43cdcc9ef4e9d7a8cd90b0de8fc567d4e3) # Conflicts: # erpnext/accounts/doctype/payment_request/payment_request.py --- .../payment_request/payment_request.py | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/erpnext/accounts/doctype/payment_request/payment_request.py b/erpnext/accounts/doctype/payment_request/payment_request.py index 4f6205a2445..317090e7547 100644 --- a/erpnext/accounts/doctype/payment_request/payment_request.py +++ b/erpnext/accounts/doctype/payment_request/payment_request.py @@ -3,7 +3,11 @@ import json import frappe from frappe import _, qb from frappe.model.document import Document +<<<<<<< HEAD from frappe.query_builder.functions import Abs, Sum +======= +from frappe.query_builder.functions import Sum +>>>>>>> f7face43cd (fix: check payments against orders for getting request amount) from frappe.utils import flt, nowdate from frappe.utils.background_jobs import enqueue @@ -127,6 +131,8 @@ class PaymentRequest(Document): ref_doc = frappe.get_doc(self.reference_doctype, self.reference_name) if not hasattr(ref_doc, "order_type") or ref_doc.order_type != "Shopping Cart": ref_amount = get_amount(ref_doc, self.payment_account) + if not ref_amount: + frappe.throw(_("Payment Entry is already created")) if existing_payment_request_amount + flt(self.grand_total) > ref_amount: frappe.throw( @@ -544,6 +550,8 @@ def make_payment_request(**args): gateway_account = get_gateway_details(args) or frappe._dict() grand_total = get_amount(ref_doc, gateway_account.get("payment_account")) + if not grand_total: + frappe.throw(_("Payment Entry is already created")) if args.loyalty_points and args.dt == "Sales Order": from erpnext.accounts.doctype.loyalty_program.loyalty_program import validate_loyalty_points @@ -678,6 +686,7 @@ def get_amount(ref_doc, payment_account=None): dt = ref_doc.doctype if dt in ["Sales Order", "Purchase Order"]: grand_total = flt(ref_doc.rounded_total) or flt(ref_doc.grand_total) + grand_total -= get_paid_amount_against_order(dt, ref_doc.name) elif dt in ["Sales Invoice", "Purchase Invoice"]: if not ref_doc.get("is_pos"): if ref_doc.party_account_currency == ref_doc.currency: @@ -699,10 +708,14 @@ def get_amount(ref_doc, payment_account=None): elif dt == "Fees": grand_total = ref_doc.outstanding_amount +<<<<<<< HEAD if grand_total > 0: return flt(grand_total, get_currency_precision()) else: frappe.throw(_("Payment Entry is already created")) +======= + return grand_total +>>>>>>> f7face43cd (fix: check payments against orders for getting request amount) def get_irequest_status(payment_requests: None | list = None) -> list: @@ -992,6 +1005,7 @@ def validate_payment(doc, method=None): ) +<<<<<<< HEAD @frappe.whitelist() def get_open_payment_requests_query(doctype, txt, searchfield, start, page_len, filters): # permission checks in `get_list()` @@ -1032,3 +1046,27 @@ def get_irequests_of_payment_request(doc: str | None = None) -> list: }, ) return res +======= +def get_paid_amount_against_order(dt, dn): + pe_ref = frappe.qb.DocType("Payment Entry Reference") + if dt == "Sales Order": + inv_dt, inv_field = "Sales Invoice Item", "sales_order" + else: + inv_dt, inv_field = "Purchase Invoice Item", "purchase_order" + inv_item = frappe.qb.DocType(inv_dt) + return ( + frappe.qb.from_(pe_ref) + .select( + Sum(pe_ref.allocated_amount), + ) + .where( + (pe_ref.docstatus == 1) + & ( + (pe_ref.reference_name == dn) + | pe_ref.reference_name.isin( + frappe.qb.from_(inv_item).select(inv_item.parent).where(inv_item[inv_field] == dn).distinct() + ) + ) + ) + ).run()[0][0] or 0 +>>>>>>> f7face43cd (fix: check payments against orders for getting request amount) From b0302d71b7a001e1298f3cc5c43c793c6525da32 Mon Sep 17 00:00:00 2001 From: Gursheen Anand Date: Fri, 2 Feb 2024 21:59:53 +0530 Subject: [PATCH 1538/1614] fix(portal): payment amount for orders (cherry picked from commit c18ff5bd253878da2f71690f194e8fedd07b2a87) # Conflicts: # erpnext/templates/pages/order.py --- erpnext/templates/pages/order.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/erpnext/templates/pages/order.py b/erpnext/templates/pages/order.py index dca5a0c7497..dff982ed838 100644 --- a/erpnext/templates/pages/order.py +++ b/erpnext/templates/pages/order.py @@ -4,9 +4,13 @@ import frappe from frappe import _ +<<<<<<< HEAD from erpnext.accounts.doctype.payment_request.payment_request import ( ALLOWED_DOCTYPES_FOR_PAYMENT_REQUEST, ) +======= +from erpnext.accounts.doctype.payment_request.payment_request import get_amount +>>>>>>> c18ff5bd25 (fix(portal): payment amount for orders) def get_context(context): @@ -50,11 +54,15 @@ def get_context(context): ) context.available_loyalty_points = int(loyalty_program_details.get("loyalty_points")) +<<<<<<< HEAD context.show_pay_button = ( "payments" in frappe.get_installed_apps() and frappe.db.get_single_value("Buying Settings", "show_pay_button") and context.doc.doctype in ALLOWED_DOCTYPES_FOR_PAYMENT_REQUEST ) +======= + context.show_pay_button, context.pay_amount = get_payment_details(context.doc) +>>>>>>> c18ff5bd25 (fix(portal): payment amount for orders) context.show_make_pi_button = False if context.doc.get("supplier"): # show Make Purchase Invoice button based on permission @@ -67,3 +75,14 @@ def get_attachments(dt, dn): fields=["name", "file_name", "file_url", "is_private"], filters={"attached_to_name": dn, "attached_to_doctype": dt, "is_private": 0}, ) + + +def get_payment_details(doc): + show_pay_button, amount = ( + "payments" in frappe.get_installed_apps() + and frappe.db.get_single_value("Buying Settings", "show_pay_button") + ), 0 + if not show_pay_button: + return show_pay_button, amount + amount = get_amount(doc) + return bool(amount), amount From b7ae17aaaf18be38be8ac53c826ff4f9a73a9058 Mon Sep 17 00:00:00 2001 From: Gursheen Anand Date: Fri, 2 Feb 2024 22:01:42 +0530 Subject: [PATCH 1539/1614] fix(portal): context pay_amount for button (cherry picked from commit 7efb5a8cb5d581d2ddfcc728f600bf5ba9649ad5) # Conflicts: # erpnext/templates/pages/order.html --- erpnext/templates/pages/order.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/erpnext/templates/pages/order.html b/erpnext/templates/pages/order.html index 315478fc649..f5e7dadde7f 100644 --- a/erpnext/templates/pages/order.html +++ b/erpnext/templates/pages/order.html @@ -40,7 +40,11 @@

+<<<<<<< HEAD {{ _("Pay", null, "Amount") }} {{doc.get_formatted("grand_total") }} +======= + {{ _("Pay") }} {{ pay_amount }} +>>>>>>> 7efb5a8cb5 (fix(portal): context pay_amount for button)

From 4eb0f39af720b845959b551d70f2129e5ac7a40d Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 8 Apr 2025 15:15:16 +0530 Subject: [PATCH 1540/1614] chore: pass doctype and name --- erpnext/controllers/accounts_controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 31d157bed08..46418ca8a63 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -202,7 +202,7 @@ class AccountsController(TransactionBase): if msg: msg += " you can use {} tool to reconcile against {} later.".format( - get_link_to_form("Payment Reconciliation"), + get_link_to_form("Payment Reconciliation", "Payment Reconciliation"), get_link_to_form(self.doctype, self.get("return_against")), ) frappe.msgprint(_(msg)) From 4d8984e4e962562c768227d72f36326eff8f8fe0 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Tue, 8 Apr 2025 15:54:44 +0530 Subject: [PATCH 1541/1614] fix: resolve conflicts --- .../payment_request/payment_request.py | 34 ------------------- erpnext/templates/pages/order.html | 6 +--- erpnext/templates/pages/order.py | 24 +++++-------- 3 files changed, 10 insertions(+), 54 deletions(-) diff --git a/erpnext/accounts/doctype/payment_request/payment_request.py b/erpnext/accounts/doctype/payment_request/payment_request.py index 317090e7547..8cb9eb6b5d9 100644 --- a/erpnext/accounts/doctype/payment_request/payment_request.py +++ b/erpnext/accounts/doctype/payment_request/payment_request.py @@ -3,11 +3,7 @@ import json import frappe from frappe import _, qb from frappe.model.document import Document -<<<<<<< HEAD from frappe.query_builder.functions import Abs, Sum -======= -from frappe.query_builder.functions import Sum ->>>>>>> f7face43cd (fix: check payments against orders for getting request amount) from frappe.utils import flt, nowdate from frappe.utils.background_jobs import enqueue @@ -686,7 +682,6 @@ def get_amount(ref_doc, payment_account=None): dt = ref_doc.doctype if dt in ["Sales Order", "Purchase Order"]: grand_total = flt(ref_doc.rounded_total) or flt(ref_doc.grand_total) - grand_total -= get_paid_amount_against_order(dt, ref_doc.name) elif dt in ["Sales Invoice", "Purchase Invoice"]: if not ref_doc.get("is_pos"): if ref_doc.party_account_currency == ref_doc.currency: @@ -708,14 +703,10 @@ def get_amount(ref_doc, payment_account=None): elif dt == "Fees": grand_total = ref_doc.outstanding_amount -<<<<<<< HEAD if grand_total > 0: return flt(grand_total, get_currency_precision()) else: frappe.throw(_("Payment Entry is already created")) -======= - return grand_total ->>>>>>> f7face43cd (fix: check payments against orders for getting request amount) def get_irequest_status(payment_requests: None | list = None) -> list: @@ -1005,7 +996,6 @@ def validate_payment(doc, method=None): ) -<<<<<<< HEAD @frappe.whitelist() def get_open_payment_requests_query(doctype, txt, searchfield, start, page_len, filters): # permission checks in `get_list()` @@ -1046,27 +1036,3 @@ def get_irequests_of_payment_request(doc: str | None = None) -> list: }, ) return res -======= -def get_paid_amount_against_order(dt, dn): - pe_ref = frappe.qb.DocType("Payment Entry Reference") - if dt == "Sales Order": - inv_dt, inv_field = "Sales Invoice Item", "sales_order" - else: - inv_dt, inv_field = "Purchase Invoice Item", "purchase_order" - inv_item = frappe.qb.DocType(inv_dt) - return ( - frappe.qb.from_(pe_ref) - .select( - Sum(pe_ref.allocated_amount), - ) - .where( - (pe_ref.docstatus == 1) - & ( - (pe_ref.reference_name == dn) - | pe_ref.reference_name.isin( - frappe.qb.from_(inv_item).select(inv_item.parent).where(inv_item[inv_field] == dn).distinct() - ) - ) - ) - ).run()[0][0] or 0 ->>>>>>> f7face43cd (fix: check payments against orders for getting request amount) diff --git a/erpnext/templates/pages/order.html b/erpnext/templates/pages/order.html index f5e7dadde7f..0805a32ae33 100644 --- a/erpnext/templates/pages/order.html +++ b/erpnext/templates/pages/order.html @@ -40,11 +40,7 @@

-<<<<<<< HEAD - {{ _("Pay", null, "Amount") }} {{doc.get_formatted("grand_total") }} -======= - {{ _("Pay") }} {{ pay_amount }} ->>>>>>> 7efb5a8cb5 (fix(portal): context pay_amount for button) + {{ _("Pay", null, "Amount") }} {{ pay_amount }}

diff --git a/erpnext/templates/pages/order.py b/erpnext/templates/pages/order.py index dff982ed838..dcf3b046722 100644 --- a/erpnext/templates/pages/order.py +++ b/erpnext/templates/pages/order.py @@ -4,13 +4,10 @@ import frappe from frappe import _ -<<<<<<< HEAD from erpnext.accounts.doctype.payment_request.payment_request import ( ALLOWED_DOCTYPES_FOR_PAYMENT_REQUEST, + get_amount, ) -======= -from erpnext.accounts.doctype.payment_request.payment_request import get_amount ->>>>>>> c18ff5bd25 (fix(portal): payment amount for orders) def get_context(context): @@ -54,15 +51,7 @@ def get_context(context): ) context.available_loyalty_points = int(loyalty_program_details.get("loyalty_points")) -<<<<<<< HEAD - context.show_pay_button = ( - "payments" in frappe.get_installed_apps() - and frappe.db.get_single_value("Buying Settings", "show_pay_button") - and context.doc.doctype in ALLOWED_DOCTYPES_FOR_PAYMENT_REQUEST - ) -======= context.show_pay_button, context.pay_amount = get_payment_details(context.doc) ->>>>>>> c18ff5bd25 (fix(portal): payment amount for orders) context.show_make_pi_button = False if context.doc.get("supplier"): # show Make Purchase Invoice button based on permission @@ -79,10 +68,15 @@ def get_attachments(dt, dn): def get_payment_details(doc): show_pay_button, amount = ( - "payments" in frappe.get_installed_apps() - and frappe.db.get_single_value("Buying Settings", "show_pay_button") - ), 0 + ( + "payments" in frappe.get_installed_apps() + and frappe.db.get_single_value("Buying Settings", "show_pay_button") + and doc.doctype in ALLOWED_DOCTYPES_FOR_PAYMENT_REQUEST + ), + 0, + ) if not show_pay_button: return show_pay_button, amount + amount = get_amount(doc) return bool(amount), amount From 23c76aa530cd07c428cc23daf17b3bdcfabb025b Mon Sep 17 00:00:00 2001 From: ljain112 Date: Thu, 20 Mar 2025 19:10:36 +0530 Subject: [PATCH 1542/1614] fix: correct payment request amount (cherry picked from commit 913c60d77b889c3341ec4751307b83ed396e1ff5) # Conflicts: # erpnext/accounts/doctype/payment_request/payment_request.py --- .../payment_request/payment_request.py | 124 +++++++----------- .../payment_request/test_payment_request.py | 25 +++- 2 files changed, 74 insertions(+), 75 deletions(-) diff --git a/erpnext/accounts/doctype/payment_request/payment_request.py b/erpnext/accounts/doctype/payment_request/payment_request.py index 8cb9eb6b5d9..3f20f0f6849 100644 --- a/erpnext/accounts/doctype/payment_request/payment_request.py +++ b/erpnext/accounts/doctype/payment_request/payment_request.py @@ -1,9 +1,9 @@ import json import frappe -from frappe import _, qb +from frappe import _ from frappe.model.document import Document -from frappe.query_builder.functions import Abs, Sum +from frappe.query_builder.functions import Sum from frappe.utils import flt, nowdate from frappe.utils.background_jobs import enqueue @@ -12,7 +12,6 @@ from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import ( get_accounting_dimensions, ) from erpnext.accounts.doctype.payment_entry.payment_entry import ( - get_company_defaults, get_payment_entry, ) from erpnext.accounts.doctype.subscription_plan.subscription_plan import get_plan_rate @@ -120,16 +119,14 @@ class PaymentRequest(Document): title=_("Invalid Amount"), ) - existing_payment_request_amount = flt( - get_existing_payment_request_amount(self.reference_doctype, self.reference_name) - ) - ref_doc = frappe.get_doc(self.reference_doctype, self.reference_name) if not hasattr(ref_doc, "order_type") or ref_doc.order_type != "Shopping Cart": ref_amount = get_amount(ref_doc, self.payment_account) if not ref_amount: frappe.throw(_("Payment Entry is already created")) + existing_payment_request_amount = flt(get_existing_payment_request_amount(ref_doc)) + if existing_payment_request_amount + flt(self.grand_total) > ref_amount: frappe.throw( _("Total Payment Request amount cannot be greater than {0} amount").format( @@ -558,6 +555,7 @@ def make_payment_request(**args): frappe.db.set_value("Sales Order", args.dn, "loyalty_amount", loyalty_amount, update_modified=False) grand_total = grand_total - loyalty_amount +<<<<<<< HEAD bank_account = ( get_party_bank_account(args.get("party_type"), args.get("party")) if args.get("party_type") else "" ) @@ -567,10 +565,10 @@ def make_payment_request(**args): {"reference_doctype": args.dt, "reference_name": args.dn, "docstatus": 0}, ) +======= +>>>>>>> 913c60d77b (fix: correct payment request amount) # fetches existing payment request `grand_total` amount - existing_payment_request_amount = get_existing_payment_request_amount(ref_doc.doctype, ref_doc.name) - - existing_paid_amount = get_existing_paid_amount(ref_doc.doctype, ref_doc.name) + existing_payment_request_amount = get_existing_payment_request_amount(ref_doc) def validate_and_calculate_grand_total(grand_total, existing_payment_request_amount): grand_total -= existing_payment_request_amount @@ -582,7 +580,7 @@ def make_payment_request(**args): if args.order_type == "Shopping Cart": # If Payment Request is in an advanced stage, then create for remaining amount. if get_existing_payment_request_amount( - ref_doc.doctype, ref_doc.name, ["Initiated", "Partially Paid", "Payment Ordered", "Paid"] + ref_doc, ["Initiated", "Partially Paid", "Payment Ordered", "Paid"] ): grand_total = validate_and_calculate_grand_total(grand_total, existing_payment_request_amount) else: @@ -591,14 +589,10 @@ def make_payment_request(**args): else: grand_total = validate_and_calculate_grand_total(grand_total, existing_payment_request_amount) - if existing_paid_amount: - if ref_doc.party_account_currency == ref_doc.currency: - if ref_doc.conversion_rate: - grand_total -= flt(existing_paid_amount / ref_doc.conversion_rate) - else: - grand_total -= flt(existing_paid_amount) - else: - grand_total -= flt(existing_paid_amount / ref_doc.conversion_rate) + draft_payment_request = frappe.db.get_value( + "Payment Request", + {"reference_doctype": ref_doc.doctype, "reference_name": ref_doc.name, "docstatus": 0}, + ) if draft_payment_request: frappe.db.set_value( @@ -606,6 +600,11 @@ def make_payment_request(**args): ) pr = frappe.get_doc("Payment Request", draft_payment_request) else: + bank_account = ( + get_party_bank_account(args.get("party_type"), args.get("party")) + if args.get("party_type") + else "" + ) pr = frappe.new_doc("Payment Request") if not args.get("payment_request_type"): @@ -679,22 +678,35 @@ def make_payment_request(**args): def get_amount(ref_doc, payment_account=None): """get amount based on doctype""" + grand_total = 0 + dt = ref_doc.doctype if dt in ["Sales Order", "Purchase Order"]: - grand_total = flt(ref_doc.rounded_total) or flt(ref_doc.grand_total) + grand_total = (flt(ref_doc.rounded_total) or flt(ref_doc.grand_total)) - ref_doc.advance_paid elif dt in ["Sales Invoice", "Purchase Invoice"]: - if not ref_doc.get("is_pos"): + if ( + dt == "Sales Invoice" + and ref_doc.is_pos + and ref_doc.payments + and any( + [ + payment.type == "Phone" and payment.account == payment_account + for payment in ref_doc.payments + ] + ) + ): + grand_total = sum( + [ + payment.amount + for payment in ref_doc.payments + if payment.type == "Phone" and payment.account == payment_account + ] + ) + else: if ref_doc.party_account_currency == ref_doc.currency: - grand_total = flt(ref_doc.rounded_total or ref_doc.grand_total) + grand_total = flt(ref_doc.outstanding_amount) else: - grand_total = flt( - flt(ref_doc.base_rounded_total or ref_doc.base_grand_total) / ref_doc.conversion_rate - ) - elif dt == "Sales Invoice": - for pay in ref_doc.payments: - if pay.type == "Phone" and pay.account == payment_account: - grand_total = pay.amount - break + grand_total = flt(flt(ref_doc.outstanding_amount) / ref_doc.conversion_rate) elif dt == "POS Invoice": for pay in ref_doc.payments: if pay.type == "Phone" and pay.account == payment_account: @@ -703,10 +715,7 @@ def get_amount(ref_doc, payment_account=None): elif dt == "Fees": grand_total = ref_doc.outstanding_amount - if grand_total > 0: - return flt(grand_total, get_currency_precision()) - else: - frappe.throw(_("Payment Entry is already created")) + return flt(grand_total, get_currency_precision()) if grand_total > 0 else 0 def get_irequest_status(payment_requests: None | list = None) -> list: @@ -749,7 +758,7 @@ def cancel_old_payment_requests(ref_dt, ref_dn): frappe.db.set_value("Integration Request", ireq.name, "status", "Cancelled") -def get_existing_payment_request_amount(ref_dt, ref_dn, statuses: list | None = None) -> list: +def get_existing_payment_request_amount(ref_doc, statuses: list | None = None) -> list: """ Return the total amount of Payment Requests against a reference document. """ @@ -757,9 +766,9 @@ def get_existing_payment_request_amount(ref_dt, ref_dn, statuses: list | None = query = ( frappe.qb.from_(PR) - .select(Sum(PR.grand_total)) - .where(PR.reference_doctype == ref_dt) - .where(PR.reference_name == ref_dn) + .select(Sum(PR.outstanding_amount)) + .where(PR.reference_doctype == ref_doc.doctype) + .where(PR.reference_name == ref_doc.name) .where(PR.docstatus == 1) ) @@ -768,43 +777,12 @@ def get_existing_payment_request_amount(ref_dt, ref_dn, statuses: list | None = response = query.run() - return response[0][0] if response[0] else 0 + os_amount_in_transaction_currency = flt(response[0][0] if response[0] else 0) + if ref_doc.currency != ref_doc.party_account_currency: + os_amount_in_transaction_currency = flt(os_amount_in_transaction_currency / ref_doc.conversion_rate) -def get_existing_paid_amount(doctype, name): - PLE = frappe.qb.DocType("Payment Ledger Entry") - PER = frappe.qb.DocType("Payment Entry Reference") - - query = ( - frappe.qb.from_(PLE) - .left_join(PER) - .on( - (PLE.against_voucher_type == PER.reference_doctype) - & (PLE.against_voucher_no == PER.reference_name) - & (PLE.voucher_type == PER.parenttype) - & (PLE.voucher_no == PER.parent) - ) - .select( - Abs(Sum(PLE.amount)).as_("total_amount"), - Abs(Sum(frappe.qb.terms.Case().when(PER.payment_request.isnotnull(), PLE.amount).else_(0))).as_( - "request_paid_amount" - ), - ) - .where( - (PLE.voucher_type.isin([doctype, "Journal Entry", "Payment Entry"])) - & (PLE.against_voucher_type == doctype) - & (PLE.against_voucher_no == name) - & (PLE.delinked == 0) - & (PLE.docstatus == 1) - & (PLE.amount < 0) - ) - ) - - result = query.run() - ledger_amount = flt(result[0][0]) if result else 0 - request_paid_amount = flt(result[0][1]) if result else 0 - - return ledger_amount - request_paid_amount + return os_amount_in_transaction_currency def get_gateway_details(args): # nosemgrep diff --git a/erpnext/accounts/doctype/payment_request/test_payment_request.py b/erpnext/accounts/doctype/payment_request/test_payment_request.py index 02ecb85ac4d..c9628bda433 100644 --- a/erpnext/accounts/doctype/payment_request/test_payment_request.py +++ b/erpnext/accounts/doctype/payment_request/test_payment_request.py @@ -313,6 +313,16 @@ class TestPaymentRequest(FrappeTestCase): self.assertEqual(pr.outstanding_amount, 800) self.assertEqual(pr.grand_total, 1000) + self.assertRaisesRegex( + frappe.exceptions.ValidationError, + re.compile(r"Payment Request is already created"), + make_payment_request, + dt="Sales Order", + dn=so.name, + mute_email=1, + submit_doc=1, + return_doc=1, + ) # complete payment pe = pr.create_payment_entry() @@ -331,7 +341,7 @@ class TestPaymentRequest(FrappeTestCase): # creating a more payment Request must not allowed self.assertRaisesRegex( frappe.exceptions.ValidationError, - re.compile(r"Payment Request is already created"), + re.compile(r"Payment Entry is already created"), make_payment_request, dt="Sales Order", dn=so.name, @@ -361,6 +371,17 @@ class TestPaymentRequest(FrappeTestCase): self.assertEqual(pr.party_account_currency, "INR") self.assertEqual(pr.status, "Initiated") + self.assertRaisesRegex( + frappe.exceptions.ValidationError, + re.compile(r"Payment Request is already created"), + make_payment_request, + dt="Purchase Invoice", + dn=pi.name, + mute_email=1, + submit_doc=1, + return_doc=1, + ) + # to make partial payment pe = pr.create_payment_entry(submit=False) pe.paid_amount = 2000 @@ -389,7 +410,7 @@ class TestPaymentRequest(FrappeTestCase): # creating a more payment Request must not allowed self.assertRaisesRegex( frappe.exceptions.ValidationError, - re.compile(r"Payment Request is already created"), + re.compile(r"Payment Entry is already created"), make_payment_request, dt="Purchase Invoice", dn=pi.name, From e271933e43a9d2b7112004c1f204c48d0280e3b4 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 8 Apr 2025 13:22:33 +0530 Subject: [PATCH 1543/1614] chore: resolve conflict --- .../doctype/payment_request/payment_request.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/erpnext/accounts/doctype/payment_request/payment_request.py b/erpnext/accounts/doctype/payment_request/payment_request.py index 3f20f0f6849..0027f0aa8be 100644 --- a/erpnext/accounts/doctype/payment_request/payment_request.py +++ b/erpnext/accounts/doctype/payment_request/payment_request.py @@ -555,18 +555,6 @@ def make_payment_request(**args): frappe.db.set_value("Sales Order", args.dn, "loyalty_amount", loyalty_amount, update_modified=False) grand_total = grand_total - loyalty_amount -<<<<<<< HEAD - bank_account = ( - get_party_bank_account(args.get("party_type"), args.get("party")) if args.get("party_type") else "" - ) - - draft_payment_request = frappe.db.get_value( - "Payment Request", - {"reference_doctype": args.dt, "reference_name": args.dn, "docstatus": 0}, - ) - -======= ->>>>>>> 913c60d77b (fix: correct payment request amount) # fetches existing payment request `grand_total` amount existing_payment_request_amount = get_existing_payment_request_amount(ref_doc) From f2df8e531d345d26c42057f17a84dc4de790bb3b Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Mon, 7 Apr 2025 11:06:19 +0530 Subject: [PATCH 1544/1614] fix: use get instead of dot operator to access dict value (cherry picked from commit 7fb75f04824320a81a601bc25ebe80886d94115c) --- erpnext/controllers/stock_controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/controllers/stock_controller.py b/erpnext/controllers/stock_controller.py index 90959479fd8..10799744d41 100644 --- a/erpnext/controllers/stock_controller.py +++ b/erpnext/controllers/stock_controller.py @@ -774,7 +774,7 @@ class StockController(AccountsController): if row.get("batch_no"): update_values["batch_no"] = None - if row.serial_and_batch_bundle: + if row.get("serial_and_batch_bundle"): update_values["serial_and_batch_bundle"] = None frappe.db.set_value( "Serial and Batch Bundle", row.serial_and_batch_bundle, {"is_cancelled": 1} From ca56150918423c197d3ffcad92d866965ebfd34c Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Tue, 8 Apr 2025 15:10:42 +0530 Subject: [PATCH 1545/1614] fix: ignore backflush setting on subcontracting return (cherry picked from commit 7479e1ec32a9572d74fd8cbc0ad91bb35586b7f4) --- erpnext/controllers/subcontracting_controller.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/erpnext/controllers/subcontracting_controller.py b/erpnext/controllers/subcontracting_controller.py index 739e64fa2eb..ba6f604960c 100644 --- a/erpnext/controllers/subcontracting_controller.py +++ b/erpnext/controllers/subcontracting_controller.py @@ -743,7 +743,9 @@ class SubcontractingController(StockController): ): continue - if self.doctype == self.subcontract_data.order_doctype or self.backflush_based_on == "BOM": + if self.doctype == self.subcontract_data.order_doctype or ( + self.backflush_based_on == "BOM" or self.is_return + ): for bom_item in self.__get_materials_from_bom( row.item_code, row.bom, row.get("include_exploded_items") ): From c472af87b2916cf0508815a84a7aa8506a6fd48a Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Fri, 7 Mar 2025 11:54:15 +0530 Subject: [PATCH 1546/1614] feat: available serial no report (cherry picked from commit 5592d8e87f3909ae5c6cfe748661dde9f3f64d1c) --- erpnext/stock/doctype/serial_no/serial_no.py | 6 + .../report/available_serial_no/__init__.py | 0 .../available_serial_no.js | 118 ++++ .../available_serial_no.json | 28 + .../available_serial_no.py | 581 ++++++++++++++++++ .../test_available_serial_no.py | 45 ++ 6 files changed, 778 insertions(+) create mode 100644 erpnext/stock/report/available_serial_no/__init__.py create mode 100644 erpnext/stock/report/available_serial_no/available_serial_no.js create mode 100644 erpnext/stock/report/available_serial_no/available_serial_no.json create mode 100644 erpnext/stock/report/available_serial_no/available_serial_no.py create mode 100644 erpnext/stock/report/available_serial_no/test_available_serial_no.py diff --git a/erpnext/stock/doctype/serial_no/serial_no.py b/erpnext/stock/doctype/serial_no/serial_no.py index 1560db6a114..eff2ef14674 100644 --- a/erpnext/stock/doctype/serial_no/serial_no.py +++ b/erpnext/stock/doctype/serial_no/serial_no.py @@ -149,6 +149,12 @@ def get_serial_nos(serial_no): return [s.strip() for s in cstr(serial_no).strip().replace(",", "\n").split("\n") if s.strip()] +def get_serial_nos_from_serial_and_batch_bundle(serial_and_batch_bundle): + table = frappe.qb.DocType("Serial and Batch Entry") + query = frappe.qb.from_(table).select(table.serial_no).where(table.parent == serial_and_batch_bundle) + return [item[0] for item in query.run(as_list=True)] + + def clean_serial_no_string(serial_no: str) -> str: if not serial_no: return "" diff --git a/erpnext/stock/report/available_serial_no/__init__.py b/erpnext/stock/report/available_serial_no/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/erpnext/stock/report/available_serial_no/available_serial_no.js b/erpnext/stock/report/available_serial_no/available_serial_no.js new file mode 100644 index 00000000000..17f8c666e04 --- /dev/null +++ b/erpnext/stock/report/available_serial_no/available_serial_no.js @@ -0,0 +1,118 @@ +// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors +// License: GNU General Public License v3. See license.txt + +frappe.query_reports["Available Serial No"] = { + filters: [ + { + fieldname: "company", + label: __("Company"), + fieldtype: "Link", + options: "Company", + default: frappe.defaults.get_user_default("Company"), + reqd: 1, + }, + { + fieldname: "from_date", + label: __("From Date"), + fieldtype: "Date", + default: frappe.datetime.add_months(frappe.datetime.get_today(), -1), + reqd: 1, + }, + { + fieldname: "to_date", + label: __("To Date"), + fieldtype: "Date", + default: frappe.datetime.get_today(), + reqd: 1, + }, + { + fieldname: "warehouse", + label: __("Warehouse"), + fieldtype: "Link", + options: "Warehouse", + get_query: function () { + const company = frappe.query_report.get_filter_value("company"); + return { + filters: { company: company }, + }; + }, + }, + { + fieldname: "item_code", + label: __("Item"), + fieldtype: "Link", + options: "Item", + get_query: function () { + return { + query: "erpnext.controllers.queries.item_query", + filters: { + has_serial_no: 1, + }, + }; + }, + }, + { + fieldname: "item_group", + label: __("Item Group"), + fieldtype: "Link", + options: "Item Group", + }, + { + fieldname: "batch_no", + label: __("Batch No"), + fieldtype: "Link", + options: "Batch", + on_change() { + const batch_no = frappe.query_report.get_filter_value("batch_no"); + if (batch_no) { + frappe.query_report.set_filter_value("segregate_serial_batch_bundle", 1); + } else { + frappe.query_report.set_filter_value("segregate_serial_batch_bundle", 0); + } + }, + }, + { + fieldname: "brand", + label: __("Brand"), + fieldtype: "Link", + options: "Brand", + }, + { + fieldname: "voucher_no", + label: __("Voucher #"), + fieldtype: "Data", + }, + { + fieldname: "project", + label: __("Project"), + fieldtype: "Link", + options: "Project", + }, + { + fieldname: "include_uom", + label: __("Include UOM"), + fieldtype: "Link", + options: "UOM", + }, + { + fieldname: "valuation_field_type", + label: __("Valuation Field Type"), + fieldtype: "Select", + width: "80", + options: "Currency\nFloat", + default: "Currency", + }, + ], + formatter: function (value, row, column, data, default_formatter) { + value = default_formatter(value, row, column, data); + if (column.fieldname == "out_qty" && data && data.out_qty < 0) { + value = "" + value + ""; + } else if (column.fieldname == "in_qty" && data && data.in_qty > 0) { + value = "" + value + ""; + } + + return value; + }, +}; + +erpnext.utils.add_inventory_dimensions("Balance Serial No", 10); diff --git a/erpnext/stock/report/available_serial_no/available_serial_no.json b/erpnext/stock/report/available_serial_no/available_serial_no.json new file mode 100644 index 00000000000..63bba01e7fa --- /dev/null +++ b/erpnext/stock/report/available_serial_no/available_serial_no.json @@ -0,0 +1,28 @@ +{ + "add_total_row": 0, + "apply_user_permissions": 1, + "creation": "2025-03-07 10:54:09.429215", + "disabled": 0, + "docstatus": 0, + "doctype": "Report", + "idx": 0, + "is_standard": "Yes", + "modified": "2025-03-07 10:54:09.429215", + "modified_by": "Administrator", + "module": "Stock", + "name": "Available Serial No", + "owner": "Administrator", + "prepared_report": 0, + "ref_doctype": "Stock Ledger Entry", + "report_name": "Available Serial No", + "report_type": "Script Report", + "roles": [ + { + "role": "Stock User" + }, + { + "role": "Accounts Manager" + } + ], + "timeout": 0 +} \ No newline at end of file diff --git a/erpnext/stock/report/available_serial_no/available_serial_no.py b/erpnext/stock/report/available_serial_no/available_serial_no.py new file mode 100644 index 00000000000..e1839f8957f --- /dev/null +++ b/erpnext/stock/report/available_serial_no/available_serial_no.py @@ -0,0 +1,581 @@ +# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors +# License: GNU General Public License v3. See license.txt + + +from collections import defaultdict + +import frappe +from frappe import _ +from frappe.query_builder.functions import CombineDatetime, Sum +from frappe.utils import cint, flt, get_datetime + +from erpnext.stock.doctype.inventory_dimension.inventory_dimension import get_inventory_dimensions +from erpnext.stock.doctype.serial_no.serial_no import ( + get_serial_nos, + get_serial_nos_from_serial_and_batch_bundle, +) +from erpnext.stock.doctype.stock_reconciliation.stock_reconciliation import get_stock_balance_for +from erpnext.stock.doctype.warehouse.warehouse import apply_warehouse_filter +from erpnext.stock.utils import ( + is_reposting_item_valuation_in_progress, + update_included_uom_in_report, +) + + +def execute(filters=None): + is_reposting_item_valuation_in_progress() + include_uom = filters.get("include_uom") + columns = get_columns(filters) + items = get_items(filters) + sl_entries = get_stock_ledger_entries(filters, items) + item_details = get_item_details(items, sl_entries, include_uom) + if filters.get("batch_no"): + opening_row = get_opening_balance_from_batch(filters, columns, sl_entries) + else: + opening_row = get_opening_balance(filters, columns, sl_entries) + + precision = cint(frappe.db.get_single_value("System Settings", "float_precision")) + + data = [] + conversion_factors = [] + if opening_row: + data.append(opening_row) + conversion_factors.append(0) + + actual_qty = stock_value = 0 + if opening_row: + actual_qty = opening_row.get("qty_after_transaction") + stock_value = opening_row.get("stock_value") + + available_serial_nos = {} + inventory_dimension_filters_applied = check_inventory_dimension_filters_applied(filters) + + batch_balance_dict = frappe._dict({}) + if actual_qty and filters.get("batch_no"): + batch_balance_dict[filters.batch_no] = [actual_qty, stock_value] + + for sle in sl_entries: + item_detail = item_details[sle.item_code] + + sle.update(item_detail) + + if filters.get("batch_no") or inventory_dimension_filters_applied: + actual_qty += flt(sle.actual_qty, precision) + stock_value += sle.stock_value_difference + if sle.batch_no: + if not batch_balance_dict.get(sle.batch_no): + batch_balance_dict[sle.batch_no] = [0, 0] + + batch_balance_dict[sle.batch_no][0] += sle.actual_qty + + if sle.voucher_type == "Stock Reconciliation" and not sle.actual_qty: + actual_qty = sle.qty_after_transaction + stock_value = sle.stock_value + + sle.update({"qty_after_transaction": actual_qty, "stock_value": stock_value}) + + sle.update({"in_qty": max(sle.actual_qty, 0), "out_qty": min(sle.actual_qty, 0)}) + + if frappe.get_value("Item", sle.item_code, "has_serial_no"): + update_available_serial_nos(available_serial_nos, sle) + + if sle.actual_qty: + sle["in_out_rate"] = flt(sle.stock_value_difference / sle.actual_qty, precision) + + elif sle.voucher_type == "Stock Reconciliation": + sle["in_out_rate"] = sle.valuation_rate + + data.append(sle) + + if include_uom: + conversion_factors.append(item_detail.conversion_factor) + + update_included_uom_in_report(columns, data, include_uom, conversion_factors) + return columns, data + + +def update_available_serial_nos(available_serial_nos, sle): + serial_nos = ( + get_serial_nos(sle.serial_no) + if sle.serial_no + else get_serial_nos_from_serial_and_batch_bundle(sle.serial_and_batch_bundle) + ) + key = (sle.item_code, sle.warehouse) + if key not in available_serial_nos: + stock_balance = get_stock_balance_for( + sle.item_code, sle.warehouse, sle.posting_date, sle.posting_time + ) + serials = get_serial_nos(stock_balance["serial_nos"]) if stock_balance["serial_nos"] else [] + available_serial_nos.setdefault(key, serials) + sle.balance_serial_no = "\n".join(serials) + return + + existing_serial_no = available_serial_nos[key] + for sn in serial_nos: + if sn in existing_serial_no: + existing_serial_no.remove(sn) + else: + existing_serial_no.append(sn) + + sle.balance_serial_no = "\n".join(existing_serial_no) + + +def get_columns(filters): + columns = [ + {"label": _("Date"), "fieldname": "date", "fieldtype": "Datetime", "width": 150}, + { + "label": _("Item"), + "fieldname": "item_code", + "fieldtype": "Link", + "options": "Item", + "width": 100, + }, + {"label": _("Item Name"), "fieldname": "item_name", "width": 100}, + { + "label": _("Stock UOM"), + "fieldname": "stock_uom", + "fieldtype": "Link", + "options": "UOM", + "width": 90, + }, + ] + + for dimension in get_inventory_dimensions(): + columns.append( + { + "label": _(dimension.doctype), + "fieldname": dimension.fieldname, + "fieldtype": "Link", + "options": dimension.doctype, + "width": 110, + } + ) + + columns.extend( + [ + { + "label": _("In Qty"), + "fieldname": "in_qty", + "fieldtype": "Float", + "width": 80, + "convertible": "qty", + }, + { + "label": _("Out Qty"), + "fieldname": "out_qty", + "fieldtype": "Float", + "width": 80, + "convertible": "qty", + }, + { + "label": _("Balance Qty"), + "fieldname": "qty_after_transaction", + "fieldtype": "Float", + "width": 100, + "convertible": "qty", + }, + { + "label": _("Warehouse"), + "fieldname": "warehouse", + "fieldtype": "Link", + "options": "Warehouse", + "width": 150, + }, + { + "label": _("Item Group"), + "fieldname": "item_group", + "fieldtype": "Link", + "options": "Item Group", + "width": 100, + }, + { + "label": _("Brand"), + "fieldname": "brand", + "fieldtype": "Link", + "options": "Brand", + "width": 100, + }, + {"label": _("Description"), "fieldname": "description", "width": 200}, + { + "label": _("Incoming Rate"), + "fieldname": "incoming_rate", + "fieldtype": "Currency", + "width": 110, + "options": "Company:company:default_currency", + "convertible": "rate", + }, + { + "label": _("Avg Rate (Balance Stock)"), + "fieldname": "valuation_rate", + "fieldtype": filters.valuation_field_type, + "width": 180, + "options": "Company:company:default_currency" + if filters.valuation_field_type == "Currency" + else None, + "convertible": "rate", + }, + { + "label": _("Valuation Rate"), + "fieldname": "in_out_rate", + "fieldtype": filters.valuation_field_type, + "width": 140, + "options": "Company:company:default_currency" + if filters.valuation_field_type == "Currency" + else None, + "convertible": "rate", + }, + { + "label": _("Balance Value"), + "fieldname": "stock_value", + "fieldtype": "Currency", + "width": 110, + "options": "Company:company:default_currency", + }, + { + "label": _("Value Change"), + "fieldname": "stock_value_difference", + "fieldtype": "Currency", + "width": 110, + "options": "Company:company:default_currency", + }, + {"label": _("Voucher Type"), "fieldname": "voucher_type", "width": 110}, + { + "label": _("Voucher #"), + "fieldname": "voucher_no", + "fieldtype": "Dynamic Link", + "options": "voucher_type", + "width": 100, + }, + { + "label": _("Batch"), + "fieldname": "batch_no", + "fieldtype": "Link", + "options": "Batch", + "width": 100, + }, + { + "label": _("Serial No"), + "fieldname": "serial_no", + "fieldtype": "Link", + "options": "Serial No", + "width": 100, + }, + { + "label": _("Serial and Batch Bundle"), + "fieldname": "serial_and_batch_bundle", + "fieldtype": "Link", + "options": "Serial and Batch Bundle", + "width": 100, + }, + {"label": _("Balance Serial No"), "fieldname": "balance_serial_no", "width": 100}, + { + "label": _("Project"), + "fieldname": "project", + "fieldtype": "Link", + "options": "Project", + "width": 100, + }, + { + "label": _("Company"), + "fieldname": "company", + "fieldtype": "Link", + "options": "Company", + "width": 110, + }, + ] + ) + + return columns + + +def get_stock_ledger_entries(filters, items): + from_date = get_datetime(filters.from_date + " 00:00:00") + to_date = get_datetime(filters.to_date + " 23:59:59") + + sle = frappe.qb.DocType("Stock Ledger Entry") + query = ( + frappe.qb.from_(sle) + .select( + sle.item_code, + sle.posting_datetime.as_("date"), + sle.warehouse, + sle.posting_date, + sle.posting_time, + sle.actual_qty, + sle.incoming_rate, + sle.valuation_rate, + sle.company, + sle.voucher_type, + sle.qty_after_transaction, + sle.stock_value_difference, + sle.serial_and_batch_bundle, + sle.voucher_no, + sle.stock_value, + sle.batch_no, + sle.serial_no, + sle.project, + ) + .where((sle.docstatus < 2) & (sle.is_cancelled == 0) & (sle.posting_datetime[from_date:to_date])) + .orderby(sle.posting_datetime) + .orderby(sle.creation) + ) + + inventory_dimension_fields = get_inventory_dimension_fields() + if inventory_dimension_fields: + for fieldname in inventory_dimension_fields: + query = query.select(fieldname) + if fieldname in filters and filters.get(fieldname): + query = query.where(sle[fieldname].isin(filters.get(fieldname))) + + if items: + query = query.where(sle.item_code.isin(items)) + + for field in ["voucher_no", "project", "company"]: + if filters.get(field) and field not in inventory_dimension_fields: + query = query.where(sle[field] == filters.get(field)) + + if filters.get("batch_no"): + bundles = get_serial_and_batch_bundles(filters) + + if bundles: + query = query.where( + (sle.serial_and_batch_bundle.isin(bundles)) | (sle.batch_no == filters.batch_no) + ) + else: + query = query.where(sle.batch_no == filters.batch_no) + + query = apply_warehouse_filter(query, sle, filters) + + return query.run(as_dict=True) + + +def get_serial_and_batch_bundles(filters): + SBB = frappe.qb.DocType("Serial and Batch Bundle") + SBE = frappe.qb.DocType("Serial and Batch Entry") + + query = ( + frappe.qb.from_(SBE) + .inner_join(SBB) + .on(SBE.parent == SBB.name) + .select(SBE.parent) + .where( + (SBB.docstatus == 1) + & (SBB.has_batch_no == 1) + & (SBB.voucher_no.notnull()) + & (SBE.batch_no == filters.batch_no) + ) + ) + + return query.run(pluck=SBE.parent) + + +def get_inventory_dimension_fields(): + return [dimension.fieldname for dimension in get_inventory_dimensions()] + + +def get_items(filters): + item = frappe.qb.DocType("Item") + query = frappe.qb.from_(item).select(item.name).where(item.has_serial_no == 1) + conditions = [] + + if item_code := filters.get("item_code"): + conditions.append(item.name == item_code) + else: + if brand := filters.get("brand"): + conditions.append(item.brand == brand) + if item_group := filters.get("item_group"): + if condition := get_item_group_condition(item_group, item): + conditions.append(condition) + + items = [] + if conditions: + for condition in conditions: + query = query.where(condition) + items = [r[0] for r in query.run()] + + return items + + +def get_item_details(items, sl_entries, include_uom): + item_details = {} + if not items: + items = list(set(d.item_code for d in sl_entries)) + + if not items: + return item_details + + item = frappe.qb.DocType("Item") + query = ( + frappe.qb.from_(item) + .select(item.name, item.item_name, item.description, item.item_group, item.brand, item.stock_uom) + .where(item.name.isin(items)) + ) + + if include_uom: + ucd = frappe.qb.DocType("UOM Conversion Detail") + query = ( + query.left_join(ucd) + .on((ucd.parent == item.name) & (ucd.uom == include_uom)) + .select(ucd.conversion_factor) + ) + + res = query.run(as_dict=True) + + for item in res: + item_details.setdefault(item.name, item) + + return item_details + + +def get_sle_conditions(filters): + conditions = [] + if filters.get("warehouse"): + warehouse_condition = get_warehouse_condition(filters.get("warehouse")) + if warehouse_condition: + conditions.append(warehouse_condition) + if filters.get("voucher_no"): + conditions.append("voucher_no=%(voucher_no)s") + if filters.get("batch_no"): + conditions.append("batch_no=%(batch_no)s") + if filters.get("project"): + conditions.append("project=%(project)s") + + for dimension in get_inventory_dimensions(): + if filters.get(dimension.fieldname): + conditions.append(f"{dimension.fieldname} in %({dimension.fieldname})s") + + return "and {}".format(" and ".join(conditions)) if conditions else "" + + +def get_opening_balance_from_batch(filters, columns, sl_entries): + query_filters = { + "batch_no": filters.batch_no, + "docstatus": 1, + "is_cancelled": 0, + "posting_date": ("<", filters.from_date), + "company": filters.company, + } + + for fields in ["item_code", "warehouse"]: + if filters.get(fields): + query_filters[fields] = filters.get(fields) + + opening_data = frappe.get_all( + "Stock Ledger Entry", + fields=["sum(actual_qty) as qty_after_transaction", "sum(stock_value_difference) as stock_value"], + filters=query_filters, + )[0] + + for field in ["qty_after_transaction", "stock_value", "valuation_rate"]: + if opening_data.get(field) is None: + opening_data[field] = 0.0 + + table = frappe.qb.DocType("Stock Ledger Entry") + sabb_table = frappe.qb.DocType("Serial and Batch Entry") + query = ( + frappe.qb.from_(table) + .inner_join(sabb_table) + .on(table.serial_and_batch_bundle == sabb_table.parent) + .select( + Sum(sabb_table.qty).as_("qty"), + Sum(sabb_table.stock_value_difference).as_("stock_value"), + ) + .where( + (sabb_table.batch_no == filters.batch_no) + & (sabb_table.docstatus == 1) + & (table.posting_date < filters.from_date) + & (table.is_cancelled == 0) + ) + ) + + for field in ["item_code", "warehouse", "company"]: + if filters.get(field): + query = query.where(table[field] == filters.get(field)) + + bundle_data = query.run(as_dict=True) + + if bundle_data: + opening_data.qty_after_transaction += flt(bundle_data[0].qty) + opening_data.stock_value += flt(bundle_data[0].stock_value) + if opening_data.qty_after_transaction: + opening_data.valuation_rate = flt(opening_data.stock_value) / flt( + opening_data.qty_after_transaction + ) + + return { + "item_code": _("'Opening'"), + "qty_after_transaction": opening_data.qty_after_transaction, + "valuation_rate": opening_data.valuation_rate, + "stock_value": opening_data.stock_value, + } + + +def get_opening_balance(filters, columns, sl_entries): + if not (filters.item_code and filters.warehouse and filters.from_date): + return + + from erpnext.stock.stock_ledger import get_previous_sle + + last_entry = get_previous_sle( + { + "item_code": filters.item_code, + "warehouse_condition": get_warehouse_condition(filters.warehouse), + "posting_date": filters.from_date, + "posting_time": "00:00:00", + } + ) + + # check if any SLEs are actually Opening Stock Reconciliation + for sle in list(sl_entries): + if ( + sle.get("voucher_type") == "Stock Reconciliation" + and sle.posting_date == filters.from_date + and frappe.db.get_value("Stock Reconciliation", sle.voucher_no, "purpose") == "Opening Stock" + ): + last_entry = sle + sl_entries.remove(sle) + + row = { + "item_code": _("'Opening'"), + "qty_after_transaction": last_entry.get("qty_after_transaction", 0), + "valuation_rate": last_entry.get("valuation_rate", 0), + "stock_value": last_entry.get("stock_value", 0), + } + + return row + + +def get_warehouse_condition(warehouse): + warehouse_details = frappe.db.get_value("Warehouse", warehouse, ["lft", "rgt"], as_dict=1) + if warehouse_details: + return f" exists (select name from `tabWarehouse` wh \ + where wh.lft >= {warehouse_details.lft} and wh.rgt <= {warehouse_details.rgt} and warehouse = wh.name)" + + return "" + + +def get_item_group_condition(item_group, item_table=None): + item_group_details = frappe.db.get_value("Item Group", item_group, ["lft", "rgt"], as_dict=1) + if item_group_details: + if item_table: + ig = frappe.qb.DocType("Item Group") + return item_table.item_group.isin( + frappe.qb.from_(ig) + .select(ig.name) + .where( + (ig.lft >= item_group_details.lft) + & (ig.rgt <= item_group_details.rgt) + & (item_table.item_group == ig.name) + ) + ) + else: + return f"item.item_group in (select ig.name from `tabItem Group` ig \ + where ig.lft >= {item_group_details.lft} and ig.rgt <= {item_group_details.rgt} and item.item_group = ig.name)" + + +def check_inventory_dimension_filters_applied(filters) -> bool: + for dimension in get_inventory_dimensions(): + if dimension.fieldname in filters and filters.get(dimension.fieldname): + return True + + return False diff --git a/erpnext/stock/report/available_serial_no/test_available_serial_no.py b/erpnext/stock/report/available_serial_no/test_available_serial_no.py new file mode 100644 index 00000000000..b8741af4506 --- /dev/null +++ b/erpnext/stock/report/available_serial_no/test_available_serial_no.py @@ -0,0 +1,45 @@ +# Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and Contributors +# See license.txt + +import frappe +from frappe.tests import IntegrationTestCase +from frappe.utils import add_days, today + +from erpnext.stock.doctype.delivery_note.test_delivery_note import create_delivery_note +from erpnext.stock.doctype.item.test_item import create_item +from erpnext.stock.doctype.purchase_receipt.test_purchase_receipt import make_purchase_receipt + + +class TestStockLedgerReeport(IntegrationTestCase): + def setUp(self) -> None: + item = create_item("_Test Item with Serial No", is_stock_item=1) + item.has_serial_no = 1 + item.serial_no_series = "TEST.###" + item.save(ignore_permissions=True) + + self.filters = frappe._dict( + company="_Test Company", + from_date=today(), + to_date=add_days(today(), 30), + item_code="_Test Item With Serial No", + ) + + def tearDown(self) -> None: + frappe.db.rollback() + + def test_available_serial_no(self): + report = frappe.get_doc("Report", "Available Serial No") + + make_purchase_receipt(qty=10, item_code="_Test Item with Serial No") + data = report.get_data(filters=self.filters) + serial_nos = [item for item in data[-1][-1]["balance_serial_no"].split("\n")] + + # Test 1: Since we have created an inward entry with Purchase Receipt of 10 qty, we should have 10 serial nos + self.assertEqual(len(serial_nos), 10) + + create_delivery_note(qty=5, item_code="_Test Item with Serial No") + data = report.get_data(filters=self.filters) + serial_nos = [item for item in data[-1][-1]["balance_serial_no"].split("\n")] + + # Test 2: Since we have created a delivery note of 5 qty, we should have 5 serial nos + self.assertEqual(len(serial_nos), 5) From 0ec026ec7e53e1238118ccaaa17a3c14dafde150 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Fri, 7 Mar 2025 12:05:31 +0530 Subject: [PATCH 1547/1614] refactor: import functions in new report instead of redundant code (cherry picked from commit 501f07803e20d41a9e358fbc408742f768f839c5) --- .../available_serial_no.py | 286 +----------------- 1 file changed, 10 insertions(+), 276 deletions(-) diff --git a/erpnext/stock/report/available_serial_no/available_serial_no.py b/erpnext/stock/report/available_serial_no/available_serial_no.py index e1839f8957f..8a20fed848a 100644 --- a/erpnext/stock/report/available_serial_no/available_serial_no.py +++ b/erpnext/stock/report/available_serial_no/available_serial_no.py @@ -1,13 +1,10 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt - -from collections import defaultdict - import frappe from frappe import _ -from frappe.query_builder.functions import CombineDatetime, Sum -from frappe.utils import cint, flt, get_datetime +from frappe.query_builder.functions import Sum +from frappe.utils import cint, flt from erpnext.stock.doctype.inventory_dimension.inventory_dimension import get_inventory_dimensions from erpnext.stock.doctype.serial_no.serial_no import ( @@ -15,7 +12,14 @@ from erpnext.stock.doctype.serial_no.serial_no import ( get_serial_nos_from_serial_and_batch_bundle, ) from erpnext.stock.doctype.stock_reconciliation.stock_reconciliation import get_stock_balance_for -from erpnext.stock.doctype.warehouse.warehouse import apply_warehouse_filter +from erpnext.stock.report.stock_ledger.stock_ledger import ( + check_inventory_dimension_filters_applied, + get_item_details, + get_item_group_condition, + get_opening_balance, + get_opening_balance_from_batch, + get_stock_ledger_entries, +) from erpnext.stock.utils import ( is_reposting_item_valuation_in_progress, update_included_uom_in_report, @@ -288,91 +292,6 @@ def get_columns(filters): return columns -def get_stock_ledger_entries(filters, items): - from_date = get_datetime(filters.from_date + " 00:00:00") - to_date = get_datetime(filters.to_date + " 23:59:59") - - sle = frappe.qb.DocType("Stock Ledger Entry") - query = ( - frappe.qb.from_(sle) - .select( - sle.item_code, - sle.posting_datetime.as_("date"), - sle.warehouse, - sle.posting_date, - sle.posting_time, - sle.actual_qty, - sle.incoming_rate, - sle.valuation_rate, - sle.company, - sle.voucher_type, - sle.qty_after_transaction, - sle.stock_value_difference, - sle.serial_and_batch_bundle, - sle.voucher_no, - sle.stock_value, - sle.batch_no, - sle.serial_no, - sle.project, - ) - .where((sle.docstatus < 2) & (sle.is_cancelled == 0) & (sle.posting_datetime[from_date:to_date])) - .orderby(sle.posting_datetime) - .orderby(sle.creation) - ) - - inventory_dimension_fields = get_inventory_dimension_fields() - if inventory_dimension_fields: - for fieldname in inventory_dimension_fields: - query = query.select(fieldname) - if fieldname in filters and filters.get(fieldname): - query = query.where(sle[fieldname].isin(filters.get(fieldname))) - - if items: - query = query.where(sle.item_code.isin(items)) - - for field in ["voucher_no", "project", "company"]: - if filters.get(field) and field not in inventory_dimension_fields: - query = query.where(sle[field] == filters.get(field)) - - if filters.get("batch_no"): - bundles = get_serial_and_batch_bundles(filters) - - if bundles: - query = query.where( - (sle.serial_and_batch_bundle.isin(bundles)) | (sle.batch_no == filters.batch_no) - ) - else: - query = query.where(sle.batch_no == filters.batch_no) - - query = apply_warehouse_filter(query, sle, filters) - - return query.run(as_dict=True) - - -def get_serial_and_batch_bundles(filters): - SBB = frappe.qb.DocType("Serial and Batch Bundle") - SBE = frappe.qb.DocType("Serial and Batch Entry") - - query = ( - frappe.qb.from_(SBE) - .inner_join(SBB) - .on(SBE.parent == SBB.name) - .select(SBE.parent) - .where( - (SBB.docstatus == 1) - & (SBB.has_batch_no == 1) - & (SBB.voucher_no.notnull()) - & (SBE.batch_no == filters.batch_no) - ) - ) - - return query.run(pluck=SBE.parent) - - -def get_inventory_dimension_fields(): - return [dimension.fieldname for dimension in get_inventory_dimensions()] - - def get_items(filters): item = frappe.qb.DocType("Item") query = frappe.qb.from_(item).select(item.name).where(item.has_serial_no == 1) @@ -394,188 +313,3 @@ def get_items(filters): items = [r[0] for r in query.run()] return items - - -def get_item_details(items, sl_entries, include_uom): - item_details = {} - if not items: - items = list(set(d.item_code for d in sl_entries)) - - if not items: - return item_details - - item = frappe.qb.DocType("Item") - query = ( - frappe.qb.from_(item) - .select(item.name, item.item_name, item.description, item.item_group, item.brand, item.stock_uom) - .where(item.name.isin(items)) - ) - - if include_uom: - ucd = frappe.qb.DocType("UOM Conversion Detail") - query = ( - query.left_join(ucd) - .on((ucd.parent == item.name) & (ucd.uom == include_uom)) - .select(ucd.conversion_factor) - ) - - res = query.run(as_dict=True) - - for item in res: - item_details.setdefault(item.name, item) - - return item_details - - -def get_sle_conditions(filters): - conditions = [] - if filters.get("warehouse"): - warehouse_condition = get_warehouse_condition(filters.get("warehouse")) - if warehouse_condition: - conditions.append(warehouse_condition) - if filters.get("voucher_no"): - conditions.append("voucher_no=%(voucher_no)s") - if filters.get("batch_no"): - conditions.append("batch_no=%(batch_no)s") - if filters.get("project"): - conditions.append("project=%(project)s") - - for dimension in get_inventory_dimensions(): - if filters.get(dimension.fieldname): - conditions.append(f"{dimension.fieldname} in %({dimension.fieldname})s") - - return "and {}".format(" and ".join(conditions)) if conditions else "" - - -def get_opening_balance_from_batch(filters, columns, sl_entries): - query_filters = { - "batch_no": filters.batch_no, - "docstatus": 1, - "is_cancelled": 0, - "posting_date": ("<", filters.from_date), - "company": filters.company, - } - - for fields in ["item_code", "warehouse"]: - if filters.get(fields): - query_filters[fields] = filters.get(fields) - - opening_data = frappe.get_all( - "Stock Ledger Entry", - fields=["sum(actual_qty) as qty_after_transaction", "sum(stock_value_difference) as stock_value"], - filters=query_filters, - )[0] - - for field in ["qty_after_transaction", "stock_value", "valuation_rate"]: - if opening_data.get(field) is None: - opening_data[field] = 0.0 - - table = frappe.qb.DocType("Stock Ledger Entry") - sabb_table = frappe.qb.DocType("Serial and Batch Entry") - query = ( - frappe.qb.from_(table) - .inner_join(sabb_table) - .on(table.serial_and_batch_bundle == sabb_table.parent) - .select( - Sum(sabb_table.qty).as_("qty"), - Sum(sabb_table.stock_value_difference).as_("stock_value"), - ) - .where( - (sabb_table.batch_no == filters.batch_no) - & (sabb_table.docstatus == 1) - & (table.posting_date < filters.from_date) - & (table.is_cancelled == 0) - ) - ) - - for field in ["item_code", "warehouse", "company"]: - if filters.get(field): - query = query.where(table[field] == filters.get(field)) - - bundle_data = query.run(as_dict=True) - - if bundle_data: - opening_data.qty_after_transaction += flt(bundle_data[0].qty) - opening_data.stock_value += flt(bundle_data[0].stock_value) - if opening_data.qty_after_transaction: - opening_data.valuation_rate = flt(opening_data.stock_value) / flt( - opening_data.qty_after_transaction - ) - - return { - "item_code": _("'Opening'"), - "qty_after_transaction": opening_data.qty_after_transaction, - "valuation_rate": opening_data.valuation_rate, - "stock_value": opening_data.stock_value, - } - - -def get_opening_balance(filters, columns, sl_entries): - if not (filters.item_code and filters.warehouse and filters.from_date): - return - - from erpnext.stock.stock_ledger import get_previous_sle - - last_entry = get_previous_sle( - { - "item_code": filters.item_code, - "warehouse_condition": get_warehouse_condition(filters.warehouse), - "posting_date": filters.from_date, - "posting_time": "00:00:00", - } - ) - - # check if any SLEs are actually Opening Stock Reconciliation - for sle in list(sl_entries): - if ( - sle.get("voucher_type") == "Stock Reconciliation" - and sle.posting_date == filters.from_date - and frappe.db.get_value("Stock Reconciliation", sle.voucher_no, "purpose") == "Opening Stock" - ): - last_entry = sle - sl_entries.remove(sle) - - row = { - "item_code": _("'Opening'"), - "qty_after_transaction": last_entry.get("qty_after_transaction", 0), - "valuation_rate": last_entry.get("valuation_rate", 0), - "stock_value": last_entry.get("stock_value", 0), - } - - return row - - -def get_warehouse_condition(warehouse): - warehouse_details = frappe.db.get_value("Warehouse", warehouse, ["lft", "rgt"], as_dict=1) - if warehouse_details: - return f" exists (select name from `tabWarehouse` wh \ - where wh.lft >= {warehouse_details.lft} and wh.rgt <= {warehouse_details.rgt} and warehouse = wh.name)" - - return "" - - -def get_item_group_condition(item_group, item_table=None): - item_group_details = frappe.db.get_value("Item Group", item_group, ["lft", "rgt"], as_dict=1) - if item_group_details: - if item_table: - ig = frappe.qb.DocType("Item Group") - return item_table.item_group.isin( - frappe.qb.from_(ig) - .select(ig.name) - .where( - (ig.lft >= item_group_details.lft) - & (ig.rgt <= item_group_details.rgt) - & (item_table.item_group == ig.name) - ) - ) - else: - return f"item.item_group in (select ig.name from `tabItem Group` ig \ - where ig.lft >= {item_group_details.lft} and ig.rgt <= {item_group_details.rgt} and item.item_group = ig.name)" - - -def check_inventory_dimension_filters_applied(filters) -> bool: - for dimension in get_inventory_dimensions(): - if dimension.fieldname in filters and filters.get(dimension.fieldname): - return True - - return False From e7b5303782324f223769fccc167e18ade6c073e9 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Thu, 20 Mar 2025 15:17:59 +0530 Subject: [PATCH 1548/1614] fix: remove get_items query.run outside of if condition (cherry picked from commit 80c17cc00559d05f8e54b6085bba04c34078c70c) --- erpnext/stock/doctype/serial_no/serial_no.py | 2 +- .../report/available_serial_no/available_serial_no.py | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/erpnext/stock/doctype/serial_no/serial_no.py b/erpnext/stock/doctype/serial_no/serial_no.py index eff2ef14674..db2dc537ddd 100644 --- a/erpnext/stock/doctype/serial_no/serial_no.py +++ b/erpnext/stock/doctype/serial_no/serial_no.py @@ -152,7 +152,7 @@ def get_serial_nos(serial_no): def get_serial_nos_from_serial_and_batch_bundle(serial_and_batch_bundle): table = frappe.qb.DocType("Serial and Batch Entry") query = frappe.qb.from_(table).select(table.serial_no).where(table.parent == serial_and_batch_bundle) - return [item[0] for item in query.run(as_list=True)] + return query.run(pluck=True) def clean_serial_no_string(serial_no: str) -> str: diff --git a/erpnext/stock/report/available_serial_no/available_serial_no.py b/erpnext/stock/report/available_serial_no/available_serial_no.py index 8a20fed848a..d3a1c0c0ed2 100644 --- a/erpnext/stock/report/available_serial_no/available_serial_no.py +++ b/erpnext/stock/report/available_serial_no/available_serial_no.py @@ -80,8 +80,7 @@ def execute(filters=None): sle.update({"in_qty": max(sle.actual_qty, 0), "out_qty": min(sle.actual_qty, 0)}) - if frappe.get_value("Item", sle.item_code, "has_serial_no"): - update_available_serial_nos(available_serial_nos, sle) + update_available_serial_nos(available_serial_nos, sle) if sle.actual_qty: sle["in_out_rate"] = flt(sle.stock_value_difference / sle.actual_qty, precision) @@ -306,10 +305,8 @@ def get_items(filters): if condition := get_item_group_condition(item_group, item): conditions.append(condition) - items = [] if conditions: for condition in conditions: query = query.where(condition) - items = [r[0] for r in query.run()] - return items + return query.run(pluck=True) From 9af50528f1501913c3efc9ef71ea84dd8fdf5324 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Wed, 26 Mar 2025 14:39:45 +0530 Subject: [PATCH 1549/1614] perf: take query out of loop (cherry picked from commit 26de9024961fe12e2dbf28a20c80d626368d2b59) --- erpnext/stock/doctype/serial_no/serial_no.py | 11 ++++++++--- .../available_serial_no/available_serial_no.py | 12 ++++++------ 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/erpnext/stock/doctype/serial_no/serial_no.py b/erpnext/stock/doctype/serial_no/serial_no.py index db2dc537ddd..928313576f1 100644 --- a/erpnext/stock/doctype/serial_no/serial_no.py +++ b/erpnext/stock/doctype/serial_no/serial_no.py @@ -149,10 +149,15 @@ def get_serial_nos(serial_no): return [s.strip() for s in cstr(serial_no).strip().replace(",", "\n").split("\n") if s.strip()] -def get_serial_nos_from_serial_and_batch_bundle(serial_and_batch_bundle): +def get_serial_nos_from_sle_list(bundles): table = frappe.qb.DocType("Serial and Batch Entry") - query = frappe.qb.from_(table).select(table.serial_no).where(table.parent == serial_and_batch_bundle) - return query.run(pluck=True) + query = frappe.qb.from_(table).select(table.parent, table.serial_no).where(table.parent.isin(bundles)) + data = query.run(as_dict=True) + + result = {} + for d in data: + result.setdefault(d.parent, []).append(d.serial_no) + return result def clean_serial_no_string(serial_no: str) -> str: diff --git a/erpnext/stock/report/available_serial_no/available_serial_no.py b/erpnext/stock/report/available_serial_no/available_serial_no.py index d3a1c0c0ed2..9a42efd1148 100644 --- a/erpnext/stock/report/available_serial_no/available_serial_no.py +++ b/erpnext/stock/report/available_serial_no/available_serial_no.py @@ -7,10 +7,7 @@ from frappe.query_builder.functions import Sum from frappe.utils import cint, flt from erpnext.stock.doctype.inventory_dimension.inventory_dimension import get_inventory_dimensions -from erpnext.stock.doctype.serial_no.serial_no import ( - get_serial_nos, - get_serial_nos_from_serial_and_batch_bundle, -) +from erpnext.stock.doctype.serial_no.serial_no import get_serial_nos, get_serial_nos_from_sle_list from erpnext.stock.doctype.stock_reconciliation.stock_reconciliation import get_stock_balance_for from erpnext.stock.report.stock_ledger.stock_ledger import ( check_inventory_dimension_filters_applied, @@ -51,13 +48,16 @@ def execute(filters=None): actual_qty = opening_row.get("qty_after_transaction") stock_value = opening_row.get("stock_value") - available_serial_nos = {} inventory_dimension_filters_applied = check_inventory_dimension_filters_applied(filters) batch_balance_dict = frappe._dict({}) if actual_qty and filters.get("batch_no"): batch_balance_dict[filters.batch_no] = [actual_qty, stock_value] + available_serial_nos = get_serial_nos_from_sle_list( + [sle.serial_and_batch_bundle for sle in sl_entries if sle.serial_and_batch_bundle] + ) + for sle in sl_entries: item_detail = item_details[sle.item_code] @@ -101,7 +101,7 @@ def update_available_serial_nos(available_serial_nos, sle): serial_nos = ( get_serial_nos(sle.serial_no) if sle.serial_no - else get_serial_nos_from_serial_and_batch_bundle(sle.serial_and_batch_bundle) + else available_serial_nos.get(sle.serial_and_batch_bundle) ) key = (sle.item_code, sle.warehouse) if key not in available_serial_nos: From 6fedb7b9db5b9f4eea15d857cac844952f95016b Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Thu, 27 Mar 2025 21:10:03 +0530 Subject: [PATCH 1550/1614] refactor: split and clean execute function to be more readable (cherry picked from commit 036af54d5446f946e9cbb531034f367416ece23c) --- .../available_serial_no.py | 96 +++++++++++-------- 1 file changed, 56 insertions(+), 40 deletions(-) diff --git a/erpnext/stock/report/available_serial_no/available_serial_no.py b/erpnext/stock/report/available_serial_no/available_serial_no.py index 9a42efd1148..bdde9c7f3b6 100644 --- a/erpnext/stock/report/available_serial_no/available_serial_no.py +++ b/erpnext/stock/report/available_serial_no/available_serial_no.py @@ -30,27 +30,41 @@ def execute(filters=None): items = get_items(filters) sl_entries = get_stock_ledger_entries(filters, items) item_details = get_item_details(items, sl_entries, include_uom) + + opening_row, actual_qty, stock_value = get_opening_balance_data(filters, columns, sl_entries) + + precision = cint(frappe.db.get_single_value("System Settings", "float_precision")) + data, conversion_factors = process_stock_ledger_entries( + filters, sl_entries, item_details, opening_row, actual_qty, stock_value, precision + ) + + update_included_uom_in_report(columns, data, include_uom, conversion_factors) + return columns, data + + +def get_opening_balance_data(filters, columns, sl_entries): if filters.get("batch_no"): opening_row = get_opening_balance_from_batch(filters, columns, sl_entries) else: opening_row = get_opening_balance(filters, columns, sl_entries) - precision = cint(frappe.db.get_single_value("System Settings", "float_precision")) + actual_qty = opening_row.get("qty_after_transaction") if opening_row else 0 + stock_value = opening_row.get("stock_value") if opening_row else 0 + return opening_row, actual_qty, stock_value + +def process_stock_ledger_entries( + filters, sl_entries, item_details, opening_row, actual_qty, stock_value, precision +): data = [] conversion_factors = [] + if opening_row: data.append(opening_row) conversion_factors.append(0) - actual_qty = stock_value = 0 - if opening_row: - actual_qty = opening_row.get("qty_after_transaction") - stock_value = opening_row.get("stock_value") - - inventory_dimension_filters_applied = check_inventory_dimension_filters_applied(filters) - batch_balance_dict = frappe._dict({}) + if actual_qty and filters.get("batch_no"): batch_balance_dict[filters.batch_no] = [actual_qty, stock_value] @@ -59,42 +73,44 @@ def execute(filters=None): ) for sle in sl_entries: - item_detail = item_details[sle.item_code] - - sle.update(item_detail) - - if filters.get("batch_no") or inventory_dimension_filters_applied: - actual_qty += flt(sle.actual_qty, precision) - stock_value += sle.stock_value_difference - if sle.batch_no: - if not batch_balance_dict.get(sle.batch_no): - batch_balance_dict[sle.batch_no] = [0, 0] - - batch_balance_dict[sle.batch_no][0] += sle.actual_qty - - if sle.voucher_type == "Stock Reconciliation" and not sle.actual_qty: - actual_qty = sle.qty_after_transaction - stock_value = sle.stock_value - - sle.update({"qty_after_transaction": actual_qty, "stock_value": stock_value}) - - sle.update({"in_qty": max(sle.actual_qty, 0), "out_qty": min(sle.actual_qty, 0)}) - + update_stock_ledger_entry( + sle, item_details, filters, actual_qty, stock_value, batch_balance_dict, precision + ) update_available_serial_nos(available_serial_nos, sle) - - if sle.actual_qty: - sle["in_out_rate"] = flt(sle.stock_value_difference / sle.actual_qty, precision) - - elif sle.voucher_type == "Stock Reconciliation": - sle["in_out_rate"] = sle.valuation_rate - data.append(sle) - if include_uom: - conversion_factors.append(item_detail.conversion_factor) + if filters.get("include_uom"): + conversion_factors.append(item_details[sle.item_code].conversion_factor) - update_included_uom_in_report(columns, data, include_uom, conversion_factors) - return columns, data + return data, conversion_factors + + +def update_stock_ledger_entry( + sle, item_details, filters, actual_qty, stock_value, batch_balance_dict, precision +): + item_detail = item_details[sle.item_code] + sle.update(item_detail) + + if filters.get("batch_no") or check_inventory_dimension_filters_applied(filters): + actual_qty += flt(sle.actual_qty, precision) + stock_value += sle.stock_value_difference + + if sle.batch_no: + batch_balance_dict.setdefault(sle.batch_no, [0, 0]) + batch_balance_dict[sle.batch_no][0] += sle.actual_qty + + if sle.voucher_type == "Stock Reconciliation" and not sle.actual_qty: + actual_qty = sle.qty_after_transaction + stock_value = sle.stock_value + + sle.update({"qty_after_transaction": actual_qty, "stock_value": stock_value}) + + sle.update({"in_qty": max(sle.actual_qty, 0), "out_qty": min(sle.actual_qty, 0)}) + + if sle.actual_qty: + sle["in_out_rate"] = flt(sle.stock_value_difference / sle.actual_qty, precision) + elif sle.voucher_type == "Stock Reconciliation": + sle["in_out_rate"] = sle.valuation_rate def update_available_serial_nos(available_serial_nos, sle): From 18e9a9881ce963f3013767a238680ec3f5158297 Mon Sep 17 00:00:00 2001 From: barredterra <14891507+barredterra@users.noreply.github.com> Date: Tue, 8 Apr 2025 02:28:46 +0200 Subject: [PATCH 1551/1614] fix: make report's "printed on" translatable --- .../report/accounts_receivable/accounts_receivable.html | 2 +- .../bank_reconciliation_statement.html | 2 +- erpnext/accounts/report/financial_statements.html | 2 +- erpnext/accounts/report/general_ledger/general_ledger.html | 2 +- .../supplier_quotation_comparison.html | 6 ++---- 5 files changed, 6 insertions(+), 8 deletions(-) diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.html b/erpnext/accounts/report/accounts_receivable/accounts_receivable.html index 7d8d33c46b4..6ae42853ca3 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.html +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.html @@ -282,4 +282,4 @@ {% } %} -

{{ __("Printed On ") }}{%= frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string()) %}

\ No newline at end of file +

{%= __("Printed On {0}", [frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string())]) %}

diff --git a/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.html b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.html index eaabc90205f..fb809f2c456 100644 --- a/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.html +++ b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.html @@ -46,4 +46,4 @@ {% } %} -

Printed On {%= frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string()) %}

+

{%= __("Printed On {0}", [frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string())]) %}

diff --git a/erpnext/accounts/report/financial_statements.html b/erpnext/accounts/report/financial_statements.html index 2bb09cf0dc5..3633b26c052 100644 --- a/erpnext/accounts/report/financial_statements.html +++ b/erpnext/accounts/report/financial_statements.html @@ -67,5 +67,5 @@

- Printed On {%= frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string()) %} + {%= __("Printed On {0}", [frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string())]) %}

diff --git a/erpnext/accounts/report/general_ledger/general_ledger.html b/erpnext/accounts/report/general_ledger/general_ledger.html index bdea568bdf4..c40c607fbed 100644 --- a/erpnext/accounts/report/general_ledger/general_ledger.html +++ b/erpnext/accounts/report/general_ledger/general_ledger.html @@ -79,4 +79,4 @@ {% } %} -

Printed On {%= frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string()) %}

+

{%= __("Printed on {0}", [frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string())]) %}

diff --git a/erpnext/buying/report/supplier_quotation_comparison/supplier_quotation_comparison.html b/erpnext/buying/report/supplier_quotation_comparison/supplier_quotation_comparison.html index 015b31c2064..869dadb2fc1 100644 --- a/erpnext/buying/report/supplier_quotation_comparison/supplier_quotation_comparison.html +++ b/erpnext/buying/report/supplier_quotation_comparison/supplier_quotation_comparison.html @@ -124,9 +124,7 @@ -

Analysis Chart

+

{%= __("Analysis Chart") %}

- - -

Printed On {%= frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string()) %}

+

{%= __("Printed On {0}", [frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string())]) %}

From 7cf83ffce72867fdf5a999c6e148516eed1db8ae Mon Sep 17 00:00:00 2001 From: barredterra <14891507+barredterra@users.noreply.github.com> Date: Tue, 8 Apr 2025 15:01:21 +0200 Subject: [PATCH 1552/1614] fix: go for lower case "on" because we already have translations for that --- .../report/accounts_receivable/accounts_receivable.html | 2 +- .../bank_reconciliation_statement.html | 2 +- erpnext/accounts/report/financial_statements.html | 2 +- .../supplier_quotation_comparison.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.html b/erpnext/accounts/report/accounts_receivable/accounts_receivable.html index 6ae42853ca3..9cae94ff8b4 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.html +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.html @@ -282,4 +282,4 @@ {% } %} -

{%= __("Printed On {0}", [frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string())]) %}

+

{%= __("Printed on {0}", [frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string())]) %}

diff --git a/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.html b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.html index fb809f2c456..422b25965f0 100644 --- a/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.html +++ b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.html @@ -46,4 +46,4 @@ {% } %} -

{%= __("Printed On {0}", [frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string())]) %}

+

{%= __("Printed on {0}", [frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string())]) %}

diff --git a/erpnext/accounts/report/financial_statements.html b/erpnext/accounts/report/financial_statements.html index 3633b26c052..dc1d0093bce 100644 --- a/erpnext/accounts/report/financial_statements.html +++ b/erpnext/accounts/report/financial_statements.html @@ -67,5 +67,5 @@

- {%= __("Printed On {0}", [frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string())]) %} + {%= __("Printed on {0}", [frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string())]) %}

diff --git a/erpnext/buying/report/supplier_quotation_comparison/supplier_quotation_comparison.html b/erpnext/buying/report/supplier_quotation_comparison/supplier_quotation_comparison.html index 869dadb2fc1..f98dff66853 100644 --- a/erpnext/buying/report/supplier_quotation_comparison/supplier_quotation_comparison.html +++ b/erpnext/buying/report/supplier_quotation_comparison/supplier_quotation_comparison.html @@ -127,4 +127,4 @@

{%= __("Analysis Chart") %}

-

{%= __("Printed On {0}", [frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string())]) %}

+

{%= __("Printed on {0}", [frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string())]) %}

From 7896f8a855a3cd6217e0b36a2517922c562c8080 Mon Sep 17 00:00:00 2001 From: barredterra <14891507+barredterra@users.noreply.github.com> Date: Tue, 8 Apr 2025 15:08:40 +0200 Subject: [PATCH 1553/1614] fix: remove redundant letter head --- .../bank_reconciliation_statement.html | 3 --- .../supplier_quotation_comparison.html | 3 --- 2 files changed, 6 deletions(-) diff --git a/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.html b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.html index 422b25965f0..6957ab41681 100644 --- a/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.html +++ b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.html @@ -1,6 +1,3 @@ -
- {%= frappe.boot.letter_heads[frappe.defaults.get_default("letter_head")] %} -

{%= __("Bank Reconciliation Statement") %}

{%= filters.account && (filters.account + ", "+filters.report_date) || "" %} {%= filters.company %}


diff --git a/erpnext/buying/report/supplier_quotation_comparison/supplier_quotation_comparison.html b/erpnext/buying/report/supplier_quotation_comparison/supplier_quotation_comparison.html index f98dff66853..2fb0986c7bb 100644 --- a/erpnext/buying/report/supplier_quotation_comparison/supplier_quotation_comparison.html +++ b/erpnext/buying/report/supplier_quotation_comparison/supplier_quotation_comparison.html @@ -94,9 +94,6 @@ -
- {%= frappe.boot.letter_heads[frappe.defaults.get_default("letter_head")] %} -

{%= __(report.report_name) %}

{%= filters.item %}

From d94ebd0c781d72c6c4e9f23499635fc0595b0c4f Mon Sep 17 00:00:00 2001 From: barredterra <14891507+barredterra@users.noreply.github.com> Date: Tue, 8 Apr 2025 15:56:48 +0200 Subject: [PATCH 1554/1614] chore: add missing german translation --- erpnext/translations/de.csv | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/translations/de.csv b/erpnext/translations/de.csv index f2d4e5443ed..5197b33b47f 100644 --- a/erpnext/translations/de.csv +++ b/erpnext/translations/de.csv @@ -309,7 +309,7 @@ BOM {0} does not belong to Item {1},Stückliste {0} gehört nicht zum Artikel {1 BOM {0} must be active,Stückliste {0} muss aktiv sein, BOM {0} must be submitted,Stückliste {0} muss übertragen werden, Balance,Saldo, -Balance (Dr - Cr),Balance (Dr - Cr), +Balance (Dr - Cr),Saldo (S - H), Balance ({0}),Saldo ({0}), Balance Qty,Bilanzmenge, Balance Sheet,Bilanz, @@ -3890,6 +3890,7 @@ Partially ordered,teilweise geordnete, Please select company first,Bitte wählen Sie zuerst die Firma aus, Please select patient,Bitte wählen Sie Patient, Printed On ,Gedruckt am, +Printed on {0},Gedruckt am {0}, Projected qty,Geplante Menge, Sales person,Vertriebsmitarbeiter, Serial No {0} Created,Seriennummer {0} Erstellt, From 830290c859cc8dae0a2e33a6ae9d97b8505d08a0 Mon Sep 17 00:00:00 2001 From: barredterra <14891507+barredterra@users.noreply.github.com> Date: Thu, 22 Feb 2024 18:39:17 +0100 Subject: [PATCH 1555/1614] feat: clear payment terms and schedule --- erpnext/public/js/controllers/transaction.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 1f22c7c64e2..8e90853ad06 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -1060,11 +1060,16 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe to_clear.push("Payment Schedule Table"); } - frappe.msgprint( + frappe.confirm( __( - "Please clear the {0}", + "Do you want to clear the selected {0}?", [frappe.utils.comma_and(to_clear.map(dt => __(dt)))] - ) + ), + () => { + this.frm.set_value("payment_terms_template", ""); + this.frm.clear_table("payment_schedule"); + this.frm.refresh_field("payment_schedule"); + } ); } } From 0b0a6b8cfa65a40dc5cba57a6d739a336130acb0 Mon Sep 17 00:00:00 2001 From: barredterra <14891507+barredterra@users.noreply.github.com> Date: Tue, 8 Apr 2025 20:12:25 +0200 Subject: [PATCH 1556/1614] feat: update due date in payment schedule Partial backport of b629356b7c9f9ef1c846ab6e4fdc53c81173a64d --- erpnext/public/js/controllers/transaction.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 8e90853ad06..cbd80a3c45f 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -1042,6 +1042,14 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe due_date() { // due_date is to be changed, payment terms template and/or payment schedule must // be removed as due_date is automatically changed based on payment terms + + // if there is only one row in payment schedule child table, set its due date as the due date + if (this.frm.doc.payment_schedule.length == 1){ + this.frm.doc.payment_schedule[0].due_date = this.frm.doc.due_date; + this.frm.refresh_field("payment_schedule"); + return + } + if ( this.frm.doc.due_date && !this.frm.updating_party_details && From b06a86541bfb384bc9e458a53348cd05d4d95666 Mon Sep 17 00:00:00 2001 From: barredterra <14891507+barredterra@users.noreply.github.com> Date: Tue, 8 Apr 2025 20:39:14 +0200 Subject: [PATCH 1557/1614] refactor: use `doc` parameter instead of `this.frm.doc` (cherry picked from commit 87c21a89fe4bf3261d3a9a7d0a7d9eeefa7ea3d8) --- erpnext/public/js/controllers/transaction.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index cbd80a3c45f..d6541c6496b 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -1039,32 +1039,32 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe } } - due_date() { + due_date(doc) { // due_date is to be changed, payment terms template and/or payment schedule must // be removed as due_date is automatically changed based on payment terms // if there is only one row in payment schedule child table, set its due date as the due date - if (this.frm.doc.payment_schedule.length == 1){ - this.frm.doc.payment_schedule[0].due_date = this.frm.doc.due_date; + if (doc.payment_schedule.length == 1){ + doc.payment_schedule[0].due_date = doc.due_date; this.frm.refresh_field("payment_schedule"); return } if ( - this.frm.doc.due_date && + doc.due_date && !this.frm.updating_party_details && - !this.frm.doc.is_pos && + !doc.is_pos && ( - this.frm.doc.payment_terms_template || - this.frm.doc.payment_schedule?.length + doc.payment_terms_template || + doc.payment_schedule?.length ) ) { const to_clear = []; - if (this.frm.doc.payment_terms_template) { + if (doc.payment_terms_template) { to_clear.push("Payment Terms Template"); } - if (this.frm.doc.payment_schedule?.length) { + if (doc.payment_schedule?.length) { to_clear.push("Payment Schedule Table"); } From cf00d427998f7f59741df7644c02e8c732c2001e Mon Sep 17 00:00:00 2001 From: barredterra <14891507+barredterra@users.noreply.github.com> Date: Tue, 8 Apr 2025 20:40:50 +0200 Subject: [PATCH 1558/1614] fix: recognize trigger from child table (cherry picked from commit c55c77f4e9c48bbebe36cfc29ffbebde2b5bbaaa) --- erpnext/public/js/controllers/transaction.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index d6541c6496b..a468cf1b2b9 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -1039,9 +1039,14 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe } } - due_date(doc) { + due_date(doc, cdt) { // due_date is to be changed, payment terms template and/or payment schedule must // be removed as due_date is automatically changed based on payment terms + if (doc.doctype !== cdt) { + // triggered by change to the due_date field in payment schedule child table + // do nothing to avoid infinite clearing loop + return; + } // if there is only one row in payment schedule child table, set its due date as the due date if (doc.payment_schedule.length == 1){ From 0c260baacd50c1af90acfd885016b30a9a9dae4b Mon Sep 17 00:00:00 2001 From: barredterra <14891507+barredterra@users.noreply.github.com> Date: Tue, 8 Apr 2025 20:53:04 +0200 Subject: [PATCH 1559/1614] fix: use the actual field label (cherry picked from commit 8a4db6958127a5c8c8d0c755c0e8e64bdf6321ab) --- erpnext/public/js/controllers/transaction.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index a468cf1b2b9..093d928a9d3 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -1066,11 +1066,11 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe ) { const to_clear = []; if (doc.payment_terms_template) { - to_clear.push("Payment Terms Template"); + to_clear.push(__(frappe.meta.get_label(cdt, "payment_terms_template"))); } if (doc.payment_schedule?.length) { - to_clear.push("Payment Schedule Table"); + to_clear.push(__(frappe.meta.get_label(cdt, "payment_schedule"))); } frappe.confirm( From 35daf669fe9b5bdfe3a9f1976f0e39b9c52108eb Mon Sep 17 00:00:00 2001 From: barredterra <14891507+barredterra@users.noreply.github.com> Date: Tue, 8 Apr 2025 20:53:29 +0200 Subject: [PATCH 1560/1614] fix: clarify confirmation message (cherry picked from commit 57be8a85d6ebbf9e71b5f1f6389891d2b887f6c0) --- erpnext/public/js/controllers/transaction.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 093d928a9d3..7238e356d29 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -1075,8 +1075,11 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe frappe.confirm( __( - "Do you want to clear the selected {0}?", - [frappe.utils.comma_and(to_clear.map(dt => __(dt)))] + "For the new {0} to take effect, would you like to clear the current {1}?", + [ + __(frappe.meta.get_label(cdt, "due_date")), + frappe.utils.comma_and(to_clear) + ], ), () => { this.frm.set_value("payment_terms_template", ""); From 14efeb4acd4d79018e5520c729cab8b57ff011a1 Mon Sep 17 00:00:00 2001 From: barredterra <14891507+barredterra@users.noreply.github.com> Date: Tue, 8 Apr 2025 20:54:52 +0200 Subject: [PATCH 1561/1614] chore: add context (cherry picked from commit c00f62d54a099b75d9b65ab548c51b5856ae7f9f) --- erpnext/public/js/controllers/transaction.js | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 7238e356d29..9c6ae5afa98 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -1080,6 +1080,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe __(frappe.meta.get_label(cdt, "due_date")), frappe.utils.comma_and(to_clear) ], + "Clear payment terms template and/or payment schedule when due date is changed" ), () => { this.frm.set_value("payment_terms_template", ""); From b5353e4ad1b8f2f14e1a0731b1596503ead3ec92 Mon Sep 17 00:00:00 2001 From: barredterra <14891507+barredterra@users.noreply.github.com> Date: Tue, 8 Apr 2025 21:19:34 +0200 Subject: [PATCH 1562/1614] chore: add german translation --- erpnext/translations/de.csv | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/translations/de.csv b/erpnext/translations/de.csv index 5197b33b47f..8c735dc0e7c 100644 --- a/erpnext/translations/de.csv +++ b/erpnext/translations/de.csv @@ -8340,6 +8340,7 @@ Please set a Company,Bitte legen Sie eine Firma fest, "Sorry, this coupon code's validity has expired",Die Gültigkeit dieses Gutscheincodes ist leider abgelaufen, "Sorry, this coupon code is no longer valid",Dieser Gutscheincode ist leider nicht mehr gültig, For the 'Apply Rule On Other' condition the field {0} is mandatory,Für die Bedingung 'Regel auf andere anwenden' ist das Feld {0} obligatorisch, +"For the new {0} to take effect, would you like to clear the current {1}?","Möchten sie die/den aktuelle(n) {1} entfernen, damit das neue {0} angewendet wird?",Clear payment terms template and/or payment schedule when due date is changed {1} Not in Stock,{1} Nicht auf Lager, Only {0} in Stock for item {1},Nur {0} auf Lager für Artikel {1}, Please enter a coupon code,Bitte geben Sie einen Gutscheincode ein, From 8e9ddb7a698266b287606a6c1e8c995025cf8fdb Mon Sep 17 00:00:00 2001 From: diptanilsaha Date: Wed, 9 Apr 2025 11:37:51 +0530 Subject: [PATCH 1563/1614] fix: added missing project field on pos profile (cherry picked from commit 821d64241af6ad4672390b599b741349f882461d) # Conflicts: # erpnext/accounts/doctype/pos_profile/pos_profile.json --- .../doctype/pos_profile/pos_profile.json | 20 ++++++++++++++++--- .../doctype/pos_profile/pos_profile.py | 1 + 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/pos_profile/pos_profile.json b/erpnext/accounts/doctype/pos_profile/pos_profile.json index c38f9563eb2..1d7a962cf1f 100644 --- a/erpnext/accounts/doctype/pos_profile/pos_profile.json +++ b/erpnext/accounts/doctype/pos_profile/pos_profile.json @@ -56,7 +56,8 @@ "apply_discount_on", "accounting_dimensions_section", "cost_center", - "dimension_col_break" + "dimension_col_break", + "project" ], "fields": [ { @@ -389,6 +390,14 @@ "fieldname": "disable_grand_total_to_default_mop", "fieldtype": "Check", "label": "Disable auto setting Grand Total to default Payment Mode" + }, + { + "fieldname": "project", + "fieldtype": "Link", + "label": "Project", + "oldfieldname": "cost_center", + "oldfieldtype": "Link", + "options": "Project" } ], "icon": "icon-cog", @@ -416,7 +425,7 @@ "link_fieldname": "pos_profile" } ], - "modified": "2025-01-29 13:12:30.796630", + "modified": "2025-04-09 11:35:13.779613", "modified_by": "Administrator", "module": "Accounts", "name": "POS Profile", @@ -442,7 +451,12 @@ "role": "Accounts User" } ], +<<<<<<< HEAD "sort_field": "modified", +======= + "row_format": "Dynamic", + "sort_field": "creation", +>>>>>>> 821d64241a (fix: added missing project field on pos profile) "sort_order": "DESC", "states": [] -} \ No newline at end of file +} diff --git a/erpnext/accounts/doctype/pos_profile/pos_profile.py b/erpnext/accounts/doctype/pos_profile/pos_profile.py index 2bcfb66ce73..c8049c25d07 100644 --- a/erpnext/accounts/doctype/pos_profile/pos_profile.py +++ b/erpnext/accounts/doctype/pos_profile/pos_profile.py @@ -54,6 +54,7 @@ class POSProfile(Document): payments: DF.Table[POSPaymentMethod] print_format: DF.Link | None print_receipt_on_order_complete: DF.Check + project: DF.Link | None select_print_heading: DF.Link | None selling_price_list: DF.Link | None tax_category: DF.Link | None From b8ef83e1ea2473024a18ef49fbb3d2316f5f0fc7 Mon Sep 17 00:00:00 2001 From: Diptanil Saha Date: Wed, 9 Apr 2025 15:39:15 +0530 Subject: [PATCH 1564/1614] chore: resolve conflict --- erpnext/accounts/doctype/pos_profile/pos_profile.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/erpnext/accounts/doctype/pos_profile/pos_profile.json b/erpnext/accounts/doctype/pos_profile/pos_profile.json index 1d7a962cf1f..e74fd72d9e5 100644 --- a/erpnext/accounts/doctype/pos_profile/pos_profile.json +++ b/erpnext/accounts/doctype/pos_profile/pos_profile.json @@ -451,12 +451,8 @@ "role": "Accounts User" } ], -<<<<<<< HEAD - "sort_field": "modified", -======= "row_format": "Dynamic", "sort_field": "creation", ->>>>>>> 821d64241a (fix: added missing project field on pos profile) "sort_order": "DESC", "states": [] } From cc7756dd49534b9338d18c481e016dcf454a6c0e Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Wed, 9 Apr 2025 20:47:10 +0530 Subject: [PATCH 1565/1614] fix: test file for v15 --- .../report/available_serial_no/test_available_serial_no.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/stock/report/available_serial_no/test_available_serial_no.py b/erpnext/stock/report/available_serial_no/test_available_serial_no.py index b8741af4506..3a843c991f7 100644 --- a/erpnext/stock/report/available_serial_no/test_available_serial_no.py +++ b/erpnext/stock/report/available_serial_no/test_available_serial_no.py @@ -2,7 +2,7 @@ # See license.txt import frappe -from frappe.tests import IntegrationTestCase +from frappe.tests.utils import FrappeTestCase from frappe.utils import add_days, today from erpnext.stock.doctype.delivery_note.test_delivery_note import create_delivery_note @@ -10,7 +10,7 @@ from erpnext.stock.doctype.item.test_item import create_item from erpnext.stock.doctype.purchase_receipt.test_purchase_receipt import make_purchase_receipt -class TestStockLedgerReeport(IntegrationTestCase): +class TestStockLedgerReport(FrappeTestCase): def setUp(self) -> None: item = create_item("_Test Item with Serial No", is_stock_item=1) item.has_serial_no = 1 From 663e2b7e6c9cb5821cd90d3e94657590afc103dc Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Tue, 8 Apr 2025 13:30:12 +0530 Subject: [PATCH 1566/1614] fix: item code not showing in the error message (cherry picked from commit 86dee69c2f08c2ae247a1c1d65d2f2a0a1214169) --- erpnext/stock/stock_ledger.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/erpnext/stock/stock_ledger.py b/erpnext/stock/stock_ledger.py index 52f481f1374..e011217c984 100644 --- a/erpnext/stock/stock_ledger.py +++ b/erpnext/stock/stock_ledger.py @@ -1536,7 +1536,7 @@ class update_entries_after: ) in frappe.local.flags.currently_saving: msg = _("{0} units of {1} needed in {2} to complete this transaction.").format( frappe.bold(abs(deficiency)), - frappe.get_desk_link("Item", exceptions[0]["item_code"]), + frappe.get_desk_link("Item", exceptions[0]["item_code"], show_title_with_name=True), frappe.get_desk_link("Warehouse", warehouse), ) else: @@ -1544,7 +1544,7 @@ class update_entries_after: "{0} units of {1} needed in {2} on {3} {4} for {5} to complete this transaction." ).format( frappe.bold(abs(deficiency)), - frappe.get_desk_link("Item", exceptions[0]["item_code"]), + frappe.get_desk_link("Item", exceptions[0]["item_code"], show_title_with_name=True), frappe.get_desk_link("Warehouse", warehouse), exceptions[0]["posting_date"], exceptions[0]["posting_time"], @@ -2033,7 +2033,7 @@ def validate_negative_qty_in_future_sle(args, allow_negative_stock=False): if is_negative_with_precision(neg_sle): message = _("{0} units of {1} needed in {2} on {3} {4} for {5} to complete this transaction.").format( abs(neg_sle[0]["qty_after_transaction"]), - frappe.get_desk_link("Item", args.item_code), + frappe.get_desk_link("Item", args.item_code, show_title_with_name=True), frappe.get_desk_link("Warehouse", args.warehouse), neg_sle[0]["posting_date"], neg_sle[0]["posting_time"], @@ -2157,7 +2157,7 @@ def validate_reserved_stock(kwargs): if diff < 0 and abs(diff) > 0.0001: msg = _("{0} units of {1} needed in {2} on {3} {4} to complete this transaction.").format( abs(diff), - frappe.get_desk_link("Item", kwargs.item_code), + frappe.get_desk_link("Item", kwargs.item_code, show_title_with_name=True), frappe.get_desk_link("Warehouse", kwargs.warehouse), nowdate(), nowtime(), From 01aad96b1045c048d0350686f2701a52cb06a783 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Wed, 9 Apr 2025 23:47:55 +0530 Subject: [PATCH 1567/1614] fix: bypass validation during reposting (cherry picked from commit 3697b9fd9b4e0b0725fc1c3dadb7c960c076ceb0) --- .../purchase_receipt/test_purchase_receipt.py | 4 ++++ .../serial_and_batch_bundle.py | 12 ++++++++++++ 2 files changed, 16 insertions(+) diff --git a/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py index b7aa97ddb54..4b69b99e69a 100644 --- a/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py +++ b/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py @@ -3989,6 +3989,8 @@ class TestPurchaseReceipt(FrappeTestCase): make_purchase_return, ) + frappe.flags.through_repost_item_valuation = False + sn_item_code = make_item( "Test Serial No for Validation", {"has_serial_no": 1, "serial_no_series": "SN-TSNFVAL-.#####"} ).name @@ -4020,6 +4022,8 @@ class TestPurchaseReceipt(FrappeTestCase): make_purchase_return, ) + frappe.flags.through_repost_item_valuation = False + batch_item_code = make_item( "Test Batch No for Validation", {"has_batch_no": 1, "batch_number_series": "BT-TSNFVAL-.#####", "create_new_batch": 1}, 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 8abe5b7e082..5922ecbf026 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 @@ -322,6 +322,15 @@ class SerialandBatchBundle(Document): else: valuation_rate = valuation_details["batches"].get(row.batch_no) + if frappe.flags.through_repost_item_valuation and not valuation_rate: + # if different serial nos / batches are returned + if row.serial_no: + serial_nos = sorted(list(valuation_details["serial_nos"].keys())) + valuation_rate = valuation_details["serial_nos"].get(serial_nos[cint(row.idx) - 1]) + else: + batches = sorted(list(valuation_details["batches"].keys())) + valuation_rate = valuation_details["batches"].get(batches[cint(row.idx) - 1]) + row.incoming_rate = flt(valuation_rate) row.stock_value_difference = flt(row.qty) * flt(row.incoming_rate) @@ -337,6 +346,9 @@ class SerialandBatchBundle(Document): self.set_incoming_rate_for_inward_transaction(row, save) def validate_returned_serial_batch_no(self, return_against, row, original_inv_details): + if frappe.flags.through_repost_item_valuation: + return + if row.serial_no and row.serial_no not in original_inv_details["serial_nos"]: self.throw_error_message( _( From b819e0a61bb706cdd5e4ffb97902ea30dc0bc7ec Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Wed, 9 Apr 2025 12:37:02 +0530 Subject: [PATCH 1568/1614] fix: Recreate Stock Ledgers issue (cherry picked from commit 229a4cef4512c4683f99dc7b9f6bf29d799a3fde) --- erpnext/controllers/selling_controller.py | 4 ++-- .../repost_item_valuation/repost_item_valuation.py | 6 +++--- erpnext/stock/doctype/stock_entry/stock_entry.py | 4 ++-- .../doctype/stock_reconciliation/stock_reconciliation.py | 8 ++++++-- 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/erpnext/controllers/selling_controller.py b/erpnext/controllers/selling_controller.py index 8ba8f06c65f..15526f85e34 100644 --- a/erpnext/controllers/selling_controller.py +++ b/erpnext/controllers/selling_controller.py @@ -558,7 +558,7 @@ class SellingController(StockController): self.doctype, self.name, d.item_code, self.return_against, item_row=d ) - def update_stock_ledger(self): + def update_stock_ledger(self, allow_negative_stock=False): self.update_reserved_qty() sl_entries = [] @@ -588,7 +588,7 @@ class SellingController(StockController): ): sl_entries.append(self.get_sle_for_source_warehouse(d)) - self.make_sl_entries(sl_entries) + self.make_sl_entries(sl_entries, allow_negative_stock=allow_negative_stock) def get_sle_for_source_warehouse(self, item_row): serial_and_batch_bundle = ( diff --git a/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py b/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py index 880acb65dc3..ecbb10b6cb5 100644 --- a/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py +++ b/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py @@ -260,10 +260,10 @@ class RepostItemValuation(Document): """Recreate Stock Ledger Entries for the transaction.""" if self.based_on == "Transaction" and self.recreate_stock_ledgers: doc = frappe.get_doc(self.voucher_type, self.voucher_no) - doc.docstatus = 2 - doc.update_stock_ledger(allow_negative_stock=True, via_landed_cost_voucher=True) + doc.db_set("docstatus", 2) + doc.update_stock_ledger(allow_negative_stock=True) - doc.docstatus = 1 + doc.db_set("docstatus", 1) doc.update_stock_ledger(allow_negative_stock=True) diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index 52655c9ac03..efa263a7573 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -1347,7 +1347,7 @@ class StockEntry(StockController): ) ) - def update_stock_ledger(self): + def update_stock_ledger(self, allow_negative_stock=False): sl_entries = [] finished_item_row = self.get_finished_item_row() @@ -1361,7 +1361,7 @@ class StockEntry(StockController): if self.docstatus == 2: sl_entries.reverse() - self.make_sl_entries(sl_entries) + self.make_sl_entries(sl_entries, allow_negative_stock=allow_negative_stock) def get_finished_item_row(self): finished_item_row = None diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py index 46f9f9dcf1b..32c4a743999 100644 --- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py +++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py @@ -663,7 +663,7 @@ class StockReconciliation(StockController): title=_("Stock Reservation"), ) - def update_stock_ledger(self): + def update_stock_ledger(self, allow_negative_stock=False): """find difference between current and expected entries and create stock ledger entries based on the difference""" from erpnext.stock.stock_ledger import get_previous_sle @@ -719,7 +719,11 @@ class StockReconciliation(StockController): sl_entries.append(self.get_sle_for_items(row)) if sl_entries: - allow_negative_stock = cint(frappe.db.get_single_value("Stock Settings", "allow_negative_stock")) + if not allow_negative_stock: + allow_negative_stock = cint( + frappe.db.get_single_value("Stock Settings", "allow_negative_stock") + ) + self.make_sl_entries(sl_entries, allow_negative_stock=allow_negative_stock) def make_adjustment_entry(self, row, sl_entries): From 24c8a06520206c3ef69dab802b210838c8eeed10 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Tue, 1 Apr 2025 13:15:06 +0530 Subject: [PATCH 1569/1614] fix: current batch qty showing zero in the stock reconciliation (cherry picked from commit a5c62f8623c88805955cb613c3367ed3d2977675) --- .../serial_and_batch_bundle/serial_and_batch_bundle.py | 5 +++-- 1 file changed, 3 insertions(+), 2 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 5922ecbf026..392b02e6cdc 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 @@ -2111,7 +2111,7 @@ def get_auto_batch_nos(kwargs): picked_batches, ) - if available_batches and kwargs.get("posting_date"): + if not kwargs.get("do_not_check_future_batches") and available_batches and kwargs.get("posting_date"): filter_zero_near_batches(available_batches, kwargs) if not kwargs.consider_negative_batches: @@ -2130,7 +2130,8 @@ def filter_zero_near_batches(available_batches, kwargs): del kwargs["posting_date"] del kwargs["posting_time"] - available_batches_in_future = get_available_batches(kwargs) + kwargs.do_not_check_future_batches = 1 + available_batches_in_future = get_auto_batch_nos(kwargs) for batch in available_batches: if batch.qty <= 0: continue From 2e6ba91589814d6cca57e3cbf94088254ceac247 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Thu, 10 Apr 2025 16:28:23 +0530 Subject: [PATCH 1570/1614] feat: Allow to Make Quality Inspection after Purchase / Delivery (cherry picked from commit 8eaa2afeb7f5716a931dfc099c886d28097eaec9) # Conflicts: # erpnext/stock/doctype/stock_settings/stock_settings.json --- .../quality_inspection/quality_inspection.py | 5 +++ .../stock_settings/stock_settings.json | 35 ++++++++++++++++++- .../doctype/stock_settings/stock_settings.py | 1 + 3 files changed, 40 insertions(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/quality_inspection/quality_inspection.py b/erpnext/stock/doctype/quality_inspection/quality_inspection.py index bf1c918668f..8aed2277de3 100644 --- a/erpnext/stock/doctype/quality_inspection/quality_inspection.py +++ b/erpnext/stock/doctype/quality_inspection/quality_inspection.py @@ -144,6 +144,11 @@ class QualityInspection(Document): child_row_references.remove(child_row_references[0]) def validate_inspection_required(self): + if frappe.db.get_single_value( + "Stock Settings", "allow_to_make_quality_inspection_after_purchase_or_delivery" + ): + return + if self.reference_type in ["Purchase Receipt", "Purchase Invoice"] and not frappe.get_cached_value( "Item", self.item_code, "inspection_required_before_purchase" ): diff --git a/erpnext/stock/doctype/stock_settings/stock_settings.json b/erpnext/stock/doctype/stock_settings/stock_settings.json index 551104688a2..cf6737673df 100644 --- a/erpnext/stock/doctype/stock_settings/stock_settings.json +++ b/erpnext/stock/doctype/stock_settings/stock_settings.json @@ -35,6 +35,7 @@ "show_barcode_field", "clean_description_html", "allow_internal_transfer_at_arms_length_price", +<<<<<<< HEAD "quality_inspection_settings_section", "action_if_quality_inspection_is_not_submitted", "column_break_23", @@ -46,6 +47,8 @@ "auto_reserve_stock_for_sales_order_on_purchase", "serial_and_batch_reservation_section", "auto_reserve_serial_and_batch", +======= +>>>>>>> 8eaa2afeb7 (feat: Allow to Make Quality Inspection after Purchase / Delivery) "serial_and_batch_item_settings_tab", "section_break_7", "allow_existing_serial_no", @@ -62,6 +65,21 @@ "use_naming_series", "column_break_wslv", "naming_series_prefix", + "stock_reservation_tab", + "enable_stock_reservation", + "auto_reserve_stock", + "column_break_rx3e", + "allow_partial_reservation", + "auto_reserve_stock_for_sales_order_on_purchase", + "serial_and_batch_reservation_section", + "auto_reserve_serial_and_batch", + "quality_tab", + "quality_inspection_settings_section", + "action_if_quality_inspection_is_not_submitted", + "column_break_23", + "action_if_quality_inspection_is_rejected", + "section_break_uiau", + "allow_to_make_quality_inspection_after_purchase_or_delivery", "stock_planning_tab", "auto_material_request", "auto_indent", @@ -503,6 +521,21 @@ "fieldname": "allow_uom_with_conversion_rate_defined_in_item", "fieldtype": "Check", "label": "Allow UOM with Conversion Rate Defined in Item" + }, + { + "fieldname": "quality_tab", + "fieldtype": "Tab Break", + "label": "Quality" + }, + { + "fieldname": "section_break_uiau", + "fieldtype": "Section Break" + }, + { + "default": "0", + "fieldname": "allow_to_make_quality_inspection_after_purchase_or_delivery", + "fieldtype": "Check", + "label": "Allow to Make Quality Inspection after Purchase / Delivery" } ], "icon": "icon-cog", @@ -510,7 +543,7 @@ "index_web_pages_for_search": 1, "issingle": 1, "links": [], - "modified": "2025-03-31 15:34:20.752065", + "modified": "2025-04-10 16:19:31.210007", "modified_by": "Administrator", "module": "Stock", "name": "Stock Settings", diff --git a/erpnext/stock/doctype/stock_settings/stock_settings.py b/erpnext/stock/doctype/stock_settings/stock_settings.py index 4de8057a006..2ed8686c653 100644 --- a/erpnext/stock/doctype/stock_settings/stock_settings.py +++ b/erpnext/stock/doctype/stock_settings/stock_settings.py @@ -33,6 +33,7 @@ class StockSettings(Document): allow_partial_reservation: DF.Check allow_to_edit_stock_uom_qty_for_purchase: DF.Check allow_to_edit_stock_uom_qty_for_sales: DF.Check + allow_to_make_quality_inspection_after_purchase_or_delivery: DF.Check allow_uom_with_conversion_rate_defined_in_item: DF.Check auto_create_serial_and_batch_bundle_for_outward: DF.Check auto_indent: DF.Check From 21f0dcbcc3eb7df7fb540cf75c626c54fa0f32b2 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Thu, 10 Apr 2025 13:43:42 +0530 Subject: [PATCH 1571/1614] fix: update the modified date in for SLEs and GLs after rename (cherry picked from commit dc5a5ef25887c3ce66be9f6c2d5653ce173289eb) --- erpnext/accounts/doctype/gl_entry/gl_entry.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/gl_entry/gl_entry.py b/erpnext/accounts/doctype/gl_entry/gl_entry.py index 66214cc7485..2243420f13c 100644 --- a/erpnext/accounts/doctype/gl_entry/gl_entry.py +++ b/erpnext/accounts/doctype/gl_entry/gl_entry.py @@ -7,7 +7,7 @@ from frappe import _ from frappe.model.document import Document from frappe.model.meta import get_field_precision from frappe.model.naming import set_name_from_naming_options -from frappe.utils import flt, fmt_money +from frappe.utils import flt, fmt_money, now import erpnext from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import ( @@ -456,7 +456,7 @@ def rename_temporarily_named_docs(doctype): set_name_from_naming_options(frappe.get_meta(doctype).autoname, doc) newname = doc.name frappe.db.sql( - f"UPDATE `tab{doctype}` SET name = %s, to_rename = 0 where name = %s", - (newname, oldname), + f"UPDATE `tab{doctype}` SET name = %s, to_rename = 0, modified = %s where name = %s", + (newname, now(), oldname), auto_commit=True, ) From 00ac8597b0ef6ef8035bfd6a893fb1f0cd14aec7 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Fri, 11 Apr 2025 15:34:45 +0530 Subject: [PATCH 1572/1614] chore: fix conflicts --- erpnext/stock/doctype/stock_settings/stock_settings.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/erpnext/stock/doctype/stock_settings/stock_settings.json b/erpnext/stock/doctype/stock_settings/stock_settings.json index cf6737673df..4681fab3d4d 100644 --- a/erpnext/stock/doctype/stock_settings/stock_settings.json +++ b/erpnext/stock/doctype/stock_settings/stock_settings.json @@ -35,7 +35,6 @@ "show_barcode_field", "clean_description_html", "allow_internal_transfer_at_arms_length_price", -<<<<<<< HEAD "quality_inspection_settings_section", "action_if_quality_inspection_is_not_submitted", "column_break_23", @@ -47,8 +46,6 @@ "auto_reserve_stock_for_sales_order_on_purchase", "serial_and_batch_reservation_section", "auto_reserve_serial_and_batch", -======= ->>>>>>> 8eaa2afeb7 (feat: Allow to Make Quality Inspection after Purchase / Delivery) "serial_and_batch_item_settings_tab", "section_break_7", "allow_existing_serial_no", From 5e1d3f77bbf813a43c52dfa98b92e711a6275651 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Fri, 11 Apr 2025 15:35:36 +0530 Subject: [PATCH 1573/1614] chore: fix conflicts --- erpnext/stock/doctype/stock_settings/stock_settings.json | 1 - 1 file changed, 1 deletion(-) diff --git a/erpnext/stock/doctype/stock_settings/stock_settings.json b/erpnext/stock/doctype/stock_settings/stock_settings.json index 4681fab3d4d..2304359ab00 100644 --- a/erpnext/stock/doctype/stock_settings/stock_settings.json +++ b/erpnext/stock/doctype/stock_settings/stock_settings.json @@ -64,7 +64,6 @@ "naming_series_prefix", "stock_reservation_tab", "enable_stock_reservation", - "auto_reserve_stock", "column_break_rx3e", "allow_partial_reservation", "auto_reserve_stock_for_sales_order_on_purchase", From e479975f54a760a8ac104ebbcb71920d733c56cc Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Fri, 11 Apr 2025 16:16:09 +0530 Subject: [PATCH 1574/1614] fix: allow to use batchwise valuation for moving average items (cherry picked from commit 65ba79bb857c5d55c9e3b87c15a7f150901802c8) --- erpnext/stock/doctype/batch/batch.py | 4 -- .../purchase_receipt/test_purchase_receipt.py | 2 +- .../doctype/stock_entry/test_stock_entry.py | 47 +++++++++++++++++++ .../test_stock_ledger_entry.py | 2 +- erpnext/stock/serial_batch_bundle.py | 4 +- 5 files changed, 52 insertions(+), 7 deletions(-) diff --git a/erpnext/stock/doctype/batch/batch.py b/erpnext/stock/doctype/batch/batch.py index 47acebb6634..3c46fcb5aad 100644 --- a/erpnext/stock/doctype/batch/batch.py +++ b/erpnext/stock/doctype/batch/batch.py @@ -160,10 +160,6 @@ class Batch(Document): from erpnext.stock.utils import get_valuation_method if self.is_new(): - if get_valuation_method(self.item) == "Moving Average": - self.use_batchwise_valuation = 0 - return - if frappe.db.get_single_value("Stock Settings", "do_not_use_batchwise_valuation"): self.use_batchwise_valuation = 0 return diff --git a/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py index 4b69b99e69a..8e8532a904b 100644 --- a/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py +++ b/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py @@ -3327,7 +3327,7 @@ class TestPurchaseReceipt(FrappeTestCase): bundle = dn.items[0].serial_and_batch_bundle valuation_rate = frappe.db.get_value("Serial and Batch Bundle", bundle, "avg_rate") - self.assertEqual(valuation_rate, 150) + self.assertEqual(valuation_rate, 100.0) doc = frappe.get_doc("Stock Settings") doc.do_not_use_batchwise_valuation = 1 diff --git a/erpnext/stock/doctype/stock_entry/test_stock_entry.py b/erpnext/stock/doctype/stock_entry/test_stock_entry.py index 0791877f522..7fa31cae57b 100644 --- a/erpnext/stock/doctype/stock_entry/test_stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/test_stock_entry.py @@ -1960,6 +1960,53 @@ class TestStockEntry(FrappeTestCase): self.assertEqual(se.items[0].amount, 300) self.assertEqual(se.items[0].basic_amount, 300) + def test_use_batch_wise_valuation_for_moving_average_item(self): + item_code = "_Test Use Batch Wise MA Valuation Item" + + make_item( + item_code, + { + "is_stock_item": 1, + "valuation_method": "Moving Average", + "has_batch_no": 1, + "create_new_batch": 1, + "batch_naming_series": "Test-UBWVMAV-T-NNS.#####", + }, + ) + + frappe.db.set_single_value("Stock Settings", "do_not_use_batchwise_valuation", 0) + + batches = [] + se = make_stock_entry( + item_code=item_code, + qty=10, + to_warehouse="_Test Warehouse - _TC", + basic_rate=100, + posting_date=add_days(nowdate(), -2), + ) + + batches.append(get_batch_from_bundle(se.items[0].serial_and_batch_bundle)) + + se = make_stock_entry( + item_code=item_code, + qty=10, + to_warehouse="_Test Warehouse - _TC", + basic_rate=300, + posting_date=add_days(nowdate(), -1), + ) + + batches.append(get_batch_from_bundle(se.items[0].serial_and_batch_bundle)) + + se = make_stock_entry( + item_code=item_code, + qty=5, + from_warehouse="_Test Warehouse - _TC", + batch_no=batches[1], + posting_date=nowdate(), + ) + + self.assertEqual(se.items[0].basic_rate, 300) + def make_serialized_item(**args): args = frappe._dict(args) diff --git a/erpnext/stock/doctype/stock_ledger_entry/test_stock_ledger_entry.py b/erpnext/stock/doctype/stock_ledger_entry/test_stock_ledger_entry.py index 8658316ad90..6beab7ce48d 100644 --- a/erpnext/stock/doctype/stock_ledger_entry/test_stock_ledger_entry.py +++ b/erpnext/stock/doctype/stock_ledger_entry/test_stock_ledger_entry.py @@ -523,7 +523,7 @@ class TestStockLedgerEntry(FrappeTestCase, StockTestMixin): dns = create_delivery_note_entries_for_batchwise_item_valuation_test(dn_entry_list) sle_details = fetch_sle_details_for_doc_list(dns, ["stock_value_difference"]) svd_list = [-1 * d["stock_value_difference"] for d in sle_details] - expected_incoming_rates = expected_abs_svd = [100.0, 100.0, 100.0, 100.0] + expected_incoming_rates = expected_abs_svd = [75.0, 125.0, 75.0, 125.0] self.assertEqual(expected_abs_svd, svd_list, "Incorrect 'Stock Value Difference' values") for dn, _incoming_rate in zip(dns, expected_incoming_rates, strict=False): diff --git a/erpnext/stock/serial_batch_bundle.py b/erpnext/stock/serial_batch_bundle.py index 8e64b4e856f..e127960d6bb 100644 --- a/erpnext/stock/serial_batch_bundle.py +++ b/erpnext/stock/serial_batch_bundle.py @@ -692,7 +692,9 @@ class BatchNoValuation(DeprecatedBatchNoValuation): self.batchwise_valuation_batches = [] self.non_batchwise_valuation_batches = [] - if get_valuation_method(self.sle.item_code) == "Moving Average": + if get_valuation_method(self.sle.item_code) == "Moving Average" and frappe.db.get_single_value( + "Stock Settings", "do_not_use_batchwise_valuation" + ): self.non_batchwise_valuation_batches = self.batches return From 00b25537f4f452b400eb2c4b6479fb03e1b13917 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Fri, 11 Apr 2025 18:58:09 +0530 Subject: [PATCH 1575/1614] fix: removed display depends on (cherry picked from commit e0bf45e03bf21556fe2c131e66a49bfc1d5202fb) --- .../doctype/stock_settings/stock_settings.json | 3 +-- .../doctype/stock_settings/stock_settings.py | 16 ---------------- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/erpnext/stock/doctype/stock_settings/stock_settings.json b/erpnext/stock/doctype/stock_settings/stock_settings.json index 2304359ab00..ea79b78132a 100644 --- a/erpnext/stock/doctype/stock_settings/stock_settings.json +++ b/erpnext/stock/doctype/stock_settings/stock_settings.json @@ -470,7 +470,6 @@ }, { "default": "0", - "depends_on": "eval:doc.valuation_method === \"Moving Average\"", "description": "If enabled, the system will use the moving average valuation method to calculate the valuation rate for the batched items and will not consider the individual batch-wise incoming rate.", "fieldname": "do_not_use_batchwise_valuation", "fieldtype": "Check", @@ -539,7 +538,7 @@ "index_web_pages_for_search": 1, "issingle": 1, "links": [], - "modified": "2025-04-10 16:19:31.210007", + "modified": "2025-04-11 18:56:35.781929", "modified_by": "Administrator", "module": "Stock", "name": "Stock Settings", diff --git a/erpnext/stock/doctype/stock_settings/stock_settings.py b/erpnext/stock/doctype/stock_settings/stock_settings.py index 2ed8686c653..82b62fb4062 100644 --- a/erpnext/stock/doctype/stock_settings/stock_settings.py +++ b/erpnext/stock/doctype/stock_settings/stock_settings.py @@ -106,22 +106,6 @@ class StockSettings(Document): self.validate_stock_reservation() self.change_precision_for_for_sales() self.change_precision_for_purchase() - self.validate_use_batch_wise_valuation() - - def validate_use_batch_wise_valuation(self): - if not self.do_not_use_batchwise_valuation: - return - - if self.valuation_method == "FIFO": - frappe.throw(_("Cannot disable batch wise valuation for FIFO valuation method.")) - - if frappe.get_all( - "Item", filters={"valuation_method": "FIFO", "is_stock_item": 1, "has_batch_no": 1}, limit=1 - ): - frappe.throw(_("Can't disable batch wise valuation for items with FIFO valuation method.")) - - if frappe.get_all("Batch", filters={"use_batchwise_valuation": 1}, limit=1): - frappe.throw(_("Can't disable batch wise valuation for active batches.")) def validate_warehouses(self): warehouse_fields = ["default_warehouse", "sample_retention_warehouse"] From 0ff7465e278893442ac4e2f7520440261d263949 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Fri, 11 Apr 2025 19:17:47 +0530 Subject: [PATCH 1576/1614] fix: condition for use_batchwise_valuation (cherry picked from commit cc171d970665990b455a3334f7c9e110d232108a) --- erpnext/stock/doctype/batch/batch.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/batch/batch.py b/erpnext/stock/doctype/batch/batch.py index 3c46fcb5aad..800d4f70c40 100644 --- a/erpnext/stock/doctype/batch/batch.py +++ b/erpnext/stock/doctype/batch/batch.py @@ -160,7 +160,9 @@ class Batch(Document): from erpnext.stock.utils import get_valuation_method if self.is_new(): - if frappe.db.get_single_value("Stock Settings", "do_not_use_batchwise_valuation"): + if get_valuation_method(self.item) == "Moving Average" and frappe.db.get_single_value( + "Stock Settings", "do_not_use_batchwise_valuation" + ): self.use_batchwise_valuation = 0 return From debfcdc61ff6256b22fb7ba15e335f2937d07d89 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Fri, 11 Apr 2025 21:12:02 +0530 Subject: [PATCH 1577/1614] fix: batchwise valuation for MA item (cherry picked from commit 504b8c0a68a7e42f7f059abdfcca5880f0778d3d) --- erpnext/stock/stock_ledger.py | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/erpnext/stock/stock_ledger.py b/erpnext/stock/stock_ledger.py index e011217c984..7e2d8bef79b 100644 --- a/erpnext/stock/stock_ledger.py +++ b/erpnext/stock/stock_ledger.py @@ -547,9 +547,6 @@ class update_entries_after: self.allow_zero_rate = allow_zero_rate self.via_landed_cost_voucher = via_landed_cost_voucher self.item_code = args.get("item_code") - self.use_moving_avg_for_batch = frappe.db.get_single_value( - "Stock Settings", "do_not_use_batchwise_valuation" - ) self.allow_negative_stock = allow_negative_stock or is_negative_stock_allowed( item_code=self.item_code @@ -842,7 +839,7 @@ class update_entries_after: if sle.get(dimension.get("fieldname")): has_dimensions = True - if sle.serial_and_batch_bundle and (not self.use_moving_avg_for_batch or sle.has_serial_no): + if sle.serial_and_batch_bundle: self.calculate_valuation_for_serial_batch_bundle(sle) elif sle.serial_no and not self.args.get("sle_id"): # Only run in reposting @@ -912,15 +909,6 @@ class update_entries_after: sle.doctype = "Stock Ledger Entry" frappe.get_doc(sle).db_update() - if ( - sle.serial_and_batch_bundle - and self.valuation_method == "Moving Average" - and self.use_moving_avg_for_batch - and (sle.batch_no or sle.has_batch_no) - ): - valuation_rate = flt(stock_value_difference) / flt(sle.actual_qty) - self.update_valuation_rate_in_serial_and_batch_bundle(sle, valuation_rate) - if not self.args.get("sle_id") or ( sle.serial_and_batch_bundle and sle.auto_created_serial_and_batch_bundle ): @@ -1036,15 +1024,6 @@ class update_entries_after: self.wh_data.qty_after_transaction, self.flt_precision ) - def update_valuation_rate_in_serial_and_batch_bundle(self, sle, valuation_rate): - # Only execute if the item has batch_no and the valuation method is moving average - if not frappe.db.exists("Serial and Batch Bundle", sle.serial_and_batch_bundle): - return - - doc = frappe.get_cached_doc("Serial and Batch Bundle", sle.serial_and_batch_bundle) - doc.update_valuation_rate(valuation_rate, save=True) - doc.calculate_qty_and_amount(save=True) - def get_outgoing_rate_for_batched_item(self, sle): if self.wh_data.qty_after_transaction == 0: return 0 From b2fb4fba51d1118f5459dc00c48f7849aaf2038d Mon Sep 17 00:00:00 2001 From: ljain112 Date: Fri, 11 Apr 2025 15:06:03 +0530 Subject: [PATCH 1578/1614] fix: correct doctype in item_wise_purchase register (cherry picked from commit b8b8dce733f92acc5d77b005f3e85befe20de671) --- .../item_wise_purchase_register/item_wise_purchase_register.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py b/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py index b313ed8b173..ae822c5b413 100644 --- a/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py +++ b/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py @@ -369,7 +369,7 @@ def get_items(filters, additional_table_columns): from frappe.desk.reportview import build_match_conditions query, params = query.walk() - match_conditions = build_match_conditions("Sales Invoice") + match_conditions = build_match_conditions(doctype) if match_conditions: query += " and " + match_conditions From 416d9bce2ce1f1e58091a68313c6542aa548b6bd Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Sun, 13 Apr 2025 18:53:11 +0530 Subject: [PATCH 1579/1614] fix: Group GLs by account for TB generation (cherry picked from commit f894c6d275fd6c8d94c4df0ad8dcdb87bb5f14d4) --- .../accounts/report/financial_statements.py | 20 +++++++++++++++---- .../report/trial_balance/trial_balance.py | 1 + 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/report/financial_statements.py b/erpnext/accounts/report/financial_statements.py index faa65fb425e..67154455f95 100644 --- a/erpnext/accounts/report/financial_statements.py +++ b/erpnext/accounts/report/financial_statements.py @@ -9,6 +9,7 @@ import re import frappe from frappe import _ +from frappe.query_builder.functions import Sum from frappe.utils import add_days, add_months, cint, cstr, flt, formatdate, get_first_day, getdate from pypika.terms import ExistsCriterion @@ -428,6 +429,7 @@ def set_gl_entries_by_account( root_type=None, ignore_closing_entries=False, ignore_opening_entries=False, + group_by_account=False, ): """Returns a dict like { "account": [gl entries], ... }""" gl_entries = [] @@ -459,6 +461,7 @@ def set_gl_entries_by_account( root_type, ignore_closing_entries, last_period_closing_voucher[0].name, + group_by_account=group_by_account, ) from_date = add_days(last_period_closing_voucher[0].period_end_date, 1) ignore_opening_entries = True @@ -473,6 +476,7 @@ def set_gl_entries_by_account( root_type, ignore_closing_entries, ignore_opening_entries=ignore_opening_entries, + group_by_account=group_by_account, ) if filters and filters.get("presentation_currency"): @@ -495,21 +499,29 @@ def get_accounting_entries( ignore_closing_entries=None, period_closing_voucher=None, ignore_opening_entries=False, + group_by_account=False, ): gl_entry = frappe.qb.DocType(doctype) query = ( frappe.qb.from_(gl_entry) .select( gl_entry.account, - gl_entry.debit, - gl_entry.credit, - gl_entry.debit_in_account_currency, - gl_entry.credit_in_account_currency, + gl_entry.debit if not group_by_account else Sum(gl_entry.debit).as_("debit"), + gl_entry.credit if not group_by_account else Sum(gl_entry.credit).as_("credit"), + gl_entry.debit_in_account_currency + if not group_by_account + else Sum(gl_entry.debit_in_account_currency).as_("debit_in_account_currency"), + gl_entry.credit_in_account_currency + if not group_by_account + else Sum(gl_entry.credit_in_account_currency).as_("credit_in_account_currency"), gl_entry.account_currency, ) .where(gl_entry.company == filters.company) ) + if group_by_account: + query = query.groupby(gl_entry.account) + ignore_is_opening = frappe.db.get_single_value( "Accounts Settings", "ignore_is_opening_check_for_reporting" ) diff --git a/erpnext/accounts/report/trial_balance/trial_balance.py b/erpnext/accounts/report/trial_balance/trial_balance.py index 9d1b86ebcdc..5575426dfff 100644 --- a/erpnext/accounts/report/trial_balance/trial_balance.py +++ b/erpnext/accounts/report/trial_balance/trial_balance.py @@ -116,6 +116,7 @@ def get_data(filters): root_rgt=None, ignore_closing_entries=not flt(filters.with_period_closing_entry_for_current_period), ignore_opening_entries=True, + group_by_account=True, ) calculate_values( From 73683b275457279402d060fb9e246662b7de2b7b Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Tue, 8 Apr 2025 15:02:12 +0530 Subject: [PATCH 1580/1614] fix: group sub assemblies in production plan (cherry picked from commit f58abed935f17f7d4c6b79c1c097954ce5a0643b) --- .../production_plan/production_plan.py | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/erpnext/manufacturing/doctype/production_plan/production_plan.py b/erpnext/manufacturing/doctype/production_plan/production_plan.py index cfd3f789e78..5330001c617 100644 --- a/erpnext/manufacturing/doctype/production_plan/production_plan.py +++ b/erpnext/manufacturing/doctype/production_plan/production_plan.py @@ -939,6 +939,7 @@ class ProductionPlan(Document): bom_data = [] get_sub_assembly_items( + [item.production_item for item in sub_assembly_items_store], row.bom_no, bom_data, row.planned_qty, @@ -1528,10 +1529,10 @@ def get_items_for_material_requests(doc, warehouses=None, get_parent_warehouse_d so_item_details = frappe._dict() - sub_assembly_items = {} + sub_assembly_items = defaultdict(int) if doc.get("skip_available_sub_assembly_item") and doc.get("sub_assembly_items"): for d in doc.get("sub_assembly_items"): - sub_assembly_items.setdefault((d.get("production_item"), d.get("bom_no")), d.get("qty")) + sub_assembly_items[(d.get("production_item"), d.get("bom_no"))] += d.get("qty") for data in po_items: if not data.get("include_exploded_items") and doc.get("sub_assembly_items"): @@ -1560,6 +1561,7 @@ def get_items_for_material_requests(doc, warehouses=None, get_parent_warehouse_d item_details = {} if doc.get("sub_assembly_items"): item_details = get_raw_materials_of_sub_assembly_items( + so_item_details[doc.get("sales_order")].keys() if so_item_details else [], item_details, company, bom_no, @@ -1737,6 +1739,7 @@ def get_item_data(item_code): def get_sub_assembly_items( + sub_assembly_items, bom_no, bom_data, to_produce_qty, @@ -1752,7 +1755,7 @@ def get_sub_assembly_items( stock_qty = (d.stock_qty / d.parent_bom_qty) * flt(to_produce_qty) bin_details = frappe._dict() - if skip_available_sub_assembly_item: + if skip_available_sub_assembly_item and d.item_code not in sub_assembly_items: bin_details = get_bin_details(d, company, for_warehouse=warehouse) for _bin_dict in bin_details: @@ -1787,6 +1790,7 @@ def get_sub_assembly_items( if d.value: get_sub_assembly_items( + sub_assembly_items, d.value, bom_data, stock_qty, @@ -1866,7 +1870,13 @@ def get_non_completed_production_plans(): def get_raw_materials_of_sub_assembly_items( - item_details, company, bom_no, include_non_stock_items, sub_assembly_items, planned_qty=1 + existing_sub_assembly_items, + item_details, + company, + bom_no, + include_non_stock_items, + sub_assembly_items, + planned_qty=1, ): bei = frappe.qb.DocType("BOM Item") bom = frappe.qb.DocType("BOM") @@ -1910,12 +1920,13 @@ def get_raw_materials_of_sub_assembly_items( for item in items: key = (item.item_code, item.bom_no) - if item.bom_no and key not in sub_assembly_items: + if (item.bom_no and key not in sub_assembly_items) or (item.item_code in existing_sub_assembly_items): continue if item.bom_no: planned_qty = flt(sub_assembly_items[key]) get_raw_materials_of_sub_assembly_items( + existing_sub_assembly_items, item_details, company, item.bom_no, From b3e852adfcfdb522152aad235e38c08dae2d0053 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Fri, 11 Apr 2025 16:22:28 +0530 Subject: [PATCH 1581/1614] fix: logic and added test case (cherry picked from commit f071255340bfb6fa2dd1c2f58d819c73c36ee6ae) --- .../production_plan/production_plan.py | 18 ++++-- .../production_plan/test_production_plan.py | 58 +++++++++++++++++++ 2 files changed, 70 insertions(+), 6 deletions(-) diff --git a/erpnext/manufacturing/doctype/production_plan/production_plan.py b/erpnext/manufacturing/doctype/production_plan/production_plan.py index 5330001c617..2d5dfbf32fe 100644 --- a/erpnext/manufacturing/doctype/production_plan/production_plan.py +++ b/erpnext/manufacturing/doctype/production_plan/production_plan.py @@ -925,6 +925,7 @@ class ProductionPlan(Document): "Fetch sub assembly items and optionally combine them." self.sub_assembly_items = [] sub_assembly_items_store = [] # temporary store to process all subassembly items + bin_details = frappe._dict() for row in self.po_items: if self.skip_available_sub_assembly_item and not self.sub_assembly_warehouse: @@ -940,6 +941,7 @@ class ProductionPlan(Document): get_sub_assembly_items( [item.production_item for item in sub_assembly_items_store], + bin_details, row.bom_no, bom_data, row.planned_qty, @@ -1740,6 +1742,7 @@ def get_item_data(item_code): def get_sub_assembly_items( sub_assembly_items, + bin_details, bom_no, bom_data, to_produce_qty, @@ -1754,25 +1757,27 @@ def get_sub_assembly_items( parent_item_code = frappe.get_cached_value("BOM", bom_no, "item") stock_qty = (d.stock_qty / d.parent_bom_qty) * flt(to_produce_qty) - bin_details = frappe._dict() if skip_available_sub_assembly_item and d.item_code not in sub_assembly_items: - bin_details = get_bin_details(d, company, for_warehouse=warehouse) + bin_details.setdefault(d.item_code, get_bin_details(d, company, for_warehouse=warehouse)) - for _bin_dict in bin_details: + for _bin_dict in bin_details[d.item_code]: if _bin_dict.projected_qty > 0: - if _bin_dict.projected_qty > stock_qty: + if _bin_dict.projected_qty >= stock_qty: + _bin_dict.projected_qty -= stock_qty stock_qty = 0 continue else: stock_qty = stock_qty - _bin_dict.projected_qty elif warehouse: - bin_details = get_bin_details(d, company, for_warehouse=warehouse) + bin_details.setdefault(d.item_code, get_bin_details(d, company, for_warehouse=warehouse)) if stock_qty > 0: bom_data.append( frappe._dict( { - "actual_qty": bin_details[0].get("actual_qty", 0) if bin_details else 0, + "actual_qty": bin_details[d.item_code][0].get("actual_qty", 0) + if bin_details + else 0, "parent_item_code": parent_item_code, "description": d.description, "production_item": d.item_code, @@ -1791,6 +1796,7 @@ def get_sub_assembly_items( if d.value: get_sub_assembly_items( sub_assembly_items, + bin_details, d.value, bom_data, stock_qty, diff --git a/erpnext/manufacturing/doctype/production_plan/test_production_plan.py b/erpnext/manufacturing/doctype/production_plan/test_production_plan.py index c7228823bed..e5b60c7a4e6 100644 --- a/erpnext/manufacturing/doctype/production_plan/test_production_plan.py +++ b/erpnext/manufacturing/doctype/production_plan/test_production_plan.py @@ -1635,6 +1635,64 @@ class TestProductionPlan(FrappeTestCase): self.assertEqual(row.production_item, sf_item) self.assertEqual(row.qty, 5.0) + def test_calculation_of_sub_assembly_items(self): + make_item("Sub Assembly Item ", properties={"is_stock_item": 1}) + make_item("RM Item 1", properties={"is_stock_item": 1}) + make_item("RM Item 2", properties={"is_stock_item": 1}) + make_bom(item="Sub Assembly Item", raw_materials=["RM Item 1", "RM Item 2"]) + make_bom(item="_Test FG Item", raw_materials=["Sub Assembly Item", "RM Item 1"]) + make_bom(item="_Test FG Item 2", raw_materials=["Sub Assembly Item"]) + + from erpnext.stock.doctype.stock_entry.stock_entry_utils import make_stock_entry + + make_stock_entry( + item_code="Sub Assembly Item", + qty=80, + purpose="Material Receipt", + to_warehouse="_Test Warehouse - _TC", + ) + make_stock_entry( + item_code="RM Item 1", qty=90, purpose="Material Receipt", to_warehouse="_Test Warehouse - _TC" + ) + + plan = create_production_plan( + skip_available_sub_assembly_item=1, + sub_assembly_warehouse="_Test Warehouse - _TC", + warehouse="_Test Warehouse - _TC", + item_code="_Test FG Item", + skip_getting_mr_items=1, + planned_qty=100, + do_not_save=1, + ) + plan.get_items_from = "" + plan.append( + "po_items", + { + "use_multi_level_bom": 1, + "item_code": "_Test FG Item 2", + "bom_no": frappe.db.get_value("Item", "_Test FG Item 2", "default_bom"), + "planned_qty": 50, + "planned_start_date": now_datetime(), + "stock_uom": "Nos", + "warehouse": "_Test Warehouse - _TC", + }, + ) + plan.save() + + plan.get_sub_assembly_items() + + self.assertEqual(plan.sub_assembly_items[0].qty, 20) + self.assertEqual(plan.sub_assembly_items[1].qty, 50) + + from erpnext.manufacturing.doctype.production_plan.production_plan import ( + get_items_for_material_requests, + ) + + mr_items = get_items_for_material_requests(plan.as_dict()) + + self.assertEqual(mr_items[0].get("quantity"), 80) + self.assertEqual(mr_items[1].get("quantity"), 70) + def create_production_plan(**args): """ From dedb19e3e9f0df09a48b56ec2ed0973293f103ee Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Fri, 11 Apr 2025 19:30:35 +0530 Subject: [PATCH 1582/1614] fix: test cases (cherry picked from commit a7394329cab73a8203ab3444fd7d44f4056e896c) --- .../manufacturing/doctype/production_plan/production_plan.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/production_plan/production_plan.py b/erpnext/manufacturing/doctype/production_plan/production_plan.py index 2d5dfbf32fe..c285e34c7e6 100644 --- a/erpnext/manufacturing/doctype/production_plan/production_plan.py +++ b/erpnext/manufacturing/doctype/production_plan/production_plan.py @@ -1776,7 +1776,7 @@ def get_sub_assembly_items( frappe._dict( { "actual_qty": bin_details[d.item_code][0].get("actual_qty", 0) - if bin_details + if bin_details[d.item_code] else 0, "parent_item_code": parent_item_code, "description": d.description, From 13d3b27a1fe91e8b017968e064d2ab123ef62ba5 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Mon, 14 Apr 2025 11:09:45 +0530 Subject: [PATCH 1583/1614] fix: test cases error (cherry picked from commit 8df18762a9ded000fd82bef20789622ed60cb9d4) --- .../manufacturing/doctype/production_plan/production_plan.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/production_plan/production_plan.py b/erpnext/manufacturing/doctype/production_plan/production_plan.py index c285e34c7e6..1e27e8d59de 100644 --- a/erpnext/manufacturing/doctype/production_plan/production_plan.py +++ b/erpnext/manufacturing/doctype/production_plan/production_plan.py @@ -1776,7 +1776,7 @@ def get_sub_assembly_items( frappe._dict( { "actual_qty": bin_details[d.item_code][0].get("actual_qty", 0) - if bin_details[d.item_code] + if bin_details.get(d.item_code) else 0, "parent_item_code": parent_item_code, "description": d.description, From da65f44a4749585756bed2c8caa5d82e6556db91 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 14 Apr 2025 12:27:51 +0530 Subject: [PATCH 1584/1614] fix: revert #46900 - against_voucher filter in general ledger (cherry picked from commit adb331ef7132374ac1b00a3a39287184a435a31a) # Conflicts: # erpnext/accounts/report/general_ledger/general_ledger.py --- .../report/general_ledger/general_ledger.js | 5 +++++ .../report/general_ledger/general_ledger.py | 21 +++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/erpnext/accounts/report/general_ledger/general_ledger.js b/erpnext/accounts/report/general_ledger/general_ledger.js index bcd850c0896..6fa846910a6 100644 --- a/erpnext/accounts/report/general_ledger/general_ledger.js +++ b/erpnext/accounts/report/general_ledger/general_ledger.js @@ -52,6 +52,11 @@ frappe.query_reports["General Ledger"] = { frappe.query_report.set_filter_value("group_by", "Group by Voucher (Consolidated)"); }, }, + { + fieldname: "against_voucher_no", + label: __("Against Voucher No"), + fieldtype: "Data", + }, { fieldtype: "Break", }, diff --git a/erpnext/accounts/report/general_ledger/general_ledger.py b/erpnext/accounts/report/general_ledger/general_ledger.py index 73a16e730ac..1c2a1b9c753 100644 --- a/erpnext/accounts/report/general_ledger/general_ledger.py +++ b/erpnext/accounts/report/general_ledger/general_ledger.py @@ -224,6 +224,9 @@ def get_conditions(filters): if filters.get("voucher_no"): conditions.append("voucher_no=%(voucher_no)s") + if filters.get("against_voucher_no"): + conditions.append("against_voucher=%(against_voucher_no)s") + if filters.get("ignore_err"): err_journals = frappe.db.get_all( "Journal Entry", @@ -487,12 +490,22 @@ def get_accountwise_gle(filters, accounting_dimensions, gl_entries, gle_map, tot data[key][rev_dr_or_cr] = 0 data[key][rev_dr_or_cr + "_in_account_currency"] = 0 + if data[key].against_voucher and gle.against_voucher: + data[key].against_voucher += ", " + gle.against_voucher + from_date, to_date = getdate(filters.from_date), getdate(filters.to_date) show_opening_entries = filters.get("show_opening_entries") for gle in gl_entries: group_by_value = gle.get(group_by) +<<<<<<< HEAD gle.voucher_type = gle.voucher_type +======= + gle.voucher_subtype = _(gle.voucher_subtype) + gle.against_voucher_type = _(gle.against_voucher_type) + gle.remarks = _(gle.remarks) + gle.party_type = _(gle.party_type) +>>>>>>> adb331ef71 (fix: revert #46900 - against_voucher filter in general ledger) if gle.posting_date < from_date or (cstr(gle.is_opening) == "Yes" and not show_opening_entries): if not group_by_voucher_consolidated: @@ -689,6 +702,14 @@ def get_columns(filters): columns.extend( [ + {"label": _("Against Voucher Type"), "fieldname": "against_voucher_type", "width": 100}, + { + "label": _("Against Voucher"), + "fieldname": "against_voucher", + "fieldtype": "Dynamic Link", + "options": "against_voucher_type", + "width": 100, + }, {"label": _("Supplier Invoice No"), "fieldname": "bill_no", "fieldtype": "Data", "width": 100}, ] ) From 6bfb3c690565bebb69555049b4e02be583f6b20f Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 14 Apr 2025 13:26:32 +0530 Subject: [PATCH 1585/1614] chore: resolve conflict --- erpnext/accounts/report/general_ledger/general_ledger.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/erpnext/accounts/report/general_ledger/general_ledger.py b/erpnext/accounts/report/general_ledger/general_ledger.py index 1c2a1b9c753..a62ba2e3732 100644 --- a/erpnext/accounts/report/general_ledger/general_ledger.py +++ b/erpnext/accounts/report/general_ledger/general_ledger.py @@ -498,14 +498,7 @@ def get_accountwise_gle(filters, accounting_dimensions, gl_entries, gle_map, tot for gle in gl_entries: group_by_value = gle.get(group_by) -<<<<<<< HEAD gle.voucher_type = gle.voucher_type -======= - gle.voucher_subtype = _(gle.voucher_subtype) - gle.against_voucher_type = _(gle.against_voucher_type) - gle.remarks = _(gle.remarks) - gle.party_type = _(gle.party_type) ->>>>>>> adb331ef71 (fix: revert #46900 - against_voucher filter in general ledger) if gle.posting_date < from_date or (cstr(gle.is_opening) == "Yes" and not show_opening_entries): if not group_by_voucher_consolidated: From 924e9b94b641f8fb816f3a45868bf8381570a595 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Mon, 14 Apr 2025 13:28:06 +0530 Subject: [PATCH 1586/1614] fix: import error --- erpnext/manufacturing/doctype/production_plan/production_plan.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/manufacturing/doctype/production_plan/production_plan.py b/erpnext/manufacturing/doctype/production_plan/production_plan.py index 1e27e8d59de..937af0fac54 100644 --- a/erpnext/manufacturing/doctype/production_plan/production_plan.py +++ b/erpnext/manufacturing/doctype/production_plan/production_plan.py @@ -22,6 +22,7 @@ from frappe.utils import ( ) from frappe.utils.csvutils import build_csv_response from pypika.terms import ExistsCriterion +from collections import defaultdict from erpnext.manufacturing.doctype.bom.bom import get_children as get_bom_children from erpnext.manufacturing.doctype.bom.bom import validate_bom_no From c58800a92949975e817d38630bdfee32cd78c5e6 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Mon, 14 Apr 2025 13:33:48 +0530 Subject: [PATCH 1587/1614] fix: linter --- .../manufacturing/doctype/production_plan/production_plan.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/production_plan/production_plan.py b/erpnext/manufacturing/doctype/production_plan/production_plan.py index 937af0fac54..2e89a191f66 100644 --- a/erpnext/manufacturing/doctype/production_plan/production_plan.py +++ b/erpnext/manufacturing/doctype/production_plan/production_plan.py @@ -4,6 +4,7 @@ import copy import json +from collections import defaultdict import frappe from frappe import _, msgprint @@ -22,7 +23,6 @@ from frappe.utils import ( ) from frappe.utils.csvutils import build_csv_response from pypika.terms import ExistsCriterion -from collections import defaultdict from erpnext.manufacturing.doctype.bom.bom import get_children as get_bom_children from erpnext.manufacturing.doctype.bom.bom import validate_bom_no From 603f737c9915231769217e8764a96d4c40ace611 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Mon, 14 Apr 2025 14:35:04 +0530 Subject: [PATCH 1588/1614] fix: consider negative stock qty in stock reco (cherry picked from commit 15272d0e566eb7e4495fb799c5bd9e5fa5a61e9c) --- .../stock/doctype/stock_reconciliation/stock_reconciliation.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py index 32c4a743999..79b82ffefab 100644 --- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py +++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py @@ -336,6 +336,7 @@ class StockReconciliation(StockController): posting_date=self.posting_date, posting_time=self.posting_time, for_stock_levels=True, + consider_negative_batches=True, ) total_current_qty += current_qty @@ -1101,6 +1102,7 @@ class StockReconciliation(StockController): posting_time=doc.posting_time, ignore_voucher_nos=[doc.voucher_no], for_stock_levels=True, + consider_negative_batches=True, ) or 0 ) * -1 From 8e02a9bc28237995c7026b600e4a61d75772b8f9 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 14 Apr 2025 18:54:12 +0200 Subject: [PATCH 1589/1614] fix(Payment Entry): set account type if missing (backport #47069) (#47070) Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com> fix(Payment Entry): set account type if missing (#47069) --- .../doctype/payment_entry/payment_entry.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index 57e36a04bf2..77eeba5cf3a 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -461,15 +461,25 @@ class PaymentEntry(AccountsController): self.set(self.party_account_field, party_account) self.party_account = party_account - if self.paid_from and not (self.paid_from_account_currency or self.paid_from_account_balance): + if self.paid_from and ( + not self.paid_from_account_currency + or not self.paid_from_account_balance + or not self.paid_from_account_type + ): acc = get_account_details(self.paid_from, self.posting_date, self.cost_center) self.paid_from_account_currency = acc.account_currency self.paid_from_account_balance = acc.account_balance + self.paid_from_account_type = acc.account_type - if self.paid_to and not (self.paid_to_account_currency or self.paid_to_account_balance): + if self.paid_to and ( + not self.paid_to_account_currency + or not self.paid_to_account_balance + or not self.paid_to_account_type + ): acc = get_account_details(self.paid_to, self.posting_date, self.cost_center) self.paid_to_account_currency = acc.account_currency self.paid_to_account_balance = acc.account_balance + self.paid_to_account_type = acc.account_type self.party_account_currency = ( self.paid_from_account_currency From c77f7f4ff0bbbf137df9b088beee016d3fffca23 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 14 Apr 2025 19:26:11 +0200 Subject: [PATCH 1590/1614] test(Payment Entry): account type is set (backport #47071) (#47073) Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com> --- erpnext/accounts/doctype/payment_entry/test_payment_entry.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/erpnext/accounts/doctype/payment_entry/test_payment_entry.py b/erpnext/accounts/doctype/payment_entry/test_payment_entry.py index e43ba85373c..1d0810852f0 100644 --- a/erpnext/accounts/doctype/payment_entry/test_payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/test_payment_entry.py @@ -49,6 +49,8 @@ class TestPaymentEntry(FrappeTestCase): pe.insert() pe.submit() + self.assertEqual(pe.paid_to_account_type, "Cash") + expected_gle = dict( (d[0], d) for d in [["Debtors - _TC", 0, 1000, so.name], ["_Test Cash - _TC", 1000.0, 0, None]] ) @@ -560,6 +562,8 @@ class TestPaymentEntry(FrappeTestCase): pe.insert() pe.submit() + self.assertEqual(pe.paid_from_account_type, "Bank") + outstanding_amount, status = frappe.db.get_value( "Purchase Invoice", pi.name, ["outstanding_amount", "status"] ) From 127c7b93ac75480bf56f1386c4e869a62c8a22ba Mon Sep 17 00:00:00 2001 From: Sugesh393 Date: Sat, 29 Mar 2025 15:34:22 +0530 Subject: [PATCH 1591/1614] fix: map tax table while creating purchase order from sales order (cherry picked from commit 1e18569be7f971ba094bec93839e62eb46a141a3) --- erpnext/selling/doctype/sales_order/sales_order.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py index 220dafb2e45..f7bf732e8e8 100755 --- a/erpnext/selling/doctype/sales_order/sales_order.py +++ b/erpnext/selling/doctype/sales_order/sales_order.py @@ -1427,6 +1427,8 @@ def make_purchase_order(source_name, selected_items=None, target_doc=None): target.customer = target.customer_name = target.shipping_address = None target.run_method("set_missing_values") + if not target.taxes: + target.append_taxes_from_item_tax_template() target.run_method("calculate_taxes_and_totals") def update_item(source, target, source_parent): From 5a20b9e94f5d2f12d8f2c31f30558edb33313e84 Mon Sep 17 00:00:00 2001 From: Sugesh393 Date: Sat, 29 Mar 2025 15:35:01 +0530 Subject: [PATCH 1592/1614] test: add unit test to validate tax values in Purchase Order from Sales Order (cherry picked from commit a393195866a681ade86380b88b7a6d544f971799) # Conflicts: # erpnext/selling/doctype/sales_order/test_sales_order.py --- .../doctype/sales_order/test_sales_order.py | 149 ++++++++++++++++++ 1 file changed, 149 insertions(+) diff --git a/erpnext/selling/doctype/sales_order/test_sales_order.py b/erpnext/selling/doctype/sales_order/test_sales_order.py index 16c7431c315..32c4398b0d9 100644 --- a/erpnext/selling/doctype/sales_order/test_sales_order.py +++ b/erpnext/selling/doctype/sales_order/test_sales_order.py @@ -2160,6 +2160,155 @@ class TestSalesOrder(AccountsTestMixin, FrappeTestCase): self.assertRaises(frappe.ValidationError, so1.update_status, "Draft") +<<<<<<< HEAD +======= + @IntegrationTestCase.change_settings("Stock Settings", {"enable_stock_reservation": True}) + def test_warehouse_mapping_based_on_stock_reservation(self): + self.create_company(company_name="Glass Ceiling", abbr="GC") + self.create_item("Lamy Safari 2", True, self.warehouse_stores, self.company, 2000) + self.create_customer() + self.clear_old_entries() + + so = frappe.new_doc("Sales Order") + so.company = self.company + so.customer = self.customer + so.transaction_date = today() + so.append( + "items", + { + "item_code": self.item, + "qty": 10, + "rate": 2000, + "warehouse": self.warehouse_stores, + "delivery_date": today(), + }, + ) + so.submit() + + # Create stock + se = frappe.get_doc( + { + "doctype": "Stock Entry", + "company": self.company, + "stock_entry_type": "Material Receipt", + "posting_date": today(), + "items": [ + {"item_code": self.item, "t_warehouse": self.warehouse_stores, "qty": 5}, + {"item_code": self.item, "t_warehouse": self.warehouse_finished_goods, "qty": 5}, + ], + } + ) + se.submit() + + # Reserve stock on 2 different warehouses + itm = so.items[0] + so.create_stock_reservation_entries( + [ + { + "sales_order_item": itm.name, + "item_code": itm.item_code, + "warehouse": self.warehouse_stores, + "qty_to_reserve": 2, + } + ] + ) + so.create_stock_reservation_entries( + [ + { + "sales_order_item": itm.name, + "item_code": itm.item_code, + "warehouse": self.warehouse_finished_goods, + "qty_to_reserve": 3, + } + ] + ) + + # Delivery note should auto-select warehouse based on reservation + dn = make_delivery_note(so.name, kwargs={"for_reserved_stock": True}) + self.assertEqual(2, len(dn.items)) + self.assertEqual(dn.items[0].qty, 2) + self.assertEqual(dn.items[0].warehouse, self.warehouse_stores) + self.assertEqual(dn.items[1].qty, 3) + self.assertEqual(dn.items[1].warehouse, self.warehouse_finished_goods) + + from erpnext.stock.doctype.warehouse.test_warehouse import create_warehouse + + warehouse = create_warehouse("Test Warehouse 1", company=self.company) + + make_stock_entry( + item_code=self.item, + target=warehouse, + qty=5, + company=self.company, + ) + + so = frappe.new_doc("Sales Order") + so.reserve_stock = 1 + so.company = self.company + so.customer = self.customer + so.transaction_date = today() + so.currency = "INR" + so.append( + "items", + { + "item_code": self.item, + "qty": 5, + "rate": 2000, + "warehouse": warehouse, + "delivery_date": today(), + }, + ) + so.submit() + + sres = frappe.get_all( + "Stock Reservation Entry", + filters={"voucher_no": so.name}, + fields=["name"], + ) + + self.assertEqual(len(sres), 1) + sre_doc = frappe.get_doc("Stock Reservation Entry", sres[0].name) + self.assertFalse(sre_doc.status == "Delivered") + + si = make_sales_invoice(so.name) + si.update_stock = 1 + si.submit() + sre_doc.reload() + self.assertTrue(sre_doc.status == "Delivered") + + def test_item_tax_transfer_from_sales_to_purchase(self): + from erpnext.selling.doctype.sales_order.sales_order import make_purchase_order + + item_tax = frappe.new_doc("Item Tax Template") + item_tax.title = "Test Item Tax Template" + item_tax.company = "_Test Company" + item_tax.append("taxes", {"tax_type": "_Test Account Service Tax - _TC", "tax_rate": 2}) + item_tax.save() + + item_group = frappe.get_doc("Item Group", "_Test Item Group") + item_group.append("taxes", {"item_tax_template": "Test Item Tax Template - _TC"}) + item_group.save() + + so = make_sales_order(item_code="_Test Item", qty=1, do_not_submit=1) + so.append( + "taxes", + { + "account_head": "_Test Account Service Tax - _TC", + "charge_type": "On Net Total", + "description": "TDS", + "doctype": "Sales Taxes and Charges", + "rate": 2, + }, + ) + so.submit() + + po = make_purchase_order(so.name, selected_items=so.items) + po.supplier = "_Test Supplier" + po.items[0].rate = 100 + po.submit() + self.assertEqual(po.taxes[0].tax_amount, 2) + +>>>>>>> a393195866 (test: add unit test to validate tax values in Purchase Order from Sales Order) def automatically_fetch_payment_terms(enable=1): accounts_settings = frappe.get_doc("Accounts Settings") From b7cbc66a28fd10269dbcca1c6fafe09913c99a30 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 15 Apr 2025 11:45:17 +0530 Subject: [PATCH 1593/1614] chore: resolve conflict --- .../doctype/sales_order/test_sales_order.py | 117 ------------------ 1 file changed, 117 deletions(-) diff --git a/erpnext/selling/doctype/sales_order/test_sales_order.py b/erpnext/selling/doctype/sales_order/test_sales_order.py index 32c4398b0d9..82a8535a66d 100644 --- a/erpnext/selling/doctype/sales_order/test_sales_order.py +++ b/erpnext/selling/doctype/sales_order/test_sales_order.py @@ -2160,122 +2160,6 @@ class TestSalesOrder(AccountsTestMixin, FrappeTestCase): self.assertRaises(frappe.ValidationError, so1.update_status, "Draft") -<<<<<<< HEAD -======= - @IntegrationTestCase.change_settings("Stock Settings", {"enable_stock_reservation": True}) - def test_warehouse_mapping_based_on_stock_reservation(self): - self.create_company(company_name="Glass Ceiling", abbr="GC") - self.create_item("Lamy Safari 2", True, self.warehouse_stores, self.company, 2000) - self.create_customer() - self.clear_old_entries() - - so = frappe.new_doc("Sales Order") - so.company = self.company - so.customer = self.customer - so.transaction_date = today() - so.append( - "items", - { - "item_code": self.item, - "qty": 10, - "rate": 2000, - "warehouse": self.warehouse_stores, - "delivery_date": today(), - }, - ) - so.submit() - - # Create stock - se = frappe.get_doc( - { - "doctype": "Stock Entry", - "company": self.company, - "stock_entry_type": "Material Receipt", - "posting_date": today(), - "items": [ - {"item_code": self.item, "t_warehouse": self.warehouse_stores, "qty": 5}, - {"item_code": self.item, "t_warehouse": self.warehouse_finished_goods, "qty": 5}, - ], - } - ) - se.submit() - - # Reserve stock on 2 different warehouses - itm = so.items[0] - so.create_stock_reservation_entries( - [ - { - "sales_order_item": itm.name, - "item_code": itm.item_code, - "warehouse": self.warehouse_stores, - "qty_to_reserve": 2, - } - ] - ) - so.create_stock_reservation_entries( - [ - { - "sales_order_item": itm.name, - "item_code": itm.item_code, - "warehouse": self.warehouse_finished_goods, - "qty_to_reserve": 3, - } - ] - ) - - # Delivery note should auto-select warehouse based on reservation - dn = make_delivery_note(so.name, kwargs={"for_reserved_stock": True}) - self.assertEqual(2, len(dn.items)) - self.assertEqual(dn.items[0].qty, 2) - self.assertEqual(dn.items[0].warehouse, self.warehouse_stores) - self.assertEqual(dn.items[1].qty, 3) - self.assertEqual(dn.items[1].warehouse, self.warehouse_finished_goods) - - from erpnext.stock.doctype.warehouse.test_warehouse import create_warehouse - - warehouse = create_warehouse("Test Warehouse 1", company=self.company) - - make_stock_entry( - item_code=self.item, - target=warehouse, - qty=5, - company=self.company, - ) - - so = frappe.new_doc("Sales Order") - so.reserve_stock = 1 - so.company = self.company - so.customer = self.customer - so.transaction_date = today() - so.currency = "INR" - so.append( - "items", - { - "item_code": self.item, - "qty": 5, - "rate": 2000, - "warehouse": warehouse, - "delivery_date": today(), - }, - ) - so.submit() - - sres = frappe.get_all( - "Stock Reservation Entry", - filters={"voucher_no": so.name}, - fields=["name"], - ) - - self.assertEqual(len(sres), 1) - sre_doc = frappe.get_doc("Stock Reservation Entry", sres[0].name) - self.assertFalse(sre_doc.status == "Delivered") - - si = make_sales_invoice(so.name) - si.update_stock = 1 - si.submit() - sre_doc.reload() - self.assertTrue(sre_doc.status == "Delivered") - def test_item_tax_transfer_from_sales_to_purchase(self): from erpnext.selling.doctype.sales_order.sales_order import make_purchase_order @@ -2308,7 +2192,6 @@ class TestSalesOrder(AccountsTestMixin, FrappeTestCase): po.submit() self.assertEqual(po.taxes[0].tax_amount, 2) ->>>>>>> a393195866 (test: add unit test to validate tax values in Purchase Order from Sales Order) def automatically_fetch_payment_terms(enable=1): accounts_settings = frappe.get_doc("Accounts Settings") From 50b21960203cf5f14b603bec3dd680c39a453cf6 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Fri, 21 Mar 2025 15:18:18 +0530 Subject: [PATCH 1594/1614] perf: refactored customer ledger summary for performance (cherry picked from commit e84e49345adf74cc0cb1a41a248c463feb0f0b0d) # Conflicts: # erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py --- .../customer_ledger_summary.py | 198 ++++++++++++++---- 1 file changed, 160 insertions(+), 38 deletions(-) diff --git a/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py b/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py index 784575c080e..8f61ccf7a80 100644 --- a/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py +++ b/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py @@ -4,6 +4,11 @@ import frappe from frappe import _, qb, scrub +<<<<<<< HEAD +======= +from frappe.query_builder import Criterion, Tuple +from frappe.query_builder.functions import IfNull +>>>>>>> e84e49345a (perf: refactored customer ledger summary for performance) from frappe.utils import getdate, nowdate @@ -23,49 +28,82 @@ class PartyLedgerSummaryReport: self.filters.party_type = args.get("party_type") self.party_naming_by = frappe.db.get_value(args.get("naming_by")[0], None, args.get("naming_by")[1]) + self.get_paty_details() + + if not self.parties: + return [], [] + self.get_gl_entries() - self.get_additional_columns() self.get_return_invoices() self.get_party_adjustment_amounts() columns = self.get_columns() data = self.get_data() + return columns, data - def get_additional_columns(self): + def get_additional_fields(self): + additional_fields = [] + + if self.filters.party_type == "Customer": + additional_fields = ["customer_name", "territory", "customer_group", "default_sales_partner"] + else: + additional_fields = ["supplier_name", "supplier_group"] + + return additional_fields + + def prepare_party_conditions(self, doctype): + conditions = [] + group_field = "customer_group" if self.filters.party_type == "Customer" else "supplier_group" + + if self.filters.party: + conditions.append(doctype.name == self.filters.party) + + if self.filters.territory: + conditions.append(doctype.territory == self.filters.territory) + + if self.filters.get(group_field): + conditions.append(doctype.get(group_field) == self.filters.get(group_field)) + + if self.filters.payment_terms_template: + conditions.append(doctype.payment_terms == self.filters.payment_terms_template) + + if self.filters.sales_partner: + conditions.append(doctype.default_sales_partner == self.filters.sales_partner) + + if self.filters.sales_person: + sales_team = qb.DocType("Sales Team") + conditions.append( + (doctype.name).isin( + qb.from_(sales_team) + .select(sales_team.parent) + .where(sales_team.sales_person == self.filters.sales_person) + ) + ) + + return conditions + + def get_paty_details(self): """ Additional Columns for 'User Permission' based access control """ + self.parties = [] + self.party_details = frappe._dict() + party_type = self.filters.party_type + additional_fields = self.get_additional_fields() - if self.filters.party_type == "Customer": - self.territories = frappe._dict({}) - self.customer_group = frappe._dict({}) + doctype = qb.DocType(party_type) + conditions = self.prepare_party_conditions(doctype) + party_details = ( + qb.from_(doctype) + .select(doctype.name.as_("party"), *additional_fields) + .where(Criterion.all(conditions)) + .run(as_dict=True) + ) - customer = qb.DocType("Customer") - result = ( - frappe.qb.from_(customer) - .select( - customer.name, customer.territory, customer.customer_group, customer.default_sales_partner - ) - .where(customer.disabled == 0) - .run(as_dict=True) - ) - - for x in result: - self.territories[x.name] = x.territory - self.customer_group[x.name] = x.customer_group - else: - self.supplier_group = frappe._dict({}) - supplier = qb.DocType("Supplier") - result = ( - frappe.qb.from_(supplier) - .select(supplier.name, supplier.supplier_group) - .where(supplier.disabled == 0) - .run(as_dict=True) - ) - - for x in result: - self.supplier_group[x.name] = x.supplier_group + for row in party_details: + self.parties.append(row.party) + self.party_details[row.party] = row def get_columns(self): columns = [ @@ -188,12 +226,13 @@ class PartyLedgerSummaryReport: self.party_data = frappe._dict({}) for gle in self.gl_entries: + party_details = self.party_details.get(gle.party) self.party_data.setdefault( gle.party, frappe._dict( { - "party": gle.party, - "party_name": gle.party_name, + **party_details, + "party_name": gle.party, "opening_balance": 0, "invoiced_amount": 0, "paid_amount": 0, @@ -204,12 +243,6 @@ class PartyLedgerSummaryReport: ), ) - if self.filters.party_type == "Customer": - self.party_data[gle.party].update({"territory": self.territories.get(gle.party)}) - self.party_data[gle.party].update({"customer_group": self.customer_group.get(gle.party)}) - else: - self.party_data[gle.party].update({"supplier_group": self.supplier_group.get(gle.party)}) - amount = gle.get(invoice_dr_or_cr) - gle.get(reverse_dr_or_cr) self.party_data[gle.party].closing_balance += amount @@ -246,6 +279,7 @@ class PartyLedgerSummaryReport: return out def get_gl_entries(self): +<<<<<<< HEAD conditions = self.prepare_conditions() join = join_field = "" if self.filters.party_type == "Customer": @@ -274,12 +308,45 @@ class PartyLedgerSummaryReport: def prepare_conditions(self): conditions = [""] +======= + gle = qb.DocType("GL Entry") + query = ( + qb.from_(gle) + .select( + gle.posting_date, + gle.party, + gle.voucher_type, + gle.voucher_no, + gle.against_voucher_type, + gle.against_voucher, + gle.debit, + gle.credit, + gle.is_opening, + ) + .where( + (gle.docstatus < 2) + & (gle.is_cancelled == 0) + & (gle.party_type == self.filters.party_type) + & (IfNull(gle.party, "") != "") + & (gle.posting_date <= self.filters.to_date) + & (gle.party.isin(self.parties)) + ) + ) + + query = self.prepare_conditions(query) + + self.gl_entries = query.run(as_dict=True) + + def prepare_conditions(self, query): + gle = qb.DocType("GL Entry") +>>>>>>> e84e49345a (perf: refactored customer ledger summary for performance) if self.filters.company: conditions.append("gle.company=%(company)s") if self.filters.finance_book: conditions.append("ifnull(finance_book,'') in (%(finance_book)s, '')") +<<<<<<< HEAD if self.filters.get("party"): conditions.append("party=%(party)s") @@ -335,9 +402,37 @@ class PartyLedgerSummaryReport: ) return " and ".join(conditions) +======= + if self.filters.cost_center: + self.filters.cost_center = get_cost_centers_with_children(self.filters.cost_center) + query = query.where((gle.cost_center).isin(self.filters.cost_center)) + + if self.filters.project: + query = query.where((gle.project).isin(self.filters.project)) + + accounting_dimensions = get_accounting_dimensions(as_list=False) + + if accounting_dimensions: + for dimension in accounting_dimensions: + if self.filters.get(dimension.fieldname): + if frappe.get_cached_value("DocType", dimension.document_type, "is_tree"): + self.filters[dimension.fieldname] = get_dimension_with_children( + dimension.document_type, self.filters.get(dimension.fieldname) + ) + query = query.where( + (gle[dimension.fieldname]).isin(self.filters.get(dimension.fieldname)) + ) + else: + query = query.where( + (gle[dimension.fieldname]).isin(self.filters.get(dimension.fieldname)) + ) + + return query +>>>>>>> e84e49345a (perf: refactored customer ledger summary for performance) def get_return_invoices(self): doctype = "Sales Invoice" if self.filters.party_type == "Customer" else "Purchase Invoice" + name_field = "customer" if self.filters.party_type == "Customer" else "supplier" self.return_invoices = [ d.name for d in frappe.get_all( @@ -346,6 +441,7 @@ class PartyLedgerSummaryReport: "is_return": 1, "docstatus": 1, "posting_date": ["between", [self.filters.from_date, self.filters.to_date]], + name_field: ["in", self.parties], }, ) ] @@ -353,13 +449,18 @@ class PartyLedgerSummaryReport: def get_party_adjustment_amounts(self): conditions = self.prepare_conditions() account_type = "Expense Account" if self.filters.party_type == "Customer" else "Income Account" +<<<<<<< HEAD income_or_expense_accounts = frappe.db.get_all( "Account", filters={"account_type": account_type, "company": self.filters.company}, pluck="name" ) +======= + +>>>>>>> e84e49345a (perf: refactored customer ledger summary for performance) invoice_dr_or_cr = "debit" if self.filters.party_type == "Customer" else "credit" reverse_dr_or_cr = "credit" if self.filters.party_type == "Customer" else "debit" round_off_account = frappe.get_cached_value("Company", self.filters.company, "round_off_account") +<<<<<<< HEAD gl = qb.DocType("GL Entry") if not income_or_expense_accounts: # prevent empty 'in' condition @@ -370,9 +471,19 @@ class PartyLedgerSummaryReport: income_or_expense_accounts = [x.replace("%", "%%") for x in income_or_expense_accounts] accounts_query = ( +======= + current_period_vouchers = set() + for gle in self.gl_entries: + if gle.posting_date >= self.filters.from_date and gle.posting_date <= self.filters.to_date: + current_period_vouchers.add((gle.voucher_type, gle.voucher_no)) + + gl = qb.DocType("GL Entry") + query = ( +>>>>>>> e84e49345a (perf: refactored customer ledger summary for performance) qb.from_(gl) .select(gl.voucher_type, gl.voucher_no) .where( +<<<<<<< HEAD (gl.account.isin(income_or_expense_accounts)) & (gl.posting_date.gte(self.filters.from_date)) & (gl.posting_date.lte(self.filters.to_date)) @@ -398,6 +509,17 @@ class PartyLedgerSummaryReport: self.filters, as_dict=True, ) +======= + (gl.docstatus < 2) + & (gl.is_cancelled == 0) + & (gl.posting_date.gte(self.filters.from_date)) + & (gl.posting_date.lte(self.filters.to_date)) + & (Tuple((gl.voucher_type, gl.voucher_no)).isin(current_period_vouchers)) + ) + ) + query = self.prepare_conditions(query) + gl_entries = query.run(as_dict=True) +>>>>>>> e84e49345a (perf: refactored customer ledger summary for performance) self.party_adjustment_details = {} self.party_adjustment_accounts = set() From 537a8efe7a25a1b6bc057e74629888e5199b6dca Mon Sep 17 00:00:00 2001 From: ljain112 Date: Tue, 1 Apr 2025 17:18:01 +0530 Subject: [PATCH 1595/1614] fix: child values for tree doctypes and query refactor (cherry picked from commit fca46e0b2d2e1cdf8966b61443fe32fd410007f1) # Conflicts: # erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py --- .../customer_ledger_summary.js | 1 + .../customer_ledger_summary.py | 184 +++++++++++------- 2 files changed, 116 insertions(+), 69 deletions(-) diff --git a/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.js b/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.js index 3600db852f8..c28815df62e 100644 --- a/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.js +++ b/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.js @@ -9,6 +9,7 @@ frappe.query_reports["Customer Ledger Summary"] = { fieldtype: "Link", options: "Company", default: frappe.defaults.get_user_default("Company"), + reqd: 1, }, { fieldname: "from_date", diff --git a/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py b/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py index 8f61ccf7a80..df6821b832a 100644 --- a/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py +++ b/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py @@ -10,7 +10,20 @@ from frappe.query_builder import Criterion, Tuple from frappe.query_builder.functions import IfNull >>>>>>> e84e49345a (perf: refactored customer ledger summary for performance) from frappe.utils import getdate, nowdate +from frappe.utils.nestedset import get_descendants_of +<<<<<<< HEAD +======= +from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import ( + get_accounting_dimensions, + get_dimension_with_children, +) + +TREE_DOCTYPES = frozenset( + ["Customer Group", "Terrirtory", "Supplier Group", "Sales Partner", "Sales Person", "Cost Center"] +) + +>>>>>>> fca46e0b2d (fix: child values for tree doctypes and query refactor) class PartyLedgerSummaryReport: def __init__(self, filters=None): @@ -18,16 +31,14 @@ class PartyLedgerSummaryReport: self.filters.from_date = getdate(self.filters.from_date or nowdate()) self.filters.to_date = getdate(self.filters.to_date or nowdate()) - if not self.filters.get("company"): - self.filters["company"] = frappe.db.get_single_value("Global Defaults", "default_company") - def run(self, args): - if self.filters.from_date > self.filters.to_date: - frappe.throw(_("From Date must be before To Date")) - self.filters.party_type = args.get("party_type") +<<<<<<< HEAD self.party_naming_by = frappe.db.get_value(args.get("naming_by")[0], None, args.get("naming_by")[1]) +======= +>>>>>>> fca46e0b2d (fix: child values for tree doctypes and query refactor) + self.validate_filters() self.get_paty_details() if not self.parties: @@ -37,51 +48,26 @@ class PartyLedgerSummaryReport: self.get_return_invoices() self.get_party_adjustment_amounts() + self.party_naming_by = frappe.db.get_single_value(args.get("naming_by")[0], args.get("naming_by")[1]) columns = self.get_columns() data = self.get_data() return columns, data - def get_additional_fields(self): - additional_fields = [] + def validate_filters(self): + if not self.filters.get("company"): + frappe.throw(_("{0} is mandatory").format(_("Company"))) - if self.filters.party_type == "Customer": - additional_fields = ["customer_name", "territory", "customer_group", "default_sales_partner"] - else: - additional_fields = ["supplier_name", "supplier_group"] + if self.filters.from_date > self.filters.to_date: + frappe.throw(_("From Date must be before To Date")) - return additional_fields + self.update_hierarchical_filters() - def prepare_party_conditions(self, doctype): - conditions = [] - group_field = "customer_group" if self.filters.party_type == "Customer" else "supplier_group" - - if self.filters.party: - conditions.append(doctype.name == self.filters.party) - - if self.filters.territory: - conditions.append(doctype.territory == self.filters.territory) - - if self.filters.get(group_field): - conditions.append(doctype.get(group_field) == self.filters.get(group_field)) - - if self.filters.payment_terms_template: - conditions.append(doctype.payment_terms == self.filters.payment_terms_template) - - if self.filters.sales_partner: - conditions.append(doctype.default_sales_partner == self.filters.sales_partner) - - if self.filters.sales_person: - sales_team = qb.DocType("Sales Team") - conditions.append( - (doctype.name).isin( - qb.from_(sales_team) - .select(sales_team.parent) - .where(sales_team.sales_person == self.filters.sales_person) - ) - ) - - return conditions + def update_hierarchical_filters(self): + for doctype in TREE_DOCTYPES: + key = scrub(doctype) + if self.filters.get(key): + self.filters[key] = get_children(doctype, self.filters[key]) def get_paty_details(self): """ @@ -90,21 +76,70 @@ class PartyLedgerSummaryReport: self.parties = [] self.party_details = frappe._dict() party_type = self.filters.party_type - additional_fields = self.get_additional_fields() doctype = qb.DocType(party_type) - conditions = self.prepare_party_conditions(doctype) - party_details = ( + conditions = self.get_party_conditions(doctype) + query = ( qb.from_(doctype) - .select(doctype.name.as_("party"), *additional_fields) + .select(doctype.name.as_("party"), f"{scrub(party_type)}_name") .where(Criterion.all(conditions)) - .run(as_dict=True) ) + from frappe.desk.reportview import build_match_conditions + + query, params = query.walk() + match_conditions = build_match_conditions(party_type) + + if match_conditions: + query += "and" + match_conditions + + party_details = frappe.db.sql(query, params, as_dict=True) + for row in party_details: self.parties.append(row.party) self.party_details[row.party] = row + def get_party_conditions(self, doctype): + conditions = [] + group_field = "customer_group" if self.filters.party_type == "Customer" else "supplier_group" + + if self.filters.party: + conditions.append(doctype.name == self.filters.party) + + if self.filters.territory: + conditions.append(doctype.territory.isin(self.filters.territory)) + + if self.filters.get(group_field): + conditions.append(doctype.get(group_field).isin(self.filters.get(group_field))) + + if self.filters.payment_terms_template: + conditions.append(doctype.payment_terms == self.filters.payment_terms_template) + + if self.filters.sales_partner: + conditions.append(doctype.default_sales_partner.isin(self.filters.sales_partner)) + + if self.filters.sales_person: + sales_team = qb.DocType("Sales Team") + sales_invoice = qb.DocType("Sales Invoice") + + customers = ( + qb.from_(sales_team) + .select(sales_team.parent) + .where(sales_team.sales_person.isin(self.filters.sales_person)) + .where(sales_team.parenttype == "Customer") + ) + ( + qb.from_(sales_team) + .join(sales_invoice) + .on(sales_team.parent == sales_invoice.name) + .select(sales_invoice.customer) + .where(sales_team.sales_person.isin(self.filters.sales_person)) + .where(sales_team.parenttype == "Sales Invoice") + ) + + conditions.append(doctype.name.isin(customers)) + + return conditions + def get_columns(self): columns = [ { @@ -317,8 +352,6 @@ class PartyLedgerSummaryReport: gle.party, gle.voucher_type, gle.voucher_no, - gle.against_voucher_type, - gle.against_voucher, gle.debit, gle.credit, gle.is_opening, @@ -404,7 +437,6 @@ class PartyLedgerSummaryReport: return " and ".join(conditions) ======= if self.filters.cost_center: - self.filters.cost_center = get_cost_centers_with_children(self.filters.cost_center) query = query.where((gle.cost_center).isin(self.filters.cost_center)) if self.filters.project: @@ -432,19 +464,16 @@ class PartyLedgerSummaryReport: def get_return_invoices(self): doctype = "Sales Invoice" if self.filters.party_type == "Customer" else "Purchase Invoice" - name_field = "customer" if self.filters.party_type == "Customer" else "supplier" - self.return_invoices = [ - d.name - for d in frappe.get_all( - doctype, - filters={ - "is_return": 1, - "docstatus": 1, - "posting_date": ["between", [self.filters.from_date, self.filters.to_date]], - name_field: ["in", self.parties], - }, - ) - ] + filters = ( + { + "is_return": 1, + "docstatus": 1, + "posting_date": ["between", [self.filters.from_date, self.filters.to_date]], + f"{scrub(self.filters.party_type)}": ["in", self.parties], + }, + ) + + self.return_invoices = frappe.get_all(doctype, filters=filters, pluck="name") def get_party_adjustment_amounts(self): conditions = self.prepare_conditions() @@ -473,9 +502,22 @@ class PartyLedgerSummaryReport: accounts_query = ( ======= current_period_vouchers = set() + adjustment_voucher_entries = {} + + self.party_adjustment_details = {} + self.party_adjustment_accounts = set() + for gle in self.gl_entries: - if gle.posting_date >= self.filters.from_date and gle.posting_date <= self.filters.to_date: + if ( + gle.is_opening != "Yes" + and gle.posting_date >= self.filters.from_date + and gle.posting_date <= self.filters.to_date + ): current_period_vouchers.add((gle.voucher_type, gle.voucher_no)) + adjustment_voucher_entries.setdefault((gle.voucher_type, gle.voucher_no), []).append(gle) + + if not current_period_vouchers: + return gl = qb.DocType("GL Entry") query = ( @@ -515,17 +557,14 @@ class PartyLedgerSummaryReport: & (gl.posting_date.gte(self.filters.from_date)) & (gl.posting_date.lte(self.filters.to_date)) & (Tuple((gl.voucher_type, gl.voucher_no)).isin(current_period_vouchers)) + & (IfNull(gl.party, "") == "") ) ) query = self.prepare_conditions(query) gl_entries = query.run(as_dict=True) >>>>>>> e84e49345a (perf: refactored customer ledger summary for performance) - self.party_adjustment_details = {} - self.party_adjustment_accounts = set() - adjustment_voucher_entries = {} for gle in gl_entries: - adjustment_voucher_entries.setdefault((gle.voucher_type, gle.voucher_no), []) adjustment_voucher_entries[(gle.voucher_type, gle.voucher_no)].append(gle) for voucher_gl_entries in adjustment_voucher_entries.values(): @@ -562,9 +601,16 @@ class PartyLedgerSummaryReport: self.party_adjustment_details[party][account] += amount +def get_children(doctype, value): + children = get_descendants_of(doctype, value) + + return [value, *children] + + def execute(filters=None): args = { "party_type": "Customer", "naming_by": ["Selling Settings", "cust_master_name"], } + return PartyLedgerSummaryReport(filters).run(args) From 393d2459b9980235cb5223b15a43656dd03a18b2 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Tue, 1 Apr 2025 17:43:11 +0530 Subject: [PATCH 1596/1614] fix: correct function name (cherry picked from commit 038355f87b1950fd40546748d3528440ca461e26) --- .../report/customer_ledger_summary/customer_ledger_summary.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py b/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py index df6821b832a..3553b69044c 100644 --- a/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py +++ b/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py @@ -39,7 +39,7 @@ class PartyLedgerSummaryReport: >>>>>>> fca46e0b2d (fix: child values for tree doctypes and query refactor) self.validate_filters() - self.get_paty_details() + self.get_party_details() if not self.parties: return [], [] @@ -69,7 +69,7 @@ class PartyLedgerSummaryReport: if self.filters.get(key): self.filters[key] = get_children(doctype, self.filters[key]) - def get_paty_details(self): + def get_party_details(self): """ Additional Columns for 'User Permission' based access control """ From 11566e20b51e86741e27fe7baef5d2ca4903e8d4 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 14 Apr 2025 16:47:29 +0530 Subject: [PATCH 1597/1614] test: basic output of customer ledger summary report (cherry picked from commit 9a3a80dfd3012eecc5cf20349a5e4d07af6eb229) --- .../test_customer_ledger_summary.py | 152 ++++++++++++++++++ 1 file changed, 152 insertions(+) create mode 100644 erpnext/accounts/report/customer_ledger_summary/test_customer_ledger_summary.py diff --git a/erpnext/accounts/report/customer_ledger_summary/test_customer_ledger_summary.py b/erpnext/accounts/report/customer_ledger_summary/test_customer_ledger_summary.py new file mode 100644 index 00000000000..66980d821e0 --- /dev/null +++ b/erpnext/accounts/report/customer_ledger_summary/test_customer_ledger_summary.py @@ -0,0 +1,152 @@ +import frappe +from frappe import qb +from frappe.tests import IntegrationTestCase +from frappe.utils import add_days, flt, getdate, today + +from erpnext.accounts.doctype.payment_entry.payment_entry import get_payment_entry +from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice +from erpnext.accounts.report.customer_ledger_summary.customer_ledger_summary import execute +from erpnext.accounts.test.accounts_mixin import AccountsTestMixin + + +class TestCustomerLedgerSummary(AccountsTestMixin, IntegrationTestCase): + def setUp(self): + self.create_company() + self.create_customer() + self.create_item() + self.clear_old_entries() + + def tearDown(self): + frappe.db.rollback() + + def create_sales_invoice(self, do_not_submit=False, **args): + si = create_sales_invoice( + item=self.item, + company=self.company, + customer=self.customer, + debit_to=self.debit_to, + posting_date=today(), + parent_cost_center=self.cost_center, + cost_center=self.cost_center, + rate=100, + qty=10, + price_list_rate=100, + do_not_save=1, + **args, + ) + si = si.save() + if not do_not_submit: + si = si.submit() + return si + + def create_payment_entry(self, docname, do_not_submit=False): + pe = get_payment_entry("Sales Invoice", docname, bank_account=self.cash, party_amount=40) + pe.paid_from = self.debit_to + pe.insert() + if not do_not_submit: + pe.submit() + return pe + + def create_credit_note(self, docname, do_not_submit=False): + credit_note = create_sales_invoice( + company=self.company, + customer=self.customer, + item=self.item, + qty=-1, + debit_to=self.debit_to, + cost_center=self.cost_center, + is_return=1, + return_against=docname, + do_not_submit=do_not_submit, + ) + + return credit_note + + def test_ledger_summary_basic_output(self): + filters = {"company": self.company, "from_date": today(), "to_date": today()} + + si = self.create_sales_invoice(do_not_submit=True) + si.save().submit() + + expected = { + "party": "_Test Customer", + "party_name": "_Test Customer", + "opening_balance": 0, + "invoiced_amount": 1000.0, + "paid_amount": 0, + "return_amount": 0, + "closing_balance": 1000.0, + "currency": "INR", + "customer_name": "_Test Customer", + } + + report = execute(filters)[1] + self.assertEqual(len(report), 1) + for field in expected: + with self.subTest(field=field): + self.assertEqual(report[0].get(field), expected.get(field)) + + def test_summary_with_return_and_payment(self): + filters = {"company": self.company, "from_date": today(), "to_date": today()} + + si = self.create_sales_invoice(do_not_submit=True) + si.save().submit() + + expected = { + "party": "_Test Customer", + "party_name": "_Test Customer", + "opening_balance": 0, + "invoiced_amount": 1000.0, + "paid_amount": 0, + "return_amount": 0, + "closing_balance": 1000.0, + "currency": "INR", + "customer_name": "_Test Customer", + } + + report = execute(filters)[1] + self.assertEqual(len(report), 1) + for field in expected: + with self.subTest(field=field): + self.assertEqual(report[0].get(field), expected.get(field)) + + cr_note = self.create_credit_note(si.name, True) + cr_note.items[0].qty = -2 + cr_note.save().submit() + + expected_after_cr_note = { + "party": "_Test Customer", + "party_name": "_Test Customer", + "opening_balance": 0, + "invoiced_amount": 1000.0, + "paid_amount": 0, + "return_amount": 200.0, + "closing_balance": 800.0, + "currency": "INR", + } + report = execute(filters)[1] + self.assertEqual(len(report), 1) + for field in expected_after_cr_note: + with self.subTest(field=field): + self.assertEqual(report[0].get(field), expected_after_cr_note.get(field)) + + pe = self.create_payment_entry(si.name, True) + pe.paid_amount = 500 + pe.save().submit() + + expected_after_cr_and_payment = { + "party": "_Test Customer", + "party_name": "_Test Customer", + "opening_balance": 0, + "invoiced_amount": 1000.0, + "paid_amount": 500.0, + "return_amount": 200.0, + "closing_balance": 300.0, + "currency": "INR", + } + + report = execute(filters)[1] + self.assertEqual(len(report), 1) + for field in expected_after_cr_and_payment: + with self.subTest(field=field): + self.assertEqual(report[0].get(field), expected_after_cr_and_payment.get(field)) From 233a2c08a109c7708cbe5e358cd82cae420be6fc Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 14 Apr 2025 16:54:14 +0530 Subject: [PATCH 1598/1614] test: basic supplier ledger summary (cherry picked from commit 71f0f7a0b5656d271fbb20b2842738708cc208ce) --- .../test_supplier_ledger_summary.py | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 erpnext/accounts/report/supplier_ledger_summary/test_supplier_ledger_summary.py diff --git a/erpnext/accounts/report/supplier_ledger_summary/test_supplier_ledger_summary.py b/erpnext/accounts/report/supplier_ledger_summary/test_supplier_ledger_summary.py new file mode 100644 index 00000000000..913f64ab38f --- /dev/null +++ b/erpnext/accounts/report/supplier_ledger_summary/test_supplier_ledger_summary.py @@ -0,0 +1,61 @@ +import frappe +from frappe.tests import IntegrationTestCase +from frappe.utils import today + +from erpnext.accounts.doctype.purchase_invoice.test_purchase_invoice import make_purchase_invoice +from erpnext.accounts.report.supplier_ledger_summary.supplier_ledger_summary import execute +from erpnext.accounts.test.accounts_mixin import AccountsTestMixin + + +class TestSupplierLedgerSummary(AccountsTestMixin, IntegrationTestCase): + def setUp(self): + self.create_company() + self.create_supplier() + self.create_item() + self.clear_old_entries() + + def tearDown(self): + frappe.db.rollback() + + def create_purchase_invoice(self, do_not_submit=False): + frappe.set_user("Administrator") + pi = make_purchase_invoice( + item=self.item, + company=self.company, + supplier=self.supplier, + is_return=False, + update_stock=False, + posting_date=frappe.utils.datetime.date(2021, 5, 1), + do_not_save=1, + rate=300, + price_list_rate=300, + qty=1, + ) + + pi = pi.save() + if not do_not_submit: + pi = pi.submit() + return pi + + def test_basic_supplier_ledger_summary(self): + self.create_purchase_invoice() + + filters = {"company": self.company, "from_date": today(), "to_date": today()} + + expected = { + "party": "_Test Supplier", + "party_name": "_Test Supplier", + "opening_balance": 0, + "invoiced_amount": 300.0, + "paid_amount": 0, + "return_amount": 0, + "closing_balance": 300.0, + "currency": "INR", + "supplier_name": "_Test Supplier", + } + + report_output = execute(filters)[1] + self.assertEqual(len(report_output), 1) + for field in expected: + with self.subTest(field=field): + self.assertEqual(report_output[0].get(field), expected.get(field)) From 21e94148db1c7c68dd695ace6332309388d8a840 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 15 Apr 2025 13:09:51 +0530 Subject: [PATCH 1599/1614] chore: resolve conflict --- .../customer_ledger_summary.py | 151 +----------------- 1 file changed, 2 insertions(+), 149 deletions(-) diff --git a/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py b/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py index 3553b69044c..ad05d770314 100644 --- a/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py +++ b/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py @@ -4,16 +4,11 @@ import frappe from frappe import _, qb, scrub -<<<<<<< HEAD -======= from frappe.query_builder import Criterion, Tuple from frappe.query_builder.functions import IfNull ->>>>>>> e84e49345a (perf: refactored customer ledger summary for performance) from frappe.utils import getdate, nowdate from frappe.utils.nestedset import get_descendants_of -<<<<<<< HEAD -======= from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import ( get_accounting_dimensions, get_dimension_with_children, @@ -23,7 +18,6 @@ TREE_DOCTYPES = frozenset( ["Customer Group", "Terrirtory", "Supplier Group", "Sales Partner", "Sales Person", "Cost Center"] ) ->>>>>>> fca46e0b2d (fix: child values for tree doctypes and query refactor) class PartyLedgerSummaryReport: def __init__(self, filters=None): @@ -33,10 +27,6 @@ class PartyLedgerSummaryReport: def run(self, args): self.filters.party_type = args.get("party_type") -<<<<<<< HEAD - self.party_naming_by = frappe.db.get_value(args.get("naming_by")[0], None, args.get("naming_by")[1]) -======= ->>>>>>> fca46e0b2d (fix: child values for tree doctypes and query refactor) self.validate_filters() self.get_party_details() @@ -314,36 +304,6 @@ class PartyLedgerSummaryReport: return out def get_gl_entries(self): -<<<<<<< HEAD - conditions = self.prepare_conditions() - join = join_field = "" - if self.filters.party_type == "Customer": - join_field = ", p.customer_name as party_name" - join = "left join `tabCustomer` p on gle.party = p.name" - elif self.filters.party_type == "Supplier": - join_field = ", p.supplier_name as party_name" - join = "left join `tabSupplier` p on gle.party = p.name" - - self.gl_entries = frappe.db.sql( - f""" - select - gle.posting_date, gle.party, gle.voucher_type, gle.voucher_no, gle.against_voucher_type, - gle.against_voucher, gle.debit, gle.credit, gle.is_opening {join_field} - from `tabGL Entry` gle - {join} - where - gle.docstatus < 2 and gle.is_cancelled = 0 and gle.party_type=%(party_type)s and ifnull(gle.party, '') != '' - and gle.posting_date <= %(to_date)s {conditions} - order by gle.posting_date - """, - self.filters, - as_dict=True, - ) - - def prepare_conditions(self): - conditions = [""] - -======= gle = qb.DocType("GL Entry") query = ( qb.from_(gle) @@ -372,70 +332,12 @@ class PartyLedgerSummaryReport: def prepare_conditions(self, query): gle = qb.DocType("GL Entry") ->>>>>>> e84e49345a (perf: refactored customer ledger summary for performance) if self.filters.company: - conditions.append("gle.company=%(company)s") + query = query.where(gle.company == self.filters.company) if self.filters.finance_book: - conditions.append("ifnull(finance_book,'') in (%(finance_book)s, '')") + query = query.where(IfNull(gle.finance_book, "") == self.filters.finance_book) -<<<<<<< HEAD - if self.filters.get("party"): - conditions.append("party=%(party)s") - - if self.filters.party_type == "Customer": - if self.filters.get("customer_group"): - lft, rgt = frappe.get_cached_value( - "Customer Group", self.filters["customer_group"], ["lft", "rgt"] - ) - - conditions.append( - f"""party in (select name from tabCustomer - where exists(select name from `tabCustomer Group` where lft >= {lft} and rgt <= {rgt} - and name=tabCustomer.customer_group))""" - ) - - if self.filters.get("territory"): - lft, rgt = frappe.db.get_value("Territory", self.filters.get("territory"), ["lft", "rgt"]) - - conditions.append( - f"""party in (select name from tabCustomer - where exists(select name from `tabTerritory` where lft >= {lft} and rgt <= {rgt} - and name=tabCustomer.territory))""" - ) - - if self.filters.get("payment_terms_template"): - conditions.append( - "party in (select name from tabCustomer where payment_terms=%(payment_terms_template)s)" - ) - - if self.filters.get("sales_partner"): - conditions.append( - "party in (select name from tabCustomer where default_sales_partner=%(sales_partner)s)" - ) - - if self.filters.get("sales_person"): - lft, rgt = frappe.db.get_value( - "Sales Person", self.filters.get("sales_person"), ["lft", "rgt"] - ) - - conditions.append( - """exists(select name from `tabSales Team` steam where - steam.sales_person in (select name from `tabSales Person` where lft >= {} and rgt <= {}) - and ((steam.parent = voucher_no and steam.parenttype = voucher_type) - or (steam.parent = against_voucher and steam.parenttype = against_voucher_type) - or (steam.parent = party and steam.parenttype = 'Customer')))""".format(lft, rgt) - ) - - if self.filters.party_type == "Supplier": - if self.filters.get("supplier_group"): - conditions.append( - """party in (select name from tabSupplier - where supplier_group=%(supplier_group)s)""" - ) - - return " and ".join(conditions) -======= if self.filters.cost_center: query = query.where((gle.cost_center).isin(self.filters.cost_center)) @@ -460,7 +362,6 @@ class PartyLedgerSummaryReport: ) return query ->>>>>>> e84e49345a (perf: refactored customer ledger summary for performance) def get_return_invoices(self): doctype = "Sales Invoice" if self.filters.party_type == "Customer" else "Purchase Invoice" @@ -476,31 +377,12 @@ class PartyLedgerSummaryReport: self.return_invoices = frappe.get_all(doctype, filters=filters, pluck="name") def get_party_adjustment_amounts(self): - conditions = self.prepare_conditions() account_type = "Expense Account" if self.filters.party_type == "Customer" else "Income Account" -<<<<<<< HEAD - income_or_expense_accounts = frappe.db.get_all( - "Account", filters={"account_type": account_type, "company": self.filters.company}, pluck="name" - ) -======= ->>>>>>> e84e49345a (perf: refactored customer ledger summary for performance) invoice_dr_or_cr = "debit" if self.filters.party_type == "Customer" else "credit" reverse_dr_or_cr = "credit" if self.filters.party_type == "Customer" else "debit" round_off_account = frappe.get_cached_value("Company", self.filters.company, "round_off_account") -<<<<<<< HEAD - gl = qb.DocType("GL Entry") - if not income_or_expense_accounts: - # prevent empty 'in' condition - income_or_expense_accounts.append("") - else: - # escape '%' in account name - # ignoring frappe.db.escape as it replaces single quotes with double quotes - income_or_expense_accounts = [x.replace("%", "%%") for x in income_or_expense_accounts] - - accounts_query = ( -======= current_period_vouchers = set() adjustment_voucher_entries = {} @@ -521,37 +403,9 @@ class PartyLedgerSummaryReport: gl = qb.DocType("GL Entry") query = ( ->>>>>>> e84e49345a (perf: refactored customer ledger summary for performance) qb.from_(gl) .select(gl.voucher_type, gl.voucher_no) .where( -<<<<<<< HEAD - (gl.account.isin(income_or_expense_accounts)) - & (gl.posting_date.gte(self.filters.from_date)) - & (gl.posting_date.lte(self.filters.to_date)) - ) - ) - - gl_entries = frappe.db.sql( - f""" - select - posting_date, account, party, voucher_type, voucher_no, debit, credit - from - `tabGL Entry` - where - docstatus < 2 and is_cancelled = 0 - and (voucher_type, voucher_no) in ( - {accounts_query} - ) and (voucher_type, voucher_no) in ( - select voucher_type, voucher_no from `tabGL Entry` gle - where gle.party_type=%(party_type)s and ifnull(party, '') != '' - and gle.posting_date between %(from_date)s and %(to_date)s and gle.docstatus < 2 {conditions} - ) - """, - self.filters, - as_dict=True, - ) -======= (gl.docstatus < 2) & (gl.is_cancelled == 0) & (gl.posting_date.gte(self.filters.from_date)) @@ -562,7 +416,6 @@ class PartyLedgerSummaryReport: ) query = self.prepare_conditions(query) gl_entries = query.run(as_dict=True) ->>>>>>> e84e49345a (perf: refactored customer ledger summary for performance) for gle in gl_entries: adjustment_voucher_entries[(gle.voucher_type, gle.voucher_no)].append(gle) From 1e340ccd9c80f504abf21d92ebf41034ceaef5a2 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 15 Apr 2025 13:29:22 +0530 Subject: [PATCH 1600/1614] chore: use correct Test class --- .../customer_ledger_summary/test_customer_ledger_summary.py | 4 ++-- .../supplier_ledger_summary/test_supplier_ledger_summary.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/report/customer_ledger_summary/test_customer_ledger_summary.py b/erpnext/accounts/report/customer_ledger_summary/test_customer_ledger_summary.py index 66980d821e0..ce47793bbd5 100644 --- a/erpnext/accounts/report/customer_ledger_summary/test_customer_ledger_summary.py +++ b/erpnext/accounts/report/customer_ledger_summary/test_customer_ledger_summary.py @@ -1,6 +1,6 @@ import frappe from frappe import qb -from frappe.tests import IntegrationTestCase +from frappe.tests.utils import FrappeTestCase from frappe.utils import add_days, flt, getdate, today from erpnext.accounts.doctype.payment_entry.payment_entry import get_payment_entry @@ -9,7 +9,7 @@ from erpnext.accounts.report.customer_ledger_summary.customer_ledger_summary imp from erpnext.accounts.test.accounts_mixin import AccountsTestMixin -class TestCustomerLedgerSummary(AccountsTestMixin, IntegrationTestCase): +class TestCustomerLedgerSummary(FrappeTestCase, AccountsTestMixin): def setUp(self): self.create_company() self.create_customer() diff --git a/erpnext/accounts/report/supplier_ledger_summary/test_supplier_ledger_summary.py b/erpnext/accounts/report/supplier_ledger_summary/test_supplier_ledger_summary.py index 913f64ab38f..ea95772af4d 100644 --- a/erpnext/accounts/report/supplier_ledger_summary/test_supplier_ledger_summary.py +++ b/erpnext/accounts/report/supplier_ledger_summary/test_supplier_ledger_summary.py @@ -1,5 +1,5 @@ import frappe -from frappe.tests import IntegrationTestCase +from frappe.tests.utils import FrappeTestCase from frappe.utils import today from erpnext.accounts.doctype.purchase_invoice.test_purchase_invoice import make_purchase_invoice @@ -7,7 +7,7 @@ from erpnext.accounts.report.supplier_ledger_summary.supplier_ledger_summary imp from erpnext.accounts.test.accounts_mixin import AccountsTestMixin -class TestSupplierLedgerSummary(AccountsTestMixin, IntegrationTestCase): +class TestSupplierLedgerSummary(FrappeTestCase, AccountsTestMixin): def setUp(self): self.create_company() self.create_supplier() From 3f652bd4e1569497718c52411216c5f49f9de282 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 15 Apr 2025 17:33:58 +0530 Subject: [PATCH 1601/1614] fix: enabled allow on submit for asset name field (backport #47093) (#47094) fix: enabled allow on submit for asset name field (#47093) (cherry picked from commit e41720f1a328c95b16a0f50ef5cb2f7d162e6e74) Co-authored-by: Khushi Rawat <142375893+khushi8112@users.noreply.github.com> --- erpnext/assets/doctype/asset/asset.json | 4 +++- erpnext/assets/doctype/asset/asset.py | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/erpnext/assets/doctype/asset/asset.json b/erpnext/assets/doctype/asset/asset.json index aa5fd217665..cf3602ef966 100644 --- a/erpnext/assets/doctype/asset/asset.json +++ b/erpnext/assets/doctype/asset/asset.json @@ -87,6 +87,7 @@ "options": "ACC-ASS-.YYYY.-" }, { + "allow_on_submit": 1, "depends_on": "item_code", "fetch_from": "item_code.item_name", "fetch_if_empty": 1, @@ -592,7 +593,7 @@ "link_fieldname": "target_asset" } ], - "modified": "2025-02-20 14:09:05.421913", + "modified": "2025-04-15 16:33:17.189524", "modified_by": "Administrator", "module": "Assets", "name": "Asset", @@ -630,6 +631,7 @@ "write": 1 } ], + "row_format": "Dynamic", "show_name_in_global_search": 1, "sort_field": "modified", "sort_order": "DESC", diff --git a/erpnext/assets/doctype/asset/asset.py b/erpnext/assets/doctype/asset/asset.py index 9b3cb022bd8..6886a79bb0a 100644 --- a/erpnext/assets/doctype/asset/asset.py +++ b/erpnext/assets/doctype/asset/asset.py @@ -42,14 +42,15 @@ from erpnext.controllers.accounts_controller import AccountsController class Asset(AccountsController): # begin: auto-generated types + # ruff: noqa + # This code is auto-generated. Do not modify anything in this block. from typing import TYPE_CHECKING if TYPE_CHECKING: - from frappe.types import DF - from erpnext.assets.doctype.asset_finance_book.asset_finance_book import AssetFinanceBook + from frappe.types import DF additional_asset_cost: DF.Currency amended_from: DF.Link | None @@ -117,6 +118,7 @@ class Asset(AccountsController): total_asset_cost: DF.Currency total_number_of_depreciations: DF.Int value_after_depreciation: DF.Currency + # ruff: noqa # end: auto-generated types def validate(self): From aa0b93d0b29ed9722129fd372d695b0b7d2e02e7 Mon Sep 17 00:00:00 2001 From: venkat102 Date: Thu, 10 Apr 2025 16:07:20 +0530 Subject: [PATCH 1602/1614] fix: fetch exchange rate while creating inter-company order and invoice (cherry picked from commit 145a6c5e2a2a721f880978c94bffe5ae5b59ef2a) --- erpnext/public/js/controllers/transaction.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 9c6ae5afa98..59dd337d3af 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -1127,13 +1127,14 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe currency() { // The transaction date be either transaction_date (from orders) or posting_date (from invoices) let transaction_date = this.frm.doc.transaction_date || this.frm.doc.posting_date; + let inter_company_reference = this.frm.doc.inter_company_order_reference || this.frm.doc.inter_company_invoice_reference; let me = this; this.set_dynamic_labels(); let company_currency = this.get_company_currency(); // Added `load_after_mapping` to determine if document is loading after mapping from another doc if(this.frm.doc.currency && this.frm.doc.currency !== company_currency - && !this.frm.doc.__onload?.load_after_mapping) { + && (!this.frm.doc.__onload?.load_after_mapping || inter_company_reference)) { this.get_exchange_rate(transaction_date, this.frm.doc.currency, company_currency, function(exchange_rate) { From c8691b65166ca1f34fedfef4a571db15e147683a Mon Sep 17 00:00:00 2001 From: Dany Robert Date: Wed, 9 Apr 2025 18:39:36 +0530 Subject: [PATCH 1603/1614] fix: precision issue on qty_to_be_reserved (cherry picked from commit 860699ee7b2a459d6f6d99f28342c8fc78a23519) # Conflicts: # erpnext/stock/doctype/stock_reservation_entry/stock_reservation_entry.py --- .../doctype/stock_reservation_entry/stock_reservation_entry.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/stock/doctype/stock_reservation_entry/stock_reservation_entry.py b/erpnext/stock/doctype/stock_reservation_entry/stock_reservation_entry.py index 8316488e253..a66214c0aa7 100644 --- a/erpnext/stock/doctype/stock_reservation_entry/stock_reservation_entry.py +++ b/erpnext/stock/doctype/stock_reservation_entry/stock_reservation_entry.py @@ -445,6 +445,7 @@ class StockReservationEntry(Document): voucher_delivered_qty = flt(delivered_qty) * flt(conversion_factor) allowed_qty = min(self.available_qty, (self.voucher_qty - voucher_delivered_qty - total_reserved_qty)) + qty_to_be_reserved = flt(qty_to_be_reserved, self.precision("reserved_qty")) if self.get("_action") != "submit" and self.voucher_type == "Sales Order" and allowed_qty <= 0: msg = _("Item {0} is already reserved/delivered against Sales Order {1}.").format( From b7c3fa23d278ca328072e43dd2e9834754b028df Mon Sep 17 00:00:00 2001 From: ljain112 Date: Fri, 28 Mar 2025 13:26:28 +0530 Subject: [PATCH 1604/1614] fix: correct outstanding amount for invoice in dunning (cherry picked from commit c2bdd30e6de215c79f40bf20d95a797a711f7080) --- erpnext/accounts/doctype/sales_invoice/sales_invoice.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index a57e313e2e9..7761dc832de 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -2720,9 +2720,11 @@ def create_dunning(source_name, target_doc=None, ignore_permissions=False): target.closing_text = letter_text.get("closing_text") target.language = letter_text.get("language") - # update outstanding + # update outstanding from doc if source.payment_schedule and len(source.payment_schedule) == 1: - target.overdue_payments[0].outstanding = source.get("outstanding_amount") + for row in target.overdue_payments: + if row.payment_schedule == source.payment_schedule[0].name: + row.outstanding = source.get("outstanding_amount") target.validate() From a944853b56a7985a6553500c3dcebec344a2d9bf Mon Sep 17 00:00:00 2001 From: Diptanil Saha Date: Tue, 15 Apr 2025 19:03:55 +0530 Subject: [PATCH 1605/1614] fix: configuration to accept partial payment in pos invoice (#47052) --- erpnext/accounts/doctype/pos_invoice/pos_invoice.py | 5 ++++- erpnext/accounts/doctype/pos_profile/pos_profile.json | 11 +++++++++-- erpnext/accounts/doctype/pos_profile/pos_profile.py | 1 + 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/pos_invoice/pos_invoice.py b/erpnext/accounts/doctype/pos_invoice/pos_invoice.py index 6933b04d2e1..58c14a2bc5d 100644 --- a/erpnext/accounts/doctype/pos_invoice/pos_invoice.py +++ b/erpnext/accounts/doctype/pos_invoice/pos_invoice.py @@ -497,8 +497,11 @@ class POSInvoice(SalesInvoice): def validate_full_payment(self): invoice_total = flt(self.rounded_total) or flt(self.grand_total) + is_partial_payment_allowed = frappe.db.get_value( + "POS Profile", self.pos_profile, "allow_partial_payment" + ) - if self.docstatus == 1: + if self.docstatus == 1 and not is_partial_payment_allowed: if self.is_return and self.paid_amount != invoice_total: frappe.throw( msg=_("Partial Payment in POS Invoice is not allowed."), exc=PartialPaymentValidationError diff --git a/erpnext/accounts/doctype/pos_profile/pos_profile.json b/erpnext/accounts/doctype/pos_profile/pos_profile.json index e74fd72d9e5..9ed39322f4f 100644 --- a/erpnext/accounts/doctype/pos_profile/pos_profile.json +++ b/erpnext/accounts/doctype/pos_profile/pos_profile.json @@ -30,6 +30,7 @@ "allow_rate_change", "allow_discount_change", "disable_grand_total_to_default_mop", + "allow_partial_payment", "section_break_23", "item_groups", "column_break_25", @@ -398,6 +399,12 @@ "oldfieldname": "cost_center", "oldfieldtype": "Link", "options": "Project" + }, + { + "default": "0", + "fieldname": "allow_partial_payment", + "fieldtype": "Check", + "label": "Allow Partial Payment" } ], "icon": "icon-cog", @@ -425,7 +432,7 @@ "link_fieldname": "pos_profile" } ], - "modified": "2025-04-09 11:35:13.779613", + "modified": "2025-04-14 15:58:20.497426", "modified_by": "Administrator", "module": "Accounts", "name": "POS Profile", @@ -455,4 +462,4 @@ "sort_field": "creation", "sort_order": "DESC", "states": [] -} +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/pos_profile/pos_profile.py b/erpnext/accounts/doctype/pos_profile/pos_profile.py index c8049c25d07..143407eb750 100644 --- a/erpnext/accounts/doctype/pos_profile/pos_profile.py +++ b/erpnext/accounts/doctype/pos_profile/pos_profile.py @@ -29,6 +29,7 @@ class POSProfile(Document): account_for_change_amount: DF.Link | None allow_discount_change: DF.Check + allow_partial_payment: DF.Check allow_rate_change: DF.Check applicable_for_users: DF.Table[POSProfileUser] apply_discount_on: DF.Literal["Grand Total", "Net Total"] From c42f76b15a267e4c48dda420ee39ce088f360456 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Tue, 15 Apr 2025 11:36:19 +0530 Subject: [PATCH 1606/1614] chore: added test for `Fetch Overdue Payments` in dunning (cherry picked from commit 3b613c44a60320e3f57fb1efad7f0dafe6fe4a86) # Conflicts: # erpnext/accounts/doctype/dunning/test_dunning.py --- .../accounts/doctype/dunning/test_dunning.py | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/erpnext/accounts/doctype/dunning/test_dunning.py b/erpnext/accounts/doctype/dunning/test_dunning.py index 62a0c90046b..ad45b882035 100644 --- a/erpnext/accounts/doctype/dunning/test_dunning.py +++ b/erpnext/accounts/doctype/dunning/test_dunning.py @@ -1,6 +1,9 @@ # Copyright (c) 2023, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt +import json + import frappe +from frappe.model import mapper from frappe.tests.utils import FrappeTestCase from frappe.utils import add_days, nowdate, today @@ -68,6 +71,36 @@ class TestDunning(FrappeTestCase): dunning.reload() self.assertEqual(dunning.status, "Resolved") + def test_fetch_overdue_payments(self): + """ + Create SI with overdue payment. Check if overdue payment is fetched in Dunning. + """ + si1 = create_sales_invoice_against_cost_center( + posting_date=add_days(today(), -1 * 6), + qty=1, + rate=100, + ) + + si2 = create_sales_invoice_against_cost_center( + posting_date=add_days(today(), -1 * 6), + qty=1, + rate=300, + ) + + dunning = create_dunning_from_sales_invoice(si1.name) + dunning.overdue_payments = [] + + method = "erpnext.accounts.doctype.sales_invoice.sales_invoice.create_dunning" + updated_dunning = mapper.map_docs(method, json.dumps([si1.name, si2.name]), dunning) + + self.assertEqual(len(updated_dunning.overdue_payments), 2) + + self.assertEqual(updated_dunning.overdue_payments[0].sales_invoice, si1.name) + self.assertEqual(updated_dunning.overdue_payments[0].outstanding, si1.outstanding_amount) + + self.assertEqual(updated_dunning.overdue_payments[1].sales_invoice, si2.name) + self.assertEqual(updated_dunning.overdue_payments[1].outstanding, si2.outstanding_amount) + def test_dunning_and_payment_against_partially_due_invoice(self): """ Create SI with first installment overdue. Check impact of Dunning and Payment Entry. From 188c4f896a1df98f237474efc4a0377985eec8ec Mon Sep 17 00:00:00 2001 From: Raffael Meyer <14891507+barredterra@users.noreply.github.com> Date: Tue, 15 Apr 2025 19:30:17 +0200 Subject: [PATCH 1607/1614] fix: backport translations from develop (#47104) --- erpnext/translations/af.csv | 2 + erpnext/translations/ar.csv | 4 + erpnext/translations/bs.csv | 3240 ++++++++++++++++++++++++++++++++ erpnext/translations/de.csv | 187 ++ erpnext/translations/es.csv | 8 + erpnext/translations/fa.csv | 80 + erpnext/translations/fi.csv | 2 + erpnext/translations/fr.csv | 57 + erpnext/translations/hr.csv | 142 ++ erpnext/translations/hu.csv | 3 + erpnext/translations/id.csv | 2 + erpnext/translations/it.csv | 1 + erpnext/translations/nl.csv | 2 + erpnext/translations/pt-BR.csv | 25 + erpnext/translations/pt.csv | 2 + erpnext/translations/ru.csv | 2 + erpnext/translations/sv.csv | 56 + erpnext/translations/tr.csv | 66 + erpnext/translations/vi.csv | 2 + erpnext/translations/zh.csv | 3209 +++++++++++++++++++++++++++++++ 20 files changed, 7092 insertions(+) diff --git a/erpnext/translations/af.csv b/erpnext/translations/af.csv index 1be91d03944..4c6870efa18 100644 --- a/erpnext/translations/af.csv +++ b/erpnext/translations/af.csv @@ -8743,3 +8743,5 @@ WhatsApp,WhatsApp, Make a call,Maak 'n oproep, Approve,goed te keur, Reject,verwerp, +Convert to Group,Skakel na Groep,Warehouse +General Ledger,Algemene lêer,Warehouse diff --git a/erpnext/translations/ar.csv b/erpnext/translations/ar.csv index c8bb98a0660..0d35aa49a7a 100644 --- a/erpnext/translations/ar.csv +++ b/erpnext/translations/ar.csv @@ -8855,3 +8855,7 @@ Workflow State,حالة سير العمل, {} Available,{} متاح, {} Assigned,{} تم تحديد المهمة, {} Available,{} متاح, +CANCELLED,ملغي, +Mobile: ,المحمول: , +Sending...,إرسال..., +{0} is a mandatory field.,{0} حقل إلزامي., diff --git a/erpnext/translations/bs.csv b/erpnext/translations/bs.csv index 87bd135eb6a..700d8524a55 100644 --- a/erpnext/translations/bs.csv +++ b/erpnext/translations/bs.csv @@ -8743,3 +8743,3243 @@ WhatsApp,WhatsApp, Make a call,Pozovite, Approve,odobriti, Reject,odbiti, + Address, Adresa, + Amount,Iznos, + Is Child Table,Podređena tabela, + Name, Naziv, + Rate, Cijena, + Summary, Sažetak, +"""SN-01::10"" for ""SN-01"" to ""SN-10""","""SB-01::10"" za ""SB-01"" do ""SB-10""", +# In Stock,# Na Zalihama, +# Req'd Items,# Obavezni Artikli, +% Finished Item Quantity,% Količina Gotovih Proizvoda, +% Occupied,% Zauzeto, +% Picked,% Odabrano, +% Process Loss,% Procesni Gubitak, +% Returned,% Vraćeno, +'Account' in the Accounting section of Customer {0},'Račun' u sekciji Knjigovodstvo Klijenta {0}, +'Allow Multiple Sales Orders Against a Customer's Purchase Order','Dozvoli višestruke Prodajne Naloge naspram Kupovnog Naloga Klijenta', +'Default {0} Account' in Company {1},'Standard {0} račun' u Kompaniji {1}, +"'Inspection Required before Delivery' has disabled for the item {0}, no need to create the QI","'Kontrola Obavezna prije Dostave' je onemogućena za artikal {0}, nema potrebe za kreiranjem Kontrole Kvaliteta", +"'Inspection Required before Purchase' has disabled for the item {0}, no need to create the QI","'Potrebna kontrola prije kupovine' je onemogućena za artikal {0}, nema potrebe za kreiranjem kvaliteta kontrole", +'To Package No.' cannot be less than 'From Package No.','Do Paketa Broj' ne može biti manje od 'Od Paketa Broj.', +'{0}' account is already used by {1}. Use another account.,Račun '{0}' već koristi {1}. Koristite drugi račun., +'{0}' should be in company currency {1}.,'{0}' bi trebao biti u valuti kompanije {1}., +(A) Qty After Transaction,(A) Količina Nakon Transakcije, +(B) Expected Qty After Transaction,(B) Očekivana Količina Nakon Transakcije, +(C) Total Qty in Queue,(C) Ukupna Količina u Redu, +(C) Total qty in queue,(C) Ukupna Količina u Redu, +(D) Balance Stock Value,(D) Bilansna Vrijednost Zaliha, +(E) Balance Stock Value in Queue,(E) Bilansna Vrijednost Zaliha u Redu, +(F) Change in Stock Value,(F) Promjena Vrijednosti Zaliha, +(G) Sum of Change in Stock Value,(G) Suma Promjene Vrijednosti Zaliha, +(H) Change in Stock Value (FIFO Queue),(H) Promjena Vrijednosti Zaliha (FIFO), +(H) Valuation Rate,(H) Stopa Vrednovanja, +(I) Valuation Rate,(I) Stopa Vrednovanja, +(J) Valuation Rate as per FIFO,(J) Stopa Vrednovanja prema FIFO, +(K) Valuation = Value (D) ÷ Qty (A),(K) Vrijednovanje = Vrijednost (D) ÷ Količina (A), +0-30 Days,0-30 dana, +3 Yearly,3 Godišnje, +30-60 Days,30-60 dana, +60-90 Days,60-90 dana, +90 Above,Preko 90, +"
+

Note

+
    +
  • +You can use Jinja tags in Subject and Body fields for dynamic values. +
  • + All fields in this doctype are available under the doc object and all fields for the customer to whom the mail will go to is available under the customer object. +
+

Examples

+ +
    +
  • Subject:

    Statement Of Accounts for {{ customer.customer_name }}

  • +
  • Body:

    +
    Hello {{ customer.customer_name }},
    PFA your Statement Of Accounts from {{ doc.from_date }} to {{ doc.to_date }}.
  • +
+","
+

Napomena

+
    +
  • +Možete koristiti Jinja Oznake u Predmet i Sadržaj polja za dinamičke vrijednosti. +
  • + Sva polja u ovom tipu dokumenta dostupna su pod objektom doc, a sva polja za klijenta kojem će ići pošta dostupna su pod objektom Klijent. +
+

Primjeri

+ +
    +
  • Predmet:

    Izvod računa za {{ customer.customer_name }}

  • +
  • Tijelo:

    +
    Zdravo {{ customer.customer_name }},
    PFA vaš izvod računa od {{ doc.from_date }} do {{ doc.to_date }}.
  • +
+", +"
Other Details
","
Ostali Detalji
", +"
No Matching Bank Transactions Found
","
Nisu Pronađene Odgovarajuće Bankovne Transakcije
", +"
+

All dimensions in centimeter only

+
","
+

Sve dimenzije samo u centimetrima

+
", +"

About Product Bundle

+ +

Aggregate group of Items into another Item. This is useful if you are bundling a certain Items into a package and you maintain stock of the packed Items and not the aggregate Item.

+

The package Item will have Is Stock Item as No and Is Sales Item as Yes.

+

Example:

+

If you are selling Laptops and Backpacks separately and have a special price if the customer buys both, then the Laptop + Backpack will be a new Product Bundle Item.

","

O Paketu Proizvoda

+ +

Spoji grupu artikala u drugi artikal. Ovo je korisno ako spajate određene Artikle u paket i održavate zalihe upakiranih artikala, a ne zbirn artikal.

+

Paketni Artikal će imati artikle na zalihi kao Ne i Prodajni Artikal kao Da .

+

Primjer:

+

Ako prodajete prijenosna računala i ruksake odvojeno i imate posebnu cijenu ako Klijent kupi oboje, tada će prijenosno računalo + ruksak biti novi artikal paketa proizvoda.

", +"

Currency Exchange Settings Help

+

There are 3 variables that could be used within the endpoint, result key and in values of the parameter.

+

Exchange rate between {from_currency} and {to_currency} on {transaction_date} is fetched by the API.

+

Example: If your endpoint is exchange.com/2021-08-01, then, you will have to input exchange.com/{transaction_date}

","

Pomoć za Postavke Razmjene Valuta

+

Postoje 3 varijable koje se mogu koristiti unutar krajnje tačke, ključa rezultata i u vrijednostima parametra.

+

Razmjenski kurs između {from_currency} i {to_currency} na dan {transaction_date} preuzima API.

+

Primjer: Ako je vaša krajnja tačka exchange.com/2021-08-01, tada ćete morati unijeti exchange.com/{transaction_date}

", +"

Body Text and Closing Text Example

+ +
We have noticed that you have not yet paid invoice {{sales_invoice}} for {{frappe.db.get_value(""Currency"", currency, ""symbol"")}} {{outstanding_amount}}. This is a friendly reminder that the invoice was due on {{due_date}}. Please pay the amount due immediately to avoid any further dunning cost.
+ +

How to get fieldnames

+ +

The fieldnames you can use in your template are the fields in the document. You can find out the fields of any documents via Setup > Customize Form View and selecting the document type (e.g. Sales Invoice)

+ +

Templating

+ +

Templates are compiled using the Jinja Templating Language. To learn more about Jinja, read this documentation.

","

Sadržajni Tekst i primjer Završnog teksta

+ +
Primijetili smo da još niste platili fakturu {{sales_invoice}} za {{frappe.db.get_value(""Currency"", currency, ""symbol"")}} {{outstanding_amount}}. Ovo je prijateljski podsjetnik da je faktura dospjela na dan {{due_date}}. Molimo vas da odmah platite iznos koji dugujete kako biste izbjegli bilo kakve dodatne troškove opomene.
+ +

Kako dobiti imena polja

+ +

Nazivi polja koje možete koristiti u svom šablonu su polja u dokumentu. Možete saznati polja bilo kojeg dokumenta putem Podešavanja > Prilagodite prikaz obrasca i odabir tipa dokumenta (npr. Prodajna Faktura)

+ +

Šablon

+ +

Šabloni se kompajliraju koristeći Jinja Templating Language. Da saznate više o Jinji, pročitajte ovu dokumentaciju.

", +"

Contract Template Example

+ +
Contract for Customer {{ party_name }}
+
+-Valid From : {{ start_date }} 
+-Valid To : {{ end_date }}
+
+ +

How to get fieldnames

+ +

The field names you can use in your Contract Template are the fields in the Contract for which you are creating the template. You can find out the fields of any documents via Setup > Customize Form View and selecting the document type (e.g. Contract)

+ +

Templating

+ +

Templates are compiled using the Jinja Templating Language. To learn more about Jinja, read this documentation.

","

Primjer Šablona Ugovora

+ +
Ugovor za Kupca {{ party_name }}
+
+-Važi od: {{ start_date }}
+-Važi do: {{ end_date }}
+
+ +

Kako dobiti imena polja

+ +

Nazivi polja koje možete koristiti u svom predlošku ugovora su polja u ugovoru za koje kreirate šablon. Možete saznati polja bilo kojeg dokumenta putem Podešavanja > Prilagodite prikaz obrasca i odabir vrste dokumenta (npr. Ugovor)

+ +

Šablon

+ +

Šabloni se kompajliraju koristeći Jinja Templating Language. Da saznate više o Jinji, pročitajte ovu dokumentaciju.

", +"

Standard Terms and Conditions Example

+ +
Delivery Terms for Order number {{ name }}
+
+-Order Date : {{ transaction_date }} 
+-Expected Delivery Date : {{ delivery_date }}
+
+ +

How to get fieldnames

+ +

The fieldnames you can use in your email template are the fields in the document from which you are sending the email. You can find out the fields of any documents via Setup > Customize Form View and selecting the document type (e.g. Sales Invoice)

+ +

Templating

+ +

Templates are compiled using the Jinja Templating Language. To learn more about Jinja, read this documentation.

","

Primjer Standardnih Odredbi i Uvjeta

+ +
Uvjeti dostaveza broj Naloga {{ name }}
+
+- Datum Naloga: {{ transaction_date }}
+- Očekivani Datum Dostave: {{ delivery_date }}
+
+ +

Kako preuzeti nazive polja

+ +

Imena polja koja možete koristiti u svom šablonu e-pošte su polja u dokumentu iz kojeg šaljete e-poštu. Polja bilo kojeg dokumenta možete pronaći preko Postavljanje > Prilagodite prikaz forme i odaberite tip dokumenta (npr. Prodajna Faktura)

+ +

Izrada Šablona

+ +

Šabloni su sastavljeni pomoću Jinja Templating Language. Da biste saznali više o Jinji, pročitajte ovu dokumentaciju.

", +"
Or
","
Ili
", +"","", +"","", +"","", +"

In your Email Template, you can use the following special variables: +

+
    +
  • + {{ update_password_link }}: A link where your supplier can set a new password to log into your portal. +
  • +
  • + {{ portal_link }}: A link to this RFQ in your supplier portal. +
  • +
  • + {{ supplier_name }}: The company name of your supplier. +
  • +
  • + {{ contact.salutation }} {{ contact.last_name }}: The contact person of your supplier. +
  • + {{ user_fullname }}: Your full name. +
  • +
+

+

Apart from these, you can access all values in this RFQ, like {{ message_for_supplier }} or {{ terms }}.

","

U vašem Šablonu e-pošte možete koristiti sljedeće posebne varijable: +

+
    +
  • + {{ update_password_link }}: Veza na kojoj vaš dobavljač može postaviti novu lozinku za prijavu na vaš portal. +
  • +
  • + {{ portal_link }}: Veza na ovaj Zahtjev za ponudu na portalu vašeg dobavljača. +
  • +
  • + {{ supplier_name }}: naziv firme vašeg dobavljača. +
  • +
  • + {{ contact.salutation }} {{ contact.last_name }}: Kontakt osoba vašeg dobavljača. +
  • + {{ user_fullname }}: Vaše puno ime. +
  • +
+

+

Osim ovih, možete pristupiti svim vrijednostima u ovom Zahtjevu za ponudu, kao što su {{ message_for_supplier }} ili {{ terms }}.

", +"
Message Example
+ +<p> Thank You for being a part of {{ doc.company }}! We hope you are enjoying the service.</p> + +<p> Please find enclosed the E Bill statement. The outstanding amount is {{ doc.grand_total }}.</p> + +<p> We don't want you to be spending time running around in order to pay for your Bill.
After all, life is beautiful and the time you have in hand should be spent to enjoy it!
So here are our little ways to help you get more time for life! </p> + +<a href=""{{ payment_url }}""> click here to pay </a> + +
+","
Primjer poruke
+ +<p> Hvala vam što ste dio {{ doc.company }}! Nadamo se da uživate u usluzi.</p> + +<p> U prilogu se nalazi izvod E računa. Nepodmireni iznos je {{ doc.grand_total }}.</p> + +<p> Ne želimo da trošite vrijeme na trčanje okolo kako biste platili svoj račun.
Uostalom, život je lijep i vrijeme koje imate u ruci treba potrošiti da uživate u njemu!
Dakle, evo naših malih načina da vam pomognemo da dobijete više vremena za život! </p> + +<a href=""{{ payment_url }}""> kliknite ovdje da platite </a> + +
+", +"
Message Example
+ +<p>Dear {{ doc.contact_person }},</p> + +<p>Requesting payment for {{ doc.doctype }}, {{ doc.name }} for {{ doc.grand_total }}.</p> + +<a href=""{{ payment_url }}""> click here to pay </a> + +
+","
Primjer poruke
+ +<p>Poštovani {{ doc.contact_person }},</p> + +<p>Tražim plaćanje za {{ doc.doctype }}, {{ doc.name }} za {{ doc.grand_total }}.</p> + +<a href=""{{ payment_url }}""> kliknite ovdje da platite </a> + +
+", +"Masters & Reports","Postavke & Izvještaji", +"Quick Access","Brzi pristup", +"Reports & Masters","Izvještaji & Pristupi", +"Reports & Masters","Izvještaji & Pristup", +"Settings","Postavke", +"Shortcuts","Prečice", +"Your Shortcuts + + + + + + ","Prečice", +"Your Shortcuts","Prečice", +Grand Total: {0},Ukupno: {0}, +Outstanding Amount: {0},Nepodmireni iznos: {0}, +" + + + + + + + + + + + + + + + + + +
Child DocumentNon Child Document
+

To access parent document field use parent.fieldname and to access child table document field use doc.fieldname

+ +
+

To access document field use doc.fieldname

+
+

Example: parent.doctype == ""Stock Entry"" and doc.item_code == ""Test""

+ +
+

Example: doc.doctype == ""Stock Entry"" and doc.purpose == ""Manufacture""

+
+ + + + + + +"," + + + + + + + + + + + + + + + + + +
Podređeni DokumentNadređeni Dokument
+

Za pristup polju nadređenog dokumenta koristite ime parent.field, a za pristup polju dokumenta podređene tabele koristite doc.fieldname

+ +
+

Za pristup polju dokumenta koristite doc.fieldname

+
+

Primjer: parent.doctype == ""Stock Entry"" i doc.item_code == ""Test""

+ +
+

Primjer: doc.doctype == ""Stock Entry"" i doc.purpose == ""Proizvodnja""

+
+ + + + + + +", +A Holiday List can be added to exclude counting these days for the Workstation.,Lista Praznika se može dodati kako bi se isključilo brojanje praznika za Radnu Stanicu., +A Packing Slip can only be created for Draft Delivery Note.,Otpremnica se može kreirati samo za nacrt Dostavnice., +"A Price List is a collection of Item Prices either Selling, Buying, or both","Cjenovnik je skup cijena artikala za Prodaju, Kupovinu ili oboje", +A Reconciliation Job {0} is running for the same filters. Cannot reconcile now,Posao usaglašavanja {0} radi za iste filtere. Ne mogu se sada usglasiti, +A Transaction Deletion Document: {0} is triggered for {0},Dokument za Brisanje Transakcije: {0} se pokreće za {0}, +A customer must have primary contact email.,Klijent mora imati primarni kontakt e-poštu., +A driver must be set to submit.,Vozač mora biti naveden da bi se podnijelo., +A template with tax category {0} already exists. Only one template is allowed with each tax category,Šablon sa poreskom kategorijom {0} već postoji. Za svaku poreznu kategoriju dozvoljen je samo jedan šablon, +API Details,API Detalji, +AWB Number,AWB Broj, +Abbreviation: {0} must appear only once,Skraćenica: {0} se mora pojaviti samo jednom, +About Us Settings,O nama Postavke, +About {0} minute remaining,Preostalo je oko {0} minute, +About {0} minutes remaining,Preostalo je oko {0} minuta, +About {0} seconds remaining,Preostalo je oko {0} sekundi, +Acceptance Criteria Formula,Formula Kriterija Prihvatljivosti, +Acceptance Criteria Value,Vrijednost Kriterija Prihvatljivosti, +Accepted Qty in Stock UOM,Prihvaćena Količina u Jedinici Zaliha, +Access Key,Pristupni Ključ, +Access Key is required for Service Provider: {0},Pristupni ključ je potreban za davaoca usluga: {0}, +"According to the BOM {0}, the Item '{1}' is missing in the stock entry.","Prema Sastavnici {0}, artikal '{1}' nedostaje u unosu zaliha.", +Account Closing Balance,Završno Stanje Računa, +Account Currency (From),Valuta Računa , +Account Currency (To),Valuta Računa (Do), +Account Opening Balance,Početno Stanje Računa, +Account not Found,Račun nije pronađen, +Account {0} added multiple times,Račun {0} dodan više puta, +Accounting Dimension Filter,Filter Knjigovodstvenih Dimenzija, +Accounting Dimensions Filter,Filter Knjigovodstvenih Dimenzija, +Accounting Entry for {0},Knjigovodstveni Unos za {0}, +Accounts Closing,Zatvaranje Knjigovodstva, +Accounts Missing Error,Greška Nepostojanja Računa, +Accounts Receivable/Payable,Račun Potraživanja/Obveza, +Accounts to Merge,Računi za Spajanje, +Action If Quality Inspection Is Rejected,Radnja ako je Kontrola Kvaliteta odbijena, +Action If Same Rate is Not Maintained,Radnja ako se Ista Cijena ne Održava, +Action if Same Rate is Not Maintained Throughout Sales Cycle,Radnja ako se ista stopa marže ne održava tokom prodajnog ciklusa, +Active Status,Aktivan status, +Actual Balance Qty,Stvarni Saldo Količinski, +Actual Expense,Stvarni Trošak, +Actual Posting,Stvarno Knjiženje, +Actual Qty in Warehouse,Stvarna Količina u Skladištu, +Actual Time,Stvarno Vrijeme, +Add Columns in Transaction Currency,Dodaj Kolone u Valuti Transakcije, +Add Corrective Operation Cost in Finished Good Valuation,Dodaj korektivne operativne troškove u Vrijednovanje Gotovog Proizvoda, +Add Discount,Dodaj popust, +Add Items in the Purpose Table,Dodaj Artikle u Tabelu Namjena, +Add Lead to Prospect,Dodaj potencijalnog u izglednog kupca, +Add Local Holidays,Dodaj lokalne praznike, +Add Manually,Dodaj ručno, +Add Or Deduct,Dodaj ili oduzmi, +Add Serial / Batch Bundle,Dodaj Serijski / Šaržni Paket, +Add Serial / Batch No,Dodaj Serijski / Šaržni Broj, +Add Serial / Batch No (Rejected Qty),Dodaj Serijski / Šaržni Broj (Odbijena Količina), +Add Stock,Dodaj zalihe, +Add Sub Assembly,Dodaj Podsklop, +Add Template,Dodaj šablon, +Add a Note,Dodaj Bilješku, +Add details,Dodaj detalje, +Add to Prospect,Dodaj u Potencijal, +Added By,Dodano Od, +Added On,Dodano, +Added Supplier Role to User {0}.,Dodata uloga dobavljača korisniku {0}., +Added {1} Role to User {0}.,Dodata {1} uloga korisniku {0}., +Adding Lead to Prospect...,Dodavanje potencijalnog u izgledne kupce..., +Additional,Dodatno, +Additional Asset Cost,Dodatni Trošak Imovine, +Additional Cost Per Qty,Dodatni Trošak po Količini, +Additional Data,Dodatni Podaci, +Additional Info,Dodatne informacije, +Address And Contacts,Adrese i Kontakti, +Adjust Asset Value,Uskladi vrijednost imovine, +Adjustment Against,Usaglašavanje Naspram, +Adjustment based on Purchase Invoice rate,Usklađivanje na osnovu stope fakture nabavke, +Advance Account: {0} must be in either customer billing currency: {1} or Company default currency: {2},Račun Predujma: {0} mora biti u valuti fakture klijenta: {1} ili standard valuti kompanije: {2}, +Advance Payment,Predujamska Plaćanja, +Advance Payment Date,Datum Plaćanja Predujma, +Advance Payment Ledger Entry,Unos u Registar Plaćanja Predujma, +Advance Reconciliation Takes Effect On,Usaglašavanje Predujma stupa na snagu, +Advance Tax,Porez Predujma, +Advance Taxes and Charges,Predujam Poreza i Naknada, +Advance paid against {0} {1} cannot be greater than Grand Total {2},Predujam plaćen naspram {0} {1} ne može biti veći od ukupnog iznosa {2}, +Advance payments allocated against orders will only be fetched,Predujam Uplate dodijeljene naspran Naloga biće samo preuzete, +Affected Transactions,Zahvaćene Transakcije, +Against Customer Order {0},Naspram Naloga Klijenta {0}, +Against Supplier Invoice {0},Naspram Fakture Dobavljača {0}, +Against Voucher No,Naspram Verifikata Broj, +Age ({0}),Dob ({0}), +Ageing Range,Raspon starenja, +Agent Busy Message,Agent Zauzet Poruka, +Agent Group,Agent Groupa, +Agent Unavailable Message,Agent Nedostupan Poruka, +Aggregate a group of Items into another Item. This is useful if you are maintaining the stock of the packed items and not the bundled item,"Spakujte grupu artikala u drugu artikal. Ovo je korisno ako održavate zalihe upakovanih artikala, a ne u paketu", +Algorithm,Algoritam, +All Activities,Sve Aktivnosti, +All Activities HTML,Sve Aktivnosti HTML, +All Items,Svi Artikli, +All Sales Transactions can be tagged against multiple Sales Persons so that you can set and monitor targets.,Sve prodajne transakcije mogu se označiti naspram više prodajnih osoba kako biste mogli postaviti i nadzirati ciljeve., +All allocations have been successfully reconciled,Sve dodjele su uspješno usaglašene, +All items have already been received,Svi Artikli su već primljeni, +All items in this document already have a linked Quality Inspection.,Svi Artiklie u ovom dokumentu već imaju povezanu Kontrolu Kvaliteta., +All the Comments and Emails will be copied from one document to another newly created document(Lead -> Opportunity -> Quotation) throughout the CRM documents.,Svi komentari i e-pošta kopirat će se iz jednog dokumenta u drugi novostvoreni dokument (Potencijalni Klijent -> Prilika-> Ponuda) kroz dokumente Prodajne Podrške., +"All the required items (raw materials) will be fetched from BOM and populated in this table. Here you can also change the Source Warehouse for any item. And during the production, you can track transferred raw materials from this table.",Svi obavezni Artikli (sirovine) bit će preuzeti iz Sastavnice i popunjene u ovoj tabeli. Ovdje također možete promijeniti izvorno skladište za bilo koji artikal. A tokom proizvodnje možete pratiti prenesene sirovine iz ove tabele., +Allocate Payment Request,Dodijeli zahtjev za plaćanje, +Allocated Entries,Dodijeljeni Unosi, +Allocated To:,Alocirano:, +Allocations,Dodjele, +Allow,Dozvoli, +Allow Alternative Item must be checked on Item {},Dozvoli Alternativni Artikal mora biti označena za Artikal {}, +Allow Continuous Material Consumption,Dozvoli kontinuiranu potrošnju materijala, +Allow Excess Material Transfer,Dozvoli Prijenos Viška Materijala, +Allow Internal Transfers at Arm's Length Price,Dozvoli interne transfere po tržišnoj cijeni, +Allow Item to be Added Multiple Times in a Transaction,Dozvolite da se Artikal doda više puta u transakciji, +Allow Lead Duplication based on Emails,Dozvolite dupliciranje Potencijalnih Klijenata na osnovu e-pošte, +Allow Negative rates for Items,Dozvolite negativne cijene za Artikle, +Allow Or Restrict Dimension,Dozvoli ili ograniči dimenziju, +Allow Partial Reservation,Dozvoli Djelimičnu Rezervaciju, +Allow Purchase,Dozvoli Kupovinu, +Allow Sales,Dozvoli Prodaju, +Allow Sales Order Creation For Expired Quotation,Dozvoli Kreiranje Prodajnog Naloga za Isteklu Ponudu, +Allow UOM with Conversion Rate Defined in Item,Dozvoli Jedinicu sa stopom konverzije definiranom u Postavkama Artikla, +Allow User to Edit Discount,Dozvoli Korisniku da Uređuje Popust, +Allow User to Edit Rate,Dozvoli Korisniku da Uređuje Cijenu, +Allow Zero Rate,Dozvoli Nultu Cijenu, +Allow existing Serial No to be Manufactured/Received again,Dozvoli da se postojeći serijski broj ponovo Proizvede/Primi, +Allow material consumptions without immediately manufacturing finished goods against a Work Order,Dozvoli potrošnju materijala bez trenutne proizvodnje gotovog proizvoda naspram Radnom Nalogu, +Allow multi-currency invoices against single party account ,Dozvoli viševalutne fakture naspram računa jedne stranke , +Allow to Edit Stock UOM Qty for Purchase Documents,Dozvoli Uređivanje Količine Jedinice Zaliha za Dokumente Kupovine, +Allow to Edit Stock UOM Qty for Sales Documents,Dozvoli Uređivanje Količine Jedinice Zaliha za Dokumente Prodaje, +Allow transferring raw materials even after the Required Quantity is fulfilled,Dozvoli prijenos sirovina i nakon što je ispunjena Potrebna Količina, +Allowed,Dozvoljeno, +Allowed Dimension,Dozvoljena dimenzija, +Allowed Doctypes,Dozvoljeni Tipovi Dokumenata, +Allowed Items,Dozvoljeni Artikli, +Allowed primary roles are 'Customer' and 'Supplier'. Please select one of these roles only.,Dozvoljene primarne uloge su 'Klijent' i 'Dobavljač'. Molimo odaberite samo jednu od ovih uloga., +Allows to keep aside a specific quantity of inventory for a particular order.,Omogućava zadržavanje određene količine zaliha za određeni Prodajni Nalog., +Already Picked,Već odabrano, +Alternative Items,Alternativni Artikli, +"Alternatively, you can download the template and fill your data in.","Alternativno, možete preuzeti šablon i popuniti svoje podatke.", +Amount (AED),Iznos (AED), +Amount Difference with Purchase Invoice,Razlika u Iznosu naspram Kupovne Fakture, +Amount Eligible for Commission,Iznos prihvatljiv za Proviziju, +Amount in Account Currency,Iznos u Valuti Računa, +Amount in Words,Iznos U Riječima, +Amount in party's bank account currency,Iznos u valuti bankovnog računa stranke, +Amount in transaction currency,Iznos u valuti transakcije, +Amounts,Iznosi, +An Item Group is a way to classify items based on types.,Grupa Artikla je način za klasifikaciju Artikala na osnovu tipa., +An error has been appeared while reposting item valuation via {0},Pojavila se greška prilikom ponovnog knjiženja vrijednosti artikla preko {0}, +Annual Revenue,Godišnji Promet, +"Another Cost Center Allocation record {0} applicable from {1}, hence this allocation will be applicable upto {2}","Drugi zapis dodjele Centra Troškova {0} primjenjiv od {1}, stoga će ova dodjela biti primjenjiva do {2}", +Another Payment Request is already processed,Drugi Zahtjev za Plaćanje je već obrađen, +"Any one of following filters required: warehouse, Item Code, Item Group","Potreban je bilo koji od sljedećih filtera: Skladište, Kod Artikla, Grupa Artikla", +Applicable Dimension,Primjenjiva Dimenzija, +Applicable On Account,Primjenjivo na Račun, +Applied on each reading.,Primjenjuje se na svako čitanje., +Applied putaway rules.,Primijenjena pravila odlaganja., +Applies To,Primjenjuje se na, +Apply Putaway Rule,Primijenite pravilo odlaganja, +Apply Recursion Over (As Per Transaction UOM),Primijeni Rekurziju preko (prema Transakcijskoj Jedinici), +Apply SLA for Resolution Time,Primijeni Ugovor o Nivou Usluge za vrijeme rješavanja, +Apply TDS,Primijeni TDS, +Apply Tax Withholding Amount ,Primijeni Pdv iznos po Odbitku , +Apply restriction on dimension values,Primijeni ograničenje na vrijednosti dimenzije, +Apply to All Inventory Documents,Primijeniti na sve Dokumente Zaliha, +Apply to Document,Primijeniti na Dokument, +Appointment Created Successfully,Termin je uspješno zakazan, +Appointment Scheduling Disabled,Zakazivanje Termina Onemogućeno, +Appointment Scheduling has been disabled for this site,Zakazivanje termina je onemogućeno za ovu stranicu, +Appointment was created. But no lead was found. Please check the email to confirm,Termin je kreiran. Ali Potencijalni Klijent nije pronađen. Provjeri e-poštu da potvrdite, +Approximately match the description/party name against parties,Približno podudaranje opisu/nazivu stranke aspram stranki, +Are you sure you want to clear all demo data?,Jeste li sigurni da želite izbrisati sve demo podatke?, +Are you sure you want to delete this Item?,Jeste li sigurni da želite izbrisati ovaj Artikal?, +Are you sure you want to delete {0}?

This action will also delete all associated Common Code documents.

,Jeste li sigurni da želite izbrisati {0}?

Ova radnja će također izbrisati sve povezane Zajedničke Kod dokumente.

, +Are you sure you want to restart this subscription?,Jeste li sigurni da želite ponovo pokrenuti ovu pretplatu?, +As on Date,Kao na Datum, +"As there are existing submitted transactions against item {0}, you can not change the value of {1}.","Pošto postoje postojeće podnešene transakcije naspram artikla {0}, ne možete promijeniti vrijednost {1}.", +"As there are negative stock, you can not enable {0}.","Pošto postoje negativne zalihe, ne možete omogućiti {0}.", +"As there are reserved stock, you cannot disable {0}.","Pošto postoje rezervisane zalihe, ne možete onemogućiti {0}.", +"As there are sufficient Sub Assembly Items, Work Order is not required for Warehouse {0}.","Pošto ima dovoljno artikala podsklopa, radni nalog nije potreban za Skladište {0}.", +"As {0} is enabled, you can not enable {1}.","Pošto je {0} omogućen, ne možete omogućiti {1}.", +Assembly Items,Artikli za Motiranje, +Asset Activity,Aktivnost Imovine, +Asset Capitalization,Kapitalizacija Imovine, +Asset Capitalization Asset Item,Kapitalizacija Imovine Artikal Imovine, +Asset Capitalization Service Item,Kapitalizacije Imovine Servisni Artikal, +Asset Capitalization Stock Item,Kapitalizacija Imovine Artikal Zalihe, +Asset Depreciation Details,Detalji Amortizacije Imovine, +Asset Depreciation Schedule,Raspored Amortizacije Imovine, +Asset Depreciation Schedule for Asset {0} and Finance Book {1} is not using shift based depreciation,Raspored Amortizacije Imovine {0} i Finansijski Registar {1} ne koristi amortizaciju zasnovanu na smjenama, +Asset Depreciation Schedule not found for Asset {0} and Finance Book {1},Raspored amortizacije imovine nije pronađen za Imovinu {0} i Finansijski Registar {1}, +Asset Depreciation Schedule {0} for Asset {1} already exists.,Raspored Amortizacije Imovine {0} za Imovinu {1} već postoji., +Asset Depreciation Schedule {0} for Asset {1} and Finance Book {2} already exists.,Raspored Amortizacije Imovine {0} za Imovinu {1} i Finansijski Registar {2} već postoji., +"Asset Depreciation Schedules created:
{0}

Please check, edit if needed, and submit the Asset.","Kreirani Rasporedi Amortizacije Imovine:
{0}

Molimo provjerite, uredite ako je potrebno i pošaljite Imovinu.", +Asset ID,ID Imovine, +Asset Quantity,Količina Imovine, +Asset Repair Consumed Item,Potrošeni artikal za popravku imovine, +Asset Settings,Postavke Imovine, +Asset Shift Allocation,Raspodjela Imovine po Smjeni, +Asset Shift Factor,Faktor Smjene Imovine, +Asset Shift Factor {0} is set as default currently. Please change it first.,Faktor smjene imovine {0} je trenutno postavljen kao standard. Prvo ga promijenite., +Asset cancelled,Imovina otkazana, +Asset capitalized after Asset Capitalization {0} was submitted,Imovina kapitalizirana nakon podnošenja Kapitalizacije Imovine {0}, +Asset created,Imovina kreirana, +Asset created after Asset Capitalization {0} was submitted,Imovina kreirana nakon podnošenja Kapitalizacije Imovine {0}, +Asset created after being split from Asset {0},Imovina kreirana nakon odvajanja od imovine {0}, +Asset deleted,Imovina izbrisana, +Asset issued to Employee {0},Imovina izdata {0}, +Asset out of order due to Asset Repair {0},Imovina nije u funkciji zbog popravke imovine {0}, +Asset received at Location {0} and issued to Employee {1},Imovina primljena u {0} i izdata {1}, +Asset restored,Imovina vraćena, +Asset restored after Asset Capitalization {0} was cancelled,Imovina vraćena nakon što je kapitalizacija imovine {0} otkazana, +Asset returned,Imovina vraćena, +Asset scrapped,Imovina rashodovana, +Asset sold,Imovina prodata, +Asset submitted,Imovina Podnešena, +Asset transferred to Location {0},Imovina prebačena na lokaciju {0}, +Asset updated after being split into Asset {0},Imovina je ažurirana nakon što je podijeljena na Imovinu {0}, +Asset updated after cancellation of Asset Repair {0},Imovina ažurirana nakon otkazivanja popravke imovine {0}, +Asset updated after completion of Asset Repair {0},Imovina ažurirana nakon završetka popravke imovine {0}, +Asset {0} cannot be received at a location and given to an employee in a single movement,Imovina {0} ne može se primiti na lokaciji i dati zaposleniku u jednom pokretu, +Asset {0} does not belong to Item {1},Imovina {0} ne pripada Artiklu {1}, +Asset {0} does not exist,Imovina {0} ne postoji, +Asset {0} has been created. Please set the depreciation details if any and submit it.,Imovina {0} je kreirana. Postavi detalje amortizacije ako ih ima i podnesi., +Asset {0} has been updated. Please set the depreciation details if any and submit it.,Imovina {0} je ažurirana. Postavi detalje amortizacije ako ih ima i podnesi., +Asset's depreciation schedule updated after Asset Shift Allocation {0},Raspored Amortizacije Imovine ažuriran nakon alokacije Imovine {0}, +Asset's value adjusted after cancellation of Asset Value Adjustment {0},Vrijednost Imovine prilagođena nakon otkazivanja Ispravke Vrijednosti Imovine {0}, +Asset's value adjusted after submission of Asset Value Adjustment {0},Vrijednost imovine prilagođena nakon podnošenja Ispravke Vrijednosti Imovine {0}, +Assign Job to Employee,Dodijeli Posao Personalu, +Assignment,Dodjela, +Assignment Conditions,Uslovi Dodjele, +At Row #{0}: The picked quantity {1} for the item {2} is greater than available stock {3} for the batch {4} in the warehouse {5}. Please restock the item.,Red #{0}: Izabrana količina {1} za artikl {2} je veća od raspoloživih zaliha {3} za šaržu {4} u skladištu {5}. Popunite zalihu artikla., +At Row #{0}: The picked quantity {1} for the item {2} is greater than available stock {3} in the warehouse {4}.,Red #{0}: Izabrana količina {1} za artikal {2} je veća od raspoloživih zaliha {3} u skladištu {4}., +At least one account with exchange gain or loss is required,Najmanje jedan račun sa dobitkom ili gubitkom na kursu je obavezan, +At row {0}: Batch No is mandatory for Item {1},Red {0}: Broj Šarće je obavezan za Artikal {1}, +At row {0}: Parent Row No cannot be set for item {1},Red {0}: Nadređeni Redni Broj ne može se postaviti za artikal {1}, +At row {0}: Qty is mandatory for the batch {1},Red {0}: Količina je obavezna za Šaržu {1}, +At row {0}: Serial No is mandatory for Item {1},Red {0}: Serijski Broj je obavezan za Artikal {1}, +At row {0}: Serial and Batch Bundle {1} has already created. Please remove the values from the serial no or batch no fields.,Red {0}: Serijski i Šaržni Paket {1} je već kreiran. Molimo uklonite vrijednosti iz polja serijski broj ili šarža., +At row {0}: set Parent Row No for item {1},Red {0}: postavite Nadređeni Redni Broj za Artikal {1}, +Attach CSV File,Priloži CSV datoteku, +Attendance & Leaves,Prisustvo & Odsustvo, +Attribute value: {0} must appear only once,Vrijednost Atributa: {0} se mora pojaviti samo jednom, +Auto Create Exchange Rate Revaluation,Automatsko Kreiranje Revalorizacije Deviznog Kursa, +Auto Create Purchase Receipt,Automatsko Kreiranje Kupovnog Naloga, +Auto Create Serial and Batch Bundle For Outward,Automatsko Kreiranje Serijskog i Šarža paketa za Dostavu, +Auto Create Subcontracting Order,Automatsko Kreiranje Podugovornog Naloga, +Auto Created Serial and Batch Bundle,Automatski kreirani Serijski i Šaržni Paket, +Auto Creation of Contact,Automatsko kreiranje kontakta, +Auto Email Report,Automatski izvještaj e-poštom, +Auto Fetch Serial Numbers,Automatski Preuzmi Serijske Brojeve, +Auto Insert Item Price If Missing,Automatsko stavljanje cijene artikla ako nedostaje, +Auto Name,Automatski naziv, +Auto Reconcile,Automatski Usaglasi, +Auto Reconcile Payments,Automatski Usaglasi Plaćanja, +Auto Reconciliation,Automatsko Usaglašavanje, +Auto Reconciliation Job Trigger,Okidač Posla Automatskog Usaglašavanja, +Auto Reconciliation has started in the background,Automatsko Usaglašavanje je počelo u pozadini, +Auto Reconciliation of Payments has been disabled. Enable it through {0},Automatsko Usglašavanje Plaćanja je onemogućeno. Omogući preko {0}, +Auto Reserve Serial and Batch Nos,Automatski Rezerviši Serijski i Šaržni Broj, +Auto Reserve Stock for Sales Order on Purchase,Automatski Rezerviši Zalihu za Prodajni Nalog pri Kupovini, +Auto close Opportunity Replied after the no. of days mentioned above,Automatski zatvori Odgovoran na Mogućnost nakon broja gore navedenih dana, +Auto match and set the Party in Bank Transactions,Automatsko poravnanje i postavljanje Stranke u Bankovnim Transakcijama, +Auto write off precision loss while consolidation,Automatski otpiši gubitke preciznosti tokom konsolidacije, +Automatically Add Filtered Item To Cart,Automatski dodaj filtrirani Artikal u Korpu, +Automatically Fetch Payment Terms from Order,Automatski Preuzmi Uslove Plaćanja iz Naloga, +Automatically post balancing accounting entry,Automatski knjiži unos obračunskog stanja, +Available Batch Report,Dostupni Izvještaj o Šarži, +Available Qty For Consumption,Dostupna količina za Potrošnju, +Available Qty at Company,Dostupna količina u Kompaniji, +Available Qty at Target Warehouse,Dostupna količina u Izabranom Skladištu, +Available Qty to Reserve,Dostupna količina za Rezervisanje, +Average Completion,Prosječan završetak, +Avg Rate,Prosječna Cijena, +Avg Rate (Balance Stock),Prosječna Cijena (Stanje Zaliha), +BFS,Polovi Kjnigovodstveni Izvod, +BIN Qty,Skladišna Količina, +BOM Created,Sastavnica Kreirana, +BOM Creator,Konstruktor Sastavnice, +BOM Creator Item,Artikal Sastavnice Konstruktora, +BOM Info,Informacija Sastavnice, +BOM Level,Nivo Sastavnice, +BOM Tree,Stablo Sastavnice, +BOM UoM,Jedinica Sastavnice, +BOM Update Batch,Sastavnica Ažurira Šaržu, +BOM Update Initiated,Pokrenuto Ažuriranje Sastavnice, +BOM Update Log,Zapisnik Ažuriranja Sastavnice, +BOM Update Tool Log with job status maintained,Zapisnik Alata Ažuriranja Sastavnice sa očuvanim statusom posla, +BOM Updation already in progress. Please wait until {0} is complete.,Ažuriranje Sastavnica je već u toku. Pričekaj dok {0} ne završi., +BOM Updation is queued and may take a few minutes. Check {0} for progress.,Ažuriranje Sastavnice je na čekanju i može potrajati nekoliko minuta. Provjeri {0} za napredak., +BOM and Production,Sastavnica & Proizvodnja, +BOM recursion: {1} cannot be parent or child of {0},Rekurzija Sastavnice: {1} ne može biti nadređena ili podređena {0}, +BOMs Updated,Sastavnice Ažurirane, +BOMs created successfully,Sastavnice su uspješno kreirane, +BOMs creation failed,Kreiranje Sastavnica nije uspjelo, +"BOMs creation has been enqueued, kindly check the status after some time","Kreiranje Sastavnica je u redu, provjeri status nakon nekog vremena", +Balance Qty (Stock),Količinsko Stanja (Zaliha), +Balance Sheet Summary,Sažetak Bilansa Stanja, +Balance Stock Value,Vrijednost Količinskog Stanja, +Bank Account {} in Bank Transaction {} is not matching with Bank Account {},Bankovni račun {} u bankovnoj transakciji {} se ne podudara s bankovnim računom {}, +Bank Reconciliation Tool,Bankovni Alat Usaglašavanja, +Bank Statement Import,Uvoz Bankovnog Izvoda, +Bank Transaction {0} Matched,Bankovna Transakcija {0} Usaglašena, +Bank Transaction {0} added as Journal Entry,Bankovna Transakcija {0} dodana je kao Nalog Knjiženja, +Bank Transaction {0} added as Payment Entry,Bankovna Transakcija {0} dodana je kao Unos Plaćanja, +Bank Transaction {0} is already fully reconciled,Bankovna Transakcija {0} je već u potpunosti usaglašena, +Bank Transaction {0} updated,Bankovna Transakcija {0} ažurirana, +Bank/Cash Account,Bankovni/Gotovinski Račun, +Bank/Cash Account {0} doesn't belong to company {1},Bankovni/Gotovinski Račun {0} ne pripada kompaniji {1}, +Base Amount,Osnovni Iznos, +Base Cost Per Unit,Osnovni Trošak po Jedinici, +Base Rate,Osnovna Cijena, +Base Tax Withholding Net Total,Neto ukupni PDV po odbitku, +Base Total,Osnovni Ukupni Iznos, +Base Total Billable Amount,Osnovni ukupan iznos za Fakturisanje, +Base Total Billed Amount,Osnovni ukupan Fakturisan iznos, +Base Total Costing Amount,Osnovni Ukupni Obraöunati Iznos, +Based On Value,Na osnovu Vrijednosti, +"Based on your HR Policy, select your leave allocation period's end date","Na osnovu vaših pravila ljudskih resursa, odaberi datum završetka perioda raspodjele odmora", +"Based on your HR Policy, select your leave allocation period's start date","Na osnovu vaših pravila ljudskih resursa, odaberite datum početka perioda raspodjele odmora", +Batch Expiry Date,Datum isteka roka Šarže, +Batch No is mandatory,Broj Šarže je obavezan, +Batch No {0} does not exists,Broj Šarže {0} ne postoji, +Batch No {0} is linked with Item {1} which has serial no. Please scan serial no instead.,"Broj Šarže {0} je povezan sa artiklom {1} koji ima serijski broj. Umjesto toga, skenirajte serijski broj.", +"Batch No {0} is not present in the original {1} {2}, hence you can't return it against the {1} {2}","Broj Šarže {0} nije prisutan u originalnom {1} {2}, stoga ga ne možete vratiti naspram {1} {2}", +Batch No.,Broj Šarže, +Batch Nos,Broj Šarže, +Batch Nos are created successfully,Brojevi Šarže su uspješno kreirani, +Batch Not Available for Return,Šarža nije dostupna za povrat, +Batch Qty,Količina Šarže, +Batch and Serial No,Šarža i Serijski Broj, +Batch not created for item {} since it does not have a batch series.,Šarža nije kreirana za artikal {} jer nema Šaržu., +Batch {0} and Warehouse,Šarža {0} i Skladište, +Batch {0} is not available in warehouse {1},Šarža {0} nije dostupna u skladištu {1}, +Batchwise Valuation,Vrijednovanje na osnovu Šarže, +Beginning of the current subscription period,Početak trenutnog perioda pretplate, +Below Subscription Plans are of different currency to the party default billing currency/Company currency: {0},Planovi Pretplate u nastavku imaju različite valute u odnosu na standard valutu fakturisanja/valutu kompanije: {0}, +Bill for Rejected Quantity in Purchase Invoice,Faktura za odbijenu količinu na Kupovnoj Fakturi, +Billed Items To Be Received,Fakturisani Artikli koje treba Primiti, +"Billed, Received & Returned","Fakturisano, Primljeno & Vraćeno", +Billing Address Details,Detalji Adrese za Fakturu, +Billing Address does not belong to the {0},Faktura Adresa ne pripada {0}, +Billing Interval in Subscription Plan must be Month to follow calendar months,Faktura Interval u Planu pretplate mora biti Mjesec koji prati kalendarsk mjesec, +Bisect Accounting Statements,Prepolovi Knjigovodstveni Izvještaj, +Bisect Left,Prepolovi Lijevo, +Bisect Nodes,Prepolovi Članove, +Bisect Right,Prepolovi Desno, +Bisecting From,Prepolovi Od, +Bisecting Left ...,Polovim Lijevo..., +Bisecting Right ...,Polovim Desno..., +Bisecting To,Prepolovi Do, +Blanket Order Allowance (%),Ugovorni Nalog Dopuštenje (%), +Bom No,Broj Sastavnice, +Book Advance Payments as Liability option is chosen. Paid From account changed from {0} to {1}.,Knjižena opcija Predujam Uplate je izabrana kao Obaveza. Plaćeno Sa računa promijenjeno iz {0} u {1}., +Book Advance Payments in Separate Party Account,Knjiži Predujam Uplate na posebnom računu, +Book Tax Loss on Early Payment Discount,Proknjiži porezni gubitak na popust za prijevremeno plaćanje, +Book an appointment,Zakaži Termin, +Booking stock value across multiple accounts will make it harder to track stock and account value.,Knjiženje vrijednosti zaliha na više računa će otežati praćenje zaliha i vrijednosti računa., +Books have been closed till the period ending on {0},Knjigovodstvo je zatvoreno do perioda koji se završava {0}, +Both Payable Account: {0} and Advance Account: {1} must be of same currency for company: {2},Račun Obaveza: {0} i Račun Predujma: {1} moraju biti u istoj valuti za kompaniju: {2}, +Both Receivable Account: {0} and Advance Account: {1} must be of same currency for company: {2},Račun Prihoda: {0} i Račun Predujma: {1} moraju biti u istoj valuti za kompaniju: {2}, +Both {0} Account: {1} and Advance Account: {2} must be of same currency for company: {3},{0} Račun: {1} i Račun Predujma: {2} moraju biti u istoj valuti za kompaniju: {3}, +Budget Exceeded,Budžet Premašen, +Build All?,Kompiliraj Sve?, +Build Tree,Ažuriraj Stablo, +Buildable Qty,Količina za Proizvodnju, +Bulk Transaction Log,Zapisnik Masovnih Transakcija, +Bulk Transaction Log Detail,Zapisnik Detalja Masovnih Transakcija, +Bulk Update,Masovno Ažuriranje, +Bundle Items,Paketiraj Artikle, +Buying & Selling Settings,Postavke Kupovine & Prodaje, +Buying and Selling,Kupovina & Prodaja, +"By default, the Supplier Name is set as per the Supplier Name entered. If you want Suppliers to be named by a Naming Series choose the 'Naming Series' option.","Prema standard postavkama, Ime dobavljača je postavljeno prema unesenom imenu dobavljača. Ako želite da dobavljači budu imenovani po Imenovanje Serije odaberi opciju 'Imenovanje Serije'.", +Bypass credit check at Sales Order,Zaobiđite provjeru kreditne sposobnosti kod Prodajnog Naloga, +CANCELLED,OTKAZANO, +CC,Kopija, +CODE-39,KOD-39, +COGS By Item Group,Troškovi izrade prema Arikal Grupi, +COGS Debit,Troškovi izrade Debit, +CRM Note,Napomena Prodajne Podrške, +CRM Settings,Postavke Prodajne Podrške, +Calculate Product Bundle Price based on Child Items' Rates,Obračunaj Cijenu Paketa Proizvoda na osnovu cijena Podređenih Artikala, +Calculate daily depreciation using total days in depreciation period,Izračunaj dnevnu amortizaciju koristeći sve dane u periodu amortizacije, +Call Again,Pozovi ponovo, +Call Ended,Poziv je završen, +Call Handling Schedule,Raspored obrade poziva, +Call Received By,Poziv Primljen Od, +Call Receiving Device,Uređaj za primanje poziva, +Call Routing,Usmjeravanje Poziva, +Call Schedule Row {0}: To time slot should always be ahead of From time slot.,Raspored Poziva Red{0}: Vremenski Do termin uvek treba da bude ispred vremenskog Od termina., +Call Type,Tip poziva, +Callback,Povratni Poziv, +Campaign Item,Artikal Kampanje, +Can not close Work Order. Since {0} Job Cards are in Work In Progress state.,Ne mogu zatvoriti Radni Nalog. Budući da su {0} Kartice Poslova u stanju Radovi u Toku., +"Can not filter based on Child Account, if grouped by Account","Ne može se filtrirati na osnovu Podređenog Računa, ako je grupirano prema Računu", +"Can't change the valuation method, as there are transactions against some items which do not have its own valuation method","Ne može se promijeniti način vrijednovanja, jer postoje transakcije naspram nekih artikala koji nemaju svoj metod vrijednovanja", +Cannot Merge,Nije moguće spojiti, +Cannot Resubmit Ledger entries for vouchers in Closed fiscal year.,Nije moguće ponovo dostaviti unose u Registar za verifikate u završenoj Fiskalnoj Godini., +"Cannot amend {0} {1}, please create a new one instead.","Nije moguće izmijeniti {0} {1}, umjesto toga kreirajte novi.", +Cannot apply TDS against multiple parties in one entry,Ne može se primijeniti TDS naspram više strana u jednom unosu, +Cannot cancel as processing of cancelled documents is pending.,Nije moguće otkazati jer je obrada otkazanih dokumenata na čekanju., +Cannot cancel the transaction. Reposting of item valuation on submission is not completed yet.,Nije moguće otkazati transakciju. Ponovno knjiženje procjene vrijednosti artikla prilikom podnošenja još nije završeno., +Cannot change Reference Document Type.,Nije moguće promijeniti tip referentnog dokumenta., +Cannot complete task {0} as its dependant task {1} are not completed / cancelled.,Ne može završiti zadatak {0} jer njegov zavisni zadatak {1} nije dovršen/poništen., +Cannot convert Task to non-group because the following child Tasks exist: {0}.,Nije moguće pretvoriti Zadatak u negrupni jer postoje sljedeći podređeni Zadaci: {0}., +Cannot convert to Group because Account Type is selected.,Nije moguće pretvoriti u Grupu jer je odabran Tip Računa., +Cannot create Stock Reservation Entries for future dated Purchase Receipts.,Nije moguće kreirati Unose Rezervisanja Zaliha za buduće datume Kupovnih Priznanica., +Cannot create a pick list for Sales Order {0} because it has reserved stock. Please unreserve the stock in order to create a pick list.,Nije moguće kreirati Listu Odabira za Prodajni Nalog {0} jer ima rezervisane zalihe. Poništi rezervacije zaliha kako biste kreirali Listu Odabira., +Cannot create accounting entries against disabled accounts: {0},Nije moguće kreirati knjigovodstvene unose naspram onemogućenih računa: {0}, +Cannot delete Exchange Gain/Loss row,Nije moguće izbrisati red Dobitka/Gubitka Deviznog Kursa, +Cannot enqueue multi docs for one company. {0} is already queued/running for company: {1},Nije moguće staviti u red više dokumenata za jednu kompaniju. {0} je već u redu čekanja/pokreće se za kompaniju: {1}, +Cannot find a default warehouse for item {0}. Please set one in the Item Master or in Stock Settings.,Ne može se pronaći zadano skladište za artikal {0}. Molimo vas da postavite jedan u Postavke Artikla ili u Postavke Zaliha., +Cannot make any transactions until the deletion job is completed,Ne mogu se izvršiti nikakve transakcije dok se posao brisanja ne završi, +Cannot produce more item for {0},Ne može se proizvesti više artikala za {0}, +Cannot produce more than {0} items for {1},Ne može se proizvesti više od {0} artikla za {1}, +Cannot receive from customer against negative outstanding,Ne može se primiti od klijenta naspram negativnog nepodmirenog, +Cannot retrieve link token for update. Check Error Log for more information,Nije moguće preuzeti oznaku veze za ažuriranje. Provjerite zapisnik grešaka za više informacija, +Cannot retrieve link token. Check Error Log for more information,Nije moguće preuzeti oznaku veze. Provjerite zapisnik grešaka za više informacija, +Cannot {0} from {1} without any negative outstanding invoice,Ne može se {0} od {1} bez negativne nepodmirene fakture, +Canonical URI,Kanonski URI, +Capacity (Stock UOM),Kapacitet (Jedinica Zaliha), +Capacity in Stock UOM,Kapacitet u Jedinici Zaliha, +Capacity must be greater than 0,Kapacitet mora biti veći od 0, +Capitalization Method,Metoda Kapitalizacije, +Capitalize Asset,Kapitalizacija Imovine, +Capitalize Repair Cost,Kapitaliziraj Troškove Popravke, +Capitalized,Aktiviran, +Carrier,Dostavljač, +Carrier Service,Servis Dostavljača, +Carry Forward Communication and Comments,Prenesi Konverzaciju i Komentare, +Category Details,Detalji o Kategoriji, +Caution: This might alter frozen accounts.,Oprez: Ovo može promijeniti zamrznute račune., +Change in Stock Value,Promjena Vrijednosti Zaliha, +Changed customer name to '{}' as '{}' already exists.,Ime klijenta je promijenjeno u '{}' jer '{}' već postoji., +Changes,Promjene, +Charge of type 'Actual' in row {0} cannot be included in Item Rate or Paid Amount,Naknada tipa 'Stvarni' u redu {0} ne može se uključiti u Cijenu Artikla ili Plaćeni Iznos, +Chart Of Accounts,Kontni Plan, +Checked On,Kontrolisano, +Checking this will round off the tax amount to the nearest integer,Odabir ovoga će zaokružiti iznos PDV na najbliži cijeli broj, +Cheques and Deposits Incorrectly cleared,Čekovi i Depoziti neispravno poravnati, +Child Row Reference,Referenca za Podređeni Red, +Choose a WIP composite asset,Odaberi Posao u Toku Objedinjenu Imovinu, +Clear Demo Data,Obriši Demo Podatke, +Clear Notifications,Obriši Obavještenja, +Clearing Demo Data...,Brisanje Demo Podataka..., +Click on 'Get Finished Goods for Manufacture' to fetch the items from the above Sales Orders. Items only for which a BOM is present will be fetched.,Kliknite na 'Preuzmite Gotov Artikal za Proizvodnju' da preuzmete artikle iz gornjih Prodajnih Naloga. Preuzet će se samo artikli za koje postoji Sastavnica., +Click on Add to Holidays. This will populate the holidays table with all the dates that fall on the selected weekly off. Repeat the process for populating the dates for all your weekly holidays,Kliknite na Dodaj Praznicima. Ovo će popuniti tabelu praznika sa svim datumima koji padaju na odabrani slobodan sedmični dan. Ponovite postupak za popunjavanje datuma za sve vaše sedmićne praznike, +Click on Get Sales Orders to fetch sales orders based on the above filters.,Kliknite na Preuzmi Prodajne Naloge da preuzmete prodajne naloge na osnovu gornjih filtera., +Click to add email / phone,Kliknite da dodate e-poštu / telefon, +Close Replied Opportunity After Days,Zatvori Odgovor na Priliku nakon dana, +Closed Work Order can not be stopped or Re-opened,Zatvoreni Radni Nalog se ne može zaustaviti ili ponovo otvoriti, +Closing,Zatvaranje, +Closing Balance as per Bank Statement,Završno Stanje prema Bankovnom Izvodu, +Closing Balance as per ERP,Završno Stanje prema Sistemu, +Code List,Lista Kodova, +Columns are not according to template. Please compare the uploaded file with standard template,Kolone nisu prema šablonu. Molimo uporedite otpremljenu datoteku sa standardnim šablonom, +Common Code,Zajednički Kod, +Communication Channel,Kanal Konverzacije, +Company Address Display,Prikaz Adrese Kompanije, +Company Billing Address,Faktura Adresa Kompanije, +Company Contact Person,Kontakt Osoba Kompaniju, +Company Details,Detalji o Kompaniji, +Company Shipping Address,Dostavna Adresa Kompanije, +Company Tax ID,Fiskalni Broj Kompanije, +Company and Posting Date is mandatory,Kompanija i Datum Knjiženja su obavezni, +Company is mandatory,Kompanija je obavezna, +Company is mandatory for generating an invoice. Please set a default company in Global Defaults.,Kompanija je obavezna za generisanje fakture. Molimo postavite standard kompaniju u Globalnim Postavkama., +Company which internal customer represents,Kompanija koju predstavlja interni Klijent, +Company which internal customer represents.,Kompanija koju predstavlja interni Klijent., +Company which internal supplier represents,Kompanija koju predstavlja interni Dobavljač, +Company {0} added multiple times,Kompanija {0} dodana više puta, +Company {0} is added more than once,Kompanija {0} je dodana više puta, +Company {} does not exist yet. Taxes setup aborted.,Kompanija {} još ne postoji. Postavljanje poreza je prekinuto., +Company {} does not match with POS Profile Company {},Kompanija {} se ne podudara s Kasa Profilom Kompanije {}, +Competitor,Konkurent, +Competitor Detail,Detalji o Konkurentu, +Competitor Name,Ime Konkurenta, +Competitors,Konkurenti, +Complete Job,Završi Posao, +Complete Order,Završi Nalog, +Completed On,Završeno, +Completed On cannot be greater than Today,Proizvedeno dana ne može biti kasnije od danas, +Completed Tasks,Prizvodni Zadaci, +Completed Time,Vrijeme Obrade, +Completion Date can not be before Failure Date. Please adjust the dates accordingly.,Datum Završetka ne može biti prije Datuma Kvara. Molimo prilagodite datume prema tome., +Conditional Rule,Uslovno Pravilo, +Conditional Rule Examples,Primjeri Uvjetnih Pravila, +Configure Product Assembly,Konfiguriši Proizvodnju Artikla, +Configure the action to stop the transaction or just warn if the same rate is not maintained.,Konfiguriši akciju za zaustavljanje transakcije ili samo upozorite ako se ista stopa marže ne održava., +Connections,Veze, +Consider Entire Party Ledger Amount,Uzmi u obzir cjelokupni iznos Knjigovodstvenog Registra Stranke, +Consider Minimum Order Qty,Uzmi u obzir Minimalnu Količinu Naloga, +Consider Rejected Warehouses,Uzmi u obzir Odbijena Skladišta, +Considered In Paid Amount,Uzmi u obzir Uplaćeni Iznos, +Consolidate Sales Order Items,Objedini Artikle Prodajnog Naloga, +Consolidate Sub Assembly Items,Objedini Artikle Podsklopa, +Consumed Asset Total Value,Ukupna vrijednost Potrošene Imovine, +Consumed Assets,Potrošena Imovina, +Consumed Quantity,Potrošena Količina, +Consumed Stock Items,Potrošeni Artikli Zaliha, +Consumed Stock Items or Consumed Asset Items are mandatory for creating new composite asset,Potrošeni Artikli Zalihe ili Potrošeni Artikli Imovine su obavezni za kreiranje nove objedinjene imovine, +"Consumed Stock Items, Consumed Asset Items or Consumed Service Items is mandatory for Capitalization","Potrošeni Artikli Zalihe, Potrošene Artikli Imovine ili Potrošeni Servisni Artikli su obavezne za Kapitalizaciju", +Consumed Stock Total Value,Ukupna Vrijednost Potrošenih Zaliha, +Consumption Rate,Stopa Potrošnje, +Contact Details,Kontakt Detalji, +Contact Mobile,Mobilni Broj Kontakta, +Contact Person does not belong to the {0},Kontakt Osoba ne pripada {0}, +Contact Us Settings,Postavke Kontaktirajte Nas, +Contacts,Kontakti, +Contract Template Help,Pomoć za Šablon Ugovora, +Contribution Qty,Količinski Doprinos, +Control Historical Stock Transactions,Kontroliši Prijašnje Transakcije Zaliha, +Conversion factor for item {0} has been reset to 1.0 as the uom {1} is same as stock uom {2}.,Faktor pretvaranja za artikal {0} je resetovan na 1.0 jer je jedinica {1} isti kao jedinica zalihe {2}., +Conversion rate cannot be 0,Stopa konverzije ne može biti 0, +"Conversion rate is 1.00, but document currency is different from company currency","Stopa konverzije je 1,00, ali valuta dokumenta se razlikuje od valute kompanije", +Conversion rate must be 1.00 if document currency is same as company currency,"Stopa konverzije mora biti 1,00 ako je valuta dokumenta ista kao valuta kompanije", +Convert Item Description to Clean HTML in Transactions,Pretvori Opis Artikla u čisti HTML u Transakcijama, +Convert to Group,Pretvori u Grupu,Warehouse +Convert to Item Based Reposting,Pretvori u Ponovno Knjiženje na osnovu Artikla, +Convert to Ledger,Pretvori u Registar,Warehouse +Core,Sistem, +Corrective Job Card,Kartica za Korektivni Posao, +Corrective Operation,Korektivna Operacija, +Corrective Operation Cost,Troškovi Korektivne Operacije, +Cost Center Allocation,Dodjela Centra Troškova, +Cost Center Allocation Percentage,Procenat Alokacije Centra Troškova, +Cost Center Allocation Percentages,Procenti Alokacije Centara Troškova, +Cost Center for Item rows has been updated to {0},Centar Troškova za artikal redove je ažuriran na {0}, +"Cost Center is a part of Cost Center Allocation, hence cannot be converted to a group","Centar Troškova je dio dodjele Centra Troškova, stoga se ne može konvertirati u grupu", +Cost Center with Allocation records can not be converted to a group,Centar Troškova sa zapisima dodjele ne može se pretvoriti u grupu, +Cost Center {0} cannot be used for allocation as it is used as main cost center in other allocation record.,Centar Troškova {0} ne može se koristiti za dodjelu jer se koristi kao matični centar troškova u drugom zapisu dodjele., +Cost Center {} doesn't belong to Company {},Centar Troškova {} ne pripada Kompaniji {}, +Cost Center {} is a group cost center and group cost centers cannot be used in transactions,Centar Troškova {} je grupni centar troškova a grupni centri troškova ne mogu se koristiti u transakcijama, +Cost Configuration,Konfiguracija Troškova, +Cost Per Unit,Trošak po Jedinici, +Cost of Poor Quality Report,Izvještaj o Troškovima Lošeg Kvaliteta, +Cost to Company (CTC),Totalni Godišnji Troškovi (CTC), +Costing Details,Detalji Obračuna Troškova, +Could Not Delete Demo Data,Nije moguće izbrisati demo podatke, +Could not auto update shifts. Shift with shift factor {0} needed.,Nije moguće automatsko ažuriranje smjena. Smjena sa faktorom smjene {0} je obavezna., +Could not detect the Company for updating Bank Accounts,Nije moguće otkriti kompaniju za ažuriranje Bankovnih Računa, +Could not find path for ,Nije moguće pronaći put za , +Count,Brojanje, +Create Depreciation Entry,Kreiraj Unos Amortizacije, +Create Employee records.,Kreiraj Personalni Registar, +Create Grouped Asset,Kreiraj Grupiranu Imovinu, +Create Job Card based on Batch Size,Kreiraj Radni Nalog na osnovu veličine Šarže, +Create Journal Entries,Kreiraj Naloge Knjiženja, +Create Ledger Entries for Change Amount,Kreiraj Unose u Registar za Kusur, +Create Link,Kreiraj vezu, +Create Multi-level BOM,Kreiraj višeslojnu Sastavnicu, +Create New Customer,Kreiraj Novog Klijenta, +Create Opportunity,Kreiraj Priliku, +Create Prospect,Kreiraj Prospekt, +Create Reposting Entries,Kreiraj Unose Ponovnog Knjiženja, +Create Reposting Entry,Kreiraj Unos Ponovnog Knjiženja, +Create Stock Entry,Kreiraj unos Zaliha, +Create Workstation,Kreiraj Radnu Stanicu, +Create a new composite asset,Kreiraj novu složenu imovinu, +Create a variant with the template image.,Kreiraj Varijantu sa slikom šablona., +Create in Draft Status,Kreiraj u Statusu Nacrta, +Create {0} {1} ?,Kreiraj {0} {1}?, +Created On,Kreirano, +Created {0} scorecards for {1} between:,Kreirano {0} tablica bodova za {1} između:, +Creating Delivery Note ...,Kreiranje Otpremnice u toku..., +Creating Journal Entries...,Kreiranje Naloga Knjiženja u toku..., +Creating Packing Slip ...,Kreiranje Otpremnice u toku..., +Creating Purchase Invoices ...,Kreiranje Kupovnih Faktura u toku..., +Creating Purchase Receipt ...,Kreiranje Kupovnog Računa u toku..., +Creating Sales Invoices ...,Kreiranje Prodajne Faktura u toku..., +Creating Stock Entry,Kreiranje Unosa Zaliha u toku..., +Creating Subcontracting Order ...,Kreiranje Podugovornog Naloga u toku..., +Creating Subcontracting Receipt ...,Kreiranje Podugovorne Priznanice u toku..., +Creating User...,Kreiranje Korisnika u toku..., +Creation,Kreacija, +Creation of {1}(s) successful,Kreiranje {1}(s) uspješno, +"Creation of {0} failed. + Check Bulk Transaction Log","Kreiranje {0} nije uspjelo. + Provjerite Zapisnik Masovnih Transakcija", +"Creation of {0} partially successful. + Check Bulk Transaction Log","Kreiranje {0} nije uspjelo. + Provjerite Zapisnik Masovnih Transakcija", +Credit (Transaction),Kredit (Transakcija), +Credit Amount in Transaction Currency,Kreditni Iznos u Valuti Transakcije, +Credit Limit Crossed,Kreditno Ograničenje je probijeno, +Credit Limit Settings,Postavke Kreditnog Ograničenja, +"Credit Note will update it's own outstanding amount, even if 'Return Against' is specified.","Kreditna Faktura će ažurirati svoj nepodmireni iznos, čak i ako je navedeno 'Povrat Naspram'.", +Cron Interval should be between 1 and 59 Min,Cron interval bi trebao biti između 1 i 59 min, +Currency Exchange Settings Details,Detalji Postavki Razmjene Valuta, +Currency Exchange Settings Result,Rezultat Postavki Razmjene Valuta, +Current Asset,Trenutna Imovina, +Current Index,Trenutni Index, +Current Level,Trenutni Nivo, +Current Liability,Tekuće Obaveza, +Current Node,Trenutni Čvor, +Current Serial / Batch Bundle,Trenutni Serijski / Šarža Paket, +Custom,Prilagođeno, +Custom delimiters,Prilagođeni Razdjelnici, +Customer ,Klijent , +Customer / Item / Item Group,Klijent / Artikal / Artikal Grupa, +Customer Defaults,Standard Postavke Klijenta, +Customer Group Item,Artikal Grupa Klijenta, +Customer Group: {0} does not exist,Grupa Klijenta: {0} ne postoji, +Customer Item,Artikal Klijenta, +Customer Name: ,Ime Klijenta: , +Customer Portal Users,Korisnici Portala za Korisnike, +Customer: ,Klijent: , +Daily Time to send,Dnevno vrijeme za slanje, +Dashboard,Nadzorna Tabla, +Data Based On,Podatci na osnovu, +Date ,Datum , +Date must be between {0} and {1},Datum mora biti između {0} i {1}, +Dates,Datumi, +Days before the current subscription period,Dana prije trenutnog perioda pretplate, +DeLinked,Odspojen, +Deal Owner,Odgovorni, +Debit (Transaction),Debit (Transakcija), +Debit Amount in Transaction Currency,Debit Iznos u Valuti Transakcije, +"Debit Note will update it's own outstanding amount, even if 'Return Against' is specified.","Debit Faktura će ažurirati svoj nepodmireni iznos, čak i ako je navedeno 'Povrat Naspram'.", +Debit-Credit Mismatch,Debit-Kredit je neusklađeno, +Debit-Credit mismatch,Debit-Kredit je neusklađeno, +Default Advance Account,Standard Račun Predujma, +Default Advance Paid Account,Standard Račun za Predujam Plaćanje, +Default Advance Received Account,Standard Račun za Predujam Plaćanje, +Default BOM not found for FG Item {0},Standard Sastavnica nije pronađena za Artikal Gotovog Proizvoda {0}, +Default Common Code,Standard Zajednički Kod, +Default Discount Account,Standard Račun za Popust, +Default In-Transit Warehouse,Standard Transportno Skladište, +Default Operating Cost Account,Standard Račun Operativnih Troškova, +Default Payment Discount Account,Standard Račun Popusta, +Default Provisional Account,Standard Privremeni Račun, +Default Service Level Agreement for {0} already exists.,Ugovor Standard Nivo Servisa za {0} već postoji., +Default Unit of Measure for Item {0} cannot be changed directly because you have already made some transaction(s) with another UOM. You need to either cancel the linked documents or create a new Item.,Standard Jedinica za artikal {0} ne može se promijeniti direktno jer ste već izvršili neke transakcije sa drugom Jedinicom. Morate ili otkazati povezane dokumente ili kreirati novi artikal., +Default settings for your stock-related transactions,Standard postavke za vaše transakcije vezane za zalihe, +"Default tax templates for sales, purchase and items are created.","Standard šabloni PDV-a za prodaju, kupovinu i artikle su kreirani.", +Deferred Accounting,Odloženo Knjigovodstvo, +Deferred Accounting Defaults,Standard Odloženog Knjigovodstva, +Deferred Revenue and Expense,Odgođeni Prihodi i Rashodi, +Deferred accounting failed for some invoices:,Odgođeno knjigovodstvo nije uspjelo za neke fakture:, +Delay (In Days),Kašnjenje (u danima), +Delayed,Odgođeno, +Delayed Tasks Summary,Sažetak Odgođenih Zadataka, +Delete Accounting and Stock Ledger Entries on deletion of Transaction,Izbriši unose Knjigovodstva i Registra Zaliha pri brisanju Transakcije, +Delete Bins,Izbriši iz Smeća, +Delete Cancelled Ledger Entries,Izbrišite poništene unose iz Registra, +Delete Dimension,Izbriši Dimenziju, +Delete Leads and Addresses,Izriši Potencijalne Klijente i Adrese, +Delete Transactions,Izbriši Transakcije, +Deleted Documents,Izbrisani dokumenti, +Deleting {0} and all associated Common Code documents...,Brisanje {0} u toku i svih povezanih dokumenata Zajedničkog Koda..., +Deletion in Progress!,Brisanje u toku!, +Delimiter options,Opcije Razdjelnika, +Delivery Manager,Upravitelj Dostave, +Delivery Note Packed Item,Paket Artikal Dostavnice, +Delivery User,Korisnik Dostave, +Delivery to,Dostava do, +Demand,Potražnja, +Demo Company,Demo Kompanija, +Demo data cleared,Demo podaci su obrisani, +Dependant SLE Voucher Detail No,Zavisni SLE Verifikat Broj, +Dependent Task {0} is not a Template Task,Zavisni Zadatak {0} nije Šablon Zadatak, +Deposit,Depozit, +Depreciate based on daily pro-rata,Amortizacija na osnovu dnevnih proporcija, +Depreciate based on shifts,Amortizacija na osnovu Smjena, +Depreciation Details,Detalji Amortizacije, +Depreciation Entry Posting Status,Status Knjiženja Unosa Amortizacije, +Depreciation Expense Account should be an Income or Expense Account.,Račun Troškova Amortizacije treba da bude račun Prihoda ili Rashoda., +Depreciation Posting Date cannot be before Available-for-use Date,Datum knjiženja amortizacije ne može biti prije Datuma raspoloživosti za upotrebu, +Depreciation Row {0}: Depreciation Posting Date cannot be before Available-for-use Date,Amortizacija Red {0}: Datum knjiženja amortizacije ne može biti prije datuma raspoloživosti za upotrebu, +Depreciation Schedule View,Pregled Rasporeda Amortizacije, +Depreciation cannot be calculated for fully depreciated assets,Amortizacija se ne može obračunati za potpuno amortizovanu imovinu, +Depreciation eliminated via reversal,Amortizacija eliminirana storniranjem, +Description of Content,Opis Sadržaja, +Desk User,Korisnik Radne Površine, +Difference In,Razlika u, +Difference Posting Date,Datum Knjiženja Razlike, +Difference Qty,Količinska Razlika, +Different 'Source Warehouse' and 'Target Warehouse' can be set for each row.,Za svaki red se mogu postaviti različiti 'Izvorno skladište' i 'Ciljano Skladište'., +Dimension Details,Detalji Dimenzije, +Dimension Filter Help,Pomoć Filter Dimenzije, +Dimension-wise Accounts Balance Report,Izvještaj o stanju računa po dimenzijama, +Dimensions,Dimenzije, +Direct Expense,Direktni Troškak, +Disable Last Purchase Rate,Onemogući posljednju Kupovnu Cijenu, +Disable Serial No And Batch Selector,Onemogući Serijski i Šaržni Odabirač, +Disable auto setting Grand Total to default Payment Mode,Onemogući automatsko postavljanje ukupnog iznosa za standard način plaćanja, +Disabled Account Selected,Odabran je onemogućen Račun, +Disabled Warehouse {0} cannot be used for this transaction.,Onemogućeno Skladište {0} se ne može koristiti za ovu transakciju., +Disabled pricing rules since this {} is an internal transfer,Onemogućena pravila određivanja cijena jer je ovo {} interni prijenos, +Disabled tax included prices since this {} is an internal transfer,Cijene bez PDV budući da je ovo {} interni prijenos, +Disables auto-fetching of existing quantity,Onemogućuje automatsko preuzimanje postojeće količine, +Disassemble,Rastavi, +Disassemble Order,Nalog Rastavljanja, +Discount Account,Račun Popusta, +Discount Date,Datum Popusta, +Discount Settings,Postavke Popusta, +Discount Validity,Valjanost Popusta, +Discount Validity Based On,Valjanost Popusta na osnovu, +Discount cannot be greater than 100%.,Popust ne može biti veći od 100%., +Discount of {} applied as per Payment Term,Popust od {} se primjenjuje prema Uslovima Plaćanja, +Discounted Amount,Iznos Popusta, +"Discounts to be applied in sequential ranges like buy 1 get 1, buy 2 get 2, buy 3 get 3 and so on","Popusti koji se primjenjuju u uzastopnim rasponima kao što je kupiš1 dobiješ 1, kupiš 2 dobiješ 2, kupiš 3 dobiješ 3 i tako dalje", +Discrepancy between General and Payment Ledger,Nesklad između Knjigovodstvenog Registra i Registra Plaćanja, +Dispatch Address,Otpremna Adresa, +Dispatch Address Name,Naziv Otpremne Adrese, +Distinct Item and Warehouse,Posebni Artikal i Skladište, +Distribute Additional Costs Based On ,Raspodijeli dodatne troškove na osnovu , +Distribute Manually,Raspodjeli Ručno, +Do Not Explode,Ne Rastavljati, +Do Not Update Serial / Batch on Creation of Auto Bundle,Ne ažuriraj Serijski / Šaržu pri kreiranju Automatskog Paketa, +Do Not Use Batch-wise Valuation,Ne koristi Šaržno Vrijednovanje, +Do reposting for each Stock Transaction,Uradi Ponovno Knjiženje za svaku transakciju Zaliha, +Do you still want to enable immutable ledger?,Želite li i dalje omogućiti nepromjenjivo knjigovodstvo?, +Do you still want to enable negative inventory?,Želite li i dalje omogućiti negativne zalihe?, +DocField,Dokument Polje, +DocTypes should not be added manually to the 'Excluded DocTypes' table. You are only allowed to remove entries from it.,DocTypes ne treba dodati ručno u tablicu 'Izuzeti DocTypes'. Dozvoljeno vam je samo ukloniti unose iz njega., +Document Type already used as a dimension,Tip dokumenta se već koristi kao dimenzija, +Documents,Dokumenti, +Documents Processed on each trigger. Queue Size should be between 5 and 100,Dokumenti se obrađuju na svakom okidaču. Veličina Reda treba biti između 5 i 100, +Documents: {0} have deferred revenue/expense enabled for them. Cannot repost.,Dokumenti: {0} imaju omogućene odgođene prihode/rashode. Ne mogu ponovo objaviti., +Domain Settings,Postavke Domene, +Don't Enforce Free Item Qty,Ne nameći Besplatnu Količinu Artikla, +Don't Reserve Sales Order Qty on Sales Return,Ne rezerviši Količinu Prodajnog Naloga na povratu Prodaje, +Don't Send Emails,Ne šalji e-poštu, +Dont Recompute tax,Ne obračunavaj ponovo PDV, +Download Backups,Preuzmi Sigurnosne Kopije, +Download CSV Template,Preuzmite CSV Šablon, +Download PDF for Supplier,Preuzmite PDF za Dobavljača, +Dunning Amount (Company Currency),Iznos Opomene (Valuta Kompanije), +Dunning Level,Nivo Opomene, +Duplicate Customer Group,Kopiraj Grupa Klijenta, +Duplicate Finance Book,Kopiraj Finansijski Registar, +Duplicate Item Group,Kopiraj Grupu Artikla, +Duplicate POS Invoices found,Pronađene su kopije Kasa Faktura, +Dynamic Condition,Dinamički Uvjet, +Edit Capacity,Uredi Kapacitet, +Edit Cart,Uredi Korpu, +Edit Full Form,Uredi Punu Formu, +Edit Note,Uredi Bilješku, +Editing {0} is not allowed as per POS Profile settings,Uređivanje {0} nije dozvoljeno prema postavkama profila Kase, +Either 'Selling' or 'Buying' must be selected,Morate odabrati 'Prodaju' ili 'Kupovinu', +Email / Notifications,E-pošta / Obavjesti, +Email Address (required),Adresa E-pošte (obavezno), +"Email Address must be unique, it is already used in {0}","Adresa e-pošte mora biti unikat, već se koristi u {0}", +Email Digest Recipient,Primatelj sažetka e-pošte, +Email Digest: {0},Sažetak e-pošte: {0}, +Email Domain,Domena e-pošte, +Email Receipt,E-pošta, +Email or Phone/Mobile of the Contact are mandatory to continue.,E-pošta ili Telefon/Mobilni Telefon kontakta su obavezni za nastavak., +Email verification failed.,Verifikacija e-pošte nije uspjela., +Employee User Id,Korisnički ID Personala, +Employee {0} is currently working on another workstation. Please assign another employee.,{0} trenutno radi na drugoj radnoj stanici. Dodijeli drugi personal., +Enable Allow Partial Reservation in the Stock Settings to reserve partial stock.,Omogući Dozvoli Djelomičnu Rezervaciju u Postavkama Zaliha da rezervišete djelomične zalihe., +Enable Automatic Party Matching,Omogući Automatsko Poravnanje Stranaka, +Enable Common Party Accounting,Omogući Zajedničko Knjigovodstvo Stranki, +Enable Discount Accounting for Selling,Omogući Knjigovodstvo Prodajnog Popusta, +Enable Fuzzy Matching,Omogući nejasno podudaranje, +Enable Health Monitor,Omogući Nadgledanje Sistema, +Enable Immutable Ledger,Omogući Nepromjenjivo Knjigovodstvo, +Enable Provisional Accounting For Non Stock Items,Omogući Privremeno Knjigovodstvo za Artikle za koje se nevode Zalihe, +Enable Stock Reservation,Omogući Rezervaciju Zaliha, +Enable it if users want to consider rejected materials to dispatch.,Omogući ako korisnici žele da uzmu u obzir odbijene materijale za slanje., +Enable this checkbox even if you want to set the zero priority,Omogući ovo polje ako želite da postavite nulti prioritet, +"Enable this option to calculate daily depreciation by considering the total number of days in the entire depreciation period, (including leap years) while using daily pro-rata based depreciation",Omogući ovu opciju za izračunavanje dnevne amortizacije uzimajući u obzir ukupan broj dana u cijelom periodu amortizacije (uključujući prijestupne godine) dok koristite dnevnu proporcionalnu amortizaciju, +Enable to apply SLA on every {0},Omogući primjenu Standardnog Nivoa Servisa na svaki {0}, +Enabling this ensures each Purchase Invoice has a unique value in Supplier Invoice No. field within a particular fiscal year,Omogućavanje ovoga osigurava da svaka Kupovna Faktura ima jedinstvenu vrijednost u polju Broj Fakture Dobavljača unutar određene fiskalne godine, +Enabling this option will allow you to record -

1. Advances Received in a Liability Account instead of the Asset Account

2. Advances Paid in an Asset Account instead of the Liability Account,Omogućavanje ove opcije omogućit će vam zapisivanje -

1. Predujam primljen na Račun Obaveza umjesto na Račun Imovine

2. Predujam uplaćen na Račun Imovine umjesto na Račun Obaveza, +Enabling this will allow creation of multi-currency invoices against single party account in company currency,Omogućavanje će omogućiti kreiranje viševalutnih faktura naspram računa jedne stranke u valuti kompanije, +Enabling this will change the way how cancelled transactions are handled.,"Omogući, promijenit će se način na koji se postupa s otkazanim transakcijama.", +End Transit,Završi Tranzit, +End of the current subscription period,Kraj trenutnog perioda pretplate, +"Enter First and Last name of Employee, based on Which Full Name will be updated. IN transactions, it will be Full Name which will be fetched.","Unesi ime i prezime zaposlenog, na osnovu koje puno ime će biti ažurirano. U transakcijama, to će biti puno ime koje će se preuzeti.", +Enter Manually,Unesi Ručno, +Enter Serial Nos,Unesi Serijske Brojeve, +Enter Visit Details,Unesi Detalje Posjete, +Enter a name for Routing.,Unesi Naziv za Redoslijed Operacija., +"Enter a name for the Operation, for example, Cutting.","Unesi naziv za Operaciju, na primjer, Rezanje.", +Enter a name for this Holiday List.,Unesi naziv za ovu Listu Praznika., +"Enter an Item Code, the name will be auto-filled the same as Item Code on clicking inside the Item Name field.","Unesi Kod Artikla, ime će se automatski popuniti isto kao kod artikla kada kliknete unutar polja Naziv Artikla.", +Enter each serial no in a new line,Unesi svaki serijski broj u novi red, +"Enter the Operation, the table will fetch the Operation details like Hourly Rate, Workstation automatically. + + After that, set the Operation Time in minutes and the table will calculate the Operation Costs based on the Hourly Rate and Operation Time.","Unesi Operaciju, tabela će automatski preuzeti detalje Operacije kao što su Satnica, Radna Stanica. + + Nakon toga postavite vrijeme Operacije u minutama i tabela će izračunati troškove Operacije na temelju Satnice i vremena Operacije.", +Enter the opening stock units.,Unesi početne jedinice zaliha., +Enter the quantity of the Item that will be manufactured from this Bill of Materials.,Unesi količinu artikla koja će biti proizvedena iz ovog Spiska Materijala., +Enter the quantity to manufacture. Raw material Items will be fetched only when this is set.,Unesi količinu za proizvodnju. Artikal sirovina će se preuzimati samo kada je ovo podešeno., +Error during caller information update,Greška tokom ažuriranja informacija o pozivaocu, +Error in party matching for Bank Transaction {0},Greška u podudaranju stranaka za Bankovnu Transakciju {0}, +Error while posting depreciation entries,Greška prilikom knjiženja unosa amortizacije, +Error while processing deferred accounting for {0},Greška prilikom obrade odgođenog knjiženja za {0}, +Error while reposting item valuation,Greška prilikom ponovnog knjiženja vrijednosti artikla, +"Error: This asset already has {0} depreciation periods booked. + The `depreciation start` date must be at least {1} periods after the `available for use` date. + Please correct the dates accordingly.","Greška: Ova imovina već ima {0} periode amortizacije. + Datum `početka amortizacije` mora biti najmanje {1} perioda nakon datuma `dostupno za upotrebu`. + Molimo ispravite datume u skladu s tim.", +Errors Notification,Obavjest o Greškama, +Even invoices with apply tax withholding unchecked will be considered for checking cumulative threshold breach,Čak i fakture s neprovjerenim PDV po odbitku će se uzeti u obzir za provjeru kumulativnog prekoračenja praga, +Event,Događaj, +Example URL,Primjer URL-a, +Example of a linked document: {0},Primjer povezanog dokumenta: {0}, +"Example: ABCD.##### +If series is set and Serial No is not mentioned in transactions, then automatic serial number will be created based on this series. If you always want to explicitly mention Serial Nos for this item. leave this blank.","Primjer: ABCD.##### +Ako je serija postavljena, a serijski broj nije postavljen u transakcijama, tada će se automatski serijski broj kreirati na osnovu ove serije. Ako uvijek želite eksplicitno postaviti serijske brojeve za ovaj artikal ostavite ovo prazno.", +Example: Serial No {0} reserved in {1}.,Primjer: Serijski Broj {0} je rezervisan u {1}., +Excess Materials Consumed,Višak Potrošenog Materijala, +Excess Transfer,Prenos Viška, +Exchange Gain / Loss,Rezultat Deviznog Kursa, +Exchange Gain Or Loss,Rezultat Deviznog Kursa, +Exchange Gain/Loss amount has been booked through {0},Iznos Rezultata Deviznog Kursa je knjižen preko {0}, +Exchange Rate Revaluation Settings,Postavke Revalorizacije Deviznog Kursa, +Excluded DocTypes,Izuzeti DocTypes, +Exempt Supplies,Izuzete Zalihe, +Exit Full Screen,Izađi iz Cijelog Ekrana, +Expected,Očekivan, +Expected Balance Qty,Očekivano Količinsko Stanje, +Expected End Date should be less than or equal to parent task's Expected End Date {0}.,Očekivani datum završetka bi trebao biti prije ili jednak očekivanom datumu završetka nadređenog zadatka {0}., +Expected Stock Value,Očekivana Vrijednost Zaliha, +Expected Time Required (In Mins),Očekivano Potrebno Vrijeme (u minutama), +Expiry,Istek Roka, +Export Data,Izvezi podatke, +Export Errored Rows,Izvezi redove s greškom, +Export Import Log,Zapisnik Uvoza i Izvoza, +Extra Consumed Qty,Dodatno Potrošena Količina, +Extra Job Card Quantity,Dodatna Količina Radnog Naloga, +FIFO Queue vs Qty After Transaction Comparison,Poređenje FIFO reda u odnosu na Količinu Nakon Transakcije, +"FIFO Stock Queue (qty, rate)","FIFO red Zaliha (količina, cjena)", +FIFO/LIFO Queue,FIFO/LIFO red čekanja, +Failed Entries,Neuspješni Unosi, +"Failed to erase demo data, please delete the demo company manually.","Brisanje demo podataka nije uspjelo, izbrišite demo kompaniju ručno.", +Failed to post depreciation entries,Neuspješan unos amortizacije, +Failed to setup defaults for country {0}. Please contact support.,Neuspješno postavljanje standard postavki za zemlju {0}. Kontaktiraj podršku., +Failure,Neuspjeh, +Failure Description,Opis Kvara, +Fetch Based On,Preuzmi na osnovu, +Fetch Overdue Payments,Preuzmi Dospjela Plaćanja, +Fetch Timesheet,Preuzmi Radni List, +Fetch Timesheet in Sales Invoice,Preuzmi Radni List u Fakturu Prodaje, +Fetch Value From,Preuzmi Vrijednost od, +Fetching Error,Greška pri Preuzimanju, +Fetching exchange rates ...,Preuzimaju se Devizni Kursevi..., +Filter by Reference Date,Filtriraj po Referentnom Datumu, +Filter on Invoice,Filtrer na Fakturi, +Filter on Payment,Filter na Plaćanju, +Filters missing,Nedostaju Filteri, +Final Product,Finalni Proizvod, +Financial Ratios,Finansijski Pokazatelji, +Financial Reports,Izvještaji, +Financial Year Begins On,Finansijska Godina počinje, +Financial reports will be generated using GL Entry doctypes (should be enabled if Period Closing Voucher is not posted for all years sequentially or missing) ,Finansijski izvještaji će se generirati korištenjem doctypes Knjgovodstvenog Unosa (trebalo bi biti omogućeno ako se verifikat za zatvaranje perioda nije objavljen za sve godine uzastopno ili nedostaje) , +Finished Good BOM,Sastavnica Gotovog Proizvoda, +Finished Good Item,Artikal Gotovog Proizvoda, +Finished Good Item Qty,Količina Artikla Gotovog Proizvoda, +Finished Good Item Quantity,Količina Artikla Gotovog Proizvoda, +Finished Good Item is not specified for service item {0},Artikal Gotovog Proizvoda nije naveden za servisni artikal {0}, +Finished Good Item {0} Qty can not be zero,Količina Artikla Gotovog Proizvoda {0} ne može biti nula, +Finished Good Item {0} must be a sub-contracted item,Artikal Gotovog Proizvoda {0} mora biti podugovoreni artikal, +Finished Good Qty,Količina Gotovog Proizvoda, +Finished Good Quantity ,Količina Gotovog Proizvoda, +Finished Good UOM,Jedinica Gotovog Proizvoda, +Finished Good {0} does not have a default BOM.,Gotov Proizvod {0} nema standard Sastavnicu., +Finished Good {0} is disabled.,Gotov Proizvod {0} je onemogućen., +Finished Good {0} must be a stock item.,Gotov Proizvod {0} mora biti artikal na Zalihama., +Finished Good {0} must be a sub-contracted item.,Gotov Proizvod {0} mora biti podizvođački artikal., +Finished Goods Based Operating Cost,Operativni troškovi zasnovani na Gotovom Proizvodu, +Finished Goods Item,Gotov Proizvod Artikal, +Finished Goods Reference,Referenca za Gotov Proizvod, +Finished Goods Value,Vrijednost Gotovog Proizvoda, +Finished Goods based Operating Cost,Operativni troškovi zasnovani na Gotovom Proizvodu, +Finished Item {0} does not match with Work Order {1},Gotov Proizvod {0} ne odgovara Radnom Nalogu {1}, +First Response Due,Rok za Prvi Odgovor, +First Response SLA Failed by {},Standard Nivo Servisa prvog odgovora nije uspio od strane {}, +Fixed Asset Defaults,Standard Postavke Fiksne Imovine, +Fixed Time,Fiksno Vrijeme, +Floor,Sprat, +Floor Name,Naziv Sprata, +For Item,Za Artikal, +For Item {0} cannot be received more than {1} qty against the {2} {3},Za Artikal {0} ne može se primiti više od {1} količine naspram {2} {3}, +For Job Card,Za Radnu Karticu, +For Operation,Za Operaciju, +"For Return Invoices with Stock effect, '0' qty Items are not allowed. Following rows are affected: {0}","Za Povratne Fakture sa efektom zaliha, '0' u količina Artikla nisu dozvoljeni. Ovo utiče na sledeće redove: {0}", +For Work Order,Za Radni Nalog, +For dunning fee and interest,Za Naknadu Opomene i Kamatu, +"For item {0}, rate must be a positive number. To Allow negative rates, enable {1} in {2}","Za artikal {0}, cijena mora biti pozitivan broj. Da biste omogućili negativne cijene, omogućite {1} u {2}", +For quantity {0} should not be greater than allowed quantity {1},Za količinu {0} ne bi trebalo da bude veća od dozvoljene količine {1}, +"For the item {0}, the quantity should be {1} according to the BOM {2}.","Za artikal {0}, količina bi trebala biti {1} prema Sastavnici {2}.", +"For the {0}, no stock is available for the return in the warehouse {1}.",Za {0} nema raspoloživih zaliha za povrat u skladištu {1}., +"For the {0}, the quantity is required to make the return entry","Za {0}, količina je obavezna za unos povrata", +Force-Fetch Subscription Updates,Primoraj Preuzmanja Ažuriranja Pretplate, +Forecast,Prognoza, +Forecasting,Prognoza, +Formula Based Criteria,Kriterijumi Zasnovani na Formuli, +Free Item Rate,Cijena Besplatnog Artikla, +From Corrective Job Card,Iz Popravnog Radnog Naloga, +From Date and To Date are mandatory,Od datuma i do datuma su obavezni, +From Date is mandatory,Od datuma je obavezno, +From Date: {0} cannot be greater than To date: {1},Od datuma: {0} ne može biti kasnije od Do datuma: {1}, +From Delivery Date,Od Datuma Dostave, +From Doctype,Iz Doctype, +From Due Date,Od Datuma Dospijeća, +From Opportunity,Iz Prilike, +From Payment Date,Od Datuma Plaćanja, +From Prospect,Iz Prospekta, +From Reference Date,Od Referentnog Datuma, +From Voucher Detail No,Od Detalja Verifikata Broj, +From Voucher No,Od Verifikata Broj, +From Voucher Type,Od Tipa Verifikata, +From and To dates are required,Od i Do Datumi su obavezni, +Full Screen,Cijeli Ekran, +Full and Final Statement,Potpuna i Konačna Izjava, +GL Balance,Stanje Knjigovodstvenog Registra, +GL Entry Processing Status,Status Obrade Unosa u Knjigovodstveni Registar, +GL reposting index,Knjigovodstveni Registar Indeks ponovnog knjiženja, +Gain/Loss accumulated in foreign currency account. Accounts with '0' balance in either Base or Account currency,Rezultat akumuliran na deviznom računu. Računi sa stanjem '0' u osnovnoj ili valuti računa, +Gain/Loss already booked,Rezultat je već uknjižen, +Gain/Loss from Revaluation,Rezultat od Revalorizacije, +General Ledger,Registar Knjigovodstva,Warehouse +General and Payment Ledger Comparison,Poređenje Knjigovodstvenog Registra i Registra Plaćanja, +General and Payment Ledger mismatch,Nepodudaranje Knjigovodstvenog Registra i Registra Plaćanja, +Generate Demo Data for Exploration,Generiši Demo podatke za istraživanje, +Generate E-Invoice,Generiši e-Fakturu, +Generate Invoice At,Generiši Fakturu, +Generated,Generisano, +Generating Preview,Generiše se Pregled..., +Get Allocations,Preuzmi Dodjele, +Get Customer Group Details,Preuzmi Detalje o Grupi Klijenta, +Get Finished Goods for Manufacture,Preuzmi Artikle za Proizvodnju, +Get Outstanding Orders,Preuzmi Nepodmirene Naloge, +Get Raw Materials Cost from Consumption Entry,Preuzmi Trošak Sirovina iz Unosa Potrošnje, +Get Raw Materials for Purchase,Preuzmi Sirovine za Kupovinu, +Get Raw Materials for Transfer,Preuzmi Sirovine za Transfer, +Get Scrap Items,Preuzmi Otpadne Artikle, +Get Stock,Preuzmi Zalihe, +Get Sub Assembly Items,Preuzmi Artikle Podsklopa, +Get Supplier Group Details,Preuzmi Detalje o Grupi Dobavljača, +Get Timesheets,Preuzmi Radni List, +Get stops from,Preuzmi Stanice iz, +Getting Scrap Items,Preuzimaju se Otpadni Artikli, +Give free item for every N quantity,Dodjeli besplatan artikal za svaku N količinu, +Go back,Idi Nazad, +Go to {0} List,Idite na {0} Listu, +Goals,Ciljevi, +Goods,Proizvod, +Grant Commission,Odobri Proviziju, +Greeting Message,Poruka Dobrodošlice, +Gross Profit Percent,Bruto Rezultat %, +Gross Purchase Amount Too Low: {0} cannot be depreciated over {1} cycles with a frequency of {2} depreciations.,Bruto Iznos Kupovine je prenizak: {0} ne može se amortizirati u {1} ciklusima sa učestalošću od {2} amortizacije., +Gross Purchase Amount should be equal to purchase amount of one single Asset.,Bruto Iznos Kupovine trebao bi biti jednak iznosu kupovine jednog sredstva., +Group Same Items,Grupiši iste Artikle, +Growth View,Pregled Rasta, +Half-yearly,Polugodišnje, +Handle Employee Advances,Rukovanje Predujmom Personala, +Has Alternative Item,Ima Alternativni Artikal, +Has Corrective Cost,Ima Korektivne Troškove, +Has Item Scanned,Ima Skenirani Artikal, +Has Priority,Ima Prioritet, +Have Default Naming Series for Batch ID?,Standard Serija Imenovanja za Šaržu?, +Heatmap,Toplotna karta, +Height (cm),Visina (cm), +"Hello,","Zdravo,", +Helps you distribute the Budget/Target across months if you have seasonality in your business.,Pomaže vam da raspodijelite Budžet/Cilj po mjesecima ako imate sezonski karakter u vašem poslovanju., +Here are the error logs for the aforementioned failed depreciation entries: {0},Ovdje su zapisi grešaka za gore navedene neuspjele unose amortizacije: {0}, +Here are the options to proceed:,Ovdje su opcije za nastavak:, +"Here, you can select a senior of this Employee. Based on this, Organization Chart will be populated.",Ovdje možete odabrati starijeg od ovog. Na osnovu toga će se popuniti Organizaciona Šema., +"Here, your weekly offs are pre-populated based on the previous selections. You can add more rows to also add public and national holidays individually.",Ovdje su vaši sedmični neradni dani unaprijed popunjeni na osnovu prethodnih odabira. Možete dodati više redova kako biste pojedinačno dodali ostale praznike., +"Hi,","Zdravo,", +Hide Images,Sakrij Slike, +Hide timesheets,Sakrij Radne Listove, +Holiday Date {0} added multiple times,Datum Praznika {0} dodan više puta, +Hours Spent,Potrošeni Sati, +How often should Project be updated of Total Purchase Cost ?,Koliko često treba ažurirati Projekat od Ukupnih Troškova Kupovine?, +Idle,Besposlen, +"If Enabled - Reconciliation happens on the Advance Payment posting date
+If Disabled - Reconciliation happens on oldest of 2 Dates: Invoice Date or the Advance Payment posting date
+","Ako je Omogućeno - Usaglašavanje se dešava na Datum Knjiženja Predujma
+Ako je Onemogućeno - Usglašavanje se dešava na kasnijem datumu knjiženja: Datum Fakture ili Datum Knjiženja Predujma
+", +"If an operation is divided into sub operations, they can be added here.","Ako je operacija podijeljena na podoperacije, one se mogu dodati ovdje.", +"If checked, Rejected Quantity will be included while making Purchase Invoice from Purchase Receipt.","Ako je označeno, Odbijena Količina će biti uključena prilikom izrade Kupovne Fakture iz Kupovnog Računa.", +"If checked, Stock will be reserved on Submit","Ako je označeno, Zalihe će biti rezervisane na Podnesi", +"If checked, picked qty won't automatically be fulfilled on submit of pick list.","Ako je označeno, odabrana količina neće biti automatski ispunjena prilikom podnošenja liste odabira.", +"If checked, the tax amount will be considered as already included in the Paid Amount in Payment Entry","Ako je označeno, iznos PDV-a će se smatrati već uključenim u Uplaćeni iznos u Unosu Plaćanja", +"If checked, we will create demo data for you to explore the system. This demo data can be erased later.","Ako je označeno, kreirat ćemo demo podatke za vas da istražite sistem. Ovi demo podaci mogu se kasnije izbrisati.", +If enabled then system won't apply the pricing rule on the delivery note which will be create from the pick list,"Ako je omogućeno, sistem neće primijeniti pravilo cijena na dostavnicu koja će biti kreirana sa liste odabira", +If enabled then system won't override the picked qty / batches / serial numbers.,"Ako je omogućeno, onda sistem neće poništiti odabranu količinu / šaržu / serijske brojeve.", +"If enabled, a print of this document will be attached to each email","Ako je omogućeno, ispis ovog dokumenta će biti priložen uz svaku e-poštu", +"If enabled, additional ledger entries will be made for discounts in a separate Discount Account","Ako je omogućeno, dodatni unosi u registar će biti napravljeni za popuste na posebnom računu za popust", +"If enabled, all files attached to this document will be attached to each email","Ako je omogućeno, sve datoteke priložene ovom dokumentu bit će priložene svakoj e-pošti", +"If enabled, do not update serial / batch values in the stock transactions on creation of auto Serial + / Batch Bundle. ","Ako je omogućeno, nemojte ažurirati serijske/šarža vrijednosti u transakcijama zaliha prilikom kreiranja automatskog serijskog + / šarža paketa. ", +"If enabled, ledger entries will be posted for change amount in POS transactions","Ako je omogućeno, unosi registra će biti knjiženi za iznos promjene u Kasa transakcijama", +"If enabled, the consolidated invoices will have rounded total disabled","Ako je omogućeno, objedinjene fakture će imati onemogućeno zaokruženo ukupno", +"If enabled, the item rate won't adjust to the valuation rate during internal transfers, but accounting will still use the valuation rate.","Ako je omogućeno, cijena artikla se neće prilagođavati stopi vrednovanja tokom internih transfera, ali će knjigovodstvo i dalje koristiti stopu vrednovanja.", +"If enabled, the system will allow selecting UOMs in sales and purchase transactions only if the conversion rate is set in the item master.","Ako je omogućeno, sistem će dozvoliti izbor jedinica u transakcijama prodaje i kupovine samo ako je stopa konverzije postavljena u postavkama artikla.", +"If enabled, the system will create material requests even if the stock exists in the 'Raw Materials Warehouse'.","Ako je omogućeno, sistem će kreirati materijalne naloge čak i ako zaliha postoji u 'Skladištu Sirovina'.", +"If enabled, the system will use the moving average valuation method to calculate the valuation rate for the batched items and will not consider the individual batch-wise incoming rate.","Ako je omogućeno, sistem će koristiti metodu vrednovanja pokretnog prosjeka za izračunavanje stope vrednovanja za šaržne artikle i neće uzeti u obzir pojedinačnu dolaznu cijenu u paketu.", +"If enabled, then system will only validate the pricing rule and not apply automatically. User has to manually set the discount percentage / margin / free items to validate the pricing rule","Ako je omogućeno, sistem će samo potvrditi pravilo cijena i neće se automatski primjenjivati. Korisnik mora ručno podesiti postotak popusta / maržu / besplatne artikle kako bi potvrdio pravilo cijena", +"If mentioned, the system will allow only the users with this Role to create or modify any stock transaction earlier than the latest stock transaction for a specific item and warehouse. If set as blank, it allows all users to create/edit back-dated transactions.","Ako je postavljeno, sistem će dozvoliti samo korisnicima sa ovom ulogom da kreiraju ili modifikuju bilo koju transakciju zaliha ranije od poslednje transakcije zaliha za određeni artikal i skladište. Ako je postavljeno kao prazno, omogućava svim korisnicima da kreiraju/uređuju transakcije sa datumom unazad.", +"If not, you can Cancel / Submit this entry","Ako ne, možete Otkazati / Podnijeti ovaj unos", +"If rate is zero then item will be treated as ""Free Item""","Ako je cijena nula, artikal će se tretirati kao ""Besplatni Artikal""", +"If the BOM results in Scrap material, the Scrap Warehouse needs to be selected.","Ako Sastavnica rezultira otpadnim materijalom, potrebno je odabrati Skladište Otpada.", +"If the selected BOM has Operations mentioned in it, the system will fetch all Operations from BOM, these values can be changed.","Ako odabrana Sastavnica ima Operacije spomenute u njoj, sistem će preuzeti sve operacije iz nje, i te vrijednosti se mogu promijeniti.", +"If there is no title column, use the code column for the title.","Ako nema kolone naslova, koristite kolonu koda za naslov.", +"If this checkbox is enabled, then the system won’t run the MRP for the available sub-assembly items.","Ako je ovo polje omogućeno, sistem neće pokrenuti Materijalni Zahtjev Plan za dostupne artikle podsklopa.", +If this is undesirable please cancel the corresponding Payment Entry.,"Ako je ovo nepoželjno, otkaži odgovarajući Unos Plaćanja.", +"If yes, then this warehouse will be used to store rejected materials","Ako da, onda će se ovo skladište koristiti za skladištenje odbijenog materijala", +"If you are maintaining stock of this Item in your Inventory, ERPNext will make a stock ledger entry for each transaction of this item.","Ako održavate zalihe ovog artikla u svojim zalihama, Sistem će napraviti unos u registar zaliha za svaku transakciju ovog artikla.", +"If you need to reconcile particular transactions against each other, then please select accordingly. If not, all the transactions will be allocated in FIFO order.","Ako trebate usaglasiti određene transakcije jedne s drugima, odaberite u skladu s tim. U suprotnom, sve transakcije će biti dodijeljene FIFO redoslijedom.", +"If you still want to proceed, please disable 'Skip Available Sub Assembly Items' checkbox.","Ako i dalje želite da nastavite, onemogući polje za potvrdu 'Preskoči Dostupne Artikle Podsklopa'.", +"If you still want to proceed, please enable {0}.","Ako i dalje želite da nastavite, omogući {0}.", +"If your CSV uses a different delimiter, add that character here, ensuring no spaces or additional characters are included.","Ako vaš CSV koristi drugačiji razdjelnik, dodajte taj znak ovdje, pazeći da nema razmaka ili dodatnih znakova.", +Ignore Account Closing Balance,Zanemari Stanje Perioda Zatvaranju Računa, +Ignore Available Stock,Zanemari Dostupne Zalihe, +Ignore Closing Balance,Zanemari Završno Stanje, +Ignore Default Payment Terms Template,Zanemari Šablon Standard Uslova Plaćanja, +Ignore Empty Stock,Zanemari Prazne Zalihe, +Ignore Exchange Rate Revaluation Journals,Zanemari Žurnale Revalorizacije Deviznog Kursa, +Ignore Is Opening check for reporting,Zanemari Početno kontrolu za izvještaj, +Ignore Pricing Rule is enabled. Cannot apply coupon code.,Zanemari da je Pravilnik Cijena omogućen. Nije moguće primijeniti kod kupona., +Ignore System Generated Credit / Debit Notes,Zanemari Sistemske Kreditne/Debitne Napomene, +Ignore Voucher Type filter and Select Vouchers Manually,Zanemari filter tipa verifikat i odaberi verifikate ručno, +Ignores legacy Is Opening field in GL Entry that allows adding opening balance post the system is in use while generating reports,Zanemaruje naslijeđe polje 'Početno' u unosu Knjigovodstva koje omogućava dodavanje početnog stanja nakon što je sistem u upotrebi prilikom generiranja izvještaja, +Impairment,Otpisi, +Import File,Uvezi Datoteku, +Import File Errors and Warnings,Greške i Upozorenja pri Uvozu Datoteka, +Import Genericode File,Uvezi Genericode Datoteku, +Import Log Preview,Pregled Zapisnika Uvoza, +Import Preview,Pregled Uvoza, +Import Progress,Napredak Uvoza, +Import Type,Tip Uvoza, +Import Using CSV file,Uvezi Koristeći CSV datoteku, +Import Warnings,Import Upozorenja, +Import completed. {0} common codes created.,Uvoz završen. Kreirano {0} zajedničkih kodova., +Import from Google Sheets,Importiraj iz Google Sheets, +Importing Common Codes,Uvoz Zajedničkih Kodova u toku, +"Importing {0} of {1}, {2}","Uvozi se {0} od {1}, {2}", +In House,Interno, +In Minutes,U Minutama, +In Party Currency,U Valuti Stranke, +In Transit Transfer,U Tranzitnom Prenosu, +In Transit Warehouse,U Tranzitnom Skladištu, +In mins,U Minutama, +"In row {0} of Appointment Booking Slots: ""To Time"" must be later than ""From Time"".","U redu {0} Rezervacija Termina: ""Do vremena"" mora biti kasnije od ""Od vremena"".", +"In this section, you can define Company-wide transaction-related defaults for this Item. Eg. Default Warehouse, Default Price List, Supplier, etc.","U ovoj sekciji možete definirati zadane postavke transakcije koje se odnose na cijelu kompaniju za ovaj artikal. Npr. Standard Skladište, Standard Cijenovnik, Dobavljač itd.", +Inactive Status,Neaktivan Status, +Include Account Currency,Uključi Valutu Računa, +Include Closed Orders,Uključi Zatvorene Naloge, +Include Default FB Assets,Uključi standard Finansijski Registar Imovinu, +Include Disabled,Uključi Onemogućene, +Include Expired Batches,Uključi istekle Šarže, +Include Safety Stock in Required Qty Calculation,Uključi sigurnosne zalihe u kalkulaciju potrebne količine, +Include Timesheets in Draft Status,Uključi Radni List u Status Nacrta, +Include Zero Stock Items,Uključi artikle bez zaliha, +Incoming Call Handling Schedule,Raspored Obrade Dolaznih Poziva, +Incoming Call Settings,Postavke Dolaznog Poziva, +Incoming Rate (Costing),Kupovna Cijena (Obračun Troškova), +Incorrect Balance Qty After Transaction,Netačna količina stanja nakon transakcije, +Incorrect Batch Consumed,Potrošena Pogrešna Šarža, +Incorrect Check in (group) Warehouse for Reorder,Netačno prijavljivanje (grupno) skladište za ponovnu narudžbu, +Incorrect Component Quantity,Netačna Količina Komponenti, +Incorrect Invoice,Netočna Faktura, +Incorrect Movement Purpose,Netačna Namjena Kretanja, +Incorrect Payment Type,Netačan Tip Plaćanja, +Incorrect Reference Document (Purchase Receipt Item),Netaöan referentni dokument (Artikal Kupovnog Naloga), +Incorrect Serial No Valuation,Netačno Vrijednovanje Serijskog Broja, +Incorrect Serial Number Consumed,Pogrešan Serijski Broj Potrošen, +Incorrect Serial and Batch Bundle,Pogrešan Serijski i Šaržni Paket, +Incorrect Stock Value Report,Netačan Izvještaj o Vrijednosti Zaliha, +Incorrect Type of Transaction,Netačan Tip Transakcije, +Increase In Asset Life(Months),Povećanje Vijeka Trajanja Imovine (mjeseci), +Indirect Expense,Indirektni Troškak, +Individual GL Entry cannot be cancelled.,Individualni Knjigovodstveni Unos nemože se otkazati., +Individual Stock Ledger Entry cannot be cancelled.,Pojedinačni Unos u Registar Zaliha nemože se otkazati., +Initialize Summary Table,Inicijaliziraj Tabelu Sažetka, +Insert New Records,Ubaci Nove Zapise, +Inspection Rejected,Inspekcija Odbijena, +Inspection Submission,Podnošenje Kontrole, +Instruction,Uputstvo, +Insufficient Capacity,Nedovoljan Kapacitet, +Insufficient Stock for Batch,Nedovoljne Zalihe Šarže, +Inter Transfer Reference,Referenca Prenosa Inter Kompanija, +Interest and/or dunning fee,Kamata i/ili Naknada Opomene, +Internal Customer,Interni Klijent, +Internal Customer for company {0} already exists,Interni Klijent za kompaniju {0} već postoji, +Internal Sale or Delivery Reference missing.,Nedostaje referenca za Internu Prodaju ili Dostavu., +Internal Sales Reference Missing,Nedostaje Interna Prodajna Referenca, +Internal Supplier,Interni Dobavljač, +Internal Supplier for company {0} already exists,Interni Dobavljač za kompaniju {0} već postoji, +Internal Transfer Reference Missing,Nedostaje Referenca Internog Prijenosa, +Internal Transfers,Interni Prenosi, +Internal transfers can only be done in company's default currency,Interni prenosi se mogu vršiti samo u standard valuti kompanije, +Interval should be between 1 to 59 MInutes,Interval bi trebao biti između 1 i 59 minuta, +Invalid,Nevažeći, +Invalid Allocated Amount,Nevažeći Dodijeljeni Iznos, +Invalid Amount,Nevažeći Iznos, +Invalid Auto Repeat Date,Nevažeći Datum Automatskog Ponavljanja, +Invalid Cost Center,Nevažeći Centar Troškova, +Invalid Delivery Date,Nevažeći Datum Dostave, +Invalid Discount,Nevažeći Popust, +Invalid Document,Nevažeći Dokument, +Invalid Document Type,Nevažeći Dokument Tip, +Invalid Formula,Nevažeća Formula, +Invalid Group By,Nevažeća Grupa po, +Invalid Item Defaults,Nevažeće Standard Postavke Artikla, +Invalid Ledger Entries,Nevažeći unosi u Registar, +Invalid Primary Role,Nevažeća Primarna Uloga, +Invalid Priority,Nevažeći Prioritet, +Invalid Process Loss Configuration,Nevažeća Konfiguracija Gubitka Procesa, +Invalid Purchase Invoice,Nevažeća Kupovna Faktura, +Invalid Qty,Nevažeća Količina, +Invalid Schedule,Nevažeći Raspored, +Invalid Serial and Batch Bundle,Nevažeći Serijski i Šaržni Paket, +Invalid Warehouse,Nevažeće Skladište, +Invalid amount in accounting entries of {} {} for Account {}: {},Nevažeći iznos u knjigovodstvenim unosima {} {} za račun {}: {}, +Invalid result key. Response:,Nevažeći ključ rezultata. Odgovor:, +Invalid value {0} for {1} against account {2},Nevažeća vrijednost {0} za {1} naspram računa {2}, +Inventory Dimension,Dimenzija Zaliha, +Inventory Dimension Negative Stock,Negativne Zalihe Dimenzije Zaliha, +Inventory Settings,Postavke Zaliha, +Invoice Cancellation,Otkazivanje Fakture, +Invoice ID,Faktura, +Invoice Limit,Ograničenje Fakture, +Invoice Portion (%),Udio Fakture (%), +Invoice and Billing,Faktura & Fakturisanje, +Invoiced Qty,Fakturisana Količina, +Invoices and Payments have been Fetched and Allocated,Fakture i Plaćanja su Preuzeti i Dodijeljeni, +Invoicing Features,Funkcije Fakturisanja, +Is Adjustment Entry,Unos Podešavanja, +Is Alternative,Alternativa, +Is Cash or Non Trade Discount,Gotovinski ili Netrgovčki Popust, +Is Composite Asset,Objedinjena Imovina, +Is Corrective Job Card,Popravni Radni Nalog, +Is Corrective Operation,Popravna Operacija, +Is Exchange Gain / Loss?,Dobitak/Gubitak Deviznog Kursa?, +Is Expandable,Proširivo, +Is Finished Item,Gotov Artikal, +Is Fully Depreciated,Potpuno Amortizovano, +Is Group Warehouse,Grupno Skladište, +Is Old Subcontracting Flow,Stari Tok Podugovaranja, +Is Outward,Dostava, +Is Period Closing Voucher Entry,Unos Verifikata za Yatvaranje Perioda, +Is Rate Adjustment Entry (Debit Note),Unos Korekcije Artikla (Debit Faktura), +Is Recursive,Rekuruzivno, +Is Rejected,Odbijeno, +Is Rejected Warehouse,Odbijeno Skladište, +Is Scrap Item,Otpadni Artikal, +Is Short/Long Year,Kratka/Duga Godina, +Is Standard,Standard, +Is Stock Item,Artikal Zaliha, +Is System Generated,Sistem Generisno, +Is Tax Withholding Account,Račun po Odbitku PDV, +Is Template,Šablon, +Issue Analytics,Analiza Slučaja, +Issue Summary,Sažetak Slučaja, +Issue a debit note with 0 qty against an existing Sales Invoice,Izdaj Zadužnicu sa 0 količinom na postojeću Prodajnu Fakturu, +Issuing cannot be done to a location. Please enter employee to issue the Asset {0} to,Izdavanje se ne može izvršiti na lokaciji. Unesi personal kojem će izdati imovina {0}, +It can take upto few hours for accurate stock values to be visible after merging items.,Može potrajati i do nekoliko sati da tačne vrijednosti zaliha budu vidljive nakon spajanja artikala., +"It's not possible to distribute charges equally when total amount is zero, please set 'Distribute Charges Based On' as 'Quantity'","Nije moguće ravnomjerno raspodijeliti troškove kada je ukupan iznos nula, postavite 'Distribuiraj Naknade na Osnovu' kao 'Količina'", +Item Code (Final Product),Kod Artikla (Finalni Proizvod), +Item Group wise Discount,Popust po Grupni Artikla, +Item Price Settings,Postavke Cijene Artikla, +"Item Price appears multiple times based on Price List, Supplier/Customer, Currency, Item, Batch, UOM, Qty, and Dates.","Cijena Artikla se pojavljuje više puta na osnovu Cijenovnika, Dobavljača/Klijenta, Valute, Artikla, Šarže, Jedinice, Količine i Datuma.", +Item Reference,Referenca Artikla, +Item Warehouse based reposting has been enabled.,Omogućeno je ponovno knjiženje Artikala na osnovi Skladišta., +Item and Warehouse,Artikal i Skladište, +Item is removed since no serial / batch no selected.,Artikal je uklonjen jer nije odabrana Šarža / Serijski Broj., +Item qty can not be updated as raw materials are already processed.,Količina artikla se ne može ažurirati jer su sirovine već obrađene., +Item rate has been updated to zero as Allow Zero Valuation Rate is checked for item {0},Cijena Artikla je ažurirana na nulu jer je Dozvoli Nultu Stopu Vrednovanja označena za artikal {0}, +Item valuation reposting in progress. Report might show incorrect item valuation.,Ponovno knjiženje vrijednosti artikla je u toku. Izvještaj može prikazati netačnu procjenu artikla., +Item {0} cannot be added as a sub-assembly of itself,Artikal {0} nemože se dodati kao sam podsklop, +Item {0} cannot be ordered more than {1} against Blanket Order {2}.,Artikal {0} se nemože naručiti više od {1} u odnosu na Ugovorni Nalog {2}., +Item {0} does not exist.,Artikal {0} ne postoji., +Item {0} entered multiple times.,Artikal {0} unesen više puta., +Item {0} is already reserved/delivered against Sales Order {1}.,Artikal {0} je već rezervisan/dostavljen naspram Prodajnog Naloga {1}., +Item {0} must be a Non-Stock Item,Artikal {0} mora biti artikal koji nije na zalihama, +Item {0} not found in 'Raw Materials Supplied' table in {1} {2},Artikal {0} nije pronađen u tabeli 'Dostavljene Sirovine' u {1} {2}, +Item {0} not found.,Artikal {0} nije pronađen., +Item {} does not exist.,Atikal {} ne postoji., +Items & Pricing,Artikli & Cijene, +Items Catalogue,Katalog Artikala, +Items cannot be updated as Subcontracting Order is created against the Purchase Order {0}.,Artikal se ne mođe ažurirati jer je Podugovorni Nalog kreiran naspram Kupovnog Naloga {0}., +Items rate has been updated to zero as Allow Zero Valuation Rate is checked for the following items: {0},Cijena Artikala je ažurirana na nulu jer je Dozvoli Nultu Stopu Vrednovanja izabrana za sljedeće artikle: {0}, +Items to Be Repost,Artikli koje treba ponovo objaviti, +Items to Order and Receive,Artikli za Naručiti i Primiti, +Items to Reserve,Artikli za Rezervisanje, +Items {0} do not exist in the Item master.,Artikli {0} ne postoje u Tabeli Artikala., +Job Capacity,Radni Kapacitet, +Job Card Operation,Operacija Radne Kartice, +Job Card Scheduled Time,Zakazano Vrijeme Radne Kartice, +Job Card Scrap Item,Otpadni Artikal Radne Kartice, +Job Card and Capacity Planning,Radne Kartice i Planiranje Kapaciteta, +Job Cards,Radne Kartice, +Job Paused,Posao Pauziran, +Job Worker,Podizvođač, +Job Worker Address,Adresa Podizvođača, +Job Worker Address Details,Detalji Adrese Podizvođača, +Job Worker Contact,Kontakt Podizvođača, +Job Worker Delivery Note,Dostavnica Podizvođača, +Job Worker Name,Naziv Podizvođača, +Job Worker Warehouse,Skladište Podizvođača, +Job: {0} has been triggered for processing failed transactions,Posao: {0} je pokrenut za obradu neuspjelih transakcija, +Joining,Pridruživanje, +Journal Entries,Nalozi Knjiženja, +Journal Entry for Asset scrapping cannot be cancelled. Please restore the Asset.,Naloga Knjiženja za rashod Imovine ne može se otkazati. Vrati Imovinu., +Journal Entry type should be set as Depreciation Entry for asset depreciation,Tip Naloga Knjiženja treba postaviti kao Unos Amortizacije za amortizaciju imovine, +Journal entries have been created,Nalozi Knjiženja su kreirani, +Journals,Žurnali, +Key,Ključ, +Kindly cancel the Manufacturing Entries first against the work order {0}.,Otkaži Unose Proizvodnje naspram Radnog Naloga {0}., +Last GL Entry update was done {}. This operation is not allowed while system is actively being used. Please wait for 5 minutes before retrying.,Posljednje ažuriranje Knjigovodstvenog Registra je obavljeno {}. Ova operacija nije dozvoljena dok se sistem aktivno koristi. Pričekaj 5 minuta prije ponovnog pokušaja., +"Last Name, Email or Phone/Mobile of the user are mandatory to continue.","Prezime, e-mail ili telefon/mobilni telefon korisnika su obavezni za nastavak.", +Last transacted,Zadnja Transakcija, +Lead -> Prospect,Potencijalni Klijent-> Prospekt, +Lead Conversion Time,Vrijeme Konverzije Potencijalnog Klijenta, +Lead Owner cannot be same as the Lead Email Address,Odgovorni za Potencijalnog Klijenta ne može biti isti kao i adresa e-pošte potencijalnog klijenta, +Lead {0} has been added to prospect {1}.,Potencijalni Klijent {0} je dodat Prospektu {1}., +Leaderboard,Poredak, +Leads,Potencijalni Klijenti, +Learn Accounting,Naučite Knjigovodstvo, +Learn Inventory Management,Naučite Upravljanje Zalihama, +Learn Manufacturing,Naučite Proizvodnju, +Learn Procurement,Naučite Kupovinu, +Learn Project Management,Naučite Upravljanje Projektima, +Learn Sales Management,Naučite Upravljanje Prodajom, +"Learn about Common Party","Saznaj više o Zajedniča Stranka", +"Leave blank for home. +This is relative to site URL, for example ""about"" will redirect to ""https://yoursitename.com/about""","Ostavite prazno za Početna. Ovo se odnosi na URL web-lokacije, na primjer ""o"" će preusmjeriti na ""https://yoursitename.com/about""", +Ledger Health,Status Registra, +Ledger Health Monitor,Prati Status Registra, +Ledger Health Monitor Company,Kompanija Praćenja Statusa Registra, +Ledger Merge,Spoji Registre, +Ledger Merge Accounts,Računi Spojenih Registara, +Ledgers,Registri, +Left Child,Lijevo Podređen, +Legend,Legenda, +Length,Dužine, +Length (cm),Dužina (cm), +Level (BOM),Nivo (Sastavnica), +Limit timeslot for Stock Reposting,Ograniči vremenski termin za ponovno Knjiženje Zaliha, +Limits don't apply on,Ograničenja se ne primjenjuju na, +Link a new bank account,Poveži novi bankovni račun, +Link with Customer,Veza sa Klijentom, +Link with Supplier,Veza sa Dobavljačem, +Linked with submitted documents,Povezano sa podnešenim dokumentima, +Linking Failed,Povezivanje nije uspjelo, +Linking to Customer Failed. Please try again.,Povezivanje s klijentom nije uspjelo. Molimo pokušajte ponovo., +Linking to Supplier Failed. Please try again.,Povezivanje sa dobavljačem nije uspjelo. Molimo pokušajte ponovo., +Links,Veze, +Loading Invoices! Please Wait...,Učitavanje Faktura u toku! Molimo pričekajte..., +Loading import file...,Učitavanje datoteke uvoza..., +Locked,Zaključano, +Log Entries,Unosi Zapisa, +Log the selling and buying rate of an Item,Zabilježi prodajnu i kupovnu cijenu artikla, +Lost Quotations,Izgubljene Ponude, +Lost Quotations %,Izgubljene Ponude %, +Lost Reasons are required in case opportunity is Lost.,Izgubljeni Razlozi su potrebni u slučaju da je prilika izgubljena., +Lost Value,Izgubljen(a) Vrijednost, +Lost Value %,Izgubljen(a) Vrijednost %, +Machine Type,Tip Mašine, +Main Cost Center,Matični Centar Troškova, +Main Cost Center {0} cannot be entered in the child table,Matični Centar Troškova {0} ne može se unijeti u podređenu tabelu, +Maintain Asset,Održavanje Imovine, +Maintenance Details,Detalji Održavanja, +Make ,Marka , +Make Asset Movement,Napravi Pokrete Imovine, +Make Quotation,Napravi Ponudu, +Make Return Entry,Napravi Povratni Unos, +Make Serial No / Batch from Work Order,Napravi Serijski Broj / Šaržu iz Radnog Naloga, +Make {0} Variant,Napravi {0} Varijantu, +Make {0} Variants,Napravi {0} Varijante, +Making Journal Entries against advance accounts: {0} is not recommended. These Journals won't be available for Reconciliation.,Kreiranje Naloga Knjiženja naspram računa predujma: {0} se ne preporučuje. Ovi Nalozi Knjiženja neće biti dostupni za Usaglašavanje., +Manage,Upravljaj, +Mandatory Accounting Dimension,Obavezna Knjigovodstvena Dimenzija, +Mandatory Depends On,Obavezno zavisi od, +Mandatory Field,Obavezno Polje, +Mandatory Section,Obavezna Sekcija, +Manual Inspection,Manualna Kontrola, +Manufacturing Type,Tip Proizvodnje, +Mapping Purchase Receipt ...,Mapiranje Kupovnog Računa..., +Mapping Subcontracting Order ...,Mapiranje Podugovornog Naloga..., +Mapping {0} ...,Mapiranje {0} u toku..., +Margin View,Pregled Marže, +Mark As Closed,Označi kao Zatvoreno, +Material Returned from WIP,Materijal vraćen iz Posla u Toku, +Material Transfer (In Transit),Prijenos Materijala (u transportu), +Materials are already received against the {0} {1},Materijali su već primljeni naspram {0} {1}, +Materials needs to be transferred to the work in progress warehouse for the job card {0},Materijale je potrebno prebaciti u Skladište u Toku za Radnu Karticu {0}, +Max Qty (As Per Stock UOM),Maksimalna Količina (prema Jedinici Zaliha), +Maximum Net Rate,Maksimalna Neto Cijena, +Maximum Payment Amount,Maksimalni Iznos Uplate, +Maximum Value,Minimalna Vrijednost, +Maximum quantity scanned for item {0}.,Maksimalna skenirana količina za artikal{0}., +Meeting,Sastanak, +Mention if non-standard Receivable account,Navedite ako Račun Potraživanja nije standard, +Merge Invoices Based On,Spoji Fakture na osnovu, +Merge Progress,Napredak Spajanja, +Merge Similar Account Heads,Spoji Slične Račune, +Merge taxes from multiple documents,Spoji PDV iz više dokumenata, +Merged,Spojeno, +"Merging is only possible if following properties are same in both records. Is Group, Root Type, Company and Account Currency","Spajanje je moguće samo ako su sljedeća svojstva ista u oba zapisa. Grupa, Tip Klase, Kompanija i Valuta Računa", +Merging {0} of {1},Spajanje {0} od {1} u toku, +Min Qty (As Per Stock UOM),Minimalna Količina (prema Jedinici Zaliha), +Min Qty should be greater than Recurse Over Qty,Minimalna Količina bi trebao biti veći od Povratne Količina, +Minimum Net Rate,Minimalna Neto Cijena, +Minimum Payment Amount,Minimalni Iznos Plaćanja, +Minimum Value,Minimalna Vrijednost, +Mismatch,Neusklađeno, +Missing,Nedostaje, +Missing Asset,Nedostaje Imovina, +Missing Cost Center,Nedostaje Centar Troškova, +Missing Default in Company,Nedostaju Standard Postavke u kompaniji, +Missing Finance Book,Nedostaje Finansijski Registar, +Missing Finished Good,Nedostaje Gotov Proizvod, +Missing Formula,Nedostaje Formula, +Missing Item,Nedostaje Artikal, +Missing Items,Nedostajući Artikli, +Missing Payments App,Nedostaje Aplikacija za Plaćanje, +Missing Serial No Bundle,Nedostaje Serijski Broj Paket, +Missing value,Nedostaje vrijednost, +Mobile: ,Mobilni Broj: , +Modified By,Izmijenio, +Modified On,Izmijenjeno, +Module Settings,Postavke Modula, +Monitor for Last 'X' days,Prati zadnjih 'X' dana, +More/Less than 12 months.,Duže/Kraće od 12 mjeseci., +Move Stock,Premjesti Zalihe, +Move to Cart,Premjesti u Korpu, +Movement,Kretanje, +Moving up in tree ...,Pomjeranje prema Stablu..., +Multi-level BOM Creator,Konstruktor Višeslojne Sastavnice, +Multiple Loyalty Programs found for Customer {}. Please select manually.,Višestruki Programi Lojalnosti pronađeni za Klijenta {}. Odaberi ručno., +Multiple Warehouse Accounts,Više Skladišnih Računa, +Multiple items cannot be marked as finished item,Više artikala se ne mogu označiti kao gotov proizvod, +Must be a publicly accessible Google Sheets URL and adding Bank Account column is necessary for importing via Google Sheets,Mora biti javno dostupan URL Google Sheets i dodavanje kolone Bankovnog Računa je neophodno za import preko Google Sheets, +Named Place,Mjesto, +Naming Series and Price Defaults,Serija Imenovanja & Standard Cijene, +Naming Series is mandatory,Serija Imenovanja je obavezna, +Negative Batch Quantity,Negativna količina Šarže, +Net Purchase Amount,Neto Kupovni Iznos, +Net total calculation precision loss,Ukupni neto gubitak preciznosti proračuna, +New Balance In Account Currency,Novo Stanje u Valuti Računa, +New Event,Novi Događaj, +New Note,Nova Napomena, +New Task,Novi Zadatak, +New Version,Nova Verzija, +Newsletter,Bilten, +No Answer,Bez Odgovora, +No Customers found with selected options.,Nisu pronađeni Klijenti sa odabranim opcijama., +No Items selected for transfer.,Nema odabranih artikala za prijenos., +No Matching Bank Transactions Found,Nisu pronađene odgovarajuće bankovne transakcije, +No Notes,Nema Napomena, +No Outstanding Invoices found for this party,Nisu pronađene neplaćene fakture za ovu stranku, +No POS Profile found. Please create a New POS Profile first,Nije pronađen Kasa profil. Kreiraj novi Kasa Profil, +No Records for these settings.,Nema zapisa za ove postavke., +No Selection,Bez Odabira, +No Serial / Batches are available for return,Nema Serijskih Brojeva / Šarži dostupnih za povrat, +No Stock Available Currently,Trenutno nema Dostupnih Zaliha, +No Summary,Nema Sažetak, +No Tax Withholding data found for the current posting date.,Nisu pronađeni podaci o PDV-u po odbitku za trenutni datum knjiženja., +No Terms,Nema Uslova, +No Unreconciled Invoices and Payments found for this party and account,Nisu pronađene neusaglašene fakture i plaćanja za ovu stranku i račun, +No Unreconciled Payments found for this party,Nisu pronađene neusaglašene uplate za ovu stranku, +No Work Orders were created,Radni Nalozi nisu kreirani, +No additional fields available,Nema dostupnih dodatnih polja, +No billing email found for customer: {0},Nije pronađena e-pošta fakture za: {0}, +No data found. Seems like you uploaded a blank file,Nema podataka. Čini se da ste otpremili praznu datoteku, +No employee was scheduled for call popup,Personal nije zakazao poziv, +No failed logs,Nema neuspjelih zapisa, +No item available for transfer.,Nema dostupnih artikala za prijenos., +No items are available in sales orders {0} for production,Nema dostupnih artikala u Prodajnim Nalozima {0} za proizvodnju, +No items are available in the sales order {0} for production,Nema dostupnih artikala u Prodajnom Nalogu {0} za proizvodnju, +No items in cart,Nema artikala u korpi, +No matches occurred via auto reconciliation,Nije došlo do podudaranja putem automatskog usaglašavanja, +No more children on Left,Nema više podređenih na Lijevoj strani, +No more children on Right,Nema više podređenih na Desnoj strani, +No of Docs,Broj Dokumenata, +No of Employees,Personalni Broj, +No of Months (Expense),Broj Mjeseci (Troškovi), +No of Months (Revenue),Broj Mjeseci (Prihodi), +No open event,Nema Otvorenih Događaja, +No open task,Nema Otvorenog Zadatka, +No outstanding {0} found for the {1} {2} which qualify the filters you have specified.,Nema neplaćenih {0} pronađenih za {1} {2} koji ispunjavaju filtre koje ste naveli., +No primary email found for customer: {0},Nije pronađena primarna e-pošta: {0}, +No recent transactions found,Nisu pronađene nedavne transakcije, +No records found in Allocation table,Nema zapisa u tabeli Dodjele, +No records found in the Invoices table,Nije pronađen zapis u tabeli Fakture, +No records found in the Payments table,Nije pronađen zapis u tabeli Plaćanja, +No stock transactions can be created or modified before this date.,Nikakve transakcije Zalihama se ne mogu kreirati ili mijenjati prije ovog datuma., +No {0} Accounts found for this company.,Nisu pronađeni {0} računi za ovu kompaniju., +No.,Br., +No. of Employees,Personalni Broj, +No. of parallel job cards which can be allowed on this workstation. Example: 2 would mean this workstation can process production for two Work Orders at a time.,Broj paralelnih radnih kartica koje se mogu dozvoliti na ovoj radnoj stanici. Primjer: 2 bi značilo da ova radna stanica može obraditi proizvodnju za dva radna naloga istovremeno., +Note: Automatic log deletion only applies to logs of type Update Cost,Napomena: Automatsko brisanje zapisa primjenjuje se samo na zapise tipa Ažuriraj Trošak, +"Note: To merge the items, create a separate Stock Reconciliation for the old item {0}","Napomena: Da biste spojili artikle, kreirajte zasebno Usaglašavanje Zaliha za stari artikal {0}", +Notes HTML,HTML Napomene, +Notification,Obavijest, +Notification Settings,Postavke Obavijesti, +Notify Reposting Error to Role,Obavijesti o Grešci Ponovnog Knjiženja sljedećoj Ulozi, +Number of Days,Broj Dana, +Numeric,Numerički, +Numeric Inspection,Numerička Inspekcija, +Off,Isključen, +Offsetting Account,Prijebojni Račun, +Offsetting for Accounting Dimension,Prijeboj za Knjigovodstvenu Dimenziju, +Oldest Of Invoice Or Advance,Najstarija od Faktura ili Predujam, +On Paid Amount,Na Plaćeni Iznos, +On This Date,Na Ovaj Datum, +On Track,Na Putu, +On enabling this cancellation entries will be posted on the actual cancellation date and reports will consider cancelled entries as well,"Nakon omogućavanja ovog otkazivanja, unosi će biti uknjiženi na datum stvarnog otkazivanja, a izvještaji će uzeti u obzir i otkazane unose", +"On expanding a row in the Items to Manufacture table, you'll see an option to 'Include Exploded Items'. Ticking this includes raw materials of the sub-assembly items in the production process.","Kada proširite red u tabeli Artikli za Proizvodnju, vidjet ćete opciju 'Uključi Rastavljenje Artikle'. Ovo označavanje uključuje sirovine za podsklopove u procesu proizvodnje.", +"On submission of the stock transaction, system will auto create the Serial and Batch Bundle based on the Serial No / Batch fields.","Pri podnošenju transakcije zaliha, sistem će automatski kreirati Serijski i Šaržni Paket na osnovu polja Serijskog Broja / Šarže.", +Once the Work Order is Closed. It can't be resumed.,Nakon što je Radni Nalog Yatvoren. Ne može se ponovo otvoriti., +Only 'Payment Entries' made against this advance account are supported.,Podržani su samo 'Unosi Plaćanja' naspram ovog predujam računa., +Only CSV and Excel files can be used to for importing data. Please check the file format you are trying to upload,Za uvoz podataka mogu se koristiti samo CSV i Excel datoteke. Provjeri format datoteke koji pokušavate učitati, +Only Deduct Tax On Excess Amount ,Odbij porez samo na višak Iznosa, +Only Include Allocated Payments,Uzmi u obzir samo Dodijeljena Plaćanja, +Only Parent can be of type {0},Jedino Nadređeni može biti tipa {0}, +Only applies for Normal Payments,Primjenjuje se samo za Normalna Plaćanja, +Only existing assets,Samo postojeća imovina, +Only one {0} entry can be created against the Work Order {1},Samo jedan {0} unos se može kreirati naspram Radnog Naloga {1}, +"Only values between [0,1) are allowed. Like {0.00, 0.04, 0.09, ...} +Ex: If allowance is set at 0.07, accounts that have balance of 0.07 in either of the currencies will be considered as zero balance account","Dozvoljene su samo vrijednosti između [0,1). Kao {0,00, 0,04, 0,09, ...} +Primjer: Ako je odobrenje postavljeno na 0,07, računi koji imaju stanje od 0,07 u bilo kojoj od valuta će se smatrati nultim stanjem računa", +Only {0} are supported,Podržano je samo {0}, +Open Activities HTML,Otvorene HTML Aktivnosti, +Open Call Log,Otvori Zapis Poziva, +Open Event,Otvori Događaj, +Open Events,Otvoreni Događaji, +Open Sales Orders,Otvori Prodajni Nalog, +Open Task,Otvori Zadatak, +Open Tasks,Otvori Zadatke, +Open Work Order {0},Otvori Radni Nalog {0}, +Opening & Closing,Otvaranje & Zatvaranje, +Opening Accumulated Depreciation must be less than or equal to {0},Početna Akumulirana Amortizacija mora biti manja ili jednaka {0}, +Opening Entry can not be created after Period Closing Voucher is created.,Početni Unos ne može se kreirati nakon kreiranja Verifikata Zatvaranje Perioda., +"Opening Invoice has rounding adjustment of {0}.

'{1}' account is required to post these values. Please set it in Company: {2}.

Or, '{3}' can be enabled to not post any rounding adjustment.","Početna Faktura ima podešavanje zaokruživanja od {0}.

'{1}' račun je potreban za postavljanje ovih vrijednosti. Molimo postavite ga u kompaniji: {2}.

Ili, '{3}' se može omogućiti da se ne objavljuje nikakvo podešavanje zaokruživanja.", +Opening Number of Booked Depreciations,Početni broj knjiženih amortizacija, +Opening Purchase Invoices have been created.,Početne Fakture Kupovine su kreirane., +Opening Sales Invoices have been created.,Početne Fakture Prodaje su kreirane., +Operating Cost Per BOM Quantity,Operativni trošak po količini Sastavnice, +Operation time does not depend on quantity to produce,Vrijeme Operacije ne ovisi o količini za proizvodnju, +Opportunity Amount (Company Currency),Iznos Prilike (Valuta Kompanije), +Opportunity Owner,Odgovorni Prilike, +Opportunity Source,Izvor Mogućnost, +Opportunity Summary by Sales Stage,Sažetak Prilike prema Fazi Prodaje, +Opportunity Summary by Sales Stage ,Sažetak Prilike prema Fazi Prodaje , +Opportunity Value,Vrijednost Prilike, +Order Date,Datum Naloga, +Order No,Broj Naloga, +Order Status,Status Nalog, +Other Info,Ostale Informacije, +Out of stock,Nema u Zalihana, +Outstanding (Company Currency),Nepodmireno (Valuta Tvrtke), +Over Picking Allowance,Dozvola za prekomjernu Odabir, +Over Receipt,Preko Dostavnice, +Over Receipt/Delivery of {0} {1} ignored for item {2} because you have {3} role.,Prekmjerni Prijema/Dostava {0} {1} zanemareno za artikal {2} jer imate {3} ulogu., +Over Transfer Allowance,Dozvola za prekomjerni Prenos, +Overbilling of {0} {1} ignored for item {2} because you have {3} role.,Prekomjerno Fakturisanje {0} {1} zanemareno za artikal {2} jer imate {3} ulogu., +Overbilling of {} ignored because you have {} role.,Prekomjerno Fakturisanje {} zanemareno jer imate {} ulogu., +Overdue Payment,Dospjelo Plaćanje, +Overdue Payments,Dospjela Plaćanja, +Overdue Tasks,Dospjeli Zadaci, +Overview,Pregled, +PDF Name,PDF Naziv, +POS Closed,Kasa Zatvorena, +POS Closing Failed,Zatvaranje Kase nije uspjelo, +POS Closing failed while running in a background process. You can resolve the {0} and retry the process again.,Zatvaranje Kase nije uspjelo dok je pokrenut u pozadini. Možete riješiti {0} i ponovo pokušati proces., +POS Invoice is already consolidated,Kasa Faktura je već objedinjena, +POS Invoice is not submitted,Kasa Faktura nije podnešena, +POS Invoice should have the field {0} checked.,Kasa Faktura treba da ima označeno polje {0} ., +POS Invoices will be consolidated in a background process,Kasa Fakture će biti objedinjene u pozadinskom procesu, +POS Invoices will be unconsolidated in a background process,Kasa Fakture će biti razjedinjene u pozadinskom procesu, +POS Profile doesn't match {},Kasa Profil ne poklapa se s {}, +POS Profile {} contains Mode of Payment {}. Please remove them to disable this mode.,Kasa Profil {} sadrži ovaj način plaćanja {}. Uklonite ga da onemogućite ovaj način., +POS Search Fields,Kasa Polja za Pretragu, +POS Setting,Kasa Postavke, +POS has been closed at {0}. Please refresh the page.,Kasa je zatvorena u {0}. Osvježi Stranicu., +Package No(s) already in use. Try from Package No {0},Broj(evi) Paketa su već u upotrebi. Pokušajte od Paketa broj {0}, +Packaging Slip From Delivery Note,Otpremnica iz Dostavnice, +Packed Items cannot be transferred internally,Upakovani Artikli se ne mogu interno prenositi, +Packed Qty,Upakovani Kvantitet, +Page Break After Each SoA,Prijelom stranice nakon svake SoA, +Paid Amount After Tax,Plaćeni Iznos nakon Oporezivanja, +Paid Amount After Tax (Company Currency),Plaćeni Iznos nakon Oporezivanja (Valuta Kompanije), +Paid From Account Type,Plaćeno sa Tipa Računa, +Paid To Account Type,Plaćeno na Tip Računa, +Pallets,Paleta, +Parameter Group,Parametar Grupe , +Parameter Group Name,Naziv Parametara Grupe, +Parcel Template,Dostavni Paket Šablon, +Parcel Template Name,Naziv Dostavnog Paketa Šablona, +Parcel weight cannot be 0,Težina paketa ne može biti 0, +Parcels,Paket, +Parent Account Missing,Nedostaje Nadređeni Račun, +Parent Document,Nadređeni Dokument, +Parent Item {0} must not be a Fixed Asset,Nadređeni Artikal {0} ne smije biti Osnovna Imovina, +Parent Row No,Nadređeni Red Broj, +Parent Row No not found for {0},Nadređeni Red Broj nije pronađen za {0}, +Parent Task {0} is not a Template Task,Nadređeni Yadatak {0} nije Šablon Zadatak, +Parsing Error,Pogreška Raščlanjivanja, +Partial Material Transferred,Djelomični Prenesen Materijal, +Partial Payment in POS Invoice is not allowed.,Djelomično plaćanje preko Kasa Fakture nije dozvoljeno., +Partial Stock Reservation,Djelomična Rezervacija Zaliha, +Partial Success,Djelimičan uspjeh, +"Partial stock can be reserved. For example, If you have a Sales Order of 100 units and the Available Stock is 90 units then a Stock Reservation Entry will be created for 90 units. ","Djelomične zalihe mogu se rezervirati. Na primjer, ako imate Prodajni Nalog od 100 jedinica, a Raspoloživa Zaliha je 90 jedinica, tada će se kreirati unos rezervacije zaliha za 90 jedinica. ", +Partially Delivered,Djelomično Dostavljeno, +Partially Reconciled,Djelimično Usaglašeno, +Partially Reserved,Djelomično Rezervisano, +Partly Paid,Delimično Plaćeno, +Partly Paid and Discounted,Djelomično Plaćeno i Sniženo, +Partnership,Partnerstvo, +Party Account No. (Bank Statement),Broj Računa Stranke (Izvod iz Banke), +Party Account {0} currency ({1}) and document currency ({2}) should be same,Valuta Računa Stranke {0} ({1}) i valuta dokumenta ({2}) trebaju biti iste, +Party IBAN (Bank Statement),IBAN Stranke (Izvod iz Banke), +Party Item Code,Kod Artikla Stranke, +Party Link,Veza Stranke, +Party Name/Account Holder (Bank Statement),Ime Stranke/Vlasnik Računa (Izvod iz Banke), +Party Specific Item,Specifični Artikal Stranke, +Party Type and Party can only be set for Receivable / Payable account

{0},Tip Stranke i Stranka mogu se postaviti samo za račun Potraživanja / Plaćanja

{0}, +Party Type and Party is required for Receivable / Payable account {0},Tip Stranke i Strana su obaveyni za račun Potraživanja / Plaćanja {0}, +Party can only be one of {0},Stranka može biti samo jedna od {0}, +Passport Details,Detalji Pasoša, +Pause Job,Pauziraj Posao, +Paused,Pauzirano, +Pay,Plati,Amount +Payment Amount (Company Currency),Iznos Plaćanja (Valuta Kompanije), +"Payment Entry {0} is linked against Order {1}, check if it should be pulled as advance in this invoice.","Unos plaćanja {0} je povezan naspram Naloga {1}, provjerite da li treba biti povučen kao predujam u ovoj fakturi.", +Payment Ledger,Registar Uplata, +Payment Ledger Balance,Stanje Registra Uplate, +Payment Ledger Entry,Unos Registra Uplate, +Payment Limit,Ograničenje Plaćanja, +Payment Reconciliation Allocation,Dodjela Usaglašavanja Plaćanja, +Payment Reconciliation Job: {0} is running for this party. Can't reconcile now.,Posao Usaglašavanja Plaćanja: {0} se vršiza ovu stranku. Nemože se sad usaglasiti., +Payment Reconciliation Settings,Postavke Usaglašavanje Plaćanja, +Payment Request Outstanding,Nerješeni Zahtjev Plaćanja, +Payment Request created from Sales Order or Purchase Order will be in Draft status. When disabled document will be in unsaved state.,"Platni Nalog je kreiran iz Prodajnog ili Kupovnog Naloga bit će u statusu Nacrta. Kada je onemogućen, dokument će biti u nespremljnom stanju.", +Payment Request is already created,Platni Zahtjev je već kreiran, +Payment Request took too long to respond. Please try requesting for payment again.,Odgovor na Platni Zahtjev trajao je predugo. Pokušajte ponovo zatražiti plaćanje., +Payment Requests cannot be created against: {0},Platni Zahtjevi ne mogu se kreirati naspram: {0}, +Payment Status,Status Plaćanja, +Payment Term Outstanding,Neizmireni Rok Plaćanja, +Payment Terms Status for Sales Order,Status Uslova Plaćanja Prodajnog Naloga, +Payment Terms from orders will be fetched into the invoices as is,Uslovi plaćanja iz Naloga će biti preneseni u Fakture takvi kakvi jesu, +Payment Unlink Error,Greška Otkazivanja Veze, +Payment of {0} received successfully.,Uspješno primljena uplata od {0}., +Payment of {0} received successfully. Waiting for other requests to complete...,Uplata od {0} je uspješno primljena. Čeka se da se drugi zahtjevi završe..., +Payment request failed,Zahtjev Plaćanje nije uspio, +Payment term {0} not used in {1},Uslov Plaćanja {0} nije korišten u {1}, +Pending processing,Obrada na Čekanju, +Per Received,Po Primljenom, +Percentage (%),Procentualno (%), +Percentage you are allowed to order beyond the Blanket Order quantity.,Procenat s kojim vam je dozvoljeno da naručite iznad količine Ugovornog Naloga., +Percentage you are allowed to sell beyond the Blanket Order quantity.,Procenat s kojim vam je dozvoljeno da prodate iznad količine Ugovornog Naloga., +Period Closed,Period Zatvoren, +Period Closing Entry For Current Period,Završni Unos Perioda za Tekući Period, +Period Closing Settings,Postavke Zatvaranja Perioda, +Period Details,Detalji Perioda, +Period End Date cannot be greater than Fiscal Year End Date,Datum Završetka Perioda ne može biti kasnije od Datuma Završetka Fiskalne Godine, +Period Start Date cannot be greater than Period End Date,Datum Početka Perioda ne može biti kasnije od Datuma Završetka Perioda, +Period Start Date must be {0},Datum Početka Perioda mora biti {0}, +Period To Date,Period do Datuma, +Period_from_date,Period od Datuma, +Phone Ext.,Telefon Ext., +Pick List Incomplete,Lista Odabira nije kompletna, +Pick Manually,Odaberi Ručno, +Pick Serial / Batch Based On,Odaberi Serijski / Šaržu na osnovu, +Pick Serial / Batch No,Odaberi Serijski/Šaržni Broj, +Picked Qty (in Stock UOM),Odabrana Količina (u Jedinici Zaliha), +Pickup,Preuzimanje, +Pickup Contact Person,Kontakt Osoba za Preuzimanje, +Pickup Date,Datum Preuzimanja, +Pickup Date cannot be before this day,Datum Preuzimanja ne može biti prije ovog dana, +Pickup From,Preuzimanje od, +Pickup To time should be greater than Pickup From time,Vrijeme Preuzimanja Do mora biti kasnije od Vreme Preuzimanja Od, +Pickup Type,Tip Preuzimanja, +Pickup from,Preuzimanje od, +Pickup to,Preuzimanje do, +Pipeline By,Lijevak prema, +Plaid Link Failed,Plaid Veya nije uspjela, +Plaid Link Refresh Required,Obavezno Ažuriranje Plaid Veze, +Plaid Link Updated,Plaid Link Ažuriran, +Plan to Request Qty,Planirana Količina, +Plant Dashboard,Nadzorna Tabla Postrojenja, +Plant Floor,Proizvodna Površina, +Please Set Priority,Postavi Prioritet, +Please Specify Account,Navedi Račun, +Please add 'Supplier' role to user {0}.,Dodaj ulogu 'Dobavljač' korisniku {0}., +Please add Request for Quotation to the sidebar in Portal Settings.,Dodaj Zahtjev za Ponudu na bočnu traku u Postavci Portala., +Please add Root Account for - {0},Dodaj Root Račun za - {0}, +Please add atleast one Serial No / Batch No,Molimo dodaj barem jedan Serijski Broj/Šaržni Broj, +Please add the Bank Account column,Dodaj kolonu Bankovni Račun, +Please add the account to root level Company - {0},Dodaj Račun Matičnoj Kompaniji - {0}, +Please add {1} role to user {0}.,Dodaj {1} ulogu korisniku {0}., +Please adjust the qty or edit {0} to proceed.,Podesi količinu ili uredi {0} da nastavite., +Please attach CSV file,Priložite CSV datoteku, +Please cancel and amend the Payment Entry,Poništi i Izmijeni Unos Plaćanja, +Please cancel payment entry manually first,Ručno otkaži Unos Plaćanja, +Please cancel related transaction.,Otkaži povezanu transakciju., +Please check Process Deferred Accounting {0} and submit manually after resolving errors.,Odaberi Obradi Odloženo Knjigovodstvo {0} i podnesi ručno nakon otklanjanja grešaka., +Please check either with operations or FG Based Operating Cost.,Odaberi ili s operacijama ili operativnim troškovima zasnovanim na Gotovom Proizvodu., +Please check the error message and take necessary actions to fix the error and then restart the reposting again.,"Provjeri poruku o grešci i poduzmite potrebne radnje da popravite grešku, a zatim ponovo pokrenite ponovno knjiženje.", +Please check your email to confirm the appointment,Provjeri e-poštu da potvrdite termin, +Please contact any of the following users to extend the credit limits for {0}: {1},Kontaktiraj bilo kojeg od sljedećih korisnika da produžite kreditna ograničenja za {0}: {1}, +Please contact any of the following users to {} this transaction.,Kontaktiraj bilo kojeg od sljedećih korisnika da {} ovu transakciju., +Please contact your administrator to extend the credit limits for {0}.,Kontaktiraj administratora da produži kreditna ograničenja za {0}., +Please create Landed Cost Vouchers against Invoices that have 'Update Stock' enabled.,Kreiraj verifikate za Obračunate Troškove naspram Faktura koje imaju omogućenu opciju „Ažuriraj Zalihe“., +Please create a new Accounting Dimension if required.,Kreiraj novu Knjigovodstvenu Dimenziju ako je potrebno., +Please create purchase from internal sale or delivery document itself,Kreiraj kupovinu iz interne prodaje ili samog dokumenta dostave, +"Please delete Product Bundle {0}, before merging {1} into {2}","Izbriši Artikal Paket {0}, prije spajanja {1} u {2}", +Please do not book expense of multiple assets against one single Asset.,Ne knjiži trošak više imovine naspram pojedinačne imovine., +Please enable Use Old Serial / Batch Fields to make_bundle,Omogući Koristi Stari Serijski / Šaržna polja za Kreiraj Paket, +Please enable only if the understand the effects of enabling this.,Omogući samo ako razumijete efekte omogućavanja., +Please enable {0} in the {1}.,Omogući {0} u {1}., +Please enable {} in {} to allow same item in multiple rows,Omogući {} u {} da dozvolite isti artikal u više redova, +Please ensure that the {0} account is a Balance Sheet account. You can change the parent account to a Balance Sheet account or select a different account.,Potvrdi da je {0} račun račun Bilansa Stanja. Možete promijeniti nadređeni račun u račun Bilansa Stanja ili odabrati drugi račun., +Please ensure that the {0} account {1} is a Payable account. You can change the account type to Payable or select a different account.,Potvrdi da je {0} račun {1} Troškovni račun. Možete promijeniti vrstu računa u Troškovni ili odabrati drugi račun., +Please ensure {} account is a Balance Sheet account.,Potvrdi je li {} račun račun Bilansa Stanja., +Please ensure {} account {} is a Receivable account.,Potvrdi da je {} račun {} račun Potraživanja., +Please enter Root Type for account- {0},Unesi Kontnu Klasu za račun- {0}, +Please enter Serial Nos,Unesi Serijski Broj, +Please enter Shipment Parcel information,Unesi Podatke Paketa Dostave, +Please enter Stock Items consumed during the Repair.,Unesi Artikle Zaliha koje su potrošene tokom Popravke., +Please enter mobile number first.,Unesi broj mobilnog telefona., +Please enter quantity for item {0},Unesi količinu za artikal {0}, +Please enter serial nos,Unesi Serijski Broj, +"Please first set Last Name, Email and Phone for the user","Prvo postavite Prezime, E-poštu i Telefon korisnika", +Please fix overlapping time slots for {0},Popravi preklapanje vremenskih termina za {0}, +Please fix overlapping time slots for {0}.,Popravi preklapanje vremenskih termina za {0}., +Please import accounts against parent company or enable {} in company master.,Uvezi račune naspram matične kompanije ili omogući {} u Postavkama Kompanije., +"Please keep one Applicable Charges, when 'Distribute Charges Based On' is 'Distribute Manually'. For more charges, please create another Landed Cost Voucher.","Zadrži jednu primjenjivu naknadu, kada je 'Distribuiraj Naknade na osnovu' kao 'Distribuiraj Ručno'. Za više troškova, kreiraj drugi Verifikat Obračunatih Troškova.", +Please make sure the file you are using has 'Parent Account' column present in the header.,Potvrdi da datoteka koju koristite ima kolonu 'Nadređeni Račun' u zaglavlju., +Please mention 'Weight UOM' along with Weight.,Navedi 'Jedinicu Težine' zajedno s Težinom., +Please mention '{0}' in Company: {1},Navedi '{0}' u kompaniji: {1}, +Please mention the Current and New BOM for replacement.,Navedi Trenutnu i Novu Sastavnicu za zamjenu., +Please rectify and try again.,Ispravi i pokušaj ponovo., +Please refresh or reset the Plaid linking of the Bank {}.,Osvježi ili poništi Plaid vezu od Banke {}., +Please save before proceeding.,Spremi prije nego što nastaviš., +Please select Bank Account,Odaberi Bankovni Račun, +Please select Finished Good Item for Service Item {0},Molimo odaberi Artikal Gotovog Proizvoda za servisni artikal {0}, +Please select Serial/Batch Nos to reserve or change Reservation Based On to Qty.,Odaberi Serijski/Šaržni Broj da rezervišete ili promijenite rezervaciju na osnovu za Količinu., +Please select Subcontracting Order instead of Purchase Order {0},Odaberi Podizvođački umjesto Kupovnog Naloga {0}, +Please select Unrealized Profit / Loss account or add default Unrealized Profit / Loss account account for company {0},Odaberi Račun Nerealiziranog Rezultata ili postavi Standard Račun Nerealiziranog Rezultata za kompaniju {0}, +Please select a Subcontracting Purchase Order.,Odaberi Podugovorni Kupovni Nalog., +Please select a Warehouse,Odaberi Skladište, +Please select a Work Order first.,Odaberi Radni Nalog., +Please select a country,Odaberi Zemlju, +Please select a customer for fetching payments.,Odaberi Klijenta za preuzimanje plaćanja., +Please select a date,Odaberi Datum, +Please select a date and time,Odaberi Datum i Vrijeme, +Please select a row to create a Reposting Entry,Odaberi red za kreiranje Unosa Ponovnog Knjiženje, +Please select a supplier for fetching payments.,Odaberi Dobavljača za preuzimanje plaćanja., +Please select a valid Purchase Order that has Service Items.,Odaberi važeći Kupovni Nalog koja sadrži servisne artikle., +Please select a valid Purchase Order that is configured for Subcontracting.,Odaberi važeći Kupovni Nalog koji je konfigurisan za Podugovor., +Please select an item code before setting the warehouse.,Odaberite kod artikla prije postavljanja skladišta., +Please select either the Item or Warehouse or Warehouse Type filter to generate the report.,Odaberite filter Artikal ili Skladišta ili Tip Skladišta da biste generirali izvještaj., +Please select items,Odaberi artikle, +Please select items to reserve.,Odaber artikle za rezervaciju., +Please select items to unreserve.,Odaberi artikle koje želite izbrisati iz rezervacije., +Please select only one row to create a Reposting Entry,Odaberi samo jedan red da kreirate Unos Ponovnog Knjiženja, +Please select rows to create Reposting Entries,Odaberi redove da kreirate unose za ponovno knjiženje, +Please select the required filters,Odaberi obavezne filtere, +Please select valid document type.,Odaberi važeći tip dokumenta., +Please set '{0}' in Company: {1},Postavi '{0}' u Kompaniji: {1}, +Please set Account,Postavi Račun, +Please set Accounting Dimension {} in {},Postavi Knjigovodstvenu Dimenziju {} u {}, +Please set Email/Phone for the contact,Postavi E-poštu/Telefon za kontakt, +Please set Fiscal Code for the customer '%s',Postavi Fiskalni Kod za Klijenta '%s', +Please set Fiscal Code for the public administration '%s',Postavi Fiskalni Kod za Javnu Upravu '%s', +Please set Fixed Asset Account in {} against {}.,Postavi Račun Fiksne Imovine u {} naspram {}., +Please set Opening Number of Booked Depreciations,Postavi Početni Broj Knjiženih Amortizacija, +Please set Parent Row No for item {0},Postavi Broj Nadređenog reda za artikal {0}, +Please set Root Type,Postavi Kontni Tip, +Please set Tax ID for the customer '%s',Postavi Fiskalni Broj za Klijenta '%s', +Please set VAT Accounts in {0},Postavi PDV Račune u {0}, +"Please set Vat Accounts for Company: ""{0}"" in UAE VAT Settings","Postavi PDV Račune za Kompaniju: ""{0}"" u postavkama PDV-a UAE", +Please set a Cost Center for the Asset or set an Asset Depreciation Cost Center for the Company {},Postavi Centar Troškova za Imovinu ili postavite Centar Troškova Amortizacije za kompaniju {}, +Please set a default Holiday List for Company {0},Postavi standard Listu Praznika za Kompaniju {0}, +Please set an Address on the Company '%s',Postavi Adresu Kompanije '%s', +Please set an Expense Account in the Items table,Postavi Račun Troškova u tabeli Artikala, +Please set both the Tax ID and Fiscal Code on Company {0},Postavi i Porezni i Fiskalni broj za {0}, +Please set default Exchange Gain/Loss Account in Company {},Postavi Standard Račun Rezultata u Kompaniji {}, +Please set default Expense Account in Company {0},Postavi Standard Račun Troškova u Kompaniji {0}, +Please set default cost of goods sold account in company {0} for booking rounding gain and loss during stock transfer,Postavi standardni račun troška prodanog proizvoda u kompaniji {0} za zaokruživanje knjiženja rezultata tokom prijenosa zaliha, +Please set filters,Postavi filtere, +Please set one of the following:,Postavi jedno od sljedećeg:, +Please set the cost center field in {0} or setup a default Cost Center for the Company.,Postavi Centra Troškova u polje {0} ili postavite Standard Centar Troškova za kompaniju., +Please set {0} first.,Postavi {0}., +Please set {0} in BOM Creator {1},Postavi {0} u Konstruktoru Sastavnice {1}, +Please set {0} in Company {1} to account for Exchange Gain / Loss,Postavi {0} u Kompaniji {1} kako biste knjižili Dobit/Gubitak Deviznog Kursa, +"Please set {0} to {1}, the same account that was used in the original invoice {2}.","Postavi {0} na {1}, isti račun koji je korišten u originalnoj fakturi {2}.", +Please setup and enable a group account with the Account Type - {0} for the company {1},Podesi i omogući grupni račun sa Kontnom Klasom - {0} za Kompaniju {1}, +Please share this email with your support team so that they can find and fix the issue.,Podijeli ovu e-poštu sa svojim timom za podršku kako bi mogli pronaći i riješiti problem., +Please specify a {0} first.,Navedi {0}., +Please try again in an hour.,Pokušaj ponovo za sat vremena., +Please update Repair Status.,Ažuriraj Status Popravke., +Portal User,Korisnik Portala, +Portal Users,Korisnici Portala, +Posting Date Inheritance for Exchange Gain / Loss,Datum knjiženja nasljeđen za Devizni Kurs Rezultata, +Posting Datetime,Datuma Knjiženja, +Powered by {0},Pokreće {0}, +Preview Required Materials,Pregledaj Obavezne Materijale, +"Previous Year is not closed, please close it first","Prethodna Godina nije zatvorena, prvo je zatvorite", +Price ({0}),Cijena ({0}), +Price List Defaults,Standard Cijenovnika, +Price Per Unit ({0}),Cijena po Jedinici ({0}), +Price is not set for the item.,Cijena nije određena za artikal., +Primary Address and Contact,Primarna Adresa i Kontakt, +Primary Contact,Primarni Kontakt, +Primary Party,Primarna Stranka, +Primary Role,Primarna Uloga, +Print Format Builder,Konstruktor Formata Ispisa, +Print Receipt on Order Complete,Ispiši Račun pri dovršenju Naloga, +Print Style,Ispisni Stil, +Printed on {0},Ispisano {0}, +Printing,Ispisivanje, +Priority cannot be lesser than 1.,Prioritet ne može biti manji od 1., +Priority is mandatory,Prioritet je Obavezan, +Probability,Vjerovatnoća, +Process Loss,Procesni Gubitak, +Process Loss Percentage cannot be greater than 100,Procentualni Gubitka Procesa ne može biti veći od 100, +Process Loss Qty,Količinski Gubitak Procesa, +Process Loss Report,Izvještaj Gubitka Procesa, +Process Loss Value,Vrijednost Gubitka Procesa, +Process Payment Reconciliation,Obradi Usaglašavanja Plaćanja, +Process Payment Reconciliation Log,Zapisnik Obrade Usaglašavanja Plaćanja, +Process Payment Reconciliation Log Allocations,Dodjele Zapisnika Obrade Usaglašavanja Plaćanja, +Process Statement Of Accounts CC,Obradi Kopiju Izvoda Računa, +Process Subscription,Obradi Pretplatu, +Process in Single Transaction,Obrada u Jednoj Transakciji, +Processed BOMs,Obrađene Sastavnice, +Processing Sales! Please Wait...,Obrada Prodaje u toku ! Pričekajte..., +Produced / Received Qty,Proizvedena / Primljeno Količina, +Product Price ID,ID Cijene Proizvoda, +Production Plan Already Submitted,Plan Proizvodnje je Podnešen, +Production Plan Item Reference,Referenca Artikla Plana Proizvodnje, +Production Plan Qty,Količina Plana Proizvodnje, +Production Plan Sub Assembly Item,Artikal Podsklopa Plana Proizvodnje, +Production Plan Sub-assembly Item,Artikal Podsklopa Plana Proizvodnje, +Production Plan Summary,Sažetak Plana Proizvodnje, +Profile,Profil, +Profit and Loss Summary,Sažetak Rezultata, +Progress,Napredak, +Progress (%),Napredak (%), +Project Progress:,Napredak Projekta:, +Prompt Qty,Količina, +Prospect,Potencijal, +Prospect Lead,Pperspektivan Potencijalni Klijent, +Prospect Opportunity,Perspektivna Prilika, +Prospect Owner,Potencijal vlasnik, +Prospect {0} already exists,Perspektiva {0} već postoji, +Provisional Account,Privremeni Račun, +Provisional Expense Account,Račun Privremenih Troškova, +Publisher,Izdavač, +Publisher ID,ID Izdavača, +Purchase Order Item reference is missing in Subcontracting Receipt {0},Referenca Artikal Kupovnog Naloga nedostaje u Priznanici Podugovora {0}, +Purchase Orders {0} are un-linked,Kupovni Nalozi {0} nisu povezani, +Purchase Receipt (Draft) will be auto-created on submission of Subcontracting Receipt.,Kupovni Račun (nacrt) će se automatski kreirati pri podnošenju Podugovornog Računa., +Purchase Receipt {0} created.,Kupovni Račun {0} je kreiran., +Purchase Value,Kupovna Vrijednost, +Purchases,Kupovina, +Purposes Required,Svrhe su Obavezne, +Putaway Rule,Pravilo Odlaganja, +Putaway Rule already exists for Item {0} in Warehouse {1}.,Pravilo Odlaganja već postoji za Artikal {0} u Skladištu {1}., +Qty ,Količina , +Qty (Company),Količina (Kompanija), +Qty (Warehouse),Količina (Skladište), +Qty After Transaction,Količina Nakon Transakcije, +Qty As Per BOM,Količina prema Sastavnici, +Qty Change,Promjena Količine, +Qty In Stock,Količina na Zalihama, +Qty Per Unit,Količina po Jedinici, +"Qty To Manufacture ({0}) cannot be a fraction for the UOM {2}. To allow this, disable '{1}' in the UOM {2}.","Količina za Proizvodnju ({0}) ne može biti razlomak za Jedinicu {2}. Da biste to omogućili, onemogući '{1}' u Jedinici {2}.", +Qty To Produce,Količina za Proizvesti, +Qty Wise Chart,Količinski Dijagram, +Qty and Rate,Količina i Cijena, +Qty as Per Stock UOM,Količina po Jedinici Zaliha, +Qty for which recursion isn't applicable.,Količina za koju rekurzija nije primjenjiva., +Qty in Stock UOM,Količina u Jedinici Zaliha, +Qty of Finished Goods Item should be greater than 0.,Količina Gotovog Proizvoda treba da bude veća od 0., +Qty to Be Consumed,Količina za Potrošnju, +Qty to Build,Količina za Proizvodnju, +Qty to Fetch,Količina za Preuzeti, +Qty to Produce,Količina za Proizvodnju, +Qualification Status,Status Kvalifikacije, +Qualified,Kvalificiran, +Qualified By,Kvalificirao, +Qualified on,Kvalificiran, +Quality Inspection Parameter,Parametar Kontrole Kvaliteta, +Quality Inspection Parameter Group,Grupa Parametara Kontrole Kvaliteta, +Quality Inspection Settings,Postavke Kontrole Kvaliteta, +Quality Inspection(s),Kontrola Kvaliteta, +Quantity (A - B),Količina (A - B), +Quantity is required,Količina je obavezna, +"Quantity must be greater than zero, and less or equal to {0}",Količina mora biti veća od nule i manja ili jednaka {0}, +Quantity to Produce should be greater than zero.,Količina za Proizvodnju treba da bude veća od nule., +Quantity to Scan,Količina za Skeniranje, +Quarter {0} {1},Četvrtina {0} {1}, +Queue Size should be between 5 and 100,Veličina Reda čekanja treba biti između 5 i 100, +Quotation Number,Broj Ponude, +Quoted Amount,Navedeni Iznos, +Rate Section,Sekcija Cijena, +Rate of Depreciation (%),Stopa Amortizacije (%), +Rate of Stock UOM,Cijena Jedinice Zaliha, +Ratios,Omjeri, +Raw Material Cost Per Qty,Cijena Sirovine po Količini, +Raw Material Item,Artikal Sirovine, +Raw Material Value,Vrijednost Sirovine, +Raw Materials Actions,Akcije Sirovina, +Raw Materials Warehouse,Skladište Sirovina, +Reached Root,Dostignut je Najviši Nivo, +Reading Value,Vrijednost Čitanja, +Reason for hold:,Razlog Čekanja:, +Rebuild Tree,Ažuriraj Stablo, +Rebuilding BTree for period ...,Obnova BTree-a za period ..., +Recalculate Incoming/Outgoing Rate,Preračunaj Kupovnu/Prodajnu Cijenu, +Recalculating Purchase Cost against this Project...,Preračunavanje Troškova Kupovine naspram ovog Projekta..., +Receivable/Payable Account,Račun Potraživanja / Plaćanja, +Receivable/Payable Account: {0} doesn't belong to company {1},Račun Potraživanja/ Plaćanja: {0} ne pripada kompaniji {1}, +Received Amount After Tax,Primljeni Iznos nakon PDV-a, +Received Amount After Tax (Company Currency),Primljeni iznos nakon PDV-a (Valuta Kompanije), +Received Amount cannot be greater than Paid Amount,Primljeni Iznos ne može biti veći od Plaćenog Iznosa, +Received Qty in Stock UOM,Primljena Količina u Jedinici Zaliha, +Recent Orders,Nedavni Nalozi, +Recent Transactions,Nedavne Transakcije, +Reconcile All Serial Nos / Batches,Usaglasi sve Serijske Brojeve / Šarže, +Reconcile Effect On,Usaglašavanje stupa na snagu, +Reconcile on Advance Payment Date,Usaglasi na Datum Uplate Predujma, +Reconcile the Bank Transaction,Usaglasi Bankovnu Transakciju, +Reconciled Entries,Usaglašeni Unosi, +Reconciliation Date,Datum Usaglašavanja, +Reconciliation Error Log,Zapisnik Grešaka Usaglašavanja, +Reconciliation Logs,Zapisnik Usaglašavanja, +Reconciliation Progress,Napredak Usaglašavanja, +Reconciliation Queue Size,Veličina reda Usaglašavanja, +Reconciliation Takes Effect On,Usaglašavanje Stupa na Snagu, +Recording HTML,HTML Snimanja, +Recoverable Standard Rated expenses should not be set when Reverse Charge Applicable is Y,Standardni nadoknadivi troškovi ne bi trebali biti postavljeni kada je Suprotna Naplata Da, +Recreate Stock Ledgers,Ponovno kreiraj Registar Zaliha, +Recurse Every (As Per Transaction UOM),Povrati Svaki (prema Jedinici Transakcije), +Recurse Over Qty cannot be less than 0,Rekurzija preko Količine ne može biti manja od 0, +Recursive Discounts with Mixed condition is not supported by the system,Sistem ne podržava rekurzivne popuste sa mješovitim uvjetima, +Reference Date for Early Payment Discount,Referentni Datum za popust pri ranijem plaćanju, +Reference Detail,Referentni Detalj, +Reference DocType,Referentni DocType, +Reference Exchange Rate,Referentni Devizni Kurs, +Reference No,Referentni Broj, +Reference number of the invoice from the previous system,Referentni Broj Fakture iz prethodnog sistema, +References to Sales Invoices are Incomplete,Reference na Prodajne Fakture su Nepotpune, +References to Sales Orders are Incomplete,Reference na Prodajne Naloge su Nepotpune, +References {0} of type {1} had no outstanding amount left before submitting the Payment Entry. Now they have a negative outstanding amount.,Reference {0} tipa {1} nisu imale nepodmirenog iznosa prije podnošenja unosa plaćanja. Sada imaju negativan nepodmireni iznos., +Refresh Google Sheet,Osvježite Google Sheet, +Refresh Plaid Link,Osvježite Plaid Link, +Rejected ,Odbijeno , +Rejected Serial and Batch Bundle,Odbijen Serijski i Šaržni Paket, +Rejected Warehouse and Accepted Warehouse cannot be same.,Odbijeno i Prihvaćeno Skladište ne mogu biti isto., +Remarks Column Length,Dužina Kolone Napomene, +Remove Parent Row No in Items Table,Ukloni Nadređeni Red Broj u Tabeli Artikala, +Remove SABB Entry,Ukloni Unos Serijskog i Šaržnog Paketa, +Removing rows without exchange gain or loss,Uklanjanje redova bez dobitka ili gubitka na deviznom kursu, +Repair,Popravi, +Repair Asset,Popravi Imovinu, +Repair Details,Detalji Popravke, +"Replace a particular BOM in all other BOMs where it is used. It will replace the old BOM link, update cost and regenerate ""BOM Explosion Item"" table as per new BOM. +It also updates latest price in all the BOMs.","Zamijeni određenu Sastavnicu u svim ostalim Sastavnicama gdje se koristi. Zamijenit će staru vezu Sastavnice, ažurirati troškove i regenerirati tabelu ""Artikal Nestavljene Sastavnice"" prema novoj Sastavnici. +Također ažurira najnoviju cijenu u svim Sastavnicama.", +Report Error,Prijavi Grešku, +Report Filters,Izvještajni Filteri, +Report View,Pregled Izvještaja, +Repost Accounting Ledger,Ponovo knjiži Knjigovodstveni Registar, +Repost Accounting Ledger Items,Unosi Ponovnog Knjiženja Knjigovodstvenog Registra, +Repost Accounting Ledger Settings,Postavke ponovnog knjiženja Knjigovodstvenog Registra, +Repost Allowed Types,Dozvoljeni Tipovi Ponovnog Knjiženja, +Repost Error Log,Zapisnik Grešaka Ponovnog Knjiženja, +Repost Item Valuation,Ponovo Knjiži Vrijednost Artikla, +Repost Payment Ledger,Ponovo Knjiži Registar Plaćanja, +Repost Payment Ledger Items,Artikal Ponovnog Knjiženja Registra Plaćanja, +Repost Status,Status Ponovnog Knjiženja, +Repost has started in the background,Ponovno Knjiženje je započeto u pozadini, +Repost in background,Ponovo Knjiži u pozadini, +Repost started in the background,Ponovno Knjiženje je započeto u pozadini, +Reposting Completed {0}%,Ponovno Knjiženje je izavršeno do {0}%, +Reposting Data File,Datoteke Podataka Ponovnog Knjiženja, +Reposting Info,Informacija Ponovnog Knjiženja, +Reposting Progress,Napredak Ponovnog Knjiženja, +Reposting entries created: {0},Unosi Ponovno kniženja kreirani: {0}, +Reposting has been started in the background.,Ponovno Knjiženje je započeto u pozadini., +Reposting in the background.,Ponovno Knjiženje u pozadini., +Represents a Financial Year. All accounting entries and other major transactions are tracked against the Fiscal Year.,Predstavlja Finansijsku Godinu. Svi knjigovodstveni unosi i druge velike transakcije prate se naspram Fiskalne Godine., +Request Parameters,Parametri Zahtjeva, +Request Timeout,Zahtjev je Istekao, +Reservation Based On,Rezervacija Na Osnovu, +Reserve,Rezerviši, +Reserve Stock,Rezerviši Zalihe, +"Reserved Qty ({0}) cannot be a fraction. To allow this, disable '{1}' in UOM {3}.","Rezervisana Količina ({0}) ne može biti razlomak. Da biste to omogućili, onemogući '{1}' u Jedinici {3}.", +Reserved Qty for Production Plan,Rezervisana Količina za Plan Proizvodnje, +Reserved Qty for Subcontract,Rezervisana Količina za Podugovor, +Reserved Qty should be greater than Delivered Qty.,Rezervisana Količina bi trebala biti veća od Dostavljene Količine., +Reserved Serial No.,Rezervisani Serijski Broj, +Reserved Stock,Rezervisane Zalihe, +Reserved Stock for Batch,Rezervisane Zalihe za Šaržu, +Reserved for POS Transactions,Rezervirano za Kasa Transakcije, +Reserved for Production,Rezervisano za Proizvodnju, +Reserved for Production Plan,Rezervisano za Plan Proizvodnje, +Reserved for Sub Contracting,Rezervirano za Podugovor, +Reserving Stock...,Rezervacija Zaliha..., +Reset Company Default Values,Poništi Standard Vrijednosti Kompanije, +Reset Plaid Link,Poništi Plaid Link, +Reset Raw Materials Table,Poništi Tabelu Sirovina, +Resolution Due,Rok Rješenja, +Response and Resolution,Odgovor i Rezolucija, +Restart,Ponovo pokreni, +Restore Asset,Vrati Imovinu, +Restrict,Ograniči, +Restrict Items Based On,Ograniči Artikle na osnovu, +Result Key,Ključ Rezultata, +Resume Job,Nastavi Posao, +Resume Timer,Nastavi Tajmer, +Retried,Ponovo pokušao, +Retry,Ponovi, +Retry Failed Transactions,Ponovi Neuspjele Transakcije, +Return Against,Povrat Naspram, +Return Against Subcontracting Receipt,Povrat naspram Podizvođačkog Računa , +Return Components,Povrat Komponenti, +Return Issued,Povrat Izdat, +Return Qty,Povratna Količina, +Return Qty from Rejected Warehouse,Povratna Količina iz Odbijenog Skladišta, +Return of Components,Povrat Komponenti, +Returned,Vraćeno, +Returned Against,Povrat naspram, +Returned Qty ,Vraćeno Količina, +Returned Qty in Stock UOM,Vraćena količina u Jedinici Zaliha, +Returned exchange rate is neither integer not float.,Vraćeni Devizni Kurs nije ni ceo broj ni zarezni broj., +Revaluation Journals,Revaloracijski Žurnali, +Revaluation Surplus,Revalorizacioni Višak, +Revenue,Prihod, +Reversal Of,Suprotno od, +Right Child,Desno Podređen, +Role Allowed to Create/Edit Back-dated Transactions,Uloga dozvoljena da Kreira/Uređuje Transakcije s prijašnjim datumom, +Role Allowed to Over Bill ,Uloga dozvoljena da prekomjerno Fakturiše , +Role Allowed to Over Deliver/Receive,Uloga dozvoljena za prekomjernu Dostavu/Primanje, +Role Allowed to Override Stop Action,Uloga dozvoljena da Poništi Akciju Zaustavljanja, +Role allowed to bypass Credit Limit,Uloga dozvoljena da zaobiđe Kreditno Ograničenje, +Root,Korijen, +"Root Type for {0} must be one of the Asset, Liability, Income, Expense and Equity","Kontna Klasa za {0} mora biti jedna od imovine, obaveza, prihoda, rashoda i kapitala", +Round Free Qty,Zaoktuži Besplatnu Kolićinu, +Round Off Tax Amount,Zaokruženi Iznos PDV-a, +Round Off for Opening,Zaokruži Početno, +Round Tax Amount Row-wise,Zaokruži Iznos PDV-a po redovima, +Rounding Loss Allowance,Dozvola Zaokruživanja Gubitka, +Rounding Loss Allowance should be between 0 and 1,Dozvola Zaokruživanje Gubitka treba da bude između 0 i 1, +Rounding gain/loss Entry for Stock Transfer,Unos Zaokruživanja Rezultat za Prijenos Zaliha, +Row #,Red #, +Row # {0}:,Red # {0}:, +Row # {0}: Please add Serial and Batch Bundle for Item {1},Red # {0}: Dodaj Serijski i Šaržni Paket za Artikal {1}, +Row #{0}: A reorder entry already exists for warehouse {1} with reorder type {2}.,Red #{0}: Unos ponovnog naručivanja već postoji za skladište {1} sa tipom ponovnog naručivanja {2}., +Row #{0}: Acceptance Criteria Formula is incorrect.,Red #{0}: Formula Kriterijuma Prihvatanja je netačna., +Row #{0}: Acceptance Criteria Formula is required.,Red #{0}: Formula Kriterijuma Prihvatanja je obavezna., +Row #{0}: Accepted Warehouse and Rejected Warehouse cannot be same,Red #{0}: Prihvaćeno Skladište i Odbijeno Skladište ne mogu biti isto, +Row #{0}: Accepted Warehouse is mandatory for the accepted Item {1},Red #{0}: Prihvaćeno Skladište je obavezno za Prihvaćeni Artikal {1}, +Row #{0}: Allocated Amount cannot be greater than Outstanding Amount of Payment Request {1},Red #{0}: Dodijeljeni Iznos ne može biti veći od Nepodmirenog Iznosa zahtjeva za plaćanje {1}, +Row #{0}: Allocated amount:{1} is greater than outstanding amount:{2} for Payment Term {3},Red #{0}: Dodijeljeni iznos:{1} je veći od nepodmirenog iznosa:{2} za rok plaćanja {3}, +Row #{0}: Amount must be a positive number,Red #{0}: Iznos mora biti pozitivan broj, +Row #{0}: BOM is not specified for subcontracting item {0},Red #{0}: Sastavnica nije navedena za podizvođački artikal {0}, +Row #{0}: Batch No {1} is already selected.,Red #{0}: Broj Šarže {1} je već odabran., +Row #{0}: Cannot allocate more than {1} against payment term {2},Red #{0}: Ne može se dodijeliti više od {1} naspram uslova plaćanja {2}, +Row #{0}: Cannot transfer more than Required Qty {1} for Item {2} against Job Card {3},Red #{0}: Ne može se prenijeti više od potrebne količine {1} za artikal {2} naspram Radne Kartice {3}, +Row #{0}: Consumed Asset {1} cannot be Draft,Red #{0}: Potrošena Imovina {1} ne može biti nacrt, +Row #{0}: Consumed Asset {1} cannot be cancelled,Red #{0}: Potrošena Imovina {1} ne može se poništiti, +Row #{0}: Consumed Asset {1} cannot be the same as the Target Asset,Red #{0}: Potrošena imovina {1} ne može biti isto što i Ciljna Imovina, +Row #{0}: Consumed Asset {1} cannot be {2},Red #{0}: Potrošena Imovina {1} ne može biti {2}, +Row #{0}: Consumed Asset {1} does not belong to company {2},Red #{0}: Potrošena Imovina {1} ne pripada kompaniji {2}, +Row #{0}: Cumulative threshold cannot be less than Single Transaction threshold,Red #{0}: Kumulativni prag ne može biti manji od praga pojedinačne transakcije, +Row #{0}: Dates overlapping with other row,Red #{0}: Datumi se preklapaju sa drugim redom, +Row #{0}: Default BOM not found for FG Item {1},Red #{0}: Standard Sastavnica nije pronađena za gotov proizvod artikla {1}, +Row #{0}: Expense Account not set for the Item {1}. {2},Red #{0}: Račun Troškova nije postavljen za artikal {1}. {2}, +Row #{0}: Finished Good Item Qty can not be zero,Red #{0}: Količina gotovog proizvoda artikla ne može biti nula, +Row #{0}: Finished Good Item is not specified for service item {1},Red #{0}: Gotov Proizvod artikla nije navedena zaservisni artikal {1}, +Row #{0}: Finished Good Item {1} must be a sub-contracted item,Red #{0}: Gotov Proizvod Artikla {1} mora biti podugovorni artikal, +Row #{0}: Finished Good reference is mandatory for Scrap Item {1}.,Red #{0}: Gotov Proizvod referenca je obavezna za Otpadni Artikal {1}., +Row #{0}: For {1} Clearance date {2} cannot be before Cheque Date {3},Red #{0}: Za {1} datum odobrenja {2} ne može biti prije datuma Čeka {3}, +"Row #{0}: For {1}, you can select reference document only if account gets credited","Red #{0}: Za {1}, možete odabrati referentni dokument samo ako je račun kreditiran", +"Row #{0}: For {1}, you can select reference document only if account gets debited","Red #{0}: Za {1}, možete odabrati referentni dokument samo ako račun bude zadužen", +Row #{0}: From Date cannot be before To Date,Red #{0}: Od datuma ne može biti prije Do datuma, +Row #{0}: Item {1} does not exist,Red #{0}: Artikel {1} ne postoji, +"Row #{0}: Item {1} has been picked, please reserve stock from the Pick List.","Red #{0}: Artikal {1} je odabran, rezerviši zalihe sa Liste Odabira.", +Row #{0}: Item {1} is not a service item,Red #{0}: Artikal {1} nije servisni artikal, +Row #{0}: Item {1} is not a stock item,Red #{0}: Artikal {1} nije artikal na zalihama, +Row #{0}: Only {1} available to reserve for the Item {2},Red #{0}: Samo {1} je dostupno za rezervisanje za artikal {2}, +Row #{0}: Please select Item Code in Assembly Items,Red #{0}: Odaberi Kod Artikla u Artiklima Montaže, +Row #{0}: Please select the BOM No in Assembly Items,Red #{0}: Odaberi broj Spiska Materijala u Artiklima Montaže, +Row #{0}: Please select the Sub Assembly Warehouse,Red #{0}: Odaberi Skladište Podmontaže, +Row #{0}: Please update deferred revenue/expense account in item row or default account in company master,Red #{0}: Ažuriraj račun odloženih prihoda/troškova u redu artikla ili sttandard račun u postavkama kompanije, +Row #{0}: Qty increased by {1},Red #{0}: Količina povećana za {1}, +Row #{0}: Qty must be a positive number,Red #{0}: Količina mora biti pozitivan broj, +Row #{0}: Qty should be less than or equal to Available Qty to Reserve (Actual Qty - Reserved Qty) {1} for Iem {2} against Batch {3} in Warehouse {4}.,Red #{0}: Količina bi trebala biti manja ili jednaka Dostupnoj Količini za Rezervaciju (stvarna količina - rezervisana količina) {1} za artikal {2} naspram Šarže {3} u Skladištu {4}., +Row #{0}: Quality Inspection is required for Item {1},Red #{0}: Kontrola Kvaliteta je obavezna za artikal {1}, +Row #{0}: Quality Inspection {1} is not submitted for the item: {2},Red #{0}: Kontrola kKvaliteta {1} nije dostavljena za artikal: {2}, +Row #{0}: Quality Inspection {1} was rejected for item {2},Red #{0}: Kontrola Kvaliteta {1} je odbijena za artikal {2}, +Row #{0}: Quantity to reserve for the Item {1} should be greater than 0.,Red #{0}: Količina koju treba rezervisati za artikal {1} treba biti veća od 0., +Row #{0}: Rate must be same as {1}: {2} ({3} / {4}),Red #{0}: Cijena mora biti ista kao {1}: {2} ({3} / {4}), +Row #{0}: Rejected Qty cannot be set for Scrap Item {1}.,Red #{0}: Odbijena Količina ne može se postaviti za Artikal Otpada {1}., +Row #{0}: Rejected Warehouse is mandatory for the rejected Item {1},Red #{0}: Odbijeno Skladište je obavezno za odbijeni artikal {1}, +Row #{0}: Scrap Item Qty cannot be zero,Red #{0}: Količina Otpadnih Artikala ne može biti nula, +"Row #{0}: Selling rate for item {1} is lower than its {2}. + Selling {3} should be atleast {4}.

Alternatively, + you can disable selling price validation in {5} to bypass + this validation.","Red #{0}: Prodajna Cijena za artikal {1} je niža od njegovog {2}. + Prodajna Cijena {3} bi trebala biti najmanje {4}.

Alternativno, + možete onemogućiti validaciju prodajne cijene u {5} da biste zaobišli + ovu validaciju.", +Row #{0}: Serial No {1} for Item {2} is not available in {3} {4} or might be reserved in another {5}.,Red #{0}: Serijski broj {1} za artikal {2} nije dostupan u {3} {4} ili može biti rezervisan u drugom {5}., +Row #{0}: Serial No {1} is already selected.,Red #{0}: Serijski Broj {1} je već odabran., +Row #{0}: Start Time and End Time are required,Red #{0}: Vrijeme Početka i Vrijeme Završetka je obavezno, +Row #{0}: Start Time must be before End Time,Red #{0}: Vrijeme Početka mora biti prije Vremena Završetka, +Row #{0}: Status is mandatory,Red #{0}: Status je obavezan, +Row #{0}: Stock cannot be reserved for Item {1} against a disabled Batch {2}.,Red #{0}: Zaliha se ne može rezervisati za artikal {1} naspram onemogućene Šarže {2}., +Row #{0}: Stock cannot be reserved for a non-stock Item {1},Red #{0}: Zalihe se ne mogu rezervirati za artikal bez zaliha {1}, +Row #{0}: Stock cannot be reserved in group warehouse {1}.,Red #{0}: Zalihe se ne mogu rezervisati u grupnom skladištu {1}., +Row #{0}: Stock is already reserved for the Item {1}.,Red #{0}: Zaliha je već rezervisana za artikal {1}., +Row #{0}: Stock is reserved for item {1} in warehouse {2}.,Red #{0}: Zalihe su rezervisane za artikal {1} u skladištu {2}., +Row #{0}: Stock not available to reserve for Item {1} against Batch {2} in Warehouse {3}.,Red #{0}: Zaliha nije dostupna za rezervisanje za artikal {1} naspram Šarže {2} u Skladištu {3}., +Row #{0}: Stock not available to reserve for the Item {1} in Warehouse {2}.,Red #{0}: Zaliha nije dostupna za rezervisanje za artikal {1} u skladištu {2}., +Row #{0}: The warehouse {1} is not a child warehouse of a group warehouse {2},Red #{0}: Skladište {1} nije podređeno skladište grupnog skladišta {2}, +Row #{0}: You cannot use the inventory dimension '{1}' in Stock Reconciliation to modify the quantity or valuation rate. Stock reconciliation with inventory dimensions is intended solely for performing opening entries.,Red #{0}: Ne možete koristiti dimenziju zaliha '{1}' u usaglašavanju zaliha za izmjenu količine ili stope vrednovanja. Usaglašavanje zaliha sa dimenzijama zaliha namijenjeno je isključivo za obavljanje početnih unosa., +Row #{0}: You must select an Asset for Item {1}.,Red #{0}: Odaberi Imovinu za Artikal {1}., +Row #{0}: {1} is not a valid reading field. Please refer to the field description.,Red #{0}: {1} nije važeće polje za čitanje. Pogledaj opis polja., +Row #{0}: {1} of {2} should be {3}. Please update the {1} or select a different account.,Red #{0}: {1} od {2} bi trebao biti {3}. Ažuriraj {1} ili odaberi drugi račun., +Row #{1}: Warehouse is mandatory for stock Item {0},Red #{1}: Skladište je obavezno za artikal {0}, +Row #{}: Finance Book should not be empty since you're using multiple.,Red #{}: Finansijski Registar ne smije biti prazan jer ih koristite više., +Row #{}: Please use a different Finance Book.,Red #{}: Koristi drugi Finansijski Registar., +Row #{}: The original Invoice {} of return invoice {} is not consolidated.,Red #{}: Originalna Faktura {} povratne fakture {} nije objedinjena., +Row #{}: item {} has been picked already.,Red #{}: Artikal {} je već odabran., +Row #{}: {} {} doesn't belong to Company {}. Please select valid {}.,Red #{}: {} {} ne pripada kompaniji {}. Odaberi važeći {}., +Row No {0}: Warehouse is required. Please set a Default Warehouse for Item {1} and Company {2},Red br {0}: Skladište je obezno. Postavite standard skladište za artikal {1} i kompaniju {2}, +Row Number,Broj reda, +Row {0},Red {0}, +"Row {0} picked quantity is less than the required quantity, additional {1} {2} required.","Red {0} odabrana količina je manja od potrebne količine, potrebno je dodatno {1} {2}.", +Row {0}# Item {1} cannot be transferred more than {2} against {3} {4},Red {0}# Artikal {1} se ne može prenijeti više od {2} naspram {3} {4}, +Row {0}# Item {1} not found in 'Raw Materials Supplied' table in {2} {3},Red {0}# Artikal {1} nije pronađen u tabeli 'Isporučene Sirovine' u {2} {3}, +Row {0}: Accepted Qty and Rejected Qty can't be zero at the same time.,Red {0}: Prihvaćena Količina i Odbijena Količina ne mogu biti nula u isto vrijeme., +Row {0}: Account {1} and Party Type {2} have different account types,Red {0}: Račun {1} i Tip Stranke {2} imaju različite tipove računa, +Row {0}: Allocated amount {1} must be less than or equal to invoice outstanding amount {2},Red {0}: Dodijeljeni iznos {1} mora biti manji ili jednak nepodmirenom iznosu fakture {2}, +Row {0}: Allocated amount {1} must be less than or equal to remaining payment amount {2},Red {0}: Dodijeljeni iznos {1} mora biti manji ili jednak preostalom iznosu plaćanja {2}, +"Row {0}: As {1} is enabled, raw materials cannot be added to {2} entry. Use {3} entry to consume raw materials.","Red {0}: Kako je {1} omogućen, sirovine se ne mogu dodati u {2} unos. Koristite {3} unos za potrošnju sirovina.", +Row {0}: Both Debit and Credit values cannot be zero,Red {0}: Vrijednosti debita i kredita ne mogu biti nula, +Row {0}: Cost Center {1} does not belong to Company {2},Red {0}: Centar Troškova {1} ne pripada kompaniji {2}, +Row {0}: Either Delivery Note Item or Packed Item reference is mandatory.,Red {0}: Ili je Artikal Dostavnice ili Pakirani Artikal referenca obavezna., +Row {0}: Expense Head changed to {1} as no Purchase Receipt is created against Item {2}.,Red {0}: Račun Troškova je promijenjen u {1} jer se nije kreirao Kupovni Račun naspram artikla {2}., +Row {0}: Expense Head changed to {1} because account {2} is not linked to warehouse {3} or it is not the default inventory account,Red {0}: Račun Troškova je promijenjen u {1} jer račun {2} nije povezan sa skladištem {3} ili nije standard račun zaliha, +Row {0}: Expense Head changed to {1} because expense is booked against this account in Purchase Receipt {2},Red {0}: Račun Troškova je promijenjen u {1} jer je trošak knjižen naspram ovaog računa u Kupovnom Računu {2}, +Row {0}: From Warehouse is mandatory for internal transfers,Red {0}: Iz skladišta je obavezano za interne prijenose, +Row {0}: Item Tax template updated as per validity and rate applied,Red {0}: Šablon PDV-a za Artikal ažuriran je prema valjanosti i primijenjenoj cijeni, +Row {0}: Item rate has been updated as per valuation rate since its an internal stock transfer,Red {0}: Cijena artikla je ažurirana prema stopi vrednovanja zato što je ovo interni prijenos zaliha, +Row {0}: Item {1} must be a stock item.,Red {0}: Artikal {1} mora biti artikal na zalihama., +Row {0}: Item {1} must be a subcontracted item.,Red {0}: Artikal {1} mora biti podugovorni artikal., +Row {0}: Item {1}'s quantity cannot be higher than the available quantity.,Red {0}: Količina Artikla {1} ne može biti veća od raspoložive količine., +Row {0}: Packed Qty must be equal to {1} Qty.,Red {0}: Pakovana Količina mora biti jednaka {1} Količini., +Row {0}: Packing Slip is already created for Item {1}.,Red {0}: Otpremnica je već kreirana za artikal {1}., +Row {0}: Payment Term is mandatory,Red {0}: Uslov Plaćanja je obavezan, +Row {0}: Please provide a valid Delivery Note Item or Packed Item reference.,Red {0}: Navedi važeću referencu Artikla Dostavnice ili Pakiranog Artikla., +Row {0}: Please select a BOM for Item {1}.,Red {0}: Odaberi Sastavnicu za artikal {1}., +Row {0}: Please select an active BOM for Item {1}.,Red {0}: Odaberi Aktivnu Sastavnicu za artikal {1}., +Row {0}: Please select an valid BOM for Item {1}.,Red {0}: Odaberi važeću Sastavnicu za artikal{1}., +Row {0}: Project must be same as the one set in the Timesheet: {1}.,Red {0}: Projekat mora biti isti kao onaj postavljen u Radnoj Listi: {1}., +Row {0}: Purchase Invoice {1} has no stock impact.,Red {0}: Kupovna Faktura {1} nema utjecaja na zalihe., +Row {0}: Qty cannot be greater than {1} for the Item {2}.,Red {0}: Količina ne može biti veća od {1} za artikal {2}., +Row {0}: Qty in Stock UOM can not be zero.,Red {0}: Količina u Jedinici Zaliha ne može biti nula., +Row {0}: Qty must be greater than 0.,Red {0}: Količina mora biti veća od 0., +Row {0}: Quantity cannot be negative.,Red {0}: Količina ne može biti negativna., +Row {0}: Shift cannot be changed since the depreciation has already been processed,Red {0}: Smjena se ne može promijeniti jer je amortizacija već obrađena, +Row {0}: Target Warehouse is mandatory for internal transfers,Red {0}: Ciljno Skladište je obavezno za interne transfere, +"Row {0}: To set {1} periodicity, difference between from and to date must be greater than or equal to {2}","Red {0}: Za postavljanje {1} periodičnosti, razlika između od i do datuma mora biti veća ili jednaka {2}", +Row {0}: Total Number of Depreciations cannot be less than or equal to Opening Number of Booked Depreciations,Red {0}: Ukupan broj amortizacija ne može biti manji ili jednak početnom broju knjiženih amortizacija, +Row {0}: Workstation or Workstation Type is mandatory for an operation {1},Red {0}: Radna Stanica ili Tip Radne Stanice je obavezan za operaciju {1}, +Row {0}: {1} account already applied for Accounting Dimension {2},Red {0}: {1} račun je već primijenjen za Knjigovodstvenu Dimenziju {2}, +Row {0}: {1} {2} cannot be same as {3} (Party Account) {4},Red {0}: {1} {2} ne može biti isto kao {3} (Račun Stranke) {4}, +Row {0}: {2} Item {1} does not exist in {2} {3},Red {0}: {2} Artikal {1} ne postoji u {2} {3}, +Row({0}): Outstanding Amount cannot be greater than actual Outstanding Amount {1} in {2},Red ({0}): Nepodmireni Iznos ne može biti veći od stvarnog Nepodmirenog Iznosa {1} u {2}, +Rows with Same Account heads will be merged on Ledger,Redovi sa unosom istog računa će se spojiti u Registru, +Rows: {0} have 'Payment Entry' as reference_type. This should not be set manually.,Redovi: {0} imaju 'Unos Plaćanja' kao Tip Reference. Ovo ne treba postavljati ručno., +Rows: {0} in {1} section are Invalid. Reference Name should point to a valid Payment Entry or Journal Entry.,Redovi: {0} u {1} sekciji su nevažeći. Naziv reference treba da ukazuje na važeći Unos Plaćanja ili Nalog Knjiženja., +Run parallel job cards in a workstation,Pokreni paralelne radne kartice na radnom mjestu, +Running,Obrađivanje u toku, +SCO Supplied Item,Dostavljeni Artikal Podizvođačkog Naloga, +SLA Fulfilled On,Standard Nivo Servisa Ispunjen, +SLA Fulfilled On Status,Standard Nivo Servisa Ispunjen na Status, +SLA Paused On,Standard Nivo Servisa Pauziran, +SLA will be applied if {1} is set as {2}{3},Standard Nivo Servisa će se primijeniti ako je {1} postavljen kao {2}{3}, +SLA will be applied on every {0},Standard Nivo Servisa će se primjenjivati na svaki {0}, +SMS Settings,SMS Postavke, +SO Total Qty,Ukupna Količina Prodajnog Naloga, +Salary Currency,Valuta Plate, +Sales Incoming Rate,Prodajna Ulazna Cijena, +Sales Invoice {0} must be deleted before cancelling this Sales Order,Prodajna Faktura {0} mora se izbrisati prije otkazivanja ovog Prodajnog Naloga, +Sales Order Packed Item,Pakovani Artikal Prodajnog Naloga, +Sales Order Reference,Referenca Prodajnog Naloga, +Sales Order Status,Status Prodajnog Naloga, +"Sales Order {0} already exists against Customer's Purchase Order {1}. To allow multiple Sales Orders, Enable {2} in {3}","Prodajni Nalog {0} već postoji naspram Kupovnog Naloga {1}. Da dozvolite višestruke Prodajne Naloge, omogući {2} u {3}", +Sales Partner ,Partner Prodaje , +Sales Partner Item,Artikal Prodajnog Partnera, +Sales Partner Target Variance Based On Item Group,Odstupanje Cilja Prodajnog Partnera zasnovana na Grupi Artikla, +Sales Person {0} is disabled.,Prodavač {0} je onemogućen., +Sales Pipeline Analytics,Analiza Prodaje, +Sales Update Frequency in Company and Project,Učestalost Ažuriranja Prodaje u Kompaniji i Projektu, +Sales Value,Prodajna Vrijednost, +Salvage Value Percentage,Procentualna Vrijednosti Recikliže, +Same item and warehouse combination already entered.,Ista kombinacija artikla i skladišta je već unesena., +Savings,Štednja, +Scan Batch No,Skeniraj Broj Šarže, +Scan Mode,Način Skeniranja, +Scan Serial No,Skeniraj Serijski Broj, +Scan barcode for item {0},Skenirajte bar kod za artikal {0}, +"Scan mode enabled, existing quantity will not be fetched.","Način skeniranja je omogućen, postojeća količina neće biti preuzeta.", +Scanned Quantity,Skenirana Količina, +Scheduled Time Logs,Zapisi Planiranog Vremena, +Scheduler is Inactive. Can't trigger job now.,Raspoređivač je neaktivan. Sada nije moguće pokrenuti posao., +Scheduler is Inactive. Can't trigger jobs now.,Raspoređivač je neaktivan. Sada nije moguće pokrenuti poslove., +Scheduler is inactive. Cannot enqueue job.,Raspoređivač je neaktivan. Nije moguće staviti posao u red čekanja., +Scheduler is inactive. Cannot merge accounts.,Raspoređivač je neaktivan. Nije moguće spojiti račune., +Scheduling,Raspored, +"Scorecard variables can be used, as well as: +{total_score} (the total score from that period), +{period_number} (the number of periods to present day) +","Mogu se koristiti varijable Bodovne Tablice, kao i: +{total_score} (ukupno bodovanje iz tog razdoblja), +{period_number} (broj razdoblja do današnjeg dana). +", +Scrap & Process Loss,Otpad & Gubitak u Procesu, +Scrap Asset,Rashodovana Imovina, +Scrap Cost Per Qty,Trošak Otpada po Količini, +Scrap Item Code,Kod Artikla Otpada, +Scrap Item Name,Naziv Artikla Otpada, +"Search by item code, serial number or barcode","Pretražuj po kodu artikla, serijskom broju ili barkodu", +Secondary Party,Sekundarna Stranka, +Secondary Role,Sekundarna Uloga, +Section,Sekcija, +Segregate Serial / Batch Bundle,Razdvoji Serijski / Šaržni Paket, +Select Accounting Dimension.,Odaberi Knjigovodstvenu Dimenziju., +Select Alternative Items for Sales Order,Odaberite Alternativni Artikal za Prodajni Nalog, +Select Batch No,Odaberi Broj Šarže, +Select Columns and Filters,Odaberi Kolone i Filtere, +Select Corrective Operation,Odaberi Popravnu Operaciju, +Select Date of Birth. This will validate Employees age and prevent hiring of under-age staff.,Navedi Datum Rođenja. Ovo će potvrditi dob personala i spriječiti zapošljavanje maloljetnih osoba., +"Select Date of joining. It will have impact on the first salary calculation, Leave allocation on pro-rata bases.","Odaberi Datum pridruživanja. To će uticati na prvi obračun plate, raspodjelu odsustva po proporcionalnoj osnovi.", +Select Dimension,Odaberi Dimenziju, +Select Finished Good,Odaberi Fotov Proizvod, +Select Items for Quality Inspection,Odaberi Artikle za Inspekciju Kvaliteta, +Select Job Worker Address,Odaberi Adresu Podizvođača, +Select Serial No,Odaberi Serijski Broj, +Select Serial and Batch,Odaberi Serijski Broj I Šaržu, +Select Time,Odaberi Vrijeme, +Select View,Odaberi Prikaz, +Select Vouchers to Match,Odaber Verifikate za Podudaranje, +Select Warehouses to get Stock for Materials Planning,Odaberi Skladišta ta preuzimanje Zalihe za Planiranje Materijala, +Select a Company this Employee belongs to.,Navedi Kompaniju kojoj ovaj personal pripada., +Select a Customer,Odaberi Klijenta, +Select an Item Group.,Odaberi Grupu Artikla., +Select an invoice to load summary data,Odaberi fakturu za učitavanje sažetih podataka, +Select an item from each set to be used in the Sales Order.,Odaber artikal iz svakog skupa koja će se koristiti u Prodajnom Nalogu., +Select the Default Workstation where the Operation will be performed. This will be fetched in BOMs and Work Orders.,Odaberi Standard Radnu Stanicu na kojoj će se izvoditi operacija. Ovo će se preuzeti u Spiskovima Materijala i Radnim Nalozima., +Select the Item to be manufactured.,Odaberi Artikal za Proizvodnju., +"Select the Item to be manufactured. The Item name, UoM, Company, and Currency will be fetched automatically.","Odaber Artikal za Proizvodnju. Naziv Artikla, Jedinica, Kompanija i Valuta će se automatski preuzeti.", +Select the Warehouse,Odaberi Skladište, +Select the date and your timezone,Odaberi Datum i Vremensku Zonu, +Select the raw materials (Items) required to manufacture the Item,Odaberite Sirovine (Artikle) obavezne za proizvodnju artikla, +"Select whether to get items from a Sales Order or a Material Request. For now select Sales Order. + A Production Plan can also be created manually where you can select the Items to manufacture.","Odaberi hoćete li preuzeti artikle iz Prodajnog Naloga ili Materijalnog Naloga. Za sada odaberi Prodajni Nalog. + Plan Proizvodnje se može kreirati i ručno gdje možete odabrati artikle za proizvodnju.", +Select your weekly off day,Odaberi sedmicni slobodan dan, +Selected Serial and Batch Bundle entries have been removed.,Odabrani unosi Serijskih i Šaržnih Paketa su uklonjeni., +Selected Vouchers,Odabrani Verifikati, +Selected date is,Odabrani datum je, +Selected document must be in submitted state,Odabrani dokument mora biti u podnešenom stanju, +Self delivery,Samostalna Dostava, +Sell Asset,Prodaj Imovinu, +Send Attached Files,Pošalji priložene datoteke, +Send Document Print,Pošalji Ispis, +Send Emails,Pošalji e-poštu, +Sending...,Slanje u toku..., +Sequential,Sekvencijalno, +Serial & Batch Item,Serijski & Šaržni Artikal, +Serial & Batch Item Settings,Postavke za Serijski & Šaržni Artikal, +Serial / Batch Bundle,Serijski / Šaržni Paket, +Serial / Batch Bundle Missing,Serijski / Šaržni Paket, +Serial / Batch No,Serijski / Šaržni Broj, +Serial / Batch Nos,Serijski / Šaržni Broj, +Serial No Ledger,Serijski Broj Registar, +Serial No Range,Serijski Broj Raspon, +Serial No and Batch Selector cannot be use when Use Serial / Batch Fields is enabled.,Serijski Broj i odabirač Šarže ne mogu se koristiti kada je omogućeno Koristi Serijski Broj / Šaržna Polja., +Serial No and Batch for Finished Good,Serijski Broj i Šarža Gotovog Proizvoda, +Serial No is mandatory,Serijski Broj je Obavezan, +Serial No {0} already exists,Serijski Broj {0} već postoji, +Serial No {0} already scanned,Serijski Broj {0} je već skeniran, +Serial No {0} does not exists,Serijski Broj {0} ne postoji, +Serial No {0} is already added,Serijski Broj {0} je već dodan, +"Serial No {0} is not present in the {1} {2}, hence you can't return it against the {1} {2}","Serijski broj {0} nije u {1} {2}, i ne može se vratiti naspram {1} {2}", +Serial Nos,Serijski Broj, +Serial Nos / Batch Nos,Serijski Broj / Šaržni Broj, +Serial Nos are created successfully,Serijski Brojevi su uspješno kreirani, +"Serial Nos are reserved in Stock Reservation Entries, you need to unreserve them before proceeding.","Serijski brojevi su rezervisani u unosima za rezervacije zaliha, morate ih opozvati prije nego što nastavite.", +Serial and Batch,Serijski i Šarža, +Serial and Batch Bundle,Serijski i Šaržni Paket, +Serial and Batch Bundle created,Serijski i Šaržni Paket je kreiran, +Serial and Batch Bundle updated,Serijski i Šaržni Paket je ažuriran, +Serial and Batch Bundle {0} is already used in {1} {2}.,Serijski i Šaržni Paket {0} se već koristi u {1} {2}., +Serial and Batch Details,Detalji Serijskog Broja i Šarže, +Serial and Batch Entry,Unos Serijskog Broja i Šarže, +Serial and Batch No,Serijski i Šaržni Broj, +Serial and Batch Nos,Serijski i Šaržni Broj, +Serial and Batch Nos will be auto-reserved based on Pick Serial / Batch Based On,Serijski i Šaržni brojevi će biti automatski rezervisani na osnovu Odaberi Serijski / Šaržu na osnovu, +Serial and Batch Reservation,Serijska i Šaržna Rezervacija, +Serial and Batch Summary,Sažetak Serije i Šarže, +Service Cost Per Qty,Cijena Servisa po Kolicini, +Service Expense Total Amount,Ukupan Iznos Troškova Servisa, +Service Expenses,Servisni Troškovi, +Service Item,Servisni Artikal, +Service Item Qty,Količina Servisnog Artikla, +Service Item Qty / Finished Good Qty,Količina Servisnog Artikla / Količina Gotovog Proizvoda, +Service Item UOM,Jedinica Servisnog Artikla, +Service Item {0} is disabled.,Servisn Artikal {0} je onemogućen., +Service Item {0} must be a non-stock item.,Servisni Artikal {0} mora biti artikal koji nije na zalihama., +Service Items,Servisni Artikli, +Service Level Agreement for {0} {1} already exists.,Ugovor Standard Nivo Servisa za {0} {1} već postoji., +Service Level Name,Naziv Servisnog Nivoa, +Service Provider,Dobavljač Servisa, +Set Default Supplier,Postavi Standard Dobavljača, +Set From Warehouse,Postavi Iz Skladišta, +Set Landed Cost Based on Purchase Invoice Rate,Odredi obračunatu cijenu na temelju cijene Kupovne Fakture, +Set Loyalty Program,Postavi Program Lojalnosti, +Set Operating Cost / Scrap Items From Sub-assemblies,Postavi Operativni Trošak / Otpadne Artikle iz podsklopova, +Set Operating Cost Based On BOM Quantity,Postavi Operativni Trošak na osnovu količine Sastavnice, +Set Parent Row No in Items Table,Postavite Broj Nadređenog Reda u Tabeli Artikala, +Set Process Loss Item Quantity,Postavi količinu gubitka artikla u procesu, +Set Project Status,Postavi Status Pojekta, +Set Quantity,Postavi Količinu, +Set Response Time for Priority {0} in row {1}.,Postavi Vrijeme Odgovora za Prioritet {0} u redu {1}., +Set Serial and Batch Bundle Naming Based on Naming Series,Postavi Imenovanje Serijskog i Šaržnog Paketa na osnovu Imenovanja Serije, +Set Valuation Rate Based on Source Warehouse,Postavi Stopu Vrednovanja na osnovu Izvornog Skladišta, +Set Warehouse,Postavi Skladište, +Set default {0} account for non stock items,Postavi Standard Račun {0} za artikle za koje se nevode zalihe, +Set fieldname from which you want to fetch the data from the parent form.,Postavi ime polja iz kojeg želite da preuzmete podatke iz nadređenog obrasca., +Set quantity of process loss item:,Postavi količinu artikla gubitka u procesa:, +Set the Planned Start Date (an Estimated Date at which you want the Production to begin),Postavi Planirani Datum Početka (procijenjeni datum na koji želite da počne proizvodnja), +Set the status manually.,Postavi Status Ručno., +Set {0} in asset category {1} for company {2},Postavi {0} u kategoriju imovine {1} za kompaniju {2}, +Sets 'Accepted Warehouse' in each row of the Items table.,Postavlja 'Prihvaćeno Skladište' u svakom redu tabele Artikala., +Sets 'Rejected Warehouse' in each row of the Items table.,Postavlja 'Odbijeno Skladište' u svaki red tabele Artikala., +Sets 'Reserve Warehouse' in each row of the Supplied Items table.,Postavlja 'Rezervisano Skladište' u svakom redu tabele Dostavljeni Artikli., +Setting Item Locations...,Postavlja se Lokacija Artikla..., +Setting the account as a Company Account is necessary for Bank Reconciliation,Postavljanje računa kao Računa Kompanije je neophodno za Bankovno Usaglašavanje, +Setting {} is required,Postavka {} je obavezna, +Setup your organization,Postavi svoju organizaciju, +Shelf Life in Days,Rok Trajanja u Danima, +Shift,Smjena, +Shift Factor,Faktor Smjene, +Shift Name,Naziv Smjene, +Shipment,Pošiljka, +Shipment Amount,Iznos Pošiljke, +Shipment Delivery Note,Dostavnica Pošiljke, +Shipment ID,ID Pošiljke, +Shipment Information,Informacije Pošiljke, +Shipment Parcel,Paket Pošiljke, +Shipment Parcel Template,Šablon Paketa Pošiljke, +Shipment Type,Tip Pošiljke, +Shipment details,Detalji Pošiljke, +Shipping Address Details,Detalji Adrese Pošiljke, +Shipping Address Template,Šablon Adrese Pošiljke, +Shipping Address does not belong to the {0},Adresa Dostave ne pripada {0}, +Show Aggregate Value from Subsidiary Companies,Prikaži ukupnu vrijednost od Kompanija Podružnica, +Show Balances in Chart Of Accounts,Prikaz Stanja u Kontnom Planu, +Show Barcode Field in Stock Transactions,Prikaži polje Barkoda u Transakcijama Artikala, +Show Dimension Wise Stock,Prikaži Zalihe prema Dimenenzijama, +Show Disabled Warehouses,Prikaži Onemogućena Skladišta, +Show Failed Logs,Prikaži Neuspjele Zapise, +Show GL Balance,Prikaži Stanje Knjigovodstvenog Registra, +Show Item Name,Prikaži Naziv Artikla, +Show Ledger View,Prikaži Prikaz Registra, +Show Net Values in Party Account,Prikaži Neto Vrijednosti na Računu Stranke, +Show Pay Button in Purchase Order Portal,Prikaži Dugme za Plaćanje na Portalu Kupovnog Naloga, +Show Preview,Prikaži Pregled, +Show Remarks,Prikaži Napomene, +Show Taxes as Table in Print,Prikaži PDV kao Kolonu u Ispisu, +Show net values in opening and closing columns,Prikaži neto vrijednosti u kolonama za otvaranje i zatvaranje, +Show only the Immediate Upcoming Term,Prikaži samo Neposredan Predstojeći Uslov, +Show pending entries,Prikaži unose na čekanju, +Show with upcoming revenue/expense,Prikaži s nadolazećim prihodima/rashodima, +"Simple Python Expression, Example: doc.status == 'Open' and doc.issue_type == 'Bug'","Jednostavan Python izraz, primjer: doc.status == 'Open' i doc.issue_type == 'Bug'", +"Simple Python formula applied on Reading fields.
Numeric eg. 1: reading_1 > 0.2 and reading_1 < 0.5
+Numeric eg. 2: mean > 3.5 (mean of populated fields)
+Value based eg.: reading_value in (""A"", ""B"", ""C"")","Jednostavna Python formula primijenjena na polja za čitanje.
Numerička npr. 1: čitanje_1 > 0,2 i čitanje_1 < 0,5 +Numerički npr. 2: srednje > 3.5 (srednja vrijednost popunjenih polja)
+Na temelju vrijednosti npr.: reading_value u (""A"", ""B"", ""C"")", +Simultaneous,Istovremeno, +Skip Available Sub Assembly Items,Preskoči Dostupne Artikle Podsklopa, +Skipped,Preskočeno, +Skipping Tax Withholding Category {0} as there is no associated account set for Company {1} in it.,Preskoče Kategoriju Poreza po Odbitku {0} jer u njoj nema pridruženog računa za Kompaniju {1} ., +"Skipping {0} of {1}, {2}","Preskačem {0} od {1}, {2}", +Sold by,Prodato od, +Something went wrong please try again,"Nešto nije u redu, pokušajte ponovo", +Source Exchange Rate,Izvorni Kurs, +Source Fieldname,Naziv Izvornog Polja, +Source Warehouse Address Link,Veza Adrese Izvornog Skladišta, +South Africa VAT Account,Južnoafrički PDV Račun, +South Africa VAT Settings,Postavke PDV-a u Južnoj Africi, +Spacer,Razmak, +Split Asset,Podjeljena Imovina, +Split Early Payment Discount Loss into Income and Tax Loss,Podijeli Gubitak Popusta Prijevremenog Plaćanja na Prihod i Gubitak PDV-a, +Split From,Podjeli od, +Split Qty,Podjeljena Količina, +Split qty cannot be grater than or equal to asset qty,Podijeljena količina ne može biti veća ili jednaka količini imovine, +Splitting {0} {1} into {2} rows as per Payment Terms,Podjela {0} {1} na {2} redove prema Uslovima Plaćanja, +Stage,Faza, +Stale Days should start from 1.,Neaktivni Dani bi trebalo da počnu od 1., +Standard Description,Standard Opis, +Standard Rated Expenses,Standard Ocenjeni Troškovi, +"Standard Terms and Conditions that can be added to Sales and Purchases. Examples: Validity of the offer, Payment Terms, Safety and Usage, etc.","Standard Uslovi i Odredbe koji se mogu navesti u Prodaju i Kupovinu. Primjeri: Valjanost Ponude, Uslovi Plaćanja, Sigurnost i Korištenje itd.", +Standard rated supplies in {0},Standardno ocijenjeno zalihe u {0}, +"Standard tax template that can be applied to all Purchase Transactions. This template can contain a list of tax heads and also other expense heads like ""Shipping"", ""Insurance"", ""Handling"", etc.","Standard PDV šablon koji se može primijeniti na sve kupovne transakcije. Ovaj šablon može sadržavati listu PDV računa, kao i drugih računa troškova kao što su ""Pošiljka"", ""Osiguranje"", ""Rukovanje"", itd.", +"Standard tax template that can be applied to all Sales Transactions. This template can contain a list of tax heads and also other expense/income heads like ""Shipping"", ""Insurance"", ""Handling"" etc.","Standardni PDV šablon koji se može primijeniti na sve Prodajne Transakcije. Ovaj šablon može sadržavati listu PDV Računa, kao i drugih računa rashoda/prihoda kao što su ""Poštarina"", ""Osiguranje"", ""Rukovanje"" itd.", +Start / Resume,Pokreni / Nastavi, +Start Date should be lower than End Date,Datum početka bi trebao biti prije od datuma završetka, +Start Deletion,Pokreni Brisanje, +Start Import,Pokreni Uvoz, +Start Job,Počni Rad, +Start Merge,Pokreni Spajanje, +Start Reposting,Počni Ponovno Knjiženje, +Start Time can't be greater than or equal to End Time for {0}.,Vrijeme Početka ne može biti veće ili jednako Vremenu Završetka za {0}., +Start Timer,Pokreni Brojanje Vremena, +Started a background job to create {1} {0},Započet je pozadinski posao za kreiranje {1} {0}, +Status Details,Detalji Statusa, +Status Illustration,Prikaz Statusa, +Status set to rejected as there are one or more rejected readings.,Status je postavljen na odbijeno jer postoji jedno ili više odbijenih očitavanja., +Stock Closing,Zamrzavanje Zaliha, +Stock Consumed During Repair,Zalihe Potrošene Tokom Popravke, +Stock Consumption Details,Detalji Potrošnje Zaliha, +Stock Entries already created for Work Order {0}: {1},Unosi Zaliha su već kreirani za Radni Nalog {0}: {1}, +Stock Ledger Invariant Check,Kontrola Nepromjenjivog Registra Zaliha, +Stock Ledger Variance,Odstupanja Registra Zaliha, +Stock Movement,Upravljanje Zalihama, +Stock Planning,Planiranje Zaliha, +Stock Reposting Settings,Postavke Ponovnog Knjiženja Zaliha, +Stock Reservation,Rezervacija Zaliha, +Stock Reservation Entries Cancelled,Otkazani Unosi Rezervacije Zaliha, +Stock Reservation Entries Created,Kreirani Unosi Rezervacija Zaliha, +Stock Reservation Entry,Unos Rezervacije Zaliha, +Stock Reservation Entry cannot be updated as it has been delivered.,Unos Rezervacije Zaliha ne može se ažurirati pošto je već dostavljeno., +"Stock Reservation Entry created against a Pick List cannot be updated. If you need to make changes, we recommend canceling the existing entry and creating a new one.","Unos Rezervacije Zaliha kreiran naspram Liste Odabira ne može se ažurirati. Ako trebate napraviti promjene, preporučujemo da poništite postojeći unos i kreirate novi.", +Stock Reservation Warehouse Mismatch, Neusklađeno Skladišta Rezervacije Zaliha, +Stock Reservation can only be created against {0}.,Rezervacija Zaliha može se kreirati naspram {0}., +Stock Reserved Qty (in Stock UOM),Rezervisana Količina Zaliha (u Jedinici Zaliha), +Stock Transactions Settings,Postavke Transakcija Zaliha, +Stock UOM Quantity,Količina u Skladišnoj Jedinici, +Stock Unreservation,Poništavanje Rezervacije Zaliha, +Stock Validations,Provjera Zaliha, +Stock and Manufacturing,Zalihe i Proizvodnja, +Stock cannot be reserved in group warehouse {0}.,Zalihe se ne mogu rezervisati u grupnom skladištu {0}., +Stock cannot be reserved in the group warehouse {0}.,Zalihe se ne mogu rezervisati u grupnom skladištu {0}., +Stock not available for Item {0} in Warehouse {1}.,Zaliha nije dostupna za Artikal {0} u Skladištu {1}., +Stock quantity not enough for Item Code: {0} under warehouse {1}. Available quantity {2} {3}.,Količina Zaliha nije dovoljna za Kod Artikla: {0} na skladištu {1}. Dostupna količina {2} {3}., +Stock transactions that are older than the mentioned days cannot be modified.,Transakcije Zaliha koje su starije od navedenih dana ne mogu se mijenjati., +Stock will be reserved on submission of Purchase Receipt created against Material Request for Sales Order.,Zalihe će biti rezervisane po podnošenju Kupovnog Računa kreirane naspram Materijalnog Naloga za Prodajni Nalog., +Stock/Accounts can not be frozen as processing of backdated entries is going on. Please try again later.,Zalihe/Računi ne mogu se zamrznuti jer je u toku obrada unosa unazad. Pkušaj ponovo kasnije., +Sub Assemblies & Raw Materials,Podsklopovi i Sirovine, +Sub Assembly Item,Artikal Podsklopa, +Sub Assembly Item Code,Kod Artikla Podsklopa, +Sub Assembly Items,Artikli Podsklopa, +Sub Assembly Warehouse,Skladište Podsklopa, +Sub Operation,Podoperacija, +Sub Operations,Podoperacije, +Sub Total,Podzbir, +Subcontract BOM,Sastavnica Podizvođača, +Subcontract Order,Podizvođački Nalog, +Subcontract Order Summary,Sažetak Podizvođačkog Naloga, +Subcontract Return,Podizvođački Povrat, +Subcontracted Quantity,Podizvođačka Količina, +Subcontracting BOM,Sastavnica Podizvođača, +Subcontracting Conversion Factor,Faktor Konverzije Podizvođača, +Subcontracting Order,Podizvođački Nalog, +Subcontracting Order (Draft) will be auto-created on submission of Purchase Order.,Podizvođački Nalog (nacrt) će biti automatski kreiran nakon podnošenja Kupovnog Naloga., +Subcontracting Order Item,Artikal Podizvođačkog Naloga, +Subcontracting Order Service Item,Servisni Artikal Podizvođačkog Naloga, +Subcontracting Order Supplied Item,Dostavljeni Artikal Podizvođačkog Naloga, +Subcontracting Order {0} created.,Podizvođački Nalog {0} je kreiran., +Subcontracting Purchase Order,Podizvođački Kupovni Nalog, +Subcontracting Receipt,Podizvođački Račun, +Subcontracting Receipt Item,Artikal Podizvođačkog Računa, +Subcontracting Receipt Supplied Item,Dostavljeni Artikal Podizvođačkog Računa, +Subcontracting Settings,Postavke Podizvođača, +Subdivision,Pododjeljenje, +Submit Action Failed,Radnja Podnošenja Neuspješna, +Submit After Import,Podnesi Nakon Uvoza, +Submit ERR Journals?,Podnesi ERR Žurnale?, +Submit Generated Invoices,Podnesi Generirane Fakture, +Subscription for Future dates cannot be processed.,Pretplata za buduće datume nemože se obraditi., +Succeeded,Uspjelo, +Succeeded Entries,Uspjeli Upisi, +"Successfully changed Stock UOM, please redefine conversion factors for new UOM.","Uspješno promijenjena Jedinica Zaliha, redefinirajte faktore konverzije za novu Jedinicu.", +Successfully imported {0},Uspješno uveženo {0}, +"Successfully imported {0} record out of {1}. Click on Export Errored Rows, fix the errors and import again.","Uspješno uvežen {0} zapis iz {1}. Kliknite na Izvezi redove s greškom, popravite greške i ponovo izvezi.", +Successfully imported {0} record.,Uspješno uvežen {0} zapis., +"Successfully imported {0} records out of {1}. Click on Export Errored Rows, fix the errors and import again.","Uspješno uveženo {0} zapisa iz {1}. Klikni na izvezi redove s greškom, popravite greške i ponovo uvezi.", +Successfully imported {0} records.,Uspješno uveženo {0} zapisa., +Successfully linked to Customer,Uspješno povezan s Klijentom, +Successfully linked to Supplier,Uspješno povezan s Dobavljačem, +Successfully merged {0} out of {1}.,Uspješno spojeno {0} od {1}., +Successfully updated {0},Uspješno ažuriran {0}, +"Successfully updated {0} record out of {1}. Click on Export Errored Rows, fix the errors and import again.","Uspješno ažuriran zapis {0} od {1}. Klikni na Izvezi Redove s Greškom, popravi greške i ponovo uvezi.", +Successfully updated {0} record.,Zapis {0} je uspješno ažuriran., +"Successfully updated {0} records out of {1}. Click on Export Errored Rows, fix the errors and import again.","Uspješno ažurirano {0} zapisa od {1}. Klikni na Izvezi Redove s Greškom, popravi greške i ponovo uvezi.", +Successfully updated {0} records.,Uspješno ažurirano {0} zapisa., +Sum of Repair Cost and Value of Consumed Stock Items.,Iznos Troškova Popravke i Vrijednost Potrošenih Zaliha., +Supplied Item,Dostavljeni Artikal, +Supplier Address Details,Detalji Adrese Dostavljača, +Supplier Contact,Kontakt Dobavljača, +Supplier Group Item,Artikal Grupa Dobavljača, +Supplier Info,Informacije Dobavljača, +Supplier Invoice,Faktura Dobavljača, +Supplier Item,Artikal Dobavljača, +Supplier Portal Users,Korisnici Portala Dobavljača, +Supplier Primary Address,Primarna Adresa Dobavljača, +Supplier Primary Contact,Primarni Kontakt Dobavljača, +Supplies subject to the reverse charge provision,Zalihe podliježu odredbi o povratnoj naplati, +Sync Now,Sinhronizuj Sad, +Sync Started,Sinhronizacija Pokrenuta, +System In Use,Sistem u Upotrebi, +System Settings,Postavke Sistema, +System will automatically create the serial numbers / batch for the Finished Good on submission of work order,Sistem će automatski kreirati serijske brojeve/šaržu za Gotov Proizvod nakon predaje Radnog Naloga, +System will not check over billing since amount for Item {0} in {1} is zero,Sistem neće provjeravati prekomjerno fakturisanje jer je iznos za Artikal {0} u {1} nula, +TCS Amount,Iznos PDV-a po odbitku (TCS), +TCS Rate %,Stopa poreza po odbitku (TCS) %, +TDS Amount,Iznos poreza po odbitku (TDS), +TDS Deducted,Odbijen porez po odbitku (TDS), +TDS Payable,Dospjeli porez po odbitku (TDS)., +Target Asset,Ciljana Imovina, +Target Asset Location,Lokacija Ciljane Imovine, +Target Asset {0} cannot be cancelled,Ciljana Imovina {0} ne može se otkazati, +Target Asset {0} cannot be submitted,Ciljana Imovina {0} nemože se podnijeti, +Target Asset {0} cannot be {1},Ciljana Imovina {0} ne može biti {1}, +Target Asset {0} does not belong to company {1},Ciljna Imovina {0} ne pripada kompaniji {1}, +Target Asset {0} needs to be composite asset,Ciljana Imovina {0} mora biti objedinjena imovina, +Target Batch No,Ciljni Broj Šarže, +Target Exchange Rate,Ciljani Devizni Kurs, +Target Fieldname (Stock Ledger Entry),Naziv ciljnog polja (Unos Registra Zaliha), +Target Fixed Asset Account,Račun Fiksne Imovine, +Target Has Batch No,Odabrano ima Broj Šarže, +Target Has Serial No,Ima Serijski Broj, +Target Incoming Rate,Kupovna Cijena, +Target Is Fixed Asset,Fiksna Imovina, +Target Item Code,Kod Artikla, +Target Item Name,Naziv Artikla, +Target Item {0} must be a Fixed Asset item,Artikal {0} mora biti Artikla Fiksne Imovine, +Target Qty must be a positive number,Količina mora biti pozitivan broj, +Target Serial No,Serijski Broj, +Target Warehouse Address Link,Veza Adrese Skladišta, +Target Warehouse is set for some items but the customer is not an internal customer.,"Skladište je postavljeno za neke artikle, ali klijent nije interni klijent.", +Task Assignee Email,E-pošta Nosioca Zadatka, +Task {0} depends on Task {1}. Please add Task {1} to the Tasks list.,Zadatak {0} zavisi od Zadatka {1}. Dodaj zadatak {1} na Listu Zadataka., +Tax Amount,PDV Iznos, +Tax Amount will be rounded on a row(items) level,Iznos PDV-a će biti zaokružen na nivou reda (artikala)., +Tax Masters,PDV Postavke, +Tax Refunds provided to Tourists under the Tax Refunds for Tourists Scheme,Povrat PDV koji se pruža turistima u okviru šeme povrata poreza za turiste, +Tax Settings,PDV Postavke, +Tax Withheld Vouchers,Verifikati PDV Odbitka, +Tax Withholding,PDV Odbitak, +Tax Withholding Category {} against Company {} for Customer {} should have Cumulative Threshold value.,Kategorija Odbitka Pdv {} naspram kompanije {} za klijenta {} treba imati Kumulativnu Vrijednost Praga., +Tax Withholding Details,Detalji Odbitka PDV, +Tax Withholding Net Total,Neto Ukupno PDV Odbitka, +"Tax detail table fetched from item master as a string and stored in this field. +Used for Taxes and Charges","Tabela PDV detalja preuzeta iz postavke artikla kao niz i pohranjena u ovom polju. +Koristi se za PDV i Naknade", +Tax will be withheld only for amount exceeding the cumulative threshold,PDV će biti odbijen samo za iznos koji premašuje kumulativni prag, +Taxes row #{0}: {1} cannot be smaller than {2},PDV red #{0}: {1} ne može biti manji od {2}, +Team,Tim, +Telephony Call Type,Tip Telefonskog Poziva, +Template Item Selected,Odabrani Šablon Artikla, +Template Options,Šablon Opcije, +Template Task,Šablon Zadatka, +Template Warnings,Šablon Upozorenja, +Terms & Conditions,Odredbe & Uslovi, +Terms Template,Šablon Uslova, +Territory Item,Artikal Distrikta, +Territory Wise Sales,Prodaja po Distriktu, +The Batch {0} has negative quantity {1} in warehouse {2}. Please correct the quantity.,Šarća {0} ima negativnu količinu {1} u skladištu {2}. Ispravi količinu., +The Condition '{0}' is invalid,Uvjet '{0}' je nevažeći, +The Document Type {0} must have a Status field to configure Service Level Agreement,Dolument Tip {0} mora imati Status polje za konfiguraciju Ugovora Standard Nivo Servisa, +"The GL Entries and closing balances will be processed in the background, it can take a few minutes.","Knjigovodstveni Unosi i zaključna stanja će se obraditi u pozadini, to može potrajati nekoliko minuta.", +"The GL Entries will be cancelled in the background, it can take a few minutes.","Knjigovodstveni Unosi će biti otkazani u pozadini, može potrajati nekoliko minuta.", +"The Payment Request {0} is already paid, cannot process payment twice","Zahtjev Plaćanja {0} je već plaćen, ne može se obraditi plaćanje dvaput", +"The Pick List having Stock Reservation Entries cannot be updated. If you need to make changes, we recommend canceling the existing Stock Reservation Entries before updating the Pick List.","Lista Odabira koja ima Unose Rezervacije Zaliha ne može se ažurirati. Ako trebate unijeti promjene, preporučujemo da otkažete postojeće Unose Rezervacije Zaliha prije ažuriranja Liste Odabira.", +The Process Loss Qty has reset as per job cards Process Loss Qty,Količinski Gubitak Procesa je poništen prema Radnim Karticama Količinskog Gubitka Procesa, +The Sales Person is linked with {0},Prodavač je povezan sa {0}, +The Serial No at Row #{0}: {1} is not available in warehouse {2}.,Serijski Broj u redu #{0}: {1} nije dostupan u skladištu {2}., +The Serial and Batch Bundle {0} is not valid for this transaction. The 'Type of Transaction' should be 'Outward' instead of 'Inward' in Serial and Batch Bundle {0},Serijski i Šaržni Paket {0} ne važi za ovu transakciju. 'Tip transakcije' bi trebao biti 'Vani' umjesto 'Unutra' u Serijskom i Šaržnom Paketu {0}, +The Work Order is mandatory for Disassembly Order,Radni Nalog je obavezan za Demontažni Nalog, +The allocated amount is greater than the outstanding amount of Payment Request {0},Dodijeljeni iznos je veći od nepodmirenog iznosa Zahtjeva Plaćanja {0}, +The currency of invoice {} ({}) is different from the currency of this dunning ({}).,Valuta Fakture {} ({}) se razlikuje od valute ove Opomene ({})., +The default BOM for that item will be fetched by the system. You can also change the BOM.,Sistem će preuzeti standard Sastavnicu za Artikal. Također možete promijeniti Sastavnicu., +The field {0} in row {1} is not set,Polje {0} u redu {1} nije postavljeno, +"The following Items, having Putaway Rules, could not be accomodated:","Sljedeći artikl, koji imaju Pravila Odlaganju, nisu mogli biti prihvaćeni:", +The following assets have failed to automatically post depreciation entries: {0},Sljedeća imovina nije uspjela automatski knjižiti unose amortizacije: {0}, +"The following batches are expired, please restock them:
{0}","Sljedeće šarže su istekle, obnovi zalihe:
{0}", +The following invalid Pricing Rules are deleted:,Sljedeća nevažeća Pravila Cijena se brišu:, +The items {0} and {1} are present in the following {2} :,Artikli {0} i {1} se nalaze u sljedećem {2} :, +The operation {0} can not add multiple times,Operacija {0} ne može se dodati više puta, +The operation {0} can not be the sub operation,Operacija {0} ne može biti podoperacija, +The original invoice should be consolidated before or along with the return invoice.,Originalnu fakturu treba objediniti prije ili zajedno sa povratnom fakturom., +The percentage you are allowed to pick more items in the pick list than the ordered quantity.,Procenat kojim je dozvoljeno da odaberete više artikala na listi odabira od naručene količine., +"The percentage you are allowed to transfer more against the quantity ordered. For example, if you have ordered 100 units, and your Allowance is 10%, then you are allowed transfer 110 units.","Procenat kojim vam je dozvoljeno prenijeti više naspram naručene količine. Na primjer, ako ste naručili 100 jedinica, a vaš dodatak iznosi 10%, onda vam je dozvoljen prijenos 110 jedinica.", +The reserved stock will be released when you update items. Are you certain you wish to proceed?,Rezervisane Zalihe će biti puštene kada ažurirate artikle. Jeste li sigurni da želite nastaviti?, +The reserved stock will be released. Are you certain you wish to proceed?,Rezervisane Zalihe će biti puštene. Jeste li sigurni da želite nastaviti?, +The serial and batch bundle {0} not linked to {1} {2},Serijski i Šaržni Paket {0} nije povezan sa {1} {2}, +"The stock for the item {0} in the {1} warehouse was negative on the {2}. You should create a positive entry {3} before the date {4} and time {5} to post the correct valuation rate. For more details, please read the documentation.","Zaliha za artikal {0} u {1} skladištu je bila negativna na {2}. Trebali biste kreirati pozitivan unos {3} prije datuma {4} i vremena {5} da biste knjižili ispravnu Stopu Vrednovanja. Za više detalja, molimo pročitaj dokumentaciju.", +"The stock has been reserved for the following Items and Warehouses, un-reserve the same to {0} the Stock Reconciliation:

{1}","Zalihe su rezervirane za sljedeće artikle i skladišta, poništite ih za {0} Usglašavanje Zaliha:

{1}", +"The sync has started in the background, please check the {0} list for new records.","Sinhronizacija je počela u pozadini, provjerite listu {0} za nove zapise.", +The task has been enqueued as a background job.,Zadatak je stavljen u red kao pozadinski posao., +"The task has been enqueued as a background job. In case there is any issue on processing in background, the system will add a comment about the error on this Stock Reconciliation and revert to the Submitted stage","Zadatak je stavljen u red kao pozadinski posao. U slučaju da postoji bilo kakav problem sa obradom u pozadini, sistem će dodati komentar o grešci na ovom usklađivanju zaliha i vratiti se na fazu Poslano", +The total Issue / Transfer quantity {0} in Material Request {1} cannot be greater than allowed requested quantity {2} for Item {3},Ukupna količina izdavanja / prijenosa {0} u Materijalnom Nalogu {1} ne može biti veća od dozvoljene tražene količine {2} za artikal {3}, +The total Issue / Transfer quantity {0} in Material Request {1} cannot be greater than requested quantity {2} for Item {3},Ukupna količina Izdavanja / Prijenosa {0} u Materijalnom Nalogu {1} ne može biti veća od dozvoljene tražene količine {2} za artikal {3}, +The uploaded file does not match the selected Code List.,Učitani fajl ne odgovara odabranoj Listi Kodova., +The user cannot submit the Serial and Batch Bundle manually,Korisnik ne može ručno podnijeti Serijski i Šaržni Paket, +"The users with this Role are allowed to create/modify a stock transaction, even though the transaction is frozen.","Korisnicima sa ovom ulogom je dozvoljeno da kreiraju/modifikuju transakciju zaliha, iako su transakcije zamrznute.", +The warehouse where you store finished Items before they are shipped.,Skladište u kojem skladištite gotove artikle prije nego što budu poslani., +"The warehouse where you store your raw materials. Each required item can have a separate source warehouse. Group warehouse also can be selected as source warehouse. On submission of the Work Order, the raw materials will be reserved in these warehouses for production usage.","Skladište u kojem je skladište sirovine. Svaki potrebni artikal može imati posebno izvorno skladište. Grupno skladište se takođe može odabrati kao izvorno skladište. Po podnošenju radnog naloga, sirovine će biti rezervisane u ovim skladištima za proizvodnu upotrebu.", +The warehouse where your Items will be transferred when you begin production. Group Warehouse can also be selected as a Work in Progress warehouse.,Skladište u koje će vaši artikli biti prebačeni kada započnete proizvodnju. Grupno skladište se takođe može odabrati kao Skladište u Toku., +The {0} {1} is used to calculate the valuation cost for the finished good {2}.,{0} {1} se koristi za izračunavanje troška vrednovanja za gotov proizvod {2}., +There are ledger entries against this account. Changing {0} to non-{1} in live system will cause incorrect output in 'Accounts {2}' report,Na ovom računu postoje unosi u registar. Promjena {0} u ne-{1} u sistemu će uzrokovati netačan izlaz u izvještaju 'Računi {2}', +There are no Failed transactions,Nema neuspjelih transakcija, +There are no active Fiscal Years for which Demo Data can be generated.,Ne postoje aktivne Fiskalne Godine za koje se mogu generirati Demo Podaci., +There are no slots available on this date,Za ovaj datum nema slobodnih termina, +There are only {0} asset created or linked to {1}. Please create or link {2} Assets with respective document.,Postoji samo {0} imovina kreirana ili povezana sa {1}. Kreiraj ili poveži {2} imovinu sa odgovarajućim dokumentom., +"There are two options to maintain valuation of stock. FIFO (first in - first out) and Moving Average. To understand this topic in detail please visit
Item Valuation, FIFO and Moving Average.","Postoje dvije opcije za održavanje vrijednosti artikal. FIFO (prvi ušao - prvi izašao) i Pokretni Prosijek. Da biste detaljno razumjeli ovu temu, posjetite Vrednovanje Artikla, FIFO i Pokretni Prosijek.", +There aren't any item variants for the selected item,Ne postoje varijante artikla za odabrani artikal, +There is already a valid Lower Deduction Certificate {0} for Supplier {1} against category {2} for this time period.,Već postoji važeći certifikat o nižem odbitku {0} za dobavljača {1} prema kategoriji {2} za ovaj vremenski period., +There is already an active Subcontracting BOM {0} for the Finished Good {1}.,Već postoji aktivna Podizvođačka Sastavnica {0} za gotov proizvod {1}., +There must be atleast 1 Finished Good in this Stock Entry,U ovom Unosu Zaliha mora biti najmanje jedan gotov proizvod, +There was an error creating Bank Account while linking with Plaid.,Došlo je do greške pri kreiranju Bankovnog Računa prilikom povezivanja s Plaid., +There was an error syncing transactions.,Došlo je do greške pri sinhronizaciji transakcija., +There was an error updating Bank Account {} while linking with Plaid.,Došlo je do greške prilikom ažuriranja Bankovnog Računa {} prilikom povezivanja s Plaid., +There was an issue connecting to Plaid's authentication server. Check browser console for more information,Došlo je do problema pri povezivanju s Plaidovim serverom za autentifikaciju. Provjerite konzolu pretraživača za više informacija, +There were issues unlinking payment entry {0}.,Problem s poništavanjem veze unosa plaćanja {0}., +This Account has '0' balance in either Base Currency or Account Currency,Račun ima stanje '0' u Osnovnoj Valuti ili u Valuti Računa, +This PO has been fully subcontracted.,Kupovni Nalog je u potpunosti podugovoren., +This field is used to set the 'Customer'.,Ovo polje se koristi za postavljanje 'Klijenta'., +This filter will be applied to Journal Entry.,Ovaj filter će se primijeniti na Nalog Knjiženja., +This is a Template BOM and will be used to make the work order for {0} of the item {1},Ovo je Šablon Sastavnica i koristit će se za izradu Radnog Naloga za {0} artikal {1}, +This is a preview of the email to be sent. A PDF of the document will automatically be attached with the email.,Ovo je pregled e-pošte koju treba poslati. PDF dokument će automatski biti priložen uz e-poštu., +This is considered dangerous from accounting point of view.,Ovo se smatra opasnim knjigovodstvene tačke gledišta., +"This is enabled by default. If you want to plan materials for sub-assemblies of the Item you're manufacturing leave this enabled. If you plan and manufacture the sub-assemblies separately, you can disable this checkbox.","Ovo je standard omogućeno. Ako želite da planirate materijale za podsklopove artikla koji proizvodite, ostavite ovo omogućeno. Ako planirate i proizvodite podsklopove zasebno, možete onemogućiti ovo polje.", +"This is for raw material Items that'll be used to create finished goods. If the Item is an additional service like 'washing' that'll be used in the BOM, keep this unchecked.","Ovo se odnosi na artikle sirovina koje će se koristiti za izradu gotovog proizvoda. Ako je artikal dodatna usluga kao što je 'povrat' koja će se koristiti u Sastavnici, ne označite ovo.", +This item filter has already been applied for the {0},Ovaj filter artikala je već primijenjen za {0}, +This option can be checked to edit the 'Posting Date' and 'Posting Time' fields.,Ova opcija se može označiti za uređivanje polja 'Datum Knjiženja' i 'Vrijeme Knjiženja'., +This schedule was created when Asset {0} was adjusted through Asset Value Adjustment {1}.,Ovaj raspored je kreiran kada je imovina {0} prilagođena kroz Podešavanje Vrijednosti Imovine {1}., +This schedule was created when Asset {0} was consumed through Asset Capitalization {1}.,Ovaj raspored je kreiran kada je imovina {0} potrošena kroz kapitalizaciju imovine {1}., +This schedule was created when Asset {0} was repaired through Asset Repair {1}.,Ovaj raspored je kreiran kada je imovina {0} popravljena putem Popravka Imovine {1}., +This schedule was created when Asset {0} was restored on Asset Capitalization {1}'s cancellation.,Ovaj raspored je kreiran kada je imovina {0} vraćena nakon otkazivanja kapitalizacije imovine {1}., +This schedule was created when Asset {0} was restored.,Ovaj raspored je kreiran kada je Imovina {0} vraćena., +This schedule was created when Asset {0} was returned through Sales Invoice {1}.,Ovaj raspored je kreiran kada je imovina {0} vraćena putem Prodajne Fakture {1}., +This schedule was created when Asset {0} was scrapped.,Ovaj raspored je kreiran kada je imovina {0} rashodovana., +This schedule was created when Asset {0} was sold through Sales Invoice {1}.,Ovaj raspored je kreiran kada je imovina {0} prodata putem Prodajne Fakture {1}., +This schedule was created when Asset {0} was updated after being split into new Asset {1}.,Ovaj raspored je kreiran kada jeImovina {0} ažurirana nakon što je podijeljena u novu Imovinu {1}., +This schedule was created when Asset {0}'s Asset Repair {1} was cancelled.,Ovaj raspored je kreiran kada je Imovinska {0} popravka imovine {1} otkazana., +This schedule was created when Asset {0}'s Asset Value Adjustment {1} was cancelled.,Ovaj raspored je kreiran kada je Imovina {0} iVrijednost Amortizacije Imovine {1} otkazan., +This schedule was created when Asset {0}'s shifts were adjusted through Asset Shift Allocation {1}.,Ovaj raspored je kreiran kad su Smjene Imovine {0} prilagođene kroz Dodjelu Smjene Imovine {1}., +This schedule was created when new Asset {0} was split from Asset {1}.,Ovaj raspored je kreiran kada je nova Imovina {0} odvojeno od Imovine {1}., +"This table is used to set details about the 'Item', 'Qty', 'Basic Rate', etc.","Ova tabela se koristi za postavljanje detalja o 'Artiku', 'Količini', 'Osnovnoj Cijeni', itd.", +This value shall be used when no matching Common Code for a record is found.,Ova vrijednost će se koristiti kada se ne pronađe odgovarajući Zajednički Kod za zapis., +This {} will be treated as material transfer.,Ovaj {} će se tretirati kao prijenos materijala., +Threshold for Suggestion (In Percentage),Prag za Prijedlog (u Procentima), +Time Taken to Deliver,Vrijeme Dostave, +Time in mins,Vrijeme u minutama, +Time in mins.,Vrijeme u minutama., +Time slot is not available,Vremenski termin nije dostupan, +To Date is mandatory,Do datuma je obavezno, +To Delivery Date,Do Datuma Dostave, +To Doctype,Za Doctype, +To Due Date,Do Datuma isteka roka, +To Payment Date,Do Datuma Plaćanja, +To Reference Date,Do Referentnog Datuma, +To add Operations tick the 'With Operations' checkbox.,"Da biste dodali Operacije, označite polje 'S Operacijama'.", +To add subcontracted Item's raw materials if include exploded items is disabled.,Da se doda podizvođačka sirovina artikala ako je Uključi Rastavljene Artikle onemogućeno., +To apply condition on parent field use parent.field_name and to apply condition on child table use doc.field_name. Here field_name could be based on the actual column name of the respective field.,Za primjenu uvjeta na nadređeno polje koristite parent.field_name i za primjenu uvjeta na podređenu tablicu koristite doc.field_name. Ovdje field_name može biti zasnovano na stvarnom imenu kolone odgovarajućeg polja., +To be Delivered to Customer,Dostava Klijentu, +To cancel a {} you need to cancel the POS Closing Entry {}.,"Da otkažete {}, morate otkazati Unos Zatvaranja Kase {}.", +"To enable Capital Work in Progress Accounting,","Da biste omogućili Knjigovodstvo Kapitalnih Radova u Toku,", +To include non-stock items in the material request planning. i.e. Items for which 'Maintain Stock' checkbox is unticked.,Uključivanje artikala bez zaliha u planiranje Materijalnog Naloga. tj. artikle za koje je 'Održavanje Zaliha'.polje poništeno., +"To include sub-assembly costs and scrap items in Finished Goods on a work order without using a job card, when the 'Use Multi-Level BOM' option is enabled.","Za uključivanje troškova podmontaže i otpadnih artikala u Gotov Proizvod na radnom nalogu bez upotrebe radne kartice, kada je omogućena opcija 'Koristi Višeslojnu Sastavnicu'.", +To submit the invoice without purchase order please set {0} as {1} in {2},"Da biste podnijeli Fakturu bez Kupovnog Naloga, postavi {0} kao {1} u {2}", +To submit the invoice without purchase receipt please set {0} as {1} in {2},"Da biste podnijeli Fakturu bez Kupovnog Računa, postavite {0} kao {1} u {2}", +"To use a different finance book, please uncheck 'Include Default FB Assets'","Da biste koristili drugi Finansijski Registar, poništi 'Uključi Standard Imovinu Finansijskog Registra'", +"To use a different finance book, please uncheck 'Include Default FB Entries'","Da biste koristili drugi Finansijski Registar, poništite oznaku 'Obuhvati standard Finansijski Registar unose'", +Total Active Items,Ukupno Aktivnih Artikala, +Total Allocations,Ukupno Dodjeljeno, +Total Asset,Ukupna Imovina, +Total Asset Cost,Ukupni Trošak Imovine, +Total Billing Hours,Ukupno Fakturisanih Sati, +Total Contribution Amount Against Invoices: {0},Ukupan Iznos Doprinosa naspram Faktura: {0}, +Total Contribution Amount Against Orders: {0},Ukupan Iznos Doprinosa naspram Naloga: {0}, +Total Equity,Ukupni Kapital, +Total Incoming Bills,Ukupno Dolaznih Faktura, +Total Incoming Payment,Ukupno Dolazno Plaćanje, +Total Incoming Value (Receipt),Ukupna ulazna vrijednost (Račun), +Total Interest,Ukupna Kamata, +Total Issues,Ukupno Slučajeva, +Total Items,Ukupno Artikala, +Total Liability,Ukupno Obaveze, +Total Number of Booked Depreciations ,Ukupan broj Knjiženih Amortizacija , +Total Operation Time,Ukupno Vrijeme Rada, +Total Other Charges,Ukupni Ostali Troškovi, +Total Outgoing Bills,Ukupno Odlaznih Faktura, +Total Outgoing Payment,Ukupno Odlazno Plaćanje, +Total Outgoing Value (Consumption),Ukupna Izlazna Vrijednost (Potrošnja), +Total Picked Quantity {0} is more than ordered qty {1}. You can set the Over Picking Allowance in Stock Settings.,Ukupna Odabrana Količina {0} je veća od naručene količine {1}. Dozvolu za prekoračenje možete postaviti u Postavkama Zaliha., +Total Purchase Amount,Ukupan Iznos Kupovine, +Total Purchase Cost has been updated,Ukupnni Kupovni Trošak je ažuriran, +Total Repair Cost,Ukupni Troškovi Popravke, +Total Reposting Count,Ukupan broj Ponovnog Unosa, +Total Sales Amount,Ukupan Iznos Prodaje, +Total Stock Value,Ukupna Vrijednost Zaliha, +Total Supplied Qty,Ukupna Isporučena Količina, +Total Time (in Mins),Ukupno Vrijeme (minuta), +Total Value,Ukupna Vrijednost, +Total Value Difference (Incoming - Outgoing),Ukupna Vrijednost Razlike (Dolazni- Odlazni), +Total Views,Ukupno Pregleda, +Total Warehouses,Ukupno Skladišta, +Total Weight (kg),Ukupna Težina (kg), +Total percentage against cost centers should be 100,Ukupna procentulna suma naspram Centara Troškova treba da bude 100, +Tracking Status,Status Praćenja, +Tracking Status Info,Status Praćenja Informacija, +Tracking URL,URL Praćenja, +Transaction Deletion Document: {0} is running for this Company. {1},Dokument Brisanje Transakcije: {0} u toku za ovu kompaniju. {1}, +Transaction Deletion Record,Zapis Brisanju Transakcije, +Transaction Deletion Record Details,Detalji Zapisa Brisanja Transakcije, +Transaction Deletion Record Item,Artikal Zapisa Brisanja Transakcije, +Transaction Exchange Rate,Transakcioni Devizni Kurs, +Transaction Settings,Postavke Transakcije, +Transaction currency: {0} cannot be different from Bank Account({1}) currency: {2},Valuta Transakcije: {0} mora biti ista kao valuta Bankovnog Računa ({1}): {2}, +Transactions against the Company already exist! Chart of Accounts can only be imported for a Company with no transactions.,Transakcije naspram Kompanije već postoje! Kontni Plan se može uvesti samo za kompaniju bez transakcija., +Transfer Asset,Prijenos Imovine, +Transfer From Warehouses,Prijenos iz Skladišta, +Transferring cannot be done to an Employee. Please enter location where Asset {0} has to be transferred,Prenos se ne može izvršiti na personal. Unesi lokaciju na koju se imovina {0} mora prenijeti, +Transit,Tranzit, +Transit Entry,Unos Tranzita, +Truncates 'Remarks' column to set character length,Skraćuje kolonu 'Napomene' radi postavljanja dužine znakova, +Type Of Call,Tip Poziva, +Type of Transaction,Tip Transakcije, +UAE VAT 201,UAE PDV 201, +UAE VAT Account,Račun PDV-a UAE PDV, +UAE VAT Accounts,Računi PDV-a UAE, +UAE VAT Settings,Postavke PDV-a UAE, +UOM conversion factor required for UOM: {0} in Item: {1},Faktor Konverzije je obavezan za Jedinicu: {0} za Artikal: {1}, +UnReconcile,Otkaži Usaglašavanje, +UnReconcile Allocations,Poništi Dodjele, +Unable to find the time slot in the next {0} days for the operation {1}. Please increase the 'Capacity Planning For (Days)' in the {2}.,Nije moguće pronaći vremenski termin u narednih {0} dana za operaciju {1}. Molimo povećajte 'Planiranje Kapaciteta za (Dana)' u {2}., +Unable to find variable:,Nije moguće pronaći varijablu:, +Unassigned Qty,Nedodijeljena Količina, +"Under Working Hours table, you can add start and end times for a Workstation. For example, a Workstation may be active from 9 am to 1 pm, then 2 pm to 5 pm. You can also specify the working hours based on shifts. While scheduling a Work Order, the system will check for the availability of the Workstation based on the working hours specified.","U tabeli radnog vremena možete dodati vrijeme početka i završetka za Radnu Stanicu. Na primjer, Radna Stanica može biti aktivna od 9 do 13 sati, zatim od 14 do 17 sati. Također možete odrediti radno vrijeme na osnovu smjena. Prilikom zakazivanja Radnog Naloga, sistem će provjeriti dostupnost Radne Stanice na osnovu navedenog radnog vremena.", +Unit of Measure (UOM),Jedinica Mjere, +Unlinked,Nepovezano, +Unqualified,Nekvalificiran, +Unrealized Profit / Loss Account,Nerealizovani Račun Rezultata, +Unrealized Profit / Loss account for intra-company transfers,Nerealizovani Račun Rezultata za transfere intra-kompanije, +Unrealized Profit/Loss account for intra-company transfers,Nerealizovani Račun Rezultata za transfere unutar kompanije, +Unreconcile Payment,Otkaži Usaglašavanje Plaćanja, +Unreconcile Payment Entries,Otkaži Unose Usaglašavanja Plaćanja, +Unreconcile Transaction,Otkaži Usaglašavanje Transakcije, +Unreconciled Amount,Neusaglešeni Iznos, +Unreconciled Entries,Neusaglašeni Unosi, +Unreserve,Otkaži Rezervaciju, +Unreserve Stock,Otkaži Rezervaciju Zaliha, +Unreserving Stock...,Otkazivanje Zaliha u toku..., +Unset Matched Payment Request,OtkažiI Usklađeni Zahtjev Plaćanje, +Up,Gore, +Update Billed Amount in Delivery Note,Ažuriraj Fakturisani Iznos Dostavnice, +Update Billed Amount in Purchase Order,Ažuriraj Fakturisani Iznos Kupovnog Naloga, +Update Billed Amount in Purchase Receipt,Ažuriraj Fakturisani Iznos Kupovnog Raöuna, +Update Existing Price List Rate,Ažuriraj postojeću Cijenu Cijenovnika, +Update Existing Records,Ažuriraj Postojeće Zapise, +Update Outstanding for Self,Ažuriraj neplaćeni iznos za ovaj dokument, +Update Rate as per Last Purchase,Ažuriraj Cijenu prema Posljednjoj Kupovini, +Update Total Purchase Cost,Ažuriraj Ukupnu Troškove Kupovine, +Update frequency of Project,Ažuriraj Učestalost Projekta, +Update stock must be enabled for the purchase invoice {0},Ažuriranje zaliha mora biti omogućeno za Kupovnu Fakturu {0}, +Update the modified timestamp on new communications received in Lead & Opportunity.,Ažuriraj izmijenjenu vremensku oznaku za novu korespondenciju primljene u Potencijalni Klijent & Prilici., +Update timestamp on new communication,Ažuriraj vremensku oznaku za novu korespondenciju, +Updated via 'Time Log' (In Minutes),Ažurirano putem 'Vremenski Zapisnik' (u minutama), +Updating Work Order status,Ažuriranje statusa radnog naloga u toku, +"Updating {0} of {1}, {2}","Ažuriram {0} od {1}, {2}", +Upload Bank Statement,Otpremi Bankovni Izvod, +Use 'Repost in background' button to trigger background job. Job can only be triggered when document is in Queued or Failed status.,Koristite dugme 'Ponovo knjiži u pozadini' da pokrenete posao u pozadini. Zadatak se može pokrenuti samo kada je dokument u stanju čekanja ili neuspješan., +Use Batch-wise Valuation,Koristi Šaržno Vrijednovanje, +Use Company Default Round Off Cost Center,Koristi Standard Centar Troškova Zaokruživanja kompanije, +Use Company default Cost Center for Round off,Koristi Standard Centar Troškova Zaokruživanja kompanije, +Use HTTP Protocol,Koristi HTTP Protokol, +Use Item based reposting,Koristi Ponovno Knjiženje na osnovu Artikla, +Use Serial / Batch Fields,Koristi Serijske Brojeve / Šaržna Polja, +Use Serial No / Batch Fields,Koristi Serijske Brojeve / Šaržna Polja, +Use Transaction Date Exchange Rate,Koristi Devizni Kurs Datuma Transakcije, +User {0}: Removed Employee Self Service role as there is no mapped employee.,Korisnik {0}: Uklonjena uloga samoposluživanja zaposlenika jer nema mapiranog zaposlenika., +User {0}: Removed Employee role as there is no mapped employee.,Korisnik {0}: Uklonjena uloga personala jer nema mapiranog personala., +Users can enable the checkbox If they want to adjust the incoming rate (set using purchase receipt) based on the purchase invoice rate.,Korisnici mogu omogućiti potvrdni okvir Ako žele prilagoditi ulaznu cijenu (podešenu pomoću kupovnog računa) na osnovu cijene kupovne fakture., +Users with this role are allowed to over bill above the allowance percentage,Korisnicima sa ovom ulogom je dozvoljeno da fakturišu iznad procentualnog odobrenja, +Users with this role are allowed to over deliver/receive against orders above the allowance percentage,Korisnicima sa ovom ulogom je dozvoljena prekomjerna Dostava/Primanje naspram narudžbi iznad procentualnog odobrenja, +Using negative stock disables FIFO/Moving average valuation when inventory is negative.,Korištenje negativnih zaliha onemogućava FIFO/Pokretni Prosjek vrednovanja kada je zaliha negativna., +VAT Accounts,PDV Računi, +VAT Amount (AED),Iznos PDV-a (AED), +VAT Audit Report,Izvještaj revizije PDV-a, +VAT on Expenses and All Other Inputs,PDV na rashode i sve ostale ulaze, +VAT on Sales and All Other Outputs,PDV na Prodaju i sve ostale izlaze, +Valid From must be after {0} as last GL Entry against the cost center {1} posted on this date,Važi Od mora biti nakon {0} kao posljednji Knigovodstveni unos naspram Centru Troškova {1} knjiženog na ovaj datum, +Validate Components and Quantities Per BOM,Potvrdi Komponente i Količine po Listi Materijala, +Validate Negative Stock,Potvrdi Negativne Zalihe, +Validate Pricing Rule,Potvrdi Pravilo Cijena, +Validate Stock on Save,Potvrdi Zalihe na Spremi, +Valuation (I - K),Vrijednovanje (I - K), +Valuation Field Type,Tip Polja Vrijednovanja, +Valuation Rate (In / Out),Stopa Vrednovnja (Ulaz / Izlaz), +Valuation rate for customer provided items has been set to zero.,Stopa Vrednovanja za Artikle koje je dostavio Klijent postavljena je na nulu., +Valuation rate for the item as per Sales Invoice (Only for Internal Transfers),Stopa Vrednovanja artikla prema Prodajnoj Fakturi (samo za interne transfere), +Value (G - D),Vrijednost (G - D), +Value ({0}),Vrijednost ({0}), +Value Based Inspection,Kontrola zasnovana na Vrijednosti, +Value Change,Promjena Vrijednosti, +Value Details,Detalji Vrijednosti, +Value as on,Vrijednost kao na, +Value of Goods,Vrijednost Proizvoda, +Value of New Capitalized Asset,Vrijednost nove kapitalizirane imovine, +Value of New Purchase,Vrijednost nove Kupovine, +Value of Scrapped Asset,Vrijednost Rashodovane Imovine, +Value of Sold Asset,Vrijednost Prodate Imovine, +Value of goods cannot be 0,Vrijednost Proizvoda ne može biti 0, +Verification failed please check the link,"Verifikacija nije uspjela, provjeri vezu", +Version,Verzija, +Via Landed Cost Voucher,Preko Obračunatih Troškova Verifikata, +View BOM Update Log,Pogledaj Zapisnik Ažuriranja Sastavnice, +View Exchange Gain/Loss Journals,Prikaži Žurnale Rezultata Deviznog Kursa, +View General Ledger,Pogledaj Knjigovodstveni Registar, +View Ledgers,Prikaži Registre, +Visits,Posjete, +Voice Call Settings,Postavke Telefonskog Poziva, +Voucher,Verifikat, +Voucher Name,Naziv Verifikata, +Voucher No is mandatory,Broj Verifikata je obavezan, +Voucher Qty,Količina, +Voucher Subtype,Podtip Verifikata, +Voucher {0} is over-allocated by {1},Verifikat {0} je prekomjerno dodijeljen od {1}, +Voucher-wise Balance,Stanje prema Verifikatu, +"WARNING: Exotel app has been separated from ERPNext, please install the app to continue using Exotel integration.","UPOZORENJE: Exotel aplikacija je odvojena od Sistema, instalirajte aplikaciju da nastavite koristiti Exotel integraciju.", +WIP Composite Asset,Objedinjena Imovina Posla u Toku, +Waiting for payment...,Čeka se uplata..., +Warehouse Capacity for Item '{0}' must be greater than the existing stock level of {1} {2}.,Kapacitet Skladišta za artikal '{0}' mora biti veći od postojećeg nivoa zaliha od {1} {2}., +Warehouse Details,Detalji Skladišta, +Warehouse Disabled?,Skladište Onemogućeno?, +Warehouse Settings,Postavke Skladišta, +Warehouse Wise Stock Balance,Stanje Zaliha prema Skladištu, +Warehouse wise Stock Value,Vrijednost Zaliha prema Skladištu, +Warehouse {0} does not belong to Company {1}.,Skladište {0} ne pripada Kompaniji {1}., +"Warehouse {0} is not linked to any account, please mention the account in the warehouse record or set default inventory account in company {1}.","Skladište {0} nije povezano ni sa jednim računom, navedi račun u zapisu skladišta ili postavi standard račun zaliha u kompaniji {1}.", +Warehouse's Stock Value has already been booked in the following accounts:,Vrijednost zaliha skladišta je već knjižena na sljedećim računima:, +Warning - Row {0}: Billing Hours are more than Actual Hours,Upozorenje - Red {0}: Sati naplate su više od stvarnih sati, +Warning on Negative Stock,Upozorenje na Negativnu Zalihu, +Warning!,Upozorenje!, +Watch Video,Pogledaj Video, +Website Script,Skripta Web Stranice, +Website Theme,Tema Web Stranice, +Week {0} {1},Sedmica {0} {1}, +Weekly Time to send,Sedmično vrijeme za slanje, +Weight (kg),Težina (kg), +"When a parent warehouse is chosen, the system conducts stock checks against the associated child warehouses","Kada se izabere Nadređeno skladište, sistem provodi provjere zaliha naspram pridruženih podređenih skladišta", +"When creating an Item, entering a value for this field will automatically create an Item Price at the backend.","Kada kreirate artikal, unosom vrijednosti za ovo polje automatski će se kreirati Cijena Artikla u pozadini.", +"While making Purchase Invoice from Purchase Order, use Exchange Rate on Invoice's transaction date rather than inheriting it from Purchase Order. Only applies for Purchase Invoice.","Dok pravite Kupovnu Fakturu iz Kupovnog Naloga, koristi Devizni Kurs na datum transakcije Kupovne Fakture umjesto da ga preuzmete iz Kupovnog Naloga. Primjenjuje se samo na Kupovnu Fakturu.", +Width (cm),Širina (cm), +With Period Closing Entry For Opening Balances,Sa završnim unosom perioda za Početna Stanja, +Withdrawal,Isplata, +Work Order / Subcontract PO,Radni Nalog / Podugovorni Kupovni Nalog, +Work Order Consumed Materials,Potrošeni Materijali Radnog Naloga, +Workflow,Radni Tok, +Workflow Action,Radnja Radnog Toka, +Workflow State,Radni Tok Stanje, +Workstation Dashboard,Kontrolna Tabla Radne Stanice, +Workstation Status,Status Radne Stanice, +Workstation Type,Tip Radne Stanice, +Workstations,Radne Stanice, +Write Off Limit,Ograničenje Otpisa, +Wrong Company,Pogrešna Kompanija, +Wrong Template,Pogrešan Šablon, +You are importing data for the code list:,Uvoziš podatke za Listu Koda:, +You are not authorized to make/edit Stock Transactions for Item {0} under warehouse {1} before this time.,Niste ovlašteni da vršite/uredite transakcije zaliha za artikal {0} u skladištu {1} prije ovog vremena., +You are picking more than required quantity for the item {0}. Check if there is any other pick list created for the sales order {1}.,Birate više od potrebne količine za artikal {0}. Provjerite postoji li neka druga lista odabira kreirana za prodajni nalog {1}., +You can add the original invoice {} manually to proceed.,Možete dodati originalnu fakturu {} ručno da nastavite., +"You can set it as a machine name or operation type. For example, stiching machine 12","Možete ga postaviti kao naziv mašine ili tip operacije. Na primjer, mašina za šivanje 12", +You can't make any changes to Job Card since Work Order is closed.,Ne možete napraviti nikakve promjene na Radnoj Kartici jer je Radni Nalog zatvoren., +You can't process the serial number {0} as it has already been used in the SABB {1}. {2} if you want to inward same serial number multiple times then enabled 'Allow existing Serial No to be Manufactured/Received again' in the {3},"Ne možete obraditi serijski broj {0} jer je već korišten u Serijskom i Šaržnom Paketu {1}. {2} ako želite da primite isti serijski broj više puta, tada omogući 'Dozvoli da se postojeći Serijski Broj ponovo Proizvede/Primi' u {3}", +You can't redeem Loyalty Points having more value than the Rounded Total.,Ne možete iskoristiti bodove lojalnosti koji imaju veću vrijednost od zaokruženog ukupnog iznosa., +You cannot change the rate if BOM is mentioned against any Item.,Ne možete promijeniti cijenu ako je Sastavnica navedena naspram bilo kojeg artikla., +You cannot create a {0} within the closed Accounting Period {1},Ne možete kreirati {0} unutar zatvorenog Knjigovodstvenog Perioda {1}, +You cannot create/amend any accounting entries till this date.,Ne možete kreirati/izmijeniti bilo koje knjigovodstvene unose do ovog datuma., +You cannot repost item valuation before {},Ne možete ponovo knjižiti procjenu artikla prije {}, +You cannot {0} this document because another Period Closing Entry {1} exists after {2},Ne možete {0} ovaj dokument jer postoji drugi Unos Zatvaranje Perioda {1} nakon {2}, +You have entered a duplicate Delivery Note on Row,Unijeli ste duplikat Dostavnice u red, +You haven't created a {0} yet,Još niste kreirali {0}, +You need to cancel POS Closing Entry {} to be able to cancel this document.,Morate otkazati Unos Zatvaranje Kase {} da biste mogli otkazati ovaj dokument., +Your Name (required),Vaše Ime (obavezno), +Your email has been verified and your appointment has been scheduled,Vaša e-pošta je verificirana i vaš termin je zakazan, +Zero Balance,Nulto Stanje, +Zero Rated,Nulta Stopa, +Zero quantity,Nulta Količina, +`Allow Negative rates for Items`,`Dozvoli negativne cijene za Artikle`, +as Code,kao Kod, +as Description,kao Opis, +as Title,kao Naslov, +as a percentage of finished item quantity,kao procentualna količine gotovog proizvoda, +at,u, +by {},od {}, +dated {0},datirano {0}, +description,opis, +discount applied,primijenjen popust, +fieldname,naziv polja, +is already,već je, +must be between 0 and 100,mora biti između 0 i 100, +or its descendants,ili njegovih podređnih, +out of 5,od 5 mogućih, +payments app is not installed. Please install it from {0} or {1},aplikacija za plaćanja nije instalirana. Instaliraj s {0} ili {1}, +payments app is not installed. Please install it from {} or {},aplikacija za plaćanja nije instalirana. Instaliraj s {} ili {}, +performing either one below:,izvodi bilo koje dolje:, +product bundle item row's name in sales order. Also indicates that picked item is to be used for a product bundle,naziv reda artikla paketa proizvoda u prodajnom nalogu. Također označava da odabrani artikal treba koristiti za paket proizvoda, +quotation_item,Artikal Ponude, +ratings,ocjene, +subscription is already cancelled.,pretplata je već otkazana., +temporary name,privremeno ime, +to unallocate the amount of this Return Invoice before cancelling it.,da poništite iznos ove povratne fakture prije nego što je poništite., +variance,odstupanje, +via BOM Update Tool,putem Alata Ažuriranje Sastavnice, +will be,će biti, +{0} {1} has submitted Assets. Remove Item {2} from table to continue.,{0} {1} je podnijeo Imovinu. Ukloni Artikal {2} iz tabele da nastavite., +{0} Account not found against Customer {1}.,{0} Račun nije pronađen prema Klijentu {1}., +{0} Account: {1} ({2}) must be in either customer billing currency: {3} or Company default currency: {4},{0} Račun: {1} ({2}) mora biti u bilo kojoj valuti fakture klijenta: {3} ili standard valuta kompanije: {4}, +{0} Budget for Account {1} against {2} {3} is {4}. It {5} exceed by {6},{0} Budžet za račun {1} naspram {2} {3} je {4}. To {5} premašuje za {6}, +{0} Transaction(s) Reconciled,{0} Transakcije su Usaglašene, +{0} account is not of type {1},{0} račun nije tipa {1}, +{0} account not found while submitting purchase receipt,{0} račun nije pronađen prilikom podnošenja Kupovnog Računa, +{0} and {1},{0} i {1}, +{0} cannot be used as a Main Cost Center because it has been used as child in Cost Center Allocation {1},{0} se ne može koristiti kao Matični Centar Troškova jer je korišten kao podređeni u raspodjeli Centra Troškova {1}, +{0} cannot be zero,{0} ne može biti nula, +{0} currency must be same as company's default currency. Please select another account.,{0} valuta mora biti ista kao standard valuta kompanije. Odaberi drugi račun., +{0} entered twice {1} in Item Taxes,{0} uneseno dvaput {1} u PDV Artikla, +{0} has Payment Term based allocation enabled. Select a Payment Term for Row #{1} in Payment References section,{0} ima omogućenu dodjelu na osnovu uslova plaćanja. Odaberi rok plaćanja za red #{1} u sekciji Reference plaćanja, +{0} is a mandatory Accounting Dimension.
Please set a value for {0} in Accounting Dimensions section.,{0} je obavezna knjigovodstvena dimenzija.
Postavite vrijednost za {0} u sekciji Knjigovodstvene Dimenzije., +{0} is a mandatory field.,{0} je obavezno polje., +{0} is added multiple times on rows: {1},{0} je dodata više puta u redove: {1}, +{0} is already running for {1},{0} već radi za {1}, +{0} is mandatory for account {1},{0} je obavezan za račun {1}, +{0} is not running. Cannot trigger events for this Document,{0} ne radi. Nije moguće pokrenuti događaje za ovaj dokument, +{0} items lost during process.,{0} artikala izgubljenih tokom procesa., +{0} qty of Item {1} is being received into Warehouse {2} with capacity {3}.,{0} količina artikla {1} se prima u Skladište {2} kapaciteta {3}., +"{0} units are reserved for Item {1} in Warehouse {2}, please un-reserve the same to {3} the Stock Reconciliation.","{0} jedinica je rezervisano za artikal {1} u Skladištu {2}, poništi rezervaciju iste za {3} Popis Zaliha.", +{0} units of Item {1} is not available in any of the warehouses.,{0} jedinica artikla {1} nije dostupan ni u jednom od skladišta., +{0} units of Item {1} is picked in another Pick List.,{0} jedinica artikla {1} je odabrano na drugoj Listi Odabira., +{0} units of {1} are required in {2} with the inventory dimension: {3} ({4}) on {5} {6} for {7} to complete the transaction.,{0} jedinice {1} su obavezne u {2} sa dimenzijom zaliha: {3} ({4}) na {5} {6} za {7} za dovršetak transakcije., +{0} units of {1} needed in {2} on {3} {4} to complete this transaction.,{0} jedinica {1} potrebnih u {2} na {3} {4} za završetak ove transakcije., +{0} will be given as discount.,{0} će biti dato kao popust., +{0} {1} Manually,{0} {1} Ručno, +{0} {1} Partially Reconciled,{0} {1} Djelimično Usaglašeno, +"{0} {1} cannot be updated. If you need to make changes, we recommend canceling the existing entry and creating a new one.","{0} {1} se ne može ažurirati. Ako trebate napraviti promjene, preporučujemo da poništite postojeći unos i kreirate novi.", +{0} {1} has already been fully paid.,{0} {1} je već u potpunosti plaćeno., +{0} {1} has already been partly paid. Please use the 'Get Outstanding Invoice' or the 'Get Outstanding Orders' button to get the latest outstanding amounts.,{0} {1} je već djelimično plaćena. Koristi dugme 'Preuzmi Nepodmirene Fakture' ili 'Preuzmi Nepodmirene Naloge' da preuzmete najnovije nepodmirene iznose., +{0} {1} is allocated twice in this Bank Transaction,{0} {1} se dodeljuje dva puta u ovoj bankovnoj transakciji, +{0} {1} is already linked to Common Code {2}.,{0} {1} je već povezan sa Zajedničkim Kodom {2}., +{0} {1} is not in any active Fiscal Year,{0} {1} nije ni u jednoj aktivnoj Fiskalnoj Godini, +{0} {1} is on hold,{0} {1} je na čekanju, +{0} {1} not allowed to be reposted. Modify {2} to enable reposting.,{0} {1} nije dozvoljeno ponovno knjiženje. Izmijeni {2} da omogućite ponovno knjiženje., +{0} {1} via CSV File,{0} {1} preko CSV datoteke, +{0} {1}: Account {2} is a Group Account and group accounts cannot be used in transactions,{0} {1}: Račun {2} je Grupni Račun a grupni računi se ne mogu koristiti u transakcijama, +{0} {1}: Cost Center is required for 'Profit and Loss' account {2}.,{0} {1}: Centar Troškova je obavezan za račun 'Rezultat' {2}., +{0} {1}: Cost Center {2} is a group cost center and group cost centers cannot be used in transactions,{0} {1}: Centar Troškova {2} je grupni centar troškova a grupni centri troškova se ne mogu koristiti u transakcijama, +{0}% of total invoice value will be given as discount.,{0}% ukupne vrijednosti fakture će se dati kao popust., +{0}'s {1} cannot be after {2}'s Expected End Date.,{0} {1} ne može biti nakon {2}očekivanog datuma završetka., +{0}: {1} does not belong to the Company: {2},{0}: {1} ne pripada Kompaniji: {2}, +{item_name}'s Sample Size ({sample_size}) cannot be greater than the Accepted Quantity ({accepted_quantity}),{item_name} Veličina Uzorka ({sample_size}) ne može biti veća od Prihvaćene Količina ({accepted_quantity}), +{} Available,{} Dostupno, +{} To Deliver,{} Za Dostavu, +{} To Receive,{} Za Primiti, +{} Assigned,{} Dodijeljeno, +{} Available,{} Dostupno, +{} Open,{} Otvori, +{} Pending,{} Na Čekanju, +{} To Bill,{} Za Fakturisati, +{} is a child company.,{} je podređena kompanija., +{} {} is already linked with another {},{} {} je već povezan s drugim {}, +{} {} is already linked with {} {},{} {} je već povezan sa {} {}, +{} {} is not affecting bank account {},{} {} ne utiče na bankovni račun {}, diff --git a/erpnext/translations/de.csv b/erpnext/translations/de.csv index 8c735dc0e7c..ae21d758b75 100644 --- a/erpnext/translations/de.csv +++ b/erpnext/translations/de.csv @@ -12129,3 +12129,190 @@ Rejected ,Abgelehnt , Row #{0}: Allocated Amount cannot be greater than Outstanding Amount of Payment Request {1},Zeile #{0}: Der zugewiesene Betrag kann nicht größer sein als der ausstehende Betrag der Zahlungsanforderung {1}, Section,Sektion, Sending...,Senden..., +"According to the BOM {0}, the Item '{1}' is missing in the stock entry.",Laut Stückliste {0} fehlt in der Lagerbuchung die Position '{1}'., +Additional Data,Zusätzliche Daten, +Advance Payment Date,Datum der Vorauszahlung, +Advance Payment Ledger Entry,Vorauszahlungsbucheintrag, +Allow existing Serial No to be Manufactured/Received again,"Erlauben, dass bestehende Seriennummern erneut hergestellt/empfangen werden", +Amount in Words,Betrag in Worten, +Amounts,Beträge, +Another Payment Request is already processed,Eine andere Zahlungsaufforderung wird bereits bearbeitet, +Applies To,Gilt für, +Are you sure you want to delete {0}?

This action will also delete all associated Common Code documents.

,"Sind Sie sicher, dass Sie {0} löschen möchten?

Durch dieser Aktion werden auch alle zugehörigen Common Code Dokumente gelöscht.

", +At Row #{0}: The picked quantity {1} for the item {2} is greater than available stock {3} for the batch {4} in the warehouse {5}. Please restock the item.,In Zeile #{0}: Die entnommene Menge {1} für den Artikel {2} ist größer als der verfügbare Bestand {3} für die Charge {4} im Lager {5}. Bitte füllen Sie den Artikel wieder auf., +At least one account with exchange gain or loss is required,Mindestens ein Konto mit Wechselkursgewinnen oder -verlusten ist erforderlich, +Auto Fetch Serial Numbers,Seriennummern automatisch abrufen, +Auto Reconciliation Job Trigger,Auslöser für automatischen Abgleichsjob, +Auto Reconciliation has started in the background,Der automatische Abgleich wurde im Hintergrund gestartet, +Bank Account {} in Bank Transaction {} is not matching with Bank Account {},Bankkonto {} in Banktransaktion {} stimmt nicht mit Bankkonto {} überein, +"Batch No {0} is not present in the original {1} {2}, hence you can't return it against the {1} {2}","Charge Nr. {0} ist im Original {1} {2} nicht vorhanden, daher können Sie sie nicht gegen {1} {2} zurückgeben", +Billing Address does not belong to the {0},Die Rechnungsadresse gehört nicht zu {0}, +CANCELLED,Abgebrochen, +Child Row Reference,Zeilenreferenz, +Code List,Code-Liste, +Company Contact Person,Kontaktperson des Unternehmens, +Company {0} added multiple times,Unternehmen {0} mehrfach hinzugefügt, +"Consumed Stock Items, Consumed Asset Items or Consumed Service Items is mandatory for Capitalization","Verbrauchte Lagerartikel, verbrauchte Vermögensgegenstand-Artikel oder verbrauchte Dienstleistungsartikel sind für die Aktivierung obligatorisch.", +Contact Person does not belong to the {0},Die Kontaktperson gehört nicht zu {0}, +Conversion factor for item {0} has been reset to 1.0 as the uom {1} is same as stock uom {2}.,"Der Umrechnungsfaktor für Artikel {0} wurde auf 1,0 zurückgesetzt, da die Maßeinheit {1} dieselbe ist wie die Lagermaßeinheit {2}.", +Conversion rate cannot be 0,Der Umrechnungskurs kann nicht 0 sein, +"Conversion rate is 1.00, but document currency is different from company currency","Der Umrechnungskurs beträgt 1,00, aber die Währung des Dokuments unterscheidet sich von der Währung des Unternehmens", +Conversion rate must be 1.00 if document currency is same as company currency,"Der Umrechnungskurs muss 1,00 betragen, wenn die Belegwährung mit der Währung des Unternehmens übereinstimmt", +Cost Center for Item rows has been updated to {0},Die Kostenstelle für Artikelzeilen wurde auf {0} aktualisiert, +"Credit Note will update it's own outstanding amount, even if 'Return Against' is specified.","Den ausstehenden Betrag dieser Rechnungskorrektur separat buchen, statt den der korrigierten Rechnung zu verringern.", +Cron Interval should be between 1 and 59 Min,Das Cron-Intervall sollte zwischen 1 und 59 Minuten liegen, +Dates,Daten, +"Debit Note will update it's own outstanding amount, even if 'Return Against' is specified.","Den ausstehenden Betrag dieser Rechnungskorrektur separat buchen, statt den der korrigierten Rechnung zu verringern.", +Default Common Code,Standard Common Code, +Demand,Nachfrage, +Depreciation Expense Account should be an Income or Expense Account.,Das Abschreibungsaufwandskonto sollte ein Erlös- oder Aufwandskonto sein., +Depreciation Posting Date cannot be before Available-for-use Date,Das Buchungsdatum der Abschreibung kann nicht vor dem Datum der Verfügbarkeit liegen, +Depreciation Row {0}: Depreciation Posting Date cannot be before Available-for-use Date,Abschreibungszeile {0}: Das Buchungsdatum der Abschreibung darf nicht vor dem Verfügbarkeitsdatum liegen, +Depreciation eliminated via reversal,Abschreibung durch Umkehr eliminiert, +Disassemble Order,Demontageauftrag, +Discount cannot be greater than 100%.,Der Rabatt kann nicht mehr als 100% betragen., +Do you still want to enable immutable ledger?,Möchten Sie das unveränderliche Hauptbuch dennoch aktivieren?, +Documents Processed on each trigger. Queue Size should be between 5 and 100,Bei jedem Trigger verarbeitete Dokumente. Die Größe der Warteschlange sollte zwischen 5 und 100 liegen., +Don't Enforce Free Item Qty,Kostenlose Artikelmenge nicht erzwingen, +Download PDF for Supplier,PDF für Lieferanten herunterladen, +Email Receipt,Quittung per E-Mail senden, +Employee {0} is currently working on another workstation. Please assign another employee.,Der Mitarbeiter {0} arbeitet derzeit an einem anderen Arbeitsplatz. Bitte weisen Sie einen anderen Mitarbeiter zu., +"Enable this option to calculate daily depreciation by considering the total number of days in the entire depreciation period, (including leap years) while using daily pro-rata based depreciation","Aktivieren Sie diese Option, um die tägliche Abschreibung unter Berücksichtigung der Gesamtzahl der Tage im gesamten Abschreibungszeitraum (einschließlich Schaltjahre) zu berechnen, während die tägliche anteilige Abschreibung verwendet wird", +Exit Full Screen,Vollbildmodus verlassen, +Fetch Timesheet in Sales Invoice,Zeiterfassung in Ausgangsrechnung laden, +Full Screen,Vollbild, +Handle Employee Advances,Umgang mit Mitarbeitervorschüssen, +Has Corrective Cost,Hat Korrekturkosten, +Has Item Scanned,Artikel wurde gescannt, +Hide timesheets,Zeiterfassung verstecken, +"If there is no title column, use the code column for the title.","Wenn es keine Titelspalte gibt, verwenden Sie die Code-Spalte für den Titel.", +Ignore Exchange Rate Revaluation Journals,Wechselkursneubewertungsjournale ignorieren, +Ignore Pricing Rule is enabled. Cannot apply coupon code.,„Preisregel ignorieren“ ist aktiviert. Gutscheincode kann nicht angewendet werden., +Ignore Voucher Type filter and Select Vouchers Manually,Gutscheintyp-Filter ignorieren und Gutscheine manuell auswählen, +Import Genericode File,Genericode-Datei importieren, +Import completed. {0} common codes created.,Import abgeschlossen. {0} gemeinsame Codes erstellt., +Importing Common Codes,Gemeinsame Codes importieren, +Include Zero Stock Items,Nullbestandsartikel einschließen, +Incorrect Reference Document (Purchase Receipt Item),Falsches Referenzdokument (Eingangsbeleg Artikel), +Incorrect Serial and Batch Bundle,Ungültiges Serien- und Chargenbündel, +Incorrect Stock Value Report,Falscher Lagerwertbericht, +Individual GL Entry cannot be cancelled.,Einzelne Hauptbucheinträge können nicht storniert werden., +Initialize Summary Table,Übersichtstabelle initialisieren, +Interval should be between 1 to 59 MInutes,Das Intervall sollte zwischen 1 und 59 Minuten liegen, +Invalid Discount,Ungültiger Rabatt, +Invoice ID,Rechnungs-ID, +Is Corrective Job Card,Ist Nacharbeitsauftrag, +Is Period Closing Voucher Entry,Ist Periodenabschlussbeleg, +Item rate has been updated to zero as Allow Zero Valuation Rate is checked for item {0},"Artikelpreis wurde auf Null aktualisiert, da „Nullbewertung zulassen“ für Artikel {0} aktiviert ist", +Last transacted,Zuletzt verarbeitet, +Loading Invoices! Please Wait...,Rechnungen werden geladen! Bitte warten..., +Missing Item,Fehlender Artikel, +Mobile: ,Mobil: , +More/Less than 12 months.,Mehr/Weniger als 12 Monate., +Negative Batch Quantity,Negative Chargenmenge, +No recent transactions found,Keine kürzlichen Transaktionen gefunden, +Only applies for Normal Payments,Gilt nur für normale Zahlungen, +"Only values between [0,1) are allowed. Like {0.00, 0.04, 0.09, ...} +Ex: If allowance is set at 0.07, accounts that have balance of 0.07 in either of the currencies will be considered as zero balance account","Es sind nur Werte zwischen [0;1) zulässig. Wie {0,00; 0,04; 0,09; ...} +Beispiel: Wenn der Freibetrag auf 0,07 festgelegt ist, werden Konten mit einem Saldo von 0,07 in einer der beiden Währungen als Konten mit Nullsaldo betrachtet.", +POS Invoice is already consolidated,POS-Rechnung ist bereits konsolidiert, +POS Invoice should have the field {0} checked.,Für die POS-Rechnung sollte das Feld {0} aktiviert sein., +POS Profile doesn't match {},POS-Profil stimmt nicht mit {} überein, +Parent Row No not found for {0},Übergeordnete Zeilennummer für {0} nicht gefunden, +Partial Payment in POS Invoice is not allowed.,Teilzahlungen in POS-Rechnungen sind nicht zulässig., +Party Type and Party can only be set for Receivable / Payable account

{0},Parteityp und Partei können nur für das Debitoren-/Kreditorenkonto {0} festgelegt werden., +Payment Reconciliation Settings,Einstellungen für den Zahlungsabgleich, +Payment Request Outstanding,Ausstehende Zahlungsanforderung, +Payment Request is already created,Die Zahlungsanforderung wurde bereits erstellt, +Payment Status,Zahlungsstatus, +Period End Date cannot be greater than Fiscal Year End Date,Das Enddatum des Zeitraums kann nicht nach dem Enddatum des Geschäftsjahrs liegen, +Period Start Date cannot be greater than Period End Date,Das Startdatum des Zeitraums kann nicht nach dem Enddatum des Zeitraums liegen, +Please set {0} first.,Bitte geben Sie zuerst {0} ein., +Please set {0} in Company {1} to account for Exchange Gain / Loss,"Bitte stellen Sie {0} in Unternehmen {1} ein, um Wechselkursgewinne/-verluste zu berücksichtigen", +"Please set {0} to {1}, the same account that was used in the original invoice {2}.","Bitte setzen Sie {0} auf {1}, das gleiche Konto, das in der ursprünglichen Rechnung {2} verwendet wurde.", +Please specify a {0} first.,Bitte geben Sie zuerst {0} ein., +Preview Required Materials,Vorschau der erforderlichen Materialien, +Publisher,Herausgeber, +Publisher ID,Herausgeber-ID, +Qty (Company),Menge (Unternehmen), +Qty (Warehouse),Menge (Lager), +Qty for which recursion isn't applicable.,"Menge, für die Rekursion nicht anwendbar ist.", +Quantity (A - B),Menge (A - B), +Queue Size should be between 5 and 100,Die Größe der Warteschlange sollte zwischen 5 und 100 liegen, +Reconciliation Date,Abstimmungsdatum, +Reconciliation Queue Size,Größe der Abstimmungswarteschlange, +Reference Date for Early Payment Discount,Stichtag für Skonto, +Reference Detail,Referenzdetail, +Removing rows without exchange gain or loss,Entfernen von Zeilen ohne Kursgewinn oder -verlust, +Resume Timer,Timer fortsetzen, +Revaluation Journals,Neubewertungsjournale, +Revaluation Surplus,Neubewertungsüberschüsse, +Role Allowed to Over Bill ,"Rolle, die mehr abrechnen darf", +Role Allowed to Over Deliver/Receive,"Rolle, die mehr liefern/empfangen darf", +Round Free Qty,Kostenfreie Menge runden, +Row # {0}: Please add Serial and Batch Bundle for Item {1},Zeile {0}: Bitte fügen Sie Serien- und Chargenbündel für Artikel {1} hinzu, +Row #{0}: Quality Inspection is required for Item {1},Zeile {0}: Für Artikel {1} ist eine Qualitätsprüfung erforderlich, +Row #{0}: Quality Inspection {1} is not submitted for the item: {2},Zeile {0}: Qualitätsprüfung {1} wurde für den Artikel {2} nicht gebucht, +Row #{0}: Quality Inspection {1} was rejected for item {2},Zeile {0}: Qualitätsprüfung {1} wurde für Artikel {2} abgelehnt, +"Row {0}: As {1} is enabled, raw materials cannot be added to {2} entry. Use {3} entry to consume raw materials.","Zeile {0}: Da {1} aktiviert ist, können dem {2}-Eintrag keine Rohstoffe hinzugefügt werden. Verwenden Sie einen {3}-Eintrag, um Rohstoffe zu verbrauchen.", +Row {0}: Item Tax template updated as per validity and rate applied,Zeile {0}: Artikelsteuervorlage aktualisiert gemäß Gültigkeit und angewendetem Satz, +Row {0}: Item {1}'s quantity cannot be higher than the available quantity.,Zeile {0}: Die Menge des Artikels {1} kann nicht höher sein als die verfügbare Menge., +Row {0}: Project must be same as the one set in the Timesheet: {1}.,Zeile {0}: Das Projekt muss mit dem in der Zeiterfassung festgelegten Projekt identisch sein: {1}., +Row {0}: Quantity cannot be negative.,Zeile {0}: Die Menge darf nicht negativ sein., +"Row {0}: To set {1} periodicity, difference between from and to date must be greater than or equal to {2}","Zeile {0}: Um die Periodizität {1} festzulegen, muss die Differenz zwischen dem Von- und Bis-Datum größer oder gleich {2} sein", +Row {0}: Workstation or Workstation Type is mandatory for an operation {1},Zeile {0}: Arbeitsplatz oder Arbeitsplatztyp ist obligatorisch für einen Vorgang {1}, +Row {0}: {1} account already applied for Accounting Dimension {2},Zeile {0}: Konto {1} wird bereits für die Buchhaltungsdimension {2} verwendet, +Select Columns and Filters,Spalten und Filter auswählen, +Set Parent Row No in Items Table,Übergeordnete Zeilennummer in der Artikeltabelle festlegen, +Set Response Time for Priority {0} in row {1}.,Legen Sie die Reaktionszeit für die Priorität {0} in der Zeile {1} fest., +Set Valuation Rate Based on Source Warehouse,Bewertungssatz basierend auf dem Quelllager festlegen, +Set quantity of process loss item:,Menge des Prozessverlustartikels festlegen:, +Setting Item Locations...,Festlegen der Artikelstandorte ..., +Shipping Address does not belong to the {0},Die Lieferadresse gehört nicht zu {0}, +Splitting {0} {1} into {2} rows as per Payment Terms,Aufteilen von {0} {1} in {2} Zeilen gemäß Zahlungsbedingungen, +Sub Total,Zwischensumme, +Subscription for Future dates cannot be processed.,Abonnements für zukünftige Termine können nicht verarbeitet werden., +Task Assignee Email,E-Mail des Aufgabenempfängers, +Tax will be withheld only for amount exceeding the cumulative threshold,"Die Steuer wird nur für den Betrag einbehalten, der den kumulierten Schwellenwert überschreitet", +Territory Wise Sales,Gebietsbezogene Verkäufe, +The Batch {0} has negative quantity {1} in warehouse {2}. Please correct the quantity.,Die Charge {0} hat eine negative Menge {1} im Lager {2}. Bitte korrigieren Sie die Menge., +"The GL Entries and closing balances will be processed in the background, it can take a few minutes.","Die Hauptbucheinträge und Schlusssalden werden im Hintergrund verarbeitet, dies kann einige Minuten dauern.", +The Process Loss Qty has reset as per job cards Process Loss Qty,Die Prozessverlustmenge wurde gemäß den Jobkarten zurückgesetzt, +The Sales Person is linked with {0},Der Verkäufer ist mit {0} verknüpft, +"The following batches are expired, please restock them:
{0}","Die folgenden Chargen sind abgelaufen, bitte füllen Sie sie wieder auf:
{0}", +The items {0} and {1} are present in the following {2} :,Die Artikel {0} und {1} sind im folgenden {2} zu finden:, +The percentage you are allowed to pick more items in the pick list than the ordered quantity.,"Der Prozentsatz, um den Sie mehr Artikel in der Kommissionierliste auswählen dürfen als die bestellte Menge.", +"The percentage you are allowed to transfer more against the quantity ordered. For example, if you have ordered 100 units, and your Allowance is 10%, then you are allowed transfer 110 units.","Der Prozentsatz, den Sie mehr als die bestellte Menge übertragen dürfen. Wenn Sie zum Beispiel 100 Einheiten bestellt haben und Ihr Freibetrag 10% beträgt, dürfen Sie 110 Einheiten übertragen.", +The reserved stock will be released when you update items. Are you certain you wish to proceed?,"Der reservierte Bestand wird freigegeben, wenn Sie Artikel aktualisieren. Möchten Sie wirklich fortfahren?", +The serial and batch bundle {0} not linked to {1} {2},Das Seriennummern- und Chargenbündel {0} ist nicht mit {1} {2} verknüpft, +The uploaded file does not match the selected Code List.,Die hochgeladene Datei stimmt nicht mit der ausgewählten Codeliste überein., +The user cannot submit the Serial and Batch Bundle manually,Der Benutzer kann das Seriennummer- und Chargennummer-Bündel nicht manuell buchen, +Total Items,Artikel insgesamt, +Total Picked Quantity {0} is more than ordered qty {1}. You can set the Over Picking Allowance in Stock Settings.,Die gesamte kommissionierte Menge {0} ist größer als die bestellte Menge {1}. Sie können die Zulässigkeit der Überkommissionierung in den Lagereinstellungen festlegen., +Total Reposting Count,Gesamtzahl der Umbuchungen, +Total Weight (kg),Gesamtgewicht (kg), +Unable to find the time slot in the next {0} days for the operation {1}. Please increase the 'Capacity Planning For (Days)' in the {2}.,"Es ist nicht möglich, ein Zeitfenster in den nächsten {0} Tagen für die Operation {1} zu finden. Bitte erhöhen Sie die 'Kapazitätsplanung für (Tage)' in der {2}.", +Unassigned Qty,Nicht zugewiesene Menge, +Update timestamp on new communication,Zeitstempel bei neuer Kommunikation aktualisieren, +Updated via 'Time Log' (In Minutes),Aktualisiert über „Zeitprotokoll“ (in Minuten), +Updating Work Order status,Status des Arbeitsauftrags aktualisieren, +Use Item based reposting,Artikelbasierte Umbuchung verwenden, +VAT Amount (AED),MwSt.-Betrag (AED), +Valuation (I - K),Bewertung (I - K), +Value (G - D),Wert (G - D), +Value ({0}),Wert ({0}), +Value as on,Wert zum, +Value of New Capitalized Asset,Wert der neu aktivierten Sachanlage, +You are importing data for the code list:,Sie importieren Daten für die Codeliste:, +You can add the original invoice {} manually to proceed.,"Sie können die Originalrechnung {} manuell hinzufügen, um fortzufahren.", +You can't redeem Loyalty Points having more value than the Rounded Total.,"Sie können keine Treuepunkte einlösen, deren Wert höher ist als die gerundete Summe.", +You cannot change the rate if BOM is mentioned against any Item.,"Sie können den Preis nicht ändern, wenn bei einem Artikel die Stückliste angegeben ist.", +You cannot {0} this document because another Period Closing Entry {1} exists after {2},"Sie können dieses Dokument nicht {0}, da nach {2} ein weiterer Periodenabschlusseintrag {1} existiert", +You need to cancel POS Closing Entry {} to be able to cancel this document.,"Sie müssen den POS-Abschlusseintrag {} stornieren, um diesen Beleg stornieren zu können.", +Zero Balance,Nullsaldo, +Zero quantity,Nullmenge, +as Description,als Beschreibung, +by {},von {}, +{0} is a mandatory field.,{0} ist ein Pflichtfeld., +{0}: {1} does not belong to the Company: {2},{0}: {1} gehört nicht zum Unternehmen: {2}, +{} {} is not affecting bank account {},{} {} hat keinen Einfluss auf das Bankkonto {}, diff --git a/erpnext/translations/es.csv b/erpnext/translations/es.csv index 0f6b0ed7f84..8d90f5ce2ed 100644 --- a/erpnext/translations/es.csv +++ b/erpnext/translations/es.csv @@ -11307,3 +11307,11 @@ Total Outgoing Payment,Pago Total Saliente, Transferring cannot be done to an Employee. Please enter location where Asset {0} has to be transferred,"La transferencia no puede realizarse a un empleado. Por favor, introduzca la ubicación a la que debe transferirse el activo {0}", Validate Stock on Save,Validar Stock al Guardar, Version,Versión, +Advance Payment Date,Fecha de pago anticipado, +Advance Reconciliation Takes Effect On,La conciliación anticipada entra en vigor el, +Allow existing Serial No to be Manufactured/Received again,Permitir que los números de serie existentes se fabriquen/reciban de nuevo, +CANCELLED,CANCELADO, +Code List,Lista de códigos, +Has Corrective Cost,Tiene costo correctivo, +Mobile: ,Móvil: , +{0} is a mandatory field.,{0} es un campo obligatorio., diff --git a/erpnext/translations/fa.csv b/erpnext/translations/fa.csv index f126b472da5..68b5d94f05d 100644 --- a/erpnext/translations/fa.csv +++ b/erpnext/translations/fa.csv @@ -11375,3 +11375,83 @@ Value of Scrapped Asset,ارزش دارایی اسقاط شده, Version,نسخه, You are importing data for the code list:,شما در حال درون‌برد داده ها برای لیست کد هستید:, You can add the original invoice {} manually to proceed.,برای ادامه می توانید فاکتور اصلی {} را به صورت دستی اضافه کنید., +Advance Account: {0} must be in either customer billing currency: {1} or Company default currency: {2},حساب پیش پرداخت: {0} باید یا به ارز صورتحساب مشتری: {1} یا به ارز پیش‌فرض شرکت: {2} باشد, +Allow Internal Transfers at Arm's Length Price,اجازه انتقالات داخلی با قیمت منصفانه, +Allow existing Serial No to be Manufactured/Received again,اجازه استفاده مجدد از شماره سریال موجود برای تولید/دریافت, +Amount Difference with Purchase Invoice,تفاوت مبلغ با فاکتور خرید, +Amount in Words,مبلغ به حروف, +Auto Fetch Serial Numbers,واکشی خودکار شماره سریال, +Auto Reconciliation has started in the background,تطبیق خودکار در پس‌زمینه شروع شده است, +Billing Address does not belong to the {0},آدرس صورتحساب به {0} تعلق ندارد, +Both Receivable Account: {0} and Advance Account: {1} must be of same currency for company: {2},هر دو حساب دریافتنی: {0} و حساب پیش پرداخت: {1} باید دارای یک ارز یکسان برای شرکت: {2} باشند, +CANCELLED,لغو شده, +Company {0} added multiple times,شرکت {0} چندین بار اضافه شد, +Contact Person does not belong to the {0},شخص مخاطب به {0} تعلق ندارد, +Conversion rate cannot be 0,نرخ تبدیل نمی تواند 0 باشد, +Cost Center for Item rows has been updated to {0},مرکز هزینه برای ردیف های آیتم به {0} به روز شده است, +Do Not Update Serial / Batch on Creation of Auto Bundle,عدم به‌روزرسانی سریال / دسته هنگام ایجاد باندل خودکار, +Do Not Use Batch-wise Valuation,عدم استفاده از ارزیابی دسته‌ای, +Do reposting for each Stock Transaction,انجام ارسال مجدد برای هر تراکنش موجودی, +Employee {0} is currently working on another workstation. Please assign another employee.,کارمند {0} در حال حاضر روی ایستگاه کاری دیگری کار می‌کند. لطفا کارمند دیگری را تعیین کنید., +Enabling this ensures each Purchase Invoice has a unique value in Supplier Invoice No. field within a particular fiscal year,فعال‌سازی این گزینه تضمین می‌کند که هر فاکتور خرید دارای مقدار یکتایی در فیلد شماره فاکتور تأمین‌کننده در یک سال مالی مشخص باشد, +Exit Full Screen,خروج از تمام صفحه, +Floor,سالن, +Floor Name,نام سالن, +Full Screen,تمام صفحه, +Has Corrective Cost,هزینه اصلاحی دارد, +If enabled then system won't apply the pricing rule on the delivery note which will be create from the pick list,اگر فعال باشد، سیستم قانون قیمت‌گذاری را بر روی یادداشت تحویل که از لیست انتخاب ایجاد می‌شود، اعمال نخواهد کرد, +"If enabled, do not update serial / batch values in the stock transactions on creation of auto Serial + / Batch Bundle. ","در صورت فعال بودن، مقادیر سریال / دسته را در تراکنش‌های موجودی هنگام ایجاد خودکار باندل سریال + / دسته به روز نکنید. ", +"If enabled, the item rate won't adjust to the valuation rate during internal transfers, but accounting will still use the valuation rate.",اگر فعال شود، نرخ آیتم در انتقالات داخلی با نرخ ارزیابی تنظیم نخواهد شد، اما حسابداری همچنان از نرخ ارزیابی استفاده خواهد کرد., +"If enabled, the system will use the moving average valuation method to calculate the valuation rate for the batched items and will not consider the individual batch-wise incoming rate.",اگر فعال شود، سیستم از روش ارزیابی میانگین متحرک برای محاسبه نرخ ارزیابی آیتم‌های دسته‌ای استفاده خواهد کرد و نرخ ورودی هر دسته را به‌طور جداگانه در نظر نخواهد گرفت., +Incorrect Serial and Batch Bundle,باندل سریال و دسته نادرست, +Interval should be between 1 to 59 MInutes,بازه زمانی باید بین 1 تا 59 دقیقه باشد, +Invalid Serial and Batch Bundle,باندل سریال و دسته نامعتبر, +Invoice ID,شناسه فاکتور, +Is Short/Long Year,سال کوتاه/بلند است, +Mobile: ,تلفن همراه: , +More/Less than 12 months.,بیشتر/کمتر از 12 ماه., +Naming Series is mandatory,سری نامگذاری اجباری است, +Net Purchase Amount,مبلغ خالص خرید, +"On submission of the stock transaction, system will auto create the Serial and Batch Bundle based on the Serial No / Batch fields.",پس از ارسال تراکنش موجودی، سیستم به صورت خودکار باندل سریال و دسته را بر اساس فیلدهای شماره سریال / دسته ایجاد می‌کند., +Only 'Payment Entries' made against this advance account are supported.,فقط «ثبت‌های پرداخت» انجام‌شده در برابر این حساب پیش پرداخت پشتیبانی می‌شوند., +Only applies for Normal Payments,فقط برای پرداخت های عادی اعمال می‌شود, +Order No,شماره سفارش, +Over Picking Allowance,اجازه برداشت بیش از حد, +Partial Payment in POS Invoice is not allowed.,پرداخت جزئی در فاکتور POS مجاز نمی باشد., +Payment Reconciliation Settings,تنظیمات تطبیق پرداخت, +Payment Status,وضعیت پرداخت, +Please set both the Tax ID and Fiscal Code on Company {0},لطفاً شناسه مالیاتی و کد مالی شرکت {0} را تنظیم کنید, +Please set {0} first.,لطفا ابتدا {0} را تنظیم کنید., +Please specify a {0} first.,لطفا ابتدا یک {0} را مشخص کنید., +Print Receipt on Order Complete,چاپ رسید در صورت کامل شدن سفارش, +Reconcile All Serial Nos / Batches,تطبیق همه شماره سریال ها / دسته ها, +Reconciliation Date,تاریخ تطبیق, +Reconciliation Queue Size,اندازه صف تطبیق, +Reconciliation Takes Effect On,تطبیق تاثیر می گذارد روی, +Remove SABB Entry,حذف ثبت SABB, +Row # {0}: Please add Serial and Batch Bundle for Item {1},ردیف # {0}: لطفاً باندل سریال و دسته را برای آیتم {1} اضافه کنید, +Select View,انتخاب نما, +Selected Serial and Batch Bundle entries have been removed.,ثبت‌های باندل سریال و دسته انتخاب شده حذف شده اند., +Serial No and Batch Selector cannot be use when Use Serial / Batch Fields is enabled.,انتخاب‌گر شماره سریال و دسته زمانی که فیلدهای شماره سریال / دسته فعال شده‌اند، قابل استفاده نیست., +Serial and Batch Bundle {0} is already used in {1} {2}.,باندل سریال و دسته {0} قبلاً در {1} {2} استفاده شده است., +Shipping Address does not belong to the {0},آدرس حمل و نقل به {0} تعلق ندارد, +Stock will be reserved on submission of Purchase Receipt created against Material Request for Sales Order.,موجودی هنگام ارسال رسید خرید ایجاد شده بر اساس درخواست مواد برای سفارش فروش رزرو خواهد شد., +System In Use,سیستم در حال استفاده, +Tax Withholding,کسر مالیات, +The Serial and Batch Bundle {0} is not valid for this transaction. The 'Type of Transaction' should be 'Outward' instead of 'Inward' in Serial and Batch Bundle {0},باندل سریال و دسته {0} برای این تراکنش معتبر نیست. «نوع تراکنش» باید به جای «ورودی» در باندل سریال و دسته {0} «خروجی» باشد, +The percentage you are allowed to pick more items in the pick list than the ordered quantity.,درصد مجاز برای انتخاب آیتم‌های بیشتر از مقدار سفارش داده‌شده در فهرست برداشت., +"The percentage you are allowed to transfer more against the quantity ordered. For example, if you have ordered 100 units, and your Allowance is 10%, then you are allowed transfer 110 units.",درصدی که مجاز به انتقال بیشتر نسبت به مقدار سفارش شده هستید. به عنوان مثال، اگر 100 عدد سفارش داده اید، و مقدار مجاز شما 10٪ است، سپس شما مجاز به انتقال 110 واحد هستید., +The serial and batch bundle {0} not linked to {1} {2},باندل سریال و دسته {0} به {1} {2} مرتبط نیست, +The user cannot submit the Serial and Batch Bundle manually,کاربر نمی‌تواند باندل سریال و دسته را به صورت دستی ارسال کند, +To Date is mandatory,تا تاریخ اجباری است, +Total Picked Quantity {0} is more than ordered qty {1}. You can set the Over Picking Allowance in Stock Settings.,مقدار کل برداشت‌شده {0} بیشتر از مقدار سفارش داده‌شده {1} است. می‌توانید حد مجاز برداشت اضافی را در تنظیمات موجودی تعیین کنید., +Total Weight (kg),وزن کل (کیلوگرم), +Update the modified timestamp on new communications received in Lead & Opportunity.,به‌روزرسانی تایم‌استمپ تغییرات بر روی ارتباطات جدید دریافت‌شده در سرنخ و فرصت., +Update timestamp on new communication,به روز رسانی تایم‌استمپ در ارتباطات جدید, +Use Serial / Batch Fields,استفاده از فیلدهای سریال / دسته, +You can't process the serial number {0} as it has already been used in the SABB {1}. {2} if you want to inward same serial number multiple times then enabled 'Allow existing Serial No to be Manufactured/Received again' in the {3},شما نمی‌توانید شماره سریال {0} را پردازش کنید زیرا قبلاً در SABB {1} استفاده شده است. {2} اگر می‌خواهید همان شماره سریال را چندین بار دریافت کنید، گزینه 'اجازه دریافت/تولید مجدد شماره سریال موجود' را در {3} فعال کنید, +{0} is a mandatory field.,{0} یک فیلد اجباری است., +{0} items lost during process.,{0} آیتم در طول فرآیند گم شده است., +{0}: {1} does not belong to the Company: {2},{0}: {1} متعلق به شرکت: {2} نیست, diff --git a/erpnext/translations/fi.csv b/erpnext/translations/fi.csv index c8f4a4999ed..37cf77194f0 100644 --- a/erpnext/translations/fi.csv +++ b/erpnext/translations/fi.csv @@ -8743,3 +8743,5 @@ WhatsApp,WhatsApp, Make a call,Soita, Approve,Hyväksyä, Reject,Hylätä, +Convert to Group,Muunna ryhmäksi,Warehouse +General Ledger,Päätilikirja,Warehouse diff --git a/erpnext/translations/fr.csv b/erpnext/translations/fr.csv index f165d359963..7e45e80540c 100644 --- a/erpnext/translations/fr.csv +++ b/erpnext/translations/fr.csv @@ -9170,3 +9170,60 @@ quotation_item,article_devis, {0} and {1},{0} et {1}, {} Assigned,{} Attribué, {} Available,{} Disponible, +"

Currency Exchange Settings Help

+

There are 3 variables that could be used within the endpoint, result key and in values of the parameter.

+

Exchange rate between {from_currency} and {to_currency} on {transaction_date} is fetched by the API.

+

Example: If your endpoint is exchange.com/2021-08-01, then, you will have to input exchange.com/{transaction_date}

","

Aide sur les paramètres de change

+

Trois variables peuvent être utilisées dans le point final, la clé de résultat et les valeurs du paramètre.

+

Le taux de change entre {from_currency} et {to_currency} sur {transaction_date} est récupéré par l'API.

+

Exemple : Si votre point de terminaison est exchange.com/2021-08-01, vous devrez saisir exchange.com/{transaction_date}.

", +"Masters & Reports","Rapports & Fonctionnalités principales", +"Reports & Masters","Rapports et Pages principales", +"Your Shortcuts","Vos raccourcis", +A - C,A-C, +A Holiday List can be added to exclude counting these days for the Workstation.,Une liste de jours fériés peut être ajoutée pour exclure le comptage de ces jours pour le poste de travail., +A Packing Slip can only be created for Draft Delivery Note.,Un bordereau d'emballage ne peut être créé que pour les brouillons de bons de livraison., +"A Price List is a collection of Item Prices either Selling, Buying, or both","Une liste de prix est une liste de prix d'articles à la vente, à l'achat, ou les deux", +A Reconciliation Job {0} is running for the same filters. Cannot reconcile now,Un travail de réconciliation {0} est en cours d'exécution pour les mêmes filtres. Impossible de réconcilier maintenant, +A customer must have primary contact email.,Un client doit avoir un courriel de contact principal., +A driver must be set to submit.,Un conducteur doit être défini pour soumettre., +A template with tax category {0} already exists. Only one template is allowed with each tax category,Un modèle avec la catégorie de taxe {0} existe déjà. Un seul modèle est autorisé pour chaque catégorie de taxe, +Actual Time,Heure actuelle, +Add Columns in Transaction Currency,Ajouter des colonnes dans la devise de la transaction, +Add Discount,Ajouter une promotion, +Add Items in the Purpose Table,Ajouter des éléments dans le tableau des objectifs, +Add Lead to Prospect,Ajouter un lead à un prospect, +Add Local Holidays,Ajouter des jours fériés locaux, +Add Manually,Ajouter manuellement, +Add Or Deduct,Ajouter ou déduire, +Add Serial / Batch Bundle,Ajouter une série / un lot, +Add Stock,Ajouter du stock, +Add Template,Ajouter un modèle, +Additional,Additionnel, +Advance Account: {0} must be in either customer billing currency: {1} or Company default currency: {2},Compte d'avance : {0} doit être dans la devise de facturation du client : {1} ou dans la devise par défaut de l'entreprise : {2}, +Advance Payment,Acompte, +Advance Payment Date,Date du paiement anticipé, +Advance Reconciliation Takes Effect On,Le rapprochement anticipé prend effet le, +Advance payments allocated against orders will only be fetched,Seul les paiements anticipés alloués aux commandes seront uniquement récupérés, +Attendance & Leaves,Présences et congés, +Avg Rate (Balance Stock),Valorisation Moyenne (Livre d'inventaire), +BOM UoM,UdM de la nomenclature, +BOM Update Batch,Mise à jour en lot des nomenclatures, +"Based on your HR Policy, select your leave allocation period's end date","En fonction de votre politique RH, sélectionnez la date de fin de la période d'attribution des congés", +Batch Nos,Numéros de lots, +Batch and Serial No,N° de lot et de série, +CANCELLED,ANNULÉ, +Company Details,Détail de la société, +Deferred accounting failed for some invoices:,La comptabilité différée a échoué pour certaines factures :, +Delivery Manager,Gestionnaire des livraisons, +Delivery User,Utilisateur de la livraison, +Error while processing deferred accounting for {0},Erreur lors du traitement de la comptabilité différée pour {0}, +Only Include Allocated Payments,Inclure uniquement les paiements alloués, +Parcel weight cannot be 0,Le poids du colis ne peut pas être égal à 0, +Please enter Shipment Parcel information,Veuillez entrer les informations sur l'expédition du colis, +Row #{0}: You cannot use the inventory dimension '{1}' in Stock Reconciliation to modify the quantity or valuation rate. Stock reconciliation with inventory dimensions is intended solely for performing opening entries.,Ligne #{0}: Vous ne pouvez pas utiliser la dimension de stock '{1}' dans l'inventaire pour modifier la quantité ou le taux de valorisation. L'inventaire avec les dimensions du stock est destiné uniquement à effectuer les écritures d'ouverture., +Row {0}: Item Tax template updated as per validity and rate applied,Ligne {0}: Modèle de taxe d'article mis à jour selon la validité et le taux appliqué, +Shipment Parcel,Expédition Colis, +Shipment Parcel Template,Modèle d'expédition de colis, +"The stock has been reserved for the following Items and Warehouses, un-reserve the same to {0} the Stock Reconciliation:

{1}","Le stock a été réservé pour les articles et entrepôts suivants, annulez-le pour {0} l'inventaire:

{1}", +{0} is a mandatory field.,{0} est un champ obligatoire., diff --git a/erpnext/translations/hr.csv b/erpnext/translations/hr.csv index ec5b0667784..34089ec5354 100644 --- a/erpnext/translations/hr.csv +++ b/erpnext/translations/hr.csv @@ -8743,3 +8743,145 @@ WhatsApp,Što ima, Make a call,Uputi poziv, Approve,Odobriti, Reject,Odbiti, + Address, Adresa, + Amount,Iznos, + Is Child Table,Podređena tabela, + Name, Naziv, + Rate, Cijena, + Summary, Sažetak, +"""SN-01::10"" for ""SN-01"" to ""SN-10""","""SB-01::10"" za ""SB-01"" do ""SB-10""", +# In Stock,# Na Zalihama, +# Req'd Items,# Obavezni Artikli, +% Picked,% Odabrano, +% Returned,% Vraćeno, +'Default {0} Account' in Company {1},'Standard {0} račun' u Tvrtki {1}, +'{0}' should be in company currency {1}.,'{0}' bi trebao biti u valuti tvrtke {1}., +"Reports & Masters","Izvještaji & Pristupi", +"Reports & Masters","Izvještaji & Pristupi", +"Your Shortcuts","Prečice", +Add Template,Dodaj Predložak, +Added On,Dodato, +Advance Account: {0} must be in either customer billing currency: {1} or Company default currency: {2},Račun Predujma: {0} mora biti u valuti fakture klijenta: {1} ili standard valuti tvrtke: {2}, +Allow,Dopusti, +Allow UOM with Conversion Rate Defined in Item,Dopusti Jedinicu sa stopom konverzije definiranom u Postavkama Artikla, +Amount Difference with Purchase Invoice,Razlika u Iznosu naspram Kupovne Fakture, +Amount in Words,Iznos U Riječima, +Auto Fetch Serial Numbers,Automatski Preuzmi Serijske Brojeve, +BOM Created,Sastavnica Stvorena, +BOM Creator,Konstruktor Sastavnice, +BOM Creator Item,Artikal Sastavnice Konstruktora, +BOM Info,Informacija Sastavnice, +BOM Level,Nivo Sastavnice, +BOM Tree,Stablo Sastavnice, +BOM UoM,Jedinica Sastavnice, +BOM Update Batch,Sastavnica Ažurira Šaržu, +BOM Update Initiated,Pokrenuto Ažuriranje Sastavnice, +BOM Update Log,Zapisnik Ažuriranja Sastavnice, +BOM and Production,Sastavnica & Proizvodnja, +Bank Account {} in Bank Transaction {} is not matching with Bank Account {},Bankovni račun {} u bankovnoj transakciji {} ne odgovara bankovnom računu {}, +Below Subscription Plans are of different currency to the party default billing currency/Company currency: {0},Planovi Pretplate u nastavku imaju različite valute u odnosu na standard valutu fakturisanja/valutu tvrtke: {0}, +Both Payable Account: {0} and Advance Account: {1} must be of same currency for company: {2},Račun Obaveza: {0} i Račun Predujma: {1} moraju biti u istoj valuti za tvrtke: {2}, +Both Receivable Account: {0} and Advance Account: {1} must be of same currency for company: {2},Račun Prihoda: {0} i Račun Predujma: {1} moraju biti u istoj valuti za tvrtku: {2}, +Both {0} Account: {1} and Advance Account: {2} must be of same currency for company: {3},{0} Račun: {1} i Račun Predujma: {2} moraju biti u istoj valuti za tvrtku: {3}, +Call Received By,Poziv Primljen Od, +Cannot enqueue multi docs for one company. {0} is already queued/running for company: {1},Nije moguće staviti u red više dokumenata za jednu tvrtku. {0} je već u redu čekanja/pokreće se za tvrtku: {1}, +Company Address Display,Prikaz Adrese Tvrtke, +Company Billing Address,Faktura Adresa Tvrtke, +Company Contact Person,Kontakt Osoba Tvrtke, +Company Details,Detalji o Tvrtki, +Company Tax ID,Fiskalni Broj Tvrtke, +Company and Posting Date is mandatory,Tvrtka i Datum Knjiženja su obavezni, +Company is mandatory,Tvrtka je obavezna, +Company is mandatory for generating an invoice. Please set a default company in Global Defaults.,Tvrtka je obavezna za generisanje fakture. Postavi standard tvrtku u Globalnim Postavkama., +Company which internal customer represents,Tvrtka koju predstavlja interni Klijent, +Company which internal customer represents.,Tvrtka koju predstavlja interni Klijent., +Company which internal supplier represents,Tvrtka koju predstavlja interni Dobavljač, +Company {0} is added more than once,Tvrtka {0} je dodana više puta, +Company {} does not exist yet. Taxes setup aborted.,Tvrtka {} još ne postoji. Postavljanje poreza je prekinuto., +Company {} does not match with POS Profile Company {},Tvrtka {} se ne podudara s Kasa Profilom Tvrtke {}, +Conversion rate cannot be 0,Stopa konverzije ne može biti 0, +"Conversion rate is 1.00, but document currency is different from company currency","Stopa konverzije je 1,00, ali valuta dokumenta razlikuje se od valute tvrtke", +Conversion rate must be 1.00 if document currency is same as company currency,"Stopa konverzije mora biti 1,00 ako je valuta dokumenta ista kao valuta tvrtke", +Cost Center for Item rows has been updated to {0},Centar Troškova za artikal redove je ažuriran na {0}, +Cost Center {} doesn't belong to Company {},Centar Troškova {} ne pripada Tvrtki {}, +Could not detect the Company for updating Bank Accounts,Nije moguće otkriti tvrtku za ažuriranje Bankovnih Računa, +Demo Company,Demo Tvrtka, +Depreciation eliminated via reversal,Amortizacija eliminirana storniranjem, +Dunning Amount (Company Currency),Iznos Opomene (Valuta Tvrtke), +Enabling this will allow creation of multi-currency invoices against single party account in company currency,Omogućavanje će omogućiti kreiranje viševalutnih faktura naspram računa jedne stranke u valuti tvrtke, +"Failed to erase demo data, please delete the demo company manually.","Brisanje demo podataka nije uspjelo, izbrišite demo tvrtku ručno.", +Hide timesheets,Sakrij Radne Listove, +"If enabled, the system will allow selecting UOMs in sales and purchase transactions only if the conversion rate is set in the item master.","Ako je omogućeno, sustav će dopustiti odabir jedinica u transakcijama prodaje i kupnje samo ako je stopa konverzije postavljena u postavkama artikla.", +"In this section, you can define Company-wide transaction-related defaults for this Item. Eg. Default Warehouse, Default Price List, Supplier, etc.","U ovoj sekciji možete definirati zadane postavke transakcije koje se odnose na cijelu tvrtku za ovaj artikal. Npr. Standard Skladište, Standard Cijenovnik, Dobavljač itd.", +Inter Transfer Reference,Referenca Prenosa Inter Tvrtke, +Internal Customer for company {0} already exists,Interni Klijent za tvrtku {0} već postoji, +Internal Supplier for company {0} already exists,Interni Dobavljač za tvrtku {0} već postoji, +Internal transfers can only be done in company's default currency,Interni prenosi se mogu vršiti samo u standard valuti tvrtke, +Invalid amount in accounting entries of {} {} for Account {}: {},Nevažeći iznos u knjigovodstvenim unosima od {} {} za Račun {}: {}, +Invoice ID,Faktura, +Job Card Operation,Operacija Radne Kartice, +Ledger Health Monitor Company,Tvrtka Praćenja Statusa Registra, +"Merging is only possible if following properties are same in both records. Is Group, Root Type, Company and Account Currency","Spajanje je moguće samo ako su sljedeća svojstva ista u oba zapisa. Grupa, Tip Klase, Tvrtka i Valuta Računa", +Missing Default in Company,Nedostaju Standard Postavke u Tvrtki, +Mobile: ,Mobilni: , +Net Purchase Amount,Neto Kupovni Iznos, +No Selection,Bez Odabira, +No {0} Accounts found for this company.,Nisu pronađeni {0} računi za ovu tvrtku., +Opportunity Amount (Company Currency),Iznos Prilike (Valuta Tvrtke), +Outstanding (Company Currency),Nepodmireno (Valuta Tvrtke), +POS Closed,Kasa Zatvorena, +POS has been closed at {0}. Please refresh the page.,Kasa je zatvorena u {0}. Osvježi Stranicu., +Paid Amount After Tax (Company Currency),Plaćeni Iznos nakon Oporezivanja (Valuta Tvrtke), +Payment Amount (Company Currency),Iznos Plaćanja (Valuta Tvrtke), +Payment Status,Status Plaćanja, +Please add the account to root level Company - {0},Dodaj Račun Matičnoj Tvrtki - {0}, +Please import accounts against parent company or enable {} in company master.,Uvezi račune naspram matične tvrtke ili omogući {} u Postavkama Tvrtke., +Please mention '{0}' in Company: {1},Navedi '{0}' u Tvrtki: {1}, +Please select Unrealized Profit / Loss account or add default Unrealized Profit / Loss account account for company {0},Odaberi Račun Nerealiziranog Rezultata ili postavi Standard Račun Nerealiziranog Rezultata za tvrtku {0}, +Please set '{0}' in Company: {1},Postavi '{0}' u Tvrtki: {1}, +"Please set Vat Accounts for Company: ""{0}"" in UAE VAT Settings","Postavi PDV Račune za Tvrtku: ""{0}"" u postavkama PDV-a UAE", +Please set a Cost Center for the Asset or set an Asset Depreciation Cost Center for the Company {},Postavi Centar Troškova za Imovinu ili postavite Centar Troškova Amortizacije za tvrtku {}, +Please set a default Holiday List for Company {0},Postavi standard Listu Praznika za Tvrtku {0}, +Please set an Address on the Company '%s',Postavi Adresu Tvrtke '%s', +Please set default Exchange Gain/Loss Account in Company {},Postavi Standard Račun Rezultata u Tvrtki {}, +Please set default Expense Account in Company {0},Postavi Standard Račun Troškova u Tvrtki {0}, +Please set default cost of goods sold account in company {0} for booking rounding gain and loss during stock transfer,Postavi standardni račun troška prodanog proizvoda u tvrtki {0} za zaokruživanje knjiženja rezultata tokom prijenosa zaliha, +Please set the cost center field in {0} or setup a default Cost Center for the Company.,Postavi Centra Troškova u polje {0} ili postavi Standard Centar Troškova za tvrtku., +Please set {0} in Company {1} to account for Exchange Gain / Loss,Postavi {0} u Tvrtku {1} kako biste knjižili rezultat tečaja, +Please setup and enable a group account with the Account Type - {0} for the company {1},Podesi i omogući grupni račun sa Kontnom Klasom - {0} za Tvrtku {1}, +Qty (Company),Količina (Tvrtka), +Receivable/Payable Account: {0} doesn't belong to company {1},Račun Potraživanja/ Plaćanja: {0} ne pripada tvrtki {1}, +Received Amount After Tax (Company Currency),Primljeni iznos nakon Pdv-a (Valuta Tvrtke), +Recreate Stock Ledgers,Ponovno kreiraj Registar Zaliha, +Reset Company Default Values,Poništi Standard Vrijednosti Tvrtke, +Row #{0}: Consumed Asset {1} does not belong to company {2},Red #{0}: Potrošena Imovina {1} ne pripada tvrtki {2}, +Row #{0}: Please update deferred revenue/expense account in item row or default account in company master,Red #{0}: Ažuriraj račun odloženih prihoda/troškova u redu artikla ili sttandard račun u postavkama tvrtke, +Row #{}: {} {} doesn't belong to Company {}. Please select valid {}.,Red #{}: {} {} ne pripada tvrtki {}. Odaberi važeći {}., +Row No {0}: Warehouse is required. Please set a Default Warehouse for Item {1} and Company {2},Red br {0}: Skladište je obezno. Postavite standard skladište za artikal {1} i tvrtku {2}, +Row {0}: Cost Center {1} does not belong to Company {2},Red {0}: Centar Troškova {1} ne pripada tvrtki {2}, +Sales Update Frequency in Company and Project,Učestalost Ažuriranja Prodaje u Tvrtki i Projektu, +Select a Company this Employee belongs to.,Navedi Tvrtku kojoj ovaj personal pripada., +"Select the Item to be manufactured. The Item name, UoM, Company, and Currency will be fetched automatically.","Odaber Artikal za Proizvodnju. Naziv Artikla, Jedinica, Tvrtka i Valuta će se automatski preuzeti.", +Set {0} in asset category {1} for company {2},Postavi {0} u kategoriju imovine {1} za tvrtku {2}, +Setting the account as a Company Account is necessary for Bank Reconciliation,Postavljanje računa kao Računa Tvrtke je neophodno za Bankovno Usaglašavanje, +Skipping Tax Withholding Category {0} as there is no associated account set for Company {1} in it.,Preskoči kategorije poreza po odbitku {0} jer u njoj nema povezanog računa za tvrtku {1}., +Sub Total,Podzbroj, +Subcontracting Conversion Factor,Faktor Konverzije Podizvođača, +Target Asset {0} does not belong to company {1},Ciljna Imovina {0} ne pripada tvrtki {1}, +Tax Withholding Category {} against Company {} for Customer {} should have Cumulative Threshold value.,Kategorija Odbitka Pdv {} naspram tvrtke {} za klijenta {} treba imati Kumulativnu Vrijednost Praga., +"The following batches are expired, please restock them:
{0}","Sljedeće šarže su istekle, obnovi zalihe:
{0}", +Transaction Deletion Document: {0} is running for this Company. {1},Dokument Brisanje Transakcije: {0} u toku za ovu tvrtku. {1}, +Transactions against the Company already exist! Chart of Accounts can only be imported for a Company with no transactions.,Transakcije naspram Tvrtke već postoje! Kontni Plan se može uvesti samo za kompaniju bez transakcija., +UnReconcile Allocations,Poništi Dodjele, +Unrealized Profit / Loss account for intra-company transfers,Nerealizovani Račun Rezultata za transfere intra-tvrtke, +Unrealized Profit/Loss account for intra-company transfers,Nerealizovani Račun Rezultata za transfere unutar tvrtke, +Use Company Default Round Off Cost Center,Koristi Standard Centar Troškova Zaokruživanja tvrtke, +Use Company default Cost Center for Round off,Koristi Standard Centar Troškova Zaokruživanja tvrtke, +Warehouse {0} does not belong to Company {1}.,Skladište {0} ne pripada Tvrtki {1}., +"Warehouse {0} is not linked to any account, please mention the account in the warehouse record or set default inventory account in company {1}.","Skladište {0} nije povezano ni sa jednim računom, navedi račun u zapisu skladišta ili postavi standard račun zaliha u tvrtki {1}.", +Wrong Company,Pogrešna Tvrtka, +{0} Account: {1} ({2}) must be in either customer billing currency: {3} or Company default currency: {4},{0} Račun: {1} ({2}) mora biti u bilo kojoj valuti fakture klijenta: {3} ili standard valuta tvrtke: {4}, +{0} currency must be same as company's default currency. Please select another account.,{0} valuta mora biti ista kao standard valuta tvrtke. Odaberi drugi račun., +{0}: {1} does not belong to the Company: {2},{0}: {1} ne pripada Tvrtki: {2}, +{} is a child company.,{} je podređena tvrtka., +{} {} is not affecting bank account {},{} {} ne utječe na bankovni račun {}, diff --git a/erpnext/translations/hu.csv b/erpnext/translations/hu.csv index c5b6a1db9dc..7a3a1185622 100644 --- a/erpnext/translations/hu.csv +++ b/erpnext/translations/hu.csv @@ -8750,3 +8750,6 @@ Item {0} does not exist.,"Tétel: {0}, nem létezik.", Rate of Depreciation (%),Értékcsökkenés mértéke (%), Rejected ,Elutasítva , Version,Verzió, +CANCELLED,TÖRÖLVE, +Mobile: ,Mobil: , +{0} is a mandatory field.,A(z) {0} egy kötelező mező., diff --git a/erpnext/translations/id.csv b/erpnext/translations/id.csv index 72e9b9c1fbd..05cdb911a97 100644 --- a/erpnext/translations/id.csv +++ b/erpnext/translations/id.csv @@ -8743,3 +8743,5 @@ WhatsApp,Ada apa, Make a call,Menelpon, Approve,Menyetujui, Reject,Menolak, +Convert to Group,Konversikan ke Grup,Warehouse +General Ledger,Buku Besar,Warehouse diff --git a/erpnext/translations/it.csv b/erpnext/translations/it.csv index 7a92e47715f..7d6b4179477 100644 --- a/erpnext/translations/it.csv +++ b/erpnext/translations/it.csv @@ -8743,3 +8743,4 @@ WhatsApp,WhatsApp, Make a call,Effettuare una chiamata, Approve,Approva, Reject,Rifiutare, +General Ledger,Contabilità Generale,Warehouse diff --git a/erpnext/translations/nl.csv b/erpnext/translations/nl.csv index 541e87ac8c1..3f462979820 100644 --- a/erpnext/translations/nl.csv +++ b/erpnext/translations/nl.csv @@ -8743,3 +8743,5 @@ WhatsApp,WhatsApp, Make a call,Bellen, Approve,Goedkeuren, Reject,afwijzen, +Convert to Group,Converteren naar groep,Warehouse +General Ledger,Grootboek,Warehouse diff --git a/erpnext/translations/pt-BR.csv b/erpnext/translations/pt-BR.csv index dc993a6cb99..f0068b27368 100644 --- a/erpnext/translations/pt-BR.csv +++ b/erpnext/translations/pt-BR.csv @@ -8743,3 +8743,28 @@ WhatsApp,Whatsapp, Make a call,Faça uma ligação, Approve,Aprovar, Reject,Rejeitar, +Allowed,Permitido, +Auto Name,Nome Automático, +Contact Details,Detalhes do Contato, +Convert to Group,Converter Em Grupo,Warehouse +General Ledger,Livro Razão,Warehouse +Heatmap,Mapa de calor, +Import File,Importar arquivo, +Import File Errors and Warnings,Erros e avisos de importação de arquivos, +Import Log Preview,Visualização do registro de importação, +Import Preview,Visualização de importação, +Import Warnings,Avisos de importação, +Import from Google Sheets,Importar do Planilhas Google, +Insert New Records,Inserir novos registros, +Is Standard,É Padrão, +Key,Chave, +Mandatory Depends On,Obrigatório Depende, +Mobile: ,Móvel: , +Off,Desligado, +Refresh Google Sheet,Atualizar planilha do Google, +Report Filters,Filtros de relatório, +Section,Seção, +Submit After Import,Enviar após importação, +Template Options,Opções de modelo, +Template Warnings,Avisos do modelo, +Update Existing Records,Atualizar registros existentes, diff --git a/erpnext/translations/pt.csv b/erpnext/translations/pt.csv index eb43c914eb7..9b357285f62 100644 --- a/erpnext/translations/pt.csv +++ b/erpnext/translations/pt.csv @@ -8743,3 +8743,5 @@ WhatsApp,Whatsapp, Make a call,Faça uma ligação, Approve,Aprovar, Reject,Rejeitar, +Convert to Group,Converter a Grupo,Warehouse +General Ledger,Razão Geral,Warehouse diff --git a/erpnext/translations/ru.csv b/erpnext/translations/ru.csv index c2cb1add54b..f06b9e730e8 100644 --- a/erpnext/translations/ru.csv +++ b/erpnext/translations/ru.csv @@ -8669,3 +8669,5 @@ Event,Событие, Forecast,Прогноз, Rate of Depreciation (%),Норма амортизации (%), Rejected ,Отклонено , +Mobile: ,Мобильный: , +{0} is a mandatory field.,{0} - обязательное поле., diff --git a/erpnext/translations/sv.csv b/erpnext/translations/sv.csv index 19df29c36e6..5965d7d6336 100644 --- a/erpnext/translations/sv.csv +++ b/erpnext/translations/sv.csv @@ -11972,3 +11972,59 @@ as Title,som Benämning, by {},av {}, {0} units of {1} are required in {2} with the inventory dimension: {3} ({4}) on {5} {6} for {7} to complete the transaction.,{0} enheter av {1} erfordras i {2} med lagerdimension: {3} ({4}) på {5} {6} för {7} för att slutföra transaktion., {0} {1} is already linked to Common Code {2}.,{0} {1} är redan länkad till Gemensam kod {2}., +Allow UOM with Conversion Rate Defined in Item,Tillåt Enhet med Konvertering Sats definierad i Artikel, +Amount Difference with Purchase Invoice,Belopp Skillnad mot Inköp Faktura, +Amount in Words,Belopp i Ord, +Auto Fetch Serial Numbers,Automatisk Hämta Serienummer, +Auto Reconciliation has started in the background,Automatisk avstämning har startat i bakgrunden, +Bank Account {} in Bank Transaction {} is not matching with Bank Account {},Bank Konto {} i Bank Transaktion {} stämmer inte överens med Bank Konto {}, +Billing Address does not belong to the {0},Faktura Adress tillhör inte {0}, +Build All?,Kompilera Alla?, +CANCELLED,ANNULLERAD, +Company {0} added multiple times,Bolag {0} har lagts till flera gånger, +Contact Person does not belong to the {0},Kontakt Person tillhör inte {0}, +Conversion rate cannot be 0,Konverteringsvärde kan inte vara 0, +"Conversion rate is 1.00, but document currency is different from company currency","Konverteringsvärde är 1.00, men dokument valuta skiljer sig från bolag valuta", +Conversion rate must be 1.00 if document currency is same as company currency,"Konverteringsvärde måste vara 1,00 om dokument valuta är samma som bolag valuta", +Cost Center for Item rows has been updated to {0},Resultat Enhet för artikel rader har uppdaterats till {0}, +Depreciation eliminated via reversal,Avskrivning eliminerad via återföring, +Disable auto setting Grand Total to default Payment Mode,Inaktivera automatisk tilldelning av Total Summa till Standard Betalning Läge, +Don't Enforce Free Item Qty,Tvinga Inte Gratis Artikel Kvantitet, +Employee {0} is currently working on another workstation. Please assign another employee.,{0} arbetar för närvarande på en annan arbetsstation. Tilldela annan anställd., +Fetch Timesheet in Sales Invoice,Hämta Tidrapport i Försäljning Faktura, +Hide timesheets,Dölj Tidrapporter, +"If enabled, the system will allow selecting UOMs in sales and purchase transactions only if the conversion rate is set in the item master.",Om aktiverad kommer system att tillåta val av Enhet i försäljning och inköp transaktioner endast om konvertering sats är angiven i Artikel Inställningar., +Incorrect Serial and Batch Bundle,Felaktig Serie och Parti Paket, +Invalid amount in accounting entries of {} {} for Account {}: {},Ogiltigt belopp i bokföring av {} {} för Konto {}: {}, +Invoice ID,Faktura, +Last GL Entry update was done {}. This operation is not allowed while system is actively being used. Please wait for 5 minutes before retrying.,Senaste uppdatering av Bokföring Register gjordes {}. Denna åtgärd är inte tillåten när system används aktivt. Vänta i 5 minuter innan du försöker igen., +Mobile: ,Mobil: , +Naming Series is mandatory,Nummer Serie erfodras, +Negative Batch Quantity,Negativ Parti Kvantitet, +Net Purchase Amount,Netto Inköp Belopp, +No Selection,Inget valt, +Outstanding (Company Currency),Utestående (Bolag Valuta), +POS Closed,Kassa Stängd, +POS has been closed at {0}. Please refresh the page.,Kassa stängd {0}. Uppdatera sida., +Partial Payment in POS Invoice is not allowed.,Delbetalning med Kassa Faktura är inte tillåten., +Payment Status,Betalningsstatus, +Please set both the Tax ID and Fiscal Code on Company {0},Ange både Moms och Org. Nr. för {0}, +Printed on {0},Utskriven {0}, +Recreate Stock Ledgers,Återskapa Lager Register, +Remove SABB Entry,Ta bort Serie och Parti Paket, +Selected Serial and Batch Bundle entries have been removed.,Valda Serie och Parti Paket poster har tagits bort., +Set Serial and Batch Bundle Naming Based on Naming Series,Ange namn på Serie och Parti paket baserat på Nummer Serie, +Shipping Address does not belong to the {0},Leveransadress tillhör inte {0}, +Sub Total,Delsumma, +Subcontracting Conversion Factor,Underleverantör Konvertering Faktor, +System In Use,System Används, +The Batch {0} has negative quantity {1} in warehouse {2}. Please correct the quantity.,Parti {0} har negativ kvantitet {1} i lager {2}. Korrigera kvantitet., +"The following batches are expired, please restock them:
{0}","Följande partier är utgångna, fyll på dem:
{0}", +The serial and batch bundle {0} not linked to {1} {2},Serie och Parti Paket {0} är inte kopplat till {1} {2}, +The user cannot submit the Serial and Batch Bundle manually,Användare kan inte godkänna Serie och Parti Paket manuellt, +Total Weight (kg),Total Vikt (kg), +UnReconcile Allocations,Ångra Tilldelningar, +{0} is a mandatory field.,{0} är erfordrad fält., +{0} items lost during process.,{0} artiklar förlorade under processen., +{0}: {1} does not belong to the Company: {2},{0}: {1} tillhör inte bolag: {2}, +{} {} is not affecting bank account {},{} {} påverkar inte bank konto {}, diff --git a/erpnext/translations/tr.csv b/erpnext/translations/tr.csv index 1e439194b8d..ec1daedde35 100644 --- a/erpnext/translations/tr.csv +++ b/erpnext/translations/tr.csv @@ -12487,3 +12487,69 @@ will be,olacak, {} is a child company.,{} bir alt şirkettir., {} {} is already linked with another {},{} {} zaten başka bir {} ile bağlantılı, {} {} is already linked with {} {},{} {} zaten {} {} ile bağlantılı, +Disable auto setting Grand Total to default Payment Mode,Genel Toplamın varsayılan Ödeme Yönteminin otomatik ayarlanmasını devre dışı bırak, +Do you still want to enable immutable ledger?,Hala değiştirilemez defteri etkinleştirmek istiyor musunuz?, +Exit Full Screen,Tam Ekrandan Çık, +Full Screen,Tam Ekran, +Has Corrective Cost,Düzeltici Maliyet, +Ignore Is Opening check for reporting,Raporlama için Açılış kontrolünü yoksay, +Ignores legacy Is Opening field in GL Entry that allows adding opening balance post the system is in use while generating reports,Raporlar oluşturulurken sistemin kullanımda olduğu açılış bakiyesi sonrası eklemeye izin veren Defter Girişindeki eski Açılış mı alanını yok sayar, +Incorrect Serial and Batch Bundle,Geçersiz Seri ve Parti, +Mobile: ,Cep Telefonu: , +Negative Batch Quantity,Negatif Parti Miktarı, +Only applies for Normal Payments,Sadece Normal Ödemeler için geçerlidir, +Payment Reconciliation Settings,Ödeme Mutabakat Ayarları, +Pickup to,Teslim Edilecek Yer, +Please set {0} first.,Lütfen önce {0} değerini ayarlayın., +Please specify a {0} first.,Lütfen önce bir {0} belirtin., +Posting Date Inheritance for Exchange Gain / Loss,Kur Farkı Karı / Zararı İçin Muhasebe Tarihi Devralımı, +Printed on {0},{0} tarihinde yazdırıldı, +Process Statement Of Accounts CC,Hesap Özeti İşlemi, +Process Subscription,Aboneliği İşle, +Process in Single Transaction,Tek Bir İşlemde İşle, +Qty to Build,Üretilecek Miktar, +Recording HTML,Kayıt HTML, +Remove SABB Entry,Hatalı Seri ve Parti Kayıtlarını Kaldır, +Return Against Subcontracting Receipt,Alt Yüklenici İade İrsaliyesi, +Row {0}: {1} {2} cannot be same as {3} (Party Account) {4},"Satır {0}: {1} {2} , {3} (Cari Hesabı) {4} ile aynı olamaz", +Row({0}): Outstanding Amount cannot be greater than actual Outstanding Amount {1} in {2},"Satır ({0}): Ödenmemiş Tutar, {2} içindeki gerçek Ödenmemiş Tutar {1} olan değerden büyük olamaz", +SCO Supplied Item,Alt Yüklenici Tarafından Tedarik Edilen Ürün, +Select Job Worker Address,Alt Yüklenici Adresini Seçin, +Selected Serial and Batch Bundle entries have been removed.,Seçilen Seri No ve Parti girişleri kaldırıldı., +Stock Unreservation,Stok Rezervasyonu Kaldır, +The Batch {0} has negative quantity {1} in warehouse {2}. Please correct the quantity.,{0} Partisinin {2} deposunda negatif {1} değer var. Lütfen miktarı düzeltin., +The Sales Person is linked with {0},Satış Personeli {0} ile bağlantılıdır, +"The following Items, having Putaway Rules, could not be accomodated:","Aşağıdaki ürünler, Raf Yerleştirme Kurallarına (Putaway Rules) sahip olduğundan yerleştirilemedi:", +The serial and batch bundle {0} not linked to {1} {2},"Seri ve parti paketi {0}, {1} {2} ile bağlantılı değil", +"The stock for the item {0} in the {1} warehouse was negative on the {2}. You should create a positive entry {3} before the date {4} and time {5} to post the correct valuation rate. For more details, please read the documentation.","{1} deposundaki {0} ürünü için stok, {2} tarihinde negatife düştü. Bu durumu düzeltmek için {4} tarihi ve {5} saatinden önce {3} işlemiyle pozitif bir stok girişi oluşturmalısınız. Aksi takdirde, sistem doğru değerleme oranını hesaplayamaz.", +The total Issue / Transfer quantity {0} in Material Request {1} cannot be greater than allowed requested quantity {2} for Item {3},"Malzeme Talebi {1} içindeki toplam Çıkış / Transfer miktarı {0}, {3} ürünü için izin verilen talep miktarı {2} değerinden fazla olamaz.", +The total Issue / Transfer quantity {0} in Material Request {1} cannot be greater than requested quantity {2} for Item {3},"Malzeme Talebi {1} içindeki toplam Çıkış / Transfer miktarı {0}, {3} ürünü için talep edilen miktar {2} değerinden fazla olamaz.", +The user cannot submit the Serial and Batch Bundle manually,"Kullanıcı, Seri ve Parti Paketini manuel olarak gönderemez", +There are only {0} asset created or linked to {1}. Please create or link {2} Assets with respective document.,{1} için yalnızca {0} varlık oluşturuldu veya bağlandı. Lütfen {2} Varlığı ilgili belgeyle oluşturun veya bağlayın., +This is a preview of the email to be sent. A PDF of the document will automatically be attached with the email.,"Bu, gönderilecek e-postanın bir önizlemesidir. Belgenin bir PDF'i otomatik olarak e-postaya eklenecektir.", +This schedule was created when Asset {0} was consumed through Asset Capitalization {1}.,"Bu plan, Varlık {0}, Varlık Sermayeleştirme {1} işlemiyle tüketildiğinde oluşturuldu.", +This schedule was created when Asset {0} was restored on Asset Capitalization {1}'s cancellation.,"Bu çizelge, Varlık Kapitalizasyonu {1}'un iptali üzerine Varlık {0} geri yüklendiğinde oluşturulmuştur.", +This schedule was created when Asset {0} was sold through Sales Invoice {1}.,"Bu çizelge, Varlık {0} 'ın Satış Faturası {1} için iade edilmesiyle oluşturuldu.", +This schedule was created when Asset {0} was updated after being split into new Asset {1}.,"Bu program, Varlık {0} yeni Varlık {1} olarak bölündükten sonra güncellendiğinde oluşturulmuştur.", +This schedule was created when Asset {0}'s Asset Repair {1} was cancelled.,"Bu program, Varlık {0}'ın Varlık Onarımı {1} iptal edildiğinde oluşturuldu.", +This schedule was created when Asset {0}'s Asset Value Adjustment {1} was cancelled.,"Bu program, Varlık {0}'ın Varlık Onarımı {1} iptal edildiğinde oluşturuldu.", +This schedule was created when Asset {0}'s shifts were adjusted through Asset Shift Allocation {1}.,"Bu çizelge, Varlık {0} Varlık Değeri Ayarlaması {1} aracılığıyla ayarlandığında oluşturulmuştur.", +This schedule was created when new Asset {0} was split from Asset {1}.,"Bu plan, Varlık {0} için Varlık Onarımı {1} ile onarıldığı zaman oluşturuldu.", +This value shall be used when no matching Common Code for a record is found.,"Bu değer, bir kayıt için eşleşen Ortak Kod bulunmadığında kullanılacaktır.", +To submit the invoice without purchase order please set {0} as {1} in {2},Alış irsaliyesi olmadan faturayı göndermek için {0} değerini {1} olarak {2} içinde ayarlayın, +"To use a different finance book, please uncheck 'Include Default FB Entries'",Farklı bir finans defteri kullanmak için lütfen 'Varsayılan FD Girişlerini Dahil Et' seçeneğinin işaretini kaldırın, +Type Of Call,Çağrı Türü, +Voucher Qty,Belge Miktarı, +Voucher {0} is over-allocated by {1},"Fatura {0}, {1} kadar fazla tahsis edilmiş", +You can't process the serial number {0} as it has already been used in the SABB {1}. {2} if you want to inward same serial number multiple times then enabled 'Allow existing Serial No to be Manufactured/Received again' in the {3},"Seri ve Parti Paketi {1} içinde zaten kullanılmış olduğu için seri numarası {0} işlenemez. {2} Eğer aynı seri numarasını birden fazla kez almak veya üretmek istiyorsanız, {3} içinde ‘Mevcut Seri Numarasının Yeniden Üretilmesine/Alınmasına İzin Ver’ seçeneğini etkinleştirin.", +or its descendants,veya onunla grubundan gelen, +quotation_item,teklif_kalemi, +{0} has Payment Term based allocation enabled. Select a Payment Term for Row #{1} in Payment References section,{0} için ödeme vadesine dayalı tahsis etkinleştirilmiş. Ödeme Referansları bölümünde Satır #{1} için bir ödeme vadesi seçin, +{0} is a mandatory field.,{0} zorunlu bir alandır., +{0} items lost during process.,İşlem sırasında {0} ürün kayboldu., +{0} units of Item {1} is picked in another Pick List.,{0} adet {1} ürünü başka bir Çekme Listesinde işaretlenmiş., +{0} units of {1} are required in {2} with the inventory dimension: {3} ({4}) on {5} {6} for {7} to complete the transaction.,{2} içinde {3} ({4}) envanter boyutuyla {0} adet {1} ürünü gereklidir. İşlemi tamamlamak için {5} {6} tarihinde {7} için bu miktarın sağlanması gerekir., +{0} units of {1} needed in {2} on {3} {4} to complete this transaction.,Bu işlemi tamamlamak için {3} {4} tarihinde {2} içinde {0} adet {1} gereklidir., +{0} {1} is allocated twice in this Bank Transaction,{0} {1} bu Banka İşleminde iki kez tahsis edilmiştir, +{0} {1} is already linked to Common Code {2}.,{0} {1} zaten Ortak Kod {2} ile bağlantılıdır., +{0}: {1} does not belong to the Company: {2},{0}: {1} Şirketine ait değildir: {2}, diff --git a/erpnext/translations/vi.csv b/erpnext/translations/vi.csv index 4b036c7c7c0..76280f1a93c 100644 --- a/erpnext/translations/vi.csv +++ b/erpnext/translations/vi.csv @@ -8743,3 +8743,5 @@ WhatsApp,WhatsApp, Make a call,Thực hiện cuộc gọi, Approve,Tán thành, Reject,Từ chối, +Convert to Group,Chuyển đổi cho Tập đoàn,Warehouse +General Ledger,Sổ cái tổng hợp,Warehouse diff --git a/erpnext/translations/zh.csv b/erpnext/translations/zh.csv index 52df5a220ba..a7ce0786afa 100644 --- a/erpnext/translations/zh.csv +++ b/erpnext/translations/zh.csv @@ -8788,3 +8788,3212 @@ Links,链接, Rate of Depreciation (%),折旧率 (%), Rejected ,已拒绝 , Version,版本, +"'Inspection Required before Delivery' has disabled for the item {0}, no need to create the QI",物料{0}已禁用'发货前需质检',无需创建质量检验单, +"'Inspection Required before Purchase' has disabled for the item {0}, no need to create the QI",物料{0}已禁用'采购前需质检',无需创建质量检验单, +'{0}' account is already used by {1}. Use another account.,科目'{0}'已被{1}使用,请选择其他科目, +'{0}' should be in company currency {1}.,'{0}'必须使用公司货币{1}, +(A) Qty After Transaction,(A) 交易后数量, +(B) Expected Qty After Transaction,(B) 预期交易后数量, +(D) Balance Stock Value,(D) 结存库存价值, +(E) Balance Stock Value in Queue,(E) 队列结存价值, +(F) Change in Stock Value,(F) 库存价值变动, +(G) Sum of Change in Stock Value,(G) 库存价值变动总和, +(H) Change in Stock Value (FIFO Queue),(H) 库存价值变动(先进先出队列), +(H) Valuation Rate,(H) 计价率, +(I) Valuation Rate,(I) 计价率, +(J) Valuation Rate as per FIFO,(J) 按先进先出法计价率, +(K) Valuation = Value (D) ÷ Qty (A),(K) 计价=价值(D) ÷ 数量(A), +3 Yearly,3年周期, +"
+

Note

+
    +
  • +You can use Jinja tags in Subject and Body fields for dynamic values. +
  • + All fields in this doctype are available under the doc object and all fields for the customer to whom the mail will go to is available under the customer object. +
+

Examples

+ +
    +
  • Subject:

    Statement Of Accounts for {{ customer.customer_name }}

  • +
  • Body:

    +
    Hello {{ customer.customer_name }},
    PFA your Statement Of Accounts from {{ doc.from_date }} to {{ doc.to_date }}.
  • +
+","
+

注意事项

+
    +
  • +您可以在 ""主题 """"正文""字段中使用 ""Jinja ""标记来获取动态值。 +
  • + 该类型中的所有字段均可在doc对象下使用,而邮件将发送给的客户的所有字段均可在客户对象下使用。 +
+

示例

+ +
    +
  • 主题

     {{ customer.customer_name }}的账目报表 

  • +
  • 正文

    +
    您好 {{ customer.customer_name }},
    PFA 您的会计报表从 {{ doc.from_date }} 转到 {{ doc.to_date }}。
  • +
+", +"
+

All dimensions in centimeter only

+
","
+

所有尺寸均以厘米为单位

+
", +"

About Product Bundle

+ +

Aggregate group of Items into another Item. This is useful if you are bundling a certain Items into a package and you maintain stock of the packed Items and not the aggregate Item.

+

The package Item will have Is Stock Item as No and Is Sales Item as Yes.

+

Example:

+

If you are selling Laptops and Backpacks separately and have a special price if the customer buys both, then the Laptop + Backpack will be a new Product Bundle Item.

","

关于产品捆绑包

+ +

将一组货品汇总到另一个货品中。如果您要将某个项目捆绑到一个包中,而您只保留打包项目的库存,而不保留汇总项目的库存,这将非常有用。

+

打包项目Is Stock Item (库存项目)NoIs Sales Item (销售项目)为Yes

+

举例说明:

+

如果您分别销售笔记本电脑和背包,并且如果客户同时购买这两件商品,您可以享受优惠价格,那么笔记本电脑+背包将成为一个新的产品组合项目。

", +"

Currency Exchange Settings Help

+

There are 3 variables that could be used within the endpoint, result key and in values of the parameter.

+

Exchange rate between {from_currency} and {to_currency} on {transaction_date} is fetched by the API.

+

Example: If your endpoint is exchange.com/2021-08-01, then, you will have to input exchange.com/{transaction_date}

","

货币兑换设置帮助

+

在端点、结果键和参数值中可以使用 3 个变量。

+

API 将获取 {transaction_date} 上 {from_currency} 和 {to_currency} 之间的汇率。

+

举例说明:如果您的端点是 exchange.com/2021-08-01,则必须输入 exchange.com/{transaction_date}。

", +"

Body Text and Closing Text Example

+ +
We have noticed that you have not yet paid invoice {{sales_invoice}} for {{frappe.db.get_value(""Currency"", currency, ""symbol"")}} {{outstanding_amount}}. This is a friendly reminder that the invoice was due on {{due_date}}. Please pay the amount due immediately to avoid any further dunning cost.
+ +

How to get fieldnames

+ +

The fieldnames you can use in your template are the fields in the document. You can find out the fields of any documents via Setup > Customize Form View and selecting the document type (e.g. Sales Invoice)

+ +

Templating

+ +

Templates are compiled using the Jinja Templating Language. To learn more about Jinja, read this documentation.

","

正文和结尾文本示例

+ +
我们注意到您尚未支付 {{sales_invoice}} 的发票 {{frappe.db.get_value(""Currency"", currency, ""symbol"")}} {{outstanding_amount}}。特此友情提醒,发票到期日为 {{due_date}}。请立即支付应付金额,以免产生更多扣款费用。
+ +

如何获取字段名

+ +

您可以在模板中使用的字段名是文档中的字段。您可以通过设置 > 自定义表单视图并选择文档类型(如销售发票)来查找任何文档的字段。

+ +

模板

+ +

模板使用 Jinja 模板语言编译。要了解有关 Jinja 的更多信息,请阅读此文档。

", +"

Contract Template Example

+ +
Contract for Customer {{ party_name }}
+
+-Valid From : {{ start_date }} 
+-Valid To : {{ end_date }}
+
+ +

How to get fieldnames

+ +

The field names you can use in your Contract Template are the fields in the Contract for which you are creating the template. You can find out the fields of any documents via Setup > Customize Form View and selecting the document type (e.g. Contract)

+ +

Templating

+ +

Templates are compiled using the Jinja Templating Language. To learn more about Jinja, read this documentation.

","

合同模板示例

+ +
客户合同 {{ party_name }}
+
+-Valid From : {{ start_date }} 
+-Valid To : {{ end_date }}
+
+ +

如何获取字段名

+ +

您可以在合同模板中使用的字段名称是您创建模板的合同中的字段。您可以通过设置 > 自定义表单视图并选择文档类型(如合同)来查找任何文档的字段。

+ +

模板制作

+ +

模板使用 Jinja 模板语言编译。要了解有关 Jinja 的更多信息,请阅读此文档。

", +"

Standard Terms and Conditions Example

+ +
Delivery Terms for Order number {{ name }}
+
+-Order Date : {{ transaction_date }} 
+-Expected Delivery Date : {{ delivery_date }}
+
+ +

How to get fieldnames

+ +

The fieldnames you can use in your email template are the fields in the document from which you are sending the email. You can find out the fields of any documents via Setup > Customize Form View and selecting the document type (e.g. Sales Invoice)

+ +

Templating

+ +

Templates are compiled using the Jinja Templating Language. To learn more about Jinja, read this documentation.

","

合同模板示例

+ +
客户合同 {{ party_name }}
+
+-Valid From : {{ start_date }} 
+-Valid To : {{ end_date }}
+
+ +

如何获取字段名

+ +

您可以在合同模板中使用的字段名称是您创建模板的合同中的字段。您可以通过设置 > 自定义表单视图并选择文档类型(如合同)来查找任何文档的字段。

+ +

模板制作

+ +

模板使用 Jinja 模板语言编译。要了解有关 Jinja 的更多信息,请阅读此文档。

", +"
Or
","
或者
", +"","", +"","", +"","", +"

In your Email Template, you can use the following special variables: +

+
    +
  • + {{ update_password_link }}: A link where your supplier can set a new password to log into your portal. +
  • +
  • + {{ portal_link }}: A link to this RFQ in your supplier portal. +
  • +
  • + {{ supplier_name }}: The company name of your supplier. +
  • +
  • + {{ contact.salutation }} {{ contact.last_name }}: The contact person of your supplier. +
  • + {{ user_fullname }}: Your full name. +
  • +
+

+

Apart from these, you can access all values in this RFQ, like {{ message_for_supplier }} or {{ terms }}.

","

电子邮件模板中,您可以使用以下特殊变量: +

+
    +
  • + {{ update_password_link }}:供应商可以设置新密码登录门户网站的链接。 +
  • +
  • + {{ portal_link }}:供应商门户网站中该询价单的链接。 +
  • +
  • + {{ supplier_name }}:供应商的公司名称。 +
  • +
  • + {{ contact.salutation }} {{ contact.last_name }}:供应商的联系人。 +
  • + {{ user_fullname }}:您的全名。 +
  • +
+

+

除此之外,您还可以访问此 RFQ 中的所有值,如 {{ message_for_supplier }}{{ terms }}.

", +"
Message Example
+ +<p> Thank You for being a part of {{ doc.company }}! We hope you are enjoying the service.</p> + +<p> Please find enclosed the E Bill statement. The outstanding amount is {{ doc.grand_total }}.</p> + +<p> We don't want you to be spending time running around in order to pay for your Bill.
After all, life is beautiful and the time you have in hand should be spent to enjoy it!
So here are our little ways to help you get more time for life! </p> + +<a href=""{{ payment_url }}""> click here to pay </a> + +
+","
信息示例
+ +<p> 感谢您成为 {{ doc.company }}的一员!希望您能享受我们的服务。</p> + +<p> 随信附上电子账单。未付金额为 {{ doc.grand_total }}。</p> + +<p> 我们不希望您为了支付账单而花费时间四处奔波。
毕竟,生活是美好的,您手中的时间应该用来享受生活!
因此,我们有一些小方法来帮助您获得更多的生活时间! </p> + +<a href=""{{ payment_url }}""> 点击此处付款 </a> + +
+", +"
Message Example
+ +<p>Dear {{ doc.contact_person }},</p> + +<p>Requesting payment for {{ doc.doctype }}, {{ doc.name }} for {{ doc.grand_total }}.</p> + +<a href=""{{ payment_url }}""> click here to pay </a> + +
+","
消息示例
+ +<p>亲爱的 {{ doc.contact_person }},</p> + +<p>请求支付 {{ doc.doctype }}、 {{ doc.name }} 和 {{ doc.grand_total }}的费用。</p> + +<a href=""{{ payment_url }}""> 点击此处支付 </a> + +
+", +"Quick Access","快速访问", +"Reports & Masters","报表与主数据", +"Reports & Masters","报表 & 主数据", +"Settings","设置", +"Shortcuts","快捷方式", +"Your Shortcuts + + + + + + ","快速访问 + + + + + + ", +"Your Shortcuts","快速访问", +Grand Total: {0},总计: {0}, +Outstanding Amount: {0},未清金额: {0}, +" + + + + + + + + + + + + + + + + + +
Child DocumentNon Child Document
+

To access parent document field use parent.fieldname and to access child table document field use doc.fieldname

+ +
+

To access document field use doc.fieldname

+
+

Example: parent.doctype == ""Stock Entry"" and doc.item_code == ""Test""

+ +
+

Example: doc.doctype == ""Stock Entry"" and doc.purpose == ""Manufacture""

+
+ + + + + + +"," + + + + + + + + + + + + + + + + + +
子文档非子文档
+

要访问父文档字段,请使用 parent.字段名;要访问子表文档字段,请使用doc.字段名

+ +
+

要访问文档字段,请使用 doc.字段名

+
+

示例: parent.doctype == ""入库单"" 和 doc.item_code == ""测试物料""

+ +
+

示例: doc.doctype == “入库单” 和 doc.purpose == “生产用途”

+
+ + + + + + +", +A Holiday List can be added to exclude counting these days for the Workstation.,可添加假日清单以排除工作站的特定日期计算, +A Packing Slip can only be created for Draft Delivery Note.,装箱单仅可为草稿状态的交货单创建, +"A Price List is a collection of Item Prices either Selling, Buying, or both",价格清单是物料销售价、采购价或两者的集合, +A Reconciliation Job {0} is running for the same filters. Cannot reconcile now,对账任务{0}正在使用相同筛选条件运行,当前无法对账, +A Transaction Deletion Document: {0} is triggered for {0},已触发交易删除凭证:{0}(针对{0}), +A customer must have primary contact email.,客户必须设置主联系邮箱, +A driver must be set to submit.,必须设置驾驶员才能提交, +A template with tax category {0} already exists. Only one template is allowed with each tax category,税种{0}的模板已存在,每个税种仅允许一个模板, +API Details,接口详情, +AWB Number,空运提单号, +Abbreviation: {0} must appear only once,简称{0}必须唯一, +About Us Settings,公司信息设置, +About {0} minute remaining,剩余约{0}分钟, +About {0} minutes remaining,剩余约{0}分钟, +About {0} seconds remaining,剩余约{0}秒, +Acceptance Criteria Formula,验收条件公式, +Acceptance Criteria Value,验收条件值, +Accepted Qty in Stock UOM,已验收数量(库存单位), +Access Key,访问密钥, +Access Key is required for Service Provider: {0},服务商{0}必须提供访问密钥, +"According to the BOM {0}, the Item '{1}' is missing in the stock entry.",根据物料清单{0},库存交易缺少物料'{1}', +Account Closing Balance,账户期末余额, +Account Currency (From),账户货币(源), +Account Currency (To),账户货币(目标), +Account Opening Balance,账户期初余额, +Account not Found,未找到科目, +Account {0} added multiple times,科目{0}被重复添加, +Accounting Dimension Filter,核算维度筛选器, +Accounting Dimensions Filter,核算维度筛选, +Accounting Entry for {0},{0}会计凭证, +Accounts Closing,账务结账, +Accounts Missing Error,科目缺失错误, +Accounts Receivable/Payable,应收/应付账款, +Accounts to Merge,待合并账户, +Action If Quality Inspection Is Rejected,质检驳回时的处理方式, +Action If Same Rate is Not Maintained,未保持相同费率的处理方式, +Action if Same Rate is Not Maintained Throughout Sales Cycle,销售周期内未保持相同费率的处理方式, +Active Status,启用状态, +Actual Balance Qty,实际结存数量, +Actual Expense,实际费用, +Actual Posting,实际过账, +Actual Qty in Warehouse,仓库实际数量, +Actual Time,实际时间, +Add Columns in Transaction Currency,添加交易货币列, +Add Corrective Operation Cost in Finished Good Valuation,在产成品估价中添加纠正作业成本, +Add Discount,添加折扣, +Add Items in the Purpose Table,在用途表中添加物料, +Add Lead to Prospect,将线索转为潜在客户, +Add Local Holidays,添加当地假日, +Add Manually,手动添加, +Add Or Deduct,添加或扣减, +Add Serial / Batch Bundle,添加序列/批次组合, +Add Serial / Batch No,添加序列/批次号, +Add Serial / Batch No (Rejected Qty),添加序列/批次号(拒收数量), +Add Stock,添加库存, +Add Sub Assembly,添加子装配件, +Add Template,添加模板, +Add a Note,添加备注, +Add details,添加明细, +Add to Prospect,转为潜在客户, +Added By,添加人, +Added On,添加日期, +Added Supplier Role to User {0}.,已为用户{0}添加供应商角色, +Added {1} Role to User {0}.,已为用户{0}添加{1}角色, +Adding Lead to Prospect...,正在将线索转为潜在客户..., +Additional,附加项, +Additional Asset Cost,资产附加成本, +Additional Cost Per Qty,每单位额外成本, +Additional Data,附加数据, +Additional Info,附加信息, +Address And Contacts,地址及联系信息, +Adjust Asset Value,调整资产价值, +Adjustment Against,调整对应项, +Adjustment based on Purchase Invoice rate,基于采购发票汇率的调整, +Advance Account: {0} must be in either customer billing currency: {1} or Company default currency: {2},预付款科目:{0}必须使用客户账单货币:{1}或公司默认货币:{2}, +Advance Payment,预付款, +Advance Payment Date,预付款日期, +Advance Payment Ledger Entry,预付款分类账条目, +Advance Reconciliation Takes Effect On,预付款对账生效日期, +Advance Tax,预付税款, +Advance Taxes and Charges,预付税费, +Advance paid against {0} {1} cannot be greater than Grand Total {2},{0}{1}对应的预付款金额不可超过总计{2}, +Advance payments allocated against orders will only be fetched,仅获取分配至订单的预付款项, +Affected Transactions,受影响交易, +Against Customer Order {0},对应客户订单{0}, +Against Supplier Invoice {0},对应供应商发票{0}, +Against Voucher No,对应凭证编号, +Age ({0}),账龄({0}), +Ageing Range,账龄区间, +Agent Busy Message,代理忙线提示, +Agent Group,代理组, +Agent Unavailable Message,代理不可用提示, +Aggregate a group of Items into another Item. This is useful if you are maintaining the stock of the packed items and not the bundled item,将物料组聚合至另一物料(适用于维护包装件而非组合件的库存), +Algorithm,算法, +All Activities,所有活动, +All Activities HTML,所有活动HTML, +All Items,所有物料, +All Sales Transactions can be tagged against multiple Sales Persons so that you can set and monitor targets.,所有销售交易可标记多个销售人员以便设定和监控目标, +All allocations have been successfully reconciled,所有分配项已成功对账, +All items have already been received,所有物料已收货, +All items in this document already have a linked Quality Inspection.,本单据所有物料均已关联质检单, +All the Comments and Emails will be copied from one document to another newly created document(Lead -> Opportunity -> Quotation) throughout the CRM documents.,在CRM文档流转(线索->商机->报价)过程中,所有评论和邮件将被复制到新创建文档, +"All the required items (raw materials) will be fetched from BOM and populated in this table. Here you can also change the Source Warehouse for any item. And during the production, you can track transferred raw materials from this table.",所需物料(原材料)将从BOM提取并填充本表,可修改物料的源仓库,生产过程中可在此追踪原材料转移, +Allocate Payment Request,分配付款请求, +Allocated Entries,已分配分录, +Allocated To:,分配至:, +Allocations,分配记录, +Allow Alternative Item must be checked on Item {},必须在物料{}上勾选'允许替代物料', +Allow Continuous Material Consumption,允许持续物料消耗, +Allow Excess Material Transfer,允许超额物料转移, +Allow Internal Transfers at Arm's Length Price,允许按公允价格进行内部调拨, +Allow Item to be Added Multiple Times in a Transaction,允许在交易中多次添加同一物料, +Allow Lead Duplication based on Emails,允许基于邮箱重复创建线索, +Allow Negative rates for Items,允许物料负单价, +Allow Or Restrict Dimension,允许或限制维度, +Allow Partial Reservation,允许部分预留, +Allow Purchase,允许采购, +Allow Sales,允许销售, +Allow Sales Order Creation For Expired Quotation,允许为过期报价创建销售订单, +Allow User to Edit Discount,允许用户编辑折扣, +Allow User to Edit Rate,允许用户编辑单价, +Allow Zero Rate,允许零费率, +Allow existing Serial No to be Manufactured/Received again,允许现有序列号重复生产/接收, +Allow material consumptions without immediately manufacturing finished goods against a Work Order,允许工单未完成时进行物料消耗, +Allow multi-currency invoices against single party account ,允许单方账户开具多币种发票, +Allow to Edit Stock UOM Qty for Purchase Documents,允许在采购单据中编辑库存单位数量, +Allow to Edit Stock UOM Qty for Sales Documents,允许在销售单据中编辑库存单位数量, +Allow transferring raw materials even after the Required Quantity is fulfilled,允许在所需数量满足后继续转移原材料, +Allowed,已允许, +Allowed Dimension,允许维度, +Allowed Doctypes,允许单据类型, +Allowed Items,允许物料, +Allowed primary roles are 'Customer' and 'Supplier'. Please select one of these roles only.,主角色仅限'客户'与'供应商',请选择其中一种, +Allows to keep aside a specific quantity of inventory for a particular order.,允许为特定订单预留指定数量库存, +Already Picked,已拣货, +Alternative Items,替代物料清单, +"Alternatively, you can download the template and fill your data in.",您也可以下载模板并填写数据, +Amount (AED),金额(阿联酋迪拉姆), +Amount Difference with Purchase Invoice,与采购发票的金额差异, +Amount Eligible for Commission,佣金计算基数, +Amount in Account Currency,账户货币金额, +Amount in Words,金额大写, +Amount in party's bank account currency,对方银行账户货币金额, +Amount in transaction currency,交易货币金额, +Amounts,金额列表, +An Item Group is a way to classify items based on types.,物料组是基于类型分类物料的层级结构, +An error has been appeared while reposting item valuation via {0},通过{0}重估物料价值时出现错误, +Annual Revenue,年度营收, +"Another Cost Center Allocation record {0} applicable from {1}, hence this allocation will be applicable upto {2}",成本中心分配记录{0}自{1}生效,当前分配有效期至{2}, +Another Payment Request is already processed,已有其他付款请求正在处理, +"Any one of following filters required: warehouse, Item Code, Item Group",必须至少选择一个筛选条件:仓库/物料编码/物料组, +Applicable Dimension,适用维度, +Applicable On Account,适用账户, +Applied on each reading.,每次读数时应用, +Applied putaway rules.,已应用上架规则, +Applies To,应用于, +Apply Putaway Rule,应用上架规则, +Apply Recursion Over (As Per Transaction UOM),按交易单位递归应用, +Apply SLA for Resolution Time,应用解决时间的服务级别协议, +Apply TDS,应用源头减税, +Apply Tax Withholding Amount ,应用预扣税额 , +Apply restriction on dimension values,对维度值应用限制, +Apply to All Inventory Documents,应用于所有库存单据, +Apply to Document,应用至单据, +Appointment Created Successfully,预约创建成功, +Appointment Scheduling Disabled,预约排程已禁用, +Appointment Scheduling has been disabled for this site,本站点已禁用预约排程, +Appointment was created. But no lead was found. Please check the email to confirm,已创建预约但未发现线索,请检查邮件确认, +Approximately match the description/party name against parties,近似匹配交易方名称/描述, +Are you sure you want to clear all demo data?,确认清除所有演示数据?, +Are you sure you want to delete this Item?,确认删除此物料?, +Are you sure you want to delete {0}?

This action will also delete all associated Common Code documents.

,确认删除{0}?

此操作将同时删除所有关联通用编码文档

, +Are you sure you want to restart this subscription?,确认重启此订阅?, +As on Date,截至日期, +"As there are existing submitted transactions against item {0}, you can not change the value of {1}.",由于存在针对物料{0}的已提交交易,不可修改{1}的值, +"As there are negative stock, you can not enable {0}.",存在负库存时不可启用{0}, +"As there are reserved stock, you cannot disable {0}.",存在预留库存时不可禁用{0}, +"As there are sufficient Sub Assembly Items, Work Order is not required for Warehouse {0}.",由于子装配件充足,仓库{0}无需工单, +"As {0} is enabled, you can not enable {1}.",{0}已启用时不可启用{1}, +Assembly Items,装配物料, +Asset Activity,资产活动, +Asset Capitalization,资产资本化, +Asset Capitalization Asset Item,资产资本化资产项目, +Asset Capitalization Service Item,资产资本化服务项目, +Asset Capitalization Stock Item,资产资本化库存项目, +Asset Depreciation Details,资产折旧明细, +Asset Depreciation Schedule,资产折旧计划, +Asset Depreciation Schedule for Asset {0} and Finance Book {1} is not using shift based depreciation,资产{0}与财务账簿{1}的折旧计划未采用班次折旧法, +Asset Depreciation Schedule not found for Asset {0} and Finance Book {1},未找到资产{0}与财务账簿{1}的折旧计划, +Asset Depreciation Schedule {0} for Asset {1} already exists.,资产{1}的折旧计划{0}已存在, +Asset Depreciation Schedule {0} for Asset {1} and Finance Book {2} already exists.,资产{1}与财务账簿{2}的折旧计划{0}已存在, +"Asset Depreciation Schedules created:
{0}

Please check, edit if needed, and submit the Asset.",已创建资产折旧计划:
{0}

请检查并根据需要编辑后提交资产, +Asset ID,资产编号, +Asset Quantity,资产数量, +Asset Repair Consumed Item,资产维修耗用物料, +Asset Settings,资产设置, +Asset Shift Allocation,资产班次分配, +Asset Shift Factor,资产班次系数, +Asset Shift Factor {0} is set as default currently. Please change it first.,资产班次系数{0}当前设为默认值,请先修改, +Asset cancelled,资产已取消, +Asset capitalized after Asset Capitalization {0} was submitted,资产通过资本化{0}完成资本化, +Asset created,资产已创建, +Asset created after Asset Capitalization {0} was submitted,资产通过资本化{0}创建, +Asset created after being split from Asset {0},资产通过拆分自资产{0}创建, +Asset deleted,资产已删除, +Asset issued to Employee {0},资产已发放给员工{0}, +Asset out of order due to Asset Repair {0},资产因维修{0}处于停用状态, +Asset received at Location {0} and issued to Employee {1},资产在位置{0}接收并发放给员工{1}, +Asset restored,资产已恢复, +Asset restored after Asset Capitalization {0} was cancelled,因资本化{0}取消而恢复资产, +Asset returned,资产已归还, +Asset scrapped,资产已报废, +Asset sold,资产已出售, +Asset submitted,资产已提交, +Asset transferred to Location {0},资产已转移至位置{0}, +Asset updated after being split into Asset {0},资产拆分更新为资产{0}, +Asset updated after cancellation of Asset Repair {0},因维修{0}取消更新资产, +Asset updated after completion of Asset Repair {0},因维修{0}完成更新资产, +Asset {0} cannot be received at a location and given to an employee in a single movement,资产{0}无法在同一移动中完成位置接收和员工发放, +Asset {0} does not belong to Item {1},资产{0}不属于物料{1}, +Asset {0} does not exist,资产{0}不存在, +Asset {0} has been created. Please set the depreciation details if any and submit it.,资产{0}已创建,请设置折旧明细并提交, +Asset {0} has been updated. Please set the depreciation details if any and submit it.,资产{0}已更新,请设置折旧明细并提交, +Asset's depreciation schedule updated after Asset Shift Allocation {0},资产班次分配{0}后更新折旧计划, +Asset's value adjusted after cancellation of Asset Value Adjustment {0},取消资产价值调整{0}后更新资产价值, +Asset's value adjusted after submission of Asset Value Adjustment {0},提交资产价值调整{0}后更新资产价值, +Assign Job to Employee,分配任务给员工, +Assignment,任务分配, +Assignment Conditions,分配条件, +At Row #{0}: The picked quantity {1} for the item {2} is greater than available stock {3} for the batch {4} in the warehouse {5}. Please restock the item.,行{0}:物料{2}的拣货数量{1}超过仓库{5}批次{4}的可用库存{3},请补货, +At Row #{0}: The picked quantity {1} for the item {2} is greater than available stock {3} in the warehouse {4}.,行{0}:物料{2}的拣货数量{1}超过仓库{4}的可用库存{3}, +At least one account with exchange gain or loss is required,必须设置至少一个汇兑损益科目, +At row {0}: Batch No is mandatory for Item {1},行{0}:物料{1}必须填写批次号, +At row {0}: Parent Row No cannot be set for item {1},行{0}:物料{1}不能设置父行号, +At row {0}: Qty is mandatory for the batch {1},行{0}:批次{1}的数量为必填项, +At row {0}: Serial No is mandatory for Item {1},行{0}:物料{1}必须填写序列号, +At row {0}: Serial and Batch Bundle {1} has already created. Please remove the values from the serial no or batch no fields.,行{0}:序列/批次组合{1}已存在,请清除序列号或批次号字段, +At row {0}: set Parent Row No for item {1},行{0}:请为物料{1}设置父行号, +Attach CSV File,附加CSV文件, +Attendance & Leaves,考勤与休假, +Attribute value: {0} must appear only once,属性值{0}必须唯一, +Auto Create Exchange Rate Revaluation,自动创建汇率重估, +Auto Create Purchase Receipt,自动创建采购收据, +Auto Create Serial and Batch Bundle For Outward,自动创建出库序列/批次组合, +Auto Create Subcontracting Order,自动创建委外订单, +Auto Created Serial and Batch Bundle,自动创建序列/批次组合, +Auto Creation of Contact,自动创建联系人, +Auto Email Report,自动邮件报告, +Auto Fetch Serial Numbers,自动获取序列号, +Auto Insert Item Price If Missing,缺失时自动插入物料价格, +Auto Name,自动命名, +Auto Reconcile,自动对账, +Auto Reconcile Payments,自动对账付款, +Auto Reconciliation,自动对账, +Auto Reconciliation Job Trigger,自动对账任务触发, +Auto Reconciliation has started in the background,后台已启动自动对账, +Auto Reconciliation of Payments has been disabled. Enable it through {0},付款自动对账已禁用,请通过{0}启用, +Auto Reserve Serial and Batch Nos,自动预留序列/批次号, +Auto Reserve Stock for Sales Order on Purchase,采购时自动为销售订单预留库存, +Auto close Opportunity Replied after the no. of days mentioned above,商机回复后自动关闭(基于上述天数), +Auto match and set the Party in Bank Transactions,自动匹配并设置银行交易的交易方, +Auto write off precision loss while consolidation,合并时自动核销精度差异, +Automatically Add Filtered Item To Cart,自动添加筛选物料至购物车, +Automatically Fetch Payment Terms from Order,自动从订单获取付款条件, +Automatically post balancing accounting entry,自动过账平衡会计凭证, +Available Batch Report,可用批次报告, +Available Qty For Consumption,可消耗数量, +Available Qty at Company,公司级可用数量, +Available Qty at Target Warehouse,目标仓库可用数量, +Available Qty to Reserve,可预留数量, +Average Completion,平均完成度, +Avg Rate,平均汇率, +Avg Rate (Balance Stock),平均汇率(结存库存), +BFS,广度优先搜索, +BIN Qty,库位数量, +BOM Created,物料清单已创建, +BOM Creator,物料清单创建工具, +BOM Creator Item,物料清单创建项, +BOM Info,物料清单信息, +BOM Level,物料清单层级, +BOM Tree,物料清单树形图, +BOM UoM,物料清单单位, +BOM Update Batch,物料清单批量更新, +BOM Update Initiated,物料清单更新已启动, +BOM Update Log,物料清单更新日志, +BOM Update Tool Log with job status maintained,带任务状态的物料清单更新工具日志, +BOM Updation already in progress. Please wait until {0} is complete.,物料清单更新正在进行中,请等待{0}完成, +BOM Updation is queued and may take a few minutes. Check {0} for progress.,物料清单更新已排队,可能需要几分钟,查看{0}了解进度, +BOM and Production,物料清单与生产, +BOM recursion: {1} cannot be parent or child of {0},物料清单递归错误:{1}不能作为{0}的父项或子项, +BOMs Updated,物料清单已更新, +BOMs created successfully,物料清单创建成功, +BOMs creation failed,物料清单创建失败, +"BOMs creation has been enqueued, kindly check the status after some time",物料清单创建已加入队列,请稍后查看状态, +Balance Qty (Stock),库存结存数量, +Balance Sheet Summary,资产负债表汇总, +Balance Stock Value,库存结存价值, +Bank Reconciliation Tool,银行对账工具, +Bank Statement Import,银行对账单导入, +Bank Transaction {0} Matched,银行交易{0}已匹配, +Bank Transaction {0} added as Journal Entry,银行交易{0}已添加为日记账分录, +Bank Transaction {0} added as Payment Entry,银行交易{0}已添加为付款凭证, +Bank Transaction {0} is already fully reconciled,银行交易{0}已完全对账, +Bank Transaction {0} updated,银行交易{0}已更新, +Bank/Cash Account,银行/现金账户, +Bank/Cash Account {0} doesn't belong to company {1},银行/现金账户{0}不属于公司{1}, +Base Amount,基本金额, +Base Cost Per Unit,单位基准成本, +Base Rate,基准汇率, +Base Tax Withholding Net Total,代扣税基准净总额, +Base Total,基准总额, +Base Total Billable Amount,基准可计费总额, +Base Total Billed Amount,基准已开票总额, +Base Total Costing Amount,基准成本总额, +Based On Value,基于价值, +"Based on your HR Policy, select your leave allocation period's end date",根据人力资源政策选择假期分配周期结束日期, +"Based on your HR Policy, select your leave allocation period's start date",根据人力资源政策选择假期分配周期开始日期, +Batch Expiry Date,批次有效期, +Batch No is mandatory,批次号为必填项, +Batch No {0} does not exists,批次号{0}不存在, +Batch No {0} is linked with Item {1} which has serial no. Please scan serial no instead.,批次号{0}关联的物料{1}需使用序列号,请扫描序列号, +"Batch No {0} is not present in the original {1} {2}, hence you can't return it against the {1} {2}",批次号{0}在原{1}{2}中不存在,因此不能针对{1}{2}退回, +Batch No.,批次号, +Batch Nos,批次号列表, +Batch Nos are created successfully,批次号创建成功, +Batch Not Available for Return,批次不可退回, +Batch Qty,批次数量, +Batch and Serial No,批次和序列号, +Batch not created for item {} since it does not have a batch series.,未为物料{}创建批次,因其无批次编号规则, +Batch {0} and Warehouse,批次{0}与仓库, +Batch {0} is not available in warehouse {1},批次{0}在仓库{1}中不可用, +Batchwise Valuation,按批次计价, +Beginning of the current subscription period,当前订阅周期开始, +Below Subscription Plans are of different currency to the party default billing currency/Company currency: {0},以下订阅计划货币与交易方默认账单货币/公司货币不同:{0}, +Bill for Rejected Quantity in Purchase Invoice,采购发票中拒收数量计费, +Billed Items To Be Received,已开票待收货项, +"Billed, Received & Returned",已开票、已收货和已退回, +Billing Address Details,账单地址详情, +Billing Address does not belong to the {0},账单地址不属于{0}, +Billing Interval in Subscription Plan must be Month to follow calendar months,订阅计划中的计费周期必须为月以遵循日历月份, +Bisect Accounting Statements,会计凭证分割, +Bisect Left,左分割, +Bisect Nodes,分割节点, +Bisect Right,右分割, +Bisecting From,分割起始, +Bisecting Left ...,正在左分割..., +Bisecting Right ...,正在右分割..., +Bisecting To,分割结束, +Blanket Order Allowance (%),总括订单限额(%), +Bom No,物料清单编号, +Book Advance Payments as Liability option is chosen. Paid From account changed from {0} to {1}.,已选择将预付款记为负债,付款账户从{0}更改为{1}, +Book Advance Payments in Separate Party Account,在单独交易方账户记录预付款, +Book Tax Loss on Early Payment Discount,记录提前付款折扣的税务损失, +Book an appointment,预约登记, +Booking stock value across multiple accounts will make it harder to track stock and account value.,跨多个账户记录库存价值会使跟踪库存和账户价值更困难, +Books have been closed till the period ending on {0},账册已结账至{0}结束的期间, +Both Payable Account: {0} and Advance Account: {1} must be of same currency for company: {2},应付账户{0}和预付款账户{1}对公司{2}必须使用相同货币, +Both Receivable Account: {0} and Advance Account: {1} must be of same currency for company: {2},应收账户{0}和预付款账户{1}对公司{2}必须使用相同货币, +Both {0} Account: {1} and Advance Account: {2} must be of same currency for company: {3},{0}账户{1}和预付款账户{2}对公司{3}必须使用相同货币, +Budget Exceeded,预算超支, +Build All?,全部构建?, +Build Tree,构建树形结构, +Buildable Qty,可构建数量, +Bulk Transaction Log,批量交易日志, +Bulk Transaction Log Detail,批量交易日志明细, +Bulk Update,批量更新, +Bundle Items,组合物料, +Buying & Selling Settings,采购与销售设置, +Buying and Selling,采购与销售, +"By default, the Supplier Name is set as per the Supplier Name entered. If you want Suppliers to be named by a Naming Series choose the 'Naming Series' option.",默认供应商名称按输入显示。若要通过编号规则命名供应商,请选择'编号规则'选项, +Bypass credit check at Sales Order,销售订单跳过信用检查, +CANCELLED,已取消, +CODE-39,CODE-39条码, +COGS By Item Group,按物料组统计销售成本, +COGS Debit,销售成本借方, +CRM Note,CRM备注, +CRM Settings,CRM设置, +Calculate Product Bundle Price based on Child Items' Rates,根据子项单价计算产品组合价格, +Calculate daily depreciation using total days in depreciation period,按折旧期总天数计算日折旧额, +Call Again,再次呼叫, +Call Ended,通话结束, +Call Handling Schedule,通话处理安排, +Call Received By,接听人, +Call Receiving Device,接听设备, +Call Routing,呼叫路由, +Call Schedule Row {0}: To time slot should always be ahead of From time slot.,排程行{0}:结束时段应在开始时段之后, +Call Type,通话类型, +Callback,回拨, +Campaign Item,活动项, +Can not close Work Order. Since {0} Job Cards are in Work In Progress state.,无法关闭工单,因{0}张作业卡处于进行中状态, +"Can not filter based on Child Account, if grouped by Account",若按科目分组,则无法按子科目筛选, +"Can't change the valuation method, as there are transactions against some items which do not have its own valuation method",存在未设置计价方法的物料交易,无法修改计价方法, +Cannot Merge,无法合并, +Cannot Resubmit Ledger entries for vouchers in Closed fiscal year.,已关闭会计年度的凭证不可重新提交分类账分录, +"Cannot amend {0} {1}, please create a new one instead.",无法修改{0}{1},请新建凭证, +Cannot apply TDS against multiple parties in one entry,单笔凭证不能为多方应用源头减税, +Cannot cancel as processing of cancelled documents is pending.,存在待处理的已取消单据,无法取消, +Cannot cancel the transaction. Reposting of item valuation on submission is not completed yet.,物料价值重估未完成,无法取消交易, +Cannot change Reference Document Type.,不可修改参考单据类型, +Cannot complete task {0} as its dependant task {1} are not completed / cancelled.,依赖任务{1}未完成/取消,无法完成任务{0}, +Cannot convert Task to non-group because the following child Tasks exist: {0}.,存在子任务{0},无法转换为非组任务, +Cannot convert to Group because Account Type is selected.,已选择科目类型,不可转为科目组, +Cannot create Stock Reservation Entries for future dated Purchase Receipts.,无法为未来日期的采购收据创建库存预留, +Cannot create a pick list for Sales Order {0} because it has reserved stock. Please unreserve the stock in order to create a pick list.,销售订单{0}已预留库存,无法创建拣货单,请取消预留, +Cannot create accounting entries against disabled accounts: {0},无法为已禁用科目{0}创建会计凭证, +Cannot delete Exchange Gain/Loss row,无法删除汇兑损益行, +Cannot enqueue multi docs for one company. {0} is already queued/running for company: {1},同一公司{1}无法排队多个任务,{0}已在队列/运行中, +Cannot find a default warehouse for item {0}. Please set one in the Item Master or in Stock Settings.,找不到物料{0}的默认仓库,请在物料主数据或库存设置中设置, +Cannot make any transactions until the deletion job is completed,删除任务完成前不可进行任何交易, +Cannot produce more item for {0},无法为{0}生产更多物料, +Cannot produce more than {0} items for {1},无法为{1}生产超过{0}件物料, +Cannot receive from customer against negative outstanding,存在负未清金额时不可从客户收货, +Cannot retrieve link token for update. Check Error Log for more information,无法获取更新链接令牌,查看错误日志, +Cannot retrieve link token. Check Error Log for more information,无法获取链接令牌,查看错误日志, +Canonical URI,规范URI, +Capacity (Stock UOM),产能(库存单位), +Capacity in Stock UOM,产能(库存单位), +Capacity must be greater than 0,产能必须大于0, +Capitalization Method,资本化方法, +Capitalize Asset,资产资本化, +Capitalize Repair Cost,资本化维修成本, +Capitalized,已资本化, +Carrier,承运商, +Carrier Service,承运服务, +Carry Forward Communication and Comments,结转沟通记录与注释, +Category Details,类别明细, +Caution: This might alter frozen accounts.,注意:可能修改冻结账户, +Change in Stock Value,库存价值变动, +Changed customer name to '{}' as '{}' already exists.,客户名称已存在,已更改为'{}', +Changes,变更记录, +Charge of type 'Actual' in row {0} cannot be included in Item Rate or Paid Amount,行{0}的'实际'类型费用不可包含在物料单价或实付金额中, +Chart Of Accounts,会计科目表, +Checked On,检查时间, +Checking this will round off the tax amount to the nearest integer,勾选后将四舍五入税额至整数, +Cheques and Deposits Incorrectly cleared,支票与存款错误核销, +Child Row Reference,子行引用, +Choose a WIP composite asset,选择在制品复合资产, +Clear Demo Data,清除演示数据, +Clear Notifications,清空通知, +Clearing Demo Data...,正在清除演示数据..., +Click on 'Get Finished Goods for Manufacture' to fetch the items from the above Sales Orders. Items only for which a BOM is present will be fetched.,点击'获取待生产成品'从上述销售订单提取物料,仅获取存在物料清单的物料, +Click on Add to Holidays. This will populate the holidays table with all the dates that fall on the selected weekly off. Repeat the process for populating the dates for all your weekly holidays,点击'添加至假期',系统将填充所选周休日期的假期表,重复操作可填充所有周休日期, +Click on Get Sales Orders to fetch sales orders based on the above filters.,点击'获取销售订单'根据上述筛选条件提取销售订单, +Click to add email / phone,点击添加邮箱/电话, +Close Replied Opportunity After Days,商机回复后关闭天数, +Closed Work Order can not be stopped or Re-opened,已关闭工单不可停止或重新打开, +Closing,正在关闭, +Closing Balance as per Bank Statement,银行对账单期末余额, +Closing Balance as per ERP,系统期末余额, +Code List,编码列表, +Columns are not according to template. Please compare the uploaded file with standard template,列不符合模板要求,请对比上传文件与标准模板, +Common Code,通用编码, +Communication Channel,沟通渠道, +Company Address Display,公司地址显示格式, +Company Billing Address,公司账单地址, +Company Contact Person,公司联系人, +Company Details,公司详情, +Company Shipping Address,公司发货地址, +Company Tax ID,公司税号, +Company and Posting Date is mandatory,必须填写公司和过账日期, +Company is mandatory,公司为必填项, +Company is mandatory for generating an invoice. Please set a default company in Global Defaults.,生成发票必须指定公司,请在全局设置中设置默认公司, +Company which internal customer represents,内部客户所属公司, +Company which internal customer represents.,内部客户所属公司, +Company which internal supplier represents,内部供应商所属公司, +Company {0} added multiple times,公司{0}被重复添加, +Company {0} is added more than once,公司{0}被多次添加, +Company {} does not exist yet. Taxes setup aborted.,公司{}尚未存在,税务设置已中止, +Company {} does not match with POS Profile Company {},公司{}与POS配置公司{}不匹配, +Competitor,竞争对手, +Competitor Detail,竞争对手详情, +Competitor Name,竞争对手名称, +Competitors,竞争对手列表, +Complete Job,完成作业, +Complete Order,完成订单, +Completed On,完成日期, +Completed On cannot be greater than Today,完成日期不能晚于今日, +Completed Tasks,已完成任务, +Completed Time,完成时间, +Completion Date can not be before Failure Date. Please adjust the dates accordingly.,完成日期不能在故障日期之前,请调整日期, +Conditional Rule,条件规则, +Conditional Rule Examples,条件规则示例, +Configure Product Assembly,配置产品组装, +Configure the action to stop the transaction or just warn if the same rate is not maintained.,配置当费率不一致时的操作:终止交易或仅警告, +Connections,连接, +Consider Entire Party Ledger Amount,考虑交易方总账金额, +Consider Minimum Order Qty,考虑最小订单量, +Consider Rejected Warehouses,考虑拒收仓库, +Considered In Paid Amount,计入实付金额, +Consolidate Sales Order Items,合并销售订单项, +Consolidate Sub Assembly Items,合并子装配项, +Consumed Asset Total Value,消耗资产总值, +Consumed Assets,消耗资产, +Consumed Quantity,消耗数量, +Consumed Stock Items,消耗库存物料, +Consumed Stock Items or Consumed Asset Items are mandatory for creating new composite asset,创建复合资产需填写消耗库存或资产物料, +"Consumed Stock Items, Consumed Asset Items or Consumed Service Items is mandatory for Capitalization",资本化需填写消耗库存/资产/服务项, +Consumed Stock Total Value,消耗库存总价值, +Consumption Rate,消耗率, +Contact Details,联系人详情, +Contact Mobile,联系人手机, +Contact Person does not belong to the {0},联系人不属于{0}, +Contact Us Settings,联系我们设置, +Contacts,联系人, +Contract Template Help,合同模板帮助, +Contribution Qty,贡献数量, +Control Historical Stock Transactions,控制历史库存交易, +Conversion factor for item {0} has been reset to 1.0 as the uom {1} is same as stock uom {2}.,物料{0}的换算系数已重置为1.0,因其单位{1}与库存单位{2}相同, +Conversion rate cannot be 0,汇率不能为 0, +"Conversion rate is 1.00, but document currency is different from company currency",汇率设置为1.00,但单据货币与公司货币不同, +Conversion rate must be 1.00 if document currency is same as company currency,单据货币与公司本位币相同时,汇率必须为1.00, +Convert Item Description to Clean HTML in Transactions,在交易中将物料描述转换为纯净HTML, +Convert to Item Based Reposting,转换为基于物料的重新过账, +Convert to Ledger,转换为分类账,Warehouse +Core,核心, +Corrective Job Card,纠正性作业卡, +Corrective Operation,纠正性工序, +Corrective Operation Cost,纠正性工序成本, +Cost Center Allocation,成本中心分配, +Cost Center Allocation Percentage,成本中心分配百分比, +Cost Center Allocation Percentages,成本中心分配比例, +Cost Center for Item rows has been updated to {0},物料行的成本中心已更新为{0}, +"Cost Center is a part of Cost Center Allocation, hence cannot be converted to a group",成本中心参与分配,不可转换为组, +Cost Center with Allocation records can not be converted to a group,存在分配记录的成本中心不可转换为组, +Cost Center {0} cannot be used for allocation as it is used as main cost center in other allocation record.,成本中心{0}已在其他分配中作为主成本中心使用,不可分配, +Cost Center {} doesn't belong to Company {},成本中心{}不属于公司{}, +Cost Center {} is a group cost center and group cost centers cannot be used in transactions,成本中心{}为组成本中心,不可用于交易, +Cost Configuration,成本配置, +Cost Per Unit,单位成本, +Cost of Poor Quality Report,劣质成本报告, +Cost to Company (CTC),公司成本(CTC), +Costing Details,成本核算明细, +Could Not Delete Demo Data,无法删除演示数据, +Could not auto update shifts. Shift with shift factor {0} needed.,无法自动更新班次,需要班次系数{0}, +Could not detect the Company for updating Bank Accounts,无法识别更新银行账户的公司, +Could not find path for ,无法找到路径:, +Create Depreciation Entry,创建折旧凭证, +Create Employee records.,创建员工记录, +Create Grouped Asset,创建组合资产, +Create Job Card based on Batch Size,按批次大小创建作业卡, +Create Journal Entries,创建日记账分录, +Create Ledger Entries for Change Amount,创建差额总账分录, +Create Link,创建链接, +Create Multi-level BOM,创建多层级物料清单, +Create New Customer,新建客户, +Create Opportunity,创建商机, +Create Prospect,创建潜在客户, +Create Reposting Entries,创建重过账分录, +Create Reposting Entry,创建重过账分录, +Create Stock Entry,创建库存凭证, +Create Workstation,创建工作中心, +Create a new composite asset,新建组合资产, +Create a variant with the template image.,使用模板图像创建变型, +Create in Draft Status,以草稿状态创建, +Create {0} {1} ?,是否创建{0}{1}?, +Created On,创建时间, +Created {0} scorecards for {1} between:,已为{1}创建{0}张计分卡,时间范围:, +Creating Delivery Note ...,正在创建交货单..., +Creating Journal Entries...,正在创建日记账分录..., +Creating Packing Slip ...,正在创建装箱单..., +Creating Purchase Invoices ...,正在创建采购发票..., +Creating Purchase Receipt ...,正在创建采购收货单..., +Creating Sales Invoices ...,正在创建销售发票..., +Creating Stock Entry,正在创建库存凭证, +Creating Subcontracting Order ...,正在创建外协订单..., +Creating Subcontracting Receipt ...,正在创建外协收货单..., +Creating User...,正在创建用户..., +Creation,创建, +Creation of {1}(s) successful,成功创建{1}, +"Creation of {0} failed. + Check Bulk Transaction Log","创建 {0} 失败。 + 检查 批量事务日志", +"Creation of {0} partially successful. + Check Bulk Transaction Log","创建 {0} 部分成功。 + 检查 批量事务日志", +Credit (Transaction),贷方(交易), +Credit Amount in Transaction Currency,交易货币贷方金额, +Credit Limit Crossed,超出信用额度, +Credit Limit Settings,信用额度设置, +"Credit Note will update it's own outstanding amount, even if 'Return Against' is specified.",即使指定'退货依据',贷项凭证仍将更新自身未清金额, +Cron Interval should be between 1 and 59 Min,定时任务间隔应设置为1至59分钟, +Currency Exchange Settings Details,货币兑换设置明细, +Currency Exchange Settings Result,货币兑换设置结果, +Current Asset,流动资产, +Current Index,当前索引, +Current Level,当前层级, +Current Liability,流动负债, +Current Node,当前节点, +Current Serial / Batch Bundle,当前序列/批次包, +Custom delimiters,自定义分隔符, +Customer ,客户 , +Customer / Item / Item Group,客户/物料/物料组, +Customer Defaults,客户默认值, +Customer Group Item,客户组物料, +Customer Group: {0} does not exist,客户组:{0}不存在, +Customer Item,客户物料, +Customer Name: ,客户名称:, +Customer Portal Users,客户门户用户, +Customer: ,客户:, +Daily Time to send,每日发送时间, +Dashboard,仪表板, +Data Based On,数据依据, +Date ,日期 , +Date must be between {0} and {1},日期必须在{0}至{1}之间, +Dates,日期, +Days before the current subscription period,当前订阅周期前天数, +DeLinked,解除关联, +Deal Owner,交易负责人, +Debit (Transaction),借方(交易), +Debit Amount in Transaction Currency,交易货币借方金额, +"Debit Note will update it's own outstanding amount, even if 'Return Against' is specified.",即使指定'退货依据',借项凭证仍将更新自身未清金额, +Debit-Credit Mismatch,借贷不平, +Debit-Credit mismatch,借贷不平, +Default Advance Account,默认预付款科目, +Default Advance Paid Account,默认预付账款科目, +Default Advance Received Account,默认预收账款科目, +Default BOM not found for FG Item {0},未找到产成品{0}的默认物料清单, +Default Common Code,默认通用代码, +Default Discount Account,默认折扣科目, +Default In-Transit Warehouse,默认在途仓库, +Default Operating Cost Account,默认运营成本科目, +Default Payment Discount Account,默认付款折扣科目, +Default Provisional Account,默认暂记科目, +Default Service Level Agreement for {0} already exists.,{0}的默认服务级别协议已存在, +Default Unit of Measure for Item {0} cannot be changed directly because you have already made some transaction(s) with another UOM. You need to either cancel the linked documents or create a new Item.,物料{0}的默认计量单位不可直接更改,因已存在其他计量单位的交易。需取消关联单据或创建新物料, +Default settings for your stock-related transactions,库存相关交易的默认设置, +"Default tax templates for sales, purchase and items are created.",已创建销售、采购和物料的默认税务模板, +Deferred Accounting,递延会计, +Deferred Accounting Defaults,递延会计默认值, +Deferred Revenue and Expense,递延收入与费用, +Deferred accounting failed for some invoices:,以下发票递延会计处理失败:, +Delay (In Days),延迟(天数), +Delayed,已延迟, +Delayed Tasks Summary,延迟任务汇总, +Delete Accounting and Stock Ledger Entries on deletion of Transaction,删除交易时同步删除会计与库存分类账分录, +Delete Bins,删除库位, +Delete Cancelled Ledger Entries,删除已取消的分类账分录, +Delete Dimension,删除维度, +Delete Leads and Addresses,删除销售线索与地址, +Delete Transactions,删除交易, +Deleted Documents,已删除单据, +Deleting {0} and all associated Common Code documents...,正在删除{0}及其所有关联通用代码单据..., +Deletion in Progress!,删除进行中!, +Delimiter options,分隔符选项, +Delivery Manager,交付经理, +Delivery Note Packed Item,交货单打包物料, +Delivery User,交付用户, +Delivery to,交付至, +Demand,需求, +Demo Company,演示公司, +Demo data cleared,演示数据已清除, +Dependant SLE Voucher Detail No,依赖库存分类账凭证明细编号, +Dependent Task {0} is not a Template Task,依赖任务{0}不是模板任务, +Deposit,保证金, +Depreciate based on daily pro-rata,按日比例计提折旧, +Depreciate based on shifts,按班次计提折旧, +Depreciation Details,折旧明细, +Depreciation Entry Posting Status,折旧分录过账状态, +Depreciation Expense Account should be an Income or Expense Account.,折旧费用科目应为收入或费用类科目, +Depreciation Posting Date cannot be before Available-for-use Date,折旧过账日期不可早于可用日期, +Depreciation Row {0}: Depreciation Posting Date cannot be before Available-for-use Date,折旧行{0}:折旧过账日期不可早于可用日期, +Depreciation Schedule View,折旧计划表视图, +Depreciation cannot be calculated for fully depreciated assets,已全额折旧资产无法计算折旧, +Depreciation eliminated via reversal,通过冲销消除折旧, +Description of Content,内容描述, +Desk User,桌面用户, +Difference In,差额在, +Difference Posting Date,差额过账日期, +Difference Qty,差额数量, +Different 'Source Warehouse' and 'Target Warehouse' can be set for each row.,每行可设置不同的'来源仓库'与'目标仓库', +Dimension Details,维度明细, +Dimension Filter Help,维度筛选帮助, +Dimension-wise Accounts Balance Report,分维度科目余额表, +Dimensions,维度, +Direct Expense,直接费用, +Disable Last Purchase Rate,禁用上次采购价, +Disable Serial No And Batch Selector,禁用序列号与批次选择器, +Disable auto setting Grand Total to default Payment Mode,禁用自动将总计设为默认付款方式, +Disabled Account Selected,选中了禁用账户, +Disabled Warehouse {0} cannot be used for this transaction.,已禁用仓库{0}不可用于此交易, +Disabled pricing rules since this {} is an internal transfer,因{}为内部调拨,已禁用定价规则, +Disabled tax included prices since this {} is an internal transfer,因{}为内部调拨,已禁用含税价格, +Disables auto-fetching of existing quantity,禁用自动获取现有数量, +Disassemble,拆解, +Disassemble Order,拆解订单, +Discount Account,折扣科目, +Discount Date,折扣日期, +Discount Settings,折扣设置, +Discount Validity,折扣有效期, +Discount Validity Based On,折扣有效期依据, +Discount of {} applied as per Payment Term,根据付款条款应用{}折扣, +Discounted Amount,折后金额, +"Discounts to be applied in sequential ranges like buy 1 get 1, buy 2 get 2, buy 3 get 3 and so on",按顺序范围应用折扣,如买1送1、买2送2等, +Discrepancy between General and Payment Ledger,总账与付款分类账差异, +Dispatch Address,派送地址, +Dispatch Address Name,派送地址名称, +Distinct Item and Warehouse,唯一物料与仓库, +Distribute Additional Costs Based On ,附加费用分摊依据, +Distribute Manually,手动分配, +Do Not Explode,不展开, +Do Not Update Serial / Batch on Creation of Auto Bundle,创建自动捆绑时不更新序列/批次, +Do Not Use Batch-wise Valuation,不启用分批次计价, +Do reposting for each Stock Transaction,对每笔库存交易执行重过账, +Do you still want to enable immutable ledger?,确认要启用不可变分类账?, +Do you still want to enable negative inventory?,确认要启用负库存?, +DocTypes should not be added manually to the 'Excluded DocTypes' table. You are only allowed to remove entries from it.,'排除文档类型'表不可手动添加条目,仅允许删除现有条目, +Document Type already used as a dimension,文档类型已作为维度使用, +Documents,文档, +Documents Processed on each trigger. Queue Size should be between 5 and 100,每次触发处理的文档数。队列大小应为5至100, +Documents: {0} have deferred revenue/expense enabled for them. Cannot repost.,文档{0}启用了递延收入/费用,无法重过账, +Domain Settings,域名设置, +Don't Enforce Free Item Qty,不强制赠品数量, +Don't Reserve Sales Order Qty on Sales Return,销售退货时不预留销售订单数量, +Don't Send Emails,不发送邮件, +Dont Recompute tax,不重新计算税款, +Download Backups,下载备份, +Download CSV Template,下载CSV模板, +Download PDF for Supplier,为供应商下载PDF, +Dunning Amount (Company Currency),催款金额(公司货币), +Dunning Level,催款级别, +Duplicate Customer Group,重复客户组, +Duplicate Finance Book,重复财务账簿, +Duplicate Item Group,重复物料组, +Duplicate POS Invoices found,发现重复POS发票, +Dynamic Condition,动态条件, +Edit Capacity,编辑产能, +Edit Cart,编辑购物车, +Edit Full Form,编辑全称, +Edit Note,编辑备注, +Editing {0} is not allowed as per POS Profile settings,根据POS配置设置,不允许编辑{0}, +Either 'Selling' or 'Buying' must be selected,必须选择'销售'或'采购', +Email / Notifications,邮件/通知, +Email Address (required),电子邮件地址(必填), +"Email Address must be unique, it is already used in {0}",电子邮件地址必须唯一,已在{0}中使用, +Email Digest Recipient,邮件摘要接收人, +Email Digest: {0},邮件摘要:{0}, +Email Domain,邮件域名, +Email Receipt,邮件回执, +Email or Phone/Mobile of the Contact are mandatory to continue.,必须填写联系人的邮箱或电话/手机才能继续, +Email verification failed.,邮件验证失败, +Employee User Id,员工用户ID, +Employee {0} is currently working on another workstation. Please assign another employee.,员工{0}正在其他工作中心工作,请指派其他员工, +Enable Allow Partial Reservation in the Stock Settings to reserve partial stock.,在库存设置中启用允许部分预留以保留部分库存, +Enable Automatic Party Matching,启用自动交易方匹配, +Enable Common Party Accounting,启用共同交易方核算, +Enable Discount Accounting for Selling,启用销售折扣核算, +Enable Fuzzy Matching,启用模糊匹配, +Enable Health Monitor,启用健康监控, +Enable Immutable Ledger,启用不可变分类账, +Enable Provisional Accounting For Non Stock Items,对非库存物料启用暂记核算, +Enable Stock Reservation,启用库存预留, +Enable it if users want to consider rejected materials to dispatch.,若需考虑拒收物料进行派送,请启用此选项, +Enable this checkbox even if you want to set the zero priority,即使设置零优先级也需勾选此复选框, +"Enable this option to calculate daily depreciation by considering the total number of days in the entire depreciation period, (including leap years) while using daily pro-rata based depreciation",启用此选项将通过考虑整个折旧期间总天数(含闰年)来计算每日折旧,基于按日比例折旧法, +Enable to apply SLA on every {0},启用后将在每个{0}应用SLA, +Enabling this ensures each Purchase Invoice has a unique value in Supplier Invoice No. field within a particular fiscal year,启用此选项确保每个会计年度内供应商发票号的唯一性, +Enabling this option will allow you to record -

1. Advances Received in a Liability Account instead of the Asset Account

2. Advances Paid in an Asset Account instead of the Liability Account,启用此选项将允许:

1. 将预收款记入负债账户而非资产账户

2. 将预付款记入资产账户而非负债账户, +Enabling this will allow creation of multi-currency invoices against single party account in company currency,启用后允许以公司货币为单一交易方创建多币种发票, +Enabling this will change the way how cancelled transactions are handled.,启用后将改变已取消交易的处理方式, +End Transit,结束运输, +End of the current subscription period,当前订阅周期结束, +"Enter First and Last name of Employee, based on Which Full Name will be updated. IN transactions, it will be Full Name which will be fetched.",输入员工姓和名,全称将自动更新。交易中将使用全称, +Enter Manually,手动输入, +Enter Serial Nos,输入序列号, +Enter Visit Details,输入访问明细, +Enter a name for Routing.,输入工艺路线名称, +"Enter a name for the Operation, for example, Cutting.",输入工序名称,如切割, +Enter a name for this Holiday List.,输入节假日列表名称, +"Enter an Item Code, the name will be auto-filled the same as Item Code on clicking inside the Item Name field.",输入物料代码,点击物料名称字段将自动填充相同名称, +Enter each serial no in a new line,每行输入一个序列号, +"Enter the Operation, the table will fetch the Operation details like Hourly Rate, Workstation automatically. + + After that, set the Operation Time in minutes and the table will calculate the Operation Costs based on the Hourly Rate and Operation Time.","输入操作后,表格将自动获取操作详细信息,如小时费率、工作站。 + + 之后,以分钟为单位设置操作时间,表格将根据小时费率和操作时间计算操作成本。", +Enter the opening stock units.,输入期初库存数量, +Enter the quantity of the Item that will be manufactured from this Bill of Materials.,输入基于此物料清单生产的物料数量, +Enter the quantity to manufacture. Raw material Items will be fetched only when this is set.,输入生产数量。仅当设置此值时才会获取原材料, +Error during caller information update,更新来电信息时出错, +Error in party matching for Bank Transaction {0},银行交易{0}交易方匹配错误, +Error while posting depreciation entries,过账折旧分录时出错, +Error while processing deferred accounting for {0},处理{0}递延会计时出错, +Error while reposting item valuation,重过账物料计价时出错, +"Error: This asset already has {0} depreciation periods booked. + The `depreciation start` date must be at least {1} periods after the `available for use` date. + Please correct the dates accordingly.","错误:此资产已登记 {0} 个折旧期。 + `折旧开始`日期必须至少在 `可供使用`日期之后 {1} 个期。 + 请相应地更正日期。", +Errors Notification,错误通知, +Even invoices with apply tax withholding unchecked will be considered for checking cumulative threshold breach,未勾选应用预扣税的发票也将用于检查累计阈值突破, +Example URL,示例URL, +Example of a linked document: {0},关联文档示例:{0}, +"Example: ABCD.##### +If series is set and Serial No is not mentioned in transactions, then automatic serial number will be created based on this series. If you always want to explicitly mention Serial Nos for this item. leave this blank.","例如:ABCD.##### +如果设置了系列,但交易中未提及序列号,则将根据此系列自动创建序列号。如果您始终想明确提及此项目的序列号,请将此处留空。", +Example: Serial No {0} reserved in {1}.,示例:序列号{0}在{1}中预留, +Excess Materials Consumed,超量消耗物料, +Excess Transfer,超额调拨, +Exchange Gain / Loss,汇兑损益, +Exchange Gain Or Loss,汇兑损益, +Exchange Gain/Loss amount has been booked through {0},已通过{0}登记汇兑损益金额, +Exchange Rate Revaluation Settings,汇率重估设置, +Excluded DocTypes,排除文档类型, +Exempt Supplies,免税供应, +Exit Full Screen,退出全屏, +Expected,预期, +Expected Balance Qty,预期结余数量, +Expected End Date should be less than or equal to parent task's Expected End Date {0}.,预计结束日期应小于或等于父任务预计结束日期{0}, +Expected Stock Value,预期库存价值, +Expected Time Required (In Mins),所需预计时间(分钟), +Expiry,有效期, +Export Data,导出数据, +Export Errored Rows,导出错误行, +Export Import Log,导出导入日志, +Extra Consumed Qty,额外消耗数量, +Extra Job Card Quantity,额外作业卡数量, +FIFO Queue vs Qty After Transaction Comparison,先进先出队列与交易后数量对比, +"FIFO Stock Queue (qty, rate)",先进先出库存队列(数量,单价), +FIFO/LIFO Queue,先进先出/后进先出队列, +Failed Entries,失败条目, +"Failed to erase demo data, please delete the demo company manually.",清除演示数据失败,请手动删除演示公司, +Failed to post depreciation entries,折旧分录过账失败, +Failed to setup defaults for country {0}. Please contact support.,国家{0}默认设置失败,请联系支持, +Failure,故障, +Failure Description,故障描述, +Fetch Based On,获取依据, +Fetch Overdue Payments,获取逾期付款, +Fetch Timesheet,获取工时表, +Fetch Timesheet in Sales Invoice,在销售发票中获取工时表, +Fetch Value From,取值来源, +Fetching Error,获取错误, +Fetching exchange rates ...,正在获取汇率..., +Filter by Reference Date,按参考日期筛选, +Filter on Invoice,按发票筛选, +Filter on Payment,按付款筛选, +Filters missing,缺少筛选条件, +Final Product,最终产品, +Financial Ratios,财务比率, +Financial Reports,财务报表, +Financial Year Begins On,财年开始日期, +Financial reports will be generated using GL Entry doctypes (should be enabled if Period Closing Voucher is not posted for all years sequentially or missing) ,财务报表将使用总账分录生成(若未按顺序过账所有年度的期间结算凭证,需启用), +Finished Good BOM,产成品物料清单, +Finished Good Item,产成品物料, +Finished Good Item Qty,产成品物料数量, +Finished Good Item Quantity,产成品物料数量, +Finished Good Item is not specified for service item {0},服务物料{0}未指定产成品物料, +Finished Good Item {0} Qty can not be zero,产成品物料{0}数量不可为零, +Finished Good Item {0} must be a sub-contracted item,产成品物料{0}必须为外协物料, +Finished Good Qty,产成品数量, +Finished Good Quantity ,产成品数量, +Finished Good UOM,产成品计量单位, +Finished Good {0} does not have a default BOM.,产成品{0}无默认物料清单, +Finished Good {0} is disabled.,产成品{0}已停用, +Finished Good {0} must be a stock item.,产成品{0}必须为库存物料, +Finished Good {0} must be a sub-contracted item.,产成品{0}必须为外协物料, +Finished Goods Based Operating Cost,基于产成品的运营成本, +Finished Goods Item,产成品物料, +Finished Goods Reference,产成品参考, +Finished Goods Value,产成品价值, +Finished Goods based Operating Cost,基于产成品的运营成本, +Finished Item {0} does not match with Work Order {1},产成品{0}与工单{1}不匹配, +First Response Due,首次响应截止, +First Response SLA Failed by {},首次响应SLA未达标 {}, +Fixed Asset Defaults,固定资产默认值, +Fixed Time,固定时间, +Floor,楼层, +Floor Name,楼层名称, +For Item,物料, +For Item {0} cannot be received more than {1} qty against the {2} {3},物料{0}针对{2}{3}的收货数量不得超过{1}, +For Job Card,作业卡, +For Operation,工序, +"For Return Invoices with Stock effect, '0' qty Items are not allowed. Following rows are affected: {0}",库存影响的退货发票中不允许零数量物料,受影响行:{0}, +For Work Order,工单, +For dunning fee and interest,催收费及利息, +"For item {0}, rate must be a positive number. To Allow negative rates, enable {1} in {2}",物料{0}的税率必须为正数。允许负数需在{2}启用{1}, +For quantity {0} should not be greater than allowed quantity {1},数量{0}不得超过允许数量{1}, +"For the item {0}, the quantity should be {1} according to the BOM {2}.",物料{0}的数量根据BOM{2}应为{1}, +"For the {0}, no stock is available for the return in the warehouse {1}.",{0}在仓库{1}中无可用退货库存, +"For the {0}, the quantity is required to make the return entry",{0}需要数量才能创建退货分录, +Force-Fetch Subscription Updates,强制获取订阅更新, +Forecast,预测, +Forecasting,预测, +Formula Based Criteria,公式条件, +Free Item Rate,赠品单价, +From Corrective Job Card,来自纠正作业卡, +From Date and To Date are mandatory,起始和截止日期必填, +From Date is mandatory,起始日期必填, +From Date: {0} cannot be greater than To date: {1},起始日期:{0}不能晚于截止日期:{1}, +From Delivery Date,发货日期起, +From Doctype,来源单据类型, +From Due Date,到期日起, +From Opportunity,来自商机, +From Payment Date,付款日期起, +From Prospect,来自潜在客户, +From Reference Date,参考日期起, +From Voucher Detail No,起始凭证明细编号, +From Voucher No,起始凭证编号, +From Voucher Type,起始凭证类型, +From and To dates are required,必须填写起始和截止日期, +Full Screen,全屏, +Full and Final Statement,全款结清声明, +GL Balance,总账余额, +GL Entry Processing Status,总账分录处理状态, +GL reposting index,总账重过账索引, +GS1,GS1标准, +GTIN,全球贸易项目代码, +Gain/Loss accumulated in foreign currency account. Accounts with '0' balance in either Base or Account currency,外币账户累计损益。本币或外币余额为零的账户, +Gain/Loss already booked,损益已登记, +Gain/Loss from Revaluation,重估损益, +General and Payment Ledger Comparison,总账与付款账对比, +General and Payment Ledger mismatch,总账与付款账不一致, +Generate Demo Data for Exploration,生成演示数据用于探索, +Generate E-Invoice,生成电子发票, +Generate Invoice At,生成发票时间, +Generated,已生成, +Generating Preview,生成预览, +Get Allocations,获取分配, +Get Customer Group Details,获取客户组详情, +Get Finished Goods for Manufacture,获取待生产产成品, +Get Outstanding Orders,获取未清订单, +Get Raw Materials Cost from Consumption Entry,从消耗分录获取原材料成本, +Get Raw Materials for Purchase,获取待采购原材料, +Get Raw Materials for Transfer,获取待调拨原材料, +Get Scrap Items,获取废品物料, +Get Stock,获取库存, +Get Sub Assembly Items,获取子装配件, +Get Supplier Group Details,获取供应商组详情, +Get Timesheets,获取工时表, +Get stops from,获取站点来源, +Getting Scrap Items,获取废品物料, +Give free item for every N quantity,每满N数量赠送赠品, +Go back,返回, +Go to {0} List,跳转至{0}列表, +Goods,货物, +Grant Commission,授予佣金, +Greeting Message,问候语, +Gross Profit Percent,毛利率, +Gross Purchase Amount Too Low: {0} cannot be depreciated over {1} cycles with a frequency of {2} depreciations.,购置总金额过低:{0}无法在{1}个周期内按{2}次折旧频率进行折旧, +Gross Purchase Amount should be equal to purchase amount of one single Asset.,购置总金额应等于单个资产的购置金额, +Group Same Items,合并相同物料, +Growth View,增长视图, +Handle Employee Advances,处理员工预支款, +Has Alternative Item,存在替代物料, +Has Corrective Cost,存在纠正成本, +Has Item Scanned,已扫描物料, +Has Priority,存在优先级, +Have Default Naming Series for Batch ID?,是否设置批次ID默认命名序列?, +Heatmap,热力图, +Height (cm),身高(厘米), +"Hello,",您好:, +Helps you distribute the Budget/Target across months if you have seasonality in your business.,若业务存在季节性波动,可帮助您将预算/目标分摊至各月, +Here are the error logs for the aforementioned failed depreciation entries: {0},上述失败折旧分录的错误日志如下:{0}, +Here are the options to proceed:,以下是可执行的操作选项:, +"Here, you can select a senior of this Employee. Based on this, Organization Chart will be populated.",此处可选择该员工的上级,组织架构图将基于此生成, +"Here, your weekly offs are pre-populated based on the previous selections. You can add more rows to also add public and national holidays individually.",此处每周休息日已根据先前选择预填充,您可新增行单独添加公共及国家节假日, +"Hi,",您好:, +Hide Images,隐藏图片, +Hide timesheets,隐藏工时表, +Holiday Date {0} added multiple times,节假日日期{0}被重复添加, +Hours Spent,耗时, +How often should Project be updated of Total Purchase Cost ?,应以何频率更新项目的总采购成本?, +ISBN,国际标准书号, +ISSN,国际标准刊号, +Idle,闲置, +"If Enabled - Reconciliation happens on the Advance Payment posting date
+If Disabled - Reconciliation happens on oldest of 2 Dates: Invoice Date or the Advance Payment posting date
+","如果 启用 - 对账发生在 预付款过账日期
+如果 禁用 - 对账发生在 2 个日期中最早的日期: 发票日期预付款过账日期
+", +"If an operation is divided into sub operations, they can be added here.",若工序被拆分为子工序,可在此处添加, +"If checked, Rejected Quantity will be included while making Purchase Invoice from Purchase Receipt.",勾选后,从采购收货单生成采购发票时将包含拒收数量, +"If checked, Stock will be reserved on Submit",勾选后,库存将在提交时预留, +"If checked, picked qty won't automatically be fulfilled on submit of pick list.",勾选后,提交拣货清单时不会自动履行已拣数量, +"If checked, the tax amount will be considered as already included in the Paid Amount in Payment Entry",勾选后,税款金额将被视为已包含在付款凭证的已付金额中, +"If checked, we will create demo data for you to explore the system. This demo data can be erased later.",勾选后,系统将创建演示数据供您探索。此数据后续可清除, +If enabled then system won't apply the pricing rule on the delivery note which will be create from the pick list,启用后,系统不会对从拣货清单创建的交货单应用定价规则, +If enabled then system won't override the picked qty / batches / serial numbers.,启用后,系统不会覆盖已拣数量/批次/序列号, +"If enabled, a print of this document will be attached to each email",启用后,每封邮件将附带此单据的打印件, +"If enabled, additional ledger entries will be made for discounts in a separate Discount Account",启用后,折扣将在单独折扣科目中生成额外分类账分录, +"If enabled, all files attached to this document will be attached to each email",启用后,每封邮件将附带此单据的所有附件, +"If enabled, do not update serial / batch values in the stock transactions on creation of auto Serial + / Batch Bundle. ","如果启用,则在创建自动序列 + /批次捆绑时不要更新库存交易中的序列/批次值。 ", +"If enabled, ledger entries will be posted for change amount in POS transactions",启用后,POS交易中的找零金额将生成分类账分录, +"If enabled, the consolidated invoices will have rounded total disabled",启用后,合并发票将禁用四舍五入总额, +"If enabled, the item rate won't adjust to the valuation rate during internal transfers, but accounting will still use the valuation rate.",启用后,内部调拨时物料单价不会调整为计价汇率,但会计仍使用计价汇率, +"If enabled, the system will create material requests even if the stock exists in the 'Raw Materials Warehouse'.",启用后,即使'原材料仓库'有库存,系统仍会创建物料请求, +"If enabled, the system will use the moving average valuation method to calculate the valuation rate for the batched items and will not consider the individual batch-wise incoming rate.",启用后,系统将采用移动平均计价法计算批次物料计价汇率,不考虑单个批次入库汇率, +"If enabled, then system will only validate the pricing rule and not apply automatically. User has to manually set the discount percentage / margin / free items to validate the pricing rule",启用后,系统仅验证定价规则而不自动应用。用户需手动设置折扣率/利润率/赠品以验证规则, +"If mentioned, the system will allow only the users with this Role to create or modify any stock transaction earlier than the latest stock transaction for a specific item and warehouse. If set as blank, it allows all users to create/edit back-dated transactions.",若设置,仅允许具有此角色的用户创建或修改早于特定物料及仓库最新库存交易的记录。留空则允许所有用户创建/编辑倒填日期交易, +"If not, you can Cancel / Submit this entry",若否,可取消/提交此分录, +"If rate is zero then item will be treated as ""Free Item""","如果比率为零,则该项将被视为""免费项目""", +"If the BOM results in Scrap material, the Scrap Warehouse needs to be selected.",若物料清单产生废料,需选择废品仓库, +"If the selected BOM has Operations mentioned in it, the system will fetch all Operations from BOM, these values can be changed.",若所选物料清单包含工序,系统将从中获取所有工序,这些值可修改, +"If there is no title column, use the code column for the title.",若无标题列,使用代码列作为标题, +"If this checkbox is enabled, then the system won’t run the MRP for the available sub-assembly items.",启用后,系统将不会为可用子装配件运行MRP, +If this is undesirable please cancel the corresponding Payment Entry.,若需取消,请撤销对应付款凭证, +"If yes, then this warehouse will be used to store rejected materials",若选择是,此仓库将用于存储拒收物料, +"If you are maintaining stock of this Item in your Inventory, ERPNext will make a stock ledger entry for each transaction of this item.",若在库存中维护此物料,ERPNext将为每笔交易创建库存分类账分录, +"If you need to reconcile particular transactions against each other, then please select accordingly. If not, all the transactions will be allocated in FIFO order.",若需对特定交易相互对账,请相应选择。否则所有交易将按先进先出顺序分配, +"If you still want to proceed, please disable 'Skip Available Sub Assembly Items' checkbox.",若仍要继续,请取消勾选'跳过可用子装配件'复选框, +"If you still want to proceed, please enable {0}.",若仍要继续,请启用{0}, +"If your CSV uses a different delimiter, add that character here, ensuring no spaces or additional characters are included.",若CSV使用不同分隔符,在此添加该字符,确保不含空格或其他字符, +Ignore Account Closing Balance,忽略账户期末余额, +Ignore Available Stock,忽略可用库存, +Ignore Closing Balance,忽略期末余额, +Ignore Default Payment Terms Template,忽略默认付款条款模板, +Ignore Empty Stock,忽略零库存, +Ignore Exchange Rate Revaluation Journals,忽略汇率重估日记账, +Ignore Is Opening check for reporting,忽略期初检查用于报表, +Ignore Pricing Rule is enabled. Cannot apply coupon code.,已启用忽略定价规则,无法应用优惠券, +Ignore System Generated Credit / Debit Notes,忽略系统生成的贷项/借项凭证, +Ignore Voucher Type filter and Select Vouchers Manually,忽略凭证类型筛选并手动选择凭证, +Ignores legacy Is Opening field in GL Entry that allows adding opening balance post the system is in use while generating reports,忽略总账分录中的遗留期初字段,允许在系统使用后添加期初余额生成报表, +Impairment,减值, +Import File,导入文件, +Import File Errors and Warnings,导入文件错误与警告, +Import Genericode File,导入通用代码文件, +Import Log Preview,导入日志预览, +Import Preview,导入预览, +Import Progress,导入进度, +Import Type,导入类型, +Import Using CSV file,使用CSV文件导入, +Import Warnings,导入警告, +Import completed. {0} common codes created.,导入完成,已创建{0}个通用代码, +Import from Google Sheets,从Google表格导入, +Importing Common Codes,正在导入通用代码, +"Importing {0} of {1}, {2}",正在导入{1}中的{0},{2}, +In House,内部, +In Minutes,分钟数, +In Party Currency,交易方货币, +In Transit Transfer,在途调拨, +In Transit Warehouse,在途仓库, +In mins,分钟, +"In row {0} of Appointment Booking Slots: ""To Time"" must be later than ""From Time"".",在预约预订时段的 {0} 行中:“结束时间”必须晚于“开始时间”。, +"In this section, you can define Company-wide transaction-related defaults for this Item. Eg. Default Warehouse, Default Price List, Supplier, etc.",此处可定义此物料在公司范围内的交易默认值,如默认仓库、价格表、供应商等, +Inactive Status,停用状态, +Include Account Currency,包含账户货币, +Include Closed Orders,包含已关闭订单, +Include Default FB Assets,包含默认财务账簿资产, +Include Disabled,包含停用项, +Include Expired Batches,包含过期批次, +Include Safety Stock in Required Qty Calculation,计算需求数量时包含安全库存, +Include Timesheets in Draft Status,包含草稿状态工时表, +Include Zero Stock Items,包含零库存物料, +Incoming Call Handling Schedule,来电处理排程, +Incoming Call Settings,来电设置, +Incoming Rate (Costing),入库汇率(成本核算), +Incorrect Balance Qty After Transaction,交易后结余数量错误, +Incorrect Batch Consumed,消耗批次错误, +Incorrect Check in (group) Warehouse for Reorder,再订购(组)仓库检查错误, +Incorrect Component Quantity,组件数量错误, +Incorrect Invoice,发票错误, +Incorrect Movement Purpose,移动目的错误, +Incorrect Payment Type,付款类型错误, +Incorrect Reference Document (Purchase Receipt Item),参考单据错误(采购收货单物料), +Incorrect Serial No Valuation,序列号计价错误, +Incorrect Serial Number Consumed,消耗序列号错误, +Incorrect Serial and Batch Bundle,序列及批次包错误, +Incorrect Stock Value Report,库存价值报告错误, +Incorrect Type of Transaction,交易类型错误, +Incoterm,国际贸易术语, +Increase In Asset Life(Months),资产寿命延长(月数), +Indent,缩进, +Indirect Expense,间接费用, +Individual GL Entry cannot be cancelled.,单个总账分录无法取消, +Individual Stock Ledger Entry cannot be cancelled.,单个库存分类账分录无法取消, +Initialize Summary Table,初始化汇总表, +Insert New Records,插入新记录, +Inspection Rejected,检验拒收, +Inspection Submission,检验提交, +Instruction,说明, +Insufficient Capacity,产能不足, +Insufficient Stock for Batch,批次库存不足, +Inter Transfer Reference,内部调拨参考, +Interest and/or dunning fee,利息及/或催收费, +Internal Customer,内部客户, +Internal Customer for company {0} already exists,公司{0}的内部客户已存在, +Internal Sale or Delivery Reference missing.,缺少内部销售或交付参考, +Internal Sales Reference Missing,缺少内部销售参考, +Internal Supplier,内部供应商, +Internal Supplier for company {0} already exists,公司{0}的内部供应商已存在, +Internal Transfer Reference Missing,缺少内部调拨参考, +Internal Transfers,内部调拨, +Internal transfers can only be done in company's default currency,内部调拨仅能使用公司本位币, +Interval should be between 1 to 59 MInutes,间隔应设置为1至59分钟, +Invalid,无效, +Invalid Allocated Amount,无效分配金额, +Invalid Amount,无效金额, +Invalid Auto Repeat Date,无效自动重复日期, +Invalid Cost Center,无效成本中心, +Invalid Delivery Date,无效交付日期, +Invalid Discount,无效折扣, +Invalid Document,无效单据, +Invalid Document Type,无效单据类型, +Invalid Formula,无效公式, +Invalid Group By,无效分组依据, +Invalid Item Defaults,无效物料默认值, +Invalid Ledger Entries,无效的分类账分录, +Invalid Primary Role,无效的主要角色, +Invalid Priority,无效的优先级, +Invalid Process Loss Configuration,无效的工艺损耗配置, +Invalid Purchase Invoice,无效的采购发票, +Invalid Qty,无效的数量, +Invalid Schedule,无效的排程计划, +Invalid Serial and Batch Bundle,无效的序列号和批次组合, +Invalid Warehouse,无效的仓库, +Invalid result key. Response:,无效的结果键值。响应:, +Invalid value {0} for {1} against account {2},科目{2}的字段{1}存在无效值{0}, +Inventory Dimension,库存维度, +Inventory Dimension Negative Stock,库存维度负库存, +Inventory Settings,库存参数设置, +Invoice Cancellation,发票作废, +Invoice ID,发票编号, +Invoice Limit,发票限额, +Invoice Portion (%),发票比例(%), +Invoice and Billing,发票与计费, +Invoiced Qty,已开票数量, +Invoices and Payments have been Fetched and Allocated,发票与付款已获取并核销, +Invoicing Features,开票功能模块, +Is Adjustment Entry,是否调整分录, +Is Alternative,是否替代物料, +Is Cash or Non Trade Discount,是否现金/非贸易折扣, +Is Composite Asset,是否组合资产, +Is Corrective Job Card,是否纠正性作业卡, +Is Corrective Operation,是否纠正性工序, +Is Exchange Gain / Loss?,是否汇兑损益?, +Is Expandable,是否可展开, +Is Finished Item,是否完成品, +Is Fully Depreciated,是否已提足折旧, +Is Group Warehouse,是否组仓库, +Is Old Subcontracting Flow,是否旧外协流程, +Is Outward,是否出库, +Is Period Closing Voucher Entry,是否期间结账凭证分录, +Is Rate Adjustment Entry (Debit Note),是否单价调整分录(借项通知单), +Is Recursive,是否递归, +Is Rejected,是否拒收, +Is Rejected Warehouse,是否拒收仓库, +Is Scrap Item,是否废品, +Is Short/Long Year,是否短/长会计年度, +Is Standard,是否标准, +Is Stock Item,是否库存物料, +Is System Generated,是否系统生成, +Is Tax Withholding Account,是否代扣税科目, +Is Template,是否模板, +Issue Analytics,问题分析报表, +Issue Summary,问题摘要, +Issue a debit note with 0 qty against an existing Sales Invoice,针对现有销售发票开具零数量的借项通知单, +Issuing cannot be done to a location. Please enter employee to issue the Asset {0} to,资产{0}不能发放至库位,请输入领用员工, +It can take upto few hours for accurate stock values to be visible after merging items.,物料合并后需等待数小时才能查看准确的库存值。, +"It's not possible to distribute charges equally when total amount is zero, please set 'Distribute Charges Based On' as 'Quantity'",总金额为零时无法按金额分摊费用,请将'费用分摊基准'设为'数量', +Item Code (Final Product),物料编码(最终产品), +Item Group wise Discount,按物料组的折扣, +Item Price Settings,物料价格参数设置, +"Item Price appears multiple times based on Price List, Supplier/Customer, Currency, Item, Batch, UOM, Qty, and Dates.",物料价格可能基于价格表、供应商/客户、币种、物料、批次、单位、数量及日期重复出现, +Item Reference,物料引用, +Item Warehouse based reposting has been enabled.,已启用基于物料仓库的重过账, +Item and Warehouse,物料与仓库, +Item is removed since no serial / batch no selected.,因未选择序列/批次号,物料已被移除, +Item qty can not be updated as raw materials are already processed.,因原材料已处理,物料数量不可更新, +Item rate has been updated to zero as Allow Zero Valuation Rate is checked for item {0},因物料{0}允许零估价率,物料单价已更新为零, +Item valuation reposting in progress. Report might show incorrect item valuation.,正在进行物料估价重过账,报表可能显示错误估价, +Item {0} cannot be added as a sub-assembly of itself,物料{0}不能作为自身的子装配件添加, +Item {0} cannot be ordered more than {1} against Blanket Order {2}.,物料{0}在总括订单{2}下不可订购超过{1}, +Item {0} entered multiple times.,物料{0}重复输入, +Item {0} is already reserved/delivered against Sales Order {1}.,物料{0}已针对销售订单{1}预留/交货, +Item {0} must be a Non-Stock Item,物料{0}必须为非库存物料, +Item {0} not found in 'Raw Materials Supplied' table in {1} {2},在{1} {2}的'供应的原材料'表中未找到物料{0}, +Item {0} not found.,未找到物料{0}, +Item {} does not exist.,物料{}不存在, +Items & Pricing,物料与定价, +Items Catalogue,物料目录, +Items cannot be updated as Subcontracting Order is created against the Purchase Order {0}.,因已针对采购订单{0}创建外协订单,物料不可更新, +Items rate has been updated to zero as Allow Zero Valuation Rate is checked for the following items: {0},因以下物料{0}允许零估价率,其单价已更新为零, +Items to Be Repost,待重过账物料, +Items to Order and Receive,待订购与接收物料, +Items to Reserve,待预留物料, +Items {0} do not exist in the Item master.,物料主数据中不存在{0}, +JAN,一月, +Job Capacity,作业产能, +Job Card Operation,作业卡工序, +Job Card Scheduled Time,作业卡计划时间, +Job Card Scrap Item,作业卡废品, +Job Card and Capacity Planning,作业卡与产能计划, +Job Cards,作业卡列表, +Job Paused,作业已暂停, +Job Worker,作业人员, +Job Worker Address,作业人员地址, +Job Worker Address Details,作业人员地址明细, +Job Worker Contact,作业人员联系方式, +Job Worker Delivery Note,作业人员交货单, +Job Worker Name,作业人员姓名, +Job Worker Warehouse,作业人员仓库, +Job: {0} has been triggered for processing failed transactions,作业:{0}已触发处理失败事务, +Joining,入职, +Journal Entries,日记账分录, +Journal Entry for Asset scrapping cannot be cancelled. Please restore the Asset.,资产报废的日记账分录不可取消,请恢复资产, +Journal Entry type should be set as Depreciation Entry for asset depreciation,资产折旧的日记账类型应设为折旧分录, +Journal entries have been created,已创建日记账分录, +Journals,日记账, +Key,键值, +Kindly cancel the Manufacturing Entries first against the work order {0}.,请先取消工单{0}相关的生产分录, +LIFO,后进先出法, +Last GL Entry update was done {}. This operation is not allowed while system is actively being used. Please wait for 5 minutes before retrying.,总账分录最后更新于{}。系统使用期间不允许此操作,请5分钟后重试, +"Last Name, Email or Phone/Mobile of the user are mandatory to continue.",必须填写用户的姓氏、邮箱或电话/手机号才能继续, +Last transacted,最后交易时间, +Lead -> Prospect,线索->潜在客户, +Lead Conversion Time,线索转化时间, +Lead Owner cannot be same as the Lead Email Address,线索负责人不能与线索邮箱地址相同, +Lead {0} has been added to prospect {1}.,线索{0}已添加至潜在客户{1}, +Leaderboard,排行榜, +Leads,线索列表, +Learn Accounting,学习会计, +Learn Inventory Management,学习库存管理, +Learn Manufacturing,学习生产管理, +Learn Procurement,学习采购管理, +Learn Project Management,学习项目管理, +Learn Sales Management,学习销售管理, +"Learn about Common Party","学习 共同方", +"Leave blank for home. +This is relative to site URL, for example ""about"" will redirect to ""https://yoursitename.com/about""","主页留空。 +这是相对于网站 URL 而言的,例如 ""about ""将重定向到 ""https://yoursitename.com/about""", +Ledger Health,账本健康状态, +Ledger Health Monitor,账本健康监控器, +Ledger Health Monitor Company,账本健康监控公司, +Ledger Merge,分类账合并, +Ledger Merge Accounts,分类账合并账户, +Ledgers,分类账集, +Left Child,左子节点, +Legend,图例, +Length,长度, +Length (cm),长度(厘米), +Level (BOM),层级(物料清单), +Limit timeslot for Stock Reposting,库存重过账时间窗口限制, +Limits don't apply on,限制不适用于, +Link a new bank account,关联新银行账户, +Link with Customer,关联客户, +Link with Supplier,关联供应商, +Linked with submitted documents,与已提交单据关联, +Linking Failed,关联失败, +Linking to Customer Failed. Please try again.,客户关联失败,请重试, +Linking to Supplier Failed. Please try again.,供应商关联失败,请重试, +Loading Invoices! Please Wait...,正在加载发票,请稍候..., +Loading import file...,正在加载导入文件..., +Locked,已锁定, +Log Entries,日志条目, +Log the selling and buying rate of an Item,记录物料的买卖汇率, +Lost Quotations,丢失报价单集, +Lost Quotations %,丢失报价率%, +Lost Reasons are required in case opportunity is Lost.,商机丢失时必须填写原因, +Lost Value,损失金额, +Lost Value %,损失金额占比%, +Machine Type,设备类型, +Main Cost Center,主成本中心, +Main Cost Center {0} cannot be entered in the child table,主成本中心{0}不能输入子表, +Maintain Asset,维护资产, +Maintenance Details,维护详情, +Make ,创建, +Make Asset Movement,创建资产转移, +Make Quotation,创建报价单, +Make Return Entry,创建退货分录, +Make Serial No / Batch from Work Order,从工单生成序列号/批次, +Make {0} Variant,创建{0}变体, +Make {0} Variants,创建{0}变体集, +Making Journal Entries against advance accounts: {0} is not recommended. These Journals won't be available for Reconciliation.,不建议针对预支账户{0}创建日记账,这些日记账不可用于对账, +Manage,管理, +Mandatory Accounting Dimension,必填会计维度, +Mandatory Depends On,必填依赖项, +Mandatory Field,必填字段, +Mandatory Section,必填部分, +Manual Inspection,人工检验, +Manufacturing Type,生产类型, +Mapping Purchase Receipt ...,正在映射采购收货单..., +Mapping Subcontracting Order ...,正在映射外协订单..., +Mapping {0} ...,正在映射{0}..., +Margin View,边际视图, +Mark As Closed,标记为已关闭, +Material Returned from WIP,从在制品退回物料, +Material Transfer (In Transit),物料转移(在途), +Materials are already received against the {0} {1},已根据{0}{1}接收物料, +Materials needs to be transferred to the work in progress warehouse for the job card {0},需要将物料转移到工单{0}的在制品仓库, +Max Qty (As Per Stock UOM),最大数量(按库存单位), +Maximum Net Rate,最高净费率, +Maximum Payment Amount,最大付款金额, +Maximum Value,最大值, +Maximum quantity scanned for item {0}.,已扫描物料{0}的最大数量, +Meeting,会议, +Mention if non-standard Receivable account,若使用非标准应收账户需注明, +Merge Invoices Based On,合并发票依据, +Merge Progress,合并进度, +Merge Similar Account Heads,合并相似账户科目, +Merge taxes from multiple documents,合并多单据的税款, +Merged,已合并, +"Merging is only possible if following properties are same in both records. Is Group, Root Type, Company and Account Currency",合并要求两条记录的以下属性相同:是否组、根类型、公司和账户货币, +Merging {0} of {1},正在合并{1}的{0}, +Min Qty (As Per Stock UOM),最小数量(按库存单位), +Min Qty should be greater than Recurse Over Qty,最小数量应大于递归数量, +Minimum Net Rate,最低净费率, +Minimum Payment Amount,最小付款金额, +Minimum Value,最小值, +Mismatch,不匹配, +Missing,缺失, +Missing Asset,缺少资产, +Missing Cost Center,缺少成本中心, +Missing Default in Company,公司缺少默认值, +Missing Finance Book,缺少财务账簿, +Missing Finished Good,缺少成品, +Missing Formula,缺少公式, +Missing Item,缺少物料, +Missing Items,缺少物料项, +Missing Payments App,缺少支付应用, +Missing Serial No Bundle,缺少序列号包, +Missing value,缺失值, +Mobile: ,手机:, +Modified By,修改人, +Modified On,修改日期, +Module Settings,模块设置, +Monitor for Last 'X' days,监控最近'X'天, +More/Less than 12 months.,超过/不足12个月, +Move Stock,库存调拨, +Move to Cart,加入购物车, +Movement,库存移动, +Moving up in tree ...,在树状结构中上移..., +Multi-level BOM Creator,多层物料清单生成器, +Multiple Loyalty Programs found for Customer {}. Please select manually.,发现客户{}存在多个忠诚度计划,请手动选择, +Multiple Warehouse Accounts,多仓库科目, +Multiple items cannot be marked as finished item,多个物料不能同时标记为成品, +Must be a publicly accessible Google Sheets URL and adding Bank Account column is necessary for importing via Google Sheets,必须是可公开访问的Google表格URL,且需添加银行账户列以便通过Google表格导入, +Named Place,指定地点, +Naming Series and Price Defaults,命名规则与价格默认值, +Naming Series is mandatory,命名规则为必填项, +Negative Batch Quantity,负批次数量, +Net Purchase Amount,采购净额, +Net total calculation precision loss,净总计计算精度损失, +New Balance In Account Currency,账户币种新余额, +New Event,新建事件, +New Note,新建备注, +New Task,新建任务, +New Version,新版本, +Newsletter,新闻简报, +No Answer,未答复, +No Customers found with selected options.,按所选条件未找到客户, +No Items selected for transfer.,未选择待转移物料, +No Matching Bank Transactions Found,未找到匹配的银行交易, +No Notes,无备注, +No Outstanding Invoices found for this party,未找到该交易方的未结发票, +No POS Profile found. Please create a New POS Profile first,未找到POS配置,请先创建新POS配置, +No Records for these settings.,此设置下无记录, +No Serial / Batches are available for return,无可用退换货的序列号/批次, +No Stock Available Currently,当前无可用库存, +No Summary,无摘要, +No Tax Withholding data found for the current posting date.,当前过账日期未找到代扣税数据, +No Terms,无条款, +No Unreconciled Invoices and Payments found for this party and account,未找到该交易方和账户的未对账发票及付款, +No Unreconciled Payments found for this party,未找到该交易方的未对账付款, +No Work Orders were created,未创建工单, +No additional fields available,无额外字段可用, +No billing email found for customer: {0},未找到客户{0}的账单邮箱, +No data found. Seems like you uploaded a blank file,未找到数据,可能上传了空白文件, +No employee was scheduled for call popup,未安排员工进行来电弹窗, +No failed logs,无失败日志, +No item available for transfer.,无可用转移物料, +No items are available in sales orders {0} for production,销售订单{0}中无可用生产物料, +No items are available in the sales order {0} for production,销售订单{0}中无可用生产物料, +No items in cart,购物车中无物料, +No matches occurred via auto reconciliation,自动对账未匹配到记录, +No more children on Left,左侧无更多子节点, +No more children on Right,右侧无更多子节点, +No of Docs,单据数量, +No of Employees,员工数量, +No of Months (Expense),月数(费用), +No of Months (Revenue),月数(收入), +No open event,无进行中事件, +No open task,无进行中任务, +No outstanding {0} found for the {1} {2} which qualify the filters you have specified.,根据指定筛选条件,未找到符合的{1}{2}的未结{0}, +No primary email found for customer: {0},未找到客户{0}的主邮箱, +No recent transactions found,未找到近期交易, +No records found in Allocation table,分配表中无记录, +No records found in the Invoices table,发票表中无记录, +No records found in the Payments table,付款表中无记录, +No stock transactions can be created or modified before this date.,此日期前不可创建或修改库存交易, +No {0} Accounts found for this company.,本公司未找到{0}科目, +No.,编号, +No. of Employees,员工人数, +No. of parallel job cards which can be allowed on this workstation. Example: 2 would mean this workstation can process production for two Work Orders at a time.,本工作站允许的并行作业卡数量。例如:2表示该工作站可同时处理两个工单的生产, +Note: Automatic log deletion only applies to logs of type Update Cost,注:自动日志删除仅适用于更新成本类型的日志, +"Note: To merge the items, create a separate Stock Reconciliation for the old item {0}",注:要合并物料,请为旧物料{0}创建单独的库存对账, +Notes HTML,备注HTML, +Notification,通知, +Notification Settings,通知设置, +Notify Reposting Error to Role,向角色通知重新过账错误, +Number of Days,天数, +Numeric,数值型, +Numeric Inspection,数值检测, +Off,关闭, +Offsetting Account,抵销科目, +Offsetting for Accounting Dimension,会计维度抵销, +Oldest Of Invoice Or Advance,最早发票或预付款, +On Paid Amount,基于已付金额, +On This Date,在此日期, +On Track,正常进行, +On enabling this cancellation entries will be posted on the actual cancellation date and reports will consider cancelled entries as well,启用后,取消分录将在实际取消日期过账,报表将包含已取消分录, +"On expanding a row in the Items to Manufacture table, you'll see an option to 'Include Exploded Items'. Ticking this includes raw materials of the sub-assembly items in the production process.",展开待生产物料表格行时,将显示'包含展开项'选项。勾选后将在生产过程中包含子装配件的原材料, +"On submission of the stock transaction, system will auto create the Serial and Batch Bundle based on the Serial No / Batch fields.",提交库存交易时,系统将根据序列号/批次字段自动创建序列号和批次组合, +Once the Work Order is Closed. It can't be resumed.,工单关闭后将无法恢复, +Only 'Payment Entries' made against this advance account are supported.,仅支持针对本预支账户的付款凭证, +Only CSV and Excel files can be used to for importing data. Please check the file format you are trying to upload,仅支持CSV和Excel文件格式导入数据,请检查上传文件格式, +Only Deduct Tax On Excess Amount ,仅对超额部分扣税, +Only Include Allocated Payments,仅包含已分配付款, +Only Parent can be of type {0},只有上级可以是{0}类型, +Only applies for Normal Payments,仅适用于正常付款, +Only existing assets,仅现有资产, +Only one {0} entry can be created against the Work Order {1},每个工单{1}仅能创建一个{0}条目, +"Only values between [0,1) are allowed. Like {0.00, 0.04, 0.09, ...} +Ex: If allowance is set at 0.07, accounts that have balance of 0.07 in either of the currencies will be considered as zero balance account","仅允许 [0,1) 之间的值。例如 {0.00, 0.04, 0.09, ...} +例如:如果限额设置为 0.07,则任一货币余额为 0.07 的账户将被视为零余额账户", +Only {0} are supported,仅支持{0}, +Open Activities HTML,打开活动HTML, +Open Call Log,打开通话记录, +Open Event,打开事件, +Open Events,打开事件, +Open Sales Orders,打开销售订单, +Open Task,打开任务, +Open Tasks,打开任务, +Open Work Order {0},打开工单{0}, +Opening & Closing,期初与期末, +Opening Accumulated Depreciation must be less than or equal to {0},期初累计折旧必须小于等于{0}, +Opening Entry can not be created after Period Closing Voucher is created.,创建期间结账凭证后不可创建期初凭证, +"Opening Invoice has rounding adjustment of {0}.

'{1}' account is required to post these values. Please set it in Company: {2}.

Or, '{3}' can be enabled to not post any rounding adjustment.",期初发票存在{0}的舍入调整。

需设置'{1}'科目以过账这些值,请在公司{2}中设置。

或启用'{3}'以不过账任何舍入调整, +Opening Number of Booked Depreciations,期初已计提折旧次数, +Opening Purchase Invoices have been created.,已创建期初采购发票, +Opening Sales Invoices have been created.,已创建期初销售发票, +Operating Cost Per BOM Quantity,单位BOM数量运营成本, +Operation time does not depend on quantity to produce,工序时间与生产数量无关, +Opportunity Amount (Company Currency),商机金额(公司货币), +Opportunity Owner,商机负责人, +Opportunity Source,商机来源, +Opportunity Summary by Sales Stage,按销售阶段汇总商机, +Opportunity Summary by Sales Stage ,按销售阶段汇总商机, +Opportunity Value,商机价值, +Order Date,订单日期, +Order No,订单编号, +Order Status,订单状态, +Other Info,其他信息, +Out of stock,缺货, +Outstanding (Company Currency),未清金额(公司货币), +Over Picking Allowance,超领料容差, +Over Receipt,超收, +Over Receipt/Delivery of {0} {1} ignored for item {2} because you have {3} role.,因您具有{3}角色,物料{2}的{0} {1}超收/交付已被忽略, +Over Transfer Allowance,超调拨容差, +Overbilling of {0} {1} ignored for item {2} because you have {3} role.,因您具有{3}角色,物料{2}的{0} {1}超计费已被忽略, +Overbilling of {} ignored because you have {} role.,因您具有{}角色,{}超计费已被忽略, +Overdue Payment,逾期付款, +Overdue Payments,逾期付款项, +Overdue Tasks,逾期任务, +Overview,概览, +PDF Name,PDF名称, +POS Closing Failed,销售点结算失败, +POS Closing failed while running in a background process. You can resolve the {0} and retry the process again.,后台进程运行期间销售点结算失败。请解决{0}后重试, +POS Invoice is already consolidated,销售点发票已合并, +POS Invoice is not submitted,销售点发票未提交, +POS Invoice should have the field {0} checked.,销售点发票应勾选字段{0}, +POS Invoices will be consolidated in a background process,销售点发票将在后台进程合并, +POS Invoices will be unconsolidated in a background process,销售点发票将在后台进程解除合并, +POS Profile doesn't match {},销售点配置不匹配{}, +POS Profile {} contains Mode of Payment {}. Please remove them to disable this mode.,销售点配置{}包含付款方式{}。请移除以禁用该方式, +POS Search Fields,销售点搜索字段, +POS Setting,销售点设置, +PZN,药品中央编号, +Package No(s) already in use. Try from Package No {0},包裹号已被使用。请从包裹号{0}开始尝试, +Packaging Slip From Delivery Note,交货单生成装箱单, +Packed Items cannot be transferred internally,已打包物料不可内部调拨, +Packed Qty,已打包数量, +Page Break After Each SoA,每份对账单后分页, +Paid Amount After Tax,税后已付金额, +Paid Amount After Tax (Company Currency),税后已付金额(公司货币), +Paid From Account Type,付款来源账户类型, +Paid To Account Type,付款目标账户类型, +Pallets,托盘, +Parameter Group,参数组, +Parameter Group Name,参数组名称, +Parcel Template,包裹模板, +Parcel Template Name,包裹模板名称, +Parcel weight cannot be 0,包裹重量不可为0, +Parcels,包裹, +Parent Account Missing,上级科目缺失, +Parent Document,上级单据, +Parent Item {0} must not be a Fixed Asset,上级物料{0}不能为固定资产, +Parent Row No,上级行号, +Parent Row No not found for {0},未找到{0}的上级行号, +Parent Task {0} is not a Template Task,上级任务{0}非模板任务, +Parsing Error,解析错误, +Partial Material Transferred,部分物料已转移, +Partial Payment in POS Invoice is not allowed.,销售点发票不允许部分付款, +Partial Stock Reservation,部分库存保留, +Partial Success,部分成功, +"Partial stock can be reserved. For example, If you have a Sales Order of 100 units and the Available Stock is 90 units then a Stock Reservation Entry will be created for 90 units. ",可保留部分库存。例如:若销售订单为100单位,可用库存90单位,则将创建90单位的库存保留记录, +Partially Delivered,部分交付, +Partially Reconciled,部分对账, +Partially Reserved,部分保留, +Partly Paid,部分支付, +Partly Paid and Discounted,部分支付并折让, +Partnership,合伙企业, +Party Account No. (Bank Statement),交易方账号(银行对账单), +Party Account {0} currency ({1}) and document currency ({2}) should be same,交易方账户{0}币种({1})应与单据币种({2})一致, +Party IBAN (Bank Statement),交易方国际银行账号(银行对账单), +Party Item Code,交易方物料编码, +Party Link,交易方链接, +Party Name/Account Holder (Bank Statement),交易方名称/账户持有人(银行对账单), +Party Specific Item,交易方特定物料, +Party Type and Party can only be set for Receivable / Payable account

{0},交易方类型和交易方仅可设置应收/应付账户

{0}, +Party Type and Party is required for Receivable / Payable account {0},应收/应付账户{0}必须设置交易方类型和交易方, +Party can only be one of {0},交易方只能是{0}之一, +Passport Details,护照详情, +Pause Job,暂停任务, +Paused,已暂停, +Pay,支付,Amount +Payment Amount (Company Currency),付款金额(公司货币), +"Payment Entry {0} is linked against Order {1}, check if it should be pulled as advance in this invoice.",付款分录{0}关联订单{1},请检查是否应作为预付款拉入本发票, +Payment Ledger,付款分类账, +Payment Ledger Balance,付款分类账余额, +Payment Ledger Entry,付款分类账分录, +Payment Limit,付款限额, +Payment Reconciliation Allocation,付款对账分配, +Payment Reconciliation Job: {0} is running for this party. Can't reconcile now.,付款对账任务:{0}正在运行,无法对账, +Payment Reconciliation Settings,付款对账设置, +Payment Request Outstanding,未结付款请求, +Payment Request created from Sales Order or Purchase Order will be in Draft status. When disabled document will be in unsaved state.,销售订单或采购订单生成的付款请求将处于草稿状态。禁用后单据将处于未保存状态, +Payment Request is already created,付款请求已创建, +Payment Request took too long to respond. Please try requesting for payment again.,付款请求响应超时,请重试, +Payment Requests cannot be created against: {0},无法针对以下类型创建付款请求:{0}, +Payment Status,付款状态, +Payment Term Outstanding,未结付款条款, +Payment Terms Status for Sales Order,销售订单付款条款状态, +Payment Terms from orders will be fetched into the invoices as is,订单中的付款条款将原样带入发票, +Payment Unlink Error,付款解除关联错误, +Payment of {0} received successfully.,成功接收{0}付款, +Payment of {0} received successfully. Waiting for other requests to complete...,成功接收{0}付款,等待其他请求完成..., +Payment request failed,付款请求失败, +Payment term {0} not used in {1},付款条款{0}未在{1}中使用, +Pending processing,待处理, +Per Received,每接收, +Percentage (%),百分比(%), +Percentage you are allowed to order beyond the Blanket Order quantity.,允许超出总括订单数量的订购百分比, +Percentage you are allowed to sell beyond the Blanket Order quantity.,允许超出总括订单数量的销售百分比, +Period Closed,期间已关闭, +Period Closing Entry For Current Period,本期关账分录, +Period Closing Settings,期间关账设置, +Period Details,期间明细, +Period End Date cannot be greater than Fiscal Year End Date,期间结束日期不可超过财年结束日期, +Period Start Date cannot be greater than Period End Date,期间开始日期不可超过结束日期, +Period Start Date must be {0},期间开始日期必须为{0}, +Period To Date,当期至今, +Period_from_date,期间起始日期, +Phone Ext.,分机号, +Pick List Incomplete,领料单未完成, +Pick Manually,手动拣选, +Pick Serial / Batch Based On,按序列号/批次拣选, +Pick Serial / Batch No,拣选序列/批次号, +Picked Qty (in Stock UOM),已拣数量(库存单位), +Pickup,提货, +Pickup Contact Person,提货联系人, +Pickup Date,提货日期, +Pickup Date cannot be before this day,提货日期不能早于当日, +Pickup From,提货自, +Pickup To time should be greater than Pickup From time,提货截止时间应晚于起始时间, +Pickup Type,提货类型, +Pickup from,提货起始时间, +Pickup to,提货截止时间, +Pipeline By,管道分类, +Plaid Link Failed,Plaid链接失败, +Plaid Link Refresh Required,需刷新Plaid链接, +Plaid Link Updated,Plaid链接已更新, +Plan to Request Qty,计划申请数量, +Plant Dashboard,工厂看板, +Plant Floor,车间现场, +Please Set Priority,请设置优先级, +Please Specify Account,请指定账户, +Please add 'Supplier' role to user {0}.,请为用户{0}添加'供应商'角色, +Please add Request for Quotation to the sidebar in Portal Settings.,请在门户设置中将报价请求添加到侧边栏, +Please add Root Account for - {0},请为-{0}添加根账户, +Please add atleast one Serial No / Batch No,请至少添加一个序列号/批次号, +Please add the Bank Account column,请添加银行账户列, +Please add the account to root level Company - {0},请将账户添加至根级公司-{0}, +Please add {1} role to user {0}.,请为用户{0}添加{1}角色, +Please adjust the qty or edit {0} to proceed.,请调整数量或编辑{0}以继续, +Please attach CSV file,请附加CSV文件, +Please cancel and amend the Payment Entry,请取消并修改付款分录, +Please cancel payment entry manually first,请先手动取消付款分录, +Please cancel related transaction.,请取消相关交易。, +Please check Process Deferred Accounting {0} and submit manually after resolving errors.,请检查处理递延会计{0},解决错误后手动提交, +Please check either with operations or FG Based Operating Cost.,请检查工序或基于成品的运营成本, +Please check the error message and take necessary actions to fix the error and then restart the reposting again.,请检查错误信息并采取必要措施修复错误,然后重新启动重新过账, +Please check your email to confirm the appointment,请检查您的电子邮件以确认预约, +Please contact any of the following users to extend the credit limits for {0}: {1},请联系以下用户以延长{0}的信用额度:{1}, +Please contact any of the following users to {} this transaction.,请联系以下用户以{}此交易, +Please contact your administrator to extend the credit limits for {0}.,请联系管理员延长{0}的信用额度, +Please create Landed Cost Vouchers against Invoices that have 'Update Stock' enabled.,请对启用'更新库存'的发票创建到岸成本凭证, +Please create a new Accounting Dimension if required.,如需,请新建会计维度, +Please create purchase from internal sale or delivery document itself,请通过内部销售或交货单据创建采购, +"Please delete Product Bundle {0}, before merging {1} into {2}",在合并{1}到{2}前,请先删除产品套装{0}, +Please do not book expense of multiple assets against one single Asset.,请勿将多个资产的费用记入单一资产, +Please enable Use Old Serial / Batch Fields to make_bundle,请启用'使用旧序列/批次字段'以生成套装, +Please enable only if the understand the effects of enabling this.,仅在理解启用此功能的影响后启用, +Please enable {0} in the {1}.,请在{1}中启用{0}, +Please enable {} in {} to allow same item in multiple rows,请在{}中启用{}以允许同一物料多行显示, +Please ensure that the {0} account is a Balance Sheet account. You can change the parent account to a Balance Sheet account or select a different account.,请确保{0}账户为资产负债表账户。您可将上级账户改为资产负债表账户或选择其他账户, +Please ensure that the {0} account {1} is a Payable account. You can change the account type to Payable or select a different account.,请确保{0}账户{1}为应付账户。您可更改账户类型为应付或选择其他账户, +Please ensure {} account is a Balance Sheet account.,请确保{}账户为资产负债表账户, +Please ensure {} account {} is a Receivable account.,请确保{}账户{}为应收账户, +Please enter Root Type for account- {0},请输入账户-{0}的根类型, +Please enter Serial Nos,请输入序列号, +Please enter Shipment Parcel information,请输入运输包裹信息, +Please enter Stock Items consumed during the Repair.,请输入维修期间消耗的库存物料, +Please enter mobile number first.,请先输入手机号码, +Please enter quantity for item {0},请输入物料{0}的数量, +Please enter serial nos,请输入序列号, +"Please first set Last Name, Email and Phone for the user",请先设置用户的姓氏、电子邮件和电话, +Please fix overlapping time slots for {0},请修复{0}的时间段重叠, +Please fix overlapping time slots for {0}.,请修复{0}的时间段重叠, +Please import accounts against parent company or enable {} in company master.,请根据母公司导入账户或在主公司中启用{}, +"Please keep one Applicable Charges, when 'Distribute Charges Based On' is 'Distribute Manually'. For more charges, please create another Landed Cost Voucher.",当'费用分配依据'为'手动分配'时,请保留一个适用费用。更多费用请新建到岸成本凭证, +Please make sure the file you are using has 'Parent Account' column present in the header.,请确保文件标题包含'上级账户'列, +Please mention 'Weight UOM' along with Weight.,请同时注明'重量单位'和重量, +Please mention '{0}' in Company: {1},请在公司{1}中注明'{0}', +Please mention the Current and New BOM for replacement.,请注明要替换的当前和新的物料清单, +Please rectify and try again.,请更正后重试, +Please refresh or reset the Plaid linking of the Bank {}.,请刷新或重置银行{}的Plaid链接, +Please save before proceeding.,请先保存再继续, +Please select Bank Account,请选择银行账户, +Please select Finished Good Item for Service Item {0},请为服务项{0}选择产成品, +Please select Serial/Batch Nos to reserve or change Reservation Based On to Qty.,请选择要保留的序列/批次号或将保留依据改为数量, +Please select Subcontracting Order instead of Purchase Order {0},请选择委外订单而非采购订单{0}, +Please select Unrealized Profit / Loss account or add default Unrealized Profit / Loss account account for company {0},请选择未实现损益账户或为公司{0}添加默认未实现损益账户, +Please select a Subcontracting Purchase Order.,请选择委外采购订单, +Please select a Warehouse,请选择仓库, +Please select a Work Order first.,请先选择工单, +Please select a country,请选择国家, +Please select a customer for fetching payments.,请选择客户以获取付款, +Please select a date,请选择日期, +Please select a date and time,请选择日期和时间, +Please select a row to create a Reposting Entry,请选择行以创建重新过账分录, +Please select a supplier for fetching payments.,请选择供应商以获取付款, +Please select a valid Purchase Order that has Service Items.,请选择包含服务项目的有效采购订单, +Please select a valid Purchase Order that is configured for Subcontracting.,请选择配置为委外的有效采购订单, +Please select an item code before setting the warehouse.,请先设置物料编码再设置仓库, +Please select either the Item or Warehouse or Warehouse Type filter to generate the report.,请选择物料、仓库或仓库类型筛选条件以生成报表, +Please select items,请选择物料, +Please select items to reserve.,请选择要保留的物料, +Please select items to unreserve.,请选择要取消保留的物料, +Please select only one row to create a Reposting Entry,请选择单行创建重新过账分录, +Please select rows to create Reposting Entries,请选择行以创建重新过账分录, +Please select the required filters,请选择必要筛选条件, +Please select valid document type.,请选择有效单据类型, +Please set '{0}' in Company: {1},请在公司{1}设置'{0}', +Please set Account,请设置账户, +Please set Accounting Dimension {} in {},请在{}设置会计维度{}, +Please set Email/Phone for the contact,请为联系人设置电子邮件/电话, +Please set Fiscal Code for the customer '%s',请为客户'%s'设置税号, +Please set Fiscal Code for the public administration '%s',请为公共机构'%s'设置税号, +Please set Fixed Asset Account in {} against {}.,请在{}中为{}设置固定资产账户, +Please set Opening Number of Booked Depreciations,请设置已入账折旧的期初数, +Please set Parent Row No for item {0},请设置物料{0}的上级行号, +Please set Root Type,请设置根类型, +Please set Tax ID for the customer '%s',请为客户'%s'设置税号, +Please set VAT Accounts in {0},请在{0}设置增值税账户, +"Please set Vat Accounts for Company: ""{0}"" in UAE VAT Settings","请在 UAE 增值税设置中设置公司的增值税账户: ""{0}""", +Please set a Cost Center for the Asset or set an Asset Depreciation Cost Center for the Company {},请为资产设置成本中心或为公司{}设置资产折旧成本中心, +Please set a default Holiday List for Company {0},请为公司{0}设置默认假期列表, +Please set an Address on the Company '%s',请为公司'%s'设置地址, +Please set an Expense Account in the Items table,请在物料表中设置费用账户, +Please set both the Tax ID and Fiscal Code on Company {0},请为公司{0}同时设置税号和财政代码, +Please set default Exchange Gain/Loss Account in Company {},请在公司{}设置默认汇兑损益账户, +Please set default Expense Account in Company {0},请在公司{0}设置默认费用账户, +Please set default cost of goods sold account in company {0} for booking rounding gain and loss during stock transfer,请在公司{0}设置默认销售成本账户以记录库存转移中的四舍五入损益, +Please set filters,请设置筛选条件, +Please set one of the following:,请设置以下其中一项:, +Please set the cost center field in {0} or setup a default Cost Center for the Company.,请在{0}设置成本中心字段或为公司设置默认成本中心, +Please set {0} first.,请先设置{0}, +Please set {0} in BOM Creator {1},请在物料清单创建器{1}中设置{0}, +Please set {0} in Company {1} to account for Exchange Gain / Loss,请在公司{1}设置{0}以核算汇兑损益, +"Please set {0} to {1}, the same account that was used in the original invoice {2}.",请将{0}设为{1},与原发票{2}使用的账户相同, +Please setup and enable a group account with the Account Type - {0} for the company {1},请为公司{1}设置并启用账户类型为{0}的组账户, +Please share this email with your support team so that they can find and fix the issue.,请将此邮件转发给支持团队以便排查和解决问题, +Please specify a {0} first.,请先指定{0}, +Please try again in an hour.,请一小时后重试, +Please update Repair Status.,请更新维修状态, +Portal User,门户用户, +Portal Users,门户用户, +Posting Date Inheritance for Exchange Gain / Loss,汇兑损益的过账日期继承, +Posting Datetime,过账时间, +Powered by {0},由{0}驱动, +Preview Required Materials,预览所需物料, +"Previous Year is not closed, please close it first",上年度未结账,请先结账, +Price ({0}),价格({0}), +Price List Defaults,价格表默认值, +Price Per Unit ({0}),单价({0}), +Price is not set for the item.,未设置物料价格, +Primary Address and Contact,主要地址和联系方式, +Primary Contact,主要联系人, +Primary Party,主要政党, +Primary Role,主要角色, +Print Format Builder,打印格式生成器, +Print Receipt on Order Complete,订单完成时打印收据, +Print Style,打印样式, +Printed on {0},打印于{0}, +Printing,打印, +Priority cannot be lesser than 1.,优先级不能小于1, +Priority is mandatory,优先级为必填项, +Probability,可能性, +Process Loss,加工损耗, +Process Loss Percentage cannot be greater than 100,加工损耗百分比不能超过100, +Process Loss Qty,加工损耗数量, +Process Loss Report,加工损耗报告, +Process Loss Value,加工损耗价值, +Process Payment Reconciliation,处理付款对账, +Process Payment Reconciliation Log,处理付款对账日志, +Process Payment Reconciliation Log Allocations,处理付款对账日志分配, +Process Statement Of Accounts CC,处理抄送账户对账单, +Process Subscription,处理订阅, +Process in Single Transaction,在单事务中处理, +Processed BOMs,已处理物料清单, +Processing Sales! Please Wait...,正在处理销售!请稍候..., +Produced / Received Qty,已生产/已接收数量, +Product Price ID,产品价格ID, +Production Plan Already Submitted,生产计划已提交, +Production Plan Item Reference,生产计划项引用, +Production Plan Qty,生产计划数量, +Production Plan Sub Assembly Item,生产计划子装配项, +Production Plan Sub-assembly Item,生产计划子装配项, +Production Plan Summary,生产计划摘要, +Profile,配置文件, +Profit and Loss Summary,损益汇总, +Progress,进度, +Progress (%),进度(%), +Project Progress:,项目进度:, +Prompt Qty,即时数量, +Prospect,潜在客户, +Prospect Lead,潜在客户线索, +Prospect Opportunity,潜在商机, +Prospect Owner,潜在客户负责人, +Prospect {0} already exists,潜在客户{0}已存在, +Provisional Account,暂记账户, +Provisional Expense Account,暂记费用科目, +Publisher,发布者, +Publisher ID,发布者ID, +Purchase Order Item reference is missing in Subcontracting Receipt {0},分包收货单{0}中缺少采购订单项引用, +Purchase Orders {0} are un-linked,采购订单{0}已取消关联, +Purchase Receipt (Draft) will be auto-created on submission of Subcontracting Receipt.,提交分包收货单时将自动创建采购收货单(草稿), +Purchase Receipt {0} created.,采购收货单{0}已创建, +Purchase Value,采购价值, +Purchases,采购, +Purposes Required,需指定用途, +Putaway Rule,上架规则, +Putaway Rule already exists for Item {0} in Warehouse {1}.,仓库{1}中物料{0}的上架规则已存在, +Qty ,数量, +Qty (Company),数量(公司), +Qty (Warehouse),数量(仓库), +Qty After Transaction,交易后数量, +Qty As Per BOM,按物料清单数量, +Qty Change,数量变更, +Qty In Stock,库存数量, +Qty Per Unit,每单位数量, +"Qty To Manufacture ({0}) cannot be a fraction for the UOM {2}. To allow this, disable '{1}' in the UOM {2}.",待生产数量({0})不能是计量单位{2}的分数。若要允许,请在计量单位{2}中禁用'{1}', +Qty To Produce,待生产数量, +Qty Wise Chart,数量趋势图, +Qty and Rate,数量与费率, +Qty as Per Stock UOM,按库存计量单位的数量, +Qty for which recursion isn't applicable.,不适用递归的数量, +Qty in Stock UOM,库存计量单位数量, +Qty of Finished Goods Item should be greater than 0.,成品项数量应大于0, +Qty to Be Consumed,待消耗数量, +Qty to Build,待构建数量, +Qty to Fetch,待获取数量, +Qty to Produce,待生产数量, +Qualification Status,资质状态, +Qualified,已认证, +Qualified By,认证人, +Qualified on,认证日期, +Quality Inspection Parameter,质量检验参数, +Quality Inspection Parameter Group,质量检验参数组, +Quality Inspection Settings,质量检验设置, +Quality Inspection(s),质量检验, +Quantity (A - B),数量(A - B), +Quantity is required,数量为必填项, +"Quantity must be greater than zero, and less or equal to {0}",数量必须大于零且小于等于{0}, +Quantity to Produce should be greater than zero.,待生产数量应大于零, +Quantity to Scan,待扫描数量, +Quarter {0} {1},第{0}季度 {1}, +Queue Size should be between 5 and 100,队列大小应介于5至100之间, +Quotation Number,报价单编号, +Quoted Amount,报价金额, +Rate Section,费率部分, +Rate of Stock UOM,库存计量单位费率, +Ratios,比率, +Raw Material Cost Per Qty,单位数量原材料成本, +Raw Material Item,原材料项, +Raw Material Value,原材料价值, +Raw Materials Actions,原材料操作, +Raw Materials Warehouse,原材料仓库, +Reached Root,已到达根节点, +Reading Value,读数值, +Reason for hold:,保留原因:, +Rebuild Tree,重建树形结构, +Rebuilding BTree for period ...,正在重建期间B树结构..., +Recalculate Incoming/Outgoing Rate,重新计算进出汇率, +Recalculating Purchase Cost against this Project...,正在重新计算项目采购成本..., +Receivable/Payable Account,应收/应付账户, +Receivable/Payable Account: {0} doesn't belong to company {1},应收/应付账户:{0}不属于公司{1}, +Received Amount After Tax,税后已收金额, +Received Amount After Tax (Company Currency),税后已收金额(公司货币), +Received Amount cannot be greater than Paid Amount,已收金额不能超过已付金额, +Received Qty in Stock UOM,以库存单位计的已收数量, +Recent Orders,近期订单, +Recent Transactions,近期交易, +Reconcile All Serial Nos / Batches,对账所有序列号/批次, +Reconcile Effect On,对账生效时间, +Reconcile on Advance Payment Date,按预付款日期对账, +Reconcile the Bank Transaction,对银行交易进行对账, +Reconciled Entries,已对账分录, +Reconciliation Date,对账日期, +Reconciliation Error Log,对账错误日志, +Reconciliation Logs,对账日志集, +Reconciliation Progress,对账进度, +Reconciliation Queue Size,对账队列大小, +Reconciliation Takes Effect On,对账生效于, +Recording HTML,记录HTML, +Recoverable Standard Rated expenses should not be set when Reverse Charge Applicable is Y,当适用反向征税为'是'时,不可设置可回收标准税率费用, +Recurse Every (As Per Transaction UOM),递归周期(按交易单位), +Recurse Over Qty cannot be less than 0,递归数量不能小于0, +Recursive Discounts with Mixed condition is not supported by the system,系统不支持混合条件的递归折扣, +Reference Date for Early Payment Discount,提前付款折扣的参考日期, +Reference Detail,参考明细, +Reference DocType,参考单据类型, +Reference Exchange Rate,参考汇率, +Reference No,参考号, +Reference number of the invoice from the previous system,旧系统的发票参考号, +References to Sales Invoices are Incomplete,销售发票参考不完整, +References to Sales Orders are Incomplete,销售订单参考不完整, +References {0} of type {1} had no outstanding amount left before submitting the Payment Entry. Now they have a negative outstanding amount.,提交付款前,类型{1}的参考{0}无未清金额,现在其未清金额为负数, +Refresh Google Sheet,刷新Google表格, +Refresh Plaid Link,刷新Plaid链接, +Rejected Serial and Batch Bundle,拒收序列号和批次包, +Rejected Warehouse and Accepted Warehouse cannot be same.,拒收仓库与验收仓库不能相同, +Remarks Column Length,备注栏长度, +Remove Parent Row No in Items Table,移除物料表中的父行号, +Remove SABB Entry,移除SABB条目, +Removing rows without exchange gain or loss,移除无汇兑损益的行, +Repair,维修, +Repair Asset,维修资产, +Repair Details,维修详情, +"Replace a particular BOM in all other BOMs where it is used. It will replace the old BOM link, update cost and regenerate ""BOM Explosion Item"" table as per new BOM. +It also updates latest price in all the BOMs.","在使用BOM的所有其他BOM中替换BOM。 它将替换旧的 BOM 链接,更新成本,并按照新建BOM 重新生成“BOM Explosion item”表。 +它也更新了所有BOMM的最新价格。", +Report Error,报告错误, +Report Filters,报表筛选条件, +Report View,报表视图, +Repost Accounting Ledger,重新过账会计分类账, +Repost Accounting Ledger Items,重新过账会计分类账项目, +Repost Accounting Ledger Settings,重新过账会计分类账设置, +Repost Allowed Types,允许重新过账的类型, +Repost Error Log,重新过账错误日志, +Repost Item Valuation,重新过账物料估值, +Repost Payment Ledger,重新过账付款分类账, +Repost Payment Ledger Items,重新过账付款分类账项目, +Repost Status,重新过账状态, +Repost has started in the background,后台已开始重新过账, +Repost in background,后台重新过账, +Repost started in the background,后台已启动重新过账, +Reposting Completed {0}%,重新过账已完成{0}%, +Reposting Data File,重新过账数据文件, +Reposting Info,重新过账信息, +Reposting Progress,重新过账进度, +Reposting entries created: {0},已创建重新过账条目:{0}, +Reposting has been started in the background.,后台已启动重新过账, +Reposting in the background.,正在后台重新过账, +Represents a Financial Year. All accounting entries and other major transactions are tracked against the Fiscal Year.,表示一个财年。所有会计分录和主要交易均按财年跟踪, +Request Parameters,请求参数, +Request Timeout,请求超时, +Reservation Based On,预留依据, +Reserve,预留, +Reserve Stock,预留库存, +"Reserved Qty ({0}) cannot be a fraction. To allow this, disable '{1}' in UOM {3}.",预留数量({0})不能为小数。如需允许,请在单位{3}中禁用'{1}', +Reserved Qty for Production Plan,生产计划预留数量, +Reserved Qty for Subcontract,外协预留数量, +Reserved Qty should be greater than Delivered Qty.,预留数量应大于交付数量, +Reserved Serial No.,预留序列号, +Reserved Stock,预留库存, +Reserved Stock for Batch,批次预留库存, +Reserved for POS Transactions,为POS交易预留, +Reserved for Production,为生产预留, +Reserved for Production Plan,为生产计划预留, +Reserved for Sub Contracting,为外协预留, +Reserving Stock...,正在预留库存..., +Reset Company Default Values,重置公司默认值, +Reset Plaid Link,重置Plaid链接, +Reset Raw Materials Table,重置原材料表, +Resolution Due,解决到期日, +Response and Resolution,响应与解决, +Restart,重启, +Restore Asset,恢复资产, +Restrict,限制, +Restrict Items Based On,基于以下限制物料, +Result Key,结果键, +Resume Job,恢复作业, +Resume Timer,恢复计时器, +Retried,已重试, +Retry,重试, +Retry Failed Transactions,重试失败交易, +Return Against,退货依据, +Return Against Subcontracting Receipt,依据外协收货单退货, +Return Components,退货组件, +Return Issued,已发出退货, +Return Qty,退货数量, +Return Qty from Rejected Warehouse,从拒收仓库退货数量, +Return of Components,组件退货, +Returned,已退货, +Returned Against,退货依据, +Returned Qty ,退货数量 , +Returned Qty in Stock UOM,以库存单位计的退货数量, +Returned exchange rate is neither integer not float.,退货汇率既非整型也非浮点型, +Revaluation Journals,重估日记账, +Revaluation Surplus,重估盈余, +Revenue,收入, +Reversal Of,冲销依据, +Right Child,右子节点, +Role Allowed to Create/Edit Back-dated Transactions,允许创建/编辑倒签交易的角色, +Role Allowed to Over Bill ,允许超额开票的角色, +Role Allowed to Over Deliver/Receive,允许超额交付/接收的角色, +Role Allowed to Override Stop Action,允许覆盖停止操作的角色, +Role allowed to bypass Credit Limit,允许绕过信用额度的角色, +Root,根, +"Root Type for {0} must be one of the Asset, Liability, Income, Expense and Equity",{0}的根类型必须是资产、负债、收入、费用或权益, +Round Free Qty,四舍五入免费数量, +Round Off Tax Amount,四舍五入税额, +Round Off for Opening,期初四舍五入, +Round Tax Amount Row-wise,按行四舍五入税额, +Rounding Loss Allowance,四舍五入损失允许值, +Rounding Loss Allowance should be between 0 and 1,四舍五入损失允许值应在0到1之间, +Rounding gain/loss Entry for Stock Transfer,库存转移的四舍五入损益分录, +Row #,行号#, +Row # {0}:,行号{0}:, +Row # {0}: Please add Serial and Batch Bundle for Item {1},行号{0}:请为物料{1}添加序列号和批次包, +Row #{0}: A reorder entry already exists for warehouse {1} with reorder type {2}.,行号{0}:仓库{1}已存在类型为{2}的再订货条目, +Row #{0}: Acceptance Criteria Formula is incorrect.,行号{0}:验收标准公式错误, +Row #{0}: Acceptance Criteria Formula is required.,行号{0}:必须填写验收标准公式, +Row #{0}: Accepted Warehouse and Rejected Warehouse cannot be same,行号{0}:验收仓库与拒收仓库不能相同, +Row #{0}: Accepted Warehouse is mandatory for the accepted Item {1},行号{0}:验收物料{1}必须指定验收仓库, +Row #{0}: Allocated Amount cannot be greater than Outstanding Amount of Payment Request {1},行号{0}:分配金额不能超过付款请求{1}的未清金额, +Row #{0}: Allocated amount:{1} is greater than outstanding amount:{2} for Payment Term {3},行号{0}:付款条款{3}的分配金额{1}超过未清金额{2}, +Row #{0}: Amount must be a positive number,行号#{0}:金额必须为正数, +Row #{0}: BOM is not specified for subcontracting item {0},行号#{0}:外协物料{0}未指定物料清单(BOM), +Row #{0}: Batch No {1} is already selected.,行号#{0}:批次号{1}已被选择, +Row #{0}: Cannot allocate more than {1} against payment term {2},行号#{0}:支付条款{2}的分配金额不能超过{1}, +Row #{0}: Cannot transfer more than Required Qty {1} for Item {2} against Job Card {3},行号#{0}:针对作业卡{3}的物料{2},转移数量不能超过需求数量{1}, +Row #{0}: Consumed Asset {1} cannot be Draft,行号#{0}:消耗资产{1}不能为草稿状态, +Row #{0}: Consumed Asset {1} cannot be cancelled,行号#{0}:消耗资产{1}无法取消, +Row #{0}: Consumed Asset {1} cannot be the same as the Target Asset,行号#{0}:消耗资产{1}不能与目标资产相同, +Row #{0}: Consumed Asset {1} cannot be {2},行号#{0}:消耗资产{1}不能为{2}, +Row #{0}: Consumed Asset {1} does not belong to company {2},行号#{0}:消耗资产{1}不属于公司{2}, +Row #{0}: Cumulative threshold cannot be less than Single Transaction threshold,行号#{0}:累计阈值不能小于单笔交易阈值, +Row #{0}: Dates overlapping with other row,行号#{0}:日期与其他行重叠, +Row #{0}: Default BOM not found for FG Item {1},行号#{0}:产成品{1}未找到默认物料清单(BOM), +Row #{0}: Expense Account not set for the Item {1}. {2},行号#{0}:未为物料{1}设置费用科目。{2}, +Row #{0}: Finished Good Item Qty can not be zero,行号#{0}:产成品数量不能为零, +Row #{0}: Finished Good Item is not specified for service item {1},行号#{0}:服务项{1}未指定产成品, +Row #{0}: Finished Good Item {1} must be a sub-contracted item,行号#{0}:产成品{1}必须为外协物料, +Row #{0}: Finished Good reference is mandatory for Scrap Item {1}.,行号#{0}:废品{1}必须关联产成品, +Row #{0}: For {1} Clearance date {2} cannot be before Cheque Date {3},行号#{0}:{1}的清算日期{2}不能早于支票日期{3}, +"Row #{0}: For {1}, you can select reference document only if account gets credited",行号#{0}:对于{1},仅当科目贷记时才能选择参考单据, +"Row #{0}: For {1}, you can select reference document only if account gets debited",行号#{0}:对于{1},仅当科目借记时才能选择参考单据, +Row #{0}: From Date cannot be before To Date,行号#{0}:起始日期不能早于截止日期, +Row #{0}: Item {1} does not exist,行号#{0}:物料{1}不存在, +"Row #{0}: Item {1} has been picked, please reserve stock from the Pick List.",行号#{0}:物料{1}已拣配,请通过拣配单预留库存, +Row #{0}: Item {1} is not a service item,行号#{0}:物料{1}非服务项, +Row #{0}: Item {1} is not a stock item,行号#{0}:物料{1}非库存物料, +Row #{0}: Only {1} available to reserve for the Item {2},行号#{0}:物料{2}仅可预留{1}, +Row #{0}: Please select Item Code in Assembly Items,行号#{0}:请在组装物料中选择物料编码, +Row #{0}: Please select the BOM No in Assembly Items,行号#{0}:请在组装物料中选择物料清单编号, +Row #{0}: Please select the Sub Assembly Warehouse,行号#{0}:请选择子装配仓库, +Row #{0}: Please update deferred revenue/expense account in item row or default account in company master,行号#{0}:请更新物料行的递延收入/费用科目或公司主数据的默认科目, +Row #{0}: Qty increased by {1},行号#{0}:数量增加了{1}, +Row #{0}: Qty must be a positive number,行号#{0}:数量必须为正数, +Row #{0}: Qty should be less than or equal to Available Qty to Reserve (Actual Qty - Reserved Qty) {1} for Iem {2} against Batch {3} in Warehouse {4}.,行号#{0}:仓库{4}批次{3}物料{2}的预留数量不得超过可预留数量(实际数量-已预留数量){1}, +Row #{0}: Quality Inspection is required for Item {1},行号#{0}:物料{1}需进行质量检验, +Row #{0}: Quality Inspection {1} is not submitted for the item: {2},行号#{0}:物料{2}的质量检验{1}未提交, +Row #{0}: Quality Inspection {1} was rejected for item {2},行号#{0}:物料{2}的质量检验{1}被拒收, +Row #{0}: Quantity to reserve for the Item {1} should be greater than 0.,行号#{0}:物料{1}的预留数量必须大于0, +Row #{0}: Rate must be same as {1}: {2} ({3} / {4}),行号#{0}:汇率必须与{1}一致:{2}({3} / {4}), +Row #{0}: Rejected Qty cannot be set for Scrap Item {1}.,行号#{0}:废品{1}不可设置拒收数量, +Row #{0}: Rejected Warehouse is mandatory for the rejected Item {1},行号#{0}:拒收物料{1}必须指定拒收仓库, +Row #{0}: Scrap Item Qty cannot be zero,行号#{0}:废品数量不能为零, +"Row #{0}: Selling rate for item {1} is lower than its {2}. + Selling {3} should be atleast {4}.

Alternatively, + you can disable selling price validation in {5} to bypass + this validation.","行 #{0}:项目 {1} 的销售率低于它的 {2}。 + 出售 {3} 应至少是 {4}。

或者, + 您可以禁用 {5} 中的售价验证,绕过 + 此验证。", +Row #{0}: Serial No {1} for Item {2} is not available in {3} {4} or might be reserved in another {5}.,行号#{0}:物料{2}的序列号{1}在{3} {4}中不可用,或可能已被其他{5}预留, +Row #{0}: Serial No {1} is already selected.,行号#{0}:序列号{1}已被选择, +Row #{0}: Start Time and End Time are required,行号#{0}:需填写开始时间和结束时间, +Row #{0}: Start Time must be before End Time,行号#{0}:开始时间必须早于结束时间, +Row #{0}: Status is mandatory,行号#{0}:状态为必填项, +Row #{0}: Stock cannot be reserved for Item {1} against a disabled Batch {2}.,行号#{0}:不可为停用批次{2}的物料{1}预留库存, +Row #{0}: Stock cannot be reserved for a non-stock Item {1},行号#{0}:非库存物料{1}不可预留库存, +Row #{0}: Stock cannot be reserved in group warehouse {1}.,行号#{0}:不可在组仓库{1}预留库存, +Row #{0}: Stock is already reserved for the Item {1}.,行号#{0}:物料{1}已预留库存, +Row #{0}: Stock is reserved for item {1} in warehouse {2}.,行号#{0}:仓库{2}中物料{1}的库存已预留, +Row #{0}: Stock not available to reserve for Item {1} against Batch {2} in Warehouse {3}.,行号#{0}:仓库{3}批次{2}的物料{1}无可用库存可预留, +Row #{0}: Stock not available to reserve for the Item {1} in Warehouse {2}.,行号#{0}:仓库{2}中物料{1}无可用库存可预留, +Row #{0}: The warehouse {1} is not a child warehouse of a group warehouse {2},行号#{0}:仓库{1}不是组仓库{2}的子仓库, +Row #{0}: You cannot use the inventory dimension '{1}' in Stock Reconciliation to modify the quantity or valuation rate. Stock reconciliation with inventory dimensions is intended solely for performing opening entries.,行号#{0}:库存对账中不可使用库存维度'{1}'修改数量或估价率,带维度的库存对账仅用于期初录入, +Row #{0}: You must select an Asset for Item {1}.,行号#{0}:必须为物料{1}选择资产, +Row #{0}: {1} is not a valid reading field. Please refer to the field description.,行号#{0}:{1}不是有效读数字段,请参考字段说明, +Row #{0}: {1} of {2} should be {3}. Please update the {1} or select a different account.,行号#{0}:{2}的{1}应为{3},请更新{1}或选择其他科目, +Row #{1}: Warehouse is mandatory for stock Item {0},行号#{1}:库存物料{0}必须指定仓库, +Row #{}: Finance Book should not be empty since you're using multiple.,行号#{}:使用多财务账簿时不可为空, +Row #{}: Please use a different Finance Book.,行号#{}:请使用其他财务账簿, +Row #{}: The original Invoice {} of return invoice {} is not consolidated.,行号#{}:退货发票{}的原始发票{}未合并, +Row #{}: item {} has been picked already.,行号#{}:物料{}已拣配, +Row #{}: {} {} doesn't belong to Company {}. Please select valid {}.,行号#{}:{} {}不属于公司{},请选择有效的{}, +Row No {0}: Warehouse is required. Please set a Default Warehouse for Item {1} and Company {2},行号{0}:必须指定仓库,请为物料{1}和公司{2}设置默认仓库, +Row Number,行号, +Row {0},行号{0}, +"Row {0} picked quantity is less than the required quantity, additional {1} {2} required.",行号{0}拣配数量不足,需额外{1} {2}, +Row {0}# Item {1} cannot be transferred more than {2} against {3} {4},行号{0}# 物料{1}针对{3} {4}的转移数量不可超过{2}, +Row {0}# Item {1} not found in 'Raw Materials Supplied' table in {2} {3},行号{0}# 在{2} {3}的'供应原材料'表中未找到物料{1}, +Row {0}: Accepted Qty and Rejected Qty can't be zero at the same time.,行号{0}:接受数量和拒收数量不能同时为零, +Row {0}: Account {1} and Party Type {2} have different account types,行号{0}:科目{1}与交易方类型{2}的科目类型不一致, +Row {0}: Allocated amount {1} must be less than or equal to invoice outstanding amount {2},行号{0}:分配金额{1}不能超过发票未结金额{2}, +Row {0}: Allocated amount {1} must be less than or equal to remaining payment amount {2},行号{0}:分配金额{1}不能超过剩余付款金额{2}, +"Row {0}: As {1} is enabled, raw materials cannot be added to {2} entry. Use {3} entry to consume raw materials.",行号{0}:启用{1}后不可在{2}分录添加原材料,请使用{3}分录消耗原材料, +Row {0}: Both Debit and Credit values cannot be zero,行号{0}:借贷方金额不能同时为零, +Row {0}: Cost Center {1} does not belong to Company {2},行号{0}:成本中心{1}不属于公司{2}, +Row {0}: Either Delivery Note Item or Packed Item reference is mandatory.,行号{0}:必须关联交货单物料或包装物料, +Row {0}: Expense Head changed to {1} as no Purchase Receipt is created against Item {2}.,行号{0}:因未创建物料{2}的采购收货单,费用科目更改为{1}, +Row {0}: Expense Head changed to {1} because account {2} is not linked to warehouse {3} or it is not the default inventory account,行号{0}:因科目{2}未关联仓库{3}或非默认库存科目,费用科目更改为{1}, +Row {0}: Expense Head changed to {1} because expense is booked against this account in Purchase Receipt {2},行号{0}:因采购收货单{2}已使用科目{1}记账费用,费用科目更改为{1}, +Row {0}: From Warehouse is mandatory for internal transfers,行号{0}:内部调拨必须指定来源仓库, +Row {0}: Item Tax template updated as per validity and rate applied,行号{0}:物料税模板已按有效税率更新, +Row {0}: Item rate has been updated as per valuation rate since its an internal stock transfer,行号{0}:内部调拨时物料单价已按估价率更新, +Row {0}: Item {1} must be a stock item.,行号{0}:物料{1}必须为库存物料, +Row {0}: Item {1} must be a subcontracted item.,行号{0}:物料{1}必须为外协物料, +Row {0}: Item {1}'s quantity cannot be higher than the available quantity.,行号{0}:物料{1}数量不可超过可用数量, +Row {0}: Packed Qty must be equal to {1} Qty.,行号{0}:包装数量必须等于{1}数量, +Row {0}: Packing Slip is already created for Item {1}.,行号{0}:已为物料{1}创建装箱单, +Row {0}: Payment Term is mandatory,行号{0}:支付条款为必填项, +Row {0}: Please provide a valid Delivery Note Item or Packed Item reference.,行号{0}:请提供有效的交货单物料或包装物料引用, +Row {0}: Please select a BOM for Item {1}.,行号{0}:请为物料{1}选择物料清单(BOM), +Row {0}: Please select an active BOM for Item {1}.,行号{0}:请为物料{1}选择有效的物料清单(BOM), +Row {0}: Please select an valid BOM for Item {1}.,行号{0}:请为物料{1}选择有效的物料清单(BOM), +Row {0}: Project must be same as the one set in the Timesheet: {1}.,行号{0}:项目必须与工时表{1}中设置的一致, +Row {0}: Purchase Invoice {1} has no stock impact.,行号{0}:采购发票{1}无库存影响, +Row {0}: Qty cannot be greater than {1} for the Item {2}.,行号{0}:物料{2}数量不可超过{1}, +Row {0}: Qty in Stock UOM can not be zero.,行号{0}:库存单位的数量不可为零, +Row {0}: Qty must be greater than 0.,行号{0}:数量必须大于0, +Row {0}: Quantity cannot be negative.,行号{0}:数量不能为负数, +Row {0}: Shift cannot be changed since the depreciation has already been processed,行号{0}:折旧已处理后不可变更班次, +Row {0}: Target Warehouse is mandatory for internal transfers,行号{0}:内部调拨必须指定目标仓库, +"Row {0}: To set {1} periodicity, difference between from and to date must be greater than or equal to {2}",行号{0}:设置{1}周期时,起止日期差值必须大于等于{2}, +Row {0}: Total Number of Depreciations cannot be less than or equal to Opening Number of Booked Depreciations,行号{0}:总折旧次数不可小于等于已记账折旧的期初次数, +Row {0}: Workstation or Workstation Type is mandatory for an operation {1},行号{0}:工序{1}必须指定工作站或工作站类型, +Row {0}: {1} account already applied for Accounting Dimension {2},行 {0}: {1} 帐户已经应用于会计尺寸 {2}, +Row {0}: {1} {2} cannot be same as {3} (Party Account) {4},行 {0}: {1} {2} 不能与 {3} (组队帐户) {4}, +Row {0}: {2} Item {1} does not exist in {2} {3},行 {0}: {2} 项目 {1} 在 {2} {3} 中不存在, +Row({0}): Outstanding Amount cannot be greater than actual Outstanding Amount {1} in {2},行({0}):未付金额不能大于实际未付金额 {1} 在 {2}, +Rows with Same Account heads will be merged on Ledger,具有相同帐户头的行将在分类帐上合并, +Rows: {0} have 'Payment Entry' as reference_type. This should not be set manually.,行: {0} 具有“付款条目”作为参考类型。不应手动设置。, +Rows: {0} in {1} section are Invalid. Reference Name should point to a valid Payment Entry or Journal Entry.,行数: {0} {1} 部分无效。参考名称应指向有效的付款条目或日记条目。, +Run parallel job cards in a workstation,在工作站中运行并行作业卡, +Running,运行中, +SCO Supplied Item,SCO 提供的物品, +SLA Fulfilled On,SLA 完成于, +SLA Fulfilled On Status,SLA 已完成状态, +SLA Paused On,SLA 暂停于, +SLA will be applied if {1} is set as {2}{3},如果 {1} 被设置为 {2}{3} ,SLA 将会被应用, +SLA will be applied on every {0},SLA 将应用于每一个 {0}, +SMS Settings,短信设置, +SO Total Qty,SO 总数量, +Salary Currency,薪资货币, +Sales Incoming Rate,销售收入率, +Sales Invoice {0} must be deleted before cancelling this Sales Order,在取消此销售订单之前必须删除销售发票 {0}, +Sales Order Packed Item,销售订单打包的物品, +Sales Order Reference,相关销售订单, +Sales Order Status,销售订单状态, +"Sales Order {0} already exists against Customer's Purchase Order {1}. To allow multiple Sales Orders, Enable {2} in {3}",销售订单 {0} 已存在于客户的采购订单 {1}。若要允许多张销售订单,请在 {3} 中启用 {2}, +Sales Partner ,销售合作伙伴 , +Sales Partner Item,销售合作伙伴项目, +Sales Partner Target Variance Based On Item Group,基于物料组的销售伙伴目标变化量, +Sales Person {0} is disabled.,销售员{0}已被停用。, +Sales Pipeline Analytics,销售管道分析, +Sales Update Frequency in Company and Project,公司和项目的销售更新频率, +Sales Value,销售值, +Salvage Value Percentage,残值百分比, +Same item and warehouse combination already entered.,已输入相同的商品和仓库组合。, +Savings,储蓄, +Scan Batch No,扫描批次号, +Scan Mode,扫描模式, +Scan Serial No,扫描序列号, +Scan barcode for item {0},扫描条形码用于项目 {0}, +"Scan mode enabled, existing quantity will not be fetched.",扫描模式已启用,将不会获取现有数量。, +Scanned Quantity,已扫描数量, +Scheduled Time Logs,计划时间日志, +Scheduler is Inactive. Can't trigger job now.,调度程序未激活。现在无法触发作业。, +Scheduler is Inactive. Can't trigger jobs now.,调度程序处于非活动状态。现在无法触发作业。, +Scheduler is inactive. Cannot enqueue job.,调度器处于非活动状态。无法在队列工作。, +Scheduler is inactive. Cannot merge accounts.,调度器处于未激活状态。无法合并帐户。, +Scheduling,计划调度, +"Scorecard variables can be used, as well as: +{total_score} (the total score from that period), +{period_number} (the number of periods to present day) +","可以使用记分卡变量,以及: +{total_score} (该期间的总分), +{period_number} (截至今天的期间数) +", +Scrap & Process Loss,废料和工艺损失, +Scrap Asset,废弃资产, +Scrap Cost Per Qty,每个数量的废料成本, +Scrap Item Code,废品项目代码, +Scrap Item Name,废件项目名称, +"Search by item code, serial number or barcode",按项目代码、序列号或条形码搜索, +Secondary Party,二级方, +Secondary Role,次要角色, +Section,节, +Segregate Serial / Batch Bundle,分离序列/批次捆绑, +Select Accounting Dimension.,选择会计维度。, +Select Alternative Items for Sales Order,选择供销售订单使用的替代项目, +Select Batch No,选择批次号, +Select Columns and Filters,选择列与筛选条件, +Select Corrective Operation,选择纠正性工序, +Select Date of Birth. This will validate Employees age and prevent hiring of under-age staff.,选择出生日期。此操作将验证员工年龄并防止雇用未成年人员。, +"Select Date of joining. It will have impact on the first salary calculation, Leave allocation on pro-rata bases.",选择入职日期。这将影响首次薪资计算及按比例分配的年假额度。, +Select Dimension,选择维度, +Select Finished Good,选择产成品, +Select Items for Quality Inspection,选择待质检物料, +Select Job Worker Address,选择外协加工方地址, +Select Serial No,选择序列号, +Select Serial and Batch,选择序列号与批次, +Select Time,选择时间, +Select View,选择视图, +Select Vouchers to Match,选择匹配凭证, +Select Warehouses to get Stock for Materials Planning,选择用于物料计划库存的仓库, +Select a Company this Employee belongs to.,选择该员工所属的公司。, +Select a Customer,选择客户, +Select an Item Group.,选择物料组。, +Select an invoice to load summary data,选择发票以加载汇总数据, +Select an item from each set to be used in the Sales Order.,从每组中选择一个物料用于销售订单。, +Select the Default Workstation where the Operation will be performed. This will be fetched in BOMs and Work Orders.,选择执行工序的默认工作站。此信息将用于物料清单和工单。, +Select the Item to be manufactured.,选择待生产的物料。, +"Select the Item to be manufactured. The Item name, UoM, Company, and Currency will be fetched automatically.",选择待生产的物料。物料名称、计量单位、公司和币种将自动获取。, +Select the Warehouse,选择仓库, +Select the date and your timezone,选择日期和时区, +Select the raw materials (Items) required to manufacture the Item,选择生产该物料所需的原材料, +"Select whether to get items from a Sales Order or a Material Request. For now select Sales Order. + A Production Plan can also be created manually where you can select the Items to manufacture.","选择是否从销售订单或物料请求中获取物品。现在选择 销售订单。 + 也可以手动创建生产计划,您可以在其中选择要制造的物品。", +Select your weekly off day,选择每周休息日, +Selected Serial and Batch Bundle entries have been removed.,选定的序列号批次组合条目已被移除。, +Selected Vouchers,已选凭证, +Selected date is,选定日期为, +Selected document must be in submitted state,所选单据必须处于已提交状态, +Self delivery,自提, +Sell Asset,出售资产, +Send Attached Files,发送附件, +Send Document Print,发送单据打印, +Send Emails,发送邮件, +Sending...,发送中..., +Sequential,顺序, +Serial & Batch Item,序列号与批次物料, +Serial & Batch Item Settings,序列号批次物料设置, +Serial / Batch Bundle,序列号/批次组合, +Serial / Batch Bundle Missing,缺少序列号/批次组合, +Serial / Batch No,序列号/批次号, +Serial / Batch Nos,序列号/批次号, +Serial No Ledger,序列号台账, +Serial No Range,序列号范围, +Serial No and Batch Selector cannot be use when Use Serial / Batch Fields is enabled.,启用序列号/批次字段时不可使用序列号批次选择器, +Serial No and Batch for Finished Good,产成品序列号与批次, +Serial No is mandatory,序列号为必填项, +Serial No {0} already exists,序列号{0}已存在, +Serial No {0} already scanned,序列号{0}已扫描, +Serial No {0} does not exists,序列号{0}不存在, +Serial No {0} is already added,序列号{0}已添加, +"Serial No {0} is not present in the {1} {2}, hence you can't return it against the {1} {2}",序列号{0}未存在于{1}{2}中,因此不能针对该{1}{2}进行退回, +Serial Nos,序列号, +Serial Nos / Batch Nos,序列号/批次号, +Serial Nos are created successfully,序列号创建成功, +"Serial Nos are reserved in Stock Reservation Entries, you need to unreserve them before proceeding.",序列号已在库存预留条目中预留,继续操作前需取消预留。, +Serial and Batch,序列号与批次, +Serial and Batch Bundle,序列号批次组合, +Serial and Batch Bundle created,序列号批次组合已创建, +Serial and Batch Bundle updated,序列号批次组合已更新, +Serial and Batch Bundle {0} is already used in {1} {2}.,序列号批次组合{0}已用于{1}{2}。, +Serial and Batch Details,序列号批次明细, +Serial and Batch Entry,序列号批次条目, +Serial and Batch No,序列号批次号, +Serial and Batch Nos,序列号批次号, +Serial and Batch Nos will be auto-reserved based on Pick Serial / Batch Based On,序列号批次号将根据拣配依据自动预留, +Serial and Batch Reservation,序列号批次预留, +Serial and Batch Summary,序列号批次汇总, +Service Cost Per Qty,单位服务成本, +Service Expense Total Amount,服务费用总额, +Service Expenses,服务费用, +Service Item,服务物料, +Service Item Qty,服务物料数量, +Service Item Qty / Finished Good Qty,服务物料数量/产成品数量, +Service Item UOM,服务物料单位, +Service Item {0} is disabled.,服务物料{0}已停用, +Service Item {0} must be a non-stock item.,服务物料{0}必须为非库存物料, +Service Items,服务物料, +Service Level Agreement for {0} {1} already exists.,{0}{1}的服务级别协议已存在。, +Service Level Name,服务级别名称, +Service Provider,服务提供商, +Set Default Supplier,设置默认供应商, +Set From Warehouse,设置来源仓库, +Set Landed Cost Based on Purchase Invoice Rate,按采购发票汇率设置到岸成本, +Set Loyalty Program,设置忠诚度计划, +Set Operating Cost / Scrap Items From Sub-assemblies,设置来自子件的运营成本/废品物料, +Set Operating Cost Based On BOM Quantity,根据物料清单数量设置运营成本, +Set Parent Row No in Items Table,在物料表中设置父行号, +Set Process Loss Item Quantity,设置加工损耗物料数量, +Set Project Status,设置项目状态, +Set Quantity,设置数量, +Set Response Time for Priority {0} in row {1}.,为第{1}行的优先级{0}设置响应时间。, +Set Serial and Batch Bundle Naming Based on Naming Series,根据命名规则设置序列号批次组合名称, +Set Valuation Rate Based on Source Warehouse,根据来源仓库设置计价汇率, +Set Warehouse,设置仓库, +Set default {0} account for non stock items,设置非库存物料的默认{0}科目, +Set fieldname from which you want to fetch the data from the parent form.,设置从父表单获取数据的字段名称。, +Set quantity of process loss item:,设置加工损耗物料数量:, +Set the Planned Start Date (an Estimated Date at which you want the Production to begin),设置计划开始日期(预计开始生产的日期), +Set the status manually.,手动设置状态。, +Set {0} in asset category {1} for company {2},为{2}公司设置资产类别{1}的{0}, +Sets 'Accepted Warehouse' in each row of the Items table.,在物料表的每一行设置'验收仓库'。, +Sets 'Rejected Warehouse' in each row of the Items table.,在物料表的每一行设置'拒收仓库'。, +Sets 'Reserve Warehouse' in each row of the Supplied Items table.,在供应物料表的每一行设置'预留仓库'。, +Setting Item Locations...,设置物料位置..., +Setting the account as a Company Account is necessary for Bank Reconciliation,将科目设为公司账户是银行对账的必要条件, +Setting {} is required,必须设置{}, +Setup your organization,组织架构设置, +Shelf Life in Days,保质期(天), +Shift,班次, +Shift Factor,班次系数, +Shift Name,班次名称, +Shipment,装运, +Shipment Amount,装运金额, +Shipment Delivery Note,装运交货单, +Shipment ID,装运ID, +Shipment Information,装运信息, +Shipment Parcel,装运包裹, +Shipment Parcel Template,装运包裹模板, +Shipment Type,装运类型, +Shipment details,装运明细, +Shipping Address Details,发货地址明细, +Shipping Address Template,发货地址模板, +Shipping Address does not belong to the {0},发货地址不属于{0}, +Show Aggregate Value from Subsidiary Companies,显示子公司汇总值, +Show Balances in Chart Of Accounts,在科目表中显示余额, +Show Barcode Field in Stock Transactions,在库存事务中显示条码字段, +Show Dimension Wise Stock,按维度显示库存, +Show Disabled Warehouses,显示停用仓库, +Show Failed Logs,显示失败日志, +Show GL Balance,显示总账余额, +Show Item Name,显示物料名称, +Show Ledger View,显示分类账视图, +Show Net Values in Party Account,在往来账户显示净值, +Show Pay Button in Purchase Order Portal,在采购订单门户显示支付按钮, +Show Preview,显示预览, +Show Remarks,显示备注, +Show Taxes as Table in Print,打印时以表格形式显示税费, +Show net values in opening and closing columns,在期初期末列显示净值, +Show only the Immediate Upcoming Term,仅显示即将到期的条款, +Show pending entries,显示待处理条目, +Show with upcoming revenue/expense,显示即将发生的收入/费用, +"Simple Python Expression, Example: doc.status == 'Open' and doc.issue_type == 'Bug'",简单Python表达式,示例:doc.status == 'Open' and doc.issue_type == 'Bug', +"Simple Python formula applied on Reading fields.
Numeric eg. 1: reading_1 > 0.2 and reading_1 < 0.5
+Numeric eg. 2: mean > 3.5 (mean of populated fields)
+Value based eg.: reading_value in (""A"", ""B"", ""C"")","简单的 Python 公式应用于阅读字段。
数字例如 1: reading_1 > 0.2 和 reading_1 < 0.5
+数字例如 2: 平均值 > 3.5 (填充字段的平均值)
+基于值例如: reading_value in (""A"", ""B"", ""C"")", +Simultaneous,并行, +Skip Available Sub Assembly Items,跳过可用子装配物料, +Skipped,已跳过, +Skipping Tax Withholding Category {0} as there is no associated account set for Company {1} in it.,跳过代扣税类别{0},因其中未设置公司{1}的关联账户。, +"Skipping {0} of {1}, {2}",跳过{1}的{0},{2}, +Sold by,销售方, +Something went wrong please try again,发生错误,请重试, +Source Exchange Rate,来源汇率, +Source Fieldname,来源字段名, +Source Warehouse Address Link,来源仓库地址链接, +South Africa VAT Account,南非增值税科目, +South Africa VAT Settings,南非增值税设置, +Spacer,间隔符, +Split Asset,拆分资产, +Split Early Payment Discount Loss into Income and Tax Loss,将提前付款折扣损失拆分为收入和税费损失, +Split From,拆分自, +Split Qty,拆分数量, +Split qty cannot be grater than or equal to asset qty,拆分数量不得大于或等于资产数量, +Splitting {0} {1} into {2} rows as per Payment Terms,根据付款条款将{0}{1}拆分为{2}行, +Stage,阶段, +Stale Days should start from 1.,陈旧天数应从1开始, +Standard Description,标准描述, +Standard Rated Expenses,标准税率费用, +"Standard Terms and Conditions that can be added to Sales and Purchases. Examples: Validity of the offer, Payment Terms, Safety and Usage, etc.",可添加到销售和采购中的标准条款和条件。示例:报价有效期、付款条款、安全和使用等。, +Standard rated supplies in {0},{0}中的标准税率供应品, +"Standard tax template that can be applied to all Purchase Transactions. This template can contain a list of tax heads and also other expense heads like ""Shipping"", ""Insurance"", ""Handling"", etc.",可适用于所有购买交易的标准税模板。 此模板可以包含税头列表和其他支出项,如“发货”、“保险”、“处理”等等。, +"Standard tax template that can be applied to all Sales Transactions. This template can contain a list of tax heads and also other expense/income heads like ""Shipping"", ""Insurance"", ""Handling"" etc.",可应用于所有销售交易的标准税模板。 此模板可以包含税金列表和其他开支/收入项,如“发货”、“保险”、“处理”等。, +Start / Resume,启动/恢复, +Start Date should be lower than End Date,开始日期应早于结束日期, +Start Deletion,开始删除, +Start Import,开始导入, +Start Job,启动作业, +Start Merge,开始合并, +Start Reposting,开始重新过账, +Start Time can't be greater than or equal to End Time for {0}.,{0}的开始时间不能大于或等于结束时间, +Start Timer,启动计时器, +Started a background job to create {1} {0},已启动后台作业创建{1}{0}, +Status Details,状态详情, +Status Illustration,状态图示, +Status set to rejected as there are one or more rejected readings.,因存在一个或多个被拒绝读数,状态设为已拒绝, +Stock Closing,库存结转, +Stock Consumed During Repair,维修消耗库存, +Stock Consumption Details,库存消耗明细, +Stock Entries already created for Work Order {0}: {1},已为工单{0}创建库存分录:{1}, +Stock Ledger Invariant Check,库存分类账不变性检查, +Stock Ledger Variance,库存分类账差异, +Stock Movement,库存移动, +Stock Planning,库存计划, +Stock Reposting Settings,库存重新过账设置, +Stock Reservation,库存预留, +Stock Reservation Entries Cancelled,库存预留分录已取消, +Stock Reservation Entries Created,库存预留分录已创建, +Stock Reservation Entry,库存预留分录, +Stock Reservation Entry cannot be updated as it has been delivered.,库存预留分录已交货,无法更新, +"Stock Reservation Entry created against a Pick List cannot be updated. If you need to make changes, we recommend canceling the existing entry and creating a new one.",针对领料单创建的库存预留分录不可更新。如需修改,建议取消现有分录并创建新分录, +Stock Reservation Warehouse Mismatch,库存预留仓库不匹配, +Stock Reservation can only be created against {0}.,库存预留只能针对{0}创建, +Stock Reserved Qty (in Stock UOM),已预留数量(库存单位), +Stock Transactions Settings,库存交易设置, +Stock UOM Quantity,库存单位数量, +Stock Unreservation,取消库存预留, +Stock Validations,库存验证, +Stock and Manufacturing,库存与生产, +Stock cannot be reserved in group warehouse {0}.,无法在组仓库{0}中预留库存, +Stock cannot be reserved in the group warehouse {0}.,无法在组仓库{0}中预留库存, +Stock not available for Item {0} in Warehouse {1}.,物料编码{0}在仓库{1}中无可用库存, +Stock quantity not enough for Item Code: {0} under warehouse {1}. Available quantity {2} {3}.,物料编码{0}在仓库{1}中库存不足。可用数量为{2}{3}, +Stock transactions that are older than the mentioned days cannot be modified.,超过指定天数的库存交易不可修改, +Stock will be reserved on submission of Purchase Receipt created against Material Request for Sales Order.,针对销售订单的物料申请创建采购收据并提交时,将预留库存, +Stock/Accounts can not be frozen as processing of backdated entries is going on. Please try again later.,因正在处理倒填日期的分录,无法冻结库存/科目。请稍后重试, +Sub Assemblies & Raw Materials,子装配件与原材料, +Sub Assembly Item,子装配件物料, +Sub Assembly Item Code,子装配件物料编码, +Sub Assembly Items,子装配件物料, +Sub Assembly Warehouse,子装配件仓库, +Sub Operation,子工序, +Sub Operations,子工序, +Sub Total,小计, +Subcontract BOM,外协物料清单, +Subcontract Order,外协订单, +Subcontract Order Summary,外协订单汇总, +Subcontract Return,外协退货, +Subcontracted Quantity,外协数量, +Subcontracting BOM,外协物料清单, +Subcontracting Conversion Factor,外协转换系数, +Subcontracting Order,外协订单, +Subcontracting Order (Draft) will be auto-created on submission of Purchase Order.,提交采购订单时将自动创建外协订单(草稿), +Subcontracting Order Item,外协订单项, +Subcontracting Order Service Item,外协订单服务项, +Subcontracting Order Supplied Item,外协订单供应项, +Subcontracting Order {0} created.,外协订单{0}已创建, +Subcontracting Purchase Order,外协采购订单, +Subcontracting Receipt,外协收据, +Subcontracting Receipt Item,外协收据项, +Subcontracting Receipt Supplied Item,外协收据供应项, +Subcontracting Settings,外协设置, +Subdivision,细分, +Submit Action Failed,提交操作失败, +Submit After Import,导入后提交, +Submit ERR Journals?,提交错误日记账?, +Submit Generated Invoices,提交生成的发票, +Subscription for Future dates cannot be processed.,无法处理未来日期的订阅, +Succeeded,成功, +Succeeded Entries,成功条目, +"Successfully changed Stock UOM, please redefine conversion factors for new UOM.",已成功更改库存单位,请重新定义新单位的换算系数, +Successfully imported {0},成功导入{0}, +"Successfully imported {0} record out of {1}. Click on Export Errored Rows, fix the errors and import again.",成功导入{1}条记录中的{0}条。单击“导出错误行”,修复错误后重新导入, +Successfully imported {0} record.,成功导入{0}条记录, +"Successfully imported {0} records out of {1}. Click on Export Errored Rows, fix the errors and import again.",成功导入{1}条记录中的{0}条。单击“导出错误行”,修复错误后重新导入, +Successfully imported {0} records.,成功导入{0}条记录, +Successfully linked to Customer,成功关联客户, +Successfully linked to Supplier,成功关联供应商, +Successfully merged {0} out of {1}.,成功合并{1}中的{0}条记录, +Successfully updated {0},成功更新{0}, +"Successfully updated {0} record out of {1}. Click on Export Errored Rows, fix the errors and import again.",成功更新{1}条记录中的{0}条。单击“导出错误行”,修复错误后重新导入, +Successfully updated {0} record.,成功更新{0}条记录, +"Successfully updated {0} records out of {1}. Click on Export Errored Rows, fix the errors and import again.",成功更新{1}条记录中的{0}条。单击“导出错误行”,修复错误后重新导入, +Successfully updated {0} records.,成功更新{0}条记录, +Sum of Repair Cost and Value of Consumed Stock Items.,维修成本与消耗库存价值之和, +Supplied Item,供应物料, +Supplier Address Details,供应商地址明细, +Supplier Contact,供应商联系人, +Supplier Group Item,供应商组项, +Supplier Info,供应商信息, +Supplier Invoice,供应商发票, +Supplier Item,供应商物料, +Supplier Portal Users,供应商门户用户, +Supplier Primary Address,供应商主要地址, +Supplier Primary Contact,供应商主要联系人, +Supplies subject to the reverse charge provision,适用反向征税条款的供应品, +Sync Now,立即同步, +Sync Started,同步已启动, +System In Use,使用中的系统, +System Settings,系统设置, +System will automatically create the serial numbers / batch for the Finished Good on submission of work order,提交工单时系统将自动创建成品的序列号/批次, +System will not check over billing since amount for Item {0} in {1} is zero,因{1}中物料{0}的金额为零,系统不检查超额开票, +TCS Amount,TCS金额, +TCS Rate %,TCS税率%, +TDS Amount,TDS金额, +TDS Deducted,已扣除TDS, +TDS Payable,应付TDS, +Target Asset,目标资产, +Target Asset Location,目标资产位置, +Target Asset {0} cannot be cancelled,目标资产{0}无法取消, +Target Asset {0} cannot be submitted,目标资产{0}无法提交, +Target Asset {0} cannot be {1},目标资产{0}无法{1}, +Target Asset {0} does not belong to company {1},目标资产{0}不属于公司{1}, +Target Asset {0} needs to be composite asset,目标资产{0}需为组合资产, +Target Batch No,目标批号, +Target Exchange Rate,目标汇率, +Target Fieldname (Stock Ledger Entry),目标字段名(库存分类账分录), +Target Fixed Asset Account,目标固定资产科目, +Target Has Batch No,目标有批号, +Target Has Serial No,目标有序列号, +Target Incoming Rate,目标入库汇率, +Target Is Fixed Asset,目标为固定资产, +Target Item Code,目标物料编码, +Target Item Name,目标物料名称, +Target Item {0} must be a Fixed Asset item,目标物料{0}必须为固定资产物料, +Target Qty must be a positive number,目标数量必须为正数, +Target Serial No,目标序列号, +Target Warehouse Address Link,目标仓库地址链接, +Target Warehouse is set for some items but the customer is not an internal customer.,部分物料设置了目标仓库,但客户不是内部客户, +Task Assignee Email,任务分配人邮箱, +Task {0} depends on Task {1}. Please add Task {1} to the Tasks list.,任务{0}依赖任务{1}。请将任务{1}添加到任务列表, +Tax Amount,税额, +Tax Amount will be rounded on a row(items) level,税额将在行项目层级进行四舍五入, +Tax Masters,税务主数据, +Tax Refunds provided to Tourists under the Tax Refunds for Tourists Scheme,根据游客退税计划向游客提供的税款退还, +Tax Settings,税务设置, +Tax Withheld Vouchers,代扣税款凭证, +Tax Withholding,税款代扣代缴, +Tax Withholding Category {} against Company {} for Customer {} should have Cumulative Threshold value.,针对公司{1}客户{2}的代扣代缴类别{0}应设置累计起征点值, +Tax Withholding Details,代扣代缴明细, +Tax Withholding Net Total,代扣代缴净额, +"Tax detail table fetched from item master as a string and stored in this field. +Used for Taxes and Charges","税务细节表已作为字符串从项目主中获取并存储在此字段。 +用于税收和费用", +Tax will be withheld only for amount exceeding the cumulative threshold,仅对超过累计起征点的金额进行税款代扣, +Taxes row #{0}: {1} cannot be smaller than {2},第{0}行税项:{1}不能小于{2}, +Team,团队, +Telephony Call Type,通话类型, +Template Item Selected,已选模板物料, +Template Options,模板选项, +Template Task,模板任务, +Template Warnings,模板警告, +Terms & Conditions,条款与条件, +Terms Template,条款模板, +Territory Item,区域物料, +Territory Wise Sales,分区域销售, +The Batch {0} has negative quantity {1} in warehouse {2}. Please correct the quantity.,批次{0}在仓库{2}中存在负数量{1}。请更正数量, +The Condition '{0}' is invalid,条件'{0}'无效, +The Document Type {0} must have a Status field to configure Service Level Agreement,单据类型{0}必须具有状态字段以配置服务级别协议, +"The GL Entries and closing balances will be processed in the background, it can take a few minutes.",总账分录和期末余额将在后台处理,可能需要几分钟, +"The GL Entries will be cancelled in the background, it can take a few minutes.",总账分录将在后台取消,可能需要几分钟, +"The Payment Request {0} is already paid, cannot process payment twice",付款申请{0}已支付,不能重复处理, +"The Pick List having Stock Reservation Entries cannot be updated. If you need to make changes, we recommend canceling the existing Stock Reservation Entries before updating the Pick List.",存在库存预留记录的拣货清单无法更新。如需修改,建议在更新前取消现有库存预留, +The Process Loss Qty has reset as per job cards Process Loss Qty,根据工序卡的工艺损耗量重置生产损耗量, +The Sales Person is linked with {0},该销售员与{0}相关联, +The Serial No at Row #{0}: {1} is not available in warehouse {2}.,第{0}行的序列号{1}在仓库{2}中不可用, +The Serial and Batch Bundle {0} is not valid for this transaction. The 'Type of Transaction' should be 'Outward' instead of 'Inward' in Serial and Batch Bundle {0},序列号批次组合{0}对此交易无效。在序列号批次组合{0}中,'交易类型'应为'出库'而非'入库', +The Work Order is mandatory for Disassembly Order,拆卸订单必须关联工单, +The allocated amount is greater than the outstanding amount of Payment Request {0},分配金额超过付款申请{0}的未清金额, +The currency of invoice {} ({}) is different from the currency of this dunning ({}).,发票{}({})的币种与本催款单({})币种不一致, +The default BOM for that item will be fetched by the system. You can also change the BOM.,系统将获取该物料的默认BOM,也可手动修改, +The field {0} in row {1} is not set,第{1}行的字段{0}未设置, +"The following Items, having Putaway Rules, could not be accomodated:",以下存在上架规则的物料无法安置:, +The following assets have failed to automatically post depreciation entries: {0},以下资产自动计提折旧失败:{0}, +"The following batches are expired, please restock them:
{0}",以下批次已过期,请补货:
{0}, +The following invalid Pricing Rules are deleted:,以下无效定价规则已被删除:, +The items {0} and {1} are present in the following {2} :,物料{0}和{1}存在于以下{2}中:, +The operation {0} can not add multiple times,操作{0}不能重复添加, +The operation {0} can not be the sub operation,操作{0}不能作为子工序, +The original invoice should be consolidated before or along with the return invoice.,原始发票应在退货发票前或同时合并, +The percentage you are allowed to pick more items in the pick list than the ordered quantity.,允许拣货数量超出订单数量的百分比, +"The percentage you are allowed to transfer more against the quantity ordered. For example, if you have ordered 100 units, and your Allowance is 10%, then you are allowed transfer 110 units.",允许转移数量超出订单数量的百分比。例如:订单100件,容差10%,最多可转移110件, +The reserved stock will be released when you update items. Are you certain you wish to proceed?,更新物料时将释放预留库存。确定继续?, +The reserved stock will be released. Are you certain you wish to proceed?,将释放预留库存。确定继续?, +The serial and batch bundle {0} not linked to {1} {2},序列号批次组合{0}未链接到{1}{2}, +"The stock for the item {0} in the {1} warehouse was negative on the {2}. You should create a positive entry {3} before the date {4} and time {5} to post the correct valuation rate. For more details, please read the documentation.",物料{0}在仓库{1}的库存于{2}出现负数。应在{4} {5}前创建正数分录{3}以记录正确计价。详情参阅文档, +"The stock has been reserved for the following Items and Warehouses, un-reserve the same to {0} the Stock Reconciliation:

{1}",以下物料和仓库的库存已被预留,请取消预留以{0}库存对账:

{1}, +"The sync has started in the background, please check the {0} list for new records.",同步已在后台启动,请查看{0}列表获取新记录, +The task has been enqueued as a background job.,任务已加入后台队列, +"The task has been enqueued as a background job. In case there is any issue on processing in background, the system will add a comment about the error on this Stock Reconciliation and revert to the Submitted stage",任务已加入后台队列。若后台处理出错,系统将在库存对账添加错误注释并恢复为已提交状态, +The total Issue / Transfer quantity {0} in Material Request {1} cannot be greater than allowed requested quantity {2} for Item {3},物料申请{1}中物料{3}的发放/转移数量{0}不能超过允许申请量{2}, +The total Issue / Transfer quantity {0} in Material Request {1} cannot be greater than requested quantity {2} for Item {3},物料申请{1}中物料{3}的发放/转移数量{0}不能超过申请量{2}, +The uploaded file does not match the selected Code List.,上传文件与所选代码表不匹配, +The user cannot submit the Serial and Batch Bundle manually,用户不能手动提交序列号批次组合, +"The users with this Role are allowed to create/modify a stock transaction, even though the transaction is frozen.",具有此角色的用户可在交易冻结时创建/修改库存交易, +The warehouse where you store finished Items before they are shipped.,成品发货前存储的仓库, +"The warehouse where you store your raw materials. Each required item can have a separate source warehouse. Group warehouse also can be selected as source warehouse. On submission of the Work Order, the raw materials will be reserved in these warehouses for production usage.",原材料存储仓库。每个物料可指定不同源仓库,也可选择组仓库。提交工单时将预留原材料, +The warehouse where your Items will be transferred when you begin production. Group Warehouse can also be selected as a Work in Progress warehouse.,生产开始时物料转移的目标仓库,可选择组仓库作为在制品仓库, +The {0} {1} is used to calculate the valuation cost for the finished good {2}.,{0}{1}用于计算成品{2}的计价成本, +There are ledger entries against this account. Changing {0} to non-{1} in live system will cause incorrect output in 'Accounts {2}' report,存在关联总账分录。在生产系统将{0}改为非{1}将导致'{2}'报表错误, +There are no Failed transactions,无失败交易, +There are no active Fiscal Years for which Demo Data can be generated.,没有可生成演示数据的有效会计年度, +There are no slots available on this date,该日期无可用时段, +There are only {0} asset created or linked to {1}. Please create or link {2} Assets with respective document.,仅创建或链接了{0}个资产到{1}。请创建或链接{2}个对应单据的资产, +"There are two options to maintain valuation of stock. FIFO (first in - first out) and Moving Average. To understand this topic in detail please visit Item Valuation, FIFO and Moving Average.",库存计价有两种方法:先进先出(FIFO)和移动平均。详情请参阅物料计价方法, +There aren't any item variants for the selected item,所选物料无变体, +There is already a valid Lower Deduction Certificate {0} for Supplier {1} against category {2} for this time period.,供应商{1}在本期间已存在有效的{2}类别低税率证明{0}, +There is already an active Subcontracting BOM {0} for the Finished Good {1}.,成品{1}已存在有效委外BOM{0}, +There must be atleast 1 Finished Good in this Stock Entry,本库存转移单必须至少包含一个成品, +There was an error creating Bank Account while linking with Plaid.,链接Plaid时创建银行账户出错, +There was an error syncing transactions.,同步交易时出错, +There was an error updating Bank Account {} while linking with Plaid.,链接Plaid时更新银行账户{}出错, +There was an issue connecting to Plaid's authentication server. Check browser console for more information,连接Plaid认证服务器异常。查看浏览器控制台获取详细信息, +There were issues unlinking payment entry {0}.,解关联付款条目{0}时发生问题, +This Account has '0' balance in either Base Currency or Account Currency,该科目在本位币或科目币种下余额为0, +This PO has been fully subcontracted.,该采购订单已全部委外, +This field is used to set the 'Customer'.,用于设置'客户', +This filter will be applied to Journal Entry.,此筛选器将应用于日记账分录, +This is a Template BOM and will be used to make the work order for {0} of the item {1},此为模板BOM,将用于生成物料{1}{0}数量的工单, +This is a preview of the email to be sent. A PDF of the document will automatically be attached with the email.,邮件预览。单据PDF将自动作为附件, +This is considered dangerous from accounting point of view.,从会计角度看此操作存在风险, +"This is enabled by default. If you want to plan materials for sub-assemblies of the Item you're manufacturing leave this enabled. If you plan and manufacture the sub-assemblies separately, you can disable this checkbox.",默认启用。如需为子装配件计划物料请保持启用。若单独计划生产子装配件,可取消勾选, +"This is for raw material Items that'll be used to create finished goods. If the Item is an additional service like 'washing' that'll be used in the BOM, keep this unchecked.",适用于用于生产成品的原材料。若物料是BOM中的附加服务(如'清洗'),请勿勾选, +This item filter has already been applied for the {0},该物料筛选器已应用于{0}, +This option can be checked to edit the 'Posting Date' and 'Posting Time' fields.,勾选此选项可编辑'过账日期'和'过账时间'字段, +This schedule was created when Asset {0} was adjusted through Asset Value Adjustment {1}.,此计划在资产{0}通过资产价值调整{1}调整时创建, +This schedule was created when Asset {0} was consumed through Asset Capitalization {1}.,此计划在资产{0}通过资产资本化{1}消耗时创建, +This schedule was created when Asset {0} was repaired through Asset Repair {1}.,此计划在资产{0}通过资产维修{1}修复时创建, +This schedule was created when Asset {0} was restored on Asset Capitalization {1}'s cancellation.,此计划在资产资本化{1}取消时恢复资产{0}时创建, +This schedule was created when Asset {0} was restored.,此计划在资产{0}恢复时创建, +This schedule was created when Asset {0} was returned through Sales Invoice {1}.,此计划在资产{0}通过销售发票{1}退回时创建, +This schedule was created when Asset {0} was scrapped.,此计划在资产{0}报废时创建, +This schedule was created when Asset {0} was sold through Sales Invoice {1}.,此计划在资产{0}通过销售发票{1}售出时创建, +This schedule was created when Asset {0} was updated after being split into new Asset {1}.,此计划在资产{0}拆分为新资产{1}后更新时创建, +This schedule was created when Asset {0}'s Asset Repair {1} was cancelled.,此计划在资产维修{1}取消时创建, +This schedule was created when Asset {0}'s Asset Value Adjustment {1} was cancelled.,此计划在资产价值调整{1}取消时创建, +This schedule was created when Asset {0}'s shifts were adjusted through Asset Shift Allocation {1}.,此计划在通过班次分配{1}调整资产{0}班次时创建, +This schedule was created when new Asset {0} was split from Asset {1}.,此计划在从资产{1}拆分出新资产{0}时创建, +"This table is used to set details about the 'Item', 'Qty', 'Basic Rate', etc.",用于设置'物料'、'数量'、'基本汇率'等详细信息, +This value shall be used when no matching Common Code for a record is found.,无匹配通用代码时使用此值, +This {} will be treated as material transfer.,此{}将被视为物料转移, +Threshold for Suggestion (In Percentage),建议阈值(百分比), +Time Taken to Deliver,交付耗时, +Time in mins,分钟内的时间, +Time in mins.,分钟内的时间。, +Time slot is not available,时间段不可用, +To Date is mandatory,截止日期是必填项, +To Delivery Date,至交货日期, +To Doctype,到文档类型, +To Due Date,到截止日期, +To Payment Date,至付款日期, +To Reference Date,到参考日期, +To add Operations tick the 'With Operations' checkbox.,要添加操作,请勾选“包含操作”复选框。, +To add subcontracted Item's raw materials if include exploded items is disabled.,如果禁用包含爆炸项,则添加分包项的原材料。, +To apply condition on parent field use parent.field_name and to apply condition on child table use doc.field_name. Here field_name could be based on the actual column name of the respective field.,要对父级字段设置条件,可以使用 parent.field_name,要对子表字段设置条件,可以使用 doc.field_name。 这里的 field_name 应该根据实际字段名称来填写。, +To be Delivered to Customer,交付给客户, +To cancel a {} you need to cancel the POS Closing Entry {}.,要取消 {},您需要先取消 POS 结账条目 {}。, +"To enable Capital Work in Progress Accounting,",要启用在建工程会计功能,, +To include non-stock items in the material request planning. i.e. Items for which 'Maintain Stock' checkbox is unticked.,将非库存物料纳入物料需求计划(即取消勾选'维护库存'的物料)。, +"To include sub-assembly costs and scrap items in Finished Goods on a work order without using a job card, when the 'Use Multi-Level BOM' option is enabled.",启用'多层级BOM'选项时,允许工单直接归集子装配件成本和废品到产成品,无需作业卡。, +To submit the invoice without purchase order please set {0} as {1} in {2},若要提交没有采购订单的发票,请在 {2}中将 {0} 设置为 {1}, +To submit the invoice without purchase receipt please set {0} as {1} in {2},若要提交没有购买收据的发票,请在 {2}中将 {0} 设置为 {1}, +"To use a different finance book, please uncheck 'Include Default FB Assets'",要使用不同的财务账簿,请取消选中“包括默认 FB 资产”, +"To use a different finance book, please uncheck 'Include Default FB Entries'",要使用不同的财务账簿,请取消选中“包括默认 FB 条目”, +Total Active Items,总活动物料数, +Total Allocations,分配总额, +Total Asset,总资产, +Total Asset Cost,总资产成本, +Total Billing Hours,总计费小时数, +Total Contribution Amount Against Invoices: {0},发票关联总贡献金额:{0}, +Total Contribution Amount Against Orders: {0},订单关联总贡献金额:{0}, +Total Equity,所有者权益合计, +Total Incoming Bills,应收票据总额, +Total Incoming Payment,应收付款总额, +Total Incoming Value (Receipt),入库总值(收据), +Total Interest,总利息, +Total Issues,问题总数, +Total Items,物料总数, +Total Liability,总负债, +Total Number of Booked Depreciations ,已计提折旧总数, +Total Operation Time,总作业时间, +Total Other Charges,其他费用合计, +Total Outgoing Bills,应付票据总额, +Total Outgoing Payment,应付付款总额, +Total Outgoing Value (Consumption),出库总值(消耗), +Total Picked Quantity {0} is more than ordered qty {1}. You can set the Over Picking Allowance in Stock Settings.,已拣货数量{0}超过订单数量{1}。可在库存设置中设置超拣许可量, +Total Purchase Amount,采购总金额, +Total Purchase Cost has been updated,采购总成本已更新, +Total Repair Cost,维修总成本, +Total Reposting Count,重新过账总次数, +Total Sales Amount,销售总金额, +Total Stock Value,库存总价值, +Total Supplied Qty,已供应总量, +Total Time (in Mins),总时间(分钟), +Total Value,总价值, +Total Value Difference (Incoming - Outgoing),价值差额合计(入库-出库), +Total Views,总浏览次数, +Total Warehouses,仓库总数, +Total Weight (kg),总重量(千克), +Total percentage against cost centers should be 100,成本中心分配比例总和应为100%, +Tracking Status,跟踪状态, +Tracking Status Info,跟踪状态信息, +Tracking URL,跟踪链接, +Transaction Deletion Document: {0} is running for this Company. {1},正在为该公司执行交易删除文档:{0}。{1}, +Transaction Deletion Record,交易删除记录, +Transaction Deletion Record Details,交易删除记录明细, +Transaction Deletion Record Item,交易删除记录项, +Transaction Exchange Rate,交易汇率, +Transaction Settings,交易设置, +Transaction currency: {0} cannot be different from Bank Account({1}) currency: {2},交易货币{0}必须与银行账户{1}的货币{2}一致, +Transactions against the Company already exist! Chart of Accounts can only be imported for a Company with no transactions.,公司已有交易记录!仅允许无交易记录的公司导入会计科目表, +Transfer Asset,资产调拨, +Transfer From Warehouses,调出仓库, +Transferring cannot be done to an Employee. Please enter location where Asset {0} has to be transferred,无法调拨至员工。请输入资产{0}的调拨位置, +Transit,在途, +Transit Entry,在途分录, +Truncates 'Remarks' column to set character length,截断'备注'列以设置字符长度, +Type Of Call,通话类型, +Type of Transaction,交易类型, +UAE VAT 201,阿联酋增值税201, +UAE VAT Account,阿联酋增值税科目, +UAE VAT Accounts,阿联酋增值税科目, +UAE VAT Settings,阿联酋增值税设置, +UOM conversion factor required for UOM: {0} in Item: {1},物料{1}的计量单位{0}需要换算系数, +UPC,通用产品代码, +UnReconcile,取消对账, +Unable to find the time slot in the next {0} days for the operation {1}. Please increase the 'Capacity Planning For (Days)' in the {2}.,未来{0}天内未找到工序{1}的可用时段,请在{2}中增加'产能计划周期(天)', +Unable to find variable:,未找到变量:, +Unassigned Qty,未分配数量, +"Under Working Hours table, you can add start and end times for a Workstation. For example, a Workstation may be active from 9 am to 1 pm, then 2 pm to 5 pm. You can also specify the working hours based on shifts. While scheduling a Work Order, the system will check for the availability of the Workstation based on the working hours specified.",在工作时间表中,可为工作站设置起止时间。例如,某工作站可能从上午9点到下午1点,下午2点到5点运行。也可按班次设置工作时间。系统在排产工单时会根据设置的工作时间检查工作站可用性, +Unit of Measure (UOM),计量单位(UOM), +Unlinked,已解除关联, +Unqualified,不合格, +Unrealized Profit / Loss Account,未实现损益科目, +Unrealized Profit / Loss account for intra-company transfers,公司内部调拨未实现损益科目, +Unrealized Profit/Loss account for intra-company transfers,公司内部调拨未实现损益科目, +Unreconcile Payment,取消付款对账, +Unreconcile Payment Entries,取消付款分录对账, +Unreconcile Transaction,取消交易对账, +Unreconciled Amount,未对账金额, +Unreconciled Entries,未对账分录, +Unreserve,取消预留, +Unreserve Stock,取消库存预留, +Unreserving Stock...,正在取消库存预留..., +Unset Matched Payment Request,取消匹配付款申请, +Up,上, +Update Billed Amount in Delivery Note,更新送货单中的已计费金额, +Update Billed Amount in Purchase Order,更新采购订单中的已计费金额, +Update Billed Amount in Purchase Receipt,更新采购收据中的已计费金额, +Update Existing Price List Rate,更新现有价目表价格, +Update Existing Records,更新现有记录, +Update Outstanding for Self,更新自身未清金额, +Update Rate as per Last Purchase,按最后采购价更新价格, +Update Total Purchase Cost,更新采购总成本, +Update frequency of Project,更新项目频率, +Update stock must be enabled for the purchase invoice {0},采购发票{0}必须启用库存更新, +Update the modified timestamp on new communications received in Lead & Opportunity.,更新线索与商机中收到新沟通的修改时间戳, +Update timestamp on new communication,新沟通时更新时间戳, +Updated via 'Time Log' (In Minutes),通过'工时记录'更新(分钟), +Updating Work Order status,正在更新工单状态, +"Updating {0} of {1}, {2}",正在更新{1}的{0},{2}, +Upload Bank Statement,上传银行对账单, +Use 'Repost in background' button to trigger background job. Job can only be triggered when document is in Queued or Failed status.,使用'后台重新过账'按钮触发后台任务。仅当单据处于排队或失败状态时可触发, +Use Batch-wise Valuation,使用批次计价, +Use Company Default Round Off Cost Center,使用公司默认的舍入成本中心, +Use Company default Cost Center for Round off,使用公司默认的成本中心进行舍入, +Use HTTP Protocol,使用HTTP协议, +Use Item based reposting,使用基于物料的重新过账, +Use Serial / Batch Fields,使用序列号/批次字段, +Use Serial No / Batch Fields,使用序列号/批次字段, +Use Transaction Date Exchange Rate,使用交易日汇率, +User {0}: Removed Employee Self Service role as there is no mapped employee.,用户{0}:移除员工自助服务角色,因无对应员工, +User {0}: Removed Employee role as there is no mapped employee.,用户{0}:移除员工角色,因无对应员工, +Users can enable the checkbox If they want to adjust the incoming rate (set using purchase receipt) based on the purchase invoice rate.,用户可勾选此复选框以根据采购发票价格调整入库价格(通过采购收据设置), +Users with this role are allowed to over bill above the allowance percentage,此角色用户允许超规定比例开票, +Users with this role are allowed to over deliver/receive against orders above the allowance percentage,此角色用户允许超规定比例交付/接收订单, +Using negative stock disables FIFO/Moving average valuation when inventory is negative.,启用负库存时,若库存为负将禁用先进先出/移动平均计价法, +VAT Accounts,增值税科目, +VAT Amount (AED),增值税金额(迪拉姆), +VAT Audit Report,增值税审计报告, +VAT on Expenses and All Other Inputs,费用及所有其他投入的增值税, +VAT on Sales and All Other Outputs,销售及所有其他产出的增值税, +Valid From must be after {0} as last GL Entry against the cost center {1} posted on this date,生效日期必须在{0}之后,因成本中心{1}的最后总账分录发布于该日期, +Validate Components and Quantities Per BOM,验证BOM组件及数量, +Validate Negative Stock,验证负库存, +Validate Pricing Rule,验证定价规则, +Validate Stock on Save,保存时验证库存, +Valuation (I - K),计价(I-K), +Valuation Field Type,计价字段类型, +Valuation Rate (In / Out),计价单价(进/出), +Valuation rate for customer provided items has been set to zero.,客户提供物料的计价单价已设为零, +Valuation rate for the item as per Sales Invoice (Only for Internal Transfers),按销售发票的物料计价单价(仅限内部调拨), +Value (G - D),价值(G-D), +Value ({0}),值({0}), +Value Based Inspection,基于价值的检验, +Value Change,价值变动, +Value Details,价值明细, +Value as on,截至价值, +Value of Goods,货物价值, +Value of New Capitalized Asset,新增资本化资产价值, +Value of New Purchase,新购价值, +Value of Scrapped Asset,报废资产价值, +Value of Sold Asset,已售资产价值, +Value of goods cannot be 0,货物价值不可为0, +Verification failed please check the link,验证失败,请检查链接, +Via Landed Cost Voucher,通过到岸成本凭证, +View BOM Update Log,查看物料清单更新日志, +View Exchange Gain/Loss Journals,查看汇兑损益日记账, +View General Ledger,查看总分类账, +View Ledgers,查看分类账列表, +Visits,访问次数, +Voice Call Settings,语音通话设置, +Voucher,凭证, +Voucher Name,凭证名称, +Voucher No is mandatory,凭证编号必填, +Voucher Qty,凭证数量, +Voucher Subtype,凭证子类型, +Voucher {0} is over-allocated by {1},凭证{0}超额分配{1}, +Voucher-wise Balance,按凭证余额, +"WARNING: Exotel app has been separated from ERPNext, please install the app to continue using Exotel integration.",警告:Exotel应用已从ERPNext分离,请安装该应用以继续使用Exotel集成, +WIP Composite Asset,在制组合资产, +Waiting for payment...,等待付款中..., +Warehouse Capacity for Item '{0}' must be greater than the existing stock level of {1} {2}.,物料“{0}”的仓库容量必须大于现有库存量{1}{2}, +Warehouse Details,仓库详细信息, +Warehouse Disabled?,仓库是否禁用?, +Warehouse Settings,仓库设置, +Warehouse Wise Stock Balance,分仓库库存余额, +Warehouse wise Stock Value,分仓库库存价值, +Warehouse {0} does not belong to Company {1}.,仓库{0}不属于公司{1}, +"Warehouse {0} is not linked to any account, please mention the account in the warehouse record or set default inventory account in company {1}.",仓库{0}未关联会计科目,请在仓库记录中指定科目或为公司{1}设置默认库存科目, +Warehouse's Stock Value has already been booked in the following accounts:,仓库库存价值已计入以下科目:, +Warning - Row {0}: Billing Hours are more than Actual Hours,警告 - 第{0}行:计费工时超过实际工时, +Warning on Negative Stock,负库存预警, +Warning!,警告!, +Watch Video,观看视频, +Website Script,网站脚本, +Website Theme,网站主题, +Week {0} {1},第{0}周 {1}, +Weekly Time to send,每周发送时间, +Weight (kg),重量(公斤), +"When a parent warehouse is chosen, the system conducts stock checks against the associated child warehouses",选择父仓库时,系统会检查关联子仓库的库存, +"When creating an Item, entering a value for this field will automatically create an Item Price at the backend.",创建物料时填写此字段值,将自动在后台创建物料价格, +"While making Purchase Invoice from Purchase Order, use Exchange Rate on Invoice's transaction date rather than inheriting it from Purchase Order. Only applies for Purchase Invoice.",根据采购订单生成采购发票时,使用发票交易日的汇率而非继承采购订单汇率(仅适用于采购发票), +Width (cm),宽度(厘米), +With Period Closing Entry For Opening Balances,含期初余额的期间结账分录, +Withdrawal,提款, +Work Order / Subcontract PO,生产工单/委外采购订单, +Work Order Consumed Materials,生产工单耗用物料, +Workflow,工作流, +Workflow Action,工作流操作, +Workflow State,工作流状态, +Workstation Dashboard,工作站看板, +Workstation Status,工作站状态, +Workstation Type,工作站类型, +Workstations,工作站列表, +Write Off Limit,冲销限额, +Wrong Company,错误公司, +Wrong Template,错误模板, +You are importing data for the code list:,您正在导入代码列表的数据:, +You are not authorized to make/edit Stock Transactions for Item {0} under warehouse {1} before this time.,您此时无权在仓库{1}下为物料{0}创建/编辑库存交易, +You are picking more than required quantity for the item {0}. Check if there is any other pick list created for the sales order {1}.,您正在为物料{0}提货超过所需数量,请检查销售订单{1}是否已创建其他拣货单, +You can add the original invoice {} manually to proceed.,您可以手动添加原始发票{}以继续, +"You can set it as a machine name or operation type. For example, stiching machine 12",可设置为机器名称或工序类型,例如:缝纫机12号, +You can't make any changes to Job Card since Work Order is closed.,生产工单已关闭,无法修改作业卡, +You can't process the serial number {0} as it has already been used in the SABB {1}. {2} if you want to inward same serial number multiple times then enabled 'Allow existing Serial No to be Manufactured/Received again' in the {3},无法处理序列号{0},因其已在序列和批次凭证{1}中使用。如需多次入库相同序列号,请在{3}启用'允许重复生产/接收现有序列号', +You can't redeem Loyalty Points having more value than the Rounded Total.,不能兑换超过四舍五入总金额的忠诚度积分, +You cannot change the rate if BOM is mentioned against any Item.,若物料关联了物料清单,则不可修改价格, +You cannot create a {0} within the closed Accounting Period {1},在已关闭的会计期间{1}内无法创建{0}, +You cannot create/amend any accounting entries till this date.,在此日期之前无法创建/修改会计分录, +You cannot repost item valuation before {},在{}之前无法重新过账物料计价, +You cannot {0} this document because another Period Closing Entry {1} exists after {2},无法{0}此单据,因为存在后续的期间结账分录{1}在{2}之后, +You have entered a duplicate Delivery Note on Row,您在第行输入了重复的送货单, +You haven't created a {0} yet,您尚未创建{0}, +You need to cancel POS Closing Entry {} to be able to cancel this document.,需先取消POS结算单{}才能取消此单据, +Your Name (required),您的姓名(必填), +Your email has been verified and your appointment has been scheduled,您的邮箱已验证,预约已安排, +Zero Balance,零余额, +Zero Rated,零税率, +Zero quantity,零数量, +`Allow Negative rates for Items`,`允许物料负单价`, +as Code,作为代码, +as Description,作为描述, +as Title,作为标题, +as a percentage of finished item quantity,按完工数量百分比, +at,于, +by {},由{}, +dated {0},日期为{0}, +description,描述, +discount applied,已应用折扣, +doc_type,文档类型, +doctype,文档类型, +exchangerate.host,汇率服务商, +fieldname,字段名称, +frankfurter.app,法兰克福应用, +is already,已被, +must be between 0 and 100,必须在0到100之间, +or its descendants,或其子节点, +out of 5,满分5分, +payments app is not installed. Please install it from {0} or {1},未安装支付应用,请从{0}或{1}安装, +payments app is not installed. Please install it from {} or {},未安装支付应用,请从{}或{}安装, +performing either one below:,执行以下任一操作:, +product bundle item row's name in sales order. Also indicates that picked item is to be used for a product bundle,销售订单中产品套件行的名称,表示拣选的物料将用于产品套件, +quotation_item,报价单条目, +ratings,评分, +subscription is already cancelled.,订阅已取消, +target_ref_field,目标参考字段, +temporary name,临时名称, +to unallocate the amount of this Return Invoice before cancelling it.,在取消前需先解除此退货发票的金额分配, +variance,差异, +via BOM Update Tool,通过物料清单更新工具, +will be,将会, +{0} {1} has submitted Assets. Remove Item {2} from table to continue.,{0}{1}已提交资产,请从表中移除物料{2}以继续, +{0} Account not found against Customer {1}.,客户{1}未找到{0}科目, +{0} Account: {1} ({2}) must be in either customer billing currency: {3} or Company default currency: {4},{0}科目:{1}({2})必须使用客户结算货币{3}或公司默认货币{4}, +{0} Budget for Account {1} against {2} {3} is {4}. It {5} exceed by {6},{0}预算:科目{1}针对{2}{3}的预算为{4},{5}超出{6}, +{0} Transaction(s) Reconciled,{0}笔交易已对账, +{0} account is not of type {1},{0}科目类型不是{1}, +{0} account not found while submitting purchase receipt,提交采购收据时未找到{0}科目, +{0} and {1},{0}和{1}, +{0} cannot be used as a Main Cost Center because it has been used as child in Cost Center Allocation {1},{0}不能作为主成本中心,因其已被用作成本中心分配{1}的子项, +{0} cannot be zero,{0}不能为零, +{0} currency must be same as company's default currency. Please select another account.,{0}货币必须与公司默认货币一致,请选择其他账户, +{0} entered twice {1} in Item Taxes,{0}在物料税{1}中重复输入, +{0} has Payment Term based allocation enabled. Select a Payment Term for Row #{1} in Payment References section,{0}已启用基于付款条件的分配,请在付款参考部分为第#{1}行选择付款条件, +{0} is a mandatory Accounting Dimension.
Please set a value for {0} in Accounting Dimensions section.,{0}是必填会计维度,请在会计维度部分设置{0}的值, +{0} is a mandatory field.,{0}是必填字段, +{0} is added multiple times on rows: {1},{0}在以下行被多次添加:{1}, +{0} is already running for {1},{0}已在{1}运行, +{0} is mandatory for account {1},科目{1}的{0}必填, +{0} is not running. Cannot trigger events for this Document,{0} 未运行。无法触发该文档的事件, +{0} items lost during process.,流程中丢失{0}件物料。, +{0} qty of Item {1} is being received into Warehouse {2} with capacity {3}.,正在将物料{1}的{0}数量接收到容量为{3}的仓库{2}, +"{0} units are reserved for Item {1} in Warehouse {2}, please un-reserve the same to {3} the Stock Reconciliation.",仓库{2}中物料{1}已预留{0}单位,请取消预留以{3}库存对账, +{0} units of Item {1} is not available in any of the warehouses.,物料{1}在任何仓库中均无{0}单位的可用库存, +{0} units of Item {1} is picked in another Pick List.,物料{1}的{0}单位已在其他拣货单中被拣选, +{0} units of {1} are required in {2} with the inventory dimension: {3} ({4}) on {5} {6} for {7} to complete the transaction.,需在{2}中准备{1}的{0}单位,库存维度:{3}({4}),日期{5}{6},用于{7}以完成交易, +{0} units of {1} needed in {2} on {3} {4} to complete this transaction.,需在{2}的{3}{4}准备{1}的{0}单位以完成本交易, +{0} will be given as discount.,{0}将作为折扣发放, +{0} {1},{0}{1}, +{0} {1} Manually,手动{0}{1}, +{0} {1} Partially Reconciled,{0}{1}部分对账, +"{0} {1} cannot be updated. If you need to make changes, we recommend canceling the existing entry and creating a new one.",无法更新{0}{1}。如需修改,建议取消现有凭证并新建, +{0} {1} has already been fully paid.,{0}{1}已全额支付, +{0} {1} has already been partly paid. Please use the 'Get Outstanding Invoice' or the 'Get Outstanding Orders' button to get the latest outstanding amounts.,{0}{1}已部分支付。请使用'获取未清发票'或'获取未清订单'按钮查看最新未结金额, +{0} {1} is allocated twice in this Bank Transaction,银行交易中重复分配了{0}{1}, +{0} {1} is already linked to Common Code {2}.,{0}{1}已关联至通用代码{2}, +{0} {1} is not in any active Fiscal Year,{0}{1}不在任何有效会计年度内, +{0} {1} is on hold,{0}{1}已暂挂, +{0} {1} not allowed to be reposted. Modify {2} to enable reposting.,不允许重新过账{0}{1}。请修改{2}以启用重过账功能, +{0} {1} via CSV File,通过CSV文件{0}{1}, +{0} {1}: Account {2} is a Group Account and group accounts cannot be used in transactions,{0}{1}: 科目{2}为组科目,不可用于交易凭证, +{0} {1}: Cost Center is required for 'Profit and Loss' account {2}.,{0}{1}: 损益类科目{2}必须指定成本中心, +{0} {1}: Cost Center {2} is a group cost center and group cost centers cannot be used in transactions,{0}{1}: 成本中心{2}为组成本中心,不可用于交易凭证, +{0}% of total invoice value will be given as discount.,将按发票总额的{0}%作为折扣发放, +{0}'s {1} cannot be after {2}'s Expected End Date.,{0}的{1}不得晚于{2}的预计结束日期, +{0}: {1} does not belong to the Company: {2},{0}: {1}不属于公司{2}, +{item_name}'s Sample Size ({sample_size}) cannot be greater than the Accepted Quantity ({accepted_quantity}),{item_name}的样本量({sample_size})不得超过验收数量({accepted_quantity}), +{} Available,{} 可用, +{} To Deliver,{} 待交付, +{} To Receive,{} 待接收, +{} Assigned,{} 已分配, +{} Available,{} 可用, +{} Open,{} 未结, +{} Pending,{} 待处理, +{} To Bill,{} 待开票, +{} is a child company.,{}是子公司, +{} {} is already linked with another {},{} {}已关联其他{}, +{} {} is already linked with {} {},{} {}已关联{} {}, From 99735e0af489a2c4faec57436eea0c2ed0cc6680 Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Wed, 16 Apr 2025 10:18:29 +0530 Subject: [PATCH 1608/1614] revert: disable customer if creating from opportunity (cherry picked from commit fc16199a49141315b5e1e78a178a49f7d8cc6b09) --- erpnext/selling/doctype/quotation/quotation.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/selling/doctype/quotation/quotation.js b/erpnext/selling/doctype/quotation/quotation.js index b9d46e0b84b..2e88ba9e482 100644 --- a/erpnext/selling/doctype/quotation/quotation.js +++ b/erpnext/selling/doctype/quotation/quotation.js @@ -70,7 +70,8 @@ erpnext.selling.QuotationController = class QuotationController extends erpnext. onload(doc, dt, dn) { super.onload(doc, dt, dn); - this.frm.trigger("disable_customer_if_creating_from_opportunity"); + // TODO: think of better way to do this + // this.frm.trigger("disable_customer_if_creating_from_opportunity"); } party_name() { var me = this; From be154a469fb2b0955f43fffc2365be6b20a43b65 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Mon, 14 Apr 2025 12:36:59 +0530 Subject: [PATCH 1609/1614] fix: consider per_ordered instead of per_billed when creating PO from MR (cherry picked from commit 5a524854de5d68ccf67313530dfb8faeab2d2128) # Conflicts: # erpnext/stock/doctype/material_request/material_request.js --- .../material_request/material_request.js | 19 +++++++++++++++++-- .../material_request/material_request.py | 4 ++-- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/erpnext/stock/doctype/material_request/material_request.js b/erpnext/stock/doctype/material_request/material_request.js index 83b63e225b3..86a4333eb65 100644 --- a/erpnext/stock/doctype/material_request/material_request.js +++ b/erpnext/stock/doctype/material_request/material_request.js @@ -107,6 +107,7 @@ frappe.ui.form.on("Material Request", { if (flt(frm.doc.per_received, precision) < 100) { frm.add_custom_button(__("Stop"), () => frm.events.update_status(frm, "Stopped")); +<<<<<<< HEAD if (frm.doc.material_request_type === "Purchase") { frm.add_custom_button( @@ -115,6 +116,8 @@ frappe.ui.form.on("Material Request", { __("Create") ); } +======= +>>>>>>> 5a524854de (fix: consider per_ordered instead of per_billed when creating PO from MR) } if (flt(frm.doc.per_ordered, precision) < 100) { @@ -158,14 +161,18 @@ frappe.ui.form.on("Material Request", { } if (frm.doc.material_request_type === "Purchase") { + frm.add_custom_button( + __("Purchase Order"), + () => frm.events.make_purchase_order(frm), + __("Create") + ); + frm.add_custom_button( __("Request for Quotation"), () => frm.events.make_request_for_quotation(frm), __("Create") ); - } - if (frm.doc.material_request_type === "Purchase") { frm.add_custom_button( __("Supplier Quotation"), () => frm.events.make_supplier_quotation(frm), @@ -181,6 +188,14 @@ frappe.ui.form.on("Material Request", { ); } + if (frm.doc.material_request_type === "Subcontracting") { + frm.add_custom_button( + __("Subcontracted Purchase Order"), + () => frm.events.make_purchase_order(frm), + __("Create") + ); + } + frm.page.set_inner_btn_group_as_primary(__("Create")); } } diff --git a/erpnext/stock/doctype/material_request/material_request.py b/erpnext/stock/doctype/material_request/material_request.py index 59634cb9f7c..a5f1467cced 100644 --- a/erpnext/stock/doctype/material_request/material_request.py +++ b/erpnext/stock/doctype/material_request/material_request.py @@ -379,7 +379,7 @@ def set_missing_values(source, target_doc): def update_item(obj, target, source_parent): target.conversion_factor = obj.conversion_factor - qty = obj.received_qty or obj.ordered_qty + qty = obj.ordered_qty or obj.received_qty target.qty = flt(flt(obj.stock_qty) - flt(qty)) / target.conversion_factor target.stock_qty = target.qty * target.conversion_factor if getdate(target.schedule_date) < getdate(nowdate()): @@ -432,7 +432,7 @@ def make_purchase_order(source_name, target_doc=None, args=None): filtered_items = args.get("filtered_children", []) child_filter = d.name in filtered_items if filtered_items else True - qty = d.received_qty or d.ordered_qty + qty = d.ordered_qty or d.received_qty return qty < d.stock_qty and child_filter From 20aba541c4218fd4847ec4feb9983aba6ec73d0f Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Wed, 16 Apr 2025 20:32:05 +0530 Subject: [PATCH 1610/1614] fix: cherry pick --- .../doctype/material_request/material_request.js | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/erpnext/stock/doctype/material_request/material_request.js b/erpnext/stock/doctype/material_request/material_request.js index 86a4333eb65..5f46ef968b0 100644 --- a/erpnext/stock/doctype/material_request/material_request.js +++ b/erpnext/stock/doctype/material_request/material_request.js @@ -107,17 +107,6 @@ frappe.ui.form.on("Material Request", { if (flt(frm.doc.per_received, precision) < 100) { frm.add_custom_button(__("Stop"), () => frm.events.update_status(frm, "Stopped")); -<<<<<<< HEAD - - if (frm.doc.material_request_type === "Purchase") { - frm.add_custom_button( - __("Purchase Order"), - () => frm.events.make_purchase_order(frm), - __("Create") - ); - } -======= ->>>>>>> 5a524854de (fix: consider per_ordered instead of per_billed when creating PO from MR) } if (flt(frm.doc.per_ordered, precision) < 100) { From f07c3d91240d6bf7f0922cdd298ec38bcc54c3f4 Mon Sep 17 00:00:00 2001 From: venkat102 Date: Thu, 17 Apr 2025 00:12:43 +0530 Subject: [PATCH 1611/1614] fix: add group by after user permission condition (cherry picked from commit 756d496235af3223e64ae33c51fd5b63d91856da) --- erpnext/accounts/report/financial_statements.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/report/financial_statements.py b/erpnext/accounts/report/financial_statements.py index 67154455f95..0d1e185382d 100644 --- a/erpnext/accounts/report/financial_statements.py +++ b/erpnext/accounts/report/financial_statements.py @@ -519,9 +519,6 @@ def get_accounting_entries( .where(gl_entry.company == filters.company) ) - if group_by_account: - query = query.groupby(gl_entry.account) - ignore_is_opening = frappe.db.get_single_value( "Accounts Settings", "ignore_is_opening_check_for_reporting" ) @@ -551,6 +548,9 @@ def get_accounting_entries( if match_conditions: query += "and" + match_conditions + if group_by_account: + query += " GROUP BY `account`" + return frappe.db.sql(query, params, as_dict=True) From ad177e08b80238b2ca3b6f93ed6a8261dbe7bc3f Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 17 Apr 2025 13:40:05 +0200 Subject: [PATCH 1612/1614] fix: create default warehouse (backport #47125) (#47131) Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com> fix: create default warehouse (#47125) --- erpnext/setup/doctype/company/company.py | 44 ++++++++++++++---------- 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/erpnext/setup/doctype/company/company.py b/erpnext/setup/doctype/company/company.py index 8ae843abc24..e5f26073a33 100644 --- a/erpnext/setup/doctype/company/company.py +++ b/erpnext/setup/doctype/company/company.py @@ -282,6 +282,7 @@ class Company(NestedSet): frappe.clear_cache() def create_default_warehouses(self): + parent_warehouse = None for wh_detail in [ {"warehouse_name": _("All Warehouses"), "is_group": 1}, {"warehouse_name": _("Stores"), "is_group": 0}, @@ -289,24 +290,31 @@ class Company(NestedSet): {"warehouse_name": _("Finished Goods"), "is_group": 0}, {"warehouse_name": _("Goods In Transit"), "is_group": 0, "warehouse_type": "Transit"}, ]: - if not frappe.db.exists("Warehouse", "{} - {}".format(wh_detail["warehouse_name"], self.abbr)): - warehouse = frappe.get_doc( - { - "doctype": "Warehouse", - "warehouse_name": wh_detail["warehouse_name"], - "is_group": wh_detail["is_group"], - "company": self.name, - "parent_warehouse": "{} - {}".format(_("All Warehouses"), self.abbr) - if not wh_detail["is_group"] - else "", - "warehouse_type": wh_detail["warehouse_type"] - if "warehouse_type" in wh_detail - else None, - } - ) - warehouse.flags.ignore_permissions = True - warehouse.flags.ignore_mandatory = True - warehouse.insert() + if frappe.db.exists( + "Warehouse", + { + "warehouse_name": wh_detail["warehouse_name"], + "company": self.name, + }, + ): + continue + + warehouse = frappe.get_doc( + { + "doctype": "Warehouse", + "warehouse_name": wh_detail["warehouse_name"], + "is_group": wh_detail["is_group"], + "company": self.name, + "parent_warehouse": parent_warehouse, + "warehouse_type": wh_detail.get("warehouse_type"), + } + ) + warehouse.flags.ignore_permissions = True + warehouse.flags.ignore_mandatory = True + warehouse.insert() + + if wh_detail["is_group"]: + parent_warehouse = warehouse.name def create_default_accounts(self): from erpnext.accounts.doctype.account.chart_of_accounts.chart_of_accounts import create_charts From 451b1a19a85bdd19b2c8fd8fcda057d072f2b154 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 17 Apr 2025 14:18:00 +0200 Subject: [PATCH 1613/1614] chore: migrate pre-commit config (backport #47132) (#47134) Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7375ca14727..13cbf66a5af 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,5 +1,5 @@ exclude: 'node_modules|.git' -default_stages: [commit] +default_stages: [pre-commit] fail_fast: false From 846b24ba52c016e5a41b911fdece42029db9119e Mon Sep 17 00:00:00 2001 From: Sagar Vora <16315650+sagarvora@users.noreply.github.com> Date: Sat, 19 Apr 2025 11:16:48 +0530 Subject: [PATCH 1614/1614] fix: respect mapped accounting dimensions (cherry picked from commit 7dbe27da198e142caa1679e0ca35c1a7b553e624) --- .../public/js/utils/dimension_tree_filter.js | 53 +++++++++---------- 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/erpnext/public/js/utils/dimension_tree_filter.js b/erpnext/public/js/utils/dimension_tree_filter.js index 36c0f1b51ae..68bf11de5d8 100644 --- a/erpnext/public/js/utils/dimension_tree_filter.js +++ b/erpnext/public/js/utils/dimension_tree_filter.js @@ -77,35 +77,34 @@ erpnext.accounts.dimensions = { }, update_dimension(frm, doctype) { - if (this.accounting_dimensions) { - this.accounting_dimensions.forEach((dimension) => { - if (frm.is_new()) { - if ( - frm.doc.company && - Object.keys(this.default_dimensions || {}).length > 0 && - this.default_dimensions[frm.doc.company] - ) { - let default_dimension = - this.default_dimensions[frm.doc.company][dimension["fieldname"]]; + if ( + !this.accounting_dimensions || + !frm.is_new() || + !frm.doc.company || + !this.default_dimensions?.[frm.doc.company] + ) + return; - if (default_dimension) { - if (frappe.meta.has_field(doctype, dimension["fieldname"])) { - frm.set_value(dimension["fieldname"], default_dimension); - } - - $.each(frm.doc.items || frm.doc.accounts || [], function (i, row) { - frappe.model.set_value( - row.doctype, - row.name, - dimension["fieldname"], - default_dimension - ); - }); - } - } - } - }); + // don't set default dimensions if any of the dimension is already set due to mapping + if (frm.doc.__onload?.load_after_mapping) { + for (const dimension of this.accounting_dimensions) { + if (frm.doc[dimension["fieldname"]]) return; + } } + + this.accounting_dimensions.forEach((dimension) => { + const default_dimension = this.default_dimensions[frm.doc.company][dimension["fieldname"]]; + + if (!default_dimension) return; + + if (frappe.meta.has_field(doctype, dimension["fieldname"])) { + frm.set_value(dimension["fieldname"], default_dimension); + } + + (frm.doc.items || frm.doc.accounts || []).forEach((row) => { + frappe.model.set_value(row.doctype, row.name, dimension["fieldname"], default_dimension); + }); + }); }, copy_dimension_from_first_row(frm, cdt, cdn, fieldname) {